package a0;

import android.content.Context;
import android.graphics.Rect;
import android.os.HandlerThread;
import android.util.SparseArray;
import android.util.SparseBooleanArray;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.AccelerateInterpolator;
import android.view.animation.AnimationUtils;
import android.view.animation.BounceInterpolator;
import android.view.animation.DecelerateInterpolator;
import android.view.animation.OvershootInterpolator;
import androidx.constraintlayout.core.widgets.ConstraintWidget$DimensionBehaviour;
import androidx.constraintlayout.motion.widget.MotionHelper;
import androidx.constraintlayout.motion.widget.MotionLayout;
import androidx.constraintlayout.widget.Barrier;
import androidx.constraintlayout.widget.ConstraintHelper;
import androidx.constraintlayout.widget.ConstraintLayout;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.ListIterator;
import java.util.Map;
import java.util.Set;

/* JADX INFO: loaded from: classes.dex */
public final class v implements com.tekartik.sqflite.i {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f212a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f213b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public Object f214c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public Object f215d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public Object f216e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public Object f217f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final Object f218g;

    public v(int i10, int i11) {
        this.f215d = new LinkedList();
        this.f216e = new HashSet();
        this.f217f = new HashSet();
        this.f218g = new HashMap();
        this.f214c = "Sqflite";
        this.f212a = i10;
        this.f213b = i11;
    }

    public static void h(w.e eVar, w.e eVar2) {
        ArrayList<w.d> arrayList = eVar.f34111v0;
        HashMap map = new HashMap();
        map.put(eVar, eVar2);
        eVar2.f34111v0.clear();
        eVar2.h(eVar, map);
        for (w.d dVar : arrayList) {
            w.d aVar = dVar instanceof w.a ? new w.a() : dVar instanceof w.h ? new w.h() : dVar instanceof w.g ? new w.g() : dVar instanceof w.l ? new w.l() : dVar instanceof w.i ? new w.j() : new w.d();
            eVar2.f34111v0.add(aVar);
            w.d dVar2 = aVar.V;
            if (dVar2 != null) {
                ((w.n) dVar2).f34111v0.remove(aVar);
                aVar.E();
            }
            aVar.V = eVar2;
            map.put(dVar, aVar);
        }
        for (w.d dVar3 : arrayList) {
            ((w.d) map.get(dVar3)).h(dVar3, map);
        }
    }

    public static w.d j(w.e eVar, View view) {
        if (eVar.f34043h0 == view) {
            return eVar;
        }
        ArrayList arrayList = eVar.f34111v0;
        int size = arrayList.size();
        for (int i10 = 0; i10 < size; i10++) {
            w.d dVar = (w.d) arrayList.get(i10);
            if (dVar.f34043h0 == view) {
                return dVar;
            }
        }
        return null;
    }

    @Override // com.tekartik.sqflite.i
    public final synchronized void a() {
        try {
            for (com.tekartik.sqflite.h hVar : (Set) this.f216e) {
                synchronized (hVar) {
                    HandlerThread handlerThread = hVar.f24848c;
                    if (handlerThread != null) {
                        handlerThread.quit();
                        hVar.f24848c = null;
                        hVar.f24849d = null;
                    }
                }
            }
            for (com.tekartik.sqflite.h hVar2 : (Set) this.f217f) {
                synchronized (hVar2) {
                    HandlerThread handlerThread2 = hVar2.f24848c;
                    if (handlerThread2 != null) {
                        handlerThread2.quit();
                        hVar2.f24848c = null;
                        hVar2.f24849d = null;
                    }
                }
            }
        } catch (Throwable th) {
            throw th;
        }
    }

    @Override // com.tekartik.sqflite.i
    public final synchronized void b(com.tekartik.sqflite.f fVar) {
        ((LinkedList) this.f215d).add(fVar);
        Iterator it = new HashSet((Set) this.f216e).iterator();
        while (it.hasNext()) {
            n((com.tekartik.sqflite.h) it.next());
        }
    }

