mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-28 01:52:26 -06:00
295 lines
18 KiB
Java
295 lines
18 KiB
Java
package androidx.compose.material3;
|
|
|
|
import androidx.compose.runtime.MutableState;
|
|
import androidx.compose.runtime.SnapshotStateKt__SnapshotStateKt;
|
|
import kotlin.Metadata;
|
|
import kotlin.Result;
|
|
import kotlin.coroutines.Continuation;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlinx.coroutines.CancellableContinuation;
|
|
import kotlinx.coroutines.sync.Mutex;
|
|
import kotlinx.coroutines.sync.MutexKt;
|
|
|
|
/* compiled from: SnackbarHost.kt */
|
|
@Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\b\u0007\u0018\u00002\u00020\u0001:\u0002\u001b\u001cB\u0005¢\u0006\u0002\u0010\u0002J\u0019\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\u0011H\u0086@ø\u0001\u0000¢\u0006\u0002\u0010\u0012J9\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0013\u001a\u00020\u00142\n\b\u0002\u0010\u0015\u001a\u0004\u0018\u00010\u00142\b\b\u0002\u0010\u0016\u001a\u00020\u00172\b\b\u0002\u0010\u0018\u001a\u00020\u0019H\u0086@ø\u0001\u0000¢\u0006\u0002\u0010\u001aR/\u0010\u0005\u001a\u0004\u0018\u00010\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u00048F@BX\u0086\u008e\u0002¢\u0006\u0012\n\u0004\b\n\u0010\u000b\u001a\u0004\b\u0006\u0010\u0007\"\u0004\b\b\u0010\tR\u000e\u0010\f\u001a\u00020\rX\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001d"}, d2 = {"Landroidx/compose/material3/SnackbarHostState;", "", "()V", "<set-?>", "Landroidx/compose/material3/SnackbarData;", "currentSnackbarData", "getCurrentSnackbarData", "()Landroidx/compose/material3/SnackbarData;", "setCurrentSnackbarData", "(Landroidx/compose/material3/SnackbarData;)V", "currentSnackbarData$delegate", "Landroidx/compose/runtime/MutableState;", "mutex", "Lkotlinx/coroutines/sync/Mutex;", "showSnackbar", "Landroidx/compose/material3/SnackbarResult;", "visuals", "Landroidx/compose/material3/SnackbarVisuals;", "(Landroidx/compose/material3/SnackbarVisuals;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "message", "", "actionLabel", "withDismissAction", "", "duration", "Landroidx/compose/material3/SnackbarDuration;", "(Ljava/lang/String;Ljava/lang/String;ZLandroidx/compose/material3/SnackbarDuration;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "SnackbarDataImpl", "SnackbarVisualsImpl", "material3_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
public final class SnackbarHostState {
|
|
public static final int $stable = 0;
|
|
|
|
/* renamed from: currentSnackbarData$delegate, reason: from kotlin metadata */
|
|
private final MutableState currentSnackbarData;
|
|
private final Mutex mutex = MutexKt.Mutex$default(false, 1, null);
|
|
|
|
public SnackbarHostState() {
|
|
MutableState mutableStateOf$default;
|
|
mutableStateOf$default = SnapshotStateKt__SnapshotStateKt.mutableStateOf$default(null, null, 2, null);
|
|
this.currentSnackbarData = mutableStateOf$default;
|
|
}
|
|
|
|
public final SnackbarData getCurrentSnackbarData() {
|
|
return (SnackbarData) this.currentSnackbarData.getValue();
|
|
}
|
|
|
|
public static /* synthetic */ Object showSnackbar$default(SnackbarHostState snackbarHostState, String str, String str2, boolean z, SnackbarDuration snackbarDuration, Continuation continuation, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
str2 = null;
|
|
}
|
|
String str3 = str2;
|
|
if ((i & 4) != 0) {
|
|
z = false;
|
|
}
|
|
boolean z2 = z;
|
|
if ((i & 8) != 0) {
|
|
snackbarDuration = str3 == null ? SnackbarDuration.Short : SnackbarDuration.Indefinite;
|
|
}
|
|
return snackbarHostState.showSnackbar(str, str3, z2, snackbarDuration, continuation);
|
|
}
|
|
|
|
public final Object showSnackbar(String str, String str2, boolean z, SnackbarDuration snackbarDuration, Continuation<? super SnackbarResult> continuation) {
|
|
return showSnackbar(new SnackbarVisualsImpl(str, str2, z, snackbarDuration), continuation);
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Removed duplicated region for block: B:28:0x009c A[Catch: all -> 0x00ad, TRY_LEAVE, TryCatch #1 {all -> 0x00ad, blocks: (B:26:0x006f, B:28:0x009c), top: B:25:0x006f }] */
|
|
/* JADX WARN: Removed duplicated region for block: B:31:0x00a1 A[RETURN] */
|
|
/* JADX WARN: Removed duplicated region for block: B:32:0x00a2 */
|
|
/* JADX WARN: Removed duplicated region for block: B:35:0x005b */
|
|
/* JADX WARN: Removed duplicated region for block: B:9:0x0026 */
|
|
/* JADX WARN: Type inference failed for: r7v13 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final java.lang.Object showSnackbar(androidx.compose.material3.SnackbarVisuals r8, kotlin.coroutines.Continuation<? super androidx.compose.material3.SnackbarResult> r9) {
|
|
/*
|
|
r7 = this;
|
|
boolean r0 = r9 instanceof androidx.compose.material3.SnackbarHostState$showSnackbar$2
|
|
if (r0 == 0) goto L14
|
|
r0 = r9
|
|
androidx.compose.material3.SnackbarHostState$showSnackbar$2 r0 = (androidx.compose.material3.SnackbarHostState$showSnackbar$2) r0
|
|
int r1 = r0.label
|
|
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
|
r1 = r1 & r2
|
|
if (r1 == 0) goto L14
|
|
int r9 = r0.label
|
|
int r9 = r9 - r2
|
|
r0.label = r9
|
|
goto L19
|
|
L14:
|
|
androidx.compose.material3.SnackbarHostState$showSnackbar$2 r0 = new androidx.compose.material3.SnackbarHostState$showSnackbar$2
|
|
r0.<init>(r7, r9)
|
|
L19:
|
|
java.lang.Object r9 = r0.result
|
|
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
|
int r2 = r0.label
|
|
r3 = 2
|
|
r4 = 1
|
|
r5 = 0
|
|
if (r2 == 0) goto L5b
|
|
if (r2 == r4) goto L49
|
|
if (r2 != r3) goto L41
|
|
java.lang.Object r7 = r0.L$3
|
|
androidx.compose.material3.SnackbarHostState$showSnackbar$2 r7 = (androidx.compose.material3.SnackbarHostState$showSnackbar$2) r7
|
|
java.lang.Object r7 = r0.L$2
|
|
kotlinx.coroutines.sync.Mutex r7 = (kotlinx.coroutines.sync.Mutex) r7
|
|
java.lang.Object r8 = r0.L$1
|
|
androidx.compose.material3.SnackbarVisuals r8 = (androidx.compose.material3.SnackbarVisuals) r8
|
|
java.lang.Object r8 = r0.L$0
|
|
androidx.compose.material3.SnackbarHostState r8 = (androidx.compose.material3.SnackbarHostState) r8
|
|
kotlin.ResultKt.throwOnFailure(r9) // Catch: java.lang.Throwable -> L3e
|
|
goto La6
|
|
L3e:
|
|
r9 = move-exception
|
|
goto Lb2
|
|
L41:
|
|
java.lang.IllegalStateException r7 = new java.lang.IllegalStateException
|
|
java.lang.String r8 = "call to 'resume' before 'invoke' with coroutine"
|
|
r7.<init>(r8)
|
|
throw r7
|
|
L49:
|
|
java.lang.Object r7 = r0.L$2
|
|
kotlinx.coroutines.sync.Mutex r7 = (kotlinx.coroutines.sync.Mutex) r7
|
|
java.lang.Object r8 = r0.L$1
|
|
androidx.compose.material3.SnackbarVisuals r8 = (androidx.compose.material3.SnackbarVisuals) r8
|
|
java.lang.Object r2 = r0.L$0
|
|
androidx.compose.material3.SnackbarHostState r2 = (androidx.compose.material3.SnackbarHostState) r2
|
|
kotlin.ResultKt.throwOnFailure(r9)
|
|
r9 = r7
|
|
r7 = r2
|
|
goto L6f
|
|
L5b:
|
|
kotlin.ResultKt.throwOnFailure(r9)
|
|
kotlinx.coroutines.sync.Mutex r9 = r7.mutex
|
|
r0.L$0 = r7
|
|
r0.L$1 = r8
|
|
r0.L$2 = r9
|
|
r0.label = r4
|
|
java.lang.Object r2 = r9.lock(r5, r0)
|
|
if (r2 != r1) goto L6f
|
|
return r1
|
|
L6f:
|
|
r0.L$0 = r7 // Catch: java.lang.Throwable -> Lad
|
|
r0.L$1 = r8 // Catch: java.lang.Throwable -> Lad
|
|
r0.L$2 = r9 // Catch: java.lang.Throwable -> Lad
|
|
r0.L$3 = r0 // Catch: java.lang.Throwable -> Lad
|
|
r0.label = r3 // Catch: java.lang.Throwable -> Lad
|
|
kotlinx.coroutines.CancellableContinuationImpl r2 = new kotlinx.coroutines.CancellableContinuationImpl // Catch: java.lang.Throwable -> Lad
|
|
kotlin.coroutines.Continuation r3 = kotlin.coroutines.intrinsics.IntrinsicsKt.intercepted(r0) // Catch: java.lang.Throwable -> Lad
|
|
r2.<init>(r3, r4) // Catch: java.lang.Throwable -> Lad
|
|
r2.initCancellability() // Catch: java.lang.Throwable -> Lad
|
|
r3 = r2
|
|
kotlinx.coroutines.CancellableContinuation r3 = (kotlinx.coroutines.CancellableContinuation) r3 // Catch: java.lang.Throwable -> Lad
|
|
androidx.compose.material3.SnackbarHostState$SnackbarDataImpl r4 = new androidx.compose.material3.SnackbarHostState$SnackbarDataImpl // Catch: java.lang.Throwable -> Lad
|
|
r4.<init>(r8, r3) // Catch: java.lang.Throwable -> Lad
|
|
androidx.compose.material3.SnackbarData r4 = (androidx.compose.material3.SnackbarData) r4 // Catch: java.lang.Throwable -> Lad
|
|
access$setCurrentSnackbarData(r7, r4) // Catch: java.lang.Throwable -> Lad
|
|
java.lang.Object r8 = r2.getResult() // Catch: java.lang.Throwable -> Lad
|
|
java.lang.Object r2 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED() // Catch: java.lang.Throwable -> Lad
|
|
if (r8 != r2) goto L9f
|
|
kotlin.coroutines.jvm.internal.DebugProbesKt.probeCoroutineSuspended(r0) // Catch: java.lang.Throwable -> Lad
|
|
L9f:
|
|
if (r8 != r1) goto La2
|
|
return r1
|
|
La2:
|
|
r6 = r8
|
|
r8 = r7
|
|
r7 = r9
|
|
r9 = r6
|
|
La6:
|
|
r8.setCurrentSnackbarData(r5) // Catch: java.lang.Throwable -> Lb6
|
|
r7.unlock(r5)
|
|
return r9
|
|
Lad:
|
|
r8 = move-exception
|
|
r6 = r8
|
|
r8 = r7
|
|
r7 = r9
|
|
r9 = r6
|
|
Lb2:
|
|
r8.setCurrentSnackbarData(r5) // Catch: java.lang.Throwable -> Lb6
|
|
throw r9 // Catch: java.lang.Throwable -> Lb6
|
|
Lb6:
|
|
r8 = move-exception
|
|
r7.unlock(r5)
|
|
throw r8
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: androidx.compose.material3.SnackbarHostState.showSnackbar(androidx.compose.material3.SnackbarVisuals, kotlin.coroutines.Continuation):java.lang.Object");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
/* compiled from: SnackbarHost.kt */
|
|
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\b\u0002\u0018\u00002\u00020\u0001B'\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b¢\u0006\u0002\u0010\tJ\u0013\u0010\u0011\u001a\u00020\u00062\b\u0010\u0012\u001a\u0004\u0018\u00010\u0013H\u0096\u0002J\b\u0010\u0014\u001a\u00020\u0015H\u0016R\u0016\u0010\u0004\u001a\u0004\u0018\u00010\u0003X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u0014\u0010\u0007\u001a\u00020\bX\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0014\u0010\u0002\u001a\u00020\u0003X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000bR\u0014\u0010\u0005\u001a\u00020\u0006X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010¨\u0006\u0016"}, d2 = {"Landroidx/compose/material3/SnackbarHostState$SnackbarVisualsImpl;", "Landroidx/compose/material3/SnackbarVisuals;", "message", "", "actionLabel", "withDismissAction", "", "duration", "Landroidx/compose/material3/SnackbarDuration;", "(Ljava/lang/String;Ljava/lang/String;ZLandroidx/compose/material3/SnackbarDuration;)V", "getActionLabel", "()Ljava/lang/String;", "getDuration", "()Landroidx/compose/material3/SnackbarDuration;", "getMessage", "getWithDismissAction", "()Z", "equals", "other", "", "hashCode", "", "material3_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
public static final class SnackbarVisualsImpl implements SnackbarVisuals {
|
|
private final String actionLabel;
|
|
private final SnackbarDuration duration;
|
|
private final String message;
|
|
private final boolean withDismissAction;
|
|
|
|
@Override // androidx.compose.material3.SnackbarVisuals
|
|
public String getActionLabel() {
|
|
return this.actionLabel;
|
|
}
|
|
|
|
@Override // androidx.compose.material3.SnackbarVisuals
|
|
public SnackbarDuration getDuration() {
|
|
return this.duration;
|
|
}
|
|
|
|
@Override // androidx.compose.material3.SnackbarVisuals
|
|
public String getMessage() {
|
|
return this.message;
|
|
}
|
|
|
|
@Override // androidx.compose.material3.SnackbarVisuals
|
|
public boolean getWithDismissAction() {
|
|
return this.withDismissAction;
|
|
}
|
|
|
|
public SnackbarVisualsImpl(String message, String str, boolean z, SnackbarDuration duration) {
|
|
Intrinsics.checkNotNullParameter(message, "message");
|
|
Intrinsics.checkNotNullParameter(duration, "duration");
|
|
this.message = message;
|
|
this.actionLabel = str;
|
|
this.withDismissAction = z;
|
|
this.duration = duration;
|
|
}
|
|
|
|
public boolean equals(Object other) {
|
|
if (this == other) {
|
|
return true;
|
|
}
|
|
if (other == null || getClass() != other.getClass()) {
|
|
return false;
|
|
}
|
|
SnackbarVisualsImpl snackbarVisualsImpl = (SnackbarVisualsImpl) other;
|
|
return Intrinsics.areEqual(getMessage(), snackbarVisualsImpl.getMessage()) && Intrinsics.areEqual(getActionLabel(), snackbarVisualsImpl.getActionLabel()) && getWithDismissAction() == snackbarVisualsImpl.getWithDismissAction() && getDuration() == snackbarVisualsImpl.getDuration();
|
|
}
|
|
|
|
public int hashCode() {
|
|
int hashCode = getMessage().hashCode() * 31;
|
|
String actionLabel = getActionLabel();
|
|
return ((((hashCode + (actionLabel != null ? actionLabel.hashCode() : 0)) * 31) + Boolean.hashCode(getWithDismissAction())) * 31) + getDuration().hashCode();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
/* compiled from: SnackbarHost.kt */
|
|
@Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\b\u0002\u0018\u00002\u00020\u0001B\u001b\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\u0002\u0010\u0007J\b\u0010\n\u001a\u00020\u000bH\u0016J\u0013\u0010\f\u001a\u00020\r2\b\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0096\u0002J\b\u0010\u0010\u001a\u00020\u0011H\u0016J\b\u0010\u0012\u001a\u00020\u000bH\u0016R\u0014\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0002\u001a\u00020\u0003X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\t¨\u0006\u0013"}, d2 = {"Landroidx/compose/material3/SnackbarHostState$SnackbarDataImpl;", "Landroidx/compose/material3/SnackbarData;", "visuals", "Landroidx/compose/material3/SnackbarVisuals;", "continuation", "Lkotlinx/coroutines/CancellableContinuation;", "Landroidx/compose/material3/SnackbarResult;", "(Landroidx/compose/material3/SnackbarVisuals;Lkotlinx/coroutines/CancellableContinuation;)V", "getVisuals", "()Landroidx/compose/material3/SnackbarVisuals;", "dismiss", "", "equals", "", "other", "", "hashCode", "", "performAction", "material3_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
public static final class SnackbarDataImpl implements SnackbarData {
|
|
private final CancellableContinuation<SnackbarResult> continuation;
|
|
private final SnackbarVisuals visuals;
|
|
|
|
@Override // androidx.compose.material3.SnackbarData
|
|
public SnackbarVisuals getVisuals() {
|
|
return this.visuals;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public SnackbarDataImpl(SnackbarVisuals visuals, CancellableContinuation<? super SnackbarResult> continuation) {
|
|
Intrinsics.checkNotNullParameter(visuals, "visuals");
|
|
Intrinsics.checkNotNullParameter(continuation, "continuation");
|
|
this.visuals = visuals;
|
|
this.continuation = continuation;
|
|
}
|
|
|
|
@Override // androidx.compose.material3.SnackbarData
|
|
public void performAction() {
|
|
if (this.continuation.isActive()) {
|
|
CancellableContinuation<SnackbarResult> cancellableContinuation = this.continuation;
|
|
Result.Companion companion = Result.INSTANCE;
|
|
cancellableContinuation.resumeWith(Result.m5698constructorimpl(SnackbarResult.ActionPerformed));
|
|
}
|
|
}
|
|
|
|
@Override // androidx.compose.material3.SnackbarData
|
|
public void dismiss() {
|
|
if (this.continuation.isActive()) {
|
|
CancellableContinuation<SnackbarResult> cancellableContinuation = this.continuation;
|
|
Result.Companion companion = Result.INSTANCE;
|
|
cancellableContinuation.resumeWith(Result.m5698constructorimpl(SnackbarResult.Dismissed));
|
|
}
|
|
}
|
|
|
|
public boolean equals(Object other) {
|
|
if (this == other) {
|
|
return true;
|
|
}
|
|
if (other == null || getClass() != other.getClass()) {
|
|
return false;
|
|
}
|
|
SnackbarDataImpl snackbarDataImpl = (SnackbarDataImpl) other;
|
|
return Intrinsics.areEqual(getVisuals(), snackbarDataImpl.getVisuals()) && Intrinsics.areEqual(this.continuation, snackbarDataImpl.continuation);
|
|
}
|
|
|
|
public int hashCode() {
|
|
return (getVisuals().hashCode() * 31) + this.continuation.hashCode();
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: private */
|
|
public final void setCurrentSnackbarData(SnackbarData snackbarData) {
|
|
this.currentSnackbarData.setValue(snackbarData);
|
|
}
|
|
}
|