yh-report 2.4.115 → 2.4.117

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.
@@ -1134,10 +1134,10 @@ function applyBorderOperation(t, e, r) {
1134
1134
  d.row < n && (n = d.row), d.row > o && (o = d.row), d.col < i && (i = d.col), d.col > a && (a = d.col);
1135
1135
  });
1136
1136
  const s = new Set(t.map((d) => `${d.row},${d.col}`)), l = /* @__PURE__ */ new Map(), c = r.color ? { style: r.style, color: r.color } : { style: r.style }, u = (d, p, m, g) => {
1137
- var x, y, v;
1137
+ var $, y, v;
1138
1138
  const _ = `${d},${p}`;
1139
1139
  let E = l.get(_);
1140
- E || (E = { row: d, col: p, border: cloneBorder((v = (y = (x = e[d]) == null ? void 0 : x[p]) == null ? void 0 : y.style) == null ? void 0 : v.border) }, l.set(_, E)), E.border[m] = { ...g };
1140
+ E || (E = { row: d, col: p, border: cloneBorder((v = (y = ($ = e[d]) == null ? void 0 : $[p]) == null ? void 0 : y.style) == null ? void 0 : v.border) }, l.set(_, E)), E.border[m] = { ...g };
1141
1141
  }, f = r.mode === "none";