    public final void d(com.google.firebase.components.k kVar) {
        if (!(!((Set) this.f215d).contains(kVar.f24025a))) {
            throw new IllegalArgumentException("Components are not allowed to depend on interfaces they themselves provide.");
        }
        ((Set) this.f216e).add(kVar);
    }

    public final com.google.firebase.components.a e() {
        if (((com.google.firebase.components.e) this.f217f) != null) {
            return new com.google.firebase.components.a((String) this.f214c, new HashSet((Set) this.f215d), new HashSet((Set) this.f216e), this.f212a, this.f213b, (com.google.firebase.components.e) this.f217f, (Set) this.f218g);
        }
        throw new IllegalStateException("Missing required property: factory.");
    }

    public final void f() {
        MotionLayout motionLayout = (MotionLayout) this.f218g;
        int childCount = motionLayout.getChildCount();
        motionLayout.f1101e0.clear();
        SparseArray sparseArray = new SparseArray();
        int[] iArr = new int[childCount];
        for (int i10 = 0; i10 < childCount; i10++) {
            View childAt = motionLayout.getChildAt(i10);
            q qVar = new q(childAt);
            int id2 = childAt.getId();
            iArr[i10] = id2;
            sparseArray.put(id2, qVar);
            motionLayout.f1101e0.put(childAt, qVar);
        }
        for (int i11 = 0; i11 < childCount; i11++) {
            View childAt2 = motionLayout.getChildAt(i11);
            q qVar2 = (q) motionLayout.f1101e0.get(childAt2);
            if (qVar2 != null) {
                androidx.constraintlayout.widget.o oVar = (androidx.constraintlayout.widget.o) this.f216e;
                y yVar = qVar2.f171f;
                if (oVar != null) {
                    w.d dVarJ = j((w.e) this.f214c, childAt2);
                    if (dVarJ != null) {
                        Rect rectC = MotionLayout.c(motionLayout, dVarJ);
                        androidx.constraintlayout.widget.o oVar2 = (androidx.constraintlayout.widget.o) this.f216e;
                        int width = motionLayout.getWidth();
                        int height = motionLayout.getHeight();
                        int i12 = oVar2.f1478d;
                        if (i12 != 0) {
                            q.h(rectC, qVar2.f166a, i12, width, height);
                        }
                        yVar.f223c = 0.0f;
                        yVar.f224d = 0.0f;
                        qVar2.g(yVar);
                        yVar.g(rectC.left, rectC.top, rectC.width(), rectC.height());
                        androidx.constraintlayout.widget.j jVarH = oVar2.h(qVar2.f168c);
                        yVar.a(jVarH);
                        androidx.constraintlayout.widget.l lVar = jVarH.f1390d;
                        qVar2.f177l = lVar.f1445g;
                        qVar2.f173h.c(rectC, oVar2, i12, qVar2.f168c);
                        qVar2.C = jVarH.f1392f.f1466i;
                        qVar2.E = lVar.f1448j;
                        qVar2.F = lVar.f1447i;
                        Context context = qVar2.f167b.getContext();
                        int i13 = lVar.f1450l;
                        qVar2.G = i13 != -2 ? i13 != -1 ? i13 != 0 ? i13 != 1 ? i13 != 2 ? i13 != 4 ? i13 != 5 ? null : new OvershootInterpolator() : new BounceInterpolator() : new DecelerateInterpolator() : new AccelerateInterpolator() : new AccelerateDecelerateInterpolator() : new p(v.f.c(lVar.f1449k)) : AnimationUtils.loadInterpolator(context, lVar.f1451m);
                    } else if (motionLayout.f1113o0 != 0) {
                        o6.b.o();
                        o6.b.q(childAt2);
                        childAt2.getClass();
                    }
                } else {
                    motionLayout.getClass();
                }
                if (((androidx.constraintlayout.widget.o) this.f217f) != null) {
                    w.d dVarJ2 = j((w.e) this.f215d, childAt2);
                    if (dVarJ2 != null) {
                        Rect rectC2 = MotionLayout.c(motionLayout, dVarJ2);
                        androidx.constraintlayout.widget.o oVar3 = (androidx.constraintlayout.widget.o) this.f217f;
                        int width2 = motionLayout.getWidth();
                        int height2 = motionLayout.getHeight();
                        int i14 = oVar3.f1478d;
                        if (i14 != 0) {
                            q.h(rectC2, qVar2.f166a, i14, width2, height2);
                            rectC2 = qVar2.f166a;
                        }
                        y yVar2 = qVar2.f172g;
                        yVar2.f223c = 1.0f;
                        yVar2.f224d = 1.0f;
                        qVar2.g(yVar2);
                        yVar2.g(rectC2.left, rectC2.top, rectC2.width(), rectC2.height());
                        yVar2.a(oVar3.h(qVar2.f168c));
                        qVar2.f174i.c(rectC2, oVar3, i14, qVar2.f168c);
                    } else if (motionLayout.f1113o0 != 0) {
                        o6.b.o();
                        o6.b.q(childAt2);
                        childAt2.getClass();
                    }
                }
            }
        }
        for (int i15 = 0; i15 < childCount; i15++) {
            q qVar3 = (q) sparseArray.get(iArr[i15]);
            int i16 = qVar3.f171f.f231k;
            if (i16 != -1) {
                q qVar4 = (q) sparseArray.get(i16);
                qVar3.f171f.i(qVar4, qVar4.f171f);
                qVar3.f172g.i(qVar4, qVar4.f172g);
            }
        }
    }

