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

392 lines
15 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 8994
// Function ID: 8995
2026-07-20 16:05:17 +00:00
// Name: DomainScreen
2026-07-29 08:29:29 +00:00
// Dependencies: [32, 19, 17, 676, 21, 4189, 712, 1480, 530, 5177, 4185, 1236, 8995, 9000, 4600, 4395, 5143, 5570, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-29 08:29:29 +00:00
// Module 8994 (DomainScreen)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import noop from "noop";
import { View } from "NavigationStack";
2026-07-23 10:11:24 +00:00
import ME from "ME";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c9;
2026-07-23 10:11:24 +00:00
let closure_6;
2026-07-29 08:29:29 +00:00
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const 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-07-20 16:05:17 +00:00
let importDefault;
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-07-23 10:11:24 +00:00
let obj = { url: outer1_6.CONNECTION(outer1_7.DOMAIN, first), body: {}, rejectWithError: false };
const postResult = HTTP.post({ url: outer1_6.CONNECTION(outer1_7.DOMAIN, first), body: {}, rejectWithError: false });
const nextPromise = HTTP.post({ url: outer1_6.CONNECTION(outer1_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-07-23 10:11:24 +00:00
HTTP.post({ url: outer1_6.CONNECTION(outer1_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;
arr = arr.push(outer1_11.PROOF_DNS, obj);
} 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) {
const first = _errors[0];
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;
}
_slicedToArray(message);
const tmp2 = _slicedToArray;
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
const tmp = createCacheKey();
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-07-29 08:29:29 +00:00
const 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-29 08:29:29 +00:00
let c4;
let c5;
2026-07-20 16:05:17 +00:00
let domain;
2026-07-23 10:11:24 +00:00
let require;
2026-07-29 08:29:29 +00:00
let tmp5;
let tmp7;
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;
const tmp = createCacheKey();
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-07-29 08:29:29 +00:00
const obj1 = { style: tmp.dns, children: null };
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-07-23 10:11:24 +00:00
const HTTP = outer1_0(proof[8]).HTTP;
const obj = { url: outer1_6.CONNECTION(outer1_7.DOMAIN, domain), body: {}, rejectWithError: false };
const postResult = HTTP.post({ url: outer1_6.CONNECTION(outer1_7.DOMAIN, domain), body: {}, rejectWithError: false });
const nextPromise = HTTP.post({ url: outer1_6.CONNECTION(outer1_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-07-23 10:11:24 +00:00
HTTP.post({ url: outer1_6.CONNECTION(outer1_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-07-20 16:05:17 +00:00
const 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-07-29 08:29:29 +00:00
noop(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) {
let c3;
let c4;
2026-07-20 16:05:17 +00:00
let domain;
2026-07-23 10:11:24 +00:00
let require;
2026-07-29 08:29:29 +00:00
let tmp5;
let tmp7;
({ onClose: require, domain } = children);
let dependencyMap;
let callback;
let React;
const tmp = createCacheKey();
let obj = require(1480) /* useNavigation */;
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 };
const intl = require(1236) /* getSystemLocale */.intl;
obj[1] = intl.string(require(1236) /* getSystemLocale */.t.p4ql7y);
const items = [callback2(require(4185) /* Text */.Text, obj), , , , ];
const obj1 = { style: tmp.dns, children: null };
const obj2 = { variant: "text-md/normal", children: null };
const intl2 = require(1236) /* getSystemLocale */.intl;
obj2[1] = intl2.string(require(1236) /* getSystemLocale */.t.GL3q7k);
const items1 = [callback2(require(4185) /* Text */.Text, obj2), , , ];
const obj3 = { variant: "text-md/normal", selectable: true, style: tmp.code, children: null };
let obj6 = require(9000) /* EXAMPLE_DOMAIN */;
obj3[3] = obj6.getHttpName(domain);
items1[1] = callback2(require(4185) /* Text */.Text, obj3);
const obj4 = { variant: "text-md/normal", children: null };
const intl3 = require(1236) /* getSystemLocale */.intl;
obj4[1] = intl3.string(require(1236) /* getSystemLocale */.t.PVLriT);
items1[2] = callback2(require(4185) /* Text */.Text, obj4);
items1[3] = callback2(require(4185) /* Text */.Text, { variant: "text-md/normal", selectable: true, style: tmp.code, children: children.proof });
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;
tmp9Result = tmp9(tmp2(4185).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;
obj8[1] = intl4.string(require(1236) /* getSystemLocale */.t["13ofGu"]);
obj8[2] = function onPress() {
_undefined2(true);
_undefined(null);
2026-07-23 10:11:24 +00:00
const HTTP = outer1_0(arr[8]).HTTP;
const obj = { url: outer1_6.CONNECTION(outer1_7.DOMAIN, domain), body: {}, rejectWithError: false };
const postResult = HTTP.post({ url: outer1_6.CONNECTION(outer1_7.DOMAIN, domain), body: {}, rejectWithError: false });
const nextPromise = HTTP.post({ url: outer1_6.CONNECTION(outer1_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-07-23 10:11:24 +00:00
HTTP.post({ url: outer1_6.CONNECTION(outer1_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-07-20 16:05:17 +00:00
const 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-07-29 08:29:29 +00:00
_slicedToArray(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
obj7[1] = callback2(require(4600) /* 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;
obj10[1] = intl5.string(require(1236) /* getSystemLocale */.t.RhJMVQ);
obj10[2] = function onPress() {
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj9[1] = callback2(require(4600) /* 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;
return callback3(require(5177) /* 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);
({ jsx: metroImportAll, jsxs: c9 } = jsxProd);
createCacheKey = { container: { padding: 16 }, description: { textAlign: "center" }, input: { paddingHorizontal: 0, paddingVertical: 0, marginVertical: 16 }, dns: null, error: null, code: null, button: null };
createCacheKey = { backgroundColor: require("Themes").colors.BACKGROUND_BASE_LOWEST, borderRadius: require("Themes").radii.xs, padding: 8, marginTop: 16 };
createCacheKey[3] = createCacheKey;
createCacheKey[4] = { marginTop: 16 };
createCacheKey[5] = { fontFamily: "monospace", marginBottom: 4 };
createCacheKey[6] = { marginTop: 16 };
createCacheKey = 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-07-23 10:11:24 +00:00
const result = require("get ActivityIndicator").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"]);
let obj2 = onClose(5143);
obj[1] = obj2.getHeaderBackButton(onClose);
obj[2] = function render() {
2026-07-23 10:11:24 +00:00
return outer1_8(outer1_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"]);
obj[1] = onClose(5143).getHeaderBackButton(onClose);
obj[2] = function render(domain) {
2026-07-23 10:11:24 +00:00
return outer1_8(outer1_13, { domain: domain.domain, proof: domain.proof, onClose });
2026-07-20 16:05:17 +00:00
};
obj[constants.PROOF_DNS] = obj;
2026-07-29 08:29:29 +00:00
const obj1 = { headerTitle: null, headerLeft: null, render: null };
const intl3 = onClose(1236).intl;
obj1[0] = intl3.string(onClose(1236).t["7lo8+e"]);
const obj5 = onClose(5143);
obj1[1] = onClose(5143).getHeaderBackButton(onClose);
obj1[2] = function render(domain) {
2026-07-23 10:11:24 +00:00
return outer1_8(outer1_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"]);
return callback2(onClose(5570).Navigator, obj2);
2026-07-20 16:05:17 +00:00
}
};