LINE.apk(点击下载) / a.java


package rl1;

import com.linecorp.line.timeline.activity.write.writeform.model.LinkModel;
import com.linecorp.line.timeline.utils.l;
import dm3.p;
import em3.q;
import java.util.Locale;
import java.util.Objects;
import kotlin.ResultKt;
import kotlin.Unit;
import sm3.r;
import ul3.d;
import um3.c0;
import um3.g;
import um3.h0;
import um3.w0;
import wl3.e;
import wl3.i;

@e(c = "com.linecorp.line.timeline.activity.write.writeform.view.link.LinkScrapper$request$1", f = "LinkScrapper.kt", l = {26}, m = "invokeSuspend")
public final class a extends i implements p<h0, d<? super Unit>, Object> {

    /* renamed from: b  reason: collision with root package name */
    public int f138791b;

    /* renamed from: c  reason: collision with root package name */
    public final /* synthetic */ dm3.a<Unit> f138792c;

    /* renamed from: d  reason: collision with root package name */
    public final /* synthetic */ b f138793d;

    /* renamed from: e  reason: collision with root package name */
    public final /* synthetic */ String f138794e;

    /* renamed from: f  reason: collision with root package name */
    public final /* synthetic */ p<String, LinkModel, Unit> f138795f;

    @e(c = "com.linecorp.line.timeline.activity.write.writeform.view.link.LinkScrapper$request$1$linkModel$1", f = "LinkScrapper.kt", l = {}, m = "invokeSuspend")
    /* renamed from: rl1.a$a  reason: collision with other inner class name */
    public static final class C2632a extends i implements p<h0, d<? super LinkModel>, Object> {

        /* renamed from: b  reason: collision with root package name */
        public final /* synthetic */ b f138796b;

        /* renamed from: c  reason: collision with root package name */
        public final /* synthetic */ String f138797c;

        /* JADX INFO: super call moved to the top of the method (can break code semantics) */
        public C2632a(b bVar, String str, d<? super C2632a> dVar) {
            super(2, dVar);
            this.f138796b = bVar;
            this.f138797c = str;
        }

        @Override // wl3.a
        public final d<Unit> create(Object obj, d<?> dVar) {
            return new C2632a(this.f138796b, this.f138797c, dVar);
        }

        /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
        @Override // dm3.p
        public Object invoke(h0 h0Var, d<? super LinkModel> dVar) {
            return new C2632a(this.f138796b, this.f138797c, dVar).invokeSuspend(Unit.INSTANCE);
        }

        /* JADX WARNING: Removed duplicated region for block: B:14:0x0043  */
        /* JADX WARNING: Removed duplicated region for block: B:17:0x0048  */
        /* JADX WARNING: Removed duplicated region for block: B:18:0x005f  */
        @Override // wl3.a
        public final Object invokeSuspend(Object obj) {
            boolean z14;
            boolean z15;
            ResultKt.throwOnFailure(obj);
            b bVar = this.f138796b;
            String str = this.f138797c;
            Objects.requireNonNull(bVar);
            boolean z16 = false;
            if (!l.d(str)) {
                if (!(str.length() == 0)) {
                    String lowerCase = str.toLowerCase(Locale.ROOT);
                    q.e(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                    if (r.G(lowerCase, "http://line.naver.jp", false, 2) || r.G(lowerCase, "http://line.beta.naver.jp", false, 2)) {
                        z15 = true;
                        if (!z15) {
                            z14 = false;
                            if (!z14) {
                                return new LinkModel(str, null, null, null, null, null, 0, 0, false, null, null, null, null, false, 16382);
                            }
                            LinkModel b04 = im1.a.l().b0(bVar.f138798a, str);
                            if (b04.f44765b.length() == 0) {
                                String str2 = b04.f44768e;
                                if (str2 == null || str2.length() == 0) {
                                    z16 = true;
                                }
                            }
                            if (!z16) {
                                return b04;
                            }
                            return null;
                        }
                    }
                }
                z15 = false;
                if (!z15) {
                }
            }
            z14 = true;
            if (!z14) {
            }
        }
    }

    /* JADX DEBUG: Multi-variable search result rejected for r4v0, resolved type: dm3.p<? super java.lang.String, ? super com.linecorp.line.timeline.activity.write.writeform.model.LinkModel, kotlin.Unit> */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX INFO: super call moved to the top of the method (can break code semantics) */
    public a(dm3.a<Unit> aVar, b bVar, String str, p<? super String, ? super LinkModel, Unit> pVar, d<? super a> dVar) {
        super(2, dVar);
        this.f138792c = aVar;
        this.f138793d = bVar;
        this.f138794e = str;
        this.f138795f = pVar;
    }

    @Override // wl3.a
    public final d<Unit> create(Object obj, d<?> dVar) {
        return new a(this.f138792c, this.f138793d, this.f138794e, this.f138795f, dVar);
    }

    /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object, java.lang.Object] */
    @Override // dm3.p
    public Object invoke(h0 h0Var, d<? super Unit> dVar) {
        return new a(this.f138792c, this.f138793d, this.f138794e, this.f138795f, dVar).invokeSuspend(Unit.INSTANCE);
    }

    @Override // wl3.a
    public final Object invokeSuspend(Object obj) {
        vl3.a aVar = vl3.a.COROUTINE_SUSPENDED;
        int i14 = this.f138791b;
        Unit unit = null;
        if (i14 == 0) {
            ResultKt.throwOnFailure(obj);
            c0 c0Var = w0.f166207d;
            C2632a aVar2 = new C2632a(this.f138793d, this.f138794e, null);
            this.f138791b = 1;
            obj = g.g(c0Var, aVar2, this);
            if (obj == aVar) {
                return aVar;
            }
        } else if (i14 == 1) {
            ResultKt.throwOnFailure(obj);
        } else {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        LinkModel linkModel = (LinkModel) obj;
        if (linkModel != null) {
            this.f138795f.invoke(this.f138794e, linkModel);
            unit = Unit.INSTANCE;
        }
        if (unit == null) {
            this.f138792c.invoke();
        }
        return Unit.INSTANCE;
    }
}