/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.XmlUtil
 *  com.l7tech.gateway.api.ItemsList
 *  com.l7tech.gateway.api.Mapping$Action
 *  com.l7tech.gateway.api.impl.MarshallingUtils
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobId
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobResult
 *  com.l7tech.gateway.common.AsyncAdminMethods$JobStillActiveException
 *  com.l7tech.gateway.common.AsyncAdminMethods$UnknownJobException
 *  com.l7tech.gateway.common.LicenseManager
 *  com.l7tech.gateway.common.solutionkit.EntityOwnershipDescriptor
 *  com.l7tech.gateway.common.solutionkit.ForbiddenException
 *  com.l7tech.gateway.common.solutionkit.InstanceModifier
 *  com.l7tech.gateway.common.solutionkit.SolutionKit
 *  com.l7tech.gateway.common.solutionkit.SolutionKitAdmin
 *  com.l7tech.gateway.common.solutionkit.SolutionKitConflictException
 *  com.l7tech.gateway.common.solutionkit.SolutionKitException
 *  com.l7tech.gateway.common.solutionkit.SolutionKitHeader
 *  com.l7tech.gateway.common.solutionkit.SolutionKitImportInfo
 *  com.l7tech.identity.IdentityProviderConfig
 *  com.l7tech.identity.IdentityProviderConfigManager
 *  com.l7tech.identity.IdentityProviderType
 *  com.l7tech.objectmodel.DeleteException
 *  com.l7tech.objectmodel.EntityType
 *  com.l7tech.objectmodel.FindException
 *  com.l7tech.objectmodel.Goid
 *  com.l7tech.objectmodel.PersistentEntity
 *  com.l7tech.objectmodel.SaveException
 *  com.l7tech.objectmodel.UpdateException
 *  com.l7tech.util.DomUtils
 *  com.l7tech.util.ExceptionUtils
 *  org.apache.commons.lang3.StringUtils
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 */
package com.l7tech.server.solutionkit;

import com.l7tech.common.io.XmlUtil;
import com.l7tech.gateway.api.ItemsList;
import com.l7tech.gateway.api.Mapping;
import com.l7tech.gateway.api.impl.MarshallingUtils;
import com.l7tech.gateway.common.AsyncAdminMethods;
import com.l7tech.gateway.common.LicenseManager;
import com.l7tech.gateway.common.solutionkit.EntityOwnershipDescriptor;
import com.l7tech.gateway.common.solutionkit.ForbiddenException;
import com.l7tech.gateway.common.solutionkit.InstanceModifier;
import com.l7tech.gateway.common.solutionkit.SolutionKit;
import com.l7tech.gateway.common.solutionkit.SolutionKitAdmin;
import com.l7tech.gateway.common.solutionkit.SolutionKitConflictException;
import com.l7tech.gateway.common.solutionkit.SolutionKitException;
import com.l7tech.gateway.common.solutionkit.SolutionKitHeader;
import com.l7tech.gateway.common.solutionkit.SolutionKitImportInfo;
import com.l7tech.identity.IdentityProviderConfig;
import com.l7tech.identity.IdentityProviderConfigManager;
import com.l7tech.identity.IdentityProviderType;
import com.l7tech.objectmodel.DeleteException;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.PersistentEntity;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.server.bundling.EntityMappingResult;
import com.l7tech.server.policy.bundle.ssgman.restman.RestmanMessage;
import com.l7tech.server.solutionkit.SolutionKitManager;
import com.l7tech.util.DomUtils;
import com.l7tech.util.ExceptionUtils;
import java.io.IOException;
import java.io.Serializable;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.transform.Result;
import javax.xml.transform.Source;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.stream.StreamSource;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;

/*
 * Exception performing whole class analysis ignored.
 */
