decord/source/modules/chat_input/native/ChatInput.tsx

1393 lines
57 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 11145
// Function ID: 11146
2026-07-25 08:10:48 +00:00
// Name: ChatInput
2026-08-15 05:55:55 +00:00
// Dependencies: [5, 32, 19, 17, 7527, 11146, 10046, 7434, 11147, 4825, 7435, 4021, 4824, 8682, 11149, 676, 1499, 1925, 1624, 21, 4661, 712, 500, 1367, 4194, 4097, 11150, 11151, 589, 7234, 7139, 7508, 11153, 4115, 4239, 8446, 11157, 11158, 11159, 5389, 1231, 1628, 11206, 4838, 8466, 4829, 514, 4343, 698, 1627, 5042, 8701, 11207, 11371, 10269, 4237, 1891, 11372, 9299, 9959, 11392, 10284, 8462, 11395, 11396, 4052, 11414, 11415, 11416, 11417, 11425, 11426, 688, 11427, 11428, 11432, 11434, 11450, 11454, 11457, 11557, 11559, 11577, 11593, 11597, 11599, 11600, 11352, 11601, 2]
2026-07-20 16:05:17 +00:00
2026-08-15 05:55:55 +00:00
// Module 11145 (ChatInput)
2026-07-23 10:11:24 +00:00
import INITIAL_STATE from "INITIAL_STATE";
2026-07-29 08:29:29 +00:00
import getChatInputMaxHeight from "getChatInputMaxHeight";
import importAllResult from "jsxProd";
2026-08-12 06:57:52 +00:00
import get_ActivityIndicator from "set";
2026-07-29 08:29:29 +00:00
import handleInit from "handleInit";
2026-08-12 06:57:52 +00:00
import closure_10 from "INITIAL_STATE";
2026-07-29 08:29:29 +00:00
import initialize from "initialize";
import getState from "getState";
2026-07-23 10:11:24 +00:00
import { useVoiceMessagesUIStore } from "VoiceMessageRecordingStatus";
2026-07-29 08:29:29 +00:00
import handleChanged from "handleChanged";
import { DraftType } from "handleChanged";
2026-08-12 06:57:52 +00:00
import closure_16 from "initialize";
2026-07-29 08:29:29 +00:00
import getUncachedChannelPermissions from "getUncachedChannelPermissions";
import map from "map";
import updateChatInputContainerHeight from "updateChatInputContainerHeight";
2026-07-23 10:11:24 +00:00
import TextAreaCta from "TextAreaCta";
import ME from "ME";
import { AppLauncherRouteName } from "APP_LAUNCHER_BUILT_IN_SECTION_ICON";
import { EmojiInteractionPoint } from "set";
import DRAG_HANDLE from "DRAG_HANDLE";
2026-07-29 08:29:29 +00:00
import jsxProd from "Themes";
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
let closure_19;
let closure_20;
let closure_21;
let closure_22;
let closure_23;
let closure_24;
let closure_25;
let closure_26;
let closure_27;
let closure_28;
let closure_29;
2026-08-12 06:57:52 +00:00
let closure_30;
2026-07-23 10:11:24 +00:00
let closure_33;
let closure_34;
let closure_35;
let closure_36;
2026-08-12 06:57:52 +00:00
let closure_37;
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-12 06:57:52 +00:00
({ View: error, findNodeHandle: metroImportAll } = get_ActivityIndicator);
({ updateShowingAutoComplete: closure_19, useChatIsAtBottom: closure_20, useChatShowingAutoComplete: closure_21 } = updateChatInputContainerHeight);
({ CHAT_INPUT_HORIZONTAL_PADDING: closure_22, CHAT_INPUT_HORIZONTAL_PADDING_PARENT: closure_23, ChatInputActionType: closure_24 } = TextAreaCta);
({ AnalyticEvents: closure_25, ChannelTypesSets: closure_26, ChatInputComponentViewedTypes: closure_27, ComponentActions: closure_28, MAX_UPLOAD_COUNT: closure_29, Permissions: closure_30 } = ME);
({ InAppCameraUsedCameraPreviewTypes: closure_33, MediaKeyboardTarget: closure_34 } = DRAG_HANDLE);
({ jsx: closure_35, jsxs: closure_36, Fragment: closure_37 } = jsxProd);
let closure_38 = createCacheKey.createStyles((arg0, arg1, arg2) => {
let obj = { position: "relative", paddingVertical: importDefault(712).space.PX_8, paddingHorizontal: closure_22 - closure_23, backgroundColor: null, borderTopWidth: 1, borderColor: null };
2026-07-20 16:05:17 +00:00
let BACKGROUND_BASE_LOW = arg0;
2026-07-29 08:29:29 +00:00
if (arg0 == null) {
BACKGROUND_BASE_LOW = tmp(712).colors.BACKGROUND_BASE_LOW;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { container: null, containerInner: null, inputDefault: null, input: null, rightAccessory: null, refreshButtonAlignment: null, accessories: null, floatingContainer: null, floatingInputBox: null, floatingInputBoxPressed: null, floatingInputBoxTyping: null, floatingMainContents: null, inputFlat: null, floatingScrimOverlap: null, overflowVisible: null };
obj[3] = BACKGROUND_BASE_LOW;
obj[5] = importDefault(712).colors.BORDER_SUBTLE;
obj[0] = obj;
obj[1] = { flexDirection: "row", alignItems: "flex-end" };
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-23 10:11:24 +00:00
const merged = Object.assign(arg1 ? { alignSelf: "stretch", marginLeft: 0, marginTop: 0 } : { flex: 1, marginLeft: 6 });
2026-07-29 08:29:29 +00:00
obj[2] = obj;
const obj1 = { flexDirection: "row", alignItems: "stretch", borderRadius: importDefault(712).modules.mobile.CHAT_INPUT_BORDER_RADIUS, paddingHorizontal: importDefault(712).modules.mobile.CHAT_INPUT_PILL_PADDING, marginHorizontal: importDefault(712).modules.mobile.CHAT_INPUT_PILL_MARGIN_HORIZONTAL, overflow: "hidden", flex: 1, borderWidth: importDefault(712).modules.mobile.CHAT_INPUT_PILL_BORDER_WIDTH, borderColor: importDefault(712).colors.INPUT_BORDER_DEFAULT, backgroundColor: null };
2026-07-20 16:05:17 +00:00
if (null != arg0) {
2026-07-29 08:29:29 +00:00
let CHAT_INPUT_BACKGROUND = tmp(712).colors.CARD_SECONDARY_BG;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
CHAT_INPUT_BACKGROUND = tmp(712).colors.CHAT_INPUT_BACKGROUND;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj1[9] = CHAT_INPUT_BACKGROUND;
obj[3] = obj1;
obj[4] = { flexDirection: "column", justifyContent: "flex-end", alignItems: "center", paddingVertical: importDefault(712).modules.mobile.CHAT_INPUT_PILL_PADDING };
const obj2 = { flexDirection: "column", justifyContent: "flex-end", alignItems: "center", paddingVertical: importDefault(712).modules.mobile.CHAT_INPUT_PILL_PADDING };
2026-07-23 10:11:24 +00:00
const tmp3 = arg1 ? { alignSelf: "stretch", marginLeft: 0, marginTop: 0 } : { flex: 1, marginLeft: 6 };
2026-07-29 08:29:29 +00:00
obj[5] = { marginBottom: importDefault(712).modules.mobile.CHAT_INPUT_PILL_BORDER_WIDTH };
obj[6] = { position: "absolute", bottom: "100%", left: 0, right: 0 };
const obj3 = { marginBottom: importDefault(712).modules.mobile.CHAT_INPUT_PILL_BORDER_WIDTH };
obj[7] = { borderTopWidth: 0, borderColor: "transparent", borderRadius: importDefault(712).radii.none, backgroundColor: "transparent", paddingHorizontal: importDefault(712).modules.mobile.CHAT_INPUT_CONTAINER_HORIZONTAL_PADDING, paddingVertical: 0, overflow: "visible" };
const obj4 = { borderTopWidth: 0, borderColor: "transparent", borderRadius: importDefault(712).radii.none, backgroundColor: "transparent", paddingHorizontal: importDefault(712).modules.mobile.CHAT_INPUT_CONTAINER_HORIZONTAL_PADDING, paddingVertical: 0, overflow: "visible" };
obj[8] = { backgroundColor: importDefault(712).colors.MOBILE_CHATINPUT_BACKGROUND_DEFAULT, borderWidth: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH, borderColor: importDefault(712).colors.MOBILE_CHATINPUT_BORDER_DEFAULT, borderRadius: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_BORDER_RADIUS, flexDirection: "column", overflow: "hidden" };
const obj5 = { backgroundColor: importDefault(712).colors.MOBILE_CHATINPUT_BACKGROUND_DEFAULT, borderWidth: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_ACCESSORY_BORDER_WIDTH, borderColor: importDefault(712).colors.MOBILE_CHATINPUT_BORDER_DEFAULT, borderRadius: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_BORDER_RADIUS, flexDirection: "column", overflow: "hidden" };
obj[9] = { backgroundColor: importDefault(712).colors.MOBILE_CHATINPUT_BACKGROUND_ACTIVE, borderColor: importDefault(712).colors.MOBILE_CHATINPUT_BORDER_ACTIVE };
obj[10] = { shadowOpacity: 0, elevation: 0 };
const obj6 = { backgroundColor: importDefault(712).colors.MOBILE_CHATINPUT_BACKGROUND_ACTIVE, borderColor: importDefault(712).colors.MOBILE_CHATINPUT_BORDER_ACTIVE };
obj[11] = { flexDirection: "row", alignItems: "flex-end", paddingHorizontal: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_CONTENT_PADDING_HORIZONTAL, paddingVertical: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_CONTENT_PADDING_VERTICAL, gap: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_CONTENT_GAP };
const obj7 = { flexDirection: "row", alignItems: "flex-end", paddingHorizontal: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_CONTENT_PADDING_HORIZONTAL, paddingVertical: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_CONTENT_PADDING_VERTICAL, gap: importDefault(712).modules.mobile.CHAT_INPUT_FLOATING_CONTENT_GAP };
2026-07-20 16:05:17 +00:00
let num = -6;
2026-07-29 08:29:29 +00:00
if (obj11.isAndroid()) {
2026-07-20 16:05:17 +00:00
num = -5;
}
2026-07-29 08:29:29 +00:00
obj[12] = { flex: 1, justifyContent: "center", marginLeft: num };
obj[13] = { marginTop: -arg2 / 2 };
obj[14] = { overflow: "visible" };
2026-07-20 16:05:17 +00:00
return obj;
});
2026-08-12 06:57:52 +00:00
let closure_39 = { code: "function ChatInputTsx1(){const{textFieldHeight}=this.__closure;return{minHeight:textFieldHeight.get()};}" };
2026-07-20 16:05:17 +00:00
const forwardRefResult = importAllResult.forwardRef((channel, ref) => {
let accessibilityLabel;
2026-08-14 17:33:39 +00:00
let c2;
2026-07-20 16:05:17 +00:00
let canCreateThreads;
let canMentionEveryone;
let canSendVoiceMessage;
let canUpload;
let chatInputFloating;
let editable;
let enabled;
2026-07-29 08:29:29 +00:00
let floatingInputBoxPressed;
2026-07-20 16:05:17 +00:00
let isResourceChannel;
let onJumpToPresent;
let placeholder;
let screenIndex;
let secondaryTextFieldRef;
let setNoExtractUI;
let threadCreationCallback;
channel = channel.channel;
({ screenIndex, threadCreationCallback, onJumpToPresent } = channel);
2026-07-23 10:11:24 +00:00
ref = undefined;
2026-08-14 17:33:39 +00:00
c2 = undefined;
let dependencyMap;
2026-07-23 10:11:24 +00:00
let stateFromStores;
let stateFromStores1;
editable = undefined;
2026-08-14 17:33:39 +00:00
let c7;
2026-07-23 10:11:24 +00:00
let sharedValue;
2026-08-14 17:33:39 +00:00
let sharedValue1;
let callback;
2026-07-23 10:11:24 +00:00
let memo1;
2026-08-12 06:57:52 +00:00
let registerViewTag;
let unregisterViewTag;
2026-08-14 17:33:39 +00:00
let handleChanged;
2026-08-12 06:57:52 +00:00
let tmp = channel;
2026-07-20 16:05:17 +00:00
({ isResourceChannel, setNoExtractUI, secondaryTextFieldRef } = channel);
2026-08-14 17:33:39 +00:00
let obj = channel(1367);
2026-07-29 08:29:29 +00:00
const mobileVisualRefreshConfig = obj.useMobileVisualRefreshConfig({ location: "ChatInput" });
2026-07-20 16:05:17 +00:00
({ enabled, chatInputFloating } = mobileVisualRefreshConfig);
2026-08-15 05:55:55 +00:00
let obj1 = channel(4194);
const gradientValue = obj1.useGradientValue(channel(4194).GradientPercentage.END);
let obj2 = channel(4097);
2026-08-14 17:33:39 +00:00
const token = obj2.useToken(ref(712).modules.mobile.CHAT_INPUT_ACTION_BUTTON_SIZE);
2026-08-15 05:55:55 +00:00
let obj3 = channel(4097);
2026-08-14 17:33:39 +00:00
let result = (obj3.useToken(ref(712).modules.mobile.CHAT_INPUT_SEND_BUTTON_HEIGHT) - token) / 2;
2026-08-15 05:55:55 +00:00
let obj4 = channel(4097);
2026-08-14 17:33:39 +00:00
const token1 = obj4.useToken(ref(712).modules.mobile.CHAT_INPUT_FLOATING_SCRIM_GRADIENT_HEIGHT);
2026-08-12 06:57:52 +00:00
const tmp9 = callback6(gradientValue, chatInputFloating, token1);
2026-08-15 05:55:55 +00:00
let obj5 = channel(4097);
2026-07-29 08:29:29 +00:00
let token2 = gradientValue;
if (gradientValue == null) {
2026-08-14 17:33:39 +00:00
token2 = obj5.useToken(ref(712).colors.BACKGROUND_BASE_LOWER);
2026-07-20 16:05:17 +00:00
}
2026-08-15 05:55:55 +00:00
let tmpResult = tmp(4097);
2026-08-14 17:33:39 +00:00
const token3 = tmpResult.useToken(tmp5(712).modules.mobile.CHAT_INPUT_FLOATING_TYPING_GRADIENT_HEIGHT_REDUCED);
2026-08-15 05:55:55 +00:00
tmpResult = tmp(4097);
2026-08-14 17:33:39 +00:00
const token4 = tmpResult.useToken(tmp5(712).modules.mobile.CHAT_INPUT_FLOATING_INLINE_FULL_GRADIENT_HEIGHT);
let obj9 = editable;
2026-08-15 05:55:55 +00:00
const token5 = tmp(4097).useToken(tmp5(712).modules.mobile.CHAT_INPUT_FLOATING_SCRIM_GRADIENT_HEIGHT_AT_BOTTOM);
2026-08-14 17:33:39 +00:00
ref = editable.useRef(chatInputFloating);
2026-07-20 16:05:17 +00:00
ref.current = chatInputFloating;
2026-08-15 05:55:55 +00:00
const tmpResult1 = tmp(4097);
2026-08-14 17:33:39 +00:00
[floatingInputBoxPressed, c2] = stateFromStores1(editable.useState(false), 2);
2026-07-20 16:05:17 +00:00
if (chatInputFloating) {
2026-08-15 05:55:55 +00:00
let tmp5Result = tmp5(11150);
2026-07-20 16:05:17 +00:00
} else {
2026-08-14 17:33:39 +00:00
tmp5Result = c7;
2026-07-20 16:05:17 +00:00
}
2026-08-14 17:33:39 +00:00
dependencyMap = tmp17;
let tmp15 = stateFromStores1(editable.useState(false), 2);
2026-07-29 08:29:29 +00:00
const tmp18 = channel.isPrivate() && null == threadCreationCallback;
2026-08-14 17:33:39 +00:00
const tmp19 = callback((channelId) => channelId.channelId === channel.id);
2026-08-15 05:55:55 +00:00
const typingUserIds = tmp(11151).useTypingUserIds(channel.id, 1);
2026-07-20 16:05:17 +00:00
let floatingInputBoxTyping = chatInputFloating;
2026-08-15 05:55:55 +00:00
const tmpResult2 = tmp(11151);
2026-07-20 16:05:17 +00:00
if (chatInputFloating) {
floatingInputBoxTyping = channel.rateLimitPerUser > 0 || typingUserIds.length > 0;
2026-07-29 08:29:29 +00:00
let tmp21 = channel.rateLimitPerUser > 0 || typingUserIds.length > 0;
2026-07-20 16:05:17 +00:00
}
if (floatingInputBoxTyping) {
2026-07-29 08:29:29 +00:00
floatingInputBoxTyping = !tmp20;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
const tmp22 = callback2(screenIndex);
2026-07-29 08:29:29 +00:00
let tmp23 = token1;
if (tmp22) {
tmp23 = token5;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp24 = token4;
if (tmp22) {
tmp24 = token3;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
tmp20 = callback3(screenIndex);
const items = [closure_16];
2026-08-14 17:33:39 +00:00
stateFromStores = tmp(589).useStateFromStores(items, () => {
2026-07-20 16:05:17 +00:00
let editingTextValue = null;
2026-08-14 17:33:39 +00:00
if (!c3) {
2026-08-12 06:57:52 +00:00
editingTextValue = outer1_16.getEditingTextValue(channel.id);
2026-07-20 16:05:17 +00:00
}
return editingTextValue;
});
2026-08-14 17:33:39 +00:00
const tmpResult3 = tmp(589);
const items1 = [registerViewTag];
stateFromStores1 = tmp(589).useStateFromStores(items1, () => {
2026-07-20 16:05:17 +00:00
let pendingReply;
2026-08-14 17:33:39 +00:00
if (!c3) {
pendingReply = registerViewTag.getPendingReply(channel.id);
2026-07-20 16:05:17 +00:00
}
return pendingReply;
});
2026-08-14 17:33:39 +00:00
const tmpResult4 = tmp(589);
2026-07-29 08:29:29 +00:00
const items2 = [map];
2026-08-14 17:33:39 +00:00
let stateFromStores2 = tmp(589).useStateFromStores(items2, () => {
if (c3) {
2026-07-20 16:05:17 +00:00
return false;
} else {
2026-08-14 17:33:39 +00:00
const uploads = outer1_18.getUploads(channel.id, outer1_15.ChannelMessage);
2026-07-20 16:05:17 +00:00
let tmp5 = null != uploads;
if (tmp5) {
tmp5 = uploads.length > 0;
}
return tmp5;
}
});
const items3 = [channel.id, null != threadCreationCallback];
2026-07-29 08:29:29 +00:00
let memo = stateFromStores;
if (stateFromStores == null) {
2026-08-14 17:33:39 +00:00
memo = obj9.useMemo(() => ref.getDraft(channel.id, c3 ? outer1_15.FirstThreadMessage : outer1_15.ChannelMessage), items3);
2026-07-20 16:05:17 +00:00
}
2026-08-14 17:33:39 +00:00
const tmpResult5 = tmp(589);
2026-07-29 08:29:29 +00:00
const items4 = [getUncachedChannelPermissions];
2026-07-20 16:05:17 +00:00
const items5 = [channel, null != threadCreationCallback];
2026-08-14 17:33:39 +00:00
const stateFromStoresObject = tmp(589).useStateFromStoresObject(items4, () => {
2026-08-12 06:57:52 +00:00
let obj = outer1_17;
let canResult1 = outer1_17.can(outer1_30.MENTION_EVERYONE, channel);
const canResult = outer1_17.can(outer1_30.ATTACH_FILES, channel);
const canResult2 = outer1_17.can(outer1_30.SEND_MESSAGES, channel);
const canResult3 = outer1_17.can(outer1_30.SEND_VOICE_MESSAGES, channel);
const tmp6 = outer1_17.can(outer1_30.CREATE_PUBLIC_THREADS, channel) || obj.can(outer1_30.CREATE_PRIVATE_THREADS, channel);
2026-07-29 08:29:29 +00:00
let isPrivateResult = obj2.isPrivate();
2026-08-12 06:57:52 +00:00
const canResult4 = obj.can(outer1_30.SEND_MESSAGES_IN_THREADS, channel);
2026-07-29 08:29:29 +00:00
let tmp11 = canResult4;
2026-08-14 17:33:39 +00:00
const isReadOnlyThread = channel(_undefined[29]).computeIsReadOnlyThread(obj2);
if (!_undefined) {
2026-07-20 16:05:17 +00:00
let tmp12 = isPrivateResult;
if (!isPrivateResult) {
tmp12 = canResult2;
}
2026-07-29 08:29:29 +00:00
tmp11 = tmp12;
}
let tmp13 = !tmp11;
if (tmp11) {
tmp13 = isReadOnlyThread;
2026-07-20 16:05:17 +00:00
}
let tmp14 = isPrivateResult;
if (!isPrivateResult) {
if (canResult1) {
canResult1 = !tmp13;
}
tmp14 = canResult1;
}
if (tmp14) {
2026-07-29 08:29:29 +00:00
tmp14 = !tmp10;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { canMentionEveryone: tmp14, canUpload: null, canSendVoiceMessage: null, editable: null, canCreateThreads: null };
let tmp15 = isPrivateResult;
2026-07-20 16:05:17 +00:00
if (!isPrivateResult) {
2026-07-29 08:29:29 +00:00
tmp15 = canResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp15) {
tmp15 = !tmp13;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp15) {
tmp15 = !tmp10;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[1] = tmp15;
2026-07-20 16:05:17 +00:00
if (!isPrivateResult) {
isPrivateResult = canResult3;
}
if (isPrivateResult) {
isPrivateResult = !tmp13;
}
if (isPrivateResult) {
2026-07-29 08:29:29 +00:00
isPrivateResult = !tmp10;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = isPrivateResult;
obj[3] = !tmp13;
obj[4] = tmp6;
2026-07-20 16:05:17 +00:00
return obj;
}, items5);
({ canUpload, editable } = stateFromStoresObject);
({ canMentionEveryone, canSendVoiceMessage, canCreateThreads } = stateFromStoresObject);
2026-08-15 05:55:55 +00:00
const analyticsLocations = tmp5(7139)().analyticsLocations;
2026-07-29 08:29:29 +00:00
let tmp30 = tmp17;
2026-07-20 16:05:17 +00:00
if (null == threadCreationCallback) {
2026-07-29 08:29:29 +00:00
tmp30 = null != stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp30) {
2026-08-15 05:55:55 +00:00
tmp30 = !tmp(7234).getIsActiveChannelOrUnarchivableThread(channel);
const tmpResult7 = tmp(7234);
2026-07-20 16:05:17 +00:00
}
2026-08-14 17:33:39 +00:00
const tmpResult6 = tmp(589);
2026-08-15 05:55:55 +00:00
let canStartThread = tmp(7234).useCanStartThread(channel);
2026-07-20 16:05:17 +00:00
if (canStartThread) {
const GUILD_THREADS_ONLY = constants.GUILD_THREADS_ONLY;
canStartThread = !GUILD_THREADS_ONLY.has(channel.type);
}
if (canStartThread) {
2026-07-29 08:29:29 +00:00
canStartThread = !tmp17;
2026-07-20 16:05:17 +00:00
}
2026-08-15 05:55:55 +00:00
const tmpResult8 = tmp(7234);
const tmp34 = tmp(7508).useCanPostPollsInChannel(channel) && null == threadCreationCallback;
const tmpResult9 = tmp(7508);
const token6 = tmp(4097).useToken(tmp5(712).modules.mobile.CHAT_INPUT_PILL_BORDER_WIDTH);
2026-07-20 16:05:17 +00:00
if (enabled) {
let diff = token - 2 * token6;
} else {
2026-08-15 05:55:55 +00:00
diff = tmp(11153).getChatInputMinHeight();
const tmpResult11 = tmp(11153);
2026-07-20 16:05:17 +00:00
}
if (chatInputFloating) {
2026-08-14 17:33:39 +00:00
diff = token;
2026-07-20 16:05:17 +00:00
}
2026-08-14 17:33:39 +00:00
c7 = diff;
2026-08-15 05:55:55 +00:00
const tmpResult10 = tmp(4097);
sharedValue = tmp(4115).useSharedValue(diff);
const tmpResult12 = tmp(4115);
sharedValue1 = tmp(4115).useSharedValue(diff);
2026-08-14 17:33:39 +00:00
const items6 = [sharedValue1, diff, sharedValue];
2026-07-29 08:29:29 +00:00
const effect = obj9.useEffect(() => {
2026-08-14 17:33:39 +00:00
const result = sharedValue.set(c7);
const result1 = sharedValue1.set(c7);
2026-07-20 16:05:17 +00:00
}, items6);
2026-08-15 05:55:55 +00:00
const tmp40 = ref(4239)();
2026-08-14 17:33:39 +00:00
const tmp41 = unregisterViewTag((startTimeMillis) => null != startTimeMillis.startTimeMillis);
2026-07-29 08:29:29 +00:00
let result2 = !tmp17;
2026-07-20 16:05:17 +00:00
let isAppLauncherEnabled = result2;
if (null == threadCreationCallback) {
2026-08-15 05:55:55 +00:00
isAppLauncherEnabled = tmp(8446).getIsAppLauncherEnabled(channel);
const tmpResult14 = tmp(8446);
2026-07-20 16:05:17 +00:00
}
2026-08-15 05:55:55 +00:00
const tmpResult13 = tmp(4115);
2026-08-14 17:33:39 +00:00
const items7 = [sharedValue1];
const stateFromStores3 = tmp(589).useStateFromStores(items7, () => sharedValue1.getActiveCommand(channel.id));
2026-07-29 08:29:29 +00:00
obj = { channel, isReadonly: !editable, isCreatingThread: tmp17 };
2026-08-14 17:33:39 +00:00
const tmpResult15 = tmp(589);
2026-07-29 08:29:29 +00:00
let num2 = 8;
2026-08-15 05:55:55 +00:00
({ placeholder, accessibilityLabel } = ref(11157)(obj));
2026-07-20 16:05:17 +00:00
if (enabled) {
2026-07-29 08:29:29 +00:00
num2 = 5;
2026-07-20 16:05:17 +00:00
}
2026-08-15 05:55:55 +00:00
const tmp45 = ref(11157)(obj);
2026-08-14 17:33:39 +00:00
class Ye {
constructor() {
obj = { minHeight: c9.get() };
return obj;
}
2026-07-20 16:05:17 +00:00
}
2026-08-14 17:33:39 +00:00
Ye.__closure = { textFieldHeight: sharedValue1 };
Ye.__workletHash = 11048691841625;
Ye.__initData = closure_39;
2026-08-15 05:55:55 +00:00
const animatedStyle = tmp(4115).useAnimatedStyle(Ye);
2026-07-29 08:29:29 +00:00
const ref1 = obj9.useRef(null);
2026-08-15 05:55:55 +00:00
const tmpResult16 = tmp(4115);
2026-07-20 16:05:17 +00:00
obj = { disabled: !editable };
2026-08-15 05:55:55 +00:00
const refreshChatInputCoachmark = tmp(11158).useRefreshChatInputCoachmark(obj);
2026-08-14 17:33:39 +00:00
obj1 = { chatInputProps: { analyticsLocations, canUpload, channel, defaultValue: memo, hasAttachmentsToUpload: stateFromStores2, pendingEdit: stateFromStores, pendingReply: stateFromStores1, screenIndex, secondaryTextFieldRef, threadCreationCallback }, chatInputTextFieldHeight: sharedValue1, ref };
2026-08-15 05:55:55 +00:00
const tmp49 = ref(11159)(obj1);
2026-08-14 17:33:39 +00:00
callback = tmp49;
2026-07-29 08:29:29 +00:00
const items8 = [tmp49];
const effect1 = obj9.useEffect(() => {
2026-08-14 17:33:39 +00:00
const current = _undefined2.chatInput.current;
current.setText(_undefined2.props.current.defaultValue);
2026-07-20 16:05:17 +00:00
}, items8);
2026-07-29 08:29:29 +00:00
const items9 = [tmp49, channel, stateFromStores, stateFromStores1];
const effect2 = obj9.useEffect(() => {
2026-08-14 17:33:39 +00:00
const current = _undefined2.propsPrev.current;
2026-07-20 16:05:17 +00:00
const pendingEdit = current.pendingEdit;
2026-07-29 08:29:29 +00:00
let tmp2 = null == current.pendingReply;
if (tmp2) {
tmp2 = null != stateFromStores1;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp2) {
let tmp4 = null == pendingEdit;
if (tmp4) {
tmp4 = null != stateFromStores;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2 = tmp4;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
const current2 = tmp.chatInput.current;
if (current2 != null) {
2026-07-20 16:05:17 +00:00
current2.focus();
}
}
2026-07-29 08:29:29 +00:00
const id = tmp.propsPrev.current.channel.id;
2026-07-20 16:05:17 +00:00
if (id !== channel.id) {
2026-08-14 17:33:39 +00:00
if (id !== channel(_undefined[39]).FAKE_PLACEHOLDER_PRIVATE_CHANNEL_ID) {
2026-07-29 08:29:29 +00:00
const current4 = tmp.chatInput.current;
if (current4 != null) {
current4.setText(tmp.props.current.defaultValue);
2026-07-20 16:05:17 +00:00
}
}
}
if (pendingEdit !== stateFromStores) {
2026-07-29 08:29:29 +00:00
const current3 = tmp.chatInput.current;
if (current3 != null) {
2026-07-20 16:05:17 +00:00
let str = "";
2026-07-29 08:29:29 +00:00
if (null != tmp9) {
str = tmp9;
2026-07-20 16:05:17 +00:00
}
current3.setText(str);
}
}
}, items9);
2026-07-29 08:29:29 +00:00
const items10 = [tmp49];
const effect3 = obj9.useEffect(() => {
2026-07-20 16:05:17 +00:00
function handleOpenKeyboard(channelId) {
channelId = undefined;
2026-07-29 08:29:29 +00:00
if (channelId != null) {
2026-07-20 16:05:17 +00:00
channelId = channelId.channelId;
}
2026-07-29 08:29:29 +00:00
const current = props.props.current;
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
id = current.channel.id;
}
if (channelId === id) {
2026-07-29 08:29:29 +00:00
const current2 = props.chatInput.current;
if (current2 != null) {
2026-07-20 16:05:17 +00:00
current2.openSystemKeyboard();
}
}
}
2026-08-14 17:33:39 +00:00
let ComponentDispatch = channel(_undefined[40]).ComponentDispatch;
2026-08-12 06:57:52 +00:00
const subscription = ComponentDispatch.subscribe(outer1_28.TEXTAREA_FOCUS, handleOpenKeyboard);
2026-07-20 16:05:17 +00:00
return () => {
2026-08-14 17:33:39 +00:00
const ComponentDispatch = channel(table[40]).ComponentDispatch;
2026-08-12 06:57:52 +00:00
ComponentDispatch.unsubscribe(outer2_28.TEXTAREA_FOCUS, handleOpenKeyboard);
2026-07-20 16:05:17 +00:00
};
}, items10);
2026-08-14 17:33:39 +00:00
const items11 = [tmp49, sharedValue];
2026-07-29 08:29:29 +00:00
memo1 = obj9.useMemo(() => {
2026-07-23 10:11:24 +00:00
let obj = {
2026-07-20 16:05:17 +00:00
handleBlur(nativeEvent) {
2026-07-29 08:29:29 +00:00
let obj = callback(outer1_3[41]);
2026-07-20 16:05:17 +00:00
const result = obj.setIsAnyChatInputFocused(false);
2026-08-14 17:33:39 +00:00
const result1 = initialize.handleTextOrFocusChange(str, false);
closure_10.state.current.focused = false;
2026-07-29 08:29:29 +00:00
callback2(false);
2026-08-14 17:33:39 +00:00
const current = closure_10.chatInputCover.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.focused(false);
}
2026-07-29 08:29:29 +00:00
const current2 = tmp3.chatInputAppCommandManager.current;
if (current2 != null) {
2026-07-20 16:05:17 +00:00
current2.updateState();
}
2026-07-29 08:29:29 +00:00
const current3 = tmp3.chatInputAutocomplete.current;
if (current3 != null) {
obj = { focused: false, text: null, selectionStart: null, selectionEnd: null };
obj[1] = str;
obj[2] = tmp3.state.current.selectionStart;
obj[3] = tmp3.state.current.selectionEnd;
2026-07-20 16:05:17 +00:00
current3.setData(obj);
}
2026-07-29 08:29:29 +00:00
const current4 = tmp3.chatInputSendButton.current;
if (current4 != null) {
2026-07-20 16:05:17 +00:00
current4.setHasText(str.trim().length > 0);
}
},
handleFocus(nativeEvent) {
let end;
let start;
({ start, end } = nativeEvent.nativeEvent);
2026-07-29 08:29:29 +00:00
let obj = callback(outer1_3[41]);
2026-07-20 16:05:17 +00:00
const result = obj.setIsAnyChatInputFocused(true);
2026-08-14 17:33:39 +00:00
closure_10.state.current.focused = true;
2026-07-29 08:29:29 +00:00
callback2(true);
2026-08-14 17:33:39 +00:00
closure_10.state.current.selectionStart = start;
closure_10.state.current.selectionEnd = end;
const result1 = initialize.handleTextOrFocusChange(closure_10.state.current.text, true);
const current = closure_10.chatInputAppCommandManager.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.updateState();
}
2026-07-29 08:29:29 +00:00
const current2 = tmp2.chatInputCover.current;
if (current2 != null) {
2026-07-20 16:05:17 +00:00
current2.focused(true);
}
2026-07-29 08:29:29 +00:00
const current3 = tmp2.chatInputAutocomplete.current;
if (current3 != null) {
obj = { focused: true, text: null, selectionStart: null, selectionEnd: null };
obj[1] = tmp2.state.current.text;
obj[2] = start;
obj[3] = end;
2026-07-20 16:05:17 +00:00
current3.setData(obj);
}
},
handleChangeContentSize(nativeEvent) {
const height = nativeEvent.nativeEvent.height;
2026-08-14 17:33:39 +00:00
closure_10.state.current.textFieldContentSize = height;
2026-08-12 06:57:52 +00:00
if (!obj.getIsChatInputHeightWorkletEnabled()) {
2026-08-14 17:33:39 +00:00
const textFieldHeight = closure_10.state.current.textFieldHeight;
const result = textFieldHeight.set(callback(outer1_3[32]).getChatInputHeightAnimationTiming(height, store.get()));
2026-08-12 06:57:52 +00:00
const tmp2Result = callback(outer1_3[32]);
}
2026-07-20 16:05:17 +00:00
},
handleLayoutOfInputContainer(arg0) {
2026-08-14 17:33:39 +00:00
const current = closure_10.chatInputAutocomplete.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.setChatInputHeight(tmp.layout.height);
}
},
handleLayout(nativeEvent) {
const layout = nativeEvent.nativeEvent.layout;
const height = layout.height;
if (tmp) {
2026-08-14 17:33:39 +00:00
if (null == closure_10.props.current.threadCreationCallback) {
const current = closure_10.chatInput.current;
2026-07-20 16:05:17 +00:00
const result = current.updateChatInputContainerHeightDebounced(height);
}
}
},
handleMaxHeightChanged() {
2026-08-12 06:57:52 +00:00
if (!obj.getIsChatInputHeightWorkletEnabled()) {
2026-08-14 17:33:39 +00:00
const textFieldContentSize = closure_10.state.current.textFieldContentSize;
2026-08-12 06:57:52 +00:00
if (0 !== textFieldContentSize) {
2026-08-14 17:33:39 +00:00
const textFieldHeight = closure_10.state.current.textFieldHeight;
const result = textFieldHeight.set(callback(outer1_3[32]).getChatInputHeightAnimationTiming(textFieldContentSize, store.get()));
2026-08-12 06:57:52 +00:00
const tmpResult = callback(outer1_3[32]);
}
2026-07-20 16:05:17 +00:00
}
},
handleChangeAutoCompleteVisibility(arg0) {
2026-08-14 17:33:39 +00:00
outer1_19(closure_10.props.current.screenIndex, arg0);
2026-07-20 16:05:17 +00:00
},
2026-07-29 08:29:29 +00:00
handlePasteCommand(arg0) {
2026-08-14 17:33:39 +00:00
if (closure_10.state.current.focused) {
2026-07-29 08:29:29 +00:00
const current = tmp2.chatInputAppCommandManager.current;
if (current != null) {
const applicationCommandManager = current.getApplicationCommandManager();
if (applicationCommandManager != null) {
applicationCommandManager.setPastedCommand(tmp, tmp2.props.current.channel);
}
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
},
handlePasteImage: null,
handlePressAction: null,
handlePollsPress: null,
handleAttachPress: null,
handlePressExpression: null,
handlePressSend: null,
handleSelectionOrTextChange: null,
handleTapAction: null,
handleTextOrFocusChange: null,
handleTextFlushed: null,
handleToggleKeyboard: null
};
2026-08-14 17:33:39 +00:00
let closure_0 = stateFromStores((arg0) => {
2026-07-29 08:29:29 +00:00
let closure_0 = arg0;
let c3 = 0;
let c4 = 0;
const iter = (function*(arg0) {
let c0;
let c1;
let c2;
let c3;
2026-08-12 06:57:52 +00:00
if (styles === 2) {
styles = 3;
HermesBuiltin.throwTypeError();
} else if (tmp4 === 3) {
2026-07-29 08:29:29 +00:00
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
2026-08-12 06:57:52 +00:00
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
2026-07-29 08:29:29 +00:00
} else {
2026-08-15 05:55:55 +00:00
return { value: "HermesInternal", done: "HermesInternal" };
2026-08-12 06:57:52 +00:00
}
} else {
try {
styles = 2;
if (0 === c3) {
if (arg0 === 1) {
styles = 3;
throw arg1;
} else if (arg0 === 2) {
styles = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
c2 = tmp5;
c1 = tmp2;
let lib;
c1 = undefined;
c2 = undefined;
c3 = undefined;
({ url: c0, width: c1, height: c2, type: c3 } = lib.nativeEvent);
styles = undefined;
c3 = 1;
2026-07-29 08:29:29 +00:00
styles = 1;
2026-08-12 06:57:52 +00:00
return { value: "ct", done: true };
}
} else {
if (1 === tmp5) {
if (arg0 === 1) {
styles = 3;
throw arg1;
} else if (arg0 === 2) {
styles = 3;
let obj1 = { value: null, done: true };
obj1[0] = arg1;
return obj1;
} else {
2026-08-14 17:33:39 +00:00
if (outer1_10.state.current.focused) {
if (outer1_10.props.current.canUpload) {
2026-08-12 06:57:52 +00:00
obj1 = lib(outer2_3[43]);
c3 = 2;
styles = 1;
const obj2 = { value: null, done: false };
obj2[0] = obj1.getImageDimensionsIfMissing(lib, outer1_1, outer1_2);
return obj2;
}
}
styles = 3;
}
} else if (arg0 === 1) {
styles = 3;
throw arg1;
} else if (arg0 !== 2) {
styles = arg1;
const obj3 = { channelId: null, file: null, draftType: null };
2026-08-14 17:33:39 +00:00
obj3[0] = outer1_10.props.current.channel.id;
2026-08-12 06:57:52 +00:00
const obj4 = { uri: null, originalUri: null, width: null, height: null, mimeType: null, platform: null, id: null };
obj4[0] = lib;
obj4[1] = lib;
obj4[2] = styles.width;
obj4[3] = styles.height;
obj4[4] = c3;
obj4[5] = lib(outer2_3[45]).UploadPlatform.REACT_NATIVE;
const obj7 = outer2_1(outer2_3[44]);
obj4[6] = lib(outer2_3[46]).v4();
obj3[1] = obj4;
obj3[2] = outer2_15.ChannelMessage;
obj7.addFile(obj3);
const obj10 = lib(outer2_3[46]);
2026-07-29 08:29:29 +00:00
}
2026-08-12 06:57:52 +00:00
styles = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
2026-07-29 08:29:29 +00:00
}
2026-08-12 06:57:52 +00:00
} catch (tmp16) {
styles = tmp;
throw tmp16;
2026-07-29 08:29:29 +00:00
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
})();
iter.next();
return iter;
});
obj[8] = function() {
const self = this;
const apply = closure_0.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-23 10:11:24 +00:00
};
2026-07-29 08:29:29 +00:00
obj[9] = function handlePressAction(arg0, arg1, current2) {
2026-08-12 06:57:52 +00:00
if (outer1_24.PHOTOS === arg1) {
const result = callback(outer1_3[47]).triggerHapticFeedback(callback(outer1_3[47]).HapticFeedbackTypes.IMPACT_LIGHT);
const obj21 = callback(outer1_3[47]);
2026-07-29 08:29:29 +00:00
let obj = { type: null, channel_id: null, guild_id: null };
2026-08-12 06:57:52 +00:00
obj[0] = outer1_27.ADD_BUTTON;
2026-08-14 17:33:39 +00:00
obj[1] = closure_10.props.current.channel.id;
obj[2] = closure_10.props.current.channel.guild_id;
2026-08-12 06:57:52 +00:00
outer1_1(outer1_3[48]).track(outer1_25.CHAT_INPUT_COMPONENT_VIEWED, obj);
2026-07-29 08:29:29 +00:00
if (ref.current) {
let tmp42Result = tmp42(tmp43[34]);
const keyboardType = tmp42Result.getKeyboardType();
2026-08-12 06:57:52 +00:00
if (keyboardType === tmp42(tmp43[49]).KeyboardTypes.APP_LAUNCHER) {
2026-07-29 08:29:29 +00:00
obj = { type: null };
2026-08-12 06:57:52 +00:00
obj[0] = tmp42(tmp43[49]).KeyboardTypes.APP_LAUNCHER;
2026-08-14 17:33:39 +00:00
initialize.handleToggleKeyboard(obj);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
tmp42Result = tmp42(tmp43[34]);
const keyboardType1 = tmp42Result.getKeyboardType();
2026-08-12 06:57:52 +00:00
if (keyboardType1 === callback(outer1_3[49]).KeyboardTypes.MEDIA) {
2026-07-29 08:29:29 +00:00
const current = tmp48.chatInputActions.current;
if (current != null) {
2026-07-20 16:05:17 +00:00
current.focusPhotosButton();
}
}
2026-07-29 08:29:29 +00:00
let obj1 = { type: null, context: null };
2026-08-12 06:57:52 +00:00
obj1[0] = callback(outer1_3[49]).KeyboardTypes.MEDIA;
2026-07-29 08:29:29 +00:00
let obj2 = { target: null };
2026-08-12 06:57:52 +00:00
obj2[0] = outer1_34.CHAT;
2026-07-29 08:29:29 +00:00
obj1[1] = obj2;
2026-08-14 17:33:39 +00:00
initialize.handleToggleKeyboard(obj1);
2026-08-12 06:57:52 +00:00
const obj22 = outer1_1(outer1_3[48]);
2026-08-14 17:33:39 +00:00
tmp48 = closure_10;
2026-07-29 08:29:29 +00:00
} else {
let tmp35 = current2;
if (tmp.APPS === arg1) {
2026-08-12 06:57:52 +00:00
const result1 = callback(outer1_3[47]).triggerHapticFeedback(callback(outer1_3[47]).HapticFeedbackTypes.IMPACT_LIGHT);
const obj12 = callback(outer1_3[47]);
callback(outer1_3[50]).trackWithMetadata(outer1_25.APP_LAUNCHER_ENTRYPOINT_BUTTON_CLICKED);
const obj13 = callback(outer1_3[50]);
2026-07-29 08:29:29 +00:00
const obj3 = { type: null, channel_id: null, guild_id: null };
2026-08-12 06:57:52 +00:00
obj3[0] = outer1_27.APPS_BUTTON;
2026-08-14 17:33:39 +00:00
obj3[1] = closure_10.props.current.channel.id;
obj3[2] = closure_10.props.current.channel.guild_id;
2026-08-12 06:57:52 +00:00
outer1_1(outer1_3[48]).track(outer1_25.CHAT_INPUT_COMPONENT_VIEWED, obj3);
const obj14 = outer1_1(outer1_3[48]);
2026-08-14 17:33:39 +00:00
const tmp30 = closure_10;
2026-08-12 06:57:52 +00:00
const result2 = outer1_2(outer1_3[51]).dismissNewActivityIndicator();
const obj16 = outer1_2(outer1_3[51]);
2026-07-29 08:29:29 +00:00
if (tmp35 == null) {
tmp35 = null;
}
2026-08-12 06:57:52 +00:00
const result3 = callback(outer1_3[52]).setAppLauncherA11yFocusReturnRef(tmp35);
2026-07-29 08:29:29 +00:00
const obj4 = { type: null, context: null };
2026-08-12 06:57:52 +00:00
obj4[0] = callback(outer1_3[49]).KeyboardTypes.APP_LAUNCHER;
2026-07-29 08:29:29 +00:00
let obj5 = { initialRouteName: null, initialSearchQuery: null };
2026-08-12 06:57:52 +00:00
obj5[0] = outer1_31.HOME;
const obj17 = callback(outer1_3[52]);
const appDMApplication = callback(outer1_3[53]).getAppDMApplication(tmp30.props.current.channel);
2026-07-29 08:29:29 +00:00
let name;
if (appDMApplication != null) {
name = appDMApplication.name;
}
obj5[1] = name;
obj4[1] = obj5;
2026-08-14 17:33:39 +00:00
initialize.handleToggleKeyboard(obj4);
2026-08-12 06:57:52 +00:00
const tmp23Result = callback(outer1_3[53]);
2026-07-29 08:29:29 +00:00
} else if (tmp.ALL_PHOTOS === arg1) {
2026-08-12 06:57:52 +00:00
const result4 = callback(outer1_3[47]).triggerHapticFeedback(callback(outer1_3[47]).HapticFeedbackTypes.IMPACT_LIGHT);
const obj9 = callback(outer1_3[47]);
2026-07-29 08:29:29 +00:00
let obj6 = { channel: null, uploadLimit: null, onDismissKeyboard: null, onRestoreKeyboard: null, onSelectFiles: null, draftType: null };
2026-08-14 17:33:39 +00:00
obj6[0] = closure_10.props.current.channel;
2026-08-12 06:57:52 +00:00
obj6[1] = outer1_29;
2026-07-29 08:29:29 +00:00
obj6[2] = function onDismissKeyboard() {
2026-08-15 05:55:55 +00:00
return callback(4237).dismissKeyboard();
2026-07-29 08:29:29 +00:00
};
obj6[3] = function onRestoreKeyboard() {
2026-08-14 17:33:39 +00:00
return initialize.handleToggleKeyboard({ type: outer1_0(outer1_3[49]).KeyboardTypes.SYSTEM });
2026-07-29 08:29:29 +00:00
};
obj6[4] = function onSelectFiles(items) {
2026-08-14 17:33:39 +00:00
outer1_0(outer1_3[54]).addImagesFromPicker(closure_10.props.current.channel.id, items, outer1_0(outer1_3[45]).UploadOrigin.IMAGE_PICKER);
2026-07-29 08:29:29 +00:00
};
2026-08-12 06:57:52 +00:00
obj6[5] = outer1_15.ChannelMessage;
callback(outer1_3[54]).handleViewAllDialog(obj6);
const obj10 = callback(outer1_3[54]);
2026-07-29 08:29:29 +00:00
} else if (tmp.CAMERA === arg1) {
2026-08-12 06:57:52 +00:00
obj5 = callback(outer1_3[47]);
const result5 = obj5.triggerHapticFeedback(callback(outer1_3[47]).HapticFeedbackTypes.IMPACT_LIGHT);
obj6 = callback(outer1_3[54]);
2026-07-29 08:29:29 +00:00
const obj7 = { channel: null, previewType: null, onDismissKeyboard: null, onRestoreKeyboard: null, onSelectFiles: null };
2026-08-14 17:33:39 +00:00
obj7[0] = closure_10.props.current.channel;
2026-08-12 06:57:52 +00:00
obj7[1] = outer1_33.CAMERA_BUTTON;
2026-07-29 08:29:29 +00:00
obj7[2] = function onDismissKeyboard() {
2026-08-15 05:55:55 +00:00
return callback(4237).dismissKeyboard();
2026-07-29 08:29:29 +00:00
};
obj7[3] = function onRestoreKeyboard() {
2026-08-14 17:33:39 +00:00
return initialize.handleToggleKeyboard({ type: outer1_0(outer1_3[49]).KeyboardTypes.SYSTEM });
2026-07-29 08:29:29 +00:00
};
obj7[4] = function onSelectFiles(items) {
2026-08-14 17:33:39 +00:00
outer1_0(outer1_3[54]).addImagesFromPicker(closure_10.props.current.channel.id, items, outer1_0(outer1_3[45]).UploadOrigin.IMAGE_PICKER);
2026-07-29 08:29:29 +00:00
};
obj6.handleCameraDialog(obj7);
} else if (tmp.NITRO_GIFT === arg1) {
2026-08-12 06:57:52 +00:00
obj = outer1_1(outer1_3[56]);
2026-07-29 08:29:29 +00:00
const result6 = obj.markPotentialBadState();
2026-08-12 06:57:52 +00:00
obj1 = callback(outer1_3[47]);
const result7 = obj1.triggerHapticFeedback(callback(outer1_3[47]).HapticFeedbackTypes.IMPACT_LIGHT);
2026-07-29 08:29:29 +00:00
obj2 = callback(outer1_3[22]);
if (obj2.isAndroid()) {
2026-08-12 06:57:52 +00:00
let tmp5Result = tmp5(tmp3[55]);
2026-07-29 08:29:29 +00:00
tmp5Result.dismissKeyboard();
}
2026-08-12 06:57:52 +00:00
tmp5Result = tmp5(tmp3[54]);
2026-08-14 17:33:39 +00:00
tmp5Result.handleSelectGift(closure_10.props.current.analyticsLocations, closure_10.chatInput, tmp35);
2026-07-29 08:29:29 +00:00
} else if (tmp.THREAD === arg1) {
2026-08-12 06:57:52 +00:00
const result8 = callback(outer1_3[47]).triggerHapticFeedback(callback(outer1_3[47]).HapticFeedbackTypes.IMPACT_LIGHT);
const obj29 = callback(outer1_3[47]);
2026-08-14 17:33:39 +00:00
callback(outer1_3[54]).handleSelectThread(closure_10.props.current.channel, closure_10.chatInput);
2026-08-12 06:57:52 +00:00
const obj30 = callback(outer1_3[54]);
2026-07-20 16:05:17 +00:00
}
}
};
2026-07-29 08:29:29 +00:00
obj[10] = function handlePollsPress() {
2026-08-12 06:57:52 +00:00
let obj = callback(outer1_3[47]);
const result = obj.triggerHapticFeedback(callback(outer1_3[47]).HapticFeedbackTypes.IMPACT_LIGHT);
2026-08-14 17:33:39 +00:00
obj = { type: outer1_27.POLLS, channel_id: closure_10.props.current.channel.id, guild_id: closure_10.props.current.channel.guild_id };
2026-08-12 06:57:52 +00:00
outer1_1(outer1_3[48]).track(outer1_25.CHAT_INPUT_COMPONENT_VIEWED, obj);
const obj2 = outer1_1(outer1_3[48]);
callback(outer1_3[55]).dismissKeyboard();
const obj4 = callback(outer1_3[55]);
2026-07-20 16:05:17 +00:00
obj = {
2026-08-14 17:33:39 +00:00
channel: closure_10.props.current.channel,
2026-07-20 16:05:17 +00:00
onCancel() {
2026-08-14 17:33:39 +00:00
return initialize.handleToggleKeyboard({ type: outer1_0(outer1_3[49]).KeyboardTypes.SYSTEM });
2026-07-20 16:05:17 +00:00
}
};
2026-08-12 06:57:52 +00:00
callback(outer1_3[57]).openCreatePollModal(obj);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[11] = function handleAttachPress() {
2026-08-12 06:57:52 +00:00
let obj = callback(outer1_3[47]);
const result = obj.triggerHapticFeedback(callback(outer1_3[47]).HapticFeedbackTypes.IMPACT_LIGHT);
2026-07-20 16:05:17 +00:00
obj = {
2026-08-14 17:33:39 +00:00
channel: closure_10.props.current.channel,
2026-08-12 06:57:52 +00:00
uploadLimit: outer1_29,
2026-07-20 16:05:17 +00:00
onDismissKeyboard() {
2026-08-12 06:57:52 +00:00
return callback(table[55]).dismissKeyboard();
2026-07-20 16:05:17 +00:00
},
onRestoreKeyboard() {
2026-08-14 17:33:39 +00:00
return initialize.handleToggleKeyboard({ type: outer1_0(outer1_3[49]).KeyboardTypes.SYSTEM });
2026-07-20 16:05:17 +00:00
},
onSelectFiles(items) {
2026-08-12 06:57:52 +00:00
outer1_0(outer1_3[54]).addImagesFromPicker(props.props.current.channel.id, items, outer1_0(outer1_3[45]).UploadOrigin.FILE_ATTACHMENT);
2026-07-20 16:05:17 +00:00
}
};
2026-08-12 06:57:52 +00:00
callback(outer1_3[54]).handleAttachFile(obj);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[12] = function handlePressExpression(context) {
2026-08-12 06:57:52 +00:00
let obj = callback(outer1_3[58]);
const result = obj.initiateEmojiInteraction(outer1_32.ChatInputExpressionPressed);
obj = { type: callback(outer1_3[49]).KeyboardTypes.EXPRESSION, context };
2026-08-14 17:33:39 +00:00
initialize.handleToggleKeyboard(obj);
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[13] = function handlePressSend() {
2026-08-14 17:33:39 +00:00
const current = closure_10.chatInput.current;
2026-07-20 16:05:17 +00:00
current.handleSend();
};
2026-07-29 08:29:29 +00:00
obj[14] = function handleSelectionOrTextChange(nativeEvent) {
2026-07-20 16:05:17 +00:00
let editId;
let end;
let start;
let text;
({ start, end, text, editId } = nativeEvent.nativeEvent);
2026-08-14 17:33:39 +00:00
closure_10.state.current.editId = editId;
closure_10.state.current.selectionStart = start;
closure_10.state.current.selectionEnd = end;
const result = initialize.handleTextOrFocusChange(text, closure_10.state.current.focused);
const current = closure_10.chatInputAppCommandManager.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.updateState();
}
2026-07-29 08:29:29 +00:00
const current2 = tmp.chatInputAutocomplete.current;
if (current2 != null) {
const obj = { focused: null, text: null, selectionStart: null, selectionEnd: null };
obj[0] = tmp.state.current.focused;
obj[1] = text;
obj[2] = start;
obj[3] = end;
2026-07-20 16:05:17 +00:00
current2.setData(obj);
}
2026-07-29 08:29:29 +00:00
const current3 = tmp.chatInputSendButton.current;
if (current3 != null) {
2026-07-20 16:05:17 +00:00
current3.setHasText(text.trim().length > 0);
}
2026-08-14 17:33:39 +00:00
if (closure_10.state.current.editId !== editId) {
2026-07-29 08:29:29 +00:00
const current4 = tmp.chatInput.current;
2026-07-20 16:05:17 +00:00
current4.handleTextChanged(text);
2026-07-29 08:29:29 +00:00
const current5 = tmp.chatInputCharCounter.current;
if (current5 != null) {
2026-07-20 16:05:17 +00:00
const result1 = current5.onMessageLengthChanged(text.length);
}
2026-08-12 06:57:52 +00:00
callback(outer1_3[59]).hideContextMenu();
const obj2 = callback(outer1_3[59]);
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
obj[15] = function handleTapAction(nativeEvent) {
2026-07-20 16:05:17 +00:00
let channelId;
let optionName;
const tapAction = nativeEvent.nativeEvent.tapAction;
if ("tapAttachment" === tapAction.action) {
2026-08-14 17:33:39 +00:00
let current = closure_10.chatInput.current;
2026-07-20 16:05:17 +00:00
current.blur();
2026-08-12 06:57:52 +00:00
const obj = callback(outer1_3[60]);
2026-08-14 17:33:39 +00:00
const current2 = closure_10.chatInput.current;
2026-07-20 16:05:17 +00:00
const applicationCommandManager = current2.getApplicationCommandManager();
({ channelId, optionName } = tapAction);
2026-07-29 08:29:29 +00:00
let fn;
2026-08-14 17:33:39 +00:00
if (closure_10.state.current.focused) {
2026-07-20 16:05:17 +00:00
fn = () => {
2026-07-29 08:29:29 +00:00
const current = chatInput.chatInput.current;
2026-07-20 16:05:17 +00:00
return current.openSystemKeyboard();
};
}
const result = obj.openCommandAttachmentPreview(applicationCommandManager, channelId, optionName, fn);
}
};
2026-07-29 08:29:29 +00:00
obj[16] = function handleTextOrFocusChange(text, focused) {
2026-07-20 16:05:17 +00:00
if (text.length > 0) {
if (!focused) {
2026-08-12 06:57:52 +00:00
const maxMessageLength = callback(outer1_3[62]).getMaxMessageLength();
2026-07-29 08:29:29 +00:00
if (tmp16) {
2026-08-12 06:57:52 +00:00
outer1_1(outer1_3[48]).track(outer1_25.MESSAGE_LENGTH_LIMIT_REACHED, {});
const obj3 = outer1_1(outer1_3[48]);
2026-07-20 16:05:17 +00:00
}
2026-08-14 17:33:39 +00:00
closure_10.state.current.textPrev = closure_10.state.current.text;
closure_10.state.current.text = text;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
if (outer1_11.isOpen()) {
outer1_1(outer1_3[61]).hideNativeMenu();
const obj = outer1_1(outer1_3[61]);
2026-07-20 16:05:17 +00:00
}
2026-08-14 17:33:39 +00:00
const current2 = closure_10.chatInputActions.current;
2026-07-29 08:29:29 +00:00
if (current2 != null) {
2026-07-20 16:05:17 +00:00
current2.onDismissActions(focused);
}
2026-08-14 17:33:39 +00:00
const current3 = closure_10.chatInputRightActions.current;
2026-07-29 08:29:29 +00:00
if (current3 != null) {
2026-07-20 16:05:17 +00:00
current3.onDismissActions(focused);
}
2026-08-14 17:33:39 +00:00
const tmp8 = closure_10;
2026-07-20 16:05:17 +00:00
}
if (0 === text.length) {
2026-08-14 17:33:39 +00:00
const current4 = closure_10.chatInputActions.current;
2026-07-29 08:29:29 +00:00
if (current4 != null) {
2026-07-20 16:05:17 +00:00
current4.onShowActions(focused);
}
2026-08-14 17:33:39 +00:00
const current = closure_10.chatInputRightActions.current;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
current.onShowActions(focused);
}
2026-08-14 17:33:39 +00:00
const tmp21 = closure_10;
2026-07-20 16:05:17 +00:00
}
};
2026-07-29 08:29:29 +00:00
obj[17] = function handleTextFlushed(nativeEvent) {
2026-07-20 16:05:17 +00:00
nativeEvent = nativeEvent.nativeEvent;
2026-08-14 17:33:39 +00:00
const current = closure_10.chatInputTextFlushedResponses.current;
2026-07-20 16:05:17 +00:00
const value = current.get(nativeEvent.requestId);
2026-07-29 08:29:29 +00:00
if (value != null) {
2026-07-20 16:05:17 +00:00
value(nativeEvent.text);
}
};
2026-07-29 08:29:29 +00:00
obj[18] = function handleToggleKeyboard(type) {
2026-08-12 06:57:52 +00:00
if (outer1_11.isOpen()) {
outer1_1(outer1_3[61]).hideNativeMenu();
const obj = outer1_1(outer1_3[61]);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
if (type.type !== callback(outer1_3[49]).KeyboardTypes.SYSTEM) {
2026-07-29 08:29:29 +00:00
if (type.type !== tmp4Result.getKeyboardType()) {
2026-08-14 17:33:39 +00:00
const current = closure_10.chatInput.current;
2026-07-20 16:05:17 +00:00
current.openCustomKeyboard(type);
}
}
2026-08-14 17:33:39 +00:00
const current2 = closure_10.chatInput.current;
2026-07-20 16:05:17 +00:00
current2.openSystemKeyboard();
};
return obj;
}, items11);
2026-07-29 08:29:29 +00:00
const items12 = [null != threadCreationCallback, tmp49];
callback = obj9.useCallback((nativeEvent) => {
2026-07-20 16:05:17 +00:00
const layout = nativeEvent.nativeEvent.layout;
const height = layout.height;
if (tmp) {
2026-08-14 17:33:39 +00:00
if (!c3) {
const current = _undefined2.chatInput.current;
2026-07-20 16:05:17 +00:00
const result = current.updateChatInputContainerHeightDebounced(height);
}
}
}, items12);
2026-08-15 05:55:55 +00:00
const tmp55 = ref(11206)({ textFieldHeight: sharedValue1, textFieldMinHeight: sharedValue });
2026-08-12 06:57:52 +00:00
registerViewTag = tmp55.registerViewTag;
unregisterViewTag = tmp55.unregisterViewTag;
2026-08-14 17:33:39 +00:00
handleChanged = obj9.useRef(null);
2026-08-12 06:57:52 +00:00
const items13 = [tmp49, registerViewTag, unregisterViewTag];
const callback1 = obj9.useCallback((current) => {
if (null != ref.current) {
unregisterViewTag(tmp.current);
tmp.current = null;
}
2026-08-14 17:33:39 +00:00
_undefined2.chatInputNative.current = current;
2026-08-12 06:57:52 +00:00
if (null != current) {
2026-08-14 17:33:39 +00:00
const tmp5 = sharedValue(current);
2026-08-12 06:57:52 +00:00
if (null != tmp5) {
tmp.current = tmp5;
registerViewTag(tmp5);
}
}
}, items13);
const items14 = [editable, tmp49];
callback2 = obj9.useCallback(() => true, []);
callback3 = obj9.useCallback(() => {
2026-07-20 16:05:17 +00:00
if (editable) {
2026-08-14 17:33:39 +00:00
const current = _undefined2.chatInput.current;
2026-07-20 16:05:17 +00:00
current.openSystemKeyboard();
}
2026-08-12 06:57:52 +00:00
}, items14);
2026-07-29 08:29:29 +00:00
obj2 = { canUpload, channelId: channel.id, screenIndex };
2026-08-15 05:55:55 +00:00
const tmp60 = callback4(ref(11395), obj2);
2026-08-12 06:57:52 +00:00
let tmp59Result = null;
2026-07-20 16:05:17 +00:00
if (editable) {
2026-07-29 08:29:29 +00:00
obj3 = { ref: null, channel: null, onPressAction: null, canStartThreads: null, isAppLauncherEnabled: null, keyboardType: null, shouldPhotosButtonBeDisabled: null, canUpload: null, shouldShowGiftButton: null, canPostPolls: null, onPollsPress: null, onAttachPress: null, photosButtonExternalRef: null };
obj3[0] = tmp49.chatInputActions;
obj3[1] = channel;
obj3[2] = memo1.handlePressAction;
obj3[3] = canStartThread;
obj3[4] = isAppLauncherEnabled;
obj3[5] = tmp40;
2026-08-12 06:57:52 +00:00
let tmp63 = canUpload;
2026-08-15 05:55:55 +00:00
tmp5Result = tmp5(11396);
2026-07-20 16:05:17 +00:00
if (canUpload) {
2026-08-12 06:57:52 +00:00
tmp63 = null == stateFromStores3;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
if (!tmp63) {
tmp63 = tmp34;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
obj3[6] = !tmp63;
2026-07-29 08:29:29 +00:00
obj3[7] = canUpload;
2026-07-20 16:05:17 +00:00
let result1 = result2;
2026-07-29 08:29:29 +00:00
if (!tmp17) {
2026-08-15 05:55:55 +00:00
result1 = tmp(4052).isPremiumGiftingSupported();
const tmpResult18 = tmp(4052);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj3[8] = result1;
obj3[9] = tmp34;
2026-08-14 17:33:39 +00:00
({ handlePollsPress: obj31[10], handleAttachPress: obj31[11] } = memo1);
2026-07-29 08:29:29 +00:00
obj3[12] = ref1;
2026-08-12 06:57:52 +00:00
tmp59Result = tmp59(tmp5Result, obj3);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
obj4 = { style: items15, children: null };
items15 = [tmp9.inputDefault, animatedStyle];
2026-07-29 08:29:29 +00:00
obj5 = { accessibilityLabel, customKeyboard: null, editable: null, onBeginFocus: null, onEndBlur: null, onChangeContentSize: null, onMaxHeightChanged: null, onSelectionOrTextChange: null, onTextFlushed: null, onPasteImage: null, onPasteCommand: null, onTapAction: null, onRequestSend: null, placeholder: null, ref: null, setNoExtractUI: null, shouldShowCursor: null, verticalInset: null };
2026-08-15 05:55:55 +00:00
const tmpResult17 = tmp(11158);
obj5[1] = tmp(11415).PORTAL_KEYBOARD_PLACEHOLDER_INSTANCE;
2026-07-29 08:29:29 +00:00
obj5[2] = editable;
2026-08-14 17:33:39 +00:00
({ handleFocus: obj34[3], handleBlur: obj34[4], handleChangeContentSize: obj34[5], handleMaxHeightChanged: obj34[6], handleSelectionOrTextChange: obj34[7], handleTextFlushed: obj34[8], handlePasteImage: obj34[9], handlePasteCommand: obj34[10], handleTapAction: obj34[11], handlePressSend: obj34[12] } = memo1);
2026-07-29 08:29:29 +00:00
obj5[13] = placeholder;
2026-08-12 06:57:52 +00:00
obj5[14] = callback1;
2026-07-29 08:29:29 +00:00
obj5[15] = setNoExtractUI;
2026-08-15 05:55:55 +00:00
obj5[16] = tmp40 !== tmp(1627).KeyboardTypes.MEDIA;
2026-07-29 08:29:29 +00:00
obj5[17] = num2;
2026-08-15 05:55:55 +00:00
const items16 = [callback4(ref(11414), obj5), callback4(ref(11416), { keyboardType: tmp40, onSelectKeyboard: memo1.handleToggleKeyboard, ref: tmp49.chatInputCover })];
2026-08-12 06:57:52 +00:00
obj4[1] = items16;
2026-08-15 05:55:55 +00:00
const tmp67 = callback5(ref(4115).View, obj4);
2026-07-20 16:05:17 +00:00
if (editable) {
2026-07-29 08:29:29 +00:00
let obj7 = { ref: null, canSendVoiceMessage: null, channel: null, defaultValue: null, hasPendingAttachments: null, hasPendingEdit: null, onSendMessage: null, requireTextContent: null };
obj7[0] = tmp49.chatInputSendButton;
obj7[1] = canSendVoiceMessage;
obj7[2] = channel;
obj7[3] = memo;
2026-07-20 16:05:17 +00:00
if (stateFromStores2) {
stateFromStores2 = canUpload;
}
2026-07-29 08:29:29 +00:00
obj7[4] = stateFromStores2;
obj7[5] = null != stateFromStores;
obj7[6] = memo1.handlePressSend;
obj7[7] = result2;
2026-08-15 05:55:55 +00:00
tmp59Result = tmp59(tmp5(11417), obj7);
const tmp5Result2 = tmp5(11417);
2026-07-20 16:05:17 +00:00
} else {
2026-08-12 06:57:52 +00:00
tmp59Result = null;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj8 = { collapsable: false, onLayout: callback, style: null, children: null };
2026-08-15 05:55:55 +00:00
const items17 = [ref(11425)({ isCreatingThread: null != threadCreationCallback }), , ];
2026-07-20 16:05:17 +00:00
let overflowVisible = chatInputFloating;
if (chatInputFloating) {
2026-07-29 08:29:29 +00:00
overflowVisible = tmp9.overflowVisible;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items17[1] = overflowVisible;
2026-07-20 16:05:17 +00:00
let floatingScrimOverlap = chatInputFloating;
if (chatInputFloating) {
floatingScrimOverlap = result2;
}
if (floatingScrimOverlap) {
2026-07-29 08:29:29 +00:00
floatingScrimOverlap = tmp9.floatingScrimOverlap;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items17[2] = floatingScrimOverlap;
obj8[2] = items17;
let tmp59Result1 = chatInputFloating;
2026-07-20 16:05:17 +00:00
if (chatInputFloating) {
2026-08-12 06:57:52 +00:00
tmp59Result1 = !floatingInputBoxTyping;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
if (tmp59Result1) {
2026-07-29 08:29:29 +00:00
obj9 = { gradientHeight: null, inline: false, scrimBase: null };
obj9[0] = tmp23;
obj9[2] = token2;
2026-08-15 05:55:55 +00:00
tmp59Result1 = tmp59(tmp(11426).ChatInputScrimGradient, obj9);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
const items18 = [tmp59Result1, , , , , , , , , , , , , , ];
let tmp59Result2 = chatInputFloating;
2026-07-20 16:05:17 +00:00
if (chatInputFloating) {
2026-08-12 06:57:52 +00:00
tmp59Result2 = floatingInputBoxTyping;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
if (tmp59Result2) {
2026-08-14 17:33:39 +00:00
let hex2rgbResult = tmp(688).hex2rgb(token2, 1);
2026-07-29 08:29:29 +00:00
if (hex2rgbResult == null) {
hex2rgbResult = token2;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let obj10 = { style: null, pointerEvents: "none" };
const obj11 = { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, backgroundColor: null };
obj11[5] = hex2rgbResult;
obj10[0] = obj11;
2026-08-12 06:57:52 +00:00
tmp59Result2 = tmp59(tmp70, obj10);
2026-08-14 17:33:39 +00:00
const tmpResult19 = tmp(688);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items18[1] = tmp59Result2;
2026-08-15 05:55:55 +00:00
items18[2] = callback4(tmp(11427).ChatInputAccessibilityDivider, {});
2026-08-12 06:57:52 +00:00
let tmp59Result3 = null;
2026-07-29 08:29:29 +00:00
if (tmp18) {
let obj12 = { channel: null, hasInputText: null };
obj12[0] = channel;
2026-08-12 06:57:52 +00:00
let tmp76 = "" !== memo;
if (!tmp76) {
2026-07-29 08:29:29 +00:00
let current = tmp49.chatInput.current;
2026-07-20 16:05:17 +00:00
let text;
2026-07-29 08:29:29 +00:00
if (current != null) {
2026-07-20 16:05:17 +00:00
text = current.getText();
}
2026-08-12 06:57:52 +00:00
tmp76 = "" !== text;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
obj12[1] = tmp76;
2026-08-15 05:55:55 +00:00
tmp59Result3 = tmp59(tmp5(11428), obj12);
const tmp5Result3 = tmp5(11428);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items18[3] = tmp59Result3;
2026-07-29 08:29:29 +00:00
let obj13 = { style: tmp9.accessories, children: null };
2026-08-12 06:57:52 +00:00
let tmp59Result4 = chatInputFloating;
2026-07-20 16:05:17 +00:00
if (chatInputFloating) {
2026-08-12 06:57:52 +00:00
tmp59Result4 = floatingInputBoxTyping;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
if (tmp59Result4) {
2026-07-29 08:29:29 +00:00
let obj14 = { gradientHeight: null, inline: true, scrimBase: null };
obj14[0] = tmp24;
obj14[2] = token2;
2026-08-15 05:55:55 +00:00
tmp59Result4 = tmp59(tmp(11426).ChatInputScrimGradient, obj14);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
const items19 = [tmp59Result4, , ];
let tmp59Result5 = null;
2026-07-20 16:05:17 +00:00
if (null == threadCreationCallback) {
2026-07-29 08:29:29 +00:00
const obj15 = { channel: null, screenIndex: null };
obj15[0] = channel;
obj15[1] = screenIndex;
2026-08-15 05:55:55 +00:00
tmp59Result5 = tmp59(tmp5(11432), obj15);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items19[1] = tmp59Result5;
2026-07-29 08:29:29 +00:00
let obj6 = { keyboardType: tmp40, onSelectKeyboard: memo1.handleToggleKeyboard, ref: tmp49.chatInputCover };
2026-08-15 05:55:55 +00:00
const tmp5Result1 = ref(11414);
2026-08-12 06:57:52 +00:00
let tmp59Result6 = null;
2026-08-14 17:33:39 +00:00
if (tmpResult20.isIOS()) {
2026-07-29 08:29:29 +00:00
let obj16 = { channelId: null, screenIndex: null, onJumpToPresent: null };
obj16[0] = channel.id;
obj16[1] = screenIndex;
obj16[2] = onJumpToPresent;
2026-08-15 05:55:55 +00:00
tmp59Result6 = tmp59(tmp5(11434), obj16);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items19[2] = tmp59Result6;
obj13[1] = items19;
2026-08-14 17:33:39 +00:00
items18[4] = callback5(c7, obj13);
2026-08-12 06:57:52 +00:00
let tmp59Result7 = null;
2026-07-20 16:05:17 +00:00
if (isResourceChannel) {
2026-07-29 08:29:29 +00:00
let obj17 = { channel: null };
obj17[0] = channel;
2026-08-15 05:55:55 +00:00
tmp59Result7 = tmp59(tmp5(11450), obj17, channel.id);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items18[5] = tmp59Result7;
2026-08-15 05:55:55 +00:00
items18[6] = callback4(tmp(11454).MemberActionsChatInputBannerGuardedOuter, { channel });
items18[7] = callback4(tmp(11457).DoubleTapToReactChatInputBanner, { channel });
2026-08-12 06:57:52 +00:00
let tmp59Result8 = null;
2026-07-29 08:29:29 +00:00
if (tmp19) {
const obj18 = { channelId: null };
obj18[0] = channel.id;
2026-08-15 05:55:55 +00:00
tmp59Result8 = tmp59(tmp5(11557), obj18);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items18[8] = tmp59Result8;
let tmp59Result9 = null;
2026-08-15 05:55:55 +00:00
if (tmp40 !== tmp(1627).KeyboardTypes.EXPRESSION) {
2026-07-29 08:29:29 +00:00
const obj19 = { ref: null, analyticsLocations: null, channel: null, canMentionEveryone: null, keyboardType: null, onChangeAutoCompleteVisibility: null, commandsDisabled: null, canOnlyUseTextCommands: null, chatInputRef: null, screenIndex: null };
obj19[0] = tmp49.chatInputAutocomplete;
obj19[1] = analyticsLocations;
obj19[2] = channel;
obj19[3] = canMentionEveryone;
obj19[4] = tmp40;
obj19[5] = memo1.handleChangeAutoCompleteVisibility;
obj19[6] = tmp30;
obj19[7] = tmp31;
obj19[8] = tmp49.chatInput;
obj19[9] = screenIndex;
2026-08-15 05:55:55 +00:00
tmp59Result9 = tmp59(tmp5(11559), obj19);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items18[9] = tmp59Result9;
let tmp59Result10 = !chatInputFloating;
2026-07-29 08:29:29 +00:00
if (!chatInputFloating) {
const obj20 = { channel: null };
obj20[0] = channel;
2026-08-15 05:55:55 +00:00
tmp59Result10 = tmp59(tmp5(11577), obj20);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items18[10] = tmp59Result10;
let tmp59Result11 = !chatInputFloating;
2026-07-29 08:29:29 +00:00
if (!chatInputFloating) {
let obj21 = { channel: null, chatInputRef: null, pendingEdit: null, pendingReply: null };
obj21[0] = channel;
obj21[1] = tmp49.chatInput;
obj21[2] = stateFromStores;
obj21[3] = stateFromStores1;
2026-08-15 05:55:55 +00:00
tmp59Result11 = tmp59(tmp5(11593), obj21);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items18[11] = tmp59Result11;
2026-08-15 05:55:55 +00:00
items18[12] = callback4(ref(11597), { ref: tmp49.chatInputAppCommandManager, canOnlyUseTextCommands: null != stateFromStores1, channel, chatInputRef: tmp49.chatInput, chatInputStateRef: tmp49.state, commandsDisabled: tmp30 });
2026-08-12 06:57:52 +00:00
const items20 = [tmp9.container, ];
2026-07-20 16:05:17 +00:00
let floatingContainer = chatInputFloating;
if (chatInputFloating) {
2026-07-29 08:29:29 +00:00
floatingContainer = tmp9.floatingContainer;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
const obj23 = { style: items20, onLayout: memo1.handleLayoutOfInputContainer, children: null };
items20[1] = floatingContainer;
2026-07-29 08:29:29 +00:00
const obj24 = { children: null };
2026-07-20 16:05:17 +00:00
if (chatInputFloating) {
2026-08-12 06:57:52 +00:00
const items21 = [tmp60, , ];
2026-07-29 08:29:29 +00:00
const obj25 = { channel: null };
obj25[0] = channel;
2026-08-15 05:55:55 +00:00
items21[1] = tmp59(tmp5(11577), obj25);
2026-08-12 06:57:52 +00:00
const items22 = [tmp9.floatingInputBox, , ];
2026-07-20 16:05:17 +00:00
if (floatingInputBoxPressed) {
2026-07-29 08:29:29 +00:00
floatingInputBoxPressed = tmp9.floatingInputBoxPressed;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items22[1] = floatingInputBoxPressed;
2026-07-20 16:05:17 +00:00
if (floatingInputBoxTyping) {
2026-07-29 08:29:29 +00:00
floatingInputBoxTyping = tmp9.floatingInputBoxTyping;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const obj26 = { style: null, onStartShouldSetResponder: null, onResponderRelease: null, collapsable: false, accessibilityElementsHidden: null, importantForAccessibility: null, children: null };
2026-08-12 06:57:52 +00:00
items22[2] = floatingInputBoxTyping;
obj26[0] = items22;
obj26[1] = callback2;
obj26[2] = callback3;
2026-07-29 08:29:29 +00:00
obj26[4] = tmp41;
let str3;
if (tmp41) {
str3 = "no-hide-descendants";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj26[5] = str3;
const obj27 = { channel: null, chatInputRef: null, pendingEdit: null, pendingReply: null };
obj27[0] = channel;
obj27[1] = tmp49.chatInput;
obj27[2] = stateFromStores;
obj27[3] = stateFromStores1;
2026-08-15 05:55:55 +00:00
const items23 = [tmp59(tmp5(11593), obj27), ];
2026-07-29 08:29:29 +00:00
const obj28 = { style: null, children: null };
obj28[0] = tmp9.floatingMainContents;
2026-08-12 06:57:52 +00:00
let tmp59Result12 = null;
if (null != tmp59Result) {
2026-07-29 08:29:29 +00:00
let obj29 = { style: null, children: null };
let obj30 = { paddingBottom: null, paddingLeft: null };
obj30[0] = result;
obj30[1] = result;
obj29[0] = obj30;
2026-08-12 06:57:52 +00:00
obj29[1] = tmp59Result;
tmp59Result12 = tmp59(tmp70, obj29);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
const items24 = [tmp59Result12, , , ];
2026-07-29 08:29:29 +00:00
const obj31 = { style: null, children: null };
2026-08-12 06:57:52 +00:00
const items25 = [tmp9.inputFlat, ];
2026-07-29 08:29:29 +00:00
const obj32 = { paddingBottom: null };
obj32[0] = result;
2026-08-12 06:57:52 +00:00
items25[1] = obj32;
obj31[0] = items25;
const items26 = [tmp67, ];
2026-07-29 08:29:29 +00:00
const obj33 = { analyticsLocations: null, ref: null };
obj33[0] = analyticsLocations;
obj33[1] = tmp49.chatInputCharCounter;
2026-08-15 05:55:55 +00:00
items26[1] = tmp59(tmp5(11599), obj33);
2026-08-12 06:57:52 +00:00
obj31[1] = items26;
items24[1] = tmp65(tmp70, obj31);
let tmp59Result13 = null;
2026-07-20 16:05:17 +00:00
if (editable) {
2026-07-29 08:29:29 +00:00
const obj34 = { style: null, children: null };
const obj35 = { paddingBottom: null };
obj35[0] = result;
obj34[0] = obj35;
const obj36 = { ref: null, channel: null, keyboardType: null, shouldShowGiftButton: null, onPressAction: null, onPressExpression: null };
obj36[0] = tmp49.chatInputRightActions;
obj36[1] = channel;
obj36[2] = tmp40;
if (!tmp17) {
2026-08-15 05:55:55 +00:00
result2 = tmp(4052).isPremiumGiftingSupported();
const tmpResult21 = tmp(4052);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj36[3] = result2;
2026-08-14 17:33:39 +00:00
({ handlePressAction: obj75[4], handlePressExpression: obj75[5] } = memo1);
2026-08-15 05:55:55 +00:00
obj34[1] = tmp59(tmp5(11600), obj36);
2026-08-12 06:57:52 +00:00
tmp59Result13 = tmp59(tmp70, obj34);
2026-08-15 05:55:55 +00:00
const tmp5Result4 = tmp5(11600);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items24[2] = tmp59Result13;
items24[3] = tmp59Result;
obj28[1] = items24;
items23[1] = tmp65(tmp70, obj28);
obj26[6] = items23;
items21[2] = tmp65(tmp70, obj26);
obj24[0] = items21;
let tmp91 = obj24;
2026-07-20 16:05:17 +00:00
} else {
2026-08-12 06:57:52 +00:00
const items27 = [tmp60, ];
2026-07-29 08:29:29 +00:00
const obj37 = { style: null, collapsable: false, accessibilityElementsHidden: null, importantForAccessibility: null, children: null };
obj37[0] = tmp9.containerInner;
obj37[2] = tmp41;
let str2;
if (tmp41) {
str2 = "no-hide-descendants";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj37[3] = str2;
2026-08-12 06:57:52 +00:00
let tmp59Result14 = tmp59Result;
2026-07-20 16:05:17 +00:00
if (enabled) {
2026-07-29 08:29:29 +00:00
const obj38 = { style: null, children: null };
obj38[0] = tmp9.refreshButtonAlignment;
2026-08-12 06:57:52 +00:00
obj38[1] = tmp59Result;
tmp59Result14 = tmp59(tmp70, obj38);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
const items28 = [tmp59Result14, , ];
2026-07-29 08:29:29 +00:00
const obj39 = { style: null, children: null };
2026-08-12 06:57:52 +00:00
const items29 = [tmp9.input, ];
2026-07-29 08:29:29 +00:00
const obj40 = { minHeight: null };
obj40[0] = token - 2 * token6;
2026-08-12 06:57:52 +00:00
items29[1] = obj40;
obj39[0] = items29;
const items30 = [tmp67, ];
2026-07-29 08:29:29 +00:00
const obj41 = { style: null, children: null };
obj41[0] = tmp9.rightAccessory;
2026-08-12 06:57:52 +00:00
let tmp59Result15 = null;
2026-07-20 16:05:17 +00:00
if (editable) {
2026-07-29 08:29:29 +00:00
const obj42 = { active: null, onPress: null };
2026-08-15 05:55:55 +00:00
obj42[0] = tmp40 === tmp(1627).KeyboardTypes.EXPRESSION;
2026-07-29 08:29:29 +00:00
obj42[1] = memo1.handlePressExpression;
2026-08-15 05:55:55 +00:00
tmp59Result15 = tmp59(tmp5(11352), obj42);
const tmp5Result5 = tmp5(11352);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
const items31 = [tmp59Result15, ];
2026-07-29 08:29:29 +00:00
const obj43 = { analyticsLocations: null, ref: null };
obj43[0] = analyticsLocations;
obj43[1] = tmp49.chatInputCharCounter;
2026-08-15 05:55:55 +00:00
items31[1] = tmp59(tmp5(11599), obj43);
2026-08-12 06:57:52 +00:00
obj41[1] = items31;
items30[1] = tmp65(tmp70, obj41);
obj39[1] = items30;
items28[1] = tmp65(tmp70, obj39);
let tmp59Result16 = tmp59Result;
2026-07-20 16:05:17 +00:00
if (enabled) {
2026-07-29 08:29:29 +00:00
const obj44 = { style: null, children: null };
obj44[0] = tmp9.refreshButtonAlignment;
2026-08-12 06:57:52 +00:00
obj44[1] = tmp59Result;
tmp59Result16 = tmp59(tmp70, obj44);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items28[2] = tmp59Result16;
obj37[4] = items28;
items27[1] = tmp65(tmp70, obj37);
obj24[0] = items27;
tmp91 = obj24;
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
obj23[2] = callback5(closure_37, tmp91);
items18[13] = callback4(tmp5Result, obj23);
let tmp59Result17 = null;
2026-07-20 16:05:17 +00:00
if (null != refreshChatInputCoachmark) {
2026-07-29 08:29:29 +00:00
const obj45 = { buttonRef: null };
obj45[0] = ref1;
const merged = Object.assign(refreshChatInputCoachmark);
2026-08-15 05:55:55 +00:00
tmp59Result17 = tmp59(tmp5(11158), obj45);
const tmp5Result6 = tmp5(11158);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
items18[14] = tmp59Result17;
obj8[3] = items18;
tmp = tmp65(tmp70, obj8);
2026-07-20 16:05:17 +00:00
if (null == threadCreationCallback) {
2026-07-29 08:29:29 +00:00
const obj46 = { channel: null, screenIndex: null, canSendMessages: null, canCreateThreads: null, onJumpToPresent: null, isReadonly: null, children: null };
obj46[0] = channel;
obj46[1] = screenIndex;
obj46[2] = editable;
obj46[3] = canCreateThreads;
obj46[4] = onJumpToPresent;
obj46[5] = !editable;
2026-08-12 06:57:52 +00:00
obj46[6] = tmp;
2026-08-15 05:55:55 +00:00
tmp = tmp59(tmp5(11601), obj46);
2026-07-20 16:05:17 +00:00
}
2026-08-12 06:57:52 +00:00
return tmp;
2026-07-20 16:05:17 +00:00
});
forwardRefResult.displayName = "ChatInput";
const memoResult = importAllResult.memo(forwardRefResult);
2026-07-29 08:29:29 +00:00
let result = require("noop").fileFinishedImporting("modules/chat_input/native/ChatInput.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;