what-the-bank/sources/o/C2737akJ.java

332 lines
12 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.text.TextUtils;
import com.scb.phone.domain.errors.RetrofitException;
import java.util.Comparator;
import java.util.List;
import java.util.NoSuchElementException;
import o.C0690Mh;
import o.C15715hv;
import o.C2737akJ;
import o.InterfaceC6636cYn;
import o.MC;
import o.PRA;
import o.ZI;
import o.wRi;
import org.threeten.bp.OffsetDateTime;
/* renamed from: o.akJ */
/* loaded from: classes3.dex */
public final class C2737akJ extends ZI<InterfaceC6636cYn.saX> {
private final C16202mI a;
private final C0361Ez b;
public final iNh d;
public FR e;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
@InterfaceC13391fZD
public C2737akJ(C16903sI c16903sI, iNh inh, C16202mI c16202mI, C0361Ez c0361Ez) {
super(c16903sI);
C14957gcv.e(c16903sI, "");
C14957gcv.e(inh, "");
C14957gcv.e(c16202mI, "");
C14957gcv.e(c0361Ez, "");
this.d = inh;
this.a = c16202mI;
this.b = c0361Ez;
}
/* renamed from: o.akJ$IeS */
/* loaded from: classes3.dex */
public final class IeS extends wRi.LWm<C3777bGf> {
private C2737akJ a;
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final /* synthetic */ void onNext(Object obj) {
C3777bGf c3777bGf = (C3777bGf) obj;
C14957gcv.e(c3777bGf, "");
C2737akJ.c(this.a);
C2737akJ c2737akJ = this.a;
ZI.IeS ieS = new ZI.IeS(c3777bGf, c2737akJ) { // from class: o.akK
private C2737akJ d;
private C3777bGf e;
@Override // o.ZI.IeS
public final void e(Object obj2) {
C2737akJ.IeS.d(this.e, this.d, (InterfaceC6636cYn.saX) obj2);
}
{
this.e = c3777bGf;
this.d = c2737akJ;
}
};
if (c2737akJ.f != 0) {
ieS.e(c2737akJ.f);
}
}
public IeS(C2737akJ c2737akJ) {
this.a = c2737akJ;
}
@Override // o.wRi.LWm, o.InterfaceC13174fSv
public final void onError(Throwable th) {
C14957gcv.e(th, "");
C2737akJ.c(this.a);
ggV g = C2737akJ.g(th);
C2737akJ c2737akJ = this.a;
ZI.IeS ieS = new ZI.IeS(c2737akJ, th, g) { // from class: o.akP
private ggV a;
private Throwable c;
private C2737akJ e;
@Override // o.ZI.IeS
public final void e(Object obj) {
C2737akJ.IeS.a(this.e, this.c, this.a, (InterfaceC6636cYn.saX) obj);
}
{
this.e = c2737akJ;
this.c = th;
this.a = g;
}
};
if (c2737akJ.f != 0) {
ieS.e(c2737akJ.f);
}
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ void d(C3777bGf c3777bGf, C2737akJ c2737akJ, InterfaceC6636cYn.saX sax) {
String str;
OffsetDateTime offsetDateTime;
String str2 = "";
C14957gcv.e(c3777bGf, "");
C14957gcv.e(c2737akJ, "");
String str3 = c3777bGf.f.a;
if (C14957gcv.b((Object) str3, (Object) "8101") || C14957gcv.b((Object) str3, (Object) "8102")) {
C0361Ez unused = c2737akJ.b;
FR fr = c2737akJ.e;
C14957gcv.e(c3777bGf, "");
String str4 = c3777bGf.f.c;
String str5 = c3777bGf.f.d;
String str6 = fr != null ? fr.m : null;
String str7 = str6 == null ? "" : str6;
String str8 = fr != null ? fr.f8161o : null;
String str9 = c3777bGf.c;
String str10 = c3777bGf.b;
String str11 = c3777bGf.e;
String str12 = c3777bGf.m;
String str13 = c3777bGf.a;
String str14 = c3777bGf.d;
sax.b(new MC.IeS(str4, str5, str7, str8, str9, str10, str11, str12, str13, str14 == null ? "" : str14));
return;
}
C16202mI c16202mI = c2737akJ.a;
FR fr2 = c2737akJ.e;
FS b = FS.b();
b.m = C16202mI.c(C6583cXR.c(c3777bGf.f8539o));
b.a = C16202mI.c(C6583cXR.c(c3777bGf.e));
b.k = C16202mI.c(C6583cXR.c(c3777bGf.n));
b.f = fr2.f;
b.d = fr2.b;
b.i = C16202mI.i(fr2.c);
b.g = C6583cXR.VS_(null, C15715hv.IeS.bankicon_scb).toString();
b.j = fr2.g;
b.b = fr2.h;
if (!TextUtils.isEmpty(c3777bGf.j)) {
String c = C16202mI.c(C6583cXR.c(c3777bGf.j));
if (!TextUtils.isEmpty(c)) {
str2 = String.format(c16202mI.e(C15715hv.tOB.remaining_balance_no_baht), c16202mI.e(C15715hv.tOB.transfer_tab).toLowerCase(), c);
}
}
b.f8163o = str2;
b.n = c16202mI.c(C15715hv.tOB.ref_id, c3777bGf.l);
List<? extends CNz> list = c3777bGf.g;
List<? extends CNz> list2 = c3777bGf.i;
List<? extends CNz> list3 = c3777bGf.h;
OffsetDateTime offsetDateTime2 = c3777bGf.k;
if (offsetDateTime2 != null) {
str = (String) C16157lj.c(new Object[]{c16202mI, offsetDateTime2}, 838289628, -838289623, System.identityHashCode(c16202mI));
} else {
zEQ e = YKU.a(YKU.a(new YKU(list), new YKU(list2)), new YKU(list3)).e(new fHT<T>(new Comparator(c16202mI) { // from class: o.mV
private C16202mI d;
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
return C16202mI.d((CNz) obj, (CNz) obj2);
}
{
this.d = c16202mI;
}
}) { // from class: o.fHT.RVV.4
private Comparator a;
public AnonymousClass4(Comparator comparator) {
this.a = comparator;
}
@Override // o.InterfaceC15902jVZ
public final T a(T t, T t2) {
return this.a.compare(t, t2) < 0 ? t2 : t;
}
});
if (e.d != 0) {
T t = e.d;
if (t == 0) {
throw new NoSuchElementException("No value present");
}
if (((CNz) t).f == null) {
offsetDateTime = OffsetDateTime.now();
} else {
T t2 = e.d;
if (t2 == 0) {
throw new NoSuchElementException("No value present");
}
offsetDateTime = ((CNz) t2).f;
}
str = (String) C16157lj.c(new Object[]{c16202mI, offsetDateTime}, 838289628, -838289623, System.identityHashCode(c16202mI));
} else {
str = (String) C16157lj.c(new Object[]{c16202mI, OffsetDateTime.now()}, 838289628, -838289623, System.identityHashCode(c16202mI));
}
}
b.c = str;
int[] iArr = {0};
YKU.a(YKU.a(new YKU(c3777bGf.g), new YKU(c3777bGf.i)), new YKU(c3777bGf.h)).d(new qsu(iArr) { // from class: o.mS
private int[] c;
@Override // o.qsu
public final void d(Object obj) {
C16202mI.a(this.c, (CNz) obj);
}
{
this.c = iArr;
}
});
b.l = c16202mI.c(C15715hv.tOB.successful_transfer_summary, Integer.valueOf(iArr[0]));
int[] iArr2 = {0};
YKU.a(YKU.a(new YKU(c3777bGf.g), new YKU(c3777bGf.i)), new YKU(c3777bGf.h)).d(new qsu(iArr2) { // from class: o.mQ
private int[] d;
@Override // o.qsu
public final void d(Object obj) {
C16202mI.d(this.d, (CNz) obj);
}
{
this.d = iArr2;
}
});
b.t = c16202mI.c(C15715hv.tOB.unsuccessful_transfer_summary, Integer.valueOf(iArr2[0]));
List<? extends CNz> list4 = c3777bGf.g;
List<? extends CNz> list5 = c3777bGf.i;
List<? extends CNz> list6 = c3777bGf.h;
List<? extends FX> list7 = fr2.i;
YKU a = YKU.a(YKU.a(new YKU(list5), new YKU(list6)), new YKU(list4));
YKU yku = new YKU(a.a, new wxK(a.b, new InterfaceC1244Ytw(c16202mI, list7) { // from class: o.mP
private C16202mI b;
private List c;
@Override // o.InterfaceC1244Ytw
public final Object d(Object obj) {
return C16202mI.c(this.b, this.c, (CNz) obj);
}
{
this.b = c16202mI;
this.c = list7;
}
}));
YKU yku2 = new YKU(yku.a, new GEP(yku.b, new Jel() { // from class: o.mN
@Override // o.Jel
public final boolean e(Object obj) {
return C16202mI.d((FQ) obj);
}
}));
b.h = (List) new YKU(yku2.a, new C17745zRk(yku2.b, xNZ.a(new InterfaceC1244Ytw() { // from class: o.mO
@Override // o.InterfaceC1244Ytw
public final Object d(Object obj) {
Boolean valueOf;
FQ fq = (FQ) obj;
valueOf = Boolean.valueOf(!fq.g);
return valueOf;
}
}))).a(new PRA.Sts(new PRA.AnonymousClass4(), new PRA.AnonymousClass8()));
sax.e(b);
}
public static /* synthetic */ void a(C2737akJ c2737akJ, Throwable th, ggV ggv, InterfaceC6636cYn.saX sax) {
C14957gcv.e(c2737akJ, "");
C14957gcv.e(th, "");
if (!c2737akJ.b(th, "8103") || ggv == null) {
if (ZI.j(th)) {
sax.b(c2737akJ.e);
return;
}
if (ZI.c(th)) {
sax.e(c2737akJ.j.e(th).c);
return;
}
if (ZI.d(th) || !c2737akJ.i(th)) {
C0690Mh.IeS ieS = C0690Mh.IeS.NAVIGATE_BACK;
if (c2737akJ.b(th)) {
c2737akJ.d(c2737akJ.j.b(th, ieS));
return;
}
return;
}
return;
}
sax.c(ggv.d, ggv.c);
}
}
public static /* synthetic */ void c(FR fr, InterfaceC6636cYn.saX sax) {
sax.a(fr);
if (fr != null && fr.h != null) {
sax.d(fr.h);
}
String str = fr != null ? fr.q : null;
if (!(str == null || gdZ.d((CharSequence) str))) {
String str2 = fr != null ? fr.p : null;
if (!(str2 == null || gdZ.d((CharSequence) str2))) {
sax.e(fr != null ? fr.q : null, fr != null ? fr.p : null);
}
}
}
public static final /* synthetic */ ggV g(Throwable th) {
if (!(th instanceof RetrofitException)) {
return null;
}
RetrofitException retrofitException = (RetrofitException) th;
if (retrofitException.e != null) {
return retrofitException.e.c;
}
return null;
}
public static final /* synthetic */ void c(C2737akJ c2737akJ) {
if (c2737akJ.f != 0) {
c2737akJ.f.ar_();
}
}
public final void d(boolean z) {
if (this.f != 0) {
this.f.y();
}
FR fr = this.e;
String str = fr != null ? fr.f8161o : null;
if (str == null) {
str = "";
}
this.d.d(new oFR(str, Boolean.valueOf(z)), (String) null, (String) null);
iNh inh = this.d;
inh.d(inh.i, new IeS(this));
}
}