package d3;

import I0.AbstractC0303l;
import V2.R2;
import V2.n3;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import androidx.media3.exoplayer.ExoPlayer;
import c3.C1240c;
import com.debridstream.tv.screens.CloudManagerViewModel;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.ListIterator;
import k5.C2433v;
import k5.C2434w;
import l5.AbstractC2458c;
import q.InterfaceC2807y;
import t.AbstractC2931n;
import t.C2925h;
import t.C2928k;
import t.C2937t;
import t.C2940w;
import v.C2966A;
import v.C3020e0;
import v0.AbstractC3060B;
import v0.C3059A;
import v0.C3071i;
import v0.C3072j;
import v0.C3073k;
import v0.C3074l;
import v0.C3075m;
import v0.C3076n;
import v0.C3077o;
import v0.C3078p;
import v0.C3079q;
import v0.C3080s;
import v0.C3081t;
import v0.C3082u;
import v0.C3083v;
import v0.C3084w;
import v0.C3085x;
import v0.C3086y;
import v0.C3087z;
import w4.C3137A;
import x4.AbstractC3229F;
import x4.AbstractC3251q;
import x4.AbstractC3253s;
import x4.AbstractC3257w;

/* JADX INFO: renamed from: d3.z0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final /* synthetic */ class C1943z0 implements J4.a {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ Object f16200c;

    public /* synthetic */ C1943z0(int i6, Object obj, Object obj2) {
        this.f16198a = i6;
        this.f16199b = obj;
        this.f16200c = obj2;
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$PrimitiveArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // J4.a
    public final Object invoke() {
        String[] strArrNames;
        AbstractC3060B c3079q;
        AbstractC3060B c3071i;
        Object obj = null;
        int i6 = 0;
        C3137A c3137a = C3137A.f25453a;
        Object obj2 = this.f16199b;
        Object obj3 = this.f16200c;
        switch (this.f16198a) {
            case 0:
                C1240c c1240c = (C1240c) ((MutableState) obj2).getValue();
                if (c1240c != null) {
                    long j4 = c1240c.f13427b;
                    if (j4 < 0) {
                        j4 = 0;
                    }
                    ((ExoPlayer) obj3).seekTo(j4);
                }
                return c3137a;
            case 1:
                return W.a.S((String) obj2, i5.c.f19078k, new i5.g[0], new g5.d((g5.e) obj3, i6));
            case 2:
                if (!((h3.U) ((State) obj3).getValue()).f17438b) {
                    ((CloudManagerViewModel) obj2).refreshCloudFiles();
                }
                return c3137a;
            case 3:
                ((J4.c) obj2).invoke((R2) obj3);
                return c3137a;
            case 4:
                w4.p pVar = h3.Z1.f17674a;
                ((MutableState) obj2).setValue((R2) obj3);
                return c3137a;
            case 5:
                n3 n3Var = (n3) ((State) obj2).getValue();
                List<String> list = (List) ((State) obj3).getValue();
                ArrayList arrayList = new ArrayList();
                if (n3Var.f7973c.f7466a) {
                    arrayList.add("JustWatch");
                }
                ArrayList arrayList2 = new ArrayList(AbstractC3253s.G(list, 10));
                for (String str : list) {
                    String strI1 = S4.p.i1('/', str, str);
                    if (!S4.p.Q0(strI1)) {
                        str = strI1;
                    }
                    String strL1 = S4.p.l1(str, '.');
                    if (!S4.p.Q0(strL1)) {
                        str = strL1;
                    }
                    arrayList2.add(str);
                }
                AbstractC3257w.L(arrayList2, arrayList);
                String strM0 = AbstractC3251q.m0(arrayList, ", ", null, null, null, 62);
                return S4.p.Q0(strM0) ? "None" : strM0;
            case 6:
                ((J4.c) obj2).invoke((X2.h) obj3);
                return c3137a;
            case 7:
                C2434w c2434w = (C2434w) obj2;
                C2433v c2433v = (C2433v) c2434w.f20106c;
                if (c2433v == null) {
                    Enum[] enumArr = (Enum[]) c2434w.f20105b;
                    c2433v = new C2433v((String) obj3, enumArr.length);
                    for (Enum r02 : enumArr) {
                        c2433v.k(r02.name(), false);
                    }
                }
                return c2433v;
            case 8:
                return W.a.S((String) obj2, i5.k.f19102m, new i5.g[0], new androidx.compose.runtime.snapshots.e((C2434w) obj3, 8));
            case 9:
                LinkedHashMap linkedHashMap = new LinkedHashMap();
                AbstractC2458c abstractC2458c = (AbstractC2458c) obj3;
                l5.j jVar = abstractC2458c.f20333a;
                i5.g gVar = (i5.g) obj2;
                m5.l.n(gVar, abstractC2458c);
                int iF = gVar.f();
                for (int i7 = 0; i7 < iF; i7++) {
                    List listH = gVar.h(i7);
                    ArrayList arrayList3 = new ArrayList();
                    for (Object obj4 : listH) {
                        if (obj4 instanceof l5.u) {
                            arrayList3.add(obj4);
                        }
                    }
                    l5.u uVar = (l5.u) (arrayList3.size() == 1 ? arrayList3.get(0) : null);
                    if (uVar != null && (strArrNames = uVar.names()) != null) {
                        for (String str2 : strArrNames) {
                            String str3 = kotlin.jvm.internal.o.c(gVar.e(), i5.j.f19099j) ? "enum value" : "property";
                            if (linkedHashMap.containsKey(str2)) {
                                String message = "The suggested name '" + str2 + "' for " + str3 + ' ' + gVar.g(i7) + " is already one of the names for " + str3 + ' ' + gVar.g(((Number) AbstractC3229F.t(str2, linkedHashMap)).intValue()) + " in " + gVar;
                                kotlin.jvm.internal.o.h(message, "message");
                                throw new g5.g(message);
                            }
                            linkedHashMap.put(str2, Integer.valueOf(i7));
                        }
                    }
                }
                return linkedHashMap.isEmpty() ? x4.z.f26066a : linkedHashMap;
            case 10:
                ((X4.i) obj2).f(obj3);
                return c3137a;
            case 11:
                float fFloatValue = ((Number) ((q.y0) obj3).f23483m.getValue()).floatValue();
                ArrayList arrayList4 = ((C2928k) obj2).f24238a;
                ListIterator listIterator = arrayList4.listIterator(arrayList4.size());
                while (true) {
                    if (listIterator.hasPrevious()) {
                        Object objPrevious = listIterator.previous();
                        if (((C2940w) objPrevious).f24264a <= fFloatValue) {
                            obj = objPrevious;
                        }
                    }
                }
                C2940w c2940w = (C2940w) obj;
                if (c2940w == null) {
                    c2940w = (C2940w) AbstractC3251q.e0(arrayList4);
                }
                float f6 = (fFloatValue - c2940w.f24264a) / c2940w.f24265b;
                if (c2940w.f24266c != 0) {
                    int i8 = 0;
                    while (f6 > 1.0f) {
                        f6 -= 1.0f;
                        i8++;
                    }
                    if (c2940w.f24267d == q.X.f23247b && i8 % 2 != 0) {
                        f6 = 1.0f - f6;
                    }
                }
                AbstractC2931n abstractC2931n = c2940w.f24268e;
                kotlin.jvm.internal.o.f(abstractC2931n, "null cannot be cast to non-null type androidx.compose.animation.graphics.vector.PropertyValuesHolderPath");
                ArrayList arrayList5 = ((C2937t) abstractC2931n).f24246b;
                Iterator it = arrayList5.iterator();
                int i9 = 0;
                while (true) {
                    if (!it.hasNext()) {
                        i9 = -1;
                    } else if (((C2925h) it.next()).f24224a < f6) {
                        i9++;
                    }
                }
                int i10 = i9 - 1;
                if (i10 < 0) {
                    i10 = 0;
                }
                int i11 = i10 + 1;
                InterfaceC2807y interfaceC2807y = ((C2925h) arrayList5.get(i11)).f24226c;
                float f7 = (f6 - ((C2925h) arrayList5.get(i10)).f24224a) / (((C2925h) arrayList5.get(i11)).f24224a - ((C2925h) arrayList5.get(i10)).f24224a);
                if (f7 < 0.0f) {
                    f7 = 0.0f;
                }
                float fA = interfaceC2807y.a(f7 <= 1.0f ? f7 : 1.0f);
                List list2 = (List) ((C2925h) arrayList5.get(i10)).f24225b;
                List list3 = (List) ((C2925h) arrayList5.get(i11)).f24225b;
                int iMin = Math.min(list2.size(), list3.size());
                ArrayList arrayList6 = new ArrayList(iMin);
                while (i6 < iMin) {
                    Object obj5 = list2.get(i6);
                    AbstractC3060B abstractC3060B = (AbstractC3060B) list3.get(i6);
                    AbstractC3060B abstractC3060B2 = (AbstractC3060B) obj5;
                    if (abstractC3060B2 instanceof C3083v) {
                        if (!(abstractC3060B instanceof C3083v)) {
                            throw new IllegalArgumentException("start and stop path nodes have different types");
                        }
                        C3083v c3083v = (C3083v) abstractC3060B2;
                        C3083v c3083v2 = (C3083v) abstractC3060B;
                        c3079q = new C3083v(W.b.r0(c3083v.f25229c, c3083v2.f25229c, fA), W.b.r0(c3083v.f25230d, c3083v2.f25230d, fA));
                    } else if (abstractC3060B2 instanceof C3076n) {
                        if (!(abstractC3060B instanceof C3076n)) {
                            throw new IllegalArgumentException("start and stop path nodes have different types");
                        }
                        C3076n c3076n = (C3076n) abstractC3060B2;
                        C3076n c3076n2 = (C3076n) abstractC3060B;
                        c3079q = new C3076n(W.b.r0(c3076n.f25201c, c3076n2.f25201c, fA), W.b.r0(c3076n.f25202d, c3076n2.f25202d, fA));
                    } else if (abstractC3060B2 instanceof C3082u) {
                        if (!(abstractC3060B instanceof C3082u)) {
                            throw new IllegalArgumentException("start and stop path nodes have different types");
                        }
                        C3082u c3082u = (C3082u) abstractC3060B2;
                        C3082u c3082u2 = (C3082u) abstractC3060B;
                        c3079q = new C3082u(W.b.r0(c3082u.f25227c, c3082u2.f25227c, fA), W.b.r0(c3082u.f25228d, c3082u2.f25228d, fA));
                    } else if (abstractC3060B2 instanceof C3075m) {
                        if (!(abstractC3060B instanceof C3075m)) {
                            throw new IllegalArgumentException("start and stop path nodes have different types");
                        }
                        C3075m c3075m = (C3075m) abstractC3060B2;
                        C3075m c3075m2 = (C3075m) abstractC3060B;
                        c3079q = new C3075m(W.b.r0(c3075m.f25199c, c3075m2.f25199c, fA), W.b.r0(c3075m.f25200d, c3075m2.f25200d, fA));
                    } else if (abstractC3060B2 instanceof C3081t) {
                        if (!(abstractC3060B instanceof C3081t)) {
                            throw new IllegalArgumentException("start and stop path nodes have different types");
                        }
                        c3079q = new C3081t(W.b.r0(((C3081t) abstractC3060B2).f25226c, ((C3081t) abstractC3060B).f25226c, fA));
                    } else if (abstractC3060B2 instanceof C3074l) {
                        if (!(abstractC3060B instanceof C3074l)) {
                            throw new IllegalArgumentException("start and stop path nodes have different types");
                        }
                        c3079q = new C3074l(W.b.r0(((C3074l) abstractC3060B2).f25198c, ((C3074l) abstractC3060B).f25198c, fA));
                    } else if (abstractC3060B2 instanceof C3087z) {
                        if (!(abstractC3060B instanceof C3087z)) {
                            throw new IllegalArgumentException("start and stop path nodes have different types");
                        }
                        c3079q = new C3087z(W.b.r0(((C3087z) abstractC3060B2).f25241c, ((C3087z) abstractC3060B).f25241c, fA));
                    } else if (!(abstractC3060B2 instanceof C3059A)) {
                        if (abstractC3060B2 instanceof C3080s) {
                            if (!(abstractC3060B instanceof C3080s)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3080s c3080s = (C3080s) abstractC3060B2;
                            C3080s c3080s2 = (C3080s) abstractC3060B;
                            c3071i = new C3080s(W.b.r0(c3080s.f25220c, c3080s2.f25220c, fA), W.b.r0(c3080s.f25221d, c3080s2.f25221d, fA), W.b.r0(c3080s.f25222e, c3080s2.f25222e, fA), W.b.r0(c3080s.f25223f, c3080s2.f25223f, fA), W.b.r0(c3080s.f25224g, c3080s2.f25224g, fA), W.b.r0(c3080s.f25225h, c3080s2.f25225h, fA));
                        } else if (abstractC3060B2 instanceof C3073k) {
                            if (!(abstractC3060B instanceof C3073k)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3073k c3073k = (C3073k) abstractC3060B2;
                            C3073k c3073k2 = (C3073k) abstractC3060B;
                            c3071i = new C3073k(W.b.r0(c3073k.f25192c, c3073k2.f25192c, fA), W.b.r0(c3073k.f25193d, c3073k2.f25193d, fA), W.b.r0(c3073k.f25194e, c3073k2.f25194e, fA), W.b.r0(c3073k.f25195f, c3073k2.f25195f, fA), W.b.r0(c3073k.f25196g, c3073k2.f25196g, fA), W.b.r0(c3073k.f25197h, c3073k2.f25197h, fA));
                        } else if (abstractC3060B2 instanceof C3085x) {
                            if (!(abstractC3060B instanceof C3085x)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3085x c3085x = (C3085x) abstractC3060B2;
                            C3085x c3085x2 = (C3085x) abstractC3060B;
                            c3079q = new C3085x(W.b.r0(c3085x.f25235c, c3085x2.f25235c, fA), W.b.r0(c3085x.f25236d, c3085x2.f25236d, fA), W.b.r0(c3085x.f25237e, c3085x2.f25237e, fA), W.b.r0(c3085x.f25238f, c3085x2.f25238f, fA));
                        } else if (abstractC3060B2 instanceof C3078p) {
                            if (!(abstractC3060B instanceof C3078p)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3078p c3078p = (C3078p) abstractC3060B2;
                            C3078p c3078p2 = (C3078p) abstractC3060B;
                            c3079q = new C3078p(W.b.r0(c3078p.f25207c, c3078p2.f25207c, fA), W.b.r0(c3078p.f25208d, c3078p2.f25208d, fA), W.b.r0(c3078p.f25209e, c3078p2.f25209e, fA), W.b.r0(c3078p.f25210f, c3078p2.f25210f, fA));
                        } else if (abstractC3060B2 instanceof C3084w) {
                            if (!(abstractC3060B instanceof C3084w)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3084w c3084w = (C3084w) abstractC3060B2;
                            C3084w c3084w2 = (C3084w) abstractC3060B;
                            c3079q = new C3084w(W.b.r0(c3084w.f25231c, c3084w2.f25231c, fA), W.b.r0(c3084w.f25232d, c3084w2.f25232d, fA), W.b.r0(c3084w.f25233e, c3084w2.f25233e, fA), W.b.r0(c3084w.f25234f, c3084w2.f25234f, fA));
                        } else if (abstractC3060B2 instanceof C3077o) {
                            if (!(abstractC3060B instanceof C3077o)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3077o c3077o = (C3077o) abstractC3060B2;
                            C3077o c3077o2 = (C3077o) abstractC3060B;
                            c3079q = new C3077o(W.b.r0(c3077o.f25203c, c3077o2.f25203c, fA), W.b.r0(c3077o.f25204d, c3077o2.f25204d, fA), W.b.r0(c3077o.f25205e, c3077o2.f25205e, fA), W.b.r0(c3077o.f25206f, c3077o2.f25206f, fA));
                        } else if (abstractC3060B2 instanceof C3086y) {
                            if (!(abstractC3060B instanceof C3086y)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3086y c3086y = (C3086y) abstractC3060B2;
                            C3086y c3086y2 = (C3086y) abstractC3060B;
                            c3079q = new C3086y(W.b.r0(c3086y.f25239c, c3086y2.f25239c, fA), W.b.r0(c3086y.f25240d, c3086y2.f25240d, fA));
                        } else if (abstractC3060B2 instanceof C3079q) {
                            if (!(abstractC3060B instanceof C3079q)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3079q c3079q2 = (C3079q) abstractC3060B2;
                            C3079q c3079q3 = (C3079q) abstractC3060B;
                            c3079q = new C3079q(W.b.r0(c3079q2.f25211c, c3079q3.f25211c, fA), W.b.r0(c3079q2.f25212d, c3079q3.f25212d, fA));
                        } else if (abstractC3060B2 instanceof v0.r) {
                            if (!(abstractC3060B instanceof v0.r)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            v0.r rVar = (v0.r) abstractC3060B2;
                            v0.r rVar2 = (v0.r) abstractC3060B;
                            c3071i = new v0.r(W.b.r0(rVar.f25213c, rVar2.f25213c, fA), W.b.r0(rVar.f25214d, rVar2.f25214d, fA), W.b.r0(rVar.f25215e, rVar2.f25215e, fA), rVar.f25216f, rVar.f25217g, W.b.r0(rVar.f25218h, rVar2.f25218h, fA), W.b.r0(rVar.f25219i, rVar2.f25219i, fA));
                        } else if (!(abstractC3060B2 instanceof C3071i)) {
                            c3079q = C3072j.f25191c;
                            if (!kotlin.jvm.internal.o.c(abstractC3060B2, c3079q)) {
                                throw new E3.v();
                            }
                        } else {
                            if (!(abstractC3060B instanceof C3071i)) {
                                throw new IllegalArgumentException("start and stop path nodes have different types");
                            }
                            C3071i c3071i2 = (C3071i) abstractC3060B2;
                            C3071i c3071i3 = (C3071i) abstractC3060B;
                            c3071i = new C3071i(W.b.r0(c3071i2.f25183c, c3071i3.f25183c, fA), W.b.r0(c3071i2.f25184d, c3071i3.f25184d, fA), W.b.r0(c3071i2.f25185e, c3071i3.f25185e, fA), c3071i2.f25186f, c3071i2.f25187g, W.b.r0(c3071i2.f25188h, c3071i3.f25188h, fA), W.b.r0(c3071i2.f25189i, c3071i3.f25189i, fA));
                        }
                        c3079q = c3071i;
                    } else {
                        if (!(abstractC3060B instanceof C3059A)) {
                            throw new IllegalArgumentException("start and stop path nodes have different types");
                        }
                        c3079q = new C3059A(W.b.r0(((C3059A) abstractC3060B2).f24990c, ((C3059A) abstractC3060B).f24990c, fA));
                    }
                    arrayList6.add(c3079q);
                    i6++;
                }
                return arrayList6;
            case 12:
                C2966A c2966a = (C2966A) obj2;
                I0.J j6 = (I0.J) obj3;
                c2966a.l = c2966a.f24673d.mo3createOutlinePq9zytI(j6.f2210a.c(), j6.getLayoutDirection(), j6);
                return c3137a;
            default:
                ((kotlin.jvm.internal.C) obj2).f20115a = AbstractC0303l.h((C3020e0) obj3, G0.o0.f1988a);
                return c3137a;
        }
    }

    public /* synthetic */ C1943z0(R2 r22, MutableState mutableState) {
        this.f16198a = 4;
        this.f16200c = r22;
        this.f16199b = mutableState;
    }
}
