This commit is contained in:
janisslsm committed 2026-07-28 01:06:53 +03:00
1 parent af3b49f756
commit 1781d25a15
22448 files changed
+2731829 -2650550

No files matched your search

@@ -1,46 +1,55 @@
/* Metro module 15745; source: modules/interaction_components/native/actions/CheckboxActionComponent.tsx; dependencies: [31, 33, 8357, 44, 1909, 9402, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
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 ServerModule from '../../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as ComponentStateContextModule from '../../ComponentStateContext.tsx'; /* Metro dependency 8357 */
import * as CheckboxNativeModule from '../../../../design/components/Checkbox/native/Checkbox.native.tsx'; /* Metro dependency 9402 */
function _fun120922(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120922, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15953:6, offset: 0x0253a6ef, size: 152 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun120923);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/CheckboxActionComponent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/actions/CheckboxActionComponent.tsx');
exports.default = value;
function _fun120923(a0) { // fn#120923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15953:130, offset: 0x0253a787, size: 360 bytes, params: 2, frame: 22
let type = a0.type;
const property = a0.default;
const value2 = undefined;
const value3 = (ComponentStateContextModule).useComponentStateContext();
(Module00044)(value3 != null,
'CheckboxActionComponent must be rendered inside a ComponentStateContext');
const value4 = value3.useComponentState(a0, property != null ? {type: type, value: property} : value2);
const state = value4.state;
const env0_2 = value4.executeStateUpdate;
const value5 = env0_3.useMemo(function() {
return state?.type === type && state.value;
}, [state, type]);
const parents = value3.getParents(a0);
const r7 = parents == null ? value2 : parents[0];
type = r7 == null ? value2 : r7.type;
const ComponentType = (ServerModule).ComponentType;
const LABEL = ComponentType.LABEL;
const r6 = type !== LABEL ? value2 : r7;
(Module00044)(r6 != null,
'CheckboxActionComponent must be a child of a Label component');
const Checkbox = (CheckboxNativeModule).Checkbox;
return (
<Checkbox
label={r6.label}
description={r6.description}
checked={value5}
onToggle={function(a0) {
executeStateUpdate({type: type, value: a0});
}}
/>
);
}
}
function _fun120923(a0) { // fn#120923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15953:130, offset: 0x0253a787, size: 360 bytes, params: 2, frame: 22
let type = a0.type;
const property = a0.default;
const value2 = undefined;
const value3 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
(importDefault(44) /* metro dependency 44 */)(value3 != null,
'CheckboxActionComponent must be rendered inside a ComponentStateContext');
const value4 = value3.useComponentState(a0, property != null ? {type: type, value: property} : value2);
const state = value4.state;
const env0_2 = value4.executeStateUpdate;
const value5 = env0_3.useMemo(function() {
return state?.type === type && state.value;
}, [state, type]);
const parents = value3.getParents(a0);
const r7 = parents == null ? value2 : parents[0];
type = r7 == null ? value2 : r7.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const LABEL = ComponentType.LABEL;
const r6 = type !== LABEL ? value2 : r7;
(importDefault(44) /* metro dependency 44 */)(r6 != null,
'CheckboxActionComponent must be a child of a Label component');
const Checkbox = (require(9402) /* metro dependency 9402: CheckboxNative */).Checkbox;
return (
<Checkbox
label={r6.label}
description={r6.description}
checked={value5}
onToggle={function(a0) {
executeStateUpdate({type: type, value: a0});
}}
/>
);
}
global.__d(_fun120922, 15745, [31, 33, 8357, 44, 1909, 9402,
2]) /* metro module 15745, dependencies: [31, 33, 8357, 44, 1909, 9402, 2] */;
@@ -1,78 +1,85 @@
/* Metro module 15744; source: modules/interaction_components/native/actions/CheckboxGroupActionComponent.tsx; dependencies: [31, 33, 8357, 6231, 8950, 2] */
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 TableRowGroupNativeModule from '../../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableCheckboxRowNativeModule from '../../../../design/components/TableRow/native/TableCheckboxRow.native.tsx'; /* Metro dependency 8950 */
function _fun120913(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120913, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:6, offset: 0x0253a407, size: 145 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun120914);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/CheckboxGroupActionComponent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/actions/CheckboxGroupActionComponent.tsx');
exports.default = value;
}
function _fun120914(a0) { // fn#120914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:130, offset: 0x0253a498, size: 254 bytes, params: 2, frame: 21
const type = a0.type;
const options = a0.options;
const maxValues = a0.maxValues;
const value2 = maxValues.useMemo(_fun120915, [options]);
const value4 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value2.length > 0 ? {type: type, values: value2} : undefined);
const state = value4.state;
const env0_4 = value4.executeStateUpdate;
const env0_5 = maxValues.useMemo(function() {
return state?.type === type ? state.values : [];
}, [state, type]);
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
<TableRowGroup hasIcons={false}>
{options.map(_fun120919)}
</TableRowGroup>
);
function _fun120915() { // fn#120915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:194, offset: 0x0253a596, size: 45 bytes, params: 1, frame: 12
return options.filter(function(a0) {
return a0.default;
}).map(function(a0) {
return a0.value;
});
}
function _fun120914(a0) { // fn#120914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:130, offset: 0x0253a498, size: 254 bytes, params: 2, frame: 21
const type = a0.type;
const options = a0.options;
const env0_2 = a0.maxValues;
const value2 = env0_2.useMemo(_fun120915, [options]);
const value4 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value2.length > 0 ? {type: type, values: value2} : undefined);
const state = value4.state;
const env0_4 = value4.executeStateUpdate;
const env0_5 = env0_2.useMemo(function() {
return state?.type === type ? state.values : [];
}, [state, type]);
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
return (
<TableRowGroup hasIcons={false}>
{options.map(_fun120919)}
</TableRowGroup>
);
}
function _fun120919(a0) { // fn#120919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:472, offset: 0x0253a5f7, size: 149 bytes, params: 2, frame: 19
const binding = env0_5;
const value3 = binding.includes(a0.value);
const TableCheckboxRow = (TableCheckboxRowNativeModule).TableCheckboxRow;
const label = a0.label;
const description = a0.description;
const env0_0 = a0.value;
return (
<TableCheckboxRow
label={label}
subLabel={description}
checked={value3}
onPress={onPress_120920}
disabled={env0_5.length >= maxValues && !value3}
key={a0.value}
/>
);
function onPress_120920(a0) { // fn#120920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:605, offset: 0x0253a68c, size: 99 bytes, params: 2, frame: 15
var r0;
var items2;
var value4;
const binding = env1_5;
if (a0) {
items2 = [];
value4 = arraySpread(items2, binding, 0, binding);
items2[value4] = value;
value4 + 1;
r0 = items2;
} else {
r0 = binding.filter(function(a0) {
return a0 !== value;
});
}
executeStateUpdate({type: type, values: r0});
}
function _fun120915() { // fn#120915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:194, offset: 0x0253a596, size: 45 bytes, params: 1, frame: 12
return options.filter(function(a0) {
return a0.default;
}).map(function(a0) {
return a0.value;
});
}
}
function _fun120919(a0) { // fn#120919, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:472, offset: 0x0253a5f7, size: 149 bytes, params: 2, frame: 19
const binding = env0_5;
const value3 = binding.includes(a0.value);
const TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
const label = a0.label;
const description = a0.description;
const env0_0 = a0.value;
return (
<TableCheckboxRow
label={label}
subLabel={description}
checked={value3}
onPress={onPress_120920}
disabled={env0_5.length >= maxValues && !value3}
key={a0.value}
/>
);
}
function onPress_120920(a0) { // fn#120920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15952:605, offset: 0x0253a68c, size: 99 bytes, params: 2, frame: 15
var r0;
var items;
var value4;
const binding = env1_5;
if (a0) {
items = [];
value4 = arraySpread(items, binding, 0, binding);
items[value4] = value;
value4 + 1;
r0 = items;
} else {
r0 = binding.filter(function(a0) {
return a0 !== value;
});
}
executeStateUpdate({type: type, values: r0});
}
global.__d(_fun120913, 15744, [31, 33, 8357, 6231, 8950,
2]) /* metro module 15744, dependencies: [31, 33, 8357, 6231, 8950, 2] */;
@@ -1,4 +1,32 @@
/* Metro module 15741; source: modules/interaction_components/native/actions/FileUploadActionComponent.tsx; dependencies: [5, 31, 27, 1379, 4645, 661, 33, 4501, 4136, 6238, 13164, 1244, 4073, 11143, 8341, 5312, 8357, 44, 566, 4697, 4655, 15742, 1909, 4647, 4660, 11543, 4627, 7879, 11096, 1848, 11095, 4658, 4572, 697, 6231, 2] */
import Module00005 from '../../../../by-id/module-00005.js'; /* Metro dependency 5 */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UploadAttachmentActionCreators from '../../../../actions/UploadAttachmentActionCreators.tsx'; /* Metro dependency 7879 */
import AttachmentPreview from '../../../media/native/AttachmentPreview.tsx'; /* Metro dependency 11143 */
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
import * as KeyboardManagerUtilsModule from '../../../../utils/native/KeyboardManagerUtils.tsx'; /* Metro dependency 1848 */
import * as ServerModule from '../../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as CircleCheckIconModule from '../../../../design/components/Icon/native/redesign/generated/CircleCheckIcon.tsx'; /* Metro dependency 4073 */
import * as FileSizeUtilsModule from '../../../../utils/FileSizeUtils.tsx'; /* Metro dependency 4136 */
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as StackNativeModule from '../../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
import * as DraftStoreModule from '../../../../stores/DraftStore.tsx'; /* Metro dependency 4645 */
import * as FileUtilsModule from '../../../../utils/FileUtils.tsx'; /* Metro dependency 4655 */
import * as KestrelExperimentModule from '../../../media_uploads/experiments/KestrelExperiment.tsx'; /* Metro dependency 4697 */
import * as XSmallIconModule from '../../../../design/components/Icon/native/redesign/generated/XSmallIcon.tsx'; /* Metro dependency 5312 */
import * as TableRowNativeModule from '../../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as IconButtonNativeModule from '../../../../design/components/Button/native/IconButton.native.tsx'; /* Metro dependency 8341 */
import * as ComponentStateContextModule from '../../ComponentStateContext.tsx'; /* Metro dependency 8357 */
import * as ShowMediaKeyboardActionSheetModule from '../../../media_keyboard/native/showMediaKeyboardActionSheet.tsx'; /* Metro dependency 11096 */
import * as AttachmentPreviewModule from '../../../media/native/AttachmentPreview.tsx'; /* Metro dependency 11143 */
import * as FileUpIconModule from '../../../../design/components/Icon/native/redesign/generated/FileUpIcon.tsx'; /* Metro dependency 13164 */
import * as UseFileUploadComponentStateModule from '../../useFileUploadComponentState.tsx'; /* Metro dependency 15742 */
function _fun120866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:6, offset: 0x02538a33, size: 350 bytes, params: 8, frame: 19
const env0_0 = require;
const _arrayLikeToArray_120869 = function(a0, a1) {
@@ -46,457 +74,515 @@ function _fun120866(global, require, importDefault, importAll, module, exports,
};
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const env0_5 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_7 = (require(4645) /* metro dependency 4645: DraftStore */).DraftType;
const env0_8 = (require(661) /* metro dependency 661: Constants */).NOOP;
let value = require(33) /* metro dependency 33 */;
let value = JsxRuntimeModule;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({defaultAttachmentIconWrapper: {'width': 32,
const env0_11 = (CreateStylesModule).createStyles({defaultAttachmentIconWrapper: {'width': 32,
'alignItems': 'center'}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/FileUploadActionComponent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/actions/FileUploadActionComponent.tsx');
exports.default = FileUploadActionComponent;
}
function _createForOfIteratorHelperLoose_120867(a0, a1) { // fn#120867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:212, offset: 0x02538b91, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
function _createForOfIteratorHelperLoose_120867(a0, a1) { // fn#120867, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:212, offset: 0x02538b91, size: 372 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
return _fun120868;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_120869(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun120868;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_120869(a0, value);
r6 = value;
r5 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_120869(a0, value);
r6 = value;
} else {
r6 = value;
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_120869(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun120868;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function MainAreaCanUpload({openFilePicker, minValues, maxValues, maxSizeBytes}) { // fn#120870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:1213, offset: 0x02538d05, size: 499 bytes, params: 2, frame: 25
const fileSizeUtilsModule = require(4136) /* metro dependency 4136: FileSizeUtils */;
const formatSize = fileSizeUtilsModule.formatSize;
const BYTE_IN_KB = fileSizeUtilsModule.BYTE_IN_KB;
const value3 = Reflect.apply(formatSize, fileSizeUtilsModule,
[maxSizeBytes / BYTE_IN_KB, {'useKibibytes': true, 'useSpace': true}]);
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {onPress: openFilePicker};
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
const FileUpIcon = (require(13164) /* metro dependency 13164: FileUpIcon */).FileUpIcon;
object2.icon = <Icon IconComponent={FileUpIcon} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object2.label = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['/2JwTv'],
{maxValues: maxValues});
object2.subLabel = minValues > 1 ? minValues === maxValues ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.SAr31z,
{minValues: minValues,
maxSize: value3}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t['ZG+3Ck'],
{minValues: minValues, maxValues: maxValues,
maxSize: value3}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.tyxwW1,
{maxValues: maxValues, maxSize: value3});
object2.start = true;
object2.end = true;
object2.arrow = true;
return <TableRow {...object2} />;
}
function MainAreaLimitReached() { // fn#120871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:1808, offset: 0x02538ef8, size: 224 bytes, params: 1, frame: 19
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {'icon': null, 'label': null, 'subLabel': null, 'disabled': true, 'start': true, 'end': true};
const TableRow2 = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Icon = TableRow2.Icon;
const CircleCheckIcon = (require(4073) /* metro dependency 4073: CircleCheckIcon */).CircleCheckIcon;
object2.icon = <Icon IconComponent={CircleCheckIcon} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object2.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['0PhgpK']]);
string = intl.string;
const HYg2Hn = (require(1244) /* metro dependency 1244: indexNative */).t.HYg2Hn;
object2.subLabel = Reflect.apply(string, intl, [HYg2Hn]);
return <TableRow {...object2} />;
}
function File({upload, handleRemoveFile}) { // fn#120872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:2073, offset: 0x02538fd8, size: 472 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object2 = {};
const AttachmentPreview = importDefault(11143) /* metro dependency 11143: AttachmentPreview */;
const uri = upload.item.uri;
const isImage = upload.isImage;
const isVideo = upload.isVideo;
const AttachmentIcon = (require(11143) /* metro dependency 11143: AttachmentPreview */).AttachmentIcon;
object2.icon = <AttachmentPreview uri={uri} isImage={isImage} isVideo={isVideo} width={32} height={32} defaultPreview={<View style={styles.defaultAttachmentIconWrapper}><AttachmentIcon fileName={upload.filename} /></View>} />;
object2.label = upload.filename ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZMirp0);
const IconButton = (require(8341) /* metro dependency 8341: IconButtonNative */).IconButton;
const object3 = {'variant': 'tertiary', 'size': 'sm'};
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
object3.icon = <XSmallIcon size="sm" />;
object3.onPress = function() {
return handleRemoveFile(upload.id);
};
const string = intl.string;
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
object3.accessibilityLabel = Reflect.apply(string, intl, [N86XcP]);
object2.trailing = <IconButton {...object3} />;
object2.start = true;
object2.end = true;
return <TableRow {...object2} />;
}
function FileUploadActionComponent(a0) { // fn#120874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:2762, offset: 0x025391b0, size: 938 bytes, params: 2, frame: 29
var r8;
var length;
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
var items2;
const minValues = a0.minValues;
const maxValues = a0.maxValues;
const value2 = undefined;
const value3 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
(importDefault(44) /* metro dependency 44 */)(value3 != null,
'FileUploadActionComponent must be used within a ComponentStateContextProvider');
const channelId = value3.channelId;
(importDefault(44) /* metro dependency 44 */)(channelId != null,
'FileUploadActionComponent must be used inside a channel');
const modal = value3.modal;
const customId = modal == null ? value2 : modal.customId;
(importDefault(44) /* metro dependency 44 */)(customId != null,
'FileUploadActionComponent requires modalCustomId from context');
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(importDefault(44) /* metro dependency 44 */)(channel != null, 'FileUploadActionComponent requires a valid channel');
const kestrelConfig = (require(4697) /* metro dependency 4697: KestrelExperiment */).getKestrelConfig({location: 'native.FileUploadActionComponent'});
const kestrelExperimentModule = require(4697) /* metro dependency 4697: KestrelExperiment */;
const getEffectiveKestrelLimit = kestrelExperimentModule.getEffectiveKestrelLimit;
const fileUtilsModule = require(4655) /* metro dependency 4655: FileUtils */;
const value5 = Reflect.apply(getEffectiveKestrelLimit, kestrelExperimentModule, [kestrelConfig,
fileUtilsModule.maxFileSize(channel.guild_id)]);
const env0_4 = value5;
const {uploadIds, setUploadIds,
currentUploads} = (require(15742) /* metro dependency 15742: useFileUploadComponentState */).useFileUploadComponentState(a0);
const parents = value3.getParents(a0);
const r5 = parents == null ? value2 : parents[0];
const type = r5 == null ? value2 : r5.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const LABEL = ComponentType.LABEL;
let r0 = type !== LABEL ? value2 : r5;
(importDefault(44) /* metro dependency 44 */)(r0 != null,
'FileUploadActionComponent must be used within a label Component');
const binding = env0_4;
const value9 = binding.useCallback(_fun120876(), [uploadIds, maxValues, setUploadIds, value5, customId, channelId]);
const value10 = binding.useCallback(_fun120881, [channelId, uploadIds, setUploadIds]);
const value11 = binding.useCallback(_fun120883, [channel, maxValues, value9, uploadIds, currentUploads, value10]);
if (maxValues !== 1) {
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_12};
length = uploadIds.length;
r8 = length >= maxValues ? <MainAreaLimitReached /> : <MainAreaCanUpload openFilePicker={value11} minValues={minValues} maxValues={maxValues} maxSizeBytes={value5} />;
items2 = [r8];
length = currentUploads.length;
r8 = length > 0 && ((TableRowGroup) => <TableRowGroup hasIcons>{currentUploads.map(_fun120892)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup);
items2[1] = r8;
r0 = <Stack {...stackProps}>{items2}</Stack>;
} else {
length = currentUploads.length;
if (length === 1) {
r0 = <File upload={currentUploads[0]} handleRemoveFile={value10} />;
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun120868;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun120868() { // fn#120868, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:783, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function MainAreaCanUpload({openFilePicker, minValues, maxValues, maxSizeBytes}) { // fn#120870, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:1213, offset: 0x02538d05, size: 499 bytes, params: 2, frame: 25
const formatSize = FileSizeUtilsModule.formatSize;
const BYTE_IN_KB = FileSizeUtilsModule.BYTE_IN_KB;
const value3 = Reflect.apply(formatSize, FileSizeUtilsModule,
[maxSizeBytes / BYTE_IN_KB, {'useKibibytes': true, 'useSpace': true}]);
const TableRow = (TableRowNativeModule).TableRow;
const object = {onPress: openFilePicker};
const TableRow2 = (TableRowNativeModule).TableRow;
const Icon = TableRow2.Icon;
const FileUpIcon = (FileUpIconModule).FileUpIcon;
object.icon = <Icon IconComponent={FileUpIcon} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
object.label = intl.format((require(1244) /* metro dependency 1244: indexNative */).t['/2JwTv'],
{maxValues: maxValues});
object.subLabel = minValues > 1 ? minValues === maxValues ? intl.format((require(1244) /* metro dependency 1244: indexNative */).t.SAr31z,
{minValues: minValues,
maxSize: value3}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t['ZG+3Ck'],
{minValues: minValues, maxValues: maxValues,
maxSize: value3}) : intl.format((require(1244) /* metro dependency 1244: indexNative */).t.tyxwW1,
{maxValues: maxValues, maxSize: value3});
object.start = true;
object.end = true;
object.arrow = true;
return <TableRow {...object} />;
}
function MainAreaLimitReached() { // fn#120871, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:1808, offset: 0x02538ef8, size: 224 bytes, params: 1, frame: 19
const TableRow = (TableRowNativeModule).TableRow;
const object = {'icon': null, 'label': null, 'subLabel': null, 'disabled': true, 'start': true, 'end': true};
const TableRow2 = (TableRowNativeModule).TableRow;
const Icon = TableRow2.Icon;
const CircleCheckIcon = (CircleCheckIconModule).CircleCheckIcon;
object.icon = <Icon IconComponent={CircleCheckIcon} />;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
object.label = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['0PhgpK']]);
string = intl.string;
const HYg2Hn = (require(1244) /* metro dependency 1244: indexNative */).t.HYg2Hn;
object.subLabel = Reflect.apply(string, intl, [HYg2Hn]);
return <TableRow {...object} />;
}
function File_120872({upload, handleRemoveFile}) { // fn#120872, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:2073, offset: 0x02538fd8, size: 472 bytes, params: 2, frame: 26
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const styles = useStyles();
const TableRow = (TableRowNativeModule).TableRow;
const object = {};
const uri = upload.item.uri;
const isImage = upload.isImage;
const isVideo = upload.isVideo;
const AttachmentIcon = (AttachmentPreviewModule).AttachmentIcon;
object.icon = (
<AttachmentPreview
uri={uri}
isImage={isImage}
isVideo={isVideo}
width={32}
height={32}
defaultPreview={<View style={styles.defaultAttachmentIconWrapper}>
<AttachmentIcon fileName={upload.filename} />
</View>}
/>
);
object.label = upload.filename ?? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ZMirp0);
const IconButton = (IconButtonNativeModule).IconButton;
const object4 = {'variant': 'tertiary', 'size': 'sm'};
const XSmallIcon = (XSmallIconModule).XSmallIcon;
object4.icon = <XSmallIcon size="sm" />;
object4.onPress = function() {
return handleRemoveFile(upload.id);
};
const string = intl.string;
const N86XcP = (require(1244) /* metro dependency 1244: indexNative */).t.N86XcP;
object4.accessibilityLabel = Reflect.apply(string, intl, [N86XcP]);
object.trailing = <IconButton {...object4} />;
object.start = true;
object.end = true;
return <TableRow {...object} />;
}
function FileUploadActionComponent(a0) { // fn#120874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:2762, offset: 0x025391b0, size: 938 bytes, params: 2, frame: 29
var r8;
var length;
const Stack = (StackNativeModule).Stack;
var items2;
const minValues = a0.minValues;
const maxValues = a0.maxValues;
const value2 = undefined;
const value3 = (ComponentStateContextModule).useComponentStateContext();
(Module00044)(value3 != null,
'FileUploadActionComponent must be used within a ComponentStateContextProvider');
const channelId = value3.channelId;
(Module00044)(channelId != null,
'FileUploadActionComponent must be used inside a channel');
const modal = value3.modal;
const customId = modal == null ? value2 : modal.customId;
(Module00044)(customId != null,
'FileUploadActionComponent requires modalCustomId from context');
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(channelId);
});
(Module00044)(channel != null, 'FileUploadActionComponent requires a valid channel');
const kestrelConfig = (KestrelExperimentModule).getKestrelConfig({location: 'native.FileUploadActionComponent'});
const getEffectiveKestrelLimit = KestrelExperimentModule.getEffectiveKestrelLimit;
const value5 = Reflect.apply(getEffectiveKestrelLimit, KestrelExperimentModule, [kestrelConfig,
FileUtilsModule.maxFileSize(channel.guild_id)]);
const env0_4 = value5;
const {uploadIds, setUploadIds,
currentUploads} = (UseFileUploadComponentStateModule).useFileUploadComponentState(a0);
const parents = value3.getParents(a0);
const r5 = parents == null ? value2 : parents[0];
const type = r5 == null ? value2 : r5.type;
const ComponentType = (ServerModule).ComponentType;
const LABEL = ComponentType.LABEL;
let r0 = type !== LABEL ? value2 : r5;
(Module00044)(r0 != null,
'FileUploadActionComponent must be used within a label Component');
const binding = env0_4;
const value9 = binding.useCallback(_fun120876(), [uploadIds, maxValues, setUploadIds, value5, customId, channelId]);
const value10 = binding.useCallback(_fun120881, [channelId, uploadIds, setUploadIds]);
const value11 = binding.useCallback(_fun120883, [channel, maxValues, value9, uploadIds, currentUploads, value10]);
if (maxValues !== 1) {
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_12};
length = uploadIds.length;
r8 = length >= maxValues ? <MainAreaLimitReached /> : <MainAreaCanUpload openFilePicker={value11} minValues={minValues} maxValues={maxValues} maxSizeBytes={value5} />;
r8 = (
length >= maxValues
? (
<MainAreaLimitReached />
)
: (
<MainAreaCanUpload
openFilePicker={value11}
minValues={minValues}
maxValues={maxValues}
maxSizeBytes={value5}
/>
)
);
items2 = [r8];
length = currentUploads.length;
r8 = length > 0 && ((TableRowGroup) => <TableRowGroup hasIcons>{currentUploads.map(_fun120892)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup);
items2[1] = r8;
r0 = <Stack {...stackProps}>{items2}</Stack>;
}
}
return r0;
}
function _fun120876() { // fn#120876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:3782, offset: 0x0253955a, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun120878);
return _fun120880;
}
function _fun120881(a0) { // fn#120881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4448, offset: 0x025397ab, size: 96 bytes, params: 2, frame: 18
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const defaultImport = importDefault(7879) /* metro dependency 7879: UploadAttachmentActionCreators */;
const remove = defaultImport.remove;
const channelIdBinding = channelId;
const InteractionModal = DraftType.InteractionModal;
Reflect.apply(remove, defaultImport, [channelIdBinding, a0, InteractionModal]);
setUploadIds(uploadIds.filter(_fun120882));
}
function _fun120883() { // fn#120883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4552, offset: 0x0253980b, size: 271 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const InteractionModal = DraftType.InteractionModal;
let object2 = {};
object2.channel = channel;
const maxValuesBinding = maxValues;
object2.uploadLimit = maxValuesBinding;
object2.onDismissKeyboard = onDismissKeyboard;
object2.onRestoreKeyboard = NOOP;
object2.onSelectFiles = onSelectFiles_120885;
(require(1848) /* metro dependency 1848: KeyboardManagerUtils */).dismissGlobalKeyboard();
value = require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */;
const showMediaKeyboardActionSheet = value.showMediaKeyboardActionSheet;
object2 = {};
object2.channel = channel;
object2.draftType = InteractionModal;
object2.uploadLimit = maxValuesBinding;
object2.disableWhenReachedLimit = true;
object2.includedUploadIds = uploadIds;
object2.onAttachPress = onAttachPress_120886;
object2.onPressCamera = onPressCamera_120887;
object2.onPressItem = onPressItem_120888;
object2.onViewAll = onViewAll_120890;
object2.onManageLimited = function() {
var moduleValue = require(dependencyMap[30]);
var object = {onDismissKeyboard: require(dependencyMap[28]).hideMediaKeyboardActionSheet};
object.onRestoreKeyboard = NOOP;
moduleValue.handleLimitedPickerDialog(object);
};
const hideMediaKeyboardActionSheet = (require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet;
object2.onClose = hideMediaKeyboardActionSheet;
object2.onBack = hideMediaKeyboardActionSheet;
Reflect.apply(showMediaKeyboardActionSheet, value, [object2]);
}
function _fun120892(a0) { // fn#120892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5869, offset: 0x02539b2f, size: 49 bytes, params: 2, frame: 15
return (
<File
upload={a0}
handleRemoveFile={env0_9}
key={a0.id}
/>
);
}
function* _fun120878(a0) { // fn#120878, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:3802, offset: 0x02539589, size: 412 bytes, params: 2, frame: 21
var environment;
var r6;
var value4;
var value5;
var value6;
var done;
var value7;
var binding;
var value8;
var getFileSize;
var uri;
var value9;
var value10;
var value11;
var value12;
var map;
var value13;
var concat;
var value14;
var binding2;
var value15;
var show;
var object2;
var intl;
var string;
var t;
var formatToPlainString;
if (true) {
if (a0.length !== 0) {
value = environment.__proto__.__proto__;
if (View.length + a0.length > require) {
value14 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
binding2 = env3_2;
value15 = binding(binding2[23]);
show = value15.show;
object2 = {};
binding = env3_0;
intl = binding(binding2[11]).intl;
string = intl.string;
t = binding(binding2[11]).t;
object2.title = Reflect.apply(string, intl, [t.wOr6hB]);
intl = binding(binding2[11]).intl;
formatToPlainString = intl.formatToPlainString;
t = binding(binding2[11]).t;
object2.body = Reflect.apply(formatToPlainString, intl, [t.dy6viJ, {maxValues: require}]);
return Reflect.apply(show, value15, [object2]);
r0 = (
<Stack {...stackProps}>
{items2}
</Stack>
);
} else {
length = currentUploads.length;
if (length === 1) {
r0 = <File_120872 upload={currentUploads[0]} handleRemoveFile={value10} />;
} else {
var stackProps = {spacing: (importDefault(697) /* metro dependency 697: native */).space.PX_12};
length = uploadIds.length;
r8 = (
length >= maxValues
? (
<MainAreaLimitReached />
)
: (
<MainAreaCanUpload
openFilePicker={value11}
minValues={minValues}
maxValues={maxValues}
maxSizeBytes={value5}
/>
)
);
items2 = [r8];
length = currentUploads.length;
r8 = length > 0 && ((TableRowGroup) => <TableRowGroup hasIcons>{currentUploads.map(_fun120892)}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup);
items2[1] = r8;
r0 = (
<Stack {...stackProps}>
{items2}
</Stack>
);
}
value4 = environment.__proto__.__proto__.__proto__;
value5 = env3_12(a0);
value6 = value5();
done = value6.done;
reducibleJoin11: while (true) {
reducibleJoin10: while (true) {
if (done) {
break reducibleJoin10;
}
r6 = value6;
reducibleLoop4: while (true) {
value7 = r6.value;
binding = env3_0;
value8 = binding(env3_2[24]);
getFileSize = value8.getFileSize;
uri = value7.uri;
yield Reflect.apply(getFileSize, value8, [uri]);
value9 = undefined;
value10 = false;
if (value10) {
return value9;
}
return r0;
function _fun120876() { // fn#120876, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:3782, offset: 0x0253955a, size: 36 bytes, params: 1, frame: 12
const env0_0 = env1_3(_fun120878);
return _fun120880;
function* _fun120878(a0) { // fn#120878, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:3802, offset: 0x02539589, size: 412 bytes, params: 2, frame: 21
var environment;
var r6;
var value4;
var value5;
var value6;
var done;
var value7;
var binding;
var value8;
var getFileSize;
var uri;
var value9;
var value10;
var value11;
var value12;
var map;
var value13;
var channelStoreBinding;
var concat;
var value14;
var binding2;
var value15;
var show;
var object;
var intl;
var string;
var t;
var formatToPlainString;
if (true) {
if (a0.length !== 0) {
value = environment.__proto__.__proto__;
if (View.length + a0.length > require) {
value14 = environment.__proto__.__proto__.__proto__;
binding = env3_1;
binding2 = env3_2;
value15 = binding(binding2[23]);
show = value15.show;
object = {};
binding = env3_0;
intl = binding(binding2[11]).intl;
string = intl.string;
t = binding(binding2[11]).t;
object.title = Reflect.apply(string, intl, [t.wOr6hB]);
intl = binding(binding2[11]).intl;
formatToPlainString = intl.formatToPlainString;
t = binding(binding2[11]).t;
object.body = Reflect.apply(formatToPlainString, intl, [t.dy6viJ, {maxValues: require}]);
return Reflect.apply(show, value15, [object]);
}
if (value9 > env2_4) {
value12 = env3_0(env3_2[25]);
return value12.showFileSizeExceededAlert(env2_4, value9);
value4 = environment.__proto__.__proto__.__proto__;
value5 = env3_12(a0);
value6 = value5();
done = value6.done;
reducibleJoin11: while (true) {
reducibleJoin10: while (true) {
if (done) {
break reducibleJoin10;
}
r6 = value6;
reducibleLoop4: while (true) {
value7 = r6.value;
binding = env3_0;
value8 = binding(env3_2[24]);
getFileSize = value8.getFileSize;
uri = value7.uri;
yield Reflect.apply(getFileSize, value8, [uri]);
value9 = undefined;
value10 = false;
if (value10) {
return value9;
}
if (value9 > env2_4) {
value12 = env3_0(env3_2[25]);
return value12.showFileSizeExceededAlert(env2_4, value9);
}
value11 = value5();
done = value11.done;
if (done) {
break reducibleJoin10;
}
r6 = value11;
continue reducibleLoop4;
}
}
map = a0.map;
value13 = Reflect.apply(map, a0, [_fun120879]);
channelStoreBinding = ChannelStore;
concat = View.concat;
channelStoreBinding(Reflect.apply(concat, View, [value13]));
break reducibleJoin11;
}
value11 = value5();
done = value11.done;
if (done) {
break reducibleJoin10;
}
r6 = value11;
continue reducibleLoop4;
}
}
map = a0.map;
value13 = Reflect.apply(map, a0, [_fun120879]);
concat = View.concat;
ChannelStore(Reflect.apply(concat, View, [value13]));
break reducibleJoin11;
function _fun120879(a0) { // fn#120879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4183, offset: 0x02539725, size: 134 bytes, params: 2, frame: 16
const binding = env4_0;
const binding2 = env4_2;
const componentUploadId = binding(binding2[26]).makeComponentUploadId(dependencyMap);
const value4 = env4_1(binding2[27]);
const setFile = value4.setFile;
const object = {};
object.channelId = importDefault;
object.id = componentUploadId;
const object2 = {};
copyDataProperties(object2, a0, binding2);
object2['id'] = componentUploadId;
object.file = object2;
const InteractionModal = env4_7.InteractionModal;
object.draftType = InteractionModal;
object.allowOptimization = false;
Reflect.apply(setFile, value4, [object]);
return componentUploadId;
}
}
function _fun120880() { // fn#120880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4370, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
return env0_0.apply(this, arguments);
}
}
}
}
function onDismissKeyboard() { // fn#120884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4627, offset: 0x0253991a, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet();
}
function _fun120881(a0) { // fn#120881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4448, offset: 0x025397ab, size: 96 bytes, params: 2, frame: 18
var environment;
const env0_0 = a0;
const value = environment.__proto__;
const defaultImport = UploadAttachmentActionCreators;
const remove = defaultImport.remove;
const channelIdBinding = channelId;
const InteractionModal = DraftType.InteractionModal;
Reflect.apply(remove, defaultImport, [channelIdBinding, a0, InteractionModal]);
setUploadIds(uploadIds.filter(_fun120882));
function _fun120882(a0) { // fn#120882, offset: 0x00ce1772, size: 16 bytes, params: 2, frame: 2
return a0 !== env0_0;
}
function onAttachPress_120886() { // fn#120886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4888, offset: 0x0253993f, size: 54 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleAttachFile = value.handleAttachFile;
const object2 = {};
copyDataProperties(object2, env0_1, environment);
Reflect.apply(handleAttachFile, value, [object2]);
}
function onPressCamera_120887(a0) { // fn#120887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4943, offset: 0x02539975, size: 68 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleCameraDialog = value.handleCameraDialog;
const object2 = {};
copyDataProperties(object2, env0_1, undefined);
object2['previewType'] = a0;
Reflect.apply(handleCameraDialog, value, [object2]);
}
function onPressItem_120888({item, isIncluded}) { // fn#120888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5011, offset: 0x025399b9, size: 158 bytes, params: 2, frame: 15
var environment;
var value2;
var value3;
let value = environment.__proto__.__proto__;
(require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet();
if (isIncluded) {
value = environment.__proto__;
value3 = currentUploads.find(_fun120889);
if (value3 != null) {
env1_9(value3.id);
}
} else {
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
value = value.mediaNodeToUploadItem(item);
value2 = environment.__proto__;
env1_8([value]);
function _fun120883() { // fn#120883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4552, offset: 0x0253980b, size: 271 bytes, params: 1, frame: 20
var environment;
let value = environment.__proto__;
const InteractionModal = DraftType.InteractionModal;
let object = {};
object.channel = channel;
const maxValuesBinding = maxValues;
object.uploadLimit = maxValuesBinding;
object.onDismissKeyboard = onDismissKeyboard_120884;
object.onRestoreKeyboard = NOOP;
object.onSelectFiles = onSelectFiles_120885;
(KeyboardManagerUtilsModule).dismissGlobalKeyboard();
value = require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */;
const showMediaKeyboardActionSheet = value.showMediaKeyboardActionSheet;
object = {};
object.channel = channel;
object.draftType = InteractionModal;
object.uploadLimit = maxValuesBinding;
object.disableWhenReachedLimit = true;
object.includedUploadIds = uploadIds;
object.onAttachPress = onAttachPress_120886;
object.onPressCamera = onPressCamera_120887;
object.onPressItem = onPressItem_120888;
object.onViewAll = onViewAll_120890;
object.onManageLimited = function() {
var moduleValue = require(dependencyMap[30]);
var object = {onDismissKeyboard: require(dependencyMap[28]).hideMediaKeyboardActionSheet};
object.onRestoreKeyboard = NOOP;
moduleValue.handleLimitedPickerDialog(object);
};
const hideMediaKeyboardActionSheet = (require(11096) /* metro dependency 11096: showMediaKeyboardActionSheet */).hideMediaKeyboardActionSheet;
object.onClose = hideMediaKeyboardActionSheet;
object.onBack = hideMediaKeyboardActionSheet;
Reflect.apply(showMediaKeyboardActionSheet, value, [object]);
function onDismissKeyboard_120884() { // fn#120884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4627, offset: 0x0253991a, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (ShowMediaKeyboardActionSheetModule).hideMediaKeyboardActionSheet();
}
function onSelectFiles_120885(a0) { // fn#120885, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4706, offset: 0x01b98339, size: 19 bytes, params: 2, frame: 11
env1_8(a0);
}
function onAttachPress_120886() { // fn#120886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4888, offset: 0x0253993f, size: 54 bytes, params: 1, frame: 14
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleAttachFile = value.handleAttachFile;
const object = {};
copyDataProperties(object, env0_1, environment);
Reflect.apply(handleAttachFile, value, [object]);
}
function onPressCamera_120887(a0) { // fn#120887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4943, offset: 0x02539975, size: 68 bytes, params: 2, frame: 15
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleCameraDialog = value.handleCameraDialog;
const object = {};
copyDataProperties(object, env0_1, undefined);
object['previewType'] = a0;
Reflect.apply(handleCameraDialog, value, [object]);
}
function onPressItem_120888({item, isIncluded}) { // fn#120888, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5011, offset: 0x025399b9, size: 158 bytes, params: 2, frame: 15
var environment;
var value2;
var value3;
let value = environment.__proto__.__proto__;
(ShowMediaKeyboardActionSheetModule).hideMediaKeyboardActionSheet();
if (isIncluded) {
value = environment.__proto__;
value3 = currentUploads.find(_fun120889);
if (value3 != null) {
env1_9(value3.id);
}
} else {
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
value = value.mediaNodeToUploadItem(item);
value2 = environment.__proto__;
env1_8([value]);
}
function _fun120889(a0) { // fn#120889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5098, offset: 0x02539a57, size: 61 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = require(4658) /* metro dependency 4658: UploadUtils */;
return value.doesImageMatchUpload(item.node.image, a0);
}
}
function onViewAll_120890() { // fn#120890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5232, offset: 0x02539a94, size: 83 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleViewAllDialog = value.handleViewAllDialog;
const object = {};
copyDataProperties(object, env0_1, undefined);
object['draftType'] = InteractionModal;
object['includedUploadIds'] = uploadIds;
Reflect.apply(handleViewAllDialog, value, [object]);
}
}
function _fun120892(a0) { // fn#120892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5869, offset: 0x02539b2f, size: 49 bytes, params: 2, frame: 15
return (
<File_120872
upload={a0}
handleRemoveFile={env0_9}
key={a0.id}
/>
);
}
}
}
function onViewAll_120890() { // fn#120890, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5232, offset: 0x02539a94, size: 83 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = require(11095) /* metro dependency 11095: MediaKeyboardUtils */;
const handleViewAllDialog = value.handleViewAllDialog;
const object2 = {};
copyDataProperties(object2, env0_1, undefined);
object2['draftType'] = InteractionModal;
object2['includedUploadIds'] = uploadIds;
Reflect.apply(handleViewAllDialog, value, [object2]);
}
function _fun120879(a0) { // fn#120879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:4183, offset: 0x02539725, size: 134 bytes, params: 2, frame: 16
const binding = env4_0;
const binding2 = env4_2;
const componentUploadId = binding(binding2[26]).makeComponentUploadId(dependencyMap);
const value4 = env4_1(binding2[27]);
const setFile = value4.setFile;
const object3 = {};
object3.channelId = importDefault;
object3.id = componentUploadId;
const object4 = {};
copyDataProperties(object4, a0, binding2);
object4['id'] = componentUploadId;
object3.file = object4;
const InteractionModal = env4_7.InteractionModal;
object3.draftType = InteractionModal;
object3.allowOptimization = false;
Reflect.apply(setFile, value4, [object3]);
return componentUploadId;
}
function _fun120889(a0) { // fn#120889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15949:5098, offset: 0x02539a57, size: 61 bytes, params: 2, frame: 13
let value = environment.__proto__.__proto__.__proto__;
value = require(4658) /* metro dependency 4658: UploadUtils */;
return value.doesImageMatchUpload(item.node.image, a0);
}
global.__d(_fun120866, 15741, [5, 31, 27, 1379, 4645, 661, 33, 4501, 4136, 6238, 13164, 1244, 4073, 11143, 8341,
5312, 8357, 44, 566, 4697, 4655, 15742, 1909, 4647, 4660, 11543, 4627, 7879, 11096, 1848, 11095, 4658, 4572,
697, 6231,
2]) /* metro module 15741, dependencies: [5, 31, 27, 1379, 4645, 661, 33, 4501, 4136, 6238, 13164, 1244, 4073, 11143, 8341, 5312, 8357, 44, 566, 4697, 4655, 15742, 1909, 4647, 4660, 11543, 4627, 7879, 11096, 1848, 11095, 4658, 4572, 697, 6231, 2] */;
@@ -1,136 +1,151 @@
/* Metro module 15743; source: modules/interaction_components/native/actions/RadioGroupActionComponent.tsx; dependencies: [31, 33, 8357, 4017, 4577, 4581, 7988, 7987, 6238, 5312, 1244, 2] */
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
import * as SpringPresetsModule from '../../../../design/animation/reanimated/spring/springPresets.tsx'; /* Metro dependency 4581 */
import * as TableRadioRowNativeModule from '../../../../design/components/TableRow/native/TableRadioRow.native.tsx'; /* Metro dependency 7987 */
import * as TableRadioGroupNativeModule from '../../../../design/components/TableRow/native/TableRadioGroup.native.tsx'; /* Metro dependency 7988 */
function _fun120904(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:6, offset: 0x02539e8e, size: 187 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.Fragment;
const env0_6 = value2.jsxs;
let value = ReactModule;
object = {code: 'function RadioGroupActionComponentTsx1(){const{withSpring,hasValue,SUBTLE_SPRING}=this.__closure;return{maxHeight:withSpring(hasValue?60:0,SUBTLE_SPRING),marginTop:withSpring(hasValue?8:0,SUBTLE_SPRING),opacity:withSpring(hasValue?1:0,SUBTLE_SPRING)};}'};
value = value.memo(_fun120905);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/RadioGroupActionComponent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/actions/RadioGroupActionComponent.tsx');
exports.default = value;
}
function _fun120905(a0) { // fn#120905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:420, offset: 0x02539f49, size: 699 bytes, params: 2, frame: 28
var object2;
var r5;
var View;
var TableRow;
var intl;
const type = a0.type;
const options = a0.options;
const required = a0.required;
const binding = env0_3;
let value2 = binding.useRef(null);
var env0_3 = value2;
const value3 = binding.useMemo(_fun120906, [options]);
const value5 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value3 != null ? {type: type, value: value3} : undefined);
const state = value5.state;
const env0_5 = value5.executeStateUpdate;
const value6 = env0_3.useMemo(function() {
var stateBinding = state;
var value2 = null;
return (value2 == stateBinding ? undefined : state.type) !== type ? value2 : state.value;
}, [state, type]);
const value7 = value6 != null;
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
let closure = p_120909;
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, hasValue: value7};
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object2;
closure.__workletHash = 1287549755250;
closure.__initData = env0_7;
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
closure = onChange_120910;
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const TableRadioGroup = (require(7988) /* metro dependency 7988: TableRadioGroupNative */).TableRadioGroup;
const tableRadioGroup = <TableRadioGroup hasIcons={false} defaultValue={value6 ?? ''} onChange={closure} groupRef={value2}>{options.map(_fun120911)}</TableRadioGroup>;
if (required) {
r5 = !required;
} else {
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var viewProps = {style: value8, accessibilityElementsHidden: !value7,
importantForAccessibility: value7 ? 'auto' : 'no-hide-descendants'};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {icon: ((Icon) => <Icon IconComponent={(require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uAtZN']);
tableRowProps.onPress = function() {
return onChange_120910(null);
};
tableRowProps.start = true;
tableRowProps.end = true;
r5 = <View {...viewProps}><TableRow {...tableRowProps} /></View>;
}
return (
<>
{tableRadioGroup}
{r5}
</>
);
}
function _fun120906() { // fn#120906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:502, offset: 0x0253a204, size: 45 bytes, params: 1, frame: 11
return options.find(function(a0) {
return a0.default;
})?.value;
}
function p_120909() { // fn#120909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:778, offset: 0x0253a261, size: 204 bytes, params: 1, frame: 22
const object2 = {};
const springModule = require(4577) /* metro dependency 4577: spring */;
const withSpring = springModule.withSpring;
const resultBinding = result;
const value3 = 0;
const r10 = resultBinding ? 60 : value3;
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
object2.maxHeight = Reflect.apply(withSpring, springModule, [r10, SUBTLE_SPRING]);
const moduleValue2 = springModule;
object2.marginTop = moduleValue2.withSpring(result ? 8 : value3, SUBTLE_SPRING);
const moduleValue3 = springModule;
object2.opacity = moduleValue3.withSpring(result ? 1 : value3, SUBTLE_SPRING);
return object2;
}
function onChange_120910(a0) { // fn#120910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:1107, offset: 0x0253a32d, size: 118 bytes, params: 2, frame: 14
var current;
if (a0 !== '') {
if (a0 == null) {
executeStateUpdate({type: type, value: null});
current = env0_3.current;
if (current != null) {
current.setValue('');
}
} else if (env0_6 !== a0) {
executeStateUpdate({type: type, value: a0});
} else if (required) {
executeStateUpdate({type: type, value: a0});
function _fun120905(a0) { // fn#120905, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:420, offset: 0x02539f49, size: 699 bytes, params: 2, frame: 28
var r5;
var View;
var TableRow;
var intl;
const type = a0.type;
const options = a0.options;
const required = a0.required;
const binding = env0_3;
let value2 = binding.useRef(null);
var env0_3 = value2;
const value3 = binding.useMemo(_fun120906, [options]);
const value5 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value3 != null ? {type: type, value: value3} : undefined);
const state = value5.state;
const env0_5 = value5.executeStateUpdate;
const value6 = env0_3.useMemo(function() {
var stateBinding = state;
var value2 = null;
return (value2 == stateBinding ? undefined : state.type) !== type ? value2 : state.value;
}, [state, type]);
const value7 = value6 != null;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
let closure = p_120909;
object = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, hasValue: value7};
const SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
object.SUBTLE_SPRING = SUBTLE_SPRING;
closure.__closure = object;
closure.__workletHash = 1287549755250;
closure.__initData = env0_7;
const value8 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [closure]);
closure = onChange_120910;
const jsxRuntimeEnv0_5Binding = jsxRuntimeEnv0_5;
const TableRadioGroup = (TableRadioGroupNativeModule).TableRadioGroup;
const tableRadioGroup = (
<TableRadioGroup
hasIcons={false}
defaultValue={value6 ?? ''}
onChange={closure}
groupRef={value2}
>
{options.map(_fun120911)}
</TableRadioGroup>
);
if (required) {
r5 = !required;
} else {
executeStateUpdate({type: type, value: null});
current = env0_3.current;
if (current != null) {
current.setValue('');
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
var viewProps = {style: value8, accessibilityElementsHidden: !value7,
importantForAccessibility: value7 ? 'auto' : 'no-hide-descendants'};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
var tableRowProps = {icon: ((Icon) => <Icon IconComponent={(require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon} />)((require(6238) /* metro dependency 6238: TableRowNative */).TableRow.Icon)};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5uAtZN']);
tableRowProps.onPress = function() {
return onChange_120910(null);
};
tableRowProps.start = true;
tableRowProps.end = true;
r5 = (
<View {...viewProps}>
<TableRow {...tableRowProps} />
</View>
);
}
return (
<>
{tableRadioGroup}
{r5}
</>
);
function _fun120906() { // fn#120906, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:502, offset: 0x0253a204, size: 45 bytes, params: 1, frame: 11
return options.find(function(a0) {
return a0.default;
})?.value;
}
function p_120909() { // fn#120909, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:778, offset: 0x0253a261, size: 204 bytes, params: 1, frame: 22
const object = {};
const withSpring = SpringModule.withSpring;
const resultBinding = result;
const value3 = 0;
const r10 = resultBinding ? 60 : value3;
const SUBTLE_SPRING = (SpringPresetsModule).SUBTLE_SPRING;
object.maxHeight = Reflect.apply(withSpring, SpringModule, [r10, SUBTLE_SPRING]);
object.marginTop = SpringModule.withSpring(result ? 8 : value3, SUBTLE_SPRING);
object.opacity = SpringModule.withSpring(result ? 1 : value3, SUBTLE_SPRING);
return object;
}
function onChange_120910(a0) { // fn#120910, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:1107, offset: 0x0253a32d, size: 118 bytes, params: 2, frame: 14
var current;
if (a0 !== '') {
if (a0 == null) {
executeStateUpdate({type: type, value: null});
current = env0_3.current;
if (current != null) {
current.setValue('');
}
} else if (JsxRuntimeModule.jsxs !== a0) {
executeStateUpdate({type: type, value: a0});
} else if (required) {
executeStateUpdate({type: type, value: a0});
} else {
executeStateUpdate({type: type, value: null});
current = env0_3.current;
if (current != null) {
current.setValue('');
}
}
}
}
function _fun120911(a0) { // fn#120911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:1360, offset: 0x0253a3a3, size: 82 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (TableRadioRowNativeModule).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
subLabel={a0.description}
value={a0.value}
key={a0.value}
/>
);
}
}
}
function _fun120911(a0) { // fn#120911, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15951:1360, offset: 0x0253a3a3, size: 82 bytes, params: 2, frame: 16
const value = environment.__proto__;
const TableRadioRow = (require(7987) /* metro dependency 7987: TableRadioRowNative */).TableRadioRow;
return (
<TableRadioRow
label={a0.label}
subLabel={a0.description}
value={a0.value}
key={a0.value}
/>
);
}
global.__d(_fun120904, 15743, [31, 33, 8357, 4017, 4577, 4581, 7988, 7987, 6238, 5312, 1244,
2]) /* metro module 15743, dependencies: [31, 33, 8357, 4017, 4577, 4581, 7988, 7987, 6238, 5312, 1244, 2] */;
@@ -1,112 +1,119 @@
/* Metro module 14257; source: modules/interaction_components/native/actions/SearchableSelectActionComponent.tsx; dependencies: [31, 1379, 33, 4627, 8357, 44, 8362, 1909, 14255, 8364, 4080, 11443, 1962, 11439, 2] */
import Module00044 from '../../../../by-id/module-00044.js'; /* Metro dependency 44 */
import ChannelStore from '../../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectMenuNativeComponent from '../SelectMenuNativeComponent.tsx'; /* Metro dependency 14255 */
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 ComponentStateContextModule from '../../ComponentStateContext.tsx'; /* Metro dependency 8357 */
import * as SearchableSelectActionComponentUtilsModule from '../../SearchableSelectActionComponentUtils.tsx'; /* Metro dependency 8362 */
function _fun107847(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107847, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:6, offset: 0x0230ae65, size: 158 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const env0_5 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/SearchableSelectActionComponent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/actions/SearchableSelectActionComponent.tsx');
exports.default = SearchableSelectActionComponent;
}
function SearchableSelectActionComponent(a0) { // fn#107848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:256, offset: 0x0230af03, size: 790 bytes, params: 2, frame: 28
var require2;
var r8;
var require3;
const env0_0 = a0;
let type = a0.type;
const value2 = undefined;
const selectPlaceholder = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getSelectPlaceholder(a0);
const value4 = (ComponentStateContextModule).useComponentStateContext();
const defaultImport = Module00044;
const value5 = null;
defaultImport(value5 != (value5 == value4 ? value2 : value4.modal),
'SearchableSelectActionComponent must be rendered inside a modal ComponentStateContext');
defaultImport(value5 != (value5 == value4 ? value2 : value4.channelId),
'SearchableSelectActionComponent must be used inside a channel');
const channel = ChannelStore.getChannel(value4.channelId);
const guild_id = value5 == channel ? value2 : channel.guild_id;
const r9 = value5 != guild_id ? guild_id : value5;
const value7 = ReactModule.useMemo(_fun107849, [a0.defaultValues, r9]);
const {state, visualState, executeStateUpdate} = value4.useComponentState(a0, value7.length > 0 ? {type: type,
selectedOptions: value7} : value2);
const customId = value4.modal.customId;
type = value5 == state ? value2 : state.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const USER_SELECT = ComponentType.USER_SELECT;
if (type === USER_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) === (require(1909) /* metro dependency 1909: Server */).ComponentType.ROLE_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) === (require(1909) /* metro dependency 1909: Server */).ComponentType.MENTIONABLE_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) !== (require(1909) /* metro dependency 1909: Server */).ComponentType.CHANNEL_SELECT) {
r8 = value7;
require3 = require;
} else {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
}
const parents = value4.getParents(a0);
const r1 = value5 == parents ? value2 : parents[0];
type = value5 == r1 ? value2 : r1.type;
const LABEL = ComponentType.LABEL;
({channelId: value4.channelId, guildId: r9, containerId: customId, onSubmit: executeStateUpdate,
labelComponent: type !== LABEL ? value2 : r1}).allowEmpty = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).canSelectBeEmpty(a0,
'modal');
const object2 = {};
copyDataProperties(object2, a0, require3);
object2['placeholder'] = selectPlaceholder;
object2['state'] = visualState;
object2['selectedOptions'] = (require(8364) /* metro dependency 8364: NativeSearchableSelectActionComponentUtils */).transformSearchableSelectOptions(r8,
r9);
return <SelectMenuNativeComponent model={object2} onTap={onTap} />;
function _fun107849() { // fn#107849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:718, offset: 0x0230b219, size: 66 bytes, params: 1, frame: 13
let value = environment.__proto__;
const getSnowflakeSelectDefaultValues = (SearchableSelectActionComponentUtilsModule).getSnowflakeSelectDefaultValues;
value = Reflect.apply(getSnowflakeSelectDefaultValues, value, [env0_0.defaultValues, env0_1]);
return value ?? [];
}
function SearchableSelectActionComponent(a0) { // fn#107848, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:256, offset: 0x0230af03, size: 790 bytes, params: 2, frame: 28
var require2;
var r8;
var require3;
const env0_0 = a0;
let type = a0.type;
const value2 = undefined;
const selectPlaceholder = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getSelectPlaceholder(a0);
const value4 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
const defaultImport = importDefault(44) /* metro dependency 44 */;
const value5 = null;
defaultImport(value5 != (value5 == value4 ? value2 : value4.modal),
'SearchableSelectActionComponent must be rendered inside a modal ComponentStateContext');
defaultImport(value5 != (value5 == value4 ? value2 : value4.channelId),
'SearchableSelectActionComponent must be used inside a channel');
const channel = ChannelStore.getChannel(value4.channelId);
const guild_id = value5 == channel ? value2 : channel.guild_id;
const r9 = value5 != guild_id ? guild_id : value5;
const value7 = env0_3.useMemo(_fun107849, [a0.defaultValues, r9]);
const {state, visualState, executeStateUpdate} = value4.useComponentState(a0, value7.length > 0 ? {type: type,
selectedOptions: value7} : value2);
const customId = value4.modal.customId;
type = value5 == state ? value2 : state.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const USER_SELECT = ComponentType.USER_SELECT;
if (type === USER_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) === (require(1909) /* metro dependency 1909: Server */).ComponentType.ROLE_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) === (require(1909) /* metro dependency 1909: Server */).ComponentType.MENTIONABLE_SELECT) {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
} else if ((value5 == state ? value2 : state.type) !== (require(1909) /* metro dependency 1909: Server */).ComponentType.CHANNEL_SELECT) {
r8 = value7;
require3 = require;
} else {
require2 = require;
r8 = state.selectedOptions;
require3 = require2;
}
const parents = value4.getParents(a0);
const r1 = value5 == parents ? value2 : parents[0];
type = value5 == r1 ? value2 : r1.type;
const LABEL = ComponentType.LABEL;
({channelId: value4.channelId, guildId: r9, containerId: customId, onSubmit: executeStateUpdate,
labelComponent: type !== LABEL ? value2 : r1}).allowEmpty = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).canSelectBeEmpty(a0,
'modal');
const SelectMenuNativeComponent = importDefault(14255) /* metro dependency 14255: SelectMenuNativeComponent */;
const object = {};
copyDataProperties(object, a0, require3);
object['placeholder'] = selectPlaceholder;
object['state'] = visualState;
object['selectedOptions'] = (require(8364) /* metro dependency 8364: NativeSearchableSelectActionComponentUtils */).transformSearchableSelectOptions(r8,
r9);
return <SelectMenuNativeComponent model={object} onTap={onTap} />;
}
function SearchableSelectActionComponentOnTap() { // fn#107850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:1601, owner: SearchableSelectActionComponent.onTap, offset: 0x0230b25b, size: 291 bytes, params: 1, frame: 19
var defaultImport;
var openLazy;
var value3;
var value4;
var object;
var defaultImport2;
var value5;
var value6;
const type = env0_0.type;
const ComponentType = require(dependencyMap[7]).ComponentType;
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
if (type === CHANNEL_SELECT) {
defaultImport2 = importDefault(dependencyMap[10]);
openLazy = defaultImport2.openLazy;
value5 = require(dependencyMap[12])(dependencyMap[11], dependencyMap.paths);
value6 = 'ChannelSelectComponentActionSheet:' + customId;
object = {selectionActionComponent: env0_0};
copyDataProperties(object, ReactModule, undefined);
Reflect.apply(openLazy, defaultImport2, [value5, value6, object]);
} else {
defaultImport = importDefault(dependencyMap[10]);
openLazy = defaultImport.openLazy;
value3 = require(dependencyMap[12])(dependencyMap[13], dependencyMap.paths);
value4 = 'MentionableSelectComponentActionSheet:' + customId;
object = {selectionActionComponent: env0_0};
copyDataProperties(object, ReactModule, undefined);
Reflect.apply(openLazy, defaultImport, [value3, value4, object]);
}
}
function _fun107849() { // fn#107849, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:718, offset: 0x0230b219, size: 66 bytes, params: 1, frame: 13
let value = environment.__proto__;
const getSnowflakeSelectDefaultValues = (require(8362) /* metro dependency 8362: SearchableSelectActionComponentUtils */).getSnowflakeSelectDefaultValues;
value = Reflect.apply(getSnowflakeSelectDefaultValues, value, [env0_0.defaultValues, env0_1]);
return value ?? [];
}
function SearchableSelectActionComponentOnTap() { // fn#107850, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14454:1601, owner: SearchableSelectActionComponent.onTap, offset: 0x0230b25b, size: 291 bytes, params: 1, frame: 19
var defaultImport;
var openLazy;
var value3;
var value4;
var object2;
var defaultImport2;
var value5;
var value6;
const type = env0_0.type;
const ComponentType = require(dependencyMap[7]).ComponentType;
const CHANNEL_SELECT = ComponentType.CHANNEL_SELECT;
if (type === CHANNEL_SELECT) {
defaultImport2 = importDefault(dependencyMap[10]);
openLazy = defaultImport2.openLazy;
value5 = require(dependencyMap[12])(dependencyMap[11], dependencyMap.paths);
value6 = 'ChannelSelectComponentActionSheet:' + customId;
object2 = {selectionActionComponent: env0_0};
copyDataProperties(object2, env0_3, undefined);
Reflect.apply(openLazy, defaultImport2, [value5, value6, object2]);
} else {
defaultImport = importDefault(dependencyMap[10]);
openLazy = defaultImport.openLazy;
value3 = require(dependencyMap[12])(dependencyMap[13], dependencyMap.paths);
value4 = 'MentionableSelectComponentActionSheet:' + customId;
object2 = {selectionActionComponent: env0_0};
copyDataProperties(object2, env0_3, undefined);
Reflect.apply(openLazy, defaultImport, [value3, value4, object2]);
}
}
global.__d(_fun107847, 14257, [31, 1379, 33, 4627, 8357, 44, 8362, 1909, 14255, 8364, 4080, 11443, 1962, 11439,
2]) /* metro module 14257, dependencies: [31, 1379, 33, 4627, 8357, 44, 8362, 1909, 14255, 8364, 4080, 11443, 1962, 11439, 2] */;
@@ -1,83 +1,94 @@
/* Metro module 14254; source: modules/interaction_components/native/actions/StringSelectActionComponent.tsx; dependencies: [31, 33, 4627, 8357, 44, 1909, 14255, 4080, 11437, 1962, 2] */
import SelectMenuNativeComponent from '../SelectMenuNativeComponent.tsx'; /* Metro dependency 14255 */
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 ServerModule from '../../../../flow/Server.tsx'; /* Metro dependency 1909 */
import * as InteractionComponentUtilsModule from '../../InteractionComponentUtils.tsx'; /* Metro dependency 4627 */
import * as ComponentStateContextModule from '../../ComponentStateContext.tsx'; /* Metro dependency 8357 */
function _fun107833(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107833, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:6, offset: 0x0230a8d9, size: 142 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/StringSelectActionComponent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/actions/StringSelectActionComponent.tsx');
exports.default = StringSelectActionComponent;
function StringSelectActionComponent(a0) { // fn#107834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:242, offset: 0x0230a967, size: 461 bytes, params: 2, frame: 24
const env0_0 = a0;
let type = a0.type;
const options = a0.options;
const value2 = undefined;
const selectPlaceholder = (InteractionComponentUtilsModule).getSelectPlaceholder(a0);
const value4 = env0_3.useMemo(_fun107835, [options]);
const value5 = (ComponentStateContextModule).useComponentStateContext();
var env0_3 = value5;
(importDefault(44) /* metro dependency 44 */)((value5 == null ? value2 : value5.modal) != null,
'StringSelectActionComponent must be rendered inside a modal ComponentStateContext');
const value6 = value5.useComponentState(a0, value4.length > 0 ? {type: type, values: value4} : value2);
const state = value6.state;
const visualState = value6.visualState;
const env0_5 = value6.executeStateUpdate;
const value7 = env0_3.useMemo(_fun107838, [options, type, state]);
const env0_6 = value5.modal.customId;
const parents = value5.getParents(a0);
const r2 = parents == null ? value2 : parents[0];
type = r2 == null ? value2 : r2.type;
const ComponentType = (ServerModule).ComponentType;
const LABEL = ComponentType.LABEL;
const env0_7 = type !== LABEL ? value2 : r2;
const object2 = {};
copyDataProperties(object2, a0, options);
object2['placeholder'] = selectPlaceholder;
object2['state'] = visualState;
object2['selectedOptions'] = value7;
return <SelectMenuNativeComponent model={object2} onTap={onTap} />;
function _fun107835() { // fn#107835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:356, offset: 0x0230ab34, size: 45 bytes, params: 1, frame: 12
return options.filter(function(a0) {
return a0.default;
}).map(function(a0) {
return a0.value;
});
}
function _fun107838() { // fn#107838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:697, offset: 0x0230ab61, size: 88 bytes, params: 1, frame: 12
return (state?.type === type ? state.values : []).map(function(a0) {
var env0_0 = a0;
return options.findIndex(_fun107840);
}).filter(function(a0) {
return a0 !== -1;
});
function _fun107839(a0) { // fn#107839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:748, offset: 0x0230abb9, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return options.findIndex(_fun107840);
function _fun107840({value}) { // fn#107840, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:764, offset: 0x01b733f1, size: 21 bytes, params: 2, frame: 2
return value === env0_0;
}
}
}
function StringSelectActionComponentOnTap() { // fn#107842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:1014, owner: StringSelectActionComponent.onTap, offset: 0x0230abdd, size: 189 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[7]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[9]);
value = value(dependencyMap[8], dependencyMap.paths);
const value3 = 'StringSelectComponentActionSheet:' + customId;
const object = {};
const binding = env0_0;
object.selectionActionComponent = binding;
object.labelComponent = env0_7;
object.channelId = env0_3.channelId;
object.containerId = customId;
object.onSubmit = executeStateUpdate;
object.allowEmpty = require(dependencyMap[2]).canSelectBeEmpty(binding, 'modal');
Reflect.apply(openLazy, defaultImport, [value, value3, object]);
}
}
}
function StringSelectActionComponent(a0) { // fn#107834, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:242, offset: 0x0230a967, size: 461 bytes, params: 2, frame: 24
const env0_0 = a0;
let type = a0.type;
const options = a0.options;
const value2 = undefined;
const selectPlaceholder = (require(4627) /* metro dependency 4627: InteractionComponentUtils */).getSelectPlaceholder(a0);
const value4 = env0_3.useMemo(_fun107835, [options]);
const value5 = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentStateContext();
var env0_3 = value5;
(importDefault(44) /* metro dependency 44 */)((value5 == null ? value2 : value5.modal) != null,
'StringSelectActionComponent must be rendered inside a modal ComponentStateContext');
const value6 = value5.useComponentState(a0, value4.length > 0 ? {type: type, values: value4} : value2);
const state = value6.state;
const visualState = value6.visualState;
const env0_5 = value6.executeStateUpdate;
const value7 = env0_3.useMemo(_fun107838, [options, type, state]);
const env0_6 = value5.modal.customId;
const parents = value5.getParents(a0);
const r2 = parents == null ? value2 : parents[0];
type = r2 == null ? value2 : r2.type;
const ComponentType = (require(1909) /* metro dependency 1909: Server */).ComponentType;
const LABEL = ComponentType.LABEL;
const env0_7 = type !== LABEL ? value2 : r2;
const SelectMenuNativeComponent = importDefault(14255) /* metro dependency 14255: SelectMenuNativeComponent */;
const object = {};
copyDataProperties(object, a0, options);
object['placeholder'] = selectPlaceholder;
object['state'] = visualState;
object['selectedOptions'] = value7;
return <SelectMenuNativeComponent model={object} onTap={onTap} />;
}
function _fun107835() { // fn#107835, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:356, offset: 0x0230ab34, size: 45 bytes, params: 1, frame: 12
return options.filter(function(a0) {
return a0.default;
}).map(function(a0) {
return a0.value;
});
}
function _fun107838() { // fn#107838, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:697, offset: 0x0230ab61, size: 88 bytes, params: 1, frame: 12
return (state?.type === type ? state.values : []).map(function(a0) {
var env0_0 = a0;
return options.findIndex(_fun107840);
}).filter(function(a0) {
return a0 !== -1;
});
}
function StringSelectActionComponentOnTap() { // fn#107842, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:1014, owner: StringSelectActionComponent.onTap, offset: 0x0230abdd, size: 189 bytes, params: 1, frame: 21
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[7]);
const openLazy = defaultImport.openLazy;
value = require(dependencyMap[9]);
value = value(dependencyMap[8], dependencyMap.paths);
const value3 = 'StringSelectComponentActionSheet:' + customId;
const object2 = {};
const binding = env0_0;
object2.selectionActionComponent = binding;
object2.labelComponent = env0_7;
object2.channelId = env0_3.channelId;
object2.containerId = customId;
object2.onSubmit = executeStateUpdate;
object2.allowEmpty = require(dependencyMap[2]).canSelectBeEmpty(binding, 'modal');
Reflect.apply(openLazy, defaultImport, [value, value3, object2]);
}
function _fun107839(a0) { // fn#107839, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14451:748, offset: 0x0230abb9, size: 36 bytes, params: 2, frame: 11
const env0_0 = a0;
return options.findIndex(_fun107840);
}
global.__d(_fun107833, 14254, [31, 33, 4627, 8357, 44, 1909, 14255, 4080, 11437, 1962,
2]) /* metro module 14254, dependencies: [31, 33, 4627, 8357, 44, 1909, 14255, 4080, 11437, 1962, 2] */;
@@ -1,55 +1,69 @@
/* Metro module 15739; source: modules/interaction_components/native/actions/TextInputActionComponent.tsx; dependencies: [57, 31, 33, 8357, 15736, 1909, 6985, 7687, 7682, 2] */
import Module00057 from '../../../../by-id/module-00057.js'; /* Metro dependency 57 */
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 InteractionModalUtilsModule from '../../InteractionModalUtils.tsx'; /* Metro dependency 15736 */
function _fun120860(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120860, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15947:6, offset: 0x025385af, size: 164 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
let value = ReactModule;
value = value.memo(_fun120861);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/interaction_components/native/actions/TextInputActionComponent.tsx');
(FileImportTrackerModule).fileFinishedImporting('modules/interaction_components/native/actions/TextInputActionComponent.tsx');
exports.default = value;
}
function _fun120861(a0) { // fn#120861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15947:140, offset: 0x02538653, size: 533 bytes, params: 2, frame: 26
const type = a0.type;
const style = a0.style;
const label = a0.label;
const placeholder = a0.placeholder;
const required = a0.required;
const maxLength = a0.maxLength;
let value = a0.value;
const value3 = undefined;
value = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value != null ? {type: type, value: value} : value3);
const env0_2 = value.state;
const executeStateUpdate = value.executeStateUpdate;
const env0_3 = executeStateUpdate;
const error = value.error;
const useIsFirstTextInputInModal = (require(15736) /* metro dependency 15736: InteractionModalUtils */).useIsFirstTextInputInModal;
value = Reflect.apply(useIsFirstTextInputInModal, value, [a0.id]);
const textAreaFieldProps = {placeholder: placeholder, maxLength: maxLength,
status: error != null ? 'error' : 'default', defaultValue: env0_2(env0_3.useState(function() {
return state?.type === type ? state.value : value;
}), 1)[0], onChange: env0_3.useCallback(function(a0) {
return executeStateUpdate({type: type, value: a0});
}, [type, executeStateUpdate]), autoFocus: value, isClearable: true};
const TextInputComponentStyle = (require(1909) /* metro dependency 1909: Server */).TextInputComponentStyle;
const SMALL = TextInputComponentStyle.SMALL;
const r5 = SMALL === style ? ((TextField) => <TextField {...textAreaFieldProps} />)((require(6985) /* metro dependency 6985: TextFieldNative */).TextField) : (require(1909) /* metro dependency 1909: Server */).TextInputComponentStyle.PARAGRAPH !== style ? value3 : ((TextAreaField) => <TextAreaField {...textAreaFieldProps} />)((require(7687) /* metro dependency 7687: TextAreaFieldNative */).TextAreaField);
if (label == null) {
return r5;
} else {
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
return (
<Input
label={label}
required={required}
errorMessage={error}
>
{r5}
</Input>
function _fun120861(a0) { // fn#120861, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15947:140, offset: 0x02538653, size: 533 bytes, params: 2, frame: 26
const type = a0.type;
const style = a0.style;
const label = a0.label;
const placeholder = a0.placeholder;
const required = a0.required;
const maxLength = a0.maxLength;
let value = a0.value;
const value3 = undefined;
value = (require(8357) /* metro dependency 8357: ComponentStateContext */).useComponentState(a0,
value != null ? {type: type, value: value} : value3);
const state = value.state;
const executeStateUpdate = value.executeStateUpdate;
const executeStateUpdate2 = executeStateUpdate;
const error = value.error;
const useIsFirstTextInputInModal = (InteractionModalUtilsModule).useIsFirstTextInputInModal;
value = Reflect.apply(useIsFirstTextInputInModal, value, [a0.id]);
const textAreaFieldProps = {placeholder: placeholder, maxLength: maxLength,
status: error != null ? 'error' : 'default', defaultValue: state(executeStateUpdate2.useState(function() {
return state?.type === type ? state.value : value;
}), 1)[0], onChange: executeStateUpdate2.useCallback(function(a0) {
return executeStateUpdate({type: type, value: a0});
}, [type, executeStateUpdate]), autoFocus: value, isClearable: true};
const TextInputComponentStyle = (require(1909) /* metro dependency 1909: Server */).TextInputComponentStyle;
const SMALL = TextInputComponentStyle.SMALL;
const r5 = (
SMALL === style
? ((TextField) => <TextField {...textAreaFieldProps} />)((require(6985) /* metro dependency 6985: TextFieldNative */).TextField)
: (
(require(1909) /* metro dependency 1909: Server */).TextInputComponentStyle.PARAGRAPH !== style
? value3
: ((TextAreaField) => <TextAreaField {...textAreaFieldProps} />)((require(7687) /* metro dependency 7687: TextAreaFieldNative */).TextAreaField)
)
);
if (label == null) {
return r5;
} else {
const Input = (require(7682) /* metro dependency 7682: InputNative */).Input;
return (
<Input
label={label}
required={required}
errorMessage={error}
>
{r5}
</Input>
);
}
}
}
global.__d(_fun120860, 15739, [57, 31, 33, 8357, 15736, 1909, 6985, 7687, 7682,
2]) /* metro module 15739, dependencies: [57, 31, 33, 8357, 15736, 1909, 6985, 7687, 7682, 2] */;