导航菜单

页面标题

页面副标题

OLX India v19.42.007 - l1.java 源代码

正在查看: OLX India v19.42.007 应用的 l1.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.olxgroup.panamera.app.common.utils;

import android.content.Context;
import android.text.TextUtils;
import com.google.gson.Gson;
import com.naspers.ragnarok.core.dto.system.parser.factory.SystemMessageDetailParserDeeplinkItem;
import com.naspers.ragnarok.core.network.contract.MessageHistoryApi;
import com.naspers.ragnarok.domain.constant.Constants;
import com.naspers.ragnarok.domain.util.common.Extras;
import com.olxgroup.panamera.app.common.infra.m2;
import com.olxgroup.panamera.domain.buyers.common.entity.AdWidget;
import com.olxgroup.panamera.domain.buyers.common.entity.SearchExperienceFilters;
import com.olxgroup.panamera.domain.buyers.common.entity.ad.AdAttribute;
import com.olxgroup.panamera.domain.buyers.common.entity.ad.AdItem;
import com.olxgroup.panamera.domain.buyers.common.entity.ad.AdditionalBanner;
import com.olxgroup.panamera.domain.buyers.common.utils.FilterExtensionKt;
import com.olxgroup.panamera.domain.buyers.cxe.entity.LayoutConfig;
import com.olxgroup.panamera.domain.buyers.home.search.Search;
import com.olxgroup.panamera.domain.buyers.listings.common.SearchExperienceContext;
import com.olxgroup.panamera.domain.buyers.listings.entity.CoachMarkChosenOptions;
import com.olxgroup.panamera.domain.buyers.listings.entity.SearchExperienceFeed;
import com.olxgroup.panamera.domain.buyers.listings.entity.ad_listing.BundleType;
import com.olxgroup.panamera.domain.buyers.listings.repository.ResultsContextRepository;
import com.olxgroup.panamera.domain.buyers.location.usecase.PlacePathUseCase;
import com.olxgroup.panamera.domain.buyers.review.entity.Review;
import com.olxgroup.panamera.domain.common.tracking.entity.Event;
import com.olxgroup.panamera.domain.common.tracking.entity.EventType;
import com.olxgroup.panamera.domain.common.tracking.repository.Tracker;
import com.olxgroup.panamera.domain.common.tracking.repository.TrackingContextRepository;
import com.olxgroup.panamera.domain.common.tracking.repository.TrackingService;
import com.olxgroup.panamera.domain.location.entity.PlaceTree;
import com.olxgroup.panamera.domain.monetization.common.entity.PaymentContext;
import com.olxgroup.panamera.domain.monetization.listings.entity.Package;
import com.olxgroup.panamera.domain.monetization.listings.entity.PackageLocationCategory;
import com.olxgroup.panamera.domain.monetization.vas.entity.VASPurchaseOrigin;
import com.olxgroup.panamera.domain.seller.coupons.entity.Coupon;
import com.olxgroup.panamera.domain.seller.monetdraft.entity.MonetCartStatusResponse;
import com.olxgroup.panamera.domain.seller.posting.entity.PostingDraft;
import com.olxgroup.panamera.domain.seller.posting.repository.PostingDraftRepository;
import com.olxgroup.panamera.domain.users.common.entity.User;
import com.olxgroup.panamera.domain.users.common.entity.photo.UploadPhotoResult;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import kotlin.Lazy;
import olx.com.delorean.domain.interactor.UseCaseObserver;
import olx.com.delorean.domain.repository.UserSessionRepository;
import olx.com.delorean.domain.tracking.BrowseMode;
import olx.com.delorean.domain.tracking.TrackingInteractions;

public class l1 implements TrackingService {
    private final com.olxgroup.panamera.app.common.tracking.q a;
    private final Context b;
    private final TrackingContextRepository c;
    private final Gson d;
    private final Lazy e;
    private final Lazy f;
    private final Lazy g;
    private final Lazy h;
    private final Lazy i;
    private long j;
    private PlacePathUseCase k;
    private String l;

    class a extends UseCaseObserver {
        final Map a;
        final String b;

        a(Map map, String str) {
            this.a = map;
            this.b = str;
        }

        public void onError(Throwable th) {
            l1.this.g0(this.b, this.a);
        }

        public void onNext(PlaceTree placeTree) {
            placeTree.addTree(this.a);
            l1.this.g0(this.b, this.a);
        }
    }

    static class b {
        static final int[] a;

        static {
            int[] iArr = new int[VASPurchaseOrigin.values().length];
            a = iArr;
            try {
                iArr[VASPurchaseOrigin.AFTER_POSTING.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                a[VASPurchaseOrigin.MY_ADS.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                a[VASPurchaseOrigin.ITEM_DETAILS.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                a[VASPurchaseOrigin.BUSINESS_LANDING.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                a[VASPurchaseOrigin.DEEP_LINK.ordinal()] = 5;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                a[VASPurchaseOrigin.MY_ORDERS.ordinal()] = 6;
            } catch (NoSuchFieldError unused6) {
            }
        }
    }

    public enum c {
        FILTER(Constants.Intent.Extra.FILTER);

        private final String value;

        c(String str) {
            this.value = str;
        }

        public String getValue() {
            return this.value;
        }
    }

    public enum d {
        QUICK_FILTERS("quick_filter"),
        FILTER("filters");

        private final String value;

        d(String str) {
            this.value = str;
        }

        public String getValue() {
            return this.value;
        }
    }

    public enum e {
        CANCEL("cancel"),
        DISCARD("discard");

        private final String value;

        e(String str) {
            this.value = str;
        }

        public String getValue() {
            return this.value;
        }
    }

    public enum f {
        ALL,
        CAROUSEL,
        FIXED
    }

    public l1(Context context, TrackingContextRepository trackingContextRepository, Gson gson, Lazy lazy, Lazy lazy2, com.olxgroup.panamera.app.common.tracking.q qVar, Lazy lazy3, Lazy lazy4, Lazy lazy5) {
        this.b = context;
        this.c = trackingContextRepository;
        this.d = gson;
        this.e = lazy;
        this.f = lazy2;
        this.a = qVar;
        this.g = lazy3;
        this.h = lazy4;
        this.i = lazy5;
    }

    private Map A(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put("origin", str);
        if (str2 != null) {
            p0.put(Constants.Intent.Extra.SELECT_FROM, str2);
        }
        String limitFlowEntryPoint = this.c.getLimitFlowEntryPoint();
        if (limitFlowEntryPoint == null || limitFlowEntryPoint.isEmpty()) {
            p0.put("entry_point", str);
        } else {
            p0.put("entry_point", limitFlowEntryPoint);
        }
        return p0;
    }

    private Map B(String str) {
        Map searchParams = this.c.getSearchParams(((ResultsContextRepository) this.f.getValue()).getSearchExperienceResultsContext().getBrowseMode());
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        U(searchParams);
        T(searchParams);
        this.a.F0(searchParams);
        return searchParams;
    }

    private Map C(AdItem adItem) {
        HashMap hashMap = new HashMap();
        hashMap.put(Extras.Constants.ITEM_ID, adItem.getId());
        this.a.e(hashMap, adItem.getCategoryId());
        hashMap.put("images_count", Integer.valueOf(adItem.getAllAdPhotos() != null ? adItem.getAllAdPhotos().size() : 0));
        return hashMap;
    }

    private Map D(Review review, String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, str2);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str);
        hashMap.put("seller_id", review.getSellerId());
        hashMap.put("review_id", review.getAdId());
        hashMap.put(Extras.Constants.ITEM_ID, review.getAdId());
        return hashMap;
    }

    private void E(Map map, Map map2) {
        if (map2 != null && !map2.isEmpty()) {
            map.put("search_string", FilterExtensionKt.toPersonalisedFilterTrackingFormat(map2));
        }
        map.put("field_name", FilterExtensionKt.toPersonalisedFilterFieldNameTrackingFormat(map2));
    }

    private String F(List list) {
        double d2 = 0.0d;
        if (list != null) {
            while (list.iterator().hasNext()) {
                d2 += ((Package) r5.next()).getPrice().getAmount();
            }
        }
        return String.valueOf(d2);
    }

    private void G(String str, String str2) {
        i(str, "browse_subcategory_select", str2);
    }

    private void H(String str, String str2) {
        i(str, "browse_category_select", str2);
    }

    private void I() {
        f0("tap_allcategories");
    }

    private void J(String str, String str2, SearchExperienceFilters searchExperienceFilters) {
        Map searchParams = this.c.getSearchParams(searchExperienceFilters, false);
        searchParams.put("listing_origin", str);
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str2);
        T(searchParams);
        X(searchParams);
        g0("listing_tap_apply_filters", searchParams);
    }

    private void K(Map map, String str, Object obj) {
        if (obj != null) {
            map.put(str, obj);
        }
    }

    private void L(Map map) {
        PostingDraft postingDraft = ((PostingDraftRepository) this.g.getValue()).getPostingDraft();
        if (postingDraft == null || postingDraft.getFields() == null || postingDraft.getFields().isEmpty()) {
            return;
        }
        for (Map.Entry entry : postingDraft.getFields().entrySet()) {
            map.put("item_" + ((String) entry.getKey()), ((AdAttribute) entry.getValue()).getValue());
        }
    }

    private void M(Map map) {
        map.put(Constants.ExtraKeys.FLOW_TYPE, this.c.getPostingFlowType());
        N(map);
        L(map);
    }

    private void N(Map map) {
        map.put("origin", this.c.getOriginPostingFlow());
        O(map);
    }

    private void O(Map map) {
        map.put("verified_lister", Integer.valueOf(this.c.hasPhoneVerification()));
        String[] postingFlowExperimentVariants = this.c.getPostingFlowExperimentVariants();
        if (postingFlowExperimentVariants.length > 0) {
            map.put("experiment_variant", this.d.toJson(postingFlowExperimentVariants));
        }
    }

    private void P(Map map) {
        if (TextUtils.isEmpty(this.l)) {
            return;
        }
        this.a.e(map, this.l);
    }

    private void Q(String str, Map map) {
        map.put("ad_index_id", str);
    }

    private void R(Map map) {
        PostingDraft postingDraft = ((PostingDraftRepository) this.g.getValue()).getPostingDraft();
        if (postingDraft == null) {
            return;
        }
        map.put("product_price", postingDraft.getPrice());
        map.put("suggested_price", postingDraft.getRecommendedPrice());
    }

    private void S(Map map, AdItem adItem) {
        if (adItem.getPriceValue() != 0) {
            map.put("item_price", Long.valueOf(adItem.getPriceValue()));
        }
    }

    private void T(Map map) {
        map.put("origin", this.c.getOriginReplyFlow());
    }

    private void U(Map map) {
        if (this.j == 0) {
            this.j = System.currentTimeMillis();
        }
        map.put("resultset_id", getHydraIdentifier() + "|" + this.j);
    }

    private void V(Map map, boolean z) {
        if (z) {
            this.c.addSearchFlowExperimentVariant("drStrange");
        } else {
            this.c.removeSearchFlowExperimentVariant("drStrange");
        }
        String[] searchFlowExperimentVariants = this.c.getSearchFlowExperimentVariants();
        if (searchFlowExperimentVariants.length > 0) {
            map.put("experiment_variant", this.d.toJson(searchFlowExperimentVariants));
        }
    }

    private void W(Map map, AdItem adItem) {
        map.put("tag_check", adItem.hasActiveVideo() ? "video_tag" : "no_video_tag");
    }

    private void X(Map map) {
        map.put("filters_interaction", this.c.getFiltersInteraction());
    }

    private void Y(String str, AdItem adItem) {
        Map L = this.a.L(adItem);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).c(adItem, L);
        if (str.equals("view_item")) {
            L.put(Constants.Intent.Extra.BROWSING_MODE, "direct");
        }
        this.a.g(L);
        a0(str, adItem, L);
    }

