package o; import java.util.List; import o.C5966cEj; import o.InterfaceC8929daC; import o.ZI; import o.wRi; /* renamed from: o.cEj, reason: case insensitive filesystem */ /* loaded from: classes4.dex */ public class C5966cEj extends ZI { protected int a; protected int b; public final BB c; public final mSw d; public final HjH e; private BD g; @InterfaceC13391fZD public C5966cEj(C16903sI c16903sI, mSw msw, BB bb, BD bd, HjH hjH) { super(c16903sI); this.c = bb; this.g = bd; this.d = msw; this.e = hjH; this.b = 1; this.a = 1; } @Override // o.ZI public final void w_() { super.w_(); HjH hjH = this.e; if (hjH.h.isDisposed()) { return; } hjH.h.dispose(); } /* renamed from: o.cEj$HBt */ /* loaded from: classes4.dex */ public final class HBt extends wRi.LWm { private C5966cEj c; private HBt(C5966cEj c5966cEj) { this.c = c5966cEj; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { C8987dbH c8987dbH = (C8987dbH) obj; if (this.c.f != 0) { final List list = (List) C16157lj.c(new Object[]{c8987dbH.c, new BG(this.c.g, this.c.d.b.T())}, -1846295624, 1846295631, (int) System.currentTimeMillis()); C5966cEj c5966cEj = this.c; ZI.IeS ieS = new ZI.IeS(list) { // from class: o.cEr private List c; @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC8929daC.RVV) obj2).c(this.c); } { this.c = list; } }; if (c5966cEj.f != 0) { ieS.e(c5966cEj.f); } } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(Throwable th) { if (this.c.i(th) || this.c.f == 0) { return; } C5966cEj c5966cEj = this.c; c5966cEj.d(c5966cEj.j.e(th)); } public /* synthetic */ HBt(C5966cEj c5966cEj, byte b) { this(c5966cEj); } } /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.cEj$IeS */ /* loaded from: classes4.dex */ public final class IeS extends wRi.LWm { private C5966cEj b; private IeS(C5966cEj c5966cEj) { this.b = c5966cEj; } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final /* synthetic */ void onNext(Object obj) { int i; int i2; final vdc vdcVar = (vdc) obj; if (this.b.f != 0) { if (vdcVar.b > 0) { i2 = vdcVar.b; i = vdcVar.c + 1; } else { i = vdcVar.c; i2 = 1; } if (this.b.b == 1) { C5966cEj c5966cEj = this.b; ZI.IeS ieS = new ZI.IeS(this, vdcVar) { // from class: o.cEn private vdc a; private C5966cEj.IeS c; @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC8929daC.RVV) obj2).e(true, r0.b.c.b(r1.d, this.c.b.d.b.T()), this.a.b); } { this.c = this; this.a = vdcVar; } }; if (c5966cEj.f != 0) { ieS.e(c5966cEj.f); } this.b.b = i; this.b.a = i2; } else if (this.b.b <= vdcVar.c && this.b.b <= vdcVar.b) { C5966cEj c5966cEj2 = this.b; ZI.IeS ieS2 = new ZI.IeS(this, vdcVar) { // from class: o.cEo private C5966cEj.IeS a; private vdc b; @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC8929daC.RVV) obj2).e(false, r0.b.c.b(r1.d, this.a.b.d.b.T()), this.b.b); } { this.a = this; this.b = vdcVar; } }; if (c5966cEj2.f != 0) { ieS2.e(c5966cEj2.f); } this.b.b = i; this.b.a = i2; } else { C5966cEj c5966cEj3 = this.b; ZI.IeS ieS3 = new ZI.IeS(vdcVar) { // from class: o.cEp private vdc c; @Override // o.ZI.IeS public final void e(Object obj2) { ((InterfaceC8929daC.RVV) obj2).e(false, null, this.c.b); } { this.c = vdcVar; } }; if (c5966cEj3.f != 0) { ieS3.e(c5966cEj3.f); } this.b.a = 1; } C5966cEj.i(this.b); } } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onComplete() { C5966cEj.d(this.b); } @Override // o.wRi.LWm, o.InterfaceC13174fSv public final void onError(final Throwable th) { if (this.b.i(th) || this.b.f == 0) { return; } C5966cEj c5966cEj = this.b; ZI.IeS ieS = new ZI.IeS(this, th) { // from class: o.cEi private C5966cEj.IeS c; private Throwable e; @Override // o.ZI.IeS public final void e(Object obj) { InterfaceC8929daC.RVV rvv = (InterfaceC8929daC.RVV) obj; rvv.b(this.c.b.j.e(this.e)); } { this.c = this; this.e = th; } }; if (c5966cEj.f != 0) { ieS.e(c5966cEj.f); } } /* synthetic */ IeS(C5966cEj c5966cEj, byte b) { this(c5966cEj); } } static /* synthetic */ void d(C5966cEj c5966cEj) { if (c5966cEj.f != 0) { c5966cEj.f.aq_(); } } static /* synthetic */ void i(C5966cEj c5966cEj) { if (c5966cEj.f != 0) { c5966cEj.f.aq_(); } } public final void a(List list) { if (this.b <= this.a) { if (this.f != 0) { this.f.v(); } C10894eS e = C10894eS.e(); e.c = list; e.b = "90"; e.a = "10"; e.d = String.valueOf(this.b); HjH hjH = this.e; if (!hjH.h.isDisposed()) { hjH.h.dispose(); } this.e.b(e); HjH hjH2 = this.e; hjH2.d(hjH2.i, new IeS(this, (byte) 0)); } } public final void a() { this.b = 1; this.a = 1; } public final boolean b() { return this.b > this.a; } }