得物.apk(点击下载) / ChannelHotPictureView2.java


package com.shizhuang.duapp.modules.mall_dynamic.channel.views;

import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.util.Property;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.LinearInterpolator;
import android.view.animation.OvershootInterpolator;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.RecyclerView;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.component.module.IModuleExposureObserver;
import com.shizhuang.duapp.common.exposure.DuExposureHelper;
import com.shizhuang.duapp.common.extension.ViewExtensionKt;
import com.shizhuang.duapp.common.ui.view.ProductImageLoaderView;
import com.shizhuang.duapp.common.widget.font.FontText;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter;
import com.shizhuang.duapp.libs.duimageloaderview.options.DuScaleType;
import com.shizhuang.duapp.modules.du_mall_common.extension.LifecycleExtensionKt;
import com.shizhuang.duapp.modules.du_mall_common.utils.IViewAppearObserver;
import com.shizhuang.duapp.modules.mall_dynamic.channel.model.ChannelHotPictureItemModel;
import com.shizhuang.duapp.modules.mall_dynamic.channel.model.ChannelHotPictureModel;
import com.shizhuang.duapp.modules.mall_dynamic.channel.widget.HotPicDateText;
import com.shizhuang.duapp.modules.mall_dynamic.channel.widget.HotPicDividerText;
import com.youth.banner.Banner;
import com.youth.banner.adapter.BannerAdapter;
import com.youth.banner.indicator.CircleIndicator;
import com.youth.banner.listener.OnBannerListener;
import com.youth.banner.listener.OnPageScrollStateChangedListener;
import com.youth.banner.listener.OnPageScrolledListener;
import com.youth.banner.listener.OnPageSelectedListener;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt__CollectionsKt;
import kotlin.collections.CollectionsKt__IterablesKt;
import kotlin.collections.CollectionsKt___CollectionsKt;
import kotlin.jvm.JvmOverloads;
import kotlin.text.StringsKt__StringsKt;
import kotlin.text.StringsKt___StringsKt;
import kotlinx.android.extensions.LayoutContainer;
import nr0.f;
import nr0.g;
import o5.i;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Metadata(bv = {}, d1 = {"\u00000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u00012\u00020\u00032\u00020\u0004:\u0002\u0014\u0015B'\b\u0007\u0012\u0006\u0010\u000e\u001a\u00020\r\u0012\n\b\u0002\u0010\u0010\u001a\u0004\u0018\u00010\u000f\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u0005¢\u0006\u0004\b\u0012\u0010\u0013J\b\u0010\u0006\u001a\u00020\u0005H\u0016R\u001b\u0010\f\u001a\u00020\u00078BX‚„\u0002¢\u0006\f\n\u0004\b\b\u0010\t\u001a\u0004\b\n\u0010\u000b¨\u0006\u0016"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPictureView2;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/BaseChannelView;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/model/ChannelHotPictureModel;", "Lcom/shizhuang/duapp/common/component/module/IModuleExposureObserver;", "Lcom/shizhuang/duapp/modules/du_mall_common/utils/IViewAppearObserver;", "", "getLayoutId", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPicAnimHelper2;", "k", "Lkotlin/Lazy;", "getAnimHelper", "()Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPicAnimHelper2;", "animHelper", "Landroid/content/Context;", "context", "Landroid/util/AttributeSet;", "attrs", "defStyleAttr", "<init>", "(Landroid/content/Context;Landroid/util/AttributeSet;I)V", "e", "VogueBigImgBannerAdapter", "du_mall_dynamic_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: ChannelHotPictureView2.kt */
public final class ChannelHotPictureView2 extends BaseChannelView<ChannelHotPictureModel> implements IModuleExposureObserver, IViewAppearObserver {
    public static ChangeQuickRedirect changeQuickRedirect;
    public boolean f;

    /* renamed from: g  reason: collision with root package name */
    public final VogueBigImgBannerAdapter f19343g;

    /* renamed from: h  reason: collision with root package name */
    public float f19344h;
    public int i;
    public int j;
    public final Lazy k;
    public HashMap l;

    @Metadata(bv = {}, d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00030\u0001:\u0001\u0006B\u0007¢\u0006\u0004\b\u0004\u0010\u0005¨\u0006\u0007"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPictureView2$VogueBigImgBannerAdapter;", "Lcom/youth/banner/adapter/BannerAdapter;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/model/ChannelHotPictureItemModel;", "Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPictureView2$VogueBigImgBannerAdapter$VogueBigImgBannerViewHolder;", "<init>", "()V", "VogueBigImgBannerViewHolder", "du_mall_dynamic_release"}, k = 1, mv = {1, 4, 2})
    /* compiled from: ChannelHotPictureView2.kt */
    public static final class VogueBigImgBannerAdapter extends BannerAdapter<ChannelHotPictureItemModel, VogueBigImgBannerViewHolder> {
        public static ChangeQuickRedirect changeQuickRedirect;

        @Metadata(bv = {}, d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0018\u00002\u00020\u00012\u00020\u0002¨\u0006\u0003"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_dynamic/channel/views/ChannelHotPictureView2$VogueBigImgBannerAdapter$VogueBigImgBannerViewHolder;", "Landroidx/recyclerview/widget/RecyclerView$ViewHolder;", "Lkotlinx/android/extensions/LayoutContainer;", "du_mall_dynamic_release"}, k = 1, mv = {1, 4, 2})
        /* compiled from: ChannelHotPictureView2.kt */
        public static final class VogueBigImgBannerViewHolder extends RecyclerView.ViewHolder implements LayoutContainer {
            public static ChangeQuickRedirect changeQuickRedirect;
            @NotNull
            public final View b;

            public VogueBigImgBannerViewHolder(@NotNull View view) {
                super(view);
                this.b = view;
            }

            @Override // kotlinx.android.extensions.LayoutContainer
            @NotNull
            public View getContainerView() {
                PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211810, new Class[0], View.class);
                return proxy.isSupported ? (View) proxy.result : this.b;
            }
        }

        @Override // com.youth.banner.holder.IViewHolder
        public void onBindView(Object obj, Object obj2, int i, int i3) {
            Object[] objArr = {(VogueBigImgBannerViewHolder) obj, (ChannelHotPictureItemModel) obj2, new Integer(i), new Integer(i3)};
            ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
            Class cls = Integer.TYPE;
            boolean z = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 211809, new Class[]{VogueBigImgBannerViewHolder.class, ChannelHotPictureItemModel.class, cls, cls}, Void.TYPE).isSupported;
        }

        @Override // com.youth.banner.holder.IViewHolder
        public Object onCreateHolder(ViewGroup viewGroup, int i) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{viewGroup, new Integer(i)}, this, changeQuickRedirect, false, 211808, new Class[]{ViewGroup.class, Integer.TYPE}, VogueBigImgBannerViewHolder.class);
            if (proxy.isSupported) {
                return (VogueBigImgBannerViewHolder) proxy.result;
            }
            return new VogueBigImgBannerViewHolder(ViewExtensionKt.w(viewGroup, R.layout.item_mall_vogue_product_card2, false, 2));
        }
    }

    /* compiled from: ChannelHotPictureView2.kt */
    public static final class a<T> implements OnBannerListener<ChannelHotPictureItemModel> {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ ChannelHotPictureView2 f19345a;
        public final /* synthetic */ Context b;

        public a(ChannelHotPictureView2 channelHotPictureView2, Context context) {
            this.f19345a = channelHotPictureView2;
            this.b = context;
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, int] */
        @Override // com.youth.banner.listener.OnBannerListener
        public void OnBannerClick(ChannelHotPictureItemModel channelHotPictureItemModel, int i) {
            ChannelHotPictureItemModel channelHotPictureItemModel2 = channelHotPictureItemModel;
            if (!PatchProxy.proxy(new Object[]{channelHotPictureItemModel2, new Integer(i)}, this, changeQuickRedirect, false, 211799, new Class[]{ChannelHotPictureItemModel.class, Integer.TYPE}, Void.TYPE).isSupported) {
                u91.c.c().a(channelHotPictureItemModel2.getRedirect()).f(this.b);
                BaseChannelView.i(this.f19345a, null, channelHotPictureItemModel2.getTrack(), 1, null);
            }
        }
    }

    /* compiled from: ChannelHotPictureView2.kt */
    public static final class b implements OnPageScrollStateChangedListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ ChannelHotPictureView2 f19346a;

        public b(ChannelHotPictureView2 channelHotPictureView2) {
            this.f19346a = channelHotPictureView2;
        }

        @Override // com.youth.banner.listener.OnPageScrollStateChangedListener
        public final void onPageScrollStateChanged(int i) {
            float f;
            float f12;
            float f13;
            float f14;
            float f15;
            int i3;
            int i12;
            float f16;
            float f17;
            float f18;
            float f19;
            float f22;
            int i13 = 0;
            if (!PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 211800, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
                float f23 = i.f36333a;
                if (i != 0) {
                    if (i == 2) {
                        this.f19346a.n();
                        ChannelHotPicAnimHelper2 animHelper = this.f19346a.getAnimHelper();
                        if (!PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211717, new Class[0], Void.TYPE).isSupported) {
                            animHelper.d();
                            animHelper.e();
                            if (PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211722, new Class[0], Void.TYPE).isSupported) {
                                i12 = 0;
                                i3 = -40;
                            } else {
                                List<View> list = animHelper.p;
                                ArrayList arrayList = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(list, 10));
                                for (T t : list) {
                                    Property property = View.TRANSLATION_X;
                                    float[] fArr = new float[2];
                                    fArr[i13] = f23;
                                    PatchProxyResult proxy = PatchProxy.proxy(new Object[i13], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211707, new Class[i13], Float.TYPE);
                                    if (proxy.isSupported) {
                                        f22 = ((Float) proxy.result).floatValue();
                                    } else {
                                        f22 = animHelper.j((float) fi.b.b((float) -40));
                                    }
                                    fArr[1] = f22;
                                    ObjectAnimator ofFloat = ObjectAnimator.ofFloat(t, property, fArr);
                                    ofFloat.setInterpolator(new LinearInterpolator());
                                    AnimatorSet animatorSet = new AnimatorSet();
                                    animatorSet.playTogether(ofFloat, animHelper.c(t));
                                    animatorSet.setStartDelay(0);
                                    animatorSet.setDuration(animHelper.r);
                                    animatorSet.start();
                                    arrayList.add(animatorSet);
                                    arrayList = arrayList;
                                    f23 = i.f36333a;
                                    i13 = 0;
                                }
                                i3 = -40;
                                animHelper.m = arrayList;
                                i12 = 0;
                            }
                            if (!PatchProxy.proxy(new Object[i12], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211724, new Class[i12], Void.TYPE).isSupported) {
                                List<View> list2 = animHelper.f19334q;
                                ArrayList arrayList2 = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(list2, 10));
                                for (T t4 : list2) {
                                    Property property2 = View.TRANSLATION_X;
                                    float[] fArr2 = new float[2];
                                    fArr2[0] = 0.0f;
                                    PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211709, new Class[0], Float.TYPE);
                                    if (proxy2.isSupported) {
                                        f16 = ((Float) proxy2.result).floatValue();
                                    } else {
                                        f16 = animHelper.j((float) fi.b.b((float) i3));
                                    }
                                    fArr2[1] = f16;
                                    ObjectAnimator ofFloat2 = ObjectAnimator.ofFloat(t4, property2, fArr2);
                                    ofFloat2.setInterpolator(new LinearInterpolator());
                                    AnimatorSet animatorSet2 = new AnimatorSet();
                                    animatorSet2.playTogether(ofFloat2, animHelper.c(t4));
                                    animatorSet2.setStartDelay(animHelper.s);
                                    animatorSet2.setDuration(animHelper.t);
                                    animatorSet2.start();
                                    arrayList2.add(animatorSet2);
                                }
                                animHelper.o = arrayList2;
                            }
                            if (!PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211726, new Class[0], Void.TYPE).isSupported) {
                                ProductImageLoaderView productImageLoaderView = (ProductImageLoaderView) animHelper.a(R.id.imgLogo);
                                Property property3 = View.TRANSLATION_X;
                                float[] fArr3 = new float[2];
                                fArr3[0] = 0.0f;
                                PatchProxyResult proxy3 = PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211715, new Class[0], Float.TYPE);
                                if (proxy3.isSupported) {
                                    f17 = ((Float) proxy3.result).floatValue();
                                } else {
                                    f17 = animHelper.j((float) fi.b.b((float) -50));
                                }
                                fArr3[1] = f17;
                                ObjectAnimator ofFloat3 = ObjectAnimator.ofFloat(productImageLoaderView, property3, fArr3);
                                ofFloat3.setInterpolator(new LinearInterpolator());
                                AnimatorSet animatorSet3 = new AnimatorSet();
                                animatorSet3.playTogether(ofFloat3, animHelper.c((ProductImageLoaderView) animHelper.a(R.id.imgLogo)));
                                animatorSet3.setStartDelay(animHelper.f19335u);
                                animatorSet3.setDuration(animHelper.f19336v);
                                animatorSet3.addListener(new g(animHelper, ofFloat3));
                                animatorSet3.start();
                                Unit unit = Unit.INSTANCE;
                                animHelper.f19332g = animatorSet3;
                            }
                            if (!PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211728, new Class[0], Void.TYPE).isSupported) {
                                FontText fontText = (FontText) animHelper.a(R.id.mainTitle);
                                Property property4 = View.TRANSLATION_X;
                                float[] fArr4 = new float[2];
                                fArr4[0] = 0.0f;
                                PatchProxyResult proxy4 = PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211711, new Class[0], Float.TYPE);
                                if (proxy4.isSupported) {
                                    f18 = ((Float) proxy4.result).floatValue();
                                } else {
                                    f18 = animHelper.j((float) fi.b.b((float) -70));
                                }
                                fArr4[1] = f18;
                                ObjectAnimator ofFloat4 = ObjectAnimator.ofFloat(fontText, property4, fArr4);
                                ofFloat4.setInterpolator(new LinearInterpolator());
                                AnimatorSet animatorSet4 = new AnimatorSet();
                                animatorSet4.playTogether(ofFloat4, animHelper.c((FontText) animHelper.a(R.id.mainTitle)));
                                animatorSet4.setStartDelay(animHelper.w);
                                animatorSet4.setDuration(animHelper.x);
                                animatorSet4.start();
                                Unit unit2 = Unit.INSTANCE;
                                animHelper.i = animatorSet4;
                            }
                            if (!PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211730, new Class[0], Void.TYPE).isSupported) {
                                HotPicDividerText hotPicDividerText = (HotPicDividerText) animHelper.a(R.id.subTitleTv);
                                Property property5 = View.TRANSLATION_X;
                                float[] fArr5 = new float[2];
                                fArr5[0] = 0.0f;
                                PatchProxyResult proxy5 = PatchProxy.proxy(new Object[0], animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211713, new Class[0], Float.TYPE);
                                if (proxy5.isSupported) {
                                    f19 = ((Float) proxy5.result).floatValue();
                                } else {
                                    f19 = animHelper.j((float) fi.b.b((float) -70));
                                }
                                fArr5[1] = f19;
                                ObjectAnimator ofFloat5 = ObjectAnimator.ofFloat(hotPicDividerText, property5, fArr5);
                                ofFloat5.setInterpolator(new LinearInterpolator());
                                AnimatorSet animatorSet5 = new AnimatorSet();
                                animatorSet5.playTogether(ofFloat5, animHelper.c((HotPicDividerText) animHelper.a(R.id.subTitleTv)));
                                animatorSet5.setStartDelay(animHelper.y);
                                animatorSet5.setDuration(animHelper.z);
                                animatorSet5.start();
                                Unit unit3 = Unit.INSTANCE;
                                animHelper.k = animatorSet5;
                            }
                        }
                    }
                } else if (this.f19346a.n()) {
                    ChannelHotPicAnimHelper2 animHelper2 = this.f19346a.getAnimHelper();
                    if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211718, new Class[0], Void.TYPE).isSupported) {
                        animHelper2.d();
                        animHelper2.f();
                        if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211723, new Class[0], Void.TYPE).isSupported) {
                            List<View> list3 = animHelper2.p;
                            ArrayList arrayList3 = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(list3, 10));
                            for (T t12 : list3) {
                                Property property6 = View.TRANSLATION_X;
                                float[] fArr6 = new float[2];
                                PatchProxyResult proxy6 = PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211708, new Class[0], Float.TYPE);
                                if (proxy6.isSupported) {
                                    f = ((Float) proxy6.result).floatValue();
                                } else {
                                    f = animHelper2.j((float) fi.b.b((float) 100));
                                }
                                fArr6[0] = f;
                                fArr6[1] = 0.0f;
                                ObjectAnimator ofFloat6 = ObjectAnimator.ofFloat(t12, property6, fArr6);
                                ofFloat6.setInterpolator(new OvershootInterpolator(1.0f));
                                AnimatorSet animatorSet6 = new AnimatorSet();
                                animatorSet6.playTogether(ofFloat6, animHelper2.b(t12));
                                animatorSet6.setStartDelay(animHelper2.G);
                                animatorSet6.setDuration(animHelper2.H);
                                animatorSet6.start();
                                arrayList3.add(animatorSet6);
                            }
                            animHelper2.l = arrayList3;
                        }
                        if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211725, new Class[0], Void.TYPE).isSupported) {
                            List<View> list4 = animHelper2.f19334q;
                            ArrayList arrayList4 = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(list4, 10));
                            for (T t13 : list4) {
                                Property property7 = View.TRANSLATION_X;
                                float[] fArr7 = new float[2];
                                PatchProxyResult proxy7 = PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211710, new Class[0], Float.TYPE);
                                if (proxy7.isSupported) {
                                    f12 = ((Float) proxy7.result).floatValue();
                                } else {
                                    f12 = animHelper2.j(animHelper2.f19331c / ((float) 2));
                                }
                                fArr7[0] = f12;
                                fArr7[1] = 0.0f;
                                ObjectAnimator ofFloat7 = ObjectAnimator.ofFloat(t13, property7, fArr7);
                                ofFloat7.setInterpolator(new OvershootInterpolator(1.0f));
                                AnimatorSet animatorSet7 = new AnimatorSet();
                                animatorSet7.playTogether(ofFloat7, animHelper2.b(t13));
                                animatorSet7.setStartDelay(animHelper2.I);
                                animatorSet7.setDuration(animHelper2.J);
                                animatorSet7.start();
                                arrayList4.add(animatorSet7);
                            }
                            animHelper2.n = arrayList4;
                        }
                        if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211727, new Class[0], Void.TYPE).isSupported) {
                            ProductImageLoaderView productImageLoaderView2 = (ProductImageLoaderView) animHelper2.a(R.id.imgLogo);
                            Property property8 = View.TRANSLATION_X;
                            float[] fArr8 = new float[2];
                            PatchProxyResult proxy8 = PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211716, new Class[0], Float.TYPE);
                            if (proxy8.isSupported) {
                                f13 = ((Float) proxy8.result).floatValue();
                            } else {
                                f13 = animHelper2.j((float) fi.b.b((float) 50));
                            }
                            fArr8[0] = f13;
                            fArr8[1] = 0.0f;
                            ObjectAnimator ofFloat8 = ObjectAnimator.ofFloat(productImageLoaderView2, property8, fArr8);
                            ofFloat8.setInterpolator(new OvershootInterpolator(1.2f));
                            AnimatorSet animatorSet8 = new AnimatorSet();
                            animatorSet8.playTogether(ofFloat8, animHelper2.b((ProductImageLoaderView) animHelper2.a(R.id.imgLogo)));
                            animatorSet8.setStartDelay(animHelper2.A);
                            animatorSet8.setDuration(animHelper2.B);
                            animatorSet8.addListener(new f(animHelper2, ofFloat8));
                            animatorSet8.start();
                            Unit unit4 = Unit.INSTANCE;
                            animHelper2.f = animatorSet8;
                        }
                        if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211729, new Class[0], Void.TYPE).isSupported) {
                            FontText fontText2 = (FontText) animHelper2.a(R.id.mainTitle);
                            Property property9 = View.TRANSLATION_X;
                            float[] fArr9 = new float[2];
                            PatchProxyResult proxy9 = PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211712, new Class[0], Float.TYPE);
                            if (proxy9.isSupported) {
                                f14 = ((Float) proxy9.result).floatValue();
                            } else {
                                f14 = animHelper2.j((float) fi.b.b((float) 140));
                            }
                            fArr9[0] = f14;
                            fArr9[1] = 0.0f;
                            ObjectAnimator ofFloat9 = ObjectAnimator.ofFloat(fontText2, property9, fArr9);
                            ofFloat9.setInterpolator(new OvershootInterpolator(1.0f));
                            AnimatorSet animatorSet9 = new AnimatorSet();
                            animatorSet9.playTogether(ofFloat9, animHelper2.b((FontText) animHelper2.a(R.id.mainTitle)));
                            animatorSet9.setStartDelay(animHelper2.C);
                            animatorSet9.setDuration(animHelper2.D);
                            animatorSet9.start();
                            Unit unit5 = Unit.INSTANCE;
                            animHelper2.f19333h = animatorSet9;
                        }
                        if (!PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211731, new Class[0], Void.TYPE).isSupported) {
                            HotPicDividerText hotPicDividerText2 = (HotPicDividerText) animHelper2.a(R.id.subTitleTv);
                            Property property10 = View.TRANSLATION_X;
                            float[] fArr10 = new float[2];
                            PatchProxyResult proxy10 = PatchProxy.proxy(new Object[0], animHelper2, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211714, new Class[0], Float.TYPE);
                            if (proxy10.isSupported) {
                                f15 = ((Float) proxy10.result).floatValue();
                            } else {
                                f15 = animHelper2.j((float) fi.b.b((float) 140));
                            }
                            fArr10[0] = f15;
                            fArr10[1] = 0.0f;
                            ObjectAnimator ofFloat10 = ObjectAnimator.ofFloat(hotPicDividerText2, property10, fArr10);
                            ofFloat10.setInterpolator(new OvershootInterpolator(1.2f));
                            AnimatorSet animatorSet10 = new AnimatorSet();
                            animatorSet10.playTogether(ofFloat10, animHelper2.b((HotPicDividerText) animHelper2.a(R.id.subTitleTv)));
                            animatorSet10.setStartDelay(animHelper2.E);
                            animatorSet10.setDuration(animHelper2.F);
                            animatorSet10.start();
                            Unit unit6 = Unit.INSTANCE;
                            animHelper2.j = animatorSet10;
                        }
                    }
                }
            }
        }
    }

    /* compiled from: ChannelHotPictureView2.kt */
    public static final class c implements OnPageScrolledListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ ChannelHotPictureView2 f19347a;

        public c(ChannelHotPictureView2 channelHotPictureView2) {
            this.f19347a = channelHotPictureView2;
        }

        @Override // com.youth.banner.listener.OnPageScrolledListener
        public final void onPageScrolled(int i, float f, int i3) {
            Object[] objArr = {new Integer(i), new Float(f), new Integer(i3)};
            ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
            Class cls = Integer.TYPE;
            if (!PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 211801, new Class[]{cls, Float.TYPE, cls}, Void.TYPE).isSupported) {
                if (f != i.f36333a) {
                    ChannelHotPicAnimHelper2 animHelper = this.f19347a.getAnimHelper();
                    boolean z = f > this.f19347a.f19344h;
                    byte b = z ? (byte) 1 : 0;
                    byte b2 = z ? (byte) 1 : 0;
                    byte b5 = z ? (byte) 1 : 0;
                    if (!PatchProxy.proxy(new Object[]{new Byte(b)}, animHelper, ChannelHotPicAnimHelper2.changeQuickRedirect, false, 211739, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
                        animHelper.b = z;
                    }
                }
                this.f19347a.f19344h = f;
            }
        }
    }

    /* compiled from: ChannelHotPictureView2.kt */
    public static final class d implements OnPageSelectedListener {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* renamed from: a  reason: collision with root package name */
        public final /* synthetic */ ChannelHotPictureView2 f19348a;

        public d(ChannelHotPictureView2 channelHotPictureView2) {
            this.f19348a = channelHotPictureView2;
        }

        @Override // com.youth.banner.listener.OnPageSelectedListener
        public final void onPageSelected(int i) {
            if (!PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 211802, new Class[]{Integer.TYPE}, Void.TYPE).isSupported) {
                ChannelHotPictureView2 channelHotPictureView2 = this.f19348a;
                channelHotPictureView2.i = i;
                channelHotPictureView2.m();
            }
        }
    }

    /* compiled from: ChannelHotPictureView2.kt */
    public static final class e implements IBitmapConverter {
        public static ChangeQuickRedirect changeQuickRedirect;

        @Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
        @NotNull
        public Integer destHeight() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211805, new Class[0], Integer.class);
            if (proxy.isSupported) {
                return (Integer) proxy.result;
            }
            return 420;
        }

        @Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
        @NotNull
        public Integer destWidth() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211804, new Class[0], Integer.class);
            if (proxy.isSupported) {
                return (Integer) proxy.result;
            }
            return 420;
        }

        @Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
        public void executeConvert(@Nullable Bitmap bitmap, @Nullable Bitmap bitmap2) {
            if (!PatchProxy.proxy(new Object[]{bitmap, bitmap2}, this, changeQuickRedirect, false, 211806, new Class[]{Bitmap.class, Bitmap.class}, Void.TYPE).isSupported && bitmap != null && bitmap2 != null) {
                Rect rect = new Rect(0, 0, bitmap2.getWidth(), bitmap2.getHeight());
                RectF rectF = new RectF(((float) bitmap.getWidth()) * 0.31f, ((float) bitmap.getHeight()) * 0.17f, ((float) bitmap.getWidth()) * 0.69f, ((float) bitmap.getHeight()) * 0.69f);
                Paint paint = new Paint(1);
                paint.setAntiAlias(true);
                Canvas canvas = new Canvas();
                canvas.setBitmap(bitmap2);
                Rect rect2 = new Rect();
                rectF.roundOut(rect2);
                canvas.drawBitmap(bitmap, rect2, rect, paint);
            }
        }

        @Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
        @NotNull
        public String obtainCacheTag() {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211807, new Class[0], String.class);
            return proxy.isSupported ? (String) proxy.result : "productScale";
        }

        @Override // com.shizhuang.duapp.libs.duimageloaderview.loader.converter.IBitmapConverter
        @Nullable
        public Bitmap obtainNewSourceBitmap(@Nullable Bitmap bitmap) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{bitmap}, this, changeQuickRedirect, false, 211803, new Class[]{Bitmap.class}, Bitmap.class);
            if (proxy.isSupported) {
                return (Bitmap) proxy.result;
            }
            if (bitmap != null) {
                return bitmap;
            }
            return null;
        }
    }

    @JvmOverloads
    public ChannelHotPictureView2(@NotNull Context context) {
        this(context, null, 0, 6);
    }

    @JvmOverloads
    public ChannelHotPictureView2(@NotNull Context context, @Nullable AttributeSet attributeSet) {
        this(context, attributeSet, 0, 4);
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ ChannelHotPictureView2(Context context, AttributeSet attributeSet, int i3, int i12) {
        this(context, (i12 & 2) != 0 ? null : attributeSet, (i12 & 4) != 0 ? 0 : i3);
    }

    public View _$_findCachedViewById(int i3) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i3)}, this, changeQuickRedirect, false, 211797, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.l == null) {
            this.l = new HashMap();
        }
        View view = (View) this.l.get(Integer.valueOf(i3));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i3);
        this.l.put(Integer.valueOf(i3), findViewById);
        return findViewById;
    }

    /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
    @Override // com.shizhuang.duapp.modules.mall_dynamic.channel.views.BaseChannelView
    public void c(ChannelHotPictureModel channelHotPictureModel) {
        ChannelHotPictureModel channelHotPictureModel2 = channelHotPictureModel;
        if (!PatchProxy.proxy(new Object[]{channelHotPictureModel2}, this, changeQuickRedirect, false, 211789, new Class[]{ChannelHotPictureModel.class}, Void.TYPE).isSupported) {
            DuImageLoaderView duImageLoaderView = (DuImageLoaderView) _$_findCachedViewById(R.id.vogueBigBannerImg);
            String newHotPictureBackgroundImage = channelHotPictureModel2.getNewHotPictureBackgroundImage();
            if (newHotPictureBackgroundImage == null) {
                newHotPictureBackgroundImage = "";
            }
            duImageLoaderView.i(newHotPictureBackgroundImage).p0(DuScaleType.FIT_XY).m0(1.1942675f).x();
            this.j = -2;
            VogueBigImgBannerAdapter vogueBigImgBannerAdapter = this.f19343g;
            List<ChannelHotPictureItemModel> list = channelHotPictureModel2.getList();
            if (list == null) {
                list = CollectionsKt__CollectionsKt.emptyList();
            }
            vogueBigImgBannerAdapter.setItems(list);
            this.i = ((Banner) _$_findCachedViewById(R.id.bannerView)).getCurrentItem();
            n();
            LifecycleExtensionKt.l(e(), 400, new ChannelHotPictureView2$onBind$1(this));
        }
    }

    public final ChannelHotPicAnimHelper2 getAnimHelper() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211787, new Class[0], ChannelHotPicAnimHelper2.class);
        return (ChannelHotPicAnimHelper2) (proxy.isSupported ? proxy.result : this.k.getValue());
    }

    @Override // com.shizhuang.duapp.common.component.module.AbsModuleView
    public int getLayoutId() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211788, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.layout_mall_channel_hot_picture2;
    }

    public final void m() {
        ChannelHotPictureItemModel channelHotPictureItemModel;
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211793, new Class[0], Void.TYPE).isSupported && this.f && (channelHotPictureItemModel = (ChannelHotPictureItemModel) this.f19343g.getItem(((Banner) _$_findCachedViewById(R.id.bannerView)).getCurrentItem())) != null) {
            BaseChannelView.k(this, null, channelHotPictureItemModel.getTrack(), 1, null);
        }
    }

    public final boolean n() {
        String str;
        char c5 = 0;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211794, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        int i3 = this.i;
        ChannelHotPictureItemModel channelHotPictureItemModel = (ChannelHotPictureItemModel) this.f19343g.getItem(i3);
        if (channelHotPictureItemModel == null) {
            return false;
        }
        if (this.j == i3) {
            return true;
        }
        this.j = i3;
        if (!PatchProxy.proxy(new Object[]{channelHotPictureItemModel}, this, changeQuickRedirect, false, 211795, new Class[]{ChannelHotPictureItemModel.class}, Void.TYPE).isSupported) {
            String sellDateFormat = channelHotPictureItemModel.getSellDateFormat();
            List<String> list = null;
            List split$default = sellDateFormat != null ? StringsKt__StringsKt.split$default((CharSequence) sellDateFormat, new String[]{"/"}, false, 0, 6, (Object) null) : null;
            boolean z = split$default != null && split$default.size() == 2;
            int i12 = 8;
            ((ConstraintLayout) _$_findCachedViewById(R.id.sellDateLl)).setVisibility(z ? 0 : 8);
            if (z) {
                ((HotPicDateText) _$_findCachedViewById(R.id.sellDateFirstTv)).setText(split$default != null ? (String) split$default.get(0) : null);
                ((HotPicDateText) _$_findCachedViewById(R.id.sellDateLastTv)).setText(split$default != null ? (String) split$default.get(1) : null);
                TextView textView = (TextView) _$_findCachedViewById(R.id.sellDateSuffixTv);
                String sellDateText = channelHotPictureItemModel.getSellDateText();
                textView.setText(sellDateText != null ? StringsKt___StringsKt.take(sellDateText, 4) : null);
            }
            String hotLabelImage = channelHotPictureItemModel.getHotLabelImage();
            boolean z4 = !(hotLabelImage == null || hotLabelImage.length() == 0);
            ((DuImageLoaderView) _$_findCachedViewById(R.id.hotLableIv)).i(channelHotPictureItemModel.getHotLabelImage()).x();
            ((DuImageLoaderView) _$_findCachedViewById(R.id.hotLableIv)).setVisibility(z4 ? 0 : 8);
            ImageView imageView = (ImageView) _$_findCachedViewById(R.id.popularIv);
            if (z4 || z) {
                i12 = 0;
            }
            imageView.setVisibility(i12);
            ((TextView) _$_findCachedViewById(R.id.onlookerNumTv)).setText(channelHotPictureItemModel.getOnlookerNumText());
            co.c cVar = (co.c) h.b.h(1125, 807, ((ProductImageLoaderView) _$_findCachedViewById(R.id.imgLogo)).i(channelHotPictureItemModel.getCarouselImg()).d0(300));
            cVar.i = new e();
            cVar.x();
            FontText fontText = (FontText) _$_findCachedViewById(R.id.mainTitle);
            String mainTitle = channelHotPictureItemModel.getMainTitle();
            if (mainTitle == null) {
                mainTitle = "";
            }
            lr0.b.a(fontText, mainTitle, 20.0f, 24.0f);
            HotPicDividerText hotPicDividerText = (HotPicDividerText) _$_findCachedViewById(R.id.subTitleTv);
            List<String> sellingPointsLabels = channelHotPictureItemModel.getSellingPointsLabels();
            if (sellingPointsLabels != null) {
                ArrayList arrayList = new ArrayList();
                for (T t : sellingPointsLabels) {
                    if (t.length() > 0) {
                        arrayList.add(t);
                    }
                }
                ArrayList arrayList2 = new ArrayList(CollectionsKt__IterablesKt.collectionSizeOrDefault(arrayList, 10));
                Iterator it2 = arrayList.iterator();
                while (it2.hasNext()) {
                    String str2 = (String) it2.next();
                    Object[] objArr = new Object[2];
                    objArr[c5] = str2;
                    objArr[1] = new Integer(16);
                    ChangeQuickRedirect changeQuickRedirect2 = changeQuickRedirect;
                    Class[] clsArr = new Class[2];
                    clsArr[c5] = String.class;
                    clsArr[1] = Integer.TYPE;
                    PatchProxyResult proxy2 = PatchProxy.proxy(objArr, this, changeQuickRedirect2, false, 211796, clsArr, String.class);
                    if (proxy2.isSupported) {
                        str = (String) proxy2.result;
                    } else {
                        Charset forName = Charset.forName("GB2312");
                        int i13 = 0;
                        String str3 = "";
                        while (true) {
                            if (i13 >= str2.length()) {
                                break;
                            }
                            str3 = h6.a.j(str3, str2.charAt(i13));
                            byte[] bytes = str3.getBytes(forName);
                            if (bytes.length > 16) {
                                str = StringsKt___StringsKt.dropLast(str3, 1);
                                break;
                            } else if (bytes.length == 16) {
                                break;
                            } else {
                                i13++;
                            }
                        }
                        str = str3;
                    }
                    arrayList2.add(str);
                    c5 = 0;
                }
                list = CollectionsKt___CollectionsKt.take(arrayList2, 2);
            }
            hotPicDividerText.setStrList(list);
        }
        return true;
    }

    @Override // com.shizhuang.duapp.modules.du_mall_common.utils.IViewAppearObserver
    public void onAppeared() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211790, new Class[0], Void.TYPE).isSupported) {
            ((Banner) _$_findCachedViewById(R.id.bannerView)).setIsAutoLoop(true);
        }
    }

    @Override // com.shizhuang.duapp.modules.du_mall_common.utils.IViewAppearObserver
    public void onDisappeared() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 211791, new Class[0], Void.TYPE).isSupported) {
            ((Banner) _$_findCachedViewById(R.id.bannerView)).setIsAutoLoop(false);
        }
    }

    @Override // com.shizhuang.duapp.common.component.module.IModuleExposureObserver
    public void onExposure(@Nullable DuExposureHelper.State state) {
        if (!PatchProxy.proxy(new Object[]{state}, this, changeQuickRedirect, false, 211792, new Class[]{DuExposureHelper.State.class}, Void.TYPE).isSupported) {
            this.f = true;
            m();
        }
    }

    @JvmOverloads
    public ChannelHotPictureView2(@NotNull Context context, @Nullable AttributeSet attributeSet, int i3) {
        super(context, attributeSet, i3);
        VogueBigImgBannerAdapter vogueBigImgBannerAdapter = new VogueBigImgBannerAdapter();
        this.f19343g = vogueBigImgBannerAdapter;
        this.i = -1;
        this.j = -2;
        this.k = LazyKt__LazyJVMKt.lazy(new ChannelHotPictureView2$animHelper$2(this));
        ((Banner) _$_findCachedViewById(R.id.bannerView)).setAdapter(vogueBigImgBannerAdapter);
        ((Banner) _$_findCachedViewById(R.id.bannerView)).setLoopTime(3500);
        ((Banner) _$_findCachedViewById(R.id.bannerView)).setIndicator(new CircleIndicator(context));
        vogueBigImgBannerAdapter.setOnBannerListener(new a(this, context));
        ((Banner) _$_findCachedViewById(R.id.bannerView)).setLifecycleOwner(e());
        ((Banner) _$_findCachedViewById(R.id.bannerView)).addOnPageScrollStateChangedListener(new b(this));
        ((Banner) _$_findCachedViewById(R.id.bannerView)).addOnPageScrolledListener(new c(this));
        ((Banner) _$_findCachedViewById(R.id.bannerView)).addOnPageSelectedListener(new d(this));
        ((Banner) _$_findCachedViewById(R.id.bannerView)).setItemRatio(0.44f);
        BaseChannelView.g(this, 0, 0, 0, fi.b.b((float) 9), 7, null);
        ((DuImageLoaderView) _$_findCachedViewById(R.id.ivProductTopLight)).i("https://cdn.poizon.com/node-common/7ad3b280-4096-612b-c624-a111076bf79d.webp").x();
    }
}