/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  jakarta.websocket.Decoder
 *  jakarta.websocket.Encoder
 *  jakarta.websocket.Extension
 *  jakarta.websocket.server.ServerEndpointConfig
 *  jakarta.websocket.server.ServerEndpointConfig$Configurator
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 */
package com.l7tech.server.transport.http.websocket;

import jakarta.websocket.Decoder;
import jakarta.websocket.Encoder;
import jakarta.websocket.Extension;
import jakarta.websocket.server.ServerEndpointConfig;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/*
 * Exception performing whole class analysis ignored.
 */
public class SsgServerEndpointConfig
implements ServerEndpointConfig {
    public static final String USER_PROP_KEY_SSG_HANDSHAKE_ID;
    static final String a;
    static final String b;
    static final String c;
    static final String d;
    static final String e;
    public static final String USER_PROP_KEY_SSG_SESSION_TO_EXTERNAL;
    static final String f;
    public static final String USER_PROP_KEY_SSG_SAVED_ON_UPGRADE_REQUEST;
    public static final String USER_PROP_KEY_SSG_SAVED_ON_UPGRADE_RESPONSE;
    private final Class<?> g;
    @Nullable
    private String h;
    private final List<String> i;
    private final List<Extension> j;
    private final List<Class<? extends Encoder>> k;
    private final List<Class<? extends Decoder>> l;
    private final ServerEndpointConfig.Configurator m;
    private final Map<String, Object> n = new ConcurrentHashMap<String, Object>();
    private static final String[] o;

    SsgServerEndpointConfig(Class<?> clazz, ServerEndpointConfig.Configurator configurator) {
        this.g = clazz;
        this.i = Collections.emptyList();
        this.j = Collections.emptyList();
        this.k = Collections.emptyList();
        this.l = Collections.emptyList();
        this.m = configurator;
    }

    public Class<?> getEndpointClass() {
        return this.g;
    }

    public List<Class<? extends Encoder>> getEncoders() {
        return this.k;
    }

    public List<Class<? extends Decoder>> getDecoders() {
        return this.l;
    }

    @Nullable
    public String getPath() {
        return this.h;
    }

    public void setPath(@NotNull String string) {
        try {
            if (string == null) {
                SsgServerEndpointConfig.a(0);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SsgServerEndpointConfig.a(illegalArgumentException);
        }
        this.h = string;
    }

    public ServerEndpointConfig.Configurator getConfigurator() {
        return this.m;
    }

    @NotNull
    public final Map<String, Object> getUserProperties() {
        Map<String, Object> map;
        try {
            map = this.n;
            if (map == null) {
                SsgServerEndpointConfig.a(1);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SsgServerEndpointConfig.a(illegalArgumentException);
        }
        return map;
    }

    public final List<String> getSubprotocols() {
        return this.i;
    }

    public final List<Extension> getExtensions() {
        return this.j;
    }

    /*
     * Exception decompiling
     */
    private static /* synthetic */ void a(int var0) {
        /*
         * This method has failed to decompile.  When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
         * 
         * org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [0[TRYBLOCK]], but top level block is 6[SWITCH]
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
         *     at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
         *     at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
         *     at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
         *     at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1050)
         *     at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
         *     at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
         *     at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
         *     at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
         *     at org.benf.cfr.reader.Main.main(Main.java:54)
         */
        throw new IllegalStateException("Decompilation failed");
    }

    private static IllegalArgumentException a(IllegalArgumentException illegalArgumentException) {
        return illegalArgumentException;
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[17];
                var3_1 = 0;
                var2_2 = "D\u0013s\u0013\u001c2?s\u0004h6\n%9J\u0013t\u0007P\u0013s\u0016\u000e#%*c8h2!\"!OVj#\u001b?\"GV\"5Ar>\u0003\u001br5\u001bw#L\u0002'4\n#8Q\u0018'(\u001a;!\u001dp%@k<6;F\u0012*\t\u0001z\u0018S\u0011u'\u000b2`q\u0013t6\u00009>F\u0014p%@k,8#M\u0013d2\u0000%`f\u0018s/\u001b.\u0010p%@k'6#G\u0005o'\u00042`j2\u001cp%@k<6;F\u0012*\t\u0001z\u0018S\u0011u'\u000b2`q\u0013v3\n$9#p%@k<2?U\u001fd#B\u0018#\u000e5k)\u001c2`f\u000eb%\u001a#(\u000e&h*\u000644,p%@k<2?U\u001fd#B\u0007,P\u0005*\u0012\u0007%\"V\u0011ok\"2>P\u0017`#B\u0003\"\u000e3\u007f2\n%#B\u001a\u0013p%@k:\u0005\u0004\u000e\"hk*/9F\u0004i'\u0003B@\u0019ji\u0003`9F\u0015oi\u001c2?U\u0013ui\u001b%,M\u0005w)\u001d#bK\u0002s6@ (A\u0005h%\u000429\f%t!<2?U\u0013u\u0003\u00013=L\u001fi2,8#E\u001f`>b\u0004`3\u00022#WVa)\u001dw\rm\u0019s\b\u001a;!\u0003\u0006f4\u000e:(W\u0013ufHr>\u0004Vh Or>\rStf\u0002\">WVi)\u001bw/FVi3\u0003;\u0004S\u0017s.\u0017p%@k<2>P\u001fh(B\u0003\"\u000e3\u007f2\n%#B\u001aB@\u0019ji\u0003`9F\u0015oi\u001c2?U\u0013ui\u001b%,M\u0005w)\u001d#bK\u0002s6@ (A\u0005h%\u000429\f%t!<2?U\u0013u\u0003\u00013=L\u001fi2,8#E\u001f`";
                var4_3 = "D\u0013s\u0013\u001c2?s\u0004h6\n%9J\u0013t\u0007P\u0013s\u0016\u000e#%*c8h2!\"!OVj#\u001b?\"GV\"5Ar>\u0003\u001br5\u001bw#L\u0002'4\n#8Q\u0018'(\u001a;!\u001dp%@k<6;F\u0012*\t\u0001z\u0018S\u0011u'\u000b2`q\u0013t6\u00009>F\u0014p%@k,8#M\u0013d2\u0000%`f\u0018s/\u001b.\u0010p%@k'6#G\u0005o'\u00042`j2\u001cp%@k<6;F\u0012*\t\u0001z\u0018S\u0011u'\u000b2`q\u0013v3\n$9#p%@k<2?U\u001fd#B\u0018#\u000e5k)\u001c2`f\u000eb%\u001a#(\u000e&h*\u000644,p%@k<2?U\u001fd#B\u0007,P\u0005*\u0012\u0007%\"V\u0011ok\"2>P\u0017`#B\u0003\"\u000e3\u007f2\n%#B\u001a\u0013p%@k:\u0005\u0004\u000e\"hk*/9F\u0004i'\u0003B@\u0019ji\u0003`9F\u0015oi\u001c2?U\u0013ui\u001b%,M\u0005w)\u001d#bK\u0002s6@ (A\u0005h%\u000429\f%t!<2?U\u0013u\u0003\u00013=L\u001fi2,8#E\u001f`>b\u0004`3\u00022#WVa)\u001dw\rm\u0019s\b\u001a;!\u0003\u0006f4\u000e:(W\u0013ufHr>\u0004Vh Or>\rStf\u0002\">WVi)\u001bw/FVi3\u0003;\u0004S\u0017s.\u0017p%@k<2>P\u001fh(B\u0003\"\u000e3\u007f2\n%#B\u001aB@\u0019ji\u0003`9F\u0015oi\u001c2?U\u0013ui\u001b%,M\u0005w)\u001d#bK\u0002s6@ (A\u0005h%\u000429\f%t!<2?U\u0013u\u0003\u00013=L\u001fi2,8#E\u001f`".length();
                var1_4 = 17;
                var0_5 = -1;
lbl7:
                // 2 sources

                while (true) {
                    v0 = 83;
                    v1 = ++var0_5;
                    v2 = var2_2.substring(v1, v1 + var1_4);
                    v3 = -1;
                    break block9;
                    break;
                }
lbl13:
                // 1 sources

                while (true) {
                    var5[var3_1++] = SsgServerEndpointConfig.a(v0, SsgServerEndpointConfig.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "\u0011D!\n]S^4~\u0005B#fM1dKsfDC7p\u000e\nCS_1v\u0001B#p^-zKbvBI0y\u0007K\u000b\u0011D!\n]S_1~\tI";
                    var4_3 = "\u0011D!\n]S^4~\u0005B#fM1dKsfDC7p\u000e\nCS_1v\u0001B#p^-zKbvBI0y\u0007K\u000b\u0011D!\n]S_1~\tI".length();
                    var1_4 = 46;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 50;
                        v4 = ++var0_5;
                        v2 = var2_2.substring(v4, v4 + var1_4);
                        v3 = 0;
                        break block9;
                        break;
                    }
                    break;
                }
lbl28:
                // 1 sources

                while (true) {
                    var5[var3_1++] = SsgServerEndpointConfig.a(v0, SsgServerEndpointConfig.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    break block10;
                    break;
                }
            }
            switch (v3) {
                default: {
                    ** continue;
                }
                ** case 0:
lbl39:
                // 1 sources

                ** continue;
            }
        }
        SsgServerEndpointConfig.o = var5;
        SsgServerEndpointConfig.USER_PROP_KEY_SSG_SAVED_ON_UPGRADE_REQUEST = SsgServerEndpointConfig.o[6];
        SsgServerEndpointConfig.USER_PROP_KEY_SSG_HANDSHAKE_ID = SsgServerEndpointConfig.o[5];
        SsgServerEndpointConfig.a = SsgServerEndpointConfig.o[4];
        SsgServerEndpointConfig.USER_PROP_KEY_SSG_SESSION_TO_EXTERNAL = SsgServerEndpointConfig.o[13];
        SsgServerEndpointConfig.c = SsgServerEndpointConfig.o[8];
        SsgServerEndpointConfig.d = SsgServerEndpointConfig.o[15];
        SsgServerEndpointConfig.USER_PROP_KEY_SSG_SAVED_ON_UPGRADE_RESPONSE = SsgServerEndpointConfig.o[3];
        SsgServerEndpointConfig.f = SsgServerEndpointConfig.o[9];
        SsgServerEndpointConfig.e = SsgServerEndpointConfig.o[16];
        SsgServerEndpointConfig.b = SsgServerEndpointConfig.o[7];
    }

    private static char[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x1E);
        }
        return cArray;
    }

    /*
     * Handled impossible loop by duplicating code
     * Enabled aggressive block sorting
     */
    private static String a(int n2, char[] cArray) {
        char[] cArray2;
        block11: {
            int n3;
            int n4;
            int n5;
            block10: {
                n5 = n2;
                cArray2 = cArray;
                n4 = cArray.length;
                n3 = 0;
                if (!true) break block10;
                n4 = n4;
                if (n4 <= n3) break block11;
            }
            do {
                n5 = n5;
                cArray2 = cArray2;
                int n6 = n3;
                cArray2[n6] = (char)(cArray2[n6] ^ (n5 ^ (switch (n3 % 7) {
                    case 0 -> 112;
                    case 1 -> 37;
                    case 2 -> 84;
                    case 3 -> 21;
                    case 4 -> 60;
                    case 5 -> 4;
                    default -> 30;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

