package com.l7tech.xml;

import com.l7tech.common.io.XmlUtil;
import com.l7tech.util.Charsets;
import com.l7tech.util.DomUtils;
import com.l7tech.util.PoolByteArrayOutputStream;
import com.l7tech.xml.xpath.CompiledXpath;
import com.l7tech.xml.xpath.DomCompiledXpath;
import com.l7tech.xml.xpath.XpathResult;
import com.l7tech.xml.xpath.XpathVariableFinder;
import java.io.IOException;
import java.io.OutputStream;
import java.util.LinkedList;
import javax.xml.xpath.XPathExpressionException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;

public class DomElementCursor extends ElementCursor {
   private final Document a;
   private Node b;
   private LinkedList<Node> c = null;
   private static final String[] f;

   public DomElementCursor(Node var1) {
      this(var1, true);
   }

   public DomElementCursor(Node param1, boolean 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: aload 0
      // 01: invokespecial com/l7tech/xml/ElementCursor.<init> ()V
      // 04: aload 0
      // 05: aconst_null
      // 06: putfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 09: aload 1
      // 0a: ifnonnull 1d
      // 0d: new java/lang/IllegalArgumentException
      // 10: dup
      // 11: getstatic com/l7tech/xml/DomElementCursor.f [Ljava/lang/String;
      // 14: astore 3
      // 15: aload 3
      // 16: bipush 7
      // 18: aaload
      // 19: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 1c: athrow
      // 1d: aload 1
      // 1e: invokeinterface org/w3c/dom/Node.getNodeType ()S 1
      // 23: bipush 1
      // 24: if_icmpeq 4a
      // 27: aload 1
      // 28: invokeinterface org/w3c/dom/Node.getNodeType ()S 1
      // 2d: bipush 9
      // 2f: if_icmpeq 4a
      // 32: goto 39
      // 35: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 38: athrow
      // 39: new java/lang/IllegalArgumentException
      // 3c: dup
      // 3d: getstatic com/l7tech/xml/DomElementCursor.f [Ljava/lang/String;
      // 40: bipush 3
      // 41: aaload
      // 42: invokespecial java/lang/IllegalArgumentException.<init> (Ljava/lang/String;)V
      // 45: athrow
      // 46: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 49: athrow
      // 4a: aload 0
      // 4b: aload 1
      // 4c: invokeinterface org/w3c/dom/Node.getNodeType ()S 1
      // 51: bipush 9
      // 53: if_icmpne 61
      // 56: aload 1
      // 57: checkcast org/w3c/dom/Document
      // 5a: goto 67
      // 5d: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 60: athrow
      // 61: aload 1
      // 62: invokeinterface org/w3c/dom/Node.getOwnerDocument ()Lorg/w3c/dom/Document; 1
      // 67: putfield com/l7tech/xml/DomElementCursor.a Lorg/w3c/dom/Document;
      // 6a: aload 0
      // 6b: iload 2
      // 6c: ifeq 7f
      // 6f: aload 0
      // 70: getfield com/l7tech/xml/DomElementCursor.a Lorg/w3c/dom/Document;
      // 73: invokeinterface org/w3c/dom/Document.getDocumentElement ()Lorg/w3c/dom/Element; 1
      // 78: goto 80
      // 7b: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 7e: athrow
      // 7f: aload 1
      // 80: putfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 83: return
      // try (16 -> 24): 25 java/lang/IllegalArgumentException
      // try (20 -> 34): 34 java/lang/IllegalArgumentException
      // try (36 -> 44): 44 java/lang/IllegalArgumentException
      // try (48 -> 56): 56 java/lang/IllegalArgumentException
   }

   private DomElementCursor(Document var1, Node var2, LinkedList<Node> var3) {
      this.a = var1;
      this.b = var2;
      this.c = var3;
      if (var2.getNodeType() != 1) {
         try {
            if (var2.getNodeType() != 9) {
               throw new IllegalArgumentException(f[1]);
            }
         } catch (IllegalArgumentException var4) {
            throw a(var4);
         }
      }
   }

   public Document getDocument() {
      return this.a;
   }

