@sheetxl/sdk 0.8.0-beta.16 → 0.8.0-beta.18

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.
Files changed (110) hide show
  1. package/browser/esm/{B6BdiHigbUdbZp3J.mjs → -P0fym6eh9hn9row.mjs} +2 -2
  2. package/browser/esm/{DlVnybrgwZWxWN3_.mjs → -nOfWMHdlTb9ShjF.mjs} +9 -9
  3. package/browser/esm/{CMChv-fCFh68VQQt.mjs → 0Mw5Ew_7tAiWgc5J.mjs} +14 -14
  4. package/browser/esm/{JV9Szh5qTssjxJoE.mjs → 1ktaHvjuYL6stU4C.mjs} +1 -1
  5. package/browser/esm/{HV0FkJ6k3Ils318J.mjs → B3ifnlsuky2L9HmB.mjs} +33 -33
  6. package/browser/esm/{BtNuoQIrrHw_jnbJ.mjs → B67q5ZrwyKvm3d6W.mjs} +3 -3
  7. package/browser/esm/{KpuD1kEcWB7cT0VM.mjs → BQSd_URWugiyNoNj.mjs} +2 -2
  8. package/browser/esm/{ad9PX897hYE4Srkc.mjs → BWHHWC6H2JgG11Kq.mjs} +2 -2
  9. package/browser/esm/{BlMYYQZP-QM-iBHz.mjs → BYbb2weYQCb_7KI3.mjs} +21 -21
  10. package/browser/esm/{WLlpmgLN5OVLoLrC.mjs → B_hrmyuWaH5VIFpV.mjs} +2 -2
  11. package/browser/esm/{d_t-7d5BD1AdHg3u.mjs → Bql31KGUYo0SCMwZ.mjs} +392 -392
  12. package/browser/esm/{D807piM0VSokWz-L.mjs → BtVpErObXYKJCwHG.mjs} +1 -1
  13. package/browser/esm/{BWY1qiidTUBVPJoD.mjs → By7_c19Kv2YQaDVF.mjs} +475 -475
  14. package/browser/esm/{Zp5-cTJ0Llb6EfGi.mjs → C6M_XM08QtHuaInQ.mjs} +3 -3
  15. package/browser/esm/{BxYuRTSF9ykc-Tpz.mjs → CBHwju4PYiv85_jD.mjs} +2 -2
  16. package/browser/esm/{D-iHJ3q4nwOLcn1D.mjs → CJhYhZtsey3OnWKd.mjs} +1 -1
  17. package/browser/esm/{Dx9Fya60meMpuHqm.mjs → CQlxAbhdxgfu0ERF.mjs} +1 -1
  18. package/browser/esm/{C3JOjQwdG9kAig7i.mjs → CVXOtvee4oFImGyR.mjs} +504 -504
  19. package/browser/esm/{9YWdxmSjzLN4j_ts.mjs → CXQLYHAhE5MLKxZ4.mjs} +37 -37
  20. package/browser/esm/{CUu3zeHqcwMRYiov.mjs → CZiJYw94Yt7xslXS.mjs} +1 -1
  21. package/browser/esm/{BxFzcCYhvo9NXFjC.mjs → ChRUNekYurtOtrP1.mjs} +113 -113
  22. package/browser/esm/{dwGdnbV-CykjNrlm.mjs → CnobgPLHEsTPTFY5.mjs} +1 -1
  23. package/browser/esm/{WR146UAqrsUsL39e.mjs → CxNnMvwtOf76r7yY.mjs} +1 -1
  24. package/browser/esm/{U4FL-QeC0bRUhTEo.mjs → CzmmdfrOYDUGx-Yh.mjs} +1 -1
  25. package/browser/esm/{4MbBwfmW2hDXk9_w.mjs → D2P43UD6TGSXErhr.mjs} +2 -2
  26. package/browser/esm/{Bf80epSsm_RyAOb9.mjs → DH8NuKmZAC9EaqwP.mjs} +18 -18
  27. package/browser/esm/{WcHfawW2lkTHtWUd.mjs → DJuiV0Y8olnwuqB-.mjs} +21 -21
  28. package/browser/esm/{DcB52JPBPmkc3l1m.mjs → DKFaQ2QOyUPCk0sD.mjs} +3 -3
  29. package/browser/esm/{CRbQATfI0yZxe1kX.mjs → DLR8g1DkooIBl8S1.mjs} +2 -2
  30. package/browser/esm/{BF_QwkZ_hs2rFoTT.mjs → DNAXbbB8DGE2xeHy.mjs} +2 -2
  31. package/browser/esm/{BMo2_9Ul36IwRm3S.mjs → DQTUUXcERWI4l0to.mjs} +2 -2
  32. package/browser/esm/{C2PvZwqK-uvsugVS.mjs → DpFowFtk9AeU-89B.mjs} +1 -1
  33. package/browser/esm/{r-o0UCm7KtluNmyK.mjs → DyRVg5YJn7voOO6z.mjs} +2 -2
  34. package/browser/esm/{DW3oQ39IF0bsc_lm.mjs → Pn5Jc-47dk16sYQ4.mjs} +1 -1
  35. package/browser/esm/{BfoE6Dn_GQCIkQD3.mjs → _WWjW2f-YW-AVqAL.mjs} +1 -1
  36. package/browser/esm/{CkZoDPUCK5jMUaeJ.mjs → _lh_Rr5SwLthmbmu.mjs} +7924 -5938
  37. package/browser/esm/index.mjs +367 -366
  38. package/browser/esm/{DvVhatd0J1ch3OCO.mjs → mecFApGwMvcIzlpd.mjs} +36 -36
  39. package/browser/esm/{BqT-ASHP0NVSUUnY.mjs → n4LOSiYtWTzqQa4w.mjs} +661 -661
  40. package/{node/esm/CgdNA3B_GFG_yJiN.mjs → browser/esm/tJB0V8fKbukOYt9U.mjs} +2 -2
  41. package/browser/esm/{C5x0EzqElYGTiTQc.mjs → yRhetuEQfV7moa4B.mjs} +1 -1
  42. package/browser/esm/{e69NcYnKMLnAmqyA.mjs → ybFoQ6IijUJnBeCF.mjs} +1 -1
  43. package/node/esm/{BywIhvYkWk2o7MSW.mjs → 0313aQKBU4DE3v2j.mjs} +1 -1
  44. package/node/esm/{C884edhUf9yMqpPp.mjs → 3gjEEXV2aSt7cKeD.mjs} +1 -1
  45. package/node/esm/{BfPBiAgVmWhuFgFP.mjs → 3smtwEJ0ASF0tKBY.mjs} +2 -2
  46. package/node/esm/{_RIAmJI98l6bIFfZ.mjs → 4k3KKByrUw2Wr2TX.mjs} +1 -1
  47. package/node/esm/{Bknw7zWZhl2-w1pi.mjs → 90jp-mCVEr43zZTj.mjs} +2 -2
  48. package/node/esm/{DfWc3nW_Z_qqc_Wf.mjs → BAEmzj0gb8Cbgz7p.mjs} +3293 -3293
  49. package/node/esm/{CERNLhFrAwtu_p-q.mjs → BBC5dL9bXzOrQDGY.mjs} +1 -1
  50. package/node/esm/{CDHY-0OyQ9348Brb.mjs → BV0cJ_YP_0qzJuPt.mjs} +180 -180
  51. package/node/esm/{DvtyKKzOnoOM80NB.mjs → BcxcYoF_4GFL7Zkl.mjs} +15 -15
  52. package/node/esm/{DOt3t-13tsnM7Fj6.mjs → BesaVk0x7UyfLDk2.mjs} +1 -1
  53. package/node/esm/{Dhv9JymnXqcF54oo.mjs → C-LmDC9oNcbENOK1.mjs} +1 -1
  54. package/node/esm/{BvIPsPiHhMclZ1kH.mjs → CDkUQn5AwYGomlsT.mjs} +36 -36
  55. package/node/esm/{BH8J6vKSO5zI_TWo.mjs → CE4I5qfVmUBf7mED.mjs} +1 -1
  56. package/node/esm/{C_fYuynP2a_70WdL.mjs → CO0UDgbkHGwyTfev.mjs} +1 -1
  57. package/node/esm/{DgnwKbUEyQN5_gWT.mjs → CTWihjVB5uFX7U4j.mjs} +2 -2
  58. package/node/esm/{Cxak8i2NidZ4Uv6v.mjs → CUNaLYCntlclipWu.mjs} +497 -497
  59. package/node/esm/{RTwm9ge1KoPdlBNt.mjs → CY9JqXFJTt5pGhC3.mjs} +1 -1
  60. package/node/esm/{DELfV5HQZo1mInBd.mjs → C_Sqy290v4uzyi1E.mjs} +3 -3
  61. package/node/esm/{BLmdKnkLwkb3wWe6.mjs → Cf-cK3yPe9bjK6o2.mjs} +561 -561
  62. package/node/esm/{CVPieTgKCwkL21nD.mjs → CpvUwhAeDmdEpdR-.mjs} +10662 -8680
  63. package/{browser/esm/C_jLGkFemj55_BP3.mjs → node/esm/Crhg3srH-O5sJERh.mjs} +2 -2
  64. package/node/esm/{CJDV8P3hI8lu--3Z.mjs → Cx2U91jhiTDz600y.mjs} +116 -116
  65. package/node/esm/{BZSxu_ZqX8-Uczzn.mjs → CyWWKan_uk4dHZ6P.mjs} +1 -1
  66. package/node/esm/{CLtUMJfKsy4SevWE.mjs → D48MjKzkj37XsVm1.mjs} +2 -2
  67. package/node/esm/{kaiXmn0AA5WDsLPo.mjs → D7c0zfLVoG7EEln5.mjs} +43 -43
  68. package/node/esm/{A3PEHO1HJvkHfb5n.mjs → D8J4JmOPwG_Yr2GD.mjs} +1 -1
  69. package/node/esm/{By2TFKOjA1HekZap.mjs → D91qb21TrJX98Rw8.mjs} +3 -3
  70. package/node/esm/{D88A3UpCyGRjcX3U.mjs → D9D2NyyKbWXpTj5I.mjs} +2 -2
  71. package/node/esm/{mTIhoz1gEcaEm7s1.mjs → DBF7pIpitcmhi65H.mjs} +2 -2
  72. package/node/esm/{KDGrIa9R5XzWfjM2.mjs → DLPVrV723TSxkXqL.mjs} +1 -1
  73. package/node/esm/{Cs3ibv6YHCDwLRlk.mjs → DWsnb-a-9dfRn5jJ.mjs} +24 -24
  74. package/node/esm/{B4WUGzJBkQu7BXRm.mjs → Dj1pybJRqeZiP1Z6.mjs} +1 -1
  75. package/node/esm/{DBIUe2BC9xU7qMHR.mjs → DtNJOImWtsXVrQps.mjs} +2 -2
  76. package/node/esm/{5OfKfTRX2_y2NwpU.mjs → DxROQlX1KHLb9tHS.mjs} +1 -1
  77. package/node/esm/{446KYBjJQa8g-8Gg.mjs → dp4LxzOEkfTbVX_1.mjs} +21 -21
  78. package/node/esm/{C3zyhnMwQ2hRQBz7.mjs → ee_DgHTffiVTOiU2.mjs} +21 -21
  79. package/node/esm/{CFkX_Cn6avQqQiVC.mjs → fMFapG4AGMQKX8c5.mjs} +33 -33
  80. package/node/esm/index.mjs +545 -544
  81. package/node/esm/{CKwiipdPJGzAiPjg.mjs → jmElgIMAkpc2Ab1m.mjs} +1 -1
  82. package/node/esm/{bIGdvfpnijWeCac6.mjs → yVJ2lEYZob1gwiRZ.mjs} +14 -14
  83. package/package.json +6 -6
  84. package/resources/locales/de/model.msg.json +15 -0
  85. package/resources/locales/en/model.msg.json +15 -0
  86. package/types/scripting-api.json +11445 -11299
  87. package/types/scripting-enums.json +22 -1
  88. package/types/scripting.d.ts +623 -0
  89. package/types/src/address/index.d.ts +2 -0
  90. package/types/src/anomalies/_Anomalies.d.ts +34 -0
  91. package/types/src/anomalies/_CompletenessChecks.d.ts +32 -0
  92. package/types/src/cell/ICell.d.ts +36 -1
  93. package/types/src/cellRange/ICellRange.d.ts +106 -0
  94. package/types/src/index.d.ts +1 -0
  95. package/types/src/license/runtime.browser.d.ts +3 -1
  96. package/types/src/sheet/IWorksheet.d.ts +17 -0
  97. package/types/src/sheet/SheetCell.d.ts +3 -0
  98. package/types/src/sheet/SheetRange.d.ts +6 -0
  99. package/types/src/sheet/Worksheet.d.ts +103 -1
  100. package/types/src/sheet/_ListenerAnchor.d.ts +14 -0
  101. package/types/src/sheet/_SheetStateTypes.d.ts +13 -0
  102. package/types/src/sparkline/ISparklineGroup.d.ts +338 -0
  103. package/types/src/sparkline/ISparklineGroupCollection.d.ts +68 -0
  104. package/types/src/sparkline/SparklineGroup.d.ts +271 -0
  105. package/types/src/sparkline/SparklineGroupCollection.d.ts +25 -0
  106. package/types/src/sparkline/SparklineRanges.d.ts +195 -0
  107. package/types/src/sparkline/index.d.ts +4 -0
  108. package/types/src/sparkline/layout/SparklineLayout.d.ts +71 -0
  109. package/types/src/sparkline/layout/_layoutSparkline.d.ts +42 -0
  110. package/types/src/sparkline/layout/index.d.ts +2 -0
