Initial commit
This commit is contained in:
commit
af3b49f756
16065 files changed
+2938410
No files matched your search
@@ -0,0 +1,771 @@
|
||||
/* Metro module 13651; source: modules/quests/native/QuestDock/QuestDock.tsx; dependencies: [5, 57, 31, 27, 13570, 6528, 13572, 661, 7553, 482, 33, 4501, 697, 13650, 13573, 13576, 13569, 4559, 4017, 8621, 1585, 5176, 3860, 13652, 4577, 13571, 4581, 4556, 13653, 8141, 1244, 13654, 13661, 13664, 13665, 4562, 9483, 6531, 13666, 566, 9479, 13568, 7701, 683, 4826, 4831, 7120, 9484, 10183, 3868, 2] */
|
||||
function _fun104239(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:6, offset: 0x0228b863, size: 979 bytes, params: 8, frame: 33
|
||||
var object3;
|
||||
const env0_0 = require;
|
||||
const closure = QuestDockWithEntranceAnimation;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
const env0_4 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_6 = value2.View;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_7 = value2.Pressable;
|
||||
const env0_8 = value2.Image;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_10 = questConstantsModule.QuestDockMode;
|
||||
const env0_11 = questConstantsModule.QuestsExperimentLocations;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_12 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const env0_13 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
const env0_14 = questDockConstantsModule.QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
const env0_15 = questDockConstantsModule.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
const env0_16 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_17 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
|
||||
const env0_18 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarTotalHeight;
|
||||
const env0_19 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
const value5 = require(33) /* metro dependency 33 */;
|
||||
const env0_20 = value5.jsx;
|
||||
const env0_21 = value5.jsxs;
|
||||
const env0_22 = value5.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object3 = {wrapper: {'position': 'absolute', 'left': '50%', 'bottom': 0, 'zIndex': 1}};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['zIndex'] = 1;
|
||||
object3.accessibilityWrapper = object7;
|
||||
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
|
||||
object3.questDockWrapper = {'position': 'absolute', 'bottom': 0, 'left': '50%', 'overflow': 'hidden',
|
||||
'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'borderRadius': null, 'zIndex': 1,
|
||||
borderRadius: QUEST_DOCK_BORDER_RADIUS};
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object8['justifyContent'] = 'flex-end';
|
||||
object8['zIndex'] = 4;
|
||||
object3.questDockContentWrapper = object8;
|
||||
const object9 = {};
|
||||
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
||||
object9['bottom'] = undefined;
|
||||
object9['right'] = undefined;
|
||||
object9['borderWidth'] = 1;
|
||||
const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED;
|
||||
object9['borderColor'] = BORDER_MUTED;
|
||||
object9['zIndex'] = 5;
|
||||
object3.questDockHeaderBorder = object9;
|
||||
const object10 = {};
|
||||
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
||||
object10['zIndex'] = 6;
|
||||
object3.nestedPressable = object10;
|
||||
const env0_23 = Reflect.apply(createStyles, createStylesModule, [object3]);
|
||||
object3 = {code: 'function QuestDockTsx1(){const{restingQuestDockMode,QuestDockMode}=this.__closure;return restingQuestDockMode.get()===QuestDockMode.EXPANDED;}'};
|
||||
object3 = {code: 'function QuestDockTsx2(){const{appThemedBackgroundColor,withSpring,activeQuestDockMode,QuestDockMode,youBarEnabled,questDockBorderRadius,bottomBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs,QUEST_DOCK_MODE_CHANGE_PHYSICS,roundToNearestPixel}=this.__closure;return{backgroundColor:appThemedBackgroundColor,borderBottomRightRadius:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED&&!youBarEnabled?questDockBorderRadius:bottomBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),borderBottomLeftRadius:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED&&!youBarEnabled?questDockBorderRadius:bottomBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),height:questDockWrapperSpecs.get().height,width:questDockWrapperSpecs.get().width,opacity:withSpring(1,QUEST_DOCK_MODE_CHANGE_PHYSICS),transform:[{translateX:withSpring(questDockWrapperSpecs.get().x+roundToNearestPixel(questDockWrapperSpecs.get().width/2)*-1,QUEST_DOCK_MODE_CHANGE_PHYSICS)},{translateY:withSpring(questDockWrapperSpecs.get().y,QUEST_DOCK_MODE_CHANGE_PHYSICS)}]};}'};
|
||||
object3 = {code: 'function QuestDockTsx3(){const{withSpring,interpolate,isPressed,activeQuestDockMode,QuestDockMode,youBarEnabled,springStandard}=this.__closure;return{transform:[{scale:withSpring(interpolate(isPressed.get(),[1,0],[activeQuestDockMode.get()===QuestDockMode.EXPANDED||youBarEnabled?1:0.98,1]),springStandard)}]};}'};
|
||||
object3 = {code: 'function QuestDockTsx4(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS,windowDimensions}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS),height:windowDimensions.get().height};}'};
|
||||
object3 = {code: "function QuestDockTsx5(){const{activeQuestDockMode,QuestDockMode}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.EXPANDED?'auto':'none'};}"};
|
||||
object3 = {code: 'function QuestDockTsx6(){const{questDockWrapperSpecs,windowDimensions,safeAreaTop}=this.__closure;const specs=questDockWrapperSpecs.get();const windowHeight=windowDimensions.get().height;return windowHeight-safeAreaTop-specs.height;}'};
|
||||
object3 = {code: 'function QuestDockTsx7(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.CLOSED||activeQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED?0:1,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
||||
object3 = {code: 'function QuestDockTsx8(){const{isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,bottomBorderRadius,withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs,QUEST_DOCK_COLLAPSED_HEIGHT,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED}=this.__closure;return{borderTopLeftRadius:!isEnrolled&&activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderTopRightRadius:!isEnrolled&&activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:!isEnrolled&&activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?bottomBorderRadius.get():questDockBorderRadius,borderBottomRightRadius:!isEnrolled&&activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?bottomBorderRadius.get():questDockBorderRadius,opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:1,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),height:activeQuestDockMode.get()===QuestDockMode.EXPANDED?isEnrolled?questDockWrapperSpecs.get().height:QUEST_DOCK_COLLAPSED_HEIGHT:questDockWrapperSpecs.get().height,width:activeQuestDockMode.get()===QuestDockMode.EXPANDED&&!isEnrolled?questDockWrapperSpecs.get().width-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*2:questDockWrapperSpecs.get().width,transform:[{translateX:isEnrolled?0:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:isEnrolled?0:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}],borderBottomWidth:youBarEnabled?bottomBorderRadius.get()>0?1:0:1};}'};
|
||||
const env0_32 = createStylesModule.createStyles(function() {
|
||||
return {wrapperAnimated: {'position': 'absolute', 'bottom': 0, 'padding': 0, 'width': '100%'}};
|
||||
});
|
||||
object3 = {};
|
||||
const SUBTLE_SPRING = (require(4581) /* metro dependency 4581: springPresets */).SUBTLE_SPRING;
|
||||
copyDataProperties(object3, SUBTLE_SPRING, undefined);
|
||||
object3['overshootClamping'] = true;
|
||||
object3['damping'] = 54;
|
||||
object3 = {code: "function QuestDockTsx9(){const{withSpring,isRendered,ENTRANCE_ANIMATION_SPING_CONFIG,componentDimensions}=this.__closure;return{opacity:withSpring(isRendered?1:0,ENTRANCE_ANIMATION_SPING_CONFIG,'animate-always'),transform:[{translateY:withSpring(isRendered?0:componentDimensions.height,ENTRANCE_ANIMATION_SPING_CONFIG)}]};}"};
|
||||
value = value.memo(QuestDockWithQuestContext);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDock.tsx');
|
||||
exports.default = value;
|
||||
exports.QuestDockWithEntranceAnimation = closure;
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimation({appThemedBackgroundColor}) { // fn#104240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:5687, offset: 0x0228bc36, size: 2445 bytes, params: 2, frame: 50
|
||||
var object2;
|
||||
let binding = env0_5;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
binding = env0_5;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {questDockWrapperSpecs, activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding,
|
||||
[QuestDockGestureContext]);
|
||||
binding = env0_5;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]);
|
||||
var env0_5 = setRestingQuestDockMode;
|
||||
const value5 = env0_5.useId();
|
||||
const value6 = env0_5.useCallback(function() {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}, [setRestingQuestDockMode]);
|
||||
(require(13569) /* metro dependency 13569: QuestDockHooks */).useQuestDockModeAnimatedReaction();
|
||||
(require(13569) /* metro dependency 13569: QuestDockHooks */).useQuestDockDismissalReset();
|
||||
const value7 = (require(4559) /* metro dependency 4559: useIsScreenReaderEnabledNative */).useIsScreenReaderEnabled();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
let closure = QuestDockWithGestureAnimationK;
|
||||
closure.__closure = {restingQuestDockMode: restingQuestDockMode, QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 2415817673061;
|
||||
closure.__initData = env0_24;
|
||||
const value9 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(Reflect.apply(useDerivedValue,
|
||||
reanimatedRexportModule, [closure]));
|
||||
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
|
||||
const value10 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDock');
|
||||
const value11 = useYouBarTotalHeight();
|
||||
const userStatus = quest.userStatus;
|
||||
const value12 = userStatus?.enrolledAt != null;
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
|
||||
const value13 = Reflect.apply(useToken, useTokenModule, [QUEST_DOCK_BORDER_RADIUS]);
|
||||
const value14 = (importDefault(13652) /* metro dependency 13652: useQuestDockAnimatedBorderRadius */)(value13);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
let useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = QuestDockWithGestureAnimationW;
|
||||
object2 = {appThemedBackgroundColor: appThemedBackgroundColor};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.youBarEnabled = value10;
|
||||
object2.questDockBorderRadius = value13;
|
||||
object2.bottomBorderRadius = value14;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
object2.roundToNearestPixel = (require(13571) /* metro dependency 13571: QuestDockUtils */).roundToNearestPixel;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 8564067641719;
|
||||
closure.__initData = env0_25;
|
||||
const value15 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
const value16 = reanimatedRexportModule.useSharedValue(0);
|
||||
const moduleValue9 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue9.useAnimatedStyle;
|
||||
closure = QuestDockWithGestureAnimationX;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
interpolate: reanimatedRexportModule.interpolate, isPressed: value16, activeQuestDockMode: activeQuestDockMode,
|
||||
QuestDockMode: QuestDockMode, youBarEnabled: value10,
|
||||
springStandard: (require(4581) /* metro dependency 4581: springPresets */).springStandard};
|
||||
closure.__workletHash = 13804511468631;
|
||||
closure.__initData = env0_26;
|
||||
const value17 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
|
||||
const value18 = env0_5.useCallback(function() {
|
||||
setRestingQuestDockMode(QuestDockMode.EXPANDED);
|
||||
}, [setRestingQuestDockMode]);
|
||||
const value19 = env0_5.useCallback(_fun104246, [value16]);
|
||||
const value20 = env0_5.useCallback(_fun104247, [value16]);
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue10.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var object = {};
|
||||
var moduleValue = require(dependencyMap[24]);
|
||||
object.opacity = moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : 1,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object.height = windowDimensions.get().height;
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS: QUEST_DOCK_MODE_CHANGE_PHYSICS, windowDimensions: windowDimensions};
|
||||
closure.__workletHash = 6178969276321;
|
||||
closure.__initData = env0_27;
|
||||
const value21 = Reflect.apply(useAnimatedStyle, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue11.useAnimatedProps;
|
||||
closure = QuestDockWithGestureAnimationF;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 5416180055289;
|
||||
closure.__initData = env0_28;
|
||||
const value22 = Reflect.apply(useAnimatedProps, moduleValue11, [closure]);
|
||||
const moduleValue12 = reanimatedRexportModule;
|
||||
useDerivedValue = moduleValue12.useDerivedValue;
|
||||
closure = QuestDockWithGestureAnimationV;
|
||||
closure.__closure = {questDockWrapperSpecs: questDockWrapperSpecs, windowDimensions: windowDimensions,
|
||||
safeAreaTop: top};
|
||||
closure.__workletHash = 8073454569923;
|
||||
closure.__initData = env0_29;
|
||||
const value24 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(Reflect.apply(useDerivedValue,
|
||||
moduleValue12, [closure]));
|
||||
const moduleValue13 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue13.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[24]);
|
||||
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() === QuestDockMode.CLOSED ? 0 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 1 : 0,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS: QUEST_DOCK_MODE_CHANGE_PHYSICS};
|
||||
closure.__workletHash = 6468803634518;
|
||||
closure.__initData = env0_30;
|
||||
const value25 = Reflect.apply(useAnimatedStyle, moduleValue13, [closure]);
|
||||
const moduleValue14 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue14.useAnimatedStyle;
|
||||
closure = QuestDockWithGestureAnimationZ;
|
||||
object2 = {isEnrolled: value12, activeQuestDockMode: activeQuestDockMode};
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_CONTENT_BORDER_RADII = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
object2.questDockBorderRadius = value13;
|
||||
object2.youBarEnabled = value10;
|
||||
object2.bottomBorderRadius = value14;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
object2.QUEST_DOCK_COLLAPSED_HEIGHT = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
object2.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED = QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 14482794021030;
|
||||
closure.__initData = env0_31;
|
||||
const value26 = Reflect.apply(useAnimatedStyle, moduleValue14, [closure]);
|
||||
const jsxRuntimeEnv0_22Binding = jsxRuntimeEnv0_22;
|
||||
const value27 = 'auto';
|
||||
const AccessibilityViewAnimated = (require(4556) /* metro dependency 4556: AccessibilityViewNative */).AccessibilityViewAnimated;
|
||||
const r5 = value7 ? value9 : !!value7;
|
||||
const QuestDockGestureDetector = importDefault(13653) /* metro dependency 13653: QuestDockGestureDetector */;
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const defaultImport3 = ReanimatedNativeView;
|
||||
const defaultImport3Props = {style: [styles.questDockWrapper, {bottom: value11 - 1}, value15],
|
||||
layout: (require(13571) /* metro dependency 13571: QuestDockUtils */).dimensionsLayoutTransition};
|
||||
const pressableBindingProps = {style: styles.nestedPressable, onPressIn: value19, onPressOut: value20,
|
||||
onPress: value18, pointerEvents: value9 ? 'none' : value27, accessibilityRole: 'button'};
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
pressableBindingProps.accessibilityLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.rjVPdM);
|
||||
pressableBindingProps.accessibilityHint = value9 ? '' : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.n0MlOB);
|
||||
const items2 = [<Pressable {...pressableBindingProps} />];
|
||||
items2[1] = <ReanimatedNativeView style={[styles.questDockHeaderBorder,
|
||||
value26]} layout={(require(13571) /* metro dependency 13571: QuestDockUtils */).dimensionsLayoutTransition} pointerEvents="none" />;
|
||||
items2[2] = <ReanimatedNativeView style={[styles.questDockContentWrapper,
|
||||
value25]}><View style={styles.questDockContentWrapper}>{((Component) => <Component hideOnExpand={value12} />)(importDefault(13654) /* metro dependency 13654: QuestDockContentCollapsed */)}{((Component) => <Component />)(importDefault(13661) /* metro dependency 13661: QuestDockContentExpanded */)}</View>{!value12 && ((Component) => <Component />)(importDefault(13664) /* metro dependency 13664: QuestDockUnenrolledBackground */)}</ReanimatedNativeView>;
|
||||
items2[3] = ((Component) => <Component isExpanded={value9} />)(importDefault(13665) /* metro dependency 13665: QuestDockDragHandle */);
|
||||
const view = <View style={styles.wrapper} pointerEvents={value27}><AccessibilityViewAnimated nativeID={value5} style={styles.accessibilityWrapper} accessibilityViewIsModal={r5} onAccessibilityEscape={value6} pointerEvents="box-none"><QuestDockGestureDetector><ReanimatedNativeView style={value17}>{((Component) => <Component {...defaultImport3Props}>{items2}</Component>)(defaultImport3)}</ReanimatedNativeView></QuestDockGestureDetector></AccessibilityViewAnimated></View>;
|
||||
const defaultImport10 = ReanimatedNativeView;
|
||||
const Backdrop = (require(4562) /* metro dependency 4562: BackdropNative */).Backdrop;
|
||||
return (
|
||||
<>
|
||||
{view}
|
||||
{((Component) => <Component style={value21} animatedProps={value22}><Backdrop onDismiss={value6} accessibleDismissStyle={{height: value24}} /></Component>)(defaultImport10)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestDockModeChangeTracker({mode, questId}) { // fn#104253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:11130, offset: 0x0228ccf8, size: 120 bytes, params: 2, frame: 17
|
||||
const questHooksModule = require(9483) /* metro dependency 9483: QuestHooks */;
|
||||
const useQuestBarOrDockModeChangeTracking = questHooksModule.useQuestBarOrDockModeChangeTracking;
|
||||
const object2 = {mode: mode};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
object2.questId = questId;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(useQuestBarOrDockModeChangeTracking, questHooksModule, [object2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
function QuestBarRenderedTriggerPointWrapper() { // fn#104254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:11381, offset: 0x0228cd70, size: 35 bytes, params: 1, frame: 13
|
||||
env0_5.useEffect(function() {
|
||||
var QuestBarRenderedTriggerPoint = require(dependencyMap[38]).QuestBarRenderedTriggerPoint;
|
||||
QuestBarRenderedTriggerPoint.trigger();
|
||||
}, []);
|
||||
return null;
|
||||
}
|
||||
|
||||
function QuestDockWithEntranceAnimation() { // fn#104256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:12018, offset: 0x0228cdbe, size: 969 bytes, params: 1, frame: 30
|
||||
var r0;
|
||||
var View;
|
||||
var QuestContentImpressionTrackerNative;
|
||||
var object;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
var QUEST_BAR_MOBILE;
|
||||
let binding = env0_5;
|
||||
const value2 = undefined;
|
||||
const {isRendered, isVisibleToUser,
|
||||
quest} = binding.useContext(importDefault(13650) /* metro dependency 13650: QuestDockContext */);
|
||||
let env0_2 = env0_4(env0_5.useState(function() {
|
||||
return global.performance.now();
|
||||
}), 1)[0];
|
||||
const env0_3 = env0_5.useRef(false);
|
||||
const styles = useStyles();
|
||||
const value7 = env0_4(env0_5.useState({'width': 0, 'height': 0}), 2);
|
||||
var property = value7[0];
|
||||
var env0_4 = property;
|
||||
var env0_5 = value7[1];
|
||||
const env0_6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([QuestDockStore], function() {
|
||||
return QuestDockStore.prevRestingQuestDockMode;
|
||||
});
|
||||
const isEligibleForQuests = (require(9479) /* metro dependency 9479: QuestsEligibility */).getIsEligibleForQuests();
|
||||
const value9 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestBarImpressionSurvey(quest);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = QuestDockWithEntranceAnimationC;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
isRendered: isRendered, ENTRANCE_ANIMATION_SPING_CONFIG: env0_33, componentDimensions: property};
|
||||
closure.__workletHash = 15545726338295;
|
||||
closure.__initData = env0_34;
|
||||
const value10 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
binding = env0_5;
|
||||
const value11 = null;
|
||||
var [property, env0_8] = env0_4(binding.useState(value11), 2);
|
||||
const questHooksNativeModule = require(13568) /* metro dependency 13568: QuestHooksNative */;
|
||||
const useQuestDockHeroAsset = questHooksNativeModule.useQuestDockHeroAsset;
|
||||
const staticUrl = Reflect.apply(useQuestDockHeroAsset, questHooksNativeModule, [quest]).staticUrl;
|
||||
const value14 = questHooksNativeModule.useQuestGameLogotypeAssetUrl(quest);
|
||||
const userStatus = quest.userStatus;
|
||||
const result = value11 != (value11 == userStatus ? value2 : userStatus.enrolledAt);
|
||||
const value15 = (require(7701) /* metro dependency 7701: ClientThemesOverrides */).useGradientBottom();
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
||||
const value16 = Reflect.apply(useToken, useTokenModule, [BACKGROUND_SURFACE_HIGH]);
|
||||
const backgroundColor = value11 == value15 ? value2 : value15.backgroundColor;
|
||||
const env0_12 = value11 == backgroundColor ? value16 : backgroundColor;
|
||||
env0_5.useEffect(function() {
|
||||
var env0_0 = _fun104261;
|
||||
var env0_1 = _fun104262;
|
||||
var env0_2 = _fun104265;
|
||||
_fun104269();
|
||||
}, [staticUrl, value14, quest.id]);
|
||||
env0_5.useEffect(_fun104270, [property, quest.id]);
|
||||
let r2 = value11 == quest || !isEligibleForQuests;
|
||||
r2 = !r2 ? !property : r2;
|
||||
env0_5.useEffect(_fun104271, [r2]);
|
||||
if (r2) {
|
||||
r0 = value11;
|
||||
} else {
|
||||
View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
||||
var viewProps = {pointerEvents: 'box-none', style: [styles.wrapperAnimated, value10],
|
||||
onLayout: onLayout_104273};
|
||||
QuestContentImpressionTrackerNative = (require(10183) /* metro dependency 10183: QuestContentImpressionTrackerNative */).QuestContentImpressionTrackerNative;
|
||||
object = {overrideVisibility: isVisibleToUser};
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object.questContent = QUEST_BAR_MOBILE;
|
||||
object.questOrQuests = quest;
|
||||
object.onImpression = value9;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
r0 = <View {...viewProps}><QuestContentImpressionTrackerNative {...object}>{children_104274}</QuestContentImpressionTrackerNative></View>;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function QuestDockWithQuestContext() { // fn#104276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:15188, offset: 0x0228d75e, size: 166 bytes, params: 1, frame: 19
|
||||
const value2 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useMobileQuestDock();
|
||||
const value3 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useIsMobileQuestDockRenderedBase(value2);
|
||||
const value4 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useIsMobileQuestDockVisibleToUser(value2,
|
||||
value3);
|
||||
const value5 = null;
|
||||
if (value5 == value2) {
|
||||
return value5;
|
||||
} else {
|
||||
const Provider = (importDefault(13650) /* metro dependency 13650: QuestDockContext */).Provider;
|
||||
return (
|
||||
<Provider value={{isRendered: value3, isVisibleToUser: value4, quest: value2}}>
|
||||
<QuestDockWithEntranceAnimation />
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationK() { // fn#104242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:6263, owner: QuestDockWithGestureAnimation.K, offset: 0x0228c5e0, size: 35 bytes, params: 1, frame: 9
|
||||
const value = restingQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
return value === EXPANDED;
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationW() { // fn#104243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:6644, owner: QuestDockWithGestureAnimation.W, offset: 0x0228c603, size: 446 bytes, params: 1, frame: 24
|
||||
const object2 = {};
|
||||
object2.backgroundColor = appThemedBackgroundColor;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const activeQuestDockModeBinding = activeQuestDockMode;
|
||||
let get = activeQuestDockModeBinding.get;
|
||||
const value3 = Reflect.apply(get, activeQuestDockModeBinding, []);
|
||||
let COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
object2.borderBottomRightRadius = Reflect.apply(withSpring, springModule,
|
||||
[value3 !== COLLAPSED || env0_7 ? env0_10.get() : env0_9, QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED]);
|
||||
const moduleValue2 = springModule;
|
||||
withSpring = moduleValue2.withSpring;
|
||||
const value5 = activeQuestDockMode.get();
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
object2.borderBottomLeftRadius = Reflect.apply(withSpring, moduleValue2,
|
||||
[value5 !== COLLAPSED || env0_7 ? env0_10.get() : env0_9, QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED]);
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
|
||||
object2.opacity = springModule.withSpring(1, QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
let value = springModule;
|
||||
withSpring = value.withSpring;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
const x = Reflect.apply(get, questDockWrapperSpecsBinding, []).x;
|
||||
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
const roundToNearestPixel = questDockUtilsModule.roundToNearestPixel;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
const items2 = [{translateX: Reflect.apply(withSpring, value, [x + -1 * Reflect.apply(roundToNearestPixel,
|
||||
questDockUtilsModule, [Reflect.apply(get, questDockWrapperSpecsBinding,
|
||||
[]).width / 2]), QUEST_DOCK_MODE_CHANGE_PHYSICS])}];
|
||||
value = springModule;
|
||||
withSpring = value.withSpring;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
items2[1] = {translateY: Reflect.apply(withSpring, value, [Reflect.apply(get, questDockWrapperSpecsBinding, []).y,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS])};
|
||||
object2.transform = items2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationX() { // fn#104244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:7499, owner: QuestDockWithGestureAnimation.X, offset: 0x0228c7c1, size: 198 bytes, params: 1, frame: 22
|
||||
const object = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = reanimatedRexportModule.interpolate;
|
||||
const value3 = env0_11.get();
|
||||
const value4 = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
object.scale = Reflect.apply(withSpring, springModule, [Reflect.apply(interpolate, reanimatedRexportModule, [value3,
|
||||
[1, 0], [value4 === EXPANDED || env0_7 ? 1 : 0.98, 1]]),
|
||||
(require(4581) /* metro dependency 4581: springPresets */).springStandard]);
|
||||
return {transform: [object]};
|
||||
}
|
||||
|
||||
function _fun104246() { // fn#104246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:7939, offset: 0x0228c8a4, size: 24 bytes, params: 1, frame: 11
|
||||
env0_11.set(1);
|
||||
}
|
||||
|
||||
function _fun104247() { // fn#104247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:7980, offset: 0x0228c8bc, size: 23 bytes, params: 1, frame: 11
|
||||
env0_11.set(0);
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationF() { // fn#104249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:8338, owner: QuestDockWithGestureAnimation.F, offset: 0x0228c93c, size: 50 bytes, params: 1, frame: 11
|
||||
const value = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
return {pointerEvents: value !== EXPANDED ? 'none' : 'auto'};
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationV() { // fn#104250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:8527, owner: QuestDockWithGestureAnimation.V, offset: 0x0228c96e, size: 53 bytes, params: 1, frame: 11
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
let get = questDockWrapperSpecsBinding.get;
|
||||
const value2 = Reflect.apply(get, questDockWrapperSpecsBinding, []);
|
||||
const windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
return Reflect.apply(get, windowDimensionsBinding, []).height - top - value2.height;
|
||||
}
|
||||
|
||||
function QuestDockWithGestureAnimationZ() { // fn#104252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:9043, owner: QuestDockWithGestureAnimation.z, offset: 0x0228ca11, size: 743 bytes, params: 1, frame: 23
|
||||
var r1;
|
||||
var r6;
|
||||
var value2;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var value6;
|
||||
var value7;
|
||||
var value9;
|
||||
var value10;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
const object2 = {};
|
||||
if (result) {
|
||||
r1 = env0_9;
|
||||
} else {
|
||||
value2 = activeQuestDockMode.get();
|
||||
value3 = environment.__proto__;
|
||||
r1 = value2 !== QuestDockMode.EXPANDED ? env0_9 : QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
}
|
||||
object2.borderTopLeftRadius = r1;
|
||||
if (result) {
|
||||
r1 = env0_9;
|
||||
} else {
|
||||
value4 = activeQuestDockMode.get();
|
||||
value5 = environment.__proto__;
|
||||
r1 = value4 !== QuestDockMode.EXPANDED ? env0_9 : QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
}
|
||||
object2.borderTopRightRadius = r1;
|
||||
if (result) {
|
||||
r1 = env0_7 ? env0_10.get() : env0_9;
|
||||
} else {
|
||||
value6 = activeQuestDockMode.get();
|
||||
value7 = environment.__proto__;
|
||||
r1 = value6 !== QuestDockMode.EXPANDED ? env0_7 ? env0_10.get() : env0_9 : QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
}
|
||||
object2.borderBottomLeftRadius = r1;
|
||||
if (result) {
|
||||
r1 = env0_7 ? env0_10.get() : env0_9;
|
||||
} else {
|
||||
value9 = activeQuestDockMode.get();
|
||||
value10 = environment.__proto__;
|
||||
r1 = value9 !== QuestDockMode.EXPANDED ? env0_7 ? env0_10.get() : env0_9 : QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
}
|
||||
object2.borderBottomRightRadius = r1;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value13 = activeQuestDockMode.get();
|
||||
let EXPANDED = QuestDockMode.EXPANDED;
|
||||
const value14 = 1;
|
||||
object2.opacity = Reflect.apply(withSpring, springModule, [value13 !== EXPANDED ? value14 : 0,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED]);
|
||||
const value16 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.height = value16 === EXPANDED ? result ? questDockWrapperSpecs.get().height : QUEST_DOCK_COLLAPSED_HEIGHT : questDockWrapperSpecs.get().height;
|
||||
const value17 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.width = value17 !== EXPANDED || result ? questDockWrapperSpecs.get().width : questDockWrapperSpecs.get().width - 2 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
resultBinding = result;
|
||||
const value19 = 0;
|
||||
if (resultBinding) {
|
||||
r1 = value19;
|
||||
} else {
|
||||
moduleValue2 = springModule;
|
||||
r1 = moduleValue2.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? value19 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
}
|
||||
const items2 = [{translateX: r1}];
|
||||
if (result) {
|
||||
r6 = value19;
|
||||
} else {
|
||||
moduleValue3 = springModule;
|
||||
r6 = moduleValue3.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? value19 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
}
|
||||
items2[1] = {translateY: r6};
|
||||
object2.transform = items2;
|
||||
object2.borderBottomWidth = env0_7 ? env0_10.get() > value19 ? value14 : value19 : value14;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function QuestDockWithEntranceAnimationC() { // fn#104259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:12445, owner: QuestDockWithEntranceAnimation.c, offset: 0x0228d196, size: 139 bytes, params: 1, frame: 21
|
||||
const object2 = {};
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const isRenderedBinding = isRendered;
|
||||
const value3 = 0;
|
||||
object2.opacity = Reflect.apply(withSpring, springModule, [isRenderedBinding ? 1 : value3, env1_33,
|
||||
'animate-always']);
|
||||
const moduleValue2 = springModule;
|
||||
object2.transform = [{translateY: moduleValue2.withSpring(isRendered ? value3 : env0_4.height, env1_33)}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun104260() { // fn#104260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13068, offset: 0x0228d221, size: 53 bytes, params: 1, frame: 9
|
||||
const prefetchWithErrorReporting = function(a0) {
|
||||
return _prefetchWithErrorReporting.apply(this, arguments);
|
||||
};
|
||||
(function() {
|
||||
return _preloadQuestDockAssets.apply(this, arguments);
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun104270() { // fn#104270, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13818, offset: 0x0228d408, size: 219 bytes, params: 1, frame: 19
|
||||
var value2;
|
||||
var defaultImport;
|
||||
var increment;
|
||||
var object2;
|
||||
var items2;
|
||||
var value;
|
||||
if (env0_7 === false) {
|
||||
value2 = environment.__proto__;
|
||||
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
||||
increment = defaultImport.increment;
|
||||
object2 = {};
|
||||
object2.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_CONTENT_RENDERING_FAILURE;
|
||||
value = 'quest_id:' + quest.id;
|
||||
items2 = [value];
|
||||
value = require(7120) /* metro dependency 7120: AnalyticsTypes */;
|
||||
value = value.getQuestContentName((require(6531) /* metro dependency 6531: QuestTypes */).QuestContent.QUEST_BAR_MOBILE);
|
||||
items2[1] = 'quest_content:' + value;
|
||||
items2[2] = 'reason:asset_loading_error';
|
||||
object2.tags = items2;
|
||||
Reflect.apply(increment, defaultImport, [object2]);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104271() { // fn#104271, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:14109, offset: 0x0228d4e3, size: 64 bytes, params: 1, frame: 12
|
||||
var environment;
|
||||
const value = environment.__proto__;
|
||||
(require(9484) /* metro dependency 9484: QuestActionCreators */).updateQuestDockVisibilityEligibility({isEligibleToBeVisible: !env0_13});
|
||||
return _fun104272;
|
||||
}
|
||||
|
||||
function QuestDockWithEntranceAnimationOnLayout(a0) { // fn#104273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:14361, owner: QuestDockWithEntranceAnimation.onLayout, offset: 0x0228d552, size: 277 bytes, params: 2, frame: 19
|
||||
var Math;
|
||||
var value4;
|
||||
var value5;
|
||||
var defaultImport;
|
||||
var distribution;
|
||||
const binding = env0_5;
|
||||
let object2 = {};
|
||||
object2.height = a0.nativeEvent.layout.height;
|
||||
object2.width = a0.nativeEvent.layout.width;
|
||||
binding(object2);
|
||||
if (!env0_3.current) {
|
||||
env0_3.current = true;
|
||||
Math = global.Math;
|
||||
if (Math.random() < 0.1) {
|
||||
Math = global.Math;
|
||||
value4 = Math.round(global.performance.now() - env0_2);
|
||||
value5 = environment.__proto__;
|
||||
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
||||
distribution = defaultImport.distribution;
|
||||
object2 = {};
|
||||
object2.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.QUEST_BAR_MOBILE_TIME_TO_FIRST_PAINT;
|
||||
object2.tags = ['quest_id:' + quest.id];
|
||||
Reflect.apply(distribution, defaultImport, [object2, value4]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function QuestDockWithEntranceAnimationChildren() { // fn#104274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:14871, owner: QuestDockWithEntranceAnimation.children, offset: 0x0228d667, size: 224 bytes, params: 1, frame: 24
|
||||
const jsxRuntimeEnv1_22Binding = jsxRuntimeEnv1_22;
|
||||
const id = quest.id;
|
||||
const prevRestingQuestDockModeBinding = prevRestingQuestDockMode;
|
||||
const value3 = undefined;
|
||||
const items2 = [<QuestDockModeChangeTracker questId={id} mode={prevRestingQuestDockModeBinding} />];
|
||||
items2[1] = <QuestBarRenderedTriggerPointWrapper />;
|
||||
const QuestDockGestureContextProvider = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContextProvider;
|
||||
const ThemeContextProvider = (require(3868) /* metro dependency 3868: native */).ThemeContextProvider;
|
||||
const DARK = result ? value3 : ThemeTypes.DARK;
|
||||
items2[2] = <QuestDockGestureContextProvider><ThemeContextProvider theme={DARK}><QuestDockWithGestureAnimation appThemedBackgroundColor={env0_12} /></ThemeContextProvider></QuestDockGestureContextProvider>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _prefetchWithErrorReporting() { // fn#104262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13169, offset: 0x0228d256, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun104264).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _preloadQuestDockAssets() { // fn#104265, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13439, offset: 0x0228d328, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun104267).apply(this, arguments);
|
||||
}
|
||||
|
||||
function _fun104272() { // fn#104272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:14188, offset: 0x0228d523, size: 47 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__.__proto__;
|
||||
(require(9484) /* metro dependency 9484: QuestActionCreators */).updateQuestDockVisibilityEligibility({isEligibleToBeVisible: false});
|
||||
}
|
||||
|
||||
function* _fun104264(a0) { // fn#104264, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13246, offset: 0x0228d296, size: 146 bytes, params: 2, frame: 16
|
||||
var binding;
|
||||
var prefetch;
|
||||
var value3;
|
||||
var value4;
|
||||
var value5;
|
||||
var error;
|
||||
var value6;
|
||||
var track;
|
||||
var QUEST_ASSET_LOADING_FAILURE;
|
||||
var QUESTS_BAR_MOBILE;
|
||||
var id;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
value = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
try {
|
||||
binding = env4_8;
|
||||
} catch (error) {
|
||||
binding = env4_1;
|
||||
value6 = binding(env4_2[43]);
|
||||
track = value6.track;
|
||||
QUEST_ASSET_LOADING_FAILURE = env4_17.QUEST_ASSET_LOADING_FAILURE;
|
||||
QUESTS_BAR_MOBILE = env4_11.QUESTS_BAR_MOBILE;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
id = importDefault.id;
|
||||
Reflect.apply(track, value6, [QUEST_ASSET_LOADING_FAILURE, {source: QUESTS_BAR_MOBILE, quest_id: id,
|
||||
asset_id: a0}]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
prefetch = binding.prefetch;
|
||||
} catch (error) {
|
||||
binding = env4_1;
|
||||
value6 = binding(env4_2[43]);
|
||||
track = value6.track;
|
||||
QUEST_ASSET_LOADING_FAILURE = env4_17.QUEST_ASSET_LOADING_FAILURE;
|
||||
QUESTS_BAR_MOBILE = env4_11.QUESTS_BAR_MOBILE;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
id = importDefault.id;
|
||||
Reflect.apply(track, value6, [QUEST_ASSET_LOADING_FAILURE, {source: QUESTS_BAR_MOBILE, quest_id: id,
|
||||
asset_id: a0}]);
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
value3 = Reflect.apply(prefetch, binding, [a0]);
|
||||
} catch (error) {
|
||||
binding = env4_1;
|
||||
value6 = binding(env4_2[43]);
|
||||
track = value6.track;
|
||||
QUEST_ASSET_LOADING_FAILURE = env4_17.QUEST_ASSET_LOADING_FAILURE;
|
||||
QUESTS_BAR_MOBILE = env4_11.QUESTS_BAR_MOBILE;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
id = importDefault.id;
|
||||
Reflect.apply(track, value6, [QUEST_ASSET_LOADING_FAILURE, {source: QUESTS_BAR_MOBILE, quest_id: id,
|
||||
asset_id: a0}]);
|
||||
return false;
|
||||
}
|
||||
yield value3;
|
||||
try {
|
||||
value4 = undefined;
|
||||
value5 = false;
|
||||
} catch (error) {
|
||||
binding = env4_1;
|
||||
value6 = binding(env4_2[43]);
|
||||
track = value6.track;
|
||||
QUEST_ASSET_LOADING_FAILURE = env4_17.QUEST_ASSET_LOADING_FAILURE;
|
||||
QUESTS_BAR_MOBILE = env4_11.QUESTS_BAR_MOBILE;
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
id = importDefault.id;
|
||||
Reflect.apply(track, value6, [QUEST_ASSET_LOADING_FAILURE, {source: QUESTS_BAR_MOBILE, quest_id: id,
|
||||
asset_id: a0}]);
|
||||
return false;
|
||||
}
|
||||
if (value5) {
|
||||
return value4;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function* _fun104267() { // fn#104267, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13848:13508, offset: 0x0228d368, size: 160 bytes, params: 1, frame: 16
|
||||
var environment;
|
||||
var push;
|
||||
var value3;
|
||||
var value4;
|
||||
if (true) {
|
||||
var items2 = [];
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
if (QuestDockStore != null) {
|
||||
push = items2.push;
|
||||
value3 = environment.__proto__.__proto__;
|
||||
Reflect.apply(push, items2, [isRendered(QuestDockStore)]);
|
||||
}
|
||||
if (QuestDockMode != null) {
|
||||
push = items2.push;
|
||||
value4 = environment.__proto__.__proto__;
|
||||
Reflect.apply(push, items2, [isRendered(QuestDockMode)]);
|
||||
}
|
||||
var Promise = global.Promise;
|
||||
yield Promise.all(items2);
|
||||
var value5 = undefined;
|
||||
if (false) {
|
||||
return value5;
|
||||
}
|
||||
Image(value5.every(function(a0) {
|
||||
return a0 === true;
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/* Metro module 13631; source: modules/quests/native/QuestDock/QuestDockBlurredContentBackground.tsx; dependencies: [31, 27, 33, 4563, 2] */
|
||||
function _fun104099(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104099, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13828:6, offset: 0x022857f3, size: 170 bytes, params: 8, frame: 18
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_4 = (require(33) /* metro dependency 33 */).jsx;
|
||||
value = value.memo(QuestDockBlurredContentBackground);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockBlurredContentBackground.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockBlurredContentBackground({animatedStyle, animatedLayout, blurTheme}) { // fn#104100, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13828:155, offset: 0x0228589d, size: 187 bytes, params: 2, frame: 19
|
||||
const r9 = blurTheme === undefined ? 'dark' : blurTheme;
|
||||
const binding = env0_2;
|
||||
return ((Component) => <Component nativeID="quest-dock-blurred-background" blurTintRgba={binding.useMemo(_fun104102,
|
||||
[r9])} blurAmount={0.5} blurTheme="dark" android_fallbackColor={binding.useMemo(_fun104101,
|
||||
[r9])} style={[StyleSheet.absoluteFillObject,
|
||||
animatedStyle]} layout={animatedLayout} />)(importDefault(4563) /* metro dependency 4563: VisualEffectViewAnimated */);
|
||||
}
|
||||
|
||||
function _fun104101() { // fn#104101, offset: 0x02285958, size: 29 bytes, params: 1, frame: 3
|
||||
return env0_0 !== 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(38, 39, 50, 0.65)';
|
||||
}
|
||||
|
||||
function _fun104102() { // fn#104102, offset: 0x02285975, size: 29 bytes, params: 1, frame: 3
|
||||
return env0_0 !== 'dark' ? 'rgba(255, 255, 255, 0.1)' : 'rgba(38, 39, 50, 0.1)';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/* Metro module 13656; source: modules/quests/native/QuestDock/QuestDockBlurredHeaderPlaceholder.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13573, 13657, 4017, 2] */
|
||||
function _fun104309(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104309, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:6, offset: 0x022902c3, size: 373 bytes, params: 8, frame: 25
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const env0_4 = value2.View;
|
||||
const env0_5 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const {QUEST_DOCK_EXPANDED_HEIGHT,
|
||||
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED} = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value4.jsx;
|
||||
const env0_8 = value4.Fragment;
|
||||
const env0_9 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object5['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object5['top'] = -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
object4.image = object5;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['backgroundColor'] = 'rgba(38, 39, 50, 0.3)';
|
||||
object6['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object4.overlay = object6;
|
||||
const env0_10 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
object4 = {code: 'function QuestDockBlurredHeaderPlaceholderTsx1(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,questDockWrapperSpecs}=this.__closure;return{left:activeQuestDockMode.get()===QuestDockMode.EXPANDED?-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,width:questDockWrapperSpecs.get().width+QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED};}'};
|
||||
value = value.memo(QuestDockBlurredContentBackground_104310);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockBlurredHeaderPlaceholder.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockBlurredContentBackground_104310({animatedLayout, animatedStyle, placeholder}) { // fn#104310, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:843, offset: 0x02290438, size: 341 bytes, params: 2, frame: 23
|
||||
const binding = env0_3;
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {questDockWrapperSpecs, activeQuestDockMode} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
const value3 = binding.useMemo(_fun104311, [placeholder]);
|
||||
const styles = useStyles();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = function() {
|
||||
var object = {};
|
||||
object.left = activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : -QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
object.width = questDockWrapperSpecs.get().width + QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED: QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
questDockWrapperSpecs: questDockWrapperSpecs};
|
||||
closure.__workletHash = 11176778421725;
|
||||
closure.__initData = env0_11;
|
||||
const value4 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
|
||||
const Image = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).Image;
|
||||
return (
|
||||
<>
|
||||
<Image
|
||||
source={value3}
|
||||
style={[styles.image, animatedStyle, value4]}
|
||||
layout={animatedLayout}
|
||||
/>
|
||||
<View style={styles.overlay} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104311() { // fn#104311, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13853:1059, offset: 0x0229058d, size: 90 bytes, params: 1, frame: 17
|
||||
var environment;
|
||||
const object2 = {};
|
||||
let value = environment.__proto__;
|
||||
value = require(13657) /* metro dependency 13657 */;
|
||||
const thumbHashToDataURL = value.thumbHashToDataURL;
|
||||
const Uint8Array = global.Uint8Array;
|
||||
object2.uri = Reflect.apply(thumbHashToDataURL, value, [Uint8Array.from(global.atob(placeholder), function(a0) {
|
||||
return a0.charCodeAt(0);
|
||||
})]);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* Metro module 13572; source: modules/quests/native/QuestDock/QuestDockConstants.tsx; dependencies: [697, 2] */
|
||||
function _fun103169(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13762:6, offset: 0x0225ac14, size: 450 bytes, params: 8, frame: 22
|
||||
var object3;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object3 = {'mass': 0.5, 'damping': 80, 'stiffness': 320};
|
||||
const object4 = {};
|
||||
copyDataProperties(object4, object3, undefined);
|
||||
object4['overshootClamping'] = true;
|
||||
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockConstants.tsx');
|
||||
exports.QUEST_DOCK_COLLAPSED_HEIGHT = 56;
|
||||
exports.QUEST_DOCK_CLOSED_HEIGHT = 22;
|
||||
exports.QUEST_DOCK_EXPANDED_HEIGHT = 400;
|
||||
exports.QUEST_DOCK_EXPANDED_PADDING_BOTTOM = PX_16;
|
||||
exports.QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL = PX_12;
|
||||
exports.QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP = PX_8;
|
||||
exports.QUEST_DOCK_COLLAPSED_MAX_WIDTH = 600;
|
||||
exports.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED = 8;
|
||||
exports.QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED = 8;
|
||||
exports.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED = 0;
|
||||
exports.QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED = 0;
|
||||
exports.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED = 12;
|
||||
exports.QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM = 15;
|
||||
exports.QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM = 15;
|
||||
exports.QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT = 200;
|
||||
exports.QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT = 30;
|
||||
exports.QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY = 200;
|
||||
exports.QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD = 5;
|
||||
exports.QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR = 0.8;
|
||||
exports.QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR = 1.5;
|
||||
exports.QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR = 0.07;
|
||||
exports.QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD = 4;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED = 64;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED_WITH_YOU_BAR = 56;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED = 64;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR = 56;
|
||||
exports.QUEST_DOCK_EXTERNAL_OFFSET_CLOSED = 22;
|
||||
exports.QUEST_DOCK_EXPANDED_CONTENT_PADDING_VERTICAL = 16;
|
||||
exports.QUEST_DOCK_MODE_CHANGE_PHYSICS = object3;
|
||||
exports.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = object4;
|
||||
exports.QUEST_DOCK_CONTENT_BORDER_RADII = lg;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/* Metro module 13654; source: modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx; dependencies: [31, 27, 6528, 13572, 33, 4501, 13650, 13573, 4017, 4577, 8141, 13655, 13660, 2] */
|
||||
function _fun104291(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104291, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:6, offset: 0x0228ecdb, size: 321 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const env0_5 = (require(13572) /* metro dependency 13572: QuestDockConstants */).QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['bottom'] = undefined;
|
||||
object3['zIndex'] = 2;
|
||||
const env0_8 = Reflect.apply(createStyles, createStylesModule, [{questDockContentCollapsed: object3}]);
|
||||
object = {code: 'function QuestDockContentCollapsedTsx1(){const{withSpring,activeQuestDockMode,QuestDockMode,hideOnExpand,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
||||
object = {code: "function QuestDockContentCollapsedTsx2(){const{activeQuestDockMode,QuestDockMode,hideOnExpand}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.COLLAPSED||!hideOnExpand?'auto':'none'};}"};
|
||||
value = value.memo(QuestDockContentCollapsed);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContentCollapsed.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockContentCollapsed({hideOnExpand}) { // fn#104292, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:855, offset: 0x0228ee1c, size: 492 bytes, params: 2, frame: 25
|
||||
const r10 = hideOnExpand === undefined || hideOnExpand;
|
||||
let binding = env0_3;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = userStatus?.enrolledAt != null;
|
||||
binding = env0_3;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const activeQuestDockMode = Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = QuestDockContentCollapsedP;
|
||||
const object2 = {};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.hideOnExpand = r10;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 13361221764426;
|
||||
closure.__initData = env0_9;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue2 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue2.useAnimatedProps;
|
||||
closure = QuestDockContentCollapsedS;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, hideOnExpand: r10};
|
||||
closure.__workletHash = 14339269503421;
|
||||
closure.__initData = env0_10;
|
||||
return ((Component) => <Component style={[styles.questDockContentCollapsed,
|
||||
value5]} animatedProps={Reflect.apply(useAnimatedProps, moduleValue2,
|
||||
[closure])}>{!value4 && ((Component) => <Component />)(importDefault(13655) /* metro dependency 13655: QuestDockUnenrolledHeader */)}{value4 && ((Component) => <Component />)(importDefault(13660) /* metro dependency 13660: QuestDockEnrolledHeader */)}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
|
||||
}
|
||||
|
||||
function QuestDockContentCollapsedP() { // fn#104293, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1124, owner: QuestDockContentCollapsed.p, offset: 0x0228f008, size: 96 bytes, params: 1, frame: 18
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value3 = activeQuestDockMode.get();
|
||||
const COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
const value4 = 1;
|
||||
return {opacity: Reflect.apply(withSpring, springModule, [value3 === COLLAPSED ? value4 : env0_0 ? 0 : value4,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS])};
|
||||
}
|
||||
|
||||
function QuestDockContentCollapsedS() { // fn#104294, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13851:1400, owner: QuestDockContentCollapsed.S, offset: 0x0228f068, size: 63 bytes, params: 1, frame: 13
|
||||
const value2 = activeQuestDockMode.get();
|
||||
const COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
const value4 = 'auto';
|
||||
return {pointerEvents: value2 === COLLAPSED ? value4 : env0_0 ? 'none' : value4};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
/* 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] */
|
||||
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 = importAll(31) /* metro dependency 31 */;
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_5 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const env0_6 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_7 = value3.jsx;
|
||||
const env0_8 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
const object3 = {};
|
||||
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
||||
object3['bottom'] = undefined;
|
||||
object3['display'] = 'flex';
|
||||
object3['zIndex'] = 1;
|
||||
const env0_9 = Reflect.apply(createStyles, createStylesModule, [{wrapper: object3}]);
|
||||
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);
|
||||
(require(2) /* metro dependency 2 */).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,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {activeQuestDockMode, questDockWrapperSpecs, windowDimensions} = Reflect.apply(useContext, binding,
|
||||
[QuestDockGestureContext]);
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = (userStatus == null ? value2 : userStatus.enrolledAt) != null;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
const closure = QuestDockContentExpandedN;
|
||||
const object2 = {isEnrolled: value4};
|
||||
object2.QUEST_DOCK_EXPANDED_HEIGHT = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object2.windowDimensions = windowDimensions;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 17161265612101;
|
||||
closure.__initData = env0_10;
|
||||
const value5 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
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 object2 = {};
|
||||
const QUEST_DOCK_EXPANDED_HEIGHT2 = result ? undefined : QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object2.height = QUEST_DOCK_EXPANDED_HEIGHT2;
|
||||
let windowDimensionsBinding = windowDimensions;
|
||||
let get = windowDimensionsBinding.get;
|
||||
let width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
object2.width = width;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const value5 = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.opacity = Reflect.apply(withSpring, springModule, [value5 !== EXPANDED ? 0 : 1,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS]);
|
||||
const moduleValue2 = springModule;
|
||||
withSpring = moduleValue2.withSpring;
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
|
||||
windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
object2.transform = [{translateX: Reflect.apply(withSpring, moduleValue2, [(width - Reflect.apply(get,
|
||||
windowDimensionsBinding, []).width) / 2, QUEST_DOCK_MODE_CHANGE_PHYSICS])}];
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/* Metro module 13650; source: modules/quests/native/QuestDock/QuestDockContext.tsx; dependencies: [31, 2] */
|
||||
function _fun104238(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13847:6, offset: 0x0228b7e7, size: 124 bytes, params: 8, frame: 17
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
value = value.createContext({'quest': null, 'isRendered': false, 'isVisibleToUser': false, quest: undefined});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContext.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
/* Metro module 13577; source: modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx; dependencies: [5, 31, 661, 33, 7114, 9483, 9505, 6805, 6807, 10638, 7972, 9520, 6531, 7120, 4080, 4060, 1244, 13578, 9519, 9517, 9518, 7121, 7110, 9480, 10139, 13580, 5312, 9484, 13583, 8653, 13584, 13586, 13588, 8999, 7007, 6797, 2] */
|
||||
function _fun103202(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:6, offset: 0x0225bf63, size: 185 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(661) /* metro dependency 661: Constants */).UserSettingsSections;
|
||||
const value = require(33) /* metro dependency 33 */;
|
||||
const env0_5 = value.jsx;
|
||||
const env0_6 = value.jsxs;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockContextMenuActionSheet.tsx');
|
||||
exports.default = QuestDockContextMenuActionSheet;
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheet({quest}) { // fn#103203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:180, offset: 0x0225c01c, size: 2479 bytes, params: 2, frame: 35
|
||||
var r8;
|
||||
var r5;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
var object19;
|
||||
var object;
|
||||
var items4;
|
||||
var object2;
|
||||
var object4;
|
||||
var object5;
|
||||
var object6;
|
||||
const EyeIcon = (require(8999) /* metro dependency 8999: EyeIcon */).EyeIcon;
|
||||
var object7;
|
||||
var object8;
|
||||
var value;
|
||||
const questUtilsModule = require(7114) /* metro dependency 7114: QuestUtils */;
|
||||
const isShareableQuest2 = questUtilsModule.isShareableQuest(quest.config);
|
||||
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestPreviewActions(quest.id);
|
||||
const env0_1 = value2.handleComplete;
|
||||
const env0_2 = value2.handleProgress;
|
||||
const env0_3 = value2.handleResetDismissibilityClick;
|
||||
const env0_4 = value2.handleResetStatusClick;
|
||||
const externalCtaLabel = (require(9505) /* metro dependency 9505: QuestCopyUtils */).getExternalCtaLabel(quest);
|
||||
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
||||
const ActionSheetRow = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
let Group = ActionSheetRow.Group;
|
||||
const object9 = {};
|
||||
const ActionSheetRow2 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
let Icon = ActionSheetRow2.Icon;
|
||||
const LinkExternalMediumIcon = (require(10638) /* metro dependency 10638: LinkExternalMediumIcon */).LinkExternalMediumIcon;
|
||||
object9.icon = <Icon IconComponent={LinkExternalMediumIcon} />;
|
||||
const FormLabel = (require(7972) /* metro dependency 7972: native */).FormLabel;
|
||||
object9.label = <FormLabel text={externalCtaLabel} />;
|
||||
object9.onPress = onPress_103204;
|
||||
const actionSheetRow = <ActionSheetRow {...object9} />;
|
||||
if (isShareableQuest2) {
|
||||
r8 = <ActionSheetRow icon={((Icon) => <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />)((require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon)} label={<FormLabel text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WqhZss)} />} onPress={onPress_103205} />;
|
||||
} else {
|
||||
r8 = isShareableQuest2;
|
||||
}
|
||||
const items2 = [<Group hasIcons>{actionSheetRow}{r8}</Group>];
|
||||
Group = ActionSheetRow.Group;
|
||||
const object11 = {};
|
||||
const ActionSheetRow4 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
Icon = ActionSheetRow4.Icon;
|
||||
object11.icon = <Icon IconComponent={importDefault(13578) /* metro dependency 13578: WreathIcon */} />;
|
||||
let string = intl.string;
|
||||
const LLLLPD = (require(1244) /* metro dependency 1244: indexNative */).t.LLLLPD;
|
||||
object11.label = <FormLabel text={Reflect.apply(string, intl, [LLLLPD])} />;
|
||||
object11.onPress = onPress_103206;
|
||||
const items3 = [<ActionSheetRow {...object11} />];
|
||||
const object12 = {};
|
||||
const ActionSheetRow5 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
Icon = ActionSheetRow5.Icon;
|
||||
const CircleQuestionIcon = (require(10139) /* metro dependency 10139: CircleQuestionIcon */).CircleQuestionIcon;
|
||||
object12.icon = <Icon IconComponent={CircleQuestionIcon} />;
|
||||
string = intl.string;
|
||||
const GcsZKJ = (require(1244) /* metro dependency 1244: indexNative */).t.GcsZKJ;
|
||||
object12.label = <FormLabel text={Reflect.apply(string, intl, [GcsZKJ])} />;
|
||||
object12.onPress = onPress_103207;
|
||||
items3[1] = <ActionSheetRow {...object12} />;
|
||||
const object14 = {};
|
||||
const ActionSheetRow6 = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow;
|
||||
Icon = ActionSheetRow6.Icon;
|
||||
const XSmallIcon = (require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon;
|
||||
object14.icon = <Icon IconComponent={XSmallIcon} />;
|
||||
string = intl.string;
|
||||
const NN79E9 = (require(1244) /* metro dependency 1244: indexNative */).t.NN79E9;
|
||||
object14.label = <FormLabel text={Reflect.apply(string, intl, [NN79E9])} />;
|
||||
string = intl.string;
|
||||
const V6htN5 = (require(1244) /* metro dependency 1244: indexNative */).t.V6htN5;
|
||||
object14.subLabel = Reflect.apply(string, intl, [V6htN5]);
|
||||
object14.onPress = env0_3(_fun103209);
|
||||
items3[2] = <ActionSheetRow {...object14} />;
|
||||
items2[1] = <Group hasIcons>{items3}</Group>;
|
||||
const preview = quest.preview;
|
||||
if (preview) {
|
||||
Group = ActionSheetRow.Group;
|
||||
var groupProps = {title: intl.string(t['Ape+mm']), hasIcons: true};
|
||||
object = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object.icon = <Icon IconComponent={(require(8653) /* metro dependency 8653: TrophyIcon */).TrophyIcon} />;
|
||||
string = intl.string;
|
||||
object.label = <FormLabel text={Reflect.apply(string, intl, [t.jQEfRT])} />;
|
||||
object.onPress = onPress_103210;
|
||||
value = <ActionSheetRow {...object} />;
|
||||
items4 = [value];
|
||||
object2 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object2.icon = <Icon IconComponent={(require(13584) /* metro dependency 13584: RedoIcon */).RedoIcon} />;
|
||||
string = intl.string;
|
||||
object2.label = <FormLabel text={Reflect.apply(string, intl, [t.cKSLr4])} />;
|
||||
object2.onPress = onPress_103211;
|
||||
items4[1] = <ActionSheetRow {...object2} />;
|
||||
object4 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object4.icon = <Icon IconComponent={(require(13586) /* metro dependency 13586: UndoIcon */).UndoIcon} />;
|
||||
string = intl.string;
|
||||
object4.label = <FormLabel text={Reflect.apply(string, intl, [t.taqkwK])} />;
|
||||
object4.onPress = onPress_103212;
|
||||
items4[2] = <ActionSheetRow {...object4} />;
|
||||
object5 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object5.icon = <Icon IconComponent={(require(13588) /* metro dependency 13588: UnsendIcon */).UnsendIcon} />;
|
||||
string = intl.string;
|
||||
object5.label = <FormLabel text={Reflect.apply(string, intl, [t.JF6W66])} />;
|
||||
object5.onPress = onPress_103213;
|
||||
items4[3] = <ActionSheetRow {...object5} />;
|
||||
object6 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object6.icon = <Icon IconComponent={EyeIcon} />;
|
||||
string = intl.string;
|
||||
object6.label = <FormLabel text={Reflect.apply(string, intl, [t['lL6/zF']])} />;
|
||||
object6.onPress = onPress_103214;
|
||||
items4[4] = <ActionSheetRow {...object6} />;
|
||||
object7 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object7.icon = <Icon IconComponent={EyeIcon} />;
|
||||
string = intl.string;
|
||||
object7.label = <FormLabel text={Reflect.apply(string, intl, [t.tx5Ax5])} />;
|
||||
object7.onPress = onPress_103215;
|
||||
items4[5] = <ActionSheetRow {...object7} />;
|
||||
object8 = {};
|
||||
Icon = (require(6807) /* metro dependency 6807: ActionSheetRowNative */).ActionSheetRow.Icon;
|
||||
object8.icon = <Icon IconComponent={(require(4060) /* metro dependency 4060: CopyIcon */).CopyIcon} />;
|
||||
string = intl.string;
|
||||
object8.label = <FormLabel text={Reflect.apply(string, intl, [t.oisrFi])} />;
|
||||
object8.onPress = onPress_103216;
|
||||
items4[6] = <ActionSheetRow {...object8} />;
|
||||
value = <Group {...groupProps}>{items4}</Group>;
|
||||
r5 = value;
|
||||
} else {
|
||||
r5 = preview;
|
||||
}
|
||||
items2[2] = r5;
|
||||
return (
|
||||
<ActionSheet>
|
||||
{items2}
|
||||
</ActionSheet>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress() { // fn#103204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:693, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225c9cb, size: 157 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const questPlatformUtilsModule = require(9520) /* metro dependency 9520: QuestPlatformUtils */;
|
||||
const openGameLinkDirectly = questPlatformUtilsModule.openGameLinkDirectly;
|
||||
const questBinding = quest;
|
||||
const object2 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.content = QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_OPEN_GAME_LINK = QuestContentCTA.CONTEXT_MENU_OPEN_GAME_LINK;
|
||||
object2.ctaContent = CONTEXT_MENU_OPEN_GAME_LINK;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(openGameLinkDirectly, questPlatformUtilsModule, [questBinding, object2]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103205() { // fn#103205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:1114, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225ca68, size: 162 bytes, params: 1, frame: 19
|
||||
const value = environment.__proto__;
|
||||
const questCopyUtilsModule = require(9505) /* metro dependency 9505: QuestCopyUtils */;
|
||||
const copyShareLink = questCopyUtilsModule.copyShareLink;
|
||||
const id = quest.id;
|
||||
const object2 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.content = QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_COPY_LINK = QuestContentCTA.CONTEXT_MENU_COPY_LINK;
|
||||
object2.ctaContent = CONTEXT_MENU_COPY_LINK;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(copyShareLink, questCopyUtilsModule, [id, object2]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103206() { // fn#103206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:1570, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cb0a, size: 499 bytes, params: 1, frame: 18
|
||||
var moduleValue2;
|
||||
var trackQuestContentClicked;
|
||||
var object2;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
var QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
var moduleValue3;
|
||||
var captureAdUserAction;
|
||||
const value = environment.__proto__;
|
||||
const adAnalyticsInterfaceExperimentModule = require(9519) /* metro dependency 9519: AdAnalyticsInterfaceExperiment */;
|
||||
const shouldMigrateToAdAnalyticsInterface = adAnalyticsInterfaceExperimentModule.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = adAnalyticsInterfaceExperimentModule.AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, adAnalyticsInterfaceExperimentModule,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_dock_context_menu'])) {
|
||||
moduleValue3 = require(9517) /* metro dependency 9517: captureAdUserAction */;
|
||||
captureAdUserAction = moduleValue3.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = (require(9518) /* metro dependency 9518: captureAdUserActionTypes */).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = quest.id;
|
||||
object2.questContentCTA = QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.surfaceId = QUEST_BAR_MOBILE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(captureAdUserAction, moduleValue3, [object2]);
|
||||
} else {
|
||||
moduleValue2 = require(7110) /* metro dependency 7110: AnalyticsActions */;
|
||||
trackQuestContentClicked = moduleValue2.trackQuestContentClicked;
|
||||
object2 = {};
|
||||
object2.questId = quest.id;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
object2.questContentCTA = QuestContentCTA.CONTEXT_MENU_LEARN_MORE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(trackQuestContentClicked, moduleValue2, [object2]);
|
||||
}
|
||||
const questUtilsNativeModule = require(9480) /* metro dependency 9480: QuestUtilsNative */;
|
||||
const openQuestHome = questUtilsNativeModule.openQuestHome;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
Reflect.apply(openQuestHome, questUtilsNativeModule, [{scrollToQuestId: quest.id, fromContent: QUEST_BAR_MOBILE}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103207() { // fn#103207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:2570, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225ccfd, size: 175 bytes, params: 1, frame: 18
|
||||
const value = environment.__proto__;
|
||||
const defaultImport = importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */;
|
||||
const showModal = defaultImport.showModal;
|
||||
const object3 = {};
|
||||
object3.quest = quest;
|
||||
object3.isTargetedDisclosure = true;
|
||||
const object4 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object4.content = QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
object4.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object4.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
object3.trackingCtx = object4;
|
||||
Reflect.apply(showModal, defaultImport, [object3]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function* _fun103209() { // fn#103209, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:3076, offset: 0x0225cdb7, size: 525 bytes, params: 1, frame: 21
|
||||
var value8;
|
||||
var trackQuestContentClicked;
|
||||
var object2;
|
||||
var value9;
|
||||
var captureAdUserAction;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
var value3 = binding(binding2[27]);
|
||||
var dismissQuestContent = value3.dismissQuestContent;
|
||||
var id = require.id;
|
||||
var QuestContent = binding(binding2[12]).QuestContent;
|
||||
var QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
var value5 = Reflect.apply(dismissQuestContent, value3, [id, QUEST_BAR_MOBILE]);
|
||||
env2_1(binding2[14]).hideActionSheet();
|
||||
var value7 = binding(binding2[18]);
|
||||
var shouldMigrateToAdAnalyticsInterface = value7.shouldMigrateToAdAnalyticsInterface;
|
||||
var AdAnalyticsInterfaceExperimentStep = binding(binding2[18]).AdAnalyticsInterfaceExperimentStep;
|
||||
var STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
var shouldMigrateToAdAnalyticsInterface2 = Reflect.apply(shouldMigrateToAdAnalyticsInterface, value7,
|
||||
[STEP_2_CLICKED_INTERNAL, 'quest_dock_context_menu']);
|
||||
binding = env2_0;
|
||||
var binding4 = env2_2;
|
||||
if (shouldMigrateToAdAnalyticsInterface2) {
|
||||
value9 = binding(binding4[19]);
|
||||
captureAdUserAction = value9.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = binding(binding4[20]).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = binding(binding4[21]).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = require.id;
|
||||
object2.questContentCTA = binding(binding4[13]).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
|
||||
QuestContent = binding(binding4[12]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.surfaceId = QUEST_BAR_MOBILE;
|
||||
QuestContent = binding(binding4[12]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(captureAdUserAction, value9, [object2]);
|
||||
} else {
|
||||
value8 = binding(binding4[22]);
|
||||
trackQuestContentClicked = value8.trackQuestContentClicked;
|
||||
object2 = {};
|
||||
object2.questId = require.id;
|
||||
QuestContent = binding(binding4[12]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
object2.questContentCTA = binding(binding4[13]).QuestContentCTA.CONTEXT_MENU_HIDE_CONTENT;
|
||||
QuestContent = binding(binding4[12]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
Reflect.apply(trackQuestContentClicked, value8, [object2]);
|
||||
}
|
||||
yield value5;
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
env2_0(env2_2[28]).displayQuestDismissalToast();
|
||||
}
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103210() { // fn#103210, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4226, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cfc4, size: 48 bytes, params: 1, frame: 12
|
||||
handleComplete();
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103211() { // fn#103211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4444, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225cff4, size: 95 bytes, params: 1, frame: 12
|
||||
const handleProgressBinding = handleProgress;
|
||||
const Math = global.Math;
|
||||
handleProgressBinding(0.9 * Math.random() + 0.03);
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103212() { // fn#103212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4682, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d053, size: 48 bytes, params: 1, frame: 12
|
||||
handleResetStatusClick();
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103213() { // fn#103213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:4902, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d083, size: 48 bytes, params: 1, frame: 12
|
||||
handleResetDismissibilityClick();
|
||||
const value = environment.__proto__;
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103214() { // fn#103214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5122, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d0b3, size: 109 bytes, params: 1, frame: 17
|
||||
const value = environment.__proto__;
|
||||
const questActionCreatorsModule = require(9484) /* metro dependency 9484: QuestActionCreators */;
|
||||
const markAdContentUnseen = questActionCreatorsModule.markAdContentUnseen;
|
||||
const AdCreativeType = (require(7121) /* metro dependency 7121: AdCreativeType */).AdCreativeType;
|
||||
const QUEST = AdCreativeType.QUEST;
|
||||
Reflect.apply(markAdContentUnseen, questActionCreatorsModule, [QUEST, [quest.id]]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103215() { // fn#103215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5402, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d120, size: 105 bytes, params: 1, frame: 16
|
||||
const value = environment.__proto__;
|
||||
const openUserSettingsModule = require(7007) /* metro dependency 7007: openUserSettings */;
|
||||
const openUserSettings = openUserSettingsModule.openUserSettings;
|
||||
const QUEST_PREVIEW_TOOL_2 = UserSettingsSections.QUEST_PREVIEW_TOOL_2;
|
||||
Reflect.apply(openUserSettings, openUserSettingsModule, [{screen: QUEST_PREVIEW_TOOL_2,
|
||||
params: {questId: quest.id}}]);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
function QuestDockContextMenuActionSheetOnPress_103216() { // fn#103216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13767:5697, owner: QuestDockContextMenuActionSheet.onPress, offset: 0x0225d189, size: 76 bytes, params: 1, frame: 14
|
||||
const value = environment.__proto__;
|
||||
const clipboardUtilsNativeModule = require(6797) /* metro dependency 6797: ClipboardUtilsNative */;
|
||||
clipboardUtilsNativeModule.copy(quest.id);
|
||||
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
/* Metro module 13665; source: modules/quests/native/QuestDock/QuestDockDragHandle.tsx; dependencies: [31, 27, 6528, 13572, 7553, 33, 4501, 13650, 13573, 5176, 4017, 4577, 8141, 13571, 6515, 1244, 2] */
|
||||
function _fun104360(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:6, offset: 0x02293cfa, size: 460 bytes, params: 8, frame: 24
|
||||
var object4;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const StyleSheet = (require(27) /* metro dependency 27 */).StyleSheet;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_5 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const env0_6 = questDockConstantsModule.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
const env0_7 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_MAX_WIDTH;
|
||||
const env0_8 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarHorizontalMargin;
|
||||
const value3 = require(33) /* metro dependency 33 */;
|
||||
const env0_9 = value3.jsx;
|
||||
const env0_10 = value3.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object4 = {};
|
||||
const object5 = {};
|
||||
copyDataProperties(object5, StyleSheet.absoluteFillObject, undefined);
|
||||
object5['bottom'] = undefined;
|
||||
object5['right'] = undefined;
|
||||
object5['zIndex'] = 4;
|
||||
object4.dragHandleWrapper = object5;
|
||||
const object6 = {};
|
||||
copyDataProperties(object6, StyleSheet.absoluteFillObject, undefined);
|
||||
object6['bottom'] = undefined;
|
||||
object4.dragHandleOverlay = object6;
|
||||
const env0_11 = Reflect.apply(createStyles, createStylesModule, [object4]);
|
||||
object4 = {code: 'function getDragHandleOffsetLeft_QuestDockDragHandleTsx1(activeQuestDockMode,horizontalEdgeGutter,withYouBar){const{QuestDockMode}=this.__closure;if(withYouBar){switch(activeQuestDockMode){case QuestDockMode.EXPANDED:return 0;default:return horizontalEdgeGutter*-1;}}else{switch(activeQuestDockMode){case QuestDockMode.COLLAPSED:return horizontalEdgeGutter*-1;default:return 0;}}}'};
|
||||
const env0_13 = _fun104361();
|
||||
object4 = {code: 'function QuestDockDragHandleTsx2(){const{windowDimensions,QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return{width:Math.min(windowDimensions.get().width,QUEST_DOCK_COLLAPSED_MAX_WIDTH)};}'};
|
||||
object4 = {code: 'function QuestDockDragHandleTsx3(){const{getDragHandleOffsetLeft,activeQuestDockMode,questDockHorizontalGutterCollapsed,youBarEnabled}=this.__closure;return{left:getDragHandleOffsetLeft(activeQuestDockMode.get(),questDockHorizontalGutterCollapsed,youBarEnabled)};}'};
|
||||
object4 = {code: 'function QuestDockDragHandleTsx4(){const{withSpring,isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(isEnrolled||activeQuestDockMode.get()===QuestDockMode.CLOSED||activeQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
||||
object4 = {code: 'function QuestDockDragHandleTsx5(){const{withSpring,isEnrolled,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{opacity:withSpring(!isEnrolled&&activeQuestDockMode.get()!==QuestDockMode.CLOSED&&activeQuestDockMode.get()!==QuestDockMode.SOFT_DISMISSED?0.5:0,QUEST_DOCK_MODE_CHANGE_PHYSICS)};}'};
|
||||
value = value.memo(QuestDockDragHandle);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockDragHandle.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun104361() { // fn#104361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:900, offset: 0x02293ec6, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = getDragHandleOffsetLeft;
|
||||
closure.__closure = {QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 3634410156103;
|
||||
closure.__initData = env0_12;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function QuestDockDragHandle({isExpanded}) { // fn#104363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:2358, offset: 0x02293f45, size: 973 bytes, params: 2, frame: 31
|
||||
var object2;
|
||||
const binding = env0_3;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
const userStatus = quest.userStatus;
|
||||
const value4 = userStatus?.enrolledAt != null;
|
||||
const value5 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockDragHandle');
|
||||
const r15 = value5 ? useYouBarHorizontalMargin() : QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
let closure = function() {
|
||||
var object = {};
|
||||
var Math = global.Math;
|
||||
object.width = Math.min(windowDimensions.get().width, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {windowDimensions: windowDimensions,
|
||||
QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
|
||||
closure.__workletHash = 13640576219747;
|
||||
closure.__initData = env0_14;
|
||||
const value7 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue3.useAnimatedStyle;
|
||||
closure = QuestDockDragHandleH;
|
||||
closure.__closure = {getDragHandleOffsetLeft: env0_13, activeQuestDockMode: activeQuestDockMode,
|
||||
questDockHorizontalGutterCollapsed: r15, youBarEnabled: value5};
|
||||
closure.__workletHash = 14041713732815;
|
||||
closure.__initData = env0_15;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, moduleValue3, [closure]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[11]);
|
||||
return {opacity: moduleValue.withSpring(result || activeQuestDockMode.get() === QuestDockMode.CLOSED ? 1 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 0 : 1,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
|
||||
};
|
||||
object2 = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isEnrolled: value4,
|
||||
activeQuestDockMode: activeQuestDockMode};
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 12299455640931;
|
||||
closure.__initData = env0_16;
|
||||
const value9 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
||||
const moduleValue5 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue5.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[11]);
|
||||
return {opacity: moduleValue.withSpring(result || activeQuestDockMode.get() === QuestDockMode.CLOSED ? 0 : activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED ? 0.5 : 0,
|
||||
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS)};
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, isEnrolled: value4,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS: QUEST_DOCK_MODE_CHANGE_PHYSICS};
|
||||
closure.__workletHash = 9632835517209;
|
||||
closure.__initData = env0_17;
|
||||
const value10 = Reflect.apply(useAnimatedStyle, moduleValue5, [closure]);
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const items3 = [styles.dragHandleWrapper, value7];
|
||||
const defaultImport2 = ReanimatedNativeView;
|
||||
const dimensionsLayoutTransition = (require(13571) /* metro dependency 13571: QuestDockUtils */).dimensionsLayoutTransition;
|
||||
const defaultImport3 = ReanimatedNativeView;
|
||||
const items2 = [styles.dragHandleOverlay, value10];
|
||||
const ActionSheetHeaderBar = (require(6515) /* metro dependency 6515: ActionSheetHeaderBarNative */).ActionSheetHeaderBar;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const string = intl.string;
|
||||
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
||||
return (
|
||||
<ReanimatedNativeView style={items3}>
|
||||
{((Component) => <Component style={value8} layout={dimensionsLayoutTransition}>{((Component) => <Component style={items2}><ActionSheetHeaderBar variant="overlay" accessibilityLabel={isExpanded ? Reflect.apply(string,
|
||||
intl, [t['GQ+4bk']]) : Reflect.apply(string, intl,
|
||||
[t.Yplnt6])} /></Component>)(defaultImport3)}<ReanimatedNativeView style={[styles.dragHandleOverlay,
|
||||
value9]} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants"><ActionSheetHeaderBar variant="default" /></ReanimatedNativeView></Component>)(defaultImport2)}
|
||||
</ReanimatedNativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function getDragHandleOffsetLeft(a0, a1, a2) { // fn#104362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:939, offset: 0x02293eff, size: 70 bytes, params: 4, frame: 5
|
||||
const value = environment.__proto__;
|
||||
return a2 ? a0 === QuestDockMode.EXPANDED ? 0 : -1 * a1 : a0 !== QuestDockMode.COLLAPSED ? 0 : -1 * a1;
|
||||
}
|
||||
|
||||
function QuestDockDragHandleH() { // fn#104365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13862:2883, owner: QuestDockDragHandle.H, offset: 0x02294349, size: 48 bytes, params: 1, frame: 16
|
||||
const object2 = {};
|
||||
object2.left = env1_13(activeQuestDockMode.get(), env0_4, env0_3);
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
/* Metro module 13663; source: modules/quests/native/QuestDock/QuestDockEnrolledBody.tsx; dependencies: [5, 31, 27, 13570, 6528, 13572, 33, 4501, 697, 13576, 13573, 8621, 13568, 13595, 6531, 13592, 13591, 13593, 1585, 5176, 7116, 2] */
|
||||
function _fun104337(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104337, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:6, offset: 0x022929cd, size: 517 bytes, params: 8, frame: 24
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_7 = questConstantsModule.QuestDockMode;
|
||||
const env0_8 = questConstantsModule.QuestsExperimentLocations;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP = questDockConstantsModule.QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP;
|
||||
const env0_9 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
const QUEST_DOCK_EXPANDED_PADDING_BOTTOM = questDockConstantsModule.QUEST_DOCK_EXPANDED_PADDING_BOTTOM;
|
||||
const QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL = questDockConstantsModule.QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value4.jsx;
|
||||
const env0_12 = value4.Fragment;
|
||||
const env0_13 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.wrapper = {'flexGrow': 0, 'flexShrink': 0, paddingBottom: QUEST_DOCK_EXPANDED_PADDING_BOTTOM,
|
||||
paddingTop: QUEST_DOCK_EXPANDED_ENROLLED_PADDING_TOP, paddingHorizontal: QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL};
|
||||
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.headerWrapper = {marginBottom: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.contentWrapper = {'display': 'flex', 'gap': null, 'flexGrow': 0, 'flexShrink': 0, gap: PX_16};
|
||||
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
||||
object2.footer = {marginTop: PX_16};
|
||||
object2.footerWrapper = {marginLeft: -1 * QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL,
|
||||
marginRight: -1 * QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL};
|
||||
const env0_14 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(QuestDockEnrolledBody);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockEnrolledBody.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function EnrolledBodyWatchTask({quest}) { // fn#104338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:733, offset: 0x02292bd2, size: 643 bytes, params: 2, frame: 29
|
||||
const styles = useStyles();
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]);
|
||||
binding = env0_4;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const questDockWrapperSpecs = Reflect.apply(useContext, binding, [QuestDockGestureContext]).questDockWrapperSpecs;
|
||||
const value3 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(restingQuestDockMode);
|
||||
const value4 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
var env0_4 = value4;
|
||||
env0_4.useEffect(_fun104339, [value3, questDockWrapperSpecs, quest.id, setRestingQuestDockMode, value4]);
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
const QuestBottomSheetHeader = importDefault(13592) /* metro dependency 13592: QuestBottomSheetHeader */;
|
||||
const QuestBottomSheetStep = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetStep;
|
||||
let TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
|
||||
let QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
const items2 = [<View style={styles.headerWrapper}><QuestBottomSheetHeader quest={quest} step={TASK_STATUS} withActionSheet location={QUESTS_BAR_MOBILE} /></View>];
|
||||
const QuestBottomSheetContent = (require(13591) /* metro dependency 13591: QuestBottomSheet */).QuestBottomSheetContent;
|
||||
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
items2[1] = <View style={styles.contentWrapper}><QuestBottomSheetContent quest={quest} location={QUESTS_BAR_MOBILE} step={TASK_STATUS} sourceQuestContent={QUEST_BAR_MOBILE} /></View>;
|
||||
const questBottomSheetFooter = importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
|
||||
TASK_STATUS = QuestBottomSheetStep.TASK_STATUS;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
items2[2] = <View style={styles.footerWrapper}>{((Component) => <Component quest={quest} step={TASK_STATUS} style={styles.footer} withSafeArea={false} sourceQuestContent={QUEST_BAR_MOBILE} />)(questBottomSheetFooter)}</View>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function EnrolledBodyPlayStreamTask({quest}) { // fn#104344, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:2070, offset: 0x02292f93, size: 532 bytes, params: 2, frame: 33
|
||||
const styles = useStyles();
|
||||
const questBottomSheetModule = require(13591) /* metro dependency 13591: QuestBottomSheet */;
|
||||
const useEnrolledQuestContentProps = questBottomSheetModule.useEnrolledQuestContentProps;
|
||||
const object2 = {quest: quest};
|
||||
let QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
object2.location = QUESTS_BAR_MOBILE;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
const {step, defibrillator, stepActions, handleTaskSelect,
|
||||
showMicrophone} = Reflect.apply(useEnrolledQuestContentProps, questBottomSheetModule, [object2]);
|
||||
const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12;
|
||||
const QuestBottomSheetHeader = importDefault(13592) /* metro dependency 13592: QuestBottomSheetHeader */;
|
||||
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
const items2 = [<View style={styles.headerWrapper}><QuestBottomSheetHeader quest={quest} step={step} withActionSheet location={QUESTS_BAR_MOBILE} /></View>];
|
||||
const QuestBottomSheetContent = questBottomSheetModule.QuestBottomSheetContent;
|
||||
QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
items2[1] = <View style={styles.contentWrapper}><QuestBottomSheetContent defibrillator={defibrillator} quest={quest} handleTaskSelect={handleTaskSelect} location={QUESTS_BAR_MOBILE} showMicrophone={showMicrophone} step={step} sourceQuestContent={QUEST_BAR_MOBILE} /></View>;
|
||||
const questBottomSheetFooter = importDefault(13593) /* metro dependency 13593: QuestBottomSheetFooter */;
|
||||
const isActive = defibrillator.isActive;
|
||||
const onBack = stepActions.onBack;
|
||||
const start = defibrillator.start;
|
||||
const onNext = stepActions.onNext;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
items2[2] = <View style={styles.footerWrapper}>{((Component) => <Component quest={quest} step={step} isDefibrilating={isActive} onBack={onBack} onDefib={start} onConnectConsoleNext={onNext} style={styles.footer} withSafeArea={false} sourceQuestContent={QUEST_BAR_MOBILE} />)(questBottomSheetFooter)}</View>;
|
||||
return (
|
||||
<>
|
||||
{items2}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function QuestDockEnrolledBody({quest}) { // fn#104345, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:2980, offset: 0x022931a7, size: 350 bytes, params: 2, frame: 23
|
||||
const styles = useStyles();
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const minExpandedContentHeight = Reflect.apply(useContext, binding,
|
||||
[QuestDockGestureContext]).minExpandedContentHeight;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value2 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockEnrolledBody');
|
||||
const value3 = env0_4.useCallback(function(a0) {
|
||||
var height = a0.nativeEvent.layout.height;
|
||||
if (minExpandedContentHeight.get() !== height) {
|
||||
minExpandedContentHeight.set(height);
|
||||
}
|
||||
}, [minExpandedContentHeight]);
|
||||
env0_4.useEffect(function() {
|
||||
return _fun104348;
|
||||
}, [minExpandedContentHeight]);
|
||||
return (
|
||||
<View
|
||||
style={[styles.wrapper, value2 ? {paddingBottom: global.Math.max(bottom,
|
||||
QUEST_DOCK_EXPANDED_PADDING_BOTTOM)} : null]}
|
||||
onLayout={value3}
|
||||
>
|
||||
{(require(7116) /* metro dependency 7116: QuestTaskUtils */).hasWatchVideoTasks(quest) ? <EnrolledBodyWatchTask quest={quest} /> : <EnrolledBodyPlayStreamTask quest={quest} />}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104339() { // fn#104339, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1057, offset: 0x02292e55, size: 40 bytes, params: 1, frame: 9
|
||||
if (env0_4) {
|
||||
(function() {
|
||||
return _maybeOpenVideoQuestModal.apply(this, arguments);
|
||||
})();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104347() { // fn#104347, offset: 0x0229333f, size: 11 bytes, params: 1, frame: 1
|
||||
return function() {
|
||||
if (minExpandedContentHeight.get() !== QUEST_DOCK_EXPANDED_HEIGHT) {
|
||||
minExpandedContentHeight.set(QUEST_DOCK_EXPANDED_HEIGHT);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function _maybeOpenVideoQuestModal() { // fn#104340, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1062, offset: 0x02292e7d, size: 53 bytes, params: 1, frame: 13
|
||||
var environment;
|
||||
const value = environment.__proto__.__proto__;
|
||||
return env2_3(_fun104342).apply(this, arguments);
|
||||
}
|
||||
|
||||
function* _fun104342() { // fn#104342, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13860:1135, offset: 0x02292ebd, size: 214 bytes, params: 1, frame: 17
|
||||
var r1;
|
||||
var binding;
|
||||
var value4;
|
||||
var value8;
|
||||
var binding2;
|
||||
var value9;
|
||||
var object2;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__.__proto__;
|
||||
var get = dependencyMap.get;
|
||||
var value3 = Reflect.apply(get, dependencyMap, []).prevDeltaY < 0;
|
||||
if (value3) {
|
||||
binding = env3_3;
|
||||
value4 = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
r1 = binding === env4_7.RESET_TO_PREVIOUS;
|
||||
} else {
|
||||
r1 = value3;
|
||||
}
|
||||
r1 = r1 && env4_6.prevRestingQuestDockMode === env4_7.EXPANDED;
|
||||
if (r1) {
|
||||
value8 = environment.__proto__.__proto__.__proto__.__proto__;
|
||||
binding = env4_1;
|
||||
binding2 = env4_2;
|
||||
value9 = binding(binding2[13]);
|
||||
object2 = {};
|
||||
object2.questId = require.id;
|
||||
binding = env4_0;
|
||||
object2.sourceQuestContent = binding(binding2[14]).QuestContent.QUEST_BAR_MOBILE;
|
||||
yield value9(object2);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
importDefault(env4_7.COLLAPSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/* Metro module 13660; source: modules/quests/native/QuestDock/QuestDockEnrolledHeader.tsx; dependencies: [57, 31, 27, 33, 4501, 13650, 9483, 9950, 6531, 13620, 4573, 2] */
|
||||
function _fun104325(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104325, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13857:6, offset: 0x0229198a, size: 275 bytes, params: 8, frame: 20
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const value2 = require(33) /* metro dependency 33 */;
|
||||
const env0_6 = value2.jsx;
|
||||
const env0_7 = value2.jsxs;
|
||||
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({wrapper: {'alignItems': 'center',
|
||||
'display': 'flex', 'flexDirection': 'row', 'flexGrow': 1, 'flexShrink': 1, 'gap': 8, 'justifyContent': 'center',
|
||||
'padding': 8}, progressIndicatorWrapper: {'flexGrow': 0, 'flexShrink': 0}, copy: {'flexGrow': 1,
|
||||
'flexShrink': 1}});
|
||||
value = value.memo(QuestDockEnrolledHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockEnrolledHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockEnrolledHeader() { // fn#104326, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13857:409, offset: 0x02291a9d, size: 445 bytes, params: 1, frame: 24
|
||||
const binding = env0_4;
|
||||
const useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
const value2 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const property = env0_3((require(9483) /* metro dependency 9483: QuestHooks */).useTaskPlatformScreen(quest,
|
||||
value2), 1)[0];
|
||||
const value5 = (require(9950) /* metro dependency 9950: QuestCopyHooks */).useQuestBarTitle(quest);
|
||||
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
|
||||
const useQuestBarSubtitle = questCopyHooksModule.useQuestBarSubtitle;
|
||||
const object2 = {quest: quest, isExpanded: false, activeScreen: property};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
const value6 = Reflect.apply(useQuestBarSubtitle, questCopyHooksModule, [object2]);
|
||||
let value = importDefault(13620) /* metro dependency 13620: QuestProgressIndicator */;
|
||||
value = <View style={styles.progressIndicatorWrapper}>{((Component) => <Component quest={quest} size="x-sm" progress={value2.percentComplete} loading={false} hasConfetti />)(value)}</View>;
|
||||
const items2 = [value];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
items2[1] = <View style={styles.copy}><Text variant="heading-md/semibold" color="mobile-text-heading-primary">{value5}</Text><Text variant="text-sm/medium" color="text-muted">{value6}</Text></View>;
|
||||
return (
|
||||
<View style={styles.wrapper}>
|
||||
{items2}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,369 @@
|
||||
/* Metro module 13576; source: modules/quests/native/QuestDock/QuestDockExternalCoordinationContext.tsx; dependencies: [31, 13570, 6528, 13572, 33, 672, 8142, 4017, 13571, 9484, 477, 2] */
|
||||
function _fun103187(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:6, offset: 0x0225b63c, size: 448 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const env0_5 = (require(13572) /* metro dependency 13572: QuestDockConstants */).QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
|
||||
const env0_6 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const SECOND = Millis.SECOND;
|
||||
const env0_7 = 1 * SECOND;
|
||||
const createContext = value.createContext;
|
||||
object2 = {};
|
||||
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
|
||||
const createFakeSharedValue = reanimatedHelperTypesModule.createFakeSharedValue;
|
||||
const COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
object2.restingQuestDockMode = Reflect.apply(createFakeSharedValue, reanimatedHelperTypesModule, [COLLAPSED]);
|
||||
object2.setRestingQuestDockMode = function() {
|
||||
};
|
||||
object2.lastScrollEventSourceId = reanimatedHelperTypesModule.createFakeSharedValue(null);
|
||||
object2.questDockOffset = reanimatedHelperTypesModule.createFakeSharedValue(0);
|
||||
const context = Reflect.apply(createContext, value, [object2]);
|
||||
value = value.memo(QuestDockExternalCoordinationContextProviderInner);
|
||||
const env0_9 = (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
|
||||
object2 = {code: 'function QuestDockExternalCoordinationContextTsx1(){const{restingQuestDockMode}=this.__closure;return restingQuestDockMode.get();}'};
|
||||
object2 = {code: 'function QuestDockExternalCoordinationContextTsx2(nextMode,prevMode){const{runOnJS,cancelReopenQuestDock}=this.__closure;if(nextMode!==prevMode){runOnJS(cancelReopenQuestDock)();}}'};
|
||||
object2 = {code: "function QuestDockExternalCoordinationContextTsx3(contentOffsetY,contentHeight,layoutHeight){const{isScrollHandlerEnabled,restingQuestDockMode,QuestDockMode,lastContentOffsetY,lastScrollEventSourceId,id,runOnJS,cancelReopenQuestDock,IS_ANDROID,scheduleReopenQuestDock,setRestingQuestDockMode,QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD}=this.__closure;if(!isScrollHandlerEnabled.get())return;if(restingQuestDockMode.get()===QuestDockMode.SOFT_DISMISSED||restingQuestDockMode.get()===QuestDockMode.EXPANDED){return;}const lastContentOffsetYValue=lastContentOffsetY.get();lastContentOffsetY.set(contentOffsetY);if(lastContentOffsetYValue===contentOffsetY)return;const lastSourceId=lastScrollEventSourceId.get();if(id!=='guilds'){lastScrollEventSourceId.set(id);}const isFirstScrollEvent=id!=='guilds'&&id!==lastSourceId;if(isFirstScrollEvent)return;const isOverscrollingAtTop=contentOffsetY<0&&lastContentOffsetYValue<0;if(isOverscrollingAtTop){runOnJS(cancelReopenQuestDock)();return;}const hasLayoutData=layoutHeight!=null&&contentHeight!=null;const isOverscrollingAtBottom=hasLayoutData&&contentOffsetY+layoutHeight>=contentHeight;if(isOverscrollingAtBottom)return;const isScrolledToTop=contentOffsetY<=0&&(IS_ANDROID||lastContentOffsetYValue<=0);if(isScrolledToTop&&restingQuestDockMode.get()===QuestDockMode.CLOSED){if(IS_ANDROID){runOnJS(scheduleReopenQuestDock)();}else{runOnJS(setRestingQuestDockMode)(QuestDockMode.COLLAPSED);}return;}const isScrollingDown=contentOffsetY>lastContentOffsetYValue&&contentOffsetY>0&&lastContentOffsetYValue>0;const isScrollingUp=contentOffsetY<lastContentOffsetYValue;const scrollDistance=Math.abs(lastContentOffsetYValue-contentOffsetY);if(isScrollingDown&&restingQuestDockMode.get()===QuestDockMode.COLLAPSED){runOnJS(setRestingQuestDockMode)(QuestDockMode.CLOSED);}else if(isScrollingUp&&restingQuestDockMode.get()===QuestDockMode.CLOSED&&scrollDistance>=QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD){runOnJS(scheduleReopenQuestDock)();}}"};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockExternalCoordinationContext.tsx');
|
||||
exports.QuestDockExternalCoordinationContext = context;
|
||||
exports.QuestDockExternalCoordinationContextProvider = value;
|
||||
exports.useExternalScrollEventHandler = useExternalScrollEventHandler;
|
||||
}
|
||||
|
||||
function QuestDockExternalCoordinationContextProviderInner(a0) { // fn#103189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:472, offset: 0x0225b7fc, size: 264 bytes, params: 2, frame: 19
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useSharedValue = reanimatedRexportModule.useSharedValue;
|
||||
const value2 = Reflect.apply(useSharedValue, reanimatedRexportModule, [null]);
|
||||
const value3 = reanimatedRexportModule.useSharedValue(0);
|
||||
const moduleValue3 = reanimatedRexportModule;
|
||||
useSharedValue = moduleValue3.useSharedValue;
|
||||
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
const value4 = Reflect.apply(useSharedValue, moduleValue3,
|
||||
[questDockUtilsModule.isSoftDismissed(QuestDockStore.questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED]);
|
||||
const binding = value4;
|
||||
const value6 = binding.useMemo(_fun103191, [value2, value4, binding.useCallback(_fun103190, [value4, value3]),
|
||||
value3]);
|
||||
const Provider = env0_8.Provider;
|
||||
return (
|
||||
<Provider value={value6}>
|
||||
{a0.children}
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
function useExternalScrollEventHandler({id}) { // fn#103192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3587, offset: 0x0225b99a, size: 548 bytes, params: 2, frame: 28
|
||||
const binding = env0_2;
|
||||
const {setRestingQuestDockMode, restingQuestDockMode, lastScrollEventSourceId} = binding.useContext(env0_8);
|
||||
const env0_4 = binding.useRef(-1);
|
||||
let useCallback = binding.useCallback;
|
||||
const value3 = Reflect.apply(useCallback, binding, [_fun103193, [setRestingQuestDockMode, restingQuestDockMode]]);
|
||||
let closure = _fun103195;
|
||||
const value4 = binding.useCallback(closure, []);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
closure = function() {
|
||||
return restingQuestDockMode.get();
|
||||
};
|
||||
closure.__closure = {restingQuestDockMode: restingQuestDockMode};
|
||||
closure.__workletHash = 14040596710288;
|
||||
closure.__initData = env0_10;
|
||||
const closure2 = useExternalScrollEventHandlerC;
|
||||
const runOnJS = reanimatedRexportModule.runOnJS;
|
||||
closure2.__closure = {runOnJS: runOnJS, cancelReopenQuestDock: value4};
|
||||
closure2.__workletHash = 1848909508809;
|
||||
closure2.__initData = env0_11;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
const value5 = reanimatedRexportModule.useSharedValue(0);
|
||||
const value6 = reanimatedRexportModule.useSharedValue(false);
|
||||
binding.useEffect(_fun103198, [value6]);
|
||||
useCallback = binding.useCallback;
|
||||
closure = useExternalScrollEventHandlerT;
|
||||
closure.__closure = {isScrollHandlerEnabled: value6, restingQuestDockMode: restingQuestDockMode,
|
||||
QuestDockMode: QuestDockMode, lastContentOffsetY: value5, lastScrollEventSourceId: lastScrollEventSourceId,
|
||||
id: id, runOnJS: runOnJS, cancelReopenQuestDock: value4, IS_ANDROID: env0_9, scheduleReopenQuestDock: value3,
|
||||
setRestingQuestDockMode: setRestingQuestDockMode,
|
||||
QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD: QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD};
|
||||
closure.__workletHash = 9824540806898;
|
||||
closure.__initData = env0_12;
|
||||
return Reflect.apply(useCallback, binding, [closure, [id, value5, lastScrollEventSourceId, restingQuestDockMode,
|
||||
value3, setRestingQuestDockMode, value4, value6]]);
|
||||
}
|
||||
|
||||
function _fun103190(a0) { // fn#103190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:721, offset: 0x0225b904, size: 107 bytes, params: 2, frame: 13
|
||||
let binding = env0_1;
|
||||
binding.set(0);
|
||||
binding = env0_2;
|
||||
const get = binding.get;
|
||||
if (Reflect.apply(get, binding, []) !== a0) {
|
||||
env0_2.set(a0);
|
||||
}
|
||||
const value = environment.__proto__;
|
||||
const RESET_TO_PREVIOUS = QuestDockMode.RESET_TO_PREVIOUS;
|
||||
if (a0 !== RESET_TO_PREVIOUS) {
|
||||
(require(9484) /* metro dependency 9484: QuestActionCreators */).updatePrevRestingQuestDockMode(a0);
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103191() { // fn#103191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:845, offset: 0x0225b96f, size: 43 bytes, params: 1, frame: 3
|
||||
return {lastScrollEventSourceId: env0_0, restingQuestDockMode: env0_2, setRestingQuestDockMode: env0_3,
|
||||
questDockOffset: env0_1};
|
||||
}
|
||||
|
||||
function _fun103193() { // fn#103193, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3773, offset: 0x0225bbbe, size: 98 bytes, params: 1, frame: 14
|
||||
var window;
|
||||
if (env0_4.current !== -1) {
|
||||
window = global.window;
|
||||
window.clearTimeout(env0_4.current);
|
||||
}
|
||||
env0_4.current = global.window.setTimeout(function() {
|
||||
if (restingQuestDockMode.get() !== QuestDockMode.EXPANDED) {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
}, 500);
|
||||
}
|
||||
|
||||
function _fun103195() { // fn#103195, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:3929, offset: 0x0225bc5a, size: 54 bytes, params: 1, frame: 11
|
||||
var window;
|
||||
if (env0_4.current !== -1) {
|
||||
window = global.window;
|
||||
window.clearTimeout(env0_4.current);
|
||||
}
|
||||
}
|
||||
|
||||
function useExternalScrollEventHandlerC(a0, a1) { // fn#103197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4119, owner: useExternalScrollEventHandler.c, offset: 0x0225bc90, size: 60 bytes, params: 3, frame: 12
|
||||
var value;
|
||||
if (a0 !== a1) {
|
||||
value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
value.runOnJS(env0_6)();
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103198() { // fn#103198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4355, offset: 0x0225bccc, size: 45 bytes, params: 1, frame: 14
|
||||
const env0_0 = global.setTimeout(_fun103199, env1_7);
|
||||
return _fun103200;
|
||||
}
|
||||
|
||||
function useExternalScrollEventHandlerT(a0, a1, a2) { // fn#103201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4451, owner: useExternalScrollEventHandler.T, offset: 0x0225bd10, size: 595 bytes, params: 4, frame: 19
|
||||
var r2;
|
||||
var restingQuestDockModeBinding;
|
||||
var value2;
|
||||
var value3;
|
||||
var SOFT_DISMISSED;
|
||||
var value4;
|
||||
var EXPANDED;
|
||||
var value5;
|
||||
var set;
|
||||
var lastScrollEventSourceIdBinding;
|
||||
var value6;
|
||||
var value7;
|
||||
var CLOSED;
|
||||
var Math;
|
||||
var abs;
|
||||
var value8;
|
||||
var value9;
|
||||
var COLLAPSED;
|
||||
var value10;
|
||||
var value11;
|
||||
var value12;
|
||||
var value13;
|
||||
var moduleValue;
|
||||
var runOnJS;
|
||||
var moduleValue2;
|
||||
var moduleValue3;
|
||||
var moduleValue4;
|
||||
let value = environment;
|
||||
let binding = env0_8;
|
||||
let get = binding.get;
|
||||
reducibleJoin32: while (true) {
|
||||
if (Reflect.apply(get, binding, [])) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value2 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
value3 = environment.__proto__;
|
||||
SOFT_DISMISSED = QuestDockMode.SOFT_DISMISSED;
|
||||
if (value2 === SOFT_DISMISSED) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value4 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value4 === EXPANDED) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
binding = env0_7;
|
||||
get = binding.get;
|
||||
value5 = Reflect.apply(get, binding, []);
|
||||
set = binding.set;
|
||||
Reflect.apply(set, binding, [a0]);
|
||||
if (value5 === a0) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
lastScrollEventSourceIdBinding = lastScrollEventSourceId;
|
||||
get = lastScrollEventSourceIdBinding.get;
|
||||
value6 = Reflect.apply(get, lastScrollEventSourceIdBinding, []);
|
||||
reducibleJoin6: while (true) {
|
||||
if (id === 'guilds') {
|
||||
break reducibleJoin6;
|
||||
}
|
||||
lastScrollEventSourceIdBinding = lastScrollEventSourceId;
|
||||
set = lastScrollEventSourceIdBinding.set;
|
||||
Reflect.apply(set, lastScrollEventSourceIdBinding, [id]);
|
||||
break reducibleJoin6;
|
||||
}
|
||||
if (id !== 'guilds') {
|
||||
if (id !== value6) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
if (a0 < 0) {
|
||||
if (value5 < 0) {
|
||||
moduleValue4 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue4.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue4, [env0_6])();
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
if (a2 != null) {
|
||||
if (a1 != null) {
|
||||
if (a0 + a2 >= a1) {
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (a0 <= 0) {
|
||||
if (!env1_9) {
|
||||
if (!(value5 <= 0)) {
|
||||
Math = global.Math;
|
||||
value8 = Math.abs(value5 - a0);
|
||||
if (a0 > value5) {
|
||||
if (a0 > 0) {
|
||||
if (value5 > 0) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value9 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
if (value9 === COLLAPSED) {
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue2.runOnJS;
|
||||
value = Reflect.apply(runOnJS, moduleValue2, [setRestingQuestDockMode]);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
value(CLOSED);
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
value10 = a0 < value5;
|
||||
reducibleJoin23: while (true) {
|
||||
if (value10) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value11 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
value12 = value11 === CLOSED;
|
||||
r2 = value12;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
r2 = value10;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
reducibleJoin25: while (true) {
|
||||
if (r2) {
|
||||
value13 = value8 >= QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
|
||||
r2 = value13;
|
||||
break reducibleJoin25;
|
||||
}
|
||||
break reducibleJoin25;
|
||||
}
|
||||
if (r2) {
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue, [env0_5])();
|
||||
break reducibleJoin32;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value7 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
if (value7 === CLOSED) {
|
||||
binding = env1_9;
|
||||
moduleValue3 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue3.runOnJS;
|
||||
if (binding) {
|
||||
Reflect.apply(runOnJS, moduleValue3, [env0_5])();
|
||||
break reducibleJoin32;
|
||||
}
|
||||
value = Reflect.apply(runOnJS, moduleValue3, [setRestingQuestDockMode]);
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
value(COLLAPSED);
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
Math = global.Math;
|
||||
abs = Math.abs;
|
||||
value8 = Reflect.apply(abs, Math, [value5 - a0]);
|
||||
if (a0 > value5) {
|
||||
if (a0 > 0) {
|
||||
if (value5 > 0) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value9 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
if (value9 === COLLAPSED) {
|
||||
moduleValue2 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue2.runOnJS;
|
||||
value = Reflect.apply(runOnJS, moduleValue2, [setRestingQuestDockMode]);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
value(CLOSED);
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
value10 = a0 < value5;
|
||||
reducibleJoin23: while (true) {
|
||||
if (value10) {
|
||||
restingQuestDockModeBinding = restingQuestDockMode;
|
||||
get = restingQuestDockModeBinding.get;
|
||||
value11 = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
CLOSED = QuestDockMode.CLOSED;
|
||||
value12 = value11 === CLOSED;
|
||||
r2 = value12;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
r2 = value10;
|
||||
break reducibleJoin23;
|
||||
}
|
||||
reducibleJoin25: while (true) {
|
||||
if (r2) {
|
||||
value13 = value8 >= QUEST_DOCK_EXTERNAL_SCROLL_DELTA_THRESHOLD;
|
||||
r2 = value13;
|
||||
break reducibleJoin25;
|
||||
}
|
||||
break reducibleJoin25;
|
||||
}
|
||||
if (r2) {
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
runOnJS = moduleValue.runOnJS;
|
||||
Reflect.apply(runOnJS, moduleValue, [env0_5])();
|
||||
break reducibleJoin32;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
break reducibleJoin32;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun103199() { // fn#103199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13766:4378, offset: 0x0225bcf9, size: 23 bytes, params: 1, frame: 11
|
||||
env1_8.set(true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
/* 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] */
|
||||
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
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_6 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_7 = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
const env0_8 = (require(7553) /* metro dependency 7553: YouBarConstants */).useYouBarHorizontalMargin;
|
||||
const env0_9 = (require(33) /* metro dependency 33 */).jsx;
|
||||
const createContext = value.createContext;
|
||||
object2 = {};
|
||||
const reanimatedHelperTypesModule = require(8142) /* metro dependency 8142: ReanimatedHelperTypes */;
|
||||
let createFakeSharedValue = reanimatedHelperTypesModule.createFakeSharedValue;
|
||||
object2.questDockWrapperSpecs = Reflect.apply(createFakeSharedValue, reanimatedHelperTypesModule, [{'width': 0,
|
||||
'height': 0, 'x': 0, 'y': 0, 'prevDeltaY': 0}]);
|
||||
object2.windowDimensions = reanimatedHelperTypesModule.createFakeSharedValue({'width': 0, 'height': 0,
|
||||
'maxContentHeight': 0, 'landscape': false});
|
||||
const value5 = reanimatedHelperTypesModule;
|
||||
createFakeSharedValue = value5.createFakeSharedValue;
|
||||
const COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
object2.activeQuestDockMode = Reflect.apply(createFakeSharedValue, value5, [COLLAPSED]);
|
||||
object2.minExpandedContentHeight = reanimatedHelperTypesModule.createFakeSharedValue(0);
|
||||
const context = Reflect.apply(createContext, value, [object2]);
|
||||
value = value.memo(QuestDockGestureContextProviderInner);
|
||||
(require(2) /* metro dependency 2 */).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 = (require(1478) /* metro dependency 1478: useWindowDimensionsNative */).getWindowDimensions;
|
||||
const value2 = Reflect.apply(useMemo, binding, [getWindowDimensions, []]);
|
||||
const value3 = (require(13574) /* metro dependency 13574: useTabsVisible */).useMainTabsHeight({'enabled': true,
|
||||
'ignoreQuestDock': true});
|
||||
const env0_1 = binding.useRef(value3);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
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 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockGestureContext');
|
||||
const value6 = useYouBarHorizontalMargin();
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
useSharedValue = moduleValue4.useSharedValue;
|
||||
const questDockUtilsModule = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
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, moduleValue4, [{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;
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
useSharedValue = moduleValue8.useSharedValue;
|
||||
const moduleValue9 = questDockUtilsModule;
|
||||
const value9 = Reflect.apply(useSharedValue, moduleValue8,
|
||||
[moduleValue9.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 _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 (importDefault(11534) /* metro dependency 11534: subscribeToWindowDimensionsNative */)(_fun103174);
|
||||
}
|
||||
|
||||
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};
|
||||
}
|
||||
|
||||
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});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,522 @@
|
||||
/* Metro module 13653; source: modules/quests/native/QuestDock/QuestDockGestureDetector.tsx; dependencies: [31, 6528, 13572, 7553, 33, 13573, 11281, 13576, 13650, 4017, 5321, 13571, 4081, 2] */
|
||||
function _fun104280(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:6, offset: 0x0228d9c6, size: 453 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const closure = useQuestDockSwipeGesture;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_4 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_5 = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_6 = questDockConstantsModule.QUEST_DOCK_CLOSED_HEIGHT;
|
||||
const env0_7 = questDockConstantsModule.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
const env0_8 = questDockConstantsModule.QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM;
|
||||
const env0_9 = questDockConstantsModule.QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM;
|
||||
const env0_10 = questDockConstantsModule.QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;
|
||||
const env0_11 = questDockConstantsModule.QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT;
|
||||
const env0_12 = questDockConstantsModule.QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY;
|
||||
const env0_13 = questDockConstantsModule.QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD;
|
||||
const env0_14 = questDockConstantsModule.QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR;
|
||||
const env0_15 = questDockConstantsModule.QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR;
|
||||
const env0_16 = questDockConstantsModule.QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR;
|
||||
const youBarConstantsModule = require(7553) /* metro dependency 7553: YouBarConstants */;
|
||||
const env0_17 = youBarConstantsModule.useYouBarHorizontalMargin;
|
||||
const env0_18 = youBarConstantsModule.useYouBarTotalHeight;
|
||||
const env0_19 = (require(33) /* metro dependency 33 */).jsx;
|
||||
object = {code: 'function QuestDockGestureDetectorTsx1(event){const{QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY,restingQuestDockMode,QuestDockMode,initialGestureOffset,QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT,runOnJS,setRestingQuestDockMode}=this.__closure;const{velocityY:velocityY,y:y}=event;const absoluteVelocityY=Math.abs(velocityY);const absoluteY=Math.abs(y);let resultingDockMode;if(absoluteVelocityY>QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY&&velocityY<0){if(restingQuestDockMode.get()===QuestDockMode.EXPANDED){resultingDockMode=QuestDockMode.RESET_TO_PREVIOUS;}else{resultingDockMode=QuestDockMode.EXPANDED;}}else if(absoluteVelocityY<QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY&&initialGestureOffset.get().isDrawer){if(restingQuestDockMode.get()===QuestDockMode.EXPANDED){resultingDockMode=QuestDockMode.RESET_TO_PREVIOUS;}else{resultingDockMode=QuestDockMode.EXPANDED;}}else if(restingQuestDockMode.get()===QuestDockMode.COLLAPSED&&(velocityY>QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY||y>QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT)){resultingDockMode=QuestDockMode.SOFT_DISMISSED;}else if(velocityY>QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY&&restingQuestDockMode.get()!==QuestDockMode.COLLAPSED){resultingDockMode=QuestDockMode.COLLAPSED;}else if(velocityY<0&&absoluteVelocityY>QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY&&restingQuestDockMode.get()===QuestDockMode.CLOSED){resultingDockMode=QuestDockMode.COLLAPSED;}else{if(restingQuestDockMode.get()===QuestDockMode.COLLAPSED||restingQuestDockMode.get()===QuestDockMode.CLOSED){resultingDockMode=QuestDockMode.RESET_TO_PREVIOUS;}else{resultingDockMode=QuestDockMode.COLLAPSED;}}if(restingQuestDockMode.get()===QuestDockMode.CLOSED&&resultingDockMode!==QuestDockMode.EXPANDED&&y<0&&absoluteY>QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT){resultingDockMode=QuestDockMode.COLLAPSED;}runOnJS(setRestingQuestDockMode)(resultingDockMode);}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx2(event){const{initialGestureOffset,minExpandedContentHeight,activeQuestDockMode,QuestDockMode,QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR,QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT,questDockWrapperSpecs,youBarHeight,getQuestDockExpandedWidth,windowDimensions,safeArea,QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT,QUEST_DOCK_CLOSED_HEIGHT,QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR,getQuestDockClosedWidth,QUEST_DOCK_COLLAPSED_HEIGHT,QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR,questDockOffset,runOnJS,triggerHapticFeedback,HapticFeedbackTypes,QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED,getQuestDockCollapsedWidth,youBarHorizontalMargin}=this.__closure;const deltaY=event.absoluteY-initialGestureOffset.get().absoluteY;const expandedContentHeight=minExpandedContentHeight.get();let nextHeight=initialGestureOffset.get().height-deltaY;if(nextHeight>expandedContentHeight&&activeQuestDockMode.get()===QuestDockMode.EXPANDED){const overage=nextHeight-expandedContentHeight;const additionalHeight=overage*QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR;nextHeight=expandedContentHeight+additionalHeight;}const expandedModeTransitionHeight=minExpandedContentHeight.get()>0?Math.min(minExpandedContentHeight.get(),QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT):QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;if(nextHeight>=expandedModeTransitionHeight){if(!initialGestureOffset.get().isDrawer){initialGestureOffset.set({...initialGestureOffset.get(),isDrawer:true});}questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarHeight>0?youBarHeight:0,width:getQuestDockExpandedWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),height:Math.min(nextHeight,windowDimensions.get().height),prevDeltaY:deltaY});activeQuestDockMode.set(QuestDockMode.EXPANDED);}else if(nextHeight<QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT){if(activeQuestDockMode.get()===QuestDockMode.CLOSED){const progress=1-Math.min(nextHeight,0)/QUEST_DOCK_CLOSED_HEIGHT;const newChange=progress*(QUEST_DOCK_CLOSED_HEIGHT-nextHeight);const nextY=newChange*QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR;const isDraggingDown=newChange>0;questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:isDraggingDown?nextY:0,width:getQuestDockClosedWidth(windowDimensions.get().width,safeArea.get().left,safeArea.get().right),height:isDraggingDown?QUEST_DOCK_CLOSED_HEIGHT:nextHeight,prevDeltaY:deltaY});activeQuestDockMode.set(QuestDockMode.CLOSED);}}else{const progress=nextHeight/QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;const yOffset=(nextHeight-QUEST_DOCK_COLLAPSED_HEIGHT)*-1;const newChange=yOffset*(1-progress/QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR);questDockOffset.set(youBarHeight>0?-Math.min(newChange,0):0);if(initialGestureOffset.get().isDrawer){initialGestureOffset.set({...initialGestureOffset.get(),isDrawer:false});}if(QUEST_DOCK_COLLAPSED_HEIGHT!==questDockWrapperSpecs.get().height&&activeQuestDockMode.get()!==QuestDockMode.EXPANDED){runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED*-1+(youBarHeight>0?Math.min(newChange,0):newChange),width:getQuestDockCollapsedWidth(windowDimensions.get().width,youBarHeight>0?youBarHorizontalMargin:safeArea.get().left,youBarHeight>0?youBarHorizontalMargin:safeArea.get().right),height:QUEST_DOCK_COLLAPSED_HEIGHT,prevDeltaY:deltaY});activeQuestDockMode.set(QuestDockMode.COLLAPSED);}}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx3(event){const{State,initialGestureOffset,touchMoveCount,QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD,restingQuestDockMode,QuestDockMode,QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM,QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM,questDockWrapperSpecs}=this.__closure;if(event.state!==State.BEGAN||initialGestureOffset.get().active){return;}touchMoveCount.set(touchMoveCount.get()+1);const isDragging=touchMoveCount.get()<=QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD;const{absoluteY:absoluteY,absoluteX:absoluteX}=event.changedTouches[0];const computed=initialGestureOffset.get().absoluteY-absoluteY;const computedAbsolute=Math.abs(computed);if(restingQuestDockMode.get()===QuestDockMode.EXPANDED&&isDragging&&computed>=0){return;}if(restingQuestDockMode.get()===QuestDockMode.COLLAPSED&&computed>QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM||restingQuestDockMode.get()===QuestDockMode.EXPANDED&&(computed<-QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM||computed>QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM)||restingQuestDockMode.get()===QuestDockMode.COLLAPSED&&computed<0&&computedAbsolute>QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM||restingQuestDockMode.get()===QuestDockMode.CLOSED&&computed>0&&computed>QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM||restingQuestDockMode.get()===QuestDockMode.CLOSED&&computed<0&&computedAbsolute>QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM){initialGestureOffset.set({absoluteX:absoluteX,absoluteY:absoluteY,x:questDockWrapperSpecs.get().x,y:questDockWrapperSpecs.get().y,height:questDockWrapperSpecs.get().height,isDrawer:restingQuestDockMode.get()===QuestDockMode.EXPANDED,active:true});}}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx4(event){const{touchMoveCount,initialGestureOffset,questDockWrapperSpecs,restingQuestDockMode,QuestDockMode}=this.__closure;touchMoveCount.set(0);initialGestureOffset.set({absoluteX:event.changedTouches[0].absoluteX,absoluteY:event.changedTouches[0].absoluteY,x:questDockWrapperSpecs.get().x,y:questDockWrapperSpecs.get().y,height:questDockWrapperSpecs.get().height,isDrawer:restingQuestDockMode.get()===QuestDockMode.EXPANDED,active:false});}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx5(){const{activeQuestDockMode,isVisibleSharedValue}=this.__closure;return{mode:activeQuestDockMode.get(),isVisible:isVisibleSharedValue.get()};}'};
|
||||
object = {code: 'function QuestDockGestureDetectorTsx6(current,previous){const{QuestDockMode,runOnJS,triggerHapticFeedback,HapticFeedbackTypes}=this.__closure;if(current.mode===(previous===null||previous===void 0?void 0:previous.mode)||current.mode===QuestDockMode.CLOSED||(previous===null||previous===void 0?void 0:previous.mode)===QuestDockMode.CLOSED||!current.isVisible){return;}runOnJS(triggerHapticFeedback)(HapticFeedbackTypes.IMPACT_MEDIUM);}'};
|
||||
value = value.memo(QuestDockGestureDetector);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockGestureDetector.tsx');
|
||||
exports.default = value;
|
||||
exports.useQuestDockSwipeGesture = closure;
|
||||
}
|
||||
|
||||
function useQuestDockSwipeGesture() { // fn#104281, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:9008, offset: 0x0228db8b, size: 651 bytes, params: 1, frame: 32
|
||||
var object2;
|
||||
let binding = env0_3;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {questDockWrapperSpecs, activeQuestDockMode, windowDimensions,
|
||||
minExpandedContentHeight} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
var env0_3 = minExpandedContentHeight;
|
||||
const value3 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
|
||||
binding = env0_3;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const {restingQuestDockMode, setRestingQuestDockMode, questDockOffset} = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]);
|
||||
binding = env0_3;
|
||||
useContext = binding.useContext;
|
||||
const isVisibleToUser = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).isVisibleToUser;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useSharedValue = reanimatedRexportModule.useSharedValue;
|
||||
const value5 = restingQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
const value6 = Reflect.apply(useSharedValue, reanimatedRexportModule, [{'absoluteX': 0, 'absoluteY': 0, 'x': 0,
|
||||
'y': 0, 'height': 0, 'isDrawer': null, 'active': false, isDrawer: value5 === EXPANDED}]);
|
||||
const value7 = reanimatedRexportModule.useSharedValue(0);
|
||||
const value8 = reanimatedRexportModule.useSharedValue(isVisibleToUser);
|
||||
const value9 = useYouBarTotalHeight();
|
||||
const value10 = useYouBarHorizontalMargin();
|
||||
env0_3.useEffect(_fun104282, [isVisibleToUser, value8]);
|
||||
const value11 = env0_3.useMemo(_fun104283, [restingQuestDockMode, value6, value3, value7, windowDimensions,
|
||||
questDockWrapperSpecs, setRestingQuestDockMode, activeQuestDockMode, minExpandedContentHeight, value9, value10,
|
||||
questDockOffset]);
|
||||
const moduleValue4 = reanimatedRexportModule;
|
||||
const useAnimatedReaction = moduleValue4.useAnimatedReaction;
|
||||
const closure = useQuestDockSwipeGestureW;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, isVisibleSharedValue: value8};
|
||||
closure.__workletHash = 13629688537260;
|
||||
closure.__initData = env0_24;
|
||||
const closure2 = useQuestDockSwipeGestureX;
|
||||
object2 = {};
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
|
||||
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
|
||||
object2.HapticFeedbackTypes = HapticFeedbackTypes;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 17417080823410;
|
||||
closure2.__initData = env0_25;
|
||||
Reflect.apply(useAnimatedReaction, moduleValue4, [closure, closure2]);
|
||||
return value11;
|
||||
}
|
||||
|
||||
function QuestDockGestureDetector(a0) { // fn#104290, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:14281, offset: 0x0228ec95, size: 70 bytes, params: 2, frame: 15
|
||||
const value2 = useQuestDockSwipeGesture();
|
||||
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
|
||||
return (
|
||||
<GestureDetector gesture={value2}>
|
||||
{a0.children}
|
||||
</GestureDetector>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104282() { // fn#104282, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:9572, offset: 0x0228de16, size: 25 bytes, params: 1, frame: 11
|
||||
const binding = env0_11;
|
||||
binding.set(isVisibleToUser);
|
||||
}
|
||||
|
||||
function _fun104283() { // fn#104283, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:9616, offset: 0x0228de2f, size: 760 bytes, params: 1, frame: 24
|
||||
var object2;
|
||||
const Gesture = (require(5321) /* metro dependency 5321 */).Gesture;
|
||||
const shouldCancelWhenOutside2 = Gesture.Pan().manualActivation(false).maxPointers(1).shouldCancelWhenOutside(false);
|
||||
const onTouchesDown = shouldCancelWhenOutside2.onTouchesDown;
|
||||
let closure = k_104284;
|
||||
const binding = env0_10;
|
||||
const binding2 = env0_9;
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
const restingQuestDockModeBinding = restingQuestDockMode;
|
||||
closure.__closure = {touchMoveCount: binding, initialGestureOffset: binding2,
|
||||
questDockWrapperSpecs: questDockWrapperSpecsBinding, restingQuestDockMode: restingQuestDockModeBinding,
|
||||
QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 15649211210155;
|
||||
closure.__initData = env1_23;
|
||||
const value6 = Reflect.apply(onTouchesDown, shouldCancelWhenOutside2, [closure]);
|
||||
const onTouchesMove = value6.onTouchesMove;
|
||||
closure = h_104285;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
closure.__closure = {State: State, initialGestureOffset: binding2, touchMoveCount: binding,
|
||||
QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD: QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD,
|
||||
restingQuestDockMode: restingQuestDockModeBinding, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM: QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM,
|
||||
QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM: QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM,
|
||||
questDockWrapperSpecs: questDockWrapperSpecsBinding};
|
||||
closure.__workletHash = 16451041821957;
|
||||
closure.__initData = env1_22;
|
||||
const value7 = Reflect.apply(onTouchesMove, value6, [closure]);
|
||||
const onChange = value7.onChange;
|
||||
closure = o_104286;
|
||||
object2 = {initialGestureOffset: binding2};
|
||||
object2.minExpandedContentHeight = minExpandedContentHeight;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR = QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR;
|
||||
object2.QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT = QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecsBinding;
|
||||
object2.youBarHeight = env0_12;
|
||||
const getQuestDockExpandedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockExpandedWidth;
|
||||
object2.getQuestDockExpandedWidth = getQuestDockExpandedWidth;
|
||||
object2.windowDimensions = windowDimensions;
|
||||
object2.safeArea = env0_4;
|
||||
object2.QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT = QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT;
|
||||
object2.QUEST_DOCK_CLOSED_HEIGHT = QUEST_DOCK_CLOSED_HEIGHT;
|
||||
object2.QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR = QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR;
|
||||
const getQuestDockClosedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockClosedWidth;
|
||||
object2.getQuestDockClosedWidth = getQuestDockClosedWidth;
|
||||
object2.QUEST_DOCK_COLLAPSED_HEIGHT = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
object2.QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR = QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR;
|
||||
object2.questDockOffset = questDockOffset;
|
||||
const runOnJS = (require(4017) /* metro dependency 4017: ReanimatedRexport */).runOnJS;
|
||||
object2.runOnJS = runOnJS;
|
||||
object2.triggerHapticFeedback = (require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback;
|
||||
const HapticFeedbackTypes = (require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes;
|
||||
object2.HapticFeedbackTypes = HapticFeedbackTypes;
|
||||
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
const getQuestDockCollapsedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockCollapsedWidth;
|
||||
object2.getQuestDockCollapsedWidth = getQuestDockCollapsedWidth;
|
||||
object2.youBarHorizontalMargin = env0_13;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 3375221025411;
|
||||
closure.__initData = env1_21;
|
||||
const value8 = Reflect.apply(onChange, value7, [closure]);
|
||||
const onEnd = value8.onEnd;
|
||||
closure = t_104287;
|
||||
closure.__closure = {QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY: QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY,
|
||||
restingQuestDockMode: restingQuestDockModeBinding, QuestDockMode: QuestDockMode, initialGestureOffset: binding2,
|
||||
QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT: QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT,
|
||||
runOnJS: runOnJS, setRestingQuestDockMode: setRestingQuestDockMode};
|
||||
closure.__workletHash = 10107537449160;
|
||||
closure.__initData = env1_20;
|
||||
return Reflect.apply(onEnd, value8, [closure]);
|
||||
}
|
||||
|
||||
function useQuestDockSwipeGestureW() { // fn#104288, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:13703, owner: useQuestDockSwipeGesture.W, offset: 0x0228ebb4, size: 42 bytes, params: 1, frame: 11
|
||||
const object2 = {};
|
||||
object2.mode = activeQuestDockMode.get();
|
||||
object2.isVisible = env0_11.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useQuestDockSwipeGestureX(a0, a1) { // fn#104289, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:13852, owner: useQuestDockSwipeGesture.X, offset: 0x0228ebde, size: 183 bytes, params: 3, frame: 15
|
||||
var value7;
|
||||
var moduleValue;
|
||||
const mode2 = a0.mode;
|
||||
const value = undefined;
|
||||
if (mode2 !== (a1 == null ? value : a1.mode) && a0.mode !== QuestDockMode.CLOSED && (a1 == null ? value : a1.mode) !== QuestDockMode.CLOSED && a0.isVisible) {
|
||||
value7 = environment.__proto__;
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS((require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback)((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function k_104284(a0) { // fn#104284, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:9732, offset: 0x0228e127, size: 184 bytes, params: 2, frame: 15
|
||||
let value = environment.__proto__;
|
||||
let binding = env1_10;
|
||||
let set = binding.set;
|
||||
Reflect.apply(set, binding, [0]);
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
const object2 = {};
|
||||
object2.absoluteX = a0.changedTouches[0].absoluteX;
|
||||
object2.absoluteY = a0.changedTouches[0].absoluteY;
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
let get = questDockWrapperSpecsBinding.get;
|
||||
object2.x = Reflect.apply(get, questDockWrapperSpecsBinding, []).x;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.y = Reflect.apply(get, questDockWrapperSpecsBinding, []).y;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
|
||||
value = restingQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.isDrawer = value === EXPANDED;
|
||||
object2.active = false;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
|
||||
function h_104285(a0) { // fn#104285, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:10112, offset: 0x0228e1df, size: 622 bytes, params: 2, frame: 20
|
||||
var r1;
|
||||
var r2;
|
||||
var value2;
|
||||
var binding;
|
||||
var get;
|
||||
var set;
|
||||
var value5;
|
||||
var property;
|
||||
var absoluteY;
|
||||
var absoluteX;
|
||||
var value6;
|
||||
var value7;
|
||||
var object2;
|
||||
var questDockWrapperSpecsBinding;
|
||||
const state = a0.state;
|
||||
const State = (require(5321) /* metro dependency 5321 */).State;
|
||||
const BEGAN = State.BEGAN;
|
||||
if (state === BEGAN) {
|
||||
value2 = environment.__proto__;
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
if (!Reflect.apply(get, binding, []).active) {
|
||||
binding = env1_10;
|
||||
binding.set(binding.get() + 1);
|
||||
value5 = binding.get() <= QUEST_DOCK_GESTURE_TOUCH_MOVE_COUNT_THRESHOLD;
|
||||
property = a0.changedTouches[0];
|
||||
absoluteY = property.absoluteY;
|
||||
absoluteX = property.absoluteX;
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
value6 = Reflect.apply(get, binding, []).absoluteY - absoluteY;
|
||||
value7 = global.Math.abs(value6);
|
||||
r1 = restingQuestDockMode.get() === QuestDockMode.EXPANDED && value5;
|
||||
r1 = r1 && value6 >= 0;
|
||||
if (!r1) {
|
||||
r1 = restingQuestDockMode.get() === QuestDockMode.COLLAPSED && value6 > QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM;
|
||||
r1 = !r1 ? restingQuestDockMode.get() === QuestDockMode.EXPANDED && (value6 < -QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM || value6 > QUEST_DOCK_GESTURE_VERTICAL_DELTA_MINIMUM) : r1;
|
||||
if (!r1) {
|
||||
r2 = restingQuestDockMode.get() === QuestDockMode.COLLAPSED && value6 < 0;
|
||||
r2 = r2 && value7 > QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM;
|
||||
r1 = r2;
|
||||
}
|
||||
if (!r1) {
|
||||
r2 = restingQuestDockMode.get() === QuestDockMode.CLOSED && value6 > 0;
|
||||
r2 = r2 && value6 > QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM;
|
||||
r1 = r2;
|
||||
}
|
||||
if (!r1) {
|
||||
r2 = restingQuestDockMode.get() === QuestDockMode.CLOSED && value6 < 0;
|
||||
r2 = r2 && value7 > QUEST_DOCK_GESTURE_CLOSED_VERTICAL_DELTA_MINIMUM;
|
||||
r1 = r2;
|
||||
}
|
||||
if (r1) {
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
object2 = {absoluteX: absoluteX, absoluteY: absoluteY};
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.x = Reflect.apply(get, questDockWrapperSpecsBinding, []).x;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.y = Reflect.apply(get, questDockWrapperSpecsBinding, []).y;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
|
||||
object2.isDrawer = restingQuestDockMode.get() === QuestDockMode.EXPANDED;
|
||||
object2.active = true;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function o_104286({absoluteY}) { // fn#104286, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:10948, offset: 0x0228e44d, size: 1381 bytes, params: 2, frame: 25
|
||||
var r3;
|
||||
var r0;
|
||||
var r2;
|
||||
var r7;
|
||||
var r8;
|
||||
var value6;
|
||||
var value7;
|
||||
var value14;
|
||||
var Math;
|
||||
var min;
|
||||
var value15;
|
||||
var value16;
|
||||
var value18;
|
||||
var value21;
|
||||
var questDockOffsetBinding;
|
||||
var set;
|
||||
var object2;
|
||||
var questDockWrapperSpecsBinding;
|
||||
var moduleValue;
|
||||
var value27;
|
||||
var moduleValue2;
|
||||
var getQuestDockCollapsedWidth;
|
||||
var windowDimensionsBinding;
|
||||
var width;
|
||||
var left;
|
||||
var value33;
|
||||
var value34;
|
||||
var moduleValue3;
|
||||
var getQuestDockClosedWidth;
|
||||
var value37;
|
||||
var moduleValue4;
|
||||
var getQuestDockExpandedWidth;
|
||||
let binding = env1_9;
|
||||
let get = binding.get;
|
||||
const value2 = absoluteY - Reflect.apply(get, binding, []).absoluteY;
|
||||
const value3 = minExpandedContentHeight.get();
|
||||
get = binding.get;
|
||||
const value4 = Reflect.apply(get, binding, []).height - value2;
|
||||
const value5 = value4 > value3;
|
||||
if (value5) {
|
||||
value6 = activeQuestDockMode.get();
|
||||
value7 = environment.__proto__.__proto__;
|
||||
r3 = value6 === QuestDockMode.EXPANDED;
|
||||
} else {
|
||||
r3 = value5;
|
||||
}
|
||||
const r9 = r3 ? value3 + (value4 - value3) * QUEST_DOCK_GESTURE_EXPANDED_EXCESS_HEIGHT_FACTOR : value4;
|
||||
if (minExpandedContentHeight.get() > 0) {
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
value15 = minExpandedContentHeight.get();
|
||||
value16 = environment.__proto__.__proto__;
|
||||
r0 = Reflect.apply(min, Math, [value15, QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT]);
|
||||
} else {
|
||||
value14 = environment.__proto__.__proto__;
|
||||
r0 = QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT;
|
||||
}
|
||||
if (r9 >= r0) {
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
if (!Reflect.apply(get, binding, []).isDrawer) {
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, binding.get(), undefined);
|
||||
object2['isDrawer'] = true;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
|
||||
object2['x'] = 0;
|
||||
object2['y'] = env1_12 > 0 ? env1_12 : 0;
|
||||
value37 = environment.__proto__.__proto__;
|
||||
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockExpandedWidth = moduleValue4.getQuestDockExpandedWidth;
|
||||
windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
binding = env1_4;
|
||||
get = binding.get;
|
||||
left = Reflect.apply(get, binding, []).left;
|
||||
get = binding.get;
|
||||
object2['width'] = Reflect.apply(getQuestDockExpandedWidth, moduleValue4, [width, left, Reflect.apply(get,
|
||||
binding,
|
||||
[]).right]);
|
||||
Math = global.Math;
|
||||
min = Math.min;
|
||||
get = windowDimensionsBinding.get;
|
||||
object2['height'] = Reflect.apply(min, Math, [r9, Reflect.apply(get, windowDimensionsBinding, []).height]);
|
||||
object2['prevDeltaY'] = value2;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.EXPANDED);
|
||||
} else {
|
||||
value18 = environment.__proto__.__proto__;
|
||||
if (r9 < QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT) {
|
||||
if (activeQuestDockMode.get() === QuestDockMode.CLOSED) {
|
||||
value33 = (1 - global.Math.min(r9, 0) / QUEST_DOCK_CLOSED_HEIGHT) * (QUEST_DOCK_CLOSED_HEIGHT - r9);
|
||||
value34 = value33 > 0;
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
|
||||
object2['x'] = 0;
|
||||
object2['y'] = value34 ? value33 * QUEST_DOCK_GESTURE_CLOSED_Y_OFFSET_FACTOR : 0;
|
||||
moduleValue3 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockClosedWidth = moduleValue3.getQuestDockClosedWidth;
|
||||
windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
binding = env1_4;
|
||||
get = binding.get;
|
||||
left = Reflect.apply(get, binding, []).left;
|
||||
get = binding.get;
|
||||
object2['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue3, [width, left, Reflect.apply(get,
|
||||
binding,
|
||||
[]).right]);
|
||||
object2['height'] = value34 ? QUEST_DOCK_CLOSED_HEIGHT : r9;
|
||||
object2['prevDeltaY'] = value2;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.CLOSED);
|
||||
}
|
||||
} else {
|
||||
value21 = -1 * (r9 - QUEST_DOCK_COLLAPSED_HEIGHT) * (1 - r9 / QUEST_DOCK_GESTURE_MODE_TRANSITION_HEIGHT / QUEST_DOCK_GESTURE_COLLAPSED_Y_OFFSET_FACTOR);
|
||||
questDockOffsetBinding = questDockOffset;
|
||||
set = questDockOffsetBinding.set;
|
||||
r2 = env1_12 > 0 ? -global.Math.min(value21, 0) : 0;
|
||||
Reflect.apply(set, questDockOffsetBinding, [r2]);
|
||||
binding = env1_9;
|
||||
get = binding.get;
|
||||
if (Reflect.apply(get, binding, []).isDrawer) {
|
||||
binding = env1_9;
|
||||
set = binding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, binding.get(), undefined);
|
||||
object2['isDrawer'] = false;
|
||||
Reflect.apply(set, binding, [object2]);
|
||||
}
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
r2 = QUEST_DOCK_COLLAPSED_HEIGHT !== Reflect.apply(get, questDockWrapperSpecsBinding,
|
||||
[]).height && activeQuestDockMode.get() !== QuestDockMode.EXPANDED;
|
||||
if (r2) {
|
||||
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue.runOnJS((require(4081) /* metro dependency 4081: HapticUtilsNative */).triggerHapticFeedback)((require(4081) /* metro dependency 4081: HapticUtilsNative */).HapticFeedbackTypes.IMPACT_MEDIUM);
|
||||
}
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
|
||||
object2['x'] = 0;
|
||||
value27 = -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
r7 = env1_12 > 0 ? global.Math.min(value21, 0) : value21;
|
||||
object2['y'] = value27 + r7;
|
||||
moduleValue2 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockCollapsedWidth = moduleValue2.getQuestDockCollapsedWidth;
|
||||
windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
width = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
r8 = env1_12 > 0 ? env1_13 : env1_4.get().left;
|
||||
r7 = env1_12 > 0 ? env1_13 : env1_4.get().right;
|
||||
object2['width'] = Reflect.apply(getQuestDockCollapsedWidth, moduleValue2, [width, r8, r7]);
|
||||
object2['height'] = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
object2['prevDeltaY'] = value2;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function t_104287({velocityY, y}) { // fn#104287, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13850:12921, offset: 0x0228e9b2, size: 514 bytes, params: 2, frame: 16
|
||||
var r2;
|
||||
var value4;
|
||||
var binding;
|
||||
var value5;
|
||||
let Math = global.Math;
|
||||
let value = Math.abs(velocityY);
|
||||
Math = global.Math;
|
||||
const value2 = Math.abs(y);
|
||||
if (value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY) {
|
||||
if (velocityY < 0) {
|
||||
value = environment.__proto__;
|
||||
value = restingQuestDockMode.get();
|
||||
r2 = value === QuestDockMode.EXPANDED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.EXPANDED;
|
||||
} else if (value < QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY) {
|
||||
value4 = environment.__proto__;
|
||||
binding = env1_9;
|
||||
if (binding.get().isDrawer) {
|
||||
value = environment.__proto__;
|
||||
value = restingQuestDockMode.get();
|
||||
r2 = value === QuestDockMode.EXPANDED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.EXPANDED;
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r2 = restingQuestDockMode.get() !== QuestDockMode.COLLAPSED ? velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY || y > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.SOFT_DISMISSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r2 = restingQuestDockMode.get() !== QuestDockMode.COLLAPSED ? velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY || y > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.SOFT_DISMISSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
} else if (value < QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY) {
|
||||
value4 = environment.__proto__;
|
||||
binding = env1_9;
|
||||
if (binding.get().isDrawer) {
|
||||
value = environment.__proto__;
|
||||
value = restingQuestDockMode.get();
|
||||
r2 = value === QuestDockMode.EXPANDED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.EXPANDED;
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r2 = restingQuestDockMode.get() !== QuestDockMode.COLLAPSED ? velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY || y > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.SOFT_DISMISSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
} else {
|
||||
value5 = environment.__proto__;
|
||||
r2 = restingQuestDockMode.get() !== QuestDockMode.COLLAPSED ? velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY || y > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.SOFT_DISMISSED : velocityY > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() !== QuestDockMode.COLLAPSED || velocityY < 0 && value > QUEST_DOCK_GESTURE_MODE_TRANSITION_VELOCITY && restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.COLLAPSED : restingQuestDockMode.get() === QuestDockMode.COLLAPSED || restingQuestDockMode.get() === QuestDockMode.CLOSED ? QuestDockMode.RESET_TO_PREVIOUS : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
value = environment.__proto__;
|
||||
const value8 = restingQuestDockMode.get();
|
||||
const CLOSED = QuestDockMode.CLOSED;
|
||||
r2 = value8 === CLOSED && r2 !== QuestDockMode.EXPANDED && y < 0 && value2 > QUEST_DOCK_GESTURE_MODE_CLOSED_TRANSITION_HEIGHT ? QuestDockMode.COLLAPSED : r2;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
reanimatedRexportModule.runOnJS(setRestingQuestDockMode)(r2);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
/* Metro module 13569; source: modules/quests/native/QuestDock/QuestDockHooks.tsx; dependencies: [57, 31, 13570, 6528, 13572, 7553, 13573, 13576, 11281, 5176, 4017, 7739, 13571, 566, 672, 9949, 9513, 9519, 9517, 9518, 7121, 7120, 6531, 4080, 13577, 1962, 2] */
|
||||
function _fun103128(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103128, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6, offset: 0x02259705, size: 390 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
const env0_4 = importAll(31) /* metro dependency 31 */;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const env0_6 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
let value = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_7 = value.QUEST_DOCK_CLOSED_HEIGHT;
|
||||
const env0_8 = value.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_9 = value.QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
|
||||
const env0_10 = value.QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED;
|
||||
const env0_11 = value.QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED_WITH_YOU_BAR;
|
||||
const env0_12 = value.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED;
|
||||
const env0_13 = value.QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR;
|
||||
const env0_14 = value.QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
|
||||
const env0_15 = value.QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
|
||||
const env0_16 = value.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
value = require(7553) /* metro dependency 7553: YouBarConstants */;
|
||||
const env0_17 = value.useYouBarHorizontalMargin;
|
||||
const env0_18 = value.useYouBarTotalHeight;
|
||||
object = {code: 'function QuestDockHooksTsx1(){const{restingQuestDockMode,minExpandedContentHeight,windowDimensions,safeArea}=this.__closure;return{restingQuestDockMode:restingQuestDockMode.get(),minExpandedContentHeight:minExpandedContentHeight.get(),windowWidth:windowDimensions.get().width,windowHeight:windowDimensions.get().height,safeArea:safeArea.get()};}'};
|
||||
object = {code: 'function QuestDockHooksTsx2(props,previous){const{cheapWorkletShallowEqual,QuestDockMode,runOnJS,setRestingQuestDockMode,questDockWrapperSpecs,youBarEnabled,QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED,getQuestDockCollapsedWidth,youBarHorizontalMargin,QUEST_DOCK_COLLAPSED_HEIGHT,activeQuestDockMode,QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED,getQuestDockClosedWidth,QUEST_DOCK_CLOSED_HEIGHT,getQuestDockExpandedHeightLimits,youBarHeight,QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED,getQuestDockExpandedWidth}=this.__closure;var _previous$restingQues;if(cheapWorkletShallowEqual(props,previous!==null&&previous!==void 0?previous:undefined))return;const{restingQuestDockMode:restingQuestDockMode,minExpandedContentHeight:minExpandedContentHeight,windowWidth:windowWidth,windowHeight:windowHeight,safeArea:safeArea}=props;switch(restingQuestDockMode){case QuestDockMode.RESET_TO_PREVIOUS:runOnJS(setRestingQuestDockMode)((_previous$restingQues=previous===null||previous===void 0?void 0:previous.restingQuestDockMode)!==null&&_previous$restingQues!==void 0?_previous$restingQues:QuestDockMode.COLLAPSED);return;case QuestDockMode.COLLAPSED:questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarEnabled?0:QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED*-1,width:getQuestDockCollapsedWidth(windowWidth,youBarEnabled?youBarHorizontalMargin:safeArea.left,youBarEnabled?youBarHorizontalMargin:safeArea.right),height:QUEST_DOCK_COLLAPSED_HEIGHT});activeQuestDockMode.set(QuestDockMode.COLLAPSED);break;case QuestDockMode.CLOSED:case QuestDockMode.SOFT_DISMISSED:questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarEnabled?0:QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED*-1,width:getQuestDockClosedWidth(windowWidth,youBarEnabled?youBarHorizontalMargin:safeArea.left,youBarEnabled?youBarHorizontalMargin:safeArea.right),height:QUEST_DOCK_CLOSED_HEIGHT});activeQuestDockMode.set(restingQuestDockMode);break;case QuestDockMode.EXPANDED:const minContentHeight=minExpandedContentHeight;const{minHeight:minHeight,maxHeight:maxHeight}=getQuestDockExpandedHeightLimits(windowHeight,safeArea.top,minContentHeight);const heightMidpoint=(maxHeight+minHeight)/2;let height;if(questDockWrapperSpecs.get().height<=QUEST_DOCK_COLLAPSED_HEIGHT){height=maxHeight;}else if(previous!=null&&questDockWrapperSpecs.get().height===getQuestDockExpandedHeightLimits(previous.windowHeight,previous.safeArea.top,minContentHeight).maxHeight){height=maxHeight;}else if(questDockWrapperSpecs.get().height>=heightMidpoint){height=maxHeight;}else{height=maxHeight;}questDockWrapperSpecs.set({...questDockWrapperSpecs.get(),x:0,y:youBarHeight>0?youBarHeight:QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED,width:getQuestDockExpandedWidth(windowWidth,safeArea.left,safeArea.right),height:height});activeQuestDockMode.set(QuestDockMode.EXPANDED);break;}}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockHooks.tsx');
|
||||
exports.useQuestDockModeAnimatedReaction = useQuestDockModeAnimatedReaction;
|
||||
exports.useQuestDockExternalOffset = useQuestDockExternalOffset;
|
||||
exports.useQuestDockDismissalReset = useQuestDockDismissalReset;
|
||||
exports.useActionSheetPressHandler = useActionSheetPressHandler;
|
||||
}
|
||||
|
||||
function useQuestDockModeAnimatedReaction() { // fn#103129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:3948, offset: 0x0225988b, size: 554 bytes, params: 1, frame: 29
|
||||
var object2;
|
||||
const binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {questDockWrapperSpecs, windowDimensions, activeQuestDockMode,
|
||||
minExpandedContentHeight} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const {restingQuestDockMode, setRestingQuestDockMode} = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]);
|
||||
const value4 = (importDefault(11281) /* metro dependency 11281: useSafeAreaInsetsSharedValueNative */)();
|
||||
const value5 = useYouBarHorizontalMargin();
|
||||
const value6 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDock');
|
||||
const value7 = useYouBarTotalHeight();
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useAnimatedReaction = reanimatedRexportModule.useAnimatedReaction;
|
||||
const closure = useQuestDockModeAnimatedReactionO;
|
||||
closure.__closure = {restingQuestDockMode: restingQuestDockMode, minExpandedContentHeight: minExpandedContentHeight,
|
||||
windowDimensions: windowDimensions, safeArea: value4};
|
||||
closure.__workletHash = 9502251090521;
|
||||
closure.__initData = env0_19;
|
||||
const closure2 = useQuestDockModeAnimatedReactionT;
|
||||
object2 = {};
|
||||
object2.cheapWorkletShallowEqual = (require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */).cheapWorkletShallowEqual;
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.runOnJS = reanimatedRexportModule.runOnJS;
|
||||
object2.setRestingQuestDockMode = setRestingQuestDockMode;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
object2.youBarEnabled = value6;
|
||||
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
|
||||
const getQuestDockCollapsedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockCollapsedWidth;
|
||||
object2.getQuestDockCollapsedWidth = getQuestDockCollapsedWidth;
|
||||
object2.youBarHorizontalMargin = value5;
|
||||
object2.QUEST_DOCK_COLLAPSED_HEIGHT = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
object2.activeQuestDockMode = activeQuestDockMode;
|
||||
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
|
||||
const getQuestDockClosedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockClosedWidth;
|
||||
object2.getQuestDockClosedWidth = getQuestDockClosedWidth;
|
||||
object2.QUEST_DOCK_CLOSED_HEIGHT = QUEST_DOCK_CLOSED_HEIGHT;
|
||||
const getQuestDockExpandedHeightLimits = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockExpandedHeightLimits;
|
||||
object2.getQuestDockExpandedHeightLimits = getQuestDockExpandedHeightLimits;
|
||||
object2.youBarHeight = value7;
|
||||
object2.QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED = QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
const getQuestDockExpandedWidth = (require(13571) /* metro dependency 13571: QuestDockUtils */).getQuestDockExpandedWidth;
|
||||
object2.getQuestDockExpandedWidth = getQuestDockExpandedWidth;
|
||||
closure2.__closure = object2;
|
||||
closure2.__workletHash = 9030555854984;
|
||||
closure2.__initData = env0_20;
|
||||
Reflect.apply(useAnimatedReaction, reanimatedRexportModule, [closure, closure2]);
|
||||
}
|
||||
|
||||
function useQuestDockExternalOffset() { // fn#103132, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6415, offset: 0x02259eef, size: 165 bytes, params: 1, frame: 18
|
||||
const fluxModule = require(566) /* metro dependency 566: flux */;
|
||||
const useStateFromStoresArray = fluxModule.useStateFromStoresArray;
|
||||
const value3 = env0_3(Reflect.apply(useStateFromStoresArray, fluxModule, [[QuestDockStore], function() {
|
||||
return [QuestDockStore.prevRestingQuestDockMode, QuestDockStore.isEligibleToBeVisible];
|
||||
}]), 2);
|
||||
return env0_4.useMemo(_fun103134, [value3[1], value3[0],
|
||||
(require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDock')]);
|
||||
}
|
||||
|
||||
function useQuestDockDismissalReset() { // fn#103135, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6830, offset: 0x0225a032, size: 129 bytes, params: 1, frame: 17
|
||||
const binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
binding.useEffect(function() {
|
||||
var closure = _fun103137;
|
||||
closure();
|
||||
var setInterval = global.setInterval;
|
||||
var MINUTE = importDefault(dependencyMap[14]).Millis.MINUTE;
|
||||
var env0_0 = setInterval(closure, 5 * MINUTE);
|
||||
return _fun103138;
|
||||
}, [setRestingQuestDockMode, Reflect.apply(useContext, binding, [QuestDockGestureContext]).activeQuestDockMode]);
|
||||
}
|
||||
|
||||
function useActionSheetPressHandler(a0) { // fn#103139, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7337, offset: 0x0225a172, size: 114 bytes, params: 2, frame: 17
|
||||
const env0_0 = a0;
|
||||
return env0_4.useCallback(_fun103140, [a0,
|
||||
(require(9949) /* metro dependency 9949: AnalyticsHooks */).useTrackQuestContentClickedWithImpression(),
|
||||
(require(9513) /* metro dependency 9513: ContentImpressionTrackerHooks */).useQuestImpressionId()]);
|
||||
}
|
||||
|
||||
function useQuestDockModeAnimatedReactionO() { // fn#103130, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:4359, owner: useQuestDockModeAnimatedReaction.o, offset: 0x02259ab5, size: 103 bytes, params: 1, frame: 11
|
||||
const object2 = {};
|
||||
const restingQuestDockModeBinding = restingQuestDockMode;
|
||||
let get = restingQuestDockModeBinding.get;
|
||||
object2.restingQuestDockMode = Reflect.apply(get, restingQuestDockModeBinding, []);
|
||||
object2.minExpandedContentHeight = minExpandedContentHeight.get();
|
||||
const windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
object2.windowWidth = Reflect.apply(get, windowDimensionsBinding, []).width;
|
||||
get = windowDimensionsBinding.get;
|
||||
object2.windowHeight = Reflect.apply(get, windowDimensionsBinding, []).height;
|
||||
object2.safeArea = env0_6.get();
|
||||
return object2;
|
||||
}
|
||||
|
||||
function useQuestDockModeAnimatedReactionT(a0, a1) { // fn#103131, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:4645, owner: useQuestDockModeAnimatedReaction.t, offset: 0x02259b1c, size: 979 bytes, params: 3, frame: 28
|
||||
var r7;
|
||||
var r11;
|
||||
var moduleValue2;
|
||||
var value4;
|
||||
var maxHeight;
|
||||
var questDockWrapperSpecsBinding;
|
||||
var get;
|
||||
var height;
|
||||
var value6;
|
||||
var value7;
|
||||
var moduleValue3;
|
||||
var set;
|
||||
var object2;
|
||||
var value8;
|
||||
var moduleValue4;
|
||||
var getQuestDockClosedWidth;
|
||||
var value11;
|
||||
var moduleValue5;
|
||||
var moduleValue6;
|
||||
let value = a1;
|
||||
const value3 = undefined;
|
||||
const cheapWorkletShallowEqualModule = require(7739) /* metro dependency 7739: cheapWorkletShallowEqual */;
|
||||
const cheapWorkletShallowEqual = cheapWorkletShallowEqualModule.cheapWorkletShallowEqual;
|
||||
let r2 = value ?? value3;
|
||||
if (!Reflect.apply(cheapWorkletShallowEqual, cheapWorkletShallowEqualModule, [a0, r2])) {
|
||||
var restingQuestDockMode = a0.restingQuestDockMode;
|
||||
var minExpandedContentHeight = a0.minExpandedContentHeight;
|
||||
var windowWidth = a0.windowWidth;
|
||||
var windowHeight = a0.windowHeight;
|
||||
var safeArea = a0.safeArea;
|
||||
var RESET_TO_PREVIOUS = QuestDockMode.RESET_TO_PREVIOUS;
|
||||
if (RESET_TO_PREVIOUS === restingQuestDockMode) {
|
||||
moduleValue6 = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
moduleValue6.runOnJS(setRestingQuestDockMode)((value == null ? value3 : value.restingQuestDockMode) ?? QuestDockMode.COLLAPSED);
|
||||
return value3;
|
||||
}
|
||||
var COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
if (COLLAPSED === restingQuestDockMode) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
|
||||
value11 = 0;
|
||||
object2['x'] = value11;
|
||||
object2['y'] = env0_8 ? value11 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_COLLAPSED;
|
||||
moduleValue5 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
object2['width'] = moduleValue5.getQuestDockCollapsedWidth(windowWidth, env0_8 ? env0_7 : safeArea.left,
|
||||
env0_8 ? env0_7 : safeArea.right);
|
||||
object2['height'] = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.COLLAPSED);
|
||||
} else if (QuestDockMode.CLOSED === restingQuestDockMode) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
|
||||
value8 = 0;
|
||||
object2['x'] = value8;
|
||||
r11 = env0_8 ? value8 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
|
||||
object2['y'] = r11;
|
||||
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockClosedWidth = moduleValue4.getQuestDockClosedWidth;
|
||||
r11 = env0_8 ? env0_7 : safeArea.left;
|
||||
object2['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue4, [windowWidth, r11,
|
||||
env0_8 ? env0_7 : safeArea.right]);
|
||||
object2['height'] = QUEST_DOCK_CLOSED_HEIGHT;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(restingQuestDockMode);
|
||||
} else if (QuestDockMode.SOFT_DISMISSED === restingQuestDockMode) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
copyDataProperties(object2, questDockWrapperSpecsBinding.get(), undefined);
|
||||
value8 = 0;
|
||||
object2['x'] = value8;
|
||||
r11 = env0_8 ? value8 : -1 * QUEST_DOCK_VERTICAL_EDGE_GUTTER_CLOSED;
|
||||
object2['y'] = r11;
|
||||
moduleValue4 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
getQuestDockClosedWidth = moduleValue4.getQuestDockClosedWidth;
|
||||
r11 = env0_8 ? env0_7 : safeArea.left;
|
||||
object2['width'] = Reflect.apply(getQuestDockClosedWidth, moduleValue4, [windowWidth, r11,
|
||||
env0_8 ? env0_7 : safeArea.right]);
|
||||
object2['height'] = QUEST_DOCK_CLOSED_HEIGHT;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(restingQuestDockMode);
|
||||
} else if (QuestDockMode.EXPANDED === restingQuestDockMode) {
|
||||
moduleValue2 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
value4 = moduleValue2.getQuestDockExpandedHeightLimits(windowHeight, safeArea.top,
|
||||
minExpandedContentHeight);
|
||||
value4.minHeight;
|
||||
maxHeight = value4.maxHeight;
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
height = Reflect.apply(get, questDockWrapperSpecsBinding, []).height;
|
||||
value6 = height <= QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
if (value6) {
|
||||
r2 = value6;
|
||||
} else {
|
||||
value7 = value != null;
|
||||
if (value7) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
height = questDockWrapperSpecsBinding.get().height;
|
||||
moduleValue3 = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
value = height === moduleValue3.getQuestDockExpandedHeightLimits(value.windowHeight,
|
||||
value.safeArea.top,
|
||||
minExpandedContentHeight).maxHeight;
|
||||
r7 = value;
|
||||
} else {
|
||||
r7 = value7;
|
||||
}
|
||||
r2 = r7;
|
||||
}
|
||||
if (!r2) {
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
questDockWrapperSpecsBinding.get().height;
|
||||
}
|
||||
questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
set = questDockWrapperSpecsBinding.set;
|
||||
object2 = {};
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
copyDataProperties(object2, Reflect.apply(get, questDockWrapperSpecsBinding, []), undefined);
|
||||
object2['x'] = 0;
|
||||
object2['y'] = env0_9 > 0 ? env0_9 : QUEST_DOCK_VERTICAL_EDGE_GUTTER_EXPANDED;
|
||||
value = require(13571) /* metro dependency 13571: QuestDockUtils */;
|
||||
value = value.getQuestDockExpandedWidth(windowWidth, safeArea.left, safeArea.right);
|
||||
object2['width'] = value;
|
||||
object2['height'] = maxHeight;
|
||||
Reflect.apply(set, questDockWrapperSpecsBinding, [object2]);
|
||||
activeQuestDockMode.set(QuestDockMode.EXPANDED);
|
||||
}
|
||||
}
|
||||
return value3;
|
||||
}
|
||||
|
||||
function _fun103134() { // fn#103134, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:6637, offset: 0x02259fb5, size: 125 bytes, params: 1, frame: 4
|
||||
var binding;
|
||||
var value2;
|
||||
if (env0_1) {
|
||||
binding = env0_0;
|
||||
value2 = environment.__proto__;
|
||||
if (QuestDockMode.COLLAPSED === binding) {
|
||||
return env0_2 ? QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED_WITH_YOU_BAR : QUEST_DOCK_EXTERNAL_OFFSET_COLLAPSED;
|
||||
}
|
||||
if (QuestDockMode.EXPANDED === binding) {
|
||||
return env0_2 ? QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED_WITH_YOU_BAR : QUEST_DOCK_EXTERNAL_OFFSET_EXPANDED;
|
||||
}
|
||||
if (QuestDockMode.CLOSED === binding) {
|
||||
return QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
|
||||
}
|
||||
if (QuestDockMode.SOFT_DISMISSED === binding) {
|
||||
return QUEST_DOCK_EXTERNAL_OFFSET_CLOSED;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
function _fun103136() { // fn#103136, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7038, offset: 0x0225a0b3, size: 84 bytes, params: 1, frame: 16
|
||||
const closure = function() {
|
||||
if (!(activeQuestDockMode.get() !== QuestDockMode.SOFT_DISMISSED || require(dependencyMap[12]).isSoftDismissed(QuestDockStore.questDockSoftDismissedAt))) {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
};
|
||||
closure();
|
||||
const setInterval = global.setInterval;
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const MINUTE = Millis.MINUTE;
|
||||
const env0_0 = setInterval(closure, 5 * MINUTE);
|
||||
return _fun103138;
|
||||
}
|
||||
|
||||
function _fun103140() { // fn#103140, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13759:7491, offset: 0x0225a1e4, size: 484 bytes, params: 1, frame: 20
|
||||
var binding;
|
||||
var object2;
|
||||
const QuestContent = require(dependencyMap[22]).QuestContent;
|
||||
var QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = require(dependencyMap[21]).QuestContentCTA;
|
||||
var moduleValue2;
|
||||
var captureAdUserAction;
|
||||
let value = environment.__proto__;
|
||||
const moduleValue = require(dependencyMap[17]);
|
||||
const shouldMigrateToAdAnalyticsInterface = moduleValue.shouldMigrateToAdAnalyticsInterface;
|
||||
const AdAnalyticsInterfaceExperimentStep = require(dependencyMap[17]).AdAnalyticsInterfaceExperimentStep;
|
||||
const STEP_2_CLICKED_INTERNAL = AdAnalyticsInterfaceExperimentStep.STEP_2_CLICKED_INTERNAL;
|
||||
if (Reflect.apply(shouldMigrateToAdAnalyticsInterface, moduleValue, [STEP_2_CLICKED_INTERNAL,
|
||||
'quest_dock_action_sheet'])) {
|
||||
moduleValue2 = require(dependencyMap[18]);
|
||||
captureAdUserAction = moduleValue2.captureAdUserAction;
|
||||
object2 = {};
|
||||
object2.type = require(dependencyMap[19]).AdUserActionType.CLICK_INTERNAL;
|
||||
object2.adCreativeType = require(dependencyMap[20]).AdCreativeType.QUEST;
|
||||
object2.adCreativeId = env0_0.id;
|
||||
object2.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.surfaceId = QUEST_BAR_MOBILE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
object2.impressionId = env0_2;
|
||||
Reflect.apply(captureAdUserAction, moduleValue2, [object2]);
|
||||
} else {
|
||||
binding = env0_1;
|
||||
object2 = {};
|
||||
object2.questId = env0_0.id;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
object2.questContentCTA = QuestContentCTA.OPEN_CONTEXT_MENU;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
binding(object2);
|
||||
}
|
||||
const defaultImport = importDefault(dependencyMap[23]);
|
||||
const openLazy = defaultImport.openLazy;
|
||||
value = require(dependencyMap[25]);
|
||||
value = value(dependencyMap[24], dependencyMap.paths);
|
||||
Reflect.apply(openLazy, defaultImport, [value, 'QuestDockContextMenuActionSheet', {quest: env0_0}]);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
/* Metro module 13570; source: modules/quests/native/QuestDock/QuestDockStore.tsx; dependencies: [6, 7, 15, 17, 18, 6528, 13571, 566, 694, 2] */
|
||||
function _fun103141(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103141, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:6, offset: 0x0225a3c8, size: 353 bytes, params: 8, frame: 19
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_4 = importDefault(6) /* metro dependency 6 */;
|
||||
const env0_5 = importDefault(7) /* metro dependency 7 */;
|
||||
const env0_6 = importDefault(15) /* metro dependency 15 */;
|
||||
const env0_7 = importDefault(17) /* metro dependency 17 */;
|
||||
const env0_8 = importDefault(18) /* metro dependency 18 */;
|
||||
const QuestDockMode = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
let env0_2 = QuestDockMode.COLLAPSED;
|
||||
const PersistedStore = (importDefault(566) /* metro dependency 566: flux */).PersistedStore;
|
||||
let value = _fun103145(PersistedStore);
|
||||
value.displayName = 'QuestDockStore';
|
||||
value.persistKey = 'QuestDockStore';
|
||||
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
|
||||
{QUESTS_PREV_RESTING_QUEST_DOCK_MODE_UPDATE: function(a0) {
|
||||
var value2 = a0.mode !== COLLAPSED;
|
||||
env0_2 = a0.mode;
|
||||
if (value2) {
|
||||
env0_3 = a0.mode !== QuestDockMode.SOFT_DISMISSED ? null : global.Date.now();
|
||||
}
|
||||
return value2;
|
||||
}, QUESTS_DOCK_RESET_SOFT_DISMISSAL: function() {
|
||||
env0_2 = QuestDockMode.COLLAPSED;
|
||||
env0_3 = null;
|
||||
}, QUESTS_DOCK_VISIBILITY_ELIGIBILITY_UPDATE: function(a0) {
|
||||
env0_10 = a0.isEligibleToBeVisible;
|
||||
}});
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockStore.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _isNativeReflectConstruct_103142() { // fn#103142, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:176, offset: 0x0225a529, size: 98 bytes, params: 1, frame: 18
|
||||
var Boolean;
|
||||
var prototype;
|
||||
var valueOf;
|
||||
var call;
|
||||
var Reflect;
|
||||
var construct;
|
||||
var closure;
|
||||
var value;
|
||||
var error;
|
||||
try {
|
||||
Boolean = global.Boolean;
|
||||
prototype = Boolean.prototype;
|
||||
valueOf = prototype.valueOf;
|
||||
call = valueOf.call;
|
||||
Reflect = global.Reflect;
|
||||
construct = Reflect.construct;
|
||||
Boolean = global.Boolean;
|
||||
closure = function() {
|
||||
};
|
||||
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
|
||||
value = Reflect.apply(call, valueOf, [value]);
|
||||
var result = !value;
|
||||
} catch (error) {
|
||||
}
|
||||
return (_isNativeReflectConstruct_103142_isNativeReflectConstruct = function() {
|
||||
return !!result;
|
||||
})();
|
||||
}
|
||||
|
||||
function _fun103145(a0) { // fn#103145, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:441, offset: 0x0225a58b, size: 172 bytes, params: 2, frame: 16
|
||||
const closure = QuestDockStore;
|
||||
env0_8(closure, a0);
|
||||
return env0_5(closure, [{key: 'initialize', value: value_103147}, {key: 'getState', value: value_103148},
|
||||
{key: 'prevRestingQuestDockMode', get: function() {
|
||||
return COLLAPSED;
|
||||
}}, {key: 'questDockSoftDismissedAt', get: get_103150}, {key: 'isEligibleToBeVisible', get: get_103151}]);
|
||||
}
|
||||
|
||||
function value_103147(a0) { // fn#103147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:741, offset: 0x0225a637, size: 88 bytes, params: 2, frame: 12
|
||||
var r0;
|
||||
var questDockSoftDismissedAt;
|
||||
var value;
|
||||
if (a0 != null) {
|
||||
questDockSoftDismissedAt = a0.questDockSoftDismissedAt;
|
||||
value = environment.__proto__;
|
||||
r0 = (require(13571) /* metro dependency 13571: QuestDockUtils */).isSoftDismissed(questDockSoftDismissedAt) ? QuestDockMode.SOFT_DISMISSED : QuestDockMode.COLLAPSED;
|
||||
}
|
||||
}
|
||||
|
||||
function value_103148() { // fn#103148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13760:875, offset: 0x0225a68f, size: 25 bytes, params: 1, frame: 3
|
||||
return {prevRestingQuestDockMode: COLLAPSED, questDockSoftDismissedAt: env1_3};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
/* Metro module 13664; source: modules/quests/native/QuestDock/QuestDockUnenrolledBackground.tsx; dependencies: [57, 31, 27, 4502, 6528, 13572, 661, 33, 4501, 13650, 13568, 13573, 13576, 8621, 566, 3860, 697, 674, 4017, 4577, 477, 9480, 8141, 9543, 5475, 4589, 2] */
|
||||
function _fun104349(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:6, offset: 0x0229337b, size: 502 bytes, params: 8, frame: 25
|
||||
var object6;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.AppState;
|
||||
const StyleSheet = value2.StyleSheet;
|
||||
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
|
||||
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const QUEST_DOCK_EXPANDED_HEIGHT = questDockConstantsModule.QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
const env0_8 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
const env0_9 = questDockConstantsModule.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
const env0_10 = (require(661) /* metro dependency 661: Constants */).VerticalGradient;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value4.jsx;
|
||||
const env0_12 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object6 = {};
|
||||
const object7 = {};
|
||||
copyDataProperties(object7, StyleSheet.absoluteFillObject, undefined);
|
||||
object7['right'] = undefined;
|
||||
object7['bottom'] = undefined;
|
||||
object7['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object7['zIndex'] = 1;
|
||||
object6.backgroundWrapper = object7;
|
||||
const object8 = {};
|
||||
copyDataProperties(object8, StyleSheet.absoluteFillObject, undefined);
|
||||
object8['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object8['resizeMode'] = 'cover';
|
||||
object6.backgroundHeroAsset = object8;
|
||||
const object9 = {};
|
||||
copyDataProperties(object9, StyleSheet.absoluteFillObject, undefined);
|
||||
object6.backgroundHeroAssetVideo = object9;
|
||||
const object10 = {};
|
||||
copyDataProperties(object10, StyleSheet.absoluteFillObject, undefined);
|
||||
object10['height'] = QUEST_DOCK_EXPANDED_HEIGHT;
|
||||
object6.backgroundGradient = object10;
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object6]);
|
||||
object6 = {code: 'function QuestDockUnenrolledBackgroundTsx1(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,windowDimensions}=this.__closure;return{transform:[{translateX:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*-1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:withSpring(activeQuestDockMode.get()===QuestDockMode.COLLAPSED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*-1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}],width:windowDimensions.get().width};}'};
|
||||
object6 = {code: 'function QuestDockUnenrolledBackgroundTsx2(){const{withSpring,activeQuestDockMode,QuestDockMode,videoLoaded,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()!==QuestDockMode.EXPANDED||!videoLoaded?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
|
||||
value = value.memo(QuestDockUnenrolledBackground);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledBackground.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBackground() { // fn#104350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:1604, offset: 0x02293571, size: 1273 bytes, params: 1, frame: 35
|
||||
var moduleValue5;
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
const styles = useStyles();
|
||||
const {staticUrl,
|
||||
videoAsset} = (require(13568) /* metro dependency 13568: QuestHooksNative */).useQuestDockHeroAsset(quest);
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {activeQuestDockMode, windowDimensions} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const setRestingQuestDockMode = Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode;
|
||||
const value4 = (importDefault(8621) /* metro dependency 8621: useStateFromSharedValue */)(activeQuestDockMode);
|
||||
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
||||
function() {
|
||||
return AccessibilityStore.useReducedMotion;
|
||||
});
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const CARD_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.CARD_BACKGROUND_DEFAULT;
|
||||
const value5 = Reflect.apply(useToken, useTokenModule, [CARD_BACKGROUND_DEFAULT]);
|
||||
const env0_3 = value5;
|
||||
const value6 = binding.useMemo(_fun104352, [value5]);
|
||||
let closure = function() {
|
||||
return [0, 0.33, 0.76, 1];
|
||||
};
|
||||
const value7 = binding.useMemo(closure, []);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledBackgroundS;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED: QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,
|
||||
windowDimensions: windowDimensions};
|
||||
closure.__workletHash = 3565242281634;
|
||||
closure.__initData = env0_14;
|
||||
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const useState = binding.useState;
|
||||
const value10 = env0_3(Reflect.apply(useState, binding, [AppState.currentState !== 'active']), 2);
|
||||
var property = value10[0];
|
||||
var env0_4 = value10[1];
|
||||
binding.useEffect(function() {
|
||||
var env0_0 = AppState.addEventListener('change', _fun104356);
|
||||
return _fun104357;
|
||||
}, [activeQuestDockMode, setRestingQuestDockMode]);
|
||||
useContext = binding.useContext;
|
||||
let r4 = !property && Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).isRendered && !useReducedMotion && videoAsset != null;
|
||||
if (r4) {
|
||||
moduleValue5 = require(477) /* metro dependency 477: PlatformUtils */;
|
||||
r4 = !moduleValue5.isAndroid();
|
||||
}
|
||||
r4 = r4 && (require(9480) /* metro dependency 9480: QuestUtilsNative */).isHeroVideoSupported(videoAsset);
|
||||
binding = env0_4;
|
||||
var [property, env0_6] = env0_3(binding.useState(false), 2);
|
||||
const value17 = binding.useCallback(_fun104358, []);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledBackgroundG;
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode, videoLoaded: property,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
|
||||
closure.__workletHash = 13084905891385;
|
||||
closure.__initData = env0_15;
|
||||
const value18 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
const items2 = [styles.backgroundWrapper, value8];
|
||||
const r5 = r4 ? <env0_4.Fragment>{((VideoComponent) => <VideoComponent style={styles.backgroundHeroAssetVideo} onLoad={value17} source={{uri: videoAsset.url}} paused={value4 !== QuestDockMode.EXPANDED} resizeMode="cover" muted disableFocus preventsDisplaySleepDuringVideoPlayback={false} />)((require(9543) /* metro dependency 9543: Video */).VideoComponent)}<ReanimatedNativeView style={value18}>{((Component) => <Component style={styles.backgroundHeroAsset} source={{uri: staticUrl}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)}</ReanimatedNativeView></env0_4.Fragment> : ((Component) => <Component style={styles.backgroundHeroAsset} source={{uri: staticUrl}} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
||||
const defaultImport5 = importDefault(4589) /* metro dependency 4589 */;
|
||||
const {START, END} = VerticalGradient;
|
||||
return (
|
||||
<ReanimatedNativeView style={items2}>
|
||||
{r5}
|
||||
{((Component) => <Component locations={value7} style={styles.backgroundGradient} start={START} end={END} colors={value6} />)(defaultImport5)}
|
||||
</ReanimatedNativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function _fun104352() { // fn#104352, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2080, offset: 0x02293a6a, size: 168 bytes, params: 1, frame: 12
|
||||
let value = environment.__proto__;
|
||||
value = importDefault(674) /* metro dependency 674 */;
|
||||
value = value(env0_3);
|
||||
const value3 = value.alpha(0);
|
||||
const items2 = [value3.hex()];
|
||||
const value5 = value.alpha(0.1);
|
||||
items2[1] = value5.hex();
|
||||
const value6 = value.alpha(0.8);
|
||||
items2[2] = value6.hex();
|
||||
value = value.alpha(1);
|
||||
items2[3] = value.hex();
|
||||
return items2;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBackgroundS() { // fn#104354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2256, owner: QuestDockUnenrolledBackground.s, offset: 0x02293b1e, size: 217 bytes, params: 1, frame: 21
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const activeQuestDockModeBinding = activeQuestDockMode;
|
||||
let get = activeQuestDockModeBinding.get;
|
||||
const value3 = Reflect.apply(get, activeQuestDockModeBinding, []);
|
||||
let COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
const value4 = 0;
|
||||
const items2 = [{translateX: Reflect.apply(withSpring, springModule,
|
||||
[value3 !== COLLAPSED ? value4 : -1 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])}];
|
||||
const moduleValue2 = springModule;
|
||||
withSpring = moduleValue2.withSpring;
|
||||
const value6 = activeQuestDockMode.get();
|
||||
COLLAPSED = QuestDockMode.COLLAPSED;
|
||||
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue2,
|
||||
[value6 !== COLLAPSED ? value4 : -1 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
|
||||
const windowDimensionsBinding = windowDimensions;
|
||||
get = windowDimensionsBinding.get;
|
||||
return {transform: items2, width: Reflect.apply(get, windowDimensionsBinding, []).width};
|
||||
}
|
||||
|
||||
function _fun104355() { // fn#104355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2739, offset: 0x02293bf7, size: 45 bytes, params: 1, frame: 14
|
||||
const env0_0 = AppState.addEventListener('change', _fun104356);
|
||||
return _fun104357;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBackgroundG() { // fn#104359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:3125, owner: QuestDockUnenrolledBackground.G, offset: 0x02293c9a, size: 96 bytes, params: 1, frame: 18
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
const withSpring = springModule.withSpring;
|
||||
const value3 = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
const value4 = 1;
|
||||
return {opacity: Reflect.apply(withSpring, springModule, [value3 !== EXPANDED ? value4 : env0_5 ? 0 : value4,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
|
||||
}
|
||||
|
||||
function _fun104356(a0) { // fn#104356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13861:2779, offset: 0x02293c24, size: 118 bytes, params: 2, frame: 15
|
||||
let value = a0 !== 'active';
|
||||
env1_4(value);
|
||||
let r3 = (require(477) /* metro dependency 477: PlatformUtils */).isIOS() && value;
|
||||
if (r3) {
|
||||
value = activeQuestDockMode.get();
|
||||
value = value === QuestDockMode.EXPANDED;
|
||||
r3 = value;
|
||||
}
|
||||
if (r3) {
|
||||
setRestingQuestDockMode(QuestDockMode.COLLAPSED);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/* Metro module 13662; source: modules/quests/native/QuestDock/QuestDockUnenrolledBody.tsx; dependencies: [5, 31, 27, 7093, 13570, 6528, 13572, 33, 4501, 697, 13650, 632, 13568, 9483, 1585, 5176, 9502, 9503, 13576, 9484, 7120, 6531, 13595, 9950, 13634, 13631, 9542, 13635, 4573, 1244, 1305, 9480, 2] */
|
||||
function _fun104330(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104330, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:6, offset: 0x02292031, size: 642 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(5) /* metro dependency 5 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const env0_5 = (require(27) /* metro dependency 27 */).View;
|
||||
const questStore = importDefault(7093) /* metro dependency 7093: QuestStore */;
|
||||
const questDockStore = importDefault(13570) /* metro dependency 13570: QuestDockStore */;
|
||||
const questConstantsModule = require(6528) /* metro dependency 6528: QuestConstants */;
|
||||
const env0_8 = questConstantsModule.QuestDockMode;
|
||||
const env0_9 = questConstantsModule.QuestsExperimentLocations;
|
||||
const {QUEST_DOCK_EXPANDED_PADDING_BOTTOM,
|
||||
QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL} = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_11 = value4.jsx;
|
||||
const env0_12 = value4.jsxs;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.wrapper = {'flexGrow': 1, 'flexShrink': 0, 'justifyContent': 'flex-end',
|
||||
paddingHorizontal: QUEST_DOCK_EXPANDED_PADDING_HORIZONTAL, paddingBottom: QUEST_DOCK_EXPANDED_PADDING_BOTTOM};
|
||||
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
|
||||
object2.rewardContentWrapper = {'borderRadius': null, 'overflow': 'hidden', 'padding': 8, 'paddingRight': 16,
|
||||
borderRadius: QUEST_DOCK_BORDER_RADIUS};
|
||||
object2.rewardContent = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 16};
|
||||
object2.rewardContentCopy = {'flexGrow': 1, 'flexShrink': 1, 'gap': 4};
|
||||
object2.premiumRewardPerkPill = {alignSelf: 'flex-start'};
|
||||
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
||||
object2.titleRow = {'flexDirection': 'row', 'alignItems': 'center', 'gap': null, 'flexWrap': 'wrap', gap: PX_8};
|
||||
const object3 = {};
|
||||
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
||||
object2.questDockRewardTile = object3;
|
||||
object2.questDockCtaWrapper = {'marginTop': 12, 'paddingHorizontal': 4, 'paddingTop': 16, 'position': 'relative'};
|
||||
const object4 = {};
|
||||
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
||||
object2.questDockCta = object4;
|
||||
object2.questDockCtaRow = {alignSelf: 'stretch'};
|
||||
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
||||
object2.questDockCtaSaparator = {'position': 'absolute', 'left': -12, 'right': -12, 'top': 0,
|
||||
'backgroundColor': null, 'height': 1, 'opacity': 1, backgroundColor: BORDER_SUBTLE};
|
||||
const env0_13 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
value = value.memo(QuestDockUnenrolledBody);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledBody.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBody() { // fn#104331, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:1202, offset: 0x022922b3, size: 1382 bytes, params: 1, frame: 44
|
||||
var object2;
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const {isRendered, quest} = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]);
|
||||
const styles = useStyles();
|
||||
const value3 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([QuestDockStore],
|
||||
function() {
|
||||
return QuestDockStore.prevRestingQuestDockMode === QuestDockMode.EXPANDED;
|
||||
});
|
||||
const value4 = (require(632) /* metro dependency 632: useStateFromStores */).useStateFromStores([QuestStore],
|
||||
function() {
|
||||
return QuestStore.isEnrolling(quest.id);
|
||||
});
|
||||
const value5 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useHasWatchVideoOnMobileTasks(quest.config);
|
||||
const value6 = (require(9483) /* metro dependency 9483: QuestHooks */).useQuestTaskDetails(quest);
|
||||
const {isMobileActivityQuest, questApplication,
|
||||
launchMobileActivity} = (require(13568) /* metro dependency 13568: QuestHooksNative */).useMobileActivityQuest(quest);
|
||||
const env0_3 = launchMobileActivity;
|
||||
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
|
||||
const value8 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockUnenrolledBody');
|
||||
const value9 = (require(9502) /* metro dependency 9502: QuestOrbMultiplierHooks */).useQuestOrbMultiplierEligibility();
|
||||
const value10 = (require(9483) /* metro dependency 9483: QuestHooks */).useShouldShowBonusOrbsUX(quest, value9);
|
||||
const r6 = value10 && value9 === (require(9503) /* metro dependency 9503: QuestOrbMultiplierUtils */).QuestOrbMultiplierEligibilityType.NITRO;
|
||||
binding = env0_4;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const value13 = binding.useCallback(env0_3(_fun104335), [quest.id, value5, Reflect.apply(useContext, binding,
|
||||
[QuestDockExternalCoordinationContext]).setRestingQuestDockMode, isMobileActivityQuest, launchMobileActivity]);
|
||||
const value14 = (require(9950) /* metro dependency 9950: QuestCopyHooks */).usePrimaryCtaCopy({quest: quest,
|
||||
application: questApplication, shortText: true});
|
||||
const questCopyHooksModule = require(9950) /* metro dependency 9950: QuestCopyHooks */;
|
||||
const useQuestsInstructionsToWinReward = questCopyHooksModule.useQuestsInstructionsToWinReward;
|
||||
object2 = {quest: quest};
|
||||
const QUESTS_BAR_MOBILE = QuestsExperimentLocations.QUESTS_BAR_MOBILE;
|
||||
object2.location = QUESTS_BAR_MOBILE;
|
||||
object2.taskDetails = value6;
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
const QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
const value15 = Reflect.apply(useQuestsInstructionsToWinReward, questCopyHooksModule, [object2]);
|
||||
const PremiumRewardGradient = importDefault(13634) /* metro dependency 13634: PremiumRewardGradient */;
|
||||
const premiumRewardGradientProps = {visible: r6, glow: true, style: [styles.wrapper,
|
||||
value8 ? {paddingBottom: global.Math.max(bottom, QUEST_DOCK_EXPANDED_PADDING_BOTTOM)} : null]};
|
||||
const value17 = ((Component) => <Component />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */);
|
||||
const QuestRewardTile = importDefault(9542) /* metro dependency 9542: QuestRewardTile */;
|
||||
const value18 = !value3;
|
||||
const questRewardTile = <QuestRewardTile paused={value3 ? !isRendered : value18} height={80} width={80} quest={quest} style={styles.questDockRewardTile} withAnimation={value3 && isRendered} />;
|
||||
const items4 = [value10 && <View style={styles.premiumRewardPerkPill}>{((QuestOrbMultiplierPerkPill) => <QuestOrbMultiplierPerkPill questId={quest.config.id} orbMultiplierEligibility={value9} />)((require(13635) /* metro dependency 13635: QuestOrbMultiplierPerkPill */).QuestOrbMultiplierPerkPill)}</View>];
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const format = intl.format;
|
||||
const EQa7os = (require(1244) /* metro dependency 1244: indexNative */).t.EQa7os;
|
||||
items4[1] = <View style={styles.titleRow}><Text variant="heading-md/medium" color="mobile-text-heading-primary">{Reflect.apply(format,
|
||||
intl, [EQa7os, {questName: quest.config.messages.questName}])}</Text></View>;
|
||||
items4[2] = <Text color="text-default" variant="text-sm/normal">{value15}</Text>;
|
||||
const view2 = <View style={styles.rewardContentWrapper}>{value17}<View style={styles.rewardContent}>{questRewardTile}<View style={styles.rewardContentCopy}>{items4}</View></View></View>;
|
||||
const view = <View style={styles.questDockCtaSaparator} />;
|
||||
const ShinyButton = (require(1305) /* metro dependency 1305: native */).ShinyButton;
|
||||
return (
|
||||
<PremiumRewardGradient {...premiumRewardGradientProps}>
|
||||
{view2}
|
||||
<View style={styles.questDockCtaWrapper}>
|
||||
{view}
|
||||
<View style={styles.questDockCtaRow}>
|
||||
<ShinyButton
|
||||
style={styles.questDockCta}
|
||||
onPress={value13}
|
||||
loading={value4}
|
||||
renderIcon={renderIcon}
|
||||
text={value14}
|
||||
shineDisabled={value18}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
</PremiumRewardGradient>
|
||||
);
|
||||
}
|
||||
|
||||
function* _fun104335() { // fn#104335, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:1958, offset: 0x02292861, size: 316 bytes, params: 1, frame: 21
|
||||
var binding3;
|
||||
var value7;
|
||||
if (true) {
|
||||
value = environment.__proto__.__proto__;
|
||||
var binding = env2_0;
|
||||
var binding2 = env2_2;
|
||||
var value3 = binding(binding2[19]);
|
||||
var enrollInQuest = value3.enrollInQuest;
|
||||
var id = require.id;
|
||||
var object2 = {};
|
||||
var QuestContentCTA = binding(binding2[20]).QuestContentCTA;
|
||||
var ACCEPT_QUEST = QuestContentCTA.ACCEPT_QUEST;
|
||||
object2.questContentCTA = ACCEPT_QUEST;
|
||||
var QuestContent = binding(binding2[21]).QuestContent;
|
||||
var QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.questContent = QUEST_BAR_MOBILE;
|
||||
QuestContent = binding(binding2[21]).QuestContent;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object2.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
yield Reflect.apply(enrollInQuest, value3, [id, object2]);
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
if (dependencyMap) {
|
||||
yield env1_3();
|
||||
if (false) {
|
||||
return undefined;
|
||||
}
|
||||
env1_4(env2_8.COLLAPSED);
|
||||
} else if (importDefault) {
|
||||
binding = env2_1;
|
||||
binding3 = env2_2;
|
||||
value7 = binding(binding3[22]);
|
||||
object2 = {};
|
||||
object2.questId = require.id;
|
||||
binding = env2_0;
|
||||
object2.sourceQuestContent = binding(binding3[21]).QuestContent.QUEST_BAR_MOBILE;
|
||||
value7(object2);
|
||||
binding = env1_4;
|
||||
binding(env2_8.COLLAPSED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledBodyRenderIcon() { // fn#104336, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13859:3507, owner: QuestDockUnenrolledBody.renderIcon, offset: 0x0229299d, size: 48 bytes, params: 1, frame: 13
|
||||
const value = environment.__proto__;
|
||||
return (require(9480) /* metro dependency 9480: QuestUtilsNative */).getPrimaryCtaIcon(quest, true);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,378 @@
|
||||
/* Metro module 13655; source: modules/quests/native/QuestDock/QuestDockUnenrolledHeader.tsx; dependencies: [57, 31, 27, 6528, 13572, 482, 33, 4501, 697, 4577, 13650, 13573, 478, 13569, 13580, 6531, 7120, 4048, 4002, 5176, 3860, 13652, 4017, 13568, 8141, 13656, 13631, 5475, 13658, 13659, 13622, 4573, 1244, 5278, 10139, 8638, 2] */
|
||||
function _fun104295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6, offset: 0x0228f0a7, size: 725 bytes, params: 8, frame: 23
|
||||
var object2;
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_3 = importDefault(57) /* metro dependency 57 */;
|
||||
let value = importAll(31) /* metro dependency 31 */;
|
||||
const value2 = require(27) /* metro dependency 27 */;
|
||||
const env0_5 = value2.AccessibilityInfo;
|
||||
const env0_6 = value2.View;
|
||||
const env0_7 = (require(6528) /* metro dependency 6528: QuestConstants */).QuestDockMode;
|
||||
const questDockConstantsModule = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_8 = questDockConstantsModule.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
const env0_9 = questDockConstantsModule.QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
const QUEST_DOCK_COLLAPSED_HEIGHT = questDockConstantsModule.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_10 = questDockConstantsModule.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
const env0_11 = questDockConstantsModule.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
const env0_12 = (require(482) /* metro dependency 482: Constants */).ThemeTypes;
|
||||
const value4 = require(33) /* metro dependency 33 */;
|
||||
const env0_13 = value4.jsx;
|
||||
const env0_14 = value4.jsxs;
|
||||
const env0_15 = value4.Fragment;
|
||||
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
||||
const createStyles = createStylesModule.createStyles;
|
||||
object2 = {};
|
||||
object2.questDockHeader = {'alignItems': 'center', 'justifyContent': 'space-between', 'flexDirection': 'row',
|
||||
'height': null, 'overflow': 'hidden', 'paddingRight': 16, 'paddingLeft': 8, 'position': 'absolute', 'zIndex': 2,
|
||||
height: QUEST_DOCK_COLLAPSED_HEIGHT};
|
||||
object2.wreathImage = {'height': 35, 'marginRight': 4, 'width': 35};
|
||||
object2.questDockHeaderPrimary = {'alignItems': 'center', 'flexDirection': 'row'};
|
||||
object2.logo = {marginTop: 2};
|
||||
object2.questDockHeaderSecondary = {'flexGrow': 0, 'flexShrink': 0};
|
||||
object2.questDockHeaderContentCollapsed = {'justifyContent': 'center', 'position': 'absolute', 'bottom': 0,
|
||||
'top': 0, 'right': 0};
|
||||
object2.questDockHeaderContentExpanded = {'alignItems': 'center', 'flexDirection': 'row', 'gap': 8};
|
||||
object2.questDockHeaderActionDisclosures = {'alignItems': 'center', 'display': 'flex', 'flexDirection': 'row',
|
||||
'gap': 4};
|
||||
object2.questDockHeaderActionDisclosuresIcon = {'height': 14, 'width': 14};
|
||||
const TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_DEFAULT;
|
||||
object2.questDockHeaderActionSeparator = {'backgroundColor': null, 'opacity': 0.2, 'height': 18, 'width': 1.5,
|
||||
backgroundColor: TEXT_DEFAULT};
|
||||
object2.questDockHeaderTertiaryContent = {opacity: 0.7};
|
||||
const env0_16 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
||||
object2 = {code: 'function questDockHeaderLayoutAnimation_QuestDockUnenrolledHeaderTsx1(values){const{withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:withSpring(values.targetOriginX,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),originY:withSpring(values.targetOriginY,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),height:withSpring(values.targetHeight,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED),width:withSpring(values.targetWidth,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}};}'};
|
||||
const env0_18 = _fun104296();
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx2(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,withSpring,questDockAnimatedBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs,QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED}=this.__closure;return{borderTopLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderTopRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,borderBottomRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,width:activeQuestDockMode.get()===QuestDockMode.EXPANDED?questDockWrapperSpecs.get().width-QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED*2:questDockWrapperSpecs.get().width,transform:[{translateX:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)},{translateY:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)}]};}'};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx3(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:1,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx4(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED}=this.__closure;return{right:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED*-1:0};}'};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx5(){const{withSpring,activeQuestDockMode,QuestDockMode,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED}=this.__closure;return{opacity:withSpring(activeQuestDockMode.get()===QuestDockMode.EXPANDED?1:0,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};}'};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx6(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED}=this.__closure;return{right:activeQuestDockMode.get()===QuestDockMode.EXPANDED?0:QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};}'};
|
||||
object2 = {code: "function QuestDockUnenrolledHeaderTsx7(){const{activeQuestDockMode,QuestDockMode}=this.__closure;return{pointerEvents:activeQuestDockMode.get()===QuestDockMode.EXPANDED?'auto':'none'};}"};
|
||||
object2 = {code: 'function QuestDockUnenrolledHeaderTsx8(){const{activeQuestDockMode,QuestDockMode,QUEST_DOCK_CONTENT_BORDER_RADII,questDockBorderRadius,youBarEnabled,withSpring,questDockAnimatedBorderRadius,QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED,questDockWrapperSpecs}=this.__closure;return{borderRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:questDockBorderRadius,borderBottomLeftRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,borderBottomRightRadius:activeQuestDockMode.get()===QuestDockMode.EXPANDED?QUEST_DOCK_CONTENT_BORDER_RADII:youBarEnabled?withSpring(questDockAnimatedBorderRadius.get(),QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED):questDockBorderRadius,width:questDockWrapperSpecs.get().width};}'};
|
||||
value = value.memo(QuestDockUnenrolledHeader);
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUnenrolledHeader.tsx');
|
||||
exports.default = value;
|
||||
}
|
||||
|
||||
function _fun104296() { // fn#104296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:1958, offset: 0x0228f37c, size: 88 bytes, params: 1, frame: 14
|
||||
const closure = questDockHeaderLayoutAnimation;
|
||||
const object2 = {};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 6787168806966;
|
||||
closure.__initData = env0_17;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeader() { // fn#104298, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6344, offset: 0x0228f4a1, size: 2221 bytes, params: 1, frame: 42
|
||||
var object2;
|
||||
let binding = env0_4;
|
||||
let useContext = binding.useContext;
|
||||
const quest = Reflect.apply(useContext, binding,
|
||||
[importDefault(13650) /* metro dependency 13650: QuestDockContext */]).quest;
|
||||
useContext = binding.useContext;
|
||||
const QuestDockGestureContext = (require(13573) /* metro dependency 13573: QuestDockGestureContext */).QuestDockGestureContext;
|
||||
const {activeQuestDockMode, questDockWrapperSpecs} = Reflect.apply(useContext, binding, [QuestDockGestureContext]);
|
||||
const [property, env0_3] = env0_3Binding(binding.useState(false), 2);
|
||||
let closure = _fun104299;
|
||||
binding.useEffect(closure, []);
|
||||
const value5 = (require(13569) /* metro dependency 13569: QuestDockHooks */).useActionSheetPressHandler(quest);
|
||||
const value6 = binding.useCallback(_fun104301, [quest]);
|
||||
const r19 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)()) ? ThemeTypes.DARK : ThemeTypes.LIGHT;
|
||||
const value8 = (require(5176) /* metro dependency 5176: YouBarExperiment */).useYouBarEnabled('QuestDockUnenrolledHeader');
|
||||
const useTokenModule = require(3860) /* metro dependency 3860: useToken */;
|
||||
const useToken = useTokenModule.useToken;
|
||||
const QUEST_DOCK_BORDER_RADIUS = (importDefault(697) /* metro dependency 697: native */).modules.mobile.QUEST_DOCK_BORDER_RADIUS;
|
||||
const value9 = Reflect.apply(useToken, useTokenModule, [QUEST_DOCK_BORDER_RADIUS]);
|
||||
const value10 = (importDefault(13652) /* metro dependency 13652: useQuestDockAnimatedBorderRadius */)(value9);
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledHeaderB;
|
||||
object2 = {activeQuestDockMode: activeQuestDockMode};
|
||||
object2.QuestDockMode = QuestDockMode;
|
||||
object2.QUEST_DOCK_CONTENT_BORDER_RADII = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
object2.questDockBorderRadius = value9;
|
||||
object2.youBarEnabled = value8;
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.questDockAnimatedBorderRadius = value10;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
object2.QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED = QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 961167275812;
|
||||
closure.__initData = env0_19;
|
||||
const value11 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
||||
const moduleValue6 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue6.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[9]);
|
||||
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 1 : 0,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
|
||||
closure.__workletHash = 15527972438968;
|
||||
closure.__initData = env0_20;
|
||||
const value12 = Reflect.apply(useAnimatedStyle, moduleValue6, [closure]);
|
||||
const moduleValue7 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue7.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledHeaderK;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
|
||||
closure.__workletHash = 7866036039040;
|
||||
closure.__initData = env0_21;
|
||||
const value13 = Reflect.apply(useAnimatedStyle, moduleValue7, [closure]);
|
||||
const moduleValue8 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue8.useAnimatedStyle;
|
||||
closure = function() {
|
||||
var moduleValue = require(dependencyMap[9]);
|
||||
return {opacity: moduleValue.withSpring(activeQuestDockMode.get() !== QuestDockMode.EXPANDED ? 0 : 1,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED)};
|
||||
};
|
||||
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring,
|
||||
activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED: QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED};
|
||||
closure.__workletHash = 11647269239934;
|
||||
closure.__initData = env0_22;
|
||||
const value14 = Reflect.apply(useAnimatedStyle, moduleValue8, [closure]);
|
||||
const moduleValue9 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue9.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledHeaderG;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
|
||||
closure.__workletHash = 14794727045076;
|
||||
closure.__initData = env0_23;
|
||||
const value15 = Reflect.apply(useAnimatedStyle, moduleValue9, [closure]);
|
||||
const moduleValue10 = reanimatedRexportModule;
|
||||
const useAnimatedProps = moduleValue10.useAnimatedProps;
|
||||
closure = QuestDockUnenrolledHeaderF;
|
||||
closure.__closure = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode};
|
||||
closure.__workletHash = 6738114933032;
|
||||
closure.__initData = env0_24;
|
||||
const value16 = Reflect.apply(useAnimatedProps, moduleValue10, [closure]);
|
||||
const moduleValue11 = reanimatedRexportModule;
|
||||
useAnimatedStyle = moduleValue11.useAnimatedStyle;
|
||||
closure = QuestDockUnenrolledHeaderB_104308;
|
||||
object2 = {activeQuestDockMode: activeQuestDockMode, QuestDockMode: QuestDockMode,
|
||||
QUEST_DOCK_CONTENT_BORDER_RADII: QUEST_DOCK_CONTENT_BORDER_RADII, questDockBorderRadius: value9,
|
||||
youBarEnabled: value8};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.questDockAnimatedBorderRadius = value10;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED = QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED;
|
||||
object2.questDockWrapperSpecs = questDockWrapperSpecs;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 6128777581416;
|
||||
closure.__initData = env0_25;
|
||||
const value17 = Reflect.apply(useAnimatedStyle, moduleValue11, [closure]);
|
||||
const styles = useStyles();
|
||||
const value18 = (require(13568) /* metro dependency 13568: QuestHooksNative */).useQuestGameLogotypeAssetUrl(quest);
|
||||
const questBarHeroBlurhash = quest.config.assets.questBarHeroBlurhash;
|
||||
const ReanimatedNativeView = importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */;
|
||||
object2 = {style: [styles.questDockHeader, value11], layout: env0_18};
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
const items2 = [(platformUtilsModule.isAndroid() || property) && questBarHeroBlurhash != null ? ((Component) => <Component placeholder={questBarHeroBlurhash} animatedStyle={value17} animatedLayout={env0_18} />)(importDefault(13656) /* metro dependency 13656: QuestDockBlurredHeaderPlaceholder */) : ((Component) => <Component animatedStyle={value17} animatedLayout={env0_18} />)(importDefault(13631) /* metro dependency 13631: QuestDockBlurredContentBackground */)];
|
||||
const FastImage = importDefault(5475) /* metro dependency 5475: FastImage */;
|
||||
const DARK = ThemeTypes.DARK;
|
||||
items2[1] = <View style={styles.questDockHeaderPrimary}><FastImage source={r19 === DARK ? importDefault(13658) /* metro dependency 13658 */ : importDefault(13659) /* metro dependency 13659 */} resizeMode="contain" style={styles.wreathImage} />{((Component) => <Component assetUrl={value18} height={36} maxWidth={120} style={styles.logo} />)(importDefault(13622) /* metro dependency 13622: QuestGameLogotype */)}</View>;
|
||||
const defaultImport8 = ReanimatedNativeView;
|
||||
const items4 = [styles.questDockHeaderContentCollapsed, value13];
|
||||
binding = env0_18;
|
||||
const defaultImport9 = ReanimatedNativeView;
|
||||
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
||||
let questDockHeaderTertiaryContent = styles.questDockHeaderTertiaryContent;
|
||||
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
||||
const defaultImport82 = ((Component) => <Component style={items4} layout={binding}>{((Component) => <Component style={value12}><Text style={questDockHeaderTertiaryContent} variant="text-sm/medium" color="interactive-text-active">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['3mgEQf'])}</Text></Component>)(defaultImport9)}</Component>)(defaultImport8);
|
||||
const defaultImport10 = ReanimatedNativeView;
|
||||
const defaultImport11 = ReanimatedNativeView;
|
||||
const items6 = [styles.questDockHeaderContentExpanded, value14];
|
||||
const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity;
|
||||
const items7 = [styles.questDockHeaderActionDisclosures];
|
||||
items7[1] = styles.questDockHeaderTertiaryContent;
|
||||
const jsxRuntimeEnv0_15Binding = jsxRuntimeEnv0_15;
|
||||
let value = <Text color="interactive-text-active" variant="text-sm/medium">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.o6FLcF)}</Text>;
|
||||
const CircleQuestionIcon = (require(10139) /* metro dependency 10139: CircleQuestionIcon */).CircleQuestionIcon;
|
||||
let INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
value = <PressableOpacity onPress={value6} accessibilityRole="button" style={items7}><>{value}<CircleQuestionIcon color={INTERACTIVE_TEXT_ACTIVE} style={styles.questDockHeaderActionDisclosuresIcon} /></></PressableOpacity>;
|
||||
const items9 = [value];
|
||||
items9[1] = <View style={styles.questDockHeaderActionSeparator} />;
|
||||
questDockHeaderTertiaryContent = styles.questDockHeaderTertiaryContent;
|
||||
const MoreHorizontalIcon = (require(8638) /* metro dependency 8638: MoreHorizontalIcon */).MoreHorizontalIcon;
|
||||
INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
||||
items9[2] = <PressableOpacity accessibilityRole="button" onPress={value5} style={questDockHeaderTertiaryContent}><MoreHorizontalIcon color={INTERACTIVE_TEXT_ACTIVE} /></PressableOpacity>;
|
||||
items2[2] = <View style={styles.questDockHeaderSecondary}>{defaultImport82}{((Component) => <Component animatedProps={value16} style={value15} layout={binding}>{((Component) => <Component style={items6}>{items9}</Component>)(defaultImport11)}</Component>)(defaultImport10)}</View>;
|
||||
return (
|
||||
<ReanimatedNativeView {...object2}>
|
||||
{items2}
|
||||
</ReanimatedNativeView>
|
||||
);
|
||||
}
|
||||
|
||||
function questDockHeaderLayoutAnimation({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#104297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:2004, offset: 0x0228f3d4, size: 205 bytes, params: 2, frame: 20
|
||||
const object2 = {};
|
||||
object2.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
|
||||
height: currentHeight};
|
||||
const object4 = {};
|
||||
const value = environment.__proto__;
|
||||
object4.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
object4.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
object4.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
object4.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
object2.animations = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function _fun104299() { // fn#104299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6568, offset: 0x0228fd4e, size: 104 bytes, params: 1, frame: 14
|
||||
var environment;
|
||||
var then;
|
||||
var binding;
|
||||
let value = environment.__proto__;
|
||||
const platformUtilsModule = require(478) /* metro dependency 478: PlatformUtils */;
|
||||
if (platformUtilsModule.isIOS()) {
|
||||
value = AccessibilityInfo.isReduceTransparencyEnabled();
|
||||
then = value.then;
|
||||
binding = env0_3;
|
||||
Reflect.apply(then, value, [binding]);
|
||||
var env0_0 = AccessibilityInfo.addEventListener('reduceTransparencyChanged', binding);
|
||||
return _fun104300;
|
||||
}
|
||||
}
|
||||
|
||||
function _fun104301() { // fn#104301, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:6794, offset: 0x0228fdb6, size: 153 bytes, params: 1, frame: 17
|
||||
const defaultImport = importDefault(13580) /* metro dependency 13580: QuestDisclosureModalActionCreators */;
|
||||
const showModal = defaultImport.showModal;
|
||||
const object3 = {};
|
||||
object3.quest = quest;
|
||||
object3.isTargetedDisclosure = true;
|
||||
const object4 = {};
|
||||
const QuestContent = (require(6531) /* metro dependency 6531: QuestTypes */).QuestContent;
|
||||
let QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object4.content = QUEST_BAR_MOBILE;
|
||||
const QuestContentCTA = (require(7120) /* metro dependency 7120: AnalyticsTypes */).QuestContentCTA;
|
||||
const CONTEXT_MENU_OPEN_DISCLOSURE = QuestContentCTA.CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
object4.ctaContent = CONTEXT_MENU_OPEN_DISCLOSURE;
|
||||
QUEST_BAR_MOBILE = QuestContent.QUEST_BAR_MOBILE;
|
||||
object4.sourceQuestContent = QUEST_BAR_MOBILE;
|
||||
object3.trackingCtx = object4;
|
||||
Reflect.apply(showModal, defaultImport, [object3]);
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderB() { // fn#104302, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:7270, owner: QuestDockUnenrolledHeader.B, offset: 0x0228fe4f, size: 545 bytes, params: 1, frame: 21
|
||||
var r1;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
const object2 = {};
|
||||
const value2 = activeQuestDockMode.get();
|
||||
let EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.borderTopLeftRadius = value2 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
|
||||
const value4 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.borderTopRightRadius = value4 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
|
||||
const value5 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value5 === EXPANDED) {
|
||||
r1 = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
} else if (env0_4) {
|
||||
moduleValue = require(4577) /* metro dependency 4577: spring */;
|
||||
r1 = moduleValue.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
} else {
|
||||
r1 = env0_5;
|
||||
}
|
||||
object2.borderBottomLeftRadius = r1;
|
||||
const value8 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value8 === EXPANDED) {
|
||||
r1 = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
} else if (env0_4) {
|
||||
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
|
||||
r1 = moduleValue2.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
} else {
|
||||
r1 = env0_5;
|
||||
}
|
||||
object2.borderBottomRightRadius = r1;
|
||||
const value11 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.width = value11 === EXPANDED ? questDockWrapperSpecs.get().width - 2 * QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED : questDockWrapperSpecs.get().width;
|
||||
const springModule = require(4577) /* metro dependency 4577: spring */;
|
||||
let withSpring = springModule.withSpring;
|
||||
const value13 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
const value14 = 0;
|
||||
const QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED2 = value13 !== EXPANDED ? value14 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
const items2 = [{translateX: Reflect.apply(withSpring, springModule, [QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED2,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])}];
|
||||
const moduleValue4 = springModule;
|
||||
withSpring = moduleValue4.withSpring;
|
||||
const value = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
const QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED3 = value !== EXPANDED ? value14 : QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED;
|
||||
items2[1] = {translateY: Reflect.apply(withSpring, moduleValue4, [QUEST_DOCK_UNENROLLED_HEADER_INSET_EXPANDED3,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED])};
|
||||
object2.transform = items2;
|
||||
return object2;
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderK() { // fn#104304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:8365, owner: QuestDockUnenrolledHeader.K, offset: 0x022900c3, size: 57 bytes, params: 1, frame: 12
|
||||
const value = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
return {right: value !== EXPANDED ? 0 : -1 * QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED};
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderG() { // fn#104306, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:8853, owner: QuestDockUnenrolledHeader.G, offset: 0x0229014f, size: 47 bytes, params: 1, frame: 12
|
||||
const value = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
const QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED2 = value === EXPANDED ? 0 : QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
return {right: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED2};
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderF() { // fn#104307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:9071, owner: QuestDockUnenrolledHeader.f, offset: 0x0229017e, size: 50 bytes, params: 1, frame: 11
|
||||
const value = activeQuestDockMode.get();
|
||||
const EXPANDED = QuestDockMode.EXPANDED;
|
||||
return {pointerEvents: value !== EXPANDED ? 'none' : 'auto'};
|
||||
}
|
||||
|
||||
function QuestDockUnenrolledHeaderB_104308() { // fn#104308, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13852:9261, owner: QuestDockUnenrolledHeader.b, offset: 0x022901b0, size: 275 bytes, params: 1, frame: 17
|
||||
var r2;
|
||||
var moduleValue;
|
||||
var moduleValue2;
|
||||
const object2 = {};
|
||||
const activeQuestDockModeBinding = activeQuestDockMode;
|
||||
let get = activeQuestDockModeBinding.get;
|
||||
const value2 = Reflect.apply(get, activeQuestDockModeBinding, []);
|
||||
let EXPANDED = QuestDockMode.EXPANDED;
|
||||
object2.borderRadius = value2 === EXPANDED ? QUEST_DOCK_CONTENT_BORDER_RADII : env0_5;
|
||||
const value4 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value4 === EXPANDED) {
|
||||
r2 = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
} else if (env0_4) {
|
||||
moduleValue = require(4577) /* metro dependency 4577: spring */;
|
||||
r2 = moduleValue.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
} else {
|
||||
r2 = env0_5;
|
||||
}
|
||||
object2.borderBottomLeftRadius = r2;
|
||||
const value7 = activeQuestDockMode.get();
|
||||
EXPANDED = QuestDockMode.EXPANDED;
|
||||
if (value7 === EXPANDED) {
|
||||
r2 = QUEST_DOCK_CONTENT_BORDER_RADII;
|
||||
} else if (env0_4) {
|
||||
moduleValue2 = require(4577) /* metro dependency 4577: spring */;
|
||||
r2 = moduleValue2.withSpring(env0_6.get(), QUEST_DOCK_MODE_CHANGE_PHYSICS_CLAMPED);
|
||||
} else {
|
||||
r2 = env0_5;
|
||||
}
|
||||
object2.borderBottomRightRadius = r2;
|
||||
const questDockWrapperSpecsBinding = questDockWrapperSpecs;
|
||||
get = questDockWrapperSpecsBinding.get;
|
||||
object2.width = Reflect.apply(get, questDockWrapperSpecsBinding, []).width;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
/* Metro module 13571; source: modules/quests/native/QuestDock/QuestDockUtils.tsx; dependencies: [27, 13572, 672, 4577, 2] */
|
||||
function _fun103155(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:6, offset: 0x0225a722, size: 414 bytes, params: 8, frame: 22
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const PixelRatio = (require(27) /* metro dependency 27 */).PixelRatio;
|
||||
let value = require(13572) /* metro dependency 13572: QuestDockConstants */;
|
||||
const env0_2 = value.QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED;
|
||||
const env0_3 = value.QUEST_DOCK_COLLAPSED_MAX_WIDTH;
|
||||
const env0_4 = value.QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
const env0_5 = value.QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
const env0_6 = PixelRatio.get();
|
||||
object = {code: 'function roundToNearestPixel_QuestDockUtilsTsx1(position){const{PIXEL_DENSITY}=this.__closure;return Math.round(position*PIXEL_DENSITY)/PIXEL_DENSITY;}'};
|
||||
value = _fun103156();
|
||||
object = {code: 'function getQuestDockExpandedHeightLimits_QuestDockUtilsTsx2(windowHeight,safeAreaTop,minContentHeight){const{QUEST_DOCK_COLLAPSED_HEIGHT}=this.__closure;return{minHeight:QUEST_DOCK_COLLAPSED_HEIGHT,maxHeight:Math.min(minContentHeight,windowHeight-safeAreaTop)};}'};
|
||||
const value2 = _fun103158();
|
||||
object = {code: 'function getQuestDockCollapsedWidth_QuestDockUtilsTsx3(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED,QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;safeAreaLeft=Math.max(safeAreaLeft,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);safeAreaRight=Math.max(safeAreaRight,QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'};
|
||||
const value3 = _fun103160();
|
||||
object = {code: 'function getQuestDockExpandedWidth_QuestDockUtilsTsx4(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'};
|
||||
const value4 = _fun103162();
|
||||
object = {code: 'function getQuestDockClosedWidth_QuestDockUtilsTsx5(windowWidth,safeAreaLeft,safeAreaRight){const{QUEST_DOCK_COLLAPSED_MAX_WIDTH}=this.__closure;return Math.min(windowWidth-safeAreaLeft-safeAreaRight,QUEST_DOCK_COLLAPSED_MAX_WIDTH);}'};
|
||||
const value5 = _fun103164();
|
||||
const Millis = (importDefault(672) /* metro dependency 672: Durations */).Millis;
|
||||
const HOUR = Millis.HOUR;
|
||||
const env0_12 = 3 * HOUR;
|
||||
object = {code: 'function dimensionsLayoutTransition_QuestDockUtilsTsx6(values){const{withSpring,QUEST_DOCK_MODE_CHANGE_PHYSICS}=this.__closure;return{initialValues:{originX:values.currentOriginX,originY:values.currentOriginY,width:values.currentWidth,height:values.currentHeight},animations:{originX:withSpring(values.targetOriginX,QUEST_DOCK_MODE_CHANGE_PHYSICS),originY:withSpring(values.targetOriginY,QUEST_DOCK_MODE_CHANGE_PHYSICS),height:withSpring(values.targetHeight,QUEST_DOCK_MODE_CHANGE_PHYSICS),width:withSpring(values.targetWidth,QUEST_DOCK_MODE_CHANGE_PHYSICS)}};}'};
|
||||
const value6 = _fun103166();
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/QuestDockUtils.tsx');
|
||||
exports.roundToNearestPixel = value;
|
||||
exports.getQuestDockExpandedHeightLimits = value2;
|
||||
exports.getQuestDockCollapsedWidth = value3;
|
||||
exports.getQuestDockExpandedWidth = value4;
|
||||
exports.getQuestDockClosedWidth = value5;
|
||||
exports.isSoftDismissed = isSoftDismissed;
|
||||
exports.dimensionsLayoutTransition = value6;
|
||||
}
|
||||
|
||||
function _fun103156() { // fn#103156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:452, offset: 0x0225a8c0, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = roundToNearestPixel;
|
||||
closure.__closure = {PIXEL_DENSITY: env0_6};
|
||||
closure.__workletHash = 9602449563120;
|
||||
closure.__initData = env0_7;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103158() { // fn#103158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:961, offset: 0x0225a91f, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1, a2) {
|
||||
var object = {};
|
||||
object.minHeight = QUEST_DOCK_COLLAPSED_HEIGHT;
|
||||
var Math = global.Math;
|
||||
object.maxHeight = Math.min(a2, a0 - a1);
|
||||
return object;
|
||||
};
|
||||
closure.__closure = {QUEST_DOCK_COLLAPSED_HEIGHT: QUEST_DOCK_COLLAPSED_HEIGHT};
|
||||
closure.__workletHash = 880847803554;
|
||||
closure.__initData = env0_8;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103160() { // fn#103160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:1752, offset: 0x0225a98d, size: 66 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
var value2 = Math.max(a1, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);
|
||||
Math = global.Math;
|
||||
var value3 = Math.max(a2, QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED);
|
||||
Math = global.Math;
|
||||
return Math.min(a0 - value2 - value3, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
|
||||
};
|
||||
closure.__closure = {QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED: QUEST_DOCK_HORIZONTAL_EDGE_GUTTER_COLLAPSED,
|
||||
QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
|
||||
closure.__workletHash = 1119343760780;
|
||||
closure.__initData = env0_9;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103162() { // fn#103162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2367, offset: 0x0225aa22, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
|
||||
};
|
||||
closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
|
||||
closure.__workletHash = 6480418564130;
|
||||
closure.__initData = env0_10;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103164() { // fn#103164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:2897, offset: 0x0225aa88, size: 57 bytes, params: 1, frame: 4
|
||||
const closure = function(a0, a1, a2) {
|
||||
var Math = global.Math;
|
||||
return Math.min(a0 - a1 - a2, QUEST_DOCK_COLLAPSED_MAX_WIDTH);
|
||||
};
|
||||
closure.__closure = {QUEST_DOCK_COLLAPSED_MAX_WIDTH: QUEST_DOCK_COLLAPSED_MAX_WIDTH};
|
||||
closure.__workletHash = 14159592925974;
|
||||
closure.__initData = env0_11;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function _fun103166() { // fn#103166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3773, offset: 0x0225aac1, size: 88 bytes, params: 1, frame: 14
|
||||
const closure = dimensionsLayoutTransition;
|
||||
const object2 = {};
|
||||
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
||||
object2.QUEST_DOCK_MODE_CHANGE_PHYSICS = QUEST_DOCK_MODE_CHANGE_PHYSICS;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 4497154070776;
|
||||
closure.__initData = env0_13;
|
||||
return closure;
|
||||
}
|
||||
|
||||
function isSoftDismissed(a0) { // fn#103168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:4623, offset: 0x0225abe6, size: 46 bytes, params: 2, frame: 11
|
||||
var r0;
|
||||
var Date;
|
||||
let value = a0 != null;
|
||||
if (value) {
|
||||
Date = global.Date;
|
||||
value = Date.now() - a0;
|
||||
value = value < env0_12;
|
||||
r0 = value;
|
||||
} else {
|
||||
r0 = value;
|
||||
}
|
||||
return r0;
|
||||
}
|
||||
|
||||
function roundToNearestPixel(a0) { // fn#103157, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:487, offset: 0x0225a8f9, size: 38 bytes, params: 2, frame: 12
|
||||
const Math = global.Math;
|
||||
const round = Math.round;
|
||||
const binding = env1_6;
|
||||
return Reflect.apply(round, Math, [a0 * binding]) / binding;
|
||||
}
|
||||
|
||||
function dimensionsLayoutTransition({currentOriginX, currentOriginY, currentWidth, currentHeight, targetOriginX, targetOriginY, targetHeight, targetWidth}) { // fn#103167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13761:3815, offset: 0x0225ab19, size: 205 bytes, params: 2, frame: 20
|
||||
const object2 = {};
|
||||
object2.initialValues = {originX: currentOriginX, originY: currentOriginY, width: currentWidth,
|
||||
height: currentHeight};
|
||||
const object4 = {};
|
||||
const value = environment.__proto__;
|
||||
object4.originX = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginX,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object4.originY = (require(4577) /* metro dependency 4577: spring */).withSpring(targetOriginY,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object4.height = (require(4577) /* metro dependency 4577: spring */).withSpring(targetHeight,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object4.width = (require(4577) /* metro dependency 4577: spring */).withSpring(targetWidth,
|
||||
QUEST_DOCK_MODE_CHANGE_PHYSICS);
|
||||
object2.animations = object4;
|
||||
return object2;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/* Metro module 13578; source: modules/quests/native/QuestDock/WreathIcon.tsx; dependencies: [31, 33, 697, 3859, 13579, 2] */
|
||||
function _fun103217(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#103217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13768:6, offset: 0x0225d1d5, size: 138 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
importAll(31) /* metro dependency 31 */;
|
||||
const env0_3 = (require(33) /* metro dependency 33 */).jsx;
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/WreathIcon.tsx');
|
||||
exports.default = WreathIcon;
|
||||
}
|
||||
|
||||
function WreathIcon(a0) { // fn#103218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13768:208, offset: 0x0225d25f, size: 154 bytes, params: 2, frame: 20
|
||||
const style = a0.style;
|
||||
const color = a0.color;
|
||||
const r6 = color !== undefined ? color : (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
|
||||
const value = Object.create(null);
|
||||
value.style = 0;
|
||||
value.color = 0;
|
||||
const value2 = copyDataProperties({}, a0, value, undefined);
|
||||
const BaseIconImage = (require(3859) /* metro dependency 3859: BaseIconImage */).BaseIconImage;
|
||||
return (
|
||||
<BaseIconImage
|
||||
source={require(13579) /* metro dependency 13579 */}
|
||||
color={r6}
|
||||
style={style}
|
||||
{...value2}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* Metro module 13652; source: modules/quests/native/QuestDock/useQuestDockAnimatedBorderRadius.tsx; dependencies: [31, 13576, 4017, 2] */
|
||||
function _fun104277(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104277, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:6, offset: 0x0228d804, size: 130 bytes, params: 8, frame: 18
|
||||
const env0_0 = require;
|
||||
const Object = global.Object;
|
||||
Object.defineProperty(exports, '__esModule', {value: true});
|
||||
const env0_2 = importAll(31) /* metro dependency 31 */;
|
||||
object = {code: 'function useQuestDockAnimatedBorderRadiusTsx1(){const{interpolate,questDockOffset,minBorder,maxBorder,Extrapolation}=this.__closure;return interpolate(questDockOffset.get(),[0,50],[minBorder,maxBorder],Extrapolation.CLAMP);}'};
|
||||
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/quests/native/QuestDock/useQuestDockAnimatedBorderRadius.tsx');
|
||||
exports.default = useQuestDockAnimatedBorderRadius;
|
||||
}
|
||||
|
||||
function useQuestDockAnimatedBorderRadius(a0) { // fn#104278, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:454, offset: 0x0228d886, size: 207 bytes, params: 2, frame: 21
|
||||
const value = a1;
|
||||
const env0_0 = a0;
|
||||
const r10 = value !== undefined ? value : 0;
|
||||
const binding = undefined;
|
||||
const useContext = binding.useContext;
|
||||
const QuestDockExternalCoordinationContext = (require(13576) /* metro dependency 13576: QuestDockExternalCoordinationContext */).QuestDockExternalCoordinationContext;
|
||||
const questDockOffset = Reflect.apply(useContext, binding, [QuestDockExternalCoordinationContext]).questDockOffset;
|
||||
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const useDerivedValue = reanimatedRexportModule.useDerivedValue;
|
||||
const closure = useQuestDockAnimatedBorderRadiusU;
|
||||
const object2 = {};
|
||||
object2.interpolate = reanimatedRexportModule.interpolate;
|
||||
object2.questDockOffset = questDockOffset;
|
||||
object2.minBorder = r10;
|
||||
object2.maxBorder = a0;
|
||||
const Extrapolation = reanimatedRexportModule.Extrapolation;
|
||||
object2.Extrapolation = Extrapolation;
|
||||
closure.__closure = object2;
|
||||
closure.__workletHash = 17005846780112;
|
||||
closure.__initData = env0_3;
|
||||
return Reflect.apply(useDerivedValue, reanimatedRexportModule, [closure]);
|
||||
}
|
||||
|
||||
function useQuestDockAnimatedBorderRadiusU() { // fn#104279, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13849:621, owner: useQuestDockAnimatedBorderRadius.u, offset: 0x0228d955, size: 113 bytes, params: 1, frame: 21
|
||||
let value = environment.__proto__;
|
||||
value = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
||||
const interpolate = value.interpolate;
|
||||
const value3 = questDockOffset.get();
|
||||
const items2 = [env0_1, env0_0];
|
||||
const Extrapolation = (require(4017) /* metro dependency 4017: ReanimatedRexport */).Extrapolation;
|
||||
const CLAMP = Extrapolation.CLAMP;
|
||||
return Reflect.apply(interpolate, value, [value3, [0, 50], items2, CLAMP]);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user