package androidx.compose.foundation.relocation; import androidx.compose.ui.geometry.Rect; import androidx.compose.ui.layout.LayoutCoordinates; import kotlin.Metadata; import kotlin.ResultKt; import kotlin.Unit; import kotlin.coroutines.Continuation; import kotlin.coroutines.intrinsics.IntrinsicsKt; import kotlin.coroutines.jvm.internal.DebugMetadata; import kotlin.coroutines.jvm.internal.SuspendLambda; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function2; import kotlin.jvm.internal.FunctionReferenceImpl; import kotlin.jvm.internal.Intrinsics; import kotlinx.coroutines.BuildersKt__Builders_commonKt; import kotlinx.coroutines.CoroutineScope; import kotlinx.coroutines.Job; /* compiled from: BringIntoViewResponder.kt */ @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"", "Lkotlinx/coroutines/Job;", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 8, 0}, xi = 48) @DebugMetadata(c = "androidx.compose.foundation.relocation.BringIntoViewResponderNode$bringChildIntoView$2", f = "BringIntoViewResponder.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {}) /* loaded from: classes.dex */ final class BringIntoViewResponderNode$bringChildIntoView$2 extends SuspendLambda implements Function2, Object> { final /* synthetic */ Function0 $boundsProvider; final /* synthetic */ LayoutCoordinates $childCoordinates; final /* synthetic */ Function0 $parentRect; private /* synthetic */ Object L$0; int label; final /* synthetic */ BringIntoViewResponderNode this$0; /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ public BringIntoViewResponderNode$bringChildIntoView$2(BringIntoViewResponderNode bringIntoViewResponderNode, LayoutCoordinates layoutCoordinates, Function0 function0, Function0 function02, Continuation continuation) { super(2, continuation); this.this$0 = bringIntoViewResponderNode; this.$childCoordinates = layoutCoordinates; this.$boundsProvider = function0; this.$parentRect = function02; } @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl public final Continuation create(Object obj, Continuation continuation) { BringIntoViewResponderNode$bringChildIntoView$2 bringIntoViewResponderNode$bringChildIntoView$2 = new BringIntoViewResponderNode$bringChildIntoView$2(this.this$0, this.$childCoordinates, this.$boundsProvider, this.$parentRect, continuation); bringIntoViewResponderNode$bringChildIntoView$2.L$0 = obj; return bringIntoViewResponderNode$bringChildIntoView$2; } @Override // kotlin.jvm.functions.Function2 public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) { return ((BringIntoViewResponderNode$bringChildIntoView$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE); } @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl public final Object invokeSuspend(Object obj) { Job launch$default; IntrinsicsKt.getCOROUTINE_SUSPENDED(); if (this.label == 0) { ResultKt.throwOnFailure(obj); CoroutineScope coroutineScope = (CoroutineScope) this.L$0; BuildersKt__Builders_commonKt.launch$default(coroutineScope, null, null, new AnonymousClass1(this.this$0, this.$childCoordinates, this.$boundsProvider, null), 3, null); launch$default = BuildersKt__Builders_commonKt.launch$default(coroutineScope, null, null, new AnonymousClass2(this.this$0, this.$parentRect, null), 3, null); return launch$default; } throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } /* JADX INFO: Access modifiers changed from: package-private */ /* compiled from: BringIntoViewResponder.kt */ @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 8, 0}, xi = 48) @DebugMetadata(c = "androidx.compose.foundation.relocation.BringIntoViewResponderNode$bringChildIntoView$2$1", f = "BringIntoViewResponder.kt", i = {}, l = {170}, m = "invokeSuspend", n = {}, s = {}) /* renamed from: androidx.compose.foundation.relocation.BringIntoViewResponderNode$bringChildIntoView$2$1, reason: invalid class name */ /* loaded from: classes.dex */ public static final class AnonymousClass1 extends SuspendLambda implements Function2, Object> { final /* synthetic */ Function0 $boundsProvider; final /* synthetic */ LayoutCoordinates $childCoordinates; int label; final /* synthetic */ BringIntoViewResponderNode this$0; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ AnonymousClass1(BringIntoViewResponderNode bringIntoViewResponderNode, LayoutCoordinates layoutCoordinates, Function0 function0, Continuation continuation) { super(2, continuation); this.this$0 = bringIntoViewResponderNode; this.$childCoordinates = layoutCoordinates; this.$boundsProvider = function0; } @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl public final Continuation create(Object obj, Continuation continuation) { return new AnonymousClass1(this.this$0, this.$childCoordinates, this.$boundsProvider, continuation); } @Override // kotlin.jvm.functions.Function2 public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) { return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE); } @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl public final Object invokeSuspend(Object obj) { Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED(); int i = this.label; if (i == 0) { ResultKt.throwOnFailure(obj); this.label = 1; if (this.this$0.getResponder().bringChildIntoView(new C00151(this.this$0, this.$childCoordinates, this.$boundsProvider), this) == coroutine_suspended) { return coroutine_suspended; } } else { if (i != 1) { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } ResultKt.throwOnFailure(obj); } return Unit.INSTANCE; } /* JADX INFO: Access modifiers changed from: package-private */ /* compiled from: BringIntoViewResponder.kt */ @Metadata(k = 3, mv = {1, 8, 0}, xi = 48) /* renamed from: androidx.compose.foundation.relocation.BringIntoViewResponderNode$bringChildIntoView$2$1$1, reason: invalid class name and collision with other inner class name */ /* loaded from: classes.dex */ public /* synthetic */ class C00151 extends FunctionReferenceImpl implements Function0 { final /* synthetic */ Function0 $boundsProvider; final /* synthetic */ LayoutCoordinates $childCoordinates; final /* synthetic */ BringIntoViewResponderNode this$0; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ C00151(BringIntoViewResponderNode bringIntoViewResponderNode, LayoutCoordinates layoutCoordinates, Function0 function0) { super(0, Intrinsics.Kotlin.class, "localRect", "bringChildIntoView$localRect(Landroidx/compose/foundation/relocation/BringIntoViewResponderNode;Landroidx/compose/ui/layout/LayoutCoordinates;Lkotlin/jvm/functions/Function0;)Landroidx/compose/ui/geometry/Rect;", 0); this.this$0 = bringIntoViewResponderNode; this.$childCoordinates = layoutCoordinates; this.$boundsProvider = function0; } /* JADX WARN: Can't rename method to resolve collision */ @Override // kotlin.jvm.functions.Function0 public final Rect invoke() { Rect bringChildIntoView$localRect; bringChildIntoView$localRect = BringIntoViewResponderNode.bringChildIntoView$localRect(this.this$0, this.$childCoordinates, this.$boundsProvider); return bringChildIntoView$localRect; } } } /* JADX INFO: Access modifiers changed from: package-private */ /* compiled from: BringIntoViewResponder.kt */ @Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u008a@"}, d2 = {"", "", "Lkotlinx/coroutines/CoroutineScope;"}, k = 3, mv = {1, 8, 0}, xi = 48) @DebugMetadata(c = "androidx.compose.foundation.relocation.BringIntoViewResponderNode$bringChildIntoView$2$2", f = "BringIntoViewResponder.kt", i = {}, l = {179}, m = "invokeSuspend", n = {}, s = {}) /* renamed from: androidx.compose.foundation.relocation.BringIntoViewResponderNode$bringChildIntoView$2$2, reason: invalid class name */ /* loaded from: classes.dex */ public static final class AnonymousClass2 extends SuspendLambda implements Function2, Object> { final /* synthetic */ Function0 $parentRect; int label; final /* synthetic */ BringIntoViewResponderNode this$0; /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ AnonymousClass2(BringIntoViewResponderNode bringIntoViewResponderNode, Function0 function0, Continuation continuation) { super(2, continuation); this.this$0 = bringIntoViewResponderNode; this.$parentRect = function0; } @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl public final Continuation create(Object obj, Continuation continuation) { return new AnonymousClass2(this.this$0, this.$parentRect, continuation); } @Override // kotlin.jvm.functions.Function2 public final Object invoke(CoroutineScope coroutineScope, Continuation continuation) { return ((AnonymousClass2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE); } @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl public final Object invokeSuspend(Object obj) { Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED(); int i = this.label; if (i == 0) { ResultKt.throwOnFailure(obj); BringIntoViewParent parent = this.this$0.getParent(); LayoutCoordinates layoutCoordinates = this.this$0.getLayoutCoordinates(); if (layoutCoordinates == null) { return Unit.INSTANCE; } this.label = 1; if (parent.bringChildIntoView(layoutCoordinates, this.$parentRect, this) == coroutine_suspended) { return coroutine_suspended; } } else { if (i != 1) { throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine"); } ResultKt.throwOnFailure(obj); } return Unit.INSTANCE; } } }