导航菜单

页面标题

页面副标题

Moneyman v2.316.0.0 - d.java 源代码

正在查看: Moneyman v2.316.0.0 应用的 d.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.freshchat.consumer.sdk.l;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.exponea.sdk.services.inappcontentblock.ContentBlockCarouselViewController;
import com.freshchat.consumer.sdk.R;
import com.freshchat.consumer.sdk.beans.BotFAQ;
import com.freshchat.consumer.sdk.beans.fragment.CallbackButtonFragment;
import com.freshchat.consumer.sdk.beans.fragment.MessageFragment;
import com.freshchat.consumer.sdk.beans.reqres.BotFAQFetchResponse;
import com.freshchat.consumer.sdk.service.Status;
import com.freshchat.consumer.sdk.util.aj;
import com.freshchat.consumer.sdk.util.ba;
import com.freshchat.consumer.sdk.util.db;
import com.freshchat.consumer.sdk.util.ds;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;

public class d extends a {
    private Status Aa;

    private BotFAQ f19040b;

    private String f19041c;

    private String f19042d;

    private String f19043e;

    private final String f19044f;

    private final String f19045h;

    private final String f19046i;

    private final String f19047j;
    private String nN;

    public d(Context context) {
        super(context);
        this.f19044f = "HL_ARTICLE_TITLE";
        this.f19045h = "<head><link rel=\"stylesheet\" type=\"text/css\" href=\"file:///android_res/raw/normalize.css\"/><script src='file:///freshchat_assets/freshchat_hacks.js'></script><title>HL_ARTICLE_TITLE</title></head>";
        this.f19046i = "<!DOCTYPE html>\t<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"file:///android_res/raw/normalize.css\"/><script src='file:///freshchat_assets/freshchat_hacks.js'></script><title>HL_ARTICLE_TITLE</title></head><body onload='correctIframe()'> <bdi>";
        this.f19047j = "</bdi></body></html>";
    }

    private void e(Status status) {
        this.Aa = status;
    }

    private List<MessageFragment> kV() {
        BotFAQ botFAQ = this.f19040b;
        return (botFAQ == null || botFAQ.getTemplateContentPayloads() == null || com.freshchat.consumer.sdk.util.w.e(this.f19040b.getTemplateContentPayloads().getDescription())) ? new ArrayList() : this.f19040b.getTemplateContentPayloads().getDescription();
    }

    public boolean J(List<MessageFragment> list) {
        return com.freshchat.consumer.sdk.util.w.e(list) || ds.c(list.get(0).getContent());
    }

    public String P() {
        return a().getString(R.string.freshchat_no_faq_found);
    }

    public void c(CallbackButtonFragment callbackButtonFragment) {
        if (callbackButtonFragment == null) {
            return;
        }
        ba.F(a(), callbackButtonFragment.getLabel());
        com.freshchat.consumer.sdk.util.b.a(a(), this.nN, callbackButtonFragment, this.f19042d);
    }

    public boolean g(Bundle bundle) {
        return (bundle == null || !bundle.containsKey("MESSAGE_ALIAS") || ds.c(bundle.getString("MESSAGE_ALIAS")) || !bundle.containsKey("EXTRA_TITLE") || ds.c(bundle.getString("EXTRA_TITLE")) || !bundle.containsKey("REFERENCE_ID") || ds.c(bundle.getString("REFERENCE_ID")) || !bundle.containsKey("PLACEOLDER_REFERENCE_ID") || ds.c(bundle.getString("PLACEOLDER_REFERENCE_ID"))) ? false : true;
    }

    @Override
    public void h(Intent intent) {
        super.h(intent);
        if (intent.hasExtra("MESSAGE_ALIAS")) {
            this.nN = intent.getStringExtra("MESSAGE_ALIAS");
        }
        if (intent.hasExtra("EXTRA_TITLE")) {
            this.f19041c = intent.getStringExtra("EXTRA_TITLE");
        }
        if (intent.hasExtra("REFERENCE_ID")) {
            this.f19042d = intent.getStringExtra("REFERENCE_ID");
        }
        if (intent.hasExtra("PLACEOLDER_REFERENCE_ID")) {
            this.f19043e = intent.getStringExtra("PLACEOLDER_REFERENCE_ID");
        }
    }

    @Override
    public void kF() {
        this.f19040b = null;
    }

    @Override
    public Status kG() {
        if (db.cm(a())) {
            com.freshchat.consumer.sdk.util.b.h(a(), this.f19042d, this.f19043e);
            e(Status.INIT_LOADING);
        } else {
            e(Status.NO_INTERNET);
        }
        return this.Aa;
    }