   @Override
   public ElementCursor duplicate() {
      // $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: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 04: ifnull 2a
      // 07: aload 0
      // 08: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 0b: invokevirtual java/util/LinkedList.isEmpty ()Z
      // 0e: ifne 2a
      // 11: goto 18
      // 14: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 17: athrow
      // 18: new java/util/LinkedList
      // 1b: dup
      // 1c: aload 0
      // 1d: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 20: invokespecial java/util/LinkedList.<init> (Ljava/util/Collection;)V
      // 23: goto 2b
      // 26: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 29: athrow
      // 2a: aconst_null
      // 2b: astore 1
      // 2c: new com/l7tech/xml/DomElementCursor
      // 2f: dup
      // 30: aload 0
      // 31: getfield com/l7tech/xml/DomElementCursor.a Lorg/w3c/dom/Document;
      // 34: aload 0
      // 35: getfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 38: aload 1
      // 39: invokespecial com/l7tech/xml/DomElementCursor.<init> (Lorg/w3c/dom/Document;Lorg/w3c/dom/Node;Ljava/util/LinkedList;)V
      // 3c: areturn
      // try (0 -> 7): 8 java/lang/IllegalArgumentException
      // try (3 -> 16): 16 java/lang/IllegalArgumentException
   }

   @Override
   public void pushPosition() {
      try {
         if (this.c == null) {
            this.c = new LinkedList<>();
         }
      } catch (IllegalArgumentException var1) {
         throw a(var1);
      }

      this.c.addLast(this.b);
   }

   @Override
   public void popPosition() throws IllegalStateException {
      // $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: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 04: ifnull 18
      // 07: aload 0
      // 08: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 0b: invokevirtual java/util/LinkedList.isEmpty ()Z
      // 0e: ifeq 29
      // 11: goto 18
      // 14: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 17: athrow
      // 18: new java/lang/IllegalStateException
      // 1b: dup
      // 1c: getstatic com/l7tech/xml/DomElementCursor.f [Ljava/lang/String;
      // 1f: bipush 2
      // 20: aaload
      // 21: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/String;)V
      // 24: athrow
      // 25: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 28: athrow
      // 29: aload 0
      // 2a: aload 0
      // 2b: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 2e: invokevirtual java/util/LinkedList.removeLast ()Ljava/lang/Object;
      // 31: checkcast org/w3c/dom/Node
      // 34: putfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 37: return
      // try (0 -> 7): 8 java/lang/IllegalStateException
      // try (3 -> 17): 17 java/lang/IllegalStateException
   }

   @Override
   public void popPosition(boolean param1) throws IllegalStateException {
      // $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: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 04: ifnull 18
      // 07: aload 0
      // 08: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 0b: invokevirtual java/util/LinkedList.isEmpty ()Z
      // 0e: ifeq 29
      // 11: goto 18
      // 14: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 17: athrow
      // 18: new java/lang/IllegalStateException
      // 1b: dup
      // 1c: getstatic com/l7tech/xml/DomElementCursor.f [Ljava/lang/String;
      // 1f: bipush 4
      // 20: aaload
      // 21: invokespecial java/lang/IllegalStateException.<init> (Ljava/lang/String;)V
      // 24: athrow
      // 25: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 28: athrow
      // 29: iload 1
      // 2a: ifeq 3c
      // 2d: aload 0
      // 2e: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 31: invokevirtual java/util/LinkedList.removeLast ()Ljava/lang/Object;
      // 34: pop
      // 35: goto 4a
      // 38: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 3b: athrow
      // 3c: aload 0
      // 3d: aload 0
      // 3e: getfield com/l7tech/xml/DomElementCursor.c Ljava/util/LinkedList;
      // 41: invokevirtual java/util/LinkedList.removeLast ()Ljava/lang/Object;
      // 44: checkcast org/w3c/dom/Node
      // 47: putfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 4a: return
      // try (0 -> 7): 8 java/lang/IllegalStateException
      // try (3 -> 17): 17 java/lang/IllegalStateException
      // try (19 -> 26): 26 java/lang/IllegalStateException
   }

   @Override
   public void moveToDocumentElement() {
      this.b = this.a.getDocumentElement();
   }

   @Override
   public void moveToRoot() {
      this.b = this.a;
   }

