package defpackage;

import android.graphics.Rect;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import j$.util.Objects;
import java.util.ArrayList;
import java.util.WeakHashMap;

/* renamed from: ᵗᵗ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C2457 extends AbstractC0243 {

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public final C0423 f9588;

    /* renamed from: ˌʾˀ, reason: contains not printable characters */
    public Object f9589;

    /* renamed from: ˌᵜᵹᵩ, reason: contains not printable characters */
    public final ArrayList f9590;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final Object f9591;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public final AbstractC4613 f9592;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final ArrayList f9593;

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final ArrayList f9594;

    /* renamed from: ᵡʠ, reason: contains not printable characters */
    public boolean f9595;

    /* renamed from: ᵪʩ, reason: contains not printable characters */
    public final C1200 f9596;

    /* renamed from: ᵯٴᵦ, reason: contains not printable characters */
    public final C1200 f9597;

    /* renamed from: ᵳٴᵶ, reason: contains not printable characters */
    public final C4866 f9598 = new C4866();

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public final C1200 f9599;

    /* renamed from: ᵸˑ, reason: contains not printable characters */
    public final ArrayList f9600;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final ArrayList f9601;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final C0423 f9602;

    public C2457(ArrayList arrayList, C0423 c0423, C0423 c04232, AbstractC4613 abstractC4613, Object obj, ArrayList arrayList2, ArrayList arrayList3, C1200 c1200, ArrayList arrayList4, ArrayList arrayList5, C1200 c12002, C1200 c12003, boolean z) {
        this.f9593 = arrayList;
        this.f9602 = c0423;
        this.f9588 = c04232;
        this.f9592 = abstractC4613;
        this.f9591 = obj;
        this.f9601 = arrayList2;
        this.f9594 = arrayList3;
        this.f9599 = c1200;
        this.f9600 = arrayList4;
        this.f9590 = arrayList5;
        this.f9597 = c12002;
        this.f9596 = c12003;
    }

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public static void m6265(View view, ArrayList arrayList) {
        if (!(view instanceof ViewGroup)) {
            if (arrayList.contains(view)) {
                return;
            }
            arrayList.add(view);
            return;
        }
        ViewGroup viewGroup = (ViewGroup) view;
        int i = AbstractC2208.f8674;
        if (viewGroup.isTransitionGroup()) {
            if (arrayList.contains(view)) {
                return;
            }
            arrayList.add(view);
            return;
        }
        int childCount = viewGroup.getChildCount();
        for (int i2 = 0; i2 < childCount; i2++) {
            View childAt = viewGroup.getChildAt(i2);
            if (childAt.getVisibility() == 0) {
                m6265(childAt, arrayList);
            }
        }
    }

    @Override // defpackage.AbstractC0243
    /* renamed from: ˇʼʤˎ */
    public final void mo1547(ViewGroup viewGroup) {
        Object obj;
        boolean zIsLaidOut = viewGroup.isLaidOut();
        int i = 0;
        ArrayList arrayList = this.f9593;
        if (!zIsLaidOut) {
            int size = arrayList.size();
            while (i < size) {
                Object obj2 = arrayList.get(i);
                i++;
                C0423 c0423 = (C0423) ((ᵢˇᵭ) ((C2101) obj2)).ᵧᵾˀˈ;
                if (AbstractC4731.m9918(2)) {
                    viewGroup.toString();
                    Objects.toString(c0423);
                }
            }
            return;
        }
        boolean zM6268 = m6268();
        C0423 c04232 = this.f9588;
        C0423 c04233 = this.f9602;
        if (zM6268 && (obj = this.f9591) != null && !mo1549()) {
            Objects.toString(obj);
            Objects.toString(c04233);
            Objects.toString(c04232);
        }
        if (mo1549() && m6268()) {
            C3057 c3057 = new C3057();
            C2836 c2836M6266 = m6266(viewGroup, c04232, c04233);
            ArrayList arrayList2 = (ArrayList) c2836M6266.f10917;
            Object obj3 = c2836M6266.f10916;
            ArrayList arrayList3 = new ArrayList(AbstractC3869.m8517(arrayList, 10));
            int size2 = arrayList.size();
            int i2 = 0;
            while (i2 < size2) {
                Object obj4 = arrayList.get(i2);
                i2++;
                arrayList3.add((C0423) ((ᵢˇᵭ) ((C2101) obj4)).ᵧᵾˀˈ);
            }
            int size3 = arrayList3.size();
            int i3 = 0;
            while (i3 < size3) {
                Object obj5 = arrayList3.get(i3);
                i3++;
                C0423 c04234 = (C0423) obj5;
                RunnableC3566 runnableC3566 = new RunnableC3566(16, c3057);
                AbstractComponentCallbacksC3693 abstractComponentCallbacksC3693 = c04234.f2345;
                this.f9592.mo2080(obj3, this.f9598, runnableC3566, new RunnableC5193(c04234, this, 0));
            }
            m6267(arrayList2, viewGroup, new C3705(this, viewGroup, obj3, c3057));
        }
    }

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public final C2836 m6266(ViewGroup viewGroup, C0423 c0423, C0423 c04232) {
        ArrayList arrayList;
        ArrayList arrayList2;
        Object obj;
        AbstractC4613 abstractC4613;
        AbstractC4613 abstractC46132;
        Object obj2;
        ArrayList arrayList3;
        int i;
        AbstractC4613 abstractC46133;
        ArrayList arrayList4;
        Object obj3;
        View view;
        C0423 c04233 = c0423;
        View view2 = new View(viewGroup.getContext());
        Rect rect = new Rect();
        ArrayList arrayList5 = this.f9593;
        int size = arrayList5.size();
        View view3 = null;
        boolean z = false;
        int i2 = 0;
        while (true) {
            arrayList = this.f9594;
            arrayList2 = this.f9601;
            obj = this.f9591;
            abstractC4613 = this.f9592;
            if (i2 >= size) {
                break;
            }
            int i3 = i2 + 1;
            if (((C2101) arrayList5.get(i2)).f8318 == null || c04232 == null || c04233 == null || this.f9599.isEmpty() || obj == null) {
                i = size;
                i2 = i3;
                z = z;
            } else {
                C1159 c1159 = AbstractC1415.f5790;
                ViewTreeObserverOnPreDrawListenerC0337.m1753(viewGroup, new RunnableC0421(c04233, c04232, this, 20));
                C1200 c1200 = this.f9597;
                arrayList2.addAll(c1200.values());
                ArrayList arrayList6 = this.f9590;
                boolean z2 = z;
                if (!arrayList6.isEmpty()) {
                    view3 = (View) c1200.get((String) arrayList6.get(0));
                    abstractC4613.mo2075(view3, obj);
                }
                View view4 = view3;
                C1200 c12002 = this.f9596;
                arrayList.addAll(c12002.values());
                ArrayList arrayList7 = this.f9600;
                if (arrayList7.isEmpty() || (view = (View) c12002.get((String) arrayList7.get(0))) == null) {
                    i = size;
                    abstractC46133 = abstractC4613;
                    arrayList4 = arrayList2;
                    obj3 = obj;
                    z = z2;
                } else {
                    arrayList4 = arrayList2;
                    abstractC46133 = abstractC4613;
                    i = size;
                    obj3 = obj;
                    ViewTreeObserverOnPreDrawListenerC0337.m1753(viewGroup, new RunnableC0421(21, abstractC46133, view, rect, false));
                    z = true;
                }
                abstractC46133.mo2077(obj3, view2, arrayList4);
                Object obj4 = this.f9591;
                abstractC46133.mo2076(obj4, null, null, obj4, arrayList);
                view3 = view4;
                i2 = i3;
            }
            size = i;
        }
        boolean z3 = z;
        Object obj5 = obj;
        AbstractC4613 abstractC46134 = abstractC4613;
        ArrayList arrayList8 = arrayList2;
        ArrayList arrayList9 = new ArrayList();
        int size2 = arrayList5.size();
        int i4 = 0;
        Object objMo2084 = null;
        Object objMo20842 = null;
        while (i4 < size2) {
            Object obj6 = arrayList5.get(i4);
            i4++;
            C2101 c2101 = (C2101) obj6;
            ArrayList arrayList10 = arrayList5;
            C0423 c04234 = (C0423) ((ᵢˇᵭ) c2101).ᵧᵾˀˈ;
            int i5 = size2;
            Object objMo2087 = abstractC46134.mo2087(c2101.f8317);
            if (objMo2087 != null) {
                ArrayList arrayList11 = new ArrayList();
                ArrayList arrayList12 = arrayList8;
                AbstractComponentCallbacksC3693 abstractComponentCallbacksC3693 = c04234.f2345;
                Object obj7 = obj5;
                m6265(abstractComponentCallbacksC3693.f13752, arrayList11);
                if (obj7 != null && (c04234 == c04232 || c04234 == c04233)) {
                    if (c04234 == c04232) {
                        arrayList11.removeAll(AbstractC2767.m6812(arrayList12));
                    } else {
                        arrayList11.removeAll(AbstractC2767.m6812(arrayList));
                    }
                }
                if (arrayList11.isEmpty()) {
                    abstractC46134.mo2079(view2, objMo2087);
                    abstractC46132 = abstractC46134;
                    obj2 = objMo2087;
                    arrayList3 = arrayList11;
                } else {
                    abstractC46134.mo2085(objMo2087, arrayList11);
                    AbstractC4613 abstractC46135 = abstractC46134;
                    abstractC46135.mo2076(objMo2087, objMo2087, arrayList11, null, null);
                    abstractC46132 = abstractC46135;
                    obj2 = objMo2087;
                    arrayList3 = arrayList11;
                    if (c04234.f2347 == 3) {
                        c04234.f2346 = false;
                        ArrayList arrayList13 = new ArrayList(arrayList3);
                        arrayList13.remove(abstractComponentCallbacksC3693.f13752);
                        abstractC46132.mo2069(obj2, abstractComponentCallbacksC3693.f13752, arrayList13);
                        ViewTreeObserverOnPreDrawListenerC0337.m1753(viewGroup, new RunnableC3566(17, arrayList3));
                    }
                }
                if (c04234.f2347 == 2) {
                    arrayList9.addAll(arrayList3);
                    if (z3) {
                        abstractC46132.mo2081(obj2, rect);
                    }
                    if (AbstractC4731.m9918(2)) {
                        obj2.toString();
                        int size3 = arrayList3.size();
                        int i6 = 0;
                        while (i6 < size3) {
                            Object obj8 = arrayList3.get(i6);
                            i6++;
                            ((View) obj8).toString();
                        }
                    }
                } else {
                    abstractC46132.mo2075(view3, obj2);
                    if (AbstractC4731.m9918(2)) {
                        obj2.toString();
                        int size4 = arrayList3.size();
                        int i7 = 0;
                        while (i7 < size4) {
                            Object obj9 = arrayList3.get(i7);
                            i7++;
                            ((View) obj9).toString();
                        }
                    }
                }
                if (c2101.f8319) {
                    objMo2084 = abstractC46132.mo2084(objMo2084, obj2);
                } else {
                    objMo20842 = abstractC46132.mo2084(objMo20842, obj2);
                }
                c04233 = c0423;
                abstractC46134 = abstractC46132;
                arrayList5 = arrayList10;
                size2 = i5;
                i4 = i4;
                arrayList8 = arrayList12;
                obj5 = obj7;
            } else {
                c04233 = c0423;
                arrayList5 = arrayList10;
                size2 = i5;
            }
        }
        Object objMo2082 = abstractC46134.mo2082(objMo2084, objMo20842, obj5);
        if (AbstractC4731.m9918(2)) {
            Objects.toString(objMo2082);
            viewGroup.toString();
        }
        return new C2836(arrayList9, objMo2082);
    }

    @Override // defpackage.AbstractC0243
    /* renamed from: ˏᵙ */
    public final void mo1548(ViewGroup viewGroup) {
        boolean zIsLaidOut = viewGroup.isLaidOut();
        int i = 0;
        ArrayList arrayList = this.f9593;
        if (!zIsLaidOut || this.f9595) {
            int size = arrayList.size();
            int i2 = 0;
            while (i2 < size) {
                Object obj = arrayList.get(i2);
                i2++;
                C2101 c2101 = (C2101) obj;
                C0423 c0423 = (C0423) ((ᵢˇᵭ) c2101).ᵧᵾˀˈ;
                if (AbstractC4731.m9918(2)) {
                    if (this.f9595) {
                        Objects.toString(c0423);
                    } else {
                        viewGroup.toString();
                        Objects.toString(c0423);
                    }
                }
                ((C0423) ((ᵢˇᵭ) c2101).ᵧᵾˀˈ).m1968(this);
            }
            this.f9595 = false;
            return;
        }
        Object obj2 = this.f9589;
        AbstractC4613 abstractC4613 = this.f9592;
        C0423 c04232 = this.f9588;
        C0423 c04233 = this.f9602;
        if (obj2 != null) {
            abstractC4613.mo2072(obj2);
            if (AbstractC4731.m9918(2)) {
                Objects.toString(c04233);
                Objects.toString(c04232);
                return;
            }
            return;
        }
        C2836 c2836M6266 = m6266(viewGroup, c04232, c04233);
        ArrayList arrayList2 = (ArrayList) c2836M6266.f10917;
        Object obj3 = c2836M6266.f10916;
        ArrayList arrayList3 = new ArrayList(AbstractC3869.m8517(arrayList, 10));
        int size2 = arrayList.size();
        int i3 = 0;
        while (i3 < size2) {
            Object obj4 = arrayList.get(i3);
            i3++;
            arrayList3.add((C0423) ((ᵢˇᵭ) ((C2101) obj4)).ᵧᵾˀˈ);
        }
        int size3 = arrayList3.size();
        while (i < size3) {
            Object obj5 = arrayList3.get(i);
            i++;
            C0423 c04234 = (C0423) obj5;
            abstractC4613.mo2073(c04234.f2345, obj3, this.f9598, new RunnableC5193(c04234, this, 1));
        }
        m6267(arrayList2, viewGroup, new C3849(this, viewGroup, obj3));
        if (AbstractC4731.m9918(2)) {
            Objects.toString(c04233);
            Objects.toString(c04232);
        }
    }

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public final void m6267(ArrayList arrayList, ViewGroup viewGroup, InterfaceC4622 interfaceC4622) {
        AbstractC1415.m4293(4, arrayList);
        ArrayList arrayList2 = new ArrayList();
        ArrayList arrayList3 = this.f9594;
        int size = arrayList3.size();
        for (int i = 0; i < size; i++) {
            View view = (View) arrayList3.get(i);
            WeakHashMap weakHashMap = AbstractC2873.f11133;
            arrayList2.add(view.getTransitionName());
            view.setTransitionName(null);
        }
        boolean zM9918 = AbstractC4731.m9918(2);
        ArrayList arrayList4 = this.f9601;
        if (zM9918) {
            int size2 = arrayList4.size();
            int i2 = 0;
            while (i2 < size2) {
                Object obj = arrayList4.get(i2);
                i2++;
                View view2 = (View) obj;
                view2.toString();
                WeakHashMap weakHashMap2 = AbstractC2873.f11133;
                view2.getTransitionName();
            }
            int size3 = arrayList3.size();
            int i3 = 0;
            while (i3 < size3) {
                Object obj2 = arrayList3.get(i3);
                i3++;
                View view3 = (View) obj2;
                view3.toString();
                WeakHashMap weakHashMap3 = AbstractC2873.f11133;
                view3.getTransitionName();
            }
        }
        interfaceC4622.mo1401();
        int size4 = arrayList3.size();
        ArrayList arrayList5 = new ArrayList();
        for (int i4 = 0; i4 < size4; i4++) {
            View view4 = (View) arrayList4.get(i4);
            WeakHashMap weakHashMap4 = AbstractC2873.f11133;
            String transitionName = view4.getTransitionName();
            arrayList5.add(transitionName);
            if (transitionName != null) {
                view4.setTransitionName(null);
                String str = (String) this.f9599.get(transitionName);
                int i5 = 0;
                while (true) {
                    if (i5 >= size4) {
                        break;
                    }
                    if (str.equals(arrayList2.get(i5))) {
                        ((View) arrayList3.get(i5)).setTransitionName(transitionName);
                        break;
                    }
                    i5++;
                }
            }
        }
        ViewTreeObserverOnPreDrawListenerC0337.m1753(viewGroup, new RunnableC1824(size4, arrayList3, arrayList2, arrayList4, arrayList5));
        AbstractC1415.m4293(0, arrayList);
        this.f9592.mo2090(this.f9591, arrayList4, arrayList3);
    }

    @Override // defpackage.AbstractC0243
    /* renamed from: ᵥᵯˎ */
    public final boolean mo1549() {
        Object obj;
        Object obj2;
        AbstractC4613 abstractC4613 = this.f9592;
        if (abstractC4613.mo2070()) {
            ArrayList arrayList = this.f9593;
            if (!arrayList.isEmpty()) {
                int size = arrayList.size();
                int i = 0;
                while (i < size) {
                    Object obj3 = arrayList.get(i);
                    i++;
                    C2101 c2101 = (C2101) obj3;
                    if (Build.VERSION.SDK_INT < 34 || (obj2 = c2101.f8317) == null || !abstractC4613.mo2083(obj2)) {
                        break;
                    }
                }
                obj = this.f9591;
                return obj != null ? true : true;
            }
            obj = this.f9591;
            if (obj != null || abstractC4613.mo2083(obj)) {
            }
        }
        return false;
    }

    @Override // defpackage.AbstractC0243
    /* renamed from: ᵴᵳ */
    public final void mo1550(ViewGroup viewGroup) {
        this.f9598.m10250();
    }

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public final boolean m6268() {
        ArrayList arrayList = this.f9593;
        if (arrayList.isEmpty()) {
            return true;
        }
        int size = arrayList.size();
        int i = 0;
        while (i < size) {
            Object obj = arrayList.get(i);
            i++;
            if (!((C0423) ((ᵢˇᵭ) ((C2101) obj)).ᵧᵾˀˈ).f2345.f13785) {
                return false;
            }
        }
        return true;
    }

    @Override // defpackage.AbstractC0243
    /* renamed from: ᵻᵢﹳᵰ */
    public final void mo1551(C1820 c1820) {
        Object obj = this.f9589;
        if (obj != null) {
            this.f9592.mo2086(obj, c1820.f7393);
        }
    }
}
