package com.l7tech.external.assertions.gatewaygraphql.server.resolver.mutation;

import com.l7tech.common.io.ByteLimitInputStream;
import com.l7tech.external.assertions.gatewaygraphql.EntityTypeInfo;
import com.l7tech.external.assertions.gatewaygraphql.server.data.EntityMappingInstruction;
import com.l7tech.external.assertions.gatewaygraphql.server.data.ServerModuleFileDTO;
import com.l7tech.external.assertions.gatewaygraphql.server.data.ServerModuleFileHelper;
import com.l7tech.external.assertions.gatewaygraphql.server.error.GatewayEntityMutationException;
import com.l7tech.external.assertions.gatewaygraphql.server.error.NoMutationException;
import com.l7tech.external.assertions.gatewaygraphql.server.resolver.FilePart;
import com.l7tech.external.assertions.gatewaygraphql.server.resolver.FilePartSupplier;
import com.l7tech.gateway.common.module.CustomAssertionsScannerHelper;
import com.l7tech.gateway.common.module.ModularAssertionsScannerHelper;
import com.l7tech.gateway.common.module.ServerModuleFile;
import com.l7tech.gateway.common.module.ServerModuleFilePayload;
import com.l7tech.gateway.common.module.ServerModuleFilePayloadFactory;
import com.l7tech.gateway.common.security.signer.TrustedSignerCertsHelper;
import com.l7tech.gateway.common.security.signer.TrustedSignerCertsManager;
import com.l7tech.gateway.common.security.signer.SignerUtils.SignedZip;
import com.l7tech.objectmodel.EntityHeader;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.ObjectModelException;
import com.l7tech.server.ServerConfig;
import com.l7tech.server.module.ServerModuleFileManager;
import com.l7tech.util.ExceptionUtils;
import graphql.schema.DataFetchingEnvironment;
import java.io.IOException;
import java.security.SignatureException;
import java.util.List;
import java.util.logging.Logger;
import lombok.Generated;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.transaction.PlatformTransactionManager;

