package com.l7tech.server.policy.assertion.xml;

import com.l7tech.common.mime.NoSuchPartException;
import com.l7tech.gateway.common.audit.AssertionMessages;
import com.l7tech.gateway.common.audit.Messages.M;
import com.l7tech.message.Message;
import com.l7tech.message.XmlKnob;
import com.l7tech.policy.AssertionResourceInfo;
import com.l7tech.policy.MessageUrlResourceInfo;
import com.l7tech.policy.StaticResourceInfo;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.GlobalResourceInfo;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.assertion.xml.SchemaValidation;
import com.l7tech.server.communityschemas.SchemaHandle;
import com.l7tech.server.communityschemas.SchemaManager;
import com.l7tech.server.communityschemas.SchemaValidationErrorHandler;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.ServerPolicyException;
import com.l7tech.server.policy.assertion.AbstractServerAssertion;
import com.l7tech.server.util.res.ResourceGetter;
import com.l7tech.util.ExceptionUtils;
import com.l7tech.util.HexUtils;
import com.l7tech.xml.ElementCursor;
import java.io.IOException;
import java.net.MalformedURLException;
import java.security.GeneralSecurityException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map;
import java.util.logging.Level;
import org.springframework.context.ApplicationContext;
import org.xml.sax.SAXException;

public class ServerSchemaValidation extends AbstractServerAssertion<SchemaValidation> {
   private final ResourceGetter<String, ElementCursor> d;
   private final String e;
   private final SchemaManager f;
   private final String[] g;
   private final String h;
   private boolean i = false;
   private static final String[] j;

   public ServerSchemaValidation(SchemaValidation var1, ApplicationContext var2) throws ServerPolicyException {
      super(var1);
      String[] var9 = j;
      this.f = (SchemaManager)var2.getBean(var9[2]);
      this.g = var1.getVariablesUsed();
      Object var3 = this.assertion.getResourceInfo();

      try {
         if (var3 instanceof GlobalResourceInfo) {
            this.h = ((GlobalResourceInfo)var3).getId();
            this.f.registerUri(this.h);
            this.d = null;
            this.e = null;
            return;
         }
      } catch (ServerPolicyException var13) {
         throw a(var13);
      }

      try {
         this.h = null;
         if (var3 instanceof MessageUrlResourceInfo) {
            throw new ServerPolicyException(this.assertion, j[13]);
         }
      } catch (ServerPolicyException var10) {
         throw a(var10);
      }

      if (var3 instanceof StaticResourceInfo var4) {
         String var5 = var4.getDocument();
         String var6 = var4.getOriginalUrl();
         int var10000 = System.identityHashCode(this);
         String var10001 = HexUtils.encodeBase64(HexUtils.getMd5Digest(var5.getBytes()), true);
         var9 = j;
         String var7 = var9[5] + var10000 + var9[4] + var10001;

         label56: {
            try {
               if (var6 == null) {
                  this.e = var7;
                  break label56;
               }
            } catch (ServerPolicyException var11) {
               throw a(var11);
            }

            label39: {
               try {
                  if (var6.contains("#")) {
                     var17 = "_";
                     break label39;
                  }
               } catch (ServerPolicyException var12) {
                  throw a(var12);
               }

               var17 = "#";
            }

            String var8 = var17;
            this.e = var6 + var8 + var7;
         }

         this.f.registerSchema(this.e, null, var5);
         var3 = new StaticResourceInfo(this.e);
      } else {
         this.e = null;
      }

      d var14 = new d(this);
      e var15 = new e(this);
      this.d = ResourceGetter.createResourceGetter(this.assertion, (AssertionResourceInfo)var3, var14, null, var15, this.getAudit());
   }

