138 lines
7.9 KiB
TypeScript
138 lines
7.9 KiB
TypeScript
/* Metro module 11976; source: modules/guild/native/GuildInviteIcon.tsx; dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 11977, 1244, 1423, 5475, 1861, 1305, 3868, 2] */
|
|
import ClassCallCheck from '../../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
|
|
import CreateClass from '../../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
|
|
import PossibleConstructorReturn from '../../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
|
|
import Module00017 from '../../../by-id/module-00017.js'; /* Metro dependency 17 */
|
|
import Inherits from '../../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
|
|
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as StringUtilsModule from '../../../utils/StringUtils.tsx'; /* Metro dependency 1861 */
|
|
import * as NativeModule2 from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
|
|
function _fun91939(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91939, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:6, offset: 0x020773d7, size: 558 bytes, params: 8, frame: 25
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
object = {SMALL: 'small', MEDIUM: 'medium', LARGE: 'large'};
|
|
const env0_10 = [16, 16, 14, 14, 12];
|
|
const createLegacyClassComponentStyles = CreateStylesModule.createLegacyClassComponentStyles;
|
|
const object2 = {icon: {'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden'},
|
|
iconSmall: {'width': 40, 'height': 40, 'borderRadius': 20}, iconMedium: {'width': 80, 'height': 80,
|
|
'borderRadius': 40}};
|
|
const object3 = {'width': 128, 'height': 128};
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
object2.iconLarge = object3;
|
|
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
|
object2.textContainer = {backgroundColor: BACKGROUND_BRAND};
|
|
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
|
object2.acronym = {color: WHITE};
|
|
const env0_11 = Reflect.apply(createLegacyClassComponentStyles, CreateStylesModule, [object2]);
|
|
const PureComponent = value.PureComponent;
|
|
value = _fun91943(PureComponent);
|
|
const SMALL = object.SMALL;
|
|
value.defaultProps = {size: SMALL, textScale: 1};
|
|
value.Sizes = object;
|
|
const ThemeContext = (NativeModule2).ThemeContext;
|
|
value.contextType = ThemeContext;
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild/native/GuildInviteIcon.tsx');
|
|
exports.default = value;
|
|
function _isNativeReflectConstruct_91940() { // fn#91940, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:187, offset: 0x02077605, size: 98 bytes, params: 1, frame: 18
|
|
var Boolean;
|
|
var prototype;
|
|
var valueOf;
|
|
var call;
|
|
var Reflect;
|
|
var construct;
|
|
var closure;
|
|
var value;
|
|
var error;
|
|
try {
|
|
Boolean = global.Boolean;
|
|
prototype = Boolean.prototype;
|
|
valueOf = prototype.valueOf;
|
|
call = valueOf.call;
|
|
Reflect = global.Reflect;
|
|
construct = Reflect.construct;
|
|
Boolean = global.Boolean;
|
|
closure = function() {
|
|
};
|
|
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
|
value = Reflect.apply(call, valueOf, [value]);
|
|
var result = !value;
|
|
} catch (error) {
|
|
}
|
|
return (_isNativeReflectConstruct_91940_isNativeReflectConstruct = function() {
|
|
return !!result;
|
|
})();
|
|
}
|
|
|
|
function _fun91943(a0) { // fn#91943, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:873, offset: 0x02077667, size: 72 bytes, params: 2, frame: 15
|
|
const GuildInviteIcon2 = GuildInviteIcon;
|
|
Inherits(GuildInviteIcon2, a0);
|
|
return CreateClass(GuildInviteIcon2, [{key: 'render', value: value_91945}]);
|
|
function GuildInviteIcon() { // fn#91944, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:885, offset: 0x0108afcb, size: 113 bytes, params: 1, frame: 20
|
|
const value = environment.__proto__;
|
|
env1_3(this, GuildInviteIcon);
|
|
const value3 = env1_6(GuildInviteIcon);
|
|
return env1_5(this, _isNativeReflectConstruct_91940() ? global.Reflect.construct(value3, arguments,
|
|
env1_6(this).constructor) : value3.apply(this, arguments));
|
|
}
|
|
|
|
function value_91945() { // fn#91945, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12162:1174, offset: 0x020776af, size: 506 bytes, params: 1, frame: 26
|
|
var defaultImport;
|
|
var getGuildIconSource;
|
|
var value8;
|
|
let value = environment.__proto__;
|
|
const value2 = env1_11(this.context);
|
|
const {style, guild, size, textScale} = this.props;
|
|
const value3 = 10;
|
|
const value4 = require(dependencyMap[value3]).getClass(value2, 'icon', size);
|
|
const intl = (IndexNativeModule).intl;
|
|
const value5 = intl.formatToPlainString((IndexNativeModule).t.xm6W9D,
|
|
{guildName: guild.name});
|
|
let icon = guild.icon;
|
|
if (icon != null) {
|
|
defaultImport = importDefault(1423) /* metro dependency 1423: AvatarUtils */;
|
|
getGuildIconSource = defaultImport.getGuildIconSource;
|
|
icon = guild.icon;
|
|
value8 = Reflect.apply(getGuildIconSource, defaultImport, [{id: guild.id, icon: icon, canAnimate: true,
|
|
size: 128}]);
|
|
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
icon = value2.icon;
|
|
return ((Component) => <Component accessibilityRole="image" accessibilityLabel={value5} style={[icon, value4,
|
|
style]} source={value8} />)(value);
|
|
}
|
|
const acronym = (StringUtilsModule).getAcronym(guild.name);
|
|
const value7 = (env1_10[acronym.length - 1] ?? value3) * textScale;
|
|
const items2 = [value2.textContainer];
|
|
items2[1] = value2.icon;
|
|
items2[2] = value4;
|
|
items2[3] = style;
|
|
const LegacyText = (NativeModule).LegacyText;
|
|
return (
|
|
<View
|
|
accessible
|
|
accessibilityRole="image"
|
|
accessibilityLabel={value5}
|
|
style={items2}
|
|
>
|
|
<LegacyText numberOfLines={1} style={[value2.acronym, {fontSize: value7}]}>
|
|
{acronym}
|
|
</LegacyText>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun91939, 11976, [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 11977, 1244, 1423, 5475, 1861, 1305, 3868,
|
|
2]) /* metro module 11976, dependencies: [6, 7, 15, 17, 18, 31, 27, 33, 4501, 697, 11977, 1244, 1423, 5475, 1861, 1305, 3868, 2] */;
|