package ῲ.ᓆ;

import android.annotation.SuppressLint;
import android.graphics.Rect;
import android.view.View;
import android.view.ViewGroup;
import java.util.ArrayList;
import java.util.List;
import ῲ.Ԕ.K.AbstractC1523;
import ῲ.ᓆ.AbstractC1647;

@SuppressLint({"RestrictedApi"})
/* renamed from: ῲ.ᓆ.ඓ  reason: contains not printable characters */
/* compiled from: FragmentTransitionSupport */
public class C1634 extends AbstractC1523 {

    /* renamed from: ῲ.ᓆ.ඓ$ʬ  reason: contains not printable characters */
    /* compiled from: FragmentTransitionSupport */
    public class C1635 extends C1662 {

        /* renamed from: ʬ  reason: contains not printable characters */
        public final /* synthetic */ Object f5853;

        /* renamed from: ඓ  reason: contains not printable characters */
        public final /* synthetic */ Object f5854;

        /* renamed from: ῲ  reason: contains not printable characters */
        public final /* synthetic */ ArrayList f5855;

        /* renamed from: K  reason: contains not printable characters */
        public final /* synthetic */ Object f5857;

        /* renamed from: 㴹  reason: contains not printable characters */
        public final /* synthetic */ ArrayList f5858;

        /* renamed from: 㸾  reason: contains not printable characters */
        public final /* synthetic */ ArrayList f5859;

        public C1635(Object obj, ArrayList arrayList, Object obj2, ArrayList arrayList2, Object obj3, ArrayList arrayList3) {
            this.f5857 = obj;
            this.f5855 = arrayList;
            this.f5853 = obj2;
            this.f5859 = arrayList2;
            this.f5854 = obj3;
            this.f5858 = arrayList3;
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionEnd(AbstractC1647 r1) {
            r1.removeListener(this);
        }

        @Override // ῲ.ᓆ.C1662, ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionStart(AbstractC1647 r4) {
            Object obj = this.f5857;
            if (obj != null) {
                C1634.this.m4229(obj, this.f5855, (ArrayList<View>) null);
            }
            Object obj2 = this.f5853;
            if (obj2 != null) {
                C1634.this.m4229(obj2, this.f5859, (ArrayList<View>) null);
            }
            Object obj3 = this.f5854;
            if (obj3 != null) {
                C1634.this.m4229(obj3, this.f5858, (ArrayList<View>) null);
            }
        }
    }

    /* renamed from: ῲ.ᓆ.ඓ$ῲ  reason: contains not printable characters */
    /* compiled from: FragmentTransitionSupport */
    public class C1636 implements AbstractC1647.AbstractC1652 {

        /* renamed from: ῲ  reason: contains not printable characters */
        public final /* synthetic */ ArrayList f5860;

        /* renamed from: K  reason: contains not printable characters */
        public final /* synthetic */ View f5861;

