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

119 lines
3.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.google.zxing.NotFoundException;
import com.google.zxing.ReaderException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
/* loaded from: classes2.dex */
public final class Sqh implements zIz {
private static final zIz[] d = new zIz[0];
private Map<CGg, ?> c;
public zIz[] e;
@Override // o.zIz
public final WFF a(BKc bKc) throws NotFoundException {
c(null);
return d(bKc);
}
@Override // o.zIz
public final WFF b(BKc bKc, Map<CGg, ?> map) throws NotFoundException {
c(map);
return d(bKc);
}
public final void c(Map<CGg, ?> map) {
this.c = map;
boolean z = map != null && map.containsKey(CGg.TRY_HARDER);
Collection collection = map == null ? null : (Collection) map.get(CGg.POSSIBLE_FORMATS);
ArrayList arrayList = new ArrayList();
if (collection != null) {
boolean z2 = collection.contains(PTS.UPC_A) || collection.contains(PTS.UPC_E) || collection.contains(PTS.EAN_13) || collection.contains(PTS.EAN_8) || collection.contains(PTS.CODABAR) || collection.contains(PTS.CODE_39) || collection.contains(PTS.CODE_93) || collection.contains(PTS.CODE_128) || collection.contains(PTS.ITF) || collection.contains(PTS.RSS_14) || collection.contains(PTS.RSS_EXPANDED);
if (z2 && !z) {
arrayList.add(new jzR(map));
}
if (collection.contains(PTS.QR_CODE)) {
arrayList.add(new Vhg());
}
if (collection.contains(PTS.DATA_MATRIX)) {
arrayList.add(new Mbu());
}
if (collection.contains(PTS.AZTEC)) {
arrayList.add(new C17093tpH());
}
if (collection.contains(PTS.PDF_417)) {
arrayList.add(new xoE());
}
if (collection.contains(PTS.MAXICODE)) {
arrayList.add(new JEH());
}
if (z2 && z) {
arrayList.add(new jzR(map));
}
}
if (arrayList.isEmpty()) {
if (!z) {
arrayList.add(new jzR(map));
}
arrayList.add(new Vhg());
arrayList.add(new Mbu());
arrayList.add(new C17093tpH());
arrayList.add(new xoE());
arrayList.add(new JEH());
if (z) {
arrayList.add(new jzR(map));
}
}
this.e = (zIz[]) arrayList.toArray(d);
}
@Override // o.zIz
public final void c() {
zIz[] zizArr = this.e;
if (zizArr != null) {
for (zIz ziz : zizArr) {
ziz.c();
}
}
}
public final WFF d(BKc bKc) throws NotFoundException {
zIz[] zizArr = this.e;
if (zizArr != null) {
for (zIz ziz : zizArr) {
if (Thread.currentThread().isInterrupted()) {
throw NotFoundException.b();
}
try {
return ziz.b(bKc, this.c);
} catch (ReaderException unused) {
}
}
Map<CGg, ?> map = this.c;
if (map != null && map.containsKey(CGg.ALSO_INVERTED)) {
if (bKc.b == null) {
bKc.b = bKc.a.d();
}
C8902dZc c8902dZc = bKc.b;
int length = c8902dZc.a.length;
for (int i = 0; i < length; i++) {
int[] iArr = c8902dZc.a;
iArr[i] = ~iArr[i];
}
for (zIz ziz2 : this.e) {
if (Thread.currentThread().isInterrupted()) {
throw NotFoundException.b();
}
try {
return ziz2.b(bKc, this.c);
} catch (ReaderException unused2) {
}
}
}
}
throw NotFoundException.b();
}
}