@guiexpert/table 1.1.106 → 1.1.107

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.
package/index.js CHANGED
@@ -35,10 +35,10 @@ function Rh(n = 500) {
35
35
  }, s;
36
36
  };
37
37
  }
38
- const Ji = "any", Ot = "undefined", qi = "null", Zi = "string", mo = "number", bo = "boolean", Qi = "Array", Nt = "object", rs = [qi, Ot, Ji];
39
- class er {
38
+ const Yi = "any", Ot = "undefined", Ji = "null", qi = "string", po = "number", mo = "boolean", Zi = "Array", Nt = "object", rs = [Ji, Ot, Yi];
39
+ class Qi {
40
40
  constructor(e) {
41
- this.propertyName = e, this.type = Ji;
41
+ this.propertyName = e, this.type = Yi;
42
42
  }
43
43
  }
44
44
  class ks {
@@ -48,30 +48,30 @@ class ks {
48
48
  }
49
49
  class En {
50
50
  constructor(e) {
51
- this.propertyName = e, this.type = qi;
51
+ this.propertyName = e, this.type = Ji;
52
52
  }
53
53
  }
54
54
  class Mn {
55
55
  constructor(e) {
56
- this.propertyName = e, this.type = Zi;
56
+ this.propertyName = e, this.type = qi;
57
57
  }
58
58
  }
59
59
  class Tn {
60
60
  constructor(e) {
61
- this.propertyName = e, this.type = mo;
61
+ this.propertyName = e, this.type = po;
62
62
  }
63
63
  }
64
64
  class In {
65
65
  constructor(e) {
66
- this.propertyName = e, this.type = bo;
66
+ this.propertyName = e, this.type = mo;
67
67
  }
68
68
  }
69
69
  class je {
70
70
  constructor(e, t = []) {
71
- this.propertyName = e, this.items = t, this.type = Qi;
71
+ this.propertyName = e, this.items = t, this.type = Zi;
72
72
  }
73
73
  }
74
- class tr {
74
+ class er {
75
75
  constructor(e, t = []) {
76
76
  this.propertyName = e, this.types = t;
77
77
  }
@@ -135,14 +135,14 @@ class Ah {
135
135
  }
136
136
  const h = this.getReadableColumnLabel(a);
137
137
  let d = 100, u = "", f = "ge-table-text-align-left";
138
- if (l.type === Qi) {
138
+ if (l.type === Zi) {
139
139
  if (this.allowCustomRenderer && c) {
140
140
  const g = `${c}ArrayCellRenderer`;
141
141
  u = ` bodyRenderer: new ${g}(),`, f = "", this.renderCumstomCellRenderer(c, g);
142
142
  } else
143
143
  u = " bodyRenderer: new SimpleArrayCellRenderer(),";
144
144
  d = 250;
145
- } else l.type === mo ? (u = " bodyRenderer: new NumberCellRenderer(),", f = "ge-table-text-align-right") : l.type === bo && (u = " bodyRenderer: new TrueFalseCellRenderer(),", f = "ge-table-text-align-center", d = 80);
145
+ } else l.type === po ? (u = " bodyRenderer: new NumberCellRenderer(),", f = "ge-table-text-align-right") : l.type === mo && (u = " bodyRenderer: new TrueFalseCellRenderer(),", f = "ge-table-text-align-center", d = 80);
146
146
  e.push(` ColumnDef.create({
147
147
  property: "${a}",
148
148
  headerLabel: "${h}",
@@ -204,7 +204,7 @@ export class ${t} implements CellRendererIf {
204
204
  `);
205
205
  }
206
206
  }
207
- class Uo {
207
+ class Go {
208
208
  /**
209
209
  *
210
210
  * Fixes an invalid json like this:
@@ -272,17 +272,17 @@ class Uo {
272
272
  }
273
273
  class Dn {
274
274
  constructor() {
275
- this.property = "", this.value = "", this.path = "", this.propertyItem = new tr("", [new er("")]);
275
+ this.property = "", this.value = "", this.path = "", this.propertyItem = new er("", [new Qi("")]);
276
276
  }
277
277
  toString() {
278
278
  var e;
279
279
  return `${this.path} -> : ${((e = this.propertyItem) == null ? void 0 : e.toString()) ?? ""}`;
280
280
  }
281
281
  }
282
- const Ko = "Entity";
282
+ const Uo = "Entity";
283
283
  function kn(n) {
284
284
  let e = Ln(Fn(n));
285
- return e.includes(Ko) || (e = e + Ko), e;
285
+ return e.includes(Uo) || (e = e + Uo), e;
286
286
  }
287
287
  function Ln(n) {
288
288
  if (!n || n.length === 0) return n;
@@ -382,7 +382,7 @@ class Eh {
382
382
  json2PropertyType(e, t = "") {
383
383
  let s;
384
384
  if (typeof e == "string") {
385
- const o = new Uo().fixJSON(e);
385
+ const o = new Go().fixJSON(e);
386
386
  s = this.json2Object(o);
387
387
  } else
388
388
  s = e;
@@ -498,7 +498,7 @@ class Eh {
498
498
  json2ValueInfos(e, t = "") {
499
499
  let s;
500
500
  if (typeof e == "string") {
501
- const o = new Uo().fixJSON(e);
501
+ const o = new Go().fixJSON(e);
502
502
  s = this.json2Object(o);
503
503
  } else
504
504
  s = e;
@@ -537,7 +537,7 @@ class Eh {
537
537
  }
538
538
  }
539
539
  }
540
- return t || new er("");
540
+ return t || new Qi("");
541
541
  }
542
542
  logValueInfos(e) {
543
543
  for (let t = 0; t < e.length; t++) {
@@ -604,12 +604,12 @@ class Eh {
604
604
  return o(e, "root", t), s.sort((i, r) => i.path.localeCompare(r.path));
605
605
  }
606
606
  createPropertyItem(e, t) {
607
- return new tr(t, [
607
+ return new er(t, [
608
608
  this.createPropertyType(e, t)
609
609
  ]);
610
610
  }
611
611
  createPropertyType(e, t) {
612
- return e === null ? new En(t) : e === void 0 ? new ks(t) : typeof e === Zi ? new Mn(t) : typeof e === mo && !isNaN(e) ? new Tn(t) : typeof e === bo ? new In(t) : Array.isArray(e) ? new je(t) : typeof e === Nt ? new ve(t, kn(t)) : new ks(t);
612
+ return e === null ? new En(t) : e === void 0 ? new ks(t) : typeof e === qi ? new Mn(t) : typeof e === po && !isNaN(e) ? new Tn(t) : typeof e === mo ? new In(t) : Array.isArray(e) ? new je(t) : typeof e === Nt ? new ve(t, kn(t)) : new ks(t);
613
613
  }
614
614
  }
615
615
  class Mh {
@@ -708,7 +708,7 @@ function U(n) {
708
708
  function Z(n) {
709
709
  return n && n.type === "AreaModelTree";
710
710
  }
711
- function sr(n) {
711
+ function tr(n) {
712
712
  return !!n && n.type === "CheckboxCellRenderer";
713
713
  }
714
714
  function we(n) {
@@ -723,7 +723,7 @@ function On(n) {
723
723
  function le(n) {
724
724
  return !!n && n.type === "RowGroup";
725
725
  }
726
- function zo(n) {
726
+ function Ko(n) {
727
727
  return U(n) && le(n.data);
728
728
  }
729
729
  function ne(n) {
@@ -735,53 +735,18 @@ function dt(n) {
735
735
  function js(n) {
736
736
  return !!n && n.kind === "PivotTableModel";
737
737
  }
738
- function jo(n) {
738
+ function zo(n) {
739
739
  return !!n && n.kind === "AreaModelPivot";
740
740
  }
741
- function wo(n) {
741
+ function bo(n) {
742
742
  return !!n && n.type === "PivotColumnDef";
743
743
  }
744
- function Nn(n, e) {
745
- var s, o, i;
746
- if (n === "rtl")
747
- return "rtl";
748
- if (n !== "auto" || !e)
749
- return "ltr";
750
- if (e.isConnected && typeof getComputedStyle == "function") {
751
- const r = getComputedStyle(e).direction;
752
- if (r === "rtl" || r === "ltr")
753
- return r;
754
- }
755
- return ((i = (o = (s = e.closest) == null ? void 0 : s.call(e, "[dir]")) == null ? void 0 : o.getAttribute("dir")) == null ? void 0 : i.toLowerCase()) === "rtl" ? "rtl" : "ltr";
756
- }
757
- function Vn(n, e) {
758
- const t = n.scrollLeft;
759
- return e ? Math.max(0, -t) : t;
760
- }
761
- function Pn(n, e, t) {
762
- n.scrollLeft = t ? -e : e;
763
- }
764
- function Xs(n, e) {
765
- return e && n !== 0 ? -n : n;
766
- }
767
- function _n(n, e, t) {
768
- if (!e)
769
- return !1;
770
- const s = n.scrollWidth - n.clientWidth;
771
- return s <= 0 ? !1 : t ? e > 0 ? n.scrollLeft < 0 : n.scrollLeft > -s + 1 : e > 0 ? n.scrollLeft + n.clientWidth < n.scrollWidth - 1 : n.scrollLeft > 0;
772
- }
773
- function Bn(n, e, t, s) {
774
- return s ? e + t - n : n - e;
775
- }
776
- function $n(n) {
777
- return n.split(" ").map((e) => e === "left" ? "right" : e === "right" ? "left" : e).join(" ");
778
- }
779
- class yo {
744
+ class wo {
780
745
  constructor(e = -1, t = -1, s = -1, o = -1, i, r, l, a = 0, c = 0, h = 0, d = "") {
781
746
  this.rowIndex = e, this.rowTop = t, this.columnIndex = s, this.columnLeft = o, this.areaIdent = i, this.sideIdent = r, this.originalEvent = l, this.clickCount = a, this.draggingX = c, this.draggingY = h, this.action = d;
782
747
  }
783
748
  clone() {
784
- return new yo(
749
+ return new wo(
785
750
  this.rowIndex,
786
751
  this.rowTop,
787
752
  this.columnIndex,
@@ -801,7 +766,7 @@ class De {
801
766
  this.content = e, this.style = t, this.classes = s;
802
767
  }
803
768
  }
804
- class or {
769
+ class sr {
805
770
  constructor(e = new De(
806
771
  ">",
807
772
  "transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",
@@ -822,7 +787,7 @@ class or {
822
787
  this.arrowExpanded = e, this.arrowCollapsed = t, this.arrowPlaceholder = s, this.arrowExpandCollapseAll = o;
823
788
  }
824
789
  }
825
- class ir {
790
+ class or {
826
791
  constructor(e = new De("↑", "", ["ge-header-sorted-asc"]), t = new De("↓", "", ["ge-header-sorted-desc"]), s = new De("↑", "color:transparent;", [])) {
827
792
  this.iconAsc = e, this.iconDesc = t, this.iconPlaceholder = s;
828
793
  }
@@ -1009,7 +974,7 @@ const bs = class bs {
1009
974
  }
1010
975
  return this.domService.appendChild(e, l), l;
1011
976
  }
1012
- addSortedIcon(e, t = "", s = new ir(), o = -1) {
977
+ addSortedIcon(e, t = "", s = new or(), o = -1) {
1013
978
  const i = this.domService.createElement("div");
1014
979
  this.domService.addClass(i, "ge-table-sorted-icon-div"), this.setAriaHidden(i), this.domService.setStyle(i, "position", "absolute"), this.domService.setStyle(i, "top", "0"), this.domService.setStyle(i, this.endKey, "0"), this.domService.setStyle(i, "width", "20px"), this.domService.setStyle(i, "background", "transparent"), this.domService.setStyle(i, "cursor", "pointer"), this.domService.setAttribute(i, "data-col-index", `${o}`), this.domService.setAttribute(i, "data-area", "header");
1015
980
  let r;
@@ -1020,7 +985,7 @@ const bs = class bs {
1020
985
  this.domService.addClass(i, c);
1021
986
  return this.domService.appendChild(e, i), i;
1022
987
  }
1023
- addArrowDiv(e, t = "none", s = new or(), o = -1, i = -1, r = "body") {
988
+ addArrowDiv(e, t = "none", s = new sr(), o = -1, i = -1, r = "body") {
1024
989
  const l = this.domService.createElement("div");
1025
990
  this.domService.addClass(l, "ge-table-tree-arrow-div"), this.setAriaHidden(l), this.domService.setStyle(l, "display", "inline-block"), this.domService.setStyle(l, "position", ""), this.domService.setStyle(l, "width", "20px"), this.domService.setStyle(l, "background", "transparent"), this.domService.setStyle(l, "cursor", "pointer"), this.domService.setAttribute(l, "data-row-index", `${o}`), this.domService.setAttribute(l, "data-col-index", `${i}`), this.domService.setAttribute(l, "data-area", `${r}`);
1026
991
  let a;
@@ -1090,9 +1055,9 @@ const bs = class bs {
1090
1055
  }
1091
1056
  };
1092
1057
  bs.focusBorderWidthInPx = 2;
1093
- let Ys = bs;
1058
+ let Xs = bs;
1094
1059
  const As = (n) => n === "header" ? "header" : n === "footer" ? "footer" : "body";
1095
- class Js {
1060
+ class Ys {
1096
1061
  constructor(e, t) {
1097
1062
  if (this.rowIdx = -1, this.colIdx = -1, this.action = null, this.inputType = null, this.className = "", e !== null && (e instanceof HTMLDivElement || e instanceof HTMLSpanElement || e instanceof HTMLInputElement)) {
1098
1063
  this.className = e.className, this.action = e.getAttribute("data-ge-action"), this.inputType = e.getAttribute("data-input-type"), this.rowIdx = Number(e.getAttribute("data-row-index")), this.colIdx = Number(e.getAttribute("data-col-index"));
@@ -1104,11 +1069,11 @@ class Js {
1104
1069
  }
1105
1070
  }
1106
1071
  }
1107
- class Hn {
1072
+ class Nn {
1108
1073
  constructor(e) {
1109
1074
  this.tableScope = e, this.doubleClickDelay = 500, this.lastClickedCellKey = "", this.mouseDown = !1, this.repaintAfterMouseUp = !1, this.dragging = !1, this.dragGeneration = 0, this.lastClicked = 0;
1110
1075
  const t = this.tableScope.listenerAbortController.signal;
1111
- this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this), { signal: t }), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", this.tableScope.adjustAfterScrolling.bind(this.tableScope), { signal: t }), this.tableScope.scrollViewport.addEventListener("wheel", this.tableScope.onWheel.bind(this.tableScope), { passive: !1, signal: t }), [window, this.tableScope.hostElement].forEach(
1076
+ this.tableScope.hostElement.addEventListener("click", this.onHostElementClicked.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("dblclick", this.onHostElementDblClicked.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("mousedown", this.onMouseDown.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("mousemove", this.onMouseMove.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("mouseup", this.onMouseUp.bind(this), { signal: t }), this.tableScope.hostElement.addEventListener("contextmenu", this.onContextmenu.bind(this), { signal: t }), this.tableScope.hostElement._MouseHandler = "true", this.tableScope.scrollViewport.addEventListener("scroll", () => this.tableScope.onViewportScroll(), { signal: t }), this.tableScope.scrollViewport.addEventListener("wheel", this.tableScope.onWheel.bind(this.tableScope), { passive: !1, signal: t }), [window, this.tableScope.hostElement].forEach(
1112
1077
  (s) => s.addEventListener("resize", this.tableScope.adjustContainersAndRows.bind(this.tableScope), { signal: t })
1113
1078
  );
1114
1079
  }
@@ -1139,7 +1104,7 @@ class Hn {
1139
1104
  return;
1140
1105
  const t = Date.now(), s = this.tableScope.getMouseEventTarget(e), o = this.getCellKey(s), i = e.detail >= 2 || e.detail === 0 && t - this.lastClicked < this.doubleClickDelay && o === this.lastClickedCellKey;
1141
1106
  this.lastClicked = t, this.lastClickedCellKey = o;
1142
- const r = new Js(s, this.tableScope);
1107
+ const r = new Ys(s, this.tableScope);
1143
1108
  if (i && (this.reportedDoubleClick = { time: t, cellKey: o }), i && !this.isClickAction(r)) {
1144
1109
  this.publishGeMouseEvent(e, 2);
1145
1110
  return;
@@ -1187,7 +1152,7 @@ class Hn {
1187
1152
  return;
1188
1153
  this.lastClicked = Date.now();
1189
1154
  const t = this.tableScope.getMouseEventTarget(e), s = this.tableScope.createGeMouseEvent(e);
1190
- if (t instanceof HTMLElement && !this.isClickAction(new Js(t, this.tableScope))) {
1155
+ if (t instanceof HTMLElement && !this.isClickAction(new Ys(t, this.tableScope))) {
1191
1156
  const a = t.closest("[data-col-index]") ?? t, c = ((i = a.closest("[data-area]")) == null ? void 0 : i.getAttribute("data-area")) ?? null, h = As(c), d = Number((r = a.closest("[data-row-index]")) == null ? void 0 : r.getAttribute("data-row-index")), u = Number(a.getAttribute("data-col-index")), f = this.tableScope.tableModel.getAreaModel(h);
1192
1157
  if (c && h === "header") {
1193
1158
  const g = (l = f.isColumnLetterRow) == null ? void 0 : l.call(f, d);
@@ -1291,90 +1256,90 @@ class Hn {
1291
1256
  return (((t = this.tableScope.tableOverlay) == null ? void 0 : t.isEventBlocked(e)) ?? !1) || !!((o = (s = this.tableScope).isEventInDetail) != null && o.call(s, e));
1292
1257
  }
1293
1258
  }
1294
- const rr = () => !1;
1295
- function nr(n) {
1296
- return n.editable === void 0 || n.editable === rr;
1259
+ const ir = () => !1;
1260
+ function rr(n) {
1261
+ return n.editable === void 0 || n.editable === ir;
1297
1262
  }
1298
- function Co(n) {
1263
+ function yo(n) {
1299
1264
  return typeof n == "number" && !Number.isNaN(n);
1300
1265
  }
1301
- function Wn(n) {
1302
- if (Co(n)) return n;
1266
+ function Vn(n) {
1267
+ if (yo(n)) return n;
1303
1268
  if (n instanceof Date) {
1304
1269
  const e = n.getTime();
1305
1270
  return Number.isNaN(e) ? void 0 : e;
1306
1271
  }
1307
1272
  }
1308
- function So(n, e) {
1273
+ function Co(n, e) {
1309
1274
  const t = n.sum, s = t + e;
1310
1275
  Number.isFinite(s) && (n.compensation += Math.abs(t) >= Math.abs(e) ? t - s + e : e - s + t), n.sum = s;
1311
1276
  }
1312
- function lr(n) {
1277
+ function nr(n) {
1313
1278
  return Number.isFinite(n.sum) ? n.sum + n.compensation : n.sum;
1314
1279
  }
1315
- function ar(n, e) {
1316
- So(n, e.sum), n.compensation += e.compensation;
1280
+ function lr(n, e) {
1281
+ Co(n, e.sum), n.compensation += e.compensation;
1317
1282
  }
1318
- const Gn = {
1283
+ const Pn = {
1319
1284
  name: "sum",
1320
1285
  init: () => ({ sum: 0, compensation: 0 }),
1321
- add: (n, e) => (Co(e) && So(n, e), n),
1322
- merge: (n, e) => (ar(n, e), n),
1323
- result: (n) => lr(n)
1324
- }, Un = {
1286
+ add: (n, e) => (yo(e) && Co(n, e), n),
1287
+ merge: (n, e) => (lr(n, e), n),
1288
+ result: (n) => nr(n)
1289
+ }, _n = {
1325
1290
  name: "count",
1326
1291
  init: () => 0,
1327
1292
  add: (n) => n + 1,
1328
1293
  merge: (n, e) => n + e,
1329
1294
  result: (n) => n
1330
- }, Kn = {
1295
+ }, Bn = {
1331
1296
  name: "avg",
1332
1297
  init: () => ({ sum: 0, compensation: 0, count: 0 }),
1333
- add: (n, e) => (Co(e) && (So(n, e), n.count++), n),
1334
- merge: (n, e) => (ar(n, e), n.count += e.count, n),
1335
- result: (n) => n.count ? lr(n) / n.count : void 0
1298
+ add: (n, e) => (yo(e) && (Co(n, e), n.count++), n),
1299
+ merge: (n, e) => (lr(n, e), n.count += e.count, n),
1300
+ result: (n) => n.count ? nr(n) / n.count : void 0
1336
1301
  };
1337
- function Xo(n, e) {
1302
+ function jo(n, e) {
1338
1303
  return {
1339
1304
  name: n,
1340
1305
  init: () => ({ has: !1, value: void 0, key: 0 }),
1341
1306
  add: (t, s) => {
1342
- const o = Wn(s);
1307
+ const o = Vn(s);
1343
1308
  return o !== void 0 && (!t.has || e(o, t.key)) && (t.has = !0, t.value = s, t.key = o), t;
1344
1309
  },
1345
1310
  merge: (t, s) => (s.has && (!t.has || e(s.key, t.key)) && (t.has = !0, t.value = s.value, t.key = s.key), t),
1346
1311
  result: (t) => t.has ? t.value : void 0
1347
1312
  };
1348
1313
  }
1349
- const zn = {
1314
+ const $n = {
1350
1315
  name: "countDistinct",
1351
1316
  init: () => ({ values: /* @__PURE__ */ new Set(), dates: /* @__PURE__ */ new Set() }),
1352
1317
  add: (n, e) => (e instanceof Date ? n.dates.add(e.getTime()) : e != null && n.values.add(e), n),
1353
1318
  merge: (n, e) => (e.values.forEach((t) => n.values.add(t)), e.dates.forEach((t) => n.dates.add(t)), n),
1354
1319
  result: (n) => n.values.size + n.dates.size
1355
- }, jn = {
1320
+ }, Hn = {
1356
1321
  name: "first",
1357
1322
  init: () => ({ has: !1, value: void 0 }),
1358
1323
  add: (n, e) => (n.has || (n.has = !0, n.value = e), n),
1359
1324
  merge: (n, e) => (!n.has && e.has && (n.has = !0, n.value = e.value), n),
1360
1325
  result: (n) => n.value
1361
- }, Xn = {
1326
+ }, Wn = {
1362
1327
  name: "last",
1363
1328
  init: () => ({ has: !1, value: void 0 }),
1364
1329
  add: (n, e) => (n.has = !0, n.value = e, n),
1365
1330
  merge: (n, e) => (e.has && (n.has = !0, n.value = e.value), n),
1366
1331
  result: (n) => n.value
1367
1332
  }, _e = Object.freeze({
1368
- sum: Gn,
1369
- count: Un,
1370
- avg: Kn,
1371
- min: Xo("min", (n, e) => n < e),
1372
- max: Xo("max", (n, e) => n > e),
1373
- countDistinct: zn,
1374
- first: jn,
1375
- last: Xn
1333
+ sum: Pn,
1334
+ count: _n,
1335
+ avg: Bn,
1336
+ min: jo("min", (n, e) => n < e),
1337
+ max: jo("max", (n, e) => n > e),
1338
+ countDistinct: $n,
1339
+ first: Hn,
1340
+ last: Wn
1376
1341
  });
1377
- function xo(n) {
1342
+ function So(n) {
1378
1343
  if (typeof n != "string")
1379
1344
  return n;
1380
1345
  const e = _e[n];
@@ -1396,7 +1361,7 @@ function Es(n) {
1396
1361
  };
1397
1362
  }
1398
1363
  function Wt(n, e) {
1399
- const t = typeof e == "string" || !("aggregator" in e) ? { aggregator: e } : e, s = xo(t.aggregator), o = t.value ?? n;
1364
+ const t = typeof e == "string" || !("aggregator" in e) ? { aggregator: e } : e, s = So(t.aggregator), o = t.value ?? n;
1400
1365
  return {
1401
1366
  key: n,
1402
1367
  aggregator: s,
@@ -1416,7 +1381,7 @@ function Ms(n, e) {
1416
1381
  }
1417
1382
  return t;
1418
1383
  }
1419
- function Yn(n, e) {
1384
+ function Gn(n, e) {
1420
1385
  const t = e.map((o) => o.aggregator.init()), s = e.length;
1421
1386
  for (let o = 0; o < n; o++)
1422
1387
  for (let i = 0; i < s; i++) {
@@ -1433,22 +1398,22 @@ function Ih(n, e) {
1433
1398
  const t = Object.keys(e).map((i) => Wt(i, e[i])), s = Ms(n, t), o = {};
1434
1399
  return t.forEach((i, r) => o[i.key] = i.aggregator.result(s[r])), o;
1435
1400
  }
1436
- const Jn = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
1401
+ const Un = new Intl.NumberFormat("en-US", { maximumFractionDigits: 2 });
1437
1402
  function Gt(n) {
1438
- return n == null ? "" : typeof n == "number" ? Number.isFinite(n) ? Jn.format(n) : String(n) : n instanceof Date ? Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString("en-US") : String(n);
1403
+ return n == null ? "" : typeof n == "number" ? Number.isFinite(n) ? Un.format(n) : String(n) : n instanceof Date ? Number.isNaN(n.getTime()) ? "" : n.toLocaleDateString("en-US") : String(n);
1439
1404
  }
1440
- const qn = /* @__PURE__ */ new Set([
1405
+ const Kn = /* @__PURE__ */ new Set([
1441
1406
  "percentOfColumnTotal",
1442
1407
  "percentOfGrandTotal",
1443
1408
  "percentOfParentTotal",
1444
1409
  "percentOfRowTotal"
1445
- ]), Yo = /* @__PURE__ */ new Map(), Zn = new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 });
1410
+ ]), Xo = /* @__PURE__ */ new Map(), zn = new Intl.NumberFormat("en-US", { maximumFractionDigits: 0 });
1446
1411
  function Ut(n) {
1447
1412
  if (!n) return;
1448
1413
  const e = typeof n == "string" ? { mode: n } : n;
1449
- return Qn.includes(e.mode) ? e : void 0;
1414
+ return jn.includes(e.mode) ? e : void 0;
1450
1415
  }
1451
- const Qn = Object.freeze([
1416
+ const jn = Object.freeze([
1452
1417
  "percentOfColumnTotal",
1453
1418
  "percentOfGrandTotal",
1454
1419
  "percentOfParentTotal",
@@ -1457,48 +1422,48 @@ const Qn = Object.freeze([
1457
1422
  "runningTotal",
1458
1423
  "rank"
1459
1424
  ]);
1460
- function cr(n) {
1461
- return !!n && qn.has(n);
1425
+ function ar(n) {
1426
+ return !!n && Kn.has(n);
1462
1427
  }
1463
- function vo(n, e) {
1428
+ function xo(n, e) {
1464
1429
  const t = Ut(e);
1465
1430
  if (typeof n != "number" || Number.isNaN(n) || !t)
1466
1431
  return n == null ? "" : `${n}`;
1467
1432
  if (t.format)
1468
1433
  return `${t.format(n) ?? ""}`;
1469
- if (cr(t.mode)) {
1470
- const s = Jo(t.fractionDigits ?? 1);
1471
- let o = Yo.get(s);
1472
- return o || (o = new Intl.NumberFormat("en-US", { style: "percent", minimumFractionDigits: s, maximumFractionDigits: s }), Yo.set(s, o)), o.format(n);
1434
+ if (ar(t.mode)) {
1435
+ const s = Yo(t.fractionDigits ?? 1);
1436
+ let o = Xo.get(s);
1437
+ return o || (o = new Intl.NumberFormat("en-US", { style: "percent", minimumFractionDigits: s, maximumFractionDigits: s }), Xo.set(s, o)), o.format(n);
1473
1438
  }
1474
1439
  if (t.mode === "rank")
1475
- return Zn.format(n);
1440
+ return zn.format(n);
1476
1441
  if (t.fractionDigits !== void 0) {
1477
- const s = Jo(t.fractionDigits);
1442
+ const s = Yo(t.fractionDigits);
1478
1443
  return new Intl.NumberFormat("en-US", { minimumFractionDigits: s, maximumFractionDigits: s }).format(n);
1479
1444
  }
1480
1445
  return Gt(n);
1481
1446
  }
1482
- function Jo(n) {
1447
+ function Yo(n) {
1483
1448
  return Math.min(10, Math.max(0, Math.trunc(Number(n) || 0)));
1484
1449
  }
1485
1450
  function st(n) {
1486
1451
  return typeof n == "number" && !Number.isNaN(n);
1487
1452
  }
1488
- function Ro(n) {
1453
+ function vo(n) {
1489
1454
  const e = _e.sum;
1490
1455
  let t = e.init();
1491
1456
  for (let s = 0; s < n.length; s++) t = e.add(t, n[s]);
1492
1457
  return e.result(t) ?? 0;
1493
1458
  }
1494
- function hr(n, e) {
1459
+ function cr(n, e) {
1495
1460
  const t = n.length, s = new Array(t);
1496
1461
  switch (e) {
1497
1462
  case "percentOfColumnTotal":
1498
1463
  case "percentOfGrandTotal":
1499
1464
  case "percentOfParentTotal": {
1500
- const o = Ro(n);
1501
- for (let i = 0; i < t; i++) s[i] = el(n[i], o);
1465
+ const o = vo(n);
1466
+ for (let i = 0; i < t; i++) s[i] = Xn(n[i], o);
1502
1467
  return s;
1503
1468
  }
1504
1469
  case "runningTotal": {
@@ -1530,7 +1495,7 @@ function hr(n, e) {
1530
1495
  return s;
1531
1496
  }
1532
1497
  }
1533
- function el(n, e) {
1498
+ function Xn(n, e) {
1534
1499
  return st(n) && e !== 0 ? n / e : void 0;
1535
1500
  }
1536
1501
  class I {
@@ -1550,7 +1515,7 @@ class I {
1550
1515
  function w(n) {
1551
1516
  return !!n && typeof n == "object" && n.type === "FormulaError";
1552
1517
  }
1553
- class tl {
1518
+ class Yn {
1554
1519
  constructor(e) {
1555
1520
  this.owner = e, this.defsLength = -1, this.computing = /* @__PURE__ */ new Map(), this.contexts = /* @__PURE__ */ new Map(), this.aggregates = /* @__PURE__ */ new Map(), this.aggSignal = void 0, this.aggLength = -1;
1556
1521
  }
@@ -1595,7 +1560,7 @@ class tl {
1595
1560
  return new I("#CIRC!", `Circular reference: the column "${e}" uses its own aggregate`);
1596
1561
  const s = this.owner.getAggregationSource();
1597
1562
  (s.signal !== this.aggSignal || s.length !== this.aggLength) && (this.aggregates.clear(), this.aggSignal = s.signal, this.aggLength = s.length);
1598
- const o = xo(t), i = `${o.name}\0${e}`;
1563
+ const o = So(t), i = `${o.name}\0${e}`;
1599
1564
  if (this.aggregates.has(i))
1600
1565
  return this.aggregates.get(i);
1601
1566
  const r = s.rows();
@@ -1718,8 +1683,34 @@ class Ts {
1718
1683
  getMaxRowspan() {
1719
1684
  return 31;
1720
1685
  }
1686
+ /**
1687
+ * The top of a row in px from the first row of this area.
1688
+ *
1689
+ * With a constant row height (`getConstantRowHeight()` of the subclass – the built-in models return their
1690
+ * `defaultRowHeight` as long as `getRowHeight()` is not overridden) it is `rowIndex × height` (O(1)); otherwise the
1691
+ * sum of `getRowHeight()` of all rows above (O(n), always up to date). Before 1.1.107 it was
1692
+ * `defaultRowHeight × rowIndex` also when a subclass overrode `getRowHeight()`, and for `defaultRowHeight -1` a cache
1693
+ * from `init()` that missed rows added later. The table itself positions the body rows with its own row layout.
1694
+ *
1695
+ * @param {number} rowIndex - the index of the row
1696
+ * @returns {number} px from the top of the first row
1697
+ *
1698
+ * @example
1699
+ * // a subclass with taller even rows: the positions follow the overridden getRowHeight()
1700
+ * class Striped extends AreaModelObjectArray<any> {
1701
+ * override getRowHeight(rowIndex: number): number { return rowIndex % 2 ? 20 : 40; }
1702
+ * }
1703
+ * const y = new Striped("body", rows, 34, columnDefs).getYPosByRowIndex(3); // 40 + 20 + 40 = 100
1704
+ */
1721
1705
  getYPosByRowIndex(e) {
1722
- return this.defaultRowHeight > 0 ? this.defaultRowHeight * e : this.yPositions[e];
1706
+ var o;
1707
+ const t = (o = this.getConstantRowHeight) == null ? void 0 : o.call(this);
1708
+ if (t !== void 0 && t > 0)
1709
+ return t * e;
1710
+ let s = 0;
1711
+ for (let i = 0; i < e; i++)
1712
+ s += this.getRowHeight(i);
1713
+ return s;
1723
1714
  }
1724
1715
  init() {
1725
1716
  !this.yPositions.length && this.getRowCount() !== void 0 && this.defaultRowHeight === -1 && this.calcYPositions();
@@ -1735,7 +1726,7 @@ class Ts {
1735
1726
  isEditable(e, t) {
1736
1727
  var o, i;
1737
1728
  const s = (o = this.columnDefs) == null ? void 0 : o[t];
1738
- return this.areaIdent === "body" && (s != null && s.valueGetter) && !s.valueSetter ? !1 : this.defaultEditable && this.areaIdent === "body" && s && nr(s) ? !we(s) && !O(s) && !dt(s) : ((i = s == null ? void 0 : s.editable) == null ? void 0 : i.call(s)) ?? !1;
1729
+ return this.areaIdent === "body" && (s != null && s.valueGetter) && !s.valueSetter ? !1 : this.defaultEditable && this.areaIdent === "body" && s && rr(s) ? !we(s) && !O(s) && !dt(s) : ((i = s == null ? void 0 : s.editable) == null ? void 0 : i.call(s)) ?? !1;
1739
1730
  }
1740
1731
  setValue(e, t, s) {
1741
1732
  var a;
@@ -1830,7 +1821,7 @@ class Ts {
1830
1821
  }
1831
1822
  /** The resolver of calculated values of this model (created on first use). @internal */
1832
1823
  getColumnValues() {
1833
- return this.columnValuesInstance ?? (this.columnValuesInstance = new tl({
1824
+ return this.columnValuesInstance ?? (this.columnValuesInstance = new Yn({
1834
1825
  // calculated columns and „Show values as“ apply to the body only (header and footer show their own data)
1835
1826
  getColumnDefsForValues: () => this.areaIdent === "body" ? this.columnDefs : [],
1836
1827
  readPath: (e, t) => {
@@ -1873,7 +1864,7 @@ class Ts {
1873
1864
  if (e === void 0) return;
1874
1865
  const s = this.getColumnValues(), o = s.getShowValuesAs(e), i = s.isCalculated(e);
1875
1866
  if (i && w(t)) return t.code;
1876
- if (o) return vo(t, o);
1867
+ if (o) return xo(t, o);
1877
1868
  if (i) return t == null ? "" : `${t}`;
1878
1869
  }
1879
1870
  /** The renderer of a „Show values as“ column without an own renderer: the text of `getTextValueAt`. */
@@ -1886,7 +1877,7 @@ class Ts {
1886
1877
  return t !== void 0 && this.getColumnValues().isCalculated(t) && w(s()) ? [...e, "ge-table-cell-error"] : e;
1887
1878
  }
1888
1879
  }
1889
- class Ao {
1880
+ class Ro {
1890
1881
  genericSortComparator(e, t, s) {
1891
1882
  if (typeof e == "number" && typeof t == "number")
1892
1883
  return s * (e - t);
@@ -1905,9 +1896,9 @@ class Ao {
1905
1896
  }
1906
1897
  }
1907
1898
  function ut(n, e) {
1908
- return sl(n, e) ? n : Array.from(new Set(n)).filter((t) => Number.isInteger(t) && t >= 0 && t < e).sort((t, s) => t - s);
1899
+ return Jn(n, e) ? n : Array.from(new Set(n)).filter((t) => Number.isInteger(t) && t >= 0 && t < e).sort((t, s) => t - s);
1909
1900
  }
1910
- function sl(n, e) {
1901
+ function Jn(n, e) {
1911
1902
  let t = -1;
1912
1903
  for (const s of n) {
1913
1904
  if (!Number.isInteger(s) || s <= t || s >= e) return !1;
@@ -1915,16 +1906,16 @@ function sl(n, e) {
1915
1906
  }
1916
1907
  return !0;
1917
1908
  }
1918
- function dr(n) {
1909
+ function hr(n) {
1919
1910
  return n.position === "before" ? n.rowIndex : n.rowIndex + 1;
1920
1911
  }
1921
- function qo(n, e) {
1912
+ function Jo(n, e) {
1922
1913
  if (!n.length)
1923
1914
  return -1;
1924
- const t = dr(e);
1915
+ const t = hr(e);
1925
1916
  return t - n.filter((s) => s < t).length;
1926
1917
  }
1927
- function ol(n, e, t) {
1918
+ function qn(n, e, t) {
1928
1919
  const s = ut(e, n.length);
1929
1920
  if (!s.length)
1930
1921
  return -1;
@@ -1942,7 +1933,7 @@ function ol(n, e, t) {
1942
1933
  for (let h = a; h < l.length; h++) n[c++] = l[h];
1943
1934
  return a;
1944
1935
  }
1945
- function ur(n) {
1936
+ function dr(n) {
1946
1937
  const e = new Set(n);
1947
1938
  return n.filter((t) => {
1948
1939
  for (let s = t.parent; s; s = s.parent)
@@ -1950,7 +1941,7 @@ function ur(n) {
1950
1941
  return !0;
1951
1942
  });
1952
1943
  }
1953
- function fr(n, e) {
1944
+ function ur(n, e) {
1954
1945
  if (!e || !n.length)
1955
1946
  return !1;
1956
1947
  const t = new Set(n);
@@ -1958,9 +1949,9 @@ function fr(n, e) {
1958
1949
  if (t.has(s)) return !1;
1959
1950
  return !0;
1960
1951
  }
1961
- function il(n, e, t, s) {
1962
- const o = ur(e);
1963
- if (!fr(o, t))
1952
+ function Zn(n, e, t, s) {
1953
+ const o = dr(e);
1954
+ if (!ur(o, t))
1964
1955
  return !1;
1965
1956
  for (const a of o) {
1966
1957
  const c = a.parent ? a.parent.children : n, h = (c == null ? void 0 : c.indexOf(a)) ?? -1;
@@ -1969,21 +1960,21 @@ function il(n, e, t, s) {
1969
1960
  let i, r, l;
1970
1961
  s === "inside" ? (i = t, t.children = t.children ?? [], r = t.children, l = r.length, t.expanded = !0) : (i = t.parent, r = i ? i.children ?? (i.children = []) : n, l = r.indexOf(t) + (s === "after" ? 1 : 0)), r.splice(l, 0, ...o);
1971
1962
  for (const a of o)
1972
- a.parent = i, gr(a, i ? i.deep + 1 : 0);
1963
+ a.parent = i, fr(a, i ? i.deep + 1 : 0);
1973
1964
  return !0;
1974
1965
  }
1975
- function gr(n, e) {
1966
+ function fr(n, e) {
1976
1967
  n.deep = e;
1977
1968
  for (const t of n.children ?? [])
1978
- gr(t, e + 1);
1969
+ fr(t, e + 1);
1979
1970
  }
1980
- function Eo(n, e, t, s) {
1971
+ function Ao(n, e, t, s) {
1981
1972
  return n === e && s.position !== "inside" && Number.isInteger(s.rowIndex) && s.rowIndex >= 0 && s.rowIndex < n && ut(t, n).length > 0;
1982
1973
  }
1983
- function pr(n, e, t, s) {
1984
- if (!Eo(n.length, e.length, t, s))
1974
+ function gr(n, e, t, s) {
1975
+ if (!Ao(n.length, e.length, t, s))
1985
1976
  return !1;
1986
- if (ol(n, ut(t, n.length), dr(s)), e !== n)
1977
+ if (qn(n, ut(t, n.length), hr(s)), e !== n)
1987
1978
  for (let o = 0; o < n.length; o++)
1988
1979
  e[o] = n[o];
1989
1980
  return !0;
@@ -2031,7 +2022,7 @@ class j extends Ts {
2031
2022
  * );
2032
2023
  */
2033
2024
  constructor(e, t, s, o = [], i = "ge-selected-row", r = "ge-focused-row") {
2034
- super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.selectedRowClass = i, this.focusedRowClass = r, this.sorterService = new Ao(), this.showValuesCache = /* @__PURE__ */ new Map(), this._focusedRowIndex = 0, this.filteredRows = [...t], this.properties = o.map((l) => l.property);
2025
+ super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.selectedRowClass = i, this.focusedRowClass = r, this.sorterService = new Ro(), this.showValuesCache = /* @__PURE__ */ new Map(), this._focusedRowIndex = 0, this.filteredRows = [...t], this.properties = o.map((l) => l.property);
2035
2026
  }
2036
2027
  /**
2037
2028
  * Gets the index of the currently focused row.
@@ -2132,7 +2123,7 @@ class j extends Ts {
2132
2123
  * @since 1.1.95
2133
2124
  */
2134
2125
  canMoveRows(e, t) {
2135
- return Eo(this.filteredRows.length, this.rows.length, e, t);
2126
+ return Ao(this.filteredRows.length, this.rows.length, e, t);
2136
2127
  }
2137
2128
  /**
2138
2129
  * Row drag: moves the rows in the display order and writes that order back to {@link getAllRows} – **in place**
@@ -2150,7 +2141,7 @@ class j extends Ts {
2150
2141
  * @since 1.1.95
2151
2142
  */
2152
2143
  moveRows(e, t) {
2153
- const s = pr(this.filteredRows, this.rows, e, t);
2144
+ const s = gr(this.filteredRows, this.rows, e, t);
2154
2145
  return s && this.invalidateDerivedValues(), s;
2155
2146
  }
2156
2147
  /**
@@ -2226,12 +2217,12 @@ class j extends Ts {
2226
2217
  case "percentOfColumnTotal":
2227
2218
  case "percentOfGrandTotal":
2228
2219
  case "percentOfParentTotal":
2229
- return i.total === void 0 && (i.total = Ro(this.filteredRows.map((r) => this.getValueByT(U(r) ? r.data : r, t)))), typeof s == "number" && !Number.isNaN(s) && i.total !== 0 ? s / i.total : void 0;
2220
+ return i.total === void 0 && (i.total = vo(this.filteredRows.map((r) => this.getValueByT(U(r) ? r.data : r, t)))), typeof s == "number" && !Number.isNaN(s) && i.total !== 0 ? s / i.total : void 0;
2230
2221
  case "percentOfRowTotal":
2231
2222
  return s;
2232
2223
  // a flat table has no row total
2233
2224
  default:
2234
- return (!i.values || i.values.length !== this.filteredRows.length) && (i.values = hr(
2225
+ return (!i.values || i.values.length !== this.filteredRows.length) && (i.values = cr(
2235
2226
  this.filteredRows.map((r) => this.getValueByT(U(r) ? r.data : r, t)),
2236
2227
  o.mode
2237
2228
  )), i.values[e];
@@ -2693,10 +2684,10 @@ const ws = class ws {
2693
2684
  }
2694
2685
  };
2695
2686
  ws.maxCells = 1e6;
2696
- let qs = ws;
2697
- function rl(n) {
2687
+ let Js = ws;
2688
+ function Qn(n) {
2698
2689
  const e = Ut(n);
2699
- if (!e || !cr(e.mode)) return;
2690
+ if (!e || !ar(e.mode)) return;
2700
2691
  const t = Math.min(10, Math.max(0, Math.trunc(Number(e.fractionDigits ?? 1) || 0)));
2701
2692
  return t ? `0.${"0".repeat(t)}%` : "0%";
2702
2693
  }
@@ -2731,7 +2722,7 @@ function Xe(n) {
2731
2722
  if (!(t < 0 || s >= re))
2732
2723
  return { row: s, col: t, absRow: e[3] === "$", absCol: e[1] === "$" };
2733
2724
  }
2734
- function nl(n) {
2725
+ function el(n) {
2735
2726
  const e = n.trim(), t = e.split(":");
2736
2727
  if (t.length === 1) {
2737
2728
  const c = Xe(e);
@@ -2772,7 +2763,7 @@ class B extends Error {
2772
2763
  return new I("#ERROR!", `${this.message} (at ${this.pos + 1})`, this.pos);
2773
2764
  }
2774
2765
  }
2775
- const ll = ["<=", ">=", "<>", "!=", "==", "+", "-", "*", "/", "^", "&", "=", "<", ">"], al = ["<=", ">=", "<>", "+", "-", "*", "/", "^", "&", "=", "<", ">", ":", "%"], cl = /^#(REF!|N\/A|DIV\/0!|VALUE!|NAME\?|NUM!|NULL!|CIRC!|ERROR!)/i, hl = { n: `
2766
+ const tl = ["<=", ">=", "<>", "!=", "==", "+", "-", "*", "/", "^", "&", "=", "<", ">"], sl = ["<=", ">=", "<>", "+", "-", "*", "/", "^", "&", "=", "<", ">", ":", "%"], ol = /^#(REF!|N\/A|DIV\/0!|VALUE!|NAME\?|NUM!|NULL!|CIRC!|ERROR!)/i, il = { n: `
2776
2767
  `, t: " ", r: "\r", "\\": "\\", '"': '"', "'": "'" };
2777
2768
  function he(n) {
2778
2769
  return n >= "0" && n <= "9";
@@ -2780,12 +2771,12 @@ function he(n) {
2780
2771
  function Vt(n) {
2781
2772
  return n >= "a" && n <= "z" || n >= "A" && n <= "Z" || n === "_";
2782
2773
  }
2783
- function mr(n) {
2774
+ function pr(n) {
2784
2775
  return Vt(n) || he(n) || n === ".";
2785
2776
  }
2786
- function dl(n, e = !1) {
2777
+ function rl(n, e = !1) {
2787
2778
  if (e)
2788
- return ul(n);
2779
+ return nl(n);
2789
2780
  const t = [], s = n.length;
2790
2781
  let o = 0;
2791
2782
  for (; o < s; ) {
@@ -2819,7 +2810,7 @@ function dl(n, e = !1) {
2819
2810
  if (h === "\\") {
2820
2811
  const d = n[o + 1];
2821
2812
  if (d === void 0) break;
2822
- a += hl[d] ?? d, o += 2;
2813
+ a += il[d] ?? d, o += 2;
2823
2814
  continue;
2824
2815
  }
2825
2816
  if (h === i) {
@@ -2858,7 +2849,7 @@ function dl(n, e = !1) {
2858
2849
  continue;
2859
2850
  }
2860
2851
  if (Vt(i)) {
2861
- for (; o < s && mr(n[o]); ) o++;
2852
+ for (; o < s && pr(n[o]); ) o++;
2862
2853
  t.push({ kind: "ident", text: n.slice(r, o), pos: r });
2863
2854
  continue;
2864
2855
  }
@@ -2866,7 +2857,7 @@ function dl(n, e = !1) {
2866
2857
  t.push({ kind: i, text: i, pos: r }), o++;
2867
2858
  continue;
2868
2859
  }
2869
- const l = ll.find((a) => n.startsWith(a, o));
2860
+ const l = tl.find((a) => n.startsWith(a, o));
2870
2861
  if (l) {
2871
2862
  t.push({ kind: "op", text: l, pos: r }), o += l.length;
2872
2863
  continue;
@@ -2875,7 +2866,7 @@ function dl(n, e = !1) {
2875
2866
  }
2876
2867
  return t.push({ kind: "eof", text: "", pos: s }), t;
2877
2868
  }
2878
- function ul(n) {
2869
+ function nl(n) {
2879
2870
  const e = [], t = n.length;
2880
2871
  let s = 0;
2881
2872
  for (; s < t; ) {
@@ -2931,14 +2922,14 @@ function ul(n) {
2931
2922
  continue;
2932
2923
  }
2933
2924
  if (o === "#") {
2934
- const l = cl.exec(n.slice(s));
2925
+ const l = ol.exec(n.slice(s));
2935
2926
  if (!l)
2936
2927
  throw new B('Unexpected character "#"', i);
2937
2928
  e.push({ kind: "error", text: l[0].toUpperCase(), pos: i }), s += l[0].length;
2938
2929
  continue;
2939
2930
  }
2940
2931
  if (Vt(o) || o === "$") {
2941
- for (; s < t && (mr(n[s]) || n[s] === "$"); ) s++;
2932
+ for (; s < t && (pr(n[s]) || n[s] === "$"); ) s++;
2942
2933
  e.push({ kind: "ident", text: n.slice(i, s), pos: i });
2943
2934
  continue;
2944
2935
  }
@@ -2950,7 +2941,7 @@ function ul(n) {
2950
2941
  e.push({ kind: ",", text: ";", pos: i }), s++;
2951
2942
  continue;
2952
2943
  }
2953
- const r = al.find((l) => n.startsWith(l, s));
2944
+ const r = sl.find((l) => n.startsWith(l, s));
2954
2945
  if (r) {
2955
2946
  e.push({ kind: "op", text: r, pos: i }), s += r.length;
2956
2947
  continue;
@@ -2959,7 +2950,7 @@ function ul(n) {
2959
2950
  }
2960
2951
  return e.push({ kind: "eof", text: "", pos: t }), e;
2961
2952
  }
2962
- const Ls = 1e4, Zo = 64, Qo = 1e3, fl = {
2953
+ const Ls = 1e4, qo = 64, Zo = 1e3, ll = {
2963
2954
  "=": { bp: 10, op: "=" },
2964
2955
  "==": { bp: 10, op: "=" },
2965
2956
  "<>": { bp: 10, op: "<>" },
@@ -2974,8 +2965,8 @@ const Ls = 1e4, Zo = 64, Qo = 1e3, fl = {
2974
2965
  "*": { bp: 40, op: "*" },
2975
2966
  "/": { bp: 40, op: "/" },
2976
2967
  "^": { bp: 60, right: !0, op: "^" }
2977
- }, gl = 50, pl = 75, ml = 70, bl = 80;
2978
- class wl {
2968
+ }, al = 50, cl = 75, hl = 70, dl = 80;
2969
+ class ul {
2979
2970
  constructor(e, t = !1) {
2980
2971
  this.tokens = e, this.references = t, this.index = 0, this.depth = 0, this.operators = 0;
2981
2972
  }
@@ -2994,8 +2985,8 @@ class wl {
2994
2985
  return this.tokens[this.index++];
2995
2986
  }
2996
2987
  enter(e) {
2997
- if (++this.depth > Zo)
2998
- throw new B(`Nested too deeply (more than ${Zo} levels)`, e);
2988
+ if (++this.depth > qo)
2989
+ throw new B(`Nested too deeply (more than ${qo} levels)`, e);
2999
2990
  }
3000
2991
  expression(e) {
3001
2992
  let t = this.prefix();
@@ -3003,19 +2994,19 @@ class wl {
3003
2994
  const s = this.peek();
3004
2995
  if (s.kind !== "op") break;
3005
2996
  if (this.references && s.text === "%") {
3006
- if (ml <= e) break;
2997
+ if (hl <= e) break;
3007
2998
  this.next(), t = { kind: "unary", op: "%", operand: t };
3008
2999
  continue;
3009
3000
  }
3010
3001
  if (this.references && s.text === ":") {
3011
- if (bl <= e) break;
3002
+ if (dl <= e) break;
3012
3003
  this.next(), t = this.range(t, s.pos);
3013
3004
  continue;
3014
3005
  }
3015
- const o = fl[s.text];
3006
+ const o = ll[s.text];
3016
3007
  if (!o || o.bp <= e) break;
3017
- if (this.next(), ++this.operators > Qo)
3018
- throw new B(`Too many operators (more than ${Qo})`, s.pos);
3008
+ if (this.next(), ++this.operators > Zo)
3009
+ throw new B(`Too many operators (more than ${Zo})`, s.pos);
3019
3010
  this.enter(s.pos);
3020
3011
  const i = this.expression(o.right && !this.references ? o.bp - 1 : o.bp);
3021
3012
  this.depth--, t = { kind: "binary", op: o.op, left: t, right: i };
@@ -3036,7 +3027,7 @@ class wl {
3036
3027
  case "op":
3037
3028
  if (e.text === "-" || e.text === "+") {
3038
3029
  this.enter(e.pos);
3039
- const t = this.expression(this.references ? pl : gl);
3030
+ const t = this.expression(this.references ? cl : al);
3040
3031
  return this.depth--, { kind: "unary", op: e.text, operand: t };
3041
3032
  }
3042
3033
  throw new B(`Unexpected "${e.text}"`, e.pos);
@@ -3145,9 +3136,9 @@ class wl {
3145
3136
  function zt(n, e = !1) {
3146
3137
  if (n.length > Ls)
3147
3138
  throw new B(`Formula too long (more than ${Ls} characters)`, Ls);
3148
- return new wl(dl(n, e), e).parse();
3139
+ return new ul(rl(n, e), e).parse();
3149
3140
  }
3150
- const yl = /^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;
3141
+ const fl = /^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i;
3151
3142
  function at(n) {
3152
3143
  return n === null || n === "";
3153
3144
  }
@@ -3175,7 +3166,7 @@ function oe(n) {
3175
3166
  if (typeof n == "boolean") return n ? 1 : 0;
3176
3167
  if (typeof n == "string") {
3177
3168
  const e = n.trim();
3178
- if (yl.test(e)) {
3169
+ if (fl.test(e)) {
3179
3170
  const t = Number(e);
3180
3171
  if (Number.isFinite(t)) return t;
3181
3172
  }
@@ -3186,7 +3177,7 @@ function oe(n) {
3186
3177
  function Ie(n) {
3187
3178
  return typeof n == "string" ? n : n === null ? "" : typeof n == "number" ? String(n) : typeof n == "boolean" ? n ? "TRUE" : "FALSE" : n;
3188
3179
  }
3189
- function Zs(n) {
3180
+ function qs(n) {
3190
3181
  if (typeof n == "boolean") return n;
3191
3182
  if (n === null || n === "") return !1;
3192
3183
  if (typeof n == "number") return n !== 0;
@@ -3199,7 +3190,7 @@ function Zs(n) {
3199
3190
  function de(n) {
3200
3191
  return Number.isFinite(n) ? n === 0 ? 0 : n : new I("#NUM!", "The result is not a finite number");
3201
3192
  }
3202
- function Cl(n, e) {
3193
+ function gl(n, e) {
3203
3194
  if (w(n)) return n;
3204
3195
  if (w(e)) return e;
3205
3196
  if (at(n) && at(e)) return 0;
@@ -3217,12 +3208,12 @@ function Cl(n, e) {
3217
3208
  const o = oe(n), i = oe(e);
3218
3209
  return o - i;
3219
3210
  }
3220
- const br = {
3211
+ const mr = {
3221
3212
  IF: { min: 2, max: 3 },
3222
3213
  IFERROR: { min: 2, max: 2 },
3223
3214
  AND: { min: 1, max: 255 },
3224
3215
  OR: { min: 1, max: 255 }
3225
- }, Sl = {
3216
+ }, pl = {
3226
3217
  SUM: "sum",
3227
3218
  AVG: "avg",
3228
3219
  AVERAGE: "avg",
@@ -3250,7 +3241,7 @@ function Fs(n) {
3250
3241
  }
3251
3242
  };
3252
3243
  }
3253
- function Mo(n, e) {
3244
+ function Eo(n, e) {
3254
3245
  const t = Math.trunc(e), s = Math.pow(10, t);
3255
3246
  if (s === 0) return 0;
3256
3247
  const o = Math.abs(n) * s;
@@ -3277,7 +3268,7 @@ const Pt = {
3277
3268
  const e = oe(n[0]);
3278
3269
  if (w(e)) return e;
3279
3270
  const t = n.length > 1 ? oe(n[1]) : 0;
3280
- return w(t) ? t : de(Mo(e, t));
3271
+ return w(t) ? t : de(Eo(e, t));
3281
3272
  }
3282
3273
  },
3283
3274
  MOD: {
@@ -3341,7 +3332,7 @@ const Pt = {
3341
3332
  min: 1,
3342
3333
  max: 1,
3343
3334
  fn: (n) => {
3344
- const e = Zs(n[0]);
3335
+ const e = qs(n[0]);
3345
3336
  return w(e) ? e : !e;
3346
3337
  }
3347
3338
  },
@@ -3397,23 +3388,23 @@ const Pt = {
3397
3388
  }
3398
3389
  };
3399
3390
  Pt.AVERAGE = Pt.AVG;
3400
- const xl = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]), vl = (n, e) => Object.prototype.hasOwnProperty.call(n, e);
3401
- function Rl(n, e, t, s = e.split(".")) {
3391
+ const ml = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]), bl = (n, e) => Object.prototype.hasOwnProperty.call(n, e);
3392
+ function wl(n, e, t, s = e.split(".")) {
3402
3393
  if (t != null && t.isCalculated(e))
3403
3394
  return ns(t.getValue(n, e), e, !0);
3404
- if (s.some((i) => xl.has(i)))
3395
+ if (s.some((i) => ml.has(i)))
3405
3396
  return new I("#NAME?", `Unknown field [${e}]`);
3406
3397
  let o = n;
3407
3398
  for (let i = 0; i < s.length; i++) {
3408
3399
  if (o == null || typeof o != "object")
3409
3400
  return null;
3410
- if (!vl(o, s[i]))
3401
+ if (!bl(o, s[i]))
3411
3402
  return i === 0 && !(t != null && t.hasColumn(e)) ? new I("#NAME?", `Unknown field [${e}]`) : null;
3412
3403
  o = o[s[i]];
3413
3404
  }
3414
3405
  return ns(o, e);
3415
3406
  }
3416
- function ei(n, e, t) {
3407
+ function Qo(n, e, t) {
3417
3408
  if (w(e)) return e;
3418
3409
  if (w(t)) return t;
3419
3410
  if (n === "&") {
@@ -3423,7 +3414,7 @@ function ei(n, e, t) {
3423
3414
  return w(r) ? r : i + r;
3424
3415
  }
3425
3416
  if (n === "=" || n === "<>" || n === "<" || n === "<=" || n === ">" || n === ">=") {
3426
- const i = Cl(e, t);
3417
+ const i = gl(e, t);
3427
3418
  if (w(i)) return i;
3428
3419
  switch (n) {
3429
3420
  case "=":
@@ -3457,10 +3448,10 @@ function ei(n, e, t) {
3457
3448
  return de(Math.pow(s, o));
3458
3449
  }
3459
3450
  }
3460
- function Al(n, e) {
3451
+ function yl(n, e) {
3461
3452
  return n == null ? null : typeof n == "number" ? Number.isNaN(n) ? new I("#NUM!", `${e} returned NaN`) : n : typeof n == "string" || typeof n == "boolean" || w(n) ? n : n instanceof Date ? ns(n, e) : new I("#VALUE!", `${e} returned no number, text or boolean`);
3462
3453
  }
3463
- function ti(n, e, t) {
3454
+ function ei(n, e, t) {
3464
3455
  const s = new Array(n.length);
3465
3456
  for (let o = 0; o < n.length; o++) {
3466
3457
  const i = n[o](e, t);
@@ -3469,7 +3460,7 @@ function ti(n, e, t) {
3469
3460
  }
3470
3461
  return s;
3471
3462
  }
3472
- class El {
3463
+ class Cl {
3473
3464
  constructor(e) {
3474
3465
  this.functions = e;
3475
3466
  }
@@ -3497,7 +3488,7 @@ class El {
3497
3488
  }
3498
3489
  case "field": {
3499
3490
  const t = e.name, s = t.split(".");
3500
- return (o, i) => Rl(o, t, i, s);
3491
+ return (o, i) => wl(o, t, i, s);
3501
3492
  }
3502
3493
  case "unary": {
3503
3494
  const t = this.node(e.operand), s = e.op === "-";
@@ -3510,8 +3501,8 @@ class El {
3510
3501
  const t = this.node(e.left), s = this.node(e.right), o = e.op;
3511
3502
  return o === "*" || o === "+" || o === "-" ? (i, r) => {
3512
3503
  const l = t(i, r), a = s(i, r);
3513
- return typeof l == "number" && typeof a == "number" ? de(o === "*" ? l * a : o === "+" ? l + a : l - a) : ei(o, l, a);
3514
- } : (i, r) => ei(o, t(i, r), s(i, r));
3504
+ return typeof l == "number" && typeof a == "number" ? de(o === "*" ? l * a : o === "+" ? l + a : l - a) : Qo(o, l, a);
3505
+ } : (i, r) => Qo(o, t(i, r), s(i, r));
3515
3506
  }
3516
3507
  case "call":
3517
3508
  return this.call(e.name, e.args);
@@ -3526,10 +3517,10 @@ class El {
3526
3517
  if (s) {
3527
3518
  const a = t.map((c) => this.node(c));
3528
3519
  return (c, h) => {
3529
- const d = ti(a, c, h);
3520
+ const d = ei(a, c, h);
3530
3521
  if (w(d)) return d;
3531
3522
  try {
3532
- return Al(s(...d), e);
3523
+ return yl(s(...d), e);
3533
3524
  } catch (u) {
3534
3525
  return new I("#VALUE!", `${e}: ${u instanceof Error ? u.message.slice(0, 200) : "failed"}`);
3535
3526
  }
@@ -3539,7 +3530,7 @@ class El {
3539
3530
  case "IF": {
3540
3531
  const [a, c, h] = t.map((d) => this.node(d));
3541
3532
  return (d, u) => {
3542
- const f = Zs(a(d, u));
3533
+ const f = qs(a(d, u));
3543
3534
  return w(f) ? f : f ? c(d, u) : h ? h(d, u) : !1;
3544
3535
  };
3545
3536
  }
@@ -3555,7 +3546,7 @@ class El {
3555
3546
  const a = e === "AND", c = t.map((h) => this.node(h));
3556
3547
  return (h, d) => {
3557
3548
  for (const u of c) {
3558
- const f = Zs(u(h, d));
3549
+ const f = qs(u(h, d));
3559
3550
  if (w(f)) return f;
3560
3551
  if (a && !f) return !1;
3561
3552
  if (!a && f) return !0;
@@ -3564,7 +3555,7 @@ class El {
3564
3555
  };
3565
3556
  }
3566
3557
  }
3567
- const o = Sl[e], i = t[0];
3558
+ const o = pl[e], i = t[0];
3568
3559
  if (o && t.length === 1 && i.kind === "field") {
3569
3560
  const a = i.name;
3570
3561
  return (c, h) => {
@@ -3583,12 +3574,12 @@ class El {
3583
3574
  }
3584
3575
  const l = t.map((a) => this.node(a));
3585
3576
  return (a, c) => {
3586
- const h = ti(l, a, c);
3577
+ const h = ei(l, a, c);
3587
3578
  return w(h) ? h : r.fn(h);
3588
3579
  };
3589
3580
  }
3590
3581
  }
3591
- const kh = Object.freeze([...Object.keys(Pt), ...Object.keys(br)].sort());
3582
+ const kh = Object.freeze([...Object.keys(Pt), ...Object.keys(mr)].sort());
3592
3583
  function St(n, e, t, s) {
3593
3584
  switch (n.kind) {
3594
3585
  case "literal":
@@ -3602,7 +3593,7 @@ function St(n, e, t, s) {
3602
3593
  return St(n.left, e, t, s) ?? St(n.right, e, t, s);
3603
3594
  case "call": {
3604
3595
  if (!e.has(n.name)) {
3605
- const o = Pt[n.name] ?? br[n.name];
3596
+ const o = Pt[n.name] ?? mr[n.name];
3606
3597
  if (!o)
3607
3598
  return new I("#NAME?", `Unknown function ${n.name}`);
3608
3599
  if (n.args.length < o.min || n.args.length > o.max) {
@@ -3621,7 +3612,7 @@ function St(n, e, t, s) {
3621
3612
  return new I("#ERROR!", "Cell references are not allowed in column formulas");
3622
3613
  }
3623
3614
  }
3624
- function wr(n, e) {
3615
+ function br(n, e) {
3625
3616
  let t = "";
3626
3617
  const s = /* @__PURE__ */ new Map();
3627
3618
  for (const c of Object.keys((e == null ? void 0 : e.functions) ?? {})) {
@@ -3634,7 +3625,7 @@ function wr(n, e) {
3634
3625
  try {
3635
3626
  t = typeof n == "string" ? n : String(n ?? "");
3636
3627
  const c = t.replace(/^\s+/, "");
3637
- o = zt(c.startsWith("=") && !c.startsWith("==") ? c.slice(1) : t), i = St(o, s, r, l), i || (a = new El(s).compile(o));
3628
+ o = zt(c.startsWith("=") && !c.startsWith("==") ? c.slice(1) : t), i = St(o, s, r, l), i || (a = new Cl(s).compile(o));
3638
3629
  } catch (c) {
3639
3630
  i = c instanceof B ? c.toFormulaError() : new I("#ERROR!", "Invalid formula");
3640
3631
  }
@@ -3647,11 +3638,11 @@ function wr(n, e) {
3647
3638
  evaluate: (c, h) => a ? a(c, h) : i
3648
3639
  });
3649
3640
  }
3650
- function yr(n, e) {
3651
- const t = typeof n == "string" ? wr(n, e) : n;
3641
+ function wr(n, e) {
3642
+ const t = typeof n == "string" ? br(n, e) : n;
3652
3643
  return (s, o) => t.evaluate(s, o);
3653
3644
  }
3654
- const Ml = {
3645
+ const Sl = {
3655
3646
  "=": 10,
3656
3647
  "<>": 10,
3657
3648
  "<": 10,
@@ -3668,13 +3659,13 @@ const Ml = {
3668
3659
  function Os(n) {
3669
3660
  return n.row < 0 ? `${n.absCol ? "$" : ""}${Be(n.col)}` : n.col < 0 ? `${n.absRow ? "$" : ""}${n.row + 1}` : n.row >= re || n.col >= q ? "#REF!" : `${n.absCol ? "$" : ""}${Be(n.col)}${n.absRow ? "$" : ""}${n.row + 1}`;
3670
3661
  }
3671
- function Tl(n) {
3662
+ function xl(n) {
3672
3663
  return String(n);
3673
3664
  }
3674
3665
  function ot(n, e) {
3675
3666
  switch (n.kind) {
3676
3667
  case "literal":
3677
- return n.value === null ? "" : typeof n.value == "string" ? `"${n.value.replace(/"/g, '""')}"` : typeof n.value == "boolean" ? n.value ? "TRUE" : "FALSE" : Tl(n.value);
3668
+ return n.value === null ? "" : typeof n.value == "string" ? `"${n.value.replace(/"/g, '""')}"` : typeof n.value == "boolean" ? n.value ? "TRUE" : "FALSE" : xl(n.value);
3678
3669
  case "field":
3679
3670
  return `[${n.name}]`;
3680
3671
  case "ref":
@@ -3693,7 +3684,7 @@ function ot(n, e) {
3693
3684
  return `${n.op}${t}`;
3694
3685
  }
3695
3686
  case "binary": {
3696
- const t = Ml[n.op], s = `${ot(n.left, t)}${n.op}${ot(n.right, t + 1)}`;
3687
+ const t = Sl[n.op], s = `${ot(n.left, t)}${n.op}${ot(n.right, t + 1)}`;
3697
3688
  return t < e ? `(${s})` : s;
3698
3689
  }
3699
3690
  }
@@ -3701,8 +3692,8 @@ function ot(n, e) {
3701
3692
  function es(n) {
3702
3693
  return ot(n, 0);
3703
3694
  }
3704
- const Il = /* @__PURE__ */ new Set(["XLOOKUP", "IFS", "SWITCH", "TEXTJOIN", "CONCAT", "IFNA", "XOR"]);
3705
- function Dl(n, e) {
3695
+ const vl = /* @__PURE__ */ new Set(["XLOOKUP", "IFS", "SWITCH", "TEXTJOIN", "CONCAT", "IFNA", "XOR"]);
3696
+ function Rl(n, e) {
3706
3697
  let t;
3707
3698
  try {
3708
3699
  t = zt(n.slice(1), !0);
@@ -3729,7 +3720,7 @@ function Dl(n, e) {
3729
3720
  case "binary":
3730
3721
  return { ...l, left: i(l.left), right: i(l.right) };
3731
3722
  case "call":
3732
- return { ...l, name: Il.has(l.name) ? `_xlfn.${l.name}` : l.name, args: l.args.map(i) };
3723
+ return { ...l, name: vl.has(l.name) ? `_xlfn.${l.name}` : l.name, args: l.args.map(i) };
3733
3724
  default:
3734
3725
  return l;
3735
3726
  }
@@ -3765,7 +3756,7 @@ class ee extends Ts {
3765
3756
  * @since 1.1.95
3766
3757
  */
3767
3758
  canMoveRows(e, t) {
3768
- return Eo(this.filteredArr.length, this.arr.length, e, t);
3759
+ return Ao(this.filteredArr.length, this.arr.length, e, t);
3769
3760
  }
3770
3761
  /**
3771
3762
  * Row drag: moves the rows – in place in the displayed rows and in {@link arr}.
@@ -3781,7 +3772,7 @@ class ee extends Ts {
3781
3772
  * @since 1.1.95
3782
3773
  */
3783
3774
  moveRows(e, t) {
3784
- return pr(this.filteredArr, this.arr, e, t);
3775
+ return gr(this.filteredArr, this.arr, e, t);
3785
3776
  }
3786
3777
  getValueAt(e, t) {
3787
3778
  const s = this.filteredArr[e], o = s[t];
@@ -3840,13 +3831,13 @@ class _t {
3840
3831
  }
3841
3832
  /** @returns {Date} the date (local time) */
3842
3833
  toDate() {
3843
- return xr(this.serial);
3834
+ return Sr(this.serial);
3844
3835
  }
3845
3836
  }
3846
3837
  function G(n) {
3847
3838
  return !!n && typeof n == "object" && n.type === "SheetDate" && typeof n.serial == "number";
3848
3839
  }
3849
- const Cr = 864e5, Sr = Date.UTC(1899, 11, 30);
3840
+ const yr = 864e5, Cr = Date.UTC(1899, 11, 30);
3850
3841
  function jt(n) {
3851
3842
  const e = n.getTime();
3852
3843
  if (Number.isNaN(e))
@@ -3859,11 +3850,11 @@ function jt(n) {
3859
3850
  n.getMinutes(),
3860
3851
  n.getSeconds(),
3861
3852
  n.getMilliseconds()
3862
- ) - Sr) / Cr;
3853
+ ) - Cr) / yr;
3863
3854
  return s < 61 && (s -= 1), s;
3864
3855
  }
3865
- function xr(n) {
3866
- const e = n < 60 ? n + 1 : n >= 60 && n < 61 ? 61 + (n - 60) : n, t = new Date(Sr + Math.round(e * Cr));
3856
+ function Sr(n) {
3857
+ const e = n < 60 ? n + 1 : n >= 60 && n < 61 ? 61 + (n - 60) : n, t = new Date(Cr + Math.round(e * yr));
3867
3858
  return new Date(
3868
3859
  t.getUTCFullYear(),
3869
3860
  t.getUTCMonth(),
@@ -3880,7 +3871,7 @@ function Tt(n, e, t) {
3880
3871
  function Ke(n) {
3881
3872
  if (Math.floor(n) === 60)
3882
3873
  return { y: 1900, m: 2, d: 29 };
3883
- const e = xr(Math.floor(n));
3874
+ const e = Sr(Math.floor(n));
3884
3875
  return { y: e.getFullYear(), m: e.getMonth() + 1, d: e.getDate() };
3885
3876
  }
3886
3877
  class ct {
@@ -3923,15 +3914,15 @@ function me(n) {
3923
3914
  function W(n) {
3924
3915
  return Number.isFinite(n) ? me(n) : new I("#NUM!", "The result is not a finite number");
3925
3916
  }
3926
- const si = /^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i, kl = /^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?$/;
3917
+ const ti = /^[+-]?(\d+\.?\d*|\.\d+)(e[+-]?\d+)?$/i, Al = /^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?$/;
3927
3918
  function ft(n) {
3928
- const e = kl.exec(n);
3919
+ const e = Al.exec(n);
3929
3920
  if (!e) return;
3930
3921
  const t = new Date(+e[1], +e[2] - 1, +e[3], +(e[4] ?? 0), +(e[5] ?? 0), +(e[6] ?? 0));
3931
3922
  if (t.getMonth() === +e[2] - 1)
3932
3923
  return jt(t);
3933
3924
  }
3934
- function vr(n) {
3925
+ function xr(n) {
3935
3926
  if (n == null) return null;
3936
3927
  switch (typeof n) {
3937
3928
  case "number":
@@ -3961,11 +3952,11 @@ function K(n, e) {
3961
3952
  if (G(t)) return t.serial;
3962
3953
  if (typeof t == "string") {
3963
3954
  const s = t.trim();
3964
- if (si.test(s)) {
3955
+ if (ti.test(s)) {
3965
3956
  const o = Number(s);
3966
3957
  if (Number.isFinite(o)) return o;
3967
3958
  }
3968
- if (s.endsWith("%") && si.test(s.slice(0, -1).trim()))
3959
+ if (s.endsWith("%") && ti.test(s.slice(0, -1).trim()))
3969
3960
  return Number(s.slice(0, -1).trim()) / 100;
3970
3961
  if (e.isoDatesAsDates) {
3971
3962
  const o = ft(s);
@@ -3975,13 +3966,13 @@ function K(n, e) {
3975
3966
  }
3976
3967
  return t;
3977
3968
  }
3978
- function oi(n) {
3969
+ function si(n) {
3979
3970
  const e = me(n), t = Math.abs(e);
3980
3971
  return t !== 0 && (t >= 1e15 || t < 1e-9) ? e.toExponential().replace("e", "E") : String(e);
3981
3972
  }
3982
3973
  function ie(n) {
3983
3974
  const e = _(n);
3984
- return typeof e == "string" ? e : e === null ? "" : typeof e == "number" ? oi(e) : typeof e == "boolean" ? e ? "TRUE" : "FALSE" : G(e) ? oi(e.serial) : e;
3975
+ return typeof e == "string" ? e : e === null ? "" : typeof e == "number" ? si(e) : typeof e == "boolean" ? e ? "TRUE" : "FALSE" : G(e) ? si(e.serial) : e;
3985
3976
  }
3986
3977
  function ht(n) {
3987
3978
  const e = _(n);
@@ -3995,7 +3986,7 @@ function ht(n) {
3995
3986
  }
3996
3987
  return e;
3997
3988
  }
3998
- function ii(n) {
3989
+ function oi(n) {
3999
3990
  return typeof n == "string" ? 1 : typeof n == "boolean" ? 2 : 0;
4000
3991
  }
4001
3992
  function Xt(n, e) {
@@ -4004,7 +3995,7 @@ function Xt(n, e) {
4004
3995
  if (w(s)) return s;
4005
3996
  if (G(t) && (t = t.serial), G(s) && (s = s.serial), t === null && s === null) return 0;
4006
3997
  t === null && (t = typeof s == "string" ? "" : typeof s == "boolean" ? !1 : 0), s === null && (s = typeof t == "string" ? "" : typeof t == "boolean" ? !1 : 0);
4007
- const o = ii(t), i = ii(s);
3998
+ const o = oi(t), i = oi(s);
4008
3999
  if (o !== i) return o - i;
4009
4000
  if (typeof t == "number" && typeof s == "number") {
4010
4001
  const r = me(t) - me(s);
@@ -4016,10 +4007,10 @@ function Xt(n, e) {
4016
4007
  }
4017
4008
  return (t ? 1 : 0) - (s ? 1 : 0);
4018
4009
  }
4019
- function Qs(n) {
4010
+ function Zs(n) {
4020
4011
  return n === null || n === "";
4021
4012
  }
4022
- function ri(n) {
4013
+ function ii(n) {
4023
4014
  return G(n) ? n.toDate() : Qe(n) ? _(n) : n;
4024
4015
  }
4025
4016
  class $e extends Ts {
@@ -4321,7 +4312,7 @@ class $e extends Ts {
4321
4312
  function wt(n) {
4322
4313
  return n == null || n === "";
4323
4314
  }
4324
- class eo {
4315
+ class Qs {
4325
4316
  constructor(e = 0, t = 0, s = 0, o = 0) {
4326
4317
  this.top = e, this.right = t, this.bottom = s, this.left = o;
4327
4318
  }
@@ -4331,7 +4322,7 @@ class Pe {
4331
4322
  this.header = e, this.body = t, this.footer = s;
4332
4323
  }
4333
4324
  }
4334
- class Ll {
4325
+ class El {
4335
4326
  constructor() {
4336
4327
  this.checkedRows = [];
4337
4328
  }
@@ -4451,7 +4442,7 @@ class Bt {
4451
4442
  s.checked && t.push(s), s.children && this.addSelectedRecursive(s.children, t);
4452
4443
  }
4453
4444
  }
4454
- class Fl {
4445
+ class Ml {
4455
4446
  constructor(e) {
4456
4447
  this.bodyAreaModel = e;
4457
4448
  }
@@ -4534,28 +4525,28 @@ class T {
4534
4525
  this.value = e, this.unit = t;
4535
4526
  }
4536
4527
  }
4537
- const Yt = () => !0, Ol = () => !1, gt = /* @__PURE__ */ new WeakSet(), as = /* @__PURE__ */ new WeakMap();
4538
- function Rr(n, e) {
4539
- e ? gt.delete(n) : gt.add(n), Ar(n);
4528
+ const Yt = () => !0, Tl = () => !1, gt = /* @__PURE__ */ new WeakSet(), as = /* @__PURE__ */ new WeakMap();
4529
+ function vr(n, e) {
4530
+ e ? gt.delete(n) : gt.add(n), Rr(n);
4540
4531
  }
4541
4532
  function Ns(n, e) {
4542
- e ? as.set(n, e) : as.delete(n), Ar(n);
4533
+ e ? as.set(n, e) : as.delete(n), Rr(n);
4543
4534
  }
4544
- function to(n) {
4535
+ function eo(n) {
4545
4536
  var e;
4546
4537
  return as.has(n) ? !gt.has(n) : !gt.has(n) && ((e = n.isVisible) == null ? void 0 : e.call(n)) !== !1;
4547
4538
  }
4548
- function Ar(n) {
4539
+ function Rr(n) {
4549
4540
  const e = as.get(n), t = !gt.has(n);
4550
- e ? n.isVisible = () => !gt.has(n) && e() : n.isVisible = t ? Yt : Ol;
4541
+ e ? n.isVisible = () => !gt.has(n) && e() : n.isVisible = t ? Yt : Tl;
4551
4542
  }
4552
4543
  const ys = class ys {
4553
4544
  constructor(e, t, s, o = 0, i = 0, r = !1, l = new Pe(), a = [], c = [], h = -1, d = 0, u = 400, f = () => {
4554
4545
  }) {
4555
4546
  var p, m, b, y;
4556
- this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = s, this.fixedLeftColumnCount = o, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = l, this.columnDefs = a, this.columnSizes = c, this.overridingColumnWidth = h, this.columnCount = d, this.parentSize = u, this.getSelectionModel = f, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new eo(0, 0, 0, 0), this.xPositions = [], this.headerVisible = !0, this.footerVisible = !0, e.areaIdent = "header", t.areaIdent = "body", s.areaIdent = "footer", this.columnCount || ((p = this.columnDefs) != null && p.length ? this.columnCount = this.columnDefs.length : (m = this.columnSizes) != null && m.length && (this.columnCount = (b = this.columnSizes) == null ? void 0 : b.length));
4547
+ this.headerAreaModel = e, this.bodyAreaModel = t, this.footerAreaModel = s, this.fixedLeftColumnCount = o, this.fixedRightColumnCount = i, this.rowCheckboxVisible = r, this.defaultRowHeights = l, this.columnDefs = a, this.columnSizes = c, this.overridingColumnWidth = h, this.columnCount = d, this.parentSize = u, this.getSelectionModel = f, this.rowCount = 0, this.contentHeightInPx = 0, this.contentWidthInPx = 0, this.padding = new Qs(0, 0, 0, 0), this.xPositions = [], this.headerVisible = !0, this.footerVisible = !0, e.areaIdent = "header", t.areaIdent = "body", s.areaIdent = "footer", this.columnCount || ((p = this.columnDefs) != null && p.length ? this.columnCount = this.columnDefs.length : (m = this.columnSizes) != null && m.length && (this.columnCount = (b = this.columnSizes) == null ? void 0 : b.length));
4557
4548
  const g = (y = this.columnDefs) == null ? void 0 : y[ls(this.columnDefs)];
4558
- we(g) && !t.rowSelectionModel && (t.rowSelectionModel = new Ll()), we(g) && !e.rowSelectionModel && (e.rowSelectionModel = new Fl(t));
4549
+ we(g) && !t.rowSelectionModel && (t.rowSelectionModel = new El()), we(g) && !e.rowSelectionModel && (e.rowSelectionModel = new Ml(t));
4559
4550
  }
4560
4551
  init() {
4561
4552
  this.recalcSize(this.parentSize), this.overridingColumnWidth === -1 && this.calcXPositions(), this.headerAreaModel && this.headerAreaModel.init(), this.bodyAreaModel && this.bodyAreaModel.init(), this.footerAreaModel && this.footerAreaModel.init();
@@ -4646,7 +4637,7 @@ const ys = class ys {
4646
4637
  */
4647
4638
  recalcPadding() {
4648
4639
  const e = this.getSideAreaWidth("west"), t = this.getSideAreaWidth("east"), s = this.headerVisible ? this.getAreaHeight("header") : 0, o = this.footerVisible ? this.getAreaHeight("footer") : 0;
4649
- this.padding = new eo(
4640
+ this.padding = new Qs(
4650
4641
  s,
4651
4642
  t,
4652
4643
  o,
@@ -4697,19 +4688,37 @@ const ys = class ys {
4697
4688
  return this.getAreaModel(e);
4698
4689
  }
4699
4690
  /**
4700
- * Calculates the height of the area identified by the given area identifier.
4691
+ * Calculates the height of the area identified by the given area identifier – the height of the rows the table
4692
+ * draws (since 1.1.107 the same source as the rendering):
4693
+ *
4694
+ * 1. `getConstantRowHeight()` of the area model (> 0): row count × that height – O(1), also for millions of rows,
4695
+ * 2. otherwise the sum of `getRowHeight(i)` of all rows (variable heights; O(n), like the row layout of the body),
4696
+ * 3. only if the model has no row heights of its own (every `getRowHeight(i)` is 0): row count ×
4697
+ * `defaultRowHeights[area]`.
4698
+ *
4699
+ * Before 1.1.107 `defaultRowHeights[area]` came first: an area model with other heights got a wrong scroll height
4700
+ * (a scroll bar without overflow, a wrong thumb). The built-in area models take their row height from
4701
+ * `defaultRowHeights` anyway, so nothing changes for them.
4701
4702
  *
4702
4703
  * @param {AreaIdent} areaIdent - The identifier of the area.
4703
- * @return {number} - The height of the area.
4704
+ * @return {number} - The height of the area in px.
4705
+ *
4706
+ * @example
4707
+ * // an own body with 20 px rows: 3000 rows are 60,000 px high – also if defaultRowHeights.body is 34
4708
+ * const height = (tableModel as TableModel).getAreaHeight("body");
4704
4709
  */
4705
4710
  getAreaHeight(e) {
4711
+ var r;
4706
4712
  const t = this.getModel(e), s = t.getRowCount();
4707
- if (this.defaultRowHeights[e])
4708
- return s * this.defaultRowHeights[e];
4709
- let o = 0;
4710
- for (let i = 0; i < s; i++)
4711
- o = o + t.getRowHeight(i);
4712
- return o;
4713
+ if (!(s > 0))
4714
+ return 0;
4715
+ const o = (r = t.getConstantRowHeight) == null ? void 0 : r.call(t);
4716
+ if (o !== void 0 && o > 0)
4717
+ return s * o;
4718
+ let i = 0;
4719
+ for (let l = 0; l < s; l++)
4720
+ i = i + t.getRowHeight(l);
4721
+ return i > 0 ? i : s * (this.defaultRowHeights[e] || 0);
4713
4722
  }
4714
4723
  /**
4715
4724
  * Returns the total width of the side area identified by sideIdent.
@@ -4851,7 +4860,7 @@ const ys = class ys {
4851
4860
  const s = this.findColumnDef(e);
4852
4861
  if (!s)
4853
4862
  return !1;
4854
- Rr(s, t);
4863
+ vr(s, t);
4855
4864
  const o = s;
4856
4865
  return typeof o.visible == "boolean" && (o.visible = t), (i = this.columnDefs) != null && i.some((r) => {
4857
4866
  var l;
@@ -5078,7 +5087,7 @@ class ye {
5078
5087
  e.headerClasses,
5079
5088
  e.bodyClasses,
5080
5089
  e.footerClasses
5081
- ), o = e.sortIconVisible ?? e.sortable, i = e.editable ?? rr, r = e.isVisible ?? e.isVisible ?? Yt, l = new ye(
5090
+ ), o = e.sortIconVisible ?? e.sortable, i = e.editable ?? ir, r = e.isVisible ?? e.isVisible ?? Yt, l = new ye(
5082
5091
  e.property ?? "",
5083
5092
  e.headerLabel ?? "",
5084
5093
  e.width ?? new T(100, "px"),
@@ -5096,7 +5105,7 @@ class ye {
5096
5105
  e.editInputPipe,
5097
5106
  r
5098
5107
  );
5099
- return e.formula !== void 0 && e.formula !== null ? (l.formula = e.formula, l.valueGetter = yr(e.formula, e.formulaOptions)) : e.valueGetter && (l.valueGetter = e.valueGetter), e.valueSetter && (l.valueSetter = e.valueSetter), e.showValuesAs && (l.showValuesAs = e.showValuesAs), e.rowDrag !== void 0 && (l.rowDrag = e.rowDrag), e.validate && (l.validate = e.validate), e.editor && (l.editor = e.editor), e.emptyValue !== void 0 && (l.emptyValue = e.emptyValue), e.cellFormulas !== void 0 && (l.cellFormulas = e.cellFormulas), l;
5108
+ return e.formula !== void 0 && e.formula !== null ? (l.formula = e.formula, l.valueGetter = wr(e.formula, e.formulaOptions)) : e.valueGetter && (l.valueGetter = e.valueGetter), e.valueSetter && (l.valueSetter = e.valueSetter), e.showValuesAs && (l.showValuesAs = e.showValuesAs), e.rowDrag !== void 0 && (l.rowDrag = e.rowDrag), e.validate && (l.validate = e.validate), e.editor && (l.editor = e.editor), e.emptyValue !== void 0 && (l.emptyValue = e.emptyValue), e.cellFormulas !== void 0 && (l.cellFormulas = e.cellFormulas), l;
5100
5109
  }
5101
5110
  }
5102
5111
  class ae {
@@ -5173,7 +5182,7 @@ class ae {
5173
5182
  changeColumnOrder(e, t) {
5174
5183
  }
5175
5184
  }
5176
- class Nl {
5185
+ class Il {
5177
5186
  constructor(e) {
5178
5187
  this.columnDef = e, this.type = "RowNumberCellRenderer";
5179
5188
  }
@@ -5184,12 +5193,12 @@ class Nl {
5184
5193
  l.addClass(h, "ge-table-label"), l.setAttribute(h, "data-row-index", `${t}`), l.setAttribute(h, "data-col-index", `${s}`), l.setAttribute(h, "data-area", o), l.appendChild(h, l.createText(a)), l.appendChild(c, h), l.appendChild(e, c);
5185
5194
  }
5186
5195
  }
5187
- class ni {
5196
+ class ri {
5188
5197
  constructor() {
5189
- this.mode = "display", this.format = Vl, this.headerLabel = "#", this.exported = !1, this.minWidthInPx = 36;
5198
+ this.mode = "display", this.format = Dl, this.headerLabel = "#", this.exported = !1, this.minWidthInPx = 36;
5190
5199
  }
5191
5200
  }
5192
- function Vl(n) {
5201
+ function Dl(n) {
5193
5202
  return String(n);
5194
5203
  }
5195
5204
  class Is {
@@ -5198,7 +5207,7 @@ class Is {
5198
5207
  ["ge-table-row-number-header", "ge-table-text-align-right"],
5199
5208
  ["ge-table-row-number", "ge-table-text-align-right"],
5200
5209
  ["ge-table-row-number-footer"]
5201
- ), this.isVisible = Yt, this.options = { ...new ni(), ...e }, this.headerLabel = this.options.headerLabel, this.width = new T(this.options.minWidthInPx, "px"), this.minWidth = new T(this.options.minWidthInPx, "px"), this.rendererMap = new se(void 0, new Nl(this), void 0);
5210
+ ), this.isVisible = Yt, this.options = { ...new ri(), ...e }, this.headerLabel = this.options.headerLabel, this.width = new T(this.options.minWidthInPx, "px"), this.minWidth = new T(this.options.minWidthInPx, "px"), this.rendererMap = new se(void 0, new Il(this), void 0);
5202
5211
  }
5203
5212
  /**
5204
5213
  * The number of a body row (1-based): its position in the view (`"display"`) or in `getAllRows()` (`"original"`).
@@ -5261,7 +5270,7 @@ class Is {
5261
5270
  * const plain = new RowNumberColumnDef().hasDefaultFormat(); // true
5262
5271
  */
5263
5272
  hasDefaultFormat() {
5264
- return this.options.format === new ni().format;
5273
+ return this.options.format === new ri().format;
5265
5274
  }
5266
5275
  hasAllRows(e) {
5267
5276
  return typeof e.getAllRows == "function";
@@ -5291,7 +5300,7 @@ class Is {
5291
5300
  return this.originalIndex = { rows: e, length: e.length, index: t, missRebuilt: !1 }, this.originalIndex;
5292
5301
  }
5293
5302
  }
5294
- class Pl {
5303
+ class kl {
5295
5304
  render(e, t, s, o, i, r, l) {
5296
5305
  if (i.isEditable(t, s)) {
5297
5306
  l.addClass(e, "ge-table-row-input-div");
@@ -5300,7 +5309,7 @@ class Pl {
5300
5309
  }
5301
5310
  }
5302
5311
  }
5303
- class To {
5312
+ class Mo {
5304
5313
  constructor(e = new De(
5305
5314
  "❯",
5306
5315
  "",
@@ -5314,14 +5323,14 @@ class To {
5314
5323
  }
5315
5324
  // `⊖ `, `⊕ `;
5316
5325
  }
5317
- const Er = (n, e) => new Pl();
5326
+ const Ar = (n, e) => new kl();
5318
5327
  class qe {
5319
5328
  constructor() {
5320
5329
  this.overflowX = "auto", this.overflowY = "auto", this.horizontalBorderVisible = !0, this.verticalBorderVisible = !0, this.footerSeparatorBorderVisible = !0, this.headerSeparatorBorderVisible = !0, this.fixedEastSeparatorBorderVisible = !0, this.fixedWestSeparatorBorderVisible = !0, this.tableTopBorderVisible = !0, this.tableBottomBorderVisible = !0, this.hoverRowVisible = !0, this.hoverColumnVisible = !0, this.columnsResizable = !0, this.columnsDraggable = !0, this.columnResizeHandleWidthInPx = 4, this.defaultRowHeights = {
5321
5330
  header: 34,
5322
5331
  body: 34,
5323
5332
  footer: 34
5324
- }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new or(), this.headerGroupOptions = new To(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new ir(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = Er, this.getSelectionModel = void 0, this.getFocusModel = void 0, this.ariaLabel = void 0, this.ariaLabelledBy = void 0, this.ariaDescribedBy = void 0, this.ariaTexts = void 0, this.overlayOptions = void 0, this.rowDragOptions = void 0, this.fillHandle = void 0, this.masterDetail = void 0, this.batchEdit = void 0, this.editing = void 0, this.clipboard = void 0, this.undo = void 0, this.cellFormulas = void 0, this.spreadsheet = void 0, this.direction = void 0;
5333
+ }, this.footerVerticalSeparator = !1, this.headerToggleExpandCollapseIcons = !1, this.headerVerticalSeparator = !1, this.treeOptions = new sr(), this.headerGroupOptions = new Mo(), this.showCheckboxWihoutExtraColumn = !1, this.externalFilterFunction = void 0, this.sortedOptions = new or(), this.sortOrder = ["asc", "desc"], this.shortcutActionsDisabled = !1, this.resizeEventDebounceDelay = 500, this.getEditRenderer = Ar, this.getSelectionModel = void 0, this.getFocusModel = void 0, this.ariaLabel = void 0, this.ariaLabelledBy = void 0, this.ariaDescribedBy = void 0, this.ariaTexts = void 0, this.overlayOptions = void 0, this.rowDragOptions = void 0, this.fillHandle = void 0, this.masterDetail = void 0, this.batchEdit = void 0, this.editing = void 0, this.clipboard = void 0, this.undo = void 0, this.cellFormulas = void 0, this.spreadsheet = void 0, this.direction = void 0;
5325
5334
  }
5326
5335
  }
5327
5336
  class ke {
@@ -5548,7 +5557,7 @@ class ke {
5548
5557
  return r > o;
5549
5558
  }
5550
5559
  }
5551
- class Mr {
5560
+ class Er {
5552
5561
  constructor(e = "none") {
5553
5562
  this.selectionType = e, this.rowIndex = -1, this.columnIndex = -1, this.changed = !1, this.listenerArr = [];
5554
5563
  }
@@ -5585,7 +5594,7 @@ class Mr {
5585
5594
  return [this.rowIndex, this.columnIndex];
5586
5595
  }
5587
5596
  }
5588
- function _l(n) {
5597
+ function Ll(n) {
5589
5598
  var e, t;
5590
5599
  try {
5591
5600
  const o = new Intl.NumberFormat(n).formatToParts(12345.6);
@@ -5597,9 +5606,9 @@ function _l(n) {
5597
5606
  return { decimal: ".", group: "," };
5598
5607
  }
5599
5608
  }
5600
- const Bl = (n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
5609
+ const Fl = (n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
5601
5610
  let Vs;
5602
- function Tr(n) {
5611
+ function Mr(n) {
5603
5612
  var e;
5604
5613
  if (!Vs) {
5605
5614
  let t = [];
@@ -5612,10 +5621,10 @@ function Tr(n) {
5612
5621
  }
5613
5622
  return Vs.has(n);
5614
5623
  }
5615
- function li(n) {
5616
- return n.replace(new RegExp("^\\p{Sc}\\s*", "u"), "").replace(/^([A-Z]{3})\s+/u, (e, t) => Tr(t) ? "" : e);
5624
+ function ni(n) {
5625
+ return n.replace(new RegExp("^\\p{Sc}\\s*", "u"), "").replace(/^([A-Z]{3})\s+/u, (e, t) => Mr(t) ? "" : e);
5617
5626
  }
5618
- function Ir(n, e) {
5627
+ function Tr(n, e) {
5619
5628
  let t = n.trim().replace(/[   ]/g, " ").replace(/−/g, "-");
5620
5629
  if (!t)
5621
5630
  return;
@@ -5623,9 +5632,9 @@ function Ir(n, e) {
5623
5632
  if (/^\(.*\)$/.test(t) && (s = !0, t = t.slice(1, -1).trim(), /^[-+]/.test(t)))
5624
5633
  return;
5625
5634
  let o = !1;
5626
- t = li(t), t = t.replace(/\s*%$/u, () => (o = !0, "")), t = t.replace(new RegExp("\\s*\\p{Sc}$", "u"), "").replace(/\s+([A-Z]{3})$/u, (c, h) => Tr(h) ? "" : c), (t.startsWith("-") || t.startsWith("+")) && (s = s !== t.startsWith("-"), t = li(t.slice(1).trim()));
5627
- const { decimal: i, group: r } = _l(e), l = r.trim() === "" ? " " : r;
5628
- if (t = t.replace(new RegExp(`[${Bl(l)}](?=\\d{3}(\\D|$))`, "g"), ""), i !== ".") {
5635
+ t = ni(t), t = t.replace(/\s*%$/u, () => (o = !0, "")), t = t.replace(new RegExp("\\s*\\p{Sc}$", "u"), "").replace(/\s+([A-Z]{3})$/u, (c, h) => Mr(h) ? "" : c), (t.startsWith("-") || t.startsWith("+")) && (s = s !== t.startsWith("-"), t = ni(t.slice(1).trim()));
5636
+ const { decimal: i, group: r } = Ll(e), l = r.trim() === "" ? " " : r;
5637
+ if (t = t.replace(new RegExp(`[${Fl(l)}](?=\\d{3}(\\D|$))`, "g"), ""), i !== ".") {
5629
5638
  if (t.includes(".") && !/[eE]/.test(t))
5630
5639
  return;
5631
5640
  t = t.replace(i, ".");
@@ -5636,23 +5645,23 @@ function Ir(n, e) {
5636
5645
  return o && (a /= 100), s ? -a : a;
5637
5646
  }
5638
5647
  function Lh(n) {
5639
- return (e) => typeof e != "string" ? e : e.trim() === "" ? "" : Ir(e, n) ?? e;
5648
+ return (e) => typeof e != "string" ? e : e.trim() === "" ? "" : Tr(e, n) ?? e;
5640
5649
  }
5641
- function $l(n) {
5650
+ function Ol(n) {
5642
5651
  try {
5643
5652
  return new Intl.DateTimeFormat(n).formatToParts(new Date(2026, 10, 23)).filter((e) => e.type === "day" || e.type === "month" || e.type === "year").map((e) => e.type);
5644
5653
  } catch {
5645
5654
  return ["month", "day", "year"];
5646
5655
  }
5647
5656
  }
5648
- function Dr(n, e) {
5657
+ function Ir(n, e) {
5649
5658
  const t = n.trim(), s = /^(\d{4})-(\d{2})-(\d{2})(?:[T ](\d{2}):(\d{2})(?::(\d{2}))?)?$/.exec(t);
5650
5659
  if (s)
5651
- return ai(+s[1], +s[2], +s[3], +(s[4] ?? 0), +(s[5] ?? 0), +(s[6] ?? 0));
5660
+ return li(+s[1], +s[2], +s[3], +(s[4] ?? 0), +(s[5] ?? 0), +(s[6] ?? 0));
5652
5661
  const o = /^(\d{1,4})([./-])(\d{1,2})\2(\d{1,4})(?:,? (\d{1,2}):(\d{2})(?::(\d{2}))?)?$/.exec(t);
5653
5662
  if (!o)
5654
5663
  return;
5655
- const i = $l(e), r = [o[1], o[3], o[4]], l = {};
5664
+ const i = Ol(e), r = [o[1], o[3], o[4]], l = {};
5656
5665
  for (let c = 0; c < 3; c++) {
5657
5666
  const h = i[c], d = r[c];
5658
5667
  if (h === "year" ? d.length !== 2 && d.length !== 4 : d.length > 2)
@@ -5660,22 +5669,22 @@ function Dr(n, e) {
5660
5669
  l[h] = +d;
5661
5670
  }
5662
5671
  let a = l.year;
5663
- return a < 100 && (a += 2e3), ai(a, l.month, l.day, +(o[5] ?? 0), +(o[6] ?? 0), +(o[7] ?? 0));
5672
+ return a < 100 && (a += 2e3), li(a, l.month, l.day, +(o[5] ?? 0), +(o[6] ?? 0), +(o[7] ?? 0));
5664
5673
  }
5665
- function ai(n, e, t, s, o, i) {
5674
+ function li(n, e, t, s, o, i) {
5666
5675
  const r = new Date(n, e - 1, t, s, o, i);
5667
5676
  return r.getFullYear() === n && r.getMonth() === e - 1 && r.getDate() === t ? r : void 0;
5668
5677
  }
5669
5678
  function Fh(n) {
5670
- return (e) => typeof e != "string" ? e : e.trim() === "" ? "" : Dr(e, n) ?? e;
5679
+ return (e) => typeof e != "string" ? e : e.trim() === "" ? "" : Ir(e, n) ?? e;
5671
5680
  }
5672
- const Hl = ["true", "yes", "1", "x", "wahr", "ja"], Wl = ["false", "no", "0", "falsch", "nein"], Oh = (n) => {
5681
+ const Nl = ["true", "yes", "1", "x", "wahr", "ja"], Vl = ["false", "no", "0", "falsch", "nein"], Oh = (n) => {
5673
5682
  if (typeof n != "string")
5674
5683
  return n;
5675
5684
  const e = n.trim().toLowerCase();
5676
- return e === "" ? "" : Hl.includes(e) ? !0 : Wl.includes(e) ? !1 : n;
5685
+ return e === "" ? "" : Nl.includes(e) ? !0 : Vl.includes(e) ? !1 : n;
5677
5686
  };
5678
- function kr(n) {
5687
+ function Dr(n) {
5679
5688
  return (e) => {
5680
5689
  if (typeof e != "string" || e.startsWith("=") || e.startsWith("'="))
5681
5690
  return e;
@@ -5686,11 +5695,11 @@ function kr(n) {
5686
5695
  const s = t.toUpperCase();
5687
5696
  if (s === "TRUE") return !0;
5688
5697
  if (s === "FALSE") return !1;
5689
- const o = Ir(t, n);
5690
- return o !== void 0 ? o : Dr(t, n) ?? e;
5698
+ const o = Tr(t, n);
5699
+ return o !== void 0 ? o : Ir(t, n) ?? e;
5691
5700
  };
5692
5701
  }
5693
- class Lr extends ee {
5702
+ class kr extends ee {
5694
5703
  constructor() {
5695
5704
  super(...arguments), this.columnLetterRows = 1;
5696
5705
  }
@@ -5713,8 +5722,8 @@ class Lr extends ee {
5713
5722
  });
5714
5723
  }
5715
5724
  }
5716
- class Fr extends Ye {
5717
- constructor(e, t, s, o, i, r, l = kr()) {
5725
+ class Lr extends Ye {
5726
+ constructor(e, t, s, o, i, r, l = Dr()) {
5718
5727
  super(
5719
5728
  e,
5720
5729
  t,
@@ -5733,7 +5742,7 @@ class Fr extends Ye {
5733
5742
  * @param {number[]} [widths] - width per data column in px (missing: the default width)
5734
5743
  */
5735
5744
  setDataColumns(e, t = []) {
5736
- const s = Or(e, this.columnWidth, this.rowNumberColumn, t, this.inputPipe);
5745
+ const s = Fr(e, this.columnWidth, this.rowNumberColumn, t, this.inputPipe);
5737
5746
  this.columnDefs = s, this.columnCount = s.length, this.columnSizes = [], this.headerAreaModel.setColumns(s), this.sheetBody.setColumnDefs(s), this.init();
5738
5747
  }
5739
5748
  /** @returns {number[]} the widths of the data columns in px */
@@ -5742,7 +5751,7 @@ class Fr extends Ye {
5742
5751
  return Array.from({ length: this.getColumnCount() - e }, (t, s) => this.getColumnWidth(s + e));
5743
5752
  }
5744
5753
  }
5745
- function Or(n, e, t, s = [], o) {
5754
+ function Fr(n, e, t, s = [], o) {
5746
5755
  const i = Array.from({ length: n }, (r, l) => ye.create({
5747
5756
  editInputPipe: o,
5748
5757
  // typed "5" is the number 5 (numbers, dates, TRUE/FALSE like Excel)
@@ -5762,7 +5771,7 @@ class Nh {
5762
5771
  * @returns {{ tableModel: SpreadsheetTableModel, tableOptions: TableOptionsIf }} for the table or a wrapper
5763
5772
  */
5764
5773
  static create(e = {}) {
5765
- const t = e.data ?? [], s = Math.max(e.rowCount ?? 100, t.length), o = Math.max(e.columnCount ?? 26, t.reduce((m, b) => Math.max(m, (b == null ? void 0 : b.length) ?? 0), 0)), i = e.rowHeight ?? 30, r = e.columnWidth ?? 100, l = e.rowNumbers === !1 ? void 0 : new Is({ mode: "original" }), a = kr(e.locale), c = Or(o, r, l, [], a), h = new Lr("header", [c.map((m) => m.headerLabel)], i, c), d = new $e("body", t, s, o, i, c, l ? 1 : 0), u = new Fr(h, d, l, c, i, r, a), f = new ke("range", "multi"), g = new Mr("cell");
5774
+ const t = e.data ?? [], s = Math.max(e.rowCount ?? 100, t.length), o = Math.max(e.columnCount ?? 26, t.reduce((m, b) => Math.max(m, (b == null ? void 0 : b.length) ?? 0), 0)), i = e.rowHeight ?? 30, r = e.columnWidth ?? 100, l = e.rowNumbers === !1 ? void 0 : new Is({ mode: "original" }), a = Dr(e.locale), c = Fr(o, r, l, [], a), h = new kr("header", [c.map((m) => m.headerLabel)], i, c), d = new $e("body", t, s, o, i, c, l ? 1 : 0), u = new Lr(h, d, l, c, i, r, a), f = new ke("range", "multi"), g = new Er("cell");
5766
5775
  g.setFocus(0, l ? 1 : 0);
5767
5776
  const p = {
5768
5777
  ...new qe(),
@@ -5778,10 +5787,10 @@ class Nh {
5778
5787
  return { tableModel: u, tableOptions: p };
5779
5788
  }
5780
5789
  }
5781
- function Io(n) {
5782
- return n instanceof Fr;
5790
+ function To(n) {
5791
+ return n instanceof Lr;
5783
5792
  }
5784
- class ci {
5793
+ class ai {
5785
5794
  constructor(e = -1, t = -1) {
5786
5795
  this.rowIndex = e, this.columnIndex = t;
5787
5796
  }
@@ -5798,11 +5807,11 @@ class Ze {
5798
5807
  * @returns {GeModelChangeEvent} the event
5799
5808
  */
5800
5809
  static createForChanges(e, t) {
5801
- const s = e.filter((o) => o.rowIndex > -1).map((o) => new ci(o.rowIndex, o.columnIndex));
5810
+ const s = e.filter((o) => o.rowIndex > -1).map((o) => new ai(o.rowIndex, o.columnIndex));
5802
5811
  return new Ze(s, e, t);
5803
5812
  }
5804
5813
  static createSingle(e, t) {
5805
- return new Ze([new ci(e, t)]);
5814
+ return new Ze([new ai(e, t)]);
5806
5815
  }
5807
5816
  }
5808
5817
  class be {
@@ -5968,7 +5977,7 @@ class be {
5968
5977
  return e === 1 ? "1 column deleted" : `${e} columns deleted`;
5969
5978
  }
5970
5979
  }
5971
- const Gl = {
5980
+ const Pl = {
5972
5981
  insertRows: "Insert rows",
5973
5982
  deleteRows: "Delete rows",
5974
5983
  insertColumns: "Insert columns",
@@ -5977,14 +5986,14 @@ const Gl = {
5977
5986
  function xt(n, e, t = {}) {
5978
5987
  var m, b, y, C, S;
5979
5988
  const s = n.tableModel, o = s.getBodyModel(), i = e.kind === "insertColumns" || e.kind === "deleteColumns", r = o instanceof $e ? o : void 0, l = o instanceof j || o instanceof ee;
5980
- if (!(e.count >= 1) || !(e.at >= 0) || (i ? !r || !Io(s) : !r && !l) || n.isBatchEditActive())
5989
+ if (!(e.count >= 1) || !(e.at >= 0) || (i ? !r || !To(s) : !r && !l) || n.isBatchEditActive())
5981
5990
  return !1;
5982
- const a = i ? r.getSheetColumnCount() : r ? r.getUnfilteredRowCount() : Do(o).length, h = e.kind === "deleteRows" || e.kind === "deleteColumns" ? Math.min(e.count, a - e.at) : e.count;
5991
+ const a = i ? r.getSheetColumnCount() : r ? r.getUnfilteredRowCount() : Io(o).length, h = e.kind === "deleteRows" || e.kind === "deleteColumns" ? Math.min(e.count, a - e.at) : e.count;
5983
5992
  if (e.at > a || h < 1 || (m = n.cellEditorService) != null && m.isOpen() && !n.cellEditorService.commit("none"))
5984
5993
  return !1;
5985
5994
  const d = { ...e, count: h }, u = n.tableSheet;
5986
5995
  u == null || u.rowCount();
5987
- const f = u ? u.engine.adjustForStructureChange(d) : [], g = Ul(n, d, t.rows), p = [];
5996
+ const f = u ? u.engine.adjustForStructureChange(d) : [], g = _l(n, d, t.rows), p = [];
5988
5997
  if (u) {
5989
5998
  const E = u.rowsArray();
5990
5999
  for (const { row: x, col: R, input: F } of f) {
@@ -6006,41 +6015,41 @@ function xt(n, e, t = {}) {
6006
6015
  }
6007
6016
  u.recalculate();
6008
6017
  }
6009
- return n.refreshAfterStructureChange(i), t.record !== !1 && ((y = n.undoService) == null || y.addStep(new jl(d, g))), n.announce(zl(n, d)), (S = (C = n.getEventListener()).onModelChanged) == null || S.call(C, Ze.createForChanges(p, t.source ?? "structure")), !0;
6018
+ return n.refreshAfterStructureChange(i), t.record !== !1 && ((y = n.undoService) == null || y.addStep(new Hl(d, g))), n.announce($l(n, d)), (S = (C = n.getEventListener()).onModelChanged) == null || S.call(C, Ze.createForChanges(p, t.source ?? "structure")), !0;
6010
6019
  }
6011
- function Ul(n, e, t) {
6020
+ function _l(n, e, t) {
6012
6021
  const s = n.tableModel, o = s.getBodyModel(), { at: i, count: r } = e, l = { inputs: [] };
6013
6022
  if (o instanceof $e) {
6014
6023
  if (e.kind === "insertRows") o.insertRows(i, r);
6015
6024
  else if (e.kind === "deleteRows") l.sheetRows = o.deleteRows(i, r);
6016
- else if (Io(s)) {
6025
+ else if (To(s)) {
6017
6026
  const c = s.getDataColumnWidths();
6018
6027
  l.widths = [...c], e.kind === "insertColumns" ? (o.insertColumns(i, r), c.splice(i, 0, ...new Array(r).fill(NaN))) : (l.sheetColumns = o.deleteColumns(i, r), c.splice(i, r)), s.setDataColumns(o.getSheetColumnCount(), c.map((h) => Number.isNaN(h) ? void 0 : h));
6019
6028
  }
6020
6029
  return l;
6021
6030
  }
6022
- const a = Do(o);
6031
+ const a = Io(o);
6023
6032
  if (e.kind === "insertRows") {
6024
- const c = t ?? Array.from({ length: r }, (h, d) => Kl(n, i + d));
6033
+ const c = t ?? Array.from({ length: r }, (h, d) => Bl(n, i + d));
6025
6034
  for (let h = 0; h < c.length; h++) a.splice(i + h, 0, c[h]);
6026
6035
  l.rows = c;
6027
6036
  } else
6028
6037
  l.rows = a.splice(i, r);
6029
- return Nr(o, a), l;
6038
+ return Or(o, a), l;
6030
6039
  }
6031
- function Do(n) {
6040
+ function Io(n) {
6032
6041
  return n instanceof j ? n.getAllRows() : n.arr;
6033
6042
  }
6034
- function Nr(n, e) {
6043
+ function Or(n, e) {
6035
6044
  n instanceof j ? n.setRows(e) : n instanceof ee && (n.filteredArr = [...e]);
6036
6045
  }
6037
- function Kl(n, e) {
6046
+ function Bl(n, e) {
6038
6047
  if (n.tableModel.getBodyModel() instanceof ee)
6039
6048
  return new Array(n.tableModel.getColumnCount()).fill("");
6040
6049
  const s = n.getClipboardService().options.createRow;
6041
6050
  return s ? s(e) : {};
6042
6051
  }
6043
- function zl(n, e) {
6052
+ function $l(n, e) {
6044
6053
  const t = n.ariaTexts, s = new be();
6045
6054
  switch (e.kind) {
6046
6055
  case "insertRows":
@@ -6053,21 +6062,21 @@ function zl(n, e) {
6053
6062
  return (t.columnsDeleted ?? s.columnsDeleted).call(t, e.count);
6054
6063
  }
6055
6064
  }
6056
- class jl {
6065
+ class Hl {
6057
6066
  constructor(e, t) {
6058
6067
  var s, o;
6059
- this.edit = e, this.delta = t, this.source = "structure", this.label = Gl[e.kind], this.cellCount = e.count + t.inputs.length + (((s = t.sheetRows) == null ? void 0 : s.reduce((i, [, r]) => i + r.length, 0)) ?? 0) + (((o = t.sheetColumns) == null ? void 0 : o.reduce((i, [, r]) => i + r.length, 0)) ?? 0);
6068
+ this.edit = e, this.delta = t, this.source = "structure", this.label = Pl[e.kind], this.cellCount = e.count + t.inputs.length + (((s = t.sheetRows) == null ? void 0 : s.reduce((i, [, r]) => i + r.length, 0)) ?? 0) + (((o = t.sheetColumns) == null ? void 0 : o.reduce((i, [, r]) => i + r.length, 0)) ?? 0);
6060
6069
  }
6061
6070
  undo(e) {
6062
6071
  var a, c, h, d, u;
6063
6072
  const t = e.tableModel, s = t.getBodyModel(), { at: o, count: i, kind: r } = this.edit, l = this.delta;
6064
6073
  if (s instanceof $e)
6065
- r === "insertRows" ? s.deleteRows(o, i) : r === "deleteRows" ? s.restoreRows(o, i, l.sheetRows) : Io(t) && (r === "insertColumns" ? s.deleteColumns(o, i) : s.restoreColumns(o, i, l.sheetColumns), t.setDataColumns(s.getSheetColumnCount(), l.widths));
6074
+ r === "insertRows" ? s.deleteRows(o, i) : r === "deleteRows" ? s.restoreRows(o, i, l.sheetRows) : To(t) && (r === "insertColumns" ? s.deleteColumns(o, i) : s.restoreColumns(o, i, l.sheetColumns), t.setDataColumns(s.getSheetColumnCount(), l.widths));
6066
6075
  else {
6067
- const f = Do(s);
6076
+ const f = Io(s);
6068
6077
  if (r === "insertRows") f.splice(o, i);
6069
6078
  else for (let g = 0; g < (((a = l.rows) == null ? void 0 : a.length) ?? 0); g++) f.splice(o + g, 0, l.rows[g]);
6070
- Nr(s, f);
6079
+ Or(s, f);
6071
6080
  }
6072
6081
  for (const { row: f, col: g, old: p } of l.inputs) (c = e.tableSheet) == null || c.writeInput(f, g, p);
6073
6082
  return (h = e.tableSheet) == null || h.recalculate(), e.refreshAfterStructureChange(r === "insertColumns" || r === "deleteColumns"), (u = (d = e.getEventListener()).onModelChanged) == null || u.call(d, Ze.createForChanges([], "undo")), { applied: i, skipped: 0 };
@@ -6076,7 +6085,7 @@ class jl {
6076
6085
  return xt(e, this.edit, { record: !1, rows: this.edit.kind === "insertRows" ? this.delta.rows : void 0, source: "redo" }), { applied: this.edit.count, skipped: 0 };
6077
6086
  }
6078
6087
  }
6079
- class Xl {
6088
+ class Wl {
6080
6089
  constructor(e) {
6081
6090
  this.tableScope = e;
6082
6091
  }
@@ -6481,19 +6490,24 @@ class Xl {
6481
6490
  this.tableScope.destroy();
6482
6491
  }
6483
6492
  /**
6484
- * Performs a complete repaint of the table by triggering a hard repaint on the underlying table scope.
6493
+ * Performs a complete repaint of the table: use it when the row count or the row heights changed (rows added or
6494
+ * removed, a filter, a new model content, `ColumnDefIf.isVisible` changed yourself …). It
6495
+ * - drops cached derived values (footer totals, calculated columns),
6496
+ * - recalculates the heights and the padding of the table model and the size of the scroll content,
6497
+ * - lays out header, body and footer again and
6498
+ * - renders the visible rows – **once** (since 1.1.107; before: twice).
6485
6499
  *
6486
- * A hard repaint is more thorough than a regular repaint and performs the following operations:
6487
- * - Recalculates the height and padding of the table model
6488
- * - Resets the size of the wrapper div elements
6489
- * - Adjusts containers and rows positioning
6490
- * - Makes additional adjustments after scrolling
6500
+ * With `scrollTo` (since 1.1.107) it also sets the scroll position in that same render pass – exactly like
6501
+ * {@link scrollToPixel}, also with a capped scroll height (more than {@link EleScope.maxScrollHeightInPx} px of rows).
6502
+ * A live tail that appends rows and keeps a position needs one render per update instead of three
6503
+ * (`repaintHard()` + `scrollToPixel()`). The `scroll` event of the browser for that position renders nothing.
6504
+ * A missing axis keeps its position.
6491
6505
  *
6492
- * Use this method when regular repaint isn't sufficient, such as when:
6493
- * - Table dimensions have significantly changed
6494
- * - The structure of data has been modified (rows/columns added or removed)
6495
- * - The table layout needs complete recalculation
6496
- * - After major DOM changes affecting the table's container
6506
+ * For a repaint with the same row count (values changed) {@link repaint} is enough.
6507
+ *
6508
+ * @param {ScrollPositionIf} [scrollTo] - the position to show: `px` horizontal scroll position from the start, `py`
6509
+ * content pixels from the top of the first body row (both like {@link scrollToPixel}); without it the position stays
6510
+ * @returns {void} This method doesn't return a value
6497
6511
  *
6498
6512
  * @example
6499
6513
  * // Example 1: Basic usage
@@ -6516,10 +6530,21 @@ class Xl {
6516
6530
  * column.isVisible = FalseFn;
6517
6531
  * tableApi.repaintHard();
6518
6532
  *
6519
- * @returns {void} This method doesn't return a value
6533
+ * @example
6534
+ * // Example 5: live tail – rows were appended to the area model, the first visible row stays at the top
6535
+ * // (pixel-exact: keep your own py from the last update instead – e.g. from onScroll)
6536
+ * const rowHeight = 20; // the row height of the area model
6537
+ * const first = tableApi.getFirstVisibleRowIndex();
6538
+ * rows.push(...newData); // the row count of the model grows
6539
+ * tableApi.repaintHard({ py: first * rowHeight }); // one render pass, exact also for millions of rows
6540
+ *
6541
+ * @example
6542
+ * // Example 6: follow the end ("tail -f") – show the last row after every update
6543
+ * rows.push(...newData);
6544
+ * tableApi.repaintHard({ py: Number.MAX_SAFE_INTEGER }); // clamped to the end of the content
6520
6545
  */
6521
- repaintHard() {
6522
- this.tableScope.invalidateAggregates(), this.tableScope.repaintHard();
6546
+ repaintHard(e) {
6547
+ this.tableScope.invalidateAggregates(), this.tableScope.repaintHard(e);
6523
6548
  }
6524
6549
  /**
6525
6550
  * Recalculates the column widths of the table.
@@ -6922,7 +6947,7 @@ class Xl {
6922
6947
  for (const g of h) {
6923
6948
  const p = i.getAreaModel(g), m = g === "body" && a ? a[0] + 1 : (p == null ? void 0 : p.getRowCount()) ?? 0;
6924
6949
  for (let b = 0; b < m; b++)
6925
- g === "header" && hi(p, b) || o.push(r.map((y) => c && g === "body" ? this.getExcelFormulaCell(p, b, y, c) ?? this.getExportValue(i, g, p, b, y) : this.getExportValue(i, g, p, b, y)));
6950
+ g === "header" && ci(p, b) || o.push(r.map((y) => c && g === "body" ? this.getExcelFormulaCell(p, b, y, c) ?? this.getExportValue(i, g, p, b, y) : this.getExportValue(i, g, p, b, y)));
6926
6951
  }
6927
6952
  const d = this.tableScope.isRtl() ? { rightToLeft: !0 } : void 0, u = Object.keys(s).length ? { ...s, ...d } : d;
6928
6953
  return Promise.resolve(u ? this.tableScope.excelService.downloadExcel(o, e, t, u) : this.tableScope.excelService.downloadExcel(o, e, t));
@@ -6958,7 +6983,7 @@ class Xl {
6958
6983
  const d = s.tableModel.getAreaModel("header");
6959
6984
  let u = 0;
6960
6985
  for (let g = 0; g < ((d == null ? void 0 : d.getRowCount()) ?? 0); g++)
6961
- hi(d, g) || u++;
6986
+ ci(d, g) || u++;
6962
6987
  return u + l > re || Math.max(0, c) + h > q ? i("the sheet is larger than an Excel sheet") : { dRow: u, dCol: Math.max(0, c), rows: l, cols: h, sheet: o };
6963
6988
  }
6964
6989
  /** A body cell with a cell formula as Excel formula cell (`undefined` for other cells). */
@@ -6967,7 +6992,7 @@ class Xl {
6967
6992
  const i = (l = e.getInputValueAt) == null ? void 0 : l.call(e, t, s);
6968
6993
  if (!o.sheet.isFormulaInput(s, i))
6969
6994
  return;
6970
- const r = Dl(i, o);
6995
+ const r = Rl(i, o);
6971
6996
  return r === void 0 ? void 0 : { formula: r, value: e.getValueAt(t, s) };
6972
6997
  }
6973
6998
  /** The value of a cell for the Excel export – the shown number in a row number column (body; footer empty). */
@@ -6977,7 +7002,7 @@ class Xl {
6977
7002
  return t !== "body" ? "" : r.hasDefaultFormat() ? r.getRowNumber(o, s) : r.getRowNumberText(o, s);
6978
7003
  const l = s.getValueAt(o, i);
6979
7004
  if (t !== "header" && typeof l == "number" && this.tableScope.excelService.supportsNumberFormats) {
6980
- const a = wo(r) ? r.pivot.value.showValuesAs : t === "body" ? r == null ? void 0 : r.showValuesAs : void 0, c = rl(a);
7005
+ const a = bo(r) ? r.pivot.value.showValuesAs : t === "body" ? r == null ? void 0 : r.showValuesAs : void 0, c = Qn(a);
6981
7006
  if (c) return { value: l, numberFormat: c };
6982
7007
  }
6983
7008
  return l;
@@ -7092,7 +7117,7 @@ class Xl {
7092
7117
  * @since 1.1.94
7093
7118
  */
7094
7119
  getSelectionAggregates() {
7095
- return new qs().aggregate(this.tableScope.tableModel, this.getSelectionModel());
7120
+ return new Js().aggregate(this.tableScope.tableModel, this.getSelectionModel());
7096
7121
  }
7097
7122
  /**
7098
7123
  * Automatically resizes all columns to fit their content.
@@ -7644,7 +7669,7 @@ class Xl {
7644
7669
  const o = (this.tableScope.tableModel.getColumnDefs() ?? []).filter((l) => l.property === e);
7645
7670
  if (!o.length)
7646
7671
  return new I("#NAME?", `No column "${e}"`);
7647
- const i = wr(t, s), r = yr(i);
7672
+ const i = br(t, s), r = wr(i);
7648
7673
  return o.forEach((l) => {
7649
7674
  l.formula = i.source, l.valueGetter = r;
7650
7675
  }), this.repaint(), i.error;
@@ -8959,7 +8984,7 @@ class Xl {
8959
8984
  return this.tableScope.loggingActive;
8960
8985
  }
8961
8986
  }
8962
- function hi(n, e) {
8987
+ function ci(n, e) {
8963
8988
  var t;
8964
8989
  return !!((t = n == null ? void 0 : n.isColumnLetterRow) != null && t.call(n, e));
8965
8990
  }
@@ -9023,7 +9048,7 @@ const Ft = class Ft {
9023
9048
  };
9024
9049
  Ft.counter = 0;
9025
9050
  let cs = Ft;
9026
- class ko {
9051
+ class Do {
9027
9052
  constructor() {
9028
9053
  this.loadingText = "Loading…", this.noRowsText = "No rows to show", this.noMatchesText = "No matching rows", this.autoNoRows = !0, this.blockInteractionWhileLoading = !0, this.loadingDelayInMs = 0, this.getOverlayElement = void 0;
9029
9054
  }
@@ -9034,23 +9059,23 @@ class ko {
9034
9059
  * @returns {OverlayOptions} a new object
9035
9060
  */
9036
9061
  static create(e) {
9037
- const t = new ko();
9062
+ const t = new Do();
9038
9063
  if (e)
9039
9064
  for (const s of Object.keys(e))
9040
9065
  e[s] !== void 0 && (t[s] = e[s]);
9041
9066
  return t;
9042
9067
  }
9043
9068
  }
9044
- function di(n) {
9069
+ function hi(n) {
9045
9070
  return n.manual ? n.manual : !n.autoNoRows || n.rowCount !== 0 ? "none" : (n.unfilteredRowCount ?? 0) > 0 ? "noMatches" : "noRows";
9046
9071
  }
9047
- const ui = {
9072
+ const di = {
9048
9073
  none: "",
9049
9074
  loading: "ge-table-overlay-loading",
9050
9075
  noRows: "ge-table-overlay-no-rows",
9051
9076
  noMatches: "ge-table-overlay-no-matches"
9052
9077
  };
9053
- class Yl {
9078
+ class Gl {
9054
9079
  /**
9055
9080
  * @param {HTMLDivElement} hostElement - the table host; the overlay is appended to it
9056
9081
  * @param {ConvenienceDomService} dom - DOM access of the table
@@ -9060,7 +9085,7 @@ class Yl {
9060
9085
  */
9061
9086
  constructor(e, t, s, o = () => {
9062
9087
  }) {
9063
- this.dom = t, this.requestUpdate = o, this.shownKind = "none", this.shownText = "", this.shownBlocking = !1, this.bounds = "", this.destroyed = !1, this.options = ko.create(s), this.element = t.applyStylePosistionAbsolute(t.createDivWithClass("ge-table-overlay", e)), t.setAriaHidden(this.element), t.applyDisplayNoneStyle(this.element), this.contentElement = t.createDivWithClass("ge-table-overlay-content", this.element);
9088
+ this.dom = t, this.requestUpdate = o, this.shownKind = "none", this.shownText = "", this.shownBlocking = !1, this.bounds = "", this.destroyed = !1, this.options = Do.create(s), this.element = t.applyStylePosistionAbsolute(t.createDivWithClass("ge-table-overlay", e)), t.setAriaHidden(this.element), t.applyDisplayNoneStyle(this.element), this.contentElement = t.createDivWithClass("ge-table-overlay-content", this.element);
9064
9089
  }
9065
9090
  /**
9066
9091
  * Requests the loading overlay (after {@link OverlayOptionsIf.loadingDelayInMs}).
@@ -9121,7 +9146,7 @@ class Yl {
9121
9146
  var a;
9122
9147
  if (this.destroyed)
9123
9148
  return;
9124
- const s = this.options.autoNoRows, o = this.delayTimeout ? di({ rowCount: e, unfilteredRowCount: t, autoNoRows: s }) : di({ manual: (a = this.manual) == null ? void 0 : a.kind, rowCount: e, unfilteredRowCount: t, autoNoRows: s }), i = this.getText(o), r = o === "loading" && this.options.blockInteractionWhileLoading;
9149
+ const s = this.options.autoNoRows, o = this.delayTimeout ? hi({ rowCount: e, unfilteredRowCount: t, autoNoRows: s }) : hi({ manual: (a = this.manual) == null ? void 0 : a.kind, rowCount: e, unfilteredRowCount: t, autoNoRows: s }), i = this.getText(o), r = o === "loading" && this.options.blockInteractionWhileLoading;
9125
9150
  if (o === this.shownKind && i === this.shownText && r === this.shownBlocking)
9126
9151
  return;
9127
9152
  const l = this.shownKind;
@@ -9159,10 +9184,10 @@ class Yl {
9159
9184
  }
9160
9185
  render(e, t, s) {
9161
9186
  const o = this.dom, i = this.element;
9162
- if (this.shownKind !== "none" && o.removeClass(ui[this.shownKind], i), this.contentElement.replaceChildren(), e === "none")
9187
+ if (this.shownKind !== "none" && o.removeClass(di[this.shownKind], i), this.contentElement.replaceChildren(), e === "none")
9163
9188
  o.removeClass("ge-table-overlay-visible", i), o.applyDisplayNoneStyle(i);
9164
9189
  else {
9165
- o.addClass(`ge-table-overlay-visible ${ui[e]}`, i), o.setStyle(i, "display", "flex");
9190
+ o.addClass(`ge-table-overlay-visible ${di[e]}`, i), o.setStyle(i, "display", "flex");
9166
9191
  const r = this.getOwnElement(e, t);
9167
9192
  if (r)
9168
9193
  o.domService.appendChild(this.contentElement, r);
@@ -9188,11 +9213,46 @@ class Yl {
9188
9213
  this.delayTimeout && (clearTimeout(this.delayTimeout), this.delayTimeout = void 0);
9189
9214
  }
9190
9215
  }
9216
+ function Ul(n, e) {
9217
+ var s, o, i;
9218
+ if (n === "rtl")
9219
+ return "rtl";
9220
+ if (n !== "auto" || !e)
9221
+ return "ltr";
9222
+ if (e.isConnected && typeof getComputedStyle == "function") {
9223
+ const r = getComputedStyle(e).direction;
9224
+ if (r === "rtl" || r === "ltr")
9225
+ return r;
9226
+ }
9227
+ return ((i = (o = (s = e.closest) == null ? void 0 : s.call(e, "[dir]")) == null ? void 0 : o.getAttribute("dir")) == null ? void 0 : i.toLowerCase()) === "rtl" ? "rtl" : "ltr";
9228
+ }
9229
+ function Kl(n, e) {
9230
+ const t = n.scrollLeft;
9231
+ return e ? Math.max(0, -t) : t;
9232
+ }
9233
+ function zl(n, e, t) {
9234
+ n.scrollLeft = t ? -e : e;
9235
+ }
9236
+ function Nr(n, e) {
9237
+ return e && n !== 0 ? -n : n;
9238
+ }
9239
+ function jl(n, e, t) {
9240
+ if (!e)
9241
+ return !1;
9242
+ const s = n.scrollWidth - n.clientWidth;
9243
+ return s <= 0 ? !1 : t ? e > 0 ? n.scrollLeft < 0 : n.scrollLeft > -s + 1 : e > 0 ? n.scrollLeft + n.clientWidth < n.scrollWidth - 1 : n.scrollLeft > 0;
9244
+ }
9245
+ function Xl(n, e, t, s) {
9246
+ return s ? e + t - n : n - e;
9247
+ }
9248
+ function Yl(n) {
9249
+ return n.split(" ").map((e) => e === "left" ? "right" : e === "right" ? "left" : e).join(" ");
9250
+ }
9191
9251
  const Cs = class Cs {
9192
9252
  constructor(e, t, s, o) {
9193
9253
  this.hostElement = e, this.tableModel = t, this.dom = s, this.tableOptions = o, this.scrollTop = 0, this.horizontalScrollBarHeight = 0, this.verticalScrollBarWidth = 0, this.areaBodyWestGeo = new Te(), this.areaBodyCenterGeo = new Te(), this.areaBodyEastGeo = new Te(), this.hostAttributesBefore = /* @__PURE__ */ new Map();
9194
9254
  const i = this.hostElement;
9195
- i.innerText = "", this.direction = Nn(o == null ? void 0 : o.direction, i), this.dom.setDirection(this.direction), this.dom.setAttribute(i, "tabindex", "0"), this.ariaIds = new cs(cs.createPrefix(i.id)), this.initHostAria(), this.setHostAriaAttribute("dir", this.direction), this.dom.setStyle(
9255
+ i.innerText = "", this.direction = Ul(o == null ? void 0 : o.direction, i), this.dom.setDirection(this.direction), this.dom.setAttribute(i, "tabindex", "0"), this.ariaIds = new cs(cs.createPrefix(i.id)), this.initHostAria(), this.setHostAriaAttribute("dir", this.direction), this.dom.setStyle(
9196
9256
  this.dom.addClass("ge-table", i),
9197
9257
  "position",
9198
9258
  "relative"
@@ -9281,7 +9341,7 @@ const Cs = class Cs {
9281
9341
  const h = this.ariaIds.rowGroup(a, c), d = this.getAreaChild(a, c);
9282
9342
  s.setAttribute(d, "id", h), s.setAttribute(d, "role", "presentation"), l.push(h);
9283
9343
  }
9284
- this.setHostAriaAttribute("aria-owns", l.join(" ")), this.tableOverlay = new Yl(i, s, o == null ? void 0 : o.overlayOptions, () => this.updateOverlay());
9344
+ this.setHostAriaAttribute("aria-owns", l.join(" ")), this.tableOverlay = new Gl(i, s, o == null ? void 0 : o.overlayOptions, () => this.updateOverlay());
9285
9345
  }
9286
9346
  /**
9287
9347
  * Whether the table runs from right to left ({@link TableOptionsIf.direction}).
@@ -9300,7 +9360,7 @@ const Cs = class Cs {
9300
9360
  * @since 1.1.98
9301
9361
  */
9302
9362
  getViewportScrollLeft() {
9303
- return Vn(this.scrollViewport, this.isRtl());
9363
+ return Kl(this.scrollViewport, this.isRtl());
9304
9364
  }
9305
9365
  /**
9306
9366
  * Sets the horizontal scroll position of the body as distance from the **start** (see {@link getViewportScrollLeft}).
@@ -9309,7 +9369,7 @@ const Cs = class Cs {
9309
9369
  * @since 1.1.98
9310
9370
  */
9311
9371
  setViewportScrollLeft(e) {
9312
- Pn(this.scrollViewport, e, this.isRtl());
9372
+ zl(this.scrollViewport, e, this.isRtl());
9313
9373
  }
9314
9374
  /**
9315
9375
  * A client x coordinate (e.g. `PointerEvent.clientX`) as x in the host from the start of its padding box – the
@@ -9321,7 +9381,7 @@ const Cs = class Cs {
9321
9381
  */
9322
9382
  clientXToHostX(e) {
9323
9383
  const t = this.hostElement, s = t.getBoundingClientRect();
9324
- return Bn(e, s.left + t.clientLeft, t.clientWidth, this.isRtl());
9384
+ return Xl(e, s.left + t.clientLeft, t.clientWidth, this.isRtl());
9325
9385
  }
9326
9386
  /**
9327
9387
  * Shows the overlay that fits the current state (requested by the API, or "no rows" for an empty body).
@@ -9386,11 +9446,22 @@ const Cs = class Cs {
9386
9446
  }[`${e}-${t}`].child;
9387
9447
  }
9388
9448
  /**
9389
- * Adjusts the containers and rows of the table based on the current state.
9449
+ * Adjusts the containers and rows of the table based on the current state: lays out the areas
9450
+ * ({@link layoutContainers}) and renders the visible rows ({@link adjustAfterScrolling}).
9390
9451
  *
9391
9452
  * @return {void}
9392
9453
  */
9393
9454
  adjustContainersAndRows() {
9455
+ this.layoutContainers(), this.adjustAfterScrolling();
9456
+ }
9457
+ /**
9458
+ * Lays out the scroll viewport, the nine areas, the separator borders, the overlay and the detail layer for the
9459
+ * current size of the host and the current padding – without rendering the rows (that is
9460
+ * {@link adjustAfterScrolling}). `repaintHard()` uses it to set a new scroll position before its one render pass.
9461
+ *
9462
+ * @since 1.1.107
9463
+ */
9464
+ layoutContainers() {
9394
9465
  const e = this.tableModel.getPadding(), t = this.hostElement.clientWidth, s = this.hostElement.clientHeight;
9395
9466
  this.dom.applyStyle(this.scrollViewport, {
9396
9467
  width: `${t - e.left}px`,
@@ -9470,7 +9541,7 @@ const Cs = class Cs {
9470
9541
  e.top,
9471
9542
  Math.min(o, e.left + this.scrollViewport.clientWidth),
9472
9543
  Math.max(0, Math.min(i - e.top - e.bottom, this.scrollViewport.clientHeight))
9473
- ), this.adjustAfterScrolling();
9544
+ );
9474
9545
  }
9475
9546
  /**
9476
9547
  * The height the table lays out header, body and footer in: the host height minus a horizontal scroll bar that
@@ -9887,7 +9958,7 @@ class Ql extends hs {
9887
9958
  header: [],
9888
9959
  body: [],
9889
9960
  footer: []
9890
- }, this.tree = !1, this.colAndRowspanModels = new se(), this.draggingTargetColumnIndex = -1, this.contentScrollTop = 0, this.removables = [], this.treeAriaInfo = new ql(), this.ariaSelectionKind = "none", this.renderedSpanCells = /* @__PURE__ */ new Set(), this.bodyRowLayout = new Zl(), this.bodyRowLayoutDirty = !0, this.adjustingRowNumberWidth = !1, this.adjustingRelativeWidths = !1, this.relativeWidthsBase = -1, this.rowNumberRemeasureScheduled = !1, this.ariaTexts = be.create(o == null ? void 0 : o.ariaTexts), (l = (r = this.tableModel).getSelectionModel) != null && l.call(r))
9961
+ }, this.tree = !1, this.colAndRowspanModels = new se(), this.draggingTargetColumnIndex = -1, this.contentScrollTop = 0, this.renderedScrollTop = Number.NaN, this.renderedScrollLeft = Number.NaN, this.removables = [], this.treeAriaInfo = new ql(), this.ariaSelectionKind = "none", this.renderedSpanCells = /* @__PURE__ */ new Set(), this.bodyRowLayout = new Zl(), this.bodyRowLayoutDirty = !0, this.adjustingRowNumberWidth = !1, this.adjustingRelativeWidths = !1, this.relativeWidthsBase = -1, this.rowNumberRemeasureScheduled = !1, this.ariaTexts = be.create(o == null ? void 0 : o.ariaTexts), (l = (r = this.tableModel).getSelectionModel) != null && l.call(r))
9891
9962
  this.getSelectionModel = () => this.tableModel.getSelectionModel();
9892
9963
  else if ((a = this.tableOptions) != null && a.getSelectionModel)
9893
9964
  this.getSelectionModel = this.tableOptions.getSelectionModel;
@@ -9898,7 +9969,7 @@ class Ql extends hs {
9898
9969
  if ((h = this.tableOptions) != null && h.getFocusModel)
9899
9970
  this.getFocusModel = this.tableOptions.getFocusModel;
9900
9971
  else {
9901
- const d = new Mr("cell");
9972
+ const d = new Er("cell");
9902
9973
  this.getFocusModel = () => d;
9903
9974
  }
9904
9975
  Z(t.getAreaModel("body")) && (this.tree = !0), ["header", "body", "footer"].forEach(
@@ -10038,15 +10109,17 @@ class Ql extends hs {
10038
10109
  return !!((e = this.masterDetailService) != null && e.hasExpanded()) && this.getBodyRowLayout().getExtraCount() > 0;
10039
10110
  }
10040
10111
  /**
10041
- * The top of a body row in content pixels: {@link AreaModelIf.getYPosByRowIndex} plus the heights of the open detail
10042
- * rows above it (master/detail).
10112
+ * The top of a body row in content pixels – from the row layout of the table ({@link getBodyRowLayout}: the heights
10113
+ * the rows are drawn with, plus the open detail rows above it). Since 1.1.107 always from the layout (before: without
10114
+ * detail rows from {@link AreaModelIf.getYPosByRowIndex}, which an area model with its own `getRowHeight()` could
10115
+ * get wrong – `scrollToIndex()` landed beside the row). O(1) for constant heights, otherwise after one O(n) build.
10043
10116
  *
10044
10117
  * @param {number} rowIndex - display index
10045
10118
  * @returns {number} px from the top of the first body row
10046
10119
  * @since 1.1.97
10047
10120
  */
10048
10121
  getBodyRowTop(e) {
10049
- return this.hasBodyRowExtras() ? this.getBodyRowLayout().getTop(e) : this.tableModel.getBodyModel().getYPosByRowIndex(e);
10122
+ return this.getBodyRowLayout().getTop(e);
10050
10123
  }
10051
10124
  /**
10052
10125
  * The body row at a content position (a position in an open detail row belongs to its master row). Above the rows:
@@ -10167,17 +10240,55 @@ class Ql extends hs {
10167
10240
  (s = (t = this.tableModel.getAreaModel(o)) == null ? void 0 : t.invalidateDerivedValues) == null || s.call(t, e);
10168
10241
  }
10169
10242
  /**
10170
- * Repaints the UI by resetting the size of the wrapper div,
10171
- * adjusting the containers and rows, and performing additional adjustments
10172
- * after scrolling.
10243
+ * Repaints the UI after the row count or the row heights changed: new heights and padding, new size of the scroll
10244
+ * content, new layout of the areas – then **one** render pass (since 1.1.107; before: two).
10173
10245
  *
10246
+ * @param {ScrollPositionIf} [scrollTo] - a content position to show in that render pass (like {@link scrollToPixel},
10247
+ * exact also with a capped scroll height); a missing axis keeps its position
10174
10248
  * @return {void} This method does not return any value.
10175
10249
  */
10176
- repaintHard() {
10177
- var e;
10178
- for (const t of ["header", "body", "footer"])
10179
- (e = this.colAndRowspanModels[t]) == null || e.initIfRowCountChanged();
10180
- this.tableModel.recalcHeightAndPadding(), this.invalidateRowLayout(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows(), this.adjustAfterScrolling();
10250
+ repaintHard(e) {
10251
+ var t;
10252
+ for (const s of ["header", "body", "footer"])
10253
+ (t = this.colAndRowspanModels[s]) == null || t.initIfRowCountChanged();
10254
+ this.tableModel.recalcHeightAndPadding(), this.invalidateRowLayout(), this.resetSizeOfWrapperDiv(), this.layoutContainers(), e && this.setContentScrollPosition(e.px, e.py), this.adjustAfterScrolling();
10255
+ }
10256
+ /**
10257
+ * Sets the scroll position of the viewport to a content position **without rendering** (shared by
10258
+ * `scrollToPixel()` and `repaintHard({ px, py })`). `py` is a content position: the scroll bar range differs from the
10259
+ * content range – always with a capped scroll height, but also slightly without (the scroll content is 1 px higher
10260
+ * than the rows, the scroll viewport includes the footer and the horizontal scroll bar). `scrollTop = py` would leave
10261
+ * the target row a few pixels off, so the exact content position is remembered (`pendingContentScroll`) and used by
10262
+ * the next render passes as long as the scroll bar is not moved.
10263
+ *
10264
+ * @param {number | undefined} px - from the start of the rows (logical, right-to-left from the right edge);
10265
+ * `undefined` keeps the horizontal position
10266
+ * @param {number | undefined} py - content px from the top of the first body row; `undefined` keeps the vertical
10267
+ * position
10268
+ * @returns {boolean} true if the exact content position was set (then render now – a scroll event may not fire);
10269
+ * false if the browser renders it with its scroll event (nothing to scroll vertically, or only `px`)
10270
+ * @since 1.1.107
10271
+ */
10272
+ setContentScrollPosition(e, t) {
10273
+ const s = this.scrollViewport, o = {};
10274
+ if (e !== void 0 && (o.left = Nr(e, this.isRtl())), t === void 0)
10275
+ return e !== void 0 && s.scrollTo(o), !1;
10276
+ const i = this.getContentScrollRangeY(), r = this.getScrollerRangeY();
10277
+ if (i > 0 && r > 0) {
10278
+ const l = Math.min(i, Math.max(0, t));
10279
+ return o.top = l / i * r, s.scrollTo(o), this.pendingContentScroll = { scrollTop: s.scrollTop, contentTop: l }, !0;
10280
+ }
10281
+ return o.top = t, s.scrollTo(o), !1;
10282
+ }
10283
+ /**
10284
+ * The `scroll` listener of the scroll viewport: renders the new position – nothing if the position is already
10285
+ * rendered (the event of a `repaintHard({ py })`, `scrollToPixel()` or `ensureColumnIsVisible()` arrives after
10286
+ * their own render pass).
10287
+ *
10288
+ * @since 1.1.107
10289
+ */
10290
+ onViewportScroll() {
10291
+ this.scrollViewport.scrollTop === this.renderedScrollTop && this.getViewportScrollLeft() === this.renderedScrollLeft || this.adjustAfterScrolling();
10181
10292
  }
10182
10293
  /**
10183
10294
  * Recalculates the column widths of the table (% and weight columns depend on the available width) and repaints.
@@ -10203,8 +10314,8 @@ class Ql extends hs {
10203
10314
  return ((i = o.width) == null ? void 0 : i.unit) === "weight" || ((r = o.width) == null ? void 0 : r.unit) === "%";
10204
10315
  }));
10205
10316
  }
10206
- adjustContainersAndRows() {
10207
- super.adjustContainersAndRows(), this.adjustRelativeColumnWidthsToScrollBar();
10317
+ layoutContainers() {
10318
+ super.layoutContainers(), this.adjustRelativeColumnWidthsToScrollBar();
10208
10319
  }
10209
10320
  /**
10210
10321
  * % and weight columns share the width next to the vertical scroll bar. The bar appears (or disappears) only after
@@ -10219,7 +10330,7 @@ class Ql extends hs {
10219
10330
  if (!(e <= 0 || e === this.relativeWidthsBase)) {
10220
10331
  this.adjustingRelativeWidths = !0;
10221
10332
  try {
10222
- this.setParentWidth(e), this.tableModel.init(), this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.adjustContainersAndRows();
10333
+ this.setParentWidth(e), this.tableModel.init(), this.tableModel.recalcPadding(), this.resetSizeOfWrapperDiv(), this.layoutContainers();
10223
10334
  } finally {
10224
10335
  this.adjustingRelativeWidths = !1;
10225
10336
  }
@@ -10294,7 +10405,7 @@ class Ql extends hs {
10294
10405
  "ge-table-body-west-vertical-border"
10295
10406
  )), this.updateOverlay(), (a = this.rowNumberWidth) != null && a.approximate && !this.rowNumberRemeasureScheduled && this.findRowNumberLabel() && (this.rowNumberRemeasureScheduled = !0, requestAnimationFrame(() => {
10296
10407
  this.hostElement.isConnected && this.repaint();
10297
- })), this.afterRenderPass();
10408
+ })), this.afterRenderPass(), this.renderedScrollTop = this.scrollTop, this.renderedScrollLeft = this.scrollLeft;
10298
10409
  }
10299
10410
  /**
10300
10411
  * Called at the end of every render pass (scroll, repaint). {@link TableScope} marks the scroll position of the
@@ -10556,17 +10667,17 @@ class Ql extends hs {
10556
10667
  isScrollHeightCapped() {
10557
10668
  return this.getBodyContentHeight() + 1 > hs.maxScrollHeightInPx;
10558
10669
  }
10670
+ /** The detail layer (master/detail) covers the visible body. @since 1.1.97 */
10671
+ adjustDetailLayerBounds(e, t, s, o) {
10672
+ var i;
10673
+ (i = this.masterDetailService) == null || i.setBounds(e, t, s, o);
10674
+ }
10559
10675
  /**
10560
10676
  * The model's content height plus the heights of open detail rows (master/detail).
10561
10677
  *
10562
10678
  * @returns {number} px
10563
10679
  * @since 1.1.97
10564
10680
  */
10565
- /** The detail layer (master/detail) covers the visible body. @since 1.1.97 */
10566
- adjustDetailLayerBounds(e, t, s, o) {
10567
- var i;
10568
- (i = this.masterDetailService) == null || i.setBounds(e, t, s, o);
10569
- }
10570
10681
  getBodyContentHeight() {
10571
10682
  var t;
10572
10683
  const e = this.tableModel.getContentHeightInPixel();
@@ -10884,7 +10995,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
10884
10995
  * checkboxes and – with own `ariaTexts` – header group toggles. Cheap class checks first: most cells have none.
10885
10996
  */
10886
10997
  labelRendererControls(e, t, s, o, i) {
10887
- if (sr(t) || e.classList.contains("ge-table-row-checkbox-div")) {
10998
+ if (tr(t) || e.classList.contains("ge-table-row-checkbox-div")) {
10888
10999
  const l = e.querySelector("input.ge-table-row-checkbox");
10889
11000
  if (l) {
10890
11001
  this.labelControl(l, this.getCheckboxAriaLabel(s, o));
@@ -11582,7 +11693,7 @@ render scope: this.lastFullVisibleRowIndex <- ` + this.lastFullVisibleRowIndex),
11582
11693
  a.setAttribute(h, "data-col-index", `${t}`), a.setAttribute(h, "data-row-index", `${e}`), a.setAttribute(h, "data-area", "header"), a.setAttribute(h, "data-ge-action", "resize-column"), a.addClass(h, "ge-table-column-resize-handle"), a.setAttribute(h, "aria-hidden", "true"), a.setStyle(h, "display", "clip"), a.setStyle(h, "position", "absolute"), a.setStyle(h, "cursor", "col-resize"), this.dom.setStyle(h, "left", `${s + i - c}px`), a.setStyle(h, "top", `${o}px`), a.setStyle(h, "width", `${c}px`), a.setStyle(h, "height", `${r}px`), a.appendChild(l, h);
11583
11694
  }
11584
11695
  }
11585
- class so {
11696
+ class to {
11586
11697
  constructor(e, t) {
11587
11698
  this.columnIndex = e, this.sortState = t;
11588
11699
  }
@@ -11628,7 +11739,7 @@ function oa(n, e, t) {
11628
11739
  }
11629
11740
  return o ? s : void 0;
11630
11741
  }
11631
- function fi(n, e) {
11742
+ function ui(n, e) {
11632
11743
  for (const t of sa)
11633
11744
  try {
11634
11745
  n.removeItem(e + t);
@@ -11718,7 +11829,7 @@ const ia = {
11718
11829
  const e = this.storageKey(), t = this.storage();
11719
11830
  if (e && t)
11720
11831
  try {
11721
- t.removeItem(e + Ee.STORAGE_SUFFIX), fi(t, e);
11832
+ t.removeItem(e + Ee.STORAGE_SUFFIX), ui(t, e);
11722
11833
  } catch {
11723
11834
  }
11724
11835
  this.lastPersisted = void 0;
@@ -11841,7 +11952,7 @@ const ia = {
11841
11952
  const r = JSON.stringify(i);
11842
11953
  if (r !== this.lastPersisted)
11843
11954
  try {
11844
- o.setItem(s + Ee.STORAGE_SUFFIX, r), this.lastPersisted = r, this.legacyRemoved || (fi(o, s), this.legacyRemoved = !0);
11955
+ o.setItem(s + Ee.STORAGE_SUFFIX, r), this.lastPersisted = r, this.legacyRemoved || (ui(o, s), this.legacyRemoved = !0);
11845
11956
  } catch {
11846
11957
  }
11847
11958
  }
@@ -11911,7 +12022,7 @@ const ia = {
11911
12022
  continue;
11912
12023
  t.add(o.property);
11913
12024
  const i = { property: o.property }, r = this.initialWidths.get(o);
11914
- r && o.width && (r.value !== o.width.value || r.unit !== o.width.unit) && o.width.unit === "px" && (i.width = o.width.value), i.visible = to(o), s.push(i);
12025
+ r && o.width && (r.value !== o.width.value || r.unit !== o.width.unit) && o.width.unit === "px" && (i.width = o.width.value), i.visible = eo(o), s.push(i);
11915
12026
  }
11916
12027
  return s;
11917
12028
  }
@@ -12062,7 +12173,7 @@ const ia = {
12062
12173
  var g;
12063
12174
  const f = i.get(d.property);
12064
12175
  if (f) {
12065
- if (typeof f.visible == "boolean" && to(d) !== f.visible && ((g = s.setColumnVisible) == null || g.call(s, u, f.visible)), typeof f.width == "number" && f.width >= 0)
12176
+ if (typeof f.visible == "boolean" && eo(d) !== f.visible && ((g = s.setColumnVisible) == null || g.call(s, u, f.visible)), typeof f.width == "number" && f.width >= 0)
12066
12177
  s.setColumnWidth(u, f.width);
12067
12178
  else if (t) {
12068
12179
  const p = this.initialWidths.get(d);
@@ -12095,7 +12206,7 @@ const ia = {
12095
12206
  for (const r of e) {
12096
12207
  if (!r || r.sortState !== "asc" && r.sortState !== "desc") continue;
12097
12208
  const l = typeof r.property == "string" ? t.findIndex((a) => a.property === r.property) : typeof r.columnIndex == "number" ? r.columnIndex : -1;
12098
- l < 0 || l >= this.scope.tableModel.getColumnCount() || s.some((a) => a.columnIndex === l) || (s.push(new so(l, r.sortState)), (i = t[l]) != null && i.property && o.push(t[l].property));
12209
+ l < 0 || l >= this.scope.tableModel.getColumnCount() || s.some((a) => a.columnIndex === l) || (s.push(new to(l, r.sortState)), (i = t[l]) != null && i.property && o.push(t[l].property));
12099
12210
  }
12100
12211
  this.scope.applySortItems(s), this.sortPriority = o;
12101
12212
  }
@@ -12146,7 +12257,7 @@ const ia = {
12146
12257
  t.restoreSnapshot ? t.restoreSnapshot(a) : (t.clear(), a.ranges.forEach((c) => t.addSelection(c)));
12147
12258
  }
12148
12259
  applyScroll(e) {
12149
- if (!e || typeof e.top != "number" || typeof e.left != "number" || (this.scope.scrollViewport.scrollTo(Xs(e.left, this.scope.isRtl()), e.top), this.scope.adjustAfterScrolling(), e.firstRowId === void 0))
12260
+ if (!e || typeof e.top != "number" || typeof e.left != "number" || (this.scope.scrollViewport.scrollTo(Nr(e.left, this.scope.isRtl()), e.top), this.scope.adjustAfterScrolling(), e.firstRowId === void 0))
12150
12261
  return;
12151
12262
  const t = this.scope.getFirstVisibleRowIndex();
12152
12263
  if (t > -1 && this.idAt(t, !1) === e.firstRowId)
@@ -12223,7 +12334,7 @@ const ia = {
12223
12334
  }
12224
12335
  };
12225
12336
  Ee.STORAGE_SUFFIX = "tableState", Ee.EXPENSIVE = ["tree", "checked", "selection"];
12226
- let oo = Ee;
12337
+ let so = Ee;
12227
12338
  class ra {
12228
12339
  constructor(e) {
12229
12340
  this.tableScope = e, this.tableScope.hostElement.addEventListener(
@@ -12630,7 +12741,7 @@ function ha(n) {
12630
12741
  let t = "";
12631
12742
  return n.ctrlKey && (t += " ctrl"), n.altKey && (t += t + " alt"), n.shiftKey && (t += t + " shift"), n.metaKey && (t += t + " cmd"), ts(t + " " + e);
12632
12743
  }
12633
- function Lo() {
12744
+ function ko() {
12634
12745
  return typeof navigator < "u" && typeof navigator.platform == "string" && navigator.platform.indexOf("Mac") > -1;
12635
12746
  }
12636
12747
  class da {
@@ -12682,7 +12793,7 @@ class da {
12682
12793
  }
12683
12794
  }
12684
12795
  isMacintosh() {
12685
- return Lo();
12796
+ return ko();
12686
12797
  }
12687
12798
  isDebug() {
12688
12799
  return this.isLocalhost();
@@ -12719,7 +12830,7 @@ class da {
12719
12830
  findEntity(e) {
12720
12831
  var s, o;
12721
12832
  let t = ha(e);
12722
- (o = (s = this.tableScope).isRtl) != null && o.call(s) && (t = $n(t)), this.isDebug() && console.debug("ShortcutService shortcut :", t);
12833
+ (o = (s = this.tableScope).isRtl) != null && o.call(s) && (t = Yl(t)), this.isDebug() && console.debug("ShortcutService shortcut :", t);
12723
12834
  for (const i in this.shortcutActionIdMapping)
12724
12835
  if (ts(i) === t)
12725
12836
  return this.isDebug() && console.debug("ShortcutService action :", this.shortcutActionIdMapping[i]), this.shortcutActionIdMapping[i];
@@ -12811,7 +12922,7 @@ class ss {
12811
12922
  onUndoStackChanged(e) {
12812
12923
  }
12813
12924
  }
12814
- class gi {
12925
+ class fi {
12815
12926
  setStyle(e, t, s) {
12816
12927
  return e.style[t] = s, e;
12817
12928
  }
@@ -12845,12 +12956,12 @@ const ua = null;
12845
12956
  function pt(n) {
12846
12957
  return n == null || n === "";
12847
12958
  }
12848
- const pi = new Intl.Collator("en", { numeric: !0 });
12849
- function mi(n) {
12959
+ const gi = new Intl.Collator("en", { numeric: !0 });
12960
+ function pi(n) {
12850
12961
  return typeof n == "number" || typeof n == "bigint" ? 0 : n instanceof Date ? 1 : typeof n == "boolean" ? 2 : typeof n == "string" ? 3 : 4;
12851
12962
  }
12852
- function bi(n, e) {
12853
- const t = mi(n), s = mi(e);
12963
+ function mi(n, e) {
12964
+ const t = pi(n), s = pi(e);
12854
12965
  if (t !== s) return t - s;
12855
12966
  switch (t) {
12856
12967
  case 0: {
@@ -12864,9 +12975,9 @@ function bi(n, e) {
12864
12975
  case 2:
12865
12976
  return (n ? 1 : 0) - (e ? 1 : 0);
12866
12977
  case 3:
12867
- return pi.compare(n, e);
12978
+ return gi.compare(n, e);
12868
12979
  default:
12869
- return pi.compare(String(n), String(e));
12980
+ return gi.compare(String(n), String(e));
12870
12981
  }
12871
12982
  }
12872
12983
  function qt(n) {
@@ -12881,7 +12992,7 @@ function fa(n, e) {
12881
12992
  throw new Error(`Row grouping: level ${e} has no value (a property path or a function).`);
12882
12993
  const s = typeof t.value == "string" ? t.value : void 0, o = t.order ?? "asc";
12883
12994
  let i;
12884
- return o === "asc" ? i = qt(bi) : o === "desc" ? i = qt((r, l) => bi(l, r)) : typeof o == "function" ? i = qt(o) : i = qt(() => 0), {
12995
+ return o === "asc" ? i = qt(mi) : o === "desc" ? i = qt((r, l) => mi(l, r)) : typeof o == "function" ? i = qt(o) : i = qt(() => 0), {
12885
12996
  name: t.name ?? s ?? `level${e}`,
12886
12997
  label: t.label,
12887
12998
  path: s,
@@ -12893,7 +13004,7 @@ function fa(n, e) {
12893
13004
  function Le(n) {
12894
13005
  return (n ?? []).map((e, t) => fa(e, t));
12895
13006
  }
12896
- const wi = /* @__PURE__ */ new WeakMap();
13007
+ const bi = /* @__PURE__ */ new WeakMap();
12897
13008
  let ga = 1;
12898
13009
  function ze(n) {
12899
13010
  if (pt(n)) return "empty";
@@ -12911,8 +13022,8 @@ function ze(n) {
12911
13022
  case "function":
12912
13023
  case "object": {
12913
13024
  if (n instanceof Date) return "d:" + n.getTime();
12914
- let e = wi.get(n);
12915
- return e === void 0 && (e = ga++, wi.set(n, e)), "o:" + e;
13025
+ let e = bi.get(n);
13026
+ return e === void 0 && (e = ga++, bi.set(n, e)), "o:" + e;
12916
13027
  }
12917
13028
  default:
12918
13029
  return "u:" + String(n);
@@ -12934,7 +13045,7 @@ function Br(n, e) {
12934
13045
  );
12935
13046
  return t.length ? t.join(" › ") : "Group";
12936
13047
  }
12937
- function io(n) {
13048
+ function oo(n) {
12938
13049
  var a, c;
12939
13050
  const e = n.getBodyModel();
12940
13051
  if (!ne(e))
@@ -13081,7 +13192,7 @@ function Bs(n) {
13081
13192
  }
13082
13193
  const $s = "yyyy-mm-dd";
13083
13194
  let Zt;
13084
- function yi(n) {
13195
+ function wi(n) {
13085
13196
  if (!Zt) {
13086
13197
  Zt = new Uint32Array(256);
13087
13198
  for (let t = 0; t < 256; t++) {
@@ -13245,7 +13356,7 @@ class ya {
13245
13356
  const t = [];
13246
13357
  return e.forEach((s, o) => {
13247
13358
  const i = new TextEncoder().encode(s);
13248
- t.push({ path: new TextEncoder().encode(o), data: i, size: i.length, crc: yi(i), method: 0 });
13359
+ t.push({ path: new TextEncoder().encode(o), data: i, size: i.length, crc: wi(i), method: 0 });
13249
13360
  }), this.assembleZip(t);
13250
13361
  }
13251
13362
  /**
@@ -13260,7 +13371,7 @@ class ya {
13260
13371
  path: new TextEncoder().encode(s),
13261
13372
  data: l ? r : i,
13262
13373
  size: i.length,
13263
- crc: yi(i),
13374
+ crc: wi(i),
13264
13375
  // CRC of the UNcompressed data
13265
13376
  method: l ? 8 : 0
13266
13377
  });
@@ -13355,8 +13466,8 @@ const Ss = class Ss {
13355
13466
  }
13356
13467
  };
13357
13468
  Ss.defaultDelayInMs = 150;
13358
- let ro = Ss;
13359
- class Fo {
13469
+ let io = Ss;
13470
+ class Lo {
13360
13471
  constructor() {
13361
13472
  this.managed = !0, this.multiRow = !0, this.treeDropInside = !0, this.dragThresholdInPx = 4, this.autoScrollZoneInPx = 40, this.autoScrollMaxSpeedInPx = 24, this.ghostText = void 0;
13362
13473
  }
@@ -13367,7 +13478,7 @@ class Fo {
13367
13478
  * @returns {RowDragOptionsIf} complete options
13368
13479
  */
13369
13480
  static create(e) {
13370
- const t = new Fo();
13481
+ const t = new Lo();
13371
13482
  for (const [s, o] of Object.entries(e ?? {}))
13372
13483
  o !== void 0 && (t[s] = o);
13373
13484
  return t;
@@ -13404,7 +13515,7 @@ class Sa {
13404
13515
  }
13405
13516
  /** The options of this table ({@link TableOptionsIf.rowDragOptions} + defaults). */
13406
13517
  get options() {
13407
- return Fo.create(this.tableScope.tableOptions.rowDragOptions);
13518
+ return Lo.create(this.tableScope.tableOptions.rowDragOptions);
13408
13519
  }
13409
13520
  /** true while rows are dragged with the pointer. */
13410
13521
  isDragging() {
@@ -13437,10 +13548,10 @@ class Sa {
13437
13548
  */
13438
13549
  getHandleState(e, t, s) {
13439
13550
  const o = t == null ? void 0 : t.rowDrag;
13440
- if (!o || jo(s))
13551
+ if (!o || zo(s))
13441
13552
  return "none";
13442
13553
  const i = s.getRowByIndex(e);
13443
- return zo(i) || typeof o == "function" && !o(i, e) ? "none" : this.isManaged() && !this.canModelMove(s) ? (this.warnedUnsupported || (this.warnedUnsupported = !0, console.warn("GuiExpert Table: rowDrag is set, but the body model cannot move rows (no moveRows(), or row grouping / pivot). Use rowDragOptions: { managed: false } and move the rows yourself.")), "none") : this.getBlockReason() ? "disabled" : "enabled";
13554
+ return Ko(i) || typeof o == "function" && !o(i, e) ? "none" : this.isManaged() && !this.canModelMove(s) ? (this.warnedUnsupported || (this.warnedUnsupported = !0, console.warn("GuiExpert Table: rowDrag is set, but the body model cannot move rows (no moveRows(), or row grouping / pivot). Use rowDragOptions: { managed: false } and move the rows yourself.")), "none") : this.getBlockReason() ? "disabled" : "enabled";
13444
13555
  }
13445
13556
  /**
13446
13557
  * Adds the drag handle to a rendered body cell (called by the render pass for columns with `rowDrag`).
@@ -13662,7 +13773,7 @@ class Sa {
13662
13773
  const o = this.tableScope, i = o.tableModel.getBodyModel(), r = ut(e, i.getRowCount());
13663
13774
  if (!r.length || !i.moveRows || this.isSorted() || o.tableSheet || i.canMoveRows && !i.canMoveRows(r, t))
13664
13775
  return -1;
13665
- const l = Z(i), a = qo(r, t), c = r[r.length - 1] - r[0] === r.length - 1;
13776
+ const l = Z(i), a = Jo(r, t), c = r[r.length - 1] - r[0] === r.length - 1;
13666
13777
  if (!l && c && a === r[0])
13667
13778
  return -1;
13668
13779
  const h = l ? r.map((p) => i.getRowByIndex(p)) : [];
@@ -13754,7 +13865,7 @@ class Sa {
13754
13865
  const t = this.tableScope.tableModel.getBodyModel(), s = ne(t);
13755
13866
  return e.map((o) => {
13756
13867
  const i = t.getRowByIndex(o);
13757
- return s && U(i) && !zo(i) ? i.data : i;
13868
+ return s && U(i) && !Ko(i) ? i.data : i;
13758
13869
  });
13759
13870
  }
13760
13871
  /** Index of the first column whose drag handle is shown for the row, -1 if none. */
@@ -13782,10 +13893,10 @@ class Sa {
13782
13893
  return ((e = this.tableScope.tableOptions.rowDragOptions) == null ? void 0 : e.managed) !== !1;
13783
13894
  }
13784
13895
  canModelMove(e) {
13785
- return !!e.moveRows && !ne(e) && !jo(e);
13896
+ return !!e.moveRows && !ne(e) && !zo(e);
13786
13897
  }
13787
13898
  createEvent(e, t, s, o, i, r, l) {
13788
- const a = Z(this.tableScope.tableModel.getBodyModel()), c = i && !a ? qo(o, i) : -1;
13899
+ const a = Z(this.tableScope.tableModel.getBodyModel()), c = i && !a ? Jo(o, i) : -1;
13789
13900
  return new Ca(
13790
13901
  e,
13791
13902
  t,
@@ -13814,7 +13925,7 @@ class Sa {
13814
13925
  function xa(n, e) {
13815
13926
  return n === e || !!n && !!e && n.rowIndex === e.rowIndex && n.position === e.position;
13816
13927
  }
13817
- class Oo {
13928
+ class Fo {
13818
13929
  constructor() {
13819
13930
  this.blockCommitOnInvalid = !0;
13820
13931
  }
@@ -13825,7 +13936,7 @@ class Oo {
13825
13936
  * @returns {BatchEditOptionsIf} complete options
13826
13937
  */
13827
13938
  static create(e) {
13828
- const t = new Oo();
13939
+ const t = new Fo();
13829
13940
  return e && typeof e == "object" && e.blockCommitOnInvalid !== void 0 && (t.blockCommitOnInvalid = e.blockCommitOnInvalid), t;
13830
13941
  }
13831
13942
  }
@@ -13948,7 +14059,7 @@ class Aa {
13948
14059
  }
13949
14060
  /** The options of this table ({@link TableOptionsIf.batchEdit} + defaults). */
13950
14061
  get options() {
13951
- return Oo.create(this.tableScope.tableOptions.batchEdit);
14062
+ return Fo.create(this.tableScope.tableOptions.batchEdit);
13952
14063
  }
13953
14064
  /** `tableOptions.batchEdit` is set: changes are always collected. */
13954
14065
  isPermanent() {
@@ -14210,7 +14321,7 @@ function Da(n, e) {
14210
14321
  function Gr(n, e) {
14211
14322
  const s = n.length === 1 ? e : !e, o = !e;
14212
14323
  if (n.every(ka))
14213
- return s ? Si(n, (i) => i) : void 0;
14324
+ return s ? Ci(n, (i) => i) : void 0;
14214
14325
  if (n.every((i) => typeof i == "string" && Ea.test(i))) {
14215
14326
  const i = n;
14216
14327
  if (i.some((c) => !Number.isSafeInteger(Math.trunc(Number(c)))))
@@ -14227,11 +14338,11 @@ function Gr(n, e) {
14227
14338
  const d = h.startsWith("-"), [u, f] = h.replace("-", "").split(".");
14228
14339
  return (d ? "-" : "") + u.padStart(l, "0") + (f !== void 0 ? "." + f : "");
14229
14340
  };
14230
- return s ? Si(i.map(Number), a) : void 0;
14341
+ return s ? Ci(i.map(Number), a) : void 0;
14231
14342
  }
14232
- if (n.every(Ci))
14343
+ if (n.every(yi))
14233
14344
  return o ? Fa(n) : void 0;
14234
- if (n.every((i) => typeof i == "string" && Hr.test(i) && Ci(jr(i))))
14345
+ if (n.every((i) => typeof i == "string" && Hr.test(i) && yi(jr(i))))
14235
14346
  return o ? Oa(n) : void 0;
14236
14347
  if (n.every((i) => typeof i == "string" && Wr.test(i)))
14237
14348
  return o ? Na(n) : void 0;
@@ -14239,14 +14350,14 @@ function Gr(n, e) {
14239
14350
  function ka(n) {
14240
14351
  return typeof n == "number" && Number.isFinite(n);
14241
14352
  }
14242
- function Ci(n) {
14353
+ function yi(n) {
14243
14354
  return n instanceof Date && !isNaN(n.getTime());
14244
14355
  }
14245
14356
  function Ws(n) {
14246
14357
  const e = Number(n.toPrecision(15));
14247
14358
  return e === 0 ? 0 : e;
14248
14359
  }
14249
- function Si(n, e) {
14360
+ function Ci(n, e) {
14250
14361
  const t = n.length, s = n[t - 1];
14251
14362
  if (t === 1)
14252
14363
  return (u) => e(Ws(s + u));
@@ -14277,7 +14388,7 @@ function Ds(n, e, t) {
14277
14388
  function vt(n) {
14278
14389
  return n.y * 12 + n.m;
14279
14390
  }
14280
- function xi(n) {
14391
+ function Si(n) {
14281
14392
  return Math.round(Ds(n.y, n.m, n.d).getTime() / Ma);
14282
14393
  }
14283
14394
  function Kr(n) {
@@ -14287,7 +14398,7 @@ function Kr(n) {
14287
14398
  const t = n.every(La), s = n.every((r) => r.d === n[0].d), o = vt(n[1]) - vt(n[0]);
14288
14399
  if ((s || t) && o !== 0 && n.every((r, l) => l === 0 || vt(r) - vt(n[l - 1]) === o))
14289
14400
  return { months: o, days: 0, monthEnd: t && !s };
14290
- const i = xi(n[e - 1]) - xi(n[0]);
14401
+ const i = Si(n[e - 1]) - Si(n[0]);
14291
14402
  return { months: 0, days: Math.round(i / (e - 1)), monthEnd: !1 };
14292
14403
  }
14293
14404
  function zr(n, e, t) {
@@ -14384,7 +14495,7 @@ function Va(n) {
14384
14495
  }
14385
14496
  return a;
14386
14497
  }
14387
- const vi = "fill-handle";
14498
+ const xi = "fill-handle";
14388
14499
  class Pa {
14389
14500
  constructor(e) {
14390
14501
  this.tableScope = e, this.autoScrollFrame = 0, this.suppressClick = !1, this.shortcutsSet = !1;
@@ -14438,7 +14549,7 @@ class Pa {
14438
14549
  ensureHandle() {
14439
14550
  if (!this.handle || !this.handle.isConnected) {
14440
14551
  const e = this.tableScope.getDomService();
14441
- this.handle = e.setAriaHidden(e.createDivWithClass("ge-table-fill-handle", this.tableScope.hostElement)), e.domService.setAttribute(this.handle, "data-ge-action", vi);
14552
+ this.handle = e.setAriaHidden(e.createDivWithClass("ge-table-fill-handle", this.tableScope.hostElement)), e.domService.setAttribute(this.handle, "data-ge-action", xi);
14442
14553
  }
14443
14554
  return this.handle;
14444
14555
  }
@@ -14448,12 +14559,12 @@ class Pa {
14448
14559
  }
14449
14560
  /** Keyboard alternative on the grid: Ctrl/⌘+D, Ctrl/⌘+R (only directions the options allow). */
14450
14561
  updateHostShortcuts(e) {
14451
- const s = Lo() ? "Meta" : "Control", o = [];
14562
+ const s = ko() ? "Meta" : "Control", o = [];
14452
14563
  e.direction !== "horizontal" && o.push(`${s}+D`), e.direction !== "vertical" && o.push(`${s}+R`), this.tableScope.setHostKeyShortcuts(o.join(" ")), this.shortcutsSet = !0;
14453
14564
  }
14454
14565
  // ---------------------------------------------------------------- pointer
14455
14566
  isHandle(e) {
14456
- return e instanceof Element && !!e.closest(`[data-ge-action="${vi}"]`) && this.tableScope.hostElement.contains(e);
14567
+ return e instanceof Element && !!e.closest(`[data-ge-action="${xi}"]`) && this.tableScope.hostElement.contains(e);
14457
14568
  }
14458
14569
  onPointerDown(e) {
14459
14570
  if (this.session || this.pending || e.pointerType === "mouse" && e.button !== 0 || !this.isHandle(e.target))
@@ -14570,7 +14681,7 @@ class Pa {
14570
14681
  this.stopListening(), this.removeHandle();
14571
14682
  }
14572
14683
  }
14573
- class No {
14684
+ class Oo {
14574
14685
  constructor() {
14575
14686
  this.detailRenderer = () => {
14576
14687
  }, this.isMaster = void 0, this.detailHeight = "auto", this.estimatedDetailHeight = 200, this.toggleColumn = void 0, this.maxRenderedDetails = 50, this.getRowId = void 0;
@@ -14582,7 +14693,7 @@ class No {
14582
14693
  * @returns {MasterDetailOptionsIf} complete options
14583
14694
  */
14584
14695
  static create(e) {
14585
- const t = new No();
14696
+ const t = new Oo();
14586
14697
  for (const [s, o] of Object.entries(e ?? {}))
14587
14698
  o !== void 0 && (t[s] = o);
14588
14699
  return t;
@@ -14594,7 +14705,7 @@ class Ba {
14594
14705
  var i;
14595
14706
  this.scope = e, this.createNestedScope = t, this.entries = /* @__PURE__ */ new Map(), this.byIndex = /* @__PURE__ */ new Map(), this.visibleNow = /* @__PURE__ */ new Set(), this.renderPass = 0, this.renderedCount = 0, this.toggleColumnIndex = -1, this.resizeFrame = 0, this.destroyed = !1;
14596
14707
  const s = (i = e.tableOptions) == null ? void 0 : i.masterDetail;
14597
- this.options = No.create(s);
14708
+ this.options = Oo.create(s);
14598
14709
  const o = Z(e.tableModel.getBodyModel());
14599
14710
  s && o && console.warn("GuiExpert Table – masterDetail is ignored: it works only with flat body models (no tree, row grouping or pivot table)."), s && !s.detailRenderer && console.warn("GuiExpert Table – masterDetail without a detailRenderer: the detail rows stay empty."), this.active = !!s && !o, this.active && this.createLayer();
14600
14711
  }
@@ -15079,7 +15190,7 @@ class Ba {
15079
15190
  for (; o && o !== this.layer; ) {
15080
15191
  if (o instanceof HTMLElement) {
15081
15192
  const i = getComputedStyle(o);
15082
- if (s && /(auto|scroll)/.test(i.overflowY) && o.scrollHeight > o.clientHeight && (s > 0 ? o.scrollTop + o.clientHeight < o.scrollHeight - 1 : o.scrollTop > 0) || t && /(auto|scroll)/.test(i.overflowX) && o.scrollWidth > o.clientWidth && _n(o, t, i.direction === "rtl"))
15193
+ if (s && /(auto|scroll)/.test(i.overflowY) && o.scrollHeight > o.clientHeight && (s > 0 ? o.scrollTop + o.clientHeight < o.scrollHeight - 1 : o.scrollTop > 0) || t && /(auto|scroll)/.test(i.overflowX) && o.scrollWidth > o.clientWidth && jl(o, t, i.direction === "rtl"))
15083
15194
  return !0;
15084
15195
  }
15085
15196
  o = o.parentElement;
@@ -15149,7 +15260,7 @@ class us {
15149
15260
  return t;
15150
15261
  }
15151
15262
  }
15152
- class Vo {
15263
+ class No {
15153
15264
  constructor() {
15154
15265
  this.startOnType = !0, this.enterKey = "edit", this.enterMoves = "down", this.tabMoves = !0, this.arrowKeysCommit = !0, this.textSelection = "all", this.clearKeys = !0, this.ctrlEnterFillsSelection = !0, this.collapseSelectionOnNavigate = !0, this.emptyValue = "", this.defaultEditable = !1, this.maxClearCells = 1e6;
15155
15266
  }
@@ -15163,14 +15274,14 @@ class Vo {
15163
15274
  static create(e) {
15164
15275
  if (!e)
15165
15276
  return;
15166
- const t = new Vo();
15277
+ const t = new No();
15167
15278
  if (typeof e == "object")
15168
15279
  for (const [s, o] of Object.entries(e))
15169
15280
  o !== void 0 && (t[s] = o);
15170
15281
  return t;
15171
15282
  }
15172
15283
  }
15173
- class Po {
15284
+ class Vo {
15174
15285
  constructor() {
15175
15286
  this.composing = !1, this.abort = new AbortController(), this.focusedOnce = !1;
15176
15287
  }
@@ -15234,7 +15345,7 @@ class Po {
15234
15345
  this.abort.abort(), (e = this.input) == null || e.remove(), this.input = void 0;
15235
15346
  }
15236
15347
  }
15237
- class Ha extends Po {
15348
+ class Ha extends Vo {
15238
15349
  decorate(e, t) {
15239
15350
  t.domService.setAttribute(e, "inputmode", "decimal"), t.domService.addClass(e, "ge-table-cell-editor-number");
15240
15351
  }
@@ -15247,7 +15358,7 @@ class Ha extends Po {
15247
15358
  return t !== "" && /^[-+]?(\d+\.?\d*|\.\d+)(e[-+]?\d+)?$/i.test(t) ? Number(t) : e;
15248
15359
  }
15249
15360
  }
15250
- class Wa extends Po {
15361
+ class Wa extends Vo {
15251
15362
  constructor() {
15252
15363
  super(...arguments), this.originalText = "";
15253
15364
  }
@@ -15369,15 +15480,15 @@ const Ga = function(n, e, t) {
15369
15480
  A("Lookup", "XLOOKUP", "lookup_value, lookup_array, return_array, [if_not_found]", "Looks up a value and returns the matching one"),
15370
15481
  A("Logic", "XOR", "logical1, [logical2], …", "TRUE if an odd number of arguments is TRUE"),
15371
15482
  A("Date", "YEAR", "date", "The year of a date")
15372
- ]), Ri = String.raw`\$?[A-Za-z]{1,3}\$?[1-9][0-9]*`, Ai = new RegExp(String.raw`(?:${Ri}(?::${Ri})?|\$?[A-Za-z]{1,3}:\$?[A-Za-z]{1,3}|\$?[0-9]+:\$?[0-9]+)`, "y"), Rt = /[A-Za-z0-9_.$]/, Ka = /* @__PURE__ */ new Set(["=", "(", ",", ";", "+", "-", "*", "/", "^", "&", "<", ">"]);
15373
- function Ei(n) {
15483
+ ]), vi = String.raw`\$?[A-Za-z]{1,3}\$?[1-9][0-9]*`, Ri = new RegExp(String.raw`(?:${vi}(?::${vi})?|\$?[A-Za-z]{1,3}:\$?[A-Za-z]{1,3}|\$?[0-9]+:\$?[0-9]+)`, "y"), Rt = /[A-Za-z0-9_.$]/, Ka = /* @__PURE__ */ new Set(["=", "(", ",", ";", "+", "-", "*", "/", "^", "&", "<", ">"]);
15484
+ function Ai(n) {
15374
15485
  const e = [];
15375
15486
  if (!n.startsWith("=")) return e;
15376
15487
  let t = 1;
15377
15488
  for (; t < n.length; ) {
15378
15489
  const s = n[t];
15379
15490
  if (s === '"') {
15380
- t = _o(n, t);
15491
+ t = Po(n, t);
15381
15492
  continue;
15382
15493
  }
15383
15494
  if (s === "[") {
@@ -15386,8 +15497,8 @@ function Ei(n) {
15386
15497
  continue;
15387
15498
  }
15388
15499
  if (Rt.test(s) && (t === 0 || !Rt.test(n[t - 1]))) {
15389
- Ai.lastIndex = t;
15390
- const o = Ai.exec(n), i = o ? t + o[0].length : -1;
15500
+ Ri.lastIndex = t;
15501
+ const o = Ri.exec(n), i = o ? t + o[0].length : -1;
15391
15502
  if (o && za(o[0]) && (i >= n.length || !Rt.test(n[i]) && n[i] !== "(" && n[i] !== ":")) {
15392
15503
  e.push({ start: t, end: i, text: o[0], key: o[0].replace(/\$/g, "").toUpperCase() }), t = i;
15393
15504
  continue;
@@ -15402,7 +15513,7 @@ function Ei(n) {
15402
15513
  function za(n) {
15403
15514
  return (n.match(/[A-Za-z]+/g) ?? []).every((e) => Ve(e) >= 0);
15404
15515
  }
15405
- function _o(n, e) {
15516
+ function Po(n, e) {
15406
15517
  let t = e + 1;
15407
15518
  for (; t < n.length; ) {
15408
15519
  if (n[t] === '"') {
@@ -15420,7 +15531,7 @@ function Yr(n, e) {
15420
15531
  let t = 1;
15421
15532
  for (; t < e; ) {
15422
15533
  if (n[t] === '"') {
15423
- const s = _o(n, t), o = s - 1 > t && n[s - 1] === '"';
15534
+ const s = Po(n, t), o = s - 1 > t && n[s - 1] === '"';
15424
15535
  if (s > e || s === e && !o) return !0;
15425
15536
  t = s;
15426
15537
  continue;
@@ -15455,7 +15566,7 @@ function Xa(n) {
15455
15566
  return c && h ? `${i ? "$" : ""}${c}${r ? "$" : ""}${h}` : c ? `${o ? "$" : ""}${c}` : `${o ? "$" : ""}${h}`;
15456
15567
  }).join(":");
15457
15568
  }
15458
- function Mi(n, e) {
15569
+ function Ei(n, e) {
15459
15570
  if (!n.startsWith("=") || Yr(n, e) || e < n.length && /[A-Za-z0-9_.(]/.test(n[e])) return;
15460
15571
  let t = e;
15461
15572
  for (; t > 1 && /[A-Za-z0-9_.]/.test(n[t - 1]); ) t--;
@@ -15470,7 +15581,7 @@ function Ya(n, e) {
15470
15581
  for (; s < e; ) {
15471
15582
  const o = n[s];
15472
15583
  if (o === '"') {
15473
- const i = _o(n, s);
15584
+ const i = Po(n, s);
15474
15585
  if (i > e) return Gs(t);
15475
15586
  s = i;
15476
15587
  continue;
@@ -15675,7 +15786,7 @@ class Qa {
15675
15786
  }
15676
15787
  /** F4: the next `$` form of the reference at (or right before) the caret. */
15677
15788
  toggleReferenceAtCaret() {
15678
- const e = this.input.value, t = this.caret(), s = Ei(e).find((r) => t >= r.start && t <= r.end);
15789
+ const e = this.input.value, t = this.caret(), s = Ai(e).find((r) => t >= r.start && t <= r.end);
15679
15790
  if (!s) return !1;
15680
15791
  const o = Xa(s.text);
15681
15792
  this.input.value = e.slice(0, s.start) + o + e.slice(s.end);
@@ -15687,7 +15798,7 @@ class Qa {
15687
15798
  }
15688
15799
  /** Takes a suggestion: the typed name becomes `NAME(`. */
15689
15800
  accept(e) {
15690
- const t = this.suggestions[e], s = Mi(this.input.value, this.caret());
15801
+ const t = this.suggestions[e], s = Ei(this.input.value, this.caret());
15691
15802
  if (!t || !s) return;
15692
15803
  const o = this.input.value, i = `${t.name}(`;
15693
15804
  this.input.value = o.slice(0, s.start) + i + o.slice(s.start + s.prefix.length);
@@ -15707,7 +15818,7 @@ class Qa {
15707
15818
  /** The colors of the references: by first occurrence, the same reference the same color. */
15708
15819
  colored() {
15709
15820
  const e = /* @__PURE__ */ new Map();
15710
- return Ei(this.input.value).map((t) => {
15821
+ return Ai(this.input.value).map((t) => {
15711
15822
  let s = e.get(t.key);
15712
15823
  return s === void 0 && e.set(t.key, s = e.size % qa), { ...t, color: s };
15713
15824
  });
@@ -15764,7 +15875,7 @@ class Qa {
15764
15875
  (!this.cellCache || this.cellCache.signature.some((a, c) => a !== o[c])) && (this.cellCache = { signature: o, cells: /* @__PURE__ */ new Map() });
15765
15876
  const i = this.cellCache.cells;
15766
15877
  if (i.has(e)) return i.get(e);
15767
- const r = nl(e);
15878
+ const r = el(e);
15768
15879
  let l;
15769
15880
  if (r) {
15770
15881
  const a = r.wholeColumns ? 0 : this.sheet.displayRow(r.from.row), c = r.wholeColumns ? s - 1 : this.sheet.displayRow(Math.min(r.to.row, this.sheetRows() - 1)), h = r.wholeRows ? this.firstDataColumn() : this.sheet.modelColumn(r.from.col), d = r.wholeRows ? this.lastDataColumn() : this.sheet.modelColumn(r.to.col);
@@ -15789,7 +15900,7 @@ class Qa {
15789
15900
  }
15790
15901
  /** The suggestion list (a function name is typed) or the argument hint (inside a call). */
15791
15902
  renderPopups() {
15792
- const e = this.scope.getDomService().domService, t = this.input, s = t.value, o = s.startsWith("="), i = this.caret(), r = o && this.collapsed() && !this.composing ? Mi(s, i) : void 0, l = r == null ? void 0 : r.prefix.toUpperCase(), a = this.suggestions.map((p) => p.name).join();
15903
+ const e = this.scope.getDomService().domService, t = this.input, s = t.value, o = s.startsWith("="), i = this.caret(), r = o && this.collapsed() && !this.composing ? Ei(s, i) : void 0, l = r == null ? void 0 : r.prefix.toUpperCase(), a = this.suggestions.map((p) => p.name).join();
15793
15904
  this.suggestions = l ? this.functions.filter((p) => p.name.startsWith(l)).slice(0, Za) : [], this.suggestions.map((p) => p.name).join() !== a && (this.active = 0);
15794
15905
  const c = this.suggestions.length > 0 && !this.listClosed;
15795
15906
  e.setAttribute(t, "role", "combobox"), e.setAttribute(t, "aria-autocomplete", "list"), e.setAttribute(t, "aria-controls", this.ids.list), e.setAttribute(t, "aria-expanded", String(c)), this.list.style.display = c ? "" : "none", c ? this.renderList() : t.removeAttribute("aria-activedescendant");
@@ -15881,7 +15992,7 @@ class tc {
15881
15992
  if (t != null && t.getEditRenderer)
15882
15993
  return !1;
15883
15994
  const s = this.tableScope.tableOptions.getEditRenderer;
15884
- return !s || s === Er;
15995
+ return !s || s === Ar;
15885
15996
  }
15886
15997
  /**
15887
15998
  * Opens the editor on a body cell.
@@ -16026,7 +16137,7 @@ class tc {
16026
16137
  if (typeof t == "function")
16027
16138
  return t(e);
16028
16139
  const s = this.tableScope.getTypedCellValue(e.rowIndex, e.columnIndex), o = s !== e.value, i = t ?? (s instanceof Date && !o ? "date" : typeof s == "number" || ((l = e.columnDef) == null ? void 0 : l.editInputPipe) === Ga ? "number" : "text");
16029
- return i === "number" ? new Ha() : i === "date" ? new Wa() : new Po();
16140
+ return i === "number" ? new Ha() : i === "date" ? new Wa() : new Vo();
16030
16141
  }
16031
16142
  /** The row moved (sorting, filter, inserted rows): the editor follows it; `false` if it is gone. */
16032
16143
  followRow(e) {
@@ -16125,7 +16236,7 @@ class tc {
16125
16236
  this.session || e.target !== t.hostElement || !this.options.startOnType || this.onTypeToEdit(e);
16126
16237
  }
16127
16238
  isMac() {
16128
- return Lo();
16239
+ return ko();
16129
16240
  }
16130
16241
  /** A key on the focused table (no editor open): printable keys open the editor ("enter" mode). */
16131
16242
  onTypeToEdit(e) {
@@ -16322,7 +16433,7 @@ function Ce(n, e) {
16322
16433
  function rc(n) {
16323
16434
  return ie(n);
16324
16435
  }
16325
- function Ti(n, e, t) {
16436
+ function Mi(n, e, t) {
16326
16437
  const s = Math.pow(10, Math.trunc(e)), o = me(Math.abs(n) * s), i = (t ? Math.ceil(o) : Math.floor(o)) / s;
16327
16438
  return n < 0 ? -i : i;
16328
16439
  }
@@ -16345,9 +16456,9 @@ function nc(n, e) {
16345
16456
  return (h) => h === t;
16346
16457
  const o = t === null ? "" : t, i = /^(<=|>=|<>|<|>|=)?(.*)$/s.exec(o), r = i[1] ?? "", l = i[2];
16347
16458
  if (l === "" && (r === "" || r === "="))
16348
- return (h) => Qs(h);
16459
+ return (h) => Zs(h);
16349
16460
  if (l === "" && r === "<>")
16350
- return (h) => !Qs(h);
16461
+ return (h) => !Zs(h);
16351
16462
  const a = s(l);
16352
16463
  if (a !== void 0 && !(r === "" && !/^[\s\d.+-]/.test(l)))
16353
16464
  return (h) => {
@@ -16401,7 +16512,7 @@ function qr(n) {
16401
16512
  }
16402
16513
  return e;
16403
16514
  }
16404
- function no(n, e, t = 0) {
16515
+ function ro(n, e, t = 0) {
16405
16516
  const s = e.toLowerCase();
16406
16517
  let o = 0, i = t, r = -1, l = 0;
16407
16518
  for (; i < s.length; ) {
@@ -16420,7 +16531,7 @@ function no(n, e, t = 0) {
16420
16531
  }
16421
16532
  function Zr(n) {
16422
16533
  const e = qr(n);
16423
- return (t) => no(e, t);
16534
+ return (t) => ro(e, t);
16424
16535
  }
16425
16536
  function lc(n) {
16426
16537
  return /(^|[^~])[*?]/.test(n);
@@ -16445,7 +16556,7 @@ function tt(n, e, t, s) {
16445
16556
  }
16446
16557
  }
16447
16558
  }
16448
- function lo(n, e) {
16559
+ function no(n, e) {
16449
16560
  const t = _(n);
16450
16561
  if (typeof t == "string" && e && lc(t)) {
16451
16562
  const s = Zr(t);
@@ -16453,15 +16564,15 @@ function lo(n, e) {
16453
16564
  }
16454
16565
  return (s) => !w(s) && s !== null && Xt(s, t) === 0;
16455
16566
  }
16456
- function Ii(n) {
16567
+ function Ti(n) {
16457
16568
  return typeof n == "string" ? 1 : typeof n == "boolean" ? 2 : 0;
16458
16569
  }
16459
16570
  function Qr(n, e, t = !1) {
16460
- const s = _(e), o = Ii(s);
16571
+ const s = _(e), o = Ti(s);
16461
16572
  let i = -1;
16462
16573
  for (let r = 0; r < n.length; r++) {
16463
16574
  const l = n.get(r);
16464
- if (l === null || w(l) || Ii(l) !== o) continue;
16575
+ if (l === null || w(l) || Ti(l) !== o) continue;
16465
16576
  const a = Xt(l, s);
16466
16577
  if (!w(a))
16467
16578
  if (t ? a >= 0 : a <= 0) i = r;
@@ -16469,7 +16580,7 @@ function Qr(n, e, t = !1) {
16469
16580
  }
16470
16581
  return i;
16471
16582
  }
16472
- function ao(n, e) {
16583
+ function lo(n, e) {
16473
16584
  for (let t = 0; t < n.length; t++) if (e(n.get(t))) return t;
16474
16585
  return -1;
16475
16586
  }
@@ -16479,7 +16590,7 @@ function en(n, e) {
16479
16590
  function tn(n, e) {
16480
16591
  return { length: n.cols, get: (t) => n.get(e, t) };
16481
16592
  }
16482
- function Di(n) {
16593
+ function Ii(n) {
16483
16594
  const e = fe(n);
16484
16595
  return e.rows === 1 ? tn(e, 0) : e.cols === 1 ? en(e, 0) : te("A range of one row or one column is needed");
16485
16596
  }
@@ -16492,7 +16603,7 @@ function Oe(n, e) {
16492
16603
  const s = K(t, e);
16493
16604
  return w(s) ? s : s < 0 ? pe("A negative date") : s;
16494
16605
  }
16495
- function ki(n) {
16606
+ function Di(n) {
16496
16607
  return !Number.isFinite(n) || n < 0 || n > 2958465 ? pe("The date is out of range") : new _t(n);
16497
16608
  }
16498
16609
  function ac(n, e, t) {
@@ -16512,7 +16623,7 @@ function ac(n, e, t) {
16512
16623
  let r = K(n, t);
16513
16624
  if (w(r)) return r;
16514
16625
  i[4] && (r *= 100);
16515
- const l = ((h = i[3]) == null ? void 0 : h.length) ?? 0, a = Mo(r, l);
16626
+ const l = ((h = i[3]) == null ? void 0 : h.length) ?? 0, a = Eo(r, l);
16516
16627
  let c = Math.abs(a).toFixed(l);
16517
16628
  if (i[1]) {
16518
16629
  const [d, u] = c.split(".");
@@ -16611,7 +16722,7 @@ const Us = (n) => ({
16611
16722
  COUNTBLANK: { min: 1, max: 1, fn: (n) => {
16612
16723
  let e = 0;
16613
16724
  return rt(n, (t) => {
16614
- Qs(t) && e++;
16725
+ Zs(t) && e++;
16615
16726
  }), e;
16616
16727
  } },
16617
16728
  SUMPRODUCT: {
@@ -16636,15 +16747,15 @@ const Us = (n) => ({
16636
16747
  },
16637
16748
  ROUND: { min: 2, max: 2, fn: (n, e) => {
16638
16749
  const t = Ce(n, e);
16639
- return w(t) ? t : W(Mo(t[0], t[1]));
16750
+ return w(t) ? t : W(Eo(t[0], t[1]));
16640
16751
  } },
16641
16752
  ROUNDUP: { min: 2, max: 2, fn: (n, e) => {
16642
16753
  const t = Ce(n, e);
16643
- return w(t) ? t : W(Ti(t[0], t[1], !0));
16754
+ return w(t) ? t : W(Mi(t[0], t[1], !0));
16644
16755
  } },
16645
16756
  ROUNDDOWN: { min: 2, max: 2, fn: (n, e) => {
16646
16757
  const t = Ce(n, e);
16647
- return w(t) ? t : W(Ti(t[0], t[1], !1));
16758
+ return w(t) ? t : W(Mi(t[0], t[1], !1));
16648
16759
  } },
16649
16760
  INT: Us((n) => Math.floor(me(n))),
16650
16761
  ABS: Us(Math.abs),
@@ -16824,18 +16935,18 @@ const Us = (n) => ({
16824
16935
  }
16825
16936
  },
16826
16937
  // ------------------------------------------------------------------------------------------------ lookup
16827
- VLOOKUP: { min: 3, max: 4, fn: (n, e) => Li(n, e, !0) },
16828
- HLOOKUP: { min: 3, max: 4, fn: (n, e) => Li(n, e, !1) },
16938
+ VLOOKUP: { min: 3, max: 4, fn: (n, e) => ki(n, e, !0) },
16939
+ HLOOKUP: { min: 3, max: 4, fn: (n, e) => ki(n, e, !1) },
16829
16940
  XLOOKUP: {
16830
16941
  min: 3,
16831
16942
  max: 4,
16832
16943
  fn: (n) => {
16833
- const e = Di(n[1]);
16944
+ const e = Ii(n[1]);
16834
16945
  if (w(e)) return e;
16835
16946
  const t = fe(n[2]), s = fe(n[1]).cols === 1 && fe(n[1]).rows > 1;
16836
16947
  if ((s ? t.rows : t.cols) !== e.length)
16837
16948
  return te("XLOOKUP: the result range must have the size of the lookup range");
16838
- const o = ao(e, lo(n[0], !1));
16949
+ const o = lo(e, no(n[0], !1));
16839
16950
  return o < 0 ? n.length > 3 ? n[3] : it() : t.rows === 1 && t.cols === 1 ? t.get(0, 0) : s ? t.cols === 1 ? t.get(o, 0) : new ct(t.row + o, t.col, 1, t.cols, (i, r) => t.get(i - t.row, r - t.col)) : t.rows === 1 ? t.get(0, o) : new ct(t.row, t.col + o, t.rows, 1, (i, r) => t.get(i - t.row, r - t.col));
16840
16951
  }
16841
16952
  },
@@ -16855,14 +16966,14 @@ const Us = (n) => ({
16855
16966
  min: 2,
16856
16967
  max: 3,
16857
16968
  fn: (n, e) => {
16858
- const t = Di(n[1]);
16969
+ const t = Ii(n[1]);
16859
16970
  if (w(t)) return t;
16860
16971
  const s = n.length > 2 ? K(n[2], e) : 1;
16861
16972
  if (w(s)) return s;
16862
16973
  const o = _(n[0]);
16863
16974
  if (w(o)) return o;
16864
16975
  let i;
16865
- return s === 0 ? i = ao(t, lo(o, !0)) : i = Qr(t, o, s < 0), i < 0 ? it() : i + 1;
16976
+ return s === 0 ? i = lo(t, no(o, !0)) : i = Qr(t, o, s < 0), i < 0 ? it() : i + 1;
16866
16977
  }
16867
16978
  },
16868
16979
  // ------------------------------------------------------------------------------------------------ text
@@ -16894,8 +17005,8 @@ const Us = (n) => ({
16894
17005
  }) ?? s.join(e);
16895
17006
  }
16896
17007
  },
16897
- LEFT: { min: 1, max: 2, fn: (n, e) => Fi(n, e, !0) },
16898
- RIGHT: { min: 1, max: 2, fn: (n, e) => Fi(n, e, !1) },
17008
+ LEFT: { min: 1, max: 2, fn: (n, e) => Li(n, e, !0) },
17009
+ RIGHT: { min: 1, max: 2, fn: (n, e) => Li(n, e, !1) },
16899
17010
  MID: {
16900
17011
  min: 3,
16901
17012
  max: 3,
@@ -16909,8 +17020,8 @@ const Us = (n) => ({
16909
17020
  }
16910
17021
  },
16911
17022
  LEN: Qt((n) => n.length),
16912
- FIND: { min: 2, max: 3, fn: (n, e) => Oi(n, e, !1) },
16913
- SEARCH: { min: 2, max: 3, fn: (n, e) => Oi(n, e, !0) },
17023
+ FIND: { min: 2, max: 3, fn: (n, e) => Fi(n, e, !1) },
17024
+ SEARCH: { min: 2, max: 3, fn: (n, e) => Fi(n, e, !0) },
16914
17025
  SUBSTITUTE: {
16915
17026
  min: 3,
16916
17027
  max: 4,
@@ -16967,7 +17078,7 @@ const Us = (n) => ({
16967
17078
  const t = Ce(n, e);
16968
17079
  if (w(t)) return t;
16969
17080
  let s = Math.trunc(t[0]);
16970
- return s < 0 || s > 9999 ? pe("DATE: year out of range") : (s < 1900 && (s += 1900), ki(Tt(s, Math.trunc(t[1]), 1) + Math.trunc(t[2]) - 1));
17081
+ return s < 0 || s > 9999 ? pe("DATE: year out of range") : (s < 1900 && (s += 1900), Di(Tt(s, Math.trunc(t[1]), 1) + Math.trunc(t[2]) - 1));
16971
17082
  }
16972
17083
  },
16973
17084
  YEAR: { min: 1, max: 1, fn: (n, e) => {
@@ -17003,7 +17114,7 @@ const Us = (n) => ({
17003
17114
  const s = K(n[1], e);
17004
17115
  if (w(s)) return s;
17005
17116
  const { y: o, m: i } = Ke(t);
17006
- return ki(Tt(o, i + Math.trunc(s) + 1, 0));
17117
+ return Di(Tt(o, i + Math.trunc(s) + 1, 0));
17007
17118
  }
17008
17119
  },
17009
17120
  DATEDIF: {
@@ -17046,7 +17157,7 @@ function Ks(n, e) {
17046
17157
  });
17047
17158
  return s || (t.length ? e(t) : te("No logical values"));
17048
17159
  }
17049
- function Li(n, e, t) {
17160
+ function ki(n, e, t) {
17050
17161
  const s = fe(n[1]), o = K(n[2], e);
17051
17162
  if (w(o)) return o;
17052
17163
  const i = n.length > 3 ? n[3] === null ? !1 : ht(n[3]) : !0;
@@ -17056,10 +17167,10 @@ function Li(n, e, t) {
17056
17167
  if (r > (t ? s.cols : s.rows)) return new I("#REF!", "The index is beyond the table");
17057
17168
  const l = t ? en(s, 0) : tn(s, 0), a = _(n[0]);
17058
17169
  if (w(a)) return a;
17059
- const c = i ? Qr(l, a) : ao(l, lo(a, !0));
17170
+ const c = i ? Qr(l, a) : lo(l, no(a, !0));
17060
17171
  return c < 0 ? it() : t ? s.get(c, r - 1) : s.get(r - 1, c);
17061
17172
  }
17062
- function Fi(n, e, t) {
17173
+ function Li(n, e, t) {
17063
17174
  const s = ie(n[0]);
17064
17175
  if (w(s)) return s;
17065
17176
  const o = n.length > 1 ? K(n[1], e) : 1;
@@ -17068,7 +17179,7 @@ function Fi(n, e, t) {
17068
17179
  const i = Math.trunc(o);
17069
17180
  return t ? s.slice(0, i) : i === 0 ? "" : s.slice(-i);
17070
17181
  }
17071
- function Oi(n, e, t) {
17182
+ function Fi(n, e, t) {
17072
17183
  const s = ie(n[0]);
17073
17184
  if (w(s)) return s;
17074
17185
  const o = ie(n[1]);
@@ -17087,10 +17198,10 @@ function Oi(n, e, t) {
17087
17198
  function dc(n, e, t) {
17088
17199
  const s = n.concat({ kind: "star" }), o = s.findIndex((h) => h.kind === "star"), i = s.slice(o);
17089
17200
  let r = t + o, l = e.length;
17090
- if (r > l || !no(i, e, r)) return -1;
17201
+ if (r > l || !ro(i, e, r)) return -1;
17091
17202
  for (; r < l; ) {
17092
17203
  const h = Math.ceil((r + l) / 2);
17093
- no(i, e, h) ? r = h : l = h - 1;
17204
+ ro(i, e, h) ? r = h : l = h - 1;
17094
17205
  }
17095
17206
  const a = r, c = e.toLowerCase();
17096
17207
  for (let h = t; h + o <= a; h++) {
@@ -17111,7 +17222,7 @@ function Se(n, e) {
17111
17222
  function gc(n) {
17112
17223
  return n.replace(/^\s*=/, "");
17113
17224
  }
17114
- function Ni(n, e, t) {
17225
+ function Oi(n, e, t) {
17115
17226
  let s;
17116
17227
  try {
17117
17228
  s = zt(gc(n), !0);
@@ -17299,7 +17410,7 @@ function bc(n, e) {
17299
17410
  if (n === void 0) return null;
17300
17411
  if (typeof n == "number") return Number.isNaN(n) ? new I("#NUM!", `${e} returned NaN`) : n;
17301
17412
  if (Qe(n)) return n;
17302
- const t = vr(n);
17413
+ const t = xr(n);
17303
17414
  return w(t) && !w(n) ? new I("#VALUE!", `${e} returned no number, text or boolean`) : t;
17304
17415
  }
17305
17416
  function At(n, e) {
@@ -17317,7 +17428,7 @@ function At(n, e) {
17317
17428
  return n;
17318
17429
  }
17319
17430
  }
17320
- function co(n, e, t = !1) {
17431
+ function ao(n, e, t = !1) {
17321
17432
  let s;
17322
17433
  try {
17323
17434
  s = zt(n, !0);
@@ -17341,7 +17452,7 @@ function zs(n, e, t, s) {
17341
17452
  return { ...n, row: o, col: i };
17342
17453
  }
17343
17454
  function sn(n, e, t, s) {
17344
- return co(n, (o) => {
17455
+ return ao(n, (o) => {
17345
17456
  if (o.kind === "ref")
17346
17457
  return zs(o, e, t, s) ?? gs;
17347
17458
  if (o.kind === "range") {
@@ -17381,7 +17492,7 @@ function Cc(n, e, t, s) {
17381
17492
  function Sc(n, e) {
17382
17493
  if (e.kind === "moveCells") {
17383
17494
  const { from: o, to: i } = e, r = i[0] - o.r1, l = i[1] - o.c1, a = (c) => c.row >= o.r1 && c.row <= o.r2 && c.col >= o.c1 && c.col <= o.c2;
17384
- return co(n, (c) => {
17495
+ return ao(n, (c) => {
17385
17496
  if (c.kind === "ref" && a(c))
17386
17497
  return { ...c, row: c.row + r, col: c.col + l };
17387
17498
  if (c.kind === "range" && c.from.row >= 0 && c.from.col >= 0 && a(c.from) && a(c.to))
@@ -17398,7 +17509,7 @@ function Sc(n, e) {
17398
17509
  e.kind === "insertRows" || e.kind === "insertColumns",
17399
17510
  t ? re : q
17400
17511
  );
17401
- return co(n, (o) => {
17512
+ return ao(n, (o) => {
17402
17513
  if (o.kind === "ref") {
17403
17514
  const i = s.point(t ? o.row : o.col);
17404
17515
  return i === void 0 ? gs : t ? { ...o, row: i } : { ...o, col: i };
@@ -17430,11 +17541,11 @@ class Ht {
17430
17541
  return t;
17431
17542
  }
17432
17543
  }
17433
- const Vi = 64;
17544
+ const Ni = 64;
17434
17545
  function Dt(n) {
17435
17546
  return typeof n == "string" && n.length > 1 && n[0] === "=";
17436
17547
  }
17437
- class Bo {
17548
+ class _o {
17438
17549
  /**
17439
17550
  * @param {SheetDataSourceIf} source - the data
17440
17551
  * @param {Partial<CellFormulaOptionsIf> & { now?: () => Date, random?: () => number }} [options] - own functions
@@ -17466,7 +17577,7 @@ class Bo {
17466
17577
  * SheetEngine.fromArrays([[1, 2, "=A1+B1"]]).getValue(0, 2); // 3
17467
17578
  */
17468
17579
  static fromArrays(e, t) {
17469
- const s = new Bo({
17580
+ const s = new _o({
17470
17581
  getRowCount: () => e.length,
17471
17582
  getColumnCount: () => e.reduce((o, i) => Math.max(o, (i == null ? void 0 : i.length) ?? 0), 0),
17472
17583
  getInput: (o, i) => {
@@ -17531,7 +17642,7 @@ class Bo {
17531
17642
  * @returns {unknown} the value
17532
17643
  */
17533
17644
  getValue(e, t) {
17534
- return ri(this.read(e, t));
17645
+ return ii(this.read(e, t));
17535
17646
  }
17536
17647
  /**
17537
17648
  * True if the cell holds a formula.
@@ -17559,7 +17670,7 @@ class Bo {
17559
17670
  */
17560
17671
  evaluate(e, t) {
17561
17672
  const s = e.trim().startsWith("=") ? e : `=${e}`;
17562
- return ri(Ni(s, (t == null ? void 0 : t[0]) ?? 0, this.env).evaluate());
17673
+ return ii(Oi(s, (t == null ? void 0 : t[0]) ?? 0, this.env).evaluate());
17563
17674
  }
17564
17675
  /**
17565
17676
  * The cells and ranges a formula reads.
@@ -17615,7 +17726,7 @@ class Bo {
17615
17726
  dataValue(e, t) {
17616
17727
  if (e >= this.source.getRowCount()) return null;
17617
17728
  const s = this.source.getInput(e, t);
17618
- return s === "" ? null : typeof s == "string" && s.startsWith("'=") ? s.slice(1) : vr(s);
17729
+ return s === "" ? null : typeof s == "string" && s.startsWith("'=") ? s.slice(1) : xr(s);
17619
17730
  }
17620
17731
  fieldColumn(e) {
17621
17732
  var s, o;
@@ -17623,7 +17734,7 @@ class Bo {
17623
17734
  return t === void 0 && (t = ((o = (s = this.source).getFieldColumn) == null ? void 0 : o.call(s, e)) ?? -1, this.fieldColumns.set(e, t)), t;
17624
17735
  }
17625
17736
  add(e, t, s, o) {
17626
- const i = Se(e, t), r = Ni(s, e, this.env), l = { row: e, col: t, source: s, compiled: r, value: o, rangeKeys: [] };
17737
+ const i = Se(e, t), r = Oi(s, e, this.env), l = { row: e, col: t, source: s, compiled: r, value: o, rangeKeys: [] };
17627
17738
  this.formulas.set(i, l), this.formulaColumns.set(t, (this.formulaColumns.get(t) ?? 0) + 1);
17628
17739
  for (const a of r.singles) {
17629
17740
  let c = this.singleDependents.get(a);
@@ -17633,7 +17744,7 @@ class Bo {
17633
17744
  const c = `${a.r1}:${a.c1}:${a.r2}:${a.c2}`;
17634
17745
  let h = this.rangeNodes.get(c);
17635
17746
  if (!h)
17636
- if (h = { ...a, key: c, dependents: /* @__PURE__ */ new Set() }, this.rangeNodes.set(c, h), a.c2 - a.c1 + 1 > Vi)
17747
+ if (h = { ...a, key: c, dependents: /* @__PURE__ */ new Set() }, this.rangeNodes.set(c, h), a.c2 - a.c1 + 1 > Ni)
17637
17748
  this.wideRanges.push(h);
17638
17749
  else
17639
17750
  for (let d = a.c1; d <= a.c2; d++) {
@@ -17656,7 +17767,7 @@ class Bo {
17656
17767
  for (const o of e.rangeKeys) {
17657
17768
  const i = this.rangeNodes.get(o);
17658
17769
  if (i && (i.dependents.delete(t), !i.dependents.size))
17659
- if (this.rangeNodes.delete(o), i.c2 - i.c1 + 1 > Vi)
17770
+ if (this.rangeNodes.delete(o), i.c2 - i.c1 + 1 > Ni)
17660
17771
  this.wideRanges.splice(this.wideRanges.indexOf(i), 1);
17661
17772
  else
17662
17773
  for (let r = i.c1; r <= i.c2; r++) {
@@ -17708,7 +17819,7 @@ class Bo {
17708
17819
  let c = 0;
17709
17820
  const h = (f) => {
17710
17821
  const g = this.formulas.get(f), p = g.value;
17711
- g.value = g.compiled.evaluate(), c++, Pi(p, g.value) || a.push([g.row, g.col]);
17822
+ g.value = g.compiled.evaluate(), c++, Vi(p, g.value) || a.push([g.row, g.col]);
17712
17823
  }, d = /* @__PURE__ */ new Set(), u = (f) => {
17713
17824
  const g = /* @__PURE__ */ new Map();
17714
17825
  f.forEach((m) => g.set(m, 0)), f.forEach((m) => {
@@ -17733,7 +17844,7 @@ class Bo {
17733
17844
  const f = new Set(Array.from(i).filter((p) => !d.has(p))), g = new I("#CIRC!", "Circular reference");
17734
17845
  for (const p of this.cycles(f, o)) {
17735
17846
  const m = this.formulas.get(p), b = m.value;
17736
- m.value = g, c++, Pi(b, g) || a.push([m.row, m.col]), d.add(p), f.delete(p);
17847
+ m.value = g, c++, Vi(b, g) || a.push([m.row, m.col]), d.add(p), f.delete(p);
17737
17848
  }
17738
17849
  u(f);
17739
17850
  }
@@ -17773,7 +17884,7 @@ class Bo {
17773
17884
  return l;
17774
17885
  }
17775
17886
  }
17776
- function Pi(n, e) {
17887
+ function Vi(n, e) {
17777
17888
  return Object.is(n, e) ? !0 : w(n) && w(e) ? n.code === e.code && n.message === e.message : G(n) && G(e) ? n.serial === e.serial : !1;
17778
17889
  }
17779
17890
  function xc(n, e, t) {
@@ -17805,11 +17916,11 @@ class kt {
17805
17916
  this.input = e, this.row = t, this.col = s, this.value = o;
17806
17917
  }
17807
17918
  }
17808
- class $o {
17919
+ class Bo {
17809
17920
  constructor(e, t, s) {
17810
17921
  this.tableModel = e, this.body = t, this.options = s, this.dataColumns = [], this.engineColumns = /* @__PURE__ */ new Map(), this.properties = [], this.propertyColumns = /* @__PURE__ */ new Map(), this.formulaColumns = [], this.calculatedColumns = [], this.rowIndex = /* @__PURE__ */ new Map(), this.rowsLength = -1, this.columnCount = -1, this.syncing = !1;
17811
17922
  const o = t instanceof $e ? t : void 0;
17812
- this.sheetBody = o, this.engine = new Bo({
17923
+ this.sheetBody = o, this.engine = new _o({
17813
17924
  getRowCount: () => this.rowCountOf(),
17814
17925
  getColumnCount: () => this.dataColumns.length,
17815
17926
  getInput: (i, r) => this.readInput(i, r),
@@ -17832,7 +17943,7 @@ class $o {
17832
17943
  console.warn("GuiExpert Table – cellFormulas: only a flat body (an object array or an array of arrays) has cell formulas; a tree, a row grouping or a pivot table has none.");
17833
17944
  return;
17834
17945
  }
17835
- const o = new $o(e, s, t);
17946
+ const o = new Bo(e, s, t);
17836
17947
  return o.sync(), s.sheetCells = o, o;
17837
17948
  }
17838
17949
  /** Detaches the sheet from the body (table destroyed). */
@@ -18322,9 +18433,9 @@ function Ic(n) {
18322
18433
  function on(n, e, t) {
18323
18434
  return t && (t.rows > 1 || t.columns > 1) && n > 0 && e > 0 && (n === 1 && e === 1 || t.rows % n === 0 && t.columns % e === 0) ? { rows: t.rows, columns: t.columns } : { rows: n, columns: e };
18324
18435
  }
18325
- const _i = (n) => n.replace(/\r\n?/g, `
18436
+ const Pi = (n) => n.replace(/\r\n?/g, `
18326
18437
  `).replace(/\n$/, "");
18327
- class Bi {
18438
+ class _i {
18328
18439
  /**
18329
18440
  * @param {TableScope} tableScope - the table
18330
18441
  * @param {ClipboardOptionsIf} options - complete options
@@ -18431,7 +18542,7 @@ class Bi {
18431
18542
  const o = this.tableScope, i = e ? Ec(e) : t ? Tc(t) : [];
18432
18543
  if (!i.length || !i[0].length)
18433
18544
  return [];
18434
- const r = this.memory && e && _i(e) === this.memory.text ? this.memory : void 0, l = r == null ? void 0 : r.cut, a = o.tableModel.getBodyModel(), c = a.getRowCount(), h = this.getPasteColumns(), d = this.getPasteAnchor(h, s);
18545
+ const r = this.memory && e && Pi(e) === this.memory.text ? this.memory : void 0, l = r == null ? void 0 : r.cut, a = o.tableModel.getBodyModel(), c = a.getRowCount(), h = this.getPasteColumns(), d = this.getPasteAnchor(h, s);
18435
18546
  if (!d || !h.length)
18436
18547
  return [];
18437
18548
  const [u, f] = d, g = l ? void 0 : d[2], p = i[0].length, m = h.indexOf(f), b = h[Math.min(h.length - 1, m + p - 1)], y = o.isBatchEditActive();
@@ -18529,7 +18640,7 @@ class Bi {
18529
18640
  onClipboardEvent(e, t) {
18530
18641
  var a;
18531
18642
  const s = this.tableScope, o = s.hostElement, i = typeof e.composedPath == "function" ? e.composedPath()[0] : e.target, r = !!this.proxy && i === this.proxy;
18532
- if (!r && ($i(o) !== o || s.isEditing() || (a = s.isEventInDetail) != null && a.call(s, e)) || !r && (s.getHeaderFocus() || !s.getActiveBodyCell()) || t !== "paste" && !this.hasBuiltInCopyService())
18643
+ if (!r && (Bi(o) !== o || s.isEditing() || (a = s.isEventInDetail) != null && a.call(s, e)) || !r && (s.getHeaderFocus() || !s.getActiveBodyCell()) || t !== "paste" && !this.hasBuiltInCopyService())
18533
18644
  return;
18534
18645
  const l = e.clipboardData;
18535
18646
  try {
@@ -18548,7 +18659,7 @@ class Bi {
18548
18659
  restoreFocus() {
18549
18660
  clearTimeout(this.restoreTimer), this.armedKind = void 0;
18550
18661
  const e = this.proxy;
18551
- e && (e.value = "", $i(e) === e && this.tableScope.hostElement.focus({ preventScroll: !0 }));
18662
+ e && (e.value = "", Bi(e) === e && this.tableScope.hostElement.focus({ preventScroll: !0 }));
18552
18663
  }
18553
18664
  ensureProxy() {
18554
18665
  if (!this.proxy || !this.proxy.isConnected) {
@@ -18562,7 +18673,7 @@ class Bi {
18562
18673
  var r;
18563
18674
  const s = this.tableScope;
18564
18675
  this.cancelCut(), this.memory = e.processed ? void 0 : {
18565
- text: _i(e.text),
18676
+ text: Pi(e.text),
18566
18677
  values: e.values,
18567
18678
  cut: t ? { range: e.range, columns: e.columns, rows: this.rowObjectsOf(e.range) } : void 0
18568
18679
  }, (r = this.memory) != null && r.cut && this.showCutFrame();
@@ -18771,7 +18882,7 @@ class Bi {
18771
18882
  (e = this.cutFrame) == null || e.remove(), this.cutFrame = void 0;
18772
18883
  }
18773
18884
  }
18774
- function $i(n) {
18885
+ function Bi(n) {
18775
18886
  return n.getRootNode().activeElement ?? null;
18776
18887
  }
18777
18888
  function Dc(n) {
@@ -18786,7 +18897,7 @@ function Dc(n) {
18786
18897
  function kc(n) {
18787
18898
  return n ? { "meta+z": "UNDO", "meta+shift+z": "REDO" } : { "ctrl+z": "UNDO", "ctrl+y": "REDO", "ctrl+shift+z": "REDO" };
18788
18899
  }
18789
- class Ho {
18900
+ class $o {
18790
18901
  constructor() {
18791
18902
  this.maxSteps = 100, this.maxCells = 1e6, this.onConflict = "skip", this.recordApiChanges = !1;
18792
18903
  }
@@ -18800,7 +18911,7 @@ class Ho {
18800
18911
  static create(e) {
18801
18912
  if (!e)
18802
18913
  return;
18803
- const t = new Ho();
18914
+ const t = new $o();
18804
18915
  if (typeof e == "object")
18805
18916
  for (const [s, o] of Object.entries(e))
18806
18917
  o !== void 0 && (t[s] = o);
@@ -18895,7 +19006,7 @@ function Fc(n) {
18895
19006
  const e = rn(n);
18896
19007
  return e ? new Set(e) : null;
18897
19008
  }
18898
- class Hi {
19009
+ class $i {
18899
19010
  /**
18900
19011
  * @param {string} label - for buttons and announcements
18901
19012
  * @param {CellChangeSource} source - what started the step
@@ -18955,7 +19066,7 @@ class Hi {
18955
19066
  return a.get(S.row) ?? -1;
18956
19067
  }, d = (S) => (c === void 0 && (c = Fc(o)), !!c && c.has(S)), u = (S) => {
18957
19068
  var E;
18958
- return !!S && (nr(S) ? !!o.defaultEditable : !!((E = S.editable) != null && E.call(S)));
19069
+ return !!S && (rr(S) ? !!o.defaultEditable : !!((E = S.editable) != null && E.call(S)));
18959
19070
  }, f = [], g = [];
18960
19071
  let p = 0;
18961
19072
  const m = t === "undo" ? [...this.entries].reverse() : this.entries;
@@ -19064,7 +19175,7 @@ class Pc {
19064
19175
  this.canUndo = e, this.canRedo = t, this.undoLabel = s, this.redoLabel = o, this.size = i;
19065
19176
  }
19066
19177
  }
19067
- const Wi = {
19178
+ const Hi = {
19068
19179
  edit: "Edit",
19069
19180
  fill: "Fill",
19070
19181
  paste: "Paste",
@@ -19080,13 +19191,13 @@ class _c {
19080
19191
  return this.steps.reduce((e, t) => e + t.cellCount, 0);
19081
19192
  }
19082
19193
  undo(e) {
19083
- return Gi([...this.steps].reverse().map((t) => t.undo(e)));
19194
+ return Wi([...this.steps].reverse().map((t) => t.undo(e)));
19084
19195
  }
19085
19196
  redo(e) {
19086
- return Gi(this.steps.map((t) => t.redo(e)));
19197
+ return Wi(this.steps.map((t) => t.redo(e)));
19087
19198
  }
19088
19199
  }
19089
- function Gi(n) {
19200
+ function Wi(n) {
19090
19201
  let e;
19091
19202
  for (const t of n)
19092
19203
  t.range && (e = e ? new M(
@@ -19128,7 +19239,7 @@ class Bc {
19128
19239
  record(e, t, s) {
19129
19240
  if (this.running || t === "undo" || t === "redo" || !e.length || s === !1)
19130
19241
  return;
19131
- if (this.folding instanceof Hi && t !== "commit") {
19242
+ if (this.folding instanceof $i && t !== "commit") {
19132
19243
  this.folding.append(e), this.lastRecorded = this.folding;
19133
19244
  return;
19134
19245
  }
@@ -19138,7 +19249,7 @@ class Bc {
19138
19249
  }
19139
19250
  if (t === "api" && !(s ?? this.options.recordApiChanges))
19140
19251
  return;
19141
- const o = new Hi(Wi[t] ?? "Change", t, e);
19252
+ const o = new $i(Hi[t] ?? "Change", t, e);
19142
19253
  this.lastRecorded = o, this.add(o);
19143
19254
  }
19144
19255
  /**
@@ -19160,7 +19271,7 @@ class Bc {
19160
19271
  * @param {boolean} [undoable] - as in {@link record}
19161
19272
  */
19162
19273
  recordPending(e, t, s) {
19163
- this.running || !e.length || s === !1 || t === "api" && !(s ?? this.options.recordApiChanges) || this.add(new Vc(Wi[t] ?? "Change", t, e));
19274
+ this.running || !e.length || s === !1 || t === "api" && !(s ?? this.options.recordApiChanges) || this.add(new Vc(Hi[t] ?? "Change", t, e));
19164
19275
  }
19165
19276
  /**
19166
19277
  * Records everything `fn` changes as one step (see {@link TableApi.batchUndoable}).
@@ -19331,19 +19442,19 @@ function Ph(n) {
19331
19442
  const Ne = class Ne extends Ql {
19332
19443
  constructor(e, t, s, o, i, r = new Re(), l = new ya()) {
19333
19444
  var u;
19334
- if (super(e, t, new Ys(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = lt.getInstance(), this.listenerAbortController = new AbortController(), this.destroyed = !1, this.selectionService = new ge(this), this.api = new Xl(this), this.initialized = !1, this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, this.editingOptions = Vo.create(nt(this.tableOptions, "editing")), this.subscribers = /* @__PURE__ */ new Set(), this.clipboardOptions = fs.create(nt(this.tableOptions, "clipboard")), this.undoOptions = Ho.create(nt(this.tableOptions, "undo")), this.lastTabKeyTime = 0, this.lastContextmenu = Date.now(), this.allExpanded = !0, this.selectionEventsHeld = 0, t.setTableScope(this), this.liveAnnouncer = new ro(e.ownerDocument, this.ariaIds.liveRegion(), s), this.eventListener = Hc(i ?? new ss(), this.subscribers), this.stateService = new oo(this), this.mouseHandler = new Hn(this), this.inputHandler = new ra(this), this.resizeHandler = new ba(this, o.resizeEventDebounceDelay), this.shortcutService = new da(this), this.rowDragService = new Sa(this), this.batchEditService = new Aa(this), this.fillHandleService = new Pa(this), this.editingOptions) {
19445
+ if (super(e, t, new Xs(s), o), this.eventListener = i, this.copyService = r, this.excelService = l, this.licenseManager = lt.getInstance(), this.listenerAbortController = new AbortController(), this.destroyed = !1, this.selectionService = new ge(this), this.api = new Wl(this), this.initialized = !1, this.mouseStartAction = "", this.mouseStartWidth = -1, this.mouseStartColumnIndex = -1, this.dragFrom = -1, this.dragTo = -1, this.lastDragFrom = -1, this.lastDragTo = -1, this.firstDraggingRendering = !0, this.editingOptions = No.create(nt(this.tableOptions, "editing")), this.subscribers = /* @__PURE__ */ new Set(), this.clipboardOptions = fs.create(nt(this.tableOptions, "clipboard")), this.undoOptions = $o.create(nt(this.tableOptions, "undo")), this.lastTabKeyTime = 0, this.lastContextmenu = Date.now(), this.allExpanded = !0, this.selectionEventsHeld = 0, t.setTableScope(this), this.liveAnnouncer = new io(e.ownerDocument, this.ariaIds.liveRegion(), s), this.eventListener = Hc(i ?? new ss(), this.subscribers), this.stateService = new so(this), this.mouseHandler = new Nn(this), this.inputHandler = new ra(this), this.resizeHandler = new ba(this, o.resizeEventDebounceDelay), this.shortcutService = new da(this), this.rowDragService = new Sa(this), this.batchEditService = new Aa(this), this.fillHandleService = new Pa(this), this.editingOptions) {
19335
19446
  this.cellEditorService = new tc(this, this.editingOptions);
19336
19447
  const f = t.getBodyModel();
19337
19448
  this.editingOptions.defaultEditable && "defaultEditable" in f && (f.defaultEditable = !0), this.setHostAriaAttribute("aria-description", this.getSheetTexts().gridEditingHint());
19338
19449
  }
19339
- this.clipboardOptions && (this.clipboardService = new Bi(this, this.clipboardOptions, !0)), this.undoOptions && (this.undoService = new Bc(this, this.undoOptions));
19450
+ this.clipboardOptions && (this.clipboardService = new _i(this, this.clipboardOptions, !0)), this.undoOptions && (this.undoService = new Bc(this, this.undoOptions));
19340
19451
  const a = Ht.create(nt(o, "cellFormulas"));
19341
- if (a && (o.masterDetail ? console.warn("GuiExpert Table – cellFormulas: no cell formulas with master/detail.") : this.tableSheet = $o.create(t, a)), o != null && o.masterDetail && (this.masterDetailService = new Ba(
19452
+ if (a && (o.masterDetail ? console.warn("GuiExpert Table – cellFormulas: no cell formulas with master/detail.") : this.tableSheet = Bo.create(t, a)), o != null && o.masterDetail && (this.masterDetailService = new Ba(
19342
19453
  this,
19343
19454
  (f, g, p, m) => new Ne(
19344
19455
  f,
19345
19456
  g,
19346
- new gi(),
19457
+ new fi(),
19347
19458
  // a nested table without an own direction takes the direction of this table (since 1.1.98) – the app's
19348
19459
  // options object itself stays the nested table's options (later changes, e.g. externalFilterFunction, count)
19349
19460
  this.nestedTableOptions(p),
@@ -19396,7 +19507,7 @@ const Ne = class Ne extends Ql {
19396
19507
  *
19397
19508
  * @return {TableScope} - The newly created TableScope instance.
19398
19509
  */
19399
- static create(e, t, s = new qe(), o = new ss(), i = new gi(), r = new Re()) {
19510
+ static create(e, t, s = new qe(), o = new ss(), i = new fi(), r = new Re()) {
19400
19511
  return new Ne(e, t, i, s, o, r);
19401
19512
  }
19402
19513
  /**
@@ -20003,7 +20114,7 @@ const Ne = class Ne extends Ql {
20003
20114
  activateBodyCell(e, t) {
20004
20115
  var r;
20005
20116
  const s = this.tableModel.getBodyModel();
20006
- if (s.isRowCheckable(e) && (this.tableOptions.showCheckboxWihoutExtraColumn && t === this.getFirstDataColumnIndex() || sr(s.getCellRenderer(e, t))))
20117
+ if (s.isRowCheckable(e) && (this.tableOptions.showCheckboxWihoutExtraColumn && t === this.getFirstDataColumnIndex() || tr(s.getCellRenderer(e, t))))
20007
20118
  return this.toggleRowCheckbox(e, t, "body"), !0;
20008
20119
  if ((r = this.masterDetailService) != null && r.isMasterAt(e))
20009
20120
  return this.toggleDetail(e, "keyboard");
@@ -20072,7 +20183,7 @@ const Ne = class Ne extends Ql {
20072
20183
  var a;
20073
20184
  const i = this.tableModel.getAreaModel("header"), r = i.getValueAt(e, t);
20074
20185
  if (r && typeof r == "object" && r.toggle && r.visibility !== "always" && "toggleHeaderGroup" in i) {
20075
- const c = new Js(null, this);
20186
+ const c = new Ys(null, this);
20076
20187
  return c.rowIdx = e, c.colIdx = t, c.areaIdent = "header", c.areaModel = i, this.toggleHeaderGroup(c), this.setHeaderFocus(e, t), !0;
20077
20188
  }
20078
20189
  const l = this.tableModel.getColumnDef(t);
@@ -20390,7 +20501,7 @@ const Ne = class Ne extends Ql {
20390
20501
  * @since 1.1.99
20391
20502
  */
20392
20503
  getClipboardService() {
20393
- return this.clipboardService || (this.clipboardService = new Bi(this, fs.create(!0), !1)), this.clipboardService;
20504
+ return this.clipboardService || (this.clipboardService = new _i(this, fs.create(!0), !1)), this.clipboardService;
20394
20505
  }
20395
20506
  /** Marks values as pending (batch edit): pipe, validation, then the batch edit service. */
20396
20507
  markPending(e, t, s = !1, o = "edit", i) {
@@ -20753,7 +20864,7 @@ const Ne = class Ne extends Ql {
20753
20864
  * @return {GeMouseEvent} - The created GeMouseEvent object.
20754
20865
  */
20755
20866
  createGeMouseEvent(e) {
20756
- const t = new yo();
20867
+ const t = new wo();
20757
20868
  if (t.originalEvent = e, e) {
20758
20869
  const s = this.getMouseEventTarget(e);
20759
20870
  if ([t.areaIdent, t.sideIdent] = this.getAreaAndSideIdentByAttr(s), t.rowIndex = this.getNumberByAttr(s, "data-row-index"), t.columnIndex = this.getNumberByAttr(s, "data-col-index"), t.action = this.getStringByAttr(s, "data-ge-action"), t.areaIdent) {
@@ -20869,7 +20980,7 @@ const Ne = class Ne extends Ql {
20869
20980
  */
20870
20981
  setRowGroupBy(e) {
20871
20982
  const t = this.tableModel.getBodyModel();
20872
- return ne(t) ? (t.setGroupBy(e), io(this.tableModel), this.invalidateAggregates(), this.tableModel.recalcPadding(), this.repaintHard(), this.stateService.markDirty("tree"), this.stateService.markDirty("columns"), !0) : !1;
20983
+ return ne(t) ? (t.setGroupBy(e), oo(this.tableModel), this.invalidateAggregates(), this.tableModel.recalcPadding(), this.repaintHard(), this.stateService.markDirty("tree"), this.stateService.markDirty("columns"), !0) : !1;
20873
20984
  }
20874
20985
  /**
20875
20986
  * Pivots a pivot table again (see {@link TableApi.setPivotConfig}): new columns, header and totals in the same model,
@@ -21021,7 +21132,7 @@ const Ne = class Ne extends Ql {
21021
21132
  const s = typeof e == "number" ? e : (this.tableModel.getColumnDefs() ?? []).findIndex((d) => d.property === e), o = this.tableModel.getColumnDef(s);
21022
21133
  if (!o)
21023
21134
  return !1;
21024
- const i = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, r = o.sortState ?? "", l = t ?? i[(i.indexOf(r) + 1) % i.length], a = new so(s, l), c = this.tableModel.doSort([a]);
21135
+ const i = o.sortStatesOrder ? o.sortStatesOrder : this.tableOptions.sortOrder, r = o.sortState ?? "", l = t ?? i[(i.indexOf(r) + 1) % i.length], a = new to(s, l), c = this.tableModel.doSort([a]);
21025
21136
  return c && (this.invalidateAggregates(), this.lastSortCompareFn = void 0, (h = this.tableModel.getColumnDefs()) == null || h.forEach((d) => d.sortState = ""), o.sortState = l), this.repaint(), c && this.stateService.sortedByColumn(l ? o.property : void 0), c && this.announce(this.ariaTexts.sorted(this.getColumnAriaLabel(s), l)), !0;
21026
21137
  }
21027
21138
  /**
@@ -21033,13 +21144,7 @@ const Ne = class Ne extends Ql {
21033
21144
  * @return {void}
21034
21145
  */
21035
21146
  scrollToPixel(e, t) {
21036
- const s = this.getContentScrollRangeY(), o = this.getScrollerRangeY();
21037
- if (s > 0 && o > 0) {
21038
- const i = Math.min(s, Math.max(0, t)), r = i / s * o;
21039
- this.scrollViewport.scrollTo(Xs(e, this.isRtl()), r), this.pendingContentScroll = { scrollTop: this.scrollViewport.scrollTop, contentTop: i }, this.adjustAfterScrolling();
21040
- return;
21041
- }
21042
- this.scrollViewport.scrollTo(Xs(e, this.isRtl()), t);
21147
+ this.setContentScrollPosition(e, t) && this.adjustAfterScrolling();
21043
21148
  }
21044
21149
  /**
21045
21150
  * Scrolls to a column and a row: the row becomes the first row of the viewport, the column the first column of the
@@ -21078,7 +21183,8 @@ const Ne = class Ne extends Ql {
21078
21183
  }
21079
21184
  adjustAfterScrolling() {
21080
21185
  var t, s;
21081
- super.adjustAfterScrolling();
21186
+ if (super.adjustAfterScrolling(), this.adjustingRowNumberWidth)
21187
+ return;
21082
21188
  const e = this.scrollViewport;
21083
21189
  (s = (t = this.eventListener).onScroll) == null || s.call(t, new na(
21084
21190
  this.scrollTop,
@@ -21356,7 +21462,7 @@ const Ne = class Ne extends Ql {
21356
21462
  }
21357
21463
  const e = [];
21358
21464
  (t = this.tableModel.getColumnDefs()) == null || t.forEach((s, o) => {
21359
- s.sortState && e.push(new so(o, s.sortState));
21465
+ s.sortState && e.push(new to(o, s.sortState));
21360
21466
  }), e.length && this.tableModel.doSort(e);
21361
21467
  }
21362
21468
  /**
@@ -21425,7 +21531,7 @@ const Ne = class Ne extends Ql {
21425
21531
  }
21426
21532
  };
21427
21533
  Ne.actionsBlockedWhileLoading = ["START_EDITING", "TOGGLE_SELECTION", "ACTIVATE_CELL", "MOVE_ROW_UP", "MOVE_ROW_DOWN", "FILL_DOWN", "FILL_RIGHT", "CLEAR_CELLS", "CLEAR_AND_EDIT", "CUT_2_CLIPBOARD", "PASTE_FROM_CLIPBOARD", "UNDO", "REDO"], Ne.filterAnnouncementDelayInMs = 400;
21428
- let Ui = Ne;
21534
+ let Gi = Ne;
21429
21535
  class _h extends ss {
21430
21536
  constructor(e) {
21431
21537
  super(), this.onCheckboxChangedCallback = e, super.onCheckboxChanged = (t) => {
@@ -21701,7 +21807,7 @@ xs.themes = ["light", "combat", "paper", "blackboard"], xs.vars = {
21701
21807
  --ge-table-row-number-color: #c9c86f;
21702
21808
  }`
21703
21809
  };
21704
- let Ki = xs;
21810
+ let Ui = xs;
21705
21811
  class Je {
21706
21812
  constructor(e, t = !0, s, o, i = 0, r = !1, l = !1) {
21707
21813
  this.data = e, this.expanded = t, this.children = s, this.parent = o, this.deep = i, this.checked = r, this.keep = l, this.type = "TreeRow";
@@ -21760,7 +21866,7 @@ class Et {
21760
21866
  return typeof e == "function" ? e : () => e;
21761
21867
  }
21762
21868
  }
21763
- const Bh = new T(500, "px"), $h = new T(400, "px"), Wc = new T(300, "px"), Hh = new T(290, "px"), Wh = new T(280, "px"), Gh = new T(270, "px"), Uh = new T(260, "px"), Kh = new T(250, "px"), zh = new T(240, "px"), jh = new T(230, "px"), Xh = new T(220, "px"), Yh = new T(210, "px"), ho = new T(200, "px"), Jh = new T(190, "px"), qh = new T(180, "px"), Zh = new T(170, "px"), Qh = new T(160, "px"), ed = new T(150, "px"), td = new T(140, "px"), sd = new T(130, "px"), od = new T(120, "px"), id = new T(110, "px"), rd = new T(100, "px"), nd = new T(90, "px"), ld = new T(80, "px"), ad = new T(70, "px"), cd = new T(60, "px"), hd = new T(50, "px"), dd = new T(40, "px"), ud = new T(30, "px"), fd = new T(20, "px"), gd = new T(10, "px"), pd = new T(0, "px");
21869
+ const Bh = new T(500, "px"), $h = new T(400, "px"), Wc = new T(300, "px"), Hh = new T(290, "px"), Wh = new T(280, "px"), Gh = new T(270, "px"), Uh = new T(260, "px"), Kh = new T(250, "px"), zh = new T(240, "px"), jh = new T(230, "px"), Xh = new T(220, "px"), Yh = new T(210, "px"), co = new T(200, "px"), Jh = new T(190, "px"), qh = new T(180, "px"), Zh = new T(170, "px"), Qh = new T(160, "px"), ed = new T(150, "px"), td = new T(140, "px"), sd = new T(130, "px"), od = new T(120, "px"), id = new T(110, "px"), rd = new T(100, "px"), nd = new T(90, "px"), ld = new T(80, "px"), ad = new T(70, "px"), cd = new T(60, "px"), hd = new T(50, "px"), dd = new T(40, "px"), ud = new T(30, "px"), fd = new T(20, "px"), gd = new T(10, "px"), pd = new T(0, "px");
21764
21870
  class Gc {
21765
21871
  flattenTree(e, t = []) {
21766
21872
  var s;
@@ -21781,7 +21887,7 @@ class Gc {
21781
21887
  }
21782
21888
  class mt extends Ts {
21783
21889
  constructor(e, t, s, o = []) {
21784
- super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.type = "AreaModelTree", this.sorterService = new Ao(), this.service = new Gc(), this.filteredFlattenRows = [], this.flattenRows = [], this.keepMarked = !1, this.showValuesCache = /* @__PURE__ */ new Map(), this.properties = o.map((i) => i.property), this.refreshDisplayedRows();
21890
+ super(e, o, s), this.areaIdent = e, this.rows = t, this.defaultRowHeight = s, this.columnDefs = o, this.type = "AreaModelTree", this.sorterService = new Ro(), this.service = new Gc(), this.filteredFlattenRows = [], this.flattenRows = [], this.keepMarked = !1, this.showValuesCache = /* @__PURE__ */ new Map(), this.properties = o.map((i) => i.property), this.refreshDisplayedRows();
21785
21891
  }
21786
21892
  changeColumnOrder(e, t) {
21787
21893
  this.arrayMove(this.properties, e, t), super.changeColumnOrder(e, t);
@@ -21904,7 +22010,7 @@ class mt extends Ts {
21904
22010
  if (this.getRowCount() !== this.getUnfilteredRowCount())
21905
22011
  return !1;
21906
22012
  const s = this.getDragRows(e);
21907
- return s.length > 0 && fr(s, this.getRowByIndex(t.rowIndex));
22013
+ return s.length > 0 && ur(s, this.getRowByIndex(t.rowIndex));
21908
22014
  }
21909
22015
  /**
21910
22016
  * Row drag: moves tree rows (with their children) in front of / behind the target row (siblings) or into it
@@ -21925,13 +22031,13 @@ class mt extends Ts {
21925
22031
  moveRows(e, t) {
21926
22032
  if (!this.canMoveRows(e, t))
21927
22033
  return !1;
21928
- const s = this.getRowByIndex(t.rowIndex), o = il(this.rows, this.getDragRows(e), s, t.position);
22034
+ const s = this.getRowByIndex(t.rowIndex), o = Zn(this.rows, this.getDragRows(e), s, t.position);
21929
22035
  return o && (this.showValuesCache.clear(), this.invalidateColumnValues(), this.refreshDisplayedRows(!0)), o;
21930
22036
  }
21931
22037
  /** The topmost tree rows of the display indices (children travel with their parent). */
21932
22038
  getDragRows(e) {
21933
22039
  const t = ut(e, this.getRowCount()).map((s) => this.getRowByIndex(s)).filter((s) => !!s);
21934
- return ur(t);
22040
+ return dr(t);
21935
22041
  }
21936
22042
  getValueAt(e, t) {
21937
22043
  const s = this.getRowByIndex(e);
@@ -22001,13 +22107,13 @@ class mt extends Ts {
22001
22107
  switch (i || (i = { byRow: /* @__PURE__ */ new Map() }, this.showValuesCache.set(t, i)), o.mode) {
22002
22108
  case "percentOfColumnTotal":
22003
22109
  case "percentOfGrandTotal":
22004
- return i.total === void 0 && (i.total = Ro(this.getLeafRows(!0).map((r) => this.getRawValueOfRow(r, t)))), typeof s == "number" && !Number.isNaN(s) && i.total !== 0 ? s / i.total : void 0;
22110
+ return i.total === void 0 && (i.total = vo(this.getLeafRows(!0).map((r) => this.getRawValueOfRow(r, t)))), typeof s == "number" && !Number.isNaN(s) && i.total !== 0 ? s / i.total : void 0;
22005
22111
  case "percentOfRowTotal":
22006
22112
  return s;
22007
22113
  // only a pivot has row totals
22008
22114
  default: {
22009
22115
  if (!i.byRow.has(e)) {
22010
- const r = e.parent ? this.getDisplayedChildren(e.parent) : this.getDisplayedRootRows(), l = hr(r.map((a) => this.getRawValueOfRow(a, t)), o.mode);
22116
+ const r = e.parent ? this.getDisplayedChildren(e.parent) : this.getDisplayedRootRows(), l = cr(r.map((a) => this.getRawValueOfRow(a, t)), o.mode);
22011
22117
  r.forEach((a, c) => i.byRow.set(a, l[c]));
22012
22118
  }
22013
22119
  return i.byRow.get(e);
@@ -22200,7 +22306,7 @@ class mt extends Ts {
22200
22306
  s.children && this.treeSortWith(s.children, t);
22201
22307
  }
22202
22308
  }
22203
- class zi extends j {
22309
+ class Ki extends j {
22204
22310
  /**
22205
22311
  * Creates an instance of AreaModelObjectArrayWithColumndefs.
22206
22312
  *
@@ -23075,7 +23181,7 @@ class ps extends nn {
23075
23181
  let i;
23076
23182
  if (typeof s == "number") {
23077
23183
  const c = this.getBody();
23078
- i = Yn(s, o.map((h) => ({ aggregator: h.aggregator, getValue: this.createIndexGetter(c, h) })));
23184
+ i = Gn(s, o.map((h) => ({ aggregator: h.aggregator, getValue: this.createIndexGetter(c, h) })));
23079
23185
  } else
23080
23186
  i = Ms(s, o);
23081
23187
  let r = 0;
@@ -23123,7 +23229,7 @@ class xe {
23123
23229
  C > -1 && (e.defaultRowHeights.footer = C);
23124
23230
  }
23125
23231
  }
23126
- if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((C) => new ye(C, C.toUpperCase(), ho)) : (i = e.rows) != null && i.length ? e.columnDefs = Object.keys(e.rows[0]).map((C) => new ye(C, C.toUpperCase(), ho)) : e.columnDefs = []), xe.addRowNumberColumn(e), e.rowDrag) {
23232
+ if (e.columnDefs === void 0 && ((o = e.properties) != null && o.length ? e.columnDefs = e.properties.map((C) => new ye(C, C.toUpperCase(), co)) : (i = e.rows) != null && i.length ? e.columnDefs = Object.keys(e.rows[0]).map((C) => new ye(C, C.toUpperCase(), co)) : e.columnDefs = []), xe.addRowNumberColumn(e), e.rowDrag) {
23127
23233
  const C = (r = e.columnDefs) == null ? void 0 : r.find((S) => !O(S) && !we(S));
23128
23234
  C && (C.rowDrag = C.rowDrag || !0);
23129
23235
  }
@@ -23142,7 +23248,7 @@ class xe {
23142
23248
  ) : e.headerAreaModel = new ae("header"), e.columnLetters && e.headerAreaModel instanceof ee) {
23143
23249
  let C = 0;
23144
23250
  const S = (e.columnDefs ?? []).map((E) => O(E) || we(E) ? "" : Be(C++));
23145
- e.headerAreaModel = new Lr(
23251
+ e.headerAreaModel = new kr(
23146
23252
  "header",
23147
23253
  [S, ...e.headerAreaModel.arr],
23148
23254
  e.defaultRowHeights.header,
@@ -23166,7 +23272,7 @@ class xe {
23166
23272
  e.columnDefs
23167
23273
  ), (((p = e.columnDefs[ls(e.columnDefs)]) == null ? void 0 : p.property) === "CheckboxColumn" || (m = e.tableOptions) != null && m.showCheckboxWihoutExtraColumn) && (e.bodyAreaModel.rowSelectionModel = new Bt(C));
23168
23274
  } else
23169
- e.bodyAreaModel = new zi(
23275
+ e.bodyAreaModel = new Ki(
23170
23276
  "body",
23171
23277
  e.rows,
23172
23278
  e.columnDefs,
@@ -23534,7 +23640,7 @@ class xe {
23534
23640
  static createByObjectArray(e, t = [], s = [], o = 0, i = 0, r = !1, l = new Pe(), a, c = []) {
23535
23641
  let h;
23536
23642
  t != null && t.length ? h = new ee("header", t, l.header, a) : a != null && a.length ? h = new ee("header", [a.map((f) => f.headerLabel)], l.header, a) : h = new ae();
23537
- const d = s ? new ee("footer", s, l.footer, a) : new ae(), u = new zi("body", e, a, l.body);
23643
+ const d = s ? new ee("footer", s, l.footer, a) : new ae(), u = new Ki("body", e, a, l.body);
23538
23644
  return new Ye(
23539
23645
  h,
23540
23646
  u,
@@ -23550,7 +23656,7 @@ class xe {
23550
23656
  }
23551
23657
  class zc {
23552
23658
  constructor(e, t, s = 200, o = 300, i = 0, r = 0) {
23553
- this.items = e, this.cellRenderer = t, this.coverWidth = s, this.coverHeight = o, this.width = i, this.firstRowPaddingTop = r, this.rowSelectionModel = void 0, this.areaIdent = "body", this.filteredItems = [], this.sorterService = new Ao(), this.filteredItems = e;
23659
+ this.items = e, this.cellRenderer = t, this.coverWidth = s, this.coverHeight = o, this.width = i, this.firstRowPaddingTop = r, this.rowSelectionModel = void 0, this.areaIdent = "body", this.filteredItems = [], this.sorterService = new Ro(), this.filteredItems = e;
23554
23660
  }
23555
23661
  setParentWidth(e) {
23556
23662
  this.width = e;
@@ -23722,7 +23828,7 @@ class jc {
23722
23828
  recalcHeightAndPadding() {
23723
23829
  }
23724
23830
  getPadding() {
23725
- return new eo(0, 0, 0, 0);
23831
+ return new Qs(0, 0, 0, 0);
23726
23832
  }
23727
23833
  getContentHeightInPixel() {
23728
23834
  return this.paddingTop + this.bodyModel.getRowCount() * this.bodyModel.coverHeight;
@@ -23985,7 +24091,7 @@ const Cd = { body: ["ge-table-text-align-left"] }, Sd = { body: ["ge-table-text-
23985
24091
  body: ["ge-table-text-align-right"],
23986
24092
  footer: ["ge-table-text-align-right"]
23987
24093
  };
23988
- class ji {
24094
+ class zi {
23989
24095
  constructor() {
23990
24096
  this.type = "CheckboxCellRenderer";
23991
24097
  }
@@ -24001,7 +24107,7 @@ class ji {
24001
24107
  }
24002
24108
  class Ed {
24003
24109
  constructor() {
24004
- this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new T(50, "px"), this.minWidth = new T(50, "px"), this.maxWidth = new T(100, "px"), this.rendererMap = new se(new ji(), new ji(), void 0), this.classes = new se(
24110
+ this.type = "CheckboxColumnDef", this.property = "CheckboxColumn", this.headerLabel = "", this.width = new T(50, "px"), this.minWidth = new T(50, "px"), this.maxWidth = new T(100, "px"), this.rendererMap = new se(new zi(), new zi(), void 0), this.classes = new se(
24005
24111
  [],
24006
24112
  ["ge-table-text-align-left"],
24007
24113
  []
@@ -24206,7 +24312,7 @@ class ce {
24206
24312
  }
24207
24313
  }
24208
24314
  const vs = class vs {
24209
- constructor(e = new To()) {
24315
+ constructor(e = new Mo()) {
24210
24316
  this.headerGroupOptions = e;
24211
24317
  }
24212
24318
  render(e, t, s, o, i, r, l) {
@@ -24248,10 +24354,10 @@ const vs = class vs {
24248
24354
  }
24249
24355
  };
24250
24356
  vs.toggleHeaderGroup = "toggleHeaderGroup";
24251
- let uo = vs;
24357
+ let ho = vs;
24252
24358
  class eh {
24253
- constructor(e = "header", t, s = [], o, i = new To()) {
24254
- this.areaIdent = e, this.groups = t, this.columnDefs = s, this.defaultRowHeight = o, this.headerGroupOptions = i, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new uo(this.headerGroupOptions), this.groupExts = ce.buildGroupExts(t), this.init();
24359
+ constructor(e = "header", t, s = [], o, i = new Mo()) {
24360
+ this.areaIdent = e, this.groups = t, this.columnDefs = s, this.defaultRowHeight = o, this.headerGroupOptions = i, this.gammaCells = !0, this.arr = [], this.groupExts = [], this.cellGroupExtCellRenderer = new ho(this.headerGroupOptions), this.groupExts = ce.buildGroupExts(t), this.init();
24255
24361
  }
24256
24362
  sort(e) {
24257
24363
  }
@@ -24320,7 +24426,7 @@ class eh {
24320
24426
  return "" + this.getValueAt(e, t);
24321
24427
  }
24322
24428
  getYPosByRowIndex(e) {
24323
- return 0;
24429
+ return e * this.defaultRowHeight;
24324
24430
  }
24325
24431
  getRowHeight(e) {
24326
24432
  return this.defaultRowHeight;
@@ -24427,7 +24533,7 @@ class eh {
24427
24533
  return this.columnDefs = s, s;
24428
24534
  }
24429
24535
  }
24430
- class Wo {
24536
+ class Ho {
24431
24537
  constructor(e) {
24432
24538
  this.getStorageKeyFn = e;
24433
24539
  }
@@ -24502,7 +24608,7 @@ class Wo {
24502
24608
  // }
24503
24609
  // }
24504
24610
  }
24505
- class Dd extends Wo {
24611
+ class Dd extends Ho {
24506
24612
  constructor(e) {
24507
24613
  super(e), this.SCROLL_STATE = "scrollState", this.scrollOffset = [0, 0], this.load();
24508
24614
  }
@@ -24529,7 +24635,7 @@ class th {
24529
24635
  this.mode = e, this.rowIds = t, this.allCollapsed = s, this.allExpanded = o;
24530
24636
  }
24531
24637
  }
24532
- class kd extends Wo {
24638
+ class kd extends Ho {
24533
24639
  constructor(e) {
24534
24640
  super(e), this.COLLAPSED_EXPANDED_STATE = "collapsedExpandedState", this.collapsedExpandedState = new th(), this.stored = !1, this.load();
24535
24641
  }
@@ -24573,7 +24679,7 @@ class kd extends Wo {
24573
24679
  this.stored = !0, this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE, this.collapsedExpandedState);
24574
24680
  }
24575
24681
  }
24576
- class Ld extends Wo {
24682
+ class Ld extends Ho {
24577
24683
  constructor(e) {
24578
24684
  super(e), this.SORTING_STATE = "sortingState", this.sortItems = [], this.load();
24579
24685
  }
@@ -25072,7 +25178,7 @@ class Yd {
25072
25178
  this.r = e, this.g = t, this.b = s;
25073
25179
  }
25074
25180
  }
25075
- class Xi {
25181
+ class ji {
25076
25182
  constructor(e, t, s, o) {
25077
25183
  this.minValue = e, this.minColor = t, this.maxValue = s, this.maxColor = o;
25078
25184
  }
@@ -25089,7 +25195,7 @@ class os {
25089
25195
  }
25090
25196
  /** The colour for `value` on a min → middle → max gradient (e.g. red → white → green for negative / positive). */
25091
25197
  static getThreeColorGradientRGB(e, t) {
25092
- return e < t.middleValue ? os.getTwoColorGradientRGB(e, new Xi(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? os.getTwoColorGradientRGB(e, new Xi(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
25198
+ return e < t.middleValue ? os.getTwoColorGradientRGB(e, new ji(t.minValue, t.minColor, t.middleValue, t.middleColor)) : e > t.middleValue ? os.getTwoColorGradientRGB(e, new ji(t.middleValue, t.middleColor, t.maxValue, t.maxColor)) : `rgb(${t.middleColor.r}, ${t.middleColor.g}, ${t.middleColor.b})`;
25093
25199
  }
25094
25200
  }
25095
25201
  class Jd {
@@ -25151,7 +25257,7 @@ class ih {
25151
25257
  return s.join("");
25152
25258
  }
25153
25259
  }
25154
- const Yi = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
25260
+ const Xi = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
25155
25261
  class Lt {
25156
25262
  constructor(e, t, s = "Edit Item") {
25157
25263
  this.idKey = e, this.dialogTitle = s, this.fieldPaths = [], this.object = Lt.deepCopy(t);
@@ -25185,7 +25291,7 @@ class Lt {
25185
25291
  generateFields(e, t = []) {
25186
25292
  const s = [];
25187
25293
  for (const o in e) {
25188
- if (!Object.prototype.hasOwnProperty.call(e, o) || this.idKey === o || Yi.has(o))
25294
+ if (!Object.prototype.hasOwnProperty.call(e, o) || this.idKey === o || Xi.has(o))
25189
25295
  continue;
25190
25296
  const i = [...t, o], r = i.join(" "), l = e[o];
25191
25297
  if (typeof l == "object" && l !== null) {
@@ -25217,7 +25323,7 @@ class Lt {
25217
25323
  return s;
25218
25324
  }
25219
25325
  setNestedValue(e, t, s) {
25220
- if (t.some((i) => Yi.has(i)))
25326
+ if (t.some((i) => Xi.has(i)))
25221
25327
  return;
25222
25328
  let o = e;
25223
25329
  for (let i = 0; i < t.length - 1; i++) {
@@ -26158,7 +26264,7 @@ class bn {
26158
26264
  static createTableModel(e) {
26159
26265
  var d, u;
26160
26266
  const t = e.rows ?? [];
26161
- let s = e.columnDefs ? [...e.columnDefs] : t.length ? Object.keys(t[0]).map((f) => new ye(f, f.toUpperCase(), ho)) : [];
26267
+ let s = e.columnDefs ? [...e.columnDefs] : t.length ? Object.keys(t[0]).map((f) => new ye(f, f.toUpperCase(), co)) : [];
26162
26268
  const o = e.defaultRowHeights ?? ((d = e.tableOptions) == null ? void 0 : d.defaultRowHeights) ?? new Pe();
26163
26269
  let i = e.fixedLeftColumnCount ?? 0;
26164
26270
  e.rowNumbersVisible && !O(s[0]) && (s = [new Is(e.rowNumbersVisible === !0 ? {} : e.rowNumbersVisible), ...s], i++);
@@ -26187,7 +26293,7 @@ class bn {
26187
26293
  getSelectionModel: e.getSelectionModel,
26188
26294
  tableOptions: e.tableOptions
26189
26295
  });
26190
- return io(h), h;
26296
+ return oo(h), h;
26191
26297
  }
26192
26298
  /**
26193
26299
  * Hides the columns of the grouped properties (and shows the ones that are no longer grouped) and sets the header of
@@ -26204,7 +26310,7 @@ class bn {
26204
26310
  * tableApi.repaintHard();
26205
26311
  */
26206
26312
  static updateLayout(e) {
26207
- return io(e);
26313
+ return oo(e);
26208
26314
  }
26209
26315
  static footerConfig(e) {
26210
26316
  const t = e.footerAggregates;
@@ -26232,7 +26338,7 @@ class dh extends ye {
26232
26338
  ), this.pivot = s, this.type = "PivotColumnDef";
26233
26339
  }
26234
26340
  }
26235
- const uh = 1e3, Go = "Total";
26341
+ const uh = 1e3, Wo = "Total";
26236
26342
  function fh(n) {
26237
26343
  const e = n ?? [];
26238
26344
  if (!e.length)
@@ -26242,7 +26348,7 @@ function fh(n) {
26242
26348
  const i = typeof s == "string" || typeof s == "function" ? { value: s } : s;
26243
26349
  if (!i || typeof i.value != "string" && typeof i.value != "function")
26244
26350
  throw new Error(`Pivot: value ${o} has no value (a property path or a function).`);
26245
- const r = xo(i.aggregator ?? "sum"), l = typeof i.value == "string" ? i.value : `value${o}`;
26351
+ const r = So(i.aggregator ?? "sum"), l = typeof i.value == "string" ? i.value : `value${o}`;
26246
26352
  let a = i.name ?? `${r.name}(${l})`;
26247
26353
  if (t.has(a)) {
26248
26354
  let c = 2;
@@ -26260,7 +26366,7 @@ function fh(n) {
26260
26366
  });
26261
26367
  }
26262
26368
  const gh = "(empty)";
26263
- class fo {
26369
+ class uo {
26264
26370
  /**
26265
26371
  * Groups the rows by the row and column fields and aggregates the values. Use {@link pivotRows}.
26266
26372
  *
@@ -26278,7 +26384,7 @@ class fo {
26278
26384
  });
26279
26385
  for (const l of this.columnLeaves)
26280
26386
  for (let a = l; a && !this.shownColumns.has(a); a = a.parent) this.shownColumns.add(a);
26281
- go(this.columnGroups, this.columnParentsPostOrder, () => !0), go(this.rowGroups, this.rowParentsPostOrder, () => !0), is(this.rowGroups, this.rowLeaves), this.compute(s);
26387
+ fo(this.columnGroups, this.columnParentsPostOrder, () => !0), fo(this.rowGroups, this.rowParentsPostOrder, () => !0), is(this.rowGroups, this.rowLeaves), this.compute(s);
26282
26388
  }
26283
26389
  /**
26284
26390
  * Computes all cells again (same keys) – after a filter change or changed values.
@@ -26451,15 +26557,15 @@ class fo {
26451
26557
  }
26452
26558
  }
26453
26559
  function tu(n, e, t) {
26454
- return new fo(n ?? [], e, t);
26560
+ return new uo(n ?? [], e, t);
26455
26561
  }
26456
26562
  function is(n, e) {
26457
26563
  for (const t of n)
26458
26564
  t.isLeaf() ? e.push(t) : is(t.children, e);
26459
26565
  }
26460
- function go(n, e, t) {
26566
+ function fo(n, e, t) {
26461
26567
  for (const s of n)
26462
- s.isLeaf() || !t(s) || (go(s.children, e, t), e.push(s));
26568
+ s.isLeaf() || !t(s) || (fo(s.children, e, t), e.push(s));
26463
26569
  }
26464
26570
  function wn(n, e) {
26465
26571
  return "pivot:" + JSON.stringify([...n.idParts, e.name]);
@@ -26467,7 +26573,7 @@ function wn(n, e) {
26467
26573
  function yn(n, e) {
26468
26574
  return "pivot:subtotal:" + JSON.stringify([...n.idParts, e.name]);
26469
26575
  }
26470
- function po(n) {
26576
+ function go(n) {
26471
26577
  return "pivot:total:" + JSON.stringify([n.name]);
26472
26578
  }
26473
26579
  function ph(n) {
@@ -26483,7 +26589,7 @@ function mh(n) {
26483
26589
  }
26484
26590
  function Sn(n, e, t, s = {}) {
26485
26591
  var m;
26486
- const o = n.values, i = o.length > 1, r = e.totalLabel ?? Go, l = mh(e), a = (((m = e.columnFields) == null ? void 0 : m.length) ?? 0) > 0, c = s.valueWidth ?? new T(100, "px"), h = [...t], d = t.map((b) => ({ data: b.headerLabel, property: b.property })), u = (b, y, C) => {
26592
+ const o = n.values, i = o.length > 1, r = e.totalLabel ?? Wo, l = mh(e), a = (((m = e.columnFields) == null ? void 0 : m.length) ?? 0) > 0, c = s.valueWidth ?? new T(100, "px"), h = [...t], d = t.map((b) => ({ data: b.headerLabel, property: b.property })), u = (b, y, C) => {
26487
26593
  var S;
26488
26594
  return h.push(new dh(b, y, C, ((S = s.widths) == null ? void 0 : S.get(b)) ?? c)), { data: y, property: b };
26489
26595
  }, f = (b, y, C, S, E) => i ? {
@@ -26517,9 +26623,9 @@ function Sn(n, e, t, s = {}) {
26517
26623
  const y = g(b);
26518
26624
  y && d.push(y);
26519
26625
  }
26520
- e.totalColumn !== !1 && (d.push(f(r, "total", void 0, (b) => po(b))), (e.totalColumn === void 0 || e.totalColumn === "fixed") && (p = o.length));
26626
+ e.totalColumn !== !1 && (d.push(f(r, "total", void 0, (b) => go(b))), (e.totalColumn === void 0 || e.totalColumn === "fixed") && (p = o.length));
26521
26627
  } else
26522
- o.forEach((b, y) => d.push(u(po(b), b.label, { kind: "total", value: b, valueIndex: y })));
26628
+ o.forEach((b, y) => d.push(u(go(b), b.label, { kind: "total", value: b, valueIndex: y })));
26523
26629
  return { columnDefs: h, cellGroups: d, fixedRightColumnCount: p };
26524
26630
  }
26525
26631
  class bh extends Ye {
@@ -26599,13 +26705,13 @@ class bh extends Ye {
26599
26705
  relayout() {
26600
26706
  const e = this.getPivotBody(), t = this.headerAreaModel, s = e.getConfig(), o = this.leadingColumnDefs.find(dt);
26601
26707
  o != null && o.autoHeaderLabel && (o.headerLabel = Cn(s.rowFields ?? []));
26602
- const i = new Set(t.getToggleGroupStates().filter((d) => d.closed).map((d) => d.id)), r = this.columnDefs.filter(wo), l = new Map(r.map((d) => [d.property, d.width])), a = new Set(r.filter((d) => !to(d)).map((d) => d.property)), c = Sn(
26708
+ const i = new Set(t.getToggleGroupStates().filter((d) => d.closed).map((d) => d.id)), r = this.columnDefs.filter(bo), l = new Map(r.map((d) => [d.property, d.width])), a = new Set(r.filter((d) => !eo(d)).map((d) => d.property)), c = Sn(
26603
26709
  e.getResult(),
26604
26710
  s,
26605
26711
  this.leadingColumnDefs,
26606
26712
  { valueWidth: this.valueWidth, closedIds: i, widths: l }
26607
26713
  ), h = t.setGroups(c.cellGroups, c.columnDefs);
26608
- h.filter((d) => a.has(d.property)).forEach((d) => Rr(d, !1)), this.columnDefs = h, this.columnCount = h.length, this.columnSizes = [], this.pivotFixedRightColumnCount = c.fixedRightColumnCount, e.setColumnDefs(h);
26714
+ h.filter((d) => a.has(d.property)).forEach((d) => vr(d, !1)), this.columnDefs = h, this.columnCount = h.length, this.columnSizes = [], this.pivotFixedRightColumnCount = c.fixedRightColumnCount, e.setColumnDefs(h);
26609
26715
  }
26610
26716
  }
26611
26717
  const wh = new Intl.NumberFormat("en-US");
@@ -26677,7 +26783,7 @@ class yh extends mt {
26677
26783
  * @internal
26678
26784
  */
26679
26785
  configure(e, t) {
26680
- const s = new fo(t ?? this.sourceRows, e);
26786
+ const s = new uo(t ?? this.sourceRows, e);
26681
26787
  this.config = { ...e }, t && (this.sourceRows = t), this.build(!0, s);
26682
26788
  }
26683
26789
  /**
@@ -26690,7 +26796,7 @@ class yh extends mt {
26690
26796
  for (const t of e) this.properties.push(t.property);
26691
26797
  this.infoByProperty = /* @__PURE__ */ new Map();
26692
26798
  for (const t of e)
26693
- wo(t) && this.infoByProperty.set(t.property, t.pivot);
26799
+ bo(t) && this.infoByProperty.set(t.property, t.pivot);
26694
26800
  }
26695
26801
  // ---------------------------------------------------------------- lookups
26696
26802
  /**
@@ -26746,7 +26852,7 @@ class yh extends mt {
26746
26852
  const s = this.result, o = s.values[s.valueIndex(t)];
26747
26853
  if (!o) return;
26748
26854
  if (!e.length) {
26749
- const a = po(o);
26855
+ const a = go(o);
26750
26856
  return this.infoByProperty.has(a) ? a : void 0;
26751
26857
  }
26752
26858
  let i = s.columnGroups, r;
@@ -26794,7 +26900,7 @@ class yh extends mt {
26794
26900
  return "";
26795
26901
  const o = this.properties[t], i = this.getRowGroup(e);
26796
26902
  if (o === J.PROPERTY)
26797
- return i ? this.getGroupLabel(i) : this.config.totalLabel ?? Go;
26903
+ return i ? this.getGroupLabel(i) : this.config.totalLabel ?? Wo;
26798
26904
  const r = o === void 0 ? void 0 : this.infoByProperty.get(o);
26799
26905
  if (!r)
26800
26906
  return "";
@@ -26861,7 +26967,7 @@ class yh extends mt {
26861
26967
  }
26862
26968
  getTextValueAt(e, t) {
26863
26969
  const s = this.properties[t], o = s === void 0 ? void 0 : this.infoByProperty.get(s), i = this.getValueAt(e, t);
26864
- return o ? i === void 0 ? this.isSubtotalSuppressed(e) ? "" : this.config.emptyText ?? "" : o.value.showValuesAs ? vo(i, o.value.showValuesAs) : o.value.format ? o.value.format(i) : Gt(i) : i == null ? "" : `${i}`;
26970
+ return o ? i === void 0 ? this.isSubtotalSuppressed(e) ? "" : this.config.emptyText ?? "" : o.value.showValuesAs ? xo(i, o.value.showValuesAs) : o.value.format ? o.value.format(i) : Gt(i) : i == null ? "" : `${i}`;
26865
26971
  }
26866
26972
  /** Value columns: the {@link AggregateCellRenderer} (text node); the group column: none (label as text). */
26867
26973
  getCellRenderer(e, t) {
@@ -27015,7 +27121,7 @@ class yh extends mt {
27015
27121
  });
27016
27122
  i(this.rows);
27017
27123
  }
27018
- this.builds++, this.rowFields = Le(this.config.rowFields ?? []), this.result = t ?? new fo(this.sourceRows, this.config), this.dirty = !1;
27124
+ this.builds++, this.rowFields = Le(this.config.rowFields ?? []), this.result = t ?? new uo(this.sourceRows, this.config), this.dirty = !1;
27019
27125
  const o = [];
27020
27126
  if (this.rowFields.length)
27021
27127
  for (const i of this.result.rowGroups)
@@ -27061,13 +27167,13 @@ class Ch extends nn {
27061
27167
  if (e !== 0)
27062
27168
  return "";
27063
27169
  if (this.isRowHeaderCell(e, t))
27064
- return this.body.getConfig().totalLabel ?? Go;
27170
+ return this.body.getConfig().totalLabel ?? Wo;
27065
27171
  const s = this.body.getColumnInfo(t);
27066
27172
  return s ? this.body.getShownValue(void 0, s) : "";
27067
27173
  }
27068
27174
  getTextValueAt(e, t) {
27069
27175
  const s = this.body.getColumnInfo(t), o = this.getValueAt(e, t);
27070
- return s ? o === void 0 ? this.body.getConfig().emptyText ?? "" : s.value.showValuesAs ? vo(o, s.value.showValuesAs) : s.value.format ? s.value.format(o) : Gt(o) : o == null ? "" : `${o}`;
27176
+ return s ? o === void 0 ? this.body.getConfig().emptyText ?? "" : s.value.showValuesAs ? xo(o, s.value.showValuesAs) : s.value.format ? s.value.format(o) : Gt(o) : o == null ? "" : `${o}`;
27071
27177
  }
27072
27178
  getCellRenderer(e, t) {
27073
27179
  return this.body.getColumnInfo(t) || this.isLabelColumn(t) ? this.textRenderer : void 0;
@@ -27297,7 +27403,7 @@ export {
27297
27403
  sh as ActionsCellRenderer,
27298
27404
  Kt as AggregateCellRenderer,
27299
27405
  _e as Aggregators,
27300
- er as AnyPropertyType,
27406
+ Qi as AnyPropertyType,
27301
27407
  Md as AreaMapFactory,
27302
27408
  nn as AreaModel,
27303
27409
  ps as AreaModelAggregateFooter,
@@ -27305,12 +27411,12 @@ export {
27305
27411
  eh as AreaModelCellGroups,
27306
27412
  ae as AreaModelHidden,
27307
27413
  j as AreaModelObjectArray,
27308
- zi as AreaModelObjectArrayWithColumndefs,
27414
+ Ki as AreaModelObjectArrayWithColumndefs,
27309
27415
  yh as AreaModelPivot,
27310
27416
  Ch as AreaModelPivotFooter,
27311
27417
  hh as AreaModelRowGroups,
27312
27418
  $e as AreaModelSheet,
27313
- Lr as AreaModelSheetHeader,
27419
+ kr as AreaModelSheetHeader,
27314
27420
  mt as AreaModelTree,
27315
27421
  se as AreaObjectMap,
27316
27422
  ds as AriaGridInfo,
@@ -27319,31 +27425,31 @@ export {
27319
27425
  je as ArrayPropertyType,
27320
27426
  Xc as AutoRestoreOptions,
27321
27427
  Rh as AvoidDoubleExecution,
27322
- Oo as BatchEditOptions,
27428
+ Fo as BatchEditOptions,
27323
27429
  Aa as BatchEditService,
27324
27430
  In as BooleanPropertyType,
27325
- Hi as CellChangesUndoable,
27431
+ $i as CellChangesUndoable,
27326
27432
  tc as CellEditorService,
27327
27433
  Ht as CellFormulaOptions,
27328
27434
  Zc as CellGroup,
27329
27435
  Qc as CellGroupExt,
27330
- uo as CellGroupExtCellRenderer,
27436
+ ho as CellGroupExtCellRenderer,
27331
27437
  M as CellRange,
27332
27438
  ce as CellgroupFactory,
27333
27439
  Nd as CheckboxBooleanPropertyCellRenderer,
27334
- ji as CheckboxCellRenderer,
27440
+ zi as CheckboxCellRenderer,
27335
27441
  Ed as CheckboxColumnDef,
27336
- Ll as CheckboxModel,
27442
+ El as CheckboxModel,
27337
27443
  wd as ChunkData,
27338
27444
  fs as ClipboardOptions,
27339
- Bi as ClipboardService,
27445
+ _i as ClipboardService,
27340
27446
  Jl as ColAndRowspanModel,
27341
27447
  th as CollapsedExpandedData,
27342
27448
  Yd as ColorRgb,
27343
27449
  ye as ColumnDef,
27344
27450
  Ah as ColumnDefGenerator,
27345
27451
  oh as ColumnWidths,
27346
- Ys as ConvenienceDomService,
27452
+ Xs as ConvenienceDomService,
27347
27453
  Re as CopyService,
27348
27454
  zc as CoverGridBodyModel,
27349
27455
  md as CoverGridFactory,
@@ -27353,56 +27459,56 @@ export {
27353
27459
  ih as CrudObjectView,
27354
27460
  rh as CrudOptions,
27355
27461
  qd as CrudTableModelFactory,
27356
- Ki as CssVars,
27357
- Er as DEFAULT_GET_EDIT_RENDERER,
27462
+ Ui as CssVars,
27463
+ Ar as DEFAULT_GET_EDIT_RENDERER,
27358
27464
  Wa as DateCellEditor,
27359
27465
  Pd as DateToIntlDDMMYYYYCellRenderer,
27360
27466
  Vd as DateToIsoCellRenderer,
27361
27467
  _d as DateToLocaleDateCellRenderer,
27362
27468
  Wd as DateToTecCellRenderer,
27363
27469
  Pe as DefaultRowHeights,
27364
- Vo as EditingOptions,
27470
+ No as EditingOptions,
27365
27471
  hs as EleScope,
27366
27472
  ss as EventAdapter,
27367
27473
  _h as EventCheckboxChangedHandler,
27368
27474
  ya as ExcelService,
27369
27475
  Ua as FORMULA_FUNCTION_INFO,
27370
27476
  kh as FORMULA_FUNCTION_NAMES,
27371
- Ol as FalseFn,
27477
+ Tl as FalseFn,
27372
27478
  us as FillHandleOptions,
27373
27479
  Pa as FillHandleService,
27374
- Mr as FocusModel,
27480
+ Er as FocusModel,
27375
27481
  Qa as FormulaAssist,
27376
27482
  su as FormulaBar,
27377
27483
  I as FormulaError,
27378
27484
  ct as FormulaRange,
27379
27485
  Ra as GeBatchEditEvent,
27380
- ci as GeCellIndices,
27486
+ ai as GeCellIndices,
27381
27487
  os as GeCssColorUtil,
27382
27488
  $a as GeDetailEvent,
27383
27489
  It as GeEditEvent,
27384
27490
  Fd as GeFilterService,
27385
27491
  Td as GeKeyEvent,
27386
27492
  Ze as GeModelChangeEvent,
27387
- yo as GeMouseEvent,
27493
+ wo as GeMouseEvent,
27388
27494
  Ca as GeRowDragEvent,
27389
27495
  na as GeScrollEvent,
27390
27496
  ta as GeStateChangeEvent,
27391
27497
  Pc as GeUndoEvent,
27392
27498
  Te as GeoData,
27393
- To as HeaderGroupOptions,
27499
+ Mo as HeaderGroupOptions,
27394
27500
  De as Icon,
27395
27501
  yd as IndexAndPx,
27396
- Pl as InputCellRenderer,
27502
+ kl as InputCellRenderer,
27397
27503
  ra as InputHandler,
27398
- Uo as JsonService,
27504
+ Go as JsonService,
27399
27505
  lt as LicenseManager,
27400
- ro as LiveAnnouncer,
27506
+ io as LiveAnnouncer,
27401
27507
  Bd as MaleFemaleToIconCellRenderer,
27402
- No as MasterDetailOptions,
27508
+ Oo as MasterDetailOptions,
27403
27509
  Ba as MasterDetailService,
27404
- Hn as MouseHandler,
27405
- Js as MouseTargetData,
27510
+ Nn as MouseHandler,
27511
+ Ys as MouseTargetData,
27406
27512
  Xd as MultiRowsSelectionModel,
27407
27513
  En as NullPropertyType,
27408
27514
  Ha as NumberCellEditor,
@@ -27411,87 +27517,87 @@ export {
27411
27517
  Tn as NumberPropertyType,
27412
27518
  ve as ObjectPropertyType,
27413
27519
  aa as OsxShortcutActionIdMapping,
27414
- ko as OverlayOptions,
27415
- Ji as PROPERTY_TYPE_KEY_ANY,
27416
- Qi as PROPERTY_TYPE_KEY_ARRAY,
27417
- bo as PROPERTY_TYPE_KEY_BOOLEAN,
27418
- qi as PROPERTY_TYPE_KEY_NULL,
27419
- mo as PROPERTY_TYPE_KEY_NUMBER,
27520
+ Do as OverlayOptions,
27521
+ Yi as PROPERTY_TYPE_KEY_ANY,
27522
+ Zi as PROPERTY_TYPE_KEY_ARRAY,
27523
+ mo as PROPERTY_TYPE_KEY_BOOLEAN,
27524
+ Ji as PROPERTY_TYPE_KEY_NULL,
27525
+ po as PROPERTY_TYPE_KEY_NUMBER,
27420
27526
  Nt as PROPERTY_TYPE_KEY_OBJECT,
27421
- Zi as PROPERTY_TYPE_KEY_STRING,
27527
+ qi as PROPERTY_TYPE_KEY_STRING,
27422
27528
  Ot as PROPERTY_TYPE_KEY_UNDEFINED,
27423
- eo as Padding,
27529
+ Qs as Padding,
27424
27530
  va as PendingCellChanges,
27425
27531
  Vc as PendingChangesUndoable,
27426
27532
  dh as PivotColumnDef,
27427
27533
  xn as PivotFactory,
27428
- fo as PivotResult,
27534
+ uo as PivotResult,
27429
27535
  bh as PivotTableModel,
27430
27536
  jd as PositiveAndNegativeNumberRenderer,
27431
27537
  zd as ProgressBarCellRenderer,
27432
- tr as PropertyItem,
27538
+ er as PropertyItem,
27433
27539
  Eh as PropertyTypeService,
27434
27540
  Ql as RenderScope,
27435
27541
  Od as Renderer,
27436
27542
  Jc as RequestChunk,
27437
27543
  ba as ResizeHandler,
27438
- Fo as RowDragOptions,
27544
+ Lo as RowDragOptions,
27439
27545
  Sa as RowDragService,
27440
27546
  lh as RowGroup,
27441
27547
  J as RowGroupColumnDef,
27442
27548
  bn as RowGroupFactory,
27443
27549
  Zl as RowLayout,
27444
- Nl as RowNumberCellRenderer,
27550
+ Il as RowNumberCellRenderer,
27445
27551
  Is as RowNumberColumnDef,
27446
- ni as RowNumberOptions,
27552
+ ri as RowNumberOptions,
27447
27553
  q as SHEET_MAX_COLUMNS,
27448
27554
  re as SHEET_MAX_ROWS,
27449
- Qn as SHOW_VALUES_AS_MODES,
27555
+ jn as SHOW_VALUES_AS_MODES,
27450
27556
  Mh as SchemeGenerator,
27451
27557
  vn as SelectCellEditor,
27452
27558
  an as SelectCellRenderer,
27453
- qs as SelectionAggregator,
27559
+ Js as SelectionAggregator,
27454
27560
  ke as SelectionModel,
27455
27561
  ge as SelectionService,
27456
27562
  _t as SheetDate,
27457
- Bo as SheetEngine,
27563
+ _o as SheetEngine,
27458
27564
  da as ShortcutService,
27459
27565
  Kd as SimpleArrayCellRenderer,
27460
- gi as SimpleDomService,
27566
+ fi as SimpleDomService,
27461
27567
  T as Size,
27462
- so as SortItem,
27463
- ir as SortedOptions,
27568
+ to as SortItem,
27569
+ or as SortedOptions,
27464
27570
  Nh as SpreadsheetFactory,
27465
- Fr as SpreadsheetTableModel,
27571
+ Lr as SpreadsheetTableModel,
27466
27572
  Ud as StarRatingCellRenderer,
27467
27573
  kd as StoreStateCollapsedExpandService,
27468
27574
  Dd as StoreStateScrollPosService,
27469
27575
  Ld as StoreStateSortingService,
27470
27576
  Mn as StringPropertyType,
27471
- Xl as TableApi,
27577
+ Wl as TableApi,
27472
27578
  Id as TableCellUpdateEvent,
27473
27579
  xe as TableFactory,
27474
27580
  Ye as TableModel,
27475
27581
  Yc as TableModelAndOptions,
27476
27582
  qe as TableOptions,
27477
- Yl as TableOverlay,
27478
- Ui as TableScope,
27479
- $o as TableSheet,
27480
- oo as TableStateService,
27481
- Po as TextCellEditor,
27583
+ Gl as TableOverlay,
27584
+ Gi as TableScope,
27585
+ Bo as TableSheet,
27586
+ so as TableStateService,
27587
+ Vo as TextCellEditor,
27482
27588
  Jd as ThreeColorGradientArg,
27483
27589
  ql as TreeAriaInfo,
27484
27590
  Bt as TreeCheckboxModel,
27485
27591
  Et as TreeFactory,
27486
- or as TreeOptions,
27592
+ sr as TreeOptions,
27487
27593
  Je as TreeRow,
27488
27594
  Gc as TreeRowService,
27489
27595
  Hd as TrueFalseCellRenderer,
27490
27596
  Yt as TrueFn,
27491
- Xi as TwoColorGradientArg,
27597
+ ji as TwoColorGradientArg,
27492
27598
  rs as UNIMPORTANT_TYPES,
27493
27599
  ks as UndefinedPropertyType,
27494
- Ho as UndoOptions,
27600
+ $o as UndoOptions,
27495
27601
  Bc as UndoService,
27496
27602
  Lc as UndoStack,
27497
27603
  Zd as UrlInfo,
@@ -27512,21 +27618,21 @@ export {
27512
27618
  Cd as bodyLeft,
27513
27619
  xd as bodyRight,
27514
27620
  Oh as booleanInputPipe,
27515
- qo as calcMoveToIndex,
27516
- di as calcOverlayKind,
27517
- hr as calculateShowValuesAs,
27518
- Eo as canMoveFlatRows,
27519
- fr as canMoveTreeRows,
27520
- _n as canScrollHorizontally,
27621
+ Jo as calcMoveToIndex,
27622
+ hi as calcOverlayKind,
27623
+ cr as calculateShowValuesAs,
27624
+ Ao as canMoveFlatRows,
27625
+ ur as canMoveTreeRows,
27626
+ jl as canScrollHorizontally,
27521
27627
  oc as clipboardShortcutLayer,
27522
27628
  Ve as columnIndexOfLetter,
27523
27629
  Be as columnLetter,
27524
- wr as compileFormula,
27630
+ br as compileFormula,
27525
27631
  Va as computeFillChanges,
27526
27632
  Ta as computeFillValues,
27527
27633
  Ic as computePastePlan,
27528
27634
  Fh as createDateInputPipe,
27529
- yr as createFormulaValueGetter,
27635
+ wr as createFormulaValueGetter,
27530
27636
  ha as createHarmonizedShortcutByKeyboardEvent,
27531
27637
  Lh as createNumberInputPipe,
27532
27638
  Es as createValueGetter,
@@ -27534,30 +27640,30 @@ export {
27534
27640
  Rn as debounce,
27535
27641
  Ga as editInputPipeForNumber,
27536
27642
  sc as editingShortcutLayer,
27537
- Ko as entitySuffix,
27643
+ Uo as entitySuffix,
27538
27644
  Y as escapeHtml,
27539
27645
  $c as findDataEdge,
27540
27646
  Dh as findRowIndexAtY,
27541
27647
  Fn as firstLetterUppercase,
27542
27648
  Gt as formatAggregateValue,
27543
27649
  es as formatFormula,
27544
- vo as formatShowValuesAs,
27545
- xo as getAggregator,
27650
+ xo as formatShowValuesAs,
27651
+ So as getAggregator,
27546
27652
  As as getAreaIdentByString,
27547
27653
  kn as getEntityName,
27548
27654
  Xr as getFillRange,
27549
- dr as getInsertBeforeIndex,
27655
+ hr as getInsertBeforeIndex,
27550
27656
  ls as getLeadingRowNumberColumnCount,
27551
- Vn as getLogicalScrollLeft,
27657
+ Kl as getLogicalScrollLeft,
27552
27658
  on as getPasteSize,
27553
- ur as getTopmostTreeRows,
27659
+ dr as getTopmostTreeRows,
27554
27660
  Qd as groupRows,
27555
27661
  ts as harmonizeShortcut,
27556
27662
  On as isAreaModelAggregateFooter,
27557
- jo as isAreaModelPivot,
27663
+ zo as isAreaModelPivot,
27558
27664
  ne as isAreaModelRowGroups,
27559
27665
  Z as isAreaModelTree,
27560
- sr as isCheckboxCellRenderer,
27666
+ tr as isCheckboxCellRenderer,
27561
27667
  we as isCheckboxColumnDef,
27562
27668
  Bs as isExcelFormattedValue,
27563
27669
  _s as isExcelFormulaCell,
@@ -27565,26 +27671,26 @@ export {
27565
27671
  w as isFormulaError,
27566
27672
  Qe as isFormulaRange,
27567
27673
  Dt as isFormulaText,
27568
- zo as isGroupRow,
27569
- cr as isPercentShowValuesAs,
27570
- wo as isPivotColumnDef,
27674
+ Ko as isGroupRow,
27675
+ ar as isPercentShowValuesAs,
27676
+ bo as isPivotColumnDef,
27571
27677
  js as isPivotTableModel,
27572
27678
  le as isRowGroup,
27573
27679
  dt as isRowGroupColumnDef,
27574
27680
  O as isRowNumberColumnDef,
27575
27681
  $t as isSameCellValue,
27576
27682
  G as isSheetDate,
27577
- Io as isSpreadsheetTableModel,
27683
+ To as isSpreadsheetTableModel,
27578
27684
  U as isTreeRow,
27579
- $n as mirrorArrowKeys,
27580
- ol as moveArrayItems,
27581
- pr as moveFlatRows,
27582
- il as moveTreeRows,
27685
+ Yl as mirrorArrowKeys,
27686
+ qn as moveArrayItems,
27687
+ gr as moveFlatRows,
27688
+ Zn as moveTreeRows,
27583
27689
  ut as normalizeRowIndices,
27584
27690
  Vh as offsetReferences,
27585
27691
  Xe as parseCellAddress,
27586
27692
  Tc as parseHtmlTable,
27587
- nl as parseRangeAddress,
27693
+ el as parseRangeAddress,
27588
27694
  Ec as parseTsv,
27589
27695
  tu as pivotRows,
27590
27696
  pd as px0,
@@ -27600,7 +27706,7 @@ export {
27600
27706
  qh as px180,
27601
27707
  Jh as px190,
27602
27708
  fd as px20,
27603
- ho as px200,
27709
+ co as px200,
27604
27710
  Yh as px210,
27605
27711
  Xh as px220,
27606
27712
  jh as px230,
@@ -27621,20 +27727,20 @@ export {
27621
27727
  ld as px80,
27622
27728
  nd as px90,
27623
27729
  oa as readLegacyState,
27624
- fi as removeLegacyState,
27730
+ ui as removeLegacyState,
27625
27731
  Ut as resolveShowValuesAs,
27626
- Nn as resolveTableDirection,
27627
- xr as serialToDate,
27628
- Pn as setLogicalScrollLeft,
27629
- kr as sheetInputPipe,
27732
+ Ul as resolveTableDirection,
27733
+ Sr as serialToDate,
27734
+ zl as setLogicalScrollLeft,
27735
+ Dr as sheetInputPipe,
27630
27736
  yc as shiftFormula,
27631
27737
  nt as spreadsheetOption,
27632
- Ro as sumOfNumbers,
27738
+ vo as sumOfNumbers,
27633
27739
  vh as throttle,
27634
27740
  Mt as toCellAddress,
27635
27741
  Mc as toHtmlTable,
27636
- Bn as toLogicalX,
27637
- Xs as toPhysicalScrollLeft,
27742
+ Xl as toLogicalX,
27743
+ Nr as toPhysicalScrollLeft,
27638
27744
  Rc as toTsv,
27639
27745
  Ln as trimArraySuffixes,
27640
27746
  kc as undoShortcutLayer