mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-28 18:12:31 -06:00
156 lines
11 KiB
Java
156 lines
11 KiB
Java
package androidx.compose.foundation.layout;
|
|
|
|
import androidx.compose.ui.Alignment;
|
|
import androidx.compose.ui.node.ModifierNodeElement;
|
|
import androidx.compose.ui.platform.InspectorInfo;
|
|
import androidx.compose.ui.unit.IntOffset;
|
|
import androidx.compose.ui.unit.IntOffsetKt;
|
|
import androidx.compose.ui.unit.IntSize;
|
|
import androidx.compose.ui.unit.LayoutDirection;
|
|
import io.sentry.protocol.ViewHierarchyNode;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* compiled from: Size.kt */
|
|
@Metadata(d1 = {"\u0000P\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0002\u0018\u0000 \u001b2\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0001\u001bBB\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0018\u0010\u0007\u001a\u0014\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\n\u0012\u0004\u0012\u00020\u000b0\b\u0012\u0006\u0010\f\u001a\u00020\r\u0012\u0006\u0010\u000e\u001a\u00020\u000fø\u0001\u0000¢\u0006\u0002\u0010\u0010J\b\u0010\u0011\u001a\u00020\u0002H\u0016J\u0013\u0010\u0012\u001a\u00020\u00062\b\u0010\u0013\u001a\u0004\u0018\u00010\rH\u0096\u0002J\b\u0010\u0014\u001a\u00020\u0015H\u0016J\u0010\u0010\u0016\u001a\u00020\u00172\u0006\u0010\u0018\u001a\u00020\u0002H\u0016J\f\u0010\u0019\u001a\u00020\u0017*\u00020\u001aH\u0016R\u000e\u0010\f\u001a\u00020\rX\u0082\u0004¢\u0006\u0002\n\u0000R#\u0010\u0007\u001a\u0014\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\n\u0012\u0004\u0012\u00020\u000b0\bX\u0082\u0004ø\u0001\u0000¢\u0006\u0002\n\u0000R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\u000fX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001c"}, d2 = {"Landroidx/compose/foundation/layout/WrapContentElement;", "Landroidx/compose/ui/node/ModifierNodeElement;", "Landroidx/compose/foundation/layout/WrapContentNode;", "direction", "Landroidx/compose/foundation/layout/Direction;", "unbounded", "", "alignmentCallback", "Lkotlin/Function2;", "Landroidx/compose/ui/unit/IntSize;", "Landroidx/compose/ui/unit/LayoutDirection;", "Landroidx/compose/ui/unit/IntOffset;", "align", "", "inspectorName", "", "(Landroidx/compose/foundation/layout/Direction;ZLkotlin/jvm/functions/Function2;Ljava/lang/Object;Ljava/lang/String;)V", "create", "equals", "other", "hashCode", "", "update", "", "node", "inspectableProperties", "Landroidx/compose/ui/platform/InspectorInfo;", "Companion", "foundation-layout_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
final class WrapContentElement extends ModifierNodeElement<WrapContentNode> {
|
|
|
|
/* renamed from: Companion, reason: from kotlin metadata */
|
|
public static final Companion INSTANCE = new Companion(null);
|
|
private final Object align;
|
|
private final Function2<IntSize, LayoutDirection, IntOffset> alignmentCallback;
|
|
private final Direction direction;
|
|
private final String inspectorName;
|
|
private final boolean unbounded;
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public WrapContentElement(Direction direction, boolean z, Function2<? super IntSize, ? super LayoutDirection, IntOffset> alignmentCallback, Object align, String inspectorName) {
|
|
Intrinsics.checkNotNullParameter(direction, "direction");
|
|
Intrinsics.checkNotNullParameter(alignmentCallback, "alignmentCallback");
|
|
Intrinsics.checkNotNullParameter(align, "align");
|
|
Intrinsics.checkNotNullParameter(inspectorName, "inspectorName");
|
|
this.direction = direction;
|
|
this.unbounded = z;
|
|
this.alignmentCallback = alignmentCallback;
|
|
this.align = align;
|
|
this.inspectorName = inspectorName;
|
|
}
|
|
|
|
/* JADX WARN: Can't rename method to resolve collision */
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public WrapContentNode create() {
|
|
return new WrapContentNode(this.direction, this.unbounded, this.alignmentCallback);
|
|
}
|
|
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public void update(WrapContentNode node) {
|
|
Intrinsics.checkNotNullParameter(node, "node");
|
|
node.setDirection(this.direction);
|
|
node.setUnbounded(this.unbounded);
|
|
node.setAlignmentCallback(this.alignmentCallback);
|
|
}
|
|
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public void inspectableProperties(InspectorInfo inspectorInfo) {
|
|
Intrinsics.checkNotNullParameter(inspectorInfo, "<this>");
|
|
inspectorInfo.setName(this.inspectorName);
|
|
inspectorInfo.getProperties().set("align", this.align);
|
|
inspectorInfo.getProperties().set("unbounded", Boolean.valueOf(this.unbounded));
|
|
}
|
|
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public boolean equals(Object other) {
|
|
if (this == other) {
|
|
return true;
|
|
}
|
|
if (!Intrinsics.areEqual(getClass(), other != null ? other.getClass() : null)) {
|
|
return false;
|
|
}
|
|
Intrinsics.checkNotNull(other, "null cannot be cast to non-null type androidx.compose.foundation.layout.WrapContentElement");
|
|
WrapContentElement wrapContentElement = (WrapContentElement) other;
|
|
return this.direction == wrapContentElement.direction && this.unbounded == wrapContentElement.unbounded && Intrinsics.areEqual(this.align, wrapContentElement.align);
|
|
}
|
|
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public int hashCode() {
|
|
return (((this.direction.hashCode() * 31) + Boolean.hashCode(this.unbounded)) * 31) + this.align.hashCode();
|
|
}
|
|
|
|
/* compiled from: Size.kt */
|
|
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0018\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0007J\u0018\u0010\t\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\n2\u0006\u0010\u0007\u001a\u00020\bH\u0007J\u0018\u0010\u000b\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\f2\u0006\u0010\u0007\u001a\u00020\bH\u0007¨\u0006\r"}, d2 = {"Landroidx/compose/foundation/layout/WrapContentElement$Companion;", "", "()V", ViewHierarchyNode.JsonKeys.HEIGHT, "Landroidx/compose/foundation/layout/WrapContentElement;", "align", "Landroidx/compose/ui/Alignment$Vertical;", "unbounded", "", "size", "Landroidx/compose/ui/Alignment;", ViewHierarchyNode.JsonKeys.WIDTH, "Landroidx/compose/ui/Alignment$Horizontal;", "foundation-layout_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
|
|
public final WrapContentElement width(final Alignment.Horizontal align, boolean unbounded) {
|
|
Intrinsics.checkNotNullParameter(align, "align");
|
|
return new WrapContentElement(Direction.Horizontal, unbounded, new Function2<IntSize, LayoutDirection, IntOffset>() { // from class: androidx.compose.foundation.layout.WrapContentElement$Companion$width$1
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
{
|
|
super(2);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
public /* bridge */ /* synthetic */ IntOffset invoke(IntSize intSize, LayoutDirection layoutDirection) {
|
|
return IntOffset.m4992boximpl(m592invoke5SAbXVA(intSize.getPackedValue(), layoutDirection));
|
|
}
|
|
|
|
/* renamed from: invoke-5SAbXVA, reason: not valid java name */
|
|
public final long m592invoke5SAbXVA(long j, LayoutDirection layoutDirection) {
|
|
Intrinsics.checkNotNullParameter(layoutDirection, "layoutDirection");
|
|
return IntOffsetKt.IntOffset(Alignment.Horizontal.this.align(0, IntSize.m5043getWidthimpl(j), layoutDirection), 0);
|
|
}
|
|
}, align, "wrapContentWidth");
|
|
}
|
|
|
|
public final WrapContentElement height(final Alignment.Vertical align, boolean unbounded) {
|
|
Intrinsics.checkNotNullParameter(align, "align");
|
|
return new WrapContentElement(Direction.Vertical, unbounded, new Function2<IntSize, LayoutDirection, IntOffset>() { // from class: androidx.compose.foundation.layout.WrapContentElement$Companion$height$1
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
{
|
|
super(2);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
public /* bridge */ /* synthetic */ IntOffset invoke(IntSize intSize, LayoutDirection layoutDirection) {
|
|
return IntOffset.m4992boximpl(m590invoke5SAbXVA(intSize.getPackedValue(), layoutDirection));
|
|
}
|
|
|
|
/* renamed from: invoke-5SAbXVA, reason: not valid java name */
|
|
public final long m590invoke5SAbXVA(long j, LayoutDirection layoutDirection) {
|
|
Intrinsics.checkNotNullParameter(layoutDirection, "<anonymous parameter 1>");
|
|
return IntOffsetKt.IntOffset(0, Alignment.Vertical.this.align(0, IntSize.m5042getHeightimpl(j)));
|
|
}
|
|
}, align, "wrapContentHeight");
|
|
}
|
|
|
|
public final WrapContentElement size(final Alignment align, boolean unbounded) {
|
|
Intrinsics.checkNotNullParameter(align, "align");
|
|
return new WrapContentElement(Direction.Both, unbounded, new Function2<IntSize, LayoutDirection, IntOffset>() { // from class: androidx.compose.foundation.layout.WrapContentElement$Companion$size$1
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
{
|
|
super(2);
|
|
}
|
|
|
|
@Override // kotlin.jvm.functions.Function2
|
|
public /* bridge */ /* synthetic */ IntOffset invoke(IntSize intSize, LayoutDirection layoutDirection) {
|
|
return IntOffset.m4992boximpl(m591invoke5SAbXVA(intSize.getPackedValue(), layoutDirection));
|
|
}
|
|
|
|
/* renamed from: invoke-5SAbXVA, reason: not valid java name */
|
|
public final long m591invoke5SAbXVA(long j, LayoutDirection layoutDirection) {
|
|
Intrinsics.checkNotNullParameter(layoutDirection, "layoutDirection");
|
|
return Alignment.this.mo2290alignKFBX0sM(IntSize.INSTANCE.m5048getZeroYbymL2g(), j, layoutDirection);
|
|
}
|
|
}, align, "wrapContentSize");
|
|
}
|
|
}
|
|
}
|