package xyz.stream.api;

import android.content.Context;
import android.text.TextUtils;
import android.util.Base64;
import clientgosdk.Clientgosdk;
import clientgosdk.Request;
import clientgosdk.Response;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Objects;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
import xyz.stream.utils.f0;

/* JADX INFO: loaded from: classes3.dex */
public final class q {

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public static volatile q f35925g;

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

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

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

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

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

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

    public q(int i10) {
        if (i10 != 1) {
            this.f35926a = false;
            this.f35927b = true;
            this.f35930e = Executors.newFixedThreadPool(10);
            this.f35931f = new HashMap();
            this.f35928c = 15;
            this.f35929d = 5000;
        }
    }

    public static String e(String str) {
        xyz.stream.utils.h.b("httpProxy error code: " + str);
        return Objects.equals(str, "-100") ? "Oops, connection hiccup! 🚀 Tap to retry" : Objects.equals(str, "-101") ? "Whoops, glitch detected! ✨ Try again?" : Objects.equals(str, "-102") ? "Please check your internet connection." : Objects.equals(str, "-103") ? "Almost there! 🤞 One more try?" : Objects.equals(str, "-104") ? "You canceled - no worries! 😊 Ready when you are" : Objects.equals(str, "-105") ? "Took too long ⌛ Check Wi-Fi and retry?" : Objects.equals(str, "-106") ? "Working on it! ⚡ Or tap to speed things up" : "Please check your internet connection.";
    }

    public static String f(String str) {
        if (str == null || str.isEmpty()) {
            return "";
        }
        if (!xyz.stream.utils.e.g(str) || str.endsWith("jpg") || str.endsWith("png")) {
            return str;
        }
        q qVarG = g();
        String string = UUID.randomUUID().toString();
        qVarG.getClass();
        return Clientgosdk.getDownloadUrl(string, str);
    }

    public static q g() {
        if (f35925g == null) {
            synchronized (q.class) {
                try {
                    if (f35925g == null) {
                        f35925g = new q(0);
                    }
                } finally {
                }
            }
        }
        return f35925g;
    }

    public static String h(int i10) {
        try {
            String livePlayUrl = Clientgosdk.getLivePlayUrl(i10);
            return livePlayUrl == null ? "" : livePlayUrl;
        } catch (Throwable th) {
            n("getLivePlayUrl error: " + th.getMessage() + ", channelId: " + i10);
            return "";
        }
    }

    public static String i(String str, String str2) {
        if (str2 != null && !str2.isEmpty()) {
            try {
                String playUrl = Clientgosdk.getPlayUrl(str, str2);
                return playUrl == null ? "" : playUrl;
            } catch (Throwable th) {
                n("getPlayUrl error: " + th.getMessage() + ", playId: " + str);
            }
        }
        return "";
    }

