mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
82 lines
5.2 KiB
Java
82 lines
5.2 KiB
Java
|
package androidx.compose.foundation.lazy.grid;
|
||
|
|
||
|
import io.sentry.protocol.SentryTransaction;
|
||
|
import java.util.List;
|
||
|
import kotlin.Metadata;
|
||
|
import kotlin.Unit;
|
||
|
import kotlin.jvm.internal.Intrinsics;
|
||
|
import kotlin.ranges.RangesKt;
|
||
|
|
||
|
/* compiled from: LazyGridMeasuredLine.kt */
|
||
|
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0012\b\u0000\u0018\u00002\u00020\u0001BD\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\f\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u000b0\n\u0012\u0006\u0010\f\u001a\u00020\r\u0012\u0006\u0010\u000e\u001a\u00020\u0003ø\u0001\u0000¢\u0006\u0002\u0010\u000fJ\u0006\u0010\u0019\u001a\u00020\rJ)\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\u00060\u00052\u0006\u0010\u001b\u001a\u00020\u00032\u0006\u0010\u001c\u001a\u00020\u00032\u0006\u0010\u001d\u001a\u00020\u0003¢\u0006\u0002\u0010\u001eR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u000e\u0010\f\u001a\u00020\rX\u0082\u0004¢\u0006\u0002\n\u0000R\u0019\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\n\n\u0002\u0010\u0014\u001a\u0004\b\u0012\u0010\u0013R\u0011\u0010\u0015\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u0011R\u0011\u0010\u0017\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u0011R\u000e\u0010\u000e\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u0017\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u000b0\nX\u0082\u0004ø\u0001\u0000¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001f"}, d2 = {"Landroidx/compose/foundation/lazy/grid/LazyGridMeasuredLine;", "", "index", "", "items", "", "Landroidx/compose/foundation/lazy/grid/LazyGridMeasuredItem;", "slots", "Landroidx/compose/foundation/lazy/grid/LazyGridSlots;", SentryTransaction.JsonKeys.SPANS, "", "Landroidx/compose/foundation/lazy/grid/GridItemSpan;", "isVertical", "", "mainAxisSpacing", "(I[Landroidx/compose/foundation/lazy/grid/LazyGridMeasuredItem;Landroidx/compose/foundation/lazy/grid/LazyGridSlots;Ljava/util/List;ZI)V", "getIndex", "()I", "getItems", "()[Landroidx/compose/foundation/lazy/grid/LazyGridMeasuredItem;", "[Landroidx/compose/foundation/lazy/grid/LazyGridMeasuredItem;", "mainAxisSize", "getMainAxisSize", "mainAxisSizeWithSpacings", "getMainAxisSizeWithSpacings", "isEmpty", "position", "offset", "layoutWidth", "layoutHeight", "(III)[Landroidx/compose/foundation/lazy/grid/LazyGridMeasuredItem;", "foundation_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class LazyGridMeasuredLine {
|
||
|
private final int index;
|
||
|
private final boolean isVertical;
|
||
|
private final LazyGridMeasuredItem[] items;
|
||
|
private final int mainAxisSize;
|
||
|
private final int mainAxisSizeWithSpacings;
|
||
|
private final int mainAxisSpacing;
|
||
|
private final LazyGridSlots slots;
|
||
|
private final List<GridItemSpan> spans;
|
||
|
|
||
|
public final int getIndex() {
|
||
|
return this.index;
|
||
|
}
|
||
|
|
||
|
public final LazyGridMeasuredItem[] getItems() {
|
||
|
return this.items;
|
||
|
}
|
||
|
|
||
|
public final int getMainAxisSize() {
|
||
|
return this.mainAxisSize;
|
||
|
}
|
||
|
|
||
|
public final int getMainAxisSizeWithSpacings() {
|
||
|
return this.mainAxisSizeWithSpacings;
|
||
|
}
|
||
|
|
||
|
public LazyGridMeasuredLine(int i, LazyGridMeasuredItem[] items, LazyGridSlots slots, List<GridItemSpan> spans, boolean z, int i2) {
|
||
|
Intrinsics.checkNotNullParameter(items, "items");
|
||
|
Intrinsics.checkNotNullParameter(slots, "slots");
|
||
|
Intrinsics.checkNotNullParameter(spans, "spans");
|
||
|
this.index = i;
|
||
|
this.items = items;
|
||
|
this.slots = slots;
|
||
|
this.spans = spans;
|
||
|
this.isVertical = z;
|
||
|
this.mainAxisSpacing = i2;
|
||
|
int i3 = 0;
|
||
|
for (LazyGridMeasuredItem lazyGridMeasuredItem : items) {
|
||
|
i3 = Math.max(i3, lazyGridMeasuredItem.getMainAxisSize());
|
||
|
}
|
||
|
this.mainAxisSize = i3;
|
||
|
this.mainAxisSizeWithSpacings = RangesKt.coerceAtLeast(i3 + this.mainAxisSpacing, 0);
|
||
|
}
|
||
|
|
||
|
public final boolean isEmpty() {
|
||
|
return this.items.length == 0;
|
||
|
}
|
||
|
|
||
|
public final LazyGridMeasuredItem[] position(int offset, int layoutWidth, int layoutHeight) {
|
||
|
LazyGridMeasuredItem[] lazyGridMeasuredItemArr = this.items;
|
||
|
int length = lazyGridMeasuredItemArr.length;
|
||
|
int i = 0;
|
||
|
int i2 = 0;
|
||
|
int i3 = 0;
|
||
|
while (i < length) {
|
||
|
LazyGridMeasuredItem lazyGridMeasuredItem = lazyGridMeasuredItemArr[i];
|
||
|
int i4 = i2 + 1;
|
||
|
int m609getCurrentLineSpanimpl = GridItemSpan.m609getCurrentLineSpanimpl(this.spans.get(i2).getPackedValue());
|
||
|
int i5 = this.slots.getPositions()[i3];
|
||
|
boolean z = this.isVertical;
|
||
|
lazyGridMeasuredItem.position(offset, i5, layoutWidth, layoutHeight, z ? this.index : i3, z ? i3 : this.index);
|
||
|
Unit unit = Unit.INSTANCE;
|
||
|
i3 += m609getCurrentLineSpanimpl;
|
||
|
i++;
|
||
|
i2 = i4;
|
||
|
}
|
||
|
return this.items;
|
||
|
}
|
||
|
}
|