/*
 * Decompiled with CFR 0.152.
 * 
 * Could not load the following classes:
 *  com.l7tech.common.io.XmlUtil
 *  com.l7tech.common.mime.NoSuchPartException
 *  com.l7tech.message.Message
 *  com.l7tech.objectmodel.folder.Folder
 *  com.l7tech.util.DomUtils
 *  com.l7tech.util.Functions$Unary
 *  com.l7tech.util.MissingRequiredElementException
 *  com.l7tech.util.Pair
 *  com.l7tech.util.TooManyChildElementsException
 *  com.l7tech.xml.xpath.XpathUtil
 *  org.apache.commons.lang3.StringUtils
 *  org.jetbrains.annotations.NotNull
 *  org.jetbrains.annotations.Nullable
 */
package com.l7tech.server.policy.bundle.ssgman.restman;

import com.l7tech.common.io.XmlUtil;
import com.l7tech.common.mime.NoSuchPartException;
import com.l7tech.message.Message;
import com.l7tech.objectmodel.folder.Folder;
import com.l7tech.server.bundling.EntityMappingInstructions;
import com.l7tech.server.policy.bundle.GatewayManagementDocumentUtilities;
import com.l7tech.util.DomUtils;
import com.l7tech.util.Functions;
import com.l7tech.util.MissingRequiredElementException;
import com.l7tech.util.Pair;
import com.l7tech.util.TooManyChildElementsException;
import com.l7tech.xml.xpath.XpathUtil;
import java.io.IOException;
import java.io.InputStream;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;

/*
 * Exception performing whole class analysis ignored.
 */
public class RestmanMessage {
    public static final String MAPPING_ACTION_PROP_KEY_FAIL_ON_EXISTING;
    public static final String MAPPING_ACTION_PROP_KEY_FAIL_ON_NEW;
    public static final String MAPPING_ACTION_ATTRIBUTE;
    public static final String MAPPING_ACTION_TAKEN_ATTRIBUTE;
    public static final String MAPPING_ERROR_TYPE_ATTRIBUTE;
    public static final String MAPPING_TYPE_ATTRIBUTE;
    public static final String MAPPING_SRC_ID_ATTRIBUTE;
    public static final String MAPPING_TARGET_ID_ATTRIBUTE;
    private static final String a;
    private static final String b;
    public static final String NODE_NAME_NAME;
    public static final String NODE_NAME_ID;
    public static final String NODE_NAME_PROPERTIES;
    public static final String NODE_NAME_PROPERTY;
    private static final String c;
    public static final String NODE_NAME_STRING_VALUE;
    private static final String d;
    public static final String NODE_ATTRIBUTE_NAME_KEY;
    private static final String e;
    private static final String f;
    private static final String g;
    public static final String MAPPING_PROPERTY_NAME_SK_SAVED_ENTITY_NAME;
    private List<Element> h;
    private List<Element> i;
    private List<Element> j;
    private List<Element> k;
    private List<Element> l;
    final Document m;
    private static final String[] n;

    public RestmanMessage(Document document) {
        this.m = document;
    }

    public RestmanMessage(Message message) throws IOException, NoSuchPartException, SAXException {
        this.m = XmlUtil.parse((InputStream)message.getMimeKnob().getEntireMessageBodyAsInputStream());
    }

    public RestmanMessage(String string) throws SAXException {
        this.m = XmlUtil.stringToDocument((String)string);
    }

    public boolean isErrorResponse() {
        return n[34].equals(this.m.getDocumentElement().getNodeName());
    }

