Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 n.java 源代码,内容仅作参考
package myobfuscated.ul;
import android.app.Activity;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.text.TextUtils;
import com.amazon.device.ads.DtbConstants;
import com.appsflyer.AppsFlyerProperties;
import com.facebook.imagepipeline.request.ImageRequest;
import com.google.gson.JsonSyntaxException;
import com.picsart.analytics.event.AnalyticsEvent;
import com.picsart.koin.PAKoinHolder;
import com.picsart.logger.PALog;
import com.picsart.nux.domain.entity.ActionSheetTab;
import com.picsart.picore.RXGraph.Factory;
import com.picsart.picore.runtime.Device;
import com.picsart.picore.runtime.RType;
import com.picsart.picore.x.RXNode;
import com.picsart.picore.x.RXValueImpl;
import com.picsart.picore.x.value.virtual.RXVirtualImageARGB8;
import com.picsart.picore.x.value.virtual.RXVirtualImageRGBA8;
import com.picsart.studio.R;
import com.picsart.studio.apiv3.ChannelsEnum;
import com.picsart.studio.apiv3.model.InviteUser;
import com.picsart.studio.common.EditingData;
import com.picsart.studio.common.constants.EventParam;
import com.picsart.studio.common.constants.SourceParam;
import com.picsart.studio.editor.tools.addobjects.shape.ShapeViewData;
import com.picsart.studio.share.UserInvitationAPI;
import java.io.File;
import java.io.InputStream;
import java.io.PrintStream;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.UUID;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import kotlin.collections.EmptyList;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
import myobfuscated.g1.u0;
import myobfuscated.l2.j;
import myobfuscated.yo2.f0;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class n implements h, myobfuscated.af1.a, myobfuscated.gl.b, myobfuscated.ma.e, myobfuscated.mg.g, myobfuscated.yr.s, myobfuscated.o6.b, myobfuscated.qt.k, myobfuscated.sr0.b, myobfuscated.zq0.c {
public static n a;
public static Function1 b;
public static boolean c;
public static n d;
public static int e;
public static AnalyticsEvent A(String str, myobfuscated.tl1.c cVar) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("remix_upload");
analyticsEvent.b(str, EventParam.BU_REFERRER.getName());
analyticsEvent.b(cVar.u, EventParam.SHARE_SID.getName());
analyticsEvent.b(cVar.f, EventParam.DESTINATION.getName());
analyticsEvent.b(String.valueOf(cVar.b), EventParam.OBJECT_ID.getName());
analyticsEvent.b(Boolean.valueOf(cVar.t), EventParam.IS_STICKER.getName());
analyticsEvent.b(cVar.l, EventParam.EDITOR_SID.getName());
if (SourceParam.PICSART.getName().equals(cVar.f)) {
analyticsEvent.b(Boolean.valueOf(cVar.p), EventParam.IS_PRIVATE.getName());
}
if (cVar.a != null) {
analyticsEvent.b(cVar.a.b, EventParam.REMIX_ENTRY_POINT.getValue());
analyticsEvent.b(new JSONArray((Collection) cVar.a.a), EventParam.EDITOR_REMIX_DATA.getValue());
}
analyticsEvent.b(cVar.a(), EventParam.MENTIONED_USERS.getName());
return analyticsEvent;
}
public static AnalyticsEvent B(myobfuscated.tl1.c cVar) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("sticker_upload");
analyticsEvent.b(cVar.l, EventParam.EDITOR_SID.getName());
analyticsEvent.b(cVar.h, EventParam.SOURCE.getName());
analyticsEvent.b(Boolean.valueOf(cVar.n), EventParam.IS_REMIX.getName());
analyticsEvent.b(cVar.m, EventParam.SIZE.getName());
analyticsEvent.b(cVar.w, EventParam.SOURCE_APP_PACKAGE.getName());
analyticsEvent.b(String.valueOf(cVar.b), EventParam.STICKER_ID.getName());
analyticsEvent.b(cVar.j, EventParam.STICKER_ORIGIN.getName());
analyticsEvent.b(cVar.e, EventParam.TAGS.getName());
analyticsEvent.b(cVar.d, EventParam.TITLE.getName());
analyticsEvent.b(Boolean.FALSE, EventParam.IS_DIRECT.getName());
analyticsEvent.b(cVar.g, EventParam.FORMAT.getName());
analyticsEvent.b(cVar.k, EventParam.CAMERA_SID.getName());
if (SourceParam.PICSART.getName().equals(cVar.f)) {
analyticsEvent.b(Boolean.valueOf(cVar.p), EventParam.IS_PRIVATE.getName());
}
analyticsEvent.b(cVar.f, EventParam.DESTINATION.getName());
if (!TextUtils.isEmpty(cVar.y)) {
analyticsEvent.b(cVar.y, EventParam.TOOLS_USED.getName());
}
analyticsEvent.b(cVar.u, EventParam.SHARE_SID.getName());
analyticsEvent.b(cVar.a(), EventParam.MENTIONED_USERS.getName());
return analyticsEvent;
}
public static final void C(androidx.compose.ui.text.c cVar, myobfuscated.g1.v vVar, myobfuscated.g1.t tVar, float f, u0 u0Var, myobfuscated.k2.h hVar, myobfuscated.i1.h hVar2, int i) {
ArrayList arrayList = cVar.h;
int size = arrayList.size();
for (int i2 = 0; i2 < size; i2++) {
myobfuscated.z1.c cVar2 = (myobfuscated.z1.c) arrayList.get(i2);
cVar2.a.h(vVar, tVar, f, u0Var, hVar, hVar2, i);
vVar.a(0.0f, cVar2.a.getHeight());
}
}
public static void D(myobfuscated.iv.l lVar, myobfuscated.iv.j jVar) {
int i;
myobfuscated.jv.b bVar = null;
while (!lVar.m() && (bVar = lVar.h()) != null && (i = jVar.c) > 0) {
bVar.b(lVar, jVar);
if (i == jVar.c && bVar == lVar.h() && !lVar.m()) {
PrintStream printStream = System.out;
printStream.println("handler: " + bVar);
jVar.l();
throw new RuntimeException("mDataHandler failed to consume data, yet remains the mDataHandler.");
}
}
if (jVar.c == 0 || lVar.m()) {
return;
}
PrintStream printStream2 = System.out;
printStream2.println("handler: " + bVar);
printStream2.println("emitter: " + lVar);
jVar.l();
}
public static void E() {
int i = e;
if (i > 0) {
e = i - 1;
}
}
public static final boolean F(int i, int i2) {
return i == i2;
}
public static void G(androidx.fragment.app.h hVar, String str, ChannelsEnum channelsEnum, String str2, String str3, String str4, String str5, InviteUser inviteUser, myobfuscated.h02.f fVar) {
if (hVar == null) {
return;
}
if (!myobfuscated.ud0.o.a(hVar)) {
fVar.a();
return;
}
myobfuscated.ot.g gVar = new myobfuscated.ot.g();
myobfuscated.ot.g gVar2 = new myobfuscated.ot.g();
gVar.u("invite_flow_version", str5);
gVar.u(AppsFlyerProperties.CHANNEL, channelsEnum.getName());
gVar.u("android_url", channelsEnum.getUrlAndroid());
gVar.u("ios_url", channelsEnum.getUrlIos());
gVar.u("app_name", hVar.getString(R.string.app_full_name));
gVar.u("from_source", str);
gVar.u("invite_flow_sid", str4);
gVar.u("source", DtbConstants.NATIVE_OS_NAME);
gVar.u("inviter_id", str3);
gVar2.u("type", channelsEnum.getType());
if (channelsEnum.getName().equals(ChannelsEnum.MESSENGER.getName())) {
gVar2.u("og_image_url", "https://cdn152.picsart.com/228059148046900.png");
}
if (inviteUser != null) {
if (!TextUtils.isEmpty(inviteUser.getInvateeName())) {
gVar2.u("invitee_name", inviteUser.getInvateeName());
}
if (!TextUtils.isEmpty(inviteUser.getEmail())) {
gVar2.u("invitee_email", inviteUser.getInvateeName());
}
if (!TextUtils.isEmpty(inviteUser.getPhone())) {
gVar2.u("invitee_phone", inviteUser.getPhone());
}
if (!TextUtils.isEmpty(inviteUser.getPhotoId())) {
gVar2.u("photo_id", inviteUser.getPhotoId());
}
}
gVar.r(gVar2, "invite_data");
try {
((UserInvitationAPI) ((myobfuscated.z31.d) PAKoinHolder.a(hVar, myobfuscated.z31.d.class)).b(UserInvitationAPI.class, myobfuscated.z31.b.a)).userInvitation(gVar).enqueue(new myobfuscated.e32.g(fVar, str2));
} catch (Exception unused) {
fVar.a();
}
}
public static synchronized n J() {
n nVar;
synchronized (n.class) {
try {
if (a == null) {
a = new Object();
}
nVar = a;
} catch (Throwable th) {
throw th;
}
}
return nVar;
}
public static n K() {
if (d == null) {
d = new Object();
}
return d;
}
public static final boolean M(myobfuscated.fu1.a aVar) {
return myobfuscated.an2.r.K(Boolean.valueOf(aVar.d && aVar.g));
}
public static boolean N() {
String str = Build.MANUFACTURER;
Locale locale = Locale.ENGLISH;
return str.toLowerCase(locale).equals("lge") || str.toLowerCase(locale).equals("samsung");
}
public static final boolean O(ShapeViewData shapeViewData) {
Boolean bool;
if (shapeViewData != null) {
bool = Boolean.valueOf(shapeViewData.e.size() > 1);
} else {
bool = null;
}
return myobfuscated.an2.r.K(bool);
}
public static String P(String str, Object... objArr) {
int indexOf;
String sb;
int i = 0;
for (int i2 = 0; i2 < objArr.length; i2++) {
Object obj = objArr[i2];
try {
sb = String.valueOf(obj);
} catch (Exception e2) {
String str2 = obj.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(obj));
Logger.getLogger("com.google.common.base.Strings").log(Level.WARNING, "Exception during lenientFormat for " + str2, (Throwable) e2);
StringBuilder t = defpackage.d.t("<", str2, " threw ");
t.append(e2.getClass().getName());
t.append(">");
sb = t.toString();
}
objArr[i2] = sb;
}
StringBuilder sb2 = new StringBuilder((objArr.length * 16) + str.length());
int i3 = 0;
while (i < objArr.length && (indexOf = str.indexOf("%s", i3)) != -1) {
sb2.append((CharSequence) str, i3, indexOf);
sb2.append(objArr[i]);
i3 = indexOf + 2;
i++;
}
sb2.append((CharSequence) str, i3, str.length());
if (i < objArr.length) {
sb2.append(" [");
sb2.append(objArr[i]);
for (int i4 = i + 1; i4 < objArr.length; i4++) {
sb2.append(", ");
sb2.append(objArr[i4]);
}
sb2.append(']');
}
return sb2.toString();
}
public static final myobfuscated.w41.a Q(myobfuscated.z41.a aVar) {
?? r5;
String str;
ActionSheetTab actionSheetTab;
String str2;
List<String> b2 = aVar.b();
int i = 0;
ActionSheetTab actionSheetTab2 = null;
if (b2 != null) {
List<String> list = b2;
r5 = new ArrayList(myobfuscated.jk2.p.n(list, 10));
for (String str3 : list) {
ActionSheetTab actionSheetTab3 = ActionSheetTab.NONE;
ActionSheetTab[] values = ActionSheetTab.values();
int length = values.length;
int i2 = 0;
while (true) {
if (i2 >= length) {
actionSheetTab = null;
break;
}
actionSheetTab = values[i2];
String name = actionSheetTab.name();
if (str3 != null) {
Locale locale = Locale.ROOT;
str2 = myobfuscated.xq0.b.b(locale, "ROOT", str3, locale, "toUpperCase(...)");
} else {
str2 = null;
}
if (Intrinsics.c(name, str2)) {
break;
}
i2++;
}
if (actionSheetTab != null) {
actionSheetTab3 = actionSheetTab;
}
r5.add(actionSheetTab3);
}
} else {
r5 = 0;
}
if (r5 == 0) {
r5 = EmptyList.INSTANCE;
}
String a2 = aVar.a();
ActionSheetTab actionSheetTab4 = ActionSheetTab.NONE;
ActionSheetTab[] values2 = ActionSheetTab.values();
int length2 = values2.length;
while (true) {
if (i >= length2) {
break;
}
ActionSheetTab actionSheetTab5 = values2[i];
String name2 = actionSheetTab5.name();
if (a2 != null) {
Locale locale2 = Locale.ROOT;
str = myobfuscated.xq0.b.b(locale2, "ROOT", a2, locale2, "toUpperCase(...)");
} else {
str = null;
}
if (Intrinsics.c(name2, str)) {
actionSheetTab2 = actionSheetTab5;
break;
}
i++;
}
if (actionSheetTab2 != null) {
actionSheetTab4 = actionSheetTab2;
}
return new myobfuscated.w41.a(r5, actionSheetTab4, myobfuscated.an2.r.L(aVar.c()));
}
public static int R(String str) {
if (str == null || str.length() == 0) {
return -1;
}
if (str.charAt(0) != '#') {
str = "#".concat(str);
}
try {
return Color.parseColor(str);
} catch (Exception e2) {
PALog.h(e2);
return -1;
}
}
public static String S(InputStream inputStream) {
Charset charset = Charsets.UTF_8;
Intrinsics.checkNotNullParameter(inputStream, "<this>");
Intrinsics.checkNotNullParameter(charset, "charset");
try {
f0 c2 = myobfuscated.yo2.y.c(myobfuscated.yo2.y.j(inputStream));
String p0 = c2.p0(charset);
myobfuscated.sr.e.s(c2, null);
myobfuscated.sr.e.s(inputStream, null);
return p0;
} finally {
}
}
public static boolean T(myobfuscated.rf.f fVar, long j, long j2, long j3, long j4, long j5) {
long j6 = j - j5;
long j7 = j + j5;
long j8 = j3;
while (j8 < j6 && j2 - j8 >= j4) {
long j9 = j8 + j4;
if (j9 >= j6 && j6 - j8 < j9 - j6) {
break;
}
int i = fVar.o - 1;
byte[] bArr = fVar.n;
bArr[i] = (byte) (bArr[i] - 1);
j8 = j9;
}
if (j8 < j7 && j2 - j8 >= j4) {
long j10 = j8 + j4;
if (j10 < j7 || j7 - j8 > j10 - j7) {
return false;
}
}
return 2 * j5 <= j8 && j8 <= j2 - (4 * j5);
}
public static String U(kotlinx.serialization.json.b bVar) {
Intrinsics.checkNotNullParameter(bVar, "<this>");
Intrinsics.checkNotNullParameter(" ", "indent");
return com.facebook.datasource.f.L(new myobfuscated.fa1.b(bVar, 0, " "));
}
public static final double V(long j) {
return ((j >>> 11) * 2048) + (j & 2047);
}
public static void W(myobfuscated.iv.h hVar, byte[] bArr, myobfuscated.jv.a aVar) {
ByteBuffer h = myobfuscated.iv.j.h(bArr.length);
h.put(bArr);
h.flip();
myobfuscated.iv.j jVar = new myobfuscated.iv.j();
jVar.a(h);
myobfuscated.iv.u uVar = new myobfuscated.iv.u(hVar, jVar, aVar);
hVar.d(uVar);
uVar.f();
}
public static myobfuscated.u81.b l(myobfuscated.u81.f _0, myobfuscated.u81.f fVar, myobfuscated.u81.f fVar2, myobfuscated.t81.h hVar, int i) {
String[] strArr;
ArrayList arrayList;
if ((i & 2) != 0) {
fVar = null;
}
if ((i & 4) != 0) {
fVar2 = null;
}
if ((i & 8) != 0) {
hVar = null;
}
Device device = (i & 16384) != 0 ? Device.Unspecified : null;
Intrinsics.checkNotNullParameter(_0, "_0");
Intrinsics.checkNotNullParameter(device, "device");
String[] strArr2 = new String[13];
ArrayList arrayList2 = new ArrayList(13);
for (int i2 = 0; i2 < 13; i2++) {
arrayList2.add(null);
}
strArr2[0] = "0";
arrayList2.set(0, _0);
int i3 = 1;
if (fVar != null) {
strArr2[1] = "1";
arrayList2.set(1, fVar);
i3 = 2;
}
if (fVar2 != null) {
strArr2[i3] = "2";
arrayList2.set(i3, fVar2);
i3++;
}
if (hVar != null) {
strArr2[i3] = "3";
arrayList2.set(i3, hVar);
i3++;
}
if (i3 != 13) {
Object[] copyOf = Arrays.copyOf(strArr2, i3);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
arrayList = arrayList2.subList(0, i3);
strArr = (String[]) copyOf;
} else {
strArr = strArr2;
arrayList = arrayList2;
}
RXNode a2 = Factory.a(RXNode.X0(myobfuscated.b02.b.C()[2]), "BufferFrom", 6340248591284529928L, strArr, arrayList, device);
Intrinsics.checkNotNullExpressionValue(a2, "node(genName, \"BufferFro…putNames, inputs, device)");
RXValueImpl L0 = a2.L0("output", RType.Buffer_Float);
Intrinsics.checkNotNullExpressionValue(L0, "node.outputValue(\"output\", RType.Buffer_Float)");
return L0;
}
public static RXVirtualImageARGB8 m(RXVirtualImageRGBA8 image) {
Device device = Device.Unspecified;
Intrinsics.checkNotNullParameter(image, "image");
Intrinsics.checkNotNullParameter(device, "device");
String[] strArr = new String[2];
ArrayList arrayList = new ArrayList(2);
for (int i = 0; i < 2; i++) {
arrayList.add(null);
}
strArr[0] = "image";
arrayList.set(0, image);
Object[] copyOf = Arrays.copyOf(strArr, 1);
Intrinsics.checkNotNullExpressionValue(copyOf, "copyOf(this, newSize)");
RXNode a2 = Factory.a(RXNode.X0(myobfuscated.b02.b.C()[2]), "ConvertToARGB", 4417080418566882007L, (String[]) copyOf, arrayList.subList(0, 1), device);
Intrinsics.checkNotNullExpressionValue(a2, "node(genName, \"ConvertTo…putNames, inputs, device)");
RXValueImpl L0 = a2.L0("output", RType.Image_ARGB_8888);
Intrinsics.checkNotNullExpressionValue(L0, "node.outputValue(\"output\", RType.Image_ARGB_8888)");
return L0;
}
public static final long n(float f, float f2) {
long floatToIntBits = (Float.floatToIntBits(f2) & 4294967295L) | (Float.floatToIntBits(f) << 32);
int i = myobfuscated.f1.a.b;
return floatToIntBits;
}
public static final long o(int i, int i2) {
long j = (i2 & 4294967295L) | (i << 32);
j.a aVar = myobfuscated.l2.j.b;
return j;
}
public static final long p(int i) {
long j = (i << 32) | (0 & 4294967295L);
int i2 = myobfuscated.o1.a.l;
return j;
}
public static myobfuscated.yg.a q(JSONObject jSONObject) {
JSONObject optJSONObject;
JSONArray optJSONArray;
String str = "";
boolean z = true;
try {
if (jSONObject.has("data") && (optJSONObject = jSONObject.optJSONObject("data")) != null) {
String optString = optJSONObject.optString("igniteVersion", "");
try {
if (optJSONObject.has("features") && (optJSONArray = optJSONObject.optJSONArray("features")) != null) {
for (int length = optJSONArray.length() - 1; length >= 0; length--) {
JSONObject optJSONObject2 = optJSONArray.optJSONObject(length);
if (optJSONObject2.has("type") && "GET_PROPERTY".equalsIgnoreCase(optJSONObject2.optString("type", ""))) {
str = optString;
break;
}
}
}
str = optString;
} catch (Exception e2) {
e = e2;
str = optString;
myobfuscated.dh.b.b("IgniteVersionParser: exception on parse: %s", e.getMessage());
z = false;
return new myobfuscated.yg.a(str, z);
}
}
} catch (Exception e3) {
e = e3;
}
z = false;
return new myobfuscated.yg.a(str, z);
}
public static final int r(float f) {
return myobfuscated.zk2.c.b((float) Math.ceil(f));
}
public static AnalyticsEvent s(myobfuscated.an1.e eVar) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("challenge_action");
if (!TextUtils.isEmpty(eVar.e)) {
analyticsEvent.b(eVar.e, EventParam.ACTION.getName());
}
if (!TextUtils.isEmpty(eVar.b)) {
analyticsEvent.b(eVar.b, EventParam.CARD_TYPE.getName());
}
if (eVar.a >= 0) {
analyticsEvent.b(Integer.valueOf(eVar.a), EventParam.CHALLENGE_POSITION.getName());
}
if (!TextUtils.isEmpty(eVar.c)) {
analyticsEvent.b(eVar.c, EventParam.CHALLENGE_ID.getName());
}
if (!TextUtils.isEmpty(eVar.d)) {
analyticsEvent.b(eVar.d, EventParam.SOURCE.getName());
}
String str = eVar.f;
if (!TextUtils.isEmpty(str)) {
analyticsEvent.b(str, EventParam.SUBMISSION_ID.getName());
}
return analyticsEvent;
}
public static AnalyticsEvent t(long j, String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("challenge_carousel_page_open");
analyticsEvent.b(str2, EventParam.CHALLENGE_NAME.getName());
analyticsEvent.b(str, EventParam.CHALLENGE_ID.getName());
analyticsEvent.b(str3, EventParam.CONTEST_TYPE.getName());
analyticsEvent.b(String.valueOf(j), EventParam.PHOTO_STRING_ID.getName());
analyticsEvent.b(str6, EventParam.STATE.getName());
analyticsEvent.b(str8, EventParam.DEEP_LINK.getName());
analyticsEvent.b(str5, EventParam.SOURCE.getName());
analyticsEvent.b(str7, EventParam.TYPE.getName());
if (!TextUtils.isEmpty(str4)) {
analyticsEvent.b(str4, EventParam.CREATOR_ID.getName());
}
return analyticsEvent;
}
public static AnalyticsEvent u(String str, String str2, String str3, String str4, String str5, String str6) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("challenge_share_button_click");
analyticsEvent.b(str2, EventParam.CHALLENGE_ID.getName());
analyticsEvent.b(str3, EventParam.CHALLENGE_NAME.getName());
analyticsEvent.b(str6, EventParam.CHALLENGE_TYPE.getName());
analyticsEvent.b(str4, EventParam.STATE.getName());
if (!TextUtils.isEmpty(null)) {
analyticsEvent.b(null, EventParam.IMAGE_ID.getName());
}
if (!TextUtils.isEmpty(str5)) {
analyticsEvent.b(str5, EventParam.CREATOR_ID.getName());
}
if (!TextUtils.isEmpty(str)) {
analyticsEvent.b(str, EventParam.SOURCE.getName());
}
return analyticsEvent;
}
public static AnalyticsEvent v(String str, String str2, String str3, String str4, String str5, String str6, ArrayList arrayList) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("challenge_submissions_view");
analyticsEvent.b(str2, EventParam.CHALLENGE_ID.getName());
analyticsEvent.b(str3, EventParam.CHALLENGE_NAME.getName());
analyticsEvent.b(str5, EventParam.CREATOR_ID.getName());
analyticsEvent.b(str4, EventParam.CHALLENGE_TYPE.getName());
analyticsEvent.b("grid", EventParam.STATE.getName());
if (!TextUtils.isEmpty(str6)) {
analyticsEvent.b(str6, EventParam.STATUS.getName());
}
if (!TextUtils.isEmpty(str)) {
analyticsEvent.b(str, EventParam.SOURCE.getName());
}
analyticsEvent.b(arrayList.toArray(), EventParam.CHALLENGE_ITEMS.getName());
return analyticsEvent;
}
public static AnalyticsEvent w(myobfuscated.an1.k kVar) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("challenge_view");
if (!TextUtils.isEmpty(kVar.b)) {
analyticsEvent.b(kVar.b, EventParam.CARD_TYPE.getName());
}
if (kVar.a >= 0) {
analyticsEvent.b(Integer.valueOf(kVar.a), EventParam.CHALLENGE_POSITION.getName());
}
if (!TextUtils.isEmpty(kVar.c)) {
analyticsEvent.b(kVar.c, EventParam.CHALLENGE_ID.getName());
}
if (!TextUtils.isEmpty(kVar.d)) {
analyticsEvent.b(kVar.d, EventParam.SOURCE.getName());
}
String[] strArr = kVar.e;
if (strArr != null && strArr.length > 0) {
analyticsEvent.b(strArr, EventParam.SUBMISSION_IDS.getName());
}
return analyticsEvent;
}
public static AnalyticsEvent x(String str, String str2, String str3, String str4, boolean z, String str5, String str6, String str7) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("contest_challenge_view");
analyticsEvent.b(str, EventParam.CONTEST_TYPE.getName());
analyticsEvent.b(str2, EventParam.STATE.getName());
analyticsEvent.b(str3, EventParam.CHALLENGE_NAME.getName());
analyticsEvent.b(str4, EventParam.CHALLENGE_ID.getName());
analyticsEvent.b(Boolean.valueOf(z), EventParam.HAS_TUTORIAL.getName());
if (!TextUtils.isEmpty(str5)) {
analyticsEvent.b(str5, EventParam.CREATOR_ID.getName());
}
if (!TextUtils.isEmpty(str6)) {
analyticsEvent.b(str6, EventParam.SOURCE.getName());
}
if (!TextUtils.isEmpty(str7)) {
analyticsEvent.b(str7.toLowerCase(), EventParam.USER_TYPE.getName());
}
return analyticsEvent;
}
public static AnalyticsEvent y(myobfuscated.tl1.c cVar) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("photo_upload");
EditingData editingData = cVar.a;
if (cVar.b > 0) {
analyticsEvent.b(Long.valueOf(cVar.b), EventParam.PHOTO_ID.getName());
}
analyticsEvent.b(cVar.c, EventParam.HASH.getName());
analyticsEvent.b(cVar.d, EventParam.TITLE.getName());
analyticsEvent.b(cVar.e, EventParam.TAGS.getName());
analyticsEvent.b(Integer.valueOf(cVar.q), EventParam.UPLOAD_DURATION.getName());
analyticsEvent.b(Integer.valueOf(cVar.r), EventParam.HEIGHT.getName());
analyticsEvent.b(Integer.valueOf(cVar.s), EventParam.WIDTH.getName());
analyticsEvent.b(UUID.randomUUID().toString(), EventParam.UID.getName());
if (editingData != null) {
analyticsEvent.b(Integer.valueOf(editingData.g), EventParam.LAYERS_USED.getName());
analyticsEvent.b(Integer.valueOf(editingData.i), EventParam.PHOTOS_ADDED.getName());
analyticsEvent.b(!TextUtils.isEmpty(cVar.j) ? cVar.j : !TextUtils.isEmpty(editingData.d) ? editingData.d.toLowerCase() : editingData.d, EventParam.ORIGIN.getName());
analyticsEvent.b(editingData.k(), EventParam.TOTAL_EDITOR_ACTIONS.getName());
analyticsEvent.b(editingData.o(), EventParam.TOOLS_USED.getName());
analyticsEvent.b(Long.valueOf(editingData.e), EventParam.TOTAL_DRAW_TIME.getName());
analyticsEvent.b(Integer.valueOf(editingData.f), EventParam.TOTAL_DRAW_ACTIONS.getName());
analyticsEvent.b(Integer.valueOf(editingData.h), EventParam.BRUSHES_USED.getName());
List<String> fteIds = editingData.m().fteIds();
List<String> premiumIds = editingData.m().premiumIds();
if (!fteIds.isEmpty()) {
analyticsEvent.b(fteIds, EventParam.PARENT_PHOTOS_IDS.getName());
}
if (!premiumIds.isEmpty()) {
analyticsEvent.b(premiumIds, EventParam.USED_PREMIUM_IDS.getName());
}
}
String name = EventParam.FORMAT.getName();
String str = cVar.g;
if (str != null) {
str = str.toLowerCase();
}
analyticsEvent.b(str, name);
analyticsEvent.b(cVar.f, EventParam.DESTINATION.getName());
String name2 = EventParam.SOURCE.getName();
String str2 = cVar.h;
analyticsEvent.b((str2 == null || !cVar.B.contains(str2)) ? SourceParam.OTHER.getName() : cVar.h, name2);
analyticsEvent.b(cVar.i, EventParam.SUBSOURCE.getName());
if (SourceParam.PICSART.getName().equals(cVar.f)) {
analyticsEvent.b(Boolean.valueOf(cVar.p), EventParam.IS_PRIVATE.getName());
}
analyticsEvent.b(Boolean.valueOf(cVar.n), EventParam.IS_REMIX.getName());
if (cVar.x) {
analyticsEvent.b(Boolean.valueOf(cVar.o), EventParam.FREE_TO_EDIT.getName());
String name3 = EventParam.DESCRIPTION.getName();
JSONObject jSONObject = new JSONObject();
try {
String name4 = EventParam.TEXT.getName();
String str3 = cVar.d;
int i = 0;
jSONObject.put(name4, str3 != null ? str3.length() : 0);
String name5 = EventParam.HASHTAGS.getName();
ArrayList a2 = myobfuscated.ud0.c.a(cVar.d, "(?<=#)(?! )([^#]+?)(?= |$|#)");
jSONObject.put(name5, a2 == null ? 0 : a2.size());
String name6 = EventParam.MENTIONS.getName();
ArrayList a3 = myobfuscated.ud0.c.a(cVar.d, "\\s?@(\\w+)\\s?");
if (a3 != null) {
i = a3.size();
}
jSONObject.put(name6, i);
} catch (JSONException e2) {
e2.printStackTrace();
}
analyticsEvent.b(jSONObject, name3);
if (!TextUtils.isEmpty(cVar.w)) {
analyticsEvent.b(cVar.w, EventParam.SOURCE_APP_PACKAGE.getName());
}
}
analyticsEvent.b(cVar.k, EventParam.CAMERA_SID.getName());
analyticsEvent.b(cVar.l, EventParam.EDITOR_SID.getName());
analyticsEvent.b(cVar.m, EventParam.SIZE.getName());
analyticsEvent.b(Boolean.valueOf(cVar.A), EventParam.EVENT_TRACKED.getName());
analyticsEvent.b(Boolean.valueOf(cVar.v), EventParam.FULLSIZE.getName());
analyticsEvent.b(cVar.u, EventParam.SHARE_SID.getName());
analyticsEvent.b(null, EventParam.DATA_TYPE.getName());
analyticsEvent.b(cVar.a(), EventParam.MENTIONED_USERS.getName());
return analyticsEvent;
}
public static AnalyticsEvent z(myobfuscated.tl1.c cVar) {
AnalyticsEvent analyticsEvent = new AnalyticsEvent("picsart_upload");
analyticsEvent.b(Long.valueOf(cVar.b), EventParam.PHOTO_ID.getName());
analyticsEvent.b(Boolean.valueOf(cVar.o), EventParam.FREE_TO_EDIT.getName());
analyticsEvent.b(cVar.g, EventParam.FORMAT.getName());
String name = EventParam.SOURCE.getName();
String str = cVar.h;
analyticsEvent.b((str == null || !cVar.B.contains(str)) ? SourceParam.OTHER.getName() : cVar.h, name);
analyticsEvent.b(cVar.k, EventParam.CAMERA_SID.getName());
analyticsEvent.b(cVar.l, EventParam.EDITOR_SID.getName());
if (cVar.w != null) {
analyticsEvent.b(cVar.w, EventParam.SOURCE_APP_PACKAGE.getName());
}
EventParam eventParam = EventParam.IS_DIRECT;
String name2 = eventParam.getName();
Boolean bool = Boolean.FALSE;
analyticsEvent.b(bool, name2);
if (cVar.x) {
analyticsEvent.b(Boolean.valueOf(cVar.p), EventParam.IS_PRIVATE.getName());
analyticsEvent.b(Boolean.valueOf(cVar.n), EventParam.IS_REMIX.getName());
analyticsEvent.b(cVar.e, EventParam.TAGS.getName());
analyticsEvent.b(cVar.d, EventParam.TITLE.getName());
analyticsEvent.b(bool, EventParam.AUTO_SAVE_OPTION.getName());
analyticsEvent.b(bool, eventParam.getName());
}
analyticsEvent.b(cVar.u, EventParam.SHARE_SID.getName());
analyticsEvent.b(cVar.a(), EventParam.MENTIONED_USERS.getName());
return analyticsEvent;
}
public a H(ImageRequest imageRequest, Object obj) {
return new a(imageRequest.b.toString(), imageRequest.i, imageRequest.j, imageRequest.h, null, null, obj);
}
public myobfuscated.dk.h I(Uri uri) {
return new myobfuscated.dk.h(uri.toString());
}
public a L(ImageRequest imageRequest, Object obj) {
myobfuscated.dk.c cVar;
String str;
myobfuscated.hm.b bVar = imageRequest.r;
if (bVar != null) {
myobfuscated.dk.c b2 = bVar.b();
str = bVar.getClass().getName();
cVar = b2;
} else {
cVar = null;
str = null;
}
return new a(imageRequest.b.toString(), imageRequest.i, imageRequest.j, imageRequest.h, cVar, str, obj);
}
@Override
public boolean a() {
return true;
}
@Override
public void b(ClassLoader classLoader, HashSet hashSet) {
myobfuscated.bo.d.c(classLoader, hashSet, new Object());
}
@Override
public myobfuscated.mk.a c() {
return null;
}
@Override
public void clear() {
}
@Override
public Object construct() {
return new ConcurrentSkipListMap();
}
@Override
public void d(int i, myobfuscated.mk.a aVar) {
}
@Override
public myobfuscated.mk.a e() {
return null;
}
@Override
public boolean f(int i) {
return false;
}
@Override
public boolean g(String param) {
Intrinsics.checkNotNullParameter(param, "param");
try {
myobfuscated.ot.h.c(param);
return true;
} catch (JsonSyntaxException unused) {
return false;
}
}
@Override
public myobfuscated.mk.a h(int i) {
return null;
}
@Override
public void i(Activity activity) {
}
@Override
public boolean j(ClassLoader classLoader, File file, File file2, boolean z) {
return myobfuscated.bo.d.d(classLoader, file, file2, z);
}
@Override
public void k(int i, myobfuscated.mk.a aVar) {
}
@Override
public void shutdown() {
}
}