   @Override
   public boolean moveToParentElement() {
      // $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: getfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 04: invokeinterface org/w3c/dom/Node.getParentNode ()Lorg/w3c/dom/Node; 1
      // 09: astore 1
      // 0a: aload 1
      // 0b: ifnull 2c
      // 0e: aload 1
      // 0f: aload 0
      // 10: getfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 13: if_acmpeq 2c
      // 16: goto 1d
      // 19: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1c: athrow
      // 1d: aload 1
      // 1e: aload 0
      // 1f: getfield com/l7tech/xml/DomElementCursor.a Lorg/w3c/dom/Document;
      // 22: if_acmpne 32
      // 25: goto 2c
      // 28: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 2b: athrow
      // 2c: bipush 0
      // 2d: ireturn
      // 2e: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 31: athrow
      // 32: getstatic com/l7tech/xml/DomElementCursor.d Z
      // 35: ifne 55
      // 38: aload 1
      // 39: invokeinterface org/w3c/dom/Node.getNodeType ()S 1
      // 3e: bipush 1
      // 3f: if_icmpeq 55
      // 42: goto 49
      // 45: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 48: athrow
      // 49: new java/lang/AssertionError
      // 4c: dup
      // 4d: invokespecial java/lang/AssertionError.<init> ()V
      // 50: athrow
      // 51: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 54: athrow
      // 55: aload 0
      // 56: aload 1
      // 57: putfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 5a: bipush 1
      // 5b: ireturn
      // try (4 -> 10): 11 java/lang/IllegalArgumentException
      // try (6 -> 17): 18 java/lang/IllegalArgumentException
      // try (13 -> 22): 22 java/lang/IllegalArgumentException
      // try (24 -> 30): 31 java/lang/IllegalArgumentException
      // try (26 -> 37): 37 java/lang/IllegalArgumentException
   }

   @Override
   public boolean moveToFirstChildElement() {
      Element var1 = DomUtils.findFirstChildElement(this.asDomElement());

      try {
         if (var1 == null) {
            return false;
         }
      } catch (IllegalArgumentException var2) {
         throw a(var2);
      }

      this.b = var1;
      return true;
   }

   @Override
   public boolean moveToNextSiblingElement() {
      // $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: getfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 04: invokeinterface org/w3c/dom/Node.getNextSibling ()Lorg/w3c/dom/Node; 1
      // 09: astore 1
      // 0a: aload 1
      // 0b: ifnull 34
      // 0e: aload 1
      // 0f: invokeinterface org/w3c/dom/Node.getNodeType ()S 1
      // 14: bipush 1
      // 15: if_icmpne 2a
      // 18: goto 1f
      // 1b: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1e: athrow
      // 1f: aload 0
      // 20: aload 1
      // 21: putfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 24: bipush 1
      // 25: ireturn
      // 26: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 29: athrow
      // 2a: aload 1
      // 2b: invokeinterface org/w3c/dom/Node.getNextSibling ()Lorg/w3c/dom/Node; 1
      // 30: astore 1
      // 31: goto 0a
      // 34: bipush 0
      // 35: ireturn
      // try (4 -> 10): 11 java/lang/IllegalArgumentException
      // try (6 -> 18): 18 java/lang/IllegalArgumentException
   }

   @Override
   public boolean moveToNextSiblingElement(String param1, String[] 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: aload 0
      // 01: getfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 04: invokeinterface org/w3c/dom/Node.getNextSibling ()Lorg/w3c/dom/Node; 1
      // 09: astore 3
      // 0a: aload 3
      // 0b: ifnull 5c
      // 0e: aload 3
      // 0f: invokeinterface org/w3c/dom/Node.getNodeType ()S 1
      // 14: bipush 1
      // 15: if_icmpne 52
      // 18: goto 1f
      // 1b: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1e: athrow
      // 1f: aload 1
      // 20: aload 3
      // 21: invokeinterface org/w3c/dom/Node.getLocalName ()Ljava/lang/String; 1
      // 26: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 29: ifeq 52
      // 2c: goto 33
      // 2f: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 32: athrow
      // 33: aload 2
      // 34: aload 3
      // 35: invokeinterface org/w3c/dom/Node.getNamespaceURI ()Ljava/lang/String; 1
      // 3a: invokestatic com/l7tech/util/ArrayUtils.contains ([Ljava/lang/Object;Ljava/lang/Object;)Z
      // 3d: ifeq 52
      // 40: goto 47
      // 43: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 46: athrow
      // 47: aload 0
      // 48: aload 3
      // 49: putfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 4c: bipush 1
      // 4d: ireturn
      // 4e: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 51: athrow
      // 52: aload 3
      // 53: invokeinterface org/w3c/dom/Node.getNextSibling ()Lorg/w3c/dom/Node; 1
      // 58: astore 3
      // 59: goto 0a
      // 5c: bipush 0
      // 5d: ireturn
      // try (4 -> 10): 11 java/lang/IllegalArgumentException
      // try (6 -> 18): 19 java/lang/IllegalArgumentException
      // try (13 -> 26): 27 java/lang/IllegalArgumentException
      // try (21 -> 34): 34 java/lang/IllegalArgumentException
   }

