mirror of
https://github.com/github/codeql-action.git
synced 2026-04-01 17:22:19 +00:00
Merge pull request #3587 from github/dependabot/npm_and_yarn/fast-xml-parser-5.5.7
Bump fast-xml-parser from 5.5.6 to 5.5.7
This commit is contained in:
183
lib/analyze-action-post.js
generated
183
lib/analyze-action-post.js
generated
@@ -62029,7 +62029,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -62070,7 +62070,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _2(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -62094,82 +62094,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _2(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _2(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -62184,9 +62188,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -62393,7 +62397,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -62504,7 +62508,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -62642,7 +62646,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -62652,35 +62656,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -62792,7 +62811,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -62940,7 +62959,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/analyze-action.js
generated
183
lib/analyze-action.js
generated
@@ -62029,7 +62029,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -62070,7 +62070,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -62094,82 +62094,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -62184,9 +62188,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -62393,7 +62397,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -62504,7 +62508,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -62642,7 +62646,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -62652,35 +62656,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -62792,7 +62811,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -62940,7 +62959,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/autobuild-action.js
generated
183
lib/autobuild-action.js
generated
@@ -62029,7 +62029,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -62070,7 +62070,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -62094,82 +62094,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -62184,9 +62188,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -62393,7 +62397,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -62504,7 +62508,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -62642,7 +62646,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -62652,35 +62656,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -62792,7 +62811,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -62940,7 +62959,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/init-action-post.js
generated
183
lib/init-action-post.js
generated
@@ -62029,7 +62029,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -62070,7 +62070,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _2(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -62094,82 +62094,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _2(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _2(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -62184,9 +62188,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -62393,7 +62397,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -62504,7 +62508,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -62642,7 +62646,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -62652,35 +62656,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -62792,7 +62811,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -62940,7 +62959,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/init-action.js
generated
183
lib/init-action.js
generated
@@ -62180,7 +62180,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -62221,7 +62221,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -62245,82 +62245,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -62335,9 +62339,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -62544,7 +62548,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -62655,7 +62659,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -62793,7 +62797,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -62803,35 +62807,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -62943,7 +62962,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -63091,7 +63110,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/resolve-environment-action.js
generated
183
lib/resolve-environment-action.js
generated
@@ -62029,7 +62029,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -62070,7 +62070,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -62094,82 +62094,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -62184,9 +62188,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -62393,7 +62397,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -62504,7 +62508,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -62642,7 +62646,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -62652,35 +62656,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -62792,7 +62811,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -62940,7 +62959,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/setup-codeql-action.js
generated
183
lib/setup-codeql-action.js
generated
@@ -60732,7 +60732,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -60773,7 +60773,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -60797,82 +60797,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -60887,9 +60891,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -61096,7 +61100,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -61207,7 +61211,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -61345,7 +61349,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -61355,35 +61359,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -61495,7 +61514,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -61643,7 +61662,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/start-proxy-action-post.js
generated
183
lib/start-proxy-action-post.js
generated
@@ -62029,7 +62029,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -62070,7 +62070,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _2(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -62094,82 +62094,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _2(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _2(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -62184,9 +62188,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -62393,7 +62397,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -62504,7 +62508,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -62642,7 +62646,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -62652,35 +62656,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -62792,7 +62811,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -62940,7 +62959,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/start-proxy-action.js
generated
183
lib/start-proxy-action.js
generated
@@ -60732,7 +60732,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -60773,7 +60773,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -60797,82 +60797,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -60887,9 +60891,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -61096,7 +61100,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -61207,7 +61211,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -61345,7 +61349,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -61355,35 +61359,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -61495,7 +61514,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -61643,7 +61662,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/upload-lib.js
generated
183
lib/upload-lib.js
generated
@@ -62029,7 +62029,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -62070,7 +62070,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -62094,82 +62094,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -62184,9 +62188,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -62393,7 +62397,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -62504,7 +62508,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -62642,7 +62646,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -62652,35 +62656,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -62792,7 +62811,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -62940,7 +62959,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/upload-sarif-action-post.js
generated
183
lib/upload-sarif-action-post.js
generated
@@ -64242,7 +64242,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -64283,7 +64283,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _2(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -64307,82 +64307,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _2(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _2(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -64397,9 +64401,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -64606,7 +64610,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -64717,7 +64721,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -64855,7 +64859,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -64865,35 +64869,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -65005,7 +65024,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -65153,7 +65172,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
183
lib/upload-sarif-action.js
generated
183
lib/upload-sarif-action.js
generated
@@ -60732,7 +60732,7 @@ var require_fxp = __commonJS({
|
||||
if (a.some((t3) => i2 === t3.toLowerCase())) throw new Error(`[SECURITY] Invalid ${e2}: "${t2}" is a reserved JavaScript keyword that could cause prototype pollution`);
|
||||
}
|
||||
function A(t2) {
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: t2.maxEntitySize ?? 1e4, maxExpansionDepth: t2.maxExpansionDepth ?? 10, maxTotalExpansions: t2.maxTotalExpansions ?? 1e3, maxExpandedLength: t2.maxExpandedLength ?? 1e5, maxEntityCount: t2.maxEntityCount ?? 100, allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
return "boolean" == typeof t2 ? { enabled: t2, maxEntitySize: 1e4, maxExpansionDepth: 10, maxTotalExpansions: 1e3, maxExpandedLength: 1e5, maxEntityCount: 100, allowedTags: null, tagFilter: null } : "object" == typeof t2 && null !== t2 ? { enabled: false !== t2.enabled, maxEntitySize: Math.max(1, t2.maxEntitySize ?? 1e4), maxExpansionDepth: Math.max(1, t2.maxExpansionDepth ?? 10), maxTotalExpansions: Math.max(1, t2.maxTotalExpansions ?? 1e3), maxExpandedLength: Math.max(1, t2.maxExpandedLength ?? 1e5), maxEntityCount: Math.max(1, t2.maxEntityCount ?? 100), allowedTags: t2.allowedTags ?? null, tagFilter: t2.tagFilter ?? null } : A(true);
|
||||
}
|
||||
const C = function(t2) {
|
||||
const e2 = Object.assign({}, P, t2), i2 = [{ value: e2.attributeNamePrefix, name: "attributeNamePrefix" }, { value: e2.attributesGroupName, name: "attributesGroupName" }, { value: e2.textNodeName, name: "textNodeName" }, { value: e2.cdataPropName, name: "cdataPropName" }, { value: e2.commentPropName, name: "commentPropName" }];
|
||||
@@ -60773,7 +60773,7 @@ var require_fxp = __commonJS({
|
||||
if (r2 && _(t2, "!ENTITY", e2)) {
|
||||
let s3, r3;
|
||||
if (e2 += 7, [s3, r3, e2] = this.readEntityExp(t2, e2 + 1, this.suppressValidationErr), -1 === r3.indexOf("&")) {
|
||||
if (false !== this.options.enabled && this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
if (false !== this.options.enabled && null != this.options.maxEntityCount && n2 >= this.options.maxEntityCount) throw new Error(`Entity count (${n2 + 1}) exceeds maximum allowed (${this.options.maxEntityCount})`);
|
||||
const t3 = s3.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
i2[s3] = { regx: RegExp(`&${t3};`, "g"), val: r3 }, n2++;
|
||||
}
|
||||
@@ -60797,82 +60797,86 @@ var require_fxp = __commonJS({
|
||||
return { entities: i2, i: e2 };
|
||||
}
|
||||
readEntityExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) i2 += t2[e2], e2++;
|
||||
if (D(i2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]) && '"' !== t2[e2] && "'" !== t2[e2]; ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (D(n2), e2 = j(t2, e2), !this.suppressValidationErr) {
|
||||
if ("SYSTEM" === t2.substring(e2, e2 + 6).toUpperCase()) throw new Error("External entities are not supported");
|
||||
if ("%" === t2[e2]) throw new Error("Parameter entities are not supported");
|
||||
}
|
||||
let n2 = "";
|
||||
if ([e2, n2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && this.options.maxEntitySize && n2.length > this.options.maxEntitySize) throw new Error(`Entity "${i2}" size (${n2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [i2, n2, --e2];
|
||||
let s2 = "";
|
||||
if ([e2, s2] = this.readIdentifierVal(t2, e2, "entity"), false !== this.options.enabled && null != this.options.maxEntitySize && s2.length > this.options.maxEntitySize) throw new Error(`Entity "${n2}" size (${s2.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);
|
||||
return [n2, s2, --e2];
|
||||
}
|
||||
readNotationExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
!this.suppressValidationErr && D(i2), e2 = j(t2, e2);
|
||||
const n2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== n2 && "PUBLIC" !== n2) throw new Error(`Expected SYSTEM or PUBLIC, found "${n2}"`);
|
||||
e2 += n2.length, e2 = j(t2, e2);
|
||||
let s2 = null, r2 = null;
|
||||
if ("PUBLIC" === n2) [e2, s2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === n2 && ([e2, r2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !r2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: i2, publicIdentifier: s2, systemIdentifier: r2, index: --e2 };
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
!this.suppressValidationErr && D(n2), e2 = j(t2, e2);
|
||||
const s2 = t2.substring(e2, e2 + 6).toUpperCase();
|
||||
if (!this.suppressValidationErr && "SYSTEM" !== s2 && "PUBLIC" !== s2) throw new Error(`Expected SYSTEM or PUBLIC, found "${s2}"`);
|
||||
e2 += s2.length, e2 = j(t2, e2);
|
||||
let r2 = null, o2 = null;
|
||||
if ("PUBLIC" === s2) [e2, r2] = this.readIdentifierVal(t2, e2, "publicIdentifier"), '"' !== t2[e2 = j(t2, e2)] && "'" !== t2[e2] || ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"));
|
||||
else if ("SYSTEM" === s2 && ([e2, o2] = this.readIdentifierVal(t2, e2, "systemIdentifier"), !this.suppressValidationErr && !o2)) throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
||||
return { notationName: n2, publicIdentifier: r2, systemIdentifier: o2, index: --e2 };
|
||||
}
|
||||
readIdentifierVal(t2, e2, i2) {
|
||||
let n2 = "";
|
||||
const s2 = t2[e2];
|
||||
if ('"' !== s2 && "'" !== s2) throw new Error(`Expected quoted string, found "${s2}"`);
|
||||
for (e2++; e2 < t2.length && t2[e2] !== s2; ) n2 += t2[e2], e2++;
|
||||
if (t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
const r2 = ++e2;
|
||||
for (; e2 < t2.length && t2[e2] !== s2; ) e2++;
|
||||
if (n2 = t2.substring(r2, e2), t2[e2] !== s2) throw new Error(`Unterminated ${i2} value`);
|
||||
return [++e2, n2];
|
||||
}
|
||||
readElementExp(t2, e2) {
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
if (!this.suppressValidationErr && !r(i2)) throw new Error(`Invalid element name: "${i2}"`);
|
||||
let n2 = "";
|
||||
const i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
if (!this.suppressValidationErr && !r(n2)) throw new Error(`Invalid element name: "${n2}"`);
|
||||
let s2 = "";
|
||||
if ("E" === t2[e2 = j(t2, e2)] && _(t2, "MPTY", e2)) e2 += 4;
|
||||
else if ("A" === t2[e2] && _(t2, "NY", e2)) e2 += 2;
|
||||
else if ("(" === t2[e2]) {
|
||||
for (e2++; e2 < t2.length && ")" !== t2[e2]; ) n2 += t2[e2], e2++;
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
const i3 = ++e2;
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) e2++;
|
||||
if (s2 = t2.substring(i3, e2), ")" !== t2[e2]) throw new Error("Unterminated content model");
|
||||
} else if (!this.suppressValidationErr) throw new Error(`Invalid Element Expression, found "${t2[e2]}"`);
|
||||
return { elementName: i2, contentModel: n2.trim(), index: e2 };
|
||||
return { elementName: n2, contentModel: s2.trim(), index: e2 };
|
||||
}
|
||||
readAttlistExp(t2, e2) {
|
||||
let i2 = e2 = j(t2, e2);
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let n2 = t2.substring(i2, e2);
|
||||
for (D(n2), i2 = e2 = j(t2, e2); e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
let s2 = t2.substring(i2, e2);
|
||||
if (!D(s2)) throw new Error(`Invalid attribute name: "${s2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let i2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) i2 += t2[e2], e2++;
|
||||
D(i2), e2 = j(t2, e2);
|
||||
let n2 = "";
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) n2 += t2[e2], e2++;
|
||||
if (!D(n2)) throw new Error(`Invalid attribute name: "${n2}"`);
|
||||
e2 = j(t2, e2);
|
||||
let s2 = "";
|
||||
let r2 = "";
|
||||
if ("NOTATION" === t2.substring(e2, e2 + 8).toUpperCase()) {
|
||||
if (s2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
if (r2 = "NOTATION", "(" !== t2[e2 = j(t2, e2 += 8)]) throw new Error(`Expected '(', found "${t2[e2]}"`);
|
||||
e2++;
|
||||
let i3 = [];
|
||||
for (; e2 < t2.length && ")" !== t2[e2]; ) {
|
||||
let n3 = "";
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) n3 += t2[e2], e2++;
|
||||
if (n3 = n3.trim(), !D(n3)) throw new Error(`Invalid notation name: "${n3}"`);
|
||||
i3.push(n3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
const n3 = e2;
|
||||
for (; e2 < t2.length && "|" !== t2[e2] && ")" !== t2[e2]; ) e2++;
|
||||
let s3 = t2.substring(n3, e2);
|
||||
if (s3 = s3.trim(), !D(s3)) throw new Error(`Invalid notation name: "${s3}"`);
|
||||
i3.push(s3), "|" === t2[e2] && (e2++, e2 = j(t2, e2));
|
||||
}
|
||||
if (")" !== t2[e2]) throw new Error("Unterminated list of notations");
|
||||
e2++, s2 += " (" + i3.join("|") + ")";
|
||||
e2++, r2 += " (" + i3.join("|") + ")";
|
||||
} else {
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) s2 += t2[e2], e2++;
|
||||
const i3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !i3.includes(s2.toUpperCase())) throw new Error(`Invalid attribute type: "${s2}"`);
|
||||
const i3 = e2;
|
||||
for (; e2 < t2.length && !/\s/.test(t2[e2]); ) e2++;
|
||||
r2 += t2.substring(i3, e2);
|
||||
const n3 = ["CDATA", "ID", "IDREF", "IDREFS", "ENTITY", "ENTITIES", "NMTOKEN", "NMTOKENS"];
|
||||
if (!this.suppressValidationErr && !n3.includes(r2.toUpperCase())) throw new Error(`Invalid attribute type: "${r2}"`);
|
||||
}
|
||||
e2 = j(t2, e2);
|
||||
let r2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (r2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (r2 = "#IMPLIED", e2 += 7) : [e2, r2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: i2, attributeName: n2, attributeType: s2, defaultValue: r2, index: e2 };
|
||||
let o2 = "";
|
||||
return "#REQUIRED" === t2.substring(e2, e2 + 8).toUpperCase() ? (o2 = "#REQUIRED", e2 += 8) : "#IMPLIED" === t2.substring(e2, e2 + 7).toUpperCase() ? (o2 = "#IMPLIED", e2 += 7) : [e2, o2] = this.readIdentifierVal(t2, e2, "ATTLIST"), { elementName: n2, attributeName: s2, attributeType: r2, defaultValue: o2, index: e2 };
|
||||
}
|
||||
}
|
||||
const j = (t2, e2) => {
|
||||
@@ -60887,9 +60891,9 @@ var require_fxp = __commonJS({
|
||||
if (r(t2)) return t2;
|
||||
throw new Error(`Invalid entity name ${t2}`);
|
||||
}
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, F = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true };
|
||||
const L = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class M {
|
||||
const V = /^[-+]?0x[a-fA-F0-9]+$/, k = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, M = { hex: true, leadingZeros: true, decimalPoint: ".", eNotation: true, infinity: "original" };
|
||||
const F = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
|
||||
class L {
|
||||
constructor(t2 = {}) {
|
||||
this.separator = t2.separator || ".", this.path = [], this.siblingStacks = [];
|
||||
}
|
||||
@@ -61096,7 +61100,7 @@ var require_fxp = __commonJS({
|
||||
if ("string" == typeof i2 && t3 === i2) return true;
|
||||
if (i2 instanceof RegExp && i2.test(t3)) return true;
|
||||
}
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new M(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
} : () => false, this.entityExpansionCount = 0, this.currentExpandedLength = 0, this.matcher = new L(), this.isCurrentNodeStopNode = false, this.options.stopNodes && this.options.stopNodes.length > 0) {
|
||||
this.stopNodeExpressions = [];
|
||||
for (let t3 = 0; t3 < this.options.stopNodes.length; t3++) {
|
||||
const e3 = this.options.stopNodes[t3];
|
||||
@@ -61207,7 +61211,7 @@ var require_fxp = __commonJS({
|
||||
let o2 = s3.tagName;
|
||||
const a2 = s3.rawTagName;
|
||||
let h2 = s3.tagExp, l2 = s3.attrExpPresent, p2 = s3.closeIndex;
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
if ({ tagName: o2, tagExp: h2 } = rt(this.options.transformTagName, o2, h2, this.options), this.options.strictReservedNames && (o2 === this.options.commentPropName || o2 === this.options.cdataPropName || o2 === this.options.textNodeName || o2 === this.options.attributesGroupName)) throw new Error(`Invalid tag name: ${o2}`);
|
||||
i2 && n2 && "!xml" !== i2.tagname && (n2 = this.saveTextToParentTag(n2, i2, this.matcher, false));
|
||||
const u2 = i2;
|
||||
u2 && -1 !== this.options.unpairedTags.indexOf(u2.tagname) && (i2 = this.tagsNodeStack.pop(), this.matcher.pop());
|
||||
@@ -61345,7 +61349,7 @@ var require_fxp = __commonJS({
|
||||
if (e2 && "string" == typeof t2) {
|
||||
const e3 = t2.trim();
|
||||
return "true" === e3 || "false" !== e3 && (function(t3, e4 = {}) {
|
||||
if (e4 = Object.assign({}, F, e4), !t3 || "string" != typeof t3) return t3;
|
||||
if (e4 = Object.assign({}, M, e4), !t3 || "string" != typeof t3) return t3;
|
||||
let i3 = t3.trim();
|
||||
if (void 0 !== e4.skipLike && e4.skipLike.test(i3)) return t3;
|
||||
if ("0" === t3) return 0;
|
||||
@@ -61355,35 +61359,50 @@ var require_fxp = __commonJS({
|
||||
if (window && window.parseInt) return window.parseInt(t4, 16);
|
||||
throw new Error("parseInt, Number.parseInt, window.parseInt are not supported");
|
||||
})(i3);
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(L);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : 1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
if (isFinite(i3)) {
|
||||
if (i3.includes("e") || i3.includes("E")) return (function(t4, e5, i4) {
|
||||
if (!i4.eNotation) return t4;
|
||||
const n3 = e5.match(F);
|
||||
if (n3) {
|
||||
let s2 = n3[1] || "";
|
||||
const r2 = -1 === n3[3].indexOf("e") ? "E" : "e", o2 = n3[2], a2 = s2 ? t4[o2.length + 1] === r2 : t4[o2.length] === r2;
|
||||
return o2.length > 1 && a2 ? t4 : (1 !== o2.length || !n3[3].startsWith(`.${r2}`) && n3[3][0] !== r2) && o2.length > 0 ? i4.leadingZeros && !a2 ? (e5 = (n3[1] || "") + n3[3], Number(e5)) : t4 : Number(e5);
|
||||
}
|
||||
return t4;
|
||||
})(t3, i3, e4);
|
||||
{
|
||||
const s2 = k.exec(i3);
|
||||
if (s2) {
|
||||
const r2 = s2[1] || "", o2 = s2[2];
|
||||
let a2 = (n2 = s2[3]) && -1 !== n2.indexOf(".") ? ("." === (n2 = n2.replace(/0+$/, "")) ? n2 = "0" : "." === n2[0] ? n2 = "0" + n2 : "." === n2[n2.length - 1] && (n2 = n2.substring(0, n2.length - 1)), n2) : n2;
|
||||
const h2 = r2 ? "." === t3[o2.length + 1] : "." === t3[o2.length];
|
||||
if (!e4.leadingZeros && (o2.length > 1 || 1 === o2.length && !h2)) return t3;
|
||||
{
|
||||
const n3 = Number(i3), s3 = String(n3);
|
||||
if (0 === n3) return n3;
|
||||
if (-1 !== s3.search(/[eE]/)) return e4.eNotation ? n3 : t3;
|
||||
if (-1 !== i3.indexOf(".")) return "0" === s3 || s3 === a2 || s3 === `${r2}${a2}` ? n3 : t3;
|
||||
let h3 = o2 ? a2 : i3;
|
||||
return o2 ? h3 === s3 || r2 + h3 === s3 ? n3 : t3 : h3 === s3 || h3 === r2 + s3 ? n3 : t3;
|
||||
}
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
return t3;
|
||||
}
|
||||
var n2;
|
||||
return (function(t4, e5, i4) {
|
||||
const n3 = e5 === 1 / 0;
|
||||
switch (i4.infinity.toLowerCase()) {
|
||||
case "null":
|
||||
return null;
|
||||
case "infinity":
|
||||
return e5;
|
||||
case "string":
|
||||
return n3 ? "Infinity" : "-Infinity";
|
||||
default:
|
||||
return t4;
|
||||
}
|
||||
})(t3, Number(i3), e4);
|
||||
})(t2, i2);
|
||||
}
|
||||
return void 0 !== t2 ? t2 : "";
|
||||
@@ -61495,7 +61514,7 @@ var require_fxp = __commonJS({
|
||||
const i3 = e2.stopNodes[t3];
|
||||
"string" == typeof i3 ? n2.push(new G(i3)) : i3 instanceof G && n2.push(i3);
|
||||
}
|
||||
return mt(t2, e2, i2, new M(), n2);
|
||||
return mt(t2, e2, i2, new L(), n2);
|
||||
}
|
||||
function mt(t2, e2, i2, n2, s2) {
|
||||
let r2 = "", o2 = false;
|
||||
@@ -61643,7 +61662,7 @@ var require_fxp = __commonJS({
|
||||
if (this.options.preserveOrder) return gt(t2, this.options);
|
||||
{
|
||||
Array.isArray(t2) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (t2 = { [this.options.arrayNodeName]: t2 });
|
||||
const e2 = new M();
|
||||
const e2 = new L();
|
||||
return this.j2x(t2, 0, e2).val;
|
||||
}
|
||||
}, Pt.prototype.j2x = function(t2, e2, i2) {
|
||||
|
||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -5698,9 +5698,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/fast-xml-parser": {
|
||||
"version": "5.5.6",
|
||||
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.6.tgz",
|
||||
"integrity": "sha512-3+fdZyBRVg29n4rXP0joHthhcHdPUHaIC16cuyyd1iLsuaO6Vea36MPrxgAzbZna8lhvZeRL8Bc9GP56/J9xEw==",
|
||||
"version": "5.5.7",
|
||||
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.5.7.tgz",
|
||||
"integrity": "sha512-LteOsISQ2GEiDHZch6L9hB0+MLoYVLToR7xotrzU0opCICBkxOPgHAy1HxAvtxfJNXDJpgAsQN30mkrfpO2Prg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
@@ -5711,7 +5711,7 @@
|
||||
"dependencies": {
|
||||
"fast-xml-builder": "^1.1.4",
|
||||
"path-expression-matcher": "^1.1.3",
|
||||
"strnum": "^2.1.2"
|
||||
"strnum": "^2.2.0"
|
||||
},
|
||||
"bin": {
|
||||
"fxparser": "src/cli/cli.js"
|
||||
@@ -8844,9 +8844,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/strnum": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.2.tgz",
|
||||
"integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==",
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/strnum/-/strnum-2.2.1.tgz",
|
||||
"integrity": "sha512-BwRvNd5/QoAtyW1na1y1LsJGQNvRlkde6Q/ipqqEaivoMdV+B1OMOTVdwR+N/cwVUcIt9PYyHmV8HyexCZSupg==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
|
||||
Reference in New Issue
Block a user