   @Override
   public AssertionStatus checkRequest(PolicyEnforcementContext param1) throws IOException, PolicyAssertionException {
      // $VF: Couldn't be decompiled
      // Please report this to the Vineflower issue tracker, at https://github.com/Vineflower/vineflower/issues with a copy of the class file (if you have the rights to distribute it!)
      // java.lang.RuntimeException: parsing failure!
      //   at org.jetbrains.java.decompiler.modules.decompiler.decompose.DomHelper.parseGraph(DomHelper.java:211)
      //   at org.jetbrains.java.decompiler.main.rels.MethodProcessor.codeToJava(MethodProcessor.java:174)
      //
      // Bytecode:
      // 000: aload 0
      // 001: getfield com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 004: checkcast com/l7tech/policy/assertion/xml/SchemaValidation
      // 007: invokevirtual com/l7tech/policy/assertion/xml/SchemaValidation.getTarget ()Lcom/l7tech/policy/assertion/TargetMessageType;
      // 00a: astore 2
      // 00b: aload 2
      // 00c: ifnonnull 063
      // 00f: aload 1
      // 010: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRoutingStatus ()Lcom/l7tech/policy/assertion/RoutingStatus; 1
      // 015: astore 5
      // 017: aload 5
      // 019: getstatic com/l7tech/policy/assertion/RoutingStatus.ROUTED Lcom/l7tech/policy/assertion/RoutingStatus;
      // 01c: if_acmpeq 036
      // 01f: aload 5
      // 021: getstatic com/l7tech/policy/assertion/RoutingStatus.ATTEMPTED Lcom/l7tech/policy/assertion/RoutingStatus;
      // 024: if_acmpeq 036
      // 027: goto 02e
      // 02a: invokestatic com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 02d: athrow
      // 02e: bipush 1
      // 02f: goto 037
      // 032: invokestatic com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 035: athrow
      // 036: bipush 0
      // 037: istore 6
      // 039: iload 6
      // 03b: ifeq 04c
      // 03e: aload 1
      // 03f: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getRequest ()Lcom/l7tech/message/Message; 1
      // 044: astore 3
      // 045: getstatic com/l7tech/policy/assertion/TargetMessageType.REQUEST Lcom/l7tech/policy/assertion/TargetMessageType;
      // 048: astore 2
      // 049: goto 057
      // 04c: aload 1
      // 04d: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getResponse ()Lcom/l7tech/message/Message; 1
      // 052: astore 3
      // 053: getstatic com/l7tech/policy/assertion/TargetMessageType.RESPONSE Lcom/l7tech/policy/assertion/TargetMessageType;
      // 056: astore 2
      // 057: aload 2
      // 058: invokevirtual com/l7tech/policy/assertion/TargetMessageType.name ()Ljava/lang/String;
      // 05b: invokevirtual java/lang/String.toLowerCase ()Ljava/lang/String;
      // 05e: astore 4
      // 060: goto 09f
      // 063: aload 1
      // 064: aload 0
      // 065: getfield com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 068: checkcast com/l7tech/policy/assertion/MessageTargetable
      // 06b: bipush 1
      // 06c: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getTargetMessage (Lcom/l7tech/policy/assertion/MessageTargetable;Z)Lcom/l7tech/message/Message; 3
      // 071: astore 3
      // 072: aload 0
      // 073: getfield com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 076: checkcast com/l7tech/policy/assertion/xml/SchemaValidation
      // 079: invokevirtual com/l7tech/policy/assertion/xml/SchemaValidation.getTargetName ()Ljava/lang/String;
      // 07c: astore 4
      // 07e: goto 09f
      // 081: astore 5
      // 083: aload 0
      // 084: getstatic com/l7tech/gateway/common/audit/AssertionMessages.NO_SUCH_VARIABLE Lcom/l7tech/gateway/common/audit/Messages$M;
      // 087: bipush 1
      // 088: anewarray 377
      // 08b: dup
      // 08c: bipush 0
      // 08d: aload 0
      // 08e: getfield com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 091: checkcast com/l7tech/policy/assertion/xml/SchemaValidation
      // 094: invokevirtual com/l7tech/policy/assertion/xml/SchemaValidation.getOtherTargetMessageVariable ()Ljava/lang/String;
      // 097: aastore
      // 098: invokevirtual com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 09b: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 09e: areturn
      // 09f: aload 3
      // 0a0: invokevirtual com/l7tech/message/Message.isXml ()Z
      // 0a3: ifne 0be
      // 0a6: aload 0
      // 0a7: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SCHEMA_VALIDATION_NOT_XML Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0aa: bipush 1
      // 0ab: anewarray 377
      // 0ae: dup
      // 0af: bipush 0
      // 0b0: aload 4
      // 0b2: aastore
      // 0b3: invokevirtual com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 0b6: getstatic com/l7tech/policy/assertion/AssertionStatus.NOT_APPLICABLE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0b9: areturn
      // 0ba: invokestatic com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 0bd: athrow
      // 0be: aload 0
      // 0bf: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SCHEMA_VALIDATION_VALIDATING Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0c2: bipush 1
      // 0c3: anewarray 377
      // 0c6: dup
      // 0c7: bipush 0
      // 0c8: aload 4
      // 0ca: aastore
      // 0cb: invokevirtual com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 0ce: aload 0
      // 0cf: aload 3
      // 0d0: aload 1
      // 0d1: invokevirtual com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.a (Lcom/l7tech/message/Message;Lcom/l7tech/server/message/PolicyEnforcementContext;)Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0d4: astore 5
      // 0d6: aload 5
      // 0d8: getstatic com/l7tech/policy/assertion/AssertionStatus.BAD_REQUEST Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0db: if_acmpne 114
      // 0de: getstatic com/l7tech/server/policy/assertion/xml/f.a [I
      // 0e1: aload 2
      // 0e2: invokevirtual com/l7tech/policy/assertion/TargetMessageType.ordinal ()I
      // 0e5: iaload
      // 0e6: lookupswitch 46 2 1 30 2 38
      // 100: invokestatic com/l7tech/server/policy/assertion/xml/ServerSchemaValidation.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 103: athrow
      // 104: getstatic com/l7tech/policy/assertion/AssertionStatus.BAD_RESPONSE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 107: astore 5
      // 109: goto 114
      // 10c: getstatic com/l7tech/policy/assertion/AssertionStatus.FAILED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 10f: astore 5
      // 111: goto 114
      // 114: aload 5
      // 116: areturn
      // try (13 -> 21): 21 com/l7tech/policy/variable/NoSuchVariableException
      // try (10 -> 16): 17 com/l7tech/policy/variable/NoSuchVariableException
      // try (43 -> 55): 56 com/l7tech/policy/variable/NoSuchVariableException
      // try (71 -> 85): 85 com/l7tech/policy/variable/NoSuchVariableException
      // try (101 -> 109): 109 com/l7tech/policy/variable/NoSuchVariableException
   }

