* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
211 lines
18 KiB
Java
211 lines
18 KiB
Java
package kotlin.collections;
|
|
|
|
import android.R;
|
|
import com.google.android.gms.ads.RequestConfiguration;
|
|
import java.util.Iterator;
|
|
import java.util.LinkedHashMap;
|
|
import java.util.Map;
|
|
import kotlin.Metadata;
|
|
import kotlin.SinceKotlin;
|
|
import kotlin.jvm.functions.Function2;
|
|
import kotlin.jvm.functions.Function3;
|
|
import kotlin.jvm.functions.Function4;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
@Metadata(d1 = {"\u0000@\n\u0000\n\u0002\u0010$\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010%\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\b\n\u0002\b\u0002\u001a\u009e\u0001\u0010\u0000\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\u0001\"\u0004\b\u0000\u0010\u0004\"\u0004\b\u0001\u0010\u0002\"\u0004\b\u0002\u0010\u0003*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u00052b\u0010\u0006\u001a^\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\n\u0012\u0015\u0012\u0013\u0018\u0001H\u0003¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000b\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0013\u0012\u00110\r¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000e\u0012\u0004\u0012\u0002H\u00030\u0007H\u0087\bø\u0001\u0000\u001a·\u0001\u0010\u000f\u001a\u0002H\u0010\"\u0004\b\u0000\u0010\u0004\"\u0004\b\u0001\u0010\u0002\"\u0004\b\u0002\u0010\u0003\"\u0016\b\u0003\u0010\u0010*\u0010\u0012\u0006\b\u0000\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\u0011*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u00052\u0006\u0010\u0012\u001a\u0002H\u00102b\u0010\u0006\u001a^\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\n\u0012\u0015\u0012\u0013\u0018\u0001H\u0003¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000b\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0013\u0012\u00110\r¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000e\u0012\u0004\u0012\u0002H\u00030\u0007H\u0087\bø\u0001\u0000¢\u0006\u0002\u0010\u0013\u001a¿\u0001\u0010\u0014\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\u0001\"\u0004\b\u0000\u0010\u0004\"\u0004\b\u0001\u0010\u0002\"\u0004\b\u0002\u0010\u0003*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u000526\u0010\u0015\u001a2\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\n\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0004\u0012\u0002H\u00030\u00162K\u0010\u0006\u001aG\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\n\u0012\u0013\u0012\u0011H\u0003¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000b\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0004\u0012\u0002H\u00030\u0017H\u0087\bø\u0001\u0000\u001aØ\u0001\u0010\u0018\u001a\u0002H\u0010\"\u0004\b\u0000\u0010\u0004\"\u0004\b\u0001\u0010\u0002\"\u0004\b\u0002\u0010\u0003\"\u0016\b\u0003\u0010\u0010*\u0010\u0012\u0006\b\u0000\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\u0011*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u00052\u0006\u0010\u0012\u001a\u0002H\u001026\u0010\u0015\u001a2\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\n\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0004\u0012\u0002H\u00030\u00162K\u0010\u0006\u001aG\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\n\u0012\u0013\u0012\u0011H\u0003¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000b\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0004\u0012\u0002H\u00030\u0017H\u0087\bø\u0001\u0000¢\u0006\u0002\u0010\u0019\u001a\u007f\u0010\u0014\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\u0001\"\u0004\b\u0000\u0010\u0004\"\u0004\b\u0001\u0010\u0002\"\u0004\b\u0002\u0010\u0003*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u00052\u0006\u0010\u001a\u001a\u0002H\u000326\u0010\u0006\u001a2\u0012\u0013\u0012\u0011H\u0003¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000b\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0004\u0012\u0002H\u00030\u0016H\u0087\bø\u0001\u0000¢\u0006\u0002\u0010\u001b\u001a\u0093\u0001\u0010\u0018\u001a\u0002H\u0010\"\u0004\b\u0000\u0010\u0004\"\u0004\b\u0001\u0010\u0002\"\u0004\b\u0002\u0010\u0003\"\u0016\b\u0003\u0010\u0010*\u0010\u0012\u0006\b\u0000\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u00030\u0011*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u00052\u0006\u0010\u0012\u001a\u0002H\u00102\u0006\u0010\u001a\u001a\u0002H\u000326\u0010\u0006\u001a2\u0012\u0013\u0012\u0011H\u0003¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000b\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0004\u0012\u0002H\u00030\u0016H\u0087\bø\u0001\u0000¢\u0006\u0002\u0010\u001c\u001a\u008b\u0001\u0010\u001d\u001a\u000e\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u001e0\u0001\"\u0004\b\u0000\u0010\u001e\"\b\b\u0001\u0010\u0004*\u0002H\u001e\"\u0004\b\u0002\u0010\u0002*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u00052K\u0010\u0006\u001aG\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\n\u0012\u0013\u0012\u0011H\u001e¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000b\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0004\u0012\u0002H\u001e0\u0017H\u0087\bø\u0001\u0000\u001a¤\u0001\u0010\u001f\u001a\u0002H\u0010\"\u0004\b\u0000\u0010\u001e\"\b\b\u0001\u0010\u0004*\u0002H\u001e\"\u0004\b\u0002\u0010\u0002\"\u0016\b\u0003\u0010\u0010*\u0010\u0012\u0006\b\u0000\u0012\u0002H\u0002\u0012\u0004\u0012\u0002H\u001e0\u0011*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u00052\u0006\u0010\u0012\u001a\u0002H\u00102K\u0010\u0006\u001aG\u0012\u0013\u0012\u0011H\u0002¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\n\u0012\u0013\u0012\u0011H\u001e¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\u000b\u0012\u0013\u0012\u0011H\u0004¢\u0006\f\b\b\u0012\b\b\t\u0012\u0004\b\b(\f\u0012\u0004\u0012\u0002H\u001e0\u0017H\u0087\bø\u0001\u0000¢\u0006\u0002\u0010 \u001aI\u0010!\u001a\u0002H\u0010\"\u0004\b\u0000\u0010\u0004\"\u0004\b\u0001\u0010\u0002\"\u0016\b\u0002\u0010\u0010*\u0010\u0012\u0006\b\u0000\u0012\u0002H\u0002\u0012\u0004\u0012\u00020\"0\u0011*\u000e\u0012\u0004\u0012\u0002H\u0004\u0012\u0004\u0012\u0002H\u00020\u00052\u0006\u0010\u0012\u001a\u0002H\u0010H\u0007¢\u0006\u0002\u0010#\u0082\u0002\u0007\n\u0005\b\u009920\u0001¨\u0006$"}, d2 = {"aggregate", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "K", "R", RequestConfiguration.MAX_AD_CONTENT_RATING_T, "Lkotlin/collections/Grouping;", "operation", "Lkotlin/Function4;", "Lkotlin/ParameterName;", "name", "key", "accumulator", "element", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "first", "aggregateTo", "M", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "destination", "(Lkotlin/collections/Grouping;Ljava/util/Map;Lkotlin/jvm/functions/Function4;)Ljava/util/Map;", "fold", "initialValueSelector", "Lkotlin/Function2;", "Lkotlin/Function3;", "foldTo", "(Lkotlin/collections/Grouping;Ljava/util/Map;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function3;)Ljava/util/Map;", "initialValue", "(Lkotlin/collections/Grouping;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/util/Map;", "(Lkotlin/collections/Grouping;Ljava/util/Map;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/util/Map;", "reduce", "S", "reduceTo", "(Lkotlin/collections/Grouping;Ljava/util/Map;Lkotlin/jvm/functions/Function3;)Ljava/util/Map;", "eachCountTo", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "(Lkotlin/collections/Grouping;Ljava/util/Map;)Ljava/util/Map;", "kotlin-stdlib"}, k = 5, mv = {2, 2, 0}, xi = 49, xs = "kotlin/collections/GroupingKt")
|
|
@SourceDebugExtension({"SMAP\nGrouping.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Grouping.kt\nkotlin/collections/GroupingKt__GroupingKt\n*L\n1#1,291:1\n80#1,6:292\n53#1:298\n80#1,6:299\n80#1,6:305\n53#1:311\n80#1,6:312\n80#1,6:318\n53#1:324\n80#1,6:325\n80#1,6:331\n189#1:337\n80#1,6:338\n*S KotlinDebug\n*F\n+ 1 Grouping.kt\nkotlin/collections/GroupingKt__GroupingKt\n*L\n53#1:292,6\n112#1:298\n112#1:299,6\n143#1:305,6\n164#1:311\n164#1:312,6\n189#1:318,6\n211#1:324\n211#1:325,6\n239#1:331,6\n257#1:337\n257#1:338,6\n*E\n"})
|
|
/* loaded from: classes3.dex */
|
|
class GroupingKt__GroupingKt extends GroupingKt__GroupingJVMKt {
|
|
/* JADX WARN: Type inference failed for: r2v1, types: [java.lang.Object] */
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <T, K, R> Map<K, R> aggregate(@NotNull Grouping<T, ? extends K> grouping, @NotNull Function4<? super K, ? super R, ? super T, ? super Boolean, ? extends R> operation) {
|
|
boolean z;
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(operation, "operation");
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
|
Iterator<T> sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
?? next = sourceIterator.next();
|
|
Object keyOf = grouping.keyOf(next);
|
|
R r = (Object) linkedHashMap.get(keyOf);
|
|
if (r == null && !linkedHashMap.containsKey(keyOf)) {
|
|
z = true;
|
|
} else {
|
|
z = false;
|
|
}
|
|
linkedHashMap.put(keyOf, operation.invoke(keyOf, r, next, Boolean.valueOf(z)));
|
|
}
|
|
return linkedHashMap;
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r1v1, types: [java.lang.Object] */
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <T, K, R, M extends Map<? super K, R>> M aggregateTo(@NotNull Grouping<T, ? extends K> grouping, @NotNull M destination, @NotNull Function4<? super K, ? super R, ? super T, ? super Boolean, ? extends R> operation) {
|
|
boolean z;
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
Intrinsics.checkNotNullParameter(operation, "operation");
|
|
Iterator<T> sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
?? next = sourceIterator.next();
|
|
Object keyOf = grouping.keyOf(next);
|
|
R r = (Object) destination.get(keyOf);
|
|
if (r == null && !destination.containsKey(keyOf)) {
|
|
z = true;
|
|
} else {
|
|
z = false;
|
|
}
|
|
destination.put(keyOf, operation.invoke(keyOf, r, next, Boolean.valueOf(z)));
|
|
}
|
|
return destination;
|
|
}
|
|
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <T, K, M extends Map<? super K, Integer>> M eachCountTo(@NotNull Grouping<T, ? extends K> grouping, @NotNull M destination) {
|
|
boolean z;
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
Iterator<T> sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
K keyOf = grouping.keyOf(sourceIterator.next());
|
|
Object obj = destination.get(keyOf);
|
|
if (obj == null && !destination.containsKey(keyOf)) {
|
|
z = true;
|
|
} else {
|
|
z = false;
|
|
}
|
|
if (z) {
|
|
obj = 0;
|
|
}
|
|
destination.put(keyOf, Integer.valueOf(((Number) obj).intValue() + 1));
|
|
}
|
|
return destination;
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r2v1, types: [java.lang.Object] */
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <T, K, R> Map<K, R> fold(@NotNull Grouping<T, ? extends K> grouping, @NotNull Function2<? super K, ? super T, ? extends R> initialValueSelector, @NotNull Function3<? super K, ? super R, ? super T, ? extends R> operation) {
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(initialValueSelector, "initialValueSelector");
|
|
Intrinsics.checkNotNullParameter(operation, "operation");
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
|
Iterator<T> sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
?? next = sourceIterator.next();
|
|
Object keyOf = grouping.keyOf(next);
|
|
R r = (Object) linkedHashMap.get(keyOf);
|
|
if (r == null && !linkedHashMap.containsKey(keyOf)) {
|
|
r = initialValueSelector.invoke(keyOf, next);
|
|
}
|
|
linkedHashMap.put(keyOf, operation.invoke(keyOf, r, next));
|
|
}
|
|
return linkedHashMap;
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r1v1, types: [java.lang.Object] */
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <T, K, R, M extends Map<? super K, R>> M foldTo(@NotNull Grouping<T, ? extends K> grouping, @NotNull M destination, @NotNull Function2<? super K, ? super T, ? extends R> initialValueSelector, @NotNull Function3<? super K, ? super R, ? super T, ? extends R> operation) {
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
Intrinsics.checkNotNullParameter(initialValueSelector, "initialValueSelector");
|
|
Intrinsics.checkNotNullParameter(operation, "operation");
|
|
Iterator<T> sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
?? next = sourceIterator.next();
|
|
Object keyOf = grouping.keyOf(next);
|
|
R r = (Object) destination.get(keyOf);
|
|
if (r == null && !destination.containsKey(keyOf)) {
|
|
r = initialValueSelector.invoke(keyOf, next);
|
|
}
|
|
destination.put(keyOf, operation.invoke(keyOf, r, next));
|
|
}
|
|
return destination;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <S, T extends S, K> Map<K, S> reduce(@NotNull Grouping<T, ? extends K> grouping, @NotNull Function3<? super K, ? super S, ? super T, ? extends S> operation) {
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(operation, "operation");
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
|
Iterator sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
S s = (Object) sourceIterator.next();
|
|
Object keyOf = grouping.keyOf(s);
|
|
R r = (Object) linkedHashMap.get(keyOf);
|
|
if (r != null || linkedHashMap.containsKey(keyOf)) {
|
|
s = operation.invoke(keyOf, r, s);
|
|
}
|
|
linkedHashMap.put(keyOf, s);
|
|
}
|
|
return linkedHashMap;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <S, T extends S, K, M extends Map<? super K, S>> M reduceTo(@NotNull Grouping<T, ? extends K> grouping, @NotNull M destination, @NotNull Function3<? super K, ? super S, ? super T, ? extends S> operation) {
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
Intrinsics.checkNotNullParameter(operation, "operation");
|
|
Iterator sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
S s = (Object) sourceIterator.next();
|
|
Object keyOf = grouping.keyOf(s);
|
|
R r = (Object) destination.get(keyOf);
|
|
if (r != null || destination.containsKey(keyOf)) {
|
|
s = operation.invoke(keyOf, r, s);
|
|
}
|
|
destination.put(keyOf, s);
|
|
}
|
|
return destination;
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r1v1, types: [java.lang.Object] */
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <T, K, R, M extends Map<? super K, R>> M foldTo(@NotNull Grouping<T, ? extends K> grouping, @NotNull M destination, R r, @NotNull Function2<? super R, ? super T, ? extends R> operation) {
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
Intrinsics.checkNotNullParameter(operation, "operation");
|
|
Iterator<T> sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
?? next = sourceIterator.next();
|
|
K keyOf = grouping.keyOf(next);
|
|
R.anim animVar = (Object) destination.get(keyOf);
|
|
if (animVar == null && !destination.containsKey(keyOf)) {
|
|
animVar = (Object) r;
|
|
}
|
|
destination.put(keyOf, operation.invoke(animVar, next));
|
|
}
|
|
return destination;
|
|
}
|
|
|
|
/* JADX WARN: Type inference failed for: r2v1, types: [java.lang.Object] */
|
|
@SinceKotlin(version = "1.1")
|
|
@NotNull
|
|
public static final <T, K, R> Map<K, R> fold(@NotNull Grouping<T, ? extends K> grouping, R r, @NotNull Function2<? super R, ? super T, ? extends R> operation) {
|
|
Intrinsics.checkNotNullParameter(grouping, "<this>");
|
|
Intrinsics.checkNotNullParameter(operation, "operation");
|
|
LinkedHashMap linkedHashMap = new LinkedHashMap();
|
|
Iterator<T> sourceIterator = grouping.sourceIterator();
|
|
while (sourceIterator.hasNext()) {
|
|
?? next = sourceIterator.next();
|
|
K keyOf = grouping.keyOf(next);
|
|
R.anim animVar = (Object) linkedHashMap.get(keyOf);
|
|
if (animVar == null && !linkedHashMap.containsKey(keyOf)) {
|
|
animVar = (Object) r;
|
|
}
|
|
linkedHashMap.put(keyOf, operation.invoke(animVar, next));
|
|
}
|
|
return linkedHashMap;
|
|
}
|
|
}
|