@php-wasm/xdebug-bridge 3.1.4 → 3.1.8

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.
@@ -7,14 +7,14 @@ import { WebSocketServer as us } from "ws";
7
7
  import ls from "net";
8
8
  import { createHash as fs } from "crypto";
9
9
  import hs from "timers";
10
- const vr = function() {
10
+ const xr = function() {
11
11
  return typeof process < "u" && process.release?.name === "node" ? "NODE" : typeof window < "u" ? "WEB" : (
12
12
  // @ts-ignore
13
13
  typeof WorkerGlobalScope < "u" && // @ts-ignore
14
14
  self instanceof WorkerGlobalScope ? "WORKER" : "NODE"
15
15
  );
16
16
  }();
17
- if (vr === "NODE") {
17
+ if (xr === "NODE") {
18
18
  let o = function(e) {
19
19
  return new Promise(function(n, s) {
20
20
  e.onload = e.onerror = function(i) {
@@ -65,7 +65,7 @@ if (vr === "NODE") {
65
65
  });
66
66
  });
67
67
  }
68
- if (vr === "NODE" && typeof CustomEvent > "u") {
68
+ if (xr === "NODE" && typeof CustomEvent > "u") {
69
69
  class o extends Event {
70
70
  constructor(e, n = {}) {
71
71
  super(e, n), this.detail = n.detail;
@@ -76,7 +76,7 @@ if (vr === "NODE" && typeof CustomEvent > "u") {
76
76
  globalThis.CustomEvent = o;
77
77
  }
78
78
  const ps = "playground-log", ri = (o, ...t) => {
79
- vt.dispatchEvent(
79
+ xt.dispatchEvent(
80
80
  new CustomEvent(ps, {
81
81
  detail: {
82
82
  log: o,
@@ -109,8 +109,8 @@ const ps = "playground-log", ri = (o, ...t) => {
109
109
  console.log(o.message, ...t);
110
110
  }
111
111
  }, ms = (o) => o instanceof Error ? [o.message, o.stack].join(`
112
- `) : JSON.stringify(o, null, 2), xr = [], si = (o) => {
113
- xr.push(o);
112
+ `) : JSON.stringify(o, null, 2), vr = [], si = (o) => {
113
+ vr.push(o);
114
114
  }, jn = (o) => {
115
115
  if (o.raw === !0)
116
116
  si(o.message);
@@ -142,7 +142,7 @@ class gs extends EventTarget {
142
142
  * @returns string[]
143
143
  */
144
144
  getLogs() {
145
- return this.handlers.includes(jn) ? [...xr] : (this.error(`Logs aren't stored because the logToMemory handler isn't registered.
145
+ return this.handlers.includes(jn) ? [...vr] : (this.error(`Logs aren't stored because the logToMemory handler isn't registered.
146
146
  If you're using a custom logger instance, make sure to register logToMemory handler.
147
147
  `), []);
148
148
  }
@@ -260,7 +260,7 @@ const ys = () => {
260
260
  } catch {
261
261
  }
262
262
  return [jn, ds, ri];
263
- }, vt = new gs(ys()), Fn = (o) => o.replace(/\t/g, ""), bs = (o, t, e) => {
263
+ }, xt = new gs(ys()), Fn = (o) => o.replace(/\t/g, ""), bs = (o, t, e) => {
264
264
  const n = /* @__PURE__ */ new Date(), s = new Intl.DateTimeFormat("en-GB", {
265
265
  year: "numeric",
266
266
  month: "short",
@@ -508,7 +508,7 @@ class _s extends $n.EventEmitter {
508
508
  return;
509
509
  }
510
510
  this.ws = e, this.emit("clientConnected"), e.on("message", (n) => {
511
- vt.debug(
511
+ xt.debug(
512
512
  "\x1B[1;32m[CDP][received]\x1B[0m",
513
513
  n.toString()
514
514
  );
@@ -536,7 +536,7 @@ class _s extends $n.EventEmitter {
536
536
  if (!this.ws || this.ws.readyState !== this.ws.OPEN)
537
537
  return;
538
538
  const e = JSON.stringify(t);
539
- vt.debug("\x1B[1;32m[CDP][send]\x1B[0m", e), this.ws.send(e);
539
+ xt.debug("\x1B[1;32m[CDP][send]\x1B[0m", e), this.ws.send(e);
540
540
  }
541
541
  close() {
542
542
  this.wss.close();
@@ -557,7 +557,7 @@ class Ts extends $n.EventEmitter {
557
557
  }), this.server.listen(t);
558
558
  }
559
559
  onData(t) {
560
- for (vt.debug("\x1B[1;32m[XDebug][received]]\x1B[0m", t), this.buffer += t; ; ) {
560
+ for (xt.debug("\x1B[1;32m[XDebug][received]]\x1B[0m", t), this.buffer += t; ; ) {
561
561
  if (this.expectedLength === null) {
562
562
  const e = this.buffer.indexOf("\0");
563
563
  if (e === -1)
@@ -580,16 +580,16 @@ class Ts extends $n.EventEmitter {
580
580
  }
581
581
  }
582
582
  sendCommand(t) {
583
- this.socket && (vt.debug("\x1B[1;32m[XDebug][send]\x1B[0m", t), this.socket.write(t + "\0"));
583
+ this.socket && (xt.debug("\x1B[1;32m[XDebug][send]\x1B[0m", t), this.socket.write(t + "\0"));
584
584
  }
585
585
  close() {
586
586
  this.server.close();
587
587
  }
588
588
  }
589
- const vs = {
589
+ const xs = {
590
590
  right: Ls,
591
591
  center: Ss
592
- }, xs = 0, Pe = 1, Ns = 2, Ae = 3;
592
+ }, vs = 0, Pe = 1, Ns = 2, Ae = 3;
593
593
  class Ps {
594
594
  constructor(t) {
595
595
  var e;
@@ -649,7 +649,7 @@ class Ps {
649
649
  const { width: c } = t[a], g = this.negatePadding(t[a]);
650
650
  let p = r;
651
651
  if (g > Dt.stringWidth(r) && (p += " ".repeat(g - Dt.stringWidth(r))), t[a].align && t[a].align !== "left" && this.wrap) {
652
- const h = vs[t[a].align];
652
+ const h = xs[t[a].align];
653
653
  p = h(p, g), Dt.stringWidth(p) < g && (p += " ".repeat((c || 0) - Dt.stringWidth(p) - 1));
654
654
  }
655
655
  const f = t[a].padding || [0, 0, 0, 0];
@@ -672,7 +672,7 @@ class Ps {
672
672
  return t.forEach((i, r) => {
673
673
  i.width = n[r], this.wrap ? s = Dt.wrap(i.text, this.negatePadding(i), { hard: !0 }).split(`
674
674
  `) : s = i.text.split(`
675
- `), i.border && (s.unshift("." + "-".repeat(this.negatePadding(i) + 2) + "."), s.push("'" + "-".repeat(this.negatePadding(i) + 2) + "'")), i.padding && (s.unshift(...new Array(i.padding[xs] || 0).fill("")), s.push(...new Array(i.padding[Ns] || 0).fill(""))), s.forEach((a, c) => {
675
+ `), i.border && (s.unshift("." + "-".repeat(this.negatePadding(i) + 2) + "."), s.push("'" + "-".repeat(this.negatePadding(i) + 2) + "'")), i.padding && (s.unshift(...new Array(i.padding[vs] || 0).fill("")), s.push(...new Array(i.padding[Ns] || 0).fill(""))), s.forEach((a, c) => {
676
676
  e[c] || e.push([]);
677
677
  const g = e[c];
678
678
  for (let p = 0; p < r; p++)
@@ -871,14 +871,14 @@ class Xs {
871
871
  keys: []
872
872
  }, A = /^-([0-9]+(\.[0-9]+)?|\.[0-9]+)$/, C = new RegExp("^--" + a["negation-prefix"] + "(.+)");
873
873
  [].concat(n.array || []).filter(Boolean).forEach(function(I) {
874
- const v = typeof I == "object" ? I.key : I, R = Object.keys(I).map(function(S) {
874
+ const x = typeof I == "object" ? I.key : I, R = Object.keys(I).map(function(S) {
875
875
  return {
876
876
  boolean: "bools",
877
877
  string: "strings",
878
878
  number: "numbers"
879
879
  }[S];
880
880
  }).filter(Boolean).pop();
881
- R && (w[R][v] = !0), w.arrays[v] = !0, w.keys.push(v);
881
+ R && (w[R][x] = !0), w.arrays[x] = !0, w.keys.push(x);
882
882
  }), [].concat(n.boolean || []).filter(Boolean).forEach(function(I) {
883
883
  w.bools[I] = !0, w.keys.push(I);
884
884
  }), [].concat(n.string || []).filter(Boolean).forEach(function(I) {
@@ -889,17 +889,17 @@ class Xs {
889
889
  w.counts[I] = !0, w.keys.push(I);
890
890
  }), [].concat(n.normalize || []).filter(Boolean).forEach(function(I) {
891
891
  w.normalize[I] = !0, w.keys.push(I);
892
- }), typeof n.narg == "object" && Object.entries(n.narg).forEach(([I, v]) => {
893
- typeof v == "number" && (w.nargs[I] = v, w.keys.push(I));
894
- }), typeof n.coerce == "object" && Object.entries(n.coerce).forEach(([I, v]) => {
895
- typeof v == "function" && (w.coercions[I] = v, w.keys.push(I));
892
+ }), typeof n.narg == "object" && Object.entries(n.narg).forEach(([I, x]) => {
893
+ typeof x == "number" && (w.nargs[I] = x, w.keys.push(I));
894
+ }), typeof n.coerce == "object" && Object.entries(n.coerce).forEach(([I, x]) => {
895
+ typeof x == "function" && (w.coercions[I] = x, w.keys.push(I));
896
896
  }), typeof n.config < "u" && (Array.isArray(n.config) || typeof n.config == "string" ? [].concat(n.config).filter(Boolean).forEach(function(I) {
897
897
  w.configs[I] = !0;
898
- }) : typeof n.config == "object" && Object.entries(n.config).forEach(([I, v]) => {
899
- (typeof v == "boolean" || typeof v == "function") && (w.configs[I] = v);
898
+ }) : typeof n.config == "object" && Object.entries(n.config).forEach(([I, x]) => {
899
+ (typeof x == "boolean" || typeof x == "function") && (w.configs[I] = x);
900
900
  })), jt(n.key, r, n.default, w.arrays), Object.keys(c).forEach(function(I) {
901
- (w.aliases[I] || []).forEach(function(v) {
902
- c[v] = c[I];
901
+ (w.aliases[I] || []).forEach(function(x) {
902
+ c[x] = c[I];
903
903
  });
904
904
  });
905
905
  let d = null;
@@ -907,28 +907,28 @@ class Xs {
907
907
  let E = [];
908
908
  const T = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] }), F = {};
909
909
  for (let I = 0; I < s.length; I++) {
910
- const v = s[I], R = v.replace(/^-{3,}/, "---");
911
- let S, x, q, $, z, pt;
912
- if (v !== "--" && /^-/.test(v) && l(v))
913
- U(v);
910
+ const x = s[I], R = x.replace(/^-{3,}/, "---");
911
+ let S, v, q, $, z, pt;
912
+ if (x !== "--" && /^-/.test(x) && u(x))
913
+ U(x);
914
914
  else if (R.match(/^---+(=|$)/)) {
915
- U(v);
915
+ U(x);
916
916
  continue;
917
- } else if (v.match(/^--.+=/) || !a["short-option-groups"] && v.match(/^-.+=/))
918
- $ = v.match(/^--?([^=]+)=([\s\S]*)$/), $ !== null && Array.isArray($) && $.length >= 3 && (Q($[1], w.arrays) ? I = u(I, $[1], s, $[2]) : Q($[1], w.nargs) !== !1 ? I = j(I, $[1], s, $[2]) : M($[1], $[2], !0));
919
- else if (v.match(C) && a["boolean-negation"])
920
- $ = v.match(C), $ !== null && Array.isArray($) && $.length >= 2 && (x = $[1], M(x, Q(x, w.arrays) ? [!1] : !1));
921
- else if (v.match(/^--.+/) || !a["short-option-groups"] && v.match(/^-[^-]+/))
922
- $ = v.match(/^--?(.+)/), $ !== null && Array.isArray($) && $.length >= 2 && (x = $[1], Q(x, w.arrays) ? I = u(I, x, s) : Q(x, w.nargs) !== !1 ? I = j(I, x, s) : (z = s[I + 1], z !== void 0 && (!z.match(/^-/) || z.match(A)) && !Q(x, w.bools) && !Q(x, w.counts) || /^(true|false)$/.test(z) ? (M(x, z), I++) : M(x, _(x))));
923
- else if (v.match(/^-.\..+=/))
924
- $ = v.match(/^-([^=]+)=([\s\S]*)$/), $ !== null && Array.isArray($) && $.length >= 3 && M($[1], $[2]);
925
- else if (v.match(/^-.\..+/) && !v.match(A))
926
- z = s[I + 1], $ = v.match(/^-(.\..+)/), $ !== null && Array.isArray($) && $.length >= 2 && (x = $[1], z !== void 0 && !z.match(/^-/) && !Q(x, w.bools) && !Q(x, w.counts) ? (M(x, z), I++) : M(x, _(x)));
927
- else if (v.match(/^-[^-]+/) && !v.match(A)) {
928
- q = v.slice(1, -1).split(""), S = !1;
917
+ } else if (x.match(/^--.+=/) || !a["short-option-groups"] && x.match(/^-.+=/))
918
+ $ = x.match(/^--?([^=]+)=([\s\S]*)$/), $ !== null && Array.isArray($) && $.length >= 3 && (Q($[1], w.arrays) ? I = l(I, $[1], s, $[2]) : Q($[1], w.nargs) !== !1 ? I = j(I, $[1], s, $[2]) : M($[1], $[2], !0));
919
+ else if (x.match(C) && a["boolean-negation"])
920
+ $ = x.match(C), $ !== null && Array.isArray($) && $.length >= 2 && (v = $[1], M(v, Q(v, w.arrays) ? [!1] : !1));
921
+ else if (x.match(/^--.+/) || !a["short-option-groups"] && x.match(/^-[^-]+/))
922
+ $ = x.match(/^--?(.+)/), $ !== null && Array.isArray($) && $.length >= 2 && (v = $[1], Q(v, w.arrays) ? I = l(I, v, s) : Q(v, w.nargs) !== !1 ? I = j(I, v, s) : (z = s[I + 1], z !== void 0 && (!z.match(/^-/) || z.match(A)) && !Q(v, w.bools) && !Q(v, w.counts) || /^(true|false)$/.test(z) ? (M(v, z), I++) : M(v, _(v))));
923
+ else if (x.match(/^-.\..+=/))
924
+ $ = x.match(/^-([^=]+)=([\s\S]*)$/), $ !== null && Array.isArray($) && $.length >= 3 && M($[1], $[2]);
925
+ else if (x.match(/^-.\..+/) && !x.match(A))
926
+ z = s[I + 1], $ = x.match(/^-(.\..+)/), $ !== null && Array.isArray($) && $.length >= 2 && (v = $[1], z !== void 0 && !z.match(/^-/) && !Q(v, w.bools) && !Q(v, w.counts) ? (M(v, z), I++) : M(v, _(v)));
927
+ else if (x.match(/^-[^-]+/) && !x.match(A)) {
928
+ q = x.slice(1, -1).split(""), S = !1;
929
929
  for (let gt = 0; gt < q.length; gt++) {
930
- if (z = v.slice(gt + 2), q[gt + 1] && q[gt + 1] === "=") {
931
- pt = v.slice(gt + 3), x = q[gt], Q(x, w.arrays) ? I = u(I, x, s, pt) : Q(x, w.nargs) !== !1 ? I = j(I, x, s, pt) : M(x, pt), S = !0;
930
+ if (z = x.slice(gt + 2), q[gt + 1] && q[gt + 1] === "=") {
931
+ pt = x.slice(gt + 3), v = q[gt], Q(v, w.arrays) ? I = l(I, v, s, pt) : Q(v, w.nargs) !== !1 ? I = j(I, v, s, pt) : M(v, pt), S = !0;
932
932
  break;
933
933
  }
934
934
  if (z === "-") {
@@ -945,17 +945,17 @@ class Xs {
945
945
  } else
946
946
  M(q[gt], _(q[gt]));
947
947
  }
948
- x = v.slice(-1)[0], !S && x !== "-" && (Q(x, w.arrays) ? I = u(I, x, s) : Q(x, w.nargs) !== !1 ? I = j(I, x, s) : (z = s[I + 1], z !== void 0 && (!/^(-|--)[^-]/.test(z) || z.match(A)) && !Q(x, w.bools) && !Q(x, w.counts) || /^(true|false)$/.test(z) ? (M(x, z), I++) : M(x, _(x))));
949
- } else if (v.match(/^-[0-9]$/) && v.match(A) && Q(v.slice(1), w.bools))
950
- x = v.slice(1), M(x, _(x));
951
- else if (v === "--") {
948
+ v = x.slice(-1)[0], !S && v !== "-" && (Q(v, w.arrays) ? I = l(I, v, s) : Q(v, w.nargs) !== !1 ? I = j(I, v, s) : (z = s[I + 1], z !== void 0 && (!/^(-|--)[^-]/.test(z) || z.match(A)) && !Q(v, w.bools) && !Q(v, w.counts) || /^(true|false)$/.test(z) ? (M(v, z), I++) : M(v, _(v))));
949
+ } else if (x.match(/^-[0-9]$/) && x.match(A) && Q(x.slice(1), w.bools))
950
+ v = x.slice(1), M(v, _(v));
951
+ else if (x === "--") {
952
952
  E = s.slice(I + 1);
953
953
  break;
954
954
  } else if (a["halt-at-non-option"]) {
955
955
  E = s.slice(I);
956
956
  break;
957
957
  } else
958
- U(v);
958
+ U(x);
959
959
  }
960
960
  W(T, !0), W(T, !1), X(T), k(), st(T, w.aliases, c, !0), at(T), a["set-placeholder-key"] && Nt(T), Object.keys(w.counts).forEach(function(I) {
961
961
  mt(T, I.split(".")) || M(I, 0);
@@ -964,116 +964,116 @@ class Xs {
964
964
  }), a["camel-case-expansion"] && a["strip-dashed"] && Object.keys(T).filter((I) => I !== "--" && I.includes("-")).forEach((I) => {
965
965
  delete T[I];
966
966
  }), a["strip-aliased"] && [].concat(...Object.keys(r).map((I) => r[I])).forEach((I) => {
967
- a["camel-case-expansion"] && I.includes("-") && delete T[I.split(".").map((v) => le(v)).join(".")], delete T[I];
967
+ a["camel-case-expansion"] && I.includes("-") && delete T[I.split(".").map((x) => le(x)).join(".")], delete T[I];
968
968
  });
969
969
  function U(I) {
970
- const v = B("_", I);
971
- (typeof v == "string" || typeof v == "number") && T._.push(v);
970
+ const x = B("_", I);
971
+ (typeof x == "string" || typeof x == "number") && T._.push(x);
972
972
  }
973
- function j(I, v, R, S) {
974
- let x, q = Q(v, w.nargs);
973
+ function j(I, x, R, S) {
974
+ let v, q = Q(x, w.nargs);
975
975
  if (q = typeof q != "number" || isNaN(q) ? 1 : q, q === 0)
976
- return it(S) || (d = Error(D("Argument unexpected for: %s", v))), M(v, _(v)), I;
976
+ return it(S) || (d = Error(D("Argument unexpected for: %s", x))), M(x, _(x)), I;
977
977
  let $ = it(S) ? 0 : 1;
978
978
  if (a["nargs-eats-options"])
979
- R.length - (I + 1) + $ < q && (d = Error(D("Not enough arguments following: %s", v))), $ = q;
979
+ R.length - (I + 1) + $ < q && (d = Error(D("Not enough arguments following: %s", x))), $ = q;
980
980
  else {
981
- for (x = I + 1; x < R.length && (!R[x].match(/^-[^0-9]/) || R[x].match(A) || l(R[x])); x++)
981
+ for (v = I + 1; v < R.length && (!R[v].match(/^-[^0-9]/) || R[v].match(A) || u(R[v])); v++)
982
982
  $++;
983
- $ < q && (d = Error(D("Not enough arguments following: %s", v)));
983
+ $ < q && (d = Error(D("Not enough arguments following: %s", x)));
984
984
  }
985
985
  let z = Math.min($, q);
986
- for (!it(S) && z > 0 && (M(v, S), z--), x = I + 1; x < z + I + 1; x++)
987
- M(v, R[x]);
986
+ for (!it(S) && z > 0 && (M(x, S), z--), v = I + 1; v < z + I + 1; v++)
987
+ M(x, R[v]);
988
988
  return I + z;
989
989
  }
990
- function u(I, v, R, S) {
991
- let x = [], q = S || R[I + 1];
992
- const $ = Q(v, w.nargs);
993
- if (Q(v, w.bools) && !/^(true|false)$/.test(q))
994
- x.push(!0);
995
- else if (it(q) || it(S) && /^-/.test(q) && !A.test(q) && !l(q)) {
996
- if (c[v] !== void 0) {
997
- const z = c[v];
998
- x = Array.isArray(z) ? z : [z];
990
+ function l(I, x, R, S) {
991
+ let v = [], q = S || R[I + 1];
992
+ const $ = Q(x, w.nargs);
993
+ if (Q(x, w.bools) && !/^(true|false)$/.test(q))
994
+ v.push(!0);
995
+ else if (it(q) || it(S) && /^-/.test(q) && !A.test(q) && !u(q)) {
996
+ if (c[x] !== void 0) {
997
+ const z = c[x];
998
+ v = Array.isArray(z) ? z : [z];
999
999
  }
1000
1000
  } else {
1001
- it(S) || x.push(L(v, S, !0));
1002
- for (let z = I + 1; z < R.length && !(!a["greedy-arrays"] && x.length > 0 || $ && typeof $ == "number" && x.length >= $ || (q = R[z], /^-/.test(q) && !A.test(q) && !l(q))); z++)
1003
- I = z, x.push(L(v, q, i));
1001
+ it(S) || v.push(L(x, S, !0));
1002
+ for (let z = I + 1; z < R.length && !(!a["greedy-arrays"] && v.length > 0 || $ && typeof $ == "number" && v.length >= $ || (q = R[z], /^-/.test(q) && !A.test(q) && !u(q))); z++)
1003
+ I = z, v.push(L(x, q, i));
1004
1004
  }
1005
- return typeof $ == "number" && ($ && x.length < $ || isNaN($) && x.length === 0) && (d = Error(D("Not enough arguments following: %s", v))), M(v, x), I;
1005
+ return typeof $ == "number" && ($ && v.length < $ || isNaN($) && v.length === 0) && (d = Error(D("Not enough arguments following: %s", x))), M(x, v), I;
1006
1006
  }
1007
- function M(I, v, R = i) {
1007
+ function M(I, x, R = i) {
1008
1008
  if (/-/.test(I) && a["camel-case-expansion"]) {
1009
1009
  const q = I.split(".").map(function($) {
1010
1010
  return le($);
1011
1011
  }).join(".");
1012
1012
  N(I, q);
1013
1013
  }
1014
- const S = L(I, v, R), x = I.split(".");
1015
- bt(T, x, S), w.aliases[I] && w.aliases[I].forEach(function(q) {
1014
+ const S = L(I, x, R), v = I.split(".");
1015
+ bt(T, v, S), w.aliases[I] && w.aliases[I].forEach(function(q) {
1016
1016
  const $ = q.split(".");
1017
1017
  bt(T, $, S);
1018
- }), x.length > 1 && a["dot-notation"] && (w.aliases[x[0]] || []).forEach(function(q) {
1018
+ }), v.length > 1 && a["dot-notation"] && (w.aliases[v[0]] || []).forEach(function(q) {
1019
1019
  let $ = q.split(".");
1020
- const z = [].concat(x);
1020
+ const z = [].concat(v);
1021
1021
  z.shift(), $ = $.concat(z), (w.aliases[I] || []).includes($.join(".")) || bt(T, $, S);
1022
1022
  }), Q(I, w.normalize) && !Q(I, w.arrays) && [I].concat(w.aliases[I] || []).forEach(function($) {
1023
1023
  Object.defineProperty(F, $, {
1024
1024
  enumerable: !0,
1025
1025
  get() {
1026
- return v;
1026
+ return x;
1027
1027
  },
1028
1028
  set(z) {
1029
- v = typeof z == "string" ? Ft.normalize(z) : z;
1029
+ x = typeof z == "string" ? Ft.normalize(z) : z;
1030
1030
  }
1031
1031
  });
1032
1032
  });
1033
1033
  }
1034
- function N(I, v) {
1035
- w.aliases[I] && w.aliases[I].length || (w.aliases[I] = [v], b[v] = !0), w.aliases[v] && w.aliases[v].length || N(v, I);
1034
+ function N(I, x) {
1035
+ w.aliases[I] && w.aliases[I].length || (w.aliases[I] = [x], b[x] = !0), w.aliases[x] && w.aliases[x].length || N(x, I);
1036
1036
  }
1037
- function L(I, v, R) {
1038
- R && (v = Ws(v)), (Q(I, w.bools) || Q(I, w.counts)) && typeof v == "string" && (v = v === "true");
1039
- let S = Array.isArray(v) ? v.map(function(x) {
1040
- return B(I, x);
1041
- }) : B(I, v);
1042
- return Q(I, w.counts) && (it(S) || typeof S == "boolean") && (S = Re()), Q(I, w.normalize) && Q(I, w.arrays) && (Array.isArray(v) ? S = v.map((x) => Ft.normalize(x)) : S = Ft.normalize(v)), S;
1037
+ function L(I, x, R) {
1038
+ R && (x = Ws(x)), (Q(I, w.bools) || Q(I, w.counts)) && typeof x == "string" && (x = x === "true");
1039
+ let S = Array.isArray(x) ? x.map(function(v) {
1040
+ return B(I, v);
1041
+ }) : B(I, x);
1042
+ return Q(I, w.counts) && (it(S) || typeof S == "boolean") && (S = Re()), Q(I, w.normalize) && Q(I, w.arrays) && (Array.isArray(x) ? S = x.map((v) => Ft.normalize(v)) : S = Ft.normalize(x)), S;
1043
1043
  }
1044
- function B(I, v) {
1045
- return !a["parse-positional-numbers"] && I === "_" || !Q(I, w.strings) && !Q(I, w.bools) && !Array.isArray(v) && (Xr(v) && a["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${v}`))) || !it(v) && Q(I, w.numbers)) && (v = Number(v)), v;
1044
+ function B(I, x) {
1045
+ return !a["parse-positional-numbers"] && I === "_" || !Q(I, w.strings) && !Q(I, w.bools) && !Array.isArray(x) && (Xr(x) && a["parse-numbers"] && Number.isSafeInteger(Math.floor(parseFloat(`${x}`))) || !it(x) && Q(I, w.numbers)) && (x = Number(x)), x;
1046
1046
  }
1047
1047
  function X(I) {
1048
- const v = /* @__PURE__ */ Object.create(null);
1049
- st(v, w.aliases, c), Object.keys(w.configs).forEach(function(R) {
1050
- const S = I[R] || v[R];
1048
+ const x = /* @__PURE__ */ Object.create(null);
1049
+ st(x, w.aliases, c), Object.keys(w.configs).forEach(function(R) {
1050
+ const S = I[R] || x[R];
1051
1051
  if (S)
1052
1052
  try {
1053
- let x = null;
1053
+ let v = null;
1054
1054
  const q = Ft.resolve(Ft.cwd(), S), $ = w.configs[R];
1055
1055
  if (typeof $ == "function") {
1056
1056
  try {
1057
- x = $(q);
1057
+ v = $(q);
1058
1058
  } catch (z) {
1059
- x = z;
1059
+ v = z;
1060
1060
  }
1061
- if (x instanceof Error) {
1062
- d = x;
1061
+ if (v instanceof Error) {
1062
+ d = v;
1063
1063
  return;
1064
1064
  }
1065
1065
  } else
1066
- x = Ft.require(q);
1067
- Y(x);
1068
- } catch (x) {
1069
- x.name === "PermissionDenied" ? d = x : I[R] && (d = Error(D("Invalid JSON config file: %s", S)));
1066
+ v = Ft.require(q);
1067
+ Y(v);
1068
+ } catch (v) {
1069
+ v.name === "PermissionDenied" ? d = v : I[R] && (d = Error(D("Invalid JSON config file: %s", S)));
1070
1070
  }
1071
1071
  });
1072
1072
  }
1073
- function Y(I, v) {
1073
+ function Y(I, x) {
1074
1074
  Object.keys(I).forEach(function(R) {
1075
- const S = I[R], x = v ? v + "." + R : R;
1076
- typeof S == "object" && S !== null && !Array.isArray(S) && a["dot-notation"] ? Y(S, x) : (!mt(T, x.split(".")) || Q(x, w.arrays) && a["combine-arrays"]) && M(x, S);
1075
+ const S = I[R], v = x ? x + "." + R : R;
1076
+ typeof S == "object" && S !== null && !Array.isArray(S) && a["dot-notation"] ? Y(S, v) : (!mt(T, v.split(".")) || Q(v, w.arrays) && a["combine-arrays"]) && M(v, S);
1077
1077
  });
1078
1078
  }
1079
1079
  function k() {
@@ -1081,116 +1081,116 @@ class Xs {
1081
1081
  Y(I);
1082
1082
  });
1083
1083
  }
1084
- function W(I, v) {
1084
+ function W(I, x) {
1085
1085
  if (typeof p > "u")
1086
1086
  return;
1087
1087
  const R = typeof p == "string" ? p : "", S = Ft.env();
1088
- Object.keys(S).forEach(function(x) {
1089
- if (R === "" || x.lastIndexOf(R, 0) === 0) {
1090
- const q = x.split("__").map(function($, z) {
1088
+ Object.keys(S).forEach(function(v) {
1089
+ if (R === "" || v.lastIndexOf(R, 0) === 0) {
1090
+ const q = v.split("__").map(function($, z) {
1091
1091
  return z === 0 && ($ = $.substring(R.length)), le($);
1092
1092
  });
1093
- (v && w.configs[q.join(".")] || !v) && !mt(I, q) && M(q.join("."), S[x]);
1093
+ (x && w.configs[q.join(".")] || !x) && !mt(I, q) && M(q.join("."), S[v]);
1094
1094
  }
1095
1095
  });
1096
1096
  }
1097
1097
  function at(I) {
1098
- let v;
1098
+ let x;
1099
1099
  const R = /* @__PURE__ */ new Set();
1100
1100
  Object.keys(I).forEach(function(S) {
1101
- if (!R.has(S) && (v = Q(S, w.coercions), typeof v == "function"))
1101
+ if (!R.has(S) && (x = Q(S, w.coercions), typeof x == "function"))
1102
1102
  try {
1103
- const x = B(S, v(I[S]));
1103
+ const v = B(S, x(I[S]));
1104
1104
  [].concat(w.aliases[S] || [], S).forEach((q) => {
1105
- R.add(q), I[q] = x;
1105
+ R.add(q), I[q] = v;
1106
1106
  });
1107
- } catch (x) {
1108
- d = x;
1107
+ } catch (v) {
1108
+ d = v;
1109
1109
  }
1110
1110
  });
1111
1111
  }
1112
1112
  function Nt(I) {
1113
- return w.keys.forEach((v) => {
1114
- ~v.indexOf(".") || typeof I[v] > "u" && (I[v] = void 0);
1113
+ return w.keys.forEach((x) => {
1114
+ ~x.indexOf(".") || typeof I[x] > "u" && (I[x] = void 0);
1115
1115
  }), I;
1116
1116
  }
1117
- function st(I, v, R, S = !1) {
1118
- Object.keys(R).forEach(function(x) {
1119
- mt(I, x.split(".")) || (bt(I, x.split("."), R[x]), S && (O[x] = !0), (v[x] || []).forEach(function(q) {
1120
- mt(I, q.split(".")) || bt(I, q.split("."), R[x]);
1117
+ function st(I, x, R, S = !1) {
1118
+ Object.keys(R).forEach(function(v) {
1119
+ mt(I, v.split(".")) || (bt(I, v.split("."), R[v]), S && (O[v] = !0), (x[v] || []).forEach(function(q) {
1120
+ mt(I, q.split(".")) || bt(I, q.split("."), R[v]);
1121
1121
  }));
1122
1122
  });
1123
1123
  }
1124
- function mt(I, v) {
1124
+ function mt(I, x) {
1125
1125
  let R = I;
1126
- a["dot-notation"] || (v = [v.join(".")]), v.slice(0, -1).forEach(function(x) {
1127
- R = R[x] || {};
1126
+ a["dot-notation"] || (x = [x.join(".")]), x.slice(0, -1).forEach(function(v) {
1127
+ R = R[v] || {};
1128
1128
  });
1129
- const S = v[v.length - 1];
1129
+ const S = x[x.length - 1];
1130
1130
  return typeof R != "object" ? !1 : S in R;
1131
1131
  }
1132
- function bt(I, v, R) {
1132
+ function bt(I, x, R) {
1133
1133
  let S = I;
1134
- a["dot-notation"] || (v = [v.join(".")]), v.slice(0, -1).forEach(function(pt) {
1134
+ a["dot-notation"] || (x = [x.join(".")]), x.slice(0, -1).forEach(function(pt) {
1135
1135
  pt = ui(pt), typeof S == "object" && S[pt] === void 0 && (S[pt] = {}), typeof S[pt] != "object" || Array.isArray(S[pt]) ? (Array.isArray(S[pt]) ? S[pt].push({}) : S[pt] = [S[pt], {}], S = S[pt][S[pt].length - 1]) : S = S[pt];
1136
1136
  });
1137
- const x = ui(v[v.length - 1]), q = Q(v.join("."), w.arrays), $ = Array.isArray(R);
1137
+ const v = ui(x[x.length - 1]), q = Q(x.join("."), w.arrays), $ = Array.isArray(R);
1138
1138
  let z = a["duplicate-arguments-array"];
1139
- !z && Q(x, w.nargs) && (z = !0, (!it(S[x]) && w.nargs[x] === 1 || Array.isArray(S[x]) && S[x].length === w.nargs[x]) && (S[x] = void 0)), R === Re() ? S[x] = Re(S[x]) : Array.isArray(S[x]) ? z && q && $ ? S[x] = a["flatten-duplicate-arrays"] ? S[x].concat(R) : (Array.isArray(S[x][0]) ? S[x] : [S[x]]).concat([R]) : !z && !!q == !!$ ? S[x] = R : S[x] = S[x].concat([R]) : S[x] === void 0 && q ? S[x] = $ ? R : [R] : z && !(S[x] === void 0 || Q(x, w.counts) || Q(x, w.bools)) ? S[x] = [S[x], R] : S[x] = R;
1139
+ !z && Q(v, w.nargs) && (z = !0, (!it(S[v]) && w.nargs[v] === 1 || Array.isArray(S[v]) && S[v].length === w.nargs[v]) && (S[v] = void 0)), R === Re() ? S[v] = Re(S[v]) : Array.isArray(S[v]) ? z && q && $ ? S[v] = a["flatten-duplicate-arrays"] ? S[v].concat(R) : (Array.isArray(S[v][0]) ? S[v] : [S[v]]).concat([R]) : !z && !!q == !!$ ? S[v] = R : S[v] = S[v].concat([R]) : S[v] === void 0 && q ? S[v] = $ ? R : [R] : z && !(S[v] === void 0 || Q(v, w.counts) || Q(v, w.bools)) ? S[v] = [S[v], R] : S[v] = R;
1140
1140
  }
1141
1141
  function jt(...I) {
1142
- I.forEach(function(v) {
1143
- Object.keys(v || {}).forEach(function(R) {
1142
+ I.forEach(function(x) {
1143
+ Object.keys(x || {}).forEach(function(R) {
1144
1144
  w.aliases[R] || (w.aliases[R] = [].concat(r[R] || []), w.aliases[R].concat(R).forEach(function(S) {
1145
1145
  if (/-/.test(S) && a["camel-case-expansion"]) {
1146
- const x = le(S);
1147
- x !== R && w.aliases[R].indexOf(x) === -1 && (w.aliases[R].push(x), b[x] = !0);
1146
+ const v = le(S);
1147
+ v !== R && w.aliases[R].indexOf(v) === -1 && (w.aliases[R].push(v), b[v] = !0);
1148
1148
  }
1149
1149
  }), w.aliases[R].concat(R).forEach(function(S) {
1150
1150
  if (S.length > 1 && /[A-Z]/.test(S) && a["camel-case-expansion"]) {
1151
- const x = Ur(S, "-");
1152
- x !== R && w.aliases[R].indexOf(x) === -1 && (w.aliases[R].push(x), b[x] = !0);
1151
+ const v = Ur(S, "-");
1152
+ v !== R && w.aliases[R].indexOf(v) === -1 && (w.aliases[R].push(v), b[v] = !0);
1153
1153
  }
1154
1154
  }), w.aliases[R].forEach(function(S) {
1155
- w.aliases[S] = [R].concat(w.aliases[R].filter(function(x) {
1156
- return S !== x;
1155
+ w.aliases[S] = [R].concat(w.aliases[R].filter(function(v) {
1156
+ return S !== v;
1157
1157
  }));
1158
1158
  }));
1159
1159
  });
1160
1160
  });
1161
1161
  }
1162
- function Q(I, v) {
1163
- const R = [].concat(w.aliases[I] || [], I), S = Object.keys(v), x = R.find((q) => S.includes(q));
1164
- return x ? v[x] : !1;
1162
+ function Q(I, x) {
1163
+ const R = [].concat(w.aliases[I] || [], I), S = Object.keys(x), v = R.find((q) => S.includes(q));
1164
+ return v ? x[v] : !1;
1165
1165
  }
1166
1166
  function qt(I) {
1167
- const v = Object.keys(w);
1168
- return [].concat(v.map((S) => w[S])).some(function(S) {
1167
+ const x = Object.keys(w);
1168
+ return [].concat(x.map((S) => w[S])).some(function(S) {
1169
1169
  return Array.isArray(S) ? S.includes(I) : S[I];
1170
1170
  });
1171
1171
  }
1172
- function K(I, ...v) {
1173
- return [].concat(...v).some(function(S) {
1174
- const x = I.match(S);
1175
- return x && qt(x[1]);
1172
+ function K(I, ...x) {
1173
+ return [].concat(...x).some(function(S) {
1174
+ const v = I.match(S);
1175
+ return v && qt(v[1]);
1176
1176
  });
1177
1177
  }
1178
1178
  function m(I) {
1179
1179
  if (I.match(A) || !I.match(/^-[^-]+/))
1180
1180
  return !1;
1181
- let v = !0, R;
1181
+ let x = !0, R;
1182
1182
  const S = I.slice(1).split("");
1183
- for (let x = 0; x < S.length; x++) {
1184
- if (R = I.slice(x + 2), !qt(S[x])) {
1185
- v = !1;
1183
+ for (let v = 0; v < S.length; v++) {
1184
+ if (R = I.slice(v + 2), !qt(S[v])) {
1185
+ x = !1;
1186
1186
  break;
1187
1187
  }
1188
- if (S[x + 1] && S[x + 1] === "=" || R === "-" || /[A-Za-z]/.test(S[x]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(R) || S[x + 1] && S[x + 1].match(/\W/))
1188
+ if (S[v + 1] && S[v + 1] === "=" || R === "-" || /[A-Za-z]/.test(S[v]) && /^-?\d+(\.\d*)?(e-?\d+)?$/.test(R) || S[v + 1] && S[v + 1].match(/\W/))
1189
1189
  break;
1190
1190
  }
1191
- return v;
1191
+ return x;
1192
1192
  }
1193
- function l(I) {
1193
+ function u(I) {
1194
1194
  return a["unknown-options-as-args"] && P(I);
1195
1195
  }
1196
1196
  function P(I) {
@@ -1208,8 +1208,8 @@ class Xs {
1208
1208
  }[I];
1209
1209
  }
1210
1210
  function nt(I) {
1211
- let v = At.BOOLEAN;
1212
- return Q(I, w.strings) ? v = At.STRING : Q(I, w.numbers) ? v = At.NUMBER : Q(I, w.bools) ? v = At.BOOLEAN : Q(I, w.arrays) && (v = At.ARRAY), v;
1211
+ let x = At.BOOLEAN;
1212
+ return Q(I, w.strings) ? x = At.STRING : Q(I, w.numbers) ? x = At.NUMBER : Q(I, w.bools) ? x = At.BOOLEAN : Q(I, w.arrays) && (x = At.ARRAY), x;
1213
1213
  }
1214
1214
  function it(I) {
1215
1215
  return I === void 0;
@@ -1710,7 +1710,7 @@ class oo {
1710
1710
  n.getInternalMethods().getUsageInstance().freeze();
1711
1711
  const f = g(n.getInternalMethods().reset(s), c);
1712
1712
  if (lt(f))
1713
- return f.then((h) => (p = vo(h) ? h : n, this.parseAndUpdateUsage(t, e, p, i, r, a)));
1713
+ return f.then((h) => (p = xo(h) ? h : n, this.parseAndUpdateUsage(t, e, p, i, r, a)));
1714
1714
  } else uo(g) && (n.getInternalMethods().getUsageInstance().freeze(), p = n.getInternalMethods().reset(s), Object.keys(e.builder).forEach((f) => {
1715
1715
  p.option(f, g[f]);
1716
1716
  }));
@@ -2005,9 +2005,9 @@ function ho(o, t) {
2005
2005
  st.div(e("Commands:"));
2006
2006
  const K = o.getInternalMethods().getContext(), m = K.commands.length ? `${K.commands.join(" ")} ` : "";
2007
2007
  o.getInternalMethods().getParserConfiguration()["sort-commands"] === !0 && (h = h.sort((P, _) => P[0].localeCompare(_[0])));
2008
- const l = L ? `${L} ` : "";
2008
+ const u = L ? `${L} ` : "";
2009
2009
  h.forEach((P) => {
2010
- const _ = `${l}${m}${P[0].replace(/^\$0 ?/, "")}`;
2010
+ const _ = `${u}${m}${P[0].replace(/^\$0 ?/, "")}`;
2011
2011
  st.span({
2012
2012
  text: _,
2013
2013
  padding: [0, 2, 0, 2],
@@ -2026,29 +2026,29 @@ function ho(o, t) {
2026
2026
  const bt = e("Options:");
2027
2027
  k[bt] || (k[bt] = []), T(at, W.alias, k, bt);
2028
2028
  const jt = (K) => /^--/.test(we(K)), Q = Object.keys(k).filter((K) => k[K].length > 0).map((K) => {
2029
- const m = k[K].filter(F).map((l) => {
2030
- if (mt.includes(l))
2031
- return l;
2029
+ const m = k[K].filter(F).map((u) => {
2030
+ if (mt.includes(u))
2031
+ return u;
2032
2032
  for (let P = 0, _; (_ = mt[P]) !== void 0; P++)
2033
- if ((W.alias[_] || []).includes(l))
2033
+ if ((W.alias[_] || []).includes(u))
2034
2034
  return _;
2035
- return l;
2035
+ return u;
2036
2036
  });
2037
2037
  return { groupName: K, normalizedKeys: m };
2038
2038
  }).filter(({ normalizedKeys: K }) => K.length > 0).map(({ groupName: K, normalizedKeys: m }) => {
2039
- const l = m.reduce((P, _) => (P[_] = [_].concat(W.alias[_] || []).map((J) => K === n.getPositionalGroupName() ? J : (/^[0-9]$/.test(J) ? W.boolean.includes(_) ? "-" : "--" : J.length > 1 ? "--" : "-") + J).sort((J, nt) => jt(J) === jt(nt) ? 0 : jt(J) ? 1 : -1).join(", "), P), {});
2040
- return { groupName: K, normalizedKeys: m, switches: l };
2039
+ const u = m.reduce((P, _) => (P[_] = [_].concat(W.alias[_] || []).map((J) => K === n.getPositionalGroupName() ? J : (/^[0-9]$/.test(J) ? W.boolean.includes(_) ? "-" : "--" : J.length > 1 ? "--" : "-") + J).sort((J, nt) => jt(J) === jt(nt) ? 0 : jt(J) ? 1 : -1).join(", "), P), {});
2040
+ return { groupName: K, normalizedKeys: m, switches: u };
2041
2041
  });
2042
- if (Q.filter(({ groupName: K }) => K !== n.getPositionalGroupName()).some(({ normalizedKeys: K, switches: m }) => !K.every((l) => jt(m[l]))) && Q.filter(({ groupName: K }) => K !== n.getPositionalGroupName()).forEach(({ normalizedKeys: K, switches: m }) => {
2043
- K.forEach((l) => {
2044
- jt(m[l]) && (m[l] = po(m[l], 4));
2042
+ if (Q.filter(({ groupName: K }) => K !== n.getPositionalGroupName()).some(({ normalizedKeys: K, switches: m }) => !K.every((u) => jt(m[u]))) && Q.filter(({ groupName: K }) => K !== n.getPositionalGroupName()).forEach(({ normalizedKeys: K, switches: m }) => {
2043
+ K.forEach((u) => {
2044
+ jt(m[u]) && (m[u] = po(m[u], 4));
2045
2045
  });
2046
- }), Q.forEach(({ groupName: K, normalizedKeys: m, switches: l }) => {
2046
+ }), Q.forEach(({ groupName: K, normalizedKeys: m, switches: u }) => {
2047
2047
  st.div(K), m.forEach((P) => {
2048
- const _ = l[P];
2048
+ const _ = u[P];
2049
2049
  let J = b[P] || "", nt = null;
2050
2050
  J.includes(A) && (J = e(J.substring(A.length))), W.boolean.includes(P) && (nt = `[${e("boolean")}]`), W.count.includes(P) && (nt = `[${e("count")}]`), W.string.includes(P) && (nt = `[${e("string")}]`), W.normalize.includes(P) && (nt = `[${e("string")}]`), W.array.includes(P) && (nt = `[${e("array")}]`), W.number.includes(P) && (nt = `[${e("number")}]`);
2051
- const it = (v) => typeof v == "string" ? `[${e("deprecated: %s", v)}]` : `[${e("deprecated")}]`, ht = [
2051
+ const it = (x) => typeof x == "string" ? `[${e("deprecated: %s", x)}]` : `[${e("deprecated")}]`, ht = [
2052
2052
  P in Y ? it(Y[P]) : null,
2053
2053
  nt,
2054
2054
  P in B ? `[${e("required")}]` : null,
@@ -2058,7 +2058,7 @@ function ho(o, t) {
2058
2058
  st.span({
2059
2059
  text: we(_),
2060
2060
  padding: [0, 2, 0, 2 + yi(_)],
2061
- width: C(l, Nt) + 4
2061
+ width: C(u, Nt) + 4
2062
2062
  }, J);
2063
2063
  const I = o.getInternalMethods().getUsageConfiguration()["hide-types"] === !0;
2064
2064
  ht && !I ? st.div({ text: ht, padding: [0, 0, 0, 2], align: "right" }) : st.div();
@@ -2149,12 +2149,12 @@ function ho(o, t) {
2149
2149
  function j() {
2150
2150
  return t.process.stdColumns ? Math.min(80, t.process.stdColumns) : 80;
2151
2151
  }
2152
- let u = null;
2152
+ let l = null;
2153
2153
  n.version = (N) => {
2154
- u = N;
2154
+ l = N;
2155
2155
  }, n.showVersion = (N) => {
2156
2156
  const L = o.getInternalMethods().getLoggerInstance();
2157
- N || (N = "error"), (typeof N == "function" ? N : L[N])(u);
2157
+ N || (N = "error"), (typeof N == "function" ? N : L[N])(l);
2158
2158
  }, n.reset = function(L) {
2159
2159
  return i = null, c = !1, g = [], p = !1, O = [], f = [], h = [], b = ye(b, (B) => !L[B]), n;
2160
2160
  };
@@ -2586,7 +2586,7 @@ var V = function(o, t, e, n, s) {
2586
2586
  if (e === "a" && !n) throw new TypeError("Private accessor was defined without a getter");
2587
2587
  if (typeof t == "function" ? o !== t || !n : !t.has(o)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2588
2588
  return e === "m" ? n : e === "a" ? n.call(o) : n ? n.value : t.get(o);
2589
- }, ct, Vt, ce, Ct, wt, Oe, Xt, Ht, Ee, It, De, _t, Lt, Ot, Tt, Ce, ne, dt, G, Ie, _e, Et, zt, ie, Gt, $t, Te, Z, Yt, kt, Kt, tt, ve, St, ot;
2589
+ }, ct, Vt, ce, Ct, wt, Oe, Xt, Ht, Ee, It, De, _t, Lt, Ot, Tt, Ce, ne, dt, G, Ie, _e, Et, zt, ie, Gt, $t, Te, Z, Yt, kt, Kt, tt, xe, St, ot;
2590
2590
  function _o(o) {
2591
2591
  return (t = [], e = o.process.cwd(), n) => {
2592
2592
  const s = new To(t, e, n, o);
@@ -2596,10 +2596,10 @@ function _o(o) {
2596
2596
  }), s.help(), s.version(), s;
2597
2597
  };
2598
2598
  }
2599
- const wi = Symbol("copyDoubleDash"), Oi = Symbol("copyDoubleDash"), $e = Symbol("deleteFromParserHintObject"), Ei = Symbol("emitWarning"), Di = Symbol("freeze"), Ci = Symbol("getDollarZero"), Qt = Symbol("getParserConfiguration"), Ii = Symbol("getUsageConfiguration"), We = Symbol("guessLocale"), _i = Symbol("guessVersion"), Ti = Symbol("parsePositionalNumbers"), qe = Symbol("pkgUp"), Wt = Symbol("populateParserHintArray"), re = Symbol("populateParserHintSingleValueDictionary"), Ve = Symbol("populateParserHintArrayDictionary"), He = Symbol("populateParserHintDictionary"), ze = Symbol("sanitizeKey"), Ge = Symbol("setKey"), Ye = Symbol("unfreeze"), vi = Symbol("validateAsync"), xi = Symbol("getCommandInstance"), Ni = Symbol("getContext"), Pi = Symbol("getHasOutput"), Ai = Symbol("getLoggerInstance"), Mi = Symbol("getParseContext"), Li = Symbol("getUsageInstance"), Si = Symbol("getValidationInstance"), xe = Symbol("hasParseCallback"), ji = Symbol("isGlobalContext"), Jt = Symbol("postProcess"), Fi = Symbol("rebase"), ke = Symbol("reset"), ue = Symbol("runYargsParserAndExecuteCommands"), Ke = Symbol("runValidation"), Ri = Symbol("setHasOutput"), Zt = Symbol("kTrackManuallySetKeys");
2599
+ const wi = Symbol("copyDoubleDash"), Oi = Symbol("copyDoubleDash"), $e = Symbol("deleteFromParserHintObject"), Ei = Symbol("emitWarning"), Di = Symbol("freeze"), Ci = Symbol("getDollarZero"), Qt = Symbol("getParserConfiguration"), Ii = Symbol("getUsageConfiguration"), We = Symbol("guessLocale"), _i = Symbol("guessVersion"), Ti = Symbol("parsePositionalNumbers"), qe = Symbol("pkgUp"), Wt = Symbol("populateParserHintArray"), re = Symbol("populateParserHintSingleValueDictionary"), Ve = Symbol("populateParserHintArrayDictionary"), He = Symbol("populateParserHintDictionary"), ze = Symbol("sanitizeKey"), Ge = Symbol("setKey"), Ye = Symbol("unfreeze"), xi = Symbol("validateAsync"), vi = Symbol("getCommandInstance"), Ni = Symbol("getContext"), Pi = Symbol("getHasOutput"), Ai = Symbol("getLoggerInstance"), Mi = Symbol("getParseContext"), Li = Symbol("getUsageInstance"), Si = Symbol("getValidationInstance"), ve = Symbol("hasParseCallback"), ji = Symbol("isGlobalContext"), Jt = Symbol("postProcess"), Fi = Symbol("rebase"), ke = Symbol("reset"), ue = Symbol("runYargsParserAndExecuteCommands"), Ke = Symbol("runValidation"), Ri = Symbol("setHasOutput"), Zt = Symbol("kTrackManuallySetKeys");
2600
2600
  class To {
2601
2601
  constructor(t = [], e, n, s) {
2602
- this.customScriptName = !1, this.parsed = !1, ct.set(this, void 0), Vt.set(this, void 0), ce.set(this, { commands: [], fullCommands: [] }), Ct.set(this, null), wt.set(this, null), Oe.set(this, "show-hidden"), Xt.set(this, null), Ht.set(this, !0), Ee.set(this, {}), It.set(this, !0), De.set(this, []), _t.set(this, void 0), Lt.set(this, {}), Ot.set(this, !1), Tt.set(this, null), Ce.set(this, !0), ne.set(this, void 0), dt.set(this, ""), G.set(this, void 0), Ie.set(this, void 0), _e.set(this, {}), Et.set(this, null), zt.set(this, null), ie.set(this, {}), Gt.set(this, {}), $t.set(this, void 0), Te.set(this, !1), Z.set(this, void 0), Yt.set(this, !1), kt.set(this, !1), Kt.set(this, !1), tt.set(this, void 0), ve.set(this, {}), St.set(this, null), ot.set(this, void 0), V(this, Z, s, "f"), V(this, $t, t, "f"), V(this, Vt, e, "f"), V(this, Ie, n, "f"), V(this, _t, new no(this), "f"), this.$0 = this[Ci](), this[ke](), V(this, ct, y(this, ct, "f"), "f"), V(this, tt, y(this, tt, "f"), "f"), V(this, ot, y(this, ot, "f"), "f"), V(this, G, y(this, G, "f"), "f"), y(this, G, "f").showHiddenOpt = y(this, Oe, "f"), V(this, ne, this[Oi](), "f");
2602
+ this.customScriptName = !1, this.parsed = !1, ct.set(this, void 0), Vt.set(this, void 0), ce.set(this, { commands: [], fullCommands: [] }), Ct.set(this, null), wt.set(this, null), Oe.set(this, "show-hidden"), Xt.set(this, null), Ht.set(this, !0), Ee.set(this, {}), It.set(this, !0), De.set(this, []), _t.set(this, void 0), Lt.set(this, {}), Ot.set(this, !1), Tt.set(this, null), Ce.set(this, !0), ne.set(this, void 0), dt.set(this, ""), G.set(this, void 0), Ie.set(this, void 0), _e.set(this, {}), Et.set(this, null), zt.set(this, null), ie.set(this, {}), Gt.set(this, {}), $t.set(this, void 0), Te.set(this, !1), Z.set(this, void 0), Yt.set(this, !1), kt.set(this, !1), Kt.set(this, !1), tt.set(this, void 0), xe.set(this, {}), St.set(this, null), ot.set(this, void 0), V(this, Z, s, "f"), V(this, $t, t, "f"), V(this, Vt, e, "f"), V(this, Ie, n, "f"), V(this, _t, new no(this), "f"), this.$0 = this[Ci](), this[ke](), V(this, ct, y(this, ct, "f"), "f"), V(this, tt, y(this, tt, "f"), "f"), V(this, ot, y(this, ot, "f"), "f"), V(this, G, y(this, G, "f"), "f"), y(this, G, "f").showHiddenOpt = y(this, Oe, "f"), V(this, ne, this[Oi](), "f");
2603
2603
  }
2604
2604
  addHelpOpt(t, e) {
2605
2605
  const n = "help";
@@ -2984,7 +2984,7 @@ class To {
2984
2984
  return y(this, tt, "f").usage(t), this;
2985
2985
  }
2986
2986
  usageConfiguration(t) {
2987
- return H("<object>", [t], arguments.length), V(this, ve, t, "f"), this;
2987
+ return H("<object>", [t], arguments.length), V(this, xe, t, "f"), this;
2988
2988
  }
2989
2989
  version(t, e, n) {
2990
2990
  const s = "version";
@@ -3000,7 +3000,7 @@ class To {
3000
3000
  wrap(t) {
3001
3001
  return H("<number|null|undefined>", [t], arguments.length), y(this, tt, "f").wrap(t), this;
3002
3002
  }
3003
- [(ct = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), wi)](t) {
3003
+ [(ct = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Ht = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Ot = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), Te = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Kt = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), St = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), wi)](t) {
3004
3004
  if (!t._ || !t["--"])
3005
3005
  return t;
3006
3006
  t._.push.apply(t._, t["--"]);
@@ -3013,11 +3013,11 @@ class To {
3013
3013
  [Oi]() {
3014
3014
  return {
3015
3015
  log: (...t) => {
3016
- this[xe]() || console.log(...t), V(this, Ot, !0, "f"), y(this, dt, "f").length && V(this, dt, y(this, dt, "f") + `
3016
+ this[ve]() || console.log(...t), V(this, Ot, !0, "f"), y(this, dt, "f").length && V(this, dt, y(this, dt, "f") + `
3017
3017
  `, "f"), V(this, dt, y(this, dt, "f") + t.join(" "), "f");
3018
3018
  },
3019
3019
  error: (...t) => {
3020
- this[xe]() || console.error(...t), V(this, Ot, !0, "f"), y(this, dt, "f").length && V(this, dt, y(this, dt, "f") + `
3020
+ this[ve]() || console.error(...t), V(this, Ot, !0, "f"), y(this, dt, "f").length && V(this, dt, y(this, dt, "f") + `
3021
3021
  `, "f"), V(this, dt, y(this, dt, "f") + t.join(" "), "f");
3022
3022
  }
3023
3023
  };
@@ -3062,7 +3062,7 @@ class To {
3062
3062
  return y(this, _e, "f");
3063
3063
  }
3064
3064
  [Ii]() {
3065
- return y(this, ve, "f");
3065
+ return y(this, xe, "f");
3066
3066
  }
3067
3067
  [We]() {
3068
3068
  if (!y(this, Ht, "f"))
@@ -3174,12 +3174,12 @@ class To {
3174
3174
  } }.value
3175
3175
  } = b, y(this, G, "f").configObjects = O, y(this, tt, "f").unfreeze(), y(this, ot, "f").unfreeze(), y(this, ct, "f").unfreeze(), y(this, _t, "f").unfreeze();
3176
3176
  }
3177
- [vi](t, e) {
3177
+ [xi](t, e) {
3178
3178
  return me(e, (n) => (t(n), n));
3179
3179
  }
3180
3180
  getInternalMethods() {
3181
3181
  return {
3182
- getCommandInstance: this[xi].bind(this),
3182
+ getCommandInstance: this[vi].bind(this),
3183
3183
  getContext: this[Ni].bind(this),
3184
3184
  getHasOutput: this[Pi].bind(this),
3185
3185
  getLoggerInstance: this[Ai].bind(this),
@@ -3188,7 +3188,7 @@ class To {
3188
3188
  getUsageConfiguration: this[Ii].bind(this),
3189
3189
  getUsageInstance: this[Li].bind(this),
3190
3190
  getValidationInstance: this[Si].bind(this),
3191
- hasParseCallback: this[xe].bind(this),
3191
+ hasParseCallback: this[ve].bind(this),
3192
3192
  isGlobalContext: this[ji].bind(this),
3193
3193
  postProcess: this[Jt].bind(this),
3194
3194
  reset: this[ke].bind(this),
@@ -3197,7 +3197,7 @@ class To {
3197
3197
  setHasOutput: this[Ri].bind(this)
3198
3198
  };
3199
3199
  }
3200
- [xi]() {
3200
+ [vi]() {
3201
3201
  return y(this, ct, "f");
3202
3202
  }
3203
3203
  [Ni]() {
@@ -3218,7 +3218,7 @@ class To {
3218
3218
  [Si]() {
3219
3219
  return y(this, ot, "f");
3220
3220
  }
3221
- [xe]() {
3221
+ [ve]() {
3222
3222
  return !!y(this, Et, "f");
3223
3223
  }
3224
3224
  [ji]() {
@@ -3324,7 +3324,7 @@ class To {
3324
3324
  throw new ut(g.error.message);
3325
3325
  if (!w) {
3326
3326
  const C = this[Ke](h, {}, g.error);
3327
- n || (f = de(p, this, y(this, _t, "f").getMiddleware(), !0)), f = this[vi](C, f ?? p), lt(f) && !n && (f = f.then(() => de(p, this, y(this, _t, "f").getMiddleware(), !1)));
3327
+ n || (f = de(p, this, y(this, _t, "f").getMiddleware(), !0)), f = this[xi](C, f ?? p), lt(f) && !n && (f = f.then(() => de(p, this, y(this, _t, "f").getMiddleware(), !1)));
3328
3328
  }
3329
3329
  }
3330
3330
  } catch (D) {
@@ -3356,10 +3356,10 @@ class To {
3356
3356
  y(this, G, "f").key[e] = !0;
3357
3357
  }
3358
3358
  }
3359
- function vo(o) {
3359
+ function xo(o) {
3360
3360
  return !!o && typeof o.getInternalMethods == "function";
3361
3361
  }
3362
- const xo = _o(to);
3362
+ const vo = _o(to);
3363
3363
  var Qe = {}, Bi;
3364
3364
  function qn() {
3365
3365
  return Bi || (Bi = 1, function() {
@@ -3590,7 +3590,7 @@ var cn = { exports: {} }, Hi;
3590
3590
  function Hr() {
3591
3591
  return Hi || (Hi = 1, function() {
3592
3592
  var o;
3593
- o = ft(), xt(), cn.exports = function() {
3593
+ o = ft(), vt(), cn.exports = function() {
3594
3594
  function t(e, n, s) {
3595
3595
  if (this.parent = e, this.parent && (this.options = this.parent.options, this.stringify = this.parent.stringify), n == null)
3596
3596
  throw new Error("Missing attribute name. " + this.debugInfo(n));
@@ -3683,7 +3683,7 @@ function Hn() {
3683
3683
  }
3684
3684
  return b.prototype = f.prototype, p.prototype = new b(), p.__super__ = f.prototype, p;
3685
3685
  }, g = {}.hasOwnProperty;
3686
- a = Ut(), r = a.isObject, i = a.isFunction, s = a.getValue, n = xt(), o = ft(), t = Hr(), e = Vn(), on.exports = function(p) {
3686
+ a = Ut(), r = a.isObject, i = a.isFunction, s = a.getValue, n = vt(), o = ft(), t = Hr(), e = Vn(), on.exports = function(p) {
3687
3687
  c(f, p);
3688
3688
  function f(h, b, O) {
3689
3689
  var D, w, A, C;
@@ -3825,7 +3825,7 @@ function je() {
3825
3825
  }
3826
3826
  return r.prototype = s.prototype, n.prototype = new r(), n.__super__ = s.prototype, n;
3827
3827
  }, e = {}.hasOwnProperty;
3828
- o = xt(), fn.exports = function(n) {
3828
+ o = vt(), fn.exports = function(n) {
3829
3829
  t(s, n);
3830
3830
  function s(i) {
3831
3831
  s.__super__.constructor.call(this, i), this.value = "";
@@ -3929,7 +3929,7 @@ function Yn() {
3929
3929
  }
3930
3930
  return c.prototype = r.prototype, i.prototype = new c(), i.__super__ = r.prototype, i;
3931
3931
  }, s = {}.hasOwnProperty;
3932
- e = Ut().isObject, t = xt(), o = ft(), pn.exports = function(i) {
3932
+ e = Ut().isObject, t = vt(), o = ft(), pn.exports = function(i) {
3933
3933
  n(r, i);
3934
3934
  function r(a, c, g, p) {
3935
3935
  var f;
@@ -3952,7 +3952,7 @@ function kn() {
3952
3952
  }
3953
3953
  return a.prototype = i.prototype, s.prototype = new a(), s.__super__ = i.prototype, s;
3954
3954
  }, n = {}.hasOwnProperty;
3955
- t = xt(), o = ft(), mn.exports = function(s) {
3955
+ t = vt(), o = ft(), mn.exports = function(s) {
3956
3956
  e(i, s);
3957
3957
  function i(r, a, c, g, p, f) {
3958
3958
  if (i.__super__.constructor.call(this, r), a == null)
@@ -3986,7 +3986,7 @@ function Kn() {
3986
3986
  }
3987
3987
  return c.prototype = r.prototype, i.prototype = new c(), i.__super__ = r.prototype, i;
3988
3988
  }, s = {}.hasOwnProperty;
3989
- e = Ut().isObject, t = xt(), o = ft(), gn.exports = function(i) {
3989
+ e = Ut().isObject, t = vt(), o = ft(), gn.exports = function(i) {
3990
3990
  n(r, i);
3991
3991
  function r(a, c, g, p) {
3992
3992
  if (r.__super__.constructor.call(this, a), g == null)
@@ -4045,7 +4045,7 @@ function Qn() {
4045
4045
  }
4046
4046
  return a.prototype = i.prototype, s.prototype = new a(), s.__super__ = i.prototype, s;
4047
4047
  }, n = {}.hasOwnProperty;
4048
- t = xt(), o = ft(), yn.exports = function(s) {
4048
+ t = vt(), o = ft(), yn.exports = function(s) {
4049
4049
  e(i, s);
4050
4050
  function i(r, a, c) {
4051
4051
  if (i.__super__.constructor.call(this, r), a == null)
@@ -4069,7 +4069,7 @@ function Jn() {
4069
4069
  }
4070
4070
  return a.prototype = i.prototype, s.prototype = new a(), s.__super__ = i.prototype, s;
4071
4071
  }, n = {}.hasOwnProperty;
4072
- t = xt(), o = ft(), bn.exports = function(s) {
4072
+ t = vt(), o = ft(), bn.exports = function(s) {
4073
4073
  e(i, s);
4074
4074
  function i(r, a, c) {
4075
4075
  if (i.__super__.constructor.call(this, r), a == null)
@@ -4103,7 +4103,7 @@ function Zn() {
4103
4103
  }
4104
4104
  return b.prototype = f.prototype, p.prototype = new b(), p.__super__ = f.prototype, p;
4105
4105
  }, g = {}.hasOwnProperty;
4106
- a = Ut().isObject, r = xt(), o = ft(), t = kn(), n = Kn(), e = Qn(), s = Jn(), i = Vn(), dn.exports = function(p) {
4106
+ a = Ut().isObject, r = vt(), o = ft(), t = kn(), n = Kn(), e = Qn(), s = Jn(), i = Vn(), dn.exports = function(p) {
4107
4107
  c(f, p);
4108
4108
  function f(h, b, O) {
4109
4109
  var D, w, A, C, d, E;
@@ -4188,7 +4188,7 @@ function ti() {
4188
4188
  }
4189
4189
  return a.prototype = i.prototype, s.prototype = new a(), s.__super__ = i.prototype, s;
4190
4190
  }, n = {}.hasOwnProperty;
4191
- o = ft(), t = xt(), wn.exports = function(s) {
4191
+ o = ft(), t = vt(), wn.exports = function(s) {
4192
4192
  e(i, s);
4193
4193
  function i(r, a) {
4194
4194
  if (i.__super__.constructor.call(this, r), a == null)
@@ -4285,7 +4285,7 @@ function zr() {
4285
4285
  }
4286
4286
  return a.prototype = i.prototype, s.prototype = new a(), s.__super__ = i.prototype, s;
4287
4287
  }, n = {}.hasOwnProperty;
4288
- t = xt(), o = ft(), Dn.exports = function(s) {
4288
+ t = vt(), o = ft(), Dn.exports = function(s) {
4289
4289
  e(i, s);
4290
4290
  function i(r) {
4291
4291
  i.__super__.constructor.call(this, r), this.type = o.Dummy;
@@ -4331,7 +4331,7 @@ function Lo() {
4331
4331
  }.call(et)), In.exports;
4332
4332
  }
4333
4333
  var ur;
4334
- function xt() {
4334
+ function vt() {
4335
4335
  return ur || (ur = 1, function() {
4336
4336
  var o, t, e, n, s, i, r, a, c, g, p, f, h, b, O, D, w, A = {}.hasOwnProperty;
4337
4337
  w = Ut(), D = w.isObject, O = w.isFunction, b = w.isEmpty, h = w.getValue, a = null, e = null, n = null, s = null, i = null, p = null, f = null, g = null, r = null, t = null, c = null, o = null, sn.exports = function() {
@@ -4399,7 +4399,7 @@ function xt() {
4399
4399
  E = U[T], j.push(E.setParent(this));
4400
4400
  return j;
4401
4401
  }, C.prototype.element = function(d, E, T) {
4402
- var F, U, j, u, M, N, L, B, X, Y, k;
4402
+ var F, U, j, l, M, N, L, B, X, Y, k;
4403
4403
  if (N = null, E === null && T == null && (X = [{}, null], E = X[0], T = X[1]), E == null && (E = {}), E = h(E), D(E) || (Y = [E, T], T = Y[0], E = Y[1]), d != null && (d = h(d)), Array.isArray(d))
4404
4404
  for (j = 0, L = d.length; j < L; j++)
4405
4405
  U = d[j], N = this.element(U);
@@ -4417,17 +4417,17 @@ function xt() {
4417
4417
  else if (!this.options.keepNullNodes && k == null)
4418
4418
  N = this.dummy();
4419
4419
  else if (!this.options.separateArrayItems && Array.isArray(k))
4420
- for (u = 0, B = k.length; u < B; u++)
4421
- U = k[u], F = {}, F[M] = U, N = this.element(F);
4420
+ for (l = 0, B = k.length; l < B; l++)
4421
+ U = k[l], F = {}, F[M] = U, N = this.element(F);
4422
4422
  else D(k) ? !this.options.ignoreDecorators && this.stringify.convertTextKey && M.indexOf(this.stringify.convertTextKey) === 0 ? N = this.element(k) : (N = this.element(M), N.element(k)) : N = this.element(M, k);
4423
4423
  } else !this.options.keepNullNodes && T === null ? N = this.dummy() : !this.options.ignoreDecorators && this.stringify.convertTextKey && d.indexOf(this.stringify.convertTextKey) === 0 ? N = this.text(T) : !this.options.ignoreDecorators && this.stringify.convertCDataKey && d.indexOf(this.stringify.convertCDataKey) === 0 ? N = this.cdata(T) : !this.options.ignoreDecorators && this.stringify.convertCommentKey && d.indexOf(this.stringify.convertCommentKey) === 0 ? N = this.comment(T) : !this.options.ignoreDecorators && this.stringify.convertRawKey && d.indexOf(this.stringify.convertRawKey) === 0 ? N = this.raw(T) : !this.options.ignoreDecorators && this.stringify.convertPIKey && d.indexOf(this.stringify.convertPIKey) === 0 ? N = this.instruction(d.substr(this.stringify.convertPIKey.length), T) : N = this.node(d, E, T);
4424
4424
  if (N == null)
4425
4425
  throw new Error("Could not create any elements with: " + d + ". " + this.debugInfo());
4426
4426
  return N;
4427
4427
  }, C.prototype.insertBefore = function(d, E, T) {
4428
- var F, U, j, u, M;
4428
+ var F, U, j, l, M;
4429
4429
  if (d?.type)
4430
- return j = d, u = E, j.setParent(this), u ? (U = children.indexOf(u), M = children.splice(U), children.push(j), Array.prototype.push.apply(children, M)) : children.push(j), j;
4430
+ return j = d, l = E, j.setParent(this), l ? (U = children.indexOf(l), M = children.splice(U), children.push(j), Array.prototype.push.apply(children, M)) : children.push(j), j;
4431
4431
  if (this.isRoot)
4432
4432
  throw new Error("Cannot insert elements at root level. " + this.debugInfo(d));
4433
4433
  return U = this.parent.children.indexOf(this), M = this.parent.children.splice(U), F = this.parent.element(d, E, T), Array.prototype.push.apply(this.parent.children, M), F;
@@ -4466,9 +4466,9 @@ function xt() {
4466
4466
  var d;
4467
4467
  return d = new r(this), d;
4468
4468
  }, C.prototype.instruction = function(d, E) {
4469
- var T, F, U, j, u;
4469
+ var T, F, U, j, l;
4470
4470
  if (d != null && (d = h(d)), E != null && (E = h(E)), Array.isArray(d))
4471
- for (j = 0, u = d.length; j < u; j++)
4471
+ for (j = 0, l = d.length; j < l; j++)
4472
4472
  T = d[j], this.instruction(T);
4473
4473
  else if (D(d))
4474
4474
  for (T in d)
@@ -4486,8 +4486,8 @@ function xt() {
4486
4486
  var F, U;
4487
4487
  return F = this.document(), U = new s(F, d, E, T), F.children.length === 0 ? F.children.unshift(U) : F.children[0].type === t.Declaration ? F.children[0] = U : F.children.unshift(U), F.root() || F;
4488
4488
  }, C.prototype.dtd = function(d, E) {
4489
- var T, F, U, j, u, M, N, L, B, X;
4490
- for (F = this.document(), U = new i(F, d, E), B = F.children, j = u = 0, N = B.length; u < N; j = ++u)
4489
+ var T, F, U, j, l, M, N, L, B, X;
4490
+ for (F = this.document(), U = new i(F, d, E), B = F.children, j = l = 0, N = B.length; l < N; j = ++l)
4491
4491
  if (T = B[j], T.type === t.DocType)
4492
4492
  return F.children[j] = U, U;
4493
4493
  for (X = F.children, j = M = 0, L = X.length; M < L; j = ++M)
@@ -4630,12 +4630,12 @@ function xt() {
4630
4630
  return E = !0;
4631
4631
  }), E ? T : -1;
4632
4632
  }, C.prototype.foreachTreeNode = function(d, E) {
4633
- var T, F, U, j, u;
4633
+ var T, F, U, j, l;
4634
4634
  for (d || (d = this.document()), j = d.children, F = 0, U = j.length; F < U; F++) {
4635
- if (T = j[F], u = E(T))
4636
- return u;
4637
- if (u = this.foreachTreeNode(T, E), u)
4638
- return u;
4635
+ if (T = j[F], l = E(T))
4636
+ return l;
4637
+ if (l = this.foreachTreeNode(T, E), l)
4638
+ return l;
4639
4639
  }
4640
4640
  }, C;
4641
4641
  }();
@@ -4736,22 +4736,22 @@ function Gr() {
4736
4736
  }();
4737
4737
  }.call(et)), _n.exports;
4738
4738
  }
4739
- var Tn = { exports: {} }, vn = { exports: {} }, xn = { exports: {} }, fr;
4739
+ var Tn = { exports: {} }, xn = { exports: {} }, vn = { exports: {} }, fr;
4740
4740
  function Fe() {
4741
4741
  return fr || (fr = 1, function() {
4742
- xn.exports = {
4742
+ vn.exports = {
4743
4743
  None: 0,
4744
4744
  OpenTag: 1,
4745
4745
  InsideTag: 2,
4746
4746
  CloseTag: 3
4747
4747
  };
4748
- }.call(et)), xn.exports;
4748
+ }.call(et)), vn.exports;
4749
4749
  }
4750
4750
  var hr;
4751
4751
  function Yr() {
4752
4752
  return hr || (hr = 1, function() {
4753
4753
  var o, t, e, n = {}.hasOwnProperty;
4754
- e = Ut().assign, o = ft(), Yn(), Zn(), zn(), Gn(), Hn(), ti(), ei(), ni(), zr(), kn(), Qn(), Kn(), Jn(), t = Fe(), vn.exports = function() {
4754
+ e = Ut().assign, o = ft(), Yn(), Zn(), zn(), Gn(), Hn(), ti(), ei(), ni(), zr(), kn(), Qn(), Kn(), Jn(), t = Fe(), xn.exports = function() {
4755
4755
  function s(i) {
4756
4756
  var r, a, c;
4757
4757
  i || (i = {}), this.options = i, a = i.writer || {};
@@ -4871,7 +4871,7 @@ function Yr() {
4871
4871
  }, s.prototype.closeAttribute = function(i, r, a) {
4872
4872
  }, s;
4873
4873
  }();
4874
- }.call(et)), vn.exports;
4874
+ }.call(et)), xn.exports;
4875
4875
  }
4876
4876
  var pr;
4877
4877
  function ii() {
@@ -4909,7 +4909,7 @@ function kr() {
4909
4909
  }
4910
4910
  return h.prototype = p.prototype, g.prototype = new h(), g.__super__ = p.prototype, g;
4911
4911
  }, c = {}.hasOwnProperty;
4912
- r = Ut().isPlainObject, e = Vr(), t = Ao(), n = xt(), o = ft(), i = Gr(), s = ii(), tn.exports = function(g) {
4912
+ r = Ut().isPlainObject, e = Vr(), t = Ao(), n = vt(), o = ft(), i = Gr(), s = ii(), tn.exports = function(g) {
4913
4913
  a(p, g);
4914
4914
  function p(f) {
4915
4915
  p.__super__.constructor.call(this, null), this.name = "#document", this.type = o.Document, this.documentURI = null, this.domConfig = new t(), f || (f = {}), f.writer || (f.writer = new s()), this.options = f, this.stringify = new i(f);
@@ -5026,123 +5026,123 @@ function So() {
5026
5026
  return mr || (mr = 1, function() {
5027
5027
  var o, t, e, n, s, i, r, a, c, g, p, f, h, b, O, D, w, A, C, d, E, T, F, U = {}.hasOwnProperty;
5028
5028
  F = Ut(), E = F.isObject, d = F.isFunction, T = F.isPlainObject, C = F.getValue, o = ft(), f = kr(), h = Hn(), n = zn(), s = Gn(), O = ti(), A = ei(), b = ni(), g = Yn(), p = Zn(), i = kn(), a = Kn(), r = Qn(), c = Jn(), e = Hr(), w = Gr(), D = ii(), t = Fe(), Nn.exports = function() {
5029
- function j(u, M, N) {
5029
+ function j(l, M, N) {
5030
5030
  var L;
5031
- this.name = "?xml", this.type = o.Document, u || (u = {}), L = {}, u.writer ? T(u.writer) && (L = u.writer, u.writer = new D()) : u.writer = new D(), this.options = u, this.writer = u.writer, this.writerOptions = this.writer.filterOptions(L), this.stringify = new w(u), this.onDataCallback = M || function() {
5031
+ this.name = "?xml", this.type = o.Document, l || (l = {}), L = {}, l.writer ? T(l.writer) && (L = l.writer, l.writer = new D()) : l.writer = new D(), this.options = l, this.writer = l.writer, this.writerOptions = this.writer.filterOptions(L), this.stringify = new w(l), this.onDataCallback = M || function() {
5032
5032
  }, this.onEndCallback = N || function() {
5033
5033
  }, this.currentNode = null, this.currentLevel = -1, this.openTags = {}, this.documentStarted = !1, this.documentCompleted = !1, this.root = null;
5034
5034
  }
5035
- return j.prototype.createChildNode = function(u) {
5035
+ return j.prototype.createChildNode = function(l) {
5036
5036
  var M, N, L, B, X, Y, k, W;
5037
- switch (u.type) {
5037
+ switch (l.type) {
5038
5038
  case o.CData:
5039
- this.cdata(u.value);
5039
+ this.cdata(l.value);
5040
5040
  break;
5041
5041
  case o.Comment:
5042
- this.comment(u.value);
5042
+ this.comment(l.value);
5043
5043
  break;
5044
5044
  case o.Element:
5045
- L = {}, k = u.attribs;
5045
+ L = {}, k = l.attribs;
5046
5046
  for (N in k)
5047
5047
  U.call(k, N) && (M = k[N], L[N] = M.value);
5048
- this.node(u.name, L);
5048
+ this.node(l.name, L);
5049
5049
  break;
5050
5050
  case o.Dummy:
5051
5051
  this.dummy();
5052
5052
  break;
5053
5053
  case o.Raw:
5054
- this.raw(u.value);
5054
+ this.raw(l.value);
5055
5055
  break;
5056
5056
  case o.Text:
5057
- this.text(u.value);
5057
+ this.text(l.value);
5058
5058
  break;
5059
5059
  case o.ProcessingInstruction:
5060
- this.instruction(u.target, u.value);
5060
+ this.instruction(l.target, l.value);
5061
5061
  break;
5062
5062
  default:
5063
- throw new Error("This XML node type is not supported in a JS object: " + u.constructor.name);
5063
+ throw new Error("This XML node type is not supported in a JS object: " + l.constructor.name);
5064
5064
  }
5065
- for (W = u.children, X = 0, Y = W.length; X < Y; X++)
5065
+ for (W = l.children, X = 0, Y = W.length; X < Y; X++)
5066
5066
  B = W[X], this.createChildNode(B), B.type === o.Element && this.up();
5067
5067
  return this;
5068
5068
  }, j.prototype.dummy = function() {
5069
5069
  return this;
5070
- }, j.prototype.node = function(u, M, N) {
5070
+ }, j.prototype.node = function(l, M, N) {
5071
5071
  var L;
5072
- if (u == null)
5072
+ if (l == null)
5073
5073
  throw new Error("Missing node name.");
5074
5074
  if (this.root && this.currentLevel === -1)
5075
- throw new Error("Document can only have one root node. " + this.debugInfo(u));
5076
- return this.openCurrent(), u = C(u), M == null && (M = {}), M = C(M), E(M) || (L = [M, N], N = L[0], M = L[1]), this.currentNode = new h(this, u, M), this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, N != null && this.text(N), this;
5077
- }, j.prototype.element = function(u, M, N) {
5075
+ throw new Error("Document can only have one root node. " + this.debugInfo(l));
5076
+ return this.openCurrent(), l = C(l), M == null && (M = {}), M = C(M), E(M) || (L = [M, N], N = L[0], M = L[1]), this.currentNode = new h(this, l, M), this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, N != null && this.text(N), this;
5077
+ }, j.prototype.element = function(l, M, N) {
5078
5078
  var L, B, X, Y, k, W;
5079
5079
  if (this.currentNode && this.currentNode.type === o.DocType)
5080
5080
  this.dtdElement.apply(this, arguments);
5081
- else if (Array.isArray(u) || E(u) || d(u))
5082
- for (Y = this.options.noValidation, this.options.noValidation = !0, W = new f(this.options).element("TEMP_ROOT"), W.element(u), this.options.noValidation = Y, k = W.children, B = 0, X = k.length; B < X; B++)
5081
+ else if (Array.isArray(l) || E(l) || d(l))
5082
+ for (Y = this.options.noValidation, this.options.noValidation = !0, W = new f(this.options).element("TEMP_ROOT"), W.element(l), this.options.noValidation = Y, k = W.children, B = 0, X = k.length; B < X; B++)
5083
5083
  L = k[B], this.createChildNode(L), L.type === o.Element && this.up();
5084
5084
  else
5085
- this.node(u, M, N);
5085
+ this.node(l, M, N);
5086
5086
  return this;
5087
- }, j.prototype.attribute = function(u, M) {
5087
+ }, j.prototype.attribute = function(l, M) {
5088
5088
  var N, L;
5089
5089
  if (!this.currentNode || this.currentNode.children)
5090
- throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(u));
5091
- if (u != null && (u = C(u)), E(u))
5092
- for (N in u)
5093
- U.call(u, N) && (L = u[N], this.attribute(N, L));
5090
+ throw new Error("att() can only be used immediately after an ele() call in callback mode. " + this.debugInfo(l));
5091
+ if (l != null && (l = C(l)), E(l))
5092
+ for (N in l)
5093
+ U.call(l, N) && (L = l[N], this.attribute(N, L));
5094
5094
  else
5095
- d(M) && (M = M.apply()), this.options.keepNullAttributes && M == null ? this.currentNode.attribs[u] = new e(this, u, "") : M != null && (this.currentNode.attribs[u] = new e(this, u, M));
5095
+ d(M) && (M = M.apply()), this.options.keepNullAttributes && M == null ? this.currentNode.attribs[l] = new e(this, l, "") : M != null && (this.currentNode.attribs[l] = new e(this, l, M));
5096
5096
  return this;
5097
- }, j.prototype.text = function(u) {
5097
+ }, j.prototype.text = function(l) {
5098
5098
  var M;
5099
- return this.openCurrent(), M = new A(this, u), this.onData(this.writer.text(M, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5100
- }, j.prototype.cdata = function(u) {
5099
+ return this.openCurrent(), M = new A(this, l), this.onData(this.writer.text(M, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5100
+ }, j.prototype.cdata = function(l) {
5101
5101
  var M;
5102
- return this.openCurrent(), M = new n(this, u), this.onData(this.writer.cdata(M, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5103
- }, j.prototype.comment = function(u) {
5102
+ return this.openCurrent(), M = new n(this, l), this.onData(this.writer.cdata(M, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5103
+ }, j.prototype.comment = function(l) {
5104
5104
  var M;
5105
- return this.openCurrent(), M = new s(this, u), this.onData(this.writer.comment(M, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5106
- }, j.prototype.raw = function(u) {
5105
+ return this.openCurrent(), M = new s(this, l), this.onData(this.writer.comment(M, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5106
+ }, j.prototype.raw = function(l) {
5107
5107
  var M;
5108
- return this.openCurrent(), M = new O(this, u), this.onData(this.writer.raw(M, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5109
- }, j.prototype.instruction = function(u, M) {
5108
+ return this.openCurrent(), M = new O(this, l), this.onData(this.writer.raw(M, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5109
+ }, j.prototype.instruction = function(l, M) {
5110
5110
  var N, L, B, X, Y;
5111
- if (this.openCurrent(), u != null && (u = C(u)), M != null && (M = C(M)), Array.isArray(u))
5112
- for (N = 0, X = u.length; N < X; N++)
5113
- L = u[N], this.instruction(L);
5114
- else if (E(u))
5115
- for (L in u)
5116
- U.call(u, L) && (B = u[L], this.instruction(L, B));
5111
+ if (this.openCurrent(), l != null && (l = C(l)), M != null && (M = C(M)), Array.isArray(l))
5112
+ for (N = 0, X = l.length; N < X; N++)
5113
+ L = l[N], this.instruction(L);
5114
+ else if (E(l))
5115
+ for (L in l)
5116
+ U.call(l, L) && (B = l[L], this.instruction(L, B));
5117
5117
  else
5118
- d(M) && (M = M.apply()), Y = new b(this, u, M), this.onData(this.writer.processingInstruction(Y, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
5118
+ d(M) && (M = M.apply()), Y = new b(this, l, M), this.onData(this.writer.processingInstruction(Y, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);
5119
5119
  return this;
5120
- }, j.prototype.declaration = function(u, M, N) {
5120
+ }, j.prototype.declaration = function(l, M, N) {
5121
5121
  var L;
5122
5122
  if (this.openCurrent(), this.documentStarted)
5123
5123
  throw new Error("declaration() must be the first node.");
5124
- return L = new g(this, u, M, N), this.onData(this.writer.declaration(L, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5125
- }, j.prototype.doctype = function(u, M, N) {
5126
- if (this.openCurrent(), u == null)
5124
+ return L = new g(this, l, M, N), this.onData(this.writer.declaration(L, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5125
+ }, j.prototype.doctype = function(l, M, N) {
5126
+ if (this.openCurrent(), l == null)
5127
5127
  throw new Error("Missing root node name.");
5128
5128
  if (this.root)
5129
5129
  throw new Error("dtd() must come before the root node.");
5130
- return this.currentNode = new p(this, M, N), this.currentNode.rootNodeName = u, this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, this;
5131
- }, j.prototype.dtdElement = function(u, M) {
5130
+ return this.currentNode = new p(this, M, N), this.currentNode.rootNodeName = l, this.currentNode.children = !1, this.currentLevel++, this.openTags[this.currentLevel] = this.currentNode, this;
5131
+ }, j.prototype.dtdElement = function(l, M) {
5132
5132
  var N;
5133
- return this.openCurrent(), N = new r(this, u, M), this.onData(this.writer.dtdElement(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5134
- }, j.prototype.attList = function(u, M, N, L, B) {
5133
+ return this.openCurrent(), N = new r(this, l, M), this.onData(this.writer.dtdElement(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5134
+ }, j.prototype.attList = function(l, M, N, L, B) {
5135
5135
  var X;
5136
- return this.openCurrent(), X = new i(this, u, M, N, L, B), this.onData(this.writer.dtdAttList(X, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5137
- }, j.prototype.entity = function(u, M) {
5136
+ return this.openCurrent(), X = new i(this, l, M, N, L, B), this.onData(this.writer.dtdAttList(X, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5137
+ }, j.prototype.entity = function(l, M) {
5138
5138
  var N;
5139
- return this.openCurrent(), N = new a(this, !1, u, M), this.onData(this.writer.dtdEntity(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5140
- }, j.prototype.pEntity = function(u, M) {
5139
+ return this.openCurrent(), N = new a(this, !1, l, M), this.onData(this.writer.dtdEntity(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5140
+ }, j.prototype.pEntity = function(l, M) {
5141
5141
  var N;
5142
- return this.openCurrent(), N = new a(this, !0, u, M), this.onData(this.writer.dtdEntity(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5143
- }, j.prototype.notation = function(u, M) {
5142
+ return this.openCurrent(), N = new a(this, !0, l, M), this.onData(this.writer.dtdEntity(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5143
+ }, j.prototype.notation = function(l, M) {
5144
5144
  var N;
5145
- return this.openCurrent(), N = new c(this, u, M), this.onData(this.writer.dtdNotation(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5145
+ return this.openCurrent(), N = new c(this, l, M), this.onData(this.writer.dtdNotation(N, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1), this;
5146
5146
  }, j.prototype.up = function() {
5147
5147
  if (this.currentLevel < 0)
5148
5148
  throw new Error("The document node has no parent.");
@@ -5154,68 +5154,68 @@ function So() {
5154
5154
  }, j.prototype.openCurrent = function() {
5155
5155
  if (this.currentNode)
5156
5156
  return this.currentNode.children = !0, this.openNode(this.currentNode);
5157
- }, j.prototype.openNode = function(u) {
5157
+ }, j.prototype.openNode = function(l) {
5158
5158
  var M, N, L, B;
5159
- if (!u.isOpen) {
5160
- if (!this.root && this.currentLevel === 0 && u.type === o.Element && (this.root = u), N = "", u.type === o.Element) {
5161
- this.writerOptions.state = t.OpenTag, N = this.writer.indent(u, this.writerOptions, this.currentLevel) + "<" + u.name, B = u.attribs;
5159
+ if (!l.isOpen) {
5160
+ if (!this.root && this.currentLevel === 0 && l.type === o.Element && (this.root = l), N = "", l.type === o.Element) {
5161
+ this.writerOptions.state = t.OpenTag, N = this.writer.indent(l, this.writerOptions, this.currentLevel) + "<" + l.name, B = l.attribs;
5162
5162
  for (L in B)
5163
5163
  U.call(B, L) && (M = B[L], N += this.writer.attribute(M, this.writerOptions, this.currentLevel));
5164
- N += (u.children ? ">" : "/>") + this.writer.endline(u, this.writerOptions, this.currentLevel), this.writerOptions.state = t.InsideTag;
5164
+ N += (l.children ? ">" : "/>") + this.writer.endline(l, this.writerOptions, this.currentLevel), this.writerOptions.state = t.InsideTag;
5165
5165
  } else
5166
- this.writerOptions.state = t.OpenTag, N = this.writer.indent(u, this.writerOptions, this.currentLevel) + "<!DOCTYPE " + u.rootNodeName, u.pubID && u.sysID ? N += ' PUBLIC "' + u.pubID + '" "' + u.sysID + '"' : u.sysID && (N += ' SYSTEM "' + u.sysID + '"'), u.children ? (N += " [", this.writerOptions.state = t.InsideTag) : (this.writerOptions.state = t.CloseTag, N += ">"), N += this.writer.endline(u, this.writerOptions, this.currentLevel);
5167
- return this.onData(N, this.currentLevel), u.isOpen = !0;
5166
+ this.writerOptions.state = t.OpenTag, N = this.writer.indent(l, this.writerOptions, this.currentLevel) + "<!DOCTYPE " + l.rootNodeName, l.pubID && l.sysID ? N += ' PUBLIC "' + l.pubID + '" "' + l.sysID + '"' : l.sysID && (N += ' SYSTEM "' + l.sysID + '"'), l.children ? (N += " [", this.writerOptions.state = t.InsideTag) : (this.writerOptions.state = t.CloseTag, N += ">"), N += this.writer.endline(l, this.writerOptions, this.currentLevel);
5167
+ return this.onData(N, this.currentLevel), l.isOpen = !0;
5168
5168
  }
5169
- }, j.prototype.closeNode = function(u) {
5169
+ }, j.prototype.closeNode = function(l) {
5170
5170
  var M;
5171
- if (!u.isClosed)
5172
- return M = "", this.writerOptions.state = t.CloseTag, u.type === o.Element ? M = this.writer.indent(u, this.writerOptions, this.currentLevel) + "</" + u.name + ">" + this.writer.endline(u, this.writerOptions, this.currentLevel) : M = this.writer.indent(u, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(u, this.writerOptions, this.currentLevel), this.writerOptions.state = t.None, this.onData(M, this.currentLevel), u.isClosed = !0;
5173
- }, j.prototype.onData = function(u, M) {
5174
- return this.documentStarted = !0, this.onDataCallback(u, M + 1);
5171
+ if (!l.isClosed)
5172
+ return M = "", this.writerOptions.state = t.CloseTag, l.type === o.Element ? M = this.writer.indent(l, this.writerOptions, this.currentLevel) + "</" + l.name + ">" + this.writer.endline(l, this.writerOptions, this.currentLevel) : M = this.writer.indent(l, this.writerOptions, this.currentLevel) + "]>" + this.writer.endline(l, this.writerOptions, this.currentLevel), this.writerOptions.state = t.None, this.onData(M, this.currentLevel), l.isClosed = !0;
5173
+ }, j.prototype.onData = function(l, M) {
5174
+ return this.documentStarted = !0, this.onDataCallback(l, M + 1);
5175
5175
  }, j.prototype.onEnd = function() {
5176
5176
  return this.documentCompleted = !0, this.onEndCallback();
5177
- }, j.prototype.debugInfo = function(u) {
5178
- return u == null ? "" : "node: <" + u + ">";
5177
+ }, j.prototype.debugInfo = function(l) {
5178
+ return l == null ? "" : "node: <" + l + ">";
5179
5179
  }, j.prototype.ele = function() {
5180
5180
  return this.element.apply(this, arguments);
5181
- }, j.prototype.nod = function(u, M, N) {
5182
- return this.node(u, M, N);
5183
- }, j.prototype.txt = function(u) {
5184
- return this.text(u);
5185
- }, j.prototype.dat = function(u) {
5186
- return this.cdata(u);
5187
- }, j.prototype.com = function(u) {
5188
- return this.comment(u);
5189
- }, j.prototype.ins = function(u, M) {
5190
- return this.instruction(u, M);
5191
- }, j.prototype.dec = function(u, M, N) {
5192
- return this.declaration(u, M, N);
5193
- }, j.prototype.dtd = function(u, M, N) {
5194
- return this.doctype(u, M, N);
5195
- }, j.prototype.e = function(u, M, N) {
5196
- return this.element(u, M, N);
5197
- }, j.prototype.n = function(u, M, N) {
5198
- return this.node(u, M, N);
5199
- }, j.prototype.t = function(u) {
5200
- return this.text(u);
5201
- }, j.prototype.d = function(u) {
5202
- return this.cdata(u);
5203
- }, j.prototype.c = function(u) {
5204
- return this.comment(u);
5205
- }, j.prototype.r = function(u) {
5206
- return this.raw(u);
5207
- }, j.prototype.i = function(u, M) {
5208
- return this.instruction(u, M);
5181
+ }, j.prototype.nod = function(l, M, N) {
5182
+ return this.node(l, M, N);
5183
+ }, j.prototype.txt = function(l) {
5184
+ return this.text(l);
5185
+ }, j.prototype.dat = function(l) {
5186
+ return this.cdata(l);
5187
+ }, j.prototype.com = function(l) {
5188
+ return this.comment(l);
5189
+ }, j.prototype.ins = function(l, M) {
5190
+ return this.instruction(l, M);
5191
+ }, j.prototype.dec = function(l, M, N) {
5192
+ return this.declaration(l, M, N);
5193
+ }, j.prototype.dtd = function(l, M, N) {
5194
+ return this.doctype(l, M, N);
5195
+ }, j.prototype.e = function(l, M, N) {
5196
+ return this.element(l, M, N);
5197
+ }, j.prototype.n = function(l, M, N) {
5198
+ return this.node(l, M, N);
5199
+ }, j.prototype.t = function(l) {
5200
+ return this.text(l);
5201
+ }, j.prototype.d = function(l) {
5202
+ return this.cdata(l);
5203
+ }, j.prototype.c = function(l) {
5204
+ return this.comment(l);
5205
+ }, j.prototype.r = function(l) {
5206
+ return this.raw(l);
5207
+ }, j.prototype.i = function(l, M) {
5208
+ return this.instruction(l, M);
5209
5209
  }, j.prototype.att = function() {
5210
5210
  return this.currentNode && this.currentNode.type === o.DocType ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments);
5211
5211
  }, j.prototype.a = function() {
5212
5212
  return this.currentNode && this.currentNode.type === o.DocType ? this.attList.apply(this, arguments) : this.attribute.apply(this, arguments);
5213
- }, j.prototype.ent = function(u, M) {
5214
- return this.entity(u, M);
5215
- }, j.prototype.pent = function(u, M) {
5216
- return this.pEntity(u, M);
5217
- }, j.prototype.not = function(u, M) {
5218
- return this.notation(u, M);
5213
+ }, j.prototype.ent = function(l, M) {
5214
+ return this.entity(l, M);
5215
+ }, j.prototype.pent = function(l, M) {
5216
+ return this.pEntity(l, M);
5217
+ }, j.prototype.not = function(l, M) {
5218
+ return this.notation(l, M);
5219
5219
  }, j;
5220
5220
  }();
5221
5221
  }.call(et)), Nn.exports;
@@ -5375,8 +5375,8 @@ var An = {}, Mn = {}, wr;
5375
5375
  function Bo() {
5376
5376
  return wr || (wr = 1, function(o) {
5377
5377
  (function(t) {
5378
- t.parser = function(m, l) {
5379
- return new n(m, l);
5378
+ t.parser = function(m, u) {
5379
+ return new n(m, u);
5380
5380
  }, t.SAXParser = n, t.SAXStream = p, t.createStream = g, t.MAX_BUFFER_LENGTH = 64 * 1024;
5381
5381
  var e = [
5382
5382
  "comment",
@@ -5412,27 +5412,27 @@ function Bo() {
5412
5412
  "opennamespace",
5413
5413
  "closenamespace"
5414
5414
  ];
5415
- function n(m, l) {
5415
+ function n(m, u) {
5416
5416
  if (!(this instanceof n))
5417
- return new n(m, l);
5417
+ return new n(m, u);
5418
5418
  var P = this;
5419
- i(P), P.q = P.c = "", P.bufferCheckPosition = t.MAX_BUFFER_LENGTH, P.opt = l || {}, P.opt.lowercase = P.opt.lowercase || P.opt.lowercasetags, P.looseCase = P.opt.lowercase ? "toLowerCase" : "toUpperCase", P.tags = [], P.closed = P.closedRoot = P.sawRoot = !1, P.tag = P.error = null, P.strict = !!m, P.noscript = !!(m || P.opt.noscript), P.state = u.BEGIN, P.strictEntities = P.opt.strictEntities, P.ENTITIES = P.strictEntities ? Object.create(t.XML_ENTITIES) : Object.create(t.ENTITIES), P.attribList = [], P.opt.xmlns && (P.ns = Object.create(D)), P.opt.unquotedAttributeValues === void 0 && (P.opt.unquotedAttributeValues = !m), P.trackPosition = P.opt.position !== !1, P.trackPosition && (P.position = P.line = P.column = 0), N(P, "onready");
5419
+ i(P), P.q = P.c = "", P.bufferCheckPosition = t.MAX_BUFFER_LENGTH, P.opt = u || {}, P.opt.lowercase = P.opt.lowercase || P.opt.lowercasetags, P.looseCase = P.opt.lowercase ? "toLowerCase" : "toUpperCase", P.opt.maxEntityCount = P.opt.maxEntityCount || 512, P.opt.maxEntityDepth = P.opt.maxEntityDepth || 4, P.entityCount = P.entityDepth = 0, P.tags = [], P.closed = P.closedRoot = P.sawRoot = !1, P.tag = P.error = null, P.strict = !!m, P.noscript = !!(m || P.opt.noscript), P.state = l.BEGIN, P.strictEntities = P.opt.strictEntities, P.ENTITIES = P.strictEntities ? Object.create(t.XML_ENTITIES) : Object.create(t.ENTITIES), P.attribList = [], P.opt.xmlns && (P.ns = Object.create(D)), P.opt.unquotedAttributeValues === void 0 && (P.opt.unquotedAttributeValues = !m), P.trackPosition = P.opt.position !== !1, P.trackPosition && (P.position = P.line = P.column = 0), N(P, "onready");
5420
5420
  }
5421
5421
  Object.create || (Object.create = function(m) {
5422
- function l() {
5422
+ function u() {
5423
5423
  }
5424
- l.prototype = m;
5425
- var P = new l();
5424
+ u.prototype = m;
5425
+ var P = new u();
5426
5426
  return P;
5427
5427
  }), Object.keys || (Object.keys = function(m) {
5428
- var l = [];
5429
- for (var P in m) m.hasOwnProperty(P) && l.push(P);
5430
- return l;
5428
+ var u = [];
5429
+ for (var P in m) m.hasOwnProperty(P) && u.push(P);
5430
+ return u;
5431
5431
  });
5432
5432
  function s(m) {
5433
- for (var l = Math.max(t.MAX_BUFFER_LENGTH, 10), P = 0, _ = 0, J = e.length; _ < J; _++) {
5433
+ for (var u = Math.max(t.MAX_BUFFER_LENGTH, 10), P = 0, _ = 0, J = e.length; _ < J; _++) {
5434
5434
  var nt = m[e[_]].length;
5435
- if (nt > l)
5435
+ if (nt > u)
5436
5436
  switch (e[_]) {
5437
5437
  case "textNode":
5438
5438
  B(m);
@@ -5452,8 +5452,8 @@ function Bo() {
5452
5452
  m.bufferCheckPosition = it + m.position;
5453
5453
  }
5454
5454
  function i(m) {
5455
- for (var l = 0, P = e.length; l < P; l++)
5456
- m[e[l]] = "";
5455
+ for (var u = 0, P = e.length; u < P; u++)
5456
+ m[e[u]] = "";
5457
5457
  }
5458
5458
  function r(m) {
5459
5459
  B(m), m.cdata !== "" && (L(m, "oncdata", m.cdata), m.cdata = ""), m.script !== "" && (L(m, "onscript", m.script), m.script = "");
@@ -5485,13 +5485,13 @@ function Bo() {
5485
5485
  var c = t.EVENTS.filter(function(m) {
5486
5486
  return m !== "error" && m !== "end";
5487
5487
  });
5488
- function g(m, l) {
5489
- return new p(m, l);
5488
+ function g(m, u) {
5489
+ return new p(m, u);
5490
5490
  }
5491
- function p(m, l) {
5491
+ function p(m, u) {
5492
5492
  if (!(this instanceof p))
5493
- return new p(m, l);
5494
- a.apply(this), this._parser = new n(m, l), this.writable = !0, this.readable = !0;
5493
+ return new p(m, u);
5494
+ a.apply(this), this._parser = new n(m, u), this.writable = !0, this.readable = !0;
5495
5495
  var P = this;
5496
5496
  this._parser.onend = function() {
5497
5497
  P.emit("end");
@@ -5520,16 +5520,16 @@ function Bo() {
5520
5520
  return typeof Buffer == "function" && typeof Buffer.isBuffer == "function" && Buffer.isBuffer(m) && (this._decoder || (this._decoder = new TextDecoder("utf8")), m = this._decoder.decode(m, { stream: !0 })), this._parser.write(m.toString()), this.emit("data", m), !0;
5521
5521
  }, p.prototype.end = function(m) {
5522
5522
  if (m && m.length && this.write(m), this._decoder) {
5523
- var l = this._decoder.decode();
5524
- l && (this._parser.write(l), this.emit("data", l));
5523
+ var u = this._decoder.decode();
5524
+ u && (this._parser.write(u), this.emit("data", u));
5525
5525
  }
5526
5526
  return this._parser.end(), !0;
5527
- }, p.prototype.on = function(m, l) {
5527
+ }, p.prototype.on = function(m, u) {
5528
5528
  var P = this;
5529
5529
  return !P._parser["on" + m] && c.indexOf(m) !== -1 && (P._parser["on" + m] = function() {
5530
5530
  var _ = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments);
5531
5531
  _.splice(0, 0, m), P.emit.apply(P, _);
5532
- }), a.prototype.on.call(P, m, l);
5532
+ }), a.prototype.on.call(P, m, u);
5533
5533
  };
5534
5534
  var f = "[CDATA[", h = "DOCTYPE", b = "http://www.w3.org/XML/1998/namespace", O = "http://www.w3.org/2000/xmlns/", D = { xml: b, xmlns: O }, w = /[:_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 = /[:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/, C = /[#:_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 = /[#:_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\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;
5535
5535
  function E(m) {
@@ -5542,85 +5542,85 @@ function Bo() {
5542
5542
  function F(m) {
5543
5543
  return m === ">" || E(m);
5544
5544
  }
5545
- function U(m, l) {
5546
- return m.test(l);
5545
+ function U(m, u) {
5546
+ return m.test(u);
5547
5547
  }
5548
- function j(m, l) {
5549
- return !U(m, l);
5548
+ function j(m, u) {
5549
+ return !U(m, u);
5550
5550
  }
5551
- var u = 0;
5551
+ var l = 0;
5552
5552
  t.STATE = {
5553
- BEGIN: u++,
5553
+ BEGIN: l++,
5554
5554
  // leading byte order mark or whitespace
5555
- BEGIN_WHITESPACE: u++,
5555
+ BEGIN_WHITESPACE: l++,
5556
5556
  // leading whitespace
5557
- TEXT: u++,
5557
+ TEXT: l++,
5558
5558
  // general stuff
5559
- TEXT_ENTITY: u++,
5559
+ TEXT_ENTITY: l++,
5560
5560
  // &amp and such.
5561
- OPEN_WAKA: u++,
5561
+ OPEN_WAKA: l++,
5562
5562
  // <
5563
- SGML_DECL: u++,
5563
+ SGML_DECL: l++,
5564
5564
  // <!BLARG
5565
- SGML_DECL_QUOTED: u++,
5565
+ SGML_DECL_QUOTED: l++,
5566
5566
  // <!BLARG foo "bar
5567
- DOCTYPE: u++,
5567
+ DOCTYPE: l++,
5568
5568
  // <!DOCTYPE
5569
- DOCTYPE_QUOTED: u++,
5569
+ DOCTYPE_QUOTED: l++,
5570
5570
  // <!DOCTYPE "//blah
5571
- DOCTYPE_DTD: u++,
5571
+ DOCTYPE_DTD: l++,
5572
5572
  // <!DOCTYPE "//blah" [ ...
5573
- DOCTYPE_DTD_QUOTED: u++,
5573
+ DOCTYPE_DTD_QUOTED: l++,
5574
5574
  // <!DOCTYPE "//blah" [ "foo
5575
- COMMENT_STARTING: u++,
5575
+ COMMENT_STARTING: l++,
5576
5576
  // <!-
5577
- COMMENT: u++,
5577
+ COMMENT: l++,
5578
5578
  // <!--
5579
- COMMENT_ENDING: u++,
5579
+ COMMENT_ENDING: l++,
5580
5580
  // <!-- blah -
5581
- COMMENT_ENDED: u++,
5581
+ COMMENT_ENDED: l++,
5582
5582
  // <!-- blah --
5583
- CDATA: u++,
5583
+ CDATA: l++,
5584
5584
  // <![CDATA[ something
5585
- CDATA_ENDING: u++,
5585
+ CDATA_ENDING: l++,
5586
5586
  // ]
5587
- CDATA_ENDING_2: u++,
5587
+ CDATA_ENDING_2: l++,
5588
5588
  // ]]
5589
- PROC_INST: u++,
5589
+ PROC_INST: l++,
5590
5590
  // <?hi
5591
- PROC_INST_BODY: u++,
5591
+ PROC_INST_BODY: l++,
5592
5592
  // <?hi there
5593
- PROC_INST_ENDING: u++,
5593
+ PROC_INST_ENDING: l++,
5594
5594
  // <?hi "there" ?
5595
- OPEN_TAG: u++,
5595
+ OPEN_TAG: l++,
5596
5596
  // <strong
5597
- OPEN_TAG_SLASH: u++,
5597
+ OPEN_TAG_SLASH: l++,
5598
5598
  // <strong /
5599
- ATTRIB: u++,
5599
+ ATTRIB: l++,
5600
5600
  // <a
5601
- ATTRIB_NAME: u++,
5601
+ ATTRIB_NAME: l++,
5602
5602
  // <a foo
5603
- ATTRIB_NAME_SAW_WHITE: u++,
5603
+ ATTRIB_NAME_SAW_WHITE: l++,
5604
5604
  // <a foo _
5605
- ATTRIB_VALUE: u++,
5605
+ ATTRIB_VALUE: l++,
5606
5606
  // <a foo=
5607
- ATTRIB_VALUE_QUOTED: u++,
5607
+ ATTRIB_VALUE_QUOTED: l++,
5608
5608
  // <a foo="bar
5609
- ATTRIB_VALUE_CLOSED: u++,
5609
+ ATTRIB_VALUE_CLOSED: l++,
5610
5610
  // <a foo="bar"
5611
- ATTRIB_VALUE_UNQUOTED: u++,
5611
+ ATTRIB_VALUE_UNQUOTED: l++,
5612
5612
  // <a foo=bar
5613
- ATTRIB_VALUE_ENTITY_Q: u++,
5613
+ ATTRIB_VALUE_ENTITY_Q: l++,
5614
5614
  // <foo bar="&quot;"
5615
- ATTRIB_VALUE_ENTITY_U: u++,
5615
+ ATTRIB_VALUE_ENTITY_U: l++,
5616
5616
  // <foo bar=&quot
5617
- CLOSE_TAG: u++,
5617
+ CLOSE_TAG: l++,
5618
5618
  // </a
5619
- CLOSE_TAG_SAW_WHITE: u++,
5619
+ CLOSE_TAG_SAW_WHITE: l++,
5620
5620
  // </a >
5621
- SCRIPT: u++,
5621
+ SCRIPT: l++,
5622
5622
  // <script> ...
5623
- SCRIPT_ENDING: u++
5623
+ SCRIPT_ENDING: l++
5624
5624
  // <script> ... <
5625
5625
  }, t.XML_ENTITIES = {
5626
5626
  amp: "&",
@@ -5883,46 +5883,46 @@ function Bo() {
5883
5883
  hearts: 9829,
5884
5884
  diams: 9830
5885
5885
  }, Object.keys(t.ENTITIES).forEach(function(m) {
5886
- var l = t.ENTITIES[m], P = typeof l == "number" ? String.fromCharCode(l) : l;
5886
+ var u = t.ENTITIES[m], P = typeof u == "number" ? String.fromCharCode(u) : u;
5887
5887
  t.ENTITIES[m] = P;
5888
5888
  });
5889
5889
  for (var M in t.STATE)
5890
5890
  t.STATE[t.STATE[M]] = M;
5891
- u = t.STATE;
5892
- function N(m, l, P) {
5893
- m[l] && m[l](P);
5891
+ l = t.STATE;
5892
+ function N(m, u, P) {
5893
+ m[u] && m[u](P);
5894
5894
  }
5895
- function L(m, l, P) {
5896
- m.textNode && B(m), N(m, l, P);
5895
+ function L(m, u, P) {
5896
+ m.textNode && B(m), N(m, u, P);
5897
5897
  }
5898
5898
  function B(m) {
5899
5899
  m.textNode = X(m.opt, m.textNode), m.textNode && N(m, "ontext", m.textNode), m.textNode = "";
5900
5900
  }
5901
- function X(m, l) {
5902
- return m.trim && (l = l.trim()), m.normalize && (l = l.replace(/\s+/g, " ")), l;
5901
+ function X(m, u) {
5902
+ return m.trim && (u = u.trim()), m.normalize && (u = u.replace(/\s+/g, " ")), u;
5903
5903
  }
5904
- function Y(m, l) {
5905
- return B(m), m.trackPosition && (l += `
5904
+ function Y(m, u) {
5905
+ return B(m), m.trackPosition && (u += `
5906
5906
  Line: ` + m.line + `
5907
5907
  Column: ` + m.column + `
5908
- Char: ` + m.c), l = new Error(l), m.error = l, N(m, "onerror", l), m;
5908
+ Char: ` + m.c), u = new Error(u), m.error = u, N(m, "onerror", u), m;
5909
5909
  }
5910
5910
  function k(m) {
5911
- return m.sawRoot && !m.closedRoot && W(m, "Unclosed root tag"), m.state !== u.BEGIN && m.state !== u.BEGIN_WHITESPACE && m.state !== u.TEXT && Y(m, "Unexpected end"), B(m), m.c = "", m.closed = !0, N(m, "onend"), n.call(m, m.strict, m.opt), m;
5911
+ return m.sawRoot && !m.closedRoot && W(m, "Unclosed root tag"), m.state !== l.BEGIN && m.state !== l.BEGIN_WHITESPACE && m.state !== l.TEXT && Y(m, "Unexpected end"), B(m), m.c = "", m.closed = !0, N(m, "onend"), n.call(m, m.strict, m.opt), m;
5912
5912
  }
5913
- function W(m, l) {
5913
+ function W(m, u) {
5914
5914
  if (typeof m != "object" || !(m instanceof n))
5915
5915
  throw new Error("bad call to strictFail");
5916
- m.strict && Y(m, l);
5916
+ m.strict && Y(m, u);
5917
5917
  }
5918
5918
  function at(m) {
5919
5919
  m.strict || (m.tagName = m.tagName[m.looseCase]());
5920
- var l = m.tags[m.tags.length - 1] || m, P = m.tag = { name: m.tagName, attributes: {} };
5921
- m.opt.xmlns && (P.ns = l.ns), m.attribList.length = 0, L(m, "onopentagstart", P);
5920
+ var u = m.tags[m.tags.length - 1] || m, P = m.tag = { name: m.tagName, attributes: {} };
5921
+ m.opt.xmlns && (P.ns = u.ns), m.attribList.length = 0, L(m, "onopentagstart", P);
5922
5922
  }
5923
- function Nt(m, l) {
5923
+ function Nt(m, u) {
5924
5924
  var P = m.indexOf(":"), _ = P < 0 ? ["", m] : m.split(":"), J = _[0], nt = _[1];
5925
- return l && m === "xmlns" && (J = "xmlns", nt = ""), { prefix: J, local: nt };
5925
+ return u && m === "xmlns" && (J = "xmlns", nt = ""), { prefix: J, local: nt };
5926
5926
  }
5927
5927
  function st(m) {
5928
5928
  if (m.strict || (m.attribName = m.attribName[m.looseCase]()), m.attribList.indexOf(m.attribName) !== -1 || m.tag.attributes.hasOwnProperty(m.attribName)) {
@@ -5930,7 +5930,7 @@ Char: ` + m.c), l = new Error(l), m.error = l, N(m, "onerror", l), m;
5930
5930
  return;
5931
5931
  }
5932
5932
  if (m.opt.xmlns) {
5933
- var l = Nt(m.attribName, !0), P = l.prefix, _ = l.local;
5933
+ var u = Nt(m.attribName, !0), P = u.prefix, _ = u.local;
5934
5934
  if (P === "xmlns")
5935
5935
  if (_ === "xml" && m.attribValue !== b)
5936
5936
  W(
@@ -5956,7 +5956,7 @@ Actual: ` + m.attribValue
5956
5956
  });
5957
5957
  m.attribName = m.attribValue = "";
5958
5958
  }
5959
- function mt(m, l) {
5959
+ function mt(m, u) {
5960
5960
  if (m.opt.xmlns) {
5961
5961
  var P = m.tag, _ = Nt(m.tagName);
5962
5962
  P.prefix = _.prefix, P.local = _.local, P.uri = P.ns[_.prefix] || "", P.prefix && !P.uri && (W(
@@ -5971,11 +5971,11 @@ Actual: ` + m.attribValue
5971
5971
  });
5972
5972
  });
5973
5973
  for (var nt = 0, it = m.attribList.length; nt < it; nt++) {
5974
- var ht = m.attribList[nt], I = ht[0], v = ht[1], R = Nt(I, !0), S = R.prefix, x = R.local, q = S === "" ? "" : P.ns[S] || "", $ = {
5974
+ var ht = m.attribList[nt], I = ht[0], x = ht[1], R = Nt(I, !0), S = R.prefix, v = R.local, q = S === "" ? "" : P.ns[S] || "", $ = {
5975
5975
  name: I,
5976
- value: v,
5976
+ value: x,
5977
5977
  prefix: S,
5978
- local: x,
5978
+ local: v,
5979
5979
  uri: q
5980
5980
  };
5981
5981
  S && S !== "xmlns" && !q && (W(
@@ -5985,280 +5985,286 @@ Actual: ` + m.attribValue
5985
5985
  }
5986
5986
  m.attribList.length = 0;
5987
5987
  }
5988
- m.tag.isSelfClosing = !!l, m.sawRoot = !0, m.tags.push(m.tag), L(m, "onopentag", m.tag), l || (!m.noscript && m.tagName.toLowerCase() === "script" ? m.state = u.SCRIPT : m.state = u.TEXT, m.tag = null, m.tagName = ""), m.attribName = m.attribValue = "", m.attribList.length = 0;
5988
+ m.tag.isSelfClosing = !!u, m.sawRoot = !0, m.tags.push(m.tag), L(m, "onopentag", m.tag), u || (!m.noscript && m.tagName.toLowerCase() === "script" ? m.state = l.SCRIPT : m.state = l.TEXT, m.tag = null, m.tagName = ""), m.attribName = m.attribValue = "", m.attribList.length = 0;
5989
5989
  }
5990
5990
  function bt(m) {
5991
5991
  if (!m.tagName) {
5992
- W(m, "Weird empty close tag."), m.textNode += "</>", m.state = u.TEXT;
5992
+ W(m, "Weird empty close tag."), m.textNode += "</>", m.state = l.TEXT;
5993
5993
  return;
5994
5994
  }
5995
5995
  if (m.script) {
5996
5996
  if (m.tagName !== "script") {
5997
- m.script += "</" + m.tagName + ">", m.tagName = "", m.state = u.SCRIPT;
5997
+ m.script += "</" + m.tagName + ">", m.tagName = "", m.state = l.SCRIPT;
5998
5998
  return;
5999
5999
  }
6000
6000
  L(m, "onscript", m.script), m.script = "";
6001
6001
  }
6002
- var l = m.tags.length, P = m.tagName;
6002
+ var u = m.tags.length, P = m.tagName;
6003
6003
  m.strict || (P = P[m.looseCase]());
6004
- for (var _ = P; l--; ) {
6005
- var J = m.tags[l];
6004
+ for (var _ = P; u--; ) {
6005
+ var J = m.tags[u];
6006
6006
  if (J.name !== _)
6007
6007
  W(m, "Unexpected close tag");
6008
6008
  else
6009
6009
  break;
6010
6010
  }
6011
- if (l < 0) {
6012
- W(m, "Unmatched closing tag: " + m.tagName), m.textNode += "</" + m.tagName + ">", m.state = u.TEXT;
6011
+ if (u < 0) {
6012
+ W(m, "Unmatched closing tag: " + m.tagName), m.textNode += "</" + m.tagName + ">", m.state = l.TEXT;
6013
6013
  return;
6014
6014
  }
6015
6015
  m.tagName = P;
6016
- for (var nt = m.tags.length; nt-- > l; ) {
6016
+ for (var nt = m.tags.length; nt-- > u; ) {
6017
6017
  var it = m.tag = m.tags.pop();
6018
6018
  m.tagName = m.tag.name, L(m, "onclosetag", m.tagName);
6019
6019
  var ht = {};
6020
6020
  for (var I in it.ns)
6021
6021
  ht[I] = it.ns[I];
6022
- var v = m.tags[m.tags.length - 1] || m;
6023
- m.opt.xmlns && it.ns !== v.ns && Object.keys(it.ns).forEach(function(R) {
6022
+ var x = m.tags[m.tags.length - 1] || m;
6023
+ m.opt.xmlns && it.ns !== x.ns && Object.keys(it.ns).forEach(function(R) {
6024
6024
  var S = it.ns[R];
6025
6025
  L(m, "onclosenamespace", { prefix: R, uri: S });
6026
6026
  });
6027
6027
  }
6028
- l === 0 && (m.closedRoot = !0), m.tagName = m.attribValue = m.attribName = "", m.attribList.length = 0, m.state = u.TEXT;
6028
+ u === 0 && (m.closedRoot = !0), m.tagName = m.attribValue = m.attribName = "", m.attribList.length = 0, m.state = l.TEXT;
6029
6029
  }
6030
6030
  function jt(m) {
6031
- var l = m.entity, P = l.toLowerCase(), _, J = "";
6032
- return m.ENTITIES[l] ? m.ENTITIES[l] : m.ENTITIES[P] ? m.ENTITIES[P] : (l = P, l.charAt(0) === "#" && (l.charAt(1) === "x" ? (l = l.slice(2), _ = parseInt(l, 16), J = _.toString(16)) : (l = l.slice(1), _ = parseInt(l, 10), J = _.toString(10))), l = l.replace(/^0+/, ""), isNaN(_) || J.toLowerCase() !== l || _ < 0 || _ > 1114111 ? (W(m, "Invalid character entity"), "&" + m.entity + ";") : String.fromCodePoint(_));
6031
+ var u = m.entity, P = u.toLowerCase(), _, J = "";
6032
+ return m.ENTITIES[u] ? m.ENTITIES[u] : m.ENTITIES[P] ? m.ENTITIES[P] : (u = P, u.charAt(0) === "#" && (u.charAt(1) === "x" ? (u = u.slice(2), _ = parseInt(u, 16), J = _.toString(16)) : (u = u.slice(1), _ = parseInt(u, 10), J = _.toString(10))), u = u.replace(/^0+/, ""), isNaN(_) || J.toLowerCase() !== u || _ < 0 || _ > 1114111 ? (W(m, "Invalid character entity"), "&" + m.entity + ";") : String.fromCodePoint(_));
6033
6033
  }
6034
- function Q(m, l) {
6035
- l === "<" ? (m.state = u.OPEN_WAKA, m.startTagPosition = m.position) : E(l) || (W(m, "Non-whitespace before first tag."), m.textNode = l, m.state = u.TEXT);
6034
+ function Q(m, u) {
6035
+ u === "<" ? (m.state = l.OPEN_WAKA, m.startTagPosition = m.position) : E(u) || (W(m, "Non-whitespace before first tag."), m.textNode = u, m.state = l.TEXT);
6036
6036
  }
6037
- function qt(m, l) {
6037
+ function qt(m, u) {
6038
6038
  var P = "";
6039
- return l < m.length && (P = m.charAt(l)), P;
6039
+ return u < m.length && (P = m.charAt(u)), P;
6040
6040
  }
6041
6041
  function K(m) {
6042
- var l = this;
6042
+ var u = this;
6043
6043
  if (this.error)
6044
6044
  throw this.error;
6045
- if (l.closed)
6045
+ if (u.closed)
6046
6046
  return Y(
6047
- l,
6047
+ u,
6048
6048
  "Cannot write after close. Assign an onready handler."
6049
6049
  );
6050
6050
  if (m === null)
6051
- return k(l);
6051
+ return k(u);
6052
6052
  typeof m == "object" && (m = m.toString());
6053
- for (var P = 0, _ = ""; _ = qt(m, P++), l.c = _, !!_; )
6054
- switch (l.trackPosition && (l.position++, _ === `
6055
- ` ? (l.line++, l.column = 0) : l.column++), l.state) {
6056
- case u.BEGIN:
6057
- if (l.state = u.BEGIN_WHITESPACE, _ === "\uFEFF")
6053
+ for (var P = 0, _ = ""; _ = qt(m, P++), u.c = _, !!_; )
6054
+ switch (u.trackPosition && (u.position++, _ === `
6055
+ ` ? (u.line++, u.column = 0) : u.column++), u.state) {
6056
+ case l.BEGIN:
6057
+ if (u.state = l.BEGIN_WHITESPACE, _ === "\uFEFF")
6058
6058
  continue;
6059
- Q(l, _);
6059
+ Q(u, _);
6060
6060
  continue;
6061
- case u.BEGIN_WHITESPACE:
6062
- Q(l, _);
6061
+ case l.BEGIN_WHITESPACE:
6062
+ Q(u, _);
6063
6063
  continue;
6064
- case u.TEXT:
6065
- if (l.sawRoot && !l.closedRoot) {
6064
+ case l.TEXT:
6065
+ if (u.sawRoot && !u.closedRoot) {
6066
6066
  for (var nt = P - 1; _ && _ !== "<" && _ !== "&"; )
6067
- _ = qt(m, P++), _ && l.trackPosition && (l.position++, _ === `
6068
- ` ? (l.line++, l.column = 0) : l.column++);
6069
- l.textNode += m.substring(nt, P - 1);
6067
+ _ = qt(m, P++), _ && u.trackPosition && (u.position++, _ === `
6068
+ ` ? (u.line++, u.column = 0) : u.column++);
6069
+ u.textNode += m.substring(nt, P - 1);
6070
6070
  }
6071
- _ === "<" && !(l.sawRoot && l.closedRoot && !l.strict) ? (l.state = u.OPEN_WAKA, l.startTagPosition = l.position) : (!E(_) && (!l.sawRoot || l.closedRoot) && W(l, "Text data outside of root node."), _ === "&" ? l.state = u.TEXT_ENTITY : l.textNode += _);
6071
+ _ === "<" && !(u.sawRoot && u.closedRoot && !u.strict) ? (u.state = l.OPEN_WAKA, u.startTagPosition = u.position) : (!E(_) && (!u.sawRoot || u.closedRoot) && W(u, "Text data outside of root node."), _ === "&" ? u.state = l.TEXT_ENTITY : u.textNode += _);
6072
6072
  continue;
6073
- case u.SCRIPT:
6074
- _ === "<" ? l.state = u.SCRIPT_ENDING : l.script += _;
6073
+ case l.SCRIPT:
6074
+ _ === "<" ? u.state = l.SCRIPT_ENDING : u.script += _;
6075
6075
  continue;
6076
- case u.SCRIPT_ENDING:
6077
- _ === "/" ? l.state = u.CLOSE_TAG : (l.script += "<" + _, l.state = u.SCRIPT);
6076
+ case l.SCRIPT_ENDING:
6077
+ _ === "/" ? u.state = l.CLOSE_TAG : (u.script += "<" + _, u.state = l.SCRIPT);
6078
6078
  continue;
6079
- case u.OPEN_WAKA:
6079
+ case l.OPEN_WAKA:
6080
6080
  if (_ === "!")
6081
- l.state = u.SGML_DECL, l.sgmlDecl = "";
6081
+ u.state = l.SGML_DECL, u.sgmlDecl = "";
6082
6082
  else if (!E(_)) if (U(w, _))
6083
- l.state = u.OPEN_TAG, l.tagName = _;
6083
+ u.state = l.OPEN_TAG, u.tagName = _;
6084
6084
  else if (_ === "/")
6085
- l.state = u.CLOSE_TAG, l.tagName = "";
6085
+ u.state = l.CLOSE_TAG, u.tagName = "";
6086
6086
  else if (_ === "?")
6087
- l.state = u.PROC_INST, l.procInstName = l.procInstBody = "";
6087
+ u.state = l.PROC_INST, u.procInstName = u.procInstBody = "";
6088
6088
  else {
6089
- if (W(l, "Unencoded <"), l.startTagPosition + 1 < l.position) {
6090
- var J = l.position - l.startTagPosition;
6089
+ if (W(u, "Unencoded <"), u.startTagPosition + 1 < u.position) {
6090
+ var J = u.position - u.startTagPosition;
6091
6091
  _ = new Array(J).join(" ") + _;
6092
6092
  }
6093
- l.textNode += "<" + _, l.state = u.TEXT;
6093
+ u.textNode += "<" + _, u.state = l.TEXT;
6094
6094
  }
6095
6095
  continue;
6096
- case u.SGML_DECL:
6097
- if (l.sgmlDecl + _ === "--") {
6098
- l.state = u.COMMENT, l.comment = "", l.sgmlDecl = "";
6096
+ case l.SGML_DECL:
6097
+ if (u.sgmlDecl + _ === "--") {
6098
+ u.state = l.COMMENT, u.comment = "", u.sgmlDecl = "";
6099
6099
  continue;
6100
6100
  }
6101
- l.doctype && l.doctype !== !0 && l.sgmlDecl ? (l.state = u.DOCTYPE_DTD, l.doctype += "<!" + l.sgmlDecl + _, l.sgmlDecl = "") : (l.sgmlDecl + _).toUpperCase() === f ? (L(l, "onopencdata"), l.state = u.CDATA, l.sgmlDecl = "", l.cdata = "") : (l.sgmlDecl + _).toUpperCase() === h ? (l.state = u.DOCTYPE, (l.doctype || l.sawRoot) && W(
6102
- l,
6101
+ u.doctype && u.doctype !== !0 && u.sgmlDecl ? (u.state = l.DOCTYPE_DTD, u.doctype += "<!" + u.sgmlDecl + _, u.sgmlDecl = "") : (u.sgmlDecl + _).toUpperCase() === f ? (L(u, "onopencdata"), u.state = l.CDATA, u.sgmlDecl = "", u.cdata = "") : (u.sgmlDecl + _).toUpperCase() === h ? (u.state = l.DOCTYPE, (u.doctype || u.sawRoot) && W(
6102
+ u,
6103
6103
  "Inappropriately located doctype declaration"
6104
- ), l.doctype = "", l.sgmlDecl = "") : _ === ">" ? (L(l, "onsgmldeclaration", l.sgmlDecl), l.sgmlDecl = "", l.state = u.TEXT) : (T(_) && (l.state = u.SGML_DECL_QUOTED), l.sgmlDecl += _);
6104
+ ), u.doctype = "", u.sgmlDecl = "") : _ === ">" ? (L(u, "onsgmldeclaration", u.sgmlDecl), u.sgmlDecl = "", u.state = l.TEXT) : (T(_) && (u.state = l.SGML_DECL_QUOTED), u.sgmlDecl += _);
6105
6105
  continue;
6106
- case u.SGML_DECL_QUOTED:
6107
- _ === l.q && (l.state = u.SGML_DECL, l.q = ""), l.sgmlDecl += _;
6106
+ case l.SGML_DECL_QUOTED:
6107
+ _ === u.q && (u.state = l.SGML_DECL, u.q = ""), u.sgmlDecl += _;
6108
6108
  continue;
6109
- case u.DOCTYPE:
6110
- _ === ">" ? (l.state = u.TEXT, L(l, "ondoctype", l.doctype), l.doctype = !0) : (l.doctype += _, _ === "[" ? l.state = u.DOCTYPE_DTD : T(_) && (l.state = u.DOCTYPE_QUOTED, l.q = _));
6109
+ case l.DOCTYPE:
6110
+ _ === ">" ? (u.state = l.TEXT, L(u, "ondoctype", u.doctype), u.doctype = !0) : (u.doctype += _, _ === "[" ? u.state = l.DOCTYPE_DTD : T(_) && (u.state = l.DOCTYPE_QUOTED, u.q = _));
6111
6111
  continue;
6112
- case u.DOCTYPE_QUOTED:
6113
- l.doctype += _, _ === l.q && (l.q = "", l.state = u.DOCTYPE);
6112
+ case l.DOCTYPE_QUOTED:
6113
+ u.doctype += _, _ === u.q && (u.q = "", u.state = l.DOCTYPE);
6114
6114
  continue;
6115
- case u.DOCTYPE_DTD:
6116
- _ === "]" ? (l.doctype += _, l.state = u.DOCTYPE) : _ === "<" ? (l.state = u.OPEN_WAKA, l.startTagPosition = l.position) : T(_) ? (l.doctype += _, l.state = u.DOCTYPE_DTD_QUOTED, l.q = _) : l.doctype += _;
6115
+ case l.DOCTYPE_DTD:
6116
+ _ === "]" ? (u.doctype += _, u.state = l.DOCTYPE) : _ === "<" ? (u.state = l.OPEN_WAKA, u.startTagPosition = u.position) : T(_) ? (u.doctype += _, u.state = l.DOCTYPE_DTD_QUOTED, u.q = _) : u.doctype += _;
6117
6117
  continue;
6118
- case u.DOCTYPE_DTD_QUOTED:
6119
- l.doctype += _, _ === l.q && (l.state = u.DOCTYPE_DTD, l.q = "");
6118
+ case l.DOCTYPE_DTD_QUOTED:
6119
+ u.doctype += _, _ === u.q && (u.state = l.DOCTYPE_DTD, u.q = "");
6120
6120
  continue;
6121
- case u.COMMENT:
6122
- _ === "-" ? l.state = u.COMMENT_ENDING : l.comment += _;
6121
+ case l.COMMENT:
6122
+ _ === "-" ? u.state = l.COMMENT_ENDING : u.comment += _;
6123
6123
  continue;
6124
- case u.COMMENT_ENDING:
6125
- _ === "-" ? (l.state = u.COMMENT_ENDED, l.comment = X(l.opt, l.comment), l.comment && L(l, "oncomment", l.comment), l.comment = "") : (l.comment += "-" + _, l.state = u.COMMENT);
6124
+ case l.COMMENT_ENDING:
6125
+ _ === "-" ? (u.state = l.COMMENT_ENDED, u.comment = X(u.opt, u.comment), u.comment && L(u, "oncomment", u.comment), u.comment = "") : (u.comment += "-" + _, u.state = l.COMMENT);
6126
6126
  continue;
6127
- case u.COMMENT_ENDED:
6128
- _ !== ">" ? (W(l, "Malformed comment"), l.comment += "--" + _, l.state = u.COMMENT) : l.doctype && l.doctype !== !0 ? l.state = u.DOCTYPE_DTD : l.state = u.TEXT;
6127
+ case l.COMMENT_ENDED:
6128
+ _ !== ">" ? (W(u, "Malformed comment"), u.comment += "--" + _, u.state = l.COMMENT) : u.doctype && u.doctype !== !0 ? u.state = l.DOCTYPE_DTD : u.state = l.TEXT;
6129
6129
  continue;
6130
- case u.CDATA:
6130
+ case l.CDATA:
6131
6131
  for (var nt = P - 1; _ && _ !== "]"; )
6132
- _ = qt(m, P++), _ && l.trackPosition && (l.position++, _ === `
6133
- ` ? (l.line++, l.column = 0) : l.column++);
6134
- l.cdata += m.substring(nt, P - 1), _ === "]" && (l.state = u.CDATA_ENDING);
6132
+ _ = qt(m, P++), _ && u.trackPosition && (u.position++, _ === `
6133
+ ` ? (u.line++, u.column = 0) : u.column++);
6134
+ u.cdata += m.substring(nt, P - 1), _ === "]" && (u.state = l.CDATA_ENDING);
6135
6135
  continue;
6136
- case u.CDATA_ENDING:
6137
- _ === "]" ? l.state = u.CDATA_ENDING_2 : (l.cdata += "]" + _, l.state = u.CDATA);
6136
+ case l.CDATA_ENDING:
6137
+ _ === "]" ? u.state = l.CDATA_ENDING_2 : (u.cdata += "]" + _, u.state = l.CDATA);
6138
6138
  continue;
6139
- case u.CDATA_ENDING_2:
6140
- _ === ">" ? (l.cdata && L(l, "oncdata", l.cdata), L(l, "onclosecdata"), l.cdata = "", l.state = u.TEXT) : _ === "]" ? l.cdata += "]" : (l.cdata += "]]" + _, l.state = u.CDATA);
6139
+ case l.CDATA_ENDING_2:
6140
+ _ === ">" ? (u.cdata && L(u, "oncdata", u.cdata), L(u, "onclosecdata"), u.cdata = "", u.state = l.TEXT) : _ === "]" ? u.cdata += "]" : (u.cdata += "]]" + _, u.state = l.CDATA);
6141
6141
  continue;
6142
- case u.PROC_INST:
6143
- _ === "?" ? l.state = u.PROC_INST_ENDING : E(_) ? l.state = u.PROC_INST_BODY : l.procInstName += _;
6142
+ case l.PROC_INST:
6143
+ _ === "?" ? u.state = l.PROC_INST_ENDING : E(_) ? u.state = l.PROC_INST_BODY : u.procInstName += _;
6144
6144
  continue;
6145
- case u.PROC_INST_BODY:
6146
- if (!l.procInstBody && E(_))
6145
+ case l.PROC_INST_BODY:
6146
+ if (!u.procInstBody && E(_))
6147
6147
  continue;
6148
- _ === "?" ? l.state = u.PROC_INST_ENDING : l.procInstBody += _;
6148
+ _ === "?" ? u.state = l.PROC_INST_ENDING : u.procInstBody += _;
6149
6149
  continue;
6150
- case u.PROC_INST_ENDING:
6151
- _ === ">" ? (L(l, "onprocessinginstruction", {
6152
- name: l.procInstName,
6153
- body: l.procInstBody
6154
- }), l.procInstName = l.procInstBody = "", l.state = u.TEXT) : (l.procInstBody += "?" + _, l.state = u.PROC_INST_BODY);
6150
+ case l.PROC_INST_ENDING:
6151
+ _ === ">" ? (L(u, "onprocessinginstruction", {
6152
+ name: u.procInstName,
6153
+ body: u.procInstBody
6154
+ }), u.procInstName = u.procInstBody = "", u.state = l.TEXT) : (u.procInstBody += "?" + _, u.state = l.PROC_INST_BODY);
6155
6155
  continue;
6156
- case u.OPEN_TAG:
6157
- U(A, _) ? l.tagName += _ : (at(l), _ === ">" ? mt(l) : _ === "/" ? l.state = u.OPEN_TAG_SLASH : (E(_) || W(l, "Invalid character in tag name"), l.state = u.ATTRIB));
6156
+ case l.OPEN_TAG:
6157
+ U(A, _) ? u.tagName += _ : (at(u), _ === ">" ? mt(u) : _ === "/" ? u.state = l.OPEN_TAG_SLASH : (E(_) || W(u, "Invalid character in tag name"), u.state = l.ATTRIB));
6158
6158
  continue;
6159
- case u.OPEN_TAG_SLASH:
6160
- _ === ">" ? (mt(l, !0), bt(l)) : (W(
6161
- l,
6159
+ case l.OPEN_TAG_SLASH:
6160
+ _ === ">" ? (mt(u, !0), bt(u)) : (W(
6161
+ u,
6162
6162
  "Forward-slash in opening tag not followed by >"
6163
- ), l.state = u.ATTRIB);
6163
+ ), u.state = l.ATTRIB);
6164
6164
  continue;
6165
- case u.ATTRIB:
6165
+ case l.ATTRIB:
6166
6166
  if (E(_))
6167
6167
  continue;
6168
- _ === ">" ? mt(l) : _ === "/" ? l.state = u.OPEN_TAG_SLASH : U(w, _) ? (l.attribName = _, l.attribValue = "", l.state = u.ATTRIB_NAME) : W(l, "Invalid attribute name");
6168
+ _ === ">" ? mt(u) : _ === "/" ? u.state = l.OPEN_TAG_SLASH : U(w, _) ? (u.attribName = _, u.attribValue = "", u.state = l.ATTRIB_NAME) : W(u, "Invalid attribute name");
6169
6169
  continue;
6170
- case u.ATTRIB_NAME:
6171
- _ === "=" ? l.state = u.ATTRIB_VALUE : _ === ">" ? (W(l, "Attribute without value"), l.attribValue = l.attribName, st(l), mt(l)) : E(_) ? l.state = u.ATTRIB_NAME_SAW_WHITE : U(A, _) ? l.attribName += _ : W(l, "Invalid attribute name");
6170
+ case l.ATTRIB_NAME:
6171
+ _ === "=" ? u.state = l.ATTRIB_VALUE : _ === ">" ? (W(u, "Attribute without value"), u.attribValue = u.attribName, st(u), mt(u)) : E(_) ? u.state = l.ATTRIB_NAME_SAW_WHITE : U(A, _) ? u.attribName += _ : W(u, "Invalid attribute name");
6172
6172
  continue;
6173
- case u.ATTRIB_NAME_SAW_WHITE:
6173
+ case l.ATTRIB_NAME_SAW_WHITE:
6174
6174
  if (_ === "=")
6175
- l.state = u.ATTRIB_VALUE;
6175
+ u.state = l.ATTRIB_VALUE;
6176
6176
  else {
6177
6177
  if (E(_))
6178
6178
  continue;
6179
- W(l, "Attribute without value"), l.tag.attributes[l.attribName] = "", l.attribValue = "", L(l, "onattribute", {
6180
- name: l.attribName,
6179
+ W(u, "Attribute without value"), u.tag.attributes[u.attribName] = "", u.attribValue = "", L(u, "onattribute", {
6180
+ name: u.attribName,
6181
6181
  value: ""
6182
- }), l.attribName = "", _ === ">" ? mt(l) : U(w, _) ? (l.attribName = _, l.state = u.ATTRIB_NAME) : (W(l, "Invalid attribute name"), l.state = u.ATTRIB);
6182
+ }), u.attribName = "", _ === ">" ? mt(u) : U(w, _) ? (u.attribName = _, u.state = l.ATTRIB_NAME) : (W(u, "Invalid attribute name"), u.state = l.ATTRIB);
6183
6183
  }
6184
6184
  continue;
6185
- case u.ATTRIB_VALUE:
6185
+ case l.ATTRIB_VALUE:
6186
6186
  if (E(_))
6187
6187
  continue;
6188
- T(_) ? (l.q = _, l.state = u.ATTRIB_VALUE_QUOTED) : (l.opt.unquotedAttributeValues || Y(l, "Unquoted attribute value"), l.state = u.ATTRIB_VALUE_UNQUOTED, l.attribValue = _);
6188
+ T(_) ? (u.q = _, u.state = l.ATTRIB_VALUE_QUOTED) : (u.opt.unquotedAttributeValues || Y(u, "Unquoted attribute value"), u.state = l.ATTRIB_VALUE_UNQUOTED, u.attribValue = _);
6189
6189
  continue;
6190
- case u.ATTRIB_VALUE_QUOTED:
6191
- if (_ !== l.q) {
6192
- _ === "&" ? l.state = u.ATTRIB_VALUE_ENTITY_Q : l.attribValue += _;
6190
+ case l.ATTRIB_VALUE_QUOTED:
6191
+ if (_ !== u.q) {
6192
+ _ === "&" ? u.state = l.ATTRIB_VALUE_ENTITY_Q : u.attribValue += _;
6193
6193
  continue;
6194
6194
  }
6195
- st(l), l.q = "", l.state = u.ATTRIB_VALUE_CLOSED;
6195
+ st(u), u.q = "", u.state = l.ATTRIB_VALUE_CLOSED;
6196
6196
  continue;
6197
- case u.ATTRIB_VALUE_CLOSED:
6198
- E(_) ? l.state = u.ATTRIB : _ === ">" ? mt(l) : _ === "/" ? l.state = u.OPEN_TAG_SLASH : U(w, _) ? (W(l, "No whitespace between attributes"), l.attribName = _, l.attribValue = "", l.state = u.ATTRIB_NAME) : W(l, "Invalid attribute name");
6197
+ case l.ATTRIB_VALUE_CLOSED:
6198
+ E(_) ? u.state = l.ATTRIB : _ === ">" ? mt(u) : _ === "/" ? u.state = l.OPEN_TAG_SLASH : U(w, _) ? (W(u, "No whitespace between attributes"), u.attribName = _, u.attribValue = "", u.state = l.ATTRIB_NAME) : W(u, "Invalid attribute name");
6199
6199
  continue;
6200
- case u.ATTRIB_VALUE_UNQUOTED:
6200
+ case l.ATTRIB_VALUE_UNQUOTED:
6201
6201
  if (!F(_)) {
6202
- _ === "&" ? l.state = u.ATTRIB_VALUE_ENTITY_U : l.attribValue += _;
6202
+ _ === "&" ? u.state = l.ATTRIB_VALUE_ENTITY_U : u.attribValue += _;
6203
6203
  continue;
6204
6204
  }
6205
- st(l), _ === ">" ? mt(l) : l.state = u.ATTRIB;
6205
+ st(u), _ === ">" ? mt(u) : u.state = l.ATTRIB;
6206
6206
  continue;
6207
- case u.CLOSE_TAG:
6208
- if (l.tagName)
6209
- _ === ">" ? bt(l) : U(A, _) ? l.tagName += _ : l.script ? (l.script += "</" + l.tagName + _, l.tagName = "", l.state = u.SCRIPT) : (E(_) || W(l, "Invalid tagname in closing tag"), l.state = u.CLOSE_TAG_SAW_WHITE);
6207
+ case l.CLOSE_TAG:
6208
+ if (u.tagName)
6209
+ _ === ">" ? bt(u) : U(A, _) ? u.tagName += _ : u.script ? (u.script += "</" + u.tagName + _, u.tagName = "", u.state = l.SCRIPT) : (E(_) || W(u, "Invalid tagname in closing tag"), u.state = l.CLOSE_TAG_SAW_WHITE);
6210
6210
  else {
6211
6211
  if (E(_))
6212
6212
  continue;
6213
- j(w, _) ? l.script ? (l.script += "</" + _, l.state = u.SCRIPT) : W(l, "Invalid tagname in closing tag.") : l.tagName = _;
6213
+ j(w, _) ? u.script ? (u.script += "</" + _, u.state = l.SCRIPT) : W(u, "Invalid tagname in closing tag.") : u.tagName = _;
6214
6214
  }
6215
6215
  continue;
6216
- case u.CLOSE_TAG_SAW_WHITE:
6216
+ case l.CLOSE_TAG_SAW_WHITE:
6217
6217
  if (E(_))
6218
6218
  continue;
6219
- _ === ">" ? bt(l) : W(l, "Invalid characters in closing tag");
6219
+ _ === ">" ? bt(u) : W(u, "Invalid characters in closing tag");
6220
6220
  continue;
6221
- case u.TEXT_ENTITY:
6222
- case u.ATTRIB_VALUE_ENTITY_Q:
6223
- case u.ATTRIB_VALUE_ENTITY_U:
6221
+ case l.TEXT_ENTITY:
6222
+ case l.ATTRIB_VALUE_ENTITY_Q:
6223
+ case l.ATTRIB_VALUE_ENTITY_U:
6224
6224
  var it, ht;
6225
- switch (l.state) {
6226
- case u.TEXT_ENTITY:
6227
- it = u.TEXT, ht = "textNode";
6225
+ switch (u.state) {
6226
+ case l.TEXT_ENTITY:
6227
+ it = l.TEXT, ht = "textNode";
6228
6228
  break;
6229
- case u.ATTRIB_VALUE_ENTITY_Q:
6230
- it = u.ATTRIB_VALUE_QUOTED, ht = "attribValue";
6229
+ case l.ATTRIB_VALUE_ENTITY_Q:
6230
+ it = l.ATTRIB_VALUE_QUOTED, ht = "attribValue";
6231
6231
  break;
6232
- case u.ATTRIB_VALUE_ENTITY_U:
6233
- it = u.ATTRIB_VALUE_UNQUOTED, ht = "attribValue";
6232
+ case l.ATTRIB_VALUE_ENTITY_U:
6233
+ it = l.ATTRIB_VALUE_UNQUOTED, ht = "attribValue";
6234
6234
  break;
6235
6235
  }
6236
6236
  if (_ === ";") {
6237
- var I = jt(l);
6238
- l.opt.unparsedEntities && !Object.values(t.XML_ENTITIES).includes(I) ? (l.entity = "", l.state = it, l.write(I)) : (l[ht] += I, l.entity = "", l.state = it);
6239
- } else U(l.entity.length ? d : C, _) ? l.entity += _ : (W(l, "Invalid character in entity name"), l[ht] += "&" + l.entity + _, l.entity = "", l.state = it);
6237
+ var I = jt(u);
6238
+ u.opt.unparsedEntities && !Object.values(t.XML_ENTITIES).includes(I) ? ((u.entityCount += 1) > u.opt.maxEntityCount && Y(
6239
+ u,
6240
+ "Parsed entity count exceeds max entity count"
6241
+ ), (u.entityDepth += 1) > u.opt.maxEntityDepth && Y(
6242
+ u,
6243
+ "Parsed entity depth exceeds max entity depth"
6244
+ ), u.entity = "", u.state = it, u.write(I), u.entityDepth -= 1) : (u[ht] += I, u.entity = "", u.state = it);
6245
+ } else U(u.entity.length ? d : C, _) ? u.entity += _ : (W(u, "Invalid character in entity name"), u[ht] += "&" + u.entity + _, u.entity = "", u.state = it);
6240
6246
  continue;
6241
6247
  default:
6242
- throw new Error(l, "Unknown state: " + l.state);
6248
+ throw new Error(u, "Unknown state: " + u.state);
6243
6249
  }
6244
- return l.position >= l.bufferCheckPosition && s(l), l;
6250
+ return u.position >= u.bufferCheckPosition && s(u), u;
6245
6251
  }
6246
6252
  /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
6247
6253
  String.fromCodePoint || function() {
6248
- var m = String.fromCharCode, l = Math.floor, P = function() {
6254
+ var m = String.fromCharCode, u = Math.floor, P = function() {
6249
6255
  var _ = 16384, J = [], nt, it, ht = -1, I = arguments.length;
6250
6256
  if (!I)
6251
6257
  return "";
6252
- for (var v = ""; ++ht < I; ) {
6258
+ for (var x = ""; ++ht < I; ) {
6253
6259
  var R = Number(arguments[ht]);
6254
6260
  if (!isFinite(R) || // `NaN`, `+Infinity`, or `-Infinity`
6255
6261
  R < 0 || // not a valid Unicode code point
6256
6262
  R > 1114111 || // not a valid Unicode code point
6257
- l(R) !== R)
6263
+ u(R) !== R)
6258
6264
  throw RangeError("Invalid code point: " + R);
6259
- R <= 65535 ? J.push(R) : (R -= 65536, nt = (R >> 10) + 55296, it = R % 1024 + 56320, J.push(nt, it)), (ht + 1 === I || J.length > _) && (v += m.apply(null, J), J.length = 0);
6265
+ R <= 65535 ? J.push(R) : (R -= 65536, nt = (R >> 10) + 55296, it = R % 1024 + 56320, J.push(nt, it)), (ht + 1 === I || J.length > _) && (x += m.apply(null, J), J.length = 0);
6260
6266
  }
6261
- return v;
6267
+ return x;
6262
6268
  };
6263
6269
  Object.defineProperty ? Object.defineProperty(String, "fromCodePoint", {
6264
6270
  value: P,
@@ -6362,11 +6368,11 @@ function Xo() {
6362
6368
  };
6363
6369
  }(this), this.saxParser.ended = !1, this.EXPLICIT_CHARKEY = this.options.explicitCharkey, this.resultObject = null, C = [], D = this.options.attrkey, w = this.options.charkey, this.saxParser.onopentag = /* @__PURE__ */ function(d) {
6364
6370
  return function(E) {
6365
- var T, F, U, j, u;
6371
+ var T, F, U, j, l;
6366
6372
  if (U = {}, U[w] = "", !d.options.ignoreAttrs) {
6367
- u = E.attributes;
6368
- for (T in u)
6369
- h.call(u, T) && (!(D in U) && !d.options.mergeAttrs && (U[D] = {}), F = d.options.attrValueProcessors ? r(d.options.attrValueProcessors, E.attributes[T], T) : E.attributes[T], j = d.options.attrNameProcessors ? r(d.options.attrNameProcessors, T) : T, d.options.mergeAttrs ? d.assignOrPush(U, j, F) : n(U[D], j, F));
6373
+ l = E.attributes;
6374
+ for (T in l)
6375
+ h.call(l, T) && (!(D in U) && !d.options.mergeAttrs && (U[D] = {}), F = d.options.attrValueProcessors ? r(d.options.attrValueProcessors, E.attributes[T], T) : E.attributes[T], j = d.options.attrNameProcessors ? r(d.options.attrNameProcessors, T) : T, d.options.mergeAttrs ? d.assignOrPush(U, j, F) : n(U[D], j, F));
6370
6376
  }
6371
6377
  return U["#name"] = d.options.tagNameProcessors ? r(d.options.tagNameProcessors, E.name) : E.name, d.options.xmlns && (U[d.options.xmlnskey] = {
6372
6378
  uri: E.uri,
@@ -6375,8 +6381,8 @@ function Xo() {
6375
6381
  };
6376
6382
  }(this), this.saxParser.onclosetag = /* @__PURE__ */ function(d) {
6377
6383
  return function() {
6378
- var E, T, F, U, j, u, M, N, L, B;
6379
- if (u = C.pop(), j = u["#name"], (!d.options.explicitChildren || !d.options.preserveChildrenOrder) && delete u["#name"], u.cdata === !0 && (E = u.cdata, delete u.cdata), L = C[C.length - 1], u[w].match(/^\s*$/) && !E ? (T = u[w], delete u[w]) : (d.options.trim && (u[w] = u[w].trim()), d.options.normalize && (u[w] = u[w].replace(/\s{2,}/g, " ").trim()), u[w] = d.options.valueProcessors ? r(d.options.valueProcessors, u[w], j) : u[w], Object.keys(u).length === 1 && w in u && !d.EXPLICIT_CHARKEY && (u = u[w])), i(u) && (typeof d.options.emptyTag == "function" ? u = d.options.emptyTag() : u = d.options.emptyTag !== "" ? d.options.emptyTag : T), d.options.validator != null && (B = "/" + function() {
6384
+ var E, T, F, U, j, l, M, N, L, B;
6385
+ if (l = C.pop(), j = l["#name"], (!d.options.explicitChildren || !d.options.preserveChildrenOrder) && delete l["#name"], l.cdata === !0 && (E = l.cdata, delete l.cdata), L = C[C.length - 1], l[w].match(/^\s*$/) && !E ? (T = l[w], delete l[w]) : (d.options.trim && (l[w] = l[w].trim()), d.options.normalize && (l[w] = l[w].replace(/\s{2,}/g, " ").trim()), l[w] = d.options.valueProcessors ? r(d.options.valueProcessors, l[w], j) : l[w], Object.keys(l).length === 1 && w in l && !d.EXPLICIT_CHARKEY && (l = l[w])), i(l) && (typeof d.options.emptyTag == "function" ? l = d.options.emptyTag() : l = d.options.emptyTag !== "" ? d.options.emptyTag : T), d.options.validator != null && (B = "/" + function() {
6380
6386
  var X, Y, k;
6381
6387
  for (k = [], X = 0, Y = C.length; X < Y; X++)
6382
6388
  U = C[X], k.push(U["#name"]);
@@ -6384,21 +6390,21 @@ function Xo() {
6384
6390
  }().concat(j).join("/"), function() {
6385
6391
  var X;
6386
6392
  try {
6387
- return u = d.options.validator(B, L && L[j], u);
6393
+ return l = d.options.validator(B, L && L[j], l);
6388
6394
  } catch (Y) {
6389
6395
  return X = Y, d.emit("error", X);
6390
6396
  }
6391
- }()), d.options.explicitChildren && !d.options.mergeAttrs && typeof u == "object") {
6397
+ }()), d.options.explicitChildren && !d.options.mergeAttrs && typeof l == "object") {
6392
6398
  if (!d.options.preserveChildrenOrder)
6393
- U = {}, d.options.attrkey in u && (U[d.options.attrkey] = u[d.options.attrkey], delete u[d.options.attrkey]), !d.options.charsAsChildren && d.options.charkey in u && (U[d.options.charkey] = u[d.options.charkey], delete u[d.options.charkey]), Object.getOwnPropertyNames(u).length > 0 && (U[d.options.childkey] = u), u = U;
6399
+ U = {}, d.options.attrkey in l && (U[d.options.attrkey] = l[d.options.attrkey], delete l[d.options.attrkey]), !d.options.charsAsChildren && d.options.charkey in l && (U[d.options.charkey] = l[d.options.charkey], delete l[d.options.charkey]), Object.getOwnPropertyNames(l).length > 0 && (U[d.options.childkey] = l), l = U;
6394
6400
  else if (L) {
6395
6401
  L[d.options.childkey] = L[d.options.childkey] || [], M = {};
6396
- for (F in u)
6397
- h.call(u, F) && n(M, F, u[F]);
6398
- L[d.options.childkey].push(M), delete u["#name"], Object.keys(u).length === 1 && w in u && !d.EXPLICIT_CHARKEY && (u = u[w]);
6402
+ for (F in l)
6403
+ h.call(l, F) && n(M, F, l[F]);
6404
+ L[d.options.childkey].push(M), delete l["#name"], Object.keys(l).length === 1 && w in l && !d.EXPLICIT_CHARKEY && (l = l[w]);
6399
6405
  }
6400
6406
  }
6401
- return C.length > 0 ? d.assignOrPush(L, j, u) : (d.options.explicitRoot && (N = u, u = {}, n(u, j, N)), d.resultObject = u, d.saxParser.ended = !0, d.emit("end", d.resultObject));
6407
+ return C.length > 0 ? d.assignOrPush(L, j, l) : (d.options.explicitRoot && (N = l, l = {}, n(l, j, N)), d.resultObject = l, d.saxParser.ended = !0, d.emit("end", d.resultObject));
6402
6408
  };
6403
6409
  }(this), A = /* @__PURE__ */ function(d) {
6404
6410
  return function(E) {
@@ -7162,14 +7168,14 @@ class $o {
7162
7168
  }
7163
7169
  async function Wo(o) {
7164
7170
  const t = o.cdpPort ?? 9229, e = o.dbgpPort ?? 9003, n = o.cdpHost ?? "localhost", s = o.phpRoot ?? process.cwd(), i = o.breakOnFirstLine ?? !1;
7165
- vt.log("Starting XDebug Bridge...");
7171
+ xt.log("Starting XDebug Bridge...");
7166
7172
  const r = new _s(t);
7167
- vt.log("Connect Chrome DevTools to CDP at:"), vt.log(
7173
+ xt.log("Connect Chrome DevTools to CDP at:"), xt.log(
7168
7174
  `devtools://devtools/bundled/inspector.html?ws=${n}:${t}
7169
7175
  `
7170
- ), await new Promise((f) => r.on("clientConnected", f)), await new Promise((f) => setTimeout(f, 2e3)), vt.log("Chrome connected! Initializing Xdebug receiver...");
7176
+ ), await new Promise((f) => r.on("clientConnected", f)), await new Promise((f) => setTimeout(f, 2e3)), xt.log("Chrome connected! Initializing Xdebug receiver...");
7171
7177
  const a = new Ts(e);
7172
- vt.log(`XDebug receiver running on port ${e}`), vt.log("Running a PHP script with Xdebug enabled...");
7178
+ xt.log(`XDebug receiver running on port ${e}`), xt.log("Running a PHP script with Xdebug enabled...");
7173
7179
  async function c(f) {
7174
7180
  const h = [], b = o.phpInstance ? await o.phpInstance.listFiles(f) : _r(f);
7175
7181
  for (const O of b) {
@@ -7195,7 +7201,7 @@ const Jr = {
7195
7201
  Debug: { name: "debug", severity: yt.Debug }
7196
7202
  };
7197
7203
  function qo() {
7198
- return xo(zs(process.argv)).usage(
7204
+ return vo(zs(process.argv)).usage(
7199
7205
  `
7200
7206
  XDebug Bridge Server CLI
7201
7207
 
@@ -7238,7 +7244,7 @@ async function Zo() {
7238
7244
  const e = Object.values(Jr).find(
7239
7245
  (n) => n.name === o.verbosity
7240
7246
  ).severity;
7241
- vt.setSeverityFilterLevel(e);
7247
+ xt.setSeverityFilterLevel(e);
7242
7248
  }
7243
7249
  (await Wo({
7244
7250
  cdpPort: 9229,