package b0;

import androidx.compose.foundation.gestures.DraggableElement;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import rm.n0;
import tp.m0;
import y0.n3;
import y0.y3;

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

    /* renamed from: a */
    private static final dn.q f6418a = new a(null);

    /* renamed from: b */
    private static final dn.q f6419b = new b(null);

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

        /* renamed from: p */
        int f6420p;

        a(vm.d dVar) {
            super(3, dVar);
        }

        public final Object b(m0 m0Var, long j10, vm.d dVar) {
            return new a(dVar).invokeSuspend(n0.f34904a);
        }

        @Override // dn.q
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
            return b((m0) obj, ((r1.g) obj2).v(), (vm.d) obj3);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            wm.d.f();
            if (this.f6420p != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            rm.y.b(obj);
            return n0.f34904a;
        }
    }

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

        /* renamed from: p */
        int f6421p;

        b(vm.d dVar) {
            super(3, dVar);
        }

        public final Object b(m0 m0Var, float f10, vm.d dVar) {
            return new b(dVar).invokeSuspend(n0.f34904a);
        }

        @Override // dn.q
        public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2, Object obj3) {
            return b((m0) obj, ((Number) obj2).floatValue(), (vm.d) obj3);
        }

        @Override // kotlin.coroutines.jvm.internal.a
        public final Object invokeSuspend(Object obj) {
            wm.d.f();
            if (this.f6421p != 0) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            rm.y.b(obj);
            return n0.f34904a;
        }
    }

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

        /* renamed from: p */
        final /* synthetic */ y3 f6422p;

        /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
        c(y3 y3Var) {
            super(1);
            this.f6422p = y3Var;
        }

        public final void a(float f10) {
            ((dn.l) this.f6422p.getValue()).invoke(Float.valueOf(f10));
        }

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

    public static final m a(dn.l lVar) {
        return new g(lVar);
    }

    public static final /* synthetic */ long f(long j10) {
        return l(j10);
    }

    public static final l1.i g(l1.i iVar, m mVar, q qVar, boolean z10, d0.l lVar, boolean z11, dn.q qVar2, dn.q qVar3, boolean z12) {
        return iVar.f(new DraggableElement(mVar, qVar, z10, lVar, z11, qVar2, qVar3, z12));
    }

    public static final m i(dn.l lVar, y0.m mVar, int i10) {
        if (y0.p.H()) {
            y0.p.Q(-183245213, i10, -1, "androidx.compose.foundation.gestures.rememberDraggableState (Draggable.kt:135)");
        }
        y3 o10 = n3.o(lVar, mVar, i10 & 14);
        Object f10 = mVar.f();
        if (f10 == y0.m.f51621a.a()) {
            f10 = a(new c(o10));
            mVar.I(f10);
        }
        m mVar2 = (m) f10;
        if (y0.p.H()) {
            y0.p.P();
        }
        return mVar2;
    }

    public static final float j(long j10, q qVar) {
        return qVar == q.Vertical ? r1.g.n(j10) : r1.g.m(j10);
    }

    public static final float k(long j10, q qVar) {
        return qVar == q.Vertical ? c3.y.i(j10) : c3.y.h(j10);
    }

    public static final long l(long j10) {
        boolean isNaN = Float.isNaN(c3.y.h(j10));
        float f10 = BitmapDescriptorFactory.HUE_RED;
        float h10 = isNaN ? 0.0f : c3.y.h(j10);
        if (!Float.isNaN(c3.y.i(j10))) {
            f10 = c3.y.i(j10);
        }
        return c3.z.a(h10, f10);
    }
}
