/* Metro module 6328; source: unknown; dependencies: [31, 33, 6282, 1610, 6281, 6278, 6294, 6329] */ import React from './module-00031-React.js'; /* Metro dependency 31 */ import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */ import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as moduleValue22 from './module-01610.js'; /* Metro dependency 1610 */ import * as Module06278Module from './module-06278.js'; /* Metro dependency 6278 */ import * as Module06281Module from './module-06281.js'; /* Metro dependency 6281 */ import * as Module06282Module from './module-06282.js'; /* Metro dependency 6282 */ import * as Module06294Module from './module-06294.js'; /* Metro dependency 6294 */ function _fun49788(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:6, offset: 0x0120841c, size: 191 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactModule; const memo = value.memo; const env0_3 = value.useMemo; React; object = {code: 'function pnpm_BottomSheetContentTsx1(){const{animatedContainerHeight,INITIAL_CONTAINER_HEIGHT,animatedKeyboardState,animatedKeyboardHeightInContainer,animatedHandleHeight,animatedSheetHeight,keyboardBehavior,KEYBOARD_BEHAVIOR,KEYBOARD_STATE,isInTemporaryPosition}=this.__closure;if(animatedContainerHeight.get()===INITIAL_CONTAINER_HEIGHT){return 0;}const keyboardState=animatedKeyboardState.get();const keyboardHeightInContainer=animatedKeyboardHeightInContainer.get();const handleHeight=Math.max(0,animatedHandleHeight.get());const containerHeight=animatedContainerHeight.get();let contentHeight=animatedSheetHeight.get()-handleHeight;switch(keyboardBehavior){case KEYBOARD_BEHAVIOR.extend:if(keyboardState===KEYBOARD_STATE.SHOWN){contentHeight=contentHeight-keyboardHeightInContainer;}break;case KEYBOARD_BEHAVIOR.fillParent:if(!isInTemporaryPosition.get()){break;}if(keyboardState===KEYBOARD_STATE.SHOWN){contentHeight=containerHeight-handleHeight-keyboardHeightInContainer;}else{contentHeight=containerHeight-handleHeight;}break;case KEYBOARD_BEHAVIOR.interactive:{if(!isInTemporaryPosition.get()){break;}const contentWithKeyboardHeight=contentHeight+keyboardHeightInContainer;if(keyboardState===KEYBOARD_STATE.SHOWN){if(keyboardHeightInContainer+animatedSheetHeight.get()>containerHeight){contentHeight=containerHeight-keyboardHeightInContainer-handleHeight;}}else if(contentWithKeyboardHeight+handleHeight>containerHeight){contentHeight=containerHeight-handleHeight;}else{contentHeight=contentWithKeyboardHeight;}break;}}return Math.max(contentHeight,0);}'}; object = {code: 'function pnpm_BottomSheetContentTsx2(){const{animatedContainerHeight,INITIAL_CONTAINER_HEIGHT,animatedHighestSnapPoint,animatedPosition,overDragResistanceFactor,animatedKeyboardState,KEYBOARD_STATE,animatedKeyboardHeightInContainer}=this.__closure;const containerHeight=animatedContainerHeight.get();if(containerHeight===INITIAL_CONTAINER_HEIGHT){return 0;}const highestSnapPoint=Math.max(animatedHighestSnapPoint.get(),animatedPosition.get());const overDragSafePaddingBottom=Math.sqrt(highestSnapPoint-containerHeight*-1)*overDragResistanceFactor;let paddingBottom=overDragSafePaddingBottom;if(animatedKeyboardState.get()===KEYBOARD_STATE.SHOWN){paddingBottom=overDragSafePaddingBottom+animatedKeyboardHeightInContainer.get();}return paddingBottom;}'}; object = {code: 'function pnpm_BottomSheetContentTsx3(){const{animatedContainerHeight,INITIAL_CONTAINER_HEIGHT,enableDynamicSizing,animatedContentHeight,detached,animatedPaddingBottom,animate,animationConfigs,overrideReduceMotion,animatedContentHeightMax}=this.__closure;if(animatedContainerHeight.get()===INITIAL_CONTAINER_HEIGHT){return{};}if(enableDynamicSizing&&animatedContentHeight.get()===INITIAL_CONTAINER_HEIGHT){return{};}const paddingBottom=detached?0:animatedPaddingBottom.get();return{paddingBottom:animate({point:paddingBottom,configs:animationConfigs,overrideReduceMotion:overrideReduceMotion}),height:animate({point:animatedContentHeightMax.get()+paddingBottom,configs:animationConfigs,overrideReduceMotion:overrideReduceMotion})};}'}; value = memo(BottomSheetContentComponent); value.displayName = 'BottomSheetContent'; exports.BottomSheetContent = value; function BottomSheetContentComponent({detached, animationConfigs, overrideReduceMotion, keyboardBehavior, accessible, accessibilityLabel, accessibilityHint, accessibilityRole, children}) { // fn#49789, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:3239, offset: 0x012084db, size: 876 bytes, params: 2, frame: 43 const value2 = (Module06282Module).useBottomSheetInternal(); const enableDynamicSizing = value2.enableDynamicSizing; const overDragResistanceFactor = value2.overDragResistanceFactor; const overDragResistanceFactor2 = overDragResistanceFactor; const enableContentPanningGesture = value2.enableContentPanningGesture; const animatedPosition = value2.animatedPosition; const animatedPosition2 = animatedPosition; const animatedHandleHeight = value2.animatedHandleHeight; const animatedHandleHeight2 = animatedHandleHeight; const animatedHighestSnapPoint = value2.animatedHighestSnapPoint; const animatedContainerHeight = value2.animatedContainerHeight; const animatedContentHeight = value2.animatedContentHeight; const animatedSheetHeight = value2.animatedSheetHeight; const animatedKeyboardState = value2.animatedKeyboardState; const animatedKeyboardHeightInContainer = value2.animatedKeyboardHeightInContainer; const isInTemporaryPosition = value2.isInTemporaryPosition; let useDerivedValue = moduleValue22.useDerivedValue; let closure = pnpm_BottomSheetContentTsx1; let object = {animatedContainerHeight: animatedContainerHeight}; const INITIAL_CONTAINER_HEIGHT = (Module06281Module).INITIAL_CONTAINER_HEIGHT; object.INITIAL_CONTAINER_HEIGHT = INITIAL_CONTAINER_HEIGHT; object.animatedKeyboardState = animatedKeyboardState; object.animatedKeyboardHeightInContainer = animatedKeyboardHeightInContainer; object.animatedHandleHeight = animatedHandleHeight; object.animatedSheetHeight = animatedSheetHeight; object.keyboardBehavior = keyboardBehavior; const KEYBOARD_BEHAVIOR = (Module06278Module).KEYBOARD_BEHAVIOR; object.KEYBOARD_BEHAVIOR = KEYBOARD_BEHAVIOR; const KEYBOARD_STATE = (Module06278Module).KEYBOARD_STATE; object.KEYBOARD_STATE = KEYBOARD_STATE; object.isInTemporaryPosition = isInTemporaryPosition; closure.__closure = object; closure.__workletHash = 2170474579366; closure.__initData = overDragResistanceFactor2; const value3 = Reflect.apply(useDerivedValue, moduleValue22, [closure, [animatedContainerHeight, animatedHandleHeight, animatedKeyboardHeightInContainer, animatedKeyboardState, animatedSheetHeight, isInTemporaryPosition, keyboardBehavior]]); useDerivedValue = moduleValue22.useDerivedValue; closure = pnpm_BottomSheetContentTsx2; closure.__closure = {animatedContainerHeight: animatedContainerHeight, INITIAL_CONTAINER_HEIGHT: INITIAL_CONTAINER_HEIGHT, animatedHighestSnapPoint: animatedHighestSnapPoint, animatedPosition: animatedPosition, overDragResistanceFactor: overDragResistanceFactor, animatedKeyboardState: animatedKeyboardState, KEYBOARD_STATE: KEYBOARD_STATE, animatedKeyboardHeightInContainer: animatedKeyboardHeightInContainer}; closure.__workletHash = 3484699588399; closure.__initData = animatedPosition2; const value4 = Reflect.apply(useDerivedValue, moduleValue22, [closure, [overDragResistanceFactor, animatedPosition, animatedContainerHeight, animatedHighestSnapPoint, animatedKeyboardState, animatedKeyboardHeightInContainer]]); const useAnimatedStyle = moduleValue22.useAnimatedStyle; closure = pnpm_BottomSheetContentTsx3; object = {animatedContainerHeight: animatedContainerHeight}; object.INITIAL_CONTAINER_HEIGHT = INITIAL_CONTAINER_HEIGHT; object.enableDynamicSizing = enableDynamicSizing; object.animatedContentHeight = animatedContentHeight; object.detached = detached; object.animatedPaddingBottom = value4; object.animate = (require(6294) /* metro dependency 6294 */).animate; object.animationConfigs = animationConfigs; object.overrideReduceMotion = overrideReduceMotion; object.animatedContentHeightMax = value3; closure.__closure = object; closure.__workletHash = 8203943631786; closure.__initData = animatedHandleHeight2; return ((Component) => {children})(enableContentPanningGesture ? importDefault(6329) /* metro dependency 6329 */ : (importDefault(1610) /* metro dependency 1610 */).View); function pnpm_BottomSheetContentTsx1() { // fn#49790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:3857, owner: BottomSheetContentComponent.pnpm_BottomSheetContentTsx1, offset: 0x01208847, size: 512 bytes, params: 1, frame: 24 const KEYBOARD_STATE = (Module06278Module).KEYBOARD_STATE; const animatedContainerHeightBinding = animatedContainerHeight; let get = animatedContainerHeightBinding.get; const value2 = Reflect.apply(get, animatedContainerHeightBinding, []); const INITIAL_CONTAINER_HEIGHT = (Module06281Module).INITIAL_CONTAINER_HEIGHT; if (value2 === INITIAL_CONTAINER_HEIGHT) { return 0; } const value4 = animatedKeyboardState.get(); const value5 = animatedKeyboardHeightInContainer.get(); let Math = global.Math; const value7 = Math.max(0, animatedHandleHeight.get()); const value8 = animatedContainerHeight.get(); const animatedSheetHeightBinding = animatedSheetHeight; get = animatedSheetHeightBinding.get; const value9 = Reflect.apply(get, animatedSheetHeightBinding, []) - value7; const keyboardBehaviorBinding = keyboardBehavior; const KEYBOARD_BEHAVIOR = (Module06278Module).KEYBOARD_BEHAVIOR; const r2 = KEYBOARD_BEHAVIOR.extend === keyboardBehaviorBinding ? value4 !== KEYBOARD_STATE.SHOWN ? value9 : value9 - value5 : KEYBOARD_BEHAVIOR.fillParent === keyboardBehaviorBinding ? isInTemporaryPosition.get() ? value4 === KEYBOARD_STATE.SHOWN ? value8 - value7 - value5 : value8 - value7 : value9 : KEYBOARD_BEHAVIOR.interactive !== keyboardBehaviorBinding ? value9 : isInTemporaryPosition.get() ? value4 === KEYBOARD_STATE.SHOWN ? value5 + animatedSheetHeight.get() > value8 ? value8 - value5 - value7 : value9 : value9 + value5 + value7 > value8 ? value8 - value7 : value9 + value5 : value9; Math = global.Math; return Math.max(r2, 0); } function pnpm_BottomSheetContentTsx2() { // fn#49791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:4810, owner: BottomSheetContentComponent.pnpm_BottomSheetContentTsx2, offset: 0x01208a47, size: 213 bytes, params: 1, frame: 19 const animatedContainerHeightBinding = animatedContainerHeight; let get = animatedContainerHeightBinding.get; const value2 = Reflect.apply(get, animatedContainerHeightBinding, []); const INITIAL_CONTAINER_HEIGHT = (Module06281Module).INITIAL_CONTAINER_HEIGHT; if (value2 === INITIAL_CONTAINER_HEIGHT) { return 0; } let Math = global.Math; const max = Math.max; const value4 = animatedHighestSnapPoint.get(); const animatedPositionBinding = animatedPosition; get = animatedPositionBinding.get; const value5 = Reflect.apply(max, Math, [value4, Reflect.apply(get, animatedPositionBinding, [])]); Math = global.Math; const value7 = Math.sqrt(value5 - -1 * value2) * overDragResistanceFactor; const value8 = animatedKeyboardState.get(); const KEYBOARD_STATE = (Module06278Module).KEYBOARD_STATE; const SHOWN = KEYBOARD_STATE.SHOWN; return value8 !== SHOWN ? value7 : value7 + animatedKeyboardHeightInContainer.get(); } function pnpm_BottomSheetContentTsx3() { // fn#49792, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:5397, owner: BottomSheetContentComponent.pnpm_BottomSheetContentTsx3, offset: 0x01208b1c, size: 257 bytes, params: 1, frame: 21 const animatedContainerHeightBinding = animatedContainerHeight; let get = animatedContainerHeightBinding.get; const value2 = Reflect.apply(get, animatedContainerHeightBinding, []); const INITIAL_CONTAINER_HEIGHT = (Module06281Module).INITIAL_CONTAINER_HEIGHT; if (value2 === INITIAL_CONTAINER_HEIGHT) { return {}; } if (enableDynamicSizing) { if (animatedContentHeight.get() === INITIAL_CONTAINER_HEIGHT) { return {}; } } const r7 = detached ? 0 : env0_16.get(); const object = {}; let animate = Module06294Module.animate; const animationConfigsBinding = animationConfigs; const overrideReduceMotionBinding = overrideReduceMotion; object.paddingBottom = Reflect.apply(animate, Module06294Module, [{point: r7, configs: animationConfigsBinding, overrideReduceMotion: overrideReduceMotionBinding}]); animate = Module06294Module.animate; const binding = env0_15; get = binding.get; object.height = Reflect.apply(animate, Module06294Module, [{point: Reflect.apply(get, binding, []) + r7, configs: animationConfigsBinding, overrideReduceMotion: overrideReduceMotionBinding}]); return object; } function _fun49793() { // fn#49793, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6506:6068, offset: 0x01208c1d, size: 56 bytes, params: 1, frame: 4 const detachedBinding = detached; const object = {}; if (detachedBinding) { object.overflow = 'visible'; } else { object.overflow = 'hidden'; } return [object, env0_17]; } } } global.__d(_fun49788, 6328, [31, 33, 6282, 1610, 6281, 6278, 6294, 6329]) /* metro module 6328, dependencies: [31, 33, 6282, 1610, 6281, 6278, 6294, 6329] */;