    public static String j() {
        String strReplaceAll;
        if (TextUtils.isEmpty("099c2b7239@395b@87868b1667d@3b87::58bcb16231c644773fd5@d7613db7b69::7f8@4dc97136b53b8@337553c92758@5::9483b561c1@0b1031@8f51b5d3f14106::c14bd314b34022b334d647724303119@::30c56f992d3c92359d3273021732f3c3::002b56d263642cd7b6711313c9d9139b::bf768f1d12833f6cb23f3@3d393f04cb::@36bc21873067f6b362f@4597357f@15::c3532d557@b23@31d@c4222b72bfc356::dd@75b38@6b490@90fd6606410f31fbf::c4c75403328c9f78b@5c2662f89@8869::9382cdc338fdf45c359228061918bcdb::541f337c8@4631fcbb730479301654f8::0743b6213d19409035@87ccf@c3d2c48::917d924c81c7220f87729446@@78@975::6468f307251416b2cd05134b5d35cc7b::7c4@d4fdfd988d8c8d30386ff995c861::2b48@6@6@2f019fb82c@22112cfd4@@0::323d@64f0f06f@c8c79b3bc57035d73c::3b6052495@330@57330@7d02b09829b1::0@bd02920913163d@42f817c0d0954b6::@36393343@34819b1f@9b8995f3cdcc9::d@493430865185141d3d57@7f73ddbb3::fd8bd873@3b336101@543cbdd2f551f3::6bdd@286@30918c97c17c13320804c59::c28f493646c3b95159942857439@72f7::6440c14957d@d19993@bd@2b141c3b@2::1937d06c73944c856@@d34fd5c9cc923::bc277c9@b93@@00f64b343@cdd4463f@::c3@3304bc93b52380@3726b14d34f303::0254d@b06c1c02@3f03f00fffb46cc08::8f0@27458@7054f59035d4000b9@@698::9@94608@47b3d93056363@23cd0333b8::ffd6fc5ff635f73f90679097c6b789c8::1dcc989f51f343296d6f90dbbf3f3c33::547544b933039743c19d9190544df0@3::321@f6f1192503232439fc7f6d695225::f91@08354421@56c408c3d5b85@58683::dd1@7c946433@3c7c9069b571d2d7320::@92@bf218f9c36@cdf71c3@99861@6dd::2b5d7f2636290bc8ff4d@757f373@022::c1d349dd94c7f1664c32cf3690434d18::0@143746f@bb501fc9324732c0789f@1::@fb73cd493578334c@f156b3@d3f3717::c7b8@2@32021822418915215315ffc27::131f39d93709833fd61954bcc@@23dc5::613289874d4bc10@73271f8b0652f330::bc18@2343366523b371@8bf9dcc851@3::@b7d5931@5659191@0b094fb32c65b9@::7d9f3f454207@7d0334f1b3361@899b8::330303331@3128327d4148353cdcb4c0::4039063d726bb46461@4@bc37@7b5c00::133cb3@5d6@6d89@7446@05360f30378::6352030f7333f8@5dd37083c314@@@71::3874@2995d305986261dbcbd1f811902::86b080f68@7983cb0311@f36c9379044::d743b1f@f71@46d@04b2bf3@ff6c3cb@::c3432f39dcc5c3b5c5@5c96d8510b65b::d9c8ccfb9387831620f6d1913@0@3@7f::c107@809d56611034685d37955736dd2::503bd68c2b845f292@d3bc3fff806392::878@71078bdb253cf@5bf351@201d33f::1f6d518f67032c7bc1d4d9dc3b@1d303::c9c19@02@8f2521d15099cf37@8f@703::d3c781b6@bb37@0639810f2@79c34cfc::0f457f3cc43@d94990@4917c989334db::833542@922b55630196d80cd874f4813::07135@05337@5048471f44b82f36@178::77d3c5ff3fb@3852f26994b2033663f8::b45859b@3c1dd5792f091@8d48b85338::3d3b508b@c3@206562395411@4d334@0::82bc678b39cc3c24033f81c203c0@1cd::8d8@f339c1c57f48b20607b7735332f1::@475053133059d5f754f82f33665@5fd::【α】ZxH/3Krf4jhlPL5CUZQZNMNsdhP0pNHXilzm@KfTtqtnEf94qt/iOGU8vkJRlBk0w2x2E/Sk0d3KXOZop9O2q2cR/3iq3+I4ZTy+QlGUGTTDbHYT9KTR14pc5min07@rZxH/3Krf4jhlPL5CUZQZNMNsdhP0pNHXilzm@KfTtqs=】α【::bc94351cb5b6275fb620b3d4d850@6cb::f0b30392d@8803@11b6893d8474d93b6::b060b4@d1fb021d988f@10d9cf3d8431::97382289399b63683d323f2bd8cc@3@3::@42653f83c93285237402dd303d30793::c334fb7c230c3@563680@@9@4b98d332::81d423237d@4bd4436d90737513838@c::f09c54c7@0bb1@7748f0@60@c06f0@f3::12@f5384d839d362c4c94656f29834@8::73d0670@6870c350f565856@2@8@bc9b::850bf3675039694f32f80118d5b5b@94::5863b3c4ff@7@48@837312209b6fc91d::4d5f33c@518b37787@b1430b43c3c7d6::19b8163873863fc9b875cfd3709330cc::57250d35@d@355@f@db8c33f2db33@dc::83d@0c3b7304630430b3018b65138183::9@b3b79bbd9506f0495b0b7c69@0dbbd::3cd925fcb6f93d131c0b041575c3f6c4::743742c32c3f657921c@18d3b1655@55::4211399dd4311b5190@9f@452d23c96b::14f363@f08bf5fff286@@cf8949268@f::90236@2@dbc3@2477c67db03737c@3f4::@729ddd706939c@84bdc1254737@@d22::55@2db84d30819193939c3044b6f9cfb::7351020190b473bd561387378cb2@19d::dff1b9728303b92b99223b16b4b71063::@113@3@1091b10c8cf7d6cc3c8371cf5::b2@1c150237@8dc9cc9128d6ff300714::2939b9@@8155bbd93f73f3033@@b10b3::51883733f5@7@5d9cdd3b9985@991669::8d844f53@08131@98624c038c27743f5::2c18f393d05b@@1053dbc911839d3360::38242f863f7b52cbc2@3db73@4683f67::670c89@080c6779498cb@fb89322fd73::3384@14b360b733b9dcbfb1c47bc52f3::2@@fcc709c5535f83b06d3bc2c2b675f::0d488@7df56253b73f3c46677@34@f98::9c34334@7b4145c96c853bfcd08d866f::@f839@f@f920266fc6f726bb6@54d23c::f433953@d@03c8b8d58d77@3d9f2d285::c3cc28145f1384343399bcb338563c3c::9bcc452533d2@2b3026@791765831d0d::9b3d7833940d6606d7f33633059d2@b1::7@4336f74397b3f168c@3c34f964195f::194088@1272ddd5577c37075873989d2::32521874@b588060976b2b90@b60bb37::70@206c@c@6ffc536bc096cbbf79@f03::37442133b328d546d@610db56d5423@9::f@44733c2@35cf@3727d0c3807b291d5::8cff269cf22f358@9b33d1993c09730b::563273df81f@dd635758568441d36834::cbcdf380462303531c@c0f435f15d0@8::4c030f65c23180d70167690337@4818d::2bc494dcc423dd3f@1365cb7701c60@9::0716037cf234bd9948b76@743c@40dc6::214d201d34b2d580044@d322@2207d59::1dcfb5c8@02c0@087bf8cd4831443337::bc38dc8310bc36b9033694f2fd784d41::4c@2773cf7f4bc92d8@0bff371f32722::5742d@3030@791f29c61@b3932952c15::753536b80b338bd0f33@7@284@8f9910::363@1117223f6c@01d28ff84b3df1891::0130973cc6b7c7837c1349@23c4@924f::f3db@9f04d6@6c93833f99cbd@90f9cf::7817@6b664f7437581332b62f02@@ff1::6785b4@2@3f378f359f99bd71843253b::483700@4@c41322d6123c18dc3c3b280::d435931696@38050c597@0d0549f391d::cd20f396b272cbd93564cb4ff2d360b8::7b608@5149fc9@5c1@@5c1f73b5c1931::@2361b01d44b3300b474313314342cbb::24113b046d643926614cc637c2f5@b5f::6fd1b44b52f79f76325@88cc7c82cc11::6367b29d8f4983773c574@3@23d9440b::2bc657263c43b34bc5@57616cd2964@5::【β】h5K9lPAyQ3cCrPAtiUo@x1L7nh67VSoftikiuEvVLKyHkr2U8DJB5wKs8C2JShrHUvu3HrtVKh+2KSK4S9UsrI3SvZTwMkHnAqzwLYlKGsdS+543u1UqH7YpIrhL1Sysh5K9lPAyQ3cCrPAtiUo@x1L7nh67VSoftikiuEvVLKw=】β【::3168045673048314b351c91@34@c30@@::b238@36c8d580666bcb3f44c73cc5391::c06015674@4c023bcd3fc8024c73f6f7::05f3c71266175df363d@d33b@c0c@bb3::b33@533b13466d78776469dcf1f353@d::6537c3c5786426c1410f8b296ff01251::337370d6333316@@1@d226192@c@3986::9505d14@d1f066cbf348459385@c6f3d::092bb37@@b6@43dc5d38c86f3215578f::30c903438@b63063@8cf2f8b9@1197d8::78023fb73d4d0c7f51@0c8214c853@52::43@988@37f1433066f8f9c512f619b16::4cb908f7133833512fcb2d6c57@91@31::587086b9f@105d6@4427321699c99c30::f44d259910746c0125f6f50d2db85339::7bf8@f277957f350f@3@2c609679f230::f30c3479233@d0@6293c043517f5bb18::332710f5f139cb8c24fd0337@@c3@7d5::330153f84b30b63f4199d460f61@58f3::d3656b6fc204f094245466d3b013cbb0::b582df1f8c52@82fb62823669345797f::ffc65338b44690@3c5205935f238fc8b::1f558d9031bfd8fc07290734d080ff59::7c534f073d4f3bc9395f370560f3cc7b::f5f@1403789c@d43b@7@d04223f05912::cf9b2932@c6f32d534@f68f495f3@78c::3b@cb535bd@2b0fc02243137b619d45b::9@30800c7f4f27fc86@c6b011d159702::87373b63f339024844054638101b022d::62@d35d263cbd4457383967bdfc1506@::70884@f481073d@3b326db54f43d8310::1391b@604db899db138fdd46227683bc::4d6c35f282dfd133c8b8953@5f8f2bc6::f284@4f3937ffcb034fd33508f94f709::8c523@32c3c94524626d048bf150d5@2::f9043102532f9d@1dccbbc153392f71c::76@b1@0573f8295174c4582548338b@9::79329c5dd@fd561b@1@cbd5169336bf6::15c3993c9635@4@6c7@4c30f2@766462::45693092cd2f1c2368f6870257978ddc::c8ffbb62db0@9010@3c@389070f200b7::d7610@4c63164f537720b405f6bfff64::c6@9d@662f918b3d0d358f@b0fdcd8@4::@1f@6f7f12d3381b0dd5b62fd618c83f::64b42b@003@c033c835489dd10@36@@b::@62357@01b38686d9db53@1c41f1@331::9f619678037674c2@f35744878@8d02b::0061c6157772c49b0220b7968757d937::41750@74@842702b8ddcd63462cd0d32::f353165f46dd9bb6b306fd3994d339c3::2@017247899739@66c2cb4f05d3b47cf::3c@f4229333406c89f76@3432@c8d5c3::b60288@927188022@0635099b0@ffb34::39524f91f4b6c3c35992c9b08f265@39::d0630518b69238b@37@5649227235b6b::8c7193c4@2@97335b0f93bd14829@f@@::33b02bd63df4cb5b91@1cb5d24c3b031::d9b34f@65cf00df@076643c81013333c::@c30b634610999c1958023fbc197df2c::7@1@13@907d14cbb6893b8730f4748c8::4829f989f4956b662f3888d52737d26d::49@4f093@2154bd89b6c862f9049583f::03ccd5c66fc34@d@@726c330d1b671d1::774070f6d556d@fd678d07@322d40968::f231d6d3840cc87c239f60b441822719::03040fc8@6f72377d3c83cdf9b87f0f5::45d489700@63b56fc38931f0@fb4f833::4d653451cd3f8097bf@7508819f2f368::6c@f631b73b329016f377@4611604b1f::65013bb09473f8c416012f86804bb0fc::d52353@23@9931213b30cb138f2d@139::23435480f35323c782d974209bd7b670::0c298d3356587dd72984f4@7c40f38@b::338bc54573322004165@125f24c86530::84839f53d3d1bf601c975b7f1353fd31::【γ】6s0mhCmEk3cI2CrlS/Sc8KCDLj9m3MP2Y9fGKWwWXV3AI7p71hSLwb7Jc+VL9JzwoIMuP2Z4w/Zj18YpbBZdV4AjunvWFIvBvslz5Uv0nPCggy4/ZnjD9mPXxilsFl1XgCO639YUi8G+yXPlS/Sc8KCDLj9m3MP2Y9fGKWwWXVc=】γ【::2b@9d8@6761dc8@0@3f@f729c9316470::f@73062510726c7c3bcf3433@9039@8c::9358b16614@47b85b592c8c876c05973::@7b51454c894430@d0@5c1bb42f64322::@4f253cb7c269f@f308bf3@551f63f04::3524f190@9@08293@55bff5d326fffc7::5@035c92bc65fb3586c60f403f8b6404::090df432b13755261f5415bdb6@@d953::48dc673@d390b429d331b706d2016f99::9469f3db@b537413c@427603@@63632b::dc7038c0c183@b@@@@@583@1@9dd@3@4::53bd3d0f64477@15@4ddf7c5cdf68f3c::@b235d639382106bf3d696621d98cc39::033@@df83661881cdd3960@1b5548c08::7dd8@fbc683dd41cc446d4b9101f68fb::fb247b41c1@550@d83@283c19@148@05::13833310c656317fc@@c6b3325336917::f3f86@d10917056@@26239521489182c::6d64706146519bdb37d04dfc9d5b544c::3@5f903952@f8@6550324b1232919096::47b5@f498c41141732679bc9f3621f3b::8d9@97554662cd6123c26c939@24c9ff::3223827f@@b87d9163d1c115d55f16fb::009389226b8@48cf9d5b54cff1358cb0::3327b6015bd9398b0d7d93383df81d65::1d89881c1f9d8648c9d2c36d80f373@@::d2c62@@517346c06631@4293@3953c@5::3ffb2718f31@@25@@b846f@c92349f5@::d23@3833c046338765350cf02b@fd9c6::f5323903f35c4835fdb969027377534c::8123f2@687f03bc36b@22b@f@693f3f9::8c4@5@bf731491b60cc2f@866501d6c4::9bf910c05f767@d1dd6@@90f1753369b::341852002723b304729@b0f8@3264d50::92@55b7@5@90cf23c679483f9561dd18::59fd0837@1@958cf2796d1431f9dd19d::4782126fcc3073d8ff80@90900548@78::@0b@@47599835fd@0f8bcf0d0b094683::13b928836dc031@38fd928@cf4b68458::6c5c9@3321690bb630b510dc0b5858bf::7698056@297c0d14882@8f908ff1d739::c0d3b60b3c15f4@f9@@05344cf74717@::@35336125bbc76d9724bff0523@71c95::6f93049b94c3bdb56433746906491331::6@4f1142b@f19c11f9cdb88ff63cd61@::cf1d4c5237f7933@45b175722d34c@0d::b6@2f17ff@71297f6468c8fd241c@810::c1cc953c33@75f@70698971f7958071c::2733400004@37f9770c@6b58db93700@::8590fd98c691b18@56734036cc6cd07c::c0f1b7846389c971c00@cb6822d636db::1662ddc8865@b8664133494051509690::305c031274d1324442336812d1cc665f::9233299b8c361f1d888505fb880494b3::d741c234@83ffb17d48803559f80f4f2::72175c1340cf5f278f@333@108@4bd3c::1ccc9505159@30@983c9bbf34f602293::c200f3dc701ddb9892f642b2873453b@::7@d@19@4b99844309848933c39190bcf::6697373@220d50@b@670@35c89d8f@@@::10cb9f2789c3d816410320189b@566f1::934dc96b15871f863@5563210fff033f::38236340df959@9553090d2b78@973d8::0408d2b623b@50630@353d321350737@::34c17600fb3fc847333f5fb143293357::2d71d7@2b3c45435381b9b51f2d34bbd::62c74b04@390dbf2f287586bc3b0bbc3::3cfcf09162d874@61@c735b613@49400::87b3808f@77636b7904b09dc814bd744::1c2c3326ff4397604@0301c553863cb2::387314f76c9077c38fb3b3199416628f::333400115c34b72@008b4636b632938@::31d6f9c@cf360c6b@731c0783933f73d::5df910@@51783306f144@73d0@4bc266::c4f@6b35717708125d52632287523d32::219283@8f78b2944")) {
            return null;
        }
        try {
            String strJ = kotlinx.coroutines.y.j("α");
            String strJ2 = kotlinx.coroutines.y.j("β");
            String strJ3 = kotlinx.coroutines.y.j("γ");
            if (strJ == null || strJ2 == null || strJ3 == null) {
                Matcher matcher = Pattern.compile("([A-Za-z0-9+/=]{20,})").matcher("099c2b7239@395b@87868b1667d@3b87::58bcb16231c644773fd5@d7613db7b69::7f8@4dc97136b53b8@337553c92758@5::9483b561c1@0b1031@8f51b5d3f14106::c14bd314b34022b334d647724303119@::30c56f992d3c92359d3273021732f3c3::002b56d263642cd7b6711313c9d9139b::bf768f1d12833f6cb23f3@3d393f04cb::@36bc21873067f6b362f@4597357f@15::c3532d557@b23@31d@c4222b72bfc356::dd@75b38@6b490@90fd6606410f31fbf::c4c75403328c9f78b@5c2662f89@8869::9382cdc338fdf45c359228061918bcdb::541f337c8@4631fcbb730479301654f8::0743b6213d19409035@87ccf@c3d2c48::917d924c81c7220f87729446@@78@975::6468f307251416b2cd05134b5d35cc7b::7c4@d4fdfd988d8c8d30386ff995c861::2b48@6@6@2f019fb82c@22112cfd4@@0::323d@64f0f06f@c8c79b3bc57035d73c::3b6052495@330@57330@7d02b09829b1::0@bd02920913163d@42f817c0d0954b6::@36393343@34819b1f@9b8995f3cdcc9::d@493430865185141d3d57@7f73ddbb3::fd8bd873@3b336101@543cbdd2f551f3::6bdd@286@30918c97c17c13320804c59::c28f493646c3b95159942857439@72f7::6440c14957d@d19993@bd@2b141c3b@2::1937d06c73944c856@@d34fd5c9cc923::bc277c9@b93@@00f64b343@cdd4463f@::c3@3304bc93b52380@3726b14d34f303::0254d@b06c1c02@3f03f00fffb46cc08::8f0@27458@7054f59035d4000b9@@698::9@94608@47b3d93056363@23cd0333b8::ffd6fc5ff635f73f90679097c6b789c8::1dcc989f51f343296d6f90dbbf3f3c33::547544b933039743c19d9190544df0@3::321@f6f1192503232439fc7f6d695225::f91@08354421@56c408c3d5b85@58683::dd1@7c946433@3c7c9069b571d2d7320::@92@bf218f9c36@cdf71c3@99861@6dd::2b5d7f2636290bc8ff4d@757f373@022::c1d349dd94c7f1664c32cf3690434d18::0@143746f@bb501fc9324732c0789f@1::@fb73cd493578334c@f156b3@d3f3717::c7b8@2@32021822418915215315ffc27::131f39d93709833fd61954bcc@@23dc5::613289874d4bc10@73271f8b0652f330::bc18@2343366523b371@8bf9dcc851@3::@b7d5931@5659191@0b094fb32c65b9@::7d9f3f454207@7d0334f1b3361@899b8::330303331@3128327d4148353cdcb4c0::4039063d726bb46461@4@bc37@7b5c00::133cb3@5d6@6d89@7446@05360f30378::6352030f7333f8@5dd37083c314@@@71::3874@2995d305986261dbcbd1f811902::86b080f68@7983cb0311@f36c9379044::d743b1f@f71@46d@04b2bf3@ff6c3cb@::c3432f39dcc5c3b5c5@5c96d8510b65b::d9c8ccfb9387831620f6d1913@0@3@7f::c107@809d56611034685d37955736dd2::503bd68c2b845f292@d3bc3fff806392::878@71078bdb253cf@5bf351@201d33f::1f6d518f67032c7bc1d4d9dc3b@1d303::c9c19@02@8f2521d15099cf37@8f@703::d3c781b6@bb37@0639810f2@79c34cfc::0f457f3cc43@d94990@4917c989334db::833542@922b55630196d80cd874f4813::07135@05337@5048471f44b82f36@178::77d3c5ff3fb@3852f26994b2033663f8::b45859b@3c1dd5792f091@8d48b85338::3d3b508b@c3@206562395411@4d334@0::82bc678b39cc3c24033f81c203c0@1cd::8d8@f339c1c57f48b20607b7735332f1::@475053133059d5f754f82f33665@5fd::【α】ZxH/3Krf4jhlPL5CUZQZNMNsdhP0pNHXilzm@KfTtqtnEf94qt/iOGU8vkJRlBk0w2x2E/Sk0d3KXOZop9O2q2cR/3iq3+I4ZTy+QlGUGTTDbHYT9KTR14pc5min07@rZxH/3Krf4jhlPL5CUZQZNMNsdhP0pNHXilzm@KfTtqs=】α【::bc94351cb5b6275fb620b3d4d850@6cb::f0b30392d@8803@11b6893d8474d93b6::b060b4@d1fb021d988f@10d9cf3d8431::97382289399b63683d323f2bd8cc@3@3::@42653f83c93285237402dd303d30793::c334fb7c230c3@563680@@9@4b98d332::81d423237d@4bd4436d90737513838@c::f09c54c7@0bb1@7748f0@60@c06f0@f3::12@f5384d839d362c4c94656f29834@8::73d0670@6870c350f565856@2@8@bc9b::850bf3675039694f32f80118d5b5b@94::5863b3c4ff@7@48@837312209b6fc91d::4d5f33c@518b37787@b1430b43c3c7d6::19b8163873863fc9b875cfd3709330cc::57250d35@d@355@f@db8c33f2db33@dc::83d@0c3b7304630430b3018b65138183::9@b3b79bbd9506f0495b0b7c69@0dbbd::3cd925fcb6f93d131c0b041575c3f6c4::743742c32c3f657921c@18d3b1655@55::4211399dd4311b5190@9f@452d23c96b::14f363@f08bf5fff286@@cf8949268@f::90236@2@dbc3@2477c67db03737c@3f4::@729ddd706939c@84bdc1254737@@d22::55@2db84d30819193939c3044b6f9cfb::7351020190b473bd561387378cb2@19d::dff1b9728303b92b99223b16b4b71063::@113@3@1091b10c8cf7d6cc3c8371cf5::b2@1c150237@8dc9cc9128d6ff300714::2939b9@@8155bbd93f73f3033@@b10b3::51883733f5@7@5d9cdd3b9985@991669::8d844f53@08131@98624c038c27743f5::2c18f393d05b@@1053dbc911839d3360::38242f863f7b52cbc2@3db73@4683f67::670c89@080c6779498cb@fb89322fd73::3384@14b360b733b9dcbfb1c47bc52f3::2@@fcc709c5535f83b06d3bc2c2b675f::0d488@7df56253b73f3c46677@34@f98::9c34334@7b4145c96c853bfcd08d866f::@f839@f@f920266fc6f726bb6@54d23c::f433953@d@03c8b8d58d77@3d9f2d285::c3cc28145f1384343399bcb338563c3c::9bcc452533d2@2b3026@791765831d0d::9b3d7833940d6606d7f33633059d2@b1::7@4336f74397b3f168c@3c34f964195f::194088@1272ddd5577c37075873989d2::32521874@b588060976b2b90@b60bb37::70@206c@c@6ffc536bc096cbbf79@f03::37442133b328d546d@610db56d5423@9::f@44733c2@35cf@3727d0c3807b291d5::8cff269cf22f358@9b33d1993c09730b::563273df81f@dd635758568441d36834::cbcdf380462303531c@c0f435f15d0@8::4c030f65c23180d70167690337@4818d::2bc494dcc423dd3f@1365cb7701c60@9::0716037cf234bd9948b76@743c@40dc6::214d201d34b2d580044@d322@2207d59::1dcfb5c8@02c0@087bf8cd4831443337::bc38dc8310bc36b9033694f2fd784d41::4c@2773cf7f4bc92d8@0bff371f32722::5742d@3030@791f29c61@b3932952c15::753536b80b338bd0f33@7@284@8f9910::363@1117223f6c@01d28ff84b3df1891::0130973cc6b7c7837c1349@23c4@924f::f3db@9f04d6@6c93833f99cbd@90f9cf::7817@6b664f7437581332b62f02@@ff1::6785b4@2@3f378f359f99bd71843253b::483700@4@c41322d6123c18dc3c3b280::d435931696@38050c597@0d0549f391d::cd20f396b272cbd93564cb4ff2d360b8::7b608@5149fc9@5c1@@5c1f73b5c1931::@2361b01d44b3300b474313314342cbb::24113b046d643926614cc637c2f5@b5f::6fd1b44b52f79f76325@88cc7c82cc11::6367b29d8f4983773c574@3@23d9440b::2bc657263c43b34bc5@57616cd2964@5::【β】h5K9lPAyQ3cCrPAtiUo@x1L7nh67VSoftikiuEvVLKyHkr2U8DJB5wKs8C2JShrHUvu3HrtVKh+2KSK4S9UsrI3SvZTwMkHnAqzwLYlKGsdS+543u1UqH7YpIrhL1Sysh5K9lPAyQ3cCrPAtiUo@x1L7nh67VSoftikiuEvVLKw=】β【::3168045673048314b351c91@34@c30@@::b238@36c8d580666bcb3f44c73cc5391::c06015674@4c023bcd3fc8024c73f6f7::05f3c71266175df363d@d33b@c0c@bb3::b33@533b13466d78776469dcf1f353@d::6537c3c5786426c1410f8b296ff01251::337370d6333316@@1@d226192@c@3986::9505d14@d1f066cbf348459385@c6f3d::092bb37@@b6@43dc5d38c86f3215578f::30c903438@b63063@8cf2f8b9@1197d8::78023fb73d4d0c7f51@0c8214c853@52::43@988@37f1433066f8f9c512f619b16::4cb908f7133833512fcb2d6c57@91@31::587086b9f@105d6@4427321699c99c30::f44d259910746c0125f6f50d2db85339::7bf8@f277957f350f@3@2c609679f230::f30c3479233@d0@6293c043517f5bb18::332710f5f139cb8c24fd0337@@c3@7d5::330153f84b30b63f4199d460f61@58f3::d3656b6fc204f094245466d3b013cbb0::b582df1f8c52@82fb62823669345797f::ffc65338b44690@3c5205935f238fc8b::1f558d9031bfd8fc07290734d080ff59::7c534f073d4f3bc9395f370560f3cc7b::f5f@1403789c@d43b@7@d04223f05912::cf9b2932@c6f32d534@f68f495f3@78c::3b@cb535bd@2b0fc02243137b619d45b::9@30800c7f4f27fc86@c6b011d159702::87373b63f339024844054638101b022d::62@d35d263cbd4457383967bdfc1506@::70884@f481073d@3b326db54f43d8310::1391b@604db899db138fdd46227683bc::4d6c35f282dfd133c8b8953@5f8f2bc6::f284@4f3937ffcb034fd33508f94f709::8c523@32c3c94524626d048bf150d5@2::f9043102532f9d@1dccbbc153392f71c::76@b1@0573f8295174c4582548338b@9::79329c5dd@fd561b@1@cbd5169336bf6::15c3993c9635@4@6c7@4c30f2@766462::45693092cd2f1c2368f6870257978ddc::c8ffbb62db0@9010@3c@389070f200b7::d7610@4c63164f537720b405f6bfff64::c6@9d@662f918b3d0d358f@b0fdcd8@4::@1f@6f7f12d3381b0dd5b62fd618c83f::64b42b@003@c033c835489dd10@36@@b::@62357@01b38686d9db53@1c41f1@331::9f619678037674c2@f35744878@8d02b::0061c6157772c49b0220b7968757d937::41750@74@842702b8ddcd63462cd0d32::f353165f46dd9bb6b306fd3994d339c3::2@017247899739@66c2cb4f05d3b47cf::3c@f4229333406c89f76@3432@c8d5c3::b60288@927188022@0635099b0@ffb34::39524f91f4b6c3c35992c9b08f265@39::d0630518b69238b@37@5649227235b6b::8c7193c4@2@97335b0f93bd14829@f@@::33b02bd63df4cb5b91@1cb5d24c3b031::d9b34f@65cf00df@076643c81013333c::@c30b634610999c1958023fbc197df2c::7@1@13@907d14cbb6893b8730f4748c8::4829f989f4956b662f3888d52737d26d::49@4f093@2154bd89b6c862f9049583f::03ccd5c66fc34@d@@726c330d1b671d1::774070f6d556d@fd678d07@322d40968::f231d6d3840cc87c239f60b441822719::03040fc8@6f72377d3c83cdf9b87f0f5::45d489700@63b56fc38931f0@fb4f833::4d653451cd3f8097bf@7508819f2f368::6c@f631b73b329016f377@4611604b1f::65013bb09473f8c416012f86804bb0fc::d52353@23@9931213b30cb138f2d@139::23435480f35323c782d974209bd7b670::0c298d3356587dd72984f4@7c40f38@b::338bc54573322004165@125f24c86530::84839f53d3d1bf601c975b7f1353fd31::【γ】6s0mhCmEk3cI2CrlS/Sc8KCDLj9m3MP2Y9fGKWwWXV3AI7p71hSLwb7Jc+VL9JzwoIMuP2Z4w/Zj18YpbBZdV4AjunvWFIvBvslz5Uv0nPCggy4/ZnjD9mPXxilsFl1XgCO639YUi8G+yXPlS/Sc8KCDLj9m3MP2Y9fGKWwWXVc=】γ【::2b@9d8@6761dc8@0@3f@f729c9316470::f@73062510726c7c3bcf3433@9039@8c::9358b16614@47b85b592c8c876c05973::@7b51454c894430@d0@5c1bb42f64322::@4f253cb7c269f@f308bf3@551f63f04::3524f190@9@08293@55bff5d326fffc7::5@035c92bc65fb3586c60f403f8b6404::090df432b13755261f5415bdb6@@d953::48dc673@d390b429d331b706d2016f99::9469f3db@b537413c@427603@@63632b::dc7038c0c183@b@@@@@583@1@9dd@3@4::53bd3d0f64477@15@4ddf7c5cdf68f3c::@b235d639382106bf3d696621d98cc39::033@@df83661881cdd3960@1b5548c08::7dd8@fbc683dd41cc446d4b9101f68fb::fb247b41c1@550@d83@283c19@148@05::13833310c656317fc@@c6b3325336917::f3f86@d10917056@@26239521489182c::6d64706146519bdb37d04dfc9d5b544c::3@5f903952@f8@6550324b1232919096::47b5@f498c41141732679bc9f3621f3b::8d9@97554662cd6123c26c939@24c9ff::3223827f@@b87d9163d1c115d55f16fb::009389226b8@48cf9d5b54cff1358cb0::3327b6015bd9398b0d7d93383df81d65::1d89881c1f9d8648c9d2c36d80f373@@::d2c62@@517346c06631@4293@3953c@5::3ffb2718f31@@25@@b846f@c92349f5@::d23@3833c046338765350cf02b@fd9c6::f5323903f35c4835fdb969027377534c::8123f2@687f03bc36b@22b@f@693f3f9::8c4@5@bf731491b60cc2f@866501d6c4::9bf910c05f767@d1dd6@@90f1753369b::341852002723b304729@b0f8@3264d50::92@55b7@5@90cf23c679483f9561dd18::59fd0837@1@958cf2796d1431f9dd19d::4782126fcc3073d8ff80@90900548@78::@0b@@47599835fd@0f8bcf0d0b094683::13b928836dc031@38fd928@cf4b68458::6c5c9@3321690bb630b510dc0b5858bf::7698056@297c0d14882@8f908ff1d739::c0d3b60b3c15f4@f9@@05344cf74717@::@35336125bbc76d9724bff0523@71c95::6f93049b94c3bdb56433746906491331::6@4f1142b@f19c11f9cdb88ff63cd61@::cf1d4c5237f7933@45b175722d34c@0d::b6@2f17ff@71297f6468c8fd241c@810::c1cc953c33@75f@70698971f7958071c::2733400004@37f9770c@6b58db93700@::8590fd98c691b18@56734036cc6cd07c::c0f1b7846389c971c00@cb6822d636db::1662ddc8865@b8664133494051509690::305c031274d1324442336812d1cc665f::9233299b8c361f1d888505fb880494b3::d741c234@83ffb17d48803559f80f4f2::72175c1340cf5f278f@333@108@4bd3c::1ccc9505159@30@983c9bbf34f602293::c200f3dc701ddb9892f642b2873453b@::7@d@19@4b99844309848933c39190bcf::6697373@220d50@b@670@35c89d8f@@@::10cb9f2789c3d816410320189b@566f1::934dc96b15871f863@5563210fff033f::38236340df959@9553090d2b78@973d8::0408d2b623b@50630@353d321350737@::34c17600fb3fc847333f5fb143293357::2d71d7@2b3c45435381b9b51f2d34bbd::62c74b04@390dbf2f287586bc3b0bbc3::3cfcf09162d874@61@c735b613@49400::87b3808f@77636b7904b09dc814bd744::1c2c3326ff4397604@0301c553863cb2::387314f76c9077c38fb3b3199416628f::333400115c34b72@008b4636b632938@::31d6f9c@cf360c6b@731c0783933f73d::5df910@@51783306f144@73d0@4bc266::c4f@6b35717708125d52632287523d32::219283@8f78b2944");
                String[] strArr = new String[3];
                int i10 = 0;
                while (matcher.find() && i10 < 3) {
                    strArr[i10] = matcher.group(1);
                    i10++;
                }
                if (i10 == 3) {
                    if (strJ == null) {
                        strJ = strArr[0];
                    }
                    if (strJ2 == null) {
                        strJ2 = strArr[1];
                    }
                    if (strJ3 == null) {
                        strJ3 = strArr[2];
                    }
                }
            }
            if (strJ != null && strJ2 != null && strJ3 != null) {
                String strT = kotlinx.coroutines.y.T(strJ);
                String strT2 = kotlinx.coroutines.y.T(strJ2);
                String strT3 = kotlinx.coroutines.y.T(strJ3);
                byte[] bArrDecode = Base64.decode(strT, 0);
                byte[] bArrDecode2 = Base64.decode(strT2, 0);
                byte[] bArrDecode3 = Base64.decode(strT3, 0);
                int iMin = Math.min(Math.min(bArrDecode.length, bArrDecode2.length), bArrDecode3.length);
                byte[] bArr = new byte[iMin];
                for (int i11 = 0; i11 < iMin; i11++) {
                    bArr[i11] = (byte) ((bArrDecode[i11] ^ bArrDecode2[i11]) ^ bArrDecode3[i11]);
                }
                if (iMin < 1) {
                    return null;
                }
                int i12 = bArr[0] & 255;
                if (i12 == 0 || i12 > iMin - 1) {
                    strReplaceAll = new String(bArr, StandardCharsets.UTF_8).replaceAll("[^\\x20-\\x7E]", "");
                    if (strReplaceAll.isEmpty() || strReplaceAll.length() > 32) {
                        return null;
                    }
                } else {
                    byte[] bArr2 = new byte[i12];
                    System.arraycopy(bArr, 1, bArr2, 0, i12);
                    strReplaceAll = new String(bArr2, StandardCharsets.UTF_8);
                }
                return strReplaceAll;
            }
            return null;
        } catch (Throwable unused) {
            return null;
        }
    }

