Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,470 @@
/* Metro module 12822; source: design/void/InputView/native/InputView.tsx; dependencies: [29, 6, 7, 15, 17, 18, 31, 27, 661, 33, 4501, 697, 6235, 1305, 4573, 1244, 6988, 4002, 11710, 477, 3868, 2] */
function _fun97843(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97843, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:6, offset: 0x0219410a, size: 839 bytes, params: 8, frame: 26
var object2;
const env0_0 = require;
const env0_3 = ['numberOfLines', 'disableConstantNumberOfLines', 'inputTextColor', 'placeholder',
'placeholderTextColor', 'editable', 'large', 'accessibilityHint', 'maxLength', 'inActionSheet',
'trailingButton', 'clearButtonVisibility', 'disabled', 'style', 'inputTextStyle', 'onChangeText', 'onFocus',
'value'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(29) /* metro dependency 29 */;
const env0_5 = importDefault(6) /* metro dependency 6 */;
const env0_6 = importDefault(7) /* metro dependency 7 */;
const env0_7 = importDefault(15) /* metro dependency 15 */;
const env0_8 = importDefault(17) /* metro dependency 17 */;
const env0_9 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(27) /* metro dependency 27 */;
const env0_10 = value2.View;
const env0_11 = value2.Pressable;
const env0_12 = value2.TouchableWithoutFeedback;
value2.Platform;
const Fonts = (require(661) /* metro dependency 661: Constants */).Fonts;
const value3 = require(33) /* metro dependency 33 */;
const env0_14 = value3.jsx;
const env0_15 = value3.jsxs;
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
const createLegacyClassComponentStyles = createStylesModule.createLegacyClassComponentStyles;
object2 = {};
object2.disabled = {opacity: 0.5};
object2.topContainer = {'minHeight': 16, 'alignItems': 'center', 'flexDirection': 'row', 'marginBottom': 5,
'flexWrap': 'wrap'};
object2.inputViewTitle = {marginRight: 5};
let RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.inputViewError = {fontSize: 10, color: RED_400};
const TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED;
object2.inputBorder = {backgroundColor: TEXT_MUTED};
const DARK_PRIMARY_100_LIGHT_PRIMARY_500 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_100_LIGHT_PRIMARY_500;
object2.inputView = {'fontSize': 16, 'paddingBottom': 0, 'paddingTop': 0, 'textAlignVertical': 'top', 'flex': 1,
color: DARK_PRIMARY_100_LIGHT_PRIMARY_500};
object2.inputViewBorder = {'marginTop': 8, 'height': 2};
const TRANSPARENT = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.TRANSPARENT;
object2.inputViewBorderActive = {backgroundColor: TRANSPARENT};
object2.inputContainer = {'flexDirection': 'row', 'alignItems': 'center', 'position': 'relative'};
object2.bottomContainer = {marginTop: 5};
const object3 = {alignSelf: 'flex-end'};
const CODE_BOLD = Fonts.CODE_BOLD;
object3.fontFamily = CODE_BOLD;
const DARK_PRIMARY_400_LIGHT_PRIMARY_300 = (require(6235) /* metro dependency 6235: LegacyTokens */).DARK_PRIMARY_400_LIGHT_PRIMARY_300;
object3.color = DARK_PRIMARY_400_LIGHT_PRIMARY_300;
object2.charactersLength = object3;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object2.closeIcon = {tintColor: INTERACTIVE_TEXT_DEFAULT};
object2.clearButton = {'position': 'absolute', 'right': 6};
RED_400 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
object2.required = {color: RED_400};
const env0_16 = Reflect.apply(createLegacyClassComponentStyles, createStylesModule, [object2]);
const PureComponent = value.PureComponent;
value = _fun97847(PureComponent);
const ThemeContext = (require(3868) /* metro dependency 3868: native */).ThemeContext;
value.contextType = ThemeContext;
value.defaultProps = {'showBorder': true, 'value': '', 'returnKeyType': 'next', 'disabled': false,
'autoFocus': false, 'multiline': false, 'numberOfLines': 1, 'showTopContainer': true,
'showCharactersRemaining': false, 'clearButtonVisibility': 'never', 'inActionSheet': false};
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/void/InputView/native/InputView.tsx');
exports.default = value;
exports.ClearButtonVisibility = {NEVER: 'never', WITH_CONTENT: 'with-content', ALWAYS: 'always'};
}
function _isNativeReflectConstruct_97844() { // fn#97844, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:572, offset: 0x02194451, 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_97844_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun97847(a0) { // fn#97847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:1815, offset: 0x021944b3, size: 235 bytes, params: 2, frame: 17
const closure = InputView;
env0_9(closure, a0);
return env0_6(closure, [{key: 'renderBorder', value: value_97865}, {key: 'renderTopContainer', value: value_97866},
{key: 'renderBottomContainer', value: value_97867}, {key: 'renderTrailingButton', value: value_97868},
{key: 'renderTextView', value: value_97869}, {key: 'render', value: value_97870}],
[{key: 'getDerivedStateFromProps', value: function({value}, a1) {
return value === a1.valueProp ? {valueProp: value} : value !== a1.value ? {value: value,
valueProp: value} : {valueProp: value};
}}]);
}
function InputView(a0) { // fn#97848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:1827, offset: 0x0219459e, size: 377 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_5;
binding(this, InputView);
const items = [];
arraySpread(items, value, 0, items);
value = env1_8(InputView);
binding = env1_7;
if (_isNativeReflectConstruct_97844()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_8(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.state = {active: false, value: value.props.value, valueProp: value.props.value};
value._ref = undefined;
value.handleFocus = handleFocus_97849;
value.handleBlur = handleBlur_97850;
value.handleChangeText = function(a0) {
a0.setState({value: a0}, _fun97852);
};
value.handleClear = handleClear;
value.handleEndEditing = handleEndEditing;
value.handleSubmitEditing = handleSubmitEditing;
value.getText = getText_97856;
value.isFocused = isFocused_97857;
value.focus = focus_97858;
value.blur = blur_97859;
value.setText = setText_97860;
value.setRef = setRef;
value.measure = measure_97862;
value.measureInWindow = measureInWindow_97863;
value.measureLayout = measureLayout_97864;
return value;
}
function value_97865() { // fn#97865, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:3063, offset: 0x0219496d, size: 131 bytes, params: 1, frame: 18
const value2 = env1_16(this.context);
const {showBorder, borderColor} = this.props;
if (showBorder) {
return (
<View
style={[value2.inputViewBorder, {backgroundColor: borderColor ?? value2.inputBorder.backgroundColor},
this.state.active && value2.inputViewBorderActive]}
/>
);
}
return null;
}
function value_97866() { // fn#97866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:3341, offset: 0x021949f0, size: 525 bytes, params: 1, frame: 26
var r6;
const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
var items4;
const value = environment.__proto__;
const binding = env1_16;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const {showTopContainer, error, title, errorStyles, errorProps, required, helpText} = this.props;
const r5 = error != null && error !== '' ? <LegacyText {...errorProps} {...{['style']: [value3.inputViewError,
errorStyles]}}>{'('}{error}{')'}</LegacyText> : value2;
const r11 = title != null && title !== '' ? <Text variant="heading-md/semibold" color={error === null || error === '' ? 'text-default' : 'text-feedback-critical'} style={[value3.inputViewTitle]}>{title}</Text> : value2;
const r9 = helpText != null && helpText !== '' ? <Text variant="text-xs/medium">{helpText}</Text> : value2;
if (showTopContainer) {
var viewBindingProps = {style: value3.topContainer};
items4 = [r11, r9];
r6 = r5 == null && required;
r6 = r6 && <LegacyText style={value3.required}>{'*'}</LegacyText>;
items4[2] = r6;
items4[3] = r5;
return (
<View {...viewBindingProps}>
{items4}
</View>
);
}
if (r5 != null) {
var viewBindingProps = {style: value3.topContainer};
items4 = [r11, r9];
r6 = r5 == null && required;
r6 = r6 && <LegacyText style={value3.required}>{'*'}</LegacyText>;
items4[2] = r6;
items4[3] = r5;
return (
<View {...viewBindingProps}>
{items4}
</View>
);
}
if (r11 != null) {
var viewBindingProps = {style: value3.topContainer};
items4 = [r11, r9];
r6 = r5 == null && required;
r6 = r6 && <LegacyText style={value3.required}>{'*'}</LegacyText>;
items4[2] = r6;
items4[3] = r5;
return (
<View {...viewBindingProps}>
{items4}
</View>
);
}
return value2;
}
function value_97867() { // fn#97867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:4014, offset: 0x02194bfd, size: 244 bytes, params: 1, frame: 23
var r0;
var LegacyText;
var intl;
var formatToPlainString;
var fR1cof;
var getText;
var length;
const value = environment.__proto__;
const value2 = env1_16(this.context);
const {showCharactersRemaining, maxLength} = this.props;
const value3 = null;
if (showCharactersRemaining) {
if (value3 != maxLength) {
var viewBindingProps = {style: value2.bottomContainer};
LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText;
var legacyTextProps = {accessible: true, style: value2.charactersLength};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
formatToPlainString = intl.formatToPlainString;
fR1cof = (require(1244) /* metro dependency 1244: indexNative */).t.fR1cof;
getText = this.getText;
length = Reflect.apply(getText, this, []).length;
legacyTextProps.accessibilityLabel = Reflect.apply(formatToPlainString, intl, [fR1cof,
{remainingCharacters: maxLength - length}]);
getText = this.getText;
length = Reflect.apply(getText, this, []).length;
r0 = <View {...viewBindingProps}><LegacyText {...legacyTextProps}>{maxLength - length}</LegacyText></View>;
} else {
r0 = value3;
}
} else {
r0 = value3;
}
return r0;
}
function value_97868() { // fn#97868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:4416, offset: 0x02194cf1, size: 288 bytes, params: 1, frame: 23
var r1;
var r0;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const value = environment.__proto__;
const value2 = env1_16(this.context);
const {trailingButton, clearButtonVisibility, clearButtonAccessibilityLabel} = this.props;
const value3 = null;
if (value3 != trailingButton) {
r0 = trailingButton;
} else {
if (clearButtonVisibility === env1_17.ALWAYS) {
r1 = <Pressable hitSlop={16} style={value2.clearButton} onPress={this.handleClear} accessible accessibilityRole="button" accessibilityLabel={value3 != clearButtonAccessibilityLabel ? clearButtonAccessibilityLabel : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VkKicb)}>{((CircleXIcon) => <CircleXIcon size="sm" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</Pressable>;
} else if (clearButtonVisibility !== env1_17.WITH_CONTENT) {
r1 = value3;
} else if (this.state.value.length > 0) {
r1 = <Pressable hitSlop={16} style={value2.clearButton} onPress={this.handleClear} accessible accessibilityRole="button" accessibilityLabel={value3 != clearButtonAccessibilityLabel ? clearButtonAccessibilityLabel : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.VkKicb)}>{((CircleXIcon) => <CircleXIcon size="sm" />)((require(6988) /* metro dependency 6988: CircleXIcon */).CircleXIcon)}</Pressable>;
} else {
r1 = value3;
}
r0 = r1;
}
return r0;
}
function value_97869() { // fn#97869, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:4871, offset: 0x02194e11, size: 707 bytes, params: 1, frame: 30
var r5;
var r8;
var moduleValue;
var isThemeDark2;
var unsafe_rawColors;
var intl;
const binding = env1_16;
const context = this.context;
const value2 = undefined;
const value3 = binding(context);
const value4 = this.state.value;
const props = this.props;
const numberOfLines = props.numberOfLines;
const disableConstantNumberOfLines = props.disableConstantNumberOfLines;
const inputTextColor = props.inputTextColor;
const placeholder = props.placeholder;
const placeholderTextColor = props.placeholderTextColor;
const editable = props.editable;
const large = props.large;
const accessibilityHint = props.accessibilityHint;
const maxLength = props.maxLength;
const inActionSheet = props.inActionSheet;
props.trailingButton;
props.clearButtonVisibility;
const disabled = props.disabled;
props.style;
const inputTextStyle = props.inputTextStyle;
props.onChangeText;
props.onFocus;
props.value;
const value5 = env1_4(props, env1_3);
const items3 = [value3.inputView];
const object2 = {};
const value6 = 21;
if (disableConstantNumberOfLines) {
object2.maxHeight = (large ? 30 : value6) * numberOfLines;
} else {
object2.minHeight = (large ? 30 : value6) * numberOfLines;
}
items3[1] = object2;
items3[2] = inputTextColor != null ? {color: inputTextColor} : {};
items3[3] = large ? {fontSize: 25, fontFamily: Fonts.PRIMARY_SEMIBOLD} : {};
items3[4] = inputTextStyle;
if (placeholderTextColor != null) {
r8 = placeholderTextColor;
} else {
moduleValue = require(4002) /* metro dependency 4002: shared */;
isThemeDark2 = moduleValue.isThemeDark(this.context.theme);
unsafe_rawColors = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors;
r8 = isThemeDark2 ? unsafe_rawColors.PRIMARY_500 : unsafe_rawColors.PRIMARY_200;
}
if (maxLength != null) {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r5 = intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['+DFxLc'],
{maxLength: maxLength});
} else {
r5 = value2;
}
const items2 = [r5, accessibilityHint];
const filter = items2.filter;
const Boolean = global.Boolean;
return ((Component) => <Component accessibilityState={{disabled: disabled}} style={items3} ref={this.setRef} onChangeText={this.handleChangeText} onFocus={this.handleFocus} onBlur={this.handleBlur} onEndEditing={this.handleEndEditing} onSubmitEditing={this.handleSubmitEditing} value={value4} clearButtonMode="never" placeholder={placeholder ?? value2} placeholderTextColor={r8} editable={editable} maxLength={maxLength} accessibilityHint={Reflect.apply(filter,
items2,
[Boolean]).join(',')} {...value5} />)(inActionSheet ? importDefault(11710) /* metro dependency 11710: BottomSheetTextInput */ : (require(1305) /* metro dependency 1305: native */).TextInput);
}
function value_97870() { // fn#97870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:6052, offset: 0x021950d4, size: 358 bytes, params: 1, frame: 25
let value = environment.__proto__;
const value2 = env1_16(this.context);
const {disabled, style, inputContainerStyle} = this.props;
const focus = this.focus;
const items5 = [style];
items5[1] = disabled && value2.disabled;
const r7 = disabled ? 'none' : 'auto';
const items2 = [this.renderTopContainer()];
const items3 = [value2.inputContainer, inputContainerStyle];
const items4 = [this.renderTextView()];
items4[1] = this.renderTrailingButton();
items2[1] = <View style={items3}>{items4}</View>;
items2[2] = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid() && this.renderBorder();
items2[3] = this.renderBottomContainer();
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
items2[4] = !value && this.renderBorder();
return (
<TouchableWithoutFeedback accessible={false} onPress={focus}>
<View style={items5} pointerEvents={r7}>
{items2}
</View>
</TouchableWithoutFeedback>
);
}
function InputViewHandleFocus() { // fn#97849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2132, owner: InputView.handleFocus, offset: 0x02194717, size: 58 bytes, params: 1, frame: 12
const onFocus = env0_0.props.onFocus;
if (onFocus != null) {
onFocus();
}
env0_0.setState({active: true});
}
function InputViewHandleChangeText(a0) { // fn#97851, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2259, owner: InputView.handleChangeText, offset: 0x02194770, size: 45 bytes, params: 2, frame: 14
a0.setState({value: a0}, _fun97852);
}
function handleClear() { // fn#97853, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2349, owner: InputView.handleClear, offset: 0x021947c7, size: 26 bytes, params: 1, frame: 11
env0_0.handleChangeText('');
}
function handleEndEditing() { // fn#97854, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2397, owner: InputView.handleEndEditing, offset: 0x021947e1, size: 49 bytes, params: 1, frame: 11
const onEnd = env0_0.props.onEnd;
if (onEnd != null) {
onEnd(env0_0.state.value);
}
}
function handleSubmitEditing() { // fn#97855, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2471, owner: InputView.handleSubmitEditing, offset: 0x02194812, size: 34 bytes, params: 1, frame: 9
const onNext = env0_0.props.onNext;
if (onNext != null) {
onNext();
}
}
function InputViewGetText() { // fn#97856, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2521, owner: InputView.getText, offset: 0x02194834, size: 19 bytes, params: 1, frame: 1
return env0_0.state.value;
}
function InputViewIsFocused() { // fn#97857, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2551, owner: InputView.isFocused, offset: 0x02194847, size: 46 bytes, params: 1, frame: 11
const isFocused = env0_0._ref?.isFocused();
return isFocused != null && isFocused;
}
function InputViewFocus() { // fn#97858, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2631, owner: InputView.focus, offset: 0x02194875, size: 33 bytes, params: 1, frame: 9
const _ref = env0_0._ref;
if (_ref != null) {
_ref.focus();
}
}
function InputViewBlur() { // fn#97859, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2678, owner: InputView.blur, offset: 0x02194896, size: 33 bytes, params: 1, frame: 9
const _ref = env0_0._ref;
if (_ref != null) {
_ref.blur();
}
}
function InputViewSetText(a0) { // fn#97860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2727, owner: InputView.setText, offset: 0x021948b7, size: 43 bytes, params: 2, frame: 12
const _ref = env0_0._ref;
if (_ref != null) {
_ref.setNativeProps({text: a0});
}
}
function InputViewSetRef(a0) { // fn#97861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2792, owner: InputView.setRef, offset: 0x021948e2, size: 20 bytes, params: 2, frame: 2
env0_0._ref = a0;
}
function InputViewMeasure(a0) { // fn#97862, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2816, owner: InputView.measure, offset: 0x021948f6, size: 37 bytes, params: 2, frame: 11
const _ref = env0_0._ref;
if (_ref != null) {
_ref.measure(a0);
}
}
function InputViewMeasureInWindow(a0) { // fn#97863, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2876, owner: InputView.measureInWindow, offset: 0x0219491b, size: 37 bytes, params: 2, frame: 11
const _ref = env0_0._ref;
if (_ref != null) {
_ref.measureInWindow(a0);
}
}
function InputViewMeasureLayout(a0, a1, a2) { // fn#97864, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2942, owner: InputView.measureLayout, offset: 0x02194940, size: 45 bytes, params: 4, frame: 15
const _ref = env0_0._ref;
if (_ref != null) {
_ref.measureLayout(a0, a1, a2);
}
}
function _fun97852() { // fn#97852, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13012:2285, offset: 0x0219479d, size: 42 bytes, params: 1, frame: 11
const onChangeText = env1_0.props.onChangeText;
if (onChangeText != null) {
onChangeText(env0_0);
}
}