/* Metro module 11955; source: modules/chat/native/placeholder/ChatPlaceholder.tsx; dependencies: [31, 27, 7729, 33, 4501, 697, 1585, 5463, 1478, 11956, 11957, 11958, 4017, 2] */ import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import UseWindowDimensionsNative from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */ import UseSafeAreaInsetsNative from '../../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */ import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */ import UseSafeAreaInsetsKeyboardAwareNative from '../../../safe_area/useSafeAreaInsetsKeyboardAware.native.tsx'; /* Metro dependency 5463 */ import UseChatPlaceholderAnimatedStyles from './useChatPlaceholderAnimatedStyles.tsx'; /* Metro dependency 11956 */ 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 CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as UseChatBottomManagerUIStoreModule from '../../../chat_input/native/useChatBottomManagerUIStore.tsx'; /* Metro dependency 7729 */ function _fun91741(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91741, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12141:6, offset: 0x020704cb, size: 296 bytes, params: 8, frame: 22 const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const StyleSheet = (ReactNativeModule).StyleSheet; const createStyles = CreateStylesModule.createStyles; const object2 = {}; copyDataProperties(object2, StyleSheet.absoluteFillObject, undefined); const PX_24 = (Native).space.PX_24; object2['paddingBottom'] = PX_24; object2['flexDirection'] = 'column-reverse'; object2['overflow'] = 'hidden'; const env0_5 = Reflect.apply(createStyles, CreateStylesModule, [{placeholder: object2}]); value = value.memo(ChatPlaceholder); (FileImportTrackerModule).fileFinishedImporting('modules/chat/native/placeholder/ChatPlaceholder.tsx'); exports.default = value; function ChatPlaceholder({screenIndex}) { // fn#91742, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12141:340, offset: 0x020705f3, size: 371 bytes, params: 2, frame: 24 const styles = useStyles(); const value2 = useChatInputContainerHeight(screenIndex); const height = (UseWindowDimensionsNative)().height; const value3 = (UseSafeAreaInsetsNative)(); const insets = (UseSafeAreaInsetsKeyboardAwareNative)({'isKeyboardAwareOnAndroid': false, 'includeKeyboardHeight': true}).insets; const object = {}; object.containerBottomInset = insets.bottom - value3.bottom; object.windowVerticalInset = value3.top + insets.bottom; const containerBottomInset = object.containerBottomInset; const containerBottomInset2 = containerBottomInset; const windowVerticalInset = object.windowVerticalInset; const binding = containerBottomInset2; const value4 = binding.useMemo(_fun91743, [value2, containerBottomInset]); const value5 = useLinesForRowIndexCallback(); const value6 = (UseChatPlaceholderAnimatedStyles)({'visible': true, 'animated': true}); const value7 = binding.useMemo(_fun91746, [height, windowVerticalInset, value2, value5]); const View = (ReanimatedRexport).View; return ( {value7} ); function _fun91743() { // fn#91743, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12141:690, offset: 0x02070766, size: 23 bytes, params: 1, frame: 3 return {marginBottom: env0_0 + containerBottomInset}; } function useLinesForRowIndexCallback() { // fn#91744, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12141:725, owner: ChatPlaceholder.useLinesForRowIndexCallback, offset: 0x0207077d, size: 51 bytes, params: 1, frame: 13 const binding = env1_2; const env0_0 = binding.useRef([]); return binding.useCallback(_fun91745, []); function _fun91745(a0) { // fn#91745, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12141:805, offset: 0x020707b0, size: 92 bytes, params: 2, frame: 15 var r0; var Math; var value4; const property = env0_0.current[a0]; if (property != null) { r0 = property; } else { Math = global.Math; value4 = Math.floor(3 * global.Math.random()) + 1; env0_0.current[a0] = value4; r0 = value4; } return r0; } } function _fun91746() { // fn#91746, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12141:953, offset: 0x0207080c, size: 126 bytes, params: 1, frame: 23 var value4; var push; var jsxRuntimeEnv1_4Binding; var ChatPlaceholderRow; var object; var value5; const items2 = []; let value = 0; let r2 = value; let r3 = value; reducibleLoop1: while (true) { value = (0, JsxRuntimeModule.jsx)(r2); value4 = r3 + (importDefault(11957) /* metro dependency 11957: getChatPlaceholderRowHeight */)(value); push = items2.push; jsxRuntimeEnv1_4Binding = jsxRuntimeEnv1_4; ChatPlaceholderRow = importDefault(11958) /* metro dependency 11958: ChatPlaceholderRow */; object = {lines: value}; value = typeof r2 === 'bigint' ? r2 : +r2; value5 = typeof value === 'bigint' ? value + 1n : +value + 1; Reflect.apply(push, items2, []); value = height - env0_0; if (value4 < value - windowVerticalInset) { r2 = value5; r3 = value4; continue reducibleLoop1; } break reducibleLoop1; } return items2; } } } global.__d(_fun91741, 11955, [31, 27, 7729, 33, 4501, 697, 1585, 5463, 1478, 11956, 11957, 11958, 4017, 2]) /* metro module 11955, dependencies: [31, 27, 7729, 33, 4501, 697, 1585, 5463, 1478, 11956, 11957, 11958, 4017, 2] */;