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

587 lines
21 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.huawei.hms.framework.common.hianalytics.CrashHianalyticsData;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.io.InvalidObjectException;
import java.io.ObjectStreamException;
import java.io.Serializable;
import org.threeten.bp.DateTimeException;
import org.threeten.bp.OffsetDateTime;
import org.threeten.bp.temporal.UnsupportedTemporalTypeException;
/* renamed from: o.gsr, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C15522gsr extends gsO<C15520gsp> implements Serializable {
private static final long serialVersionUID = 6207766400415563566L;
C15520gsp date;
C15521gsq time;
public static final C15522gsr MIN = of(C15520gsp.MIN, C15521gsq.MIN);
public static final C15522gsr MAX = of(C15520gsp.MAX, C15521gsq.MAX);
public static final gtQ<C15522gsr> FROM = new gtQ<C15522gsr>() { // from class: o.gsr.2
@Override // o.gtQ
public final C15522gsr queryFrom(gtK gtk) {
return C15522gsr.from(gtk);
}
};
@Override // o.gsO, java.lang.Comparable
public final /* bridge */ /* synthetic */ int compareTo(gsO<?> gso) {
return compareTo(gso);
}
public static C15522gsr now() {
return now(AbstractC15514gsj.systemDefaultZone());
}
public static C15522gsr now(AbstractC15502gsH abstractC15502gsH) {
return now(AbstractC15514gsj.system(abstractC15502gsH));
}
public static C15522gsr now(AbstractC15514gsj abstractC15514gsj) {
gtG.requireNonNull(abstractC15514gsj, "clock");
C15523gss instant = abstractC15514gsj.instant();
return ofEpochSecond(instant.getEpochSecond(), instant.getNano(), abstractC15514gsj.getZone().getRules().getOffset(instant));
}
public static C15522gsr of(int i, EnumC15528gsx enumC15528gsx, int i2, int i3, int i4) {
return new C15522gsr(C15520gsp.of(i, enumC15528gsx, i2), C15521gsq.of(i3, i4));
}
public static C15522gsr of(int i, EnumC15528gsx enumC15528gsx, int i2, int i3, int i4, int i5) {
return new C15522gsr(C15520gsp.of(i, enumC15528gsx, i2), C15521gsq.of(i3, i4, i5));
}
public static C15522gsr of(int i, EnumC15528gsx enumC15528gsx, int i2, int i3, int i4, int i5, int i6) {
return new C15522gsr(C15520gsp.of(i, enumC15528gsx, i2), C15521gsq.of(i3, i4, i5, i6));
}
public static C15522gsr of(int i, int i2, int i3, int i4, int i5) {
return new C15522gsr(C15520gsp.of(i, i2, i3), C15521gsq.of(i4, i5));
}
public static C15522gsr of(int i, int i2, int i3, int i4, int i5, int i6) {
return new C15522gsr(C15520gsp.of(i, i2, i3), C15521gsq.of(i4, i5, i6));
}
public static C15522gsr of(int i, int i2, int i3, int i4, int i5, int i6, int i7) {
return new C15522gsr(C15520gsp.of(i, i2, i3), C15521gsq.of(i4, i5, i6, i7));
}
public static C15522gsr of(C15520gsp c15520gsp, C15521gsq c15521gsq) {
gtG.requireNonNull(c15520gsp, "date");
gtG.requireNonNull(c15521gsq, CrashHianalyticsData.TIME);
return new C15522gsr(c15520gsp, c15521gsq);
}
public static C15522gsr ofInstant(C15523gss c15523gss, AbstractC15502gsH abstractC15502gsH) {
gtG.requireNonNull(c15523gss, "instant");
gtG.requireNonNull(abstractC15502gsH, "zone");
return ofEpochSecond(c15523gss.getEpochSecond(), c15523gss.getNano(), abstractC15502gsH.getRules().getOffset(c15523gss));
}
public static C15522gsr ofEpochSecond(long j, int i, gsI gsi) {
gtG.requireNonNull(gsi, "offset");
return new C15522gsr(C15520gsp.ofEpochDay(gtG.floorDiv(j + gsi.getTotalSeconds(), 86400L)), C15521gsq.ofSecondOfDay(gtG.floorMod(r2, 86400), i));
}
/* JADX WARN: Type inference failed for: r3v5, types: [o.gsr] */
public static C15522gsr from(gtK gtk) {
if (gtk instanceof C15522gsr) {
return (C15522gsr) gtk;
}
if (gtk instanceof gsN) {
return ((gsN) gtk).toLocalDateTime();
}
try {
return new C15522gsr(C15520gsp.from(gtk), C15521gsq.from(gtk));
} catch (DateTimeException unused) {
StringBuilder sb = new StringBuilder("Unable to obtain LocalDateTime from TemporalAccessor: ");
sb.append(gtk);
sb.append(", type ");
sb.append(gtk.getClass().getName());
throw new DateTimeException(sb.toString());
}
}
public static C15522gsr parse(CharSequence charSequence) {
return parse(charSequence, C15554gto.ISO_LOCAL_DATE_TIME);
}
public static C15522gsr parse(CharSequence charSequence, C15554gto c15554gto) {
gtG.requireNonNull(c15554gto, "formatter");
return (C15522gsr) c15554gto.parse(charSequence, FROM);
}
private C15522gsr(C15520gsp c15520gsp, C15521gsq c15521gsq) {
this.date = c15520gsp;
this.time = c15521gsq;
}
private C15522gsr with(C15520gsp c15520gsp, C15521gsq c15521gsq) {
return (this.date == c15520gsp && this.time == c15521gsq) ? this : new C15522gsr(c15520gsp, c15521gsq);
}
@Override // o.gtK
public final boolean isSupported(InterfaceC15537gtP interfaceC15537gtP) {
return interfaceC15537gtP instanceof EnumC15534gtD ? interfaceC15537gtP.isDateBased() || interfaceC15537gtP.isTimeBased() : interfaceC15537gtP != null && interfaceC15537gtP.isSupportedBy(this);
}
@Override // o.InterfaceC15536gtL
public final boolean isSupported(InterfaceC15539gtV interfaceC15539gtV) {
return interfaceC15539gtV instanceof gtH ? interfaceC15539gtV.isDateBased() || interfaceC15539gtV.isTimeBased() : interfaceC15539gtV != null && interfaceC15539gtV.isSupportedBy(this);
}
@Override // o.gtE, o.gtK
public final gtT range(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP instanceof EnumC15534gtD) {
return (interfaceC15537gtP.isTimeBased() ? this.time : this.date).range(interfaceC15537gtP);
}
return interfaceC15537gtP.rangeRefinedBy(this);
}
@Override // o.gtE, o.gtK
public final int get(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP instanceof EnumC15534gtD) {
return (interfaceC15537gtP.isTimeBased() ? this.time : this.date).get(interfaceC15537gtP);
}
return super.get(interfaceC15537gtP);
}
@Override // o.gtK
public final long getLong(InterfaceC15537gtP interfaceC15537gtP) {
if (interfaceC15537gtP instanceof EnumC15534gtD) {
return interfaceC15537gtP.isTimeBased() ? this.time.getLong(interfaceC15537gtP) : this.date.getLong(interfaceC15537gtP);
}
return interfaceC15537gtP.getFrom(this);
}
public final int getYear() {
return this.date.getYear();
}
public final int getMonthValue() {
return this.date.getMonthValue();
}
public final EnumC15528gsx getMonth() {
return this.date.getMonth();
}
public final int getDayOfMonth() {
return this.date.getDayOfMonth();
}
public final int getDayOfYear() {
return this.date.getDayOfYear();
}
public final EnumC15515gsk getDayOfWeek() {
return this.date.getDayOfWeek();
}
public final int getHour() {
return this.time.getHour();
}
public final int getMinute() {
return this.time.getMinute();
}
public final int getSecond() {
return this.time.getSecond();
}
public final int getNano() {
return this.time.getNano();
}
@Override // o.gsO, o.AbstractC15535gtF, o.InterfaceC15536gtL
public final C15522gsr with(gtJ gtj) {
if (gtj instanceof C15520gsp) {
return with((C15520gsp) gtj, this.time);
}
if (gtj instanceof C15521gsq) {
return with(this.date, (C15521gsq) gtj);
}
if (gtj instanceof C15522gsr) {
return (C15522gsr) gtj;
}
return (C15522gsr) gtj.adjustInto(this);
}
@Override // o.gsO, o.InterfaceC15536gtL
public final C15522gsr with(InterfaceC15537gtP interfaceC15537gtP, long j) {
if (interfaceC15537gtP instanceof EnumC15534gtD) {
if (interfaceC15537gtP.isTimeBased()) {
return with(this.date, this.time.with(interfaceC15537gtP, j));
}
return with(this.date.with(interfaceC15537gtP, j), this.time);
}
return (C15522gsr) interfaceC15537gtP.adjustInto(this, j);
}
public final C15522gsr withYear(int i) {
return with(this.date.withYear(i), this.time);
}
public final C15522gsr withMonth(int i) {
return with(this.date.withMonth(i), this.time);
}
public final C15522gsr withDayOfMonth(int i) {
return with(this.date.withDayOfMonth(i), this.time);
}
public final C15522gsr withDayOfYear(int i) {
return with(this.date.withDayOfYear(i), this.time);
}
public final C15522gsr withHour(int i) {
return with(this.date, this.time.withHour(i));
}
public final C15522gsr withMinute(int i) {
return with(this.date, this.time.withMinute(i));
}
public final C15522gsr withSecond(int i) {
return with(this.date, this.time.withSecond(i));
}
public final C15522gsr withNano(int i) {
return with(this.date, this.time.withNano(i));
}
public final C15522gsr truncatedTo(InterfaceC15539gtV interfaceC15539gtV) {
return with(this.date, this.time.truncatedTo(interfaceC15539gtV));
}
@Override // o.gsO, o.AbstractC15535gtF, o.InterfaceC15536gtL
public final C15522gsr plus(gtN gtn) {
return (C15522gsr) gtn.addTo(this);
}
@Override // o.gsO, o.InterfaceC15536gtL
public final C15522gsr plus(long j, InterfaceC15539gtV interfaceC15539gtV) {
if (interfaceC15539gtV instanceof gtH) {
switch (AnonymousClass1.$SwitchMap$org$threeten$bp$temporal$ChronoUnit[((gtH) interfaceC15539gtV).ordinal()]) {
case 1:
return plusNanos(j);
case 2:
return plusDays(j / 86400000000L).plusNanos((j % 86400000000L) * 1000);
case 3:
return plusDays(j / 86400000).plusNanos((j % 86400000) * 1000000);
case 4:
return plusSeconds(j);
case 5:
return plusMinutes(j);
case 6:
return plusHours(j);
case 7:
return plusDays(j / 256).plusHours((j % 256) * 12);
default:
return with(this.date.plus(j, interfaceC15539gtV), this.time);
}
}
return (C15522gsr) interfaceC15539gtV.addTo(this, j);
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: o.gsr$1, reason: invalid class name */
/* loaded from: classes.dex */
public static /* synthetic */ class AnonymousClass1 {
static final int[] $SwitchMap$org$threeten$bp$temporal$ChronoUnit;
static {
int[] iArr = new int[gtH.values().length];
$SwitchMap$org$threeten$bp$temporal$ChronoUnit = iArr;
try {
iArr[gtH.NANOS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.MICROS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.MILLIS.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.SECONDS.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.MINUTES.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.HOURS.ordinal()] = 6;
} catch (NoSuchFieldError unused6) {
}
try {
$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gtH.HALF_DAYS.ordinal()] = 7;
} catch (NoSuchFieldError unused7) {
}
}
}
public final C15522gsr plusYears(long j) {
return with(this.date.plusYears(j), this.time);
}
public final C15522gsr plusMonths(long j) {
return with(this.date.plusMonths(j), this.time);
}
public final C15522gsr plusWeeks(long j) {
return with(this.date.plusWeeks(j), this.time);
}
public final C15522gsr plusDays(long j) {
return with(this.date.plusDays(j), this.time);
}
public final C15522gsr plusHours(long j) {
return plusWithOverflow(this.date, j, 0L, 0L, 0L, 1);
}
public final C15522gsr plusMinutes(long j) {
return plusWithOverflow(this.date, 0L, j, 0L, 0L, 1);
}
public final C15522gsr plusSeconds(long j) {
return plusWithOverflow(this.date, 0L, 0L, j, 0L, 1);
}
public final C15522gsr plusNanos(long j) {
return plusWithOverflow(this.date, 0L, 0L, 0L, j, 1);
}
@Override // o.gsO, o.AbstractC15535gtF, o.InterfaceC15536gtL
public final C15522gsr minus(gtN gtn) {
return (C15522gsr) gtn.subtractFrom(this);
}
@Override // o.gsO, o.AbstractC15535gtF, o.InterfaceC15536gtL
public final C15522gsr minus(long j, InterfaceC15539gtV interfaceC15539gtV) {
return j == Long.MIN_VALUE ? plus(Long.MAX_VALUE, interfaceC15539gtV).plus(1L, interfaceC15539gtV) : plus(-j, interfaceC15539gtV);
}
public final C15522gsr minusYears(long j) {
return j == Long.MIN_VALUE ? plusYears(Long.MAX_VALUE).plusYears(1L) : plusYears(-j);
}
public final C15522gsr minusMonths(long j) {
return j == Long.MIN_VALUE ? plusMonths(Long.MAX_VALUE).plusMonths(1L) : plusMonths(-j);
}
public final C15522gsr minusWeeks(long j) {
return j == Long.MIN_VALUE ? plusWeeks(Long.MAX_VALUE).plusWeeks(1L) : plusWeeks(-j);
}
public final C15522gsr minusDays(long j) {
return j == Long.MIN_VALUE ? plusDays(Long.MAX_VALUE).plusDays(1L) : plusDays(-j);
}
public final C15522gsr minusHours(long j) {
return plusWithOverflow(this.date, j, 0L, 0L, 0L, -1);
}
public final C15522gsr minusMinutes(long j) {
return plusWithOverflow(this.date, 0L, j, 0L, 0L, -1);
}
public final C15522gsr minusSeconds(long j) {
return plusWithOverflow(this.date, 0L, 0L, j, 0L, -1);
}
public final C15522gsr minusNanos(long j) {
return plusWithOverflow(this.date, 0L, 0L, 0L, j, -1);
}
private C15522gsr plusWithOverflow(C15520gsp c15520gsp, long j, long j2, long j3, long j4, int i) {
if ((j | j2 | j3 | j4) == 0) {
return with(c15520gsp, this.time);
}
long j5 = j4 / 86400000000000L;
long j6 = j3 / 86400;
long j7 = j2 / 1440;
long j8 = j / 24;
long j9 = i;
long nanoOfDay = this.time.toNanoOfDay();
long j10 = (((j4 % 86400000000000L) + ((j3 % 86400) * 1000000000) + ((j2 % 1440) * 60000000000L) + ((j % 24) * 3600000000000L)) * j9) + nanoOfDay;
long floorDiv = gtG.floorDiv(j10, 86400000000000L);
long floorMod = gtG.floorMod(j10, 86400000000000L);
return with(c15520gsp.plusDays(((j5 + j6 + j7 + j8) * j9) + floorDiv), floorMod == nanoOfDay ? this.time : C15521gsq.ofNanoOfDay(floorMod));
}
@Override // o.gsO, o.gtE, o.gtK
public final <R> R query(gtQ<R> gtq) {
if (gtq == gtM.localDate()) {
return (R) toLocalDate();
}
return (R) super.query(gtq);
}
@Override // o.gsO, o.gtJ
public final InterfaceC15536gtL adjustInto(InterfaceC15536gtL interfaceC15536gtL) {
return super.adjustInto(interfaceC15536gtL);
}
@Override // o.InterfaceC15536gtL
public final long until(InterfaceC15536gtL interfaceC15536gtL, InterfaceC15539gtV interfaceC15539gtV) {
C15522gsr from = from((gtK) interfaceC15536gtL);
if (interfaceC15539gtV instanceof gtH) {
gtH gth = (gtH) interfaceC15539gtV;
if (gth.isTimeBased()) {
long daysUntil = this.date.daysUntil(from.date);
long nanoOfDay = from.time.toNanoOfDay() - this.time.toNanoOfDay();
if (daysUntil > 0 && nanoOfDay < 0) {
daysUntil--;
nanoOfDay += 86400000000000L;
} else if (daysUntil < 0 && nanoOfDay > 0) {
daysUntil++;
nanoOfDay -= 86400000000000L;
}
switch (AnonymousClass1.$SwitchMap$org$threeten$bp$temporal$ChronoUnit[gth.ordinal()]) {
case 1:
return gtG.safeAdd(gtG.safeMultiply(daysUntil, 86400000000000L), nanoOfDay);
case 2:
return gtG.safeAdd(gtG.safeMultiply(daysUntil, 86400000000L), nanoOfDay / 1000);
case 3:
return gtG.safeAdd(gtG.safeMultiply(daysUntil, 86400000L), nanoOfDay / 1000000);
case 4:
return gtG.safeAdd(gtG.safeMultiply(daysUntil, 86400), nanoOfDay / 1000000000);
case 5:
return gtG.safeAdd(gtG.safeMultiply(daysUntil, 1440), nanoOfDay / 60000000000L);
case 6:
return gtG.safeAdd(gtG.safeMultiply(daysUntil, 24), nanoOfDay / 3600000000000L);
case 7:
return gtG.safeAdd(gtG.safeMultiply(daysUntil, 2), nanoOfDay / 43200000000000L);
default:
throw new UnsupportedTemporalTypeException("Unsupported unit: ".concat(String.valueOf(interfaceC15539gtV)));
}
}
C15520gsp c15520gsp = from.date;
if (c15520gsp.isAfter(this.date) && from.time.isBefore(this.time)) {
c15520gsp = c15520gsp.minusDays(1L);
} else if (c15520gsp.isBefore(this.date) && from.time.isAfter(this.time)) {
c15520gsp = c15520gsp.plusDays(1L);
}
return this.date.until(c15520gsp, interfaceC15539gtV);
}
return interfaceC15539gtV.between(this, from);
}
public final OffsetDateTime atOffset(gsI gsi) {
return OffsetDateTime.of(this, gsi);
}
@Override // o.gsO
/* renamed from: atZone, reason: merged with bridge method [inline-methods] */
public final gsS<C15520gsp> atZone2(AbstractC15502gsH abstractC15502gsH) {
return gsN.of(this, abstractC15502gsH);
}
@Override // o.gsO
public final int compareTo(gsO<?> gso) {
if (gso instanceof C15522gsr) {
return compareTo0((C15522gsr) gso);
}
return super.compareTo(gso);
}
private int compareTo0(C15522gsr c15522gsr) {
int compareTo0 = this.date.compareTo0(c15522gsr.toLocalDate());
return compareTo0 == 0 ? this.time.compareTo2(c15522gsr.toLocalTime()) : compareTo0;
}
@Override // o.gsO
public final boolean isAfter(gsO<?> gso) {
if (gso instanceof C15522gsr) {
return compareTo0((C15522gsr) gso) > 0;
}
return super.isAfter(gso);
}
@Override // o.gsO
public final boolean isBefore(gsO<?> gso) {
if (gso instanceof C15522gsr) {
return compareTo0((C15522gsr) gso) < 0;
}
return super.isBefore(gso);
}
@Override // o.gsO
public final boolean isEqual(gsO<?> gso) {
if (gso instanceof C15522gsr) {
return compareTo0((C15522gsr) gso) == 0;
}
return super.isEqual(gso);
}
@Override // o.gsO
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof C15522gsr)) {
return false;
}
C15522gsr c15522gsr = (C15522gsr) obj;
return this.date.equals(c15522gsr.date) && this.time.equals(c15522gsr.time);
}
@Override // o.gsO
public final int hashCode() {
return this.date.hashCode() ^ this.time.hashCode();
}
@Override // o.gsO
public final String toString() {
StringBuilder sb = new StringBuilder();
sb.append(this.date.toString());
sb.append('T');
sb.append(this.time.toString());
return sb.toString();
}
@Override // o.gsO
public final String format(C15554gto c15554gto) {
return super.format(c15554gto);
}
private Object writeReplace() {
return new C15501gsD((byte) 4, this);
}
private Object readResolve() throws ObjectStreamException {
throw new InvalidObjectException("Deserialization via serialization delegate");
}
public final void writeExternal(DataOutput dataOutput) throws IOException {
this.date.writeExternal(dataOutput);
this.time.writeExternal(dataOutput);
}
public static C15522gsr readExternal(DataInput dataInput) throws IOException {
return of(C15520gsp.readExternal(dataInput), C15521gsq.readExternal(dataInput));
}
public /* synthetic */ C15522gsr() {
}
@Override // o.gsO
public final C15521gsq toLocalTime() {
return this.time;
}
@Override // o.gsO
public final C15520gsp toLocalDate() {
return this.date;
}
}