   @Override
   public boolean moveToNextSiblingElement(String param1, String 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: aload 0
      // 01: getfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 04: invokeinterface org/w3c/dom/Node.getNextSibling ()Lorg/w3c/dom/Node; 1
      // 09: astore 3
      // 0a: aload 3
      // 0b: ifnull 5c
      // 0e: aload 3
      // 0f: invokeinterface org/w3c/dom/Node.getNodeType ()S 1
      // 14: bipush 1
      // 15: if_icmpne 52
      // 18: goto 1f
      // 1b: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 1e: athrow
      // 1f: aload 1
      // 20: aload 3
      // 21: invokeinterface org/w3c/dom/Node.getLocalName ()Ljava/lang/String; 1
      // 26: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 29: ifeq 52
      // 2c: goto 33
      // 2f: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 32: athrow
      // 33: aload 2
      // 34: aload 3
      // 35: invokeinterface org/w3c/dom/Node.getNamespaceURI ()Ljava/lang/String; 1
      // 3a: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 3d: ifeq 52
      // 40: goto 47
      // 43: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 46: athrow
      // 47: aload 0
      // 48: aload 3
      // 49: putfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 4c: bipush 1
      // 4d: ireturn
      // 4e: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 51: athrow
      // 52: aload 3
      // 53: invokeinterface org/w3c/dom/Node.getNextSibling ()Lorg/w3c/dom/Node; 1
      // 58: astore 3
      // 59: goto 0a
      // 5c: bipush 0
      // 5d: ireturn
      // try (4 -> 10): 11 java/lang/IllegalArgumentException
      // try (6 -> 18): 19 java/lang/IllegalArgumentException
      // try (13 -> 26): 27 java/lang/IllegalArgumentException
      // try (21 -> 34): 34 java/lang/IllegalArgumentException
   }

   @Override
   public String getAttributeValue(String var1) {
      return this.asDomElement().getAttribute(var1);
   }

   @Override
   public String getAttributeValue(String var1, String var2) {
      return this.asDomElement().getAttributeNS(var2, var1);
   }

   @Override
   public String getAttributeValue(String param1, String[] 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: aload 0
      // 01: getfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 04: invokeinterface org/w3c/dom/Node.getAttributes ()Lorg/w3c/dom/NamedNodeMap; 1
      // 09: astore 3
      // 0a: aload 3
      // 0b: invokeinterface org/w3c/dom/NamedNodeMap.getLength ()I 1
      // 10: istore 4
      // 12: bipush 0
      // 13: istore 5
      // 15: iload 5
      // 17: iload 4
      // 19: if_icmpge 5e
      // 1c: aload 3
      // 1d: iload 5
      // 1f: invokeinterface org/w3c/dom/NamedNodeMap.item (I)Lorg/w3c/dom/Node; 2
      // 24: checkcast org/w3c/dom/Attr
      // 27: astore 6
      // 29: aload 1
      // 2a: aload 6
      // 2c: invokeinterface org/w3c/dom/Attr.getLocalName ()Ljava/lang/String; 1
      // 31: invokevirtual java/lang/String.equals (Ljava/lang/Object;)Z
      // 34: ifeq 58
      // 37: aload 2
      // 38: aload 6
      // 3a: invokeinterface org/w3c/dom/Attr.getNamespaceURI ()Ljava/lang/String; 1
      // 3f: invokestatic com/l7tech/util/ArrayUtils.contains ([Ljava/lang/Object;Ljava/lang/Object;)Z
      // 42: ifeq 58
      // 45: goto 4c
      // 48: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 4b: athrow
      // 4c: aload 6
      // 4e: invokeinterface org/w3c/dom/Attr.getNodeValue ()Ljava/lang/String; 1
      // 53: areturn
      // 54: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 57: athrow
      // 58: iinc 5 1
      // 5b: goto 15
      // 5e: aconst_null
      // 5f: areturn
      // try (17 -> 27): 28 java/lang/IllegalArgumentException
      // try (22 -> 33): 33 java/lang/IllegalArgumentException
   }

