Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 GlowEffectUseCase.java 源代码,内容仅作参考
package com.beautify.studio.impl.glow.usecases.nonTestableUseCases;
import android.graphics.Bitmap;
import com.picsart.effect.core.BaseEffectUseCase;
import com.picsart.effect.core.InputMap;
import com.picsart.effect.core.LibInputName;
import com.picsart.effect.core.p;
import com.picsart.effect.core.u;
import com.picsart.picore.jninative.imageing.image.ImageBuffer8;
import com.picsart.picore.x.RXSession;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref$ObjectRef;
import myobfuscated.c81.e;
import myobfuscated.jk2.e0;
import myobfuscated.mk2.c;
import myobfuscated.ok2.d;
import myobfuscated.t81.i;
import myobfuscated.vq0.g0;
import myobfuscated.vq0.t;
import myobfuscated.yq0.q;
import org.jetbrains.annotations.NotNull;
public final class GlowEffectUseCase extends BaseEffectUseCase<p> {
@Override
public final Object h(@NotNull final p pVar, @NotNull c<? super InputMap> cVar) {
return com.picsart.effect.core.c.a(pVar.c, new Function1<InputMap, Unit>() {
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0003\u001a\u000e\u0012\u0004\u0012\u00020\u0001\u0012\u0004\u0012\u00020\u00020\u0000H\u008a@"}, d2 = {"", "Lcom/picsart/effect/core/LibInputName;", "Lmyobfuscated/t81/i;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
@d(c = "com.beautify.studio.impl.glow.usecases.nonTestableUseCases.GlowEffectUseCase$getInputs$2$1", f = "GlowEffectUseCase.kt", l = {35}, m = "invokeSuspend")
public static final class AnonymousClass1 extends SuspendLambda implements Function1<c<? super Map<LibInputName, ? extends i>>, Object> {
final Bitmap $initialMask;
final Ref$ObjectRef<Map<LibInputName, i>> $maskInputMap;
int label;
final GlowEffectUseCase this$0;
public AnonymousClass1(Bitmap bitmap, GlowEffectUseCase glowEffectUseCase, Ref$ObjectRef<Map<LibInputName, i>> ref$ObjectRef, c<? super AnonymousClass1> cVar) {
super(1, cVar);
this.$initialMask = bitmap;
this.this$0 = glowEffectUseCase;
this.$maskInputMap = ref$ObjectRef;
}
@Override
@NotNull
public final c<Unit> create(@NotNull c<?> cVar) {
return new AnonymousClass1(this.$initialMask, this.this$0, this.$maskInputMap, cVar);
}
@Override
public final Object invoke(c<? super Map<LibInputName, ? extends i>> cVar) {
return ((AnonymousClass1) create(cVar)).invokeSuspend(Unit.a);
}
@Override
public final Object invokeSuspend(@NotNull Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
int i = this.label;
if (i == 0) {
myobfuscated.ik2.i.b(obj);
final ImageBuffer8 imageBuffer8 = new ImageBuffer8(this.$initialMask);
q qVar = this.this$0.e;
final Ref$ObjectRef<Map<LibInputName, i>> ref$ObjectRef = this.$maskInputMap;
Function1<RXSession, Map<LibInputName, ? extends i>> function1 = new Function1<RXSession, Map<LibInputName, ? extends i>>() {
{
super(1);
}
@Override
@NotNull
public final Map<LibInputName, i> invoke(@NotNull RXSession it) {
Intrinsics.checkNotNullParameter(it, "it");
i i2 = e.i(ImageBuffer8.this, null, 6);
ref$ObjectRef.element = e0.d(new Pair(LibInputName.INPUT_MASK, i2));
return ref$ObjectRef.element;
}
};
this.label = 1;
obj = qVar.a(null, function1, this);
if (obj == coroutineSingletons) {
return coroutineSingletons;
}
} else if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
} else {
myobfuscated.ik2.i.b(obj);
}
return obj;
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0000\u0010\u0003\u001a\u0012\u0012\u0004\u0012\u00020\u0001\u0012\b\u0012\u0006\u0012\u0002\b\u00030\u00020\u0000H\u008a@"}, d2 = {"", "", "Lmyobfuscated/vq0/g0;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
@d(c = "com.beautify.studio.impl.glow.usecases.nonTestableUseCases.GlowEffectUseCase$getInputs$2$2", f = "GlowEffectUseCase.kt", l = {}, m = "invokeSuspend")
public static final class AnonymousClass2 extends SuspendLambda implements Function1<c<? super Map<String, ? extends g0<?>>>, Object> {
final Bitmap $initialMask;
final Ref$ObjectRef<Map<LibInputName, i>> $maskInputMap;
int label;
final GlowEffectUseCase this$0;
public AnonymousClass2(Bitmap bitmap, Ref$ObjectRef<Map<LibInputName, i>> ref$ObjectRef, GlowEffectUseCase glowEffectUseCase, c<? super AnonymousClass2> cVar) {
super(1, cVar);
this.$initialMask = bitmap;
this.$maskInputMap = ref$ObjectRef;
this.this$0 = glowEffectUseCase;
}
@Override
@NotNull
public final c<Unit> create(@NotNull c<?> cVar) {
return new AnonymousClass2(this.$initialMask, this.$maskInputMap, this.this$0, cVar);
}
@Override
public final Object invoke(c<? super Map<String, ? extends g0<?>>> cVar) {
return ((AnonymousClass2) create(cVar)).invokeSuspend(Unit.a);
}
@Override
public final Object invokeSuspend(@NotNull Object obj) {
CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
if (this.label == 0) {
myobfuscated.ik2.i.b(obj);
Bitmap bitmap = this.$initialMask;
if (bitmap != null) {
Ref$ObjectRef<Map<LibInputName, i>> ref$ObjectRef = this.$maskInputMap;
GlowEffectUseCase glowEffectUseCase = this.this$0;
Set<Map.Entry<LibInputName, i>> entrySet = ref$ObjectRef.element.entrySet();
int c = e0.c(myobfuscated.jk2.p.n(entrySet, 10));
if (c < 16) {
c = 16;
}
LinkedHashMap linkedHashMap = new LinkedHashMap(c);
Iterator<T> it = entrySet.iterator();
while (it.hasNext()) {
Map.Entry entry = (Map.Entry) it.next();
Pair pair = new Pair(((LibInputName) entry.getKey()).getKey(), new u((i) entry.getValue(), glowEffectUseCase.e, bitmap));
linkedHashMap.put(pair.getFirst(), pair.getSecond());
}
return linkedHashMap;
}
return kotlin.collections.d.f();
}
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
}
{
super(1);
}
@Override
public Unit invoke(InputMap inputMap) {
invoke2(inputMap);
return Unit.a;
}
public final void invoke2(@NotNull InputMap inputMap) {
Intrinsics.checkNotNullParameter(inputMap, "$this$inputMap");
Ref$ObjectRef ref$ObjectRef = new Ref$ObjectRef();
ref$ObjectRef.element = kotlin.collections.d.f();
Bitmap createBitmap = Bitmap.createBitmap(p.this.d.getWidth(), p.this.d.getHeight(), Bitmap.Config.ALPHA_8);
createBitmap.eraseColor(-1);
AnonymousClass1 anonymousClass1 = new AnonymousClass1(createBitmap, this, ref$ObjectRef, null);
inputMap.getClass();
Intrinsics.checkNotNullParameter(anonymousClass1, "<set-?>");
inputMap.c = anonymousClass1;
AnonymousClass2 anonymousClass2 = new AnonymousClass2(createBitmap, ref$ObjectRef, this, null);
Intrinsics.checkNotNullParameter(anonymousClass2, "<set-?>");
inputMap.d = anonymousClass2;
}
});
}
@Override
@NotNull
public final String o(@NotNull String jsonName) {
Intrinsics.checkNotNullParameter(jsonName, "jsonName");
this.k.getClass();
return e.j("https://effres.picsart.com/", t.a(), "beautify/effects/", this.f.a(jsonName), ".json");
}
}