package com.l7tech.server.policy.assertion;

import com.l7tech.common.mime.ContentTypeHeader;
import com.l7tech.common.mime.NoSuchPartException;
import com.l7tech.common.mime.PartInfo;
import com.l7tech.message.Message;
import com.l7tech.policy.assertion.AssertionStatus;
import com.l7tech.policy.assertion.PolicyAssertionException;
import com.l7tech.policy.assertion.SetVariableAssertion;
import com.l7tech.server.StashManagerFactory;
import com.l7tech.server.message.PolicyEnforcementContext;
import com.l7tech.server.policy.variable.ExpandVariables;
import com.l7tech.server.policy.variable.ExpandVariablesTemplate;
import com.l7tech.util.Config;
import com.l7tech.util.DateTimeConfigUtils;
import com.l7tech.util.TimeSource;
import jakarta.inject.Inject;
import jakarta.inject.Named;
import java.io.IOException;
import java.util.Map;

public class ServerSetVariableAssertion extends AbstractServerAssertion<SetVariableAssertion> {
   private final String[] d;
   @Inject
   private DateTimeConfigUtils dateParser;
   @Inject
   private TimeSource timeSource;
   @Inject
   private Config config;
   @Inject
   @Named("stashManagerFactory")
   private StashManagerFactory stashManagerFactory;
   private final ExpandVariablesTemplate e;
   private final String f;
   private static final String[] g;

