package com.strmr.ps.data.service;

import com.strmr.ps.data.model.debrid.DebridFileItem;
import defpackage.ak1;
import defpackage.ck1;
import defpackage.e6a;
import defpackage.gr3;
import defpackage.i50;
import defpackage.q07;
import defpackage.s38;
import defpackage.u75;
import defpackage.vx8;
import defpackage.wj0;
import defpackage.y41;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.SuspendLambda;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Lak1;", "", "Lu75;", "<anonymous>", "(Lak1;)Ljava/util/List;"}, k = 3, mv = {2, 0, 0})
@DebugMetadata(c = "com.strmr.ps.data.service.DebridLibrarySearchService$drillIntoFolders$2", f = "DebridLibrarySearchService.kt", i = {}, l = {316}, m = "invokeSuspend", n = {}, s = {})
@vx8
final class p extends SuspendLambda implements gr3<ak1, Continuation<? super List<? extends u75>>, Object> {
    public int a;
    public /* synthetic */ Object b;
    public final /* synthetic */ List c;
    public final /* synthetic */ DebridLibrarySearchService d;
    public final /* synthetic */ boolean e;
    public final /* synthetic */ int f;
    public final /* synthetic */ int i;
    public final /* synthetic */ String j;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public p(List list, DebridLibrarySearchService debridLibrarySearchService, boolean z, int i, int i2, String str, Continuation continuation) {
        super(2, continuation);
        this.c = list;
        this.d = debridLibrarySearchService;
        this.e = z;
        this.f = i;
        this.i = i2;
        this.j = str;
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Continuation create(Object obj, Continuation continuation) {
        p pVar = new p(this.c, this.d, this.e, this.f, this.i, this.j, continuation);
        pVar.b = obj;
        return pVar;
    }

    @Override // defpackage.gr3
    public final Object invoke(Object obj, Object obj2) {
        return ((p) create((ak1) obj, (Continuation) obj2)).invokeSuspend(e6a.a);
    }

    @Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
    public final Object invokeSuspend(Object obj) {
        Object objA;
        ck1 ck1Var = ck1.a;
        int i = this.a;
        if (i == 0) {
            s38.b(obj);
            ak1 ak1Var = (ak1) this.b;
            List<q07> list = this.c;
            ArrayList arrayList = new ArrayList(y41.p(list, 10));
            for (q07 q07Var : list) {
                String str = (String) q07Var.a;
                arrayList.add(wj0.a(ak1Var, null, new o(this.f, this.i, (DebridFileItem.Folder) q07Var.b, this.d, str, this.j, null, this.e), 3));
            }
            this.a = 1;
            objA = i50.a(arrayList, this);
            if (objA == ck1Var) {
                return ck1Var;
            }
        } else {
            if (i != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            s38.b(obj);
            objA = obj;
        }
        return y41.x((Iterable) objA);
    }
}