   AssertionStatus a(Message var1, PolicyEnforcementContext var2) throws IOException {
      SchemaHandle var3 = null;

      try {
         XmlKnob var4 = var1.getXmlKnob();
         if (this.h != null) {
            try {
               var3 = this.f.getSchemaByUri(this.getAudit(), this.h);
            } catch (MalformedURLException var46) {
               this.logAndAudit(AssertionMessages.SCHEMA_VALIDATION_GLOBALREF_BROKEN, this.h);
               return AssertionStatus.SERVER_ERROR;
            } catch (IOException var47) {
               this.logAndAudit(AssertionMessages.SCHEMA_VALIDATION_GLOBALREF_BROKEN, new String[]{this.h}, ExceptionUtils.getDebugException(var47));
               return AssertionStatus.SERVER_ERROR;
            }
         } else {
            Map var5 = var2.getVariableMap(this.g, this.getAudit());
            String var6 = null;

            try {
               var6 = this.d.getResource(var4.getElementCursor(), var5);
               var3 = this.f.getSchemaByUri(this.getAudit(), var6);
            } catch (IOException var45) {
               M var10001 = AssertionMessages.SCHEMA_VALIDATION_IO_ERROR;
               String[] var71 = new String[1];
               String var10006 = ExceptionUtils.getMessage(var45);
               String[] var67 = j;
               var71[0] = var67[8] + var6 + var67[1] + var10006;
               this.logAndAudit(var10001, var71, ExceptionUtils.getDebugException(var45));
               return AssertionStatus.SERVER_ERROR;
            }
         }

         SchemaValidationErrorHandler var59 = new SchemaValidationErrorHandler();
         SAXException var60 = null;

         try {
            var3.validateMessage(var1, this.assertion.getValidationTarget(), var59);
         } catch (SAXException var44) {
            var60 = var44;
         }

         if (var60 == null) {
            this.logAndAudit(AssertionMessages.SCHEMA_VALIDATION_SUCCEEDED);
            return AssertionStatus.NONE;
         }

         Collection var7 = var59.recordedErrors();
         if (var7.isEmpty()) {
            this.a(var2, ExceptionUtils.getMessage(var60), ExceptionUtils.getDebugException(var60));
            return AssertionStatus.BAD_REQUEST;
         }

         ArrayList var8 = new ArrayList();

         for (Object var10 : var7) {
            String var11 = var10.toString();
            this.logAndAudit(AssertionMessages.SCHEMA_VALIDATION_FAILED, var11);
            var8.add(var11);
         }

         var2.setVariable(SchemaValidation.SCHEMA_FAILURE_VARIABLE, var8.toArray());
         return AssertionStatus.BAD_REQUEST;
      } catch (ResourceGetter.InvalidMessageException var49) {
         String var70 = ExceptionUtils.getMessage(var49);
         String[] var66 = j;
         this.a(var2, var66[14] + var70, ExceptionUtils.getDebugException(var49));
         return AssertionStatus.BAD_REQUEST;
      } catch (ResourceGetter.UrlNotFoundException var50) {
         String[] var65 = j;
         this.a(var2, var65[3], ExceptionUtils.getDebugException(var50));
         return AssertionStatus.BAD_REQUEST;
      } catch (ResourceGetter.MalformedResourceUrlException var51) {
         String[] var64 = j;
         this.a(var2, var64[11], ExceptionUtils.getDebugException(var51));
         return AssertionStatus.BAD_REQUEST;
      } catch (ResourceGetter.UrlNotPermittedException var52) {
         String[] var63 = j;
         this.a(var2, var63[7], ExceptionUtils.getDebugException(var52));
         return AssertionStatus.BAD_REQUEST;
      } catch (ResourceGetter.ResourceIOException var53) {
         String var69 = ExceptionUtils.getMessage(var53);
         String[] var62 = j;
         this.a(var2, var62[9] + var69, ExceptionUtils.getDebugException(var53));
         return AssertionStatus.SERVER_ERROR;
      } catch (ResourceGetter.ResourceParseException var54) {
         String var68 = ExceptionUtils.getMessage(var54);
         String[] var61 = j;
         this.a(var2, var61[6] + var68, ExceptionUtils.getDebugException(var54));
         return AssertionStatus.SERVER_ERROR;
      } catch (GeneralSecurityException var55) {
         String var10002 = ExceptionUtils.getMessage(var55);
         String[] var13 = j;
         this.a(var2, var13[0] + var10002, var55);
         return AssertionStatus.SERVER_ERROR;
      } catch (NoSuchPartException var56) {
         this.a(var2, j[10] + ExceptionUtils.getMessage(var56), ExceptionUtils.getDebugException(var56));
         return AssertionStatus.SERVER_ERROR;
      } catch (SAXException var57) {
         this.a(var2, ExceptionUtils.getMessage(var57), ExceptionUtils.getDebugException(var57));
         return AssertionStatus.BAD_REQUEST;
      } finally {
         try {
            if (var3 != null) {
               var3.close();
            }
         } catch (MalformedURLException var48) {
            throw a(var48);
         }
      }
   }

