116 lines
7.9 KiB
TypeScript
116 lines
7.9 KiB
TypeScript
/* Metro module 13573; source: modules/quests/native/QuestDock/QuestDockGestureContext.tsx; dependencies: [31, 13570, 6528, 13572, 7553, 33, 8142, 1478, 13574, 4017, 5176, 13571, 1585, 11534, 2] */
|
|
import SubscribeToWindowDimensionsNative from '../../../screen/subscribeToWindowDimensions.native.tsx'; /* Metro dependency 11534 */
|
|
import QuestDockStore from './QuestDockStore.tsx'; /* Metro dependency 13570 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as UseWindowDimensionsNativeModule from '../../../screen/useWindowDimensions.native.tsx'; /* Metro dependency 1478 */
|
|
import * as ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as YouBarExperimentModule from '../../../main_tabs_v2/YouBarExperiment.tsx'; /* Metro dependency 5176 */
|
|
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
|
|
import * as YouBarConstantsModule from '../../../main_tabs_v2/native/YouBarConstants.tsx'; /* Metro dependency 7553 */
|
|
import * as ReanimatedHelperTypesModule from '../../../reanimated/ReanimatedHelperTypes.tsx'; /* Metro dependency 8142 */
|
|
import * as QuestDockUtilsModule from './QuestDockUtils.tsx'; /* Metro dependency 13571 */
|
|
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
|
|
import * as UseTabsVisibleModule from '../../../main_tabs_v2/native/utils/useTabsVisible.tsx'; /* Metro dependency 13574 */
|
|
|
|
function _fun103170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:6, offset: 0x0225add6, size: 404 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
const QuestDockMode = (QuestConstantsModule).QuestDockMode;
|
|
const createContext = value.createContext;
|
|
object = {};
|
|
let createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
|
|
object.questDockWrapperSpecs = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [{'width': 0,
|
|
'height': 0, 'x': 0, 'y': 0, 'prevDeltaY': 0}]);
|
|
object.windowDimensions = ReanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0,
|
|
'maxContentHeight': 0, 'landscape': false});
|
|
createFakeSharedValue = ReanimatedHelperTypesModule.createFakeSharedValue;
|
|
const COLLAPSED = QuestDockMode.COLLAPSED;
|
|
object.activeQuestDockMode = Reflect.apply(createFakeSharedValue, ReanimatedHelperTypesModule, [COLLAPSED]);
|
|
object.minExpandedContentHeight = ReanimatedHelperTypesModule.createFakeSharedValue(0);
|
|
const context = Reflect.apply(createContext, value, [object]);
|
|
value = value.memo(QuestDockGestureContextProviderInner);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockGestureContext.tsx');
|
|
exports.QuestDockGestureContext = context;
|
|
exports.QuestDockGestureContextProvider = value;
|
|
function QuestDockGestureContextProviderInner(a0) { // fn#103171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:611, offset: 0x0225af6a, size: 650 bytes, params: 2, frame: 29
|
|
var r10;
|
|
var r8;
|
|
var moduleValue6;
|
|
var moduleValue7;
|
|
let binding = env0_3;
|
|
const useMemo = binding.useMemo;
|
|
const getWindowDimensions = (UseWindowDimensionsNativeModule).getWindowDimensions;
|
|
const value2 = Reflect.apply(useMemo, binding, [getWindowDimensions, []]);
|
|
const value3 = (UseTabsVisibleModule).useMainTabsHeight({'enabled': true,
|
|
'ignoreQuestDock': true});
|
|
const env0_1 = binding.useRef(value3);
|
|
let useSharedValue = ReanimatedRexportModule.useSharedValue;
|
|
let width = value2.width;
|
|
const value4 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [{width: width, height: value2.height,
|
|
landscape: value2.width > value2.height, maxContentHeight: value2.height - value3}]);
|
|
const value5 = (YouBarExperimentModule).useYouBarEnabled('QuestDockGestureContext');
|
|
const value6 = useYouBarHorizontalMargin();
|
|
useSharedValue = ReanimatedRexportModule.useSharedValue;
|
|
const getQuestDockCollapsedWidth = QuestDockUtilsModule.getQuestDockCollapsedWidth;
|
|
width = value2.width;
|
|
if (value5) {
|
|
r10 = value6;
|
|
} else {
|
|
moduleValue6 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
|
|
r10 = moduleValue6.getSafeAreaInsets().left;
|
|
}
|
|
if (value5) {
|
|
r8 = value6;
|
|
} else {
|
|
moduleValue7 = require(1585) /* metro dependency 1585: useSafeAreaInsetsNative */;
|
|
r8 = moduleValue7.getSafeAreaInsets().right;
|
|
}
|
|
const QUEST_DOCK_COLLAPSED_HEIGHT2 = value5 ? -8 : QUEST_DOCK_COLLAPSED_HEIGHT;
|
|
const value8 = Reflect.apply(useSharedValue, ReanimatedRexportModule, [{width: Reflect.apply(getQuestDockCollapsedWidth,
|
|
QuestDockUtilsModule, [width, r10, r8]), height: QUEST_DOCK_COLLAPSED_HEIGHT, x: 0,
|
|
y: QUEST_DOCK_COLLAPSED_HEIGHT2, prevDeltaY: 0}]);
|
|
var env0_3 = value8;
|
|
useSharedValue = ReanimatedRexportModule.useSharedValue;
|
|
const value9 = Reflect.apply(useSharedValue, ReanimatedRexportModule,
|
|
[QuestDockUtilsModule.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
|
|
const value10 = ReanimatedRexportModule.useSharedValue(QUEST_DOCK_EXPANDED_HEIGHT);
|
|
binding = env0_3;
|
|
binding.useEffect(_fun103172, [value3]);
|
|
binding.useEffect(_fun103173, [value4]);
|
|
const value11 = binding.useMemo(_fun103175, [value4, value8, value9, value10]);
|
|
const Provider = env0_10.Provider;
|
|
return (
|
|
<Provider value={value11}>
|
|
{a0.children}
|
|
</Provider>
|
|
);
|
|
function _fun103172() { // fn#103172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1297, offset: 0x00e655cf, size: 21 bytes, params: 1, frame: 2
|
|
env0_1.current = env0_0;
|
|
}
|
|
|
|
function _fun103173() { // fn#103173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1334, offset: 0x0225b1f4, size: 41 bytes, params: 1, frame: 11
|
|
var environment;
|
|
const value = environment.__proto__;
|
|
return (SubscribeToWindowDimensionsNative)(_fun103174);
|
|
function _fun103174({width, height}) { // fn#103174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1348, offset: 0x0225b21d, size: 71 bytes, params: 2, frame: 15
|
|
env1_2.set({width: width, height: height, landscape: width > height, maxContentHeight: height - env1_1.current});
|
|
}
|
|
|
|
}
|
|
|
|
function _fun103175() { // fn#103175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13763:1466, offset: 0x0225b264, size: 43 bytes, params: 1, frame: 3
|
|
return {windowDimensions: env0_2, questDockWrapperSpecs: env0_3, activeQuestDockMode: env0_4,
|
|
minExpandedContentHeight: env0_5};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun103170, 13573, [31, 13570, 6528, 13572, 7553, 33, 8142, 1478, 13574, 4017, 5176, 13571, 1585, 11534,
|
|
2]) /* metro module 13573, dependencies: [31, 13570, 6528, 13572, 7553, 33, 8142, 1478, 13574, 4017, 5176, 13571, 1585, 11534, 2] */;
|