decord/source/modules/connections/native/DomainVerifyModal.tsx

383 lines
15 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 9847
// Function ID: 9848
2026-07-20 16:05:17 +00:00
// Name: DomainScreen
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 676, 21, 4668, 712, 1500, 530, 6840, 4739, 1236, 8614, 9848, 4750, 5265, 6345, 6343, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 9847 (DomainScreen)
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import useNavigation from "useNavigation" /* 1500 */;
import Text from "Text" /* 4739 */;
import Button from "Button" /* 4750 */;
import SafeAreaPaddingView from "SafeAreaPaddingView" /* 6840 */;
import EXAMPLE_DOMAIN from "EXAMPLE_DOMAIN" /* 9848 */;
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import ME from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function DomainScreen(onClose) {
2026-07-23 10:11:24 +00:00
onClose = onClose.onClose;
2026-08-24 06:08:38 +00:00
importDefault = undefined;
2026-07-23 10:11:24 +00:00
let first;
2026-07-20 16:05:17 +00:00
let callback;
let React;
function verify() {
callback2(true);
callback(null);
const HTTP = onClose(first[8]).HTTP;
2026-08-24 06:08:38 +00:00
let obj = { url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, first), body: {}, rejectWithError: false };
const postResult = HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, first), body: {}, rejectWithError: false });
const nextPromise = HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, first), body: {}, rejectWithError: false }).then(() => {
2026-07-29 08:29:29 +00:00
callback();
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, first), body: {}, rejectWithError: false }).then(() => {
2026-07-29 08:29:29 +00:00
callback();
2026-07-20 16:05:17 +00:00
}).catch((body) => {
body = body.body;
2026-07-29 08:29:29 +00:00
let proof;
if (body != null) {
proof = body.proof;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (proof) {
const obj = { proof: null, domain: null };
obj[0] = body.body.proof;
obj[1] = closure_2;
2026-08-24 06:08:38 +00:00
arr = arr.push(closure_1_11.PROOF_DNS, obj);
2026-07-29 08:29:29 +00:00
} else {
const body2 = body.body;
let message;
if (body2 != null) {
const errors = body2.errors;
if (errors != null) {
const domain = errors.domain;
if (domain != null) {
const _errors = domain._errors;
if (_errors != null) {
2026-08-24 06:08:38 +00:00
first = _errors[0];
2026-07-29 08:29:29 +00:00
if (first != null) {
message = first.message;
}
2026-07-20 16:05:17 +00:00
}
}
}
}
2026-07-29 08:29:29 +00:00
if (!message) {
const body3 = body.body;
let message1;
if (body3 != null) {
message1 = body3.message;
}
message = message1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!message) {
message = body.message;
}
2026-08-24 06:08:38 +00:00
closure_3(message);
const tmp2 = closure_3;
2026-07-20 16:05:17 +00:00
}
}).finally(() => {
2026-07-29 08:29:29 +00:00
callback2(false);
2026-07-20 16:05:17 +00:00
});
}
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-23 10:11:24 +00:00
let obj = onClose(first[7]);
2026-07-20 16:05:17 +00:00
importDefault = obj.useNavigation();
2026-07-29 08:29:29 +00:00
let tmp2 = callback(React.useState(""), 2);
2026-07-23 10:11:24 +00:00
first = tmp2[0];
2026-07-20 16:05:17 +00:00
const tmp4 = callback(React.useState(null), 2);
callback = tmp4[1];
const tmp5 = callback(React.useState(false), 2);
React = tmp5[1];
2026-07-29 08:29:29 +00:00
obj = { bottom: true, style: tmp.container, children: null };
obj = { variant: "text-md/normal", color: "text-default", style: tmp.description, children: null };
2026-07-23 10:11:24 +00:00
const intl = onClose(first[11]).intl;
2026-07-29 08:29:29 +00:00
obj[3] = intl.string(onClose(first[11]).t.NxPUqY);
2026-07-23 10:11:24 +00:00
const items = [callback2(onClose(first[10]).Text, obj), , ];
2026-08-24 06:08:38 +00:00
obj1 = { autoFocus: true, style: tmp.input, label: null, placeholder: null, error: null, returnKeyType: "done", onChangeText: null, onSubmitEditing: null };
2026-07-23 10:11:24 +00:00
const intl2 = onClose(first[11]).intl;
2026-07-29 08:29:29 +00:00
obj1[2] = intl2.string(onClose(first[11]).t["4jIAa+"]);
obj1[3] = onClose(first[13]).EXAMPLE_DOMAIN;
obj1[4] = tmp4[0];
obj1[6] = tmp2[1];
obj1[7] = verify;
2026-07-23 10:11:24 +00:00
items[1] = callback2(importDefault(first[12]), obj1);
2026-07-29 08:29:29 +00:00
const obj2 = { loading: tmp5[0], disabled: "" === first, text: null, onPress: null };
2026-07-23 10:11:24 +00:00
const intl3 = onClose(first[11]).intl;
2026-07-29 08:29:29 +00:00
obj2[2] = intl3.string(onClose(first[11]).t.PDTjLN);
obj2[3] = verify;
2026-07-23 10:11:24 +00:00
items[2] = callback2(onClose(first[14]).Button, obj2);
2026-07-29 08:29:29 +00:00
obj[2] = items;
2026-07-23 10:11:24 +00:00
return callback3(onClose(first[9]).SafeAreaPaddingView, obj);
2026-07-20 16:05:17 +00:00
}
function DNSProofScreen(proof) {
2026-07-23 10:11:24 +00:00
({ onClose: require, domain } = proof);
2026-07-20 16:05:17 +00:00
proof = proof.proof;
2026-07-29 08:29:29 +00:00
let callback;
let React;
c5 = undefined;
2026-08-24 06:08:38 +00:00
const tmp = callback4();
2026-07-23 10:11:24 +00:00
let obj = require(proof[7]);
2026-07-29 08:29:29 +00:00
callback = obj.useNavigation();
[tmp5, c4] = callback(React.useState(null), 2);
const tmp4 = callback(React.useState(null), 2);
[tmp7, c5] = callback(React.useState(false), 2);
obj = { bottom: true, style: tmp.container, children: null };
obj = { variant: "text-md/normal", children: null };
2026-07-23 10:11:24 +00:00
const intl = require(proof[11]).intl;
2026-07-29 08:29:29 +00:00
obj[1] = intl.string(require(proof[11]).t.cSURbq);
2026-07-23 10:11:24 +00:00
const items = [callback2(require(proof[10]).Text, obj), , , , ];
2026-08-24 06:08:38 +00:00
obj1 = { style: tmp.dns, children: null };
2026-07-29 08:29:29 +00:00
const obj2 = { variant: "text-md/normal", children: null };
2026-07-23 10:11:24 +00:00
const intl2 = require(proof[11]).intl;
2026-07-29 08:29:29 +00:00
obj2[1] = intl2.string(require(proof[11]).t.GL3q7k);
2026-07-23 10:11:24 +00:00
const items1 = [callback2(require(proof[10]).Text, obj2), , , , , ];
2026-07-29 08:29:29 +00:00
const obj3 = { variant: "text-md/normal", selectable: true, style: tmp.code, children: null };
2026-07-23 10:11:24 +00:00
let obj6 = require(proof[13]);
2026-07-29 08:29:29 +00:00
obj3[3] = obj6.getDnsName(domain);
2026-07-23 10:11:24 +00:00
items1[1] = callback2(require(proof[10]).Text, obj3);
2026-07-29 08:29:29 +00:00
const obj4 = { variant: "text-md/normal", children: null };
2026-07-23 10:11:24 +00:00
const intl3 = require(proof[11]).intl;
2026-07-29 08:29:29 +00:00
obj4[1] = intl3.string(require(proof[11]).t.Ccmixu);
2026-07-23 10:11:24 +00:00
items1[2] = callback2(require(proof[10]).Text, obj4);
2026-07-29 08:29:29 +00:00
items1[3] = callback2(require(proof[10]).Text, { variant: "text-md/normal", selectable: true, style: tmp.code, children: "TXT" });
obj6 = { variant: "text-md/normal", children: null };
2026-07-23 10:11:24 +00:00
const intl4 = require(proof[11]).intl;
2026-07-29 08:29:29 +00:00
obj6[1] = intl4.string(require(proof[11]).t.PVLriT);
2026-07-23 10:11:24 +00:00
items1[4] = callback2(require(proof[10]).Text, obj6);
2026-07-29 08:29:29 +00:00
items1[5] = callback2(require(proof[10]).Text, { variant: "text-md/normal", selectable: true, style: tmp.code, children: proof });
obj1[1] = items1;
items[1] = callback3(c5, obj1);
let tmp9Result = null != tmp5;
if (tmp9Result) {
const obj8 = { variant: "text-md/normal", color: "text-feedback-critical", style: null, children: null };
obj8[2] = tmp.error;
obj8[3] = tmp5;
tmp9Result = tmp9(tmp2(tmp3[10]).Text, obj8);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[2] = tmp9Result;
const obj9 = { style: tmp.button, children: null };
const obj10 = { loading: tmp7, text: null, onPress: null };
const intl5 = tmp2(tmp3[11]).intl;
obj10[1] = intl5.string(require(proof[11]).t["13ofGu"]);
obj10[2] = function onPress() {
_undefined2(true);
_undefined(null);
2026-08-24 06:08:38 +00:00
const HTTP = closure_1_0(proof[8]).HTTP;
const obj = { url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, domain), body: {}, rejectWithError: false };
const postResult = HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, domain), body: {}, rejectWithError: false });
const nextPromise = HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, domain), body: {}, rejectWithError: false }).then(() => {
2026-07-29 08:29:29 +00:00
callback();
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, domain), body: {}, rejectWithError: false }).then(() => {
2026-07-29 08:29:29 +00:00
callback();
2026-07-20 16:05:17 +00:00
}).catch((body) => {
body = body.body;
let message;
2026-07-29 08:29:29 +00:00
if (body != null) {
2026-07-20 16:05:17 +00:00
const errors = body.errors;
2026-07-29 08:29:29 +00:00
if (errors != null) {
2026-08-24 06:08:38 +00:00
domain = errors.domain;
2026-07-29 08:29:29 +00:00
if (domain != null) {
2026-07-20 16:05:17 +00:00
const _errors = domain._errors;
2026-07-29 08:29:29 +00:00
if (_errors != null) {
2026-07-20 16:05:17 +00:00
const first = _errors[0];
2026-07-29 08:29:29 +00:00
if (first != null) {
2026-07-20 16:05:17 +00:00
message = first.message;
}
}
}
}
}
if (!message) {
const body2 = body.body;
let message1;
2026-07-29 08:29:29 +00:00
if (body2 != null) {
2026-07-20 16:05:17 +00:00
message1 = body2.message;
}
message = message1;
}
if (!message) {
message = body.message;
}
2026-08-24 06:08:38 +00:00
closure_4(message);
2026-07-20 16:05:17 +00:00
}).finally(() => {
2026-07-29 08:29:29 +00:00
callback2(false);
2026-07-20 16:05:17 +00:00
});
};
2026-07-29 08:29:29 +00:00
obj9[1] = callback2(require(proof[14]).Button, obj10);
items[3] = callback2(c5, obj9);
const obj11 = { style: tmp.button, children: null };
const obj12 = { variant: "secondary", text: null, onPress: null };
const intl6 = tmp2(tmp3[11]).intl;
obj12[1] = intl6.string(require(proof[11]).t.CkfdNx);
obj12[2] = function onPress() {
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj11[1] = callback2(require(proof[14]).Button, obj12);
items[4] = callback2(c5, obj11);
obj[2] = items;
2026-07-23 10:11:24 +00:00
return callback3(require(proof[9]).SafeAreaPaddingView, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
function HTTPProofScreen(children) {
({ onClose: require, domain } = children);
2026-08-24 06:08:38 +00:00
dependencyMap = undefined;
2026-07-29 08:29:29 +00:00
let callback;
let React;
2026-08-24 06:08:38 +00:00
const tmp = callback4();
let obj = useNavigation;
2026-07-29 08:29:29 +00:00
dependencyMap = obj.useNavigation();
[tmp5, c3] = callback(React.useState(null), 2);
const tmp4 = callback(React.useState(null), 2);
[tmp7, c4] = callback(React.useState(false), 2);
obj = { bottom: true, style: tmp.container, children: null };
obj = { variant: "text-md/normal", children: null };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj[1] = intl.string(getSystemLocale.t.p4ql7y);
const items = [callback2(Text.Text, obj), , , , ];
obj1 = { style: tmp.dns, children: null };
2026-07-29 08:29:29 +00:00
const obj2 = { variant: "text-md/normal", children: null };
2026-08-24 06:08:38 +00:00
const intl2 = getSystemLocale.intl;
obj2[1] = intl2.string(getSystemLocale.t.GL3q7k);
const items1 = [callback2(Text.Text, obj2), , , ];
2026-07-29 08:29:29 +00:00
const obj3 = { variant: "text-md/normal", selectable: true, style: tmp.code, children: null };
2026-08-24 06:08:38 +00:00
let obj6 = EXAMPLE_DOMAIN;
2026-07-29 08:29:29 +00:00
obj3[3] = obj6.getHttpName(domain);
2026-08-24 06:08:38 +00:00
items1[1] = callback2(Text.Text, obj3);
2026-07-29 08:29:29 +00:00
const obj4 = { variant: "text-md/normal", children: null };
2026-08-24 06:08:38 +00:00
const intl3 = getSystemLocale.intl;
obj4[1] = intl3.string(getSystemLocale.t.PVLriT);
items1[2] = callback2(Text.Text, obj4);
items1[3] = callback2(Text.Text, { variant: "text-md/normal", selectable: true, style: tmp.code, children: children.proof });
2026-07-29 08:29:29 +00:00
obj1[1] = items1;
2026-07-20 16:05:17 +00:00
items[1] = callback3(View, obj1);
2026-07-29 08:29:29 +00:00
let tmp9Result = null != tmp5;
if (tmp9Result) {
obj6 = { variant: "text-md/normal", color: "text-feedback-critical", style: null, children: null };
obj6[2] = tmp.error;
obj6[3] = tmp5;
2026-08-24 06:08:38 +00:00
tmp9Result = tmp9(tmp2(4739).Text, obj6);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items[2] = tmp9Result;
const obj7 = { style: tmp.button, children: null };
const obj8 = { loading: tmp7, text: null, onPress: null };
const intl4 = tmp2(1236).intl;
2026-08-24 06:08:38 +00:00
obj8[1] = intl4.string(getSystemLocale.t["13ofGu"]);
2026-07-29 08:29:29 +00:00
obj8[2] = function onPress() {
_undefined2(true);
_undefined(null);
2026-08-24 06:08:38 +00:00
const HTTP = closure_1_0(arr[8]).HTTP;
const obj = { url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, domain), body: {}, rejectWithError: false };
const postResult = HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, domain), body: {}, rejectWithError: false });
const nextPromise = HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, domain), body: {}, rejectWithError: false }).then(() => {
2026-07-29 08:29:29 +00:00
callback();
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
HTTP.post({ url: closure_1_6.CONNECTION(closure_1_7.DOMAIN, domain), body: {}, rejectWithError: false }).then(() => {
2026-07-29 08:29:29 +00:00
callback();
2026-07-20 16:05:17 +00:00
}).catch((body) => {
body = body.body;
let message;
2026-07-29 08:29:29 +00:00
if (body != null) {
2026-07-20 16:05:17 +00:00
const errors = body.errors;
2026-07-29 08:29:29 +00:00
if (errors != null) {
2026-08-24 06:08:38 +00:00
domain = errors.domain;
2026-07-29 08:29:29 +00:00
if (domain != null) {
2026-07-20 16:05:17 +00:00
const _errors = domain._errors;
2026-07-29 08:29:29 +00:00
if (_errors != null) {
2026-07-20 16:05:17 +00:00
const first = _errors[0];
2026-07-29 08:29:29 +00:00
if (first != null) {
2026-07-20 16:05:17 +00:00
message = first.message;
}
}
}
}
}
if (!message) {
const body2 = body.body;
let message1;
2026-07-29 08:29:29 +00:00
if (body2 != null) {
2026-07-20 16:05:17 +00:00
message1 = body2.message;
}
message = message1;
}
if (!message) {
message = body.message;
}
2026-08-24 06:08:38 +00:00
closure_3(message);
2026-07-20 16:05:17 +00:00
}).finally(() => {
2026-07-29 08:29:29 +00:00
callback2(false);
2026-07-20 16:05:17 +00:00
});
};
2026-08-24 06:08:38 +00:00
obj7[1] = callback2(Button.Button, obj8);
2026-07-20 16:05:17 +00:00
items[3] = callback2(View, obj7);
2026-07-29 08:29:29 +00:00
const obj9 = { style: tmp.button, children: null };
const obj10 = { variant: "secondary", text: null, onPress: null };
const intl5 = tmp2(1236).intl;
2026-08-24 06:08:38 +00:00
obj10[1] = intl5.string(getSystemLocale.t.RhJMVQ);
2026-07-29 08:29:29 +00:00
obj10[2] = function onPress() {
2026-07-20 16:05:17 +00:00
};
2026-08-24 06:08:38 +00:00
obj9[1] = callback2(Button.Button, obj10);
2026-07-20 16:05:17 +00:00
items[4] = callback2(View, obj9);
2026-07-29 08:29:29 +00:00
obj[2] = items;
2026-08-24 06:08:38 +00:00
return callback3(SafeAreaPaddingView.SafeAreaPaddingView, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
({ Endpoints: closure_6, PlatformTypes: error } = ME);
2026-08-24 06:08:38 +00:00
({ jsx: closure_8, jsxs: c9 } = jsxProd);
2026-07-29 08:29:29 +00:00
createCacheKey = { container: { padding: 16 }, description: { textAlign: "center" }, input: { paddingHorizontal: 0, paddingVertical: 0, marginVertical: 16 }, dns: null, error: null, code: null, button: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWEST, borderRadius: ThemesDefault.radii.xs, padding: 8, marginTop: 16 };
2026-07-29 08:29:29 +00:00
createCacheKey[3] = createCacheKey;
createCacheKey[4] = { marginTop: 16 };
createCacheKey[5] = { fontFamily: "monospace", marginBottom: 4 };
createCacheKey[6] = { marginTop: 16 };
2026-08-24 06:08:38 +00:00
let closure_10 = createCacheKey.createStyles(createCacheKey);
2026-07-20 16:05:17 +00:00
let closure_11 = { DOMAIN: "DOMAIN", PROOF_DNS: "PROOF_DNS", PROOF_HTTP: "PROOF_HTTP" };
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/connections/native/DomainVerifyModal.tsx");
2026-07-20 16:05:17 +00:00
export default function DomainVerifyModal(arg0) {
if (arg0 == null) {
2026-07-29 08:29:29 +00:00
HermesBuiltin.throwTypeError();
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
function onClose(arg0) {
2026-07-29 08:29:29 +00:00
return callback(table[15]).pop();
2026-07-20 16:05:17 +00:00
}
let obj = {};
2026-07-29 08:29:29 +00:00
obj = { headerTitle: null, headerLeft: null, render: null };
const intl = onClose(1236).intl;
obj[0] = intl.string(onClose(1236).t["7lo8+e"]);
2026-08-24 06:08:38 +00:00
let obj2 = onClose(6345);
2026-07-29 08:29:29 +00:00
obj[1] = obj2.getHeaderBackButton(onClose);
obj[2] = function render() {
2026-08-24 06:08:38 +00:00
return closure_1_8(closure_1_12, { onClose });
2026-07-20 16:05:17 +00:00
};
obj[constants.DOMAIN] = obj;
2026-07-29 08:29:29 +00:00
obj = { headerTitle: null, headerLeft: null, render: null };
const intl2 = onClose(1236).intl;
obj[0] = intl2.string(onClose(1236).t["7lo8+e"]);
2026-08-24 06:08:38 +00:00
obj[1] = onClose(6345).getHeaderBackButton(onClose);
2026-07-29 08:29:29 +00:00
obj[2] = function render(domain) {
2026-08-24 06:08:38 +00:00
return closure_1_8(closure_1_13, { domain: domain.domain, proof: domain.proof, onClose });
2026-07-20 16:05:17 +00:00
};
obj[constants.PROOF_DNS] = obj;
2026-08-24 06:08:38 +00:00
obj1 = { headerTitle: null, headerLeft: null, render: null };
2026-07-29 08:29:29 +00:00
const intl3 = onClose(1236).intl;
obj1[0] = intl3.string(onClose(1236).t["7lo8+e"]);
2026-08-24 06:08:38 +00:00
const obj5 = onClose(6345);
obj1[1] = onClose(6345).getHeaderBackButton(onClose);
2026-07-29 08:29:29 +00:00
obj1[2] = function render(domain) {
2026-08-24 06:08:38 +00:00
return closure_1_8(closure_1_14, { domain: domain.domain, proof: domain.proof, onClose });
2026-07-20 16:05:17 +00:00
};
obj[constants.PROOF_HTTP] = obj1;
2026-07-29 08:29:29 +00:00
obj2 = { screens: null, initialRouteName: null, headerBackTitle: null };
obj2[0] = obj;
obj2[1] = constants.DOMAIN;
const intl4 = onClose(1236).intl;
obj2[2] = intl4.string(onClose(1236).t["13/7kX"]);
2026-08-24 06:08:38 +00:00
return callback2(onClose(6343).Navigator, obj2);
2026-07-20 16:05:17 +00:00
}
};