package d3;

import androidx.compose.runtime.MutableState;
import f3.C2036a;
import f3.C2037b;
import f3.C2039d;
import j$.time.format.DateTimeFormatter;
import m3.AbstractC2467b;
import okhttp3.OkHttpClient;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class P0 extends C4.j implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f15283a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ C2036a f15284b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ J4.f f15285c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ MutableState f15286d;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public P0(C2036a c2036a, J4.f fVar, MutableState mutableState, A4.d dVar) {
        super(2, dVar);
        this.f15284b = c2036a;
        this.f15285c = fVar;
        this.f15286d = mutableState;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new P0(this.f15284b, this.f15285c, this.f15286d, dVar);
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((P0) create((V4.C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f15283a;
        C2036a c2036a = this.f15284b;
        String str = c2036a.f16410b;
        MutableState mutableState = this.f15286d;
        try {
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                DateTimeFormatter dateTimeFormatter = v2.f16084a;
                mutableState.setValue(str);
                OkHttpClient okHttpClient = C2039d.f16416a;
                this.f15283a = 1;
                c5.e eVar = V4.N.f8259a;
                obj = V4.E.H(c5.d.f13466b, new C2037b(str, null), this);
                if (obj == aVar) {
                    return aVar;
                }
            } else {
                if (i6 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
            }
            String str2 = (String) obj;
            if (str2 != null && !S4.p.Q0(str2)) {
                this.f15285c.invoke(str2, str, c2036a.f16411c);
            }
            DateTimeFormatter dateTimeFormatter2 = v2.f16084a;
            mutableState.setValue(null);
            return C3137A.f25453a;
        } catch (Throwable th) {
            DateTimeFormatter dateTimeFormatter3 = v2.f16084a;
            mutableState.setValue(null);
            throw th;
        }
    }
}