    public boolean hasMappingError() {
        boolean bl2;
        try {
            if (this.h == null) {
                this.loadMappingErrors();
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        try {
            bl2 = this.h.size() > 0;
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        return bl2;
    }

    public boolean hasMappingErrorFromBundles() {
        boolean bl2;
        try {
            if (this.h == null) {
                this.loadMappingErrorsFromBundles();
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        try {
            bl2 = this.h.size() > 0;
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        return bl2;
    }

    public String getMappingErrorsAsString() throws IOException {
        try {
            if (this.h == null) {
                this.loadMappingErrors();
            }
        }
        catch (IOException iOException) {
            throw RestmanMessage.a(iOException);
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (Element element : this.h) {
            String[] stringArray = n;
            stringBuilder.append(element.getAttribute(stringArray[111]));
            stringBuilder.append(stringArray[94]);
            stringBuilder.append(element.getAttribute(stringArray[25]));
            stringBuilder.append(stringArray[45]);
            stringBuilder.append(element.getAttribute(stringArray[10]));
            stringBuilder.append(stringArray[29]);
            for (Element element2 : XpathUtil.findElements((Element)element, (String)stringArray[52], GatewayManagementDocumentUtilities.getNamespaceMap())) {
                stringBuilder.append(DomUtils.getTextValue((Element)element2));
            }
            stringBuilder.append(System.getProperty(n[69]));
        }
        return stringBuilder.toString();
    }

    public String getAllMappingErrorsDetail(Functions.Unary<String, String> unary) throws IOException {
        try {
            if (this.h == null) {
                this.loadMappingErrors();
            }
        }
        catch (IOException iOException) {
            throw RestmanMessage.a(iOException);
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (Element element : this.h) {
            stringBuilder.append(RestmanMessage.getSingleMappingErrorDetail(element, (String)unary.call((Object)element.getAttribute(n[4]))));
        }
        return stringBuilder.toString();
    }

    public static String getSingleMappingErrorDetail(Element element, String string) {
        StringBuilder stringBuilder;
        block11: {
            String string2;
            String string3;
            String[] stringArray;
            block10: {
                stringBuilder = new StringBuilder();
                stringArray = n;
                string3 = element.getAttribute(stringArray[19]);
                string2 = element.getAttribute(stringArray[10]);
                try {
                    stringBuilder.append(string3);
                    stringBuilder.append(stringArray[68]).append(element.getAttribute(stringArray[25]));
                    stringBuilder.append(stringArray[27]).append(string);
                    stringBuilder.append(stringArray[77]);
                    if (!stringArray[112].equals(string3)) break block10;
                    stringBuilder.append(stringArray[9]);
                    break block11;
                }
                catch (RuntimeException runtimeException) {
                    throw RestmanMessage.a(runtimeException);
                }
            }
            stringArray = n;
            stringBuilder.append(stringArray[49]).append(string2);
            stringBuilder.append(stringArray[77]);
            StringBuilder stringBuilder2 = new StringBuilder();
            for (Element element2 : XpathUtil.findElements((Element)element, (String)stringArray[104], GatewayManagementDocumentUtilities.getNamespaceMap())) {
                try {
                    if (stringBuilder2.length() > 0) {
                        stringBuilder2.append(" ");
                    }
                }
                catch (RuntimeException runtimeException) {
                    throw RestmanMessage.a(runtimeException);
                }
                stringBuilder2.append(DomUtils.getTextValue((Element)element2));
            }
            stringArray = n;
            if (stringArray[85].equals(string3)) {
                block12: {
                    String string4 = stringArray[91];
                    try {
                        if (!stringBuilder2.toString().startsWith(string4)) break block12;
                        stringBuilder.append(string4).append(stringArray[35]);
                        break block11;
                    }
                    catch (RuntimeException runtimeException) {
                        throw RestmanMessage.a(runtimeException);
                    }
                }
                stringBuilder.append(stringBuilder2.toString());
            } else {
                stringBuilder.append(stringBuilder2.toString());
            }
        }
        stringBuilder.append(System.getProperty(n[92]));
        return stringBuilder.toString();
    }

    public List<Element> getMappingErrors() throws IOException {
        try {
            if (this.h == null) {
                this.loadMappingErrors();
            }
        }
        catch (IOException iOException) {
            throw RestmanMessage.a(iOException);
        }
        return this.h;
    }

    @NotNull
    public List<Element> getMappings() {
        List<Element> list;
        block7: {
            try {
                try {
                    if (this.k != null && !this.k.isEmpty()) break block7;
                }
                catch (RuntimeException runtimeException) {
                    throw RestmanMessage.a(runtimeException);
                }
                this.loadMappings();
            }
            catch (RuntimeException runtimeException) {
                throw RestmanMessage.a(runtimeException);
            }
        }
        try {
            list = this.k;
            if (list == null) {
                RestmanMessage.a(0);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        return list;
    }

    public String getAsFormattedString() throws IOException {
        return XmlUtil.nodeToFormattedString((Node)this.m);
    }

    public String getAsString() throws IOException {
        return XmlUtil.nodeToString((Node)this.m);
    }

    public String getBundleXml() throws IOException {
        try {
            if (this.i == null) {
                this.loadBundles();
            }
        }
        catch (IOException iOException) {
            throw RestmanMessage.a(iOException);
        }
        StringBuilder stringBuilder = new StringBuilder();
        for (Element element : this.i) {
            RestmanMessage.setL7XmlNs(element);
            stringBuilder.append(XmlUtil.nodeToFormattedString((Node)element));
        }
        return stringBuilder.toString();
    }

    public List<Element> getBundleReferenceItems() {
        try {
            if (this.l == null) {
                this.loadBundleReferenceItems();
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        return this.l;
    }

    public boolean hasRootFolderItem() {
        boolean bl2;
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[78] + e + stringArray[57]), GatewayManagementDocumentUtilities.getNamespaceMap());
        try {
            bl2 = list.size() == 1;
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        return bl2;
    }

    public boolean hasRootFolderMapping() {
        boolean bl2;
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[54] + e + stringArray[83]), GatewayManagementDocumentUtilities.getNamespaceMap());
        try {
            bl2 = list.size() == 1;
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        return bl2;
    }

    public static Element setL7XmlNs(@NotNull Element element) {
        try {
            if (element == null) {
                RestmanMessage.a(1);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        String[] stringArray = n;
        element.setAttributeNS(stringArray[7], stringArray[2], GatewayManagementDocumentUtilities.getNamespaceMap().get(stringArray[105]));
        return element;
    }

    public List<String> getResourceSetPolicies() throws IOException {
        try {
            if (this.j == null) {
                this.loadResourceSetPolicies();
            }
        }
        catch (IOException iOException) {
            throw RestmanMessage.a(iOException);
        }
        ArrayList<String> arrayList = new ArrayList<String>(this.j.size());
        for (Element element : this.j) {
            arrayList.add(element.getFirstChild().getTextContent());
        }
        return arrayList;
    }

    public List<Element> getResourceSetPolicyElements() {
        try {
            if (this.j == null) {
                this.loadResourceSetPolicies();
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        return this.j;
    }

    public String getResourceSetPolicy(@NotNull String string) throws IOException {
        try {
            if (string == null) {
                RestmanMessage.a(2);
            }
        }
        catch (IOException iOException) {
            throw RestmanMessage.a(iOException);
        }
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[78] + string + stringArray[31]), GatewayManagementDocumentUtilities.getNamespaceMap());
        try {
            if (list.size() > 0) {
                return DomUtils.getTextValue((Element)((Element)list.get(0))).trim();
            }
        }
        catch (IOException iOException) {
            throw RestmanMessage.a(iOException);
        }
        return null;
    }

    public String getEntityName(@NotNull String string) {
        try {
            if (string == null) {
                RestmanMessage.a(3);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[78] + string + stringArray[81]), GatewayManagementDocumentUtilities.getNamespaceMap());
        if (list.size() > 0) {
            String string2 = DomUtils.getTextValue((Element)((Element)list.get(0)));
            try {
                if (StringUtils.isEmpty((CharSequence)string2)) {
                    return stringArray[15];
                }
            }
            catch (RuntimeException runtimeException) {
                throw RestmanMessage.a(runtimeException);
            }
            return string2.trim();
        }
        return n[70];
    }

    public String getEntityType(@NotNull String string) {
        try {
            if (string == null) {
                RestmanMessage.a(4);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[74] + string + stringArray[43]), GatewayManagementDocumentUtilities.getNamespaceMap());
        if (list.size() > 0) {
            String string2 = ((Element)list.get(0)).getAttribute(stringArray[62]);
            try {
                if (StringUtils.isEmpty((CharSequence)string2)) {
                    return null;
                }
            }
            catch (RuntimeException runtimeException) {
                throw RestmanMessage.a(runtimeException);
            }
            return string2.trim();
        }
        return null;
    }

    public String getServiceUrl(@NotNull String string) {
        try {
            if (string == null) {
                RestmanMessage.a(5);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[73] + string + stringArray[65]), GatewayManagementDocumentUtilities.getNamespaceMap());
        if (list.size() > 0) {
            String string2 = ((Element)list.get(0)).getTextContent();
            try {
                if (StringUtils.isBlank((CharSequence)string2)) {
                    return null;
                }
            }
            catch (RuntimeException runtimeException) {
                throw RestmanMessage.a(runtimeException);
            }
            return string2.trim();
        }
        return null;
    }

    public Set<String> getMappingsFailOnNewFolders() throws IOException, TooManyChildElementsException, MissingRequiredElementException {
        try {
            if (this.k == null) {
                this.loadMappings();
            }
        }
        catch (IOException iOException) {
            throw RestmanMessage.a(iOException);
        }
        HashSet<String> hashSet = new HashSet<String>();
        block10: for (Element element : this.k) {
            try {
                try {
                    if (e.equals(element.getAttribute(n[10])) || !n[24].equals(element.getAttribute(n[25]))) continue;
                }
                catch (IOException iOException) {
                    throw RestmanMessage.a(iOException);
                }
                if (!n[110].equals(element.getAttribute(n[87]))) continue;
            }
            catch (IOException iOException) {
                throw RestmanMessage.a(iOException);
            }
            String[] stringArray = n;
            List list = DomUtils.findChildElementsByName((Element)element, (String)stringArray[1], (String)stringArray[36]);
            try {
                if (list.size() == 0) {
                    continue;
                }
            }
            catch (IOException iOException) {
                throw RestmanMessage.a(iOException);
            }
            stringArray = n;
            Element element2 = DomUtils.findExactlyOneChildElementByName((Element)element, (String)stringArray[1], (String)stringArray[36]);
            Iterator iterator = DomUtils.findChildElementsByName((Element)element2, (String)stringArray[1], (String)stringArray[39]).iterator();
            while (iterator.hasNext()) {
                stringArray = n;
                Element element3 = (Element)iterator.next();
                if (!stringArray[86].equals(element3.getAttribute(stringArray[50]))) continue;
                Element element4 = DomUtils.findExactlyOneChildElementByName((Element)element3, (String)stringArray[1], (String)stringArray[37]);
                try {
                    if (!stringArray[95].equals(element4.getTextContent())) continue;
                    hashSet.add(element.getAttribute(stringArray[20]));
                    continue block10;
                }
                catch (IOException iOException) {
                    throw RestmanMessage.a(iOException);
                }
            }
        }
        return hashSet;
    }

    public void replaceFailOnNewFolderMapping(String string, RestmanMessage restmanMessage) throws TooManyChildElementsException, MissingRequiredElementException {
        Element element;
        Element element2;
        String[] stringArray;
        try {
            if (this.k == null) {
                this.loadMappings();
            }
        }
        catch (TooManyChildElementsException tooManyChildElementsException) {
            throw RestmanMessage.a((Exception)((Object)tooManyChildElementsException));
        }
        Element element3 = null;
        for (Element object2 : this.k) {
            if (!string.equals(object2.getAttribute((stringArray = n)[60]))) continue;
            element3 = object2;
            break;
        }
        try {
            if (element3 == null) {
                throw new RuntimeException(n[61]);
            }
        }
        catch (TooManyChildElementsException tooManyChildElementsException) {
            throw RestmanMessage.a((Exception)((Object)tooManyChildElementsException));
        }
        stringArray = n;
        Element element4 = DomUtils.findExactlyOneChildElementByName(element3, (String)stringArray[66], (String)stringArray[79]);
        Iterator iterator = DomUtils.findChildElementsByName((Element)element4, (String)stringArray[1], (String)stringArray[22]).iterator();
        while (iterator.hasNext()) {
            stringArray = n;
            element2 = (Element)iterator.next();
            if (!stringArray[71].equals(element2.getAttribute(stringArray[56]))) continue;
            element = DomUtils.findExactlyOneChildElementByName((Element)element2, (String)stringArray[1], (String)stringArray[26]);
            try {
                if (!stringArray[64].equals(element.getTextContent())) continue;
                element4.removeChild(element2);
                break;
            }
            catch (TooManyChildElementsException tooManyChildElementsException) {
                throw RestmanMessage.a((Exception)((Object)tooManyChildElementsException));
            }
        }
        stringArray = n;
        Element element5 = (Element)XpathUtil.findElements((Element)restmanMessage.m.getDocumentElement(), (String)stringArray[106], GatewayManagementDocumentUtilities.getNamespaceMap()).get(0);
        DomUtils.removeChildElementsByName((Element)element5, (String)stringArray[1], (String)stringArray[32]);
        element2 = (Element)XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)stringArray[33], GatewayManagementDocumentUtilities.getNamespaceMap()).get(0);
        element = DomUtils.findExactlyOneChildElementByName((Element)element2, (String)stringArray[1], (String)stringArray[82]);
        Node node = this.m.importNode(element5, true);
        element.insertBefore(node, element.getFirstChild());
        this.i = null;
    }

    public void setMappingAction(@NotNull String string, @NotNull EntityMappingInstructions.MappingAction mappingAction, @Nullable Properties properties) {
        try {
            if (string == null) {
                RestmanMessage.a(6);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        try {
            if (mappingAction == null) {
                RestmanMessage.a(7);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[5] + string + stringArray[13]), GatewayManagementDocumentUtilities.getNamespaceMap());
        if (list.size() > 0) {
            Element element = (Element)list.get(0);
            element.setAttribute(stringArray[93], mappingAction.toString());
            if (properties != null) {
                Element element2 = DomUtils.findFirstChildElementByName((Node)element, (String)stringArray[1], (String)stringArray[36]);
                if (element2 == null) {
                    element2 = DomUtils.createAndAppendElement((Element)element, (String)stringArray[36]);
                }
                for (Map.Entry<Object, Object> entry : properties.entrySet()) {
                    String string2;
                    Element element3;
                    String string3;
                    String string4;
                    Element element4;
                    block18: {
                        String string5;
                        String string6;
                        Element element5;
                        block20: {
                            block19: {
                                try {
                                    try {
                                        if (!n[40].equals(entry.getKey())) break block18;
                                        element5 = element;
                                        string6 = n[100];
                                        if (entry.getValue() != null) break block19;
                                    }
                                    catch (RuntimeException runtimeException) {
                                        throw RestmanMessage.a(runtimeException);
                                    }
                                    string5 = null;
                                    break block20;
                                }
                                catch (RuntimeException runtimeException) {
                                    throw RestmanMessage.a(runtimeException);
                                }
                            }
                            string5 = entry.getValue().toString();
                        }
                        element5.setAttribute(string6, string5);
                        continue;
                    }
                    stringArray = n;
                    Element element6 = DomUtils.createAndAppendElement((Element)element2, (String)stringArray[39]);
                    try {
                        element4 = element6;
                        string4 = stringArray[50];
                        string3 = entry.getKey() == null ? null : entry.getKey().toString();
                    }
                    catch (RuntimeException runtimeException) {
                        throw RestmanMessage.a(runtimeException);
                    }
                    element4.setAttribute(string4, string3);
                    Element element7 = DomUtils.createAndAppendElement((Element)element6, (String)n[37]);
                    try {
                        element3 = element7;
                        string2 = entry.getValue() == null ? null : entry.getValue().toString();
                    }
                    catch (RuntimeException runtimeException) {
                        throw RestmanMessage.a(runtimeException);
                    }
                    element3.setTextContent(string2);
                }
            }
        }
    }

    public void setRootFolderMappingTargetId(String string) {
        try {
            if (e.equals(string)) {
                return;
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[103] + e + stringArray[13]), GatewayManagementDocumentUtilities.getNamespaceMap());
        if (list.size() > 0) {
            Element element = (Element)list.get(0);
            element.setAttribute(stringArray[100], string);
        }
    }

    public void addRootFolderMapping(String string) {
        Element element;
        try {
            if (e.equals(string)) {
                return;
            }
        }
        catch (SAXException sAXException) {
            throw RestmanMessage.a(sAXException);
        }
        String[] stringArray = n;
        String string2 = MessageFormat.format(stringArray[102], string);
        try {
            element = XmlUtil.stringToDocument((String)string2).getDocumentElement();
        }
        catch (SAXException sAXException) {
            throw new RuntimeException(sAXException);
        }
        element = (Element)this.m.importNode(element, true);
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[23], GatewayManagementDocumentUtilities.getNamespaceMap());
        try {
            if (list.size() != 1) {
                return;
            }
        }
        catch (SAXException sAXException) {
            throw RestmanMessage.a(sAXException);
        }
        Element element2 = (Element)list.get(0);
        Element element3 = DomUtils.findFirstChildElement((Element)element2);
        element2.insertBefore(element, element3);
    }

    public Pair<EntityMappingInstructions.MappingAction, Properties> getMappingAction(@NotNull String string) {
        try {
            if (string == null) {
                RestmanMessage.a(8);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        Pair pair = null;
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[103] + string + stringArray[13]), GatewayManagementDocumentUtilities.getNamespaceMap());
        if (list.size() > 0) {
            Element element = (Element)list.get(0);
            Element element2 = DomUtils.findFirstChildElementByName((Node)element, (String)stringArray[1], (String)stringArray[36]);
            if (element2 == null) {
                pair = new Pair((Object)EntityMappingInstructions.MappingAction.valueOf(element.getAttribute(stringArray[87])), null);
            } else {
                Properties properties = new Properties();
                stringArray = n;
                for (Element element3 : DomUtils.findChildElementsByName((Element)element2, (String)stringArray[1], (String)stringArray[39])) {
                    stringArray = n;
                    properties.put(element3.getAttribute(stringArray[50]), DomUtils.getTextValue((Element)DomUtils.findFirstChildElement((Element)element3)));
                }
                pair = new Pair((Object)EntityMappingInstructions.MappingAction.valueOf(element.getAttribute(n[87])), (Object)properties);
            }
        }
        return pair;
    }

    public void removeMappingByEntityType(@NotNull String string) {
        try {
            if (string == null) {
                RestmanMessage.a(9);
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        String[] stringArray = n;
        List list = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)stringArray[108], GatewayManagementDocumentUtilities.getNamespaceMap());
        try {
            if (list.size() != 1) {
                return;
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        Element element = (Element)list.get(0);
        stringArray = n;
        List list2 = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)(stringArray[42] + string + stringArray[13]), GatewayManagementDocumentUtilities.getNamespaceMap());
        for (Element element2 : list2) {
            element.removeChild(element2);
        }
    }

    public static boolean isMarkedAsReadOnly(@NotNull Element element) {
        boolean bl2;
        block11: {
            block10: {
                try {
                    if (element == null) {
                        RestmanMessage.a(10);
                    }
                }
                catch (RuntimeException runtimeException) {
                    throw RestmanMessage.a(runtimeException);
                }
                List list = XpathUtil.findElements((Element)element, (String)n[67], GatewayManagementDocumentUtilities.getNamespaceMap());
                try {
                    if (list.size() < 1) {
                        return false;
                    }
                }
                catch (RuntimeException runtimeException) {
                    throw RestmanMessage.a(runtimeException);
                }
                Element element2 = (Element)list.get(0);
                try {
                    try {
                        if (element2 == null || !Boolean.valueOf(element2.getTextContent()).booleanValue()) break block10;
                    }
                    catch (RuntimeException runtimeException) {
                        throw RestmanMessage.a(runtimeException);
                    }
                    bl2 = true;
                    break block11;
                }
                catch (RuntimeException runtimeException) {
                    throw RestmanMessage.a(runtimeException);
                }
            }
            bl2 = false;
        }
        return bl2;
    }

    protected void loadMappingErrors() {
        this.h = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[48], GatewayManagementDocumentUtilities.getNamespaceMap());
    }

    protected void loadMappingErrorsFromBundles() {
        this.h = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[97], GatewayManagementDocumentUtilities.getNamespaceMap());
    }

    protected void loadMappings() {
        try {
            this.k = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[72], GatewayManagementDocumentUtilities.getNamespaceMap());
            if (this.k.isEmpty()) {
                this.k = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[44], GatewayManagementDocumentUtilities.getNamespaceMap());
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
        try {
            if (this.k.isEmpty()) {
                this.k = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[80], GatewayManagementDocumentUtilities.getNamespaceMap());
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
    }

    protected void loadResourceSetPolicies() {
        this.j = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[59], GatewayManagementDocumentUtilities.getNamespaceMap());
    }

    protected void loadBundles() {
        try {
            this.i = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[89], GatewayManagementDocumentUtilities.getNamespaceMap());
            if (this.i.isEmpty()) {
                this.i = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[58], GatewayManagementDocumentUtilities.getNamespaceMap());
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
    }

    protected void loadBundleReferenceItems() {
        try {
            this.l = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[3], GatewayManagementDocumentUtilities.getNamespaceMap());
            if (this.l.isEmpty()) {
                this.l = XpathUtil.findElements((Element)this.m.getDocumentElement(), (String)n[8], GatewayManagementDocumentUtilities.getNamespaceMap());
            }
        }
        catch (RuntimeException runtimeException) {
            throw RestmanMessage.a(runtimeException);
        }
    }

    /*
     * Unable to fully structure code
     */
    static {
        block10: {
            block9: {
                var5 = new String[113];
                var3_1 = 0;
                var2_2 = "wRqC\u001a$\u001dq^tC\u0005v\u001bbXnC\u0006|\u0005}^eC\u0014f\u0007pQyC\u0005`\u000ey\\rC\u0004v\u001a`P}\u0002YA\fgIq\r\u0018^\fgN}\u000b\u0013/|Ih\u001cL<FzN2\u0000Ag\fwU2\u000f\u0019~F&\r-\\Y#];Z}\u0018\u0013d\bm\u0010q\r\u0018r\u000eqPy\u0002\u0002\blPp\u0002\u0005)\u0005#4;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&.\u0003}\rxX3\u0000A);q[y\u001e\u0013}\nqN3\u0000A) `Xq\u0005gO\u007f%\u0012*;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011H)gO\u007f%\u0012.K\u0015`R^\t$v\u0004{Ky\b3}\u001d}Ie8\u000fc\f\u001d|Ih\u001cL<FcJkB\u0001 G{O{CD#Y$\u0012d\u0001\u001a}\u001a; ;Q+V4f\u0007pQyC\u001a$SFXz\t\u0004v\u0007wXoC\u001a$S]Iy\u0001\u000euQn\t\u0017w\u00104Xd\u0005\u0005g\u001a\u0005gO\u007f%\u0012\u0019fXq\u0003\u0000v$uMl\u0005\u0018t+mxr\u0018\u001fg\u0010@Dl\t\u0014sXh>\u0013`\u0006aO\u007f\t%v\u001dDRp\u0005\u0015j\u00026`\u0010gXh!\u0017c\u0019}S{-\u0015g\u0000{S\u0003Z\u0012]\blPp\u0002\u0005)\u0005#*Tss\u00188f\u0005x\u001dq\t\u0002{\u0006p\u001d9\u001fX6\u001a4Pi\u001f\u00023\u0007{I<\u001e\u0013g\u001cfS<\u0002\u0003\u007f\u0005\u0002}Y\tqOn\u0003\u0004G\u0010dX\u0006gO\u007f9\u0004z\u0007qQy\u0001\u0013}\u001d\bDOs\u001c\u0013a\u001dm\u0016;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0006RrP(3A\u0004`Dl\t\fVRs\u0000\u0013r\u0007B\\p\u0019\u0013\u00078\u001dr\r\u001bvT\u0004Z\\q\t\u00028\u001d\u0161(Q+V;r\u0019dTr\u000bVk\u0004xSoV\u001a$T6Uh\u0018\u0006)F;SoB\u001a$\u001dq^tB\u0015|\u0004;\u000f,]F<Y \u0012{\r\u0002v\u001euD1\u0001\u0017}\bsXq\t\u0018gK4\\\u007f\u0018\u001f|\u0007)\u001fR\t\u0001\\\u001bQEu\u001f\u0002z\u0007s\u001f<\u001f\u0004p p\u0000>\\F#Y$\r,\\F#Y$\r,\\Fu\u000fr[z\n\u0010u\u000fr[z\t\u0015$_6\u001do\u001e\u0015F\u001b}\u0000>CG=Y;[s\u0000\u0012v\u001bg\u0012,\\F#Y$\r,\\F#Y$\r,\\\u0010u\u000fr[z\n\u0010u\u000fr[y\u000fA%K4I}\u001e\u0011v\u001d]Y!N\r#\u00146\u001dh\u0015\u0006vT6{S 2V;6\u0003\u0016LV3I4\u0001p[LC\u001b{My\u001e\u0002z\fg\u0003 \u0000A)9fRl\t\u0004g\u00104Vy\u0015K1/uTp#\u0018]\fc\u001f\"P\u001a$SVRs\u0000\u0013r\u0007B\\p\u0019\u0013-\u001dfHyPY\u007f^.\u007fs\u0003\u001av\bzk}\u0000\u0003vW(\u0012p[LC\u001b{My\u001e\u0002jW(\u0012p[LC\u001b{My\u001e\u0002z\fg\u0003\u0016PY\u007f^.p}\u001c\u0006z\u0007s\u0003\u0016?3`3\u0000A);qNs\u0019\u0004p\f;^t\u0005\u001awS.\u00173\u0000A);qNs\u0019\u0004p\fg\u0012p[LA\fgRi\u001e\u0015v:qI3\u0000A);qNs\u0019\u0004p\f\u0004XTr\u0007\u001e;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&.\u0003}\rxX\bx\n&)\u0004a\u0006f\f4TrL\u0012r\u001du_}\u001f\u0013\nDOs\u001c\u0013a\u001d}Xo\fVRs\u0000\u0013r\u0007B\\p\u0019\u0013\u000bsXh!\u0017c\u0019}S{\u001f\bDOs\u001c\u0013a\u001dm\b`\\n\u000b\u0013g p\u000bGIn\u0005\u0018t?uQi\t);Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011H)`Dl\tK1\u00026`+;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&!\u0017c\u0019}S{\u001fY\u007f^.p}\u001c\u0006z\u0007s\b8\u001do\u001e\u0015Z\r)\u0010sXh!\u0017c\u0019}S{-\u0015g\u0000{S\tgXn\u001a\u001fp\f]Y8;\u0012p[LZ\u001dqP3\u0000A);qNs\u0019\u0004p\f;Q+V;r\u0019dTr\u000b\u0005<\u0005#\u0007Q\r\u0006c\u0000zZG,\u0013a\u001b{OH\u0015\u0006v4\u0006gO\u007f%\u0012.\u0003\u007fXe\u0012GvC?\u0017e\fpxr\u0018\u001fg\u0010Z\\q\t(x\n&<\u0004|\u0019qOh\u0005\u0013`Fx\n&<\u0004|\u0019qOh\u0015Y\u007f^.nh\u001e\u001f}\u000eB\\p\u0019\u0013\u0011GvC>\u0013r\r[Sp\u00153}\u001d}Ie*;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011H)gO\u007f%\u0012.N\rsXh)\u0018g\u0000`DH\u0015\u0006v\u0003\u007fXe\t3`3C\u001a$S]Y\n;Q+V4f\u0007pQy9;\u0012p[LA\fgRi\u001e\u0015v\u001a;Q+V$v\u001a{Hn\u000f\u0013@\f`\u0012p[LA\fgRi\u001e\u0015v2TIe\u001c\u0013.KdRp\u0005\u0015jKI\u0006gO\u007f9\u0004z\u0019RRp\b\u0013aIy\\l\u001c\u001f}\u000e4Ss\u0018Vu\u0006aSxB\u0004`Dl\t\u000bu^h\u0005\u0019}=uVy\u0002\u0004`Oi\t\u001c3`3\b\u0013`\nqSx\r\u0018gS.Q+V#a\u0005D\\h\u0018\u0013a\u0007/|Ih\u001cL<FzN2\u0000Ag\fwU2\u000f\u0019~F&\r-\\Y#];Z}\u0018\u0013d\bm\u0010q\r\u0018r\u000eqPy\u0002\u0002F:\u00123\u0000A)9fRl\t\u0004g\u0000qN3\u0000A)9fRl\t\u0004g\u0010O}w\t\u000f.NGvC>\u0013r\r[Sp\u00153}\u001d}IeK+<\u0005#\u0007^\u0003\u0019\u007f\fuSJ\r\u001af\f\u0007.\u001dh\u0015\u0006vT\u000exTr\tX`\fd\\n\r\u0002|\u001b\u0003Z\u0012]\tR\\u\u00009}'qJ5;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&.\u0003}\rxX3\u0000A)$uMl\u0005\u0018t\u001a;Q+V;r\u0019dTr\u000b);\u0012p[LQ\u001czYp\tY\u007f^.oy\n\u0013a\fz^y\u001fY\u007f^.th\t\u001bH\u0005#\u0007U\bK4+;\u0012p[LQ\u001czYp\tY\u007f^.p}\u001c\u0006z\u0007sN3\u0000A)$uMl\u0005\u0018t2TNn\u000f?wT6\u0002x\n\rsXh)\u0018g\u0000`DR\r\u001bv\u00028\u001d);\u0012p[LQ\u001czYp\tY\u007f^.oy\n\u0013a\fz^y\u001fY\u007f^.th\t\u001bH\u0005#\u0007U\bK4\nDOs\u001c\u0013a\u001d}Xo!;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011\n3`3\u0000A)'uPy\nFXz\t\u0004v\u0007wXo\u00023`\u000eR\\u\u00009},lTo\u0018\u001f}\u000e\u000f]Sj\r\u001az\rFXo\u0003\u0003a\nq\tR\\u\u00009}'qJ\u0006u^h\u0005\u0019}=wRqC\u001a$\u001dq^tC\u0005v\u001bbXnC\u0006|\u0005}^eC\u0014f\u0007pQyC\u0005`\u000ey\\rC\u0004v\u001a`P}\u0002YA\fgIq\r\u0018^\fgN}\u000b\u0013\u001e;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&.\u0003}\rxX\u0002]Y@W\\r\u0002\u0019gIuYxL\u0019aIaMx\r\u0002vIu\u001d\u007f\u0004\u001f\u007f\r4Os\u001bL3\b4[s\u001e\u0013z\u000ez\u001dw\t\u000f3\n{So\u0018\u0004r\u0000zI<\n\u0017z\u0005g\u000exTr\tX`\fd\\n\r\u0002|\u001b\u0006u^h\u0005\u0019}\u0007.\u001dh\u0015\u0006vT\u0004`Oi\t>UO{\u0019\u001bv\u0007`\u001dz\u0003\u00043)ZRh\"\u0003\u007f\u00054M}\u001e\u0017~\f`XnLQ6\u001a3\u001ds\nV6\u001a:\u0018oL\u001bf\u001a`\u001dr\u0003\u00023\u000bq\u001dr\u0019\u001a\u007f@;\u0012p[L_\u0000gI3\u0000A) `XqC\u001a$SFXo\u0003\u0003a\nq\u0012p[L^\bdMu\u0002\u0011`Fx\n&!\u0017c\u0019}S{76v\u001bfRn8\u000fc\fI\bx\n&)\u0004a\u0006f\u0012}NQ\r\u0004x\fp|o>\u0013r\r[Sp\u0015\b`\\n\u000b\u0013g p\ngXh AK\u0004xso\u0161(Q+V;r\u0019dTr\u000bVk\u0004xSoV\u001a$T6Uh\u0018\u0006)F;SoB\u001a$\u001dq^tB\u0015|\u0004;\u000f,]F<Y \u0012{\r\u0002v\u001euD1\u0001\u0017}\bsXq\t\u0018gK4\\\u007f\u0018\u001f|\u0007)\u001fR\t\u0001\\\u001bQEu\u001f\u0002z\u0007s\u001f<\u001f\u0004p p\u0000>\\F#Y$\r,\\F#Y$\r,\\Fu\u000fr[z\n\u0010u\u000fr[z\t\u0015$_6\u001do\u001e\u0015F\u001b}\u0000>CG=Y;[s\u0000\u0012v\u001bg\u0012,\\F#Y$\r,\\F#Y$\r,\\\u0010u\u000fr[z\n\u0010u\u000fr[y\u000fA%K4I}\u001e\u0011v\u001d]Y!N\r#\u00146\u001dh\u0015\u0006vT6{S 2V;6\u0003\u0016LV3I4\u0001p[LC\u001b{My\u001e\u0002z\fg\u0003 \u0000A)9fRl\t\u0004g\u00104Vy\u0015K1/uTp#\u0018]\fc\u001f\"P\u001a$SVRs\u0000\u0013r\u0007B\\p\u0019\u0013-\u001dfHyPY\u007f^.\u007fs\u0003\u001av\bzk}\u0000\u0003vW(\u0012p[LC\u001b{My\u001e\u0002jW(\u0012p[LC\u001b{My\u001e\u0002z\fg\u0003\u0016PY\u007f^.p}\u001c\u0006z\u0007s\u0003\u0016*;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011H)gO\u007f%\u0012.K(x\n&<\u0004|\u0019qOh\u0005\u0013`Fx\n&<\u0004|\u0019qOh\u0015Y\u007f^.nh\u001e\u001f}\u000eB\\p\u0019\u0013\u0002x\n\b;Q+V?g\fy\u0007y\\l\u001c\u001f}\u000e\u0016;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\rsXh?\u0013a\u001f}^y9\u0004\u007f\rZXk#\u0004V\u0011}Nh\u0005\u0018t";
                var4_3 = "wRqC\u001a$\u001dq^tC\u0005v\u001bbXnC\u0006|\u0005}^eC\u0014f\u0007pQyC\u0005`\u000ey\\rC\u0004v\u001a`P}\u0002YA\fgIq\r\u0018^\fgN}\u000b\u0013/|Ih\u001cL<FzN2\u0000Ag\fwU2\u000f\u0019~F&\r-\\Y#];Z}\u0018\u0013d\bm\u0010q\r\u0018r\u000eqPy\u0002\u0002\blPp\u0002\u0005)\u0005#4;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&.\u0003}\rxX3\u0000A);q[y\u001e\u0013}\nqN3\u0000A) `Xq\u0005gO\u007f%\u0012*;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011H)gO\u007f%\u0012.K\u0015`R^\t$v\u0004{Ky\b3}\u001d}Ie8\u000fc\f\u001d|Ih\u001cL<FcJkB\u0001 G{O{CD#Y$\u0012d\u0001\u001a}\u001a; ;Q+V4f\u0007pQyC\u001a$SFXz\t\u0004v\u0007wXoC\u001a$S]Iy\u0001\u000euQn\t\u0017w\u00104Xd\u0005\u0005g\u001a\u0005gO\u007f%\u0012\u0019fXq\u0003\u0000v$uMl\u0005\u0018t+mxr\u0018\u001fg\u0010@Dl\t\u0014sXh>\u0013`\u0006aO\u007f\t%v\u001dDRp\u0005\u0015j\u00026`\u0010gXh!\u0017c\u0019}S{-\u0015g\u0000{S\u0003Z\u0012]\blPp\u0002\u0005)\u0005#*Tss\u00188f\u0005x\u001dq\t\u0002{\u0006p\u001d9\u001fX6\u001a4Pi\u001f\u00023\u0007{I<\u001e\u0013g\u001cfS<\u0002\u0003\u007f\u0005\u0002}Y\tqOn\u0003\u0004G\u0010dX\u0006gO\u007f9\u0004z\u0007qQy\u0001\u0013}\u001d\bDOs\u001c\u0013a\u001dm\u0016;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0006RrP(3A\u0004`Dl\t\fVRs\u0000\u0013r\u0007B\\p\u0019\u0013\u00078\u001dr\r\u001bvT\u0004Z\\q\t\u00028\u001d\u0161(Q+V;r\u0019dTr\u000bVk\u0004xSoV\u001a$T6Uh\u0018\u0006)F;SoB\u001a$\u001dq^tB\u0015|\u0004;\u000f,]F<Y \u0012{\r\u0002v\u001euD1\u0001\u0017}\bsXq\t\u0018gK4\\\u007f\u0018\u001f|\u0007)\u001fR\t\u0001\\\u001bQEu\u001f\u0002z\u0007s\u001f<\u001f\u0004p p\u0000>\\F#Y$\r,\\F#Y$\r,\\Fu\u000fr[z\n\u0010u\u000fr[z\t\u0015$_6\u001do\u001e\u0015F\u001b}\u0000>CG=Y;[s\u0000\u0012v\u001bg\u0012,\\F#Y$\r,\\F#Y$\r,\\\u0010u\u000fr[z\n\u0010u\u000fr[y\u000fA%K4I}\u001e\u0011v\u001d]Y!N\r#\u00146\u001dh\u0015\u0006vT6{S 2V;6\u0003\u0016LV3I4\u0001p[LC\u001b{My\u001e\u0002z\fg\u0003 \u0000A)9fRl\t\u0004g\u00104Vy\u0015K1/uTp#\u0018]\fc\u001f\"P\u001a$SVRs\u0000\u0013r\u0007B\\p\u0019\u0013-\u001dfHyPY\u007f^.\u007fs\u0003\u001av\bzk}\u0000\u0003vW(\u0012p[LC\u001b{My\u001e\u0002jW(\u0012p[LC\u001b{My\u001e\u0002z\fg\u0003\u0016PY\u007f^.p}\u001c\u0006z\u0007s\u0003\u0016?3`3\u0000A);qNs\u0019\u0004p\f;^t\u0005\u001awS.\u00173\u0000A);qNs\u0019\u0004p\fg\u0012p[LA\fgRi\u001e\u0015v:qI3\u0000A);qNs\u0019\u0004p\f\u0004XTr\u0007\u001e;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&.\u0003}\rxX\bx\n&)\u0004a\u0006f\f4TrL\u0012r\u001du_}\u001f\u0013\nDOs\u001c\u0013a\u001d}Xo\fVRs\u0000\u0013r\u0007B\\p\u0019\u0013\u000bsXh!\u0017c\u0019}S{\u001f\bDOs\u001c\u0013a\u001dm\b`\\n\u000b\u0013g p\u000bGIn\u0005\u0018t?uQi\t);Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011H)`Dl\tK1\u00026`+;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&!\u0017c\u0019}S{\u001fY\u007f^.p}\u001c\u0006z\u0007s\b8\u001do\u001e\u0015Z\r)\u0010sXh!\u0017c\u0019}S{-\u0015g\u0000{S\tgXn\u001a\u001fp\f]Y8;\u0012p[LZ\u001dqP3\u0000A);qNs\u0019\u0004p\f;Q+V;r\u0019dTr\u000b\u0005<\u0005#\u0007Q\r\u0006c\u0000zZG,\u0013a\u001b{OH\u0015\u0006v4\u0006gO\u007f%\u0012.\u0003\u007fXe\u0012GvC?\u0017e\fpxr\u0018\u001fg\u0010Z\\q\t(x\n&<\u0004|\u0019qOh\u0005\u0013`Fx\n&<\u0004|\u0019qOh\u0015Y\u007f^.nh\u001e\u001f}\u000eB\\p\u0019\u0013\u0011GvC>\u0013r\r[Sp\u00153}\u001d}Ie*;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011H)gO\u007f%\u0012.N\rsXh)\u0018g\u0000`DH\u0015\u0006v\u0003\u007fXe\t3`3C\u001a$S]Y\n;Q+V4f\u0007pQy9;\u0012p[LA\fgRi\u001e\u0015v\u001a;Q+V$v\u001a{Hn\u000f\u0013@\f`\u0012p[LA\fgRi\u001e\u0015v2TIe\u001c\u0013.KdRp\u0005\u0015jKI\u0006gO\u007f9\u0004z\u0019RRp\b\u0013aIy\\l\u001c\u001f}\u000e4Ss\u0018Vu\u0006aSxB\u0004`Dl\t\u000bu^h\u0005\u0019}=uVy\u0002\u0004`Oi\t\u001c3`3\b\u0013`\nqSx\r\u0018gS.Q+V#a\u0005D\\h\u0018\u0013a\u0007/|Ih\u001cL<FzN2\u0000Ag\fwU2\u000f\u0019~F&\r-\\Y#];Z}\u0018\u0013d\bm\u0010q\r\u0018r\u000eqPy\u0002\u0002F:\u00123\u0000A)9fRl\t\u0004g\u0000qN3\u0000A)9fRl\t\u0004g\u0010O}w\t\u000f.NGvC>\u0013r\r[Sp\u00153}\u001d}IeK+<\u0005#\u0007^\u0003\u0019\u007f\fuSJ\r\u001af\f\u0007.\u001dh\u0015\u0006vT\u000exTr\tX`\fd\\n\r\u0002|\u001b\u0003Z\u0012]\tR\\u\u00009}'qJ5;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&.\u0003}\rxX3\u0000A)$uMl\u0005\u0018t\u001a;Q+V;r\u0019dTr\u000b);\u0012p[LQ\u001czYp\tY\u007f^.oy\n\u0013a\fz^y\u001fY\u007f^.th\t\u001bH\u0005#\u0007U\bK4+;\u0012p[LQ\u001czYp\tY\u007f^.p}\u001c\u0006z\u0007sN3\u0000A)$uMl\u0005\u0018t2TNn\u000f?wT6\u0002x\n\rsXh)\u0018g\u0000`DR\r\u001bv\u00028\u001d);\u0012p[LQ\u001czYp\tY\u007f^.oy\n\u0013a\fz^y\u001fY\u007f^.th\t\u001bH\u0005#\u0007U\bK4\nDOs\u001c\u0013a\u001d}Xo!;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011\n3`3\u0000A)'uPy\nFXz\t\u0004v\u0007wXo\u00023`\u000eR\\u\u00009},lTo\u0018\u001f}\u000e\u000f]Sj\r\u001az\rFXo\u0003\u0003a\nq\tR\\u\u00009}'qJ\u0006u^h\u0005\u0019}=wRqC\u001a$\u001dq^tC\u0005v\u001bbXnC\u0006|\u0005}^eC\u0014f\u0007pQyC\u0005`\u000ey\\rC\u0004v\u001a`P}\u0002YA\fgIq\r\u0018^\fgN}\u000b\u0013\u001e;Q+V?g\fy\u0012p[LA\fgRi\u001e\u0015vFx\n&.\u0003}\rxX\u0002]Y@W\\r\u0002\u0019gIuYxL\u0019aIaMx\r\u0002vIu\u001d\u007f\u0004\u001f\u007f\r4Os\u001bL3\b4[s\u001e\u0013z\u000ez\u001dw\t\u000f3\n{So\u0018\u0004r\u0000zI<\n\u0017z\u0005g\u000exTr\tX`\fd\\n\r\u0002|\u001b\u0006u^h\u0005\u0019}\u0007.\u001dh\u0015\u0006vT\u0004`Oi\t>UO{\u0019\u001bv\u0007`\u001dz\u0003\u00043)ZRh\"\u0003\u007f\u00054M}\u001e\u0017~\f`XnLQ6\u001a3\u001ds\nV6\u001a:\u0018oL\u001bf\u001a`\u001dr\u0003\u00023\u000bq\u001dr\u0019\u001a\u007f@;\u0012p[L_\u0000gI3\u0000A) `XqC\u001a$SFXo\u0003\u0003a\nq\u0012p[L^\bdMu\u0002\u0011`Fx\n&!\u0017c\u0019}S{76v\u001bfRn8\u000fc\fI\bx\n&)\u0004a\u0006f\u0012}NQ\r\u0004x\fp|o>\u0013r\r[Sp\u0015\b`\\n\u000b\u0013g p\ngXh AK\u0004xso\u0161(Q+V;r\u0019dTr\u000bVk\u0004xSoV\u001a$T6Uh\u0018\u0006)F;SoB\u001a$\u001dq^tB\u0015|\u0004;\u000f,]F<Y \u0012{\r\u0002v\u001euD1\u0001\u0017}\bsXq\t\u0018gK4\\\u007f\u0018\u001f|\u0007)\u001fR\t\u0001\\\u001bQEu\u001f\u0002z\u0007s\u001f<\u001f\u0004p p\u0000>\\F#Y$\r,\\F#Y$\r,\\Fu\u000fr[z\n\u0010u\u000fr[z\t\u0015$_6\u001do\u001e\u0015F\u001b}\u0000>CG=Y;[s\u0000\u0012v\u001bg\u0012,\\F#Y$\r,\\F#Y$\r,\\\u0010u\u000fr[z\n\u0010u\u000fr[y\u000fA%K4I}\u001e\u0011v\u001d]Y!N\r#\u00146\u001dh\u0015\u0006vT6{S 2V;6\u0003\u0016LV3I4\u0001p[LC\u001b{My\u001e\u0002z\fg\u0003 \u0000A)9fRl\t\u0004g\u00104Vy\u0015K1/uTp#\u0018]\fc\u001f\"P\u001a$SVRs\u0000\u0013r\u0007B\\p\u0019\u0013-\u001dfHyPY\u007f^.\u007fs\u0003\u001av\bzk}\u0000\u0003vW(\u0012p[LC\u001b{My\u001e\u0002jW(\u0012p[LC\u001b{My\u001e\u0002z\fg\u0003\u0016PY\u007f^.p}\u001c\u0006z\u0007s\u0003\u0016*;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\u0012p[L^\bdMu\u0002\u0011H)gO\u007f%\u0012.K(x\n&<\u0004|\u0019qOh\u0005\u0013`Fx\n&<\u0004|\u0019qOh\u0015Y\u007f^.nh\u001e\u001f}\u000eB\\p\u0019\u0013\u0002x\n\b;Q+V?g\fy\u0007y\\l\u001c\u001f}\u000e\u0016;Q+V4f\u0007pQyC\u001a$SY\\l\u001c\u001f}\u000eg\rsXh?\u0013a\u001f}^y9\u0004\u007f\rZXk#\u0004V\u0011}Nh\u0005\u0018t".length();
                var1_4 = 61;
                var0_5 = -1;
lbl7:
                // 2 sources

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

                while (true) {
                    var5[var3_1++] = RestmanMessage.a(v0, RestmanMessage.a(v2));
                    if ((var0_5 += var1_4) < var4_3) {
                        var1_4 = var2_2.charAt(var0_5);
                        ** continue;
                    }
                    var2_2 = "hVw\u001a\u001d^\t}A\u0011XJl\u0004\u001ao;h]F\u001a\u0001l\u001cdGq";
                    var4_3 = "hVw\u001a\u001d^\t}A\u0011XJl\u0004\u001ao;h]F\u001a\u0001l\u001cdGq".length();
                    var1_4 = 9;
                    var0_5 = -1;
lbl22:
                    // 2 sources

                    while (true) {
                        v0 = 34;
                        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++] = RestmanMessage.a(v0, RestmanMessage.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;
            }
        }
        RestmanMessage.n = var5;
        RestmanMessage.NODE_NAME_NAME = RestmanMessage.n[28];
        RestmanMessage.MAPPING_ACTION_ATTRIBUTE = RestmanMessage.n[87];
        RestmanMessage.g = RestmanMessage.n[53];
        RestmanMessage.MAPPING_ACTION_PROP_KEY_FAIL_ON_NEW = RestmanMessage.n[86];
        RestmanMessage.NODE_NAME_PROPERTY = RestmanMessage.n[39];
        RestmanMessage.MAPPING_SRC_ID_ATTRIBUTE = RestmanMessage.n[10];
        RestmanMessage.NODE_ATTRIBUTE_NAME_KEY = RestmanMessage.n[50];
        RestmanMessage.MAPPING_TARGET_ID_ATTRIBUTE = RestmanMessage.n[100];
        RestmanMessage.NODE_NAME_ID = RestmanMessage.n[90];
        RestmanMessage.NODE_NAME_PROPERTIES = RestmanMessage.n[36];
        RestmanMessage.NODE_NAME_STRING_VALUE = RestmanMessage.n[41];
        RestmanMessage.MAPPING_ACTION_PROP_KEY_FAIL_ON_EXISTING = RestmanMessage.n[84];
        RestmanMessage.MAPPING_PROPERTY_NAME_SK_SAVED_ENTITY_NAME = RestmanMessage.n[51];
        RestmanMessage.MAPPING_TYPE_ATTRIBUTE = RestmanMessage.n[25];
        RestmanMessage.b = RestmanMessage.n[98];
        RestmanMessage.f = RestmanMessage.n[30];
        RestmanMessage.a = RestmanMessage.n[75];
        RestmanMessage.MAPPING_ERROR_TYPE_ATTRIBUTE = RestmanMessage.n[19];
        RestmanMessage.c = RestmanMessage.n[37];
        RestmanMessage.d = RestmanMessage.n[16];
        RestmanMessage.MAPPING_ACTION_TAKEN_ATTRIBUTE = RestmanMessage.n[63];
        RestmanMessage.e = Folder.ROOT_FOLDER_ID.toHexString();
    }

    /*
     * 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[] a(String string) {
        char[] cArray = string.toCharArray();
        if (cArray.length < 2) {
            cArray = cArray;
            cArray[0] = (char)(cArray[0] ^ 0x52);
        }
        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 -> 47;
                    case 1 -> 6;
                    case 2 -> 39;
                    case 3 -> 87;
                    case 4 -> 77;
                    case 5 -> 40;
                    default -> 82;
                })));
                ++n3;
                n4 = n4;
            } while (n4 > n3);
        }
        return new String(cArray2).intern();
    }
}