    public static HashMap k(String str, String str2) {
        HashMap map = new HashMap();
        if (!xyz.stream.utils.e.g(str2)) {
            map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str2);
            return map;
        }
        if (str == null || str.isEmpty()) {
            str = UUID.randomUUID().toString();
        }
        map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, i(str, str2));
        map.put("play_id", str);
        return map;
    }

    public static String l(String str, String str2, String str3, String str4) {
        String str5;
        byte[] byteArray;
        GZIPInputStream gZIPInputStream;
        ByteArrayOutputStream byteArrayOutputStream;
        byte[] bArr;
        Request request = new Request();
        request.setMethod(str);
        request.setHeader((str2 == null || str2.isEmpty()) ? "Accept-Encoding=gzip" : str2.concat(";Accept-Encoding=gzip"));
        request.setUri(str3);
        if (str4 != null) {
            request.setBody(str4.getBytes());
        }
        request.setTimeout(5000);
        Response responseHttpProxy = Clientgosdk.httpProxy(request);
        if (responseHttpProxy == null) {
            return "";
        }
        if (responseHttpProxy.getBody() == null || responseHttpProxy.getBody().length <= 0) {
            str5 = "";
        } else if (responseHttpProxy.getHeader() == null || !responseHttpProxy.getHeader().contains("Content-Encoding=gzip")) {
            str5 = new String(responseHttpProxy.getBody());
        } else {
            try {
                gZIPInputStream = new GZIPInputStream(new ByteArrayInputStream(responseHttpProxy.getBody()));
                byteArrayOutputStream = new ByteArrayOutputStream();
                bArr = new byte[1024];
            } catch (Exception unused) {
                byteArray = null;
            }
            while (true) {
                int i10 = gZIPInputStream.read(bArr);
                if (i10 == -1) {
                    break;
                }
                byteArrayOutputStream.write(bArr, 0, i10);
                str5 = new String(byteArray);
            }
            gZIPInputStream.close();
            byteArray = byteArrayOutputStream.toByteArray();
            str5 = new String(byteArray);
        }
        StringBuilder sb = new StringBuilder();
        sb.append(responseHttpProxy.getStatusCode());
        sb.append("\n");
        return defpackage.e.p(sb, responseHttpProxy.getHeader() != null ? responseHttpProxy.getHeader() : "", "\n", str5);
    }

    public static void n(String str) {
        xyz.stream.utils.f.p().y("sdk", str);
    }

    public final void a(String str) {
        xyz.stream.utils.h.b("deleteDownloadData: " + str);
        o(str, "", "DELETE");
    }

    public final void b(String str) {
        xyz.stream.utils.h.b("deleteLiveData: " + str);
        o(str, "", "DELETE");
    }

    public final void c(String str) {
        if (str == null || str.isEmpty()) {
            return;
        }
        String strReplace = str.replace("ijkio:cache:ffio:", "");
        xyz.stream.utils.h.b("deletePlayData: " + strReplace);
        o(strReplace, "", "DELETE");
    }

    public final void d(String str, String str2, String str3, String str4, xyz.stream.utils.y yVar) {
        ((ExecutorService) this.f35930e).execute(new p(this, str, str2, str3, str4, yVar));
    }

    public final boolean m(Context context, String str, int i10) {
        try {
            if (this.f35926a) {
                return true;
            }
            this.f35927b = false;
            String absolutePath = context.getCacheDir().getAbsolutePath();
            File file = new File(absolutePath, ".me_debug_0b0982f0");
            if (!file.exists()) {
                file.createNewFile();
            }
            try {
                File file2 = new File(absolutePath + "/db/points");
                if (!file2.exists()) {
                    if (file2.getParentFile() != null) {
                        File parentFile = file2.getParentFile();
                        Objects.requireNonNull(parentFile);
                        if (!parentFile.exists()) {
                            file2.getParentFile().mkdirs();
                        }
                    }
                    kotlinx.coroutines.flow.h.c(context, "points", file2.getAbsolutePath());
                }
            } catch (Exception e10) {
                xyz.stream.utils.h.c("initSdk copy points error: " + e10.getMessage());
            }
            long jInitSdk = Clientgosdk.initSdk(context.getFilesDir().getAbsolutePath(), absolutePath, xyz.stream.utils.e.d().f36121j ? f0.o().q("flutter.apiToken", "") : f0.o().q("sp_token", ""), o.f().i(), xyz.stream.utils.e.d().f36113b);
            f0.o().y("flutter.apiToken");
            f0.o().y("sp_token");
            xyz.stream.utils.h.b("initSdk result: " + jInitSdk);
            if (jInitSdk != 0) {
                if (jInitSdk == 4) {
                    return m(context, str, i10);
                }
                return false;
            }
            this.f35926a = true;
            Clientgosdk.setAppInfo(str, i10);
            return true;
        } catch (Exception e11) {
            n("initSdk error: " + e11.getMessage());
            return false;
        }
    }

    public final void o(String str, String str2, String str3) {
        ((ExecutorService) this.f35930e).execute(new androidx.media3.exoplayer.audio.j(this, str, str3, str2, 10));
    }
}