public class SolutionKitAdminHelper
implements SolutionKitAdmin {
    private static final Logger a;
    private final SolutionKitManager b;
    private final LicenseManager c;
    private final IdentityProviderConfigManager d;
    static final /* synthetic */ boolean e;
    private static final String[] f;

    public SolutionKitAdminHelper(@NotNull LicenseManager licenseManager, @NotNull SolutionKitManager solutionKitManager, @NotNull IdentityProviderConfigManager identityProviderConfigManager) {
        if (licenseManager == null) {
            SolutionKitAdminHelper.a(0);
        }
        if (solutionKitManager == null) {
            SolutionKitAdminHelper.a(1);
        }
        if (identityProviderConfigManager == null) {
            SolutionKitAdminHelper.a(2);
        }
        this.b = solutionKitManager;
        this.c = licenseManager;
        this.d = identityProviderConfigManager;
    }

    @NotNull
    public List<SolutionKit> getSolutionKitsToUpgrade(@Nullable SolutionKit solutionKit) throws FindException {
        ArrayList<SolutionKit> arrayList;
        Object object;
        ArrayList<SolutionKit> arrayList2;
        block14: {
            block11: {
                ArrayList<SolutionKit> arrayList3;
                block12: {
                    arrayList2 = new ArrayList<SolutionKit>();
                    try {
                        try {
                            if (solutionKit != null) break block11;
                            arrayList3 = arrayList2;
                            if (arrayList3 != null) break block12;
                        }
                        catch (FindException findException) {
                            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
                        }
                        SolutionKitAdminHelper.a(3);
                    }
                    catch (FindException findException) {
                        throw SolutionKitAdminHelper.a((Exception)((Object)findException));
                    }
                }
                return arrayList3;
            }
            Goid goid = solutionKit.getParentGoid();
            if (goid != null) {
                block13: {
                    object = this.get(goid);
                    try {
                        if (object == null) break block13;
                        arrayList2.add((SolutionKit)object);
                        break block14;
                    }
                    catch (FindException findException) {
                        throw SolutionKitAdminHelper.a((Exception)((Object)findException));
                    }
                }
                String[] stringArray = f;
                throw new FindException(stringArray[19] + solutionKit.getName() + stringArray[47]);
            }
        }
        arrayList2.add(solutionKit);
        object = this.find(solutionKit.getGoid());
        Iterator iterator = object.iterator();
        while (iterator.hasNext()) {
            SolutionKit solutionKit2 = (SolutionKit)iterator.next();
            arrayList2.add(solutionKit2);
        }
        try {
            arrayList = arrayList2;
            if (arrayList == null) {
                SolutionKitAdminHelper.a(4);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        return arrayList;
    }

    @NotNull
    public String testInstall(@NotNull SolutionKit solutionKit, @NotNull String string, boolean bl2) throws Exception {
        String string2;
        try {
            if (solutionKit == null) {
                SolutionKitAdminHelper.a(5);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(6);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        try {
            this.a(solutionKit);
            string2 = this.b.importBundle(string, solutionKit, true);
            if (string2 == null) {
                SolutionKitAdminHelper.a(7);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        return string2;
    }

    @NotNull
    public String testUpgrade(@NotNull SolutionKitImportInfo solutionKitImportInfo) throws Exception {
        String string;
        try {
            if (solutionKitImportInfo == null) {
                SolutionKitAdminHelper.a(8);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        for (SolutionKit solutionKit : solutionKitImportInfo.getSolutionKitsToInstall().keySet()) {
            this.a(solutionKit);
        }
        try {
            string = this.b.importBundles(solutionKitImportInfo, true);
            if (string == null) {
                SolutionKitAdminHelper.a(9);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        return string;
    }

    private void a(@NotNull SolutionKit solutionKit) throws SolutionKitException {
        block7: {
            try {
                if (solutionKit == null) {
                    SolutionKitAdminHelper.a(10);
                }
            }
            catch (SolutionKitException solutionKitException) {
                throw SolutionKitAdminHelper.a((Exception)((Object)solutionKitException));
            }
            String string = solutionKit.getProperty(SolutionKit.SK_PROP_FEATURE_SET_KEY);
            try {
                try {
                    if (StringUtils.isEmpty((CharSequence)string) || this.c.isFeatureEnabled(string)) break block7;
                }
                catch (SolutionKitException solutionKitException) {
                    throw SolutionKitAdminHelper.a((Exception)((Object)solutionKitException));
                }
                throw new ForbiddenException(solutionKit.getName() + f[5] + string);
            }
            catch (SolutionKitException solutionKitException) {
                throw SolutionKitAdminHelper.a((Exception)((Object)solutionKitException));
            }
        }
    }

    @NotNull
    public AsyncAdminMethods.JobId<String> testInstallAsync(@NotNull SolutionKit solutionKit, @NotNull String string, boolean bl2) {
        try {
            if (solutionKit == null) {
                SolutionKitAdminHelper.a(11);
            }
        }
        catch (UnsupportedOperationException unsupportedOperationException) {
            throw SolutionKitAdminHelper.a(unsupportedOperationException);
        }
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(12);
            }
        }
        catch (UnsupportedOperationException unsupportedOperationException) {
            throw SolutionKitAdminHelper.a(unsupportedOperationException);
        }
        throw new UnsupportedOperationException();
    }

    @NotNull
    public AsyncAdminMethods.JobId<String> testUpgradeAsync(@NotNull SolutionKitImportInfo solutionKitImportInfo) {
        try {
            if (solutionKitImportInfo == null) {
                SolutionKitAdminHelper.a(13);
            }
        }
        catch (UnsupportedOperationException unsupportedOperationException) {
            throw SolutionKitAdminHelper.a(unsupportedOperationException);
        }
        throw new UnsupportedOperationException();
    }

    @NotNull
    public Goid install(@NotNull SolutionKit solutionKit, @NotNull String string, boolean bl2) throws Exception {
        Goid goid;
        try {
            if (solutionKit == null) {
                SolutionKitAdminHelper.a(14);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(15);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        this.a(solutionKit);
        String string2 = this.b.importBundle(string, solutionKit, false);
        string2 = this.getMappingsWithEntityNameAddedToProperties(string, string2);
        solutionKit.setMappings(string2);
        String string3 = solutionKit.getUninstallBundle();
        try {
            if (!StringUtils.isEmpty((CharSequence)string3)) {
                solutionKit.setUninstallBundle(this.a(string3, string2));
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        Goid goid2 = this.b.save((PersistentEntity)solutionKit);
        try {
            this.a(string2, solutionKit);
            this.b.update((PersistentEntity)solutionKit);
            goid = goid2;
            if (goid == null) {
                SolutionKitAdminHelper.a(16);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        return goid;
    }

    @NotNull
    public ArrayList upgrade(@NotNull SolutionKitImportInfo solutionKitImportInfo) throws Exception {
        ArrayList<Goid> arrayList;
        int n2;
        SolutionKit solutionKit22;
        try {
            if (solutionKitImportInfo == null) {
                SolutionKitAdminHelper.a(17);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        Map map = solutionKitImportInfo.getSolutionKitsToInstall();
        ArrayList<Goid> arrayList2 = new ArrayList<Goid>();
        for (SolutionKit solutionKit22 : map.keySet()) {
            this.a(solutionKit22);
        }
        String string = this.b.importBundles(solutionKitImportInfo, false);
        solutionKit22 = (ItemsList)MarshallingUtils.unmarshal(ItemsList.class, (Source)new StreamSource(new StringReader(string)));
        List list = solutionKit22.getContent();
        List list2 = solutionKitImportInfo.getSolutionKitsToDelete();
        int n3 = list2.size() + map.size();
        if (n3 != list.size()) {
            String string2 = string;
            String string3 = System.lineSeparator();
            int n4 = list.size();
            int n5 = n3;
            String[] stringArray = f;
            throw new SolutionKitConflictException(stringArray[12] + n5 + stringArray[45] + n4 + stringArray[20] + string3 + (String)string2);
        }
        HashMap<String, SolutionKit> hashMap = new HashMap<String, SolutionKit>();
        for (SolutionKit solutionKit3 : list2) {
            hashMap.put(solutionKit3.getSolutionKitGuid(), solutionKit3);
        }
        ArrayList arrayList3 = new ArrayList();
        for (int i2 = n2 = list2.size(); i2 < list.size(); ++i2) {
            DOMResult object = new DOMResult();
            MarshallingUtils.marshal(list.get(i2), (Result)object, (boolean)false);
            arrayList3.add(XmlUtil.nodeToString((Node)object.getNode()));
        }
        n2 = 0;
        for (Map.Entry entry : map.entrySet()) {
            Goid goid;
            String string2;
            String string3 = (String)arrayList3.get(n2);
            string3 = this.getMappingsWithEntityNameAddedToProperties((String)entry.getValue(), string3);
            SolutionKit solutionKit = (SolutionKit)entry.getKey();
            solutionKit.setMappings(string3);
            String string4 = solutionKit.getUninstallBundle();
            try {
                if (!StringUtils.isEmpty((CharSequence)string4)) {
                    solutionKit.setUninstallBundle(this.a(string4, string3));
                }
            }
            catch (Exception exception) {
                throw SolutionKitAdminHelper.a(exception);
            }
            Set set = hashMap.keySet();
            if (set.contains(string2 = solutionKit.getSolutionKitGuid())) {
                SolutionKit solutionKit3 = (SolutionKit)hashMap.get(string2);
                goid = solutionKit3.getGoid();
                list2.remove(solutionKit3);
            } else {
                goid = this.b.save((PersistentEntity)solutionKit);
            }
            this.a(string3, solutionKit);
            this.b.update((PersistentEntity)solutionKit);
            arrayList2.add(goid);
            ++n2;
        }
        for (SolutionKit solutionKit : list2) {
            this.b.delete((PersistentEntity)solutionKit);
        }
        try {
            arrayList = arrayList2;
            if (arrayList == null) {
                SolutionKitAdminHelper.a(18);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        return arrayList;
    }

    protected String getMappingsWithEntityNameAddedToProperties(@NotNull String string, @NotNull String string2) throws IOException, SAXException {
        Object object;
        Element element;
        String string3;
        String[] stringArray;
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(19);
            }
        }
        catch (IOException iOException) {
            throw SolutionKitAdminHelper.a(iOException);
        }
        try {
            if (string2 == null) {
                SolutionKitAdminHelper.a(20);
            }
        }
        catch (IOException iOException) {
            throw SolutionKitAdminHelper.a(iOException);
        }
        HashMap<String, Object> hashMap = new HashMap<String, Object>();
        RestmanMessage restmanMessage = new RestmanMessage(string);
        for (Element object2 : restmanMessage.getBundleReferenceItems()) {
            String string4;
            String string5;
            stringArray = f;
            Element element2 = DomUtils.findFirstChildElementByName((Node)object2, (String)stringArray[14], (String)stringArray[56]);
            try {
                string5 = element2 != null ? element2.getTextContent() : null;
            }
            catch (IOException iOException) {
                throw SolutionKitAdminHelper.a(iOException);
            }
            string3 = string5;
            stringArray = f;
            element = DomUtils.findFirstChildElementByName((Node)object2, (String)stringArray[9], (String)stringArray[10]);
            try {
                string4 = element != null ? element.getTextContent() : null;
            }
            catch (IOException iOException) {
                throw SolutionKitAdminHelper.a(iOException);
            }
            object = string4;
            try {
                try {
                    if (StringUtils.isEmpty((CharSequence)string3) || StringUtils.isEmpty((CharSequence)object)) continue;
                }
                catch (IOException iOException) {
                    throw SolutionKitAdminHelper.a(iOException);
                }
                hashMap.put(string3, object);
            }
            catch (IOException iOException) {
                throw SolutionKitAdminHelper.a(iOException);
            }
        }
        RestmanMessage restmanMessage2 = new RestmanMessage(string2);
        for (Element element2 : restmanMessage2.getMappings()) {
            string3 = element2.getAttribute((stringArray = f)[83]);
            if (!hashMap.containsKey(string3)) continue;
            element = DomUtils.findFirstChildElementByName((Node)element2, (String)stringArray[9], (String)stringArray[11]);
            if (element == null) {
                element = DomUtils.createAndAppendElement((Element)element2, (String)stringArray[26]);
            }
            stringArray = f;
            object = DomUtils.createAndAppendElement((Element)element, (String)stringArray[31]);
            object.setAttribute(stringArray[52], stringArray[79]);
            Element element3 = DomUtils.createAndAppendElement((Element)object, (String)stringArray[64]);
            element3.setTextContent((String)hashMap.get(string3));
        }
        return restmanMessage2.getAsFormattedString();
    }

    @NotNull
    public AsyncAdminMethods.JobId<Goid> installAsync(@NotNull SolutionKit solutionKit, @NotNull String string, boolean bl2) {
        try {
            if (solutionKit == null) {
                SolutionKitAdminHelper.a(21);
            }
        }
        catch (UnsupportedOperationException unsupportedOperationException) {
            throw SolutionKitAdminHelper.a(unsupportedOperationException);
        }
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(22);
            }
        }
        catch (UnsupportedOperationException unsupportedOperationException) {
            throw SolutionKitAdminHelper.a(unsupportedOperationException);
        }
        throw new UnsupportedOperationException();
    }

    @NotNull
    public AsyncAdminMethods.JobId<ArrayList> upgradeAsync(@NotNull SolutionKitImportInfo solutionKitImportInfo) {
        try {
            if (solutionKitImportInfo == null) {
                SolutionKitAdminHelper.a(23);
            }
        }
        catch (UnsupportedOperationException unsupportedOperationException) {
            throw SolutionKitAdminHelper.a(unsupportedOperationException);
        }
        throw new UnsupportedOperationException();
    }

    private String a(@NotNull String string, @NotNull String string2) throws SAXException, IOException {
        String string3;
        String[] stringArray;
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(24);
            }
        }
        catch (SAXException sAXException) {
            throw SolutionKitAdminHelper.a(sAXException);
        }
        try {
            if (string2 == null) {
                SolutionKitAdminHelper.a(25);
            }
        }
        catch (SAXException sAXException) {
            throw SolutionKitAdminHelper.a(sAXException);
        }
        HashMap<String, String> hashMap = new HashMap<String, String>();
        RestmanMessage restmanMessage = new RestmanMessage(string2);
        for (Element object : restmanMessage.getMappings()) {
            stringArray = f;
            string3 = object.getAttribute(stringArray[83]);
            String string4 = object.getAttribute(stringArray[38]);
            try {
                try {
                    if (StringUtils.isEmpty((CharSequence)string3) || StringUtils.isEmpty((CharSequence)string4)) continue;
                }
                catch (SAXException sAXException) {
                    throw SolutionKitAdminHelper.a(sAXException);
                }
                hashMap.put(string3, string4);
            }
            catch (SAXException sAXException) {
                throw SolutionKitAdminHelper.a(sAXException);
            }
        }
        RestmanMessage restmanMessage2 = new RestmanMessage(string);
        for (Element element : restmanMessage2.getMappings()) {
            stringArray = f;
            string3 = element.getAttribute(stringArray[83]);
            try {
                if (!hashMap.containsKey(string3)) continue;
                element.setAttribute(stringArray[38], (String)hashMap.get(string3));
            }
            catch (SAXException sAXException) {
                throw SolutionKitAdminHelper.a(sAXException);
            }
        }
        return restmanMessage2.getAsString();
    }

    @NotNull
    public String uninstall(@NotNull Goid goid) throws Exception {
        String string;
        try {
            if (goid == null) {
                SolutionKitAdminHelper.a(26);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        boolean bl2 = false;
        SolutionKit solutionKit = this.get(goid);
        String string2 = "";
        String string3 = solutionKit.getUninstallBundle();
        if (string3 != null) {
            int n2 = this.b.findBySolutionKitGuid(solutionKit.getSolutionKitGuid()).size();
            if (n2 > 1) {
                ArrayList<String> arrayList = new ArrayList<String>();
                RestmanMessage restmanMessage = new RestmanMessage(string3);
                for (Element object : restmanMessage.getMappings()) {
                    String string4;
                    String[] stringArray = f;
                    String string5 = object.getAttribute(stringArray[15]);
                    try {
                        if (Mapping.Action.Ignore == Mapping.Action.valueOf((String)string5)) {
                            continue;
                        }
                    }
                    catch (Exception exception) {
                        throw SolutionKitAdminHelper.a(exception);
                    }
                    stringArray = f;
                    String string6 = object.getAttribute(stringArray[25]);
                    if (EntityType.valueOf((String)string6) == EntityType.ID_PROVIDER_CONFIG) {
                        String string7 = object.getAttribute(stringArray[38]);
                        if (StringUtils.isBlank((CharSequence)string7)) {
                            String string8;
                            String string9 = object.getAttribute(stringArray[7]);
                            try {
                                string8 = StringUtils.isBlank((CharSequence)string9) ? null : this.a(string9);
                            }
                            catch (Exception exception) {
                                throw SolutionKitAdminHelper.a(exception);
                            }
                            string4 = string8;
                        } else {
                            string4 = this.a(string7);
                        }
                    } else {
                        string4 = null;
                    }
                    try {
                        if (InstanceModifier.isModifiableType((String)string6, string4)) continue;
                        arrayList.add(string6);
                    }
                    catch (Exception exception) {
                        throw SolutionKitAdminHelper.a(exception);
                    }
                }
                for (String string9 : arrayList) {
                    restmanMessage.removeMappingByEntityType(string9);
                }
                string3 = restmanMessage.getAsString();
            }
            string2 = this.b.importBundle(string3, solutionKit, false);
        }
        try {
            this.b.delete((PersistentEntity)solutionKit);
            string = string2;
            if (string == null) {
                SolutionKitAdminHelper.a(27);
            }
        }
        catch (Exception exception) {
            throw SolutionKitAdminHelper.a(exception);
        }
        return string;
    }

    private String a(String string) {
        try {
            IdentityProviderConfig identityProviderConfig = (IdentityProviderConfig)this.d.findByPrimaryKey(Goid.parseGoid((String)string));
            if (identityProviderConfig == null) {
                return null;
            }
            return IdentityProviderType.fromVal((int)identityProviderConfig.getTypeVal()).description();
        }
        catch (FindException findException) {
            a.warning(f[68] + string + "'");
            return null;
        }
    }

    @NotNull
    public AsyncAdminMethods.JobId<String> uninstallAsync(@NotNull Goid goid) {
        try {
            if (goid == null) {
                SolutionKitAdminHelper.a(28);
            }
        }
        catch (UnsupportedOperationException unsupportedOperationException) {
            throw SolutionKitAdminHelper.a(unsupportedOperationException);
        }
        throw new UnsupportedOperationException();
    }

    public <OUT extends Serializable> String getJobStatus(AsyncAdminMethods.JobId<OUT> jobId) {
        throw new UnsupportedOperationException();
    }

    public <OUT extends Serializable> AsyncAdminMethods.JobResult<OUT> getJobResult(AsyncAdminMethods.JobId<OUT> jobId) throws AsyncAdminMethods.UnknownJobException, AsyncAdminMethods.JobStillActiveException {
        throw new UnsupportedOperationException();
    }

    public <OUT extends Serializable> void cancelJob(AsyncAdminMethods.JobId<OUT> jobId, boolean bl2) {
        throw new UnsupportedOperationException();
    }

    /*
     * Loose catch block
     */
    private void a(@NotNull String string, @NotNull SolutionKit solutionKit) throws SAXException, IOException {
        EntityOwnershipDescriptor entityOwnershipDescriptor;
        EntityOwnershipDescriptor entityOwnershipDescriptor22222;
        int n2;
        HashMap<String, EntityOwnershipDescriptor> hashMap;
        HashMap<String, EntityOwnershipDescriptor> hashMap2;
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(29);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SolutionKitAdminHelper.a(illegalArgumentException);
        }
        try {
            if (solutionKit == null) {
                SolutionKitAdminHelper.a(30);
            }
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SolutionKitAdminHelper.a(illegalArgumentException);
        }
        List list = solutionKit.getEntityOwnershipDescriptors();
        try {
            HashMap<String, EntityOwnershipDescriptor> hashMap3;
            hashMap2 = hashMap3;
            hashMap = hashMap3;
            n2 = list != null ? list.size() : 0;
        }
        catch (IllegalArgumentException illegalArgumentException) {
            throw SolutionKitAdminHelper.a(illegalArgumentException);
        }
        hashMap2(n2);
        HashMap<String, EntityOwnershipDescriptor> hashMap4 = hashMap;
        if (list != null) {
            for (EntityOwnershipDescriptor entityOwnershipDescriptor22222 : list) {
                entityOwnershipDescriptor = hashMap4.put(entityOwnershipDescriptor22222.getEntityId(), entityOwnershipDescriptor22222);
                try {
                    if (entityOwnershipDescriptor == null) continue;
                    a.log(Level.WARNING, f[61] + entityOwnershipDescriptor22222.getEntityId());
                }
                catch (IllegalArgumentException illegalArgumentException) {
                    throw SolutionKitAdminHelper.a(illegalArgumentException);
                }
            }
        }
        ArrayList arrayList = new ArrayList();
        entityOwnershipDescriptor22222 = new HashSet();
        entityOwnershipDescriptor = new HashSet();
        RestmanMessage restmanMessage = new RestmanMessage(string);
        List<Element> list2 = restmanMessage.getMappings();
        for (Element element : list2) {
            String string2;
            String string3;
            EntityMappingResult.MappingAction mappingAction;
            String[] stringArray;
            block54: {
                EntityOwnershipDescriptor entityOwnershipDescriptor3;
                block56: {
                    block55: {
                        block58: {
                            EntityOwnershipDescriptor entityOwnershipDescriptor4;
                            block53: {
                                block52: {
                                    block51: {
                                        boolean bl2;
                                        block50: {
                                            block49: {
                                                try {
                                                    if (element.hasAttribute(f[78])) {
                                                        a.log(Level.WARNING, f[32] + element.getAttribute(f[76]) + "'");
                                                        continue;
                                                    }
                                                }
                                                catch (IllegalArgumentException illegalArgumentException) {
                                                    throw SolutionKitAdminHelper.a(illegalArgumentException);
                                                }
                                                try {
                                                    stringArray = f;
                                                    mappingAction = EntityMappingResult.MappingAction.valueOf(element.getAttribute(stringArray[6]));
                                                }
                                                catch (IllegalArgumentException illegalArgumentException) {
                                                    stringArray = f;
                                                    a.log(Level.WARNING, stringArray[73] + element.getAttribute(stringArray[43]) + stringArray[28] + ExceptionUtils.getMessage((Throwable)illegalArgumentException), ExceptionUtils.getDebugException((Throwable)illegalArgumentException));
                                                    continue;
                                                }
                                                try {
                                                    if (EntityMappingResult.MappingAction.Ignored == mappingAction) {
                                                        continue;
                                                    }
                                                }
                                                catch (IllegalArgumentException illegalArgumentException) {
                                                    throw SolutionKitAdminHelper.a(illegalArgumentException);
                                                }
                                                stringArray = f;
                                                string3 = element.getAttribute(stringArray[77]);
                                                string2 = element.getAttribute(stringArray[71]);
                                                if (!StringUtils.isNotBlank((CharSequence)string3)) continue;
                                                try {
                                                    block57: {
                                                        if (!StringUtils.isNotBlank((CharSequence)string2)) continue;
                                                        break block57;
                                                        catch (IllegalArgumentException illegalArgumentException) {
                                                            throw SolutionKitAdminHelper.a(illegalArgumentException);
                                                        }
                                                    }
                                                    if (EntityMappingResult.MappingAction.Deleted != mappingAction) break block49;
                                                }
                                                catch (IllegalArgumentException illegalArgumentException) {
                                                    throw SolutionKitAdminHelper.a(illegalArgumentException);
                                                }
                                                entityOwnershipDescriptor3 = (EntityOwnershipDescriptor)hashMap4.get(string3);
                                                try {
                                                    if (entityOwnershipDescriptor3 == null) continue;
                                                    entityOwnershipDescriptor22222.add(entityOwnershipDescriptor3);
                                                    continue;
                                                }
                                                catch (IllegalArgumentException illegalArgumentException) {
                                                    throw SolutionKitAdminHelper.a(illegalArgumentException);
                                                }
                                            }
                                            if (EntityMappingResult.MappingAction.CreatedNew != mappingAction) break block58;
                                            bl2 = RestmanMessage.isMarkedAsReadOnly(element);
                                            entityOwnershipDescriptor4 = (EntityOwnershipDescriptor)hashMap4.get(string3);
                                            try {
                                                if (entityOwnershipDescriptor4 == null) break block50;
                                                entityOwnershipDescriptor4.setReadOnly(bl2);
                                                entityOwnershipDescriptor4.setEntityType(EntityType.valueOf((String)string2));
                                                break block51;
                                            }
                                            catch (IllegalArgumentException illegalArgumentException) {
                                                throw SolutionKitAdminHelper.a(illegalArgumentException);
                                            }
                                        }
                                        entityOwnershipDescriptor4 = new EntityOwnershipDescriptor(solutionKit, string3, EntityType.valueOf((String)string2), bl2);
                                        arrayList.add(entityOwnershipDescriptor4);
                                    }
                                    entityOwnershipDescriptor4.markAsOwned();
                                    if (e) break block52;
                                    try {
                                        block59: {
                                            if (string3 != null) break block52;
                                            break block59;
                                            catch (IllegalArgumentException illegalArgumentException) {
                                                throw SolutionKitAdminHelper.a(illegalArgumentException);
                                            }
                                        }
                                        throw new AssertionError();
                                    }
                                    catch (IllegalArgumentException illegalArgumentException) {
                                        throw SolutionKitAdminHelper.a(illegalArgumentException);
                                    }
                                }
                                if (e) break block53;
                                try {
                                    block60: {
                                        if (string3.equals(entityOwnershipDescriptor4.getEntityId())) break block53;
                                        break block60;
                                        catch (IllegalArgumentException illegalArgumentException) {
                                            throw SolutionKitAdminHelper.a(illegalArgumentException);
                                        }
                                    }
                                    throw new AssertionError();
                                }
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw SolutionKitAdminHelper.a(illegalArgumentException);
                                }
                            }
                            entityOwnershipDescriptor.add(entityOwnershipDescriptor4.getEntityId());
                            continue;
                        }
                        try {
                            if (EntityMappingResult.MappingAction.UpdatedExisting != mappingAction && EntityMappingResult.MappingAction.UsedExisting != mappingAction) break block54;
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw SolutionKitAdminHelper.a(illegalArgumentException);
                        }
                        entityOwnershipDescriptor3 = (EntityOwnershipDescriptor)hashMap4.get(string3);
                        if (entityOwnershipDescriptor3 == null) continue;
                        boolean bl3 = RestmanMessage.isMarkedAsReadOnly(element);
                        entityOwnershipDescriptor3.setReadOnly(bl3);
                        entityOwnershipDescriptor3.markAsOwned();
                        if (e) break block55;
                        try {
                            block61: {
                                if (string3 != null) break block55;
                                break block61;
                                catch (IllegalArgumentException illegalArgumentException) {
                                    throw SolutionKitAdminHelper.a(illegalArgumentException);
                                }
                            }
                            throw new AssertionError();
                        }
                        catch (IllegalArgumentException illegalArgumentException) {
                            throw SolutionKitAdminHelper.a(illegalArgumentException);
                        }
                    }
                    if (e) break block56;
                    try {
                        block62: {
                            if (string3.equals(entityOwnershipDescriptor3.getEntityId())) break block56;
                            break block62;
                            catch (IllegalArgumentException illegalArgumentException) {
                                throw SolutionKitAdminHelper.a(illegalArgumentException);
                            }
                        }
                        throw new AssertionError();
                    }
                    catch (IllegalArgumentException illegalArgumentException) {
                        throw SolutionKitAdminHelper.a(illegalArgumentException);
                    }
                }
                entityOwnershipDescriptor.add(entityOwnershipDescriptor3.getEntityId());
                continue;
            }
            String string4 = string2;
            String string5 = string3;
            String string6 = String.valueOf((Object)mappingAction);
            stringArray = f;
            a.log(Level.WARNING, stringArray[44] + string6 + stringArray[53] + string5 + "," + string4 + stringArray[59]);
        }
        try {
            this.b.decrementEntitiesVersionStamp(Collections.unmodifiableCollection(entityOwnershipDescriptor), solutionKit.getGoid());
        }
        catch (UpdateException updateException) {
            a.log(Level.WARNING, f[60] + ExceptionUtils.getMessageWithCause((Throwable)updateException), ExceptionUtils.getDebugException((Throwable)updateException));
        }
        solutionKit.removeEntityOwnershipDescriptors((Collection)entityOwnershipDescriptor22222);
        solutionKit.addEntityOwnershipDescriptors((Collection)arrayList);
    }

    @NotNull
    public Collection<SolutionKitHeader> findHeaders() throws FindException {
        Collection collection;
        try {
            collection = this.b.findAllHeaders();
            if (collection == null) {
                SolutionKitAdminHelper.a(31);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        return collection;
    }

    @NotNull
    public Collection<SolutionKitHeader> findHeaders(@NotNull Goid goid) throws FindException {
        List<SolutionKitHeader> list;
        try {
            if (goid == null) {
                SolutionKitAdminHelper.a(32);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        try {
            list = this.b.findAllChildrenHeadersByParentGoid(goid);
            if (list == null) {
                SolutionKitAdminHelper.a(33);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        return list;
    }

    @NotNull
    public Collection<SolutionKit> find(@NotNull Goid goid) throws FindException {
        Collection<SolutionKit> collection;
        try {
            if (goid == null) {
                SolutionKitAdminHelper.a(34);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        try {
            collection = this.b.findAllChildrenByParentGoid(goid);
            if (collection == null) {
                SolutionKitAdminHelper.a(35);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        return collection;
    }

    @NotNull
    public Collection<SolutionKit> find(@NotNull String string) throws FindException {
        List<SolutionKit> list;
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(36);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        try {
            list = this.b.findBySolutionKitGuid(string);
            if (list == null) {
                SolutionKitAdminHelper.a(37);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        return list;
    }

    public SolutionKit get(@NotNull Goid goid) throws FindException {
        try {
            if (goid == null) {
                SolutionKitAdminHelper.a(38);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        return (SolutionKit)this.b.findByPrimaryKey(goid);
    }

    public SolutionKit get(@NotNull String string, @Nullable String string2) throws FindException {
        try {
            if (string == null) {
                SolutionKitAdminHelper.a(39);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        return this.b.findBySolutionKitGuidAndIM(string, string2);
    }

    @NotNull
    public Goid save(@NotNull SolutionKit solutionKit) throws SaveException {
        Goid goid;
        try {
            if (solutionKit == null) {
                SolutionKitAdminHelper.a(40);
            }
        }
        catch (SaveException saveException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)saveException));
        }
        try {
            goid = this.b.save((PersistentEntity)solutionKit);
            if (goid == null) {
                SolutionKitAdminHelper.a(41);
            }
        }
        catch (SaveException saveException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)saveException));
        }
        return goid;
    }

    public void update(@NotNull SolutionKit solutionKit) throws UpdateException {
        try {
            if (solutionKit == null) {
                SolutionKitAdminHelper.a(42);
            }
        }
        catch (UpdateException updateException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)updateException));
        }
        this.b.update((PersistentEntity)solutionKit);
    }

    public void delete(@NotNull Goid goid) throws FindException, DeleteException {
        try {
            if (goid == null) {
                SolutionKitAdminHelper.a(43);
            }
        }
        catch (FindException findException) {
            throw SolutionKitAdminHelper.a((Exception)((Object)findException));
        }
        this.b.delete(goid);
    }

    /*
     * Unable to fully structure code
     */
    static {
        block12: {
            block11: {
                var5 = new String[84];
                var3_1 = 0;
                var2_2 = "\u0019uR~\u000b\u001eqWoNn$\u001euHw\u0006\u001fd@zse\u0006\u000eqH~se\u0004\f}J\u007f&J}W;rn;\u0003wAute3D4\u0004Ibq\"\u0003fA\u007f'f2\u000b`Qib $\u000f`\u0004\u000b\u000bwPrhn\u0003\u000b\u007fAu\u0005\u0019fGRc\n\u001auV~it\u0010\u0005}@/\u0002`Pk=/x\u0004g\nw0t2\t|\nxhmxX$\u0015+(0cEsEobw6\u00139Izia0\u000fyAus\u0004$uI~\n:fKkbr#\u0003qW\u0010/fVtu:w/lT~dt2\u000e4\u000b\u001eqWoNn$\u001euHw/\u0002`Pk=/x\u0004g\nw0t2\t|\nxhmxX$\u0015+(0cEsEobw6\u00139Izia0\u000fyAus\u0006\u000bwPrhn\u0010\u001eqWoNn$\u001euHwFs.\u0004w\u0010\u001eqWoRp0\u0018u@~Fs.\u0004w\t\baJ\u007fke\u0004\u001ef$>|A;wa%\u000fzP;hfw\u000b4Gsnl3JgKwrt>\u0005z\u0004pntwM\b\baJ\u007fke$D\u0003\rqP\u0013\t|AxlF2\u000b`QibE9\u000bvH~c\t\u001fzMutt6\u0006x\u0004\f}J\u007f\u0004\u001emT~\n:fKkbr#\u0003qW\u000f\u001fzMutt6\u0006xfnid;\u000f\u0002M.4\t{I4k7#\u000fwL4te%\u001cqV4to;\u001f`Mtik>\u001e;wtku#\u0003{JPnt\u0016\u000eyMuOe;\u001aqV\f\u0003zWofl;+g]ud\b:fKkbr#\u001339\u007fMkwi9\r4Izwp>\u0004s\u0004xhn#\u000b}Jrigw\u000bz\u0004~ur8\u0018.\u0004~ur8\u0018@]kb jJ3\u0004\r{M\u007f\u000b\f}J\u007fOe6\u000eqVh \u001fd@zse\u0012\u0004`Mo~O \u0004qVhoi'.qWxui'\u001e{Vh\u0006V}Jrs>\u0015\u0019{Hnsi8\u0004_MoNm'\u0005fPRif8\b\u001euV|bt\u001e\u000e\t\u001fzMutt6\u0006x\u000e\u0006}G~is2'uJz`e%\u0007\u001fdCifd2\u0004\raM\u007f\u000b\u000bwPrhn\u0003\u000b\u007fAu$?zV~do0\u0004}^~c \u0005/GpVFNw\u0018qWnktw\u000bwPrhnwM\u0013\baJ\u007fke$F4Fns 1\u0005aJ\u007f'\u0007\u0003zWofl;\u0011M4@tbsw\u0004{P;bx>\u0019`\n\u000b\u0019{Hnsi8\u0004_Mo\u0018\rqPHhl\"\u001e}KuLi#\u0019@KNwg%\u000bpA\f\u001fdCifd2+g]ud\u000e\u001fzMutt6\u0006xeh~n4\u0003\u0001q]\u000bM:\u0004^it>\u001em\u00043\u0004\u0019uR~\u0007\u001fdCifd2\u0002#p**ZKoIu;\u00064I~sh8\u000e4\u0001h)%$JyQhs 9\u0005`\u0004ibt\"\u0018z\u0004url;\u0007\u0003zWofl;,C4Klie%\u0019|Mk'i9\f{Vvft>\u0005z\u0004xfn9\u0005`\u0004yb '\u0018{G~ts2\u000e:[,uMwbdw\u001e{\u0004ibs2\u001e4V~fd8\u0004x]6ie$\u00194Btu 4\u0018qEobdw\u000bz@;rp3\u000b`A\u007f'e9\u001e}Prbsw\u0004{P;ee;\u0005zCrigw\u001e{\u0004ooi$JgOzu:w0/zPrsy\u0018\u001dzAith>\u001aPAhdr>\u001a`Ki= \u0013\u001fdHrda#\u000f4Ausi#\u00134M\u007f= \u0006\baJ\u007fke'\u001fd@zse\u0002\u0004}Jhsa;\u0006VQucl2(mw~st>\u0004spzug2\u001e]@h\u000b9`Vrig\u0001\u000bxQ~\u000b\u001eqWoRp0\u0018u@~\u0012\u0019{Hnsi8\u0004_MoJa9\u000bsAi\u001d\u0003pAusi#\u0013DVtqi3\u000ffgtif>\rYEufg2\u00183/fVtu 8\u00044Brid>\u0004s\u0004zi >\u000eqJont.JdVtqi3\u000ff\u0004lnt?JSkRC jJ3\u000f\u0019{Hnsi8\u0004_Mo@u>\u000e\u0011\u0018qWnkt\u001a\u000bdTrig$9`V\u0004\u001emT~\u000e\u0018qWnkt\u001a\u000bdTrig$\u001d#zRzki3JYEkwi9\r4Exsi8\u0004@EpbnwM\u000b\u001eqWoRp0\u0018u@~\u000b\f}J\u007fOe6\u000eqVh\t\u000ffVtuT.\u001aq\b\u001euV|bt\u001e\u000e\t\u000ffVtuT.\u001aq\u00129_{Hfv2\u000eQJont.$uI~>+fCnje9\u001e4Btu \u0017${PUrl;JdEifm2\u001eqV; %$M4K}'%$D1W;ju$\u001e4Jts 5\u000f4Jnkl4\t{I4k7#\u000fwL4te%\u001cqV4to;\u001f`Mtik>\u001e;wtku#\u0003{JPnt\u0016\u000eyMuOe;\u001aqV";
                var4_3 = "\u0019uR~\u000b\u001eqWoNn$\u001euHw\u0006\u001fd@zse\u0006\u000eqH~se\u0004\f}J\u007f&J}W;rn;\u0003wAute3D4\u0004Ibq\"\u0003fA\u007f'f2\u000b`Qib $\u000f`\u0004\u000b\u000bwPrhn\u0003\u000b\u007fAu\u0005\u0019fGRc\n\u001auV~it\u0010\u0005}@/\u0002`Pk=/x\u0004g\nw0t2\t|\nxhmxX$\u0015+(0cEsEobw6\u00139Izia0\u000fyAus\u0004$uI~\n:fKkbr#\u0003qW\u0010/fVtu:w/lT~dt2\u000e4\u000b\u001eqWoNn$\u001euHw/\u0002`Pk=/x\u0004g\nw0t2\t|\nxhmxX$\u0015+(0cEsEobw6\u00139Izia0\u000fyAus\u0006\u000bwPrhn\u0010\u001eqWoNn$\u001euHwFs.\u0004w\u0010\u001eqWoRp0\u0018u@~Fs.\u0004w\t\baJ\u007fke\u0004\u001ef$>|A;wa%\u000fzP;hfw\u000b4Gsnl3JgKwrt>\u0005z\u0004pntwM\b\baJ\u007fke$D\u0003\rqP\u0013\t|AxlF2\u000b`QibE9\u000bvH~c\t\u001fzMutt6\u0006x\u0004\f}J\u007f\u0004\u001emT~\n:fKkbr#\u0003qW\u000f\u001fzMutt6\u0006xfnid;\u000f\u0002M.4\t{I4k7#\u000fwL4te%\u001cqV4to;\u001f`Mtik>\u001e;wtku#\u0003{JPnt\u0016\u000eyMuOe;\u001aqV\f\u0003zWofl;+g]ud\b:fKkbr#\u001339\u007fMkwi9\r4Izwp>\u0004s\u0004xhn#\u000b}Jrigw\u000bz\u0004~ur8\u0018.\u0004~ur8\u0018@]kb jJ3\u0004\r{M\u007f\u000b\f}J\u007fOe6\u000eqVh \u001fd@zse\u0012\u0004`Mo~O \u0004qVhoi'.qWxui'\u001e{Vh\u0006V}Jrs>\u0015\u0019{Hnsi8\u0004_MoNm'\u0005fPRif8\b\u001euV|bt\u001e\u000e\t\u001fzMutt6\u0006x\u000e\u0006}G~is2'uJz`e%\u0007\u001fdCifd2\u0004\raM\u007f\u000b\u000bwPrhn\u0003\u000b\u007fAu$?zV~do0\u0004}^~c \u0005/GpVFNw\u0018qWnktw\u000bwPrhnwM\u0013\baJ\u007fke$F4Fns 1\u0005aJ\u007f'\u0007\u0003zWofl;\u0011M4@tbsw\u0004{P;bx>\u0019`\n\u000b\u0019{Hnsi8\u0004_Mo\u0018\rqPHhl\"\u001e}KuLi#\u0019@KNwg%\u000bpA\f\u001fdCifd2+g]ud\u000e\u001fzMutt6\u0006xeh~n4\u0003\u0001q]\u000bM:\u0004^it>\u001em\u00043\u0004\u0019uR~\u0007\u001fdCifd2\u0002#p**ZKoIu;\u00064I~sh8\u000e4\u0001h)%$JyQhs 9\u0005`\u0004ibt\"\u0018z\u0004url;\u0007\u0003zWofl;,C4Klie%\u0019|Mk'i9\f{Vvft>\u0005z\u0004xfn9\u0005`\u0004yb '\u0018{G~ts2\u000e:[,uMwbdw\u001e{\u0004ibs2\u001e4V~fd8\u0004x]6ie$\u00194Btu 4\u0018qEobdw\u000bz@;rp3\u000b`A\u007f'e9\u001e}Prbsw\u0004{P;ee;\u0005zCrigw\u001e{\u0004ooi$JgOzu:w0/zPrsy\u0018\u001dzAith>\u001aPAhdr>\u001a`Ki= \u0013\u001fdHrda#\u000f4Ausi#\u00134M\u007f= \u0006\baJ\u007fke'\u001fd@zse\u0002\u0004}Jhsa;\u0006VQucl2(mw~st>\u0004spzug2\u001e]@h\u000b9`Vrig\u0001\u000bxQ~\u000b\u001eqWoRp0\u0018u@~\u0012\u0019{Hnsi8\u0004_MoJa9\u000bsAi\u001d\u0003pAusi#\u0013DVtqi3\u000ffgtif>\rYEufg2\u00183/fVtu 8\u00044Brid>\u0004s\u0004zi >\u000eqJont.JdVtqi3\u000ff\u0004lnt?JSkRC jJ3\u000f\u0019{Hnsi8\u0004_Mo@u>\u000e\u0011\u0018qWnkt\u001a\u000bdTrig$9`V\u0004\u001emT~\u000e\u0018qWnkt\u001a\u000bdTrig$\u001d#zRzki3JYEkwi9\r4Exsi8\u0004@EpbnwM\u000b\u001eqWoRp0\u0018u@~\u000b\f}J\u007fOe6\u000eqVh\t\u000ffVtuT.\u001aq\b\u001euV|bt\u001e\u000e\t\u000ffVtuT.\u001aq\u00129_{Hfv2\u000eQJont.$uI~>+fCnje9\u001e4Btu \u0017${PUrl;JdEifm2\u001eqV; %$M4K}'%$D1W;ju$\u001e4Jts 5\u000f4Jnkl4\t{I4k7#\u000fwL4te%\u001cqV4to;\u001f`Mtik>\u001e;wtku#\u0003{JPnt\u0016\u000eyMuOe;\u001aqV".length();
                var1_4 = 4;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = SolutionKitAdminHelper.a(v0, SolutionKitAdminHelper.b(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "V*\u000b\r=+|X!\u00183\u000b2xY\n\u001145/u\u007f.\u0012%\u001d?hT++/\f)cA*\r45>\u007f\u0005B=\u001c\t8";
                    var4_3 = "V*\u000b\r=+|X!\u00183\u000b2xY\n\u001145/u\u007f.\u0012%\u001d?hT++/\f)cA*\r45>\u007f\u0005B=\u001c\t8".length();
                    var1_4 = 42;
                    var0_5 = -1;
lbl22:
                    // 2 sources

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

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

                ** continue;
            }
        }
        SolutionKitAdminHelper.f = var5;
        try {
            v5 = SolutionKitAdminHelper.class.desiredAssertionStatus() == false;
        }
        catch (UnsupportedOperationException v6) {
            throw SolutionKitAdminHelper.a(v6);
        }
        SolutionKitAdminHelper.e = v5;
        SolutionKitAdminHelper.a = Logger.getLogger(SolutionKitAdminHelper.class.getName());
    }

    /*
     * 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 Exception a(Exception exception) {
        return exception;
    }

    private static char[] b(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 9);
        }
        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 -> 52;
                    case 1 -> 74;
                    case 2 -> 122;
                    case 3 -> 69;
                    case 4 -> 89;
                    case 5 -> 94;
                    default -> 9;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

