Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,182 @@
/* Metro module 9927; source: modules/feedback/native/FeedbackActionSheet.tsx; dependencies: [57, 31, 27, 9906, 33, 4501, 697, 4080, 6266, 22, 9909, 4594, 5080, 9928, 1962, 1585, 6275, 6758, 6806, 6277, 4573, 9910, 6231, 6238, 8950, 1244, 2] */
function _fun77713(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#77713, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:6, offset: 0x01e080c2, size: 326 bytes, params: 8, frame: 22
var object2;
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 env0_5 = (require(27) /* metro dependency 27 */).View;
const env0_6 = (require(9906) /* metro dependency 9906: Constants */).FeedbackRating;
let value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.container = {padding: PX_16};
object2.ratingsHeader = {textAlign: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object2.reasonsList = {marginBottom: PX_16};
const env0_9 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/feedback/native/FeedbackActionSheet.tsx');
exports.default = FeedbackActionSheet;
}
function FeedbackActionSheet({headerLabel, showHeaderCloseButton, hideDontShowAgainCheckbox, ratingOptions, ratingTextLabels, ratingsBodyLabel, reasonsHeaderLabel, reasons, feedbackReasons, otherKey, trackOpen, trackReport, getFreeformDescription}) { // fn#77715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:482, offset: 0x01e0822d, size: 1203 bytes, params: 2, frame: 37
var r8;
var TableCheckboxRow;
var intl;
const styles = useStyles();
const binding = trackReport;
const value4 = binding.useRef(null);
const value5 = (importDefault(6266) /* metro dependency 6266: usePrevious */)(reasons);
let useState = binding.useState;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const value6 = Reflect.apply(useState, binding, [defaultImport.shuffle(reasons)]);
const binding2 = trackOpen;
const value7 = binding2(value6, 2);
const property = value7[0];
const env0_8 = value7[1];
binding.useEffect(_fun77716, [reasons, value5, otherKey]);
useState = binding.useState;
const value9 = binding2(Reflect.apply(useState, binding, [null]), 2);
const property2 = value9[0];
const env0_10 = value9[1];
useState = binding.useState;
const value10 = binding2(Reflect.apply(useState, binding, [null]), 2);
const env0_11 = value10[0];
const env0_12 = value10[1];
useState = binding.useState;
const value11 = binding2(Reflect.apply(useState, binding, [false]), 2);
const env0_13 = value11[0];
const env0_14 = value11[1];
useState = binding.useState;
const value12 = binding2(Reflect.apply(useState, binding, [false]), 2);
const property3 = value12[0];
const env0_16 = value12[1];
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() {
trackOpen();
});
(require(4594) /* metro dependency 4594: useMountEffect */).useUnmountEffect(_fun77718);
const value13 = binding.useCallback(_fun77719, []);
const env0_17 = binding.useCallback(_fun77720, [feedbackReasons]);
const r14 = property2 !== null && property2 !== FeedbackRating.GOOD;
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const value17 = 232 + (hideDontShowAgainCheckbox ? 0 : 48) + bottom;
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const bottomSheetProps = {scrollable: true, ref: value4, startHeight: value17,
maxHeight: property2 == null ? value17 : undefined};
const BottomSheetTitleHeader = (require(6758) /* metro dependency 6758: BottomSheetTitleHeaderNative */).BottomSheetTitleHeader;
bottomSheetProps.header = <BottomSheetTitleHeader title={headerLabel} trailing={showHeaderCloseButton ? ((ActionSheetCloseButton) => <ActionSheetCloseButton onPress={closeActionSheet_77714} />)((require(6806) /* metro dependency 6806: ActionSheetCloseButtonNative */).ActionSheetCloseButton) : null} />;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const items3 = [styles.container];
items3[1] = {paddingBottom: styles.container.padding + bottom};
const items2 = [ratingsBodyLabel != null ? ((Text) => <Text style={styles.ratingsHeader} variant="text-md/medium" color="text-default">{ratingsBodyLabel}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : null];
items2[1] = ((Component) => <Component ratingOptions={ratingOptions} textLabels={ratingTextLabels} selectedRating={property2} onChangeRating={value13} />)(importDefault(9910) /* metro dependency 9910: RatingSelector */);
items2[2] = r14 ? <View style={styles.reasonsList}>{((TableRowGroup) => <TableRowGroup title={reasonsHeaderLabel} hasIcons={false}>{property.map(function(a0,
a1) {
var env0_0 = a0;
return a0.label != null ? ((TableRow) => <TableRow label={a0.label} labelLineClamp={2} onPress={_fun77722} key={a1} />)(require(dependencyMap[23]).TableRow) : undefined;
})}</TableRowGroup>)((require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup)}</View> : null;
if (hideDontShowAgainCheckbox) {
r8 = null;
} else {
TableCheckboxRow = (require(8950) /* metro dependency 8950: TableCheckboxRowNative */).TableCheckboxRow;
var tableCheckboxRowProps = {'start': true, 'end': true, checked: property3};
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
tableCheckboxRowProps.label = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5E9SB9']);
tableCheckboxRowProps.onPress = onPress_77723;
r8 = <TableCheckboxRow {...tableCheckboxRowProps} />;
}
items2[3] = r8;
return (
<BottomSheet {...bottomSheetProps}>
<BottomSheetScrollView contentContainerStyle={items3}>
{items2}
</BottomSheetScrollView>
</BottomSheet>
);
}
function _fun77716() { // fn#77716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:856, offset: 0x01e086e0, size: 102 bytes, params: 1, frame: 16
let value = environment.__proto__;
const defaultImport = importDefault(22) /* metro dependency 22 */;
const isEqual = defaultImport.isEqual;
let binding = env0_7;
if (!Reflect.apply(isEqual, defaultImport, [binding, reasons])) {
binding = env0_8;
value = require(9909) /* metro dependency 9909: FeedbackUtils */;
binding(value.shuffleProblems(reasons, otherKey));
}
}
function _fun77718() { // fn#77718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1146, offset: 0x01e08746, size: 220 bytes, params: 1, frame: 18
var object2;
var value2;
var value3;
var defaultImport;
var pushLazy;
var value4;
if (env0_13) {
value2 = environment.__proto__;
value3 = undefined;
defaultImport = importDefault(dependencyMap[12]);
pushLazy = defaultImport.pushLazy;
value4 = require(dependencyMap[14])(dependencyMap[13], dependencyMap.paths);
object2 = {};
object2.result = {rating: env0_9, reason: env0_11, dontShowAgain: env0_15};
object2.trackReport = trackReport;
object2.descriptionLabel = (getFreeformDescription == null ? value3 : getFreeformDescription(env0_11)) ?? value3;
Reflect.apply(pushLazy, defaultImport, [value4, object2]);
} else {
trackReport({rating: env0_9, reason: env0_11, dontShowAgain: env0_15});
}
}
function _fun77719(a0) { // fn#77719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1381, offset: 0x01e08822, size: 93 bytes, params: 2, frame: 13
var current;
env0_10(a0);
const GOOD = FeedbackRating.GOOD;
if (a0 === GOOD) {
env0_12(null);
env0_14(false);
closeActionSheet_77714();
} else {
current = env0_6.current;
if (current != null) {
current.expandActionSheet();
}
}
}
function _fun77720(a0) { // fn#77720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:1510, offset: 0x01e0887f, size: 76 bytes, params: 2, frame: 14
env0_12(a0);
if (feedbackReasons != null && feedbackReasons.includes(a0.value)) {
env0_14(true);
}
closeActionSheet_77714();
}
function _fun77721(a0, a1) { // fn#77721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:2278, offset: 0x01e088cb, size: 102 bytes, params: 3, frame: 18
const env0_0 = a0;
if (a0.label != null) {
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
return (
<TableRow
label={a0.label}
labelLineClamp={2}
onPress={onPress_77722}
key={a1}
/>
);
} else {
return undefined;
}
}
function FeedbackActionSheetOnPress() { // fn#77723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10113:2509, owner: FeedbackActionSheet.onPress, offset: 0x01e08931, size: 23 bytes, params: 1, frame: 11
return env0_16(!env0_15);
}