Files
2026-07-28 01:06:53 +03:00

466 lines
24 KiB
TypeScript

/* Metro module 9385; source: modules/connections/native/DomainVerifyModal.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 697, 1484, 507, 6618, 4573, 1244, 8967, 9386, 4578, 5080, 5282, 5280, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import FreeFormInputGroup from '../../../design/void/Form/native/FreeFormInputGroup.tsx'; /* Metro dependency 8967 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as HTTPUtilsModule from '../../../external/discord_common/js/packages/http-utils/HTTPUtils.tsx'; /* Metro dependency 507 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
import * as DomainVerifyUtilsModule from '../DomainVerifyUtils.tsx'; /* Metro dependency 9386 */
function _fun73200(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:6, offset: 0x01d622a5, size: 471 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ConstantsModule;
const env0_6 = value.Endpoints;
const env0_7 = value.PlatformTypes;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
const object3 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object3.backgroundColor = BACKGROUND_BASE_LOWEST;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
object3.padding = 8;
object3.marginTop = 16;
const env0_10 = Reflect.apply(createStyles, value, [{container: {padding: 16}, description: {textAlign: 'center'},
input: {'paddingHorizontal': 0, 'paddingVertical': 0, 'marginVertical': 16}, dns: object3,
error: {marginTop: 16}, code: {'fontFamily': 'monospace', 'marginBottom': 4}, button: {marginTop: 16}}]);
object = {DOMAIN: 'DOMAIN', PROOF_DNS: 'PROOF_DNS', PROOF_HTTP: 'PROOF_HTTP'};
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/DomainVerifyModal.tsx');
exports.default = DomainVerifyModal;
function DomainScreen({onClose}) { // fn#73201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:648, offset: 0x01d6247c, size: 596 bytes, params: 2, frame: 31
const styles = useStyles();
const env0_1 = (UseNavigationNativeModule).useNavigation();
const [property, property2] = env0_3Binding(env0_4Binding.useState(''), 2);
var [property3, env0_3] = env0_3Binding(env0_4Binding.useState(null), 2);
var [property4, env0_4] = env0_3Binding(env0_4Binding.useState(false), 2);
const onSubmitEditing2 = onSubmitEditing;
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
const intl = (IndexNativeModule).intl;
let string = intl.string;
const NxPUqY = (IndexNativeModule).t.NxPUqY;
const items2 = [
<Text
variant="text-md/normal"
color="text-default"
style={styles.description}
>
{Reflect.apply(string, intl, [NxPUqY])}
</Text>,
];
const freeFormInputGroupProps = {autoFocus: true, style: styles.input,
label: intl.string((IndexNativeModule).t['4jIAa+'])};
const EXAMPLE_DOMAIN = (DomainVerifyUtilsModule).EXAMPLE_DOMAIN;
freeFormInputGroupProps.placeholder = EXAMPLE_DOMAIN;
freeFormInputGroupProps.error = property3;
freeFormInputGroupProps.returnKeyType = 'done';
freeFormInputGroupProps.onChangeText = property2;
freeFormInputGroupProps.onSubmitEditing = onSubmitEditing2;
items2[1] = <FreeFormInputGroup {...freeFormInputGroupProps} />;
const Button = (ButtonNativeModule).Button;
string = intl.string;
const PDTjLN = (IndexNativeModule).t.PDTjLN;
items2[2] = (
<Button
loading={property4}
disabled={property === ''}
text={Reflect.apply(string, intl, [PDTjLN])}
onPress={onSubmitEditing2}
/>
);
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items2}
</SafeAreaPaddingView>
);
function DomainScreenOnPress() { // fn#73202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:848, owner: DomainScreen.onPress, offset: 0x01d626d0, size: 171 bytes, params: 1, frame: 18
env0_4(true);
env0_3(null);
const HTTP = (HTTPUtilsModule).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, env0_2]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73204);
value.finally(_fun73205);
function _fun73204(a0) { // fn#73204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:969, offset: 0x01d6277b, size: 216 bytes, params: 2, frame: 16
var r0;
var value;
var binding;
var push;
var value2;
let body = a0.body;
if (body == null) {
value = environment.__proto__;
binding = env1_3;
body = a0.body;
value = undefined;
r0 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r0 = !r0 ? a0.message : r0;
binding(r0);
} else if (body.proof) {
value = environment.__proto__;
binding = env1_1;
push = binding.push;
value2 = environment.__proto__.__proto__;
Reflect.apply(push, binding, [env2_11.PROOF_DNS, {proof: a0.body.proof, domain: env1_2}]);
} else {
value = environment.__proto__;
binding = env1_3;
body = a0.body;
value = undefined;
r0 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r0 = !r0 ? a0.message : r0;
binding(r0);
}
}
function _fun73205() { // fn#73205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:1235, offset: 0x0101b7c8, size: 18 bytes, params: 1, frame: 11
env1_4(false);
}
}
}
function DNSProofScreen({onClose, domain, proof}) { // fn#73206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:1763, offset: 0x01d62853, size: 1123 bytes, params: 2, frame: 36
const styles = useStyles();
const env0_3 = (UseNavigationNativeModule).useNavigation();
const [property, env0_4] = env0_3(env0_4Binding.useState(null), 2);
const [property2, env0_5] = env0_3(env0_4Binding.useState(false), 2);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items3 = [
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.cSURbq])}
</Text>,
];
string = intl.string;
const GL3q7k = (require(1244) /* metro dependency 1244: indexNative */).t.GL3q7k;
const items2 = [
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [GL3q7k])}
</Text>,
];
items2[1] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{(require(9386) /* metro dependency 9386: DomainVerifyUtils */).getDnsName(domain)}
</Text>
);
string = intl.string;
const Ccmixu = (require(1244) /* metro dependency 1244: indexNative */).t.Ccmixu;
items2[2] = (
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [Ccmixu])}
</Text>
);
items2[3] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{'TXT'}
</Text>
);
string = intl.string;
const PVLriT = (require(1244) /* metro dependency 1244: indexNative */).t.PVLriT;
items2[4] = (
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [PVLriT])}
</Text>
);
items2[5] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{proof}
</Text>
);
items3[1] = (
<View style={styles.dns}>
{items2}
</View>
);
items3[2] = property != null && <Text variant="text-md/normal" color="text-feedback-critical" style={styles.error}>{property}</Text>;
let button = styles.button;
const Button = (ButtonNativeModule).Button;
items3[3] = (
<View style={button}>
<Button
loading={property2}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13ofGu'])}
onPress={onPress_73207}
/>
</View>
);
button = styles.button;
string = intl.string;
const CkfdNx = (require(1244) /* metro dependency 1244: indexNative */).t.CkfdNx;
items3[4] = (
<View style={button}>
<Button
variant="secondary"
text={Reflect.apply(string, intl, [CkfdNx])}
onPress={onPress_73211}
/>
</View>
);
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items3}
</SafeAreaPaddingView>
);
function DNSProofScreenOnPress() { // fn#73207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:2907, owner: DNSProofScreen.onPress, offset: 0x01d62cb6, size: 171 bytes, params: 1, frame: 18
env0_5(true);
env0_4(null);
const HTTP = (HTTPUtilsModule).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, domain]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73209);
value.finally(_fun73210);
function _fun73209(a0) { // fn#73209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3028, offset: 0x01d62d61, size: 133 bytes, params: 2, frame: 15
let value = environment.__proto__;
const binding = env1_4;
const body = a0.body;
value = undefined;
let r1 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r1 = !r1 ? a0.message : r1;
binding(r1);
return value;
}
function _fun73210() { // fn#73210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3216, offset: 0x01d62de6, size: 18 bytes, params: 1, frame: 11
env1_5(false);
}
}
function DNSProofScreenOnPress_73211() { // fn#73211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3356, owner: DNSProofScreen.onPress, offset: 0x01d62df8, size: 55 bytes, params: 1, frame: 15
const binding = env0_3;
const push = binding.push;
const PROOF_HTTP = env1_11.PROOF_HTTP;
Reflect.apply(push, binding, [PROOF_HTTP, {proof: proof, domain: domain}]);
}
}
function HTTPProofScreen({onClose, domain, proof}) { // fn#73212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:3409, offset: 0x01d62e2f, size: 982 bytes, params: 2, frame: 36
const styles = useStyles();
const env0_2 = (UseNavigationNativeModule).useNavigation();
const [property, env0_3] = env0_3Binding(env0_4Binding.useState(null), 2);
var [property2, env0_4] = env0_3Binding(env0_4Binding.useState(false), 2);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items3 = [
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.p4ql7y])}
</Text>,
];
string = intl.string;
const GL3q7k = (require(1244) /* metro dependency 1244: indexNative */).t.GL3q7k;
const items2 = [
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [GL3q7k])}
</Text>,
];
items2[1] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{(require(9386) /* metro dependency 9386: DomainVerifyUtils */).getHttpName(domain)}
</Text>
);
string = intl.string;
const PVLriT = (require(1244) /* metro dependency 1244: indexNative */).t.PVLriT;
items2[2] = (
<Text variant="text-md/normal">
{Reflect.apply(string, intl, [PVLriT])}
</Text>
);
items2[3] = (
<Text
variant="text-md/normal"
selectable
style={styles.code}
>
{proof}
</Text>
);
items3[1] = (
<View style={styles.dns}>
{items2}
</View>
);
items3[2] = property != null && <Text variant="text-md/normal" color="text-feedback-critical" style={styles.error}>{property}</Text>;
let button = styles.button;
const Button = (ButtonNativeModule).Button;
items3[3] = (
<View style={button}>
<Button
loading={property2}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13ofGu'])}
onPress={onPress_73213}
/>
</View>
);
button = styles.button;
string = intl.string;
const RhJMVQ = (require(1244) /* metro dependency 1244: indexNative */).t.RhJMVQ;
items3[4] = (
<View style={button}>
<Button
variant="secondary"
text={Reflect.apply(string, intl, [RhJMVQ])}
onPress={onPress_73217}
/>
</View>
);
return (
<SafeAreaPaddingView bottom style={styles.container}>
{items3}
</SafeAreaPaddingView>
);
function HTTPProofScreenOnPress() { // fn#73213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4376, owner: HTTPProofScreen.onPress, offset: 0x01d63205, size: 171 bytes, params: 1, frame: 18
env0_4(true);
env0_3(null);
const HTTP = (HTTPUtilsModule).HTTP;
const post = HTTP.post;
const CONNECTION = Endpoints.CONNECTION;
const DOMAIN = PlatformTypes.DOMAIN;
let value = Reflect.apply(post, HTTP, [{url: Reflect.apply(CONNECTION, Endpoints, [DOMAIN, domain]), body: {},
rejectWithError: false}]);
value = value.then(function() {
onClose();
});
value = value.catch(_fun73215);
value.finally(_fun73216);
function _fun73215(a0) { // fn#73215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4497, offset: 0x01d632b0, size: 133 bytes, params: 2, frame: 15
let value = environment.__proto__;
const binding = env1_3;
const body = a0.body;
value = undefined;
let r1 = (body == null || body.errors == null || (body.errors.domain == null || body.errors.domain._errors == null) || body.errors.domain._errors[0] == null ? value : body.errors.domain._errors[0].message) || (a0.body == null ? value : a0.body.message);
r1 = !r1 ? a0.message : r1;
binding(r1);
return value;
}
function _fun73216() { // fn#73216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4685, offset: 0x0101b7c8, size: 18 bytes, params: 1, frame: 11
env1_4(false);
}
}
function HTTPProofScreenOnPress_73217() { // fn#73217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4825, owner: HTTPProofScreen.onPress, offset: 0x01d63335, size: 21 bytes, params: 1, frame: 9
env0_2.pop();
}
}
function DomainVerifyModal(a0) { // fn#73218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4940, offset: 0x01d6334a, size: 473 bytes, params: 2, frame: 24
if (a0 == null) {
throwTypeError(a0, "Cannot destructure 'undefined' or 'null'.", undefined);
throw undefined;
}
const DomainVerifyModalOnClose2 = DomainVerifyModalOnClose;
const object = {};
let DOMAIN = env0_11.DOMAIN;
const object2 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(DomainVerifyModalOnClose2);
object2.render = render_73220;
object[DOMAIN] = object2;
const PROOF_DNS = env0_11.PROOF_DNS;
const object3 = {};
object3.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(DomainVerifyModalOnClose2);
object3.render = render_73221;
object[PROOF_DNS] = object3;
const PROOF_HTTP = env0_11.PROOF_HTTP;
const object4 = {};
object4.headerTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['7lo8+e']);
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(DomainVerifyModalOnClose2);
object4.render = render_73222;
object[PROOF_HTTP] = object4;
const Navigator = (NavigatorNativeModule).Navigator;
DOMAIN = env0_11.DOMAIN;
return (
<Navigator
screens={object}
initialRouteName={DOMAIN}
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
/>
);
function DomainVerifyModalOnClose() { // fn#73219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:4983, owner: DomainVerifyModal.onClose, offset: 0x01d63523, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ModalActionCreators).pop();
}
function DomainVerifyModalRender() { // fn#73220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5128, owner: DomainVerifyModal.render, offset: 0x01d63548, size: 35 bytes, params: 1, frame: 13
return <DomainScreen onClose={DomainVerifyModalOnClose} />;
}
function DomainVerifyModalRender_73221({domain, proof}) { // fn#73221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5293, owner: DomainVerifyModal.render, offset: 0x01d6356b, size: 60 bytes, params: 2, frame: 14
return (
<DNSProofScreen
domain={domain}
proof={proof}
onClose={DomainVerifyModalOnClose}
/>
);
}
function DomainVerifyModalRender_73222({domain, proof}) { // fn#73222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9571:5496, owner: DomainVerifyModal.render, offset: 0x01d635a7, size: 60 bytes, params: 2, frame: 14
return (
<HTTPProofScreen
domain={domain}
proof={proof}
onClose={DomainVerifyModalOnClose}
/>
);
}
}
}
global.__d(_fun73200, 9385, [57, 31, 27, 661, 33, 4501, 697, 1484, 507, 6618, 4573, 1244, 8967, 9386, 4578, 5080,
5282, 5280,
2]) /* metro module 9385, dependencies: [57, 31, 27, 661, 33, 4501, 697, 1484, 507, 6618, 4573, 1244, 8967, 9386, 4578, 5080, 5282, 5280, 2] */;