Files
discord-decomp/sources/by-id/module-00302.jsx
T
2026-07-27 16:20:00 +03:00

434 lines
20 KiB
React

/* Metro module 302; source: unknown; dependencies: [29, 6, 7, 15, 17, 18, 31, 33, 79, 303, 44, 112, 253, 318, 146] */
function _fun4556(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#4556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:6, offset: 0x00cc5c10, size: 303 bytes, params: 8, frame: 20
const env0_0 = require;
const numColumnsOrDefault = function(a0) {
return a0 ?? 1;
};
const env0_4 = ['numColumns', 'columnWrapperStyle', 'removeClippedSubviews', 'strictMode'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_5 = importDefault(29) /* metro dependency 29 */;
const env0_6 = importDefault(6) /* metro dependency 6 */;
const env0_7 = importDefault(7) /* metro dependency 7 */;
const env0_8 = importDefault(15) /* metro dependency 15 */;
const env0_9 = importDefault(17) /* metro dependency 17 */;
const env0_10 = importDefault(18) /* metro dependency 18 */;
let value = importAll(31) /* metro dependency 31 */;
const env0_12 = (require(33) /* metro dependency 33 */).jsx;
const PureComponent = value.PureComponent;
value = _fun4561(PureComponent);
const env0_13 = (require(253) /* metro dependency 253 */).default.create({row: {flexDirection: 'row'}});
exports.default = value;
}
function _isNativeReflectConstruct_4557() { // fn#4557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:261, offset: 0x00cc5d3f, size: 94 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_4557_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun4561(a0) { // fn#4561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:537, offset: 0x00cc5db1, size: 390 bytes, params: 2, frame: 16
const closure = FlatList;
env0_10(closure, a0);
return env0_7(closure, [{key: 'scrollToEnd', value: function(a0) {
if (this._listRef) {
this._listRef.scrollToEnd(a0);
}
}}, {key: 'scrollToIndex', value: function(a0) {
if (this._listRef) {
this._listRef.scrollToIndex(a0);
}
}}, {key: 'scrollToItem', value: function(a0) {
if (this._listRef) {
this._listRef.scrollToItem(a0);
}
}}, {key: 'scrollToOffset', value: function(a0) {
if (this._listRef) {
this._listRef.scrollToOffset(a0);
}
}}, {key: 'recordInteraction', value: function() {
if (this._listRef) {
this._listRef.recordInteraction();
}
}}, {key: 'flashScrollIndicators', value: function() {
if (this._listRef) {
this._listRef.flashScrollIndicators();
}
}}, {key: 'getScrollResponder', value: function() {
if (this._listRef) {
return this._listRef.getScrollResponder();
}
}}, {key: 'getNativeScrollRef', value: function() {
if (this._listRef) {
return this._listRef.getScrollRef();
}
}}, {key: 'getScrollableNode', value: function() {
if (this._listRef) {
return this._listRef.getScrollableNode();
}
}}, {key: 'setNativeProps', value: function(a0) {
if (this._listRef) {
this._listRef.setNativeProps(a0);
}
}}, {key: 'componentDidUpdate', value: value_4584}, {key: '_checkProps', value: value_4585},
{key: '_pushMultiColumnViewable', value: function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = numColumnsOrDefault(this.props.numColumns);
var env0_3 = this.props.keyExtractor ?? importDefault(dependencyMap[9]).keyExtractor;
a1.item.forEach(_fun4587);
}}, {key: '_createOnViewableItemsChanged', value: function(a0) {
var env0_0 = a0;
var env0_1 = this;
return _fun4589;
}}, {key: 'render', value: value_4592}]);
}
function FlatList(a0) { // fn#4562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:549, offset: 0x00cc5f37, size: 351 bytes, params: 2, frame: 21
var environment;
var _virtualizedListPairs;
var push;
const value = environment.__proto__;
env1_6(this, FlatList);
let object = [a0];
const value3 = env1_9(FlatList);
const value6 = env1_8(this, _isNativeReflectConstruct_4557() ? global.Reflect.construct(value3, object,
env1_9(this).constructor) : value3.apply(this, object));
value6._virtualizedListPairs = [];
value6._captureRef = _captureRef;
value6._getItem = _getItem;
value6._getItemCount = _getItemCount;
value6._keyExtractor = _keyExtractor;
value6._renderer = function(a0, a1, a2, a3, a4) {
var env0_0 = a0;
var env0_1 = a1;
var env0_2 = a2;
var env0_3 = numColumnsOrDefault(a3);
var env0_4 = _fun4569;
var closure = _fun4570;
var object = {};
if (a0) {
object.ListItemComponent = closure;
} else {
object.renderItem = closure;
}
return object;
};
value6._memoizedRenderer = (importDefault(318) /* metro dependency 318 */)(value6._renderer);
const _checkProps = value6._checkProps;
let props = value6.props;
Reflect.apply(_checkProps, value6, [props]);
const viewabilityConfigCallbackPairs = value6.props.viewabilityConfigCallbackPairs;
props = value6.props;
if (viewabilityConfigCallbackPairs) {
value6._virtualizedListPairs = props.viewabilityConfigCallbackPairs.map(_fun4572);
} else if (props.onViewableItemsChanged) {
_virtualizedListPairs = value6._virtualizedListPairs;
push = _virtualizedListPairs.push;
object = {};
object.viewabilityConfig = value6.props.viewabilityConfig;
object.onViewableItemsChanged = value6._createOnViewableItemsChanged(_fun4573);
Reflect.apply(push, _virtualizedListPairs, [object]);
}
return value6;
}
function value_4584({numColumns, onViewableItemsChanged, viewabilityConfig, viewabilityConfigCallbackPairs}) { // fn#4584, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:3994, offset: 0x00cc661b, size: 240 bytes, params: 2, frame: 20
const value = environment.__proto__;
(require(44) /* metro dependency 44 */)(numColumns === this.props.numColumns,
'Changing numColumns on the fly is not supported. Change the key prop on FlatList when changing the number of columns to force a fresh render of the component.');
(require(44) /* metro dependency 44 */)(onViewableItemsChanged == null === (this.props.onViewableItemsChanged == null),
'Changing onViewableItemsChanged nullability on the fly is not supported');
(require(44) /* metro dependency 44 */)(!(require(146) /* metro dependency 146 */).default(viewabilityConfig,
this.props.viewabilityConfig), 'Changing viewabilityConfig on the fly is not supported');
(require(44) /* metro dependency 44 */)(viewabilityConfigCallbackPairs === this.props.viewabilityConfigCallbackPairs,
'Changing viewabilityConfigCallbackPairs on the fly is not supported');
this._checkProps(this.props);
}
function value_4585({getItem, getItemCount, horizontal, columnWrapperStyle, onViewableItemsChanged, viewabilityConfigCallbackPairs}) { // fn#4585, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:4739, offset: 0x00cc670b, size: 221 bytes, params: 2, frame: 21
const value = environment.__proto__;
const value2 = numColumnsOrDefault(this.props.numColumns);
(require(44) /* metro dependency 44 */)(!getItem && !getItemCount, 'FlatList does not support custom data formats.');
if (value2 > 1) {
(require(44) /* metro dependency 44 */)(!horizontal, 'numColumns does not support horizontal.');
} else {
(require(44) /* metro dependency 44 */)(!columnWrapperStyle,
'columnWrapperStyle not supported for single column lists');
}
(require(44) /* metro dependency 44 */)(!(onViewableItemsChanged && viewabilityConfigCallbackPairs),
'FlatList does not support setting both onViewableItemsChanged and viewabilityConfigCallbackPairs.');
}
function value_4586(a0, a1) { // fn#4586, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:5296, offset: 0x00cc67e8, size: 117 bytes, params: 3, frame: 15
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = numColumnsOrDefault(this.props.numColumns);
let keyExtractor = this.props.keyExtractor;
if (keyExtractor == null) {
keyExtractor = (importDefault(303) /* metro dependency 303 */).keyExtractor;
}
a1.item.forEach(_fun4587);
}
function value_4588(a0) { // fn#4588, offset: 0x00cc68e9, size: 23 bytes, params: 2, frame: 2
const env0_0 = a0;
return _fun4589;
}
function value_4592() { // fn#4592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:5999, offset: 0x00cc69cd, size: 288 bytes, params: 1, frame: 27
const props = this.props;
const numColumns = props.numColumns;
const columnWrapperStyle = props.columnWrapperStyle;
const removeClippedSubviews = props.removeClippedSubviews;
const strictMode = props.strictMode;
const r1 = strictMode !== undefined && strictMode;
value = environment.__proto__;
const value2 = env1_5(props, env1_4);
const r10 = r1 ? this._memoizedRenderer : this._renderer;
const VirtualizedList = (importDefault(303) /* metro dependency 303 */).VirtualizedList;
const Object = global.Object;
const assign = Object.assign;
const object2 = {};
object2.getItem = this._getItem;
object2.getItemCount = this._getItemCount;
object2.keyExtractor = this._keyExtractor;
object2.ref = this._captureRef;
object2.viewabilityConfigCallbackPairs = this._virtualizedListPairs;
(importAll(79) /* metro dependency 79 */).shouldUseRemoveClippedSubviewsAsDefaultOnIOS();
object2.removeClippedSubviews = removeClippedSubviews == null || removeClippedSubviews;
const ListItemComponent = this.props.ListItemComponent;
return (
<VirtualizedList
{...Reflect.apply(assign, Object, [{}, value2, object2, r10(ListItemComponent, this.props.renderItem,
columnWrapperStyle, numColumns, this.props.extraData)])}
/>
);
}
function _getItem(a0, a1) { // fn#4564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:831, owner: FlatList._getItem, offset: 0x00cc60aa, size: 104 bytes, params: 3, frame: 15
var r1;
var items2;
var value2;
var value3;
var length;
var property;
var value4;
let value = environment.__proto__.__proto__;
value = numColumnsOrDefault(env0_0.props.numColumns);
if (value > 1) {
items2 = [];
value2 = 0;
if (value2 < value) {
r1 = value2;
while (true) {
value3 = a1 * value + r1;
length = a0.length;
if (value3 < length) {
property = a0[value3];
items2.push(property);
}
value4 = typeof r1 === 'bigint' ? r1 + 1n : +r1 + 1;
if (value4 < value) {
r1 = value4;
continue;
}
break;
}
}
return items2;
}
return a0[a1];
}
function _getItemCount(a0) { // fn#4565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:1012, owner: FlatList._getItemCount, offset: 0x00cc6112, size: 116 bytes, params: 2, frame: 13
var value;
if (a0 != null) {
var Object = global.Object;
if (typeof Object(a0).length === 'number') {
value = environment.__proto__.__proto__;
value = numColumnsOrDefault(env0_0.props.numColumns);
return value > 1 ? global.Math.ceil(a0.length / value) : a0.length;
}
}
return 0;
}
function FlatList_keyExtractor(a0, a1) { // fn#4566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:1219, owner: FlatList._keyExtractor, offset: 0x00cc6186, size: 192 bytes, params: 3, frame: 20
var environment;
var r0;
const env0_0 = a1;
let value = environment.__proto__.__proto__;
const numColumnsOrDefaultBinding = numColumnsOrDefault;
const binding = env0_0;
const value3 = numColumnsOrDefaultBinding(binding.props.numColumns);
let keyExtractor = binding.props.keyExtractor;
keyExtractor = keyExtractor ?? (importDefault(303) /* metro dependency 303 */).keyExtractor;
if (value3 > 1) {
value = require(44) /* metro dependency 44 */;
value(global.Array.isArray(a0),
'FlatList: Encountered internal consistency error, expected each item to consist of an array with 1-%s columns; instead, received a single item.',
value3);
value = a0.map(_fun4567);
value = value.join(':');
r0 = value;
} else {
r0 = keyExtractor(a0, a1);
}
return r0;
}
function _renderer(a0, a1, a2, a3, a4) { // fn#4568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:1597, owner: FlatList._renderer, offset: 0x00cc626d, size: 83 bytes, params: 6, frame: 13
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const env0_3 = numColumnsOrDefault(a3);
const closure = renderItem_4570;
const object2 = {};
if (a0) {
object2.ListItemComponent = closure;
} else {
object2.renderItem = closure;
}
return object2;
}
function _fun4572({viewabilityConfig, onViewableItemsChanged}) { // fn#4572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:2272, offset: 0x00cc643f, size: 47 bytes, params: 2, frame: 12
const object2 = {};
object2.viewabilityConfig = viewabilityConfig;
object2.onViewableItemsChanged = env0_0._createOnViewableItemsChanged(onViewableItemsChanged);
return object2;
}
function _fun4573() { // fn#4573, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:2576, offset: 0x00cc646e, size: 83 bytes, params: 1, frame: 15
let value = environment.__proto__.__proto__;
value = require(44) /* metro dependency 44 */;
const binding = env0_0;
let props = binding.props;
value(props.onViewableItemsChanged,
'Changing the nullability of onViewableItemsChanged is not supported. Once a function or null is supplied that cannot be changed.');
props = binding.props;
return props.onViewableItemsChanged.apply(props, arguments);
}
function _fun4587(a0, a1) { // fn#4587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:5461, offset: 0x00cc685d, size: 140 bytes, params: 3, frame: 21
let value = environment.__proto__.__proto__;
(require(44) /* metro dependency 44 */)(require.index != null, 'Missing index!');
value = require.index * env0_2 + a1;
const binding = env0_0;
const push = binding.push;
const Object = global.Object;
const assign = Object.assign;
const object2 = {item: a0};
object2.key = keyExtractor(a0, value);
object2.index = value;
Reflect.apply(push, binding, [Reflect.apply(assign, Object, [{}, require, object2])]);
}
function _fun4589(a0) { // fn#4589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:5698, offset: 0x00cc6900, size: 143 bytes, params: 2, frame: 17
var items2;
if (env0_0) {
if (numColumnsOrDefault(env0_1.props.numColumns) > 1) {
items2 = [];
var env0_0 = items2;
a0.viewableItems.forEach(_fun4590);
a0.changed.forEach(_fun4591);
env0_0({viewableItems: [], changed: items2});
} else {
env0_0(a0);
}
}
}
function _fun4567(a0, a1) { // fn#4567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:1531, offset: 0x00cc6246, size: 39 bytes, params: 3, frame: 13
return keyExtractor(a0, require * env0_1 + a1);
}
function _rendererRender(a0) { // fn#4569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:1648, owner: FlatList._renderer.render, offset: 0x00cc62c0, size: 77 bytes, params: 2, frame: 16
var r0;
var value3;
var binding;
var value;
if (env0_0) {
value3 = environment.__proto__.__proto__.__proto__;
binding = env0_0;
value = global.Object.assign({}, a0);
value = ((Component) => <Component {...value} />)(binding);
r0 = value;
} else {
r0 = require ? require(a0) : null;
}
return r0;
}
function ListItemComponent(a0) { // fn#4570, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:1716, owner: FlatList._renderer.ListItemComponent, offset: 0x00cc630d, size: 201 bytes, params: 2, frame: 20
var environment;
var item;
var value2;
var defaultImport;
var property;
const env0_0 = a0;
if (env0_3 > 1) {
item = a0.item;
var env0_1 = a0.index;
value2 = environment.__proto__.__proto__.__proto__;
(require(44) /* metro dependency 44 */)(global.Array.isArray(item),
'Expected array of items with numColumns > 1');
defaultImport = importDefault(112) /* metro dependency 112 */;
property = (require(253) /* metro dependency 253 */).default;
return ((Component) => <Component style={property.compose(env3_13.row,
importDefault)}>{item.map(_fun4571)}</Component>)(defaultImport);
}
return _rendererRender(a0);
}
function _fun4590(a0) { // fn#4590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:5808, offset: 0x00cc698f, size: 31 bytes, params: 2, frame: 13
return env1_1._pushMultiColumnViewable(env0_1, a0);
}
function _fun4591(a0) { // fn#4591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:5881, offset: 0x00cc69ae, size: 31 bytes, params: 2, frame: 13
return env1_1._pushMultiColumnViewable(env0_0, a0);
}
function _fun4571(a0, a1) { // fn#4571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:343:1918, offset: 0x00cc63d6, size: 105 bytes, params: 3, frame: 17
var r0;
var value4;
let value = environment.__proto__;
value = _rendererRender({item: a0, index: index * env1_3 + a1, separators: env0_0.separators});
const value3 = null;
if (value3 != value) {
value4 = environment.__proto__.__proto__.__proto__.__proto__;
value = <env4_11.Fragment {...{children: value}} key={a1} />;
r0 = value;
} else {
r0 = value3;
}
return r0;
}