198 lines
11 KiB
TypeScript
198 lines
11 KiB
TypeScript
/* Metro module 12736; source: design/void/Status/native/Status.tsx; dependencies: [57, 31, 27, 1306, 661, 10253, 33, 4501, 12734, 697, 12737, 12738, 12739, 12740, 12741, 12742, 12743, 12735, 12744, 4017, 4577, 12721, 2] */
|
|
function _fun97466(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#97466, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12926:6, offset: 0x021827b1, size: 413 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 */;
|
|
importAll(31) /* metro dependency 31 */;
|
|
let value = require(27) /* metro dependency 27 */;
|
|
const env0_4 = value.Image;
|
|
const env0_5 = value.View;
|
|
const env0_6 = (require(1306) /* metro dependency 1306: StatusConstants */).STATUS_PADDING;
|
|
const env0_7 = (require(661) /* metro dependency 661: Constants */).StatusTypes;
|
|
value = require(10253) /* metro dependency 10253: ChannelAnimationConstants */;
|
|
const env0_8 = value.TYPING_ENTERING;
|
|
const env0_9 = value.TYPING_EXITING;
|
|
const env0_10 = value.CHANNEL_SPRING_CONFIG;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_11 = value.jsx;
|
|
const env0_12 = value.jsxs;
|
|
const env0_13 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({statusIcon: {'width': '100%',
|
|
'height': '100%'}});
|
|
const env0_14 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun97468);
|
|
object = {code: "function StatusTsx1(){const{enableAnimation,withSpring,width,CHANNEL_SPRING_CONFIG,height,onAnimationFinished,borderRadius,translateX}=this.__closure;const shouldAnimate=enableAnimation.get()?'respect-motion-settings':'animate-never';return{width:withSpring(width,CHANNEL_SPRING_CONFIG,shouldAnimate),height:withSpring(height,CHANNEL_SPRING_CONFIG,shouldAnimate,onAnimationFinished),borderRadius:withSpring(borderRadius,CHANNEL_SPRING_CONFIG,shouldAnimate),transform:[{translateX:withSpring(translateX,CHANNEL_SPRING_CONFIG,shouldAnimate)}]};}"};
|
|
object = {code: 'function StatusTsx2(){const{withSpring,statusOpacity,CHANNEL_SPRING_CONFIG}=this.__closure;return{opacity:withSpring(statusOpacity,CHANNEL_SPRING_CONFIG)};}'};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('design/void/Status/native/Status.tsx');
|
|
exports.default = Status;
|
|
exports.StatusWithTyping = StatusWithTyping;
|
|
}
|
|
|
|
function getStatusSource(a0, a1, a2, a3) { // fn#97467, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12926:995, offset: 0x0218294e, size: 270 bytes, params: 5, frame: 12
|
|
if (a1) {
|
|
return importDefault(12737) /* metro dependency 12737 */;
|
|
}
|
|
if (a3) {
|
|
return importDefault(12738) /* metro dependency 12738 */;
|
|
}
|
|
if (a2) {
|
|
return importDefault(12739) /* metro dependency 12739 */;
|
|
}
|
|
const IDLE = StatusTypes.IDLE;
|
|
if (IDLE === a0) {
|
|
return importDefault(12740) /* metro dependency 12740 */;
|
|
}
|
|
const DND = StatusTypes.DND;
|
|
if (DND === a0) {
|
|
return importDefault(12741) /* metro dependency 12741 */;
|
|
}
|
|
const OFFLINE = StatusTypes.OFFLINE;
|
|
if (OFFLINE === a0) {
|
|
return importDefault(12742) /* metro dependency 12742 */;
|
|
}
|
|
const INVISIBLE = StatusTypes.INVISIBLE;
|
|
if (INVISIBLE === a0) {
|
|
return importDefault(12742) /* metro dependency 12742 */;
|
|
}
|
|
StatusTypes.ONLINE;
|
|
return importDefault(12743) /* metro dependency 12743 */;
|
|
}
|
|
|
|
function _fun97468(a0, a1) { // fn#97468, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12926:384, offset: 0x02182a5c, size: 423 bytes, params: 3, frame: 20
|
|
var r8;
|
|
const {width, height,
|
|
dotSize} = (require(12734) /* metro dependency 12734: StatusUtils */).getStatusTypingDimensions(a0);
|
|
const object2 = {};
|
|
const ONLINE = StatusTypes.ONLINE;
|
|
if (ONLINE === a1) {
|
|
r8 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
|
|
} else if (StatusTypes.IDLE === a1) {
|
|
r8 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.YELLOW_300;
|
|
} else if (StatusTypes.DND === a1) {
|
|
r8 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_400;
|
|
} else if (StatusTypes.STREAMING === a1) {
|
|
r8 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PLATFORM_TWITCH;
|
|
} else {
|
|
if (StatusTypes.INVISIBLE !== a1) {
|
|
if (StatusTypes.UNKNOWN !== a1) {
|
|
StatusTypes.OFFLINE;
|
|
}
|
|
}
|
|
r8 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_400;
|
|
}
|
|
object2.ellipsis = {backgroundColor: r8, borderRadius: height, height: height, width: width, paddingStart: 4,
|
|
paddingEnd: 2, marginRight: 0};
|
|
const object4 = {width: dotSize, height: dotSize};
|
|
const WHITE = (importDefault(697) /* metro dependency 697: native */).colors.WHITE;
|
|
object4.backgroundColor = WHITE;
|
|
object2.ellipsisDot = object4;
|
|
return object2;
|
|
}
|
|
|
|
function Status({isMobileOnline, isVROnline, style, status, size, streaming}) { // fn#97469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12926:2052, offset: 0x02182c03, size: 188 bytes, params: 2, frame: 26
|
|
isMobileOnline = !(isMobileOnline === undefined) && isMobileOnline;
|
|
isVROnline = !(isVROnline === undefined) && isVROnline;
|
|
streaming = !(streaming === undefined) && streaming;
|
|
const styles = useStyles();
|
|
return (
|
|
<View
|
|
style={[(importDefault(12735) /* metro dependency 12735: getStatusContainerStyle */)(size, isMobileOnline,
|
|
isVROnline), style]}
|
|
>
|
|
<Image
|
|
style={styles.statusIcon}
|
|
source={getStatusSource(status, streaming, isMobileOnline, isVROnline)}
|
|
resizeMode="stretch"
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function StatusWithTyping({isMobileOnline, isVROnline, style, status, size, streaming, typing, userId}) { // fn#97470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12926:2304, offset: 0x02182cbf, size: 922 bytes, params: 2, frame: 38
|
|
var r20;
|
|
var moduleValue2;
|
|
isMobileOnline = !(isMobileOnline === undefined) && isMobileOnline;
|
|
isVROnline = !(isVROnline === undefined) && isVROnline;
|
|
streaming = !(streaming === undefined) && streaming;
|
|
const styles = useStyles();
|
|
const styles2 = useStyles(size, status);
|
|
const value2 = (importDefault(12735) /* metro dependency 12735: getStatusContainerStyle */)(size, isMobileOnline,
|
|
isVROnline);
|
|
const useFlashListAnimationDisablerModule = require(12744) /* metro dependency 12744: useFlashListAnimationDisabler */;
|
|
const useFlashListAnimationDisabler = useFlashListAnimationDisablerModule.useFlashListAnimationDisabler;
|
|
const value5 = undefined(Reflect.apply(useFlashListAnimationDisabler, useFlashListAnimationDisablerModule,
|
|
[userId ?? '']), 2);
|
|
const property = value5[0];
|
|
const property2 = value5[1];
|
|
const r24 = typing ? styles2.ellipsis.width + 2 * STATUS_PADDING : value2.width;
|
|
const r23 = typing ? styles2.ellipsis.height + 2 * STATUS_PADDING : value2.height;
|
|
const r21 = typing ? r24 / 2 : value2.borderRadius;
|
|
if (typing) {
|
|
moduleValue2 = require(12734) /* metro dependency 12734: StatusUtils */;
|
|
r20 = moduleValue2.getAnimatedTypingTranslateX(value2.width);
|
|
} else {
|
|
r20 = 0;
|
|
}
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
let useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
|
let closure = StatusWithTypingO;
|
|
const object2 = {enableAnimation: property};
|
|
object2.withSpring = (require(4577) /* metro dependency 4577: spring */).withSpring;
|
|
object2.width = r24;
|
|
object2.CHANNEL_SPRING_CONFIG = CHANNEL_SPRING_CONFIG;
|
|
object2.height = r23;
|
|
object2.onAnimationFinished = property2;
|
|
object2.borderRadius = r21;
|
|
object2.translateX = r20;
|
|
closure.__closure = object2;
|
|
closure.__workletHash = 2188820017597;
|
|
closure.__initData = env0_15;
|
|
const value12 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [closure]);
|
|
const r17 = typing ? 0 : 1;
|
|
const moduleValue4 = reanimatedRexportModule;
|
|
useAnimatedStyle = moduleValue4.useAnimatedStyle;
|
|
closure = StatusWithTypingF;
|
|
closure.__closure = {withSpring: (require(4577) /* metro dependency 4577: spring */).withSpring, statusOpacity: r17,
|
|
CHANNEL_SPRING_CONFIG: CHANNEL_SPRING_CONFIG};
|
|
closure.__workletHash = 7224613224414;
|
|
closure.__initData = env0_16;
|
|
const value13 = Reflect.apply(useAnimatedStyle, moduleValue4, [closure]);
|
|
const View = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
const items2 = [value2, value12, style];
|
|
const r5 = typing && ((View) => <View collapsable={false} entering={TYPING_ENTERING} exiting={TYPING_EXITING} style={[{position: 'absolute',
|
|
left: STATUS_PADDING,
|
|
top: STATUS_PADDING}]}>{((Component) => <Component style={styles2.ellipsis} dotStyle={styles2.ellipsisDot} disableScale />)(importDefault(12721) /* metro dependency 12721: Ellipsis */)}</View>)((importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View);
|
|
const View3 = (importDefault(4017) /* metro dependency 4017: ReanimatedRexport */).View;
|
|
return (
|
|
<View style={items2} collapsable={false}>
|
|
{r5}
|
|
<View3 style={value13}>
|
|
<Image
|
|
style={styles.statusIcon}
|
|
source={getStatusSource(status, streaming, isMobileOnline, isVROnline)}
|
|
resizeMode="stretch"
|
|
/>
|
|
</View3>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function StatusWithTypingO() { // fn#97471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12926:2719, owner: StatusWithTyping.O, offset: 0x02183059, size: 196 bytes, params: 1, frame: 23
|
|
const r6 = env0_0.get() ? 'respect-motion-settings' : 'animate-never';
|
|
const object3 = {};
|
|
const springModule = require(4577) /* metro dependency 4577: spring */;
|
|
object3.width = springModule.withSpring(env0_2, CHANNEL_SPRING_CONFIG, r6);
|
|
const moduleValue2 = springModule;
|
|
object3.height = moduleValue2.withSpring(env0_3, CHANNEL_SPRING_CONFIG, r6, env0_1);
|
|
object3.borderRadius = springModule.withSpring(env0_4, CHANNEL_SPRING_CONFIG, r6);
|
|
const object4 = {};
|
|
object4.translateX = springModule.withSpring(env0_5, CHANNEL_SPRING_CONFIG, r6);
|
|
object3.transform = [object4];
|
|
return object3;
|
|
}
|
|
|
|
function StatusWithTypingF() { // fn#97472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12926:3198, owner: StatusWithTyping.f, offset: 0x0218311d, size: 55 bytes, params: 1, frame: 14
|
|
const springModule = require(4577) /* metro dependency 4577: spring */;
|
|
return {opacity: springModule.withSpring(env0_6, CHANNEL_SPRING_CONFIG)};
|
|
}
|
|
|