   @Override
   public boolean containsMixedModeContent(boolean param1, boolean 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: aload 0
      // 01: getfield com/l7tech/xml/DomElementCursor.b Lorg/w3c/dom/Node;
      // 04: invokeinterface org/w3c/dom/Node.getChildNodes ()Lorg/w3c/dom/NodeList; 1
      // 09: astore 3
      // 0a: bipush 0
      // 0b: istore 4
      // 0d: iload 4
      // 0f: aload 3
      // 10: invokeinterface org/w3c/dom/NodeList.getLength ()I 1
      // 15: if_icmpge a4
      // 18: aload 3
      // 19: iload 4
      // 1b: invokeinterface org/w3c/dom/NodeList.item (I)Lorg/w3c/dom/Node; 2
      // 20: astore 5
      // 22: aload 5
      // 24: invokeinterface org/w3c/dom/Node.getNodeType ()S 1
      // 29: tableswitch 115 1 8 47 47 69 67 115 115 115 54
      // 58: goto 9e
      // 5b: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 5e: athrow
      // 5f: iload 2
      // 60: ifeq 6a
      // 63: goto 9e
      // 66: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 69: athrow
      // 6a: bipush 1
      // 6b: ireturn
      // 6c: bipush 1
      // 6d: ireturn
      // 6e: iload 1
      // 6f: ifeq 9a
      // 72: aload 5
      // 74: invokeinterface org/w3c/dom/Node.getTextContent ()Ljava/lang/String; 1
      // 79: astore 6
      // 7b: aload 6
      // 7d: ifnull 9a
      // 80: aload 6
      // 82: invokevirtual java/lang/String.trim ()Ljava/lang/String;
      // 85: invokevirtual java/lang/String.length ()I
      // 88: bipush 1
      // 89: if_icmpge 9a
      // 8c: goto 93
      // 8f: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 92: athrow
      // 93: goto 9e
      // 96: invokestatic com/l7tech/xml/DomElementCursor.a (Ljava/lang/Exception;)Ljava/lang/Exception;
      // 99: athrow
      // 9a: bipush 1
      // 9b: ireturn
      // 9c: bipush 1
      // 9d: ireturn
      // 9e: iinc 4 1
      // a1: goto 0d
      // a4: bipush 0
      // a5: ireturn
      // try (14 -> 18): 18 java/lang/IllegalArgumentException
      // try (20 -> 23): 23 java/lang/IllegalArgumentException
      // try (34 -> 41): 42 java/lang/IllegalArgumentException
      // try (36 -> 45): 45 java/lang/IllegalArgumentException
   }

   @Override
   public String getLocalName() {
      return this.b.getLocalName();
   }

   @Override
   public String getNamespaceUri() {
      return this.b.getNamespaceURI();
   }

   @Override
   public String getPrefix() {
      return this.b.getPrefix();
   }

   @Override
   public String getTextValue() {
      return DomUtils.getTextValue(this.asDomElement());
   }

   @Override
   public void write(OutputStream var1) throws IOException {
      XmlUtil.nodeToOutputStream(this.b, var1, f[6]);
   }

   @Override
   public String asString() throws IOException {
      PoolByteArrayOutputStream var1 = new PoolByteArrayOutputStream(4096);
      XmlUtil.canonicalize(this.b, var1);
      return var1.toString(Charsets.UTF8);
   }

   @Override
   public Element asDomElement(Document var1) {
      return this.toDomElement(var1.importNode(this.b, true));
   }

   @Override
   public Element asDomElement() {
      return this.toDomElement(this.b);
   }

   protected Element toDomElement(Node var1) {
      try {
         if (var1 instanceof Element) {
            return (Element)var1;
         }
      } catch (IllegalArgumentException var2) {
         throw a(var2);
      }

      try {
         if (var1 instanceof Document) {
            return ((Document)var1).getDocumentElement();
         }
      } catch (IllegalArgumentException var3) {
         throw a(var3);
      }

      throw new IllegalStateException(f[5]);
   }

   public Node asDomNode() {
      return this.b;
   }

   @Override
   public XpathResult getXpathResult(CompiledXpath var1, XpathVariableFinder var2, boolean var3) throws XPathExpressionException {
      try {
         if (var1 == CompiledXpath.ALWAYS_TRUE) {
            return XpathResult.RESULT_TRUE;
         }
      } catch (XPathExpressionException var5) {
         throw a(var5);
      }

      try {
         if (var1 == CompiledXpath.ALWAYS_FALSE) {
            return XpathResult.RESULT_FALSE;
         }
      } catch (XPathExpressionException var6) {
         throw a(var6);
      }

      if (var1 instanceof DomCompiledXpath var4) {
         return var4.getXpathResult(this, var2);
      } else {
         throw new IllegalArgumentException(f[0] + var1.getClass().getName());
      }
   }

