lone-format 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { defineComponent as be, useCssVars as Ce, ref as G, computed as L, resolveComponent as Me, createElementBlock as N, openBlock as x, createElementVNode as E, createCommentVNode as X, withDirectives as ve, toDisplayString as j, withKeys as le, vModelText as _e, createTextVNode as Se, Fragment as he, renderList as pe, createVNode as Ue, normalizeClass as Oe, nextTick as ce, watch as Fe, normalizeStyle as I, createBlock as Xe } from "vue";
1
+ import { defineComponent as me, useCssVars as Ce, ref as G, computed as V, resolveComponent as Me, createElementBlock as N, openBlock as x, createElementVNode as E, createCommentVNode as F, withDirectives as ve, toDisplayString as R, withKeys as le, vModelText as _e, createTextVNode as Se, Fragment as he, renderList as pe, createVNode as Ue, normalizeClass as Oe, nextTick as ce, watch as Fe, normalizeStyle as I, createBlock as Xe } from "vue";
2
2
  class De {
3
3
  /**
4
4
  * @callback HookCallback
@@ -714,12 +714,12 @@ Object.assign(c, {
714
714
  });
715
715
  c.max_unop_len = c.getMaxKeyLen(c.unary_ops);
716
716
  c.max_binop_len = c.getMaxKeyLen(c.binary_ops);
717
- const ee = (r) => new c(r).parse(), tt = Object.getOwnPropertyNames(class {
717
+ const J = (r) => new c(r).parse(), tt = Object.getOwnPropertyNames(class {
718
718
  });
719
- Object.getOwnPropertyNames(c).filter((r) => !tt.includes(r) && ee[r] === void 0).forEach((r) => {
720
- ee[r] = c[r];
719
+ Object.getOwnPropertyNames(c).filter((r) => !tt.includes(r) && J[r] === void 0).forEach((r) => {
720
+ J[r] = c[r];
721
721
  });
722
- ee.Jsep = c;
722
+ J.Jsep = c;
723
723
  const rt = "ConditionalExpression";
724
724
  var nt = {
725
725
  name: "ternary",
@@ -748,7 +748,7 @@ var nt = {
748
748
  });
749
749
  }
750
750
  };
751
- ee.plugins.register(nt);
751
+ J.plugins.register(nt);
752
752
  const Ie = 47, st = 92;
753
753
  var ot = {
754
754
  name: "regex",
@@ -822,11 +822,11 @@ const xe = 43, it = 45, ue = {
822
822
  }
823
823
  }
824
824
  };
825
- ee.plugins.register(ot, ue);
826
- ee.addUnaryOp("typeof");
827
- ee.addLiteral("null", null);
828
- ee.addLiteral("undefined", void 0);
829
- const at = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter__", "__defineSetter__"]), R = {
825
+ J.plugins.register(ot, ue);
826
+ J.addUnaryOp("typeof");
827
+ J.addLiteral("null", null);
828
+ J.addLiteral("undefined", void 0);
829
+ const at = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter__", "__defineSetter__"]), L = {
830
830
  /**
831
831
  * @param {jsep.Expression} ast
832
832
  * @param {Record<string, any>} subs
@@ -835,25 +835,25 @@ const at = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter_
835
835
  switch (r.type) {
836
836
  case "BinaryExpression":
837
837
  case "LogicalExpression":
838
- return R.evalBinaryExpression(r, e);
838
+ return L.evalBinaryExpression(r, e);
839
839
  case "Compound":
840
- return R.evalCompound(r, e);
840
+ return L.evalCompound(r, e);
841
841
  case "ConditionalExpression":
842
- return R.evalConditionalExpression(r, e);
842
+ return L.evalConditionalExpression(r, e);
843
843
  case "Identifier":
844
- return R.evalIdentifier(r, e);
844
+ return L.evalIdentifier(r, e);
845
845
  case "Literal":
846
- return R.evalLiteral(r, e);
846
+ return L.evalLiteral(r, e);
847
847
  case "MemberExpression":
848
- return R.evalMemberExpression(r, e);
848
+ return L.evalMemberExpression(r, e);
849
849
  case "UnaryExpression":
850
- return R.evalUnaryExpression(r, e);
850
+ return L.evalUnaryExpression(r, e);
851
851
  case "ArrayExpression":
852
- return R.evalArrayExpression(r, e);
852
+ return L.evalArrayExpression(r, e);
853
853
  case "CallExpression":
854
- return R.evalCallExpression(r, e);
854
+ return L.evalCallExpression(r, e);
855
855
  case "AssignmentExpression":
856
- return R.evalAssignmentExpression(r, e);
856
+ return L.evalAssignmentExpression(r, e);
857
857
  default:
858
858
  throw SyntaxError("Unexpected expression", r);
859
859
  }
@@ -883,19 +883,19 @@ const at = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter_
883
883
  "*": (s, n) => s * n(),
884
884
  "/": (s, n) => s / n(),
885
885
  "%": (s, n) => s % n()
886
- }[r.operator](R.evalAst(r.left, e), () => R.evalAst(r.right, e));
886
+ }[r.operator](L.evalAst(r.left, e), () => L.evalAst(r.right, e));
887
887
  },
888
888
  evalCompound(r, e) {
889
889
  let t;
890
890
  for (let s = 0; s < r.body.length; s++) {
891
891
  r.body[s].type === "Identifier" && ["var", "let", "const"].includes(r.body[s].name) && r.body[s + 1] && r.body[s + 1].type === "AssignmentExpression" && (s += 1);
892
892
  const n = r.body[s];
893
- t = R.evalAst(n, e);
893
+ t = L.evalAst(n, e);
894
894
  }
895
895
  return t;
896
896
  },
897
897
  evalConditionalExpression(r, e) {
898
- return R.evalAst(r.test, e) ? R.evalAst(r.consequent, e) : R.evalAst(r.alternate, e);
898
+ return L.evalAst(r.test, e) ? L.evalAst(r.consequent, e) : L.evalAst(r.alternate, e);
899
899
  },
900
900
  evalIdentifier(r, e) {
901
901
  if (Object.hasOwn(e, r.name))
@@ -910,9 +910,9 @@ const at = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter_
910
910
  // NOTE: `String(value)` throws error when
911
911
  // value has overwritten the toString method to return non-string
912
912
  // i.e. `value = {toString: () => []}`
913
- r.computed ? R.evalAst(r.property) : r.property.name
913
+ r.computed ? L.evalAst(r.property) : r.property.name
914
914
  // `object.property` property is Identifier
915
- ), s = R.evalAst(r.object, e);
915
+ ), s = L.evalAst(r.object, e);
916
916
  if (s == null)
917
917
  throw TypeError(`Cannot read properties of ${s} (reading '${t}')`);
918
918
  if (!Object.hasOwn(s, t) && at.has(t))
@@ -922,25 +922,25 @@ const at = /* @__PURE__ */ new Set(["constructor", "__proto__", "__defineGetter_
922
922
  },
923
923
  evalUnaryExpression(r, e) {
924
924
  return {
925
- "-": (s) => -R.evalAst(s, e),
926
- "!": (s) => !R.evalAst(s, e),
927
- "~": (s) => ~R.evalAst(s, e),
925
+ "-": (s) => -L.evalAst(s, e),
926
+ "!": (s) => !L.evalAst(s, e),
927
+ "~": (s) => ~L.evalAst(s, e),
928
928
  // eslint-disable-next-line no-implicit-coercion -- API
929
- "+": (s) => +R.evalAst(s, e),
930
- typeof: (s) => typeof R.evalAst(s, e)
929
+ "+": (s) => +L.evalAst(s, e),
930
+ typeof: (s) => typeof L.evalAst(s, e)
931
931
  }[r.operator](r.argument);
932
932
  },
933
933
  evalArrayExpression(r, e) {
934
- return r.elements.map((t) => R.evalAst(t, e));
934
+ return r.elements.map((t) => L.evalAst(t, e));
935
935
  },
936
936
  evalCallExpression(r, e) {
937
- const t = r.arguments.map((n) => R.evalAst(n, e));
938
- return R.evalAst(r.callee, e)(...t);
937
+ const t = r.arguments.map((n) => L.evalAst(n, e));
938
+ return L.evalAst(r.callee, e)(...t);
939
939
  },
940
940
  evalAssignmentExpression(r, e) {
941
941
  if (r.left.type !== "Identifier")
942
942
  throw SyntaxError("Invalid left-hand side in assignment");
943
- const t = r.left.name, s = R.evalAst(r.right, e);
943
+ const t = r.left.name, s = L.evalAst(r.right, e);
944
944
  return e[t] = s, e[t];
945
945
  }
946
946
  };
@@ -949,7 +949,7 @@ class lt {
949
949
  * @param {string} expr Expression to evaluate
950
950
  */
951
951
  constructor(e) {
952
- this.code = e, this.ast = ee(this.code);
952
+ this.code = e, this.ast = J(this.code);
953
953
  }
954
954
  /**
955
955
  * @param {object} context Object whose items will be added
@@ -958,10 +958,10 @@ class lt {
958
958
  */
959
959
  runInNewContext(e) {
960
960
  const t = Object.assign(/* @__PURE__ */ Object.create(null), e);
961
- return R.evalAst(this.ast, t);
961
+ return L.evalAst(this.ast, t);
962
962
  }
963
963
  }
964
- function te(r, e) {
964
+ function re(r, e) {
965
965
  return r = r.slice(), r.push(e), r;
966
966
  }
967
967
  function ke(r, e) {
@@ -1062,19 +1062,19 @@ $.prototype._trace = function(r, e, t, s, n, o, i, u) {
1062
1062
  }, this._handleCallback(a, o, "value"), a;
1063
1063
  const l = r[0], h = r.slice(1), f = [];
1064
1064
  function y(m) {
1065
- Array.isArray(m) ? m.forEach((C) => {
1066
- f.push(C);
1065
+ Array.isArray(m) ? m.forEach((A) => {
1066
+ f.push(A);
1067
1067
  }) : f.push(m);
1068
1068
  }
1069
1069
  if ((typeof l != "string" || u) && e && Object.hasOwn(e, l))
1070
- y(this._trace(h, e[l], te(t, l), e, l, o, i));
1070
+ y(this._trace(h, e[l], re(t, l), e, l, o, i));
1071
1071
  else if (l === "*")
1072
1072
  this._walk(e, (m) => {
1073
- y(this._trace(h, e[m], te(t, m), e, m, o, !0, !0));
1073
+ y(this._trace(h, e[m], re(t, m), e, m, o, !0, !0));
1074
1074
  });
1075
1075
  else if (l === "..")
1076
1076
  y(this._trace(h, e, t, s, n, o, i)), this._walk(e, (m) => {
1077
- typeof e[m] == "object" && y(this._trace(r.slice(), e[m], te(t, m), e, m, o, !0));
1077
+ typeof e[m] == "object" && y(this._trace(r.slice(), e[m], re(t, m), e, m, o, !0));
1078
1078
  });
1079
1079
  else {
1080
1080
  if (l === "^")
@@ -1085,7 +1085,7 @@ $.prototype._trace = function(r, e, t, s, n, o, i, u) {
1085
1085
  };
1086
1086
  if (l === "~")
1087
1087
  return a = {
1088
- path: te(t, l),
1088
+ path: re(t, l),
1089
1089
  value: n,
1090
1090
  parent: s,
1091
1091
  parentProperty: null
@@ -1097,12 +1097,12 @@ $.prototype._trace = function(r, e, t, s, n, o, i, u) {
1097
1097
  else if (l.indexOf("?(") === 0) {
1098
1098
  if (this.currEval === !1)
1099
1099
  throw new Error("Eval [?(expr)] prevented in JSONPath expression.");
1100
- const m = l.replace(/^\?\((.*?)\)$/u, "$1"), C = /@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(m);
1101
- C ? this._walk(e, (O) => {
1102
- const P = [C[2]], M = C[1] ? e[O][C[1]] : e[O];
1103
- this._trace(P, M, t, s, n, o, !0).length > 0 && y(this._trace(h, e[O], te(t, O), e, O, o, !0));
1100
+ const m = l.replace(/^\?\((.*?)\)$/u, "$1"), A = /@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(m);
1101
+ A ? this._walk(e, (O) => {
1102
+ const P = [A[2]], M = A[1] ? e[O][A[1]] : e[O];
1103
+ this._trace(P, M, t, s, n, o, !0).length > 0 && y(this._trace(h, e[O], re(t, O), e, O, o, !0));
1104
1104
  }) : this._walk(e, (O) => {
1105
- this._eval(m, e[O], O, t, s, n) && y(this._trace(h, e[O], te(t, O), e, O, o, !0));
1105
+ this._eval(m, e[O], O, t, s, n) && y(this._trace(h, e[O], re(t, O), e, O, o, !0));
1106
1106
  });
1107
1107
  } else if (l[0] === "(") {
1108
1108
  if (this.currEval === !1)
@@ -1110,8 +1110,8 @@ $.prototype._trace = function(r, e, t, s, n, o, i, u) {
1110
1110
  y(this._trace(ke(this._eval(l, e, t.at(-1), t.slice(0, -1), s, n), h), e, t, s, n, o, i));
1111
1111
  } else if (l[0] === "@") {
1112
1112
  let m = !1;
1113
- const C = l.slice(1, -2);
1114
- switch (C) {
1113
+ const A = l.slice(1, -2);
1114
+ switch (A) {
1115
1115
  case "scalar":
1116
1116
  (!e || !["object", "function"].includes(typeof e)) && (m = !0);
1117
1117
  break;
@@ -1119,7 +1119,7 @@ $.prototype._trace = function(r, e, t, s, n, o, i, u) {
1119
1119
  case "string":
1120
1120
  case "undefined":
1121
1121
  case "function":
1122
- typeof e === C && (m = !0);
1122
+ typeof e === A && (m = !0);
1123
1123
  break;
1124
1124
  case "integer":
1125
1125
  Number.isFinite(e) && !(e % 1) && (m = !0);
@@ -1131,7 +1131,7 @@ $.prototype._trace = function(r, e, t, s, n, o, i, u) {
1131
1131
  typeof e == "number" && !Number.isFinite(e) && (m = !0);
1132
1132
  break;
1133
1133
  case "object":
1134
- e && typeof e === C && (m = !0);
1134
+ e && typeof e === A && (m = !0);
1135
1135
  break;
1136
1136
  case "array":
1137
1137
  Array.isArray(e) && (m = !0);
@@ -1144,7 +1144,7 @@ $.prototype._trace = function(r, e, t, s, n, o, i, u) {
1144
1144
  break;
1145
1145
  /* c8 ignore next 2 */
1146
1146
  default:
1147
- throw new TypeError("Unknown value type " + C);
1147
+ throw new TypeError("Unknown value type " + A);
1148
1148
  }
1149
1149
  if (m)
1150
1150
  return a = {
@@ -1155,18 +1155,18 @@ $.prototype._trace = function(r, e, t, s, n, o, i, u) {
1155
1155
  }, this._handleCallback(a, o, "value"), a;
1156
1156
  } else if (l[0] === "`" && e && Object.hasOwn(e, l.slice(1))) {
1157
1157
  const m = l.slice(1);
1158
- y(this._trace(h, e[m], te(t, m), e, m, o, i, !0));
1158
+ y(this._trace(h, e[m], re(t, m), e, m, o, i, !0));
1159
1159
  } else if (l.includes(",")) {
1160
1160
  const m = l.split(",");
1161
- for (const C of m)
1162
- y(this._trace(ke(C, h), e, t, s, n, o, !0));
1163
- } else !u && e && Object.hasOwn(e, l) && y(this._trace(h, e[l], te(t, l), e, l, o, i, !0));
1161
+ for (const A of m)
1162
+ y(this._trace(ke(A, h), e, t, s, n, o, !0));
1163
+ } else !u && e && Object.hasOwn(e, l) && y(this._trace(h, e[l], re(t, l), e, l, o, i, !0));
1164
1164
  }
1165
1165
  if (this._hasParentSelector)
1166
1166
  for (let m = 0; m < f.length; m++) {
1167
- const C = f[m];
1168
- if (C && C.isParentSelector) {
1169
- const O = this._trace(C.expr, e, C.path, s, n, o, i);
1167
+ const A = f[m];
1168
+ if (A && A.isParentSelector) {
1169
+ const O = this._trace(A.expr, e, A.path, s, n, o, i);
1170
1170
  if (Array.isArray(O)) {
1171
1171
  f[m] = O[0];
1172
1172
  const P = O.length;
@@ -1306,7 +1306,7 @@ const ft = { class: "json-node" }, ht = {
1306
1306
  }, pt = { class: "json-node__line" }, gt = {
1307
1307
  key: 2,
1308
1308
  class: "json-node__colon"
1309
- }, bt = ["title"], mt = {
1309
+ }, mt = ["title"], bt = {
1310
1310
  key: 3,
1311
1311
  class: "json-node__collapsed"
1312
1312
  }, yt = {
@@ -1327,7 +1327,7 @@ const ft = { class: "json-node" }, ht = {
1327
1327
  }, At = ["title"], Ct = {
1328
1328
  key: 0,
1329
1329
  class: "json-node__comma"
1330
- }, Ot = /* @__PURE__ */ be({
1330
+ }, Ot = /* @__PURE__ */ me({
1331
1331
  name: "JsonNode",
1332
1332
  __name: "JsonNode",
1333
1333
  props: {
@@ -1354,19 +1354,19 @@ const ft = { class: "json-node" }, ht = {
1354
1354
  "231c0282": b.theme.colors.background,
1355
1355
  e1dce7d8: b.theme.colors.indentLine
1356
1356
  }));
1357
- const t = r, s = e, n = G(!1), o = G(!1), i = G(""), u = G(""), a = (b) => b !== null && typeof b == "object" && !Array.isArray(b) && "__protected_number__" in b && Object.keys(b).length === 1, l = (b) => a(b) ? b.__protected_number__ : "", h = L(() => a(t.value) ? !1 : t.value !== null && typeof t.value == "object"), f = L(() => Array.isArray(t.value)), y = L(() => t.path ? t.path : t.keyName ? t.keyName : "root"), m = L(() => t.expanded.has(y.value)), C = L(() => t.keyName), O = L(() => f.value ? "[" : "{"), P = L(() => f.value ? "]" : "}"), M = L(() => {
1357
+ const t = r, s = e, n = G(!1), o = G(!1), i = G(""), u = G(""), a = (b) => b !== null && typeof b == "object" && !Array.isArray(b) && "__protected_number__" in b && Object.keys(b).length === 1, l = (b) => a(b) ? b.__protected_number__ : "", h = V(() => a(t.value) ? !1 : t.value !== null && typeof t.value == "object"), f = V(() => Array.isArray(t.value)), y = V(() => t.path ? t.path : t.keyName ? t.keyName : "root"), m = V(() => t.expanded.has(y.value)), A = V(() => t.keyName), O = V(() => f.value ? "[" : "{"), P = V(() => f.value ? "]" : "}"), M = V(() => {
1358
1358
  if (!t.value) return "";
1359
1359
  const d = Object.keys(t.value).length;
1360
1360
  return f.value ? d > 0 ? ` ${d} items ` : " " : d > 0 ? ` ${d} keys ` : " ";
1361
- }), k = L(() => {
1361
+ }), Q = V(() => {
1362
1362
  const b = typeof t.value;
1363
1363
  return t.value === null ? "json-node__value--null" : b === "boolean" ? "json-node__value--boolean" : b === "number" || a(t.value) ? "json-node__value--number" : b === "string" ? "json-node__value--string" : "";
1364
- }), S = L(() => o.value ? u.value : t.value === null ? "null" : typeof t.value == "boolean" || typeof t.value == "number" ? String(t.value) : a(t.value) ? l(t.value) : typeof t.value == "string" ? `"${t.value}"` : String(t.value)), g = L(() => "Click to edit, double-click to copy"), T = (b) => t.level === 0 ? b : y.value ? `${y.value}.${b}` : b, U = (b) => {
1364
+ }), k = V(() => o.value ? u.value : t.value === null ? "null" : typeof t.value == "boolean" || typeof t.value == "number" ? String(t.value) : a(t.value) ? l(t.value) : typeof t.value == "string" ? `"${t.value}"` : String(t.value)), p = V(() => "Click to edit, double-click to copy"), T = (b) => t.level === 0 ? b : y.value ? `${y.value}.${b}` : b, j = (b) => {
1365
1365
  const d = Object.keys(t.value);
1366
1366
  return d.indexOf(b) === d.length - 1;
1367
- }, V = () => {
1367
+ }, S = () => {
1368
1368
  s("toggle-expand", y.value);
1369
- }, Y = () => {
1369
+ }, X = () => {
1370
1370
  t.level !== 0 && (n.value = !0, i.value = t.keyName, ce(() => {
1371
1371
  const b = document.querySelectorAll(".json-node__key-input"), d = b[b.length - 1];
1372
1372
  d && (d.focus(), d.select());
@@ -1376,11 +1376,11 @@ const ft = { class: "json-node" }, ht = {
1376
1376
  const b = document.querySelectorAll(".json-node__value-input"), d = b[b.length - 1];
1377
1377
  d && (d.focus(), d.select());
1378
1378
  }));
1379
- }, D = () => {
1379
+ }, ee = () => {
1380
1380
  if (t.level === 0 || !n.value) return;
1381
1381
  const b = i.value.trim();
1382
1382
  if (!b) {
1383
- ie();
1383
+ te();
1384
1384
  return;
1385
1385
  }
1386
1386
  if (b === t.keyName) {
@@ -1388,7 +1388,7 @@ const ft = { class: "json-node" }, ht = {
1388
1388
  return;
1389
1389
  }
1390
1390
  n.value = !1, s("update:key", y.value, b);
1391
- }, J = () => {
1391
+ }, z = () => {
1392
1392
  try {
1393
1393
  let b;
1394
1394
  const d = u.value.trim();
@@ -1397,56 +1397,56 @@ const ft = { class: "json-node" }, ht = {
1397
1397
  else if (d === "true" || d === "false")
1398
1398
  b = d === "true";
1399
1399
  else if (!isNaN(Number(d)) && d !== "") {
1400
- const p = Number(d);
1401
- !Number.isSafeInteger(p) || d.length > 15 ? b = { __protected_number__: d } : b = p;
1400
+ const g = Number(d);
1401
+ !Number.isSafeInteger(g) || d.length > 15 ? b = { __protected_number__: d } : b = g;
1402
1402
  } else
1403
1403
  b = u.value;
1404
1404
  s("update:value", y.value, b), o.value = !1;
1405
1405
  } catch (b) {
1406
1406
  console.error("Failed to parse value:", b), o.value = !1;
1407
1407
  }
1408
- }, ie = () => {
1408
+ }, te = () => {
1409
1409
  n.value = !1, i.value = t.keyName;
1410
1410
  }, Ee = () => {
1411
1411
  o.value = !1, a(t.value) ? u.value = l(t.value) : typeof t.value == "string" ? u.value = t.value : u.value = String(t.value);
1412
1412
  };
1413
1413
  return (b, d) => {
1414
- const p = Me("JsonNode", !0);
1414
+ const g = Me("JsonNode", !0);
1415
1415
  return x(), N("div", ft, [
1416
1416
  h.value ? (x(), N("div", ht, [
1417
1417
  E("div", pt, [
1418
1418
  b.keyName && !n.value ? (x(), N("span", {
1419
1419
  key: 0,
1420
1420
  class: "json-node__key",
1421
- onClick: Y,
1421
+ onClick: X,
1422
1422
  title: "Click to edit key"
1423
- }, ' "' + j(C.value) + '" ', 1)) : X("", !0),
1423
+ }, ' "' + R(A.value) + '" ', 1)) : F("", !0),
1424
1424
  b.keyName && n.value ? ve((x(), N("input", {
1425
1425
  key: 1,
1426
1426
  "onUpdate:modelValue": d[0] || (d[0] = (_) => i.value = _),
1427
1427
  onKeyup: [
1428
- le(D, ["enter"]),
1429
- le(ie, ["escape"])
1428
+ le(ee, ["enter"]),
1429
+ le(te, ["escape"])
1430
1430
  ],
1431
- onBlur: D,
1431
+ onBlur: ee,
1432
1432
  class: "json-node__key-input"
1433
1433
  }, null, 544)), [
1434
1434
  [_e, i.value]
1435
- ]) : X("", !0),
1436
- b.keyName ? (x(), N("span", gt, ": ")) : X("", !0),
1435
+ ]) : F("", !0),
1436
+ b.keyName ? (x(), N("span", gt, ": ")) : F("", !0),
1437
1437
  E("span", {
1438
1438
  class: "json-node__bracket json-node__bracket--clickable",
1439
- onClick: V,
1439
+ onClick: S,
1440
1440
  title: m.value ? "Click to collapse" : "Click to expand"
1441
- }, j(O.value), 9, bt),
1442
- m.value ? X("", !0) : (x(), N("span", mt, [
1443
- Se(j(M.value) + " ", 1),
1441
+ }, R(O.value), 9, mt),
1442
+ m.value ? F("", !0) : (x(), N("span", bt, [
1443
+ Se(R(M.value) + " ", 1),
1444
1444
  E("span", {
1445
1445
  class: "json-node__bracket json-node__bracket--clickable",
1446
- onClick: V
1447
- }, j(P.value), 1)
1446
+ onClick: S
1447
+ }, R(P.value), 1)
1448
1448
  ])),
1449
- !m.value && !b.isLast ? (x(), N("span", yt, ",")) : X("", !0)
1449
+ !m.value && !b.isLast ? (x(), N("span", yt, ",")) : F("", !0)
1450
1450
  ]),
1451
1451
  m.value ? (x(), N("div", Et, [
1452
1452
  E("div", vt, [
@@ -1454,78 +1454,78 @@ const ft = { class: "json-node" }, ht = {
1454
1454
  key: v,
1455
1455
  class: "json-node__child"
1456
1456
  }, [
1457
- Ue(p, {
1457
+ Ue(g, {
1458
1458
  value: _,
1459
1459
  "key-name": f.value ? "" : String(v),
1460
1460
  level: b.level + 1,
1461
1461
  path: T(String(v)),
1462
1462
  expanded: b.expanded,
1463
1463
  theme: b.theme,
1464
- "onUpdate:value": d[1] || (d[1] = (w, A) => b.$emit("update:value", w, A)),
1464
+ "onUpdate:value": d[1] || (d[1] = (w, C) => b.$emit("update:value", w, C)),
1465
1465
  onToggleExpand: d[2] || (d[2] = (w) => b.$emit("toggle-expand", w)),
1466
1466
  onCopy: d[3] || (d[3] = (w) => b.$emit("copy", w)),
1467
- "onUpdate:key": d[4] || (d[4] = (w, A) => b.$emit("update:key", w, A)),
1468
- "is-last": U(String(v))
1467
+ "onUpdate:key": d[4] || (d[4] = (w, C) => b.$emit("update:key", w, C)),
1468
+ "is-last": j(String(v))
1469
1469
  }, null, 8, ["value", "key-name", "level", "path", "expanded", "theme", "is-last"])
1470
1470
  ]))), 128))
1471
1471
  ]),
1472
1472
  E("div", _t, [
1473
- E("span", xt, j(P.value), 1),
1474
- b.isLast ? X("", !0) : (x(), N("span", Nt, ","))
1473
+ E("span", xt, R(P.value), 1),
1474
+ b.isLast ? F("", !0) : (x(), N("span", Nt, ","))
1475
1475
  ])
1476
- ])) : X("", !0)
1476
+ ])) : F("", !0)
1477
1477
  ])) : (x(), N("div", kt, [
1478
1478
  b.keyName && !n.value ? (x(), N("span", {
1479
1479
  key: 0,
1480
1480
  class: "json-node__key",
1481
- onClick: Y,
1481
+ onClick: X,
1482
1482
  title: "Click to edit key"
1483
- }, ' "' + j(C.value) + '" ', 1)) : X("", !0),
1483
+ }, ' "' + R(A.value) + '" ', 1)) : F("", !0),
1484
1484
  b.keyName && n.value ? ve((x(), N("input", {
1485
1485
  key: 1,
1486
1486
  "onUpdate:modelValue": d[5] || (d[5] = (_) => i.value = _),
1487
1487
  onKeyup: [
1488
- le(D, ["enter"]),
1489
- le(ie, ["escape"])
1488
+ le(ee, ["enter"]),
1489
+ le(te, ["escape"])
1490
1490
  ],
1491
- onBlur: D,
1491
+ onBlur: ee,
1492
1492
  class: "json-node__key-input"
1493
1493
  }, null, 544)), [
1494
1494
  [_e, i.value]
1495
- ]) : X("", !0),
1496
- b.keyName ? (x(), N("span", wt, ": ")) : X("", !0),
1497
- o.value ? X("", !0) : (x(), N("span", {
1495
+ ]) : F("", !0),
1496
+ b.keyName ? (x(), N("span", wt, ": ")) : F("", !0),
1497
+ o.value ? F("", !0) : (x(), N("span", {
1498
1498
  key: 3,
1499
- class: Oe(["json-node__value", k.value]),
1499
+ class: Oe(["json-node__value", Q.value]),
1500
1500
  onClick: Z,
1501
1501
  onDblclick: d[6] || (d[6] = (_) => b.$emit("copy", b.value)),
1502
- title: g.value
1502
+ title: p.value
1503
1503
  }, [
1504
- Se(j(S.value), 1),
1505
- b.isLast ? X("", !0) : (x(), N("span", Ct, ","))
1504
+ Se(R(k.value), 1),
1505
+ b.isLast ? F("", !0) : (x(), N("span", Ct, ","))
1506
1506
  ], 42, At)),
1507
1507
  o.value ? ve((x(), N("input", {
1508
1508
  key: 4,
1509
1509
  "onUpdate:modelValue": d[7] || (d[7] = (_) => u.value = _),
1510
1510
  onKeyup: [
1511
- le(J, ["enter"]),
1511
+ le(z, ["enter"]),
1512
1512
  le(Ee, ["escape"])
1513
1513
  ],
1514
- onBlur: J,
1514
+ onBlur: z,
1515
1515
  class: "json-node__value-input"
1516
1516
  }, null, 544)), [
1517
1517
  [_e, u.value]
1518
- ]) : X("", !0)
1518
+ ]) : F("", !0)
1519
1519
  ]))
1520
1520
  ]);
1521
1521
  };
1522
1522
  }
1523
- }), me = (r, e) => {
1523
+ }), be = (r, e) => {
1524
1524
  const t = r.__vccOpts || r;
1525
1525
  for (const [s, n] of e)
1526
1526
  t[s] = n;
1527
1527
  return t;
1528
- }, Tt = /* @__PURE__ */ me(Ot, [["__scopeId", "data-v-860beb35"]]), He = {
1528
+ }, Tt = /* @__PURE__ */ be(Ot, [["__scopeId", "data-v-860beb35"]]), He = {
1529
1529
  name: "github-light",
1530
1530
  colors: {
1531
1531
  // 背景色
@@ -1690,10 +1690,10 @@ const ft = { class: "json-node" }, ht = {
1690
1690
  function Bt(r = "github-light") {
1691
1691
  return $t[r] || He;
1692
1692
  }
1693
- const Lt = {
1693
+ const Vt = {
1694
1694
  key: 0,
1695
1695
  class: "json-format__toolbar"
1696
- }, Vt = { class: "json-format__actions" }, Rt = ["disabled"], jt = ["disabled"], Mt = ["disabled"], Ut = ["disabled"], Ft = { class: "json-format__info" }, Xt = {
1696
+ }, Lt = { class: "json-format__actions" }, Rt = ["disabled"], jt = ["disabled"], Mt = ["disabled"], Ut = ["disabled"], Ft = { class: "json-format__info" }, Xt = {
1697
1697
  key: 0,
1698
1698
  class: "json-format__status json-format__status--success"
1699
1699
  }, Ht = {
@@ -1708,7 +1708,7 @@ const Lt = {
1708
1708
  }, Qt = {
1709
1709
  key: 2,
1710
1710
  class: "json-format__viewer"
1711
- }, Gt = /* @__PURE__ */ be({
1711
+ }, Gt = /* @__PURE__ */ me({
1712
1712
  name: "JsonFormat",
1713
1713
  __name: "index",
1714
1714
  props: {
@@ -1739,52 +1739,52 @@ const Lt = {
1739
1739
  "2c1c44e4": f.value.colors.scrollbarThumb,
1740
1740
  "8ba97764": f.value.colors.scrollbarThumbHover
1741
1741
  }));
1742
- const s = r, n = t, o = G(null), i = G(""), u = G(/* @__PURE__ */ new Set()), a = G(null), l = G(""), h = L(() => i.value === ""), f = L(() => Bt(s.theme)), y = L(() => l.value ? null : a.value !== null ? a.value : o.value), m = (d) => {
1742
+ const s = r, n = t, o = G(null), i = G(""), u = G(/* @__PURE__ */ new Set()), a = G(null), l = G(""), h = V(() => i.value === ""), f = V(() => Bt(s.theme)), y = V(() => l.value ? null : a.value !== null ? a.value : o.value), m = (d) => {
1743
1743
  if (!d.trim()) {
1744
1744
  o.value = null, i.value = "", a.value = null, l.value = "";
1745
1745
  return;
1746
1746
  }
1747
1747
  try {
1748
- let p = d;
1749
- const _ = /(:\s*|,\s*|\[\s*)-?\d{16,}/.test(p), v = /(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(p);
1748
+ let g = d;
1749
+ const _ = /(:\s*|,\s*|\[\s*)-?\d{16,}/.test(g), v = /(:\s*|,\s*|\[\s*)-?\d+\.\d*0+\s*[,}\]\s]*/.test(g);
1750
1750
  if (!_ && !v)
1751
1751
  try {
1752
- o.value = JSON.parse(p), i.value = "", a.value = null, l.value = "", ce(() => {
1753
- y.value !== null && g();
1752
+ o.value = JSON.parse(g), i.value = "", a.value = null, l.value = "", ce(() => {
1753
+ y.value !== null && p();
1754
1754
  });
1755
1755
  return;
1756
1756
  } catch {
1757
1757
  }
1758
- p = ((A) => {
1759
- let B = "", H = !1, K = !1, z = 0;
1760
- for (; z < A.length; ) {
1761
- const ae = A[z];
1758
+ g = ((C) => {
1759
+ let B = "", H = !1, K = !1, D = 0;
1760
+ for (; D < C.length; ) {
1761
+ const ae = C[D];
1762
1762
  if (H)
1763
- K ? K = !1 : ae === "\\" ? K = !0 : ae === '"' && (H = !1), B += ae, z++;
1763
+ K ? K = !1 : ae === "\\" ? K = !0 : ae === '"' && (H = !1), B += ae, D++;
1764
1764
  else if (ae === '"')
1765
- H = !0, B += ae, z++;
1765
+ H = !0, B += ae, D++;
1766
1766
  else {
1767
- const Pe = A.slice(z);
1767
+ const Pe = C.slice(D);
1768
1768
  let W = Pe.match(/^([:,\[\s]*)(-?\d{16,})(\s*[,\}\]\s]|$)/);
1769
1769
  if (W) {
1770
- B += W[1] + '{"__protected_number__":"' + W[2] + '"}' + W[3], z += W[0].length;
1770
+ B += W[1] + '{"__protected_number__":"' + W[2] + '"}' + W[3], D += W[0].length;
1771
1771
  continue;
1772
1772
  }
1773
1773
  if (W = Pe.match(/^([:,\[\s]*)(-?\d+\.\d*0+)(\s*[,\}\]\s]|$)/), W) {
1774
- B += W[1] + '{"__protected_number__":"' + W[2] + '"}' + W[3], z += W[0].length;
1774
+ B += W[1] + '{"__protected_number__":"' + W[2] + '"}' + W[3], D += W[0].length;
1775
1775
  continue;
1776
1776
  }
1777
- B += ae, z++;
1777
+ B += ae, D++;
1778
1778
  }
1779
1779
  }
1780
1780
  return B;
1781
- })(p), o.value = JSON.parse(p), i.value = "", a.value = null, l.value = "", ce(() => {
1782
- y.value !== null && g();
1781
+ })(g), o.value = JSON.parse(g), i.value = "", a.value = null, l.value = "", ce(() => {
1782
+ y.value !== null && p();
1783
1783
  });
1784
- } catch (p) {
1785
- i.value = p instanceof Error ? p.message : "Unknown parsing error", o.value = null, a.value = null, l.value = "";
1784
+ } catch (g) {
1785
+ i.value = g instanceof Error ? g.message : "Unknown parsing error", o.value = null, a.value = null, l.value = "";
1786
1786
  }
1787
- }, C = (d) => {
1787
+ }, A = (d) => {
1788
1788
  if (!d || !d.expression.trim()) {
1789
1789
  O();
1790
1790
  return;
@@ -1794,24 +1794,24 @@ const Lt = {
1794
1794
  return;
1795
1795
  }
1796
1796
  try {
1797
- let p;
1797
+ let g;
1798
1798
  if (d.type === "jsonpath")
1799
- p = $({ path: d.expression, json: o.value }), p.length === 1 && d.expression.includes("$[") === !1 && !d.expression.endsWith("[*]") ? a.value = p[0] : a.value = p;
1799
+ g = $({ path: d.expression, json: o.value }), g.length === 1 && d.expression.includes("$[") === !1 && !d.expression.endsWith("[*]") ? a.value = g[0] : a.value = g;
1800
1800
  else if (d.type === "js")
1801
- p = new Function("data", `
1801
+ g = new Function("data", `
1802
1802
  try {
1803
1803
  return ${d.expression};
1804
1804
  } catch (error) {
1805
1805
  throw new Error('JavaScript expression error: ' + error.message);
1806
1806
  }
1807
- `)(o.value), a.value = p;
1807
+ `)(o.value), a.value = g;
1808
1808
  else
1809
1809
  throw new Error(`Unsupported filter type: ${d.type}`);
1810
1810
  l.value = "", ce(() => {
1811
- g();
1811
+ p();
1812
1812
  });
1813
- } catch (p) {
1814
- l.value = p instanceof Error ? p.message : "Filter execution error", a.value = null;
1813
+ } catch (g) {
1814
+ l.value = g instanceof Error ? g.message : "Filter execution error", a.value = null;
1815
1815
  }
1816
1816
  }, O = () => {
1817
1817
  a.value = null, l.value = "";
@@ -1819,7 +1819,7 @@ const Lt = {
1819
1819
  Fe(() => s.modelValue, (d) => {
1820
1820
  m(d);
1821
1821
  }, { immediate: !0 });
1822
- const P = (d, p, _) => {
1822
+ const P = (d, g, _) => {
1823
1823
  const v = (B) => {
1824
1824
  if (B === null || typeof B != "object")
1825
1825
  return B;
@@ -1828,144 +1828,144 @@ const Lt = {
1828
1828
  if (Array.isArray(B))
1829
1829
  return B.map((K) => v(K));
1830
1830
  const H = {};
1831
- for (const [K, z] of Object.entries(B))
1832
- H[K] = v(z);
1831
+ for (const [K, D] of Object.entries(B))
1832
+ H[K] = v(D);
1833
1833
  return H;
1834
1834
  }, w = v(d);
1835
- return JSON.stringify(w, p, _).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g, "$1");
1836
- }, M = (d, p) => {
1835
+ return JSON.stringify(w, g, _).replace(/"__PROTECTED_NUMBER_(.+?)_PROTECTED_NUMBER__"/g, "$1");
1836
+ }, M = (d, g) => {
1837
1837
  if (!s.readonly)
1838
1838
  try {
1839
- const _ = k(o.value, d, p), v = P(_, null, 2);
1839
+ const _ = Q(o.value, d, g), v = P(_, null, 2);
1840
1840
  n("update:modelValue", v);
1841
1841
  } catch (_) {
1842
1842
  console.error("Failed to update JSON:", _);
1843
1843
  }
1844
- }, k = (d, p, _) => {
1845
- if (!p || p === "root") return _;
1846
- const v = p.split("."), w = J(d, v.slice(0, -1));
1847
- let A = w;
1844
+ }, Q = (d, g, _) => {
1845
+ if (!g || g === "root") return _;
1846
+ const v = g.split("."), w = z(d, v.slice(0, -1));
1847
+ let C = w;
1848
1848
  for (let H = 0; H < v.length - 1; H++) {
1849
1849
  const K = v[H];
1850
- K !== "root" && (Array.isArray(A) ? A = A[parseInt(K)] : A = A[K]);
1850
+ K !== "root" && (Array.isArray(C) ? C = C[parseInt(K)] : C = C[K]);
1851
1851
  }
1852
1852
  const B = v[v.length - 1];
1853
- return B === "root" ? _ : (Array.isArray(A) ? A[parseInt(B)] = _ : A[B] = _, w);
1854
- }, S = (d) => {
1853
+ return B === "root" ? _ : (Array.isArray(C) ? C[parseInt(B)] = _ : C[B] = _, w);
1854
+ }, k = (d) => {
1855
1855
  u.value.has(d) ? u.value.delete(d) : u.value.add(d);
1856
- }, g = () => {
1857
- const d = /* @__PURE__ */ new Set(), p = (_, v = "") => {
1858
- _ !== null && typeof _ == "object" && (d.add(v || "root"), Array.isArray(_) ? _.forEach((w, A) => {
1859
- const B = v ? `${v}.${A}` : `${A}`;
1860
- p(w, B);
1856
+ }, p = () => {
1857
+ const d = /* @__PURE__ */ new Set(), g = (_, v = "") => {
1858
+ _ !== null && typeof _ == "object" && (d.add(v || "root"), Array.isArray(_) ? _.forEach((w, C) => {
1859
+ const B = v ? `${v}.${C}` : `${C}`;
1860
+ g(w, B);
1861
1861
  }) : Object.keys(_).forEach((w) => {
1862
- const A = v ? `${v}.${w}` : w;
1863
- p(_[w], A);
1862
+ const C = v ? `${v}.${w}` : w;
1863
+ g(_[w], C);
1864
1864
  }));
1865
1865
  };
1866
- p(y.value), u.value = d, n("expand-all");
1866
+ g(y.value), u.value = d, n("expand-all");
1867
1867
  }, T = () => {
1868
1868
  u.value = /* @__PURE__ */ new Set(["root"]), n("collapse-all");
1869
- }, U = async () => {
1869
+ }, j = async () => {
1870
1870
  if (h.value)
1871
1871
  try {
1872
- const d = y.value, p = P(d, null, 2);
1873
- await navigator.clipboard.writeText(p), n("copy-success", p);
1872
+ const d = y.value, g = P(d, null, 2);
1873
+ await navigator.clipboard.writeText(g), n("copy-success", g);
1874
1874
  } catch (d) {
1875
1875
  console.error("Failed to copy JSON:", d), n("copy-error", d instanceof Error ? d : new Error("Failed to copy JSON"));
1876
1876
  }
1877
- }, V = () => {
1877
+ }, S = () => {
1878
1878
  if (h.value)
1879
1879
  try {
1880
- const d = y.value, p = P(d);
1881
- n("update:modelValue", p), n("compress", p);
1880
+ const d = y.value, g = P(d);
1881
+ n("update:modelValue", g), n("compress", g);
1882
1882
  } catch (d) {
1883
1883
  console.error("Failed to compress JSON:", d);
1884
1884
  }
1885
- }, Y = async (d) => {
1885
+ }, X = async (d) => {
1886
1886
  try {
1887
- let p;
1888
- typeof d == "object" && d !== null && !Array.isArray(d) && "__protected_number__" in d && Object.keys(d).length === 1 ? p = d.__protected_number__ : typeof d == "string" ? p = `"${d}"` : p = JSON.stringify(d), await navigator.clipboard.writeText(p);
1889
- } catch (p) {
1890
- console.error("Failed to copy value:", p);
1887
+ let g;
1888
+ typeof d == "object" && d !== null && !Array.isArray(d) && "__protected_number__" in d && Object.keys(d).length === 1 ? g = d.__protected_number__ : typeof d == "string" ? g = `"${d}"` : g = JSON.stringify(d), await navigator.clipboard.writeText(g);
1889
+ } catch (g) {
1890
+ console.error("Failed to copy value:", g);
1891
1891
  }
1892
- }, Z = (d, p) => {
1892
+ }, Z = (d, g) => {
1893
1893
  if (!s.readonly)
1894
1894
  try {
1895
- const _ = D(o.value, d, p), v = P(_, null, 2);
1896
- n("update:modelValue", v), b(d, p);
1895
+ const _ = ee(o.value, d, g), v = P(_, null, 2);
1896
+ n("update:modelValue", v), b(d, g);
1897
1897
  } catch (_) {
1898
1898
  console.error("Failed to rename key:", _);
1899
1899
  }
1900
- }, D = (d, p, _) => {
1901
- if (!p || p === "root") return d;
1902
- const v = p.split("."), w = J(d, v.slice(0, -1));
1900
+ }, ee = (d, g, _) => {
1901
+ if (!g || g === "root") return d;
1902
+ const v = g.split("."), w = z(d, v.slice(0, -1));
1903
1903
  if (v.length === 1) {
1904
1904
  const H = v[0];
1905
- return w && typeof w == "object" && !Array.isArray(w) ? ie(w, H, _) : w;
1905
+ return w && typeof w == "object" && !Array.isArray(w) ? te(w, H, _) : w;
1906
1906
  }
1907
- let A = w;
1907
+ let C = w;
1908
1908
  for (let H = 0; H < v.length - 1; H++) {
1909
1909
  const K = v[H];
1910
- Array.isArray(A) ? A = A[parseInt(K)] : A = A[K];
1910
+ Array.isArray(C) ? C = C[parseInt(K)] : C = C[K];
1911
1911
  }
1912
1912
  const B = v[v.length - 1];
1913
- if (!Array.isArray(A) && A && typeof A == "object") {
1914
- const H = ie(A, B, _), K = v.slice(0, -1);
1913
+ if (!Array.isArray(C) && C && typeof C == "object") {
1914
+ const H = te(C, B, _), K = v.slice(0, -1);
1915
1915
  K.length > 0 && Ee(w, K, H);
1916
1916
  }
1917
1917
  return w;
1918
- }, J = (d, p) => {
1919
- if (p.length === 0) return d;
1918
+ }, z = (d, g) => {
1919
+ if (g.length === 0) return d;
1920
1920
  if (Array.isArray(d)) {
1921
- const _ = [...d], v = p[0], w = parseInt(v);
1922
- return p.length === 1 || (_[w] = J(d[w], p.slice(1))), _;
1921
+ const _ = [...d], v = g[0], w = parseInt(v);
1922
+ return g.length === 1 || (_[w] = z(d[w], g.slice(1))), _;
1923
1923
  } else if (d && typeof d == "object") {
1924
- const _ = { ...d }, v = p[0];
1925
- return p.length === 1 || (_[v] = J(d[v], p.slice(1))), _;
1924
+ const _ = { ...d }, v = g[0];
1925
+ return g.length === 1 || (_[v] = z(d[v], g.slice(1))), _;
1926
1926
  }
1927
1927
  return d;
1928
- }, ie = (d, p, _) => {
1928
+ }, te = (d, g, _) => {
1929
1929
  if (!d || typeof d != "object" || Array.isArray(d))
1930
1930
  return d;
1931
1931
  const v = Object.keys(d), w = {};
1932
- for (const A of v)
1933
- A === p ? w[_] = d[A] : w[A] = d[A];
1932
+ for (const C of v)
1933
+ C === g ? w[_] = d[C] : w[C] = d[C];
1934
1934
  return w;
1935
- }, Ee = (d, p, _) => {
1935
+ }, Ee = (d, g, _) => {
1936
1936
  let v = d;
1937
- for (let A = 0; A < p.length - 1; A++) {
1938
- const B = p[A];
1937
+ for (let C = 0; C < g.length - 1; C++) {
1938
+ const B = g[C];
1939
1939
  Array.isArray(v) ? v = v[parseInt(B)] : v = v[B];
1940
1940
  }
1941
- const w = p[p.length - 1];
1941
+ const w = g[g.length - 1];
1942
1942
  Array.isArray(v) ? v[parseInt(w)] = _ : v[w] = _;
1943
- }, b = (d, p) => {
1943
+ }, b = (d, g) => {
1944
1944
  const _ = /* @__PURE__ */ new Set();
1945
1945
  u.value.forEach((v) => {
1946
1946
  if (v === d) {
1947
1947
  const w = d.split(".");
1948
- w[w.length - 1] = p, _.add(w.join("."));
1948
+ w[w.length - 1] = g, _.add(w.join("."));
1949
1949
  } else if (v.startsWith(d + ".")) {
1950
1950
  const w = d.split(".");
1951
- w[w.length - 1] = p;
1952
- const A = w.join("."), B = v.substring(d.length);
1953
- _.add(A + B);
1951
+ w[w.length - 1] = g;
1952
+ const C = w.join("."), B = v.substring(d.length);
1953
+ _.add(C + B);
1954
1954
  } else
1955
1955
  _.add(v);
1956
1956
  }), u.value = _;
1957
1957
  };
1958
1958
  return e({
1959
1959
  // 核心操作方法
1960
- copyJson: U,
1961
- compressSource: V,
1962
- expandAll: g,
1960
+ copyJson: j,
1961
+ compressSource: S,
1962
+ expandAll: p,
1963
1963
  collapseAll: T,
1964
- toggleExpand: S,
1964
+ toggleExpand: k,
1965
1965
  updateValue: M,
1966
1966
  updateKey: Z,
1967
1967
  // Filter 相关方法
1968
- filter: C,
1968
+ filter: A,
1969
1969
  clearFilter: O,
1970
1970
  // 状态访问方法
1971
1971
  isValidJson: () => h.value,
@@ -1976,21 +1976,21 @@ const Lt = {
1976
1976
  getFilterError: () => l.value,
1977
1977
  // 工具方法
1978
1978
  parseJson: (d) => m(d),
1979
- copyValue: (d) => Y(d)
1980
- }), (d, p) => (x(), N("div", {
1979
+ copyValue: (d) => X(d)
1980
+ }), (d, g) => (x(), N("div", {
1981
1981
  class: Oe(["json-format", `json-format--${f.value.name}`])
1982
1982
  }, [
1983
- d.showToolbar ? (x(), N("div", Lt, [
1984
- E("div", Vt, [
1983
+ d.showToolbar ? (x(), N("div", Vt, [
1984
+ E("div", Lt, [
1985
1985
  E("button", {
1986
1986
  class: "json-format__btn json-format__btn--primary",
1987
- onClick: U,
1987
+ onClick: j,
1988
1988
  disabled: !h.value,
1989
1989
  title: "Copy JSON"
1990
1990
  }, " 📋 Copy ", 8, Rt),
1991
1991
  E("button", {
1992
1992
  class: "json-format__btn json-format__btn--secondary",
1993
- onClick: g,
1993
+ onClick: p,
1994
1994
  disabled: !h.value,
1995
1995
  title: "Expand All"
1996
1996
  }, " ⬇️ Expand All ", 8, jt),
@@ -2002,7 +2002,7 @@ const Lt = {
2002
2002
  }, " ➡️ Collapse All ", 8, Mt),
2003
2003
  E("button", {
2004
2004
  class: "json-format__btn json-format__btn--secondary",
2005
- onClick: V,
2005
+ onClick: S,
2006
2006
  disabled: !h.value,
2007
2007
  title: "Compress JSON"
2008
2008
  }, " 📦 Compress ", 8, Ut)
@@ -2010,11 +2010,11 @@ const Lt = {
2010
2010
  E("div", Ft, [
2011
2011
  h.value ? (x(), N("span", Xt, " ✅ Valid JSON ")) : (x(), N("span", Ht, " ❌ Invalid JSON "))
2012
2012
  ])
2013
- ])) : X("", !0),
2013
+ ])) : F("", !0),
2014
2014
  E("div", Kt, [
2015
2015
  h.value ? l.value ? (x(), N("div", qt, [
2016
- p[1] || (p[1] = E("h4", null, "Filter Error:", -1)),
2017
- E("pre", null, j(l.value), 1)
2016
+ g[1] || (g[1] = E("h4", null, "Filter Error:", -1)),
2017
+ E("pre", null, R(l.value), 1)
2018
2018
  ])) : (x(), N("div", Qt, [
2019
2019
  Ue(Tt, {
2020
2020
  value: y.value,
@@ -2024,18 +2024,18 @@ const Lt = {
2024
2024
  "is-last": !0,
2025
2025
  theme: f.value,
2026
2026
  "onUpdate:value": M,
2027
- onToggleExpand: S,
2028
- onCopy: Y,
2027
+ onToggleExpand: k,
2028
+ onCopy: X,
2029
2029
  "onUpdate:key": Z
2030
2030
  }, null, 8, ["value", "expanded", "theme"])
2031
2031
  ])) : (x(), N("div", Yt, [
2032
- p[0] || (p[0] = E("h4", null, "JSON Parse Error:", -1)),
2033
- E("pre", null, j(i.value), 1)
2032
+ g[0] || (g[0] = E("h4", null, "JSON Parse Error:", -1)),
2033
+ E("pre", null, R(i.value), 1)
2034
2034
  ]))
2035
2035
  ])
2036
2036
  ], 2));
2037
2037
  }
2038
- }), Wt = /* @__PURE__ */ me(Gt, [["__scopeId", "data-v-7a477244"]]), Ke = ":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", Zt = Ke + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", zt = "[" + Ke + "][" + Zt + "]*", Dt = new RegExp("^" + zt + "$");
2038
+ }), Wt = /* @__PURE__ */ be(Gt, [["__scopeId", "data-v-7a477244"]]), Ke = ":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", Zt = Ke + "\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040", zt = "[" + Ke + "][" + Zt + "]*", Dt = new RegExp("^" + zt + "$");
2039
2039
  function Ye(r, e) {
2040
2040
  const t = [];
2041
2041
  let s = e.exec(r);
@@ -2072,7 +2072,7 @@ function qe(r, e) {
2072
2072
  } else if (r[o] === "<") {
2073
2073
  let i = o;
2074
2074
  if (o++, r[o] === "!") {
2075
- o = Le(r, o);
2075
+ o = Ve(r, o);
2076
2076
  continue;
2077
2077
  } else {
2078
2078
  let u = !1;
@@ -2083,51 +2083,51 @@ function qe(r, e) {
2083
2083
  a += r[o];
2084
2084
  if (a = a.trim(), a[a.length - 1] === "/" && (a = a.substring(0, a.length - 1), o--), !lr(a)) {
2085
2085
  let f;
2086
- return a.trim().length === 0 ? f = "Invalid space after '<'." : f = "Tag '" + a + "' is an invalid name.", F("InvalidTag", f, q(r, o));
2086
+ return a.trim().length === 0 ? f = "Invalid space after '<'." : f = "Tag '" + a + "' is an invalid name.", U("InvalidTag", f, Y(r, o));
2087
2087
  }
2088
2088
  const l = nr(r, o);
2089
2089
  if (l === !1)
2090
- return F("InvalidAttr", "Attributes for '" + a + "' have open quote.", q(r, o));
2090
+ return U("InvalidAttr", "Attributes for '" + a + "' have open quote.", Y(r, o));
2091
2091
  let h = l.value;
2092
2092
  if (o = l.index, h[h.length - 1] === "/") {
2093
2093
  const f = o - h.length;
2094
2094
  h = h.substring(0, h.length - 1);
2095
- const y = Ve(h, e);
2095
+ const y = Le(h, e);
2096
2096
  if (y === !0)
2097
2097
  s = !0;
2098
2098
  else
2099
- return F(y.err.code, y.err.msg, q(r, f + y.err.line));
2099
+ return U(y.err.code, y.err.msg, Y(r, f + y.err.line));
2100
2100
  } else if (u)
2101
2101
  if (l.tagClosed) {
2102
2102
  if (h.trim().length > 0)
2103
- return F("InvalidTag", "Closing tag '" + a + "' can't have attributes or invalid starting.", q(r, i));
2103
+ return U("InvalidTag", "Closing tag '" + a + "' can't have attributes or invalid starting.", Y(r, i));
2104
2104
  if (t.length === 0)
2105
- return F("InvalidTag", "Closing tag '" + a + "' has not been opened.", q(r, i));
2105
+ return U("InvalidTag", "Closing tag '" + a + "' has not been opened.", Y(r, i));
2106
2106
  {
2107
2107
  const f = t.pop();
2108
2108
  if (a !== f.tagName) {
2109
- let y = q(r, f.tagStartPos);
2110
- return F(
2109
+ let y = Y(r, f.tagStartPos);
2110
+ return U(
2111
2111
  "InvalidTag",
2112
2112
  "Expected closing tag '" + f.tagName + "' (opened in line " + y.line + ", col " + y.col + ") instead of closing tag '" + a + "'.",
2113
- q(r, i)
2113
+ Y(r, i)
2114
2114
  );
2115
2115
  }
2116
2116
  t.length == 0 && (n = !0);
2117
2117
  }
2118
- } else return F("InvalidTag", "Closing tag '" + a + "' doesn't have proper closing.", q(r, o));
2118
+ } else return U("InvalidTag", "Closing tag '" + a + "' doesn't have proper closing.", Y(r, o));
2119
2119
  else {
2120
- const f = Ve(h, e);
2120
+ const f = Le(h, e);
2121
2121
  if (f !== !0)
2122
- return F(f.err.code, f.err.msg, q(r, o - h.length + f.err.line));
2122
+ return U(f.err.code, f.err.msg, Y(r, o - h.length + f.err.line));
2123
2123
  if (n === !0)
2124
- return F("InvalidXml", "Multiple possible root nodes found.", q(r, o));
2124
+ return U("InvalidXml", "Multiple possible root nodes found.", Y(r, o));
2125
2125
  e.unpairedTags.indexOf(a) !== -1 || t.push({ tagName: a, tagStartPos: i }), s = !0;
2126
2126
  }
2127
2127
  for (o++; o < r.length; o++)
2128
2128
  if (r[o] === "<")
2129
2129
  if (r[o + 1] === "!") {
2130
- o++, o = Le(r, o);
2130
+ o++, o = Ve(r, o);
2131
2131
  continue;
2132
2132
  } else if (r[o + 1] === "?") {
2133
2133
  if (o = Be(r, ++o), o.err) return o;
@@ -2136,23 +2136,23 @@ function qe(r, e) {
2136
2136
  else if (r[o] === "&") {
2137
2137
  const f = ir(r, o);
2138
2138
  if (f == -1)
2139
- return F("InvalidChar", "char '&' is not expected.", q(r, o));
2139
+ return U("InvalidChar", "char '&' is not expected.", Y(r, o));
2140
2140
  o = f;
2141
2141
  } else if (n === !0 && !$e(r[o]))
2142
- return F("InvalidXml", "Extra text at the end", q(r, o));
2142
+ return U("InvalidXml", "Extra text at the end", Y(r, o));
2143
2143
  r[o] === "<" && o--;
2144
2144
  }
2145
2145
  } else {
2146
2146
  if ($e(r[o]))
2147
2147
  continue;
2148
- return F("InvalidChar", "char '" + r[o] + "' is not expected.", q(r, o));
2148
+ return U("InvalidChar", "char '" + r[o] + "' is not expected.", Y(r, o));
2149
2149
  }
2150
2150
  if (s) {
2151
2151
  if (t.length == 1)
2152
- return F("InvalidTag", "Unclosed tag '" + t[0].tagName + "'.", q(r, t[0].tagStartPos));
2152
+ return U("InvalidTag", "Unclosed tag '" + t[0].tagName + "'.", Y(r, t[0].tagStartPos));
2153
2153
  if (t.length > 0)
2154
- return F("InvalidXml", "Invalid '" + JSON.stringify(t.map((o) => o.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 });
2155
- } else return F("InvalidXml", "Start tag expected.", 1);
2154
+ return U("InvalidXml", "Invalid '" + JSON.stringify(t.map((o) => o.tagName), null, 4).replace(/\r?\n/g, "") + "' found.", { line: 1, col: 1 });
2155
+ } else return U("InvalidXml", "Start tag expected.", 1);
2156
2156
  return !0;
2157
2157
  }
2158
2158
  function $e(r) {
@@ -2165,7 +2165,7 @@ function Be(r, e) {
2165
2165
  if (r[e] == "?" || r[e] == " ") {
2166
2166
  const s = r.substr(t, e - t);
2167
2167
  if (e > 5 && s === "xml")
2168
- return F("InvalidXml", "XML declaration allowed only at the start of the document.", q(r, e));
2168
+ return U("InvalidXml", "XML declaration allowed only at the start of the document.", Y(r, e));
2169
2169
  if (r[e] == "?" && r[e + 1] == ">") {
2170
2170
  e++;
2171
2171
  break;
@@ -2174,7 +2174,7 @@ function Be(r, e) {
2174
2174
  }
2175
2175
  return e;
2176
2176
  }
2177
- function Le(r, e) {
2177
+ function Ve(r, e) {
2178
2178
  if (r.length > e + 5 && r[e + 1] === "-" && r[e + 2] === "-") {
2179
2179
  for (e += 3; e < r.length; e++)
2180
2180
  if (r[e] === "-" && r[e + 1] === "-" && r[e + 2] === ">") {
@@ -2216,22 +2216,22 @@ function nr(r, e) {
2216
2216
  };
2217
2217
  }
2218
2218
  const sr = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
2219
- function Ve(r, e) {
2219
+ function Le(r, e) {
2220
2220
  const t = Ye(r, sr), s = {};
2221
2221
  for (let n = 0; n < t.length; n++) {
2222
2222
  if (t[n][1].length === 0)
2223
- return F("InvalidAttr", "Attribute '" + t[n][2] + "' has no space in starting.", de(t[n]));
2223
+ return U("InvalidAttr", "Attribute '" + t[n][2] + "' has no space in starting.", de(t[n]));
2224
2224
  if (t[n][3] !== void 0 && t[n][4] === void 0)
2225
- return F("InvalidAttr", "Attribute '" + t[n][2] + "' is without value.", de(t[n]));
2225
+ return U("InvalidAttr", "Attribute '" + t[n][2] + "' is without value.", de(t[n]));
2226
2226
  if (t[n][3] === void 0 && !e.allowBooleanAttributes)
2227
- return F("InvalidAttr", "boolean attribute '" + t[n][2] + "' is not allowed.", de(t[n]));
2227
+ return U("InvalidAttr", "boolean attribute '" + t[n][2] + "' is not allowed.", de(t[n]));
2228
2228
  const o = t[n][2];
2229
2229
  if (!ar(o))
2230
- return F("InvalidAttr", "Attribute '" + o + "' is an invalid name.", de(t[n]));
2230
+ return U("InvalidAttr", "Attribute '" + o + "' is an invalid name.", de(t[n]));
2231
2231
  if (!s.hasOwnProperty(o))
2232
2232
  s[o] = 1;
2233
2233
  else
2234
- return F("InvalidAttr", "Attribute '" + o + "' is repeated.", de(t[n]));
2234
+ return U("InvalidAttr", "Attribute '" + o + "' is repeated.", de(t[n]));
2235
2235
  }
2236
2236
  return !0;
2237
2237
  }
@@ -2259,7 +2259,7 @@ function ir(r, e) {
2259
2259
  }
2260
2260
  return e;
2261
2261
  }
2262
- function F(r, e, t) {
2262
+ function U(r, e, t) {
2263
2263
  return {
2264
2264
  err: {
2265
2265
  code: r,
@@ -2275,7 +2275,7 @@ function ar(r) {
2275
2275
  function lr(r) {
2276
2276
  return ye(r);
2277
2277
  }
2278
- function q(r, e) {
2278
+ function Y(r, e) {
2279
2279
  const t = r.substring(0, e).split(/\r?\n/);
2280
2280
  return {
2281
2281
  line: t.length,
@@ -2335,7 +2335,7 @@ const ur = {
2335
2335
  };
2336
2336
  let ge;
2337
2337
  typeof Symbol != "function" ? ge = "@@xmlMetadata" : ge = Symbol("XML Node Metadata");
2338
- let se = class {
2338
+ let oe = class {
2339
2339
  constructor(e) {
2340
2340
  this.tagname = e, this.child = [], this[":@"] = {};
2341
2341
  }
@@ -2361,24 +2361,24 @@ class dr {
2361
2361
  let n = 1, o = !1, i = !1, u = "";
2362
2362
  for (; t < e.length; t++)
2363
2363
  if (e[t] === "<" && !i) {
2364
- if (o && ne(e, "!ENTITY", t)) {
2364
+ if (o && se(e, "!ENTITY", t)) {
2365
2365
  t += 7;
2366
2366
  let a, l;
2367
2367
  [a, l, t] = this.readEntityExp(e, t + 1, this.suppressValidationErr), l.indexOf("&") === -1 && (s[a] = {
2368
2368
  regx: RegExp(`&${a};`, "g"),
2369
2369
  val: l
2370
2370
  });
2371
- } else if (o && ne(e, "!ELEMENT", t)) {
2371
+ } else if (o && se(e, "!ELEMENT", t)) {
2372
2372
  t += 8;
2373
2373
  const { index: a } = this.readElementExp(e, t + 1);
2374
2374
  t = a;
2375
- } else if (o && ne(e, "!ATTLIST", t))
2375
+ } else if (o && se(e, "!ATTLIST", t))
2376
2376
  t += 8;
2377
- else if (o && ne(e, "!NOTATION", t)) {
2377
+ else if (o && se(e, "!NOTATION", t)) {
2378
2378
  t += 9;
2379
2379
  const { index: a } = this.readNotationExp(e, t + 1, this.suppressValidationErr);
2380
2380
  t = a;
2381
- } else if (ne(e, "!--", t)) i = !0;
2381
+ } else if (se(e, "!--", t)) i = !0;
2382
2382
  else throw new Error("Invalid DOCTYPE");
2383
2383
  n++, u = "";
2384
2384
  } else if (e[t] === ">") {
@@ -2392,11 +2392,11 @@ class dr {
2392
2392
  return { entities: s, i: t };
2393
2393
  }
2394
2394
  readEntityExp(e, t) {
2395
- t = Q(e, t);
2395
+ t = q(e, t);
2396
2396
  let s = "";
2397
2397
  for (; t < e.length && !/\s/.test(e[t]) && e[t] !== '"' && e[t] !== "'"; )
2398
2398
  s += e[t], t++;
2399
- if (fe(s), t = Q(e, t), !this.suppressValidationErr) {
2399
+ if (fe(s), t = q(e, t), !this.suppressValidationErr) {
2400
2400
  if (e.substring(t, t + 6).toUpperCase() === "SYSTEM")
2401
2401
  throw new Error("External entities are not supported");
2402
2402
  if (e[t] === "%")
@@ -2406,18 +2406,18 @@ class dr {
2406
2406
  return [t, n] = this.readIdentifierVal(e, t, "entity"), t--, [s, n, t];
2407
2407
  }
2408
2408
  readNotationExp(e, t) {
2409
- t = Q(e, t);
2409
+ t = q(e, t);
2410
2410
  let s = "";
2411
2411
  for (; t < e.length && !/\s/.test(e[t]); )
2412
2412
  s += e[t], t++;
2413
- !this.suppressValidationErr && fe(s), t = Q(e, t);
2413
+ !this.suppressValidationErr && fe(s), t = q(e, t);
2414
2414
  const n = e.substring(t, t + 6).toUpperCase();
2415
2415
  if (!this.suppressValidationErr && n !== "SYSTEM" && n !== "PUBLIC")
2416
2416
  throw new Error(`Expected SYSTEM or PUBLIC, found "${n}"`);
2417
- t += n.length, t = Q(e, t);
2417
+ t += n.length, t = q(e, t);
2418
2418
  let o = null, i = null;
2419
2419
  if (n === "PUBLIC")
2420
- [t, o] = this.readIdentifierVal(e, t, "publicIdentifier"), t = Q(e, t), (e[t] === '"' || e[t] === "'") && ([t, i] = this.readIdentifierVal(e, t, "systemIdentifier"));
2420
+ [t, o] = this.readIdentifierVal(e, t, "publicIdentifier"), t = q(e, t), (e[t] === '"' || e[t] === "'") && ([t, i] = this.readIdentifierVal(e, t, "systemIdentifier"));
2421
2421
  else if (n === "SYSTEM" && ([t, i] = this.readIdentifierVal(e, t, "systemIdentifier"), !this.suppressValidationErr && !i))
2422
2422
  throw new Error("Missing mandatory system identifier for SYSTEM notation");
2423
2423
  return { notationName: s, publicIdentifier: o, systemIdentifier: i, index: --t };
@@ -2434,16 +2434,16 @@ class dr {
2434
2434
  return t++, [t, n];
2435
2435
  }
2436
2436
  readElementExp(e, t) {
2437
- t = Q(e, t);
2437
+ t = q(e, t);
2438
2438
  let s = "";
2439
2439
  for (; t < e.length && !/\s/.test(e[t]); )
2440
2440
  s += e[t], t++;
2441
2441
  if (!this.suppressValidationErr && !ye(s))
2442
2442
  throw new Error(`Invalid element name: "${s}"`);
2443
- t = Q(e, t);
2443
+ t = q(e, t);
2444
2444
  let n = "";
2445
- if (e[t] === "E" && ne(e, "MPTY", t)) t += 4;
2446
- else if (e[t] === "A" && ne(e, "NY", t)) t += 2;
2445
+ if (e[t] === "E" && se(e, "MPTY", t)) t += 4;
2446
+ else if (e[t] === "A" && se(e, "NY", t)) t += 2;
2447
2447
  else if (e[t] === "(") {
2448
2448
  for (t++; t < e.length && e[t] !== ")"; )
2449
2449
  n += e[t], t++;
@@ -2458,20 +2458,20 @@ class dr {
2458
2458
  };
2459
2459
  }
2460
2460
  readAttlistExp(e, t) {
2461
- t = Q(e, t);
2461
+ t = q(e, t);
2462
2462
  let s = "";
2463
2463
  for (; t < e.length && !/\s/.test(e[t]); )
2464
2464
  s += e[t], t++;
2465
- fe(s), t = Q(e, t);
2465
+ fe(s), t = q(e, t);
2466
2466
  let n = "";
2467
2467
  for (; t < e.length && !/\s/.test(e[t]); )
2468
2468
  n += e[t], t++;
2469
2469
  if (!fe(n))
2470
2470
  throw new Error(`Invalid attribute name: "${n}"`);
2471
- t = Q(e, t);
2471
+ t = q(e, t);
2472
2472
  let o = "";
2473
2473
  if (e.substring(t, t + 8).toUpperCase() === "NOTATION") {
2474
- if (o = "NOTATION", t += 8, t = Q(e, t), e[t] !== "(")
2474
+ if (o = "NOTATION", t += 8, t = q(e, t), e[t] !== "(")
2475
2475
  throw new Error(`Expected '(', found "${e[t]}"`);
2476
2476
  t++;
2477
2477
  let u = [];
@@ -2481,7 +2481,7 @@ class dr {
2481
2481
  a += e[t], t++;
2482
2482
  if (a = a.trim(), !fe(a))
2483
2483
  throw new Error(`Invalid notation name: "${a}"`);
2484
- u.push(a), e[t] === "|" && (t++, t = Q(e, t));
2484
+ u.push(a), e[t] === "|" && (t++, t = q(e, t));
2485
2485
  }
2486
2486
  if (e[t] !== ")")
2487
2487
  throw new Error("Unterminated list of notations");
@@ -2493,7 +2493,7 @@ class dr {
2493
2493
  if (!this.suppressValidationErr && !u.includes(o.toUpperCase()))
2494
2494
  throw new Error(`Invalid attribute type: "${o}"`);
2495
2495
  }
2496
- t = Q(e, t);
2496
+ t = q(e, t);
2497
2497
  let i = "";
2498
2498
  return e.substring(t, t + 8).toUpperCase() === "#REQUIRED" ? (i = "#REQUIRED", t += 8) : e.substring(t, t + 7).toUpperCase() === "#IMPLIED" ? (i = "#IMPLIED", t += 7) : [t, i] = this.readIdentifierVal(e, t, "ATTLIST"), {
2499
2499
  elementName: s,
@@ -2504,12 +2504,12 @@ class dr {
2504
2504
  };
2505
2505
  }
2506
2506
  }
2507
- const Q = (r, e) => {
2507
+ const q = (r, e) => {
2508
2508
  for (; e < r.length && /\s/.test(r[e]); )
2509
2509
  e++;
2510
2510
  return e;
2511
2511
  };
2512
- function ne(r, e, t) {
2512
+ function se(r, e, t) {
2513
2513
  for (let s = 0; s < e.length; s++)
2514
2514
  if (e[s] !== r[t + s + 1]) return !1;
2515
2515
  return !0;
@@ -2535,7 +2535,7 @@ function gr(r, e = {}) {
2535
2535
  if (e.hex && fr.test(t))
2536
2536
  return Er(t, 16);
2537
2537
  if (t.search(/.+[eE].+/) !== -1)
2538
- return mr(r, t, e);
2538
+ return br(r, t, e);
2539
2539
  {
2540
2540
  const s = hr.exec(t);
2541
2541
  if (s) {
@@ -2561,10 +2561,10 @@ function gr(r, e = {}) {
2561
2561
  return r;
2562
2562
  }
2563
2563
  }
2564
- const br = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2565
- function mr(r, e, t) {
2564
+ const mr = /^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;
2565
+ function br(r, e, t) {
2566
2566
  if (!t.eNotation) return r;
2567
- const s = e.match(br);
2567
+ const s = e.match(mr);
2568
2568
  if (s) {
2569
2569
  let n = s[1] || "";
2570
2570
  const o = s[3].indexOf("e") === -1 ? "E" : "e", i = s[2], u = n ? (
@@ -2675,13 +2675,13 @@ function wr(r, e, t) {
2675
2675
  const Ar = function(r) {
2676
2676
  r = r.replace(/\r\n?/g, `
2677
2677
  `);
2678
- const e = new se("!xml");
2678
+ const e = new oe("!xml");
2679
2679
  let t = e, s = "", n = "";
2680
2680
  const o = new dr(this.options.processEntities);
2681
2681
  for (let i = 0; i < r.length; i++)
2682
2682
  if (r[i] === "<")
2683
2683
  if (r[i + 1] === "/") {
2684
- const a = oe(r, ">", i, "Closing Tag is not closed.");
2684
+ const a = ie(r, ">", i, "Closing Tag is not closed.");
2685
2685
  let l = r.substring(i + 2, a).trim();
2686
2686
  if (this.options.removeNSPrefix) {
2687
2687
  const y = l.indexOf(":");
@@ -2697,12 +2697,12 @@ const Ar = function(r) {
2697
2697
  let a = we(r, i, !1, "?>");
2698
2698
  if (!a) throw new Error("Pi Tag is not closed.");
2699
2699
  if (s = this.saveTextToParentTag(s, t, n), !(this.options.ignoreDeclaration && a.tagName === "?xml" || this.options.ignorePiTags)) {
2700
- const l = new se(a.tagName);
2700
+ const l = new oe(a.tagName);
2701
2701
  l.add(this.options.textNodeName, ""), a.tagName !== a.tagExp && a.attrExpPresent && (l[":@"] = this.buildAttributesMap(a.tagExp, n, a.tagName)), this.addChild(t, l, n, i);
2702
2702
  }
2703
2703
  i = a.closeIndex + 1;
2704
2704
  } else if (r.substr(i + 1, 3) === "!--") {
2705
- const a = oe(r, "-->", i + 4, "Comment is not closed.");
2705
+ const a = ie(r, "-->", i + 4, "Comment is not closed.");
2706
2706
  if (this.options.commentPropName) {
2707
2707
  const l = r.substring(i + 4, a - 2);
2708
2708
  s = this.saveTextToParentTag(s, t, n), t.add(this.options.commentPropName, [{ [this.options.textNodeName]: l }]);
@@ -2712,7 +2712,7 @@ const Ar = function(r) {
2712
2712
  const a = o.readDocType(r, i);
2713
2713
  this.docTypeEntities = a.entities, i = a.i;
2714
2714
  } else if (r.substr(i + 1, 2) === "![") {
2715
- const a = oe(r, "]]>", i, "CDATA is not closed.") - 2, l = r.substring(i + 9, a);
2715
+ const a = ie(r, "]]>", i, "CDATA is not closed.") - 2, l = r.substring(i + 9, a);
2716
2716
  s = this.saveTextToParentTag(s, t, n);
2717
2717
  let h = this.parseTextData(l, t.tagname, n, !0, !1, !0, !0);
2718
2718
  h == null && (h = ""), this.options.cdataPropName ? t.add(this.options.cdataPropName, [{ [this.options.textNodeName]: l }]) : t.add(this.options.textNodeName, h), i = a + 2;
@@ -2721,8 +2721,8 @@ const Ar = function(r) {
2721
2721
  const h = a.rawTagName;
2722
2722
  let f = a.tagExp, y = a.attrExpPresent, m = a.closeIndex;
2723
2723
  this.options.transformTagName && (l = this.options.transformTagName(l)), t && s && t.tagname !== "!xml" && (s = this.saveTextToParentTag(s, t, n, !1));
2724
- const C = t;
2725
- C && this.options.unpairedTags.indexOf(C.tagname) !== -1 && (t = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf("."))), l !== e.tagname && (n += n ? "." + l : l);
2724
+ const A = t;
2725
+ A && this.options.unpairedTags.indexOf(A.tagname) !== -1 && (t = this.tagsNodeStack.pop(), n = n.substring(0, n.lastIndexOf("."))), l !== e.tagname && (n += n ? "." + l : l);
2726
2726
  const O = i;
2727
2727
  if (this.isItStopNode(this.options.stopNodes, n, l)) {
2728
2728
  let P = "";
@@ -2731,19 +2731,19 @@ const Ar = function(r) {
2731
2731
  else if (this.options.unpairedTags.indexOf(l) !== -1)
2732
2732
  i = a.closeIndex;
2733
2733
  else {
2734
- const k = this.readStopNodeData(r, h, m + 1);
2735
- if (!k) throw new Error(`Unexpected end of ${h}`);
2736
- i = k.i, P = k.tagContent;
2734
+ const Q = this.readStopNodeData(r, h, m + 1);
2735
+ if (!Q) throw new Error(`Unexpected end of ${h}`);
2736
+ i = Q.i, P = Q.tagContent;
2737
2737
  }
2738
- const M = new se(l);
2738
+ const M = new oe(l);
2739
2739
  l !== f && y && (M[":@"] = this.buildAttributesMap(f, n, l)), P && (P = this.parseTextData(P, l, n, !0, y, !0, !0)), n = n.substr(0, n.lastIndexOf(".")), M.add(this.options.textNodeName, P), this.addChild(t, M, n, O);
2740
2740
  } else {
2741
2741
  if (f.length > 0 && f.lastIndexOf("/") === f.length - 1) {
2742
2742
  l[l.length - 1] === "/" ? (l = l.substr(0, l.length - 1), n = n.substr(0, n.length - 1), f = l) : f = f.substr(0, f.length - 1), this.options.transformTagName && (l = this.options.transformTagName(l));
2743
- const P = new se(l);
2743
+ const P = new oe(l);
2744
2744
  l !== f && y && (P[":@"] = this.buildAttributesMap(f, n, l)), this.addChild(t, P, n, O), n = n.substr(0, n.lastIndexOf("."));
2745
2745
  } else {
2746
- const P = new se(l);
2746
+ const P = new oe(l);
2747
2747
  this.tagsNodeStack.push(t), l !== f && y && (P[":@"] = this.buildAttributesMap(f, n, l)), this.addChild(t, P, n, O), t = P;
2748
2748
  }
2749
2749
  s = "", i = m;
@@ -2819,7 +2819,7 @@ function Sr(r, e, t = ">") {
2819
2819
  n += i;
2820
2820
  }
2821
2821
  }
2822
- function oe(r, e, t, s) {
2822
+ function ie(r, e, t, s) {
2823
2823
  const n = r.indexOf(e, t);
2824
2824
  if (n === -1)
2825
2825
  throw new Error(s);
@@ -2851,7 +2851,7 @@ function Ir(r, e, t) {
2851
2851
  for (; t < r.length; t++)
2852
2852
  if (r[t] === "<")
2853
2853
  if (r[t + 1] === "/") {
2854
- const o = oe(r, ">", t, `${e} is not closed`);
2854
+ const o = ie(r, ">", t, `${e} is not closed`);
2855
2855
  if (r.substring(t + 2, o).trim() === e && (n--, n === 0))
2856
2856
  return {
2857
2857
  tagContent: r.substring(s, t),
@@ -2859,11 +2859,11 @@ function Ir(r, e, t) {
2859
2859
  };
2860
2860
  t = o;
2861
2861
  } else if (r[t + 1] === "?")
2862
- t = oe(r, "?>", t + 1, "StopNode is not closed.");
2862
+ t = ie(r, "?>", t + 1, "StopNode is not closed.");
2863
2863
  else if (r.substr(t + 1, 3) === "!--")
2864
- t = oe(r, "-->", t + 3, "StopNode is not closed.");
2864
+ t = ie(r, "-->", t + 3, "StopNode is not closed.");
2865
2865
  else if (r.substr(t + 1, 2) === "![")
2866
- t = oe(r, "]]>", t, "StopNode is not closed.") - 2;
2866
+ t = ie(r, "]]>", t, "StopNode is not closed.") - 2;
2867
2867
  else {
2868
2868
  const o = we(r, t, ">");
2869
2869
  o && ((o && o.tagName) === e && o.tagExp[o.tagExp.length - 1] !== "/" && n++, t = o.closeIndex);
@@ -2876,7 +2876,7 @@ function Ae(r, e, t) {
2876
2876
  } else
2877
2877
  return Jt(r) ? r : "";
2878
2878
  }
2879
- const Ne = se.getMetaDataSymbol();
2879
+ const Ne = oe.getMetaDataSymbol();
2880
2880
  function $r(r, e) {
2881
2881
  return Ge(r, e);
2882
2882
  }
@@ -2893,8 +2893,8 @@ function Ge(r, e, t) {
2893
2893
  continue;
2894
2894
  if (i[u]) {
2895
2895
  let l = Ge(i[u], e, a);
2896
- const h = Vr(l, e);
2897
- i[Ne] !== void 0 && (l[Ne] = i[Ne]), i[":@"] ? Lr(l, i[":@"], a, e) : Object.keys(l).length === 1 && l[e.textNodeName] !== void 0 && !e.alwaysCreateTextNode ? l = l[e.textNodeName] : Object.keys(l).length === 0 && (e.alwaysCreateTextNode ? l[e.textNodeName] = "" : l = ""), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(l)) : e.isArray(u, a, h) ? n[u] = [l] : n[u] = l;
2896
+ const h = Lr(l, e);
2897
+ i[Ne] !== void 0 && (l[Ne] = i[Ne]), i[":@"] ? Vr(l, i[":@"], a, e) : Object.keys(l).length === 1 && l[e.textNodeName] !== void 0 && !e.alwaysCreateTextNode ? l = l[e.textNodeName] : Object.keys(l).length === 0 && (e.alwaysCreateTextNode ? l[e.textNodeName] = "" : l = ""), n[u] !== void 0 && n.hasOwnProperty(u) ? (Array.isArray(n[u]) || (n[u] = [n[u]]), n[u].push(l)) : e.isArray(u, a, h) ? n[u] = [l] : n[u] = l;
2898
2898
  }
2899
2899
  }
2900
2900
  }
@@ -2907,7 +2907,7 @@ function Br(r) {
2907
2907
  if (s !== ":@") return s;
2908
2908
  }
2909
2909
  }
2910
- function Lr(r, e, t, s) {
2910
+ function Vr(r, e, t, s) {
2911
2911
  if (e) {
2912
2912
  const n = Object.keys(e), o = n.length;
2913
2913
  for (let i = 0; i < o; i++) {
@@ -2916,7 +2916,7 @@ function Lr(r, e, t, s) {
2916
2916
  }
2917
2917
  }
2918
2918
  }
2919
- function Vr(r, e) {
2919
+ function Lr(r, e) {
2920
2920
  const { textNodeName: t } = e, s = Object.keys(r).length;
2921
2921
  return !!(s === 0 || s === 1 && (r[t] || typeof r[t] == "boolean" || r[t] === 0));
2922
2922
  }
@@ -2970,7 +2970,7 @@ class Rr {
2970
2970
  * is true in the options.
2971
2971
  */
2972
2972
  static getMetaDataSymbol() {
2973
- return se.getMetaDataSymbol();
2973
+ return oe.getMetaDataSymbol();
2974
2974
  }
2975
2975
  }
2976
2976
  const jr = `
@@ -2986,8 +2986,8 @@ function We(r, e, t, s) {
2986
2986
  if (a === void 0) continue;
2987
2987
  let l = "";
2988
2988
  if (t.length === 0 ? l = a : l = `${t}.${a}`, a === e.textNodeName) {
2989
- let C = u[a];
2990
- Fr(l, e) || (C = e.tagValueProcessor(a, C), C = Ze(C, e)), o && (n += s), n += C, o = !1;
2989
+ let A = u[a];
2990
+ Fr(l, e) || (A = e.tagValueProcessor(a, A), A = Ze(A, e)), o && (n += s), n += A, o = !1;
2991
2991
  continue;
2992
2992
  } else if (a === e.cdataPropName) {
2993
2993
  o && (n += s), n += `<![CDATA[${u[a][0][e.textNodeName]}]]>`, o = !1;
@@ -2996,9 +2996,9 @@ function We(r, e, t, s) {
2996
2996
  n += s + `<!--${u[a][0][e.textNodeName]}-->`, o = !0;
2997
2997
  continue;
2998
2998
  } else if (a[0] === "?") {
2999
- const C = Re(u[":@"], e), O = a === "?xml" ? "" : s;
2999
+ const A = Re(u[":@"], e), O = a === "?xml" ? "" : s;
3000
3000
  let P = u[a][0][e.textNodeName];
3001
- P = P.length !== 0 ? " " + P : "", n += O + `<${a}${P}${C}?>`, o = !0;
3001
+ P = P.length !== 0 ? " " + P : "", n += O + `<${a}${P}${A}?>`, o = !0;
3002
3002
  continue;
3003
3003
  }
3004
3004
  let h = s;
@@ -3075,7 +3075,7 @@ const Xr = {
3075
3075
  // transformAttributeName: false,
3076
3076
  oneListGroup: !1
3077
3077
  };
3078
- function re(r) {
3078
+ function ne(r) {
3079
3079
  this.options = Object.assign({}, Xr, r), this.options.ignoreAttributes === !0 || this.options.attributesGroupName ? this.isAttribute = function() {
3080
3080
  return !1;
3081
3081
  } : (this.ignoreAttributesFn = Qe(this.options.ignoreAttributes), this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Yr), this.processTextOrObjNode = Hr, this.options.format ? (this.indentate = Kr, this.tagEndChar = `>
@@ -3084,12 +3084,12 @@ function re(r) {
3084
3084
  return "";
3085
3085
  }, this.tagEndChar = ">", this.newLine = "");
3086
3086
  }
3087
- re.prototype.build = function(r) {
3087
+ ne.prototype.build = function(r) {
3088
3088
  return this.options.preserveOrder ? Mr(r, this.options) : (Array.isArray(r) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (r = {
3089
3089
  [this.options.arrayNodeName]: r
3090
3090
  }), this.j2x(r, 0, []).val);
3091
3091
  };
3092
- re.prototype.j2x = function(r, e, t) {
3092
+ ne.prototype.j2x = function(r, e, t) {
3093
3093
  let s = "", n = "";
3094
3094
  const o = t.join(".");
3095
3095
  for (let i in r)
@@ -3138,14 +3138,14 @@ re.prototype.j2x = function(r, e, t) {
3138
3138
  n += this.processTextOrObjNode(r[i], i, e, t);
3139
3139
  return { attrStr: s, val: n };
3140
3140
  };
3141
- re.prototype.buildAttrPairStr = function(r, e) {
3141
+ ne.prototype.buildAttrPairStr = function(r, e) {
3142
3142
  return e = this.options.attributeValueProcessor(r, "" + e), e = this.replaceEntitiesValue(e), this.options.suppressBooleanAttributes && e === "true" ? " " + r : " " + r + '="' + e + '"';
3143
3143
  };
3144
3144
  function Hr(r, e, t, s) {
3145
3145
  const n = this.j2x(r, t + 1, s.concat(e));
3146
3146
  return r[this.options.textNodeName] !== void 0 && Object.keys(r).length === 1 ? this.buildTextValNode(r[this.options.textNodeName], e, n.attrStr, t) : this.buildObjectNode(n.val, e, n.attrStr, t);
3147
3147
  }
3148
- re.prototype.buildObjectNode = function(r, e, t, s) {
3148
+ ne.prototype.buildObjectNode = function(r, e, t, s) {
3149
3149
  if (r === "")
3150
3150
  return e[0] === "?" ? this.indentate(s) + "<" + e + t + "?" + this.tagEndChar : this.indentate(s) + "<" + e + t + this.closeTag(e) + this.tagEndChar;
3151
3151
  {
@@ -3153,11 +3153,11 @@ re.prototype.buildObjectNode = function(r, e, t, s) {
3153
3153
  return e[0] === "?" && (o = "?", n = ""), (t || t === "") && r.indexOf("<") === -1 ? this.indentate(s) + "<" + e + t + o + ">" + r + n : this.options.commentPropName !== !1 && e === this.options.commentPropName && o.length === 0 ? this.indentate(s) + `<!--${r}-->` + this.newLine : this.indentate(s) + "<" + e + t + o + this.tagEndChar + r + this.indentate(s) + n;
3154
3154
  }
3155
3155
  };
3156
- re.prototype.closeTag = function(r) {
3156
+ ne.prototype.closeTag = function(r) {
3157
3157
  let e = "";
3158
3158
  return this.options.unpairedTags.indexOf(r) !== -1 ? this.options.suppressUnpairedNode || (e = "/") : this.options.suppressEmptyNode ? e = "/" : e = `></${r}`, e;
3159
3159
  };
3160
- re.prototype.buildTextValNode = function(r, e, t, s) {
3160
+ ne.prototype.buildTextValNode = function(r, e, t, s) {
3161
3161
  if (this.options.cdataPropName !== !1 && e === this.options.cdataPropName)
3162
3162
  return this.indentate(s) + `<![CDATA[${r}]]>` + this.newLine;
3163
3163
  if (this.options.commentPropName !== !1 && e === this.options.commentPropName)
@@ -3169,7 +3169,7 @@ re.prototype.buildTextValNode = function(r, e, t, s) {
3169
3169
  return n = this.replaceEntitiesValue(n), n === "" ? this.indentate(s) + "<" + e + t + this.closeTag(e) + this.tagEndChar : this.indentate(s) + "<" + e + t + ">" + n + "</" + e + this.tagEndChar;
3170
3170
  }
3171
3171
  };
3172
- re.prototype.replaceEntitiesValue = function(r) {
3172
+ ne.prototype.replaceEntitiesValue = function(r) {
3173
3173
  if (r && r.length > 0 && this.options.processEntities)
3174
3174
  for (let e = 0; e < this.options.entities.length; e++) {
3175
3175
  const t = this.options.entities[e];
@@ -3260,7 +3260,7 @@ const qr = {
3260
3260
  }
3261
3261
  }, Te = (r, e) => {
3262
3262
  try {
3263
- let s = new re({
3263
+ let s = new ne({
3264
3264
  ...Gr,
3265
3265
  format: e?.format ?? !0,
3266
3266
  indentBy: e?.indentBy ?? " "
@@ -3308,7 +3308,7 @@ const qr = {
3308
3308
  }, hn = {
3309
3309
  key: 3,
3310
3310
  class: "xml-node__cdata"
3311
- }, pn = /* @__PURE__ */ be({
3311
+ }, pn = /* @__PURE__ */ me({
3312
3312
  __name: "XmlNode",
3313
3313
  props: {
3314
3314
  value: {},
@@ -3320,218 +3320,218 @@ const qr = {
3320
3320
  },
3321
3321
  emits: ["toggle-expand", "copy"],
3322
3322
  setup(r, { emit: e }) {
3323
- const t = r, s = e, n = L(() => t.path || t.tagName), o = L(() => t.expanded.has(n.value)), i = L(() => t.tagName && !t.tagName.startsWith("#") && t.tagName !== "__cdata" ? !0 : t.value !== null && typeof t.value == "object"), u = L(() => !t.tagName && typeof t.value == "string"), a = L(() => t.tagName === "#comment"), l = L(() => t.tagName === "__cdata"), h = L(() => i.value ? Dr(t.value) : {}), f = L(() => typeof t.value == "string" ? t.value : i.value ? Jr(t.value) || "" : t.value || ""), y = L(() => t.value || ""), m = L(() => t.value || ""), C = L(() => {
3323
+ const t = r, s = e, n = V(() => t.path || t.tagName), o = V(() => t.expanded.has(n.value)), i = V(() => t.tagName && !t.tagName.startsWith("#") && t.tagName !== "__cdata" ? !0 : t.value !== null && typeof t.value == "object"), u = V(() => !t.tagName && typeof t.value == "string"), a = V(() => t.tagName === "#comment"), l = V(() => t.tagName === "__cdata"), h = V(() => i.value ? Dr(t.value) : {}), f = V(() => typeof t.value == "string" ? t.value : i.value ? Jr(t.value) || "" : t.value || ""), y = V(() => t.value || ""), m = V(() => t.value || ""), A = V(() => {
3324
3324
  if (typeof t.value != "object" || t.value === null)
3325
3325
  return [];
3326
- const g = [];
3326
+ const p = [];
3327
3327
  return Object.keys(t.value).forEach((T) => {
3328
3328
  if (T.startsWith("@_") || T === "#text") return;
3329
- const U = t.value[T];
3330
- Array.isArray(U) ? U.forEach((V) => {
3331
- g.push({ tagName: T, value: V });
3332
- }) : g.push({ tagName: T, value: U });
3333
- }), g;
3334
- }), O = L(() => C.value.length > 0 ? !0 : f.value.trim() !== ""), P = L(() => i.value && C.value.length === 0 && f.value.trim() !== ""), M = () => {
3329
+ const j = t.value[T];
3330
+ Array.isArray(j) ? j.forEach((S) => {
3331
+ p.push({ tagName: T, value: S });
3332
+ }) : p.push({ tagName: T, value: j });
3333
+ }), p;
3334
+ }), O = V(() => A.value.length > 0 ? !0 : f.value.trim() !== ""), P = V(() => i.value && A.value.length === 0 && f.value.trim() !== ""), M = () => {
3335
3335
  O.value && s("toggle-expand", n.value);
3336
- }, k = (g, T) => {
3337
- let U = 0;
3338
- for (let V = 0; V < T; V++)
3339
- C.value[V].tagName === g && U++;
3340
- return `${n.value}.${g}[${U}]`;
3341
- }, S = (g, T) => `${g.tagName}-${T}`;
3342
- return (g, T) => {
3343
- const U = Me("XmlNode", !0);
3336
+ }, Q = (p, T) => {
3337
+ let j = 0;
3338
+ for (let S = 0; S < T; S++)
3339
+ A.value[S].tagName === p && j++;
3340
+ return `${n.value}.${p}[${j}]`;
3341
+ }, k = (p, T) => `${p.tagName}-${T}`;
3342
+ return (p, T) => {
3343
+ const j = Me("XmlNode", !0);
3344
3344
  return x(), N("div", {
3345
3345
  class: "xml-node",
3346
- style: I({ paddingLeft: g.level > 0 ? "16px" : "0" })
3346
+ style: I({ paddingLeft: p.level > 0 ? "16px" : "0" })
3347
3347
  }, [
3348
3348
  i.value ? (x(), N("div", en, [
3349
3349
  P.value ? (x(), N("div", tn, [
3350
3350
  E("span", {
3351
3351
  class: "xml-node__bracket",
3352
- style: I({ color: g.theme.colors.xmlBracket })
3352
+ style: I({ color: p.theme.colors.xmlBracket })
3353
3353
  }, "<", 4),
3354
3354
  E("span", {
3355
3355
  class: "xml-node__tag",
3356
- style: I({ color: g.theme.colors.xmlTag })
3357
- }, j(g.tagName), 5),
3358
- (x(!0), N(he, null, pe(h.value, (V, Y) => (x(), N("span", {
3359
- key: Y,
3356
+ style: I({ color: p.theme.colors.xmlTag })
3357
+ }, R(p.tagName), 5),
3358
+ (x(!0), N(he, null, pe(h.value, (S, X) => (x(), N("span", {
3359
+ key: X,
3360
3360
  class: "xml-node__attribute"
3361
3361
  }, [
3362
3362
  E("span", {
3363
3363
  class: "xml-node__attr-name",
3364
- style: I({ color: g.theme.colors.xmlAttribute })
3365
- }, j(Y), 5),
3364
+ style: I({ color: p.theme.colors.xmlAttribute })
3365
+ }, R(X), 5),
3366
3366
  E("span", {
3367
3367
  class: "xml-node__equals",
3368
- style: I({ color: g.theme.colors.xmlEquals })
3368
+ style: I({ color: p.theme.colors.xmlEquals })
3369
3369
  }, "=", 4),
3370
3370
  E("span", {
3371
3371
  class: "xml-node__quote",
3372
- style: I({ color: g.theme.colors.xmlQuote })
3372
+ style: I({ color: p.theme.colors.xmlQuote })
3373
3373
  }, '"', 4),
3374
3374
  E("span", {
3375
3375
  class: "xml-node__attr-value",
3376
- style: I({ color: g.theme.colors.xmlAttributeValue })
3377
- }, j(V), 5),
3376
+ style: I({ color: p.theme.colors.xmlAttributeValue })
3377
+ }, R(S), 5),
3378
3378
  E("span", {
3379
3379
  class: "xml-node__quote",
3380
- style: I({ color: g.theme.colors.xmlQuote })
3380
+ style: I({ color: p.theme.colors.xmlQuote })
3381
3381
  }, '"', 4)
3382
3382
  ]))), 128)),
3383
3383
  E("span", {
3384
3384
  class: "xml-node__bracket",
3385
- style: I({ color: g.theme.colors.xmlBracket })
3385
+ style: I({ color: p.theme.colors.xmlBracket })
3386
3386
  }, ">", 4),
3387
3387
  E("span", {
3388
3388
  class: "xml-node__text-content",
3389
- style: I({ color: g.theme.colors.xmlText })
3390
- }, j(f.value), 5),
3389
+ style: I({ color: p.theme.colors.xmlText })
3390
+ }, R(f.value), 5),
3391
3391
  E("span", {
3392
3392
  class: "xml-node__bracket",
3393
- style: I({ color: g.theme.colors.xmlBracket })
3393
+ style: I({ color: p.theme.colors.xmlBracket })
3394
3394
  }, "</", 4),
3395
3395
  E("span", {
3396
3396
  class: "xml-node__tag",
3397
- style: I({ color: g.theme.colors.xmlTag })
3398
- }, j(g.tagName), 5),
3397
+ style: I({ color: p.theme.colors.xmlTag })
3398
+ }, R(p.tagName), 5),
3399
3399
  E("span", {
3400
3400
  class: "xml-node__bracket",
3401
- style: I({ color: g.theme.colors.xmlBracket })
3401
+ style: I({ color: p.theme.colors.xmlBracket })
3402
3402
  }, ">", 4)
3403
3403
  ])) : (x(), N("div", rn, [
3404
3404
  E("div", nn, [
3405
3405
  O.value ? (x(), N("span", {
3406
3406
  key: 0,
3407
3407
  class: "xml-node__clickable-part",
3408
- onClick: T[0] || (T[0] = (V) => M()),
3408
+ onClick: T[0] || (T[0] = (S) => M()),
3409
3409
  title: o.value ? "Click to collapse" : "Click to expand"
3410
3410
  }, [
3411
3411
  E("span", {
3412
3412
  class: "xml-node__bracket",
3413
- style: I({ color: g.theme.colors.xmlBracket })
3413
+ style: I({ color: p.theme.colors.xmlBracket })
3414
3414
  }, "<", 4),
3415
3415
  E("span", {
3416
3416
  class: "xml-node__tag",
3417
- style: I({ color: g.theme.colors.xmlTag })
3418
- }, j(g.tagName), 5)
3417
+ style: I({ color: p.theme.colors.xmlTag })
3418
+ }, R(p.tagName), 5)
3419
3419
  ], 8, sn)) : (x(), N("span", on, [
3420
3420
  E("span", {
3421
3421
  class: "xml-node__bracket",
3422
- style: I({ color: g.theme.colors.xmlBracket })
3422
+ style: I({ color: p.theme.colors.xmlBracket })
3423
3423
  }, "<", 4),
3424
3424
  E("span", {
3425
3425
  class: "xml-node__tag",
3426
- style: I({ color: g.theme.colors.xmlTag })
3427
- }, j(g.tagName), 5)
3426
+ style: I({ color: p.theme.colors.xmlTag })
3427
+ }, R(p.tagName), 5)
3428
3428
  ])),
3429
- (x(!0), N(he, null, pe(h.value, (V, Y) => (x(), N("span", {
3430
- key: Y,
3429
+ (x(!0), N(he, null, pe(h.value, (S, X) => (x(), N("span", {
3430
+ key: X,
3431
3431
  class: "xml-node__attribute"
3432
3432
  }, [
3433
3433
  E("span", {
3434
3434
  class: "xml-node__attr-name",
3435
- style: I({ color: g.theme.colors.xmlAttribute })
3436
- }, j(Y), 5),
3435
+ style: I({ color: p.theme.colors.xmlAttribute })
3436
+ }, R(X), 5),
3437
3437
  E("span", {
3438
3438
  class: "xml-node__equals",
3439
- style: I({ color: g.theme.colors.xmlEquals })
3439
+ style: I({ color: p.theme.colors.xmlEquals })
3440
3440
  }, "=", 4),
3441
3441
  E("span", {
3442
3442
  class: "xml-node__quote",
3443
- style: I({ color: g.theme.colors.xmlQuote })
3443
+ style: I({ color: p.theme.colors.xmlQuote })
3444
3444
  }, '"', 4),
3445
3445
  E("span", {
3446
3446
  class: "xml-node__attr-value",
3447
- style: I({ color: g.theme.colors.xmlAttributeValue })
3448
- }, j(V), 5),
3447
+ style: I({ color: p.theme.colors.xmlAttributeValue })
3448
+ }, R(S), 5),
3449
3449
  E("span", {
3450
3450
  class: "xml-node__quote",
3451
- style: I({ color: g.theme.colors.xmlQuote })
3451
+ style: I({ color: p.theme.colors.xmlQuote })
3452
3452
  }, '"', 4)
3453
3453
  ]))), 128)),
3454
3454
  O.value ? (x(), N("span", {
3455
3455
  key: 2,
3456
3456
  class: "xml-node__clickable-part",
3457
- onClick: T[1] || (T[1] = (V) => M()),
3457
+ onClick: T[1] || (T[1] = (S) => M()),
3458
3458
  title: o.value ? "Click to collapse" : "Click to expand"
3459
3459
  }, [
3460
3460
  E("span", {
3461
3461
  class: "xml-node__bracket",
3462
- style: I({ color: g.theme.colors.xmlBracket })
3462
+ style: I({ color: p.theme.colors.xmlBracket })
3463
3463
  }, ">", 4)
3464
3464
  ], 8, an)) : (x(), N("span", {
3465
3465
  key: 3,
3466
3466
  class: "xml-node__bracket",
3467
- style: I({ color: g.theme.colors.xmlBracket })
3468
- }, j(O.value ? ">" : "/>"), 5)),
3467
+ style: I({ color: p.theme.colors.xmlBracket })
3468
+ }, R(O.value ? ">" : "/>"), 5)),
3469
3469
  !o.value && O.value ? (x(), N("span", {
3470
3470
  key: 4,
3471
3471
  class: "xml-node__collapsed xml-node__collapsed--clickable",
3472
- style: I({ color: g.theme.colors.textSecondary }),
3473
- onClick: T[2] || (T[2] = (V) => M()),
3472
+ style: I({ color: p.theme.colors.textSecondary }),
3473
+ onClick: T[2] || (T[2] = (S) => M()),
3474
3474
  title: "Click to expand"
3475
- }, "...", 4)) : X("", !0)
3475
+ }, "...", 4)) : F("", !0)
3476
3476
  ]),
3477
3477
  o.value && O.value ? (x(), N("div", ln, [
3478
- C.value.length === 0 && f.value.trim() ? (x(), N("div", un, [
3478
+ A.value.length === 0 && f.value.trim() ? (x(), N("div", un, [
3479
3479
  E("span", {
3480
3480
  class: "xml-node__text-content",
3481
- style: I({ color: g.theme.colors.xmlText })
3482
- }, j(f.value), 5)
3483
- ])) : X("", !0),
3484
- (x(!0), N(he, null, pe(C.value, (V, Y) => (x(), Xe(U, {
3485
- key: S(V, Y),
3486
- value: V.value,
3487
- "tag-name": V.tagName,
3488
- level: g.level + 1,
3489
- path: k(V.tagName, Y),
3490
- expanded: g.expanded,
3491
- theme: g.theme,
3492
- onToggleExpand: T[3] || (T[3] = (Z) => g.$emit("toggle-expand", Z)),
3493
- onCopy: T[4] || (T[4] = (Z) => g.$emit("copy", Z))
3481
+ style: I({ color: p.theme.colors.xmlText })
3482
+ }, R(f.value), 5)
3483
+ ])) : F("", !0),
3484
+ (x(!0), N(he, null, pe(A.value, (S, X) => (x(), Xe(j, {
3485
+ key: k(S, X),
3486
+ value: S.value,
3487
+ "tag-name": S.tagName,
3488
+ level: p.level + 1,
3489
+ path: Q(S.tagName, X),
3490
+ expanded: p.expanded,
3491
+ theme: p.theme,
3492
+ onToggleExpand: T[3] || (T[3] = (Z) => p.$emit("toggle-expand", Z)),
3493
+ onCopy: T[4] || (T[4] = (Z) => p.$emit("copy", Z))
3494
3494
  }, null, 8, ["value", "tag-name", "level", "path", "expanded", "theme"]))), 128))
3495
- ])) : X("", !0),
3495
+ ])) : F("", !0),
3496
3496
  o.value && O.value ? (x(), N("div", cn, [
3497
3497
  E("span", {
3498
3498
  class: "xml-node__clickable-part",
3499
- onClick: T[5] || (T[5] = (V) => M()),
3499
+ onClick: T[5] || (T[5] = (S) => M()),
3500
3500
  title: "Click to collapse"
3501
3501
  }, [
3502
3502
  E("span", {
3503
3503
  class: "xml-node__bracket",
3504
- style: I({ color: g.theme.colors.xmlBracket })
3504
+ style: I({ color: p.theme.colors.xmlBracket })
3505
3505
  }, "</", 4),
3506
3506
  E("span", {
3507
3507
  class: "xml-node__tag",
3508
- style: I({ color: g.theme.colors.xmlTag })
3509
- }, j(g.tagName), 5),
3508
+ style: I({ color: p.theme.colors.xmlTag })
3509
+ }, R(p.tagName), 5),
3510
3510
  E("span", {
3511
3511
  class: "xml-node__bracket",
3512
- style: I({ color: g.theme.colors.xmlBracket })
3512
+ style: I({ color: p.theme.colors.xmlBracket })
3513
3513
  }, ">", 4)
3514
3514
  ])
3515
- ])) : X("", !0)
3515
+ ])) : F("", !0)
3516
3516
  ]))
3517
3517
  ])) : u.value ? (x(), N("div", dn, [
3518
3518
  E("span", {
3519
3519
  class: "xml-node__text-content",
3520
- style: I({ color: g.theme.colors.xmlText })
3521
- }, j(f.value), 5)
3520
+ style: I({ color: p.theme.colors.xmlText })
3521
+ }, R(f.value), 5)
3522
3522
  ])) : a.value ? (x(), N("div", fn, [
3523
3523
  E("span", {
3524
- style: I({ color: g.theme.colors.xmlComment })
3525
- }, " <!-- " + j(y.value) + " --> ", 5)
3524
+ style: I({ color: p.theme.colors.xmlComment })
3525
+ }, " <!-- " + R(y.value) + " --> ", 5)
3526
3526
  ])) : l.value ? (x(), N("div", hn, [
3527
3527
  E("span", {
3528
- style: I({ color: g.theme.colors.xmlCdata })
3529
- }, " <![CDATA[" + j(m.value) + "]]> ", 5)
3530
- ])) : X("", !0)
3528
+ style: I({ color: p.theme.colors.xmlCdata })
3529
+ }, " <![CDATA[" + R(m.value) + "]]> ", 5)
3530
+ ])) : F("", !0)
3531
3531
  ], 4);
3532
3532
  };
3533
3533
  }
3534
- }), gn = /* @__PURE__ */ me(pn, [["__scopeId", "data-v-c8f9132d"]]), bn = {
3534
+ }), gn = /* @__PURE__ */ be(pn, [["__scopeId", "data-v-c8f9132d"]]), mn = {
3535
3535
  name: "github-light",
3536
3536
  colors: {
3537
3537
  // 背景色
@@ -3576,7 +3576,7 @@ const qr = {
3576
3576
  xmlQuote: "#0550ae"
3577
3577
  // 引号 - 蓝色
3578
3578
  }
3579
- }, mn = {
3579
+ }, bn = {
3580
3580
  name: "github-dark",
3581
3581
  colors: {
3582
3582
  // 背景色
@@ -3712,8 +3712,8 @@ const qr = {
3712
3712
  // 引号 - 蓝色
3713
3713
  }
3714
3714
  }, je = {
3715
- "github-light": bn,
3716
- "github-dark": mn,
3715
+ "github-light": mn,
3716
+ "github-dark": bn,
3717
3717
  "min-light": yn,
3718
3718
  "slack-ochin": En
3719
3719
  }, vn = (r) => je[r] || je["github-light"], _n = {
@@ -3731,7 +3731,7 @@ const qr = {
3731
3731
  }, $n = {
3732
3732
  key: 1,
3733
3733
  class: "xml-format__viewer"
3734
- }, Bn = /* @__PURE__ */ be({
3734
+ }, Bn = /* @__PURE__ */ me({
3735
3735
  __name: "index",
3736
3736
  props: {
3737
3737
  modelValue: { default: "" },
@@ -3744,172 +3744,188 @@ const qr = {
3744
3744
  preserveWhitespace: { type: Boolean, default: !1 }
3745
3745
  },
3746
3746
  emits: ["update:modelValue", "copy-success", "copy-error", "expand-all", "collapse-all", "compress", "format"],
3747
- setup(r, { emit: e }) {
3747
+ setup(r, { expose: e, emit: t }) {
3748
3748
  Ce((k) => ({
3749
- 19083852: a.value.colors.border,
3750
- "9aacd358": a.value.colors.background,
3751
- "34ab9c56": a.value.colors.surfaceBackground,
3752
- "43d12cb8": a.value.colors.buttonBorder,
3753
- "0f3bcea6": a.value.colors.buttonBackground,
3754
- "177038a5": a.value.colors.buttonText,
3755
- "39377b94": a.value.colors.buttonBackgroundHover,
3756
- "63de70ec": a.value.colors.buttonPrimary,
3757
- "0009905c": a.value.colors.buttonPrimaryHover,
3758
- d69bfec6: a.value.colors.success,
3759
- "55ddd1ab": a.value.colors.successBackground,
3760
- "4b4cf122": a.value.colors.error,
3761
- "5344c020": a.value.colors.errorBackground,
3762
- "3400dad3": a.value.colors.text
3749
+ "1b3a8c40": l.value.colors.border,
3750
+ "2ad7797c": l.value.colors.background,
3751
+ a00485b2: l.value.colors.surfaceBackground,
3752
+ "73ead9dc": l.value.colors.buttonBorder,
3753
+ "0d809114": l.value.colors.buttonBackground,
3754
+ "4f5ae593": l.value.colors.buttonText,
3755
+ "110456f0": l.value.colors.buttonBackgroundHover,
3756
+ "36fa6848": l.value.colors.buttonPrimary,
3757
+ ffcdd280: l.value.colors.buttonPrimaryHover,
3758
+ "4e6bab22": l.value.colors.success,
3759
+ "20315cfd": l.value.colors.successBackground,
3760
+ "74a96774": l.value.colors.error,
3761
+ "185fd7c2": l.value.colors.errorBackground,
3762
+ ae195b7e: l.value.colors.text
3763
3763
  }));
3764
- const t = r, s = e, n = G(null), o = G(""), i = G(/* @__PURE__ */ new Set()), u = L(() => o.value === ""), a = L(() => vn(t.theme)), l = L(() => {
3765
- if (!n.value) return {};
3764
+ const s = r, n = t, o = G(null), i = G(""), u = G(/* @__PURE__ */ new Set()), a = V(() => i.value === ""), l = V(() => vn(s.theme)), h = V(() => {
3765
+ if (!o.value) return {};
3766
3766
  const k = {};
3767
- return Object.keys(n.value).forEach((S) => {
3768
- !S.startsWith("?") && !S.startsWith("#") && (k[S] = n.value[S]);
3767
+ return Object.keys(o.value).forEach((p) => {
3768
+ !p.startsWith("?") && !p.startsWith("#") && (k[p] = o.value[p]);
3769
3769
  }), k;
3770
- }), h = (k) => {
3770
+ }), f = (k) => {
3771
3771
  if (!k || !k.trim()) {
3772
- o.value = "", n.value = null;
3772
+ i.value = "", o.value = null;
3773
3773
  return;
3774
3774
  }
3775
3775
  try {
3776
- const S = Wr(k);
3777
- if (!S.valid) {
3778
- o.value = S.error || "Invalid XML", n.value = null;
3776
+ const p = Wr(k);
3777
+ if (!p.valid) {
3778
+ i.value = p.error || "Invalid XML", o.value = null;
3779
3779
  return;
3780
3780
  }
3781
- n.value = ze(k), o.value = "", ce(() => {
3782
- y();
3781
+ o.value = ze(k), i.value = "", ce(() => {
3782
+ m();
3783
3783
  });
3784
- } catch (S) {
3785
- o.value = S instanceof Error ? S.message : "Unknown parse error", n.value = null;
3784
+ } catch (p) {
3785
+ i.value = p instanceof Error ? p.message : "Unknown parse error", o.value = null;
3786
3786
  }
3787
- }, f = (k) => {
3788
- i.value.has(k) ? i.value.delete(k) : i.value.add(k);
3789
- }, y = () => {
3790
- const k = /* @__PURE__ */ new Set(), S = (g, T = "") => {
3791
- g !== null && typeof g == "object" && (T && k.add(T), Object.keys(g).forEach((U) => {
3792
- if (U.startsWith("@_") || U === "#text") return;
3793
- const V = g[U], Y = T ? `${T}.${U}[0]` : U;
3794
- Array.isArray(V) ? V.forEach((Z, D) => {
3795
- const J = T ? `${T}.${U}[${D}]` : `${U}[${D}]`;
3796
- S(Z, J);
3797
- }) : S(V, Y);
3787
+ }, y = (k) => {
3788
+ u.value.has(k) ? u.value.delete(k) : u.value.add(k);
3789
+ }, m = () => {
3790
+ const k = /* @__PURE__ */ new Set(), p = (T, j = "") => {
3791
+ T !== null && typeof T == "object" && (j && k.add(j), Object.keys(T).forEach((S) => {
3792
+ if (S.startsWith("@_") || S === "#text") return;
3793
+ const X = T[S], Z = j ? `${j}.${S}[0]` : S;
3794
+ Array.isArray(X) ? X.forEach((ee, z) => {
3795
+ const te = j ? `${j}.${S}[${z}]` : `${S}[${z}]`;
3796
+ p(ee, te);
3797
+ }) : p(X, Z);
3798
3798
  }));
3799
3799
  };
3800
- Object.keys(l.value).forEach((g) => {
3801
- S(l.value[g], g);
3802
- }), i.value = k, s("expand-all");
3803
- }, m = () => {
3804
- i.value.clear(), s("collapse-all");
3805
- }, C = async () => {
3806
- if (!(!u.value || !n.value))
3800
+ Object.keys(h.value).forEach((T) => {
3801
+ p(h.value[T], T);
3802
+ }), u.value = k, n("expand-all");
3803
+ }, A = () => {
3804
+ u.value.clear(), n("collapse-all");
3805
+ }, O = async () => {
3806
+ if (!(!a.value || !o.value))
3807
3807
  try {
3808
- const k = Te(n.value, {
3808
+ const k = Te(o.value, {
3809
3809
  format: !0,
3810
3810
  indentBy: " "
3811
3811
  });
3812
- await navigator.clipboard.writeText(k), s("copy-success", k);
3812
+ await navigator.clipboard.writeText(k), n("copy-success", k);
3813
3813
  } catch (k) {
3814
- const S = k instanceof Error ? k : new Error("Copy failed");
3815
- s("copy-error", S), console.error("Failed to copy XML:", k);
3814
+ const p = k instanceof Error ? k : new Error("Copy failed");
3815
+ n("copy-error", p), console.error("Failed to copy XML:", k);
3816
3816
  }
3817
- }, O = () => {
3818
- if (!(!u.value || !n.value))
3817
+ }, P = () => {
3818
+ if (!(!a.value || !o.value))
3819
3819
  try {
3820
- const k = Zr(n.value);
3821
- s("update:modelValue", k), s("compress", k);
3820
+ const k = Zr(o.value);
3821
+ n("update:modelValue", k), n("compress", k);
3822
3822
  } catch (k) {
3823
3823
  console.error("Failed to compress XML:", k);
3824
3824
  }
3825
- }, P = () => {
3826
- if (u.value)
3825
+ }, M = () => {
3826
+ if (a.value)
3827
3827
  try {
3828
- const k = zr(t.modelValue, {
3828
+ const k = zr(s.modelValue, {
3829
3829
  format: !0,
3830
3830
  indentBy: " "
3831
3831
  });
3832
- s("update:modelValue", k), s("format", k);
3832
+ n("update:modelValue", k), n("format", k);
3833
3833
  } catch (k) {
3834
3834
  console.error("Failed to format XML:", k);
3835
3835
  }
3836
- }, M = async (k) => {
3836
+ }, Q = async (k) => {
3837
3837
  try {
3838
- const S = typeof k == "string" ? k : JSON.stringify(k, null, 2);
3839
- await navigator.clipboard.writeText(S), s("copy-success", S);
3840
- } catch (S) {
3841
- const g = S instanceof Error ? S : new Error("Copy failed");
3842
- s("copy-error", g), console.error("Failed to copy value:", S);
3838
+ const p = typeof k == "string" ? k : JSON.stringify(k, null, 2);
3839
+ await navigator.clipboard.writeText(p), n("copy-success", p);
3840
+ } catch (p) {
3841
+ const T = p instanceof Error ? p : new Error("Copy failed");
3842
+ n("copy-error", T), console.error("Failed to copy value:", p);
3843
3843
  }
3844
3844
  };
3845
- return Fe(() => t.modelValue, (k) => {
3846
- h(k);
3847
- }, { immediate: !0 }), (k, S) => (x(), N("div", {
3848
- class: Oe(["xml-format", `xml-format--${a.value.name}`])
3845
+ return Fe(() => s.modelValue, (k) => {
3846
+ f(k);
3847
+ }, { immediate: !0 }), e({
3848
+ // 核心操作方法
3849
+ copyXml: O,
3850
+ compressSource: P,
3851
+ formatSource: M,
3852
+ expandAll: m,
3853
+ collapseAll: A,
3854
+ toggleExpand: y,
3855
+ // 状态访问方法
3856
+ isValidXml: () => a.value,
3857
+ getParsedXml: () => o.value,
3858
+ getExpandedNodes: () => u.value,
3859
+ getParseError: () => i.value,
3860
+ // 工具方法
3861
+ parseXmlString: (k) => f(k),
3862
+ copyValue: (k) => Q(k)
3863
+ }), (k, p) => (x(), N("div", {
3864
+ class: Oe(["xml-format", `xml-format--${l.value.name}`])
3849
3865
  }, [
3850
3866
  k.showToolbar ? (x(), N("div", _n, [
3851
3867
  E("div", xn, [
3852
3868
  E("button", {
3853
3869
  class: "xml-format__btn xml-format__btn--primary",
3854
- onClick: C,
3855
- disabled: !u.value,
3870
+ onClick: O,
3871
+ disabled: !a.value,
3856
3872
  title: "Copy XML"
3857
3873
  }, " 📋 Copy ", 8, Nn),
3858
3874
  E("button", {
3859
3875
  class: "xml-format__btn xml-format__btn--secondary",
3860
- onClick: y,
3861
- disabled: !u.value,
3876
+ onClick: m,
3877
+ disabled: !a.value,
3862
3878
  title: "Expand All"
3863
3879
  }, " ⬇️ Expand All ", 8, kn),
3864
3880
  E("button", {
3865
3881
  class: "xml-format__btn xml-format__btn--secondary",
3866
- onClick: m,
3867
- disabled: !u.value,
3882
+ onClick: A,
3883
+ disabled: !a.value,
3868
3884
  title: "Collapse All"
3869
3885
  }, " ➡️ Collapse All ", 8, wn),
3870
3886
  E("button", {
3871
3887
  class: "xml-format__btn xml-format__btn--secondary",
3872
- onClick: O,
3873
- disabled: !u.value,
3888
+ onClick: P,
3889
+ disabled: !a.value,
3874
3890
  title: "Compress XML"
3875
3891
  }, " 📦 Compress ", 8, An),
3876
3892
  E("button", {
3877
3893
  class: "xml-format__btn xml-format__btn--secondary",
3878
- onClick: P,
3879
- disabled: !u.value,
3894
+ onClick: M,
3895
+ disabled: !a.value,
3880
3896
  title: "Format XML"
3881
3897
  }, " ✨ Format ", 8, Cn)
3882
3898
  ]),
3883
3899
  E("div", On, [
3884
- u.value ? (x(), N("span", Tn, " ✅ Valid XML ")) : (x(), N("span", Pn, " ❌ Invalid XML "))
3900
+ a.value ? (x(), N("span", Tn, " ✅ Valid XML ")) : (x(), N("span", Pn, " ❌ Invalid XML "))
3885
3901
  ])
3886
- ])) : X("", !0),
3902
+ ])) : F("", !0),
3887
3903
  E("div", Sn, [
3888
- u.value ? (x(), N("div", $n, [
3889
- (x(!0), N(he, null, pe(l.value, (g, T) => (x(), Xe(gn, {
3890
- key: String(T),
3891
- value: g,
3892
- "tag-name": String(T),
3904
+ a.value ? (x(), N("div", $n, [
3905
+ (x(!0), N(he, null, pe(h.value, (T, j) => (x(), Xe(gn, {
3906
+ key: String(j),
3907
+ value: T,
3908
+ "tag-name": String(j),
3893
3909
  level: 0,
3894
- expanded: i.value,
3895
- theme: a.value,
3896
- onToggleExpand: f,
3897
- onCopy: M
3910
+ expanded: u.value,
3911
+ theme: l.value,
3912
+ onToggleExpand: y,
3913
+ onCopy: Q
3898
3914
  }, null, 8, ["value", "tag-name", "expanded", "theme"]))), 128))
3899
3915
  ])) : (x(), N("div", In, [
3900
- S[0] || (S[0] = E("h4", null, "XML Parse Error:", -1)),
3901
- E("pre", null, j(o.value), 1)
3916
+ p[0] || (p[0] = E("h4", null, "XML Parse Error:", -1)),
3917
+ E("pre", null, R(i.value), 1)
3902
3918
  ]))
3903
3919
  ])
3904
3920
  ], 2));
3905
3921
  }
3906
- }), Un = /* @__PURE__ */ me(Bn, [["__scopeId", "data-v-ec8763a7"]]), Ln = [Wt], Vn = (r) => {
3907
- Ln.forEach((e) => {
3922
+ }), Un = /* @__PURE__ */ be(Bn, [["__scopeId", "data-v-c1cb61a7"]]), Vn = [Wt], Ln = (r) => {
3923
+ Vn.forEach((e) => {
3908
3924
  const t = e.name || e.__name || "UnknownComponent";
3909
3925
  r.component(t, e);
3910
3926
  });
3911
3927
  }, Fn = {
3912
- install: Vn
3928
+ install: Ln
3913
3929
  };
3914
3930
  export {
3915
3931
  Wt as JsonFormat,