package o; import android.content.res.Resources; import android.util.Base64; import java.nio.charset.StandardCharsets; import java.util.Objects; import o.C0690Mh; import o.C15715hv; import o.InterfaceC9453djy; import o.ZI; /* renamed from: o.bTo */ /* loaded from: classes4.dex */ public final class C4220bTo extends ZI implements InterfaceC9453djy.HBt { private static int k = 0; private static byte l = 6; private static int t = 1; private C0966Sm a; private RQ b; private final YpL c; private RV d; private C0952SdK e; private C17496xK g; private C17489xG h; private ZIS i; private final Resources m; private final C17492xH n; /* renamed from: o */ private C16121lS f8550o; @Override // o.InterfaceC9453djy.HBt public final /* synthetic */ void d(InterfaceC9453djy.IeS ieS) { super.e((C4220bTo) ieS); } private void p(String str, Object[] objArr) { byte[] decode = Base64.decode(str, 0); byte[] bArr = new byte[decode.length]; for (int i = 0; i < decode.length; i++) { bArr[i] = (byte) (decode[(decode.length - i) - 1] ^ l); } objArr[0] = new String(bArr, StandardCharsets.UTF_8); } @InterfaceC13391fZD public C4220bTo(Resources resources, C16903sI c16903sI, YpL ypL, C17492xH c17492xH, C17496xK c17496xK, C0952SdK c0952SdK, C16121lS c16121lS, C17489xG c17489xG) { super(c16903sI); this.m = resources; this.c = ypL; this.n = c17492xH; this.g = c17496xK; this.e = c0952SdK; this.f8550o = c16121lS; this.h = c17489xG; } @Override // o.InterfaceC9453djy.HBt public final void b() { ZI.IeS ieS = new ZI.IeS() { // from class: o.bTm @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9453djy.IeS) obj).c(); } }; if (this.f != 0) { ieS.e(this.f); } } @Override // o.InterfaceC9453djy.HBt public final void a() { ZI.IeS ieS = new ZI.IeS() { // from class: o.bTH @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9453djy.IeS) obj).a(); } }; if (this.f != 0) { ieS.e(this.f); } } @Override // o.InterfaceC9453djy.HBt public final void a(C0958Sh c0958Sh) { C3572bA c = this.c.c(); C3798bH c3798bH = c.b; c3798bH.i = c0958Sh.d; c3798bH.g = c0958Sh.a; c3798bH.f8540o = "TNC01"; C3830bI c3830bI = c.e; ((C3830bI) C3830bI.d(new Object[]{c3830bI, c0958Sh.d}, 914634312, -914634312, System.identityHashCode(c3830bI))).f(c0958Sh.i).i(c0958Sh.c).j(c0958Sh.a).d(c0958Sh.b); C3605bB c3605bB = c.c; c3605bB.j = c0958Sh.i; c3605bB.c = c0958Sh.c; c3605bB.h = c0958Sh.e; c3605bB.d = this.d.b; c3605bB.i = this.a.a; RQ rq = this.b; c3605bB.e = rq != null ? rq.a : null; ZI.IeS ieS = new ZI.IeS() { // from class: o.bTL @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9453djy.IeS) obj).d(); } }; if (this.f != 0) { ieS.e(this.f); } } @Override // o.InterfaceC9453djy.HBt public final void e(C0958Sh c0958Sh) { if (this.c.g()) { if (this.c.c().e.g() == null || this.c.c().e.g().equals("")) { return; } if ("LANDING".equals(this.c.e.d().e)) { rzT d = this.c.e.d(); C3572bA c = this.c.c(); if (c != null && d != null && d.d != null) { boolean equals = d.d.g.equals(this.a.a); boolean equals2 = c.e.g().equals(this.i.m); if ((!equals) || (!equals2)) { ZI.IeS ieS = new ZI.IeS(c0958Sh) { // from class: o.bTy private C0958Sh e; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9453djy.IeS) obj).a(this.e); } { this.e = c0958Sh; } }; if (this.f != 0) { ieS.e(this.f); return; } return; } } } a(c0958Sh); return; } a(c0958Sh); } @Override // o.InterfaceC9453djy.HBt public final void a(String str) { ZI.IeS ieS = new ZI.IeS(str) { // from class: o.bTF private String a; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9453djy.IeS) obj).a(this.a); } { this.a = str; } }; if (this.f != 0) { ieS.e(this.f); } } @Override // o.InterfaceC9453djy.HBt public final void c(String str) { ZI.IeS ieS = new ZI.IeS(str) { // from class: o.bTJ private String c; @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9453djy.IeS) obj).a(this.c); } { this.c = str; } }; if (this.f != 0) { ieS.e(this.f); } } @Override // o.InterfaceC9453djy.HBt public final void b(String str) { this.c.c().e.k(str); ZI.IeS ieS = new ZI.IeS(this, str) { // from class: o.bTK private C4220bTo a; private String e; @Override // o.ZI.IeS public final void e(Object obj) { C4220bTo.b(this.a, this.e, (InterfaceC9453djy.IeS) obj); } { this.a = this; this.e = str; } }; if (this.f != 0) { ieS.e(this.f); } } @Override // o.InterfaceC9453djy.HBt public final void d(RV rv) { this.d = rv; ZI.IeS ieS = new ZI.IeS(rv) { // from class: o.bTn private RV a; @Override // o.ZI.IeS public final void e(Object obj) { C4220bTo.a(this.a, (InterfaceC9453djy.IeS) obj); } { this.a = rv; } }; if (this.f != 0) { ieS.e(this.f); } } public static /* synthetic */ void a(RV rv, InterfaceC9453djy.IeS ieS) { ieS.b(true); ieS.b(rv.d); } @Override // o.InterfaceC9453djy.HBt public final boolean b(String str, String str2, RV rv, C0966Sm c0966Sm, RQ rq) { if (!str.isEmpty() && !str2.isEmpty() && rv != null && c0966Sm != null) { if (c0966Sm.d != 1) { return true; } if (c0966Sm.d == 1 && rq != null) { return true; } } return false; } @Override // o.InterfaceC9453djy.HBt public final void c() { this.c.c().e.k(""); ZI.IeS ieS = new ZI.IeS(this) { // from class: o.bTA private C4220bTo c; @Override // o.ZI.IeS public final void e(Object obj) { C4220bTo.b(this.c, (InterfaceC9453djy.IeS) obj); } { this.c = this; } }; if (this.f != 0) { ieS.e(this.f); } } @Override // o.InterfaceC9453djy.HBt public final void i() { int i = 2 % 2; String string = this.m.getString(C15715hv.tOB.merchant_error_crop_title); if (string.startsWith(",*,)")) { Object[] objArr = new Object[1]; p(string.substring(4), objArr); string = ((String) objArr[0]).intern(); int i2 = k + 35; t = i2 % 128; int i3 = i2 % 2; } String string2 = this.m.getString(C15715hv.tOB.merchant_error_crop_message); if (string2.startsWith(",*,)")) { int i4 = t + 55; k = i4 % 128; if (i4 % 2 != 0) { Object[] objArr2 = new Object[1]; p(string2.substring(4), objArr2); ((String) objArr2[0]).intern(); Object obj = null; obj.hashCode(); throw null; } Object[] objArr3 = new Object[1]; p(string2.substring(4), objArr3); string2 = ((String) objArr3[0]).intern(); } d(string, string2, C0690Mh.IeS.JUST_DISMISS); } public static /* synthetic */ void b(C4220bTo c4220bTo, InterfaceC9453djy.IeS ieS) { ieS.b(); C4224bTs c4224bTs = new C4224bTs(c4220bTo, false); if (c4220bTo.f != 0) { c4224bTs.e(c4220bTo.f); } } public static /* synthetic */ void b(C4220bTo c4220bTo, String str, String str2, iKd ikd, InterfaceC9453djy.IeS ieS) { ieS.y(); ieS.b(false); ieS.c(str, str2); if (ikd != null && ikd.h != null) { ieS.d(ikd.h); } ZIS zis = c4220bTo.i; if (zis != null && zis.m != null && !c4220bTo.i.m.equals("")) { ieS.c(c4220bTo.i.m); C4224bTs c4224bTs = new C4224bTs(c4220bTo, true); if (c4220bTo.f != 0) { c4224bTs.e(c4220bTo.f); return; } return; } ieS.b(); C4224bTs c4224bTs2 = new C4224bTs(c4220bTo, false); if (c4220bTo.f != 0) { c4224bTs2.e(c4220bTo.f); } } public static /* synthetic */ void d(C4220bTo c4220bTo, rzT rzt, C0967Sn c0967Sn) { ZI.IeS ieS = new ZI.IeS(c4220bTo, c0967Sn, rzt) { // from class: o.bTG private C4220bTo a; private C0967Sn c; private rzT d; @Override // o.ZI.IeS public final void e(Object obj) { C4220bTo.d(this.a, this.c, this.d, (InterfaceC9453djy.IeS) obj); } { this.a = c4220bTo; this.c = c0967Sn; this.d = rzt; } }; if (c4220bTo.f != 0) { ieS.e(c4220bTo.f); } } public static /* synthetic */ void e(C4220bTo c4220bTo, boolean z, InterfaceC9453djy.IeS ieS) { if (c4220bTo.c.g()) { ieS.c(z); } else { ieS.c(true); } } public static /* synthetic */ void b(C4220bTo c4220bTo, String str, InterfaceC9453djy.IeS ieS) { ieS.e(str); C4224bTs c4224bTs = new C4224bTs(c4220bTo, true); if (c4220bTo.f != 0) { c4224bTs.e(c4220bTo.f); } } public static /* synthetic */ void d(C4220bTo c4220bTo, C0967Sn c0967Sn, rzT rzt, InterfaceC9453djy.IeS ieS) { zEQ d; zEQ d2; ieS.ar_(); ieS.d(c0967Sn.d); ieS.c(c0967Sn.c); if (rzt != null && rzt.e.equalsIgnoreCase("ONBOARD")) { ieS.b(c4220bTo.c.e.d().i); return; } if (rzt == null || !rzt.e.equalsIgnoreCase("LANDING")) { return; } C17489xG c17489xG = c4220bTo.h; ieS.b(C17489xG.a(c4220bTo.c.c())); C3605bB c3605bB = c4220bTo.c.c().c; YKU d3 = new YKU(c0967Sn.d).d(); YKU yku = new YKU(d3.a, new GEP(d3.b, new Jel(c3605bB) { // from class: o.bTt private C3605bB e; @Override // o.Jel public final boolean e(Object obj) { boolean equals; equals = ((RV) ((HzO) obj).c).b.equals(this.e.d); return equals; } { this.e = c3605bB; } })); if (yku.b.hasNext()) { d = zEQ.a(yku.b.next()); } else { d = zEQ.d(); } qsu qsuVar = new qsu(ieS, c3605bB) { // from class: o.bTq private InterfaceC9453djy.IeS b; private C3605bB e; @Override // o.qsu public final void d(Object obj) { C4220bTo.e(this.b, this.e, (HzO) obj); } { this.b = ieS; this.e = c3605bB; } }; T t2 = d.d; if (t2 != 0) { qsuVar.d(t2); } YKU d4 = new YKU(c0967Sn.c).d(); YKU yku2 = new YKU(d4.a, new GEP(d4.b, new Jel(c3605bB) { // from class: o.bTw private C3605bB c; @Override // o.Jel public final boolean e(Object obj) { boolean equals; equals = ((RQ) ((HzO) obj).c).a.equals(this.c.e); return equals; } { this.c = c3605bB; } })); if (yku2.b.hasNext()) { d2 = zEQ.a(yku2.b.next()); } else { d2 = zEQ.d(); } qsu qsuVar2 = new qsu(ieS) { // from class: o.bTv private InterfaceC9453djy.IeS b; @Override // o.qsu public final void d(Object obj) { this.b.d(((HzO) obj).b); } { this.b = ieS; } }; T t3 = d2.d; if (t3 != 0) { qsuVar2.d(t3); } } /* JADX WARN: Multi-variable type inference failed */ public static /* synthetic */ void e(InterfaceC9453djy.IeS ieS, C3605bB c3605bB, HzO hzO) { zEQ d; ieS.b(hzO.b); ieS.b(((RV) hzO.c).d); ieS.b(true); YKU d2 = new YKU(((RV) hzO.c).d).d(); YKU yku = new YKU(d2.a, new GEP(d2.b, new Jel(c3605bB) { // from class: o.bTr private C3605bB d; @Override // o.Jel public final boolean e(Object obj) { boolean equals; equals = ((C0966Sm) ((HzO) obj).c).a.equals(this.d.i); return equals; } { this.d = c3605bB; } })); if (yku.b.hasNext()) { d = zEQ.a(yku.b.next()); } else { d = zEQ.d(); } qsu qsuVar = new qsu(ieS) { // from class: o.bTu private InterfaceC9453djy.IeS e; @Override // o.qsu public final void d(Object obj) { this.e.a(((HzO) obj).b); } { this.e = ieS; } }; T t2 = d.d; if (t2 != 0) { qsuVar.d(t2); } } @Override // o.InterfaceC9453djy.HBt public final void d() { if (this.f != 0) { this.f.y(); } ZIS zis = null; this.c.a = null; iKd K = this.c.d.K(); rzT d = this.c.e.d(); if (d != null && d.l != null && !d.l.isEmpty()) { zis = d.l.get(0).e; } String c = C16121lS.c(this.e.b.L()); String str = ""; if (c.isEmpty()) { c = ""; } if (d != null && d.j != null) { C0960Si a = this.g.a(d.j); if (a.b != null && !a.b.isEmpty()) { str = d.j.g; } } this.i = zis; ZI.IeS ieS = new ZI.IeS(this, c, str, K) { // from class: o.bTB private String a; private String b; private C4220bTo c; private iKd d; @Override // o.ZI.IeS public final void e(Object obj) { C4220bTo.b(this.c, this.b, this.a, this.d, (InterfaceC9453djy.IeS) obj); } { this.c = this; this.b = c; this.a = str; this.d = K; } }; if (this.f != 0) { ieS.e(this.f); } YpL ypL = this.c; AbstractC13163fSk c2 = ypL.e.c(); C17492xH c17492xH = this.n; Objects.requireNonNull(c17492xH); ypL.d(c2.map(new fSS(c17492xH) { // from class: o.bTC private C17492xH b; @Override // o.fSS public final Object a(Object obj) { return this.b.e((BOR) obj); } { this.b = c17492xH; } }), new fSQ(this, d) { // from class: o.bTl private rzT d; private C4220bTo e; @Override // o.fSQ public final void c(Object obj) { C4220bTo.d(this.e, this.d, (C0967Sn) obj); } { this.e = this; this.d = d; } }, new fSQ(this) { // from class: o.bTx private C4220bTo c; @Override // o.fSQ public final void c(Object obj) { C4220bTo.d(this.c, (Throwable) obj); } { this.c = this; } }); if (this.c.g()) { if (d != null && d.e.equalsIgnoreCase("LANDING")) { ZI.IeS ieS2 = new ZI.IeS() { // from class: o.bTD @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9453djy.IeS) obj).h(); } }; if (this.f != 0) { ieS2.e(this.f); } } ZI.IeS ieS3 = new ZI.IeS() { // from class: o.bTE @Override // o.ZI.IeS public final void e(Object obj) { ((InterfaceC9453djy.IeS) obj).e(); } }; if (this.f != 0) { ieS3.e(this.f); } } } public static /* synthetic */ void d(C4220bTo c4220bTo, Throwable th) throws Throwable { if (c4220bTo.b(th)) { c4220bTo.d(c4220bTo.j.e(th)); } } @Override // o.InterfaceC9453djy.HBt public final void c(C0966Sm c0966Sm) { this.a = c0966Sm; } @Override // o.InterfaceC9453djy.HBt public final void a(RQ rq) { this.b = rq; } }