package com.ss.android.ugc.aweme.infoSticker.customsticker.api;

import X.8bx;
import X.9ef;
import X.9fH;
import X.9fP;
import X.FWb;
import X.M12;
import com.bytedance.covode.number.Covode;
import com.bytedance.retrofit2.client.Request;
import com.ss.android.ugc.aweme.services.IAVSettingServiceImpl;
import kotlin.h.b.n;
import okhttp3.HttpUrl;

public final class CustomStickerNetInterceptor implements 8bx {
    static {
        Covode.recordClassIndex(88497);
    }

    public final 9ef<?> intercept(9fP r6) {
        M12.LIZ((Object) r6);
        Request LIZ = r6.LIZ();
        n.LIZIZ(LIZ, "");
        HttpUrl parse = HttpUrl.parse(LIZ.getUrl());
        if (parse != null) {
            HttpUrl.Builder newBuilder = parse.newBuilder();
            newBuilder.addQueryParameter("access_key", FWb.LIZIZ.LIZ().LJII().LIZ());
            newBuilder.addQueryParameter("app_version", FWb.LIZIZ.LIZ().LJJI().LJIIIZ());
            newBuilder.addQueryParameter("app_language", IAVSettingServiceImpl.createIAVSettingServicebyMonsterPlugin(false).getAppLanguage());
            newBuilder.addQueryParameter("region", FWb.LIZIZ.LIZ().LJJII().LIZ());
            n.LIZIZ(newBuilder, "");
            String httpUrl = newBuilder.build().toString();
            n.LIZIZ(httpUrl, "");
            9fH newBuilder2 = LIZ.newBuilder();
            newBuilder2.LIZ(httpUrl);
            LIZ = newBuilder2.LIZ();
        }
        9ef<?> LIZ2 = r6.LIZ(LIZ);
        n.LIZIZ(LIZ2, "");
        return LIZ2;
    }
}