@@ -1,15 +1,15 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.16
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.18
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: SheetXL EULA — https://www.sheetxl.com/eula
6
6
  */
7
- import { $r as e, Br as t, Dr as s, Fr as r, Gr as i, Hr as n, Ir as o, Jr as a, Kr as h, Lr as l, Mr as u, Nr as c, Qr as p, Rr as g, Ur as m, Vr as O, Wr as _, Xr as E, Yr as L, Zr as A, ai as f, ci as C, ii as T, jr as N, kr as U, li as S, oi as d, pi as x, qr as R, zr as I } from "./CVPieTgKCwkL21nD.mjs";
7
+ import { $r as e, Ar as t, Br as s, Gr as r, Hr as i, Ir as n, Jr as o, Kr as a, Lr as h, Mr as l, Nr as u, Or as c, Pr as p, Qr as g, Rr as m, Ur as O, Vr as _, Wr as E, Xr as L, Yr as A, Zr as f, ai as C, ei as T, li as N, mi as U, oi as S, qr as d, si as x, ui as R, zr as I } from "./CpvUwhAeDmdEpdR-.mjs";
8
8
  import { FormulaError as M } from "@sheetxl/primitives";
9
9
  import { EOF as P, EmbeddedActionsParser as b, Lexer as v, createToken as k, defaultParserErrorProvider as w } from "chevrotain";