        public C1636(C1634 r1, View view, ArrayList arrayList) {
            this.f5861 = view;
            this.f5860 = arrayList;
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionCancel(AbstractC1647 r1) {
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionEnd(AbstractC1647 r4) {
            r4.removeListener(this);
            this.f5861.setVisibility(8);
            int size = this.f5860.size();
            for (int i = 0; i < size; i++) {
                ((View) this.f5860.get(i)).setVisibility(0);
            }
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionPause(AbstractC1647 r1) {
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionResume(AbstractC1647 r1) {
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1652
        public void onTransitionStart(AbstractC1647 r1) {
        }
    }

    /* renamed from: ῲ.ᓆ.ඓ$K  reason: contains not printable characters */
    /* compiled from: FragmentTransitionSupport */
    public class C1637 extends AbstractC1647.AbstractC1649 {

        /* renamed from: K  reason: contains not printable characters */
        public final /* synthetic */ Rect f5862;

        public C1637(C1634 r1, Rect rect) {
            this.f5862 = rect;
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1649
        /* renamed from: K  reason: contains not printable characters */
        public Rect m4231(AbstractC1647 r1) {
            return this.f5862;
        }
    }

    /* renamed from: ῲ.ᓆ.ඓ$㸾  reason: contains not printable characters */
    /* compiled from: FragmentTransitionSupport */
    public class C1638 extends AbstractC1647.AbstractC1649 {

        /* renamed from: K  reason: contains not printable characters */
        public final /* synthetic */ Rect f5863;

        public C1638(C1634 r1, Rect rect) {
            this.f5863 = rect;
        }

        @Override // ῲ.ᓆ.AbstractC1647.AbstractC1649
        /* renamed from: K  reason: contains not printable characters */
        public Rect m4232(AbstractC1647 r1) {
            Rect rect = this.f5863;
            if (rect == null || rect.isEmpty()) {
                return null;
            }
            return this.f5863;
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: ʬ  reason: contains not printable characters */
    public Object m4215(Object obj) {
        if (obj == null) {
            return null;
        }
        C1663 r0 = new C1663();
        r0.m4255((AbstractC1647) obj);
        return r0;
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: ῲ  reason: contains not printable characters */
    public Object m4217(Object obj) {
        if (obj != null) {
            return ((AbstractC1647) obj).clone();
        }
        return null;
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public boolean m4230(Object obj) {
        return obj instanceof AbstractC1647;
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4220(Object obj, View view, ArrayList<View> arrayList) {
        C1663 r5 = (C1663) obj;
        List<View> targets = r5.getTargets();
        targets.clear();
        int size = arrayList.size();
        for (int i = 0; i < size; i++) {
            AbstractC1523.m3879(targets, arrayList.get(i));
        }
        targets.add(view);
        arrayList.add(view);
        m4228(r5, arrayList);
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public void m4228(Object obj, ArrayList<View> arrayList) {
        AbstractC1647 r4 = (AbstractC1647) obj;
        if (r4 != null) {
            int i = 0;
            if (r4 instanceof C1663) {
                C1663 r42 = (C1663) r4;
                int size = r42.f5904.size();
                while (i < size) {
                    m4228(r42.m4254(i), arrayList);
                    i++;
                }
            } else if (!m4214(r4) && AbstractC1523.m3880((List) r4.getTargets())) {
                int size2 = arrayList.size();
                while (i < size2) {
                    r4.addTarget(arrayList.get(i));
                    i++;
                }
            }
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: ʬ  reason: contains not printable characters */
    public void m4216(Object obj, View view) {
        if (view != null) {
            Rect rect = new Rect();
            m3890(view, rect);
            ((AbstractC1647) obj).setEpicenterCallback(new C1637(this, rect));
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: ῲ  reason: contains not printable characters */
    public Object m4218(Object obj, Object obj2, Object obj3) {
        C1663 r0 = new C1663();
        if (obj != null) {
            r0.m4255((AbstractC1647) obj);
        }
        if (obj2 != null) {
            r0.m4255((AbstractC1647) obj2);
        }
        if (obj3 != null) {
            r0.m4255((AbstractC1647) obj3);
        }
        return r0;
    }

    /* renamed from: K  reason: contains not printable characters */
    public static boolean m4214(AbstractC1647 r1) {
        return !AbstractC1523.m3880(r1.getTargetIds()) || !AbstractC1523.m3880(r1.getTargetNames()) || !AbstractC1523.m3880(r1.getTargetTypes());
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4221(Object obj, ArrayList<View> arrayList, ArrayList<View> arrayList2) {
        C1663 r2 = (C1663) obj;
        if (r2 != null) {
            r2.getTargets().clear();
            r2.getTargets().addAll(arrayList2);
            m4229((Object) r2, arrayList, arrayList2);
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public void m4226(Object obj, View view, ArrayList<View> arrayList) {
        ((AbstractC1647) obj).addListener(new C1636(this, view, arrayList));
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public Object m4222(Object obj, Object obj2, Object obj3) {
        AbstractC1647 r2 = (AbstractC1647) obj;
        AbstractC1647 r3 = (AbstractC1647) obj2;
        AbstractC1647 r4 = (AbstractC1647) obj3;
        if (r2 != null && r3 != null) {
            C1663 r0 = new C1663();
            r0.m4255(r2);
            r0.m4255(r3);
            r0.m4253(1);
            r2 = r0;
        } else if (r2 == null) {
            r2 = r3 != null ? r3 : null;
        }
        if (r4 == null) {
            return r2;
        }
        C1663 r32 = new C1663();
        if (r2 != null) {
            r32.m4255(r2);
        }
        r32.m4255(r4);
        return r32;
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: ῲ  reason: contains not printable characters */
    public void m4219(Object obj, View view) {
        if (obj != null) {
            ((AbstractC1647) obj).removeTarget(view);
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public void m4223(ViewGroup viewGroup, Object obj) {
        C1679.m4263(viewGroup, (AbstractC1647) obj);
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public void m4227(Object obj, Object obj2, ArrayList<View> arrayList, Object obj3, ArrayList<View> arrayList2, Object obj4, ArrayList<View> arrayList3) {
        ((AbstractC1647) obj).addListener(new C1635(obj2, arrayList, obj3, arrayList2, obj4, arrayList3));
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public void m4229(Object obj, ArrayList<View> arrayList, ArrayList<View> arrayList2) {
        int i;
        AbstractC1647 r5 = (AbstractC1647) obj;
        int i2 = 0;
        if (r5 instanceof C1663) {
            C1663 r52 = (C1663) r5;
            int size = r52.f5904.size();
            while (i2 < size) {
                m4229((Object) r52.m4254(i2), arrayList, arrayList2);
                i2++;
            }
        } else if (!m4214(r5)) {
            List<View> targets = r5.getTargets();
            if (targets.size() == arrayList.size() && targets.containsAll(arrayList)) {
                if (arrayList2 == null) {
                    i = 0;
                } else {
                    i = arrayList2.size();
                }
                while (i2 < i) {
                    r5.addTarget(arrayList2.get(i2));
                    i2++;
                }
                int size2 = arrayList.size();
                while (true) {
                    size2--;
                    if (size2 >= 0) {
                        r5.removeTarget(arrayList.get(size2));
                    } else {
                        return;
                    }
                }
            }
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public void m4225(Object obj, View view) {
        if (obj != null) {
            ((AbstractC1647) obj).addTarget(view);
        }
    }

    @Override // ῲ.Ԕ.K.AbstractC1523
    /* renamed from: K  reason: contains not printable characters */
    public void m4224(Object obj, Rect rect) {
        if (obj != null) {
            ((AbstractC1647) obj).setEpicenterCallback(new C1638(this, rect));
        }
    }
}