   private void a(PolicyEnforcementContext var1, String var2, Throwable var3) {
      this.logger.log(Level.INFO, j[12] + var2);
      this.logAndAudit(AssertionMessages.SCHEMA_VALIDATION_FAILED, new String[]{var2}, var3);
      var1.setVariable(SchemaValidation.SCHEMA_FAILURE_VARIABLE, var2);
   }

   private synchronized boolean a() {
      boolean var1 = this.i;
      this.i = true;
      return var1;
   }

   @Override
   public void close() {
      if (!this.a()) {
         if (this.d != null) {
            this.d.close();
         }

         if (this.h != null) {
            this.f.unregisterUri(this.h);
         }

         if (this.e != null) {
            this.f.unregisterSchema(this.e);
         }
      }
   }

   private static Exception a(Exception var0) {
      return var0;
   }

   static {
      String[] var5 = new String[15];
      int var3 = 0;
      String var2 = "\t\u0011\u0015=RmA-\u0011\u0014;WgX)\u0011\u00037\\wX-_\u0013x\\m@$UG6Pv\u0015*TG<Pu[$^\u0006<Zf\u0015*T\u00049JqPhP\txlQyhR\b6KgM<\u0011\u00047JnQh_\b,\u001f`PhR\u0015=^vP,\u000bG\u0002r\u0011\r;R\u000f=Rcx)_\u0006?Zp\u008d\u001cY\u0002x[mV=\\\u00026K\"A'\u0011\u00119SkQ)E\u0002xRcQ-\u0011\u0012+Z\"Z.\u0011\t9RgF8P\u0004=L\"S'CG/WkV \u0011\u0010=\u001fjT>TG6P\"F+Y\u00025^q\u0015:T\u00001LvP:T\u0003t\u001fc[,\u0011\u00031[\"['EG1QaY=U\u0002xLa]-\\\u0006xjPy;\u0011\u00017M\"A T\u0014=\u001flT%T\u0014(^aP;\u0003rB\u0003\u001d8^\u000b1\\{\u000f)B\u0014=Mv\\'_]+\\jP%P\u00119S8F).\t\u0011\u0015=RmA-\u0011\u0014;WgX)\u0011\u00037\\wX-_\u0013x\\m@$UG6Pv\u0015*TG(^pF-U]xo\u001cY\u0002x[mV=\\\u00026K\"A'\u0011\u00119SkQ)E\u0002xVlV$D\u0003=[\"ThB\u00040ZoThU\u0002;ScG)E\u000e7Q\"E'X\t,VlRhP\u0013x^\"`\u001a}G,WcAhX\u0014xQmAhA\u0002*RkA<T\u0003x]{\u0015<Y\u0002xHj\\<T\u000b1Lv\f;R\u000f=Rc\u0015\u001dc+b\u001f&\u001d_\u0006:Sg\u0015<^G*ZvG!T\u0011=\u001fc\u0015;R\u000f=Rc\u0015,^\u0004-Rg[<\u000bG\u001f\t\u0011\u0015=Nw\\:T\u0003xrKx\r\u0011\u00179Mv\u0015?P\u0014xSmF<\u000bGQ\u001cY\u0002x[mV=\\\u00026K\"A'\u0011\u00119SkQ)E\u0002xVlV$D\u0003=[\"ThB\u00040ZoThU\u0002;ScG)E\u000e7Q\"E'X\t,VlRhP\u0013x^l\u0015!_\u00119SkQhd5\u0014\u0013>P\u000b1[cA!^\txYc\\$T\u0003b\u001f";
      int var4 = "\t\u0011\u0015=RmA-\u0011\u0014;WgX)\u0011\u00037\\wX-_\u0013x\\m@$UG6Pv\u0015*TG<Pu[$^\u0006<Zf\u0015*T\u00049JqPhP\txlQyhR\b6KgM<\u0011\u00047JnQh_\b,\u001f`PhR\u0015=^vP,\u000bG\u0002r\u0011\r;R\u000f=Rcx)_\u0006?Zp\u008d\u001cY\u0002x[mV=\\\u00026K\"A'\u0011\u00119SkQ)E\u0002xRcQ-\u0011\u0012+Z\"Z.\u0011\t9RgF8P\u0004=L\"S'CG/WkV \u0011\u0010=\u001fjT>TG6P\"F+Y\u00025^q\u0015:T\u00001LvP:T\u0003t\u001fc[,\u0011\u00031[\"['EG1QaY=U\u0002xLa]-\\\u0006xjPy;\u0011\u00017M\"A T\u0014=\u001flT%T\u0014(^aP;\u0003rB\u0003\u001d8^\u000b1\\{\u000f)B\u0014=Mv\\'_]+\\jP%P\u00119S8F).\t\u0011\u0015=RmA-\u0011\u0014;WgX)\u0011\u00037\\wX-_\u0013x\\m@$UG6Pv\u0015*TG(^pF-U]xo\u001cY\u0002x[mV=\\\u00026K\"A'\u0011\u00119SkQ)E\u0002xVlV$D\u0003=[\"ThB\u00040ZoThU\u0002;ScG)E\u000e7Q\"E'X\t,VlRhP\u0013x^\"`\u001a}G,WcAhX\u0014xQmAhA\u0002*RkA<T\u0003x]{\u0015<Y\u0002xHj\\<T\u000b1Lv\f;R\u000f=Rc\u0015\u001dc+b\u001f&\u001d_\u0006:Sg\u0015<^G*ZvG!T\u0011=\u001fc\u0015;R\u000f=Rc\u0015,^\u0004-Rg[<\u000bG\u001f\t\u0011\u0015=Nw\\:T\u0003xrKx\r\u0011\u00179Mv\u0015?P\u0014xSmF<\u000bGQ\u001cY\u0002x[mV=\\\u00026K\"A'\u0011\u00119SkQ)E\u0002xVlV$D\u0003=[\"ThB\u00040ZoThU\u0002;ScG)E\u000e7Q\"E'X\t,VlRhP\u0013x^l\u0015!_\u00119SkQhd5\u0014\u0013>P\u000b1[cA!^\txYc\\$T\u0003b\u001f"
         .length();
      char var1 = '^';
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 20;
         String var10001 = var2.substring(++var7, var7 + var1);
         byte var10002 = -1;

         while (true) {
            String var8 = b(var10000, a(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     j = var5;
                     return;
                  }

                  var1 = var2.charAt(var7);
                  break;
               default:
                  var5[var3++] = var8;
                  if ((var7 += var1) < var4) {
                     var1 = var2.charAt(var7);
                     continue label24;
                  }

                  var2 = "O\u001e^a\u0014/\u001aW\tA@\u0010;\u0010w\tNw<&\u0019m[DaU&\u0010v[Tw\u0001h\fw\u000b]}\u0007<\u001afU2V\u0013H2\u0011'\u001cw\u0016H|\u0001h\u000bm[[s\u0019!\u001bc\u000fH2\u0002)\f\"\u0015BfU?\u001an\u0017\u0000t\u001a:\u0012g\u001f\rJ8\u0004E\"";
                  var4 = "O\u001e^a\u0014/\u001aW\tA@\u0010;\u0010w\tNw<&\u0019m[DaU&\u0010v[Tw\u0001h\fw\u000b]}\u0007<\u001afU2V\u0013H2\u0011'\u001cw\u0016H|\u0001h\u000bm[[s\u0019!\u001bc\u000fH2\u0002)\f\"\u0015BfU?\u001an\u0017\u0000t\u001a:\u0012g\u001f\rJ8\u0004E\""
                     .length();
                  var1 = ',';
                  var7 = -1;
            }

            var10000 = 94;
            var10001 = var2.substring(++var7, var7 + var1);
            var10002 = 0;
         }
      }
   }

   private static char[] a(String var0) {
      char[] var10000 = var0.toCharArray();
      if (var10000.length < 2) {
         var10000[0] = (char)(var10000[0] ^ 33);
      }

      return var10000;
   }

   private static String b(int var0, char[] var1) {
      int var10003 = var1.length;
      int var10002 = var0;
      char[] var10001 = var1;
      int var10000 = var10003;

      for (int var2 = 0; var10000 > var2; var2++) {
         var10001[var2] = (char)(var10001[var2] ^ var10002 ^ switch (var2 % 7) {
            case 0 -> 92;
            case 1 -> 37;
            case 2 -> 115;
            case 3 -> 76;
            case 4 -> 43;
            case 5 -> 22;
            default -> 33;
         });
      }

      return new String(var10001).intern();
   }
}
