package androidx.compose.ui.viewinterop; import android.content.Context; import android.view.View; import androidx.compose.runtime.ComposablesKt; import androidx.compose.runtime.Composer; import androidx.compose.runtime.ComposerKt; import androidx.compose.runtime.CompositionContext; import androidx.compose.runtime.CompositionLocalMap; import androidx.compose.runtime.ProvidableCompositionLocal; import androidx.compose.runtime.RecomposeScopeImplKt; import androidx.compose.runtime.ScopeUpdateScope; import androidx.compose.runtime.Updater; import androidx.compose.runtime.saveable.SaveableStateRegistry; import androidx.compose.runtime.saveable.SaveableStateRegistryKt; import androidx.compose.ui.Modifier; import androidx.compose.ui.node.ComposeUiNode; import androidx.compose.ui.node.LayoutNode; import androidx.compose.ui.platform.AndroidCompositionLocals_androidKt; import androidx.compose.ui.unit.Density; import androidx.compose.ui.unit.LayoutDirection; import androidx.exifinterface.media.ExifInterface; import androidx.lifecycle.LifecycleOwner; import androidx.savedstate.SavedStateRegistryOwner; import kotlin.Metadata; import kotlin.NoWhenBranchMatchedException; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function2; import kotlin.jvm.internal.Intrinsics; /* compiled from: AndroidView.android.kt */ @Metadata(d1 = {"\u0000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u001ay\u0010\u0007\u001a\u00020\u0003\"\b\b\u0000\u0010\b*\u00020\u00022\u0012\u0010\t\u001a\u000e\u0012\u0004\u0012\u00020\n\u0012\u0004\u0012\u0002H\b0\u00012\b\b\u0002\u0010\u000b\u001a\u00020\f2\u0016\b\u0002\u0010\r\u001a\u0010\u0012\u0004\u0012\u0002H\b\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u00012\u0014\b\u0002\u0010\u000e\u001a\u000e\u0012\u0004\u0012\u0002H\b\u0012\u0004\u0012\u00020\u00030\u00012\u0014\b\u0002\u0010\u000f\u001a\u000e\u0012\u0004\u0012\u0002H\b\u0012\u0004\u0012\u00020\u00030\u0001H\u0007¢\u0006\u0002\u0010\u0010\u001aK\u0010\u0007\u001a\u00020\u0003\"\b\b\u0000\u0010\b*\u00020\u00022\u0012\u0010\t\u001a\u000e\u0012\u0004\u0012\u00020\n\u0012\u0004\u0012\u0002H\b0\u00012\b\b\u0002\u0010\u000b\u001a\u00020\f2\u0014\b\u0002\u0010\u000f\u001a\u000e\u0012\u0004\u0012\u0002H\b\u0012\u0004\u0012\u00020\u00030\u0001H\u0007¢\u0006\u0002\u0010\u0011\u001a1\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\u00140\u0013\"\b\b\u0000\u0010\b*\u00020\u00022\u0012\u0010\t\u001a\u000e\u0012\u0004\u0012\u00020\n\u0012\u0004\u0012\u0002H\b0\u0001H\u0003¢\u0006\u0002\u0010\u0015\u001a\u001c\u0010\u0016\u001a\b\u0012\u0004\u0012\u0002H\b0\u0017\"\b\b\u0000\u0010\b*\u00020\u0002*\u00020\u0014H\u0002\u001aa\u0010\u0018\u001a\u00020\u0003\"\b\b\u0000\u0010\b*\u00020\u0002*\b\u0012\u0004\u0012\u00020\u00140\u00192\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u001a\u001a\u00020\u001b2\u0006\u0010\u001c\u001a\u00020\u001d2\u0006\u0010\u001e\u001a\u00020\u001f2\u0006\u0010 \u001a\u00020!2\u0006\u0010\"\u001a\u00020#2\u0006\u0010$\u001a\u00020%H\u0002ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b&\u0010'\"\"\u0010\u0000\u001a\u0013\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u0001¢\u0006\u0002\b\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006("}, d2 = {"NoOpUpdate", "Lkotlin/Function1;", "Landroid/view/View;", "", "Lkotlin/ExtensionFunctionType;", "getNoOpUpdate", "()Lkotlin/jvm/functions/Function1;", "AndroidView", ExifInterface.GPS_DIRECTION_TRUE, "factory", "Landroid/content/Context;", "modifier", "Landroidx/compose/ui/Modifier;", "onReset", "onRelease", "update", "(Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)V", "(Lkotlin/jvm/functions/Function1;Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;II)V", "createAndroidViewNodeFactory", "Lkotlin/Function0;", "Landroidx/compose/ui/node/LayoutNode;", "(Lkotlin/jvm/functions/Function1;Landroidx/compose/runtime/Composer;I)Lkotlin/jvm/functions/Function0;", "requireViewFactoryHolder", "Landroidx/compose/ui/viewinterop/ViewFactoryHolder;", "updateViewHolderParams", "Landroidx/compose/runtime/Updater;", "compositeKeyHash", "", "density", "Landroidx/compose/ui/unit/Density;", "lifecycleOwner", "Landroidx/lifecycle/LifecycleOwner;", "savedStateRegistryOwner", "Landroidx/savedstate/SavedStateRegistryOwner;", "layoutDirection", "Landroidx/compose/ui/unit/LayoutDirection;", "compositionLocalMap", "Landroidx/compose/runtime/CompositionLocalMap;", "updateViewHolderParams-6NefGtU", "(Landroidx/compose/runtime/Composer;Landroidx/compose/ui/Modifier;ILandroidx/compose/ui/unit/Density;Landroidx/lifecycle/LifecycleOwner;Landroidx/savedstate/SavedStateRegistryOwner;Landroidx/compose/ui/unit/LayoutDirection;Landroidx/compose/runtime/CompositionLocalMap;)V", "ui_release"}, k = 2, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class AndroidView_androidKt { private static final Function1 NoOpUpdate = new Function1() { // from class: androidx.compose.ui.viewinterop.AndroidView_androidKt$NoOpUpdate$1 /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(View view) { Intrinsics.checkNotNullParameter(view, "$this$null"); } @Override // kotlin.jvm.functions.Function1 public /* bridge */ /* synthetic */ Unit invoke(View view) { invoke2(view); return Unit.INSTANCE; } }; public static final Function1 getNoOpUpdate() { return NoOpUpdate; } public static final void AndroidView(final Function1 factory, Modifier modifier, Function1 function1, Composer composer, final int i, final int i2) { int i3; Intrinsics.checkNotNullParameter(factory, "factory"); Composer startRestartGroup = composer.startRestartGroup(-1783766393); ComposerKt.sourceInformation(startRestartGroup, "C(AndroidView)105@5394L130:AndroidView.android.kt#z33iqn"); if ((i2 & 1) != 0) { i3 = i | 6; } else if ((i & 14) == 0) { i3 = (startRestartGroup.changedInstance(factory) ? 4 : 2) | i; } else { i3 = i; } int i4 = i2 & 2; if (i4 != 0) { i3 |= 48; } else if ((i & 112) == 0) { i3 |= startRestartGroup.changed(modifier) ? 32 : 16; } int i5 = i2 & 4; if (i5 != 0) { i3 |= 384; } else if ((i & 896) == 0) { i3 |= startRestartGroup.changedInstance(function1) ? 256 : 128; } if ((i3 & 731) != 146 || !startRestartGroup.getSkipping()) { if (i4 != 0) { modifier = Modifier.INSTANCE; } if (i5 != 0) { function1 = NoOpUpdate; } if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventStart(-1783766393, i3, -1, "androidx.compose.ui.viewinterop.AndroidView (AndroidView.android.kt:100)"); } AndroidView(factory, modifier, null, NoOpUpdate, function1, startRestartGroup, (i3 & 14) | 3072 | (i3 & 112) | ((i3 << 6) & 57344), 4); if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventEnd(); } } else { startRestartGroup.skipToGroupEnd(); } final Modifier modifier2 = modifier; final Function1 function12 = function1; ScopeUpdateScope endRestartGroup = startRestartGroup.endRestartGroup(); if (endRestartGroup == null) { return; } endRestartGroup.updateScope(new Function2() { // from class: androidx.compose.ui.viewinterop.AndroidView_androidKt$AndroidView$1 /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ { super(2); } @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(Composer composer2, Integer num) { invoke(composer2, num.intValue()); return Unit.INSTANCE; } public final void invoke(Composer composer2, int i6) { AndroidView_androidKt.AndroidView(factory, modifier2, function12, composer2, RecomposeScopeImplKt.updateChangedFlags(i | 1), i2); } }); } /* JADX WARN: Removed duplicated region for block: B:10:0x004e */ /* JADX WARN: Removed duplicated region for block: B:14:0x006a */ /* JADX WARN: Removed duplicated region for block: B:18:0x0086 */ /* JADX WARN: Removed duplicated region for block: B:22:0x00a8 */ /* JADX WARN: Removed duplicated region for block: B:28:0x0211 */ /* JADX WARN: Removed duplicated region for block: B:31:? A[RETURN, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:33:0x00b9 */ /* JADX WARN: Removed duplicated region for block: B:35:0x00c1 */ /* JADX WARN: Removed duplicated region for block: B:37:0x00c5 */ /* JADX WARN: Removed duplicated region for block: B:39:0x00ca */ /* JADX WARN: Removed duplicated region for block: B:42:0x00d3 */ /* JADX WARN: Removed duplicated region for block: B:45:0x013d */ /* JADX WARN: Removed duplicated region for block: B:54:0x0205 */ /* JADX WARN: Removed duplicated region for block: B:56:0x01a2 */ /* JADX WARN: Removed duplicated region for block: B:64:0x00be */ /* JADX WARN: Removed duplicated region for block: B:65:0x0089 */ /* JADX WARN: Removed duplicated region for block: B:72:0x006d */ /* JADX WARN: Removed duplicated region for block: B:79:0x0051 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static final void AndroidView(final kotlin.jvm.functions.Function1 r21, androidx.compose.ui.Modifier r22, kotlin.jvm.functions.Function1 r23, kotlin.jvm.functions.Function1 r24, kotlin.jvm.functions.Function1 r25, androidx.compose.runtime.Composer r26, final int r27, final int r28) { /* Method dump skipped, instructions count: 549 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.viewinterop.AndroidView_androidKt.AndroidView(kotlin.jvm.functions.Function1, androidx.compose.ui.Modifier, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1, kotlin.jvm.functions.Function1, androidx.compose.runtime.Composer, int, int):void"); } private static final Function0 createAndroidViewNodeFactory(final Function1 function1, Composer composer, int i) { composer.startReplaceableGroup(2030558801); ComposerKt.sourceInformation(composer, "C(createAndroidViewNodeFactory)264@14333L23,265@14388L7,266@14422L28,267@14502L7:AndroidView.android.kt#z33iqn"); if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventStart(2030558801, i, -1, "androidx.compose.ui.viewinterop.createAndroidViewNodeFactory (AndroidView.android.kt:261)"); } final int currentCompositeKeyHash = ComposablesKt.getCurrentCompositeKeyHash(composer, 0); ProvidableCompositionLocal localContext = AndroidCompositionLocals_androidKt.getLocalContext(); ComposerKt.sourceInformationMarkerStart(composer, 2023513938, "CC:CompositionLocal.kt#9igjgp"); Object consume = composer.consume(localContext); ComposerKt.sourceInformationMarkerEnd(composer); final Context context = (Context) consume; final CompositionContext rememberCompositionContext = ComposablesKt.rememberCompositionContext(composer, 0); ProvidableCompositionLocal localSaveableStateRegistry = SaveableStateRegistryKt.getLocalSaveableStateRegistry(); ComposerKt.sourceInformationMarkerStart(composer, 2023513938, "CC:CompositionLocal.kt#9igjgp"); Object consume2 = composer.consume(localSaveableStateRegistry); ComposerKt.sourceInformationMarkerEnd(composer); final SaveableStateRegistry saveableStateRegistry = (SaveableStateRegistry) consume2; Function0 function0 = new Function0() { // from class: androidx.compose.ui.viewinterop.AndroidView_androidKt$createAndroidViewNodeFactory$1 /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ { super(0); } /* JADX WARN: Can't rename method to resolve collision */ @Override // kotlin.jvm.functions.Function0 public final LayoutNode invoke() { return new ViewFactoryHolder(context, function1, rememberCompositionContext, saveableStateRegistry, currentCompositeKeyHash).getLayoutNode(); } }; if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventEnd(); } composer.endReplaceableGroup(); return function0; } /* renamed from: updateViewHolderParams-6NefGtU, reason: not valid java name */ private static final void m5122updateViewHolderParams6NefGtU(Composer composer, Modifier modifier, int i, Density density, LifecycleOwner lifecycleOwner, SavedStateRegistryOwner savedStateRegistryOwner, LayoutDirection layoutDirection, CompositionLocalMap compositionLocalMap) { Updater.m2280setimpl(composer, compositionLocalMap, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals()); Updater.m2280setimpl(composer, modifier, new Function2() { // from class: androidx.compose.ui.viewinterop.AndroidView_androidKt$updateViewHolderParams$1 @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(LayoutNode layoutNode, Modifier modifier2) { invoke2(layoutNode, modifier2); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(LayoutNode set, Modifier it) { ViewFactoryHolder requireViewFactoryHolder; Intrinsics.checkNotNullParameter(set, "$this$set"); Intrinsics.checkNotNullParameter(it, "it"); requireViewFactoryHolder = AndroidView_androidKt.requireViewFactoryHolder(set); requireViewFactoryHolder.setModifier(it); } }); Updater.m2280setimpl(composer, density, new Function2() { // from class: androidx.compose.ui.viewinterop.AndroidView_androidKt$updateViewHolderParams$2 @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(LayoutNode layoutNode, Density density2) { invoke2(layoutNode, density2); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(LayoutNode set, Density it) { ViewFactoryHolder requireViewFactoryHolder; Intrinsics.checkNotNullParameter(set, "$this$set"); Intrinsics.checkNotNullParameter(it, "it"); requireViewFactoryHolder = AndroidView_androidKt.requireViewFactoryHolder(set); requireViewFactoryHolder.setDensity(it); } }); Updater.m2280setimpl(composer, lifecycleOwner, new Function2() { // from class: androidx.compose.ui.viewinterop.AndroidView_androidKt$updateViewHolderParams$3 @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(LayoutNode layoutNode, LifecycleOwner lifecycleOwner2) { invoke2(layoutNode, lifecycleOwner2); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(LayoutNode set, LifecycleOwner it) { ViewFactoryHolder requireViewFactoryHolder; Intrinsics.checkNotNullParameter(set, "$this$set"); Intrinsics.checkNotNullParameter(it, "it"); requireViewFactoryHolder = AndroidView_androidKt.requireViewFactoryHolder(set); requireViewFactoryHolder.setLifecycleOwner(it); } }); Updater.m2280setimpl(composer, savedStateRegistryOwner, new Function2() { // from class: androidx.compose.ui.viewinterop.AndroidView_androidKt$updateViewHolderParams$4 @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(LayoutNode layoutNode, SavedStateRegistryOwner savedStateRegistryOwner2) { invoke2(layoutNode, savedStateRegistryOwner2); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(LayoutNode set, SavedStateRegistryOwner it) { ViewFactoryHolder requireViewFactoryHolder; Intrinsics.checkNotNullParameter(set, "$this$set"); Intrinsics.checkNotNullParameter(it, "it"); requireViewFactoryHolder = AndroidView_androidKt.requireViewFactoryHolder(set); requireViewFactoryHolder.setSavedStateRegistryOwner(it); } }); Updater.m2280setimpl(composer, layoutDirection, new Function2() { // from class: androidx.compose.ui.viewinterop.AndroidView_androidKt$updateViewHolderParams$5 /* compiled from: AndroidView.android.kt */ @Metadata(k = 3, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public /* synthetic */ class WhenMappings { public static final /* synthetic */ int[] $EnumSwitchMapping$0; static { int[] iArr = new int[LayoutDirection.values().length]; try { iArr[LayoutDirection.Ltr.ordinal()] = 1; } catch (NoSuchFieldError unused) { } try { iArr[LayoutDirection.Rtl.ordinal()] = 2; } catch (NoSuchFieldError unused2) { } $EnumSwitchMapping$0 = iArr; } } @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(LayoutNode layoutNode, LayoutDirection layoutDirection2) { invoke2(layoutNode, layoutDirection2); return Unit.INSTANCE; } /* renamed from: invoke, reason: avoid collision after fix types in other method */ public final void invoke2(LayoutNode set, LayoutDirection it) { ViewFactoryHolder requireViewFactoryHolder; Intrinsics.checkNotNullParameter(set, "$this$set"); Intrinsics.checkNotNullParameter(it, "it"); requireViewFactoryHolder = AndroidView_androidKt.requireViewFactoryHolder(set); int i2 = WhenMappings.$EnumSwitchMapping$0[it.ordinal()]; int i3 = 1; if (i2 == 1) { i3 = 0; } else if (i2 != 2) { throw new NoWhenBranchMatchedException(); } requireViewFactoryHolder.setLayoutDirection(i3); } }); Function2 setCompositeKeyHash = ComposeUiNode.INSTANCE.getSetCompositeKeyHash(); if (composer.getInserting() || !Intrinsics.areEqual(composer.rememberedValue(), Integer.valueOf(i))) { composer.updateRememberedValue(Integer.valueOf(i)); composer.apply(Integer.valueOf(i), setCompositeKeyHash); } } /* JADX INFO: Access modifiers changed from: private */ public static final ViewFactoryHolder requireViewFactoryHolder(LayoutNode layoutNode) { AndroidViewHolder interopViewFactoryHolder = layoutNode.getInteropViewFactoryHolder(); if (interopViewFactoryHolder == null) { throw new IllegalStateException("Required value was null.".toString()); } Intrinsics.checkNotNull(interopViewFactoryHolder, "null cannot be cast to non-null type androidx.compose.ui.viewinterop.ViewFactoryHolder"); return (ViewFactoryHolder) interopViewFactoryHolder; } }