public class ServerModuleFileMutationResolver
   extends EntityManagerAwareGraphQLMutationResolver<ServerModuleFile, EntityHeader, ServerModuleFileManager, ServerModuleFileDTO, ServerModuleFileDTO.ServerModuleFileInput> {
   @Generated
   private static final Logger b;
   private final TrustedSignerCertsManager c;
   private final ServerConfig d;
   private static final String[] e;

   public ServerModuleFileMutationResolver(PlatformTransactionManager var1, BeanFactory var2) {
      String[] var3 = e;
      super(EntityTypeInfo.SERVER_MODULE_FILE, var1, (ServerModuleFileManager)var2.getBean(var3[15], ServerModuleFileManager.class));
      this.c = (TrustedSignerCertsManager)var2.getBean(var3[1], TrustedSignerCertsManager.class);
      this.d = (ServerConfig)var2.getBean(var3[10], ServerConfig.class);
   }

   @Override
   protected Logger getLogger() {
      return b;
   }

   public ServerModuleFileDTO.ServerModuleFilesPayload setServerModuleFiles(List<ServerModuleFileDTO.ServerModuleFileInput> var1, DataFetchingEnvironment var2) {
      ServerModuleFileDTO.ServerModuleFilesPayload var3 = new ServerModuleFileDTO.ServerModuleFilesPayload();

      try {
         this.transformNoDefEntityMappings(var1, var2);
         if (var1.isEmpty()) {
            return var3;
         }
      } catch (IllegalStateException var5) {
         throw b(var5);
      }

      FilePartSupplier var4 = this.getFilePartSupplier(var2.getGraphQlContext());
      return this.execute(var2, (var4x, var5x) -> {
         var1.forEach(var5xx -> {
            var5xx.setFilePart(var4.getRequestPart(var5xx.getName()));
            this.doUpsertSilently(var5xx, var4x, var3, var5x);
         });
         return var3;
      });
   }

   protected ServerModuleFileDTO doCreate(ServerModuleFileDTO.ServerModuleFileInput var1) throws ObjectModelException {
      try {
         if (this.b()) {
            throw new IllegalStateException(e[6]);
         }
      } catch (ObjectModelException var2) {
         throw b(var2);
      }

      return (ServerModuleFileDTO)super.doCreate(var1);
   }

   protected ServerModuleFileDTO doUpdate(ServerModuleFileDTO.ServerModuleFileInput var1, ServerModuleFile var2) {
      try {
         if (var2.getModuleSha256().equals(var1.getModuleSha256())) {
            throw new NoMutationException(e[2]);
         }
      } catch (IllegalStateException var3) {
         throw b(var3);
      }

      throw new IllegalStateException(e[7]);
   }

   protected void setEntity(ServerModuleFileDTO.ServerModuleFileInput var1, ServerModuleFile var2) {
      try {
         if (var1.getProperties() != null) {
            var1.getProperties().forEach(var1x -> {
               try {
                  if (var2.getProperty(var1x.getName()) == null) {
                     var2.setProperty(var1x.getName(), var1x.getValue());
                  }
               } catch (IllegalStateException var2x) {
                  throw b(var2x);
               }
            });
         }
      } catch (IllegalStateException var3) {
         throw b(var3);
      }
   }

   public ServerModuleFileDTO.ServerModuleFilesPayload deleteServerModuleFiles(List<String> var1, DataFetchingEnvironment var2) {
      ServerModuleFileDTO.ServerModuleFilesPayload var3 = new ServerModuleFileDTO.ServerModuleFilesPayload();

      try {
         if (var1.isEmpty()) {
            return var3;
         }
      } catch (IllegalStateException var4) {
         throw b(var4);
      }

      return this.execute(var2, (var3x, var4x) -> {
         var1.forEach(var4xx -> this.doDeleteSilently(var4xx, var3x, var3, var4x));
         return var3;
      });
   }

   protected ServerModuleFile findByInput(ServerModuleFileDTO.ServerModuleFileInput var1) throws FindException {
      return this.findByName(var1.getName());
   }

   protected ServerModuleFile toEntity(ServerModuleFileDTO.ServerModuleFileInput param1) {
      // $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:
      // 00: aload 1
      // 01: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput.getFilePart ()Lcom/l7tech/external/assertions/gatewaygraphql/server/resolver/FilePart;
      // 04: astore 3
      // 05: aload 3
      // 06: ifnonnull 19
      // 09: getstatic com/l7tech/objectmodel/EntityType.SERVER_MODULE_FILE Lcom/l7tech/objectmodel/EntityType;
      // 0c: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.e [Ljava/lang/String;
      // 0f: bipush 5
      // 10: aaload
      // 11: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/error/GatewayEntityError.newCreateMutationException (Lcom/l7tech/objectmodel/EntityType;Ljava/lang/String;)Lcom/l7tech/external/assertions/gatewaygraphql/server/error/GatewayEntityMutationException;
      // 14: athrow
      // 15: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 18: athrow
      // 19: aload 3
      // 1a: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/FilePart.getFilename ()Ljava/lang/String;
      // 1d: astore 4
      // 1f: aload 4
      // 21: ifnull 58
      // 24: aload 4
      // 26: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.e [Ljava/lang/String;
      // 29: bipush 8
      // 2b: aaload
      // 2c: invokevirtual java/lang/String.endsWith (Ljava/lang/String;)Z
      // 2f: ifne 4e
      // 32: goto 39
      // 35: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 38: athrow
      // 39: aload 4
      // 3b: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.e [Ljava/lang/String;
      // 3e: bipush 14
      // 40: aaload
      // 41: invokevirtual java/lang/String.endsWith (Ljava/lang/String;)Z
      // 44: ifeq 58
      // 47: goto 4e
      // 4a: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 4d: athrow
      // 4e: aload 0
      // 4f: aload 1
      // 50: aload 3
      // 51: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.a (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput;Lcom/l7tech/external/assertions/gatewaygraphql/server/resolver/FilePart;)Lcom/l7tech/gateway/common/module/ServerModuleFile;
      // 54: astore 2
      // 55: goto 5f
      // 58: aload 0
      // 59: aload 1
      // 5a: aload 3
      // 5b: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput;Lcom/l7tech/external/assertions/gatewaygraphql/server/resolver/FilePart;)Lcom/l7tech/gateway/common/module/ServerModuleFile;
      // 5e: astore 2
      // 5f: aload 2
      // 60: areturn
      // try (3 -> 11): 11 java/lang/IllegalStateException
      // try (16 -> 24): 25 java/lang/IllegalStateException
      // try (18 -> 33): 34 java/lang/IllegalStateException
   }

   protected ServerModuleFileDTO toEntityDTO(ServerModuleFile var1) {
      return new ServerModuleFileDTO(this.a(var1));
   }

   protected ServerModuleFileDTO.ServerModuleFileInput toEntityInput(EntityMappingInstruction var1) {
      ServerModuleFileDTO.ServerModuleFileInput var2 = new ServerModuleFileDTO.ServerModuleFileInput();
      var2.setName(var1.getIdentityValue());
      return var2;
   }

   private ServerModuleFile a(ServerModuleFileDTO.ServerModuleFileInput var1, FilePart var2) {
      SignedZip var3 = new SignedZip(TrustedSignerCertsHelper.getTrustedCertificates(this.c));

      try {
         ByteLimitInputStream var10001 = new ByteLimitInputStream(var2.getInputStreamSupplier().get(), 4096, this.a());
         String[] var7 = e;
         ServerModuleFilePayload var4 = (ServerModuleFilePayload)var3.load(
            var10001,
            new ServerModuleFilePayloadFactory(new CustomAssertionsScannerHelper(var7[9]), new ModularAssertionsScannerHelper(var7[16]), var2.getFilename())
         );

         ServerModuleFile var6;
         try {
            ServerModuleFile var5 = var4.create();
            var5.setName(var1.getName());
            var6 = var5;
         } catch (Throwable var10) {
            if (var4 != null) {
               try {
                  var4.close();
               } catch (Throwable var8) {
                  var10.addSuppressed(var8);
               }
            }

            throw var10;
         }

         try {
            if (var4 != null) {
               var4.close();
            }

            return var6;
         } catch (Throwable var9) {
            throw b(var9);
         }
      } catch (IOException | SignatureException var11) {
         throw new GatewayEntityMutationException(EntityType.SERVER_MODULE_FILE, e[19] + ExceptionUtils.getMessageWithCause(var11), var11);
      }
   }

   private ServerModuleFile b(ServerModuleFileDTO.ServerModuleFileInput param1, FilePart param2) {
      // $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:
      // 00: new com/l7tech/gateway/common/module/ServerModuleFile
      // 03: dup
      // 04: invokespecial com/l7tech/gateway/common/module/ServerModuleFile.<init> ()V
      // 07: astore 3
      // 08: aload 2
      // 09: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/FilePart.getFilename ()Ljava/lang/String;
      // 0c: astore 4
      // 0e: aload 3
      // 0f: aload 1
      // 10: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput.getName ()Ljava/lang/String;
      // 13: invokevirtual com/l7tech/gateway/common/module/ServerModuleFile.setName (Ljava/lang/String;)V
      // 16: aload 1
      // 17: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput.getModuleType ()Lcom/l7tech/gateway/common/module/ModuleType;
      // 1a: ifnull 2c
      // 1d: aload 3
      // 1e: aload 1
      // 1f: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput.getModuleType ()Lcom/l7tech/gateway/common/module/ModuleType;
      // 22: invokevirtual com/l7tech/gateway/common/module/ServerModuleFile.setModuleType (Lcom/l7tech/gateway/common/module/ModuleType;)V
      // 25: goto 56
      // 28: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 2b: athrow
      // 2c: aload 3
      // 2d: aload 4
      // 2f: ifnull 50
      // 32: aload 4
      // 34: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.e [Ljava/lang/String;
      // 37: bipush 4
      // 38: aaload
      // 39: invokevirtual java/lang/String.endsWith (Ljava/lang/String;)Z
      // 3c: ifeq 50
      // 3f: goto 46
      // 42: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 45: athrow
      // 46: getstatic com/l7tech/gateway/common/module/ModuleType.MODULAR_ASSERTION Lcom/l7tech/gateway/common/module/ModuleType;
      // 49: goto 53
      // 4c: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 4f: athrow
      // 50: getstatic com/l7tech/gateway/common/module/ModuleType.CUSTOM_ASSERTION Lcom/l7tech/gateway/common/module/ModuleType;
      // 53: invokevirtual com/l7tech/gateway/common/module/ServerModuleFile.setModuleType (Lcom/l7tech/gateway/common/module/ModuleType;)V
      // 56: aload 0
      // 57: aload 1
      // 58: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.a (Lcom/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput;)Ljava/lang/String;
      // 5b: astore 5
      // 5d: aload 2
      // 5e: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/FilePart.getInputStreamSupplier ()Ljava/util/function/Supplier;
      // 61: invokeinterface java/util/function/Supplier.get ()Ljava/lang/Object; 1
      // 66: checkcast java/io/InputStream
      // 69: aload 0
      // 6a: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.a ()J
      // 6d: l2i
      // 6e: invokestatic com/l7tech/util/IOUtils.slurpStream (Ljava/io/InputStream;I)[B
      // 71: astore 6
      // 73: aload 6
      // 75: invokestatic com/l7tech/gateway/common/module/ModuleDigest.digest ([B)[B
      // 78: invokestatic com/l7tech/util/HexUtils.hexDump ([B)Ljava/lang/String;
      // 7b: astore 7
      // 7d: aload 3
      // 7e: aload 7
      // 80: invokevirtual com/l7tech/gateway/common/module/ServerModuleFile.setModuleSha256 (Ljava/lang/String;)V
      // 83: new java/io/ByteArrayInputStream
      // 86: dup
      // 87: aload 6
      // 89: invokespecial java/io/ByteArrayInputStream.<init> ([B)V
      // 8c: aload 5
      // 8e: aload 0
      // 8f: getfield com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.c Lcom/l7tech/gateway/common/security/signer/TrustedSignerCertsManager;
      // 92: invokestatic com/l7tech/gateway/common/security/signer/TrustedSignerCertsHelper.getTrustedCertificates (Lcom/l7tech/gateway/common/security/signer/TrustedSignerCertsManager;)Ljava/util/Collection;
      // 95: invokestatic com/l7tech/gateway/common/security/signer/SignerUtils.verifySignatureAndIssuer (Ljava/io/InputStream;Ljava/lang/String;Ljava/util/Collection;)V
      // 98: aload 3
      // 99: aload 6
      // 9b: aload 7
      // 9d: aload 5
      // 9f: invokevirtual com/l7tech/gateway/common/module/ServerModuleFile.createData ([BLjava/lang/String;Ljava/lang/String;)V
      // a2: aload 3
      // a3: getstatic com/l7tech/gateway/common/module/ServerModuleFile.PROP_SIZE Ljava/lang/String;
      // a6: aload 6
      // a8: arraylength
      // a9: invokestatic java/lang/String.valueOf (I)Ljava/lang/String;
      // ac: invokevirtual com/l7tech/gateway/common/module/ServerModuleFile.setProperty (Ljava/lang/String;Ljava/lang/String;)V
      // af: aload 4
      // b1: ifnull c4
      // b4: aload 3
      // b5: getstatic com/l7tech/gateway/common/module/ServerModuleFile.PROP_FILE_NAME Ljava/lang/String;
      // b8: aload 4
      // ba: invokevirtual com/l7tech/gateway/common/module/ServerModuleFile.setProperty (Ljava/lang/String;Ljava/lang/String;)V
      // bd: goto c4
      // c0: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // c3: athrow
      // c4: goto e6
      // c7: astore 6
      // c9: new com/l7tech/external/assertions/gatewaygraphql/server/error/GatewayEntityMutationException
      // cc: dup
      // cd: getstatic com/l7tech/objectmodel/EntityType.SERVER_MODULE_FILE Lcom/l7tech/objectmodel/EntityType;
      // d0: aload 6
      // d2: invokestatic com/l7tech/util/ExceptionUtils.getMessageWithCause (Ljava/lang/Throwable;)Ljava/lang/String;
      // d5: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.e [Ljava/lang/String;
      // d8: bipush 0
      // d9: aaload
      // da: swap
      // db: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001" ]
      // e0: aload 6
      // e2: invokespecial com/l7tech/external/assertions/gatewaygraphql/server/error/GatewayEntityMutationException.<init> (Lcom/l7tech/objectmodel/EntityType;Ljava/lang/String;Ljava/lang/Throwable;)V
      // e5: athrow
      // e6: aload 3
      // e7: areturn
      // try (56 -> 85): 86 java/io/IOException
      // try (24 -> 35): 35 java/io/IOException
      // try (21 -> 30): 31 java/io/IOException
      // try (7 -> 19): 19 java/io/IOException
      // try (43 -> 88): 89 java/io/IOException
      // try (43 -> 88): 89 java/security/SignatureException
   }

   private String a(ServerModuleFileDTO.ServerModuleFileInput param1) {
      // $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:
      // 00: aload 1
      // 01: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput.getSignature ()Ljava/lang/String;
      // 04: invokestatic org/apache/commons/lang3/StringUtils.isEmpty (Ljava/lang/CharSequence;)Z
      // 07: ifne 1b
      // 0a: aload 1
      // 0b: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput.getSignerCertBase64 ()Ljava/lang/String;
      // 0e: invokestatic org/apache/commons/lang3/StringUtils.isEmpty (Ljava/lang/CharSequence;)Z
      // 11: ifeq 2c
      // 14: goto 1b
      // 17: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 1a: athrow
      // 1b: new com/l7tech/external/assertions/gatewaygraphql/server/error/MissingDataException
      // 1e: dup
      // 1f: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.e [Ljava/lang/String;
      // 22: bipush 3
      // 23: aaload
      // 24: invokespecial com/l7tech/external/assertions/gatewaygraphql/server/error/MissingDataException.<init> (Ljava/lang/String;)V
      // 27: athrow
      // 28: invokestatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.b (Ljava/lang/Throwable;)Ljava/lang/Throwable;
      // 2b: athrow
      // 2c: new java/io/StringWriter
      // 2f: dup
      // 30: invokespecial java/io/StringWriter.<init> ()V
      // 33: astore 2
      // 34: new java/util/Properties
      // 37: dup
      // 38: invokespecial java/util/Properties.<init> ()V
      // 3b: astore 3
      // 3c: aload 3
      // 3d: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.e [Ljava/lang/String;
      // 40: astore 5
      // 42: aload 5
      // 44: bipush 12
      // 46: aaload
      // 47: aload 1
      // 48: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput.getSignerCertBase64 ()Ljava/lang/String;
      // 4b: invokevirtual java/util/Properties.setProperty (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
      // 4e: pop
      // 4f: aload 3
      // 50: aload 5
      // 52: bipush 17
      // 54: aaload
      // 55: aload 1
      // 56: invokevirtual com/l7tech/external/assertions/gatewaygraphql/server/data/ServerModuleFileDTO$ServerModuleFileInput.getSignature ()Ljava/lang/String;
      // 59: invokevirtual java/util/Properties.setProperty (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
      // 5c: pop
      // 5d: aload 3
      // 5e: aload 2
      // 5f: aload 5
      // 61: bipush 11
      // 63: aaload
      // 64: invokevirtual java/util/Properties.store (Ljava/io/Writer;Ljava/lang/String;)V
      // 67: aload 2
      // 68: invokevirtual java/io/StringWriter.flush ()V
      // 6b: aload 2
      // 6c: invokevirtual java/io/StringWriter.toString ()Ljava/lang/String;
      // 6f: astore 4
      // 71: aload 2
      // 72: invokevirtual java/io/StringWriter.close ()V
      // 75: aload 4
      // 77: areturn
      // 78: astore 3
      // 79: aload 2
      // 7a: invokevirtual java/io/StringWriter.close ()V
      // 7d: goto 88
      // 80: astore 4
      // 82: aload 3
      // 83: aload 4
      // 85: invokevirtual java/lang/Throwable.addSuppressed (Ljava/lang/Throwable;)V
      // 88: aload 3
      // 89: athrow
      // 8a: astore 2
      // 8b: new com/l7tech/external/assertions/gatewaygraphql/server/error/GatewayEntityMutationException
      // 8e: dup
      // 8f: getstatic com/l7tech/objectmodel/EntityType.SERVER_MODULE_FILE Lcom/l7tech/objectmodel/EntityType;
      // 92: aload 2
      // 93: invokestatic com/l7tech/util/ExceptionUtils.getMessageWithCause (Ljava/lang/Throwable;)Ljava/lang/String;
      // 96: getstatic com/l7tech/external/assertions/gatewaygraphql/server/resolver/mutation/ServerModuleFileMutationResolver.e [Ljava/lang/String;
      // 99: bipush 13
      // 9b: aaload
      // 9c: swap
      // 9d: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; bsm=java/lang/invoke/StringConcatFactory.makeConcatWithConstants (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; args=[ "\u0001\u0001" ]
      // a2: aload 2
      // a3: invokespecial com/l7tech/external/assertions/gatewaygraphql/server/error/GatewayEntityMutationException.<init> (Lcom/l7tech/objectmodel/EntityType;Ljava/lang/String;Ljava/lang/Throwable;)V
      // a6: athrow
      // try (4 -> 18): 18 java/lang/Throwable
      // try (0 -> 8): 9 java/lang/Throwable
      // try (24 -> 57): 61 java/lang/Throwable
      // try (62 -> 64): 65 java/lang/Throwable
      // try (20 -> 59): 71 java/io/IOException
      // try (61 -> 71): 71 java/io/IOException
   }

   private ServerModuleFileHelper a(ServerModuleFile var1) {
      return new ServerModuleFileHelper(var1);
   }

   private long a() {
      return this.d.getLongProperty(e[18], 20971520L);
   }

   private boolean b() {
      try {
         if (!this.entityManager.isModuleUploadEnabled()) {
            return true;
         }
      } catch (IllegalStateException var1) {
         throw b(var1);
      }

      return false;
   }

   static {
      String[] var5 = new String[20];
      int var3 = 0;
      String var2 = "G\t\u0014\u007foB/l\u0018\tes\u0016/p\u001e\u00020j\n#n\u001eF`o\r)g\b\u0015ys\u0005jv\u0013\u00030P\r.w\u0017\u00030y\u0003>cAF\u0019v\t\u0013ci\u0007.Q\u0012\u0001~x\u0010\tg\t\u0012cP\u0003$c\u001c\u0003b@Q\u001e\u0014fx\u0010jo\u0014\u0002eq\u0007jd\u0012\nu=\u0007$v\u0012\u0012i=\u00072k\b\u0012c=\u0003$f[\u0014ul\u0017#p\u001e\u00150s\rjd\u000e\u0014du\u00078\"\u0018\u000eqs\u0005/q$O\u0014\u0002eq\u0007jQ\u0012\u0001~|\u0016?p\u001eFtx\u0016+k\u0017\u00150|\u0010/\"\u0016\u000fcn\u000b$e\u0004,\u001a\u0007b\u001aO\u0014\u0002eq\u0007jf\u001a\u0012q=\u0006%g\bF~r\u0016jg\u0003\u000fci Q\u001e\u0014fx\u0010jo\u0014\u0002eq\u0007jw\u000b\n\u007f|\u0006jk\bFtt\u0011+`\u0017\u0003t/Q\u001e\u0014fx\u0010jo\u0014\u0002eq\u0007jd\u0012\nu=\u0007$v\u0012\u0012i=\u0017:f\u001a\u0012u=\u000b9\"\u000e\bch\u0012:m\t\u0012uy\u0005,\b\fqo\u001ca\u000e\u0015dr\u000f\u0015c\b\u0015uo\u0016#m\u0015\u0015>m\u0010%r\u001e\u0014dt\u00079\fq\u001e\u0014fx\u0010\tm\u0015\u0000yz\tQ\u0012\u0001~|\u0016?p\u001e\u0004a\u001e\u0014d@G\t\u0014\u007foB/l\u0018\tes\u0016/p\u001e\u00020j\n#n\u001eF`o\u0007:c\t\u000f~zB>j\u001eF]r\u0006?n\u001eFCt\u0005$c\u000f\u0013bxB.g\u000f\u0007yq\u0011p\"\u0005,\b\u0007qo\u0017q\u001e\u0014fx\u0010\u0007m\u001f\u0013|x$#n\u001e+qs\u0003-g\t\u0015O\u0014\u0002eq\u00038C\b\u0015uo\u0016#m\u0015K\\t\u0011>\tq\u0012\u0001~|\u0016?p\u001e";
      int var4 = "G\t\u0014\u007foB/l\u0018\tes\u0016/p\u001e\u00020j\n#n\u001eF`o\r)g\b\u0015ys\u0005jv\u0013\u00030P\r.w\u0017\u00030y\u0003>cAF\u0019v\t\u0013ci\u0007.Q\u0012\u0001~x\u0010\tg\t\u0012cP\u0003$c\u001c\u0003b@Q\u001e\u0014fx\u0010jo\u0014\u0002eq\u0007jd\u0012\nu=\u0007$v\u0012\u0012i=\u00072k\b\u0012c=\u0003$f[\u0014ul\u0017#p\u001e\u00150s\rjd\u000e\u0014du\u00078\"\u0018\u000eqs\u0005/q$O\u0014\u0002eq\u0007jQ\u0012\u0001~|\u0016?p\u001eFtx\u0016+k\u0017\u00150|\u0010/\"\u0016\u000fcn\u000b$e\u0004,\u001a\u0007b\u001aO\u0014\u0002eq\u0007jf\u001a\u0012q=\u0006%g\bF~r\u0016jg\u0003\u000fci Q\u001e\u0014fx\u0010jo\u0014\u0002eq\u0007jw\u000b\n\u007f|\u0006jk\bFtt\u0011+`\u0017\u0003t/Q\u001e\u0014fx\u0010jo\u0014\u0002eq\u0007jd\u0012\nu=\u0007$v\u0012\u0012i=\u0017:f\u001a\u0012u=\u000b9\"\u000e\bch\u0012:m\t\u0012uy\u0005,\b\fqo\u001ca\u000e\u0015dr\u000f\u0015c\b\u0015uo\u0016#m\u0015\u0015>m\u0010%r\u001e\u0014dt\u00079\fq\u001e\u0014fx\u0010\tm\u0015\u0000yz\tQ\u0012\u0001~|\u0016?p\u001e\u0004a\u001e\u0014d@G\t\u0014\u007foB/l\u0018\tes\u0016/p\u001e\u00020j\n#n\u001eF`o\u0007:c\t\u000f~zB>j\u001eF]r\u0006?n\u001eFCt\u0005$c\u000f\u0013bxB.g\u000f\u0007yq\u0011p\"\u0005,\b\u0007qo\u0017q\u001e\u0014fx\u0010\u0007m\u001f\u0013|x$#n\u001e+qs\u0003-g\t\u0015O\u0014\u0002eq\u00038C\b\u0015uo\u0016#m\u0015K\\t\u0011>\tq\u0012\u0001~|\u0016?p\u001e"
         .length();
      char var1 = '4';
      int var7 = -1;

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

         while (true) {
            String var8 = c(var10000, b(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var8;
                  if ((var7 += var1) >= var4) {
                     e = var5;
                     b = Logger.getLogger(ServerModuleFileMutationResolver.class.getName());
                     return;
                  }

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

                  var2 = "E* RL$3Y+'HL\u0010\u0017Z*|QY:\u0011W+|IH.-_574s= K[v\u001bX,=QG\"\u001bD*6\u0004^>\u0017Z*rT[9\u001dS<!MG1^B'7\u0004d9\u001aC#7\u0004M7\nWur";
                  var4 = "E* RL$3Y+'HL\u0010\u0017Z*|QY:\u0011W+|IH.-_574s= K[v\u001bX,=QG\"\u001bD*6\u0004^>\u0017Z*rT[9\u001dS<!MG1^B'7\u0004d9\u001aC#7\u0004M7\nWur"
                     .length();
                  var1 = 31;
                  var7 = -1;
            }

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

   private static Throwable b(Throwable var0) {
      return var0;
   }

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

      return var10000;
   }

   private static String c(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 -> 50;
            case 1 -> 75;
            case 2 -> 86;
            case 3 -> 32;
            case 4 -> 45;
            case 5 -> 82;
            default -> 122;
         });
      }

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