    public final void g(int i10, int i11) {
        Object obj = this.f218g;
        int optimizationLevel = ((MotionLayout) obj).getOptimizationLevel();
        if (((MotionLayout) obj).W != ((MotionLayout) obj).getStartState()) {
            Object obj2 = this.f216e;
            if (((androidx.constraintlayout.widget.o) obj2) != null) {
                ((MotionLayout) obj).resolveSystem((w.e) this.f214c, optimizationLevel, ((androidx.constraintlayout.widget.o) obj2).f1478d == 0 ? i10 : i11, ((androidx.constraintlayout.widget.o) obj2).f1478d == 0 ? i11 : i10);
            }
            MotionLayout motionLayout = (MotionLayout) obj;
            w.e eVar = (w.e) this.f215d;
            Object obj3 = this.f217f;
            int i12 = (((androidx.constraintlayout.widget.o) obj3) == null || ((androidx.constraintlayout.widget.o) obj3).f1478d == 0) ? i10 : i11;
            if (((androidx.constraintlayout.widget.o) obj3) == null || ((androidx.constraintlayout.widget.o) obj3).f1478d == 0) {
                i10 = i11;
            }
            motionLayout.resolveSystem(eVar, optimizationLevel, i12, i10);
            return;
        }
        MotionLayout motionLayout2 = (MotionLayout) obj;
        w.e eVar2 = (w.e) this.f215d;
        Object obj4 = this.f217f;
        motionLayout2.resolveSystem(eVar2, optimizationLevel, (((androidx.constraintlayout.widget.o) obj4) == null || ((androidx.constraintlayout.widget.o) obj4).f1478d == 0) ? i10 : i11, (((androidx.constraintlayout.widget.o) obj4) == null || ((androidx.constraintlayout.widget.o) obj4).f1478d == 0) ? i11 : i10);
        Object obj5 = this.f216e;
        if (((androidx.constraintlayout.widget.o) obj5) != null) {
            MotionLayout motionLayout3 = (MotionLayout) obj;
            w.e eVar3 = (w.e) this.f214c;
            int i13 = ((androidx.constraintlayout.widget.o) obj5).f1478d == 0 ? i10 : i11;
            if (((androidx.constraintlayout.widget.o) obj5).f1478d == 0) {
                i10 = i11;
            }
            motionLayout3.resolveSystem(eVar3, optimizationLevel, i13, i10);
        }
    }

