372 lines
19 KiB
TypeScript
372 lines
19 KiB
TypeScript
/* Metro module 9387; source: modules/connections/native/FederatedSocialModal.tsx; dependencies: [5, 57, 31, 661, 33, 4501, 4915, 1244, 5042, 3853, 9388, 6618, 4573, 8967, 1305, 4578, 5282, 5280, 2] */
|
|
import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Platforms from '../../../lib/Platforms.tsx'; /* Metro dependency 4915 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
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 FederatedSocialUtilsModule from '../FederatedSocialUtils.tsx'; /* Metro dependency 9388 */
|
|
|
|
function _fun73226(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#73226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:6, offset: 0x01d63694, size: 279 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_9 = (CreateStylesModule).createStyles({container: {padding: 16},
|
|
description: {textAlign: 'center'}, input: {'paddingHorizontal': 0, 'paddingVertical': 0,
|
|
'marginVertical': 16}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/connections/native/FederatedSocialModal.tsx');
|
|
exports.default = FederatedSocialModal;
|
|
function FederatedSocialModal(a0) { // fn#73227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:423, offset: 0x01d637ab, size: 296 bytes, params: 2, frame: 22
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const env0_0 = a0;
|
|
const value2 = undefined;
|
|
const value3 = (Platforms).get(a0.platformType);
|
|
const r12 = (value3 == null ? value2 : value3.name) ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bU/GZm']);
|
|
const object = {};
|
|
const object2 = {};
|
|
object2.headerTitle = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['ImMhq+'],
|
|
{serviceName: r12});
|
|
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(a0.onClose);
|
|
object2.render = render_73228;
|
|
object.root = object2;
|
|
const Navigator = (NavigatorNativeModule).Navigator;
|
|
return <Navigator initialRouteName="root" screens={object} />;
|
|
function FederatedSocialModalRender() { // fn#73228, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:720, owner: FederatedSocialModal.render, offset: 0x01d638d3, size: 25 bytes, params: 1, frame: 11
|
|
return FederatedSocialModalScreen(env0_0);
|
|
function FederatedSocialModalScreen({location, successRedirect, platformType, onClose}) { // fn#73229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:724, owner: FederatedSocialModal.render.FederatedSocialModalScreen, offset: 0x01d638ec, size: 767 bytes, params: 2, frame: 34
|
|
var environment;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let value = environment.__proto__.__proto__;
|
|
const styles = useStyles();
|
|
const binding = env2_5;
|
|
let useState = binding.useState;
|
|
const value3 = Reflect.apply(useState, binding, ['']);
|
|
const binding2 = env2_4;
|
|
const value4 = binding2(value3, 2);
|
|
const property = value4[0];
|
|
const property2 = value4[1];
|
|
useState = binding.useState;
|
|
const value5 = binding2(Reflect.apply(useState, binding, [null]), 2);
|
|
const property3 = value5[0];
|
|
const env0_5 = value5[1];
|
|
useState = binding.useState;
|
|
const value6 = binding2(Reflect.apply(useState, binding, [false]), 2);
|
|
const property4 = value6[0];
|
|
const env0_6 = value6[1];
|
|
const r24 = (importDefault(4915) /* metro dependency 4915: Platforms */).get(platformType)?.name ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['bU/GZm']);
|
|
const value9 = _fun73230();
|
|
const exampleHandle = (FederatedSocialUtilsModule).getExampleHandle(platformType);
|
|
const value11 = (FederatedSocialUtilsModule).validateHandle(property,
|
|
platformType);
|
|
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
|
|
const Text = (TextModule).Text;
|
|
const items2 = [
|
|
<Text
|
|
variant="text-md/normal"
|
|
color="text-default"
|
|
style={styles.description}
|
|
>
|
|
{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['7TByKh'],
|
|
{serviceName: r24})}
|
|
</Text>,
|
|
];
|
|
value = importDefault(8967) /* metro dependency 8967: FreeFormInputGroup */;
|
|
let string = intl.string;
|
|
const tZ9QFR = (require(1244) /* metro dependency 1244: indexNative */).t.tZ9QFR;
|
|
const ClearButtonVisibility = (NativeModule).ClearButtonVisibility;
|
|
const WITH_CONTENT = ClearButtonVisibility.WITH_CONTENT;
|
|
items2[1] = ((Component) => <Component autoFocus style={styles.input} label={Reflect.apply(string, intl,
|
|
[tZ9QFR])} placeholder={exampleHandle} error={property3} returnKeyType="done" onChangeText={property2} onSubmitEditing={value9} clearButtonVisibility={WITH_CONTENT} autoCapitalize="none" autoComplete="off" autoCorrect={false} />)(value);
|
|
const Button = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
const PDTjLN = (require(1244) /* metro dependency 1244: indexNative */).t.PDTjLN;
|
|
items2[2] = (
|
|
<Button
|
|
loading={property4}
|
|
disabled={!value11}
|
|
text={Reflect.apply(string, intl, [PDTjLN])}
|
|
onPress={value9}
|
|
/>
|
|
);
|
|
return (
|
|
<SafeAreaPaddingView bottom style={styles.container}>
|
|
{items2}
|
|
</SafeAreaPaddingView>
|
|
);
|
|
function _fun73230() { // fn#73230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1049, offset: 0x01d63beb, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env3_3(_fun73232);
|
|
return _fun73233;
|
|
function* _fun73232() { // fn#73232, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1069, offset: 0x01d63c1a, size: 323 bytes, params: 1, frame: 20
|
|
var url;
|
|
var binding;
|
|
var binding2;
|
|
var property;
|
|
var value5;
|
|
var authorize;
|
|
var object;
|
|
var binding3;
|
|
var binding4;
|
|
var binding5;
|
|
var value6;
|
|
var value7;
|
|
var value8;
|
|
var body;
|
|
var value9;
|
|
var value10;
|
|
var binding6;
|
|
var value11;
|
|
var openURLExternally;
|
|
var SAFARI;
|
|
var Error;
|
|
var prototype;
|
|
var error;
|
|
var value13;
|
|
var binding7;
|
|
var binding8;
|
|
var intl;
|
|
var string;
|
|
var t;
|
|
if (false) {
|
|
return undefined;
|
|
}
|
|
value = undefined;
|
|
env2_6(true);
|
|
env2_5(null);
|
|
reducibleJoin4: while (true) {
|
|
reduciblePort50: while (true) {
|
|
exceptionLanding49: while (true) {
|
|
try {
|
|
binding = env5_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
break reducibleJoin4;
|
|
}
|
|
binding = env2_5;
|
|
binding7 = env5_0;
|
|
binding8 = env5_2;
|
|
intl = binding7(binding8[7]).intl;
|
|
string = intl.string;
|
|
t = binding7(binding8[7]).t;
|
|
binding(Reflect.apply(string, intl, [t['7wbPNl']]));
|
|
env2_6(false);
|
|
break reduciblePort50;
|
|
}
|
|
return value;
|
|
}
|
|
try {
|
|
binding2 = env5_2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding2[8];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value5 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
authorize = value5.authorize;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object = {};
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding3 = env2_0;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.location = binding3;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding4 = env2_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.successRedirect = binding4;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding5 = env2_4;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
object.handle = binding5;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value6 = Reflect.apply(authorize, value5, [binding, object]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
yield value6;
|
|
try {
|
|
value7 = undefined;
|
|
value8 = false;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
if (value8) {
|
|
return value7;
|
|
}
|
|
try {
|
|
body = value7.body;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value9 = body == null;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
reducibleJoin27: while (true) {
|
|
if (value9) {
|
|
url = value;
|
|
break reducibleJoin27;
|
|
}
|
|
try {
|
|
url = body.url;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
break reducibleJoin27;
|
|
}
|
|
try {
|
|
value10 = url == null;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
if (!value10) {
|
|
try {
|
|
binding = env5_1;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding6 = env5_2;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
property = binding6[9];
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value11 = binding(property);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
openURLExternally = value11.openURLExternally;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
url = body.url;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env5_6;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
SAFARI = binding.SAFARI;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
Reflect.apply(openURLExternally, value11, [url, SAFARI]);
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding = env2_3;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
binding();
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
return value;
|
|
}
|
|
try {
|
|
Error = global.Error;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
prototype = Error.prototype;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
error = new Error();
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
value13 = error instanceof Object ? error : undefined;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
try {
|
|
throw value13;
|
|
} catch (error) {
|
|
break exceptionLanding49;
|
|
}
|
|
}
|
|
|
|
function _fun73233() { // fn#73233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9573:1343, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun73226, 9387, [5, 57, 31, 661, 33, 4501, 4915, 1244, 5042, 3853, 9388, 6618, 4573, 8967, 1305, 4578,
|
|
5282, 5280,
|
|
2]) /* metro module 9387, dependencies: [5, 57, 31, 661, 33, 4501, 4915, 1244, 5042, 3853, 9388, 6618, 4573, 8967, 1305, 4578, 5282, 5280, 2] */;
|