119 lines
6.3 KiB
React
119 lines
6.3 KiB
React
/* Metro module 6354; source: unknown; dependencies: [65, 29, 31, 27, 33, 1610, 6289, 6282, 6278, 5321] */
|
|
import ObjectWithoutProperties from './module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
|
|
import React from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import Module00065 from './module-00065.js'; /* Metro dependency 65 */
|
|
import Module01610 from './module-01610.js'; /* Metro dependency 1610 */
|
|
import * as ReactNativeModule from './module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from './module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from './module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as moduleValue2 from './module-01610.js'; /* Metro dependency 1610 */
|
|
import * as Module06278Module from './module-06278.js'; /* Metro dependency 6278 */
|
|
import * as Module06282Module from './module-06282.js'; /* Metro dependency 6282 */
|
|
import * as BottomSheetModule from './module-06289-BottomSheet.js'; /* Metro dependency 6289 */
|
|
|
|
function _fun49886(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49886, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6532:6, offset: 0x0120bd6b, size: 256 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const env0_2 = ['onRefresh', 'scrollableGesture'];
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const memo = value.memo;
|
|
const env0_5 = value.useContext;
|
|
const env0_6 = value.useMemo;
|
|
React;
|
|
const RefreshControl = (ReactNativeModule).RefreshControl;
|
|
const env0_8 = (Module01610).createAnimatedComponent(RefreshControl);
|
|
object = {code: 'function pnpm_BottomSheetRefreshControlAndroidTsx1(){const{animatedScrollableState,SCROLLABLE_STATE}=this.__closure;return{enabled:animatedScrollableState.value===SCROLLABLE_STATE.UNLOCKED};}'};
|
|
value = memo(BottomSheetRefreshControlComponent);
|
|
value.displayName = 'BottomSheetRefreshControl';
|
|
exports.default = value;
|
|
function BottomSheetRefreshControlComponent(a0) { // fn#49887, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6532:500, offset: 0x0120be6b, size: 412 bytes, params: 2, frame: 25
|
|
var r0;
|
|
var Object;
|
|
var GestureDetector;
|
|
const onRefresh = a0.onRefresh;
|
|
const scrollableGesture = a0.scrollableGesture;
|
|
let binding = ObjectWithoutProperties;
|
|
const value2 = binding(a0, env0_2);
|
|
const BottomSheetDraggableContext = (BottomSheetModule).BottomSheetDraggableContext;
|
|
const value3 = useContext(BottomSheetDraggableContext);
|
|
const value4 = (Module06282Module).useBottomSheetInternal();
|
|
const animatedScrollableState = value4.animatedScrollableState;
|
|
if (!value3) {
|
|
if (value4.enableContentPanningGesture) {
|
|
throw "'BottomSheetRefreshControl' cannot be used out of the BottomSheet!";
|
|
}
|
|
}
|
|
const useAnimatedProps = moduleValue2.useAnimatedProps;
|
|
const closure = function() {
|
|
var object = {};
|
|
object.enabled = animatedScrollableState.value === require(dependencyMap[8]).SCROLLABLE_STATE.UNLOCKED;
|
|
return object;
|
|
};
|
|
let object = {animatedScrollableState: animatedScrollableState};
|
|
const SCROLLABLE_STATE = (Module06278Module).SCROLLABLE_STATE;
|
|
object.SCROLLABLE_STATE = SCROLLABLE_STATE;
|
|
closure.__closure = object;
|
|
closure.__workletHash = 8403038560398;
|
|
closure.__initData = env0_9;
|
|
const value6 = Reflect.apply(useAnimatedProps, moduleValue2, [closure, [animatedScrollableState.value]]);
|
|
const value7 = useMemo(_fun49889, [value3, scrollableGesture]);
|
|
if (value7) {
|
|
GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
|
binding = env0_8;
|
|
Object = global.Object;
|
|
r0 = (
|
|
<GestureDetector gesture={value7}>
|
|
{((Component) => <Component {...Object.assign({}, value2, {onRefresh: onRefresh,
|
|
animatedProps: value6})} />)(binding)}
|
|
</GestureDetector>
|
|
);
|
|
} else {
|
|
binding = env0_8;
|
|
Object = global.Object;
|
|
r0 = ((Component) => <Component {...Object.assign({}, value2, {onRefresh: onRefresh,
|
|
animatedProps: value6})} />)(binding);
|
|
}
|
|
return r0;
|
|
function _fun49889() { // fn#49889, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6532:1111, offset: 0x0120c044, size: 137 bytes, params: 1, frame: 19
|
|
var r0;
|
|
var value3;
|
|
var value4;
|
|
var simultaneousWithExternalGesture;
|
|
var apply;
|
|
var binding;
|
|
var binding2;
|
|
var toGestureArray;
|
|
var value5;
|
|
var concat;
|
|
var scrollableGestureBinding;
|
|
var value;
|
|
if (env0_1) {
|
|
value3 = environment.__proto__;
|
|
value4 = (require(5321) /* metro dependency 5321 */).Gesture.Native();
|
|
simultaneousWithExternalGesture = value4.simultaneousWithExternalGesture;
|
|
apply = simultaneousWithExternalGesture.apply;
|
|
binding = env1_3;
|
|
binding2 = env0_1;
|
|
toGestureArray = binding2.toGestureArray;
|
|
value5 = binding(Reflect.apply(toGestureArray, binding2, []));
|
|
concat = value5.concat;
|
|
scrollableGestureBinding = scrollableGesture;
|
|
toGestureArray = scrollableGestureBinding.toGestureArray;
|
|
value = Reflect.apply(apply, simultaneousWithExternalGesture, [value4, Reflect.apply(concat, value5,
|
|
[binding(Reflect.apply(toGestureArray, scrollableGestureBinding, []))])]);
|
|
value = value.shouldCancelWhenOutside(true);
|
|
r0 = value;
|
|
} else {
|
|
r0 = undefined;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun49886, 6354, [65, 29, 31, 27, 33, 1610, 6289, 6282, 6278,
|
|
5321]) /* metro module 6354, dependencies: [65, 29, 31, 27, 33, 1610, 6289, 6282, 6278, 5321] */;
|