    private void Z(String str, AdItem adItem, String str2) {
        Map L = this.a.L(adItem);
        if (!str2.equals("")) {
            L.put(Constants.ExtraKeys.FLOW_STEP, str2);
        }
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).c(adItem, L);
        if (str.equals("view_item")) {
            L.put(Constants.Intent.Extra.BROWSING_MODE, "direct");
        }
        a0(str, adItem, L);
    }

    private void a0(String str, AdItem adItem, Map map) {
        map.put("origin", this.c.getOriginAdActions());
        if (adItem != null) {
            String status = adItem.getStatus().getStatus();
            if (adItem.statusIsSoftModerated()) {
                status = "moderated_soft";
            } else if (adItem.statusIsHardModerated()) {
                status = "moderated_hard";
            }
            map.put("item_status", status);
            map.put(Extras.Constants.ITEM_ID, adItem.getId());
        }
        g0(str, map);
    }

    private void b(Map map, BrowseMode browseMode) {
        if (browseMode != null) {
            map.put(Constants.Intent.Extra.BROWSING_MODE, com.olxgroup.panamera.app.buyers.listings.tracking.b.a.a(browseMode));
        }
    }

    private void b0(String str, AdItem adItem, Map map, String str2) {
        map.put("origin", this.c.getOriginAdActions());
        if (adItem != null) {
            String status = adItem.getStatus().getStatus();
            if (adItem.statusIsSoftModerated()) {
                status = "moderated_soft";
            } else if (adItem.statusIsHardModerated()) {
                status = "moderated_hard";
            }
            map.put("item_status", status);
            map.put(Extras.Constants.ITEM_ID, adItem.getId());
            if (!str2.equals("")) {
                map.put(Constants.ExtraKeys.FLOW_STEP, str2);
            }
        }
        g0(str, map);
    }

    private void c(Map map) {
        String deleteFlowType = this.c.getDeleteFlowType();
        if (olx.com.delorean.domain.utils.TextUtils.isEmpty(deleteFlowType)) {
            deleteFlowType = "deletion";
        }
        map.put(Constants.ExtraKeys.FLOW_TYPE, deleteFlowType);
    }

    private void c0(String str, String str2, String str3) {
        HashMap hashMap = new HashMap();
        hashMap.put("origin", str2);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str3);
        this.a.F0(hashMap);
        g0(str, hashMap);
    }

    private void d(Map map) {
        String markAsSoldFlowType = this.c.getMarkAsSoldFlowType();
        if (olx.com.delorean.domain.utils.TextUtils.isEmpty(markAsSoldFlowType)) {
            markAsSoldFlowType = "mark_as_sold";
        }
        map.put(Constants.ExtraKeys.FLOW_TYPE, markAsSoldFlowType);
    }

    private void d0(String str) {
        Map p0 = this.a.p0();
        p0.put("origin", this.c.getOriginBillingFlow());
        g0(str, p0);
    }

    private void e(AdItem adItem, Map map) {
        map.put("user_category", adItem.getDealerType());
        map.put("inspected_type", adItem.getInspectionType());
    }

    private void e0(String str, String str2, boolean z) {
        if (z) {
            G(str, str2);
        } else {
            H(str, str2);
        }
    }

    private void f(Map map) {
        map.putAll(this.c.getSearchParams());
    }

    private void f0(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("app_type", com.olxgroup.panamera.domain.shell.a.CLASSIFIEDS_ONLY.getValue());
        g0(str, hashMap);
    }

    private void g(Map map, AdItem adItem) {
        if (adItem == null || adItem.getUser() == null) {
            map.put("dealer_tag_check", "no_dealer_tag");
        } else {
            map.put("dealer_tag_check", adItem.getUser().isShowroomEnabled() ? "dealer_tag" : "no_dealer_tag");
        }
    }

    public void g0(String str, Map map) {
        String singleEventExperimentVariant = this.c.getSingleEventExperimentVariant();
        if (singleEventExperimentVariant != null) {
            if (map == null) {
                map = new HashMap();
            }
            map.put("experiment_variant", singleEventExperimentVariant);
        }
        map.putAll(this.a.p0());
        this.a.g(map);
        h(map);
        map.put("app_type", com.olxgroup.panamera.domain.shell.a.CLASSIFIEDS_ONLY.getValue());
        track(new Event(EventType.Event.INSTANCE, str, map));
    }

    private void h(Map map) {
        User loggedUser = ((UserSessionRepository) m2.a.Q2().getValue()).getLoggedUser();
        if (loggedUser != null) {
            String name = loggedUser.getName();
            if (name != null && !name.isEmpty()) {
                map.put("name", name);
            }
            String phone = loggedUser.getPhone();
            if (phone != null && !phone.isEmpty()) {
                map.put("phone", phone);
            }
            String email = loggedUser.getEmail();
            if (email == null || email.isEmpty()) {
                return;
            }
            map.put("email", email);
        }
    }

    private void h0(double d2, double d3, String str, Map map) {
        PlacePathUseCase placePathUseCase = this.k;
        if (placePathUseCase != null) {
            placePathUseCase.execute(new a(map, str), PlacePathUseCase.Params.forLocation(d2, d3));
        } else {
            g0(str, map);
        }
    }

    private void i(String str, String str2, String str3) {
        g0(str2, k(str, str3));
    }

    private void i0(String str, PaymentContext paymentContext, String str2) {
        double d2;
        Map map;
        double d3;
        HashMap hashMap = new HashMap();
        if (paymentContext.getAd() != null) {
            Map L = this.a.L(paymentContext.getAd());
            d2 = t(paymentContext.getAd(), paymentContext.getPackageLocationCategory());
            d3 = u(paymentContext.getAd(), paymentContext.getPackageLocationCategory());
            map = L;
        } else {
            d2 = 0.0d;
            map = hashMap;
            d3 = 0.0d;
        }
        if (paymentContext.getPackageLocationCategory() != null) {
            d2 = t(paymentContext.getAd(), paymentContext.getPackageLocationCategory());
            d3 = u(paymentContext.getAd(), paymentContext.getPackageLocationCategory());
        }
        double d4 = d3;
        double d5 = d2;
        if (paymentContext.getOrigin() != null) {
            map.put("origin", getOrigin(paymentContext.getOrigin()));
        }
        if (paymentContext.getSelectedVASPackage() != null && !paymentContext.getSelectedVASPackage().isEmpty()) {
            map.put("package_price", F(paymentContext.getSelectedVASPackage()));
        }
        if (paymentContext.getPackageLocationCategory() != null) {
            this.a.e(map, String.valueOf(paymentContext.getPackageLocationCategory().getCategoryId()));
        }
        String limitFlowEntryPoint = this.c.getLimitFlowEntryPoint();
        if (limitFlowEntryPoint == null || limitFlowEntryPoint.isEmpty()) {
            map.put("entry_point", getOrigin(paymentContext.getOrigin()));
        } else {
            map.put("entry_point", limitFlowEntryPoint);
        }
        if (this.c.getPaymentProductType() != null) {
            map.put("product_type", this.c.getPaymentProductType());
        }
        String s = s(paymentContext.getSelectedVASPackage());
        if (s != null && !TextUtils.isEmpty(s)) {
            map.put("ad_package_price", s);
        }
        if (paymentContext.getSelectedVASPackage() != null) {
            map.put("no_of_packages_selected", Integer.valueOf(paymentContext.getSelectedVASPackage().size()));
        }
        if (paymentContext.getChosenOption() != null) {
            map.put(Constants.ExtraKeys.CHOSEN_OPTION, paymentContext.getChosenOption());
        }
        if (paymentContext.getCoupon() != null) {
            K(map, "coupon_campaign_id", Integer.valueOf(paymentContext.getCoupon().getCampaignId()));
            K(map, "coupon_code", paymentContext.getCoupon().getCode());
            if (paymentContext.getCoupon().getDiscount() != null) {
                K(map, "coupon_discount_amount", Double.valueOf(paymentContext.getCoupon().getDiscount().getActualDiscount()));
                K(map, "coupon_discount_percentage", Integer.valueOf(paymentContext.getCoupon().getDiscount().getPercentage()));
            }
            K(map, "coupon_type", paymentContext.getCoupon().getType());
            K(map, "coupon_id", Integer.valueOf(paymentContext.getCoupon().getId()));
        }
        this.a.i(map, paymentContext);
        String name = paymentContext.getFirstPackage().getName();
        if (name != null) {
            map.put("package_type", name);
        }
        h0(d5, d4, str, map);
    }

    private void j0(String str, Map map) {
        map.putAll(this.a.g0(((PostingDraftRepository) this.g.getValue()).getPostingDraft()));
        M(map);
        Q(this.c.getAdIndexId(), map);
        P(map);
        String lowerCase = str.toLowerCase();
        lowerCase.hashCode();
        switch (lowerCase) {
            case "close_button_tap":
                g0(com.olxgroup.panamera.app.common.tracking.e.g, map);
                break;
            case "swipe":
                map.put(Constants.Intent.Extra.SELECT_FROM, "itempage");
                g0(com.olxgroup.panamera.app.common.tracking.e.e, map);
                break;
            case "item_tap":
                g0(com.olxgroup.panamera.app.common.tracking.e.f, map);
                break;
            case "swipe_full_screen":
                map.put(Constants.Intent.Extra.SELECT_FROM, "full_image_view");
                g0(com.olxgroup.panamera.app.common.tracking.e.e, map);
                break;
        }
    }

    private Map k(String str, String str2) {
        Map p0 = this.a.p0();
        this.c.addCategoryLevelWithPath(p0, str);
        p0.put(Constants.Intent.Extra.SELECT_FROM, str2);
        this.a.F0(p0);
        return p0;
    }

    private void k0(String str, String str2, Integer num, Integer num2, String str3, Integer num3, String str4, String str5) {
        g0(str, this.a.h0(str2, num, num2, str3, num3, str4, str5));
    }

    private Map l(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, Coupon coupon) {
        Map A = A(str, str2);
        if (str3 != null) {
            A.put("package_id", str3);
        }
        if (adItem != null) {
            if (adItem.getId() != null) {
                A.put(Extras.Constants.ITEM_ID, adItem.getId());
            }
            if (adItem.getCategoryId() != null) {
                this.a.e(A, adItem.getCategoryId());
            }
            if (adItem.getStatus() != null && adItem.getStatus().getStatus() != null) {
                A.put("item_status", adItem.getStatus().getStatus());
            }
            if (adItem.getAdMonetizable() != null && adItem.getAdMonetizable().getLimits() != null) {
                A.put("days_remaining", Integer.valueOf(adItem.getAdMonetizable().getLimits().getNextFreeAdDays()));
            }
            A.put("images_count", Integer.valueOf(adItem.getAllAdPhotos() != null ? adItem.getAllAdPhotos().size() : 0));
        }
        if (packageLocationCategory != null) {
            this.a.e(A, String.valueOf(packageLocationCategory.getCategoryId()));
        }
        if (str4 != null) {
            A.put("product_type", str4);
        }
        if (str5 != null) {
            A.put("reason", str5);
        }
        if (str6 != null) {
            A.put(Constants.ExtraKeys.CHOSEN_OPTION, str6);
        }
        if (coupon != null) {
            K(A, "coupon_type", coupon.getType());
            K(A, "coupon_campaign_id", Integer.valueOf(coupon.getCampaignId()));
            K(A, "coupon_code", coupon.getCode());
            K(A, "coupon_id", Integer.valueOf(coupon.getId()));
            if (coupon.getDiscount() != null) {
                K(A, "coupon_discount_amount", Double.valueOf(coupon.getDiscount().getActualDiscount()));
                K(A, "coupon_discount_percentage", Integer.valueOf(coupon.getDiscount().getPercentage()));
                Double valueOf = Double.valueOf(coupon.getFinalCartValue());
                Double valueOf2 = Double.valueOf(coupon.getDiscount().getActualDiscount());
                if (valueOf != null && valueOf2 != null) {
                    K(A, "initial_value", Double.valueOf(valueOf.doubleValue() + valueOf2.doubleValue()));
                }
            }
        }
        return A;
    }

    private void l0(String str, Map map) {
        String singleEventExperimentVariant = this.c.getSingleEventExperimentVariant();
        if (singleEventExperimentVariant != null) {
            if (map == null) {
                map = new HashMap();
            }
            map.put("experiment_variant", singleEventExperimentVariant);
        }
        map.put("app_type", com.olxgroup.panamera.domain.shell.a.CLASSIFIEDS_ONLY.getValue());
        track(new Event(EventType.View.INSTANCE, str, map));
    }

    private Map m(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, String str7) {
        Map A = A(str, str2);
        if (str4 != null) {
            A.put("package_id", str4);
        }
        if (adItem != null) {
            if (adItem.getId() != null) {
                A.put(Extras.Constants.ITEM_ID, adItem.getId());
            }
            if (adItem.getCategoryId() != null) {
                this.a.e(A, adItem.getCategoryId());
            }
            if (adItem.getStatus() != null && adItem.getStatus().getStatus() != null) {
                A.put("item_status", adItem.getStatus().getStatus());
            }
            if (adItem.getAdMonetizable() != null && adItem.getAdMonetizable().getLimits() != null) {
                A.put("days_remaining", Integer.valueOf(adItem.getAdMonetizable().getLimits().getNextFreeAdDays()));
            }
            A.put("images_count", Integer.valueOf(adItem.getAllAdPhotos() != null ? adItem.getAllAdPhotos().size() : 0));
        }
        if (packageLocationCategory != null) {
            this.a.e(A, String.valueOf(packageLocationCategory.getCategoryId()));
        }
        if (str3 != null) {
            A.put("product_type", str3);
        }
        if (str5 != null) {
            A.put("reason", str5);
        }
        if (str6 != null) {
            A.put(Constants.ExtraKeys.CHOSEN_OPTION, str6);
        }
        if (str7 != null) {
            A.put("coupon_code", str7);
        }
        return A;
    }

    private void m0(List list, Map map) {
        map.put("result_count", "" + list.size());
        map.put("page_number", MessageHistoryApi.API_VERSION_1);
        if (!list.isEmpty()) {
            map.put("impressions", Arrays.toString(list.toArray()).replace(Constants.SPACE_STRING, ""));
        }
        U(map);
        ArrayList arrayList = new ArrayList(Arrays.asList(this.c.getContactFlowExperimentVariants()));
        arrayList.add(this.c.getMakeOfferExperimentVariant());
        if (arrayList.size() > 0) {
            map.put("experiment_variant", this.d.toJson(arrayList));
        }
        this.a.F0(map);
        map.put("shown_at", this.c.getFromSeeSimilarProduct());
        this.a.B0(map);
        this.a.g(map);
        l0("view_listings", map);
    }

    private Map n(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, Integer num, String str6) {
        Map A = A(str, str2);
        if (str4 != null) {
            A.put("package_id", str4);
        }
        if (adItem != null) {
            if (adItem.getId() != null) {
                A.put(Extras.Constants.ITEM_ID, adItem.getId());
            }
            if (adItem.getCategoryId() != null) {
                this.a.e(A, adItem.getCategoryId());
            }
            if (adItem.getStatus() != null && adItem.getStatus().getStatus() != null) {
                A.put("item_status", adItem.getStatus().getStatus());
            }
            if (adItem.getAdMonetizable() != null && adItem.getAdMonetizable().getLimits() != null) {
                A.put("days_remaining", Integer.valueOf(adItem.getAdMonetizable().getLimits().getNextFreeAdDays()));
            }
            A.put("images_count", Integer.valueOf(adItem.getAllAdPhotos() != null ? adItem.getAllAdPhotos().size() : 0));
        }
        if (packageLocationCategory != null) {
            this.a.e(A, String.valueOf(packageLocationCategory.getCategoryId()));
        }
        if (str3 != null) {
            A.put("product_type", str3);
        }
        if (str5 != null) {
            A.put("reason", str5);
        }
        if (str6 != null) {
            A.put("coupon_code", str6);
        }
        if (num != null) {
            A.put("coupon_discount_percentage", num);
        }
        return A;
    }

    private Map o(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, Coupon coupon, Double d2, Double d3) {
        Map A = A(str, str2);
        if (str3 != null) {
            A.put("package_id", str3);
        }
        if (adItem != null) {
            if (adItem.getId() != null) {
                A.put(Extras.Constants.ITEM_ID, adItem.getId());
            }
            if (adItem.getCategoryId() != null) {
                this.a.e(A, adItem.getCategoryId());
            }
            if (adItem.getStatus() != null && adItem.getStatus().getStatus() != null) {
                A.put("item_status", adItem.getStatus().getStatus());
            }
            if (adItem.getAdMonetizable() != null && adItem.getAdMonetizable().getLimits() != null) {
                A.put("days_remaining", Integer.valueOf(adItem.getAdMonetizable().getLimits().getNextFreeAdDays()));
            }
            A.put("images_count", Integer.valueOf(adItem.getAllAdPhotos() != null ? adItem.getAllAdPhotos().size() : 0));
        }
        if (packageLocationCategory != null) {
            this.a.e(A, String.valueOf(packageLocationCategory.getCategoryId()));
        }
        if (str4 != null) {
            A.put("product_type", str4);
        }
        if (str5 != null) {
            A.put("reason", str5);
        }
        if (str6 != null) {
            A.put(Constants.ExtraKeys.CHOSEN_OPTION, str6);
        }
        if (coupon != null) {
            K(A, "coupon_type", coupon.getType());
            K(A, "coupon_campaign_id", Integer.valueOf(coupon.getCampaignId()));
            K(A, "coupon_code", coupon.getCode());
            K(A, "coupon_id", Integer.valueOf(coupon.getId()));
            if (coupon.getDiscount() != null) {
                K(A, "coupon_discount_amount", Double.valueOf(coupon.getDiscount().getActualDiscount()));
                K(A, "coupon_discount_percentage", Integer.valueOf(coupon.getDiscount().getPercentage()));
            }
            K(A, "initial_value", d3);
        }
        return A;
    }

    private Map p(String str, String str2, String str3, String str4, String str5, AdItem adItem, String str6, PackageLocationCategory packageLocationCategory, String str7, String str8, Integer num) {
        return q(str, str2, str3, str4, str5, adItem, str6, packageLocationCategory, null, null, str7, str8, num);
    }

    private Map q(String str, String str2, String str3, String str4, String str5, AdItem adItem, String str6, PackageLocationCategory packageLocationCategory, String str7, String str8, String str9, String str10, Integer num) {
        Map A = A(str, str2);
        if (str3 != null) {
            A.put("package_id", str3);
        }
        if (adItem != null) {
            if (adItem.getId() != null) {
                A.put(Extras.Constants.ITEM_ID, adItem.getId());
            }
            if (adItem.getCategoryId() != null) {
                this.a.e(A, adItem.getCategoryId());
            }
            if (adItem.getStatus() != null && adItem.getStatus().getStatus() != null) {
                A.put("item_status", adItem.getStatus().getStatus());
            }
            if (adItem.getAdMonetizable() != null && adItem.getAdMonetizable().getLimits() != null) {
                A.put("days_remaining", Integer.valueOf(adItem.getAdMonetizable().getLimits().getNextFreeAdDays()));
            }
            A.put("images_count", Integer.valueOf(adItem.getAllAdPhotos() != null ? adItem.getAllAdPhotos().size() : 0));
        }
        if (packageLocationCategory != null) {
            this.a.e(A, String.valueOf(packageLocationCategory.getCategoryId()));
        }
        if (str6 != null) {
            A.put("order_id", str6);
        }
        if (str4 != null) {
            A.put("product_type", str4);
        }
        if (str5 != null) {
            A.put("reason", str5);
        }
        if (str7 != null) {
            A.put(Constants.ExtraKeys.FLOW_STEP, str7);
        }
        if (str8 != null) {
            A.put(Constants.ExtraKeys.FLOW_TYPE, str8);
        }
        if (str9 != null) {
            A.put("ad_package_price", str9);
        }
        if (str10 != null) {
            A.put(Constants.ExtraKeys.CHOSEN_OPTION, str10);
        }
        String q = this.a.q();
        if (q != null) {
            A.put("campaign_id", q);
        }
        if (num != null) {
            A.put("result_count", num);
        }
        return A;
    }

    private Map r(String str, String str2, String str3) {
        Map y = y(str, str2);
        y.put("error_key", str3);
        return y;
    }

    public static String s(List list) {
        if (list == null || list.isEmpty()) {
            return "";
        }
        Iterator it = list.iterator();
        double d2 = 0.0d;
        while (it.hasNext()) {
            if (((Package) it.next()) != null) {
                d2 += r5.getPrice().getAmount();
            }
        }
        return d2 == 0.0d ? "" : Double.toString(d2);
    }

    private double t(AdItem adItem, PackageLocationCategory packageLocationCategory) {
        if (adItem != null) {
            return adItem.getMapLat();
        }
        if (packageLocationCategory == null || packageLocationCategory.getLat() == null) {
            return 0.0d;
        }
        return packageLocationCategory.getLat().doubleValue();
    }

    private double u(AdItem adItem, PackageLocationCategory packageLocationCategory) {
        if (adItem != null) {
            return adItem.getMapLon();
        }
        if (packageLocationCategory == null || packageLocationCategory.getLon() == null) {
            return 0.0d;
        }
        return packageLocationCategory.getLon().doubleValue();
    }

    private Map v(String str, String str2, String str3, String str4, String str5, AdItem adItem, String str6, PackageLocationCategory packageLocationCategory, String str7, String str8, Integer num) {
        return w(str, str2, str3, str4, str5, adItem, str6, packageLocationCategory, null, null, str7, str8, num, null, null);
    }

    private Map w(String str, String str2, String str3, String str4, String str5, AdItem adItem, String str6, PackageLocationCategory packageLocationCategory, String str7, String str8, String str9, String str10, Integer num, String str11, String str12) {
        Map A = A(str, str2);
        if (str3 != null) {
            A.put("package_id", str3);
        }
        if (adItem != null) {
            if (adItem.getId() != null) {
                A.put(Extras.Constants.ITEM_ID, adItem.getId());
            }
            if (adItem.getCategoryId() != null) {
                this.a.e(A, adItem.getCategoryId());
            }
            if (adItem.getStatus() != null && adItem.getStatus().getStatus() != null) {
                A.put("item_status", adItem.getStatus().getStatus());
            }
            if (adItem.getAdMonetizable() != null && adItem.getAdMonetizable().getLimits() != null) {
                A.put("days_remaining", Integer.valueOf(adItem.getAdMonetizable().getLimits().getNextFreeAdDays()));
            }
            A.put("images_count", Integer.valueOf(adItem.getAllAdPhotos() != null ? adItem.getAllAdPhotos().size() : 0));
        }
        if (packageLocationCategory != null) {
            this.a.e(A, String.valueOf(packageLocationCategory.getCategoryId()));
        }
        if (str6 != null) {
            A.put("order_id", str6);
        }
        if (str4 != null) {
            A.put("product_type", str4);
        }
        if (str5 != null) {
            A.put("payment_mode_type", str5);
        }
        String[] monetizationRunningExperiments = this.c.getMonetizationRunningExperiments();
        if (monetizationRunningExperiments.length > 0) {
            A.put("experiment_variant", this.d.toJson(monetizationRunningExperiments));
        }
        if (str7 != null) {
            A.put(Constants.ExtraKeys.FLOW_STEP, str7);
        }
        if (str8 != null) {
            A.put(Constants.ExtraKeys.FLOW_TYPE, str8);
        }
        if (str9 != null) {
            A.put("ad_package_price", str9);
        }
        if (str10 != null) {
            A.put(Constants.ExtraKeys.CHOSEN_OPTION, str10);
        }
        if (str11 != null) {
            A.put("coupon_campaign_id", str11);
        }
        if (num != null) {
            A.put("result_count", num);
        }
        if (str12 != null) {
            A.put("package_type", str12);
        }
        return A;
    }

    private Map x(String str, String str2, String str3, String str4, String str5, AdItem adItem, String str6, PackageLocationCategory packageLocationCategory, String str7, String str8, String str9, String str10, Integer num, String str11) {
        Map A = A(str, str2);
        if (str3 != null) {
            A.put("package_id", str3);
        }
        if (adItem != null) {
            if (adItem.getId() != null) {
                A.put(Extras.Constants.ITEM_ID, adItem.getId());
            }
            if (adItem.getCategoryId() != null) {
                this.a.e(A, adItem.getCategoryId());
            }
            if (adItem.getStatus() != null && adItem.getStatus().getStatus() != null) {
                A.put("item_status", adItem.getStatus().getStatus());
            }
            if (adItem.getAdMonetizable() != null && adItem.getAdMonetizable().getLimits() != null) {
                A.put("days_remaining", Integer.valueOf(adItem.getAdMonetizable().getLimits().getNextFreeAdDays()));
            }
            A.put("images_count", Integer.valueOf(adItem.getAllAdPhotos() != null ? adItem.getAllAdPhotos().size() : 0));
        }
        if (packageLocationCategory != null) {
            this.a.e(A, String.valueOf(packageLocationCategory.getCategoryId()));
        }
        if (str6 != null) {
            A.put("order_id", str6);
        }
        if (str4 != null) {
            A.put("product_type", str4);
        }
        if (str5 != null) {
            A.put("reason", str5);
        }
        String[] monetizationRunningExperiments = this.c.getMonetizationRunningExperiments();
        if (monetizationRunningExperiments.length > 0) {
            A.put("experiment_variant", this.d.toJson(monetizationRunningExperiments));
        }
        if (str7 != null) {
            A.put(Constants.ExtraKeys.FLOW_STEP, str7);
        }
        if (str8 != null) {
            A.put(Constants.ExtraKeys.FLOW_TYPE, str8);
        }
        if (str9 != null) {
            A.put("ad_package_price", str9);
        }
        if (str10 != null) {
            A.put(Constants.ExtraKeys.CHOSEN_OPTION, str10);
        }
        if (str11 != null) {
            A.put("coupon_campaign_id", str11);
        }
        if (num != null) {
            A.put("result_count", num);
        }
        return A;
    }

    private Map y(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put("origin", str);
        if (str2 != null) {
            p0.put(Constants.Intent.Extra.SELECT_FROM, str2);
        }
        return p0;
    }

    private Map z() {
        Map p0 = this.a.p0();
        String limitFlowEntryPoint = this.c.getLimitFlowEntryPoint();
        String monetSelectFrom = this.c.getMonetSelectFrom();
        if (limitFlowEntryPoint != null) {
            p0.put("entry_point", limitFlowEntryPoint);
        }
        if (monetSelectFrom != null) {
            p0.put(Constants.Intent.Extra.SELECT_FROM, monetSelectFrom);
        }
        return p0;
    }

    public void aasaanJobAdView(AdWidget adWidget, int i) {
        Map N = this.a.N(adWidget);
        f(N);
        T(N);
        U(N);
        this.a.B0(N);
        N.put(Extras.Constants.ITEM_ID, adWidget.getId());
        N.put("feed_version", adWidget.getFeedVersion());
        N.put(Constants.ExtraKeys.CHOSEN_OPTION, Integer.valueOf(i));
        l0("left_to_aj", N);
    }

    public void adMarkAsSoldConfirm(AdItem adItem, Map map) {
        d(map);
        String z0 = this.a.z0();
        if (z0 != null) {
            map.put("wzrk_dl", z0);
        }
        this.a.M(adItem, map);
        a0("ad_mark_sold_confirmed", adItem, map);
    }

    public void adMarkAsSoldSelectBuyer(AdItem adItem, Map map) {
        d(map);
        a0("ad_mark_sold_select", adItem, map);
    }

    public void adTapOnDeactivate(AdItem adItem, String str) {
        Z("ad_deactivate", adItem, str);
    }

    public void adTapOnDeactivateConfirm(AdItem adItem) {
        Y("ad_deactivate_confirm", adItem);
    }

    public void adTapOnEdit(AdItem adItem, String str) {
        Z("ad_edit", adItem, str);
    }

    public void adTapOnLearnMore(AdItem adItem) {
        Y("ad_learn_more", adItem);
    }

    public void adTapOnMarkAsSold(AdItem adItem, String str) {
        HashMap hashMap = new HashMap();
        d(hashMap);
        b0("ad_mark_sold", adItem, hashMap, str);
    }

    public void adTapOnPostNow(AdItem adItem) {
        Y("ad_post_now", adItem);
    }

    public void adTapOnRemove(AdItem adItem, String str) {
        Z("ad_remove", adItem, str);
    }

    public void adTapOnRemoveComplete(AdItem adItem) {
        HashMap hashMap = new HashMap();
        c(hashMap);
        a0("ad_remove_complete", adItem, hashMap);
    }

    public void adTapOnRepublish(AdItem adItem, String str) {
        Z("ad_republish", adItem, str);
    }

    public void adTapOnUpgrade(AdItem adItem) {
        Y("ad_upgrade", adItem);
    }

    public void addFieldUsage(String str, boolean z) {
        this.c.addFieldUsage(str, z);
    }

    public void addFieldUsageFilterV2(String str, String str2) {
        this.c.addViewInteractionsFiltersV2(str, str2);
    }

    public void autosHomePageBannerClick(String str, BrowseMode browseMode) {
        Map p0 = this.a.p0();
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, str);
        p0.put("origin", Constants.Source.HOME);
        p0.put("location_type", this.a.F(this.c.isSellInstant()));
        b(p0, browseMode);
        this.a.g(p0);
        g0("homepage_banner_clicked", p0);
    }

    public void autosHomePageBannerShow(BrowseMode browseMode) {
        Map p0 = this.a.p0();
        b(p0, browseMode);
        p0.put("origin", Constants.Source.HOME);
        p0.put("location_type", this.a.F(this.c.isSellInstant()));
        this.a.g(p0);
        g0("home_top_banner_shown", p0);
    }

    public void cancelSearchComplete(Search search, List list, String str, String str2, boolean z) {
        Map r0 = this.a.r0(search, list, str, str2, true, z);
        T(r0);
        g0("search_complete", r0);
    }

    public void categorySelectionAction(String str, String str2, String str3, String str4) {
        Map p0 = this.a.p0();
        p0.put(Constants.ExtraKeys.FLOW_STEP, str);
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        p0.put("filters", str3);
        p0.put("origin", str4);
        g0("category_selection_action", p0);
    }

    public void categorySelectionShow(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put(Constants.ExtraKeys.FLOW_STEP, str);
        p0.put("origin", str2);
        g0("category_selection_show", p0);
    }

    public void changeLanguageOptionShown(String str) {
        Map p0 = this.a.p0();
        p0.put("origin", str);
        g0("language_update_show", p0);
    }

    public void chatLeadSuccess(boolean z, String str, String str2) {
        Map p0 = this.a.p0();
        this.a.e(p0, str2);
        p0.put(Extras.Constants.ITEM_ID, str);
        p0.put("impressions", Boolean.valueOf(z));
        g0("chat_lead_success", p0);
    }

    public void clearFiltersV2InteractionsState() {
        this.c.clearFiltersV2InteractionsState();
    }

    public void clearSlidersStates() {
        this.c.clearSlidersStates();
    }

    public void cmcBannerShow() {
        g0("cmc_show", this.a.p0());
    }

    public void cmcBannerTap() {
        g0("cmc_select", this.a.p0());
    }

    public void coachMarkChatComplete() {
        f0("coach_mark_chat_complete");
    }

    public void coachMarkChatStart() {
        f0("coach_mark_chat_start");
    }

    public void coachMarkHomeLocationComplete() {
        f0("coach_mark_home_location_complete");
    }

    public void coachMarkHomeLocationStart() {
        f0("coach_mark_home_location_start");
    }

    public void cxeHomePageBannerClick(String str, BrowseMode browseMode, LayoutConfig layoutConfig, String str2, int i, String str3) {
        Map p0 = this.a.p0();
        b(p0, browseMode);
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, str);
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        p0.put("origin", Constants.Source.HOME);
        p0.put("browsing_location_id", layoutConfig.getLocationId());
        p0.put("user_type", layoutConfig.getUserVisit());
        if (TextUtils.isEmpty(str3)) {
            p0.put("reason", new Gson().toJson(layoutConfig.getUserContext()));
        } else {
            p0.put("reason", str3);
        }
        p0.put("acquisition_channel", new Gson().toJson(layoutConfig.getChannelOfAcquisition()));
        p0.put("field_name", "homepage_carousel");
        p0.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        p0.put(Constants.ExtraKeys.FLOW_STEP, Integer.valueOf(i));
        p0.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        this.a.g(p0);
        g0("homepage_banner_clicked", p0);
    }

    public void cxeHomePageBannerShow(BrowseMode browseMode, LayoutConfig layoutConfig, List list, String str) {
        Map p0 = this.a.p0();
        b(p0, browseMode);
        p0.put("origin", Constants.Source.HOME);
        p0.put("browsing_location_id", layoutConfig.getLocationId());
        p0.put("user_type", layoutConfig.getUserVisit());
        if (TextUtils.isEmpty(str)) {
            p0.put("reason", new Gson().toJson(layoutConfig.getUserContext()));
        } else {
            p0.put("reason", str);
        }
        p0.put("acquisition_channel", new Gson().toJson(layoutConfig.getChannelOfAcquisition()));
        p0.put("variants_shown", TextUtils.join(",", list));
        this.a.g(p0);
        g0("home_top_banner_shown", p0);
    }

    public void dataSaverPromptLater() {
        g0("ds_prompt_later", new HashMap());
    }

    public void dataSaverPromptShown() {
        g0("ds_prompt_shown", new HashMap());
    }

    public void dataSaverPromptTurnOn() {
        g0("ds_prompt_on", new HashMap());
    }

    public void dataSaverSettings(boolean z) {
        g0(z ? "ds_settings_enable" : "ds_settings_disable", new HashMap());
    }

    public void deepLinkLaunch(String str, String str2) {
        deepLinkLaunch(str, str2, null);
    }

    public void editItemError(AdItem adItem, String str) {
        Map L = this.a.L(adItem);
        L.put("error_message", str);
        g0("edititem_errors", L);
    }

    public void editingError(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put("error_message", str2);
        p0.put("identifier", str);
        p0.put("field_name", str);
        p0.put("error_key", str2);
        g0("edititem_errors", p0);
    }

    public void filteredCategoryClicked(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("autos_lp_button_tapped", p0);
    }

    public void galleryChatTapChat(AdItem adItem, String str, BrowseMode browseMode, String str2, String str3, String str4) {
        Map L = this.a.L(adItem);
        b(L, browseMode);
        this.c.getContactFlowExperimentVariants();
        U(L);
        S(L, adItem);
        W(L, adItem);
        g(L, adItem);
        L.put("experiment_variant", str);
        L.put("shown_at", str2);
        L.put("chat_origin", Constants.ExtraValues.ADPV);
        L.put("search_type", str3);
        L.put(Constants.ExtraKeys.FLOW_TYPE, "adpage");
        L.put("feed_version", adItem.getFeedVersion());
        e(adItem, L);
        j(L, str4);
    }

    public void galleryChatTapMakeOffer(AdItem adItem, String str, String str2, String str3, String str4, String str5, String str6, String str7) {
        Map L = this.a.L(adItem);
        T(L);
        f(L);
        U(L);
        W(L, adItem);
        g(L, adItem);
        L.put("experiment_variant", str);
        L.put(Constants.Intent.Extra.SELECT_FROM, str2);
        L.put("seller_id", str4);
        L.put("item_price", str5);
        L.put("shown_at", str6);
        L.put("search_type", str7);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str3);
        L.put("feed_version", adItem.getFeedVersion());
        g0("gallery_item_chat_tap_make_offer", L);
    }

    public void galleryTapCall(AdItem adItem, String str, String str2, BrowseMode browseMode, String str3, String str4) {
        Map L = this.a.L(adItem);
        this.a.b(adItem, L, str);
        f(L);
        T(L);
        U(L);
        b(L, browseMode);
        e(adItem, L);
        S(L, adItem);
        W(L, adItem);
        g(L, adItem);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        L.put("feed_version", adItem.getFeedVersion());
        L.put("resultset_type", this.c.getBundleOrigin());
        L.put(Constants.Intent.Extra.SELECT_FROM, str4);
        g0("gallery_item_tap_call", L);
    }

    public String getHydraIdentifier() {
        return ((Tracker) this.h.getValue()).getIdentifier();
    }

    public String getOrigin(VASPurchaseOrigin vASPurchaseOrigin) {
        switch (b.a[vASPurchaseOrigin.ordinal()]) {
            case 1:
                return Constants.Source.POSTING;
            case 2:
                return "myads";
            case 3:
                return "itempage";
            case 4:
                return "landing";
            case 5:
                return SystemMessageDetailParserDeeplinkItem.DEEPLINK;
            case 6:
                return "my_orders";
            default:
                return "";
        }
    }

    public void googlePlayServices(int i) {
        HashMap hashMap = new HashMap();
        hashMap.put("google_play_services_state", this.a.x(i));
        hashMap.put("google_play_services_version", this.a.y());
        g0("google_play_services", hashMap);
    }

    public void inspectionPostingFlowSuccess(AdItem adItem, String str, String str2, String str3, String str4) {
        Map L = this.a.L(adItem);
        L.put(Constants.Intent.Extra.SELECT_FROM, str);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        L.put("origin", str3);
        L.put("inspection_id", str4);
        L.put(Extras.Constants.ITEM_ID, adItem.getId());
        O(L);
        Q(this.c.getAdIndexId(), L);
        String q = this.a.q();
        if (q != null) {
            L.put("campaign_id", q);
        }
        String z0 = this.a.z0();
        if (z0 != null) {
            L.put("wzrk_dl", z0);
        }
        h0(adItem.getMapLat(), adItem.getMapLon(), "posting_successful_post", L);
    }

    public void intentTapCall(AdItem adItem, String str) {
        Map L = this.a.L(adItem);
        f(L);
        L.put(Constants.Intent.Extra.SELECT_FROM, str);
        T(L);
        U(L);
        g0("item_intent_call", L);
    }

    public void itemChatTapChat(AdItem adItem, String str, BrowseMode browseMode, String str2, String str3, String str4, String str5) {
        Map L = this.a.L(adItem);
        this.a.d(adItem, L);
        b(L, browseMode);
        this.c.getContactFlowExperimentVariants();
        U(L);
        L.putAll(this.c.getSearchParams());
        S(L, adItem);
        W(L, adItem);
        g(L, adItem);
        L.put("experiment_variant", str);
        L.put("shown_at", str2);
        L.put("chat_origin", Constants.ExtraValues.ADPV);
        L.put("search_type", str3);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str5);
        L.put("feed_version", adItem.getFeedVersion());
        L.put("seller_id", adItem.getUser().getId());
        e(adItem, L);
        itemChatTapChat(L, str4);
    }

    public void itemChatTapMakeOffer(AdItem adItem, String str, String str2, String str3, String str4, String str5, String str6, String str7) {
        Map L = this.a.L(adItem);
        T(L);
        f(L);
        U(L);
        W(L, adItem);
        g(L, adItem);
        L.put("experiment_variant", str);
        L.put(Constants.Intent.Extra.SELECT_FROM, str2);
        L.put("seller_id", str4);
        L.put("item_price", str5);
        L.put("shown_at", str6);
        L.put("search_type", str7);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str3);
        L.put("feed_version", adItem.getFeedVersion());
        e(adItem, L);
        this.a.m(L);
        g0("item_chat_tap_make_offer", L);
    }

    public void itemIntentChat(AdItem adItem, String str) {
        Map L = this.a.L(adItem);
        T(L);
        L.put(Constants.Intent.Extra.SELECT_FROM, str);
        U(L);
        g0("item_intent_chat", L);
    }

    public void itemScrollImage(String str, String str2, String str3, int i, String str4, String str5) {
        Map p0 = this.a.p0();
        p0.put(Extras.Constants.ITEM_ID, str3);
        p0.put(Constants.Intent.Extra.SELECT_FROM, str4);
        f(p0);
        p0.put("page_number", Integer.valueOf(i));
        p0.put(Constants.ExtraKeys.FLOW_TYPE, str4);
        p0.put(Constants.ExtraKeys.FLOW_STEP, str5);
        p0.put("inspected_type", str);
        p0.put("user_category", str2);
        U(p0);
        this.a.g(p0);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).d(p0);
        g0("item_tap_image_pagination", p0);
    }

    public void itemTapCall(AdItem adItem, String str, String str2, BrowseMode browseMode, String str3, String str4) {
        Map L = this.a.L(adItem);
        this.a.b(adItem, L, str);
        f(L);
        T(L);
        U(L);
        b(L, browseMode);
        e(adItem, L);
        S(L, adItem);
        W(L, adItem);
        g(L, adItem);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        L.put("shown_at", str3);
        L.put("feed_version", adItem.getFeedVersion());
        L.put("resultset_type", this.c.getBundleOrigin());
        L.put(Constants.Intent.Extra.SELECT_FROM, str4);
        this.a.m(L);
        g0("item_tap_call", L);
    }

    public void itemTapCallPressed(AdItem adItem, String str) {
        Map L = this.a.L(adItem);
        this.a.g(L);
        f(L);
        T(L);
        U(L);
        e(adItem, L);
        L.put(Constants.Intent.Extra.SELECT_FROM, str);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).c(adItem, L);
        g0("item_call_button_press", L);
    }

    public void itemTapFav(AdItem adItem, String str) {
        Map L = this.a.L(adItem);
        L.put(Constants.Intent.Extra.SELECT_FROM, str);
        L.put("my_ad", Boolean.valueOf(adItem.isMyAd(com.olxgroup.panamera.app.common.helpers.l.z0())));
        U(L);
        g0("social_tap_like", L);
    }

    public void itemTapInspectedAdIcon() {
        g0("inspected_car_icon", B("listing_page"));
    }

    public void itemTapInspectedAdIconV2(BrowseMode browseMode, String str) {
        SearchExperienceContext searchExperienceResultsContext = ((ResultsContextRepository) this.f.getValue()).getSearchExperienceResultsContext();
        Map hashMap = new HashMap();
        if (str.equals("listing_page")) {
            hashMap = this.c.getSearchParams(searchExperienceResultsContext.getBrowseMode());
        }
        b(hashMap, browseMode);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str);
        U(hashMap);
        T(hashMap);
        this.a.F0(hashMap);
        g0("inspected_car_icon", hashMap);
    }

    public void itemTapMap(AdItem adItem) {
        g0("item_tap_map", this.a.L(adItem));
    }

    public void itemTapPhone(AdItem adItem, String str) {
        Map L = this.a.L(adItem);
        f(L);
        T(L);
        U(L);
        e(adItem, L);
        L.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("item_tap_phone", L);
    }

    public void itemTapUnfav(String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put(Extras.Constants.ITEM_ID, str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        U(hashMap);
        g0("social_tap_unlike", hashMap);
    }

    public void itemTapVerifiedUserIcon() {
        g0("verified_user_icon", B("listing_page"));
    }

    public void itemTapVerifiedUserIconV2(BrowseMode browseMode, String str) {
        SearchExperienceContext searchExperienceResultsContext = ((ResultsContextRepository) this.f.getValue()).getSearchExperienceResultsContext();
        Map hashMap = new HashMap();
        if (str.equals("listing_page")) {
            hashMap = this.c.getSearchParams(searchExperienceResultsContext.getBrowseMode());
        }
        b(hashMap, browseMode);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str);
        U(hashMap);
        T(hashMap);
        this.a.F0(hashMap);
        g0("verified_user_icon", hashMap);
    }

    public void j(Map map, String str) {
        T(map);
        map.put(Constants.Intent.Extra.SELECT_FROM, str);
        U(map);
        g0("gallery_item_tap_chat", map);
    }

    public void listingResultsSummary(Map map) {
        U(map);
        this.a.g(map);
        g0("listings_results_summary", map);
    }

    public void listingSubHeaderProjectFirstTimeCoachMark(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, str);
        p0.put("resultset_id", str2);
        g0("re_first_time_view", p0);
    }

    public void listingSubHeaderProjectsEntryClick(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put("origin", str);
        p0.put("location_id", str2);
        g0("re_tap_projects_entry", p0);
    }

    public void listingSubHeaderProjectsEntryLoad(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, str);
        p0.put("resultset_id", str2);
        g0("re_load_projects_entry", p0);
    }

    public void locationAction(String str, String str2, String str3) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, str);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        hashMap.put("origin", str3);
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        g0("location_action", hashMap);
    }

    public void locationPermissionCompleteAccept(String str) {
        g0("location_permission_complete", this.a.D(str));
    }

    public void locationPermissionCompleteDeny(String str) {
        g0("location_permission_complete", this.a.E(str));
    }

    public void locationPermissionView(String str) {
        g0("location_permission_view", this.a.C(str));
    }

    public void locationShow(String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, str);
        hashMap.put("origin", str2);
        g0("location_show", hashMap);
    }

    public void logErrorOnUploadImage(UploadPhotoResult.ErrorImageUpload errorImageUpload) {
        HashMap hashMap = new HashMap();
        hashMap.put("error_upload_code", Integer.valueOf(errorImageUpload.getErrorCode()));
        hashMap.put("error_upload_filename", errorImageUpload.getFilePath());
        hashMap.put("error_upload_image_width", Integer.valueOf(errorImageUpload.getWidth()));
        hashMap.put("error_upload_image_height", Integer.valueOf(errorImageUpload.getHeight()));
        hashMap.put("error_upload_size", Long.valueOf(errorImageUpload.getSize()));
        g0("image_upload_error", hashMap);
    }

    public void loginAlertClick(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str2);
        p0.put(Constants.ExtraKeys.FLOW_TYPE, str);
        g0("login_alert_notification_tap", p0);
    }

    public void loginAlertPageOpen(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str2);
        p0.put(Constants.ExtraKeys.FLOW_TYPE, str);
        g0("login_alert_notification_open", p0);
    }

    public void logoutUser(String str) {
        Map p0 = this.a.p0();
        p0.put("device_token", str);
        g0("login_sign_out", p0);
    }

    public void makeOfferViewItem(String str, AdItem adItem) {
        Map p0 = this.a.p0();
        p0.putAll(this.a.L(adItem));
        p0.put("experiment_variant", str);
        e(adItem, p0);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).c(adItem, p0);
        g0("maf_view_item", p0);
    }

    public void manageEditRepublishSuccess(AdItem adItem) {
        Map C = C(adItem);
        String editRepublishOriginFlow = this.c.getEditRepublishOriginFlow();
        if (olx.com.delorean.domain.utils.TextUtils.isEmpty(editRepublishOriginFlow)) {
            editRepublishOriginFlow = "ad_edit_updated";
        }
        this.a.j(this.c.getUserPreviousLocation(), C);
        h0(adItem.getFirstLocation().getLatitude(), adItem.getFirstLocation().getLongitude(), editRepublishOriginFlow, C);
    }

    public void monetHelpClick(int i, String str, double d2) {
        monetHelpClick(i, str, d2, null, null, null, null);
    }

    public void myAccountMonetizationTapBillingInfo() {
        f0("myaccount_monetization_tap_billing_info");
    }

    public void myAccountMonetizationTapInvoices() {
        f0("myaccount_monetization_tap_invoices");
    }

    public void myAccountTapNh() {
        f0("myaccount_tap_nh");
    }

    public void myAdsPageNumberError(long j, String str, String str2) {
        Map p0 = this.a.p0();
        p0.put("page_number", Long.valueOf(j));
        p0.put("filters", str);
        p0.put("error_message", str2);
        g0("myads_tap_page_listings_error", p0);
    }

    public void myAdsViewListed() {
        f0("myads_view_listed");
    }

    public void myOrderSelection(String str) {
        g0("myaccount_monetization_orders_tap", y(str, null));
    }

    public void myOrderView(String str, String str2) {
        g0("myaccount_monetization_tap_order_details_tap", y(str, str2));
    }

    public void noLocationFound(String str, String str2) {
        Map p0 = this.a.p0();
        M(p0);
        p0.put("location_type", str2);
        p0.put("search_string", str);
        g0("location_zero_search_result", p0);
    }

    public void onAddVideo(AdItem adItem) {
        HashMap hashMap = new HashMap();
        if (adItem != null) {
            this.a.e(hashMap, adItem.getCategoryId());
            hashMap.put(Extras.Constants.ITEM_ID, adItem.getId());
            if (adItem.getStatus() != null) {
                hashMap.put("item_status", adItem.getStatus().getStatus());
            }
        }
        h0(t(adItem, null), u(adItem, null), "on_add_video", hashMap);
    }

    public void onAppClose() {
        g0("app_close", this.a.p0());
    }

    public void onBillingInformationDetailsSave() {
        d0("billing_information_enter_details_save");
    }

    public void onBillingInformationOrderTap() {
        d0("billing_information_order_tap");
    }

    public void onDestroy() {
        ((Tracker) this.h.getValue()).flushTrackingData();
    }

    public void onFiltersClicked(Map map, String str, String str2) {
        map.put(Constants.Intent.Extra.SELECT_FROM, str);
        map.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        g0("listing_tap_select_filters", map);
    }

    public void onInvoiceDownload() {
        d0("billing_information_invoice_download_tap");
    }

    public void onListingApply(String str, String str2) {
        J(str, str2, ((ResultsContextRepository) this.f.getValue()).getSearchExperienceFilters());
    }

    public void onListingBundleResults(Integer num, Map map, String str, String str2) {
        if (num.intValue() > 0) {
            map.put("result_count", String.valueOf(num));
        }
        if (!str.isEmpty()) {
            if (str2.equals(BundleType.CAROUSEL_WIDGET.name())) {
                map.put("resultset_type", this.c.getCarouselWidgetResultSetType());
            } else {
                map.put("resultset_type", "BUNDLE_" + str);
            }
        }
        map.put("origin", this.c.getListingOrigin());
        T(map);
        U(map);
        String singleEventExperimentVariant = this.c.getSingleEventExperimentVariant();
        ArrayList arrayList = new ArrayList(Arrays.asList(this.c.getContactFlowExperimentVariants()));
        arrayList.add(this.c.getMakeOfferExperimentVariant());
        map.put("shown_at", this.c.getFromSeeSimilarProduct());
        if (singleEventExperimentVariant != null) {
            arrayList.add(singleEventExperimentVariant);
        }
        if (!arrayList.isEmpty()) {
            map.put("experiment_variant", this.d.toJson(arrayList));
        }
        this.a.F0(map);
        this.a.B0(map);
        this.a.g(map);
        this.a.m(map);
        l0("listings_results", map);
    }

    public void onListingResults(Long l, Integer num, Long l2, Long l3, String str, Map map, boolean z, int i, String str2, String str3, String str4) {
        if (l3 != null && l3.longValue() > 0) {
            map.put("suggested_ads_count", String.valueOf(l3));
        }
        map.put("aj_ad_count", String.valueOf(i));
        map.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        if (olx.com.delorean.domain.utils.TextUtils.isNotEmpty(str3)) {
            map.put("search_string", str3);
        }
        if (olx.com.delorean.domain.utils.TextUtils.isNotEmpty(str4)) {
            map.put("item_ids", str4);
        }
        onListingResults(l, num, l2, str, map, z);
    }

    public void onListingTap() {
        g0("listing_tap_select_filters", this.a.p0());
    }

    public void onLocationComplete(String str, String str2, long j) {
        HashMap hashMap = new HashMap();
        hashMap.put("location_type", str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        hashMap.put("place_selected_id", Long.valueOf(j));
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        this.a.F0(hashMap);
        P(hashMap);
        l0("location_complete", hashMap);
    }

    public void onLocationCompleteWithLevel(String str, String str2, long j, int i) {
        HashMap hashMap = new HashMap();
        hashMap.put("location_type", str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        hashMap.put("place_selected_id", Long.valueOf(j));
        hashMap.put("location_level", Integer.valueOf(i));
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        this.a.F0(hashMap);
        P(hashMap);
        l0("location_complete", hashMap);
    }

    public void onLocationSelected(int i, String str) {
        Map p0 = this.a.p0();
        M(p0);
        P(p0);
        p0.put(Constants.Intent.Extra.SELECT_FROM, Integer.valueOf(i));
        p0.put("location_type", str);
        p0.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        g0("location_complete", p0);
    }

    public void onLocationStart(String str, String str2, long j) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str);
        hashMap.put("init_location", str2);
        hashMap.put("place_selected_id", Long.valueOf(j));
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        this.a.F0(hashMap);
        l0("location_start", hashMap);
    }

    public void onMapLocationError(String str, String str2) {
        Map p0 = this.a.p0();
        M(p0);
        p0.put("map_change_location", str);
        p0.put("location_type", "map_changed");
        p0.put("error_message", str2);
        g0("location_error", p0);
    }

    public void onMapPickerScreenLaunched() {
        Map p0 = this.a.p0();
        this.a.F0(p0);
        M(p0);
        g0("posting_location_start", p0);
    }

    public void onMonetizationPaymentCancel(PaymentContext paymentContext, String str, String str2) {
        paymentContext.setValueForTrackingReason(str);
        i0("monet_payment_cancel", paymentContext, str2);
    }

    public void onMonetizationPaymentError(PaymentContext paymentContext, String str, String str2) {
        paymentContext.setValueForTrackingReason(str);
        i0("monet_payment_error", paymentContext, str2);
    }

    public void onMonetizationPaymentIframeError(PaymentContext paymentContext, String str, String str2) {
        paymentContext.setValueForTrackingReason(str);
        i0("monet_payment_iframe_error", paymentContext, str2);
    }

    public void onMonetizationPaymentIframeView(PaymentContext paymentContext, String str, String str2) {
        paymentContext.setValueForTrackingReason(str);
        i0("monet_payment_iframe_screen", paymentContext, str2);
    }

    public void onNewFiltersClicked(Map map, String str, String str2) {
        map.put(Constants.Intent.Extra.SELECT_FROM, str);
        map.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        g0("quick_filters_select", map);
    }

    public void onNotResultsLocationTree(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("search_string", str);
        this.a.F0(hashMap);
        l0("tree_location_zero_search", hashMap);
    }

    public void onPermissionDeny(String str, String str2) {
        onPermissionDeny(str, str2, null);
    }

    public void onPermissionDialogTapOk(String str, String str2) {
        onPermissionDialogTapOk(str, str2, null);
    }

    public void onPermissionNeverAskAgain(String str, String str2) {
        g0("permissions_tap_never_ask_again", this.a.q0(str, str2));
    }

    public void onResume() {
        g0("on_resume", this.a.p0());
    }

    public void onSortingApply(String str, String str2) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str2);
        searchParams.put("sorting_applied", str);
        T(searchParams);
        g0("listing_tap_apply_sorting", searchParams);
    }

    public void onSortingTap(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, "filters");
        p0.put("sorting_applied", str);
        g0("listing_tap_select_sorting", p0);
    }

    public void onTreeLocationComplete(int i, String str, List list, String str2, String str3) {
        HashMap hashMap = new HashMap();
        hashMap.put("place_selected_id", list);
        hashMap.put("origin", this.a.H(i));
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str);
        hashMap.put("search_type", str2);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str3);
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        this.a.F0(hashMap);
        P(hashMap);
        g0("tree_location_complete", hashMap);
    }

    public void onVisualizationApplied(String str, String str2) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put("visual_applied", str);
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str2);
        T(searchParams);
        g0("listing_tap_apply_visualization", searchParams);
    }

    public void onVisualizationTap(String str) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put("visual_applied", str);
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, "filters");
        T(searchParams);
        g0("listing_tap_select_visualization", searchParams);
    }

    public void postReturnUserJourneyEvent(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        g0("autos_lp_button_tapped", p0);
    }

    public void postingAutoSuggestComplete(String str, String str2) {
        Map g0 = this.a.g0(((PostingDraftRepository) this.g.getValue()).getPostingDraft());
        this.a.F0(g0);
        M(g0);
        Q(this.c.getAdIndexId(), g0);
        P(g0);
        g0.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        g0("ad_title_complete", g0);
    }

    public void postingCategoryManualStart() {
        Map p0 = this.a.p0();
        this.a.F0(p0);
        M(p0);
        Q(this.c.getAdIndexId(), p0);
        p0.put("reason", this.c.getManualCategoryReason());
        g0("posting_category_manual_start", p0);
    }

    public void postingFlowSuccess(AdItem adItem) {
        Map L = this.a.L(adItem);
        M(L);
        R(L);
        Q(this.c.getAdIndexId(), L);
        String q = this.a.q();
        if (q != null) {
            L.put("campaign_id", q);
        }
        String z0 = this.a.z0();
        if (z0 != null) {
            L.put("wzrk_dl", z0);
        }
        h0(adItem.getMapLat(), adItem.getMapLon(), "posting_successful_post", L);
    }

    public void postingInteractChangeLocationDialog(String str) {
        Map p0 = this.a.p0();
        this.a.F0(p0);
        M(p0);
        Q(this.c.getAdIndexId(), p0);
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, str);
        p0.put(Constants.ExtraKeys.FLOW_STEP, "location");
        g0("popup_interact", p0);
    }

    public void postingTapContinueDraft(String str) {
        Map g0 = this.a.g0(((PostingDraftRepository) this.g.getValue()).getPostingDraft());
        this.a.F0(g0);
        M(g0);
        Q(this.c.getAdIndexId(), g0);
        g0.put("user_id", com.olxgroup.panamera.app.common.helpers.l.z0());
        g0.put("origin", this.c.getOriginPostingFlow());
        g0.put("verified_lister", Integer.valueOf(this.c.hasPhoneVerification()));
        if (!TextUtils.isEmpty(str)) {
            this.l = str;
            P(g0);
        }
        g0("posting_tap_continue_draft", g0);
    }

    public void postingTapPost(String str) {
        this.c.setPhoneVerified(((UserSessionRepository) this.e.getValue()).hasPhoneVerification());
        this.c.setAdIndexId(str);
    }

    public void postingTapStartNewAd() {
        Map p0 = this.a.p0();
        this.a.F0(p0);
        M(p0);
        Q(this.c.getAdIndexId(), p0);
        g0("posting_tap_start_new_ad", p0);
    }

    public void postingTapSubmitPost() {
        Map g0 = this.a.g0(((PostingDraftRepository) this.g.getValue()).getPostingDraft());
        this.a.F0(g0);
        if (com.olxgroup.panamera.app.common.helpers.l.R0()) {
            g0.put("level", Integer.valueOf(com.olxgroup.panamera.app.common.helpers.l.r0()));
        }
        M(g0);
        Q(this.c.getAdIndexId(), g0);
        P(g0);
        g0("posting_tap_submit_post", g0);
    }

    public void realEstateProjectDetailCallNowButtonClick(String str, Integer num, Integer num2, String str2, String str3, String str4) {
        k0("project_detail_page_call_now", str, num, num2, str2, null, str3, str4);
    }

    public void realEstateProjectDetailEnquiryButtonClick(String str, Integer num, Integer num2, String str2, String str3, String str4) {
        k0("project_detail_page_enquire_now", str, num, num2, str2, null, str3, str4);
    }

    public void realEstateProjectDetailFloorPlanUnitTabSwitch(String str, Integer num, Integer num2, Integer num3, String str2) {
        k0("project_detail_page_switch_unit_config_tab", str, num2, num3, null, num, str2, null);
    }

    public void realEstateProjectDetailFloorPlanUnitTypeClick(String str, Integer num, Integer num2, Integer num3) {
        k0("project_detail_page_tap_unit_config_card", str, num2, num3, null, num, null, null);
    }

    public void realEstateProjectDetailInnerPageOpenClick(String str, Integer num, Integer num2, String str2) {
        k0("project_detail_page_tap_expand", str, num, num2, null, null, str2, null);
    }

    public void realEstateProjectDetailMapClick(Integer num, Integer num2) {
        k0("project_detail_page_tap_on_map", null, num, num2, null, null, null, null);
    }

    public void realEstateProjectDetailPageShareClick(Integer num, Integer num2) {
        k0("project_detail_page_tap_share", null, num, num2, null, null, null, null);
    }

    public void realEstateProjectDetailViewImage(String str, Integer num, Integer num2, Integer num3) {
        k0("project_detail_page_view_image", str, num2, num3, null, num, null, null);
    }

    public void realEstateProjectListingChangeLocation(String str, String str2) {
        g0("re_listings_change_location", this.a.i0(null, null, null, null, str, null, null, str2, null));
    }

    public void realEstateProjectListingFirstLoad(String str, Integer num, Integer num2, String str2) {
        Map i0 = this.a.i0(null, num2, null, null, str2, null, str, null, null);
        i0.put("result_count", num);
        g0("re_listings_page_open", i0);
    }

    public void realEstateProjectListingImpressions(Integer num, Integer num2, String str, String str2) {
        g0("re_listings_project_impressions", this.a.i0(num, num2, null, null, str2, str, null, null, null));
    }

    public void realEstateProjectListingItemTap(Integer num, Integer num2, Integer num3, boolean z, String str, String str2) {
        g0("re_listings_tap_project", this.a.i0(num, num2, num3, Boolean.valueOf(z), str, null, null, null, str2));
    }

    public void realEstateProjectListingPageEnd(String str, String str2) {
        Map i0 = this.a.i0(null, null, null, null, str, null, null, null, null);
        i0.put("reason", str2);
        g0("re_listings_end_of_page", i0);
    }

    public long resetResultSetTimestamp() {
        long currentTimeMillis = System.currentTimeMillis();
        this.j = currentTimeMillis;
        return currentTimeMillis;
    }

    public void restrictSpamChat(String str, String str2, String str3) {
        Map p0 = this.a.p0();
        p0.put("origin", str);
        p0.put("item_price", str2);
        p0.put(Extras.Constants.ITEM_ID, str3);
        g0("restricted_spam_chat", p0);
    }

    public void reviewAction(Review review, String str, String str2) {
        g0("rating_action", D(review, str, str2));
    }

    public void reviewError(Review review, String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, str2);
        hashMap.put("error_type", str);
        g0("rating_error", hashMap);
    }

    public void reviewShow(Review review, String str) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, str);
        g0("rating_show", hashMap);
    }

    public void searchComplete(Search search, List list, String str, String str2, boolean z, boolean z2) {
        Map r0 = this.a.r0(search, list, str, str2, false, z2);
        T(r0);
        V(r0, com.olxgroup.panamera.app.common.helpers.l.s0() || z);
        this.a.F0(r0);
        this.a.B0(r0);
        g0("search_complete", r0);
    }

    public void searchGeoComplete(String str) {
        Map searchParams = this.c.getSearchParams();
        T(searchParams);
        searchParams.put("location_id", str);
        V(searchParams, false);
        this.a.F0(searchParams);
        g0("search_geo_complete", searchParams);
    }

    public void searchGeoStart() {
        Map searchParams = this.c.getSearchParams();
        T(searchParams);
        V(searchParams, false);
        this.a.F0(searchParams);
        g0("search_geo_start", searchParams);
    }

    public void searchMapLocationInput(int i, String str, List list, Search search, String str2) {
        Map s0 = this.a.s0(str, list, search);
        s0.putAll(this.a.B(i));
        if (s0.get("origin") == Constants.Source.POSTING) {
            s0.put(Constants.Intent.Extra.SELECT_FROM, this.c.getOriginPostingFlow());
            P(s0);
        } else {
            s0.put(Constants.Intent.Extra.SELECT_FROM, str2);
        }
        s0.putAll(this.a.g0(((PostingDraftRepository) this.g.getValue()).getPostingDraft()));
        g0("map_location_input", s0);
    }

    public void searchStart() {
        Map searchParams = this.c.getSearchParams();
        T(searchParams);
        V(searchParams, false);
        this.a.F0(searchParams);
        g0("search_start", searchParams);
    }

    public void sendConnectionStatus(String str) {
        Map p0 = this.a.p0();
        p0.put("filters", str);
        g0("chat_unable_to_connect", p0);
    }

    public void sendExternalCategoryImpressions(Set set) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, com.adtmonetize.sdk.code.y.a(",", set));
        this.a.F0(p0);
        g0("external_icon_shown", p0);
    }

    public void sendTopCategoryImpressions(Set set, String str) {
        Map p0 = this.a.p0();
        if (!set.isEmpty()) {
            p0.put("impressions", Arrays.toString(set.toArray()).replace(Constants.SPACE_STRING, ""));
        }
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        this.a.F0(p0);
        g0("browse_category_show", p0);
    }

    public void setPlacePathUseCase(PlacePathUseCase placePathUseCase) {
        this.k = placePathUseCase;
    }

    public void setResultSetTimestamp(long j) {
        this.j = j;
    }

    public Map setTrackingVariant(Map map, String str) {
        if (str != null) {
            map.put("experiment_variant", str);
        }
        return map;
    }

    public void socialOwnShowFollowers(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("social_view_own_followers", p0);
    }

    public void socialOwnShowFollowings(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("social_view_own_followings", p0);
    }

    public void socialTapReportItem(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put("reason", str);
        p0.put("origin", str2);
        g0("trust_tap_report_ad", p0);
    }

    public void socialTapReportUser(String str, String str2, String str3) {
        Map p0 = this.a.p0();
        p0.put("reason", str);
        p0.put("origin", str3);
        if (!TextUtils.isEmpty(str2)) {
            p0.put("user_affected", str2);
        }
        g0("trust_tap_report_user", p0);
    }

    public void socialViewLiked(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("social_view_liked", p0);
    }

    public void socialViewListed(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("social_view_listed", p0);
    }

    public void tapExploreInBottomNavigation(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("explore_tap", p0);
    }

    public void tapMyAdsInBottomNavigation(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("my_ads", p0);
    }

    public void tapTermsAgree() {
        f0("terms_agree");
    }

    public void tapTermsDeny() {
        f0("terms_deny");
    }

    public void tapTermsViewMore(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, this.a.w(str));
        g0("terms_view_more", hashMap);
    }

    public void tapTryAgain(String str, String str2, String str3) {
        g0("error_page_tryagain", r(str, str2, str3));
    }

    public void tapVerifiedAccount() {
        Map g0 = this.a.g0(((PostingDraftRepository) this.g.getValue()).getPostingDraft());
        if (com.olxgroup.panamera.app.common.helpers.l.R0()) {
            g0.put("level", Integer.valueOf(com.olxgroup.panamera.app.common.helpers.l.r0()));
        }
        M(g0);
        Q(this.c.getAdIndexId(), g0);
        P(g0);
        g0("posting_tap_verify_account", g0);
    }

    public void testTracking() {
        g0("tracking_successful", this.a.p0());
    }

    public void track(Event event) {
        ((Tracker) this.h.getValue()).track(event);
    }

    public void trackAdBannerEvent(String str, AdItem adItem, String str2, String str3) {
        Map L = this.a.L(adItem);
        L.put("tag_check", str2);
        L.put(Constants.Intent.Extra.SELECT_FROM, str3);
        g0(str, L);
    }

    public void trackAdBannerView(AdItem adItem, String str) {
        Map L = this.a.L(adItem);
        List additionalBanners = adItem.getAdditionalBanners();
        ArrayList arrayList = new ArrayList();
        Iterator it = additionalBanners.iterator();
        while (it.hasNext()) {
            arrayList.add(((AdditionalBanner) it.next()).getBannerType());
        }
        L.put(Constants.Intent.Extra.SELECT_FROM, str);
        L.put("tag_check", com.adtmonetize.sdk.code.y.a(",", arrayList));
        l0("adpv_banner_visible", L);
    }

    public void trackAdImpressions(List list, String str) {
        HashMap hashMap = new HashMap();
        ArrayList arrayList = new ArrayList();
        Iterator it = list.iterator();
        while (it.hasNext()) {
            AdItem adItem = (AdItem) it.next();
            HashMap hashMap2 = new HashMap();
            hashMap2.put(Extras.Constants.ITEM_ID, adItem.getId());
            boolean z = false;
            hashMap2.put("ptt", Boolean.valueOf(adItem.getPttId() != null));
            if (adItem.getBttPackageId() != null) {
                z = true;
            }
            hashMap2.put("btt", Boolean.valueOf(z));
            hashMap2.put("featured", Boolean.valueOf(adItem.isFeatured()));
            hashMap2.putAll(this.a.L(adItem));
            arrayList.add(hashMap2);
        }
        hashMap.put("impressions", arrayList);
        g0("ad_impression_data", hashMap);
    }

    public void trackAdOpenFromStory(String str, String str2, String str3, int i) {
        HashMap hashMap = new HashMap();
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
        hashMap.put(Extras.Constants.ITEM_ID, str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        hashMap.put("position", Integer.valueOf(i));
        hashMap.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        this.a.g(hashMap);
        if (str3 != null) {
            this.a.e(hashMap, str3);
        }
        g0("story_clicked", hashMap);
    }

    public void trackAddPackageToCart(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "cart_item_incremented", v(str, str2, str4, str3, str5, adItem, null, packageLocationCategory, null, null, null));
    }

    public void trackApplyFilter(String str) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        T(searchParams);
        g0("listing_tap_apply_filters", searchParams);
    }

    public void trackAttributeSearchBack(String str, String str2) {
        c0("filter_tree_back", str, str2);
    }

    public void trackAttributeSearchComplete(String str, String str2) {
        c0("filter_search_complete", str, str2);
    }

    public void trackAttributeSearchItemSelect(String str, String str2) {
        c0("filter_tree_select", str, str2);
    }

    public void trackAttributeSearchStart(String str, String str2) {
        c0("filter_search_start", str, str2);
    }

    public void trackAutoPostingEvent(String str, Map map) {
        Map g0 = this.a.g0(((PostingDraftRepository) this.g.getValue()).getPostingDraft());
        this.a.F0(map);
        Q(this.c.getAdIndexId(), map);
        map.put("login_method", this.a.G());
        map.put(Extras.Constants.ITEM_ID, this.c.getItemId());
        if (TextUtils.isEmpty(this.l) && ((PostingDraftRepository) this.g.getValue()).getPostingDraft() != null) {
            this.l = ((PostingDraftRepository) this.g.getValue()).getPostingDraft().getCategoryId();
        }
        P(map);
        map.putAll(g0);
        g0(str, map);
    }

    public void trackBackPressed(HashMap hashMap) {
        g0(com.olxgroup.panamera.app.common.tracking.e.b, hashMap);
    }

    public void trackBaxterEvent(String str, Map map) {
        g0(str, map);
    }

    public void trackCaraouselWidgetViewAll(Map map, String str) {
        map.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("inspected_ad_view_all", map);
    }

    public void trackCategoryChangeDialogAction(String str, String str2, boolean z) {
        Map k = k(str, str2);
        if (z) {
            k.put(Constants.ExtraKeys.CHOSEN_OPTION, "change");
        } else {
            k.put(Constants.ExtraKeys.CHOSEN_OPTION, "cancel");
        }
        g0("category_change", k);
    }

    public void trackCategoryChangeStart(String str, String str2) {
        g0("category_change_start", k(str, str2));
    }

    public String trackCategorySelected(String str, String str2, boolean z) {
        if (olx.com.delorean.domain.utils.TextUtils.isEmpty(str)) {
            I();
            return "all_categories";
        }
        e0(str, str2, z);
        return str2;
    }

    public void trackClearAllFilter(String str, String str2) {
        g0("clear_all_filter", k(str2, str));
    }

    public void trackCloseFilterPane(String str, Map map, SearchExperienceFilters searchExperienceFilters) {
        searchExperienceFilters.setParams(map);
        Map searchParams = this.c.getSearchParams(searchExperienceFilters, false);
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("filter_pane_close", searchParams);
    }

    public void trackCloseFilterPanePopup(String str, String str2) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        searchParams.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        g0("filter_pane_close_confirmation", searchParams);
    }

    public void trackCoachMark(CoachMarkChosenOptions coachMarkChosenOptions) {
        Map p0 = this.a.p0();
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, coachMarkChosenOptions.getTag());
        U(p0);
        T(p0);
        this.a.F0(p0);
        p0.putAll(this.c.getSearchParams());
        g0("lp_gif", p0);
    }

    public void trackCouponApplied(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, Coupon coupon) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_coupon_applied", l(str, str2, str4, str3, str5, adItem, packageLocationCategory, str6, coupon));
    }

    public void trackCouponReadMore(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, Integer num, String str6) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_cart_scr_coupon_read_more", n(str, str2, str3, str4, str5, adItem, packageLocationCategory, num, str6));
    }

    public void trackCouponRemove(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, Coupon coupon) {
        Double valueOf = coupon.getDiscount() != null ? Double.valueOf(coupon.getDiscount().getActualDiscount()) : null;
        Double valueOf2 = Double.valueOf(coupon.getFinalCartValue());
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_coupon_remove", o(str, str2, str4, str3, str5, adItem, packageLocationCategory, str6, coupon, valueOf, (valueOf2 == null || valueOf == null) ? null : Double.valueOf(valueOf2.doubleValue() + valueOf.doubleValue())));
    }

    public void trackCouponViewAll(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, Integer num) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_cart_scr_coupon_view_all", p(str, str2, str4, str3, str5, adItem, null, packageLocationCategory, null, str6, num));
    }

    public void trackCovidBannerClick() {
        Map p0 = this.a.p0();
        p0.put("origin", Constants.Source.HOME);
        g0("tap_covid_banner", p0);
    }

    public void trackCovidBannerLoad() {
        Map p0 = this.a.p0();
        p0.put("origin", Constants.Source.HOME);
        g0("covid_banner_visible", p0);
    }

    public void trackCxeBannerCarouselHome(String str, String str2, String str3) {
        Map p0 = this.a.p0();
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        p0.put(Constants.Intent.Extra.BROWSING_MODE, "browse");
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        T(p0);
        g0(str3, p0);
    }

    public void trackCxeEvent(String str, Map map) {
        map.putAll(this.a.p0());
        U(map);
        T(map);
        this.a.F0(map);
        this.a.g(map);
        map.putAll(this.c.getSearchParams());
        g0(str, map);
    }

    public void trackDisableNotificationPopUpReminderClick(String str, String str2) {
        g0("notification_reminder_click", this.a.K(str2, str));
    }

    public void trackDisableNotificationPopUpReminderView(String str) {
        g0("notification_reminder_view", this.a.J(str));
    }

    public void trackEliteBuyerFaqScreen(Integer num) {
        g0("elite_buyer_faq_screen", this.a.R(num));
    }

    public void trackEliteBuyerLocationSelect(Integer num) {
        g0("elite_buyer_location_select", this.a.l0(num));
    }

    public void trackEliteBuyerSuccessScreen(String str, String str2, String str3, String str4, String str5, String str6) {
        g0("elite_buyer_success_screen", this.a.T(str, str2, str3, str4, str5, str6));
    }

    public void trackEliteLandingPage() {
        g0("elite_buyer_landing_page", this.a.S());
    }

    public void trackEliteProCallNumber(Integer num, String str, Integer num2, Integer num3) {
        g0("elite_pro_call_number", this.a.U(num, str, num2, num3));
    }

    public void trackEliteProDashboardNullListing(Integer num) {
        g0("elite_pro_dashboard_null_listings", this.a.n0(num));
    }

    public void trackEliteProDashboardRenewShow(Integer num, String str) {
        g0("elite_pro_dashboard_renew_shown", this.a.W(num, str));
    }

    public void trackEliteProDashboardShow(Integer num, String str) {
        g0("elite_pro_dashboard_shown", this.a.X(num, str));
    }

    public void trackEliteProFilterApply(Integer num) {
        g0("elite_pro_filter_apply", this.a.Y(num));
    }

    public void trackEliteProFilterSelect(Integer num) {
        g0("elite_pro_filter_select", this.a.Y(num));
    }

    public void trackEliteProHelpPopUpClick(String str) {
        g0("elite_pro_help_popup_click", this.a.Z(str));
    }

    public void trackEliteProHelpPopUpShow() {
        g0("elite_pro_help_popup_shown", this.a.a0());
    }

    public void trackEliteProHowItWorksPopUpShow() {
        g0("elite_pro_how_it_works_popup_shown", this.a.b0());
    }

    public void trackEliteProRenewClick() {
        g0("elite_pro_renew_click", this.a.c0());
    }

    public void trackEliteProSubCategorySelect(Integer num) {
        g0("elite_pro_subcategory_select", this.a.V(num));
    }

    public void trackEliteProViewDashNoSuccess(String str) {
        g0("elite_pro_view_dash_no_success", this.a.m0(str));
    }

    public void trackEliteProViewNumber(Integer num, Integer num2, Integer num3, Integer num4, Integer num5) {
        g0("elite_pro_view_number", this.a.d0(num, num2, num3, num4, num5));
    }

    public void trackEliteProViewNumberNoSuccess(Integer num, String str, Integer num2) {
        g0("elite_pro_view_number_no_success", this.a.e0(num, str, num2));
    }

    public void trackError(String str, String str2, String str3) {
        g0("error_page_load", r(str, str2, str3));
    }

    public void trackExplicitFilterShownEvent() {
        f0("re_filters_screen_shown");
    }

    public void trackExternalCategorySelected(String str) {
        Map p0 = this.a.p0();
        if (olx.com.delorean.domain.utils.TextUtils.isNotEmpty(str)) {
            p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        }
        g0("external_icon_clicked", p0);
    }

    public void trackFeaturesViewAll(String str, String str2, int i) {
        HashMap hashMap = new HashMap();
        this.a.e(hashMap, str2);
        hashMap.put(Extras.Constants.ITEM_ID, str);
        hashMap.put("result_count", Integer.valueOf(i));
        l0("feature_view_all", hashMap);
    }

    public void trackFilterPageSearchComplete(String str, String str2) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        searchParams.put("search_user_query", str2);
        this.a.F0(searchParams);
        g0("search_complete", searchParams);
    }

    public void trackFilterPageSearchStart(String str) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        T(searchParams);
        this.a.F0(searchParams);
        g0("search_start", searchParams);
    }

    public void trackFilterScroll(String str, String str2) {
        Map k = k(str2, str);
        k.put(Constants.Intent.Extra.SELECT_FROM, str);
        g0("filter_scroll", k);
    }

    public void trackFilterTapRemove(String str, Map map, SearchExperienceFilters searchExperienceFilters, String str2, String str3) {
        searchExperienceFilters.setParams(map);
        Map searchParams = this.c.getSearchParams(searchExperienceFilters, false);
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        searchParams.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        searchParams.put("filters_interaction", str3);
        T(searchParams);
        g0("listing_tap_remove_filters", searchParams);
    }

    public void trackFilterTypeSelect(String str, Map map, SearchExperienceFilters searchExperienceFilters, String str2) {
        searchExperienceFilters.setParams(map);
        Map searchParams = this.c.getSearchParams(searchExperienceFilters, false);
        searchParams.put("filters_interaction", this.c.getFiltersV2Interactions());
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        searchParams.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        T(searchParams);
        g0("filter_type_select", searchParams);
    }

    public void trackFilteredCategorySelected(String str, String str2, String str3) {
        Map p0 = this.a.p0();
        p0.put("origin", str);
        p0.put(Constants.Intent.Extra.SELECT_FROM, str2);
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, str3);
        this.a.F0(p0);
        g0("browse_category_select", p0);
    }

    public void trackGalleryViewEvent(String str, String str2, Map map) {
        str.hashCode();
        if (str.equals("posting_photos")) {
            j0(str2, map);
        }
    }

    public void trackGetDirectionClick(String str, String str2, String str3, String str4, String str5, String str6, String str7) {
        Map p0 = this.a.p0();
        this.a.e(p0, str7);
        this.a.g(p0);
        p0.put(Extras.Constants.ITEM_ID, str6);
        p0.put("credits", str3);
        p0.put("origin", str4);
        p0.put(Constants.Intent.Extra.SELECT_FROM, str5);
        p0.put("inspected_type", str);
        p0.put("user_category", str2);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).d(p0);
        g0("get_direction", p0);
    }

    public void trackInspectionImageScroll(String str, String str2, String str3, String str4, int i, String str5, String str6) {
        HashMap hashMap = new HashMap();
        this.a.e(hashMap, str5);
        hashMap.put(Extras.Constants.ITEM_ID, str3);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str4);
        hashMap.put("page_number", Integer.valueOf(i));
        hashMap.put(Constants.ExtraKeys.FLOW_TYPE, "full_image_view");
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, "ADP");
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str6);
        hashMap.put("inspected_type", str);
        hashMap.put("user_category", str2);
        this.a.g(hashMap);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).d(hashMap);
        l0("item_tap_image_pagination", hashMap);
    }

    public void trackIntentCaptureDialogAction(String str, String str2) {
        HashMap hashMap = new HashMap();
        if (str != null) {
            hashMap.put("category_level1_id", str);
        }
        hashMap.put("action", str2);
        g0("buy_intent_banner_action", hashMap);
    }

    public void trackIntentCaptureDialogFeatureFilled(String str, String str2) {
        HashMap hashMap = new HashMap();
        if (str != null) {
            hashMap.put("category_level1_id", str);
        }
        hashMap.put("feature_name", str2);
        g0("buy_intent_feature_filled", hashMap);
    }

    public void trackIntentCaptureDialogShown(String str) {
        HashMap hashMap = new HashMap();
        if (str != null) {
            hashMap.put("category_level1_id", str);
        }
        g0("buy_intent_banner_shown", hashMap);
    }

    public void trackIntentCaptureDialogSubmit(String str, String str2) {
        HashMap hashMap = new HashMap();
        if (str != null) {
            hashMap.put("category_level1_id", str);
        }
        hashMap.put("feature_name", str2);
        g0("buy_intent_submit", hashMap);
    }

    public void trackInvalidCoupon(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, String str7) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_coupon_not_valid", m(str, str2, str4, str3, str5, adItem, packageLocationCategory, str6, str7));
    }

    public void trackItemCall(AdWidget adWidget, String str, String str2, String str3, BrowseMode browseMode) {
        Map N = this.a.N(adWidget);
        this.a.B0(N);
        this.a.c(adWidget.getAdAttributes(), N, str3);
        N.put("user_category", adWidget.getUserInfoType().getValue());
        N.put("item_price", Long.valueOf(adWidget.getAdPrice().getValue().getRaw()));
        N.put(Extras.Constants.ITEM_ID, adWidget.getId());
        N.put(Constants.Intent.Extra.SELECT_FROM, str3);
        N.put(Constants.ExtraKeys.CHOSEN_OPTION, str);
        N.put("origin", str2);
        if (browseMode != null) {
            N.put(Constants.Intent.Extra.BROWSING_MODE, com.olxgroup.panamera.app.buyers.listings.tracking.b.a.a(browseMode));
        }
        this.a.m(N);
        l0("item_tap_call", N);
    }

    public void trackMonetBillingSelection(String str, String str2, String str3, String str4, AdItem adItem, PackageLocationCategory packageLocationCategory) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "myaccount_monetization_billing_info_tap", v(str, null, str2, str3, str4, adItem, null, packageLocationCategory, null, null, null));
    }

    public void trackMonetBusinessStart(String str, String str2, String str3, String str4, AdItem adItem, PackageLocationCategory packageLocationCategory, Integer num, String str5) {
        Map w = w(str, str2, null, str3, str4, adItem, null, packageLocationCategory, str5, null, null, null, null, null, null);
        if (num != null) {
            w.put("result_count", num);
        }
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_business_start", w);
    }

    public void trackMonetCartExploreAllClick(String str) {
        Map z = z();
        this.a.e(z, str);
        if (this.e.getValue() != null) {
            z.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        }
        TrackingContextRepository trackingContextRepository = this.c;
        if (trackingContextRepository != null) {
            z.put("origin", trackingContextRepository.getOriginPostingFlow());
        }
        g0("monet_cart_scr_explore_all_click", z);
    }

    public void trackMonetCategorySelect(Integer num) {
        g0("monet_category_select", this.a.V(num));
    }

    public void trackMonetDraftDialogStatus(MonetCartStatusResponse.MonetDraftCartData.MonetDraftPageStatus monetDraftPageStatus, Integer num, Integer num2, MonetCartStatusResponse.MonetDraftCartData.MonetDraftCartStatus monetDraftCartStatus, String str, MonetCartStatusResponse.MonetDraftCartData.AdData adData) {
        HashMap hashMap = new HashMap();
        if (num2 != null) {
            this.a.e(hashMap, num2.toString());
        }
        if (adData != null) {
            if (adData.getId() != null) {
                hashMap.put(Extras.Constants.ITEM_ID, adData.getId());
            }
            if (adData.getStatus() != null) {
                hashMap.put("item_status", adData.getStatus());
            }
        }
        hashMap.put("page", monetDraftPageStatus);
        hashMap.put("cart_status", monetDraftCartStatus);
        hashMap.put("action", str);
        g0("monet_draft_banner", hashMap);
    }

    public void trackMonetHelpAction(String str, String str2) {
        Map z = z();
        z.put("action", str);
        if (str2 != null) {
            z.put("product_type", str2);
        }
        String m0 = com.olxgroup.panamera.app.common.helpers.l.m0();
        if (m0.equals("elite_buyer") || m0.equals("buyer_pro")) {
            z.put("package_type", m0);
        }
        g0("monet_help_screen_action", z);
    }

    public void trackMonetHowItWorksScreenShown(String str, String str2, float f2, String str3) {
        Map z = z();
        z.put("package_price", Float.valueOf(f2));
        if (str != null && !str.isEmpty()) {
            z.put("type_of_package", str);
        }
        if (str2 != null) {
            z.put("package_type", str2);
        }
        if (str3 != null) {
            z.put("product_type", str3);
        }
        String m0 = com.olxgroup.panamera.app.common.helpers.l.m0();
        if (m0.equals("elite_buyer") || m0.equals("buyer_pro")) {
            z.put("package_type", m0);
        }
        g0("monet_how_it_works_screen_shown", z);
    }

    public void trackMonetLandingPage(String str, String str2, boolean z) {
        Map A = A(str, str2);
        A.put("monet_start_scr_filter_applied", Boolean.valueOf(z));
        g0("monet_landing_page", A);
    }

    public void trackMonetLearnMore(String str, String str2, String str3, String str4, AdItem adItem, PackageLocationCategory packageLocationCategory, String str5, String str6) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_learn_more", w(str, str2, null, str3, str4, adItem, null, packageLocationCategory, str5, str6, null, null, null, null, null));
    }

    public void trackMonetModifierFilterSubmit(PackageLocationCategory packageLocationCategory, boolean z, boolean z2, String str) {
        Map z3 = z();
        if (packageLocationCategory != null) {
            this.a.e(z3, String.valueOf(packageLocationCategory.getCategoryId()));
        }
        z3.put("category_change", Boolean.valueOf(z2));
        z3.put("location_change", Boolean.valueOf(z));
        if (str != null) {
            z3.put("product_type", str);
        }
        g0("monet_modified_filters_submit", z3);
    }

    public void trackMonetPackageSelect(float f2, List list, String str, int i, String str2, Coupon coupon) {
        trackMonetPackageSelect(f2, list, str, Integer.valueOf(i), null, null, null, null, str2, coupon);
    }

    public void trackMonetPackageUnselect(float f2, List list, String str, int i, String str2) {
        trackMonetPackageUnselect(f2, list, str, Integer.valueOf(i), null, null, null, null, str2);
    }

    public void trackMonetPostingSuccess(String str, String str2, String str3, String str4, AdItem adItem) {
        Map v = v(str, null, str2, str3, str4, adItem, null, null, null, null, null);
        O(v);
        v.put("ad_index_id", this.c.getCopyOfAdIndexId());
        this.a.F0(v);
        h0(t(adItem, null), u(adItem, null), "posting_effective_post", v);
    }

    public void trackMonetSeeExample(String str, String str2, String str3, String str4, AdItem adItem, PackageLocationCategory packageLocationCategory, String str5, String str6) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_example", w(str, str2, null, str3, str4, adItem, null, packageLocationCategory, str5, str6, null, null, null, null, null));
    }

    public void trackMonetSelection(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, String str7) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_selection", w(str, str2, str3, str4, str5, adItem, null, packageLocationCategory, null, str6, null, null, null, null, str7));
    }

    public void trackMonetStart(String str, String str2, String str3, String str4, AdItem adItem, Integer num, String str5, PackageLocationCategory packageLocationCategory, String str6, String str7, Coupon coupon) {
        Map w = w(str, str2, null, str3, str4, adItem, null, packageLocationCategory, null, str5, null, null, null, null, null);
        if (num != null) {
            w.put("result_count", num);
        }
        String q = this.a.q();
        if (q != null) {
            w.put("campaign_id", q);
        }
        String z0 = this.a.z0();
        if (z0 != null) {
            w.put("wzrk_dl", z0);
        }
        w.put("design_type", str6);
        if (str7 != null) {
            w.put(Constants.ExtraKeys.CHOSEN_OPTION, str7);
        }
        if (coupon != null) {
            w.put("coupon_campaign_id", Integer.valueOf(coupon.getCampaignId()));
            w.put("coupon_code", coupon.getCode());
            w.put("coupon_discount_amount", Double.valueOf(coupon.getDiscount().getActualDiscount()));
            w.put("coupon_discount_percentage", Integer.valueOf(coupon.getDiscount().getPercentage()));
            w.put("coupon_type", coupon.getType());
            w.put("coupon_id", Integer.valueOf(coupon.getId()));
        }
        TrackingContextRepository trackingContextRepository = this.c;
        if (trackingContextRepository != null && trackingContextRepository.getNoOfExpiryDaysInPackageRenewal() != Long.MIN_VALUE) {
            w.put("days_to_go", Long.valueOf(this.c.getNoOfExpiryDaysInPackageRenewal()));
        }
        if (str3 != null && str3.equals("C2B")) {
            String m0 = com.olxgroup.panamera.app.common.helpers.l.m0();
            if (m0.equals("elite_buyer") || m0.equals("buyer_pro")) {
                w.put("package_type", m0);
            }
        }
        h0(t(adItem, null), u(adItem, null), "monet_start", w);
    }

    public void trackMonetSuccess(String str, String str2, String str3, String str4, String str5, AdItem adItem, String str6, PackageLocationCategory packageLocationCategory, String str7, String str8, String str9, Coupon coupon, String str10) {
        Map w = w(str, str2, str3, str4, str5, adItem, str6, packageLocationCategory, null, str7, str8, null, null, null, null);
        String q = this.a.q();
        if (q != null) {
            w.put("campaign_id", q);
        }
        String z0 = this.a.z0();
        if (z0 != null) {
            w.put("wzrk_dl", z0);
        }
        if (str9 != null) {
            w.put(Constants.ExtraKeys.CHOSEN_OPTION, str9);
        }
        if (coupon != null) {
            w.put("coupon_campaign_id", Integer.valueOf(coupon.getCampaignId()));
            w.put("coupon_code", coupon.getCode());
            w.put("coupon_discount_amount", Double.valueOf(coupon.getDiscount().getActualDiscount()));
            w.put("coupon_discount_percentage", Integer.valueOf(coupon.getDiscount().getPercentage()));
            w.put("coupon_type", coupon.getType());
            w.put("coupon_id", Integer.valueOf(coupon.getId()));
        }
        if (str10 != null) {
            w.put("package_type", str10);
        }
        TrackingContextRepository trackingContextRepository = this.c;
        if (trackingContextRepository != null && trackingContextRepository.getNoOfExpiryDaysInPackageRenewal() != Long.MIN_VALUE) {
            w.put("days_to_go", Long.valueOf(this.c.getNoOfExpiryDaysInPackageRenewal()));
        }
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_successful", w);
    }

    public void trackMyAccountEliteCtaClick() {
        g0("my_account_elite_buyer_cta_clicked", this.a.f0());
    }

    public void trackNearMeRequest(String str) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        this.a.F0(searchParams);
        g0("tap_browse_ads_near_me", searchParams);
    }

    public void trackNewFilterEvent(String str, String str2, Map map, SearchExperienceFilters searchExperienceFilters) {
        searchExperienceFilters.setParams(map);
        Map searchParams = this.c.getSearchParams(searchExperienceFilters, false);
        searchParams.put(Constants.Intent.Extra.BROWSING_MODE, str2);
        g0(str, searchParams);
    }

    public void trackNullSearchFill(SearchExperienceFeed.ExtendedOffset extendedOffset) {
        HashMap hashMap = new HashMap();
        hashMap.put("count", Integer.valueOf(extendedOffset.getOffsetIndex()));
        hashMap.put("page_number", Integer.valueOf(extendedOffset.getPosition()));
        hashMap.put("result_count", Long.valueOf(extendedOffset.getAdsCount()));
        hashMap.put("origin", this.c.getListingOrigin());
        if (extendedOffset instanceof SearchExperienceFeed.ExtendedPolygonOffset) {
            SearchExperienceFeed.ExtendedPolygonOffset extendedPolygonOffset = (SearchExperienceFeed.ExtendedPolygonOffset) extendedOffset;
            hashMap.put("extended_relaxation_type", "polygon");
            hashMap.put("extended_location_id", Long.valueOf(extendedPolygonOffset.getLocationId()));
            hashMap.put("extended_location_type", extendedPolygonOffset.getLocationType());
        } else if (extendedOffset instanceof SearchExperienceFeed.ExtendedBucketOffset) {
            SearchExperienceFeed.ExtendedBucketOffset extendedBucketOffset = (SearchExperienceFeed.ExtendedBucketOffset) extendedOffset;
            hashMap.put("extended_relaxation_type", "bucket");
            hashMap.put("extended_distance", Integer.valueOf(extendedBucketOffset.getDistance()));
            hashMap.put("extended_distance_criterion", extendedBucketOffset.getCriterion());
        }
        U(hashMap);
        g0("extended_location", hashMap);
    }

    public void trackOLXAutoBannerLoad() {
        SearchExperienceContext searchExperienceResultsContext = ((ResultsContextRepository) this.f.getValue()).getSearchExperienceResultsContext();
        Map searchParams = searchExperienceResultsContext != null ? this.c.getSearchParams(searchExperienceResultsContext.getBrowseMode()) : this.c.getSearchParamsWithBrowseMode();
        U(searchParams);
        T(searchParams);
        this.a.F0(searchParams);
        this.a.g(searchParams);
        g0("olxautos_banner_load", searchParams);
    }

    public void trackPackageRenewClick(String str, long j, String str2, String str3, String str4, int i, String str5, String str6) {
        HashMap hashMap = new HashMap();
        this.a.e(hashMap, str5);
        if (str != null) {
            hashMap.put("type", str);
        }
        hashMap.put("days_to_go", Long.valueOf(j));
        if (str2 != null) {
            hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        }
        if (str3 != null) {
            hashMap.put("user_id", str3);
        }
        if (str4 != null) {
            hashMap.put("type_of_package", str4);
        }
        hashMap.put("no_of_ads_package", Integer.valueOf(i));
        g0("pkg_renew_click", hashMap);
    }

    public void trackPackageRenewEligibleUser(String str, long j, String str2, String str3, String str4, int i, String str5, String str6) {
        HashMap hashMap = new HashMap();
        this.a.e(hashMap, str5);
        if (str != null) {
            hashMap.put("type", str);
        }
        hashMap.put("days_to_go", Long.valueOf(j));
        if (str2 != null) {
            hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        }
        if (str3 != null) {
            hashMap.put("user_id", str3);
        }
        if (str4 != null) {
            hashMap.put("type_of_package", str4);
        }
        hashMap.put("no_of_ads_package", Integer.valueOf(i));
        if (str6 != null) {
            hashMap.put("product_type", str6);
        }
        g0("pkg_renew_eligible_user", hashMap);
    }

    public void trackPersonalisedFilterNudgeClick(String str, boolean z) {
        Map p0 = this.a.p0();
        p0.put("message_displayed", str);
        p0.put(Constants.ExtraKeys.CHOSEN_OPTION, z ? "select" : "close");
        E(p0, ((ResultsContextRepository) this.f.getValue()).getSearchExperienceResultsContext().getPersonalisedFilters());
        U(p0);
        T(p0);
        this.a.F0(p0);
        p0.putAll(this.c.getSearchParams());
        g0("personalised_filters_nudge_click", p0);
    }

    public void trackPersonalisedFilterNudgeShown(String str) {
        Map p0 = this.a.p0();
        p0.put("message_displayed", str);
        E(p0, ((ResultsContextRepository) this.f.getValue()).getSearchExperienceResultsContext().getPersonalisedFilters());
        U(p0);
        T(p0);
        this.a.F0(p0);
        p0.putAll(this.c.getSearchParams());
        g0("personalised_filters_nudge_shown", p0);
    }

    public void trackPopularCategoriesStoriesShown(String str, String str2, int i) {
        HashMap hashMap = new HashMap();
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
        hashMap.put("category_id", str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        hashMap.put("count", Integer.valueOf(i));
        hashMap.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        g0("popular_categories_story_shown", hashMap);
    }

    public void trackPopularFeaturedAdsShown(String str, String str2, String str3, int i) {
        HashMap hashMap = new HashMap();
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
        hashMap.put(Extras.Constants.ITEM_ID, str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        hashMap.put("count", Integer.valueOf(i));
        hashMap.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        this.a.g(hashMap);
        if (str3 != null) {
            this.a.e(hashMap, str3);
        }
        g0("popular_featured_ads_story_shown", hashMap);
    }

    public void trackPreviewAd(String str, String str2, String str3, String str4, AdItem adItem, PackageLocationCategory packageLocationCategory) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "preview_ad", v(str, null, str2, str3, str4, adItem, null, packageLocationCategory, null, null, null));
    }

    public void trackProfileShow(String str, String str2, String str3, String str4, String str5, String str6) {
        Map p0 = this.a.p0();
        this.a.e(p0, str6);
        this.a.g(p0);
        p0.put(Extras.Constants.ITEM_ID, str5);
        p0.put("credits", str3);
        p0.put("origin", str4);
        p0.put("inspected_type", str);
        p0.put("user_category", str2);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).d(p0);
        g0("profile_show", p0);
    }

    public void trackQuickFilterInteraction(TrackingInteractions.QuickFilterInteraction quickFilterInteraction, boolean z) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, "listing_page");
        searchParams.put(Constants.ExtraKeys.CHOSEN_OPTION, !z ? quickFilterInteraction.getValue() : "drag");
        if (quickFilterInteraction == TrackingInteractions.QuickFilterInteraction.MORE) {
            g0("tap_see_all_filters", searchParams);
        } else {
            g0("tap_see_less_filters", searchParams);
        }
    }

    public void trackRecentlyViewedScreenShown(int i) {
        HashMap hashMap = new HashMap();
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
        hashMap.put("count", Integer.valueOf(i));
        hashMap.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        g0("recent_ads_home_screen_shown", hashMap);
    }

    public void trackRecentlyViewedWidgetExperiment(boolean z) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, z ? "yes" : "no");
        g0("recent_ads_eligible", hashMap);
    }

    public void trackRecentlyViewedWidgetsShown(int i) {
        trackRecentlyViewedWidgetExperiment(i > 0);
        if (i > 0) {
            HashMap hashMap = new HashMap();
            ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
            hashMap.put("count", Integer.valueOf(i));
            g0("recent_ads_widget_shown", hashMap);
        }
    }

    public void trackRecentlyWidgetAdClicked(String str, String str2, String str3, String str4, String str5) {
        HashMap hashMap = new HashMap();
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
        hashMap.put("category_level1_id", str);
        hashMap.put("category_level2_id", str2);
        hashMap.put("category_id", str3);
        hashMap.put(Extras.Constants.ITEM_ID, str4);
        hashMap.put("seller_id", str5);
        hashMap.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        g0("recent_ads_widget_clicked", hashMap);
    }

    public void trackRedirectionCheck(String str, String str2, String str3, String str4) {
        Map p0 = this.a.p0();
        p0.put("deeplink_url", str);
        p0.put(Constants.Intent.Extra.SELECT_FROM, str2);
        p0.put("used_app", str3);
        p0.put("error_type", str4);
        g0("redirection_check", p0);
    }

    public void trackRemovePackageFromCart(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory) {
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "cart_item_decremented", v(str, str2, str4, str3, str5, adItem, null, packageLocationCategory, null, null, null));
    }

    public void trackRepeatPurchase(String str, String str2, String str3) {
        g0("renew", v(str, str2, str3, null, null, null, null, null, null, null, null));
    }

    public void trackReviewFeedbackAccept(String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put("reviews_from", str);
        hashMap.put("user_feedback", str2);
        l0("review_leave_feedback_accept", hashMap);
    }

    public void trackReviewFeedbackDeny(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("reviews_from", str);
        l0("review_leave_feedback_deny", hashMap);
    }

    public void trackReviewLoveOlxAccept(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("reviews_from", str);
        l0("review_love_olx_accept", hashMap);
    }

    public void trackReviewLoveOlxDeny(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("reviews_from", str);
        l0("review_love_olx_deny", hashMap);
    }

    public void trackReviewRateUsAccept(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("reviews_from", str);
        l0("review_rate_us_accept", hashMap);
    }

    public void trackReviewRateUsDeny(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("reviews_from", str);
        l0("review_rate_us_deny", hashMap);
    }

    public void trackSavedHomeScreenShow(Integer num) {
        g0("saved_home_scr_shown", this.a.O(num));
    }

    public void trackSavedTapAdd(Integer num, Integer num2, Integer num3) {
        g0("saved_tap_add", this.a.P(num, num3));
    }

    public void trackSearchSuggestionClickEvent() {
        g0(com.olxgroup.panamera.app.common.tracking.e.c, this.c.getSearchSuggestionParams());
    }

    public void trackShowDidYouMean() {
        g0(com.olxgroup.panamera.app.common.tracking.e.d, this.c.getShowSearchSuggestionParams());
    }

    public void trackSimilarListings(Map map) {
        this.a.g(map);
        g0(com.olxgroup.panamera.app.common.tracking.e.a, map);
    }

    public void trackStoryClose(String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
        this.a.g(hashMap);
        if (str2 != null) {
            this.a.e(hashMap, str2);
        }
        hashMap.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        g0("story_close", hashMap);
    }

    public void trackStoryImageShown(String str, String str2, String str3, int i) {
        HashMap hashMap = new HashMap();
        hashMap.put(Extras.Constants.ITEM_ID, str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
        this.a.g(hashMap);
        hashMap.put("position", Integer.valueOf(i));
        if (str3 != null) {
            this.a.e(hashMap, str3);
        }
        hashMap.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        g0("story_image_seen", hashMap);
    }

    public void trackStorySeenForAd(String str, String str2, String str3, String str4, int i) {
        HashMap hashMap = new HashMap();
        hashMap.put(Extras.Constants.ITEM_ID, str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).j(hashMap);
        this.a.g(hashMap);
        hashMap.put("position", Integer.valueOf(i));
        if (str3 != null) {
            this.a.e(hashMap, str3);
        }
        if (str4 != null) {
            hashMap.put("package_id", str4);
        }
        hashMap.put("user_id", ((UserSessionRepository) this.e.getValue()).getUserIdLogged());
        g0("story_seen", hashMap);
    }

    public void trackTapImageMinimize(AdItem adItem, int i) {
        Map L = this.a.L(adItem);
        f(L);
        T(L);
        L.put("page_number", Integer.valueOf(i));
        U(L);
        g0("item_tap_image_minimize", L);
    }

    public void trackTapOnMeetingChat(AdItem adItem, String str, String str2, String str3, String str4, String str5, String str6, String str7) {
        Map L = this.a.L(adItem);
        U(L);
        L.put("buyer_id", str);
        L.put("posting_variant", str4);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        L.put(Constants.ExtraKeys.CHOSEN_OPTION, str3);
        L.put("booking_status", str5);
        L.put("field_name", str6);
        L.put(Constants.Intent.Extra.SELECT_FROM, str7);
        L.put(Constants.ExtraKeys.FLOW_STEP, str2);
        e(adItem, L);
        g0("chat_tap_meeting", L);
    }

    public void trackTapOnViewMeeting(AdItem adItem, String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8, String str9) {
        Map L = this.a.L(adItem);
        U(L);
        L.put("buyer_id", str);
        L.put("posting_variant", "B2C");
        L.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        L.put("extended_location_id", str3);
        L.put("booking_status", str6);
        L.put("num_variants_shown", str4);
        L.put("suggested_price", str5);
        L.put("booking_id", str7);
        L.put("field_name", str8);
        L.put(Constants.Intent.Extra.SELECT_FROM, str9);
        L.put(Constants.ExtraKeys.FLOW_STEP, str2);
        e(adItem, L);
        g0("tap_view_meeting", L);
    }

    public void trackTechnicalReportHeader(String str, String str2, String str3, String str4, String str5) {
        HashMap hashMap = new HashMap();
        this.a.e(hashMap, str4);
        this.a.g(hashMap);
        hashMap.put(Extras.Constants.ITEM_ID, str3);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str5);
        hashMap.put("inspected_type", str);
        hashMap.put("user_category", str2);
        ((com.olxgroup.panamera.app.buyers.common.b) this.i.getValue()).d(hashMap);
        l0("technical_report_header", hashMap);
    }

    public void trackTechnicalReportSubHeader(String str, String str2, String str3, String str4, String str5, String str6, String str7, String str8) {
        HashMap hashMap = new HashMap();
        this.a.e(hashMap, str4);
        hashMap.put(Extras.Constants.ITEM_ID, str3);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str5);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str6);
        hashMap.put("item_status", str7);
        hashMap.put(Constants.ExtraKeys.FLOW_TYPE, str8);
        hashMap.put("inspected_type", str);
        hashMap.put("user_category", str2);
        l0("technical_report_subheader", hashMap);
    }

    public void trackVideoWidgetShown(String str) {
        Map p0 = this.a.p0();
        p0.put(Constants.Intent.Extra.SELECT_FROM, str);
        p0.put("connection_type", com.olxgroup.panamera.app.common.infra.a.a.b(this.b));
        U(p0);
        T(p0);
        this.a.F0(p0);
        p0.putAll(this.c.getSearchParams());
        g0("lp_video_shown", p0);
    }

    public void trackViewCart(String str, String str2, String str3, String str4, String str5, AdItem adItem, PackageLocationCategory packageLocationCategory, String str6, String str7, String str8) {
        Map x = x(str, str2, str4, str3, str5, adItem, null, packageLocationCategory, null, null, null, str6, null, str7);
        if (str8 != null) {
            x.put("package_type", str8);
        }
        h0(t(adItem, packageLocationCategory), u(adItem, packageLocationCategory), "monet_view_cart", x);
    }

    public void trackViewItem(String str, String str2, String str3) {
        g0("view_item", this.a.o0(str, str2, str3));
    }

    public void trackViewMeetingBanner(AdItem adItem, String str, String str2, String str3, String str4) {
        Map L = this.a.L(adItem);
        U(L);
        L.put("buyer_id", str);
        L.put("posting_variant", "B2C");
        L.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        L.put("field_name", str3);
        L.put(Constants.Intent.Extra.SELECT_FROM, str4);
        L.put(Constants.ExtraKeys.FLOW_STEP, str2);
        e(adItem, L);
        g0("view_meeting_impression", L);
    }

    public void trackingFavourites(Boolean bool, String str, String str2) {
        if (bool == null || TextUtils.isEmpty(str)) {
            return;
        }
        if (bool.booleanValue()) {
            itemTapFav(str, str2);
        } else {
            itemTapUnfav(str, str2);
        }
    }

    public void updateTap(String str, String str2) {
        Map p0 = this.a.p0();
        p0.put("warning_level", str2);
        g0("update_tap", p0);
    }

    public void uploadError(long j, double d2) {
        HashMap hashMap = new HashMap();
        hashMap.put("file_size", Long.valueOf(j));
        hashMap.put("total_time", Double.valueOf(d2));
        g0("posting_upload_error", hashMap);
    }

    public void uploadPhoto(long j, double d2, double d3) {
        HashMap hashMap = new HashMap();
        hashMap.put("file_size", Long.valueOf(j));
        hashMap.put("compression_time", Double.valueOf(d2));
        hashMap.put("total_time", Double.valueOf(d3));
        P(hashMap);
        g0("posting_upload_photo", hashMap);
    }

    public void uploadRCError(long j, double d2, String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put("file_size", Long.valueOf(j));
        hashMap.put("total_time", Double.valueOf(d2));
        hashMap.put("posting_step", str);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        g0("posting_upload_error", hashMap);
    }

    public void uploadRCPhoto(long j, double d2, double d3, String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put("file_size", Long.valueOf(j));
        hashMap.put("compression_time", Double.valueOf(d2));
        hashMap.put("total_time", Double.valueOf(d3));
        hashMap.put("posting_step", str);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        g0("posting_upload_photo", hashMap);
    }

    public void videoButtonClicked(AdItem adItem) {
        g0("video_button_clicked", this.a.L(adItem));
    }

    public void videoPlayed(AdItem adItem) {
        g0("video_played", this.a.L(adItem));
    }

    public void viewItemB2C(String str, String str2, BrowseMode browseMode) {
        HashMap hashMap = new HashMap();
        b(hashMap, browseMode);
        f(hashMap);
        T(hashMap);
        U(hashMap);
        hashMap.put("carousel_source", "non_carousel");
        if (!TextUtils.isEmpty(str2)) {
            hashMap.put("carousel_version", str2);
        }
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str);
        this.a.g(hashMap);
        l0("olx_autos_ad_viewed", hashMap);
    }

    public void viewListings(String str, List list, Map map) {
        map.put("resultset_type", str);
        m0(list, map);
    }

    public void viewListingsBundles(String str, List list, Map map, String str2) {
        if (str2.equalsIgnoreCase(BundleType.CAROUSEL_WIDGET.name())) {
            map.put("resultset_type", this.c.getCarouselWidgetResultSetType());
        } else {
            map.put("resultset_type", str);
        }
        m0(list, map);
    }

    public void viewListingsTimeSpent(long j) {
        HashMap hashMap = new HashMap();
        U(hashMap);
        hashMap.put("time_spent", Long.valueOf(j / 1000));
        this.a.g(hashMap);
        g0("listings_results_time", hashMap);
    }

    public void viewListingsV1(String str, int i, Set set, Map map, Set set2, Integer num, int i2, int i3, String str2, int i4) {
        map.put("result_count", String.valueOf(set.size()));
        map.put("properati_ad_count", String.valueOf(i3));
        map.put("aj_ad_count", String.valueOf(i4));
        map.put("verified_user_ad_count", String.valueOf(i2));
        if (num != null && num.intValue() > 0) {
            map.put("suggested_ads_count", num);
        }
        map.put("page_number", String.valueOf(i));
        if (!set.isEmpty()) {
            map.put("impressions", Arrays.toString(set.toArray()).replace(Constants.SPACE_STRING, ""));
        }
        U(map);
        map.put("origin", str);
        if (this.c.isWidgetViewAllClicked()) {
            map.put("resultset_type", this.c.getCarouselWidgetResultSetType());
        } else {
            map.put("resultset_type", str2);
        }
        map.put("resultset_type", str2);
        if (set2 != null && !set2.isEmpty()) {
            map.put("impressions_metadata", Arrays.toString(set2.toArray()).replace(Constants.SPACE_STRING, ""));
        }
        T(map);
        ArrayList arrayList = new ArrayList(Arrays.asList(this.c.getContactFlowExperimentVariants()));
        arrayList.add(this.c.getFilterVariant());
        if (!arrayList.isEmpty()) {
            map.put("experiment_variant", this.d.toJson(arrayList));
        }
        this.a.F0(map);
        this.a.B0(map);
        this.a.g(map);
        l0("view_listings", map);
    }

    public void viewReviewLoveOlx(String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("reviews_from", str);
        l0("review_love_olx_impression", hashMap);
    }

    public void deepLinkLaunch(String str, String str2, Map map) {
        Map p0 = this.a.p0();
        p0.put("action", str);
        p0.put(SystemMessageDetailParserDeeplinkItem.DEEPLINK, str2);
        p0.put("origin", this.c.getListingOrigin());
        o1.p(str2, p0);
        if (map != null && !map.isEmpty()) {
            p0.putAll(map);
        }
        g0("deeplink_launch", p0);
    }

    public void monetHelpClick(int i, String str, double d2, String str2, String str3, Integer num, String str4) {
        Map z = z();
        if (i > 0) {
            this.a.e(z, String.valueOf(i));
        }
        if (str != null && !str.isEmpty()) {
            z.put("type_of_package", str);
        }
        z.put("package_price", Double.valueOf(d2));
        if (str2 != null) {
            z.put("screen_position", str2);
        }
        if (str3 != null) {
            z.put("package_id", str3);
        }
        if (num != null) {
            z.put("no_of_packages_selected", num);
        }
        if (str4 != null) {
            z.put("product_type", str4);
        }
        String m0 = com.olxgroup.panamera.app.common.helpers.l.m0();
        if (m0.equals("elite_buyer") || m0.equals("buyer_pro")) {
            z.put("package_type", m0);
        }
        g0("monet_help_button", z);
    }

    public void onPermissionDeny(String str, String str2, String str3) {
        Map q0 = this.a.q0(str, str2);
        if (str3 != null) {
            q0.put(Constants.Intent.Extra.SELECT_FROM, str3);
        }
        g0("permissions_tap_deny", q0);
    }

    public void onPermissionDialogTapOk(String str, String str2, String str3) {
        Map q0 = this.a.q0(str, str2);
        if (str3 != null) {
            q0.put(Constants.Intent.Extra.SELECT_FROM, str3);
        }
        g0("permissions_tap_allow", q0);
    }

    public void trackMonetPackageSelect(float f2, List list, String str, Integer num, String str2, String str3, Integer num2, Boolean bool, String str4, Coupon coupon) {
        Map z = z();
        if (list != null && !list.isEmpty()) {
            this.a.e(z, ((Integer) list.get(0)).toString());
        }
        z.put("package_price", Float.valueOf(f2));
        if (str != null && !str.isEmpty()) {
            z.put("type_of_package", str);
        }
        if (num != null) {
            z.put("no_of_ads_package", num);
        }
        if (str2 != null) {
            z.put("package_category", str2);
        }
        if (str3 != null) {
            z.put("package_type", str3);
        }
        if (num2 != null) {
            z.put("days_validity", num2);
        }
        if (bool != null) {
            z.put("banner_visible", bool);
        }
        if (str4 != null) {
            z.put(Constants.ExtraKeys.CHOSEN_OPTION, str4);
        }
        if (coupon != null) {
            K(z, "coupon_campaign_id", Integer.valueOf(coupon.getCampaignId()));
            K(z, "coupon_code", coupon.getCode());
            K(z, "coupon_discount_amount", coupon.getDiscount() != null ? Double.valueOf(coupon.getDiscount().getActualDiscount()) : null);
            K(z, "coupon_discount_percentage", coupon.getDiscount() != null ? Integer.valueOf(coupon.getDiscount().getPercentage()) : null);
            K(z, "coupon_type", coupon.getType());
            K(z, "coupon_id", Integer.valueOf(coupon.getId()));
        }
        g0("monet_package_select", z);
    }

    public void trackMonetPackageUnselect(float f2, List list, String str, Integer num, String str2, String str3, Integer num2, Boolean bool, String str4) {
        Map z = z();
        if (list != null && !list.isEmpty()) {
            this.a.e(z, ((Integer) list.get(0)).toString());
        }
        z.put("package_price", Float.valueOf(f2));
        if (str != null && !str.isEmpty()) {
            z.put("type_of_package", str);
        }
        if (num != null) {
            z.put("no_of_ads_package", num);
        }
        if (str2 != null) {
            z.put("package_category", str2);
        }
        if (str3 != null) {
            z.put("package_type", str3);
        }
        if (num2 != null) {
            z.put("days_validity", num2);
        }
        if (bool != null) {
            z.put("banner_visible", bool);
        }
        if (str4 != null) {
            z.put("product_type", str4);
        }
        String m0 = com.olxgroup.panamera.app.common.helpers.l.m0();
        if (m0.equals("elite_buyer") || m0.equals("buyer_pro")) {
            z.put("package_type", m0);
        }
        g0("monet_package_unchecked", z);
    }

    public void onListingApply(String str, SearchExperienceFilters searchExperienceFilters) {
        J(str, str, searchExperienceFilters);
    }

    public void reviewAction(Review review, String str, String str2, String str3) {
        Map D = D(review, str, str3);
        D.put("user_feedback", str2);
        g0("rating_action", D);
    }

    public void viewListings(String str, long j, int i, List list, Map map, String str2, List list2) {
        map.put("result_count", Long.valueOf(j));
        map.put("page_number", String.valueOf(i));
        if (list != null && !list.isEmpty()) {
            map.put("impressions", Arrays.toString(list.toArray()).replace(Constants.SPACE_STRING, ""));
        }
        U(map);
        map.put("feed_version", str2);
        map.put("origin", str);
        if (list2 != null && !list2.isEmpty()) {
            map.put("impressions_metadata", Arrays.toString(list2.toArray()).replace(Constants.SPACE_STRING, ""));
        }
        T(map);
        ArrayList arrayList = new ArrayList(Arrays.asList(this.c.getContactFlowExperimentVariants()));
        arrayList.add(this.c.getMakeOfferExperimentVariant());
        if (arrayList.size() > 0) {
            map.put("experiment_variant", this.d.toJson(arrayList));
        }
        map.put("shown_at", this.c.getFromSeeSimilarProduct());
        this.a.F0(map);
        this.a.B0(map);
        this.a.g(map);
        l0("view_listings", map);
    }

    public void locationShow(String str, String str2, boolean z) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, str);
        hashMap.put("origin", str2);
        hashMap.put("gps_on_off", Boolean.valueOf(z));
        g0("location_show", hashMap);
    }

    public void itemTapFav(String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put(Extras.Constants.ITEM_ID, str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        U(hashMap);
        g0("social_tap_like", hashMap);
    }

    public void locationAction(String str, String str2, String str3, String str4) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, str);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        hashMap.put("origin", str3);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str4);
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        g0("location_action", hashMap);
    }

    public void trackFilterTapRemove(String str, String str2, String str3) {
        Map searchParams = this.c.getSearchParams();
        searchParams.put(Constants.Intent.Extra.SELECT_FROM, str);
        searchParams.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        searchParams.put("filters_interaction", str3);
        g0("listing_tap_remove_filters", searchParams);
    }

    public void onLocationComplete(String str, String str2, long j, String str3) {
        HashMap hashMap = new HashMap();
        hashMap.put("location_type", str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        hashMap.put("place_selected_id", Long.valueOf(j));
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str3);
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        this.a.F0(hashMap);
        P(hashMap);
        l0("location_complete", hashMap);
    }

    public void onListingResults(Long l, Integer num, Long l2, String str, Map map, boolean z) {
        if (l != null) {
            map.put("original_ads_count", String.valueOf(l));
        }
        if (l2 != null) {
            map.put("result_count", String.valueOf(l2));
        }
        if (num != null) {
            map.put("page_number", String.valueOf(num));
        }
        if (str != null) {
            map.put("feed_version", str);
        }
        map.put("carousel_source", z ? "carousel" : "non_carousel");
        map.put("origin", this.c.getListingOrigin());
        T(map);
        U(map);
        String singleEventExperimentVariant = this.c.getSingleEventExperimentVariant();
        ArrayList arrayList = new ArrayList(Arrays.asList(this.c.getContactFlowExperimentVariants()));
        arrayList.add(this.c.getMakeOfferExperimentVariant());
        arrayList.add(this.c.getFilterVariant());
        if (singleEventExperimentVariant != null) {
            arrayList.add(singleEventExperimentVariant);
        }
        if (!arrayList.isEmpty()) {
            map.put("experiment_variant", this.d.toJson(arrayList));
        }
        this.a.F0(map);
        this.a.B0(map);
        this.a.g(map);
        this.a.m(map);
        l0("listings_results", map);
    }

    public void locationAction(String str, String str2, String str3, boolean z) {
        HashMap hashMap = new HashMap();
        hashMap.put(Constants.ExtraKeys.FLOW_STEP, str);
        hashMap.put(Constants.ExtraKeys.CHOSEN_OPTION, str2);
        hashMap.put("origin", str3);
        hashMap.put("gps_on_off", Boolean.valueOf(z));
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        g0("location_action", hashMap);
    }

    public void itemTapCall(AdItem adItem, String str, String str2, String str3, BrowseMode browseMode) {
        Map L = this.a.L(adItem);
        this.a.b(adItem, L, str);
        f(L);
        T(L);
        U(L);
        b(L, browseMode);
        e(adItem, L);
        S(L, adItem);
        W(L, adItem);
        g(L, adItem);
        L.put(Constants.Intent.Extra.SELECT_FROM, str);
        L.put("shown_at", str3);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str2);
        L.put("feed_version", adItem.getFeedVersion());
        L.put("resultset_type", this.c.getBundleOrigin());
        this.a.m(L);
        g0("item_tap_call", L);
    }

    public void onLocationComplete(String str, String str2) {
        HashMap hashMap = new HashMap();
        hashMap.put("location_type", str);
        hashMap.put(Constants.Intent.Extra.SELECT_FROM, str2);
        hashMap.put(Constants.Intent.Extra.BROWSING_MODE, "classifieds");
        this.a.F0(hashMap);
        P(hashMap);
        l0("location_complete", hashMap);
    }

    public void itemChatTapChat(AdItem adItem, String str, String str2, String str3, String str4, String str5) {
        Map L = this.a.L(adItem);
        this.a.d(adItem, L);
        U(L);
        L.put(Constants.ExtraKeys.FLOW_TYPE, str3);
        S(L, adItem);
        L.put("experiment_variant", str2);
        L.put("shown_at", str4);
        L.put("chat_origin", Constants.ExtraValues.ADPV);
        L.put("search_type", str5);
        L.put("feed_version", adItem.getFeedVersion());
        e(adItem, L);
        L.putAll(this.a.L(adItem));
        L.put("seller_id", adItem.getUser().getId());
        itemChatTapChat(L, str);
    }

    public void trackMonetPackageSelect(float f2, List list, String str, Integer num, String str2, String str3, Integer num2, Boolean bool, String str4, Coupon coupon, String str5, String str6) {
        Map z = z();
        if (list != null && !list.isEmpty()) {
            this.a.e(z, ((Integer) list.get(0)).toString());
        }
        z.put("package_price", Float.valueOf(f2));
        if (str != null && !str.isEmpty()) {
            z.put("type_of_package", str);
        }
        if (num != null) {
            z.put("no_of_ads_package", num);
        }
        if (str2 != null) {
            z.put("package_category", str2);
        }
        if (str3 != null) {
            z.put("package_type", str3);
        }
        if (num2 != null) {
            z.put("days_validity", num2);
        }
        if (bool != null) {
            z.put("banner_visible", bool);
        }
        if (str4 != null) {
            z.put(Constants.ExtraKeys.CHOSEN_OPTION, str4);
        }
        if (coupon != null) {
            K(z, "coupon_campaign_id", Integer.valueOf(coupon.getCampaignId()));
            K(z, "coupon_code", coupon.getCode());
            K(z, "coupon_discount_amount", coupon.getDiscount() != null ? Double.valueOf(coupon.getDiscount().getActualDiscount()) : null);
            K(z, "coupon_discount_percentage", coupon.getDiscount() != null ? Integer.valueOf(coupon.getDiscount().getPercentage()) : null);
            K(z, "coupon_type", coupon.getType());
            K(z, "coupon_id", Integer.valueOf(coupon.getId()));
        }
        if (str5 != null) {
            z.put("product_type", str5);
        }
        if (str6.equals("elite_buyer") || str6.equals("buyer_pro")) {
            z.put("package_type", str6);
        }
        g0("monet_package_select", z);
    }

    public void onListingBundleResults(Integer num, Map map, String str, String str2, String str3, String str4) {
        if (num.intValue() > 0) {
            map.put("result_count", String.valueOf(num));
        }
        if (!str.isEmpty()) {
            if (str2.equals(BundleType.CAROUSEL_WIDGET.name())) {
                map.put("resultset_type", str3);
            } else {
                map.put("resultset_type", "BUNDLE_" + str);
            }
        }
        map.put("origin", this.c.getListingOrigin());
        map.put(Constants.ExtraKeys.FLOW_TYPE, str4);
        T(map);
        U(map);
        String singleEventExperimentVariant = this.c.getSingleEventExperimentVariant();
        ArrayList arrayList = new ArrayList(Arrays.asList(this.c.getContactFlowExperimentVariants()));
        arrayList.add(this.c.getMakeOfferExperimentVariant());
        map.put("shown_at", this.c.getFromSeeSimilarProduct());
        if (singleEventExperimentVariant != null) {
            arrayList.add(singleEventExperimentVariant);
        }
        if (!arrayList.isEmpty()) {
            map.put("experiment_variant", this.d.toJson(arrayList));
        }
        this.a.F0(map);
        this.a.B0(map);
        this.a.g(map);
        this.a.m(map);
        l0("listings_results", map);
    }

    public void itemChatTapChat(Map map) {
        T(map);
        U(map);
        String q = this.a.q();
        if (q != null) {
            map.put("campaign_id", q);
        }
        String z0 = this.a.z0();
        if (z0 != null) {
            map.put("wzrk_dl", z0);
        }
        this.a.m(map);
        g0("item_chat_tap_chat", map);
    }

    public void itemChatTapChat(Map map, String str) {
        T(map);
        map.put(Constants.Intent.Extra.SELECT_FROM, str);
        U(map);
        String q = this.a.q();
        if (q != null) {
            map.put("campaign_id", q);
        }
        String z0 = this.a.z0();
        if (z0 != null) {
            map.put("wzrk_dl", z0);
        }
        this.a.m(map);
        g0("item_chat_tap_chat", map);
    }
}