@opencloud-eu/web-client 7.0.1 → 7.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,26 +1,27 @@
1
- import { t as e } from "./dist-D0YulRs6.js";
2
- import { a as t, n, s as r, t as i, u as a } from "./toString-DkamdJp-.js";
1
+ import { t as e } from "./dist-B2vdwwII.js";
2
+ import { t } from "./urlJoin-_pUL1TUx.js";
3
+ import { a as n, n as r, s as i, t as a } from "./toString-BCd-H1lr.js";
3
4
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isKey.js
4
5
  var o = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, s = /^\w*$/;
5
- function c(e, n) {
6
- if (t(e)) return !1;
7
- var i = typeof e;
8
- return i == "number" || i == "symbol" || i == "boolean" || e == null || r(e) ? !0 : s.test(e) || !o.test(e) || n != null && e in Object(n);
6
+ function c(e, t) {
7
+ if (n(e)) return !1;
8
+ var r = typeof e;
9
+ return r == "number" || r == "symbol" || r == "boolean" || e == null || i(e) ? !0 : s.test(e) || !o.test(e) || t != null && e in Object(t);
9
10
  }
10
11
  //#endregion
11
12
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/memoize.js
12
13
  var l = "Expected a function";
13
14
  function u(e, t) {
14
15
  if (typeof e != "function" || t != null && typeof t != "function") throw TypeError(l);
15
- var r = function() {
16
- var n = arguments, i = t ? t.apply(this, n) : n[0], a = r.cache;
16
+ var n = function() {
17
+ var r = arguments, i = t ? t.apply(this, r) : r[0], a = n.cache;
17
18
  if (a.has(i)) return a.get(i);
18
- var o = e.apply(this, n);
19
- return r.cache = a.set(i, o) || a, o;
19
+ var o = e.apply(this, r);
20
+ return n.cache = a.set(i, o) || a, o;
20
21
  };
21
- return r.cache = new (u.Cache || n)(), r;
22
+ return n.cache = new (u.Cache || r)(), n;
22
23
  }
23
- u.Cache = n;
24
+ u.Cache = r;
24
25
  //#endregion
25
26
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_memoizeCapped.js
26
27
  var d = 500;
@@ -40,14 +41,14 @@ var p = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(
40
41
  });
41
42
  //#endregion
42
43
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_castPath.js
43
- function g(e, n) {
44
- return t(e) ? e : c(e, n) ? [e] : h(i(e));
44
+ function g(e, t) {
45
+ return n(e) ? e : c(e, t) ? [e] : h(a(e));
45
46
  }
46
47
  //#endregion
47
48
  //#region ../../node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_toKey.js
48
49
  var _ = Infinity;
49
50
  function ee(e) {
50
- if (typeof e == "string" || r(e)) return e;
51
+ if (typeof e == "string" || i(e)) return e;
51
52
  var t = e + "";
52
53
  return t == "0" && 1 / e == -_ ? "-0" : t;
53
54
  }
@@ -124,7 +125,6 @@ function T(...e) {
124
125
  function E(e) {
125
126
  return new DataView(e.buffer, e.byteOffset, e.byteLength);
126
127
  }
127
- new Uint8Array(new Uint32Array([287454020]).buffer)[0], typeof Uint8Array.from([]).toHex == "function" && Uint8Array.fromHex;
128
128
  function re(e) {
129
129
  if (typeof e != "string") throw TypeError("string expected");
130
130
  return new Uint8Array(new TextEncoder().encode(e));
@@ -222,7 +222,7 @@ function de(e, t, n, r, i) {
222
222
  return e.destroy(), t.destroy(), r && r.destroy(), T(i), n;
223
223
  }
224
224
  function fe(e, t, n, r) {
225
- let { c: i, dkLen: a, DK: o, PRF: s, PRFSalt: c } = ue(e, t, n, r), l, u = new Uint8Array(4), d = E(u), f = new Uint8Array(s.outputLen);
225
+ let { c: i, dkLen: a, DK: o, PRF: s, PRFSalt: c } = ue(e, t, n, r), l, u = /* @__PURE__ */ new Uint8Array(4), d = E(u), f = new Uint8Array(s.outputLen);
226
226
  for (let e = 1, t = 0; t < a; e++, t += s.outputLen) {
227
227
  let n = o.subarray(t, t + s.outputLen);
228
228
  d.setInt32(0, e, !1), (l = c._cloneInto(l)).update(u).digestInto(f), n.set(f.subarray(0, n.length));
@@ -333,7 +333,7 @@ function N(e, t, n, r) {
333
333
  l: i | 0
334
334
  };
335
335
  }
336
- var ye = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), be = (e, t, n, r) => t + n + r + (e / 2 ** 32 | 0) | 0, xe = (e, t, n, r) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0), Se = (e, t, n, r, i) => t + n + r + i + (e / 2 ** 32 | 0) | 0, Ce = (e, t, n, r, i) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0) + (i >>> 0), we = (e, t, n, r, i, a) => t + n + r + i + a + (e / 2 ** 32 | 0) | 0, Te = ge((/* @__PURE__ */ "0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817".split(".")).map((e) => BigInt(e))), Ee = Te[0], De = Te[1], P = /* @__PURE__ */ new Uint32Array(80), F = /* @__PURE__ */ new Uint32Array(80), Oe = class extends pe {
336
+ var ye = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), be = (e, t, n, r) => t + n + r + (e / 2 ** 32 | 0) | 0, xe = (e, t, n, r) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0), Se = (e, t, n, r, i) => t + n + r + i + (e / 2 ** 32 | 0) | 0, Ce = (e, t, n, r, i) => (e >>> 0) + (t >>> 0) + (n >>> 0) + (r >>> 0) + (i >>> 0), we = (e, t, n, r, i, a) => t + n + r + i + a + (e / 2 ** 32 | 0) | 0, Te = /* @__PURE__ */ ge((/* @__PURE__ */ "0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817".split(".")).map((e) => BigInt(e))), Ee = Te[0], De = Te[1], P = /* @__PURE__ */ new Uint32Array(80), F = /* @__PURE__ */ new Uint32Array(80), Oe = class extends pe {
337
337
  constructor(e) {
338
338
  super(128, e, 16, !1);
339
339
  }
@@ -405,10 +405,8 @@ var ye = (e, t, n) => (e >>> 0) + (t >>> 0) + (n >>> 0), be = (e, t, n, r) => t
405
405
  }, Ae = /* @__PURE__ */ oe(() => new ke(), /* @__PURE__ */ se(3)), je = (t, n, r, i) => e.from(fe(Ae, t, n, {
406
406
  c: r,
407
407
  dkLen: i
408
- })), Me = ":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
409
- Me + "";
410
- var Ne = "[" + Me + "][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*", Pe = RegExp("^" + Ne + "$");
411
- function Fe(e, t) {
408
+ })), Me = /* @__PURE__ */ RegExp("^[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");
409
+ function Ne(e, t) {
412
410
  let n = [], r = t.exec(e);
413
411
  for (; r;) {
414
412
  let i = [];
@@ -419,13 +417,13 @@ function Fe(e, t) {
419
417
  }
420
418
  return n;
421
419
  }
422
- var Ie = function(e) {
423
- return Pe.exec(e) != null;
420
+ var Pe = function(e) {
421
+ return Me.exec(e) != null;
424
422
  };
425
- function Le(e) {
423
+ function Fe(e) {
426
424
  return e !== void 0;
427
425
  }
428
- var I = [
426
+ var Ie = [
429
427
  "hasOwnProperty",
430
428
  "toString",
431
429
  "valueOf",
@@ -433,94 +431,94 @@ var I = [
433
431
  "__defineSetter__",
434
432
  "__lookupGetter__",
435
433
  "__lookupSetter__"
436
- ], Re = [
434
+ ], Le = [
437
435
  "__proto__",
438
436
  "constructor",
439
437
  "prototype"
440
- ], ze = {
438
+ ], Re = {
441
439
  allowBooleanAttributes: !1,
442
440
  unpairedTags: []
443
441
  };
444
- function Be(e, t) {
445
- t = Object.assign({}, ze, t);
442
+ function ze(e, t) {
443
+ t = Object.assign({}, Re, t);
446
444
  let n = [], r = !1, i = !1;
447
445
  e[0] === "" && (e = e.substr(1));
448
446
  for (let a = 0; a < e.length; a++) if (e[a] === "<" && e[a + 1] === "?") {
449
- if (a += 2, a = He(e, a), a.err) return a;
447
+ if (a += 2, a = Ve(e, a), a.err) return a;
450
448
  } else if (e[a] === "<") {
451
449
  let o = a;
452
450
  if (a++, e[a] === "!") {
453
- a = Ue(e, a);
451
+ a = He(e, a);
454
452
  continue;
455
453
  } else {
456
454
  let s = !1;
457
455
  e[a] === "/" && (s = !0, a++);
458
456
  let c = "";
459
457
  for (; a < e.length && e[a] !== ">" && e[a] !== " " && e[a] !== " " && e[a] !== "\n" && e[a] !== "\r"; a++) c += e[a];
460
- if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !Qe(c)) {
458
+ if (c = c.trim(), c[c.length - 1] === "/" && (c = c.substring(0, c.length - 1), a--), !Ze(c)) {
461
459
  let t;
462
- return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", L("InvalidTag", t, R(e, a));
460
+ return t = c.trim().length === 0 ? "Invalid space after '<'." : "Tag '" + c + "' is an invalid name.", I("InvalidTag", t, L(e, a));
463
461
  }
464
- let l = Ke(e, a);
465
- if (l === !1) return L("InvalidAttr", "Attributes for '" + c + "' have open quote.", R(e, a));
462
+ let l = Ge(e, a);
463
+ if (l === !1) return I("InvalidAttr", "Attributes for '" + c + "' have open quote.", L(e, a));
466
464
  let u = l.value;
467
465
  if (a = l.index, u[u.length - 1] === "/") {
468
466
  let n = a - u.length;
469
467
  u = u.substring(0, u.length - 1);
470
- let i = Je(u, t);
468
+ let i = qe(u, t);
471
469
  if (i === !0) r = !0;
472
- else return L(i.err.code, i.err.msg, R(e, n + i.err.line));
470
+ else return I(i.err.code, i.err.msg, L(e, n + i.err.line));
473
471
  } else if (s) {
474
- if (!l.tagClosed) return L("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", R(e, a));
475
- if (u.trim().length > 0) return L("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", R(e, o));
476
- if (n.length === 0) return L("InvalidTag", "Closing tag '" + c + "' has not been opened.", R(e, o));
472
+ if (!l.tagClosed) return I("InvalidTag", "Closing tag '" + c + "' doesn't have proper closing.", L(e, a));
473
+ if (u.trim().length > 0) return I("InvalidTag", "Closing tag '" + c + "' can't have attributes or invalid starting.", L(e, o));
474
+ if (n.length === 0) return I("InvalidTag", "Closing tag '" + c + "' has not been opened.", L(e, o));
477
475
  {
478
476
  let t = n.pop();
479
477
  if (c !== t.tagName) {
480
- let n = R(e, t.tagStartPos);
481
- return L("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", R(e, o));
478
+ let n = L(e, t.tagStartPos);
479
+ return I("InvalidTag", "Expected closing tag '" + t.tagName + "' (opened in line " + n.line + ", col " + n.col + ") instead of closing tag '" + c + "'.", L(e, o));
482
480
  }
483
481
  n.length == 0 && (i = !0);
484
482
  }
485
483
  } else {
486
- let s = Je(u, t);
487
- if (s !== !0) return L(s.err.code, s.err.msg, R(e, a - u.length + s.err.line));
488
- if (i === !0) return L("InvalidXml", "Multiple possible root nodes found.", R(e, a));
484
+ let s = qe(u, t);
485
+ if (s !== !0) return I(s.err.code, s.err.msg, L(e, a - u.length + s.err.line));
486
+ if (i === !0) return I("InvalidXml", "Multiple possible root nodes found.", L(e, a));
489
487
  t.unpairedTags.indexOf(c) !== -1 || n.push({
490
488
  tagName: c,
491
489
  tagStartPos: o
492
490
  }), r = !0;
493
491
  }
494
492
  for (a++; a < e.length; a++) if (e[a] === "<") if (e[a + 1] === "!") {
495
- a++, a = Ue(e, a);
493
+ a++, a = He(e, a);
496
494
  continue;
497
495
  } else if (e[a + 1] === "?") {
498
- if (a = He(e, ++a), a.err) return a;
496
+ if (a = Ve(e, ++a), a.err) return a;
499
497
  } else break;
500
498
  else if (e[a] === "&") {
501
- let t = Xe(e, a);
502
- if (t == -1) return L("InvalidChar", "char '&' is not expected.", R(e, a));
499
+ let t = Ye(e, a);
500
+ if (t == -1) return I("InvalidChar", "char '&' is not expected.", L(e, a));
503
501
  a = t;
504
- } else if (i === !0 && !Ve(e[a])) return L("InvalidXml", "Extra text at the end", R(e, a));
502
+ } else if (i === !0 && !Be(e[a])) return I("InvalidXml", "Extra text at the end", L(e, a));
505
503
  e[a] === "<" && a--;
506
504
  }
507
505
  } else {
508
- if (Ve(e[a])) continue;
509
- return L("InvalidChar", "char '" + e[a] + "' is not expected.", R(e, a));
506
+ if (Be(e[a])) continue;
507
+ return I("InvalidChar", "char '" + e[a] + "' is not expected.", L(e, a));
510
508
  }
511
- return r ? n.length == 1 ? L("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", R(e, n[0].tagStartPos)) : n.length > 0 ? L("InvalidXml", "Invalid '" + JSON.stringify(n.map((e) => e.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
509
+ return r ? n.length == 1 ? I("InvalidTag", "Unclosed tag '" + n[0].tagName + "'.", L(e, n[0].tagStartPos)) : n.length > 0 ? I("InvalidXml", "Invalid '" + JSON.stringify(n.map((e) => e.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", {
512
510
  line: 1,
513
511
  col: 1
514
- }) : !0 : L("InvalidXml", "Start tag expected.", 1);
512
+ }) : !0 : I("InvalidXml", "Start tag expected.", 1);
515
513
  }
516
- function Ve(e) {
514
+ function Be(e) {
517
515
  return e === " " || e === " " || e === "\n" || e === "\r";
518
516
  }
519
- function He(e, t) {
517
+ function Ve(e, t) {
520
518
  let n = t;
521
519
  for (; t < e.length; t++) if (e[t] == "?" || e[t] == " ") {
522
520
  let r = e.substr(n, t - n);
523
- if (t > 5 && r === "xml") return L("InvalidXml", "XML declaration allowed only at the start of the document.", R(e, t));
521
+ if (t > 5 && r === "xml") return I("InvalidXml", "XML declaration allowed only at the start of the document.", L(e, t));
524
522
  if (e[t] == "?" && e[t + 1] == ">") {
525
523
  t++;
526
524
  break;
@@ -528,7 +526,7 @@ function He(e, t) {
528
526
  }
529
527
  return t;
530
528
  }
531
- function Ue(e, t) {
529
+ function He(e, t) {
532
530
  if (e.length > t + 5 && e[t + 1] === "-" && e[t + 2] === "-") {
533
531
  for (t += 3; t < e.length; t++) if (e[t] === "-" && e[t + 1] === "-" && e[t + 2] === ">") {
534
532
  t += 2;
@@ -546,38 +544,38 @@ function Ue(e, t) {
546
544
  }
547
545
  return t;
548
546
  }
549
- var We = "\"", Ge = "'";
550
- function Ke(e, t) {
547
+ var Ue = "\"", We = "'";
548
+ function Ge(e, t) {
551
549
  let n = "", r = "", i = !1;
552
550
  for (; t < e.length; t++) {
553
- if (e[t] === We || e[t] === Ge) r === "" ? r = e[t] : r !== e[t] || (r = "");
551
+ if (e[t] === Ue || e[t] === We) r === "" ? r = e[t] : r !== e[t] || (r = "");
554
552
  else if (e[t] === ">" && r === "") {
555
553
  i = !0;
556
554
  break;
557
555
  }
558
556
  n += e[t];
559
557
  }
560
- return r === "" ? {
558
+ return r === "" && {
561
559
  value: n,
562
560
  index: t,
563
561
  tagClosed: i
564
- } : !1;
562
+ };
565
563
  }
566
- var qe = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
567
- function Je(e, t) {
568
- let n = Fe(e, qe), r = {};
564
+ var Ke = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
565
+ function qe(e, t) {
566
+ let n = Ne(e, Ke), r = {};
569
567
  for (let e = 0; e < n.length; e++) {
570
- if (n[e][1].length === 0) return L("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", z(n[e]));
571
- if (n[e][3] !== void 0 && n[e][4] === void 0) return L("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", z(n[e]));
572
- if (n[e][3] === void 0 && !t.allowBooleanAttributes) return L("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", z(n[e]));
568
+ if (n[e][1].length === 0) return I("InvalidAttr", "Attribute '" + n[e][2] + "' has no space in starting.", R(n[e]));
569
+ if (n[e][3] !== void 0 && n[e][4] === void 0) return I("InvalidAttr", "Attribute '" + n[e][2] + "' is without value.", R(n[e]));
570
+ if (n[e][3] === void 0 && !t.allowBooleanAttributes) return I("InvalidAttr", "boolean attribute '" + n[e][2] + "' is not allowed.", R(n[e]));
573
571
  let i = n[e][2];
574
- if (!Ze(i)) return L("InvalidAttr", "Attribute '" + i + "' is an invalid name.", z(n[e]));
572
+ if (!Xe(i)) return I("InvalidAttr", "Attribute '" + i + "' is an invalid name.", R(n[e]));
575
573
  if (!Object.prototype.hasOwnProperty.call(r, i)) r[i] = 1;
576
- else return L("InvalidAttr", "Attribute '" + i + "' is repeated.", z(n[e]));
574
+ else return I("InvalidAttr", "Attribute '" + i + "' is repeated.", R(n[e]));
577
575
  }
578
576
  return !0;
579
577
  }
580
- function Ye(e, t) {
578
+ function Je(e, t) {
581
579
  let n = /\d/;
582
580
  for (e[t] === "x" && (t++, n = /[\da-fA-F]/); t < e.length; t++) {
583
581
  if (e[t] === ";") return t;
@@ -585,9 +583,9 @@ function Ye(e, t) {
585
583
  }
586
584
  return -1;
587
585
  }
588
- function Xe(e, t) {
586
+ function Ye(e, t) {
589
587
  if (t++, e[t] === ";") return -1;
590
- if (e[t] === "#") return t++, Ye(e, t);
588
+ if (e[t] === "#") return t++, Je(e, t);
591
589
  let n = 0;
592
590
  for (; t < e.length; t++, n++) if (!(e[t].match(/\w/) && n < 20)) {
593
591
  if (e[t] === ";") break;
@@ -595,7 +593,7 @@ function Xe(e, t) {
595
593
  }
596
594
  return t;
597
595
  }
598
- function L(e, t, n) {
596
+ function I(e, t, n) {
599
597
  return { err: {
600
598
  code: e,
601
599
  msg: t,
@@ -603,25 +601,25 @@ function L(e, t, n) {
603
601
  col: n.col
604
602
  } };
605
603
  }
606
- function Ze(e) {
607
- return Ie(e);
604
+ function Xe(e) {
605
+ return Pe(e);
608
606
  }
609
- function Qe(e) {
610
- return Ie(e);
607
+ function Ze(e) {
608
+ return Pe(e);
611
609
  }
612
- function R(e, t) {
610
+ function L(e, t) {
613
611
  let n = e.substring(0, t).split(/\r?\n/);
614
612
  return {
615
613
  line: n.length,
616
614
  col: n[n.length - 1].length + 1
617
615
  };
618
616
  }
619
- function z(e) {
617
+ function R(e) {
620
618
  return e.startIndex + e[1].length;
621
619
  }
622
620
  //#endregion
623
- //#region ../../node_modules/.pnpm/@nodable+entities@2.1.0/node_modules/@nodable/entities/src/entities.js
624
- var $e = {
621
+ //#region ../../node_modules/.pnpm/@nodable+entities@2.2.0/node_modules/@nodable/entities/src/entities.js
622
+ var Qe = {
625
623
  amp: "&",
626
624
  AMP: "&",
627
625
  lt: "<",
@@ -648,7 +646,6 @@ var $e = {
648
646
  num: "#",
649
647
  dollar: "$",
650
648
  percent: "%",
651
- amp: "&",
652
649
  ast: "*",
653
650
  commat: "@",
654
651
  lowbar: "_",
@@ -700,7 +697,7 @@ var $e = {
700
697
  times: "×",
701
698
  div: "÷",
702
699
  divide: "÷"
703
- }, et = {
700
+ }, $e = {
704
701
  Agrave: "À",
705
702
  agrave: "à",
706
703
  Aacute: "Á",
@@ -764,7 +761,7 @@ var $e = {
764
761
  szlig: "ß",
765
762
  yuml: "ÿ",
766
763
  Yuml: "Ÿ"
767
- }, tt = {
764
+ }, et = {
768
765
  Amacr: "Ā",
769
766
  amacr: "ā",
770
767
  Abreve: "Ă",
@@ -882,7 +879,7 @@ var $e = {
882
879
  zdot: "ż",
883
880
  Zcaron: "Ž",
884
881
  zcaron: "ž"
885
- }, nt = {
882
+ }, tt = {
886
883
  Alpha: "Α",
887
884
  alpha: "α",
888
885
  Beta: "Β",
@@ -953,7 +950,7 @@ var $e = {
953
950
  Gammad: "Ϝ",
954
951
  gammad: "ϝ",
955
952
  digamma: "ϝ"
956
- }, rt = {
953
+ }, nt = {
957
954
  Afr: "𝔄",
958
955
  afr: "𝔞",
959
956
  Acy: "А",
@@ -1048,11 +1045,8 @@ var $e = {
1048
1045
  ubrcy: "ў",
1049
1046
  DZcy: "Џ",
1050
1047
  dzcy: "џ"
1051
- }, it = {
1048
+ }, rt = {
1052
1049
  plus: "+",
1053
- minus: "−",
1054
- mnplus: "∓",
1055
- mp: "∓",
1056
1050
  pm: "±",
1057
1051
  times: "×",
1058
1052
  div: "÷",
@@ -1125,10 +1119,6 @@ var $e = {
1125
1119
  bumpe: "≏",
1126
1120
  bumpeq: "≏",
1127
1121
  HumpEqual: "≏",
1128
- dotminus: "∸",
1129
- minusd: "∸",
1130
- plusdo: "∔",
1131
- dotplus: "∔",
1132
1122
  le: "≤",
1133
1123
  LessEqual: "≤",
1134
1124
  ge: "≥",
@@ -1137,7 +1127,7 @@ var $e = {
1137
1127
  lesseqqgtr: "⪋",
1138
1128
  greater: ">",
1139
1129
  less: "<"
1140
- }, at = {
1130
+ }, it = {
1141
1131
  alefsym: "ℵ",
1142
1132
  aleph: "ℵ",
1143
1133
  beth: "ℶ",
@@ -1239,7 +1229,6 @@ var $e = {
1239
1229
  wreath: "≀",
1240
1230
  nsime: "≄",
1241
1231
  nsimeq: "≄",
1242
- nsimeq: "≄",
1243
1232
  ncong: "≇",
1244
1233
  simne: "≆",
1245
1234
  ncongdot: "⩭̸",
@@ -1259,7 +1248,7 @@ var $e = {
1259
1248
  npr: "⊀",
1260
1249
  nsucc: "⊁",
1261
1250
  nsc: "⊁"
1262
- }, ot = {
1251
+ }, at = {
1263
1252
  larr: "←",
1264
1253
  leftarrow: "←",
1265
1254
  LeftArrow: "←",
@@ -1350,10 +1339,6 @@ var $e = {
1350
1339
  mapsto: "↦",
1351
1340
  mapstodown: "↧",
1352
1341
  crarr: "↵",
1353
- nwarrow: "↖",
1354
- nearrow: "↗",
1355
- searrow: "↘",
1356
- swarrow: "↙",
1357
1342
  nleftarrow: "↚",
1358
1343
  nleftrightarrow: "↮",
1359
1344
  nrightarrow: "↛",
@@ -1394,7 +1379,6 @@ var $e = {
1394
1379
  ldrushar: "⥋",
1395
1380
  rdldhar: "⥩",
1396
1381
  lrhard: "⥭",
1397
- rlhar: "⇌",
1398
1382
  uharr: "↾",
1399
1383
  uharl: "↿",
1400
1384
  dharr: "⇂",
@@ -1410,13 +1394,12 @@ var $e = {
1410
1394
  nhArr: "⇎",
1411
1395
  nlarr: "↚",
1412
1396
  nlArr: "⇍",
1413
- nrarr: "↛",
1414
1397
  nrArr: "⇏",
1415
1398
  larrb: "⇤",
1416
1399
  LeftArrowBar: "⇤",
1417
1400
  rarrb: "⇥",
1418
1401
  RightArrowBar: "⇥"
1419
- }, st = {
1402
+ }, ot = {
1420
1403
  square: "□",
1421
1404
  Square: "□",
1422
1405
  squ: "□",
@@ -1509,7 +1492,7 @@ var $e = {
1509
1492
  boxvH: "╪",
1510
1493
  boxVh: "╫",
1511
1494
  boxVH: "╬"
1512
- }, ct = {
1495
+ }, st = {
1513
1496
  excl: "!",
1514
1497
  iexcl: "¡",
1515
1498
  brvbar: "¦",
@@ -1559,16 +1542,14 @@ var $e = {
1559
1542
  DiacriticalTilde: "˜",
1560
1543
  DiacriticalDot: "˙",
1561
1544
  DiacriticalDoubleAcute: "˝",
1562
- grave: "`",
1563
- acute: "´"
1564
- }, lt = {
1545
+ grave: "`"
1546
+ }, ct = {
1565
1547
  cent: "¢",
1566
1548
  pound: "£",
1567
1549
  curren: "¤",
1568
1550
  yen: "¥",
1569
1551
  euro: "€",
1570
1552
  dollar: "$",
1571
- euro: "€",
1572
1553
  fnof: "ƒ",
1573
1554
  inr: "₹",
1574
1555
  af: "؋",
@@ -1578,7 +1559,7 @@ var $e = {
1578
1559
  won: "₩",
1579
1560
  yuan: "¥",
1580
1561
  cedil: "¸"
1581
- }, ut = {
1562
+ }, lt = {
1582
1563
  frac12: "½",
1583
1564
  half: "½",
1584
1565
  frac13: "⅓",
@@ -1596,7 +1577,7 @@ var $e = {
1596
1577
  frac58: "⅝",
1597
1578
  frac78: "⅞",
1598
1579
  frasl: "⁄"
1599
- }, dt = {
1580
+ }, ut = {
1600
1581
  trade: "™",
1601
1582
  TRADE: "™",
1602
1583
  telrec: "⌕",
@@ -1656,7 +1637,6 @@ var $e = {
1656
1637
  Vdash: "⊩",
1657
1638
  dashv: "⊣",
1658
1639
  vDash: "⊨",
1659
- Vdash: "⊩",
1660
1640
  Vvdash: "⊪",
1661
1641
  nvdash: "⊬",
1662
1642
  nvDash: "⊭",
@@ -1664,6 +1644,7 @@ var $e = {
1664
1644
  nVDash: "⊯"
1665
1645
  };
1666
1646
  ({
1647
+ ...Qe,
1667
1648
  ...$e,
1668
1649
  ...et,
1669
1650
  ...tt,
@@ -1675,16 +1656,15 @@ var $e = {
1675
1656
  ...st,
1676
1657
  ...ct,
1677
1658
  ...lt,
1678
- ...ut,
1679
- ...dt
1659
+ ...ut
1680
1660
  });
1681
- var ft = {
1661
+ var dt = {
1682
1662
  amp: "&",
1683
1663
  apos: "'",
1684
1664
  gt: ">",
1685
1665
  lt: "<",
1686
1666
  quot: "\""
1687
- }, pt = {
1667
+ }, ft = {
1688
1668
  nbsp: "\xA0",
1689
1669
  copy: "©",
1690
1670
  reg: "®",
@@ -1705,10 +1685,14 @@ var ft = {
1705
1685
  frac12: "½",
1706
1686
  frac14: "¼",
1707
1687
  frac34: "¾"
1708
- }, mt = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
1709
- function ht(e) {
1688
+ }, z = Object.freeze({
1689
+ ALLOW: "allow",
1690
+ BLOCK: "block",
1691
+ THROW: "throw"
1692
+ }), pt = /* @__PURE__ */ new Set("!?\\\\/[]$%{}^&*()<>|+");
1693
+ function mt(e) {
1710
1694
  if (e[0] === "#") throw Error(`[EntityReplacer] Invalid character '#' in entity name: "${e}"`);
1711
- for (let t of e) if (mt.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
1695
+ for (let t of e) if (pt.has(t)) throw Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${e}"`);
1712
1696
  return e;
1713
1697
  }
1714
1698
  function B(...e) {
@@ -1724,20 +1708,20 @@ function B(...e) {
1724
1708
  return t;
1725
1709
  }
1726
1710
  var V = "external", H = "base", U = "all";
1727
- function gt(e) {
1728
- return !e || e === V ? new Set([V]) : e === U ? new Set([U]) : e === H ? new Set([H]) : Array.isArray(e) ? new Set(e) : new Set([V]);
1711
+ function ht(e) {
1712
+ return !e || e === V ? /* @__PURE__ */ new Set([V]) : e === U ? /* @__PURE__ */ new Set([U]) : e === H ? /* @__PURE__ */ new Set([H]) : Array.isArray(e) ? new Set(e) : /* @__PURE__ */ new Set([V]);
1729
1713
  }
1730
1714
  var W = Object.freeze({
1731
1715
  allow: 0,
1732
1716
  leave: 1,
1733
1717
  remove: 2,
1734
1718
  throw: 3
1735
- }), _t = new Set([
1719
+ }), gt = /* @__PURE__ */ new Set([
1736
1720
  9,
1737
1721
  10,
1738
1722
  13
1739
1723
  ]);
1740
- function vt(e) {
1724
+ function _t(e) {
1741
1725
  if (!e) return {
1742
1726
  xmlVersion: 1,
1743
1727
  onLevel: W.allow,
@@ -1750,21 +1734,40 @@ function vt(e) {
1750
1734
  nullLevel: Math.max(r, W.remove)
1751
1735
  };
1752
1736
  }
1753
- var yt = class {
1737
+ var vt = class {
1754
1738
  constructor(e = {}) {
1755
- this._limit = e.limit || {}, this._maxTotalExpansions = this._limit.maxTotalExpansions || 0, this._maxExpandedLength = this._limit.maxExpandedLength || 0, this._postCheck = typeof e.postCheck == "function" ? e.postCheck : (e) => e, this._limitTiers = gt(this._limit.applyLimitsTo ?? V), this._numericAllowed = e.numericAllowed ?? !0, this._baseMap = B(ft, e.namedEntities || null), this._externalMap = Object.create(null), this._inputMap = Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this._removeSet = new Set(e.remove && Array.isArray(e.remove) ? e.remove : []), this._leaveSet = new Set(e.leave && Array.isArray(e.leave) ? e.leave : []);
1756
- let t = vt(e.ncr);
1757
- this._ncrXmlVersion = t.xmlVersion, this._ncrOnLevel = t.onLevel, this._ncrNullLevel = t.nullLevel;
1739
+ this._limit = e.limit || {}, this._maxTotalExpansions = this._limit.maxTotalExpansions || 0, this._maxExpandedLength = this._limit.maxExpandedLength || 0, this._postCheck = typeof e.postCheck == "function" ? e.postCheck : (e) => e, this._limitTiers = ht(this._limit.applyLimitsTo ?? V), this._numericAllowed = e.numericAllowed ?? !0, this._baseMap = B(dt, e.namedEntities || null), this._externalMap = Object.create(null), this._inputMap = Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this._removeSet = new Set(e.remove && Array.isArray(e.remove) ? e.remove : []), this._leaveSet = new Set(e.leave && Array.isArray(e.leave) ? e.leave : []);
1740
+ let t = _t(e.ncr);
1741
+ this._ncrXmlVersion = t.xmlVersion, this._ncrOnLevel = t.onLevel, this._ncrNullLevel = t.nullLevel, this._onExternalEntity = typeof e.onExternalEntity == "function" ? e.onExternalEntity : null, this._onInputEntity = typeof e.onInputEntity == "function" ? e.onInputEntity : null;
1742
+ }
1743
+ _applyRegistrationHook(e, t, n, r) {
1744
+ if (!e) return !0;
1745
+ let i = e(t, n);
1746
+ if (i === z.BLOCK) return !1;
1747
+ if (i === z.THROW) throw Error(`[EntityDecoder] Registration of ${r} entity "&${t};" was rejected by hook`);
1748
+ return !0;
1758
1749
  }
1759
1750
  setExternalEntities(e) {
1760
- if (e) for (let t of Object.keys(e)) ht(t);
1761
- this._externalMap = B(e);
1751
+ if (e) for (let t of Object.keys(e)) mt(t);
1752
+ if (!this._onExternalEntity) {
1753
+ this._externalMap = B(e);
1754
+ return;
1755
+ }
1756
+ let t = B(e), n = Object.create(null);
1757
+ for (let [e, r] of Object.entries(t)) this._applyRegistrationHook(this._onExternalEntity, e, r, "external") && (n[e] = r);
1758
+ this._externalMap = n;
1762
1759
  }
1763
1760
  addExternalEntity(e, t) {
1764
- ht(e), typeof t == "string" && t.indexOf("&") === -1 && (this._externalMap[e] = t);
1761
+ mt(e), typeof t == "string" && t.indexOf("&") === -1 && this._applyRegistrationHook(this._onExternalEntity, e, t, "external") && (this._externalMap[e] = t);
1765
1762
  }
1766
1763
  addInputEntities(e) {
1767
- this._totalExpansions = 0, this._expandedLength = 0, this._inputMap = B(e);
1764
+ if (this._totalExpansions = 0, this._expandedLength = 0, !this._onInputEntity) {
1765
+ this._inputMap = B(e);
1766
+ return;
1767
+ }
1768
+ let t = B(e), n = Object.create(null);
1769
+ for (let [e, r] of Object.entries(t)) this._applyRegistrationHook(this._onInputEntity, e, r, "input") && (n[e] = r);
1770
+ this._inputMap = n;
1768
1771
  }
1769
1772
  reset() {
1770
1773
  return this._inputMap = Object.create(null), this._totalExpansions = 0, this._expandedLength = 0, this;
@@ -1773,7 +1776,7 @@ var yt = class {
1773
1776
  this._ncrXmlVersion = e === 1.1 ? 1.1 : 1;
1774
1777
  }
1775
1778
  decode(e) {
1776
- if (typeof e != "string" || e.length === 0) return e;
1779
+ if (typeof e != "string" || e.length === 0 || e.indexOf("&") === -1) return e;
1777
1780
  let t = e, n = [], r = e.length, i = 0, a = 0, o = this._maxTotalExpansions > 0, s = this._maxExpandedLength > 0, c = o || s;
1778
1781
  for (; a < r;) {
1779
1782
  if (e.charCodeAt(a) !== 38) {
@@ -1841,7 +1844,7 @@ var yt = class {
1841
1844
  };
1842
1845
  }
1843
1846
  _classifyNCR(e) {
1844
- return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !_t.has(e) ? W.remove : -1;
1847
+ return e === 0 ? this._ncrNullLevel : e >= 55296 && e <= 57343 || this._ncrXmlVersion === 1 && e >= 1 && e <= 31 && !gt.has(e) ? W.remove : -1;
1845
1848
  }
1846
1849
  _applyNCRAction(e, t, n) {
1847
1850
  switch (e) {
@@ -1860,7 +1863,7 @@ var yt = class {
1860
1863
  let i = r === -1 ? this._ncrOnLevel : Math.max(this._ncrOnLevel, r);
1861
1864
  return this._applyNCRAction(i, e, n);
1862
1865
  }
1863
- }, bt = (e) => I.includes(e) ? "__" + e : e, xt = {
1866
+ }, yt = (e) => Ie.includes(e) ? "__" + e : e, bt = {
1864
1867
  preserveOrder: !1,
1865
1868
  attributeNamePrefix: "@_",
1866
1869
  attributesGroupName: !1,
@@ -1875,7 +1878,8 @@ var yt = class {
1875
1878
  numberParseOptions: {
1876
1879
  hex: !0,
1877
1880
  leadingZeros: !0,
1878
- eNotation: !0
1881
+ eNotation: !0,
1882
+ unicode: !1
1879
1883
  },
1880
1884
  tagValueProcessor: function(e, t) {
1881
1885
  return t;
@@ -1902,14 +1906,14 @@ var yt = class {
1902
1906
  maxNestedTags: 100,
1903
1907
  strictReservedNames: !0,
1904
1908
  jPath: !0,
1905
- onDangerousProperty: bt
1909
+ onDangerousProperty: yt
1906
1910
  };
1907
- function St(e, t) {
1911
+ function xt(e, t) {
1908
1912
  if (typeof e != "string") return;
1909
1913
  let n = e.toLowerCase();
1910
- if (I.some((e) => n === e.toLowerCase()) || Re.some((e) => n === e.toLowerCase())) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
1914
+ if (Ie.some((e) => n === e.toLowerCase()) || Le.some((e) => n === e.toLowerCase())) throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
1911
1915
  }
1912
- function Ct(e, t) {
1916
+ function St(e, t) {
1913
1917
  return typeof e == "boolean" ? {
1914
1918
  enabled: e,
1915
1919
  maxEntitySize: 1e4,
@@ -1930,10 +1934,10 @@ function Ct(e, t) {
1930
1934
  allowedTags: e.allowedTags ?? null,
1931
1935
  tagFilter: e.tagFilter ?? null,
1932
1936
  appliesTo: e.appliesTo ?? "all"
1933
- } : Ct(!0);
1937
+ } : St(!0);
1934
1938
  }
1935
- var wt = function(e) {
1936
- let t = Object.assign({}, xt, e), n = [
1939
+ var Ct = function(e) {
1940
+ let t = Object.assign({}, bt, e), n = [
1937
1941
  {
1938
1942
  value: t.attributeNamePrefix,
1939
1943
  name: "attributeNamePrefix"
@@ -1955,9 +1959,9 @@ var wt = function(e) {
1955
1959
  name: "commentPropName"
1956
1960
  }
1957
1961
  ];
1958
- for (let { value: e, name: t } of n) e && St(e, t);
1959
- return t.onDangerousProperty === null && (t.onDangerousProperty = bt), t.processEntities = Ct(t.processEntities, t.htmlEntities), t.unpairedTagsSet = new Set(t.unpairedTags), t.stopNodes && Array.isArray(t.stopNodes) && (t.stopNodes = t.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), t;
1960
- }, Tt = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", G = class {
1962
+ for (let { value: e, name: t } of n) e && xt(e, t);
1963
+ return t.onDangerousProperty === null && (t.onDangerousProperty = yt), t.processEntities = St(t.processEntities, t.htmlEntities), t.unpairedTagsSet = new Set(t.unpairedTags), t.stopNodes && Array.isArray(t.stopNodes) && (t.stopNodes = t.stopNodes.map((e) => typeof e == "string" && e.startsWith("*.") ? ".." + e.substring(2) : e)), t;
1964
+ }, wt = typeof Symbol == "function" ? Symbol("XML Node Metadata") : "@@xmlMetadata", G = class {
1961
1965
  constructor(e) {
1962
1966
  this.tagname = e, this.child = [], this[":@"] = Object.create(null);
1963
1967
  }
@@ -1968,12 +1972,12 @@ var wt = function(e) {
1968
1972
  e.tagname === "__proto__" && (e.tagname = "#__proto__"), e[":@"] && Object.keys(e[":@"]).length > 0 ? this.child.push({
1969
1973
  [e.tagname]: e.child,
1970
1974
  ":@": e[":@"]
1971
- }) : this.child.push({ [e.tagname]: e.child }), t !== void 0 && (this.child[this.child.length - 1][Tt] = { startIndex: t });
1975
+ }) : this.child.push({ [e.tagname]: e.child }), t !== void 0 && (this.child[this.child.length - 1][wt] = { startIndex: t });
1972
1976
  }
1973
1977
  static getMetaDataSymbol() {
1974
- return Tt;
1978
+ return wt;
1975
1979
  }
1976
- }, Et = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�", Dt = Et + "\\-\\.\\d·̀-ͯ‿-⁀", Ot = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", kt = Ot + "\\-\\.\\d·̀-ͯ҇‿-⁀", At = (e, t, n = "") => {
1980
+ }, Tt = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�", Et = ":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�\\-\\.\\d·̀-ͯ‿-⁀", Dt = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿", Ot = ":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿\\-\\.\\d·̀-ͯ҇‿-⁀", K = (e, t, n = "") => {
1977
1981
  let r = `[${e.replace(":", "")}][${t.replace(":", "")}]*`;
1978
1982
  return {
1979
1983
  name: RegExp(`^[${e}][${t}]*$`, n),
@@ -1982,7 +1986,24 @@ var wt = function(e) {
1982
1986
  nmToken: RegExp(`^[${t}]+$`, n),
1983
1987
  nmTokens: RegExp(`^[${t}]+(?:\\s+[${t}]+)*$`, n)
1984
1988
  };
1985
- }, jt = At(Et, Dt), Mt = At(Ot, kt, "u"), Nt = (e = "1.0") => e === "1.1" ? Mt : jt, K = (e, { xmlVersion: t = "1.0" } = {}) => Nt(t).qName.test(e), Pt = class {
1989
+ }, kt = K(Tt, Et), At = K(Dt, Ot, "u"), jt = K(":A-Za-z_", ":A-Za-z_\\-\\.\\d"), Mt = (e = "1.0", t = !1) => t ? jt : e === "1.1" ? At : kt, Nt = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1 } = {}) => Mt(t, n).qName.test(e), Pt = [
1990
+ "name",
1991
+ "ncName",
1992
+ "qName",
1993
+ "nmToken",
1994
+ "nmTokens"
1995
+ ], Ft = (e, { xmlVersion: t = "1.0", asciiOnly: n = !1, maxCacheSize: r = 2048 } = {}) => {
1996
+ if (!Pt.includes(e)) throw TypeError(`Unknown production "${e}". Must be one of: ${Pt.join(", ")}`);
1997
+ let i = Mt(t, n)[e], a = /* @__PURE__ */ new Map(), o = (e) => {
1998
+ let t = a.get(e);
1999
+ if (t !== void 0) return t;
2000
+ let n = i.test(e);
2001
+ return a.size < r && a.set(e, n), n;
2002
+ };
2003
+ return o.reset = () => {
2004
+ a = /* @__PURE__ */ new Map();
2005
+ }, o;
2006
+ }, It = class {
1986
2007
  constructor(e, t) {
1987
2008
  this.suppressValidationErr = !e, this.options = e, this.xmlVersion = t || 1;
1988
2009
  }
@@ -2074,7 +2095,7 @@ var wt = function(e) {
2074
2095
  let n = t;
2075
2096
  for (; t < e.length && !/\s/.test(e[t]);) t++;
2076
2097
  let r = e.substring(n, t);
2077
- if (!this.suppressValidationErr && !K(r, { xmlVersion: this.xmlVersion })) throw Error(`Invalid element name: "${r}"`);
2098
+ if (!this.suppressValidationErr && !Nt(r, { xmlVersion: this.xmlVersion })) throw Error(`Invalid element name: "${r}"`);
2078
2099
  t = q(e, t);
2079
2100
  let i = "";
2080
2101
  if (e[t] === "E" && J(e, "MPTY", t)) t += 4;
@@ -2147,34 +2168,181 @@ function J(e, t, n) {
2147
2168
  return !0;
2148
2169
  }
2149
2170
  function Y(e, t) {
2150
- if (K(e, { xmlVersion: t })) return e;
2171
+ if (Nt(e, { xmlVersion: t })) return e;
2151
2172
  throw Error(`Invalid entity name ${e}`);
2152
2173
  }
2153
2174
  //#endregion
2154
- //#region ../../node_modules/.pnpm/strnum@2.3.0/node_modules/strnum/strnum.js
2155
- var Ft = /^[-+]?0x[a-fA-F0-9]+$/, It = /^0b[01]+$/, Lt = /^0o[0-7]+$/, Rt = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, zt = {
2175
+ //#region ../../node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/digitTable.js
2176
+ var Lt = [
2177
+ 48,
2178
+ 1632,
2179
+ 1776,
2180
+ 2406,
2181
+ 2534,
2182
+ 2662,
2183
+ 2790,
2184
+ 2918,
2185
+ 3046,
2186
+ 3174,
2187
+ 3302,
2188
+ 3430,
2189
+ 3558,
2190
+ 3664,
2191
+ 3792,
2192
+ 3872,
2193
+ 4160,
2194
+ 4240,
2195
+ 6112,
2196
+ 6160,
2197
+ 6470,
2198
+ 6608,
2199
+ 6784,
2200
+ 6800,
2201
+ 6992,
2202
+ 7088,
2203
+ 7232,
2204
+ 7248,
2205
+ 65296,
2206
+ 120782,
2207
+ 120792,
2208
+ 120802,
2209
+ 120812,
2210
+ 120822,
2211
+ 66720,
2212
+ 68912,
2213
+ 69734,
2214
+ 69872,
2215
+ 69942,
2216
+ 70096,
2217
+ 70384,
2218
+ 70736,
2219
+ 70864,
2220
+ 71248,
2221
+ 71360,
2222
+ 71472,
2223
+ 71904,
2224
+ 72016,
2225
+ 72688,
2226
+ 72784,
2227
+ 73040,
2228
+ 73120,
2229
+ 73552,
2230
+ 92768,
2231
+ 92864,
2232
+ 93008,
2233
+ 123200,
2234
+ 123632,
2235
+ 124144,
2236
+ 125264,
2237
+ 130032
2238
+ ], Rt = /* @__PURE__ */ new Map(), zt = 65535, Bt = 1632, Vt = (/* @__PURE__ */ new Uint8Array(63904)).fill(255);
2239
+ for (let e of Lt) for (let t = 0; t < 10; t++) {
2240
+ let n = e + t;
2241
+ n <= zt ? Vt[n - Bt] = t : Rt.set(n, t);
2242
+ }
2243
+ //#endregion
2244
+ //#region ../../node_modules/.pnpm/anynum@1.0.1/node_modules/anynum/anynum.js
2245
+ var Ht = 48, Ut = 57, Wt = 45, X = /* @__PURE__ */ new Set([
2246
+ 8722,
2247
+ 65293,
2248
+ 65123
2249
+ ]);
2250
+ function Gt(e) {
2251
+ if (typeof e != "string") return e;
2252
+ let t = e.length;
2253
+ if (t === 0) return e;
2254
+ let n = -1;
2255
+ for (let r = 0; r < t; r++) {
2256
+ let i = e.charCodeAt(r);
2257
+ if (!(i >= Ht && i <= Ut || i === Wt)) {
2258
+ if (i < 1632) {
2259
+ if (X.has(i)) {
2260
+ n = r;
2261
+ break;
2262
+ }
2263
+ continue;
2264
+ }
2265
+ if (i >= 55296 && i <= 56319) {
2266
+ if (r + 1 < t) {
2267
+ let t = e.charCodeAt(r + 1);
2268
+ if (t >= 56320 && t <= 57343) {
2269
+ let e = 65536 + (i - 55296 << 10) + (t - 56320);
2270
+ if (Rt.has(e)) {
2271
+ n = r;
2272
+ break;
2273
+ }
2274
+ }
2275
+ }
2276
+ continue;
2277
+ }
2278
+ if (Vt[i - 1632] !== 255 || X.has(i)) {
2279
+ n = r;
2280
+ break;
2281
+ }
2282
+ }
2283
+ }
2284
+ if (n === -1) return e;
2285
+ let r = [];
2286
+ n > 0 && r.push(e.slice(0, n));
2287
+ for (let i = n; i < t; i++) {
2288
+ let n = e.charCodeAt(i);
2289
+ if (n >= Ht && n <= Ut || n === Wt) {
2290
+ r.push(e[i]);
2291
+ continue;
2292
+ }
2293
+ if (n < 1632) {
2294
+ r.push(X.has(n) ? "-" : e[i]);
2295
+ continue;
2296
+ }
2297
+ if (n >= 55296 && n <= 56319) {
2298
+ if (i + 1 < t) {
2299
+ let t = e.charCodeAt(i + 1);
2300
+ if (t >= 56320 && t <= 57343) {
2301
+ let e = 65536 + (n - 55296 << 10) + (t - 56320), a = Rt.get(e);
2302
+ if (a !== void 0) {
2303
+ r.push(String.fromCharCode(a + 48)), i++;
2304
+ continue;
2305
+ }
2306
+ }
2307
+ }
2308
+ r.push(e[i]);
2309
+ continue;
2310
+ }
2311
+ if (X.has(n)) {
2312
+ r.push("-");
2313
+ continue;
2314
+ }
2315
+ let a = Vt[n - Bt];
2316
+ r.push(a === 255 ? e[i] : String.fromCharCode(a + 48));
2317
+ }
2318
+ return r.join("");
2319
+ }
2320
+ //#endregion
2321
+ //#region ../../node_modules/.pnpm/strnum@2.4.1/node_modules/strnum/strnum.js
2322
+ var Kt = /^[-+]?0x[a-fA-F0-9]+$/, qt = /^0b[01]+$/, Jt = /^0o[0-7]+$/, Yt = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, Xt = {
2156
2323
  hex: !0,
2157
2324
  binary: !1,
2158
2325
  octal: !1,
2159
2326
  leadingZeros: !0,
2160
2327
  decimalPoint: ".",
2161
2328
  eNotation: !0,
2162
- infinity: "original"
2329
+ infinity: "original",
2330
+ unicode: !1
2163
2331
  };
2164
- function Bt(e, t = {}) {
2165
- if (t = Object.assign({}, zt, t), !e || typeof e != "string") return e;
2332
+ function Zt(e, t = {}) {
2333
+ if (t = Object.assign({}, Xt, t), !e || typeof e != "string") return e;
2166
2334
  let n = e.trim();
2167
2335
  if (n.length === 0 || t.skipLike !== void 0 && t.skipLike.test(n)) return e;
2168
- if (n === "0") return 0;
2169
- if (t.hex && Ft.test(n)) return X(n, 16);
2170
- if (t.binary && It.test(n)) return X(n, 2);
2171
- if (t.octal && Lt.test(n)) return X(n, 8);
2172
- if (!isFinite(n)) return Wt(e, Number(n), t);
2173
- if (n.includes("e") || n.includes("E")) return Ht(e, n, t);
2174
- {
2175
- let r = Rt.exec(n);
2336
+ if (n === "0" || t.unicode && (n = Gt(n), n === "0")) return 0;
2337
+ if (t.hex && Kt.test(n)) return tn(n, 16);
2338
+ if (t.binary && qt.test(n)) return tn(n, 2);
2339
+ if (t.octal && Jt.test(n)) return tn(n, 8);
2340
+ if (!isFinite(n)) return nn(e, Number(n), t);
2341
+ if (n.includes("e") || n.includes("E")) return $t(e, n, t);
2342
+ {
2343
+ let r = Yt.exec(n);
2176
2344
  if (r) {
2177
- let i = r[1] || "", a = r[2], o = Ut(r[3]), s = i ? e[a.length + 1] === "." : e[a.length] === ".";
2345
+ let i = r[1] || "", a = r[2], o = en(r[3]), s = i ? e[a.length + 1] === "." : e[a.length] === ".";
2178
2346
  if (!t.leadingZeros && (a.length > 1 || a.length === 1 && !s)) return e;
2179
2347
  {
2180
2348
  let r = Number(n), s = String(r);
@@ -2187,26 +2355,26 @@ function Bt(e, t = {}) {
2187
2355
  } else return e;
2188
2356
  }
2189
2357
  }
2190
- var Vt = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2191
- function Ht(e, t, n) {
2358
+ var Qt = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2359
+ function $t(e, t, n) {
2192
2360
  if (!n.eNotation) return e;
2193
- let r = t.match(Vt);
2361
+ let r = t.match(Qt);
2194
2362
  if (r) {
2195
2363
  let i = r[1] || "", a = r[3].indexOf("e") === -1 ? "E" : "e", o = r[2], s = i ? e[o.length + 1] === a : e[o.length] === a;
2196
2364
  return o.length > 1 && s ? e : o.length === 1 && (r[3].startsWith(`.${a}`) || r[3][0] === a) ? Number(t) : o.length > 0 ? n.leadingZeros && !s ? (t = (r[1] || "") + r[3], Number(t)) : e : Number(t);
2197
2365
  } else return e;
2198
2366
  }
2199
- function Ut(e) {
2367
+ function en(e) {
2200
2368
  return e && e.indexOf(".") !== -1 ? (e = e.replace(/0+$/, ""), e === "." ? e = "0" : e[0] === "." ? e = "0" + e : e[e.length - 1] === "." && (e = e.substring(0, e.length - 1)), e) : e;
2201
2369
  }
2202
- function X(e, t) {
2370
+ function tn(e, t) {
2203
2371
  let n = e.trim();
2204
2372
  if ((t === 2 || t === 8) && (e = n.substring(2)), parseInt) return parseInt(e, t);
2205
2373
  if (Number.parseInt) return Number.parseInt(e, t);
2206
2374
  if (window && window.parseInt) return window.parseInt(e, t);
2207
2375
  throw Error("parseInt, Number.parseInt, window.parseInt are not supported");
2208
2376
  }
2209
- function Wt(e, t, n) {
2377
+ function nn(e, t, n) {
2210
2378
  let r = t === Infinity;
2211
2379
  switch (n.infinity.toLowerCase()) {
2212
2380
  case "null": return null;
@@ -2216,15 +2384,15 @@ function Wt(e, t, n) {
2216
2384
  }
2217
2385
  }
2218
2386
  //#endregion
2219
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/ignoreAttributes.js
2220
- function Gt(e) {
2387
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/ignoreAttributes.js
2388
+ function rn(e) {
2221
2389
  return typeof e == "function" ? e : Array.isArray(e) ? (t) => {
2222
2390
  for (let n of e) if (typeof n == "string" && t === n || n instanceof RegExp && n.test(t)) return !0;
2223
2391
  } : () => !1;
2224
2392
  }
2225
2393
  //#endregion
2226
- //#region ../../node_modules/.pnpm/path-expression-matcher@1.5.0/node_modules/path-expression-matcher/src/Expression.js
2227
- var Z = class {
2394
+ //#region ../../node_modules/.pnpm/path-expression-matcher@1.6.2/node_modules/path-expression-matcher/src/Expression.js
2395
+ var an = class {
2228
2396
  constructor(e, t = {}, n) {
2229
2397
  this.pattern = e, this.separator = t.separator || ".", this.segments = this._parse(e), this.data = n, this._hasDeepWildcard = this.segments.some((e) => e.type === "deep-wildcard"), this._hasAttributeCondition = this.segments.some((e) => e.attrName !== void 0), this._hasPositionSelector = this.segments.some((e) => e.position !== void 0);
2230
2398
  }
@@ -2280,14 +2448,21 @@ var Z = class {
2280
2448
  toString() {
2281
2449
  return this.pattern;
2282
2450
  }
2283
- }, Kt = class {
2451
+ }, on = class {
2284
2452
  constructor() {
2285
- this._byDepthAndTag = /* @__PURE__ */ new Map(), this._wildcardByDepth = /* @__PURE__ */ new Map(), this._deepWildcards = [], this._patterns = /* @__PURE__ */ new Set(), this._sealed = !1;
2453
+ this._byDepthAndTag = /* @__PURE__ */ new Map(), this._wildcardByDepth = /* @__PURE__ */ new Map(), this._deepWildcards = [], this._deepByTerminalTag = /* @__PURE__ */ new Map(), this._patterns = /* @__PURE__ */ new Set(), this._sealed = !1;
2286
2454
  }
2287
2455
  add(e) {
2288
2456
  if (this._sealed) throw TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");
2289
2457
  if (this._patterns.has(e.pattern)) return this;
2290
- if (this._patterns.add(e.pattern), e.hasDeepWildcard()) return this._deepWildcards.push(e), this;
2458
+ if (this._patterns.add(e.pattern), e.hasDeepWildcard()) {
2459
+ let t = e.segments[e.segments.length - 1];
2460
+ if (t && t.type !== "deep-wildcard" && t.tag !== "*") {
2461
+ let n = t.tag;
2462
+ this._deepByTerminalTag.has(n) || this._deepByTerminalTag.set(n, []), this._deepByTerminalTag.get(n).push(e);
2463
+ } else this._deepWildcards.push(e);
2464
+ return this;
2465
+ }
2291
2466
  let t = e.length, n = e.segments[e.segments.length - 1]?.tag;
2292
2467
  if (!n || n === "*") this._wildcardByDepth.has(t) || this._wildcardByDepth.set(t, []), this._wildcardByDepth.get(t).push(e);
2293
2468
  else {
@@ -2316,18 +2491,22 @@ var Z = class {
2316
2491
  return this.findMatch(e) !== null;
2317
2492
  }
2318
2493
  findMatch(e) {
2319
- let t = e.getDepth(), n = `${t}:${e.getCurrentTag()}`, r = this._byDepthAndTag.get(n);
2320
- if (r) {
2321
- for (let t = 0; t < r.length; t++) if (e.matches(r[t])) return r[t];
2322
- }
2323
- let i = this._wildcardByDepth.get(t);
2494
+ let t = e.getDepth(), n = e.getCurrentTag(), r = `${t}:${n}`, i = this._byDepthAndTag.get(r);
2324
2495
  if (i) {
2325
2496
  for (let t = 0; t < i.length; t++) if (e.matches(i[t])) return i[t];
2326
2497
  }
2498
+ let a = this._wildcardByDepth.get(t);
2499
+ if (a) {
2500
+ for (let t = 0; t < a.length; t++) if (e.matches(a[t])) return a[t];
2501
+ }
2502
+ let o = this._deepByTerminalTag.get(n);
2503
+ if (o) {
2504
+ for (let t = 0; t < o.length; t++) if (e.matches(o[t])) return o[t];
2505
+ }
2327
2506
  for (let t = 0; t < this._deepWildcards.length; t++) if (e.matches(this._deepWildcards[t])) return this._deepWildcards[t];
2328
2507
  return null;
2329
2508
  }
2330
- }, qt = class {
2509
+ }, sn = class {
2331
2510
  constructor(e) {
2332
2511
  this._matcher = e;
2333
2512
  }
@@ -2352,6 +2531,12 @@ var Z = class {
2352
2531
  let n = t[t.length - 1];
2353
2532
  return n.values !== void 0 && e in n.values;
2354
2533
  }
2534
+ getAnyParentAttr(e) {
2535
+ return this._matcher.getAnyParentAttr(e);
2536
+ }
2537
+ hasAnyParentAttr(e) {
2538
+ return this._matcher.hasAnyParentAttr(e);
2539
+ }
2355
2540
  getPosition() {
2356
2541
  let e = this._matcher.path;
2357
2542
  return e.length === 0 ? -1 : e[e.length - 1].position ?? 0;
@@ -2378,29 +2563,43 @@ var Z = class {
2378
2563
  matchesAny(e) {
2379
2564
  return e.matchesAny(this._matcher);
2380
2565
  }
2381
- }, Jt = class {
2566
+ }, cn = class {
2382
2567
  constructor(e = {}) {
2383
- this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new qt(this);
2568
+ this.separator = e.separator || ".", this.path = [], this.siblingStacks = [], this._pathStringCache = null, this._view = new sn(this), this._keptAttrs = [];
2384
2569
  }
2385
- push(e, t = null, n = null) {
2570
+ push(e, t = null, n = null, r = null) {
2386
2571
  this._pathStringCache = null, this.path.length > 0 && (this.path[this.path.length - 1].values = void 0);
2387
- let r = this.path.length;
2388
- this.siblingStacks[r] || (this.siblingStacks[r] = /* @__PURE__ */ new Map());
2389
- let i = this.siblingStacks[r], a = n ? `${n}:${e}` : e, o = i.get(a) || 0, s = 0;
2390
- for (let e of i.values()) s += e;
2391
- i.set(a, o + 1);
2392
- let c = {
2572
+ let i = this.path.length, a = this.siblingStacks[i];
2573
+ a || (a = {
2574
+ counts: /* @__PURE__ */ new Map(),
2575
+ total: 0
2576
+ }, this.siblingStacks[i] = a);
2577
+ let o = n ? `${n}:${e}` : e, s = a.counts.get(o) || 0, c = a.total;
2578
+ a.counts.set(o, s + 1), a.total++;
2579
+ let l = {
2393
2580
  tag: e,
2394
- position: s,
2395
- counter: o
2581
+ position: c,
2582
+ counter: s
2396
2583
  };
2397
- n != null && (c.namespace = n), t != null && (c.values = t), this.path.push(c);
2584
+ n != null && (l.namespace = n), t != null && (l.values = t), this.path.push(l);
2585
+ let u = this.path.length, d = r === null ? null : r.keep;
2586
+ if (d != null && d.length > 0 && t) for (let e = 0; e < d.length; e++) {
2587
+ let n = d[e];
2588
+ t[n] !== void 0 && this._keptAttrs.push({
2589
+ depth: u,
2590
+ name: n,
2591
+ value: t[n]
2592
+ });
2593
+ }
2398
2594
  }
2399
2595
  pop() {
2400
2596
  if (this.path.length === 0) return;
2401
2597
  this._pathStringCache = null;
2402
2598
  let e = this.path.pop();
2403
- return this.siblingStacks.length > this.path.length + 1 && (this.siblingStacks.length = this.path.length + 1), e;
2599
+ this.siblingStacks.length > this.path.length + 1 && (this.siblingStacks.length = this.path.length + 1);
2600
+ let t = this.path.length + 1;
2601
+ for (; this._keptAttrs.length > 0 && this._keptAttrs[this._keptAttrs.length - 1].depth >= t;) this._keptAttrs.pop();
2602
+ return e;
2404
2603
  }
2405
2604
  updateCurrent(e) {
2406
2605
  if (this.path.length > 0) {
@@ -2422,6 +2621,15 @@ var Z = class {
2422
2621
  let t = this.path[this.path.length - 1];
2423
2622
  return t.values !== void 0 && e in t.values;
2424
2623
  }
2624
+ getAnyParentAttr(e) {
2625
+ let t = this._keptAttrs;
2626
+ for (let n = t.length - 1; n >= 0; n--) if (t[n].name === e) return t[n].value;
2627
+ }
2628
+ hasAnyParentAttr(e) {
2629
+ let t = this._keptAttrs;
2630
+ for (let n = t.length - 1; n >= 0; n--) if (t[n].name === e) return !0;
2631
+ return !1;
2632
+ }
2425
2633
  getPosition() {
2426
2634
  return this.path.length === 0 ? -1 : this.path[this.path.length - 1].position ?? 0;
2427
2635
  }
@@ -2447,7 +2655,7 @@ var Z = class {
2447
2655
  return this.path.map((e) => e.tag);
2448
2656
  }
2449
2657
  reset() {
2450
- this._pathStringCache = null, this.path = [], this.siblingStacks = [];
2658
+ this._pathStringCache = null, this.path = [], this.siblingStacks = [], this._keptAttrs = [];
2451
2659
  }
2452
2660
  matches(e) {
2453
2661
  let t = e.segments;
@@ -2492,19 +2700,660 @@ var Z = class {
2492
2700
  snapshot() {
2493
2701
  return {
2494
2702
  path: this.path.map((e) => ({ ...e })),
2495
- siblingStacks: this.siblingStacks.map((e) => new Map(e))
2703
+ siblingStacks: this.siblingStacks.map((e) => e && {
2704
+ counts: new Map(e.counts),
2705
+ total: e.total
2706
+ }),
2707
+ keptAttrs: this._keptAttrs.map((e) => ({ ...e }))
2496
2708
  };
2497
2709
  }
2498
2710
  restore(e) {
2499
- this._pathStringCache = null, this.path = e.path.map((e) => ({ ...e })), this.siblingStacks = e.siblingStacks.map((e) => new Map(e));
2711
+ this._pathStringCache = null, this.path = e.path.map((e) => ({ ...e })), this.siblingStacks = e.siblingStacks.map((e) => e && {
2712
+ counts: new Map(e.counts),
2713
+ total: e.total
2714
+ }), this._keptAttrs = (e.keptAttrs || []).map((e) => ({ ...e }));
2500
2715
  }
2501
2716
  readOnly() {
2502
2717
  return this._view;
2503
2718
  }
2504
- };
2719
+ }, ln = [
2720
+ {
2721
+ id: "html-script-open",
2722
+ description: "<script opening tag",
2723
+ pattern: /<script[\s>/]/i
2724
+ },
2725
+ {
2726
+ id: "html-script-close",
2727
+ description: "<\/script closing tag",
2728
+ pattern: /<\/script[\s>]/i
2729
+ },
2730
+ {
2731
+ id: "html-javascript-protocol",
2732
+ description: "javascript: URI scheme (with optional whitespace/encoding)",
2733
+ pattern: /j[\t\n\r ]*a[\t\n\r ]*v[\t\n\r ]*a[\t\n\r ]*s[\t\n\r ]*c[\t\n\r ]*r[\t\n\r ]*i[\t\n\r ]*p[\t\n\r ]*t[\t\n\r ]*:/i
2734
+ },
2735
+ {
2736
+ id: "html-vbscript-protocol",
2737
+ description: "vbscript: URI scheme",
2738
+ pattern: /vbscript[\t\n\r ]*:/i
2739
+ },
2740
+ {
2741
+ id: "html-data-html",
2742
+ description: "data:text/html URI — can execute scripts in browsers",
2743
+ pattern: /data[\t\n\r ]*:[\t\n\r ]*text\/html/i
2744
+ },
2745
+ {
2746
+ id: "html-data-xhtml",
2747
+ description: "data:application/xhtml+xml URI",
2748
+ pattern: /data[\t\n\r ]*:[\t\n\r ]*application\/xhtml/i
2749
+ },
2750
+ {
2751
+ id: "html-data-svg",
2752
+ description: "data:image/svg+xml URI — can execute scripts",
2753
+ pattern: /data[\t\n\r ]*:[\t\n\r ]*image\/svg\+xml/i
2754
+ },
2755
+ {
2756
+ id: "html-inline-event-handler",
2757
+ description: "Inline event handler attributes: onclick=, onerror=, onload=, etc.",
2758
+ pattern: /\bon\w{1,30}\s*=/i
2759
+ },
2760
+ {
2761
+ id: "html-entity-obfuscated-script",
2762
+ description: "HTML-entity-encoded <script (e.g. &#x3C;script or &lt;script)",
2763
+ pattern: /(?:&#x0*3[Cc];?|&#0*60;?|&lt;)\s*script/i
2764
+ },
2765
+ {
2766
+ id: "html-entity-obfuscated-javascript",
2767
+ description: "HTML-entity-encoded javascript: (partial — catches common &#106; or &#x6a; for \"j\")",
2768
+ pattern: /(?:&#x0*6[Aa];?|&#0*106;?)\s*(?:&#x0*61;?|a)[\s\S]{0,80}script\s*:/i
2769
+ },
2770
+ {
2771
+ id: "html-style-expression",
2772
+ description: "CSS expression() — IE-era code execution in style attributes",
2773
+ pattern: /style[\s\S]{0,20}expression\s*\(/i
2774
+ },
2775
+ {
2776
+ id: "html-object-embed",
2777
+ description: "<object or <embed tags that can load active content",
2778
+ pattern: /<(?:object|embed)[\s>/]/i
2779
+ },
2780
+ {
2781
+ id: "html-base-tag",
2782
+ description: "<base href= — can hijack all relative URLs on a page",
2783
+ pattern: /<base[\s>]/i
2784
+ },
2785
+ {
2786
+ id: "html-meta-refresh",
2787
+ description: "<meta http-equiv=\"refresh\" — can redirect users",
2788
+ pattern: /<meta[\s\S]{0,40}http-equiv[\s\S]{0,20}refresh/i
2789
+ },
2790
+ {
2791
+ id: "html-srcdoc",
2792
+ description: "srcdoc= attribute on iframes — embeds HTML that can run scripts",
2793
+ pattern: /srcdoc\s*=/i
2794
+ },
2795
+ {
2796
+ id: "html-iframe",
2797
+ description: "<iframe tag",
2798
+ pattern: /<iframe[\s>/]/i
2799
+ },
2800
+ {
2801
+ id: "html-form",
2802
+ description: "<form tag — can be used for phishing / credential harvesting injection",
2803
+ pattern: /<form[\s>/]/i
2804
+ }
2805
+ ], un = [
2806
+ {
2807
+ id: "xml-cdata-injection",
2808
+ description: "CDATA section injection: <![CDATA[ breaks out of text node context",
2809
+ pattern: /<!\[CDATA\[/i
2810
+ },
2811
+ {
2812
+ id: "xml-cdata-close",
2813
+ description: "CDATA close sequence: ]]> can terminate an enclosing CDATA section",
2814
+ pattern: /\]\]>/
2815
+ },
2816
+ {
2817
+ id: "xml-processing-instruction",
2818
+ description: "XML processing instruction: <?xml-stylesheet or <?php etc.",
2819
+ pattern: /<\?(?:xml[\- ]|php|asp)/i
2820
+ },
2821
+ {
2822
+ id: "xml-doctype-injection",
2823
+ description: "DOCTYPE declaration embedded in content — can define entities",
2824
+ pattern: /<!DOCTYPE(?:[\s[]|$)/i
2825
+ },
2826
+ {
2827
+ id: "xml-entity-system",
2828
+ description: "SYSTEM keyword — used in external entity declarations (XXE)",
2829
+ pattern: /\bSYSTEM\s+["']/i
2830
+ },
2831
+ {
2832
+ id: "xml-entity-public",
2833
+ description: "PUBLIC keyword — used in external entity declarations (XXE)",
2834
+ pattern: /\bPUBLIC\s+["']/i
2835
+ },
2836
+ {
2837
+ id: "xml-entity-declaration",
2838
+ description: "<!ENTITY declaration — defines entities, potential XXE or entity expansion",
2839
+ pattern: /<!ENTITY[\s%]/i
2840
+ },
2841
+ {
2842
+ id: "xml-billion-laughs",
2843
+ description: "Entity reference chaining / billion laughs: repeated &eX; style references",
2844
+ pattern: /(?:&\w{1,20};){3,}/
2845
+ },
2846
+ {
2847
+ id: "xml-namespace-confusion",
2848
+ description: "xmlns: attribute injection — can redefine namespaces to confuse parsers",
2849
+ pattern: /\bxmlns\s*(?::\w{1,40})?\s*=/i
2850
+ },
2851
+ {
2852
+ id: "xml-comment-injection",
2853
+ description: "<!-- comment injection — can hide content from some parsers",
2854
+ pattern: /<!--/
2855
+ },
2856
+ {
2857
+ id: "xml-comment-close",
2858
+ description: "--> closes an enclosing XML comment",
2859
+ pattern: /-->/
2860
+ },
2861
+ {
2862
+ id: "xml-pi-close",
2863
+ description: "?> closes an enclosing processing instruction",
2864
+ pattern: /\?>/
2865
+ }
2866
+ ], dn = [
2867
+ {
2868
+ id: "svg-script-element",
2869
+ description: "<script element inside SVG executes JavaScript",
2870
+ pattern: /<script[\s>/]/i
2871
+ },
2872
+ {
2873
+ id: "svg-xlink-href-javascript",
2874
+ description: "xlink:href with javascript: — classic SVG XSS via <a> or <use>",
2875
+ pattern: /xlink\s*:\s*href\s*=\s*["']?\s*javascript\s*:/i
2876
+ },
2877
+ {
2878
+ id: "svg-href-javascript",
2879
+ description: "href= with javascript: in SVG context (<a>, <animate>, etc.)",
2880
+ pattern: /href\s*=\s*["']?\s*javascript\s*:/i
2881
+ },
2882
+ {
2883
+ id: "svg-foreignobject",
2884
+ description: "<foreignObject embeds HTML inside SVG — can execute scripts",
2885
+ pattern: /<foreignObject[\s>/]/i
2886
+ },
2887
+ {
2888
+ id: "svg-use-external",
2889
+ description: "<use xlink:href or href pointing to external resource (non-fragment URL)",
2890
+ pattern: /<use[\s\S]{0,60}(?:xlink\s*:\s*)?href\s*=\s*(?:["'][^#]|[^"'#\s>])/i
2891
+ },
2892
+ {
2893
+ id: "svg-animate-href",
2894
+ description: "<animate attributeName=\"href\" — can dynamically change href to javascript:",
2895
+ pattern: /<animate[\s\S]{0,80}attributeName\s*=\s*["'][\s]*href["']/i
2896
+ },
2897
+ {
2898
+ id: "svg-animate-xlinkhref",
2899
+ description: "<animate attributeName=\"xlink:href\"",
2900
+ pattern: /<animate[\s\S]{0,80}attributeName\s*=\s*["'][\s]*xlink\s*:\s*href["']/i
2901
+ },
2902
+ {
2903
+ id: "svg-set-javascript",
2904
+ description: "<set to=\"javascript:...\" — sets an attribute to a javascript: URI",
2905
+ pattern: /<set[\s\S]{0,80}to\s*=\s*["']?\s*javascript\s*:/i
2906
+ },
2907
+ {
2908
+ id: "svg-event-handler",
2909
+ description: "SVG-specific event handler attributes: onload=, onerror=, onactivate=, etc.",
2910
+ pattern: /\bon(?:load|error|activate|begin|end|repeat|focus|blur|click|mouse\w{1,20}|key\w{1,20})\s*=/i
2911
+ },
2912
+ {
2913
+ id: "svg-handler-generic",
2914
+ description: "Generic on* handler catch-all for SVG attributes",
2915
+ pattern: /\bon\w{1,30}\s*=/i
2916
+ },
2917
+ {
2918
+ id: "svg-filter-feimage",
2919
+ description: "<feImage href= — filter primitive that can load external resources",
2920
+ pattern: /<feImage[\s\S]{0,80}(?:xlink\s*:\s*)?href\s*=/i
2921
+ },
2922
+ {
2923
+ id: "svg-image-external",
2924
+ description: "<image xlink:href with http/https or javascript protocol",
2925
+ pattern: /<image[\s\S]{0,80}(?:xlink\s*:\s*)?href\s*=\s*["']?\s*(?:https?|javascript)\s*:/i
2926
+ },
2927
+ {
2928
+ id: "svg-style-javascript",
2929
+ description: "style= attribute containing javascript: (e.g. background:url(javascript:...))",
2930
+ pattern: /style\s*=[\s\S]{0,60}javascript\s*:/i
2931
+ }
2932
+ ], fn = [
2933
+ {
2934
+ id: "sql-block-comment-open",
2935
+ description: "SQL block comment open: /* ... */ — unusual in legitimate user text",
2936
+ pattern: /\/\*/
2937
+ },
2938
+ {
2939
+ id: "sql-union-select",
2940
+ description: "UNION SELECT — most common SQL injection aggregation attack",
2941
+ pattern: /\bUNION\s{1,20}(?:ALL\s{1,20})?SELECT\b/i
2942
+ },
2943
+ {
2944
+ id: "sql-drop-table",
2945
+ description: "DROP TABLE — destructive DDL injection",
2946
+ pattern: /\bDROP\s{1,20}TABLE\b/i
2947
+ },
2948
+ {
2949
+ id: "sql-drop-database",
2950
+ description: "DROP DATABASE — destructive DDL injection",
2951
+ pattern: /\bDROP\s{1,20}DATABASE\b/i
2952
+ },
2953
+ {
2954
+ id: "sql-insert-into",
2955
+ description: "INSERT INTO — data injection",
2956
+ pattern: /\bINSERT\s{1,20}INTO\b/i
2957
+ },
2958
+ {
2959
+ id: "sql-delete-from",
2960
+ description: "DELETE FROM — data deletion injection",
2961
+ pattern: /\bDELETE\s{1,20}FROM\b/i
2962
+ },
2963
+ {
2964
+ id: "sql-update-set",
2965
+ description: "UPDATE ... SET — data modification injection",
2966
+ pattern: /\bUPDATE\b[\s\S]{1,60}\bSET\b/i
2967
+ },
2968
+ {
2969
+ id: "sql-exec-xp",
2970
+ description: "EXEC xp_ — MSSQL extended stored procedure execution",
2971
+ pattern: /\bEXEC(?:UTE)?\s{1,20}xp_/i
2972
+ },
2973
+ {
2974
+ id: "sql-tautology-string",
2975
+ description: "Classic string tautology: ' OR '1'='1 or \" OR \"1\"=\"1\"",
2976
+ pattern: /'\s{0,10}OR\s{0,10}'[^']{0,20}'\s*=\s*'[^']{0,20}/i
2977
+ },
2978
+ {
2979
+ id: "sql-tautology-numeric",
2980
+ description: "Numeric tautology: OR 1=1",
2981
+ pattern: /\bOR\s{1,10}1\s*=\s*1\b/i
2982
+ },
2983
+ {
2984
+ id: "sql-always-true-zero",
2985
+ description: "Numeric tautology: OR 0=0",
2986
+ pattern: /\bOR\s{1,10}0\s*=\s*0\b/i
2987
+ },
2988
+ {
2989
+ id: "sql-sleep-benchmark",
2990
+ description: "Time-based blind injection: SLEEP() or BENCHMARK()",
2991
+ pattern: /\b(?:SLEEP|BENCHMARK)\s*\(/i
2992
+ },
2993
+ {
2994
+ id: "sql-waitfor-delay",
2995
+ description: "MSSQL time-based blind injection: WAITFOR DELAY",
2996
+ pattern: /\bWAITFOR\s{1,20}DELAY\b/i
2997
+ },
2998
+ {
2999
+ id: "sql-char-function",
3000
+ description: "CHAR() function — used to obfuscate injected strings",
3001
+ pattern: /\bCHAR\s*\(\s*\d{1,3}/i
3002
+ },
3003
+ {
3004
+ id: "sql-information-schema",
3005
+ description: "INFORMATION_SCHEMA — reconnaissance query for table/column enumeration",
3006
+ pattern: /\bINFORMATION_SCHEMA\b/i
3007
+ }
3008
+ ], pn = [
3009
+ {
3010
+ id: "shell-path-traversal-unix",
3011
+ description: "Unix path traversal: ../ — climbing the directory tree",
3012
+ pattern: /\.\.\//
3013
+ },
3014
+ {
3015
+ id: "shell-path-traversal-windows",
3016
+ description: "Windows path traversal: ..\\ — climbing the directory tree",
3017
+ pattern: /\.\.\\/
3018
+ },
3019
+ {
3020
+ id: "shell-path-traversal-encoded",
3021
+ description: "URL-encoded path traversal: %2e%2e or %2f variants",
3022
+ pattern: /%2e%2e|%2f\.\.|\.\.%2f/i
3023
+ },
3024
+ {
3025
+ id: "shell-null-byte",
3026
+ description: "Null byte injection: \\x00 or %00 — truncates strings in C-backed functions",
3027
+ pattern: /\x00|%00/
3028
+ },
3029
+ {
3030
+ id: "shell-semicolon",
3031
+ description: "Semicolon command separator: cmd1; cmd2",
3032
+ pattern: /;/
3033
+ },
3034
+ {
3035
+ id: "shell-pipe",
3036
+ description: "Pipe operator: cmd1 | cmd2",
3037
+ pattern: /\|/
3038
+ },
3039
+ {
3040
+ id: "shell-and-operator",
3041
+ description: "AND operator: cmd1 && cmd2",
3042
+ pattern: /&&/
3043
+ },
3044
+ {
3045
+ id: "shell-or-operator",
3046
+ description: "OR operator: cmd1 || cmd2",
3047
+ pattern: /\|\|/
3048
+ },
3049
+ {
3050
+ id: "shell-backtick",
3051
+ description: "Backtick command substitution: `cmd`",
3052
+ pattern: /`/
3053
+ },
3054
+ {
3055
+ id: "shell-dollar-paren",
3056
+ description: "Dollar-paren command substitution: $(cmd)",
3057
+ pattern: /\$\(/
3058
+ },
3059
+ {
3060
+ id: "shell-dollar-brace",
3061
+ description: "Dollar-brace variable expansion: ${var} — can be abused for injection",
3062
+ pattern: /\$\{/
3063
+ },
3064
+ {
3065
+ id: "shell-redirect-out",
3066
+ description: "Output redirection: cmd > file or cmd >> file",
3067
+ pattern: />{1,2}/
3068
+ },
3069
+ {
3070
+ id: "shell-redirect-in",
3071
+ description: "Input redirection: cmd < file",
3072
+ pattern: /</
3073
+ },
3074
+ {
3075
+ id: "shell-newline-injection",
3076
+ description: "Newline injection: \\n or \\r — can inject new shell commands",
3077
+ pattern: /[\n\r]/
3078
+ },
3079
+ {
3080
+ id: "shell-glob-star",
3081
+ description: "Glob expansion: * or ? — can expand to unintended files",
3082
+ pattern: /[/\\][*?]/
3083
+ },
3084
+ {
3085
+ id: "shell-absolute-root",
3086
+ description: "Absolute root path injection: string starting with / or \\ (Windows UNC)",
3087
+ pattern: /^(?:\/|\\\\)/
3088
+ },
3089
+ {
3090
+ id: "shell-windows-drive",
3091
+ description: "Windows drive letter path injection: C:\\ or D:/",
3092
+ pattern: /^[a-zA-Z]:[/\\]/
3093
+ },
3094
+ {
3095
+ id: "shell-curl-wget",
3096
+ description: "curl/wget with URL or flags — can exfiltrate data or download payloads",
3097
+ pattern: /\b(?:curl|wget)\s+(?:https?:\/\/|ftp:\/\/|-)/i
3098
+ }
3099
+ ], mn = [
3100
+ {
3101
+ id: "redos-nested-quantifier-plus",
3102
+ description: "Nested + quantifier inside a group with outer quantifier: (a+)+, (.+b)*, etc.",
3103
+ pattern: /\([^)]*\+[^)]*\)[+*]/
3104
+ },
3105
+ {
3106
+ id: "redos-nested-quantifier-star",
3107
+ description: "Nested * quantifier: (a*)* or (a*)+ — catastrophic backtracking",
3108
+ pattern: /\([^)]*\*[^)]*\)[*+]/
3109
+ },
3110
+ {
3111
+ id: "redos-nested-groups",
3112
+ description: "Doubly nested quantified groups: ((a+)+) — guaranteed catastrophic",
3113
+ pattern: /\(\([^)]{0,40}\)[+*]\)[+*]/
3114
+ },
3115
+ {
3116
+ id: "redos-alternation-overlap",
3117
+ description: "Overlapping alternation under quantifier: (a|a)+ — ambiguous NFA paths",
3118
+ pattern: /\(([^|()]{1,20})\|(?:\1)(?:\|[^|()]{1,20}){0,5}\)[+*?]{1,2}/
3119
+ },
3120
+ {
3121
+ id: "redos-star-plus-concat",
3122
+ description: "(x*x)+ pattern — triggers super-linear backtracking",
3123
+ pattern: /\([^)]{0,10}\*[^)]{0,10}\)[+*]/
3124
+ },
3125
+ {
3126
+ id: "redos-dot-star-greedy",
3127
+ description: "(.*){n,} or (.+){n,} — repeated greedy dot quantifiers",
3128
+ pattern: /\(\.[*+]\)\{?\d/
3129
+ },
3130
+ {
3131
+ id: "redos-large-repetition",
3132
+ description: "Very large fixed or range repetition count {1000,} or {1000,n} — denial of service via backtracking",
3133
+ pattern: /\{\d{4,}(?:,\d*)?\}/
3134
+ },
3135
+ {
3136
+ id: "redos-catastrophic-alternation",
3137
+ description: "Long alternation with many similar branches — polynomial backtracking risk",
3138
+ pattern: /\([^)]{0,200}(?:\|[^|)]{0,50}){9,}\)/
3139
+ }
3140
+ ], Z = "[\"'\\s]*:", hn = [
3141
+ {
3142
+ id: "nosql-where-operator",
3143
+ description: "$where — executes arbitrary JavaScript server-side in MongoDB",
3144
+ pattern: RegExp(`\\$where${Z}`, "i")
3145
+ },
3146
+ {
3147
+ id: "nosql-ne-operator",
3148
+ description: "$ne — \"not equal\" operator used to bypass equality checks",
3149
+ pattern: RegExp(`\\$ne${Z}`, "i")
3150
+ },
3151
+ {
3152
+ id: "nosql-gt-operator",
3153
+ description: "$gt — \"greater than\" used to bypass password/value checks",
3154
+ pattern: RegExp(`\\$gte?${Z}`, "i")
3155
+ },
3156
+ {
3157
+ id: "nosql-lt-operator",
3158
+ description: "$lt / $lte — \"less than\" bypass variants",
3159
+ pattern: RegExp(`\\$lte?${Z}`, "i")
3160
+ },
3161
+ {
3162
+ id: "nosql-regex-operator",
3163
+ description: "$regex — can be used to extract data character by character (blind injection)",
3164
+ pattern: RegExp(`\\$regex${Z}`, "i")
3165
+ },
3166
+ {
3167
+ id: "nosql-or-operator",
3168
+ description: "$or — logical OR; used to create always-true conditions",
3169
+ pattern: RegExp(`\\$or${Z}\\s*\\[`, "i")
3170
+ },
3171
+ {
3172
+ id: "nosql-and-operator",
3173
+ description: "$and — logical AND operator injection",
3174
+ pattern: RegExp(`\\$and${Z}\\s*\\[`, "i")
3175
+ },
3176
+ {
3177
+ id: "nosql-nor-operator",
3178
+ description: "$nor — logical NOR operator injection",
3179
+ pattern: RegExp(`\\$nor${Z}\\s*\\[`, "i")
3180
+ },
3181
+ {
3182
+ id: "nosql-exists-operator",
3183
+ description: "$exists — can enumerate fields to determine schema",
3184
+ pattern: RegExp(`\\$exists${Z}`, "i")
3185
+ },
3186
+ {
3187
+ id: "nosql-in-operator",
3188
+ description: "$in — matches any value in a list; can enumerate values",
3189
+ pattern: RegExp(`\\$in${Z}\\s*\\[`, "i")
3190
+ },
3191
+ {
3192
+ id: "nosql-expr-operator",
3193
+ description: "$expr — allows aggregation expressions in queries (MongoDB 3.6+)",
3194
+ pattern: RegExp(`\\$expr${Z}`, "i")
3195
+ },
3196
+ {
3197
+ id: "nosql-function-operator",
3198
+ description: "$function — executes arbitrary JavaScript in MongoDB 4.4+",
3199
+ pattern: RegExp(`\\$function${Z}`, "i")
3200
+ },
3201
+ {
3202
+ id: "nosql-accumulator-operator",
3203
+ description: "$accumulator — custom aggregation with arbitrary JS execution",
3204
+ pattern: RegExp(`\\$accumulator${Z}`, "i")
3205
+ },
3206
+ {
3207
+ id: "nosql-proto-pollution",
3208
+ description: "__proto__ — prototype pollution via object key injection",
3209
+ pattern: /__proto__/
3210
+ },
3211
+ {
3212
+ id: "nosql-constructor-prototype",
3213
+ description: "constructor.prototype — alternative prototype pollution vector (dot notation or JSON key)",
3214
+ pattern: /constructor[\s"':.,{\[]*prototype/i
3215
+ },
3216
+ {
3217
+ id: "nosql-proto-bracket",
3218
+ description: "[\"__proto__\"] — bracket-notation prototype pollution",
3219
+ pattern: /\[["']__proto__["']\]/
3220
+ }
3221
+ ], gn = [
3222
+ {
3223
+ id: "log-crlf-injection",
3224
+ description: "CRLF injection: literal \\r or \\n embeds fake log lines",
3225
+ pattern: /[\r\n]/
3226
+ },
3227
+ {
3228
+ id: "log-url-encoded-crlf",
3229
+ description: "URL-encoded CRLF: %0d, %0a, %0D, %0A — decoded by some log parsers",
3230
+ pattern: /%0[dDaA]/
3231
+ },
3232
+ {
3233
+ id: "log-unicode-newline",
3234
+ description: "Unicode newline variants: U+2028 (line separator), U+2029 (paragraph separator)",
3235
+ pattern: /[\u2028\u2029]/
3236
+ },
3237
+ {
3238
+ id: "log-log4shell-jndi",
3239
+ description: "Log4Shell: ${jndi:...} triggers remote code execution in Apache Log4j",
3240
+ pattern: /\$\{jndi\s*:/i
3241
+ },
3242
+ {
3243
+ id: "log-log4shell-obfuscated",
3244
+ description: "Obfuscated Log4Shell: ${::-j}... lookup-bypass prefix used to evade WAF detection",
3245
+ pattern: /\$\{::-/
3246
+ },
3247
+ {
3248
+ id: "log-log4j-lookup",
3249
+ description: "Log4j lookup syntax: ${env:...}, ${sys:...}, ${ctx:...} — data exfiltration",
3250
+ pattern: /\$\{(?:env|sys|ctx|main|map|sd|web|docker|k8s|spring)\s*:/i
3251
+ },
3252
+ {
3253
+ id: "log-ssti-double-brace",
3254
+ description: "SSTI double-brace: {{expression}} — Jinja2, Twig, Handlebars, etc.",
3255
+ pattern: /\{\{[\s\S]{0,80}\}\}/
3256
+ },
3257
+ {
3258
+ id: "log-ssti-hash-brace",
3259
+ description: "SSTI hash-brace: #{expression} — Thymeleaf, Velocity, Ruby ERB",
3260
+ pattern: /#\{[\s\S]{0,80}\}/
3261
+ },
3262
+ {
3263
+ id: "log-ssti-dollar-brace",
3264
+ description: "SSTI/EL injection: ${expression with operators or method calls} — JSP EL, Freemarker, SpEL",
3265
+ pattern: /\$\{[^}]*(?:\.|\(|\*|\+|\bclass\b|\bruntime\b|\bprocess\b|\bexec\b)[^}]{0,80}\}/i
3266
+ },
3267
+ {
3268
+ id: "log-ssti-percent-tag",
3269
+ description: "SSTI ERB/ASP tag: <%= expression %> — Ruby ERB, ASP",
3270
+ pattern: /<%=[\s\S]{0,80}%>/
3271
+ },
3272
+ {
3273
+ id: "log-null-byte",
3274
+ description: "Null byte: \\x00 or %00 — can truncate log entries in C-backed loggers",
3275
+ pattern: /\x00|%00/
3276
+ },
3277
+ {
3278
+ id: "log-ansi-escape",
3279
+ description: "ANSI escape sequence: ESC[ — can manipulate terminal output when logs are tailed",
3280
+ pattern: /\x1b\[/
3281
+ }
3282
+ ], _n = [
3283
+ {
3284
+ id: "sql-line-comment",
3285
+ description: "SQL line comment: -- followed by whitespace or end of string",
3286
+ pattern: /--(?:\s|$)/
3287
+ },
3288
+ {
3289
+ id: "sql-stacked-query",
3290
+ description: "Stacked queries: semicolon immediately followed by a SQL keyword",
3291
+ pattern: /;\s{0,10}(?:SELECT|INSERT|UPDATE|DELETE|DROP|CREATE|ALTER|EXEC)\b/i
3292
+ },
3293
+ {
3294
+ id: "sql-hex-encoding",
3295
+ description: "Hex-encoded string injection: 0x41414141 style (MySQL)",
3296
+ pattern: /\b0x[0-9a-f]{4,}/i
3297
+ }
3298
+ ], vn = [...fn, ..._n];
3299
+ ln.label = "HTML", un.label = "XML", dn.label = "SVG", fn.label = "SQL", vn.label = "SQL-STRICT", pn.label = "SHELL", mn.label = "REDOS", hn.label = "NOSQL", gn.label = "LOG", Object.freeze({
3300
+ HTML: ln,
3301
+ XML: un,
3302
+ SVG: dn,
3303
+ SQL: fn,
3304
+ "SQL-STRICT": vn,
3305
+ SHELL: pn,
3306
+ REDOS: mn,
3307
+ NOSQL: hn,
3308
+ LOG: gn
3309
+ });
3310
+ function yn(e) {
3311
+ if (typeof e != "string") throw TypeError(`is-unsafe: first argument must be a string, got ${typeof e}`);
3312
+ }
3313
+ function bn(e) {
3314
+ if (!(e instanceof RegExp)) {
3315
+ if (Array.isArray(e)) {
3316
+ if (e.length === 0) throw TypeError("is-unsafe: context must not be an empty array");
3317
+ if (Array.isArray(e[0])) {
3318
+ for (let t of e) if (!Array.isArray(t) || t.length === 0) throw TypeError("is-unsafe: each context in the array must be a non-empty pattern array (PatternList)");
3319
+ }
3320
+ return;
3321
+ }
3322
+ throw TypeError(`is-unsafe: second argument must be a PatternList (e.g. HTML), an array of PatternLists (e.g. [HTML, XML]), or a RegExp. Got: ${typeof e}`);
3323
+ }
3324
+ }
3325
+ function xn(e) {
3326
+ return e instanceof RegExp ? {
3327
+ lists: null,
3328
+ regex: e
3329
+ } : Array.isArray(e[0]) ? {
3330
+ lists: e,
3331
+ regex: null
3332
+ } : {
3333
+ lists: [e],
3334
+ regex: null
3335
+ };
3336
+ }
3337
+ function Sn(e, t) {
3338
+ let n = t.label ?? "CUSTOM";
3339
+ for (let r of t) if (r.pattern.test(e)) return {
3340
+ context: n,
3341
+ id: r.id,
3342
+ description: r.description,
3343
+ pattern: r.pattern
3344
+ };
3345
+ return null;
3346
+ }
3347
+ function Cn(e, t) {
3348
+ yn(e), bn(t);
3349
+ let { lists: n, regex: r } = xn(t);
3350
+ if (r) return r.test(e);
3351
+ for (let t of n) if (Sn(e, t) !== null) return !0;
3352
+ return !1;
3353
+ }
2505
3354
  //#endregion
2506
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
2507
- function Yt(e, t) {
3355
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js
3356
+ function wn(e, t) {
2508
3357
  if (!e) return {};
2509
3358
  let n = t.attributesGroupName ? e[t.attributesGroupName] : e;
2510
3359
  if (!n) return {};
@@ -2515,7 +3364,7 @@ function Yt(e, t) {
2515
3364
  } else r[e] = n[e];
2516
3365
  return r;
2517
3366
  }
2518
- function Xt(e) {
3367
+ function Tn(e) {
2519
3368
  if (!e || typeof e != "string") return;
2520
3369
  let t = e.indexOf(":");
2521
3370
  if (t !== -1 && t > 0) {
@@ -2523,14 +3372,14 @@ function Xt(e) {
2523
3372
  if (n !== "xmlns") return n;
2524
3373
  }
2525
3374
  }
2526
- var Zt = class {
3375
+ var En = class {
2527
3376
  constructor(e, t) {
2528
- this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = nn, this.parseTextData = Qt, this.resolveNameSpace = $t, this.buildAttributesMap = tn, this.isItStopNode = sn, this.replaceEntitiesValue = an, this.readStopNodeData = un, this.saveTextToParentTag = on, this.addChild = rn, this.ignoreAttributesFn = Gt(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
2529
- let n = { ...ft };
3377
+ this.options = e, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = jn, this.parseTextData = Dn, this.resolveNameSpace = On, this.buildAttributesMap = An, this.isItStopNode = Fn, this.replaceEntitiesValue = Nn, this.readStopNodeData = zn, this.saveTextToParentTag = Pn, this.addChild = Mn, this.ignoreAttributesFn = rn(this.options.ignoreAttributes), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
3378
+ let n = { ...dt };
2530
3379
  this.options.entityDecoder ? this.entityDecoder = this.options.entityDecoder : (typeof this.options.htmlEntities == "object" ? n = this.options.htmlEntities : this.options.htmlEntities === !0 && (n = {
2531
- ...pt,
2532
- ...lt
2533
- }), this.entityDecoder = new yt({
3380
+ ...ft,
3381
+ ...ct
3382
+ }), this.entityDecoder = new vt({
2534
3383
  namedEntities: {
2535
3384
  ...n,
2536
3385
  ...t
@@ -2540,27 +3389,28 @@ var Zt = class {
2540
3389
  maxTotalExpansions: this.options.processEntities.maxTotalExpansions,
2541
3390
  maxExpandedLength: this.options.processEntities.maxExpandedLength,
2542
3391
  applyLimitsTo: this.options.processEntities.appliesTo
2543
- }
2544
- })), this.matcher = new Jt(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new Kt();
3392
+ },
3393
+ onInputEntity: (e, t) => Cn(t, [ln, un]) ? z.BLOCK : z.ALLOW
3394
+ })), this.matcher = new cn(), this.readonlyMatcher = this.matcher.readOnly(), this.isCurrentNodeStopNode = !1, this.stopNodeExpressionsSet = new on();
2545
3395
  let r = this.options.stopNodes;
2546
3396
  if (r && r.length > 0) {
2547
3397
  for (let e = 0; e < r.length; e++) {
2548
3398
  let t = r[e];
2549
- typeof t == "string" ? this.stopNodeExpressionsSet.add(new Z(t)) : t instanceof Z && this.stopNodeExpressionsSet.add(t);
3399
+ typeof t == "string" ? this.stopNodeExpressionsSet.add(new an(t)) : t instanceof an && this.stopNodeExpressionsSet.add(t);
2550
3400
  }
2551
3401
  this.stopNodeExpressionsSet.seal();
2552
3402
  }
2553
3403
  }
2554
3404
  };
2555
- function Qt(e, t, n, r, i, a, o) {
3405
+ function Dn(e, t, n, r, i, a, o) {
2556
3406
  let s = this.options;
2557
3407
  if (e !== void 0 && (s.trimValues && !r && (e = e.trim()), e.length > 0)) {
2558
3408
  o || (e = this.replaceEntitiesValue(e, t, n));
2559
3409
  let r = s.jPath ? n.toString() : n, c = s.tagValueProcessor(t, e, r, i, a);
2560
- return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? dn(e, s.parseTagValue, s.numberParseOptions) : e;
3410
+ return c == null ? e : typeof c != typeof e || c !== e ? c : s.trimValues || e.trim() === e ? Bn(e, s.parseTagValue, s.numberParseOptions) : e;
2561
3411
  }
2562
3412
  }
2563
- function $t(e) {
3413
+ function On(e) {
2564
3414
  if (this.options.removeNSPrefix) {
2565
3415
  let t = e.split(":"), n = e.charAt(0) === "/" ? "/" : "";
2566
3416
  if (t[0] === "xmlns") return "";
@@ -2568,11 +3418,11 @@ function $t(e) {
2568
3418
  }
2569
3419
  return e;
2570
3420
  }
2571
- var en = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
2572
- function tn(e, t, n, r = !1) {
3421
+ var kn = /* @__PURE__ */ RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?", "gm");
3422
+ function An(e, t, n, r = !1) {
2573
3423
  let i = this.options;
2574
3424
  if (r === !0 || i.ignoreAttributes !== !0 && typeof e == "string") {
2575
- let r = Fe(e, en), a = r.length, o = {}, s = Array(a), c = !1, l = {};
3425
+ let r = Ne(e, kn), a = r.length, o = {}, s = Array(a), c = !1, l = {};
2576
3426
  for (let e = 0; e < a; e++) {
2577
3427
  let t = this.resolveNameSpace(r[e][1]), a = r[e][4];
2578
3428
  if (t.length && a !== void 0) {
@@ -2586,9 +3436,9 @@ function tn(e, t, n, r = !1) {
2586
3436
  let t = this.resolveNameSpace(r[e][1]);
2587
3437
  if (this.ignoreAttributesFn(t, u)) continue;
2588
3438
  let n = i.attributeNamePrefix + t;
2589
- if (t.length) if (i.transformAttributeName && (n = i.transformAttributeName(n)), n = pn(n, i), r[e][4] !== void 0) {
3439
+ if (t.length) if (i.transformAttributeName && (n = i.transformAttributeName(n)), n = Hn(n, i), r[e][4] !== void 0) {
2590
3440
  let r = s[e], a = i.attributeValueProcessor(t, r, u);
2591
- a == null ? o[n] = r : typeof a != typeof r || a !== r ? o[n] = a : o[n] = dn(r, i.parseAttributeValue, i.numberParseOptions), d = !0;
3441
+ a == null ? o[n] = r : typeof a != typeof r || a !== r ? o[n] = a : o[n] = Bn(r, i.parseAttributeValue, i.numberParseOptions), d = !0;
2592
3442
  } else i.allowBooleanAttributes && (o[n] = !0, d = !0);
2593
3443
  }
2594
3444
  if (!d) return;
@@ -2599,11 +3449,11 @@ function tn(e, t, n, r = !1) {
2599
3449
  return o;
2600
3450
  }
2601
3451
  }
2602
- var nn = function(e) {
3452
+ var jn = function(e) {
2603
3453
  e = e.replace(/\r\n?/g, "\n");
2604
3454
  let t = new G("!xml"), n = t, r = "";
2605
3455
  this.matcher.reset(), this.entityDecoder.reset(), this.entityExpansionCount = 0, this.currentExpandedLength = 0;
2606
- let i = this.options, a = new Pt(i.processEntities), o = e.length;
3456
+ let i = this.options, a = new It(i.processEntities), o = e.length;
2607
3457
  for (let s = 0; s < o; s++) if (e[s] === "<") {
2608
3458
  let c = e.charCodeAt(s + 1);
2609
3459
  if (c === 47) {
@@ -2612,12 +3462,12 @@ var nn = function(e) {
2612
3462
  let e = a.indexOf(":");
2613
3463
  e !== -1 && (a = a.substr(e + 1));
2614
3464
  }
2615
- a = fn(i.transformTagName, a, "", i).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
3465
+ a = Vn(i.transformTagName, a, "", i).tagName, n && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher));
2616
3466
  let o = this.matcher.getCurrentTag();
2617
3467
  if (a && i.unpairedTagsSet.has(a)) throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);
2618
3468
  o && i.unpairedTagsSet.has(o) && (this.matcher.pop(), this.tagsNodeStack.pop()), this.matcher.pop(), this.isCurrentNodeStopNode = !1, n = this.tagsNodeStack.pop(), r = "", s = t;
2619
3469
  } else if (c === 63) {
2620
- let t = $(e, s, !1, "?>");
3470
+ let t = Rn(e, s, !1, "?>");
2621
3471
  if (!t) throw Error("Pi Tag is not closed.");
2622
3472
  r = this.saveTextToParentTag(r, n, this.readonlyMatcher);
2623
3473
  let o = this.buildAttributesMap(t.tagExp, this.matcher, t.tagName, !0);
@@ -2646,20 +3496,20 @@ var nn = function(e) {
2646
3496
  let o = this.parseTextData(a, n.tagname, this.readonlyMatcher, !0, !1, !0, !0);
2647
3497
  o ??= "", i.cdataPropName ? n.add(i.cdataPropName, [{ [i.textNodeName]: a }]) : n.add(i.textNodeName, o), s = t + 2;
2648
3498
  } else {
2649
- let a = $(e, s, i.removeNSPrefix);
3499
+ let a = Rn(e, s, i.removeNSPrefix);
2650
3500
  if (!a) {
2651
3501
  let t = e.substring(Math.max(0, s - 50), Math.min(o, s + 50));
2652
3502
  throw Error(`readTagExp returned undefined at position ${s}. Context: "${t}"`);
2653
3503
  }
2654
3504
  let c = a.tagName, l = a.rawTagName, u = a.tagExp, d = a.attrExpPresent, f = a.closeIndex;
2655
- if ({tagName: c, tagExp: u} = fn(i.transformTagName, c, u, i), i.strictReservedNames && (c === i.commentPropName || c === i.cdataPropName || c === i.textNodeName || c === i.attributesGroupName)) throw Error(`Invalid tag name: ${c}`);
3505
+ if ({tagName: c, tagExp: u} = Vn(i.transformTagName, c, u, i), i.strictReservedNames && (c === i.commentPropName || c === i.cdataPropName || c === i.textNodeName || c === i.attributesGroupName)) throw Error(`Invalid tag name: ${c}`);
2656
3506
  n && r && n.tagname !== "!xml" && (r = this.saveTextToParentTag(r, n, this.readonlyMatcher, !1));
2657
3507
  let p = n;
2658
3508
  p && i.unpairedTagsSet.has(p.tagname) && (n = this.tagsNodeStack.pop(), this.matcher.pop());
2659
3509
  let m = !1;
2660
3510
  u.length > 0 && u.lastIndexOf("/") === u.length - 1 && (m = !0, c[c.length - 1] === "/" ? (c = c.substr(0, c.length - 1), u = c) : u = u.substr(0, u.length - 1), d = c !== u);
2661
3511
  let h = null, g;
2662
- g = Xt(l), c !== t.tagname && this.matcher.push(c, {}, g), c !== u && d && (h = this.buildAttributesMap(u, this.matcher, c), h && Yt(h, i)), c !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
3512
+ g = Tn(l), c !== t.tagname && this.matcher.push(c, {}, g), c !== u && d && (h = this.buildAttributesMap(u, this.matcher, c), h && wn(h, i)), c !== t.tagname && (this.isCurrentNodeStopNode = this.isItStopNode());
2663
3513
  let _ = s;
2664
3514
  if (this.isCurrentNodeStopNode) {
2665
3515
  let t = "";
@@ -2674,7 +3524,7 @@ var nn = function(e) {
2674
3524
  h && (r[":@"] = h), r.add(i.textNodeName, t), this.matcher.pop(), this.isCurrentNodeStopNode = !1, this.addChild(n, r, this.readonlyMatcher, _);
2675
3525
  } else {
2676
3526
  if (m) {
2677
- ({tagName: c, tagExp: u} = fn(i.transformTagName, c, u, i));
3527
+ ({tagName: c, tagExp: u} = Vn(i.transformTagName, c, u, i));
2678
3528
  let e = new G(c);
2679
3529
  h && (e[":@"] = h), this.addChild(n, e, this.readonlyMatcher, _), this.matcher.pop(), this.isCurrentNodeStopNode = !1;
2680
3530
  } else if (i.unpairedTagsSet.has(c)) {
@@ -2692,12 +3542,12 @@ var nn = function(e) {
2692
3542
  } else r += e[s];
2693
3543
  return t.child;
2694
3544
  };
2695
- function rn(e, t, n, r) {
3545
+ function Mn(e, t, n, r) {
2696
3546
  this.options.captureMetaData || (r = void 0);
2697
3547
  let i = this.options.jPath ? n.toString() : n, a = this.options.updateTag(t.tagname, i, t[":@"]);
2698
3548
  a === !1 || (typeof a == "string" && (t.tagname = a), e.addChild(t, r));
2699
3549
  }
2700
- function an(e, t, n) {
3550
+ function Nn(e, t, n) {
2701
3551
  let r = this.options.processEntities;
2702
3552
  if (!r || !r.enabled) return e;
2703
3553
  if (r.allowedTags) {
@@ -2710,13 +3560,13 @@ function an(e, t, n) {
2710
3560
  }
2711
3561
  return this.entityDecoder.decode(e);
2712
3562
  }
2713
- function on(e, t, n, r) {
3563
+ function Pn(e, t, n, r) {
2714
3564
  return e &&= (r === void 0 && (r = t.child.length === 0), e = this.parseTextData(e, t.tagname, n, !1, t[":@"] ? Object.keys(t[":@"]).length !== 0 : !1, r), e !== void 0 && e !== "" && t.add(this.options.textNodeName, e), ""), e;
2715
3565
  }
2716
- function sn() {
2717
- return this.stopNodeExpressionsSet.size === 0 ? !1 : this.matcher.matchesAny(this.stopNodeExpressionsSet);
3566
+ function Fn() {
3567
+ return this.stopNodeExpressionsSet.size !== 0 && this.matcher.matchesAny(this.stopNodeExpressionsSet);
2718
3568
  }
2719
- function cn(e, t, n = ">") {
3569
+ function In(e, t, n = ">") {
2720
3570
  let r = 0, i = e.length, a = n.charCodeAt(0), o = n.length > 1 ? n.charCodeAt(1) : -1, s = "", c = t;
2721
3571
  for (let n = t; n < i; n++) {
2722
3572
  let t = e.charCodeAt(n);
@@ -2739,13 +3589,13 @@ function Q(e, t, n, r) {
2739
3589
  if (i === -1) throw Error(r);
2740
3590
  return i + t.length - 1;
2741
3591
  }
2742
- function ln(e, t, n, r) {
3592
+ function Ln(e, t, n, r) {
2743
3593
  let i = e.indexOf(t, n);
2744
3594
  if (i === -1) throw Error(r);
2745
3595
  return i;
2746
3596
  }
2747
- function $(e, t, n, r = ">") {
2748
- let i = cn(e, t + 1, r);
3597
+ function Rn(e, t, n, r = ">") {
3598
+ let i = In(e, t + 1, r);
2749
3599
  if (!i) return;
2750
3600
  let a = i.data, o = i.index, s = a.search(/\s/), c = a, l = !0;
2751
3601
  s !== -1 && (c = a.substring(0, s), a = a.substring(s + 1).trimStart());
@@ -2762,12 +3612,12 @@ function $(e, t, n, r = ">") {
2762
3612
  rawTagName: u
2763
3613
  };
2764
3614
  }
2765
- function un(e, t, n) {
3615
+ function zn(e, t, n) {
2766
3616
  let r = n, i = 1, a = e.length;
2767
3617
  for (; n < a; n++) if (e[n] === "<") {
2768
3618
  let a = e.charCodeAt(n + 1);
2769
3619
  if (a === 47) {
2770
- let a = ln(e, ">", n, `${t} is not closed`);
3620
+ let a = Ln(e, ">", n, `${t} is not closed`);
2771
3621
  if (e.substring(n + 2, a).trim() === t && (i--, i === 0)) return {
2772
3622
  tagContent: e.substring(r, n),
2773
3623
  i: a
@@ -2777,36 +3627,36 @@ function un(e, t, n) {
2777
3627
  else if (a === 33 && e.charCodeAt(n + 2) === 45 && e.charCodeAt(n + 3) === 45) n = Q(e, "-->", n + 3, "StopNode is not closed.");
2778
3628
  else if (a === 33 && e.charCodeAt(n + 2) === 91) n = Q(e, "]]>", n, "StopNode is not closed.") - 2;
2779
3629
  else {
2780
- let r = $(e, n, !1);
3630
+ let r = Rn(e, n, !1);
2781
3631
  r && ((r && r.tagName) === t && r.tagExp[r.tagExp.length - 1] !== "/" && i++, n = r.closeIndex);
2782
3632
  }
2783
3633
  }
2784
3634
  }
2785
- function dn(e, t, n) {
3635
+ function Bn(e, t, n) {
2786
3636
  if (t && typeof e == "string") {
2787
3637
  let t = e.trim();
2788
- return t === "true" ? !0 : t === "false" ? !1 : Bt(e, n);
2789
- } else if (Le(e)) return e;
3638
+ return t === "true" || t !== "false" && Zt(e, n);
3639
+ } else if (Fe(e)) return e;
2790
3640
  else return "";
2791
3641
  }
2792
- function fn(e, t, n, r) {
3642
+ function Vn(e, t, n, r) {
2793
3643
  if (e) {
2794
3644
  let r = e(t);
2795
3645
  n === t && (n = r), t = r;
2796
3646
  }
2797
- return t = pn(t, r), {
3647
+ return t = Hn(t, r), {
2798
3648
  tagName: t,
2799
3649
  tagExp: n
2800
3650
  };
2801
3651
  }
2802
- function pn(e, t) {
2803
- if (Re.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
2804
- return I.includes(e) ? t.onDangerousProperty(e) : e;
3652
+ function Hn(e, t) {
3653
+ if (Le.includes(e)) throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);
3654
+ return Ie.includes(e) ? t.onDangerousProperty(e) : e;
2805
3655
  }
2806
3656
  //#endregion
2807
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlparser/node2json.js
2808
- var mn = G.getMetaDataSymbol();
2809
- function hn(e, t) {
3657
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/xmlparser/node2json.js
3658
+ var $ = G.getMetaDataSymbol();
3659
+ function Un(e, t) {
2810
3660
  if (!e || typeof e != "object") return {};
2811
3661
  if (!t) return e;
2812
3662
  let n = {};
@@ -2816,22 +3666,22 @@ function hn(e, t) {
2816
3666
  } else n[r] = e[r];
2817
3667
  return n;
2818
3668
  }
2819
- function gn(e, t, n, r) {
2820
- return _n(e, t, n, r);
3669
+ function Wn(e, t, n, r) {
3670
+ return Gn(e, t, n, r);
2821
3671
  }
2822
- function _n(e, t, n, r) {
3672
+ function Gn(e, t, n, r) {
2823
3673
  let i, a = {};
2824
3674
  for (let o = 0; o < e.length; o++) {
2825
- let s = e[o], c = vn(s);
3675
+ let s = e[o], c = Kn(s);
2826
3676
  if (c !== void 0 && c !== t.textNodeName) {
2827
- let e = hn(s[":@"] || {}, t.attributeNamePrefix);
3677
+ let e = Un(s[":@"] || {}, t.attributeNamePrefix);
2828
3678
  n.push(c, e);
2829
3679
  }
2830
3680
  if (c === t.textNodeName) i === void 0 ? i = s[c] : i += "" + s[c];
2831
3681
  else if (c === void 0) continue;
2832
3682
  else if (s[c]) {
2833
- let e = _n(s[c], t, n, r), i = bn(e, t);
2834
- if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ? yn(e, s[":@"], r, t) : Object.keys(e).length === 1 && e[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? e = e[t.textNodeName] : Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = ""), s[mn] !== void 0 && typeof e == "object" && e && (e[mn] = s[mn]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
3683
+ let e = Gn(s[c], t, n, r), i = Jn(e, t);
3684
+ if (Object.keys(e).length === 0 && t.alwaysCreateTextNode && (e[t.textNodeName] = ""), s[":@"] ? qn(e, s[":@"], r, t) : Object.keys(e).length === 1 && e[t.textNodeName] !== void 0 && !t.alwaysCreateTextNode ? e = e[t.textNodeName] : Object.keys(e).length === 0 && (t.alwaysCreateTextNode ? e[t.textNodeName] = "" : e = ""), s[$] !== void 0 && typeof e == "object" && e && (e[$] = s[$]), a[c] !== void 0 && Object.prototype.hasOwnProperty.call(a, c)) Array.isArray(a[c]) || (a[c] = [a[c]]), a[c].push(e);
2835
3685
  else {
2836
3686
  let n = t.jPath ? r.toString() : r;
2837
3687
  t.isArray(c, n, i) ? a[c] = [e] : a[c] = e;
@@ -2841,14 +3691,14 @@ function _n(e, t, n, r) {
2841
3691
  }
2842
3692
  return typeof i == "string" ? i.length > 0 && (a[t.textNodeName] = i) : i !== void 0 && (a[t.textNodeName] = i), a;
2843
3693
  }
2844
- function vn(e) {
3694
+ function Kn(e) {
2845
3695
  let t = Object.keys(e);
2846
3696
  for (let e = 0; e < t.length; e++) {
2847
3697
  let n = t[e];
2848
3698
  if (n !== ":@") return n;
2849
3699
  }
2850
3700
  }
2851
- function yn(e, t, n, r) {
3701
+ function qn(e, t, n, r) {
2852
3702
  if (t) {
2853
3703
  let i = Object.keys(t), a = i.length;
2854
3704
  for (let o = 0; o < a; o++) {
@@ -2857,26 +3707,26 @@ function yn(e, t, n, r) {
2857
3707
  }
2858
3708
  }
2859
3709
  }
2860
- function bn(e, t) {
3710
+ function Jn(e, t) {
2861
3711
  let { textNodeName: n } = t, r = Object.keys(e).length;
2862
3712
  return !!(r === 0 || r === 1 && (e[n] || typeof e[n] == "boolean" || e[n] === 0));
2863
3713
  }
2864
3714
  //#endregion
2865
- //#region ../../node_modules/.pnpm/fast-xml-parser@5.8.0/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
2866
- var xn = class {
3715
+ //#region ../../node_modules/.pnpm/fast-xml-parser@5.10.0/node_modules/fast-xml-parser/src/xmlparser/XMLParser.js
3716
+ var Yn = class {
2867
3717
  constructor(e) {
2868
- this.externalEntities = {}, this.options = wt(e);
3718
+ this.externalEntities = {}, this.options = Ct(e);
2869
3719
  }
2870
3720
  parse(e, t) {
2871
3721
  if (typeof e != "string" && e.toString) e = e.toString();
2872
3722
  else if (typeof e != "string") throw Error("XML data is accepted in String or Bytes[] form.");
2873
3723
  if (t) {
2874
3724
  t === !0 && (t = {});
2875
- let n = Be(e, t);
3725
+ let n = ze(e, t);
2876
3726
  if (n !== !0) throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`);
2877
3727
  }
2878
- let n = new Zt(this.options, this.externalEntities), r = n.parseXml(e);
2879
- return this.options.preserveOrder || r === void 0 ? r : gn(r, this.options, n.matcher, n.readonlyMatcher);
3728
+ let n = new En(this.options, this.externalEntities), r = n.parseXml(e);
3729
+ return this.options.preserveOrder || r === void 0 ? r : Wn(r, this.options, n.matcher, n.readonlyMatcher);
2880
3730
  }
2881
3731
  addEntity(e, t) {
2882
3732
  if (t.indexOf("&") !== -1) throw Error("Entity value can't have '&'");
@@ -2887,7 +3737,7 @@ var xn = class {
2887
3737
  static getMetaDataSymbol() {
2888
3738
  return G.getMetaDataSymbol();
2889
3739
  }
2890
- }, Sn = class {
3740
+ }, Xn = class {
2891
3741
  axiosClient;
2892
3742
  baseURI;
2893
3743
  xmlParser;
@@ -2897,7 +3747,7 @@ var xn = class {
2897
3747
  HASH_LENGTH = 32;
2898
3748
  ITERATION_COUNT = 1e4;
2899
3749
  constructor({ axiosClient: e, baseURI: t }) {
2900
- this.axiosClient = e, this.baseURI = t, this.xmlParser = new xn();
3750
+ this.axiosClient = e, this.baseURI = t, this.xmlParser = new Yn();
2901
3751
  }
2902
3752
  async signUrl(e, t) {
2903
3753
  let n = new URL(e);
@@ -2907,20 +3757,20 @@ var xn = class {
2907
3757
  }
2908
3758
  async getSignKey() {
2909
3759
  if (this.signingKey) return this.signingKey;
2910
- let e = await this.axiosClient.get(a(this.baseURI, "ocs/v1.php/cloud/user/signing-key"), { headers: { "Content-Type": "application/x-www-form-urlencoded" } }), t = this.xmlParser.parse(e.data);
2911
- return this.signingKey = t.ocs.data["signing-key"], this.signingKey;
3760
+ let e = await this.axiosClient.get(t(this.baseURI, "ocs/v1.php/cloud/user/signing-key"), { headers: { "Content-Type": "application/x-www-form-urlencoded" } }), n = this.xmlParser.parse(e.data);
3761
+ return this.signingKey = n.ocs.data["signing-key"], this.signingKey;
2912
3762
  }
2913
3763
  async createHashedKey(e) {
2914
3764
  return je(e, await this.getSignKey(), this.ITERATION_COUNT, this.HASH_LENGTH, this.ALGORITHM).toString("hex");
2915
3765
  }
2916
- }, Cn = (e, t) => {
3766
+ }, Zn = (e, t) => {
2917
3767
  let n = new URL(e);
2918
3768
  n.pathname = [
2919
3769
  ...n.pathname.split("/"),
2920
3770
  "ocs",
2921
3771
  "v1.php"
2922
3772
  ].filter(Boolean).join("/");
2923
- let r = n.href, i = v(r, t), a = new Sn({
3773
+ let r = n.href, i = v(r, t), a = new Xn({
2924
3774
  baseURI: e,
2925
3775
  axiosClient: t
2926
3776
  });
@@ -2930,4 +3780,4 @@ var xn = class {
2930
3780
  };
2931
3781
  };
2932
3782
  //#endregion
2933
- export { K as a, Z as i, xn as n, v as o, Jt as r, Cn as t };
3783
+ export { Ft as a, an as i, Yn as n, v as o, cn as r, Zn as t };