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

180 lines
6.8 KiB
Java

package o;
import android.content.SharedPreferences;
import android.content.res.Resources;
import java.util.ArrayList;
import java.util.List;
import o.C15715hv;
/* renamed from: o.yQ, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C17622yQ extends C0352Et {
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
@InterfaceC13391fZD
public C17622yQ(Resources resources, SharedPreferences sharedPreferences, String str) {
super(resources, sharedPreferences, str);
C14957gcv.e(resources, "");
C14957gcv.e(sharedPreferences, "");
C14957gcv.e(str, "");
}
/* renamed from: o.yQ$HBt */
/* loaded from: classes3.dex */
public static final class HBt {
private HBt() {
}
public /* synthetic */ HBt(byte b) {
this();
}
}
private static String b(int i) {
String str = "";
if (i > 0) {
int i2 = 1;
while (true) {
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append("*");
str = sb.toString();
if (i2 == i) {
break;
}
i2++;
}
}
StringBuilder sb2 = new StringBuilder();
sb2.append(str);
sb2.append(" ");
return sb2.toString();
}
public static TQ a(qPX qpx) {
C14957gcv.e(qpx, "");
return new TQ(qpx.a, qpx.c, qpx.b, qpx.f, qpx.e, gdZ.a(qpx.h, "+", ""), qpx.j, qpx.d);
}
public final TN c(CmE cmE, boolean z) {
String b_;
TM tm;
String obj;
C14957gcv.e(cmE, "");
if (cmE.d.b.length() == 0) {
b_ = b_("/logo");
} else {
b_ = b_(cmE.d.b);
}
if (z) {
String b_2 = b_(cmE.b.b);
C14957gcv.c((Object) b_2, "");
String str = "";
for (String str2 : gdZ.e(cmE.b.a, new String[]{" "})) {
if (str2.length() >= 8) {
CharSequence subSequence = str2.subSequence(0, 5);
String b = b(str2.subSequence(5, str2.length()).length());
StringBuilder sb = new StringBuilder();
sb.append((Object) subSequence);
sb.append(b);
obj = sb.toString();
} else if (str2.length() == 7) {
CharSequence subSequence2 = str2.subSequence(0, 4);
String b2 = b(str2.subSequence(4, str2.length()).length());
StringBuilder sb2 = new StringBuilder();
sb2.append((Object) subSequence2);
sb2.append(b2);
obj = sb2.toString();
} else if (str2.length() == 6 || str2.length() == 5) {
CharSequence subSequence3 = str2.subSequence(0, 3);
String b3 = b(str2.subSequence(3, str2.length()).length());
StringBuilder sb3 = new StringBuilder();
sb3.append((Object) subSequence3);
sb3.append(b3);
obj = sb3.toString();
} else if (str2.length() == 4 || str2.length() == 3) {
CharSequence subSequence4 = str2.subSequence(0, 2);
String b4 = b(str2.subSequence(2, str2.length()).length());
StringBuilder sb4 = new StringBuilder();
sb4.append((Object) subSequence4);
sb4.append(b4);
obj = sb4.toString();
} else if (str2.length() == 2) {
CharSequence subSequence5 = str2.subSequence(0, 1);
String b5 = b(str2.subSequence(1, str2.length()).length());
StringBuilder sb5 = new StringBuilder();
sb5.append((Object) subSequence5);
sb5.append(b5);
obj = sb5.toString();
} else {
StringBuilder sb6 = new StringBuilder();
sb6.append(str2);
sb6.append(" ");
obj = sb6.toString();
}
StringBuilder sb7 = new StringBuilder();
sb7.append((Object) str);
sb7.append((Object) obj);
str = sb7.toString();
}
tm = new TM(b_2, gdZ.b((CharSequence) str).toString(), cmE.b.d);
} else {
String b_3 = b_(cmE.b.b);
C14957gcv.c((Object) b_3, "");
tm = new TM(b_3, cmE.b.a, cmE.b.d);
}
TM tm2 = tm;
YC c = c(cmE.n, cmE.m);
String str3 = cmE.h;
String b_4 = b_(b_);
C14957gcv.c((Object) b_4, "");
TP tp = new TP(b_4, cmE.d.a, cmE.d.c);
String string = this.e.getString(C15715hv.tOB.remittance_review_conversion_rate, cmE.g.e, cmE.g.a, cmE.g.d);
C14957gcv.c((Object) string, "");
sJm sjm = cmE.g;
String[] strArr = {c(Double.valueOf(sjm.b)), sjm.d};
C14957gcv.e(strArr, "");
C14957gcv.e(strArr, "");
List list = (List) C14875gap.d((Object[]) strArr, new ArrayList());
ArrayList arrayList = new ArrayList();
for (Object obj2 : list) {
if (((String) obj2).length() != 0) {
arrayList.add(obj2);
}
}
String b6 = C14881gav.b(arrayList, " ", null, null, 0, null, null, 62);
sJm sjm2 = cmE.g;
String[] strArr2 = {c(Double.valueOf(sjm2.c)), sjm2.e};
C14957gcv.e(strArr2, "");
C14957gcv.e(strArr2, "");
List list2 = (List) C14875gap.d((Object[]) strArr2, new ArrayList());
ArrayList arrayList2 = new ArrayList();
for (Object obj3 : list2) {
if (((String) obj3).length() != 0) {
arrayList2.add(obj3);
}
}
String b7 = C14881gav.b(arrayList2, " ", null, null, 0, null, null, 62);
sJm sjm3 = cmE.g;
String[] strArr3 = {c(Double.valueOf(sjm3.i)), sjm3.f};
C14957gcv.e(strArr3, "");
C14957gcv.e(strArr3, "");
List list3 = (List) C14875gap.d((Object[]) strArr3, new ArrayList());
ArrayList arrayList3 = new ArrayList();
for (Object obj4 : list3) {
if (((String) obj4).length() != 0) {
arrayList3.add(obj4);
}
}
String b8 = C14881gav.b(arrayList3, " ", null, null, 0, null, null, 62);
String str4 = cmE.g.g;
String str5 = cmE.c;
String string2 = this.e.getString(C15715hv.tOB.remittance_promptpay_review_disclaimer_message, cmE.i);
C14957gcv.c((Object) string2, "");
return new TN(str3, tp, tm2, string, b6, b7, b8, str4, str5, string2, cmE.j, c);
}
static {
new HBt((byte) 0);
}
}