Files
discord-decomp/sources/lib/native/FastList.tsx
T
2026-07-28 01:06:53 +03:00

4043 lines
195 KiB
TypeScript

/* Metro module 8140; source: lib/native/FastList.tsx; dependencies: [29, 15, 17, 18, 57, 6, 7, 31, 27, 33, 22, 628, 6821, 4573, 477, 4017, 8141, 8142, 6277, 8143, 5321, 4020, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Module00022 from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import ObjectWithoutProperties from '../../by-id/module-00029-ObjectWithoutProperties.js'; /* Metro dependency 29 */
import Module00057 from '../../by-id/module-00057.js'; /* Metro dependency 57 */
import ReanimatedRexport from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import NativeView from '../../modules/core/native/NativeView.tsx'; /* Metro dependency 6821 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as JsxRuntimeModule from '../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
import * as ReanimatedRexportModule from '../../modules/reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
function _fun65151(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:6, offset: 0x01bc4d69, size: 816 bytes, params: 8, frame: 23
const env0_0 = require;
const _arrayLikeToArray_65157 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const renderDefaultEmpty = function() {
return null;
};
const defaultRecyclerKey = function() {
};
const getBatchSize = function(a0) {
var Math = global.Math;
return Math.ceil(a0 / 4);
};
const env0_3 = ['manualRef', 'onScroll', 'onScrollEnd', 'onLayout', 'renderHeader', 'renderFooter', 'renderSection',
'renderItem', 'renderSectionFooter', 'getRecyclerKey', 'onEndReached', 'endReachedThreshold', 'headerSize',
'footerSize', 'sectionSize', 'sectionFooterSize', 'itemSize', 'sections', 'scrollPosValue', 'batchesToRender',
'optimizeListItemRender', 'initialScrollSection', 'initialScrollItem', 'initialScrollOrientation',
'initialScrollStart', 'getAnchorIdFromIndex', 'getAnchorIndexFromId', 'EXPERIMENTAL_enableAnchorWhileScrolling',
'chunkBase', 'disableContentWrappers', 'childrenWrapper', 'stickyHeaderFooter', 'stickySectionsVariant',
'persistantKeys', 'disableRecyclingOnFullCompute', 'disableLegacyGestureHandling', 'viewabilityConfig',
'onViewableItemsChanged', 'debugLayout', 'renderAccessory', 'removeClippedSubviews', 'inActionSheet'];
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
let value2 = ReactNativeModule;
const env0_12 = value2.PixelRatio;
const env0_13 = value2.ScrollView;
value2.StyleSheet;
const env0_14 = value2.findNodeHandle;
let value3 = JsxRuntimeModule;
const env0_15 = value3.jsxs;
const env0_16 = value3.jsx;
const env0_17 = value3.Fragment;
const Map = global.Map;
const map = new Map();
_fun65164()._LAST_KEY = 0;
const value7 = _fun65174();
const env0_22 = {code: 'function FastListTsx1(){const{scrollPosValue,interpolate,inputRange,outputRange,horizontal}=this.__closure;const interpolatedValue=scrollPosValue!=null?interpolate(scrollPosValue.get(),inputRange,outputRange):null;return{transform:interpolatedValue!=null?[horizontal?{translateX:interpolatedValue}:{translateY:interpolatedValue}]:undefined};}'};
const env0_23 = value.memo(FastListStickySectionRendererComponent);
const env0_24 = value.memo(_FastListSectionRenderer);
const env0_25 = value.memo(_FastListSectionFooterRenderer);
const env0_26 = value.memo(_FastListItemRenderer);
const env0_27 = value.memo(_FastListHeaderFooterRenderer);
const env0_28 = value.memo(_FastListSpacer);
const env0_29 = _fun65203();
const env0_30 = {code: 'function FastListTsx2(event){const{horizontal,workletMounted,scrollPosValue}=this.__closure;const scrollPosition=!horizontal?event.contentOffset.y:event.contentOffset.x;const contentSize=!horizontal?event.contentSize.height:event.contentSize.width;if(contentSize===0&&!workletMounted.get())return;workletMounted.set(true);scrollPosValue.set(Math.min(scrollPosition,contentSize));}'};
const PureComponent = value.PureComponent;
value = _fun65211(PureComponent);
value.defaultProps = {'batchesToRender': 12, 'contentInset': null, 'disableLegacyGestureHandling': false,
'disableRecyclingOnFullCompute': false, 'stickyHeaderFooter': false, contentInset: {'top': 0, 'right': 0,
'left': 0, 'bottom': 0}};
const animatedComponent = (ReanimatedRexport).createAnimatedComponent(value);
(FileImportTrackerModule).fileFinishedImporting('lib/native/FastList.tsx');
exports.default = value;
exports.DEFAULT_BATCHES_TO_RENDER = 12;
exports.MINIMUM_BATCHES_TO_RENDER = 5;
exports.getItemSizeOverrideKey = function(a0, a1, a2) {
return '' + a0 + ':' + a1 + ':' + a2;
};
exports.FastListItemTypes = {SPACER: 'SPACER', HEADER: 'HEADER', FOOTER: 'FOOTER', SECTION: 'SECTION', ITEM: 'ITEM',
SECTION_FOOTER: 'SECTION_FOOTER'};
exports.FastListComputer = value7;
exports.AnimatedFastList = animatedComponent;
function _isNativeReflectConstruct_65152() { // fn#65152, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:1114, offset: 0x01bc5099, 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_65152_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_65155(a0, a1) { // fn#65155, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:1307, offset: 0x01bc50f7, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun65156;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_65157(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_65157(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_65157(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun65156;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
function _fun65156() { // fn#65156, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:1878, offset: 0x00c39d73, size: 69 bytes, params: 1, frame: 5
return env0_1 >= env0_0.length ? {done: true} : {done: false,
value: env0_0[typeof env0_1 === 'bigint' ? env0_1 : +env0_1]};
}
}
function computeBlock(a0, a1, a2) { // fn#65161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:17171, offset: 0x01bc5288, size: 171 bytes, params: 4, frame: 19
if (a0 === 0) {
return {'batchSize': 0, 'blockStart': 0, 'blockEnd': 0};
}
let Math = global.Math;
let value = Math.ceil(a0);
Math = global.Math;
const value2 = Math.floor(a1);
const batchSize = getBatchSize(value);
Math = global.Math;
const max = Math.max;
const Math2 = global.Math;
value = Math2.round((value2 + value / 2) / batchSize);
value = Reflect.apply(max, Math, [0, value - a2 / 2]) * batchSize;
return {batchSize: batchSize, blockStart: value, blockEnd: value + batchSize * a2};
}
function FastListIosFabricGestureWorkaround({inActionSheet, children}) { // fn#65162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:34177, offset: 0x01bc5333, size: 139 bytes, params: 2, frame: 17
var r0;
var moduleValue;
if (inActionSheet === true) {
r0 = children;
} else {
moduleValue = require(4020) /* metro dependency 4020: FabricUtils */;
if (moduleValue.isIosFabric()) {
const GestureDetector = (require(5321) /* metro dependency 5321 */).GestureDetector;
r0 = (
<GestureDetector
gesture={env0_11.useMemo(function() {
var Gesture = require(dependencyMap[20]).Gesture;
return Gesture.Native();
}, [])}
>
{children}
</GestureDetector>
);
} else {
r0 = children;
}
}
return r0;
}
function _fun65164() { // fn#65164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:2464, offset: 0x01bc53e9, size: 149 bytes, params: 1, frame: 15
return CreateClass(FastListItemRecycler, [{key: '_itemsForType', value: function(a0) {
var r1;
var object;
var items;
var property = this._items[a0];
if (property != null) {
r1 = property;
} else {
property = this._items;
object = {};
property[a0] = object;
r1 = object;
}
object = [r1];
property = this._pendingItems[a0];
if (property != null) {
r1 = property;
} else {
property = this._pendingItems;
items = [];
property[a0] = items;
r1 = items;
}
object[1] = r1;
return object;
}}, {key: 'get', value: value_65168}, {key: '_get', value: value_65169}, {key: 'fill', value: value_65170},
{key: '_fill', value: value_65172}]);
function FastListItemRecycler(a0) { // fn#65165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:2475, offset: 0x01bc547e, size: 67 bytes, params: 2, frame: 15
env1_9(this, FastListItemRecycler);
this._items = {};
this._pendingItems = {};
a0.forEach(_fun65166);
function _fun65166(a0) { // fn#65166, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:2585, offset: 0x01bc54c1, size: 62 bytes, params: 2, frame: 15
const type = a0.type;
const recyclerKey = a0.recyclerKey;
let value = env0_0._itemsForType(type);
value = env2_8(value, 1);
value[0][recyclerKey] = a0;
}
}
function value_65168(a0, a1, a2, a3) { // fn#65168, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:2869, offset: 0x01bc5551, size: 132 bytes, params: 5, frame: 17
let value = a4;
const value2 = a5;
const r6 = value !== undefined ? value : 0;
const r5 = value2 !== undefined ? value2 : -1;
value = this._itemsForType(a0);
value = env1_8(value, 2);
return this._get({type: a0, layoutStart: a1, layoutSize: a2, customKey: a3, section: r6, item: r5, items: value[0],
pendingItems: value[1]});
}
function value_65170(a0) { // fn#65170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:3411, offset: 0x01bc569d, size: 63 bytes, params: 2, frame: 14
const env0_1 = a0;
const defaultImport = Module00022;
defaultImport.forEach(env1_19, _fun65171);
function _fun65171(a0) { // fn#65171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:3444, offset: 0x01bc56dc, size: 73 bytes, params: 2, frame: 16
const binding = env0_0;
const value4 = env2_8(binding._itemsForType(a0), 2);
binding._fill(value4[0], value4[1], env0_1);
}
}
function value_65172(a0, a1, a2) { // fn#65172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:3541, offset: 0x01bc5725, size: 144 bytes, params: 4, frame: 16
var environment;
var value;
var forEach;
var property;
var _LAST_KEY;
var value2;
var value3;
const env0_0 = a1;
let env0_1 = 0;
reducibleJoin2: while (true) {
if (a2) {
break reducibleJoin2;
}
value = environment.__proto__;
value = importDefault(22) /* metro dependency 22 */;
forEach = value.forEach;
Reflect.apply(forEach, value, [a0, _fun65173]);
break reducibleJoin2;
}
let binding = env0_1;
let length = a1.length;
if (binding < length) {
reducibleLoop3: while (true) {
property = a1[env0_1];
_LAST_KEY = FastListItemRecycler._LAST_KEY;
value2 = typeof _LAST_KEY === 'bigint' ? _LAST_KEY + 1n : +_LAST_KEY + 1;
FastListItemRecycler._LAST_KEY = value2;
property.key = value2;
binding = env0_1;
value3 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
env0_1 = value3;
length = a1.length;
if (value3 < length) {
continue reducibleLoop3;
}
break reducibleLoop3;
}
}
a1.length = 0;
function _fun65173({key}) { // fn#65173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:3593, offset: 0x01bc57b5, size: 54 bytes, params: 2, frame: 4
const property = require[env0_1];
if (property == null) {
return false;
}
property.key = key;
const binding = env0_1;
env0_1 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
}
}
}
function _fun65174() { // fn#65174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:3746, offset: 0x01bc57eb, size: 435 bytes, params: 1, frame: 15
return CreateClass(FastListComputer, [{key: 'updateProps', value: value_65176}, {key: 'setInfo', value: function(a0) {
var property = global.Math;
var value = property.ceil(a0 / 4);
property = this.dirty;
this.dirty = property ? !!property : value !== this.chunkSize;
this.chunkSize = value;
}}, {key: 'getSizeForHeader', value: function() {
var headerSize = this.props.headerSize;
var r2 = headerSize === undefined ? 0 : headerSize;
return typeof r2 === 'number' ? r2 : r2();
}}, {key: 'getSizeForFooter', value: function() {
var footerSize = this.props.footerSize;
var r2 = footerSize === undefined ? 0 : footerSize;
return typeof r2 === 'number' ? r2 : r2();
}}, {key: 'getSizeForSection', value: function(a0) {
var sectionSize = this.props.sectionSize;
var r3 = sectionSize === undefined ? 0 : sectionSize;
return typeof r3 === 'number' ? r3 : r3(a0);
}}, {key: 'getSizeForItem', value: function(a0, a1) {
var itemSize = this.props.itemSize;
return typeof itemSize === 'number' ? itemSize : itemSize(a0, a1);
}}, {key: 'getSizeForSectionFooter', value: function(a0) {
var sectionFooterSize = this.props.sectionFooterSize;
var r3 = sectionFooterSize === undefined ? 0 : sectionFooterSize;
return typeof r3 === 'number' ? r3 : r3(a0);
}}, {key: 'getChunk', value: value_65183}, {key: 'compute', value: value_65184}, {key: 'fullCompute',
value: value_65187}, {key: 'getChunkDataFromSectionItem', value: value_65189},
{key: 'getChunkIndexFromSectionItem', value: value_65190}, {key: 'computeScrollPosition', value: value_65191},
{key: 'getSectionItemFromPosition', value: value_65192}, {key: 'setDisableRecycling', value: function(a0) {
this.disableRecycling = a0;
}}, {key: 'getSize', value: function() {
if (this.dirty) {
this.fullCompute();
}
return this.size;
}}, {key: 'isDirty', value: function() {
return this.dirty;
}}]);
function FastListComputer(a0) { // fn#65175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:3767, offset: 0x01bc599e, size: 131 bytes, params: 2, frame: 15
env1_9(this, FastListComputer);
this.chunkSize = 0;
this.uniform = false;
this.dataCache = [];
this.size = 0;
this.dirty = true;
this.lastStartChunk = -1;
this.lastEndChunk = -1;
this.items = [];
this.persistantItemData = [];
this.disableRecycling = false;
this.props = a0;
this.updateProps(a0);
}
function value_65176(a0) { // fn#65176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:4069, offset: 0x01bc5a21, size: 99 bytes, params: 2, frame: 15
var r2;
const dirty = this.dirty;
let value = !!dirty;
if (dirty) {
r2 = value;
} else {
value = environment.__proto__;
value = importDefault(628) /* metro dependency 628: shallowEqual */;
value = !value(a0, this.props);
r2 = value;
}
this.dirty = r2;
this.props = a0;
this.uniform = typeof a0.itemSize === 'number';
}
function value_65184(a0, a1, a2) { // fn#65184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:5256, offset: 0x01bc5c65, size: 3570 bytes, params: 4, frame: 69
var environment;
var r0;
var r6;
var r25;
var r1;
var item;
var r19;
var r23;
var r38;
var r39;
var r50;
var r48;
var r49;
var r51;
var r47;
var r34;
var r16;
var r18;
var r24;
var r22;
var r5;
var r17;
var r12;
var r13;
var r3;
var lastStartChunk;
var lastEndChunk;
var items5;
var value6;
var type;
var section;
var type2;
var ITEM;
var value7;
var set;
var value8;
var getChunk;
var value18;
var add;
var value19;
var value22;
var data;
var value23;
var value24;
var value25;
var layoutStart;
var layoutSize;
var HEADER;
var SECTION;
var SECTION_FOOTER;
var FOOTER;
var push;
var get;
var value26;
var length;
var sectionData;
var layoutStart2;
var SECTION_FOOTER2;
var value27;
var value28;
var uniform;
var value29;
var itemSize;
var value30;
var value31;
var initialSection;
var initialItem;
var value32;
var value33;
var has;
var value34;
var value35;
var value36;
var layoutStart3;
var value37;
var value38;
var value39;
var value40;
var value41;
var value42;
var value43;
var value44;
var value45;
var value46;
var value47;
var value49;
var value50;
var property;
var property2;
var lastSection;
var value51;
var value52;
var value53;
var value54;
var value55;
var headerDataCache;
var layoutStart4;
var unshift;
var SPACER;
var layoutStart5;
var layoutStart6;
var value56;
var value57;
var value58;
var value59;
var value60;
var property3;
var type3;
var value61;
var footerDataCache;
var value62;
var value63;
var value64;
var property4;
var type4;
var value65;
var disableRecyclingOnFullCompute;
let value = a3;
const env0_0 = a0;
const env0_1 = a1;
const value2 = undefined;
reducibleJoin2: while (true) {
if (value !== value2) {
r0 = value;
break reducibleJoin2;
}
value = false;
r0 = value;
break reducibleJoin2;
}
const addInitialSection2 = addInitialSection;
const value_65184IsVisible2 = value_65184IsVisible;
if (this.dirty) {
this.fullCompute();
r6 = true;
} else {
lastStartChunk = this.lastStartChunk;
value = false;
reducibleJoin7: while (true) {
if (a0 !== lastStartChunk) {
r6 = value;
break reducibleJoin7;
}
lastEndChunk = this.lastEndChunk;
if (a1 === lastEndChunk) {
return {size: this.size, items: this.items};
}
r6 = value;
break reducibleJoin7;
}
}
let props = this.props;
const stickyHeaderFooter = props.stickyHeaderFooter;
const getRecyclerKey = props.getRecyclerKey;
reducibleJoin9: while (true) {
if (value2 !== getRecyclerKey) {
r25 = getRecyclerKey;
break reducibleJoin9;
}
value = environment.__proto__;
r25 = defaultRecyclerKey;
break reducibleJoin9;
}
this.lastStartChunk = a0;
this.lastEndChunk = a1;
const Map = global.Map;
let map = new Map();
const value4 = _createForOfIteratorHelperLoose_65155(this.persistantItemData);
const value5 = value4();
let done = value5.done;
if (!done) {
r1 = value5;
reducibleLoop10: while (true) {
value6 = r1.value;
type = value6.type;
section = value6.section;
type2 = value6.type;
ITEM = env1_19.ITEM;
reducibleJoin12: while (true) {
if (type2 !== ITEM) {
item = value2;
break reducibleJoin12;
}
item = value6.item;
break reducibleJoin12;
}
value7 = r25(type, section, item);
reducibleJoin14: while (true) {
if (value7 == null) {
break reducibleJoin14;
}
set = map.set;
Reflect.apply(set, map, [value7, value6]);
break reducibleJoin14;
}
value8 = value4();
done = value8.done;
if (done) {
break reducibleLoop10;
}
r1 = value8;
continue reducibleLoop10;
}
}
let Math = global.Math;
let floor = Math.floor;
let chunkSize = this.chunkSize;
const value9 = Reflect.apply(floor, Math, [a0 / chunkSize]);
Math = global.Math;
let max = Math.max;
const Math2 = global.Math;
const value10 = Reflect.apply(max, Math, [Math2.ceil(a1 / this.chunkSize), value9]);
const value11 = value9 * this.chunkSize;
const items4 = [];
this.items = items4;
let binding = env1_20;
const binding2 = new binding(a2);
const object = {'initialSection': -1, 'initialItem': -1, 'lastSection': -1, 'lastItem': -1};
const value15 = 0;
const Set = global.Set;
set = new Set();
if (value9 <= value10) {
r0 = value9;
reducibleLoop16: while (true) {
getChunk = this.getChunk;
value18 = Reflect.apply(getChunk, this, [r0]);
reducibleJoin18: while (true) {
if (value18 == null) {
break reducibleJoin18;
}
add = set.add;
Reflect.apply(add, set, [value18]);
break reducibleJoin18;
}
value19 = typeof r0 === 'bigint' ? r0 + 1n : +r0 + 1;
if (value19 <= value10) {
r0 = value19;
continue reducibleLoop16;
}
break reducibleLoop16;
}
}
const value20 = _createForOfIteratorHelperLoose_65155(set);
const value21 = value20();
done = value21.done;
if (!done) {
r19 = value21;
r23 = value11;
reducibleLoop20: while (true) {
value22 = r19.value;
reducibleJoin82: while (true) {
if (value22 == null) {
r34 = r23;
break reducibleJoin82;
}
_createForOfIteratorHelperLoose_65155Binding = _createForOfIteratorHelperLoose_65155;
data = value22.data;
value23 = _createForOfIteratorHelperLoose_65155Binding(data);
value24 = value23();
done = value24.done;
if (done) {
r34 = r23;
break reducibleJoin82;
}
r38 = value24;
r39 = r23;
reducibleLoop22: while (true) {
value25 = r38.value;
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
reducibleJoin81: while (true) {
if (layoutStart + layoutSize < r39) {
r47 = r39;
break reducibleJoin81;
}
type = value25.type;
HEADER = env1_19.HEADER;
if (HEADER === type) {
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
reducibleJoin80: while (true) {
if (value_65184IsVisible2(layoutStart, layoutSize)) {
push = items4.push;
get = binding2.get;
HEADER = env1_19.HEADER;
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [HEADER, layoutStart,
layoutSize,
value2])]);
break reducibleJoin80;
}
break reducibleJoin80;
}
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
value45 = layoutStart + layoutSize;
r47 = value45;
break reducibleJoin81;
}
SECTION = env1_19.SECTION;
if (SECTION === type) {
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
reducibleJoin77: while (true) {
if (value_65184IsVisible2(layoutStart, layoutSize)) {
initialSection = object.initialSection;
if (initialSection === -1) {
section = value25.section;
object.initialSection = section;
section = value25.section;
object.lastSection = section;
} else {
object.lastSection = value25.section;
}
SECTION = env1_19.SECTION;
section = value25.section;
value41 = r25(SECTION, section);
value42 = value41 != null;
reducibleJoin74: while (true) {
if (value42) {
has = map.has;
value43 = Reflect.apply(has, map, [value41]);
r48 = value43;
break reducibleJoin74;
}
r48 = value42;
break reducibleJoin74;
}
reducibleJoin76: while (true) {
if (r48) {
map.delete(value41);
break reducibleJoin76;
}
break reducibleJoin76;
}
push = items4.push;
get = binding2.get;
SECTION = env1_19.SECTION;
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
section = value25.section;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [SECTION, layoutStart,
layoutSize,
value41,
section])]);
break reducibleJoin77;
}
break reducibleJoin77;
}
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
value44 = layoutStart + layoutSize;
r47 = value44;
break reducibleJoin81;
}
ITEM = env1_19.ITEM;
if (ITEM !== type) {
SECTION_FOOTER = env1_19.SECTION_FOOTER;
if (SECTION_FOOTER === type) {
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
reducibleJoin35: while (true) {
if (value_65184IsVisible2(layoutStart, layoutSize)) {
length = items4.length;
reducibleJoin34: while (true) {
if (value15 !== length) {
break reducibleJoin34;
}
section = value25.section;
sectionData = value25.sectionData;
layoutStart = sectionData.layoutStart;
sectionData = value25.sectionData;
layoutSize = sectionData.layoutSize;
layoutStart2 = value25.layoutStart;
addInitialSection2(section, layoutStart, layoutSize, layoutStart2);
break reducibleJoin34;
}
push = items4.push;
get = binding2.get;
binding = env1_19;
SECTION_FOOTER = binding.SECTION_FOOTER;
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
SECTION_FOOTER2 = binding.SECTION_FOOTER;
section = value25.section;
value27 = r25(SECTION_FOOTER2, section);
section = value25.section;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [SECTION_FOOTER,
layoutStart,
layoutSize,
value27,
section])]);
break reducibleJoin35;
}
break reducibleJoin35;
}
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
value28 = layoutStart + layoutSize;
r47 = value28;
break reducibleJoin81;
}
FOOTER = env1_19.FOOTER;
if (FOOTER !== type) {
r47 = r39;
break reducibleJoin81;
}
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
reducibleJoin30: while (true) {
if (value_65184IsVisible2(layoutStart, layoutSize)) {
push = items4.push;
get = binding2.get;
FOOTER = env1_19.FOOTER;
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [FOOTER, layoutStart,
layoutSize,
value2])]);
break reducibleJoin30;
}
break reducibleJoin30;
}
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
value26 = layoutStart + layoutSize;
r47 = value26;
break reducibleJoin81;
}
uniform = value25.uniform;
if (uniform == null) {
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
reducibleJoin67: while (true) {
if (value_65184IsVisible2(layoutStart, layoutSize)) {
length = items4.length;
reducibleJoin58: while (true) {
if (value15 !== length) {
break reducibleJoin58;
}
section = value25.section;
sectionData = value25.sectionData;
layoutStart = sectionData.layoutStart;
sectionData = value25.sectionData;
layoutSize = sectionData.layoutSize;
layoutStart3 = value25.layoutStart;
addInitialSection2(section, layoutStart, layoutSize, layoutStart3);
break reducibleJoin58;
}
initialSection = object.initialSection;
reducibleJoin60: while (true) {
if (initialSection !== -1) {
break reducibleJoin60;
}
section = value25.section;
object.initialSection = section;
break reducibleJoin60;
}
initialItem = object.initialItem;
reducibleJoin62: while (true) {
if (initialItem !== -1) {
break reducibleJoin62;
}
item = value25.item;
object.initialItem = item;
break reducibleJoin62;
}
section = value25.section;
object.lastSection = section;
item = value25.item;
object.lastItem = item;
ITEM = env1_19.ITEM;
section = value25.section;
item = value25.item;
value37 = r25(ITEM, section, item);
value38 = value37 != null;
reducibleJoin64: while (true) {
if (value38) {
has = map.has;
value39 = Reflect.apply(has, map, [value37]);
r48 = value39;
break reducibleJoin64;
}
r48 = value38;
break reducibleJoin64;
}
reducibleJoin66: while (true) {
if (r48) {
map.delete(value37);
break reducibleJoin66;
}
break reducibleJoin66;
}
push = items4.push;
get = binding2.get;
ITEM = env1_19.ITEM;
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
section = value25.section;
item = value25.item;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [ITEM, layoutStart,
layoutSize,
value37,
section,
item])]);
break reducibleJoin67;
}
break reducibleJoin67;
}
layoutStart = value25.layoutStart;
layoutSize = value25.layoutSize;
value40 = layoutStart + layoutSize;
r47 = value40;
break reducibleJoin81;
}
layoutStart = value25.layoutStart;
reducibleJoin39: while (true) {
if (r39 > layoutStart) {
Math = global.Math;
floor = Math.floor;
layoutStart = value25.layoutStart;
value29 = r39 - layoutStart;
itemSize = value25.itemSize;
value30 = Reflect.apply(floor, Math, [value29 / itemSize]);
r50 = value30;
break reducibleJoin39;
}
r50 = value15;
break reducibleJoin39;
}
layoutStart = value25.layoutStart;
itemSize = value25.itemSize;
value31 = layoutStart + itemSize * r50;
chunkSize = this.chunkSize;
if (!(value31 < value10 * chunkSize)) {
r47 = value31;
break reducibleJoin81;
}
items5 = value25.items;
if (!(r50 < items5)) {
r47 = value31;
break reducibleJoin81;
}
r48 = r50;
r49 = value31;
reducibleLoop41: while (true) {
itemSize = value25.itemSize;
reducibleJoin53: while (true) {
if (value_65184IsVisible2(r49, itemSize)) {
length = items4.length;
reducibleJoin44: while (true) {
if (value15 !== length) {
break reducibleJoin44;
}
section = value25.section;
sectionData = value25.sectionData;
layoutStart = sectionData.layoutStart;
sectionData = value25.sectionData;
layoutSize = sectionData.layoutSize;
addInitialSection2(section, layoutStart, layoutSize, r49);
break reducibleJoin44;
}
initialSection = object.initialSection;
reducibleJoin46: while (true) {
if (initialSection !== -1) {
break reducibleJoin46;
}
section = value25.section;
object.initialSection = section;
break reducibleJoin46;
}
initialItem = object.initialItem;
reducibleJoin48: while (true) {
if (initialItem !== -1) {
break reducibleJoin48;
}
object.initialItem = r48;
break reducibleJoin48;
}
section = value25.section;
object.lastSection = section;
object.lastItem = r48;
ITEM = env1_19.ITEM;
section = value25.section;
value32 = r25(ITEM, section, r48);
value33 = value32 != null;
reducibleJoin50: while (true) {
if (value33) {
has = map.has;
value34 = Reflect.apply(has, map, [value32]);
r51 = value34;
break reducibleJoin50;
}
r51 = value33;
break reducibleJoin50;
}
reducibleJoin52: while (true) {
if (r51) {
map.delete(value32);
break reducibleJoin52;
}
break reducibleJoin52;
}
push = items4.push;
get = binding2.get;
ITEM = env1_19.ITEM;
itemSize = value25.itemSize;
section = value25.section;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [ITEM, r49, itemSize,
value32,
section,
r48])]);
break reducibleJoin53;
}
break reducibleJoin53;
}
itemSize = value25.itemSize;
value35 = r49 + itemSize;
value36 = typeof r48 === 'bigint' ? r48 + 1n : +r48 + 1;
chunkSize = this.chunkSize;
if (value35 < value10 * chunkSize) {
items5 = value25.items;
if (value36 < items5) {
r48 = value36;
r49 = value35;
continue reducibleLoop41;
}
r47 = value35;
break reducibleJoin81;
}
r47 = value35;
break reducibleJoin81;
}
}
value46 = value23();
done = value46.done;
if (done) {
r34 = r47;
break reducibleJoin82;
}
r38 = value46;
r39 = r47;
continue reducibleLoop22;
}
}
value47 = value20();
done = value47.done;
if (done) {
break reducibleLoop20;
}
r19 = value47;
r23 = r34;
continue reducibleLoop20;
}
}
const items2 = [];
const items3 = [];
map = _createForOfIteratorHelperLoose_65155(map);
const value48 = map();
done = value48.done;
if (done) {
r5 = value15;
r17 = value15;
} else {
r16 = value15;
r18 = value15;
r19 = value48;
reducibleLoop84: while (true) {
value49 = r19.value;
value50 = env1_8(value49, 2);
property = value50[value15];
property2 = value50[1];
section = property2.section;
initialSection = object.initialSection;
if (section < initialSection) {
layoutSize = property2.layoutSize;
value54 = r18 + layoutSize;
push = items2.push;
Reflect.apply(push, items2, [[property, property2]]);
r22 = r16;
r23 = value54;
} else {
section = property2.section;
lastSection = object.lastSection;
if (section > lastSection) {
layoutSize = property2.layoutSize;
value53 = r16 + layoutSize;
push = items3.push;
Reflect.apply(push, items3, [[property, property2]]);
r22 = value53;
r23 = r18;
} else {
type = property2.type;
ITEM = env1_19.ITEM;
reducibleJoin94: while (true) {
if (type !== ITEM) {
r22 = r16;
r23 = r18;
break reducibleJoin94;
}
section = property2.section;
initialSection = object.initialSection;
reducibleJoin91: while (true) {
reducibleJoin89: while (true) {
if (section !== initialSection) {
break reducibleJoin89;
}
item = property2.item;
initialItem = object.initialItem;
if (item < initialItem) {
layoutSize = property2.layoutSize;
value52 = r18 + layoutSize;
push = items2.push;
Reflect.apply(push, items2, [[property, property2]]);
r0 = r16;
r24 = value52;
break reducibleJoin91;
}
break reducibleJoin89;
}
layoutSize = property2.layoutSize;
value51 = r16 + layoutSize;
push = items3.push;
Reflect.apply(push, items3, [[property, property2]]);
r0 = value51;
r24 = r18;
break reducibleJoin91;
}
r22 = r0;
r23 = r24;
break reducibleJoin94;
}
}
}
value55 = map();
done = value55.done;
if (done) {
r5 = r22;
r17 = r23;
break reducibleLoop84;
}
r16 = r22;
r18 = r23;
r19 = value55;
continue reducibleLoop84;
}
}
property = items4[value15];
reducibleJoin111: while (true) {
if (property == null) {
break reducibleJoin111;
}
layoutStart = property.layoutStart;
if (layoutStart > value15) {
headerDataCache = this.headerDataCache;
layoutStart = property.layoutStart;
reducibleJoin99: while (true) {
if (stickyHeaderFooter) {
map = headerDataCache != null;
r18 = map;
break reducibleJoin99;
}
r18 = stickyHeaderFooter;
break reducibleJoin99;
}
reducibleJoin101: while (true) {
if (r18) {
type = property.type;
map = type !== 'HEADER';
r18 = map;
break reducibleJoin101;
}
break reducibleJoin101;
}
reducibleJoin105: while (true) {
if (r18) {
layoutStart4 = headerDataCache.layoutStart;
map = layoutStart - layoutStart4;
layoutSize = headerDataCache.layoutSize;
reducibleJoin104: while (true) {
if (map - layoutSize > value15) {
unshift = items4.unshift;
get = binding2.get;
SPACER = env1_19.SPACER;
layoutStart5 = headerDataCache.layoutStart;
layoutSize = headerDataCache.layoutSize;
map = layoutStart5 + layoutSize;
layoutStart6 = headerDataCache.layoutStart;
value56 = layoutStart - layoutStart6;
layoutSize = headerDataCache.layoutSize;
Reflect.apply(unshift, items4, [Reflect.apply(get, binding2, [SPACER, map,
value56 - layoutSize,
value2,
value15,
value15])]);
break reducibleJoin104;
}
break reducibleJoin104;
}
unshift = items4.unshift;
get = binding2.get;
HEADER = env1_19.HEADER;
layoutStart = headerDataCache.layoutStart;
layoutSize = headerDataCache.layoutSize;
Reflect.apply(unshift, items4, [Reflect.apply(get, binding2, [HEADER, layoutStart, layoutSize,
value2])]);
layoutStart = headerDataCache.layoutStart;
r0 = layoutStart;
break reducibleJoin105;
}
r0 = layoutStart;
break reducibleJoin105;
}
Math = global.Math;
max = Math.max;
map = Reflect.apply(max, Math, [r0 - r17, value15]);
value57 = _createForOfIteratorHelperLoose_65155(items2);
value58 = value57();
done = value58.done;
if (!done) {
r12 = value58;
reducibleLoop106: while (true) {
value59 = r12.value;
value60 = env1_8(value59, 2);
property = value60[value15];
property3 = value60[1];
unshift = items4.unshift;
get = binding2.get;
type = property3.type;
layoutStart = property3.layoutStart;
layoutSize = property3.layoutSize;
section = property3.section;
type3 = property3.type;
ITEM = env1_19.ITEM;
reducibleJoin108: while (true) {
if (type3 !== ITEM) {
item = value2;
break reducibleJoin108;
}
item = property3.item;
break reducibleJoin108;
}
Reflect.apply(unshift, items4, [Reflect.apply(get, binding2, [type, layoutStart, layoutSize,
property,
section,
item])]);
value61 = value57();
done = value61.done;
if (done) {
break reducibleLoop106;
}
r12 = value61;
continue reducibleLoop106;
}
}
if (map > value15) {
unshift = items4.unshift;
get = binding2.get;
SPACER = env1_19.SPACER;
Reflect.apply(unshift, items4, [Reflect.apply(get, binding2, [SPACER, value15, map, value2, value15,
1])]);
break reducibleJoin111;
}
break reducibleJoin111;
}
break reducibleJoin111;
}
property = items4[items4.length - 1];
if (property != null) {
layoutStart = property.layoutStart;
layoutSize = property.layoutSize;
map = layoutStart + layoutSize;
r17 = map;
} else {
r17 = this.size;
}
let size = this.size;
reducibleJoin129: while (true) {
if (!(r17 < size)) {
break reducibleJoin129;
}
footerDataCache = this.footerDataCache;
reducibleJoin117: while (true) {
if (stickyHeaderFooter) {
map = footerDataCache != null;
r13 = map;
break reducibleJoin117;
}
r13 = stickyHeaderFooter;
break reducibleJoin117;
}
reducibleJoin119: while (true) {
if (r13) {
type = property.type;
map = type !== 'FOOTER';
r13 = map;
break reducibleJoin119;
}
break reducibleJoin119;
}
reducibleJoin123: while (true) {
if (r13) {
layoutStart = footerDataCache.layoutStart;
reducibleJoin122: while (true) {
if (r17 < layoutStart) {
push = items4.push;
get = binding2.get;
SPACER = env1_19.SPACER;
layoutStart = footerDataCache.layoutStart;
layoutSize = footerDataCache.layoutSize;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [SPACER, r17,
layoutStart + layoutSize - r17,
value2,
1,
value15])]);
break reducibleJoin122;
}
break reducibleJoin122;
}
push = items4.push;
get = binding2.get;
FOOTER = env1_19.FOOTER;
layoutStart = footerDataCache.layoutStart;
layoutSize = footerDataCache.layoutSize;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [FOOTER, layoutStart, layoutSize, value2])]);
layoutStart = footerDataCache.layoutStart;
layoutSize = footerDataCache.layoutSize;
map = layoutStart + layoutSize;
r0 = map;
break reducibleJoin123;
}
r0 = r17;
break reducibleJoin123;
}
map = r0 + r5;
size = this.size;
reducibleJoin125: while (true) {
if (map < size) {
push = items4.push;
get = binding2.get;
SPACER = env1_19.SPACER;
size = this.size;
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [SPACER, map, size - map, value2, 1, 1])]);
break reducibleJoin125;
}
break reducibleJoin125;
}
map = _createForOfIteratorHelperLoose_65155(items3);
value62 = map();
done = value62.done;
if (done) {
break reducibleJoin129;
}
r3 = value62;
reducibleLoop126: while (true) {
value63 = r3.value;
value64 = env1_8(value63, 2);
property = value64[value15];
property4 = value64[1];
push = items4.push;
get = binding2.get;
type = property4.type;
layoutStart = property4.layoutStart;
layoutSize = property4.layoutSize;
section = property4.section;
type4 = property4.type;
ITEM = env1_19.ITEM;
reducibleJoin128: while (true) {
if (type4 !== ITEM) {
item = value2;
break reducibleJoin128;
}
item = property4.item;
break reducibleJoin128;
}
Reflect.apply(push, items4, [Reflect.apply(get, binding2, [type, layoutStart, layoutSize, property, section,
item])]);
value65 = map();
done = value65.done;
if (done) {
break reducibleJoin129;
}
r3 = value65;
continue reducibleLoop126;
}
}
const fill = binding2.fill;
const disableRecycling = this.disableRecycling;
reducibleJoin132: while (true) {
if (disableRecycling) {
r0 = disableRecycling;
break reducibleJoin132;
}
props = this.props;
disableRecyclingOnFullCompute = props.disableRecyclingOnFullCompute;
r5 = disableRecyclingOnFullCompute && r6;
r0 = r5;
break reducibleJoin132;
}
Reflect.apply(fill, binding2, [r0]);
return {size: this.size, items: items4};
function addInitialSection(a0, a1, a2, a3) { // fn#65185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:5926, owner: value_65184.addInitialSection, offset: 0x01bc6a57, size: 164 bytes, params: 5, frame: 27
var value4;
var binding5;
let binding = ObjectWithoutProperties;
let push = binding.push;
const get = PossibleConstructorReturn.get;
const binding3 = env2_19;
const SECTION = binding3.SECTION;
const binding4 = env0_3;
const SECTION2 = binding3.SECTION;
Reflect.apply(push, binding, [Reflect.apply(get, PossibleConstructorReturn, [SECTION, a1, a2, binding4(SECTION2, a0), a0])]);
const value3 = a1 + a2;
if (value3 < a3) {
binding = Module00017;
value4 = typeof binding === 'bigint' ? binding + 1n : +binding + 1;
binding = ObjectWithoutProperties;
push = binding.push;
binding5 = PossibleConstructorReturn;
Reflect.apply(push, binding, [binding5.get(env2_19.SPACER, value3, a3 - value3, undefined, 0, value4)]);
}
}
function value_65184IsVisible(a0, a1) { // fn#65186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:6070, owner: value_65184.isVisible, offset: 0x01bc6afb, size: 47 bytes, params: 3, frame: 5
const binding = env0_2;
return binding ? a0 >= env0_0 - a1 && a0 < require : !binding;
}
}
function value_65187() { // fn#65187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:10025, offset: 0x01bc6b2a, size: 991 bytes, params: 1, frame: 50
var environment;
var r15;
var r27;
var r32;
var r38;
var binding;
var value6;
var value7;
var property;
var sizeForSection;
var SECTION;
var size;
var value10;
var value11;
var value12;
var persistantItemData;
var uniform;
var sizeForItem;
var object2;
var ITEM;
var value14;
var value15;
var value16;
var value17;
var sizeForItem2;
var value19;
var sizeForSectionFooter;
var value21;
var SECTION_FOOTER;
var value22;
const props = this.props;
const sections = props.sections;
const insetStart = props.insetStart;
const value = 0;
const r3 = insetStart === undefined ? value : insetStart;
const insetEnd = props.insetEnd;
const r5 = insetEnd === undefined ? value : insetEnd;
const getRecyclerKey = props.getRecyclerKey;
const r20 = getRecyclerKey !== undefined ? getRecyclerKey : defaultRecyclerKey;
const Set = global.Set;
const set = new Set(this.props.persistantKeys);
this.persistantItemData = [];
let object = [];
this.dataCache = object;
this.chunkCache = undefined;
const env0_2 = this.chunkSize;
const env0_3 = r3;
this.headerDataCache = undefined;
this.footerDataCache = undefined;
const pushData2 = pushData;
const sizeForHeader = this.getSizeForHeader();
if (sizeForHeader > value) {
binding = env0_3;
value6 = binding + sizeForHeader;
value7 = environment.__proto__;
pushData2(binding, value6, {type: env1_19.HEADER, layoutStart: binding, layoutSize: sizeForHeader});
}
let length = sections.length;
if (value < length) {
r15 = value;
while (true) {
property = sections[r15];
if (value !== property) {
binding = env0_3;
sizeForSection = this.getSizeForSection(r15);
object = {};
SECTION = env1_19.SECTION;
object.type = SECTION;
object.layoutStart = binding;
object.layoutSize = sizeForSection;
object.section = r15;
size = set.size;
if (!(size > value)) {
continue;
}
SECTION = env1_19.SECTION;
value10 = r20(SECTION, r15);
value11 = value10 != null;
if (!value11) {
r27 = value11;
continue;
}
value12 = set.has(value10);
r27 = value12;
if (!r27) {
continue;
}
persistantItemData = this.persistantItemData;
persistantItemData.push(object);
set.delete(value10);
pushData2(binding, binding + sizeForSection, object);
uniform = this.uniform;
if (uniform) {
sizeForItem2 = this.getSizeForItem(r15, value);
binding = env0_3;
value19 = binding + sizeForItem2 * property;
ITEM = env1_19.ITEM;
pushData2(binding, value19, {type: ITEM, uniform: true, layoutStart: binding,
itemSize: sizeForItem2,
layoutSize: sizeForItem2 * property, section: r15, items: property, sectionData: object});
} else {
if (!(value < property)) {
continue;
}
r32 = value;
while (true) {
sizeForItem = this.getSizeForItem(r15, r32);
binding = env0_3;
object2 = {};
ITEM = env1_19.ITEM;
object2.type = ITEM;
object2.layoutStart = binding;
object2.layoutSize = sizeForItem;
object2.section = r15;
object2.item = r32;
object2.sectionData = object;
pushData2(binding, binding + sizeForItem, object2);
size = set.size;
if (size > value) {
ITEM = env1_19.ITEM;
value14 = r20(ITEM, r15, r32);
value15 = value14 != null;
if (!value15) {
r38 = value15;
continue;
}
value16 = set.has(value14);
r38 = value16;
if (r38) {
persistantItemData = this.persistantItemData;
persistantItemData.push(object2);
set.delete(value14);
break;
}
break;
}
value17 = typeof r32 === 'bigint' ? r32 + 1n : +r32 + 1;
if (value17 < property) {
r32 = value17;
continue;
}
break;
}
}
sizeForSectionFooter = this.getSizeForSectionFooter(r15);
if (sizeForSectionFooter > value) {
binding = env0_3;
value21 = binding + sizeForSectionFooter;
SECTION_FOOTER = env1_19.SECTION_FOOTER;
pushData2(binding, value21, {type: SECTION_FOOTER, layoutStart: binding,
layoutSize: sizeForSectionFooter,
section: r15, sectionData: object});
break;
}
break;
}
value22 = typeof r15 === 'bigint' ? r15 + 1n : +r15 + 1;
length = sections.length;
if (value22 < length) {
r15 = value22;
continue;
}
break;
}
}
const sizeForFooter = this.getSizeForFooter();
if (sizeForFooter > value) {
binding = env0_3;
pushData2(binding, binding + sizeForFooter, {type: env1_19.FOOTER, layoutStart: binding,
layoutSize: sizeForFooter});
}
this.size = PixelRatio.roundToNearestPixel(env0_3 + r5);
this.dirty = false;
function pushData(a0, a1, a2) { // fn#65188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:10388, owner: value_65187.pushData, offset: 0x01bc6f09, size: 267 bytes, params: 4, frame: 19
var r0;
var object;
env0_3 = env0_3 + (a1 - a0);
let Math = global.Math;
let max = Math.max;
const Math2 = global.Math;
const value3 = Reflect.apply(max, Math, [Math2.floor(a0 / chunkSize), 0]);
Math = global.Math;
max = Math.max;
const Math3 = global.Math;
const value5 = Reflect.apply(max, Math, [Math3.floor(a1 / chunkSize) - 1, value3]);
const chunk = env0_0.getChunk(value3);
if (chunk != null) {
r0 = chunk;
} else {
object = {start: value3, end: value5, data: []};
env0_1.push(object);
r0 = object;
}
const type = a2.type;
const HEADER = env2_19.HEADER;
if (type === HEADER) {
env0_0.headerDataCache = a2;
} else if (a2.type === env2_19.FOOTER) {
env0_0.footerDataCache = a2;
}
r0.end = value5;
r0.data.push(a2);
}
}
function value_65189(a0, a1) { // fn#65189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:11747, offset: 0x01bc7014, size: 272 bytes, params: 3, frame: 23
var r3;
var r10;
var fullCompute;
var value4;
var data;
var value5;
var value6;
var value7;
var type;
var ITEM;
var SECTION;
var section;
var uniform;
var item;
var value8;
var value9;
reducibleJoin2: while (true) {
if (this.dirty) {
fullCompute = this.fullCompute;
Reflect.apply(fullCompute, this, []);
break reducibleJoin2;
}
break reducibleJoin2;
}
const value2 = _createForOfIteratorHelperLoose_65155(this.dataCache);
const value3 = value2();
let done = value3.done;
if (!done) {
r3 = value3;
reducibleLoop3: while (true) {
value4 = r3.value;
_createForOfIteratorHelperLoose_65155Binding = _createForOfIteratorHelperLoose_65155;
data = value4.data;
value5 = _createForOfIteratorHelperLoose_65155Binding(data);
value6 = value5();
done = value6.done;
if (!done) {
r10 = value6;
reducibleLoop4: while (true) {
value7 = r10.value;
type = value7.type;
ITEM = env1_19.ITEM;
if (ITEM === type) {
reducibleJoin20: while (true) {
if (a1 == null) {
break reducibleJoin20;
}
uniform = value7.uniform;
if (uniform === true) {
reducibleJoin13: while (true) {
if (value7.section === a0) {
break reducibleLoop3;
}
break reducibleJoin13;
}
}
uniform = value7.uniform;
if (uniform != null) {
break reducibleJoin20;
}
section = value7.section;
if (section !== a0) {
break reducibleJoin20;
}
item = value7.item;
if (item === a1) {
return value4;
}
break reducibleJoin20;
}
} else {
SECTION = env1_19.SECTION;
reducibleJoin20: while (true) {
if (SECTION !== type) {
break reducibleJoin20;
}
section = value7.section;
if (section > a0) {
return undefined;
}
if (a1 == null) {
return value4;
}
break reducibleJoin20;
}
}
value8 = value5();
done = value8.done;
if (done) {
value9 = value2();
done = value9.done;
if (done) {
return undefined;
}
r3 = value9;
continue reducibleLoop3;
}
r10 = value8;
continue reducibleLoop4;
}
}
value9 = value2();
done = value9.done;
if (done) {
return undefined;
}
r3 = value9;
continue reducibleLoop3;
}
return a1 > value7.items ? undefined : value4;
}
}
function value_65190({chunk, targetSection, targetItem, padBottom}) { // fn#65190, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:12239, offset: 0x01bc7124, size: 571 bytes, params: 2, frame: 24
var r2;
var value;
var value4;
var type;
var ITEM;
var SECTION;
var section;
var object;
var Math;
var floor;
var layoutStart;
var chunkSize;
var layoutSize;
var uniform;
var item;
var itemSize;
var value5;
reducibleJoin2: while (true) {
if (padBottom !== undefined) {
break reducibleJoin2;
}
value = 16;
padBottom = value;
break reducibleJoin2;
}
value = environment.__proto__;
const value2 = _createForOfIteratorHelperLoose_65155(chunk.data);
const value3 = value2();
let done = value3.done;
if (!done) {
r2 = value3;
reducibleLoop3: while (true) {
value4 = r2.value;
type = value4.type;
ITEM = env1_19.ITEM;
if (ITEM === type) {
section = value4.section;
reducibleJoin20: while (true) {
if (section !== targetSection) {
break reducibleJoin20;
}
if (targetItem == null) {
break reducibleJoin20;
}
uniform = value4.uniform;
if (uniform) {
break reducibleLoop3;
}
item = value4.item;
if (item >= targetItem) {
return undefined;
}
item = value4.item;
if (item === targetItem) {
object = {};
Math = global.Math;
floor = Math.floor;
layoutStart = value4.layoutStart;
layoutSize = value4.sectionData.layoutSize;
value = layoutStart - layoutSize;
chunkSize = this.chunkSize;
object.startIndex = Reflect.apply(floor, Math, [value / chunkSize]);
Math = global.Math;
floor = Math.floor;
layoutStart = value4.layoutStart;
layoutSize = value4.layoutSize;
value = layoutStart + layoutSize + padBottom;
chunkSize = this.chunkSize;
object.endIndex = Reflect.apply(floor, Math, [value / chunkSize]);
return object;
}
break reducibleJoin20;
}
} else {
SECTION = env1_19.SECTION;
reducibleJoin20: while (true) {
if (SECTION !== type) {
break reducibleJoin20;
}
if (targetItem != null) {
break reducibleJoin20;
}
section = value4.section;
if (targetSection < section) {
return undefined;
}
section = value4.section;
if (targetSection === section) {
object = {};
Math = global.Math;
floor = Math.floor;
layoutStart = value4.layoutStart;
chunkSize = this.chunkSize;
object.startIndex = Reflect.apply(floor, Math, [layoutStart / chunkSize]);
Math = global.Math;
floor = Math.floor;
layoutStart = value4.layoutStart;
value = layoutStart + value4.layoutSize + padBottom;
chunkSize = this.chunkSize;
object.endIndex = Reflect.apply(floor, Math, [value / chunkSize]);
return object;
}
break reducibleJoin20;
}
}
value5 = value2();
done = value5.done;
if (done) {
return undefined;
}
r2 = value5;
continue reducibleLoop3;
}
if (targetItem >= value4.items) {
return undefined;
}
layoutStart = value4.layoutStart;
layoutSize = value4.sectionData.layoutSize;
value = layoutStart + layoutSize;
itemSize = value4.itemSize;
value += itemSize * targetItem;
object = {};
Math = global.Math;
floor = Math.floor;
chunkSize = this.chunkSize;
object.startIndex = Reflect.apply(floor, Math, [value / chunkSize]);
Math = global.Math;
floor = Math.floor;
itemSize = value4.itemSize;
value = value + itemSize + padBottom;
chunkSize = this.chunkSize;
object.endIndex = Reflect.apply(floor, Math, [value / chunkSize]);
return object;
}
}
function value_65191(a0, a1, a2) { // fn#65191, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:13089, offset: 0x01bc735f, size: 502 bytes, params: 4, frame: 25
var r2;
var r12;
var layoutSize;
var fullCompute;
var value5;
var data;
var value6;
var value7;
var value8;
var type;
var ITEM;
var SECTION;
var section;
var object;
var layoutStart;
var uniform;
var item;
var sectionData;
var items2;
var value9;
var itemSize;
var value10;
var value11;
if (a2 != null) {
reducibleJoin2: while (true) {
if (a2 < 0) {
return undefined;
}
break reducibleJoin2;
}
}
reducibleJoin4: while (true) {
if (this.dirty) {
fullCompute = this.fullCompute;
Reflect.apply(fullCompute, this, []);
break reducibleJoin4;
}
break reducibleJoin4;
}
const dataCache = this.dataCache;
const value = 0;
if (a1 < value) {
return {'scrollPosition': 0, 'size': 0, 'sectionOffset': 0};
}
const value3 = _createForOfIteratorHelperLoose_65155(dataCache);
const value4 = value3();
let done = value4.done;
if (!done) {
r2 = value4;
reducibleLoop6: while (true) {
_createForOfIteratorHelperLoose_65155Binding = _createForOfIteratorHelperLoose_65155;
value5 = r2.value;
data = value5.data;
value6 = _createForOfIteratorHelperLoose_65155Binding(data);
value7 = value6();
done = value7.done;
if (!done) {
r12 = value7;
reducibleLoop7: while (true) {
value8 = r12.value;
type = value8.type;
ITEM = env1_19.ITEM;
if (ITEM === type) {
reducibleJoin28: while (true) {
if (a2 == null) {
break reducibleJoin28;
}
uniform = value8.uniform;
if (uniform === true) {
reducibleJoin17: while (true) {
if (value8.section === a1) {
items2 = value8.items;
if (a2 > items2) {
return undefined;
}
object = {};
sectionData = value8.sectionData;
layoutStart = sectionData.layoutStart;
sectionData = value8.sectionData;
layoutSize = sectionData.layoutSize;
value9 = layoutStart + layoutSize;
itemSize = value8.itemSize;
object.scrollPosition = value9 + itemSize * a2;
itemSize = value8.itemSize;
object.size = itemSize;
reducibleJoin26: while (true) {
if (a0) {
sectionData = value8.sectionData;
layoutSize = sectionData.layoutSize;
break reducibleJoin26;
}
layoutSize = value;
break reducibleJoin26;
}
object.sectionOffset = layoutSize;
return object;
}
break reducibleJoin17;
}
}
uniform = value8.uniform;
if (uniform != null) {
break reducibleJoin28;
}
section = value8.section;
if (section !== a1) {
break reducibleJoin28;
}
item = value8.item;
if (item === a2) {
object = {};
object.scrollPosition = value8.layoutStart;
layoutSize = value8.layoutSize;
object.size = layoutSize;
if (a0) {
object.sectionOffset = value8.sectionData.layoutSize;
return object;
}
layoutSize = value;
object.sectionOffset = layoutSize;
return object;
}
break reducibleJoin28;
}
} else {
SECTION = env1_19.SECTION;
reducibleJoin28: while (true) {
if (SECTION !== type) {
break reducibleJoin28;
}
section = value8.section;
if (section > a1) {
return undefined;
}
if (a2 != null) {
break reducibleJoin28;
}
section = value8.section;
if (section === a1) {
return {scrollPosition: value8.layoutStart, size: value8.layoutSize,
sectionOffset: value};
}
break reducibleJoin28;
}
}
value10 = value6();
done = value10.done;
if (done) {
value11 = value3();
done = value11.done;
if (done) {
return undefined;
}
r2 = value11;
continue reducibleLoop6;
}
r12 = value10;
continue reducibleLoop7;
}
}
value11 = value3();
done = value11.done;
if (done) {
return undefined;
}
r2 = value11;
continue reducibleLoop6;
}
}
}
function value_65192(a0) { // fn#65192, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:13964, offset: 0x01bc7555, size: 212 bytes, params: 2, frame: 24
var r13;
var r7;
var r8;
var r4;
var r6;
var r1;
var r2;
var binding;
var fullCompute;
var value5;
var layoutStart;
var value6;
var get;
var recyclerKey;
var value7;
var layoutSize;
var value8;
var value9;
var value10;
let value = a1;
const value2 = undefined;
reducibleJoin2: while (true) {
if (value !== value2) {
r13 = value;
break reducibleJoin2;
}
value = environment.__proto__;
binding = env1_18;
r13 = binding;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (this.dirty) {
fullCompute = this.fullCompute;
Reflect.apply(fullCompute, this, []);
break reducibleJoin4;
}
break reducibleJoin4;
}
value = environment.__proto__;
const value3 = _createForOfIteratorHelperLoose_65155(this.items)();
let done = value3.done;
const value4 = 0;
if (done) {
r1 = value4;
r2 = value2;
} else {
r7 = value4;
r8 = value3;
reducibleLoop5: while (true) {
value5 = r8.value;
layoutStart = value5.layoutStart;
value6 = layoutStart + r7;
get = r13.get;
recyclerKey = value5.recyclerKey;
value7 = Reflect.apply(get, r13, [recyclerKey]);
reducibleJoin7: while (true) {
if (value7 != null) {
r4 = value7;
break reducibleJoin7;
}
layoutSize = value5.layoutSize;
r4 = layoutSize;
break reducibleJoin7;
}
if (r4 > value4) {
reducibleJoin10: while (true) {
if (a0 >= value6) {
if (a0 <= value6 + r4) {
value = (a0 - value6) / r4;
r1 = value;
r2 = value5;
break reducibleLoop5;
}
break reducibleJoin10;
}
break reducibleJoin10;
}
}
reducibleJoin12: while (true) {
if (value7 != null) {
layoutSize = value5.layoutSize;
value8 = value7 - layoutSize;
r6 = value8;
break reducibleJoin12;
}
r6 = value4;
break reducibleJoin12;
}
value9 = r7 + r6;
value10 = value();
done = value10.done;
if (done) {
r1 = value4;
r2 = value2;
break reducibleLoop5;
}
r7 = value9;
r8 = value10;
continue reducibleLoop5;
}
}
return {item: r2, positionPercentage: r1};
}
}
function FastListStickySectionRendererComponent(a0) { // fn#65196, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:14863, offset: 0x01bc7656, size: 615 bytes, params: 2, frame: 31
var r5;
var moduleValue;
const layoutStart = a0.layoutStart;
const layoutSize = a0.layoutSize;
const horizontal = a0.horizontal;
const nextSectionLayoutPosition = a0.nextSectionLayoutPosition;
const scrollPosValue = a0.scrollPosValue;
const fastListInstance = a0.fastListInstance;
const section = a0.section;
const children = a0.children;
a0.debug;
a0.recyclerKey;
const items2 = [];
let value = -1;
items2[0] = value;
const value2 = 0;
items2[1] = value2;
const items3 = [0, 0];
items2.push(layoutStart);
items3.push(value2);
const value3 = (nextSectionLayoutPosition ?? value2) - layoutSize;
if (value3 >= layoutStart) {
moduleValue = require(477) /* metro dependency 477: PlatformUtils */;
r5 = moduleValue.isAndroid() ? value : value2;
items2.push(value3, value3 + 1);
push = items3.push;
value = value3 - layoutStart + r5;
Reflect.apply(push, items3, [value, value3 - layoutStart + r5]);
} else {
items2.push(layoutStart + 1);
items3.push(1);
}
const value5 = undefined;
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
const FastListStickySectionRendererComponentV2 = FastListStickySectionRendererComponentV;
const object = {scrollPosValue: scrollPosValue};
object.interpolate = ReanimatedRexportModule.interpolate;
object.inputRange = items2;
object.outputRange = items3;
object.horizontal = horizontal;
FastListStickySectionRendererComponentV2.__closure = object;
FastListStickySectionRendererComponentV2.__workletHash = 699810682881;
FastListStickySectionRendererComponentV2.__initData = env0_22;
const value6 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [FastListStickySectionRendererComponentV2]);
const Children = env0_11.Children;
const value7 = Children.only(children(section, fastListInstance, scrollPosValue, layoutStart));
return ((Component) => <Component style={[value7 != null && 'props' in value7 ? value7.props.style : value5,
{'zIndex': 10, 'position': 'relative', height: horizontal ? value5 : layoutSize,
width: horizontal ? layoutSize : value5},
value6]} collapsable={false} preventClipping>{value7 != null ? env0_11.cloneElement(value7,
{style: {flex: 1}}) : value5}{false}</Component>)(importDefault(8141) /* metro dependency 8141: ReanimatedNativeView */);
function FastListStickySectionRendererComponentV() { // fn#65197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:15266, owner: FastListStickySectionRendererComponent.v, offset: 0x01bc78bd, size: 132 bytes, params: 1, frame: 18
var r4;
var r1;
var value3;
var moduleValue;
var horizontalBinding;
var object2;
const scrollPosValueBinding = scrollPosValue;
const value2 = null;
if (value2 != scrollPosValueBinding) {
value3 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
r4 = moduleValue.interpolate(scrollPosValue.get(), env0_2, env0_3);
} else {
r4 = value2;
}
if (value2 != r4) {
horizontalBinding = horizontal;
object2 = {};
if (horizontalBinding) {
object2.translateX = r4;
} else {
object2.translateY = r4;
}
r1 = [object2];
} else {
r1 = undefined;
}
return {transform: r1};
}
}
function _FastListSectionRenderer(a0) { // fn#65198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:15837, offset: 0x01bc7941, size: 191 bytes, params: 2, frame: 22
var r0;
var value;
var object2;
const layoutSize = a0.layoutSize;
const horizontal = a0.horizontal;
const disableWrapper = a0.disableWrapper;
const children = a0.children;
const fastListInstance = a0.fastListInstance;
const section = a0.section;
const debug = a0.debug;
a0.recyclerKey;
if (disableWrapper) {
if (debug) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
value = ((Component) => <Component collapsable={false} style={object2} preventClipping>{children(section,
fastListInstance)}{false}</Component>)(value);
r0 = value;
} else {
r0 = (
<>
{children(section, fastListInstance)}
</>
);
}
} else {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
value = ((Component) => <Component collapsable={false} style={object2} preventClipping>{children(section,
fastListInstance)}{false}</Component>)(value);
r0 = value;
}
return r0;
}
function _FastListSectionFooterRenderer(a0) { // fn#65199, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:16130, offset: 0x01bc7a00, size: 182 bytes, params: 2, frame: 22
var r0;
var value;
var object2;
const layoutSize = a0.layoutSize;
const horizontal = a0.horizontal;
const disableWrapper = a0.disableWrapper;
const fastListInstance = a0.fastListInstance;
const children = a0.children;
const section = a0.section;
const debug = a0.debug;
a0.recyclerKey;
if (disableWrapper) {
if (debug) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
value = ((Component) => <Component collapsable={false} style={object2}>{children(section,
fastListInstance)}{false}</Component>)(value);
r0 = value;
} else {
r0 = (
<>
{children(section, fastListInstance)}
</>
);
}
} else {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
value = ((Component) => <Component collapsable={false} style={object2}>{children(section,
fastListInstance)}{false}</Component>)(value);
r0 = value;
}
return r0;
}
function _FastListItemRenderer(a0) { // fn#65200, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:16410, offset: 0x01bc7ab6, size: 188 bytes, params: 2, frame: 24
var r0;
var value;
var defaultImport;
var object2;
const layoutSize = a0.layoutSize;
const horizontal = a0.horizontal;
const disableWrapper = a0.disableWrapper;
const children = a0.children;
const section = a0.section;
const fastListInstance = a0.fastListInstance;
const item = a0.item;
const debug = a0.debug;
a0.recyclerKey;
if (disableWrapper) {
if (debug) {
value = undefined;
defaultImport = importDefault(6821) /* metro dependency 6821: NativeView */;
object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
value = ((Component) => <Component collapsable={false} style={object2}>{children == null ? value : children(section,
item, fastListInstance)}{false}</Component>)(defaultImport);
r0 = value;
} else {
r0 = children?.(section, item, fastListInstance);
}
} else {
value = undefined;
defaultImport = importDefault(6821) /* metro dependency 6821: NativeView */;
object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
value = ((Component) => <Component collapsable={false} style={object2}>{children == null ? value : children(section,
item, fastListInstance)}{false}</Component>)(defaultImport);
r0 = value;
}
return r0;
}
function _FastListHeaderFooterRenderer(a0) { // fn#65201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:16706, offset: 0x01bc7b72, size: 183 bytes, params: 2, frame: 21
var r0;
var value;
var object2;
const layoutSize = a0.layoutSize;
const horizontal = a0.horizontal;
const disableWrapper = a0.disableWrapper;
const children = a0.children;
const fastListInstance = a0.fastListInstance;
const debug = a0.debug;
a0.recyclerKey;
if (disableWrapper) {
if (debug) {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
value = ((Component) => <Component collapsable={false} style={object2} preventClipping>{children(fastListInstance)}{false}</Component>)(value);
r0 = value;
} else {
r0 = (
<>
{children(fastListInstance)}
</>
);
}
} else {
value = importDefault(6821) /* metro dependency 6821: NativeView */;
object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
value = ((Component) => <Component collapsable={false} style={object2} preventClipping>{children(fastListInstance)}{false}</Component>)(value);
r0 = value;
}
return r0;
}
function _FastListSpacer({layoutSize, horizontal}) { // fn#65202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:16990, offset: 0x01bc7c29, size: 86 bytes, params: 2, frame: 17
const object2 = {};
if (horizontal) {
object2.width = layoutSize;
} else {
object2.height = layoutSize;
}
return ((Component) => <Component collapsable={false} style={object2} />)(NativeView);
}
function _fun65203() { // fn#65203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:17402, offset: 0x01bc7c7f, size: 180 bytes, params: 1, frame: 15
return CreateClass(FastListScrollAnchor, [{key: 'hasAnchor', value: function() {
return this.anchorId != null;
}}, {key: 'cleanAnchor', value: function() {
var r2;
var value = a0;
r2 = value !== undefined ? value : false;
r2 = !r2 && this.isCustomAnchor;
if (!r2) {
this.isCustomAnchor = false;
this.anchorId = undefined;
this.anchorOffset = undefined;
}
}}, {key: 'handleUserScroll', value: function() {
this.cleanAnchor(true);
}}, {key: 'setCustomAnchor', value: function(a0, a1, a2, a3) {
this.isCustomAnchor = true;
this.anchorOffset = a1;
this.anchorId = a0(a2, a3);
if (this.anchorId == null) {
this.cleanAnchor(true);
}
}}, {key: 'findOrUpdateAnchor', value: value_65209}, {key: 'getAnchorIndex', value: function(a0) {
var value;
if (this.anchorId != null) {
value = a0(this.anchorId);
this.cleanAnchor();
return value;
}
}}]);
function FastListScrollAnchor(a0) { // fn#65204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:17423, offset: 0x01bc7d33, size: 44 bytes, params: 2, frame: 13
env1_9(this, FastListScrollAnchor);
this.getScrollPosition = a0;
this.isCustomAnchor = false;
}
function value_65209(a0, a1) { // fn#65209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:17988, offset: 0x01bc7dfb, size: 271 bytes, params: 3, frame: 26
var r6;
var r4;
var value5;
var type;
var ITEM;
var isCustomAnchor;
var anchorId;
var section;
var item;
var value6;
var layoutStart;
var value7;
let value = this.getScrollPosition();
this.cleanAnchor();
const value3 = _createForOfIteratorHelperLoose_65155(a1);
const value4 = value3();
let done = value4.done;
if (!done) {
r6 = value4;
reducibleLoop1: while (true) {
value5 = r6.value;
type = value5.type;
ITEM = env1_19.ITEM;
if (type === ITEM) {
isCustomAnchor = this.isCustomAnchor;
reducibleJoin9: while (true) {
reducibleJoin5: while (true) {
if (isCustomAnchor) {
anchorId = this.anchorId;
section = value5.section;
item = value5.item;
value6 = 0;
r4 = item ?? value6;
if (anchorId === a0(section, r4)) {
this.anchorOffset = value5.layoutStart - value;
return undefined;
}
break reducibleJoin5;
}
break reducibleJoin5;
}
isCustomAnchor = this.isCustomAnchor;
if (isCustomAnchor) {
break reducibleJoin9;
}
layoutStart = value5.layoutStart;
if (layoutStart >= value) {
break reducibleLoop1;
}
break reducibleJoin9;
}
}
value7 = value3();
done = value7.done;
if (done) {
return undefined;
}
r6 = value7;
continue reducibleLoop1;
}
layoutStart = value5.layoutStart;
this.anchorOffset = layoutStart - value;
section = value5.section;
item = value5.item;
value = 0;
this.anchorId = a0(section, item ?? value);
}
}
}
function _fun65211(a0) { // fn#65211, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:18936, offset: 0x01bc7f39, size: 495 bytes, params: 2, frame: 17
const FastList2 = FastList;
Inherits(FastList2, a0);
return CreateClass(FastList2, [{key: 'computeScrollPosition', value: function(a0, a1) {
return this.state.fastListComputer.computeScrollPosition(false, a0, a1);
}}, {key: 'getInitialState', value: value_65229}, {key: 'componentDidMount', value: value_65230},
{key: 'getSnapshotBeforeUpdate', value: value_65232}, {key: 'componentDidUpdate', value: value_65233},
{key: 'getViewabilityConfig', value: function() {
var property = this.props.viewabilityConfig;
var value = undefined;
return {minimumViewTime: (property == null ? value : property.minimumViewTime) ?? 1000,
visibilityThreshold: (property == null ? value : property.visibilityThreshold) ?? 0.5};
}}, {key: 'queueViewabilityChange', value: function() {
var minimumViewTime;
if (this.props.onViewableItemsChanged != null) {
minimumViewTime = this.getViewabilityConfig().minimumViewTime;
global.clearTimeout(this.viewabilityDebounce);
this.viewabilityDebounce = global.setTimeout(this.handleViewabilityChange, minimumViewTime);
}
}}, {key: 'reset', value: function() {
var chunkBase = this.props.chunkBase;
var state = this.state;
if (!state.isFirstLayout) {
this.setState(this.getInitialState(chunkBase ?? 0, state.fastListComputer, false, state.items));
}
}}, {key: 'componentWillUnmount', value: function() {
var property = this.worklet;
if (property != null) {
property.unregisterFromEvents(this.viewTag);
}
if (this.deferredCompute !== -1) {
global.cancelAnimationFrame(this.deferredCompute);
}
if (this.viewabilityDebounce !== -1) {
global.clearTimeout(this.viewabilityDebounce);
}
}}, {key: 'anchorScroll', value: value_65239}, {key: 'getSectionItemFromPosition', value: function(a0, a1) {
return this.state.fastListComputer.getSectionItemFromPosition(a0, a1);
}}, {key: 'getScrollPositionFromEvent', value: function(a0) {
var property = this.props.horizontal;
var contentOffset = a0.nativeEvent.contentOffset;
return property ? contentOffset.x : contentOffset.y;
}}, {key: 'restoreScrollPosition', value: value_65242}, {key: 'computeBlocks', value: value_65244},
{key: 'renderItems', value: value_65245}, {key: 'isEmpty', value: function() {
return this.props.sections.reduce(_fun65254, 0) === 0;
}}, {key: 'setDisableRecycling', value: function(a0) {
this.state.fastListComputer.setDisableRecycling(a0);
}}, {key: 'render', value: value_65256}], [{key: 'getDerivedStateFromProps', value: value_65257}]);
function FastList(a0) { // fn#65212, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:18948, offset: 0x01bc8128, size: 914 bytes, params: 2, frame: 29
var environment;
var visibilityThreshold;
const value = environment.__proto__;
let binding = env1_9;
binding(this, FastList);
const items2 = [a0];
const value3 = env1_6(FastList);
const value6 = env1_5(this, _isNativeReflectConstruct_65152() ? global.Reflect.construct(value3, items2,
env1_6(this).constructor) : value3.apply(this, items2));
const value7 = 0;
value6.containerSize = value7;
value6.scrollPos = value7;
value6.scrollPosValue = (require(8142) /* metro dependency 8142: ReanimatedHelperTypes */).createFakeSharedValue(value7);
let props = value6.props;
value6.scrollView = props.manualRef ?? env1_11.createRef();
value6.getItems = getItems_65213;
value6.getScrollPosition = getScrollPosition_65214;
value6.disableAnchoringTimeout = undefined;
value6.viewTag = null;
value6.workletMounted = (require(4017) /* metro dependency 4017: ReanimatedRexport */).makeMutable(false);
value6.deferredCompute = -1;
value6.deferNextCompute = false;
binding = env1_29;
const getScrollPosition = value6.getScrollPosition;
const value8 = Object.create(binding.prototype, {constructor: {value: binding}});
const binding2 = new binding(getScrollPosition);
value6.scrollAnchor = binding2 instanceof Object ? binding2 : value8;
value6.viewabilityDebounce = -1;
value6.previouslyViewableItems = [];
value6._scrollPositionToPoint = _scrollPositionToPoint;
value6._calculateScrollPosition = _calculateScrollPosition;
props = value6.props;
const chunkBase = props.chunkBase;
const headerSize = props.headerSize;
const footerSize = props.footerSize;
const sectionSize = props.sectionSize;
const itemSize = props.itemSize;
const sectionFooterSize = props.sectionFooterSize;
const sections = props.sections;
const insetStart = props.insetStart;
const insetEnd = props.insetEnd;
const stickyHeaderFooter = props.stickyHeaderFooter;
const getRecyclerKey = props.getRecyclerKey;
let value11 = new env1_21({headerSize: headerSize, footerSize: footerSize, sectionSize: sectionSize,
itemSize: itemSize, sectionFooterSize: sectionFooterSize, sections: sections, insetStart: insetStart,
insetEnd: insetEnd, stickyHeaderFooter: stickyHeaderFooter, getRecyclerKey: getRecyclerKey,
persistantKeys: props.persistantKeys, disableRecyclingOnFullCompute: props.disableRecyclingOnFullCompute});
value6.state = value6.getInitialState(chunkBase ?? value7, value11, true);
value6.handleViewabilityChange = handleViewabilityChange;
value6.isVisible = isVisible_65218;
value6.scrollToTop = scrollToTop_65219;
value6.scrollToLocation = scrollToLocation;
value6.scrollTo = scrollTo_65221;
value6.handleScroll = handleScroll;
value6.handleLayout = handleLayout_65225;
value6.handleMomentumScrollEnd = handleMomentumScrollEnd;
value6.handleScrollBeginDrag = handleScrollBeginDrag;
props = value6.props;
const batchesToRender = props.batchesToRender;
const getAnchorIdFromIndex = props.getAnchorIdFromIndex;
const getAnchorIndexFromId = props.getAnchorIndexFromId;
if (batchesToRender < 5) {
throw new global.Error('FastList: `batchesToRender` must be >= 6');
}
if (getAnchorIdFromIndex != null) {
if (getAnchorIdFromIndex == null) {
throw new global.Error('FastList: You must define BOTH `getAnchorIndexFromId` and `getAnchorIdFromIndex`, or neither');
}
if (getAnchorIndexFromId != null) {
value11 = value6.getViewabilityConfig();
if (value11.minimumViewTime <= value7) {
throw new global.Error('FastList: `viewabilityConfig.minimumViewTime` must be greater than 0');
}
visibilityThreshold = value11.visibilityThreshold;
if (visibilityThreshold <= value7) {
throw new global.Error('FastList: `viewabilityConfig.visibilityThreshold` must be floating point value greater than 0 and less than 1');
}
visibilityThreshold = value11.visibilityThreshold;
if (visibilityThreshold > 1) {
throw new global.Error('FastList: `viewabilityConfig.visibilityThreshold` must be floating point value greater than 0 and less than 1');
}
return value6;
}
throw new global.Error('FastList: You must define BOTH `getAnchorIndexFromId` and `getAnchorIdFromIndex`, or neither');
}
if (getAnchorIndexFromId == null) {
value11 = value6.getViewabilityConfig();
if (value11.minimumViewTime <= value7) {
throw new global.Error('FastList: `viewabilityConfig.minimumViewTime` must be greater than 0');
}
visibilityThreshold = value11.visibilityThreshold;
if (visibilityThreshold <= value7) {
throw new global.Error('FastList: `viewabilityConfig.visibilityThreshold` must be floating point value greater than 0 and less than 1');
}
visibilityThreshold = value11.visibilityThreshold;
if (visibilityThreshold > 1) {
throw new global.Error('FastList: `viewabilityConfig.visibilityThreshold` must be floating point value greater than 0 and less than 1');
}
return value6;
}
if (getAnchorIdFromIndex == null) {
throw new global.Error('FastList: You must define BOTH `getAnchorIndexFromId` and `getAnchorIdFromIndex`, or neither');
}
if (getAnchorIndexFromId != null) {
value11 = value6.getViewabilityConfig();
if (value11.minimumViewTime <= value7) {
throw new global.Error('FastList: `viewabilityConfig.minimumViewTime` must be greater than 0');
}
visibilityThreshold = value11.visibilityThreshold;
if (visibilityThreshold <= value7) {
throw new global.Error('FastList: `viewabilityConfig.visibilityThreshold` must be floating point value greater than 0 and less than 1');
}
visibilityThreshold = value11.visibilityThreshold;
if (visibilityThreshold > 1) {
throw new global.Error('FastList: `viewabilityConfig.visibilityThreshold` must be floating point value greater than 0 and less than 1');
}
return value6;
}
const Error = global.Error;
throw new Error('FastList: You must define BOTH `getAnchorIndexFromId` and `getAnchorIdFromIndex`, or neither');
function FastListGetItems() { // fn#65213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:19329, owner: FastList.getItems, offset: 0x01bc84ba, size: 20 bytes, params: 1, frame: 1
return env0_0.state.items;
}
function FastListGetScrollPosition() { // fn#65214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:19367, owner: FastList.getScrollPosition, offset: 0x01bc84ce, size: 15 bytes, params: 1, frame: 1
return env0_0.scrollPos;
}
function _scrollPositionToPoint(a0) { // fn#65215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:19638, owner: FastList._scrollPositionToPoint, offset: 0x01bc84dd, size: 49 bytes, params: 2, frame: 6
const value = a0;
const horizontal = env0_0.props.horizontal;
const value3 = 0;
return {x: horizontal ? value : value3, y: horizontal ? value3 : value};
}
function _calculateScrollPosition({itemCoords, fullSize, orientation, paddingStart, paddingEnd}) { // fn#65216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:19719, owner: FastList._calculateScrollPosition, offset: 0x01bc850e, size: 382 bytes, params: 2, frame: 25
var r6;
var value;
var Math;
var floor;
var max;
var Math2;
orientation = orientation === undefined ? 'top' : orientation;
paddingStart = paddingStart === undefined ? 0 : paddingStart;
paddingEnd = paddingEnd === undefined ? 0 : paddingEnd;
let scrollPosition = itemCoords.scrollPosition;
const size = itemCoords.size;
const sectionOffset = itemCoords.sectionOffset;
const r0 = env0_0.containerSize > 0 ? env0_0.containerSize : env0_0.props.chunkBase ?? 0;
orientation = size >= r0 ? 'top' : orientation;
if (orientation === 'visible') {
if (scrollPosition + sectionOffset >= env0_0.scrollPos + paddingStart) {
if (scrollPosition + size <= env0_0.scrollPos + (r0 - paddingEnd)) {
return null;
}
r6 = size > r0 || scrollPosition < env0_0.scrollPos ? scrollPosition - (sectionOffset + paddingStart) : scrollPosition + size + paddingEnd - r0;
Math = global.Math;
max = Math.max;
Math2 = global.Math;
return Reflect.apply(max, Math, [0, Math2.min(r6, fullSize - r0)]);
}
r6 = size > r0 || scrollPosition < env0_0.scrollPos ? scrollPosition - (sectionOffset + paddingStart) : scrollPosition + size + paddingEnd - r0;
} else if (orientation === 'top') {
r6 = scrollPosition - (sectionOffset + paddingStart);
} else if (orientation !== 'center') {
r6 = scrollPosition;
} else {
scrollPosition = itemCoords.scrollPosition;
Math = global.Math;
floor = Math.floor;
value = scrollPosition + Reflect.apply(floor, Math, [itemCoords.size / 2]);
Math = global.Math;
floor = Math.floor;
value -= Reflect.apply(floor, Math, [r0 / 2]);
r6 = value;
}
Math = global.Math;
max = Math.max;
Math2 = global.Math;
return Reflect.apply(max, Math, [0, Math2.min(r6, fullSize - r0)]);
}
function handleViewabilityChange() { // fn#65217, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:20716, owner: FastList.handleViewabilityChange, offset: 0x01bc868c, size: 303 bytes, params: 1, frame: 26
var r6;
var binding;
var visibilityThreshold;
var items3;
var scrollPos;
var value2;
var items2;
var value3;
var value4;
var value5;
var done;
var value6;
var layoutStart;
var Math;
var max;
var value7;
var min;
var layoutSize;
var value8;
var value9;
var push;
var recyclerKey;
var value10;
var moduleValue;
const onViewableItemsChanged = env0_0.props.onViewableItemsChanged;
if (onViewableItemsChanged != null) {
binding = env0_0;
visibilityThreshold = binding.getViewabilityConfig().visibilityThreshold;
items3 = binding.state.items;
scrollPos = binding.scrollPos;
value2 = binding.scrollPos + binding.containerSize;
items2 = [];
value3 = environment.__proto__.__proto__;
value4 = _createForOfIteratorHelperLoose_65155(items3);
value5 = value4();
done = value5.done;
if (!done) {
r6 = value5;
while (true) {
value6 = r6.value;
layoutStart = value6.layoutStart;
if (layoutStart > value2) {
break;
}
Math = global.Math;
max = Math.max;
layoutStart = value6.layoutStart;
value7 = Reflect.apply(max, Math, [layoutStart, scrollPos]);
Math = global.Math;
min = Math.min;
layoutStart = value6.layoutStart;
layoutSize = value6.layoutSize;
value8 = Reflect.apply(min, Math, [layoutStart + layoutSize, value2]);
if (value7 >= value8) {
continue;
}
value9 = value8 - value7;
layoutSize = value6.layoutSize;
if (!(value9 / layoutSize >= visibilityThreshold)) {
continue;
}
push = items2.push;
recyclerKey = value6.recyclerKey;
Reflect.apply(push, items2, [recyclerKey]);
value10 = value4();
done = value10.done;
if (done) {
break;
}
r6 = value10;
continue;
}
}
moduleValue = require(628) /* metro dependency 628: shallowEqual */;
if (!moduleValue.areArraysShallowEqual(items2, env0_0.previouslyViewableItems)) {
env0_0.previouslyViewableItems = items2;
onViewableItemsChanged(items2);
}
}
}
function FastListIsVisible(a0) { // fn#65218, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:21224, owner: FastList.isVisible, offset: 0x01bc87bb, size: 77 bytes, params: 2, frame: 5
const value = a1;
const value2 = a2;
return a0 >= env0_0.scrollPos + (value !== undefined ? value : 0) && a0 <= env0_0.scrollPos + env0_0.containerSize - (value2 !== undefined ? value2 : 0);
}
function FastListScrollToTop() { // fn#65219, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:21302, owner: FastList.scrollToTop, offset: 0x01bc8808, size: 79 bytes, params: 1, frame: 15
var r1;
var r3;
var current;
let value = a0;
const r4 = !(value !== undefined) || value;
const scrollView = env0_0.scrollView;
value = scrollView == null;
if (value) {
r1 = value;
r3 = scrollView;
} else {
current = scrollView.current;
r1 = current == null;
r3 = current;
}
if (!r1) {
r3.scrollTo({'x': 0, 'y': 0, animated: r4});
}
}
function scrollToLocation({section, item, animated, orientation, paddingStart, paddingEnd, setAnchor}) { // fn#65220, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:21415, owner: FastList.scrollToLocation, offset: 0x01bc8857, size: 446 bytes, params: 2, frame: 28
var r18;
var scrollAnchor;
var scrollTo;
animated = !(animated === undefined) && animated;
orientation = orientation === undefined ? 'top' : orientation;
paddingStart = paddingStart === undefined ? 0 : paddingStart;
paddingEnd = paddingEnd === undefined ? 0 : paddingEnd;
setAnchor = !(setAnchor === undefined) && setAnchor;
const current = env0_0.scrollView.current;
if (current == null) {
return false;
}
let binding = env0_0;
const {getAnchorIdFromIndex, stickySectionsVariant} = binding.props;
const value2 = 'default';
const r1 = stickySectionsVariant === undefined ? value2 : stickySectionsVariant;
const fastListComputer = binding.state.fastListComputer;
const scrollPosition = fastListComputer.computeScrollPosition(value2 === r1, section, item);
if (scrollPosition == null) {
return false;
}
if (orientation === 'visible') {
binding = env0_0;
if (binding.isVisible(scrollPosition.scrollPosition, paddingStart, paddingEnd)) {
return false;
}
}
binding = env0_0;
const _calculateScrollPosition = binding._calculateScrollPosition;
let object = {itemCoords: scrollPosition};
object.fullSize = fastListComputer.getSize();
object.orientation = orientation;
object.paddingStart = paddingStart;
object.paddingEnd = paddingEnd;
const value3 = Reflect.apply(_calculateScrollPosition, binding, [object]);
if (!animated && setAnchor && getAnchorIdFromIndex != null) {
scrollAnchor = env0_0.scrollAnchor;
scrollAnchor.setCustomAnchor(getAnchorIdFromIndex, scrollPosition.scrollPosition - (value3 ?? 0), section,
item);
r18 = section;
}
let r0 = value3 != null && value3 !== env0_0.scrollPos;
if (r0) {
if (!animated) {
binding = env0_0;
binding.scrollPos = value3;
binding.computeBlocks();
}
scrollTo = current.scrollTo;
object = {};
binding = env0_0;
copyDataProperties(object, binding._scrollPositionToPoint(value3), r18);
object['animated'] = animated;
Reflect.apply(scrollTo, current, [object]);
r0 = true;
}
return r0;
}
function FastListScrollTo(a0) { // fn#65221, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:22152, owner: FastList.scrollTo, offset: 0x01bc8a15, size: 151 bytes, params: 2, frame: 18
var r1;
var r0;
var scrollTo;
var object;
const value = a1;
const r6 = value !== undefined ? value : false;
let binding = env0_0;
const current = binding.scrollView.current;
const fastListComputer = binding.state.fastListComputer;
const value2 = current != null;
if (value2) {
r1 = a0 <= fastListComputer.getSize() - env0_0.containerSize && a0 !== env0_0.scrollPos;
if (r1) {
scrollTo = current.scrollTo;
object = {};
binding = env0_0;
copyDataProperties(object, binding._scrollPositionToPoint(a0), a0);
object['animated'] = r6;
Reflect.apply(scrollTo, current, [object]);
r1 = true;
}
r0 = r1;
} else {
r0 = value2;
}
return r0;
}
function handleScroll(a0) { // fn#65222, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:22365, owner: FastList.handleScroll, offset: 0x01bc8aac, size: 611 bytes, params: 2, frame: 30
var r10;
var clearTimeout;
var contentSize;
var value7;
var value8;
var value9;
let binding = env0_0;
const {contentInset, horizontal, onScroll, onEndReached, endReachedThreshold,
EXPERIMENTAL_enableAnchorWhileScrolling} = binding.props;
const r13 = EXPERIMENTAL_enableAnchorWhileScrolling !== undefined && EXPERIMENTAL_enableAnchorWhileScrolling;
const {fastListComputer, hasReachedEndBefore} = binding.state;
const layoutMeasurement = a0.nativeEvent.layoutMeasurement;
const r9 = horizontal ? layoutMeasurement.width : layoutMeasurement.height;
const r15 = horizontal ? contentInset.left : contentInset.top;
const value3 = 0;
const r2 = r15 ?? value3;
const r6 = (horizontal ? contentInset.right : contentInset.bottom) ?? value3;
binding = env0_0;
binding.containerSize = r9 - r2 - r6;
let Math = global.Math;
const min = Math.min;
const Math2 = global.Math;
const max = Math2.max;
const getScrollPositionFromEvent = binding.getScrollPositionFromEvent;
const value6 = Reflect.apply(min, Math, [Reflect.apply(max, Math2, [value3,
Reflect.apply(getScrollPositionFromEvent, binding, [a0])]), fastListComputer.getSize() - binding.containerSize]);
binding.scrollPos = value6;
if (onScroll != null) {
onScroll(a0);
}
const deferNextCompute = env0_0.deferNextCompute;
binding = env0_0;
if (deferNextCompute) {
binding.deferNextCompute = false;
if (binding.deferredCompute !== -1) {
global.cancelAnimationFrame(env0_0.deferredCompute);
}
binding = env0_0;
binding.deferredCompute = global.requestAnimationFrame(_fun65223);
} else {
binding.computeBlocks();
}
if (!r13) {
clearTimeout = global.clearTimeout;
binding = env0_0;
clearTimeout(binding.disableAnchoringTimeout);
binding.disableAnchoringTimeout = global.setTimeout(_fun65224, 100);
}
if (onEndReached != null) {
contentSize = a0.nativeEvent.contentSize;
r10 = horizontal ? contentSize.width : contentSize.height;
Math = global.Math;
value7 = Math.ceil(r10 - (endReachedThreshold ?? value3) - r9);
Math = global.Math;
value8 = Math.ceil(value6);
value9 = value8 >= value7;
if (value9) {
if (hasReachedEndBefore) {
if (!value9 && hasReachedEndBefore) {
env0_0.setState({hasReachedEndBefore: false});
}
} else {
env0_0.setState({hasReachedEndBefore: true});
onEndReached({distanceFromEnd: value8 - value7});
}
} else if (!value9 && hasReachedEndBefore) {
env0_0.setState({hasReachedEndBefore: false});
}
}
env0_0.queueViewabilityChange();
function _fun65223() { // fn#65223, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:23027, offset: 0x01bc8d0f, size: 19 bytes, params: 1, frame: 9
return env1_0.computeBlocks();
}
function _fun65224() { // fn#65224, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:23152, offset: 0x01bc8d22, size: 36 bytes, params: 1, frame: 12
const clearTimeout = global.clearTimeout;
const binding = env1_0;
clearTimeout(binding.disableAnchoringTimeout);
binding.disableAnchoringTimeout = undefined;
}
}
function FastListHandleLayout(a0) { // fn#65225, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:23530, owner: FastList.handleLayout, offset: 0x01bc8d46, size: 275 bytes, params: 2, frame: 24
const nativeEvent = a0.nativeEvent;
let binding = env0_0;
const {isFirstLayout, fastListComputer} = binding.state;
const {contentInset, onLayout, horizontal, chunkBase} = binding.props;
const layout = nativeEvent.layout;
const r10 = horizontal ? layout.width : layout.height;
const r12 = horizontal ? contentInset.left : contentInset.top;
const value2 = 0;
env0_0.containerSize = r10 - (r12 ?? value2) - ((horizontal ? contentInset.right : contentInset.bottom) ?? value2);
if (chunkBase == null) {
fastListComputer.setInfo(env0_0.containerSize);
}
if (onLayout != null) {
onLayout(a0, env0_0);
}
if (isFirstLayout) {
if (chunkBase == null) {
binding = env0_0;
binding.setState(binding.getInitialState(binding.containerSize, fastListComputer, false));
} else {
env0_0.computeBlocks();
}
} else {
env0_0.computeBlocks();
}
env0_0.queueViewabilityChange();
}
function handleMomentumScrollEnd(a0) { // fn#65226, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:23990, owner: FastList.handleMomentumScrollEnd, offset: 0x01bc8e59, size: 38 bytes, params: 2, frame: 11
const onScrollEnd = env0_0.props.onScrollEnd;
if (onScrollEnd != null) {
onScrollEnd(a0);
}
}
function handleScrollBeginDrag(a0) { // fn#65227, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:24059, owner: FastList.handleScrollBeginDrag, offset: 0x01bc8e7f, size: 69 bytes, params: 2, frame: 12
const binding = env0_0;
binding.scrollAnchor.handleUserScroll();
if (binding.props.onScrollBeginDrag != null) {
env0_0.props.onScrollBeginDrag(a0);
}
}
}
function value_65229(a0, a1, a2) { // fn#65229, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:24976, offset: 0x01bc8ee9, size: 613 bytes, params: 4, frame: 32
var r22;
var r13;
var r2;
var r15;
var r7;
var r1;
var object;
var scrollPosition;
var _calculateScrollPosition;
var value6;
var value10;
var batchSize2;
var value13;
var block;
var batchSize;
var blockStart;
var value14;
var moduleValue;
let value = a3;
const value2 = undefined;
const r10 = value !== value2 ? value : [];
const props = this.props;
const batchesToRender = props.batchesToRender;
const initialScrollSection = props.initialScrollSection;
value = 0;
const r19 = value2 === initialScrollSection ? value : initialScrollSection;
const initialScrollItem = props.initialScrollItem;
const initialScrollOrientation = props.initialScrollOrientation;
const r18 = value2 === initialScrollOrientation ? 'visible' : initialScrollOrientation;
const initialScrollStart = props.initialScrollStart;
const stickySectionsVariant = props.stickySectionsVariant;
const value4 = 'default';
let r5 = value2 === stickySectionsVariant ? value4 : stickySectionsVariant;
const horizontal = props.horizontal;
let r12 = value2 !== horizontal && horizontal;
const scrollPosValue = props.scrollPosValue;
a1.setInfo(a0);
let r6 = initialScrollStart ?? value;
if (initialScrollStart != null) {
r2 = this._scrollPositionToPoint(initialScrollStart);
r15 = r6;
} else if (r19 > value) {
if (a0 > value) {
scrollPosition = a1.computeScrollPosition(value4 === r5, r19, initialScrollItem);
if (scrollPosition != null) {
_calculateScrollPosition = this._calculateScrollPosition;
object = {itemCoords: scrollPosition};
object.fullSize = a1.getSize();
object.orientation = r18;
object.paddingEnd = 16;
value6 = Reflect.apply(_calculateScrollPosition, this, [object]);
r13 = value6 ?? scrollPosition.scrollPosition - scrollPosition.sectionOffset;
if (value6 != null) {
r2 = this._scrollPositionToPoint(value6);
r15 = r13;
} else {
r2 = value2;
r15 = r13;
}
} else {
r2 = value2;
r15 = r6;
}
} else {
r2 = value2;
r15 = r6;
}
} else if (initialScrollItem != null) {
if (a0 > value) {
scrollPosition = a1.computeScrollPosition(value4 === r5, r19, initialScrollItem);
if (scrollPosition != null) {
_calculateScrollPosition = this._calculateScrollPosition;
object = {itemCoords: scrollPosition};
object.fullSize = a1.getSize();
object.orientation = r18;
object.paddingEnd = 16;
value6 = Reflect.apply(_calculateScrollPosition, this, [object]);
r13 = value6 ?? scrollPosition.scrollPosition - scrollPosition.sectionOffset;
if (value6 != null) {
r2 = this._scrollPositionToPoint(value6);
r15 = r13;
} else {
r2 = value2;
r15 = r13;
}
} else {
r2 = value2;
r15 = r6;
}
} else {
r2 = value2;
r15 = r6;
}
} else {
r2 = value2;
r15 = r6;
}
if (a2) {
if (a0 > value) {
value13 = environment.__proto__;
block = computeBlock(a0, r15, batchesToRender);
batchSize = block.batchSize;
blockStart = block.blockStart;
r5 = block.blockEnd;
r6 = blockStart;
r7 = batchSize;
} else {
value10 = environment.__proto__;
batchSize2 = getBatchSize(a0);
r5 = r15 + a0;
r6 = r15;
r7 = batchSize2;
}
} else {
value10 = environment.__proto__;
batchSize2 = getBatchSize(a0);
r5 = r15 + a0;
r6 = r15;
r7 = batchSize2;
}
r2 = r2 ?? ({'x': 0, 'y': 0});
r12 = r12 ? r2.x : r2.y;
this.scrollPos = r12;
if (scrollPosValue != null) {
scrollPosValue.set(r12);
this.scrollPosValue = scrollPosValue;
} else {
value14 = environment.__proto__;
moduleValue = require(4017) /* metro dependency 4017: ReanimatedRexport */;
this.scrollPosValue = moduleValue.makeMutable(r12);
}
object = {};
if (a0 > value) {
r1 = a1.compute(r6, r5, r10, true);
r22 = r10;
} else {
r1 = {size: value, items: []};
}
copyDataProperties(object, r1, r22);
object['batchSize'] = r7;
object['blockStart'] = r6;
object['blockEnd'] = r5;
object['isFirstLayout'] = a2;
object['fastListComputer'] = a1;
object['initialContentOffset'] = r2;
object['hasReachedEndBefore'] = false;
return object;
}
function value_65230() { // fn#65230, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:26104, offset: 0x01bc914e, size: 235 bytes, params: 1, frame: 19
var environment;
const scrollPosValue = this.scrollPosValue;
const workletMounted = this.workletMounted;
const horizontal = this.props.horizontal;
const r8 = horizontal !== undefined && horizontal;
value = environment.__proto__;
const WorkletEventHandler = (ReanimatedRexportModule).WorkletEventHandler;
const value_65230T2 = value_65230T;
value_65230T2.__closure = {horizontal: r8, workletMounted: workletMounted, scrollPosValue: scrollPosValue};
value_65230T2.__workletHash = 13353994165730;
value_65230T2.__initData = env1_30;
const value2 = Object.create(WorkletEventHandler.prototype, {constructor: {value: WorkletEventHandler}});
const workletEventHandler = new WorkletEventHandler(value_65230T2, ['onScroll']);
this.worklet = workletEventHandler instanceof Object ? workletEventHandler : value2;
this.viewTag = findNodeHandle(this.scrollView.current);
const worklet = this.worklet;
worklet.registerForEvents(this.viewTag);
this.queueViewabilityChange();
function value_65230T({contentOffset, contentSize}) { // fn#65231, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:26257, owner: value_65230.t, offset: 0x01bc9239, size: 134 bytes, params: 2, frame: 15
var set;
var scrollPosValueBinding;
var Math;
const r5 = env0_2 ? contentOffset.x : contentOffset.y;
const r4 = env0_2 ? contentSize.width : contentSize.height;
if (r4 !== 0 || workletMounted.get()) {
workletMounted.set(true);
scrollPosValueBinding = scrollPosValue;
set = scrollPosValueBinding.set;
Math = global.Math;
Reflect.apply(set, scrollPosValueBinding, [Math.min(r5, r4)]);
}
}
}
function value_65233({scrollPosValue}, a1, a2) { // fn#65233, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:27026, offset: 0x01bc9354, size: 201 bytes, params: 4, frame: 13
var current;
if (scrollPosValue !== this.props.scrollPosValue) {
throw new global.Error('FastList: scrollPosValue cannot changed after mounting');
}
if (this.state.isFirstLayout) {
if (a2) {
this.anchorScroll();
}
} else if (a1.isFirstLayout) {
if (this.props.chunkBase == null) {
current = this.scrollView.current;
if (current != null) {
current.measure(_fun65234);
}
}
} else if (a2) {
this.anchorScroll();
}
if (this.state.items !== a1.items) {
this.queueViewabilityChange();
}
function _fun65234() { // fn#65234, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:27288, offset: 0x01bc941d, size: 21 bytes, params: 1, frame: 9
return env0_0.restoreScrollPosition();
}
}
function value_65242() { // fn#65242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:29039, offset: 0x01bc96a9, size: 257 bytes, params: 1, frame: 21
var scrollToLocation;
var object;
var value3;
const props = this.props;
const initialScrollItem = props.initialScrollItem;
const initialScrollSection = props.initialScrollSection;
const value = 0;
let r9 = initialScrollSection === undefined ? value : initialScrollSection;
const initialScrollOrientation = props.initialScrollOrientation;
const r1 = initialScrollOrientation === undefined ? 'visible' : initialScrollOrientation;
const initialScrollStart = props.initialScrollStart;
if (initialScrollItem != null) {
if (initialScrollStart != null) {
this.scrollTo(initialScrollStart, false);
} else {
scrollToLocation = this.scrollToLocation;
object = {section: r9};
value3 = -1;
r9 = initialScrollItem ?? value3;
object.item = r9;
object.orientation = r1;
object.paddingEnd = 16;
object.setAnchor = true;
if (Reflect.apply(scrollToLocation, this, [object])) {
this.deferNextCompute = true;
} else {
this.scrollPosValue.set(value);
if (value3 !== this.deferredCompute) {
global.cancelAnimationFrame(this.deferredCompute);
}
this.deferredCompute = global.requestAnimationFrame(_fun65243);
}
}
} else if (r9 <= value) {
if (initialScrollStart == null) {
this.computeBlocks();
} else if (initialScrollStart != null) {
this.scrollTo(initialScrollStart, false);
} else {
scrollToLocation = this.scrollToLocation;
object = {section: r9};
value3 = -1;
r9 = initialScrollItem ?? value3;
object.item = r9;
object.orientation = r1;
object.paddingEnd = 16;
object.setAnchor = true;
if (Reflect.apply(scrollToLocation, this, [object])) {
this.deferNextCompute = true;
} else {
this.scrollPosValue.set(value);
if (value3 !== this.deferredCompute) {
global.cancelAnimationFrame(this.deferredCompute);
}
this.deferredCompute = global.requestAnimationFrame(_fun65243);
}
}
} else if (initialScrollStart != null) {
this.scrollTo(initialScrollStart, false);
} else {
scrollToLocation = this.scrollToLocation;
object = {section: r9};
value3 = -1;
r9 = initialScrollItem ?? value3;
object.item = r9;
object.orientation = r1;
object.paddingEnd = 16;
object.setAnchor = true;
if (Reflect.apply(scrollToLocation, this, [object])) {
this.deferNextCompute = true;
} else {
this.scrollPosValue.set(value);
if (value3 !== this.deferredCompute) {
global.cancelAnimationFrame(this.deferredCompute);
}
this.deferredCompute = global.requestAnimationFrame(_fun65243);
}
}
function _fun65243() { // fn#65243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:29541, offset: 0x01bc97aa, size: 19 bytes, params: 1, frame: 9
return env0_0.computeBlocks();
}
}
function value_65244() { // fn#65244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:29598, offset: 0x01bc97bd, size: 233 bytes, params: 1, frame: 19
var setState;
var object;
const {batchesToRender, chunkBase} = this.props;
const {isFirstLayout, fastListComputer, items} = this.state;
let value = environment.__proto__;
value = computeBlock(chunkBase ?? this.containerSize, this.scrollPos, batchesToRender);
if (value.batchSize !== this.state.batchSize) {
setState = this.setState;
object = {};
copyDataProperties(object, value, undefined);
copyDataProperties(object, fastListComputer.compute(value.blockStart, value.blockEnd, items), undefined);
object['isFirstLayout'] = false;
Reflect.apply(setState, this, [object]);
} else if (value.blockStart !== this.state.blockStart) {
setState = this.setState;
object = {};
copyDataProperties(object, value, undefined);
copyDataProperties(object, fastListComputer.compute(value.blockStart, value.blockEnd, items), undefined);
object['isFirstLayout'] = false;
Reflect.apply(setState, this, [object]);
} else if (value.blockEnd !== this.state.blockEnd) {
setState = this.setState;
object = {};
copyDataProperties(object, value, undefined);
copyDataProperties(object, fastListComputer.compute(value.blockStart, value.blockEnd, items), undefined);
object['isFirstLayout'] = false;
Reflect.apply(setState, this, [object]);
} else if (isFirstLayout) {
this.setState({isFirstLayout: false});
}
}
function value_65245() { // fn#65245, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:30034, offset: 0x01bc98a6, size: 1111 bytes, params: 1, frame: 44
var r2;
var r26;
var r25;
var r24;
var r23;
var value12;
var type;
var key;
var layoutStart;
var recyclerKey;
var layoutSize;
var section;
var item;
var SPACER;
var HEADER;
var FOOTER;
var SECTION;
var ITEM;
var SECTION_FOOTER;
var push;
var jsxRuntimeEnv1_16Binding;
var binding;
var closure;
var scrollPosValue;
var value13;
const props = this.props;
const stickySectionsVariant = props.stickySectionsVariant;
let value = 'default';
const r18 = stickySectionsVariant === undefined ? value : stickySectionsVariant;
const renderHeader = props.renderHeader;
const r17 = renderHeader !== undefined ? renderHeader : renderDefaultEmpty;
const renderFooter = props.renderFooter;
const r16 = renderFooter !== undefined ? renderFooter : renderDefaultEmpty;
const renderSection = props.renderSection;
const r15 = renderSection !== undefined ? renderSection : renderDefaultEmpty;
const renderItem = props.renderItem;
const renderSectionFooter = props.renderSectionFooter;
const r13 = renderSectionFooter !== undefined ? renderSectionFooter : renderDefaultEmpty;
const optimizeListItemRender = props.optimizeListItemRender;
const r12 = optimizeListItemRender !== undefined && optimizeListItemRender;
const disableContentWrappers = props.disableContentWrappers;
const r11 = disableContentWrappers !== undefined && disableContentWrappers;
props.debugLayout;
const items4 = this.state.items;
const horizontal = this.props.horizontal;
const r10 = horizontal != null && horizontal;
const items2 = [];
items4.forEach(_fun65246);
const items3 = [];
const value10 = _createForOfIteratorHelperLoose_65155(items4);
const value11 = value10();
let done = value11.done;
if (!done) {
r2 = value11;
while (true) {
value12 = r2.value;
type = value12.type;
key = value12.key;
layoutStart = value12.layoutStart;
recyclerKey = value12.recyclerKey;
layoutSize = value12.layoutSize;
section = value12.section;
item = value12.item;
if (layoutSize !== 0) {
SPACER = env1_19.SPACER;
if (SPACER === type) {
push = items3.push;
jsxRuntimeEnv1_16Binding = jsxRuntimeEnv1_16;
Reflect.apply(push, items3,
[((Component) => <Component horizontal={r10} layoutSize={layoutSize} key={'' + key} />)(env1_28)]);
break;
}
HEADER = env1_19.HEADER;
if (HEADER === type) {
push = items3.push;
jsxRuntimeEnv1_16Binding = jsxRuntimeEnv1_16;
binding = env1_27;
if (r12) {
r23 = r17;
continue;
}
r23 = _fun65247;
Reflect.apply(push, items3,
[((Component) => <Component recyclerKey={recyclerKey} horizontal={r10} disableWrapper={r11} fastListInstance={this} layoutSize={layoutSize} debug={false} key={'' + key}>{r23}</Component>)(binding)]);
break;
}
FOOTER = env1_19.FOOTER;
if (FOOTER === type) {
push = items3.push;
jsxRuntimeEnv1_16Binding = jsxRuntimeEnv1_16;
binding = env1_27;
if (r12) {
r24 = r16;
continue;
}
r24 = _fun65248;
Reflect.apply(push, items3,
[((Component) => <Component recyclerKey={recyclerKey} horizontal={r10} disableWrapper={r11} fastListInstance={this} layoutSize={layoutSize} debug={false} key={'' + key}>{r24}</Component>)(binding)]);
break;
}
SECTION = env1_19.SECTION;
if (SECTION === type) {
items2.shift();
if (value !== r18) {
push = items3.push;
jsxRuntimeEnv1_16Binding = jsxRuntimeEnv1_16;
binding = env1_24;
if (r12) {
r24 = r15;
continue;
}
r24 = _fun65249;
Reflect.apply(push, items3,
[((Component) => <Component recyclerKey={recyclerKey} horizontal={r10} disableWrapper={r11} layoutStart={layoutStart} layoutSize={layoutSize} fastListInstance={this} section={section} debug={false} key={'' + key}>{r24}</Component>)(binding)]);
break;
}
push = items3.push;
jsxRuntimeEnv1_16Binding = jsxRuntimeEnv1_16;
binding = env1_23;
scrollPosValue = this.scrollPosValue;
if (r12) {
r25 = r15;
continue;
}
r25 = _fun65250;
Reflect.apply(push, items3,
[((Component) => <Component recyclerKey={recyclerKey} horizontal={r10} disableWrapper={r11} layoutStart={layoutStart} layoutSize={layoutSize} nextSectionLayoutPosition={items2[0]} scrollPosValue={scrollPosValue} fastListInstance={this} section={section} debug={false} key={'' + key}>{r25}</Component>)(binding)]);
break;
}
ITEM = env1_19.ITEM;
if (ITEM === type) {
push = items3.push;
jsxRuntimeEnv1_16Binding = jsxRuntimeEnv1_16;
binding = env1_26;
if (r12) {
r25 = renderItem;
continue;
}
r25 = function(a0) {
var r3;
var r5;
var value = copyRestArgs(0, r5);
var renderItemBinding = renderItem;
var items = [];
arraySpread(items, value, 0, r3);
return apply(renderItemBinding, items, undefined, r3);
};
Reflect.apply(push, items3,
[((Component) => <Component recyclerKey={recyclerKey} horizontal={r10} disableWrapper={r11} layoutSize={layoutSize} fastListInstance={this} section={section} item={item} debug={false} key={'' + key}>{r25}</Component>)(binding)]);
break;
}
SECTION_FOOTER = env1_19.SECTION_FOOTER;
if (SECTION_FOOTER !== type) {
break;
}
push = items3.push;
jsxRuntimeEnv1_16Binding = jsxRuntimeEnv1_16;
binding = env1_25;
if (r12) {
r26 = r13;
continue;
}
closure = _fun65252;
r26 = closure;
Reflect.apply(push, items3,
[((Component) => <Component recyclerKey={recyclerKey} horizontal={r10} disableWrapper={r11} fastListInstance={this} layoutSize={layoutSize} section={section} debug={false} key={'' + key}>{r26}</Component>)(binding)]);
break;
}
value13 = value10();
done = value13.done;
if (done) {
break;
}
r2 = value13;
continue;
}
}
return items3;
function _fun65246({type, layoutStart}) { // fn#65246, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:30516, offset: 0x01bc9cfd, size: 52 bytes, params: 2, frame: 11
const SECTION = env2_19.SECTION;
if (type === SECTION) {
PossibleConstructorReturn.push(layoutStart);
}
}
function _fun65247(a0) { // fn#65247, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:30960, offset: 0x01bc9d31, size: 40 bytes, params: 2, frame: 14
const value = copyRestArgs(0, undefined);
const binding = env0_0;
const items2 = [];
arraySpread(items2, value, 0, undefined);
return apply(binding, items2, undefined, undefined);
}
function _fun65248(a0) { // fn#65248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:31115, offset: 0x01bc9d59, size: 40 bytes, params: 2, frame: 14
const value = copyRestArgs(0, undefined);
const binding = env0_1;
const items2 = [];
arraySpread(items2, value, 0, undefined);
return apply(binding, items2, undefined, undefined);
}
function _fun65249(a0) { // fn#65249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:31319, offset: 0x01bc9d81, size: 40 bytes, params: 2, frame: 14
const value = copyRestArgs(0, undefined);
const binding = env0_2;
const items2 = [];
arraySpread(items2, value, 0, undefined);
return apply(binding, items2, undefined, undefined);
}
function _fun65250(a0) { // fn#65250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:31544, offset: 0x01bc9d81, size: 40 bytes, params: 2, frame: 14
const value = copyRestArgs(0, undefined);
const binding = env0_2;
const items2 = [];
arraySpread(items2, value, 0, undefined);
return apply(binding, items2, undefined, undefined);
}
function _fun65252(a0) { // fn#65252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:31887, offset: 0x01bc9dd1, size: 40 bytes, params: 2, frame: 14
const value = copyRestArgs(0, undefined);
const items2 = [];
arraySpread(items2, value, 0, undefined);
return apply(ObjectWithoutProperties, items2, undefined, undefined);
}
}
function value_65253() { // fn#65253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:31946, offset: 0x01bc9df9, size: 41 bytes, params: 1, frame: 13
const sections = this.props.sections;
return sections.reduce(function(a0, a1) {
return a0 + a1;
}, 0) === 0;
}
function value_65256() { // fn#65256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:32131, offset: 0x01bc9e42, size: 625 bytes, params: 1, frame: 21
var r8;
var value;
const props = this.props;
props.manualRef;
props.onScroll;
props.onScrollEnd;
props.onLayout;
props.renderHeader;
props.renderFooter;
props.renderSection;
props.renderItem;
props.renderSectionFooter;
props.getRecyclerKey;
props.onEndReached;
props.endReachedThreshold;
props.headerSize;
props.footerSize;
props.sectionSize;
props.sectionFooterSize;
props.itemSize;
props.sections;
props.scrollPosValue;
props.batchesToRender;
props.optimizeListItemRender;
props.initialScrollSection;
props.initialScrollItem;
props.initialScrollOrientation;
props.initialScrollStart;
props.getAnchorIdFromIndex;
props.getAnchorIndexFromId;
props.EXPERIMENTAL_enableAnchorWhileScrolling;
props.chunkBase;
props.disableContentWrappers;
props.childrenWrapper;
props.stickyHeaderFooter;
props.stickySectionsVariant;
props.persistantKeys;
props.disableRecyclingOnFullCompute;
props.disableLegacyGestureHandling;
props.viewabilityConfig;
props.onViewableItemsChanged;
props.debugLayout;
const renderAccessory = props.renderAccessory;
const removeClippedSubviews = props.removeClippedSubviews;
if (removeClippedSubviews !== undefined) {
r8 = removeClippedSubviews;
} else {
value = environment.__proto__;
value = require(477) /* metro dependency 477: PlatformUtils */;
value = value.isAndroid();
r8 = value;
}
const inActionSheet = props.inActionSheet;
value = environment.__proto__;
const value2 = env1_4(props, env1_3);
const r2 = inActionSheet ? (require(6277) /* metro dependency 6277 */).BottomSheetScrollView : ScrollView;
const r2Props = {...value2};
r2Props['accessibilityRole'] = 'list';
r2Props['ref'] = (importDefault(8143) /* metro dependency 8143: refObjectUnionAsProp */)(this.scrollView);
r2Props['scrollEventThrottle'] = 16;
r2Props['contentOffset'] = this.state.initialContentOffset;
r2Props['onScroll'] = this.handleScroll;
r2Props['onLayout'] = this.handleLayout;
r2Props['onMomentumScrollEnd'] = this.handleMomentumScrollEnd;
r2Props['onScrollBeginDrag'] = this.handleScrollBeginDrag;
r2Props['removeClippedSubviews'] = r8;
const value5 = ((Component) => <Component {...r2Props}>{this.renderItems()}</Component>)(r2);
const jsxRuntimeEnv1_17Binding = jsxRuntimeEnv1_17;
const items2 = [
<FastListIosFabricGestureWorkaround inActionSheet={inActionSheet}>
{value5}
</FastListIosFabricGestureWorkaround>,
];
value = null;
items2[1] = value != renderAccessory ? renderAccessory(this) : value;
return (
<>
{items2}
</>
);
}
}
}
function value_65169({type, layoutStart, layoutSize, customKey, section, item, items, pendingItems}) { // fn#65169, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:3073, offset: 0x01bc55d5, size: 200 bytes, params: 2, frame: 24
var r14;
var r2;
var r0;
var object;
if (customKey != null) {
r2 = customKey;
} else {
r2 = '' + type + ':' + section + ':' + item;
r14 = section;
}
const property = items[r2];
if (property == null) {
object = {type: type, key: -1, layoutStart: layoutStart, layoutSize: layoutSize, section: section, item: item,
recyclerKey: r2};
pendingItems.push(object);
r0 = object;
} else {
object = {};
copyDataProperties(object, property, r14);
object.layoutStart = layoutStart;
object.layoutSize = layoutSize;
object.section = section;
object.item = item;
delete items[r2];
r0 = object;
}
return r0;
}
function value_65183(a0) { // fn#65183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:4926, offset: 0x01bc5bb5, size: 176 bytes, params: 2, frame: 12
var r3;
var r5;
var r9;
var start;
var end;
var property;
const dataCache = this.dataCache;
let value = dataCache.length - 1;
let chunkCache = this.chunkCache;
if (chunkCache != null) {
chunkCache = this.chunkCache;
start = chunkCache.start;
reducibleJoin3: while (true) {
if (a0 >= start) {
chunkCache = this.chunkCache;
end = chunkCache.end;
if (a0 <= end) {
return this.chunkCache;
}
break reducibleJoin3;
}
break reducibleJoin3;
}
}
const value2 = 0;
if (value2 <= value) {
r3 = value2;
r5 = value;
reducibleLoop4: while (true) {
value = r3 + ((r5 - r3) / 2 | 0);
property = dataCache[value];
if (property == null) {
return undefined;
}
start = property.start;
if (a0 >= start) {
end = property.end;
reducibleJoin7: while (true) {
if (a0 <= end) {
this.chunkCache = property;
return property;
}
break reducibleJoin7;
}
}
start = property.start;
if (a0 < start) {
value -= 1;
r5 = value;
r9 = r3;
} else {
end = property.end;
reducibleJoin11: while (true) {
reducibleJoin13: while (true) {
if (a0 > end) {
value += 1;
r9 = value;
break reducibleJoin11;
}
break reducibleJoin13;
}
return undefined;
}
}
if (!(r9 <= r5)) {
return undefined;
}
r3 = r9;
continue reducibleLoop4;
}
}
}
function value_65232({getAnchorIdFromIndex}, a1) { // fn#65232, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:26686, offset: 0x01bc92bf, size: 149 bytes, params: 3, frame: 17
var r4;
var disableAnchoringTimeout;
var scrollAnchor;
const EXPERIMENTAL_enableAnchorWhileScrolling = this.props.EXPERIMENTAL_enableAnchorWhileScrolling;
let value = EXPERIMENTAL_enableAnchorWhileScrolling !== undefined;
let r0 = value && EXPERIMENTAL_enableAnchorWhileScrolling;
const isFirstLayout = this.state.isFirstLayout;
if (r0) {
value = null;
r4 = value == getAnchorIdFromIndex || isFirstLayout;
r4 = !r4 ? isFirstLayout !== a1.isFirstLayout : r4;
if (!r4) {
scrollAnchor = this.scrollAnchor;
scrollAnchor.findOrUpdateAnchor(getAnchorIdFromIndex, a1.items);
}
scrollAnchor = this.scrollAnchor;
r0 = scrollAnchor.hasAnchor() || value;
} else {
disableAnchoringTimeout = this.disableAnchoringTimeout;
value = null;
if (value == disableAnchoringTimeout) {
value = null;
r4 = value == getAnchorIdFromIndex || isFirstLayout;
r4 = !r4 ? isFirstLayout !== a1.isFirstLayout : r4;
if (!r4) {
scrollAnchor = this.scrollAnchor;
scrollAnchor.findOrUpdateAnchor(getAnchorIdFromIndex, a1.items);
}
scrollAnchor = this.scrollAnchor;
r0 = scrollAnchor.hasAnchor() || value;
} else {
r0 = value;
}
}
return r0;
}
function value_65239() { // fn#65239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:28342, offset: 0x01bc95ac, size: 173 bytes, params: 1, frame: 20
var anchorOffset;
var anchorIndex;
const {getAnchorIndexFromId, stickySectionsVariant} = this.props;
let value = 'default';
const r1 = stickySectionsVariant === undefined ? value : stickySectionsVariant;
const fastListComputer = this.state.fastListComputer;
if (getAnchorIndexFromId != null) {
anchorOffset = this.scrollAnchor.anchorOffset;
if (anchorOffset != null) {
anchorIndex = this.scrollAnchor.getAnchorIndex(getAnchorIndexFromId);
if (anchorIndex != null) {
value = fastListComputer.computeScrollPosition(value === r1, anchorIndex.section, anchorIndex.item);
if (value != null && this.scrollPos !== value.scrollPosition - anchorOffset) {
this.scrollTo(value.scrollPosition - anchorOffset);
}
}
}
}
}
function _fun65254(a0, a1) { // fn#65254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:31996, offset: 0x00c4a322, size: 12 bytes, params: 3, frame: 2
return a0 + a1;
}
function value_65257(a0, a1) { // fn#65257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8325:33546, offset: 0x01bca0b3, size: 330 bytes, params: 3, frame: 21
var r0;
var value2;
var compute;
var blockStart;
var blockEnd;
var items2;
const fastListComputer = a1.fastListComputer;
const updateProps = fastListComputer.updateProps;
let object = {};
object.headerSize = a0.headerSize;
object.footerSize = a0.footerSize;
object.sectionSize = a0.sectionSize;
object.itemSize = a0.itemSize;
object.sectionFooterSize = a0.sectionFooterSize;
object.sections = a0.sections;
object.insetStart = a0.insetStart;
object.insetEnd = a0.insetEnd;
object.stickyHeaderFooter = a0.stickyHeaderFooter;
const getRecyclerKey = a0.getRecyclerKey;
object.getRecyclerKey = getRecyclerKey;
object.persistantKeys = a0.persistantKeys;
object.disableRecyclingOnFullCompute = a0.disableRecyclingOnFullCompute;
Reflect.apply(updateProps, fastListComputer, [object]);
const batchSize = a1.batchSize;
let value = 0;
if (value === batchSize) {
object = {};
copyDataProperties(object, a1, undefined);
object['size'] = (a0.insetStart ?? value) + (a0.insetEnd ?? value);
object['items'] = [];
r0 = object;
} else {
value = fastListComputer.isDirty();
value2 = null;
if (value) {
object = {};
copyDataProperties(object, a1, undefined);
compute = fastListComputer.compute;
blockStart = a1.blockStart;
blockEnd = a1.blockEnd;
items2 = a1.items;
copyDataProperties(object, Reflect.apply(compute, fastListComputer, [blockStart, blockEnd,
value2 != items2 ? items2 : []]), undefined);
r0 = object;
} else {
r0 = value2;
}
}
return r0;
}
global.__d(_fun65151, 8140, [29, 15, 17, 18, 57, 6, 7, 31, 27, 33, 22, 628, 6821, 4573, 477, 4017, 8141, 8142, 6277,
8143, 5321, 4020,
2]) /* metro module 8140, dependencies: [29, 15, 17, 18, 57, 6, 7, 31, 27, 33, 22, 628, 6821, 4573, 477, 4017, 8141, 8142, 6277, 8143, 5321, 4020, 2] */;