package ca.canadapost.core.common.customView;

import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import j2.g;
import l1.c;
import l1.i;
import rm.n0;
import y.f1;
import y.f2;
import y.m1;
import y.n1;
import y.q1;
import y.s1;
import y0.d4;
import y0.l2;
import y0.m;
import y0.x2;
import y0.y3;

/* loaded from: classes.dex */
public abstract class m {

    /* loaded from: classes.dex */
    public static final class a extends kotlin.jvm.internal.v implements dn.q {

        /* renamed from: p, reason: collision with root package name */
        public static final a f7735p = new a();

        public a() {
            super(3);
        }

        public final f1 a(m1.b bVar, y0.m mVar, int i10) {
            mVar.S(-1457805428);
            if (y0.p.H()) {
                y0.p.Q(-1457805428, i10, -1, "androidx.compose.animation.animateColor.<anonymous> (Transition.kt:64)");
            }
            f1 h10 = y.j.h(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, null, 7, null);
            if (y0.p.H()) {
                y0.p.P();
            }
            mVar.H();
            return h10;
        }

        @Override // dn.q
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
            return a((m1.b) obj, (y0.m) obj2, ((Number) obj3).intValue());
        }
    }

    /* loaded from: classes.dex */
    public static final class b extends kotlin.jvm.internal.v implements dn.q {

        /* renamed from: p, reason: collision with root package name */
        public static final b f7736p = new b();

        public b() {
            super(3);
        }

        public final f1 a(m1.b bVar, y0.m mVar, int i10) {
            mVar.S(-575880366);
            if (y0.p.H()) {
                y0.p.Q(-575880366, i10, -1, "androidx.compose.animation.core.animateDp.<anonymous> (Transition.kt:1994)");
            }
            f1 h10 = y.j.h(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, c3.h.m(f2.a(c3.h.f7410q)), 3, null);
            if (y0.p.H()) {
                y0.p.P();
            }
            mVar.H();
            return h10;
        }

        @Override // dn.q
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
            return a((m1.b) obj, (y0.m) obj2, ((Number) obj3).intValue());
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class c extends kotlin.jvm.internal.v implements dn.a {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ dn.l f7737p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ boolean f7738q;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(dn.l lVar, boolean z10) {
            super(0);
            this.f7737p = lVar;
            this.f7738q = z10;
        }

        @Override // dn.a
        public /* bridge */ /* synthetic */ Object invoke() {
            m42invoke();
            return n0.f34904a;
        }

        /* renamed from: invoke, reason: collision with other method in class */
        public final void m42invoke() {
            this.f7737p.invoke(Boolean.valueOf(!this.f7738q));
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    /* loaded from: classes.dex */
    public static final class d extends kotlin.jvm.internal.v implements dn.p {

        /* renamed from: p, reason: collision with root package name */
        final /* synthetic */ l1.i f7739p;

        /* renamed from: q, reason: collision with root package name */
        final /* synthetic */ boolean f7740q;

        /* renamed from: r, reason: collision with root package name */
        final /* synthetic */ boolean f7741r;

        /* renamed from: s, reason: collision with root package name */
        final /* synthetic */ dn.l f7742s;

        /* renamed from: t, reason: collision with root package name */
        final /* synthetic */ int f7743t;

        /* renamed from: u, reason: collision with root package name */
        final /* synthetic */ int f7744u;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        d(l1.i iVar, boolean z10, boolean z11, dn.l lVar, int i10, int i11) {
            super(2);
            this.f7739p = iVar;
            this.f7740q = z10;
            this.f7741r = z11;
            this.f7742s = lVar;
            this.f7743t = i10;
            this.f7744u = i11;
        }

        public final void a(y0.m mVar, int i10) {
            m.a(this.f7739p, this.f7740q, this.f7741r, this.f7742s, mVar, l2.a(this.f7743t | 1), this.f7744u);
        }

        @Override // dn.p
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
            a((y0.m) obj, ((Number) obj2).intValue());
            return n0.f34904a;
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:100:0x030d  */
    /* JADX WARN: Removed duplicated region for block: B:102:0x0224  */
    /* JADX WARN: Removed duplicated region for block: B:104:0x01d2  */
    /* JADX WARN: Removed duplicated region for block: B:105:0x016a  */
    /* JADX WARN: Removed duplicated region for block: B:106:0x015c  */
    /* JADX WARN: Removed duplicated region for block: B:107:0x0125  */
    /* JADX WARN: Removed duplicated region for block: B:108:0x009b  */
    /* JADX WARN: Removed duplicated region for block: B:109:0x0094  */
    /* JADX WARN: Removed duplicated region for block: B:110:0x006c  */
    /* JADX WARN: Removed duplicated region for block: B:13:0x0069  */
    /* JADX WARN: Removed duplicated region for block: B:21:0x03f2  */
    /* JADX WARN: Removed duplicated region for block: B:24:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:26:0x0091  */
    /* JADX WARN: Removed duplicated region for block: B:28:0x0097  */
    /* JADX WARN: Removed duplicated region for block: B:31:0x00a4  */
    /* JADX WARN: Removed duplicated region for block: B:34:0x0113  */
    /* JADX WARN: Removed duplicated region for block: B:37:0x011e  */
    /* JADX WARN: Removed duplicated region for block: B:40:0x0137  */
    /* JADX WARN: Removed duplicated region for block: B:43:0x0154  */
    /* JADX WARN: Removed duplicated region for block: B:46:0x0162  */
    /* JADX WARN: Removed duplicated region for block: B:49:0x017c  */
    /* JADX WARN: Removed duplicated region for block: B:52:0x01c9  */
    /* JADX WARN: Removed duplicated region for block: B:54:0x01cf  */
    /* JADX WARN: Removed duplicated region for block: B:57:0x01da  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x021b  */
    /* JADX WARN: Removed duplicated region for block: B:66:0x0221  */
    /* JADX WARN: Removed duplicated region for block: B:69:0x022c  */
    /* JADX WARN: Removed duplicated region for block: B:72:0x0249  */
    /* JADX WARN: Removed duplicated region for block: B:74:0x0250  */
    /* JADX WARN: Removed duplicated region for block: B:77:0x0258  */
    /* JADX WARN: Removed duplicated region for block: B:80:0x0293  */
    /* JADX WARN: Removed duplicated region for block: B:87:0x02fd  */
    /* JADX WARN: Removed duplicated region for block: B:90:0x0309  */
    /* JADX WARN: Removed duplicated region for block: B:97:0x03e7  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static final void a(l1.i iVar, boolean z10, boolean z11, dn.l onCheckedChange, y0.m mVar, int i10, int i11) {
        l1.i iVar2;
        int i12;
        boolean z12;
        l1.i iVar3;
        int i13;
        boolean R;
        Object f10;
        boolean booleanValue;
        Object f11;
        m.a aVar;
        boolean m10;
        Object f12;
        int a10;
        y0.m a11;
        x2 y10;
        kotlin.jvm.internal.t.g(onCheckedChange, "onCheckedChange");
        y0.m r10 = mVar.r(-1572004300);
        int i14 = i11 & 1;
        if (i14 != 0) {
            i12 = i10 | 6;
            iVar2 = iVar;
        } else if ((i10 & 14) == 0) {
            iVar2 = iVar;
            i12 = (r10.R(iVar2) ? 4 : 2) | i10;
        } else {
            iVar2 = iVar;
            i12 = i10;
        }
        if ((i11 & 2) != 0) {
            i12 |= 48;
        } else if ((i10 & 112) == 0) {
            i12 |= r10.c(z10) ? 32 : 16;
        }
        int i15 = i11 & 4;
        if (i15 != 0) {
            i12 |= 384;
        } else if ((i10 & 896) == 0) {
            z12 = z11;
            i12 |= r10.c(z12) ? 256 : 128;
            if ((i11 & 8) == 0) {
                i12 |= 3072;
            } else if ((i10 & 7168) == 0) {
                i12 |= r10.m(onCheckedChange) ? 2048 : UserMetadata.MAX_ATTRIBUTE_SIZE;
            }
            if ((i12 & 5851) == 1170 || !r10.v()) {
                iVar3 = i14 == 0 ? l1.i.f27362a : iVar2;
                boolean z13 = i15 == 0 ? true : z12;
                if (y0.p.H()) {
                    y0.p.Q(-1572004300, i12, -1, "ca.canadapost.core.common.customView.CpcSwitch (CpcSwitch.kt:34)");
                }
                n7.a aVar2 = n7.a.f29827a;
                long a12 = aVar2.a(r10, 6).e().a();
                long a13 = aVar2.a(r10, 6).a().a();
                long b10 = aVar2.a(r10, 6).e().b();
                float C = aVar2.b(r10, 6).C();
                float x10 = aVar2.b(r10, 6).x();
                m1 e10 = n1.e(Boolean.valueOf(z10), "SwitchTransition", r10, ((i12 >> 3) & 14) | 48, 0);
                b bVar = b.f7736p;
                q1 b11 = s1.b(c3.h.f7410q);
                boolean booleanValue2 = ((Boolean) e10.h()).booleanValue();
                r10.e(-1482952095);
                if (y0.p.H()) {
                    y0.p.Q(-1482952095, 0, -1, "ca.canadapost.core.common.customView.CpcSwitch.<anonymous> (CpcSwitch.kt:43)");
                }
                r10.e(-868944443);
                float t10 = !booleanValue2 ? c3.h.t(C - x10) : aVar2.b(r10, 6).b0();
                r10.N();
                if (y0.p.H()) {
                    y0.p.P();
                }
                r10.N();
                c3.h m11 = c3.h.m(t10);
                boolean booleanValue3 = ((Boolean) e10.o()).booleanValue();
                r10.e(-1482952095);
                if (y0.p.H()) {
                    i13 = -868944443;
                } else {
                    y0.p.Q(-1482952095, 0, -1, "ca.canadapost.core.common.customView.CpcSwitch.<anonymous> (CpcSwitch.kt:43)");
                    i13 = -868944443;
                }
                r10.e(i13);
                float t11 = !booleanValue3 ? c3.h.t(C - x10) : aVar2.b(r10, 6).b0();
                r10.N();
                if (y0.p.H()) {
                    y0.p.P();
                }
                r10.N();
                y3 c10 = n1.c(e10, m11, c3.h.m(t11), (y.g0) bVar.invoke(e10.m(), r10, 0), b11, "ThumbOffset", r10, 196608);
                a aVar3 = a.f7735p;
                boolean booleanValue4 = ((Boolean) e10.o()).booleanValue();
                r10.e(-1046126792);
                if (y0.p.H()) {
                    y0.p.Q(-1046126792, 0, -1, "ca.canadapost.core.common.customView.CpcSwitch.<anonymous> (CpcSwitch.kt:46)");
                }
                long j10 = !booleanValue4 ? a13 : b10;
                if (y0.p.H()) {
                    y0.p.P();
                }
                r10.N();
                t1.c q10 = s1.g0.q(j10);
                R = r10.R(q10);
                f10 = r10.f();
                if (!R || f10 == y0.m.f51621a.a()) {
                    f10 = (q1) x.h.a(s1.g0.f35254b).invoke(q10);
                    r10.I(f10);
                }
                q1 q1Var = (q1) f10;
                boolean booleanValue5 = ((Boolean) e10.h()).booleanValue();
                r10.e(-1046126792);
                if (y0.p.H()) {
                    y0.p.Q(-1046126792, 0, -1, "ca.canadapost.core.common.customView.CpcSwitch.<anonymous> (CpcSwitch.kt:46)");
                }
                long j11 = !booleanValue5 ? a13 : b10;
                if (y0.p.H()) {
                    y0.p.P();
                }
                r10.N();
                s1.g0 h10 = s1.g0.h(j11);
                booleanValue = ((Boolean) e10.o()).booleanValue();
                r10.e(-1046126792);
                if (y0.p.H()) {
                    y0.p.Q(-1046126792, 0, -1, "ca.canadapost.core.common.customView.CpcSwitch.<anonymous> (CpcSwitch.kt:46)");
                }
                if (!booleanValue) {
                    a13 = b10;
                }
                if (y0.p.H()) {
                    y0.p.P();
                }
                r10.N();
                y3 c11 = n1.c(e10, h10, s1.g0.h(a13), (y.g0) aVar3.invoke(e10.m(), r10, 0), q1Var, "TrackColor", r10, 196608);
                l1.i i16 = androidx.compose.foundation.layout.o.i(androidx.compose.foundation.layout.o.s(iVar3, C), x10);
                f11 = r10.f();
                aVar = y0.m.f51621a;
                if (f11 == aVar.a()) {
                    f11 = d0.k.a();
                    r10.I(f11);
                }
                d0.l lVar = (d0.l) f11;
                r10.e(2138386611);
                m10 = r10.m(onCheckedChange) | r10.c(z10);
                f12 = r10.f();
                if (!m10 || f12 == aVar.a()) {
                    f12 = new c(onCheckedChange, z10);
                    r10.I(f12);
                }
                r10.N();
                l1.i b12 = androidx.compose.foundation.d.b(i16, lVar, null, z13, null, null, (dn.a) f12, 24, null);
                c.a aVar4 = l1.c.f27332a;
                h2.e0 h11 = androidx.compose.foundation.layout.b.h(aVar4.h(), false);
                a10 = y0.j.a(r10, 0);
                y0.y D = r10.D();
                l1.i e11 = l1.h.e(r10, b12);
                g.a aVar5 = j2.g.f23616d;
                dn.a a14 = aVar5.a();
                if (!(r10.w() instanceof y0.f)) {
                    y0.j.c();
                }
                r10.u();
                if (r10.n()) {
                    r10.F();
                } else {
                    r10.o(a14);
                }
                a11 = d4.a(r10);
                d4.b(a11, h11, aVar5.c());
                d4.b(a11, D, aVar5.e());
                dn.p b13 = aVar5.b();
                if (!a11.n() || !kotlin.jvm.internal.t.b(a11.f(), Integer.valueOf(a10))) {
                    a11.I(Integer.valueOf(a10));
                    a11.l(Integer.valueOf(a10), b13);
                }
                d4.b(a11, e11, aVar5.d());
                androidx.compose.foundation.layout.d dVar = androidx.compose.foundation.layout.d.f1828a;
                i.a aVar6 = l1.i.f27362a;
                androidx.compose.foundation.layout.b.a(androidx.compose.foundation.b.d(p1.e.a(androidx.compose.foundation.layout.o.i(androidx.compose.foundation.layout.o.s(dVar.a(aVar6, aVar4.h()), C), aVar2.b(r10, 6).q()), k0.g.a(50)), c(c11), null, 2, null), r10, 0);
                androidx.compose.foundation.layout.b.a(androidx.compose.foundation.b.c(p1.j.b(z.e.f(androidx.compose.foundation.layout.o.o(androidx.compose.foundation.layout.j.b(aVar6, b(c10), BitmapDescriptorFactory.HUE_RED, 2, null), x10), aVar2.b(r10, 6).o(), s1.g0.l(s1.g0.f35254b.a(), 0.08f, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, 14, null), k0.g.f()), aVar2.b(r10, 6).o(), k0.g.f(), false, 0L, 0L, 24, null), a12, k0.g.f()), r10, 0);
                r10.O();
                if (y0.p.H()) {
                    y0.p.P();
                }
                z12 = z13;
            } else {
                r10.A();
                iVar3 = iVar2;
            }
            y10 = r10.y();
            if (y10 == null) {
                y10.a(new d(iVar3, z10, z12, onCheckedChange, i10, i11));
                return;
            }
            return;
        }
        z12 = z11;
        if ((i11 & 8) == 0) {
        }
        if ((i12 & 5851) == 1170) {
        }
        if (i14 == 0) {
        }
        if (i15 == 0) {
        }
        if (y0.p.H()) {
        }
        n7.a aVar22 = n7.a.f29827a;
        long a122 = aVar22.a(r10, 6).e().a();
        long a132 = aVar22.a(r10, 6).a().a();
        long b102 = aVar22.a(r10, 6).e().b();
        float C2 = aVar22.b(r10, 6).C();
        float x102 = aVar22.b(r10, 6).x();
        m1 e102 = n1.e(Boolean.valueOf(z10), "SwitchTransition", r10, ((i12 >> 3) & 14) | 48, 0);
        b bVar2 = b.f7736p;
        q1 b112 = s1.b(c3.h.f7410q);
        boolean booleanValue22 = ((Boolean) e102.h()).booleanValue();
        r10.e(-1482952095);
        if (y0.p.H()) {
        }
        r10.e(-868944443);
        if (!booleanValue22) {
        }
        r10.N();
        if (y0.p.H()) {
        }
        r10.N();
        c3.h m112 = c3.h.m(t10);
        boolean booleanValue32 = ((Boolean) e102.o()).booleanValue();
        r10.e(-1482952095);
        if (y0.p.H()) {
        }
        r10.e(i13);
        if (!booleanValue32) {
        }
        r10.N();
        if (y0.p.H()) {
        }
        r10.N();
        y3 c102 = n1.c(e102, m112, c3.h.m(t11), (y.g0) bVar2.invoke(e102.m(), r10, 0), b112, "ThumbOffset", r10, 196608);
        a aVar32 = a.f7735p;
        boolean booleanValue42 = ((Boolean) e102.o()).booleanValue();
        r10.e(-1046126792);
        if (y0.p.H()) {
        }
        if (!booleanValue42) {
        }
        if (y0.p.H()) {
        }
        r10.N();
        t1.c q102 = s1.g0.q(j10);
        R = r10.R(q102);
        f10 = r10.f();
        if (!R) {
        }
        f10 = (q1) x.h.a(s1.g0.f35254b).invoke(q102);
        r10.I(f10);
        q1 q1Var2 = (q1) f10;
        boolean booleanValue52 = ((Boolean) e102.h()).booleanValue();
        r10.e(-1046126792);
        if (y0.p.H()) {
        }
        if (!booleanValue52) {
        }
        if (y0.p.H()) {
        }
        r10.N();
        s1.g0 h102 = s1.g0.h(j11);
        booleanValue = ((Boolean) e102.o()).booleanValue();
        r10.e(-1046126792);
        if (y0.p.H()) {
        }
        if (!booleanValue) {
        }
        if (y0.p.H()) {
        }
        r10.N();
        y3 c112 = n1.c(e102, h102, s1.g0.h(a132), (y.g0) aVar32.invoke(e102.m(), r10, 0), q1Var2, "TrackColor", r10, 196608);
        l1.i i162 = androidx.compose.foundation.layout.o.i(androidx.compose.foundation.layout.o.s(iVar3, C2), x102);
        f11 = r10.f();
        aVar = y0.m.f51621a;
        if (f11 == aVar.a()) {
        }
        d0.l lVar2 = (d0.l) f11;
        r10.e(2138386611);
        m10 = r10.m(onCheckedChange) | r10.c(z10);
        f12 = r10.f();
        if (!m10) {
        }
        f12 = new c(onCheckedChange, z10);
        r10.I(f12);
        r10.N();
        l1.i b122 = androidx.compose.foundation.d.b(i162, lVar2, null, z13, null, null, (dn.a) f12, 24, null);
        c.a aVar42 = l1.c.f27332a;
        h2.e0 h112 = androidx.compose.foundation.layout.b.h(aVar42.h(), false);
        a10 = y0.j.a(r10, 0);
        y0.y D2 = r10.D();
        l1.i e112 = l1.h.e(r10, b122);
        g.a aVar52 = j2.g.f23616d;
        dn.a a142 = aVar52.a();
        if (!(r10.w() instanceof y0.f)) {
        }
        r10.u();
        if (r10.n()) {
        }
        a11 = d4.a(r10);
        d4.b(a11, h112, aVar52.c());
        d4.b(a11, D2, aVar52.e());
        dn.p b132 = aVar52.b();
        if (!a11.n()) {
        }
        a11.I(Integer.valueOf(a10));
        a11.l(Integer.valueOf(a10), b132);
        d4.b(a11, e112, aVar52.d());
        androidx.compose.foundation.layout.d dVar2 = androidx.compose.foundation.layout.d.f1828a;
        i.a aVar62 = l1.i.f27362a;
        androidx.compose.foundation.layout.b.a(androidx.compose.foundation.b.d(p1.e.a(androidx.compose.foundation.layout.o.i(androidx.compose.foundation.layout.o.s(dVar2.a(aVar62, aVar42.h()), C2), aVar22.b(r10, 6).q()), k0.g.a(50)), c(c112), null, 2, null), r10, 0);
        androidx.compose.foundation.layout.b.a(androidx.compose.foundation.b.c(p1.j.b(z.e.f(androidx.compose.foundation.layout.o.o(androidx.compose.foundation.layout.j.b(aVar62, b(c102), BitmapDescriptorFactory.HUE_RED, 2, null), x102), aVar22.b(r10, 6).o(), s1.g0.l(s1.g0.f35254b.a(), 0.08f, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, 14, null), k0.g.f()), aVar22.b(r10, 6).o(), k0.g.f(), false, 0L, 0L, 24, null), a122, k0.g.f()), r10, 0);
        r10.O();
        if (y0.p.H()) {
        }
        z12 = z13;
        y10 = r10.y();
        if (y10 == null) {
        }
    }

    private static final float b(y3 y3Var) {
        return ((c3.h) y3Var.getValue()).y();
    }

    private static final long c(y3 y3Var) {
        return ((s1.g0) y3Var.getValue()).v();
    }
}
