正在查看: Housing v14.7.8 应用的 i9.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Housing v14.7.8 应用的 i9.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.locon.presentation.ui.viewmodels;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.view.w0;
import coil.disk.c;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.locon.analytics.v;
import com.locon.core.data.local.datastore.Filter;
import com.locon.core.data.local.datastore.FilterAttr;
import com.locon.core.data.local.datastore.FilterAttrBoolean;
import com.locon.core.data.local.datastore.FilterAttrList;
import com.locon.core.data.local.datastore.FilterAttrMinMax;
import com.locon.core.data.local.datastore.FilterStore;
import com.locon.core.data.local.datastore.m;
import com.locon.core.data.local.datastore.n0;
import com.locon.core.data.o0;
import com.locon.core.data.remote.firebase.remoteconfig.filter.schema.FilterSection;
import com.locon.core.data.remote.firebase.remoteconfig.filter.schema.SectionItem;
import com.locon.core.data.sharedmodels.SelectedFilters;
import com.locon.core.data.sharedmodels.SharedCity;
import com.locon.domain.usecases.filters.FetchSearchCountUseCase;
import com.locon.domain.usecases.filters.FiltersUseCase;
import com.locon.home.presentation.ui.viewModels.j0;
import com.locon.presentation.screens.filters.AppliedFilters;
import com.locon.presentation.ui.components.discoverability.k;
import com.locon.presentation.ui.viewmodels.MiniFilterScreenEvents;
import com.quickblox.core.helper.ToStringHelper;
import dagger.hilt.android.lifecycle.HiltViewModel;
import ed.d;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import javax.inject.Inject;
import kotlin.Metadata;
import kotlin.collections.g0;
import kotlin.collections.t;
import kotlin.collections.t0;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.r;
import kotlinx.coroutines.flow.b0;
import kotlinx.coroutines.flow.m1;
import kotlinx.coroutines.flow.p1;
import kotlinx.coroutines.flow.p2;
import kotlinx.coroutines.flow.s2;
import kotlinx.coroutines.flow.w1;
import kotlinx.coroutines.z0;
import org.jetbrains.annotations.NotNull;
import org.jivesoftware.smack.sm.packet.StreamManagement;
import rb.d;
import rb.e;
import sc.d0;
import uq.b;
import zp.q;
import zp.s;
@StabilityInferred(parameters = 0)
@HiltViewModel
@Metadata(d1 = {"\u0000\u008c\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B)\b\u0007\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\u0006\u0010\b\u001a\u00020\u0007\u0012\u0006\u0010\n\u001a\u00020\t¢\u0006\u0004\b\u000b\u0010\fR\u0014\u0010\u0004\u001a\u00020\u00038\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0004\u0010\rR\u0014\u0010\u0006\u001a\u00020\u00058\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0006\u0010\u000eR\u0014\u0010\b\u001a\u00020\u00078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\b\u0010\u000fR\u0014\u0010\n\u001a\u00020\t8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\n\u0010\u0010R\u0016\u0010\u0012\u001a\u00020\u00118\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u0012\u0010\u0013R\u001a\u0010\u0016\u001a\b\u0012\u0004\u0012\u00020\u00150\u00148\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0016\u0010\u0017R&\u0010\u001a\u001a\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020\u0015\u0012\u0004\u0012\u00020\u00190\u00180\u00148\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u001a\u0010\u0017R)\u0010\u001c\u001a\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020\u0015\u0012\u0004\u0012\u00020\u00190\u00180\u001b8\u0006¢\u0006\f\n\u0004\b\u001c\u0010\u001d\u001a\u0004\b\u001e\u0010\u001fR \u0010\"\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020!0 0\u00148\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\"\u0010\u0017R#\u0010#\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020!0 0\u001b8\u0006¢\u0006\f\n\u0004\b#\u0010\u001d\u001a\u0004\b$\u0010\u001fR)\u0010(\u001a\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020&\u0012\u0004\u0012\u00020'0%0\u00148\u0006¢\u0006\f\n\u0004\b(\u0010\u0017\u001a\u0004\b)\u0010*R\u001a\u0010,\u001a\b\u0012\u0004\u0012\u00020+0\u00148\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b,\u0010\u0017R\u001d\u0010-\u001a\b\u0012\u0004\u0012\u00020+0\u001b8\u0006¢\u0006\f\n\u0004\b-\u0010\u001d\u001a\u0004\b.\u0010\u001fR \u00101\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u0002000/0\u00148\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b1\u0010\u0017R#\u00102\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u0002000/0\u001b8\u0006¢\u0006\f\n\u0004\b2\u0010\u001d\u001a\u0004\b3\u0010\u001fR\u0016\u00105\u001a\u0002048\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b5\u00106R\u0014\u00108\u001a\u0002078\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b8\u00109¨\u0006:"}, d2 = {"Lcom/locon/presentation/ui/viewmodels/i9;", "Led/d;", "Lcom/locon/presentation/ui/viewmodels/MiniFilterScreenEvents;", "Lcom/locon/domain/usecases/filters/FetchSearchCountUseCase;", "searchCountUseCase", "Lcom/locon/core/data/local/datastore/m;", "filterDataStore", "Lcom/locon/analytics/v;", "filterAnalytics", "Lcom/locon/domain/usecases/filters/FiltersUseCase;", "filterUseCases", "<init>", "(Lcom/locon/domain/usecases/filters/FetchSearchCountUseCase;Lcom/locon/core/data/local/datastore/m;Lcom/locon/analytics/v;Lcom/locon/domain/usecases/filters/FiltersUseCase;)V", "Lcom/locon/domain/usecases/filters/FetchSearchCountUseCase;", "Lcom/locon/core/data/local/datastore/m;", "Lcom/locon/analytics/v;", "Lcom/locon/domain/usecases/filters/FiltersUseCase;", "", "isFireEvents", "Z", "Lkotlinx/coroutines/flow/w1;", "Lsc/d0;", "selectedServiceType", "Lkotlinx/coroutines/flow/w1;", "Lzp/s;", "Lcom/locon/core/data/local/datastore/Filter;", "_latestFilter", "Lkotlinx/coroutines/flow/p2;", "latestFilter", "Lkotlinx/coroutines/flow/p2;", StreamManagement.AckRequest.ELEMENT, "()Lkotlinx/coroutines/flow/p2;", "", "Lcom/locon/core/data/remote/firebase/remoteconfig/filter/schema/FilterSection;", "_filterSectionList", "filterSectionList", "q", "", "Lrb/e;", "Lcom/locon/core/data/sharedmodels/SelectedFilters;", "selectedFilters", "t", "()Lkotlinx/coroutines/flow/w1;", "", "_searchCount", "searchCount", "s", "Luq/b;", "Lcom/locon/presentation/ui/components/discoverability/k;", "_collections", "collections", "getCollections", "Lcom/locon/presentation/ui/viewmodels/y7;", "filterScreenTypeSelected", "Lcom/locon/presentation/ui/viewmodels/y7;", "Ljava/text/DecimalFormat;", "decimalFormat", "Ljava/text/DecimalFormat;", "presentation_gammaRelease"}, k = 1, mv = {2, 0, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nMiniFilterModalViewModel.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MiniFilterModalViewModel.kt\ncom/locon/presentation/ui/viewmodels/MiniFilterModalViewModel\n+ 2 StateFlow.kt\nkotlinx/coroutines/flow/StateFlowKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 4 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 5 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,1260:1\n230#2,5:1261\n230#2,5:1266\n230#2,3:1271\n233#2,2:1277\n230#2,5:1283\n230#2,5:1357\n230#2,5:1363\n230#2,5:1372\n230#2,5:1377\n230#2,5:1382\n230#2,5:1387\n230#2,5:1392\n774#3:1274\n865#3,2:1275\n1869#3:1279\n1869#3,2:1280\n1870#3:1282\n774#3:1288\n865#3,2:1289\n774#3:1291\n865#3,2:1292\n774#3:1294\n865#3,2:1295\n1208#3,2:1297\n1236#3,4:1299\n1617#3,9:1303\n1869#3:1312\n1870#3:1314\n1626#3:1315\n1563#3:1316\n1634#3,3:1317\n1374#3:1320\n1460#3,5:1321\n1563#3:1326\n1634#3,2:1327\n1563#3:1329\n1634#3,3:1330\n1636#3:1333\n774#3:1334\n865#3,2:1335\n1617#3,9:1337\n1869#3:1346\n1870#3:1348\n1626#3:1349\n1869#3,2:1351\n1740#3,3:1354\n1563#3:1368\n1634#3,3:1369\n1#4:1313\n1#4:1347\n1#4:1362\n216#5:1350\n217#5:1353\n*S KotlinDebug\n*F\n+ 1 MiniFilterModalViewModel.kt\ncom/locon/presentation/ui/viewmodels/MiniFilterModalViewModel\n*L\n113#1:1261,5\n114#1:1266,5\n155#1:1271,3\n155#1:1277,2\n288#1:1283,5\n1088#1:1357,5\n1108#1:1363,5\n1134#1:1372,5\n1156#1:1377,5\n1165#1:1382,5\n1179#1:1387,5\n1188#1:1392,5\n156#1:1274\n156#1:1275,2\n166#1:1279\n194#1:1280,2\n166#1:1282\n339#1:1288\n339#1:1289,2\n343#1:1291\n343#1:1292,2\n347#1:1294\n347#1:1295,2\n357#1:1297,2\n357#1:1299,4\n366#1:1303,9\n366#1:1312\n366#1:1314\n366#1:1315\n382#1:1316\n382#1:1317,3\n383#1:1320\n383#1:1321,5\n384#1:1326\n384#1:1327,2\n387#1:1329\n387#1:1330,3\n384#1:1333\n400#1:1334\n400#1:1335,2\n979#1:1337,9\n979#1:1346\n979#1:1348\n979#1:1349\n989#1:1351,2\n1004#1:1354,3\n1128#1:1368\n1128#1:1369,3\n366#1:1313\n979#1:1347\n986#1:1350\n986#1:1353\n*E\n"})
public final class i9 extends d<MiniFilterScreenEvents> {
public static final int $stable = 8;
@NotNull
private final w1<b<k>> _collections;
@NotNull
private final w1<List<FilterSection>> _filterSectionList;
@NotNull
private final w1<s<d0, Filter>> _latestFilter;
@NotNull
private final w1<Integer> _searchCount;
@NotNull
private final p2<b<k>> collections;
@NotNull
private final DecimalFormat decimalFormat;
@NotNull
private final v filterAnalytics;
@NotNull
private final m filterDataStore;
@NotNull
private y7 filterScreenTypeSelected;
@NotNull
private final p2<List<FilterSection>> filterSectionList;
@NotNull
private final FiltersUseCase filterUseCases;
private boolean isFireEvents;
@NotNull
private final p2<s<d0, Filter>> latestFilter;
@NotNull
private final p2<Integer> searchCount;
@NotNull
private final FetchSearchCountUseCase searchCountUseCase;
@NotNull
private final w1<Map<e, SelectedFilters>> selectedFilters;
@NotNull
private final w1<d0> selectedServiceType;
@Metadata(k = 3, mv = {2, 0, 0}, xi = 48)
public class a {
public static final int[] $EnumSwitchMapping$0;
public static final int[] $EnumSwitchMapping$1;
public static final int[] $EnumSwitchMapping$2;
static {
int[] iArr = new int[y7.values().length];
try {
iArr[y7.NEW_PROJECTS.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[y7.HOTSPOTS.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[y7.ONETIME_FILTER.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
iArr[y7.QUICK_VIEW.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
$EnumSwitchMapping$0 = iArr;
int[] iArr2 = new int[d0.values().length];
try {
iArr2[d0.Buy.ordinal()] = 1;
} catch (NoSuchFieldError unused5) {
}
try {
iArr2[d0.Rent.ordinal()] = 2;
} catch (NoSuchFieldError unused6) {
}
try {
iArr2[d0.RentFlatmate.ordinal()] = 3;
} catch (NoSuchFieldError unused7) {
}
try {
iArr2[d0.Pg.ordinal()] = 4;
} catch (NoSuchFieldError unused8) {
}
try {
iArr2[d0.PgFlatmate.ordinal()] = 5;
} catch (NoSuchFieldError unused9) {
}
try {
iArr2[d0.CommercialBuy.ordinal()] = 6;
} catch (NoSuchFieldError unused10) {
}
try {
iArr2[d0.CommercialLease.ordinal()] = 7;
} catch (NoSuchFieldError unused11) {
}
try {
iArr2[d0.Plot.ordinal()] = 8;
} catch (NoSuchFieldError unused12) {
}
try {
iArr2[d0.Unknown.ordinal()] = 9;
} catch (NoSuchFieldError unused13) {
}
$EnumSwitchMapping$1 = iArr2;
int[] iArr3 = new int[rb.d.values().length];
try {
iArr3[rb.d.multi_selector_grid.ordinal()] = 1;
} catch (NoSuchFieldError unused14) {
}
try {
iArr3[rb.d.multi_selector_row.ordinal()] = 2;
} catch (NoSuchFieldError unused15) {
}
try {
iArr3[rb.d.single_selector_row.ordinal()] = 3;
} catch (NoSuchFieldError unused16) {
}
try {
iArr3[rb.d.f380switch.ordinal()] = 4;
} catch (NoSuchFieldError unused17) {
}
try {
iArr3[rb.d.slider.ordinal()] = 5;
} catch (NoSuchFieldError unused18) {
}
try {
iArr3[rb.d.unknown.ordinal()] = 6;
} catch (NoSuchFieldError unused19) {
}
try {
iArr3[rb.d.read_only.ordinal()] = 7;
} catch (NoSuchFieldError unused20) {
}
try {
iArr3[rb.d.radius_slider.ordinal()] = 8;
} catch (NoSuchFieldError unused21) {
}
$EnumSwitchMapping$2 = iArr3;
}
}
@Inject
public i9(@NotNull FetchSearchCountUseCase searchCountUseCase, @NotNull m filterDataStore, @NotNull v filterAnalytics, @NotNull FiltersUseCase filterUseCases) {
FilterStore filterStore;
r.k(searchCountUseCase, "searchCountUseCase");
r.k(filterDataStore, "filterDataStore");
r.k(filterAnalytics, "filterAnalytics");
r.k(filterUseCases, "filterUseCases");
this.searchCountUseCase = searchCountUseCase;
this.filterDataStore = filterDataStore;
this.filterAnalytics = filterAnalytics;
this.filterUseCases = filterUseCases;
this.isFireEvents = true;
this.selectedServiceType = s2.a(d0.Unknown);
FilterStore.INSTANCE.getClass();
filterStore = FilterStore.empty;
w1<s<d0, Filter>> a10 = s2.a(filterStore.getLatest());
this._latestFilter = a10;
this.latestFilter = kotlinx.coroutines.flow.m.b(a10);
g0 g0Var = g0.INSTANCE;
w1<List<FilterSection>> a11 = s2.a(g0Var);
this._filterSectionList = a11;
this.filterSectionList = kotlinx.coroutines.flow.m.b(a11);
this.selectedFilters = s2.a(t0.d());
w1<Integer> a12 = s2.a(0);
this._searchCount = a12;
this.searchCount = kotlinx.coroutines.flow.m.b(a12);
w1<b<k>> a13 = s2.a(uq.a.b(g0Var));
this._collections = a13;
this.collections = kotlinx.coroutines.flow.m.b(a13);
this.filterScreenTypeSelected = y7.OTHER;
this.decimalFormat = new DecimalFormat("#", new DecimalFormatSymbols(Locale.US));
}
public static final void a(i9 i9Var, d0 d0Var, List list, String str, List list2, String str2, List list3, String str3) {
String str4;
kotlinx.coroutines.flow.k b3;
i9Var.getClass();
List list4 = list;
ArrayList arrayList = new ArrayList(t.u(list4, 10));
Iterator it = list4.iterator();
while (it.hasNext()) {
arrayList.add(((SelectedFilters) it.next()).getQueryParams());
}
ArrayList arrayList2 = new ArrayList();
Iterator it2 = arrayList.iterator();
while (it2.hasNext()) {
t.i(t.A0(((Map) it2.next()).entrySet()), arrayList2);
}
ArrayList arrayList3 = new ArrayList(t.u(arrayList2, 10));
Iterator it3 = arrayList2.iterator();
while (it3.hasNext()) {
Map.Entry entry = (Map.Entry) it3.next();
String str5 = (String) entry.getKey();
Object value = entry.getValue();
if (value instanceof List) {
Iterable iterable = (Iterable) value;
ArrayList arrayList4 = new ArrayList(t.u(iterable, 10));
for (Object obj : iterable) {
if (obj instanceof Double) {
obj = Integer.valueOf((int) ((Number) obj).doubleValue());
}
arrayList4.add(obj);
}
value = t.N(arrayList4, ToStringHelper.COMMA_SEPARATOR, null, null, null, 62);
} else if (value instanceof Double) {
value = Integer.valueOf((int) ((Number) value).doubleValue());
}
arrayList3.add(new s(str5, value));
}
ArrayList arrayList5 = new ArrayList();
Iterator it4 = arrayList3.iterator();
while (it4.hasNext()) {
Object next = it4.next();
s sVar = (s) next;
if (((CharSequence) sVar.getFirst()).length() > 0 && sVar.getSecond().toString().length() > 0) {
arrayList5.add(next);
}
}
LinkedHashMap t7 = t0.t(t0.r(arrayList5));
if (str2.length() > 0) {
str4 = str2;
t7.put("est", str4);
} else {
str4 = str2;
}
String N = t.N(list2, ToStringHelper.COMMA_SEPARATOR, null, null, null, 62);
String N2 = t.N(list3, ToStringHelper.COMMA_SEPARATOR, null, null, null, 62);
int i8 = a.$EnumSwitchMapping$1[d0Var.ordinal()];
if (i8 != 1) {
b3 = i8 != 2 ? kotlinx.coroutines.flow.m.r() : i9Var.searchCountUseCase.h().b(str, t7, N, N2, str4, t0.d(), t0.d(), str3, t0.d());
} else {
com.locon.domain.usecases.filters.e filterBuySearchCount = i9Var.searchCountUseCase.getFilterBuySearchCount();
boolean z5 = i9Var.z();
y7 y7Var = i9Var.filterScreenTypeSelected;
b3 = com.locon.domain.usecases.filters.e.b(filterBuySearchCount, str, N, N2, str2, t7, z5, null, null, str3, null, false, (y7Var == y7.HOTSPOTS || y7Var == y7.NEW_PROJECTS) ? j0.NEW_PROJECT : "", 1728);
N2 = N2;
N = N;
t7 = t7;
}
b0 b0Var = new b0(new p1(b3, new j9(i9Var, d0Var, str, t7, N, N2, str2, str3, null)), new k9(i9Var, null));
z0 z0Var = z0.INSTANCE;
com.locon.core.data.d0.c(kotlinx.coroutines.flow.m.y(b0Var, kotlinx.coroutines.scheduling.b.INSTANCE), w0.a(i9Var));
}
public static final ArrayList f(i9 i9Var, y7 y7Var, List list) {
?? arrayList;
int i8 = a.$EnumSwitchMapping$1[((d0) i9Var.selectedServiceType.getValue()).ordinal()];
if (i8 == 1 || i8 == 2) {
int i10 = a.$EnumSwitchMapping$0[y7Var.ordinal()];
if (i10 == 1 || i10 == 2) {
arrayList = new ArrayList();
for (Object obj : list) {
if (r.f(((FilterSection) obj).getShowInHotSpotFilter(), Boolean.TRUE)) {
arrayList.add(obj);
}
}
} else if (i10 == 3) {
arrayList = new ArrayList();
for (Object obj2 : list) {
if (r.f(((FilterSection) obj2).getShowInOneTimeFilter(), Boolean.TRUE)) {
arrayList.add(obj2);
}
}
} else if (i10 != 4) {
arrayList = g0.INSTANCE;
} else {
arrayList = new ArrayList();
for (Object obj3 : list) {
if (r.f(((FilterSection) obj3).getShowInQuickViewFilter(), Boolean.TRUE)) {
arrayList.add(obj3);
}
}
}
} else {
arrayList = g0.INSTANCE;
}
Iterable iterable = (Iterable) arrayList;
int h8 = t0.h(t.u(iterable, 10));
if (h8 < 16) {
h8 = 16;
}
LinkedHashMap linkedHashMap = new LinkedHashMap(h8);
for (Object obj4 : iterable) {
e.Companion companion = e.INSTANCE;
String id2 = ((FilterSection) obj4).getId();
if (id2 == null) {
id2 = "";
}
companion.getClass();
linkedHashMap.put(e.Companion.a(id2), obj4);
}
List T = t.T(e.bhk_type, e.budget_slider, e.build_area_slider, e.buy_possession, e.rera_compliant);
ArrayList arrayList2 = new ArrayList();
Iterator it = T.iterator();
while (it.hasNext()) {
FilterSection filterSection = (FilterSection) linkedHashMap.get((e) it.next());
if (filterSection != null) {
arrayList2.add(filterSection);
}
}
return arrayList2;
}
public static final n0 h(i9 i9Var) {
switch (a.$EnumSwitchMapping$1[((d0) i9Var.selectedServiceType.getValue()).ordinal()]) {
case 1:
return n0.Buy;
case 2:
return n0.Rent;
case 3:
return n0.FlatmatesRent;
case 4:
return n0.PG;
case 5:
return n0.FlatmatesPG;
case 6:
return n0.CommercialBuy;
case 7:
return n0.CommercialLease;
case 8:
return n0.Buy;
case 9:
return n0.Unknown;
default:
throw new q();
}
}
public static String p(i9 i9Var, d0 d0Var, String str, Map map, String str2, String str3, String str4, String str5) {
Map d5 = t0.d();
i9Var.getClass();
int[] iArr = a.$EnumSwitchMapping$1;
int i8 = iArr[d0Var.ordinal()];
Map d8 = i8 != 1 ? i8 != 2 ? t0.d() : i9Var.searchCountUseCase.h().a(str, str2, str3, str4, map, d5, t0.d(), str5) : i9Var.searchCountUseCase.getFilterBuySearchCount().a(str, str2, str3, str4, map, i9Var.z(), d5, t0.d(), str5);
int i10 = iArr[d0Var.ordinal()];
String str6 = i10 != 1 ? i10 != 2 ? "" : "https://khoj.housing.com/api/v0/rent/search-count" : "https://khoj.housing.com/api/v7/buy/search-count";
StringBuilder sb2 = new StringBuilder();
for (Map.Entry entry : d8.entrySet()) {
String str7 = (String) entry.getKey();
Object value = entry.getValue();
if (sb2.length() > 0) {
sb2.append("&");
}
sb2.append(str7);
sb2.append("=");
sb2.append(value.toString());
}
return str6 + "?" + ((Object) sb2);
}
public final void A(FilterSection filterSection, List list) {
p2.a a10 = w0.a(this);
z0 z0Var = z0.INSTANCE;
kotlinx.coroutines.k.c(a10, kotlinx.coroutines.scheduling.b.INSTANCE, null, new p9(this, filterSection, list, null), 2);
}
public final void B(FilterSection filterSection, SectionItem sectionItem) {
p2.a a10 = w0.a(this);
z0 z0Var = z0.INSTANCE;
kotlinx.coroutines.k.c(a10, kotlinx.coroutines.scheduling.b.INSTANCE, null, new q9(this, filterSection, sectionItem, null), 2);
}
public final void C(FilterSection filterSection, float f8, float f10, float f11, float f12, String str, String str2) {
p2.a a10 = w0.a(this);
z0 z0Var = z0.INSTANCE;
kotlinx.coroutines.k.c(a10, kotlinx.coroutines.internal.t.dispatcher.p0(), null, new r9(this, filterSection, f11, f12, f8, f10, str, str2, null), 2);
}
public final void D(FilterSection filterSection, boolean z5) {
e.Companion companion = e.INSTANCE;
String id2 = filterSection.getId();
if (id2 == null) {
id2 = "";
}
companion.getClass();
e a10 = e.Companion.a(id2);
if (a10 == e.unknown) {
return;
}
d.Companion companion2 = rb.d.INSTANCE;
String type = filterSection.getType();
String str = type != null ? type : "";
companion2.getClass();
kotlinx.coroutines.k.c(w0.a(this), null, null, new s9(z5, filterSection, a10, d.Companion.a(str), this, null), 3);
}
public final void n() {
Object value;
String str;
Object obj;
LinkedHashMap t7;
String max;
String min;
Filter filter = (Filter) ((s) this._latestFilter.getValue()).getSecond();
ArrayList b3 = filter.getFilterProps().b();
LinkedHashMap t10 = t0.t((Map) this.selectedFilters.getValue());
Iterator it = b3.iterator();
while (it.hasNext()) {
com.locon.core.data.local.datastore.k kVar = (com.locon.core.data.local.datastore.k) it.next();
str = "";
if (kVar instanceof FilterAttr) {
FilterAttr filterAttr = (FilterAttr) kVar;
if (filterAttr.g() != e.unknown) {
if (filterAttr.g() == e.np_newly_launched) {
sr.a.INSTANCE.a("ch8n ---> applyLatestFilterFromStore " + kVar, new Object[0]);
}
t10.remove(filterAttr.g());
if (filterAttr.getValue() instanceof Number) {
str = Double.valueOf(((Number) r4).intValue());
} else {
Object value2 = filterAttr.getValue();
if (value2 != null) {
str = value2;
}
}
SelectedFilters selectedFilters = new SelectedFilters(filterAttr.g(), filterAttr.getFilterScreenViewType(), t.S(filterAttr.getDisplayLabel()), t0.i(new s(filterAttr.getApiKey(), str)), false, null, 48, null);
t10.put(selectedFilters.d(), selectedFilters);
}
} else if (kVar instanceof FilterAttrList) {
FilterAttrList filterAttrList = (FilterAttrList) kVar;
if (!filterAttrList.getAttributes().isEmpty() && filterAttrList.getRemoteFilterId() != e.unknown) {
if (filterAttrList.getRemoteFilterId() == e.commercial_listed_by) {
sr.a.INSTANCE.a("ch8n ---> deeplink commercial_listed_by applyLatestFilterFromStore " + kVar, new Object[0]);
}
for (FilterAttr filterAttr2 : filterAttrList.getAttributes()) {
String apiKey = filterAttr2.getApiKey();
Object value3 = filterAttr2.getValue();
if (value3 instanceof Number) {
r.i(filterAttr2.getValue(), "null cannot be cast to non-null type kotlin.Int");
obj = Double.valueOf(((Integer) r10).intValue());
} else if (value3 instanceof Boolean) {
Object value4 = filterAttr2.getValue();
r.i(value4, "null cannot be cast to non-null type kotlin.Boolean");
obj = (Boolean) value4;
} else {
Object value5 = filterAttr2.getValue();
obj = value5 instanceof String ? (String) value5 : null;
if (obj == null) {
obj = "";
}
}
SelectedFilters selectedFilters2 = (SelectedFilters) t10.get(filterAttr2.g());
if (selectedFilters2 == null) {
SelectedFilters selectedFilters3 = new SelectedFilters(filterAttr2.g(), filterAttr2.getFilterScreenViewType(), t.S(filterAttr2.getDisplayLabel()), c.p(apiKey, t.S(obj)), false, null, 48, null);
if (filterAttrList.getRemoteFilterId() == e.commercial_listed_by) {
sr.a.INSTANCE.a("ch8n ---> deeplink commercial_listed_by applyLatestFilterFromStore adding section " + selectedFilters3, new Object[0]);
}
} else {
Map queryParams = selectedFilters2.getQueryParams();
boolean containsKey = queryParams.containsKey(apiKey);
if (containsKey && (obj instanceof Boolean)) {
t7 = t0.t(queryParams);
t7.put(apiKey, t.S(obj));
} else if (containsKey) {
LinkedHashMap t11 = t0.t(queryParams);
Object obj2 = queryParams.get(apiKey);
List list = obj2 instanceof List ? (List) obj2 : null;
if (list != null && !list.contains(obj)) {
t11.put(apiKey, t.c0(list, obj));
}
t7 = t11;
} else {
t7 = t0.t(queryParams);
t7.put(apiKey, t.S(obj));
}
SelectedFilters a10 = SelectedFilters.a(selectedFilters2, t.c0(selectedFilters2.getFilterLabel(), filterAttr2.getDisplayLabel()), t7, null, 51);
t10.remove(filterAttr2.g());
if (filterAttrList.getRemoteFilterId() == e.commercial_listed_by) {
sr.a.INSTANCE.a("ch8n ---> deeplink commercial_listed_by applyLatestFilterFromStore updatedSection " + a10, new Object[0]);
}
}
}
}
} else if (kVar instanceof FilterAttrMinMax) {
FilterAttrMinMax filterAttrMinMax = (FilterAttrMinMax) kVar;
if (filterAttrMinMax.i() != e.unknown) {
t10.remove(filterAttrMinMax.i());
e i8 = filterAttrMinMax.i();
rb.d filterScreenViewType = filterAttrMinMax.getFilterScreenViewType();
LinkedHashMap linkedHashMap = new LinkedHashMap();
if (filterAttrMinMax.getMinApiKey().length() > 0 && (min = filterAttrMinMax.getMin()) != null && min.length() != 0) {
String minApiKey = filterAttrMinMax.getMinApiKey();
String min2 = filterAttrMinMax.getMin();
if (min2 == null) {
min2 = "";
}
linkedHashMap.put(minApiKey, min2);
}
if (filterAttrMinMax.getMaxApiKey().length() > 0 && (max = filterAttrMinMax.getMax()) != null && max.length() != 0) {
String maxApiKey = filterAttrMinMax.getMaxApiKey();
String max2 = filterAttrMinMax.getMax();
linkedHashMap.put(maxApiKey, max2 != null ? max2 : "");
}
SelectedFilters selectedFilters4 = new SelectedFilters(i8, filterScreenViewType, t.S(filterAttrMinMax.getDisplayLabel()), linkedHashMap, false, null, 48, null);
t10.put(selectedFilters4.d(), selectedFilters4);
}
} else {
if (!(kVar instanceof FilterAttrBoolean)) {
throw new q();
}
FilterAttrBoolean filterAttrBoolean = (FilterAttrBoolean) kVar;
if (filterAttrBoolean.f() != e.unknown) {
t10.remove(filterAttrBoolean.f());
SelectedFilters selectedFilters5 = new SelectedFilters(filterAttrBoolean.f(), filterAttrBoolean.getFilterScreenViewType(), t.S(filterAttrBoolean.getDisplayLabel()), com.locon.chat.presentation.ui.screens.window.q.n(filterAttrBoolean.getApiKey(), Boolean.valueOf(r.f(filterAttrBoolean.getIsSelected(), Boolean.TRUE))), false, null, 48, null);
t10.put(selectedFilters5.d(), selectedFilters5);
sr.a.INSTANCE.a("selectedFiltersselectedFiltersselectedFilters else 1= " + filterAttrBoolean.getApiKey() + " and " + filterAttrBoolean.getIsSelected(), new Object[0]);
}
}
}
w1<Map<e, SelectedFilters>> w1Var = this.selectedFilters;
do {
value = w1Var.getValue();
} while (!w1Var.c(value, uq.a.c(t10)));
sr.a.INSTANCE.a("selectedFiltersselectedFiltersselectedFilters testing = " + this.selectedFilters.getValue() + " and " + filter.getFilterProps(), new Object[0]);
}
public final void o(SharedCity sharedCity) {
if (r.f(o0.i((Filter) ((s) this._latestFilter.getValue()).getSecond()), sharedCity.getCityUuid())) {
return;
}
p1 p1Var = new p1(this.filterUseCases.getGetHotspotsInCityUseCase().a(sharedCity.getCityUuid()), new l9(this, sharedCity, null));
z0 z0Var = z0.INSTANCE;
com.locon.core.data.d0.c(kotlinx.coroutines.flow.m.y(p1Var, kotlinx.coroutines.scheduling.b.INSTANCE), w0.a(this));
}
public final p2 getFilterSectionList() {
return this.filterSectionList;
}
public final p2 getLatestFilter() {
return this.latestFilter;
}
public final p2 getSearchCount() {
return this.searchCount;
}
public final w1 getSelectedFilters() {
return this.selectedFilters;
}
public final void u(MiniFilterScreenEvents event) {
Object value;
Object value2;
r.k(event, "event");
if (!(event instanceof MiniFilterScreenEvents.InitData)) {
if (event.equals(MiniFilterScreenEvents.a.INSTANCE)) {
this.filterAnalytics.o(((Filter) ((s) this._latestFilter.getValue()).getSecond()).getSelectedLocation().d().getUuid());
return;
} else {
if (!event.equals(MiniFilterScreenEvents.b.INSTANCE)) {
throw new q();
}
this.filterAnalytics.p(((Filter) ((s) this._latestFilter.getValue()).getSecond()).getSelectedLocation().d().getUuid());
return;
}
}
y7 filterScreenType = ((MiniFilterScreenEvents.InitData) event).getFilterScreenType();
this.filterScreenTypeSelected = filterScreenType;
w1<Map<e, SelectedFilters>> w1Var = this.selectedFilters;
do {
value = w1Var.getValue();
} while (!w1Var.c(value, t0.d()));
w1<Integer> w1Var2 = this._searchCount;
do {
value2 = w1Var2.getValue();
((Number) value2).intValue();
} while (!w1Var2.c(value2, 0));
kotlinx.coroutines.flow.k e5 = this.filterDataStore.e();
z0 z0Var = z0.INSTANCE;
kotlinx.coroutines.scheduling.b bVar = kotlinx.coroutines.scheduling.b.INSTANCE;
kotlinx.coroutines.flow.m.z(new p1(new m1(kotlinx.coroutines.flow.m.y(e5, bVar)), new m9(this, filterScreenType, null)), w0.a(this));
kotlinx.coroutines.flow.m.z(kotlinx.coroutines.flow.m.y(new p1(kotlinx.coroutines.flow.m.k(kotlinx.coroutines.flow.m.C(this.selectedFilters, this.selectedServiceType), 500L), new n9(this, null)), bVar), w0.a(this));
}
public final void v() {
Object value;
ArrayList arrayList;
w1<List<FilterSection>> w1Var = this._filterSectionList;
do {
value = w1Var.getValue();
arrayList = new ArrayList();
for (Object obj : (List) value) {
if (!r.f(((FilterSection) obj).getId(), "buy_possession")) {
arrayList.add(obj);
}
}
} while (!w1Var.c(value, arrayList));
}
public final void w(boolean z5) {
p2.a a10 = w0.a(this);
z0 z0Var = z0.INSTANCE;
kotlinx.coroutines.k.c(a10, kotlinx.coroutines.scheduling.b.INSTANCE, null, new o9(this, z5, null), 2);
}
public final void x(AppliedFilters.Filter filter) {
Object value;
LinkedHashMap t7;
Object value2;
LinkedHashMap t10;
Object value3;
LinkedHashMap t11;
Object value4;
Object value5;
LinkedHashMap t12;
Object value6;
Object value7;
LinkedHashMap t13;
try {
Map map = (Map) this.selectedFilters.getValue();
switch (a.$EnumSwitchMapping$2[filter.getDetails().getType().ordinal()]) {
case 1:
case 2:
e d5 = filter.getDetails().d();
SelectedFilters selectedFilters = (SelectedFilters) map.get(d5);
if (selectedFilters == null) {
return;
}
List filterLabel = selectedFilters.getFilterLabel();
int indexOf = filterLabel.indexOf(filter.getLabel());
Set entrySet = selectedFilters.getQueryParams().entrySet();
if (entrySet.size() > 1) {
Set<Map.Entry> set = entrySet;
ArrayList arrayList = new ArrayList(t.u(set, 10));
for (Map.Entry entry : set) {
arrayList.add(new s(entry.getKey(), entry.getValue()));
}
ArrayList D0 = t.D0(arrayList);
D0.remove(indexOf);
ArrayList D02 = t.D0(filterLabel);
D02.remove(indexOf);
w1<Map<e, SelectedFilters>> w1Var = this.selectedFilters;
do {
value3 = w1Var.getValue();
t11 = t0.t((Map) value3);
t11.put(d5, new SelectedFilters(d5, selectedFilters.getType(), D02, t0.r(D0), false, selectedFilters.getSelectedDiscoveryCollection(), 16, null));
} while (!w1Var.c(value3, uq.a.c(t11)));
return;
}
if (entrySet.isEmpty()) {
return;
}
Map.Entry entry2 = (Map.Entry) t.D(entrySet);
String str = (String) entry2.getKey();
Object value8 = entry2.getValue();
r.i(value8, "null cannot be cast to non-null type kotlin.collections.List<*>");
List list = (List) value8;
if (list.size() == 1) {
w1<Map<e, SelectedFilters>> w1Var2 = this.selectedFilters;
do {
value2 = w1Var2.getValue();
t10 = t0.t((Map) value2);
t10.remove(d5);
} while (!w1Var2.c(value2, uq.a.c(t10)));
return;
}
if (indexOf >= 0 && indexOf < list.size()) {
ArrayList D03 = t.D0(list);
D03.remove(indexOf);
Map i8 = t0.i(new s(str, D03));
if (indexOf >= filterLabel.size()) {
return;
}
ArrayList D04 = t.D0(filterLabel);
D04.remove(indexOf);
w1<Map<e, SelectedFilters>> w1Var3 = this.selectedFilters;
do {
value = w1Var3.getValue();
t7 = t0.t((Map) value);
t7.put(d5, new SelectedFilters(d5, selectedFilters.getType(), D04, i8, false, selectedFilters.getSelectedDiscoveryCollection(), 16, null));
} while (!w1Var3.c(value, uq.a.c(t7)));
return;
}
return;
case 3:
case 4:
e d8 = filter.getDetails().d();
LinkedHashMap t14 = t0.t(map);
t14.remove(d8);
w1<Map<e, SelectedFilters>> w1Var4 = this.selectedFilters;
do {
value4 = w1Var4.getValue();
} while (!w1Var4.c(value4, uq.a.c(t14)));
return;
case 5:
SelectedFilters selectedFilters2 = (SelectedFilters) map.get(filter.getDetails().d());
if (selectedFilters2 == null) {
return;
}
w1<Map<e, SelectedFilters>> w1Var5 = this.selectedFilters;
do {
value5 = w1Var5.getValue();
t12 = t0.t((Map) value5);
t12.remove(selectedFilters2.d());
} while (!w1Var5.c(value5, uq.a.c(t12)));
return;
case 6:
case 7:
e d10 = filter.getDetails().d();
LinkedHashMap t15 = t0.t(map);
t15.remove(d10);
w1<Map<e, SelectedFilters>> w1Var6 = this.selectedFilters;
do {
value6 = w1Var6.getValue();
} while (!w1Var6.c(value6, uq.a.c(t15)));
return;
case 8:
SelectedFilters selectedFilters3 = (SelectedFilters) map.get(filter.getDetails().d());
if (selectedFilters3 == null) {
return;
}
w1<Map<e, SelectedFilters>> w1Var7 = this.selectedFilters;
do {
value7 = w1Var7.getValue();
t13 = t0.t((Map) value7);
t13.remove(selectedFilters3.d());
} while (!w1Var7.c(value7, uq.a.c(t13)));
return;
default:
throw new q();
}
} catch (Exception e5) {
try {
FirebaseCrashlytics.getInstance().log("removeFilterInAppliedFilters: " + e5.getMessage());
} catch (Exception unused) {
}
}
}
public final void y() {
this.isFireEvents = false;
}
public final boolean z() {
return this.selectedServiceType.getValue() == d0.Buy;
}
}