10
10
  var y = class e {
11
11
  static shared(t) {
12
- const s = t?.locale ?? S, r = t?.maxColumn ?? D, i = t?.maxRow ?? G;
12
+ const s = t?.locale ?? R, r = t?.maxColumn ?? D, i = t?.maxRow ?? G;
13
13
  let n = $.get(s);
14
14
  n || (n = /* @__PURE__ */ new Map(), $.set(s, n));
15
15
  const o = `${r}:${i}`;
@@ -21,7 +21,7 @@ var y = class e {
21
21
  }), n.set(o, a)), a;
22
22
  }
23
23
  constructor(e) {
24
- const t = e?.maxColumn ?? D, s = e?.maxRow ?? G, r = e?.locale ?? S;
24
+ const t = e?.maxColumn ?? D, s = e?.maxRow ?? G, r = e?.locale ?? R;
25
25
  this._locale = r, this._maxColumn = t, this._maxRow = s;
26
26
  const { separatorFunction: i, separatorColumn: n, separatorRow: o, separatorDecimal: a } = r.separators;
27
27
  if (n === o) throw new Error(`FormulaLexer: separatorColumn and separatorRow must differ (both '${n}')`);
@@ -37,12 +37,12 @@ var y = class e {
37
37
  pattern: /[a-zA-Z_\u007F-\uFFFF]+[a-zA-Z0-9_.\u007F-\uFFFF]*(?=\()/
38
38
  }), c = k({
39
39
  name: "TableReference",
40
- pattern: { exec: f },
40
+ pattern: { exec: S },
41
41
  line_breaks: !1,
42
42
  start_chars_hint: B
43
43
  }), p = k({
44
44
  name: "BracketedString",
45
- pattern: { exec: T },
45
+ pattern: { exec: C },
46
46
  line_breaks: !1,
47
47
  start_chars_hint: [91],
48
48
  longer_alt: [c, l]
@@ -78,11 +78,11 @@ var y = class e {
78
78
  }), A = k({
79
79
  name: "Sheet",
80
80
  pattern: /[A-Za-z_.\d\u007F-\uFFFF]*!/
81
- }), C = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, N = k({
81
+ }), f = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, T = k({
82
82
  name: "NamedToken",
83
83
  pattern: { exec: (e, t) => {
84
- C.lastIndex = t;
85
- const s = C.exec(e);
84
+ f.lastIndex = t;
85
+ const s = f.exec(e);
86
86
  if (!s) return null;
87
87
  let r = s[0];
88
88
  const i = r.indexOf(".:");
@@ -90,24 +90,24 @@ var y = class e {
90
90
  } },
91
91
  line_breaks: !1,
92
92
  start_chars_hint: B
93
- }), U = k({
93
+ }), N = k({
94
94
  name: "Cell",
95
95
  pattern: { exec: W(t, s) },
96
96
  line_breaks: !1,
97
97
  start_chars_hint: [36, ...F],
98
- longer_alt: N
99
- }), d = k({
98
+ longer_alt: T
99
+ }), U = k({
100
100
  name: "Column",
101
101
  pattern: { exec: z(t) },
102
102
  line_breaks: !1,
103
103
  start_chars_hint: [36, ...F],
104
- longer_alt: N
105
- }), x = k({
104
+ longer_alt: T
105
+ }), d = k({
106
106
  name: "AbsRow",
107
107
  pattern: /[$][0-9]+/
108
- }), R = "." === a ? "\\." : a, I = k({
108
+ }), x = "." === a ? "\\." : a, I = k({
109
109
  name: "NumberToken",
110
- pattern: new RegExp(`[0-9]+${R}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${R}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
110
+ pattern: new RegExp(`[0-9]+${x}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${x}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
111
111
  }), M = k({
112
112
  name: "ScientificDigit",
113
113
  pattern: /[0-9]+\*\*[+-]?[0-9]+/
@@ -213,16 +213,16 @@ var y = class e {
213
213
  Z,
214
214
  q,
215
215
  j,
216
- U,
216
+ N,
217
217
  w,
218
+ U,
218
219
  d,
219
- x,
220
220
  I,
221
221
  M,
222
222
  P,
223
223
  le,
224
224
  ne,
225
- N,
225
+ T,
226
226
  K,
227
227
  H,
228
228
  J,
@@ -355,28 +355,28 @@ function V(e) {
355
355
  return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
356
356
  }
357
357
  var j = class {
358
- constructor(e = S) {
358
+ constructor(e = R) {
359
359
  const t = function(e) {
360
- const t = [...s];
360
+ const t = [...c];
361
361
  if (e) for (const s of Object.values(e)) {
362
362
  const e = s?.trim();
363
363
  e && !t.some((t) => t.toLowerCase() === e.toLowerCase()) && t.push(e);
364
364
  }
365
365
  return t.sort((e, t) => t.length - e.length), t.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
366
- }(e.specifiers), r = k({
366
+ }(e.specifiers), s = k({
367
367
  name: "WhiteSpace",
368
368
  pattern: /\s+/,
369
369
  group: v.SKIPPED
370
- }), i = k({
370
+ }), r = k({
371
371
  name: "TableSpecifier",
372
372
  pattern: new RegExp(`\\[#(?:${t})\\]`, "i")
373
- }), n = [
373
+ }), i = [
374
+ s,
374
375
  r,
375
- i,
376
376
  k({
377
377
  name: "BracketedColumn",
378
378
  pattern: /\[(?:'['#[\]]|'(?!['#[\]])|[^'[\]])*\]/,
379
- longer_alt: [i]
379
+ longer_alt: [r]
380
380
  }),
381
381
  k({
382
382
  name: "BareSpecifier",
@@ -391,11 +391,11 @@ var j = class {
391
391
  pattern: new RegExp(e.separators.separatorFunction.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
392
392
  })
393
393
  ];
394
- this._lexer = new v(n, { ensureOptimizations: !0 });
395
- const o = {};
396
- n.forEach((e) => {
397
- o[e.name] = e;
398
- }), this._vocabulary = o;
394
+ this._lexer = new v(i, { ensureOptimizations: !0 });
395
+ const n = {};
396
+ i.forEach((e) => {
397
+ n[e.name] = e;
398
+ }), this._vocabulary = n;
399
399
  }
400
400
  getVocabulary() {
401
401
  return this._vocabulary;
@@ -404,14 +404,14 @@ var j = class {
404
404
  return this._lexer.tokenize(e);
405
405
  }
406
406
  }, Q = class extends b {
407
- constructor(t = S) {
408
- const s = new j(t), r = s.getVocabulary();
407
+ constructor(e = R) {
408
+ const t = new j(e), r = t.getVocabulary();
409
409
  super(r, {
410
410
  nodeLocationTracking: "none",
411
411
  maxLookahead: 2,
412
412
  skipValidations: !0,
413
413
  recoveryEnabled: !1
414
- }), this._lexer = s;
414
+ }), this._lexer = t;
415
415
  const { TableSpecifier: i, BracketedColumn: n, BareSpecifier: o, ColumnSep: a, ListSep: h } = r, l = this;
416
416
  l.RULE("ruleContent", () => {
417
417
  const e = [], t = l.SUBRULE(l.ruleItem);
@@ -426,29 +426,29 @@ var j = class {
426
426
  });
427
427
  }), e;
428
428
  }), l.RULE("ruleItem", () => l.OR([{ ALT: () => l.SUBRULE(l.ruleSpecifier) }, { ALT: () => l.SUBRULE(l.ruleColumnOrRange) }])), l.RULE("ruleSpecifier", () => l.OR([{ ALT: () => {
429
- const s = l.CONSUME(i);
429
+ const t = l.CONSUME(i);
430
430
  return l.ACTION(() => {
431
- const r = e(s.image, t);
432
- return r.image = s.image, r;
431
+ const s = T(t.image, e);
432
+ return s.image = t.image, s;
433
433
  });
434
434
  } }, { ALT: () => {
435
- const s = l.CONSUME(o);
435
+ const t = l.CONSUME(o);
436
436
  return l.ACTION(() => {
437
- const r = e(s.image, t);
438
- return r.image = s.image, r;
437
+ const s = T(t.image, e);
438
+ return s.image = t.image, s;
439
439
  });
440
440
  } }])), l.RULE("ruleColumnOrRange", () => {
441
441
  const e = l.CONSUME(n);
442
- let t, s;
442
+ let t, r;
443
443
  return l.OPTION(() => {
444
- t = l.CONSUME(a), s = l.CONSUME2(n);
444
+ t = l.CONSUME(a), r = l.CONSUME2(n);
445
445
  }), l.ACTION(() => {
446
- const r = A(e.image);
447
- if (r.image = e.image, !s) return r;
448
- const i = A(s.image);
449
- i.image = s.image;
450
- const n = I(":", r, i, !0);
451
- return n.image = t?.image ?? ":", n;
446
+ const i = g(e.image);
447
+ if (i.image = e.image, !r) return i;
448
+ const n = g(r.image);
449
+ n.image = r.image;
450
+ const o = s(":", i, n, !0);
451
+ return o.image = t?.image ?? ":", o;
452
452
  });
453
453
  }), l.performSelfAnalysis();
454
454
  }
@@ -464,44 +464,44 @@ var j = class {
464
464
  if ("@" === s) {
465
465
  const e = t.slice(1).trim();
466
466
  if (!e) {
467
- const e = h("@", null, !0);
467
+ const e = d("@", null, !0);
468
468
  return e.image = "@", [e];
469
469
  }
470
470
  if ("[" === e.charAt(0)) {
471
471
  const t = this._parseInner(e);
472
472
  if (1 === t.length && "infix" === t[0].type) {
473
- const e = h("@", t[0], !0);
473
+ const e = d("@", t[0], !0);
474
474
  return e.image = "@", [e];
475
475
  }
476
476
  }
477
- const s = A(e);
477
+ const s = g(e);
478
478
  s.image = e;
479
- const r = h("@", s, !0);
479
+ const r = d("@", s, !0);
480
480
  return r.image = "@", [r];
481
481
  }
482
482
  if ("[" !== s && "#" !== s) {
483
- const t = A(e);
483
+ const t = g(e);
484
484
  return t.image = e, [t];
485
485
  }
486
486
  return this._parseInner(t);
487
487
  }
488
- parse(e, t, s) {
488
+ parse(t, s, r) {
489
489
  this.reset();
490
- const r = () => ({
491
- root: p("", []),
490
+ const i = () => ({
491
+ root: e("", []),
492
492
  errors: []
493
493
  });
494
- if (!s) return r();
495
- let i = 0;
496
- if ("[" === s.charAt(0)) {
497
- const e = s.indexOf("]");
498
- -1 !== e && "!" === s.charAt(e + 1) && (i = e + 2);
494
+ if (!r) return i();
495
+ let n = 0;
496
+ if ("[" === r.charAt(0)) {
497
+ const e = r.indexOf("]");
498
+ -1 !== e && "!" === r.charAt(e + 1) && (n = e + 2);
499
499
  }
500
- const n = s.indexOf("[", i);
501
- if (-1 === n) return r();
502
- const o = s.slice(0, n), a = s.slice(n + 1, -1), h = this._parseContent(a);
500
+ const o = r.indexOf("[", n);
501
+ if (-1 === o) return i();
502
+ const a = r.slice(0, o), h = r.slice(o + 1, -1), l = this._parseContent(h);
503
503
  return {
504
- root: p(o, h),
504
+ root: e(a, l),
505
505
  errors: this.errors.length > 0 ? [...this.errors] : []
506
506
  };
507
507
  }
@@ -516,7 +516,7 @@ var j = class {
516
516
  ":."
517
517
  ]), K = (e) => {
518
518
  if (!e) return null;
519
- if (e.type === x.Cell) {
519
+ if (e.type === U.Cell) {
520
520
  const t = e.value;
521
521
  return t.rowIndex === Number.MIN_SAFE_INTEGER ? "col" : t.colIndex === Number.MIN_SAFE_INTEGER ? "row" : null;
522
522
  }
@@ -547,8 +547,8 @@ var te = {
547
547
  }
548
548
  }, se = class extends b {
549
549
  constructor(e) {
550
- const s = e?.lexer ?? y.shared(e?.lexerOptions), p = s.getVocabulary();
551
- super(p, {
550
+ const l = e?.lexer ?? y.shared(e?.lexerOptions), c = l.getVocabulary();
551
+ super(c, {
552
552
  skipValidations: !0,
553
553
  recoveryEnabled: !0,
554
554
  ...e,
@@ -556,12 +556,10 @@ var te = {
556
556
  errorMessageProvider: te,
557
557
  maxLookahead: 1
558
558
  }), this._ruleInfixOp = this.RULE("ruleInfixOp", () => {
559
- const { PlusOp: e, MinOp: t, MulOp: s, DivOp: r, ExOp: i, ConcatOp: n, GtOp: o, EqOp: a, LtOp: h, NeqOp: l, GteOp: u, LteOp: c } = this._vocab, p = [];
560
- return p.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
561
- const g = this.OR(this._c1 || (this._c1 = [
559
+ const { PlusOp: e, MinOp: r, MulOp: i, DivOp: n, ExOp: o, ConcatOp: a, GtOp: h, EqOp: l, LtOp: u, NeqOp: c, GteOp: p, LteOp: g } = this._vocab, m = [];
560
+ return m.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
561
+ const t = this.OR(this._c1 || (this._c1 = [
562
562
  { ALT: () => this.CONSUME(e).image },
563
- { ALT: () => this.CONSUME(t).image },
564
- { ALT: () => this.CONSUME(s).image },
565
563
  { ALT: () => this.CONSUME(r).image },
566
564
  { ALT: () => this.CONSUME(i).image },
567
565
  { ALT: () => this.CONSUME(n).image },
@@ -570,32 +568,34 @@ var te = {
570
568
  { ALT: () => this.CONSUME(h).image },
571
569
  { ALT: () => this.CONSUME(l).image },
572
570
  { ALT: () => this.CONSUME(u).image },
573
- { ALT: () => this.CONSUME(c).image }
574
- ])), m = {
575
- value: g,
571
+ { ALT: () => this.CONSUME(c).image },
572
+ { ALT: () => this.CONSUME(p).image },
573
+ { ALT: () => this.CONSUME(g).image }
574
+ ])), s = {
575
+ value: t,
576
576
  index: this.getLexerPosition(),
577
- isRange: d.includes(g)
577
+ isRange: x.includes(t)
578
578
  }, O = this.SUBRULE2(this._rulePostfixOp);
579
- p.push({
580
- op: m,
579
+ m.push({
580
+ op: s,
581
581
  node: O
582
582
  });
583
583
  }), this.ACTION(() => {
584
- let e = p.length - 1;
585
- const t = U.length;
586
- for (let s = 0; e > 0 && s < t; s++) {
587
- const t = U[s];
588
- let r = 1;
589
- for (; r < p.length;) {
590
- const s = p[r].op;
591
- if (t.includes(s.value)) {
592
- const t = p[r - 1].node, i = p[r].node;
593
- let n = I(s.value, t, i, s.isRange);
594
- n = this._tag(n, s.index), p[r - 1].node = n, p.splice(r, 1), e--;
595
- } else r++;
584
+ let e = m.length - 1;
585
+ const r = t.length;
586
+ for (let i = 0; e > 0 && i < r; i++) {
587
+ const r = t[i];
588
+ let n = 1;
589
+ for (; n < m.length;) {
590
+ const t = m[n].op;
591
+ if (r.includes(t.value)) {
592
+ const r = m[n - 1].node, i = m[n].node;
593
+ let o = s(t.value, r, i, t.isRange);
594
+ o = this._tag(o, t.index), m[n - 1].node = o, m.splice(n, 1), e--;
595
+ } else n++;
596
596
  }
597
597
  }
598
- }), p[0].node;
598
+ }), m[0].node;
599
599
  }), this._rulePlusMinusOp = this.RULE("rulePlusMinusOp", () => {
600
600
  const { PlusOp: e, MinOp: t } = this._vocab;
601
601
  return this.OR([{ ALT: () => this.CONSUME(e) }, { ALT: () => this.CONSUME(t) }]);
@@ -611,8 +611,8 @@ var te = {
611
611
  }), this.ACTION(() => {
612
612
  const e = s.length;
613
613
  if (0 !== e) for (let r = 0; r < e; r++) {
614
- const e = s[r], n = e[0], o = e[1], a = d.includes(n);
615
- t = i(n, t, a), t = this._tag(t, o);
614
+ const e = s[r], i = e[0], n = e[1], o = x.includes(i);
615
+ t = a(i, t, o), t = this._tag(t, n);
616
616
  }
617
617
  }), t;
618
618
  }), this._rulePrefixOp = this.RULE("rulePrefixOp", () => {
@@ -631,46 +631,46 @@ var te = {
631
631
  return this.ACTION(() => {
632
632
  const e = r.length;
633
633
  if (0 !== e) for (let t = e - 1; t >= 0; t--) {
634
- const e = r[t], s = e[0], n = e[1], o = d.includes(s);
635
- i = h(s, i, o), i = this._tag(i, n);
634
+ const e = r[t], s = e[0], n = e[1], o = x.includes(s);
635
+ i = d(s, i, o), i = this._tag(i, n);
636
636
  }
637
637
  }), i;
638
638
  }), this._ruleRangeOp = this.RULE("ruleRangeOp", () => {
639
- const { RangeOp: e, RangeTrimFullOp: t, RangeTrimLeadingOp: s, RangeTrimTrailingOp: r, ArrayAnchorOp: n } = this._vocab, o = [];
639
+ const { RangeOp: e, RangeTrimFullOp: t, RangeTrimLeadingOp: r, RangeTrimTrailingOp: i, ArrayAnchorOp: n } = this._vocab, o = [];
640
640
  return o.push({ node: this.SUBRULE(this._ruleCallOp) }), this.MANY2(() => {
641
641
  this.CONSUME(n), o.push({ anchor: this.getLexerPosition() });
642
642
  }), this.MANY(() => {
643
- const i = {
643
+ const s = {
644
644
  value: this.OR(this._c2 || (this._c2 = [
645
645
  { ALT: () => this.CONSUME(e).image },
646
646
  { ALT: () => this.CONSUME(t).image },
647
- { ALT: () => this.CONSUME(s).image },
648
- { ALT: () => this.CONSUME(r).image }
647
+ { ALT: () => this.CONSUME(r).image },
648
+ { ALT: () => this.CONSUME(i).image }
649
649
  ])),
650
650
  index: this.getLexerPosition()
651
651
  }, a = this.SUBRULE2(this._ruleCallOp);
652
652
  o.push({
653
- op: i,
653
+ op: s,
654
654
  node: a
655
655
  }), this.MANY3(() => {
656
656
  this.CONSUME2(n), o.push({ anchor: this.getLexerPosition() });
657
657
  });
658
658
  }), this.ACTION(() => {
659
659
  for (let e = 1; e + 1 < o.length; e++) {
660
- const t = o[e], s = o[e + 1];
661
- if (":" !== t.op?.value || ":" !== s.op?.value) continue;
662
- const r = K(t.node);
663
- r && K(s.node) === r && K(o[e - 1].node) !== r && (t.node = this._tag(I(":", t.node, s.node, !0), s.op.index), o.splice(e + 1, 1));
660
+ const t = o[e], r = o[e + 1];
661
+ if (":" !== t.op?.value || ":" !== r.op?.value) continue;
662
+ const i = K(t.node);
663
+ i && K(r.node) === i && K(o[e - 1].node) !== i && (t.node = this._tag(s(":", t.node, r.node, !0), r.op.index), o.splice(e + 1, 1));
664
664
  }
665
665
  for (let e = 1; e < o.length; e++) {
666
666
  const t = o[e];
667
667
  if (void 0 !== t.anchor) {
668
- o[0].node = this._tag(i("#", o[0].node, !0), t.anchor);
668
+ o[0].node = this._tag(a("#", o[0].node, !0), t.anchor);
669
669
  continue;
670
670
  }
671
- const s = t.op;
672
- let r = I(s.value, o[0].node, t.node, !0);
673
- r = this._tag(r, s.index), o[0].node = r;
671
+ const r = t.op;
672
+ let i = s(r.value, o[0].node, t.node, !0);
673
+ i = this._tag(i, r.index), o[0].node = i;
674
674
  }
675
675
  }), o[0].node;
676
676
  }), this._ruleCallOp = this.RULE("ruleCallOp", () => {
@@ -683,7 +683,7 @@ var te = {
683
683
  },
684
684
  DEF: () => {
685
685
  this.CONSUME(e);
686
- const r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), n = s, o = this.ACTION(() => this._tag(c(n, i), r)), a = this.OPTION(() => this.CONSUME(t));
686
+ const r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), n = s, o = this.ACTION(() => this._tag(p(n, i), r)), a = this.OPTION(() => this.CONSUME(t));
687
687
  this.ACTION(() => {
688
688
  a || this._reportError(o, "Missing closing parenthesis ')'", r), this._tagClose(o, this.getLexerPosition()), s = o;
689
689
  });
@@ -704,15 +704,15 @@ var te = {
704
704
  }), this.ACTION(() => {
705
705
  for (; e.length > 1;) {
706
706
  let t = e.length - 1;
707
- for (let s = 0; s < t; s++) {
708
- const r = e[s], i = e[s + 1], n = I(" ", r, i, !0), o = this._tokenMap.get(r);
709
- o && delete o.tokenIndexClose;
710
- const a = this._tokenMap.get(i), h = a?.tokenIndex;
711
- if (void 0 !== h) {
712
- const e = this.input[h], t = this.input[h - 1]?.endOffset ?? -1, s = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
713
- s.length > 0 && (n.wsBefore = s);
707
+ for (let r = 0; r < t; r++) {
708
+ const i = e[r], n = e[r + 1], o = s(" ", i, n, !0), a = this._tokenMap.get(i);
709
+ a && delete a.tokenIndexClose;
710
+ const h = this._tokenMap.get(n), l = h?.tokenIndex;
711
+ if (void 0 !== l) {
712
+ const e = this.input[l], t = this.input[l - 1]?.endOffset ?? -1, s = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
713
+ s.length > 0 && (o.wsBefore = s);
714
714
  }
715
- a && delete a.tokenIndex, s + 1 < t && a && delete a.tokenIndexClose, e.splice(s, 2, n), s--, t--;
715
+ h && delete h.tokenIndex, r + 1 < t && h && delete h.tokenIndexClose, e.splice(r, 2, o), r--, t--;
716
716
  }
717
717
  }
718
718
  }), e[0];
@@ -735,38 +735,38 @@ var te = {
735
735
  }), t;
736
736
  }), this._ruleParen = this.RULE("ruleParen", () => {
737
737
  const { OpenParen: e, CloseParen: t } = this._vocab;
738
- return this._processParen(x.Paren, e, t);
738
+ return this._processParen(U.Paren, e, t);
739
739
  }), this._ruleLiteralArray = this.RULE("ruleLiteralArray", () => {
740
- const { OpenCurlyParen: e, CloseCurlyParen: s, ColSeparator: r, RowSeparator: i } = this._vocab;
741
- let o = n();
740
+ const { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: s, RowSeparator: r } = this._vocab;
741
+ let i = O();
742
742
  this.CONSUME(e);
743
- const a = this.getLexerPosition();
744
- let h = this.ACTION(() => this._tag(t(o), a));
745
- const l = this.SUBRULE(this._ruleLiteralForArray);
743
+ const n = this.getLexerPosition();
744
+ let o = this.ACTION(() => this._tag(_(i), n));
745
+ const a = this.SUBRULE(this._ruleLiteralForArray);
746
746
  this.ACTION(() => {
747
- o.value.push(l);
747
+ i.value.push(a);
748
748
  }), this.MANY(() => {
749
749
  let e = !1;
750
750
  this.OR([{ ALT: () => {
751
- this.CONSUME(r), e = !0;
752
- } }, { ALT: () => this.CONSUME(i) }]);
751
+ this.CONSUME(s), e = !0;
752
+ } }, { ALT: () => this.CONSUME(r) }]);
753
753
  const t = this.SUBRULE2(this._ruleLiteralForArray);
754
754
  this.ACTION(() => {
755
- e || (o = n(), h.value.push(o)), o.value.push(t);
755
+ e || (i = O(), o.value.push(i)), i.value.push(t);
756
756
  });
757
757
  });
758
- const u = this.OPTION(() => this.CONSUME(s));
759
- return h = this.ACTION(() => (u || this._reportError(h, "Missing closing parenthesis '}'", a), this._tagClose(h, this.getLexerPosition()))), h;
758
+ const h = this.OPTION(() => this.CONSUME(t));
759
+ return o = this.ACTION(() => (h || this._reportError(o, "Missing closing parenthesis '}'", n), this._tagClose(o, this.getLexerPosition()))), o;
760
760
  }), this._ruleLiteralForArray = this.RULE("ruleLiteralForArray", () => {
761
- const { StringToken: e, BooleanToken: t, LiteralError: s, RefError: r } = this._vocab;
761
+ const { StringToken: e, BooleanToken: t, LiteralError: s, RefError: n } = this._vocab;
762
762
  return this.OR([
763
763
  { ALT: () => {
764
- const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), s = this.ACTION(() => this._tag(_(t.image, this._locale), this.getLexerPosition()));
765
- return this.ACTION(() => e ? R(e.image, s) : s);
764
+ const e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), s = this.ACTION(() => this._tag(r(t.image, this._locale), this.getLexerPosition()));
765
+ return this.ACTION(() => e ? o(e.image, s) : s);
766
766
  } },
767
767
  { ALT: () => {
768
768
  const t = this.CONSUME(e);
769
- return this.ACTION(() => this._tag(E(t.image), this.getLexerPosition()));
769
+ return this.ACTION(() => this._tag(f(t.image), this.getLexerPosition()));
770
770
  } },
771
771
  { ALT: () => {
772
772
  const e = this.CONSUME(t);
@@ -774,23 +774,23 @@ var te = {
774
774
  } },
775
775
  { ALT: () => {
776
776
  const e = this.CONSUME(s);
777
- return this.ACTION(() => this._tag(O(e.image, this._locale), this.getLexerPosition()));
777
+ return this.ACTION(() => this._tag(i(e.image, this._locale), this.getLexerPosition()));
778
778
  } },
779
779
  { ALT: () => {
780
- const e = this.CONSUME(r);
781
- return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
780
+ const e = this.CONSUME(n);
781
+ return this.ACTION(() => this._tag(A(e.image, this._locale), this.getLexerPosition()));
782
782
  } }
783
783
  ]);
784
784
  }), this._ruleLiteral = this.RULE("ruleLiteral", () => {
785
- const { StringToken: e, BooleanToken: t, LiteralError: s, RefError: r } = this._vocab;
785
+ const { StringToken: e, BooleanToken: t, LiteralError: s, RefError: n } = this._vocab;
786
786
  return this.OR([
787
787
  { ALT: () => {
788
788
  const e = this.SUBRULE(this._ruleNumber);
789
- return this.ACTION(() => this._tag(_(e.image, this._locale), this.getLexerPosition()));
789
+ return this.ACTION(() => this._tag(r(e.image, this._locale), this.getLexerPosition()));
790
790
  } },
791
791
  { ALT: () => {
792
792
  const t = this.CONSUME(e);
793
- return this.ACTION(() => this._tag(E(t.image), this.getLexerPosition()));
793
+ return this.ACTION(() => this._tag(f(t.image), this.getLexerPosition()));
794
794
  } },
795
795
  { ALT: () => {
796
796
  const e = this.CONSUME(t);
@@ -798,18 +798,18 @@ var te = {
798
798
  } },
799
799
  { ALT: () => {
800
800
  const e = this.CONSUME(s);
801
- return this.ACTION(() => this._tag(O(e.image, this._locale), this.getLexerPosition()));
801
+ return this.ACTION(() => this._tag(i(e.image, this._locale), this.getLexerPosition()));
802
802
  } },
803
803
  { ALT: () => {
804
- const e = this.CONSUME(r);
805
- return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
804
+ const e = this.CONSUME(n);
805
+ return this.ACTION(() => this._tag(A(e.image, this._locale), this.getLexerPosition()));
806
806
  } }
807
807
  ]);
808
808
  }), this._ruleFunction = this.RULE("ruleFunction", () => {
809
809
  const { FunctionToken: e, OpenParen: t, CloseParen: s } = this._vocab, r = this.CONSUME(e).image, i = this.getLexerPosition();
810
810
  this.CONSUME(t);
811
811
  const n = this.SUBRULE(this._ruleFunctionArguments);
812
- let o = this.ACTION(() => this._tag(g(r, n), i));
812
+ let o = this.ACTION(() => this._tag(I(r, n), i));
813
813
  const a = this.OPTION(() => this.CONSUME(s));
814
814
  return o = this.ACTION(() => (a || this._reportError(o, "Missing closing parenthesis ')'", i), this._tagClose(o, this.getLexerPosition()))), o;
815
815
  }), this._ruleFunctionArguments = this.RULE("ruleFunctionArguments", () => {
@@ -820,11 +820,11 @@ var te = {
820
820
  let t;
821
821
  this.OPTION2(() => {
822
822
  t = this.SUBRULE(this._ruleIntersectOp);
823
- }), t = this.ACTION(() => t ?? this._tagClose(l(), this.getLexerPosition())), s.push(t), this.MANY(() => {
823
+ }), t = this.ACTION(() => t ?? this._tagClose(m(), this.getLexerPosition())), s.push(t), this.MANY(() => {
824
824
  let t;
825
825
  this.CONSUME(e), this.OPTION3(() => {
826
826
  t = this.SUBRULE2(this._ruleIntersectOp);
827
- }), t = this.ACTION(() => t ?? this._tagClose(l(), this.getLexerPosition())), s.push(t);
827
+ }), t = this.ACTION(() => t ?? this._tagClose(m(), this.getLexerPosition())), s.push(t);
828
828
  });
829
829
  }
830
830
  }), s;
@@ -843,55 +843,55 @@ var te = {
843
843
  return this._tag(e.root, s);
844
844
  });
845
845
  }), this._ruleReference = this.RULE("ruleReference", () => {
846
- const { Sheet: e, SheetQuoted: t, DivOp: s, MulOp: i, PlusOp: n, MinOp: h, ArgSeparator: l, Cell: u, NamedToken: c, SingleQuotedString: p, Column: g, AbsRow: O, DigitToken: _, RefError: E } = this._vocab;
847
- let A, f;
846
+ const { Sheet: e, SheetQuoted: t, DivOp: s, MulOp: r, PlusOp: i, MinOp: o, ArgSeparator: a, Cell: l, NamedToken: u, SingleQuotedString: c, Column: p, AbsRow: g, DigitToken: m, RefError: O } = this._vocab;
847
+ let _, f;
848
848
  this.OPTION2({
849
849
  GATE: () => {
850
- for (let r = 1; r < 6; r++) {
851
- const o = this.LA(r);
852
- if (o.tokenType === e || o.tokenType === t) return !0;
853
- if ("" === o.image || ")" === o.image || o.tokenType === s || o.tokenType === i || o.tokenType === n || o.tokenType === h || o.tokenType === l) break;
850
+ for (let n = 1; n < 6; n++) {
851
+ const h = this.LA(n);
852
+ if (h.tokenType === e || h.tokenType === t) return !0;
853
+ if ("" === h.image || ")" === h.image || h.tokenType === s || h.tokenType === r || h.tokenType === i || h.tokenType === o || h.tokenType === a) break;
854
854
  }
855
855
  return !1;
856
856
  },
857
857
  DEF: () => {
858
- f = this.getLexerPosition() + 1, A = this.SUBRULE(this._rulePrefixSheetName);
858
+ f = this.getLexerPosition() + 1, _ = this.SUBRULE(this._rulePrefixSheetName);
859
859
  }
860
860
  });
861
861
  let C = this.OR([
862
862
  { ALT: () => {
863
- const e = this.CONSUME(u), t = this.getLexerPosition();
864
- return this.ACTION(() => this._tag(r(e.image, this.rowIndex, this.colIndex), t));
863
+ const e = this.CONSUME(l), t = this.getLexerPosition();
864
+ return this.ACTION(() => this._tag(n(e.image, this.rowIndex, this.colIndex), t));
865
865
  } },
866
866
  { ALT: () => {
867
- const e = this.OR2([{ ALT: () => this.CONSUME(c) }, { ALT: () => this.CONSUME(p) }]);
868
- return this.ACTION(() => this._tag(m(e.image), this.getLexerPosition()));
867
+ const e = this.OR2([{ ALT: () => this.CONSUME(u) }, { ALT: () => this.CONSUME(c) }]);
868
+ return this.ACTION(() => this._tag(E(e.image), this.getLexerPosition()));
869
869
  } },
870
870
  { ALT: () => this.SUBRULE(this._ruleBracketedString) },
871
871
  { ALT: () => this.SUBRULE(this._ruleFunction) },
872
872
  { ALT: () => {
873
- const e = this.CONSUME(g);
874
- return this.ACTION(() => this._tag(o(e.image, this.colIndex), this.getLexerPosition()));
873
+ const e = this.CONSUME(p);
874
+ return this.ACTION(() => this._tag(h(e.image, this.colIndex), this.getLexerPosition()));
875
875
  } },
876
876
  { ALT: () => {
877
- const e = this.CONSUME(O);
877
+ const e = this.CONSUME(g);
878
878
  return this.ACTION(() => this._tag(L(e.image, this.rowIndex), this.getLexerPosition()));
879
879
  } },
880
880
  { ALT: () => {
881
- const e = this.CONSUME(_);
881
+ const e = this.CONSUME(m);
882
882
  return this.ACTION(() => this._tag(L(e.image, this.rowIndex), this.getLexerPosition()));
883
883
  } },
884
884
  { ALT: () => {
885
- const e = this.CONSUME(E);
886
- return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
885
+ const e = this.CONSUME(O);
886
+ return this.ACTION(() => this._tag(A(e.image, this._locale), this.getLexerPosition()));
887
887
  } }
888
888
  ]);
889
889
  return this.ACTION(() => {
890
- if (A && C) {
891
- if ("" === A.name) return void this._reportError(C, `'${A.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
890
+ if (_ && C) {
891
+ if ("" === _.name) return void this._reportError(C, `'${_.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
892
892
  let e = C;
893
- if (C.type === x.Postfix && C.inputs?.[0] && (e = C.inputs[0]), e.type === x.Cell || e.type === x.Named || e.type === x.Row || e.type === x.TableColumn || e.type === x.Error) {
894
- e.value.scope = A.name, e.value.scopeImage = A.image;
893
+ if (C.type === U.Postfix && C.inputs?.[0] && (e = C.inputs[0]), e.type === U.Cell || e.type === U.Named || e.type === U.Row || e.type === U.TableColumn || e.type === U.Error) {
894
+ e.value.scope = _.name, e.value.scopeImage = _.image;
895
895
  const t = this._tokenMap.get(e);
896
896
  t && void 0 !== f && (t.tokenIndex = f);
897
897
  }
@@ -936,12 +936,12 @@ var te = {
936
936
  return this.MANY(() => {
937
937
  this.CONSUME(e), s.push(this.SUBRULE2(this._ruleIntersectOp));
938
938
  }), this.ACTION(() => 0 === s.length ? t : {
939
- type: x.List,
939
+ type: U.List,
940
940
  value: ",",
941
941
  inputs: [t, ...s],
942
942
  isReference: !0
943
943
  });
944
- }), this._lexer = s, this._locale = s.getLocale(), this._vocab = p, this._srParser = e?.srParser ?? new Q(this._locale), this.performSelfAnalysis();
944
+ }), this._lexer = l, this._locale = l.getLocale(), this._vocab = c, this._srParser = e?.srParser ?? new Q(this._locale), this.performSelfAnalysis();
945
945
  }
946
946
  getLexer() {
947
947
  return this._lexer;
@@ -951,26 +951,26 @@ var te = {
951
951
  let i;
952
952
  if (!r) return {
953
953
  root: {
954
- type: x.Unparsed,
954
+ type: U.Unparsed,
955
955
  value: s
956
956
  },
957
957
  errors: []
958
958
  };
959
959
  const n = r.tokens;
960
960
  if (0 === n.length) throw new M.Parse(J);
961
- return this.input = n, this._inputText = s, this._inputTextLength = s.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = C(i, (t, s) => {
962
- const r = t.type, i = s?.isReference ? s.value : void 0, n = "string" == typeof i && Z.has(i), o = "string" == typeof i && q.has(i), a = n ? s.inputs : void 0, h = a ? a[0] === t ? a[1] : a[0] : void 0, l = this._lexer.getMaxRow();
963
- if (n && r !== x.Cell && Number.isInteger(t.value)) {
961
+ return this.input = n, this._inputText = s, this._inputTextLength = s.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = N(i, (t, s) => {
962
+ const r = t.type, i = s?.isReference ? s.value : void 0, n = "string" == typeof i && Z.has(i), o = "string" == typeof i && q.has(i), a = n ? s.inputs : void 0, h = a ? a[0] === t ? a[1] : a[0] : void 0, u = this._lexer.getMaxRow();
963
+ if (n && r !== U.Cell && Number.isInteger(t.value)) {
964
964
  const s = L(t.image, e);
965
- return N(s, t), "row" !== K(h) ? this._reportError(s, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`) : H(t.image, l) || this._reportError(s, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), s;
965
+ return l(s, t), "row" !== K(h) ? this._reportError(s, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`) : H(t.image, u) || this._reportError(s, `'${t.image}' is not a valid row — rows run from 1 to ${u}`), s;
966
966
  }
967
- if (o && r === x.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
968
- if (r === x.Cell) {
967
+ if (o && r === U.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
968
+ if (r === U.Cell) {
969
969
  const e = t.value, s = e.colIndex === Number.MIN_SAFE_INTEGER, r = e.rowIndex === Number.MIN_SAFE_INTEGER;
970
- if ((s || r) && K(h) === (s ? "row" : "col")) return s && !H(t.image, l) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), t;
970
+ if ((s || r) && K(h) === (s ? "row" : "col")) return s && !H(t.image, u) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${u}`), t;
971
971
  if (s || r || e.colIndex >= 16384) {
972
- const n = m(t.image);
973
- N(n, t);
972
+ const n = E(t.image);
973
+ l(n, t);
974
974
  const a = e.scope;
975
975
  return a && (n.value.scope = a, n.value.scopeImage = e.scopeImage), s ? this._reportError(n, `'${t.image}' is not a valid reference — a row needs a column (use ${t.image}:${t.image} for the whole row)`) : r && t.image.includes("$") ? this._reportError(n, `'${t.image}' is not a valid reference — a whole column can only pair with another column (as in ${t.image}:${t.image})`) : o && this._reportError(n, `'${t.image}' is a name — '${i}' needs a cell or range on both sides`), n;
976
976
  }
@@ -1033,7 +1033,7 @@ var te = {
1033
1033
  _bindAllWhitespace(e) {
1034
1034
  if (e) {
1035
1035
  if (this._bindNodeWhitespace(e), e.inputs) for (const t of e.inputs) t && this._bindAllWhitespace(t);
1036
- if (e.type === x.Array && Array.isArray(e.value)) {
1036
+ if (e.type === U.Array && Array.isArray(e.value)) {
1037
1037
  for (const t of e.value) if (t && Array.isArray(t.value)) for (const e of t.value) e && this._bindAllWhitespace(e);
1038
1038
  }
1039
1039
  }