   @Override
   public byte[] canonicalize(String[] var1) throws IOException {
      PoolByteArrayOutputStream var2 = new PoolByteArrayOutputStream();

      try {
         XmlUtil.canonicalize(this.b, var2);
         return var2.toByteArray();
      } finally {
         var2.close();
      }
   }

   static {
      String[] var5 = new String[8];
      int var3 = 0;
      String var2 = "<\u000e\b'\u001ewd\u001b\u0014\u001e6NDd\u0004\u0010\u0012>\u000bcS\u0019\u0001\u000f:NhmI\u0014\u0002\"\u000b'0\n\u0015\t \u000bi\u007fI\u000e\u00146\u000b'f\u001c\u0013\u000fr\fb+\b\u000e[7\u0002bf\f\u000e\u000fr\u0001u+\u001d\b\u001er\u001chd\u001d@\u0015=\nb\u0011'\u000f[!\u000fqn\r@\u000b=\u001dn\u007f\u0000\u000f\u0015#\u0007\u000f\u001f7Nj~\u001a\u0014[0\u000b'j\u0007@>>\u000bjn\u0007\u0014[=\u001c'O\u0006\u0003\u000e?\u000bi\u007f\u0011'\u000f[!\u000fqn\r@\u000b=\u001dn\u007f\u0000\u000f\u0015\u001f\u0007\u000f\u001f7Nid\u001d@\u001a<NBg\f\r\u001e<\u001a'd\u001b@?=\rrf\f\u000e\u000f";
      int var4 = "<\u000e\b'\u001ewd\u001b\u0014\u001e6NDd\u0004\u0010\u0012>\u000bcS\u0019\u0001\u000f:NhmI\u0014\u0002\"\u000b'0\n\u0015\t \u000bi\u007fI\u000e\u00146\u000b'f\u001c\u0013\u000fr\fb+\b\u000e[7\u0002bf\f\u000e\u000fr\u0001u+\u001d\b\u001er\u001chd\u001d@\u0015=\nb\u0011'\u000f[!\u000fqn\r@\u000b=\u001dn\u007f\u0000\u000f\u0015#\u0007\u000f\u001f7Nj~\u001a\u0014[0\u000b'j\u0007@>>\u000bjn\u0007\u0014[=\u001c'O\u0006\u0003\u000e?\u000bi\u007f\u0011'\u000f[!\u000fqn\r@\u000b=\u001dn\u007f\u0000\u000f\u0015\u001f\u0007\u000f\u001f7Nid\u001d@\u001a<NBg\f\r\u001e<\u001a'd\u001b@?=\rrf\f\u000e\u000f"
         .length();
      char var1 = '"';
      int var8 = -1;

      label39:
      while (true) {
         byte var10000 = 4;
         String var10001 = var2.substring(++var8, var8 + var1);
         byte var10002 = -1;

         while (true) {
            String var9 = b(var10000, b(var10001));
            switch (var10002) {
               case 0:
                  var5[var3++] = var9;
                  if ((var8 += var1) >= var4) {
                     f = var5;

                     label26: {
                        try {
                           if (!DomElementCursor.class.desiredAssertionStatus()) {
                              var10 = true;
                              break label26;
                           }
                        } catch (IllegalArgumentException var6) {
                           throw a(var6);
                        }

                        var10 = false;
                     }

                     d = var10;
                     return;
                  }

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

                  var2 = "\u0004\f\u0005Gn\u0015?7'\u000fvRF\",c\b3\u001f]>6n\u0004#S_";
                  var4 = "\u0004\f\u0005Gn\u0015?7'\u000fvRF\",c\b3\u001f]>6n\u0004#S_".length();
                  var1 = 5;
                  var8 = -1;
            }

            var10000 = 60;
            var10001 = var2.substring(++var8, var8 + var1);
            var10002 = 0;
         }
      }
   }

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

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

      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 -> 109;
            case 1 -> 100;
            case 2 -> 127;
            case 3 -> 86;
            case 4 -> 106;
            case 5 -> 3;
            default -> 15;
         });
      }

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