what-the-bank/sources/com/facetec/sdk/ad.java

112 lines
3.8 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.facetec.sdk;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import org.json.JSONArray;
/* loaded from: classes.dex */
final class ad {
ad() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public static C0131r b(List<C0131r> list) {
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (int i = 0; i < list.size(); i++) {
arrayList.addAll(list.get(i).a);
arrayList2.addAll(list.get(i).d);
}
C0131r c0131r = new C0131r();
c0131r.a = arrayList;
c0131r.d = arrayList2;
return c0131r;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static JSONArray a(List<List<ab>> list) {
JSONArray jSONArray = new JSONArray();
for (int i = 0; i < list.size(); i++) {
JSONArray jSONArray2 = new JSONArray();
for (int i2 = 0; i2 < list.get(i).size(); i2++) {
jSONArray2.put(list.get(i).get(i2).c());
}
jSONArray.put(jSONArray2);
}
return jSONArray;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static JSONArray c(List<List<List<ab>>> list) {
JSONArray jSONArray = new JSONArray();
for (int i = 0; i < list.size(); i++) {
JSONArray jSONArray2 = new JSONArray();
for (int i2 = 0; i2 < list.get(i).size(); i2++) {
JSONArray jSONArray3 = new JSONArray();
for (int i3 = 0; i3 < list.get(i).size(); i3++) {
jSONArray3.put(list.get(i).get(i2).get(i3).c());
}
jSONArray2.put(jSONArray3);
}
jSONArray.put(jSONArray2);
}
return jSONArray;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static byte[] a(byte[] bArr, int i, int i2) {
if (i <= 25 && i2 <= 25) {
return bArr;
}
int floor = (int) Math.floor(bArr.length / (i * i2));
byte[] bArr2 = new byte[floor * 625];
int floor2 = (int) Math.floor((i - 25) / 2.0d);
int floor3 = (int) Math.floor(i * ((i2 - 25) / 2.0d));
for (int i3 = 0; i3 < 25; i3++) {
System.arraycopy(bArr, (i * i3 * floor) + (floor3 * floor) + (floor2 * floor), bArr2, i3 * 25 * floor, floor * 25);
}
return bArr2;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static Integer[] e(List<Integer> list) {
return (Integer[]) new HashSet(list).toArray(new Integer[0]);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static boolean d(List<Integer> list) {
return e(list).length >= 3;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static List i(List list) {
List list2 = list;
int i = 0;
while (i <= 0) {
try {
ArrayList arrayList = new ArrayList();
for (int i2 = 0; i2 < list2.size(); i2++) {
if (list2.get(i2) instanceof List) {
arrayList.addAll((Collection) list2.get(i2));
} else {
arrayList.add(list2.get(i2));
}
}
i++;
list2 = arrayList;
} catch (Exception unused) {
return list;
}
}
return list2;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int c(String str) {
return Math.round(str.getBytes(StandardCharsets.UTF_8).length / 1000.0f);
}
}