package o; import o.C4199bSx; import o.ZI; import o.cZR; import o.wRi; /* renamed from: o.bSx, reason: case insensitive filesystem */ /* loaded from: classes4.dex */ public class C4199bSx extends ZI { public int a; public String b; public String c; public final DKU d; public String e; private final C17558xn g; private int h; @InterfaceC13391fZD public C4199bSx(C16903sI c16903sI, DKU dku, C17558xn c17558xn) { super(c16903sI); this.h = 1; this.a = 1; this.d = dku; this.g = c17558xn; } /* renamed from: o.bSx$2, reason: invalid class name */ /* loaded from: classes4.dex */ public class AnonymousClass2 extends wRi.LWm { private C4199bSx e; public AnonymousClass2(C4199bSx c4199bSx) { this.e = c4199bSx; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { PuL puL = (PuL) obj; super.onNext(puL); C4199bSx.c(this.e); final RK e = this.e.g.e(puL, this.e.d.c.T(), false); C4199bSx c4199bSx = this.e; ZI.IeS ieS = new ZI.IeS(this, e) { // from class: o.bSD private C4199bSx.AnonymousClass2 d; private RK e; @Override // o.ZI.IeS public final void e(Object obj2) { C4199bSx.AnonymousClass2.b(this.d, this.e, (cZR.HBt) obj2); } { this.d = this; this.e = e; } }; if (c4199bSx.f != 0) { ieS.e(c4199bSx.f); } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(Throwable th) { super.onError(th); guQ.e(th); C4199bSx.a(this.e); C4199bSx c4199bSx = this.e; ZI.IeS ieS = new ZI.IeS() { // from class: o.bSA @Override // o.ZI.IeS public final void e(Object obj) { ((cZR.HBt) obj).b(); } }; if (c4199bSx.f != 0) { ieS.e(c4199bSx.f); } } public static /* synthetic */ void b(AnonymousClass2 anonymousClass2, RK rk, cZR.HBt hBt) { if (rk.j == null || rk.j.b == null || rk.j.b.isEmpty()) { hBt.a(); return; } anonymousClass2.e.h = rk.j.c; if (anonymousClass2.e.h <= 1) { hBt.c(); } hBt.b(rk.j.b); } } public final void a() { int i = this.a + 1; this.a = i; if (i <= this.h) { C5280bq c5280bq = new C5280bq(); String str = this.b; C14957gcv.e(str, ""); c5280bq.b = str; c5280bq.c = Integer.valueOf(this.a); c5280bq.a = 20; c5280bq.d = this.c; c5280bq.e = this.e; this.d.b(c5280bq); DKU dku = this.d; dku.d(dku.i, new AnonymousClass1(this)); return; } ZI.IeS ieS = new ZI.IeS() { // from class: o.bSz @Override // o.ZI.IeS public final void e(Object obj) { ((cZR.HBt) obj).e(); } }; if (this.f != 0) { ieS.e(this.f); } } /* renamed from: o.bSx$1, reason: invalid class name */ /* loaded from: classes4.dex */ final class AnonymousClass1 extends wRi.LWm { private C4199bSx d; AnonymousClass1(C4199bSx c4199bSx) { this.d = c4199bSx; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { PuL puL = (PuL) obj; super.onNext(puL); final RK e = this.d.g.e(puL, this.d.d.c.T(), false); C4199bSx c4199bSx = this.d; ZI.IeS ieS = new ZI.IeS(e) { // from class: o.bSC private RK e; @Override // o.ZI.IeS public final void e(Object obj2) { C4199bSx.AnonymousClass1.d(this.e, (cZR.HBt) obj2); } { this.e = e; } }; if (c4199bSx.f != 0) { ieS.e(c4199bSx.f); } } /* JADX INFO: Access modifiers changed from: package-private */ public static /* synthetic */ void d(RK rk, cZR.HBt hBt) { if (rk.j != null) { hBt.e(rk.j.b); } } } @Override // o.ZI public final void w_() { DKU dku = this.d; if (!dku.h.isDisposed()) { dku.h.dispose(); } super.w_(); } public static /* synthetic */ void d(C4199bSx c4199bSx, RK rk, cZR.HBt hBt) { if (rk != null && rk.j != null) { c4199bSx.b = rk.i; int i = rk.j.c; c4199bSx.h = i; if (i <= 1) { hBt.c(); } hBt.b(rk.j.b); return; } hBt.a(); } static /* synthetic */ void a(C4199bSx c4199bSx) { if (c4199bSx.f != 0) { c4199bSx.f.aq_(); } } static /* synthetic */ void c(C4199bSx c4199bSx) { if (c4199bSx.f != 0) { c4199bSx.f.aq_(); } } }