Currency Plus v2.10.8版本的 MD5 值为:8586f74edd9ace5aa261a19c9da51484
以下内容为反编译后的 o.java 源代码,内容仅作参考
package z4;
import androidx.datastore.core.CorruptionException;
import com.inmobi.media.f1;
import fi.a0;
import gi.e0;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.concurrent.CancellationException;
import ji.f;
import kotlin.NoWhenBranchMatchedException;
import nl.g0;
import nl.h0;
import nl.i2;
import nl.k0;
import nl.w0;
import ql.a1;
import ql.d1;
import ql.m0;
import ql.z0;
import ti.b0;
import ti.f0;
public final class o<T> implements z4.h<T> {
public static final a f36332k = new a(null);
public static final LinkedHashSet f36333l = new LinkedHashSet();
public static final Object f36334m = new Object();
public final si.a<File> f36335a;
public final z4.l<T> f36336b;
public final z4.a<T> f36337c;
public final g0 f36338d;
public final m0 f36339e;
public final String f36340f;
public final fi.p f36341g;
public final z0 f36342h;
public List<? extends si.p<? super z4.j<T>, ? super ji.d<? super a0>, ? extends Object>> f36343i;
public final z4.m<b<T>> f36344j;
public static final class a {
public a(ti.g gVar) {
}
}
public static abstract class b<T> {
public static final class a<T> extends b<T> {
public final t<T> f36345a;
public a(t<T> tVar) {
super(null);
this.f36345a = tVar;
}
}
public static final class C0731b<T> extends b<T> {
public final si.p<T, ji.d<? super T>, Object> f36346a;
public final nl.r<T> f36347b;
public final t<T> f36348c;
public final ji.f f36349d;
public C0731b(si.p<? super T, ? super ji.d<? super T>, ? extends Object> pVar, nl.r<T> rVar, t<T> tVar, ji.f fVar) {
super(null);
ti.l.f(pVar, "transform");
ti.l.f(rVar, "ack");
ti.l.f(fVar, "callerContext");
this.f36346a = pVar;
this.f36347b = rVar;
this.f36348c = tVar;
this.f36349d = fVar;
}
}
public b() {
}
public b(ti.g gVar) {
this();
}
}
public static final class c extends OutputStream {
public final FileOutputStream f36350a;
public c(FileOutputStream fileOutputStream) {
ti.l.f(fileOutputStream, "fileOutputStream");
this.f36350a = fileOutputStream;
}
@Override
public final void close() {
}
@Override
public final void flush() {
this.f36350a.flush();
}
@Override
public final void write(int i10) {
this.f36350a.write(i10);
}
@Override
public final void write(byte[] bArr) {
ti.l.f(bArr, f1.f14138a);
this.f36350a.write(bArr);
}
@Override
public final void write(byte[] bArr, int i10, int i11) {
ti.l.f(bArr, "bytes");
this.f36350a.write(bArr, i10, i11);
}
}
public static final class d extends ti.n implements si.l<Throwable, a0> {
public final o<T> f36351d;
public d(o<T> oVar) {
super(1);
this.f36351d = oVar;
}
@Override
public final a0 invoke(Throwable th2) {
Throwable th3 = th2;
if (th3 != null) {
this.f36351d.f36342h.setValue(new z4.i(th3));
}
o.f36332k.getClass();
Object obj = o.f36334m;
o<T> oVar = this.f36351d;
synchronized (obj) {
o.f36333l.remove(oVar.c().getAbsolutePath());
}
return a0.f17744a;
}
}
public static final class e extends ti.n implements si.p<b<T>, Throwable, a0> {
public static final e f36352d = new ti.n(2);
@Override
public final a0 invoke(Object obj, Throwable th2) {
b bVar = (b) obj;
Throwable th3 = th2;
ti.l.f(bVar, "msg");
if (bVar instanceof b.C0731b) {
b.C0731b c0731b = (b.C0731b) bVar;
if (th3 == null) {
th3 = new CancellationException("DataStore scope was cancelled before updateData could complete");
}
c0731b.f36347b.L(th3);
}
return a0.f17744a;
}
}
@li.e(c = "androidx.datastore.core.SingleProcessDataStore$actor$3", f = "SingleProcessDataStore.kt", l = {239, 242}, m = "invokeSuspend")
public static final class f extends li.i implements si.p<b<T>, ji.d<? super a0>, Object> {
public int f36353a;
public Object f36354b;
public final o<T> f36355c;
public f(o<T> oVar, ji.d<? super f> dVar) {
super(2, dVar);
this.f36355c = oVar;
}
@Override
public final ji.d<a0> create(Object obj, ji.d<?> dVar) {
f fVar = new f(this.f36355c, dVar);
fVar.f36354b = obj;
return fVar;
}
@Override
public final Object invoke(Object obj, ji.d<? super a0> dVar) {
return ((f) create((b) obj, dVar)).invokeSuspend(a0.f17744a);
}
@Override
public final Object invokeSuspend(Object obj) {
Object obj2;
Object obj3 = ki.a.f22122a;
int i10 = this.f36353a;
if (i10 == 0) {
k0.i1(obj);
b bVar = (b) this.f36354b;
boolean z10 = bVar instanceof b.a;
o<T> oVar = this.f36355c;
if (z10) {
b.a aVar = (b.a) bVar;
this.f36353a = 1;
t<T> tVar = (t) oVar.f36342h.getValue();
if (!(tVar instanceof z4.b)) {
if (tVar instanceof z4.k) {
if (tVar == aVar.f36345a) {
obj2 = oVar.f(this);
if (obj2 != obj3) {
obj2 = a0.f17744a;
}
if (obj2 == obj3) {
return obj3;
}
}
} else if (ti.l.a(tVar, u.f36428a)) {
obj2 = oVar.f(this);
if (obj2 != obj3) {
obj2 = a0.f17744a;
}
if (obj2 == obj3) {
}
} else if (tVar instanceof z4.i) {
throw new IllegalStateException("Can't read in final state.".toString());
}
}
obj2 = a0.f17744a;
if (obj2 == obj3) {
}
} else if (bVar instanceof b.C0731b) {
this.f36353a = 2;
if (o.b(oVar, (b.C0731b) bVar, this) == obj3) {
return obj3;
}
}
} else if (i10 != 1 && i10 != 2) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
k0.i1(obj);
}
return a0.f17744a;
}
}
@li.e(c = "androidx.datastore.core.SingleProcessDataStore$data$1", f = "SingleProcessDataStore.kt", l = {117}, m = "invokeSuspend")
public static final class g extends li.i implements si.p<ql.h<? super T>, ji.d<? super a0>, Object> {
public int f36356a;
public Object f36357b;
public final o<T> f36358c;
@li.e(c = "androidx.datastore.core.SingleProcessDataStore$data$1$1", f = "SingleProcessDataStore.kt", l = {}, m = "invokeSuspend")
public static final class a extends li.i implements si.p<t<T>, ji.d<? super Boolean>, Object> {
public Object f36359a;
public final t<T> f36360b;
public a(t<T> tVar, ji.d<? super a> dVar) {
super(2, dVar);
this.f36360b = tVar;
}
@Override
public final ji.d<a0> create(Object obj, ji.d<?> dVar) {
a aVar = new a(this.f36360b, dVar);
aVar.f36359a = obj;
return aVar;
}
@Override
public final Object invoke(Object obj, ji.d<? super Boolean> dVar) {
return ((a) create((t) obj, dVar)).invokeSuspend(a0.f17744a);
}
@Override
public final Object invokeSuspend(Object obj) {
ki.a aVar = ki.a.f22122a;
k0.i1(obj);
t<T> tVar = (t) this.f36359a;
t<T> tVar2 = this.f36360b;
boolean z10 = false;
if (!(tVar2 instanceof z4.b) && !(tVar2 instanceof z4.i) && tVar == tVar2) {
z10 = true;
}
return Boolean.valueOf(z10);
}
}
public static final class b implements ql.g<T> {
public final ql.g f36361a;
public static final class a implements ql.h<t<T>> {
public final ql.h f36362a;
@li.e(c = "androidx.datastore.core.SingleProcessDataStore$data$1$invokeSuspend$$inlined$map$1$2", f = "SingleProcessDataStore.kt", l = {137}, m = "emit")
public static final class C0732a extends li.c {
public Object f36363a;
public int f36364b;
public C0732a(ji.d dVar) {
super(dVar);
}
@Override
public final Object invokeSuspend(Object obj) {
this.f36363a = obj;
this.f36364b |= Integer.MIN_VALUE;
return a.this.emit(null, this);
}
}
public a(ql.h hVar) {
this.f36362a = hVar;
}
@Override
public final Object emit(Object obj, ji.d dVar) {
C0732a c0732a;
int i10;
if (dVar instanceof C0732a) {
c0732a = (C0732a) dVar;
int i11 = c0732a.f36364b;
if ((i11 & Integer.MIN_VALUE) != 0) {
c0732a.f36364b = i11 - Integer.MIN_VALUE;
Object obj2 = c0732a.f36363a;
ki.a aVar = ki.a.f22122a;
i10 = c0732a.f36364b;
if (i10 != 0) {
k0.i1(obj2);
t tVar = (t) obj;
if (tVar instanceof z4.k) {
throw ((z4.k) tVar).f36321a;
}
if (tVar instanceof z4.i) {
throw ((z4.i) tVar).f36320a;
}
if (!(tVar instanceof z4.b)) {
if (tVar instanceof u) {
throw new IllegalStateException("This is a bug in DataStore. Please file a bug at: https://issuetracker.google.com/issues/new?component=907884&template=1466542".toString());
}
throw new NoWhenBranchMatchedException();
}
T t10 = ((z4.b) tVar).f36300a;
c0732a.f36364b = 1;
if (this.f36362a.emit(t10, c0732a) == aVar) {
return aVar;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
k0.i1(obj2);
}
return a0.f17744a;
}
}
c0732a = new C0732a(dVar);
Object obj22 = c0732a.f36363a;
ki.a aVar2 = ki.a.f22122a;
i10 = c0732a.f36364b;
if (i10 != 0) {
}
return a0.f17744a;
}
}
public b(ql.g gVar) {
this.f36361a = gVar;
}
@Override
public final Object collect(ql.h hVar, ji.d dVar) {
Object collect = this.f36361a.collect(new a(hVar), dVar);
return collect == ki.a.f22122a ? collect : a0.f17744a;
}
}
public g(o<T> oVar, ji.d<? super g> dVar) {
super(2, dVar);
this.f36358c = oVar;
}
@Override
public final ji.d<a0> create(Object obj, ji.d<?> dVar) {
g gVar = new g(this.f36358c, dVar);
gVar.f36357b = obj;
return gVar;
}
@Override
public final Object invoke(Object obj, ji.d<? super a0> dVar) {
return ((g) create((ql.h) obj, dVar)).invokeSuspend(a0.f17744a);
}
@Override
public final Object invokeSuspend(Object obj) {
ki.a aVar = ki.a.f22122a;
int i10 = this.f36356a;
if (i10 == 0) {
k0.i1(obj);
ql.h hVar = (ql.h) this.f36357b;
o<T> oVar = this.f36358c;
t tVar = (t) oVar.f36342h.getValue();
if (!(tVar instanceof z4.b)) {
oVar.f36344j.a(new b.a(tVar));
}
b bVar = new b(new ql.r(oVar.f36342h, new a(tVar, null)));
this.f36356a = 1;
if (hVar instanceof d1) {
throw ((d1) hVar).f26849a;
}
Object collect = bVar.collect(hVar, this);
if (collect != aVar) {
collect = a0.f17744a;
}
if (collect == aVar) {
return aVar;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
k0.i1(obj);
}
return a0.f17744a;
}
}
public static final class h extends ti.n implements si.a<File> {
public final o<T> f36366d;
public h(o<T> oVar) {
super(0);
this.f36366d = oVar;
}
@Override
public final File invoke() {
File invoke = this.f36366d.f36335a.invoke();
String absolutePath = invoke.getAbsolutePath();
o.f36332k.getClass();
synchronized (o.f36334m) {
LinkedHashSet linkedHashSet = o.f36333l;
if (!(!linkedHashSet.contains(absolutePath))) {
throw new IllegalStateException(("There are multiple DataStores active for the same file: " + invoke + ". You should either maintain your DataStore as a singleton or confirm that there is no two DataStore's active on the same file (by confirming that the scope is cancelled).").toString());
}
ti.l.e(absolutePath, "it");
linkedHashSet.add(absolutePath);
}
return invoke;
}
}
@li.e(c = "androidx.datastore.core.SingleProcessDataStore", f = "SingleProcessDataStore.kt", l = {322, 348, 505}, m = "readAndInit")
public static final class i extends li.c {
public o f36367a;
public Object f36368b;
public Serializable f36369c;
public Object f36370d;
public j f36371e;
public Iterator f36372f;
public Object f36373g;
public final o<T> f36374h;
public int f36375i;
public i(o<T> oVar, ji.d<? super i> dVar) {
super(dVar);
this.f36374h = oVar;
}
@Override
public final Object invokeSuspend(Object obj) {
this.f36373g = obj;
this.f36375i |= Integer.MIN_VALUE;
a aVar = o.f36332k;
return this.f36374h.d(this);
}
}
public static final class j implements z4.j<T> {
public final wl.a f36376a;
public final b0 f36377b;
public final f0<T> f36378c;
public final o<T> f36379d;
public j(wl.a aVar, b0 b0Var, f0<T> f0Var, o<T> oVar) {
this.f36376a = aVar;
this.f36377b = b0Var;
this.f36378c = f0Var;
this.f36379d = oVar;
}
@Override
public final Object a(z4.f fVar, ji.d dVar) {
q qVar;
int i10;
wl.a aVar;
o<T> oVar;
b0 b0Var;
f0<T> f0Var;
wl.a aVar2;
wl.a aVar3;
o<T> oVar2;
T t10;
f0<T> f0Var2;
try {
if (dVar instanceof q) {
qVar = (q) dVar;
int i11 = qVar.f36418h;
if ((i11 & Integer.MIN_VALUE) != 0) {
qVar.f36418h = i11 - Integer.MIN_VALUE;
Object obj = qVar.f36416f;
ki.a aVar4 = ki.a.f22122a;
i10 = qVar.f36418h;
if (i10 != 0) {
k0.i1(obj);
qVar.f36411a = fVar;
aVar = this.f36376a;
qVar.f36412b = aVar;
b0 b0Var2 = this.f36377b;
qVar.f36413c = b0Var2;
f0<T> f0Var3 = this.f36378c;
qVar.f36414d = f0Var3;
oVar = this.f36379d;
qVar.f36415e = oVar;
qVar.f36418h = 1;
if (aVar.c(null, qVar) == aVar4) {
return aVar4;
}
b0Var = b0Var2;
f0Var = f0Var3;
} else if (i10 != 1) {
if (i10 != 2) {
if (i10 == 3) {
t10 = (T) qVar.f36413c;
f0Var2 = (f0) qVar.f36412b;
aVar2 = (wl.a) qVar.f36411a;
try {
k0.i1(obj);
f0Var2.f30656a = t10;
f0Var = f0Var2;
T t11 = f0Var.f30656a;
aVar2.d(null);
return t11;
} catch (Throwable th2) {
th = th2;
aVar2.d(null);
throw th;
}
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
oVar2 = (o) qVar.f36413c;
f0Var = (f0) qVar.f36412b;
aVar3 = (wl.a) qVar.f36411a;
try {
k0.i1(obj);
if (!ti.l.a(obj, f0Var.f30656a)) {
aVar2 = aVar3;
T t112 = f0Var.f30656a;
aVar2.d(null);
return t112;
}
qVar.f36411a = aVar3;
qVar.f36412b = f0Var;
qVar.f36413c = obj;
qVar.f36418h = 3;
if (oVar2.j(obj, qVar) == aVar4) {
return aVar4;
}
t10 = (T) obj;
f0Var2 = f0Var;
aVar2 = aVar3;
f0Var2.f30656a = t10;
f0Var = f0Var2;
T t1122 = f0Var.f30656a;
aVar2.d(null);
return t1122;
} catch (Throwable th3) {
th = th3;
aVar2 = aVar3;
aVar2.d(null);
throw th;
}
} else {
o<T> oVar3 = qVar.f36415e;
f0Var = qVar.f36414d;
b0Var = (b0) qVar.f36413c;
?? r82 = (si.p) qVar.f36411a;
k0.i1(obj);
aVar = (wl.a) qVar.f36412b;
oVar = oVar3;
fVar = r82;
}
if (!b0Var.f30645a) {
throw new IllegalStateException("InitializerApi.updateData should not be called after initialization is complete.");
}
T t12 = f0Var.f30656a;
qVar.f36411a = aVar;
qVar.f36412b = f0Var;
qVar.f36413c = oVar;
qVar.f36414d = null;
qVar.f36415e = null;
qVar.f36418h = 2;
Object invoke = fVar.invoke(t12, qVar);
if (invoke == aVar4) {
return aVar4;
}
aVar3 = aVar;
obj = invoke;
oVar2 = oVar;
if (!ti.l.a(obj, f0Var.f30656a)) {
}
}
}
if (!b0Var.f30645a) {
}
} catch (Throwable th4) {
th = th4;
aVar2 = aVar;
aVar2.d(null);
throw th;
}
qVar = new q(this, dVar);
Object obj2 = qVar.f36416f;
ki.a aVar42 = ki.a.f22122a;
i10 = qVar.f36418h;
if (i10 != 0) {
}
}
}
@li.e(c = "androidx.datastore.core.SingleProcessDataStore", f = "SingleProcessDataStore.kt", l = {302}, m = "readAndInitOrPropagateAndThrowFailure")
public static final class k extends li.c {
public o f36380a;
public Object f36381b;
public final o<T> f36382c;
public int f36383d;
public k(o<T> oVar, ji.d<? super k> dVar) {
super(dVar);
this.f36382c = oVar;
}
@Override
public final Object invokeSuspend(Object obj) {
this.f36381b = obj;
this.f36383d |= Integer.MIN_VALUE;
a aVar = o.f36332k;
return this.f36382c.e(this);
}
}
@li.e(c = "androidx.datastore.core.SingleProcessDataStore", f = "SingleProcessDataStore.kt", l = {311}, m = "readAndInitOrPropagateFailure")
public static final class l extends li.c {
public o f36384a;
public Object f36385b;
public final o<T> f36386c;
public int f36387d;
public l(o<T> oVar, ji.d<? super l> dVar) {
super(dVar);
this.f36386c = oVar;
}
@Override
public final Object invokeSuspend(Object obj) {
this.f36385b = obj;
this.f36387d |= Integer.MIN_VALUE;
a aVar = o.f36332k;
return this.f36386c.f(this);
}
}
@li.e(c = "androidx.datastore.core.SingleProcessDataStore", f = "SingleProcessDataStore.kt", l = {381}, m = "readData")
public static final class m extends li.c {
public o f36388a;
public FileInputStream f36389b;
public Object f36390c;
public final o<T> f36391d;
public int f36392e;
public m(o<T> oVar, ji.d<? super m> dVar) {
super(dVar);
this.f36391d = oVar;
}
@Override
public final Object invokeSuspend(Object obj) {
this.f36390c = obj;
this.f36392e |= Integer.MIN_VALUE;
a aVar = o.f36332k;
return this.f36391d.g(this);
}
}
@li.e(c = "androidx.datastore.core.SingleProcessDataStore", f = "SingleProcessDataStore.kt", l = {359, 362, 365}, m = "readDataOrHandleCorruption")
public static final class n extends li.c {
public Object f36393a;
public Object f36394b;
public Object f36395c;
public final o<T> f36396d;
public int f36397e;
public n(o<T> oVar, ji.d<? super n> dVar) {
super(dVar);
this.f36396d = oVar;
}
@Override
public final Object invokeSuspend(Object obj) {
this.f36395c = obj;
this.f36397e |= Integer.MIN_VALUE;
a aVar = o.f36332k;
return this.f36396d.h(this);
}
}
@li.e(c = "androidx.datastore.core.SingleProcessDataStore", f = "SingleProcessDataStore.kt", l = {426}, m = "writeData$datastore_core")
public static final class C0733o extends li.c {
public o f36398a;
public File f36399b;
public FileOutputStream f36400c;
public FileOutputStream f36401d;
public Object f36402e;
public final o<T> f36403f;
public int f36404g;
public C0733o(o<T> oVar, ji.d<? super C0733o> dVar) {
super(dVar);
this.f36403f = oVar;
}
@Override
public final Object invokeSuspend(Object obj) {
this.f36402e = obj;
this.f36404g |= Integer.MIN_VALUE;
return this.f36403f.j(null, this);
}
}
public o(si.a<? extends File> aVar, z4.l<T> lVar, List<? extends si.p<? super z4.j<T>, ? super ji.d<? super a0>, ? extends Object>> list, z4.a<T> aVar2, g0 g0Var) {
ti.l.f(aVar, "produceFile");
ti.l.f(lVar, "serializer");
ti.l.f(list, "initTasksList");
ti.l.f(aVar2, "corruptionHandler");
ti.l.f(g0Var, "scope");
this.f36335a = aVar;
this.f36336b = lVar;
this.f36337c = aVar2;
this.f36338d = g0Var;
this.f36339e = new m0(new g(this, null));
this.f36340f = ".tmp";
this.f36341g = fi.j.b(new h(this));
this.f36342h = a1.a(u.f36428a);
this.f36343i = e0.d0(list);
this.f36344j = new z4.m<>(g0Var, new d(this), e.f36352d, new f(this, null));
}
public o(si.a aVar, z4.l lVar, List list, z4.a aVar2, g0 g0Var, int i10, ti.g gVar) {
this(aVar, lVar, r3, r4, g0Var);
List list2 = (i10 & 4) != 0 ? gi.g0.f19288a : list;
z4.a aVar3 = (i10 & 8) != 0 ? new a5.a() : aVar2;
if ((i10 & 16) != 0) {
ul.b bVar = w0.f24636b;
i2 b10 = nl.f.b();
bVar.getClass();
g0Var = h0.a(f.a.a(bVar, b10));
}
}
public static final Object b(o oVar, b.C0731b c0731b, ji.d dVar) {
p pVar;
ki.a aVar;
int i10;
?? r82;
Throwable a10;
nl.r<T> rVar;
t<T> tVar;
Object i11;
nl.r rVar2;
oVar.getClass();
if (dVar instanceof p) {
pVar = (p) dVar;
int i12 = pVar.f36410f;
if ((i12 & Integer.MIN_VALUE) != 0) {
pVar.f36410f = i12 - Integer.MIN_VALUE;
Object obj = pVar.f36408d;
aVar = ki.a.f22122a;
i10 = pVar.f36410f;
if (i10 == 0) {
if (i10 == 1) {
rVar2 = (nl.r) pVar.f36405a;
} else if (i10 == 2) {
nl.r<T> rVar3 = pVar.f36407c;
o oVar2 = pVar.f36406b;
b.C0731b c0731b2 = (b.C0731b) pVar.f36405a;
k0.i1(obj);
rVar = rVar3;
oVar = oVar2;
c0731b = c0731b2;
} else if (i10 != 3) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
rVar2 = (nl.r) pVar.f36405a;
}
k0.i1(obj);
oVar = rVar2;
int i13 = fi.n.f17764b;
r82 = oVar;
a10 = fi.n.a(obj);
if (a10 == null) {
r82.N(obj);
} else {
r82.L(a10);
}
return a0.f17744a;
}
k0.i1(obj);
rVar = c0731b.f36347b;
try {
int i14 = fi.n.f17764b;
tVar = (t) oVar.f36342h.getValue();
} catch (Throwable th2) {
th = th2;
oVar = rVar;
int i15 = fi.n.f17764b;
obj = k0.R(th);
r82 = oVar;
a10 = fi.n.a(obj);
if (a10 == null) {
}
return a0.f17744a;
}
if (tVar instanceof z4.b) {
si.p<T, ji.d<? super T>, Object> pVar2 = c0731b.f36346a;
ji.f fVar = c0731b.f36349d;
pVar.f36405a = rVar;
pVar.f36410f = 1;
i11 = oVar.i(pVar, fVar, pVar2);
if (i11 == aVar) {
return aVar;
}
nl.r<T> rVar4 = rVar;
obj = i11;
oVar = rVar4;
int i132 = fi.n.f17764b;
r82 = oVar;
a10 = fi.n.a(obj);
if (a10 == null) {
}
return a0.f17744a;
}
if (!(tVar instanceof z4.k) && !(tVar instanceof u)) {
if (tVar instanceof z4.i) {
throw ((z4.i) tVar).f36320a;
}
throw new NoWhenBranchMatchedException();
}
if (tVar != c0731b.f36348c) {
throw ((z4.k) tVar).f36321a;
}
pVar.f36405a = c0731b;
pVar.f36406b = oVar;
pVar.f36407c = rVar;
pVar.f36410f = 2;
if (oVar.e(pVar) == aVar) {
return aVar;
}
si.p<T, ji.d<? super T>, Object> pVar3 = c0731b.f36346a;
ji.f fVar2 = c0731b.f36349d;
pVar.f36405a = rVar;
pVar.f36406b = null;
pVar.f36407c = null;
pVar.f36410f = 3;
i11 = oVar.i(pVar, fVar2, pVar3);
if (i11 == aVar) {
return aVar;
}
nl.r<T> rVar42 = rVar;
obj = i11;
oVar = rVar42;
int i1322 = fi.n.f17764b;
r82 = oVar;
a10 = fi.n.a(obj);
if (a10 == null) {
}
return a0.f17744a;
}
}
pVar = new p(oVar, dVar);
Object obj2 = pVar.f36408d;
aVar = ki.a.f22122a;
i10 = pVar.f36410f;
if (i10 == 0) {
}
si.p<T, ji.d<? super T>, Object> pVar32 = c0731b.f36346a;
ji.f fVar22 = c0731b.f36349d;
pVar.f36405a = rVar;
pVar.f36406b = null;
pVar.f36407c = null;
pVar.f36410f = 3;
i11 = oVar.i(pVar, fVar22, pVar32);
if (i11 == aVar) {
}
nl.r<T> rVar422 = rVar;
obj2 = i11;
oVar = rVar422;
int i13222 = fi.n.f17764b;
r82 = oVar;
a10 = fi.n.a(obj2);
if (a10 == null) {
}
return a0.f17744a;
}
@Override
public final Object a(si.p<? super T, ? super ji.d<? super T>, ? extends Object> pVar, ji.d<? super T> dVar) {
nl.s sVar = new nl.s(null);
this.f36344j.a(new b.C0731b(pVar, sVar, (t) this.f36342h.getValue(), dVar.getContext()));
Object v10 = sVar.v(dVar);
ki.a aVar = ki.a.f22122a;
return v10;
}
public final File c() {
return (File) this.f36341g.getValue();
}
public final Object d(ji.d<? super a0> dVar) {
i iVar;
int i10;
wl.a a10;
f0 f0Var;
o<T> oVar;
f0 f0Var2;
List<? extends si.p<? super z4.j<T>, ? super ji.d<? super a0>, ? extends Object>> list;
o<T> oVar2;
f0 f0Var3;
j jVar;
Iterator<T> it;
wl.a aVar;
b0 b0Var;
ki.a aVar2;
wl.a aVar3;
i iVar2;
o<T> oVar3;
f0 f0Var4;
b0 b0Var2;
if (dVar instanceof i) {
iVar = (i) dVar;
int i11 = iVar.f36375i;
if ((i11 & Integer.MIN_VALUE) != 0) {
iVar.f36375i = i11 - Integer.MIN_VALUE;
T t10 = (T) iVar.f36373g;
ki.a aVar4 = ki.a.f22122a;
i10 = iVar.f36375i;
if (i10 != 0) {
k0.i1(t10);
z0 z0Var = this.f36342h;
if (!ti.l.a(z0Var.getValue(), u.f36428a) && !(z0Var.getValue() instanceof z4.k)) {
throw new IllegalStateException("Check failed.".toString());
}
a10 = wl.f.a();
f0Var = new f0();
iVar.f36367a = this;
iVar.f36368b = a10;
iVar.f36369c = f0Var;
iVar.f36370d = f0Var;
iVar.f36375i = 1;
t10 = (T) h(iVar);
if (t10 == aVar4) {
return aVar4;
}
oVar = this;
f0Var2 = f0Var;
} else if (i10 != 1) {
if (i10 != 2) {
if (i10 == 3) {
aVar3 = (wl.a) iVar.f36370d;
b0Var2 = (b0) iVar.f36369c;
f0Var4 = (f0) iVar.f36368b;
oVar3 = iVar.f36367a;
k0.i1(t10);
try {
b0Var2.f30645a = true;
a0 a0Var = a0.f17744a;
aVar3.d(null);
z0 z0Var2 = oVar3.f36342h;
T t11 = f0Var4.f30656a;
z0Var2.setValue(new z4.b(t11, t11 == null ? t11.hashCode() : 0));
return a0.f17744a;
} catch (Throwable th2) {
aVar3.d(null);
throw th2;
}
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
it = iVar.f36372f;
jVar = iVar.f36371e;
b0Var = (b0) iVar.f36370d;
f0Var3 = (f0) iVar.f36369c;
aVar = (wl.a) iVar.f36368b;
oVar2 = iVar.f36367a;
k0.i1(t10);
while (it.hasNext()) {
iVar.f36367a = oVar2;
iVar.f36368b = aVar;
iVar.f36369c = f0Var3;
iVar.f36370d = b0Var;
iVar.f36371e = jVar;
iVar.f36372f = it;
iVar.f36375i = 2;
if (((si.p) it.next()).invoke(jVar, iVar) == aVar4) {
return aVar4;
}
}
iVar2 = iVar;
aVar2 = aVar4;
f0Var2 = f0Var3;
aVar3 = aVar;
oVar3 = oVar2;
oVar3.f36343i = null;
iVar2.f36367a = oVar3;
iVar2.f36368b = f0Var2;
iVar2.f36369c = b0Var;
iVar2.f36370d = aVar3;
iVar2.f36371e = null;
iVar2.f36372f = null;
iVar2.f36375i = 3;
if (aVar3.c(null, iVar2) == aVar2) {
return aVar2;
}
f0Var4 = f0Var2;
b0Var2 = b0Var;
b0Var2.f30645a = true;
a0 a0Var2 = a0.f17744a;
aVar3.d(null);
z0 z0Var22 = oVar3.f36342h;
T t112 = f0Var4.f30656a;
z0Var22.setValue(new z4.b(t112, t112 == null ? t112.hashCode() : 0));
return a0.f17744a;
} else {
f0Var = (f0) iVar.f36370d;
f0Var2 = (f0) iVar.f36369c;
a10 = (wl.a) iVar.f36368b;
oVar = iVar.f36367a;
k0.i1(t10);
}
f0Var.f30656a = t10;
b0 b0Var3 = new b0();
j jVar2 = new j(a10, b0Var3, f0Var2, oVar);
list = oVar.f36343i;
if (list != null) {
aVar2 = aVar4;
aVar3 = a10;
b0Var = b0Var3;
iVar2 = iVar;
oVar3 = oVar;
oVar3.f36343i = null;
iVar2.f36367a = oVar3;
iVar2.f36368b = f0Var2;
iVar2.f36369c = b0Var;
iVar2.f36370d = aVar3;
iVar2.f36371e = null;
iVar2.f36372f = null;
iVar2.f36375i = 3;
if (aVar3.c(null, iVar2) == aVar2) {
}
} else {
oVar2 = oVar;
f0Var3 = f0Var2;
jVar = jVar2;
it = list.iterator();
aVar = a10;
b0Var = b0Var3;
while (it.hasNext()) {
}
iVar2 = iVar;
aVar2 = aVar4;
f0Var2 = f0Var3;
aVar3 = aVar;
oVar3 = oVar2;
oVar3.f36343i = null;
iVar2.f36367a = oVar3;
iVar2.f36368b = f0Var2;
iVar2.f36369c = b0Var;
iVar2.f36370d = aVar3;
iVar2.f36371e = null;
iVar2.f36372f = null;
iVar2.f36375i = 3;
if (aVar3.c(null, iVar2) == aVar2) {
}
}
}
}
iVar = new i(this, dVar);
T t102 = (T) iVar.f36373g;
ki.a aVar42 = ki.a.f22122a;
i10 = iVar.f36375i;
if (i10 != 0) {
}
f0Var.f30656a = t102;
b0 b0Var32 = new b0();
j jVar22 = new j(a10, b0Var32, f0Var2, oVar);
list = oVar.f36343i;
if (list != null) {
}
}
public final Object e(ji.d<? super a0> dVar) {
k kVar;
int i10;
o<T> oVar;
if (dVar instanceof k) {
kVar = (k) dVar;
int i11 = kVar.f36383d;
if ((i11 & Integer.MIN_VALUE) != 0) {
kVar.f36383d = i11 - Integer.MIN_VALUE;
Object obj = kVar.f36381b;
ki.a aVar = ki.a.f22122a;
i10 = kVar.f36383d;
if (i10 != 0) {
k0.i1(obj);
try {
kVar.f36380a = this;
kVar.f36383d = 1;
if (d(kVar) == aVar) {
return aVar;
}
} catch (Throwable th2) {
th = th2;
oVar = this;
oVar.f36342h.setValue(new z4.k(th));
throw th;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
oVar = kVar.f36380a;
try {
k0.i1(obj);
} catch (Throwable th3) {
th = th3;
oVar.f36342h.setValue(new z4.k(th));
throw th;
}
}
return a0.f17744a;
}
}
kVar = new k(this, dVar);
Object obj2 = kVar.f36381b;
ki.a aVar2 = ki.a.f22122a;
i10 = kVar.f36383d;
if (i10 != 0) {
}
return a0.f17744a;
}
public final Object f(ji.d<? super a0> dVar) {
l lVar;
int i10;
o<T> oVar;
if (dVar instanceof l) {
lVar = (l) dVar;
int i11 = lVar.f36387d;
if ((i11 & Integer.MIN_VALUE) != 0) {
lVar.f36387d = i11 - Integer.MIN_VALUE;
Object obj = lVar.f36385b;
ki.a aVar = ki.a.f22122a;
i10 = lVar.f36387d;
if (i10 != 0) {
k0.i1(obj);
try {
lVar.f36384a = this;
lVar.f36387d = 1;
if (d(lVar) == aVar) {
return aVar;
}
} catch (Throwable th2) {
th = th2;
oVar = this;
oVar.f36342h.setValue(new z4.k(th));
return a0.f17744a;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
oVar = lVar.f36384a;
try {
k0.i1(obj);
} catch (Throwable th3) {
th = th3;
oVar.f36342h.setValue(new z4.k(th));
return a0.f17744a;
}
}
return a0.f17744a;
}
}
lVar = new l(this, dVar);
Object obj2 = lVar.f36385b;
ki.a aVar2 = ki.a.f22122a;
i10 = lVar.f36387d;
if (i10 != 0) {
}
return a0.f17744a;
}
public final Object g(ji.d<? super T> dVar) {
o oVar;
int i10;
Throwable th2;
FileInputStream fileInputStream;
try {
if (dVar instanceof m) {
m mVar = (m) dVar;
int i11 = mVar.f36392e;
if ((i11 & Integer.MIN_VALUE) != 0) {
mVar.f36392e = i11 - Integer.MIN_VALUE;
oVar = mVar;
Object obj = oVar.f36390c;
ki.a aVar = ki.a.f22122a;
i10 = oVar.f36392e;
if (i10 != 0) {
k0.i1(obj);
try {
FileInputStream fileInputStream2 = new FileInputStream(c());
try {
z4.l<T> lVar = this.f36336b;
oVar.f36388a = this;
oVar.f36389b = fileInputStream2;
oVar.f36392e = 1;
c5.a b10 = lVar.b(fileInputStream2);
if (b10 == aVar) {
return aVar;
}
fileInputStream = fileInputStream2;
obj = b10;
} catch (Throwable th3) {
th2 = th3;
throw th2;
}
} catch (FileNotFoundException e10) {
e = e10;
oVar = this;
if (oVar.c().exists()) {
throw e;
}
return oVar.f36336b.getDefaultValue();
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
fileInputStream = oVar.f36389b;
o oVar2 = oVar.f36388a;
try {
k0.i1(obj);
} catch (Throwable th4) {
th2 = th4;
throw th2;
}
}
cm.p.f(fileInputStream, null);
return obj;
}
}
if (i10 != 0) {
}
cm.p.f(fileInputStream, null);
return obj;
} catch (FileNotFoundException e11) {
e = e11;
}
oVar = new m(this, dVar);
Object obj2 = oVar.f36390c;
ki.a aVar2 = ki.a.f22122a;
i10 = oVar.f36392e;
}
@Override
public final ql.g<T> getData() {
return this.f36339e;
}
public final Object h(ji.d<? super T> dVar) {
n nVar;
int i10;
o oVar;
Object a10;
CorruptionException corruptionException;
o oVar2;
CorruptionException corruptionException2;
if (dVar instanceof n) {
nVar = (n) dVar;
int i11 = nVar.f36397e;
if ((i11 & Integer.MIN_VALUE) != 0) {
nVar.f36397e = i11 - Integer.MIN_VALUE;
Object obj = nVar.f36395c;
Object obj2 = ki.a.f22122a;
i10 = nVar.f36397e;
if (i10 != 0) {
k0.i1(obj);
try {
nVar.f36393a = this;
nVar.f36397e = 1;
obj = g(nVar);
if (obj == obj2) {
return obj2;
}
} catch (CorruptionException e10) {
e = e10;
oVar = this;
z4.a<T> aVar = oVar.f36337c;
nVar.f36393a = oVar;
nVar.f36394b = e;
nVar.f36397e = 2;
a10 = aVar.a(e);
if (a10 != obj2) {
}
}
} else if (i10 != 1) {
if (i10 != 2) {
if (i10 == 3) {
Object obj3 = nVar.f36394b;
corruptionException2 = (CorruptionException) nVar.f36393a;
try {
k0.i1(obj);
return obj3;
} catch (IOException e11) {
e = e11;
fi.e.a(corruptionException2, e);
throw corruptionException2;
}
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
corruptionException = (CorruptionException) nVar.f36394b;
oVar2 = (o) nVar.f36393a;
k0.i1(obj);
try {
nVar.f36393a = corruptionException;
nVar.f36394b = obj;
nVar.f36397e = 3;
return oVar2.j(obj, nVar) != obj2 ? obj2 : obj;
} catch (IOException e12) {
e = e12;
corruptionException2 = corruptionException;
fi.e.a(corruptionException2, e);
throw corruptionException2;
}
} else {
oVar = (o) nVar.f36393a;
try {
k0.i1(obj);
} catch (CorruptionException e13) {
e = e13;
z4.a<T> aVar2 = oVar.f36337c;
nVar.f36393a = oVar;
nVar.f36394b = e;
nVar.f36397e = 2;
a10 = aVar2.a(e);
if (a10 != obj2) {
return obj2;
}
o oVar3 = oVar;
corruptionException = e;
obj = a10;
oVar2 = oVar3;
nVar.f36393a = corruptionException;
nVar.f36394b = obj;
nVar.f36397e = 3;
if (oVar2.j(obj, nVar) != obj2) {
}
}
}
return obj;
}
}
nVar = new n(this, dVar);
Object obj4 = nVar.f36395c;
Object obj22 = ki.a.f22122a;
i10 = nVar.f36397e;
if (i10 != 0) {
}
return obj4;
}
public final Object i(ji.d dVar, ji.f fVar, si.p pVar) {
r rVar;
T t10;
int i10;
o<T> oVar;
z4.b bVar;
Object obj;
o oVar2;
if (dVar instanceof r) {
rVar = (r) dVar;
int i11 = rVar.f36424f;
if ((i11 & Integer.MIN_VALUE) != 0) {
rVar.f36424f = i11 - Integer.MIN_VALUE;
t10 = (T) rVar.f36422d;
Object obj2 = ki.a.f22122a;
i10 = rVar.f36424f;
if (i10 != 0) {
k0.i1(t10);
z4.b bVar2 = (z4.b) this.f36342h.getValue();
bVar2.a();
T t11 = bVar2.f36300a;
s sVar = new s(null, pVar, t11);
rVar.f36419a = this;
rVar.f36420b = bVar2;
rVar.f36421c = t11;
rVar.f36424f = 1;
Object l10 = nl.f.l(rVar, fVar, sVar);
if (l10 == obj2) {
return obj2;
}
oVar = this;
bVar = bVar2;
t10 = (T) l10;
obj = t11;
} else if (i10 != 1) {
if (i10 == 2) {
obj = rVar.f36420b;
oVar2 = rVar.f36419a;
k0.i1(t10);
oVar2.f36342h.setValue(new z4.b(obj, obj == null ? obj.hashCode() : 0));
return obj;
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
obj = rVar.f36421c;
bVar = (z4.b) rVar.f36420b;
oVar = rVar.f36419a;
k0.i1(t10);
}
bVar.a();
if (!ti.l.a(obj, t10)) {
rVar.f36419a = oVar;
rVar.f36420b = t10;
rVar.f36421c = null;
rVar.f36424f = 2;
if (oVar.j(t10, rVar) == obj2) {
return obj2;
}
obj = t10;
oVar2 = oVar;
oVar2.f36342h.setValue(new z4.b(obj, obj == null ? obj.hashCode() : 0));
}
return obj;
}
}
rVar = new r(this, dVar);
t10 = (T) rVar.f36422d;
Object obj22 = ki.a.f22122a;
i10 = rVar.f36424f;
if (i10 != 0) {
}
bVar.a();
if (!ti.l.a(obj, t10)) {
}
return obj;
}
public final Object j(T t10, ji.d<? super a0> dVar) {
C0733o c0733o;
int i10;
File file;
o<T> oVar;
FileOutputStream fileOutputStream;
FileOutputStream fileOutputStream2;
if (dVar instanceof C0733o) {
c0733o = (C0733o) dVar;
int i11 = c0733o.f36404g;
if ((i11 & Integer.MIN_VALUE) != 0) {
c0733o.f36404g = i11 - Integer.MIN_VALUE;
Object obj = c0733o.f36402e;
ki.a aVar = ki.a.f22122a;
i10 = c0733o.f36404g;
if (i10 != 0) {
k0.i1(obj);
File c10 = c();
File parentFile = c10.getCanonicalFile().getParentFile();
if (parentFile != null) {
parentFile.mkdirs();
if (!parentFile.isDirectory()) {
throw new IOException(ti.l.k(c10, "Unable to create parent directories of "));
}
}
file = new File(ti.l.k(this.f36340f, c().getAbsolutePath()));
try {
FileOutputStream fileOutputStream3 = new FileOutputStream(file);
try {
z4.l<T> lVar = this.f36336b;
c cVar = new c(fileOutputStream3);
c0733o.f36398a = this;
c0733o.f36399b = file;
c0733o.f36400c = fileOutputStream3;
c0733o.f36401d = fileOutputStream3;
c0733o.f36404g = 1;
if (lVar.a(t10, cVar) == aVar) {
return aVar;
}
oVar = this;
fileOutputStream = fileOutputStream3;
fileOutputStream2 = fileOutputStream;
} catch (Throwable th2) {
th = th2;
throw th;
}
} catch (IOException e10) {
if (file.exists()) {
file.delete();
}
throw e10;
}
} else if (i10 != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
fileOutputStream = c0733o.f36401d;
fileOutputStream2 = c0733o.f36400c;
file = c0733o.f36399b;
oVar = c0733o.f36398a;
try {
k0.i1(obj);
} catch (Throwable th3) {
th = th3;
throw th;
}
}
fileOutputStream.getFD().sync();
a0 a0Var = a0.f17744a;
cm.p.f(fileOutputStream2, null);
if (file.renameTo(oVar.c())) {
throw new IOException("Unable to rename " + file + ".This likely means that there are multiple instances of DataStore for this file. Ensure that you are only creating a single instance of datastore for this file.");
}
return a0.f17744a;
}
}
c0733o = new C0733o(this, dVar);
Object obj2 = c0733o.f36402e;
ki.a aVar2 = ki.a.f22122a;
i10 = c0733o.f36404g;
if (i10 != 0) {
}
fileOutputStream.getFD().sync();
a0 a0Var2 = a0.f17744a;
cm.p.f(fileOutputStream2, null);
if (file.renameTo(oVar.c())) {
}
}
}