   public ServerSetVariableAssertion(SetVariableAssertion param1) throws 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:
      // 00: aload 0
      // 01: aload 1
      // 02: invokespecial com/l7tech/server/policy/assertion/AbstractServerAssertion.<init> (Lcom/l7tech/policy/assertion/Assertion;)V
      // 05: aload 0
      // 06: aload 1
      // 07: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getVariablesUsed ()[Ljava/lang/String;
      // 0a: putfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.d [Ljava/lang/String;
      // 0d: aload 0
      // 0e: new com/l7tech/server/policy/variable/ExpandVariablesTemplate
      // 11: dup
      // 12: aload 1
      // 13: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.expression ()Ljava/lang/String;
      // 16: invokespecial com/l7tech/server/policy/variable/ExpandVariablesTemplate.<init> (Ljava/lang/String;)V
      // 19: putfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.e Lcom/l7tech/server/policy/variable/ExpandVariablesTemplate;
      // 1c: aload 0
      // 1d: aload 1
      // 1e: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.expression ()Ljava/lang/String;
      // 21: invokestatic com/l7tech/policy/variable/Syntax.getSingleVariableReferenced (Ljava/lang/String;)Ljava/lang/String;
      // 24: putfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.f Ljava/lang/String;
      // 27: aload 1
      // 28: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getDateFormat ()Ljava/lang/String;
      // 2b: astore 2
      // 2c: aload 2
      // 2d: ifnull 72
      // 30: aload 2
      // 31: invokestatic com/l7tech/policy/variable/Syntax.isAnyVariableReferenced (Ljava/lang/String;)Z
      // 34: ifne 72
      // 37: goto 3e
      // 3a: invokestatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 3d: athrow
      // 3e: aload 2
      // 3f: invokestatic com/l7tech/util/DateTimeConfigUtils.isTimestampFormat (Ljava/lang/String;)Z
      // 42: ifne 72
      // 45: goto 4c
      // 48: invokestatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 4b: athrow
      // 4c: new java/text/SimpleDateFormat
      // 4f: dup
      // 50: aload 2
      // 51: invokespecial java/text/SimpleDateFormat.<init> (Ljava/lang/String;)V
      // 54: pop
      // 55: goto 72
      // 58: invokestatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 5b: athrow
      // 5c: astore 3
      // 5d: new com/l7tech/policy/assertion/PolicyAssertionException
      // 60: dup
      // 61: aload 1
      // 62: aload 2
      // 63: getstatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.g [Ljava/lang/String;
      // 66: bipush 2
      // 67: aaload
      // 68: swap
      // 69: 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" ]
      // 6e: invokespecial com/l7tech/policy/assertion/PolicyAssertionException.<init> (Lcom/l7tech/policy/assertion/Assertion;Ljava/lang/String;)V
      // 71: athrow
      // 72: return
      // try (24 -> 33): 34 java/lang/IllegalArgumentException
      // try (22 -> 27): 28 java/lang/IllegalArgumentException
      // try (36 -> 41): 44 java/lang/IllegalArgumentException
      // try (30 -> 42): 42 com/l7tech/policy/assertion/PolicyAssertionException
   }

   @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 1
      // 001: aload 0
      // 002: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.d [Ljava/lang/String;
      // 005: aload 0
      // 006: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 009: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getVariableMap ([Ljava/lang/String;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/util/Map; 3
      // 00e: astore 2
      // 00f: aload 0
      // 010: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 013: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 016: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getDataType ()Lcom/l7tech/policy/variable/DataType;
      // 019: astore 3
      // 01a: aload 3
      // 01b: getstatic com/l7tech/policy/variable/DataType.STRING Lcom/l7tech/policy/variable/DataType;
      // 01e: if_acmpne 044
      // 021: aload 0
      // 022: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.e Lcom/l7tech/server/policy/variable/ExpandVariablesTemplate;
      // 025: aload 2
      // 026: aload 0
      // 027: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 02a: invokevirtual com/l7tech/server/policy/variable/ExpandVariablesTemplate.process (Ljava/util/Map;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/lang/String;
      // 02d: astore 4
      // 02f: aload 1
      // 030: aload 0
      // 031: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 034: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 037: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getVariableToSet ()Ljava/lang/String;
      // 03a: aload 4
      // 03c: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setVariable (Ljava/lang/String;Ljava/lang/Object;)V 3
      // 041: goto 389
      // 044: aload 3
      // 045: getstatic com/l7tech/policy/variable/DataType.MESSAGE Lcom/l7tech/policy/variable/DataType;
      // 048: if_acmpne 0fb
      // 04b: aload 0
      // 04c: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 04f: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 052: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getContentType ()Ljava/lang/String;
      // 055: invokestatic com/l7tech/common/mime/ContentTypeHeader.parseValue (Ljava/lang/String;)Lcom/l7tech/common/mime/ContentTypeHeader;
      // 058: astore 4
      // 05a: aload 1
      // 05b: new com/l7tech/policy/assertion/MessageTargetableSupport
      // 05e: dup
      // 05f: aload 0
      // 060: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 063: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 066: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getVariableToSet ()Ljava/lang/String;
      // 069: invokespecial com/l7tech/policy/assertion/MessageTargetableSupport.<init> (Ljava/lang/String;)V
      // 06c: bipush 0
      // 06d: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.getOrCreateTargetMessage (Lcom/l7tech/policy/assertion/MessageTargetable;Z)Lcom/l7tech/message/Message; 3
      // 072: astore 5
      // 074: bipush 0
      // 075: istore 6
      // 077: aload 0
      // 078: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.f Ljava/lang/String;
      // 07b: ifnull 093
      // 07e: aload 0
      // 07f: aload 5
      // 081: aload 4
      // 083: aload 0
      // 084: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 087: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 08a: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.expression ()Ljava/lang/String;
      // 08d: aload 2
      // 08e: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.a (Lcom/l7tech/message/Message;Lcom/l7tech/common/mime/ContentTypeHeader;Ljava/lang/String;Ljava/util/Map;)Z
      // 091: istore 6
      // 093: iload 6
      // 095: ifne 0b7
      // 098: aload 0
      // 099: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.e Lcom/l7tech/server/policy/variable/ExpandVariablesTemplate;
      // 09c: aload 2
      // 09d: aload 0
      // 09e: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 0a1: invokevirtual com/l7tech/server/policy/variable/ExpandVariablesTemplate.process (Ljava/util/Map;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/lang/String;
      // 0a4: astore 7
      // 0a6: aload 5
      // 0a8: aload 4
      // 0aa: aload 7
      // 0ac: aload 4
      // 0ae: invokevirtual com/l7tech/common/mime/ContentTypeHeader.getEncoding ()Ljava/nio/charset/Charset;
      // 0b1: invokevirtual java/lang/String.getBytes (Ljava/nio/charset/Charset;)[B
      // 0b4: invokevirtual com/l7tech/message/Message.initialize (Lcom/l7tech/common/mime/ContentTypeHeader;[B)V
      // 0b7: goto 0f8
      // 0ba: astore 5
      // 0bc: aload 0
      // 0bd: getstatic com/l7tech/gateway/common/audit/CommonMessages.TEMPLATE_UNSUPPORTED_VARIABLE Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0c0: bipush 1
      // 0c1: anewarray 169
      // 0c4: dup
      // 0c5: bipush 0
      // 0c6: aload 0
      // 0c7: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 0ca: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 0cd: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getVariableToSet ()Ljava/lang/String;
      // 0d0: aastore
      // 0d1: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 0d4: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0d7: areturn
      // 0d8: astore 5
      // 0da: aload 0
      // 0db: getstatic com/l7tech/gateway/common/audit/AssertionMessages.NO_SUCH_PART Lcom/l7tech/gateway/common/audit/Messages$M;
      // 0de: bipush 2
      // 0df: anewarray 169
      // 0e2: dup
      // 0e3: bipush 0
      // 0e4: aload 0
      // 0e5: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.f Ljava/lang/String;
      // 0e8: aastore
      // 0e9: dup
      // 0ea: bipush 1
      // 0eb: aload 5
      // 0ed: invokevirtual com/l7tech/common/mime/NoSuchPartException.getWhatWasMissing ()Ljava/lang/String;
      // 0f0: aastore
      // 0f1: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 0f4: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 0f7: areturn
      // 0f8: goto 389
      // 0fb: aload 3
      // 0fc: getstatic com/l7tech/policy/variable/DataType.DATE_TIME Lcom/l7tech/policy/variable/DataType;
      // 0ff: if_acmpne 311
      // 102: aload 0
      // 103: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.e Lcom/l7tech/server/policy/variable/ExpandVariablesTemplate;
      // 106: aload 2
      // 107: aload 0
      // 108: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 10b: invokevirtual com/l7tech/server/policy/variable/ExpandVariablesTemplate.process (Ljava/util/Map;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/lang/String;
      // 10e: astore 4
      // 110: aload 0
      // 111: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 114: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 117: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.expression ()Ljava/lang/String;
      // 11a: invokevirtual java/lang/String.isEmpty ()Z
      // 11d: istore 5
      // 11f: iload 5
      // 121: ifeq 137
      // 124: new java/util/Date
      // 127: dup
      // 128: aload 0
      // 129: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.timeSource Lcom/l7tech/util/TimeSource;
      // 12c: invokevirtual com/l7tech/util/TimeSource.currentTimeMillis ()J
      // 12f: invokespecial java/util/Date.<init> (J)V
      // 132: astore 6
      // 134: goto 226
      // 137: aload 0
      // 138: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 13b: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 13e: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getDateFormat ()Ljava/lang/String;
      // 141: astore 7
      // 143: aload 7
      // 145: ifnull 21b
      // 148: aload 7
      // 14a: invokevirtual java/lang/String.trim ()Ljava/lang/String;
      // 14d: invokevirtual java/lang/String.isEmpty ()Z
      // 150: ifne 21b
      // 153: goto 15a
      // 156: invokestatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 159: athrow
      // 15a: aload 7
      // 15c: getstatic com/l7tech/util/DateTimeConfigUtils.TIMESTAMP Ljava/lang/String;
      // 15f: invokevirtual java/lang/String.equalsIgnoreCase (Ljava/lang/String;)Z
      // 162: ifeq 176
      // 165: goto 16c
      // 168: invokestatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 16b: athrow
      // 16c: aload 4
      // 16e: invokestatic com/l7tech/util/DateTimeConfigUtils.parseTimestamp (Ljava/lang/String;)Ljava/util/Date;
      // 171: astore 6
      // 173: goto 226
      // 176: aload 7
      // 178: getstatic com/l7tech/util/DateTimeConfigUtils.MILLISECOND_TIMESTAMP Ljava/lang/String;
      // 17b: invokevirtual java/lang/String.equalsIgnoreCase (Ljava/lang/String;)Z
      // 17e: ifeq 18b
      // 181: aload 4
      // 183: invokestatic com/l7tech/util/DateTimeConfigUtils.parseMilliTimestamp (Ljava/lang/String;)Ljava/util/Date;
      // 186: astore 6
      // 188: goto 226
      // 18b: aload 7
      // 18d: getstatic com/l7tech/util/DateTimeConfigUtils.SECOND_TIMESTAMP Ljava/lang/String;
      // 190: invokevirtual java/lang/String.equalsIgnoreCase (Ljava/lang/String;)Z
      // 193: ifeq 1a0
      // 196: aload 4
      // 198: invokestatic com/l7tech/util/DateTimeConfigUtils.parseSecondTimestamp (Ljava/lang/String;)Ljava/util/Date;
      // 19b: astore 6
      // 19d: goto 226
      // 1a0: aload 7
      // 1a2: aload 2
      // 1a3: aload 0
      // 1a4: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 1a7: invokestatic com/l7tech/server/policy/variable/ExpandVariables.process (Ljava/lang/String;Ljava/util/Map;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/lang/String;
      // 1aa: astore 8
      // 1ac: aload 8
      // 1ae: invokevirtual java/lang/String.trim ()Ljava/lang/String;
      // 1b1: invokevirtual java/lang/String.isEmpty ()Z
      // 1b4: ifeq 1d2
      // 1b7: aload 0
      // 1b8: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SET_VARIABLE_UNRECOGNISED_DATE_FORMAT Lcom/l7tech/gateway/common/audit/Messages$M;
      // 1bb: bipush 1
      // 1bc: anewarray 169
      // 1bf: dup
      // 1c0: bipush 0
      // 1c1: getstatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.g [Ljava/lang/String;
      // 1c4: astore 12
      // 1c6: aload 12
      // 1c8: bipush 0
      // 1c9: aaload
      // 1ca: aastore
      // 1cb: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 1ce: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 1d1: areturn
      // 1d2: new java/text/SimpleDateFormat
      // 1d5: dup
      // 1d6: aload 8
      // 1d8: invokespecial java/text/SimpleDateFormat.<init> (Ljava/lang/String;)V
      // 1db: astore 9
      // 1dd: goto 1ef
      // 1e0: astore 10
      // 1e2: new com/l7tech/util/DateTimeConfigUtils$InvalidDateFormatException
      // 1e5: dup
      // 1e6: aload 10
      // 1e8: invokestatic com/l7tech/util/ExceptionUtils.getMessage (Ljava/lang/Throwable;)Ljava/lang/String;
      // 1eb: invokespecial com/l7tech/util/DateTimeConfigUtils$InvalidDateFormatException.<init> (Ljava/lang/String;)V
      // 1ee: athrow
      // 1ef: aload 9
      // 1f1: aload 0
      // 1f2: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.config Lcom/l7tech/util/Config;
      // 1f5: getstatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.g [Ljava/lang/String;
      // 1f8: astore 12
      // 1fa: aload 12
      // 1fc: bipush 4
      // 1fd: aaload
      // 1fe: bipush 0
      // 1ff: invokeinterface com/l7tech/util/Config.getBooleanProperty (Ljava/lang/String;Z)Z 3
      // 204: invokevirtual java/text/SimpleDateFormat.setLenient (Z)V
      // 207: aload 9
      // 209: invokestatic com/l7tech/util/DateUtils.getZuluTimeZone ()Ljava/util/TimeZone;
      // 20c: invokevirtual java/text/SimpleDateFormat.setTimeZone (Ljava/util/TimeZone;)V
      // 20f: aload 9
      // 211: aload 4
      // 213: invokevirtual java/text/SimpleDateFormat.parse (Ljava/lang/String;)Ljava/util/Date;
      // 216: astore 6
      // 218: goto 226
      // 21b: aload 0
      // 21c: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.dateParser Lcom/l7tech/util/DateTimeConfigUtils;
      // 21f: aload 4
      // 221: invokevirtual com/l7tech/util/DateTimeConfigUtils.parseDateFromString (Ljava/lang/String;)Ljava/util/Date;
      // 224: astore 6
      // 226: aload 0
      // 227: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 22a: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 22d: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getDateOffsetExpression ()Ljava/lang/String;
      // 230: astore 7
      // 232: aload 7
      // 234: ifnull 2b1
      // 237: aload 7
      // 239: invokevirtual java/lang/String.trim ()Ljava/lang/String;
      // 23c: invokevirtual java/lang/String.isEmpty ()Z
      // 23f: ifne 2b1
      // 242: goto 249
      // 245: invokestatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 248: athrow
      // 249: aload 7
      // 24b: aload 2
      // 24c: aload 0
      // 24d: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 250: invokestatic com/l7tech/server/policy/variable/ExpandVariables.process (Ljava/lang/String;Ljava/util/Map;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/lang/String;
      // 253: astore 8
      // 255: aload 8
      // 257: invokestatic java/lang/Integer.valueOf (Ljava/lang/String;)Ljava/lang/Integer;
      // 25a: astore 9
      // 25c: goto 275
      // 25f: astore 10
      // 261: aload 0
      // 262: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SET_VARIABLE_INVALID_DATE_OFFSET Lcom/l7tech/gateway/common/audit/Messages$M;
      // 265: bipush 1
      // 266: anewarray 169
      // 269: dup
      // 26a: bipush 0
      // 26b: aload 8
      // 26d: aastore
      // 26e: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 271: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 274: areturn
      // 275: aload 0
      // 276: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 279: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 27c: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getDateOffsetField ()I
      // 27f: istore 10
      // 281: invokestatic java/util/Calendar.getInstance ()Ljava/util/Calendar;
      // 284: astore 11
      // 286: aload 11
      // 288: aload 6
      // 28a: invokevirtual java/util/Calendar.setTime (Ljava/util/Date;)V
      // 28d: aload 11
      // 28f: iload 10
      // 291: aload 9
      // 293: invokevirtual java/lang/Integer.intValue ()I
      // 296: invokevirtual java/util/Calendar.add (II)V
      // 299: aload 1
      // 29a: aload 0
      // 29b: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 29e: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 2a1: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getVariableToSet ()Ljava/lang/String;
      // 2a4: aload 11
      // 2a6: invokevirtual java/util/Calendar.getTime ()Ljava/util/Date;
      // 2a9: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setVariable (Ljava/lang/String;Ljava/lang/Object;)V 3
      // 2ae: goto 2c3
      // 2b1: aload 1
      // 2b2: aload 0
      // 2b3: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 2b6: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 2b9: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getVariableToSet ()Ljava/lang/String;
      // 2bc: aload 6
      // 2be: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setVariable (Ljava/lang/String;Ljava/lang/Object;)V 3
      // 2c3: goto 30e
      // 2c6: astore 5
      // 2c8: aload 0
      // 2c9: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SET_VARIABLE_UNABLE_TO_PARSE_DATE Lcom/l7tech/gateway/common/audit/Messages$M;
      // 2cc: bipush 1
      // 2cd: anewarray 169
      // 2d0: dup
      // 2d1: bipush 0
      // 2d2: aload 4
      // 2d4: aastore
      // 2d5: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 2d8: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 2db: areturn
      // 2dc: astore 5
      // 2de: aload 0
      // 2df: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SET_VARIABLE_UNRECOGNISED_DATE_FORMAT Lcom/l7tech/gateway/common/audit/Messages$M;
      // 2e2: bipush 1
      // 2e3: anewarray 169
      // 2e6: dup
      // 2e7: bipush 0
      // 2e8: aload 5
      // 2ea: invokevirtual com/l7tech/util/DateTimeConfigUtils$UnknownDateFormatException.getMessage ()Ljava/lang/String;
      // 2ed: aastore
      // 2ee: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 2f1: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 2f4: areturn
      // 2f5: astore 5
      // 2f7: aload 0
      // 2f8: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SET_VARIABLE_INVALID_DATE_PATTERN Lcom/l7tech/gateway/common/audit/Messages$M;
      // 2fb: bipush 1
      // 2fc: anewarray 169
      // 2ff: dup
      // 300: bipush 0
      // 301: aload 5
      // 303: invokevirtual com/l7tech/util/DateTimeConfigUtils$InvalidDateFormatException.getMessage ()Ljava/lang/String;
      // 306: aastore
      // 307: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 30a: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 30d: areturn
      // 30e: goto 389
      // 311: aload 3
      // 312: getstatic com/l7tech/policy/variable/DataType.INTEGER Lcom/l7tech/policy/variable/DataType;
      // 315: if_acmpne 35a
      // 318: aload 0
      // 319: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.e Lcom/l7tech/server/policy/variable/ExpandVariablesTemplate;
      // 31c: aload 2
      // 31d: aload 0
      // 31e: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.getAudit ()Lcom/l7tech/gateway/common/audit/Audit;
      // 321: invokevirtual com/l7tech/server/policy/variable/ExpandVariablesTemplate.process (Ljava/util/Map;Lcom/l7tech/gateway/common/audit/Audit;)Ljava/lang/String;
      // 324: astore 4
      // 326: aload 1
      // 327: aload 0
      // 328: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 32b: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 32e: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getVariableToSet ()Ljava/lang/String;
      // 331: aload 4
      // 333: invokestatic java/lang/Integer.parseInt (Ljava/lang/String;)I
      // 336: invokestatic java/lang/Integer.valueOf (I)Ljava/lang/Integer;
      // 339: invokeinterface com/l7tech/server/message/PolicyEnforcementContext.setVariable (Ljava/lang/String;Ljava/lang/Object;)V 3
      // 33e: goto 357
      // 341: astore 5
      // 343: aload 0
      // 344: getstatic com/l7tech/gateway/common/audit/AssertionMessages.SET_VARIABLE_UNABLE_TO_PARSE_INTEGER Lcom/l7tech/gateway/common/audit/Messages$M;
      // 347: bipush 1
      // 348: anewarray 169
      // 34b: dup
      // 34c: bipush 0
      // 34d: aload 4
      // 34f: aastore
      // 350: invokevirtual com/l7tech/server/policy/assertion/ServerSetVariableAssertion.logAndAudit (Lcom/l7tech/gateway/common/audit/AuditDetailMessage;[Ljava/lang/String;)V
      // 353: getstatic com/l7tech/policy/assertion/AssertionStatus.FALSIFIED Lcom/l7tech/policy/assertion/AssertionStatus;
      // 356: areturn
      // 357: goto 389
      // 35a: new java/lang/RuntimeException
      // 35d: dup
      // 35e: aload 3
      // 35f: invokevirtual com/l7tech/policy/variable/DataType.getName ()Ljava/lang/String;
      // 362: aload 0
      // 363: getfield com/l7tech/server/policy/assertion/ServerSetVariableAssertion.assertion Lcom/l7tech/policy/assertion/Assertion;
      // 366: checkcast com/l7tech/policy/assertion/SetVariableAssertion
      // 369: invokevirtual com/l7tech/policy/assertion/SetVariableAssertion.getVariableToSet ()Ljava/lang/String;
      // 36c: getstatic com/l7tech/server/policy/assertion/ServerSetVariableAssertion.g [Ljava/lang/String;
      // 36f: astore 12
      // 371: aload 12
      // 373: bipush 3
      // 374: aaload
      // 375: dup_x2
      // 376: pop
      // 377: aload 12
      // 379: bipush 5
      // 37a: aaload
      // 37b: swap
      // 37c: aload 12
      // 37e: bipush 1
      // 37f: aaload
      // 380: invokedynamic makeConcatWithConstants (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;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\u0001\u0001\u0001" ]
      // 385: invokespecial java/lang/RuntimeException.<init> (Ljava/lang/String;)V
      // 388: athrow
      // 389: getstatic com/l7tech/policy/assertion/AssertionStatus.NONE Lcom/l7tech/policy/assertion/AssertionStatus;
      // 38c: areturn
      // try (39 -> 81): 82 com/l7tech/policy/variable/NoSuchVariableException
      // try (39 -> 81): 97 com/l7tech/common/mime/NoSuchPartException
      // try (149 -> 160): 161 com/l7tech/policy/variable/NoSuchVariableException
      // try (147 -> 153): 154 com/l7tech/policy/variable/NoSuchVariableException
      // try (208 -> 213): 214 java/lang/IllegalArgumentException
      // try (265 -> 268): 269 java/lang/NumberFormatException
      // try (126 -> 207): 313 java/text/ParseException
      // try (250 -> 256): 257 com/l7tech/policy/variable/NoSuchVariableException
      // try (208 -> 280): 313 java/text/ParseException
      // try (281 -> 312): 313 java/text/ParseException
      // try (126 -> 207): 325 com/l7tech/util/DateTimeConfigUtils$UnknownDateFormatException
      // try (208 -> 280): 325 com/l7tech/util/DateTimeConfigUtils$UnknownDateFormatException
      // try (281 -> 312): 325 com/l7tech/util/DateTimeConfigUtils$UnknownDateFormatException
      // try (126 -> 207): 338 com/l7tech/util/DateTimeConfigUtils$InvalidDateFormatException
      // try (208 -> 280): 338 com/l7tech/util/DateTimeConfigUtils$InvalidDateFormatException
      // try (281 -> 312): 338 com/l7tech/util/DateTimeConfigUtils$InvalidDateFormatException
      // try (362 -> 371): 372 java/lang/NumberFormatException
   }

   private boolean a(Message var1, ContentTypeHeader var2, String var3, Map<String, Object> var4) throws IOException, NoSuchPartException {
      boolean var5 = false;
      Object var6 = ExpandVariables.processSingleVariableAsObject(var3, var4, this.getAudit());
      if (var6 instanceof Message var7) {
         var1.initialize(this.stashManagerFactory.createStashManager(), var2, var7.getMimeKnob().getEntireMessageBodyAsInputStream(false));
         var5 = true;
      } else if (var6 instanceof PartInfo var9) {
         var1.initialize(this.stashManagerFactory.createStashManager(), var2, var9.getInputStream(false));
         var5 = true;
      }

      try {
         if (var5) {
            var1.getMimeKnob().getEntireMessageBodyAsInputStream().close();
         }

         return var5;
      } catch (IOException var8) {
         throw a(var8);
      }
   }

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

   static {
      String[] var5 = new String[6];
      int var3 = 0;
      String var2 = "4/\u00031!\r\u0015ZfU\u0017\u000bsc3lB\u0002\u0002:a|zN\u0017\u0013 '\"]gWV\u000eww\u007fmN\u0013\tnbw(Z\u0013\u0013:a|z\u0003\u0012\u0006nf3|Z\u0006\u0002:";
      int var4 = "4/\u00031!\r\u0015ZfU\u0017\u000bsc3lB\u0002\u0002:a|zN\u0017\u0013 '\"]gWV\u000eww\u007fmN\u0013\tnbw(Z\u0013\u0013:a|z\u0003\u0012\u0006nf3|Z\u0006\u0002:"
         .length();
      char var1 = 2;
      int var7 = -1;

      label24:
      while (true) {
         byte var10000 = 12;
         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) {
                     g = var5;
                     return;
                  }

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

                  var2 = "\u000f\u00181'tR\f\t\u00144'm\u0011\u0011\u0000Y0lv\f\u001d\u0002\u0003\u0018hl\u0000>\u0003\u00051hl\u0011L_*hj\f\u0019\u000e\u001b9)v\u0004\u0015\tJ~";
                  var4 = "\u000f\u00181'tR\f\t\u00144'm\u0011\u0011\u0000Y0lv\f\u001d\u0002\u0003\u0018hl\u0000>\u0003\u00051hl\u0011L_*hj\f\u0019\u000e\u001b9)v\u0004\u0015\tJ~"
                     .length();
                  var1 = '!';
                  var7 = -1;
            }

            var10000 = 115;
            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] ^ 11);
      }

      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 -> 31;
            case 1 -> 4;
            case 2 -> 47;
            case 3 -> 122;
            case 4 -> 107;
            case 5 -> 22;
            default -> 11;
         });
      }

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