1142
1142
  t.forEach((d) => {
1143
1143
  var _, E;
@@ -1146,9 +1146,9 @@ function applyBorderOperation(t, e, r) {
1146
1146
  const m = cloneBorder((E = p.style) == null ? void 0 : E.border);
1147
1147
  f ? (m.top = { style: "none" }, m.right = { style: "none" }, m.bottom = { style: "none" }, m.left = { style: "none" }) : getSidesForMode(d, n, o, i, a, r.mode).forEach((y) => {
1148
1148
  m[y] = { ...c };
1149
- }), l.set(`${d.row},${d.col}`, { row: d.row, col: d.col, border: m }), (f ? getSidesForMode(d, n, o, i, a, "outside") : getSidesForMode(d, n, o, i, a, r.mode)).forEach((x) => {
1149
+ }), l.set(`${d.row},${d.col}`, { row: d.row, col: d.col, border: m }), (f ? getSidesForMode(d, n, o, i, a, "outside") : getSidesForMode(d, n, o, i, a, r.mode)).forEach(($) => {
1150
1150
  var C;
1151
- const y = getNeighborSide(d, x);
1151
+ const y = getNeighborSide(d, $);
1152
1152
  if (!y) return;
1153
1153
  const v = (C = e[y.row]) == null ? void 0 : C[y.col];
1154
1154
  v && (s.has(`${y.row},${y.col}`) || v.rowSpan === 0 || v.colSpan === 0 || u(y.row, y.col, y.side, f ? { style: "none" } : { ...c }));
@@ -1160,10 +1160,9 @@ function applyBorderOperation(t, e, r) {
1160
1160
  });
1161
1161
  }
1162
1162
  function generateNumFmt(t, e) {
1163
- if (typeof e != "number" || e < 0 || !Number.isInteger(e))
1164
- return "0";
1165
- let r = t ? "#,##0" : "0", n = "";
1166
- return e > 0 && (n = "." + "0".repeat(e)), r + n;
1163
+ const r = Math.max(0, Math.floor(Number(e) || 0));
1164
+ let n = t ? "#,##0" : "0";
1165
+ return r > 0 && (n += "." + "0".repeat(r)), n;
1167
1166
  }
1168
1167
  function findMaxColTableIndex(t) {
1169
1168
  let e = 0, r = 0;
@@ -1250,11 +1249,11 @@ function writeReportConfigsToSheet(t, e, r, n) {
1250
1249
  const g = c.filter((y) => y.isHidden).map((y) => y.index), _ = l[p].filter((y) => !g.includes(y.col));
1251
1250
  let E = _.map((y) => y.text);
1252
1251
  p > 0 ? t.addRow(E) : i === n ? t.getRow(n + 1).values = E : t.addRow(E);
1253
- const x = t.getRow(i + p + 1);
1254
- m && m.size && !isNaN(m.size) ? m.size > 0 ? x.height = m.size < 25 ? 25 : m.size : x.hidden = !0 : x.height = 25;
1252
+ const $ = t.getRow(i + p + 1);
1253
+ m && m.size && !isNaN(m.size) ? m.size > 0 ? $.height = m.size < 25 ? 25 : m.size : $.hidden = !0 : $.height = 25;
1255
1254
  for (let y = 0; y < _.length; y++) {
1256
- const v = _[y], C = x.getCell(y + 1);
1257
- let { style: w, col: $, row: I, colSpan: A, rowSpan: O, format: N, formatType: U } = v;
1255
+ const v = _[y], C = $.getCell(y + 1);
1256
+ let { style: w, col: x, row: I, colSpan: A, rowSpan: O, format: N, formatType: U } = v;
1258
1257
  const L = {};
1259
1258
  if (w && w.color && (L.color = {
1260
1259
  argb: "FF" + ((f = w.color) == null ? void 0 : f.replace("#", ""))
@@ -1364,7 +1363,7 @@ var dayjs_min = { exports: {} };
1364
1363
  (function(r, n) {
1365
1364
  t.exports = n();
1366
1365
  })(commonjsGlobal, function() {
1367
- var r = 1e3, n = 6e4, o = 36e5, i = "millisecond", a = "second", s = "minute", l = "hour", c = "day", u = "week", f = "month", d = "quarter", p = "year", m = "date", g = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, x = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
1366
+ var r = 1e3, n = 6e4, o = 36e5, i = "millisecond", a = "second", s = "minute", l = "hour", c = "day", u = "week", f = "month", d = "quarter", p = "year", m = "date", g = "Invalid Date", _ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, $ = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
1368
1367
  var T = ["th", "st", "nd", "rd"], b = M % 100;
1369
1368
  return "[" + M + (T[(b - 20) % 10] || T[b] || T[0]) + "]";
1370
1369
  } }, y = function(M, T, b) {
@@ -1384,9 +1383,9 @@ var dayjs_min = { exports: {} };
1384
1383
  }, u: function(M) {
1385
1384
  return M === void 0;
1386
1385
  } }, C = "en", w = {};
1387
- w[C] = x;
1388
- var $ = "$isDayjsObject", I = function(M) {
1389
- return M instanceof U || !(!M || !M[$]);
1386
+ w[C] = $;
1387
+ var x = "$isDayjsObject", I = function(M) {
1388
+ return M instanceof U || !(!M || !M[x]);
1390
1389
  }, A = function M(T, b, D) {
1391
1390
  var S;
1392
1391
  if (!T) return C;
@@ -1410,7 +1409,7 @@ var dayjs_min = { exports: {} };
1410
1409
  };
1411
1410
  var U = function() {
1412
1411
  function M(b) {
1413
- this.$L = A(b.locale, null, !0), this.parse(b), this.$x = this.$x || b.x || {}, this[$] = !0;
1412
+ this.$L = A(b.locale, null, !0), this.parse(b), this.$x = this.$x || b.x || {}, this[x] = !0;
1414
1413
  }
1415
1414
  var T = M.prototype;
1416
1415
  return T.parse = function(b) {
@@ -1858,7 +1857,7 @@ async function fetchReportData(t, e, r, n = !1) {
1858
1857
  const m = a.get(p.toUpperCase()), g = m != null && m.length ? { ...i, params: [...i.params || [], ...m] } : i, _ = await getDateSourceData(p, g);
1859
1858
  let E = _.data;
1860
1859
  if (n && Array.isArray(E)) {
1861
- const x = _.count || E.length, y = i.pageSize > 0 ? i.pageSize : FULL_FETCH_PAGE_SIZE, v = Math.min(Math.ceil(x / y), FULL_FETCH_MAX_PAGES);
1860
+ const $ = _.count || E.length, y = i.pageSize > 0 ? i.pageSize : FULL_FETCH_PAGE_SIZE, v = Math.min(Math.ceil($ / y), FULL_FETCH_MAX_PAGES);
1862
1861
  for (let C = 2; C <= v; C++) {
1863
1862
  const w = await getDateSourceData(p, { ...g, pageNumber: C });
1864
1863
  if (!Array.isArray(w.data) || w.data.length === 0)
@@ -1988,7 +1987,7 @@ class Jsep {
1988
1987
  * @returns {string}
1989
1988
  */
1990
1989
  static get version() {
1991
- return "1.4.0";
1990
+ return "1.6.0";
1992
1991
  }
1993
1992
  /**
1994
1993
  * @returns {string}
@@ -3158,7 +3157,7 @@ var divide = /* @__PURE__ */ function() {
3158
3157
  for (; !n[0] && n.length > 1; ) n.shift();
3159
3158
  }
3160
3159
  return function(n, o, i, a, s, l) {
3161
- var c, u, f, d, p, m, g, _, E, x, y, v, C, w, $, I, A, O, N, U, L = n.constructor, M = n.s == o.s ? 1 : -1, T = n.d, b = o.d;
3160
+ var c, u, f, d, p, m, g, _, E, $, y, v, C, w, x, I, A, O, N, U, L = n.constructor, M = n.s == o.s ? 1 : -1, T = n.d, b = o.d;
3162
3161
  if (!T || !T[0] || !b || !b[0])
3163
3162
  return new L(
3164
3163
  // Return NaN if either NaN, or both Infinity or 0.
@@ -3167,28 +3166,28 @@ var divide = /* @__PURE__ */ function() {
3167
3166
  T && T[0] == 0 || !b ? M * 0 : M / 0
3168
3167
  )
3169
3168
  );
3170
- for (l ? (p = 1, u = n.e - o.e) : (l = BASE, p = LOG_BASE, u = mathfloor(n.e / p) - mathfloor(o.e / p)), N = b.length, A = T.length, E = new L(M), x = E.d = [], f = 0; b[f] == (T[f] || 0); f++) ;
3169
+ for (l ? (p = 1, u = n.e - o.e) : (l = BASE, p = LOG_BASE, u = mathfloor(n.e / p) - mathfloor(o.e / p)), N = b.length, A = T.length, E = new L(M), $ = E.d = [], f = 0; b[f] == (T[f] || 0); f++) ;
3171
3170
  if (b[f] > (T[f] || 0) && u--, i == null ? (w = i = L.precision, a = L.rounding) : s ? w = i + (n.e - o.e) + 1 : w = i, w < 0)
3172
- x.push(1), m = !0;
3171
+ $.push(1), m = !0;
3173
3172
  else {
3174
3173
  if (w = w / p + 2 | 0, f = 0, N == 1) {
3175
3174
  for (d = 0, b = b[0], w++; (f < A || d) && w--; f++)
3176
- $ = d * l + (T[f] || 0), x[f] = $ / b | 0, d = $ % b | 0;
3175
+ x = d * l + (T[f] || 0), $[f] = x / b | 0, d = x % b | 0;
3177
3176
  m = d || f < A;
3178
3177
  } else {
3179
3178
  for (d = l / (b[0] + 1) | 0, d > 1 && (b = t(b, d, l), T = t(T, d, l), N = b.length, A = T.length), I = N, y = T.slice(0, N), v = y.length; v < N; ) y[v++] = 0;
3180
3179
  U = b.slice(), U.unshift(0), O = b[0], b[1] >= l / 2 && ++O;
3181
3180
  do
3182
- d = 0, c = e(b, y, N, v), c < 0 ? (C = y[0], N != v && (C = C * l + (y[1] || 0)), d = C / O | 0, d > 1 ? (d >= l && (d = l - 1), g = t(b, d, l), _ = g.length, v = y.length, c = e(g, y, _, v), c == 1 && (d--, r(g, N < _ ? U : b, _, l))) : (d == 0 && (c = d = 1), g = b.slice()), _ = g.length, _ < v && g.unshift(0), r(y, g, v, l), c == -1 && (v = y.length, c = e(b, y, N, v), c < 1 && (d++, r(y, N < v ? U : b, v, l))), v = y.length) : c === 0 && (d++, y = [0]), x[f++] = d, c && y[0] ? y[v++] = T[I] || 0 : (y = [T[I]], v = 1);
3181
+ d = 0, c = e(b, y, N, v), c < 0 ? (C = y[0], N != v && (C = C * l + (y[1] || 0)), d = C / O | 0, d > 1 ? (d >= l && (d = l - 1), g = t(b, d, l), _ = g.length, v = y.length, c = e(g, y, _, v), c == 1 && (d--, r(g, N < _ ? U : b, _, l))) : (d == 0 && (c = d = 1), g = b.slice()), _ = g.length, _ < v && g.unshift(0), r(y, g, v, l), c == -1 && (v = y.length, c = e(b, y, N, v), c < 1 && (d++, r(y, N < v ? U : b, v, l))), v = y.length) : c === 0 && (d++, y = [0]), $[f++] = d, c && y[0] ? y[v++] = T[I] || 0 : (y = [T[I]], v = 1);
3183
3182
  while ((I++ < A || y[0] !== void 0) && w--);
3184
3183
  m = y[0] !== void 0;
3185
3184
  }
3186
- x[0] || x.shift();
3185
+ $[0] || $.shift();
3187
3186
  }
3188
3187
  if (p == 1)
3189
3188
  E.e = u, inexact = m;
3190
3189
  else {
3191
- for (f = 1, d = x[0]; d >= 10; d /= 10) f++;
3190
+ for (f = 1, d = $[0]; d >= 10; d /= 10) f++;
3192
3191
  E.e = f + u * p - 1, finalise(E, s ? i + E.e + 1 : i, a, m);
3193
3192
  }
3194
3193
  return E;
@@ -3305,7 +3304,7 @@ function naturalExponential(t, e) {
3305
3304
  }
3306
3305
  }
3307
3306
  function naturalLogarithm(t, e) {
3308
- var r, n, o, i, a, s, l, c, u, f, d, p = 1, m = 10, g = t, _ = g.d, E = g.constructor, x = E.rounding, y = E.precision;
3307
+ var r, n, o, i, a, s, l, c, u, f, d, p = 1, m = 10, g = t, _ = g.d, E = g.constructor, $ = E.rounding, y = E.precision;
3309
3308
  if (g.s < 0 || !_ || !_[0] || !g.e && _[0] == 1 && _.length == 1)
3310
3309
  return new E(_ && !_[0] ? -1 / 0 : g.s != 1 ? NaN : _ ? 0 : g);
3311
3310
  if (e == null ? (external = !1, u = y) : u = e, E.precision = u += m, r = digitsToString(_), n = r.charAt(0), Math.abs(i = g.e) < 15e14) {
@@ -3313,14 +3312,14 @@ function naturalLogarithm(t, e) {
3313
3312
  g = g.times(t), r = digitsToString(g.d), n = r.charAt(0), p++;
3314
3313
  i = g.e, n > 1 ? (g = new E("0." + r), i++) : g = new E(n + "." + r.slice(1));
3315
3314
  } else
3316
- return c = getLn10(E, u + 2, y).times(i + ""), g = naturalLogarithm(new E(n + "." + r.slice(1)), u - m).plus(c), E.precision = y, e == null ? finalise(g, y, x, external = !0) : g;
3315
+ return c = getLn10(E, u + 2, y).times(i + ""), g = naturalLogarithm(new E(n + "." + r.slice(1)), u - m).plus(c), E.precision = y, e == null ? finalise(g, y, $, external = !0) : g;
3317
3316
  for (f = g, l = a = g = divide(g.minus(1), g.plus(1), u, 1), d = finalise(g.times(g), u, 1), o = 3; ; ) {
3318
3317
  if (a = finalise(a.times(d), u, 1), c = l.plus(divide(a, new E(o), u, 1)), digitsToString(c.d).slice(0, u) === digitsToString(l.d).slice(0, u))
3319
3318
  if (l = l.times(2), i !== 0 && (l = l.plus(getLn10(E, u + 2, y).times(i + ""))), l = divide(l, new E(p), u, 1), e == null)
3320
- if (checkRoundingDigits(l.d, u - m, x, s))
3319
+ if (checkRoundingDigits(l.d, u - m, $, s))
3321
3320
  E.precision = u += m, c = a = g = divide(f.minus(1), f.plus(1), u, 1), d = finalise(g.times(g), u, 1), o = s = 1;
3322
3321
  else
3323
- return finalise(l, E.precision = y, x, external = !0);
3322
+ return finalise(l, E.precision = y, $, external = !0);
3324
3323
  else
3325
3324
  return E.precision = y, l;
3326
3325
  l = c, o += 2;
@@ -7096,9 +7095,9 @@ regex.testAlphanumeric = function t(e) {
7096
7095
  if (!i.isValid(p))
7097
7096
  throw new Error("Invalid QR Code version");
7098
7097
  typeof g > "u" && (g = o.BYTE);
7099
- const _ = e.getSymbolTotalCodewords(p), E = r.getTotalCodewordsCount(p, m), x = (_ - E) * 8;
7100
- if (g === o.MIXED) return x;
7101
- const y = x - c(g, p);
7098
+ const _ = e.getSymbolTotalCodewords(p), E = r.getTotalCodewordsCount(p, m), $ = (_ - E) * 8;
7099
+ if (g === o.MIXED) return $;
7100
+ const y = $ - c(g, p);
7102
7101
  switch (g) {
7103
7102
  case o.NUMERIC:
7104
7103
  return Math.floor(y / 10 * 3);
@@ -7349,33 +7348,33 @@ var dijkstraExports = dijkstra.exports;
7349
7348
  function c(E) {
7350
7349
  return unescape(encodeURIComponent(E)).length;
7351
7350
  }
7352
- function u(E, x, y) {
7351
+ function u(E, $, y) {
7353
7352
  const v = [];
7354
7353
  let C;
7355
7354
  for (; (C = E.exec(y)) !== null; )
7356
7355
  v.push({
7357
7356
  data: C[0],
7358
7357
  index: C.index,
7359
- mode: x,
7358
+ mode: $,
7360
7359
  length: C[0].length
7361
7360
  });
7362
7361
  return v;
7363
7362
  }
7364
7363
  function f(E) {
7365
- const x = u(a.NUMERIC, e.NUMERIC, E), y = u(a.ALPHANUMERIC, e.ALPHANUMERIC, E);
7364
+ const $ = u(a.NUMERIC, e.NUMERIC, E), y = u(a.ALPHANUMERIC, e.ALPHANUMERIC, E);
7366
7365
  let v, C;
7367
- return s.isKanjiModeEnabled() ? (v = u(a.BYTE, e.BYTE, E), C = u(a.KANJI, e.KANJI, E)) : (v = u(a.BYTE_KANJI, e.BYTE, E), C = []), x.concat(y, v, C).sort(function($, I) {
7368
- return $.index - I.index;
7369
- }).map(function($) {
7366
+ return s.isKanjiModeEnabled() ? (v = u(a.BYTE, e.BYTE, E), C = u(a.KANJI, e.KANJI, E)) : (v = u(a.BYTE_KANJI, e.BYTE, E), C = []), $.concat(y, v, C).sort(function(x, I) {
7367
+ return x.index - I.index;
7368
+ }).map(function(x) {
7370
7369
  return {
7371
- data: $.data,
7372
- mode: $.mode,
7373
- length: $.length
7370
+ data: x.data,
7371
+ mode: x.mode,
7372
+ length: x.length
7374
7373
  };
7375
7374
  });
7376
7375
  }
7377
- function d(E, x) {
7378
- switch (x) {
7376
+ function d(E, $) {
7377
+ switch ($) {
7379
7378
  case e.NUMERIC:
7380
7379
  return r.getBitsLength(E);
7381
7380
  case e.ALPHANUMERIC:
@@ -7387,54 +7386,54 @@ var dijkstraExports = dijkstra.exports;
7387
7386
  }
7388
7387
  }
7389
7388
  function p(E) {
7390
- return E.reduce(function(x, y) {
7391
- const v = x.length - 1 >= 0 ? x[x.length - 1] : null;
7392
- return v && v.mode === y.mode ? (x[x.length - 1].data += y.data, x) : (x.push(y), x);
7389
+ return E.reduce(function($, y) {
7390
+ const v = $.length - 1 >= 0 ? $[$.length - 1] : null;
7391
+ return v && v.mode === y.mode ? ($[$.length - 1].data += y.data, $) : ($.push(y), $);
7393
7392
  }, []);
7394
7393
  }
7395
7394
  function m(E) {
7396
- const x = [];
7395
+ const $ = [];
7397
7396
  for (let y = 0; y < E.length; y++) {
7398
7397
  const v = E[y];
7399
7398
  switch (v.mode) {
7400
7399
  case e.NUMERIC:
7401
- x.push([
7400
+ $.push([
7402
7401
  v,
7403
7402
  { data: v.data, mode: e.ALPHANUMERIC, length: v.length },
7404
7403
  { data: v.data, mode: e.BYTE, length: v.length }
7405
7404
  ]);
7406
7405
  break;
7407
7406
  case e.ALPHANUMERIC:
7408
- x.push([
7407
+ $.push([
7409
7408
  v,
7410
7409
  { data: v.data, mode: e.BYTE, length: v.length }
7411
7410
  ]);
7412
7411
  break;
7413
7412
  case e.KANJI:
7414
- x.push([
7413
+ $.push([
7415
7414
  v,
7416
7415
  { data: v.data, mode: e.BYTE, length: c(v.data) }
7417
7416
  ]);
7418
7417
  break;
7419
7418
  case e.BYTE:
7420
- x.push([
7419
+ $.push([
7421
7420
  { data: v.data, mode: e.BYTE, length: c(v.data) }
7422
7421
  ]);
7423
7422
  }
7424
7423
  }
7425
- return x;
7424
+ return $;
7426
7425
  }
7427
- function g(E, x) {
7426
+ function g(E, $) {
7428
7427
  const y = {}, v = { start: {} };
7429
7428
  let C = ["start"];
7430
7429
  for (let w = 0; w < E.length; w++) {
7431
- const $ = E[w], I = [];
7432
- for (let A = 0; A < $.length; A++) {
7433
- const O = $[A], N = "" + w + A;
7430
+ const x = E[w], I = [];
7431
+ for (let A = 0; A < x.length; A++) {
7432
+ const O = x[A], N = "" + w + A;
7434
7433
  I.push(N), y[N] = { node: O, lastCount: 0 }, v[N] = {};
7435
7434
  for (let U = 0; U < C.length; U++) {
7436
7435
  const L = C[U];
7437
- y[L] && y[L].node.mode === O.mode ? (v[L][N] = d(y[L].lastCount + O.length, O.mode) - d(y[L].lastCount, O.mode), y[L].lastCount += O.length) : (y[L] && (y[L].lastCount = O.length), v[L][N] = d(O.length, O.mode) + 4 + e.getCharCountIndicator(O.mode, x));
7436
+ y[L] && y[L].node.mode === O.mode ? (v[L][N] = d(y[L].lastCount + O.length, O.mode) - d(y[L].lastCount, O.mode), y[L].lastCount += O.length) : (y[L] && (y[L].lastCount = O.length), v[L][N] = d(O.length, O.mode) + 4 + e.getCharCountIndicator(O.mode, $));
7438
7437
  }
7439
7438
  }
7440
7439
  C = I;
@@ -7443,10 +7442,10 @@ var dijkstraExports = dijkstra.exports;
7443
7442
  v[C[w]].end = 0;
7444
7443
  return { map: v, table: y };
7445
7444
  }
7446
- function _(E, x) {
7445
+ function _(E, $) {
7447
7446
  let y;
7448
7447
  const v = e.getBestModeForData(E);
7449
- if (y = e.from(x, v), y !== e.BYTE && y.bit < v.bit)
7448
+ if (y = e.from($, v), y !== e.BYTE && y.bit < v.bit)
7450
7449
  throw new Error('"' + E + '" cannot be encoded with mode ' + e.toString(y) + `.
7451
7450
  Suggested mode is: ` + e.toString(v));
7452
7451
  switch (y === e.KANJI && !s.isKanjiModeEnabled() && (y = e.BYTE), y) {
@@ -7460,18 +7459,18 @@ var dijkstraExports = dijkstra.exports;
7460
7459
  return new o(E);
7461
7460
  }
7462
7461
  }
7463
- t.fromArray = function(x) {
7464
- return x.reduce(function(y, v) {
7462
+ t.fromArray = function($) {
7463
+ return $.reduce(function(y, v) {
7465
7464
  return typeof v == "string" ? y.push(_(v, null)) : v.data && y.push(_(v.data, v.mode)), y;
7466
7465
  }, []);
7467
- }, t.fromString = function(x, y) {
7468
- const v = f(x, s.isKanjiModeEnabled()), C = m(v), w = g(C, y), $ = l.find_path(w.map, "start", "end"), I = [];
7469
- for (let A = 1; A < $.length - 1; A++)
7470
- I.push(w.table[$[A]].node);
7466
+ }, t.fromString = function($, y) {
7467
+ const v = f($, s.isKanjiModeEnabled()), C = m(v), w = g(C, y), x = l.find_path(w.map, "start", "end"), I = [];
7468
+ for (let A = 1; A < x.length - 1; A++)
7469
+ I.push(w.table[x[A]].node);
7471
7470
  return t.fromArray(p(I));
7472
- }, t.rawSplit = function(x) {
7471
+ }, t.rawSplit = function($) {
7473
7472
  return t.fromArray(
7474
- f(x, s.isKanjiModeEnabled())
7473
+ f($, s.isKanjiModeEnabled())
7475
7474
  );
7476
7475
  };
7477
7476
  })(segments);
@@ -7549,10 +7548,10 @@ function createCodewords(t, e, r) {
7549
7548
  let m = 0;
7550
7549
  const g = new Array(a), _ = new Array(a);
7551
7550
  let E = 0;
7552
- const x = new Uint8Array(t.buffer);
7553
- for (let $ = 0; $ < a; $++) {
7554
- const I = $ < l ? u : f;
7555
- g[$] = x.slice(m, m + I), _[$] = p.encode(g[$]), m += I, E = Math.max(E, I);
7551
+ const $ = new Uint8Array(t.buffer);
7552
+ for (let x = 0; x < a; x++) {
7553
+ const I = x < l ? u : f;
7554
+ g[x] = $.slice(m, m + I), _[x] = p.encode(g[x]), m += I, E = Math.max(E, I);
7556
7555
  }
7557
7556
  const y = new Uint8Array(n);
7558
7557
  let v = 0, C, w;
@@ -7841,8 +7840,11 @@ function renderCellStyle(t) {
7841
7840
  }
7842
7841
  }), e;
7843
7842
  }
7843
+ function normalizeDecimalPlaces(t) {
7844
+ return Math.max(0, Math.floor(Number(t) || 0));
7845
+ }
7844
7846
  function formatNumber$1(t, { numberDecimal: e, numberUseGrouping: r } = {}) {
7845
- const n = e === 0 ? Math.round(t) : new Decimal(t).toFixed(e ?? 0);
7847
+ const n = e === 0 ? Math.round(t) : new Decimal(t).toFixed(normalizeDecimalPlaces(e));
7846
7848
  if (r) {
7847
7849
  const o = n.toString().split(".");
7848
7850
  return o[0] = o[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), o.join(".");
@@ -7850,14 +7852,14 @@ function formatNumber$1(t, { numberDecimal: e, numberUseGrouping: r } = {}) {
7850
7852
  return n;
7851
7853
  }
7852
7854
  function formatCurrency(t, { numberDecimal: e, currencySymbol: r, numberUseGrouping: n } = {}) {
7853
- const o = new Decimal(t).toFixed(e > 0 ? e : 0);
7854
- let [i, a] = o.split(".");
7855
- n && (i = i.replace(/\B(?=(\d{3})+(?!\d))/g, ","));
7856
- let s = `${r}${i}`;
7857
- return e > 0 && (s += `.${a}`), s;
7855
+ const o = normalizeDecimalPlaces(e), i = new Decimal(t).toFixed(o);
7856
+ let [a, s] = i.split(".");
7857
+ n && (a = a.replace(/\B(?=(\d{3})+(?!\d))/g, ","));
7858
+ let l = `${r}${a}`;
7859
+ return o > 0 && (l += `.${s}`), l;
7858
7860
  }
7859
7861
  function formatPercentage(t, { numberDecimal: e } = {}, r = !1) {
7860
- const n = r ? 1e3 : 100, o = new Decimal(t).times(n).toFixed(e ?? 0);
7862
+ const n = r ? 1e3 : 100, o = new Decimal(t).times(n).toFixed(normalizeDecimalPlaces(e));
7861
7863
  return r ? `${o}‰` : `${o}%`;
7862
7864
  }
7863
7865
  function formatScientific(t, { scientificNotation: e = "e", digits: r = 6 } = {}) {
@@ -7886,7 +7888,7 @@ function formatCellValue(t, e = FormatType.TEXT, r) {
7886
7888
  let n = null;
7887
7889
  if ([FormatType.NUMBER, FormatType.CURRENCY, FormatType.PERCENT, FormatType.PROMILLE, FormatType.SCIENTIFIC].includes(e)) {
7888
7890
  let o = typeof t == "string" ? t.replace(/,/g, "") : String(t);
7889
- if (n = parseFloat(o), isNaN(n) && (n = 0), n === 0 && (r == null ? void 0 : r.defaultCellContent) !== void 0)
7891
+ if (n = parseFloat(o), Number.isFinite(n) || (n = 0), n === 0 && (r == null ? void 0 : r.defaultCellContent) !== void 0)
7890
7892
  return r.defaultCellContent;
7891
7893
  }
7892
7894
  switch (e) {
@@ -7927,10 +7929,10 @@ function renderImageStyle(t) {
7927
7929
  return t.width !== void 0 && e.push(`width:${t.width}px`), t.height !== void 0 && e.push(`height:${t.height}px`), t.fit && e.push(`object-fit:${t.fit}`), e.length ? e.join(";") : "";
7928
7930
  }
7929
7931
  function renderCell(t, e, r) {
7930
- var x, y, v, C, w;
7932
+ var $, y, v, C, w;
7931
7933
  const n = document.createElement("td");
7932
7934
  n.setAttribute("data-cell-config", `${e.row}-${e.col}`), n.setAttribute("rowspan", e.rowSpan), n.setAttribute("colspan", e.colSpan);
7933
- const o = ((x = e.style) == null ? void 0 : x.allowContentOverflow) === !0;
7935
+ const o = (($ = e.style) == null ? void 0 : $.allowContentOverflow) === !0;
7934
7936
  n.style.boxSizing = "border-box", n.style.position = "relative", e.rowSpan <= 1 && (o ? n.style.minHeight = `${t.size ?? 25}px` : n.style.height = `${t.size ?? 25}px`);
7935
7937
  const i = { left: "flex-start", center: "center", right: "flex-end" }, a = { top: "flex-start", center: "center", bottom: "flex-end" }, s = i[(y = e.style) == null ? void 0 : y.textAlign] || "center", l = a[(v = e.style) == null ? void 0 : v.verticalAlign] || "center", c = document.createElement("div");
7936
7938
  o ? c.style.cssText = `overflow:visible;position:relative;display:flex;align-items:${l};justify-content:${s};` : c.style.cssText = `overflow:hidden;position:absolute;inset:0;display:flex;align-items:${l};justify-content:${s};`;
@@ -7940,13 +7942,13 @@ function renderCell(t, e, r) {
7940
7942
  d = `<i class="iconfont ${e.data}"></i>`, f = !0;
7941
7943
  break;
7942
7944
  case CellType.IMAGE: {
7943
- const $ = renderImageStyle(e.imageOptions);
7944
- d = `<img src="${e.rawData ?? e.data}" alt="" style="max-width:100%;max-height:100%;object-fit:contain${$ ? ";" + $ : ""}">`, f = !0;
7945
+ const x = renderImageStyle(e.imageOptions);
7946
+ d = `<img src="${e.rawData ?? e.data}" alt="" style="max-width:100%;max-height:100%;object-fit:contain${x ? ";" + x : ""}">`, f = !0;
7945
7947
  break;
7946
7948
  }
7947
7949
  case CellType.RICH: {
7948
- const $ = [void 0, null, ""].includes(e.text) ? ((C = e.formatType) == null ? void 0 : C.defaultCellContent) || "" : String(e.text);
7949
- $ && (d = $, f = !0);
7950
+ const x = [void 0, null, ""].includes(e.text) ? ((C = e.formatType) == null ? void 0 : C.defaultCellContent) || "" : String(e.text);
7951
+ x && (d = x, f = !0);
7950
7952
  break;
7951
7953
  }
7952
7954
  default:
@@ -7955,25 +7957,25 @@ function renderCell(t, e, r) {
7955
7957
  }
7956
7958
  if (!f && e.format === FormatType.BARCODE)
7957
7959
  try {
7958
- const $ = e.barcodeUrl || canvasPool.generateBarcode(u, e.barcodeOptions);
7959
- $ && (d = `<img src="${$}" alt="barcode" style="max-width:100%;max-height:100%;object-fit:contain">`, f = !0);
7960
- } catch ($) {
7961
- console.error(`条形码生成失败 [${e.row}:${e.col}]:`, $);
7960
+ const x = e.barcodeUrl || canvasPool.generateBarcode(u, e.barcodeOptions);
7961
+ x && (d = `<img src="${x}" alt="barcode" style="max-width:100%;max-height:100%;object-fit:contain">`, f = !0);
7962
+ } catch (x) {
7963
+ console.error(`条形码生成失败 [${e.row}:${e.col}]:`, x);
7962
7964
  }
7963
7965
  else if (!f && e.format === FormatType.QRCODE) {
7964
- const $ = e.qrcodeData;
7965
- $ && (d = `<img src="${$}" alt="qrcode" style="max-width:100%;max-height:100%;object-fit:contain">`, f = !0);
7966
+ const x = e.qrcodeData;
7967
+ x && (d = `<img src="${x}" alt="qrcode" style="max-width:100%;max-height:100%;object-fit:contain">`, f = !0);
7966
7968
  }
7967
7969
  if (f)
7968
7970
  c.innerHTML = d;
7969
7971
  else {
7970
- const $ = document.createElement("span");
7971
- $.style.cssText = "word-break:break-word;overflow-wrap:anywhere;", $.innerText = String(u), c.appendChild($);
7972
+ const x = document.createElement("span");
7973
+ x.style.cssText = "word-break:break-word;overflow-wrap:anywhere;", x.innerText = String(u), c.appendChild(x);
7972
7974
  }
7973
7975
  const p = e.style || {}, m = p.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, g = p.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, _ = p.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, E = p.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
7974
7976
  if (c.style.paddingTop = `${m}px`, c.style.paddingRight = `${g}px`, c.style.paddingBottom = `${_}px`, c.style.paddingLeft = `${E}px`, n.appendChild(c), e.style && (n.setAttribute("style", renderCellStyle(e.style)), e.style.border)) {
7975
- const $ = normalizeBorder(e.style.border);
7976
- $ && (n.style.borderTop = getBorderCss($.top, r), n.style.borderRight = getBorderCss($.right, r), n.style.borderBottom = getBorderCss($.bottom, r), n.style.borderLeft = getBorderCss($.left, r));
7977
+ const x = normalizeBorder(e.style.border);
7978
+ x && (n.style.borderTop = getBorderCss(x.top, r), n.style.borderRight = getBorderCss(x.right, r), n.style.borderBottom = getBorderCss(x.bottom, r), n.style.borderLeft = getBorderCss(x.left, r));
7977
7979
  }
7978
7980
  return n.style.position = "relative", n;
7979
7981
  }
@@ -8042,16 +8044,16 @@ function renderReportByDomForPrint(t, e, r, n, o) {
8042
8044
  }
8043
8045
  u += (g.size ?? 25) - 1, _.style.height = `${g.size ?? 25}px`, f = 0;
8044
8046
  for (let E = 0; E < e.length; E++) {
8045
- const x = e[E];
8046
- if (x.isHidden) continue;
8047
+ const $ = e[E];
8048
+ if ($.isHidden) continue;
8047
8049
  const y = r[m][E];
8048
8050
  if (g && y && (g.size ?? 25) > 0) {
8049
8051
  const v = renderCell(g, y, n);
8050
- if (x.isFixed === !0 && (v.classList.add("fixed-td"), v.style.left = `${f - 1}px`), f += (x.size ?? 80) - 1, v.setAttribute("data-cell-data", `${m}-${E}`), y.rowSpan !== 0 && y.colSpan !== 0) {
8052
+ if ($.isFixed === !0 && (v.classList.add("fixed-td"), v.style.left = `${f - 1}px`), f += ($.size ?? 80) - 1, v.setAttribute("data-cell-data", `${m}-${E}`), y.rowSpan !== 0 && y.colSpan !== 0) {
8051
8053
  if ([CellType.TEXT, CellType.FIELD, CellType.ICON, CellType.FUN, CellType.IMAGE, CellType.RICH].includes(y.type)) {
8052
8054
  y.style && v.setAttribute("style", renderCellPrintStyle(y.style, n)), y.style && y.style.border === !1 && v.classList.add("no-border");
8053
- const C = ((p = y.style) == null ? void 0 : p.allowContentOverflow) === !0, w = y.style || {}, $ = w.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, I = w.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, A = w.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, O = w.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
8054
- v.style.paddingTop = `${$}px`, v.style.paddingRight = `${I}px`, v.style.paddingBottom = `${A}px`, v.style.paddingLeft = `${O}px`, v.style.boxSizing = "border-box", v.style.position = "relative", y.rowSpan <= 1 && (C ? v.style.minHeight = `${g.size ?? 25}px` : v.style.height = `${g.size ?? 25}px`);
8055
+ const C = ((p = y.style) == null ? void 0 : p.allowContentOverflow) === !0, w = y.style || {}, x = w.paddingTop ?? TD_DEFAULT_PADDING_VERTICAL, I = w.paddingRight ?? TD_DEFAULT_PADDING_HORIZONTAL, A = w.paddingBottom ?? TD_DEFAULT_PADDING_VERTICAL, O = w.paddingLeft ?? TD_DEFAULT_PADDING_HORIZONTAL;
8056
+ v.style.paddingTop = `${x}px`, v.style.paddingRight = `${I}px`, v.style.paddingBottom = `${A}px`, v.style.paddingLeft = `${O}px`, v.style.boxSizing = "border-box", v.style.position = "relative", y.rowSpan <= 1 && (C ? v.style.minHeight = `${g.size ?? 25}px` : v.style.height = `${g.size ?? 25}px`);
8055
8057
  }
8056
8058
  _.appendChild(v);
8057
8059
  }
@@ -8071,27 +8073,27 @@ function renderReportByDom(t, e, r, n, o, i) {
8071
8073
  const f = document.createDocumentFragment(), d = [], p = [], m = /* @__PURE__ */ new Map();
8072
8074
  let g = 0;
8073
8075
  for (let E = 0; E < t.length; E++) {
8074
- const x = t[E];
8075
- if (x.isHidden)
8076
+ const $ = t[E];
8077
+ if ($.isHidden)
8076
8078
  continue;
8077
8079
  const y = document.createElement("tr");
8078
- y.dataset.ri = String(g), x.isFixed && (y.style.top = `${c - 1}px`, y.classList.add("fixed-row")), c += (x.size ?? 25) - 1, y.style.height = `${x.size ?? 25}px`, u = 0;
8080
+ y.dataset.ri = String(g), $.isFixed && (y.style.top = `${c - 1}px`, y.classList.add("fixed-row")), c += ($.size ?? 25) - 1, y.style.height = `${$.size ?? 25}px`, u = 0;
8079
8081
  for (let v = 0; v < e.length; v++) {
8080
8082
  const C = e[v];
8081
8083
  if (C.isHidden)
8082
8084
  continue;
8083
8085
  const w = r[E][v];
8084
- if (x && w && (x.size ?? 25) > 0) {
8085
- const $ = renderCell(x, w, i);
8086
+ if ($ && w && ($.size ?? 25) > 0) {
8087
+ const x = renderCell($, w, i);
8086
8088
  if (w.clickSortField) {
8087
- $.classList.add("click-sort-cell"), $.setAttribute("data-click-sort-field", w.clickSortField), $.setAttribute("data-click-sort-numeric", w.clickSortNumeric ? "1" : "0");
8089
+ x.classList.add("click-sort-cell"), x.setAttribute("data-click-sort-field", w.clickSortField), x.setAttribute("data-click-sort-numeric", w.clickSortNumeric ? "1" : "0");
8088
8090
  const I = document.createElement("span");
8089
- I.className = "click-sort-arrow", (_ = $.querySelector(":scope > div")) == null || _.appendChild(I);
8091
+ I.className = "click-sort-arrow", (_ = x.querySelector(":scope > div")) == null || _.appendChild(I);
8090
8092
  }
8091
- if (C.isFixed === !0 && ($.classList.add("fixed-td"), $.style.position = "sticky", $.style.left = `${u - 1}px`), u += (C.size ?? 80) - 1, $.setAttribute("data-cell-data", `${E}-${v}`), !(w.rowSpan === 0 || w.colSpan === 0)) {
8092
- if (w.style && w.style.border === !1 && $.classList.add("no-border"), y.appendChild($), w.rowSpan > 1) {
8093
+ if (C.isFixed === !0 && (x.classList.add("fixed-td"), x.style.position = "sticky", x.style.left = `${u - 1}px`), u += (C.size ?? 80) - 1, x.setAttribute("data-cell-data", `${E}-${v}`), !(w.rowSpan === 0 || w.colSpan === 0)) {
8094
+ if (w.style && w.style.border === !1 && x.classList.add("no-border"), y.appendChild(x), w.rowSpan > 1) {
8093
8095
  const I = d.length;
8094
- d.push($), p.push(w.rowSpan);
8096
+ d.push(x), p.push(w.rowSpan);
8095
8097
  for (let A = 1; A < w.rowSpan; A++) {
8096
8098
  const O = g + A;
8097
8099
  m.has(O) || m.set(O, []), m.get(O).push(I);
@@ -8104,7 +8106,7 @@ function renderReportByDom(t, e, r, n, o, i) {
8104
8106
  }
8105
8107
  if (d.length > 0) {
8106
8108
  let E = -1;
8107
- const x = () => {
8109
+ const $ = () => {
8108
8110
  var y;
8109
8111
  E >= 0 && ((y = m.get(E)) == null || y.forEach((v) => d[v].classList.remove("merge-hover"))), E = -1;
8110
8112
  };
@@ -8113,8 +8115,8 @@ function renderReportByDom(t, e, r, n, o, i) {
8113
8115
  const v = y.target.closest("tr");
8114
8116
  if (!v) return;
8115
8117
  const C = Number(v.dataset.ri);
8116
- C !== E && (x(), E = C, (w = m.get(C)) == null || w.forEach(($) => d[$].classList.add("merge-hover")));
8117
- }), s.addEventListener("mouseleave", x);
8118
+ C !== E && ($(), E = C, (w = m.get(C)) == null || w.forEach((x) => d[x].classList.add("merge-hover")));
8119
+ }), s.addEventListener("mouseleave", $);
8118
8120
  }
8119
8121
  s.appendChild(f);
8120
8122
  }
@@ -8404,7 +8406,7 @@ function evaluateExpression(t, e) {
8404
8406
  return t.name;
8405
8407
  case "BinaryExpression":
8406
8408
  let o = evaluateExpression(t.left, e || 0), i = evaluateExpression(t.right, e || 0), a = Number(o), s = Number(i);
8407
- switch (isNaN(a) && (a = 0), isNaN(s) && (s = 0), t.operator) {
8409
+ switch (Number.isFinite(a) || (a = 0), Number.isFinite(s) || (s = 0), t.operator) {
8408
8410
  case "+":
8409
8411
  return new Decimal(a).plus(s).toNumber();
8410
8412
  case "-":
@@ -8495,10 +8497,10 @@ function getRangeValues(t, e, r) {
8495
8497
  );
8496
8498
  } else if (r.indexOf("c-") > -1) {
8497
8499
  const g = parseInt(r.split("-")[1]);
8498
- f = getCellValue(m).filter((x) => x.colGroupIndex === g).map(
8499
- (x) => {
8500
+ f = getCellValue(m).filter(($) => $.colGroupIndex === g).map(
8501
+ ($) => {
8500
8502
  var y;
8501
- return [null, void 0, ""].includes(x.rawData) ? (y = x.formatType) == null ? void 0 : y.defaultCellContent : x.rawData;
8503
+ return [null, void 0, ""].includes($.rawData) ? (y = $.formatType) == null ? void 0 : y.defaultCellContent : $.rawData;
8502
8504
  }
8503
8505
  );
8504
8506
  }
@@ -8519,11 +8521,11 @@ const funHandlers = {
8519
8521
  SUM(t) {
8520
8522
  return t.flat().reduce((e, r) => {
8521
8523
  const n = parseFloat(r);
8522
- return isNaN(n) ? e : e.plus(n);
8524
+ return Number.isFinite(n) ? e.plus(n) : e;
8523
8525
  }, new Decimal(0)).toNumber();
8524
8526
  },
8525
8527
  AVG(t) {
8526
- const r = t.flat().map((n) => parseFloat(n)).filter((n) => !isNaN(n));
8528
+ const r = t.flat().map((n) => parseFloat(n)).filter((n) => Number.isFinite(n));
8527
8529
  return r.length > 0 ? r.reduce((n, o) => n.plus(o), new Decimal(0)).div(r.length).toNumber() : 0;
8528
8530
  },
8529
8531
  MAX(t) {
@@ -8578,8 +8580,8 @@ function evaluateFunction(t, e, r) {
8578
8580
  for (let g = 0; g < a; g++) {
8579
8581
  let _ = new Decimal(1);
8580
8582
  for (const E of i) {
8581
- const x = parseFloat(E[g]);
8582
- _ = _.times(isNaN(x) ? 0 : x);
8583
+ const $ = parseFloat(E[g]);
8584
+ _ = _.times(Number.isFinite($) ? $ : 0);
8583
8585
  }
8584
8586
  s = s.plus(_);
8585
8587
  }
@@ -8699,11 +8701,11 @@ function loopGroupCols(t, e, r, n) {
8699
8701
  s.forEach((m, g) => {
8700
8702
  const _ = getSeparatorKey("key", m);
8701
8703
  l[_] || (l[_] = /* @__PURE__ */ new Set());
8702
- let x = a[m].data.replace("col:", "").toUpperCase();
8704
+ let $ = a[m].data.replace("col:", "").toUpperCase();
8703
8705
  if (g === 0)
8704
8706
  i.forEach((y) => {
8705
- if (x) {
8706
- let v = y[x];
8707
+ if ($) {
8708
+ let v = y[$];
8707
8709
  v || (v = "-");
8708
8710
  const C = getSeparatorKey("child", m, v), w = getSeparatorKey("data", v);
8709
8711
  l[C] ? l[C].push(y) : l[C] = [y], l[_].add(v), l[v] = [v], l[w] = [y];
@@ -8713,17 +8715,17 @@ function loopGroupCols(t, e, r, n) {
8713
8715
  let y = s[g - 1];
8714
8716
  const v = getSeparatorKey("key", y);
8715
8717
  Array.from(l[v]).forEach((w) => {
8716
- const $ = getSeparatorKey("child", y, w);
8717
- let A = (l[$] || []).map((O) => {
8718
- if (x) {
8719
- let N = O[x];
8718
+ const x = getSeparatorKey("child", y, w);
8719
+ let A = (l[x] || []).map((O) => {
8720
+ if ($) {
8721
+ let N = O[$];
8720
8722
  N || (N = "-");
8721
8723
  let U = !1;
8722
8724
  const L = getSeparatorKey("child", m, w, N), M = getSeparatorKey(w, N), T = getSeparatorKey("data", M);
8723
8725
  return l[L] ? l[L].push(O) : l[L] = [O], l[T] ? l[T].push(O) : l[T] = [O], l[_].has(M) || (U = !0), l[_].add(M), l[M] = l[w].concat([N]), U ? N : null;
8724
8726
  }
8725
8727
  }).filter((O) => !!O);
8726
- l[$] = A;
8728
+ l[x] = A;
8727
8729
  });
8728
8730
  }
8729
8731
  });
@@ -8734,8 +8736,8 @@ function loopGroupCols(t, e, r, n) {
8734
8736
  if (c !== void 0) {
8735
8737
  const m = a[c], g = { order: m.groupSortOrder, numeric: m.groupSortNumeric };
8736
8738
  s.forEach((_) => {
8737
- const E = getSeparatorKey("key", _), x = Array.from(l[E]);
8738
- x.length > 1 && x.sort(createGroupSortComparator(g)), l[E] = new Set(x);
8739
+ const E = getSeparatorKey("key", _), $ = Array.from(l[E]);
8740
+ $.length > 1 && $.sort(createGroupSortComparator(g)), l[E] = new Set($);
8739
8741
  });
8740
8742
  }
8741
8743
  let u = 1, f = Math.max(...s), d = Math.min(...s);
@@ -8744,34 +8746,34 @@ function loopGroupCols(t, e, r, n) {
8744
8746
  const m = getSeparatorKey("key", f);
8745
8747
  p ? u = l[m].size : u = Array.from(l[m]).reduce((g, _) => {
8746
8748
  const E = getSeparatorKey("child", f, _);
8747
- let x = l[E];
8748
- return g + x.length;
8749
+ let $ = l[E];
8750
+ return g + $.length;
8749
8751
  }, 0);
8750
8752
  } else
8751
8753
  u = i.length;
8752
8754
  for (let m = 0; m < a.length; m++) {
8753
- const g = a[m], _ = t.findIndex((x) => x.index === o.index);
8755
+ const g = a[m], _ = t.findIndex(($) => $.index === o.index);
8754
8756
  if (m === 0) {
8755
- const x = {
8757
+ const $ = {
8756
8758
  ...o,
8757
8759
  loop: !1
8758
- }, y = Array.from({ length: u }, () => cloneDeep(x));
8760
+ }, y = Array.from({ length: u }, () => cloneDeep($));
8759
8761
  t.splice(_, 1, ...y);
8760
8762
  }
8761
8763
  let E = r[g.row];
8762
8764
  if (E && Array.isArray(E)) {
8763
- let x = [];
8765
+ let $ = [];
8764
8766
  if (s.includes(m)) {
8765
8767
  const y = getSeparatorKey("key", g.row);
8766
8768
  Array.from(l[y]).forEach((C, w) => {
8767
- const $ = p && m === f ? 1 : getGroupMinChildrenLength(l, C, f, p, s), I = l[C], A = I[I.length - 1], O = getSeparatorKey("data", C), N = l[O];
8769
+ const x = p && m === f ? 1 : getGroupMinChildrenLength(l, C, f, p, s), I = l[C], A = I[I.length - 1], O = getSeparatorKey("data", C), N = l[O];
8768
8770
  let U = {
8769
8771
  ...g,
8770
8772
  text: A,
8771
- colSpan: $,
8773
+ colSpan: x,
8772
8774
  colData: N
8773
8775
  };
8774
- if (x.push(U), $ > 1) {
8776
+ if ($.push(U), x > 1) {
8775
8777
  let L = {
8776
8778
  ...g,
8777
8779
  text: A,
@@ -8779,10 +8781,10 @@ function loopGroupCols(t, e, r, n) {
8779
8781
  colSpan: 0,
8780
8782
  rowSpan: 0
8781
8783
  };
8782
- for (let M = 0; M < $ - 1; M++)
8783
- x.push(L);
8784
+ for (let M = 0; M < x - 1; M++)
8785
+ $.push(L);
8784
8786
  }
8785
- }), E.splice(g.col, 1, ...x);
8787
+ }), E.splice(g.col, 1, ...$);
8786
8788
  } else {
8787
8789
  if (m > d && m < f) {
8788
8790
  let y = findMaxLessThan(s, m);
@@ -8804,7 +8806,7 @@ function loopGroupCols(t, e, r, n) {
8804
8806
  const y = getSeparatorKey("key", f);
8805
8807
  let v = l[y] ? Array.from(l[y]) : [], C = g.data.replace("col:", "").toUpperCase();
8806
8808
  if (g.isRowColCombine) {
8807
- let w = s.map((I) => a[I].data.replace("col:", "").toUpperCase()), $ = [];
8809
+ let w = s.map((I) => a[I].data.replace("col:", "").toUpperCase()), x = [];
8808
8810
  v.forEach((I, A) => {
8809
8811
  let O = {
8810
8812
  ...g,
@@ -8812,10 +8814,10 @@ function loopGroupCols(t, e, r, n) {
8812
8814
  combineValues: l[I],
8813
8815
  colGroupIndex: A
8814
8816
  };
8815
- $.push(O);
8816
- }), E.splice(g.col, 1, ...$);
8817
+ x.push(O);
8818
+ }), E.splice(g.col, 1, ...x);
8817
8819
  } else if (v.length)
8818
- v.forEach((w, $) => {
8820
+ v.forEach((w, x) => {
8819
8821
  let I = [];
8820
8822
  const A = getSeparatorKey("data", w);
8821
8823
  l[A].forEach((N) => {
@@ -8827,11 +8829,11 @@ function loopGroupCols(t, e, r, n) {
8827
8829
  });
8828
8830
  else {
8829
8831
  let w = [];
8830
- i.forEach(($) => {
8832
+ i.forEach((x) => {
8831
8833
  let I = {
8832
8834
  ...g
8833
8835
  };
8834
- delete I.combineKeys, delete I.combineValues, delete I.isRowColCombine, $[C] !== void 0 ? (I.rawData = $[C], I.colData = $) : I.rawData = "", w.push(I);
8836
+ delete I.combineKeys, delete I.combineValues, delete I.isRowColCombine, x[C] !== void 0 ? (I.rawData = x[C], I.colData = x) : I.rawData = "", w.push(I);
8835
8837
  }), E.splice(g.col, 1, ...w);
8836
8838
  }
8837
8839
  } else if (g.type === CellType.FUN && p && g.colSpan !== 0) {
@@ -8849,7 +8851,7 @@ function loopGroupCols(t, e, r, n) {
8849
8851
  colData: i[0]
8850
8852
  };
8851
8853
  if (g.colSpan === 0 && g.mergeTarget && g.mergeTarget.length === 2 && g.row === g.mergeTarget[0]) {
8852
- let [w, $] = g.mergeTarget, I = r.reduce((A, O) => A.concat(O), []).filter((A) => A.row === w && A.col === $)[0];
8854
+ let [w, x] = g.mergeTarget, I = r.reduce((A, O) => A.concat(O), []).filter((A) => A.row === w && A.col === x)[0];
8853
8855
  I && (I.colSpan += u - 1);
8854
8856
  } else (!Array.isArray(g.mergeTarget) || g.mergeTarget.length !== 2) && (y.colSpan = u);
8855
8857
  const v = {
@@ -8971,11 +8973,11 @@ function getGroupData(t, e, r) {
8971
8973
  const m = getSeparatorKey("child", u, p);
8972
8974
  let _ = (n[m] || []).map((E) => {
8973
8975
  if (c) {
8974
- let x = E[c];
8975
- x || (x = "[" + c + "]");
8976
+ let $ = E[c];
8977
+ $ || ($ = "[" + c + "]");
8976
8978
  let y = !1;
8977
- const v = getSeparatorKey("child", i, p, x), C = getSeparatorKey(p, x), w = getSeparatorKey("data", C);
8978
- return n[v] ? n[v].push(E) : n[v] = [E], n[w] ? n[w].push(E) : n[w] = [E], n[s].has(C) || (y = !0), n[s].add(C), n[C] = n[p].concat([x]), y ? x : null;
8979
+ const v = getSeparatorKey("child", i, p, $), C = getSeparatorKey(p, $), w = getSeparatorKey("data", C);
8980
+ return n[v] ? n[v].push(E) : n[v] = [E], n[w] ? n[w].push(E) : n[w] = [E], n[s].has(C) || (y = !0), n[s].add(C), n[C] = n[p].concat([$]), y ? $ : null;
8979
8981
  }
8980
8982
  }).filter((E) => !!E);
8981
8983
  n[m] = _;
@@ -9027,15 +9029,15 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9027
9029
  let d = -1, p = null;
9028
9030
  const m = [], g = new Array(o).fill(!1);
9029
9031
  return t.forEach((_, E) => {
9030
- let x = u[E];
9032
+ let $ = u[E];
9031
9033
  if (e.includes(_.col)) {
9032
9034
  const y = getSeparatorKey("key", _.col);
9033
9035
  let v = Array.from(n[y]), C = d;
9034
9036
  const w = e.indexOf(_.col);
9035
- v.forEach(($, I) => {
9037
+ v.forEach((x, I) => {
9036
9038
  let A;
9037
- E === s && (i || a) ? A = 1 : A = getGroupMinChildrenLength(n, $, s, a, i);
9038
- const O = n[$], N = O[O.length - 1], U = getSeparatorKey("data", $);
9039
+ E === s && (i || a) ? A = 1 : A = getGroupMinChildrenLength(n, x, s, a, i);
9040
+ const O = n[x], N = O[O.length - 1], U = getSeparatorKey("data", x);
9039
9041
  n[U];
9040
9042
  let L = {
9041
9043
  ..._,
@@ -9048,7 +9050,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9048
9050
  groupChildIndex: 0,
9049
9051
  computedType: ComputedType.loopRow
9050
9052
  };
9051
- x.push(L);
9053
+ $.push(L);
9052
9054
  let M = {
9053
9055
  ..._,
9054
9056
  text: "",
@@ -9062,7 +9064,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9062
9064
  };
9063
9065
  for (let T = 0; T < A - 1; T++) {
9064
9066
  let b = cloneDeep(M);
9065
- b.index = C + T + 1, b.groupChildIndex = T + 1, x.push(b);
9067
+ b.index = C + T + 1, b.groupChildIndex = T + 1, $.push(b);
9066
9068
  }
9067
9069
  if (g[E] = !0, C += A, L.loopGroupRowIndex !== void 0 && L.loopGroupRowIndex !== "" && !isNaN(L.loopGroupRowIndex)) {
9068
9070
  let T = cloneDeep(l[L.loopGroupRowIndex]), b = cloneDeep(c[L.loopGroupRowIndex]).map((S) => (S.type === CellType.FUN && S.fun && (S.groupIndices = I, S.groupLevel = w, S.computedType = ComputedType.loopGroup), S)), D = 0;
@@ -9085,7 +9087,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9085
9087
  if (_.isRowColCombine) {
9086
9088
  const v = getSeparatorKey("key", s);
9087
9089
  let C = n[v] ? Array.from(n[v]) : [];
9088
- C.length ? C.forEach((w, $) => {
9090
+ C.length ? C.forEach((w, x) => {
9089
9091
  const I = getSeparatorKey("child", s, w);
9090
9092
  let A = n[I], O = _.combineKeys ? _.combineKeys.map((L, M) => {
9091
9093
  const T = _.combineValues ? _.combineValues[M] : void 0;
@@ -9097,15 +9099,15 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9097
9099
  const N = A.filter((L) => O.every((M) => L[M.key] === M.val));
9098
9100
  let U = {
9099
9101
  ..._,
9100
- index: $
9102
+ index: x
9101
9103
  };
9102
9104
  if (delete U.combineKeys, delete U.combineValues, delete U.isRowColCombine, N && N.length) {
9103
9105
  const L = N.map((M) => y ? M[y] : void 0);
9104
9106
  U.rawData = _.mergedValueAggregation ? aggregateMergedValues(L, _.mergedValueAggregation) : N[0][y], U.rowData = N[0];
9105
9107
  } else
9106
9108
  U.rawData = "", U.rowData = {};
9107
- x.push(U);
9108
- }) : r.forEach((w, $) => {
9109
+ $.push(U);
9110
+ }) : r.forEach((w, x) => {
9109
9111
  let A = (_.combineKeys ? _.combineKeys.map((N, U) => {
9110
9112
  const L = _.combineValues ? _.combineValues[U] : void 0;
9111
9113
  return {
@@ -9114,9 +9116,9 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9114
9116
  };
9115
9117
  }) : []).every((N) => w[N.key] === N.val), O = {
9116
9118
  ..._,
9117
- index: $
9119
+ index: x
9118
9120
  };
9119
- delete O.combineKeys, delete O.combineValues, delete O.isRowColCombine, A ? (O.rawData = y ? w[y] : "", O.rowData = w) : (O.rawData = "", O.rowData = w), O.type === CellType.FUN && O.fun && (O.computedType = ComputedType.loopRow), x.push(O);
9121
+ delete O.combineKeys, delete O.combineValues, delete O.isRowColCombine, A ? (O.rawData = y ? w[y] : "", O.rowData = w) : (O.rawData = "", O.rowData = w), O.type === CellType.FUN && O.fun && (O.computedType = ComputedType.loopRow), $.push(O);
9120
9122
  });
9121
9123
  } else if (e.length === 0)
9122
9124
  r.forEach((v, C) => {
@@ -9124,29 +9126,29 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9124
9126
  index: C,
9125
9127
  ..._
9126
9128
  };
9127
- delete w.combineKeys, delete w.combineValues, delete w.isRowColCombine, y && v[y] !== void 0 ? w.rawData = v[y] : w.rawData = "", w.rowData = v, w.computedType = ComputedType.loopRow, x.push(w);
9129
+ delete w.combineKeys, delete w.combineValues, delete w.isRowColCombine, y && v[y] !== void 0 ? w.rawData = v[y] : w.rawData = "", w.rowData = v, w.computedType = ComputedType.loopRow, $.push(w);
9128
9130
  });
9129
9131
  else {
9130
9132
  const v = getSeparatorKey("key", s);
9131
9133
  let C = n[v] ? Array.from(n[v]) : [];
9132
9134
  if (C.length === 0) {
9133
- r.forEach(($, I) => {
9135
+ r.forEach((x, I) => {
9134
9136
  let A = {
9135
9137
  index: I,
9136
9138
  ..._
9137
9139
  };
9138
- delete A.combineKeys, delete A.combineValues, delete A.isRowColCombine, y && $[y] !== void 0 ? A.rawData = $[y] : A.rawData = "", A.rowData = $, A.computedType = ComputedType.loopRow, x.push(A);
9140
+ delete A.combineKeys, delete A.combineValues, delete A.isRowColCombine, y && x[y] !== void 0 ? A.rawData = x[y] : A.rawData = "", A.rowData = x, A.computedType = ComputedType.loopRow, $.push(A);
9139
9141
  });
9140
9142
  return;
9141
9143
  }
9142
9144
  const w = [];
9143
- if (C.forEach(($, I) => {
9145
+ if (C.forEach((x, I) => {
9144
9146
  if (a) {
9145
- const A = getSeparatorKey("child", s, $);
9147
+ const A = getSeparatorKey("child", s, x);
9146
9148
  let O = n[A] || [];
9147
9149
  w.push(O);
9148
9150
  } else {
9149
- const A = getSeparatorKey("child", s, $);
9151
+ const A = getSeparatorKey("child", s, x);
9150
9152
  let O = n[A] || [];
9151
9153
  const N = i ? O.slice(0, 1) : O;
9152
9154
  O.length > 0 ? N.forEach((U) => {
@@ -9156,23 +9158,23 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9156
9158
  // 交叉表:函数格按当前行组聚合裂变列实例(供 jsep 按 groupIndices 过滤取值)
9157
9159
  isCrossAggregate: i
9158
9160
  };
9159
- delete L.combineKeys, delete L.combineValues, delete L.isRowColCombine, y && U && U[y] !== void 0 ? L.rawData = U[y] : L.rawData = "", L.rowData = U, L.computedType = ComputedType.loopRow, x.push(L);
9160
- }) : x.push({
9161
+ delete L.combineKeys, delete L.combineValues, delete L.isRowColCombine, y && U && U[y] !== void 0 ? L.rawData = U[y] : L.rawData = "", L.rowData = U, L.computedType = ComputedType.loopRow, $.push(L);
9162
+ }) : $.push({
9161
9163
  index: 0,
9162
9164
  ..._,
9163
9165
  isCrossAggregate: i
9164
9166
  });
9165
9167
  }
9166
9168
  }), a) {
9167
- const $ = Math.max(...w.map((A) => A.length));
9169
+ const x = Math.max(...w.map((A) => A.length));
9168
9170
  p || (p = {
9169
- count: $,
9171
+ count: x,
9170
9172
  row: _.row,
9171
9173
  index: E
9172
9174
  });
9173
9175
  const I = {
9174
9176
  colIndex: E,
9175
- maxCount: $,
9177
+ maxCount: x,
9176
9178
  groupColumnLoopItems: w,
9177
9179
  dataKey: _.data ? _.data.replace("row:", "").toUpperCase() : void 0,
9178
9180
  cell: _
@@ -9187,7 +9189,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9187
9189
  index: 0
9188
9190
  };
9189
9191
  if (_.rowSpan === 0 && _.mergeTarget && _.mergeTarget.length === 2) {
9190
- let [$, I] = _.mergeTarget, A = c.reduce((O, N) => O.concat(N), []).filter((O) => O.row === $ && O.col === I)[0];
9192
+ let [x, I] = _.mergeTarget, A = c.reduce((O, N) => O.concat(N), []).filter((O) => O.row === x && O.col === I)[0];
9191
9193
  A && (A.rowSpan += o - 1);
9192
9194
  } else
9193
9195
  v.rowSpan += o - 1;
@@ -9199,13 +9201,13 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9199
9201
  };
9200
9202
  delete v.isRowColCombine;
9201
9203
  let w = Array.from({ length: o - 1 }, () => cloneDeep(C));
9202
- x.push(v, ...w);
9204
+ $.push(v, ...w);
9203
9205
  } else if ((i || a) && e.length > 0) {
9204
9206
  const v = getSeparatorKey("key", s);
9205
- (n[v] ? Array.from(n[v]) : []).forEach((w, $) => {
9207
+ (n[v] ? Array.from(n[v]) : []).forEach((w, x) => {
9206
9208
  const I = getSeparatorKey("data", w), A = n[I];
9207
- x.push({
9208
- index: $,
9209
+ $.push({
9210
+ index: x,
9209
9211
  ..._,
9210
9212
  computedType: ComputedType.loopRow,
9211
9213
  rowSpan: 1,
@@ -9215,7 +9217,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9215
9217
  });
9216
9218
  } else if (e.length > 0)
9217
9219
  for (let v = 0; v < o; v++)
9218
- x.push({
9220
+ $.push({
9219
9221
  index: v,
9220
9222
  ..._,
9221
9223
  computedType: ComputedType.loopRow,
@@ -9225,7 +9227,7 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9225
9227
  });
9226
9228
  else
9227
9229
  r.forEach((v, C) => {
9228
- x.push({
9230
+ $.push({
9229
9231
  index: C,
9230
9232
  ..._,
9231
9233
  computedType: ComputedType.loopRow,
@@ -9234,14 +9236,14 @@ function generateRowStructure(t, e, r, n, o, i, a, s, l, c) {
9234
9236
  rowData: v
9235
9237
  });
9236
9238
  });
9237
- }), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: E, cell: x, groupColumnLoopItems: y, dataKey: v }) => {
9239
+ }), a && m.length > 0 && m.forEach(({ colIndex: _, maxCount: E, cell: $, groupColumnLoopItems: y, dataKey: v }) => {
9238
9240
  for (let C = 0; C < E; C++) {
9239
9241
  const w = [];
9240
- y.forEach(($, I) => {
9241
- const A = $[C];
9242
+ y.forEach((x, I) => {
9243
+ const A = x[C];
9242
9244
  let O = {
9243
9245
  index: I,
9244
- ...x
9246
+ ...$
9245
9247
  };
9246
9248
  delete O.combineKeys, delete O.combineValues, delete O.isRowColCombine, v && A && A[v] !== void 0 ? (O.rawData = A[v], O.rowData = A) : (O.rawData = "", O.rowData = A || {}), O.computedType = ComputedType.loopRow, w.push(O);
9247
9249
  }), C === 0 ? u[_] = w : u.splice(_ + C, 0, w);
@@ -9257,20 +9259,20 @@ function loopGroupRows(t, e, r, n, o) {
9257
9259
  let s = e[a], l = o[s.data];
9258
9260
  if (!l || !l.length)
9259
9261
  continue;
9260
- let c = t.findIndex(($) => $.index === s.index), u = r[c], f = findGroupIndexs(u), d = getGroupData(f, u, l);
9262
+ let c = t.findIndex((x) => x.index === s.index), u = r[c], f = findGroupIndexs(u), d = getGroupData(f, u, l);
9261
9263
  const { groupLen: p, hasRowColCombine: m, hasGroupColumnLoop: g, maxGroupIndex: _ } = analyzeGroupStructure(u, f, l, d);
9262
9264
  if (m && g)
9263
9265
  throw new Error("不能同时设置交叉和分组列循环");
9264
9266
  const E = {
9265
9267
  ...s,
9266
9268
  loop: !1
9267
- }, x = [], { rowBaseCols: y, loopGroupRows: v, groupColumnLoopData: C } = generateRowStructure(u, f, l, d, p, m, g, _, t, r);
9269
+ }, $ = [], { rowBaseCols: y, loopGroupRows: v, groupColumnLoopData: C } = generateRowStructure(u, f, l, d, p, m, g, _, t, r);
9268
9270
  let w = transpose(y);
9269
9271
  if (w.forEach(() => {
9270
- x.push(cloneDeep(E));
9271
- }), v.forEach(({ row: $, cells: I, removeCount: A }, O) => {
9272
+ $.push(cloneDeep(E));
9273
+ }), v.forEach(({ row: x, cells: I, removeCount: A }, O) => {
9272
9274
  let [N, U, L] = O.split(":").map((D) => parseInt(D));
9273
- $.isLoopGroupComputed = !1;
9275
+ x.isLoopGroupComputed = !1;
9274
9276
  const M = L + A;
9275
9277
  let T = w[M];
9276
9278
  I = I.map((D, S) => {
@@ -9291,35 +9293,35 @@ function loopGroupRows(t, e, r, n, o) {
9291
9293
  return D.type === CellType.FUN && D.fun && (D.computedType = ComputedType.loopGroup), D.isGroup = R ? !!R.isGroup : !1, D.groupIndices = R ? R.groupIndices : !1, D.linkedMergeCell = R ? !!R.linkedMergeCell : !1, D.linkedColIndex = R ? R.linkedColIndex : { rowSpan: 1, colSpan: 1 }, D.isLoopGroupComputedCell = !0, D;
9292
9294
  });
9293
9295
  const b = M + 1;
9294
- x.splice(b, 0, $), w.splice(b, 0, I);
9295
- }), w = mergeSameCells(w), w.forEach(($, I) => {
9296
+ $.splice(b, 0, x), w.splice(b, 0, I);
9297
+ }), w = mergeSameCells(w), w.forEach((x, I) => {
9296
9298
  let A = [];
9297
- $.forEach((O) => {
9299
+ x.forEach((O) => {
9298
9300
  O && O.groupIndices !== void 0 && !isNaN(O.groupIndices) && A.push(O.groupIndices);
9299
- }), A.length > 0 && $.forEach((O) => {
9301
+ }), A.length > 0 && x.forEach((O) => {
9300
9302
  O && (O.groupIndices = A);
9301
9303
  });
9302
- }), t.splice(c, 1, ...x), r.splice(c, 1, ...w), C) {
9303
- const { index: $, count: I } = C, A = n[$], O = [];
9304
+ }), t.splice(c, 1, ...$), r.splice(c, 1, ...w), C) {
9305
+ const { index: x, count: I } = C, A = n[x], O = [];
9304
9306
  for (let U = 0; U < I; U++)
9305
9307
  O.push(cloneDeep(A));
9306
- n.splice($, 1, ...O);
9308
+ n.splice(x, 1, ...O);
9307
9309
  for (let U = 0; U < c; U++) {
9308
9310
  const L = r[U], M = [];
9309
9311
  for (let T = 0; T < I; T++) {
9310
- const b = cloneDeep(L[$]);
9311
- T === 0 ? b.colSpan = I : (b.colSpan = 0, b.mergeTarget = [b.row, $]), M.push(b);
9312
+ const b = cloneDeep(L[x]);
9313
+ T === 0 ? b.colSpan = I : (b.colSpan = 0, b.mergeTarget = [b.row, x]), M.push(b);
9312
9314
  }
9313
- L.splice($, L.length - $, ...M);
9315
+ L.splice(x, L.length - x, ...M);
9314
9316
  }
9315
9317
  const N = c + w.length;
9316
9318
  for (let U = N; U < r.length; U++) {
9317
9319
  const L = r[U], M = [];
9318
9320
  for (let T = 0; T < I; T++) {
9319
- const b = cloneDeep(L[$]);
9320
- T === 0 ? b.colSpan = I : (b.colSpan = 0, b.mergeTarget = [b.row, $]), M.push(b);
9321
+ const b = cloneDeep(L[x]);
9322
+ T === 0 ? b.colSpan = I : (b.colSpan = 0, b.mergeTarget = [b.row, x]), M.push(b);
9321
9323
  }
9322
- L.splice($, L.length - $, ...M);
9324
+ L.splice(x, L.length - x, ...M);
9323
9325
  }
9324
9326
  }
9325
9327
  }
@@ -9470,7 +9472,11 @@ function formatText(t, e) {
9470
9472
  }
9471
9473
  function formatNumber(t, e) {
9472
9474
  let r = Number(t);
9473
- return e.decimal && (r = parseFloat(new Decimal(r).toFixed(parseInt(e.decimal)))), r;
9475
+ if (e.decimal && Number.isFinite(r)) {
9476
+ const n = Math.max(0, Math.floor(Number(e.decimal) || 0));
9477
+ r = parseFloat(new Decimal(r).toFixed(n));
9478
+ }
9479
+ return r;
9474
9480
  }
9475
9481
  function formatDateTime(t, e) {
9476
9482
  try {
@@ -9661,10 +9667,10 @@ function buildPageDom(t, e, r, n) {
9661
9667
  const { rowConfig: o, colConfig: i, config: a, fixedRows: s, watermark: l, header: c, footer: u, pageNumber: f, totalPages: d, title: p } = t, m = document.createElement("div");
9662
9668
  m.className = "print-page-wrapper", l != null && l.enabled && m.appendChild(renderWatermarkLayer(l, r, n)), c != null && c.enabled && m.appendChild(renderPrintArea(c, { page: f, total: d, title: p }, "center"));
9663
9669
  const g = [], _ = [];
9664
- for (const x of s)
9665
- g.push({ ...x.row }), _.push(cloneDeep(a[x.index]));
9666
- for (const x of e)
9667
- o[x].isFixed || (g.push({ ...o[x] }), _.push(cloneDeep(a[x])));
9670
+ for (const $ of s)
9671
+ g.push({ ...$.row }), _.push(cloneDeep(a[$.index]));
9672
+ for (const $ of e)
9673
+ o[$].isFixed || (g.push({ ...o[$] }), _.push(cloneDeep(a[$])));
9668
9674
  const E = renderReportByDomForPrint(g, i, _, t.themeColor, t.theme);
9669
9675
  return m.appendChild(E), u != null && u.enabled && m.appendChild(renderPrintArea(u, { page: f, total: d, title: p }, "center")), m;
9670
9676
  }
@@ -9856,8 +9862,8 @@ async function paginate(t, e, r, n) {
9856
9862
  }
9857
9863
  const _ = createReportSplitState(g.reportConfig, g.themeColor, { ...s, theme: g.theme });
9858
9864
  await m();
9859
- const E = o - u, x = splitNextReportPage(_, E, a, o);
9860
- x ? (c.push({ type: "report", dom: x.dom }), u += x.height, _.currentRowIdx < _.visibleRows.length && d.push(_)) : (c.length > 0 && await p(), d.push(_));
9865
+ const E = o - u, $ = splitNextReportPage(_, E, a, o);
9866
+ $ ? (c.push({ type: "report", dom: $.dom }), u += $.height, _.currentRowIdx < _.visibleRows.length && d.push(_)) : (c.length > 0 && await p(), d.push(_));
9861
9867
  }
9862
9868
  await m(), await p();
9863
9869
  } else {
@@ -9869,11 +9875,11 @@ async function paginate(t, e, r, n) {
9869
9875
  continue;
9870
9876
  }
9871
9877
  if (E.kind === "image") {
9872
- let w = E.width, $ = E.height;
9873
- E.stretch && w > 0 && ($ = Math.round($ * (a / w)), w = a), _.push({ type: "image", dom: createImageDom(E.src, w, $) });
9878
+ let w = E.width, x = E.height;
9879
+ E.stretch && w > 0 && (x = Math.round(x * (a / w)), w = a), _.push({ type: "image", dom: createImageDom(E.src, w, x) });
9874
9880
  continue;
9875
9881
  }
9876
- const { rowConfig: x, colConfig: y, config: v } = E.reportConfig, C = renderReportByDomForPrint(x, y, v, E.themeColor, E.theme);
9882
+ const { rowConfig: $, colConfig: y, config: v } = E.reportConfig, C = renderReportByDomForPrint($, y, v, E.themeColor, E.theme);
9877
9883
  _.push({ type: "report", dom: C });
9878
9884
  }
9879
9885
  l.push({ items: _ });
@@ -10021,7 +10027,7 @@ function parseShiftConfig(t) {
10021
10027
  }), r;
10022
10028
  }
10023
10029
  function getDateRanges() {
10024
- const t = "YYYY-MM-DD HH:mm:ss", e = dayjs(), r = e.startOf("day").format(t), n = e.endOf("day").format(t), o = e.startOf("week").format(t), i = e.endOf("week").format(t), a = e.startOf("month").format(t), s = e.endOf("month").format(t), l = e.subtract(1, "month").startOf("month").format(t), c = e.subtract(1, "month").endOf("month").format(t), u = e.startOf("quarter").format(t), f = e.endOf("quarter").format(t), d = e.subtract(1, "quarter").startOf("quarter").format(t), p = e.subtract(1, "quarter").endOf("quarter").format(t), m = e.startOf("year").format(t), g = e.endOf("year").format(t), _ = e.subtract(1, "year").startOf("year").format(t), E = e.subtract(1, "year").endOf("year").format(t), x = e.format(t), y = e.subtract(2, "day").format(t), v = e.subtract(3, "day").format(t), C = e.subtract(7, "day").format(t), w = e.subtract(15, "day").format(t), $ = e.subtract(30, "day").format(t), I = e.subtract(2, "week").startOf("week").format(t), A = e.subtract(2, "month").format(t), O = e.subtract(3, "month").format(t), N = e.subtract(6, "month").format(t), U = e.subtract(1, "year").startOf("year").format(t), L = e.subtract(2, "year").startOf("year").format(t), M = e.subtract(3, "year").format(t), T = e.subtract(5, "year").format(t);
10030
+ const t = "YYYY-MM-DD HH:mm:ss", e = dayjs(), r = e.startOf("day").format(t), n = e.endOf("day").format(t), o = e.startOf("week").format(t), i = e.endOf("week").format(t), a = e.startOf("month").format(t), s = e.endOf("month").format(t), l = e.subtract(1, "month").startOf("month").format(t), c = e.subtract(1, "month").endOf("month").format(t), u = e.startOf("quarter").format(t), f = e.endOf("quarter").format(t), d = e.subtract(1, "quarter").startOf("quarter").format(t), p = e.subtract(1, "quarter").endOf("quarter").format(t), m = e.startOf("year").format(t), g = e.endOf("year").format(t), _ = e.subtract(1, "year").startOf("year").format(t), E = e.subtract(1, "year").endOf("year").format(t), $ = e.format(t), y = e.subtract(2, "day").format(t), v = e.subtract(3, "day").format(t), C = e.subtract(7, "day").format(t), w = e.subtract(15, "day").format(t), x = e.subtract(30, "day").format(t), I = e.subtract(2, "week").startOf("week").format(t), A = e.subtract(2, "month").format(t), O = e.subtract(3, "month").format(t), N = e.subtract(6, "month").format(t), U = e.subtract(1, "year").startOf("year").format(t), L = e.subtract(2, "year").startOf("year").format(t), M = e.subtract(3, "year").format(t), T = e.subtract(5, "year").format(t);
10025
10031
  return {
10026
10032
  dateFormat: t,
10027
10033
  thisDayStart: r,
@@ -10040,12 +10046,12 @@ function getDateRanges() {
10040
10046
  thisYearEnd: g,
10041
10047
  lastYearStart: _,
10042
10048
  lastYearEnd: E,
10043
- now: x,
10049
+ now: $,
10044
10050
  twoDay: y,
10045
10051
  threeDay: v,
10046
10052
  sevenDay: C,
10047
10053
  fifteenDay: w,
10048
- thirtyDay: $,
10054
+ thirtyDay: x,
10049
10055
  twoWeek: I,
10050
10056
  twoMonth: A,
10051
10057
  threeMonth: O,
@@ -10113,7 +10119,7 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10113
10119
  },
10114
10120
  emits: ["change", "addCell"],
10115
10121
  setup(t, { expose: e, emit: r }) {
10116
- const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: f, lastMonthStart: d, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: E, lastYearStart: x, lastYearEnd: y, now: v, twoDay: C, threeDay: w, sevenDay: $, fifteenDay: I, thirtyDay: A, twoWeek: O, twoMonth: N, threeMonth: U, sixMonth: L, oneYear: M, twoYear: T, threeYear: b, fiveYear: D } = getDateRanges(), S = ref([]), R = ref([]), k = computed(() => {
10122
+ const n = t, o = r, i = useRoute(), { dateFormat: a, thisDayStart: s, thisDayEnd: l, thisWeekStart: c, thisMonthStart: u, thisMonthEnd: f, lastMonthStart: d, lastMonthEnd: p, thisQuarterStart: m, lastQuarterStart: g, thisYearStart: _, thisYearEnd: E, lastYearStart: $, lastYearEnd: y, now: v, twoDay: C, threeDay: w, sevenDay: x, fifteenDay: I, thirtyDay: A, twoWeek: O, twoMonth: N, threeMonth: U, sixMonth: L, oneYear: M, twoYear: T, threeYear: b, fiveYear: D } = getDateRanges(), S = ref([]), R = ref([]), k = computed(() => {
10117
10123
  let B = reactive({});
10118
10124
  return R.value.forEach((V) => {
10119
10125
  B[V.columnName] = V;
@@ -10139,13 +10145,13 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10139
10145
  for (let z = 0; z < n.config.length; z++) {
10140
10146
  const Q = cloneDeep(n.config[z]);
10141
10147
  let { dataType: Y, dateType: oe, type: te, selectorId: ce, remoteSearch: le, cellIndex: fe, cellIndexSort: _e, cellIndexSortOrder: ge, cellIndexSortNumeric: me, name: he, columnName: pe, defaultValue: Ee, isNull: Ce } = Q, ve = [DataSourceColumnDataType.DATE, DataSourceColumnDataType.DATETIME].includes(Y);
10142
- const { componentName: be, placeholerPrefix: we, type: $e } = componentTransition(Y, oe);
10148
+ const { componentName: be, placeholerPrefix: we, type: xe } = componentTransition(Y, oe);
10143
10149
  let ye = {
10144
10150
  ...Q,
10145
10151
  elWidth: Q.elWidth || 210,
10146
10152
  formItemType: be,
10147
10153
  placeholder: rct(we + he || pe),
10148
- type: $e || "",
10154
+ type: xe || "",
10149
10155
  optionData: [],
10150
10156
  value: "",
10151
10157
  shiftSegments: [],
@@ -10164,8 +10170,8 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10164
10170
  } else fe && (o("addCell", fe), on(`cell-change:${fe}`, (de) => {
10165
10171
  if (de = Object.values(de), de && Array.isArray(de) && de.length) {
10166
10172
  if (_e) {
10167
- const xe = createGroupSortComparator({ order: ge, numeric: me });
10168
- de.sort((Se, Te) => xe(Se.label, Te.label));
10173
+ const $e = createGroupSortComparator({ order: ge, numeric: me });
10174
+ de.sort((Se, Te) => $e(Se.label, Te.label));
10169
10175
  }
10170
10176
  ye.optionData = de, triggerRef(R);
10171
10177
  }
@@ -10212,11 +10218,11 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10212
10218
  thisMonth: [u, f],
10213
10219
  lastMonth: [d, p],
10214
10220
  thisYear: [_, E],
10215
- lastYear: [x, y],
10221
+ lastYear: [$, y],
10216
10222
  now: [s, v],
10217
10223
  twoDay: [C, v],
10218
10224
  threeDay: [w, v],
10219
- sevenDay: [$, v],
10225
+ sevenDay: [x, v],
10220
10226
  fifteenDay: [I, v],
10221
10227
  thirtyDay: [A, v],
10222
10228
  threeMonth: [U, v],
@@ -10246,7 +10252,7 @@ const _hoisted_1$6 = { class: "yh-report-view-conditions" }, _sfc_main$7 = /* @_
10246
10252
  thisDay: s,
10247
10253
  twoDay: C,
10248
10254
  threeDay: w,
10249
- sevenDay: $,
10255
+ sevenDay: x,
10250
10256
  fifteenDay: I,
10251
10257
  thirtyDay: A
10252
10258
  }[V];
@@ -10522,7 +10528,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10522
10528
  width: n.config.widthType === "%" ? `calc(${n.config.width}% - 10px)` : `${n.config.width - 10}px`,
10523
10529
  height: n.config.fullHeight ? "calc(100% - 8px)" : `${n.config.height}px`
10524
10530
  };
10525
- }), _ = computed(() => getThemeColors(n.config.theme || "none")), E = computed(() => n.config && n.config.data ? !!n.config.data.pagination : !1), x = computed(() => n.config.params && Array.isArray(n.config.params) && n.config.params.filter((F) => F.isShow).length > 0), y = reactive({
10531
+ }), _ = computed(() => getThemeColors(n.config.theme || "none")), E = computed(() => n.config && n.config.data ? !!n.config.data.pagination : !1), $ = computed(() => n.config.params && Array.isArray(n.config.params) && n.config.params.filter((F) => F.isShow).length > 0), y = reactive({
10526
10532
  pageSize: 100,
10527
10533
  pageSizes: [10, 20, 50, 100, 200, 1e4],
10528
10534
  pageIndex: 1,
@@ -10536,7 +10542,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10536
10542
  let q = j.match(/[A-Z]+/)[0], X = j.match(/\d+/)[0] - 1, K = columnToNumber(q), re = `${H}:${X}:${K}`;
10537
10543
  C.value.includes(re) || C.value.push(re);
10538
10544
  };
10539
- function $(F) {
10545
+ function x(F) {
10540
10546
  if (A && n.config.data.autoQuery === !1)
10541
10547
  return A = !1, !1;
10542
10548
  v.value = F, y.pageIndex = 1, W();
@@ -10855,10 +10861,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
10855
10861
  ref_key: "conditionsRef",
10856
10862
  ref: s,
10857
10863
  onAddCell: w,
10858
- onChange: $
10864
+ onChange: x
10859
10865
  }, {
10860
10866
  search: withCtx(() => [
10861
- x.value ? (openBlock(), createBlock(j, {
10867
+ $.value ? (openBlock(), createBlock(j, {
10862
10868
  key: 0,
10863
10869
  type: "primary",
10864
10870
  onClick: O
@@ -11155,8 +11161,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11155
11161
  }));
11156
11162
  const n = t, o = r, i = inject("isPrintMode", computed(() => !1)), a = inject("printConfig", void 0), s = computed(() => {
11157
11163
  let C = {};
11158
- return colors.forEach((w, $) => {
11159
- C[`color${$}`] = w;
11164
+ return colors.forEach((w, x) => {
11165
+ C[`color${x}`] = w;
11160
11166
  }), C;
11161
11167
  }), l = ref(!1), c = ref(), u = ref([]), f = computed(() => u.value.length === 1), d = computed(() => u.value[0]), p = computed(() => f.value ? {
11162
11168
  backgroundColor: n.config.singleColor || colors[0]
@@ -11173,30 +11179,30 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11173
11179
  }), g = computed(() => n.config ? `${n.config.height}px` : "10px"), _ = async (C) => {
11174
11180
  if (C && Object.keys(C).length > 0) {
11175
11181
  const w = cloneDeep(n.config);
11176
- await x(w, C);
11182
+ await $(w, C);
11177
11183
  }
11178
11184
  }, E = {
11179
11185
  SUM(C) {
11180
- return C.map(($) => Number($)).filter(($) => !isNaN($)).reduce(($, I) => $ + I, 0);
11186
+ return C.map((x) => Number(x)).filter((x) => !isNaN(x)).reduce((x, I) => x + I, 0);
11181
11187
  },
11182
11188
  AVG(C) {
11183
- const w = C.map(($) => Number($)).filter(($) => !isNaN($));
11189
+ const w = C.map((x) => Number(x)).filter((x) => !isNaN(x));
11184
11190
  return w.length ? E.SUM(w) / w.length : 0;
11185
11191
  },
11186
11192
  MAX(C) {
11187
- const w = C.map(($) => Number($)).filter(($) => !isNaN($));
11193
+ const w = C.map((x) => Number(x)).filter((x) => !isNaN(x));
11188
11194
  return w.length ? Math.max(...w) : 0;
11189
11195
  },
11190
11196
  MIN(C) {
11191
- const w = C.map(($) => Number($)).filter(($) => !isNaN($));
11197
+ const w = C.map((x) => Number(x)).filter((x) => !isNaN(x));
11192
11198
  return w.length ? Math.min(...w) : 0;
11193
11199
  },
11194
11200
  COUNT(C) {
11195
11201
  return C.length;
11196
11202
  }
11197
- }, x = async (C, w) => {
11203
+ }, $ = async (C, w) => {
11198
11204
  const {
11199
- data: { source: $ },
11205
+ data: { source: x },
11200
11206
  notSingle: I,
11201
11207
  keyIds: A,
11202
11208
  dataIds: O,
@@ -11211,8 +11217,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11211
11217
  w && (D = {
11212
11218
  ...w
11213
11219
  });
11214
- for (let S = 0; S < $.length; S++) {
11215
- const { key: R, url: k } = $[S];
11220
+ for (let S = 0; S < x.length; S++) {
11221
+ const { key: R, url: k } = x[S];
11216
11222
  try {
11217
11223
  const G = (await getDateSourceData(k, { id: n.id })).data;
11218
11224
  D[R] = G;
@@ -11269,7 +11275,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11269
11275
  }, y = async () => {
11270
11276
  l.value = !0;
11271
11277
  let C = cloneDeep(n.config);
11272
- C && x(C);
11278
+ C && $(C);
11273
11279
  };
11274
11280
  e({
11275
11281
  setOutData: _,
@@ -11280,11 +11286,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11280
11286
  function v() {
11281
11287
  var M;
11282
11288
  if (!u.value.length) return null;
11283
- const C = Math.max(((M = c.value) == null ? void 0 : M.offsetWidth) || n.config.width || 200, 100), w = n.config.height || 100, $ = 2, I = document.createElement("canvas");
11284
- I.width = Math.round(C * $), I.height = Math.round(w * $);
11289
+ const C = Math.max(((M = c.value) == null ? void 0 : M.offsetWidth) || n.config.width || 200, 100), w = n.config.height || 100, x = 2, I = document.createElement("canvas");
11290
+ I.width = Math.round(C * x), I.height = Math.round(w * x);
11285
11291
  const A = I.getContext("2d");
11286
11292
  if (!A) return null;
11287
- A.scale($, $);
11293
+ A.scale(x, x);
11288
11294
  const O = u.value, N = C / O.length, U = 14, L = Math.max(Math.round(w / 3.5), 12);
11289
11295
  return O.forEach((T, b) => {
11290
11296
  const D = b * N;
@@ -11292,7 +11298,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11292
11298
  }), { base64: I.toDataURL("image/png"), width: C, height: w };
11293
11299
  }
11294
11300
  return (C, w) => {
11295
- const $ = resolveDirective("loading");
11301
+ const x = resolveDirective("loading");
11296
11302
  return withDirectives((openBlock(), createElementBlock("div", {
11297
11303
  ref_key: "rootRef",
11298
11304
  ref: c,
@@ -11311,7 +11317,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11311
11317
  createElementVNode("span", null, "仅展示,打印时会忽略", -1)
11312
11318
  ])])) : createCommentVNode("", !0)
11313
11319
  ], 14, _hoisted_1$3)), [
11314
- [$, l.value]
11320
+ [x, l.value]
11315
11321
  ]);
11316
11322
  };
11317
11323
  }
@@ -11367,13 +11373,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11367
11373
  C.style.position = "fixed", C.style.left = "-9999px", C.style.top = "-9999px", C.style.width = "0", C.style.height = "0", C.style.border = "none", document.body.appendChild(C);
11368
11374
  const w = C.contentDocument;
11369
11375
  w.open(), w.write(v), w.close(), C.onload = () => {
11370
- const $ = C.contentWindow, I = document.title;
11376
+ const x = C.contentWindow, I = document.title;
11371
11377
  r.statementName && (document.title = r.statementName);
11372
11378
  const A = () => {
11373
11379
  document.title = I;
11374
11380
  };
11375
- $.addEventListener("afterprint", A), $.print(), A(), setTimeout(() => {
11376
- $.removeEventListener("afterprint", A), C.remove(), l.value = !1;
11381
+ x.addEventListener("afterprint", A), x.print(), A(), setTimeout(() => {
11382
+ x.removeEventListener("afterprint", A), C.remove(), l.value = !1;
11377
11383
  }, 500);
11378
11384
  };
11379
11385
  }
@@ -11409,8 +11415,8 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11409
11415
  L.push({ type: "report", dom: R.dom }), M += R.height, D.state.currentRowIdx >= D.state.visibleRows.length && T.shift();
11410
11416
  }
11411
11417
  };
11412
- r.silentRender && await x();
11413
- const $ = !!r.autoPrint, I = getPrintContentHeightPxMeasured(r.printConfig), A = I != null, O = getPrintContentWidthPxMeasured(r.printConfig), N = [];
11418
+ r.silentRender && await $();
11419
+ const x = !!r.autoPrint, I = getPrintContentHeightPxMeasured(r.printConfig), A = I != null, O = getPrintContentWidthPxMeasured(r.printConfig), N = [];
11414
11420
  for (let D = 0; D < r.configs.length; D++) {
11415
11421
  const S = r.configs[D];
11416
11422
  if (S.type === "report") {
@@ -11496,7 +11502,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11496
11502
  S.appendChild(G), s.value.push(G);
11497
11503
  }
11498
11504
  }
11499
- $ && (await nextTick(), E(), setTimeout(() => {
11505
+ x && (await nextTick(), E(), setTimeout(() => {
11500
11506
  n("update:visible", !1);
11501
11507
  }, 1e3));
11502
11508
  } finally {
@@ -11504,27 +11510,27 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11504
11510
  }
11505
11511
  }
11506
11512
  );
11507
- async function x() {
11513
+ async function $() {
11508
11514
  u.value = /* @__PURE__ */ new Map(), f.value = /* @__PURE__ */ new Map();
11509
11515
  const y = r.fetchAll !== !1;
11510
11516
  for (let v = 0; v < r.configs.length; v++) {
11511
11517
  const C = r.configs[v];
11512
11518
  if (C.type !== "report") continue;
11513
- const w = C, $ = w.data, I = w.tableConfig;
11514
- if (!$ || !I || !$.source) continue;
11519
+ const w = C, x = w.data, I = w.tableConfig;
11520
+ if (!x || !I || !x.source) continue;
11515
11521
  const A = buildPrintParamsFromConfig(w, c.query), { resData: O } = await fetchReportData(
11516
- { id: r.reportId ?? "", data: $, tableConfig: I },
11522
+ { id: r.reportId ?? "", data: x, tableConfig: I },
11517
11523
  A,
11518
- { pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!$.pagination },
11524
+ { pageSize: 5e3, pageIndex: 1, total: 0, isPagination: !!x.pagination },
11519
11525
  y
11520
11526
  );
11521
11527
  let N = toUpdateData(O);
11522
- $.processData && (N = await getProcessData($.processData, N, A, {
11528
+ x.processData && (N = await getProcessData(x.processData, N, A, {
11523
11529
  pageSize: 5e3,
11524
11530
  pageIndex: 1,
11525
11531
  total: 0
11526
11532
  }));
11527
- const U = $.source, L = U.find((M) => M.loopTable);
11533
+ const U = x.source, L = U.find((M) => M.loopTable);
11528
11534
  if (L && L.key) {
11529
11535
  const M = await renderReportToConfigs(
11530
11536
  I,
@@ -11651,7 +11657,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11651
11657
  const b = a.value.indexOf(T);
11652
11658
  b > -1 && a.value.splice(b, 1);
11653
11659
  }
11654
- const x = ref(!1);
11660
+ const $ = ref(!1);
11655
11661
  function y(T) {
11656
11662
  d[T.key] = T.data, l.value.forEach((b) => {
11657
11663
  var D;
@@ -11671,13 +11677,13 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11671
11677
  if (ne.type === "report") {
11672
11678
  const ae = T[S];
11673
11679
  if (S += 1, !(ae != null && ae.buildExportConfigs)) continue;
11674
- $(`正在获取表格数据(${S}/${b})...`);
11680
+ x(`正在获取表格数据(${S}/${b})...`);
11675
11681
  const ie = await ae.buildExportConfigs(!!f.value.exportAll);
11676
11682
  if (!ie) continue;
11677
11683
  const se = getThemeColors(ne.theme || "none").border;
11678
11684
  k.push({ type: "report", reportConfig: ie, subReportIndex: ne.subReprotIndex || 0 }), ie.forEach((F) => G.push({ type: "report", reportConfig: F, themeColor: se, theme: ne.theme || "none" }));
11679
11685
  } else {
11680
- R += 1, $(`正在截取图表/指标卡(${R}/${D})...`);
11686
+ R += 1, x(`正在截取图表/指标卡(${R}/${D})...`);
11681
11687
  const ae = l.value[J];
11682
11688
  if (!ae) continue;
11683
11689
  let ie = null;
@@ -11693,7 +11699,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11693
11699
  return { mergeItems: k, printItems: G };
11694
11700
  }
11695
11701
  let w = null;
11696
- function $(T) {
11702
+ function x(T) {
11697
11703
  w || (w = ElLoading.service({
11698
11704
  target: s.value ?? void 0,
11699
11705
  background: "rgba(255, 255, 255, 0.75)"
@@ -11703,7 +11709,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11703
11709
  w == null || w.close(), w = null;
11704
11710
  }
11705
11711
  async function A(T) {
11706
- $("正在准备导出...");
11712
+ x("正在准备导出...");
11707
11713
  try {
11708
11714
  const { mergeItems: b, printItems: D } = await C();
11709
11715
  if (!b.length) {
@@ -11711,11 +11717,11 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11711
11717
  return;
11712
11718
  }
11713
11719
  if (T === "excel") {
11714
- $("正在生成 Excel 文件...");
11720
+ x("正在生成 Excel 文件...");
11715
11721
  const S = await exportReportMerged(b, o.value || "报表导出", "gray");
11716
11722
  S && downloadReport(S, o.value || "报表导出", "excel");
11717
11723
  } else T.startsWith("pdf") && await exportReportByBrowser(D, u.value, o.value, {
11718
- onProgress: (S) => $(S),
11724
+ onProgress: (S) => x(S),
11719
11725
  orientation: T === "pdf-landscape" ? "landscape" : "portrait",
11720
11726
  singlePage: T === "pdf-single"
11721
11727
  });
@@ -11881,7 +11887,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
11881
11887
  withDirectives(createElementVNode("div", _hoisted_6$1, [...b[7] || (b[7] = [
11882
11888
  createElementVNode("i", { class: "iconfont icon-backtop" }, null, -1)
11883
11889
  ])], 512), [
11884
- [vShow, x.value]
11890
+ [vShow, $.value]
11885
11891
  ])
11886
11892
  ], 6)), [
11887
11893
  [D, n.value]
@@ -12145,7 +12151,7 @@ function usePrinterClient() {
12145
12151
  }
12146
12152
  if (!g)
12147
12153
  throw ElMessage.error("未找到可用打印机"), new Error("未找到可用打印机");
12148
- const _ = p.printConfig, E = _ && typeof _.width == "number" ? { widthMm: _.width, heightMm: typeof _.height == "number" ? _.height : 297 } : void 0, x = await printerClient.printReport({
12154
+ const _ = p.printConfig, E = _ && typeof _.width == "number" ? { widthMm: _.width, heightMm: typeof _.height == "number" ? _.height : 297 } : void 0, $ = await printerClient.printReport({
12149
12155
  options: p.remoteOptions,
12150
12156
  printConfig: p.printConfig,
12151
12157
  statementName: p.name,
@@ -12154,7 +12160,7 @@ function usePrinterClient() {
12154
12160
  copies: f,
12155
12161
  pageSize: E
12156
12162
  });
12157
- return x.success ? ElMessage.success(`打印已发送:${g},共 ${x.copies || f} 份`) : ElMessage.error(x.message || "打印失败"), x;
12163
+ return $.success ? ElMessage.success(`打印已发送:${g},共 ${$.copies || f} 份`) : ElMessage.error($.message || "打印失败"), $;
12158
12164
  } finally {
12159
12165
  printerClient.printing.value = !1;
12160
12166
  }
@@ -12250,9 +12256,9 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
12250
12256
  `打印机:${n.value}`,
12251
12257
  `时间:${m}`,
12252
12258
  "如能正常打印,说明连接与打印机配置正确"
12253
- ], _ = g.map((E, x) => {
12254
- const y = { ...defaultCell, text: E, row: x + 1, col: 1 };
12255
- return y.style = { ...y.style, fontWeight: x === 0 ? "bold" : "normal" }, [y];
12259
+ ], _ = g.map((E, $) => {
12260
+ const y = { ...defaultCell, text: E, row: $ + 1, col: 1 };
12261
+ return y.style = { ...y.style, fontWeight: $ === 0 ? "bold" : "normal" }, [y];
12256
12262
  });
12257
12263
  return [
12258
12264
  {
@@ -12279,7 +12285,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
12279
12285
  ];
12280
12286
  }
12281
12287
  return (m, g) => {
12282
- const _ = resolveComponent("YhIcon"), E = resolveComponent("el-button"), x = resolveComponent("el-input"), y = resolveComponent("el-divider"), v = resolveComponent("el-popover");
12288
+ const _ = resolveComponent("YhIcon"), E = resolveComponent("el-button"), $ = resolveComponent("el-input"), y = resolveComponent("el-divider"), v = resolveComponent("el-popover");
12283
12289
  return openBlock(), createBlock(v, {
12284
12290
  placement: "bottom",
12285
12291
  "popper-class": "yh-printer-popover",
@@ -12310,7 +12316,7 @@ const _hoisted_1 = ["title"], _hoisted_2 = { class: "user-actions" }, _hoisted_3
12310
12316
  createElementVNode("span", _hoisted_4, toDisplayString(l.value), 1)
12311
12317
  ]),
12312
12318
  createElementVNode("div", _hoisted_5, [
12313
- createVNode(x, {
12319
+ createVNode($, {
12314
12320
  modelValue: i.value,
12315
12321
  "onUpdate:modelValue": g[0] || (g[0] = (C) => i.value = C),
12316
12322
  size: "small",
@@ -12380,7 +12386,7 @@ const silenceExport = async (t) => {
12380
12386
  r[n].type;
12381
12387
  };
12382
12388
  async function registerRoute(t, e) {
12383
- t && (e.addRoute("Index", {
12389
+ t ? (e.addRoute("Index", {
12384
12390
  path: "statement/list",
12385
12391
  name: "报表列表",
12386
12392
  meta: {
@@ -12388,7 +12394,7 @@ async function registerRoute(t, e) {
12388
12394
  title: "报表列表",
12389
12395
  icon: "iconfont icon-s-grid"
12390
12396
  },
12391
- component: () => import("./StatementList-BFaOwqOO.mjs")
12397
+ component: () => import("./StatementList-D1c4iGOZ.mjs")
12392
12398
  }), e.addRoute("Index", {
12393
12399
  path: "statement/design/:id",
12394
12400
  name: "报表设计",
@@ -12397,7 +12403,7 @@ async function registerRoute(t, e) {
12397
12403
  title: "报表设计",
12398
12404
  icon: "iconfont icon-s-grid"
12399
12405
  },
12400
- component: () => import("./StatementDesign-OzMH3MVW.mjs")
12406
+ component: () => import("./StatementDesign-DhAUZTV6.mjs")
12401
12407
  }), e.addRoute("Index", {
12402
12408
  path: "statement/detail/:id",
12403
12409
  name: "后台报表查看",
@@ -12406,7 +12412,25 @@ async function registerRoute(t, e) {
12406
12412
  title: "后台报表查看",
12407
12413
  icon: "iconfont icon-s-grid"
12408
12414
  },
12409
- component: () => import("./StatementDetail-DkOrmDr6.mjs")
12415
+ component: () => import("./StatementDetail-Br6zQ67Y.mjs")
12416
+ })) : e.hasRoute("Index") && (e.addRoute("Index", {
12417
+ path: "statement/design/:id",
12418
+ name: "报表设计",
12419
+ meta: {
12420
+ id: "StatementDesign",
12421
+ title: "报表设计",
12422
+ icon: "iconfont icon-s-grid"
12423
+ },
12424
+ component: () => import("./StatementDesign-DhAUZTV6.mjs")
12425
+ }), e.addRoute("Index", {
12426
+ path: "statement/detail/:id",
12427
+ name: "前台报表查看",
12428
+ meta: {
12429
+ id: "StatementDetail",
12430
+ title: "报表查看",
12431
+ icon: "iconfont icon-s-grid"
12432
+ },
12433
+ component: () => import("./StatementDetail-Br6zQ67Y.mjs")
12410
12434
  })), e.addRoute({
12411
12435
  path: "/statementdetail/:id",
12412
12436
  name: "报表查看",
@@ -12417,7 +12441,7 @@ async function registerRoute(t, e) {
12417
12441
  isWhite: !0
12418
12442
  },
12419
12443
  props: !0,
12420
- component: () => import("./StatementDetail-DkOrmDr6.mjs")
12444
+ component: () => import("./StatementDetail-Br6zQ67Y.mjs")
12421
12445
  }), e.hasRoute("Index") && e.addRoute("Index", {
12422
12446
  path: "innerStatementdetail/:id",
12423
12447
  name: "系统内报表查看",
@@ -12428,7 +12452,7 @@ async function registerRoute(t, e) {
12428
12452
  noPadding: !0
12429
12453
  },
12430
12454
  props: !0,
12431
- component: () => import("./StatementDetail-DkOrmDr6.mjs")
12455
+ component: () => import("./StatementDetail-Br6zQ67Y.mjs")
12432
12456
  });
12433
12457
  }
12434
12458
  const index = {
@@ -12444,7 +12468,8 @@ const index = {
12444
12468
  $addAdminMenu: i,
12445
12469
  $router: a,
12446
12470
  $clientStore: s,
12447
- $slotsStore: l
12471
+ $slotsStore: l,
12472
+ $mergeComponentMap: c
12448
12473
  } = t.config.globalProperties;
12449
12474
  n && (rct = n), i({
12450
12475
  id: "report",
@@ -12452,6 +12477,8 @@ const index = {
12452
12477
  iconPath: "table",
12453
12478
  url: "/admin/statement/list",
12454
12479
  menuType: "WINDOW"
12480
+ }), c == null || c({
12481
+ "/statement/list": () => import("./StatementList-D1c4iGOZ.mjs")
12455
12482
  }), o(async () => {
12456
12483
  !a || !a.hasRoute("Index") || registerRoute(s.isAdmin, a);
12457
12484
  }), l && (e != null && e.printEnabled) && l.registerSlot({
@@ -12548,4 +12575,4 @@ export {
12548
12575
  formatShiftOffset as y,
12549
12576
  numberToColumn as z
12550
12577
  };
12551
- //# sourceMappingURL=index-D5s-AlK7.mjs.map
12578
+ //# sourceMappingURL=index-DgsSvRRw.mjs.map