106 lines
7.2 KiB
TypeScript
106 lines
7.2 KiB
TypeScript
/* Metro module 13661; source: modules/quests/native/QuestDock/QuestDockContentExpanded.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13662, 13663, 2] */
|
|
import ReanimatedNativeView from '../../../core/native/ReanimatedNativeView.tsx'; /* Metro dependency 8141 */
|
|
import QuestDockContext from './QuestDockContext.tsx'; /* Metro dependency 13650 */
|
|
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 ReanimatedRexportModule from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as SpringModule from '../../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
|
|
import * as QuestConstantsModule from '../../QuestConstants.tsx'; /* Metro dependency 6528 */
|
|
import * as QuestDockConstantsModule from './QuestDockConstants.tsx'; /* Metro dependency 13572 */
|
|
import * as QuestDockGestureContextModule from './QuestDockGestureContext.tsx'; /* Metro dependency 13573 */
|
|
|
|
function _fun104327(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104327, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:6, offset: 0x02291c5a, size: 328 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
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);
|
|
object2['bottom'] = undefined;
|
|
object2['display'] = 'flex';
|
|
object2['zIndex'] = 1;
|
|
const env0_9 = Reflect.apply(createStyles, CreateStylesModule, [{wrapper: object2}]);
|
|
object = {code: 'function QuestDockContentExpandedTsx1(){const{isEnrolled,QUEST_DOCK_EXPANDED_HEIGHT,windowDimensions,withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS,questDockWrapperSpecs}=this.__closure;return{height:isEnrolled?undefined:QUEST_DOCK_EXPANDED_HEIGHT,width:windowDimensions.get().width,opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS),transform:[{translateX:withSpring((questDockWrapperSpecs.get().width-windowDimensions.get().width)/2,QUEST_DOCK_MODE_CHANGE_PHYSICS)}]};}'};
|
|
value = value.memo(QuestDockContentExpanded);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentExpanded.tsx');
|
|
exports.default = value;
|
|
function QuestDockContentExpanded() { // fn#104328, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:933, offset: 0x02291da2, size: 436 bytes, params: 1, frame: 24
|
|
var r5;
|
|
var value;
|
|
const binding = env0_3;
|
|
let useContext = binding.useContext;
|
|
const value2 = undefined;
|
|
const quest = Reflect.apply(useContext, binding,
|
|
[QuestDockContext]).quest;
|
|
const styles = useStyles();
|
|
useContext = binding.useContext;
|
|
const QuestDockGestureContext = (QuestDockGestureContextModule).QuestDockGestureContext;
|
|
const {activeQuestDockMode, questDockWrapperSpecs, windowDimensions} = Reflect.apply(useContext, binding,
|
|
[QuestDockGestureContext]);
|
|
const userStatus = quest.userStatus;
|
|
const value4 = (userStatus == null ? value2 : userStatus.enrolledAt) != null;
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const QuestDockContentExpandedN2 = QuestDockContentExpandedN;
|
|
const object = {isEnrolled: value4};
|
|
object.QUEST_DOCK_EXPANDED_HEIGHT = QUEST_DOCK_EXPANDED_HEIGHT;
|
|
object.windowDimensions = windowDimensions;
|
|
object.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
object.activeQuestDockMode = activeQuestDockMode;
|
|
object.QuestDockMode = QuestDockMode;
|
|
object.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
|
object.questDockWrapperSpecs = questDockWrapperSpecs;
|
|
QuestDockContentExpandedN2.__closure = object;
|
|
QuestDockContentExpandedN2.__workletHash = 17161265612101;
|
|
QuestDockContentExpandedN2.__initData = env0_10;
|
|
const value5 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [QuestDockContentExpandedN2]);
|
|
const items2 = [styles.wrapper, value5];
|
|
const r7 = !value4 && ((Component) => <Component />)(importDefault(13662) /* metro dependency 13662: QuestDockUnenrolledBody */);
|
|
if (value4) {
|
|
value = importDefault(13663) /* metro dependency 13663: QuestDockEnrolledBody */;
|
|
value = ((Component) => <Component quest={quest} />)(value);
|
|
r5 = value;
|
|
} else {
|
|
r5 = value4;
|
|
}
|
|
return (
|
|
<ReanimatedNativeView style={items2}>
|
|
{r7}
|
|
{r5}
|
|
</ReanimatedNativeView>
|
|
);
|
|
function QuestDockContentExpandedN() { // fn#104329, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13858:1216, owner: QuestDockContentExpanded.n, offset: 0x02291f56, size: 219 bytes, params: 1, frame: 19
|
|
const object = {};
|
|
const QUEST_DOCK_EXPANDED_HEIGHT2 = result ? undefined : QUEST_DOCK_EXPANDED_HEIGHT;
|
|
object.height = QUEST_DOCK_EXPANDED_HEIGHT2;
|
|
let windowDimensionsBinding = windowDimensions;
|
|
let get = windowDimensionsBinding.get;
|
|
let width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
|
object.width = width;
|
|
let withSpring = SpringModule.withSpring;
|
|
const value5 = activeQuestDockMode.get();
|
|
const EXPANDED = QuestDockMode.EXPANDED;
|
|
object.opacity = Reflect.apply(withSpring, SpringModule, [value5 !== EXPANDED ? 0 : 1,
|
|
QUEST_DOCK_MODE_CHANGE_PHYSICS]);
|
|
withSpring = SpringModule.withSpring;
|
|
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
|
get = questDockWrapperSpecsBinding.get;
|
|
width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
|
|
windowDimensionsBinding = windowDimensions;
|
|
get = windowDimensionsBinding.get;
|
|
object.transform = [{translateX: Reflect.apply(withSpring, SpringModule, [(width - Reflect.apply(get,
|
|
windowDimensionsBinding, []).width) / 2, QUEST_DOCK_MODE_CHANGE_PHYSICS])}];
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun104327, 13661, [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13662, 13663,
|
|
2]) /* metro module 13661, dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13662, 13663, 2] */;
|