package o;

import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.CancellationSignal;
import android.view.MotionEvent;
import androidx.compose.ui.draw.ShadowGraphicsLayerElement;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.CommonStatusCodes;
import java.io.File;
import java.util.Map;
import java.util.concurrent.CancellationException;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.w, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2769w extends AbstractC0706aK implements OC {
    public final /* synthetic */ int m;
    public final /* synthetic */ Object n;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ C2769w(int i, Object obj) {
        super(1);
        this.m = i;
        this.n = obj;
    }

    /* JADX WARN: Type inference failed for: r1v8, types: [o.VW, o.z2] */
    @Override // o.OC
    public final Object g(Object obj) {
        switch (this.m) {
            case 0:
                return obj == ((AbstractC2864x) this.n) ? "(this Collection)" : String.valueOf(obj);
            case 1:
                Map.Entry entry = (Map.Entry) obj;
                T t = (T) this.n;
                StringBuilder sb = new StringBuilder();
                Object key = entry.getKey();
                sb.append(key == t ? "(this Map)" : String.valueOf(key));
                sb.append('=');
                Object value = entry.getValue();
                sb.append(value != t ? String.valueOf(value) : "(this Map)");
                return sb.toString();
            case 2:
                InterfaceC3059z2 interfaceC3059z2 = (InterfaceC3059z2) obj;
                C2515tK c2515tK = (C2515tK) this.n;
                if (interfaceC3059z2.u()) {
                    if (interfaceC3059z2.a().b) {
                        interfaceC3059z2.s();
                    }
                    for (Map.Entry entry2 : interfaceC3059z2.a().g.entrySet()) {
                        C2515tK.a(c2515tK, (AbstractC2679v2) entry2.getKey(), ((Number) entry2.getValue()).intValue(), interfaceC3059z2.n());
                    }
                    for (AbstractC2239qS abstractC2239qS = interfaceC3059z2.n().B; !F3.c(abstractC2239qS, c2515tK.a.n()); abstractC2239qS = abstractC2239qS.B) {
                        for (AbstractC2679v2 abstractC2679v2 : c2515tK.b(abstractC2239qS).keySet()) {
                            C2515tK.a(c2515tK, abstractC2679v2, c2515tK.c(abstractC2239qS, abstractC2679v2), abstractC2239qS);
                        }
                    }
                }
                return Oh0.a;
            case 3:
                return Boolean.valueOf(((YH) this.n).a(((R50) obj).g));
            case 4:
                return Boolean.valueOf(Co0.g((R50) obj, (Resources) this.n));
            case 5:
                ((InterfaceC1191fR) this.n).setValue(new Configuration((Configuration) obj));
                return Oh0.a;
            case 6:
                return new H1(1, (C2662us) this.n);
            case 7:
                ((C2420sK) this.n).V((InterfaceC2281qr) obj);
                return Oh0.a;
            case 8:
                return Boolean.valueOf(F3.c(obj, this.n));
            case ConnectionResult.SERVICE_INVALID /* 9 */:
                C2610uK c2610uK = (C2610uK) obj;
                ((C1590je) this.n).g(c2610uK);
                c2610uK.a();
                return Oh0.a;
            case 10:
                X6 x6 = (X6) obj;
                float f = x6.b;
                if (f < 0.0f) {
                    f = 0.0f;
                }
                if (f > 1.0f) {
                    f = 1.0f;
                }
                float f2 = x6.c;
                if (f2 < -0.5f) {
                    f2 = -0.5f;
                }
                if (f2 > 0.5f) {
                    f2 = 0.5f;
                }
                float f3 = x6.d;
                float f4 = f3 >= -0.5f ? f3 : -0.5f;
                float f5 = f4 <= 0.5f ? f4 : 0.5f;
                float f6 = x6.a;
                float f7 = f6 >= 0.0f ? f6 : 0.0f;
                return new C0190Hi(C0190Hi.a(AbstractC0752ap.a(f, f2, f5, f7 <= 1.0f ? f7 : 1.0f, C0423Qi.x), (AbstractC0345Ni) this.n));
            case ConnectionResult.LICENSE_CHECK_FAILED /* 11 */:
                if (((Throwable) obj) != null) {
                    ((CancellationSignal) this.n).cancel();
                }
                return Oh0.a;
            case 12:
                return Boolean.valueOf(!F3.c(obj, ((C3114zg0) this.n).d.getValue()));
            case 13:
                ((L20) obj).a(((Number) ((InterfaceC3007ya0) this.n).getValue()).floatValue());
                return Oh0.a;
            case 14:
                Throwable th = (Throwable) obj;
                C0041Bp c0041Bp = (C0041Bp) this.n;
                C1014dc0 c1014dc0 = c0041Bp.j;
                if (th != null) {
                    c0041Bp.h.x(new C2577ty(th));
                }
                if (c1014dc0.a()) {
                    ((C1343gy) c1014dc0.getValue()).close();
                }
                return Oh0.a;
            case 15:
                ((C1332gs) this.n).v = true;
                return Oh0.a;
            case 16:
                C0329Ms c0329Ms = (C0329Ms) obj;
                if (!c0329Ms.l.y) {
                    return Wg0.m;
                }
                C0329Ms c0329Ms2 = c0329Ms.A;
                Wg0 wg0 = Wg0.l;
                if (c0329Ms2 != null) {
                    C2769w c2769w = new C2769w(16, (C0247Jn) this.n);
                    if (c2769w.g(c0329Ms2) == wg0) {
                        YT.W(c0329Ms2, c2769w);
                    }
                }
                c0329Ms.A = null;
                c0329Ms.z = null;
                return wg0;
            case 17:
                boolean zCompareAndSet = XD.b.compareAndSet(false, true);
                Oh0 oh0 = Oh0.a;
                if (zCompareAndSet) {
                    ((C1210ff) this.n).p(oh0);
                }
                return oh0;
            case ConnectionResult.SERVICE_UPDATING /* 18 */:
                InterfaceC2095ot interfaceC2095ot = (InterfaceC2095ot) obj;
                C1082eE c1082eE = (C1082eE) this.n;
                O4 o4 = c1082eE.l;
                if (c1082eE.n && c1082eE.w && o4 != null) {
                    C3126zm0 c3126zm0E = interfaceC2095ot.E();
                    long jD = c3126zm0E.D();
                    c3126zm0E.x().n();
                    try {
                        ((C3126zm0) ((OD) c3126zm0E.m).m).x().o(o4);
                        c1082eE.c(interfaceC2095ot);
                    } finally {
                        AbstractC2462sn.t(c3126zm0E, jD);
                    }
                } else {
                    c1082eE.c(interfaceC2095ot);
                }
                return Oh0.a;
            case 19:
                InterfaceC2095ot interfaceC2095ot2 = (InterfaceC2095ot) obj;
                C1274gE c1274gE = (C1274gE) this.n;
                InterfaceC2923xg interfaceC2923xgX = interfaceC2095ot2.E().x();
                SC sc = c1274gE.f539o;
                if (sc != null) {
                    sc.f(interfaceC2923xgX, (C1082eE) interfaceC2095ot2.E().n);
                }
                return Oh0.a;
            case 20:
                AbstractC2738vi0 abstractC2738vi0 = (AbstractC2738vi0) obj;
                C2130pE c2130pE = (C2130pE) this.n;
                c2130pE.g(abstractC2738vi0);
                OC oc = c2130pE.i;
                if (oc != null) {
                    oc.g(abstractC2738vi0);
                }
                return Oh0.a;
            case CommonStatusCodes.RECONNECTION_TIMED_OUT_DURING_UPDATE /* 21 */:
                WS ws = (WS) obj;
                R00 r00 = ws.b;
                if (r00 != null) {
                    ws.a(r00);
                    ws.b = null;
                }
                EH eh = (EH) this.n;
                C1479iR c1479iR = eh.d;
                Object[] objArr = c1479iR.l;
                int i = c1479iR.n;
                int i2 = 0;
                while (true) {
                    if (i2 >= i) {
                        i2 = -1;
                    } else if (!F3.c((Ok0) objArr[i2], ws)) {
                        i2++;
                    }
                }
                if (i2 >= 0) {
                    c1479iR.k(i2);
                }
                if (c1479iR.n == 0) {
                    eh.b.a();
                }
                return Oh0.a;
            case 22:
                Throwable th2 = (Throwable) obj;
                C0896cJ c0896cJ = (C0896cJ) this.n;
                if (th2 == null) {
                    if (!c0896cJ.l.isDone()) {
                        throw new IllegalArgumentException("Failed requirement.");
                    }
                } else if (th2 instanceof CancellationException) {
                    c0896cJ.l.cancel(true);
                } else {
                    C2595u70 c2595u70 = c0896cJ.l;
                    Throwable cause = th2.getCause();
                    if (cause != null) {
                        th2 = cause;
                    }
                    c2595u70.j(th2);
                }
                return Oh0.a;
            case ConnectionResult.API_DISABLED /* 23 */:
                return new C3091zQ(((C0168Gm) this.n).l, (File) obj);
            case ConnectionResult.API_DISABLED_FOR_CONNECTION /* 24 */:
                ((C1479iR) this.n).b((KP) obj);
                return Boolean.TRUE;
            case 25:
                MotionEvent motionEvent = (MotionEvent) obj;
                T5 t5 = ((NX) this.n).a;
                if (t5 == null) {
                    t5 = null;
                }
                t5.g(motionEvent);
                return Oh0.a;
            case 26:
                Y50.c((N50) obj, ((C1065e30) this.n).a);
                return Oh0.a;
            case 27:
                Y50.b((N50) obj, (String) this.n);
                return Oh0.a;
            case 28:
                return ((K0) this.n).a();
            default:
                L20 l20 = (L20) obj;
                ShadowGraphicsLayerElement shadowGraphicsLayerElement = (ShadowGraphicsLayerElement) this.n;
                l20.h(l20.x.e() * shadowGraphicsLayerElement.a);
                l20.i(shadowGraphicsLayerElement.b);
                l20.c(shadowGraphicsLayerElement.c);
                l20.b(shadowGraphicsLayerElement.d);
                l20.j(shadowGraphicsLayerElement.e);
                return Oh0.a;
        }
    }
}
