28122 lines
1.2 MiB
28122 lines
1.2 MiB
// Module ID: 15051
|
|
// Function ID: 15052
|
|
// Name: toNativeHorizontalOffset
|
|
// Dependencies: [41, 42, 109, 32, 19, 17, 703]
|
|
// Exports: useAdaptiveRender, useAdaptiveRenderChange, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount
|
|
|
|
// Module 15051 (toNativeHorizontalOffset)
|
|
import _classCallCheck from "_classCallCheck";
|
|
import _createClass from "_createClass";
|
|
import _objectWithoutProperties from "_objectWithoutProperties";
|
|
import _slicedToArray from "_slicedToArray";
|
|
import noop from "noop";
|
|
import get_ActivityIndicator from "get ActivityIndicator";
|
|
|
|
let Platform;
|
|
let closure_14;
|
|
let forwardRef;
|
|
let map1;
|
|
let memo;
|
|
get_ActivityIndicator = require;
|
|
let obj = dependencyMap;
|
|
function toNativeHorizontalOffset(state7, arg1, clearTimeoutResult) {
|
|
if (state7) {
|
|
let props;
|
|
if (null != state7) {
|
|
props = state7.props;
|
|
}
|
|
let horizontal;
|
|
if (null != props) {
|
|
horizontal = props.horizontal;
|
|
}
|
|
let tmp4 = horizontal;
|
|
if (tmp4) {
|
|
let rtl;
|
|
if (null != props) {
|
|
rtl = props.rtl;
|
|
}
|
|
if (null == rtl) {
|
|
rtl = get_ActivityIndicator.I18nManager.isRTL;
|
|
}
|
|
tmp4 = rtl;
|
|
}
|
|
if (tmp4) {
|
|
if (undefined !== clearTimeoutResult) {
|
|
const _Number = Number;
|
|
if (Number.isFinite(clearTimeoutResult)) {
|
|
const _Number2 = Number;
|
|
if (Number.isFinite(state7.scrollLength)) {
|
|
if (clearTimeoutResult > state7.scrollLength) {
|
|
const _Math = Math;
|
|
let bound = Math.max(0, clearTimeoutResult - state7.scrollLength);
|
|
}
|
|
let bound1 = arg1;
|
|
if (undefined !== bound) {
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
bound1 = Math.max(0, Math.min(bound, arg1));
|
|
}
|
|
let prop;
|
|
if (null != state7) {
|
|
prop = state7.horizontalRTLScrollType;
|
|
}
|
|
let str2 = "inverted";
|
|
if (null != prop) {
|
|
str2 = prop;
|
|
}
|
|
if ("negative" === str2) {
|
|
let num5 = 0;
|
|
if (0 !== bound1) {
|
|
num5 = -bound1;
|
|
}
|
|
let tmp15 = num5;
|
|
} else {
|
|
tmp15 = bound1;
|
|
if ("inverted" === str2) {
|
|
let tmp16 = bound1;
|
|
if (!tmp11) {
|
|
const diff = bound - bound1;
|
|
let bound2 = diff;
|
|
if (!tmp11) {
|
|
const _Math4 = Math;
|
|
const _Math5 = Math;
|
|
bound2 = Math.max(0, Math.min(bound, diff));
|
|
}
|
|
tmp16 = bound2;
|
|
}
|
|
tmp15 = tmp16;
|
|
}
|
|
}
|
|
return tmp15;
|
|
}
|
|
}
|
|
}
|
|
let num2;
|
|
if (undefined !== clearTimeoutResult) {
|
|
const _Number3 = Number;
|
|
if (Number.isFinite(clearTimeoutResult)) {
|
|
const _Number4 = Number;
|
|
if (Number.isFinite(state7.scrollLength)) {
|
|
num2 = 0;
|
|
}
|
|
}
|
|
}
|
|
bound = num2;
|
|
}
|
|
}
|
|
return arg1;
|
|
}
|
|
function StateProvider(children) {
|
|
return <redux.Provider value={_slicedToArray(frozen.useState(() => {
|
|
if (typeof closure_16 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const obj = { animatedScrollY: null, columnWrapperStyle: "e", containerLayoutTriggers: "Array", contextNum: 0, listeners: "r", mapViewabilityAmountCallbacks: "TokenizeCreditCardForPayPalConnect", mapViewabilityAmountValues: "M7 14H6v1h1v-1ZM10 14H9v1h1v-1Z", mapViewabilityCallbacks: "#000", mapViewabilityConfigStates: "M9 14H7v1h2v-1Z", mapViewabilityValues: null, pendingContainerIds: "Channels Sidebar", positionListeners: "M9 1H7v1h2V1ZM7 2H6v1h1V1Z", scrollAxisGap: null, state: "bottom", values: null, viewRefs: null };
|
|
const value = new Animated.Animated.Value(0);
|
|
obj[0] = value;
|
|
obj[2] = new Map();
|
|
let closure_18 = tmp3 + 1;
|
|
obj[3] = +closure_18;
|
|
const map = new Map();
|
|
obj[4] = new Map();
|
|
const map1 = new Map();
|
|
obj[5] = new Map();
|
|
const map2 = new Map();
|
|
obj[6] = new Map();
|
|
const map3 = new Map();
|
|
obj[7] = new Map();
|
|
const map4 = new Map();
|
|
obj[8] = new Map();
|
|
const map5 = new Map();
|
|
obj[9] = new Map();
|
|
const map6 = new Map();
|
|
obj[11] = new Map();
|
|
const items = [["alignItemsAtEndPadding", 0], ["containerLayoutEpoch", 0], ["stylePaddingTop", 0], ["headerSize", 0], ["numContainers", 0], ["activeStickyIndex", -1], , , , , , , , ];
|
|
const items1 = ["isAtEnd", false];
|
|
items[6] = items1;
|
|
const items2 = ["isAtStart", false];
|
|
items[7] = items2;
|
|
const items3 = ["isNearEnd", false];
|
|
items[8] = items3;
|
|
const items4 = ["isNearStart", false];
|
|
items[9] = items4;
|
|
const items5 = ["isWithinMaintainScrollAtEndThreshold", false];
|
|
items[10] = items5;
|
|
items[11] = ["adaptiveRender", "normal"];
|
|
items[12] = ["totalSize", 0];
|
|
items[13] = ["scrollAdjustPending", 0];
|
|
const map7 = new Map();
|
|
obj[14] = new Map(items);
|
|
const map8 = new Map(items);
|
|
obj[15] = new Map();
|
|
return obj;
|
|
}), 1)[0]}>{arg0.children}</redux.Provider>;
|
|
}
|
|
function listen$(listeners) {
|
|
let closure_0 = arg2;
|
|
listeners = listeners.listeners;
|
|
const value = listeners.get(arg1);
|
|
let set = value;
|
|
let obj = value;
|
|
if (!value) {
|
|
const _Set = Set;
|
|
set = new Set();
|
|
const result = listeners.set(arg1, set);
|
|
obj = set;
|
|
}
|
|
obj.add(arg2);
|
|
return () => set.delete(closure_0);
|
|
}
|
|
function peek$(state, containerLayoutEpoch) {
|
|
const values = state.values;
|
|
return values.get(containerLayoutEpoch);
|
|
}
|
|
function set$(ctx, totalSize, clearTimeoutResult) {
|
|
let listeners;
|
|
let values;
|
|
({ listeners, values } = ctx);
|
|
if (values.get(totalSize) !== clearTimeoutResult) {
|
|
const result = values.set(totalSize, clearTimeoutResult);
|
|
const value = listeners.get(totalSize);
|
|
if (value) {
|
|
for (const item10015 of value) {
|
|
let item10015Result = item10015(arg2);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function notifyPosition$(positionListeners, arg1, sum2) {
|
|
positionListeners = positionListeners.positionListeners;
|
|
const value = positionListeners.get(arg1);
|
|
if (value) {
|
|
for (const item10010 of value) {
|
|
let item10010Result = item10010(arg2);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
function getContentInsetEnd(state) {
|
|
let contentInset;
|
|
let horizontal;
|
|
state = state.state;
|
|
let props = state.props;
|
|
({ horizontal, contentInset } = props);
|
|
if (null == contentInset) {
|
|
contentInset = state.nativeContentInset;
|
|
}
|
|
if (horizontal) {
|
|
let num2 = contentInset;
|
|
if (!contentInset) {
|
|
if (!num2) {
|
|
num2 = 0;
|
|
}
|
|
let num = num2;
|
|
} else {
|
|
props = undefined;
|
|
if (null != state) {
|
|
props = state.props;
|
|
}
|
|
horizontal = undefined;
|
|
if (null != props) {
|
|
horizontal = props.horizontal;
|
|
}
|
|
let tmp3 = horizontal;
|
|
if (tmp3) {
|
|
let rtl;
|
|
if (null != props) {
|
|
rtl = props.rtl;
|
|
}
|
|
if (null == rtl) {
|
|
rtl = get_ActivityIndicator.I18nManager.isRTL;
|
|
}
|
|
tmp3 = rtl;
|
|
}
|
|
}
|
|
} else if (null != contentInset) {
|
|
num = contentInset.bottom;
|
|
}
|
|
if (!num) {
|
|
num = 0;
|
|
}
|
|
let contentInsetEndAdjustment = arg1;
|
|
if (null == arg1) {
|
|
contentInsetEndAdjustment = props.contentInsetEndAdjustment;
|
|
}
|
|
let num3 = 0;
|
|
if (null != contentInsetEndAdjustment) {
|
|
num3 = contentInsetEndAdjustment;
|
|
}
|
|
const bound = Math.max(0, num3);
|
|
const values = state.values;
|
|
const value = values.get("anchoredEndSpaceSize");
|
|
const anchoredEndSpace = props.anchoredEndSpace;
|
|
let includeInEndInset;
|
|
if (null != anchoredEndSpace) {
|
|
includeInEndInset = anchoredEndSpace.includeInEndInset;
|
|
}
|
|
let num4 = 0;
|
|
if (includeInEndInset) {
|
|
num4 = 0;
|
|
if (value) {
|
|
num4 = value;
|
|
}
|
|
}
|
|
const contentInsetOverride = state.contentInsetOverride;
|
|
let tmp10;
|
|
if (null != contentInsetOverride) {
|
|
tmp10 = contentInsetOverride;
|
|
}
|
|
if (tmp10) {
|
|
const rect = { bottom: 0, left: 0, right: 0 };
|
|
const merged = Object.assign(contentInset);
|
|
const merged1 = Object.assign(tmp10);
|
|
if (horizontal) {
|
|
let props1;
|
|
if (null != state) {
|
|
props1 = state.props;
|
|
}
|
|
let horizontal1;
|
|
if (null != props1) {
|
|
horizontal1 = props1.horizontal;
|
|
}
|
|
let tmp20 = horizontal1;
|
|
if (tmp20) {
|
|
let rtl1;
|
|
if (null != props1) {
|
|
rtl1 = props1.rtl;
|
|
}
|
|
if (null == rtl1) {
|
|
rtl1 = get_ActivityIndicator.I18nManager.isRTL;
|
|
}
|
|
tmp20 = rtl1;
|
|
}
|
|
let num5 = (tmp20 ? rect.left : rect.right) || 0;
|
|
const tmp23 = (tmp20 ? rect.left : rect.right) || 0;
|
|
} else {
|
|
num5 = rect.bottom;
|
|
}
|
|
if (!num5) {
|
|
num5 = 0;
|
|
}
|
|
return Math.max(num5 + bound, num4);
|
|
} else {
|
|
const _Math = Math;
|
|
return Math.max(tmp11, num4);
|
|
}
|
|
}
|
|
function getContentSize(context) {
|
|
let state;
|
|
let values;
|
|
({ values, state } = context);
|
|
const tmp = values.get("stylePaddingTop") || 0;
|
|
const tmp2 = state.props.stylePaddingBottom || 0;
|
|
const tmp3 = values.get("alignItemsAtEndPadding") || 0;
|
|
const tmp4 = values.get("headerSize") || 0;
|
|
let num = getContentInsetEnd(context);
|
|
let totalSize = state.pendingTotalSize;
|
|
const sum = tmp4 + (values.get("footerSize") || 0);
|
|
if (null == totalSize) {
|
|
totalSize = state.totalSize;
|
|
}
|
|
if (null == totalSize) {
|
|
totalSize = values.get("totalSize");
|
|
}
|
|
const sum1 = sum + totalSize + tmp + tmp3 + tmp2;
|
|
if (!num) {
|
|
num = 0;
|
|
}
|
|
return sum1 + num;
|
|
}
|
|
function createContainerItemMetadata(dataChangeEpoch, itemIndex, itemData, itemType) {
|
|
return { dataChangeEpoch: dataChangeEpoch.dataChangeEpoch, getFixedItemSize: dataChangeEpoch.props.getFixedItemSize, getItemType: dataChangeEpoch.props.getItemType, itemData, itemIndex, itemType };
|
|
}
|
|
function resolveContainerItemMetadata(state, containerId, itemIndex, itemData) {
|
|
let getFixedItemSize;
|
|
let getItemType;
|
|
({ getFixedItemSize, getItemType } = state.props);
|
|
const containerItemMetadata = state.containerItemMetadata;
|
|
let value = containerItemMetadata.get(containerId);
|
|
let dataChangeEpoch;
|
|
if (null != value) {
|
|
dataChangeEpoch = value.dataChangeEpoch;
|
|
}
|
|
if (dataChangeEpoch === state.dataChangeEpoch) {
|
|
if (value.getItemType === getItemType) {
|
|
if (value.getFixedItemSize !== getFixedItemSize) {
|
|
value.didResolveFixedItemSize = false;
|
|
value.fixedItemSize = undefined;
|
|
value.getFixedItemSize = getFixedItemSize;
|
|
}
|
|
let tmp6 = getFixedItemSize;
|
|
if (getFixedItemSize) {
|
|
tmp6 = !value.didResolveFixedItemSize;
|
|
}
|
|
if (tmp6) {
|
|
let itemType = value.itemType;
|
|
let str2 = "";
|
|
if (null != itemType) {
|
|
str2 = itemType;
|
|
}
|
|
value.fixedItemSize = getFixedItemSize(itemData, itemIndex, str2);
|
|
value.didResolveFixedItemSize = true;
|
|
}
|
|
return value;
|
|
}
|
|
}
|
|
let tmp3;
|
|
if (getItemType) {
|
|
itemType = getItemType(itemData, itemIndex);
|
|
let str = "";
|
|
if (null != itemType) {
|
|
str = itemType;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
const obj = { dataChangeEpoch: state.dataChangeEpoch, getFixedItemSize: state.props.getFixedItemSize, getItemType: state.props.getItemType, itemData, itemIndex, itemType: tmp3 };
|
|
const containerItemMetadata2 = state.containerItemMetadata;
|
|
const result = containerItemMetadata2.set(containerId, obj);
|
|
value = obj;
|
|
}
|
|
function invalidateContainerFixedItemSizes(containerItemMetadata) {
|
|
containerItemMetadata = containerItemMetadata.containerItemMetadata;
|
|
const values = containerItemMetadata.values();
|
|
const iter = values[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
nextResult.didResolveFixedItemSize = false;
|
|
nextResult.fixedItemSize = undefined;
|
|
continue;
|
|
}
|
|
}
|
|
function ensureInitialScrollSessionCompletion(initialScrollSession, kind) {
|
|
let completion;
|
|
let previousDataLength;
|
|
let tmp = kind;
|
|
if (kind === undefined) {
|
|
initialScrollSession = initialScrollSession.initialScrollSession;
|
|
kind = undefined;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let str = "bootstrap";
|
|
if (null != kind) {
|
|
str = kind;
|
|
}
|
|
tmp = str;
|
|
}
|
|
if (initialScrollSession.initialScrollSession) {
|
|
if (initialScrollSession.initialScrollSession.kind !== tmp) {
|
|
if ("bootstrap" === initialScrollSession.initialScrollSession.kind) {
|
|
const bootstrap = initialScrollSession.initialScrollSession.bootstrap;
|
|
}
|
|
const completion2 = initialScrollSession.initialScrollSession.completion;
|
|
const previousDataLength2 = initialScrollSession.initialScrollSession.previousDataLength;
|
|
if ("offset" === tmp) {
|
|
let obj = { completion: null, kind: null, previousDataLength: null };
|
|
obj[0] = completion2;
|
|
obj[1] = tmp;
|
|
obj[2] = previousDataLength2;
|
|
} else {
|
|
obj = { bootstrap: null, completion: null, kind: null, previousDataLength: null };
|
|
obj[0] = bootstrap;
|
|
obj[1] = completion2;
|
|
obj[2] = tmp;
|
|
obj[3] = previousDataLength2;
|
|
}
|
|
initialScrollSession.initialScrollSession = obj;
|
|
}
|
|
} else {
|
|
obj = { completion: null, kind: null, previousDataLength: 0 };
|
|
obj[0] = {};
|
|
obj[1] = tmp;
|
|
({ completion, kind, previousDataLength } = obj);
|
|
if ("offset" === kind) {
|
|
const obj1 = { completion: null, kind: null, previousDataLength: null };
|
|
obj1[0] = completion;
|
|
obj1[1] = kind;
|
|
obj1[2] = previousDataLength;
|
|
let obj2 = obj1;
|
|
} else {
|
|
obj2 = { bootstrap: null, completion: null, kind: null, previousDataLength: null };
|
|
obj2[0] = tmp4;
|
|
obj2[1] = completion;
|
|
obj2[2] = kind;
|
|
obj2[3] = previousDataLength;
|
|
}
|
|
initialScrollSession.initialScrollSession = obj2;
|
|
}
|
|
const initialScrollSession2 = initialScrollSession.initialScrollSession;
|
|
if (null == initialScrollSession2.completion) {
|
|
initialScrollSession2.completion = {};
|
|
}
|
|
return initialScrollSession.initialScrollSession.completion;
|
|
}
|
|
function setInitialScrollSession(current, arg1) {
|
|
let obj = arg1;
|
|
if (arg1 === undefined) {
|
|
obj = {};
|
|
}
|
|
const initialScrollSession = current.initialScrollSession;
|
|
let kind = obj.kind;
|
|
if (null == kind) {
|
|
kind = undefined;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
}
|
|
if (null != initialScrollSession) {
|
|
const completion = initialScrollSession.completion;
|
|
}
|
|
let kind1;
|
|
if (null != initialScrollSession) {
|
|
kind1 = initialScrollSession.kind;
|
|
}
|
|
if ("bootstrap" === kind1) {
|
|
let bootstrap = initialScrollSession.bootstrap;
|
|
}
|
|
if ("bootstrap" === kind) {
|
|
let tmp4;
|
|
if (null !== obj.bootstrap) {
|
|
const bootstrap2 = obj.bootstrap;
|
|
if (null != bootstrap2) {
|
|
bootstrap = bootstrap2;
|
|
}
|
|
tmp4 = bootstrap;
|
|
}
|
|
}
|
|
if (kind) {
|
|
if (!current.initialScroll) {
|
|
if (!tmp3) {
|
|
let prop;
|
|
if (null != completion) {
|
|
prop = completion.didDispatchNativeScroll;
|
|
}
|
|
if (!prop) {
|
|
let prop1;
|
|
if (null != completion) {
|
|
prop1 = completion.didRetrySilentInitialScroll;
|
|
}
|
|
prop = prop1;
|
|
}
|
|
if (!prop) {
|
|
let watchdog;
|
|
if (null != completion) {
|
|
watchdog = completion.watchdog;
|
|
}
|
|
prop = watchdog;
|
|
}
|
|
if (!prop) {
|
|
current.initialScrollSession = undefined;
|
|
}
|
|
}
|
|
}
|
|
let previousDataLength = obj.previousDataLength;
|
|
if (null == previousDataLength) {
|
|
previousDataLength = undefined;
|
|
if (null != initialScrollSession) {
|
|
previousDataLength = initialScrollSession.previousDataLength;
|
|
}
|
|
}
|
|
let num = 0;
|
|
if (null != previousDataLength) {
|
|
num = previousDataLength;
|
|
}
|
|
if ("offset" === kind) {
|
|
obj = { completion: null, kind: null, previousDataLength: null };
|
|
obj[0] = completion;
|
|
obj[1] = kind;
|
|
obj[2] = num;
|
|
} else {
|
|
obj = { bootstrap: null, completion: null, kind: null, previousDataLength: null };
|
|
obj[0] = tmp3;
|
|
obj[1] = completion;
|
|
obj[2] = kind;
|
|
obj[3] = num;
|
|
}
|
|
current.initialScrollSession = obj;
|
|
return current.initialScrollSession;
|
|
} else {
|
|
current.initialScrollSession = undefined;
|
|
}
|
|
}
|
|
function resetSharedEdgeGateIfOutsideHysteresis(state) {
|
|
state = state.state;
|
|
if (state.edgeReachedGate) {
|
|
const tmp2 = getContentSize(state);
|
|
const diff = tmp2 - state.scroll - state.scrollLength;
|
|
const result = state.props.onStartReachedThreshold * state.scrollLength;
|
|
const result1 = state.props.onEndReachedThreshold * state.scrollLength;
|
|
const _Math = Math;
|
|
const diff1 = diff - getContentInsetEnd(state);
|
|
const absolute = Math.abs(state.scroll);
|
|
let tmp11 = result > 0;
|
|
if (tmp11) {
|
|
tmp11 = absolute >= 1.3 * result;
|
|
}
|
|
if (!tmp11) {
|
|
tmp11 = result <= 0 && absolute > 0;
|
|
const tmp12 = result <= 0 && absolute > 0;
|
|
}
|
|
const _Math2 = Math;
|
|
const absolute1 = Math.abs(diff1);
|
|
let tmp14 = !tmp6;
|
|
let tmp15 = tmp14;
|
|
if (tmp2 >= state.scrollLength) {
|
|
tmp15 = result1 > 0;
|
|
}
|
|
if (tmp15) {
|
|
tmp15 = absolute1 >= 1.3 * result1;
|
|
}
|
|
if (!tmp15) {
|
|
if (!tmp6) {
|
|
tmp14 = result1 <= 0;
|
|
}
|
|
if (tmp14) {
|
|
tmp14 = absolute1 > 0;
|
|
}
|
|
tmp15 = tmp14;
|
|
}
|
|
if (tmp11) {
|
|
tmp11 = tmp15;
|
|
}
|
|
if (tmp11) {
|
|
state.edgeReachedGate = undefined;
|
|
}
|
|
}
|
|
}
|
|
function hasActiveInitialScroll(initialScroll) {
|
|
initialScroll = undefined;
|
|
if (null != initialScroll) {
|
|
initialScroll = initialScroll.initialScroll;
|
|
}
|
|
return initialScroll && !initialScroll.didFinishInitialScroll;
|
|
}
|
|
function checkAtBottom(state, arg1, arg2) {
|
|
let endReachedSnapshot;
|
|
let isEndReached;
|
|
let maintainingScrollAtEnd;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scroll;
|
|
let scrollLength;
|
|
let closure_0 = state;
|
|
let closure_1 = arg1;
|
|
let closure_2 = arg2;
|
|
state = state.state;
|
|
if (state) {
|
|
({ scrollLength, scroll, props } = state);
|
|
const onEndReachedThreshold = props.onEndReachedThreshold;
|
|
({ queuedInitialLayout, maintainingScrollAtEnd } = state);
|
|
const tmp2 = getContentSize(state);
|
|
resetSharedEdgeGateIfOutsideHysteresis(state);
|
|
if (tmp2 > 0) {
|
|
if (queuedInitialLayout) {
|
|
const diff = tmp2 - scroll - scrollLength;
|
|
const diff1 = diff - getContentInsetEnd(state);
|
|
let tmp10 = tmp8;
|
|
if (tmp2 >= scrollLength) {
|
|
tmp10 = diff1 <= 1;
|
|
}
|
|
set$(state, "isAtEnd", tmp10);
|
|
let tmp12 = tmp8;
|
|
if (tmp2 >= scrollLength) {
|
|
tmp12 = diff1 <= onEndReachedThreshold * scrollLength;
|
|
}
|
|
set$(state, "isNearEnd", tmp12);
|
|
let tmp14 = tmp8;
|
|
if (tmp2 >= scrollLength) {
|
|
tmp14 = diff1 <= props.maintainScrollAtEndThreshold * scrollLength;
|
|
}
|
|
set$(state, "isWithinMaintainScrollAtEndThreshold", tmp14);
|
|
let initialScroll;
|
|
if (null != state) {
|
|
initialScroll = state.initialScroll;
|
|
}
|
|
if (!tmp18) {
|
|
const result = onEndReachedThreshold * scrollLength;
|
|
({ isEndReached, endReachedSnapshot } = state);
|
|
let obj = { contentSize: null, dataLength: null, scrollPosition: null };
|
|
obj[0] = tmp2;
|
|
const data = state.props.data;
|
|
let length;
|
|
if (null != data) {
|
|
length = data.length;
|
|
}
|
|
obj[1] = length;
|
|
obj[2] = scroll;
|
|
state.isEndReached = checkThreshold(diff1, tmp8, result, isEndReached, endReachedSnapshot, obj, (arg0) => {
|
|
const edgeReachedGate = state.state.edgeReachedGate;
|
|
let tmp4 = !edgeReachedGate;
|
|
if (edgeReachedGate) {
|
|
tmp4 = tmp2 === "end";
|
|
}
|
|
if (!tmp4) {
|
|
tmp4 = closure_2;
|
|
}
|
|
if (tmp4) {
|
|
state.state.edgeReachedGate = "closed";
|
|
const props = state.props;
|
|
const onEndReached = props.onEndReached;
|
|
if (null != onEndReached) {
|
|
const call = onEndReached.call;
|
|
const obj = { distanceFromEnd: null };
|
|
obj[0] = arg0;
|
|
if (typeof call === "unknown") {
|
|
onEndReached(obj);
|
|
} else {
|
|
call(props, obj);
|
|
}
|
|
}
|
|
}
|
|
}, (endReachedSnapshot) => {
|
|
state.endReachedSnapshot = endReachedSnapshot;
|
|
});
|
|
const tmp19 = checkThreshold;
|
|
}
|
|
tmp18 = initialScroll && !state.didFinishInitialScroll || maintainingScrollAtEnd;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function checkThresholds(state, arg1) {
|
|
let isStartReached;
|
|
let props;
|
|
let scroll;
|
|
let startReachedSnapshot;
|
|
let totalSize;
|
|
checkAtBottom(state, arg1, !state.state.edgeReachedGate);
|
|
let closure_0 = state;
|
|
let closure_1 = arg1;
|
|
const _classCallCheck = tmp;
|
|
state = undefined;
|
|
state = undefined;
|
|
if (null != state) {
|
|
state = state.state;
|
|
}
|
|
if (state) {
|
|
({ isStartReached, props, scroll, startReachedSnapshot, totalSize } = state);
|
|
const result = props.onStartReachedThreshold * state.scrollLength;
|
|
resetSharedEdgeGateIfOutsideHysteresis(state);
|
|
if (isStartReached) {
|
|
isStartReached = result > 0;
|
|
}
|
|
if (isStartReached) {
|
|
isStartReached = scroll > result;
|
|
}
|
|
if (isStartReached) {
|
|
isStartReached = startReachedSnapshot;
|
|
}
|
|
if (isStartReached) {
|
|
isStartReached = startReachedSnapshot.contentSize !== totalSize || startReachedSnapshot.dataLength !== length;
|
|
const tmp7 = startReachedSnapshot.contentSize !== totalSize || startReachedSnapshot.dataLength !== length;
|
|
}
|
|
if (isStartReached) {
|
|
state.isStartReached = false;
|
|
state.startReachedSnapshot = undefined;
|
|
}
|
|
set$(state, "isAtStart", scroll <= 1);
|
|
set$(state, "isNearStart", scroll <= result);
|
|
let initialScroll;
|
|
if (null != state) {
|
|
initialScroll = state.initialScroll;
|
|
}
|
|
if (!tmp12) {
|
|
let obj = { contentSize: null, dataLength: null, scrollPosition: null };
|
|
obj[0] = totalSize;
|
|
obj[1] = length;
|
|
obj[2] = scroll;
|
|
state.isStartReached = checkThreshold(scroll, false, result, state.isStartReached, startReachedSnapshot, obj, (arg0) => {
|
|
const edgeReachedGate = state.state.edgeReachedGate;
|
|
let tmp4 = !edgeReachedGate;
|
|
if (edgeReachedGate) {
|
|
tmp4 = tmp2 === "start";
|
|
}
|
|
if (!tmp4) {
|
|
tmp4 = closure_2;
|
|
}
|
|
if (tmp4) {
|
|
state.state.edgeReachedGate = "closed";
|
|
const props = state.props;
|
|
const onStartReached = props.onStartReached;
|
|
if (null != onStartReached) {
|
|
const call = onStartReached.call;
|
|
const obj = { distanceFromStart: null };
|
|
obj[0] = arg0;
|
|
if (typeof call === "unknown") {
|
|
onStartReached(obj);
|
|
} else {
|
|
call(props, obj);
|
|
}
|
|
}
|
|
}
|
|
}, (startReachedSnapshot) => {
|
|
state.startReachedSnapshot = startReachedSnapshot;
|
|
});
|
|
}
|
|
tmp12 = initialScroll && !state.didFinishInitialScroll || state.scrollingTo;
|
|
}
|
|
}
|
|
function scheduleAdaptiveRenderExit(state, arg1) {
|
|
let closure_0 = state;
|
|
state = state.state;
|
|
const state2 = state.state;
|
|
const timeoutAdaptiveRender = state2.timeoutAdaptiveRender;
|
|
if (undefined !== timeoutAdaptiveRender) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutAdaptiveRender);
|
|
let timeouts = state2.timeouts;
|
|
timeouts.delete(timeoutAdaptiveRender);
|
|
state2.timeoutAdaptiveRender = undefined;
|
|
}
|
|
if (arg1 <= 0) {
|
|
let values = state.values;
|
|
if (values.get("adaptiveRender") !== "normal") {
|
|
set$(state, "adaptiveRender", "normal");
|
|
let adaptiveRender = state.state.props.adaptiveRender;
|
|
let onChange;
|
|
if (null != adaptiveRender) {
|
|
onChange = adaptiveRender.onChange;
|
|
}
|
|
if (null != onChange) {
|
|
let call = onChange.call;
|
|
if (typeof call === "unknown") {
|
|
onChange("normal", "scroll");
|
|
} else {
|
|
call(adaptiveRender, "normal", "scroll");
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
const _setTimeout = setTimeout;
|
|
const timerId = setTimeout(() => {
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.timeoutAdaptiveRender = undefined;
|
|
const values = state.values;
|
|
if (values.get("adaptiveRender") !== "normal") {
|
|
outer1_22(tmp2, "adaptiveRender", "normal");
|
|
const adaptiveRender = tmp2.state.props.adaptiveRender;
|
|
let onChange;
|
|
if (null != adaptiveRender) {
|
|
onChange = adaptiveRender.onChange;
|
|
}
|
|
if (null != onChange) {
|
|
const call = onChange.call;
|
|
if (typeof call === "unknown") {
|
|
onChange("normal", "scroll");
|
|
} else {
|
|
call(adaptiveRender, "normal", "scroll");
|
|
}
|
|
}
|
|
}
|
|
}, arg1);
|
|
state.timeoutAdaptiveRender = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
}
|
|
}
|
|
function resetAdaptiveRender(context) {
|
|
const state = context.state;
|
|
const timeoutAdaptiveRender = state.timeoutAdaptiveRender;
|
|
if (undefined !== timeoutAdaptiveRender) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutAdaptiveRender);
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timeoutAdaptiveRender);
|
|
state.timeoutAdaptiveRender = undefined;
|
|
}
|
|
const adaptiveRender = context.state.props.adaptiveRender;
|
|
let initialMode;
|
|
if (null != adaptiveRender) {
|
|
initialMode = adaptiveRender.initialMode;
|
|
}
|
|
let str = "normal";
|
|
if (null != initialMode) {
|
|
str = initialMode;
|
|
}
|
|
let values = context.values;
|
|
if (values.get("adaptiveRender") !== str) {
|
|
values = context.values;
|
|
if (values.get("adaptiveRender") !== str) {
|
|
set$(context, "adaptiveRender", str);
|
|
const adaptiveRender2 = context.state.props.adaptiveRender;
|
|
let onChange;
|
|
if (null != adaptiveRender2) {
|
|
onChange = adaptiveRender2.onChange;
|
|
}
|
|
if (null != onChange) {
|
|
const call = onChange.call;
|
|
if (typeof call === "unknown") {
|
|
onChange(str, "initial");
|
|
} else {
|
|
call(adaptiveRender2, str, "initial");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function getEffectiveDrawDistance(state) {
|
|
const drawDistance = state.state.props.drawDistance;
|
|
const initialScroll = state.state.initialScroll;
|
|
let tmp = undefined !== initialScroll;
|
|
if (tmp) {
|
|
const viewPosition = initialScroll.viewPosition;
|
|
let num2 = 0;
|
|
if (null != viewPosition) {
|
|
num2 = viewPosition;
|
|
}
|
|
tmp = num2 > 0;
|
|
}
|
|
if ("visible-first" === arg1) {
|
|
const _Math = Math;
|
|
let bound = Math.min(drawDistance, 50);
|
|
} else {
|
|
bound = drawDistance;
|
|
if ("full" !== arg1) {
|
|
const values = state.values;
|
|
bound = drawDistance;
|
|
if (!values.get("readyToRender")) {
|
|
bound = drawDistance;
|
|
}
|
|
}
|
|
}
|
|
return bound;
|
|
}
|
|
function setInitialRenderState(state, didLayout) {
|
|
state = state.state;
|
|
const onLoad = state.props.onLoad;
|
|
if (didLayout.didLayout) {
|
|
state.didContainersLayout = true;
|
|
}
|
|
if (didLayout.didInitialScroll) {
|
|
state.didFinishInitialScroll = true;
|
|
}
|
|
let didFinishInitialScroll = state.didContainersLayout;
|
|
if (didFinishInitialScroll) {
|
|
didFinishInitialScroll = state.didFinishInitialScroll;
|
|
}
|
|
let BooleanResult = Boolean(didFinishInitialScroll);
|
|
if (BooleanResult) {
|
|
let values = state.values;
|
|
BooleanResult = !values.get("readyToRender");
|
|
}
|
|
if (BooleanResult) {
|
|
set$(state, "readyToRender", true);
|
|
values = state.values;
|
|
if (values.get("adaptiveRender") !== "normal") {
|
|
tmp2(state, "adaptiveRender", "normal");
|
|
const adaptiveRender = state.state.props.adaptiveRender;
|
|
let onChange;
|
|
if (null != adaptiveRender) {
|
|
onChange = adaptiveRender.onChange;
|
|
}
|
|
if (null != onChange) {
|
|
const call = onChange.call;
|
|
if (typeof call === "unknown") {
|
|
onChange("normal", "ready");
|
|
} else {
|
|
call(adaptiveRender, "normal", "ready");
|
|
}
|
|
}
|
|
}
|
|
if (state.props.drawDistance > 50) {
|
|
const state2 = state.state;
|
|
if (!tmp8) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
state2.queuedFullDrawDistancePrewarm = requestAnimationFrame(() => {
|
|
state6.queuedFullDrawDistancePrewarm = undefined;
|
|
const triggerCalculateItemsInView = state6.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state6);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
tmp8 = state2.props.drawDistance <= 50 || undefined !== state2.queuedFullDrawDistancePrewarm;
|
|
}
|
|
if (!state.didLoad) {
|
|
state.didLoad = true;
|
|
if (onLoad) {
|
|
const obj = { elapsedTimeInMs: null };
|
|
const _Date = Date;
|
|
obj[0] = Date.now() - state.loadStartTime;
|
|
onLoad(obj);
|
|
}
|
|
}
|
|
tmp2 = set$;
|
|
}
|
|
}
|
|
function finishInitialScroll(state, resolvedOffset) {
|
|
let closure_0 = state;
|
|
let closure_1 = resolvedOffset;
|
|
state = state.state;
|
|
if (undefined !== resolvedOffset.resolvedOffset) {
|
|
resolvedOffset = resolvedOffset.resolvedOffset;
|
|
state.scroll = resolvedOffset;
|
|
state.scrollPending = resolvedOffset;
|
|
state.scrollPrev = resolvedOffset;
|
|
} else if (resolvedOffset.syncObservedOffset) {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" === kind) {
|
|
const current = state.refScroller.current;
|
|
let prop;
|
|
if (null != current) {
|
|
prop = current.getCurrentScrollOffset;
|
|
}
|
|
if (null == prop) {
|
|
let isFiniteResult = typeof undefined === "number";
|
|
if (typeof undefined === "number") {
|
|
const _Number = Number;
|
|
isFiniteResult = Number.isFinite(undefined);
|
|
}
|
|
if (isFiniteResult) {
|
|
state.scroll = undefined;
|
|
state.scrollPending = undefined;
|
|
state.scrollPrev = undefined;
|
|
}
|
|
} else {
|
|
let call = prop.call;
|
|
typeof call === "unknown" ? prop() : call(current);
|
|
}
|
|
}
|
|
}
|
|
function complete() {
|
|
let scrollPending = resolvedOffset.resolvedOffset;
|
|
if (null == scrollPending) {
|
|
scrollPending = state.scrollPending;
|
|
}
|
|
if (null == scrollPending) {
|
|
const scroll = state.scroll;
|
|
}
|
|
outer1_37.clear(state);
|
|
if (resolvedOffset.preserveTarget) {
|
|
if (tmp4.initialScroll) {
|
|
tmp4.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
outer1_38(tmp4);
|
|
if (undefined !== tmp4.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout2 = clearTimeout;
|
|
clearTimeout(tmp4.timeoutPreservedInitialScrollClear);
|
|
tmp4.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
if (tmp.schedulePreservedTargetClear) {
|
|
const _setTimeout = setTimeout;
|
|
tmp4.timeoutPreservedInitialScrollClear = setTimeout(() => {
|
|
obj.timeoutPreservedInitialScrollClear = undefined;
|
|
let initialScroll = obj.didFinishInitialScroll;
|
|
if (initialScroll) {
|
|
const scrollingTo = tmp.scrollingTo;
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
initialScroll = !isInitialScroll;
|
|
}
|
|
if (initialScroll) {
|
|
initialScroll = tmp.initialScroll;
|
|
}
|
|
if (initialScroll) {
|
|
if (undefined !== tmp.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(tmp.timeoutPreservedInitialScrollClear);
|
|
tmp.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
tmp.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
tmp.initialScroll = undefined;
|
|
outer1_38(tmp);
|
|
}
|
|
}, 2000);
|
|
}
|
|
}
|
|
if (!tmp.recalculateItems) {
|
|
outer1_47(state, { didInitialScroll: true });
|
|
const onFinished = tmp.onFinished;
|
|
if (null != onFinished) {
|
|
const call2 = onFinished.call;
|
|
if (typeof call2 === "unknown") {
|
|
onFinished();
|
|
} else {
|
|
call2(tmp);
|
|
}
|
|
}
|
|
} else {
|
|
state = state.state;
|
|
let triggerCalculateItemsInView = state.props;
|
|
let data;
|
|
if (null != triggerCalculateItemsInView) {
|
|
data = triggerCalculateItemsInView.data;
|
|
}
|
|
if (data) {
|
|
triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
let obj = { forceFullItemPositions: true };
|
|
if (typeof call !== "unknown") {
|
|
call(state, obj);
|
|
}
|
|
}
|
|
const result = triggerCalculateItemsInView(obj);
|
|
}
|
|
obj = outer1_43;
|
|
outer1_43(state);
|
|
const tmp14 = state;
|
|
}
|
|
}
|
|
if (undefined !== state.timeoutPreservedInitialScrollClear) {
|
|
let _clearTimeout = clearTimeout;
|
|
clearTimeout(tmp4.timeoutPreservedInitialScrollClear);
|
|
tmp4.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
state.initialScroll = undefined;
|
|
outer1_38(state);
|
|
}
|
|
if (resolvedOffset.waitForCompletionFrame) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(complete);
|
|
} else {
|
|
complete();
|
|
}
|
|
}
|
|
function getId(props) {
|
|
let data;
|
|
let keyExtractor;
|
|
({ data, keyExtractor } = props.props);
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (arg1 < data.length) {
|
|
let keyExtractorResult = arg1;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[arg1], arg1);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
props.idCache[arg1] = tmp2;
|
|
return tmp2;
|
|
} else {
|
|
return "";
|
|
}
|
|
}
|
|
function updateContentMetricsState(state) {
|
|
let state2;
|
|
let values2;
|
|
const values = state.values;
|
|
state = state.state;
|
|
let num = 0;
|
|
if (state.props.alignItemsAtEndPaddingEnabled) {
|
|
num = 0;
|
|
if (!state.props.horizontal) {
|
|
num = 0;
|
|
if (state.props.data.length > 0) {
|
|
num = 0;
|
|
if (state.scrollLength > 0) {
|
|
({ state: state2, values: values2 } = state);
|
|
const tmp3 = values2.get("headerSize") || 0;
|
|
let totalSize = state2.pendingTotalSize;
|
|
const sum = tmp3 + (values2.get("footerSize") || 0);
|
|
if (null == totalSize) {
|
|
totalSize = state2.totalSize;
|
|
}
|
|
if (null == totalSize) {
|
|
totalSize = values2.get("totalSize");
|
|
}
|
|
let num2 = 0;
|
|
if (null != totalSize) {
|
|
num2 = totalSize;
|
|
}
|
|
let num3 = state2.props.stylePaddingTop;
|
|
const sum1 = sum + num2;
|
|
if (!num3) {
|
|
num3 = 0;
|
|
}
|
|
let num4 = state2.props.stylePaddingBottom;
|
|
const sum2 = sum1 + num3;
|
|
if (!num4) {
|
|
num4 = 0;
|
|
}
|
|
const diff = state.scrollLength - (sum2 + num4);
|
|
num = Math.max(0, diff - getContentInsetEnd(state));
|
|
const tmp4 = values2.get("footerSize") || 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp !== num) {
|
|
set$(state, "alignItemsAtEndPadding", num);
|
|
}
|
|
}
|
|
function setSize(state, itemKey, result, arg3) {
|
|
let flag = arg3;
|
|
if (arg3 === undefined) {
|
|
flag = true;
|
|
}
|
|
const sizes = state.state.sizes;
|
|
const value = sizes.get(itemKey);
|
|
let diff = result;
|
|
if (undefined !== value) {
|
|
diff = result - value;
|
|
}
|
|
if (0 !== diff) {
|
|
if (flag === undefined) {
|
|
flag = true;
|
|
}
|
|
state = state.state;
|
|
const totalSize = state.totalSize;
|
|
if (null === itemKey) {
|
|
let sum = diff;
|
|
if (state.timeoutSetPaddingTop) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state.timeoutSetPaddingTop);
|
|
state.timeoutSetPaddingTop = undefined;
|
|
sum = diff;
|
|
}
|
|
} else {
|
|
sum = tmp3 + diff;
|
|
}
|
|
if (totalSize !== sum) {
|
|
if (!closure_27) {
|
|
if (state.initialScroll) {
|
|
if (sum < totalSize) {
|
|
state.pendingTotalSize = sum;
|
|
}
|
|
}
|
|
}
|
|
state.pendingTotalSize = undefined;
|
|
state.totalSize = sum;
|
|
if (flag) {
|
|
set$(state, "totalSize", sum);
|
|
}
|
|
updateContentMetricsState(state);
|
|
} else {
|
|
let tmp8 = flag;
|
|
if (flag) {
|
|
const values = state.values;
|
|
tmp8 = values.get("totalSize") !== sum;
|
|
}
|
|
if (tmp8) {
|
|
set$(state, "totalSize", sum);
|
|
}
|
|
}
|
|
}
|
|
result = sizes.set(itemKey, result);
|
|
}
|
|
function isFunction(fn) {
|
|
return typeof fn === "function";
|
|
}
|
|
function isNullOrUndefined(arg0) {
|
|
return null == arg0;
|
|
}
|
|
function extractPadding(paddingVertical, paddingVertical2, Bottom) {
|
|
if ("Left" !== Bottom) {
|
|
if ("Right" !== Bottom) {
|
|
let paddingHorizontal = paddingVertical.paddingVertical;
|
|
}
|
|
const _HermesInternal = HermesInternal;
|
|
const tmp3 = paddingVertical["padding" + Bottom];
|
|
if (null != tmp3) {
|
|
paddingHorizontal = tmp3;
|
|
}
|
|
if (null == paddingHorizontal) {
|
|
paddingHorizontal = paddingVertical.padding;
|
|
}
|
|
let num = 0;
|
|
if (null != paddingHorizontal) {
|
|
num = paddingHorizontal;
|
|
}
|
|
if (!tmp) {
|
|
if ("Right" !== Bottom) {
|
|
let paddingHorizontal2 = paddingVertical2.paddingVertical;
|
|
}
|
|
const _HermesInternal2 = HermesInternal;
|
|
const tmp6 = paddingVertical2["padding" + Bottom];
|
|
if (null != tmp6) {
|
|
paddingHorizontal2 = tmp6;
|
|
}
|
|
if (null == paddingHorizontal2) {
|
|
paddingHorizontal2 = paddingVertical2.padding;
|
|
}
|
|
let num2 = 0;
|
|
if (null != paddingHorizontal2) {
|
|
num2 = paddingHorizontal2;
|
|
}
|
|
return num + num2;
|
|
}
|
|
paddingHorizontal2 = paddingVertical2.paddingHorizontal;
|
|
}
|
|
paddingHorizontal = paddingVertical.paddingHorizontal;
|
|
}
|
|
function findContainerId(state, key) {
|
|
state = state.state;
|
|
let containerItemKeys;
|
|
if (null != state) {
|
|
containerItemKeys = state.containerItemKeys;
|
|
}
|
|
let value;
|
|
if (null != containerItemKeys) {
|
|
value = containerItemKeys.get(key);
|
|
}
|
|
if (undefined !== value) {
|
|
return value;
|
|
} else {
|
|
let values = state.values;
|
|
value = values.get("numContainers");
|
|
let num = 0;
|
|
if (0 < value) {
|
|
const _HermesInternal = HermesInternal;
|
|
values = state.values;
|
|
while (values.get("containerItemKey" + num) !== key) {
|
|
num = num + 1;
|
|
}
|
|
return num;
|
|
}
|
|
return -1;
|
|
}
|
|
}
|
|
function getKnownOrFixedItemSize(state, sum1) {
|
|
let data;
|
|
let getFixedItemSize;
|
|
let getItemType;
|
|
let keyExtractor;
|
|
state = state.state;
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp = null;
|
|
if (sum1 < data.length) {
|
|
let keyExtractorResult = sum1;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[sum1], sum1);
|
|
}
|
|
tmp = keyExtractorResult;
|
|
}
|
|
state.idCache[sum1] = tmp;
|
|
str = tmp;
|
|
}
|
|
const state2 = state.state;
|
|
({ getFixedItemSize, getItemType } = state2.props);
|
|
let value;
|
|
if (str) {
|
|
const sizesKnown = state2.sizesKnown;
|
|
value = sizesKnown.get(str);
|
|
}
|
|
let tmp5 = value;
|
|
if (undefined === value) {
|
|
tmp5 = value;
|
|
if (str) {
|
|
tmp5 = value;
|
|
if (getFixedItemSize) {
|
|
let str2 = "";
|
|
if (getItemType) {
|
|
const itemType = getItemType(tmp3, sum1);
|
|
str2 = "";
|
|
if (null != itemType) {
|
|
str2 = itemType;
|
|
}
|
|
}
|
|
const fixedItemSize = getFixedItemSize(tmp3, sum1, str2);
|
|
tmp5 = value;
|
|
if (undefined !== fixedItemSize) {
|
|
const sum = fixedItemSize + state.scrollAxisGap;
|
|
const sizesKnown2 = state2.sizesKnown;
|
|
const result = sizesKnown2.set(str, sum);
|
|
tmp5 = sum;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return tmp5;
|
|
}
|
|
function getItemSize(state, itemKey, clearTimeoutResult, arg3, arg4, arg5, arg6, itemType) {
|
|
let averageSizes;
|
|
let getFixedItemSize;
|
|
let getItemType2;
|
|
let props;
|
|
let scrollingTo;
|
|
let sizes;
|
|
let sizesKnown;
|
|
state = state.state;
|
|
({ sizes, props } = state);
|
|
const getItemType = props.getItemType;
|
|
({ scrollingTo, sizesKnown, averageSizes } = state);
|
|
let value = sizesKnown.get(itemKey);
|
|
if (undefined !== value) {
|
|
return value;
|
|
} else {
|
|
value = sizes.get(itemKey);
|
|
if (arg5) {
|
|
if (undefined !== value) {
|
|
return value;
|
|
}
|
|
}
|
|
const state2 = state.state;
|
|
({ getFixedItemSize, getItemType: getItemType2 } = state2.props);
|
|
let value1;
|
|
if (itemKey) {
|
|
const sizesKnown2 = state2.sizesKnown;
|
|
value1 = sizesKnown2.get(itemKey);
|
|
}
|
|
let tmp6 = value1;
|
|
if (undefined === value1) {
|
|
tmp6 = value1;
|
|
if (itemKey) {
|
|
tmp6 = value1;
|
|
if (getFixedItemSize) {
|
|
itemType = undefined;
|
|
if (null != itemType) {
|
|
itemType = itemType.itemType;
|
|
}
|
|
if (null == itemType) {
|
|
let str2 = "";
|
|
if (getItemType2) {
|
|
const itemType2 = getItemType2(arg3, clearTimeoutResult);
|
|
str2 = "";
|
|
if (null != itemType2) {
|
|
str2 = itemType2;
|
|
}
|
|
}
|
|
itemType = str2;
|
|
}
|
|
let prop;
|
|
if (null != itemType) {
|
|
prop = itemType.didResolveFixedItemSize;
|
|
}
|
|
const tmp11 = prop ? itemType.fixedItemSize : getFixedItemSize(arg3, clearTimeoutResult, itemType);
|
|
tmp6 = value1;
|
|
if (undefined !== tmp11) {
|
|
const sum = tmp11 + state.scrollAxisGap;
|
|
const sizesKnown3 = state2.sizesKnown;
|
|
const result = sizesKnown3.set(itemKey, sum);
|
|
tmp6 = sum;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (undefined !== tmp6) {
|
|
setSize(state, itemKey, tmp6, arg6);
|
|
return tmp6;
|
|
} else {
|
|
let itemType1;
|
|
if (null != itemType) {
|
|
itemType1 = itemType.itemType;
|
|
}
|
|
if (null == itemType1) {
|
|
let str4 = "";
|
|
if (getItemType) {
|
|
const itemType3 = getItemType(arg3, clearTimeoutResult);
|
|
str4 = "";
|
|
if (null != itemType3) {
|
|
str4 = itemType3;
|
|
}
|
|
}
|
|
itemType1 = str4;
|
|
}
|
|
let result1 = tmp6;
|
|
if (arg4) {
|
|
result1 = tmp6;
|
|
if (!scrollingTo) {
|
|
let avg;
|
|
if (null != averageSizes[itemType1]) {
|
|
avg = tmp19.avg;
|
|
}
|
|
result1 = tmp6;
|
|
if (undefined !== avg) {
|
|
const _Math = Math;
|
|
result1 = Math.floor(8 * avg) / 8;
|
|
}
|
|
}
|
|
}
|
|
if (undefined === result1) {
|
|
if (undefined !== value) {
|
|
return value;
|
|
}
|
|
}
|
|
let result2 = result1;
|
|
if (undefined === result1) {
|
|
result2 = result1;
|
|
if (arg4) {
|
|
result2 = result1;
|
|
if (scrollingTo) {
|
|
const averageSizeSnapshot = scrollingTo.averageSizeSnapshot;
|
|
let tmp24;
|
|
if (null != averageSizeSnapshot) {
|
|
tmp24 = averageSizeSnapshot[itemType1];
|
|
}
|
|
result2 = result1;
|
|
if (undefined !== tmp24) {
|
|
const _Math2 = Math;
|
|
result2 = Math.floor(8 * tmp24) / 8;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (undefined === result2) {
|
|
result2 = props.estimatedItemSize + state.scrollAxisGap;
|
|
}
|
|
setSize(state, itemKey, result2, arg6);
|
|
return result2;
|
|
}
|
|
}
|
|
}
|
|
function calculateOffsetWithOffsetPosition(ctx, offset, scrollingTo) {
|
|
let data;
|
|
let index;
|
|
let keyExtractor;
|
|
let viewOffset;
|
|
let viewPosition;
|
|
const state = ctx.state;
|
|
({ index, viewOffset, viewPosition } = scrollingTo);
|
|
let diff = offset;
|
|
if (viewOffset) {
|
|
diff = offset - viewOffset;
|
|
}
|
|
let sum2 = diff;
|
|
if (undefined !== index) {
|
|
let values = ctx.values;
|
|
values = ctx.values;
|
|
const tmp4 = values.get("stylePaddingTop") || 0;
|
|
values = ctx.values;
|
|
const sum = tmp4 + (values.get("alignItemsAtEndPadding") || 0);
|
|
const tmp5 = values.get("alignItemsAtEndPadding") || 0;
|
|
const sum1 = sum + (values.get("headerSize") || 0);
|
|
sum2 = diff;
|
|
if (sum1) {
|
|
sum2 = diff + sum1;
|
|
}
|
|
const tmp7 = values.get("headerSize") || 0;
|
|
}
|
|
let sum3 = sum2;
|
|
if (undefined !== viewPosition) {
|
|
sum3 = sum2;
|
|
if (tmp2) {
|
|
if (0 === state.props.data.length) {
|
|
return sum2;
|
|
} else {
|
|
const estimatedItemSize = state.props.estimatedItemSize;
|
|
let num2 = 0;
|
|
if (null != estimatedItemSize) {
|
|
num2 = estimatedItemSize;
|
|
}
|
|
if (!(index < 0 || index >= length)) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str4 = "";
|
|
if (data) {
|
|
let tmp13 = null;
|
|
if (index < data.length) {
|
|
let keyExtractorResult = index;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[index], index);
|
|
}
|
|
tmp13 = keyExtractorResult;
|
|
}
|
|
state.idCache[index] = tmp13;
|
|
str4 = tmp13;
|
|
}
|
|
num2 = getItemSize(ctx, str4, index, state.props.data[index]);
|
|
const tmp12 = getItemSize;
|
|
}
|
|
const diff1 = sum2 - viewPosition * (state.scrollLength - getContentInsetEnd(ctx) - num2);
|
|
sum3 = diff1;
|
|
if (!(index < 0 || index >= length)) {
|
|
sum3 = diff1;
|
|
if (index === state.props.data.length - 1) {
|
|
const values1 = ctx.values;
|
|
sum3 = diff1 + (values1.get("footerSize") || 0);
|
|
const tmp20 = values1.get("footerSize") || 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return sum3;
|
|
}
|
|
function finishScrollTo(state) {
|
|
let totalSize;
|
|
let totalSize2;
|
|
state = state.state;
|
|
let scrollingTo;
|
|
if (null != state) {
|
|
scrollingTo = state.scrollingTo;
|
|
}
|
|
if (scrollingTo) {
|
|
const pendingScrollResolve = state.pendingScrollResolve;
|
|
state.pendingScrollResolve = undefined;
|
|
scrollingTo = state.scrollingTo;
|
|
state.scrollHistory.length = 0;
|
|
state.scrollingTo = undefined;
|
|
state.scrollTargetPinnedRange = undefined;
|
|
if (undefined !== state.pendingTotalSize) {
|
|
const pendingTotalSize = state.pendingTotalSize;
|
|
const state3 = state.state;
|
|
({ totalSize, totalSize: totalSize2 } = state3);
|
|
if (state3.timeoutSetPaddingTop) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state3.timeoutSetPaddingTop);
|
|
state3.timeoutSetPaddingTop = undefined;
|
|
}
|
|
if (totalSize !== pendingTotalSize) {
|
|
if (!closure_27) {
|
|
if (state3.initialScroll) {
|
|
if (pendingTotalSize < totalSize) {
|
|
state3.pendingTotalSize = pendingTotalSize;
|
|
}
|
|
}
|
|
}
|
|
state3.pendingTotalSize = undefined;
|
|
state3.totalSize = pendingTotalSize;
|
|
set$(state, "totalSize", pendingTotalSize);
|
|
updateContentMetricsState(state);
|
|
} else {
|
|
const values = state.values;
|
|
if (values.get("totalSize") !== pendingTotalSize) {
|
|
set$(state, "totalSize", pendingTotalSize);
|
|
}
|
|
}
|
|
}
|
|
state.scrollAdjustHandler.commitPendingAdjust(scrollingTo);
|
|
if (!scrollingTo.isInitialScroll) {
|
|
if (!state.initialScroll) {
|
|
const state2 = state.state;
|
|
const props = state2.props;
|
|
let data;
|
|
if (null != props) {
|
|
data = props.data;
|
|
}
|
|
if (data) {
|
|
const triggerCalculateItemsInView = state2.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
let obj = { forceFullItemPositions: true };
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView(obj);
|
|
} else {
|
|
call(state2, obj);
|
|
}
|
|
}
|
|
}
|
|
checkThresholds(state);
|
|
if (null != pendingScrollResolve) {
|
|
pendingScrollResolve();
|
|
}
|
|
}
|
|
}
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let tmp18 = scrollingTo.isInitialScroll && !state.clearPreservedInitialScrollOnNextFinish && state.props.data.length > 0;
|
|
if (tmp18) {
|
|
const initialScroll = state.initialScroll;
|
|
let viewPosition;
|
|
if (null != initialScroll) {
|
|
viewPosition = initialScroll.viewPosition;
|
|
}
|
|
tmp18 = 1 === viewPosition;
|
|
}
|
|
obj = { onFinished: null, preserveTarget: null, recalculateItems: true, schedulePreservedTargetClear: null, syncObservedOffset: null, waitForCompletionFrame: null };
|
|
obj[0] = function onFinished() {
|
|
if (null != pendingScrollResolve) {
|
|
tmp();
|
|
}
|
|
};
|
|
let tmp22 = tmp20;
|
|
if ("offset" === kind) {
|
|
tmp22 = 0 === state.props.data.length;
|
|
}
|
|
if (!tmp22) {
|
|
tmp22 = tmp18;
|
|
}
|
|
obj[1] = tmp22;
|
|
obj[3] = tmp18;
|
|
obj[4] = "offset" === kind;
|
|
obj[5] = scrollingTo.waitForInitialScrollCompletionFrame;
|
|
finishInitialScroll(state, obj);
|
|
}
|
|
}
|
|
function shouldFinishInitialScrollWithoutNativeProgress(state, scrollingTo) {
|
|
if (scrollingTo.isInitialScroll) {
|
|
if (!scrollingTo.animated) {
|
|
if (state.didContainersLayout) {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("bootstrap" === kind) {
|
|
return false;
|
|
} else {
|
|
let offset = scrollingTo.targetOffset;
|
|
if (null == offset) {
|
|
offset = scrollingTo.offset;
|
|
}
|
|
let result = store.hasNonZeroTargetOffset(offset);
|
|
if (result) {
|
|
result = closure_36.didDispatchNativeScroll(state);
|
|
}
|
|
if (result) {
|
|
result = !state.hasScrolled;
|
|
}
|
|
let tmp7 = !result;
|
|
if (!result) {
|
|
let isAtZeroTargetOffsetResult = obj.isAtZeroTargetOffset(offset);
|
|
if (!isAtZeroTargetOffsetResult) {
|
|
const _Math = Math;
|
|
isAtZeroTargetOffsetResult = Math.abs(state.scroll - offset) > 1;
|
|
}
|
|
if (!isAtZeroTargetOffsetResult) {
|
|
const _Math2 = Math;
|
|
isAtZeroTargetOffsetResult = Math.abs(state.scrollPending - offset) > 1;
|
|
}
|
|
let tmp11 = !isAtZeroTargetOffsetResult;
|
|
if (!isAtZeroTargetOffsetResult) {
|
|
let prop = scrollingTo.waitForInitialScrollCompletionFrame;
|
|
if (!prop) {
|
|
const value = obj.get(state);
|
|
if (null != value) {
|
|
const targetOffset = value.targetOffset;
|
|
}
|
|
const didFinishInitialScroll = state.didFinishInitialScroll;
|
|
let result1 = !didFinishInitialScroll;
|
|
if (!didFinishInitialScroll) {
|
|
result1 = obj.hasNonZeroTargetOffset(targetOffset);
|
|
}
|
|
prop = result1;
|
|
}
|
|
tmp11 = prop;
|
|
}
|
|
tmp7 = tmp11;
|
|
}
|
|
return tmp7;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
function getResolvedScrollCompletionState(state, index) {
|
|
let offset;
|
|
let scrollAdjustHandler;
|
|
let scrollPending;
|
|
let viewOffset;
|
|
({ scrollPending, scrollAdjustHandler } = state.state);
|
|
index = index.index;
|
|
let tmp2 = index.index === state.state.props.data.length - 1;
|
|
const adjust = scrollAdjustHandler.getAdjust();
|
|
if (tmp2) {
|
|
tmp2 = 1 === index.viewPosition;
|
|
}
|
|
if (tmp2) {
|
|
let num = undefined !== index;
|
|
if (num) {
|
|
if (num) {
|
|
num = state.state.positions[index];
|
|
}
|
|
if (!num) {
|
|
num = 0;
|
|
}
|
|
let targetOffset = calculateOffsetWithOffsetPosition(state, num, index);
|
|
const tmp10 = calculateOffsetWithOffsetPosition;
|
|
}
|
|
const state2 = state.state;
|
|
const tmp12 = getContentSize(state);
|
|
const _Number3 = Number;
|
|
let bound1 = targetOffset;
|
|
if (Number.isFinite(tmp12)) {
|
|
const _Number4 = Number;
|
|
bound1 = targetOffset;
|
|
if (Number.isFinite(state2.scrollLength)) {
|
|
bound1 = targetOffset;
|
|
if (state2.lastLayout) {
|
|
const _Math4 = Math;
|
|
viewOffset = undefined;
|
|
const bound = Math.max(0, tmp12 - state2.scrollLength);
|
|
if (null != index) {
|
|
viewOffset = index.viewOffset;
|
|
}
|
|
let num6 = 0;
|
|
if (typeof viewOffset === "number") {
|
|
num6 = 0;
|
|
if (viewOffset < 0) {
|
|
num6 = -viewOffset;
|
|
}
|
|
}
|
|
const _Math5 = Math;
|
|
bound1 = Math.min(targetOffset, bound + num6);
|
|
}
|
|
}
|
|
}
|
|
const _Math6 = Math;
|
|
const bound2 = Math.max(0, bound1);
|
|
const state3 = state.state;
|
|
const tmp11Result = getContentSize(state);
|
|
const _Number5 = Number;
|
|
let bound4 = scrollPending;
|
|
if (Number.isFinite(tmp11Result)) {
|
|
const _Number6 = Number;
|
|
bound4 = scrollPending;
|
|
if (Number.isFinite(state3.scrollLength)) {
|
|
bound4 = scrollPending;
|
|
if (state3.lastLayout) {
|
|
const _Math7 = Math;
|
|
let viewOffset1;
|
|
const bound3 = Math.max(0, tmp11Result - state3.scrollLength);
|
|
if (null != index) {
|
|
viewOffset1 = index.viewOffset;
|
|
}
|
|
let num7 = 0;
|
|
if (typeof viewOffset1 === "number") {
|
|
num7 = 0;
|
|
if (viewOffset1 < 0) {
|
|
num7 = -viewOffset1;
|
|
}
|
|
}
|
|
const _Math8 = Math;
|
|
bound4 = Math.min(scrollPending, bound3 + num7);
|
|
}
|
|
}
|
|
}
|
|
const _Math9 = Math;
|
|
const _Math10 = Math;
|
|
const bound5 = Math.max(0, bound4);
|
|
const _Math11 = Math;
|
|
const absolute = Math.abs(scrollPending - bound2);
|
|
const animated = index.animated;
|
|
let flag = !animated;
|
|
const absolute1 = Math.abs(scrollPending - (bound2 + adjust));
|
|
if (animated) {
|
|
flag = false;
|
|
}
|
|
const obj = { clampedTargetOffset: null, isAtResolvedTarget: null };
|
|
obj[0] = bound2;
|
|
const _Math12 = Math;
|
|
let tmp27 = Math.abs(scrollPending - bound5) < 1;
|
|
if (tmp27) {
|
|
let tmp28 = absolute < 1;
|
|
if (!tmp28) {
|
|
if (flag) {
|
|
flag = absolute1 < 1;
|
|
}
|
|
tmp28 = flag;
|
|
}
|
|
tmp27 = tmp28;
|
|
}
|
|
obj[1] = tmp27;
|
|
return obj;
|
|
}
|
|
targetOffset = index.targetOffset;
|
|
if (null == targetOffset) {
|
|
({ viewOffset, offset } = index);
|
|
if (!viewOffset) {
|
|
viewOffset = 0;
|
|
}
|
|
const diff = offset - viewOffset;
|
|
state = state.state;
|
|
const tmp5 = getContentSize(state);
|
|
const _Number = Number;
|
|
let bound7 = diff;
|
|
if (Number.isFinite(tmp5)) {
|
|
const _Number2 = Number;
|
|
bound7 = diff;
|
|
if (Number.isFinite(state.scrollLength)) {
|
|
bound7 = diff;
|
|
if (state.lastLayout) {
|
|
const _Math = Math;
|
|
let viewOffset2;
|
|
const bound6 = Math.max(0, tmp5 - state.scrollLength);
|
|
if (null != index) {
|
|
viewOffset2 = index.viewOffset;
|
|
}
|
|
let num3 = 0;
|
|
if (typeof viewOffset2 === "number") {
|
|
num3 = 0;
|
|
if (viewOffset2 < 0) {
|
|
num3 = -viewOffset2;
|
|
}
|
|
}
|
|
const _Math2 = Math;
|
|
bound7 = Math.min(diff, bound6 + num3);
|
|
}
|
|
}
|
|
}
|
|
const _Math3 = Math;
|
|
targetOffset = Math.max(0, bound7);
|
|
}
|
|
}
|
|
function checkFinishedScrollFallback(state) {
|
|
let closure_0 = state;
|
|
state = state.state;
|
|
let scrollingTo = state.scrollingTo;
|
|
const state2 = state.state;
|
|
let scrollingTo2 = state2.scrollingTo;
|
|
let isInitialScroll;
|
|
if (null != scrollingTo2) {
|
|
isInitialScroll = scrollingTo2.isInitialScroll;
|
|
}
|
|
let tmp2 = isInitialScroll;
|
|
if (tmp2) {
|
|
tmp2 = state2.props.data.length > 0;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = getContentSize(state) <= state2.scrollLength;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = state2.scrollPending <= 1;
|
|
}
|
|
let isInitialScroll1;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll1 = scrollingTo.isInitialScroll;
|
|
}
|
|
let result = isInitialScroll1;
|
|
if (result) {
|
|
result = closure_36.didDispatchNativeScroll(state);
|
|
}
|
|
if (result) {
|
|
result = !state.hasScrolled;
|
|
}
|
|
const _classCallCheck = result;
|
|
let tmp7 = undefined !== scrollingTo;
|
|
if (tmp7) {
|
|
tmp7 = shouldFinishInitialScrollWithoutNativeProgress(state, scrollingTo);
|
|
}
|
|
let isInitialScroll2;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll2 = scrollingTo.isInitialScroll;
|
|
}
|
|
if (isInitialScroll2) {
|
|
isInitialScroll2 = !tmp2;
|
|
}
|
|
if (isInitialScroll2) {
|
|
isInitialScroll2 = !tmp7;
|
|
}
|
|
if (!isInitialScroll2) {
|
|
isInitialScroll2 = !state.didContainersLayout;
|
|
}
|
|
let num5 = 0;
|
|
if (!tmp2) {
|
|
num5 = 0;
|
|
if (!tmp7) {
|
|
let num6 = 16;
|
|
if (!result) {
|
|
let num7 = 100;
|
|
if (isInitialScroll2) {
|
|
num7 = 500;
|
|
}
|
|
num6 = num7;
|
|
}
|
|
num5 = num6;
|
|
}
|
|
}
|
|
state.timeoutCheckFinishedScrollFallback = setTimeout(() => {
|
|
let c0 = 0;
|
|
function checkHasScrolled() {
|
|
checkHasScrolled.timeoutCheckFinishedScrollFallback = undefined;
|
|
const scrollingTo = checkHasScrolled.scrollingTo;
|
|
if (scrollingTo) {
|
|
num11 = num11 + 1;
|
|
let obj = outer2_37;
|
|
let value = outer2_37.get(tmp);
|
|
if (null != value) {
|
|
let targetOffset = value.targetOffset;
|
|
}
|
|
const didFinishInitialScroll = tmp.didFinishInitialScroll;
|
|
let result = !didFinishInitialScroll;
|
|
if (!didFinishInitialScroll) {
|
|
result = obj.hasNonZeroTargetOffset(targetOffset);
|
|
}
|
|
if (result) {
|
|
result = !tmp.hasScrolled;
|
|
}
|
|
let num2 = 5;
|
|
let num3 = 5;
|
|
if (!outer1_2) {
|
|
if (result) {
|
|
num2 = 20;
|
|
}
|
|
num3 = num2;
|
|
}
|
|
state = state.state;
|
|
const scrollingTo2 = state.scrollingTo;
|
|
let isInitialScroll;
|
|
if (null != scrollingTo2) {
|
|
isInitialScroll = scrollingTo2.isInitialScroll;
|
|
}
|
|
let tmp9 = isInitialScroll;
|
|
if (tmp9) {
|
|
tmp9 = state.props.data.length > 0;
|
|
}
|
|
if (tmp9) {
|
|
tmp9 = outer2_25(tmp7) <= state.scrollLength;
|
|
}
|
|
if (tmp9) {
|
|
tmp9 = state.scrollPending <= 1;
|
|
}
|
|
const tmp14 = outer2_62(state, scrollingTo);
|
|
let isAtResolvedTarget = tmp6;
|
|
if (outer1_2) {
|
|
isAtResolvedTarget = tmp14.isAtResolvedTarget;
|
|
}
|
|
if (isAtResolvedTarget) {
|
|
isAtResolvedTarget = num11 >= 1;
|
|
}
|
|
let tmp16 = isAtResolvedTarget;
|
|
if (isAtResolvedTarget) {
|
|
tmp16 = !outer2_36.didRetrySilentInitialScroll(tmp);
|
|
}
|
|
let hasScrolled = tmp.hasScrolled;
|
|
if (hasScrolled) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
let isAtResolvedTarget2 = !isInitialScroll;
|
|
if (isInitialScroll) {
|
|
isAtResolvedTarget2 = tmp14.isAtResolvedTarget;
|
|
}
|
|
hasScrolled = isAtResolvedTarget2;
|
|
}
|
|
let tmp18 = scrollingTo.isInitialScroll && !tmp14.isAtResolvedTarget;
|
|
if (tmp18) {
|
|
tmp18 = num11 <= num3;
|
|
}
|
|
if (tmp16) {
|
|
value = obj.get(tmp);
|
|
targetOffset = undefined;
|
|
if (null != value) {
|
|
targetOffset = value.targetOffset;
|
|
}
|
|
if (null == targetOffset) {
|
|
targetOffset = scrollingTo.targetOffset;
|
|
}
|
|
num11 = 0;
|
|
if (null != targetOffset) {
|
|
num11 = targetOffset;
|
|
}
|
|
const tmp31 = num11 >= 1 ? num11 - 1 : num11 + 1;
|
|
const result1 = outer2_36.markSilentInitialScrollRetry(tmp);
|
|
const current2 = tmp7.state.refScroller.current;
|
|
if (null != current2) {
|
|
let num12 = 0;
|
|
if (tmp7.state.props.horizontal) {
|
|
num12 = tmp31;
|
|
}
|
|
obj = { animated: false, x: null, y: null };
|
|
obj[1] = num12;
|
|
let num13 = 0;
|
|
if (!tmp7.state.props.horizontal) {
|
|
num13 = tmp31;
|
|
}
|
|
obj[2] = num13;
|
|
current2.scrollTo(obj);
|
|
}
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const current = num11.state.refScroller.current;
|
|
if (null != current) {
|
|
let num = 0;
|
|
if (tmp.state.props.horizontal) {
|
|
num = tmp2;
|
|
}
|
|
const obj = { animated: false, x: null, y: null };
|
|
obj[1] = num;
|
|
let num2 = 0;
|
|
if (!tmp.state.props.horizontal) {
|
|
num2 = tmp2;
|
|
}
|
|
obj[2] = num2;
|
|
current.scrollTo(obj);
|
|
}
|
|
});
|
|
const _setTimeout3 = setTimeout;
|
|
tmp.timeoutCheckFinishedScrollFallback = setTimeout(checkHasScrolled, 16);
|
|
} else {
|
|
if (!tmp9) {
|
|
if (!hasScrolled) {
|
|
if (!tmp12) {
|
|
if (!isAtResolvedTarget) {
|
|
if (num3 >= num11) {
|
|
if (result) {
|
|
if (num11 <= num3) {
|
|
const value1 = obj.get(tmp);
|
|
let targetOffset1;
|
|
if (null != value1) {
|
|
targetOffset1 = value1.targetOffset;
|
|
}
|
|
if (null == targetOffset1) {
|
|
targetOffset1 = scrollingTo.targetOffset;
|
|
}
|
|
if (null == targetOffset1) {
|
|
targetOffset1 = tmp.scrollPending;
|
|
}
|
|
let current = tmp7.state.refScroller.current;
|
|
if (null != current) {
|
|
let num8 = 0;
|
|
if (tmp7.state.props.horizontal) {
|
|
num8 = targetOffset1;
|
|
}
|
|
obj = { animated: false, x: null, y: null };
|
|
obj[1] = num8;
|
|
let num9 = 0;
|
|
if (!tmp7.state.props.horizontal) {
|
|
num9 = targetOffset1;
|
|
}
|
|
obj[2] = num9;
|
|
current.scrollTo(obj);
|
|
}
|
|
let num10 = 100;
|
|
if (tmp6) {
|
|
num10 = 16;
|
|
}
|
|
const _setTimeout2 = setTimeout;
|
|
tmp.timeoutCheckFinishedScrollFallback = setTimeout(checkHasScrolled, num10);
|
|
}
|
|
}
|
|
let num7 = 100;
|
|
if (tmp6) {
|
|
num7 = 16;
|
|
}
|
|
const _setTimeout = setTimeout;
|
|
tmp.timeoutCheckFinishedScrollFallback = setTimeout(checkHasScrolled, num7);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
outer2_60(tmp7);
|
|
}
|
|
tmp12 = outer2_61(tmp, scrollingTo);
|
|
}
|
|
}
|
|
checkHasScrolled();
|
|
}, num5);
|
|
}
|
|
function doMaintainScrollAtEnd(state) {
|
|
let didContainersLayout;
|
|
let pendingNativeMVCPAdjust;
|
|
let closure_0 = state;
|
|
state = state.state;
|
|
const refScroller = state.refScroller;
|
|
const maintainScrollAtEnd = state.props.maintainScrollAtEnd;
|
|
let values = state.values;
|
|
({ didContainersLayout, pendingNativeMVCPAdjust } = state);
|
|
const tmp2 = values.get("isWithinMaintainScrollAtEndThreshold") && maintainScrollAtEnd && didContainersLayout;
|
|
if (pendingNativeMVCPAdjust) {
|
|
state.pendingMaintainScrollAtEnd = tmp2;
|
|
return false;
|
|
} else {
|
|
state.pendingMaintainScrollAtEnd = false;
|
|
if (tmp2) {
|
|
if (getContentSize(state) < state.scrollLength) {
|
|
state.scroll = 0;
|
|
}
|
|
if (state.maintainingScrollAtEnd) {
|
|
state.pendingMaintainScrollAtEnd = true;
|
|
} else {
|
|
let str = "pending-instant";
|
|
if (maintainScrollAtEnd.animated) {
|
|
str = "pending-animated";
|
|
}
|
|
let str2 = "instant";
|
|
if (maintainScrollAtEnd.animated) {
|
|
str2 = "animated";
|
|
}
|
|
state.maintainingScrollAtEnd = str;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const values = state.values;
|
|
if (values.get("isWithinMaintainScrollAtEndThreshold")) {
|
|
tmp2.maintainingScrollAtEnd = str2;
|
|
const current = refScroller.current;
|
|
if (tmp2.props.horizontal) {
|
|
let props;
|
|
if (null != tmp2) {
|
|
props = tmp2.props;
|
|
}
|
|
let horizontal;
|
|
if (null != props) {
|
|
horizontal = props.horizontal;
|
|
}
|
|
let tmp9 = horizontal;
|
|
if (tmp9) {
|
|
let rtl;
|
|
if (null != props) {
|
|
rtl = props.rtl;
|
|
}
|
|
if (null == rtl) {
|
|
rtl = outer1_11.I18nManager.isRTL;
|
|
}
|
|
tmp9 = rtl;
|
|
}
|
|
if (tmp9) {
|
|
const tmp14 = outer1_25(state);
|
|
const _Number = Number;
|
|
if (Number.isFinite(tmp14)) {
|
|
const _Number2 = Number;
|
|
if (Number.isFinite(tmp2.scrollLength)) {
|
|
if (tmp14 > tmp2.scrollLength) {
|
|
const _Math = Math;
|
|
let bound = Math.max(0, tmp14 - tmp2.scrollLength);
|
|
}
|
|
if (null != current) {
|
|
let obj = { animated: null, x: null, y: 0 };
|
|
obj[0] = maintainScrollAtEnd.animated;
|
|
obj[1] = tmp18;
|
|
current.scrollTo(obj);
|
|
}
|
|
}
|
|
}
|
|
const _Number3 = Number;
|
|
let num2;
|
|
if (Number.isFinite(tmp14)) {
|
|
const _Number4 = Number;
|
|
if (Number.isFinite(tmp2.scrollLength)) {
|
|
num2 = 0;
|
|
}
|
|
}
|
|
bound = num2;
|
|
}
|
|
let num4 = 0;
|
|
if (maintainScrollAtEnd.animated) {
|
|
num4 = 500;
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
if (obj.maintainingScrollAtEnd === closure_5) {
|
|
tmp.maintainingScrollAtEnd = undefined;
|
|
if (tmp.pendingMaintainScrollAtEnd) {
|
|
outer1_64(closure_0);
|
|
}
|
|
}
|
|
}, num4);
|
|
}
|
|
if (null != current) {
|
|
obj = { animated: null };
|
|
obj[0] = maintainScrollAtEnd.animated;
|
|
current.scrollToEnd(obj);
|
|
}
|
|
} else if (tmp2.maintainingScrollAtEnd === str) {
|
|
tmp2.maintainingScrollAtEnd = undefined;
|
|
}
|
|
});
|
|
}
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
const tmp = values.get("isWithinMaintainScrollAtEndThreshold") && maintainScrollAtEnd && didContainersLayout;
|
|
}
|
|
function requestAdjust(state) {
|
|
let closure_0 = state;
|
|
let closure_1 = arg1;
|
|
state = state.state;
|
|
if (Math.abs(arg1) > 0.1) {
|
|
let tmp = !closure_27;
|
|
if (!closure_27) {
|
|
tmp = arg2;
|
|
}
|
|
if (tmp) {
|
|
tmp = state.scroll <= arg1;
|
|
}
|
|
const _objectWithoutProperties = tmp;
|
|
function doit() {
|
|
if (closure_3) {
|
|
let obj = { horizontal: null, offset: null };
|
|
obj[0] = state.props.horizontal;
|
|
obj[1] = state.scroll;
|
|
state = state.state;
|
|
const offset = obj.offset;
|
|
const current = state.refScroller.current;
|
|
if (current) {
|
|
const horizontal = obj.horizontal;
|
|
if (horizontal) {
|
|
const tmp10 = outer1_25(tmp4);
|
|
}
|
|
obj = { animated: null, x: null, y: null };
|
|
obj[0] = !tmp7;
|
|
let num3 = 0;
|
|
if (horizontal) {
|
|
num3 = tmp9(state, offset, tmp10);
|
|
}
|
|
obj[1] = num3;
|
|
let num4 = 0;
|
|
if (!horizontal) {
|
|
num4 = offset;
|
|
}
|
|
obj[2] = num4;
|
|
current.scrollTo(obj);
|
|
if (tmp6) {
|
|
const result = outer1_36.markInitialScrollNativeDispatch(state);
|
|
}
|
|
if (!!tmp7) {
|
|
state.scroll = offset;
|
|
outer1_63(tmp4);
|
|
}
|
|
tmp9 = outer1_15;
|
|
}
|
|
} else {
|
|
const adjust = state.scrollAdjustHandler.requestAdjust(closure_1);
|
|
if (state.adjustingFromInitialMount) {
|
|
tmp.adjustingFromInitialMount = tmp.adjustingFromInitialMount - 1;
|
|
}
|
|
const scrollAdjustHandler = state.scrollAdjustHandler;
|
|
}
|
|
}
|
|
state.scroll = state.scroll + arg1;
|
|
state.scrollForNextCalculateItemsInView = undefined;
|
|
const values = state.values;
|
|
if (values.get("readyToRender")) {
|
|
doit();
|
|
const diff = state.scroll - arg1 / 2;
|
|
if (!state.ignoreScrollFromMVCP) {
|
|
state.ignoreScrollFromMVCP = {};
|
|
}
|
|
if (arg1 > 0) {
|
|
state.ignoreScrollFromMVCP.lt = diff;
|
|
} else {
|
|
state.ignoreScrollFromMVCP.gt = diff;
|
|
}
|
|
if (state.ignoreScrollFromMVCPTimeout) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state.ignoreScrollFromMVCPTimeout);
|
|
}
|
|
let num4 = 100;
|
|
if (tmp) {
|
|
num4 = 250;
|
|
}
|
|
const _setTimeout = setTimeout;
|
|
state.ignoreScrollFromMVCPTimeout = setTimeout(() => {
|
|
let reprocessCurrentScroll;
|
|
state.ignoreScrollFromMVCP = undefined;
|
|
let ignoreScrollFromMVCPIgnored = state.ignoreScrollFromMVCPIgnored;
|
|
if (ignoreScrollFromMVCPIgnored) {
|
|
ignoreScrollFromMVCPIgnored = false !== tmp.scrollProcessingEnabled;
|
|
}
|
|
if (ignoreScrollFromMVCPIgnored) {
|
|
tmp.ignoreScrollFromMVCPIgnored = false;
|
|
({ scroll: tmp.scrollPending, reprocessCurrentScroll } = tmp);
|
|
if (null != reprocessCurrentScroll) {
|
|
const call = reprocessCurrentScroll.call;
|
|
if (typeof call === "unknown") {
|
|
const result = reprocessCurrentScroll();
|
|
} else {
|
|
call(tmp);
|
|
}
|
|
}
|
|
}
|
|
}, num4);
|
|
} else {
|
|
state.adjustingFromInitialMount = (state.adjustingFromInitialMount || 0) + 1;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(doit);
|
|
const tmp2 = state.adjustingFromInitialMount || 0;
|
|
}
|
|
}
|
|
}
|
|
function maybeApplyPredictedNativeMVCPAdjust(state) {
|
|
state = state.state;
|
|
const pendingNativeMVCPAdjust = state.pendingNativeMVCPAdjust;
|
|
if (pendingNativeMVCPAdjust) {
|
|
const _Math = Math;
|
|
if (Math.abs(pendingNativeMVCPAdjust.manualApplied) <= c66) {
|
|
const amount2 = pendingNativeMVCPAdjust.amount;
|
|
const _Math9 = Math;
|
|
if (Math.abs(amount2) <= tmp2) {
|
|
const _Math7 = Math;
|
|
if (Math.abs(0) > tmp2) {
|
|
const amount = pendingNativeMVCPAdjust.amount;
|
|
const _Math8 = Math;
|
|
if (Math.abs(amount) > tmp2) {
|
|
pendingNativeMVCPAdjust.manualApplied = amount;
|
|
requestAdjust(state, amount, true);
|
|
pendingNativeMVCPAdjust.furthestProgressTowardAmount = 0;
|
|
}
|
|
}
|
|
} else {
|
|
const _Math2 = Math;
|
|
const diff = Math.max(0, tmp8 - state.scrollLength) - state.scroll;
|
|
if (amount2 < 0) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
let num = Math.max(amount2, Math.min(0, diff));
|
|
} else {
|
|
num = 0;
|
|
if (amount2 > 0) {
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
num = Math.min(amount2, Math.max(0, diff));
|
|
}
|
|
}
|
|
}
|
|
tmp8 = getContentSize(state);
|
|
}
|
|
}
|
|
}
|
|
function prepareMVCP(state) {
|
|
let closure_7;
|
|
let data2;
|
|
let idsInView;
|
|
let keyExtractor;
|
|
let positions;
|
|
let size;
|
|
let closure_0 = state;
|
|
let closure_1 = arg1;
|
|
state = state.state;
|
|
({ idsInView, positions } = state);
|
|
const maintainVisibleContentPosition = state.props.maintainVisibleContentPosition;
|
|
let data = maintainVisibleContentPosition.data;
|
|
({ size, shouldRestorePosition: closure_7 } = maintainVisibleContentPosition);
|
|
const timestamp = Date.now();
|
|
const scrollingTo = state.scrollingTo;
|
|
const items = [];
|
|
let index;
|
|
if (null != scrollingTo) {
|
|
index = scrollingTo.index;
|
|
}
|
|
let viewPosition;
|
|
if (null != scrollingTo) {
|
|
viewPosition = scrollingTo.viewPosition;
|
|
}
|
|
let tmp5 = tmp4;
|
|
if (undefined !== index) {
|
|
tmp5 = state.props.data.length > 0;
|
|
}
|
|
if (tmp5) {
|
|
tmp5 = index >= state.props.data.length - 1;
|
|
}
|
|
if (tmp5) {
|
|
let num4 = 0;
|
|
if (null != viewPosition) {
|
|
num4 = viewPosition;
|
|
}
|
|
tmp5 = num4 > 0;
|
|
}
|
|
const frozen = tmp5;
|
|
if (arg1) {
|
|
size = data;
|
|
}
|
|
const indexByKey = state.indexByKey;
|
|
const scroll = state.scroll;
|
|
let closure_15 = getContentSize(state);
|
|
if (size) {
|
|
if (state.pendingNativeMVCPAdjust) {
|
|
if (undefined === index) {
|
|
maybeApplyPredictedNativeMVCPAdjust(state);
|
|
}
|
|
}
|
|
if (tmp4) {
|
|
if (!closure_27) {
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
({ data: data2, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data2) {
|
|
let tmp11 = null;
|
|
if (index < data2.length) {
|
|
let keyExtractorResult = index;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data2[index], index);
|
|
}
|
|
tmp11 = keyExtractorResult;
|
|
}
|
|
state.idCache[index] = tmp11;
|
|
str = tmp11;
|
|
}
|
|
let found = str;
|
|
let tmp7 = str;
|
|
} else {
|
|
if (tmp6) {
|
|
found = idsInView.find((arg0) => undefined !== indexByKey.get(arg0));
|
|
tmp7 = found;
|
|
}
|
|
tmp6 = idsInView.length > 0 && state.didContainersLayout && !arg1;
|
|
}
|
|
if (arg1) {
|
|
if (idsInView.length > 0) {
|
|
if (state.didContainersLayout) {
|
|
for (let num6 = 0; num6 < idsInView.length; num6 = num6 + 1) {
|
|
let tmp13 = idsInView[num6];
|
|
let value = indexByKey.get(tmp13);
|
|
let tmp15 = num6;
|
|
if (undefined !== value) {
|
|
let tmp16 = positions[value];
|
|
if (undefined !== tmp16) {
|
|
let obj = { id: null, position: null };
|
|
obj[0] = tmp13;
|
|
obj[1] = tmp16;
|
|
let arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (undefined !== tmp7) {
|
|
value = indexByKey.get(tmp7);
|
|
if (undefined !== value) {
|
|
let closure_2 = positions[value];
|
|
}
|
|
}
|
|
return () => {
|
|
let position;
|
|
let tmp16;
|
|
const data = state.props.data;
|
|
let tmp = closure_1;
|
|
if (closure_1) {
|
|
tmp = data;
|
|
}
|
|
if (tmp) {
|
|
tmp = undefined === index;
|
|
}
|
|
if (tmp) {
|
|
let flag = true;
|
|
if (undefined !== found) {
|
|
let value = indexByKey.get(tmp3);
|
|
let tmp6 = undefined === value;
|
|
if (!tmp6) {
|
|
tmp6 = undefined === positions[value];
|
|
}
|
|
flag = tmp6;
|
|
}
|
|
tmp = flag;
|
|
}
|
|
let num = 0;
|
|
if (tmp) {
|
|
let num3 = 0;
|
|
num = 0;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp9 = items[num3];
|
|
let tmp10 = indexByKey;
|
|
let arr = items;
|
|
position = tmp9.position;
|
|
value = indexByKey.get(tmp9.id);
|
|
let tmp12 = undefined !== value;
|
|
let tmp13 = num3;
|
|
if (tmp12) {
|
|
if (closure_7) {
|
|
let tmp15 = data[value];
|
|
}
|
|
let sum = num3 + 1;
|
|
num3 = sum;
|
|
num = 0;
|
|
}
|
|
tmp16 = undefined;
|
|
if (tmp12) {
|
|
let tmp17 = positions;
|
|
tmp16 = positions[value];
|
|
}
|
|
} while (undefined === tmp16);
|
|
num = tmp16 - position;
|
|
}
|
|
}
|
|
let tmp20 = num;
|
|
if (undefined !== found) {
|
|
let diff1 = closure_2;
|
|
tmp20 = num;
|
|
if (undefined !== closure_2) {
|
|
const value1 = indexByKey.get(tmp19);
|
|
let tmp22;
|
|
if (undefined !== value1) {
|
|
tmp22 = positions[value1];
|
|
}
|
|
tmp20 = num;
|
|
if (undefined !== tmp22) {
|
|
const tmp64 = outer1_25(state);
|
|
const diff = tmp22 - diff1;
|
|
let num4 = diff;
|
|
if (0 !== diff) {
|
|
num4 = diff;
|
|
if (closure_12) {
|
|
diff1 = state;
|
|
num4 = diff;
|
|
if (state.scroll + state.scrollLength > tmp64) {
|
|
if (diff <= 0) {
|
|
const _Math = Math;
|
|
const bound = Math.max(0, tmp64 - diff1.scrollLength);
|
|
diff1.scroll = bound;
|
|
diff1.scrollPending = bound;
|
|
num4 = 0;
|
|
}
|
|
}
|
|
const _Math2 = Math;
|
|
diff1 = tmp64 - diff1.scroll - diff1.scrollLength;
|
|
num4 = Math.max(0, diff1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let sum1 = tmp20;
|
|
if (viewPosition) {
|
|
sum1 = tmp20;
|
|
if (tmp28 > 0) {
|
|
const tmp36 = outer1_58(state, tmp19, index, state.props.data[index]);
|
|
if (null != scrollingTo) {
|
|
const itemSize = tmp37.itemSize;
|
|
}
|
|
sum1 = tmp20;
|
|
if (undefined !== tmp36) {
|
|
sum1 = tmp20;
|
|
if (undefined !== itemSize) {
|
|
sum1 = tmp20;
|
|
if (tmp36 !== itemSize) {
|
|
const diff2 = tmp36 - itemSize;
|
|
sum1 = tmp20;
|
|
if (0 !== diff2) {
|
|
sum1 = tmp20 + diff2 * tmp28;
|
|
tmp37.itemSize = tmp36;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp40 = closure_1;
|
|
let tmp45 = !closure_1;
|
|
if (closure_1) {
|
|
tmp45 = !tmp41.props.maintainVisibleContentPosition.data;
|
|
}
|
|
if (!tmp45) {
|
|
tmp45 = undefined !== tmp44;
|
|
}
|
|
if (!tmp45) {
|
|
tmp45 = sum1 >= -0.1;
|
|
}
|
|
let tmp46 = !tmp45;
|
|
if (!tmp45) {
|
|
const _Math3 = Math;
|
|
const diff3 = tmp42 - tmp43 - tmp41.scrollLength;
|
|
tmp46 = diff3 < Math.abs(sum1) - outer1_66;
|
|
}
|
|
if (tmp46) {
|
|
const obj = { amount: null, furthestProgressTowardAmount: 0, manualApplied: 0, startScroll: null };
|
|
obj[0] = sum1;
|
|
obj[3] = tmp43;
|
|
tmp41.pendingNativeMVCPAdjust = obj;
|
|
outer1_67(state);
|
|
} else {
|
|
const _Math4 = Math;
|
|
if (Math.abs(sum1) > outer1_66) {
|
|
let value2 = "pending-animated" === tmp41.maintainingScrollAtEnd;
|
|
if (!value2) {
|
|
value2 = "animated" === tmp41.maintainingScrollAtEnd;
|
|
}
|
|
if (value2) {
|
|
const values = state.values;
|
|
value2 = values.get("isWithinMaintainScrollAtEndThreshold");
|
|
}
|
|
if (!value2) {
|
|
if (tmp40) {
|
|
tmp40 = data;
|
|
}
|
|
outer1_65(state, sum1, tmp40);
|
|
const tmp54 = outer1_65;
|
|
const tmp55 = state;
|
|
}
|
|
}
|
|
}
|
|
tmp42 = closure_15;
|
|
tmp44 = index;
|
|
};
|
|
}
|
|
}
|
|
function updateScroll(state, bound2, arg2, markHasScrolled) {
|
|
let gt;
|
|
let ignoreScrollFromMVCP;
|
|
let lastScrollAdjustForHistory;
|
|
let lt;
|
|
let scroll;
|
|
let scrollAdjustHandler;
|
|
let scrollHistory;
|
|
let scrollingTo;
|
|
state = state.state;
|
|
({ ignoreScrollFromMVCP, lastScrollAdjustForHistory, scrollAdjustHandler, scrollHistory, scrollingTo, scroll } = state);
|
|
markHasScrolled = undefined;
|
|
if (null != markHasScrolled) {
|
|
markHasScrolled = markHasScrolled.markHasScrolled;
|
|
}
|
|
if (false !== markHasScrolled) {
|
|
state.hasScrolled = true;
|
|
}
|
|
const timestamp = Date.now();
|
|
state.lastBatchingAction = timestamp;
|
|
const adjust = scrollAdjustHandler.getAdjust();
|
|
let tmp4 = undefined !== lastScrollAdjustForHistory;
|
|
if (tmp4) {
|
|
const _Math = Math;
|
|
tmp4 = Math.abs(adjust - lastScrollAdjustForHistory) > 0.1;
|
|
}
|
|
if (tmp4) {
|
|
scrollHistory.length = 0;
|
|
}
|
|
state.lastScrollAdjustForHistory = adjust;
|
|
let tmp6 = tmp5;
|
|
if (undefined === scrollingTo) {
|
|
tmp6 = 0 === scrollHistory.length && bound2 === state.scroll;
|
|
const tmp7 = 0 === scrollHistory.length && bound2 === state.scroll;
|
|
}
|
|
if (!tmp6) {
|
|
tmp6 = tmp4;
|
|
}
|
|
if (!tmp6) {
|
|
let obj = { scroll: null, time: null };
|
|
obj[0] = bound2;
|
|
obj[1] = timestamp;
|
|
scrollHistory.push(obj);
|
|
}
|
|
if (scrollHistory.length > 5) {
|
|
scrollHistory.shift();
|
|
}
|
|
if (ignoreScrollFromMVCP) {
|
|
if (!scrollingTo) {
|
|
({ lt, gt } = ignoreScrollFromMVCP);
|
|
state.ignoreScrollFromMVCPIgnored = true;
|
|
}
|
|
}
|
|
state.scrollPrev = scroll;
|
|
state.scrollPrevTime = state.scrollTime;
|
|
state.scroll = bound2;
|
|
state.scrollTime = timestamp;
|
|
const absolute = Math.abs(bound2 - scroll);
|
|
let prop;
|
|
if (null != markHasScrolled) {
|
|
prop = markHasScrolled.fromNativeScrollEvent;
|
|
}
|
|
if (prop) {
|
|
if (absolute > 0.1) {
|
|
if (!tmp4) {
|
|
if (undefined === scrollingTo) {
|
|
if (!state.pendingNativeMVCPAdjust) {
|
|
let state2 = bound2 - scroll;
|
|
const state3 = state.state;
|
|
let str = "prepared";
|
|
if ("prepared" === state3.edgeReachedGate) {
|
|
str = "end";
|
|
if (state2 < 0) {
|
|
str = "start";
|
|
}
|
|
state3.edgeReachedGate = "closed";
|
|
state2 = state.state;
|
|
if ("start" !== str) {
|
|
state2.isEndReached = false;
|
|
state2.endReachedSnapshot = undefined;
|
|
let tmp13 = str;
|
|
}
|
|
}
|
|
state2.isStartReached = false;
|
|
state2.startReachedSnapshot = undefined;
|
|
tmp13 = str;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const state4 = state.state;
|
|
const pendingNativeMVCPAdjust = state4.pendingNativeMVCPAdjust;
|
|
let flag3 = false;
|
|
if (pendingNativeMVCPAdjust) {
|
|
const diff = pendingNativeMVCPAdjust.amount - pendingNativeMVCPAdjust.manualApplied;
|
|
const diff1 = bound2 - (pendingNativeMVCPAdjust.startScroll + pendingNativeMVCPAdjust.manualApplied);
|
|
let tmp18 = tmp17;
|
|
if (diff < 0) {
|
|
tmp18 = diff1 > c66;
|
|
}
|
|
if (!tmp18) {
|
|
let tmp20 = diff > 0;
|
|
if (tmp20) {
|
|
tmp20 = diff1 < -0.1;
|
|
}
|
|
tmp18 = tmp20;
|
|
}
|
|
let tmp21 = diff1;
|
|
if (diff < 0) {
|
|
tmp21 = -diff1;
|
|
}
|
|
const _Math2 = Math;
|
|
if (Math.abs(diff) <= c66) {
|
|
state4.pendingNativeMVCPAdjust = undefined;
|
|
flag3 = true;
|
|
} else if (tmp18) {
|
|
state4.pendingNativeMVCPAdjust = undefined;
|
|
flag3 = false;
|
|
} else {
|
|
const _Math3 = Math;
|
|
const sum = tmp21 + tmp22;
|
|
if (sum >= Math.abs(diff)) {
|
|
state.state.pendingNativeMVCPAdjust = undefined;
|
|
const diff2 = diff - diff1;
|
|
const _Math5 = Math;
|
|
flag3 = true;
|
|
if (Math.abs(diff2) > tmp22) {
|
|
requestAdjust(state, diff2, true);
|
|
flag3 = true;
|
|
}
|
|
} else {
|
|
const _Math8 = Math;
|
|
const _Math9 = Math;
|
|
if (Math.abs(bound2 - Math.max(0, getContentSize(state) - state4.scrollLength)) > 1) {
|
|
if (state4.pendingMaintainScrollAtEnd) {
|
|
let values = state.values;
|
|
if (values.get("isWithinMaintainScrollAtEndThreshold")) {
|
|
flag3 = flag4;
|
|
}
|
|
}
|
|
if (tmp21 > pendingNativeMVCPAdjust.furthestProgressTowardAmount + tmp22) {
|
|
pendingNativeMVCPAdjust.furthestProgressTowardAmount = tmp21;
|
|
flag4 = false;
|
|
} else {
|
|
flag4 = pendingNativeMVCPAdjust.furthestProgressTowardAmount > tmp22 && tmp21 < pendingNativeMVCPAdjust.furthestProgressTowardAmount - tmp22;
|
|
if (flag4) {
|
|
state4.pendingNativeMVCPAdjust = undefined;
|
|
flag4 = false;
|
|
}
|
|
}
|
|
}
|
|
state.state.pendingNativeMVCPAdjust = undefined;
|
|
const diff3 = diff - diff1;
|
|
const _Math4 = Math;
|
|
flag4 = true;
|
|
if (Math.abs(diff3) > tmp22) {
|
|
requestAdjust(state, diff3, true);
|
|
flag4 = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const scrollLength = state.scrollLength;
|
|
const tmp31 = getScrollVelocity(state);
|
|
const state5 = state.state;
|
|
const adaptiveRender = state5.props.adaptiveRender;
|
|
values = state.values;
|
|
let onChange = "adaptiveRender";
|
|
const value = values.get("adaptiveRender");
|
|
values = state.values;
|
|
if (values.get("readyToRender")) {
|
|
if (adaptiveRender) {
|
|
const enterVelocity = adaptiveRender.enterVelocity;
|
|
let num8 = 3;
|
|
if (null != enterVelocity) {
|
|
num8 = enterVelocity;
|
|
}
|
|
const exitVelocity = adaptiveRender.exitVelocity;
|
|
let num9 = 1;
|
|
if (null != exitVelocity) {
|
|
num9 = exitVelocity;
|
|
}
|
|
const exitDelay = adaptiveRender.exitDelay;
|
|
let num10 = 250;
|
|
if (null != exitDelay) {
|
|
num10 = exitDelay;
|
|
}
|
|
if ("light" === value) {
|
|
num8 = num9;
|
|
}
|
|
if (tmp30) {
|
|
let str6 = "light";
|
|
} else {
|
|
const _Math6 = Math;
|
|
str6 = "normal";
|
|
}
|
|
let str7 = "normal";
|
|
if (undefined === state5.timeoutAdaptiveRender) {
|
|
str7 = value;
|
|
}
|
|
if (str6 !== str7) {
|
|
if ("light" === str6) {
|
|
let adaptiveRender2 = state.values;
|
|
if (adaptiveRender2.get(onChange) !== "light") {
|
|
set$(state, onChange, "light");
|
|
adaptiveRender2 = state.state.props.adaptiveRender;
|
|
onChange = undefined;
|
|
if (null != adaptiveRender2) {
|
|
onChange = adaptiveRender2.onChange;
|
|
}
|
|
if (null != onChange) {
|
|
let call = onChange.call;
|
|
if (typeof call !== "unknown") {
|
|
call(adaptiveRender2, "light", "scroll");
|
|
}
|
|
}
|
|
onChange("light", "scroll");
|
|
}
|
|
scheduleAdaptiveRenderExit(state, num10);
|
|
} else if (tmp36) {
|
|
scheduleAdaptiveRenderExit(state, num10);
|
|
}
|
|
}
|
|
} else {
|
|
resetAdaptiveRender(state);
|
|
}
|
|
}
|
|
const scrollLastCalculate = state.scrollLastCalculate;
|
|
if (!state.dataChangeNeedsScrollUpdate) {
|
|
if (!flag3) {
|
|
if (undefined === tmp12) {
|
|
if (!arg2) {
|
|
if (undefined !== scrollLastCalculate) {
|
|
const _Math7 = Math;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
state.scrollLastCalculate = state.scroll;
|
|
state.ignoreScrollFromMVCPIgnored = false;
|
|
state.lastScrollDelta = absolute;
|
|
if (scrollLength > 0 && undefined === scrollingTo && absolute > scrollLength && !state.pendingNativeMVCPAdjust) {
|
|
state.mvcpAnchorLock = undefined;
|
|
state.pendingNativeMVCPAdjust = undefined;
|
|
obj = { keys: null };
|
|
const _Set = Set;
|
|
const set = new Set();
|
|
obj[0] = set;
|
|
state.userScrollAnchorReset = obj;
|
|
if (undefined !== state.queuedMVCPRecalculate) {
|
|
const _cancelAnimationFrame = cancelAnimationFrame;
|
|
cancelAnimationFrame(state.queuedMVCPRecalculate);
|
|
state.queuedMVCPRecalculate = undefined;
|
|
}
|
|
obj = { doMVCP: null, scrollVelocity: null };
|
|
obj[0] = tmp5;
|
|
obj[1] = tmp31;
|
|
if (tmp30) {
|
|
obj.drawDistanceMode = "visible-first";
|
|
}
|
|
const triggerCalculateItemsInView2 = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView2) {
|
|
const call3 = triggerCalculateItemsInView2.call;
|
|
if (typeof call3 === "unknown") {
|
|
let result = triggerCalculateItemsInView2(obj);
|
|
} else {
|
|
call3(state, obj);
|
|
}
|
|
}
|
|
checkThresholds(state, tmp12);
|
|
let state6;
|
|
state6 = state.state;
|
|
if (!tmp56) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
state6.queuedFullDrawDistancePrewarm = requestAnimationFrame(() => {
|
|
state6.queuedFullDrawDistancePrewarm = undefined;
|
|
const triggerCalculateItemsInView = state6.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state6);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
tmp56 = state6.props.drawDistance <= 50 || undefined !== state6.queuedFullDrawDistancePrewarm;
|
|
} else {
|
|
const obj1 = { doMVCP: null, scrollVelocity: null };
|
|
obj1[0] = tmp5;
|
|
obj1[1] = tmp31;
|
|
if (tmp30) {
|
|
obj1.drawDistanceMode = "visible-first";
|
|
}
|
|
let triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call2 = triggerCalculateItemsInView.call;
|
|
if (typeof call2 === "unknown") {
|
|
const result1 = triggerCalculateItemsInView(obj1);
|
|
} else {
|
|
call2(state, obj1);
|
|
}
|
|
}
|
|
checkThresholds(state, tmp12);
|
|
}
|
|
prop = state.pendingMaintainScrollAtEnd;
|
|
if (!prop) {
|
|
const maintainScrollAtEnd = state.props.maintainScrollAtEnd;
|
|
let onDataChange;
|
|
if (null != maintainScrollAtEnd) {
|
|
onDataChange = maintainScrollAtEnd.onDataChange;
|
|
}
|
|
prop = onDataChange;
|
|
}
|
|
if (flag3) {
|
|
flag3 = prop;
|
|
}
|
|
if (flag3) {
|
|
state.pendingMaintainScrollAtEnd = false;
|
|
doMaintainScrollAtEnd(state);
|
|
}
|
|
state.dataChangeNeedsScrollUpdate = false;
|
|
state.lastScrollDelta = 0;
|
|
}
|
|
function getItemBottom(state, bound5) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (undefined !== state.state.positions[bound5]) {
|
|
let tmp3Result;
|
|
if (undefined !== bound5) {
|
|
if (bound5 >= 0) {
|
|
state = state.state;
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp4 = null;
|
|
if (bound5 < data.length) {
|
|
let keyExtractorResult = bound5;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[bound5], bound5);
|
|
}
|
|
tmp4 = keyExtractorResult;
|
|
}
|
|
state.idCache[bound5] = tmp4;
|
|
str = tmp4;
|
|
}
|
|
tmp3Result = getItemSize(state, str, bound5, state.state.props.data[bound5]);
|
|
const tmp3 = getItemSize;
|
|
}
|
|
}
|
|
let num2 = 0;
|
|
if (null != tmp3Result) {
|
|
num2 = tmp3Result;
|
|
}
|
|
const _Number = Number;
|
|
let num3 = 0;
|
|
if (Number.isFinite(num2)) {
|
|
num3 = num2;
|
|
}
|
|
return tmp + num3;
|
|
}
|
|
}
|
|
function scrollTo(state) {
|
|
let animated;
|
|
let diff1;
|
|
let forceScroll;
|
|
let isInitialScroll;
|
|
let noScrollingTo;
|
|
let offset;
|
|
let precomputedWithViewOffset;
|
|
let sum;
|
|
let waitForInitialScrollCompletionFrame;
|
|
state = state.state;
|
|
({ noScrollingTo, forceScroll } = arg1);
|
|
const tmp2 = _objectWithoutProperties(arg1, closure_5);
|
|
({ animated, isInitialScroll, offset, precomputedWithViewOffset, waitForInitialScrollCompletionFrame } = tmp2);
|
|
if (state.animFrameCheckFinishedScroll) {
|
|
const _cancelAnimationFrame = cancelAnimationFrame;
|
|
cancelAnimationFrame(state.state.animFrameCheckFinishedScroll);
|
|
}
|
|
if (state.timeoutCheckFinishedScrollFallback) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state.state.timeoutCheckFinishedScrollFallback);
|
|
}
|
|
let tmp7 = offset;
|
|
if (!precomputedWithViewOffset) {
|
|
tmp7 = calculateOffsetWithOffsetPosition(state, offset, tmp2);
|
|
}
|
|
let tmp9 = isInitialScroll;
|
|
if (tmp9) {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
tmp9 = "offset" === kind;
|
|
}
|
|
const state2 = state.state;
|
|
const tmp12 = getContentSize(state);
|
|
let bound1 = tmp7;
|
|
if (Number.isFinite(tmp12)) {
|
|
const _Number = Number;
|
|
bound1 = tmp7;
|
|
if (Number.isFinite(state2.scrollLength)) {
|
|
bound1 = tmp7;
|
|
if (state2.lastLayout) {
|
|
const _Math = Math;
|
|
let viewOffset;
|
|
const bound = Math.max(0, tmp12 - state2.scrollLength);
|
|
if (null != tmp2) {
|
|
viewOffset = tmp2.viewOffset;
|
|
}
|
|
let num2 = 0;
|
|
if (typeof viewOffset === "number") {
|
|
num2 = 0;
|
|
if (viewOffset < 0) {
|
|
num2 = -viewOffset;
|
|
}
|
|
}
|
|
const _Math2 = Math;
|
|
bound1 = Math.min(tmp7, bound + num2);
|
|
}
|
|
}
|
|
}
|
|
const bound2 = Math.max(0, bound1);
|
|
let tmp18 = bound2;
|
|
if (tmp9) {
|
|
tmp18 = tmp7;
|
|
}
|
|
state.scrollHistory.length = 0;
|
|
if (!noScrollingTo) {
|
|
if (isInitialScroll) {
|
|
closure_36.resetFlags(state);
|
|
}
|
|
const _Object = Object;
|
|
let tmp21;
|
|
if (0 !== Object.keys(state.averageSizes).length) {
|
|
let obj = {};
|
|
tmp21 = obj;
|
|
const keys = Object.keys();
|
|
if (keys !== undefined) {
|
|
tmp21 = obj;
|
|
while (keys[tmp] !== undefined) {
|
|
let tmp84 = tmp23;
|
|
obj[tmp23] = state.averageSizes[tmp23].avg;
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
obj = {};
|
|
const merged = Object.assign(tmp2);
|
|
if (tmp21) {
|
|
obj = { averageSizeSnapshot: null };
|
|
obj[0] = tmp21;
|
|
let obj1 = obj;
|
|
} else {
|
|
obj1 = {};
|
|
}
|
|
const merged1 = Object.assign(obj1);
|
|
obj.targetOffset = bound2;
|
|
obj.waitForInitialScrollCompletionFrame = waitForInitialScrollCompletionFrame;
|
|
state.scrollingTo = obj;
|
|
if (!isInitialScroll) {
|
|
const index = tmp2.index;
|
|
const state3 = state.state;
|
|
let tmp30;
|
|
if (0 !== state3.props.data.length) {
|
|
const _Math7 = Math;
|
|
const bound3 = Math.max(0, bound2);
|
|
const _Math8 = Math;
|
|
const bound4 = Math.max(bound3, bound2 + state3.scrollLength);
|
|
if (undefined !== index) {
|
|
const _Math4 = Math;
|
|
const _Math5 = Math;
|
|
let bound5 = Math.max(0, Math.min(length - 1, index));
|
|
} else {
|
|
const state4 = state.state;
|
|
let diff = state4.props.data.length - 1;
|
|
let num5 = 0;
|
|
if (0 <= diff) {
|
|
do {
|
|
let _Math3 = Math;
|
|
let rounded = Math.floor((num5 + diff) / 2);
|
|
let tmp35 = state4.positions[rounded];
|
|
let tmp36 = diff;
|
|
let tmp37 = num5;
|
|
let tmp38 = tmp32;
|
|
if (undefined === tmp35) {
|
|
diff1 = rounded - 1;
|
|
sum = num5;
|
|
let tmp41 = tmp32;
|
|
} else if (tmp35 <= bound3) {
|
|
sum = rounded + 1;
|
|
diff1 = diff;
|
|
tmp41 = rounded;
|
|
} else {
|
|
diff1 = rounded - 1;
|
|
sum = num5;
|
|
tmp41 = tmp32;
|
|
}
|
|
diff = diff1;
|
|
num5 = sum;
|
|
tmp32 = tmp41;
|
|
bound5 = tmp41;
|
|
} while (sum <= diff1);
|
|
}
|
|
}
|
|
if (undefined !== bound5) {
|
|
if (tmp87) {
|
|
if (undefined === state3.positions[bound5]) {
|
|
const obj2 = { end: null, start: null };
|
|
obj2[0] = bound5;
|
|
obj2[1] = bound5;
|
|
tmp30 = obj2;
|
|
}
|
|
}
|
|
if (undefined !== index) {
|
|
let diff2 = bound5;
|
|
let tmp45 = bound5;
|
|
if (bound5 > 0) {
|
|
tmp45 = diff2;
|
|
while (undefined !== state3.positions[diff2]) {
|
|
tmp45 = diff2;
|
|
if (tmp46 <= bound3) {
|
|
break;
|
|
} else {
|
|
tmp45 = diff2;
|
|
if (undefined === state3.positions[diff2 - 1]) {
|
|
break;
|
|
} else {
|
|
diff2 = diff2 - 1;
|
|
tmp45 = diff2;
|
|
if (diff2 <= 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let diff3 = tmp45;
|
|
let tmp49 = tmp45;
|
|
if (tmp45 > 0) {
|
|
const tmp51 = getItemBottom(state, diff3 - 1);
|
|
tmp49 = diff3;
|
|
while (undefined !== tmp51) {
|
|
tmp49 = diff3;
|
|
if (tmp51 <= bound3) {
|
|
break;
|
|
} else {
|
|
diff3 = diff3 - 1;
|
|
tmp49 = diff3;
|
|
if (diff3 <= 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp53 = tmp49;
|
|
let tmp54 = tmp49;
|
|
if (tmp49 + 1 < length) {
|
|
tmp54 = tmp53;
|
|
while (undefined !== state3.positions[tmp53 + 1]) {
|
|
tmp54 = tmp53;
|
|
if (tmp55 > bound4) {
|
|
break;
|
|
} else {
|
|
let sum1 = tmp53 + 1;
|
|
tmp53 = sum1;
|
|
tmp54 = sum1;
|
|
if (sum1 + 1 >= length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj3 = { end: null, start: null };
|
|
obj3[0] = tmp54;
|
|
obj3[1] = tmp49;
|
|
tmp30 = obj3;
|
|
} else {
|
|
const tmp43 = getItemBottom(state, bound5);
|
|
}
|
|
}
|
|
}
|
|
const state5 = state.state;
|
|
if (tmp30) {
|
|
state5.scrollTargetPinnedRange = tmp30;
|
|
state.state.scrollForNextCalculateItemsInView = undefined;
|
|
} else {
|
|
state5.scrollTargetPinnedRange = undefined;
|
|
}
|
|
}
|
|
}
|
|
state.scrollPending = bound2;
|
|
const value = store.get(state);
|
|
const didFinishInitialScroll = state.didFinishInitialScroll;
|
|
let result = !didFinishInitialScroll;
|
|
if (!didFinishInitialScroll) {
|
|
let tmp60 = isInitialScroll;
|
|
if (!isInitialScroll) {
|
|
tmp60 = value;
|
|
}
|
|
result = tmp60;
|
|
}
|
|
if (result) {
|
|
result = obj7.hasNonZeroTargetOffset(bound2);
|
|
}
|
|
const didFinishInitialScroll2 = state.didFinishInitialScroll;
|
|
let isAtZeroTargetOffsetResult = !didFinishInitialScroll2;
|
|
if (!didFinishInitialScroll2) {
|
|
isAtZeroTargetOffsetResult = value;
|
|
}
|
|
if (isAtZeroTargetOffsetResult) {
|
|
isAtZeroTargetOffsetResult = obj7.isAtZeroTargetOffset(tmp18);
|
|
}
|
|
if (result) {
|
|
state.hasScrolled = false;
|
|
let startScroll;
|
|
if (null != value) {
|
|
startScroll = value.startScroll;
|
|
}
|
|
if (null == startScroll) {
|
|
startScroll = state.scroll;
|
|
}
|
|
const obj4 = { startScroll: null, targetOffset: null };
|
|
obj4[0] = startScroll;
|
|
obj4[1] = bound2;
|
|
const result1 = obj7.set(state, obj4);
|
|
} else if (isAtZeroTargetOffsetResult) {
|
|
obj7.clear(state);
|
|
}
|
|
let tmp66 = !isInitialScroll;
|
|
if (!isInitialScroll) {
|
|
tmp66 = !noScrollingTo;
|
|
}
|
|
if (tmp66) {
|
|
const _Math6 = Math;
|
|
tmp66 = Math.abs(state.scroll - bound2) > 1;
|
|
}
|
|
if (tmp66) {
|
|
if (animated) {
|
|
if (state.scrollTargetPinnedRange) {
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result2 = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
updateScroll(state, bound2, true, { markHasScrolled: false });
|
|
}
|
|
}
|
|
const state6 = state.state;
|
|
const current = state6.refScroller.current;
|
|
if (current) {
|
|
const horizontal = state.props.horizontal;
|
|
if (horizontal) {
|
|
const tmp76 = getContentSize(state);
|
|
}
|
|
const obj5 = { animated: null, x: null, y: null };
|
|
obj5[0] = !tmp73;
|
|
let num10 = 0;
|
|
if (horizontal) {
|
|
num10 = tmp75(state6, tmp18, tmp76);
|
|
}
|
|
obj5[1] = num10;
|
|
let num11 = 0;
|
|
if (!horizontal) {
|
|
num11 = tmp18;
|
|
}
|
|
obj5[2] = num11;
|
|
current.scrollTo(obj5);
|
|
if (isInitialScroll) {
|
|
const result3 = closure_36.markInitialScrollNativeDispatch(state6);
|
|
}
|
|
if (!!tmp73) {
|
|
state6.scroll = tmp18;
|
|
checkFinishedScrollFallback(state);
|
|
}
|
|
tmp75 = toNativeHorizontalOffset;
|
|
}
|
|
}
|
|
function scrollToIndex(state, animated) {
|
|
let data;
|
|
let index;
|
|
let keyExtractor;
|
|
let viewOffset;
|
|
({ index, viewOffset } = animated);
|
|
if (viewOffset === undefined) {
|
|
viewOffset = 0;
|
|
}
|
|
let flag = animated.animated;
|
|
if (flag === undefined) {
|
|
flag = true;
|
|
}
|
|
let num = animated.viewPosition;
|
|
state = state.state;
|
|
data = state.props.data;
|
|
if (data.length <= 0) {
|
|
let tmp5Result;
|
|
if (undefined !== -1) {
|
|
if (-1 >= 0) {
|
|
const state2 = state.state;
|
|
({ data, keyExtractor } = state2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (-1 < data.length) {
|
|
let num4 = -1;
|
|
if (keyExtractor) {
|
|
num4 = keyExtractor(data[-1], -1);
|
|
}
|
|
tmp6 = num4;
|
|
}
|
|
state2.idCache[-1] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5Result = getItemSize(state, str, -1, state.state.props.data[-1]);
|
|
const tmp5 = getItemSize;
|
|
}
|
|
}
|
|
if (tmp10) {
|
|
num = 1;
|
|
}
|
|
state.scrollForNextCalculateItemsInView = undefined;
|
|
const obj = { animated: null, forceScroll: null, index: null, isInitialScroll: null, itemSize: null, offset: null, viewOffset: null, viewPosition: null };
|
|
obj[0] = flag;
|
|
obj[1] = tmp;
|
|
obj[2] = -1;
|
|
obj[3] = tmp2;
|
|
obj[4] = tmp5Result;
|
|
obj[5] = undefined !== -1 && state.state.positions[-1] || 0;
|
|
obj[6] = viewOffset;
|
|
let num8 = 0;
|
|
if (null != num) {
|
|
num8 = num;
|
|
}
|
|
obj[7] = num8;
|
|
scrollTo(state, obj);
|
|
} else if (index >= length) {
|
|
let num2 = length - 1;
|
|
} else {
|
|
num2 = 0;
|
|
if (index >= 0) {
|
|
num2 = index;
|
|
}
|
|
}
|
|
}
|
|
function dispatchInitialScroll(state, target) {
|
|
let data;
|
|
let forceScroll;
|
|
let keyExtractor;
|
|
let resolvedOffset;
|
|
let waitForCompletionFrame;
|
|
target = target.target;
|
|
const index = target.index;
|
|
let num;
|
|
({ forceScroll, resolvedOffset, waitForCompletionFrame } = target);
|
|
if (undefined !== index) {
|
|
if (state.state.props.data.length <= 0) {
|
|
num = -1;
|
|
} else if (index >= length) {
|
|
let num4 = length - 1;
|
|
} else {
|
|
num4 = 0;
|
|
if (index >= 0) {
|
|
num4 = index;
|
|
}
|
|
}
|
|
}
|
|
const obj = { animated: false, forceScroll, index: null, isInitialScroll: true, itemSize: null, offset: null, precomputedWithViewOffset: true, viewOffset: null, viewPosition: null, waitForInitialScrollCompletionFrame: null };
|
|
let tmp3;
|
|
if (undefined !== num) {
|
|
if (num >= 0) {
|
|
tmp3 = num;
|
|
}
|
|
}
|
|
obj[2] = tmp3;
|
|
let tmp5Result;
|
|
if (undefined !== num) {
|
|
if (num >= 0) {
|
|
state = state.state;
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (num < data.length) {
|
|
let keyExtractorResult = num;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[num], num);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[num] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5Result = getItemSize(state, str, num, state.state.props.data[num]);
|
|
const tmp5 = getItemSize;
|
|
}
|
|
}
|
|
obj[4] = tmp5Result;
|
|
obj[5] = resolvedOffset;
|
|
({ viewOffset: obj[7], viewPosition: obj[8] } = target);
|
|
obj[9] = waitForCompletionFrame;
|
|
scrollTo(state, obj);
|
|
}
|
|
function resolveInitialScrollOffset(state, initialScroll) {
|
|
const initialScrollSession = state.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" === kind) {
|
|
const contentOffset = initialScroll.contentOffset;
|
|
let num3 = 0;
|
|
if (null != contentOffset) {
|
|
num3 = contentOffset;
|
|
}
|
|
let bound2 = num3;
|
|
} else {
|
|
let num = 0;
|
|
if (undefined !== initialScroll.index) {
|
|
const index = initialScroll.index;
|
|
num = undefined !== index && state.state.positions[index] || 0;
|
|
const tmp2 = undefined !== index && state.state.positions[index] || 0;
|
|
}
|
|
const tmp11Result = calculateOffsetWithOffsetPosition(state, num, initialScroll);
|
|
state = state.state;
|
|
const tmp5 = getContentSize(state);
|
|
const _Number = Number;
|
|
let bound1 = tmp11Result;
|
|
if (Number.isFinite(tmp5)) {
|
|
const _Number2 = Number;
|
|
bound1 = tmp11Result;
|
|
if (Number.isFinite(state.scrollLength)) {
|
|
bound1 = tmp11Result;
|
|
if (state.lastLayout) {
|
|
const _Math = Math;
|
|
let viewOffset;
|
|
const bound = Math.max(0, tmp5 - state.scrollLength);
|
|
if (null != initialScroll) {
|
|
viewOffset = initialScroll.viewOffset;
|
|
}
|
|
let num2 = 0;
|
|
if (typeof viewOffset === "number") {
|
|
num2 = 0;
|
|
if (viewOffset < 0) {
|
|
num2 = -viewOffset;
|
|
}
|
|
}
|
|
const _Math2 = Math;
|
|
bound1 = Math.min(tmp11Result, bound + num2);
|
|
}
|
|
}
|
|
}
|
|
const _Math3 = Math;
|
|
bound2 = Math.max(0, bound1);
|
|
const tmp11 = calculateOffsetWithOffsetPosition;
|
|
}
|
|
return bound2;
|
|
}
|
|
function advanceCurrentInitialScrollSession(state, forceScroll) {
|
|
let didFinishInitialScroll;
|
|
let initialScroll;
|
|
let initialScroll2;
|
|
let initialScroll3;
|
|
let isInitialScrollInProgress;
|
|
let queuedInitialLayout;
|
|
let queuedInitialLayout2;
|
|
let scrollingTo;
|
|
let scrollingTo2;
|
|
const initialScrollSession = state.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" === kind) {
|
|
if (null != forceScroll) {
|
|
let forceScroll2 = forceScroll.forceScroll;
|
|
}
|
|
const state3 = state.state;
|
|
({ scrollingTo: scrollingTo2, initialScroll: initialScroll3 } = state3);
|
|
let isInitialScroll;
|
|
({ didFinishInitialScroll, queuedInitialLayout: queuedInitialLayout2 } = state3);
|
|
if (null != scrollingTo2) {
|
|
isInitialScroll = scrollingTo2.isInitialScroll;
|
|
}
|
|
// // eliminated: always false
|
|
let tmp33;
|
|
if (initialScroll3) {
|
|
if (!flag5) {
|
|
if (!didFinishInitialScroll) {
|
|
if (!scrollingTo2) {
|
|
let obj = { initialScroll: null, isInitialScrollInProgress: null, queuedInitialLayout: null, scrollingTo: null };
|
|
obj[0] = initialScroll3;
|
|
obj[1] = tmp32;
|
|
obj[2] = queuedInitialLayout2;
|
|
obj[3] = scrollingTo2;
|
|
tmp33 = obj;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let flag6 = false;
|
|
if (tmp33) {
|
|
const initialScroll4 = tmp33.initialScroll;
|
|
const contentOffset = initialScroll4.contentOffset;
|
|
let num8 = 0;
|
|
if (null != contentOffset) {
|
|
num8 = contentOffset;
|
|
}
|
|
const _Math5 = Math;
|
|
let tmp35 = Math.abs(state3.scroll - num8) <= 1;
|
|
if (tmp35) {
|
|
const _Math6 = Math;
|
|
tmp35 = Math.abs(state3.scrollPending - num8) <= 1;
|
|
}
|
|
if (!forceScroll2) {
|
|
queuedInitialLayout = state3.lastLayout && state3.scrollLength > 0;
|
|
if (null == forceScroll2) {
|
|
if (!queuedInitialLayout) {
|
|
queuedInitialLayout = tmp33.queuedInitialLayout;
|
|
}
|
|
forceScroll2 = queuedInitialLayout;
|
|
}
|
|
obj = { forceScroll: null, resolvedOffset: null, target: null };
|
|
obj[0] = forceScroll2;
|
|
obj[1] = num8;
|
|
obj[2] = initialScroll4;
|
|
dispatchInitialScroll(state, obj);
|
|
flag6 = true;
|
|
const tmp37 = dispatchInitialScroll;
|
|
} else {
|
|
flag6 = false;
|
|
}
|
|
}
|
|
let flag3 = flag6;
|
|
} else {
|
|
if (null != forceScroll) {
|
|
forceScroll = forceScroll.forceScroll;
|
|
}
|
|
state = state.state;
|
|
({ queuedInitialLayout, scrollingTo, initialScroll } = state);
|
|
let isInitialScroll1;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll1 = scrollingTo.isInitialScroll;
|
|
}
|
|
let flag2 = true;
|
|
if (flag2) {
|
|
flag2 = !queuedInitialLayout;
|
|
}
|
|
if (flag2) {
|
|
flag2 = !tmp4;
|
|
}
|
|
let tmp5;
|
|
if (initialScroll) {
|
|
if (!flag2) {
|
|
if (!state.didFinishInitialScroll) {
|
|
if (!scrollingTo) {
|
|
obj = { initialScroll: null, isInitialScrollInProgress: null, queuedInitialLayout: null, scrollingTo: null };
|
|
obj[0] = initialScroll;
|
|
obj[1] = tmp4;
|
|
obj[2] = queuedInitialLayout;
|
|
obj[3] = scrollingTo;
|
|
tmp5 = obj;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
flag3 = false;
|
|
if (tmp5) {
|
|
({ initialScroll: initialScroll2, isInitialScrollInProgress } = tmp5);
|
|
scrollingTo = undefined;
|
|
if (isInitialScrollInProgress) {
|
|
scrollingTo = tmp5.scrollingTo;
|
|
}
|
|
const tmp8 = resolveInitialScrollOffset(state, initialScroll2);
|
|
let tmp9;
|
|
if (scrollingTo) {
|
|
let offset = scrollingTo.targetOffset;
|
|
if (null == offset) {
|
|
offset = scrollingTo.offset;
|
|
}
|
|
tmp9 = offset;
|
|
}
|
|
let tmp10 = undefined === initialScroll2.contentOffset;
|
|
if (!tmp10) {
|
|
const _Math = Math;
|
|
tmp10 = Math.abs(initialScroll2.contentOffset - tmp8) > 1;
|
|
}
|
|
let tmp12 = undefined !== tmp9;
|
|
let tmp13 = tmp12;
|
|
if (tmp12) {
|
|
const _Math2 = Math;
|
|
tmp13 = Math.abs(tmp9 - tmp8) > 1;
|
|
}
|
|
if (tmp12) {
|
|
const _Math3 = Math;
|
|
tmp12 = Math.abs(state.scroll - tmp8) <= 1;
|
|
}
|
|
if (tmp12) {
|
|
const _Math4 = Math;
|
|
tmp12 = Math.abs(state.scrollPending - tmp8) <= 1;
|
|
}
|
|
let num6 = !forceScroll;
|
|
if (!forceScroll) {
|
|
num6 = !tmp10;
|
|
}
|
|
if (num6) {
|
|
num6 = isInitialScrollInProgress;
|
|
}
|
|
if (num6) {
|
|
num6 = !tmp13;
|
|
}
|
|
if (!num6) {
|
|
let tmp17 = forceScroll;
|
|
if (forceScroll) {
|
|
tmp17 = tmp12;
|
|
}
|
|
num6 = tmp17;
|
|
}
|
|
if (!num6) {
|
|
let tmp18 = tmp10;
|
|
if (tmp10) {
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
tmp18 = "offset" !== kind1;
|
|
}
|
|
if (tmp18) {
|
|
const obj1 = {};
|
|
const merged = Object.assign(initialScroll2);
|
|
obj1.contentOffset = tmp8;
|
|
const state2 = state.state;
|
|
state2.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
if (undefined !== state2.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state2.timeoutPreservedInitialScrollClear);
|
|
state2.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state2.initialScroll = obj1;
|
|
const initialScrollSession3 = state2.initialScrollSession;
|
|
let kind2;
|
|
if (null != initialScrollSession3) {
|
|
kind2 = initialScrollSession3.kind;
|
|
}
|
|
let str = "bootstrap";
|
|
if ("offset" === kind2) {
|
|
str = "offset";
|
|
}
|
|
const obj2 = { kind: null };
|
|
obj2[0] = str;
|
|
setInitialScrollSession(state2, obj2);
|
|
const tmp25 = setInitialScrollSession;
|
|
}
|
|
if (null == forceScroll) {
|
|
let queuedInitialLayout1 = tmp5.queuedInitialLayout;
|
|
if (!queuedInitialLayout1) {
|
|
if (isInitialScrollInProgress) {
|
|
isInitialScrollInProgress = tmp10;
|
|
}
|
|
queuedInitialLayout1 = isInitialScrollInProgress;
|
|
}
|
|
forceScroll = queuedInitialLayout1;
|
|
}
|
|
const obj3 = { forceScroll: null, resolvedOffset: null, target: null };
|
|
obj3[0] = forceScroll;
|
|
obj3[1] = tmp8;
|
|
obj3[2] = initialScroll2;
|
|
dispatchInitialScroll(state, obj3);
|
|
num6 = 0;
|
|
const tmp28 = dispatchInitialScroll;
|
|
}
|
|
flag3 = !num6;
|
|
}
|
|
const tmp3 = !isInitialScroll1;
|
|
}
|
|
return flag3;
|
|
}
|
|
function checkAllSizesKnown(state, startBuffered, endBuffered) {
|
|
if (null != startBuffered) {
|
|
if (null != endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let flag = false;
|
|
const containerItemKeys = state.containerItemKeys;
|
|
const keys = containerItemKeys.keys();
|
|
for (const item10007 of keys) {
|
|
let indexByKey = arg0.indexByKey;
|
|
let value = indexByKey.get(item10007);
|
|
let tmp3 = value;
|
|
if (undefined !== value) {
|
|
let tmp4 = value;
|
|
if (tmp3 >= arg1) {
|
|
let tmp5 = value;
|
|
if (tmp3 <= arg2) {
|
|
flag = true;
|
|
let tmp6 = getId;
|
|
let tmp7 = value;
|
|
let tmp8 = getId(arg0, tmp3);
|
|
if (undefined !== tmp8) {
|
|
let sizesKnown = arg0.sizesKnown;
|
|
let tmp10 = tmp8;
|
|
}
|
|
let tmp11 = obj;
|
|
obj.return();
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
return flag;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
function abortBootstrapRevealIfNeeded(state, maxFrames) {
|
|
maxFrames = maxFrames.maxFrames;
|
|
let num = 8;
|
|
if (undefined !== maxFrames) {
|
|
num = maxFrames;
|
|
}
|
|
const maxPasses = maxFrames.maxPasses;
|
|
let num2 = 24;
|
|
if (undefined !== maxPasses) {
|
|
num2 = maxPasses;
|
|
}
|
|
let flag = maxFrames.mountFrameCount >= num || maxFrames.passCount >= num2;
|
|
if (flag) {
|
|
if (closure_31) {
|
|
const _console = console;
|
|
console.warn("LegendList bootstrap initial scroll aborted after exceeding convergence bounds.");
|
|
}
|
|
state = state.state;
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
const initialScroll = state.initialScroll;
|
|
if (bootstrap) {
|
|
if (initialScroll) {
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
if ("offset" !== kind1) {
|
|
if (state.refScroller.current) {
|
|
const initialScrollSession3 = state.initialScrollSession;
|
|
let kind2;
|
|
if (null != initialScrollSession3) {
|
|
kind2 = initialScrollSession3.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind2) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
let frameHandle;
|
|
if (null != bootstrap1) {
|
|
frameHandle = bootstrap1.frameHandle;
|
|
}
|
|
let tmp13 = undefined !== frameHandle;
|
|
if (tmp13) {
|
|
const _cancelAnimationFrame = cancelAnimationFrame;
|
|
tmp13 = typeof cancelAnimationFrame === "function";
|
|
}
|
|
if (tmp13) {
|
|
const _cancelAnimationFrame2 = cancelAnimationFrame;
|
|
cancelAnimationFrame(frameHandle);
|
|
}
|
|
if (bootstrap1) {
|
|
bootstrap1.frameHandle = undefined;
|
|
}
|
|
const initialScrollSession4 = state.initialScrollSession;
|
|
let kind3;
|
|
if (null != initialScrollSession4) {
|
|
kind3 = initialScrollSession4.kind;
|
|
}
|
|
let obj = { bootstrap: null, kind: null };
|
|
obj[1] = kind3;
|
|
setInitialScrollSession(state, obj);
|
|
obj = { forceScroll: true, resolvedOffset: null, target: null, waitForCompletionFrame: false };
|
|
obj[1] = bootstrap.scroll;
|
|
obj[2] = initialScroll;
|
|
dispatchInitialScroll(state, obj);
|
|
flag = true;
|
|
const tmp17 = setInitialScrollSession;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const initialScrollSession5 = state.initialScrollSession;
|
|
let kind4;
|
|
if (null != initialScrollSession5) {
|
|
kind4 = initialScrollSession5.kind;
|
|
}
|
|
let bootstrap2;
|
|
if ("bootstrap" === kind4) {
|
|
bootstrap2 = state.initialScrollSession.bootstrap;
|
|
}
|
|
let scroll;
|
|
if (null != bootstrap2) {
|
|
scroll = bootstrap2.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = state.scrollPending;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = state.scroll;
|
|
}
|
|
let num5 = 0;
|
|
if (null != scroll) {
|
|
num5 = scroll;
|
|
}
|
|
const state2 = state.state;
|
|
const initialScrollSession6 = state2.initialScrollSession;
|
|
let kind5;
|
|
if (null != initialScrollSession6) {
|
|
kind5 = initialScrollSession6.kind;
|
|
}
|
|
let bootstrap3;
|
|
if ("bootstrap" === kind5) {
|
|
bootstrap3 = state2.initialScrollSession.bootstrap;
|
|
}
|
|
let frameHandle1;
|
|
if (null != bootstrap3) {
|
|
frameHandle1 = bootstrap3.frameHandle;
|
|
}
|
|
let tmp28 = undefined !== frameHandle1;
|
|
if (tmp28) {
|
|
const _cancelAnimationFrame3 = cancelAnimationFrame;
|
|
tmp28 = typeof cancelAnimationFrame === "function";
|
|
}
|
|
if (tmp28) {
|
|
const _cancelAnimationFrame4 = cancelAnimationFrame;
|
|
cancelAnimationFrame(frameHandle1);
|
|
}
|
|
if (bootstrap3) {
|
|
bootstrap3.frameHandle = undefined;
|
|
}
|
|
const initialScrollSession7 = state2.initialScrollSession;
|
|
let kind6;
|
|
if (null != initialScrollSession7) {
|
|
kind6 = initialScrollSession7.kind;
|
|
}
|
|
obj = { bootstrap: null, kind: null };
|
|
obj[1] = kind6;
|
|
setInitialScrollSession(state2, obj);
|
|
const clearPreservedInitialScrollOnNextFinish = state2.clearPreservedInitialScrollOnNextFinish;
|
|
let tmp35 = !clearPreservedInitialScrollOnNextFinish;
|
|
if (!clearPreservedInitialScrollOnNextFinish) {
|
|
tmp35 = state2.props.data.length > 0;
|
|
}
|
|
if (tmp35) {
|
|
const initialScroll2 = state2.initialScroll;
|
|
let viewPosition;
|
|
if (null != initialScroll2) {
|
|
viewPosition = initialScroll2.viewPosition;
|
|
}
|
|
tmp35 = 1 === viewPosition;
|
|
}
|
|
const obj1 = { preserveTarget: null, recalculateItems: true, resolvedOffset: null, schedulePreservedTargetClear: null };
|
|
obj1[0] = tmp35;
|
|
obj1[2] = num5;
|
|
obj1[3] = tmp35;
|
|
finishInitialScroll(state, obj1);
|
|
flag = true;
|
|
const tmp32 = setInitialScrollSession;
|
|
}
|
|
return flag;
|
|
}
|
|
function startBootstrapInitialScrollSession(state, scroll) {
|
|
let seedContentOffset;
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
let frameHandle;
|
|
if (null != bootstrap) {
|
|
frameHandle = bootstrap.frameHandle;
|
|
}
|
|
const obj = { frameHandle, mountFrameCount: null, passCount: 0, previousResolvedOffset: "a", scroll: "PX_8", seedContentOffset: "Array", targetIndexSeed: 0, visibleIndices: false };
|
|
let mountFrameCount;
|
|
if (null != bootstrap) {
|
|
mountFrameCount = bootstrap.mountFrameCount;
|
|
}
|
|
let num = 0;
|
|
if (null != mountFrameCount) {
|
|
num = mountFrameCount;
|
|
}
|
|
obj[1] = num;
|
|
({ scroll: obj[4], seedContentOffset } = scroll);
|
|
if (null == seedContentOffset) {
|
|
seedContentOffset = undefined;
|
|
if (null != bootstrap) {
|
|
seedContentOffset = bootstrap.seedContentOffset;
|
|
}
|
|
}
|
|
if (null == seedContentOffset) {
|
|
seedContentOffset = scroll.scroll;
|
|
}
|
|
obj[5] = seedContentOffset;
|
|
obj[6] = scroll.targetIndexSeed;
|
|
setInitialScrollSession(state, { bootstrap: obj, kind: "bootstrap" });
|
|
}
|
|
function rearmBootstrapInitialScroll(state, scroll) {
|
|
state = state.state;
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.passCount = 0;
|
|
bootstrap.previousResolvedOffset = undefined;
|
|
scroll = scroll.scroll;
|
|
if (null == scroll) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
bootstrap.scroll = scroll;
|
|
let seedContentOffset = scroll.seedContentOffset;
|
|
if (null == seedContentOffset) {
|
|
seedContentOffset = bootstrap.seedContentOffset;
|
|
}
|
|
bootstrap.seedContentOffset = seedContentOffset;
|
|
let targetIndexSeed = scroll.targetIndexSeed;
|
|
if (null == targetIndexSeed) {
|
|
targetIndexSeed = bootstrap.targetIndexSeed;
|
|
}
|
|
bootstrap.targetIndexSeed = targetIndexSeed;
|
|
bootstrap.visibleIndices = undefined;
|
|
let obj = { bootstrap: null, kind: "bootstrap" };
|
|
obj[0] = bootstrap;
|
|
setInitialScrollSession(state, obj);
|
|
} else if (undefined !== scroll.scroll) {
|
|
obj = { scroll: null, seedContentOffset: null, targetIndexSeed: null };
|
|
({ scroll: obj2[0], seedContentOffset: obj2[1], targetIndexSeed: obj2[2] } = scroll);
|
|
startBootstrapInitialScrollSession(state, obj);
|
|
}
|
|
const state2 = state.state;
|
|
const initialScrollSession2 = state2.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap1 = state2.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap1) {
|
|
if (undefined === bootstrap1.frameHandle) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap1.frameHandle = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.frameHandle = undefined;
|
|
bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1;
|
|
const obj = { mountFrameCount: null, passCount: null };
|
|
({ mountFrameCount: obj[0], passCount: obj[1] } = bootstrap);
|
|
if (!outer1_78(closure_0, obj)) {
|
|
closure_0 = tmp5;
|
|
state = tmp5.state;
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap1) {
|
|
if (undefined === bootstrap1.frameHandle) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap1.frameHandle = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.frameHandle = undefined;
|
|
bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1;
|
|
const obj = { mountFrameCount: null, passCount: null };
|
|
({ mountFrameCount: obj[0], passCount: obj[1] } = bootstrap);
|
|
if (!outer1_78(closure_0, obj)) {
|
|
closure_0 = tmp5;
|
|
state = tmp5.state;
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap1) {
|
|
if (undefined === bootstrap1.frameHandle) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap1.frameHandle = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.frameHandle = undefined;
|
|
bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1;
|
|
const obj = { mountFrameCount: null, passCount: null };
|
|
({ mountFrameCount: obj[0], passCount: obj[1] } = bootstrap);
|
|
if (!outer1_78(closure_0, obj)) {
|
|
closure_0 = tmp5;
|
|
state = tmp5.state;
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap1) {
|
|
if (undefined === bootstrap1.frameHandle) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap1.frameHandle = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.frameHandle = undefined;
|
|
bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1;
|
|
const obj = { mountFrameCount: null, passCount: null };
|
|
({ mountFrameCount: obj[0], passCount: obj[1] } = bootstrap);
|
|
if (!outer1_78(closure_0, obj)) {
|
|
closure_0 = tmp5;
|
|
state = tmp5.state;
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap1) {
|
|
if (undefined === bootstrap1.frameHandle) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap1.frameHandle = requestAnimationFrame(() => { ... });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
state = state.state;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
const triggerCalculateItemsInView = tmp.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
const obj = { forceFullItemPositions: true };
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView(obj);
|
|
} else {
|
|
call(tmp, obj);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
function clearPendingInitialScrollFooterLayout(state, target) {
|
|
let dataLength;
|
|
let stylePaddingBottom;
|
|
target = target.target;
|
|
let prop;
|
|
({ dataLength, stylePaddingBottom } = target);
|
|
if (null != target) {
|
|
prop = target.preserveForFooterLayout;
|
|
}
|
|
if (prop) {
|
|
let obj = { contentOffset: "Array", index: true, preserveForBottomPadding: null, preserveForFooterLayout: null, viewOffset: 1, viewPosition: -5.778 };
|
|
const _Math = Math;
|
|
obj[1] = Math.max(0, dataLength - 1);
|
|
obj[3] = undefined;
|
|
obj[4] = -stylePaddingBottom;
|
|
state = state.state;
|
|
state.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
if (undefined !== state.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state.timeoutPreservedInitialScrollClear);
|
|
state.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state.initialScroll = obj;
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let str = "bootstrap";
|
|
if ("offset" === kind) {
|
|
str = "offset";
|
|
}
|
|
obj = { kind: null };
|
|
obj[0] = str;
|
|
setInitialScrollSession(state, obj);
|
|
const tmp5 = setInitialScrollSession;
|
|
}
|
|
}
|
|
function didFinishedInitialScrollMoveAwayFromTarget(state, initialScroll) {
|
|
state = state.state;
|
|
if (state.didFinishInitialScroll) {
|
|
const current = state.refScroller.current;
|
|
let prop;
|
|
if (null != current) {
|
|
prop = current.getCurrentScrollOffset;
|
|
}
|
|
if (null == prop) {
|
|
if (typeof undefined !== "number") {
|
|
let scroll = state.scrollPending;
|
|
if (null == scroll) {
|
|
scroll = state.scroll;
|
|
}
|
|
let num2 = 0;
|
|
if (null != scroll) {
|
|
num2 = scroll;
|
|
}
|
|
const tmp4 = num2;
|
|
} else {
|
|
const _Number = Number;
|
|
}
|
|
const _Math = Math;
|
|
return Math.abs(tmp4 - resolveInitialScrollOffset(state, initialScroll)) > num;
|
|
} else {
|
|
const call = prop.call;
|
|
typeof call === "unknown" ? prop() : call(current);
|
|
}
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
function getPreservedEndAnchorOffsetDiff(state) {
|
|
state = state.state;
|
|
const initialScroll = state.initialScroll;
|
|
if (state.didFinishInitialScroll) {
|
|
const scrollingTo = state.scrollingTo;
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
if (!isInitialScroll) {
|
|
if (initialScroll) {
|
|
if (1 === initialScroll.viewPosition) {
|
|
if (0 !== state.props.data.length) {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
if (typeof state.lastNativeScroll === "number") {
|
|
const _Number = Number;
|
|
if (Number.isFinite(state.lastNativeScroll)) {
|
|
let lastNativeScroll = state.lastNativeScroll;
|
|
}
|
|
return resolveInitialScrollOffset(state, initialScroll) - lastNativeScroll;
|
|
}
|
|
const current = state.refScroller.current;
|
|
let prop;
|
|
if (null != current) {
|
|
prop = current.getCurrentScrollOffset;
|
|
}
|
|
if (null == prop) {
|
|
if (typeof lastNativeScroll !== "number") {
|
|
let scroll = state.scrollPending;
|
|
if (null == scroll) {
|
|
scroll = state.scroll;
|
|
}
|
|
let num2 = 0;
|
|
if (null != scroll) {
|
|
num2 = scroll;
|
|
}
|
|
lastNativeScroll = num2;
|
|
} else {
|
|
const _Number2 = Number;
|
|
}
|
|
} else {
|
|
const call = prop.call;
|
|
typeof call === "unknown" ? prop() : call(current);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function evaluateBootstrapInitialScroll(state) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let previousResolvedOffset;
|
|
let visibleIndices;
|
|
state = state.state;
|
|
let initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
const initialScroll = state.initialScroll;
|
|
if (bootstrap) {
|
|
if (initialScroll) {
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
if ("offset" !== kind1) {
|
|
const scrollingTo = state.scrollingTo;
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
if (!isInitialScroll) {
|
|
bootstrap.passCount = bootstrap.passCount + 1;
|
|
let obj = { mountFrameCount: null, passCount: null };
|
|
({ mountFrameCount: obj[0], passCount: obj[1] } = bootstrap);
|
|
if (!abortBootstrapRevealIfNeeded(state, obj)) {
|
|
if (tmp6) {
|
|
bootstrap.targetIndexSeed = undefined;
|
|
}
|
|
const tmp8 = resolveInitialScrollOffset(state, initialScroll);
|
|
const _Math = Math;
|
|
data = state.props.data;
|
|
const positions = state.positions;
|
|
let targetIndexSeed = bootstrap.targetIndexSeed;
|
|
const tmp10 = checkAllSizesKnown(state, state.startBuffered, state.endBuffered);
|
|
tmp6 = undefined !== initialScroll.index && state.startBuffered >= 0 && state.endBuffered >= 0 && initialScroll.index >= state.startBuffered && initialScroll.index <= state.endBuffered;
|
|
if (null == targetIndexSeed) {
|
|
let startBuffered;
|
|
if (state.startBuffered >= 0) {
|
|
startBuffered = state.startBuffered;
|
|
}
|
|
targetIndexSeed = startBuffered;
|
|
}
|
|
const sum = tmp8 + state.scrollLength;
|
|
let num3 = 0;
|
|
if (undefined !== targetIndexSeed) {
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
num3 = Math.max(0, Math.min(length - 1, targetIndexSeed));
|
|
}
|
|
let tmp15 = num3;
|
|
let sum1 = num3;
|
|
if (num3 > 0) {
|
|
while (true) {
|
|
let diff = tmp15 - 1;
|
|
let tmp18 = positions[diff];
|
|
let tmp19 = tmp15;
|
|
if (undefined !== tmp18) {
|
|
let tmp22 = state.idCache[diff];
|
|
if (null == tmp22) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str3 = "";
|
|
if (data) {
|
|
let tmp20 = null;
|
|
if (diff < data.length) {
|
|
let keyExtractorResult = diff;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[diff], diff);
|
|
}
|
|
tmp20 = keyExtractorResult;
|
|
}
|
|
state.idCache[diff] = tmp20;
|
|
str3 = tmp20;
|
|
}
|
|
tmp22 = str3;
|
|
}
|
|
let sizes = state.sizes;
|
|
let value = sizes.get(tmp22);
|
|
if (null == value) {
|
|
let tmp25 = getItemSize;
|
|
let num4 = 0;
|
|
let tmp26 = state;
|
|
let tmp27 = tmp22;
|
|
let tmp28 = diff;
|
|
value = getItemSize(state, tmp24, diff, data[diff]);
|
|
}
|
|
if (undefined !== value) {
|
|
sum1 = tmp15;
|
|
if (tmp18 + value <= tmp8) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
tmp15 = diff;
|
|
sum1 = diff;
|
|
if (0 >= diff) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
const items = [];
|
|
if (sum1 < data.length) {
|
|
while (true) {
|
|
let tmp29 = positions[sum1];
|
|
if (undefined !== tmp29) {
|
|
let tmp33 = state.idCache[sum1];
|
|
if (null == tmp33) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp33 = str4;
|
|
}
|
|
let sizes2 = state.sizes;
|
|
value = sizes2.get(tmp33);
|
|
if (null == value) {
|
|
let tmp36 = getItemSize;
|
|
let num5 = 0;
|
|
let tmp37 = state;
|
|
let tmp38 = tmp33;
|
|
let tmp39 = sum1;
|
|
value = getItemSize(state, tmp35, tmp30, data[sum1]);
|
|
}
|
|
if (undefined !== value) {
|
|
if (tmp29 < sum) {
|
|
if (tmp29 + value > tmp8) {
|
|
let arr = items.push(sum1);
|
|
}
|
|
}
|
|
if (items.length > 0) {
|
|
if (tmp29 >= sum) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
sum1 = sum1 + 1;
|
|
if (sum1 >= length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
const tmp12 = Math.abs(bootstrap.scroll - tmp8) > 1;
|
|
({ previousResolvedOffset, visibleIndices } = bootstrap);
|
|
bootstrap.previousResolvedOffset = tmp8;
|
|
bootstrap.visibleIndices = items;
|
|
if (tmp12) {
|
|
bootstrap.scroll = tmp8;
|
|
const _requestAnimationFrame2 = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
const triggerCalculateItemsInView = tmp.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
const obj = { forceFullItemPositions: true };
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView(obj);
|
|
} else {
|
|
call(tmp, obj);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
} else if (tmp10) {
|
|
if (tmp41) {
|
|
if (undefined !== previousResolvedOffset) {
|
|
const _Math4 = Math;
|
|
if (Math.abs(previousResolvedOffset - tmp8) <= 1) {
|
|
let flag = false;
|
|
if (visibleIndices) {
|
|
flag = false;
|
|
if (visibleIndices.length === items.length) {
|
|
let num6 = 0;
|
|
flag = true;
|
|
if (0 < visibleIndices.length) {
|
|
flag = false;
|
|
while (visibleIndices[num6] === items[num6]) {
|
|
let sum2 = num6 + 1;
|
|
num6 = sum2;
|
|
flag = true;
|
|
if (sum2 >= visibleIndices.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (flag) {
|
|
const initialScrollSession3 = state.initialScrollSession;
|
|
let kind2;
|
|
if (null != initialScrollSession3) {
|
|
kind2 = initialScrollSession3.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind2) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
let frameHandle;
|
|
if (null != bootstrap1) {
|
|
frameHandle = bootstrap1.frameHandle;
|
|
}
|
|
let tmp48 = undefined !== frameHandle;
|
|
if (tmp48) {
|
|
const _cancelAnimationFrame = cancelAnimationFrame;
|
|
tmp48 = typeof cancelAnimationFrame === "function";
|
|
}
|
|
if (tmp48) {
|
|
const _cancelAnimationFrame2 = cancelAnimationFrame;
|
|
cancelAnimationFrame(frameHandle);
|
|
}
|
|
if (bootstrap1) {
|
|
bootstrap1.frameHandle = undefined;
|
|
}
|
|
const initialScrollSession4 = state.initialScrollSession;
|
|
let kind3;
|
|
if (null != initialScrollSession4) {
|
|
kind3 = initialScrollSession4.kind;
|
|
}
|
|
obj = { bootstrap: null, kind: null };
|
|
obj[1] = kind3;
|
|
setInitialScrollSession(state, obj);
|
|
obj = { forceScroll: true, resolvedOffset: null, target: null, waitForCompletionFrame: false };
|
|
obj[1] = tmp8;
|
|
obj[2] = initialScroll;
|
|
dispatchInitialScroll(state, obj);
|
|
const tmp50 = setInitialScrollSession;
|
|
}
|
|
}
|
|
}
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame1 = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
const triggerCalculateItemsInView = tmp.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
const obj = { forceFullItemPositions: true };
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView(obj);
|
|
} else {
|
|
call(tmp, obj);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
tmp41 = items.length > 0 && items.every((arg0) => {
|
|
let data;
|
|
let keyExtractor;
|
|
let tmp2 = state.idCache[arg0];
|
|
if (null == tmp2) {
|
|
({ data, keyExtractor } = tmp.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp3 = null;
|
|
if (arg0 < data.length) {
|
|
let keyExtractorResult = arg0;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[arg0], arg0);
|
|
}
|
|
tmp3 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[arg0] = tmp3;
|
|
str = tmp3;
|
|
}
|
|
tmp2 = str;
|
|
}
|
|
const sizesKnown = tmp.sizesKnown;
|
|
return sizesKnown.has(tmp2);
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function retargetActiveInitialScrollAtEnd(state) {
|
|
state = state.state;
|
|
const initialScroll = state.initialScroll;
|
|
if (state.didFinishInitialScroll) {
|
|
let flag = false;
|
|
if (undefined !== getPreservedEndAnchorOffsetDiff(state)) {
|
|
const obj = {};
|
|
let closure_0 = state;
|
|
const state2 = state.state;
|
|
state2.preservedEndAnchorCorrection = obj;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const preservedEndAnchorCorrection = state.preservedEndAnchorCorrection;
|
|
if (preservedEndAnchorCorrection === obj1) {
|
|
const tmp10 = outer1_83(closure_0);
|
|
if (undefined !== tmp10) {
|
|
const _Math = Math;
|
|
if (Math.abs(tmp10) > 1) {
|
|
const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime;
|
|
let tmp4 = !lastRequestTime;
|
|
if (lastRequestTime) {
|
|
const lastNativeScrollTime = tmp.lastNativeScrollTime;
|
|
let num = 0;
|
|
if (null != lastNativeScrollTime) {
|
|
num = lastNativeScrollTime;
|
|
}
|
|
tmp4 = num > preservedEndAnchorCorrection.lastRequestTime;
|
|
}
|
|
if (tmp4) {
|
|
const _Date = Date;
|
|
preservedEndAnchorCorrection.lastRequestTime = Date.now();
|
|
outer1_65(tmp9, tmp10);
|
|
}
|
|
closure_0 = tmp9;
|
|
state = tmp9.state;
|
|
state.preservedEndAnchorCorrection = tmp2;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const preservedEndAnchorCorrection = state.preservedEndAnchorCorrection;
|
|
if (preservedEndAnchorCorrection === obj1) {
|
|
const tmp10 = outer1_83(closure_0);
|
|
if (undefined !== tmp10) {
|
|
const _Math = Math;
|
|
if (Math.abs(tmp10) > 1) {
|
|
const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime;
|
|
let tmp4 = !lastRequestTime;
|
|
if (lastRequestTime) {
|
|
const lastNativeScrollTime = tmp.lastNativeScrollTime;
|
|
let num = 0;
|
|
if (null != lastNativeScrollTime) {
|
|
num = lastNativeScrollTime;
|
|
}
|
|
tmp4 = num > preservedEndAnchorCorrection.lastRequestTime;
|
|
}
|
|
if (tmp4) {
|
|
const _Date = Date;
|
|
preservedEndAnchorCorrection.lastRequestTime = Date.now();
|
|
outer1_65(tmp9, tmp10);
|
|
}
|
|
closure_0 = tmp9;
|
|
state = tmp9.state;
|
|
state.preservedEndAnchorCorrection = tmp2;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const preservedEndAnchorCorrection = state.preservedEndAnchorCorrection;
|
|
if (preservedEndAnchorCorrection === obj1) {
|
|
const tmp10 = outer1_83(closure_0);
|
|
if (undefined !== tmp10) {
|
|
const _Math = Math;
|
|
if (Math.abs(tmp10) > 1) {
|
|
const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime;
|
|
let tmp4 = !lastRequestTime;
|
|
if (lastRequestTime) {
|
|
const lastNativeScrollTime = tmp.lastNativeScrollTime;
|
|
let num = 0;
|
|
if (null != lastNativeScrollTime) {
|
|
num = lastNativeScrollTime;
|
|
}
|
|
tmp4 = num > preservedEndAnchorCorrection.lastRequestTime;
|
|
}
|
|
if (tmp4) {
|
|
const _Date = Date;
|
|
preservedEndAnchorCorrection.lastRequestTime = Date.now();
|
|
outer1_65(tmp9, tmp10);
|
|
}
|
|
closure_0 = tmp9;
|
|
state = tmp9.state;
|
|
state.preservedEndAnchorCorrection = tmp2;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const preservedEndAnchorCorrection = state.preservedEndAnchorCorrection;
|
|
if (preservedEndAnchorCorrection === obj1) {
|
|
const tmp10 = outer1_83(closure_0);
|
|
if (undefined !== tmp10) {
|
|
const _Math = Math;
|
|
if (Math.abs(tmp10) > 1) {
|
|
const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime;
|
|
let tmp4 = !lastRequestTime;
|
|
if (lastRequestTime) {
|
|
const lastNativeScrollTime = tmp.lastNativeScrollTime;
|
|
let num = 0;
|
|
if (null != lastNativeScrollTime) {
|
|
num = lastNativeScrollTime;
|
|
}
|
|
tmp4 = num > preservedEndAnchorCorrection.lastRequestTime;
|
|
}
|
|
if (tmp4) {
|
|
const _Date = Date;
|
|
preservedEndAnchorCorrection.lastRequestTime = Date.now();
|
|
outer1_65(tmp9, tmp10);
|
|
}
|
|
closure_0 = tmp9;
|
|
state = tmp9.state;
|
|
state.preservedEndAnchorCorrection = tmp2;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => { ... });
|
|
}
|
|
}
|
|
tmp.preservedEndAnchorCorrection = undefined;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
tmp.preservedEndAnchorCorrection = undefined;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
tmp.preservedEndAnchorCorrection = undefined;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
tmp.preservedEndAnchorCorrection = undefined;
|
|
}
|
|
});
|
|
flag = true;
|
|
}
|
|
let tmp4 = flag;
|
|
} else {
|
|
let tmp = !initialScroll;
|
|
if (initialScroll) {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
tmp = "offset" === kind;
|
|
}
|
|
if (!tmp) {
|
|
tmp = 1 !== initialScroll.viewPosition;
|
|
}
|
|
if (!tmp) {
|
|
tmp = 0 === state.props.data.length;
|
|
}
|
|
tmp4 = !tmp;
|
|
if (!tmp) {
|
|
tmp4 = advanceCurrentInitialScrollSession(state, { forceScroll: true });
|
|
}
|
|
}
|
|
return tmp4;
|
|
}
|
|
function resetLayoutCachesForDataChange(indexByKey) {
|
|
indexByKey = indexByKey.indexByKey;
|
|
indexByKey.clear();
|
|
indexByKey.idCache.length = 0;
|
|
indexByKey.positions.length = 0;
|
|
indexByKey.columns.length = 0;
|
|
indexByKey.columnSpans.length = 0;
|
|
}
|
|
function scheduleContainerLayout(pendingContainerIds, items) {
|
|
pendingContainerIds = pendingContainerIds.pendingContainerIds;
|
|
if (undefined === items) {
|
|
pendingContainerIds.pendingContainerIds = null;
|
|
} else if (null !== pendingContainerIds) {
|
|
if (pendingContainerIds) {
|
|
if (typeof items === "number") {
|
|
pendingContainerIds.add(items);
|
|
let set = pendingContainerIds;
|
|
} else {
|
|
const tmp23 = items[Symbol.iterator]();
|
|
set = pendingContainerIds;
|
|
while (tmp23 !== undefined) {
|
|
let addResult1 = pendingContainerIds.add(tmp7);
|
|
continue;
|
|
}
|
|
}
|
|
} else if (typeof items === "number") {
|
|
const _Set = Set;
|
|
items = [items];
|
|
set = new Set(items);
|
|
} else {
|
|
const _Set2 = Set;
|
|
set = new Set(items);
|
|
}
|
|
pendingContainerIds.pendingContainerIds = set;
|
|
}
|
|
if (undefined === pendingContainerIds.pendingContainerIds) {
|
|
const tmp14 = peek$(pendingContainerIds, "containerLayoutEpoch");
|
|
let num2 = 0;
|
|
if (null != tmp14) {
|
|
num2 = tmp14;
|
|
}
|
|
set$(pendingContainerIds, "containerLayoutEpoch", num2 + 1);
|
|
const tmp12 = set$;
|
|
}
|
|
}
|
|
function syncMountedContainer(state, arg1, clearTimeoutResult, updateLayout) {
|
|
let data;
|
|
let data2;
|
|
let itemsAreEqual;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
state = state.state;
|
|
({ data, itemsAreEqual, keyExtractor } = state.props);
|
|
if (undefined === data[clearTimeoutResult]) {
|
|
return { didChangePosition: false, didRefreshData: false };
|
|
} else {
|
|
let tmp7 = state.idCache[clearTimeoutResult];
|
|
if (null == tmp7) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str = "";
|
|
if (data2) {
|
|
let tmp5 = null;
|
|
if (clearTimeoutResult < data2.length) {
|
|
let keyExtractor2Result = clearTimeoutResult;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[clearTimeoutResult], clearTimeoutResult);
|
|
}
|
|
tmp5 = keyExtractor2Result;
|
|
}
|
|
state.idCache[clearTimeoutResult] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp7 = str;
|
|
}
|
|
updateLayout = updateLayout.updateLayout;
|
|
let flag = false;
|
|
if (tmp9) {
|
|
let num = tmp3[clearTimeoutResult];
|
|
if (undefined === num) {
|
|
const _HermesInternal14 = HermesInternal;
|
|
set$(state, "containerPosition" + arg1, c32);
|
|
return { didChangePosition: false, didRefreshData: false };
|
|
} else {
|
|
if (!num) {
|
|
num = 0;
|
|
}
|
|
const scrollAdjustPending = updateLayout.scrollAdjustPending;
|
|
let num3 = 0;
|
|
if (null != scrollAdjustPending) {
|
|
num3 = scrollAdjustPending;
|
|
}
|
|
const diff = num - num3;
|
|
const sizes = state.sizes;
|
|
let value = sizes.get(tmp7);
|
|
if (null == value) {
|
|
value = getItemSize(state, tmp7, clearTimeoutResult, tmp4);
|
|
}
|
|
let values = state.values;
|
|
value = values.get("totalSize");
|
|
let props;
|
|
if (null != state) {
|
|
props = state.props;
|
|
}
|
|
let horizontal;
|
|
if (null != props) {
|
|
horizontal = props.horizontal;
|
|
}
|
|
let tmp21 = horizontal;
|
|
if (tmp21) {
|
|
let rtl;
|
|
if (null != props) {
|
|
rtl = props.rtl;
|
|
}
|
|
if (null == rtl) {
|
|
rtl = get_ActivityIndicator.I18nManager.isRTL;
|
|
}
|
|
tmp21 = rtl;
|
|
}
|
|
let bound = diff;
|
|
if (tmp21) {
|
|
bound = diff;
|
|
if (undefined !== value) {
|
|
const _Number = Number;
|
|
bound = diff;
|
|
if (Number.isFinite(value)) {
|
|
const _Math = Math;
|
|
bound = Math.max(0, value - diff - value);
|
|
}
|
|
}
|
|
}
|
|
const _HermesInternal = HermesInternal;
|
|
values = state.values;
|
|
const _HermesInternal2 = HermesInternal;
|
|
const value1 = values.get("containerPosition" + arg1);
|
|
values = state.values;
|
|
const _HermesInternal3 = HermesInternal;
|
|
const value2 = values.get("containerColumn" + arg1);
|
|
const values1 = state.values;
|
|
let tmp33 = bound > c32;
|
|
const value3 = values1.get("containerSpan" + arg1);
|
|
if (tmp33) {
|
|
tmp33 = bound !== value1;
|
|
}
|
|
let flag2 = false;
|
|
if (tmp33) {
|
|
const _HermesInternal4 = HermesInternal;
|
|
set$(state, "containerPosition" + arg1, bound);
|
|
flag2 = true;
|
|
}
|
|
if (tmp36) {
|
|
const _HermesInternal5 = HermesInternal;
|
|
set$(state, "containerColumn" + arg1, tmp26);
|
|
}
|
|
flag = flag2;
|
|
if ((tmp2[clearTimeoutResult] || 1) !== value3) {
|
|
const _HermesInternal6 = HermesInternal;
|
|
set$(state, "containerSpan" + arg1, tmp27);
|
|
flag = flag2;
|
|
}
|
|
tmp36 = (tmp[clearTimeoutResult] || 1) >= 0 && (tmp[clearTimeoutResult] || 1) !== value2;
|
|
}
|
|
}
|
|
const _HermesInternal7 = HermesInternal;
|
|
const values2 = state.values;
|
|
if (values2.get("containerItemIndex" + arg1) !== clearTimeoutResult) {
|
|
const _HermesInternal8 = HermesInternal;
|
|
set$(state, "containerItemIndex" + arg1, clearTimeoutResult);
|
|
}
|
|
const _HermesInternal9 = HermesInternal;
|
|
const values3 = state.values;
|
|
const value4 = values3.get("containerItemData" + arg1);
|
|
let flag3 = false;
|
|
if (value4 !== tmp4) {
|
|
const pendingDataComparison3 = state.pendingDataComparison;
|
|
let previousData;
|
|
if (null != pendingDataComparison3) {
|
|
previousData = pendingDataComparison3.previousData;
|
|
}
|
|
let prop;
|
|
if (previousData === state.previousData) {
|
|
const pendingDataComparison = state.pendingDataComparison;
|
|
let nextData;
|
|
if (null != pendingDataComparison) {
|
|
nextData = pendingDataComparison.nextData;
|
|
}
|
|
if (nextData === data) {
|
|
prop = state.pendingDataComparison;
|
|
}
|
|
}
|
|
let tmp48;
|
|
if (null != prop) {
|
|
tmp48 = prop.byIndex[clearTimeoutResult];
|
|
}
|
|
let num7 = 0;
|
|
if (null != tmp48) {
|
|
num7 = tmp48;
|
|
}
|
|
let num8 = 2;
|
|
if (2 === num7) {
|
|
const _HermesInternal13 = HermesInternal;
|
|
set$(state, "containerItemData" + arg1, tmp4);
|
|
flag3 = true;
|
|
} else {
|
|
flag3 = false;
|
|
if (1 !== num7) {
|
|
const _HermesInternal15 = HermesInternal;
|
|
const values4 = state.values;
|
|
const value5 = values4.get("containerItemKey" + arg1);
|
|
if (null != value5) {
|
|
tmp7 = value5;
|
|
}
|
|
if (null != keyExtractor) {
|
|
const keyExtractorResult = keyExtractor(value4, clearTimeoutResult);
|
|
}
|
|
if (undefined !== value4) {
|
|
if (keyExtractor) {
|
|
if (keyExtractorResult === tmp7) {
|
|
if (itemsAreEqual) {
|
|
const itemsAreEqualResult = itemsAreEqual(value4, tmp4, clearTimeoutResult, data);
|
|
if (!tmp59) {
|
|
if (state.previousData) {
|
|
let obj = { byIndex: null, nextData: null, previousData: null };
|
|
obj[0] = [];
|
|
obj[1] = data;
|
|
obj[2] = state.previousData;
|
|
state.pendingDataComparison = obj;
|
|
}
|
|
}
|
|
const pendingDataComparison2 = state.pendingDataComparison;
|
|
let byIndex;
|
|
if (null != pendingDataComparison2) {
|
|
byIndex = pendingDataComparison2.byIndex;
|
|
}
|
|
if (byIndex) {
|
|
if (itemsAreEqualResult) {
|
|
num8 = 1;
|
|
}
|
|
state.pendingDataComparison.byIndex[clearTimeoutResult] = num8;
|
|
}
|
|
flag3 = false;
|
|
if (!itemsAreEqualResult) {
|
|
const _HermesInternal12 = HermesInternal;
|
|
set$(state, "containerItemData" + arg1, tmp4);
|
|
flag3 = true;
|
|
}
|
|
tmp59 = state.pendingDataComparison && state.pendingDataComparison.previousData === state.previousData && state.pendingDataComparison.nextData === data;
|
|
} else {
|
|
const _HermesInternal11 = HermesInternal;
|
|
set$(state, "containerItemData" + arg1, tmp4);
|
|
flag3 = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const _HermesInternal10 = HermesInternal;
|
|
set$(state, "containerItemData" + arg1, tmp4);
|
|
flag3 = true;
|
|
}
|
|
}
|
|
}
|
|
obj = { didChangePosition: null, didRefreshData: null };
|
|
obj[0] = flag;
|
|
obj[1] = flag3;
|
|
return obj;
|
|
}
|
|
}
|
|
function updateItemPositions(context, arg1, sum) {
|
|
let columnSpans;
|
|
let columns;
|
|
let data;
|
|
let data2;
|
|
let data3;
|
|
let data4;
|
|
let data5;
|
|
let data6;
|
|
let doMVCP;
|
|
let forceFullUpdate;
|
|
let indexByKey;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let keyExtractor3;
|
|
let keyExtractor4;
|
|
let keyExtractor5;
|
|
let overrideItemLayout;
|
|
let positions;
|
|
let props;
|
|
let scrollVelocity;
|
|
let sizesKnown;
|
|
let startIndex;
|
|
let state2;
|
|
let totalSize;
|
|
let totalSize2;
|
|
let totalSize3;
|
|
let totalSize4;
|
|
let totalSize5;
|
|
let totalSize6;
|
|
let values4;
|
|
let obj = sum;
|
|
if (sum === undefined) {
|
|
obj = { doMVCP: false, forceFullUpdate: false, optimizeForVisibleWindow: false, scrollBottomBuffered: -1, startIndex: 0 };
|
|
}
|
|
({ doMVCP, forceFullUpdate } = obj);
|
|
if (forceFullUpdate === undefined) {
|
|
forceFullUpdate = false;
|
|
}
|
|
let flag = obj.optimizeForVisibleWindow;
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
({ scrollVelocity, startIndex } = obj);
|
|
const state = context.state;
|
|
({ columns, columnSpans, indexByKey, positions, sizesKnown, props } = state);
|
|
({ data, overrideItemLayout } = props);
|
|
let values = context.values;
|
|
let clearTimeoutResult = context.positionListeners.size > 0;
|
|
let value = values.get("numColumns");
|
|
let num = 1;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
if (closure_31) {
|
|
const _Map = Map;
|
|
const map = new Map();
|
|
}
|
|
values = context.values;
|
|
value = values.get("extraData");
|
|
if (overrideItemLayout) {
|
|
obj = { span: 1 };
|
|
}
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = getScrollVelocity(state);
|
|
}
|
|
let tmp11 = !forceFullUpdate;
|
|
if (!forceFullUpdate) {
|
|
tmp11 = !arg1;
|
|
}
|
|
if (tmp11) {
|
|
if (!flag) {
|
|
const _Math = Math;
|
|
flag = Math.abs(scrollVelocity) > 0;
|
|
}
|
|
if (!flag) {
|
|
flag = false;
|
|
}
|
|
tmp11 = flag;
|
|
}
|
|
let tmp14 = !doMVCP;
|
|
sum = obj.scrollBottomBuffered + 1000;
|
|
if (doMVCP) {
|
|
tmp14 = arg1;
|
|
}
|
|
if (!tmp14) {
|
|
tmp14 = 0 !== state.scrollAdjustHandler.getAdjust();
|
|
const scrollAdjustHandler = state.scrollAdjustHandler;
|
|
}
|
|
if (!tmp14) {
|
|
values = context.values;
|
|
const value1 = values.get("scrollAdjustPending");
|
|
let num2 = 0;
|
|
if (null != value1) {
|
|
num2 = value1;
|
|
}
|
|
tmp14 = 0 !== num2;
|
|
}
|
|
if (arg1) {
|
|
columnSpans.length = 0;
|
|
}
|
|
if (num <= 1) {
|
|
if (columns.length) {
|
|
columns.length = 0;
|
|
}
|
|
if (columnSpans.length) {
|
|
columnSpans.length = 0;
|
|
}
|
|
}
|
|
let num3 = 0;
|
|
let tmp16 = startIndex;
|
|
if (startIndex > 0) {
|
|
if (tmp5) {
|
|
({ state: state2, values: values4 } = context);
|
|
const value2 = values3.get("numColumns");
|
|
if (1 === state2.columns[startIndex]) {
|
|
let num6 = 0;
|
|
if (startIndex > 0) {
|
|
const diff = startIndex - 1;
|
|
let num7 = 0;
|
|
if (null != state2.positions[diff]) {
|
|
num7 = tmp37;
|
|
}
|
|
if (value2 <= 1) {
|
|
const _Math5 = Math;
|
|
let bound = Math.max(0, diff);
|
|
} else {
|
|
const _Math4 = Math;
|
|
let bound1 = Math.max(0, diff);
|
|
bound = bound1;
|
|
if (bound1 > 0) {
|
|
bound = bound1;
|
|
while (1 !== state2.columns[bound1]) {
|
|
bound1 = bound1 - 1;
|
|
bound = bound1;
|
|
if (bound1 <= 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const state3 = context.state;
|
|
let num8 = 0;
|
|
if (diff >= bound) {
|
|
data = state3.props.data;
|
|
num8 = 0;
|
|
if (data) {
|
|
let num9 = 0;
|
|
let num10 = 0;
|
|
while (bound <= diff) {
|
|
let tmp44 = num9;
|
|
let tmp45 = num9;
|
|
if (bound >= 0) {
|
|
tmp45 = num9;
|
|
if (bound < data.length) {
|
|
let tmp46 = getItemSize;
|
|
let num11 = 0;
|
|
let tmp47 = context;
|
|
let tmp48 = bound;
|
|
let flag4 = true;
|
|
let tmp49 = getItemSize(context, state3.idCache[bound], tmp43, data[bound], true);
|
|
tmp45 = num9;
|
|
if (tmp49 > num9) {
|
|
tmp45 = tmp49;
|
|
}
|
|
}
|
|
}
|
|
bound = bound + 1;
|
|
num9 = tmp45;
|
|
num10 = tmp45;
|
|
}
|
|
num8 = num10;
|
|
}
|
|
}
|
|
num6 = num7 + num8;
|
|
}
|
|
num3 = num6;
|
|
tmp16 = startIndex;
|
|
} else if (value2 <= 1) {
|
|
const _Math3 = Math;
|
|
let bound2 = Math.max(0, startIndex);
|
|
} else {
|
|
const _Math2 = Math;
|
|
let bound3 = Math.max(0, startIndex);
|
|
bound2 = bound3;
|
|
if (bound3 > 0) {
|
|
bound2 = bound3;
|
|
while (1 !== state2.columns[bound3]) {
|
|
bound3 = bound3 - 1;
|
|
bound2 = bound3;
|
|
if (bound3 <= 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
num3 = 0;
|
|
tmp16 = startIndex;
|
|
if (startIndex < length) {
|
|
const diff1 = startIndex - 1;
|
|
({ data: data2, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data2) {
|
|
let tmp18 = null;
|
|
if (diff1 < data2.length) {
|
|
let keyExtractorResult = diff1;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data2[diff1], diff1);
|
|
}
|
|
tmp18 = keyExtractorResult;
|
|
}
|
|
state.idCache[diff1] = tmp18;
|
|
str2 = tmp18;
|
|
}
|
|
let num4 = 0;
|
|
if (null != positions[diff1]) {
|
|
num4 = tmp20;
|
|
}
|
|
let value3 = sizesKnown.get(str2);
|
|
if (null == value3) {
|
|
value3 = getItemSize(context, str2, diff1, data[diff1], true, tmp14, false);
|
|
}
|
|
num3 = num4 + value3;
|
|
tmp16 = startIndex;
|
|
}
|
|
}
|
|
}
|
|
let tmp50 = arg1;
|
|
if (!arg1) {
|
|
tmp50 = 0 === indexByKey.size;
|
|
}
|
|
let tmp51 = tmp5;
|
|
if (num > 1) {
|
|
tmp51 = overrideItemLayout;
|
|
}
|
|
if (tmp51) {
|
|
tmp51 = obj;
|
|
}
|
|
let num12 = 0;
|
|
let num13 = 1;
|
|
let flag5 = false;
|
|
if (tmp16 < data.length) {
|
|
while (true) {
|
|
let tmp53 = tmp16;
|
|
let tmp54 = tmp52;
|
|
let tmp55 = num12;
|
|
let num14 = num13;
|
|
let tmp56 = num3;
|
|
if (tmp11) {
|
|
if (undefined !== tmp52) {
|
|
flag5 = true;
|
|
if (tmp16 > tmp52) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
let sum1 = tmp52;
|
|
if (tmp11) {
|
|
sum1 = tmp52;
|
|
if (undefined === tmp52) {
|
|
sum1 = tmp52;
|
|
if (!tmp3) {
|
|
sum1 = tmp52;
|
|
if (!arg1) {
|
|
sum1 = tmp52;
|
|
if (num3 > sum) {
|
|
let num15 = 1;
|
|
if (tmp5) {
|
|
num15 = num;
|
|
}
|
|
sum1 = tmp16 + num15 + 10;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp58 = tmp2[tmp16];
|
|
if (null == tmp58) {
|
|
({ data: data3, keyExtractor: keyExtractor2 } = state.props);
|
|
let str3 = "";
|
|
if (data3) {
|
|
let tmp59 = null;
|
|
if (tmp16 < data3.length) {
|
|
let keyExtractor2Result = tmp16;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data3[tmp16], tmp16);
|
|
}
|
|
tmp59 = keyExtractor2Result;
|
|
}
|
|
state.idCache[tmp16] = tmp59;
|
|
str3 = tmp59;
|
|
}
|
|
tmp58 = str3;
|
|
}
|
|
let num16 = 1;
|
|
if (tmp51) {
|
|
obj.span = 1;
|
|
let tmp61 = obj;
|
|
let tmp62 = tmp16;
|
|
let tmp63 = num;
|
|
let tmp64 = value;
|
|
let overrideItemLayoutResult = overrideItemLayout(obj, data[tmp16], tmp53, num, value);
|
|
let span = obj.span;
|
|
let isFiniteResult = undefined !== span;
|
|
if (isFiniteResult) {
|
|
let _Number = Number;
|
|
isFiniteResult = Number.isFinite(span);
|
|
}
|
|
num16 = 1;
|
|
if (isFiniteResult) {
|
|
let _Math6 = Math;
|
|
let _Math7 = Math;
|
|
let _Math8 = Math;
|
|
num16 = Math.max(1, Math.min(num, Math.round(span)));
|
|
}
|
|
}
|
|
let tmp67 = tmp5;
|
|
if (tmp5) {
|
|
tmp67 = num14 + num16 - 1 > num;
|
|
}
|
|
let num17 = num12;
|
|
let sum2 = num3;
|
|
if (tmp67) {
|
|
sum2 = num3 + num12;
|
|
num17 = 0;
|
|
num14 = 1;
|
|
}
|
|
let value4 = sizesKnown.get(tmp58);
|
|
if (undefined === value4) {
|
|
let tmp70 = getItemSize;
|
|
let num18 = 0;
|
|
let tmp71 = context;
|
|
let tmp72 = tmp58;
|
|
let tmp73 = tmp16;
|
|
let flag6 = true;
|
|
let tmp74 = tmp14;
|
|
let flag7 = false;
|
|
value4 = getItemSize(context, tmp58, tmp53, data[tmp16], true, tmp14, false);
|
|
}
|
|
let tmp75 = closure_31;
|
|
if (closure_31) {
|
|
tmp75 = tmp50;
|
|
}
|
|
if (tmp75) {
|
|
if (map.has(tmp58)) {
|
|
let _console = console;
|
|
let _HermesInternal = HermesInternal;
|
|
let errorResult = console.error("[legend-list] Error: Detected overlapping key (" + tmp58 + ") which causes missing items and gaps and other terrrible things. Check that keyExtractor returns unique values.");
|
|
}
|
|
let result = map.set(tmp58, tmp16);
|
|
}
|
|
if (sum2 !== positions[tmp16]) {
|
|
positions[tmp16] = sum2;
|
|
if (clearTimeoutResult) {
|
|
let tmp78 = notifyPosition$;
|
|
let tmp79 = notifyPosition$(context, tmp58, sum2);
|
|
}
|
|
}
|
|
if (tmp50) {
|
|
let result1 = indexByKey.set(tmp58, tmp16);
|
|
}
|
|
if (tmp5) {
|
|
columns[tmp16] = num14;
|
|
columnSpans[tmp16] = num16;
|
|
let tmp82 = num17;
|
|
if (value4 > num17) {
|
|
tmp82 = value4;
|
|
}
|
|
let num20 = num14 + num16;
|
|
let num19 = tmp82;
|
|
let sum3 = sum2;
|
|
if (num20 > num) {
|
|
sum3 = sum2 + tmp82;
|
|
num19 = 0;
|
|
num20 = 1;
|
|
}
|
|
} else {
|
|
sum3 = sum2 + value4;
|
|
num19 = num17;
|
|
num20 = num14;
|
|
}
|
|
let sum4 = tmp16 + 1;
|
|
num12 = num19;
|
|
num13 = num20;
|
|
num3 = sum3;
|
|
tmp16 = sum4;
|
|
tmp52 = sum1;
|
|
flag5 = false;
|
|
if (sum4 >= length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
if (!flag5) {
|
|
const state4 = context.state;
|
|
const data1 = state4.props.data;
|
|
const values1 = context.values;
|
|
const value5 = values1.get("numColumns");
|
|
let num21 = 1;
|
|
if (null != value5) {
|
|
num21 = value5;
|
|
}
|
|
if (0 === data1.length) {
|
|
const state6 = context.state;
|
|
({ totalSize: totalSize3, totalSize: totalSize4 } = state6);
|
|
if (state6.timeoutSetPaddingTop) {
|
|
const _clearTimeout3 = clearTimeout;
|
|
clearTimeoutResult = clearTimeout(state6.timeoutSetPaddingTop);
|
|
state6.timeoutSetPaddingTop = undefined;
|
|
}
|
|
if (totalSize3 !== 0) {
|
|
clearTimeoutResult = closure_27;
|
|
if (!closure_27) {
|
|
if (state6.initialScroll) {
|
|
if (0 < totalSize3) {
|
|
state6.pendingTotalSize = 0;
|
|
}
|
|
}
|
|
}
|
|
state6.pendingTotalSize = undefined;
|
|
state6.totalSize = 0;
|
|
clearTimeoutResult = set$;
|
|
clearTimeoutResult = set$(context, "totalSize", 0);
|
|
clearTimeoutResult = updateContentMetricsState;
|
|
clearTimeoutResult = updateContentMetricsState(context);
|
|
} else {
|
|
const values2 = context.values;
|
|
if (values2.get("totalSize") !== 0) {
|
|
clearTimeoutResult = set$;
|
|
clearTimeoutResult = set$(context, "totalSize", 0);
|
|
}
|
|
}
|
|
} else {
|
|
clearTimeoutResult = data1.length - 1;
|
|
({ data: data6, keyExtractor: keyExtractor5 } = state4.props);
|
|
let str4 = "";
|
|
if (data6) {
|
|
let tmp85 = null;
|
|
if (clearTimeoutResult < data6.length) {
|
|
let keyExtractor5Result = clearTimeoutResult;
|
|
if (keyExtractor5) {
|
|
keyExtractor5Result = keyExtractor5(data6[clearTimeoutResult], clearTimeoutResult);
|
|
}
|
|
tmp85 = keyExtractor5Result;
|
|
}
|
|
state4.idCache[clearTimeoutResult] = tmp85;
|
|
str4 = tmp85;
|
|
}
|
|
if (undefined !== str4) {
|
|
if (undefined !== tmp87) {
|
|
if (num21 > 1) {
|
|
let diff2 = clearTimeoutResult;
|
|
let sum5 = clearTimeoutResult;
|
|
if (0 < clearTimeoutResult) {
|
|
sum5 = diff2;
|
|
while (1 !== state4.columns[diff2]) {
|
|
sum5 = diff2;
|
|
if (undefined === tmp96) {
|
|
break;
|
|
} else {
|
|
diff2 = diff2 - 1;
|
|
sum5 = diff2;
|
|
if (0 >= diff2) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let num22 = 0;
|
|
let num23 = 0;
|
|
if (sum5 <= clearTimeoutResult) {
|
|
do {
|
|
let tmp99 = state4.idCache[sum5];
|
|
clearTimeoutResult = num22;
|
|
let tmp98 = getItemSize;
|
|
clearTimeoutResult = sum5;
|
|
if (null == tmp99) {
|
|
({ data: data4, keyExtractor: keyExtractor3 } = state4.props);
|
|
let str7 = "";
|
|
if (data4) {
|
|
clearTimeoutResult = null;
|
|
if (sum5 < data4.length) {
|
|
clearTimeoutResult = sum5;
|
|
if (keyExtractor3) {
|
|
clearTimeoutResult = keyExtractor3(data4[sum5], sum5);
|
|
}
|
|
}
|
|
state4.idCache[sum5] = clearTimeoutResult;
|
|
str7 = clearTimeoutResult;
|
|
}
|
|
tmp99 = str7;
|
|
}
|
|
let num24 = 0;
|
|
clearTimeoutResult = context;
|
|
clearTimeoutResult = tmp99;
|
|
clearTimeoutResult = sum5;
|
|
clearTimeoutResult = tmp98(context, tmp99, clearTimeoutResult, data1[sum5]);
|
|
sum5 = sum5 + 1;
|
|
num22 = clearTimeoutResult;
|
|
num23 = clearTimeoutResult;
|
|
} while (sum5 <= clearTimeoutResult);
|
|
}
|
|
clearTimeoutResult = tmp87 + num23;
|
|
const state5 = context.state;
|
|
({ totalSize, totalSize: totalSize2 } = state5);
|
|
if (state5.timeoutSetPaddingTop) {
|
|
const _clearTimeout2 = clearTimeout;
|
|
clearTimeoutResult = clearTimeout(state5.timeoutSetPaddingTop);
|
|
state5.timeoutSetPaddingTop = undefined;
|
|
}
|
|
if (totalSize !== clearTimeoutResult) {
|
|
clearTimeoutResult = closure_27;
|
|
if (!closure_27) {
|
|
if (state5.initialScroll) {
|
|
if (clearTimeoutResult < totalSize) {
|
|
state5.pendingTotalSize = clearTimeoutResult;
|
|
}
|
|
}
|
|
}
|
|
state5.pendingTotalSize = undefined;
|
|
state5.totalSize = clearTimeoutResult;
|
|
clearTimeoutResult = set$;
|
|
clearTimeoutResult = set$(context, "totalSize", clearTimeoutResult);
|
|
clearTimeoutResult = updateContentMetricsState;
|
|
clearTimeoutResult = updateContentMetricsState(context);
|
|
} else {
|
|
values3 = context.values;
|
|
if (values3.get("totalSize") !== clearTimeoutResult) {
|
|
clearTimeoutResult = set$;
|
|
clearTimeoutResult = set$(context, "totalSize", clearTimeoutResult);
|
|
}
|
|
}
|
|
} else {
|
|
clearTimeoutResult = getItemSize;
|
|
clearTimeoutResult = context;
|
|
clearTimeoutResult = str4;
|
|
clearTimeoutResult = getItemSize(context, str4, clearTimeoutResult, data1[clearTimeoutResult]);
|
|
if (undefined !== clearTimeoutResult) {
|
|
clearTimeoutResult = tmp87 + clearTimeoutResult;
|
|
const state8 = context.state;
|
|
({ totalSize: totalSize5, totalSize: totalSize6 } = state8);
|
|
if (state8.timeoutSetPaddingTop) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state8.timeoutSetPaddingTop);
|
|
state8.timeoutSetPaddingTop = undefined;
|
|
}
|
|
if (totalSize5 !== clearTimeoutResult) {
|
|
if (!closure_27) {
|
|
if (state8.initialScroll) {
|
|
if (clearTimeoutResult < totalSize5) {
|
|
state8.pendingTotalSize = clearTimeoutResult;
|
|
}
|
|
}
|
|
}
|
|
state8.pendingTotalSize = undefined;
|
|
state8.totalSize = clearTimeoutResult;
|
|
set$(context, "totalSize", clearTimeoutResult);
|
|
updateContentMetricsState(context);
|
|
} else {
|
|
values4 = context.values;
|
|
if (values4.get("totalSize") !== clearTimeoutResult) {
|
|
clearTimeoutResult = set$;
|
|
clearTimeoutResult = set$(context, "totalSize", clearTimeoutResult);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (props.snapToIndices) {
|
|
const state7 = context.state;
|
|
const snapToIndices = state7.props.snapToIndices;
|
|
if (state7.props.horizontal) {
|
|
clearTimeoutResult = getContentSize;
|
|
clearTimeoutResult = getContentSize(context);
|
|
}
|
|
const _Array = Array;
|
|
clearTimeoutResult = Array(snapToIndices.length);
|
|
for (let num25 = 0; num25 < snapToIndices.length; num25 = num25 + 1) {
|
|
clearTimeoutResult = snapToIndices[num25];
|
|
({ data: data5, keyExtractor: keyExtractor4 } = state7.props);
|
|
clearTimeoutResult = num25;
|
|
if (data5) {
|
|
clearTimeoutResult = null;
|
|
if (clearTimeoutResult < data5.length) {
|
|
if (keyExtractor4) {
|
|
clearTimeoutResult = keyExtractor4(data5[clearTimeoutResult], clearTimeoutResult);
|
|
}
|
|
}
|
|
state7.idCache[clearTimeoutResult] = clearTimeoutResult;
|
|
}
|
|
clearTimeoutResult = toNativeHorizontalOffset;
|
|
clearTimeoutResult[num25] = toNativeHorizontalOffset(state7, state7.positions[clearTimeoutResult], clearTimeoutResult);
|
|
}
|
|
clearTimeoutResult = set$;
|
|
clearTimeoutResult = set$(context, "snapToOffsets", clearTimeoutResult);
|
|
}
|
|
}
|
|
function ensureViewabilityState(mapViewabilityConfigStates, id) {
|
|
mapViewabilityConfigStates = mapViewabilityConfigStates.mapViewabilityConfigStates;
|
|
if (!mapViewabilityConfigStates) {
|
|
const _Map = Map;
|
|
const map = new Map();
|
|
mapViewabilityConfigStates.mapViewabilityConfigStates = map;
|
|
mapViewabilityConfigStates = map;
|
|
}
|
|
let value = mapViewabilityConfigStates.get(id);
|
|
if (!value) {
|
|
const obj = { end: -1, endBuffered: -1, previousEnd: -1, previousStart: -1, start: -1, startBuffered: -1, viewableItems: null };
|
|
obj[6] = [];
|
|
const result = mapViewabilityConfigStates.set(id, obj);
|
|
value = obj;
|
|
}
|
|
return value;
|
|
}
|
|
function updateViewableItems(timeouts) {
|
|
let closure_0 = timeouts;
|
|
let closure_1 = arg1;
|
|
let closure_2 = arg3;
|
|
let closure_3 = arg4;
|
|
let closure_4 = arg5;
|
|
let tmp = arg6;
|
|
if (arg6 === undefined) {
|
|
tmp = arg4;
|
|
}
|
|
let closure_5 = tmp;
|
|
let tmp2 = arg7;
|
|
if (arg7 === undefined) {
|
|
tmp2 = arg5;
|
|
}
|
|
let closure_6 = tmp2;
|
|
timeouts = undefined;
|
|
let data;
|
|
timeouts = timeouts.timeouts;
|
|
data = timeouts.props.data;
|
|
function _loop(iter) {
|
|
let closure_0 = iter;
|
|
const id = iter.viewabilityConfig.id;
|
|
let mapViewabilityConfigStates = timerId.mapViewabilityConfigStates;
|
|
if (!mapViewabilityConfigStates) {
|
|
const _Map = Map;
|
|
const map = new Map();
|
|
tmp.mapViewabilityConfigStates = map;
|
|
mapViewabilityConfigStates = map;
|
|
}
|
|
const value = mapViewabilityConfigStates.get(id);
|
|
let tmp8 = value;
|
|
if (!value) {
|
|
const obj = { end: -1, endBuffered: -1, previousEnd: -1, previousStart: -1, start: -1, startBuffered: -1, viewableItems: null };
|
|
obj[6] = [];
|
|
const result = mapViewabilityConfigStates.set(id, obj);
|
|
tmp8 = obj;
|
|
}
|
|
tmp8.start = closure_3;
|
|
tmp8.end = closure_4;
|
|
tmp8.startBuffered = closure_5;
|
|
tmp8.endBuffered = closure_6;
|
|
if (iter.viewabilityConfig.minimumViewTime) {
|
|
const _setTimeout = setTimeout;
|
|
timerId = setTimeout(() => {
|
|
outer1_7.delete(timerId);
|
|
outer2_92(outer1_8, closure_0, closure_0, timerId, outer1_2);
|
|
}, iter.viewabilityConfig.minimumViewTime);
|
|
timeouts.add(timerId);
|
|
} else {
|
|
outer1_92(data, iter, closure_0, tmp, closure_2);
|
|
}
|
|
}
|
|
const iter = arg2[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loopResult = _loop(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function updateViewableItemsWithConfig(arg0, arg1, indexByKey, mapViewabilityAmountValues) {
|
|
let end;
|
|
let endBuffered;
|
|
let length;
|
|
let onViewableItemsChanged;
|
|
let start;
|
|
let startBuffered;
|
|
let tmp6;
|
|
let tmp8;
|
|
let viewabilityConfig;
|
|
let viewableItems;
|
|
let items;
|
|
({ viewabilityConfig, onViewableItemsChanged } = arg1);
|
|
const id = viewabilityConfig.id;
|
|
const tmp = ensureViewabilityState(mapViewabilityAmountValues, id);
|
|
({ viewableItems, start, end } = tmp);
|
|
({ startBuffered, endBuffered } = tmp);
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = _slicedToArray;
|
|
let tmp5 = _slicedToArray(tmp3, 2);
|
|
[tmp6, tmp8] = tmp5;
|
|
let tmp9 = computeViewability;
|
|
let num = 0;
|
|
let tmp10 = indexByKey;
|
|
let tmp11 = mapViewabilityAmountValues;
|
|
let tmp12 = viewabilityConfig;
|
|
let tmp13 = tmp6;
|
|
let tmp14 = arg4;
|
|
let tmp7 = tmp6;
|
|
if (computeViewability(indexByKey, mapViewabilityAmountValues, viewabilityConfig, tmp6, tmp8.key, arg4, tmp8.item, tmp8.index).sizeVisible < 0) {
|
|
let tmp15 = items;
|
|
if (null == items) {
|
|
items = [];
|
|
}
|
|
let tmp16 = items;
|
|
let tmp17 = tmp6;
|
|
let arr = items.push(tmp7);
|
|
}
|
|
continue;
|
|
}
|
|
const items1 = [];
|
|
const set = new Set();
|
|
if (viewableItems) {
|
|
const iter = viewableItems[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp23 = nextResult;
|
|
let addResult = set.add(nextResult.key);
|
|
indexByKey = indexByKey.indexByKey;
|
|
let value = indexByKey.get(nextResult.key);
|
|
let tmp26 = value;
|
|
let tmp27;
|
|
if (undefined !== value) {
|
|
let tmp28 = value;
|
|
tmp27 = arg0[tmp26];
|
|
}
|
|
let tmp29 = tmp27;
|
|
let tmp30 = findContainerId;
|
|
let tmp31 = nextResult;
|
|
let tmp32 = findContainerId(mapViewabilityAmountValues, tmp23.key);
|
|
let flag2 = false;
|
|
let tmp33 = value;
|
|
let tmp34 = undefined !== tmp26;
|
|
if (tmp34) {
|
|
let tmp35 = tmp27;
|
|
tmp34 = undefined !== tmp29;
|
|
}
|
|
if (tmp34) {
|
|
let tmp36 = checkIsViewable;
|
|
let tmp37 = tmp32;
|
|
let tmp38 = nextResult;
|
|
let tmp39 = tmp27;
|
|
let tmp40 = value;
|
|
let num2 = 0;
|
|
let tmp41 = indexByKey;
|
|
let tmp42 = mapViewabilityAmountValues;
|
|
let tmp43 = viewabilityConfig;
|
|
let tmp44 = arg4;
|
|
flag2 = checkIsViewable(indexByKey, mapViewabilityAmountValues, viewabilityConfig, tmp32, tmp23.key, arg4, tmp29, tmp26);
|
|
}
|
|
let tmp45 = flag2;
|
|
if (flag2) {
|
|
continue;
|
|
} else {
|
|
arr = {};
|
|
let tmp46 = nextResult;
|
|
let tmp47 = arr;
|
|
let merged = Object.assign(tmp23);
|
|
let tmp49 = value;
|
|
if (null != tmp26) {
|
|
let index = value;
|
|
} else {
|
|
let tmp50 = nextResult;
|
|
index = tmp23.index;
|
|
}
|
|
arr.index = index;
|
|
arr.isViewable = false;
|
|
let tmp51 = tmp27;
|
|
if (null != tmp29) {
|
|
let item = tmp27;
|
|
} else {
|
|
let tmp52 = nextResult;
|
|
item = tmp23.item;
|
|
}
|
|
arr.item = item;
|
|
arr = items1.push(arr);
|
|
}
|
|
}
|
|
}
|
|
const items2 = [];
|
|
let sum = start;
|
|
if (start <= end) {
|
|
do {
|
|
let tmp54 = arg0[sum];
|
|
if (tmp54) {
|
|
let tmp56 = getId;
|
|
let tmp57 = getId(indexByKey, sum);
|
|
let tmp58 = findContainerId;
|
|
let tmp59 = findContainerId(mapViewabilityAmountValues, tmp57);
|
|
let tmp60 = checkIsViewable;
|
|
let num3 = 0;
|
|
let tmp61 = indexByKey;
|
|
let tmp62 = mapViewabilityAmountValues;
|
|
let tmp63 = viewabilityConfig;
|
|
let tmp64 = tmp59;
|
|
let tmp65 = tmp57;
|
|
let tmp66 = arg4;
|
|
let tmp67 = tmp54;
|
|
let tmp68 = sum;
|
|
if (checkIsViewable(indexByKey, mapViewabilityAmountValues, viewabilityConfig, tmp59, tmp57, arg4, tmp54, tmp55)) {
|
|
let obj = { containerId: null, index: null, isViewable: true, item: null, key: null };
|
|
obj[0] = tmp59;
|
|
obj[1] = sum;
|
|
obj[3] = tmp54;
|
|
obj[4] = tmp57;
|
|
let arr1 = items2.push(obj);
|
|
if (!set.has(obj.key)) {
|
|
let arr2 = items1.push(obj);
|
|
}
|
|
}
|
|
}
|
|
sum = sum + 1;
|
|
} while (sum <= end);
|
|
}
|
|
const merged1 = Object.assign(tmp, { previousEnd: end, previousStart: start, viewableItems: items2 });
|
|
if (items1.length > 0) {
|
|
tmp.viewableItems = items2;
|
|
let num5 = 0;
|
|
if (0 < items1.length) {
|
|
do {
|
|
let tmp72 = items1[num5];
|
|
let tmp73 = maybeUpdateViewabilityCallback;
|
|
let num6 = 0;
|
|
let tmp74 = mapViewabilityAmountValues;
|
|
let tmp75 = id;
|
|
let tmp76 = tmp72;
|
|
let tmp77 = maybeUpdateViewabilityCallback(mapViewabilityAmountValues, id, tmp72.containerId, tmp72);
|
|
num5 = num5 + 1;
|
|
length = items1.length;
|
|
} while (num5 < length);
|
|
}
|
|
if (onViewableItemsChanged) {
|
|
const obj1 = { changed: null, end: null, endBuffered: null, start: null, startBuffered: null, viewableItems: null };
|
|
obj1[0] = items1;
|
|
obj1[1] = end;
|
|
obj1[2] = endBuffered;
|
|
obj1[3] = start;
|
|
obj1[4] = startBuffered;
|
|
obj1[5] = items2;
|
|
const result = onViewableItemsChanged(obj1);
|
|
}
|
|
}
|
|
if (items) {
|
|
for (const item10166 of items) {
|
|
mapViewabilityAmountValues = arg3.mapViewabilityAmountValues;
|
|
let tmp81 = item10166;
|
|
value = mapViewabilityAmountValues.get(item10166);
|
|
if (value) {
|
|
let tmp84 = value;
|
|
value = tmp83.sizeVisible < 0;
|
|
}
|
|
if (value) {
|
|
let mapViewabilityAmountValues2 = arg3.mapViewabilityAmountValues;
|
|
let tmp85 = item10166;
|
|
let deleteResult = mapViewabilityAmountValues2.delete(tmp81);
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
function areViewabilityAmountTokensEqual(mapViewabilityAmountValues, containerId2) {
|
|
return mapViewabilityAmountValues && mapViewabilityAmountValues.containerId === containerId2.containerId && mapViewabilityAmountValues.index === containerId2.index && mapViewabilityAmountValues.isViewable === containerId2.isViewable && mapViewabilityAmountValues.item === containerId2.item && mapViewabilityAmountValues.key === containerId2.key && mapViewabilityAmountValues.percentOfScroller === containerId2.percentOfScroller && mapViewabilityAmountValues.percentVisible === containerId2.percentVisible && mapViewabilityAmountValues.scrollSize === containerId2.scrollSize && mapViewabilityAmountValues.size === containerId2.size && mapViewabilityAmountValues.sizeVisible === containerId2.sizeVisible;
|
|
}
|
|
function computeViewability(sizes, mapViewabilityAmountValues, viewabilityConfig, arg3, key, arg5, item, index) {
|
|
let itemVisiblePercentThreshold;
|
|
let viewAreaCoveragePercentThreshold;
|
|
sizes = sizes.sizes;
|
|
let values = mapViewabilityAmountValues.values;
|
|
values = mapViewabilityAmountValues.values;
|
|
const tmp = values.get("stylePaddingTop") || 0;
|
|
values = mapViewabilityAmountValues.values;
|
|
const sum = tmp + (values.get("alignItemsAtEndPadding") || 0);
|
|
const tmp2 = values.get("alignItemsAtEndPadding") || 0;
|
|
({ itemVisiblePercentThreshold, viewAreaCoveragePercentThreshold } = viewabilityConfig);
|
|
const sum1 = sum + (values.get("headerSize") || 0);
|
|
if (null != viewAreaCoveragePercentThreshold) {
|
|
itemVisiblePercentThreshold = viewAreaCoveragePercentThreshold;
|
|
}
|
|
const diff = sizes.scroll - sum1;
|
|
const tmp9 = sizes.get(key) || 0;
|
|
if (undefined === sizes.positions[index]) {
|
|
let obj = { containerId: null, index: null, isViewable: false, item: null, key: null, percentOfScroller: 0, percentVisible: 0, scrollSize: null, size: null, sizeVisible: -1 };
|
|
obj[0] = arg3;
|
|
obj[1] = index;
|
|
obj[3] = item;
|
|
obj[4] = key;
|
|
obj[7] = arg5;
|
|
obj[8] = tmp9;
|
|
const mapViewabilityAmountValues3 = mapViewabilityAmountValues.mapViewabilityAmountValues;
|
|
if (!areViewabilityAmountTokensEqual(mapViewabilityAmountValues3.get(arg3), obj)) {
|
|
const mapViewabilityAmountValues4 = mapViewabilityAmountValues.mapViewabilityAmountValues;
|
|
const result = mapViewabilityAmountValues4.set(arg3, obj);
|
|
let value = mapViewabilityAmountValues.mapViewabilityAmountCallbacks.get(arg3);
|
|
if (value) {
|
|
value(obj);
|
|
}
|
|
const mapViewabilityAmountCallbacks2 = mapViewabilityAmountValues.mapViewabilityAmountCallbacks;
|
|
}
|
|
return obj;
|
|
} else {
|
|
const diff1 = tmp8 - diff;
|
|
const sum2 = diff1 + tmp9;
|
|
let diff2 = tmp9;
|
|
if (!(diff1 >= 0 && sum2 <= arg5 && sum2 > diff1)) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const bound = Math.min(sum2, arg5);
|
|
diff2 = bound - Math.max(diff1, 0);
|
|
}
|
|
let num = 0;
|
|
if (tmp9) {
|
|
let num3 = 100;
|
|
if (!tmp10) {
|
|
num3 = diff2 / tmp9 * 100;
|
|
}
|
|
num = num3;
|
|
}
|
|
let num4 = 0;
|
|
if (tmp9) {
|
|
num4 = diff2 / arg5 * 100;
|
|
}
|
|
obj = { containerId: null, index: null, isViewable: null, item: null, key: null, percentOfScroller: null, percentVisible: null, scrollSize: null, size: null, sizeVisible: null };
|
|
obj[0] = arg3;
|
|
obj[1] = index;
|
|
let num6 = 100;
|
|
if (!(diff1 >= 0 && sum2 <= arg5 && sum2 > diff1)) {
|
|
let tmp14 = num;
|
|
if (tmp6) {
|
|
tmp14 = num4;
|
|
}
|
|
num6 = tmp14;
|
|
}
|
|
obj[2] = num6 >= itemVisiblePercentThreshold;
|
|
obj[3] = item;
|
|
obj[4] = key;
|
|
obj[5] = num4;
|
|
obj[6] = num;
|
|
obj[7] = arg5;
|
|
obj[8] = tmp9;
|
|
obj[9] = diff2;
|
|
mapViewabilityAmountValues = mapViewabilityAmountValues.mapViewabilityAmountValues;
|
|
if (!areViewabilityAmountTokensEqual(mapViewabilityAmountValues.get(arg3), obj)) {
|
|
const mapViewabilityAmountValues2 = mapViewabilityAmountValues.mapViewabilityAmountValues;
|
|
const result1 = mapViewabilityAmountValues2.set(arg3, obj);
|
|
value = mapViewabilityAmountValues.mapViewabilityAmountCallbacks.get(arg3);
|
|
if (value) {
|
|
value(obj);
|
|
}
|
|
const mapViewabilityAmountCallbacks = mapViewabilityAmountValues.mapViewabilityAmountCallbacks;
|
|
}
|
|
return obj;
|
|
}
|
|
const tmp4 = values.get("headerSize") || 0;
|
|
}
|
|
function checkIsViewable(indexByKey, mapViewabilityAmountValues, viewabilityConfig, arg3, key, arg5, item, index) {
|
|
mapViewabilityAmountValues = mapViewabilityAmountValues.mapViewabilityAmountValues;
|
|
let value = mapViewabilityAmountValues.get(arg3);
|
|
let tmp2 = value;
|
|
if (value) {
|
|
tmp2 = value.key === key;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = value.index === index;
|
|
}
|
|
if (!tmp2) {
|
|
value = computeViewability(indexByKey, mapViewabilityAmountValues, viewabilityConfig, arg3, key, arg5, item, index);
|
|
}
|
|
return value.isViewable;
|
|
}
|
|
function maybeUpdateViewabilityCallback(mapViewabilityValues, id, containerId, arg3) {
|
|
const sum = containerId + id;
|
|
mapViewabilityValues = mapViewabilityValues.mapViewabilityValues;
|
|
const result = mapViewabilityValues.set(sum, arg3);
|
|
const value = mapViewabilityValues.mapViewabilityCallbacks.get(sum);
|
|
if (null != value) {
|
|
value(arg3);
|
|
}
|
|
}
|
|
function comparatorByDistance(distance, distance2) {
|
|
return distance2.distance - distance.distance;
|
|
}
|
|
function isStickyIndexActive(state) {
|
|
state = state.state;
|
|
let flag = false;
|
|
const obj = state.stickyContainerPool[Symbol.iterator]();
|
|
while (obj !== undefined) {
|
|
let tmp2 = peek$;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp3 = peek$(state, "containerItemKey" + tmp);
|
|
let value;
|
|
if (tmp3) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp6 = tmp3;
|
|
value = indexByKey.get(tmp4);
|
|
}
|
|
if (value === arg1) {
|
|
flag = true;
|
|
let tmp7 = obj;
|
|
obj.return();
|
|
break;
|
|
}
|
|
return flag;
|
|
}
|
|
}
|
|
function trackVisibleRange(startNoBuffer, startNoBuffer2) {
|
|
let tmp = null === startNoBuffer.startNoBuffer;
|
|
if (tmp) {
|
|
tmp = arg2 + arg3 > arg4;
|
|
}
|
|
if (tmp) {
|
|
startNoBuffer.startNoBuffer = startNoBuffer2;
|
|
}
|
|
let tmp3 = undefined === startNoBuffer.firstFullyOnScreenIndex;
|
|
if (tmp3) {
|
|
tmp3 = arg2 >= arg4 - 10;
|
|
}
|
|
if (tmp3) {
|
|
tmp3 = arg2 <= arg5;
|
|
}
|
|
if (tmp3) {
|
|
startNoBuffer.firstFullyOnScreenIndex = startNoBuffer2;
|
|
}
|
|
let flag = false;
|
|
if (null !== startNoBuffer.startNoBuffer) {
|
|
let flag2 = true;
|
|
if (arg2 <= arg5) {
|
|
startNoBuffer.endNoBuffer = startNoBuffer2;
|
|
flag2 = false;
|
|
}
|
|
flag = flag2;
|
|
}
|
|
return flag;
|
|
}
|
|
function getIdsInVisibleRange(props, firstFullyOnScreenIndex) {
|
|
let data;
|
|
let keyExtractor;
|
|
let startNoBuffer = firstFullyOnScreenIndex.firstFullyOnScreenIndex;
|
|
if (null == startNoBuffer) {
|
|
startNoBuffer = firstFullyOnScreenIndex.startNoBuffer;
|
|
}
|
|
const items = [];
|
|
if (null != startNoBuffer) {
|
|
if (null !== firstFullyOnScreenIndex.endNoBuffer) {
|
|
if (startNoBuffer <= firstFullyOnScreenIndex.endNoBuffer) {
|
|
do {
|
|
let tmp = props.idCache[startNoBuffer];
|
|
let tmp2 = startNoBuffer;
|
|
if (null == tmp) {
|
|
({ data, keyExtractor } = props.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp3 = null;
|
|
if (startNoBuffer < data.length) {
|
|
let keyExtractorResult = startNoBuffer;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startNoBuffer], startNoBuffer);
|
|
}
|
|
tmp3 = keyExtractorResult;
|
|
}
|
|
props.idCache[startNoBuffer] = tmp3;
|
|
str = tmp3;
|
|
}
|
|
tmp = str;
|
|
}
|
|
let arr = items.push(tmp);
|
|
startNoBuffer = startNoBuffer + 1;
|
|
} while (startNoBuffer <= firstFullyOnScreenIndex.endNoBuffer);
|
|
}
|
|
}
|
|
}
|
|
return items;
|
|
}
|
|
function maybeEmitFirstVisibleItemChanged(props) {
|
|
let data;
|
|
let keyExtractor;
|
|
const onFirstVisibleItemChanged = props.props.onFirstVisibleItemChanged;
|
|
if (onFirstVisibleItemChanged) {
|
|
if (null !== arg1) {
|
|
if (arg1 >= 0) {
|
|
if (arg1 < props.props.data.length) {
|
|
let tmp5 = props.idCache[arg1];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = props.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp3 = null;
|
|
if (arg1 < data.length) {
|
|
let keyExtractorResult = arg1;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[arg1], arg1);
|
|
}
|
|
tmp3 = keyExtractorResult;
|
|
}
|
|
props.idCache[arg1] = tmp3;
|
|
str = tmp3;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let index;
|
|
if (null != props.lastFirstVisibleItemCallback) {
|
|
index = lastFirstVisibleItemCallback.index;
|
|
}
|
|
if (!tmp7) {
|
|
let obj = { index: null, key: null };
|
|
obj[0] = arg1;
|
|
obj[1] = tmp5;
|
|
props.lastFirstVisibleItemCallback = obj;
|
|
obj = { index: null, item: null, key: null };
|
|
obj[0] = arg1;
|
|
obj[1] = props.props.data[arg1];
|
|
obj[2] = tmp5;
|
|
const result = onFirstVisibleItemChanged(obj);
|
|
}
|
|
tmp7 = index === arg1 && props.lastFirstVisibleItemCallback.key === tmp5;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function maybeUpdateAnchoredEndSpace(state) {
|
|
let anchorIndex2;
|
|
let anchorMaxSize;
|
|
let anchorOffset;
|
|
let anchoredEndSpaceReadyAnchorIndex;
|
|
let anchoredEndSpaceReadyAnchorKey;
|
|
let data;
|
|
let keyExtractor;
|
|
state = state.state;
|
|
const anchoredEndSpace = state.props.anchoredEndSpace;
|
|
let values = state.values;
|
|
const value = values.get("anchoredEndSpaceSize");
|
|
({ anchoredEndSpaceReadyAnchorIndex, anchoredEndSpaceReadyAnchorKey } = state);
|
|
if (null != anchoredEndSpace) {
|
|
const anchorIndex = anchoredEndSpace.anchorIndex;
|
|
}
|
|
let num = 0;
|
|
let flag = true;
|
|
if (anchoredEndSpace) {
|
|
({ anchorIndex: anchorIndex2, anchorMaxSize, anchorOffset } = anchoredEndSpace);
|
|
let num2 = 0;
|
|
if (undefined !== anchorOffset) {
|
|
num2 = anchorOffset;
|
|
}
|
|
data = state.props.data;
|
|
if (anchorIndex2 >= 0) {
|
|
if (anchorIndex2 < data.length) {
|
|
if (state.scrollLength > 0) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp3 = null;
|
|
if (anchorIndex2 < data.length) {
|
|
let keyExtractorResult = anchorIndex2;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[anchorIndex2], anchorIndex2);
|
|
}
|
|
tmp3 = keyExtractorResult;
|
|
}
|
|
state.idCache[anchorIndex2] = tmp3;
|
|
str = tmp3;
|
|
}
|
|
values = state.values;
|
|
values.get("footerSize") || 0;
|
|
let flag2 = false;
|
|
let sum1 = anchorIndex2;
|
|
let num3 = 0;
|
|
let flag3 = false;
|
|
if (anchorIndex2 < data.length) {
|
|
do {
|
|
let tmp9 = getKnownOrFixedItemSize;
|
|
let tmp10 = getKnownOrFixedItemSize(state, sum1);
|
|
let tmp11 = sum1;
|
|
let flag4 = flag2;
|
|
let tmp12 = num3;
|
|
let bound = tmp10;
|
|
if (sum1 === anchorIndex2) {
|
|
bound = tmp10;
|
|
if (undefined !== anchorMaxSize) {
|
|
let num5 = tmp10;
|
|
if (!tmp10) {
|
|
num5 = 0;
|
|
}
|
|
let _Math = Math;
|
|
bound = Math.min(num5, Math.max(0, anchorMaxSize));
|
|
}
|
|
}
|
|
if (undefined === tmp10) {
|
|
flag4 = true;
|
|
}
|
|
let tmp14 = null != bound && bound > 0;
|
|
let sum = num3;
|
|
if (tmp14) {
|
|
sum = num3 + bound;
|
|
}
|
|
sum1 = sum1 + 1;
|
|
num3 = sum;
|
|
flag2 = flag4;
|
|
flag3 = flag4;
|
|
let num4 = sum;
|
|
} while (sum1 < data.length);
|
|
}
|
|
if (flag3) {
|
|
let num6 = value;
|
|
if (!value) {
|
|
num6 = 0;
|
|
}
|
|
let bound1 = num6;
|
|
} else {
|
|
const _Math2 = Math;
|
|
bound1 = Math.max(0, state.scrollLength - tmp16 - num2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
num = 0;
|
|
flag = true;
|
|
if (anchorIndex2 >= 0) {
|
|
flag = false;
|
|
num = 0;
|
|
}
|
|
}
|
|
let tmp21 = value !== num;
|
|
if (flag) {
|
|
let tmp22 = tmp21;
|
|
if (!tmp21) {
|
|
tmp22 = anchoredEndSpaceReadyAnchorIndex !== anchorIndex || anchoredEndSpaceReadyAnchorKey !== tmp2;
|
|
const tmp23 = anchoredEndSpaceReadyAnchorIndex !== anchorIndex || anchoredEndSpaceReadyAnchorKey !== tmp2;
|
|
}
|
|
flag = tmp22;
|
|
}
|
|
if (flag) {
|
|
state.anchoredEndSpaceReadyAnchorIndex = anchorIndex;
|
|
state.anchoredEndSpaceReadyAnchorKey = tmp2;
|
|
if (tmp21) {
|
|
set$(state, "anchoredEndSpaceSize", num);
|
|
let onSizeChanged;
|
|
if (null != anchoredEndSpace) {
|
|
onSizeChanged = anchoredEndSpace.onSizeChanged;
|
|
}
|
|
if (null != onSizeChanged) {
|
|
const call = onSizeChanged.call;
|
|
if (typeof call === "unknown") {
|
|
onSizeChanged(num);
|
|
} else {
|
|
call(anchoredEndSpace, num);
|
|
}
|
|
}
|
|
}
|
|
if (tmp21) {
|
|
let includeInEndInset;
|
|
if (null != anchoredEndSpace) {
|
|
includeInEndInset = anchoredEndSpace.includeInEndInset;
|
|
}
|
|
tmp21 = includeInEndInset;
|
|
}
|
|
if (tmp21) {
|
|
updateScroll(state, state.scroll, true);
|
|
}
|
|
let onReady;
|
|
if (null != anchoredEndSpace) {
|
|
onReady = anchoredEndSpace.onReady;
|
|
}
|
|
if (null != onReady) {
|
|
const call2 = onReady.call;
|
|
const obj = { anchorIndex: null, anchorKey: null, size: null };
|
|
obj[0] = anchorIndex;
|
|
obj[1] = tmp2;
|
|
obj[2] = num;
|
|
if (typeof call2 === "unknown") {
|
|
onReady(obj);
|
|
} else {
|
|
call2(anchoredEndSpace, obj);
|
|
}
|
|
}
|
|
}
|
|
return num;
|
|
}
|
|
function mergeItemSizeUpdateResult(didChange, didChange2) {
|
|
if (!didChange.didChange) {
|
|
didChange.didChange = didChange2.didChange;
|
|
}
|
|
if (!didChange.didMeasureUserScrollAnchorResetItem) {
|
|
didChange.didMeasureUserScrollAnchorResetItem = didChange2.didMeasureUserScrollAnchorResetItem;
|
|
}
|
|
if (!didChange.needsRecalculate) {
|
|
didChange.needsRecalculate = didChange2.needsRecalculate;
|
|
}
|
|
if (!didChange.shouldMaintainScrollAtEnd) {
|
|
didChange.shouldMaintainScrollAtEnd = didChange2.shouldMaintainScrollAtEnd;
|
|
}
|
|
}
|
|
function flushItemSizeUpdates(state, needsRecalculate) {
|
|
state = state.state;
|
|
if (needsRecalculate.needsRecalculate) {
|
|
state.scrollForNextCalculateItemsInView = undefined;
|
|
const state2 = state.state;
|
|
if (undefined !== state2.userScrollAnchorReset) {
|
|
let closure_0 = state;
|
|
let closure_1 = {};
|
|
state = state.state;
|
|
fn(() => {
|
|
let alwaysRenderIndicesArr;
|
|
let bottom;
|
|
let closure_4;
|
|
let dataChanged;
|
|
let doMVCP;
|
|
let enableScrollForNextCalculateItemsInView;
|
|
let endNoBuffer;
|
|
let forceFullItemPositions;
|
|
let getItemType;
|
|
let idCache;
|
|
let indexByKey;
|
|
let initialScroll;
|
|
let keyExtractor;
|
|
let minIndexSizeChanged;
|
|
let positions;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scrollForNextCalculateItemsInView;
|
|
let scrollLength;
|
|
let set2;
|
|
let sizes;
|
|
let startBufferedId;
|
|
let startNoBuffer;
|
|
let state;
|
|
let top;
|
|
let viewabilityConfigCallbackPairs;
|
|
let addResult = state;
|
|
let containerItemKeys = state.containerItemKeys;
|
|
({ enableScrollForNextCalculateItemsInView, idCache } = state);
|
|
({ indexByKey, minIndexSizeChanged, positions, props } = state);
|
|
({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props);
|
|
({ keyExtractor, onStickyHeaderChange: closure_4 } = props);
|
|
({ scrollForNextCalculateItemsInView, scrollLength } = state);
|
|
({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state);
|
|
const data = state.props.data;
|
|
let prop = state.props.stickyHeaderIndicesArr;
|
|
if (!prop) {
|
|
prop = [];
|
|
}
|
|
let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet;
|
|
if (!stickyHeaderIndicesSet) {
|
|
let _Set = Set;
|
|
stickyHeaderIndicesSet = new Set();
|
|
}
|
|
let tmp9 = outer1_46(containerItemKeys, idCache.drawDistanceMode);
|
|
({ dataChanged, doMVCP, forceFullItemPositions } = idCache);
|
|
let initialScrollSession = tmp2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp2.initialScrollSession.bootstrap;
|
|
}
|
|
let tmp16 = outer1_21(containerItemKeys, "numContainers");
|
|
if (data) {
|
|
if (0 !== scrollLength) {
|
|
if (tmp16) {
|
|
let closure_8 = outer1_25(tmp7);
|
|
let tmp15Result = tmp15(tmp7, "stylePaddingTop");
|
|
let sum = tmp15Result + tmp15(tmp7, "alignItemsAtEndPadding");
|
|
let closure_9 = sum + tmp15(tmp7, "headerSize");
|
|
tmp15Result = tmp15(tmp7, "numColumns");
|
|
let scrollVelocity = idCache.scrollVelocity;
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = outer1_69(tmp2);
|
|
}
|
|
({ initialScroll, queuedInitialLayout } = tmp2);
|
|
if (!tmp13) {
|
|
let scroll;
|
|
if (null != bootstrap) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = tmp2.scroll;
|
|
}
|
|
} else {
|
|
if (!queuedInitialLayout) {
|
|
if (outer1_41(tmp2)) {
|
|
if (initialScroll) {
|
|
scroll = outer1_75(tmp7, initialScroll);
|
|
}
|
|
}
|
|
}
|
|
scroll = tmp2.scroll;
|
|
}
|
|
let c10 = 0;
|
|
let c11 = 0;
|
|
let c12 = 0;
|
|
let c13 = 0;
|
|
let c14 = 0;
|
|
let c15 = 0;
|
|
function updateScroll2(scroll) {
|
|
let closure_16 = scroll;
|
|
const values = containerItemKeys.values;
|
|
const value = values.get("scrollAdjustPending");
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
let closure_11 = num - closure_9;
|
|
const rounded = Math.round(scroll + closure_11);
|
|
let closure_12 = rounded;
|
|
if (rounded + scrollLength > closure_8) {
|
|
const _Math = Math;
|
|
closure_12 = Math.max(0, tmp4 - tmp3);
|
|
}
|
|
}
|
|
updateScroll2(scroll);
|
|
const tmp15Result1 = tmp15(tmp7, "activeStickyIndex");
|
|
let closure_17 = tmp15Result1;
|
|
function resolveStickyState() {
|
|
let num = -1;
|
|
let num2 = -1;
|
|
if (prop.length > 0) {
|
|
let diff = arr.length - 1;
|
|
let tmp5 = num;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp6 = tmp3[arr[diff]];
|
|
let tmp7 = diff;
|
|
if (undefined === tmp6) {
|
|
diff = diff - 1;
|
|
tmp5 = num;
|
|
if (0 > diff) {
|
|
break;
|
|
}
|
|
} else {
|
|
tmp5 = diff;
|
|
if (tmp >= tmp6) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
num2 = tmp5;
|
|
}
|
|
if (0 <= num2) {
|
|
num = arr[num2];
|
|
}
|
|
let tmp8 = num2 >= 0;
|
|
if (0 > num2) {
|
|
tmp8 = tmp9 >= 0;
|
|
}
|
|
if (tmp8) {
|
|
outer2_22(containerItemKeys, "activeStickyIndex", num);
|
|
}
|
|
let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null };
|
|
let fn;
|
|
if (closure_4) {
|
|
if (arr.length > 0) {
|
|
if (tmp9 !== num) {
|
|
fn = () => {
|
|
if (undefined !== outer1_6[num]) {
|
|
if (null != outer1_4) {
|
|
const obj = { index: null, item: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp2;
|
|
tmp3(obj);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
obj[1] = fn;
|
|
return obj;
|
|
}
|
|
if (!dataChanged) {
|
|
let stickyState = resolveStickyState();
|
|
}
|
|
let result2 = tmp9;
|
|
let result3 = tmp9;
|
|
if (scrollVelocity > 0) {
|
|
let result = 0.5 * tmp9;
|
|
result2 = result;
|
|
const result1 = 1.5 * tmp9;
|
|
result3 = result1;
|
|
result3 = result1;
|
|
result2 = result;
|
|
} else {
|
|
if (0 === scrollVelocity) {
|
|
let _Math = Math;
|
|
}
|
|
result2 = 1.5 * tmp9;
|
|
result3 = 0.5 * tmp9;
|
|
}
|
|
let num6 = 0;
|
|
if (!dataChanged) {
|
|
num6 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num6 = 0;
|
|
if (!tmp25) {
|
|
num6 = 0;
|
|
if (!outer1_41(tmp2)) {
|
|
num6 = 0;
|
|
if (!tmp2.scrollingTo) {
|
|
num6 = 0;
|
|
if (!tmp2.pendingNativeMVCPAdjust) {
|
|
num6 = 0;
|
|
if (tmp15(tmp7, "readyToRender")) {
|
|
let _Math2 = Math;
|
|
num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) {
|
|
if (arg1 <= 0) {
|
|
return 0;
|
|
} else {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const bound = Math.min(1, Math.abs(scrollVelocity) / 4);
|
|
return Math.sign(scrollVelocity) * arg1 * bound;
|
|
}
|
|
})(scrollVelocity, Math.min(result2, result3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateScrollRange() {
|
|
const bound = Math.max(0, c12);
|
|
let closure_14 = Math.max(bound, c12 + scrollLength + Math.max(0, -scroll));
|
|
let closure_13 = bound - result2 + num6;
|
|
let closure_15 = closure_14 + result3 + num6;
|
|
}
|
|
updateScrollRange();
|
|
if (0 !== num6) {
|
|
(function scheduleRenderRangeProjectionSettle(state) {
|
|
state = state.state;
|
|
const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle;
|
|
if (undefined !== timeoutRenderRangeProjectionSettle) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutRenderRangeProjectionSettle);
|
|
let timeouts = state.timeouts;
|
|
timeouts.delete(timeoutRenderRangeProjectionSettle);
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
state.timeoutRenderRangeProjectionSettle = undefined;
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.scrollHistory.length = 0;
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}, 100);
|
|
state.timeoutRenderRangeProjectionSettle = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
})(tmp7);
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
if (!tmp25) {
|
|
if (!dataChanged) {
|
|
if (!forceFullItemPositions) {
|
|
if (scrollForNextCalculateItemsInView) {
|
|
({ top, bottom } = scrollForNextCalculateItemsInView);
|
|
if (null === top) {
|
|
if (null === bottom) {
|
|
tmp2.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}
|
|
if (null === top) {
|
|
if (viewabilityConfigCallbackPairs) {
|
|
(function updateViewabilityForCachedRange(state, viewabilityConfigCallbackPairs, scrollLength, c12, c14) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let tmp7 = null;
|
|
let sum1;
|
|
let tmp9 = null;
|
|
if (startBuffered <= endBuffered) {
|
|
let tmp3 = null;
|
|
let tmp5 = null;
|
|
let tmp6 = startBuffered;
|
|
tmp7 = null;
|
|
tmp9 = null;
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp10 = tmp[tmp6];
|
|
let tmp11 = tmp3;
|
|
let tmp12 = tmp4;
|
|
let tmp13 = tmp5;
|
|
let tmp14 = tmp6;
|
|
if (null == tmp10) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data) {
|
|
let tmp15 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp15 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp15;
|
|
str2 = tmp15;
|
|
}
|
|
tmp10 = str2;
|
|
}
|
|
let value = sizes.get(tmp10);
|
|
if (null == value) {
|
|
let tmp19 = callback4;
|
|
let num2 = 0;
|
|
let tmp20 = state;
|
|
let tmp21 = tmp10;
|
|
let tmp22 = tmp6;
|
|
value = callback4(state, tmp18, tmp14, data[tmp6]);
|
|
}
|
|
let tmp23 = tmp2[tmp6];
|
|
let tmp24 = null === tmp11 && tmp23 + value > c12;
|
|
if (tmp24) {
|
|
tmp11 = tmp6;
|
|
}
|
|
let tmp25 = undefined === tmp12 && tmp23 >= c12 - 10 && tmp23 <= c14;
|
|
if (tmp25) {
|
|
tmp12 = tmp6;
|
|
}
|
|
let tmp26 = tmp13;
|
|
let flag = false;
|
|
if (null !== tmp11) {
|
|
let flag2 = true;
|
|
if (tmp23 <= c14) {
|
|
tmp13 = tmp6;
|
|
flag2 = false;
|
|
}
|
|
tmp26 = tmp13;
|
|
flag = flag2;
|
|
}
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (flag) {
|
|
break;
|
|
} else {
|
|
let sum = tmp6 + 1;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (sum > endBuffered) {
|
|
break;
|
|
} else {
|
|
tmp3 = tmp11;
|
|
tmp4 = tmp12;
|
|
tmp5 = tmp26;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
tmp6 = sum;
|
|
if (sum >= data.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj = { endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startNoBuffer: null };
|
|
obj[0] = tmp9;
|
|
obj[1] = sum1;
|
|
if (null == sum1) {
|
|
sum1 = tmp7;
|
|
}
|
|
const items = [];
|
|
if (null != sum1) {
|
|
if (null !== tmp9) {
|
|
if (sum1 <= tmp9) {
|
|
do {
|
|
let tmp29 = state.idCache[sum1];
|
|
let tmp30 = sum1;
|
|
if (null == tmp29) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp29 = str4;
|
|
}
|
|
let arr = items.push(tmp29);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 <= tmp9);
|
|
}
|
|
}
|
|
}
|
|
obj[2] = items;
|
|
obj[3] = tmp7;
|
|
const merged = Object.assign(state, obj);
|
|
callback9(state, tmp7);
|
|
if (tmp37) {
|
|
callback7(state, state, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered);
|
|
}
|
|
tmp37 = null !== tmp7 && null !== tmp9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})(tmp7, viewabilityConfigCallbackPairs, scrollLength, c12, c14);
|
|
} else if (tmp2.props.onFirstVisibleItemChanged) {
|
|
outer1_102(tmp2, (function findFirstVisibleIndexInCachedRange(state, c12) {
|
|
let data;
|
|
let keyExtractor;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
if (startBuffered <= endBuffered) {
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp3 = tmp[startBuffered];
|
|
let tmp4 = startBuffered;
|
|
if (null == tmp3) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp5 = null;
|
|
if (startBuffered < data.length) {
|
|
let keyExtractorResult = startBuffered;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startBuffered], startBuffered);
|
|
}
|
|
tmp5 = keyExtractorResult;
|
|
}
|
|
state.idCache[startBuffered] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
let value = sizes.get(tmp3);
|
|
let tmp9 = value;
|
|
if (null == value) {
|
|
let tmp10 = callback4;
|
|
let num = 0;
|
|
let tmp11 = state;
|
|
let tmp12 = tmp3;
|
|
let tmp13 = startBuffered;
|
|
tmp9 = callback4(state, tmp8, tmp4, data[startBuffered]);
|
|
}
|
|
if (tmp2[startBuffered] + tmp9 > c12) {
|
|
break;
|
|
} else {
|
|
let sum = startBuffered + 1;
|
|
if (sum <= endBuffered) {
|
|
startBuffered = sum;
|
|
}
|
|
}
|
|
}
|
|
return startBuffered;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
})(tmp7, c12));
|
|
}
|
|
let prop1;
|
|
if (null != stickyState) {
|
|
prop1 = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != prop1) {
|
|
let call = prop1.call;
|
|
typeof call === "unknown" ? prop1() : call(stickyState);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp73;
|
|
if (doMVCP) {
|
|
if (!tmp25) {
|
|
tmp73 = outer1_68(tmp7, dataChanged);
|
|
}
|
|
}
|
|
if (dataChanged) {
|
|
outer1_86(tmp2);
|
|
}
|
|
let num8 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num8 = 0;
|
|
if (!dataChanged) {
|
|
let startBuffered = minIndexSizeChanged;
|
|
if (null == minIndexSizeChanged) {
|
|
startBuffered = tmp2.startBuffered;
|
|
}
|
|
let num9 = 0;
|
|
if (null != startBuffered) {
|
|
num9 = startBuffered;
|
|
}
|
|
num8 = num9;
|
|
}
|
|
}
|
|
let obj = { doMVCP: null, forceFullUpdate: null, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null };
|
|
obj[0] = doMVCP;
|
|
obj[1] = forceFullItemPositions;
|
|
let tmp82 = !forceFullItemPositions;
|
|
if (!forceFullItemPositions) {
|
|
tmp82 = !dataChanged;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = tmp15Result > 1;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = undefined !== minIndexSizeChanged;
|
|
}
|
|
obj[2] = tmp82;
|
|
obj[3] = c15;
|
|
obj[4] = scrollVelocity;
|
|
obj[5] = num8;
|
|
outer1_89(tmp7, dataChanged, obj);
|
|
const tmp17Result = outer1_25(tmp7);
|
|
closure_8 = tmp17Result;
|
|
if (undefined !== minIndexSizeChanged) {
|
|
tmp2.minIndexSizeChanged = undefined;
|
|
}
|
|
if (dataChanged) {
|
|
if (doMVCP) {
|
|
if (tmp2.props.maintainVisibleContentPosition.data) {
|
|
if (tmp2.didContainersLayout) {
|
|
if (tmp2.idsInView.length > 0) {
|
|
const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition;
|
|
const _Set2 = Set;
|
|
let set = new Set();
|
|
const idsInView = tmp2.idsInView;
|
|
for (const item10226 of idsInView) {
|
|
let tmp99 = item10226;
|
|
addResult = indexByKey.get(item10226);
|
|
if (undefined !== addResult) {
|
|
addResult = shouldRestorePosition;
|
|
if (shouldRestorePosition) {
|
|
addResult = !shouldRestorePosition(data[addResult], addResult, data);
|
|
}
|
|
if (!addResult) {
|
|
addResult = item10226;
|
|
addResult = set.add(tmp99);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_21(containerItemKeys, "scrollAdjustPending");
|
|
let num11 = 0;
|
|
if (null != addResult) {
|
|
num11 = addResult;
|
|
}
|
|
if (null != tmp73) {
|
|
addResult = tmp73();
|
|
}
|
|
addResult = tmp73;
|
|
if (addResult) {
|
|
addResult = addResult.scroll !== state.scroll;
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, "scrollAdjustPending");
|
|
let num12 = 0;
|
|
if (null != addResult) {
|
|
num12 = addResult;
|
|
}
|
|
addResult = num12 !== num11;
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = updateScroll2(addResult.scroll);
|
|
addResult = updateScrollRange();
|
|
}
|
|
if (dataChanged) {
|
|
stickyState = resolveStickyState();
|
|
}
|
|
addResult = undefined;
|
|
if (!tmp13) {
|
|
addResult = undefined;
|
|
if (null != bootstrap) {
|
|
addResult = bootstrap.targetIndexSeed;
|
|
}
|
|
}
|
|
if (null == addResult) {
|
|
let num13 = !dataChanged;
|
|
if (!dataChanged) {
|
|
num13 = startBufferedId;
|
|
}
|
|
if (num13) {
|
|
num13 = indexByKey.get(startBufferedId);
|
|
}
|
|
if (!num13) {
|
|
num13 = 0;
|
|
}
|
|
addResult = num13;
|
|
}
|
|
if (addResult >= 0) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num14 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = c13;
|
|
if (positions[addResult] + addResult <= c13) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (addResult < 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp15Result > 1) {
|
|
if (addResult > 0) {
|
|
addResult = state.columns[addResult];
|
|
while (1 !== addResult) {
|
|
if (undefined === addResult) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (0 >= addResult) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = globalThis;
|
|
let num16 = 0;
|
|
let num17 = 0;
|
|
let num18 = 0;
|
|
if (0 < tmp16) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num16);
|
|
addResult = num16;
|
|
addResult = num17;
|
|
addResult = num17;
|
|
if (undefined !== addResult) {
|
|
let _Math3 = Math;
|
|
addResult = Math.max(num17, indexByKey.get(addResult));
|
|
}
|
|
num16 = num16 + 1;
|
|
num17 = addResult;
|
|
num18 = addResult;
|
|
} while (num16 < tmp16);
|
|
}
|
|
obj = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: true };
|
|
const length = data.length;
|
|
let _Math4 = Math;
|
|
addResult = Math.max(0, addResult);
|
|
let flag3 = false;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
if (addResult < length) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
addResult = flag3;
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num19 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = positions[addResult];
|
|
addResult = flag3;
|
|
if (!flag3) {
|
|
addResult = outer1_100;
|
|
addResult = c12;
|
|
addResult = c14;
|
|
let num20 = 0;
|
|
addResult = obj;
|
|
addResult = outer1_100(obj, addResult, addResult, addResult, c12, c14);
|
|
addResult = null === addResult;
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = addResult + addResult > c13;
|
|
}
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = null;
|
|
}
|
|
addResult = flag3;
|
|
if (null !== obj.startNoBuffer) {
|
|
addResult = c15;
|
|
let flag4 = true;
|
|
if (addResult <= c15) {
|
|
addResult = c15;
|
|
addResult = null;
|
|
if (c15 <= tmp17Result) {
|
|
addResult = addResult + addResult;
|
|
}
|
|
flag4 = flag3;
|
|
}
|
|
addResult = flag4;
|
|
}
|
|
}
|
|
addResult = addResult + 1;
|
|
if (addResult >= length) {
|
|
break;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (!addResult) {
|
|
continue;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (addResult > num18) {
|
|
break;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
const _Object = Object;
|
|
let obj1 = { endBuffered: null, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null };
|
|
obj1[0] = addResult;
|
|
({ endNoBuffer: obj5[1], firstFullyOnScreenIndex: obj5[2] } = obj);
|
|
addResult = outer1_101;
|
|
addResult = state;
|
|
addResult = state;
|
|
obj1[3] = outer1_101(state, obj);
|
|
obj1[4] = addResult;
|
|
obj1[5] = addResult;
|
|
obj1[6] = obj.startNoBuffer;
|
|
addResult = Object.assign(state, obj1);
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
addResult = outer1_54;
|
|
if (!outer1_54(addResult)) {
|
|
let obj2 = { bottom: null, top: null };
|
|
obj2[0] = addResult;
|
|
obj2[1] = addResult;
|
|
addResult = obj2;
|
|
}
|
|
addResult.scrollForNextCalculateItemsInView = addResult;
|
|
}
|
|
addResult = tmp16;
|
|
let items = [];
|
|
if (dataChanged) {
|
|
for (let num21 = 0; num21 < addResult; num21 = num21 + 1) {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal2 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num21);
|
|
addResult = !keyExtractor;
|
|
addResult = num21;
|
|
if (keyExtractor) {
|
|
if (addResult) {
|
|
addResult = undefined === indexByKey.get(addResult);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = items.push(num21);
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const scrollTargetPinnedRange = state.scrollTargetPinnedRange;
|
|
let c22 = 0;
|
|
let c23 = -1;
|
|
let num23 = -1;
|
|
let num24 = 0;
|
|
if (scrollTargetPinnedRange) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
addResult = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c22 = addResult;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
addResult = length - 1;
|
|
addResult = Math.min(addResult, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c23 = addResult;
|
|
num23 = addResult;
|
|
num24 = addResult;
|
|
}
|
|
addResult = num24 <= num23;
|
|
let closure_24 = addResult;
|
|
function isPinnedRenderIndex(addResult) {
|
|
let hasItem = set.has(addResult);
|
|
if (!hasItem) {
|
|
let tmp2 = closure_24;
|
|
if (closure_24) {
|
|
tmp2 = addResult >= c22;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = addResult <= c23;
|
|
}
|
|
hasItem = tmp2;
|
|
}
|
|
return hasItem;
|
|
}
|
|
if (null !== addResult) {
|
|
if (null !== addResult) {
|
|
let items1 = [];
|
|
const _Set6 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
const set1 = new Set();
|
|
function addPinnedIndex(item10471) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (item10471 >= 0) {
|
|
if (item10471 < length) {
|
|
let tmp4 = idCache[item10471];
|
|
if (null == tmp4) {
|
|
({ data, keyExtractor } = outer1_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (item10471 < data.length) {
|
|
let keyExtractorResult = item10471;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[item10471], item10471);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[item10471] = tmp2;
|
|
str = tmp2;
|
|
}
|
|
tmp4 = str;
|
|
}
|
|
const value = containerItemKeys.get(tmp4);
|
|
if (undefined !== value) {
|
|
const stickyContainerPool = outer1_2.stickyContainerPool;
|
|
stickyContainerPool.add(value);
|
|
} else {
|
|
let hasItem = null == tmp4;
|
|
if (!hasItem) {
|
|
hasItem = set1.has(item10471);
|
|
}
|
|
if (!hasItem) {
|
|
set1.add(item10471);
|
|
items1.push(item10471);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = set1;
|
|
if (addResult <= addResult) {
|
|
do {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
if (!containerItemKeys.has(addResult)) {
|
|
addResult = set1.add(addResult);
|
|
addResult = items1.push(addResult);
|
|
}
|
|
addResult = addResult + 1;
|
|
} while (addResult <= addResult);
|
|
}
|
|
addResult = alwaysRenderIndicesArr;
|
|
addResult = alwaysRenderIndicesArr;
|
|
for (const item10471 of alwaysRenderIndicesArr) {
|
|
addResult = addPinnedIndex(item10471);
|
|
continue;
|
|
}
|
|
if (addResult) {
|
|
if (num24 <= num23) {
|
|
do {
|
|
addResult = addPinnedIndex(num24);
|
|
num24 = num24 + 1;
|
|
} while (num24 <= num23);
|
|
}
|
|
}
|
|
if (prop.length > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num25 = -1;
|
|
if (null != addResult) {
|
|
num25 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = num25;
|
|
addResult = items1;
|
|
addResult = set1;
|
|
addResult = (function handleStickyActivation(addResult, prop, arg2, items1, addResult2, addResult3, addResult4) {
|
|
let data;
|
|
let keyExtractor;
|
|
const state = addResult.state;
|
|
let num = -1;
|
|
if (arg2 >= 0) {
|
|
num = prop[arg2];
|
|
}
|
|
c22(addResult, "activeStickyIndex", num);
|
|
let num2 = 0;
|
|
do {
|
|
let diff = arg2 - num2;
|
|
let tmp4 = num2;
|
|
if (diff >= 0) {
|
|
let tmp12 = prop[diff];
|
|
let tmp13 = callback8;
|
|
if (!callback8(addResult, tmp12)) {
|
|
let tmp5 = state.idCache[tmp12];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (tmp12 < data.length) {
|
|
let keyExtractorResult = tmp12;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp12], tmp12);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp12] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let tmp8 = tmp5;
|
|
if (tmp5) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
tmp8 = !containerItemKeys.has(tmp5);
|
|
}
|
|
if (tmp8) {
|
|
let tmp9 = tmp12 < addResult3 || tmp12 > addResult4;
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = !addResult2.has(tmp12);
|
|
}
|
|
if (tmp8) {
|
|
addResult = addResult2.add(tmp12);
|
|
let arr = items1.push(tmp12);
|
|
}
|
|
}
|
|
}
|
|
num2 = num2 + 1;
|
|
} while (num2 <= 1);
|
|
})(addResult, prop, num25, items1, addResult, addResult, addResult);
|
|
} else if (-1 !== tmp15Result1) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "activeStickyIndex", -1);
|
|
}
|
|
if (items1.length > 0) {
|
|
let fn;
|
|
if (getItemType) {
|
|
fn = (arg0) => {
|
|
const tmp = getItemType(data[arg0], arg0);
|
|
let str = "";
|
|
if (undefined !== tmp) {
|
|
const _String = String;
|
|
str = String(tmp);
|
|
}
|
|
return str;
|
|
};
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = items1;
|
|
addResult = items;
|
|
addResult = fn;
|
|
addResult = tmp88;
|
|
addResult = (function findAvailableContainers(containerItemKeys, items1, addResult, addResult2, items, fn, has) {
|
|
let closure_2;
|
|
let stickyContainerPool;
|
|
let closure_0 = fn;
|
|
if (0 === items1.length) {
|
|
return [];
|
|
} else {
|
|
const tmp56 = length(containerItemKeys, "numContainers");
|
|
const state = containerItemKeys.state;
|
|
({ containerItemMetadata: closure_2, stickyContainerPool } = state);
|
|
let set;
|
|
if (items.length > 0) {
|
|
const _Set = Set;
|
|
set = new Set(items);
|
|
}
|
|
const mapped = items1.map((itemIndex) => {
|
|
const obj = { isSticky: stickyHeaderIndicesSet.has(itemIndex), itemIndex, itemType: null, order: null };
|
|
stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet;
|
|
let tmp;
|
|
if (null != callback) {
|
|
tmp = callback(itemIndex);
|
|
}
|
|
obj[2] = tmp;
|
|
obj[3] = arg1;
|
|
return obj;
|
|
});
|
|
const found = mapped.filter((isSticky) => !isSticky.isSticky);
|
|
items = [];
|
|
items1 = [];
|
|
let num2 = 0;
|
|
const found1 = mapped.filter((isSticky) => isSticky.isSticky);
|
|
if (0 < tmp56) {
|
|
while (true) {
|
|
let tmp12 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp13 = length(containerItemKeys, "containerItemKey" + num2);
|
|
let tmp14 = num2;
|
|
let hasItem;
|
|
if (null != set) {
|
|
hasItem = set.has(num2);
|
|
}
|
|
let tmp16 = !hasItem;
|
|
if (tmp13) {
|
|
let hasItem1;
|
|
if (null != has) {
|
|
hasItem1 = has.has(tmp13);
|
|
}
|
|
if (hasItem1) {
|
|
let indexByKey = state.indexByKey;
|
|
}
|
|
num2 = num2 + 1;
|
|
if (num2 >= tmp56) {
|
|
break;
|
|
}
|
|
}
|
|
let tmp18 = !tmp16;
|
|
if (stickyContainerPool.has(num2)) {
|
|
let tmp22 = undefined === tmp13 || tmp18;
|
|
if (tmp22) {
|
|
let obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number2 = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr = items1.push(obj);
|
|
}
|
|
} else {
|
|
if (undefined !== tmp13) {
|
|
if (!tmp18) {
|
|
if (!tmp) {
|
|
let indexByKey2 = state.indexByKey;
|
|
let value = indexByKey2.get(tmp13);
|
|
if (undefined !== value) {
|
|
if (value < addResult) {
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
obj[1] = value < addResult ? addResult - value : value - addResult2;
|
|
arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr1 = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
const sorted = items.sort(closure_98);
|
|
const _Array = Array;
|
|
const array = new Array(length);
|
|
let sum = tmp56;
|
|
let c5 = false;
|
|
function assign(itemIndex, containerIndex) {
|
|
array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType };
|
|
let deleteResult;
|
|
if (null != set) {
|
|
deleteResult = set.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
let c5 = true;
|
|
}
|
|
}
|
|
function assignMatching(found, items, arg2) {
|
|
let closure_0 = items;
|
|
let closure_1 = arg2;
|
|
function _loop2(iter) {
|
|
const items = iter;
|
|
if (outer1_4[iter.order]) {
|
|
return 1;
|
|
} else {
|
|
const findIndexResult = items.findIndex(() => { ... });
|
|
if (-1 !== findIndexResult) {
|
|
const containerIndex = array(items.splice(findIndexResult, 1), 1)[0].containerIndex;
|
|
if (typeof outer1_6 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const obj = { containerIndex: null, itemIndex: null, itemType: null };
|
|
obj[0] = containerIndex;
|
|
({ itemIndex: obj[1], itemType: obj[2] } = iter);
|
|
tmp[iter.order] = obj;
|
|
let deleteResult;
|
|
if (null != outer1_3) {
|
|
deleteResult = obj2.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
const outer1_5 = true;
|
|
}
|
|
obj2 = outer1_3;
|
|
}
|
|
}
|
|
}
|
|
const iter = found[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop2Result = _loop2(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function assignFromPool(found, items, arg2) {
|
|
if (closure_0) {
|
|
assignMatching(found, items, (arg0, arg1) => {
|
|
let tmp = undefined !== arg1;
|
|
if (tmp) {
|
|
tmp = arg0 === arg1;
|
|
}
|
|
return tmp;
|
|
});
|
|
}
|
|
assignMatching(found, items, (arg0) => undefined === arg0);
|
|
if (arg2) {
|
|
assignMatching(found, items, () => true);
|
|
}
|
|
}
|
|
assignFromPool(found, items, true);
|
|
assignFromPool(found1, items1, false);
|
|
for (const item10099 of mapped) {
|
|
let tmp36 = item10099;
|
|
if (!array[item10099.order]) {
|
|
let tmp37 = sum;
|
|
let tmp38 = +sum;
|
|
sum = tmp38 + 1;
|
|
let tmp39 = tmp38;
|
|
let tmp40 = item10099;
|
|
if (tmp36.isSticky) {
|
|
let tmp41 = tmp38;
|
|
addResult = stickyContainerPool.add(tmp39);
|
|
}
|
|
let tmp43 = item10099;
|
|
let tmp44 = tmp38;
|
|
let obj1 = assign(tmp36, tmp39);
|
|
}
|
|
continue;
|
|
}
|
|
if (c5) {
|
|
items.length = 0;
|
|
if (set) {
|
|
for (const item10120 of set) {
|
|
let arr2 = arg4.push(item10120);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if (closure_31) {
|
|
let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled");
|
|
if (null == POSITIVE_INFINITY) {
|
|
const _Number3 = Number;
|
|
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
}
|
|
if (sum > POSITIVE_INFINITY) {
|
|
const _console = console;
|
|
let obj2 = { debugInfo: null };
|
|
const obj3 = { numContainers: null, numContainersPooled: null, numNeeded: null, stillNeeded: null };
|
|
obj3[0] = tmp56;
|
|
obj3[1] = POSITIVE_INFINITY;
|
|
obj3[2] = length;
|
|
obj3[3] = sum - tmp56;
|
|
obj2[0] = obj3;
|
|
console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj2);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
})(containerItemKeys, items1, addResult, addResult, items, fn, tmp88);
|
|
let iter = addResult[Symbol.iterator]();
|
|
addResult = iter.next();
|
|
addResult = iter;
|
|
while (iter !== undefined) {
|
|
let itemIndex = addResult.itemIndex;
|
|
addResult = itemIndex;
|
|
let containerIndex = addResult.containerIndex;
|
|
addResult = idCache[itemIndex];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = itemIndex;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerIndex;
|
|
let _HermesInternal3 = HermesInternal;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + containerIndex);
|
|
if (addResult) {
|
|
addResult = addResult !== addResult;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
}
|
|
if (addResult !== addResult) {
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set3 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = containerIndex;
|
|
addResult = set2.add(containerIndex);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[containerIndex];
|
|
let num28 = 0;
|
|
if (null != addResult) {
|
|
num28 = addResult;
|
|
}
|
|
state.containerItemGenerations[containerIndex] = num28 + 1;
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerIndex;
|
|
let _HermesInternal4 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + containerIndex, addResult);
|
|
let _HermesInternal5 = HermesInternal;
|
|
addResult = itemIndex;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + containerIndex, addResult);
|
|
let _HermesInternal6 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + containerIndex, data[addResult]);
|
|
addResult = state;
|
|
addResult = state;
|
|
let containerItemMetadata = state.containerItemMetadata;
|
|
addResult = outer1_28;
|
|
let num29 = 0;
|
|
addResult = state;
|
|
addResult = containerItemMetadata.set(containerIndex, outer1_28(state, itemIndex, data[addResult], addResult.itemType));
|
|
addResult = containerItemKeys.set(addResult, containerIndex);
|
|
let userScrollAnchorReset = state.userScrollAnchorReset;
|
|
if (null != userScrollAnchorReset) {
|
|
addResult = userScrollAnchorReset;
|
|
let keys = addResult.keys;
|
|
addResult = keys.add(addResult);
|
|
}
|
|
addResult = containerIndex;
|
|
let _HermesInternal7 = HermesInternal;
|
|
addResult = "containerSticky" + containerIndex;
|
|
addResult = itemIndex;
|
|
addResult = stickyHeaderIndicesSet.has(addResult);
|
|
addResult = isPinnedRenderIndex(addResult);
|
|
if (addResult) {
|
|
addResult = addResult(addResult, addResult, true);
|
|
let stickyContainerPool2 = addResult.stickyContainerPool;
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool2.add(containerIndex);
|
|
} else {
|
|
if (addResult(addResult, addResult)) {
|
|
addResult = addResult(addResult, addResult, false);
|
|
}
|
|
let stickyContainerPool = addResult.stickyContainerPool;
|
|
if (addResult) {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.add(containerIndex);
|
|
} else {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.delete(containerIndex);
|
|
}
|
|
}
|
|
addResult = containerIndex;
|
|
if (containerIndex >= addResult) {
|
|
addResult = containerIndex;
|
|
addResult = containerIndex + 1;
|
|
}
|
|
continue;
|
|
}
|
|
if (addResult !== tmp16) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "numContainers", addResult);
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
if (addResult > outer1_21(containerItemKeys, "numContainersPooled")) {
|
|
addResult = addResult(addResult, "numContainersPooled", (function getExpandedContainerPoolSize(length, addResult) {
|
|
let num = 0;
|
|
if (length > 0) {
|
|
num = 0;
|
|
if (addResult > 0) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound = Math.max(length, addResult);
|
|
num = Math.min(bound, Math.max(addResult, Math.ceil(1.5 * addResult)));
|
|
}
|
|
}
|
|
return num;
|
|
})(length, addResult));
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const userScrollAnchorReset2 = state.userScrollAnchorReset;
|
|
addResult = undefined;
|
|
if (null != userScrollAnchorReset2) {
|
|
addResult = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === addResult) {
|
|
addResult.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
if (addResult.stickyContainerPool.size > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = c12;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num30 = -1;
|
|
if (null != addResult) {
|
|
num30 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = tmp9;
|
|
addResult = num30;
|
|
addResult = items;
|
|
addResult = isPinnedRenderIndex;
|
|
addResult = (function handleStickyRecycling(addResult, prop, addResult2, arg3, arg4, items, isPinnedRenderIndex) {
|
|
const state = addResult.state;
|
|
const iter = state.stickyContainerPool[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
let tmp3 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp4 = length(addResult, "containerItemKey" + nextResult);
|
|
let value;
|
|
if (tmp4) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp7 = tmp4;
|
|
value = indexByKey.get(tmp5);
|
|
}
|
|
let tmp8 = value;
|
|
if (undefined !== value) {
|
|
let tmp52 = value;
|
|
if (!isPinnedRenderIndex(tmp8)) {
|
|
let tmp9 = value;
|
|
let index = prop.indexOf(tmp8);
|
|
let tmp11 = index;
|
|
if (-1 !== index) {
|
|
let tmp16 = index;
|
|
if (tmp11 < arg4 - 1) {
|
|
let tmp18 = index;
|
|
let tmp19 = prop[tmp11 + 1];
|
|
let flag = false;
|
|
if (tmp19) {
|
|
let tmp44 = tmp19;
|
|
let tmp45 = state.positions[tmp20];
|
|
let tmp47 = undefined !== tmp45;
|
|
if (tmp47) {
|
|
let tmp48 = tmp45;
|
|
tmp47 = addResult2 > tmp46 + 2 * arg3;
|
|
}
|
|
flag = tmp47;
|
|
} else {
|
|
let tmp21 = value;
|
|
let tmp22 = state.idCache[tmp8];
|
|
let tmp23 = tmp22;
|
|
if (null != tmp22) {
|
|
let tmp26 = tmp22;
|
|
} else {
|
|
let tmp24 = callback3;
|
|
let tmp25 = value;
|
|
tmp26 = callback3(state, tmp8);
|
|
}
|
|
let tmp27 = tmp26;
|
|
if (tmp26) {
|
|
let tmp28 = value;
|
|
let tmp29 = state.positions[tmp8];
|
|
let sizes = state.sizes;
|
|
let tmp30 = tmp26;
|
|
value = sizes.get(tmp27);
|
|
let tmp32 = value;
|
|
if (null != value) {
|
|
let tmp38 = value;
|
|
} else {
|
|
let tmp33 = callback4;
|
|
let tmp34 = tmp26;
|
|
let tmp35 = value;
|
|
let num = 0;
|
|
let tmp36 = addResult;
|
|
let tmp37 = tmp8;
|
|
tmp38 = callback4(addResult, tmp27, value, state.props.data[tmp8]);
|
|
}
|
|
let tmp40 = tmp29;
|
|
let tmp41 = undefined !== tmp29;
|
|
if (tmp41) {
|
|
let tmp42 = tmp29;
|
|
let tmp43 = tmp38;
|
|
tmp41 = addResult2 > tmp29 + tmp39 + 3 * arg3;
|
|
}
|
|
flag = tmp41;
|
|
}
|
|
}
|
|
let tmp49 = flag;
|
|
if (flag) {
|
|
let tmp50 = nextResult;
|
|
let arr = items.push(tmp2);
|
|
}
|
|
} else {
|
|
let tmp17 = index;
|
|
}
|
|
} else {
|
|
let stickyContainerPool = state.stickyContainerPool;
|
|
let tmp12 = nextResult;
|
|
let deleteResult = stickyContainerPool.delete(tmp2);
|
|
let tmp14 = v0;
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp15 = v0(addResult, "containerSticky" + tmp2, false);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
})(addResult, prop, addResult, tmp9, num30, items, isPinnedRenderIndex);
|
|
}
|
|
if (items.length > 0) {
|
|
const _Set4 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
addResult = items;
|
|
const set3 = new Set(items);
|
|
}
|
|
let num32 = 0;
|
|
let flag5 = false;
|
|
if (0 < addResult) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal8 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num32);
|
|
addResult = flag5;
|
|
addResult = undefined;
|
|
addResult = num32;
|
|
if (null != set3) {
|
|
addResult = set3.has(num32);
|
|
}
|
|
if (addResult) {
|
|
if (undefined !== addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set5 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = set2.add(num32);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[num32];
|
|
let num33 = 0;
|
|
if (null != addResult) {
|
|
num33 = addResult;
|
|
}
|
|
state.containerItemGenerations[num32] = num33 + 1;
|
|
}
|
|
let containerItemMetadata2 = state.containerItemMetadata;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = containerItemMetadata2.delete(num32);
|
|
let stickyContainerPool3 = state.stickyContainerPool;
|
|
if (stickyContainerPool3.has(num32)) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal9 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSticky" + num32, false);
|
|
let stickyContainerPool4 = addResult.stickyContainerPool;
|
|
addResult = stickyContainerPool4.delete(num32);
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal10 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + num32, undefined);
|
|
let _HermesInternal11 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + num32, undefined);
|
|
let _HermesInternal12 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + num32, undefined);
|
|
let _HermesInternal13 = HermesInternal;
|
|
addResult = outer1_32;
|
|
addResult = outer1_22(addResult, "containerPosition" + num32, outer1_32);
|
|
let _HermesInternal14 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerColumn" + num32, -1);
|
|
let _HermesInternal15 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSpan" + num32, 1);
|
|
addResult = flag5;
|
|
} else {
|
|
addResult = indexByKey.get(addResult);
|
|
addResult = flag5;
|
|
if (undefined !== addResult) {
|
|
addResult = outer1_88;
|
|
let obj3 = { scrollAdjustPending: null, updateLayout: true };
|
|
addResult = c10;
|
|
obj3[0] = c10;
|
|
let num35 = 0;
|
|
addResult = num32;
|
|
addResult = obj3;
|
|
addResult = outer1_88(addResult, addResult, addResult, obj3).didChangePosition || flag5;
|
|
}
|
|
}
|
|
num32 = num32 + 1;
|
|
flag5 = addResult;
|
|
} while (num32 < addResult);
|
|
}
|
|
addResult = set2;
|
|
if (set2) {
|
|
addResult = outer1_27;
|
|
}
|
|
if (addResult) {
|
|
addResult = outer1_87;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_87(containerItemKeys, set2);
|
|
}
|
|
if (!tmp13) {
|
|
addResult = outer1_84;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_84(containerItemKeys);
|
|
} else {
|
|
addResult = outer1_102;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_102(state, obj.startNoBuffer);
|
|
if (!queuedInitialLayout) {
|
|
if (!addResult.didContainersLayout) {
|
|
addResult = outer1_41;
|
|
addResult = outer1_77;
|
|
if (outer1_41(addResult)) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
} else {
|
|
addResult = addResult(addResult, addResult.startNoBuffer, addResult.endNoBuffer);
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = (function setDidLayout(containerItemKeys) {
|
|
containerItemKeys.state.queuedInitialLayout = true;
|
|
callback(containerItemKeys);
|
|
callback2(containerItemKeys, { didLayout: true });
|
|
})(containerItemKeys);
|
|
addResult = (function handleInitialScrollLayoutReady(containerItemKeys) {
|
|
let closure_0 = containerItemKeys;
|
|
if (containerItemKeys.state.initialScroll) {
|
|
callback6(containerItemKeys, { forceScroll: true });
|
|
const initialScrollSession = containerItemKeys.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(function runScroll() {
|
|
return outer1_76(closure_0, { forceScroll: true });
|
|
});
|
|
}
|
|
closure_0 = containerItemKeys;
|
|
const scrollingTo = containerItemKeys.state.scrollingTo;
|
|
{
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
}
|
|
})(containerItemKeys);
|
|
}
|
|
}
|
|
}
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
if (viewabilityConfigCallbackPairs) {
|
|
addResult = null !== obj.startNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = null !== obj.endNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
state = containerItemKeys.state;
|
|
({ startNoBuffer, endNoBuffer } = obj);
|
|
addResult = outer1_91;
|
|
if (null == addResult) {
|
|
addResult = obj.startNoBuffer;
|
|
}
|
|
if (null == addResult) {
|
|
addResult = obj.endNoBuffer;
|
|
}
|
|
addResult = state;
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
addResult = scrollLength;
|
|
addResult = startNoBuffer;
|
|
addResult = endNoBuffer;
|
|
addResult = addResult(state, addResult, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, addResult, addResult);
|
|
}
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != addResult) {
|
|
const call2 = addResult.call;
|
|
if (typeof call2 === "unknown") {
|
|
addResult = addResult();
|
|
} else {
|
|
addResult = call2(stickyState);
|
|
}
|
|
}
|
|
}
|
|
let tmp17 = outer1_25;
|
|
const tmp80 = outer1_89;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
const userScrollAnchorReset2 = state2.userScrollAnchorReset;
|
|
let size;
|
|
if (null != userScrollAnchorReset2) {
|
|
size = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === size) {
|
|
state2.userScrollAnchorReset = undefined;
|
|
}
|
|
} else {
|
|
closure_0 = state;
|
|
closure_1 = { doMVCP: true };
|
|
state = state.state;
|
|
fn(() => {
|
|
let alwaysRenderIndicesArr;
|
|
let bottom;
|
|
let closure_4;
|
|
let dataChanged;
|
|
let doMVCP;
|
|
let enableScrollForNextCalculateItemsInView;
|
|
let endNoBuffer;
|
|
let forceFullItemPositions;
|
|
let getItemType;
|
|
let idCache;
|
|
let indexByKey;
|
|
let initialScroll;
|
|
let keyExtractor;
|
|
let minIndexSizeChanged;
|
|
let positions;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scrollForNextCalculateItemsInView;
|
|
let scrollLength;
|
|
let set2;
|
|
let sizes;
|
|
let startBufferedId;
|
|
let startNoBuffer;
|
|
let state;
|
|
let top;
|
|
let viewabilityConfigCallbackPairs;
|
|
let addResult = state;
|
|
let containerItemKeys = state.containerItemKeys;
|
|
({ enableScrollForNextCalculateItemsInView, idCache } = state);
|
|
({ indexByKey, minIndexSizeChanged, positions, props } = state);
|
|
({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props);
|
|
({ keyExtractor, onStickyHeaderChange: closure_4 } = props);
|
|
({ scrollForNextCalculateItemsInView, scrollLength } = state);
|
|
({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state);
|
|
const data = state.props.data;
|
|
let prop = state.props.stickyHeaderIndicesArr;
|
|
if (!prop) {
|
|
prop = [];
|
|
}
|
|
let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet;
|
|
if (!stickyHeaderIndicesSet) {
|
|
let _Set = Set;
|
|
stickyHeaderIndicesSet = new Set();
|
|
}
|
|
let tmp9 = outer1_46(containerItemKeys, idCache.drawDistanceMode);
|
|
({ dataChanged, doMVCP, forceFullItemPositions } = idCache);
|
|
let initialScrollSession = tmp2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp2.initialScrollSession.bootstrap;
|
|
}
|
|
let tmp16 = outer1_21(containerItemKeys, "numContainers");
|
|
if (data) {
|
|
if (0 !== scrollLength) {
|
|
if (tmp16) {
|
|
let closure_8 = outer1_25(tmp7);
|
|
let tmp15Result = tmp15(tmp7, "stylePaddingTop");
|
|
let sum = tmp15Result + tmp15(tmp7, "alignItemsAtEndPadding");
|
|
let closure_9 = sum + tmp15(tmp7, "headerSize");
|
|
tmp15Result = tmp15(tmp7, "numColumns");
|
|
let scrollVelocity = idCache.scrollVelocity;
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = outer1_69(tmp2);
|
|
}
|
|
({ initialScroll, queuedInitialLayout } = tmp2);
|
|
if (!tmp13) {
|
|
let scroll;
|
|
if (null != bootstrap) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = tmp2.scroll;
|
|
}
|
|
} else {
|
|
if (!queuedInitialLayout) {
|
|
if (outer1_41(tmp2)) {
|
|
if (initialScroll) {
|
|
scroll = outer1_75(tmp7, initialScroll);
|
|
}
|
|
}
|
|
}
|
|
scroll = tmp2.scroll;
|
|
}
|
|
let c10 = 0;
|
|
let c11 = 0;
|
|
let c12 = 0;
|
|
let c13 = 0;
|
|
let c14 = 0;
|
|
let c15 = 0;
|
|
function updateScroll2(scroll) {
|
|
let closure_16 = scroll;
|
|
const values = containerItemKeys.values;
|
|
const value = values.get("scrollAdjustPending");
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
let closure_11 = num - closure_9;
|
|
const rounded = Math.round(scroll + closure_11);
|
|
let closure_12 = rounded;
|
|
if (rounded + scrollLength > closure_8) {
|
|
const _Math = Math;
|
|
closure_12 = Math.max(0, tmp4 - tmp3);
|
|
}
|
|
}
|
|
updateScroll2(scroll);
|
|
const tmp15Result1 = tmp15(tmp7, "activeStickyIndex");
|
|
let closure_17 = tmp15Result1;
|
|
function resolveStickyState() {
|
|
let num = -1;
|
|
let num2 = -1;
|
|
if (prop.length > 0) {
|
|
let diff = arr.length - 1;
|
|
let tmp5 = num;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp6 = tmp3[arr[diff]];
|
|
let tmp7 = diff;
|
|
if (undefined === tmp6) {
|
|
diff = diff - 1;
|
|
tmp5 = num;
|
|
if (0 > diff) {
|
|
break;
|
|
}
|
|
} else {
|
|
tmp5 = diff;
|
|
if (tmp >= tmp6) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
num2 = tmp5;
|
|
}
|
|
if (0 <= num2) {
|
|
num = arr[num2];
|
|
}
|
|
let tmp8 = num2 >= 0;
|
|
if (0 > num2) {
|
|
tmp8 = tmp9 >= 0;
|
|
}
|
|
if (tmp8) {
|
|
outer2_22(containerItemKeys, "activeStickyIndex", num);
|
|
}
|
|
let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null };
|
|
let fn;
|
|
if (closure_4) {
|
|
if (arr.length > 0) {
|
|
if (tmp9 !== num) {
|
|
fn = () => {
|
|
if (undefined !== outer1_6[num]) {
|
|
if (null != outer1_4) {
|
|
const obj = { index: null, item: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp2;
|
|
tmp3(obj);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
obj[1] = fn;
|
|
return obj;
|
|
}
|
|
if (!dataChanged) {
|
|
let stickyState = resolveStickyState();
|
|
}
|
|
let result2 = tmp9;
|
|
let result3 = tmp9;
|
|
if (scrollVelocity > 0) {
|
|
let result = 0.5 * tmp9;
|
|
result2 = result;
|
|
const result1 = 1.5 * tmp9;
|
|
result3 = result1;
|
|
result3 = result1;
|
|
result2 = result;
|
|
} else {
|
|
if (0 === scrollVelocity) {
|
|
let _Math = Math;
|
|
}
|
|
result2 = 1.5 * tmp9;
|
|
result3 = 0.5 * tmp9;
|
|
}
|
|
let num6 = 0;
|
|
if (!dataChanged) {
|
|
num6 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num6 = 0;
|
|
if (!tmp25) {
|
|
num6 = 0;
|
|
if (!outer1_41(tmp2)) {
|
|
num6 = 0;
|
|
if (!tmp2.scrollingTo) {
|
|
num6 = 0;
|
|
if (!tmp2.pendingNativeMVCPAdjust) {
|
|
num6 = 0;
|
|
if (tmp15(tmp7, "readyToRender")) {
|
|
let _Math2 = Math;
|
|
num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) {
|
|
if (arg1 <= 0) {
|
|
return 0;
|
|
} else {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const bound = Math.min(1, Math.abs(scrollVelocity) / 4);
|
|
return Math.sign(scrollVelocity) * arg1 * bound;
|
|
}
|
|
})(scrollVelocity, Math.min(result2, result3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateScrollRange() {
|
|
const bound = Math.max(0, c12);
|
|
let closure_14 = Math.max(bound, c12 + scrollLength + Math.max(0, -scroll));
|
|
let closure_13 = bound - result2 + num6;
|
|
let closure_15 = closure_14 + result3 + num6;
|
|
}
|
|
updateScrollRange();
|
|
if (0 !== num6) {
|
|
(function scheduleRenderRangeProjectionSettle(state) {
|
|
state = state.state;
|
|
const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle;
|
|
if (undefined !== timeoutRenderRangeProjectionSettle) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutRenderRangeProjectionSettle);
|
|
let timeouts = state.timeouts;
|
|
timeouts.delete(timeoutRenderRangeProjectionSettle);
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
state.timeoutRenderRangeProjectionSettle = undefined;
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.scrollHistory.length = 0;
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}, 100);
|
|
state.timeoutRenderRangeProjectionSettle = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
})(tmp7);
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
if (!tmp25) {
|
|
if (!dataChanged) {
|
|
if (!forceFullItemPositions) {
|
|
if (scrollForNextCalculateItemsInView) {
|
|
({ top, bottom } = scrollForNextCalculateItemsInView);
|
|
if (null === top) {
|
|
if (null === bottom) {
|
|
tmp2.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}
|
|
if (null === top) {
|
|
if (viewabilityConfigCallbackPairs) {
|
|
(function updateViewabilityForCachedRange(state, viewabilityConfigCallbackPairs, scrollLength, c12, c14) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let tmp7 = null;
|
|
let sum1;
|
|
let tmp9 = null;
|
|
if (startBuffered <= endBuffered) {
|
|
let tmp3 = null;
|
|
let tmp5 = null;
|
|
let tmp6 = startBuffered;
|
|
tmp7 = null;
|
|
tmp9 = null;
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp10 = tmp[tmp6];
|
|
let tmp11 = tmp3;
|
|
let tmp12 = tmp4;
|
|
let tmp13 = tmp5;
|
|
let tmp14 = tmp6;
|
|
if (null == tmp10) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data) {
|
|
let tmp15 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp15 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp15;
|
|
str2 = tmp15;
|
|
}
|
|
tmp10 = str2;
|
|
}
|
|
let value = sizes.get(tmp10);
|
|
if (null == value) {
|
|
let tmp19 = callback4;
|
|
let num2 = 0;
|
|
let tmp20 = state;
|
|
let tmp21 = tmp10;
|
|
let tmp22 = tmp6;
|
|
value = callback4(state, tmp18, tmp14, data[tmp6]);
|
|
}
|
|
let tmp23 = tmp2[tmp6];
|
|
let tmp24 = null === tmp11 && tmp23 + value > c12;
|
|
if (tmp24) {
|
|
tmp11 = tmp6;
|
|
}
|
|
let tmp25 = undefined === tmp12 && tmp23 >= c12 - 10 && tmp23 <= c14;
|
|
if (tmp25) {
|
|
tmp12 = tmp6;
|
|
}
|
|
let tmp26 = tmp13;
|
|
let flag = false;
|
|
if (null !== tmp11) {
|
|
let flag2 = true;
|
|
if (tmp23 <= c14) {
|
|
tmp13 = tmp6;
|
|
flag2 = false;
|
|
}
|
|
tmp26 = tmp13;
|
|
flag = flag2;
|
|
}
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (flag) {
|
|
break;
|
|
} else {
|
|
let sum = tmp6 + 1;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (sum > endBuffered) {
|
|
break;
|
|
} else {
|
|
tmp3 = tmp11;
|
|
tmp4 = tmp12;
|
|
tmp5 = tmp26;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
tmp6 = sum;
|
|
if (sum >= data.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj = { endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startNoBuffer: null };
|
|
obj[0] = tmp9;
|
|
obj[1] = sum1;
|
|
if (null == sum1) {
|
|
sum1 = tmp7;
|
|
}
|
|
const items = [];
|
|
if (null != sum1) {
|
|
if (null !== tmp9) {
|
|
if (sum1 <= tmp9) {
|
|
do {
|
|
let tmp29 = state.idCache[sum1];
|
|
let tmp30 = sum1;
|
|
if (null == tmp29) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp29 = str4;
|
|
}
|
|
let arr = items.push(tmp29);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 <= tmp9);
|
|
}
|
|
}
|
|
}
|
|
obj[2] = items;
|
|
obj[3] = tmp7;
|
|
const merged = Object.assign(state, obj);
|
|
callback9(state, tmp7);
|
|
if (tmp37) {
|
|
callback7(state, state, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered);
|
|
}
|
|
tmp37 = null !== tmp7 && null !== tmp9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})(tmp7, viewabilityConfigCallbackPairs, scrollLength, c12, c14);
|
|
} else if (tmp2.props.onFirstVisibleItemChanged) {
|
|
outer1_102(tmp2, (function findFirstVisibleIndexInCachedRange(state, c12) {
|
|
let data;
|
|
let keyExtractor;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
if (startBuffered <= endBuffered) {
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp3 = tmp[startBuffered];
|
|
let tmp4 = startBuffered;
|
|
if (null == tmp3) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp5 = null;
|
|
if (startBuffered < data.length) {
|
|
let keyExtractorResult = startBuffered;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startBuffered], startBuffered);
|
|
}
|
|
tmp5 = keyExtractorResult;
|
|
}
|
|
state.idCache[startBuffered] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
let value = sizes.get(tmp3);
|
|
let tmp9 = value;
|
|
if (null == value) {
|
|
let tmp10 = callback4;
|
|
let num = 0;
|
|
let tmp11 = state;
|
|
let tmp12 = tmp3;
|
|
let tmp13 = startBuffered;
|
|
tmp9 = callback4(state, tmp8, tmp4, data[startBuffered]);
|
|
}
|
|
if (tmp2[startBuffered] + tmp9 > c12) {
|
|
break;
|
|
} else {
|
|
let sum = startBuffered + 1;
|
|
if (sum <= endBuffered) {
|
|
startBuffered = sum;
|
|
}
|
|
}
|
|
}
|
|
return startBuffered;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
})(tmp7, c12));
|
|
}
|
|
let prop1;
|
|
if (null != stickyState) {
|
|
prop1 = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != prop1) {
|
|
let call = prop1.call;
|
|
typeof call === "unknown" ? prop1() : call(stickyState);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp73;
|
|
if (doMVCP) {
|
|
if (!tmp25) {
|
|
tmp73 = outer1_68(tmp7, dataChanged);
|
|
}
|
|
}
|
|
if (dataChanged) {
|
|
outer1_86(tmp2);
|
|
}
|
|
let num8 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num8 = 0;
|
|
if (!dataChanged) {
|
|
let startBuffered = minIndexSizeChanged;
|
|
if (null == minIndexSizeChanged) {
|
|
startBuffered = tmp2.startBuffered;
|
|
}
|
|
let num9 = 0;
|
|
if (null != startBuffered) {
|
|
num9 = startBuffered;
|
|
}
|
|
num8 = num9;
|
|
}
|
|
}
|
|
let obj = { doMVCP: null, forceFullUpdate: null, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null };
|
|
obj[0] = doMVCP;
|
|
obj[1] = forceFullItemPositions;
|
|
let tmp82 = !forceFullItemPositions;
|
|
if (!forceFullItemPositions) {
|
|
tmp82 = !dataChanged;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = tmp15Result > 1;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = undefined !== minIndexSizeChanged;
|
|
}
|
|
obj[2] = tmp82;
|
|
obj[3] = c15;
|
|
obj[4] = scrollVelocity;
|
|
obj[5] = num8;
|
|
outer1_89(tmp7, dataChanged, obj);
|
|
const tmp17Result = outer1_25(tmp7);
|
|
closure_8 = tmp17Result;
|
|
if (undefined !== minIndexSizeChanged) {
|
|
tmp2.minIndexSizeChanged = undefined;
|
|
}
|
|
if (dataChanged) {
|
|
if (doMVCP) {
|
|
if (tmp2.props.maintainVisibleContentPosition.data) {
|
|
if (tmp2.didContainersLayout) {
|
|
if (tmp2.idsInView.length > 0) {
|
|
const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition;
|
|
const _Set2 = Set;
|
|
let set = new Set();
|
|
const idsInView = tmp2.idsInView;
|
|
for (const item10226 of idsInView) {
|
|
let tmp99 = item10226;
|
|
addResult = indexByKey.get(item10226);
|
|
if (undefined !== addResult) {
|
|
addResult = shouldRestorePosition;
|
|
if (shouldRestorePosition) {
|
|
addResult = !shouldRestorePosition(data[addResult], addResult, data);
|
|
}
|
|
if (!addResult) {
|
|
addResult = item10226;
|
|
addResult = set.add(tmp99);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_21(containerItemKeys, "scrollAdjustPending");
|
|
let num11 = 0;
|
|
if (null != addResult) {
|
|
num11 = addResult;
|
|
}
|
|
if (null != tmp73) {
|
|
addResult = tmp73();
|
|
}
|
|
addResult = tmp73;
|
|
if (addResult) {
|
|
addResult = addResult.scroll !== state.scroll;
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, "scrollAdjustPending");
|
|
let num12 = 0;
|
|
if (null != addResult) {
|
|
num12 = addResult;
|
|
}
|
|
addResult = num12 !== num11;
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = updateScroll2(addResult.scroll);
|
|
addResult = updateScrollRange();
|
|
}
|
|
if (dataChanged) {
|
|
stickyState = resolveStickyState();
|
|
}
|
|
addResult = undefined;
|
|
if (!tmp13) {
|
|
addResult = undefined;
|
|
if (null != bootstrap) {
|
|
addResult = bootstrap.targetIndexSeed;
|
|
}
|
|
}
|
|
if (null == addResult) {
|
|
let num13 = !dataChanged;
|
|
if (!dataChanged) {
|
|
num13 = startBufferedId;
|
|
}
|
|
if (num13) {
|
|
num13 = indexByKey.get(startBufferedId);
|
|
}
|
|
if (!num13) {
|
|
num13 = 0;
|
|
}
|
|
addResult = num13;
|
|
}
|
|
if (addResult >= 0) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num14 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = c13;
|
|
if (positions[addResult] + addResult <= c13) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (addResult < 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp15Result > 1) {
|
|
if (addResult > 0) {
|
|
addResult = state.columns[addResult];
|
|
while (1 !== addResult) {
|
|
if (undefined === addResult) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (0 >= addResult) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = globalThis;
|
|
let num16 = 0;
|
|
let num17 = 0;
|
|
let num18 = 0;
|
|
if (0 < tmp16) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num16);
|
|
addResult = num16;
|
|
addResult = num17;
|
|
addResult = num17;
|
|
if (undefined !== addResult) {
|
|
let _Math3 = Math;
|
|
addResult = Math.max(num17, indexByKey.get(addResult));
|
|
}
|
|
num16 = num16 + 1;
|
|
num17 = addResult;
|
|
num18 = addResult;
|
|
} while (num16 < tmp16);
|
|
}
|
|
obj = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: true };
|
|
const length = data.length;
|
|
let _Math4 = Math;
|
|
addResult = Math.max(0, addResult);
|
|
let flag3 = false;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
if (addResult < length) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
addResult = flag3;
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num19 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = positions[addResult];
|
|
addResult = flag3;
|
|
if (!flag3) {
|
|
addResult = outer1_100;
|
|
addResult = c12;
|
|
addResult = c14;
|
|
let num20 = 0;
|
|
addResult = obj;
|
|
addResult = outer1_100(obj, addResult, addResult, addResult, c12, c14);
|
|
addResult = null === addResult;
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = addResult + addResult > c13;
|
|
}
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = null;
|
|
}
|
|
addResult = flag3;
|
|
if (null !== obj.startNoBuffer) {
|
|
addResult = c15;
|
|
let flag4 = true;
|
|
if (addResult <= c15) {
|
|
addResult = c15;
|
|
addResult = null;
|
|
if (c15 <= tmp17Result) {
|
|
addResult = addResult + addResult;
|
|
}
|
|
flag4 = flag3;
|
|
}
|
|
addResult = flag4;
|
|
}
|
|
}
|
|
addResult = addResult + 1;
|
|
if (addResult >= length) {
|
|
break;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (!addResult) {
|
|
continue;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (addResult > num18) {
|
|
break;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
const _Object = Object;
|
|
let obj1 = { endBuffered: null, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null };
|
|
obj1[0] = addResult;
|
|
({ endNoBuffer: obj5[1], firstFullyOnScreenIndex: obj5[2] } = obj);
|
|
addResult = outer1_101;
|
|
addResult = state;
|
|
addResult = state;
|
|
obj1[3] = outer1_101(state, obj);
|
|
obj1[4] = addResult;
|
|
obj1[5] = addResult;
|
|
obj1[6] = obj.startNoBuffer;
|
|
addResult = Object.assign(state, obj1);
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
addResult = outer1_54;
|
|
if (!outer1_54(addResult)) {
|
|
let obj2 = { bottom: null, top: null };
|
|
obj2[0] = addResult;
|
|
obj2[1] = addResult;
|
|
addResult = obj2;
|
|
}
|
|
addResult.scrollForNextCalculateItemsInView = addResult;
|
|
}
|
|
addResult = tmp16;
|
|
let items = [];
|
|
if (dataChanged) {
|
|
for (let num21 = 0; num21 < addResult; num21 = num21 + 1) {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal2 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num21);
|
|
addResult = !keyExtractor;
|
|
addResult = num21;
|
|
if (keyExtractor) {
|
|
if (addResult) {
|
|
addResult = undefined === indexByKey.get(addResult);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = items.push(num21);
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const scrollTargetPinnedRange = state.scrollTargetPinnedRange;
|
|
let c22 = 0;
|
|
let c23 = -1;
|
|
let num23 = -1;
|
|
let num24 = 0;
|
|
if (scrollTargetPinnedRange) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
addResult = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c22 = addResult;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
addResult = length - 1;
|
|
addResult = Math.min(addResult, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c23 = addResult;
|
|
num23 = addResult;
|
|
num24 = addResult;
|
|
}
|
|
addResult = num24 <= num23;
|
|
let closure_24 = addResult;
|
|
function isPinnedRenderIndex(addResult) {
|
|
let hasItem = set.has(addResult);
|
|
if (!hasItem) {
|
|
let tmp2 = closure_24;
|
|
if (closure_24) {
|
|
tmp2 = addResult >= c22;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = addResult <= c23;
|
|
}
|
|
hasItem = tmp2;
|
|
}
|
|
return hasItem;
|
|
}
|
|
if (null !== addResult) {
|
|
if (null !== addResult) {
|
|
let items1 = [];
|
|
const _Set6 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
const set1 = new Set();
|
|
function addPinnedIndex(item10471) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (item10471 >= 0) {
|
|
if (item10471 < length) {
|
|
let tmp4 = idCache[item10471];
|
|
if (null == tmp4) {
|
|
({ data, keyExtractor } = outer1_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (item10471 < data.length) {
|
|
let keyExtractorResult = item10471;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[item10471], item10471);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[item10471] = tmp2;
|
|
str = tmp2;
|
|
}
|
|
tmp4 = str;
|
|
}
|
|
const value = containerItemKeys.get(tmp4);
|
|
if (undefined !== value) {
|
|
const stickyContainerPool = outer1_2.stickyContainerPool;
|
|
stickyContainerPool.add(value);
|
|
} else {
|
|
let hasItem = null == tmp4;
|
|
if (!hasItem) {
|
|
hasItem = set1.has(item10471);
|
|
}
|
|
if (!hasItem) {
|
|
set1.add(item10471);
|
|
items1.push(item10471);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = set1;
|
|
if (addResult <= addResult) {
|
|
do {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
if (!containerItemKeys.has(addResult)) {
|
|
addResult = set1.add(addResult);
|
|
addResult = items1.push(addResult);
|
|
}
|
|
addResult = addResult + 1;
|
|
} while (addResult <= addResult);
|
|
}
|
|
addResult = alwaysRenderIndicesArr;
|
|
addResult = alwaysRenderIndicesArr;
|
|
for (const item10471 of alwaysRenderIndicesArr) {
|
|
addResult = addPinnedIndex(item10471);
|
|
continue;
|
|
}
|
|
if (addResult) {
|
|
if (num24 <= num23) {
|
|
do {
|
|
addResult = addPinnedIndex(num24);
|
|
num24 = num24 + 1;
|
|
} while (num24 <= num23);
|
|
}
|
|
}
|
|
if (prop.length > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num25 = -1;
|
|
if (null != addResult) {
|
|
num25 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = num25;
|
|
addResult = items1;
|
|
addResult = set1;
|
|
addResult = (function handleStickyActivation(addResult, prop, arg2, items1, addResult2, addResult3, addResult4) {
|
|
let data;
|
|
let keyExtractor;
|
|
const state = addResult.state;
|
|
let num = -1;
|
|
if (arg2 >= 0) {
|
|
num = prop[arg2];
|
|
}
|
|
c22(addResult, "activeStickyIndex", num);
|
|
let num2 = 0;
|
|
do {
|
|
let diff = arg2 - num2;
|
|
let tmp4 = num2;
|
|
if (diff >= 0) {
|
|
let tmp12 = prop[diff];
|
|
let tmp13 = callback8;
|
|
if (!callback8(addResult, tmp12)) {
|
|
let tmp5 = state.idCache[tmp12];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (tmp12 < data.length) {
|
|
let keyExtractorResult = tmp12;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp12], tmp12);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp12] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let tmp8 = tmp5;
|
|
if (tmp5) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
tmp8 = !containerItemKeys.has(tmp5);
|
|
}
|
|
if (tmp8) {
|
|
let tmp9 = tmp12 < addResult3 || tmp12 > addResult4;
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = !addResult2.has(tmp12);
|
|
}
|
|
if (tmp8) {
|
|
addResult = addResult2.add(tmp12);
|
|
let arr = items1.push(tmp12);
|
|
}
|
|
}
|
|
}
|
|
num2 = num2 + 1;
|
|
} while (num2 <= 1);
|
|
})(addResult, prop, num25, items1, addResult, addResult, addResult);
|
|
} else if (-1 !== tmp15Result1) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "activeStickyIndex", -1);
|
|
}
|
|
if (items1.length > 0) {
|
|
let fn;
|
|
if (getItemType) {
|
|
fn = (arg0) => {
|
|
const tmp = getItemType(data[arg0], arg0);
|
|
let str = "";
|
|
if (undefined !== tmp) {
|
|
const _String = String;
|
|
str = String(tmp);
|
|
}
|
|
return str;
|
|
};
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = items1;
|
|
addResult = items;
|
|
addResult = fn;
|
|
addResult = tmp88;
|
|
addResult = (function findAvailableContainers(containerItemKeys, items1, addResult, addResult2, items, fn, has) {
|
|
let closure_2;
|
|
let stickyContainerPool;
|
|
let closure_0 = fn;
|
|
if (0 === items1.length) {
|
|
return [];
|
|
} else {
|
|
const tmp56 = length(containerItemKeys, "numContainers");
|
|
const state = containerItemKeys.state;
|
|
({ containerItemMetadata: closure_2, stickyContainerPool } = state);
|
|
let set;
|
|
if (items.length > 0) {
|
|
const _Set = Set;
|
|
set = new Set(items);
|
|
}
|
|
const mapped = items1.map((itemIndex) => {
|
|
const obj = { isSticky: stickyHeaderIndicesSet.has(itemIndex), itemIndex, itemType: null, order: null };
|
|
stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet;
|
|
let tmp;
|
|
if (null != callback) {
|
|
tmp = callback(itemIndex);
|
|
}
|
|
obj[2] = tmp;
|
|
obj[3] = arg1;
|
|
return obj;
|
|
});
|
|
const found = mapped.filter((isSticky) => !isSticky.isSticky);
|
|
items = [];
|
|
items1 = [];
|
|
let num2 = 0;
|
|
const found1 = mapped.filter((isSticky) => isSticky.isSticky);
|
|
if (0 < tmp56) {
|
|
while (true) {
|
|
let tmp12 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp13 = length(containerItemKeys, "containerItemKey" + num2);
|
|
let tmp14 = num2;
|
|
let hasItem;
|
|
if (null != set) {
|
|
hasItem = set.has(num2);
|
|
}
|
|
let tmp16 = !hasItem;
|
|
if (tmp13) {
|
|
let hasItem1;
|
|
if (null != has) {
|
|
hasItem1 = has.has(tmp13);
|
|
}
|
|
if (hasItem1) {
|
|
let indexByKey = state.indexByKey;
|
|
}
|
|
num2 = num2 + 1;
|
|
if (num2 >= tmp56) {
|
|
break;
|
|
}
|
|
}
|
|
let tmp18 = !tmp16;
|
|
if (stickyContainerPool.has(num2)) {
|
|
let tmp22 = undefined === tmp13 || tmp18;
|
|
if (tmp22) {
|
|
let obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number2 = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr = items1.push(obj);
|
|
}
|
|
} else {
|
|
if (undefined !== tmp13) {
|
|
if (!tmp18) {
|
|
if (!tmp) {
|
|
let indexByKey2 = state.indexByKey;
|
|
let value = indexByKey2.get(tmp13);
|
|
if (undefined !== value) {
|
|
if (value < addResult) {
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
obj[1] = value < addResult ? addResult - value : value - addResult2;
|
|
arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr1 = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
const sorted = items.sort(closure_98);
|
|
const _Array = Array;
|
|
const array = new Array(length);
|
|
let sum = tmp56;
|
|
let c5 = false;
|
|
function assign(itemIndex, containerIndex) {
|
|
array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType };
|
|
let deleteResult;
|
|
if (null != set) {
|
|
deleteResult = set.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
let c5 = true;
|
|
}
|
|
}
|
|
function assignMatching(found, items, arg2) {
|
|
let closure_0 = items;
|
|
let closure_1 = arg2;
|
|
function _loop2(iter) {
|
|
const items = iter;
|
|
if (outer1_4[iter.order]) {
|
|
return 1;
|
|
} else {
|
|
const findIndexResult = items.findIndex(() => { ... });
|
|
if (-1 !== findIndexResult) {
|
|
const containerIndex = array(items.splice(findIndexResult, 1), 1)[0].containerIndex;
|
|
if (typeof outer1_6 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const obj = { containerIndex: null, itemIndex: null, itemType: null };
|
|
obj[0] = containerIndex;
|
|
({ itemIndex: obj[1], itemType: obj[2] } = iter);
|
|
tmp[iter.order] = obj;
|
|
let deleteResult;
|
|
if (null != outer1_3) {
|
|
deleteResult = obj2.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
const outer1_5 = true;
|
|
}
|
|
obj2 = outer1_3;
|
|
}
|
|
}
|
|
}
|
|
const iter = found[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop2Result = _loop2(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function assignFromPool(found, items, arg2) {
|
|
if (closure_0) {
|
|
assignMatching(found, items, (arg0, arg1) => {
|
|
let tmp = undefined !== arg1;
|
|
if (tmp) {
|
|
tmp = arg0 === arg1;
|
|
}
|
|
return tmp;
|
|
});
|
|
}
|
|
assignMatching(found, items, (arg0) => undefined === arg0);
|
|
if (arg2) {
|
|
assignMatching(found, items, () => true);
|
|
}
|
|
}
|
|
assignFromPool(found, items, true);
|
|
assignFromPool(found1, items1, false);
|
|
for (const item10099 of mapped) {
|
|
let tmp36 = item10099;
|
|
if (!array[item10099.order]) {
|
|
let tmp37 = sum;
|
|
let tmp38 = +sum;
|
|
sum = tmp38 + 1;
|
|
let tmp39 = tmp38;
|
|
let tmp40 = item10099;
|
|
if (tmp36.isSticky) {
|
|
let tmp41 = tmp38;
|
|
addResult = stickyContainerPool.add(tmp39);
|
|
}
|
|
let tmp43 = item10099;
|
|
let tmp44 = tmp38;
|
|
let obj1 = assign(tmp36, tmp39);
|
|
}
|
|
continue;
|
|
}
|
|
if (c5) {
|
|
items.length = 0;
|
|
if (set) {
|
|
for (const item10120 of set) {
|
|
let arr2 = arg4.push(item10120);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if (closure_31) {
|
|
let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled");
|
|
if (null == POSITIVE_INFINITY) {
|
|
const _Number3 = Number;
|
|
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
}
|
|
if (sum > POSITIVE_INFINITY) {
|
|
const _console = console;
|
|
let obj2 = { debugInfo: null };
|
|
const obj3 = { numContainers: null, numContainersPooled: null, numNeeded: null, stillNeeded: null };
|
|
obj3[0] = tmp56;
|
|
obj3[1] = POSITIVE_INFINITY;
|
|
obj3[2] = length;
|
|
obj3[3] = sum - tmp56;
|
|
obj2[0] = obj3;
|
|
console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj2);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
})(containerItemKeys, items1, addResult, addResult, items, fn, tmp88);
|
|
let iter = addResult[Symbol.iterator]();
|
|
addResult = iter.next();
|
|
addResult = iter;
|
|
while (iter !== undefined) {
|
|
let itemIndex = addResult.itemIndex;
|
|
addResult = itemIndex;
|
|
let containerIndex = addResult.containerIndex;
|
|
addResult = idCache[itemIndex];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = itemIndex;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerIndex;
|
|
let _HermesInternal3 = HermesInternal;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + containerIndex);
|
|
if (addResult) {
|
|
addResult = addResult !== addResult;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
}
|
|
if (addResult !== addResult) {
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set3 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = containerIndex;
|
|
addResult = set2.add(containerIndex);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[containerIndex];
|
|
let num28 = 0;
|
|
if (null != addResult) {
|
|
num28 = addResult;
|
|
}
|
|
state.containerItemGenerations[containerIndex] = num28 + 1;
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerIndex;
|
|
let _HermesInternal4 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + containerIndex, addResult);
|
|
let _HermesInternal5 = HermesInternal;
|
|
addResult = itemIndex;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + containerIndex, addResult);
|
|
let _HermesInternal6 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + containerIndex, data[addResult]);
|
|
addResult = state;
|
|
addResult = state;
|
|
let containerItemMetadata = state.containerItemMetadata;
|
|
addResult = outer1_28;
|
|
let num29 = 0;
|
|
addResult = state;
|
|
addResult = containerItemMetadata.set(containerIndex, outer1_28(state, itemIndex, data[addResult], addResult.itemType));
|
|
addResult = containerItemKeys.set(addResult, containerIndex);
|
|
let userScrollAnchorReset = state.userScrollAnchorReset;
|
|
if (null != userScrollAnchorReset) {
|
|
addResult = userScrollAnchorReset;
|
|
let keys = addResult.keys;
|
|
addResult = keys.add(addResult);
|
|
}
|
|
addResult = containerIndex;
|
|
let _HermesInternal7 = HermesInternal;
|
|
addResult = "containerSticky" + containerIndex;
|
|
addResult = itemIndex;
|
|
addResult = stickyHeaderIndicesSet.has(addResult);
|
|
addResult = isPinnedRenderIndex(addResult);
|
|
if (addResult) {
|
|
addResult = addResult(addResult, addResult, true);
|
|
let stickyContainerPool2 = addResult.stickyContainerPool;
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool2.add(containerIndex);
|
|
} else {
|
|
if (addResult(addResult, addResult)) {
|
|
addResult = addResult(addResult, addResult, false);
|
|
}
|
|
let stickyContainerPool = addResult.stickyContainerPool;
|
|
if (addResult) {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.add(containerIndex);
|
|
} else {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.delete(containerIndex);
|
|
}
|
|
}
|
|
addResult = containerIndex;
|
|
if (containerIndex >= addResult) {
|
|
addResult = containerIndex;
|
|
addResult = containerIndex + 1;
|
|
}
|
|
continue;
|
|
}
|
|
if (addResult !== tmp16) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "numContainers", addResult);
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
if (addResult > outer1_21(containerItemKeys, "numContainersPooled")) {
|
|
addResult = addResult(addResult, "numContainersPooled", (function getExpandedContainerPoolSize(length, addResult) {
|
|
let num = 0;
|
|
if (length > 0) {
|
|
num = 0;
|
|
if (addResult > 0) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound = Math.max(length, addResult);
|
|
num = Math.min(bound, Math.max(addResult, Math.ceil(1.5 * addResult)));
|
|
}
|
|
}
|
|
return num;
|
|
})(length, addResult));
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const userScrollAnchorReset2 = state.userScrollAnchorReset;
|
|
addResult = undefined;
|
|
if (null != userScrollAnchorReset2) {
|
|
addResult = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === addResult) {
|
|
addResult.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
if (addResult.stickyContainerPool.size > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = c12;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num30 = -1;
|
|
if (null != addResult) {
|
|
num30 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = tmp9;
|
|
addResult = num30;
|
|
addResult = items;
|
|
addResult = isPinnedRenderIndex;
|
|
addResult = (function handleStickyRecycling(addResult, prop, addResult2, arg3, arg4, items, isPinnedRenderIndex) {
|
|
const state = addResult.state;
|
|
const iter = state.stickyContainerPool[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
let tmp3 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp4 = length(addResult, "containerItemKey" + nextResult);
|
|
let value;
|
|
if (tmp4) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp7 = tmp4;
|
|
value = indexByKey.get(tmp5);
|
|
}
|
|
let tmp8 = value;
|
|
if (undefined !== value) {
|
|
let tmp52 = value;
|
|
if (!isPinnedRenderIndex(tmp8)) {
|
|
let tmp9 = value;
|
|
let index = prop.indexOf(tmp8);
|
|
let tmp11 = index;
|
|
if (-1 !== index) {
|
|
let tmp16 = index;
|
|
if (tmp11 < arg4 - 1) {
|
|
let tmp18 = index;
|
|
let tmp19 = prop[tmp11 + 1];
|
|
let flag = false;
|
|
if (tmp19) {
|
|
let tmp44 = tmp19;
|
|
let tmp45 = state.positions[tmp20];
|
|
let tmp47 = undefined !== tmp45;
|
|
if (tmp47) {
|
|
let tmp48 = tmp45;
|
|
tmp47 = addResult2 > tmp46 + 2 * arg3;
|
|
}
|
|
flag = tmp47;
|
|
} else {
|
|
let tmp21 = value;
|
|
let tmp22 = state.idCache[tmp8];
|
|
let tmp23 = tmp22;
|
|
if (null != tmp22) {
|
|
let tmp26 = tmp22;
|
|
} else {
|
|
let tmp24 = callback3;
|
|
let tmp25 = value;
|
|
tmp26 = callback3(state, tmp8);
|
|
}
|
|
let tmp27 = tmp26;
|
|
if (tmp26) {
|
|
let tmp28 = value;
|
|
let tmp29 = state.positions[tmp8];
|
|
let sizes = state.sizes;
|
|
let tmp30 = tmp26;
|
|
value = sizes.get(tmp27);
|
|
let tmp32 = value;
|
|
if (null != value) {
|
|
let tmp38 = value;
|
|
} else {
|
|
let tmp33 = callback4;
|
|
let tmp34 = tmp26;
|
|
let tmp35 = value;
|
|
let num = 0;
|
|
let tmp36 = addResult;
|
|
let tmp37 = tmp8;
|
|
tmp38 = callback4(addResult, tmp27, value, state.props.data[tmp8]);
|
|
}
|
|
let tmp40 = tmp29;
|
|
let tmp41 = undefined !== tmp29;
|
|
if (tmp41) {
|
|
let tmp42 = tmp29;
|
|
let tmp43 = tmp38;
|
|
tmp41 = addResult2 > tmp29 + tmp39 + 3 * arg3;
|
|
}
|
|
flag = tmp41;
|
|
}
|
|
}
|
|
let tmp49 = flag;
|
|
if (flag) {
|
|
let tmp50 = nextResult;
|
|
let arr = items.push(tmp2);
|
|
}
|
|
} else {
|
|
let tmp17 = index;
|
|
}
|
|
} else {
|
|
let stickyContainerPool = state.stickyContainerPool;
|
|
let tmp12 = nextResult;
|
|
let deleteResult = stickyContainerPool.delete(tmp2);
|
|
let tmp14 = v0;
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp15 = v0(addResult, "containerSticky" + tmp2, false);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
})(addResult, prop, addResult, tmp9, num30, items, isPinnedRenderIndex);
|
|
}
|
|
if (items.length > 0) {
|
|
const _Set4 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
addResult = items;
|
|
const set3 = new Set(items);
|
|
}
|
|
let num32 = 0;
|
|
let flag5 = false;
|
|
if (0 < addResult) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal8 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num32);
|
|
addResult = flag5;
|
|
addResult = undefined;
|
|
addResult = num32;
|
|
if (null != set3) {
|
|
addResult = set3.has(num32);
|
|
}
|
|
if (addResult) {
|
|
if (undefined !== addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set5 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = set2.add(num32);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[num32];
|
|
let num33 = 0;
|
|
if (null != addResult) {
|
|
num33 = addResult;
|
|
}
|
|
state.containerItemGenerations[num32] = num33 + 1;
|
|
}
|
|
let containerItemMetadata2 = state.containerItemMetadata;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = containerItemMetadata2.delete(num32);
|
|
let stickyContainerPool3 = state.stickyContainerPool;
|
|
if (stickyContainerPool3.has(num32)) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal9 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSticky" + num32, false);
|
|
let stickyContainerPool4 = addResult.stickyContainerPool;
|
|
addResult = stickyContainerPool4.delete(num32);
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal10 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + num32, undefined);
|
|
let _HermesInternal11 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + num32, undefined);
|
|
let _HermesInternal12 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + num32, undefined);
|
|
let _HermesInternal13 = HermesInternal;
|
|
addResult = outer1_32;
|
|
addResult = outer1_22(addResult, "containerPosition" + num32, outer1_32);
|
|
let _HermesInternal14 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerColumn" + num32, -1);
|
|
let _HermesInternal15 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSpan" + num32, 1);
|
|
addResult = flag5;
|
|
} else {
|
|
addResult = indexByKey.get(addResult);
|
|
addResult = flag5;
|
|
if (undefined !== addResult) {
|
|
addResult = outer1_88;
|
|
let obj3 = { scrollAdjustPending: null, updateLayout: true };
|
|
addResult = c10;
|
|
obj3[0] = c10;
|
|
let num35 = 0;
|
|
addResult = num32;
|
|
addResult = obj3;
|
|
addResult = outer1_88(addResult, addResult, addResult, obj3).didChangePosition || flag5;
|
|
}
|
|
}
|
|
num32 = num32 + 1;
|
|
flag5 = addResult;
|
|
} while (num32 < addResult);
|
|
}
|
|
addResult = set2;
|
|
if (set2) {
|
|
addResult = outer1_27;
|
|
}
|
|
if (addResult) {
|
|
addResult = outer1_87;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_87(containerItemKeys, set2);
|
|
}
|
|
if (!tmp13) {
|
|
addResult = outer1_84;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_84(containerItemKeys);
|
|
} else {
|
|
addResult = outer1_102;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_102(state, obj.startNoBuffer);
|
|
if (!queuedInitialLayout) {
|
|
if (!addResult.didContainersLayout) {
|
|
addResult = outer1_41;
|
|
addResult = outer1_77;
|
|
if (outer1_41(addResult)) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
} else {
|
|
addResult = addResult(addResult, addResult.startNoBuffer, addResult.endNoBuffer);
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = (function setDidLayout(containerItemKeys) {
|
|
containerItemKeys.state.queuedInitialLayout = true;
|
|
callback(containerItemKeys);
|
|
callback2(containerItemKeys, { didLayout: true });
|
|
})(containerItemKeys);
|
|
addResult = (function handleInitialScrollLayoutReady(containerItemKeys) {
|
|
let closure_0 = containerItemKeys;
|
|
if (containerItemKeys.state.initialScroll) {
|
|
callback6(containerItemKeys, { forceScroll: true });
|
|
const initialScrollSession = containerItemKeys.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(function runScroll() {
|
|
return outer1_76(closure_0, { forceScroll: true });
|
|
});
|
|
}
|
|
closure_0 = containerItemKeys;
|
|
const scrollingTo = containerItemKeys.state.scrollingTo;
|
|
{
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
}
|
|
})(containerItemKeys);
|
|
}
|
|
}
|
|
}
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
if (viewabilityConfigCallbackPairs) {
|
|
addResult = null !== obj.startNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = null !== obj.endNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
state = containerItemKeys.state;
|
|
({ startNoBuffer, endNoBuffer } = obj);
|
|
addResult = outer1_91;
|
|
if (null == addResult) {
|
|
addResult = obj.startNoBuffer;
|
|
}
|
|
if (null == addResult) {
|
|
addResult = obj.endNoBuffer;
|
|
}
|
|
addResult = state;
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
addResult = scrollLength;
|
|
addResult = startNoBuffer;
|
|
addResult = endNoBuffer;
|
|
addResult = addResult(state, addResult, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, addResult, addResult);
|
|
}
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != addResult) {
|
|
const call2 = addResult.call;
|
|
if (typeof call2 === "unknown") {
|
|
addResult = addResult();
|
|
} else {
|
|
addResult = call2(stickyState);
|
|
}
|
|
}
|
|
}
|
|
let tmp17 = outer1_25;
|
|
const tmp80 = outer1_89;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
} else {
|
|
let didMeasureUserScrollAnchorResetItem = needsRecalculate.didMeasureUserScrollAnchorResetItem;
|
|
if (didMeasureUserScrollAnchorResetItem) {
|
|
const userScrollAnchorReset = state.userScrollAnchorReset;
|
|
let size1;
|
|
if (null != userScrollAnchorReset) {
|
|
size1 = userScrollAnchorReset.keys.size;
|
|
}
|
|
didMeasureUserScrollAnchorResetItem = 0 === size1;
|
|
}
|
|
if (didMeasureUserScrollAnchorResetItem) {
|
|
state.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
if (tmp9) {
|
|
doMaintainScrollAtEnd(state);
|
|
}
|
|
}
|
|
function updateItemSizesBatch(state, items) {
|
|
state = state.state;
|
|
const obj = {};
|
|
const iter = items[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
if (undefined === nextResult.containerId) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp5 = nextResult;
|
|
let value = indexByKey.get(tmp2.itemKey);
|
|
let tmp7 = value;
|
|
let tmp8;
|
|
if (undefined !== value) {
|
|
let data = state.props.data;
|
|
if (null != data) {
|
|
let tmp10 = data;
|
|
let tmp11 = value;
|
|
tmp8 = tmp9[tmp7];
|
|
}
|
|
}
|
|
let tmp12 = tmp8;
|
|
let tmp13 = nextResult;
|
|
let tmp14;
|
|
if (undefined !== tmp2.containerId) {
|
|
let tmp15 = value;
|
|
if (undefined !== tmp7) {
|
|
let tmp16 = tmp8;
|
|
if (undefined !== tmp12) {
|
|
let tmp17 = resolveContainerItemMetadata;
|
|
let tmp18 = nextResult;
|
|
let tmp19 = value;
|
|
let tmp20 = tmp8;
|
|
let num = 0;
|
|
let tmp21 = state;
|
|
tmp14 = resolveContainerItemMetadata(state, tmp2.containerId, tmp7, tmp12);
|
|
}
|
|
}
|
|
}
|
|
let tmp22 = mergeItemSizeUpdateResult;
|
|
let tmp23 = applyItemSize;
|
|
let tmp24 = nextResult;
|
|
let num2 = 0;
|
|
let tmp25 = state;
|
|
let tmp26 = tmp14;
|
|
let tmp27 = mergeItemSizeUpdateResult(obj, applyItemSize(state, tmp2.itemKey, tmp2.size, tmp14));
|
|
} else {
|
|
let tmp3 = peek$;
|
|
let tmp4 = nextResult;
|
|
let _HermesInternal = HermesInternal;
|
|
}
|
|
continue;
|
|
}
|
|
flushItemSizeUpdates(state, obj);
|
|
}
|
|
function applyItemSize(state, itemKey, size, didResolveFixedItemSize) {
|
|
let averageSizes;
|
|
let data;
|
|
let didContainersLayout;
|
|
let getFixedItemSize;
|
|
let getFixedItemSize2;
|
|
let getItemType;
|
|
let getItemType2;
|
|
let horizontal;
|
|
let indexByKey2;
|
|
let maintainScrollAtEnd;
|
|
let onItemSizeChanged;
|
|
let props;
|
|
let props2;
|
|
let sizesKnown;
|
|
let sizesKnown3;
|
|
state = state.state;
|
|
const userScrollAnchorReset = state.userScrollAnchorReset;
|
|
let deleteResult;
|
|
if (null != userScrollAnchorReset) {
|
|
const keys = userScrollAnchorReset.keys;
|
|
deleteResult = keys.delete(itemKey);
|
|
}
|
|
({ didContainersLayout, sizesKnown, props } = state);
|
|
({ getFixedItemSize, getItemType, horizontal, onItemSizeChanged, maintainScrollAtEnd } = props);
|
|
if (props.data) {
|
|
const indexByKey = state.indexByKey;
|
|
let value = indexByKey.get(itemKey);
|
|
let tmp6 = didResolveFixedItemSize;
|
|
if (getFixedItemSize) {
|
|
if (undefined === value) {
|
|
let obj = { didMeasureUserScrollAnchorResetItem: null };
|
|
obj[0] = tmp2;
|
|
return obj;
|
|
} else if (undefined === state.props.data[value]) {
|
|
obj = { didMeasureUserScrollAnchorResetItem: null };
|
|
obj[0] = tmp2;
|
|
return obj;
|
|
} else {
|
|
let prop;
|
|
if (null != didResolveFixedItemSize) {
|
|
prop = didResolveFixedItemSize.didResolveFixedItemSize;
|
|
}
|
|
let tmp8 = didResolveFixedItemSize;
|
|
if (!prop) {
|
|
let itemType;
|
|
if (null != didResolveFixedItemSize) {
|
|
itemType = didResolveFixedItemSize.itemType;
|
|
}
|
|
if (null == itemType) {
|
|
let str2 = "";
|
|
if (getItemType) {
|
|
const itemType1 = getItemType(tmp66, value);
|
|
str2 = "";
|
|
if (null != itemType1) {
|
|
str2 = itemType1;
|
|
}
|
|
}
|
|
itemType = str2;
|
|
}
|
|
const obj1 = { didResolveFixedItemSize: true, fixedItemSize: null, itemType: null };
|
|
obj1[1] = getFixedItemSize(tmp66, value, itemType);
|
|
obj1[2] = itemType;
|
|
tmp8 = obj1;
|
|
}
|
|
let fixedItemSize = tmp8.fixedItemSize;
|
|
tmp6 = tmp8;
|
|
if (undefined !== fixedItemSize) {
|
|
tmp6 = tmp8;
|
|
if (fixedItemSize === sizesKnown.get(itemKey)) {
|
|
if (state.state.needsOtherAxisSize) {
|
|
const tmp61 = horizontal ? size.height : size.width;
|
|
let values = state.values;
|
|
value = values.get("otherAxisSize");
|
|
let tmp63 = !value;
|
|
if (value) {
|
|
tmp63 = tmp61 > value;
|
|
}
|
|
if (tmp63) {
|
|
set$(state, "otherAxisSize", tmp61);
|
|
}
|
|
}
|
|
const obj2 = { didMeasureUserScrollAnchorResetItem: null };
|
|
obj2[0] = tmp2;
|
|
return obj2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let flag = !didContainersLayout;
|
|
const sizesKnown2 = state.sizesKnown;
|
|
const value1 = sizesKnown2.get(itemKey);
|
|
({ indexByKey: indexByKey2, sizesKnown: sizesKnown3, averageSizes, props: props2 } = state.state);
|
|
({ data, getItemType: getItemType2, getFixedItemSize: getFixedItemSize2 } = props2);
|
|
let num2 = 0;
|
|
if (data) {
|
|
const value2 = indexByKey2.get(itemKey);
|
|
let itemType2;
|
|
if (null != tmp6) {
|
|
itemType2 = tmp6.itemType;
|
|
}
|
|
fixedItemSize = undefined;
|
|
if (null != tmp6) {
|
|
fixedItemSize = tmp6.fixedItemSize;
|
|
}
|
|
let tmp17 = getFixedItemSize2;
|
|
if (getFixedItemSize2) {
|
|
let prop1;
|
|
if (null != tmp6) {
|
|
prop1 = tmp6.didResolveFixedItemSize;
|
|
}
|
|
tmp17 = !prop1;
|
|
}
|
|
if (tmp17) {
|
|
let str4 = "";
|
|
if (getItemType2) {
|
|
const itemType21 = getItemType2(tmp14, value2);
|
|
str4 = "";
|
|
if (null != itemType21) {
|
|
str4 = itemType21;
|
|
}
|
|
}
|
|
fixedItemSize = getFixedItemSize2(tmp14, value2, str4);
|
|
itemType2 = str4;
|
|
}
|
|
let prop2;
|
|
if (null != tmp6) {
|
|
prop2 = tmp6.didResolveFixedItemSize;
|
|
}
|
|
if (!prop2) {
|
|
const tmp29 = getItemSize(state, itemKey, value2, tmp14, undefined, undefined, undefined, tmp21);
|
|
const tmp30 = tmp12 ? size.width : size.height;
|
|
const value3 = sizesKnown3.get(itemKey);
|
|
if (undefined === value3) {
|
|
const _Math2 = Math;
|
|
const result = Math.floor(8 * tmp30) / 8;
|
|
const result1 = sizesKnown3.set(itemKey, result);
|
|
if (undefined === fixedItemSize) {
|
|
if (0 < result) {
|
|
if (null == itemType2) {
|
|
let str6 = "";
|
|
if (getItemType2) {
|
|
const itemType22 = getItemType2(tmp14, value2);
|
|
str6 = "";
|
|
if (null != itemType22) {
|
|
str6 = itemType22;
|
|
}
|
|
}
|
|
itemType2 = str6;
|
|
}
|
|
let tmp39 = averageSizes[itemType2];
|
|
if (!tmp39) {
|
|
const obj3 = { avg: 0, num: 0 };
|
|
averageSizes[itemType2] = obj3;
|
|
tmp39 = obj3;
|
|
}
|
|
if (0 === tmp39.num) {
|
|
tmp39.avg = result;
|
|
tmp39.num = tmp39.num + 1;
|
|
} else {
|
|
if (tmp32) {
|
|
if (value3 > 0) {
|
|
tmp39.avg = tmp39.avg + (result - value3) / tmp39.num;
|
|
}
|
|
}
|
|
tmp39.avg = (tmp39.avg * tmp39.num + result) / (tmp39.num + 1);
|
|
tmp39.num = tmp39.num + 1;
|
|
}
|
|
}
|
|
}
|
|
if (!tmp29) {
|
|
setSize(state, itemKey, result);
|
|
num2 = result - tmp29;
|
|
} else {
|
|
const _Math3 = Math;
|
|
num2 = 0;
|
|
}
|
|
} else {
|
|
const _Math = Math;
|
|
num2 = 0;
|
|
}
|
|
}
|
|
let prop3;
|
|
if (null != tmp6) {
|
|
prop3 = tmp6.didResolveFixedItemSize;
|
|
}
|
|
const obj4 = { didResolveFixedItemSize: null, fixedItemSize: null, itemType: null };
|
|
obj4[0] = prop3;
|
|
obj4[1] = fixedItemSize;
|
|
obj4[2] = itemType2;
|
|
}
|
|
const _Math4 = Math;
|
|
const result2 = Math.floor(8 * (horizontal ? size.width : size.height)) / 8;
|
|
let flag2 = false;
|
|
let tmp44 = flag;
|
|
let tmp45;
|
|
if (0 !== num2) {
|
|
if (didContainersLayout) {
|
|
flag = value >= state.startBuffered && value <= tmp67;
|
|
const tmp46 = value >= state.startBuffered && value <= tmp67;
|
|
}
|
|
let hasItem = !flag;
|
|
if (!flag) {
|
|
const containerItemKeys = state.containerItemKeys;
|
|
hasItem = containerItemKeys.has(itemKey);
|
|
}
|
|
if (hasItem) {
|
|
flag = true;
|
|
}
|
|
let tmp48 = undefined !== value1;
|
|
if (tmp48) {
|
|
const _Math5 = Math;
|
|
tmp48 = Math.abs(value1 - result2) > 5;
|
|
}
|
|
let flag3 = false;
|
|
if (tmp48) {
|
|
flag3 = true;
|
|
}
|
|
if (null != onItemSizeChanged) {
|
|
const obj5 = { index: null, itemData: null, itemKey: null, previous: null, size: null };
|
|
obj5[0] = value;
|
|
obj5[1] = state.props.data[value];
|
|
obj5[2] = itemKey;
|
|
obj5[3] = result2 - num2;
|
|
obj5[4] = result2;
|
|
onItemSizeChanged(obj5);
|
|
}
|
|
maybeUpdateAnchoredEndSpace(state);
|
|
flag2 = flag3;
|
|
tmp44 = flag;
|
|
tmp45 = value;
|
|
}
|
|
if (undefined !== tmp45) {
|
|
let bound = tmp45;
|
|
if (undefined !== state.minIndexSizeChanged) {
|
|
const _Math6 = Math;
|
|
bound = Math.min(state.minIndexSizeChanged, tmp45);
|
|
}
|
|
state.minIndexSizeChanged = bound;
|
|
}
|
|
if (state.state.needsOtherAxisSize) {
|
|
const tmp53 = horizontal ? size.height : size.width;
|
|
values = state.values;
|
|
const value4 = values.get("otherAxisSize");
|
|
let tmp55 = !value4;
|
|
if (value4) {
|
|
tmp55 = tmp53 > value4;
|
|
}
|
|
if (tmp55) {
|
|
set$(state, "otherAxisSize", tmp53);
|
|
}
|
|
}
|
|
if (!didContainersLayout) {
|
|
if (!checkAllSizesKnown(state, state.startBuffered, state.endBuffered)) {
|
|
let obj6 = { didChange: null, didMeasureUserScrollAnchorResetItem: null };
|
|
obj6[0] = tmp58;
|
|
obj6[1] = tmp2;
|
|
}
|
|
return obj6;
|
|
}
|
|
const obj7 = { didChange: null, didMeasureUserScrollAnchorResetItem: null, needsRecalculate: null, shouldMaintainScrollAtEnd: null };
|
|
obj7[0] = 0 !== num2;
|
|
obj7[1] = tmp2;
|
|
obj7[2] = tmp44;
|
|
if (flag2) {
|
|
let onItemLayout;
|
|
if (null != maintainScrollAtEnd) {
|
|
onItemLayout = maintainScrollAtEnd.onItemLayout;
|
|
}
|
|
flag2 = onItemLayout;
|
|
}
|
|
obj7[3] = flag2;
|
|
obj6 = obj7;
|
|
} else {
|
|
obj = { didMeasureUserScrollAnchorResetItem: null };
|
|
obj[0] = tmp2;
|
|
return obj;
|
|
}
|
|
}
|
|
function measureContainersInLayoutEffect(state) {
|
|
let closure_0 = state;
|
|
let keys = arg1;
|
|
if (arg1 === undefined) {
|
|
keys = null;
|
|
}
|
|
let c1;
|
|
let c2;
|
|
let c3;
|
|
state = undefined;
|
|
let items;
|
|
let c6;
|
|
state = state.state;
|
|
items = [];
|
|
c6 = true;
|
|
if (null == keys) {
|
|
let viewRefs = state.viewRefs;
|
|
keys = viewRefs.keys();
|
|
}
|
|
function _loop3(iter) {
|
|
let state = iter;
|
|
const viewRefs = state.viewRefs;
|
|
let value = viewRefs.get(iter);
|
|
const values = state.values;
|
|
value = values.get("containerItemKey" + iter);
|
|
let c1 = value;
|
|
if (undefined !== value) {
|
|
c1 = tmp22;
|
|
let num = 0;
|
|
if (null != state.containerItemGenerations[iter]) {
|
|
num = c1;
|
|
}
|
|
const sum = num + 1;
|
|
let current = sum;
|
|
state.containerItemGenerations[iter] = sum;
|
|
state = tmp.state;
|
|
const props = state.props;
|
|
const data = props.data;
|
|
const indexByKey = state.indexByKey;
|
|
const value1 = indexByKey.get(value);
|
|
if (data) {
|
|
if (props.getFixedItemSize) {
|
|
if (undefined !== value1) {
|
|
if (undefined !== data[value1]) {
|
|
const tmp13 = outer1_29(state, iter, value1, tmp7);
|
|
let fixedItemSize;
|
|
if (null != tmp13) {
|
|
fixedItemSize = tmp13.fixedItemSize;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!state.needsOtherAxisSize) {
|
|
if (undefined !== tmp6) {
|
|
const sizesKnown = tmp21.sizesKnown;
|
|
if (sizesKnown.get(value) === tmp6 + tmp.scrollAxisGap) {
|
|
const state2 = tmp.state;
|
|
const userScrollAnchorReset = state2.userScrollAnchorReset;
|
|
let deleteResult;
|
|
if (null != userScrollAnchorReset) {
|
|
const keys = userScrollAnchorReset.keys;
|
|
deleteResult = keys.delete(value);
|
|
}
|
|
if (deleteResult) {
|
|
deleteResult = 0 === userScrollAnchorReset.keys.size;
|
|
}
|
|
if (deleteResult) {
|
|
state2.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (value) {
|
|
current = value.current;
|
|
let measure;
|
|
if (null != current) {
|
|
measure = current.measure;
|
|
}
|
|
if (null != measure) {
|
|
const call = measure.call;
|
|
const fn = (arg0, arg1, arg2, arg3) => {
|
|
let num = 0;
|
|
if (null != iter.state.containerItemGenerations[iter]) {
|
|
num = tmp3;
|
|
}
|
|
if (num === current) {
|
|
let obj = { containerId: null, itemKey: null, size: null };
|
|
obj[0] = iter;
|
|
obj[1] = closure_1;
|
|
obj = { height: null, width: null };
|
|
obj[0] = arg3;
|
|
obj[1] = arg2;
|
|
obj[2] = obj;
|
|
if (outer1_6) {
|
|
outer1_5.push(obj);
|
|
} else {
|
|
const items = [obj];
|
|
outer2_107(iter, items);
|
|
}
|
|
}
|
|
};
|
|
if (typeof call === "unknown") {
|
|
tmp18(fn);
|
|
} else {
|
|
call(tmp19, fn);
|
|
}
|
|
tmp18 = measure;
|
|
tmp19 = current;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const iter = keys[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop3Result = _loop3(iter.next());
|
|
continue;
|
|
}
|
|
c6 = false;
|
|
if (items.length > 0) {
|
|
updateItemSizesBatch(state, items);
|
|
}
|
|
}
|
|
function useValue$(totalSize, arg1) {
|
|
let closure_0 = totalSize;
|
|
let obj = arg1;
|
|
if (!arg1) {
|
|
obj = {};
|
|
}
|
|
const getValue = obj.getValue;
|
|
const context = frozen.useContext(closure_17);
|
|
function getNewValue(noop, arg1) {
|
|
|
|
}
|
|
let values = context.values;
|
|
let value = values.get(totalSize);
|
|
if (getValue) {
|
|
value = getValue(value);
|
|
}
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
const first = getNewValue(noop.useState(() => {
|
|
const value = new outer1_11.Animated.Value(num);
|
|
return value;
|
|
}), 1)[0];
|
|
const items = [first, context, totalSize];
|
|
const layoutEffect = noop.useLayoutEffect(() => {
|
|
function syncCurrentValue() {
|
|
if (typeof closure_4 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
values = values.values;
|
|
const value = values.get(syncCurrentValue);
|
|
if (closure_2) {
|
|
let tmp2Result = closure_2(value);
|
|
} else {
|
|
tmp2Result = value;
|
|
}
|
|
let num = 0;
|
|
if (null != tmp2Result) {
|
|
num = tmp2Result;
|
|
}
|
|
value.setValue(num);
|
|
}
|
|
const listeners = context.listeners;
|
|
let value = listeners.get(syncCurrentValue);
|
|
let set = value;
|
|
let obj = value;
|
|
if (!value) {
|
|
const _Set = Set;
|
|
set = new Set();
|
|
const result = listeners.set(tmp2, set);
|
|
obj = set;
|
|
}
|
|
obj.add(syncCurrentValue);
|
|
if (typeof getNewValue !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
let values = context.values;
|
|
value = values.get(tmp2);
|
|
if (getValue) {
|
|
let tmp12Result = getValue(value);
|
|
} else {
|
|
tmp12Result = value;
|
|
}
|
|
let num = 0;
|
|
if (null != tmp12Result) {
|
|
num = tmp12Result;
|
|
}
|
|
const fn = () => set.delete(closure_0);
|
|
first.setValue(num);
|
|
return fn;
|
|
}, items);
|
|
return first;
|
|
}
|
|
function useContainerItemSignals(context) {
|
|
let tmp6;
|
|
let tmp7;
|
|
let containerId;
|
|
if (null != context) {
|
|
containerId = context.containerId;
|
|
}
|
|
let num = -1;
|
|
if (null != containerId) {
|
|
num = containerId;
|
|
}
|
|
const items = ["containerItemKey" + num, "containerItemIndex" + num, "containerItemData" + num];
|
|
context = undefined;
|
|
let first;
|
|
let obj = frozen;
|
|
context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
const tmp5 = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 3);
|
|
[tmp6, tmp7] = tmp5;
|
|
obj = { hasItemInfo: context && undefined !== tmp6 && undefined !== tmp7, item: tmp5[2], itemIndex: tmp7, itemKey: tmp6 };
|
|
return obj;
|
|
}
|
|
function useIsLastItem() {
|
|
const context = noop.useContext(closure_115);
|
|
let context2 = context;
|
|
let containerId;
|
|
if (null != context) {
|
|
containerId = context.containerId;
|
|
}
|
|
let num = -1;
|
|
if (null != containerId) {
|
|
num = containerId;
|
|
}
|
|
let items = ["containerItemKey" + num];
|
|
context2 = undefined;
|
|
let get2;
|
|
const context1 = frozen.useContext(closure_17);
|
|
context2 = context1;
|
|
if (1 === items.length) {
|
|
let first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
get2 = first;
|
|
const items1 = [context1, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
get2 = _slicedToArray(context2(get2[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0];
|
|
context2 = undefined;
|
|
get2 = undefined;
|
|
context2 = obj.useContext(closure_17);
|
|
const items2 = [context2, "lastItemKeys"];
|
|
const memo1 = obj.useMemo(() => {
|
|
let items = ["lastItemKeys"];
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items2);
|
|
get2 = memo1.get;
|
|
const items3 = [
|
|
get2,
|
|
(arr) => {
|
|
let flag = context2;
|
|
if (context2) {
|
|
flag = null != get2;
|
|
}
|
|
if (flag) {
|
|
let hasItem;
|
|
if (null != arr) {
|
|
hasItem = arr.includes(get2);
|
|
}
|
|
flag = hasItem;
|
|
}
|
|
if (!flag) {
|
|
flag = false;
|
|
}
|
|
return flag;
|
|
}
|
|
];
|
|
const callback = obj.useCallback(() => {
|
|
const first = get2()[0];
|
|
let flag = context2;
|
|
if (context2) {
|
|
flag = null != get2;
|
|
}
|
|
if (flag) {
|
|
let hasItem;
|
|
if (null != first) {
|
|
hasItem = first.includes(get2);
|
|
}
|
|
flag = hasItem;
|
|
}
|
|
if (!flag) {
|
|
flag = false;
|
|
}
|
|
return flag;
|
|
}, items3);
|
|
const obj2 = context2(get2[6]);
|
|
const tmp3 = closure_17;
|
|
return context2(get2[6]).useSyncExternalStore(memo1.subscribe, callback, callback);
|
|
}
|
|
function Separator(arg0) {
|
|
let ItemSeparatorComponent;
|
|
let leadingItem;
|
|
({ ItemSeparatorComponent, leadingItem } = arg0);
|
|
let element = null;
|
|
if (!useIsLastItem()) {
|
|
const obj = { leadingItem: null };
|
|
obj[0] = leadingItem;
|
|
element = <ItemSeparatorComponent leadingItem={null} />;
|
|
}
|
|
return element;
|
|
}
|
|
function ContainerSlotBase(arg0) {
|
|
let ContainerComponent;
|
|
let ItemSeparatorComponent;
|
|
let getRenderedItem;
|
|
let horizontal;
|
|
let id;
|
|
let recycleItems;
|
|
let stickyHeaderConfig;
|
|
({ id, ContainerComponent } = arg0);
|
|
({ horizontal, recycleItems, ItemSeparatorComponent, getRenderedItem, stickyHeaderConfig } = arg0);
|
|
if (ContainerComponent === undefined) {
|
|
ContainerComponent = closure_121;
|
|
}
|
|
const items = ["containerItemKey" + id];
|
|
let context;
|
|
let first;
|
|
let obj = frozen;
|
|
context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
const first1 = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0];
|
|
let element = null;
|
|
if (undefined !== first1) {
|
|
obj = { getRenderedItem: null, horizontal: null, ItemSeparatorComponent: null, id: null, itemKey: null, recycleItems: null, stickyHeaderConfig: null };
|
|
obj[0] = getRenderedItem;
|
|
obj[1] = horizontal;
|
|
obj[2] = ItemSeparatorComponent;
|
|
obj[3] = id;
|
|
obj[4] = first1;
|
|
obj[5] = recycleItems;
|
|
obj[6] = stickyHeaderConfig;
|
|
element = <ContainerComponent getRenderedItem={null} horizontal={null} ItemSeparatorComponent={null} id={null} itemKey={null} recycleItems={null} stickyHeaderConfig={null} />;
|
|
}
|
|
return element;
|
|
}
|
|
function ScrollAdjust() {
|
|
let style = frozen;
|
|
const items = ["scrollAdjust", "scrollAdjustUserOffset"];
|
|
let context1;
|
|
let first;
|
|
const context = frozen.useContext(closure_17);
|
|
context1 = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context1, first];
|
|
const memo = style.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
const tmp5 = _slicedToArray(context1(first[6]).useSyncExternalStore(memo.subscribe, get, get), 2);
|
|
const sum = (tmp5[0] || 0) + (tmp5[1] || 0) + 10000000;
|
|
const state = context.state;
|
|
let horizontal;
|
|
if (null != state) {
|
|
horizontal = state.props.horizontal;
|
|
}
|
|
let num = 0;
|
|
if (horizontal) {
|
|
num = sum;
|
|
}
|
|
style = { height: 0, left: num, position: "absolute", top: null, width: 0 };
|
|
let num2 = 0;
|
|
if (!horizontal) {
|
|
num2 = sum;
|
|
}
|
|
style[3] = num2;
|
|
return <get ActivityIndicator.View style={style} />;
|
|
}
|
|
function doInitialAllocateContainers(state) {
|
|
let data;
|
|
let estimatedItemSize;
|
|
let getFixedItemSize;
|
|
let getItemType;
|
|
let props;
|
|
let scrollLength;
|
|
let closure_0 = state;
|
|
state = state.state;
|
|
({ scrollLength, props } = state);
|
|
({ data, getFixedItemSize, getItemType, estimatedItemSize } = props);
|
|
const drawDistance = state.state.props.drawDistance;
|
|
const initialScroll = state.state.initialScroll;
|
|
let tmp = undefined !== initialScroll;
|
|
if (tmp) {
|
|
const viewPosition = initialScroll.viewPosition;
|
|
let num2 = 0;
|
|
if (null != viewPosition) {
|
|
num2 = viewPosition;
|
|
}
|
|
tmp = num2 > 0;
|
|
}
|
|
const values = state.values;
|
|
let bound = drawDistance;
|
|
if (!values.get("readyToRender")) {
|
|
bound = drawDistance;
|
|
if (!tmp) {
|
|
const _Math = Math;
|
|
bound = Math.min(drawDistance, 50);
|
|
}
|
|
}
|
|
if (scrollLength > 0) {
|
|
if (data.length > 0) {
|
|
if (!tmp5) {
|
|
if (getFixedItemSize) {
|
|
const _Math2 = Math;
|
|
const bound1 = Math.min(20, data.length);
|
|
let num6 = 0;
|
|
let num7 = 0;
|
|
let num8 = 0;
|
|
if (0 < bound1) {
|
|
do {
|
|
let tmp10 = data[num6];
|
|
let tmp11 = num6;
|
|
let tmp12 = num7;
|
|
let sum = num7;
|
|
if (undefined !== tmp10) {
|
|
let itemType;
|
|
if (null != getItemType) {
|
|
itemType = getItemType(tmp10, num6);
|
|
}
|
|
let str2 = "";
|
|
if (null != itemType) {
|
|
str2 = itemType;
|
|
}
|
|
let fixedItemSize = getFixedItemSize(tmp10, num6, str2);
|
|
let tmp16 = estimatedItemSize;
|
|
if (null != fixedItemSize) {
|
|
tmp16 = fixedItemSize;
|
|
}
|
|
sum = num7 + (tmp16 + state.scrollAxisGap);
|
|
}
|
|
num6 = num6 + 1;
|
|
num7 = sum;
|
|
num8 = sum;
|
|
} while (num6 < bound1);
|
|
}
|
|
let result = num8 / bound1;
|
|
} else {
|
|
result = estimatedItemSize + state.scrollAxisGap;
|
|
}
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound2 = Math.max(1, Math.ceil((scrollLength + 2 * bound) / result * props.numColumns));
|
|
for (let num12 = 0; num12 < bound2; num12 = num12 + 1) {
|
|
let tmp19 = set$;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp20 = c32;
|
|
let tmp21 = set$(state, "containerPosition" + num12, c32);
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp22 = set$(state, "containerColumn" + num12, -1);
|
|
let _HermesInternal3 = HermesInternal;
|
|
let tmp23 = set$(state, "containerSpan" + num12, 1);
|
|
}
|
|
set$(state, "numContainers", bound2);
|
|
let num13 = 0;
|
|
if (data.length > 0) {
|
|
num13 = 0;
|
|
if (bound2 > 0) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
const bound3 = Math.min(Math.ceil(3 * bound2), bound2 + 64);
|
|
const _Math9 = Math;
|
|
const bound4 = Math.max(bound2, bound3, Math.min(length, 32));
|
|
const _Math10 = Math;
|
|
num13 = Math.min(Math.max(length, bound2), bound4);
|
|
}
|
|
}
|
|
set$(state, "numContainersPooled", num13);
|
|
let tmp29 = closure_27;
|
|
if (closure_27) {
|
|
tmp29 = !state.lastLayout;
|
|
}
|
|
if (!tmp29) {
|
|
if (state.initialScroll) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
let closure_1 = { dataChanged: true, doMVCP: true };
|
|
state = state.state;
|
|
outer1_97(() => {
|
|
let alwaysRenderIndicesArr;
|
|
let bottom;
|
|
let closure_4;
|
|
let dataChanged;
|
|
let doMVCP;
|
|
let enableScrollForNextCalculateItemsInView;
|
|
let endNoBuffer;
|
|
let forceFullItemPositions;
|
|
let getItemType;
|
|
let idCache;
|
|
let indexByKey;
|
|
let initialScroll;
|
|
let keyExtractor;
|
|
let minIndexSizeChanged;
|
|
let positions;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scrollForNextCalculateItemsInView;
|
|
let scrollLength;
|
|
let set2;
|
|
let sizes;
|
|
let startBufferedId;
|
|
let startNoBuffer;
|
|
let state;
|
|
let top;
|
|
let viewabilityConfigCallbackPairs;
|
|
let addResult = state;
|
|
let containerItemKeys = state.containerItemKeys;
|
|
({ enableScrollForNextCalculateItemsInView, idCache } = state);
|
|
({ indexByKey, minIndexSizeChanged, positions, props } = state);
|
|
({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props);
|
|
({ keyExtractor, onStickyHeaderChange: closure_4 } = props);
|
|
({ scrollForNextCalculateItemsInView, scrollLength } = state);
|
|
({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state);
|
|
const data = state.props.data;
|
|
let prop = state.props.stickyHeaderIndicesArr;
|
|
if (!prop) {
|
|
prop = [];
|
|
}
|
|
let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet;
|
|
if (!stickyHeaderIndicesSet) {
|
|
let _Set = Set;
|
|
stickyHeaderIndicesSet = new Set();
|
|
}
|
|
let tmp9 = outer1_46(containerItemKeys, idCache.drawDistanceMode);
|
|
({ dataChanged, doMVCP, forceFullItemPositions } = idCache);
|
|
let initialScrollSession = tmp2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp2.initialScrollSession.bootstrap;
|
|
}
|
|
let tmp16 = outer1_21(containerItemKeys, "numContainers");
|
|
if (data) {
|
|
if (0 !== scrollLength) {
|
|
if (tmp16) {
|
|
let closure_8 = outer1_25(tmp7);
|
|
let tmp15Result = tmp15(tmp7, "stylePaddingTop");
|
|
let sum = tmp15Result + tmp15(tmp7, "alignItemsAtEndPadding");
|
|
let closure_9 = sum + tmp15(tmp7, "headerSize");
|
|
tmp15Result = tmp15(tmp7, "numColumns");
|
|
let scrollVelocity = idCache.scrollVelocity;
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = outer1_69(tmp2);
|
|
}
|
|
({ initialScroll, queuedInitialLayout } = tmp2);
|
|
if (!tmp13) {
|
|
let scroll;
|
|
if (null != bootstrap) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = tmp2.scroll;
|
|
}
|
|
} else {
|
|
if (!queuedInitialLayout) {
|
|
if (outer1_41(tmp2)) {
|
|
if (initialScroll) {
|
|
scroll = outer1_75(tmp7, initialScroll);
|
|
}
|
|
}
|
|
}
|
|
scroll = tmp2.scroll;
|
|
}
|
|
let c10 = 0;
|
|
let c11 = 0;
|
|
let c12 = 0;
|
|
let c13 = 0;
|
|
let c14 = 0;
|
|
let c15 = 0;
|
|
function updateScroll2(scroll) {
|
|
let closure_16 = scroll;
|
|
const values = containerItemKeys.values;
|
|
const value = values.get("scrollAdjustPending");
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
let closure_11 = num - closure_9;
|
|
const rounded = Math.round(scroll + closure_11);
|
|
let closure_12 = rounded;
|
|
if (rounded + scrollLength > closure_8) {
|
|
const _Math = Math;
|
|
closure_12 = Math.max(0, tmp4 - tmp3);
|
|
}
|
|
}
|
|
updateScroll2(scroll);
|
|
const tmp15Result1 = tmp15(tmp7, "activeStickyIndex");
|
|
let closure_17 = tmp15Result1;
|
|
function resolveStickyState() {
|
|
let num = -1;
|
|
let num2 = -1;
|
|
if (prop.length > 0) {
|
|
let diff = arr.length - 1;
|
|
let tmp5 = num;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp6 = tmp3[arr[diff]];
|
|
let tmp7 = diff;
|
|
if (undefined === tmp6) {
|
|
diff = diff - 1;
|
|
tmp5 = num;
|
|
if (0 > diff) {
|
|
break;
|
|
}
|
|
} else {
|
|
tmp5 = diff;
|
|
if (tmp >= tmp6) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
num2 = tmp5;
|
|
}
|
|
if (0 <= num2) {
|
|
num = arr[num2];
|
|
}
|
|
let tmp8 = num2 >= 0;
|
|
if (0 > num2) {
|
|
tmp8 = tmp9 >= 0;
|
|
}
|
|
if (tmp8) {
|
|
outer2_22(containerItemKeys, "activeStickyIndex", num);
|
|
}
|
|
let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null };
|
|
let fn;
|
|
if (closure_4) {
|
|
if (arr.length > 0) {
|
|
if (tmp9 !== num) {
|
|
fn = () => {
|
|
if (undefined !== outer1_6[num]) {
|
|
if (null != outer1_4) {
|
|
const obj = { index: null, item: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp2;
|
|
tmp3(obj);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
obj[1] = fn;
|
|
return obj;
|
|
}
|
|
if (!dataChanged) {
|
|
let stickyState = resolveStickyState();
|
|
}
|
|
let result2 = tmp9;
|
|
let result3 = tmp9;
|
|
if (scrollVelocity > 0) {
|
|
let result = 0.5 * tmp9;
|
|
result2 = result;
|
|
const result1 = 1.5 * tmp9;
|
|
result3 = result1;
|
|
result3 = result1;
|
|
result2 = result;
|
|
} else {
|
|
if (0 === scrollVelocity) {
|
|
let _Math = Math;
|
|
}
|
|
result2 = 1.5 * tmp9;
|
|
result3 = 0.5 * tmp9;
|
|
}
|
|
let num6 = 0;
|
|
if (!dataChanged) {
|
|
num6 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num6 = 0;
|
|
if (!tmp25) {
|
|
num6 = 0;
|
|
if (!outer1_41(tmp2)) {
|
|
num6 = 0;
|
|
if (!tmp2.scrollingTo) {
|
|
num6 = 0;
|
|
if (!tmp2.pendingNativeMVCPAdjust) {
|
|
num6 = 0;
|
|
if (tmp15(tmp7, "readyToRender")) {
|
|
let _Math2 = Math;
|
|
num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) {
|
|
if (arg1 <= 0) {
|
|
return 0;
|
|
} else {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const bound = Math.min(1, Math.abs(scrollVelocity) / 4);
|
|
return Math.sign(scrollVelocity) * arg1 * bound;
|
|
}
|
|
})(scrollVelocity, Math.min(result2, result3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateScrollRange() {
|
|
const bound = Math.max(0, c12);
|
|
let closure_14 = Math.max(bound, c12 + scrollLength + Math.max(0, -scroll));
|
|
let closure_13 = bound - result2 + num6;
|
|
let closure_15 = closure_14 + result3 + num6;
|
|
}
|
|
updateScrollRange();
|
|
if (0 !== num6) {
|
|
(function scheduleRenderRangeProjectionSettle(state) {
|
|
state = state.state;
|
|
const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle;
|
|
if (undefined !== timeoutRenderRangeProjectionSettle) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutRenderRangeProjectionSettle);
|
|
let timeouts = state.timeouts;
|
|
timeouts.delete(timeoutRenderRangeProjectionSettle);
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
state.timeoutRenderRangeProjectionSettle = undefined;
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.scrollHistory.length = 0;
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}, 100);
|
|
state.timeoutRenderRangeProjectionSettle = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
})(tmp7);
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
if (!tmp25) {
|
|
if (!dataChanged) {
|
|
if (!forceFullItemPositions) {
|
|
if (scrollForNextCalculateItemsInView) {
|
|
({ top, bottom } = scrollForNextCalculateItemsInView);
|
|
if (null === top) {
|
|
if (null === bottom) {
|
|
tmp2.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}
|
|
if (null === top) {
|
|
if (viewabilityConfigCallbackPairs) {
|
|
(function updateViewabilityForCachedRange(state, viewabilityConfigCallbackPairs, scrollLength, c12, c14) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let tmp7 = null;
|
|
let sum1;
|
|
let tmp9 = null;
|
|
if (startBuffered <= endBuffered) {
|
|
let tmp3 = null;
|
|
let tmp5 = null;
|
|
let tmp6 = startBuffered;
|
|
tmp7 = null;
|
|
tmp9 = null;
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp10 = tmp[tmp6];
|
|
let tmp11 = tmp3;
|
|
let tmp12 = tmp4;
|
|
let tmp13 = tmp5;
|
|
let tmp14 = tmp6;
|
|
if (null == tmp10) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data) {
|
|
let tmp15 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp15 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp15;
|
|
str2 = tmp15;
|
|
}
|
|
tmp10 = str2;
|
|
}
|
|
let value = sizes.get(tmp10);
|
|
if (null == value) {
|
|
let tmp19 = callback4;
|
|
let num2 = 0;
|
|
let tmp20 = state;
|
|
let tmp21 = tmp10;
|
|
let tmp22 = tmp6;
|
|
value = callback4(state, tmp18, tmp14, data[tmp6]);
|
|
}
|
|
let tmp23 = tmp2[tmp6];
|
|
let tmp24 = null === tmp11 && tmp23 + value > c12;
|
|
if (tmp24) {
|
|
tmp11 = tmp6;
|
|
}
|
|
let tmp25 = undefined === tmp12 && tmp23 >= c12 - 10 && tmp23 <= c14;
|
|
if (tmp25) {
|
|
tmp12 = tmp6;
|
|
}
|
|
let tmp26 = tmp13;
|
|
let flag = false;
|
|
if (null !== tmp11) {
|
|
let flag2 = true;
|
|
if (tmp23 <= c14) {
|
|
tmp13 = tmp6;
|
|
flag2 = false;
|
|
}
|
|
tmp26 = tmp13;
|
|
flag = flag2;
|
|
}
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (flag) {
|
|
break;
|
|
} else {
|
|
let sum = tmp6 + 1;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (sum > endBuffered) {
|
|
break;
|
|
} else {
|
|
tmp3 = tmp11;
|
|
tmp4 = tmp12;
|
|
tmp5 = tmp26;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
tmp6 = sum;
|
|
if (sum >= data.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj = { endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startNoBuffer: null };
|
|
obj[0] = tmp9;
|
|
obj[1] = sum1;
|
|
if (null == sum1) {
|
|
sum1 = tmp7;
|
|
}
|
|
const items = [];
|
|
if (null != sum1) {
|
|
if (null !== tmp9) {
|
|
if (sum1 <= tmp9) {
|
|
do {
|
|
let tmp29 = state.idCache[sum1];
|
|
let tmp30 = sum1;
|
|
if (null == tmp29) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp29 = str4;
|
|
}
|
|
let arr = items.push(tmp29);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 <= tmp9);
|
|
}
|
|
}
|
|
}
|
|
obj[2] = items;
|
|
obj[3] = tmp7;
|
|
const merged = Object.assign(state, obj);
|
|
callback9(state, tmp7);
|
|
if (tmp37) {
|
|
callback7(state, state, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered);
|
|
}
|
|
tmp37 = null !== tmp7 && null !== tmp9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})(tmp7, viewabilityConfigCallbackPairs, scrollLength, c12, c14);
|
|
} else if (tmp2.props.onFirstVisibleItemChanged) {
|
|
outer1_102(tmp2, (function findFirstVisibleIndexInCachedRange(state, c12) {
|
|
let data;
|
|
let keyExtractor;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
if (startBuffered <= endBuffered) {
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp3 = tmp[startBuffered];
|
|
let tmp4 = startBuffered;
|
|
if (null == tmp3) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp5 = null;
|
|
if (startBuffered < data.length) {
|
|
let keyExtractorResult = startBuffered;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startBuffered], startBuffered);
|
|
}
|
|
tmp5 = keyExtractorResult;
|
|
}
|
|
state.idCache[startBuffered] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
let value = sizes.get(tmp3);
|
|
let tmp9 = value;
|
|
if (null == value) {
|
|
let tmp10 = callback4;
|
|
let num = 0;
|
|
let tmp11 = state;
|
|
let tmp12 = tmp3;
|
|
let tmp13 = startBuffered;
|
|
tmp9 = callback4(state, tmp8, tmp4, data[startBuffered]);
|
|
}
|
|
if (tmp2[startBuffered] + tmp9 > c12) {
|
|
break;
|
|
} else {
|
|
let sum = startBuffered + 1;
|
|
if (sum <= endBuffered) {
|
|
startBuffered = sum;
|
|
}
|
|
}
|
|
}
|
|
return startBuffered;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
})(tmp7, c12));
|
|
}
|
|
let prop1;
|
|
if (null != stickyState) {
|
|
prop1 = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != prop1) {
|
|
let call = prop1.call;
|
|
typeof call === "unknown" ? prop1() : call(stickyState);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp73;
|
|
if (doMVCP) {
|
|
if (!tmp25) {
|
|
tmp73 = outer1_68(tmp7, dataChanged);
|
|
}
|
|
}
|
|
if (dataChanged) {
|
|
outer1_86(tmp2);
|
|
}
|
|
let num8 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num8 = 0;
|
|
if (!dataChanged) {
|
|
let startBuffered = minIndexSizeChanged;
|
|
if (null == minIndexSizeChanged) {
|
|
startBuffered = tmp2.startBuffered;
|
|
}
|
|
let num9 = 0;
|
|
if (null != startBuffered) {
|
|
num9 = startBuffered;
|
|
}
|
|
num8 = num9;
|
|
}
|
|
}
|
|
let obj = { doMVCP: null, forceFullUpdate: null, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null };
|
|
obj[0] = doMVCP;
|
|
obj[1] = forceFullItemPositions;
|
|
let tmp82 = !forceFullItemPositions;
|
|
if (!forceFullItemPositions) {
|
|
tmp82 = !dataChanged;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = tmp15Result > 1;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = undefined !== minIndexSizeChanged;
|
|
}
|
|
obj[2] = tmp82;
|
|
obj[3] = c15;
|
|
obj[4] = scrollVelocity;
|
|
obj[5] = num8;
|
|
outer1_89(tmp7, dataChanged, obj);
|
|
const tmp17Result = outer1_25(tmp7);
|
|
closure_8 = tmp17Result;
|
|
if (undefined !== minIndexSizeChanged) {
|
|
tmp2.minIndexSizeChanged = undefined;
|
|
}
|
|
if (dataChanged) {
|
|
if (doMVCP) {
|
|
if (tmp2.props.maintainVisibleContentPosition.data) {
|
|
if (tmp2.didContainersLayout) {
|
|
if (tmp2.idsInView.length > 0) {
|
|
const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition;
|
|
const _Set2 = Set;
|
|
let set = new Set();
|
|
const idsInView = tmp2.idsInView;
|
|
for (const item10226 of idsInView) {
|
|
let tmp99 = item10226;
|
|
addResult = indexByKey.get(item10226);
|
|
if (undefined !== addResult) {
|
|
addResult = shouldRestorePosition;
|
|
if (shouldRestorePosition) {
|
|
addResult = !shouldRestorePosition(data[addResult], addResult, data);
|
|
}
|
|
if (!addResult) {
|
|
addResult = item10226;
|
|
addResult = set.add(tmp99);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_21(containerItemKeys, "scrollAdjustPending");
|
|
let num11 = 0;
|
|
if (null != addResult) {
|
|
num11 = addResult;
|
|
}
|
|
if (null != tmp73) {
|
|
addResult = tmp73();
|
|
}
|
|
addResult = tmp73;
|
|
if (addResult) {
|
|
addResult = addResult.scroll !== state.scroll;
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, "scrollAdjustPending");
|
|
let num12 = 0;
|
|
if (null != addResult) {
|
|
num12 = addResult;
|
|
}
|
|
addResult = num12 !== num11;
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = updateScroll2(addResult.scroll);
|
|
addResult = updateScrollRange();
|
|
}
|
|
if (dataChanged) {
|
|
stickyState = resolveStickyState();
|
|
}
|
|
addResult = undefined;
|
|
if (!tmp13) {
|
|
addResult = undefined;
|
|
if (null != bootstrap) {
|
|
addResult = bootstrap.targetIndexSeed;
|
|
}
|
|
}
|
|
if (null == addResult) {
|
|
let num13 = !dataChanged;
|
|
if (!dataChanged) {
|
|
num13 = startBufferedId;
|
|
}
|
|
if (num13) {
|
|
num13 = indexByKey.get(startBufferedId);
|
|
}
|
|
if (!num13) {
|
|
num13 = 0;
|
|
}
|
|
addResult = num13;
|
|
}
|
|
if (addResult >= 0) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num14 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = c13;
|
|
if (positions[addResult] + addResult <= c13) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (addResult < 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp15Result > 1) {
|
|
if (addResult > 0) {
|
|
addResult = state.columns[addResult];
|
|
while (1 !== addResult) {
|
|
if (undefined === addResult) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (0 >= addResult) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = globalThis;
|
|
let num16 = 0;
|
|
let num17 = 0;
|
|
let num18 = 0;
|
|
if (0 < tmp16) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num16);
|
|
addResult = num16;
|
|
addResult = num17;
|
|
addResult = num17;
|
|
if (undefined !== addResult) {
|
|
let _Math3 = Math;
|
|
addResult = Math.max(num17, indexByKey.get(addResult));
|
|
}
|
|
num16 = num16 + 1;
|
|
num17 = addResult;
|
|
num18 = addResult;
|
|
} while (num16 < tmp16);
|
|
}
|
|
obj = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: true };
|
|
const length = data.length;
|
|
let _Math4 = Math;
|
|
addResult = Math.max(0, addResult);
|
|
let flag3 = false;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
if (addResult < length) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
addResult = flag3;
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num19 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = positions[addResult];
|
|
addResult = flag3;
|
|
if (!flag3) {
|
|
addResult = outer1_100;
|
|
addResult = c12;
|
|
addResult = c14;
|
|
let num20 = 0;
|
|
addResult = obj;
|
|
addResult = outer1_100(obj, addResult, addResult, addResult, c12, c14);
|
|
addResult = null === addResult;
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = addResult + addResult > c13;
|
|
}
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = null;
|
|
}
|
|
addResult = flag3;
|
|
if (null !== obj.startNoBuffer) {
|
|
addResult = c15;
|
|
let flag4 = true;
|
|
if (addResult <= c15) {
|
|
addResult = c15;
|
|
addResult = null;
|
|
if (c15 <= tmp17Result) {
|
|
addResult = addResult + addResult;
|
|
}
|
|
flag4 = flag3;
|
|
}
|
|
addResult = flag4;
|
|
}
|
|
}
|
|
addResult = addResult + 1;
|
|
if (addResult >= length) {
|
|
break;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (!addResult) {
|
|
continue;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (addResult > num18) {
|
|
break;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
const _Object = Object;
|
|
let obj1 = { endBuffered: null, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null };
|
|
obj1[0] = addResult;
|
|
({ endNoBuffer: obj5[1], firstFullyOnScreenIndex: obj5[2] } = obj);
|
|
addResult = outer1_101;
|
|
addResult = state;
|
|
addResult = state;
|
|
obj1[3] = outer1_101(state, obj);
|
|
obj1[4] = addResult;
|
|
obj1[5] = addResult;
|
|
obj1[6] = obj.startNoBuffer;
|
|
addResult = Object.assign(state, obj1);
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
addResult = outer1_54;
|
|
if (!outer1_54(addResult)) {
|
|
let obj2 = { bottom: null, top: null };
|
|
obj2[0] = addResult;
|
|
obj2[1] = addResult;
|
|
addResult = obj2;
|
|
}
|
|
addResult.scrollForNextCalculateItemsInView = addResult;
|
|
}
|
|
addResult = tmp16;
|
|
let items = [];
|
|
if (dataChanged) {
|
|
for (let num21 = 0; num21 < addResult; num21 = num21 + 1) {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal2 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num21);
|
|
addResult = !keyExtractor;
|
|
addResult = num21;
|
|
if (keyExtractor) {
|
|
if (addResult) {
|
|
addResult = undefined === indexByKey.get(addResult);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = items.push(num21);
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const scrollTargetPinnedRange = state.scrollTargetPinnedRange;
|
|
let c22 = 0;
|
|
let c23 = -1;
|
|
let num23 = -1;
|
|
let num24 = 0;
|
|
if (scrollTargetPinnedRange) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
addResult = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c22 = addResult;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
addResult = length - 1;
|
|
addResult = Math.min(addResult, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c23 = addResult;
|
|
num23 = addResult;
|
|
num24 = addResult;
|
|
}
|
|
addResult = num24 <= num23;
|
|
let closure_24 = addResult;
|
|
function isPinnedRenderIndex(addResult) {
|
|
let hasItem = set.has(addResult);
|
|
if (!hasItem) {
|
|
let tmp2 = closure_24;
|
|
if (closure_24) {
|
|
tmp2 = addResult >= c22;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = addResult <= c23;
|
|
}
|
|
hasItem = tmp2;
|
|
}
|
|
return hasItem;
|
|
}
|
|
if (null !== addResult) {
|
|
if (null !== addResult) {
|
|
let items1 = [];
|
|
const _Set6 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
const set1 = new Set();
|
|
function addPinnedIndex(item10471) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (item10471 >= 0) {
|
|
if (item10471 < length) {
|
|
let tmp4 = idCache[item10471];
|
|
if (null == tmp4) {
|
|
({ data, keyExtractor } = outer1_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (item10471 < data.length) {
|
|
let keyExtractorResult = item10471;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[item10471], item10471);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[item10471] = tmp2;
|
|
str = tmp2;
|
|
}
|
|
tmp4 = str;
|
|
}
|
|
const value = containerItemKeys.get(tmp4);
|
|
if (undefined !== value) {
|
|
const stickyContainerPool = outer1_2.stickyContainerPool;
|
|
stickyContainerPool.add(value);
|
|
} else {
|
|
let hasItem = null == tmp4;
|
|
if (!hasItem) {
|
|
hasItem = set1.has(item10471);
|
|
}
|
|
if (!hasItem) {
|
|
set1.add(item10471);
|
|
items1.push(item10471);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = set1;
|
|
if (addResult <= addResult) {
|
|
do {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
if (!containerItemKeys.has(addResult)) {
|
|
addResult = set1.add(addResult);
|
|
addResult = items1.push(addResult);
|
|
}
|
|
addResult = addResult + 1;
|
|
} while (addResult <= addResult);
|
|
}
|
|
addResult = alwaysRenderIndicesArr;
|
|
addResult = alwaysRenderIndicesArr;
|
|
for (const item10471 of alwaysRenderIndicesArr) {
|
|
addResult = addPinnedIndex(item10471);
|
|
continue;
|
|
}
|
|
if (addResult) {
|
|
if (num24 <= num23) {
|
|
do {
|
|
addResult = addPinnedIndex(num24);
|
|
num24 = num24 + 1;
|
|
} while (num24 <= num23);
|
|
}
|
|
}
|
|
if (prop.length > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num25 = -1;
|
|
if (null != addResult) {
|
|
num25 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = num25;
|
|
addResult = items1;
|
|
addResult = set1;
|
|
addResult = (function handleStickyActivation(addResult, prop, arg2, items1, addResult2, addResult3, addResult4) {
|
|
let data;
|
|
let keyExtractor;
|
|
const state = addResult.state;
|
|
let num = -1;
|
|
if (arg2 >= 0) {
|
|
num = prop[arg2];
|
|
}
|
|
c22(addResult, "activeStickyIndex", num);
|
|
let num2 = 0;
|
|
do {
|
|
let diff = arg2 - num2;
|
|
let tmp4 = num2;
|
|
if (diff >= 0) {
|
|
let tmp12 = prop[diff];
|
|
let tmp13 = callback8;
|
|
if (!callback8(addResult, tmp12)) {
|
|
let tmp5 = state.idCache[tmp12];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (tmp12 < data.length) {
|
|
let keyExtractorResult = tmp12;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp12], tmp12);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp12] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let tmp8 = tmp5;
|
|
if (tmp5) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
tmp8 = !containerItemKeys.has(tmp5);
|
|
}
|
|
if (tmp8) {
|
|
let tmp9 = tmp12 < addResult3 || tmp12 > addResult4;
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = !addResult2.has(tmp12);
|
|
}
|
|
if (tmp8) {
|
|
addResult = addResult2.add(tmp12);
|
|
let arr = items1.push(tmp12);
|
|
}
|
|
}
|
|
}
|
|
num2 = num2 + 1;
|
|
} while (num2 <= 1);
|
|
})(addResult, prop, num25, items1, addResult, addResult, addResult);
|
|
} else if (-1 !== tmp15Result1) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "activeStickyIndex", -1);
|
|
}
|
|
if (items1.length > 0) {
|
|
let fn;
|
|
if (getItemType) {
|
|
fn = (arg0) => {
|
|
const tmp = getItemType(data[arg0], arg0);
|
|
let str = "";
|
|
if (undefined !== tmp) {
|
|
const _String = String;
|
|
str = String(tmp);
|
|
}
|
|
return str;
|
|
};
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = items1;
|
|
addResult = items;
|
|
addResult = fn;
|
|
addResult = tmp88;
|
|
addResult = (function findAvailableContainers(containerItemKeys, items1, addResult, addResult2, items, fn, has) {
|
|
let closure_2;
|
|
let stickyContainerPool;
|
|
let closure_0 = fn;
|
|
if (0 === items1.length) {
|
|
return [];
|
|
} else {
|
|
const tmp56 = length(containerItemKeys, "numContainers");
|
|
const state = containerItemKeys.state;
|
|
({ containerItemMetadata: closure_2, stickyContainerPool } = state);
|
|
let set;
|
|
if (items.length > 0) {
|
|
const _Set = Set;
|
|
set = new Set(items);
|
|
}
|
|
const mapped = items1.map((itemIndex) => {
|
|
const obj = { isSticky: stickyHeaderIndicesSet.has(itemIndex), itemIndex, itemType: null, order: null };
|
|
stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet;
|
|
let tmp;
|
|
if (null != callback) {
|
|
tmp = callback(itemIndex);
|
|
}
|
|
obj[2] = tmp;
|
|
obj[3] = arg1;
|
|
return obj;
|
|
});
|
|
const found = mapped.filter((isSticky) => !isSticky.isSticky);
|
|
items = [];
|
|
items1 = [];
|
|
let num2 = 0;
|
|
const found1 = mapped.filter((isSticky) => isSticky.isSticky);
|
|
if (0 < tmp56) {
|
|
while (true) {
|
|
let tmp12 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp13 = length(containerItemKeys, "containerItemKey" + num2);
|
|
let tmp14 = num2;
|
|
let hasItem;
|
|
if (null != set) {
|
|
hasItem = set.has(num2);
|
|
}
|
|
let tmp16 = !hasItem;
|
|
if (tmp13) {
|
|
let hasItem1;
|
|
if (null != has) {
|
|
hasItem1 = has.has(tmp13);
|
|
}
|
|
if (hasItem1) {
|
|
let indexByKey = state.indexByKey;
|
|
}
|
|
num2 = num2 + 1;
|
|
if (num2 >= tmp56) {
|
|
break;
|
|
}
|
|
}
|
|
let tmp18 = !tmp16;
|
|
if (stickyContainerPool.has(num2)) {
|
|
let tmp22 = undefined === tmp13 || tmp18;
|
|
if (tmp22) {
|
|
let obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number2 = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr = items1.push(obj);
|
|
}
|
|
} else {
|
|
if (undefined !== tmp13) {
|
|
if (!tmp18) {
|
|
if (!tmp) {
|
|
let indexByKey2 = state.indexByKey;
|
|
let value = indexByKey2.get(tmp13);
|
|
if (undefined !== value) {
|
|
if (value < addResult) {
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
obj[1] = value < addResult ? addResult - value : value - addResult2;
|
|
arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr1 = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
const sorted = items.sort(closure_98);
|
|
const _Array = Array;
|
|
const array = new Array(length);
|
|
let sum = tmp56;
|
|
let c5 = false;
|
|
function assign(itemIndex, containerIndex) {
|
|
array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType };
|
|
let deleteResult;
|
|
if (null != set) {
|
|
deleteResult = set.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
let c5 = true;
|
|
}
|
|
}
|
|
function assignMatching(found, items, arg2) {
|
|
let closure_0 = items;
|
|
let closure_1 = arg2;
|
|
function _loop2() { ... }
|
|
const iter = found[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop2Result = _loop2(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function assignFromPool(found, items, arg2) {
|
|
if (closure_0) {
|
|
assignMatching(found, items, /* F118898 */ function() { ... });
|
|
}
|
|
assignMatching(found, items, /* F118899 */ function() { ... });
|
|
if (arg2) {
|
|
assignMatching(found, items, /* F118900 */ function() { ... });
|
|
}
|
|
}
|
|
assignFromPool(found, items, true);
|
|
assignFromPool(found1, items1, false);
|
|
for (const item10099 of mapped) {
|
|
let tmp36 = item10099;
|
|
if (!array[item10099.order]) {
|
|
let tmp37 = sum;
|
|
let tmp38 = +sum;
|
|
sum = tmp38 + 1;
|
|
let tmp39 = tmp38;
|
|
let tmp40 = item10099;
|
|
if (tmp36.isSticky) {
|
|
let tmp41 = tmp38;
|
|
addResult = stickyContainerPool.add(tmp39);
|
|
}
|
|
let tmp43 = item10099;
|
|
let tmp44 = tmp38;
|
|
let obj1 = assign(tmp36, tmp39);
|
|
}
|
|
continue;
|
|
}
|
|
if (c5) {
|
|
items.length = 0;
|
|
if (set) {
|
|
for (const item10120 of set) {
|
|
let arr2 = arg4.push(item10120);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if (closure_31) {
|
|
let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled");
|
|
if (null == POSITIVE_INFINITY) {
|
|
const _Number3 = Number;
|
|
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
}
|
|
if (sum > POSITIVE_INFINITY) {
|
|
const _console = console;
|
|
let obj2 = { debugInfo: null };
|
|
const obj3 = { numContainers: null, numContainersPooled: null, numNeeded: null, stillNeeded: null };
|
|
obj3[0] = tmp56;
|
|
obj3[1] = POSITIVE_INFINITY;
|
|
obj3[2] = length;
|
|
obj3[3] = sum - tmp56;
|
|
obj2[0] = obj3;
|
|
console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj2);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
})(containerItemKeys, items1, addResult, addResult, items, fn, tmp88);
|
|
let iter = addResult[Symbol.iterator]();
|
|
addResult = iter.next();
|
|
addResult = iter;
|
|
while (iter !== undefined) {
|
|
let itemIndex = addResult.itemIndex;
|
|
addResult = itemIndex;
|
|
let containerIndex = addResult.containerIndex;
|
|
addResult = idCache[itemIndex];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = itemIndex;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerIndex;
|
|
let _HermesInternal3 = HermesInternal;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + containerIndex);
|
|
if (addResult) {
|
|
addResult = addResult !== addResult;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
}
|
|
if (addResult !== addResult) {
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set3 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = containerIndex;
|
|
addResult = set2.add(containerIndex);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[containerIndex];
|
|
let num28 = 0;
|
|
if (null != addResult) {
|
|
num28 = addResult;
|
|
}
|
|
state.containerItemGenerations[containerIndex] = num28 + 1;
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerIndex;
|
|
let _HermesInternal4 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + containerIndex, addResult);
|
|
let _HermesInternal5 = HermesInternal;
|
|
addResult = itemIndex;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + containerIndex, addResult);
|
|
let _HermesInternal6 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + containerIndex, data[addResult]);
|
|
addResult = state;
|
|
addResult = state;
|
|
let containerItemMetadata = state.containerItemMetadata;
|
|
addResult = outer1_28;
|
|
let num29 = 0;
|
|
addResult = state;
|
|
addResult = containerItemMetadata.set(containerIndex, outer1_28(state, itemIndex, data[addResult], addResult.itemType));
|
|
addResult = containerItemKeys.set(addResult, containerIndex);
|
|
let userScrollAnchorReset = state.userScrollAnchorReset;
|
|
if (null != userScrollAnchorReset) {
|
|
addResult = userScrollAnchorReset;
|
|
let keys = addResult.keys;
|
|
addResult = keys.add(addResult);
|
|
}
|
|
addResult = containerIndex;
|
|
let _HermesInternal7 = HermesInternal;
|
|
addResult = "containerSticky" + containerIndex;
|
|
addResult = itemIndex;
|
|
addResult = stickyHeaderIndicesSet.has(addResult);
|
|
addResult = isPinnedRenderIndex(addResult);
|
|
if (addResult) {
|
|
addResult = addResult(addResult, addResult, true);
|
|
let stickyContainerPool2 = addResult.stickyContainerPool;
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool2.add(containerIndex);
|
|
} else {
|
|
if (addResult(addResult, addResult)) {
|
|
addResult = addResult(addResult, addResult, false);
|
|
}
|
|
let stickyContainerPool = addResult.stickyContainerPool;
|
|
if (addResult) {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.add(containerIndex);
|
|
} else {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.delete(containerIndex);
|
|
}
|
|
}
|
|
addResult = containerIndex;
|
|
if (containerIndex >= addResult) {
|
|
addResult = containerIndex;
|
|
addResult = containerIndex + 1;
|
|
}
|
|
continue;
|
|
}
|
|
if (addResult !== tmp16) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "numContainers", addResult);
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
if (addResult > outer1_21(containerItemKeys, "numContainersPooled")) {
|
|
addResult = addResult(addResult, "numContainersPooled", (function getExpandedContainerPoolSize(length, addResult) {
|
|
let num = 0;
|
|
if (length > 0) {
|
|
num = 0;
|
|
if (addResult > 0) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound = Math.max(length, addResult);
|
|
num = Math.min(bound, Math.max(addResult, Math.ceil(1.5 * addResult)));
|
|
}
|
|
}
|
|
return num;
|
|
})(length, addResult));
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const userScrollAnchorReset2 = state.userScrollAnchorReset;
|
|
addResult = undefined;
|
|
if (null != userScrollAnchorReset2) {
|
|
addResult = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === addResult) {
|
|
addResult.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
if (addResult.stickyContainerPool.size > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = c12;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num30 = -1;
|
|
if (null != addResult) {
|
|
num30 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = tmp9;
|
|
addResult = num30;
|
|
addResult = items;
|
|
addResult = isPinnedRenderIndex;
|
|
addResult = (function handleStickyRecycling(addResult, prop, addResult2, arg3, arg4, items, isPinnedRenderIndex) {
|
|
const state = addResult.state;
|
|
const iter = state.stickyContainerPool[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
let tmp3 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp4 = length(addResult, "containerItemKey" + nextResult);
|
|
let value;
|
|
if (tmp4) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp7 = tmp4;
|
|
value = indexByKey.get(tmp5);
|
|
}
|
|
let tmp8 = value;
|
|
if (undefined !== value) {
|
|
let tmp52 = value;
|
|
if (!isPinnedRenderIndex(tmp8)) {
|
|
let tmp9 = value;
|
|
let index = prop.indexOf(tmp8);
|
|
let tmp11 = index;
|
|
if (-1 !== index) {
|
|
let tmp16 = index;
|
|
if (tmp11 < arg4 - 1) {
|
|
let tmp18 = index;
|
|
let tmp19 = prop[tmp11 + 1];
|
|
let flag = false;
|
|
if (tmp19) {
|
|
let tmp44 = tmp19;
|
|
let tmp45 = state.positions[tmp20];
|
|
let tmp47 = undefined !== tmp45;
|
|
if (tmp47) {
|
|
let tmp48 = tmp45;
|
|
tmp47 = addResult2 > tmp46 + 2 * arg3;
|
|
}
|
|
flag = tmp47;
|
|
} else {
|
|
let tmp21 = value;
|
|
let tmp22 = state.idCache[tmp8];
|
|
let tmp23 = tmp22;
|
|
if (null != tmp22) {
|
|
let tmp26 = tmp22;
|
|
} else {
|
|
let tmp24 = callback3;
|
|
let tmp25 = value;
|
|
tmp26 = callback3(state, tmp8);
|
|
}
|
|
let tmp27 = tmp26;
|
|
if (tmp26) {
|
|
let tmp28 = value;
|
|
let tmp29 = state.positions[tmp8];
|
|
let sizes = state.sizes;
|
|
let tmp30 = tmp26;
|
|
value = sizes.get(tmp27);
|
|
let tmp32 = value;
|
|
if (null != value) {
|
|
let tmp38 = value;
|
|
} else {
|
|
let tmp33 = callback4;
|
|
let tmp34 = tmp26;
|
|
let tmp35 = value;
|
|
let num = 0;
|
|
let tmp36 = addResult;
|
|
let tmp37 = tmp8;
|
|
tmp38 = callback4(addResult, tmp27, value, state.props.data[tmp8]);
|
|
}
|
|
let tmp40 = tmp29;
|
|
let tmp41 = undefined !== tmp29;
|
|
if (tmp41) {
|
|
let tmp42 = tmp29;
|
|
let tmp43 = tmp38;
|
|
tmp41 = addResult2 > tmp29 + tmp39 + 3 * arg3;
|
|
}
|
|
flag = tmp41;
|
|
}
|
|
}
|
|
let tmp49 = flag;
|
|
if (flag) {
|
|
let tmp50 = nextResult;
|
|
let arr = items.push(tmp2);
|
|
}
|
|
} else {
|
|
let tmp17 = index;
|
|
}
|
|
} else {
|
|
let stickyContainerPool = state.stickyContainerPool;
|
|
let tmp12 = nextResult;
|
|
let deleteResult = stickyContainerPool.delete(tmp2);
|
|
let tmp14 = v0;
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp15 = v0(addResult, "containerSticky" + tmp2, false);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
})(addResult, prop, addResult, tmp9, num30, items, isPinnedRenderIndex);
|
|
}
|
|
if (items.length > 0) {
|
|
const _Set4 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
addResult = items;
|
|
const set3 = new Set(items);
|
|
}
|
|
let num32 = 0;
|
|
let flag5 = false;
|
|
if (0 < addResult) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal8 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num32);
|
|
addResult = flag5;
|
|
addResult = undefined;
|
|
addResult = num32;
|
|
if (null != set3) {
|
|
addResult = set3.has(num32);
|
|
}
|
|
if (addResult) {
|
|
if (undefined !== addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set5 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = set2.add(num32);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[num32];
|
|
let num33 = 0;
|
|
if (null != addResult) {
|
|
num33 = addResult;
|
|
}
|
|
state.containerItemGenerations[num32] = num33 + 1;
|
|
}
|
|
let containerItemMetadata2 = state.containerItemMetadata;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = containerItemMetadata2.delete(num32);
|
|
let stickyContainerPool3 = state.stickyContainerPool;
|
|
if (stickyContainerPool3.has(num32)) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal9 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSticky" + num32, false);
|
|
let stickyContainerPool4 = addResult.stickyContainerPool;
|
|
addResult = stickyContainerPool4.delete(num32);
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal10 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + num32, undefined);
|
|
let _HermesInternal11 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + num32, undefined);
|
|
let _HermesInternal12 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + num32, undefined);
|
|
let _HermesInternal13 = HermesInternal;
|
|
addResult = outer1_32;
|
|
addResult = outer1_22(addResult, "containerPosition" + num32, outer1_32);
|
|
let _HermesInternal14 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerColumn" + num32, -1);
|
|
let _HermesInternal15 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSpan" + num32, 1);
|
|
addResult = flag5;
|
|
} else {
|
|
addResult = indexByKey.get(addResult);
|
|
addResult = flag5;
|
|
if (undefined !== addResult) {
|
|
addResult = outer1_88;
|
|
let obj3 = { scrollAdjustPending: null, updateLayout: true };
|
|
addResult = c10;
|
|
obj3[0] = c10;
|
|
let num35 = 0;
|
|
addResult = num32;
|
|
addResult = obj3;
|
|
addResult = outer1_88(addResult, addResult, addResult, obj3).didChangePosition || flag5;
|
|
}
|
|
}
|
|
num32 = num32 + 1;
|
|
flag5 = addResult;
|
|
} while (num32 < addResult);
|
|
}
|
|
addResult = set2;
|
|
if (set2) {
|
|
addResult = outer1_27;
|
|
}
|
|
if (addResult) {
|
|
addResult = outer1_87;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_87(containerItemKeys, set2);
|
|
}
|
|
if (!tmp13) {
|
|
addResult = outer1_84;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_84(containerItemKeys);
|
|
} else {
|
|
addResult = outer1_102;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_102(state, obj.startNoBuffer);
|
|
if (!queuedInitialLayout) {
|
|
if (!addResult.didContainersLayout) {
|
|
addResult = outer1_41;
|
|
addResult = outer1_77;
|
|
if (outer1_41(addResult)) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
} else {
|
|
addResult = addResult(addResult, addResult.startNoBuffer, addResult.endNoBuffer);
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = (function setDidLayout(containerItemKeys) {
|
|
containerItemKeys.state.queuedInitialLayout = true;
|
|
callback(containerItemKeys);
|
|
callback2(containerItemKeys, { didLayout: true });
|
|
})(containerItemKeys);
|
|
addResult = (function handleInitialScrollLayoutReady(containerItemKeys) {
|
|
let closure_0 = containerItemKeys;
|
|
if (containerItemKeys.state.initialScroll) {
|
|
callback6(containerItemKeys, { forceScroll: true });
|
|
const initialScrollSession = containerItemKeys.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(function runScroll() {
|
|
return outer1_76(closure_0, { forceScroll: true });
|
|
});
|
|
}
|
|
closure_0 = containerItemKeys;
|
|
const scrollingTo = containerItemKeys.state.scrollingTo;
|
|
{
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
}
|
|
})(containerItemKeys);
|
|
}
|
|
}
|
|
}
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
if (viewabilityConfigCallbackPairs) {
|
|
addResult = null !== obj.startNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = null !== obj.endNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
state = containerItemKeys.state;
|
|
({ startNoBuffer, endNoBuffer } = obj);
|
|
addResult = outer1_91;
|
|
if (null == addResult) {
|
|
addResult = obj.startNoBuffer;
|
|
}
|
|
if (null == addResult) {
|
|
addResult = obj.endNoBuffer;
|
|
}
|
|
addResult = state;
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
addResult = scrollLength;
|
|
addResult = startNoBuffer;
|
|
addResult = endNoBuffer;
|
|
addResult = addResult(state, addResult, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, addResult, addResult);
|
|
}
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != addResult) {
|
|
const call2 = addResult.call;
|
|
if (typeof call2 === "unknown") {
|
|
addResult = addResult();
|
|
} else {
|
|
addResult = call2(stickyState);
|
|
}
|
|
}
|
|
}
|
|
let tmp17 = outer1_25;
|
|
const tmp80 = outer1_89;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
} else {
|
|
closure_0 = state;
|
|
let closure_1 = { dataChanged: true, doMVCP: true };
|
|
state = state.state;
|
|
fn(() => {
|
|
let alwaysRenderIndicesArr;
|
|
let bottom;
|
|
let closure_4;
|
|
let dataChanged;
|
|
let doMVCP;
|
|
let enableScrollForNextCalculateItemsInView;
|
|
let endNoBuffer;
|
|
let forceFullItemPositions;
|
|
let getItemType;
|
|
let idCache;
|
|
let indexByKey;
|
|
let initialScroll;
|
|
let keyExtractor;
|
|
let minIndexSizeChanged;
|
|
let positions;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scrollForNextCalculateItemsInView;
|
|
let scrollLength;
|
|
let set2;
|
|
let sizes;
|
|
let startBufferedId;
|
|
let startNoBuffer;
|
|
let state;
|
|
let top;
|
|
let viewabilityConfigCallbackPairs;
|
|
let addResult = state;
|
|
let containerItemKeys = state.containerItemKeys;
|
|
({ enableScrollForNextCalculateItemsInView, idCache } = state);
|
|
({ indexByKey, minIndexSizeChanged, positions, props } = state);
|
|
({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props);
|
|
({ keyExtractor, onStickyHeaderChange: closure_4 } = props);
|
|
({ scrollForNextCalculateItemsInView, scrollLength } = state);
|
|
({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state);
|
|
const data = state.props.data;
|
|
let prop = state.props.stickyHeaderIndicesArr;
|
|
if (!prop) {
|
|
prop = [];
|
|
}
|
|
let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet;
|
|
if (!stickyHeaderIndicesSet) {
|
|
let _Set = Set;
|
|
stickyHeaderIndicesSet = new Set();
|
|
}
|
|
let tmp9 = outer1_46(containerItemKeys, idCache.drawDistanceMode);
|
|
({ dataChanged, doMVCP, forceFullItemPositions } = idCache);
|
|
let initialScrollSession = tmp2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp2.initialScrollSession.bootstrap;
|
|
}
|
|
let tmp16 = outer1_21(containerItemKeys, "numContainers");
|
|
if (data) {
|
|
if (0 !== scrollLength) {
|
|
if (tmp16) {
|
|
let closure_8 = outer1_25(tmp7);
|
|
let tmp15Result = tmp15(tmp7, "stylePaddingTop");
|
|
let sum = tmp15Result + tmp15(tmp7, "alignItemsAtEndPadding");
|
|
let closure_9 = sum + tmp15(tmp7, "headerSize");
|
|
tmp15Result = tmp15(tmp7, "numColumns");
|
|
let scrollVelocity = idCache.scrollVelocity;
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = outer1_69(tmp2);
|
|
}
|
|
({ initialScroll, queuedInitialLayout } = tmp2);
|
|
if (!tmp13) {
|
|
let scroll;
|
|
if (null != bootstrap) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = tmp2.scroll;
|
|
}
|
|
} else {
|
|
if (!queuedInitialLayout) {
|
|
if (outer1_41(tmp2)) {
|
|
if (initialScroll) {
|
|
scroll = outer1_75(tmp7, initialScroll);
|
|
}
|
|
}
|
|
}
|
|
scroll = tmp2.scroll;
|
|
}
|
|
let c10 = 0;
|
|
let c11 = 0;
|
|
let c12 = 0;
|
|
let c13 = 0;
|
|
let c14 = 0;
|
|
let c15 = 0;
|
|
function updateScroll2(scroll) {
|
|
let closure_16 = scroll;
|
|
const values = containerItemKeys.values;
|
|
const value = values.get("scrollAdjustPending");
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
let closure_11 = num - closure_9;
|
|
const rounded = Math.round(scroll + closure_11);
|
|
let closure_12 = rounded;
|
|
if (rounded + scrollLength > closure_8) {
|
|
const _Math = Math;
|
|
closure_12 = Math.max(0, tmp4 - tmp3);
|
|
}
|
|
}
|
|
updateScroll2(scroll);
|
|
const tmp15Result1 = tmp15(tmp7, "activeStickyIndex");
|
|
let closure_17 = tmp15Result1;
|
|
function resolveStickyState() {
|
|
let num = -1;
|
|
let num2 = -1;
|
|
if (prop.length > 0) {
|
|
let diff = arr.length - 1;
|
|
let tmp5 = num;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp6 = tmp3[arr[diff]];
|
|
let tmp7 = diff;
|
|
if (undefined === tmp6) {
|
|
diff = diff - 1;
|
|
tmp5 = num;
|
|
if (0 > diff) {
|
|
break;
|
|
}
|
|
} else {
|
|
tmp5 = diff;
|
|
if (tmp >= tmp6) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
num2 = tmp5;
|
|
}
|
|
if (0 <= num2) {
|
|
num = arr[num2];
|
|
}
|
|
let tmp8 = num2 >= 0;
|
|
if (0 > num2) {
|
|
tmp8 = tmp9 >= 0;
|
|
}
|
|
if (tmp8) {
|
|
outer2_22(containerItemKeys, "activeStickyIndex", num);
|
|
}
|
|
let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null };
|
|
let fn;
|
|
if (closure_4) {
|
|
if (arr.length > 0) {
|
|
if (tmp9 !== num) {
|
|
fn = () => {
|
|
if (undefined !== outer1_6[num]) {
|
|
if (null != outer1_4) {
|
|
const obj = { index: null, item: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp2;
|
|
tmp3(obj);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
obj[1] = fn;
|
|
return obj;
|
|
}
|
|
if (!dataChanged) {
|
|
let stickyState = resolveStickyState();
|
|
}
|
|
let result2 = tmp9;
|
|
let result3 = tmp9;
|
|
if (scrollVelocity > 0) {
|
|
let result = 0.5 * tmp9;
|
|
result2 = result;
|
|
const result1 = 1.5 * tmp9;
|
|
result3 = result1;
|
|
result3 = result1;
|
|
result2 = result;
|
|
} else {
|
|
if (0 === scrollVelocity) {
|
|
let _Math = Math;
|
|
}
|
|
result2 = 1.5 * tmp9;
|
|
result3 = 0.5 * tmp9;
|
|
}
|
|
let num6 = 0;
|
|
if (!dataChanged) {
|
|
num6 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num6 = 0;
|
|
if (!tmp25) {
|
|
num6 = 0;
|
|
if (!outer1_41(tmp2)) {
|
|
num6 = 0;
|
|
if (!tmp2.scrollingTo) {
|
|
num6 = 0;
|
|
if (!tmp2.pendingNativeMVCPAdjust) {
|
|
num6 = 0;
|
|
if (tmp15(tmp7, "readyToRender")) {
|
|
let _Math2 = Math;
|
|
num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) {
|
|
if (arg1 <= 0) {
|
|
return 0;
|
|
} else {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const bound = Math.min(1, Math.abs(scrollVelocity) / 4);
|
|
return Math.sign(scrollVelocity) * arg1 * bound;
|
|
}
|
|
})(scrollVelocity, Math.min(result2, result3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateScrollRange() {
|
|
const bound = Math.max(0, c12);
|
|
let closure_14 = Math.max(bound, c12 + scrollLength + Math.max(0, -scroll));
|
|
let closure_13 = bound - result2 + num6;
|
|
let closure_15 = closure_14 + result3 + num6;
|
|
}
|
|
updateScrollRange();
|
|
if (0 !== num6) {
|
|
(function scheduleRenderRangeProjectionSettle(state) {
|
|
state = state.state;
|
|
const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle;
|
|
if (undefined !== timeoutRenderRangeProjectionSettle) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutRenderRangeProjectionSettle);
|
|
let timeouts = state.timeouts;
|
|
timeouts.delete(timeoutRenderRangeProjectionSettle);
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
state.timeoutRenderRangeProjectionSettle = undefined;
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.scrollHistory.length = 0;
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}, 100);
|
|
state.timeoutRenderRangeProjectionSettle = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
})(tmp7);
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
if (!tmp25) {
|
|
if (!dataChanged) {
|
|
if (!forceFullItemPositions) {
|
|
if (scrollForNextCalculateItemsInView) {
|
|
({ top, bottom } = scrollForNextCalculateItemsInView);
|
|
if (null === top) {
|
|
if (null === bottom) {
|
|
tmp2.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}
|
|
if (null === top) {
|
|
if (viewabilityConfigCallbackPairs) {
|
|
(function updateViewabilityForCachedRange(state, viewabilityConfigCallbackPairs, scrollLength, c12, c14) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let tmp7 = null;
|
|
let sum1;
|
|
let tmp9 = null;
|
|
if (startBuffered <= endBuffered) {
|
|
let tmp3 = null;
|
|
let tmp5 = null;
|
|
let tmp6 = startBuffered;
|
|
tmp7 = null;
|
|
tmp9 = null;
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp10 = tmp[tmp6];
|
|
let tmp11 = tmp3;
|
|
let tmp12 = tmp4;
|
|
let tmp13 = tmp5;
|
|
let tmp14 = tmp6;
|
|
if (null == tmp10) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data) {
|
|
let tmp15 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp15 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp15;
|
|
str2 = tmp15;
|
|
}
|
|
tmp10 = str2;
|
|
}
|
|
let value = sizes.get(tmp10);
|
|
if (null == value) {
|
|
let tmp19 = callback4;
|
|
let num2 = 0;
|
|
let tmp20 = state;
|
|
let tmp21 = tmp10;
|
|
let tmp22 = tmp6;
|
|
value = callback4(state, tmp18, tmp14, data[tmp6]);
|
|
}
|
|
let tmp23 = tmp2[tmp6];
|
|
let tmp24 = null === tmp11 && tmp23 + value > c12;
|
|
if (tmp24) {
|
|
tmp11 = tmp6;
|
|
}
|
|
let tmp25 = undefined === tmp12 && tmp23 >= c12 - 10 && tmp23 <= c14;
|
|
if (tmp25) {
|
|
tmp12 = tmp6;
|
|
}
|
|
let tmp26 = tmp13;
|
|
let flag = false;
|
|
if (null !== tmp11) {
|
|
let flag2 = true;
|
|
if (tmp23 <= c14) {
|
|
tmp13 = tmp6;
|
|
flag2 = false;
|
|
}
|
|
tmp26 = tmp13;
|
|
flag = flag2;
|
|
}
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (flag) {
|
|
break;
|
|
} else {
|
|
let sum = tmp6 + 1;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (sum > endBuffered) {
|
|
break;
|
|
} else {
|
|
tmp3 = tmp11;
|
|
tmp4 = tmp12;
|
|
tmp5 = tmp26;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
tmp6 = sum;
|
|
if (sum >= data.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj = { endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startNoBuffer: null };
|
|
obj[0] = tmp9;
|
|
obj[1] = sum1;
|
|
if (null == sum1) {
|
|
sum1 = tmp7;
|
|
}
|
|
const items = [];
|
|
if (null != sum1) {
|
|
if (null !== tmp9) {
|
|
if (sum1 <= tmp9) {
|
|
do {
|
|
let tmp29 = state.idCache[sum1];
|
|
let tmp30 = sum1;
|
|
if (null == tmp29) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp29 = str4;
|
|
}
|
|
let arr = items.push(tmp29);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 <= tmp9);
|
|
}
|
|
}
|
|
}
|
|
obj[2] = items;
|
|
obj[3] = tmp7;
|
|
const merged = Object.assign(state, obj);
|
|
callback9(state, tmp7);
|
|
if (tmp37) {
|
|
callback7(state, state, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered);
|
|
}
|
|
tmp37 = null !== tmp7 && null !== tmp9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})(tmp7, viewabilityConfigCallbackPairs, scrollLength, c12, c14);
|
|
} else if (tmp2.props.onFirstVisibleItemChanged) {
|
|
outer1_102(tmp2, (function findFirstVisibleIndexInCachedRange(state, c12) {
|
|
let data;
|
|
let keyExtractor;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
if (startBuffered <= endBuffered) {
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp3 = tmp[startBuffered];
|
|
let tmp4 = startBuffered;
|
|
if (null == tmp3) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp5 = null;
|
|
if (startBuffered < data.length) {
|
|
let keyExtractorResult = startBuffered;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startBuffered], startBuffered);
|
|
}
|
|
tmp5 = keyExtractorResult;
|
|
}
|
|
state.idCache[startBuffered] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
let value = sizes.get(tmp3);
|
|
let tmp9 = value;
|
|
if (null == value) {
|
|
let tmp10 = callback4;
|
|
let num = 0;
|
|
let tmp11 = state;
|
|
let tmp12 = tmp3;
|
|
let tmp13 = startBuffered;
|
|
tmp9 = callback4(state, tmp8, tmp4, data[startBuffered]);
|
|
}
|
|
if (tmp2[startBuffered] + tmp9 > c12) {
|
|
break;
|
|
} else {
|
|
let sum = startBuffered + 1;
|
|
if (sum <= endBuffered) {
|
|
startBuffered = sum;
|
|
}
|
|
}
|
|
}
|
|
return startBuffered;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
})(tmp7, c12));
|
|
}
|
|
let prop1;
|
|
if (null != stickyState) {
|
|
prop1 = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != prop1) {
|
|
let call = prop1.call;
|
|
typeof call === "unknown" ? prop1() : call(stickyState);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp73;
|
|
if (doMVCP) {
|
|
if (!tmp25) {
|
|
tmp73 = outer1_68(tmp7, dataChanged);
|
|
}
|
|
}
|
|
if (dataChanged) {
|
|
outer1_86(tmp2);
|
|
}
|
|
let num8 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num8 = 0;
|
|
if (!dataChanged) {
|
|
let startBuffered = minIndexSizeChanged;
|
|
if (null == minIndexSizeChanged) {
|
|
startBuffered = tmp2.startBuffered;
|
|
}
|
|
let num9 = 0;
|
|
if (null != startBuffered) {
|
|
num9 = startBuffered;
|
|
}
|
|
num8 = num9;
|
|
}
|
|
}
|
|
let obj = { doMVCP: null, forceFullUpdate: null, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null };
|
|
obj[0] = doMVCP;
|
|
obj[1] = forceFullItemPositions;
|
|
let tmp82 = !forceFullItemPositions;
|
|
if (!forceFullItemPositions) {
|
|
tmp82 = !dataChanged;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = tmp15Result > 1;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = undefined !== minIndexSizeChanged;
|
|
}
|
|
obj[2] = tmp82;
|
|
obj[3] = c15;
|
|
obj[4] = scrollVelocity;
|
|
obj[5] = num8;
|
|
outer1_89(tmp7, dataChanged, obj);
|
|
const tmp17Result = outer1_25(tmp7);
|
|
closure_8 = tmp17Result;
|
|
if (undefined !== minIndexSizeChanged) {
|
|
tmp2.minIndexSizeChanged = undefined;
|
|
}
|
|
if (dataChanged) {
|
|
if (doMVCP) {
|
|
if (tmp2.props.maintainVisibleContentPosition.data) {
|
|
if (tmp2.didContainersLayout) {
|
|
if (tmp2.idsInView.length > 0) {
|
|
const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition;
|
|
const _Set2 = Set;
|
|
let set = new Set();
|
|
const idsInView = tmp2.idsInView;
|
|
for (const item10226 of idsInView) {
|
|
let tmp99 = item10226;
|
|
addResult = indexByKey.get(item10226);
|
|
if (undefined !== addResult) {
|
|
addResult = shouldRestorePosition;
|
|
if (shouldRestorePosition) {
|
|
addResult = !shouldRestorePosition(data[addResult], addResult, data);
|
|
}
|
|
if (!addResult) {
|
|
addResult = item10226;
|
|
addResult = set.add(tmp99);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_21(containerItemKeys, "scrollAdjustPending");
|
|
let num11 = 0;
|
|
if (null != addResult) {
|
|
num11 = addResult;
|
|
}
|
|
if (null != tmp73) {
|
|
addResult = tmp73();
|
|
}
|
|
addResult = tmp73;
|
|
if (addResult) {
|
|
addResult = addResult.scroll !== state.scroll;
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, "scrollAdjustPending");
|
|
let num12 = 0;
|
|
if (null != addResult) {
|
|
num12 = addResult;
|
|
}
|
|
addResult = num12 !== num11;
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = updateScroll2(addResult.scroll);
|
|
addResult = updateScrollRange();
|
|
}
|
|
if (dataChanged) {
|
|
stickyState = resolveStickyState();
|
|
}
|
|
addResult = undefined;
|
|
if (!tmp13) {
|
|
addResult = undefined;
|
|
if (null != bootstrap) {
|
|
addResult = bootstrap.targetIndexSeed;
|
|
}
|
|
}
|
|
if (null == addResult) {
|
|
let num13 = !dataChanged;
|
|
if (!dataChanged) {
|
|
num13 = startBufferedId;
|
|
}
|
|
if (num13) {
|
|
num13 = indexByKey.get(startBufferedId);
|
|
}
|
|
if (!num13) {
|
|
num13 = 0;
|
|
}
|
|
addResult = num13;
|
|
}
|
|
if (addResult >= 0) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num14 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = c13;
|
|
if (positions[addResult] + addResult <= c13) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (addResult < 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp15Result > 1) {
|
|
if (addResult > 0) {
|
|
addResult = state.columns[addResult];
|
|
while (1 !== addResult) {
|
|
if (undefined === addResult) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (0 >= addResult) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = globalThis;
|
|
let num16 = 0;
|
|
let num17 = 0;
|
|
let num18 = 0;
|
|
if (0 < tmp16) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num16);
|
|
addResult = num16;
|
|
addResult = num17;
|
|
addResult = num17;
|
|
if (undefined !== addResult) {
|
|
let _Math3 = Math;
|
|
addResult = Math.max(num17, indexByKey.get(addResult));
|
|
}
|
|
num16 = num16 + 1;
|
|
num17 = addResult;
|
|
num18 = addResult;
|
|
} while (num16 < tmp16);
|
|
}
|
|
obj = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: true };
|
|
const length = data.length;
|
|
let _Math4 = Math;
|
|
addResult = Math.max(0, addResult);
|
|
let flag3 = false;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
if (addResult < length) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
addResult = flag3;
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num19 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = positions[addResult];
|
|
addResult = flag3;
|
|
if (!flag3) {
|
|
addResult = outer1_100;
|
|
addResult = c12;
|
|
addResult = c14;
|
|
let num20 = 0;
|
|
addResult = obj;
|
|
addResult = outer1_100(obj, addResult, addResult, addResult, c12, c14);
|
|
addResult = null === addResult;
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = addResult + addResult > c13;
|
|
}
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = null;
|
|
}
|
|
addResult = flag3;
|
|
if (null !== obj.startNoBuffer) {
|
|
addResult = c15;
|
|
let flag4 = true;
|
|
if (addResult <= c15) {
|
|
addResult = c15;
|
|
addResult = null;
|
|
if (c15 <= tmp17Result) {
|
|
addResult = addResult + addResult;
|
|
}
|
|
flag4 = flag3;
|
|
}
|
|
addResult = flag4;
|
|
}
|
|
}
|
|
addResult = addResult + 1;
|
|
if (addResult >= length) {
|
|
break;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (!addResult) {
|
|
continue;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (addResult > num18) {
|
|
break;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
const _Object = Object;
|
|
let obj1 = { endBuffered: null, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null };
|
|
obj1[0] = addResult;
|
|
({ endNoBuffer: obj5[1], firstFullyOnScreenIndex: obj5[2] } = obj);
|
|
addResult = outer1_101;
|
|
addResult = state;
|
|
addResult = state;
|
|
obj1[3] = outer1_101(state, obj);
|
|
obj1[4] = addResult;
|
|
obj1[5] = addResult;
|
|
obj1[6] = obj.startNoBuffer;
|
|
addResult = Object.assign(state, obj1);
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
addResult = outer1_54;
|
|
if (!outer1_54(addResult)) {
|
|
let obj2 = { bottom: null, top: null };
|
|
obj2[0] = addResult;
|
|
obj2[1] = addResult;
|
|
addResult = obj2;
|
|
}
|
|
addResult.scrollForNextCalculateItemsInView = addResult;
|
|
}
|
|
addResult = tmp16;
|
|
let items = [];
|
|
if (dataChanged) {
|
|
for (let num21 = 0; num21 < addResult; num21 = num21 + 1) {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal2 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num21);
|
|
addResult = !keyExtractor;
|
|
addResult = num21;
|
|
if (keyExtractor) {
|
|
if (addResult) {
|
|
addResult = undefined === indexByKey.get(addResult);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = items.push(num21);
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const scrollTargetPinnedRange = state.scrollTargetPinnedRange;
|
|
let c22 = 0;
|
|
let c23 = -1;
|
|
let num23 = -1;
|
|
let num24 = 0;
|
|
if (scrollTargetPinnedRange) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
addResult = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c22 = addResult;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
addResult = length - 1;
|
|
addResult = Math.min(addResult, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c23 = addResult;
|
|
num23 = addResult;
|
|
num24 = addResult;
|
|
}
|
|
addResult = num24 <= num23;
|
|
let closure_24 = addResult;
|
|
function isPinnedRenderIndex(addResult) {
|
|
let hasItem = set.has(addResult);
|
|
if (!hasItem) {
|
|
let tmp2 = closure_24;
|
|
if (closure_24) {
|
|
tmp2 = addResult >= c22;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = addResult <= c23;
|
|
}
|
|
hasItem = tmp2;
|
|
}
|
|
return hasItem;
|
|
}
|
|
if (null !== addResult) {
|
|
if (null !== addResult) {
|
|
let items1 = [];
|
|
const _Set6 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
const set1 = new Set();
|
|
function addPinnedIndex(item10471) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (item10471 >= 0) {
|
|
if (item10471 < length) {
|
|
let tmp4 = idCache[item10471];
|
|
if (null == tmp4) {
|
|
({ data, keyExtractor } = outer1_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (item10471 < data.length) {
|
|
let keyExtractorResult = item10471;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[item10471], item10471);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[item10471] = tmp2;
|
|
str = tmp2;
|
|
}
|
|
tmp4 = str;
|
|
}
|
|
const value = containerItemKeys.get(tmp4);
|
|
if (undefined !== value) {
|
|
const stickyContainerPool = outer1_2.stickyContainerPool;
|
|
stickyContainerPool.add(value);
|
|
} else {
|
|
let hasItem = null == tmp4;
|
|
if (!hasItem) {
|
|
hasItem = set1.has(item10471);
|
|
}
|
|
if (!hasItem) {
|
|
set1.add(item10471);
|
|
items1.push(item10471);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = set1;
|
|
if (addResult <= addResult) {
|
|
do {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
if (!containerItemKeys.has(addResult)) {
|
|
addResult = set1.add(addResult);
|
|
addResult = items1.push(addResult);
|
|
}
|
|
addResult = addResult + 1;
|
|
} while (addResult <= addResult);
|
|
}
|
|
addResult = alwaysRenderIndicesArr;
|
|
addResult = alwaysRenderIndicesArr;
|
|
for (const item10471 of alwaysRenderIndicesArr) {
|
|
addResult = addPinnedIndex(item10471);
|
|
continue;
|
|
}
|
|
if (addResult) {
|
|
if (num24 <= num23) {
|
|
do {
|
|
addResult = addPinnedIndex(num24);
|
|
num24 = num24 + 1;
|
|
} while (num24 <= num23);
|
|
}
|
|
}
|
|
if (prop.length > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num25 = -1;
|
|
if (null != addResult) {
|
|
num25 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = num25;
|
|
addResult = items1;
|
|
addResult = set1;
|
|
addResult = (function handleStickyActivation(addResult, prop, arg2, items1, addResult2, addResult3, addResult4) {
|
|
let data;
|
|
let keyExtractor;
|
|
const state = addResult.state;
|
|
let num = -1;
|
|
if (arg2 >= 0) {
|
|
num = prop[arg2];
|
|
}
|
|
c22(addResult, "activeStickyIndex", num);
|
|
let num2 = 0;
|
|
do {
|
|
let diff = arg2 - num2;
|
|
let tmp4 = num2;
|
|
if (diff >= 0) {
|
|
let tmp12 = prop[diff];
|
|
let tmp13 = callback8;
|
|
if (!callback8(addResult, tmp12)) {
|
|
let tmp5 = state.idCache[tmp12];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (tmp12 < data.length) {
|
|
let keyExtractorResult = tmp12;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp12], tmp12);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp12] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let tmp8 = tmp5;
|
|
if (tmp5) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
tmp8 = !containerItemKeys.has(tmp5);
|
|
}
|
|
if (tmp8) {
|
|
let tmp9 = tmp12 < addResult3 || tmp12 > addResult4;
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = !addResult2.has(tmp12);
|
|
}
|
|
if (tmp8) {
|
|
addResult = addResult2.add(tmp12);
|
|
let arr = items1.push(tmp12);
|
|
}
|
|
}
|
|
}
|
|
num2 = num2 + 1;
|
|
} while (num2 <= 1);
|
|
})(addResult, prop, num25, items1, addResult, addResult, addResult);
|
|
} else if (-1 !== tmp15Result1) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "activeStickyIndex", -1);
|
|
}
|
|
if (items1.length > 0) {
|
|
let fn;
|
|
if (getItemType) {
|
|
fn = (arg0) => {
|
|
const tmp = getItemType(data[arg0], arg0);
|
|
let str = "";
|
|
if (undefined !== tmp) {
|
|
const _String = String;
|
|
str = String(tmp);
|
|
}
|
|
return str;
|
|
};
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = items1;
|
|
addResult = items;
|
|
addResult = fn;
|
|
addResult = tmp88;
|
|
addResult = (function findAvailableContainers(containerItemKeys, items1, addResult, addResult2, items, fn, has) {
|
|
let closure_2;
|
|
let stickyContainerPool;
|
|
let closure_0 = fn;
|
|
if (0 === items1.length) {
|
|
return [];
|
|
} else {
|
|
const tmp56 = length(containerItemKeys, "numContainers");
|
|
const state = containerItemKeys.state;
|
|
({ containerItemMetadata: closure_2, stickyContainerPool } = state);
|
|
let set;
|
|
if (items.length > 0) {
|
|
const _Set = Set;
|
|
set = new Set(items);
|
|
}
|
|
const mapped = items1.map((itemIndex) => {
|
|
const obj = { isSticky: stickyHeaderIndicesSet.has(itemIndex), itemIndex, itemType: null, order: null };
|
|
stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet;
|
|
let tmp;
|
|
if (null != callback) {
|
|
tmp = callback(itemIndex);
|
|
}
|
|
obj[2] = tmp;
|
|
obj[3] = arg1;
|
|
return obj;
|
|
});
|
|
const found = mapped.filter((isSticky) => !isSticky.isSticky);
|
|
items = [];
|
|
items1 = [];
|
|
let num2 = 0;
|
|
const found1 = mapped.filter((isSticky) => isSticky.isSticky);
|
|
if (0 < tmp56) {
|
|
while (true) {
|
|
let tmp12 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp13 = length(containerItemKeys, "containerItemKey" + num2);
|
|
let tmp14 = num2;
|
|
let hasItem;
|
|
if (null != set) {
|
|
hasItem = set.has(num2);
|
|
}
|
|
let tmp16 = !hasItem;
|
|
if (tmp13) {
|
|
let hasItem1;
|
|
if (null != has) {
|
|
hasItem1 = has.has(tmp13);
|
|
}
|
|
if (hasItem1) {
|
|
let indexByKey = state.indexByKey;
|
|
}
|
|
num2 = num2 + 1;
|
|
if (num2 >= tmp56) {
|
|
break;
|
|
}
|
|
}
|
|
let tmp18 = !tmp16;
|
|
if (stickyContainerPool.has(num2)) {
|
|
let tmp22 = undefined === tmp13 || tmp18;
|
|
if (tmp22) {
|
|
let obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number2 = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr = items1.push(obj);
|
|
}
|
|
} else {
|
|
if (undefined !== tmp13) {
|
|
if (!tmp18) {
|
|
if (!tmp) {
|
|
let indexByKey2 = state.indexByKey;
|
|
let value = indexByKey2.get(tmp13);
|
|
if (undefined !== value) {
|
|
if (value < addResult) {
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
obj[1] = value < addResult ? addResult - value : value - addResult2;
|
|
arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr1 = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
const sorted = items.sort(closure_98);
|
|
const _Array = Array;
|
|
const array = new Array(length);
|
|
let sum = tmp56;
|
|
let c5 = false;
|
|
function assign(itemIndex, containerIndex) {
|
|
array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType };
|
|
let deleteResult;
|
|
if (null != set) {
|
|
deleteResult = set.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
let c5 = true;
|
|
}
|
|
}
|
|
function assignMatching(found, items, arg2) {
|
|
let closure_0 = items;
|
|
let closure_1 = arg2;
|
|
function _loop2(iter) {
|
|
const items = iter;
|
|
if (outer1_4[iter.order]) {
|
|
return 1;
|
|
} else {
|
|
const findIndexResult = items.findIndex(() => { ... });
|
|
if (-1 !== findIndexResult) {
|
|
const containerIndex = array(items.splice(findIndexResult, 1), 1)[0].containerIndex;
|
|
if (typeof outer1_6 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const obj = { containerIndex: null, itemIndex: null, itemType: null };
|
|
obj[0] = containerIndex;
|
|
({ itemIndex: obj[1], itemType: obj[2] } = iter);
|
|
tmp[iter.order] = obj;
|
|
let deleteResult;
|
|
if (null != outer1_3) {
|
|
deleteResult = obj2.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
const outer1_5 = true;
|
|
}
|
|
obj2 = outer1_3;
|
|
}
|
|
}
|
|
}
|
|
const iter = found[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop2Result = _loop2(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function assignFromPool(found, items, arg2) {
|
|
if (closure_0) {
|
|
assignMatching(found, items, (arg0, arg1) => {
|
|
let tmp = undefined !== arg1;
|
|
if (tmp) {
|
|
tmp = arg0 === arg1;
|
|
}
|
|
return tmp;
|
|
});
|
|
}
|
|
assignMatching(found, items, (arg0) => undefined === arg0);
|
|
if (arg2) {
|
|
assignMatching(found, items, () => true);
|
|
}
|
|
}
|
|
assignFromPool(found, items, true);
|
|
assignFromPool(found1, items1, false);
|
|
for (const item10099 of mapped) {
|
|
let tmp36 = item10099;
|
|
if (!array[item10099.order]) {
|
|
let tmp37 = sum;
|
|
let tmp38 = +sum;
|
|
sum = tmp38 + 1;
|
|
let tmp39 = tmp38;
|
|
let tmp40 = item10099;
|
|
if (tmp36.isSticky) {
|
|
let tmp41 = tmp38;
|
|
addResult = stickyContainerPool.add(tmp39);
|
|
}
|
|
let tmp43 = item10099;
|
|
let tmp44 = tmp38;
|
|
let obj1 = assign(tmp36, tmp39);
|
|
}
|
|
continue;
|
|
}
|
|
if (c5) {
|
|
items.length = 0;
|
|
if (set) {
|
|
for (const item10120 of set) {
|
|
let arr2 = arg4.push(item10120);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if (closure_31) {
|
|
let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled");
|
|
if (null == POSITIVE_INFINITY) {
|
|
const _Number3 = Number;
|
|
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
}
|
|
if (sum > POSITIVE_INFINITY) {
|
|
const _console = console;
|
|
let obj2 = { debugInfo: null };
|
|
const obj3 = { numContainers: null, numContainersPooled: null, numNeeded: null, stillNeeded: null };
|
|
obj3[0] = tmp56;
|
|
obj3[1] = POSITIVE_INFINITY;
|
|
obj3[2] = length;
|
|
obj3[3] = sum - tmp56;
|
|
obj2[0] = obj3;
|
|
console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj2);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
})(containerItemKeys, items1, addResult, addResult, items, fn, tmp88);
|
|
let iter = addResult[Symbol.iterator]();
|
|
addResult = iter.next();
|
|
addResult = iter;
|
|
while (iter !== undefined) {
|
|
let itemIndex = addResult.itemIndex;
|
|
addResult = itemIndex;
|
|
let containerIndex = addResult.containerIndex;
|
|
addResult = idCache[itemIndex];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = itemIndex;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerIndex;
|
|
let _HermesInternal3 = HermesInternal;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + containerIndex);
|
|
if (addResult) {
|
|
addResult = addResult !== addResult;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
}
|
|
if (addResult !== addResult) {
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set3 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = containerIndex;
|
|
addResult = set2.add(containerIndex);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[containerIndex];
|
|
let num28 = 0;
|
|
if (null != addResult) {
|
|
num28 = addResult;
|
|
}
|
|
state.containerItemGenerations[containerIndex] = num28 + 1;
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerIndex;
|
|
let _HermesInternal4 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + containerIndex, addResult);
|
|
let _HermesInternal5 = HermesInternal;
|
|
addResult = itemIndex;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + containerIndex, addResult);
|
|
let _HermesInternal6 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + containerIndex, data[addResult]);
|
|
addResult = state;
|
|
addResult = state;
|
|
let containerItemMetadata = state.containerItemMetadata;
|
|
addResult = outer1_28;
|
|
let num29 = 0;
|
|
addResult = state;
|
|
addResult = containerItemMetadata.set(containerIndex, outer1_28(state, itemIndex, data[addResult], addResult.itemType));
|
|
addResult = containerItemKeys.set(addResult, containerIndex);
|
|
let userScrollAnchorReset = state.userScrollAnchorReset;
|
|
if (null != userScrollAnchorReset) {
|
|
addResult = userScrollAnchorReset;
|
|
let keys = addResult.keys;
|
|
addResult = keys.add(addResult);
|
|
}
|
|
addResult = containerIndex;
|
|
let _HermesInternal7 = HermesInternal;
|
|
addResult = "containerSticky" + containerIndex;
|
|
addResult = itemIndex;
|
|
addResult = stickyHeaderIndicesSet.has(addResult);
|
|
addResult = isPinnedRenderIndex(addResult);
|
|
if (addResult) {
|
|
addResult = addResult(addResult, addResult, true);
|
|
let stickyContainerPool2 = addResult.stickyContainerPool;
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool2.add(containerIndex);
|
|
} else {
|
|
if (addResult(addResult, addResult)) {
|
|
addResult = addResult(addResult, addResult, false);
|
|
}
|
|
let stickyContainerPool = addResult.stickyContainerPool;
|
|
if (addResult) {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.add(containerIndex);
|
|
} else {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.delete(containerIndex);
|
|
}
|
|
}
|
|
addResult = containerIndex;
|
|
if (containerIndex >= addResult) {
|
|
addResult = containerIndex;
|
|
addResult = containerIndex + 1;
|
|
}
|
|
continue;
|
|
}
|
|
if (addResult !== tmp16) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "numContainers", addResult);
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
if (addResult > outer1_21(containerItemKeys, "numContainersPooled")) {
|
|
addResult = addResult(addResult, "numContainersPooled", (function getExpandedContainerPoolSize(length, addResult) {
|
|
let num = 0;
|
|
if (length > 0) {
|
|
num = 0;
|
|
if (addResult > 0) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound = Math.max(length, addResult);
|
|
num = Math.min(bound, Math.max(addResult, Math.ceil(1.5 * addResult)));
|
|
}
|
|
}
|
|
return num;
|
|
})(length, addResult));
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const userScrollAnchorReset2 = state.userScrollAnchorReset;
|
|
addResult = undefined;
|
|
if (null != userScrollAnchorReset2) {
|
|
addResult = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === addResult) {
|
|
addResult.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
if (addResult.stickyContainerPool.size > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = c12;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num30 = -1;
|
|
if (null != addResult) {
|
|
num30 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = tmp9;
|
|
addResult = num30;
|
|
addResult = items;
|
|
addResult = isPinnedRenderIndex;
|
|
addResult = (function handleStickyRecycling(addResult, prop, addResult2, arg3, arg4, items, isPinnedRenderIndex) {
|
|
const state = addResult.state;
|
|
const iter = state.stickyContainerPool[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
let tmp3 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp4 = length(addResult, "containerItemKey" + nextResult);
|
|
let value;
|
|
if (tmp4) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp7 = tmp4;
|
|
value = indexByKey.get(tmp5);
|
|
}
|
|
let tmp8 = value;
|
|
if (undefined !== value) {
|
|
let tmp52 = value;
|
|
if (!isPinnedRenderIndex(tmp8)) {
|
|
let tmp9 = value;
|
|
let index = prop.indexOf(tmp8);
|
|
let tmp11 = index;
|
|
if (-1 !== index) {
|
|
let tmp16 = index;
|
|
if (tmp11 < arg4 - 1) {
|
|
let tmp18 = index;
|
|
let tmp19 = prop[tmp11 + 1];
|
|
let flag = false;
|
|
if (tmp19) {
|
|
let tmp44 = tmp19;
|
|
let tmp45 = state.positions[tmp20];
|
|
let tmp47 = undefined !== tmp45;
|
|
if (tmp47) {
|
|
let tmp48 = tmp45;
|
|
tmp47 = addResult2 > tmp46 + 2 * arg3;
|
|
}
|
|
flag = tmp47;
|
|
} else {
|
|
let tmp21 = value;
|
|
let tmp22 = state.idCache[tmp8];
|
|
let tmp23 = tmp22;
|
|
if (null != tmp22) {
|
|
let tmp26 = tmp22;
|
|
} else {
|
|
let tmp24 = callback3;
|
|
let tmp25 = value;
|
|
tmp26 = callback3(state, tmp8);
|
|
}
|
|
let tmp27 = tmp26;
|
|
if (tmp26) {
|
|
let tmp28 = value;
|
|
let tmp29 = state.positions[tmp8];
|
|
let sizes = state.sizes;
|
|
let tmp30 = tmp26;
|
|
value = sizes.get(tmp27);
|
|
let tmp32 = value;
|
|
if (null != value) {
|
|
let tmp38 = value;
|
|
} else {
|
|
let tmp33 = callback4;
|
|
let tmp34 = tmp26;
|
|
let tmp35 = value;
|
|
let num = 0;
|
|
let tmp36 = addResult;
|
|
let tmp37 = tmp8;
|
|
tmp38 = callback4(addResult, tmp27, value, state.props.data[tmp8]);
|
|
}
|
|
let tmp40 = tmp29;
|
|
let tmp41 = undefined !== tmp29;
|
|
if (tmp41) {
|
|
let tmp42 = tmp29;
|
|
let tmp43 = tmp38;
|
|
tmp41 = addResult2 > tmp29 + tmp39 + 3 * arg3;
|
|
}
|
|
flag = tmp41;
|
|
}
|
|
}
|
|
let tmp49 = flag;
|
|
if (flag) {
|
|
let tmp50 = nextResult;
|
|
let arr = items.push(tmp2);
|
|
}
|
|
} else {
|
|
let tmp17 = index;
|
|
}
|
|
} else {
|
|
let stickyContainerPool = state.stickyContainerPool;
|
|
let tmp12 = nextResult;
|
|
let deleteResult = stickyContainerPool.delete(tmp2);
|
|
let tmp14 = v0;
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp15 = v0(addResult, "containerSticky" + tmp2, false);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
})(addResult, prop, addResult, tmp9, num30, items, isPinnedRenderIndex);
|
|
}
|
|
if (items.length > 0) {
|
|
const _Set4 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
addResult = items;
|
|
const set3 = new Set(items);
|
|
}
|
|
let num32 = 0;
|
|
let flag5 = false;
|
|
if (0 < addResult) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal8 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num32);
|
|
addResult = flag5;
|
|
addResult = undefined;
|
|
addResult = num32;
|
|
if (null != set3) {
|
|
addResult = set3.has(num32);
|
|
}
|
|
if (addResult) {
|
|
if (undefined !== addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set5 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = set2.add(num32);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[num32];
|
|
let num33 = 0;
|
|
if (null != addResult) {
|
|
num33 = addResult;
|
|
}
|
|
state.containerItemGenerations[num32] = num33 + 1;
|
|
}
|
|
let containerItemMetadata2 = state.containerItemMetadata;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = containerItemMetadata2.delete(num32);
|
|
let stickyContainerPool3 = state.stickyContainerPool;
|
|
if (stickyContainerPool3.has(num32)) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal9 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSticky" + num32, false);
|
|
let stickyContainerPool4 = addResult.stickyContainerPool;
|
|
addResult = stickyContainerPool4.delete(num32);
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal10 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + num32, undefined);
|
|
let _HermesInternal11 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + num32, undefined);
|
|
let _HermesInternal12 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + num32, undefined);
|
|
let _HermesInternal13 = HermesInternal;
|
|
addResult = outer1_32;
|
|
addResult = outer1_22(addResult, "containerPosition" + num32, outer1_32);
|
|
let _HermesInternal14 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerColumn" + num32, -1);
|
|
let _HermesInternal15 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSpan" + num32, 1);
|
|
addResult = flag5;
|
|
} else {
|
|
addResult = indexByKey.get(addResult);
|
|
addResult = flag5;
|
|
if (undefined !== addResult) {
|
|
addResult = outer1_88;
|
|
let obj3 = { scrollAdjustPending: null, updateLayout: true };
|
|
addResult = c10;
|
|
obj3[0] = c10;
|
|
let num35 = 0;
|
|
addResult = num32;
|
|
addResult = obj3;
|
|
addResult = outer1_88(addResult, addResult, addResult, obj3).didChangePosition || flag5;
|
|
}
|
|
}
|
|
num32 = num32 + 1;
|
|
flag5 = addResult;
|
|
} while (num32 < addResult);
|
|
}
|
|
addResult = set2;
|
|
if (set2) {
|
|
addResult = outer1_27;
|
|
}
|
|
if (addResult) {
|
|
addResult = outer1_87;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_87(containerItemKeys, set2);
|
|
}
|
|
if (!tmp13) {
|
|
addResult = outer1_84;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_84(containerItemKeys);
|
|
} else {
|
|
addResult = outer1_102;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_102(state, obj.startNoBuffer);
|
|
if (!queuedInitialLayout) {
|
|
if (!addResult.didContainersLayout) {
|
|
addResult = outer1_41;
|
|
addResult = outer1_77;
|
|
if (outer1_41(addResult)) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
} else {
|
|
addResult = addResult(addResult, addResult.startNoBuffer, addResult.endNoBuffer);
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = (function setDidLayout(containerItemKeys) {
|
|
containerItemKeys.state.queuedInitialLayout = true;
|
|
callback(containerItemKeys);
|
|
callback2(containerItemKeys, { didLayout: true });
|
|
})(containerItemKeys);
|
|
addResult = (function handleInitialScrollLayoutReady(containerItemKeys) {
|
|
let closure_0 = containerItemKeys;
|
|
if (containerItemKeys.state.initialScroll) {
|
|
callback6(containerItemKeys, { forceScroll: true });
|
|
const initialScrollSession = containerItemKeys.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(function runScroll() {
|
|
return outer1_76(closure_0, { forceScroll: true });
|
|
});
|
|
}
|
|
closure_0 = containerItemKeys;
|
|
const scrollingTo = containerItemKeys.state.scrollingTo;
|
|
{
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
}
|
|
})(containerItemKeys);
|
|
}
|
|
}
|
|
}
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
if (viewabilityConfigCallbackPairs) {
|
|
addResult = null !== obj.startNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = null !== obj.endNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
state = containerItemKeys.state;
|
|
({ startNoBuffer, endNoBuffer } = obj);
|
|
addResult = outer1_91;
|
|
if (null == addResult) {
|
|
addResult = obj.startNoBuffer;
|
|
}
|
|
if (null == addResult) {
|
|
addResult = obj.endNoBuffer;
|
|
}
|
|
addResult = state;
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
addResult = scrollLength;
|
|
addResult = startNoBuffer;
|
|
addResult = endNoBuffer;
|
|
addResult = addResult(state, addResult, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, addResult, addResult);
|
|
}
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != addResult) {
|
|
const call2 = addResult.call;
|
|
if (typeof call2 === "unknown") {
|
|
addResult = addResult();
|
|
} else {
|
|
addResult = call2(stickyState);
|
|
}
|
|
}
|
|
}
|
|
let tmp17 = outer1_25;
|
|
const tmp80 = outer1_89;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function normalizeMaintainScrollAtEndOn(on, arg1) {
|
|
let tmp = !arg1;
|
|
let tmp2 = tmp;
|
|
if (arg1) {
|
|
let dataChange;
|
|
if (null != on) {
|
|
dataChange = on.dataChange;
|
|
}
|
|
tmp2 = null != dataChange && dataChange;
|
|
const tmp5 = null != dataChange && dataChange;
|
|
}
|
|
const obj = { animated: false, onDataChange: tmp2, onFooterLayout: null, onItemLayout: null, onLayout: null };
|
|
let tmp6 = tmp;
|
|
if (arg1) {
|
|
let footerLayout;
|
|
if (null != on) {
|
|
footerLayout = on.footerLayout;
|
|
}
|
|
tmp6 = null != footerLayout && footerLayout;
|
|
const tmp9 = null != footerLayout && footerLayout;
|
|
}
|
|
obj[2] = tmp6;
|
|
let tmp10 = tmp;
|
|
if (arg1) {
|
|
let itemLayout;
|
|
if (null != on) {
|
|
itemLayout = on.itemLayout;
|
|
}
|
|
tmp10 = null != itemLayout && itemLayout;
|
|
const tmp13 = null != itemLayout && itemLayout;
|
|
}
|
|
obj[3] = tmp10;
|
|
if (arg1) {
|
|
let layout;
|
|
if (null != on) {
|
|
layout = on.layout;
|
|
}
|
|
tmp = null != layout && layout;
|
|
const tmp16 = null != layout && layout;
|
|
}
|
|
obj[4] = tmp;
|
|
return obj;
|
|
}
|
|
let closure_5 = ["noScrollingTo", "forceScroll"];
|
|
let closure_6 = ["index"];
|
|
let closure_7 = ["children", "data", "renderItem"];
|
|
let closure_8 = ["alignItemsAtEnd", "anchoredEndSpace", "alwaysRender", "columnWrapperStyle", "contentContainerStyle", "contentInset", "data", "dataKey", "dataVersion", "drawDistance", "contentInsetEndAdjustment", "estimatedItemSize", "estimatedListSize", "extraData", "getFixedItemSize", "getItemType", "horizontal", "rtl", "estimatedHeaderSize", "initialScrollAtEnd", "initialScrollIndex", "initialScrollOffset", "experimental_adaptiveRender", "itemsAreEqual", "keyExtractor", "ListEmptyComponent", "ListFooterComponent", "ListFooterComponentStyle", "ListHeaderComponent", "maintainScrollAtEnd", "maintainScrollAtEndThreshold", "maintainVisibleContentPosition", "numColumns", "overrideItemLayout", "onEndReached", "onEndReachedThreshold", "onItemSizeChanged", "onMetricsChange", "onLayout", "onLoad", "onMomentumScrollEnd", "onRefresh", "onScroll", "onScrollBeginDrag", "onStartReached", "onStartReachedThreshold", "onStickyHeaderChange", "onFirstVisibleItemChanged", "onViewableItemsChanged", "progressViewOffset", "recycleItems", "refreshControl", "refreshing", "refScrollView", "renderScrollComponent", "renderItem", "scrollEventThrottle", "snapToIndices", "stickyHeaderIndices", "style", "useWindowScroll", "viewabilityConfig", "viewabilityConfigCallbackPairs"];
|
|
let closure_9 = ["positionComponentInternal", "stickyPositionComponentInternal"];
|
|
get_ActivityIndicator = noop;
|
|
obj = undefined;
|
|
if (!noop) {
|
|
let _Object = Object;
|
|
obj = Object.create(null);
|
|
if (noop) {
|
|
const _Object2 = Object;
|
|
let keys = Object.keys(noop);
|
|
let item = keys.forEach((arg0) => {
|
|
let closure_0 = arg0;
|
|
if ("default" !== arg0) {
|
|
const _Object = Object;
|
|
let ownPropertyDescriptor = Object.getOwnPropertyDescriptor(closure_0, arg0);
|
|
if (!ownPropertyDescriptor.get) {
|
|
const obj = { enumerable: true, get: null };
|
|
obj[1] = function get() {
|
|
return table[table];
|
|
};
|
|
ownPropertyDescriptor = obj;
|
|
}
|
|
Object.defineProperty(obj, arg0, ownPropertyDescriptor);
|
|
const tmp4 = obj;
|
|
}
|
|
});
|
|
}
|
|
obj.default = noop;
|
|
const _Object3 = Object;
|
|
let frozen = Object.freeze(obj);
|
|
} else {
|
|
frozen = noop;
|
|
}
|
|
obj = undefined;
|
|
if (!get_ActivityIndicator) {
|
|
const _Object4 = Object;
|
|
obj = Object.create(null);
|
|
if (get_ActivityIndicator) {
|
|
const _Object5 = Object;
|
|
const keys1 = Object.keys(get_ActivityIndicator);
|
|
const item1 = keys1.forEach((arg0) => {
|
|
let closure_0 = arg0;
|
|
if ("default" !== arg0) {
|
|
const _Object = Object;
|
|
let ownPropertyDescriptor = Object.getOwnPropertyDescriptor(closure_0, arg0);
|
|
if (!ownPropertyDescriptor.get) {
|
|
const obj = { enumerable: true, get: null };
|
|
obj[1] = function get() {
|
|
return table[table];
|
|
};
|
|
ownPropertyDescriptor = obj;
|
|
}
|
|
Object.defineProperty(obj, arg0, ownPropertyDescriptor);
|
|
const tmp4 = obj;
|
|
}
|
|
});
|
|
}
|
|
obj.default = get_ActivityIndicator;
|
|
const _Object6 = Object;
|
|
let frozen1 = Object.freeze(obj);
|
|
} else {
|
|
frozen1 = get_ActivityIndicator;
|
|
}
|
|
({ View: map1, Text: closure_14, Platform } = get_ActivityIndicator);
|
|
function createAnimatedValue(arg0) {
|
|
|
|
}
|
|
let context = frozen.createContext(null);
|
|
let c18 = 0;
|
|
function DebugRow(children) {
|
|
return <closure_13 style={{ alignItems: "center", flexDirection: "row", justifyContent: "space-between" }}>{arg0.children}</closure_13>;
|
|
}
|
|
frozen.memo(function DebugView2() {
|
|
let createElement;
|
|
let createElement2;
|
|
let obj = frozen;
|
|
const items = ["totalSize", "scrollAdjust", "debugRawScroll", "debugComputedScroll", "numContainers", "numContainersPooled", "isAtEnd"];
|
|
let f95437;
|
|
let first;
|
|
const context = frozen.useContext(closure_17);
|
|
const context1 = frozen.useContext(closure_17);
|
|
f95437 = context1;
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context1, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
const tmp6 = _slicedToArray(f95437(first[6]).useSyncExternalStore(memo.subscribe, get, get), 7);
|
|
const first1 = tmp6[0];
|
|
let num = 0;
|
|
if (undefined !== first1) {
|
|
num = first1;
|
|
}
|
|
let num2 = 0;
|
|
if (undefined !== tmp6[1]) {
|
|
num2 = tmp8;
|
|
}
|
|
let num3 = 0;
|
|
if (undefined !== tmp6[2]) {
|
|
num3 = tmp9;
|
|
}
|
|
let num4 = 0;
|
|
if (undefined !== tmp6[3]) {
|
|
num4 = tmp10;
|
|
}
|
|
const obj2 = f95437(first[6]);
|
|
const tmp12 = undefined !== tmp6[6] && tmp6[6];
|
|
const tmp5 = _slicedToArray;
|
|
f95437 = tmp5(noop.useReducer((arg0) => arg0 + 1, 0), 2)[1];
|
|
f95437 = (arg0) => {
|
|
f95437();
|
|
};
|
|
const items2 = [100];
|
|
const effect = noop.useEffect(() => {
|
|
interval = setInterval(interval, 100);
|
|
return () => clearInterval(closure_0);
|
|
}, items2);
|
|
obj = { pointerEvents: "none", style: { backgroundColor: "#FFFFFFCC", borderRadius: 4, padding: 4, paddingBottom: 4, paddingLeft: 4, position: "absolute", right: 0, top: 0 } };
|
|
({ createElement, createElement: createElement2 } = obj);
|
|
const element = <closure_14>{"TotalSize:"}</closure_14>;
|
|
const element2 = createElement2(DebugRow, null, element, <closure_14>{num.toFixed(2)}</closure_14>);
|
|
const element1 = <closure_14>{"ContentSize:"}</closure_14>;
|
|
const element3 = <DebugRow>{element1}<closure_14>{getContentSize(context).toFixed(2)}</closure_14></DebugRow>;
|
|
const element4 = <closure_14>{"At end:"}</closure_14>;
|
|
const element5 = <DebugRow>{element4}<closure_14>{String(tmp12)}</closure_14></DebugRow>;
|
|
const element6 = <closure_14>{"ScrollAdjust:"}</closure_14>;
|
|
const element7 = <DebugRow>{element6}<closure_14>{num2.toFixed(2)}</closure_14></DebugRow>;
|
|
const element8 = <closure_14>{"RawScroll: "}</closure_14>;
|
|
const element9 = <DebugRow>{element8}<closure_14>{num3.toFixed(2)}</closure_14></DebugRow>;
|
|
const element10 = <closure_14>{"ComputedScroll: "}</closure_14>;
|
|
return <closure_13 pointerEvents="none" style={{ backgroundColor: "#FFFFFFCC", borderRadius: 4, padding: 4, paddingBottom: 4, paddingLeft: 4, position: "absolute", right: 0, top: 0 }}>{element2}{element3}{element5}{element7}{element9}<DebugRow>{element10}<closure_14>{num4.toFixed(2)}</closure_14></DebugRow></closure_13>;
|
|
});
|
|
const nativeFabricUIManager = global.nativeFabricUIManager;
|
|
let closure_27 = tmp13;
|
|
let str;
|
|
if (typeof process !== "undefined") {
|
|
const _process = process;
|
|
if (typeof process.env === "object") {
|
|
const _process2 = process;
|
|
if (process.env) {
|
|
str = "production";
|
|
}
|
|
}
|
|
}
|
|
let tmp14;
|
|
if (typeof str === "string") {
|
|
tmp14 = "production" !== str.toLowerCase();
|
|
}
|
|
let closure_31 = tmp16;
|
|
let c32 = -10000000;
|
|
let flag = tmp16;
|
|
if (null != (null != tmp14 && tmp14) && (null != tmp14 && tmp14)) {
|
|
flag = false;
|
|
}
|
|
let flag2 = tmp16;
|
|
if (null != (null != tmp14 && tmp14) && (null != tmp14 && tmp14)) {
|
|
flag2 = false;
|
|
}
|
|
let closure_36 = {
|
|
didDispatchNativeScroll(state) {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let completion;
|
|
if (null != initialScrollSession) {
|
|
completion = initialScrollSession.completion;
|
|
}
|
|
let prop;
|
|
if (null != completion) {
|
|
prop = completion.didDispatchNativeScroll;
|
|
}
|
|
return prop;
|
|
},
|
|
didRetrySilentInitialScroll(initialScrollSession) {
|
|
initialScrollSession = initialScrollSession.initialScrollSession;
|
|
let completion;
|
|
if (null != initialScrollSession) {
|
|
completion = initialScrollSession.completion;
|
|
}
|
|
let prop;
|
|
if (null != completion) {
|
|
prop = completion.didRetrySilentInitialScroll;
|
|
}
|
|
return prop;
|
|
},
|
|
markInitialScrollNativeDispatch(state) {
|
|
ensureInitialScrollSessionCompletion(state).didDispatchNativeScroll = true;
|
|
},
|
|
markSilentInitialScrollRetry(initialScrollSession) {
|
|
ensureInitialScrollSessionCompletion(initialScrollSession).didRetrySilentInitialScroll = true;
|
|
},
|
|
resetFlags(state) {
|
|
if (state.initialScrollSession) {
|
|
const tmp2 = ensureInitialScrollSessionCompletion(state, state.initialScrollSession.kind);
|
|
tmp2.didDispatchNativeScroll = undefined;
|
|
tmp2.didRetrySilentInitialScroll = undefined;
|
|
}
|
|
}
|
|
};
|
|
let closure_37 = {
|
|
clear(arg0) {
|
|
const result = store.set(arg0, undefined);
|
|
},
|
|
didReachTarget(bound4, value) {
|
|
return Math.abs(bound4 - value.targetOffset) <= 1;
|
|
},
|
|
get(initialScrollSession) {
|
|
initialScrollSession = initialScrollSession.initialScrollSession;
|
|
let completion;
|
|
if (null != initialScrollSession) {
|
|
completion = initialScrollSession.completion;
|
|
}
|
|
let watchdog;
|
|
if (null != completion) {
|
|
watchdog = completion.watchdog;
|
|
}
|
|
return watchdog;
|
|
},
|
|
hasNonZeroTargetOffset(targetOffset) {
|
|
let tmp = undefined !== targetOffset;
|
|
if (tmp) {
|
|
tmp = targetOffset > 1;
|
|
}
|
|
return tmp;
|
|
},
|
|
isAtZeroTargetOffset(offset) {
|
|
return offset <= 1;
|
|
},
|
|
set(initialScrollSession) {
|
|
let tmp = arg1;
|
|
if (!arg1) {
|
|
initialScrollSession = initialScrollSession.initialScrollSession;
|
|
let completion;
|
|
if (null != initialScrollSession) {
|
|
completion = initialScrollSession.completion;
|
|
}
|
|
let watchdog;
|
|
if (null != completion) {
|
|
watchdog = completion.watchdog;
|
|
}
|
|
tmp = watchdog;
|
|
}
|
|
if (tmp) {
|
|
let tmp7;
|
|
if (arg1) {
|
|
const obj = { startScroll: null, targetOffset: null };
|
|
({ startScroll: obj[0], targetOffset: obj[1] } = arg1);
|
|
tmp7 = obj;
|
|
}
|
|
ensureInitialScrollSessionCompletion(initialScrollSession).watchdog = tmp7;
|
|
const tmp6 = ensureInitialScrollSessionCompletion(initialScrollSession);
|
|
}
|
|
}
|
|
};
|
|
function checkThreshold(scroll, arg1, result, isStartReached, startReachedSnapshot, contentSize, arg6, arg7) {
|
|
let tmp2 = arg1;
|
|
if (!arg1) {
|
|
tmp2 = result > 0 && tmp <= result;
|
|
const tmp3 = result > 0 && tmp <= result;
|
|
}
|
|
if (isStartReached) {
|
|
const _Math = Math;
|
|
const absolute = Math.abs(scroll);
|
|
let tmp8 = !arg1;
|
|
let tmp9 = tmp8;
|
|
if (!arg1) {
|
|
tmp9 = result > 0;
|
|
}
|
|
if (tmp9) {
|
|
tmp9 = absolute >= 1.3 * result;
|
|
}
|
|
if (!tmp9) {
|
|
if (!arg1) {
|
|
tmp8 = result <= 0;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = absolute > 0;
|
|
}
|
|
tmp9 = tmp8;
|
|
}
|
|
if (tmp9) {
|
|
arg7(undefined);
|
|
return false;
|
|
} else {
|
|
if (tmp2) {
|
|
let tmp11 = !startReachedSnapshot;
|
|
if (startReachedSnapshot) {
|
|
tmp11 = startReachedSnapshot.atThreshold !== arg1;
|
|
}
|
|
if (!tmp11) {
|
|
tmp11 = startReachedSnapshot.contentSize !== contentSize.contentSize;
|
|
}
|
|
if (!tmp11) {
|
|
tmp11 = startReachedSnapshot.dataLength !== contentSize.dataLength;
|
|
}
|
|
if (tmp11) {
|
|
let obj = { atThreshold: null, contentSize: null, dataLength: null, scrollPosition: null };
|
|
obj[0] = arg1;
|
|
({ contentSize: obj2[1], dataLength: obj2[2], scrollPosition: obj2[3] } = contentSize);
|
|
arg7(obj);
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
} else {
|
|
let flag = tmp2;
|
|
if (flag) {
|
|
arg6(scroll);
|
|
obj = { atThreshold: null, contentSize: null, dataLength: null, scrollPosition: null };
|
|
obj[0] = arg1;
|
|
({ contentSize: obj[1], dataLength: obj[2], scrollPosition: obj[3] } = contentSize);
|
|
arg7(obj);
|
|
flag = true;
|
|
}
|
|
return flag;
|
|
}
|
|
}
|
|
let set = new Set();
|
|
let c66 = 0.1;
|
|
function getScrollVelocity(state) {
|
|
const scrollHistory = state.scrollHistory;
|
|
let diff = scrollHistory.length - 1;
|
|
if (diff < 1) {
|
|
return 0;
|
|
} else {
|
|
const _Date = Date;
|
|
if (Date.now() - scrollHistory[diff].time > 1000) {
|
|
return 0;
|
|
} else {
|
|
let num3 = 0;
|
|
let num4 = 0;
|
|
let num5 = 0;
|
|
let num = 0;
|
|
let num2 = 0;
|
|
if (0 < diff) {
|
|
while (true) {
|
|
let tmp2 = scrollHistory[diff];
|
|
let diff1 = diff - 1;
|
|
let tmp4 = scrollHistory[diff1];
|
|
let diff2 = tmp2.scroll - tmp4.scroll;
|
|
let diff3 = tmp2.time - tmp4.time;
|
|
let _Math = Math;
|
|
let signResult = Math.sign(diff2);
|
|
let tmp8 = num3;
|
|
let tmp9 = num4;
|
|
let tmp10 = num5;
|
|
let tmp11 = num5;
|
|
if (0 !== signResult) {
|
|
tmp11 = signResult;
|
|
if (0 !== num5) {
|
|
tmp11 = num5;
|
|
num = num3;
|
|
num2 = num4;
|
|
if (signResult !== num5) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
num = num3;
|
|
num2 = num4;
|
|
if (tmp15.time - tmp4.time > 1000) {
|
|
break;
|
|
} else {
|
|
let sum1 = num3;
|
|
let sum = num4;
|
|
if (0 !== diff2) {
|
|
sum1 = num3;
|
|
sum = num4;
|
|
if (diff3 > 0) {
|
|
let _Math2 = Math;
|
|
let expResult = Math.exp(-tmp15.time - tmp2.time / 200);
|
|
sum = num4 + diff2 / diff3 * expResult;
|
|
sum1 = num3 + expResult;
|
|
}
|
|
}
|
|
num3 = sum1;
|
|
num4 = sum;
|
|
num5 = tmp11;
|
|
num = sum1;
|
|
num2 = sum;
|
|
diff = diff1;
|
|
if (0 >= diff1) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let num6 = 0;
|
|
if (num > 0) {
|
|
num6 = num2 / num;
|
|
}
|
|
return num6;
|
|
}
|
|
}
|
|
}
|
|
let fn = frozen1.unstable_batchedUpdates;
|
|
if (typeof fn !== "function") {
|
|
fn = (arg0) => arg0();
|
|
}
|
|
const PixelRatio = get_ActivityIndicator.PixelRatio;
|
|
let closure_104 = 1 / PixelRatio.get() + 0.01;
|
|
({ forwardRef, memo } = frozen);
|
|
let closure_110 = memo(function ContainerLayoutCoordinatorComponent(children) {
|
|
let context1;
|
|
const context = frozen.useContext(closure_17);
|
|
context1 = context;
|
|
const items = ["containerLayoutEpoch"];
|
|
context1 = undefined;
|
|
let first;
|
|
context1 = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context1, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
const items2 = [context, _slicedToArray(context1(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]];
|
|
const layoutEffect = obj.useLayoutEffect(() => {
|
|
if (outer1_27) {
|
|
const tmp2 = (function getContainerLayoutEffectScope(context1) {
|
|
const pendingContainerIds = context1.pendingContainerIds;
|
|
context1.pendingContainerIds = undefined;
|
|
if (undefined !== pendingContainerIds) {
|
|
const state = context1.state;
|
|
let tmp = pendingContainerIds;
|
|
if (pendingContainerIds) {
|
|
const userScrollAnchorReset = state.userScrollAnchorReset;
|
|
let size;
|
|
if (null != userScrollAnchorReset) {
|
|
size = userScrollAnchorReset.keys.size;
|
|
}
|
|
tmp = pendingContainerIds;
|
|
if (size) {
|
|
const _Set = Set;
|
|
const set = new Set(pendingContainerIds);
|
|
const keys = state.userScrollAnchorReset.keys;
|
|
tmp = set;
|
|
for (const item10023 of keys) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
let value = containerItemKeys.get(item10023);
|
|
if (undefined !== value) {
|
|
let tmp13 = value;
|
|
let addResult = set.add(tmp12);
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
return tmp;
|
|
}
|
|
})(context1);
|
|
if (undefined !== tmp2) {
|
|
outer1_109(tmp, tmp2);
|
|
}
|
|
tmp = context1;
|
|
}
|
|
}, items2);
|
|
return children.children;
|
|
});
|
|
function getComponent(icon) {
|
|
let tmp = icon;
|
|
if (!frozen.isValidElement(icon)) {
|
|
let element = null;
|
|
if (icon) {
|
|
element = frozen.createElement(icon, null);
|
|
}
|
|
tmp = element;
|
|
}
|
|
return tmp;
|
|
}
|
|
let memoResult2 = memo(function PositionViewAnimated2(arg0) {
|
|
let horizontal;
|
|
let id;
|
|
let refView;
|
|
let style;
|
|
({ id, horizontal, style, refView } = arg0);
|
|
const merged = Object.assign(arg0, Object.create(null));
|
|
let obj = {
|
|
getValue(arg0) {
|
|
let tmp = arg0;
|
|
if (null == arg0) {
|
|
tmp = closure_32;
|
|
}
|
|
return tmp;
|
|
}
|
|
};
|
|
const tmp2 = useValue$("containerPosition" + id, obj);
|
|
if (horizontal) {
|
|
obj = { left: null };
|
|
obj[0] = tmp2;
|
|
} else {
|
|
obj = { top: null };
|
|
obj[0] = tmp2;
|
|
}
|
|
const items = [style, obj];
|
|
const merged1 = Object.assign(merged);
|
|
return frozen.createElement(get_ActivityIndicator.Animated.View, { ref: refView, style: items });
|
|
});
|
|
let closure_113 = memo(function PositionViewSticky2(animatedScrollY) {
|
|
let context1;
|
|
let id;
|
|
let style;
|
|
({ id, horizontal: context1, style } = animatedScrollY);
|
|
let first = style;
|
|
animatedScrollY = animatedScrollY.animatedScrollY;
|
|
const stickyHeaderConfig = animatedScrollY.stickyHeaderConfig;
|
|
const merged = Object.assign(animatedScrollY, Object.create(null));
|
|
let context;
|
|
let first1;
|
|
let num;
|
|
let num2;
|
|
let num3;
|
|
let c9;
|
|
let c10;
|
|
let memo1;
|
|
let memo2;
|
|
let obj = memo2;
|
|
context = memo2.useContext(closure_17);
|
|
let items = ["containerPosition" + id, "alignItemsAtEndPadding", "headerSize", "stylePaddingTop", "containerItemKey" + id, "containerItemIndex" + id, "totalSize"];
|
|
context1 = undefined;
|
|
first = undefined;
|
|
context1 = memo2.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
let items1 = [context1, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
const tmp6 = context(context1(first[6]).useSyncExternalStore(memo.subscribe, get, get), 7);
|
|
first1 = tmp6[0];
|
|
if (undefined === first1) {
|
|
first1 = c32;
|
|
}
|
|
num = 0;
|
|
if (undefined !== tmp6[1]) {
|
|
num = tmp8;
|
|
}
|
|
num2 = 0;
|
|
if (undefined !== tmp6[2]) {
|
|
num2 = tmp9;
|
|
}
|
|
num3 = 0;
|
|
if (undefined !== tmp6[3]) {
|
|
num3 = tmp10;
|
|
}
|
|
c9 = tmp11;
|
|
c10 = tmp12;
|
|
let num4 = 0;
|
|
if (undefined !== tmp6[6]) {
|
|
num4 = tmp13;
|
|
}
|
|
let items2 = [context.state, tmp6[5], tmp6[4], num4];
|
|
memo1 = obj.useMemo(() => {
|
|
const state = context.state;
|
|
let diff;
|
|
if (c9) {
|
|
const sizes = state.sizes;
|
|
const value = sizes.get(tmp2);
|
|
if (value) {
|
|
if (value > 0) {
|
|
const prop = state.props.stickyHeaderIndicesArr;
|
|
const index = prop.indexOf(tmp);
|
|
if (-1 !== index) {
|
|
if (undefined !== state.props.stickyHeaderIndicesArr[index + 1]) {
|
|
if (undefined !== state.positions[tmp6]) {
|
|
diff = tmp7 - value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return diff;
|
|
}, items2);
|
|
let items3 = [num, animatedScrollY, num2, first1, memo1, num3, ];
|
|
let offset;
|
|
if (null != stickyHeaderConfig) {
|
|
offset = stickyHeaderConfig.offset;
|
|
}
|
|
items3[6] = offset;
|
|
memo2 = obj.useMemo(() => {
|
|
let obj = animatedScrollY;
|
|
if (animatedScrollY) {
|
|
let offset;
|
|
if (null != stickyHeaderConfig) {
|
|
offset = stickyHeaderConfig.offset;
|
|
}
|
|
let num = 0;
|
|
if (null != offset) {
|
|
num = offset;
|
|
}
|
|
const diff = first1 + num2 + num3 + num - num;
|
|
if (undefined !== memo1) {
|
|
let interpolateResult = tmp8;
|
|
if (tmp8 > tmp3) {
|
|
obj = { extrapolateLeft: "clamp", extrapolateRight: "clamp", inputRange: null, outputRange: null };
|
|
const items = [diff, diff + (tmp8 - tmp3)];
|
|
obj[2] = items;
|
|
const items1 = [tmp3, tmp8];
|
|
obj[3] = items1;
|
|
interpolateResult = obj.interpolate(obj);
|
|
}
|
|
let interpolateResult1 = interpolateResult;
|
|
} else {
|
|
obj = { extrapolateLeft: "clamp", extrapolateRight: "extend", inputRange: null, outputRange: null };
|
|
const items2 = [diff, diff + 5000];
|
|
obj[2] = items2;
|
|
const items3 = [tmp3, tmp3 + 5000];
|
|
obj[3] = items3;
|
|
interpolateResult1 = obj.interpolate(obj);
|
|
}
|
|
if (context1) {
|
|
const obj1 = { translateX: null };
|
|
obj1[0] = interpolateResult1;
|
|
const items4 = [obj1];
|
|
let items5 = items4;
|
|
} else {
|
|
const obj2 = { translateY: null };
|
|
obj2[0] = interpolateResult1;
|
|
items5 = [obj2];
|
|
}
|
|
return items5;
|
|
}
|
|
}, items3);
|
|
let items4 = [style, tmp6[5], memo2];
|
|
let backdropComponent;
|
|
const memo3 = obj.useMemo(() => {
|
|
const items = [first, , ];
|
|
let obj = { zIndex: c10 + 1000 };
|
|
items[1] = obj;
|
|
obj = { transform: memo2 };
|
|
items[2] = obj;
|
|
return items;
|
|
}, items4);
|
|
if (null != stickyHeaderConfig) {
|
|
backdropComponent = stickyHeaderConfig.backdropComponent;
|
|
}
|
|
let items5 = [backdropComponent];
|
|
obj = { ref: animatedScrollY.refView, style: memo3 };
|
|
const memo4 = obj.useMemo(() => {
|
|
let backdropComponent;
|
|
if (null != stickyHeaderConfig) {
|
|
backdropComponent = tmp.backdropComponent;
|
|
}
|
|
let element1 = null;
|
|
if (backdropComponent) {
|
|
let obj = memo2;
|
|
obj = { style: null };
|
|
obj[0] = { inset: 0, pointerEvents: "none", position: "absolute" };
|
|
let backdropComponent1;
|
|
if (null != tmp) {
|
|
backdropComponent1 = tmp.backdropComponent;
|
|
}
|
|
if (typeof tmp5 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
let tmp7 = backdropComponent1;
|
|
if (!obj.isValidElement(backdropComponent1)) {
|
|
let element = null;
|
|
if (backdropComponent1) {
|
|
element = <backdropComponent1 />;
|
|
}
|
|
tmp7 = element;
|
|
}
|
|
element1 = <memo1.View style={null}>{tmp7}</memo1.View>;
|
|
tmp5 = outer1_112;
|
|
}
|
|
return element1;
|
|
}, items5);
|
|
const merged1 = Object.assign(merged);
|
|
return obj.createElement(memo1.Animated.View, { ref: animatedScrollY.refView, style: memo3 }, memo4, animatedScrollY.children);
|
|
});
|
|
if (undefined !== nativeFabricUIManager && null != nativeFabricUIManager) {
|
|
memoResult2 = memoResult1;
|
|
}
|
|
let context2 = noop.createContext(null);
|
|
noop = function noop() {
|
|
|
|
};
|
|
let map = new Map();
|
|
let closure_121 = memo(function Container2(id) {
|
|
let ItemSeparatorComponent;
|
|
let c0;
|
|
let measureInLayoutEffect;
|
|
let onLayoutChange;
|
|
let recycleItems;
|
|
let stickyHeaderConfig;
|
|
id = id.id;
|
|
let getActivityIndicator = id;
|
|
let itemKey = id.itemKey;
|
|
measureInLayoutEffect = itemKey;
|
|
let horizontal = id.horizontal;
|
|
let onLayoutProp = horizontal;
|
|
({ getRenderedItem: onLayoutChange, ItemSeparatorComponent } = id);
|
|
let _slicedToArray = ItemSeparatorComponent;
|
|
let callback1;
|
|
let columnWrapperStyle;
|
|
let num3;
|
|
let ref;
|
|
callback1 = undefined;
|
|
let num6;
|
|
let I18nManager;
|
|
let obj = frozen;
|
|
({ recycleItems, stickyHeaderConfig } = id);
|
|
const context = frozen.useContext(closure_17);
|
|
callback1 = context;
|
|
columnWrapperStyle = context.columnWrapperStyle;
|
|
const state = context.state;
|
|
let props;
|
|
if (null != state) {
|
|
props = state.props;
|
|
}
|
|
horizontal = undefined;
|
|
if (null != props) {
|
|
horizontal = props.horizontal;
|
|
}
|
|
let tmp5 = horizontal;
|
|
if (tmp5) {
|
|
let rtl;
|
|
if (null != props) {
|
|
rtl = props.rtl;
|
|
}
|
|
if (null == rtl) {
|
|
rtl = I18nManager.I18nManager.isRTL;
|
|
}
|
|
tmp5 = rtl;
|
|
}
|
|
let positionComponentInternal = context.state.props.positionComponentInternal;
|
|
let stickyPositionComponentInternal = context.state.props.stickyPositionComponentInternal;
|
|
let items = ["containerColumn" + id, "containerSpan" + id, "containerItemData" + id, "numColumns", "extraData", "containerSticky" + id];
|
|
getActivityIndicator = undefined;
|
|
measureInLayoutEffect = undefined;
|
|
const context1 = obj.useContext(closure_17);
|
|
getActivityIndicator = context1;
|
|
if (1 === items.length) {
|
|
let first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
measureInLayoutEffect = first;
|
|
const items1 = [context1, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
let obj1 = getActivityIndicator(measureInLayoutEffect[6]);
|
|
const tmp12 = _slicedToArray(obj1.useSyncExternalStore(memo.subscribe, get, get), 6);
|
|
const first1 = tmp12[0];
|
|
let num = 0;
|
|
if (undefined !== first1) {
|
|
num = first1;
|
|
}
|
|
let num2 = 1;
|
|
if (undefined !== tmp12[1]) {
|
|
num2 = tmp14;
|
|
}
|
|
num3 = 1;
|
|
if (undefined !== tmp12[3]) {
|
|
num3 = tmp15;
|
|
}
|
|
let obj2 = num6;
|
|
ref = num6.useRef(null);
|
|
getActivityIndicator = id;
|
|
measureInLayoutEffect = context;
|
|
onLayoutProp = ref;
|
|
onLayoutChange = undefined;
|
|
_slicedToArray = undefined;
|
|
callback1 = undefined;
|
|
const ref1 = num6.useRef({ didLayout: false, horizontal, itemKey });
|
|
onLayoutChange = ref1;
|
|
ref1.current.horizontal = horizontal;
|
|
ref1.current.itemKey = itemKey;
|
|
const tmp11Result = _slicedToArray(num6.useState(0), 2);
|
|
_slicedToArray = tmp11Result[1];
|
|
const items2 = [id, context, ref];
|
|
const items3 = [id, context];
|
|
const callback = num6.useCallback((arg0) => {
|
|
const current = itemKey.current;
|
|
itemKey = undefined;
|
|
let closure_4;
|
|
let f117272;
|
|
itemKey = current.itemKey;
|
|
current.didLayout = true;
|
|
closure_4 = arg0;
|
|
let str = "height";
|
|
if (current.horizontal) {
|
|
str = "width";
|
|
}
|
|
const result = Math.floor(8 * arg0[str]) / 8;
|
|
if (current.lastSize) {
|
|
const _Math = Math;
|
|
const result1 = Math.floor(8 * current.lastSize[str]) / 8;
|
|
}
|
|
const sizesKnown = measureInLayoutEffect.state.sizesKnown;
|
|
const value = sizesKnown.get(itemKey);
|
|
f117272 = () => {
|
|
|
|
};
|
|
if (!outer1_27) {
|
|
if (0 >= result) {
|
|
const current2 = current.current;
|
|
let measure;
|
|
if (null != current2) {
|
|
measure = current2.measure;
|
|
}
|
|
if (null != measure) {
|
|
const call = measure.call;
|
|
const fn = (arg0, arg1, width, height) => {
|
|
let obj = { height, width };
|
|
if (typeof f117272 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
current.lastSize = obj;
|
|
obj = { containerId: closure_0, itemKey, size: obj };
|
|
const items = [obj];
|
|
outer1_107(closure_1, items);
|
|
};
|
|
if (typeof call === "unknown") {
|
|
measure(fn);
|
|
} else {
|
|
call(current2, fn);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
current.lastSize = closure_4;
|
|
let items = [{ containerId: closure_0, itemKey, size: closure_4 }];
|
|
outer1_107(measureInLayoutEffect, items);
|
|
}, items2);
|
|
callback1 = num6.useCallback(() => {
|
|
if (outer1_27) {
|
|
outer1_87(measureInLayoutEffect, c0);
|
|
} else {
|
|
callback((arg0) => arg0 + 1);
|
|
}
|
|
}, items3);
|
|
const items4 = [id, context, callback1];
|
|
const layoutEffect = num6.useLayoutEffect(() => {
|
|
let containerLayoutTriggers = measureInLayoutEffect.containerLayoutTriggers;
|
|
const result = containerLayoutTriggers.set(c0, callback1);
|
|
return () => {
|
|
outer1_120.delete(ref.current);
|
|
const containerLayoutTriggers = obj.containerLayoutTriggers;
|
|
if (containerLayoutTriggers.get(closure_0) === closure_5) {
|
|
const containerLayoutTriggers2 = obj.containerLayoutTriggers;
|
|
containerLayoutTriggers2.delete(closure_0);
|
|
}
|
|
};
|
|
}, items4);
|
|
const layoutEffect1 = num6.useLayoutEffect(() => {
|
|
if (outer1_27) {
|
|
outer1_87(measureInLayoutEffect, c0);
|
|
}
|
|
});
|
|
obj = { measureInLayoutEffect: !closure_27, onLayoutChange: callback, ref };
|
|
const items5 = [itemKey, tmp11Result[0]];
|
|
getActivityIndicator = undefined;
|
|
measureInLayoutEffect = undefined;
|
|
onLayoutProp = undefined;
|
|
onLayoutChange = undefined;
|
|
({ ref: c0, measureInLayoutEffect } = obj);
|
|
if (measureInLayoutEffect === undefined) {
|
|
measureInLayoutEffect = true;
|
|
}
|
|
onLayoutProp = obj.onLayoutProp;
|
|
onLayoutChange = obj.onLayoutChange;
|
|
const items6 = [onLayoutChange, onLayoutProp];
|
|
const callback2 = obj2.useCallback((nativeEvent) => {
|
|
onScroll(nativeEvent.nativeEvent.layout, false);
|
|
if (null != context) {
|
|
context(nativeEvent);
|
|
}
|
|
}, items6);
|
|
if (closure_27) {
|
|
const items7 = [measureInLayoutEffect];
|
|
HermesBuiltin.arraySpread(items5, 1);
|
|
const layoutEffect2 = obj2.useLayoutEffect(() => {
|
|
let current = horizontal;
|
|
if (horizontal) {
|
|
current = stickyHeaderIndices.current;
|
|
}
|
|
if (current) {
|
|
const current2 = stickyHeaderIndices.current;
|
|
current2.measure((arg0, arg1, width, height) => {
|
|
callback({ height, width, x: arg0, y: arg1 }, true);
|
|
});
|
|
}
|
|
}, items7);
|
|
}
|
|
const items8 = [id, context, itemKey];
|
|
const effect = obj2.useEffect(() => {
|
|
if (!outer1_27) {
|
|
onLayoutChange.current.didLayout = false;
|
|
const _setTimeout = setTimeout;
|
|
const timeout = setTimeout(() => {
|
|
const current = ref.current;
|
|
const didLayout = current.didLayout;
|
|
let lastSize = !didLayout;
|
|
if (!didLayout) {
|
|
lastSize = current.lastSize;
|
|
}
|
|
if (lastSize) {
|
|
const obj = { containerId: null, itemKey: null, size: null };
|
|
obj[0] = closure_0;
|
|
({ itemKey: obj[1], lastSize: obj[2] } = current);
|
|
const items = [obj];
|
|
outer1_107(closure_1, items);
|
|
current.didLayout = true;
|
|
}
|
|
}, 16);
|
|
return () => {
|
|
clearTimeout(closure_0);
|
|
};
|
|
}
|
|
}, items8);
|
|
let num5 = 1;
|
|
if (num > 0) {
|
|
num5 = num;
|
|
}
|
|
if (!num2) {
|
|
num2 = 1;
|
|
}
|
|
num6 = 0;
|
|
const bound = Math.min(Math.max(num2, 1), num3);
|
|
if (num3 > 1) {
|
|
num6 = `${(num5 - 1) / num3 * 100}%`;
|
|
}
|
|
let text;
|
|
if (num3 > 1) {
|
|
text = `${tmp31 / num3 * 100}%`;
|
|
}
|
|
I18nManager = text;
|
|
const items9 = [horizontal, tmp5, num6, text, columnWrapperStyle, context.state.props.contentContainerAlignItems, num3, ItemSeparatorComponent];
|
|
const items10 = [itemKey, tmp12[2], tmp12[4]];
|
|
const memo1 = obj2.useMemo(() => {
|
|
let columnGap;
|
|
let gap;
|
|
let rowGap;
|
|
if (!columnWrapperStyle) {
|
|
if (tmp4) {
|
|
let num11;
|
|
if ("flex-end" === tmp2) {
|
|
if (1 === tmp5) {
|
|
num11 = 0;
|
|
}
|
|
}
|
|
let obj = { bottom: null, boxSizing: null, direction: "r", flexDirection: 0, height: "absolute", left: null, position: 24, top: 36 };
|
|
obj[0] = num11;
|
|
let str3;
|
|
if (obj) {
|
|
str3 = "border-box";
|
|
}
|
|
obj[1] = str3;
|
|
let str4;
|
|
if (!tmp3) {
|
|
str4 = "row";
|
|
}
|
|
obj[3] = str4;
|
|
obj[4] = tmp7;
|
|
if ("flex-end" !== tmp2) {
|
|
const tmp19 = tmp6;
|
|
}
|
|
obj[7] = tmp19;
|
|
if (!obj) {
|
|
obj = {};
|
|
}
|
|
const merged = Object.assign(obj);
|
|
} else {
|
|
let str;
|
|
if (obj) {
|
|
str = "border-box";
|
|
}
|
|
obj = { boxSizing: null, left: null, position: "absolute", right: null, top: 0, width: null };
|
|
obj[0] = str;
|
|
obj[1] = tmp6;
|
|
let tmp14 = 0;
|
|
if (tmp5 > 1) {
|
|
tmp14 = null;
|
|
}
|
|
obj[3] = tmp14;
|
|
obj[5] = tmp7;
|
|
let obj1 = obj;
|
|
if (!obj) {
|
|
obj1 = {};
|
|
}
|
|
const merged1 = Object.assign(obj1);
|
|
}
|
|
return obj;
|
|
} else {
|
|
({ columnGap, rowGap, gap } = columnWrapperStyle);
|
|
if (tmp4) {
|
|
let result;
|
|
if (tmp5 > 1) {
|
|
let num7 = rowGap;
|
|
if (!rowGap) {
|
|
num7 = gap;
|
|
}
|
|
if (!num7) {
|
|
num7 = 0;
|
|
}
|
|
result = num7 / 2;
|
|
}
|
|
const obj2 = { paddingBottom: null, paddingRight: null, paddingTop: null };
|
|
obj2[0] = result;
|
|
if (!columnGap) {
|
|
columnGap = gap;
|
|
}
|
|
obj2[1] = columnGap;
|
|
let result1;
|
|
if (tmp5 > 1) {
|
|
if (!rowGap) {
|
|
rowGap = gap;
|
|
}
|
|
if (!rowGap) {
|
|
rowGap = 0;
|
|
}
|
|
result1 = rowGap / 2;
|
|
}
|
|
obj2[2] = result1;
|
|
let obj3 = obj2;
|
|
} else {
|
|
let tmp8 = rowGap;
|
|
if (!rowGap) {
|
|
tmp8 = gap;
|
|
}
|
|
obj3 = { paddingBottom: null, paddingLeft: null, paddingRight: null };
|
|
obj3[0] = tmp8;
|
|
let result2;
|
|
if (tmp5 > 1) {
|
|
let num2 = columnGap;
|
|
if (!columnGap) {
|
|
num2 = gap;
|
|
}
|
|
if (!num2) {
|
|
num2 = 0;
|
|
}
|
|
result2 = num2 / 2;
|
|
}
|
|
obj3[1] = result2;
|
|
let result3;
|
|
if (tmp5 > 1) {
|
|
let num4 = columnGap;
|
|
if (!columnGap) {
|
|
num4 = gap;
|
|
}
|
|
if (!num4) {
|
|
num4 = 0;
|
|
}
|
|
result3 = num4 / 2;
|
|
}
|
|
obj3[2] = result3;
|
|
}
|
|
}
|
|
}, items9);
|
|
const memo2 = obj2.useMemo(() => {
|
|
let tmp2 = null;
|
|
if (undefined !== measureInLayoutEffect) {
|
|
tmp2 = onLayoutChange(tmp);
|
|
}
|
|
return tmp2;
|
|
}, items10);
|
|
obj = memo2;
|
|
if (!memo2) {
|
|
obj = {};
|
|
}
|
|
const items11 = [id, callback1];
|
|
const memo3 = obj2.useMemo(() => {
|
|
const viewRefs = callback1.viewRefs;
|
|
const result = viewRefs.set(c0, ref);
|
|
return { containerId: c0, triggerLayout: callback1 };
|
|
}, items11);
|
|
if (tmp12[5]) {
|
|
if (!stickyPositionComponentInternal) {
|
|
stickyPositionComponentInternal = closure_113;
|
|
}
|
|
positionComponentInternal = stickyPositionComponentInternal;
|
|
} else if (!positionComponentInternal) {
|
|
positionComponentInternal = memoResult2;
|
|
}
|
|
let animatedScrollY;
|
|
if (tmp12[5]) {
|
|
animatedScrollY = context.animatedScrollY;
|
|
}
|
|
obj1 = { animatedScrollY, horizontal, id, key: null, onLayout: null, refView: null, stickyHeaderConfig: null, style: null };
|
|
let tmp37;
|
|
if (!recycleItems) {
|
|
tmp37 = itemKey;
|
|
}
|
|
obj1[3] = tmp37;
|
|
obj1[4] = callback2;
|
|
obj1[5] = ref;
|
|
obj1[6] = stickyHeaderConfig;
|
|
obj1[7] = memo1;
|
|
obj2 = { value: memo3 };
|
|
let element = memo2;
|
|
if (memo2) {
|
|
element = ItemSeparatorComponent;
|
|
}
|
|
if (element) {
|
|
let obj3 = { ItemSeparatorComponent: null, leadingItem: null };
|
|
obj3[0] = ItemSeparatorComponent;
|
|
obj3[1] = memo2.item;
|
|
element = <Separator ItemSeparatorComponent={null} leadingItem={null} />;
|
|
}
|
|
return <positionComponentInternal animatedScrollY={animatedScrollY} horizontal={horizontal} id={id} key={null} onLayout={null} refView={null} stickyHeaderConfig={null} style={null}><redux2.Provider value={memo3}>{obj.renderedItem}{element}</redux2.Provider></positionComponentInternal>;
|
|
});
|
|
let closure_123 = memo(function ContainerSlot2(arg0) {
|
|
const merged = Object.assign(arg0);
|
|
return <ContainerSlotBase />;
|
|
});
|
|
let closure_124 = memo(function ContainersLayer2(horizontal) {
|
|
let columnGap;
|
|
let gap;
|
|
let rowGap;
|
|
let tmp6;
|
|
let tmp7;
|
|
let tmp8;
|
|
horizontal = horizontal.horizontal;
|
|
let obj = frozen;
|
|
const columnWrapperStyle = frozen.useContext(closure_17).columnWrapperStyle;
|
|
const tmp = useValue$("totalSize");
|
|
const items = ["readyToRender", "numColumns", "otherAxisSize"];
|
|
let context;
|
|
let first;
|
|
context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
const obj2 = context(first[6]);
|
|
[tmp6, tmp7, tmp8] = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 3);
|
|
let num = 0;
|
|
if (undefined !== tmp8) {
|
|
num = tmp8;
|
|
}
|
|
if (horizontal) {
|
|
let str2 = num;
|
|
if (!num) {
|
|
str2 = "100%";
|
|
}
|
|
obj = { height: null, minHeight: null, opacity: null, width: null };
|
|
obj[0] = str2;
|
|
obj[1] = num;
|
|
let num3 = 0;
|
|
if (tmp6) {
|
|
num3 = 1;
|
|
}
|
|
obj[2] = num3;
|
|
obj[3] = tmp;
|
|
} else {
|
|
obj = { height: null, minWidth: null, opacity: null };
|
|
obj[0] = tmp;
|
|
obj[1] = num;
|
|
let num2 = 0;
|
|
if (tmp6) {
|
|
num2 = 1;
|
|
}
|
|
obj[2] = num2;
|
|
}
|
|
if (columnWrapperStyle) {
|
|
({ columnGap, rowGap, gap } = columnWrapperStyle);
|
|
if (!columnGap) {
|
|
columnGap = gap;
|
|
}
|
|
if (!columnGap) {
|
|
columnGap = 0;
|
|
}
|
|
if (!rowGap) {
|
|
rowGap = gap;
|
|
}
|
|
if (!rowGap) {
|
|
rowGap = 0;
|
|
}
|
|
if (horizontal) {
|
|
let tmp10 = rowGap;
|
|
if (rowGap) {
|
|
tmp10 = tmp7 > 1;
|
|
}
|
|
if (tmp10) {
|
|
obj.marginVertical = -rowGap / 2;
|
|
}
|
|
if (columnGap) {
|
|
obj.marginRight = -columnGap;
|
|
}
|
|
} else {
|
|
let tmp9 = columnGap;
|
|
if (columnGap) {
|
|
tmp9 = tmp7 > 1;
|
|
}
|
|
if (tmp9) {
|
|
obj.marginHorizontal = -columnGap;
|
|
}
|
|
if (rowGap) {
|
|
obj.marginBottom = -rowGap;
|
|
}
|
|
}
|
|
}
|
|
return obj.createElement(get_ActivityIndicator.Animated.View, { style: obj }, <closure_110>{arg0.children}</closure_110>);
|
|
});
|
|
let closure_125 = memo(function Containers2(horizontal) {
|
|
let ItemSeparatorComponent;
|
|
let getRenderedItem;
|
|
let recycleItems;
|
|
let stickyHeaderConfig;
|
|
horizontal = horizontal.horizontal;
|
|
const items = ["numContainersPooled"];
|
|
let context;
|
|
let first;
|
|
let obj = frozen;
|
|
({ recycleItems, ItemSeparatorComponent, stickyHeaderConfig, getRenderedItem } = horizontal);
|
|
context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
const first1 = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0];
|
|
const items2 = [];
|
|
let num = 0;
|
|
if (0 < first1) {
|
|
do {
|
|
let tmp5 = frozen;
|
|
let tmp6 = closure_123;
|
|
obj = { getRenderedItem: null, horizontal: null, ItemSeparatorComponent: null, id: null, key: null, recycleItems: null, stickyHeaderConfig: null };
|
|
obj[0] = getRenderedItem;
|
|
obj[1] = horizontal;
|
|
obj[2] = ItemSeparatorComponent;
|
|
obj[3] = num;
|
|
obj[4] = num;
|
|
obj[5] = recycleItems;
|
|
obj[6] = stickyHeaderConfig;
|
|
let arr = items2.push(<closure_123 getRenderedItem={null} horizontal={null} ItemSeparatorComponent={null} id={null} key={null} recycleItems={null} stickyHeaderConfig={null} />);
|
|
num = num + 1;
|
|
obj = frozen;
|
|
} while (num < first1);
|
|
}
|
|
return <closure_124 horizontal={horizontal}>{items2}</closure_124>;
|
|
});
|
|
const ScrollView = get_ActivityIndicator.Animated.ScrollView;
|
|
let closure_128 = frozen.forwardRef(function SnapWrapperInner(ScrollComponent, ref) {
|
|
const merged = Object.assign(ScrollComponent, Object.create(null));
|
|
const items = ["snapToOffsets"];
|
|
let context;
|
|
let first;
|
|
let obj = frozen;
|
|
context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
obj = {};
|
|
const merged1 = Object.assign(merged);
|
|
obj.ref = ref;
|
|
obj.snapToOffsets = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0];
|
|
return obj.createElement(ScrollComponent.ScrollComponent, {});
|
|
});
|
|
function LayoutView(onLayoutChange) {
|
|
let measureInLayoutEffect;
|
|
const refView = onLayoutChange.refView;
|
|
const merged = Object.assign(onLayoutChange, Object.create(null));
|
|
let obj = noop;
|
|
let ref = noop.useRef(null);
|
|
if (null != refView) {
|
|
ref = refView;
|
|
}
|
|
obj = { onLayoutChange: onLayoutChange.onLayoutChange, ref };
|
|
({ ref: get_ActivityIndicator, measureInLayoutEffect } = obj);
|
|
if (measureInLayoutEffect === undefined) {
|
|
measureInLayoutEffect = true;
|
|
}
|
|
const onLayoutProp = obj.onLayoutProp;
|
|
onLayoutChange = obj.onLayoutChange;
|
|
const items = [onLayoutChange, onLayoutProp];
|
|
const callback = obj.useCallback((nativeEvent) => {
|
|
onScroll(nativeEvent.nativeEvent.layout, false);
|
|
if (null != context) {
|
|
context(nativeEvent);
|
|
}
|
|
}, items);
|
|
if (closure_27) {
|
|
const items1 = [measureInLayoutEffect];
|
|
HermesBuiltin.arraySpread([], 1);
|
|
const layoutEffect = obj.useLayoutEffect(() => {
|
|
let current = horizontal;
|
|
if (horizontal) {
|
|
current = stickyHeaderIndices.current;
|
|
}
|
|
if (current) {
|
|
const current2 = stickyHeaderIndices.current;
|
|
current2.measure((arg0, arg1, width, height) => {
|
|
callback({ height, width, x: arg0, y: arg1 }, true);
|
|
});
|
|
}
|
|
}, items1);
|
|
}
|
|
obj = {};
|
|
const merged1 = Object.assign(merged);
|
|
obj.onLayout = callback;
|
|
obj.ref = ref;
|
|
return <get ActivityIndicator.View />;
|
|
}
|
|
let closure_130 = memo(function AlignItemsAtEndSpacer2(horizontal) {
|
|
const items = ["alignItemsAtEndPadding"];
|
|
let context;
|
|
let first;
|
|
let obj = frozen;
|
|
context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
let obj1 = context(first[6]);
|
|
const first1 = _slicedToArray(obj1.useSyncExternalStore(memo.subscribe, get, get), 1)[0];
|
|
let num = 0;
|
|
if (undefined !== first1) {
|
|
num = first1;
|
|
}
|
|
if (num <= 0) {
|
|
return null;
|
|
} else {
|
|
if (horizontal.horizontal) {
|
|
obj = { flexShrink: 0, width: null };
|
|
obj[1] = num;
|
|
} else {
|
|
obj = { flexShrink: 0, height: null };
|
|
obj[1] = num;
|
|
}
|
|
obj1 = { style: null };
|
|
obj1[0] = obj;
|
|
const element = <closure_13 style={null}>{null}</closure_13>;
|
|
const tmp5 = closure_13;
|
|
}
|
|
});
|
|
let closure_131 = memo(function ListComponent2(ListFooterComponent) {
|
|
let ItemSeparatorComponent;
|
|
let ListEmptyComponent;
|
|
let ListFooterComponentStyle;
|
|
let ListHeaderComponent;
|
|
let ListHeaderComponentStyle;
|
|
let alignItemsAtEnd;
|
|
let canRender;
|
|
let contentContainerStyle;
|
|
let getRenderedItem;
|
|
let horizontal;
|
|
let initialContentOffset;
|
|
let onInternalScrollBeginDrag;
|
|
let onInternalScrollEnd;
|
|
let onLayout;
|
|
let onLayoutFooter;
|
|
let onScroll;
|
|
let recycleItems;
|
|
let refScrollView;
|
|
let renderScrollComponent;
|
|
let scrollAdjustHandler;
|
|
let snapToIndices;
|
|
let stickyHeaderConfig;
|
|
let stickyHeaderIndices;
|
|
let style;
|
|
let useWindowScroll;
|
|
({ canRender, style, horizontal } = ListFooterComponent);
|
|
let ref = horizontal;
|
|
({ initialContentOffset, alignItemsAtEnd, ListHeaderComponent } = ListFooterComponent);
|
|
let ref1 = ListHeaderComponent;
|
|
ListFooterComponent = ListFooterComponent.ListFooterComponent;
|
|
({ ListEmptyComponent, renderScrollComponent, onLayoutFooter } = ListFooterComponent);
|
|
({ onInternalScrollEnd, scrollAdjustHandler, snapToIndices, stickyHeaderIndices, useWindowScroll } = ListFooterComponent);
|
|
({ contentContainerStyle, recycleItems, ItemSeparatorComponent, onScroll, onLayout, ListHeaderComponentStyle, ListFooterComponentStyle, getRenderedItem, refScrollView, onInternalScrollBeginDrag, stickyHeaderConfig } = ListFooterComponent);
|
|
let merged = Object.assign(ListFooterComponent, Object.create(null));
|
|
let context;
|
|
let callback;
|
|
let obj = frozen;
|
|
context = frozen.useContext(closure_17);
|
|
const maintainVisibleContentPosition = context.state.props.maintainVisibleContentPosition;
|
|
const items = ["otherAxisSize"];
|
|
ref = undefined;
|
|
ref1 = undefined;
|
|
const context1 = frozen.useContext(closure_17);
|
|
ref = context1;
|
|
if (1 === items.length) {
|
|
let first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
ref1 = first;
|
|
const items1 = [context1, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
let obj1 = ref(ref1[6]);
|
|
const first1 = context(obj1.useSyncExternalStore(memo.subscribe, get, get), 1)[0];
|
|
let num = 0;
|
|
if (undefined !== first1) {
|
|
num = first1;
|
|
}
|
|
let alignItemsAtEndPaddingEnabled = context.state.props.alignItemsAtEndPaddingEnabled;
|
|
if (context.state.needsOtherAxisSize) {
|
|
if (num) {
|
|
if (num > 0) {
|
|
if (horizontal) {
|
|
obj = { height: null };
|
|
obj[0] = num;
|
|
} else {
|
|
obj = { width: null };
|
|
obj[0] = num;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const fn = (arg0, ref) => {
|
|
const obj = {};
|
|
const merged = Object.assign(arg0);
|
|
obj.ref = ref;
|
|
return obj;
|
|
};
|
|
ref = obj.useRef(renderScrollComponent);
|
|
ref.current = renderScrollComponent;
|
|
ref1 = obj.useRef(fn);
|
|
ref1.current = fn;
|
|
const items2 = [ref1, ref];
|
|
let memo1 = obj.useMemo(() => outer1_12.forwardRef((AUTO_DISMISS, current) => {
|
|
current = ref.current;
|
|
if (null == current) {
|
|
return null;
|
|
} else {
|
|
const call = current.call;
|
|
const currentResult = ref2.current(AUTO_DISMISS, current);
|
|
typeof call === "unknown" ? current(currentResult) : call(ref, currentResult);
|
|
}
|
|
}), items2);
|
|
if (!renderScrollComponent) {
|
|
memo1 = ScrollView;
|
|
}
|
|
let tmp12 = memo1;
|
|
if (snapToIndices) {
|
|
tmp12 = closure_128;
|
|
}
|
|
const items3 = [context];
|
|
callback = noop.useCallback((arg0, arg1) => {
|
|
const values = context.values;
|
|
let tmp2 = values.get("footerSize") !== arg0;
|
|
if (tmp2) {
|
|
outer1_22(tmp, "footerSize", arg0);
|
|
outer1_50(tmp);
|
|
}
|
|
if (null != arg1) {
|
|
arg1();
|
|
}
|
|
if (tmp2) {
|
|
const maintainScrollAtEnd = tmp.state.props.maintainScrollAtEnd;
|
|
let onFooterLayout;
|
|
if (null != maintainScrollAtEnd) {
|
|
onFooterLayout = maintainScrollAtEnd.onFooterLayout;
|
|
}
|
|
tmp2 = onFooterLayout;
|
|
}
|
|
if (tmp2) {
|
|
outer1_64(tmp);
|
|
}
|
|
}, items3);
|
|
const items4 = [ListHeaderComponent, ListFooterComponent, context, callback];
|
|
const layoutEffect = noop.useLayoutEffect(() => {
|
|
let didContainersLayout;
|
|
let didFinishInitialScroll;
|
|
let props;
|
|
let scroll;
|
|
let scrollingTo;
|
|
let state;
|
|
let values;
|
|
if (!ref1) {
|
|
({ state, values } = context);
|
|
const tmp2 = values.get("headerSize") || 0;
|
|
let flag = state.didMeasureHeader;
|
|
if (!flag) {
|
|
flag = tmp2 > 0.1;
|
|
}
|
|
if (tmp2 !== 0) {
|
|
outer1_22(tmp, "headerSize", 0);
|
|
outer1_50(tmp);
|
|
if (flag) {
|
|
({ didContainersLayout, didFinishInitialScroll, props, scroll, scrollingTo } = tmp.state);
|
|
if (props.horizontal) {
|
|
const stylePaddingLeft = props.stylePaddingLeft;
|
|
flag = false;
|
|
} else {
|
|
const stylePaddingTop = props.stylePaddingTop;
|
|
flag = false;
|
|
}
|
|
}
|
|
if (flag) {
|
|
outer1_65(tmp, 0 - tmp2);
|
|
}
|
|
}
|
|
state.didMeasureHeader = true;
|
|
}
|
|
if (!ListFooterComponent) {
|
|
callback(0);
|
|
}
|
|
}, items4);
|
|
const items5 = [context, horizontal];
|
|
const items6 = [horizontal, onLayoutFooter, callback];
|
|
const callback1 = noop.useCallback((arg0) => {
|
|
let didContainersLayout;
|
|
let didFinishInitialScroll;
|
|
let props;
|
|
let scroll;
|
|
let scrollingTo;
|
|
let state;
|
|
let values;
|
|
let str = "height";
|
|
if (ref) {
|
|
str = "width";
|
|
}
|
|
({ state, values } = context);
|
|
const tmp3 = values.get("headerSize") || 0;
|
|
let flag = state.didMeasureHeader;
|
|
if (!flag) {
|
|
flag = tmp3 > 0.1;
|
|
}
|
|
if (tmp3 !== arg0[str]) {
|
|
outer1_22(tmp2, "headerSize", tmp);
|
|
outer1_50(tmp2);
|
|
if (flag) {
|
|
({ didContainersLayout, didFinishInitialScroll, props, scroll, scrollingTo } = tmp2.state);
|
|
if (props.horizontal) {
|
|
const stylePaddingLeft = props.stylePaddingLeft;
|
|
flag = false;
|
|
} else {
|
|
const stylePaddingTop = props.stylePaddingTop;
|
|
flag = false;
|
|
}
|
|
}
|
|
if (flag) {
|
|
outer1_65(tmp2, tmp - tmp3);
|
|
}
|
|
}
|
|
state.didMeasureHeader = true;
|
|
}, items5);
|
|
obj1 = {};
|
|
const callback2 = noop.useCallback((arg0, arg1) => {
|
|
let closure_0 = arg0;
|
|
let closure_1 = arg1;
|
|
let str = "height";
|
|
if (closure_0) {
|
|
str = "width";
|
|
}
|
|
callback(arg0[str], () => {
|
|
if (null != outer1_3) {
|
|
tmp(closure_0, closure_1);
|
|
}
|
|
});
|
|
}, items6);
|
|
const merged1 = Object.assign(merged);
|
|
obj1.onScrollBeginDrag = onInternalScrollBeginDrag;
|
|
const items7 = [horizontal ? { height: "100%" } : {}, contentContainerStyle];
|
|
obj1.contentContainerStyle = items7;
|
|
if (undefined === initialContentOffset) {
|
|
obj1.contentOffset = undefined;
|
|
obj1.horizontal = horizontal;
|
|
if (maintainVisibleContentPosition.size) {
|
|
const obj2 = { minIndexForVisible: 0 };
|
|
}
|
|
obj1.maintainVisibleContentPosition = obj2;
|
|
obj1.onLayout = onLayout;
|
|
obj1.onScroll = onScroll;
|
|
obj1.ref = refScrollView;
|
|
let tmp19;
|
|
if (snapToIndices) {
|
|
tmp19 = memo1;
|
|
}
|
|
obj1.ScrollComponent = tmp19;
|
|
let tmp20 = style;
|
|
if (tmp7) {
|
|
const items8 = [tmp7, style];
|
|
tmp20 = items8;
|
|
}
|
|
obj1.style = tmp20;
|
|
const element = <ScrollAdjust />;
|
|
let element2 = ListHeaderComponent;
|
|
if (ListHeaderComponent) {
|
|
const obj3 = { onLayoutChange: null, style: null };
|
|
obj3[0] = callback1;
|
|
obj3[1] = ListHeaderComponentStyle;
|
|
if (typeof getComponent !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
let tmp26 = ListHeaderComponent;
|
|
if (!obj.isValidElement(ListHeaderComponent)) {
|
|
let element1 = null;
|
|
if (ListHeaderComponent) {
|
|
element1 = <ListHeaderComponent />;
|
|
}
|
|
tmp26 = element1;
|
|
}
|
|
element2 = <LayoutView onLayoutChange={null} style={null}>{tmp26}</LayoutView>;
|
|
const tmp24 = LayoutView;
|
|
}
|
|
let tmp28 = ListEmptyComponent;
|
|
if (ListEmptyComponent) {
|
|
if (typeof getComponent !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
let tmp30 = ListEmptyComponent;
|
|
if (!obj.isValidElement(ListEmptyComponent)) {
|
|
let element3 = null;
|
|
if (ListEmptyComponent) {
|
|
element3 = <ListEmptyComponent />;
|
|
}
|
|
tmp30 = element3;
|
|
}
|
|
tmp28 = tmp30;
|
|
}
|
|
if (alignItemsAtEndPaddingEnabled) {
|
|
const obj4 = { horizontal: null };
|
|
obj4[0] = horizontal;
|
|
alignItemsAtEndPaddingEnabled = <closure_130 horizontal={null} />;
|
|
}
|
|
if (canRender) {
|
|
canRender = !ListEmptyComponent;
|
|
}
|
|
if (canRender) {
|
|
const obj5 = { getRenderedItem: null, horizontal: null, ItemSeparatorComponent: null, recycleItems: null, stickyHeaderConfig: null };
|
|
obj5[0] = getRenderedItem;
|
|
obj5[1] = horizontal;
|
|
obj5[2] = ItemSeparatorComponent;
|
|
obj5[3] = recycleItems;
|
|
obj5[4] = stickyHeaderConfig;
|
|
canRender = <closure_125 getRenderedItem={null} horizontal={null} ItemSeparatorComponent={null} recycleItems={null} stickyHeaderConfig={null} />;
|
|
}
|
|
let element5 = ListFooterComponent;
|
|
if (ListFooterComponent) {
|
|
const obj6 = { onLayoutChange: null, style: null };
|
|
obj6[0] = callback2;
|
|
obj6[1] = ListFooterComponentStyle;
|
|
if (typeof getComponent !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
let tmp37 = ListFooterComponent;
|
|
if (!obj.isValidElement(ListFooterComponent)) {
|
|
let element4 = null;
|
|
if (ListFooterComponent) {
|
|
element4 = <ListFooterComponent />;
|
|
}
|
|
tmp37 = element4;
|
|
}
|
|
element5 = <LayoutView onLayoutChange={null} style={null}>{tmp37}</LayoutView>;
|
|
const tmp35 = LayoutView;
|
|
}
|
|
let tmp39 = closure_31;
|
|
if (closure_31) {
|
|
tmp39 = flag;
|
|
}
|
|
return <tmp12 {......obj1}>{element}{element2}{tmp28}{alignItemsAtEndPaddingEnabled}{canRender}{element5}{false}{tmp39}</tmp12>;
|
|
} else if (horizontal) {
|
|
const obj7 = { x: null, y: 0 };
|
|
obj7[0] = initialContentOffset;
|
|
let obj8 = obj7;
|
|
} else {
|
|
obj8 = { x: 0, y: null };
|
|
obj8[1] = initialContentOffset;
|
|
}
|
|
});
|
|
let closure_132 = tmp16 ? (function useDevChecksImpl(childrenMode) {
|
|
const context = frozen.useContext(closure_17);
|
|
childrenMode = childrenMode.childrenMode;
|
|
const keyExtractor = childrenMode.keyExtractor;
|
|
const renderScrollComponent = childrenMode.renderScrollComponent;
|
|
const useWindowScroll = childrenMode.useWindowScroll;
|
|
const items = [renderScrollComponent, useWindowScroll];
|
|
const effect = noop.useEffect(() => {
|
|
let tmp = useWindowScroll;
|
|
if (useWindowScroll) {
|
|
tmp = renderScrollComponent;
|
|
}
|
|
if (tmp) {
|
|
let tmp2 = outer1_31;
|
|
if (outer1_31) {
|
|
tmp2 = !outer1_53.has("useWindowScrollRenderScrollComponent");
|
|
}
|
|
if (tmp2) {
|
|
outer1_53.add("useWindowScrollRenderScrollComponent");
|
|
const _console = console;
|
|
const _HermesInternal = HermesInternal;
|
|
console.warn("[legend-list] " + "useWindowScroll is not supported when renderScrollComponent is provided.");
|
|
}
|
|
}
|
|
}, items);
|
|
const items1 = [childrenMode, context, keyExtractor];
|
|
const effect1 = noop.useEffect(() => {
|
|
let isFirst = keyExtractor;
|
|
if (!keyExtractor) {
|
|
isFirst = context.state.isFirst;
|
|
}
|
|
if (!isFirst) {
|
|
isFirst = !context.state.didDataChange;
|
|
}
|
|
if (!isFirst) {
|
|
isFirst = childrenMode;
|
|
}
|
|
if (!isFirst) {
|
|
let tmp3 = outer1_31;
|
|
if (outer1_31) {
|
|
tmp3 = !outer1_53.has("keyExtractor");
|
|
}
|
|
if (tmp3) {
|
|
outer1_53.add("keyExtractor");
|
|
const _console = console;
|
|
const _HermesInternal = HermesInternal;
|
|
console.warn("[legend-list] " + "Changing data without a keyExtractor can cause slow performance and resetting scroll. If your list data can change you should use a keyExtractor with a unique id for best performance and behavior.");
|
|
}
|
|
}
|
|
}, items1);
|
|
const items2 = [context];
|
|
const effect2 = noop.useEffect(() => {
|
|
const state = context.state;
|
|
}, items2);
|
|
}) : (function useDevChecksNoop(arg0) {
|
|
|
|
});
|
|
class ScrollAdjustHandler {
|
|
constructor(arg0) {
|
|
tmp = normalizeMaintainScrollAtEndOn(this, ScrollAdjustHandler);
|
|
this.appliedAdjust = 0;
|
|
this.pendingAdjust = 0;
|
|
this.ctx = global;
|
|
return;
|
|
}
|
|
}
|
|
get_ActivityIndicator = ScrollAdjustHandler;
|
|
let items = [
|
|
{
|
|
key: "requestAdjust",
|
|
value: function requestAdjust(arg0) {
|
|
const self = this;
|
|
const scrollingTo = this.ctx.state.scrollingTo;
|
|
let animated;
|
|
if (null != scrollingTo) {
|
|
animated = scrollingTo.animated;
|
|
}
|
|
if (animated) {
|
|
if (!scrollingTo.isInitialScroll) {
|
|
self.pendingAdjust = self.pendingAdjust + arg0;
|
|
set$(self.ctx, "scrollAdjustPending", self.pendingAdjust);
|
|
}
|
|
if (self.ctx.state.scrollingTo) {
|
|
const ctx = self.ctx;
|
|
const scrollingTo2 = ctx.state.scrollingTo;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
ctx.state.animFrameCheckFinishedScroll = requestAnimationFrame(() => {
|
|
const scrollingTo = tmp.state.scrollingTo;
|
|
if (scrollingTo) {
|
|
const state = tmp.state;
|
|
state.animFrameCheckFinishedScroll = undefined;
|
|
const tmp3 = outer1_62(tmp, scrollingTo);
|
|
let isAtResolvedTarget = tmp3.isAtResolvedTarget;
|
|
if (isAtResolvedTarget) {
|
|
const isInitialScroll = scrollingTo.isInitialScroll;
|
|
let hasScrolled = !isInitialScroll;
|
|
if (isInitialScroll) {
|
|
hasScrolled = state.hasScrolled;
|
|
}
|
|
if (!hasScrolled) {
|
|
hasScrolled = tmp3.clampedTargetOffset <= 1;
|
|
}
|
|
isAtResolvedTarget = hasScrolled;
|
|
}
|
|
if (isAtResolvedTarget) {
|
|
outer1_60(tmp);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
self.appliedAdjust = self.appliedAdjust + arg0;
|
|
set$(self.ctx, "scrollAdjust", self.appliedAdjust);
|
|
}
|
|
},
|
|
{
|
|
key: "getAdjust",
|
|
value: function getAdjust() {
|
|
return this.appliedAdjust;
|
|
}
|
|
},
|
|
{
|
|
key: "commitPendingAdjust",
|
|
value: function commitPendingAdjust(scrollingTo) {
|
|
const self = this;
|
|
let state = this.ctx.state;
|
|
const pendingAdjust = this.pendingAdjust;
|
|
this.pendingAdjust = 0;
|
|
if (0 !== pendingAdjust) {
|
|
let index;
|
|
if (null != scrollingTo) {
|
|
index = scrollingTo.index;
|
|
}
|
|
if (undefined !== index) {
|
|
index = scrollingTo.index;
|
|
const tmp7 = calculateOffsetWithOffsetPosition(self.ctx, undefined !== index && self.ctx.state.positions[index] || 0, scrollingTo);
|
|
const ctx = self.ctx;
|
|
const state2 = ctx.state;
|
|
const tmp9 = getContentSize(ctx);
|
|
const _Number2 = Number;
|
|
let bound1 = tmp7;
|
|
if (Number.isFinite(tmp9)) {
|
|
const _Number3 = Number;
|
|
bound1 = tmp7;
|
|
if (Number.isFinite(state2.scrollLength)) {
|
|
bound1 = tmp7;
|
|
if (state2.lastLayout) {
|
|
const _Math4 = Math;
|
|
let viewOffset;
|
|
const bound = Math.max(0, tmp9 - state2.scrollLength);
|
|
if (null != scrollingTo) {
|
|
viewOffset = scrollingTo.viewOffset;
|
|
}
|
|
let num2 = 0;
|
|
if (typeof viewOffset === "number") {
|
|
num2 = 0;
|
|
if (viewOffset < 0) {
|
|
num2 = -viewOffset;
|
|
}
|
|
}
|
|
const _Math5 = Math;
|
|
bound1 = Math.min(tmp7, bound + num2);
|
|
}
|
|
}
|
|
}
|
|
const _Math6 = Math;
|
|
let bound2 = Math.max(0, bound1);
|
|
const tmp5 = undefined !== index && self.ctx.state.positions[index] || 0;
|
|
} else {
|
|
const ctx3 = self.ctx;
|
|
const sum = state.scroll + pendingAdjust;
|
|
const state3 = ctx3.state;
|
|
const tmp27 = getContentSize(ctx3);
|
|
const _Number4 = Number;
|
|
let bound4 = sum;
|
|
if (Number.isFinite(tmp27)) {
|
|
const _Number = Number;
|
|
bound4 = sum;
|
|
if (Number.isFinite(state3.scrollLength)) {
|
|
bound4 = sum;
|
|
if (state3.lastLayout) {
|
|
const _Math = Math;
|
|
let num = 0;
|
|
const bound3 = Math.max(0, tmp27 - state3.scrollLength);
|
|
if (typeof undefined === "number") {
|
|
num = 0;
|
|
if (undefined < 0) {
|
|
num = NaN;
|
|
}
|
|
}
|
|
const _Math2 = Math;
|
|
bound4 = Math.min(sum, bound3 + num);
|
|
}
|
|
}
|
|
}
|
|
const _Math3 = Math;
|
|
bound2 = Math.max(0, bound4);
|
|
}
|
|
const diff = bound2 - state.scroll;
|
|
const _Math7 = Math;
|
|
let tmp16 = Math.abs(diff) > 0.1;
|
|
if (!tmp16) {
|
|
const _Math8 = Math;
|
|
tmp16 = Math.abs(pendingAdjust) > 0.1;
|
|
}
|
|
if (tmp16) {
|
|
self.appliedAdjust = self.appliedAdjust + diff;
|
|
state.scroll = bound2;
|
|
state.scrollForNextCalculateItemsInView = undefined;
|
|
set$(self.ctx, "scrollAdjust", self.appliedAdjust);
|
|
}
|
|
set$(self.ctx, "scrollAdjustPending", 0);
|
|
const ctx2 = self.ctx;
|
|
let closure_1 = {};
|
|
state = undefined;
|
|
state = ctx2.state;
|
|
fn(() => {
|
|
let alwaysRenderIndicesArr;
|
|
let bottom;
|
|
let closure_4;
|
|
let dataChanged;
|
|
let doMVCP;
|
|
let enableScrollForNextCalculateItemsInView;
|
|
let endNoBuffer;
|
|
let forceFullItemPositions;
|
|
let getItemType;
|
|
let idCache;
|
|
let indexByKey;
|
|
let initialScroll;
|
|
let keyExtractor;
|
|
let minIndexSizeChanged;
|
|
let positions;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scrollForNextCalculateItemsInView;
|
|
let scrollLength;
|
|
let set2;
|
|
let sizes;
|
|
let startBufferedId;
|
|
let startNoBuffer;
|
|
let state;
|
|
let top;
|
|
let viewabilityConfigCallbackPairs;
|
|
let addResult = state;
|
|
let containerItemKeys = state.containerItemKeys;
|
|
({ enableScrollForNextCalculateItemsInView, idCache } = state);
|
|
({ indexByKey, minIndexSizeChanged, positions, props } = state);
|
|
({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props);
|
|
({ keyExtractor, onStickyHeaderChange: closure_4 } = props);
|
|
({ scrollForNextCalculateItemsInView, scrollLength } = state);
|
|
({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state);
|
|
const data = state.props.data;
|
|
let prop = state.props.stickyHeaderIndicesArr;
|
|
if (!prop) {
|
|
prop = [];
|
|
}
|
|
let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet;
|
|
if (!stickyHeaderIndicesSet) {
|
|
let _Set = Set;
|
|
stickyHeaderIndicesSet = new Set();
|
|
}
|
|
let tmp9 = outer1_46(containerItemKeys, idCache.drawDistanceMode);
|
|
({ dataChanged, doMVCP, forceFullItemPositions } = idCache);
|
|
let initialScrollSession = tmp2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp2.initialScrollSession.bootstrap;
|
|
}
|
|
let tmp16 = outer1_21(containerItemKeys, "numContainers");
|
|
if (data) {
|
|
if (0 !== scrollLength) {
|
|
if (tmp16) {
|
|
let closure_8 = outer1_25(tmp7);
|
|
let tmp15Result = tmp15(tmp7, "stylePaddingTop");
|
|
let sum = tmp15Result + tmp15(tmp7, "alignItemsAtEndPadding");
|
|
let closure_9 = sum + tmp15(tmp7, "headerSize");
|
|
tmp15Result = tmp15(tmp7, "numColumns");
|
|
let scrollVelocity = idCache.scrollVelocity;
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = outer1_69(tmp2);
|
|
}
|
|
({ initialScroll, queuedInitialLayout } = tmp2);
|
|
if (!tmp13) {
|
|
let scroll;
|
|
if (null != bootstrap) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = tmp2.scroll;
|
|
}
|
|
} else {
|
|
if (!queuedInitialLayout) {
|
|
if (outer1_41(tmp2)) {
|
|
if (initialScroll) {
|
|
scroll = outer1_75(tmp7, initialScroll);
|
|
}
|
|
}
|
|
}
|
|
scroll = tmp2.scroll;
|
|
}
|
|
let c10 = 0;
|
|
let c11 = 0;
|
|
let c12 = 0;
|
|
let c13 = 0;
|
|
let c14 = 0;
|
|
let c15 = 0;
|
|
function updateScroll2(scroll) {
|
|
let closure_16 = scroll;
|
|
const values = containerItemKeys.values;
|
|
const value = values.get("scrollAdjustPending");
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
let closure_11 = num - closure_9;
|
|
const rounded = Math.round(scroll + closure_11);
|
|
let closure_12 = rounded;
|
|
if (rounded + scrollLength > closure_8) {
|
|
const _Math = Math;
|
|
closure_12 = Math.max(0, tmp4 - tmp3);
|
|
}
|
|
}
|
|
updateScroll2(scroll);
|
|
const tmp15Result1 = tmp15(tmp7, "activeStickyIndex");
|
|
let closure_17 = tmp15Result1;
|
|
function resolveStickyState() {
|
|
let num = -1;
|
|
let num2 = -1;
|
|
if (prop.length > 0) {
|
|
let diff = arr.length - 1;
|
|
let tmp5 = num;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp6 = tmp3[arr[diff]];
|
|
let tmp7 = diff;
|
|
if (undefined === tmp6) {
|
|
diff = diff - 1;
|
|
tmp5 = num;
|
|
if (0 > diff) {
|
|
break;
|
|
}
|
|
} else {
|
|
tmp5 = diff;
|
|
if (tmp >= tmp6) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
num2 = tmp5;
|
|
}
|
|
if (0 <= num2) {
|
|
num = arr[num2];
|
|
}
|
|
let tmp8 = num2 >= 0;
|
|
if (0 > num2) {
|
|
tmp8 = tmp9 >= 0;
|
|
}
|
|
if (tmp8) {
|
|
outer2_22(containerItemKeys, "activeStickyIndex", num);
|
|
}
|
|
let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null };
|
|
let fn;
|
|
if (closure_4) {
|
|
if (arr.length > 0) {
|
|
if (tmp9 !== num) {
|
|
fn = () => {
|
|
if (undefined !== outer1_6[num]) {
|
|
if (null != outer1_4) {
|
|
const obj = { index: null, item: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp2;
|
|
tmp3(obj);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
obj[1] = fn;
|
|
return obj;
|
|
}
|
|
if (!dataChanged) {
|
|
let stickyState = resolveStickyState();
|
|
}
|
|
let result2 = tmp9;
|
|
let result3 = tmp9;
|
|
if (scrollVelocity > 0) {
|
|
let result = 0.5 * tmp9;
|
|
result2 = result;
|
|
const result1 = 1.5 * tmp9;
|
|
result3 = result1;
|
|
result3 = result1;
|
|
result2 = result;
|
|
} else {
|
|
if (0 === scrollVelocity) {
|
|
let _Math = Math;
|
|
}
|
|
result2 = 1.5 * tmp9;
|
|
result3 = 0.5 * tmp9;
|
|
}
|
|
let num6 = 0;
|
|
if (!dataChanged) {
|
|
num6 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num6 = 0;
|
|
if (!tmp25) {
|
|
num6 = 0;
|
|
if (!outer1_41(tmp2)) {
|
|
num6 = 0;
|
|
if (!tmp2.scrollingTo) {
|
|
num6 = 0;
|
|
if (!tmp2.pendingNativeMVCPAdjust) {
|
|
num6 = 0;
|
|
if (tmp15(tmp7, "readyToRender")) {
|
|
let _Math2 = Math;
|
|
num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) {
|
|
if (arg1 <= 0) {
|
|
return 0;
|
|
} else {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const bound = Math.min(1, Math.abs(scrollVelocity) / 4);
|
|
return Math.sign(scrollVelocity) * arg1 * bound;
|
|
}
|
|
})(scrollVelocity, Math.min(result2, result3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateScrollRange() {
|
|
const bound = Math.max(0, c12);
|
|
let closure_14 = Math.max(bound, c12 + scrollLength + Math.max(0, -scroll));
|
|
let closure_13 = bound - result2 + num6;
|
|
let closure_15 = closure_14 + result3 + num6;
|
|
}
|
|
updateScrollRange();
|
|
if (0 !== num6) {
|
|
(function scheduleRenderRangeProjectionSettle(state) {
|
|
state = state.state;
|
|
const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle;
|
|
if (undefined !== timeoutRenderRangeProjectionSettle) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutRenderRangeProjectionSettle);
|
|
let timeouts = state.timeouts;
|
|
timeouts.delete(timeoutRenderRangeProjectionSettle);
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
state.timeoutRenderRangeProjectionSettle = undefined;
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.scrollHistory.length = 0;
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}, 100);
|
|
state.timeoutRenderRangeProjectionSettle = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
})(tmp7);
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
if (!tmp25) {
|
|
if (!dataChanged) {
|
|
if (!forceFullItemPositions) {
|
|
if (scrollForNextCalculateItemsInView) {
|
|
({ top, bottom } = scrollForNextCalculateItemsInView);
|
|
if (null === top) {
|
|
if (null === bottom) {
|
|
tmp2.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}
|
|
if (null === top) {
|
|
if (viewabilityConfigCallbackPairs) {
|
|
(function updateViewabilityForCachedRange(state, viewabilityConfigCallbackPairs, scrollLength, c12, c14) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let tmp7 = null;
|
|
let sum1;
|
|
let tmp9 = null;
|
|
if (startBuffered <= endBuffered) {
|
|
let tmp3 = null;
|
|
let tmp5 = null;
|
|
let tmp6 = startBuffered;
|
|
tmp7 = null;
|
|
tmp9 = null;
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp10 = tmp[tmp6];
|
|
let tmp11 = tmp3;
|
|
let tmp12 = tmp4;
|
|
let tmp13 = tmp5;
|
|
let tmp14 = tmp6;
|
|
if (null == tmp10) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data) {
|
|
let tmp15 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp15 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp15;
|
|
str2 = tmp15;
|
|
}
|
|
tmp10 = str2;
|
|
}
|
|
let value = sizes.get(tmp10);
|
|
if (null == value) {
|
|
let tmp19 = callback4;
|
|
let num2 = 0;
|
|
let tmp20 = state;
|
|
let tmp21 = tmp10;
|
|
let tmp22 = tmp6;
|
|
value = callback4(state, tmp18, tmp14, data[tmp6]);
|
|
}
|
|
let tmp23 = tmp2[tmp6];
|
|
let tmp24 = null === tmp11 && tmp23 + value > c12;
|
|
if (tmp24) {
|
|
tmp11 = tmp6;
|
|
}
|
|
let tmp25 = undefined === tmp12 && tmp23 >= c12 - 10 && tmp23 <= c14;
|
|
if (tmp25) {
|
|
tmp12 = tmp6;
|
|
}
|
|
let tmp26 = tmp13;
|
|
let flag = false;
|
|
if (null !== tmp11) {
|
|
let flag2 = true;
|
|
if (tmp23 <= c14) {
|
|
tmp13 = tmp6;
|
|
flag2 = false;
|
|
}
|
|
tmp26 = tmp13;
|
|
flag = flag2;
|
|
}
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (flag) {
|
|
break;
|
|
} else {
|
|
let sum = tmp6 + 1;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (sum > endBuffered) {
|
|
break;
|
|
} else {
|
|
tmp3 = tmp11;
|
|
tmp4 = tmp12;
|
|
tmp5 = tmp26;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
tmp6 = sum;
|
|
if (sum >= data.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj = { endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startNoBuffer: null };
|
|
obj[0] = tmp9;
|
|
obj[1] = sum1;
|
|
if (null == sum1) {
|
|
sum1 = tmp7;
|
|
}
|
|
const items = [];
|
|
if (null != sum1) {
|
|
if (null !== tmp9) {
|
|
if (sum1 <= tmp9) {
|
|
do {
|
|
let tmp29 = state.idCache[sum1];
|
|
let tmp30 = sum1;
|
|
if (null == tmp29) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp29 = str4;
|
|
}
|
|
let arr = items.push(tmp29);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 <= tmp9);
|
|
}
|
|
}
|
|
}
|
|
obj[2] = items;
|
|
obj[3] = tmp7;
|
|
const merged = Object.assign(state, obj);
|
|
callback9(state, tmp7);
|
|
if (tmp37) {
|
|
callback7(state, state, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered);
|
|
}
|
|
tmp37 = null !== tmp7 && null !== tmp9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})(tmp7, viewabilityConfigCallbackPairs, scrollLength, c12, c14);
|
|
} else if (tmp2.props.onFirstVisibleItemChanged) {
|
|
outer1_102(tmp2, (function findFirstVisibleIndexInCachedRange(state, c12) {
|
|
let data;
|
|
let keyExtractor;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
if (startBuffered <= endBuffered) {
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp3 = tmp[startBuffered];
|
|
let tmp4 = startBuffered;
|
|
if (null == tmp3) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp5 = null;
|
|
if (startBuffered < data.length) {
|
|
let keyExtractorResult = startBuffered;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startBuffered], startBuffered);
|
|
}
|
|
tmp5 = keyExtractorResult;
|
|
}
|
|
state.idCache[startBuffered] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
let value = sizes.get(tmp3);
|
|
let tmp9 = value;
|
|
if (null == value) {
|
|
let tmp10 = callback4;
|
|
let num = 0;
|
|
let tmp11 = state;
|
|
let tmp12 = tmp3;
|
|
let tmp13 = startBuffered;
|
|
tmp9 = callback4(state, tmp8, tmp4, data[startBuffered]);
|
|
}
|
|
if (tmp2[startBuffered] + tmp9 > c12) {
|
|
break;
|
|
} else {
|
|
let sum = startBuffered + 1;
|
|
if (sum <= endBuffered) {
|
|
startBuffered = sum;
|
|
}
|
|
}
|
|
}
|
|
return startBuffered;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
})(tmp7, c12));
|
|
}
|
|
let prop1;
|
|
if (null != stickyState) {
|
|
prop1 = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != prop1) {
|
|
let call = prop1.call;
|
|
typeof call === "unknown" ? prop1() : call(stickyState);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp73;
|
|
if (doMVCP) {
|
|
if (!tmp25) {
|
|
tmp73 = outer1_68(tmp7, dataChanged);
|
|
}
|
|
}
|
|
if (dataChanged) {
|
|
outer1_86(tmp2);
|
|
}
|
|
let num8 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num8 = 0;
|
|
if (!dataChanged) {
|
|
let startBuffered = minIndexSizeChanged;
|
|
if (null == minIndexSizeChanged) {
|
|
startBuffered = tmp2.startBuffered;
|
|
}
|
|
let num9 = 0;
|
|
if (null != startBuffered) {
|
|
num9 = startBuffered;
|
|
}
|
|
num8 = num9;
|
|
}
|
|
}
|
|
let obj = { doMVCP: null, forceFullUpdate: null, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null };
|
|
obj[0] = doMVCP;
|
|
obj[1] = forceFullItemPositions;
|
|
let tmp82 = !forceFullItemPositions;
|
|
if (!forceFullItemPositions) {
|
|
tmp82 = !dataChanged;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = tmp15Result > 1;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = undefined !== minIndexSizeChanged;
|
|
}
|
|
obj[2] = tmp82;
|
|
obj[3] = c15;
|
|
obj[4] = scrollVelocity;
|
|
obj[5] = num8;
|
|
outer1_89(tmp7, dataChanged, obj);
|
|
const tmp17Result = outer1_25(tmp7);
|
|
closure_8 = tmp17Result;
|
|
if (undefined !== minIndexSizeChanged) {
|
|
tmp2.minIndexSizeChanged = undefined;
|
|
}
|
|
if (dataChanged) {
|
|
if (doMVCP) {
|
|
if (tmp2.props.maintainVisibleContentPosition.data) {
|
|
if (tmp2.didContainersLayout) {
|
|
if (tmp2.idsInView.length > 0) {
|
|
const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition;
|
|
const _Set2 = Set;
|
|
let set = new Set();
|
|
const idsInView = tmp2.idsInView;
|
|
for (const item10226 of idsInView) {
|
|
let tmp99 = item10226;
|
|
addResult = indexByKey.get(item10226);
|
|
if (undefined !== addResult) {
|
|
addResult = shouldRestorePosition;
|
|
if (shouldRestorePosition) {
|
|
addResult = !shouldRestorePosition(data[addResult], addResult, data);
|
|
}
|
|
if (!addResult) {
|
|
addResult = item10226;
|
|
addResult = set.add(tmp99);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_21(containerItemKeys, "scrollAdjustPending");
|
|
let num11 = 0;
|
|
if (null != addResult) {
|
|
num11 = addResult;
|
|
}
|
|
if (null != tmp73) {
|
|
addResult = tmp73();
|
|
}
|
|
addResult = tmp73;
|
|
if (addResult) {
|
|
addResult = addResult.scroll !== state.scroll;
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, "scrollAdjustPending");
|
|
let num12 = 0;
|
|
if (null != addResult) {
|
|
num12 = addResult;
|
|
}
|
|
addResult = num12 !== num11;
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = updateScroll2(addResult.scroll);
|
|
addResult = updateScrollRange();
|
|
}
|
|
if (dataChanged) {
|
|
stickyState = resolveStickyState();
|
|
}
|
|
addResult = undefined;
|
|
if (!tmp13) {
|
|
addResult = undefined;
|
|
if (null != bootstrap) {
|
|
addResult = bootstrap.targetIndexSeed;
|
|
}
|
|
}
|
|
if (null == addResult) {
|
|
let num13 = !dataChanged;
|
|
if (!dataChanged) {
|
|
num13 = startBufferedId;
|
|
}
|
|
if (num13) {
|
|
num13 = indexByKey.get(startBufferedId);
|
|
}
|
|
if (!num13) {
|
|
num13 = 0;
|
|
}
|
|
addResult = num13;
|
|
}
|
|
if (addResult >= 0) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num14 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = c13;
|
|
if (positions[addResult] + addResult <= c13) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (addResult < 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp15Result > 1) {
|
|
if (addResult > 0) {
|
|
addResult = state.columns[addResult];
|
|
while (1 !== addResult) {
|
|
if (undefined === addResult) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (0 >= addResult) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = globalThis;
|
|
let num16 = 0;
|
|
let num17 = 0;
|
|
let num18 = 0;
|
|
if (0 < tmp16) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num16);
|
|
addResult = num16;
|
|
addResult = num17;
|
|
addResult = num17;
|
|
if (undefined !== addResult) {
|
|
let _Math3 = Math;
|
|
addResult = Math.max(num17, indexByKey.get(addResult));
|
|
}
|
|
num16 = num16 + 1;
|
|
num17 = addResult;
|
|
num18 = addResult;
|
|
} while (num16 < tmp16);
|
|
}
|
|
obj = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: true };
|
|
const length = data.length;
|
|
let _Math4 = Math;
|
|
addResult = Math.max(0, addResult);
|
|
let flag3 = false;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
if (addResult < length) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
addResult = flag3;
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num19 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = positions[addResult];
|
|
addResult = flag3;
|
|
if (!flag3) {
|
|
addResult = outer1_100;
|
|
addResult = c12;
|
|
addResult = c14;
|
|
let num20 = 0;
|
|
addResult = obj;
|
|
addResult = outer1_100(obj, addResult, addResult, addResult, c12, c14);
|
|
addResult = null === addResult;
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = addResult + addResult > c13;
|
|
}
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = null;
|
|
}
|
|
addResult = flag3;
|
|
if (null !== obj.startNoBuffer) {
|
|
addResult = c15;
|
|
let flag4 = true;
|
|
if (addResult <= c15) {
|
|
addResult = c15;
|
|
addResult = null;
|
|
if (c15 <= tmp17Result) {
|
|
addResult = addResult + addResult;
|
|
}
|
|
flag4 = flag3;
|
|
}
|
|
addResult = flag4;
|
|
}
|
|
}
|
|
addResult = addResult + 1;
|
|
if (addResult >= length) {
|
|
break;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (!addResult) {
|
|
continue;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (addResult > num18) {
|
|
break;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
const _Object = Object;
|
|
let obj1 = { endBuffered: null, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null };
|
|
obj1[0] = addResult;
|
|
({ endNoBuffer: obj5[1], firstFullyOnScreenIndex: obj5[2] } = obj);
|
|
addResult = outer1_101;
|
|
addResult = state;
|
|
addResult = state;
|
|
obj1[3] = outer1_101(state, obj);
|
|
obj1[4] = addResult;
|
|
obj1[5] = addResult;
|
|
obj1[6] = obj.startNoBuffer;
|
|
addResult = Object.assign(state, obj1);
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
addResult = outer1_54;
|
|
if (!outer1_54(addResult)) {
|
|
let obj2 = { bottom: null, top: null };
|
|
obj2[0] = addResult;
|
|
obj2[1] = addResult;
|
|
addResult = obj2;
|
|
}
|
|
addResult.scrollForNextCalculateItemsInView = addResult;
|
|
}
|
|
addResult = tmp16;
|
|
let items = [];
|
|
if (dataChanged) {
|
|
for (let num21 = 0; num21 < addResult; num21 = num21 + 1) {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal2 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num21);
|
|
addResult = !keyExtractor;
|
|
addResult = num21;
|
|
if (keyExtractor) {
|
|
if (addResult) {
|
|
addResult = undefined === indexByKey.get(addResult);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = items.push(num21);
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const scrollTargetPinnedRange = state.scrollTargetPinnedRange;
|
|
let c22 = 0;
|
|
let c23 = -1;
|
|
let num23 = -1;
|
|
let num24 = 0;
|
|
if (scrollTargetPinnedRange) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
addResult = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c22 = addResult;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
addResult = length - 1;
|
|
addResult = Math.min(addResult, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c23 = addResult;
|
|
num23 = addResult;
|
|
num24 = addResult;
|
|
}
|
|
addResult = num24 <= num23;
|
|
let closure_24 = addResult;
|
|
function isPinnedRenderIndex(addResult) {
|
|
let hasItem = set.has(addResult);
|
|
if (!hasItem) {
|
|
let tmp2 = closure_24;
|
|
if (closure_24) {
|
|
tmp2 = addResult >= c22;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = addResult <= c23;
|
|
}
|
|
hasItem = tmp2;
|
|
}
|
|
return hasItem;
|
|
}
|
|
if (null !== addResult) {
|
|
if (null !== addResult) {
|
|
let items1 = [];
|
|
const _Set6 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
const set1 = new Set();
|
|
function addPinnedIndex(item10471) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (item10471 >= 0) {
|
|
if (item10471 < length) {
|
|
let tmp4 = idCache[item10471];
|
|
if (null == tmp4) {
|
|
({ data, keyExtractor } = outer1_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (item10471 < data.length) {
|
|
let keyExtractorResult = item10471;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[item10471], item10471);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[item10471] = tmp2;
|
|
str = tmp2;
|
|
}
|
|
tmp4 = str;
|
|
}
|
|
const value = containerItemKeys.get(tmp4);
|
|
if (undefined !== value) {
|
|
const stickyContainerPool = outer1_2.stickyContainerPool;
|
|
stickyContainerPool.add(value);
|
|
} else {
|
|
let hasItem = null == tmp4;
|
|
if (!hasItem) {
|
|
hasItem = set1.has(item10471);
|
|
}
|
|
if (!hasItem) {
|
|
set1.add(item10471);
|
|
items1.push(item10471);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = set1;
|
|
if (addResult <= addResult) {
|
|
do {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
if (!containerItemKeys.has(addResult)) {
|
|
addResult = set1.add(addResult);
|
|
addResult = items1.push(addResult);
|
|
}
|
|
addResult = addResult + 1;
|
|
} while (addResult <= addResult);
|
|
}
|
|
addResult = alwaysRenderIndicesArr;
|
|
addResult = alwaysRenderIndicesArr;
|
|
for (const item10471 of alwaysRenderIndicesArr) {
|
|
addResult = addPinnedIndex(item10471);
|
|
continue;
|
|
}
|
|
if (addResult) {
|
|
if (num24 <= num23) {
|
|
do {
|
|
addResult = addPinnedIndex(num24);
|
|
num24 = num24 + 1;
|
|
} while (num24 <= num23);
|
|
}
|
|
}
|
|
if (prop.length > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num25 = -1;
|
|
if (null != addResult) {
|
|
num25 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = num25;
|
|
addResult = items1;
|
|
addResult = set1;
|
|
addResult = (function handleStickyActivation(addResult, prop, arg2, items1, addResult2, addResult3, addResult4) {
|
|
let data;
|
|
let keyExtractor;
|
|
const state = addResult.state;
|
|
let num = -1;
|
|
if (arg2 >= 0) {
|
|
num = prop[arg2];
|
|
}
|
|
c22(addResult, "activeStickyIndex", num);
|
|
let num2 = 0;
|
|
do {
|
|
let diff = arg2 - num2;
|
|
let tmp4 = num2;
|
|
if (diff >= 0) {
|
|
let tmp12 = prop[diff];
|
|
let tmp13 = callback8;
|
|
if (!callback8(addResult, tmp12)) {
|
|
let tmp5 = state.idCache[tmp12];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (tmp12 < data.length) {
|
|
let keyExtractorResult = tmp12;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp12], tmp12);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp12] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let tmp8 = tmp5;
|
|
if (tmp5) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
tmp8 = !containerItemKeys.has(tmp5);
|
|
}
|
|
if (tmp8) {
|
|
let tmp9 = tmp12 < addResult3 || tmp12 > addResult4;
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = !addResult2.has(tmp12);
|
|
}
|
|
if (tmp8) {
|
|
addResult = addResult2.add(tmp12);
|
|
let arr = items1.push(tmp12);
|
|
}
|
|
}
|
|
}
|
|
num2 = num2 + 1;
|
|
} while (num2 <= 1);
|
|
})(addResult, prop, num25, items1, addResult, addResult, addResult);
|
|
} else if (-1 !== tmp15Result1) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "activeStickyIndex", -1);
|
|
}
|
|
if (items1.length > 0) {
|
|
let fn;
|
|
if (getItemType) {
|
|
fn = (arg0) => {
|
|
const tmp = getItemType(data[arg0], arg0);
|
|
let str = "";
|
|
if (undefined !== tmp) {
|
|
const _String = String;
|
|
str = String(tmp);
|
|
}
|
|
return str;
|
|
};
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = items1;
|
|
addResult = items;
|
|
addResult = fn;
|
|
addResult = tmp88;
|
|
addResult = (function findAvailableContainers(containerItemKeys, items1, addResult, addResult2, items, fn, has) {
|
|
let closure_2;
|
|
let stickyContainerPool;
|
|
let closure_0 = fn;
|
|
if (0 === items1.length) {
|
|
return [];
|
|
} else {
|
|
const tmp56 = length(containerItemKeys, "numContainers");
|
|
const state = containerItemKeys.state;
|
|
({ containerItemMetadata: closure_2, stickyContainerPool } = state);
|
|
let set;
|
|
if (items.length > 0) {
|
|
const _Set = Set;
|
|
set = new Set(items);
|
|
}
|
|
const mapped = items1.map((itemIndex) => {
|
|
const obj = { isSticky: stickyHeaderIndicesSet.has(itemIndex), itemIndex, itemType: null, order: null };
|
|
stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet;
|
|
let tmp;
|
|
if (null != callback) {
|
|
tmp = callback(itemIndex);
|
|
}
|
|
obj[2] = tmp;
|
|
obj[3] = arg1;
|
|
return obj;
|
|
});
|
|
const found = mapped.filter((isSticky) => !isSticky.isSticky);
|
|
items = [];
|
|
items1 = [];
|
|
let num2 = 0;
|
|
const found1 = mapped.filter((isSticky) => isSticky.isSticky);
|
|
if (0 < tmp56) {
|
|
while (true) {
|
|
let tmp12 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp13 = length(containerItemKeys, "containerItemKey" + num2);
|
|
let tmp14 = num2;
|
|
let hasItem;
|
|
if (null != set) {
|
|
hasItem = set.has(num2);
|
|
}
|
|
let tmp16 = !hasItem;
|
|
if (tmp13) {
|
|
let hasItem1;
|
|
if (null != has) {
|
|
hasItem1 = has.has(tmp13);
|
|
}
|
|
if (hasItem1) {
|
|
let indexByKey = state.indexByKey;
|
|
}
|
|
num2 = num2 + 1;
|
|
if (num2 >= tmp56) {
|
|
break;
|
|
}
|
|
}
|
|
let tmp18 = !tmp16;
|
|
if (stickyContainerPool.has(num2)) {
|
|
let tmp22 = undefined === tmp13 || tmp18;
|
|
if (tmp22) {
|
|
let obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number2 = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr = items1.push(obj);
|
|
}
|
|
} else {
|
|
if (undefined !== tmp13) {
|
|
if (!tmp18) {
|
|
if (!tmp) {
|
|
let indexByKey2 = state.indexByKey;
|
|
let value = indexByKey2.get(tmp13);
|
|
if (undefined !== value) {
|
|
if (value < addResult) {
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
obj[1] = value < addResult ? addResult - value : value - addResult2;
|
|
arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr1 = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
const sorted = items.sort(closure_98);
|
|
const _Array = Array;
|
|
const array = new Array(length);
|
|
let sum = tmp56;
|
|
let c5 = false;
|
|
function assign(itemIndex, containerIndex) {
|
|
array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType };
|
|
let deleteResult;
|
|
if (null != set) {
|
|
deleteResult = set.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
let c5 = true;
|
|
}
|
|
}
|
|
function assignMatching(found, items, arg2) {
|
|
let closure_0 = items;
|
|
let closure_1 = arg2;
|
|
function _loop2(iter) {
|
|
const items = iter;
|
|
if (outer1_4[iter.order]) {
|
|
return 1;
|
|
} else {
|
|
const findIndexResult = items.findIndex(() => { ... });
|
|
if (-1 !== findIndexResult) {
|
|
const containerIndex = array(items.splice(findIndexResult, 1), 1)[0].containerIndex;
|
|
if (typeof outer1_6 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const obj = { containerIndex: null, itemIndex: null, itemType: null };
|
|
obj[0] = containerIndex;
|
|
({ itemIndex: obj[1], itemType: obj[2] } = iter);
|
|
tmp[iter.order] = obj;
|
|
let deleteResult;
|
|
if (null != outer1_3) {
|
|
deleteResult = obj2.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
const outer1_5 = true;
|
|
}
|
|
obj2 = outer1_3;
|
|
}
|
|
}
|
|
}
|
|
const iter = found[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop2Result = _loop2(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function assignFromPool(found, items, arg2) {
|
|
if (closure_0) {
|
|
assignMatching(found, items, (arg0, arg1) => {
|
|
let tmp = undefined !== arg1;
|
|
if (tmp) {
|
|
tmp = arg0 === arg1;
|
|
}
|
|
return tmp;
|
|
});
|
|
}
|
|
assignMatching(found, items, (arg0) => undefined === arg0);
|
|
if (arg2) {
|
|
assignMatching(found, items, () => true);
|
|
}
|
|
}
|
|
assignFromPool(found, items, true);
|
|
assignFromPool(found1, items1, false);
|
|
for (const item10099 of mapped) {
|
|
let tmp36 = item10099;
|
|
if (!array[item10099.order]) {
|
|
let tmp37 = sum;
|
|
let tmp38 = +sum;
|
|
sum = tmp38 + 1;
|
|
let tmp39 = tmp38;
|
|
let tmp40 = item10099;
|
|
if (tmp36.isSticky) {
|
|
let tmp41 = tmp38;
|
|
addResult = stickyContainerPool.add(tmp39);
|
|
}
|
|
let tmp43 = item10099;
|
|
let tmp44 = tmp38;
|
|
let obj1 = assign(tmp36, tmp39);
|
|
}
|
|
continue;
|
|
}
|
|
if (c5) {
|
|
items.length = 0;
|
|
if (set) {
|
|
for (const item10120 of set) {
|
|
let arr2 = arg4.push(item10120);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if (closure_31) {
|
|
let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled");
|
|
if (null == POSITIVE_INFINITY) {
|
|
const _Number3 = Number;
|
|
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
}
|
|
if (sum > POSITIVE_INFINITY) {
|
|
const _console = console;
|
|
let obj2 = { debugInfo: null };
|
|
const obj3 = { numContainers: null, numContainersPooled: null, numNeeded: null, stillNeeded: null };
|
|
obj3[0] = tmp56;
|
|
obj3[1] = POSITIVE_INFINITY;
|
|
obj3[2] = length;
|
|
obj3[3] = sum - tmp56;
|
|
obj2[0] = obj3;
|
|
console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj2);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
})(containerItemKeys, items1, addResult, addResult, items, fn, tmp88);
|
|
let iter = addResult[Symbol.iterator]();
|
|
addResult = iter.next();
|
|
addResult = iter;
|
|
while (iter !== undefined) {
|
|
let itemIndex = addResult.itemIndex;
|
|
addResult = itemIndex;
|
|
let containerIndex = addResult.containerIndex;
|
|
addResult = idCache[itemIndex];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = itemIndex;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerIndex;
|
|
let _HermesInternal3 = HermesInternal;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + containerIndex);
|
|
if (addResult) {
|
|
addResult = addResult !== addResult;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
}
|
|
if (addResult !== addResult) {
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set3 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = containerIndex;
|
|
addResult = set2.add(containerIndex);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[containerIndex];
|
|
let num28 = 0;
|
|
if (null != addResult) {
|
|
num28 = addResult;
|
|
}
|
|
state.containerItemGenerations[containerIndex] = num28 + 1;
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerIndex;
|
|
let _HermesInternal4 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + containerIndex, addResult);
|
|
let _HermesInternal5 = HermesInternal;
|
|
addResult = itemIndex;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + containerIndex, addResult);
|
|
let _HermesInternal6 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + containerIndex, data[addResult]);
|
|
addResult = state;
|
|
addResult = state;
|
|
let containerItemMetadata = state.containerItemMetadata;
|
|
addResult = outer1_28;
|
|
let num29 = 0;
|
|
addResult = state;
|
|
addResult = containerItemMetadata.set(containerIndex, outer1_28(state, itemIndex, data[addResult], addResult.itemType));
|
|
addResult = containerItemKeys.set(addResult, containerIndex);
|
|
let userScrollAnchorReset = state.userScrollAnchorReset;
|
|
if (null != userScrollAnchorReset) {
|
|
addResult = userScrollAnchorReset;
|
|
let keys = addResult.keys;
|
|
addResult = keys.add(addResult);
|
|
}
|
|
addResult = containerIndex;
|
|
let _HermesInternal7 = HermesInternal;
|
|
addResult = "containerSticky" + containerIndex;
|
|
addResult = itemIndex;
|
|
addResult = stickyHeaderIndicesSet.has(addResult);
|
|
addResult = isPinnedRenderIndex(addResult);
|
|
if (addResult) {
|
|
addResult = addResult(addResult, addResult, true);
|
|
let stickyContainerPool2 = addResult.stickyContainerPool;
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool2.add(containerIndex);
|
|
} else {
|
|
if (addResult(addResult, addResult)) {
|
|
addResult = addResult(addResult, addResult, false);
|
|
}
|
|
let stickyContainerPool = addResult.stickyContainerPool;
|
|
if (addResult) {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.add(containerIndex);
|
|
} else {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.delete(containerIndex);
|
|
}
|
|
}
|
|
addResult = containerIndex;
|
|
if (containerIndex >= addResult) {
|
|
addResult = containerIndex;
|
|
addResult = containerIndex + 1;
|
|
}
|
|
continue;
|
|
}
|
|
if (addResult !== tmp16) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "numContainers", addResult);
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
if (addResult > outer1_21(containerItemKeys, "numContainersPooled")) {
|
|
addResult = addResult(addResult, "numContainersPooled", (function getExpandedContainerPoolSize(length, addResult) {
|
|
let num = 0;
|
|
if (length > 0) {
|
|
num = 0;
|
|
if (addResult > 0) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound = Math.max(length, addResult);
|
|
num = Math.min(bound, Math.max(addResult, Math.ceil(1.5 * addResult)));
|
|
}
|
|
}
|
|
return num;
|
|
})(length, addResult));
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const userScrollAnchorReset2 = state.userScrollAnchorReset;
|
|
addResult = undefined;
|
|
if (null != userScrollAnchorReset2) {
|
|
addResult = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === addResult) {
|
|
addResult.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
if (addResult.stickyContainerPool.size > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = c12;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num30 = -1;
|
|
if (null != addResult) {
|
|
num30 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = tmp9;
|
|
addResult = num30;
|
|
addResult = items;
|
|
addResult = isPinnedRenderIndex;
|
|
addResult = (function handleStickyRecycling(addResult, prop, addResult2, arg3, arg4, items, isPinnedRenderIndex) {
|
|
const state = addResult.state;
|
|
const iter = state.stickyContainerPool[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
let tmp3 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp4 = length(addResult, "containerItemKey" + nextResult);
|
|
let value;
|
|
if (tmp4) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp7 = tmp4;
|
|
value = indexByKey.get(tmp5);
|
|
}
|
|
let tmp8 = value;
|
|
if (undefined !== value) {
|
|
let tmp52 = value;
|
|
if (!isPinnedRenderIndex(tmp8)) {
|
|
let tmp9 = value;
|
|
let index = prop.indexOf(tmp8);
|
|
let tmp11 = index;
|
|
if (-1 !== index) {
|
|
let tmp16 = index;
|
|
if (tmp11 < arg4 - 1) {
|
|
let tmp18 = index;
|
|
let tmp19 = prop[tmp11 + 1];
|
|
let flag = false;
|
|
if (tmp19) {
|
|
let tmp44 = tmp19;
|
|
let tmp45 = state.positions[tmp20];
|
|
let tmp47 = undefined !== tmp45;
|
|
if (tmp47) {
|
|
let tmp48 = tmp45;
|
|
tmp47 = addResult2 > tmp46 + 2 * arg3;
|
|
}
|
|
flag = tmp47;
|
|
} else {
|
|
let tmp21 = value;
|
|
let tmp22 = state.idCache[tmp8];
|
|
let tmp23 = tmp22;
|
|
if (null != tmp22) {
|
|
let tmp26 = tmp22;
|
|
} else {
|
|
let tmp24 = callback3;
|
|
let tmp25 = value;
|
|
tmp26 = callback3(state, tmp8);
|
|
}
|
|
let tmp27 = tmp26;
|
|
if (tmp26) {
|
|
let tmp28 = value;
|
|
let tmp29 = state.positions[tmp8];
|
|
let sizes = state.sizes;
|
|
let tmp30 = tmp26;
|
|
value = sizes.get(tmp27);
|
|
let tmp32 = value;
|
|
if (null != value) {
|
|
let tmp38 = value;
|
|
} else {
|
|
let tmp33 = callback4;
|
|
let tmp34 = tmp26;
|
|
let tmp35 = value;
|
|
let num = 0;
|
|
let tmp36 = addResult;
|
|
let tmp37 = tmp8;
|
|
tmp38 = callback4(addResult, tmp27, value, state.props.data[tmp8]);
|
|
}
|
|
let tmp40 = tmp29;
|
|
let tmp41 = undefined !== tmp29;
|
|
if (tmp41) {
|
|
let tmp42 = tmp29;
|
|
let tmp43 = tmp38;
|
|
tmp41 = addResult2 > tmp29 + tmp39 + 3 * arg3;
|
|
}
|
|
flag = tmp41;
|
|
}
|
|
}
|
|
let tmp49 = flag;
|
|
if (flag) {
|
|
let tmp50 = nextResult;
|
|
let arr = items.push(tmp2);
|
|
}
|
|
} else {
|
|
let tmp17 = index;
|
|
}
|
|
} else {
|
|
let stickyContainerPool = state.stickyContainerPool;
|
|
let tmp12 = nextResult;
|
|
let deleteResult = stickyContainerPool.delete(tmp2);
|
|
let tmp14 = v0;
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp15 = v0(addResult, "containerSticky" + tmp2, false);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
})(addResult, prop, addResult, tmp9, num30, items, isPinnedRenderIndex);
|
|
}
|
|
if (items.length > 0) {
|
|
const _Set4 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
addResult = items;
|
|
const set3 = new Set(items);
|
|
}
|
|
let num32 = 0;
|
|
let flag5 = false;
|
|
if (0 < addResult) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal8 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num32);
|
|
addResult = flag5;
|
|
addResult = undefined;
|
|
addResult = num32;
|
|
if (null != set3) {
|
|
addResult = set3.has(num32);
|
|
}
|
|
if (addResult) {
|
|
if (undefined !== addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set5 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = set2.add(num32);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[num32];
|
|
let num33 = 0;
|
|
if (null != addResult) {
|
|
num33 = addResult;
|
|
}
|
|
state.containerItemGenerations[num32] = num33 + 1;
|
|
}
|
|
let containerItemMetadata2 = state.containerItemMetadata;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = containerItemMetadata2.delete(num32);
|
|
let stickyContainerPool3 = state.stickyContainerPool;
|
|
if (stickyContainerPool3.has(num32)) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal9 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSticky" + num32, false);
|
|
let stickyContainerPool4 = addResult.stickyContainerPool;
|
|
addResult = stickyContainerPool4.delete(num32);
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal10 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + num32, undefined);
|
|
let _HermesInternal11 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + num32, undefined);
|
|
let _HermesInternal12 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + num32, undefined);
|
|
let _HermesInternal13 = HermesInternal;
|
|
addResult = outer1_32;
|
|
addResult = outer1_22(addResult, "containerPosition" + num32, outer1_32);
|
|
let _HermesInternal14 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerColumn" + num32, -1);
|
|
let _HermesInternal15 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSpan" + num32, 1);
|
|
addResult = flag5;
|
|
} else {
|
|
addResult = indexByKey.get(addResult);
|
|
addResult = flag5;
|
|
if (undefined !== addResult) {
|
|
addResult = outer1_88;
|
|
let obj3 = { scrollAdjustPending: null, updateLayout: true };
|
|
addResult = c10;
|
|
obj3[0] = c10;
|
|
let num35 = 0;
|
|
addResult = num32;
|
|
addResult = obj3;
|
|
addResult = outer1_88(addResult, addResult, addResult, obj3).didChangePosition || flag5;
|
|
}
|
|
}
|
|
num32 = num32 + 1;
|
|
flag5 = addResult;
|
|
} while (num32 < addResult);
|
|
}
|
|
addResult = set2;
|
|
if (set2) {
|
|
addResult = outer1_27;
|
|
}
|
|
if (addResult) {
|
|
addResult = outer1_87;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_87(containerItemKeys, set2);
|
|
}
|
|
if (!tmp13) {
|
|
addResult = outer1_84;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_84(containerItemKeys);
|
|
} else {
|
|
addResult = outer1_102;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_102(state, obj.startNoBuffer);
|
|
if (!queuedInitialLayout) {
|
|
if (!addResult.didContainersLayout) {
|
|
addResult = outer1_41;
|
|
addResult = outer1_77;
|
|
if (outer1_41(addResult)) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
} else {
|
|
addResult = addResult(addResult, addResult.startNoBuffer, addResult.endNoBuffer);
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = (function setDidLayout(containerItemKeys) {
|
|
containerItemKeys.state.queuedInitialLayout = true;
|
|
callback(containerItemKeys);
|
|
callback2(containerItemKeys, { didLayout: true });
|
|
})(containerItemKeys);
|
|
addResult = (function handleInitialScrollLayoutReady(containerItemKeys) {
|
|
let closure_0 = containerItemKeys;
|
|
if (containerItemKeys.state.initialScroll) {
|
|
callback6(containerItemKeys, { forceScroll: true });
|
|
const initialScrollSession = containerItemKeys.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(function runScroll() {
|
|
return outer1_76(closure_0, { forceScroll: true });
|
|
});
|
|
}
|
|
closure_0 = containerItemKeys;
|
|
const scrollingTo = containerItemKeys.state.scrollingTo;
|
|
{
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
}
|
|
})(containerItemKeys);
|
|
}
|
|
}
|
|
}
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
if (viewabilityConfigCallbackPairs) {
|
|
addResult = null !== obj.startNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = null !== obj.endNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
state = containerItemKeys.state;
|
|
({ startNoBuffer, endNoBuffer } = obj);
|
|
addResult = outer1_91;
|
|
if (null == addResult) {
|
|
addResult = obj.startNoBuffer;
|
|
}
|
|
if (null == addResult) {
|
|
addResult = obj.endNoBuffer;
|
|
}
|
|
addResult = state;
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
addResult = scrollLength;
|
|
addResult = startNoBuffer;
|
|
addResult = endNoBuffer;
|
|
addResult = addResult(state, addResult, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, addResult, addResult);
|
|
}
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != addResult) {
|
|
const call2 = addResult.call;
|
|
if (typeof call2 === "unknown") {
|
|
addResult = addResult();
|
|
} else {
|
|
addResult = call2(stickyState);
|
|
}
|
|
}
|
|
}
|
|
let tmp17 = outer1_25;
|
|
const tmp80 = outer1_89;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
];
|
|
function useStateContext() {
|
|
return frozen.useContext(closure_17);
|
|
}
|
|
function useArr$(items) {
|
|
const context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
let first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
items = [context, first];
|
|
const memo = frozen.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items);
|
|
const get = memo.get;
|
|
return context(first[6]).useSyncExternalStore(memo.subscribe, get, get);
|
|
}
|
|
function getStickyPushLimit(sizes) {
|
|
if (arg2) {
|
|
sizes = sizes.sizes;
|
|
const value = sizes.get(arg2);
|
|
if (value) {
|
|
if (value > 0) {
|
|
const prop = sizes.props.stickyHeaderIndicesArr;
|
|
const index = prop.indexOf(arg1);
|
|
if (-1 !== index) {
|
|
if (undefined !== sizes.props.stickyHeaderIndicesArr[index + 1]) {
|
|
if (undefined !== sizes.positions[tmp5]) {
|
|
return tmp6 - value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function useLatestRef(itemLayoutAnimation) {
|
|
const ref = frozen.useRef(itemLayoutAnimation);
|
|
ref.current = itemLayoutAnimation;
|
|
return ref;
|
|
}
|
|
function useStableRenderComponent(renderScrollComponent, current2) {
|
|
const ref = frozen.useRef(renderScrollComponent);
|
|
ref.current = renderScrollComponent;
|
|
const ref1 = frozen.useRef(current2);
|
|
ref1.current = current2;
|
|
const items = [ref1, ref];
|
|
return frozen.useMemo(() => outer1_12.forwardRef((AUTO_DISMISS, current) => {
|
|
current = ref.current;
|
|
if (null == current) {
|
|
return null;
|
|
} else {
|
|
const call = current.call;
|
|
const currentResult = ref2.current(AUTO_DISMISS, current);
|
|
typeof call === "unknown" ? current(currentResult) : call(ref, currentResult);
|
|
}
|
|
}), items);
|
|
}
|
|
let closure_134 = _createClass(ScrollAdjustHandler, items);
|
|
function useCombinedRef(animatedRef, forwardedRef) {
|
|
const items = [...arguments];
|
|
return noop.useCallback((current) => {
|
|
const iter = items[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp3 = nextResult;
|
|
if (nextResult) {
|
|
let tmp4 = outer1_52;
|
|
let tmp5 = nextResult;
|
|
let tmp6 = nextResult;
|
|
if (outer1_52(tmp3)) {
|
|
let tmp3Result = tmp3(current);
|
|
} else {
|
|
tmp3.current = current;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}, items);
|
|
}
|
|
const StyleSheet = get_ActivityIndicator.StyleSheet;
|
|
function sortAsc(arg0, arg1) {
|
|
return arg0 - arg1;
|
|
}
|
|
function toCount(num) {
|
|
num = 0;
|
|
if (typeof num === "number") {
|
|
const _Number = Number;
|
|
num = 0;
|
|
if (Number.isFinite(num)) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
num = Math.max(0, Math.floor(num));
|
|
}
|
|
}
|
|
return num;
|
|
}
|
|
function addIndex(add) {
|
|
let tmp = arg2 >= 0;
|
|
if (tmp) {
|
|
tmp = arg2 < arg1;
|
|
}
|
|
if (tmp) {
|
|
add.add(arg2);
|
|
}
|
|
}
|
|
memoResult1 = memo(function PositionViewState2(id) {
|
|
let horizontal;
|
|
let refView;
|
|
let style;
|
|
id = id.id;
|
|
({ horizontal, style, refView } = id);
|
|
const merged = Object.assign(id, Object.create(null));
|
|
const items = ["containerPosition" + id, "containerItemKey" + id];
|
|
let context;
|
|
let first;
|
|
let obj = frozen;
|
|
context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = obj.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
let obj1 = context(first[6]);
|
|
let first1 = _slicedToArray(obj1.useSyncExternalStore(memo.subscribe, get, get), 2)[0];
|
|
if (undefined === first1) {
|
|
first1 = c32;
|
|
}
|
|
obj = { ref: refView, style: null };
|
|
const items2 = [style, ];
|
|
if (horizontal) {
|
|
obj = { left: null };
|
|
obj[0] = first1;
|
|
obj1 = obj;
|
|
} else {
|
|
obj1 = { top: null };
|
|
obj1[0] = first1;
|
|
}
|
|
items2[1] = obj1;
|
|
obj[1] = items2;
|
|
const merged1 = Object.assign(merged);
|
|
return <get ActivityIndicator.View ref={refView} style={null} />;
|
|
});
|
|
let obj1 = {
|
|
key: "requestAdjust",
|
|
value: function requestAdjust(arg0) {
|
|
const self = this;
|
|
const scrollingTo = this.ctx.state.scrollingTo;
|
|
let animated;
|
|
if (null != scrollingTo) {
|
|
animated = scrollingTo.animated;
|
|
}
|
|
if (animated) {
|
|
if (!scrollingTo.isInitialScroll) {
|
|
self.pendingAdjust = self.pendingAdjust + arg0;
|
|
set$(self.ctx, "scrollAdjustPending", self.pendingAdjust);
|
|
}
|
|
if (self.ctx.state.scrollingTo) {
|
|
const ctx = self.ctx;
|
|
const scrollingTo2 = ctx.state.scrollingTo;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
ctx.state.animFrameCheckFinishedScroll = requestAnimationFrame(() => {
|
|
const scrollingTo = tmp.state.scrollingTo;
|
|
if (scrollingTo) {
|
|
const state = tmp.state;
|
|
state.animFrameCheckFinishedScroll = undefined;
|
|
const tmp3 = outer1_62(tmp, scrollingTo);
|
|
let isAtResolvedTarget = tmp3.isAtResolvedTarget;
|
|
if (isAtResolvedTarget) {
|
|
const isInitialScroll = scrollingTo.isInitialScroll;
|
|
let hasScrolled = !isInitialScroll;
|
|
if (isInitialScroll) {
|
|
hasScrolled = state.hasScrolled;
|
|
}
|
|
if (!hasScrolled) {
|
|
hasScrolled = tmp3.clampedTargetOffset <= 1;
|
|
}
|
|
isAtResolvedTarget = hasScrolled;
|
|
}
|
|
if (isAtResolvedTarget) {
|
|
outer1_60(tmp);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
self.appliedAdjust = self.appliedAdjust + arg0;
|
|
set$(self.ctx, "scrollAdjust", self.appliedAdjust);
|
|
}
|
|
};
|
|
let closure_141 = forwardRef(function LegendListInner2(recycleItems, ref) {
|
|
let ListEmptyComponent;
|
|
let ListFooterComponent;
|
|
let ListFooterComponentStyle;
|
|
let ListHeaderComponent;
|
|
let animatedPropsInternal;
|
|
let columnGap;
|
|
let columnWrapperStyle;
|
|
let contentContainerStyle;
|
|
let contentInset;
|
|
let contentInsetEndAdjustment;
|
|
let createElement;
|
|
let createElement2;
|
|
let data;
|
|
let dataKey;
|
|
let dataVersion;
|
|
let drawDistance;
|
|
let estimatedHeaderSize;
|
|
let estimatedItemSize;
|
|
let estimatedListSize;
|
|
let experimental_adaptiveRender;
|
|
let extraData;
|
|
let gap;
|
|
let getFixedItemSize;
|
|
let getItemType;
|
|
let horizontal;
|
|
let initialScrollAtEnd;
|
|
let initialScrollIndex;
|
|
let initialScrollOffset;
|
|
let itemsAreEqual;
|
|
let itemsAreEqual2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let listen$;
|
|
let maintainVisibleContentPosition;
|
|
let measureInLayoutEffect;
|
|
let numColumns;
|
|
let onEndReachedThreshold;
|
|
let onFirstVisibleItemChanged;
|
|
let onItemSizeChanged;
|
|
let onLayout;
|
|
let onLoad;
|
|
let onMomentumScrollEnd;
|
|
let onRefresh;
|
|
let onScroll;
|
|
let onScrollBeginDrag;
|
|
let onStartReached;
|
|
let onStartReachedThreshold;
|
|
let onStickyHeaderChange;
|
|
let overrideItemLayout;
|
|
let positionComponentInternal;
|
|
let positionComponentInternal2;
|
|
let progressViewOffset;
|
|
let refScrollView;
|
|
let refreshControl;
|
|
let refreshing;
|
|
let renderItem;
|
|
let renderScrollComponent;
|
|
let rowGap;
|
|
let rtl;
|
|
let scrollEventThrottle;
|
|
let size;
|
|
let snapToIndices;
|
|
let stickyHeaderIndices;
|
|
let stickyPositionComponentInternal;
|
|
let stickyPositionComponentInternal2;
|
|
let style;
|
|
let tmp67;
|
|
let useWindowScroll;
|
|
let viewabilityConfig;
|
|
let obj = snapToIndices;
|
|
let callback = snapToIndices.useCallback((arg0) => {
|
|
|
|
}, []);
|
|
if (undefined === recycleItems.recycleItems) {
|
|
let tmp2 = callback;
|
|
if (callback) {
|
|
tmp2 = !set.has("recycleItems-omitted");
|
|
}
|
|
if (tmp2) {
|
|
set.add("recycleItems-omitted");
|
|
let _console = console;
|
|
let _HermesInternal = HermesInternal;
|
|
console.warn("[legend-list] " + "recycleItems was not provided, so it defaults to false. Set recycleItems explicitly to true for better performance with recycling-aware rows, or false to preserve remount-on-reuse behavior.");
|
|
}
|
|
}
|
|
const alignItemsAtEnd = recycleItems.alignItemsAtEnd;
|
|
let anchoredEndSpace = recycleItems.anchoredEndSpace;
|
|
stickyHeaderIndices = anchoredEndSpace;
|
|
const alwaysRender = recycleItems.alwaysRender;
|
|
horizontal = alwaysRender;
|
|
({ columnWrapperStyle, contentInset, data, contentContainerStyle } = recycleItems);
|
|
if (undefined === data) {
|
|
data = [];
|
|
}
|
|
let context = data;
|
|
({ dataKey, dataVersion, drawDistance } = recycleItems);
|
|
let num = 250;
|
|
if (undefined !== drawDistance) {
|
|
num = drawDistance;
|
|
}
|
|
({ contentInsetEndAdjustment, estimatedItemSize } = recycleItems);
|
|
let num2 = 100;
|
|
if (undefined !== estimatedItemSize) {
|
|
num2 = estimatedItemSize;
|
|
}
|
|
({ estimatedListSize, extraData } = recycleItems);
|
|
onScroll = extraData;
|
|
({ getFixedItemSize, getItemType, horizontal } = recycleItems);
|
|
callback = horizontal;
|
|
({ rtl, estimatedHeaderSize, initialScrollAtEnd } = recycleItems);
|
|
let closure_5 = tmp9;
|
|
({ initialScrollIndex, initialScrollOffset, experimental_adaptiveRender, keyExtractor, ListFooterComponent } = recycleItems);
|
|
let maintainScrollAtEnd = recycleItems.maintainScrollAtEnd;
|
|
let tmp10 = undefined !== maintainScrollAtEnd;
|
|
({ itemsAreEqual, ListEmptyComponent, ListFooterComponentStyle, ListHeaderComponent } = recycleItems);
|
|
if (tmp10) {
|
|
tmp10 = maintainScrollAtEnd;
|
|
}
|
|
const maintainScrollAtEndThreshold = recycleItems.maintainScrollAtEndThreshold;
|
|
let num3 = 0.1;
|
|
if (undefined !== maintainScrollAtEndThreshold) {
|
|
num3 = maintainScrollAtEndThreshold;
|
|
}
|
|
({ maintainVisibleContentPosition, numColumns } = recycleItems);
|
|
let num4 = 1;
|
|
if (undefined !== numColumns) {
|
|
num4 = numColumns;
|
|
}
|
|
({ overrideItemLayout, onEndReachedThreshold } = recycleItems);
|
|
let num5 = 0.5;
|
|
let num6 = 0.5;
|
|
if (undefined !== onEndReachedThreshold) {
|
|
num6 = onEndReachedThreshold;
|
|
}
|
|
const onMetricsChange = recycleItems.onMetricsChange;
|
|
({ onRefresh, onScroll, onStartReachedThreshold, onItemSizeChanged, onLayout, onLoad, onMomentumScrollEnd, onScrollBeginDrag, onStartReached } = recycleItems);
|
|
if (undefined !== onStartReachedThreshold) {
|
|
num5 = onStartReachedThreshold;
|
|
}
|
|
const onViewableItemsChanged = recycleItems.onViewableItemsChanged;
|
|
({ progressViewOffset, recycleItems } = recycleItems);
|
|
let tmp11 = undefined !== recycleItems;
|
|
({ onStickyHeaderChange, onFirstVisibleItemChanged } = recycleItems);
|
|
if (tmp11) {
|
|
tmp11 = recycleItems;
|
|
}
|
|
({ refreshControl, scrollEventThrottle, snapToIndices } = recycleItems);
|
|
({ stickyHeaderIndices, useWindowScroll, viewabilityConfig } = recycleItems);
|
|
const viewabilityConfigCallbackPairs = recycleItems.viewabilityConfigCallbackPairs;
|
|
({ refreshing, refScrollView, renderScrollComponent, renderItem, style } = recycleItems);
|
|
let tmp12 = onScroll(recycleItems, onMetricsChange);
|
|
({ positionComponentInternal: positionComponentInternal2, stickyPositionComponentInternal: stickyPositionComponentInternal2 } = tmp12);
|
|
({ animatedPropsInternal, positionComponentInternal, stickyPositionComponentInternal } = recycleItems);
|
|
let tmp13 = onScroll(tmp12, onViewableItemsChanged);
|
|
let obj1 = StyleSheet;
|
|
const flattenResult = StyleSheet.flatten(contentContainerStyle);
|
|
let tmp15 = tmp8;
|
|
if (undefined !== alignItemsAtEnd && alignItemsAtEnd) {
|
|
tmp15 = !horizontal;
|
|
}
|
|
if (tmp15) {
|
|
let minHeight;
|
|
if (null != flattenResult) {
|
|
minHeight = flattenResult.minHeight;
|
|
}
|
|
tmp15 = null == minHeight;
|
|
}
|
|
if (tmp15) {
|
|
tmp15 = data.length > 0;
|
|
}
|
|
let tmp18 = tmp8;
|
|
if (undefined !== alignItemsAtEnd && alignItemsAtEnd) {
|
|
tmp18 = !tmp15;
|
|
}
|
|
if (!tmp18) {
|
|
obj = {};
|
|
let merged = Object.assign(flattenResult);
|
|
if (tmp8) {
|
|
if (!tmp15) {
|
|
let str5 = "column";
|
|
if (horizontal) {
|
|
str5 = "row";
|
|
}
|
|
obj = { display: "flex", flexDirection: null };
|
|
obj[1] = str5;
|
|
let tmp28 = tmp18 ? { flexGrow: 1 } : {};
|
|
let merged1 = Object.assign(tmp28);
|
|
obj.justifyContent = "flex-end";
|
|
}
|
|
const merged2 = Object.assign(obj);
|
|
obj1 = {};
|
|
const merged3 = Object.assign(obj1.flatten(style));
|
|
let tmp38 = extractPadding(obj1, obj, "Top");
|
|
let closure_13 = tmp38;
|
|
let tmp39 = extractPadding(obj1, obj, "Bottom");
|
|
let closure_14 = tmp39;
|
|
if (!tmp10) {
|
|
if (true === maintainVisibleContentPosition) {
|
|
let obj2 = { data: true, size: true };
|
|
} else {
|
|
if (maintainVisibleContentPosition) {
|
|
if (typeof maintainVisibleContentPosition === "object") {
|
|
const data2 = maintainVisibleContentPosition.data;
|
|
let obj3 = { data: null, shouldRestorePosition: null, size: null };
|
|
obj3[0] = null != data2 && data2;
|
|
({ shouldRestorePosition: obj9[1], size } = maintainVisibleContentPosition);
|
|
obj3[2] = null == size || size;
|
|
obj2 = obj3;
|
|
let tmp51 = null != data2 && data2;
|
|
}
|
|
}
|
|
obj2 = false === maintainVisibleContentPosition ? { data: false, size: false } : { data: false, size: true };
|
|
}
|
|
let tmp54 = null != initialScrollOffset;
|
|
let tmp55 = !tmp9;
|
|
if (!tmp9) {
|
|
tmp55 = !tmp53;
|
|
}
|
|
if (tmp55) {
|
|
tmp55 = !tmp54;
|
|
}
|
|
if (tmp55) {
|
|
let tmp56 = horizontal;
|
|
if (tmp56) {
|
|
let isRTL = rtl;
|
|
if (null == rtl) {
|
|
isRTL = viewabilityConfig.I18nManager.isRTL;
|
|
}
|
|
tmp56 = isRTL;
|
|
}
|
|
tmp55 = tmp56;
|
|
}
|
|
const createAnimatedValue = tmp55;
|
|
let tmp59 = !tmp9;
|
|
if (!tmp9) {
|
|
tmp59 = !tmp53;
|
|
}
|
|
if (tmp59) {
|
|
if (!tmp54) {
|
|
tmp54 = tmp55;
|
|
}
|
|
tmp59 = tmp54;
|
|
}
|
|
let closure_17 = tmp59;
|
|
let tmp60 = tmp9;
|
|
if (!tmp9) {
|
|
tmp60 = tmp53;
|
|
}
|
|
let c18 = tmp60;
|
|
if (tmp9) {
|
|
let obj4 = { index: null, preserveForBottomPadding: true, viewOffset: null, viewPosition: 1 };
|
|
let _Math = Math;
|
|
obj4[0] = Math.max(0, data.length - 1);
|
|
obj4[2] = -tmp39;
|
|
let tmp61 = obj4;
|
|
} else if (tmp53) {
|
|
if (typeof initialScrollIndex === "object") {
|
|
let index = initialScrollIndex.index;
|
|
let num12 = 0;
|
|
if (null != index) {
|
|
num12 = index;
|
|
}
|
|
let obj5 = { index: null, preserveForBottomPadding: null, viewOffset: null, viewPosition: null };
|
|
obj5[0] = num12;
|
|
obj5[1] = undefined === initialScrollIndex.viewOffset && 1 === initialScrollIndex.viewPosition || undefined;
|
|
let viewOffset = initialScrollIndex.viewOffset;
|
|
if (null == viewOffset) {
|
|
let num13 = 0;
|
|
if (1 === initialScrollIndex.viewPosition) {
|
|
num13 = -tmp39;
|
|
}
|
|
viewOffset = num13;
|
|
}
|
|
obj5[2] = viewOffset;
|
|
let viewPosition = initialScrollIndex.viewPosition;
|
|
initialScrollIndex = 0;
|
|
if (null != viewPosition) {
|
|
initialScrollIndex = viewPosition;
|
|
}
|
|
obj5[3] = initialScrollIndex;
|
|
let obj6 = obj5;
|
|
} else {
|
|
let num10 = 0;
|
|
if (null != initialScrollIndex) {
|
|
num10 = initialScrollIndex;
|
|
}
|
|
obj6 = { index: null, viewOffset: null };
|
|
obj6[0] = num10;
|
|
let num11 = 0;
|
|
if (null != initialScrollOffset) {
|
|
num11 = initialScrollOffset;
|
|
}
|
|
obj6[1] = num11;
|
|
}
|
|
} else if (tmp59) {
|
|
let num9 = 0;
|
|
if (null != initialScrollOffset) {
|
|
num9 = initialScrollOffset;
|
|
}
|
|
let obj7 = { contentOffset: null, index: 0, viewOffset: 0 };
|
|
obj7[0] = num9;
|
|
tmp61 = obj7;
|
|
}
|
|
const StateProvider = tmp61;
|
|
let obj13 = viewabilityConfigCallbackPairs;
|
|
[tmp67, listen$] = callback(viewabilityConfigCallbackPairs.useState(!closure_27), 2);
|
|
let closure_21 = callback(viewabilityConfigCallbackPairs.useReducer((arg0) => arg0 + 1, 0), 2)[1];
|
|
context = viewabilityConfigCallbackPairs.useContext(closure_17);
|
|
if (!columnWrapperStyle) {
|
|
({ gap, columnGap, rowGap } = obj);
|
|
obj.gap = undefined;
|
|
obj.columnGap = undefined;
|
|
obj.rowGap = undefined;
|
|
let obj8 = { columnGap: null, gap: null, rowGap: null };
|
|
obj8[0] = columnGap;
|
|
obj8[1] = gap;
|
|
obj8[2] = rowGap;
|
|
let tmp70 = obj8;
|
|
}
|
|
context.columnWrapperStyle = columnWrapperStyle;
|
|
if (horizontal) {
|
|
columnGap = undefined;
|
|
if (!tmp71) {
|
|
columnGap = columnWrapperStyle2.columnGap;
|
|
}
|
|
if (null == columnGap) {
|
|
gap = undefined;
|
|
if (null != context.columnWrapperStyle) {
|
|
gap = columnWrapperStyle4.gap;
|
|
}
|
|
columnGap = gap;
|
|
}
|
|
rowGap = columnGap;
|
|
} else {
|
|
rowGap = undefined;
|
|
if (!tmp71) {
|
|
rowGap = columnWrapperStyle2.rowGap;
|
|
}
|
|
if (null == rowGap) {
|
|
let gap1;
|
|
if (null != context.columnWrapperStyle) {
|
|
gap1 = columnWrapperStyle3.gap;
|
|
}
|
|
rowGap = gap1;
|
|
}
|
|
}
|
|
let num15 = 0;
|
|
if (typeof rowGap === "number") {
|
|
callback = globalThis;
|
|
let _Number = Number;
|
|
num15 = 0;
|
|
if (Number.isFinite(rowGap)) {
|
|
num15 = rowGap;
|
|
}
|
|
}
|
|
ref = obj.useRef(null);
|
|
let fn = keyExtractor;
|
|
const tmp64 = closure_27;
|
|
const tmp66 = callback(viewabilityConfigCallbackPairs.useState(!closure_27), 2);
|
|
if (null == keyExtractor) {
|
|
fn = (arg0, arg1) => arg1.toString();
|
|
}
|
|
let closure_25 = obj.useRef(undefined);
|
|
let anchorIndex;
|
|
if (null != anchoredEndSpace) {
|
|
anchorIndex = anchoredEndSpace.anchorIndex;
|
|
}
|
|
let items = [anchorIndex, , , , , , , , ];
|
|
let top;
|
|
if (null != alwaysRender) {
|
|
top = alwaysRender.top;
|
|
}
|
|
items[1] = top;
|
|
let bottom;
|
|
if (null != alwaysRender) {
|
|
bottom = alwaysRender.bottom;
|
|
}
|
|
items[2] = bottom;
|
|
let indices;
|
|
if (null != alwaysRender) {
|
|
indices = alwaysRender.indices;
|
|
}
|
|
let joined;
|
|
if (null != indices) {
|
|
joined = indices.join(",");
|
|
}
|
|
items[3] = joined;
|
|
let keys;
|
|
if (null != alwaysRender) {
|
|
keys = alwaysRender.keys;
|
|
}
|
|
let joined1;
|
|
if (null != keys) {
|
|
joined1 = keys.join(",");
|
|
}
|
|
items[4] = joined1;
|
|
items[5] = data;
|
|
items[6] = dataKey;
|
|
items[7] = dataVersion;
|
|
items[8] = fn;
|
|
const memo = obj.useMemo(() => {
|
|
let anchorIndex;
|
|
if (null != stickyHeaderIndices) {
|
|
anchorIndex = stickyHeaderIndices.anchorIndex;
|
|
}
|
|
let tmp5 = (function getAlwaysRenderIndices(top, arg1, arg2, anchorIndex) {
|
|
let bound;
|
|
if (0 === arg1.length) {
|
|
return [];
|
|
} else {
|
|
const _Set2 = Set;
|
|
const set = new Set();
|
|
let length = arg1.length;
|
|
top = undefined;
|
|
if (null != top) {
|
|
top = top.top;
|
|
}
|
|
const tmp44Result = closure_138(top);
|
|
if (tmp44Result > 0) {
|
|
const _Math = Math;
|
|
let num2 = 0;
|
|
if (0 < Math.min(tmp44Result, length)) {
|
|
do {
|
|
let tmp4 = callback;
|
|
let tmp5 = callback(set, length, num2);
|
|
num2 = num2 + 1;
|
|
let _Math2 = Math;
|
|
bound = Math.min(tmp44Result, length);
|
|
} while (num2 < bound);
|
|
}
|
|
}
|
|
let bottom;
|
|
if (null != top) {
|
|
bottom = top.bottom;
|
|
}
|
|
const tmp7Result = closure_138(bottom);
|
|
if (tmp7Result > 0) {
|
|
const _Math3 = Math;
|
|
let bound1 = Math.max(0, length - tmp7Result);
|
|
if (bound1 < length) {
|
|
do {
|
|
let tmp11 = callback;
|
|
let tmp12 = callback(set, length, bound1);
|
|
bound1 = bound1 + 1;
|
|
} while (bound1 < length);
|
|
}
|
|
}
|
|
let indices;
|
|
if (null != top) {
|
|
indices = top.indices;
|
|
}
|
|
length = undefined;
|
|
if (null != indices) {
|
|
length = indices.length;
|
|
}
|
|
if (length) {
|
|
indices = top.indices;
|
|
for (const item10038 of indices) {
|
|
let _Number = Number;
|
|
let tmp17 = item10038;
|
|
if (Number.isFinite(item10038)) {
|
|
let tmp18 = callback;
|
|
let _Math4 = Math;
|
|
let tmp19 = item10038;
|
|
let tmp20 = callback(set, length, Math.floor(tmp17));
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
let keys;
|
|
if (null != top) {
|
|
keys = top.keys;
|
|
}
|
|
let length1;
|
|
if (null != keys) {
|
|
length1 = keys.length;
|
|
}
|
|
if (length1) {
|
|
const _Set = Set;
|
|
const set1 = new Set(top.keys);
|
|
if (0 < length) {
|
|
let num4 = 0;
|
|
if (set1.size > 0) {
|
|
while (true) {
|
|
let tmp26 = arg2(arg1[num4], num4);
|
|
let tmp27 = num4;
|
|
if (set1.has(tmp26)) {
|
|
let tmp28 = callback;
|
|
let tmp29 = callback(set, length, num4);
|
|
let deleteResult = set1.delete(tmp26);
|
|
}
|
|
let sum = num4 + 1;
|
|
if (sum >= length) {
|
|
break;
|
|
} else {
|
|
num4 = sum;
|
|
if (set1.size <= 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (undefined !== anchorIndex) {
|
|
const _Number2 = Number;
|
|
if (Number.isFinite(anchorIndex)) {
|
|
const _Math5 = Math;
|
|
const rounded = Math.floor(anchorIndex);
|
|
let sum1 = length;
|
|
if (rounded >= 0) {
|
|
sum1 = rounded;
|
|
}
|
|
if (sum1 < length) {
|
|
do {
|
|
let tmp35 = callback;
|
|
let tmp36 = callback(set, length, sum1);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 < length);
|
|
}
|
|
}
|
|
}
|
|
const _Array = Array;
|
|
const arr = Array.from(set);
|
|
const sorted = arr.sort(closure_137);
|
|
return arr;
|
|
}
|
|
})(horizontal, context, fn, anchorIndex);
|
|
const obj = { arr: tmp5, set: null };
|
|
obj[1] = new Set(tmp5);
|
|
return obj;
|
|
}, items);
|
|
const ref1 = obj.useRef(undefined);
|
|
closure_27 = tmp88;
|
|
let closure_28 = obj.useRef(tmp88);
|
|
if (!ref1.current) {
|
|
if (!context.state) {
|
|
if (null != estimatedListSize) {
|
|
let str15 = "height";
|
|
if (horizontal) {
|
|
str15 = "width";
|
|
}
|
|
let values = context.values;
|
|
let initialMode;
|
|
if (null != experimental_adaptiveRender) {
|
|
initialMode = experimental_adaptiveRender.initialMode;
|
|
}
|
|
let str16 = "normal";
|
|
if (null != initialMode) {
|
|
str16 = initialMode;
|
|
}
|
|
let result = values.set("adaptiveRender", str16);
|
|
let obj9 = { averageSizes: null, columnSpans: null, columns: null, containerItemGenerations: null, containerItemKeys: null, containerItemMetadata: null, contentInsetOverride: "sa", dataChangeEpoch: false, dataChangeNeedsScrollUpdate: false, didColumnsChange: false, didDataChange: false, didLoad: true, enableScrollForNextCalculateItemsInView: -1, endBuffered: -1, endNoBuffer: "sa", endReachedSnapshot: 285736959, firstFullyOnScreenIndex: 7430402, hasHadNonEmptyData: 16777216, idCache: 113, idsInView: 7430400, indexByKey: 1644167168, initialScroll: 28930, initialScrollSession: 23134208, isEndReached: 113, isFirst: 39911680, isStartReached: 115, lastBatchingAction: 0, lastLayout: 0, lastScrollDelta: 7409920, loadStartTime: 33554432, minIndexSizeChanged: -142, nativeContentInset: -1, nativeMarginTop: 1627546111, pendingDataComparison: 28929, pendingNativeMVCPAdjust: 1365311488, positions: 1359071330, props: 554042085, queuedCalculateItemsInView: 1359286537, queuedFullDrawDistancePrewarm: -1354692502, refScroller: 285213133, scroll: 38232897, scrollAdjustHandler: -1505558272, scrollForNextCalculateItemsInView: -1526725990, scrollHistory: 2113929882, scrollLength: 1358955026, scrollPending: 1359078362, scrollPrev: 302385136, scrollPrevTime: 12145158, scrollProcessingEnabled: 285779618, scrollTime: 32796929, sizes: 1359413248, sizesKnown: 1359066921, startBuffered: 1359387699, startNoBuffer: 1359183502, startReachedSnapshot: 1359055497, stickyContainerPool: 173124561, stickyContainers: 1159922033, timeoutAdaptiveRender: 12903, timeouts: -105549536, totalSize: 16877, viewabilityConfigCallbackPairs: 391880640 };
|
|
obj9[0] = {};
|
|
obj9[1] = [];
|
|
obj9[2] = [];
|
|
obj9[3] = [];
|
|
const _Map = Map;
|
|
const map = new Map();
|
|
obj9[4] = map;
|
|
const _Map2 = Map;
|
|
callback = new.target;
|
|
callback = new Map();
|
|
obj9[5] = callback;
|
|
obj9[17] = data.length > 0;
|
|
obj9[18] = [];
|
|
obj9[19] = [];
|
|
const _Map3 = Map;
|
|
keys = new.target;
|
|
callback = new.target;
|
|
callback = new Map();
|
|
obj9[20] = callback;
|
|
obj9[21] = tmp61;
|
|
callback = undefined;
|
|
if (tmp61) {
|
|
let str18 = "bootstrap";
|
|
if (tmp59) {
|
|
str18 = "offset";
|
|
}
|
|
const obj10 = { kind: null, previousDataLength: null };
|
|
obj10[0] = str18;
|
|
obj10[1] = data.length;
|
|
callback = obj10;
|
|
}
|
|
obj9[22] = callback;
|
|
let _Date = Date;
|
|
obj9[26] = Date.now();
|
|
const _Date2 = Date;
|
|
obj9[29] = Date.now();
|
|
obj9[35] = [];
|
|
obj9[36] = {};
|
|
obj9[39] = { current: null };
|
|
callback = closure_134;
|
|
callback = new.target;
|
|
callback = new.target;
|
|
callback = context;
|
|
callback = new closure_134(context);
|
|
obj9[41] = callback;
|
|
obj9[43] = [];
|
|
obj9[44] = estimatedListSize[str15];
|
|
const _Map4 = Map;
|
|
callback = new.target;
|
|
callback = new.target;
|
|
callback = new Map();
|
|
obj9[50] = callback;
|
|
const _Map5 = Map;
|
|
callback = new.target;
|
|
callback = new.target;
|
|
callback = new Map();
|
|
obj9[51] = callback;
|
|
let _Set = Set;
|
|
callback = new.target;
|
|
callback = new.target;
|
|
callback = new Set();
|
|
obj9[55] = callback;
|
|
const _Map6 = Map;
|
|
callback = new.target;
|
|
callback = new.target;
|
|
callback = new Map();
|
|
obj9[56] = callback;
|
|
let _Set2 = Set;
|
|
callback = new.target;
|
|
callback = new.target;
|
|
callback = new Set();
|
|
obj9[58] = callback;
|
|
context.state = obj9;
|
|
let state = context.state;
|
|
state.triggerCalculateItemsInView = (arg0) => {
|
|
let obj = arg0;
|
|
let closure_0 = context;
|
|
if (arg0 === undefined) {
|
|
obj = {};
|
|
}
|
|
const state = context.state;
|
|
outer1_97(() => {
|
|
let alwaysRenderIndicesArr;
|
|
let bottom;
|
|
let closure_4;
|
|
let dataChanged;
|
|
let doMVCP;
|
|
let enableScrollForNextCalculateItemsInView;
|
|
let endNoBuffer;
|
|
let forceFullItemPositions;
|
|
let getItemType;
|
|
let idCache;
|
|
let indexByKey;
|
|
let initialScroll;
|
|
let keyExtractor;
|
|
let minIndexSizeChanged;
|
|
let positions;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scrollForNextCalculateItemsInView;
|
|
let scrollLength;
|
|
let set2;
|
|
let sizes;
|
|
let startBufferedId;
|
|
let startNoBuffer;
|
|
let state;
|
|
let top;
|
|
let viewabilityConfigCallbackPairs;
|
|
let addResult = state;
|
|
let containerItemKeys = state.containerItemKeys;
|
|
({ enableScrollForNextCalculateItemsInView, idCache } = state);
|
|
({ indexByKey, minIndexSizeChanged, positions, props } = state);
|
|
({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props);
|
|
({ keyExtractor, onStickyHeaderChange: closure_4 } = props);
|
|
({ scrollForNextCalculateItemsInView, scrollLength } = state);
|
|
({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state);
|
|
const data = state.props.data;
|
|
let prop = state.props.stickyHeaderIndicesArr;
|
|
if (!prop) {
|
|
prop = [];
|
|
}
|
|
let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet;
|
|
if (!stickyHeaderIndicesSet) {
|
|
let _Set = Set;
|
|
stickyHeaderIndicesSet = new Set();
|
|
}
|
|
let tmp9 = outer1_46(containerItemKeys, idCache.drawDistanceMode);
|
|
({ dataChanged, doMVCP, forceFullItemPositions } = idCache);
|
|
let initialScrollSession = tmp2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp2.initialScrollSession.bootstrap;
|
|
}
|
|
let tmp16 = outer1_21(containerItemKeys, "numContainers");
|
|
if (data) {
|
|
if (0 !== scrollLength) {
|
|
if (tmp16) {
|
|
let closure_8 = outer1_25(tmp7);
|
|
let tmp15Result = tmp15(tmp7, "stylePaddingTop");
|
|
let sum = tmp15Result + tmp15(tmp7, "alignItemsAtEndPadding");
|
|
let closure_9 = sum + tmp15(tmp7, "headerSize");
|
|
tmp15Result = tmp15(tmp7, "numColumns");
|
|
let scrollVelocity = idCache.scrollVelocity;
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = outer1_69(tmp2);
|
|
}
|
|
({ initialScroll, queuedInitialLayout } = tmp2);
|
|
if (!tmp13) {
|
|
let scroll;
|
|
if (null != bootstrap) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = tmp2.scroll;
|
|
}
|
|
} else {
|
|
if (!queuedInitialLayout) {
|
|
if (outer1_41(tmp2)) {
|
|
if (initialScroll) {
|
|
scroll = outer1_75(tmp7, initialScroll);
|
|
}
|
|
}
|
|
}
|
|
scroll = tmp2.scroll;
|
|
}
|
|
let c10 = 0;
|
|
let c11 = 0;
|
|
let c12 = 0;
|
|
let c13 = 0;
|
|
let c14 = 0;
|
|
let c15 = 0;
|
|
function updateScroll2(scroll) {
|
|
let closure_16 = scroll;
|
|
const values = containerItemKeys.values;
|
|
const value = values.get("scrollAdjustPending");
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
let closure_11 = num - closure_9;
|
|
const rounded = Math.round(scroll + closure_11);
|
|
let closure_12 = rounded;
|
|
if (rounded + scrollLength > closure_8) {
|
|
const _Math = Math;
|
|
closure_12 = Math.max(0, tmp4 - tmp3);
|
|
}
|
|
}
|
|
updateScroll2(scroll);
|
|
const tmp15Result1 = tmp15(tmp7, "activeStickyIndex");
|
|
let closure_17 = tmp15Result1;
|
|
function resolveStickyState() {
|
|
let num = -1;
|
|
let num2 = -1;
|
|
if (prop.length > 0) {
|
|
let diff = arr.length - 1;
|
|
let tmp5 = num;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp6 = tmp3[arr[diff]];
|
|
let tmp7 = diff;
|
|
if (undefined === tmp6) {
|
|
diff = diff - 1;
|
|
tmp5 = num;
|
|
if (0 > diff) {
|
|
break;
|
|
}
|
|
} else {
|
|
tmp5 = diff;
|
|
if (tmp >= tmp6) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
num2 = tmp5;
|
|
}
|
|
if (0 <= num2) {
|
|
num = arr[num2];
|
|
}
|
|
let tmp8 = num2 >= 0;
|
|
if (0 > num2) {
|
|
tmp8 = tmp9 >= 0;
|
|
}
|
|
if (tmp8) {
|
|
outer2_22(containerItemKeys, "activeStickyIndex", num);
|
|
}
|
|
let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null };
|
|
let fn;
|
|
if (closure_4) {
|
|
if (arr.length > 0) {
|
|
if (tmp9 !== num) {
|
|
fn = () => {
|
|
if (undefined !== outer1_6[num]) {
|
|
if (null != outer1_4) {
|
|
const obj = { index: null, item: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp2;
|
|
tmp3(obj);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
obj[1] = fn;
|
|
return obj;
|
|
}
|
|
if (!dataChanged) {
|
|
let stickyState = resolveStickyState();
|
|
}
|
|
let result2 = tmp9;
|
|
let result3 = tmp9;
|
|
if (scrollVelocity > 0) {
|
|
let result = 0.5 * tmp9;
|
|
result2 = result;
|
|
const result1 = 1.5 * tmp9;
|
|
result3 = result1;
|
|
result3 = result1;
|
|
result2 = result;
|
|
} else {
|
|
if (0 === scrollVelocity) {
|
|
let _Math = Math;
|
|
}
|
|
result2 = 1.5 * tmp9;
|
|
result3 = 0.5 * tmp9;
|
|
}
|
|
let num6 = 0;
|
|
if (!dataChanged) {
|
|
num6 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num6 = 0;
|
|
if (!tmp25) {
|
|
num6 = 0;
|
|
if (!outer1_41(tmp2)) {
|
|
num6 = 0;
|
|
if (!tmp2.scrollingTo) {
|
|
num6 = 0;
|
|
if (!tmp2.pendingNativeMVCPAdjust) {
|
|
num6 = 0;
|
|
if (tmp15(tmp7, "readyToRender")) {
|
|
let _Math2 = Math;
|
|
num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) {
|
|
if (arg1 <= 0) {
|
|
return 0;
|
|
} else {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const bound = Math.min(1, Math.abs(scrollVelocity) / 4);
|
|
return Math.sign(scrollVelocity) * arg1 * bound;
|
|
}
|
|
})(scrollVelocity, Math.min(result2, result3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateScrollRange() {
|
|
const bound = Math.max(0, c12);
|
|
let closure_14 = Math.max(bound, c12 + scrollLength + Math.max(0, -scroll));
|
|
let closure_13 = bound - result2 + num6;
|
|
let closure_15 = closure_14 + result3 + num6;
|
|
}
|
|
updateScrollRange();
|
|
if (0 !== num6) {
|
|
(function scheduleRenderRangeProjectionSettle(state) {
|
|
state = state.state;
|
|
const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle;
|
|
if (undefined !== timeoutRenderRangeProjectionSettle) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutRenderRangeProjectionSettle);
|
|
let timeouts = state.timeouts;
|
|
timeouts.delete(timeoutRenderRangeProjectionSettle);
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
state.timeoutRenderRangeProjectionSettle = undefined;
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.scrollHistory.length = 0;
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}, 100);
|
|
state.timeoutRenderRangeProjectionSettle = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
})(tmp7);
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
if (!tmp25) {
|
|
if (!dataChanged) {
|
|
if (!forceFullItemPositions) {
|
|
if (scrollForNextCalculateItemsInView) {
|
|
({ top, bottom } = scrollForNextCalculateItemsInView);
|
|
if (null === top) {
|
|
if (null === bottom) {
|
|
tmp2.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}
|
|
if (null === top) {
|
|
if (viewabilityConfigCallbackPairs) {
|
|
(function updateViewabilityForCachedRange(state, viewabilityConfigCallbackPairs, scrollLength, c12, c14) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let tmp7 = null;
|
|
let sum1;
|
|
let tmp9 = null;
|
|
if (startBuffered <= endBuffered) {
|
|
let tmp3 = null;
|
|
let tmp5 = null;
|
|
let tmp6 = startBuffered;
|
|
tmp7 = null;
|
|
tmp9 = null;
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp10 = tmp[tmp6];
|
|
let tmp11 = tmp3;
|
|
let tmp12 = tmp4;
|
|
let tmp13 = tmp5;
|
|
let tmp14 = tmp6;
|
|
if (null == tmp10) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data) {
|
|
let tmp15 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp15 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp15;
|
|
str2 = tmp15;
|
|
}
|
|
tmp10 = str2;
|
|
}
|
|
let value = sizes.get(tmp10);
|
|
if (null == value) {
|
|
let tmp19 = callback4;
|
|
let num2 = 0;
|
|
let tmp20 = state;
|
|
let tmp21 = tmp10;
|
|
let tmp22 = tmp6;
|
|
value = callback4(state, tmp18, tmp14, data[tmp6]);
|
|
}
|
|
let tmp23 = tmp2[tmp6];
|
|
let tmp24 = null === tmp11 && tmp23 + value > c12;
|
|
if (tmp24) {
|
|
tmp11 = tmp6;
|
|
}
|
|
let tmp25 = undefined === tmp12 && tmp23 >= c12 - 10 && tmp23 <= c14;
|
|
if (tmp25) {
|
|
tmp12 = tmp6;
|
|
}
|
|
let tmp26 = tmp13;
|
|
let flag = false;
|
|
if (null !== tmp11) {
|
|
let flag2 = true;
|
|
if (tmp23 <= c14) {
|
|
tmp13 = tmp6;
|
|
flag2 = false;
|
|
}
|
|
tmp26 = tmp13;
|
|
flag = flag2;
|
|
}
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (flag) {
|
|
break;
|
|
} else {
|
|
let sum = tmp6 + 1;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (sum > endBuffered) {
|
|
break;
|
|
} else {
|
|
tmp3 = tmp11;
|
|
tmp4 = tmp12;
|
|
tmp5 = tmp26;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
tmp6 = sum;
|
|
if (sum >= data.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj = { endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startNoBuffer: null };
|
|
obj[0] = tmp9;
|
|
obj[1] = sum1;
|
|
if (null == sum1) {
|
|
sum1 = tmp7;
|
|
}
|
|
const items = [];
|
|
if (null != sum1) {
|
|
if (null !== tmp9) {
|
|
if (sum1 <= tmp9) {
|
|
do {
|
|
let tmp29 = state.idCache[sum1];
|
|
let tmp30 = sum1;
|
|
if (null == tmp29) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp29 = str4;
|
|
}
|
|
let arr = items.push(tmp29);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 <= tmp9);
|
|
}
|
|
}
|
|
}
|
|
obj[2] = items;
|
|
obj[3] = tmp7;
|
|
const merged = Object.assign(state, obj);
|
|
callback9(state, tmp7);
|
|
if (tmp37) {
|
|
callback7(state, state, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered);
|
|
}
|
|
tmp37 = null !== tmp7 && null !== tmp9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})(tmp7, viewabilityConfigCallbackPairs, scrollLength, c12, c14);
|
|
} else if (tmp2.props.onFirstVisibleItemChanged) {
|
|
outer1_102(tmp2, (function findFirstVisibleIndexInCachedRange(state, c12) {
|
|
let data;
|
|
let keyExtractor;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
if (startBuffered <= endBuffered) {
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp3 = tmp[startBuffered];
|
|
let tmp4 = startBuffered;
|
|
if (null == tmp3) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp5 = null;
|
|
if (startBuffered < data.length) {
|
|
let keyExtractorResult = startBuffered;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startBuffered], startBuffered);
|
|
}
|
|
tmp5 = keyExtractorResult;
|
|
}
|
|
state.idCache[startBuffered] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
let value = sizes.get(tmp3);
|
|
let tmp9 = value;
|
|
if (null == value) {
|
|
let tmp10 = callback4;
|
|
let num = 0;
|
|
let tmp11 = state;
|
|
let tmp12 = tmp3;
|
|
let tmp13 = startBuffered;
|
|
tmp9 = callback4(state, tmp8, tmp4, data[startBuffered]);
|
|
}
|
|
if (tmp2[startBuffered] + tmp9 > c12) {
|
|
break;
|
|
} else {
|
|
let sum = startBuffered + 1;
|
|
if (sum <= endBuffered) {
|
|
startBuffered = sum;
|
|
}
|
|
}
|
|
}
|
|
return startBuffered;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
})(tmp7, c12));
|
|
}
|
|
let prop1;
|
|
if (null != stickyState) {
|
|
prop1 = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != prop1) {
|
|
let call = prop1.call;
|
|
typeof call === "unknown" ? prop1() : call(stickyState);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp73;
|
|
if (doMVCP) {
|
|
if (!tmp25) {
|
|
tmp73 = outer1_68(tmp7, dataChanged);
|
|
}
|
|
}
|
|
if (dataChanged) {
|
|
outer1_86(tmp2);
|
|
}
|
|
let num8 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num8 = 0;
|
|
if (!dataChanged) {
|
|
let startBuffered = minIndexSizeChanged;
|
|
if (null == minIndexSizeChanged) {
|
|
startBuffered = tmp2.startBuffered;
|
|
}
|
|
let num9 = 0;
|
|
if (null != startBuffered) {
|
|
num9 = startBuffered;
|
|
}
|
|
num8 = num9;
|
|
}
|
|
}
|
|
let obj = { doMVCP: null, forceFullUpdate: null, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null };
|
|
obj[0] = doMVCP;
|
|
obj[1] = forceFullItemPositions;
|
|
let tmp82 = !forceFullItemPositions;
|
|
if (!forceFullItemPositions) {
|
|
tmp82 = !dataChanged;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = tmp15Result > 1;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = undefined !== minIndexSizeChanged;
|
|
}
|
|
obj[2] = tmp82;
|
|
obj[3] = c15;
|
|
obj[4] = scrollVelocity;
|
|
obj[5] = num8;
|
|
outer1_89(tmp7, dataChanged, obj);
|
|
const tmp17Result = outer1_25(tmp7);
|
|
closure_8 = tmp17Result;
|
|
if (undefined !== minIndexSizeChanged) {
|
|
tmp2.minIndexSizeChanged = undefined;
|
|
}
|
|
if (dataChanged) {
|
|
if (doMVCP) {
|
|
if (tmp2.props.maintainVisibleContentPosition.data) {
|
|
if (tmp2.didContainersLayout) {
|
|
if (tmp2.idsInView.length > 0) {
|
|
const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition;
|
|
const _Set2 = Set;
|
|
let set = new Set();
|
|
const idsInView = tmp2.idsInView;
|
|
for (const item10226 of idsInView) {
|
|
let tmp99 = item10226;
|
|
addResult = indexByKey.get(item10226);
|
|
if (undefined !== addResult) {
|
|
addResult = shouldRestorePosition;
|
|
if (shouldRestorePosition) {
|
|
addResult = !shouldRestorePosition(data[addResult], addResult, data);
|
|
}
|
|
if (!addResult) {
|
|
addResult = item10226;
|
|
addResult = set.add(tmp99);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_21(containerItemKeys, "scrollAdjustPending");
|
|
let num11 = 0;
|
|
if (null != addResult) {
|
|
num11 = addResult;
|
|
}
|
|
if (null != tmp73) {
|
|
addResult = tmp73();
|
|
}
|
|
addResult = tmp73;
|
|
if (addResult) {
|
|
addResult = addResult.scroll !== state.scroll;
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, "scrollAdjustPending");
|
|
let num12 = 0;
|
|
if (null != addResult) {
|
|
num12 = addResult;
|
|
}
|
|
addResult = num12 !== num11;
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = updateScroll2(addResult.scroll);
|
|
addResult = updateScrollRange();
|
|
}
|
|
if (dataChanged) {
|
|
stickyState = resolveStickyState();
|
|
}
|
|
addResult = undefined;
|
|
if (!tmp13) {
|
|
addResult = undefined;
|
|
if (null != bootstrap) {
|
|
addResult = bootstrap.targetIndexSeed;
|
|
}
|
|
}
|
|
if (null == addResult) {
|
|
let num13 = !dataChanged;
|
|
if (!dataChanged) {
|
|
num13 = startBufferedId;
|
|
}
|
|
if (num13) {
|
|
num13 = indexByKey.get(startBufferedId);
|
|
}
|
|
if (!num13) {
|
|
num13 = 0;
|
|
}
|
|
addResult = num13;
|
|
}
|
|
if (addResult >= 0) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num14 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = c13;
|
|
if (positions[addResult] + addResult <= c13) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (addResult < 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp15Result > 1) {
|
|
if (addResult > 0) {
|
|
addResult = state.columns[addResult];
|
|
while (1 !== addResult) {
|
|
if (undefined === addResult) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (0 >= addResult) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = globalThis;
|
|
let num16 = 0;
|
|
let num17 = 0;
|
|
let num18 = 0;
|
|
if (0 < tmp16) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num16);
|
|
addResult = num16;
|
|
addResult = num17;
|
|
addResult = num17;
|
|
if (undefined !== addResult) {
|
|
let _Math3 = Math;
|
|
addResult = Math.max(num17, indexByKey.get(addResult));
|
|
}
|
|
num16 = num16 + 1;
|
|
num17 = addResult;
|
|
num18 = addResult;
|
|
} while (num16 < tmp16);
|
|
}
|
|
obj = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: true };
|
|
const length = data.length;
|
|
let _Math4 = Math;
|
|
addResult = Math.max(0, addResult);
|
|
let flag3 = false;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
if (addResult < length) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
addResult = flag3;
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num19 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = positions[addResult];
|
|
addResult = flag3;
|
|
if (!flag3) {
|
|
addResult = outer1_100;
|
|
addResult = c12;
|
|
addResult = c14;
|
|
let num20 = 0;
|
|
addResult = obj;
|
|
addResult = outer1_100(obj, addResult, addResult, addResult, c12, c14);
|
|
addResult = null === addResult;
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = addResult + addResult > c13;
|
|
}
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = null;
|
|
}
|
|
addResult = flag3;
|
|
if (null !== obj.startNoBuffer) {
|
|
addResult = c15;
|
|
let flag4 = true;
|
|
if (addResult <= c15) {
|
|
addResult = c15;
|
|
addResult = null;
|
|
if (c15 <= tmp17Result) {
|
|
addResult = addResult + addResult;
|
|
}
|
|
flag4 = flag3;
|
|
}
|
|
addResult = flag4;
|
|
}
|
|
}
|
|
addResult = addResult + 1;
|
|
if (addResult >= length) {
|
|
break;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (!addResult) {
|
|
continue;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (addResult > num18) {
|
|
break;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
const _Object = Object;
|
|
let obj1 = { endBuffered: null, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null };
|
|
obj1[0] = addResult;
|
|
({ endNoBuffer: obj5[1], firstFullyOnScreenIndex: obj5[2] } = obj);
|
|
addResult = outer1_101;
|
|
addResult = state;
|
|
addResult = state;
|
|
obj1[3] = outer1_101(state, obj);
|
|
obj1[4] = addResult;
|
|
obj1[5] = addResult;
|
|
obj1[6] = obj.startNoBuffer;
|
|
addResult = Object.assign(state, obj1);
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
addResult = outer1_54;
|
|
if (!outer1_54(addResult)) {
|
|
let obj2 = { bottom: null, top: null };
|
|
obj2[0] = addResult;
|
|
obj2[1] = addResult;
|
|
addResult = obj2;
|
|
}
|
|
addResult.scrollForNextCalculateItemsInView = addResult;
|
|
}
|
|
addResult = tmp16;
|
|
let items = [];
|
|
if (dataChanged) {
|
|
for (let num21 = 0; num21 < addResult; num21 = num21 + 1) {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal2 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num21);
|
|
addResult = !keyExtractor;
|
|
addResult = num21;
|
|
if (keyExtractor) {
|
|
if (addResult) {
|
|
addResult = undefined === indexByKey.get(addResult);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = items.push(num21);
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const scrollTargetPinnedRange = state.scrollTargetPinnedRange;
|
|
let c22 = 0;
|
|
let c23 = -1;
|
|
let num23 = -1;
|
|
let num24 = 0;
|
|
if (scrollTargetPinnedRange) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
addResult = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c22 = addResult;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
addResult = length - 1;
|
|
addResult = Math.min(addResult, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c23 = addResult;
|
|
num23 = addResult;
|
|
num24 = addResult;
|
|
}
|
|
addResult = num24 <= num23;
|
|
let closure_24 = addResult;
|
|
function isPinnedRenderIndex(addResult) {
|
|
let hasItem = set.has(addResult);
|
|
if (!hasItem) {
|
|
let tmp2 = closure_24;
|
|
if (closure_24) {
|
|
tmp2 = addResult >= c22;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = addResult <= c23;
|
|
}
|
|
hasItem = tmp2;
|
|
}
|
|
return hasItem;
|
|
}
|
|
if (null !== addResult) {
|
|
if (null !== addResult) {
|
|
let items1 = [];
|
|
const _Set6 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
const set1 = new Set();
|
|
function addPinnedIndex(item10471) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (item10471 >= 0) {
|
|
if (item10471 < length) {
|
|
let tmp4 = idCache[item10471];
|
|
if (null == tmp4) {
|
|
({ data, keyExtractor } = outer1_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (item10471 < data.length) {
|
|
let keyExtractorResult = item10471;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[item10471], item10471);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[item10471] = tmp2;
|
|
str = tmp2;
|
|
}
|
|
tmp4 = str;
|
|
}
|
|
const value = containerItemKeys.get(tmp4);
|
|
if (undefined !== value) {
|
|
const stickyContainerPool = outer1_2.stickyContainerPool;
|
|
stickyContainerPool.add(value);
|
|
} else {
|
|
let hasItem = null == tmp4;
|
|
if (!hasItem) {
|
|
hasItem = set1.has(item10471);
|
|
}
|
|
if (!hasItem) {
|
|
set1.add(item10471);
|
|
items1.push(item10471);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = set1;
|
|
if (addResult <= addResult) {
|
|
do {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
if (!containerItemKeys.has(addResult)) {
|
|
addResult = set1.add(addResult);
|
|
addResult = items1.push(addResult);
|
|
}
|
|
addResult = addResult + 1;
|
|
} while (addResult <= addResult);
|
|
}
|
|
addResult = alwaysRenderIndicesArr;
|
|
addResult = alwaysRenderIndicesArr;
|
|
for (const item10471 of alwaysRenderIndicesArr) {
|
|
addResult = addPinnedIndex(item10471);
|
|
continue;
|
|
}
|
|
if (addResult) {
|
|
if (num24 <= num23) {
|
|
do {
|
|
addResult = addPinnedIndex(num24);
|
|
num24 = num24 + 1;
|
|
} while (num24 <= num23);
|
|
}
|
|
}
|
|
if (prop.length > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num25 = -1;
|
|
if (null != addResult) {
|
|
num25 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = num25;
|
|
addResult = items1;
|
|
addResult = set1;
|
|
addResult = (function handleStickyActivation(addResult, prop, arg2, items1, addResult2, addResult3, addResult4) {
|
|
let data;
|
|
let keyExtractor;
|
|
const state = addResult.state;
|
|
let num = -1;
|
|
if (arg2 >= 0) {
|
|
num = prop[arg2];
|
|
}
|
|
c22(addResult, "activeStickyIndex", num);
|
|
let num2 = 0;
|
|
do {
|
|
let diff = arg2 - num2;
|
|
let tmp4 = num2;
|
|
if (diff >= 0) {
|
|
let tmp12 = prop[diff];
|
|
let tmp13 = callback8;
|
|
if (!callback8(addResult, tmp12)) {
|
|
let tmp5 = state.idCache[tmp12];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (tmp12 < data.length) {
|
|
let keyExtractorResult = tmp12;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp12], tmp12);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp12] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let tmp8 = tmp5;
|
|
if (tmp5) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
tmp8 = !containerItemKeys.has(tmp5);
|
|
}
|
|
if (tmp8) {
|
|
let tmp9 = tmp12 < addResult3 || tmp12 > addResult4;
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = !addResult2.has(tmp12);
|
|
}
|
|
if (tmp8) {
|
|
addResult = addResult2.add(tmp12);
|
|
let arr = items1.push(tmp12);
|
|
}
|
|
}
|
|
}
|
|
num2 = num2 + 1;
|
|
} while (num2 <= 1);
|
|
})(addResult, prop, num25, items1, addResult, addResult, addResult);
|
|
} else if (-1 !== tmp15Result1) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "activeStickyIndex", -1);
|
|
}
|
|
if (items1.length > 0) {
|
|
let fn;
|
|
if (getItemType) {
|
|
fn = (arg0) => {
|
|
const tmp = getItemType(data[arg0], arg0);
|
|
let str = "";
|
|
if (undefined !== tmp) {
|
|
const _String = String;
|
|
str = String(tmp);
|
|
}
|
|
return str;
|
|
};
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = items1;
|
|
addResult = items;
|
|
addResult = fn;
|
|
addResult = tmp88;
|
|
addResult = (function findAvailableContainers(containerItemKeys, items1, addResult, addResult2, items, fn, has) {
|
|
let closure_2;
|
|
let stickyContainerPool;
|
|
let closure_0 = fn;
|
|
if (0 === items1.length) {
|
|
return [];
|
|
} else {
|
|
const tmp56 = length(containerItemKeys, "numContainers");
|
|
const state = containerItemKeys.state;
|
|
({ containerItemMetadata: closure_2, stickyContainerPool } = state);
|
|
let set;
|
|
if (items.length > 0) {
|
|
const _Set = Set;
|
|
set = new Set(items);
|
|
}
|
|
const mapped = items1.map((itemIndex) => {
|
|
const obj = { isSticky: stickyHeaderIndicesSet.has(itemIndex), itemIndex, itemType: null, order: null };
|
|
stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet;
|
|
let tmp;
|
|
if (null != callback) {
|
|
tmp = callback(itemIndex);
|
|
}
|
|
obj[2] = tmp;
|
|
obj[3] = arg1;
|
|
return obj;
|
|
});
|
|
const found = mapped.filter((isSticky) => !isSticky.isSticky);
|
|
items = [];
|
|
items1 = [];
|
|
let num2 = 0;
|
|
const found1 = mapped.filter((isSticky) => isSticky.isSticky);
|
|
if (0 < tmp56) {
|
|
while (true) {
|
|
let tmp12 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp13 = length(containerItemKeys, "containerItemKey" + num2);
|
|
let tmp14 = num2;
|
|
let hasItem;
|
|
if (null != set) {
|
|
hasItem = set.has(num2);
|
|
}
|
|
let tmp16 = !hasItem;
|
|
if (tmp13) {
|
|
let hasItem1;
|
|
if (null != has) {
|
|
hasItem1 = has.has(tmp13);
|
|
}
|
|
if (hasItem1) {
|
|
let indexByKey = state.indexByKey;
|
|
}
|
|
num2 = num2 + 1;
|
|
if (num2 >= tmp56) {
|
|
break;
|
|
}
|
|
}
|
|
let tmp18 = !tmp16;
|
|
if (stickyContainerPool.has(num2)) {
|
|
let tmp22 = undefined === tmp13 || tmp18;
|
|
if (tmp22) {
|
|
let obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number2 = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr = items1.push(obj);
|
|
}
|
|
} else {
|
|
if (undefined !== tmp13) {
|
|
if (!tmp18) {
|
|
if (!tmp) {
|
|
let indexByKey2 = state.indexByKey;
|
|
let value = indexByKey2.get(tmp13);
|
|
if (undefined !== value) {
|
|
if (value < addResult) {
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
obj[1] = value < addResult ? addResult - value : value - addResult2;
|
|
arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr1 = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
const sorted = items.sort(closure_98);
|
|
const _Array = Array;
|
|
const array = new Array(length);
|
|
let sum = tmp56;
|
|
let c5 = false;
|
|
function assign(itemIndex, containerIndex) {
|
|
array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType };
|
|
let deleteResult;
|
|
if (null != set) {
|
|
deleteResult = set.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
let c5 = true;
|
|
}
|
|
}
|
|
function assignMatching(found, items, arg2) {
|
|
let closure_0 = items;
|
|
let closure_1 = arg2;
|
|
function _loop2() { ... }
|
|
const iter = found[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop2Result = _loop2(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function assignFromPool(found, items, arg2) {
|
|
if (closure_0) {
|
|
assignMatching(found, items, /* F118898 */ function() { ... });
|
|
}
|
|
assignMatching(found, items, /* F118899 */ function() { ... });
|
|
if (arg2) {
|
|
assignMatching(found, items, /* F118900 */ function() { ... });
|
|
}
|
|
}
|
|
assignFromPool(found, items, true);
|
|
assignFromPool(found1, items1, false);
|
|
for (const item10099 of mapped) {
|
|
let tmp36 = item10099;
|
|
if (!array[item10099.order]) {
|
|
let tmp37 = sum;
|
|
let tmp38 = +sum;
|
|
sum = tmp38 + 1;
|
|
let tmp39 = tmp38;
|
|
let tmp40 = item10099;
|
|
if (tmp36.isSticky) {
|
|
let tmp41 = tmp38;
|
|
addResult = stickyContainerPool.add(tmp39);
|
|
}
|
|
let tmp43 = item10099;
|
|
let tmp44 = tmp38;
|
|
let obj1 = assign(tmp36, tmp39);
|
|
}
|
|
continue;
|
|
}
|
|
if (c5) {
|
|
items.length = 0;
|
|
if (set) {
|
|
for (const item10120 of set) {
|
|
let arr2 = arg4.push(item10120);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if (closure_31) {
|
|
let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled");
|
|
if (null == POSITIVE_INFINITY) {
|
|
const _Number3 = Number;
|
|
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
}
|
|
if (sum > POSITIVE_INFINITY) {
|
|
const _console = console;
|
|
let obj2 = { debugInfo: null };
|
|
const obj3 = { numContainers: null, numContainersPooled: null, numNeeded: null, stillNeeded: null };
|
|
obj3[0] = tmp56;
|
|
obj3[1] = POSITIVE_INFINITY;
|
|
obj3[2] = length;
|
|
obj3[3] = sum - tmp56;
|
|
obj2[0] = obj3;
|
|
console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj2);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
})(containerItemKeys, items1, addResult, addResult, items, fn, tmp88);
|
|
let iter = addResult[Symbol.iterator]();
|
|
addResult = iter.next();
|
|
addResult = iter;
|
|
while (iter !== undefined) {
|
|
let itemIndex = addResult.itemIndex;
|
|
addResult = itemIndex;
|
|
let containerIndex = addResult.containerIndex;
|
|
addResult = idCache[itemIndex];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = itemIndex;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerIndex;
|
|
let _HermesInternal3 = HermesInternal;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + containerIndex);
|
|
if (addResult) {
|
|
addResult = addResult !== addResult;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
}
|
|
if (addResult !== addResult) {
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set3 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = containerIndex;
|
|
addResult = set2.add(containerIndex);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[containerIndex];
|
|
let num28 = 0;
|
|
if (null != addResult) {
|
|
num28 = addResult;
|
|
}
|
|
state.containerItemGenerations[containerIndex] = num28 + 1;
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerIndex;
|
|
let _HermesInternal4 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + containerIndex, addResult);
|
|
let _HermesInternal5 = HermesInternal;
|
|
addResult = itemIndex;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + containerIndex, addResult);
|
|
let _HermesInternal6 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + containerIndex, data[addResult]);
|
|
addResult = state;
|
|
addResult = state;
|
|
let containerItemMetadata = state.containerItemMetadata;
|
|
addResult = outer1_28;
|
|
let num29 = 0;
|
|
addResult = state;
|
|
addResult = containerItemMetadata.set(containerIndex, outer1_28(state, itemIndex, data[addResult], addResult.itemType));
|
|
addResult = containerItemKeys.set(addResult, containerIndex);
|
|
let userScrollAnchorReset = state.userScrollAnchorReset;
|
|
if (null != userScrollAnchorReset) {
|
|
addResult = userScrollAnchorReset;
|
|
let keys = addResult.keys;
|
|
addResult = keys.add(addResult);
|
|
}
|
|
addResult = containerIndex;
|
|
let _HermesInternal7 = HermesInternal;
|
|
addResult = "containerSticky" + containerIndex;
|
|
addResult = itemIndex;
|
|
addResult = stickyHeaderIndicesSet.has(addResult);
|
|
addResult = isPinnedRenderIndex(addResult);
|
|
if (addResult) {
|
|
addResult = addResult(addResult, addResult, true);
|
|
let stickyContainerPool2 = addResult.stickyContainerPool;
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool2.add(containerIndex);
|
|
} else {
|
|
if (addResult(addResult, addResult)) {
|
|
addResult = addResult(addResult, addResult, false);
|
|
}
|
|
let stickyContainerPool = addResult.stickyContainerPool;
|
|
if (addResult) {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.add(containerIndex);
|
|
} else {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.delete(containerIndex);
|
|
}
|
|
}
|
|
addResult = containerIndex;
|
|
if (containerIndex >= addResult) {
|
|
addResult = containerIndex;
|
|
addResult = containerIndex + 1;
|
|
}
|
|
continue;
|
|
}
|
|
if (addResult !== tmp16) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "numContainers", addResult);
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
if (addResult > outer1_21(containerItemKeys, "numContainersPooled")) {
|
|
addResult = addResult(addResult, "numContainersPooled", (function getExpandedContainerPoolSize(length, addResult) {
|
|
let num = 0;
|
|
if (length > 0) {
|
|
num = 0;
|
|
if (addResult > 0) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound = Math.max(length, addResult);
|
|
num = Math.min(bound, Math.max(addResult, Math.ceil(1.5 * addResult)));
|
|
}
|
|
}
|
|
return num;
|
|
})(length, addResult));
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const userScrollAnchorReset2 = state.userScrollAnchorReset;
|
|
addResult = undefined;
|
|
if (null != userScrollAnchorReset2) {
|
|
addResult = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === addResult) {
|
|
addResult.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
if (addResult.stickyContainerPool.size > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = c12;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num30 = -1;
|
|
if (null != addResult) {
|
|
num30 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = tmp9;
|
|
addResult = num30;
|
|
addResult = items;
|
|
addResult = isPinnedRenderIndex;
|
|
addResult = (function handleStickyRecycling(addResult, prop, addResult2, arg3, arg4, items, isPinnedRenderIndex) {
|
|
const state = addResult.state;
|
|
const iter = state.stickyContainerPool[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
let tmp3 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp4 = length(addResult, "containerItemKey" + nextResult);
|
|
let value;
|
|
if (tmp4) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp7 = tmp4;
|
|
value = indexByKey.get(tmp5);
|
|
}
|
|
let tmp8 = value;
|
|
if (undefined !== value) {
|
|
let tmp52 = value;
|
|
if (!isPinnedRenderIndex(tmp8)) {
|
|
let tmp9 = value;
|
|
let index = prop.indexOf(tmp8);
|
|
let tmp11 = index;
|
|
if (-1 !== index) {
|
|
let tmp16 = index;
|
|
if (tmp11 < arg4 - 1) {
|
|
let tmp18 = index;
|
|
let tmp19 = prop[tmp11 + 1];
|
|
let flag = false;
|
|
if (tmp19) {
|
|
let tmp44 = tmp19;
|
|
let tmp45 = state.positions[tmp20];
|
|
let tmp47 = undefined !== tmp45;
|
|
if (tmp47) {
|
|
let tmp48 = tmp45;
|
|
tmp47 = addResult2 > tmp46 + 2 * arg3;
|
|
}
|
|
flag = tmp47;
|
|
} else {
|
|
let tmp21 = value;
|
|
let tmp22 = state.idCache[tmp8];
|
|
let tmp23 = tmp22;
|
|
if (null != tmp22) {
|
|
let tmp26 = tmp22;
|
|
} else {
|
|
let tmp24 = callback3;
|
|
let tmp25 = value;
|
|
tmp26 = callback3(state, tmp8);
|
|
}
|
|
let tmp27 = tmp26;
|
|
if (tmp26) {
|
|
let tmp28 = value;
|
|
let tmp29 = state.positions[tmp8];
|
|
let sizes = state.sizes;
|
|
let tmp30 = tmp26;
|
|
value = sizes.get(tmp27);
|
|
let tmp32 = value;
|
|
if (null != value) {
|
|
let tmp38 = value;
|
|
} else {
|
|
let tmp33 = callback4;
|
|
let tmp34 = tmp26;
|
|
let tmp35 = value;
|
|
let num = 0;
|
|
let tmp36 = addResult;
|
|
let tmp37 = tmp8;
|
|
tmp38 = callback4(addResult, tmp27, value, state.props.data[tmp8]);
|
|
}
|
|
let tmp40 = tmp29;
|
|
let tmp41 = undefined !== tmp29;
|
|
if (tmp41) {
|
|
let tmp42 = tmp29;
|
|
let tmp43 = tmp38;
|
|
tmp41 = addResult2 > tmp29 + tmp39 + 3 * arg3;
|
|
}
|
|
flag = tmp41;
|
|
}
|
|
}
|
|
let tmp49 = flag;
|
|
if (flag) {
|
|
let tmp50 = nextResult;
|
|
let arr = items.push(tmp2);
|
|
}
|
|
} else {
|
|
let tmp17 = index;
|
|
}
|
|
} else {
|
|
let stickyContainerPool = state.stickyContainerPool;
|
|
let tmp12 = nextResult;
|
|
let deleteResult = stickyContainerPool.delete(tmp2);
|
|
let tmp14 = v0;
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp15 = v0(addResult, "containerSticky" + tmp2, false);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
})(addResult, prop, addResult, tmp9, num30, items, isPinnedRenderIndex);
|
|
}
|
|
if (items.length > 0) {
|
|
const _Set4 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
addResult = items;
|
|
const set3 = new Set(items);
|
|
}
|
|
let num32 = 0;
|
|
let flag5 = false;
|
|
if (0 < addResult) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal8 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num32);
|
|
addResult = flag5;
|
|
addResult = undefined;
|
|
addResult = num32;
|
|
if (null != set3) {
|
|
addResult = set3.has(num32);
|
|
}
|
|
if (addResult) {
|
|
if (undefined !== addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set5 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = set2.add(num32);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[num32];
|
|
let num33 = 0;
|
|
if (null != addResult) {
|
|
num33 = addResult;
|
|
}
|
|
state.containerItemGenerations[num32] = num33 + 1;
|
|
}
|
|
let containerItemMetadata2 = state.containerItemMetadata;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = containerItemMetadata2.delete(num32);
|
|
let stickyContainerPool3 = state.stickyContainerPool;
|
|
if (stickyContainerPool3.has(num32)) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal9 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSticky" + num32, false);
|
|
let stickyContainerPool4 = addResult.stickyContainerPool;
|
|
addResult = stickyContainerPool4.delete(num32);
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal10 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + num32, undefined);
|
|
let _HermesInternal11 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + num32, undefined);
|
|
let _HermesInternal12 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + num32, undefined);
|
|
let _HermesInternal13 = HermesInternal;
|
|
addResult = outer1_32;
|
|
addResult = outer1_22(addResult, "containerPosition" + num32, outer1_32);
|
|
let _HermesInternal14 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerColumn" + num32, -1);
|
|
let _HermesInternal15 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSpan" + num32, 1);
|
|
addResult = flag5;
|
|
} else {
|
|
addResult = indexByKey.get(addResult);
|
|
addResult = flag5;
|
|
if (undefined !== addResult) {
|
|
addResult = outer1_88;
|
|
let obj3 = { scrollAdjustPending: null, updateLayout: true };
|
|
addResult = c10;
|
|
obj3[0] = c10;
|
|
let num35 = 0;
|
|
addResult = num32;
|
|
addResult = obj3;
|
|
addResult = outer1_88(addResult, addResult, addResult, obj3).didChangePosition || flag5;
|
|
}
|
|
}
|
|
num32 = num32 + 1;
|
|
flag5 = addResult;
|
|
} while (num32 < addResult);
|
|
}
|
|
addResult = set2;
|
|
if (set2) {
|
|
addResult = outer1_27;
|
|
}
|
|
if (addResult) {
|
|
addResult = outer1_87;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_87(containerItemKeys, set2);
|
|
}
|
|
if (!tmp13) {
|
|
addResult = outer1_84;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_84(containerItemKeys);
|
|
} else {
|
|
addResult = outer1_102;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_102(state, obj.startNoBuffer);
|
|
if (!queuedInitialLayout) {
|
|
if (!addResult.didContainersLayout) {
|
|
addResult = outer1_41;
|
|
addResult = outer1_77;
|
|
if (outer1_41(addResult)) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
} else {
|
|
addResult = addResult(addResult, addResult.startNoBuffer, addResult.endNoBuffer);
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = (function setDidLayout(containerItemKeys) {
|
|
containerItemKeys.state.queuedInitialLayout = true;
|
|
callback(containerItemKeys);
|
|
callback2(containerItemKeys, { didLayout: true });
|
|
})(containerItemKeys);
|
|
addResult = (function handleInitialScrollLayoutReady(containerItemKeys) {
|
|
let closure_0 = containerItemKeys;
|
|
if (containerItemKeys.state.initialScroll) {
|
|
callback6(containerItemKeys, { forceScroll: true });
|
|
const initialScrollSession = containerItemKeys.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(function runScroll() {
|
|
return outer1_76(closure_0, { forceScroll: true });
|
|
});
|
|
}
|
|
closure_0 = containerItemKeys;
|
|
const scrollingTo = containerItemKeys.state.scrollingTo;
|
|
{
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
}
|
|
})(containerItemKeys);
|
|
}
|
|
}
|
|
}
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
if (viewabilityConfigCallbackPairs) {
|
|
addResult = null !== obj.startNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = null !== obj.endNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
state = containerItemKeys.state;
|
|
({ startNoBuffer, endNoBuffer } = obj);
|
|
addResult = outer1_91;
|
|
if (null == addResult) {
|
|
addResult = obj.startNoBuffer;
|
|
}
|
|
if (null == addResult) {
|
|
addResult = obj.endNoBuffer;
|
|
}
|
|
addResult = state;
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
addResult = scrollLength;
|
|
addResult = startNoBuffer;
|
|
addResult = endNoBuffer;
|
|
addResult = addResult(state, addResult, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, addResult, addResult);
|
|
}
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != addResult) {
|
|
const call2 = addResult.call;
|
|
if (typeof call2 === "unknown") {
|
|
addResult = addResult();
|
|
} else {
|
|
addResult = call2(stickyState);
|
|
}
|
|
}
|
|
}
|
|
let tmp17 = outer1_25;
|
|
const tmp80 = outer1_89;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
};
|
|
state.reprocessCurrentScroll = () => {
|
|
outer1_70(context, state.scroll, true);
|
|
};
|
|
callback = context;
|
|
callback = context(context, "maintainVisibleContentPosition", obj2);
|
|
callback = context(context, "extraData", extraData);
|
|
if (undefined !== estimatedHeaderSize) {
|
|
callback = callback(context, "headerSize", estimatedHeaderSize);
|
|
}
|
|
} else if (tmp64) {
|
|
let obj11 = { height: 0, width: 0 };
|
|
} else {
|
|
let Dimensions = viewabilityConfig.Dimensions;
|
|
let value = Dimensions.get("window");
|
|
obj11 = { height: null, width: null };
|
|
({ height: obj16[0], width: obj16[1] } = value);
|
|
}
|
|
}
|
|
ref1.current = context.state;
|
|
}
|
|
let current = ref1.current;
|
|
let isFirst = current.isFirst;
|
|
callback = !isFirst;
|
|
if (!isFirst) {
|
|
callback = context.scrollAxisGap !== num15;
|
|
}
|
|
context.scrollAxisGap = num15;
|
|
current.didColumnsChange = num4 !== current.props.numColumns || callback;
|
|
data = current.props.data;
|
|
callback = undefined;
|
|
if (null != data) {
|
|
callback = data.length;
|
|
}
|
|
let num16 = 0;
|
|
if (null != callback) {
|
|
num16 = callback;
|
|
}
|
|
callback = current.props.dataKey !== dataKey;
|
|
if (!callback) {
|
|
callback = current.props.dataVersion !== dataVersion;
|
|
}
|
|
if (!callback) {
|
|
callback = current.props.data !== data;
|
|
if (callback) {
|
|
const data1 = current.props.data;
|
|
current.pendingDataComparison = undefined;
|
|
let flag5 = true;
|
|
if (data1) {
|
|
flag5 = true;
|
|
if (data) {
|
|
keys = data.length;
|
|
flag5 = true;
|
|
if (keys === data1.length) {
|
|
({ itemsAreEqual: itemsAreEqual2, keyExtractor: keyExtractor2 } = current.props);
|
|
let num18 = 0;
|
|
callback = undefined;
|
|
flag5 = false;
|
|
callback = num18;
|
|
keys = callback;
|
|
if (data[num18] === data1[num18]) {
|
|
callback = callback + 1;
|
|
num18 = callback;
|
|
flag5 = false;
|
|
} else if (!keyExtractor2) {
|
|
flag5 = true;
|
|
if (keys) {
|
|
const obj12 = { byIndex: null, nextData: null, previousData: null };
|
|
obj12[0] = keys;
|
|
obj12[1] = data;
|
|
obj12[2] = data1;
|
|
current.pendingDataComparison = obj12;
|
|
flag5 = true;
|
|
}
|
|
}
|
|
callback = current.idCache[callback];
|
|
if (null == callback) {
|
|
callback = keyExtractor2(data1[callback], callback);
|
|
}
|
|
if (callback !== keyExtractor2(data[callback], callback)) {
|
|
flag5 = true;
|
|
if (keys) {
|
|
obj13 = { byIndex: null, nextData: null, previousData: null };
|
|
obj13[0] = keys;
|
|
obj13[1] = data;
|
|
obj13[2] = data1;
|
|
current.pendingDataComparison = obj13;
|
|
flag5 = true;
|
|
}
|
|
} else if (itemsAreEqual2) {
|
|
callback = data;
|
|
callback = itemsAreEqual2(data1[callback], data[callback], callback, data);
|
|
let items1 = keys;
|
|
if (null == keys) {
|
|
items1 = [];
|
|
}
|
|
let num17 = 2;
|
|
if (callback) {
|
|
num17 = 1;
|
|
}
|
|
items1[callback] = num17;
|
|
callback = items1;
|
|
if (!callback) {
|
|
const obj14 = { byIndex: null, nextData: null, previousData: null };
|
|
obj14[0] = items1;
|
|
obj14[1] = data;
|
|
obj14[2] = data1;
|
|
current.pendingDataComparison = obj14;
|
|
flag5 = true;
|
|
}
|
|
} else {
|
|
flag5 = true;
|
|
if (keys) {
|
|
const obj15 = { byIndex: null, nextData: null, previousData: null };
|
|
obj15[0] = keys;
|
|
obj15[1] = data;
|
|
obj15[2] = data1;
|
|
current.pendingDataComparison = obj15;
|
|
flag5 = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
callback = flag5;
|
|
}
|
|
}
|
|
let hasHadNonEmptyData = !isFirst;
|
|
if (!isFirst) {
|
|
hasHadNonEmptyData = callback;
|
|
}
|
|
if (hasHadNonEmptyData) {
|
|
hasHadNonEmptyData = current.hasHadNonEmptyData;
|
|
}
|
|
if (hasHadNonEmptyData) {
|
|
if (!callback) {
|
|
callback = 0 === num16;
|
|
}
|
|
hasHadNonEmptyData = callback;
|
|
}
|
|
if (hasHadNonEmptyData) {
|
|
hasHadNonEmptyData = data.length > 0;
|
|
}
|
|
let didFinishInitialScroll = callback;
|
|
if (callback) {
|
|
didFinishInitialScroll = !tmp9;
|
|
}
|
|
if (didFinishInitialScroll) {
|
|
didFinishInitialScroll = current.didFinishInitialScroll;
|
|
}
|
|
if (didFinishInitialScroll) {
|
|
let initialScroll = current.initialScroll;
|
|
callback = undefined;
|
|
if (null != initialScroll) {
|
|
callback = initialScroll.viewPosition;
|
|
}
|
|
didFinishInitialScroll = 1 === callback;
|
|
}
|
|
if (didFinishInitialScroll) {
|
|
didFinishInitialScroll = current.props.data.length > 0;
|
|
}
|
|
if (didFinishInitialScroll) {
|
|
if (undefined !== current.timeoutPreservedInitialScrollClear) {
|
|
callback = globalThis;
|
|
let _clearTimeout = clearTimeout;
|
|
callback = clearTimeout(current.timeoutPreservedInitialScrollClear);
|
|
current.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
current.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
current.initialScroll = undefined;
|
|
callback = setInitialScrollSession;
|
|
callback = setInitialScrollSession(current);
|
|
}
|
|
if (callback) {
|
|
current.dataChangeEpoch = current.dataChangeEpoch + 1;
|
|
current.dataChangeNeedsScrollUpdate = true;
|
|
current.didDataChange = true;
|
|
current.previousData = current.props.data;
|
|
}
|
|
if (null != onScroll) {
|
|
callback = onScroll;
|
|
}
|
|
let num19 = 0;
|
|
if (null != scrollEventThrottle) {
|
|
num19 = scrollEventThrottle;
|
|
}
|
|
stickyHeaderIndices = callback;
|
|
horizontal = num19;
|
|
let obj22 = snapToIndices;
|
|
stickyHeaderIndices = snapToIndices.useRef(null);
|
|
horizontal = snapToIndices.useRef(0);
|
|
context = snapToIndices.useRef(null);
|
|
onScroll = function clearTimeoutRef(recycleItems, onMetricsChange) {
|
|
|
|
};
|
|
const items2 = ["throttle"];
|
|
context = snapToIndices.useCallback((arg0, arg1) => {
|
|
const stickyHeaderIndices = arg0;
|
|
const substr = [...arguments].slice();
|
|
const timestamp = Date.now();
|
|
context.current = substr;
|
|
if (timestamp - horizontal.current >= arg1) {
|
|
tmp3.current = timestamp;
|
|
let items = [];
|
|
HermesBuiltin.arraySpread(substr, 0);
|
|
HermesBuiltin.apply(items, undefined);
|
|
if (typeof onScroll !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
if (stickyHeaderIndices.current) {
|
|
const _clearTimeout2 = clearTimeout;
|
|
clearTimeout(tmp15.current);
|
|
tmp15.current = null;
|
|
}
|
|
} else {
|
|
if (typeof onScroll !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
if (stickyHeaderIndices.current) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(tmp5.current);
|
|
tmp5.current = null;
|
|
}
|
|
const _setTimeout = setTimeout;
|
|
stickyHeaderIndices.current = setTimeout(() => {
|
|
if (outer1_2.current) {
|
|
const _Date = Date;
|
|
outer1_1.current = Date.now();
|
|
const items = [];
|
|
HermesBuiltin.arraySpread(tmp.current, 0);
|
|
HermesBuiltin.apply(items, undefined);
|
|
closure_0.current = null;
|
|
tmp.current = null;
|
|
}
|
|
}, arg1 - (timestamp - tmp3.current));
|
|
}
|
|
}, items2);
|
|
let fn2 = onScroll;
|
|
if (scrollEventThrottle) {
|
|
fn2 = onScroll;
|
|
if (onScroll) {
|
|
fn2 = (nativeEvent) => context(stickyHeaderIndices, horizontal, { nativeEvent: nativeEvent.nativeEvent });
|
|
}
|
|
}
|
|
callback = !isFirst;
|
|
if (!isFirst) {
|
|
callback = !callback;
|
|
}
|
|
if (callback) {
|
|
const anchoredEndSpace2 = current.props.anchoredEndSpace;
|
|
callback = undefined;
|
|
if (null != anchoredEndSpace2) {
|
|
callback = anchoredEndSpace2.anchorIndex;
|
|
}
|
|
callback = undefined;
|
|
if (null != anchoredEndSpace) {
|
|
callback = anchoredEndSpace.anchorIndex;
|
|
}
|
|
callback = callback !== callback;
|
|
}
|
|
const obj16 = { adaptiveRender: null, alignItemsAtEnd: null, alignItemsAtEndPaddingEnabled: null, alwaysRender: null, alwaysRenderIndicesArr: null, alwaysRenderIndicesSet: null, anchoredEndSpace: null, animatedProps: null, contentContainerAlignItems: null, contentInset: null, contentInsetEndAdjustment: "ind", data: false, dataKey: false, dataVersion: false, drawDistance: false, estimatedItemSize: false, getFixedItemSize: false, getItemType: false, horizontal: "4", itemsAreEqual: "channel-row", keyExtractor: null, maintainScrollAtEnd: null, maintainScrollAtEndThreshold: null, maintainVisibleContentPosition: true, numColumns: null, onEndReached: null, onEndReachedThreshold: 599.369, onFirstVisibleItemChanged: null, onItemSizeChanged: "\u{1F64D}\u{1F3FD}\u200D\u2640\uFE0F", onLoad: true, onMomentumScrollEnd: null, onScroll: 8, onScrollBeginDrag: "woman_frowning_tone3", onStartReached: "woman_frowning_medium_skin_tone", onStartReachedThreshold: true, onStickyHeaderChange: "text-xxs/semibold", overrideItemLayout: false, positionComponentInternal: null, recycleItems: null, renderItem: 614.369, rtl: null, snapToIndices: "\u{1F64D}\u{1F3FE}\u200D\u2640\uFE0F", stickyHeaderIndicesArr: true, stickyHeaderIndicesSet: null, stickyPositionComponentInternal: 8, stylePaddingBottom: "woman_frowning_tone4", stylePaddingLeft: "woman_frowning_medium_dark_skin_tone", stylePaddingRight: true, stylePaddingTop: true, useWindowScroll: true };
|
|
obj16[0] = experimental_adaptiveRender;
|
|
obj16[1] = tmp8;
|
|
obj16[2] = tmp15;
|
|
obj16[3] = alwaysRender;
|
|
({ arr: obj24[4], set: obj24[5] } = memo);
|
|
obj16[6] = anchoredEndSpace;
|
|
obj16[7] = animatedPropsInternal;
|
|
obj16[8] = obj.alignItems;
|
|
obj16[9] = contentInset;
|
|
obj16[11] = data;
|
|
obj16[12] = dataKey;
|
|
obj16[13] = dataVersion;
|
|
obj16[14] = num;
|
|
obj16[15] = num2;
|
|
stickyHeaderIndices = getFixedItemSize;
|
|
const items3 = [getFixedItemSize];
|
|
obj16[16] = obj22.useMemo(() => {
|
|
let fn;
|
|
if (stickyHeaderIndices) {
|
|
fn = (arg0, arg1, arg2) => {
|
|
let tmp;
|
|
if (undefined !== arg0) {
|
|
if (undefined !== arg1) {
|
|
tmp = callback(arg0, arg1, arg2);
|
|
}
|
|
}
|
|
return tmp;
|
|
};
|
|
}
|
|
return fn;
|
|
}, items3);
|
|
stickyHeaderIndices = getItemType;
|
|
const items4 = [getItemType];
|
|
obj16[17] = obj22.useMemo(() => {
|
|
let fn;
|
|
if (stickyHeaderIndices) {
|
|
fn = (arg0, arg1, arg2) => {
|
|
let tmp;
|
|
if (undefined !== arg0) {
|
|
if (undefined !== arg1) {
|
|
tmp = callback(arg0, arg1, arg2);
|
|
}
|
|
}
|
|
return tmp;
|
|
};
|
|
}
|
|
return fn;
|
|
}, items4);
|
|
obj16[18] = horizontal;
|
|
obj16[19] = itemsAreEqual;
|
|
stickyHeaderIndices = fn;
|
|
const items5 = [fn];
|
|
obj16[20] = obj22.useMemo(() => {
|
|
let fn;
|
|
if (stickyHeaderIndices) {
|
|
fn = (arg0, arg1, arg2) => {
|
|
let tmp;
|
|
if (undefined !== arg0) {
|
|
if (undefined !== arg1) {
|
|
tmp = callback(arg0, arg1, arg2);
|
|
}
|
|
}
|
|
return tmp;
|
|
};
|
|
}
|
|
return fn;
|
|
}, items5);
|
|
obj16[21] = undefined;
|
|
obj16[22] = num3;
|
|
obj16[23] = obj2;
|
|
obj16[24] = num4;
|
|
obj16[25] = recycleItems.onEndReached;
|
|
obj16[26] = num6;
|
|
obj16[27] = onFirstVisibleItemChanged;
|
|
obj16[28] = onItemSizeChanged;
|
|
obj16[29] = onLoad;
|
|
obj16[30] = onMomentumScrollEnd;
|
|
obj16[31] = fn2;
|
|
obj16[32] = onScrollBeginDrag;
|
|
obj16[33] = onStartReached;
|
|
obj16[34] = num5;
|
|
obj16[35] = onStickyHeaderChange;
|
|
obj16[36] = overrideItemLayout;
|
|
obj16[37] = positionComponentInternal;
|
|
obj16[38] = tmp11;
|
|
obj16[39] = renderItem;
|
|
obj16[40] = rtl;
|
|
obj16[41] = snapToIndices;
|
|
let items6 = stickyHeaderIndices;
|
|
if (null == stickyHeaderIndices) {
|
|
items6 = [];
|
|
}
|
|
obj16[42] = items6;
|
|
callback = undefined;
|
|
if (null != stickyHeaderIndices) {
|
|
callback = stickyHeaderIndices.join(",");
|
|
}
|
|
const items7 = [callback];
|
|
obj16[43] = obj.useMemo(() => {
|
|
let items = stickyHeaderIndices;
|
|
if (null == stickyHeaderIndices) {
|
|
items = [];
|
|
}
|
|
return new Set(items);
|
|
}, items7);
|
|
obj16[44] = stickyPositionComponentInternal;
|
|
obj16[45] = tmp39;
|
|
obj16[46] = tmp40;
|
|
obj16[47] = tmp41;
|
|
obj16[48] = tmp38;
|
|
current.props = obj16;
|
|
current.refScroller = ref;
|
|
callback = isFirst;
|
|
if (!isFirst) {
|
|
callback = !current.props.adaptiveRender;
|
|
}
|
|
if (!callback) {
|
|
callback = experimental_adaptiveRender;
|
|
}
|
|
if (!callback) {
|
|
callback = resetAdaptiveRender;
|
|
callback = resetAdaptiveRender(context);
|
|
}
|
|
if (hasHadNonEmptyData) {
|
|
let state2 = context.state;
|
|
state2.didContainersLayout = false;
|
|
state2.queuedInitialLayout = false;
|
|
if (tmp61) {
|
|
state2.didFinishInitialScroll = false;
|
|
}
|
|
callback = context;
|
|
callback = context(context, "readyToRender", false);
|
|
callback = resetAdaptiveRender;
|
|
callback = resetAdaptiveRender(context);
|
|
}
|
|
const items8 = [data, dataKey, dataVersion, num4];
|
|
const memo1 = obj.useMemo(() => {
|
|
if (context.length) {
|
|
const _Array = Array;
|
|
const obj = { length: null };
|
|
const _Math = Math;
|
|
obj[0] = Math.min(num4, items.length);
|
|
items = Array.from(obj, (arg0, arg1) => {
|
|
let data;
|
|
let keyExtractor;
|
|
const diff = length.length - 1 - arg1;
|
|
({ data, keyExtractor } = props.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp3 = null;
|
|
if (diff < data.length) {
|
|
let keyExtractorResult = diff;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[diff], diff);
|
|
}
|
|
tmp3 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[diff] = tmp3;
|
|
str = tmp3;
|
|
}
|
|
return str;
|
|
});
|
|
} else {
|
|
items = [];
|
|
}
|
|
return items;
|
|
}, items8);
|
|
function initializeStateVars(arg0) {
|
|
context(context, "lastItemKeys", memo1);
|
|
context(context, "numColumns", num4);
|
|
let values = context.values;
|
|
const value = values.get("stylePaddingTop");
|
|
let closure_0 = context;
|
|
let c1;
|
|
if (undefined !== closure_13) {
|
|
values = tmp2.values;
|
|
const tmp8 = values.get("stylePaddingTop") || 0;
|
|
c1 = tmp8;
|
|
if (tmp6 < tmp8) {
|
|
values = tmp2.values;
|
|
tmp(tmp2, "totalSize", (values.get("totalSize") || 0) + tmp8);
|
|
const _setTimeout = setTimeout;
|
|
tmp7.timeoutSetPaddingTop = setTimeout(() => {
|
|
values = values.values;
|
|
outer1_22(values, "totalSize", (values.get("totalSize") || 0) - c1);
|
|
}, 16);
|
|
const tmp9 = values.get("totalSize") || 0;
|
|
}
|
|
tmp(tmp2, "stylePaddingTop", tmp6);
|
|
}
|
|
ref1.current.props.stylePaddingBottom = closure_14;
|
|
outer1_50(context);
|
|
if (arg0) {
|
|
const size = obj2.size;
|
|
}
|
|
}
|
|
if (isFirst) {
|
|
callback = initializeStateVars(false);
|
|
let indexByKey = current.indexByKey;
|
|
callback = indexByKey.clear();
|
|
current.idCache.length = 0;
|
|
current.positions.length = 0;
|
|
current.columns.length = 0;
|
|
current.columnSpans.length = 0;
|
|
callback = updateItemPositions;
|
|
callback = updateItemPositions(context, true);
|
|
}
|
|
const items9 = [tmp60];
|
|
callback = obj.useMemo(() => {
|
|
const initialScroll = current.initialScroll;
|
|
if (initialScroll) {
|
|
let contentOffset = initialScroll.contentOffset;
|
|
if (null == contentOffset) {
|
|
contentOffset = outer1_75(context, initialScroll);
|
|
}
|
|
if (closure_18) {
|
|
const initialScrollSession = tmp.initialScrollSession;
|
|
if (null != initialScrollSession) {
|
|
const kind = initialScrollSession.kind;
|
|
}
|
|
}
|
|
return contentOffset;
|
|
}
|
|
}, items9);
|
|
callback = obj.useLayoutEffect(() => {
|
|
let tmp2 = closure_16;
|
|
let state = context.state;
|
|
const initialScroll = state.initialScroll;
|
|
let num = 0;
|
|
if (null != callback) {
|
|
num = callback;
|
|
}
|
|
let tmp6 = tmp5;
|
|
if (closure_18) {
|
|
tmp6 = tmp4;
|
|
}
|
|
if (tmp6) {
|
|
tmp6 = !tmp3;
|
|
}
|
|
let tmp7 = initialScroll;
|
|
if (initialScroll) {
|
|
let tmp8 = undefined === initialScroll.contentOffset;
|
|
if (!tmp8) {
|
|
let tmp9 = initialScroll.preserveForFooterLayout !== tmp6;
|
|
if (tmp9) {
|
|
let initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
tmp9 = "offset" !== kind;
|
|
}
|
|
tmp8 = tmp9;
|
|
}
|
|
tmp7 = tmp8;
|
|
}
|
|
if (tmp7) {
|
|
let obj = {};
|
|
const merged = Object.assign(initialScroll);
|
|
obj.contentOffset = num;
|
|
obj.preserveForFooterLayout = tmp6;
|
|
const state2 = tmp.state;
|
|
state2.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
if (undefined !== state2.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state2.timeoutPreservedInitialScrollClear);
|
|
state2.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state2.initialScroll = obj;
|
|
let initialScrollSession2 = state2.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let str2 = "bootstrap";
|
|
if ("offset" === kind1) {
|
|
str2 = "offset";
|
|
}
|
|
obj = { kind: null };
|
|
obj[0] = str2;
|
|
outer1_38(state2, obj);
|
|
const tmp16 = outer1_38;
|
|
}
|
|
if (closure_18) {
|
|
if (initialScroll) {
|
|
const initialScrollSession3 = state.initialScrollSession;
|
|
let kind2;
|
|
if (null != initialScrollSession3) {
|
|
kind2 = initialScrollSession3.kind;
|
|
}
|
|
if ("offset" !== kind2) {
|
|
const initialScroll2 = state.initialScroll;
|
|
const state3 = tmp.state;
|
|
const tmp27 = outer1_75(tmp, initialScroll2);
|
|
if (!(0 === tmp27 && !tmp4)) {
|
|
if (tmp28) {
|
|
const initialScrollSession8 = state3.initialScrollSession;
|
|
let kind3;
|
|
if (null != initialScrollSession8) {
|
|
kind3 = initialScrollSession8.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind3) {
|
|
bootstrap = state3.initialScrollSession.bootstrap;
|
|
}
|
|
let frameHandle;
|
|
if (null != bootstrap) {
|
|
frameHandle = bootstrap.frameHandle;
|
|
}
|
|
let tmp54 = undefined !== frameHandle;
|
|
if (tmp54) {
|
|
const _cancelAnimationFrame3 = cancelAnimationFrame;
|
|
tmp54 = typeof cancelAnimationFrame === "function";
|
|
}
|
|
if (tmp54) {
|
|
const _cancelAnimationFrame4 = cancelAnimationFrame;
|
|
cancelAnimationFrame(frameHandle);
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.frameHandle = undefined;
|
|
}
|
|
const initialScrollSession9 = state3.initialScrollSession;
|
|
let kind4;
|
|
if (null != initialScrollSession9) {
|
|
kind4 = initialScrollSession9.kind;
|
|
}
|
|
obj = { bootstrap: null, kind: null };
|
|
obj[1] = kind4;
|
|
outer1_38(state3, obj);
|
|
const obj1 = { resolvedOffset: null };
|
|
obj1[0] = tmp27;
|
|
outer1_48(tmp, obj1);
|
|
const tmp58 = outer1_38;
|
|
} else if (tmp34) {
|
|
const initialScrollSession6 = state3.initialScrollSession;
|
|
let kind5;
|
|
if (null != initialScrollSession6) {
|
|
kind5 = initialScrollSession6.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind5) {
|
|
bootstrap1 = state3.initialScrollSession.bootstrap;
|
|
}
|
|
let frameHandle1;
|
|
if (null != bootstrap1) {
|
|
frameHandle1 = bootstrap1.frameHandle;
|
|
}
|
|
let tmp42 = undefined !== frameHandle1;
|
|
if (tmp42) {
|
|
const _cancelAnimationFrame = cancelAnimationFrame;
|
|
tmp42 = typeof cancelAnimationFrame === "function";
|
|
}
|
|
if (tmp42) {
|
|
const _cancelAnimationFrame2 = cancelAnimationFrame;
|
|
cancelAnimationFrame(frameHandle1);
|
|
}
|
|
if (bootstrap1) {
|
|
bootstrap1.frameHandle = undefined;
|
|
}
|
|
const initialScrollSession7 = state3.initialScrollSession;
|
|
let kind6;
|
|
if (null != initialScrollSession7) {
|
|
kind6 = initialScrollSession7.kind;
|
|
}
|
|
const obj2 = { bootstrap: null, kind: null };
|
|
obj2[1] = kind6;
|
|
outer1_38(state3, obj2);
|
|
const obj3 = { preserveTarget: true, resolvedOffset: null };
|
|
obj3[1] = tmp27;
|
|
outer1_48(tmp, obj3);
|
|
const tmp46 = outer1_38;
|
|
} else {
|
|
const obj4 = { scroll: null, seedContentOffset: null, targetIndexSeed: null };
|
|
obj4[0] = tmp27;
|
|
obj4[1] = tmp27;
|
|
obj4[2] = initialScroll2.index;
|
|
outer1_79(state3, obj4);
|
|
const stickyHeaderIndices = tmp;
|
|
let state4;
|
|
state4 = tmp.state;
|
|
const initialScrollSession5 = state4.initialScrollSession;
|
|
let kind7;
|
|
if (null != initialScrollSession5) {
|
|
kind7 = initialScrollSession5.kind;
|
|
}
|
|
let bootstrap2;
|
|
if ("bootstrap" === kind7) {
|
|
bootstrap2 = state4.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap2) {
|
|
if (undefined === bootstrap2.frameHandle) {
|
|
let _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap2.frameHandle = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.frameHandle = undefined;
|
|
bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1;
|
|
const obj = { mountFrameCount: null, passCount: null };
|
|
({ mountFrameCount: obj[0], passCount: obj[1] } = bootstrap);
|
|
if (!outer1_78(closure_0, obj)) {
|
|
closure_0 = tmp5;
|
|
state = tmp5.state;
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap1) {
|
|
if (undefined === bootstrap1.frameHandle) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap1.frameHandle = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.frameHandle = undefined;
|
|
bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1;
|
|
const obj = { mountFrameCount: null, passCount: null };
|
|
({ mountFrameCount: obj[0], passCount: obj[1] } = bootstrap);
|
|
if (!outer1_78(closure_0, obj)) {
|
|
closure_0 = tmp5;
|
|
state = tmp5.state;
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap1) {
|
|
if (undefined === bootstrap1.frameHandle) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap1.frameHandle = requestAnimationFrame(() => {
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
bootstrap.frameHandle = undefined;
|
|
bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1;
|
|
const obj = { mountFrameCount: null, passCount: null };
|
|
({ mountFrameCount: obj[0], passCount: obj[1] } = bootstrap);
|
|
if (!outer1_78(closure_0, obj)) {
|
|
closure_0 = tmp5;
|
|
state = tmp5.state;
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let bootstrap1;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap1 = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap1) {
|
|
if (undefined === bootstrap1.frameHandle) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
bootstrap1.frameHandle = requestAnimationFrame(() => { ... });
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
tmp34 = 0 === state3.props.data.length && undefined !== initialScroll2.index;
|
|
} else {
|
|
const initialScrollSession4 = state3.initialScrollSession;
|
|
let kind8;
|
|
if (null != initialScrollSession4) {
|
|
kind8 = initialScrollSession4.kind;
|
|
}
|
|
if ("offset" === kind8) {
|
|
const contentOffset = initialScroll2.contentOffset;
|
|
let num5 = 0;
|
|
if (null != contentOffset) {
|
|
num5 = contentOffset;
|
|
}
|
|
let tmp30 = Math.abs(num5) <= 1;
|
|
} else {
|
|
tmp30 = 0 === initialScroll2.index;
|
|
if (tmp30) {
|
|
const viewPosition = initialScroll2.viewPosition;
|
|
let num2 = 0;
|
|
if (null != viewPosition) {
|
|
num2 = viewPosition;
|
|
}
|
|
tmp30 = 0 === num2;
|
|
}
|
|
if (tmp30) {
|
|
const viewOffset = initialScroll2.viewOffset;
|
|
let num3 = 0;
|
|
if (null != viewOffset) {
|
|
num3 = viewOffset;
|
|
}
|
|
tmp30 = Math.abs(num3) <= 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!tmp2) {
|
|
tmp2 = num;
|
|
}
|
|
if (!tmp2) {
|
|
let tmp20 = !initialScroll;
|
|
if (initialScroll) {
|
|
tmp20 = 0 !== context.length;
|
|
}
|
|
if (!tmp20) {
|
|
tmp20 = 0 === num && !tmp4;
|
|
const tmp21 = 0 === num && !tmp4;
|
|
}
|
|
tmp2 = !tmp20;
|
|
}
|
|
if (!tmp2) {
|
|
if (initialScroll) {
|
|
if (!tmp4) {
|
|
const obj5 = { resolvedOffset: null };
|
|
obj5[0] = num;
|
|
outer1_48(tmp, obj5);
|
|
}
|
|
}
|
|
outer1_47(tmp, { didInitialScroll: true });
|
|
}
|
|
}, []);
|
|
let didColumnsChange = isFirst;
|
|
if (!isFirst) {
|
|
didColumnsChange = callback;
|
|
}
|
|
if (!didColumnsChange) {
|
|
didColumnsChange = current.didColumnsChange;
|
|
}
|
|
if (didColumnsChange) {
|
|
callback = globalThis;
|
|
const _Date3 = Date;
|
|
ref1.current.lastBatchingAction = Date.now();
|
|
if (!keyExtractor) {
|
|
keyExtractor = isFirst;
|
|
}
|
|
if (!keyExtractor) {
|
|
keyExtractor = !callback;
|
|
}
|
|
if (!keyExtractor) {
|
|
let sizes = ref1.current.sizes;
|
|
callback = sizes.clear();
|
|
ref1.current.positions.length = 0;
|
|
ref1.current.totalSize = 0;
|
|
callback = context;
|
|
callback = context(context, "totalSize", 0);
|
|
}
|
|
}
|
|
if (callback) {
|
|
callback = callback(recycleItems);
|
|
}
|
|
const items10 = [data.length, dataKey, callback, hasHadNonEmptyData, tmp9, tmp39, tmp60];
|
|
callback = obj.useLayoutEffect(() => {
|
|
let initialScroll;
|
|
let initialScrollSession4;
|
|
let tmp2 = callback;
|
|
let str = "bootstrap";
|
|
let str2 = "bootstrap";
|
|
if (closure_17) {
|
|
str2 = "offset";
|
|
}
|
|
const state = tmp.state;
|
|
const initialScrollSession = state.initialScrollSession;
|
|
let previousDataLength;
|
|
if (null != initialScrollSession) {
|
|
previousDataLength = initialScrollSession.previousDataLength;
|
|
}
|
|
let num = 0;
|
|
if (null != previousDataLength) {
|
|
num = previousDataLength;
|
|
}
|
|
let tmp9 = length > 0;
|
|
if (tmp9) {
|
|
const hasHadNonEmptyData = state.hasHadNonEmptyData;
|
|
let tmp10 = !hasHadNonEmptyData;
|
|
if (hasHadNonEmptyData) {
|
|
tmp10 = hasHadNonEmptyData;
|
|
}
|
|
tmp9 = tmp10;
|
|
}
|
|
if (context.length > 0) {
|
|
state.hasHadNonEmptyData = true;
|
|
}
|
|
if (tmp9) {
|
|
if (tmp5) {
|
|
const state2 = tmp.state;
|
|
state2.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
if (undefined !== state2.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout2 = clearTimeout;
|
|
clearTimeout(state2.timeoutPreservedInitialScrollClear);
|
|
state2.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state2.initialScroll = tmp5;
|
|
const initialScrollSession2 = state2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession2) {
|
|
kind = initialScrollSession2.kind;
|
|
}
|
|
let str4 = str;
|
|
if ("offset" === kind) {
|
|
str4 = "offset";
|
|
}
|
|
let obj = { kind: null };
|
|
obj[0] = str4;
|
|
outer1_38(state2, obj);
|
|
obj = { kind: null, previousDataLength: null };
|
|
obj[0] = str2;
|
|
obj[1] = num;
|
|
outer1_38(state, obj);
|
|
const tmp17 = outer1_38;
|
|
} else {
|
|
if (undefined !== state.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state.timeoutPreservedInitialScrollClear);
|
|
state.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
state.initialScroll = undefined;
|
|
outer1_38(state);
|
|
}
|
|
}
|
|
if (state.initialScrollSession) {
|
|
state.initialScrollSession.previousDataLength = length;
|
|
}
|
|
outer1_38(state);
|
|
if (closure_18) {
|
|
const state4 = tmp.state;
|
|
({ initialScroll, initialScrollSession: initialScrollSession4 } = state4);
|
|
let kind1;
|
|
if (null != initialScrollSession4) {
|
|
kind1 = initialScrollSession4.kind;
|
|
}
|
|
if ("offset" !== kind1) {
|
|
if (initialScroll) {
|
|
const initialScrollSession5 = state4.initialScrollSession;
|
|
let kind2;
|
|
if (null != initialScrollSession5) {
|
|
kind2 = initialScrollSession5.kind;
|
|
}
|
|
if (str === kind2) {
|
|
const bootstrap = state4.initialScrollSession.bootstrap;
|
|
}
|
|
const tmp36 = !!(state4.didFinishInitialScroll && 0 === num && length > 0 && undefined !== initialScroll.index);
|
|
if (!tmp4) {
|
|
if (tmp2) {
|
|
if (length > 0) {
|
|
if (state4.didFinishInitialScroll) {
|
|
if (!bootstrap) {
|
|
if (!tmp36) {
|
|
if (undefined !== state4.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout3 = clearTimeout;
|
|
clearTimeout(state4.timeoutPreservedInitialScrollClear);
|
|
state4.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state4.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
state4.initialScroll = undefined;
|
|
outer1_38(state4);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp41 = length > 0;
|
|
if (tmp41) {
|
|
let tmp42 = tmp4;
|
|
if (!tmp4) {
|
|
let tmp43 = !initialScroll;
|
|
if (initialScroll) {
|
|
tmp43 = 1 !== initialScroll.viewPosition;
|
|
}
|
|
if (!tmp43) {
|
|
let prop;
|
|
if (null != initialScroll) {
|
|
prop = initialScroll.preserveForBottomPadding;
|
|
}
|
|
let tmp46 = !tmp45;
|
|
if (!prop) {
|
|
let prop1;
|
|
if (null != initialScroll) {
|
|
prop1 = initialScroll.preserveForFooterLayout;
|
|
}
|
|
tmp46 = !prop1;
|
|
}
|
|
tmp43 = tmp46;
|
|
}
|
|
tmp42 = !tmp43;
|
|
}
|
|
tmp41 = tmp42;
|
|
}
|
|
if (!tmp41) {
|
|
if (tmp2) {
|
|
let tmp63 = bootstrap;
|
|
if (!bootstrap) {
|
|
tmp63 = tmp36;
|
|
}
|
|
tmp2 = tmp63;
|
|
}
|
|
if (tmp2) {
|
|
const state5 = tmp.state;
|
|
state5.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
if (undefined !== state5.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout4 = clearTimeout;
|
|
clearTimeout(state5.timeoutPreservedInitialScrollClear);
|
|
state5.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state5.initialScroll = initialScroll;
|
|
if (tmp36) {
|
|
obj = { resetInitialScroll: true };
|
|
const state6 = tmp.state;
|
|
if (obj.resetLayout) {
|
|
state6.didContainersLayout = false;
|
|
state6.queuedInitialLayout = false;
|
|
}
|
|
if (obj.resetInitialScroll) {
|
|
state6.didFinishInitialScroll = false;
|
|
}
|
|
context(tmp, "readyToRender", false);
|
|
outer1_45(tmp);
|
|
}
|
|
const initialScrollSession6 = state5.initialScrollSession;
|
|
let kind3;
|
|
if (null != initialScrollSession6) {
|
|
kind3 = initialScrollSession6.kind;
|
|
}
|
|
let str10 = str;
|
|
if ("offset" === kind3) {
|
|
str10 = "offset";
|
|
}
|
|
const obj1 = { kind: null };
|
|
obj1[0] = str10;
|
|
outer1_38(state5, obj1);
|
|
const obj2 = { scroll: null, seedContentOffset: null, targetIndexSeed: null };
|
|
obj2[0] = outer1_75(tmp, initialScroll);
|
|
let tmp75;
|
|
if (tmp36) {
|
|
if (!bootstrap) {
|
|
const current = state4.refScroller.current;
|
|
let prop2;
|
|
if (null != current) {
|
|
prop2 = current.getCurrentScrollOffset;
|
|
}
|
|
if (null == prop2) {
|
|
if (typeof tmp77 !== "number") {
|
|
let scroll = state4.scrollPending;
|
|
if (null == scroll) {
|
|
scroll = state4.scroll;
|
|
}
|
|
let num9 = 0;
|
|
if (null != scroll) {
|
|
num9 = scroll;
|
|
}
|
|
} else {
|
|
const _Number = Number;
|
|
}
|
|
tmp75 = tmp77;
|
|
} else {
|
|
const call = prop2.call;
|
|
typeof call === "unknown" ? prop2() : call(current);
|
|
}
|
|
}
|
|
}
|
|
obj2[1] = tmp75;
|
|
obj2[2] = initialScroll.index;
|
|
outer1_80(tmp, obj2);
|
|
const tmp70 = outer1_38;
|
|
const tmp73 = outer1_80;
|
|
}
|
|
} else {
|
|
const values = tmp.values;
|
|
const value = values.get("footerSize");
|
|
if (tmp4) {
|
|
let num7 = value;
|
|
if (!value) {
|
|
num7 = 0;
|
|
}
|
|
let prop3;
|
|
if (null != initialScroll) {
|
|
prop3 = initialScroll.preserveForFooterLayout;
|
|
}
|
|
const obj3 = { contentOffset: "Array", index: true, preserveForBottomPadding: null, preserveForFooterLayout: null, viewOffset: 1, viewPosition: -5.778 };
|
|
const _Math2 = Math;
|
|
obj3[1] = Math.max(0, length - 1);
|
|
obj3[3] = !!prop3;
|
|
obj3[4] = -tmp6 - num7;
|
|
let obj4 = obj3;
|
|
const tmp57 = !prop3;
|
|
} else {
|
|
let num3 = value;
|
|
if (!value) {
|
|
num3 = 0;
|
|
}
|
|
let prop4;
|
|
if (null != initialScroll) {
|
|
prop4 = initialScroll.preserveForFooterLayout;
|
|
}
|
|
obj4 = {};
|
|
const merged = Object.assign(initialScroll);
|
|
obj4.contentOffset = undefined;
|
|
if (tmp4) {
|
|
const _Math = Math;
|
|
let index = Math.max(0, length - 1);
|
|
} else {
|
|
index = initialScroll.index;
|
|
}
|
|
obj4.index = index;
|
|
obj4.preserveForBottomPadding = true;
|
|
obj4.preserveForFooterLayout = !!prop4;
|
|
let num5 = 0;
|
|
if (!!prop4) {
|
|
num5 = num3;
|
|
}
|
|
obj4.viewOffset = -tmp6 - num5;
|
|
obj4.viewPosition = 1;
|
|
const tmp50 = !prop4;
|
|
}
|
|
if (!tmp36) {
|
|
if (outer1_82(tmp, initialScroll)) {
|
|
const obj5 = { dataLength: null, stylePaddingBottom: null, target: null };
|
|
obj5[0] = length;
|
|
obj5[1] = tmp6;
|
|
obj5[2] = initialScroll;
|
|
outer1_81(tmp, obj5);
|
|
}
|
|
}
|
|
const state7 = tmp.state;
|
|
state7.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
if (undefined !== state7.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout5 = clearTimeout;
|
|
clearTimeout(state7.timeoutPreservedInitialScrollClear);
|
|
state7.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state7.initialScroll = obj4;
|
|
if (tmp36) {
|
|
const obj6 = { resetInitialScroll: true };
|
|
const state8 = tmp.state;
|
|
if (obj6.resetLayout) {
|
|
state8.didContainersLayout = false;
|
|
state8.queuedInitialLayout = false;
|
|
}
|
|
if (obj6.resetInitialScroll) {
|
|
state8.didFinishInitialScroll = false;
|
|
}
|
|
context(tmp, "readyToRender", false);
|
|
outer1_45(tmp);
|
|
}
|
|
const initialScrollSession7 = state7.initialScrollSession;
|
|
let kind4;
|
|
if (null != initialScrollSession7) {
|
|
kind4 = initialScrollSession7.kind;
|
|
}
|
|
if ("offset" === kind4) {
|
|
str = "offset";
|
|
}
|
|
const obj7 = { kind: null };
|
|
obj7[0] = str;
|
|
outer1_38(state7, obj7);
|
|
const obj8 = { scroll: null, seedContentOffset: null, targetIndexSeed: null };
|
|
obj8[0] = outer1_75(tmp, obj4);
|
|
let tmp91;
|
|
if (tmp36) {
|
|
if (!bootstrap) {
|
|
const current2 = state4.refScroller.current;
|
|
let prop5;
|
|
if (null != current2) {
|
|
prop5 = current2.getCurrentScrollOffset;
|
|
}
|
|
if (null == prop5) {
|
|
if (typeof tmp93 !== "number") {
|
|
let scroll2 = state4.scrollPending;
|
|
if (null == scroll2) {
|
|
scroll2 = state4.scroll;
|
|
}
|
|
let num10 = 0;
|
|
if (null != scroll2) {
|
|
num10 = scroll2;
|
|
}
|
|
} else {
|
|
const _Number2 = Number;
|
|
}
|
|
tmp91 = tmp93;
|
|
} else {
|
|
const call2 = prop5.call;
|
|
typeof call2 === "unknown" ? prop5() : call2(current2);
|
|
}
|
|
}
|
|
}
|
|
obj8[1] = tmp91;
|
|
obj8[2] = obj4.index;
|
|
outer1_80(tmp, obj8);
|
|
const tmp62 = initialScroll.index === obj4.index && initialScroll.preserveForBottomPadding === obj4.preserveForBottomPadding && initialScroll.preserveForFooterLayout === obj4.preserveForFooterLayout && initialScroll.viewOffset === obj4.viewOffset && initialScroll.viewPosition === obj4.viewPosition;
|
|
const tmp86 = outer1_38;
|
|
const tmp89 = outer1_80;
|
|
}
|
|
const tmp33 = state4.didFinishInitialScroll && 0 === num && length > 0 && undefined !== initialScroll.index;
|
|
const tmp34 = !(state4.didFinishInitialScroll && 0 === num && length > 0 && undefined !== initialScroll.index);
|
|
}
|
|
}
|
|
} else {
|
|
let queuedInitialLayout = 0 === num;
|
|
initialScroll = queuedInitialLayout;
|
|
if (queuedInitialLayout) {
|
|
initialScroll = length > 0;
|
|
}
|
|
if (initialScroll) {
|
|
initialScroll = state.initialScroll;
|
|
}
|
|
if (initialScroll) {
|
|
const initialScrollSession3 = tmp.state.initialScrollSession;
|
|
let kind5;
|
|
if (null != initialScrollSession3) {
|
|
kind5 = initialScrollSession3.kind;
|
|
}
|
|
initialScroll = "offset" === kind5;
|
|
}
|
|
if (initialScroll) {
|
|
initialScroll = state.didFinishInitialScroll;
|
|
}
|
|
if (queuedInitialLayout) {
|
|
queuedInitialLayout = 0 !== length;
|
|
}
|
|
if (queuedInitialLayout) {
|
|
queuedInitialLayout = state.initialScroll;
|
|
}
|
|
if (queuedInitialLayout) {
|
|
queuedInitialLayout = state.queuedInitialLayout;
|
|
}
|
|
if (queuedInitialLayout) {
|
|
const didFinishInitialScroll = state.didFinishInitialScroll;
|
|
let tmp25 = !didFinishInitialScroll;
|
|
if (didFinishInitialScroll) {
|
|
tmp25 = initialScroll;
|
|
}
|
|
queuedInitialLayout = tmp25;
|
|
}
|
|
if (queuedInitialLayout) {
|
|
if (initialScroll) {
|
|
const obj9 = { resetInitialScroll: true };
|
|
const state3 = tmp.state;
|
|
if (obj9.resetLayout) {
|
|
state3.didContainersLayout = false;
|
|
state3.queuedInitialLayout = false;
|
|
}
|
|
if (obj9.resetInitialScroll) {
|
|
state3.didFinishInitialScroll = false;
|
|
}
|
|
context(tmp, "readyToRender", false);
|
|
outer1_45(tmp);
|
|
}
|
|
outer1_76(tmp);
|
|
}
|
|
}
|
|
}, items10);
|
|
const items11 = [context, data, dataVersion, , , , , ];
|
|
callback = undefined;
|
|
if (null != anchoredEndSpace) {
|
|
callback = anchoredEndSpace.anchorIndex;
|
|
}
|
|
items11[3] = callback;
|
|
callback = undefined;
|
|
if (null != anchoredEndSpace) {
|
|
callback = anchoredEndSpace.anchorMaxSize;
|
|
}
|
|
items11[4] = callback;
|
|
callback = undefined;
|
|
if (null != anchoredEndSpace) {
|
|
callback = anchoredEndSpace.anchorOffset;
|
|
}
|
|
items11[5] = callback;
|
|
items11[6] = callback;
|
|
items11[7] = num4;
|
|
callback = obj.useLayoutEffect(() => {
|
|
if (callback) {
|
|
current.scrollForNextCalculateItemsInView = undefined;
|
|
const triggerCalculateItemsInView = current.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(tmp);
|
|
}
|
|
}
|
|
tmp = current;
|
|
}
|
|
outer1_103(context);
|
|
}, items11);
|
|
const items12 = [context, undefined];
|
|
callback = obj.useLayoutEffect(() => {
|
|
ref.current = undefined;
|
|
const diff = stickyHeaderIndices(context) - stickyHeaderIndices(context, ref.current);
|
|
if (0 !== diff) {
|
|
const values = tmp.values;
|
|
outer1_70(tmp, context.state.scroll, true, { markHasScrolled: false });
|
|
const tmp9 = outer1_85(tmp);
|
|
let tmp10 = !tmp9;
|
|
if (!tmp9) {
|
|
tmp10 = !tmp4;
|
|
}
|
|
if (tmp10) {
|
|
outer1_65(tmp, diff);
|
|
}
|
|
tmp4 = !values.get("isWithinMaintainScrollAtEndThreshold");
|
|
}
|
|
}, items12);
|
|
const items13 = [data.length, tmp9, horizontal, tmp39, tmp60];
|
|
const items14 = [data.length, tmp9, tmp39, tmp60];
|
|
callback = obj.useCallback((arg0) => {
|
|
let initialScroll;
|
|
let initialScrollSession;
|
|
if (closure_18) {
|
|
const state = tmp.state;
|
|
if (closure_5) {
|
|
({ initialScroll, initialScrollSession } = state);
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
if (0 !== length) {
|
|
if (initialScroll) {
|
|
const initialScrollSession2 = state.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
let str3 = "bootstrap";
|
|
let bootstrap;
|
|
if ("bootstrap" === kind1) {
|
|
bootstrap = state.initialScrollSession.bootstrap;
|
|
}
|
|
if (bootstrap) {
|
|
if (outer1_82(tmp, initialScroll)) {
|
|
let obj = { dataLength: null, stylePaddingBottom: null, target: null };
|
|
obj[0] = length;
|
|
obj[1] = tmp7;
|
|
obj[2] = initialScroll;
|
|
outer1_81(tmp, obj);
|
|
} else {
|
|
let prop;
|
|
if (null != initialScroll) {
|
|
prop = initialScroll.preserveForFooterLayout;
|
|
}
|
|
obj = { contentOffset: "Array", index: true, preserveForBottomPadding: null, preserveForFooterLayout: null, viewOffset: 1, viewPosition: -5.778 };
|
|
const _Math = Math;
|
|
obj[1] = Math.max(0, length - 1);
|
|
obj[3] = !!prop;
|
|
obj[4] = -tmp7 - tmp5;
|
|
if (initialScroll.index === obj.index) {
|
|
if (initialScroll.viewPosition === obj.viewPosition) {
|
|
if (initialScroll.viewOffset === obj.viewOffset) {
|
|
obj = { dataLength: null, stylePaddingBottom: null, target: null };
|
|
obj[0] = length;
|
|
obj[1] = tmp7;
|
|
obj[2] = initialScroll;
|
|
outer1_81(tmp, obj);
|
|
}
|
|
}
|
|
}
|
|
const state2 = tmp.state;
|
|
state2.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
if (undefined !== state2.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state2.timeoutPreservedInitialScrollClear);
|
|
state2.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state2.initialScroll = obj;
|
|
if (!tmp19) {
|
|
const obj1 = { resetInitialScroll: true };
|
|
const state3 = tmp.state;
|
|
if (obj1.resetLayout) {
|
|
state3.didContainersLayout = false;
|
|
state3.queuedInitialLayout = false;
|
|
}
|
|
if (obj1.resetInitialScroll) {
|
|
state3.didFinishInitialScroll = false;
|
|
}
|
|
context(tmp, "readyToRender", false);
|
|
outer1_45(tmp);
|
|
}
|
|
const initialScrollSession3 = state2.initialScrollSession;
|
|
let kind2;
|
|
if (null != initialScrollSession3) {
|
|
kind2 = initialScrollSession3.kind;
|
|
}
|
|
if ("offset" === kind2) {
|
|
str3 = "offset";
|
|
}
|
|
const obj2 = { kind: null };
|
|
obj2[0] = str3;
|
|
outer1_38(state2, obj2);
|
|
const obj3 = { scroll: null, targetIndexSeed: null };
|
|
obj3[0] = outer1_75(tmp, obj);
|
|
obj3[1] = obj.index;
|
|
outer1_80(tmp, obj3);
|
|
const tmp15 = !prop;
|
|
tmp19 = !state.didFinishInitialScroll;
|
|
const tmp25 = outer1_38;
|
|
}
|
|
} else {
|
|
let prop1;
|
|
if (null != initialScroll) {
|
|
prop1 = initialScroll.preserveForFooterLayout;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}, items13);
|
|
const obj17 = { onLayoutChange: null, onLayoutProp: null, ref: null };
|
|
obj17[0] = obj.useCallback((arg0, arg1) => {
|
|
let initialScroll;
|
|
let initialScrollSession;
|
|
let otherAxisSize;
|
|
let scrollLength;
|
|
let state = context.state;
|
|
const props = state.props;
|
|
const maintainScrollAtEnd = props.maintainScrollAtEnd;
|
|
let str = "height";
|
|
let str2 = "height";
|
|
({ scrollLength, otherAxisSize } = current);
|
|
if (state.props.horizontal) {
|
|
str2 = "width";
|
|
}
|
|
let str3 = "width";
|
|
if (state.props.horizontal) {
|
|
str3 = str;
|
|
}
|
|
let point = arg0;
|
|
if (props.useWindowScroll) {
|
|
const Dimensions = viewabilityConfig.Dimensions;
|
|
let value = Dimensions.get("window");
|
|
let obj = { height: null, width: null };
|
|
({ height: obj[0], width: obj[1] } = value);
|
|
let tmp7 = arg0;
|
|
if (obj[str2] > 0) {
|
|
obj = {};
|
|
const merged = Object.assign(arg0);
|
|
obj[str2] = tmp6;
|
|
tmp7 = obj;
|
|
}
|
|
point = tmp7;
|
|
}
|
|
let scrollLength2 = state.scrollLength;
|
|
if (point[str2] > 0) {
|
|
scrollLength2 = tmp11;
|
|
}
|
|
const lastLayout = state.lastLayout;
|
|
let tmp13 = !lastLayout;
|
|
if (lastLayout) {
|
|
tmp13 = scrollLength2 > state.scrollLength;
|
|
}
|
|
if (!tmp13) {
|
|
tmp13 = state.lastLayout.x !== point.x;
|
|
}
|
|
if (!tmp13) {
|
|
tmp13 = state.lastLayout.y !== point.y;
|
|
}
|
|
state.lastLayout = point;
|
|
const otherAxisSize2 = state.otherAxisSize;
|
|
let tmp14 = scrollLength2 !== state.scrollLength || tmp12 !== otherAxisSize2;
|
|
if (tmp14) {
|
|
state.scrollLength = scrollLength2;
|
|
state.otherAxisSize = tmp12;
|
|
outer1_50(tmp2);
|
|
let _Date = Date;
|
|
state.lastBatchingAction = Date.now();
|
|
state.scrollForNextCalculateItemsInView = undefined;
|
|
if (scrollLength2 > 0) {
|
|
outer1_133(tmp2);
|
|
}
|
|
if (tmp13) {
|
|
let stickyHeaderIndices = tmp2;
|
|
let obj1 = { doMVCP: true };
|
|
let state3 = tmp2.state;
|
|
outer1_97(() => {
|
|
let alwaysRenderIndicesArr;
|
|
let bottom;
|
|
let closure_4;
|
|
let dataChanged;
|
|
let doMVCP;
|
|
let enableScrollForNextCalculateItemsInView;
|
|
let endNoBuffer;
|
|
let forceFullItemPositions;
|
|
let getItemType;
|
|
let idCache;
|
|
let indexByKey;
|
|
let initialScroll;
|
|
let keyExtractor;
|
|
let minIndexSizeChanged;
|
|
let positions;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scrollForNextCalculateItemsInView;
|
|
let scrollLength;
|
|
let set2;
|
|
let sizes;
|
|
let startBufferedId;
|
|
let startNoBuffer;
|
|
let state;
|
|
let top;
|
|
let viewabilityConfigCallbackPairs;
|
|
let addResult = state;
|
|
let containerItemKeys = state.containerItemKeys;
|
|
({ enableScrollForNextCalculateItemsInView, idCache } = state);
|
|
({ indexByKey, minIndexSizeChanged, positions, props } = state);
|
|
({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props);
|
|
({ keyExtractor, onStickyHeaderChange: closure_4 } = props);
|
|
({ scrollForNextCalculateItemsInView, scrollLength } = state);
|
|
({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state);
|
|
const data = state.props.data;
|
|
let prop = state.props.stickyHeaderIndicesArr;
|
|
if (!prop) {
|
|
prop = [];
|
|
}
|
|
let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet;
|
|
if (!stickyHeaderIndicesSet) {
|
|
let _Set = Set;
|
|
stickyHeaderIndicesSet = new Set();
|
|
}
|
|
let tmp9 = outer1_46(containerItemKeys, idCache.drawDistanceMode);
|
|
({ dataChanged, doMVCP, forceFullItemPositions } = idCache);
|
|
let initialScrollSession = tmp2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp2.initialScrollSession.bootstrap;
|
|
}
|
|
let tmp16 = outer1_21(containerItemKeys, "numContainers");
|
|
if (data) {
|
|
if (0 !== scrollLength) {
|
|
if (tmp16) {
|
|
let closure_8 = outer1_25(tmp7);
|
|
let tmp15Result = tmp15(tmp7, "stylePaddingTop");
|
|
let sum = tmp15Result + tmp15(tmp7, "alignItemsAtEndPadding");
|
|
let closure_9 = sum + tmp15(tmp7, "headerSize");
|
|
tmp15Result = tmp15(tmp7, "numColumns");
|
|
let scrollVelocity = idCache.scrollVelocity;
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = outer1_69(tmp2);
|
|
}
|
|
({ initialScroll, queuedInitialLayout } = tmp2);
|
|
if (!tmp13) {
|
|
let scroll;
|
|
if (null != bootstrap) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = tmp2.scroll;
|
|
}
|
|
} else {
|
|
if (!queuedInitialLayout) {
|
|
if (outer1_41(tmp2)) {
|
|
if (initialScroll) {
|
|
scroll = outer1_75(tmp7, initialScroll);
|
|
}
|
|
}
|
|
}
|
|
scroll = tmp2.scroll;
|
|
}
|
|
let c10 = 0;
|
|
let c11 = 0;
|
|
let c12 = 0;
|
|
let c13 = 0;
|
|
let c14 = 0;
|
|
let c15 = 0;
|
|
function updateScroll2(scroll) {
|
|
let closure_16 = scroll;
|
|
const values = containerItemKeys.values;
|
|
const value = values.get("scrollAdjustPending");
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
let closure_11 = num - closure_9;
|
|
const rounded = Math.round(scroll + closure_11);
|
|
let closure_12 = rounded;
|
|
if (rounded + scrollLength > closure_8) {
|
|
const _Math = Math;
|
|
closure_12 = Math.max(0, tmp4 - tmp3);
|
|
}
|
|
}
|
|
updateScroll2(scroll);
|
|
const tmp15Result1 = tmp15(tmp7, "activeStickyIndex");
|
|
let closure_17 = tmp15Result1;
|
|
function resolveStickyState() {
|
|
let num = -1;
|
|
let num2 = -1;
|
|
if (prop.length > 0) {
|
|
let diff = arr.length - 1;
|
|
let tmp5 = num;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp6 = tmp3[arr[diff]];
|
|
let tmp7 = diff;
|
|
if (undefined === tmp6) {
|
|
diff = diff - 1;
|
|
tmp5 = num;
|
|
if (0 > diff) {
|
|
break;
|
|
}
|
|
} else {
|
|
tmp5 = diff;
|
|
if (tmp >= tmp6) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
num2 = tmp5;
|
|
}
|
|
if (0 <= num2) {
|
|
num = arr[num2];
|
|
}
|
|
let tmp8 = num2 >= 0;
|
|
if (0 > num2) {
|
|
tmp8 = tmp9 >= 0;
|
|
}
|
|
if (tmp8) {
|
|
outer2_22(containerItemKeys, "activeStickyIndex", num);
|
|
}
|
|
let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null };
|
|
let fn;
|
|
if (closure_4) {
|
|
if (arr.length > 0) {
|
|
if (tmp9 !== num) {
|
|
fn = () => {
|
|
if (undefined !== outer1_6[num]) {
|
|
if (null != outer1_4) {
|
|
const obj = { index: null, item: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp2;
|
|
tmp3(obj);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
obj[1] = fn;
|
|
return obj;
|
|
}
|
|
if (!dataChanged) {
|
|
let stickyState = resolveStickyState();
|
|
}
|
|
let result2 = tmp9;
|
|
let result3 = tmp9;
|
|
if (scrollVelocity > 0) {
|
|
let result = 0.5 * tmp9;
|
|
result2 = result;
|
|
const result1 = 1.5 * tmp9;
|
|
result3 = result1;
|
|
result3 = result1;
|
|
result2 = result;
|
|
} else {
|
|
if (0 === scrollVelocity) {
|
|
let _Math = Math;
|
|
}
|
|
result2 = 1.5 * tmp9;
|
|
result3 = 0.5 * tmp9;
|
|
}
|
|
let num6 = 0;
|
|
if (!dataChanged) {
|
|
num6 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num6 = 0;
|
|
if (!tmp25) {
|
|
num6 = 0;
|
|
if (!outer1_41(tmp2)) {
|
|
num6 = 0;
|
|
if (!tmp2.scrollingTo) {
|
|
num6 = 0;
|
|
if (!tmp2.pendingNativeMVCPAdjust) {
|
|
num6 = 0;
|
|
if (tmp15(tmp7, "readyToRender")) {
|
|
let _Math2 = Math;
|
|
num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) {
|
|
if (arg1 <= 0) {
|
|
return 0;
|
|
} else {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const bound = Math.min(1, Math.abs(scrollVelocity) / 4);
|
|
return Math.sign(scrollVelocity) * arg1 * bound;
|
|
}
|
|
})(scrollVelocity, Math.min(result2, result3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateScrollRange() {
|
|
const bound = Math.max(0, c12);
|
|
let closure_14 = Math.max(bound, c12 + scrollLength + Math.max(0, -scroll));
|
|
let closure_13 = bound - result2 + num6;
|
|
let closure_15 = closure_14 + result3 + num6;
|
|
}
|
|
updateScrollRange();
|
|
if (0 !== num6) {
|
|
(function scheduleRenderRangeProjectionSettle(state) {
|
|
state = state.state;
|
|
const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle;
|
|
if (undefined !== timeoutRenderRangeProjectionSettle) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutRenderRangeProjectionSettle);
|
|
let timeouts = state.timeouts;
|
|
timeouts.delete(timeoutRenderRangeProjectionSettle);
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
state.timeoutRenderRangeProjectionSettle = undefined;
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.scrollHistory.length = 0;
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}, 100);
|
|
state.timeoutRenderRangeProjectionSettle = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
})(tmp7);
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
if (!tmp25) {
|
|
if (!dataChanged) {
|
|
if (!forceFullItemPositions) {
|
|
if (scrollForNextCalculateItemsInView) {
|
|
({ top, bottom } = scrollForNextCalculateItemsInView);
|
|
if (null === top) {
|
|
if (null === bottom) {
|
|
tmp2.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}
|
|
if (null === top) {
|
|
if (viewabilityConfigCallbackPairs) {
|
|
(function updateViewabilityForCachedRange(state, viewabilityConfigCallbackPairs, scrollLength, c12, c14) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let tmp7 = null;
|
|
let sum1;
|
|
let tmp9 = null;
|
|
if (startBuffered <= endBuffered) {
|
|
let tmp3 = null;
|
|
let tmp5 = null;
|
|
let tmp6 = startBuffered;
|
|
tmp7 = null;
|
|
tmp9 = null;
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp10 = tmp[tmp6];
|
|
let tmp11 = tmp3;
|
|
let tmp12 = tmp4;
|
|
let tmp13 = tmp5;
|
|
let tmp14 = tmp6;
|
|
if (null == tmp10) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data) {
|
|
let tmp15 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp15 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp15;
|
|
str2 = tmp15;
|
|
}
|
|
tmp10 = str2;
|
|
}
|
|
let value = sizes.get(tmp10);
|
|
if (null == value) {
|
|
let tmp19 = callback4;
|
|
let num2 = 0;
|
|
let tmp20 = state;
|
|
let tmp21 = tmp10;
|
|
let tmp22 = tmp6;
|
|
value = callback4(state, tmp18, tmp14, data[tmp6]);
|
|
}
|
|
let tmp23 = tmp2[tmp6];
|
|
let tmp24 = null === tmp11 && tmp23 + value > c12;
|
|
if (tmp24) {
|
|
tmp11 = tmp6;
|
|
}
|
|
let tmp25 = undefined === tmp12 && tmp23 >= c12 - 10 && tmp23 <= c14;
|
|
if (tmp25) {
|
|
tmp12 = tmp6;
|
|
}
|
|
let tmp26 = tmp13;
|
|
let flag = false;
|
|
if (null !== tmp11) {
|
|
let flag2 = true;
|
|
if (tmp23 <= c14) {
|
|
tmp13 = tmp6;
|
|
flag2 = false;
|
|
}
|
|
tmp26 = tmp13;
|
|
flag = flag2;
|
|
}
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (flag) {
|
|
break;
|
|
} else {
|
|
let sum = tmp6 + 1;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (sum > endBuffered) {
|
|
break;
|
|
} else {
|
|
tmp3 = tmp11;
|
|
tmp4 = tmp12;
|
|
tmp5 = tmp26;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
tmp6 = sum;
|
|
if (sum >= data.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj = { endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startNoBuffer: null };
|
|
obj[0] = tmp9;
|
|
obj[1] = sum1;
|
|
if (null == sum1) {
|
|
sum1 = tmp7;
|
|
}
|
|
const items = [];
|
|
if (null != sum1) {
|
|
if (null !== tmp9) {
|
|
if (sum1 <= tmp9) {
|
|
do {
|
|
let tmp29 = state.idCache[sum1];
|
|
let tmp30 = sum1;
|
|
if (null == tmp29) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp29 = str4;
|
|
}
|
|
let arr = items.push(tmp29);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 <= tmp9);
|
|
}
|
|
}
|
|
}
|
|
obj[2] = items;
|
|
obj[3] = tmp7;
|
|
const merged = Object.assign(state, obj);
|
|
callback9(state, tmp7);
|
|
if (tmp37) {
|
|
callback7(state, state, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered);
|
|
}
|
|
tmp37 = null !== tmp7 && null !== tmp9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})(tmp7, viewabilityConfigCallbackPairs, scrollLength, c12, c14);
|
|
} else if (tmp2.props.onFirstVisibleItemChanged) {
|
|
outer1_102(tmp2, (function findFirstVisibleIndexInCachedRange(state, c12) {
|
|
let data;
|
|
let keyExtractor;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
if (startBuffered <= endBuffered) {
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp3 = tmp[startBuffered];
|
|
let tmp4 = startBuffered;
|
|
if (null == tmp3) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp5 = null;
|
|
if (startBuffered < data.length) {
|
|
let keyExtractorResult = startBuffered;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startBuffered], startBuffered);
|
|
}
|
|
tmp5 = keyExtractorResult;
|
|
}
|
|
state.idCache[startBuffered] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
let value = sizes.get(tmp3);
|
|
let tmp9 = value;
|
|
if (null == value) {
|
|
let tmp10 = callback4;
|
|
let num = 0;
|
|
let tmp11 = state;
|
|
let tmp12 = tmp3;
|
|
let tmp13 = startBuffered;
|
|
tmp9 = callback4(state, tmp8, tmp4, data[startBuffered]);
|
|
}
|
|
if (tmp2[startBuffered] + tmp9 > c12) {
|
|
break;
|
|
} else {
|
|
let sum = startBuffered + 1;
|
|
if (sum <= endBuffered) {
|
|
startBuffered = sum;
|
|
}
|
|
}
|
|
}
|
|
return startBuffered;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
})(tmp7, c12));
|
|
}
|
|
let prop1;
|
|
if (null != stickyState) {
|
|
prop1 = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != prop1) {
|
|
let call = prop1.call;
|
|
typeof call === "unknown" ? prop1() : call(stickyState);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp73;
|
|
if (doMVCP) {
|
|
if (!tmp25) {
|
|
tmp73 = outer1_68(tmp7, dataChanged);
|
|
}
|
|
}
|
|
if (dataChanged) {
|
|
outer1_86(tmp2);
|
|
}
|
|
let num8 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num8 = 0;
|
|
if (!dataChanged) {
|
|
let startBuffered = minIndexSizeChanged;
|
|
if (null == minIndexSizeChanged) {
|
|
startBuffered = tmp2.startBuffered;
|
|
}
|
|
let num9 = 0;
|
|
if (null != startBuffered) {
|
|
num9 = startBuffered;
|
|
}
|
|
num8 = num9;
|
|
}
|
|
}
|
|
let obj = { doMVCP: null, forceFullUpdate: null, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null };
|
|
obj[0] = doMVCP;
|
|
obj[1] = forceFullItemPositions;
|
|
let tmp82 = !forceFullItemPositions;
|
|
if (!forceFullItemPositions) {
|
|
tmp82 = !dataChanged;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = tmp15Result > 1;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = undefined !== minIndexSizeChanged;
|
|
}
|
|
obj[2] = tmp82;
|
|
obj[3] = c15;
|
|
obj[4] = scrollVelocity;
|
|
obj[5] = num8;
|
|
outer1_89(tmp7, dataChanged, obj);
|
|
const tmp17Result = outer1_25(tmp7);
|
|
closure_8 = tmp17Result;
|
|
if (undefined !== minIndexSizeChanged) {
|
|
tmp2.minIndexSizeChanged = undefined;
|
|
}
|
|
if (dataChanged) {
|
|
if (doMVCP) {
|
|
if (tmp2.props.maintainVisibleContentPosition.data) {
|
|
if (tmp2.didContainersLayout) {
|
|
if (tmp2.idsInView.length > 0) {
|
|
const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition;
|
|
const _Set2 = Set;
|
|
let set = new Set();
|
|
const idsInView = tmp2.idsInView;
|
|
for (const item10226 of idsInView) {
|
|
let tmp99 = item10226;
|
|
addResult = indexByKey.get(item10226);
|
|
if (undefined !== addResult) {
|
|
addResult = shouldRestorePosition;
|
|
if (shouldRestorePosition) {
|
|
addResult = !shouldRestorePosition(data[addResult], addResult, data);
|
|
}
|
|
if (!addResult) {
|
|
addResult = item10226;
|
|
addResult = set.add(tmp99);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_21(containerItemKeys, "scrollAdjustPending");
|
|
let num11 = 0;
|
|
if (null != addResult) {
|
|
num11 = addResult;
|
|
}
|
|
if (null != tmp73) {
|
|
addResult = tmp73();
|
|
}
|
|
addResult = tmp73;
|
|
if (addResult) {
|
|
addResult = addResult.scroll !== state.scroll;
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, "scrollAdjustPending");
|
|
let num12 = 0;
|
|
if (null != addResult) {
|
|
num12 = addResult;
|
|
}
|
|
addResult = num12 !== num11;
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = updateScroll2(addResult.scroll);
|
|
addResult = updateScrollRange();
|
|
}
|
|
if (dataChanged) {
|
|
stickyState = resolveStickyState();
|
|
}
|
|
addResult = undefined;
|
|
if (!tmp13) {
|
|
addResult = undefined;
|
|
if (null != bootstrap) {
|
|
addResult = bootstrap.targetIndexSeed;
|
|
}
|
|
}
|
|
if (null == addResult) {
|
|
let num13 = !dataChanged;
|
|
if (!dataChanged) {
|
|
num13 = startBufferedId;
|
|
}
|
|
if (num13) {
|
|
num13 = indexByKey.get(startBufferedId);
|
|
}
|
|
if (!num13) {
|
|
num13 = 0;
|
|
}
|
|
addResult = num13;
|
|
}
|
|
if (addResult >= 0) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num14 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = c13;
|
|
if (positions[addResult] + addResult <= c13) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (addResult < 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp15Result > 1) {
|
|
if (addResult > 0) {
|
|
addResult = state.columns[addResult];
|
|
while (1 !== addResult) {
|
|
if (undefined === addResult) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (0 >= addResult) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = globalThis;
|
|
let num16 = 0;
|
|
let num17 = 0;
|
|
let num18 = 0;
|
|
if (0 < tmp16) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num16);
|
|
addResult = num16;
|
|
addResult = num17;
|
|
addResult = num17;
|
|
if (undefined !== addResult) {
|
|
let _Math3 = Math;
|
|
addResult = Math.max(num17, indexByKey.get(addResult));
|
|
}
|
|
num16 = num16 + 1;
|
|
num17 = addResult;
|
|
num18 = addResult;
|
|
} while (num16 < tmp16);
|
|
}
|
|
obj = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: true };
|
|
const length = data.length;
|
|
let _Math4 = Math;
|
|
addResult = Math.max(0, addResult);
|
|
let flag3 = false;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
if (addResult < length) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
addResult = flag3;
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num19 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = positions[addResult];
|
|
addResult = flag3;
|
|
if (!flag3) {
|
|
addResult = outer1_100;
|
|
addResult = c12;
|
|
addResult = c14;
|
|
let num20 = 0;
|
|
addResult = obj;
|
|
addResult = outer1_100(obj, addResult, addResult, addResult, c12, c14);
|
|
addResult = null === addResult;
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = addResult + addResult > c13;
|
|
}
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = null;
|
|
}
|
|
addResult = flag3;
|
|
if (null !== obj.startNoBuffer) {
|
|
addResult = c15;
|
|
let flag4 = true;
|
|
if (addResult <= c15) {
|
|
addResult = c15;
|
|
addResult = null;
|
|
if (c15 <= tmp17Result) {
|
|
addResult = addResult + addResult;
|
|
}
|
|
flag4 = flag3;
|
|
}
|
|
addResult = flag4;
|
|
}
|
|
}
|
|
addResult = addResult + 1;
|
|
if (addResult >= length) {
|
|
break;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (!addResult) {
|
|
continue;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (addResult > num18) {
|
|
break;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
const _Object = Object;
|
|
let obj1 = { endBuffered: null, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null };
|
|
obj1[0] = addResult;
|
|
({ endNoBuffer: obj5[1], firstFullyOnScreenIndex: obj5[2] } = obj);
|
|
addResult = outer1_101;
|
|
addResult = state;
|
|
addResult = state;
|
|
obj1[3] = outer1_101(state, obj);
|
|
obj1[4] = addResult;
|
|
obj1[5] = addResult;
|
|
obj1[6] = obj.startNoBuffer;
|
|
addResult = Object.assign(state, obj1);
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
addResult = outer1_54;
|
|
if (!outer1_54(addResult)) {
|
|
let obj2 = { bottom: null, top: null };
|
|
obj2[0] = addResult;
|
|
obj2[1] = addResult;
|
|
addResult = obj2;
|
|
}
|
|
addResult.scrollForNextCalculateItemsInView = addResult;
|
|
}
|
|
addResult = tmp16;
|
|
let items = [];
|
|
if (dataChanged) {
|
|
for (let num21 = 0; num21 < addResult; num21 = num21 + 1) {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal2 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num21);
|
|
addResult = !keyExtractor;
|
|
addResult = num21;
|
|
if (keyExtractor) {
|
|
if (addResult) {
|
|
addResult = undefined === indexByKey.get(addResult);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = items.push(num21);
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const scrollTargetPinnedRange = state.scrollTargetPinnedRange;
|
|
let c22 = 0;
|
|
let c23 = -1;
|
|
let num23 = -1;
|
|
let num24 = 0;
|
|
if (scrollTargetPinnedRange) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
addResult = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c22 = addResult;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
addResult = length - 1;
|
|
addResult = Math.min(addResult, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c23 = addResult;
|
|
num23 = addResult;
|
|
num24 = addResult;
|
|
}
|
|
addResult = num24 <= num23;
|
|
let closure_24 = addResult;
|
|
function isPinnedRenderIndex(addResult) {
|
|
let hasItem = set.has(addResult);
|
|
if (!hasItem) {
|
|
let tmp2 = closure_24;
|
|
if (closure_24) {
|
|
tmp2 = addResult >= c22;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = addResult <= c23;
|
|
}
|
|
hasItem = tmp2;
|
|
}
|
|
return hasItem;
|
|
}
|
|
if (null !== addResult) {
|
|
if (null !== addResult) {
|
|
let items1 = [];
|
|
const _Set6 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
const set1 = new Set();
|
|
function addPinnedIndex(item10471) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (item10471 >= 0) {
|
|
if (item10471 < length) {
|
|
let tmp4 = idCache[item10471];
|
|
if (null == tmp4) {
|
|
({ data, keyExtractor } = outer1_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (item10471 < data.length) {
|
|
let keyExtractorResult = item10471;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[item10471], item10471);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[item10471] = tmp2;
|
|
str = tmp2;
|
|
}
|
|
tmp4 = str;
|
|
}
|
|
const value = containerItemKeys.get(tmp4);
|
|
if (undefined !== value) {
|
|
const stickyContainerPool = outer1_2.stickyContainerPool;
|
|
stickyContainerPool.add(value);
|
|
} else {
|
|
let hasItem = null == tmp4;
|
|
if (!hasItem) {
|
|
hasItem = set1.has(item10471);
|
|
}
|
|
if (!hasItem) {
|
|
set1.add(item10471);
|
|
items1.push(item10471);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = set1;
|
|
if (addResult <= addResult) {
|
|
do {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
if (!containerItemKeys.has(addResult)) {
|
|
addResult = set1.add(addResult);
|
|
addResult = items1.push(addResult);
|
|
}
|
|
addResult = addResult + 1;
|
|
} while (addResult <= addResult);
|
|
}
|
|
addResult = alwaysRenderIndicesArr;
|
|
addResult = alwaysRenderIndicesArr;
|
|
for (const item10471 of alwaysRenderIndicesArr) {
|
|
addResult = addPinnedIndex(item10471);
|
|
continue;
|
|
}
|
|
if (addResult) {
|
|
if (num24 <= num23) {
|
|
do {
|
|
addResult = addPinnedIndex(num24);
|
|
num24 = num24 + 1;
|
|
} while (num24 <= num23);
|
|
}
|
|
}
|
|
if (prop.length > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num25 = -1;
|
|
if (null != addResult) {
|
|
num25 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = num25;
|
|
addResult = items1;
|
|
addResult = set1;
|
|
addResult = (function handleStickyActivation(addResult, prop, arg2, items1, addResult2, addResult3, addResult4) {
|
|
let data;
|
|
let keyExtractor;
|
|
const state = addResult.state;
|
|
let num = -1;
|
|
if (arg2 >= 0) {
|
|
num = prop[arg2];
|
|
}
|
|
c22(addResult, "activeStickyIndex", num);
|
|
let num2 = 0;
|
|
do {
|
|
let diff = arg2 - num2;
|
|
let tmp4 = num2;
|
|
if (diff >= 0) {
|
|
let tmp12 = prop[diff];
|
|
let tmp13 = callback8;
|
|
if (!callback8(addResult, tmp12)) {
|
|
let tmp5 = state.idCache[tmp12];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (tmp12 < data.length) {
|
|
let keyExtractorResult = tmp12;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp12], tmp12);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp12] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let tmp8 = tmp5;
|
|
if (tmp5) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
tmp8 = !containerItemKeys.has(tmp5);
|
|
}
|
|
if (tmp8) {
|
|
let tmp9 = tmp12 < addResult3 || tmp12 > addResult4;
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = !addResult2.has(tmp12);
|
|
}
|
|
if (tmp8) {
|
|
addResult = addResult2.add(tmp12);
|
|
let arr = items1.push(tmp12);
|
|
}
|
|
}
|
|
}
|
|
num2 = num2 + 1;
|
|
} while (num2 <= 1);
|
|
})(addResult, prop, num25, items1, addResult, addResult, addResult);
|
|
} else if (-1 !== tmp15Result1) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "activeStickyIndex", -1);
|
|
}
|
|
if (items1.length > 0) {
|
|
let fn;
|
|
if (getItemType) {
|
|
fn = (arg0) => {
|
|
const tmp = getItemType(data[arg0], arg0);
|
|
let str = "";
|
|
if (undefined !== tmp) {
|
|
const _String = String;
|
|
str = String(tmp);
|
|
}
|
|
return str;
|
|
};
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = items1;
|
|
addResult = items;
|
|
addResult = fn;
|
|
addResult = tmp88;
|
|
addResult = (function findAvailableContainers(containerItemKeys, items1, addResult, addResult2, items, fn, has) {
|
|
let closure_2;
|
|
let stickyContainerPool;
|
|
let closure_0 = fn;
|
|
if (0 === items1.length) {
|
|
return [];
|
|
} else {
|
|
const tmp56 = length(containerItemKeys, "numContainers");
|
|
const state = containerItemKeys.state;
|
|
({ containerItemMetadata: closure_2, stickyContainerPool } = state);
|
|
let set;
|
|
if (items.length > 0) {
|
|
const _Set = Set;
|
|
set = new Set(items);
|
|
}
|
|
const mapped = items1.map((itemIndex) => {
|
|
const obj = { isSticky: stickyHeaderIndicesSet.has(itemIndex), itemIndex, itemType: null, order: null };
|
|
stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet;
|
|
let tmp;
|
|
if (null != callback) {
|
|
tmp = callback(itemIndex);
|
|
}
|
|
obj[2] = tmp;
|
|
obj[3] = arg1;
|
|
return obj;
|
|
});
|
|
const found = mapped.filter((isSticky) => !isSticky.isSticky);
|
|
items = [];
|
|
items1 = [];
|
|
let num2 = 0;
|
|
const found1 = mapped.filter((isSticky) => isSticky.isSticky);
|
|
if (0 < tmp56) {
|
|
while (true) {
|
|
let tmp12 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp13 = length(containerItemKeys, "containerItemKey" + num2);
|
|
let tmp14 = num2;
|
|
let hasItem;
|
|
if (null != set) {
|
|
hasItem = set.has(num2);
|
|
}
|
|
let tmp16 = !hasItem;
|
|
if (tmp13) {
|
|
let hasItem1;
|
|
if (null != has) {
|
|
hasItem1 = has.has(tmp13);
|
|
}
|
|
if (hasItem1) {
|
|
let indexByKey = state.indexByKey;
|
|
}
|
|
num2 = num2 + 1;
|
|
if (num2 >= tmp56) {
|
|
break;
|
|
}
|
|
}
|
|
let tmp18 = !tmp16;
|
|
if (stickyContainerPool.has(num2)) {
|
|
let tmp22 = undefined === tmp13 || tmp18;
|
|
if (tmp22) {
|
|
let obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number2 = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr = items1.push(obj);
|
|
}
|
|
} else {
|
|
if (undefined !== tmp13) {
|
|
if (!tmp18) {
|
|
if (!tmp) {
|
|
let indexByKey2 = state.indexByKey;
|
|
let value = indexByKey2.get(tmp13);
|
|
if (undefined !== value) {
|
|
if (value < addResult) {
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
obj[1] = value < addResult ? addResult - value : value - addResult2;
|
|
arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr1 = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
const sorted = items.sort(closure_98);
|
|
const _Array = Array;
|
|
const array = new Array(length);
|
|
let sum = tmp56;
|
|
let c5 = false;
|
|
function assign(itemIndex, containerIndex) {
|
|
array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType };
|
|
let deleteResult;
|
|
if (null != set) {
|
|
deleteResult = set.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
let c5 = true;
|
|
}
|
|
}
|
|
function assignMatching(found, items, arg2) {
|
|
let closure_0 = items;
|
|
let closure_1 = arg2;
|
|
function _loop2() { ... }
|
|
const iter = found[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop2Result = _loop2(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function assignFromPool(found, items, arg2) {
|
|
if (closure_0) {
|
|
assignMatching(found, items, /* F118898 */ function() { ... });
|
|
}
|
|
assignMatching(found, items, /* F118899 */ function() { ... });
|
|
if (arg2) {
|
|
assignMatching(found, items, /* F118900 */ function() { ... });
|
|
}
|
|
}
|
|
assignFromPool(found, items, true);
|
|
assignFromPool(found1, items1, false);
|
|
for (const item10099 of mapped) {
|
|
let tmp36 = item10099;
|
|
if (!array[item10099.order]) {
|
|
let tmp37 = sum;
|
|
let tmp38 = +sum;
|
|
sum = tmp38 + 1;
|
|
let tmp39 = tmp38;
|
|
let tmp40 = item10099;
|
|
if (tmp36.isSticky) {
|
|
let tmp41 = tmp38;
|
|
addResult = stickyContainerPool.add(tmp39);
|
|
}
|
|
let tmp43 = item10099;
|
|
let tmp44 = tmp38;
|
|
let obj1 = assign(tmp36, tmp39);
|
|
}
|
|
continue;
|
|
}
|
|
if (c5) {
|
|
items.length = 0;
|
|
if (set) {
|
|
for (const item10120 of set) {
|
|
let arr2 = arg4.push(item10120);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if (closure_31) {
|
|
let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled");
|
|
if (null == POSITIVE_INFINITY) {
|
|
const _Number3 = Number;
|
|
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
}
|
|
if (sum > POSITIVE_INFINITY) {
|
|
const _console = console;
|
|
let obj2 = { debugInfo: null };
|
|
const obj3 = { numContainers: null, numContainersPooled: null, numNeeded: null, stillNeeded: null };
|
|
obj3[0] = tmp56;
|
|
obj3[1] = POSITIVE_INFINITY;
|
|
obj3[2] = length;
|
|
obj3[3] = sum - tmp56;
|
|
obj2[0] = obj3;
|
|
console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj2);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
})(containerItemKeys, items1, addResult, addResult, items, fn, tmp88);
|
|
let iter = addResult[Symbol.iterator]();
|
|
addResult = iter.next();
|
|
addResult = iter;
|
|
while (iter !== undefined) {
|
|
let itemIndex = addResult.itemIndex;
|
|
addResult = itemIndex;
|
|
let containerIndex = addResult.containerIndex;
|
|
addResult = idCache[itemIndex];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = itemIndex;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerIndex;
|
|
let _HermesInternal3 = HermesInternal;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + containerIndex);
|
|
if (addResult) {
|
|
addResult = addResult !== addResult;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
}
|
|
if (addResult !== addResult) {
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set3 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = containerIndex;
|
|
addResult = set2.add(containerIndex);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[containerIndex];
|
|
let num28 = 0;
|
|
if (null != addResult) {
|
|
num28 = addResult;
|
|
}
|
|
state.containerItemGenerations[containerIndex] = num28 + 1;
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerIndex;
|
|
let _HermesInternal4 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + containerIndex, addResult);
|
|
let _HermesInternal5 = HermesInternal;
|
|
addResult = itemIndex;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + containerIndex, addResult);
|
|
let _HermesInternal6 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + containerIndex, data[addResult]);
|
|
addResult = state;
|
|
addResult = state;
|
|
let containerItemMetadata = state.containerItemMetadata;
|
|
addResult = outer1_28;
|
|
let num29 = 0;
|
|
addResult = state;
|
|
addResult = containerItemMetadata.set(containerIndex, outer1_28(state, itemIndex, data[addResult], addResult.itemType));
|
|
addResult = containerItemKeys.set(addResult, containerIndex);
|
|
let userScrollAnchorReset = state.userScrollAnchorReset;
|
|
if (null != userScrollAnchorReset) {
|
|
addResult = userScrollAnchorReset;
|
|
let keys = addResult.keys;
|
|
addResult = keys.add(addResult);
|
|
}
|
|
addResult = containerIndex;
|
|
let _HermesInternal7 = HermesInternal;
|
|
addResult = "containerSticky" + containerIndex;
|
|
addResult = itemIndex;
|
|
addResult = stickyHeaderIndicesSet.has(addResult);
|
|
addResult = isPinnedRenderIndex(addResult);
|
|
if (addResult) {
|
|
addResult = addResult(addResult, addResult, true);
|
|
let stickyContainerPool2 = addResult.stickyContainerPool;
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool2.add(containerIndex);
|
|
} else {
|
|
if (addResult(addResult, addResult)) {
|
|
addResult = addResult(addResult, addResult, false);
|
|
}
|
|
let stickyContainerPool = addResult.stickyContainerPool;
|
|
if (addResult) {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.add(containerIndex);
|
|
} else {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.delete(containerIndex);
|
|
}
|
|
}
|
|
addResult = containerIndex;
|
|
if (containerIndex >= addResult) {
|
|
addResult = containerIndex;
|
|
addResult = containerIndex + 1;
|
|
}
|
|
continue;
|
|
}
|
|
if (addResult !== tmp16) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "numContainers", addResult);
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
if (addResult > outer1_21(containerItemKeys, "numContainersPooled")) {
|
|
addResult = addResult(addResult, "numContainersPooled", (function getExpandedContainerPoolSize(length, addResult) {
|
|
let num = 0;
|
|
if (length > 0) {
|
|
num = 0;
|
|
if (addResult > 0) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound = Math.max(length, addResult);
|
|
num = Math.min(bound, Math.max(addResult, Math.ceil(1.5 * addResult)));
|
|
}
|
|
}
|
|
return num;
|
|
})(length, addResult));
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const userScrollAnchorReset2 = state.userScrollAnchorReset;
|
|
addResult = undefined;
|
|
if (null != userScrollAnchorReset2) {
|
|
addResult = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === addResult) {
|
|
addResult.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
if (addResult.stickyContainerPool.size > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = c12;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num30 = -1;
|
|
if (null != addResult) {
|
|
num30 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = tmp9;
|
|
addResult = num30;
|
|
addResult = items;
|
|
addResult = isPinnedRenderIndex;
|
|
addResult = (function handleStickyRecycling(addResult, prop, addResult2, arg3, arg4, items, isPinnedRenderIndex) {
|
|
const state = addResult.state;
|
|
const iter = state.stickyContainerPool[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
let tmp3 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp4 = length(addResult, "containerItemKey" + nextResult);
|
|
let value;
|
|
if (tmp4) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp7 = tmp4;
|
|
value = indexByKey.get(tmp5);
|
|
}
|
|
let tmp8 = value;
|
|
if (undefined !== value) {
|
|
let tmp52 = value;
|
|
if (!isPinnedRenderIndex(tmp8)) {
|
|
let tmp9 = value;
|
|
let index = prop.indexOf(tmp8);
|
|
let tmp11 = index;
|
|
if (-1 !== index) {
|
|
let tmp16 = index;
|
|
if (tmp11 < arg4 - 1) {
|
|
let tmp18 = index;
|
|
let tmp19 = prop[tmp11 + 1];
|
|
let flag = false;
|
|
if (tmp19) {
|
|
let tmp44 = tmp19;
|
|
let tmp45 = state.positions[tmp20];
|
|
let tmp47 = undefined !== tmp45;
|
|
if (tmp47) {
|
|
let tmp48 = tmp45;
|
|
tmp47 = addResult2 > tmp46 + 2 * arg3;
|
|
}
|
|
flag = tmp47;
|
|
} else {
|
|
let tmp21 = value;
|
|
let tmp22 = state.idCache[tmp8];
|
|
let tmp23 = tmp22;
|
|
if (null != tmp22) {
|
|
let tmp26 = tmp22;
|
|
} else {
|
|
let tmp24 = callback3;
|
|
let tmp25 = value;
|
|
tmp26 = callback3(state, tmp8);
|
|
}
|
|
let tmp27 = tmp26;
|
|
if (tmp26) {
|
|
let tmp28 = value;
|
|
let tmp29 = state.positions[tmp8];
|
|
let sizes = state.sizes;
|
|
let tmp30 = tmp26;
|
|
value = sizes.get(tmp27);
|
|
let tmp32 = value;
|
|
if (null != value) {
|
|
let tmp38 = value;
|
|
} else {
|
|
let tmp33 = callback4;
|
|
let tmp34 = tmp26;
|
|
let tmp35 = value;
|
|
let num = 0;
|
|
let tmp36 = addResult;
|
|
let tmp37 = tmp8;
|
|
tmp38 = callback4(addResult, tmp27, value, state.props.data[tmp8]);
|
|
}
|
|
let tmp40 = tmp29;
|
|
let tmp41 = undefined !== tmp29;
|
|
if (tmp41) {
|
|
let tmp42 = tmp29;
|
|
let tmp43 = tmp38;
|
|
tmp41 = addResult2 > tmp29 + tmp39 + 3 * arg3;
|
|
}
|
|
flag = tmp41;
|
|
}
|
|
}
|
|
let tmp49 = flag;
|
|
if (flag) {
|
|
let tmp50 = nextResult;
|
|
let arr = items.push(tmp2);
|
|
}
|
|
} else {
|
|
let tmp17 = index;
|
|
}
|
|
} else {
|
|
let stickyContainerPool = state.stickyContainerPool;
|
|
let tmp12 = nextResult;
|
|
let deleteResult = stickyContainerPool.delete(tmp2);
|
|
let tmp14 = v0;
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp15 = v0(addResult, "containerSticky" + tmp2, false);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
})(addResult, prop, addResult, tmp9, num30, items, isPinnedRenderIndex);
|
|
}
|
|
if (items.length > 0) {
|
|
const _Set4 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
addResult = items;
|
|
const set3 = new Set(items);
|
|
}
|
|
let num32 = 0;
|
|
let flag5 = false;
|
|
if (0 < addResult) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal8 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num32);
|
|
addResult = flag5;
|
|
addResult = undefined;
|
|
addResult = num32;
|
|
if (null != set3) {
|
|
addResult = set3.has(num32);
|
|
}
|
|
if (addResult) {
|
|
if (undefined !== addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set5 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = set2.add(num32);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[num32];
|
|
let num33 = 0;
|
|
if (null != addResult) {
|
|
num33 = addResult;
|
|
}
|
|
state.containerItemGenerations[num32] = num33 + 1;
|
|
}
|
|
let containerItemMetadata2 = state.containerItemMetadata;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = containerItemMetadata2.delete(num32);
|
|
let stickyContainerPool3 = state.stickyContainerPool;
|
|
if (stickyContainerPool3.has(num32)) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal9 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSticky" + num32, false);
|
|
let stickyContainerPool4 = addResult.stickyContainerPool;
|
|
addResult = stickyContainerPool4.delete(num32);
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal10 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + num32, undefined);
|
|
let _HermesInternal11 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + num32, undefined);
|
|
let _HermesInternal12 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + num32, undefined);
|
|
let _HermesInternal13 = HermesInternal;
|
|
addResult = outer1_32;
|
|
addResult = outer1_22(addResult, "containerPosition" + num32, outer1_32);
|
|
let _HermesInternal14 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerColumn" + num32, -1);
|
|
let _HermesInternal15 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSpan" + num32, 1);
|
|
addResult = flag5;
|
|
} else {
|
|
addResult = indexByKey.get(addResult);
|
|
addResult = flag5;
|
|
if (undefined !== addResult) {
|
|
addResult = outer1_88;
|
|
let obj3 = { scrollAdjustPending: null, updateLayout: true };
|
|
addResult = c10;
|
|
obj3[0] = c10;
|
|
let num35 = 0;
|
|
addResult = num32;
|
|
addResult = obj3;
|
|
addResult = outer1_88(addResult, addResult, addResult, obj3).didChangePosition || flag5;
|
|
}
|
|
}
|
|
num32 = num32 + 1;
|
|
flag5 = addResult;
|
|
} while (num32 < addResult);
|
|
}
|
|
addResult = set2;
|
|
if (set2) {
|
|
addResult = outer1_27;
|
|
}
|
|
if (addResult) {
|
|
addResult = outer1_87;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_87(containerItemKeys, set2);
|
|
}
|
|
if (!tmp13) {
|
|
addResult = outer1_84;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_84(containerItemKeys);
|
|
} else {
|
|
addResult = outer1_102;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_102(state, obj.startNoBuffer);
|
|
if (!queuedInitialLayout) {
|
|
if (!addResult.didContainersLayout) {
|
|
addResult = outer1_41;
|
|
addResult = outer1_77;
|
|
if (outer1_41(addResult)) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
} else {
|
|
addResult = addResult(addResult, addResult.startNoBuffer, addResult.endNoBuffer);
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = (function setDidLayout(containerItemKeys) {
|
|
containerItemKeys.state.queuedInitialLayout = true;
|
|
callback(containerItemKeys);
|
|
callback2(containerItemKeys, { didLayout: true });
|
|
})(containerItemKeys);
|
|
addResult = (function handleInitialScrollLayoutReady(containerItemKeys) {
|
|
let closure_0 = containerItemKeys;
|
|
if (containerItemKeys.state.initialScroll) {
|
|
callback6(containerItemKeys, { forceScroll: true });
|
|
const initialScrollSession = containerItemKeys.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(function runScroll() {
|
|
return outer1_76(closure_0, { forceScroll: true });
|
|
});
|
|
}
|
|
closure_0 = containerItemKeys;
|
|
const scrollingTo = containerItemKeys.state.scrollingTo;
|
|
{
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
}
|
|
})(containerItemKeys);
|
|
}
|
|
}
|
|
}
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
if (viewabilityConfigCallbackPairs) {
|
|
addResult = null !== obj.startNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = null !== obj.endNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
state = containerItemKeys.state;
|
|
({ startNoBuffer, endNoBuffer } = obj);
|
|
addResult = outer1_91;
|
|
if (null == addResult) {
|
|
addResult = obj.startNoBuffer;
|
|
}
|
|
if (null == addResult) {
|
|
addResult = obj.endNoBuffer;
|
|
}
|
|
addResult = state;
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
addResult = scrollLength;
|
|
addResult = startNoBuffer;
|
|
addResult = endNoBuffer;
|
|
addResult = addResult(state, addResult, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, addResult, addResult);
|
|
}
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != addResult) {
|
|
const call2 = addResult.call;
|
|
if (typeof call2 === "unknown") {
|
|
addResult = addResult();
|
|
} else {
|
|
addResult = call2(stickyState);
|
|
}
|
|
}
|
|
}
|
|
let tmp17 = outer1_25;
|
|
const tmp80 = outer1_89;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
}
|
|
if (!tmp14) {
|
|
tmp14 = tmp12 !== otherAxisSize2;
|
|
}
|
|
if (tmp14) {
|
|
obj = { height: null, width: null };
|
|
({ height: obj3[0], width: obj3[1] } = point);
|
|
context(tmp2, "scrollSize", obj);
|
|
}
|
|
let onLayout;
|
|
if (null != maintainScrollAtEnd) {
|
|
onLayout = maintainScrollAtEnd.onLayout;
|
|
}
|
|
if (onLayout) {
|
|
outer1_64(tmp2);
|
|
}
|
|
outer1_43(tmp2);
|
|
if (!state) {
|
|
let tmp34 = callback;
|
|
let tmp35 = callback;
|
|
if (callback) {
|
|
tmp35 = 0 === tmp11;
|
|
}
|
|
if (tmp35) {
|
|
if (state.props.horizontal) {
|
|
str = "width";
|
|
}
|
|
const _HermesInternal = HermesInternal;
|
|
const combined = "List " + str + " is 0. You may need to set a style or `flex: ` for the list, because children are absolutely positioned.";
|
|
if (tmp34) {
|
|
tmp34 = !outer1_53.has("height0");
|
|
}
|
|
if (tmp34) {
|
|
outer1_53.add("height0");
|
|
const _console = console;
|
|
const _HermesInternal2 = HermesInternal;
|
|
console.warn("[legend-list] " + combined);
|
|
}
|
|
}
|
|
} else {
|
|
let props2 = state.props;
|
|
if (state.props.horizontal) {
|
|
props2 = state.props.stylePaddingBottom || 0;
|
|
let sum = (props2.stylePaddingTop || 0) + props2;
|
|
const tmp33 = props2.stylePaddingTop || 0;
|
|
} else {
|
|
sum = (props2.stylePaddingLeft || 0) + (state.props.stylePaddingRight || 0);
|
|
const tmp30 = props2.stylePaddingLeft || 0;
|
|
const tmp31 = state.props.stylePaddingRight || 0;
|
|
}
|
|
state.needsOtherAxisSize = tmp12 - sum < 10;
|
|
}
|
|
}
|
|
closure_20(true);
|
|
outer1_103(context);
|
|
let tmp45 = closure_18;
|
|
if (closure_18) {
|
|
tmp45 = !arg1;
|
|
}
|
|
if (tmp45) {
|
|
tmp45 = tmp43;
|
|
}
|
|
if (tmp45) {
|
|
const state2 = tmp2.state;
|
|
({ initialScroll, initialScrollSession } = state2);
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("bootstrap" === kind) {
|
|
const bootstrap = state2.initialScrollSession.bootstrap;
|
|
}
|
|
if (initialScroll) {
|
|
if (state2.props.data.length > 0) {
|
|
const initialScrollSession2 = state2.initialScrollSession;
|
|
let kind1;
|
|
if (null != initialScrollSession2) {
|
|
kind1 = initialScrollSession2.kind;
|
|
}
|
|
if ("offset" !== kind1) {
|
|
if (bootstrap) {
|
|
const tmp51 = outer1_75(tmp2, initialScroll);
|
|
const scrollingTo = state2.scrollingTo;
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
if (isInitialScroll) {
|
|
const scrollingTo2 = state2.scrollingTo;
|
|
}
|
|
if (!bootstrap) {
|
|
if (scrollingTo2) {
|
|
let offset = scrollingTo2.targetOffset;
|
|
if (null == offset) {
|
|
offset = scrollingTo2.offset;
|
|
}
|
|
let tmp54 = offset;
|
|
} else {
|
|
current = state2.refScroller.current;
|
|
let prop;
|
|
if (null != current) {
|
|
prop = current.getCurrentScrollOffset;
|
|
}
|
|
if (null == prop) {
|
|
if (typeof tmp54 !== "number") {
|
|
let scroll = state2.scrollPending;
|
|
if (null == scroll) {
|
|
scroll = state2.scroll;
|
|
}
|
|
let num4 = 0;
|
|
if (null != scroll) {
|
|
num4 = scroll;
|
|
}
|
|
tmp54 = num4;
|
|
} else {
|
|
const _Number = Number;
|
|
}
|
|
} else {
|
|
const call = prop.call;
|
|
typeof call === "unknown" ? prop() : call(current);
|
|
}
|
|
}
|
|
const diff = tmp51 - tmp54;
|
|
let _Math = Math;
|
|
if (Math.abs(diff) > 1) {
|
|
if (state2.didFinishInitialScroll) {
|
|
if (undefined !== outer1_83(tmp2)) {
|
|
obj1 = {};
|
|
stickyHeaderIndices = tmp2;
|
|
state3 = tmp2.state;
|
|
state3.preservedEndAnchorCorrection = obj1;
|
|
let _requestAnimationFrame = requestAnimationFrame;
|
|
let animationFrame = requestAnimationFrame(() => {
|
|
const preservedEndAnchorCorrection = state.preservedEndAnchorCorrection;
|
|
if (preservedEndAnchorCorrection === obj1) {
|
|
const tmp10 = outer1_83(closure_0);
|
|
if (undefined !== tmp10) {
|
|
const _Math = Math;
|
|
if (Math.abs(tmp10) > 1) {
|
|
const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime;
|
|
let tmp4 = !lastRequestTime;
|
|
if (lastRequestTime) {
|
|
const lastNativeScrollTime = tmp.lastNativeScrollTime;
|
|
let num = 0;
|
|
if (null != lastNativeScrollTime) {
|
|
num = lastNativeScrollTime;
|
|
}
|
|
tmp4 = num > preservedEndAnchorCorrection.lastRequestTime;
|
|
}
|
|
if (tmp4) {
|
|
const _Date = Date;
|
|
preservedEndAnchorCorrection.lastRequestTime = Date.now();
|
|
outer1_65(tmp9, tmp10);
|
|
}
|
|
closure_0 = tmp9;
|
|
state = tmp9.state;
|
|
state.preservedEndAnchorCorrection = tmp2;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const preservedEndAnchorCorrection = state.preservedEndAnchorCorrection;
|
|
if (preservedEndAnchorCorrection === obj1) {
|
|
const tmp10 = outer1_83(closure_0);
|
|
if (undefined !== tmp10) {
|
|
const _Math = Math;
|
|
if (Math.abs(tmp10) > 1) {
|
|
const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime;
|
|
let tmp4 = !lastRequestTime;
|
|
if (lastRequestTime) {
|
|
const lastNativeScrollTime = tmp.lastNativeScrollTime;
|
|
let num = 0;
|
|
if (null != lastNativeScrollTime) {
|
|
num = lastNativeScrollTime;
|
|
}
|
|
tmp4 = num > preservedEndAnchorCorrection.lastRequestTime;
|
|
}
|
|
if (tmp4) {
|
|
const _Date = Date;
|
|
preservedEndAnchorCorrection.lastRequestTime = Date.now();
|
|
outer1_65(tmp9, tmp10);
|
|
}
|
|
closure_0 = tmp9;
|
|
state = tmp9.state;
|
|
state.preservedEndAnchorCorrection = tmp2;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => {
|
|
const preservedEndAnchorCorrection = state.preservedEndAnchorCorrection;
|
|
if (preservedEndAnchorCorrection === obj1) {
|
|
const tmp10 = outer1_83(closure_0);
|
|
if (undefined !== tmp10) {
|
|
const _Math = Math;
|
|
if (Math.abs(tmp10) > 1) {
|
|
const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime;
|
|
let tmp4 = !lastRequestTime;
|
|
if (lastRequestTime) {
|
|
const lastNativeScrollTime = tmp.lastNativeScrollTime;
|
|
let num = 0;
|
|
if (null != lastNativeScrollTime) {
|
|
num = lastNativeScrollTime;
|
|
}
|
|
tmp4 = num > preservedEndAnchorCorrection.lastRequestTime;
|
|
}
|
|
if (tmp4) {
|
|
const _Date = Date;
|
|
preservedEndAnchorCorrection.lastRequestTime = Date.now();
|
|
outer1_65(tmp9, tmp10);
|
|
}
|
|
closure_0 = tmp9;
|
|
state = tmp9.state;
|
|
state.preservedEndAnchorCorrection = tmp2;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(() => { ... });
|
|
}
|
|
}
|
|
tmp.preservedEndAnchorCorrection = undefined;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
tmp.preservedEndAnchorCorrection = undefined;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
tmp.preservedEndAnchorCorrection = undefined;
|
|
}
|
|
});
|
|
}
|
|
} else if (scrollingTo2) {
|
|
value = outer1_37.get(state2);
|
|
scrollingTo2.offset = tmp51;
|
|
scrollingTo2.targetOffset = tmp51;
|
|
const obj2 = {};
|
|
const merged1 = Object.assign(initialScroll);
|
|
obj2.contentOffset = tmp51;
|
|
state2.initialScroll = obj2;
|
|
state2.hasScrolled = false;
|
|
let startScroll;
|
|
if (null != value) {
|
|
startScroll = value.startScroll;
|
|
}
|
|
if (null == startScroll) {
|
|
startScroll = state2.scroll;
|
|
}
|
|
const obj3 = { startScroll: null, targetOffset: null };
|
|
obj3[0] = startScroll;
|
|
obj3[1] = tmp51;
|
|
const result = outer1_37.set(state2, obj3);
|
|
outer1_65(tmp2, diff);
|
|
}
|
|
}
|
|
}
|
|
const obj4 = { scroll: null, targetIndexSeed: null };
|
|
obj4[0] = tmp51;
|
|
obj4[1] = initialScroll.index;
|
|
outer1_80(tmp2, obj4);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (!closure_18) {
|
|
outer1_76(tmp2);
|
|
}
|
|
}, items14);
|
|
obj17[1] = onLayout;
|
|
obj17[2] = ref;
|
|
stickyHeaderIndices = undefined;
|
|
horizontal = undefined;
|
|
context = undefined;
|
|
onScroll = undefined;
|
|
({ ref: stickyHeaderIndices, measureInLayoutEffect } = obj17);
|
|
if (measureInLayoutEffect === undefined) {
|
|
measureInLayoutEffect = true;
|
|
}
|
|
horizontal = measureInLayoutEffect;
|
|
const onLayoutProp = obj17.onLayoutProp;
|
|
context = onLayoutProp;
|
|
const onLayoutChange = obj17.onLayoutChange;
|
|
onScroll = onLayoutChange;
|
|
const items15 = [onLayoutChange, onLayoutProp];
|
|
callback = closure_27;
|
|
callback = obj22.useCallback((nativeEvent) => {
|
|
onScroll(nativeEvent.nativeEvent.layout, false);
|
|
if (null != context) {
|
|
context(nativeEvent);
|
|
}
|
|
}, items15);
|
|
if (closure_27) {
|
|
const items16 = [measureInLayoutEffect];
|
|
callback = items16;
|
|
callback = HermesBuiltin.arraySpread([], 1);
|
|
callback = obj22.useLayoutEffect(() => {
|
|
let current = horizontal;
|
|
if (horizontal) {
|
|
current = stickyHeaderIndices.current;
|
|
}
|
|
if (current) {
|
|
const current2 = stickyHeaderIndices.current;
|
|
current2.measure((arg0, arg1, width, height) => {
|
|
callback({ height, width, x: arg0, y: arg1 }, true);
|
|
});
|
|
}
|
|
}, items16);
|
|
}
|
|
callback = ref;
|
|
const items17 = [snapToIndices];
|
|
callback = obj.useLayoutEffect(() => {
|
|
let data;
|
|
let keyExtractor;
|
|
if (snapToIndices) {
|
|
const state = context.state;
|
|
snapToIndices = state.props.snapToIndices;
|
|
if (state.props.horizontal) {
|
|
const tmp2 = ref(tmp);
|
|
}
|
|
const _Array = Array;
|
|
const ArrayResult = Array(snapToIndices.length);
|
|
for (let num4 = 0; num4 < snapToIndices.length; num4 = num4 + 1) {
|
|
let tmp6 = snapToIndices[num4];
|
|
({ data, keyExtractor } = state.props);
|
|
let tmp7 = num4;
|
|
if (data) {
|
|
let tmp8 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp8 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp8;
|
|
}
|
|
let tmp10 = obj2;
|
|
ArrayResult[num4] = obj2(state, state.positions[tmp6], tmp2);
|
|
}
|
|
context(context, "snapToOffsets", ArrayResult);
|
|
}
|
|
}, items17);
|
|
const items18 = [dataKey, dataVersion, memo1.join(","), num4, num15, tmp39, tmp38, tmp15];
|
|
callback = obj.useLayoutEffect(() => {
|
|
initializeStateVars(true);
|
|
}, items18);
|
|
const items19 = [data, dataKey, dataVersion, num4, num15];
|
|
callback = obj.useLayoutEffect(() => {
|
|
let didColumnsChange;
|
|
let didDataChange;
|
|
({ didColumnsChange, didDataChange } = current);
|
|
let data = current.props.data;
|
|
let isFirst = data.length > 0;
|
|
if (isFirst) {
|
|
isFirst = outer1_133(context);
|
|
}
|
|
if (!isFirst) {
|
|
isFirst = current.isFirst;
|
|
}
|
|
if (!isFirst) {
|
|
let tmp8 = !didDataChange;
|
|
if (!didDataChange) {
|
|
tmp8 = !didColumnsChange;
|
|
}
|
|
isFirst = tmp8;
|
|
}
|
|
if (!isFirst) {
|
|
let obj = { didColumnsChange: null };
|
|
obj[0] = didColumnsChange;
|
|
let flag = obj.didColumnsChange;
|
|
if (flag === undefined) {
|
|
flag = false;
|
|
}
|
|
let state = tmp9.state;
|
|
const previousData = state.previousData;
|
|
const maintainScrollAtEnd = state.props.maintainScrollAtEnd;
|
|
if (flag) {
|
|
let sizes = state.sizes;
|
|
sizes.clear();
|
|
const sizesKnown = state.sizesKnown;
|
|
sizesKnown.clear();
|
|
current(state);
|
|
for (const key10030 in state.averageSizes) {
|
|
let tmp23 = key10030;
|
|
let averageSizes = state.averageSizes;
|
|
delete tmp3[tmp4];
|
|
continue;
|
|
}
|
|
state.minIndexSizeChanged = 0;
|
|
state.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
const stickyHeaderIndices = tmp9;
|
|
let closure_1 = { dataChanged: true, doMVCP: true };
|
|
state = tmp9.state;
|
|
outer1_97(() => {
|
|
let alwaysRenderIndicesArr;
|
|
let bottom;
|
|
let closure_4;
|
|
let dataChanged;
|
|
let doMVCP;
|
|
let enableScrollForNextCalculateItemsInView;
|
|
let endNoBuffer;
|
|
let forceFullItemPositions;
|
|
let getItemType;
|
|
let idCache;
|
|
let indexByKey;
|
|
let initialScroll;
|
|
let keyExtractor;
|
|
let minIndexSizeChanged;
|
|
let positions;
|
|
let props;
|
|
let queuedInitialLayout;
|
|
let scrollForNextCalculateItemsInView;
|
|
let scrollLength;
|
|
let set2;
|
|
let sizes;
|
|
let startBufferedId;
|
|
let startNoBuffer;
|
|
let state;
|
|
let top;
|
|
let viewabilityConfigCallbackPairs;
|
|
let addResult = state;
|
|
let containerItemKeys = state.containerItemKeys;
|
|
({ enableScrollForNextCalculateItemsInView, idCache } = state);
|
|
({ indexByKey, minIndexSizeChanged, positions, props } = state);
|
|
({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props);
|
|
({ keyExtractor, onStickyHeaderChange: closure_4 } = props);
|
|
({ scrollForNextCalculateItemsInView, scrollLength } = state);
|
|
({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state);
|
|
const data = state.props.data;
|
|
let prop = state.props.stickyHeaderIndicesArr;
|
|
if (!prop) {
|
|
prop = [];
|
|
}
|
|
let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet;
|
|
if (!stickyHeaderIndicesSet) {
|
|
let _Set = Set;
|
|
stickyHeaderIndicesSet = new Set();
|
|
}
|
|
let tmp9 = outer1_46(containerItemKeys, idCache.drawDistanceMode);
|
|
({ dataChanged, doMVCP, forceFullItemPositions } = idCache);
|
|
let initialScrollSession = tmp2.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
let bootstrap;
|
|
if ("bootstrap" === kind) {
|
|
bootstrap = tmp2.initialScrollSession.bootstrap;
|
|
}
|
|
let tmp16 = outer1_21(containerItemKeys, "numContainers");
|
|
if (data) {
|
|
if (0 !== scrollLength) {
|
|
if (tmp16) {
|
|
let closure_8 = outer1_25(tmp7);
|
|
let tmp15Result = tmp15(tmp7, "stylePaddingTop");
|
|
let sum = tmp15Result + tmp15(tmp7, "alignItemsAtEndPadding");
|
|
let closure_9 = sum + tmp15(tmp7, "headerSize");
|
|
tmp15Result = tmp15(tmp7, "numColumns");
|
|
let scrollVelocity = idCache.scrollVelocity;
|
|
if (null == scrollVelocity) {
|
|
scrollVelocity = outer1_69(tmp2);
|
|
}
|
|
({ initialScroll, queuedInitialLayout } = tmp2);
|
|
if (!tmp13) {
|
|
let scroll;
|
|
if (null != bootstrap) {
|
|
scroll = bootstrap.scroll;
|
|
}
|
|
if (null == scroll) {
|
|
scroll = tmp2.scroll;
|
|
}
|
|
} else {
|
|
if (!queuedInitialLayout) {
|
|
if (outer1_41(tmp2)) {
|
|
if (initialScroll) {
|
|
scroll = outer1_75(tmp7, initialScroll);
|
|
}
|
|
}
|
|
}
|
|
scroll = tmp2.scroll;
|
|
}
|
|
let c10 = 0;
|
|
let c11 = 0;
|
|
let c12 = 0;
|
|
let c13 = 0;
|
|
let c14 = 0;
|
|
let c15 = 0;
|
|
function updateScroll2(scroll) {
|
|
let closure_16 = scroll;
|
|
const values = containerItemKeys.values;
|
|
const value = values.get("scrollAdjustPending");
|
|
let num = 0;
|
|
if (null != value) {
|
|
num = value;
|
|
}
|
|
let closure_11 = num - closure_9;
|
|
const rounded = Math.round(scroll + closure_11);
|
|
let closure_12 = rounded;
|
|
if (rounded + scrollLength > closure_8) {
|
|
const _Math = Math;
|
|
closure_12 = Math.max(0, tmp4 - tmp3);
|
|
}
|
|
}
|
|
updateScroll2(scroll);
|
|
const tmp15Result1 = tmp15(tmp7, "activeStickyIndex");
|
|
let closure_17 = tmp15Result1;
|
|
function resolveStickyState() {
|
|
let num = -1;
|
|
let num2 = -1;
|
|
if (prop.length > 0) {
|
|
let diff = arr.length - 1;
|
|
let tmp5 = num;
|
|
if (0 <= diff) {
|
|
while (true) {
|
|
let tmp6 = tmp3[arr[diff]];
|
|
let tmp7 = diff;
|
|
if (undefined === tmp6) {
|
|
diff = diff - 1;
|
|
tmp5 = num;
|
|
if (0 > diff) {
|
|
break;
|
|
}
|
|
} else {
|
|
tmp5 = diff;
|
|
if (tmp >= tmp6) {
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
num2 = tmp5;
|
|
}
|
|
if (0 <= num2) {
|
|
num = arr[num2];
|
|
}
|
|
let tmp8 = num2 >= 0;
|
|
if (0 > num2) {
|
|
tmp8 = tmp9 >= 0;
|
|
}
|
|
if (tmp8) {
|
|
outer2_22(containerItemKeys, "activeStickyIndex", num);
|
|
}
|
|
let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null };
|
|
let fn;
|
|
if (closure_4) {
|
|
if (arr.length > 0) {
|
|
if (tmp9 !== num) {
|
|
fn = () => {
|
|
if (undefined !== outer1_6[num]) {
|
|
if (null != outer1_4) {
|
|
const obj = { index: null, item: null };
|
|
obj[0] = tmp;
|
|
obj[1] = tmp2;
|
|
tmp3(obj);
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|
|
obj[1] = fn;
|
|
return obj;
|
|
}
|
|
if (!dataChanged) {
|
|
let stickyState = resolveStickyState();
|
|
}
|
|
let result2 = tmp9;
|
|
let result3 = tmp9;
|
|
if (scrollVelocity > 0) {
|
|
let result = 0.5 * tmp9;
|
|
result2 = result;
|
|
const result1 = 1.5 * tmp9;
|
|
result3 = result1;
|
|
result3 = result1;
|
|
result2 = result;
|
|
} else {
|
|
if (0 === scrollVelocity) {
|
|
let _Math = Math;
|
|
}
|
|
result2 = 1.5 * tmp9;
|
|
result3 = 0.5 * tmp9;
|
|
}
|
|
let num6 = 0;
|
|
if (!dataChanged) {
|
|
num6 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num6 = 0;
|
|
if (!tmp25) {
|
|
num6 = 0;
|
|
if (!outer1_41(tmp2)) {
|
|
num6 = 0;
|
|
if (!tmp2.scrollingTo) {
|
|
num6 = 0;
|
|
if (!tmp2.pendingNativeMVCPAdjust) {
|
|
num6 = 0;
|
|
if (tmp15(tmp7, "readyToRender")) {
|
|
let _Math2 = Math;
|
|
num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) {
|
|
if (arg1 <= 0) {
|
|
return 0;
|
|
} else {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const bound = Math.min(1, Math.abs(scrollVelocity) / 4);
|
|
return Math.sign(scrollVelocity) * arg1 * bound;
|
|
}
|
|
})(scrollVelocity, Math.min(result2, result3));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function updateScrollRange() {
|
|
const bound = Math.max(0, c12);
|
|
let closure_14 = Math.max(bound, c12 + scrollLength + Math.max(0, -scroll));
|
|
let closure_13 = bound - result2 + num6;
|
|
let closure_15 = closure_14 + result3 + num6;
|
|
}
|
|
updateScrollRange();
|
|
if (0 !== num6) {
|
|
(function scheduleRenderRangeProjectionSettle(state) {
|
|
state = state.state;
|
|
const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle;
|
|
if (undefined !== timeoutRenderRangeProjectionSettle) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(timeoutRenderRangeProjectionSettle);
|
|
let timeouts = state.timeouts;
|
|
timeouts.delete(timeoutRenderRangeProjectionSettle);
|
|
}
|
|
const timerId = setTimeout(() => {
|
|
state.timeoutRenderRangeProjectionSettle = undefined;
|
|
const timeouts = state.timeouts;
|
|
timeouts.delete(timerId);
|
|
state.scrollHistory.length = 0;
|
|
const triggerCalculateItemsInView = state.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView();
|
|
} else {
|
|
call(state);
|
|
}
|
|
}
|
|
}, 100);
|
|
state.timeoutRenderRangeProjectionSettle = timerId;
|
|
const timeouts2 = state.timeouts;
|
|
timeouts2.add(timerId);
|
|
})(tmp7);
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
if (!tmp25) {
|
|
if (!dataChanged) {
|
|
if (!forceFullItemPositions) {
|
|
if (scrollForNextCalculateItemsInView) {
|
|
({ top, bottom } = scrollForNextCalculateItemsInView);
|
|
if (null === top) {
|
|
if (null === bottom) {
|
|
tmp2.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}
|
|
if (null === top) {
|
|
if (viewabilityConfigCallbackPairs) {
|
|
(function updateViewabilityForCachedRange(state, viewabilityConfigCallbackPairs, scrollLength, c12, c14) {
|
|
let data;
|
|
let data2;
|
|
let keyExtractor;
|
|
let keyExtractor2;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
let tmp7 = null;
|
|
let sum1;
|
|
let tmp9 = null;
|
|
if (startBuffered <= endBuffered) {
|
|
let tmp3 = null;
|
|
let tmp5 = null;
|
|
let tmp6 = startBuffered;
|
|
tmp7 = null;
|
|
tmp9 = null;
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp10 = tmp[tmp6];
|
|
let tmp11 = tmp3;
|
|
let tmp12 = tmp4;
|
|
let tmp13 = tmp5;
|
|
let tmp14 = tmp6;
|
|
if (null == tmp10) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str2 = "";
|
|
if (data) {
|
|
let tmp15 = null;
|
|
if (tmp6 < data.length) {
|
|
let keyExtractorResult = tmp6;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp6], tmp6);
|
|
}
|
|
tmp15 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp6] = tmp15;
|
|
str2 = tmp15;
|
|
}
|
|
tmp10 = str2;
|
|
}
|
|
let value = sizes.get(tmp10);
|
|
if (null == value) {
|
|
let tmp19 = callback4;
|
|
let num2 = 0;
|
|
let tmp20 = state;
|
|
let tmp21 = tmp10;
|
|
let tmp22 = tmp6;
|
|
value = callback4(state, tmp18, tmp14, data[tmp6]);
|
|
}
|
|
let tmp23 = tmp2[tmp6];
|
|
let tmp24 = null === tmp11 && tmp23 + value > c12;
|
|
if (tmp24) {
|
|
tmp11 = tmp6;
|
|
}
|
|
let tmp25 = undefined === tmp12 && tmp23 >= c12 - 10 && tmp23 <= c14;
|
|
if (tmp25) {
|
|
tmp12 = tmp6;
|
|
}
|
|
let tmp26 = tmp13;
|
|
let flag = false;
|
|
if (null !== tmp11) {
|
|
let flag2 = true;
|
|
if (tmp23 <= c14) {
|
|
tmp13 = tmp6;
|
|
flag2 = false;
|
|
}
|
|
tmp26 = tmp13;
|
|
flag = flag2;
|
|
}
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (flag) {
|
|
break;
|
|
} else {
|
|
let sum = tmp6 + 1;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
if (sum > endBuffered) {
|
|
break;
|
|
} else {
|
|
tmp3 = tmp11;
|
|
tmp4 = tmp12;
|
|
tmp5 = tmp26;
|
|
tmp7 = tmp11;
|
|
sum1 = tmp12;
|
|
tmp9 = tmp26;
|
|
tmp6 = sum;
|
|
if (sum >= data.length) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
const obj = { endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startNoBuffer: null };
|
|
obj[0] = tmp9;
|
|
obj[1] = sum1;
|
|
if (null == sum1) {
|
|
sum1 = tmp7;
|
|
}
|
|
const items = [];
|
|
if (null != sum1) {
|
|
if (null !== tmp9) {
|
|
if (sum1 <= tmp9) {
|
|
do {
|
|
let tmp29 = state.idCache[sum1];
|
|
let tmp30 = sum1;
|
|
if (null == tmp29) {
|
|
({ data: data2, keyExtractor: keyExtractor2 } = state.props);
|
|
let str4 = "";
|
|
if (data2) {
|
|
let tmp31 = null;
|
|
if (sum1 < data2.length) {
|
|
let keyExtractor2Result = sum1;
|
|
if (keyExtractor2) {
|
|
keyExtractor2Result = keyExtractor2(data2[sum1], sum1);
|
|
}
|
|
tmp31 = keyExtractor2Result;
|
|
}
|
|
state.idCache[sum1] = tmp31;
|
|
str4 = tmp31;
|
|
}
|
|
tmp29 = str4;
|
|
}
|
|
let arr = items.push(tmp29);
|
|
sum1 = sum1 + 1;
|
|
} while (sum1 <= tmp9);
|
|
}
|
|
}
|
|
}
|
|
obj[2] = items;
|
|
obj[3] = tmp7;
|
|
const merged = Object.assign(state, obj);
|
|
callback9(state, tmp7);
|
|
if (tmp37) {
|
|
callback7(state, state, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered);
|
|
}
|
|
tmp37 = null !== tmp7 && null !== tmp9;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})(tmp7, viewabilityConfigCallbackPairs, scrollLength, c12, c14);
|
|
} else if (tmp2.props.onFirstVisibleItemChanged) {
|
|
outer1_102(tmp2, (function findFirstVisibleIndexInCachedRange(state, c12) {
|
|
let data;
|
|
let keyExtractor;
|
|
let sizes;
|
|
let startBuffered;
|
|
state = state.state;
|
|
const endBuffered = state.endBuffered;
|
|
data = state.props.data;
|
|
({ sizes, startBuffered } = state);
|
|
if (null !== startBuffered) {
|
|
if (null !== endBuffered) {
|
|
if (startBuffered >= 0) {
|
|
if (endBuffered >= startBuffered) {
|
|
if (startBuffered <= endBuffered) {
|
|
if (startBuffered < data.length) {
|
|
while (true) {
|
|
let tmp3 = tmp[startBuffered];
|
|
let tmp4 = startBuffered;
|
|
if (null == tmp3) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp5 = null;
|
|
if (startBuffered < data.length) {
|
|
let keyExtractorResult = startBuffered;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[startBuffered], startBuffered);
|
|
}
|
|
tmp5 = keyExtractorResult;
|
|
}
|
|
state.idCache[startBuffered] = tmp5;
|
|
str = tmp5;
|
|
}
|
|
tmp3 = str;
|
|
}
|
|
let value = sizes.get(tmp3);
|
|
let tmp9 = value;
|
|
if (null == value) {
|
|
let tmp10 = callback4;
|
|
let num = 0;
|
|
let tmp11 = state;
|
|
let tmp12 = tmp3;
|
|
let tmp13 = startBuffered;
|
|
tmp9 = callback4(state, tmp8, tmp4, data[startBuffered]);
|
|
}
|
|
if (tmp2[startBuffered] + tmp9 > c12) {
|
|
break;
|
|
} else {
|
|
let sum = startBuffered + 1;
|
|
if (sum <= endBuffered) {
|
|
startBuffered = sum;
|
|
}
|
|
}
|
|
}
|
|
return startBuffered;
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
})(tmp7, c12));
|
|
}
|
|
let prop1;
|
|
if (null != stickyState) {
|
|
prop1 = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != prop1) {
|
|
let call = prop1.call;
|
|
typeof call === "unknown" ? prop1() : call(stickyState);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let tmp73;
|
|
if (doMVCP) {
|
|
if (!tmp25) {
|
|
tmp73 = outer1_68(tmp7, dataChanged);
|
|
}
|
|
}
|
|
if (dataChanged) {
|
|
outer1_86(tmp2);
|
|
}
|
|
let num8 = 0;
|
|
if (!forceFullItemPositions) {
|
|
num8 = 0;
|
|
if (!dataChanged) {
|
|
let startBuffered = minIndexSizeChanged;
|
|
if (null == minIndexSizeChanged) {
|
|
startBuffered = tmp2.startBuffered;
|
|
}
|
|
let num9 = 0;
|
|
if (null != startBuffered) {
|
|
num9 = startBuffered;
|
|
}
|
|
num8 = num9;
|
|
}
|
|
}
|
|
let obj = { doMVCP: null, forceFullUpdate: null, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null };
|
|
obj[0] = doMVCP;
|
|
obj[1] = forceFullItemPositions;
|
|
let tmp82 = !forceFullItemPositions;
|
|
if (!forceFullItemPositions) {
|
|
tmp82 = !dataChanged;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = tmp15Result > 1;
|
|
}
|
|
if (tmp82) {
|
|
tmp82 = undefined !== minIndexSizeChanged;
|
|
}
|
|
obj[2] = tmp82;
|
|
obj[3] = c15;
|
|
obj[4] = scrollVelocity;
|
|
obj[5] = num8;
|
|
outer1_89(tmp7, dataChanged, obj);
|
|
const tmp17Result = outer1_25(tmp7);
|
|
closure_8 = tmp17Result;
|
|
if (undefined !== minIndexSizeChanged) {
|
|
tmp2.minIndexSizeChanged = undefined;
|
|
}
|
|
if (dataChanged) {
|
|
if (doMVCP) {
|
|
if (tmp2.props.maintainVisibleContentPosition.data) {
|
|
if (tmp2.didContainersLayout) {
|
|
if (tmp2.idsInView.length > 0) {
|
|
const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition;
|
|
const _Set2 = Set;
|
|
let set = new Set();
|
|
const idsInView = tmp2.idsInView;
|
|
for (const item10226 of idsInView) {
|
|
let tmp99 = item10226;
|
|
addResult = indexByKey.get(item10226);
|
|
if (undefined !== addResult) {
|
|
addResult = shouldRestorePosition;
|
|
if (shouldRestorePosition) {
|
|
addResult = !shouldRestorePosition(data[addResult], addResult, data);
|
|
}
|
|
if (!addResult) {
|
|
addResult = item10226;
|
|
addResult = set.add(tmp99);
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_21(containerItemKeys, "scrollAdjustPending");
|
|
let num11 = 0;
|
|
if (null != addResult) {
|
|
num11 = addResult;
|
|
}
|
|
if (null != tmp73) {
|
|
addResult = tmp73();
|
|
}
|
|
addResult = tmp73;
|
|
if (addResult) {
|
|
addResult = addResult.scroll !== state.scroll;
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, "scrollAdjustPending");
|
|
let num12 = 0;
|
|
if (null != addResult) {
|
|
num12 = addResult;
|
|
}
|
|
addResult = num12 !== num11;
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = updateScroll2(addResult.scroll);
|
|
addResult = updateScrollRange();
|
|
}
|
|
if (dataChanged) {
|
|
stickyState = resolveStickyState();
|
|
}
|
|
addResult = undefined;
|
|
if (!tmp13) {
|
|
addResult = undefined;
|
|
if (null != bootstrap) {
|
|
addResult = bootstrap.targetIndexSeed;
|
|
}
|
|
}
|
|
if (null == addResult) {
|
|
let num13 = !dataChanged;
|
|
if (!dataChanged) {
|
|
num13 = startBufferedId;
|
|
}
|
|
if (num13) {
|
|
num13 = indexByKey.get(startBufferedId);
|
|
}
|
|
if (!num13) {
|
|
num13 = 0;
|
|
}
|
|
addResult = num13;
|
|
}
|
|
if (addResult >= 0) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num14 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = c13;
|
|
if (positions[addResult] + addResult <= c13) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (addResult < 0) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (tmp15Result > 1) {
|
|
if (addResult > 0) {
|
|
addResult = state.columns[addResult];
|
|
while (1 !== addResult) {
|
|
if (undefined === addResult) {
|
|
break;
|
|
} else {
|
|
addResult = addResult - 1;
|
|
if (0 >= addResult) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = globalThis;
|
|
let num16 = 0;
|
|
let num17 = 0;
|
|
let num18 = 0;
|
|
if (0 < tmp16) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num16);
|
|
addResult = num16;
|
|
addResult = num17;
|
|
addResult = num17;
|
|
if (undefined !== addResult) {
|
|
let _Math3 = Math;
|
|
addResult = Math.max(num17, indexByKey.get(addResult));
|
|
}
|
|
num16 = num16 + 1;
|
|
num17 = addResult;
|
|
num18 = addResult;
|
|
} while (num16 < tmp16);
|
|
}
|
|
obj = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: true };
|
|
const length = data.length;
|
|
let _Math4 = Math;
|
|
addResult = Math.max(0, addResult);
|
|
let flag3 = false;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
addResult = null;
|
|
if (addResult < length) {
|
|
while (true) {
|
|
addResult = idCache[addResult];
|
|
addResult = flag3;
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = sizes.get(addResult);
|
|
if (null == addResult) {
|
|
addResult = outer1_58;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let num19 = 0;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_58(containerItemKeys, addResult, addResult, data[addResult]);
|
|
}
|
|
addResult = positions[addResult];
|
|
addResult = flag3;
|
|
if (!flag3) {
|
|
addResult = outer1_100;
|
|
addResult = c12;
|
|
addResult = c14;
|
|
let num20 = 0;
|
|
addResult = obj;
|
|
addResult = outer1_100(obj, addResult, addResult, addResult, c12, c14);
|
|
addResult = null === addResult;
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = addResult + addResult > c13;
|
|
}
|
|
if (addResult) {
|
|
addResult = c13;
|
|
addResult = null;
|
|
}
|
|
addResult = flag3;
|
|
if (null !== obj.startNoBuffer) {
|
|
addResult = c15;
|
|
let flag4 = true;
|
|
if (addResult <= c15) {
|
|
addResult = c15;
|
|
addResult = null;
|
|
if (c15 <= tmp17Result) {
|
|
addResult = addResult + addResult;
|
|
}
|
|
flag4 = flag3;
|
|
}
|
|
addResult = flag4;
|
|
}
|
|
}
|
|
addResult = addResult + 1;
|
|
if (addResult >= length) {
|
|
break;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (!addResult) {
|
|
continue;
|
|
} else {
|
|
flag3 = addResult;
|
|
if (addResult > num18) {
|
|
break;
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
const _Object = Object;
|
|
let obj1 = { endBuffered: null, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null };
|
|
obj1[0] = addResult;
|
|
({ endNoBuffer: obj5[1], firstFullyOnScreenIndex: obj5[2] } = obj);
|
|
addResult = outer1_101;
|
|
addResult = state;
|
|
addResult = state;
|
|
obj1[3] = outer1_101(state, obj);
|
|
obj1[4] = addResult;
|
|
obj1[5] = addResult;
|
|
obj1[6] = obj.startNoBuffer;
|
|
addResult = Object.assign(state, obj1);
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
enableScrollForNextCalculateItemsInView = undefined !== addResult;
|
|
}
|
|
if (enableScrollForNextCalculateItemsInView) {
|
|
addResult = outer1_54;
|
|
if (!outer1_54(addResult)) {
|
|
let obj2 = { bottom: null, top: null };
|
|
obj2[0] = addResult;
|
|
obj2[1] = addResult;
|
|
addResult = obj2;
|
|
}
|
|
addResult.scrollForNextCalculateItemsInView = addResult;
|
|
}
|
|
addResult = tmp16;
|
|
let items = [];
|
|
if (dataChanged) {
|
|
for (let num21 = 0; num21 < addResult; num21 = num21 + 1) {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal2 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num21);
|
|
addResult = !keyExtractor;
|
|
addResult = num21;
|
|
if (keyExtractor) {
|
|
if (addResult) {
|
|
addResult = undefined === indexByKey.get(addResult);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = items.push(num21);
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const scrollTargetPinnedRange = state.scrollTargetPinnedRange;
|
|
let c22 = 0;
|
|
let c23 = -1;
|
|
let num23 = -1;
|
|
let num24 = 0;
|
|
if (scrollTargetPinnedRange) {
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
addResult = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c22 = addResult;
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
addResult = length - 1;
|
|
addResult = Math.min(addResult, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end));
|
|
c23 = addResult;
|
|
num23 = addResult;
|
|
num24 = addResult;
|
|
}
|
|
addResult = num24 <= num23;
|
|
let closure_24 = addResult;
|
|
function isPinnedRenderIndex(addResult) {
|
|
let hasItem = set.has(addResult);
|
|
if (!hasItem) {
|
|
let tmp2 = closure_24;
|
|
if (closure_24) {
|
|
tmp2 = addResult >= c22;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = addResult <= c23;
|
|
}
|
|
hasItem = tmp2;
|
|
}
|
|
return hasItem;
|
|
}
|
|
if (null !== addResult) {
|
|
if (null !== addResult) {
|
|
let items1 = [];
|
|
const _Set6 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
const set1 = new Set();
|
|
function addPinnedIndex(item10471) {
|
|
let data;
|
|
let keyExtractor;
|
|
if (item10471 >= 0) {
|
|
if (item10471 < length) {
|
|
let tmp4 = idCache[item10471];
|
|
if (null == tmp4) {
|
|
({ data, keyExtractor } = outer1_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp2 = null;
|
|
if (item10471 < data.length) {
|
|
let keyExtractorResult = item10471;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[item10471], item10471);
|
|
}
|
|
tmp2 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[item10471] = tmp2;
|
|
str = tmp2;
|
|
}
|
|
tmp4 = str;
|
|
}
|
|
const value = containerItemKeys.get(tmp4);
|
|
if (undefined !== value) {
|
|
const stickyContainerPool = outer1_2.stickyContainerPool;
|
|
stickyContainerPool.add(value);
|
|
} else {
|
|
let hasItem = null == tmp4;
|
|
if (!hasItem) {
|
|
hasItem = set1.has(item10471);
|
|
}
|
|
if (!hasItem) {
|
|
set1.add(item10471);
|
|
items1.push(item10471);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
addResult = set1;
|
|
if (addResult <= addResult) {
|
|
do {
|
|
addResult = idCache[addResult];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
if (!containerItemKeys.has(addResult)) {
|
|
addResult = set1.add(addResult);
|
|
addResult = items1.push(addResult);
|
|
}
|
|
addResult = addResult + 1;
|
|
} while (addResult <= addResult);
|
|
}
|
|
addResult = alwaysRenderIndicesArr;
|
|
addResult = alwaysRenderIndicesArr;
|
|
for (const item10471 of alwaysRenderIndicesArr) {
|
|
addResult = addPinnedIndex(item10471);
|
|
continue;
|
|
}
|
|
if (addResult) {
|
|
if (num24 <= num23) {
|
|
do {
|
|
addResult = addPinnedIndex(num24);
|
|
num24 = num24 + 1;
|
|
} while (num24 <= num23);
|
|
}
|
|
}
|
|
if (prop.length > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num25 = -1;
|
|
if (null != addResult) {
|
|
num25 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = num25;
|
|
addResult = items1;
|
|
addResult = set1;
|
|
addResult = (function handleStickyActivation(addResult, prop, arg2, items1, addResult2, addResult3, addResult4) {
|
|
let data;
|
|
let keyExtractor;
|
|
const state = addResult.state;
|
|
let num = -1;
|
|
if (arg2 >= 0) {
|
|
num = prop[arg2];
|
|
}
|
|
c22(addResult, "activeStickyIndex", num);
|
|
let num2 = 0;
|
|
do {
|
|
let diff = arg2 - num2;
|
|
let tmp4 = num2;
|
|
if (diff >= 0) {
|
|
let tmp12 = prop[diff];
|
|
let tmp13 = callback8;
|
|
if (!callback8(addResult, tmp12)) {
|
|
let tmp5 = state.idCache[tmp12];
|
|
if (null == tmp5) {
|
|
({ data, keyExtractor } = state.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp6 = null;
|
|
if (tmp12 < data.length) {
|
|
let keyExtractorResult = tmp12;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[tmp12], tmp12);
|
|
}
|
|
tmp6 = keyExtractorResult;
|
|
}
|
|
state.idCache[tmp12] = tmp6;
|
|
str = tmp6;
|
|
}
|
|
tmp5 = str;
|
|
}
|
|
let tmp8 = tmp5;
|
|
if (tmp5) {
|
|
let containerItemKeys = state.containerItemKeys;
|
|
tmp8 = !containerItemKeys.has(tmp5);
|
|
}
|
|
if (tmp8) {
|
|
let tmp9 = tmp12 < addResult3 || tmp12 > addResult4;
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp8) {
|
|
tmp8 = !addResult2.has(tmp12);
|
|
}
|
|
if (tmp8) {
|
|
addResult = addResult2.add(tmp12);
|
|
let arr = items1.push(tmp12);
|
|
}
|
|
}
|
|
}
|
|
num2 = num2 + 1;
|
|
} while (num2 <= 1);
|
|
})(addResult, prop, num25, items1, addResult, addResult, addResult);
|
|
} else if (-1 !== tmp15Result1) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "activeStickyIndex", -1);
|
|
}
|
|
if (items1.length > 0) {
|
|
let fn;
|
|
if (getItemType) {
|
|
fn = (arg0) => {
|
|
const tmp = getItemType(data[arg0], arg0);
|
|
let str = "";
|
|
if (undefined !== tmp) {
|
|
const _String = String;
|
|
str = String(tmp);
|
|
}
|
|
return str;
|
|
};
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = items1;
|
|
addResult = items;
|
|
addResult = fn;
|
|
addResult = tmp88;
|
|
addResult = (function findAvailableContainers(containerItemKeys, items1, addResult, addResult2, items, fn, has) {
|
|
let closure_2;
|
|
let stickyContainerPool;
|
|
let closure_0 = fn;
|
|
if (0 === items1.length) {
|
|
return [];
|
|
} else {
|
|
const tmp56 = length(containerItemKeys, "numContainers");
|
|
const state = containerItemKeys.state;
|
|
({ containerItemMetadata: closure_2, stickyContainerPool } = state);
|
|
let set;
|
|
if (items.length > 0) {
|
|
const _Set = Set;
|
|
set = new Set(items);
|
|
}
|
|
const mapped = items1.map((itemIndex) => {
|
|
const obj = { isSticky: stickyHeaderIndicesSet.has(itemIndex), itemIndex, itemType: null, order: null };
|
|
stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet;
|
|
let tmp;
|
|
if (null != callback) {
|
|
tmp = callback(itemIndex);
|
|
}
|
|
obj[2] = tmp;
|
|
obj[3] = arg1;
|
|
return obj;
|
|
});
|
|
const found = mapped.filter((isSticky) => !isSticky.isSticky);
|
|
items = [];
|
|
items1 = [];
|
|
let num2 = 0;
|
|
const found1 = mapped.filter((isSticky) => isSticky.isSticky);
|
|
if (0 < tmp56) {
|
|
while (true) {
|
|
let tmp12 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp13 = length(containerItemKeys, "containerItemKey" + num2);
|
|
let tmp14 = num2;
|
|
let hasItem;
|
|
if (null != set) {
|
|
hasItem = set.has(num2);
|
|
}
|
|
let tmp16 = !hasItem;
|
|
if (tmp13) {
|
|
let hasItem1;
|
|
if (null != has) {
|
|
hasItem1 = has.has(tmp13);
|
|
}
|
|
if (hasItem1) {
|
|
let indexByKey = state.indexByKey;
|
|
}
|
|
num2 = num2 + 1;
|
|
if (num2 >= tmp56) {
|
|
break;
|
|
}
|
|
}
|
|
let tmp18 = !tmp16;
|
|
if (stickyContainerPool.has(num2)) {
|
|
let tmp22 = undefined === tmp13 || tmp18;
|
|
if (tmp22) {
|
|
let obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number2 = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr = items1.push(obj);
|
|
}
|
|
} else {
|
|
if (undefined !== tmp13) {
|
|
if (!tmp18) {
|
|
if (!tmp) {
|
|
let indexByKey2 = state.indexByKey;
|
|
let value = indexByKey2.get(tmp13);
|
|
if (undefined !== value) {
|
|
if (value < addResult) {
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
obj[1] = value < addResult ? addResult - value : value - addResult2;
|
|
arr = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
obj = { containerIndex: null, distance: null };
|
|
obj[0] = num2;
|
|
let _Number = Number;
|
|
obj[1] = Number.POSITIVE_INFINITY;
|
|
let arr1 = items.push(obj);
|
|
}
|
|
}
|
|
}
|
|
const sorted = items.sort(closure_98);
|
|
const _Array = Array;
|
|
const array = new Array(length);
|
|
let sum = tmp56;
|
|
let c5 = false;
|
|
function assign(itemIndex, containerIndex) {
|
|
array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType };
|
|
let deleteResult;
|
|
if (null != set) {
|
|
deleteResult = set.delete(containerIndex);
|
|
}
|
|
if (deleteResult) {
|
|
let c5 = true;
|
|
}
|
|
}
|
|
function assignMatching(found, items, arg2) {
|
|
let closure_0 = items;
|
|
let closure_1 = arg2;
|
|
function _loop2() { ... }
|
|
const iter = found[Symbol.iterator]();
|
|
while (iter !== undefined) {
|
|
let _loop2Result = _loop2(iter.next());
|
|
continue;
|
|
}
|
|
}
|
|
function assignFromPool(found, items, arg2) {
|
|
if (closure_0) {
|
|
assignMatching(found, items, /* F118898 */ function() { ... });
|
|
}
|
|
assignMatching(found, items, /* F118899 */ function() { ... });
|
|
if (arg2) {
|
|
assignMatching(found, items, /* F118900 */ function() { ... });
|
|
}
|
|
}
|
|
assignFromPool(found, items, true);
|
|
assignFromPool(found1, items1, false);
|
|
for (const item10099 of mapped) {
|
|
let tmp36 = item10099;
|
|
if (!array[item10099.order]) {
|
|
let tmp37 = sum;
|
|
let tmp38 = +sum;
|
|
sum = tmp38 + 1;
|
|
let tmp39 = tmp38;
|
|
let tmp40 = item10099;
|
|
if (tmp36.isSticky) {
|
|
let tmp41 = tmp38;
|
|
addResult = stickyContainerPool.add(tmp39);
|
|
}
|
|
let tmp43 = item10099;
|
|
let tmp44 = tmp38;
|
|
let obj1 = assign(tmp36, tmp39);
|
|
}
|
|
continue;
|
|
}
|
|
if (c5) {
|
|
items.length = 0;
|
|
if (set) {
|
|
for (const item10120 of set) {
|
|
let arr2 = arg4.push(item10120);
|
|
continue;
|
|
}
|
|
}
|
|
}
|
|
if (closure_31) {
|
|
let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled");
|
|
if (null == POSITIVE_INFINITY) {
|
|
const _Number3 = Number;
|
|
POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
|
|
}
|
|
if (sum > POSITIVE_INFINITY) {
|
|
const _console = console;
|
|
let obj2 = { debugInfo: null };
|
|
const obj3 = { numContainers: null, numContainersPooled: null, numNeeded: null, stillNeeded: null };
|
|
obj3[0] = tmp56;
|
|
obj3[1] = POSITIVE_INFINITY;
|
|
obj3[2] = length;
|
|
obj3[3] = sum - tmp56;
|
|
obj2[0] = obj3;
|
|
console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj2);
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
})(containerItemKeys, items1, addResult, addResult, items, fn, tmp88);
|
|
let iter = addResult[Symbol.iterator]();
|
|
addResult = iter.next();
|
|
addResult = iter;
|
|
while (iter !== undefined) {
|
|
let itemIndex = addResult.itemIndex;
|
|
addResult = itemIndex;
|
|
let containerIndex = addResult.containerIndex;
|
|
addResult = idCache[itemIndex];
|
|
if (null == addResult) {
|
|
addResult = outer1_49;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = itemIndex;
|
|
addResult = outer1_49(state, addResult);
|
|
}
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = containerIndex;
|
|
let _HermesInternal3 = HermesInternal;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + containerIndex);
|
|
if (addResult) {
|
|
addResult = addResult !== addResult;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
}
|
|
if (addResult !== addResult) {
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set3 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = containerIndex;
|
|
addResult = set2.add(containerIndex);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[containerIndex];
|
|
let num28 = 0;
|
|
if (null != addResult) {
|
|
num28 = addResult;
|
|
}
|
|
state.containerItemGenerations[containerIndex] = num28 + 1;
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerIndex;
|
|
let _HermesInternal4 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + containerIndex, addResult);
|
|
let _HermesInternal5 = HermesInternal;
|
|
addResult = itemIndex;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + containerIndex, addResult);
|
|
let _HermesInternal6 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + containerIndex, data[addResult]);
|
|
addResult = state;
|
|
addResult = state;
|
|
let containerItemMetadata = state.containerItemMetadata;
|
|
addResult = outer1_28;
|
|
let num29 = 0;
|
|
addResult = state;
|
|
addResult = containerItemMetadata.set(containerIndex, outer1_28(state, itemIndex, data[addResult], addResult.itemType));
|
|
addResult = containerItemKeys.set(addResult, containerIndex);
|
|
let userScrollAnchorReset = state.userScrollAnchorReset;
|
|
if (null != userScrollAnchorReset) {
|
|
addResult = userScrollAnchorReset;
|
|
let keys = addResult.keys;
|
|
addResult = keys.add(addResult);
|
|
}
|
|
addResult = containerIndex;
|
|
let _HermesInternal7 = HermesInternal;
|
|
addResult = "containerSticky" + containerIndex;
|
|
addResult = itemIndex;
|
|
addResult = stickyHeaderIndicesSet.has(addResult);
|
|
addResult = isPinnedRenderIndex(addResult);
|
|
if (addResult) {
|
|
addResult = addResult(addResult, addResult, true);
|
|
let stickyContainerPool2 = addResult.stickyContainerPool;
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool2.add(containerIndex);
|
|
} else {
|
|
if (addResult(addResult, addResult)) {
|
|
addResult = addResult(addResult, addResult, false);
|
|
}
|
|
let stickyContainerPool = addResult.stickyContainerPool;
|
|
if (addResult) {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.add(containerIndex);
|
|
} else {
|
|
addResult = containerIndex;
|
|
addResult = stickyContainerPool.delete(containerIndex);
|
|
}
|
|
}
|
|
addResult = containerIndex;
|
|
if (containerIndex >= addResult) {
|
|
addResult = containerIndex;
|
|
addResult = containerIndex + 1;
|
|
}
|
|
continue;
|
|
}
|
|
if (addResult !== tmp16) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_22(containerItemKeys, "numContainers", addResult);
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
if (addResult > outer1_21(containerItemKeys, "numContainersPooled")) {
|
|
addResult = addResult(addResult, "numContainersPooled", (function getExpandedContainerPoolSize(length, addResult) {
|
|
let num = 0;
|
|
if (length > 0) {
|
|
num = 0;
|
|
if (addResult > 0) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
const bound = Math.max(length, addResult);
|
|
num = Math.min(bound, Math.max(addResult, Math.ceil(1.5 * addResult)));
|
|
}
|
|
}
|
|
return num;
|
|
})(length, addResult));
|
|
}
|
|
}
|
|
}
|
|
addResult = state;
|
|
addResult = state;
|
|
const userScrollAnchorReset2 = state.userScrollAnchorReset;
|
|
addResult = undefined;
|
|
if (null != userScrollAnchorReset2) {
|
|
addResult = userScrollAnchorReset2.keys.size;
|
|
}
|
|
if (0 === addResult) {
|
|
addResult.userScrollAnchorReset = undefined;
|
|
}
|
|
}
|
|
}
|
|
if (addResult.stickyContainerPool.size > 0) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = c12;
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.currentStickyIdx;
|
|
}
|
|
let num30 = -1;
|
|
if (null != addResult) {
|
|
num30 = addResult;
|
|
}
|
|
addResult = prop;
|
|
addResult = tmp9;
|
|
addResult = num30;
|
|
addResult = items;
|
|
addResult = isPinnedRenderIndex;
|
|
addResult = (function handleStickyRecycling(addResult, prop, addResult2, arg3, arg4, items, isPinnedRenderIndex) {
|
|
const state = addResult.state;
|
|
const iter = state.stickyContainerPool[Symbol.iterator]();
|
|
const nextResult = iter.next();
|
|
while (iter !== undefined) {
|
|
let tmp2 = nextResult;
|
|
let tmp3 = length;
|
|
let _HermesInternal = HermesInternal;
|
|
let tmp4 = length(addResult, "containerItemKey" + nextResult);
|
|
let value;
|
|
if (tmp4) {
|
|
let indexByKey = state.indexByKey;
|
|
let tmp7 = tmp4;
|
|
value = indexByKey.get(tmp5);
|
|
}
|
|
let tmp8 = value;
|
|
if (undefined !== value) {
|
|
let tmp52 = value;
|
|
if (!isPinnedRenderIndex(tmp8)) {
|
|
let tmp9 = value;
|
|
let index = prop.indexOf(tmp8);
|
|
let tmp11 = index;
|
|
if (-1 !== index) {
|
|
let tmp16 = index;
|
|
if (tmp11 < arg4 - 1) {
|
|
let tmp18 = index;
|
|
let tmp19 = prop[tmp11 + 1];
|
|
let flag = false;
|
|
if (tmp19) {
|
|
let tmp44 = tmp19;
|
|
let tmp45 = state.positions[tmp20];
|
|
let tmp47 = undefined !== tmp45;
|
|
if (tmp47) {
|
|
let tmp48 = tmp45;
|
|
tmp47 = addResult2 > tmp46 + 2 * arg3;
|
|
}
|
|
flag = tmp47;
|
|
} else {
|
|
let tmp21 = value;
|
|
let tmp22 = state.idCache[tmp8];
|
|
let tmp23 = tmp22;
|
|
if (null != tmp22) {
|
|
let tmp26 = tmp22;
|
|
} else {
|
|
let tmp24 = callback3;
|
|
let tmp25 = value;
|
|
tmp26 = callback3(state, tmp8);
|
|
}
|
|
let tmp27 = tmp26;
|
|
if (tmp26) {
|
|
let tmp28 = value;
|
|
let tmp29 = state.positions[tmp8];
|
|
let sizes = state.sizes;
|
|
let tmp30 = tmp26;
|
|
value = sizes.get(tmp27);
|
|
let tmp32 = value;
|
|
if (null != value) {
|
|
let tmp38 = value;
|
|
} else {
|
|
let tmp33 = callback4;
|
|
let tmp34 = tmp26;
|
|
let tmp35 = value;
|
|
let num = 0;
|
|
let tmp36 = addResult;
|
|
let tmp37 = tmp8;
|
|
tmp38 = callback4(addResult, tmp27, value, state.props.data[tmp8]);
|
|
}
|
|
let tmp40 = tmp29;
|
|
let tmp41 = undefined !== tmp29;
|
|
if (tmp41) {
|
|
let tmp42 = tmp29;
|
|
let tmp43 = tmp38;
|
|
tmp41 = addResult2 > tmp29 + tmp39 + 3 * arg3;
|
|
}
|
|
flag = tmp41;
|
|
}
|
|
}
|
|
let tmp49 = flag;
|
|
if (flag) {
|
|
let tmp50 = nextResult;
|
|
let arr = items.push(tmp2);
|
|
}
|
|
} else {
|
|
let tmp17 = index;
|
|
}
|
|
} else {
|
|
let stickyContainerPool = state.stickyContainerPool;
|
|
let tmp12 = nextResult;
|
|
let deleteResult = stickyContainerPool.delete(tmp2);
|
|
let tmp14 = v0;
|
|
let _HermesInternal2 = HermesInternal;
|
|
let tmp15 = v0(addResult, "containerSticky" + tmp2, false);
|
|
}
|
|
}
|
|
}
|
|
continue;
|
|
}
|
|
})(addResult, prop, addResult, tmp9, num30, items, isPinnedRenderIndex);
|
|
}
|
|
if (items.length > 0) {
|
|
const _Set4 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
addResult = items;
|
|
const set3 = new Set(items);
|
|
}
|
|
let num32 = 0;
|
|
let flag5 = false;
|
|
if (0 < addResult) {
|
|
do {
|
|
addResult = outer1_21;
|
|
addResult = outer1_21;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
let _HermesInternal8 = HermesInternal;
|
|
addResult = outer1_21(containerItemKeys, "containerItemKey" + num32);
|
|
addResult = flag5;
|
|
addResult = undefined;
|
|
addResult = num32;
|
|
if (null != set3) {
|
|
addResult = set3.has(num32);
|
|
}
|
|
if (addResult) {
|
|
if (undefined !== addResult) {
|
|
addResult = containerItemKeys.delete(addResult);
|
|
addResult = set2;
|
|
if (null == set2) {
|
|
let _Set5 = Set;
|
|
addResult = new.target;
|
|
addResult = new.target;
|
|
set2 = new Set();
|
|
}
|
|
addResult = set2;
|
|
addResult = set2.add(num32);
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = state.containerItemGenerations[num32];
|
|
let num33 = 0;
|
|
if (null != addResult) {
|
|
num33 = addResult;
|
|
}
|
|
state.containerItemGenerations[num32] = num33 + 1;
|
|
}
|
|
let containerItemMetadata2 = state.containerItemMetadata;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = containerItemMetadata2.delete(num32);
|
|
let stickyContainerPool3 = state.stickyContainerPool;
|
|
if (stickyContainerPool3.has(num32)) {
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal9 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSticky" + num32, false);
|
|
let stickyContainerPool4 = addResult.stickyContainerPool;
|
|
addResult = stickyContainerPool4.delete(num32);
|
|
}
|
|
addResult = outer1_22;
|
|
addResult = outer1_22;
|
|
let _HermesInternal10 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemKey" + num32, undefined);
|
|
let _HermesInternal11 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemIndex" + num32, undefined);
|
|
let _HermesInternal12 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerItemData" + num32, undefined);
|
|
let _HermesInternal13 = HermesInternal;
|
|
addResult = outer1_32;
|
|
addResult = outer1_22(addResult, "containerPosition" + num32, outer1_32);
|
|
let _HermesInternal14 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerColumn" + num32, -1);
|
|
let _HermesInternal15 = HermesInternal;
|
|
addResult = outer1_22(addResult, "containerSpan" + num32, 1);
|
|
addResult = flag5;
|
|
} else {
|
|
addResult = indexByKey.get(addResult);
|
|
addResult = flag5;
|
|
if (undefined !== addResult) {
|
|
addResult = outer1_88;
|
|
let obj3 = { scrollAdjustPending: null, updateLayout: true };
|
|
addResult = c10;
|
|
obj3[0] = c10;
|
|
let num35 = 0;
|
|
addResult = num32;
|
|
addResult = obj3;
|
|
addResult = outer1_88(addResult, addResult, addResult, obj3).didChangePosition || flag5;
|
|
}
|
|
}
|
|
num32 = num32 + 1;
|
|
flag5 = addResult;
|
|
} while (num32 < addResult);
|
|
}
|
|
addResult = set2;
|
|
if (set2) {
|
|
addResult = outer1_27;
|
|
}
|
|
if (addResult) {
|
|
addResult = outer1_87;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_87(containerItemKeys, set2);
|
|
}
|
|
if (!tmp13) {
|
|
addResult = outer1_84;
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = outer1_84(containerItemKeys);
|
|
} else {
|
|
addResult = outer1_102;
|
|
addResult = state;
|
|
addResult = state;
|
|
addResult = outer1_102(state, obj.startNoBuffer);
|
|
if (!queuedInitialLayout) {
|
|
if (!addResult.didContainersLayout) {
|
|
addResult = outer1_41;
|
|
addResult = outer1_77;
|
|
if (outer1_41(addResult)) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
} else {
|
|
addResult = addResult(addResult, addResult.startNoBuffer, addResult.endNoBuffer);
|
|
if (!addResult) {
|
|
addResult = addResult(addResult, addResult.startBuffered, addResult.endBuffered);
|
|
}
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
addResult = (function setDidLayout(containerItemKeys) {
|
|
containerItemKeys.state.queuedInitialLayout = true;
|
|
callback(containerItemKeys);
|
|
callback2(containerItemKeys, { didLayout: true });
|
|
})(containerItemKeys);
|
|
addResult = (function handleInitialScrollLayoutReady(containerItemKeys) {
|
|
let closure_0 = containerItemKeys;
|
|
if (containerItemKeys.state.initialScroll) {
|
|
callback6(containerItemKeys, { forceScroll: true });
|
|
const initialScrollSession = containerItemKeys.state.initialScrollSession;
|
|
let kind;
|
|
if (null != initialScrollSession) {
|
|
kind = initialScrollSession.kind;
|
|
}
|
|
if ("offset" !== kind) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(function runScroll() {
|
|
return outer1_76(closure_0, { forceScroll: true });
|
|
});
|
|
}
|
|
closure_0 = containerItemKeys;
|
|
const scrollingTo = containerItemKeys.state.scrollingTo;
|
|
{
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
}
|
|
}
|
|
})(containerItemKeys);
|
|
}
|
|
}
|
|
}
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
if (viewabilityConfigCallbackPairs) {
|
|
addResult = null !== obj.startNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = null !== obj.endNoBuffer;
|
|
}
|
|
if (addResult) {
|
|
addResult = containerItemKeys;
|
|
addResult = containerItemKeys;
|
|
state = containerItemKeys.state;
|
|
({ startNoBuffer, endNoBuffer } = obj);
|
|
addResult = outer1_91;
|
|
if (null == addResult) {
|
|
addResult = obj.startNoBuffer;
|
|
}
|
|
if (null == addResult) {
|
|
addResult = obj.endNoBuffer;
|
|
}
|
|
addResult = state;
|
|
addResult = viewabilityConfigCallbackPairs;
|
|
addResult = scrollLength;
|
|
addResult = startNoBuffer;
|
|
addResult = endNoBuffer;
|
|
addResult = addResult(state, addResult, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, addResult, addResult);
|
|
}
|
|
addResult = undefined;
|
|
if (null != stickyState) {
|
|
addResult = stickyState.finishCalculateItemsInView;
|
|
}
|
|
if (null != addResult) {
|
|
const call2 = addResult.call;
|
|
if (typeof call2 === "unknown") {
|
|
addResult = addResult();
|
|
} else {
|
|
addResult = call2(stickyState);
|
|
}
|
|
}
|
|
}
|
|
let tmp17 = outer1_25;
|
|
const tmp80 = outer1_89;
|
|
}
|
|
}
|
|
}
|
|
});
|
|
let tmp16 = !flag;
|
|
if (!flag) {
|
|
let onDataChange;
|
|
if (null != maintainScrollAtEnd) {
|
|
onDataChange = maintainScrollAtEnd.onDataChange;
|
|
}
|
|
tmp16 = onDataChange;
|
|
}
|
|
if (tmp16) {
|
|
tmp16 = outer1_64(tmp9);
|
|
}
|
|
let tmp20 = !tmp16;
|
|
if (!tmp16) {
|
|
tmp20 = previousData;
|
|
}
|
|
if (tmp20) {
|
|
tmp20 = data.length > previousData.length;
|
|
}
|
|
if (tmp20) {
|
|
state.isEndReached = false;
|
|
}
|
|
if (!tmp16) {
|
|
outer1_43(tmp9);
|
|
}
|
|
delete tmp2[tmp];
|
|
}
|
|
if (didDataChange) {
|
|
tmp5.pendingDataComparison = undefined;
|
|
}
|
|
current.didColumnsChange = false;
|
|
current.didDataChange = false;
|
|
current.isFirst = false;
|
|
}, items19);
|
|
const items20 = [extraData, overrideItemLayout, num4];
|
|
callback = obj.useLayoutEffect(() => {
|
|
context(context, "extraData", onScroll);
|
|
ref2.current = closure_27;
|
|
let tmp2 = closure_27;
|
|
if (!closure_27) {
|
|
tmp2 = ref2.current !== closure_27;
|
|
}
|
|
if (tmp2) {
|
|
tmp2 = num4 > 1;
|
|
}
|
|
if (tmp2) {
|
|
const triggerCalculateItemsInView = current.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
const obj = { forceFullItemPositions: true };
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView(obj);
|
|
} else {
|
|
call(tmp4, obj);
|
|
}
|
|
}
|
|
tmp4 = current;
|
|
}
|
|
}, items20);
|
|
const items21 = [context, onMetricsChange];
|
|
callback = obj.useEffect(() => {
|
|
if (onMetricsChange) {
|
|
let values = context.values;
|
|
let obj = { footerSize: null, headerSize: null };
|
|
obj[0] = values.get("footerSize") || 0;
|
|
values = tmp2.values;
|
|
const tmp3 = values.get("footerSize") || 0;
|
|
obj[1] = values.get("headerSize") || 0;
|
|
let tmp5 = emitMetrics;
|
|
if (emitMetrics) {
|
|
tmp5 = obj.headerSize === emitMetrics.headerSize;
|
|
}
|
|
if (tmp5) {
|
|
tmp5 = obj.footerSize === emitMetrics.footerSize;
|
|
}
|
|
if (!tmp5) {
|
|
emitMetrics = obj;
|
|
tmp(obj);
|
|
}
|
|
emitMetrics = function emitMetrics() {
|
|
let values = outer1_22.values;
|
|
const obj = { footerSize: values.get("footerSize") || 0, headerSize: null };
|
|
values = outer1_22.values;
|
|
const tmp = outer1_22;
|
|
const tmp2 = values.get("footerSize") || 0;
|
|
obj[1] = values.get("headerSize") || 0;
|
|
let tmp4 = obj;
|
|
if (obj) {
|
|
tmp4 = obj.headerSize === obj.headerSize;
|
|
}
|
|
if (tmp4) {
|
|
tmp4 = obj.footerSize === obj.footerSize;
|
|
}
|
|
if (!tmp4) {
|
|
outer1_8(obj);
|
|
}
|
|
};
|
|
const listeners = tmp2.listeners;
|
|
let value = listeners.get("headerSize");
|
|
let items = value;
|
|
let obj2 = value;
|
|
if (!value) {
|
|
const _Set = Set;
|
|
const set = new Set();
|
|
items = set;
|
|
const result = listeners.set("headerSize", set);
|
|
obj2 = set;
|
|
}
|
|
obj2.add(emitMetrics);
|
|
items = [() => set.delete(closure_0), ];
|
|
items = undefined;
|
|
const listeners2 = tmp2.listeners;
|
|
value = listeners2.get("footerSize");
|
|
items = value;
|
|
let obj3 = value;
|
|
if (!value) {
|
|
const _Set2 = Set;
|
|
const set1 = new Set();
|
|
items = set1;
|
|
const result1 = listeners2.set("footerSize", set1);
|
|
obj3 = set1;
|
|
}
|
|
obj3.add(emitMetrics);
|
|
items[1] = () => set.delete(closure_0);
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
}, items21);
|
|
const items22 = [viewabilityConfig, viewabilityConfigCallbackPairs, onViewableItemsChanged];
|
|
callback = obj.useEffect(() => {
|
|
let obj = viewabilityConfig;
|
|
let tmp3 = viewabilityConfig;
|
|
if (!viewabilityConfig) {
|
|
tmp3 = tmp;
|
|
}
|
|
let tmp4 = tmp2;
|
|
if (tmp3) {
|
|
let items = tmp2;
|
|
if (!tmp2) {
|
|
items = [];
|
|
}
|
|
const items1 = [];
|
|
obj = { onViewableItemsChanged: null, viewabilityConfig: null };
|
|
obj[0] = tmp;
|
|
if (!obj) {
|
|
obj = { viewAreaCoveragePercentThreshold: 0 };
|
|
}
|
|
obj[1] = obj;
|
|
items1[HermesBuiltin.arraySpread(items, 0)] = obj;
|
|
tmp4 = items1;
|
|
const arraySpreadResult = HermesBuiltin.arraySpread(items, 0);
|
|
}
|
|
current.viewabilityConfigCallbackPairs = tmp4;
|
|
current.enableScrollForNextCalculateItemsInView = true;
|
|
if (tmp4) {
|
|
tmp8.scrollForNextCalculateItemsInView = undefined;
|
|
}
|
|
}, items22);
|
|
stickyHeaderIndices = () => {
|
|
if (!closure_27) {
|
|
outer1_133(context);
|
|
}
|
|
};
|
|
callback = obj22.useState(() => f95496());
|
|
callback = obj.useImperativeHandle(ref, () => {
|
|
let closure_0 = context;
|
|
let closure_1 = closure_21;
|
|
let state = context.state;
|
|
let c3 = 0;
|
|
function isSettlingAfterDataChange() {
|
|
|
|
}
|
|
function isScrollToIndexReady(arg0) {
|
|
let flag = arg1;
|
|
if (arg1 === undefined) {
|
|
flag = false;
|
|
}
|
|
const props = state.props;
|
|
const anchoredEndSpace = props.anchoredEndSpace;
|
|
if (null != anchoredEndSpace) {
|
|
let anchorIndex = anchoredEndSpace.anchorIndex;
|
|
}
|
|
if (arg0 >= 0) {
|
|
let tmp = arg0 < length;
|
|
if (tmp) {
|
|
let tmp2 = undefined === anchorIndex || anchorIndex < 0 || anchorIndex >= length || arg0 < anchorIndex;
|
|
if (!tmp2) {
|
|
const diff = length - 1;
|
|
let flag2 = true;
|
|
if (anchorIndex <= diff) {
|
|
flag2 = false;
|
|
while (undefined !== outer1_57(tmp3, anchorIndex)) {
|
|
anchorIndex = anchorIndex + 1;
|
|
flag2 = true;
|
|
if (anchorIndex > diff) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
tmp2 = flag2;
|
|
}
|
|
tmp = tmp2;
|
|
}
|
|
flag = tmp;
|
|
}
|
|
return flag;
|
|
}
|
|
function runScrollRequest(token, resolve, arg2, arg3) {
|
|
let closure_0 = token;
|
|
let fn = resolve;
|
|
let state = arg2;
|
|
fn = arg3;
|
|
if (arg3 === undefined) {
|
|
fn = function r() {
|
|
return true;
|
|
};
|
|
}
|
|
if (typeof check !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
if (!tmp2) {
|
|
if (fn()) {
|
|
if (token === c3) {
|
|
if (!tmp4) {
|
|
if (tmp.pendingScrollResolve === resolve) {
|
|
tmp.pendingScrollResolve = undefined;
|
|
}
|
|
resolve();
|
|
}
|
|
tmp4 = arg2() && tmp.scrollingTo;
|
|
}
|
|
}
|
|
}
|
|
closure_0 = token;
|
|
state = Date.now();
|
|
c3 = 0;
|
|
check = function check() {
|
|
if (closure_0 === c3) {
|
|
if (typeof isSettlingAfterDataChange !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
let tmp2 = state.didDataChange || tmp.didColumnsChange;
|
|
if (!tmp2) {
|
|
tmp2 = undefined !== tmp.queuedMVCPRecalculate;
|
|
}
|
|
if (!tmp2) {
|
|
tmp2 = undefined !== tmp.ignoreScrollFromMVCP;
|
|
}
|
|
if (!tmp2) {
|
|
if (fn()) {
|
|
c3 = c3 + 1;
|
|
}
|
|
const _Date = Date;
|
|
if (c3 < 2) {
|
|
if (tmp7 < 800) {
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
const animationFrame = requestAnimationFrame(check);
|
|
}
|
|
}
|
|
if (closure_0 === c3) {
|
|
let scrollingTo = lib();
|
|
if (scrollingTo) {
|
|
scrollingTo = lib.scrollingTo;
|
|
}
|
|
if (!scrollingTo) {
|
|
if (lib.pendingScrollResolve === fn) {
|
|
lib.pendingScrollResolve = undefined;
|
|
}
|
|
fn();
|
|
const tmp16 = fn;
|
|
}
|
|
}
|
|
}
|
|
c3 = 0;
|
|
}
|
|
};
|
|
let animationFrame = requestAnimationFrame(check);
|
|
}
|
|
function startImperativeScroll(arg0) {
|
|
|
|
}
|
|
function runScrollWithPromise(arg0) {
|
|
|
|
}
|
|
state.runPendingScrollToEnd = () => {
|
|
const pendingScrollToEnd = state.pendingScrollToEnd;
|
|
if (pendingScrollToEnd) {
|
|
tmp.pendingScrollToEnd = undefined;
|
|
if (pendingScrollToEnd.token === c3) {
|
|
runScrollRequest(pendingScrollToEnd.token, pendingScrollToEnd.resolve, () => {
|
|
const options = pendingScrollToEnd.options;
|
|
const state = pendingScrollToEnd.state;
|
|
const diff = state.props.data.length - 1;
|
|
let flag = false;
|
|
if (-1 !== diff) {
|
|
const values = tmp.values;
|
|
const obj = {};
|
|
const merged = Object.assign(options);
|
|
obj.index = diff;
|
|
let num;
|
|
const diff1 = -state.props.stylePaddingBottom || 0 - (values.get("footerSize") || 0);
|
|
if (null != options) {
|
|
num = options.viewOffset;
|
|
}
|
|
if (!num) {
|
|
num = 0;
|
|
}
|
|
obj.viewOffset = diff1 + num;
|
|
obj.viewPosition = 1;
|
|
outer2_73(tmp, obj);
|
|
flag = true;
|
|
const tmp3 = state.props.stylePaddingBottom || 0;
|
|
const tmp4 = values.get("footerSize") || 0;
|
|
const tmp5 = outer2_73;
|
|
}
|
|
return flag;
|
|
}, () => callback(props.props.data.length - 1, true));
|
|
}
|
|
}
|
|
};
|
|
function scrollIndexIntoView(arg0) {
|
|
|
|
}
|
|
const refScroller = state.refScroller;
|
|
return {
|
|
clearCaches(mode) {
|
|
mode = undefined;
|
|
if (null != mode) {
|
|
mode = mode.mode;
|
|
}
|
|
let str = "sizes";
|
|
if (null != mode) {
|
|
str = mode;
|
|
}
|
|
const sizes = state.sizes;
|
|
sizes.clear();
|
|
const sizesKnown = state.sizesKnown;
|
|
sizesKnown.clear();
|
|
outer1_30(state);
|
|
for (const key10019 in state.averageSizes) {
|
|
let tmp13 = key10019;
|
|
let tmp14 = state;
|
|
let averageSizes = state.averageSizes;
|
|
delete tmp[tmp2];
|
|
continue;
|
|
}
|
|
state.minIndexSizeChanged = 0;
|
|
state.scrollForNextCalculateItemsInView = undefined;
|
|
state.pendingTotalSize = undefined;
|
|
state.totalSize = 0;
|
|
outer1_22(closure_0, "totalSize", 0);
|
|
if ("full" === str) {
|
|
const indexByKey = tmp7.indexByKey;
|
|
indexByKey.clear();
|
|
tmp7.idCache.length = 0;
|
|
tmp7.positions.length = 0;
|
|
tmp7.columns.length = 0;
|
|
tmp7.columnSpans.length = 0;
|
|
}
|
|
(function triggerMountedContainerLayouts(containerLayoutTriggers) {
|
|
if (closure_27) {
|
|
callback(containerLayoutTriggers);
|
|
} else {
|
|
containerLayoutTriggers = containerLayoutTriggers.containerLayoutTriggers;
|
|
const values = containerLayoutTriggers.values();
|
|
for (const item10009 of values) {
|
|
let item10009Result = item10009();
|
|
continue;
|
|
}
|
|
}
|
|
})(closure_0);
|
|
const triggerCalculateItemsInView = tmp7.triggerCalculateItemsInView;
|
|
if (null != triggerCalculateItemsInView) {
|
|
const call = triggerCalculateItemsInView.call;
|
|
const obj = { forceFullItemPositions: true };
|
|
if (typeof call === "unknown") {
|
|
const result = triggerCalculateItemsInView(obj);
|
|
} else {
|
|
call(tmp7, obj);
|
|
}
|
|
}
|
|
},
|
|
flashScrollIndicators() {
|
|
const current = refScroller.current;
|
|
return current.flashScrollIndicators();
|
|
},
|
|
getAnimatableRef() {
|
|
const current = refScroller.current;
|
|
const getNativeScrollRef = current.getNativeScrollRef;
|
|
if (null == getNativeScrollRef) {
|
|
if (null == current2) {
|
|
current2 = refScroller.current;
|
|
}
|
|
return current2;
|
|
} else {
|
|
const call = getNativeScrollRef.call;
|
|
typeof call === "unknown" ? getNativeScrollRef() : call(current);
|
|
}
|
|
},
|
|
getNativeScrollRef() {
|
|
return refScroller.current;
|
|
},
|
|
getScrollableNode() {
|
|
const current = refScroller.current;
|
|
return current.getScrollableNode();
|
|
},
|
|
getScrollResponder() {
|
|
const current = refScroller.current;
|
|
return current.getScrollResponder();
|
|
},
|
|
getState() {
|
|
let values = closure_0.values;
|
|
values = closure_0.values;
|
|
values = closure_0.values;
|
|
const values1 = closure_0.values;
|
|
const values2 = closure_0.values;
|
|
const values3 = closure_0.values;
|
|
return {
|
|
activeStickyIndex: values.get("activeStickyIndex"),
|
|
contentLength: outer1_25(closure_0),
|
|
data: state.props.data,
|
|
elementAtIndex(arg0) {
|
|
let data;
|
|
let keyExtractor;
|
|
const viewRefs = closure_0.viewRefs;
|
|
({ data, keyExtractor } = closure_2.props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp4 = null;
|
|
if (arg0 < data.length) {
|
|
let keyExtractorResult = arg0;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[arg0], arg0);
|
|
}
|
|
tmp4 = keyExtractorResult;
|
|
}
|
|
tmp2.idCache[arg0] = tmp4;
|
|
str = tmp4;
|
|
}
|
|
const state = tmp.state;
|
|
let containerItemKeys;
|
|
if (null != state) {
|
|
containerItemKeys = state.containerItemKeys;
|
|
}
|
|
let num;
|
|
if (null != containerItemKeys) {
|
|
num = containerItemKeys.get(str);
|
|
}
|
|
if (undefined === num) {
|
|
let values = tmp.values;
|
|
let value = values.get("numContainers");
|
|
let num2 = 0;
|
|
num = -1;
|
|
if (0 < value) {
|
|
const _HermesInternal = HermesInternal;
|
|
values = tmp.values;
|
|
num = num2;
|
|
while (values.get("containerItemKey" + num2) !== str) {
|
|
let sum = num2 + 1;
|
|
num2 = sum;
|
|
num = -1;
|
|
if (sum >= value) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
value = viewRefs.get(num);
|
|
let current;
|
|
if (null != value) {
|
|
current = value.current;
|
|
}
|
|
return current;
|
|
},
|
|
end: state.endNoBuffer,
|
|
endBuffered: state.endBuffered,
|
|
getAverageItemSizes() {
|
|
let obj = {};
|
|
for (const key10005 in closure_2.averageSizes) {
|
|
let str = key10005;
|
|
let tmp2 = tmp.averageSizes[key10005];
|
|
if (!tmp2) {
|
|
continue;
|
|
} else {
|
|
if (!str) {
|
|
str = "default";
|
|
}
|
|
obj = { average: null, count: null };
|
|
({ avg: obj2[0], num: obj2[1] } = tmp2);
|
|
obj[str] = obj;
|
|
continue;
|
|
}
|
|
continue;
|
|
}
|
|
return obj;
|
|
},
|
|
isAtEnd: values.get("isAtEnd"),
|
|
isAtStart: values.get("isAtStart"),
|
|
isEndReached: state.isEndReached,
|
|
isNearEnd: values1.get("isNearEnd"),
|
|
isNearStart: values2.get("isNearStart"),
|
|
isStartReached: state.isStartReached,
|
|
isWithinMaintainScrollAtEndThreshold: values3.get("isWithinMaintainScrollAtEndThreshold"),
|
|
listen(arg0, arg1) {
|
|
let closure_0 = arg1;
|
|
const listeners = closure_0.listeners;
|
|
const value = listeners.get(arg0);
|
|
let set = value;
|
|
let obj = value;
|
|
if (!value) {
|
|
const _Set = Set;
|
|
set = new Set();
|
|
const result = listeners.set(arg0, set);
|
|
obj = set;
|
|
}
|
|
obj.add(arg1);
|
|
return () => set.delete(closure_0);
|
|
},
|
|
listenToPosition(arg0, arg1) {
|
|
let closure_0 = arg1;
|
|
const positionListeners = closure_0.positionListeners;
|
|
const value = positionListeners.get(arg0);
|
|
let set = value;
|
|
let obj = value;
|
|
if (!value) {
|
|
const _Set = Set;
|
|
set = new Set();
|
|
const result = positionListeners.set(arg0, set);
|
|
obj = set;
|
|
}
|
|
obj.add(arg1);
|
|
return () => set.delete(closure_0);
|
|
},
|
|
positionAtIndex(arg0) {
|
|
return closure_2.positions[arg0];
|
|
},
|
|
positionByKey(arg0) {
|
|
const indexByKey = closure_2.indexByKey;
|
|
const value = indexByKey.get(arg0);
|
|
let tmp3;
|
|
if (undefined !== value) {
|
|
tmp3 = closure_2.positions[value];
|
|
}
|
|
return tmp3;
|
|
},
|
|
scroll: state.scroll,
|
|
scrollLength: state.scrollLength,
|
|
scrollVelocity: outer1_69(state),
|
|
sizeAtIndex(arg0) {
|
|
let data;
|
|
let keyExtractor;
|
|
let props;
|
|
let sizesKnown;
|
|
({ sizesKnown, props } = closure_2);
|
|
({ data, keyExtractor } = props);
|
|
let str = "";
|
|
if (data) {
|
|
let tmp3 = null;
|
|
if (arg0 < data.length) {
|
|
let keyExtractorResult = arg0;
|
|
if (keyExtractor) {
|
|
keyExtractorResult = keyExtractor(data[arg0], arg0);
|
|
}
|
|
tmp3 = keyExtractorResult;
|
|
}
|
|
tmp.idCache[arg0] = tmp3;
|
|
str = tmp3;
|
|
}
|
|
return sizesKnown.get(str);
|
|
},
|
|
sizes: state.sizesKnown,
|
|
start: state.startNoBuffer,
|
|
startBuffered: state.startBuffered
|
|
};
|
|
},
|
|
reportContentInset(arg0) {
|
|
const state = closure_0.state;
|
|
let tmp2;
|
|
if (null != arg0) {
|
|
tmp2 = arg0;
|
|
}
|
|
const contentInsetOverride = state.contentInsetOverride;
|
|
let top;
|
|
if (null != contentInsetOverride) {
|
|
top = contentInsetOverride.top;
|
|
}
|
|
let num = 0;
|
|
if (null != top) {
|
|
num = top;
|
|
}
|
|
let top1;
|
|
if (null != tmp2) {
|
|
top1 = tmp2.top;
|
|
}
|
|
let num2 = 0;
|
|
if (null != top1) {
|
|
num2 = top1;
|
|
}
|
|
let tmp5 = num === num2;
|
|
if (tmp5) {
|
|
let bottom;
|
|
if (null != contentInsetOverride) {
|
|
bottom = contentInsetOverride.bottom;
|
|
}
|
|
let num3 = 0;
|
|
if (null != bottom) {
|
|
num3 = bottom;
|
|
}
|
|
let bottom1;
|
|
if (null != tmp2) {
|
|
bottom1 = tmp2.bottom;
|
|
}
|
|
let num4 = 0;
|
|
if (null != bottom1) {
|
|
num4 = bottom1;
|
|
}
|
|
tmp5 = num3 === num4;
|
|
}
|
|
if (tmp5) {
|
|
let left;
|
|
if (null != contentInsetOverride) {
|
|
left = contentInsetOverride.left;
|
|
}
|
|
let num5 = 0;
|
|
if (null != left) {
|
|
num5 = left;
|
|
}
|
|
let left1;
|
|
if (null != tmp2) {
|
|
left1 = tmp2.left;
|
|
}
|
|
let num6 = 0;
|
|
if (null != left1) {
|
|
num6 = left1;
|
|
}
|
|
tmp5 = num5 === num6;
|
|
}
|
|
if (tmp5) {
|
|
let right;
|
|
if (null != contentInsetOverride) {
|
|
right = contentInsetOverride.right;
|
|
}
|
|
let num7 = 0;
|
|
if (null != right) {
|
|
num7 = right;
|
|
}
|
|
let right1;
|
|
if (null != tmp2) {
|
|
right1 = tmp2.right;
|
|
}
|
|
let num8 = 0;
|
|
if (null != right1) {
|
|
num8 = right1;
|
|
}
|
|
tmp5 = num7 === num8;
|
|
}
|
|
state.contentInsetOverride = tmp2;
|
|
if (!tmp5) {
|
|
outer1_50(tmp);
|
|
}
|
|
outer1_70(closure_0, state.scroll, true, { markHasScrolled: false });
|
|
if (!tmp5) {
|
|
outer1_85(tmp);
|
|
}
|
|
},
|
|
scrollIndexIntoView(arg0) {
|
|
let f110869 = arg0;
|
|
if (typeof runScrollWithPromise !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
f110869 = () => {
|
|
if (typeof outer1_9 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
let flag = false;
|
|
if (outer1_2) {
|
|
const index = tmp.index;
|
|
const tmp5 = outer1_3(tmp, outer1_6);
|
|
const startNoBuffer = outer1_2.startNoBuffer;
|
|
if (index < startNoBuffer) {
|
|
const obj = {};
|
|
const merged = Object.assign(tmp5);
|
|
obj.index = index;
|
|
let num = 1;
|
|
if (index < startNoBuffer) {
|
|
num = 0;
|
|
}
|
|
obj.viewPosition = num;
|
|
outer1_73(f110869, obj);
|
|
flag = true;
|
|
const tmp7 = outer1_73;
|
|
const tmp8 = f110869;
|
|
} else {
|
|
flag = false;
|
|
}
|
|
}
|
|
return flag;
|
|
};
|
|
function t() {
|
|
return true;
|
|
}
|
|
return new Promise((pendingScrollResolve) => {
|
|
if (typeof outer1_7 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const sum = outer1_3 + 1;
|
|
outer1_3 = sum;
|
|
outer1_2.pendingScrollToEnd = undefined;
|
|
pendingScrollResolve = outer1_2.pendingScrollResolve;
|
|
if (null != pendingScrollResolve) {
|
|
const call = pendingScrollResolve.call;
|
|
if (typeof call === "unknown") {
|
|
pendingScrollResolve();
|
|
} else {
|
|
call(tmp2);
|
|
}
|
|
}
|
|
outer1_2.pendingScrollResolve = pendingScrollResolve;
|
|
outer1_6(sum, pendingScrollResolve, f110875, t);
|
|
});
|
|
},
|
|
scrollItemIntoView(item) {
|
|
let f110870 = item.item;
|
|
let t = Object.assign(item, Object.create(null));
|
|
if (typeof runScrollWithPromise !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
f110870 = () => {
|
|
const data = outer1_2.props.data;
|
|
let index = data.indexOf(f110870);
|
|
let flag = -1 !== index;
|
|
if (flag) {
|
|
let obj = { index: null };
|
|
obj[0] = index;
|
|
const merged = Object.assign(t);
|
|
if (typeof outer1_9 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
flag = true;
|
|
if (tmp) {
|
|
index = obj.index;
|
|
const tmp9 = outer1_3(obj, outer1_6);
|
|
const startNoBuffer = tmp.startNoBuffer;
|
|
if (index < startNoBuffer) {
|
|
obj = {};
|
|
const merged1 = Object.assign(tmp9);
|
|
obj.index = index;
|
|
let num = 1;
|
|
if (index < startNoBuffer) {
|
|
num = 0;
|
|
}
|
|
obj.viewPosition = num;
|
|
outer1_73(f110870, obj);
|
|
flag = true;
|
|
const tmp11 = outer1_73;
|
|
const tmp12 = f110870;
|
|
} else {
|
|
flag = true;
|
|
}
|
|
}
|
|
}
|
|
return flag;
|
|
};
|
|
t = function t() {
|
|
return true;
|
|
};
|
|
return new Promise((pendingScrollResolve) => {
|
|
if (typeof outer1_7 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const sum = outer1_3 + 1;
|
|
outer1_3 = sum;
|
|
outer1_2.pendingScrollToEnd = undefined;
|
|
pendingScrollResolve = outer1_2.pendingScrollResolve;
|
|
if (null != pendingScrollResolve) {
|
|
const call = pendingScrollResolve.call;
|
|
if (typeof call === "unknown") {
|
|
pendingScrollResolve();
|
|
} else {
|
|
call(tmp2);
|
|
}
|
|
}
|
|
outer1_2.pendingScrollResolve = pendingScrollResolve;
|
|
outer1_6(sum, pendingScrollResolve, f110875, t);
|
|
});
|
|
},
|
|
scrollToEnd(arg0) {
|
|
let closure_0 = arg0;
|
|
return new Promise((pendingScrollResolve) => {
|
|
if (typeof outer1_7 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const sum = outer1_3 + 1;
|
|
outer1_3 = sum;
|
|
outer1_2.pendingScrollToEnd = undefined;
|
|
pendingScrollResolve = outer1_2.pendingScrollResolve;
|
|
if (null != pendingScrollResolve) {
|
|
const call = pendingScrollResolve.call;
|
|
if (typeof call === "unknown") {
|
|
pendingScrollResolve();
|
|
} else {
|
|
call(tmp2);
|
|
}
|
|
}
|
|
outer1_2.pendingScrollResolve = pendingScrollResolve;
|
|
outer1_2.pendingScrollToEnd = { options: closure_0, resolve: pendingScrollResolve, token: sum };
|
|
if (outer1_1) {
|
|
outer1_1();
|
|
} else {
|
|
const runPendingScrollToEnd = tmp2.runPendingScrollToEnd;
|
|
if (null != runPendingScrollToEnd) {
|
|
const call2 = runPendingScrollToEnd.call;
|
|
if (typeof call2 === "unknown") {
|
|
const result = runPendingScrollToEnd();
|
|
} else {
|
|
call2(tmp2);
|
|
}
|
|
}
|
|
}
|
|
});
|
|
},
|
|
scrollToIndex(index) {
|
|
let f110872 = index;
|
|
let fn;
|
|
if (index.index >= 0) {
|
|
fn = () => outer1_5(f110872.index);
|
|
}
|
|
if (typeof runScrollWithPromise !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
f110872 = () => {
|
|
outer2_73(f110872, f110872);
|
|
return true;
|
|
};
|
|
if (fn === undefined) {
|
|
fn = function t() {
|
|
return true;
|
|
};
|
|
}
|
|
return new Promise((pendingScrollResolve) => {
|
|
if (typeof outer1_7 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const sum = outer1_3 + 1;
|
|
outer1_3 = sum;
|
|
outer1_2.pendingScrollToEnd = undefined;
|
|
pendingScrollResolve = outer1_2.pendingScrollResolve;
|
|
if (null != pendingScrollResolve) {
|
|
const call = pendingScrollResolve.call;
|
|
if (typeof call === "unknown") {
|
|
pendingScrollResolve();
|
|
} else {
|
|
call(tmp2);
|
|
}
|
|
}
|
|
outer1_2.pendingScrollResolve = pendingScrollResolve;
|
|
outer1_6(sum, pendingScrollResolve, f110875, t);
|
|
});
|
|
},
|
|
scrollToItem(item) {
|
|
let f110874 = item.item;
|
|
let t = Object.assign(item, Object.create(null));
|
|
if (typeof runScrollWithPromise !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
f110874 = () => {
|
|
const data = outer1_2.props.data;
|
|
const index = data.indexOf(f110874);
|
|
let flag = -1 !== index;
|
|
if (flag) {
|
|
const obj = { index: null };
|
|
obj[0] = index;
|
|
const merged = Object.assign(t);
|
|
outer2_73(f110874, obj);
|
|
flag = true;
|
|
}
|
|
return flag;
|
|
};
|
|
t = function t() {
|
|
return true;
|
|
};
|
|
return new Promise((pendingScrollResolve) => {
|
|
if (typeof outer1_7 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const sum = outer1_3 + 1;
|
|
outer1_3 = sum;
|
|
outer1_2.pendingScrollToEnd = undefined;
|
|
pendingScrollResolve = outer1_2.pendingScrollResolve;
|
|
if (null != pendingScrollResolve) {
|
|
const call = pendingScrollResolve.call;
|
|
if (typeof call === "unknown") {
|
|
pendingScrollResolve();
|
|
} else {
|
|
call(tmp2);
|
|
}
|
|
}
|
|
outer1_2.pendingScrollResolve = pendingScrollResolve;
|
|
outer1_6(sum, pendingScrollResolve, f110875, t);
|
|
});
|
|
},
|
|
scrollToOffset(arg0) {
|
|
let f110875 = arg0;
|
|
if (typeof runScrollWithPromise !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
f110875 = () => {
|
|
outer2_72(f110875, f110875);
|
|
return true;
|
|
};
|
|
function t() {
|
|
return true;
|
|
}
|
|
return new Promise((pendingScrollResolve) => {
|
|
if (typeof outer1_7 !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
const sum = outer1_3 + 1;
|
|
outer1_3 = sum;
|
|
outer1_2.pendingScrollToEnd = undefined;
|
|
pendingScrollResolve = outer1_2.pendingScrollResolve;
|
|
if (null != pendingScrollResolve) {
|
|
const call = pendingScrollResolve.call;
|
|
if (typeof call === "unknown") {
|
|
pendingScrollResolve();
|
|
} else {
|
|
call(tmp2);
|
|
}
|
|
}
|
|
outer1_2.pendingScrollResolve = pendingScrollResolve;
|
|
outer1_6(sum, pendingScrollResolve, f110875, t);
|
|
});
|
|
},
|
|
setItemSize(itemKey, size) {
|
|
const items = [{ itemKey, size }];
|
|
outer1_107(closure_0, items);
|
|
},
|
|
setScrollProcessingEnabled(scrollProcessingEnabled) {
|
|
state.scrollProcessingEnabled = scrollProcessingEnabled;
|
|
},
|
|
setVisibleContentAnchorOffset(fn) {
|
|
let tmp = fn;
|
|
if (typeof fn === "function") {
|
|
const values = closure_0.values;
|
|
tmp = fn(values.get("scrollAdjustUserOffset") || 0);
|
|
const tmp2 = values.get("scrollAdjustUserOffset") || 0;
|
|
}
|
|
outer1_22(closure_0, "scrollAdjustUserOffset", tmp);
|
|
}
|
|
};
|
|
}, []);
|
|
const items23 = [current];
|
|
callback = obj.useEffect(() => () => {
|
|
if (undefined !== closure_30.queuedFullDrawDistancePrewarm) {
|
|
const _cancelAnimationFrame = cancelAnimationFrame;
|
|
cancelAnimationFrame(tmp.queuedFullDrawDistancePrewarm);
|
|
tmp.queuedFullDrawDistancePrewarm = undefined;
|
|
}
|
|
while (tmp4 !== undefined) {
|
|
let _clearTimeout = clearTimeout;
|
|
let clearTimeoutResult = clearTimeout(tmp5);
|
|
continue;
|
|
}
|
|
const timeouts = closure_30.timeouts;
|
|
timeouts.clear();
|
|
}, items23);
|
|
callback = obj.useLayoutEffect(() => {
|
|
const runPendingScrollToEnd = current.runPendingScrollToEnd;
|
|
if (null != runPendingScrollToEnd) {
|
|
const call = runPendingScrollToEnd.call;
|
|
if (typeof call === "unknown") {
|
|
const result = runPendingScrollToEnd();
|
|
} else {
|
|
call(current);
|
|
}
|
|
}
|
|
});
|
|
const items24 = [context, tmp60];
|
|
callback = obj.useEffect(() => {
|
|
|
|
}, items24);
|
|
callback = obj.useMemo(() => ({
|
|
getRenderedItem(arg0) {
|
|
let data;
|
|
let getItemType;
|
|
let indexByKey;
|
|
let props;
|
|
let renderItem;
|
|
const state = closure_22.state;
|
|
let tmp2 = null;
|
|
if (state) {
|
|
({ indexByKey, props } = state);
|
|
({ data, getItemType, renderItem } = props);
|
|
let value = indexByKey.get(arg0);
|
|
tmp2 = null;
|
|
if (undefined !== value) {
|
|
const values = tmp.values;
|
|
let tmp5 = renderItem;
|
|
value = values.get("extraData");
|
|
if (renderItem) {
|
|
tmp5 = null != tmp9;
|
|
}
|
|
let renderItemResult = null;
|
|
if (tmp5) {
|
|
let obj = { data: null, extraData: null, index: null, item: null, type: null };
|
|
obj[0] = data;
|
|
obj[1] = value;
|
|
obj[2] = value;
|
|
obj[3] = tmp9;
|
|
let str2 = "";
|
|
if (getItemType) {
|
|
const itemType = getItemType(tmp9, value);
|
|
str2 = "";
|
|
if (null != itemType) {
|
|
str2 = itemType;
|
|
}
|
|
}
|
|
obj[4] = str2;
|
|
renderItemResult = renderItem(obj);
|
|
}
|
|
obj = { index: null, item: null, renderedItem: null };
|
|
obj[0] = value;
|
|
obj[1] = data[value];
|
|
obj[2] = renderItemResult;
|
|
tmp2 = obj;
|
|
}
|
|
}
|
|
return tmp2;
|
|
},
|
|
onMomentumScrollEnd(arg0) {
|
|
outer1_63(closure_22);
|
|
if (closure_30.props.onMomentumScrollEnd) {
|
|
const props = tmp2.props;
|
|
props.onMomentumScrollEnd(arg0);
|
|
}
|
|
},
|
|
onScroll(nativeEvent) {
|
|
let didFinishInitialScroll2;
|
|
let initialScroll2;
|
|
let state = closure_22.state;
|
|
if (false !== state.scrollProcessingEnabled) {
|
|
const nativeEvent2 = nativeEvent.nativeEvent;
|
|
let contentSize;
|
|
if (null != nativeEvent2) {
|
|
contentSize = nativeEvent2.contentSize;
|
|
}
|
|
let height;
|
|
if (null != contentSize) {
|
|
height = contentSize.height;
|
|
}
|
|
if (0 !== height) {
|
|
nativeEvent = nativeEvent.nativeEvent;
|
|
let contentInset;
|
|
if (null != nativeEvent) {
|
|
contentInset = nativeEvent.contentInset;
|
|
}
|
|
let flag = false;
|
|
if (contentInset) {
|
|
contentInset = nativeEvent.nativeEvent.contentInset;
|
|
const nativeContentInset = state.nativeContentInset;
|
|
let tmp6 = nativeContentInset;
|
|
if (nativeContentInset) {
|
|
tmp6 = nativeContentInset.top === contentInset.top;
|
|
}
|
|
if (tmp6) {
|
|
tmp6 = nativeContentInset.bottom === contentInset.bottom;
|
|
}
|
|
if (tmp6) {
|
|
tmp6 = nativeContentInset.left === contentInset.left;
|
|
}
|
|
if (tmp6) {
|
|
tmp6 = nativeContentInset.right === contentInset.right;
|
|
}
|
|
flag = false;
|
|
if (!tmp6) {
|
|
state.nativeContentInset = contentInset;
|
|
flag = true;
|
|
}
|
|
}
|
|
let str = "y";
|
|
if (state.props.horizontal) {
|
|
str = "x";
|
|
}
|
|
let bound4 = nativeEvent.nativeEvent.contentOffset[str];
|
|
if (!state.props.horizontal) {
|
|
let didFinishInitialScroll = state.didFinishInitialScroll;
|
|
if (didFinishInitialScroll) {
|
|
const initialScroll = state.initialScroll;
|
|
let viewPosition;
|
|
if (null != initialScroll) {
|
|
viewPosition = initialScroll.viewPosition;
|
|
}
|
|
didFinishInitialScroll = 1 === viewPosition;
|
|
}
|
|
if (didFinishInitialScroll) {
|
|
didFinishInitialScroll = state.scroll > state.scrollLength;
|
|
}
|
|
state.lastNativeScroll = bound4;
|
|
const _Date = Date;
|
|
state.lastNativeScrollTime = Date.now();
|
|
if (state.scrollingTo) {
|
|
if (state.scrollingTo.offset >= bound4) {
|
|
const scrollingTo3 = state.scrollingTo;
|
|
const state3 = tmp.state;
|
|
const tmp65 = outer1_25(tmp);
|
|
const _Number7 = Number;
|
|
let bound1 = bound4;
|
|
if (Number.isFinite(tmp65)) {
|
|
const _Number6 = Number;
|
|
bound1 = bound4;
|
|
if (Number.isFinite(state3.scrollLength)) {
|
|
bound1 = bound4;
|
|
if (state3.lastLayout) {
|
|
const _Math13 = Math;
|
|
let viewOffset;
|
|
const bound = Math.max(0, tmp65 - state3.scrollLength);
|
|
if (null != scrollingTo3) {
|
|
viewOffset = scrollingTo3.viewOffset;
|
|
}
|
|
let num5 = 0;
|
|
if (typeof viewOffset === "number") {
|
|
num5 = 0;
|
|
if (viewOffset < 0) {
|
|
num5 = -viewOffset;
|
|
}
|
|
}
|
|
const _Math14 = Math;
|
|
bound1 = Math.min(bound4, bound + num5);
|
|
}
|
|
}
|
|
}
|
|
const _Math15 = Math;
|
|
const bound2 = Math.max(0, bound1);
|
|
if (bound4 !== bound2) {
|
|
const _Math16 = Math;
|
|
if (Math.abs(bound4 - bound2) > 1) {
|
|
let obj = { forceScroll: true, isInitialScroll: true, noScrollingTo: true, offset: null };
|
|
obj[3] = bound2;
|
|
outer1_72(tmp, obj);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
state.scrollPending = bound4;
|
|
outer1_70(tmp, tmp8, flag, { fromNativeScrollEvent: true });
|
|
obj = outer1_37;
|
|
let value = outer1_37.get(state);
|
|
if (value) {
|
|
if (obj.didReachTarget(bound4, value)) {
|
|
obj.clear(state);
|
|
}
|
|
const state2 = tmp.state;
|
|
({ initialScroll: initialScroll2, didFinishInitialScroll: didFinishInitialScroll2 } = state2);
|
|
let preservedEndAnchorCorrection = !didFinishInitialScroll2;
|
|
if (didFinishInitialScroll2) {
|
|
let scrollingTo = state2.scrollingTo;
|
|
let isInitialScroll;
|
|
if (null != scrollingTo) {
|
|
isInitialScroll = scrollingTo.isInitialScroll;
|
|
}
|
|
preservedEndAnchorCorrection = isInitialScroll;
|
|
}
|
|
if (!preservedEndAnchorCorrection) {
|
|
let viewPosition1;
|
|
if (null != initialScroll2) {
|
|
viewPosition1 = initialScroll2.viewPosition;
|
|
}
|
|
preservedEndAnchorCorrection = 1 !== viewPosition1;
|
|
}
|
|
if (!preservedEndAnchorCorrection) {
|
|
preservedEndAnchorCorrection = state2.preservedEndAnchorCorrection;
|
|
}
|
|
if (!preservedEndAnchorCorrection) {
|
|
if (outer1_82(tmp, initialScroll2)) {
|
|
let tmp46 = !initialScroll2;
|
|
if (initialScroll2) {
|
|
tmp46 = 1 !== initialScroll2.viewPosition;
|
|
}
|
|
if (!tmp46) {
|
|
let prop;
|
|
if (null != initialScroll2) {
|
|
prop = initialScroll2.preserveForBottomPadding;
|
|
}
|
|
let tmp49 = !tmp48;
|
|
if (!prop) {
|
|
let prop1;
|
|
if (null != initialScroll2) {
|
|
prop1 = initialScroll2.preserveForFooterLayout;
|
|
}
|
|
tmp49 = !prop1;
|
|
}
|
|
tmp46 = tmp49;
|
|
}
|
|
value = !tmp46;
|
|
if (value) {
|
|
const values = tmp.values;
|
|
value = values.get("isAtEnd");
|
|
}
|
|
if (!value) {
|
|
let prop2;
|
|
if (null != initialScroll2) {
|
|
prop2 = initialScroll2.preserveForFooterLayout;
|
|
}
|
|
if (prop2) {
|
|
obj = { dataLength: null, stylePaddingBottom: null, target: null };
|
|
obj[0] = state2.props.data.length;
|
|
const stylePaddingBottom = state2.props.stylePaddingBottom;
|
|
let num10 = 0;
|
|
if (null != stylePaddingBottom) {
|
|
num10 = stylePaddingBottom;
|
|
}
|
|
obj[1] = num10;
|
|
obj[2] = initialScroll2;
|
|
outer1_81(tmp, obj);
|
|
const tmp56 = outer1_81;
|
|
} else {
|
|
if (undefined !== state2.timeoutPreservedInitialScrollClear) {
|
|
const _clearTimeout = clearTimeout;
|
|
clearTimeout(state2.timeoutPreservedInitialScrollClear);
|
|
state2.timeoutPreservedInitialScrollClear = undefined;
|
|
}
|
|
state2.clearPreservedInitialScrollOnNextFinish = undefined;
|
|
state2.initialScroll = undefined;
|
|
outer1_38(state2);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (state.scrollingTo) {
|
|
let closure_0 = tmp;
|
|
const scrollingTo2 = tmp.state.scrollingTo;
|
|
const _requestAnimationFrame = requestAnimationFrame;
|
|
tmp.state.animFrameCheckFinishedScroll = requestAnimationFrame(() => {
|
|
const scrollingTo = tmp.state.scrollingTo;
|
|
if (scrollingTo) {
|
|
const state = tmp.state;
|
|
state.animFrameCheckFinishedScroll = undefined;
|
|
const tmp3 = outer1_62(tmp, scrollingTo);
|
|
let isAtResolvedTarget = tmp3.isAtResolvedTarget;
|
|
if (isAtResolvedTarget) {
|
|
const isInitialScroll = scrollingTo.isInitialScroll;
|
|
let hasScrolled = !isInitialScroll;
|
|
if (isInitialScroll) {
|
|
hasScrolled = state.hasScrolled;
|
|
}
|
|
if (!hasScrolled) {
|
|
hasScrolled = tmp3.clampedTargetOffset <= 1;
|
|
}
|
|
isAtResolvedTarget = hasScrolled;
|
|
}
|
|
if (isAtResolvedTarget) {
|
|
outer1_60(tmp);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
if (state.props.onScroll) {
|
|
let props = state.props;
|
|
props.onScroll(nativeEvent);
|
|
}
|
|
}
|
|
if (value) {
|
|
state.hasScrolled = false;
|
|
({ startScroll: obj2[0], targetOffset: obj2[1] } = value);
|
|
const result = obj.set(state, { startScroll: null, targetOffset: null });
|
|
const obj1 = { startScroll: null, targetOffset: null };
|
|
}
|
|
} else {
|
|
const contentSize2 = nativeEvent.nativeEvent.contentSize;
|
|
if (null != contentSize2) {
|
|
let _Math = contentSize2.width;
|
|
}
|
|
props = undefined;
|
|
if (null != state) {
|
|
props = state.props;
|
|
}
|
|
let horizontal;
|
|
if (null != props) {
|
|
horizontal = props.horizontal;
|
|
}
|
|
let tmp11 = horizontal;
|
|
if (tmp11) {
|
|
let rtl;
|
|
if (null != props) {
|
|
rtl = props.rtl;
|
|
}
|
|
if (null == rtl) {
|
|
rtl = outer1_11.I18nManager.isRTL;
|
|
}
|
|
tmp11 = rtl;
|
|
}
|
|
if (tmp11) {
|
|
if (undefined !== _Math) {
|
|
const _Number = Number;
|
|
if (Number.isFinite(_Math)) {
|
|
const _Number2 = Number;
|
|
if (Number.isFinite(state.scrollLength)) {
|
|
if (_Math > state.scrollLength) {
|
|
const _Math2 = Math;
|
|
let bound3 = Math.max(0, _Math - state.scrollLength);
|
|
}
|
|
if (bound4 < 0) {
|
|
state.horizontalRTLScrollType = "negative";
|
|
bound4 = tmp26;
|
|
if (undefined !== bound3) {
|
|
const _Math12 = Math;
|
|
_Math = Math;
|
|
bound4 = Math.max(0, Math.min(bound3, tmp26));
|
|
}
|
|
let tmp14 = bound4;
|
|
} else {
|
|
tmp14 = bound4;
|
|
if (undefined !== bound3) {
|
|
const diff = bound3 - bound4;
|
|
const _Number5 = Number;
|
|
if (Number.isFinite(diff)) {
|
|
_Math = state.horizontalRTLScrollType;
|
|
if ("inverted" === _Math) {
|
|
let bound5 = diff;
|
|
if (!tmp63) {
|
|
_Math = Math;
|
|
const _Math11 = Math;
|
|
bound5 = Math.max(0, Math.min(bound3, diff));
|
|
}
|
|
tmp14 = bound5;
|
|
} else {
|
|
let str4 = "normal";
|
|
if ("normal" === _Math) {
|
|
let bound6 = bound4;
|
|
if (!tmp63) {
|
|
const _Math9 = Math;
|
|
const _Math10 = Math;
|
|
bound6 = Math.max(0, Math.min(bound3, bound4));
|
|
}
|
|
tmp14 = bound6;
|
|
} else if (state.hasScrolled) {
|
|
const scroll = state.scroll;
|
|
const _Math5 = Math;
|
|
const _Math6 = Math;
|
|
const absolute = Math.abs(bound4 - scroll);
|
|
_Math = Math.abs(diff - scroll) + 0.5;
|
|
if (_Math < absolute) {
|
|
str4 = "inverted";
|
|
}
|
|
state.horizontalRTLScrollType = str4;
|
|
let tmp22 = bound4;
|
|
if (_Math < absolute) {
|
|
tmp22 = diff;
|
|
}
|
|
let bound7 = tmp22;
|
|
if (!tmp63) {
|
|
const _Math7 = Math;
|
|
const _Math8 = Math;
|
|
bound7 = Math.max(0, Math.min(bound3, tmp22));
|
|
}
|
|
tmp14 = bound7;
|
|
} else {
|
|
state.horizontalRTLScrollType = "inverted";
|
|
_Math = diff;
|
|
if (!tmp63) {
|
|
const _Math3 = Math;
|
|
const _Math4 = Math;
|
|
_Math = Math.max(0, Math.min(bound3, diff));
|
|
}
|
|
tmp14 = _Math;
|
|
}
|
|
}
|
|
} else {
|
|
state.horizontalRTLScrollType = "normal";
|
|
tmp14 = bound4;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
let num2;
|
|
if (undefined !== _Math) {
|
|
const _Number3 = Number;
|
|
if (Number.isFinite(_Math)) {
|
|
const _Number4 = Number;
|
|
if (Number.isFinite(state.scrollLength)) {
|
|
num2 = 0;
|
|
}
|
|
}
|
|
}
|
|
bound3 = num2;
|
|
} else {
|
|
state.horizontalRTLScrollType = undefined;
|
|
tmp14 = bound4;
|
|
}
|
|
}
|
|
} else {
|
|
contentSize = nativeEvent.nativeEvent.contentSize;
|
|
let width;
|
|
if (null != contentSize) {
|
|
width = contentSize.width;
|
|
}
|
|
}
|
|
}
|
|
},
|
|
onScrollBeginDrag(arg0) {
|
|
if (closure_22.state.edgeReachedGate) {
|
|
closure_22.state.edgeReachedGate = "prepared";
|
|
}
|
|
const props = closure_30.props;
|
|
const onScrollBeginDrag = props.onScrollBeginDrag;
|
|
if (null != onScrollBeginDrag) {
|
|
const call = onScrollBeginDrag.call;
|
|
if (typeof call === "unknown") {
|
|
onScrollBeginDrag(arg0);
|
|
} else {
|
|
call(props, arg0);
|
|
}
|
|
}
|
|
},
|
|
onScrollEnd() {
|
|
if (closure_22.state.edgeReachedGate) {
|
|
closure_22.state.edgeReachedGate = "prepared";
|
|
}
|
|
}
|
|
}), []);
|
|
onScroll = callback.onScroll;
|
|
callback = undefined;
|
|
callback = !context.state.props.stickyPositionComponentInternal;
|
|
callback = undefined;
|
|
if (null != stickyHeaderIndices) {
|
|
callback = stickyHeaderIndices.join(",");
|
|
}
|
|
const items25 = [callback, horizontal, callback];
|
|
const Fragment = obj13.Fragment;
|
|
const obj18 = {};
|
|
callback = obj18;
|
|
callback = tmp13;
|
|
callback = obj22.useMemo(() => {
|
|
let length;
|
|
if (null != stickyHeaderIndices) {
|
|
length = stickyHeaderIndices.length;
|
|
}
|
|
if (length) {
|
|
if (callback) {
|
|
const Animated = viewabilityConfig.Animated;
|
|
let str = "y";
|
|
if (horizontal) {
|
|
str = "x";
|
|
}
|
|
let obj = { nativeEvent: null };
|
|
obj = { contentOffset: null };
|
|
obj = {};
|
|
obj[str] = context.animatedScrollY;
|
|
obj[0] = obj;
|
|
obj[0] = obj;
|
|
const items = [obj];
|
|
const obj1 = { listener: null, useNativeDriver: true };
|
|
obj1[0] = onScroll;
|
|
return Animated.event(items, obj1);
|
|
}
|
|
}
|
|
return onScroll;
|
|
}, items25);
|
|
({ createElement, createElement: createElement2 } = obj13);
|
|
callback = closure_131;
|
|
callback = Object.assign(tmp13);
|
|
obj18.alignItemsAtEnd = tmp8;
|
|
obj18.canRender = tmp67;
|
|
obj18.contentContainerStyle = obj;
|
|
obj18.contentInset = contentInset;
|
|
obj18.getRenderedItem = callback.getRenderedItem;
|
|
obj18.horizontal = horizontal;
|
|
obj18.initialContentOffset = callback;
|
|
callback = undefined;
|
|
if (0 === data.length) {
|
|
callback = ListEmptyComponent;
|
|
}
|
|
obj18.ListEmptyComponent = callback;
|
|
obj18.ListFooterComponent = ListFooterComponent;
|
|
obj18.ListFooterComponentStyle = ListFooterComponentStyle;
|
|
obj18.ListHeaderComponent = ListHeaderComponent;
|
|
({ onScrollBeginDrag: obj27.onInternalScrollBeginDrag, onScrollEnd: obj27.onInternalScrollEnd } = callback);
|
|
obj18.onLayout = callback;
|
|
obj18.onLayoutFooter = callback;
|
|
obj18.onMomentumScrollEnd = callback.onMomentumScrollEnd;
|
|
obj18.onScroll = callback;
|
|
obj18.recycleItems = tmp11;
|
|
if (refreshControl) {
|
|
callback = refreshControl;
|
|
if (tmp38 > 0) {
|
|
const progressViewOffset2 = refreshControl.props.progressViewOffset;
|
|
let num21 = 0;
|
|
if (null != progressViewOffset2) {
|
|
num21 = progressViewOffset2;
|
|
}
|
|
const obj19 = { progressViewOffset: null };
|
|
obj19[0] = num21 + tmp38;
|
|
callback = obj13.cloneElement(refreshControl, obj19);
|
|
}
|
|
} else {
|
|
callback = onRefresh;
|
|
if (onRefresh) {
|
|
callback = viewabilityConfig;
|
|
const obj20 = { onRefresh: null, progressViewOffset: null, refreshing: null };
|
|
obj20[0] = onRefresh;
|
|
if (!progressViewOffset) {
|
|
progressViewOffset = 0;
|
|
}
|
|
obj20[1] = progressViewOffset + tmp38;
|
|
obj20[2] = refreshing;
|
|
callback = <viewabilityConfig.RefreshControl onRefresh={null} progressViewOffset={null} refreshing={null} />;
|
|
}
|
|
}
|
|
obj18.refreshControl = callback;
|
|
obj18.refScrollView = useCombinedRef(ref, refScrollView);
|
|
obj18.renderScrollComponent = renderScrollComponent;
|
|
let current2 = ref1.current;
|
|
callback = undefined;
|
|
if (null != current2) {
|
|
callback = current2.scrollAdjustHandler;
|
|
}
|
|
obj18.scrollAdjustHandler = callback;
|
|
obj18.scrollEventThrottle = 0;
|
|
obj18.snapToIndices = snapToIndices;
|
|
obj18.stickyHeaderIndices = stickyHeaderIndices;
|
|
obj18.style = obj1;
|
|
obj18.useWindowScroll = false;
|
|
callback = createElement2(callback, obj18);
|
|
if (callback) {
|
|
callback = memo1;
|
|
}
|
|
callback = obj13;
|
|
callback = Fragment;
|
|
callback = null;
|
|
return <>{callback}{callback}</>;
|
|
} else if (true === tmp10) {
|
|
const obj21 = {};
|
|
const merged4 = Object.assign(normalizeMaintainScrollAtEndOn(undefined, false));
|
|
obj21.animated = false;
|
|
obj22 = obj21;
|
|
} else {
|
|
obj22 = {};
|
|
const merged5 = Object.assign(normalizeMaintainScrollAtEndOn(tmp10.on, "on" in tmp10));
|
|
const animated = tmp10.animated;
|
|
obj22.animated = null != animated && animated;
|
|
}
|
|
tmp40 = extractPadding(obj1, obj, "Left");
|
|
}
|
|
obj = {};
|
|
} else if (horizontal) {
|
|
let minWidth;
|
|
if (!tmp20) {
|
|
minWidth = flattenResult.minWidth;
|
|
}
|
|
let tmp22 = null == minWidth;
|
|
} else {
|
|
let minHeight1;
|
|
if (!tmp20) {
|
|
minHeight1 = flattenResult.minHeight;
|
|
}
|
|
tmp22 = null == minHeight1;
|
|
}
|
|
});
|
|
|
|
export const LegendList = memo(forwardRef(function LegendList2(renderItem, ref) {
|
|
let children;
|
|
let createElement;
|
|
let createElement2;
|
|
let data;
|
|
({ children, data } = renderItem);
|
|
const tmp = _objectWithoutProperties(renderItem, closure_7);
|
|
if (undefined !== children) {
|
|
if (undefined === data) {
|
|
let obj = {};
|
|
const merged = Object.assign(tmp);
|
|
obj.childrenMode = true;
|
|
const _Array = Array;
|
|
let toArrayResult = children;
|
|
if (!Array.isArray(children)) {
|
|
const Children = frozen.Children;
|
|
toArrayResult = Children.toArray(children);
|
|
}
|
|
obj.data = toArrayResult.flat(1);
|
|
obj.renderItem = function renderItem(item) {
|
|
return item.item;
|
|
};
|
|
let tmp3 = obj;
|
|
}
|
|
obj = {};
|
|
({ createElement, createElement: createElement2 } = frozen);
|
|
const merged1 = Object.assign(tmp3);
|
|
obj.ref = ref;
|
|
return <StateProvider>{createElement2(closure_141, obj)}</StateProvider>;
|
|
}
|
|
obj = {};
|
|
const merged2 = Object.assign(tmp);
|
|
if (!data) {
|
|
data = [];
|
|
}
|
|
obj.data = data;
|
|
obj.renderItem = renderItem.renderItem;
|
|
tmp3 = obj;
|
|
}));
|
|
export const internal = { getComponent, getStickyPushLimit, IsNewArchitecture: undefined !== nativeFabricUIManager && null != nativeFabricUIManager, POSITION_OUT_OF_VIEW: -10000000, peek$, typedForwardRef: forwardRef, typedMemo: memo, useArr$, useCombinedRef, useLatestRef, useStableRenderComponent, useStateContext };
|
|
export const useAdaptiveRender = function useAdaptiveRender() {
|
|
const items = ["adaptiveRender"];
|
|
const context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
let first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = frozen.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
return _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0];
|
|
};
|
|
export const useAdaptiveRenderChange = function useAdaptiveRenderChange(current) {
|
|
const context = frozen.useContext(closure_17);
|
|
const ref = noop.useRef(current);
|
|
ref.current = current;
|
|
const items = [context];
|
|
const layoutEffect = noop.useLayoutEffect(() => {
|
|
const values = fn.values;
|
|
fn = values.get("adaptiveRender");
|
|
fn = (AUTO_DISMISS) => {
|
|
if (closure_0 !== AUTO_DISMISS) {
|
|
closure_0 = AUTO_DISMISS;
|
|
set.current(AUTO_DISMISS);
|
|
}
|
|
};
|
|
let set;
|
|
const listeners = fn.listeners;
|
|
const value = listeners.get("adaptiveRender");
|
|
set = value;
|
|
let obj = value;
|
|
if (!value) {
|
|
const _Set = Set;
|
|
set = new Set();
|
|
const result = listeners.set("adaptiveRender", set);
|
|
obj = set;
|
|
}
|
|
obj.add(fn);
|
|
return () => set.delete(closure_0);
|
|
}, items);
|
|
};
|
|
export { useIsLastItem };
|
|
export const useListScrollSize = function useListScrollSize() {
|
|
const items = ["scrollSize"];
|
|
const context = frozen.useContext(closure_17);
|
|
if (1 === items.length) {
|
|
let first = items[0];
|
|
} else {
|
|
first = items.join("\0");
|
|
}
|
|
const items1 = [context, first];
|
|
const memo = frozen.useMemo(() => {
|
|
closure_1 = closure_1.split("\0");
|
|
let closure_2 = [];
|
|
let closure_3 = [];
|
|
return {
|
|
get() {
|
|
let arr2;
|
|
const items = [];
|
|
let num = 0;
|
|
let flag = false;
|
|
let flag2 = false;
|
|
if (0 < items.length) {
|
|
do {
|
|
let tmp = values;
|
|
values = values.values;
|
|
arr2 = items;
|
|
let value = values.get(items[num]);
|
|
let arr = items.push(value);
|
|
let tmp4 = items;
|
|
let tmp5 = num;
|
|
let flag3 = flag;
|
|
if (value !== items[num]) {
|
|
flag3 = true;
|
|
}
|
|
num = num + 1;
|
|
flag = flag3;
|
|
flag2 = flag3;
|
|
} while (num < arr2.length);
|
|
}
|
|
return items;
|
|
},
|
|
subscribe(arg0) {
|
|
const items = [];
|
|
while (tmp2 !== undefined) {
|
|
let tmp4 = outer1_20;
|
|
let tmp5 = items;
|
|
let arr = items.push(outer1_20(items, tmp3, arg0));
|
|
continue;
|
|
}
|
|
return () => {
|
|
for (const item10005 of items) {
|
|
let item10005Result = item10005();
|
|
continue;
|
|
}
|
|
};
|
|
}
|
|
};
|
|
}, items1);
|
|
const get = memo.get;
|
|
return _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0];
|
|
};
|
|
export const useRecyclingEffect = function useRecyclingEffect(arg0) {
|
|
let closure_0 = arg0;
|
|
const tmp = useContainerItemSignals(noop.useContext(closure_115));
|
|
const hasItemInfo = tmp.hasItemInfo;
|
|
const item = tmp.item;
|
|
const itemIndex = tmp.itemIndex;
|
|
let closure_4 = noop.useRef(undefined);
|
|
const items = [arg0, hasItemInfo, itemIndex, item, tmp.itemKey];
|
|
const effect = noop.useEffect(() => {
|
|
if (hasItemInfo) {
|
|
let tmp2;
|
|
if (ref.current) {
|
|
let obj = { index: null, item: null, prevIndex: null, prevItem: null };
|
|
obj[0] = itemIndex;
|
|
obj[1] = item;
|
|
obj[2] = tmp.current.index;
|
|
obj[3] = tmp.current.item;
|
|
tmp2 = callback(obj);
|
|
}
|
|
obj = { index: null, item: null };
|
|
obj[0] = itemIndex;
|
|
obj[1] = item;
|
|
ref.current = obj;
|
|
return tmp2;
|
|
}
|
|
}, items);
|
|
};
|
|
export const useRecyclingState = function useRecyclingState(fn) {
|
|
let closure_0 = fn;
|
|
let obj = noop;
|
|
const context = noop.useContext(closure_115);
|
|
const tmp2 = useContainerItemSignals(context);
|
|
const hasItemInfo = tmp2.hasItemInfo;
|
|
const item = tmp2.item;
|
|
const itemIndex = tmp2.itemIndex;
|
|
const itemKey = tmp2.itemKey;
|
|
function computeValue(noop, arg1) {
|
|
|
|
}
|
|
const tmp3 = computeValue(noop.useState(() => {
|
|
if (typeof computeValue !== "function") {
|
|
HermesBuiltin.throwTypeError();
|
|
}
|
|
if (typeof closure_0 !== "function") {
|
|
return tmp;
|
|
} else if (hasItemInfo) {
|
|
const obj = { index: null, item: null, prevIndex: "r", prevItem: "T" };
|
|
obj[0] = itemIndex;
|
|
obj[1] = item;
|
|
let tmpResult = tmp(obj);
|
|
} else {
|
|
tmpResult = tmp();
|
|
}
|
|
}), 2);
|
|
let closure_5 = tmp4;
|
|
let tmp5 = null;
|
|
if (hasItemInfo) {
|
|
tmp5 = itemKey;
|
|
}
|
|
const ref = noop.useRef(tmp5);
|
|
let tmp7 = hasItemInfo;
|
|
if (hasItemInfo) {
|
|
tmp7 = ref.current !== itemKey;
|
|
}
|
|
if (tmp7) {
|
|
ref.current = itemKey;
|
|
if (typeof fn !== "function") {
|
|
tmp4(fn);
|
|
} else if (hasItemInfo) {
|
|
obj = { index: null, item: null, prevIndex: "r", prevItem: "T" };
|
|
obj[0] = itemIndex;
|
|
obj[1] = item;
|
|
let tmp9 = fn(obj);
|
|
} else {
|
|
tmp9 = fn();
|
|
}
|
|
}
|
|
let triggerLayout;
|
|
if (null != context) {
|
|
triggerLayout = context.triggerLayout;
|
|
}
|
|
const items = [tmp3[0], ];
|
|
const items1 = [triggerLayout];
|
|
items[1] = obj.useCallback((arg0) => {
|
|
let closure_0 = arg0;
|
|
if (triggerLayout) {
|
|
tmp4((arg0) => {
|
|
let tmpResult = closure_0;
|
|
if (typeof closure_0 === "function") {
|
|
tmpResult = tmp(arg0);
|
|
}
|
|
return tmpResult;
|
|
});
|
|
tmp();
|
|
}
|
|
}, items1);
|
|
return items;
|
|
};
|
|
export const useSyncLayout = function useSyncLayout() {
|
|
const context = noop.useContext(closure_115);
|
|
if (closure_27) {
|
|
if (context) {
|
|
let triggerLayout = context.triggerLayout;
|
|
}
|
|
return triggerLayout;
|
|
}
|
|
triggerLayout = noop;
|
|
};
|
|
export const useViewability = function useViewability(arg0, arg1) {
|
|
let f95494 = arg0;
|
|
let closure_1 = arg1;
|
|
const context = frozen.useContext(closure_17);
|
|
const context1 = noop.useContext(closure_115);
|
|
f95494 = () => {
|
|
if (context1) {
|
|
let str = "";
|
|
if (null != closure_1) {
|
|
str = closure_1;
|
|
}
|
|
const mapViewabilityValues = context.mapViewabilityValues;
|
|
const value = mapViewabilityValues.get(context1.containerId + str);
|
|
if (value) {
|
|
f95494(value);
|
|
}
|
|
}
|
|
};
|
|
const state = noop.useState(() => f95496());
|
|
const items = [context, arg0, arg1, context1];
|
|
const effect = noop.useEffect(() => {
|
|
if (context1) {
|
|
let str = "";
|
|
if (null != closure_1) {
|
|
str = closure_1;
|
|
}
|
|
const sum = context1.containerId + str;
|
|
const f95494 = sum;
|
|
const result = context.mapViewabilityCallbacks.set(sum, f95494);
|
|
return () => {
|
|
outer1_2.mapViewabilityCallbacks.delete(closure_0);
|
|
};
|
|
}
|
|
}, items);
|
|
};
|
|
export const useViewabilityAmount = function useViewabilityAmount(arg0) {
|
|
let f95496 = arg0;
|
|
const context = frozen.useContext(closure_17);
|
|
const context1 = noop.useContext(closure_115);
|
|
f95496 = () => {
|
|
if (context1) {
|
|
const mapViewabilityAmountValues = context.mapViewabilityAmountValues;
|
|
const value = mapViewabilityAmountValues.get(context1.containerId);
|
|
if (value) {
|
|
f95496(value);
|
|
}
|
|
}
|
|
};
|
|
const state = noop.useState(() => f95496());
|
|
const items = [context, arg0, context1];
|
|
const effect = noop.useEffect(() => {
|
|
if (context1) {
|
|
const containerId = context1.containerId;
|
|
const result = context.mapViewabilityAmountCallbacks.set(containerId, containerId);
|
|
return () => {
|
|
outer1_1.mapViewabilityAmountCallbacks.delete(containerId);
|
|
};
|
|
}
|
|
}, items);
|
|
};
|