156 lines
8.3 KiB
TypeScript
156 lines
8.3 KiB
TypeScript
/* Metro module 15627; source: i18n/native/updateRules.tsx; dependencies: [31, 661, 33, 3875, 3860, 697, 3853, 3855, 1305, 2] */
|
|
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import Module03855 from '../../by-id/module-03855.js'; /* Metro dependency 3855 */
|
|
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 UseTokenModule from '../../design/tokens/native/useToken.tsx'; /* Metro dependency 3860 */
|
|
import * as AccessibilityPreferencesContextModule from '../../external/discord_common/js/packages/design/components/AccessibilityPreferencesContext/AccessibilityPreferencesContext.tsx'; /* Metro dependency 3875 */
|
|
|
|
function _fun119684(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:6, offset: 0x02515927, size: 235 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const I18nLink2 = I18nLink;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const Fonts = (ConstantsModule).Fonts;
|
|
object = {};
|
|
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
|
object.strong = {fontFamily: PRIMARY_SEMIBOLD};
|
|
object.italic = {fontStyle: 'italic'};
|
|
object.underline = {textDecorationLine: 'underline'};
|
|
(FileImportTrackerModule).fileFinishedImporting('i18n/native/updateRules.tsx');
|
|
exports.default = updateRules_119688;
|
|
exports.I18nLink = I18nLink2;
|
|
function I18nLink({node, output, state}) { // fn#119685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:250, offset: 0x02515a12, size: 334 bytes, params: 2, frame: 22
|
|
var property;
|
|
const object = {};
|
|
const useContext = ReactModule.useContext;
|
|
const AccessibilityPreferencesContext = (AccessibilityPreferencesContextModule).AccessibilityPreferencesContext;
|
|
const alwaysShowLinkDecorations = Reflect.apply(useContext, ReactModule,
|
|
[AccessibilityPreferencesContext]).alwaysShowLinkDecorations;
|
|
const useToken = UseTokenModule.useToken;
|
|
const TEXT_LINK = (Native).colors.TEXT_LINK;
|
|
const value3 = ReactModule.useMemo(_fun119686, [Reflect.apply(useToken, UseTokenModule, [TEXT_LINK]),
|
|
alwaysShowLinkDecorations]);
|
|
if (node.context != null) {
|
|
property = node.context[node.target];
|
|
if (property) {
|
|
if (property.onClick) {
|
|
object.onClick = property.onClick;
|
|
} else {
|
|
object.onClick = property;
|
|
}
|
|
} else {
|
|
object.onClick = property;
|
|
}
|
|
}
|
|
if (object.onClick == null) {
|
|
object.onClick = onClick_119687;
|
|
}
|
|
const LegacyText = (NativeModule).LegacyText;
|
|
return (
|
|
<LegacyText
|
|
accessible
|
|
accessibilityRole="link"
|
|
onPress={object.onClick}
|
|
style={value3}
|
|
>
|
|
{output(node.content, state)}
|
|
</LegacyText>
|
|
);
|
|
function _fun119686() { // fn#119686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:444, offset: 0x02515b60, size: 35 bytes, params: 1, frame: 3
|
|
return {color: env0_2, textDecorationLine: alwaysShowLinkDecorations ? 'underline' : 'none'};
|
|
}
|
|
|
|
function I18nLinkOnClick() { // fn#119687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:634, owner: I18nLink.onClick, offset: 0x02515b83, size: 74 bytes, params: 1, frame: 14
|
|
let value = environment.__proto__;
|
|
value = importDefault(3853) /* metro dependency 3853: Linking */;
|
|
const openURL = value.openURL;
|
|
const defaultImport = Module03855;
|
|
return Reflect.apply(openURL, value, [defaultImport.sanitizeUrl(node.target)]);
|
|
}
|
|
|
|
}
|
|
|
|
function updateRules_119688(a0) { // fn#119688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:870, offset: 0x02515bcd, size: 176 bytes, params: 2, frame: 14
|
|
let object = {};
|
|
copyDataProperties(object, a0.paragraph, undefined);
|
|
let closure = updateRules_119688React;
|
|
object['react'] = closure;
|
|
a0.paragraph = object;
|
|
object = {};
|
|
copyDataProperties(object, a0.strong, closure);
|
|
closure = updateRules_119688React_119690;
|
|
object['react'] = closure;
|
|
a0.strong = object;
|
|
object = {};
|
|
copyDataProperties(object, a0.em, closure);
|
|
closure = updateRules_119688React_119691;
|
|
object['react'] = closure;
|
|
a0.em = object;
|
|
object = {};
|
|
copyDataProperties(object, a0.u, closure);
|
|
closure = updateRules_119688React_119692;
|
|
object['react'] = closure;
|
|
a0.u = object;
|
|
object = {};
|
|
copyDataProperties(object, a0.link, closure);
|
|
object['react'] = updateRules_119688React_119693;
|
|
a0.link = object;
|
|
return a0;
|
|
function updateRules_119688React(a0, a1, a2) { // fn#119689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:935, owner: updateRules_119688.react, offset: 0x02515c7d, size: 75 bytes, params: 4, frame: 17
|
|
const LegacyText = (NativeModule).LegacyText;
|
|
return (
|
|
<LegacyText key={a2.key}>
|
|
{a1(a0.content, a2)}
|
|
</LegacyText>
|
|
);
|
|
}
|
|
|
|
function updateRules_119688React_119690(a0, a1, a2) { // fn#119690, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:1042, owner: updateRules_119688.react, offset: 0x02515cc8, size: 89 bytes, params: 4, frame: 17
|
|
const LegacyText = (NativeModule).LegacyText;
|
|
return (
|
|
<LegacyText style={env1_5.strong} key={a2.key}>
|
|
{a1(a0.content, a2)}
|
|
</LegacyText>
|
|
);
|
|
}
|
|
|
|
function updateRules_119688React_119691(a0, a1, a2) { // fn#119691, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:1156, owner: updateRules_119688.react, offset: 0x02515d21, size: 89 bytes, params: 4, frame: 17
|
|
const LegacyText = (NativeModule).LegacyText;
|
|
return (
|
|
<LegacyText style={env1_5.italic} key={a2.key}>
|
|
{a1(a0.content, a2)}
|
|
</LegacyText>
|
|
);
|
|
}
|
|
|
|
function updateRules_119688React_119692(a0, a1, a2) { // fn#119692, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:1268, owner: updateRules_119688.react, offset: 0x02515d7a, size: 89 bytes, params: 4, frame: 17
|
|
const LegacyText = (NativeModule).LegacyText;
|
|
return (
|
|
<LegacyText style={env1_5.underline} key={a2.key}>
|
|
{a1(a0.content, a2)}
|
|
</LegacyText>
|
|
);
|
|
}
|
|
|
|
function updateRules_119688React_119693(a0, a1, a2) { // fn#119693, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15835:1389, owner: updateRules_119688.react, offset: 0x02515dd3, size: 52 bytes, params: 4, frame: 15
|
|
return (
|
|
<I18nLink
|
|
node={a0}
|
|
output={a1}
|
|
state={a2}
|
|
key={a2.key}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun119684, 15627, [31, 661, 33, 3875, 3860, 697, 3853, 3855, 1305,
|
|
2]) /* metro module 15627, dependencies: [31, 661, 33, 3875, 3860, 697, 3853, 3855, 1305, 2] */;
|