    public Status kP() {
        if (db.cm(a()) && this.Aa == Status.NO_INTERNET) {
            kG();
            e(Status.INIT_LOADING);
        }
        return this.Aa;
    }

    public Status kS() {
        return kG();
    }

    public String kT() {
        return this.f19041c;
    }

    public void kU() {
        ba.a(a(), kT(), this.f19042d, this.f19043e);
    }

    public String kW() {
        BotFAQ botFAQ = this.f19040b;
        if (botFAQ == null || botFAQ.getTemplateContentPayloads() == null || com.freshchat.consumer.sdk.util.w.e(this.f19040b.getTemplateContentPayloads().getArticleLinkFragments()) || this.f19040b.getTemplateContentPayloads().getArticleLinkFragments().get(0) == null) {
            return null;
        }
        return this.f19040b.getTemplateContentPayloads().getArticleLinkFragments().get(0).getContent();
    }

    public String kX() {
        List<MessageFragment> kV = kV();
        String kW = kW();
        if (J(kV) && ds.c(kW)) {
            return null;
        }
        StringBuilder sb = new StringBuilder("<!DOCTYPE html>\t<html><head><link rel=\"stylesheet\" type=\"text/css\" href=\"file:///android_res/raw/normalize.css\"/><script src='file:///freshchat_assets/freshchat_hacks.js'></script><title>HL_ARTICLE_TITLE</title></head><body onload='correctIframe()'> <bdi>");
        boolean a8 = com.freshchat.consumer.sdk.util.w.a(kV);
        String str = ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID;
        String content = a8 ? kV.get(0).getContent() : ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID;
        if (ds.c(content) && ds.a((CharSequence) kW)) {
            return "SKIP_ARTICLE_DISPLAY";
        }
        if (ds.a((CharSequence) content)) {
            content = content.replaceAll("src=\"//", "src=\"http://").replaceAll("value=\"//", "value=\"http://");
        }
        Pattern compile = Pattern.compile("<\\s*(img|iframe).*?src\\s*=[ '\"]+http[s]?:\\/\\/.*?>");
        if (!db.cm(a()) && compile.matcher(content).find()) {
            str = "<div class='offline-article-message'>" + a().getString(R.string.freshchat_faq_rich_media_content_cannot_be_displayed) + "</div>";
        }
        sb.append(str);
        if (ds.a((CharSequence) content)) {
            sb.append("<div class=\"article-body\">");
            sb.append(content);
            sb.append("</div>");
        }
        if (ds.a((CharSequence) kW)) {
            String string = a().getString(R.string.freshchat_bot_article_link_text);
            sb.append("<center>");
            sb.append("<a class = \"article-link-anchor\" href = \"" + kW + "\">");
            sb.append("<button class=\"article-link-button\" align = \"center\"  type = \"button\">");
            sb.append("<span align = \"center\" class = \"article-link-text\">" + string);
            sb.append("<img align = \"center\" class = \"article-link-icon\" src =\"file:///android_res/raw/freshchat_article_link_icon.png\"/></span></button></a></center>");
        }
        sb.append("</bdi></body></html>");
        return sb.toString().replace("HL_ARTICLE_TITLE", kT());
    }

    public Status h(Bundle bundle) {
        try {
        } catch (Exception e4) {
            e(Status.ERROR);
            aj.a(e4);
        }
        if (bundle != null) {
            BotFAQFetchResponse botFAQFetchResponse = (BotFAQFetchResponse) bundle.getParcelable("RESPONSE");
            if (botFAQFetchResponse != null) {
                this.f19040b = botFAQFetchResponse.getBotFAQ();
                e(botFAQFetchResponse.getStatus());
                return this.Aa;
            }
            throw new IllegalArgumentException("botFAQFetchResponse cannot be null in BotFAQDetailViewModel::processResponse()");
        }
        throw new IllegalArgumentException("bundle cannot be null in BotFAQDetailViewModel::processResponse()");
    }

    public List<MessageFragment> h() {
        BotFAQ botFAQ = this.f19040b;
        if (botFAQ != null && botFAQ.getTemplateContentPayloads() != null && !com.freshchat.consumer.sdk.util.w.e(this.f19040b.getTemplateContentPayloads().getCallbacks())) {
            return this.f19040b.getTemplateContentPayloads().getCallbacks();
        }
        return new ArrayList();
    }
}