ChatOn v1.35.366360版本的 MD5 值为:cde28447b38d5467efa95e48e7076155
以下内容为反编译后的 g.java 源代码,内容仅作参考
package rg;
import com.google.android.gms.internal.play_billing.y;
import com.itextpdf.text.pdf.PdfObject;
import com.itextpdf.text.xml.xmp.DublinCoreProperties;
import com.itextpdf.text.xml.xmp.DublinCoreSchema;
import com.itextpdf.text.xml.xmp.LangAlt;
import com.itextpdf.text.xml.xmp.XmpMMSchema;
import com.itextpdf.text.xml.xmp.XmpWriter;
import com.itextpdf.xmp.XMPException;
import ec.s5;
import ec.t5;
import ec.u;
import ec.u5;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Serializable;
import java.io.StringReader;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Iterator;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.ProcessingInstruction;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
public abstract class g {
public static final Object f19069a = new Object();
public static final DocumentBuilderFactory f19070b;
static {
DocumentBuilderFactory newInstance = DocumentBuilderFactory.newInstance();
newInstance.setNamespaceAware(true);
newInstance.setIgnoringComments(true);
try {
newInstance.setFeature("http://javax.xml.XMLConstants/feature/secure-processing", true);
newInstance.setFeature("http://xml.org/sax/features/external-general-entities", false);
newInstance.setFeature("http://apache.org/xml/features/disallow-doctype-decl", false);
newInstance.setXIncludeAware(false);
newInstance.setExpandEntityReferences(false);
} catch (Exception unused) {
}
f19070b = newInstance;
}
public static Object[] a(Node node, boolean z8, Object[] objArr) {
NodeList childNodes = node.getChildNodes();
for (int i10 = 0; i10 < childNodes.getLength(); i10++) {
Node item = childNodes.item(i10);
if (7 == item.getNodeType()) {
ProcessingInstruction processingInstruction = (ProcessingInstruction) item;
if ("xpacket".equals(processingInstruction.getTarget())) {
objArr[2] = processingInstruction.getData();
}
}
if (3 != item.getNodeType() && 7 != item.getNodeType()) {
String namespaceURI = item.getNamespaceURI();
String localName = item.getLocalName();
if (("xmpmeta".equals(localName) || "xapmeta".equals(localName)) && "adobe:ns:meta/".equals(namespaceURI)) {
return a(item, false, objArr);
}
if (!z8 && "RDF".equals(localName) && "http://www.w3.org/1999/02/22-rdf-syntax-ns#".equals(namespaceURI)) {
objArr[0] = item;
objArr[1] = f19069a;
return objArr;
}
Object[] a10 = a(item, z8, objArr);
if (a10 != null) {
return a10;
}
}
}
return null;
}
public static f b(Serializable serializable) {
Document c10;
boolean z8;
h hVar;
char c11;
boolean z10;
int i10;
e k10;
h c12;
if (serializable != null) {
if ((serializable instanceof String) && ((String) serializable).length() == 0) {
throw new XMPException("Parameter must not be null or empty", 4);
}
int i11 = 1;
boolean z11 = false;
tg.a aVar = new tg.a(1, 0);
if (serializable instanceof InputStream) {
InputStream inputStream = (InputStream) serializable;
if (aVar.c(16) || aVar.c(8)) {
try {
c10 = d(new d0.d(inputStream), aVar);
} catch (IOException e10) {
throw new XMPException(204, "Error reading the XML-file", e10);
}
} else {
c10 = c(new InputSource(inputStream));
}
} else if (serializable instanceof byte[]) {
c10 = d(new d0.d((byte[]) serializable), aVar);
} else {
String str = (String) serializable;
try {
c10 = c(new InputSource(new StringReader(str)));
} catch (XMPException e11) {
if (e11.f8774d != 201 || !aVar.c(8)) {
throw e11;
}
c10 = c(new InputSource(new c(new StringReader(str))));
}
}
Object[] a10 = a(c10, aVar.c(1), new Object[3]);
if (a10 == null || a10[1] != f19069a) {
return new f();
}
Node node = (Node) a10[0];
f fVar = new f();
if (node.hasAttributes()) {
h hVar2 = fVar.f19068d;
for (int i12 = 0; i12 < node.getChildNodes().getLength(); i12++) {
Node item = node.getChildNodes().item(i12);
if (!t5.e(item)) {
t5.h(fVar, hVar2, item, true);
}
}
char c13 = 2;
String str2 = (String) a10[2];
if (!aVar.c(32)) {
HashMap hashMap = i.f19079a;
h hVar3 = fVar.f19068d;
String str3 = null;
u5.e(hVar3, DublinCoreSchema.DEFAULT_XPATH_URI, null, true);
h hVar4 = fVar.f19068d;
Iterator o10 = hVar4.o();
while (o10.hasNext()) {
h hVar5 = (h) o10.next();
if (DublinCoreSchema.DEFAULT_XPATH_URI.equals(hVar5.f19071d)) {
int i13 = i11;
while (i13 <= hVar5.i()) {
h g10 = hVar5.g(i13);
tg.c cVar = (tg.c) i.f19079a.get(g10.f19071d);
if (cVar != null) {
if ((g10.j().f19722a & 768) == 0) {
h hVar6 = new h(g10.f19071d, str3, cVar);
g10.f19071d = "[]";
hVar6.b(g10);
hVar6.f19073i = hVar5;
((ArrayList) hVar5.h()).set(i13 - 1, hVar6);
if (cVar.c(4096) && !g10.j().c(64)) {
g10.c(new h("xml:lang", LangAlt.DEFAULT, null));
}
} else {
g10.j().e(7680, false);
tg.c j10 = g10.j();
int i14 = j10.f19722a | cVar.f19722a;
j10.b(i14);
j10.f19722a = i14;
if (cVar.c(4096)) {
i.b(g10);
}
}
}
i13++;
z11 = false;
c13 = 2;
str3 = null;
}
z10 = z11;
c11 = c13;
} else {
if ("http://ns.adobe.com/exif/1.0/".equals(hVar5.f19071d)) {
h c14 = u5.c(hVar5, "exif:GPSTimeStamp", false);
if (c14 != null) {
try {
k10 = y.k(c14.f19072e);
} catch (XMPException unused) {
}
if (k10.f19060d == 0 && k10.f19061e == 0 && k10.f19062i == 0) {
h c15 = u5.c(hVar5, "exif:DateTimeOriginal", false);
if (c15 == null) {
c15 = u5.c(hVar5, "exif:DateTimeDigitized", false);
}
e k11 = y.k(c15.f19072e);
GregorianCalendar a11 = k10.a();
a11.set(1, k11.f19060d);
c11 = 2;
try {
a11.set(2, k11.f19061e);
a11.set(5, k11.f19062i);
c14.f19072e = s5.e(new e(a11));
} catch (XMPException unused2) {
}
c12 = u5.c(hVar5, "exif:UserComment", false);
if (c12 != null) {
i.b(c12);
}
}
}
c11 = 2;
c12 = u5.c(hVar5, "exif:UserComment", false);
if (c12 != null) {
}
} else {
c11 = 2;
if ("http://ns.adobe.com/xmp/1.0/DynamicMedia/".equals(hVar5.f19071d)) {
h c16 = u5.c(hVar5, "xmpDM:copyright", false);
if (c16 != null) {
try {
h e12 = u5.e(hVar4, DublinCoreSchema.DEFAULT_XPATH_URI, null, true);
String str4 = c16.f19072e;
h c17 = u5.c(e12, DublinCoreSchema.RIGHTS, false);
if (c17 != null && c17.m()) {
int g11 = u5.g(c17, LangAlt.DEFAULT);
if (g11 < 0) {
fVar.b(DublinCoreProperties.RIGHTS, PdfObject.NOTHING, LangAlt.DEFAULT, c17.g(1).f19072e);
g11 = u5.g(c17, LangAlt.DEFAULT);
}
h g12 = c17.g(g11);
String str5 = g12.f19072e;
int indexOf = str5.indexOf("\n\n");
if (indexOf >= 0) {
if (!str5.substring(indexOf + 2).equals(str4)) {
g12.f19072e = str5.substring(0, i10) + str4;
}
} else if (!str4.equals(str5)) {
g12.f19072e = str5 + "\n\n" + str4;
}
c16.f19073i.q(c16);
}
fVar.b(DublinCoreProperties.RIGHTS, PdfObject.NOTHING, LangAlt.DEFAULT, "\n\n" + str4);
c16.f19073i.q(c16);
} catch (XMPException unused3) {
}
}
} else if ("http://ns.adobe.com/xap/1.0/rights/".equals(hVar5.f19071d)) {
z10 = false;
h c18 = u5.c(hVar5, "xmpRights:UsageTerms", false);
if (c18 != null) {
i.b(c18);
}
}
}
z10 = false;
}
z11 = z10;
c13 = c11;
i11 = 1;
str3 = null;
}
boolean z12 = z11;
if (hVar3.f19078z) {
hVar3.f19078z = z12;
boolean c19 = aVar.c(4);
for (h hVar7 : Collections.unmodifiableList(new ArrayList(hVar3.h()))) {
if (hVar7.f19078z) {
Iterator o11 = hVar7.o();
while (o11.hasNext()) {
h hVar8 = (h) o11.next();
if (hVar8.A) {
hVar8.A = false;
j k12 = qg.c.f18583a.k(hVar8.f19071d);
if (k12 != null) {
h e13 = u5.e(hVar3, k12.f19080a, null, true);
e13.f19077y = false;
StringBuilder sb2 = new StringBuilder();
String str6 = k12.f19081b;
sb2.append(str6);
String str7 = k12.f19082c;
sb2.append(str7);
h c20 = u5.c(e13, sb2.toString(), false);
tg.a aVar2 = k12.f19083d;
if (c20 == null) {
if (aVar2.f19722a == 0) {
hVar8.f19071d = androidx.activity.h.j(str6, str7);
e13.b(hVar8);
o11.remove();
} else {
h hVar9 = new h(androidx.activity.h.j(str6, str7), null, new tg.b(aVar2.f19722a));
e13.b(hVar9);
i.c(o11, hVar8, hVar9);
}
} else if (aVar2.f19722a == 0) {
if (c19) {
i.a(hVar8, c20, true);
}
o11.remove();
} else {
if (aVar2.c(4096)) {
int g13 = u5.g(c20, LangAlt.DEFAULT);
hVar = g13 != -1 ? c20.g(g13) : null;
z8 = true;
} else if (c20.m()) {
z8 = true;
hVar = c20.g(1);
} else {
z8 = true;
hVar = null;
}
if (hVar == null) {
i.c(o11, hVar8, c20);
} else {
if (c19) {
i.a(hVar8, hVar, z8);
}
o11.remove();
}
}
}
}
}
hVar7.f19078z = false;
}
}
}
String str8 = hVar3.f19071d;
if (str8 != null && str8.length() >= 36) {
String lowerCase = hVar3.f19071d.toLowerCase();
if (lowerCase.startsWith("uuid:")) {
lowerCase = lowerCase.substring(5);
}
boolean[] zArr = d.f19058a;
if (lowerCase != null) {
int i15 = 0;
boolean z13 = true;
int i16 = 0;
while (i16 < lowerCase.length()) {
if (lowerCase.charAt(i16) == '-') {
i15++;
z13 = z13 && (i16 == 8 || i16 == 13 || i16 == 18 || i16 == 23);
}
i16++;
}
if (z13 && 4 == i15 && 36 == i16) {
h d10 = u5.d(hVar3, u.d(XmpMMSchema.DEFAULT_XPATH_URI, "InstanceID"), true, null);
if (d10 == null) {
throw new XMPException("Failure creating xmpMM:InstanceID", 9);
}
d10.f19076w = null;
d10.f19072e = "uuid:".concat(lowerCase);
d10.f19074n = null;
tg.c j11 = d10.j();
j11.e(16, false);
j11.e(64, false);
j11.e(128, false);
d10.f19075v = null;
hVar3.f19071d = null;
}
}
}
Iterator o12 = hVar3.o();
while (o12.hasNext()) {
if (!((h) o12.next()).m()) {
o12.remove();
}
}
}
return fVar;
}
throw new XMPException("Invalid attributes of rdf:RDF element", 202);
}
throw new XMPException("Parameter must not be null", 4);
}
public static Document c(InputSource inputSource) {
try {
DocumentBuilder newDocumentBuilder = f19070b.newDocumentBuilder();
newDocumentBuilder.setErrorHandler(null);
return newDocumentBuilder.parse(inputSource);
} catch (IOException e10) {
throw new XMPException(204, "Error reading the XML-file", e10);
} catch (ParserConfigurationException e11) {
throw new XMPException(0, "XML Parser not correctly configured", e11);
} catch (SAXException e12) {
throw new XMPException(201, "XML parsing failure", e12);
}
}
public static Document d(d0.d dVar, tg.a aVar) {
try {
return c(new InputSource(new ByteArrayInputStream((byte[]) dVar.f8875i, 0, dVar.f8874e)));
} catch (XMPException e10) {
int i10 = e10.f8774d;
if (i10 == 201 || i10 == 204) {
if (aVar.c(16) && XmpWriter.UTF8.equals(dVar.d())) {
byte[] bArr = new byte[8];
d0.d dVar2 = new d0.d((dVar.f8874e * 4) / 3);
int i11 = 0;
boolean z8 = false;
int i12 = 0;
int i13 = 0;
while (true) {
int i14 = dVar.f8874e;
if (i11 >= i14) {
if (z8) {
for (int i15 = 0; i15 < i13; i15++) {
byte[] d10 = s5.d(bArr[i15]);
int length = d10.length;
dVar2.b(dVar2.f8874e + length);
System.arraycopy(d10, 0, (byte[]) dVar2.f8875i, dVar2.f8874e, length);
dVar2.f8874e += length;
}
}
dVar = dVar2;
} else if (i11 >= i14) {
throw new IndexOutOfBoundsException("The index exceeds the valid buffer area");
} else {
byte b2 = ((byte[]) dVar.f8875i)[i11];
int i16 = b2 & 255;
if (z8) {
if (i12 <= 0 || (b2 & 192) != 128) {
byte[] d11 = s5.d(bArr[0]);
int length2 = d11.length;
dVar2.b(dVar2.f8874e + length2);
System.arraycopy(d11, 0, (byte[]) dVar2.f8875i, dVar2.f8874e, length2);
dVar2.f8874e += length2;
i11 -= i13;
} else {
int i17 = i13 + 1;
bArr[i13] = (byte) i16;
i12--;
if (i12 == 0) {
dVar2.b(dVar2.f8874e + i17);
System.arraycopy(bArr, 0, (byte[]) dVar2.f8875i, dVar2.f8874e, i17);
dVar2.f8874e += i17;
} else {
i13 = i17;
}
}
z8 = false;
i13 = 0;
} else if (i16 < 127) {
byte b10 = (byte) i16;
dVar2.b(dVar2.f8874e + 1);
int i18 = dVar2.f8874e;
dVar2.f8874e = i18 + 1;
((byte[]) dVar2.f8875i)[i18] = b10;
} else if (i16 >= 192) {
i12 = -1;
for (int i19 = i16; i12 < 8 && (i19 & 128) == 128; i19 <<= 1) {
i12++;
}
bArr[i13] = (byte) i16;
i13++;
z8 = true;
} else {
byte[] d12 = s5.d((byte) i16);
int length3 = d12.length;
dVar2.b(dVar2.f8874e + length3);
System.arraycopy(d12, 0, (byte[]) dVar2.f8875i, dVar2.f8874e, length3);
dVar2.f8874e += length3;
}
i11++;
}
}
}
if (aVar.c(8)) {
try {
return c(new InputSource(new c(new InputStreamReader(new ByteArrayInputStream((byte[]) dVar.f8875i, 0, dVar.f8874e), dVar.d()))));
} catch (UnsupportedEncodingException unused) {
throw new XMPException(9, "Unsupported Encoding", e10);
}
}
return c(new InputSource(new ByteArrayInputStream((byte[]) dVar.f8875i, 0, dVar.f8874e)));
}
throw e10;
}
}
}