    public final synchronized com.tekartik.sqflite.f i(com.tekartik.sqflite.h hVar) {
        com.tekartik.sqflite.f fVar;
        com.tekartik.sqflite.h hVar2;
        try {
            ListIterator listIterator = ((LinkedList) this.f215d).listIterator();
            do {
                if (!listIterator.hasNext()) {
                    return null;
                }
                fVar = (com.tekartik.sqflite.f) listIterator.next();
                hVar2 = fVar.a() != null ? (com.tekartik.sqflite.h) ((Map) this.f218g).get(fVar.a()) : null;
                if (hVar2 == null) {
                    break;
                }
            } while (hVar2 != hVar);
            listIterator.remove();
            return fVar;
        } catch (Throwable th) {
            throw th;
        }
    }

    public final void k(androidx.constraintlayout.widget.o oVar, androidx.constraintlayout.widget.o oVar2) {
        this.f216e = oVar;
        this.f217f = oVar2;
        this.f214c = new w.e();
        this.f215d = new w.e();
        w.e eVar = (w.e) this.f214c;
        MotionLayout motionLayout = (MotionLayout) this.f218g;
        androidx.constraintlayout.widget.d dVar = ((ConstraintLayout) motionLayout).mLayoutWidget.z0;
        eVar.z0 = dVar;
        eVar.f34076x0.f34301f = dVar;
        w.e eVar2 = (w.e) this.f215d;
        androidx.constraintlayout.widget.d dVar2 = ((ConstraintLayout) motionLayout).mLayoutWidget.z0;
        eVar2.z0 = dVar2;
        eVar2.f34076x0.f34301f = dVar2;
        ((w.e) this.f214c).f34111v0.clear();
        ((w.e) this.f215d).f34111v0.clear();
        h(((ConstraintLayout) motionLayout).mLayoutWidget, (w.e) this.f214c);
        h(((ConstraintLayout) motionLayout).mLayoutWidget, (w.e) this.f215d);
        if (motionLayout.f1107i0 > 0.5d) {
            if (oVar != null) {
                m((w.e) this.f214c, oVar);
            }
            m((w.e) this.f215d, oVar2);
        } else {
            m((w.e) this.f215d, oVar2);
            if (oVar != null) {
                m((w.e) this.f214c, oVar);
            }
        }
        ((w.e) this.f214c).A0 = motionLayout.isRtl();
        w.e eVar3 = (w.e) this.f214c;
        eVar3.f34075w0.A(eVar3);
        ((w.e) this.f215d).A0 = motionLayout.isRtl();
        w.e eVar4 = (w.e) this.f215d;
        eVar4.f34075w0.A(eVar4);
        ViewGroup.LayoutParams layoutParams = motionLayout.getLayoutParams();
        if (layoutParams != null) {
            int i10 = layoutParams.width;
            ConstraintWidget$DimensionBehaviour constraintWidget$DimensionBehaviour = ConstraintWidget$DimensionBehaviour.f1013b;
            if (i10 == -2) {
                ((w.e) this.f214c).O(constraintWidget$DimensionBehaviour);
                ((w.e) this.f215d).O(constraintWidget$DimensionBehaviour);
            }
            if (layoutParams.height == -2) {
                ((w.e) this.f214c).P(constraintWidget$DimensionBehaviour);
                ((w.e) this.f215d).P(constraintWidget$DimensionBehaviour);
            }
        }
    }

    public final void l() {
        HashMap map;
        MotionLayout motionLayout = (MotionLayout) this.f218g;
        int i10 = motionLayout.f1095b0;
        int i11 = motionLayout.f1097c0;
        int mode = View.MeasureSpec.getMode(i10);
        int mode2 = View.MeasureSpec.getMode(i11);
        motionLayout.Q0 = mode;
        motionLayout.R0 = mode2;
        g(i10, i11);
        int i12 = 0;
        if (!(motionLayout.getParent() instanceof MotionLayout) || mode != 1073741824 || mode2 != 1073741824) {
            g(i10, i11);
            motionLayout.M0 = ((w.e) this.f214c).s();
            motionLayout.N0 = ((w.e) this.f214c).m();
            motionLayout.O0 = ((w.e) this.f215d).s();
            int iM = ((w.e) this.f215d).m();
            motionLayout.P0 = iM;
            motionLayout.L0 = (motionLayout.M0 == motionLayout.O0 && motionLayout.N0 == iM) ? false : true;
        }
        int i13 = motionLayout.M0;
        int i14 = motionLayout.N0;
        int i15 = motionLayout.Q0;
        if (i15 == Integer.MIN_VALUE || i15 == 0) {
            i13 = (int) ((motionLayout.S0 * (motionLayout.O0 - i13)) + i13);
        }
        int i16 = i13;
        int i17 = motionLayout.R0;
        int i18 = (i17 == Integer.MIN_VALUE || i17 == 0) ? (int) ((motionLayout.S0 * (motionLayout.P0 - i14)) + i14) : i14;
        w.e eVar = (w.e) this.f214c;
        motionLayout.resolveMeasuredDimension(i10, i11, i16, i18, eVar.J0 || ((w.e) this.f215d).J0, eVar.K0 || ((w.e) this.f215d).K0);
        int childCount = motionLayout.getChildCount();
        motionLayout.a1.f();
        motionLayout.f1111m0 = true;
        SparseArray sparseArray = new SparseArray();
        int i19 = 0;
        while (true) {
            map = motionLayout.f1101e0;
            if (i19 >= childCount) {
                break;
            }
            View childAt = motionLayout.getChildAt(i19);
            sparseArray.put(childAt.getId(), (q) map.get(childAt));
            i19++;
        }
        int width = motionLayout.getWidth();
        int height = motionLayout.getHeight();
        b0 b0Var = motionLayout.R.f1136c;
        int i20 = b0Var != null ? b0Var.f23p : -1;
        if (i20 != -1) {
            for (int i21 = 0; i21 < childCount; i21++) {
                q qVar = (q) map.get(motionLayout.getChildAt(i21));
                if (qVar != null) {
                    qVar.B = i20;
                }
            }
        }
        SparseBooleanArray sparseBooleanArray = new SparseBooleanArray();
        int[] iArr = new int[map.size()];
        int i22 = 0;
        for (int i23 = 0; i23 < childCount; i23++) {
            q qVar2 = (q) map.get(motionLayout.getChildAt(i23));
            int i24 = qVar2.f171f.f231k;
            if (i24 != -1) {
                sparseBooleanArray.put(i24, true);
                iArr[i22] = qVar2.f171f.f231k;
                i22++;
            }
        }
        if (motionLayout.E0 != null) {
            for (int i25 = 0; i25 < i22; i25++) {
                q qVar3 = (q) map.get(motionLayout.findViewById(iArr[i25]));
                if (qVar3 != null) {
                    motionLayout.R.f(qVar3);
                }
            }
            Iterator it = motionLayout.E0.iterator();
            while (it.hasNext()) {
                ((MotionHelper) it.next()).s(motionLayout, map);
            }
            for (int i26 = 0; i26 < i22; i26++) {
                q qVar4 = (q) map.get(motionLayout.findViewById(iArr[i26]));
                if (qVar4 != null) {
                    qVar4.i(width, height, motionLayout.getNanoTime());
                }
            }
        } else {
            for (int i27 = 0; i27 < i22; i27++) {
                q qVar5 = (q) map.get(motionLayout.findViewById(iArr[i27]));
                if (qVar5 != null) {
                    motionLayout.R.f(qVar5);
                    qVar5.i(width, height, motionLayout.getNanoTime());
                }
            }
        }
        for (int i28 = 0; i28 < childCount; i28++) {
            View childAt2 = motionLayout.getChildAt(i28);
            q qVar6 = (q) map.get(childAt2);
            if (!sparseBooleanArray.get(childAt2.getId()) && qVar6 != null) {
                motionLayout.R.f(qVar6);
                qVar6.i(width, height, motionLayout.getNanoTime());
            }
        }
        b0 b0Var2 = motionLayout.R.f1136c;
        float f10 = b0Var2 != null ? b0Var2.f16i : 0.0f;
        if (f10 != 0.0f) {
            boolean z10 = ((double) f10) < 0.0d;
            float fAbs = Math.abs(f10);
            float fMax = -3.4028235E38f;
            float fMin = Float.MAX_VALUE;
            float fMax2 = -3.4028235E38f;
            float fMin2 = Float.MAX_VALUE;
            for (int i29 = 0; i29 < childCount; i29++) {
                q qVar7 = (q) map.get(motionLayout.getChildAt(i29));
                if (!Float.isNaN(qVar7.f177l)) {
                    for (int i30 = 0; i30 < childCount; i30++) {
                        q qVar8 = (q) map.get(motionLayout.getChildAt(i30));
                        if (!Float.isNaN(qVar8.f177l)) {
                            fMin = Math.min(fMin, qVar8.f177l);
                            fMax = Math.max(fMax, qVar8.f177l);
                        }
                    }
                    while (i12 < childCount) {
                        q qVar9 = (q) map.get(motionLayout.getChildAt(i12));
                        if (!Float.isNaN(qVar9.f177l)) {
                            qVar9.f179n = 1.0f / (1.0f - fAbs);
                            if (z10) {
                                qVar9.f178m = fAbs - (((fMax - qVar9.f177l) / (fMax - fMin)) * fAbs);
                            } else {
                                qVar9.f178m = fAbs - (((qVar9.f177l - fMin) * fAbs) / (fMax - fMin));
                            }
                        }
                        i12++;
                    }
                    return;
                }
                y yVar = qVar7.f172g;
                float f11 = yVar.f225e;
                float f12 = yVar.f226f;
                float f13 = z10 ? f12 - f11 : f12 + f11;
                fMin2 = Math.min(fMin2, f13);
                fMax2 = Math.max(fMax2, f13);
            }
            while (i12 < childCount) {
                q qVar10 = (q) map.get(motionLayout.getChildAt(i12));
                y yVar2 = qVar10.f172g;
                float f14 = yVar2.f225e;
                float f15 = yVar2.f226f;
                float f16 = z10 ? f15 - f14 : f15 + f14;
                qVar10.f179n = 1.0f / (1.0f - fAbs);
                qVar10.f178m = fAbs - (((f16 - fMin2) * fAbs) / (fMax2 - fMin2));
                i12++;
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    public final void m(w.e eVar, androidx.constraintlayout.widget.o oVar) {
        androidx.constraintlayout.widget.j jVar;
        androidx.constraintlayout.widget.j jVar2;
        SparseArray<w.d> sparseArray = new SparseArray<>();
        androidx.constraintlayout.widget.p pVar = new androidx.constraintlayout.widget.p();
        sparseArray.clear();
        sparseArray.put(0, eVar);
        MotionLayout motionLayout = (MotionLayout) this.f218g;
        sparseArray.put(motionLayout.getId(), eVar);
        if (oVar != null && oVar.f1478d != 0) {
            w.e eVar2 = (w.e) this.f215d;
            int optimizationLevel = motionLayout.getOptimizationLevel();
            int iMakeMeasureSpec = View.MeasureSpec.makeMeasureSpec(motionLayout.getHeight(), 1073741824);
            int iMakeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(motionLayout.getWidth(), 1073741824);
            boolean z10 = MotionLayout.f1093g1;
            motionLayout.resolveSystem(eVar2, optimizationLevel, iMakeMeasureSpec, iMakeMeasureSpec2);
        }
        for (w.d dVar : eVar.f34111v0) {
            dVar.f34047j0 = true;
            sparseArray.put(((View) dVar.f34043h0).getId(), dVar);
        }
        for (w.d dVar2 : eVar.f34111v0) {
            View view = (View) dVar2.f34043h0;
            int id2 = view.getId();
            HashMap map = oVar.f1481g;
            if (map.containsKey(Integer.valueOf(id2)) && (jVar2 = (androidx.constraintlayout.widget.j) map.get(Integer.valueOf(id2))) != null) {
                jVar2.a(pVar);
            }
            dVar2.Q(oVar.h(view.getId()).f1391e.f1400c);
            dVar2.N(oVar.h(view.getId()).f1391e.f1402d);
            if (view instanceof ConstraintHelper) {
                ConstraintHelper constraintHelper = (ConstraintHelper) view;
                int id3 = constraintHelper.getId();
                HashMap map2 = oVar.f1481g;
                if (map2.containsKey(Integer.valueOf(id3)) && (jVar = (androidx.constraintlayout.widget.j) map2.get(Integer.valueOf(id3))) != null && (dVar2 instanceof w.j)) {
                    constraintHelper.m(jVar, (w.j) dVar2, pVar, sparseArray);
                }
                if (view instanceof Barrier) {
                    ((Barrier) view).r();
                }
            }
            pVar.resolveLayoutDirection(motionLayout.getLayoutDirection());
            boolean z11 = MotionLayout.f1093g1;
            motionLayout.applyConstraintsFromLayoutParams(false, view, dVar2, pVar, sparseArray);
            if (oVar.h(view.getId()).f1389c.f1454c == 1) {
                dVar2.f34045i0 = view.getVisibility();
            } else {
                dVar2.f34045i0 = oVar.h(view.getId()).f1389c.f1453b;
            }
        }
        for (w.d dVar3 : eVar.f34111v0) {
            if (dVar3 instanceof w.m) {
                ConstraintHelper constraintHelper2 = (ConstraintHelper) dVar3.f34043h0;
                w.i iVar = (w.i) dVar3;
                constraintHelper2.q(iVar, sparseArray);
                w.m mVar = (w.m) iVar;
                for (int i10 = 0; i10 < mVar.f34107w0; i10++) {
                    w.d dVar4 = mVar.f34106v0[i10];
                    if (dVar4 != null) {
                        dVar4.G = true;
                    }
                }
            }
        }
    }

    public final synchronized void n(com.tekartik.sqflite.h hVar) {
        try {
            com.tekartik.sqflite.f fVarI = i(hVar);
            if (fVarI != null) {
                ((Set) this.f217f).add(hVar);
                ((Set) this.f216e).remove(hVar);
                if (fVarI.a() != null) {
                    ((Map) this.f218g).put(fVarI.a(), hVar);
                }
                hVar.f24849d.post(new com.tekartik.sqflite.g(hVar, fVarI, 0));
            }
        } catch (Throwable th) {
            throw th;
        }
    }

    @Override // com.tekartik.sqflite.i
    public final synchronized void start() {
        for (int i10 = 0; i10 < this.f212a; i10++) {
            com.tekartik.sqflite.h hVar = new com.tekartik.sqflite.h(((String) this.f214c) + i10, this.f213b);
            hVar.a(new com.tekartik.sqflite.g(this, hVar));
            ((Set) this.f216e).add(hVar);
        }
    }

    public v(Class cls, Class[] clsArr) {
        this.f214c = null;
        this.f215d = new HashSet();
        this.f216e = new HashSet();
        this.f212a = 0;
        this.f213b = 0;
        this.f218g = new HashSet();
        ((Set) this.f215d).add(com.google.firebase.components.p.a(cls));
        for (Class cls2 : clsArr) {
            if (cls2 != null) {
                ((Set) this.f215d).add(com.google.firebase.components.p.a(cls2));
            } else {
                throw new NullPointerException("Null interface");
            }
        }
    }

    public v(com.google.firebase.components.p pVar, com.google.firebase.components.p[] pVarArr) {
        this.f214c = null;
        this.f215d = new HashSet();
        this.f216e = new HashSet();
        this.f212a = 0;
        this.f213b = 0;
        this.f218g = new HashSet();
        ((Set) this.f215d).add(pVar);
        for (com.google.firebase.components.p pVar2 : pVarArr) {
            if (pVar2 == null) {
                throw new NullPointerException("Null interface");
            }
        }
        Collections.addAll((Set) this.f215d, pVarArr);
    }

    public v(MotionLayout motionLayout) {
        this.f218g = motionLayout;
        this.f214c = new w.e();
        this.f215d = new w.e();
        this.f216e = null;
        this.f217f = null;
    }
}
