@aiquants/spreadsheet 0.21.0 → 0.21.2

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/dist/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  import { serializeClipboardTsv as Ld, measureTsv as qd, parseTsv as Pd } from "./tsv.js";
2
- import { iterateTsvPrefixRows as gC, iterateTsvRows as wC, serializeTsv as yC } from "./tsv.js";
2
+ import { iterateTsvPrefixRows as yC, iterateTsvRows as CC, serializeTsv as vC } from "./tsv.js";
3
3
  import { S as Ct, c as Eo, a as ws, b as _d, d as Id, s as ys } from "./view-DycJZi_t.js";
4
- import { e as vC } from "./view-DycJZi_t.js";
4
+ import { e as RC } from "./view-DycJZi_t.js";
5
5
  import { VIRTUAL_SCROLL_LABEL_CATALOGS as $l, resolveVirtualScrollLocale as aa, VIRTUAL_SCROLL_LABEL_KEYS as Io, resolveVirtualScrollLabels as Hd, useWheelBridge as si, FenwickMapTree as jd, VirtualGrid as Bd, didPressStopScrollMotion as Vd } from "@aiquants/virtualscroll";
6
6
  import { jsxs as Te, jsx as ee, Fragment as Ho } from "react/jsx-runtime";
7
7
  import { useRef as E, useCallback as R, useMemo as Fe, useLayoutEffect as Xe, useEffect as je, useState as Ue, useId as Rn, memo as ii, useSyncExternalStore as jo, forwardRef as Wd, useImperativeHandle as Kd } from "react";
8
8
  import { flushSync as Yd } from "react-dom";
9
- const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e : t > 0 ? e >= Sn ? e : Math.min(Sn, Math.max(e + 1, Math.round(e * Tl))) : Math.max(1, Math.min(e - 1, Math.round(e / Tl))), xl = (e, t) => t.reduce((n, r) => {
9
+ import { isInputMethodKey as Xd } from "@aiquants/input-method";
10
+ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Ud = (e, t) => e <= 0 ? e : t > 0 ? e >= Sn ? e : Math.min(Sn, Math.max(e + 1, Math.round(e * Tl))) : Math.max(1, Math.min(e - 1, Math.round(e / Tl))), xl = (e, t) => t.reduce((n, r) => {
10
11
  const o = e.sizeOf(r.index) === 0, s = r.size === 0;
11
12
  return n + (s && !o ? 1 : 0) - (!s && o ? 1 : 0);
12
13
  }, 0), ai = (e, t, n, r) => {
@@ -32,16 +33,16 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
32
33
  return { ok: !1, reason: "bounds", count: c };
33
34
  }
34
35
  return { ok: !0, entries: i };
35
- }, ua = "#000000", io = (e) => e === void 0 ? {} : { minimumFractionDigits: e, maximumFractionDigits: e }, Ud = 20, Gd = 256, lo = /* @__PURE__ */ new Map(), Cs = /* @__PURE__ */ new WeakMap(), At = (e) => {
36
+ }, ua = "#000000", io = (e) => e === void 0 ? {} : { minimumFractionDigits: e, maximumFractionDigits: e }, Gd = 20, Jd = 256, lo = /* @__PURE__ */ new Map(), Cs = /* @__PURE__ */ new WeakMap(), At = (e) => {
36
37
  const t = e.trim();
37
38
  return /^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d{1,4})?$/.test(t) && Number.isFinite(Number(t)) ? t : null;
38
- }, Jd = (e, t) => {
39
+ }, Zd = (e, t) => {
39
40
  const n = e.search(/[eE]/);
40
41
  return n < 0 ? `${e}e${t}` : `${e.slice(0, n)}e${Number(e.slice(n + 1)) + t}`;
41
- }, Zd = (e) => {
42
+ }, Qd = (e) => {
42
43
  switch (e.type) {
43
44
  case "number":
44
- return { signDisplay: "negative", useGrouping: e.grouping ?? !1, ...e.decimals === void 0 ? { maximumFractionDigits: Ud } : io(e.decimals) };
45
+ return { signDisplay: "negative", useGrouping: e.grouping ?? !1, ...e.decimals === void 0 ? { maximumFractionDigits: Gd } : io(e.decimals) };
45
46
  case "percent":
46
47
  return { signDisplay: "negative", style: "percent", ...io(e.decimals) };
47
48
  case "currency":
@@ -51,15 +52,15 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
51
52
  default:
52
53
  return null;
53
54
  }
54
- }, Qd = (e) => {
55
+ }, ef = (e) => {
55
56
  const t = Cs.get(e);
56
57
  if (t !== void 0)
57
58
  return t;
58
59
  const n = JSON.stringify([e.type, e.locale ?? null, e.decimals === void 0 ? null : String(e.decimals), e.type === "number" ? e.grouping ?? !1 : null, e.type === "currency" ? e.currency : null]), r = lo.get(n);
59
60
  if (r !== void 0)
60
61
  return Cs.set(e, r), r;
61
- lo.size >= Gd && lo.clear();
62
- const o = Zd(e);
62
+ lo.size >= Jd && lo.clear();
63
+ const o = Qd(e);
63
64
  let s = null;
64
65
  if (o !== null)
65
66
  try {
@@ -68,7 +69,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
68
69
  s = null;
69
70
  }
70
71
  return lo.set(n, s), Cs.set(e, s), s;
71
- }, ef = (e, t) => {
72
+ }, tf = (e, t) => {
72
73
  switch (t) {
73
74
  case 2:
74
75
  return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0 ? 29 : 28;
@@ -85,8 +86,8 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
85
86
  if (t === null)
86
87
  return null;
87
88
  const n = Number(t[1]), r = Number(t[3]), o = Number(t[4]), s = t[5] === void 0 ? 0 : Number(t[5]), i = t[6] === void 0 ? 0 : Number(t[6]), l = t[7] === void 0 ? 0 : Number(t[7]);
88
- return r < 1 || r > 12 || o < 1 || o > ef(n, r) || s > 23 || i > 59 || l > 59 ? null : { year: n, month: r, day: o, hour: s, minute: i, second: l };
89
- }, tf = (e, t) => {
89
+ return r < 1 || r > 12 || o < 1 || o > tf(n, r) || s > 23 || i > 59 || l > 59 ? null : { year: n, month: r, day: o, hour: s, minute: i, second: l };
90
+ }, nf = (e, t) => {
90
91
  const n = da(e);
91
92
  if (n === null)
92
93
  return e;
@@ -111,24 +112,24 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
111
112
  if (t === void 0 || t.type === "text" || e === "")
112
113
  return e;
113
114
  if (t.type === "date")
114
- return tf(e, t.pattern ?? "yyyy/MM/dd");
115
+ return nf(e, t.pattern ?? "yyyy/MM/dd");
115
116
  const n = At(e);
116
117
  if (n === null)
117
118
  return e;
118
- const r = Qd(t);
119
- return r === null ? e : r.format(t.type === "percent" && t.scale === !1 ? Jd(n, -2) : n);
120
- }, Ml = (e, t, n) => e !== void 0 ? e : t !== void 0 && t.type === "text" ? "left" : t !== void 0 && t.type === "date" ? da(n) !== null ? "right" : "left" : At(n) !== null ? "right" : "left", Pr = (e) => e === "center" ? "center" : e === "right" ? "flex-end" : "flex-start", fa = ["align", "background", "bold", "borders", "color", "fontFamily", "fontSize", "italic", "strikethrough", "underline", "value", "verticalAlign", "wrap"], nf = ["bottom", "left", "right", "top"], pa = (e, t, n) => {
119
+ const r = ef(t);
120
+ return r === null ? e : r.format(t.type === "percent" && t.scale === !1 ? Zd(n, -2) : n);
121
+ }, Ml = (e, t, n) => e !== void 0 ? e : t !== void 0 && t.type === "text" ? "left" : t !== void 0 && t.type === "date" ? da(n) !== null ? "right" : "left" : At(n) !== null ? "right" : "left", Pr = (e) => e === "center" ? "center" : e === "right" ? "flex-end" : "flex-start", fa = ["align", "background", "bold", "borders", "color", "fontFamily", "fontSize", "italic", "strikethrough", "underline", "value", "verticalAlign", "wrap"], rf = ["bottom", "left", "right", "top"], pa = (e, t, n) => {
121
122
  e[t] = n;
122
123
  }, ha = (e) => {
123
124
  const t = e, n = {};
124
125
  for (const r of Object.keys(t).sort())
125
126
  t[r] !== void 0 && (n[r] = t[r]);
126
127
  return n;
127
- }, rf = (e) => {
128
+ }, of = (e) => {
128
129
  if (e === void 0)
129
130
  return;
130
131
  const t = {};
131
- for (const n of nf) {
132
+ for (const n of rf) {
132
133
  const r = e[n];
133
134
  r !== void 0 && (t[n] = ha(r));
134
135
  }
@@ -136,7 +137,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
136
137
  }, Xt = (e) => {
137
138
  const t = {};
138
139
  for (const n of fa) {
139
- const r = n === "borders" ? rf(e.borders) : n === "value" ? e.value === void 0 ? void 0 : ha(e.value) : e[n];
140
+ const r = n === "borders" ? of(e.borders) : n === "value" ? e.value === void 0 ? void 0 : ha(e.value) : e[n];
140
141
  r !== void 0 && r !== !1 && pa(t, n, r);
141
142
  }
142
143
  return Object.keys(t).length === 0 ? void 0 : t;
@@ -155,7 +156,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
155
156
  return !1;
156
157
  }
157
158
  return !0;
158
- }, aC = (e, t) => e === t ? !0 : ui(e === void 0 ? void 0 : Xt(e), t === void 0 ? void 0 : Xt(t)), ma = (e, t) => {
159
+ }, dC = (e, t) => e === t ? !0 : ui(e === void 0 ? void 0 : Xt(e), t === void 0 ? void 0 : Xt(t)), ma = (e, t) => {
159
160
  const n = {};
160
161
  for (const o of fa) {
161
162
  const s = t[o];
@@ -163,19 +164,19 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
163
164
  }
164
165
  const r = Xt(n);
165
166
  return ui(r, e === void 0 ? void 0 : Xt(e)) ? e : r;
166
- }, ga = "data-aqsp-clip", zo = "application/x-aqsp-clip", Hs = 512, zl = 16 * 1024, js = `${ga}=`, of = 16, di = () => {
167
+ }, ga = "data-aqsp-clip", zo = "application/x-aqsp-clip", Hs = 512, zl = 16 * 1024, js = `${ga}=`, sf = 16, di = () => {
167
168
  const e = globalThis.crypto;
168
169
  if (e === void 0 || typeof e.getRandomValues != "function")
169
170
  throw new RangeError("[spreadsheet] newClipId requires crypto.getRandomValues — there is no counter or randomUUID substitute by design");
170
- const t = e.getRandomValues(new Uint8Array(of));
171
+ const t = e.getRandomValues(new Uint8Array(sf));
171
172
  let n = "";
172
173
  for (const r of t)
173
174
  n += r.toString(16).padStart(2, "0");
174
175
  return n;
175
- }, Vr = (e) => typeof e == "object" && e !== null && !Array.isArray(e), me = (e) => typeof e == "string", at = (e) => typeof e == "boolean", gn = (e) => typeof e == "number" && Number.isFinite(e), qt = (e) => typeof e == "number" && Number.isInteger(e) && e >= 0, Nl = (e) => qt(e) && e >= 1, sf = (e) => typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= Sn, on = (e) => {
176
+ }, Vr = (e) => typeof e == "object" && e !== null && !Array.isArray(e), me = (e) => typeof e == "string", at = (e) => typeof e == "boolean", gn = (e) => typeof e == "number" && Number.isFinite(e), qt = (e) => typeof e == "number" && Number.isInteger(e) && e >= 0, Nl = (e) => qt(e) && e >= 1, lf = (e) => typeof e == "number" && Number.isFinite(e) && e >= 0 && e <= Sn, on = (e) => {
176
177
  const t = new Set(e);
177
178
  return (n) => typeof n == "string" && t.has(n);
178
- }, lf = (e) => (t) => Array.isArray(t) && t.every(e), _e = (e, t) => ({ fields: new Map(Object.entries(e)), required: t }), ln = (e, t) => {
179
+ }, cf = (e) => (t) => Array.isArray(t) && t.every(e), _e = (e, t) => ({ fields: new Map(Object.entries(e)), required: t }), ln = (e, t) => {
179
180
  if (!Vr(e))
180
181
  return !1;
181
182
  for (const n of Object.keys(e)) {
@@ -195,18 +196,18 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
195
196
  return !1;
196
197
  const n = e.get(t.type);
197
198
  return n !== void 0 && ln(t, n);
198
- }, cf = ["left", "center", "right"], af = ["top", "middle", "bottom"], uf = ["thin", "medium", "thick", "dashed", "dotted", "double", "hair"], vs = ["gt", "gte", "lt", "lte", "eq", "neq", "between", "notBetween"], df = ["contains", "notContains", "startsWith", "endsWith", "isEmail", "isUrl"], ff = ["eq", "neq", "gt", "gte", "lt", "lte", "between", "notBetween"], pf = ["contains", "notContains", "startsWith", "endsWith"], hf = /* @__PURE__ */ new Map([
199
+ }, af = ["left", "center", "right"], uf = ["top", "middle", "bottom"], df = ["thin", "medium", "thick", "dashed", "dotted", "double", "hair"], vs = ["gt", "gte", "lt", "lte", "eq", "neq", "between", "notBetween"], ff = ["contains", "notContains", "startsWith", "endsWith", "isEmail", "isUrl"], pf = ["eq", "neq", "gt", "gte", "lt", "lte", "between", "notBetween"], hf = ["contains", "notContains", "startsWith", "endsWith"], mf = /* @__PURE__ */ new Map([
199
200
  ["number", _e({ type: me, decimals: gn, grouping: at, locale: me }, ["type"])],
200
201
  ["percent", _e({ type: me, decimals: gn, scale: at, locale: me }, ["type"])],
201
202
  ["currency", _e({ type: me, currency: me, decimals: gn, locale: me }, ["type", "currency"])],
202
203
  ["scientific", _e({ type: me, decimals: gn, locale: me }, ["type"])],
203
204
  ["date", _e({ type: me, pattern: me }, ["type"])],
204
205
  ["text", _e({ type: me }, ["type"])]
205
- ]), mf = _e({ style: on(uf), color: me }, ["style"]), co = (e) => ln(e, mf), gf = _e({ top: co, right: co, bottom: co, left: co }, []), wf = _e(
206
+ ]), gf = _e({ style: on(df), color: me }, ["style"]), co = (e) => ln(e, gf), wf = _e({ top: co, right: co, bottom: co, left: co }, []), yf = _e(
206
207
  {
207
- value: fi(hf),
208
- align: on(cf),
209
- verticalAlign: on(af),
208
+ value: fi(mf),
209
+ align: on(af),
210
+ verticalAlign: on(uf),
210
211
  wrap: at,
211
212
  background: me,
212
213
  color: me,
@@ -216,45 +217,45 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
216
217
  strikethrough: at,
217
218
  fontFamily: me,
218
219
  fontSize: gn,
219
- borders: (e) => ln(e, gf)
220
+ borders: (e) => ln(e, wf)
220
221
  },
221
222
  []
222
- ), yf = (e) => ln(e, wf), zn = { strict: at, inputMessage: me, errorMessage: me }, Cf = /* @__PURE__ */ new Map([
223
- ["list", _e({ ...zn, type: me, values: lf(me), showDropdown: at }, ["type", "values"])],
223
+ ), Cf = (e) => ln(e, yf), zn = { strict: at, inputMessage: me, errorMessage: me }, vf = /* @__PURE__ */ new Map([
224
+ ["list", _e({ ...zn, type: me, values: cf(me), showDropdown: at }, ["type", "values"])],
224
225
  ["number", _e({ ...zn, type: me, op: on(vs), a: me, b: me }, ["type", "op", "a"])],
225
226
  ["textLength", _e({ ...zn, type: me, op: on(vs), a: gn, b: gn }, ["type", "op", "a"])],
226
227
  ["date", _e({ ...zn, type: me, op: on(vs), a: me, b: me }, ["type", "op", "a"])],
227
- ["text", _e({ ...zn, type: me, op: on(df), value: me }, ["type", "op"])],
228
+ ["text", _e({ ...zn, type: me, op: on(ff), value: me }, ["type", "op"])],
228
229
  ["checkbox", _e({ ...zn, type: me, checked: me, unchecked: me }, ["type"])],
229
230
  ["custom", _e({ ...zn, type: me, formula: me }, ["type", "formula"])]
230
- ]), vf = fi(Cf), bf = _e({ startRow: qt, startCol: qt, endRow: qt, endCol: qt }, ["startRow", "startCol", "endRow", "endCol"]), Rf = (e) => {
231
- if (!ln(e, bf))
231
+ ]), bf = fi(vf), Rf = _e({ startRow: qt, startCol: qt, endRow: qt, endCol: qt }, ["startRow", "startCol", "endRow", "endCol"]), Sf = (e) => {
232
+ if (!ln(e, Rf))
232
233
  return !1;
233
234
  const { startRow: t, startCol: n, endRow: r, endCol: o } = e;
234
235
  return qt(t) && qt(r) && qt(n) && qt(o) && t <= r && n <= o;
235
- }, Sf = _e({ color: me, value: gn }, ["color"]), bs = (e) => ln(e, Sf), Ef = /* @__PURE__ */ new Map([
236
- ["cellValue", _e({ type: me, op: on(ff), a: me, b: me }, ["type", "op", "a"])],
237
- ["text", _e({ type: me, op: on(pf), value: me }, ["type", "op", "value"])],
236
+ }, Ef = _e({ color: me, value: gn }, ["color"]), bs = (e) => ln(e, Ef), kf = /* @__PURE__ */ new Map([
237
+ ["cellValue", _e({ type: me, op: on(pf), a: me, b: me }, ["type", "op", "a"])],
238
+ ["text", _e({ type: me, op: on(hf), value: me }, ["type", "op", "value"])],
238
239
  ["empty", _e({ type: me }, ["type"])],
239
240
  ["notEmpty", _e({ type: me }, ["type"])],
240
241
  ["colorScale", _e({ type: me, min: bs, mid: bs, max: bs }, ["type", "min", "max"])],
241
242
  ["customFormula", _e({ type: me, formula: me }, ["type", "formula"])]
242
- ]), kf = _e({ background: me, color: me, bold: at, italic: at, underline: at, strikethrough: at }, []), Of = _e({ sourceRuleId: me, ranges: Array.isArray, condition: fi(Ef), style: (e) => ln(e, kf), stopIfTrue: at }, [
243
+ ]), Of = _e({ background: me, color: me, bold: at, italic: at, underline: at, strikethrough: at }, []), Af = _e({ sourceRuleId: me, ranges: Array.isArray, condition: fi(kf), style: (e) => ln(e, Of), stopIfTrue: at }, [
243
244
  "sourceRuleId",
244
245
  "ranges",
245
246
  "condition",
246
247
  "style"
247
- ]), Af = (e, t, n) => {
248
- if (!ln(e, Of))
248
+ ]), $f = (e, t, n) => {
249
+ if (!ln(e, Af))
249
250
  return !1;
250
251
  const r = e.ranges;
251
252
  if (!Array.isArray(r))
252
253
  return !1;
253
254
  for (const o of r)
254
- if (!Rf(o) || o.endRow >= t || o.endCol >= n)
255
+ if (!Sf(o) || o.endRow >= t || o.endCol >= n)
255
256
  return !1;
256
257
  return !0;
257
- }, $f = _e({ text: me, author: me, createdAt: me }, ["text", "author", "createdAt"]), Tf = (e) => ln(e, $f), xf = (e, t, n) => {
258
+ }, Tf = _e({ text: me, author: me, createdAt: me }, ["text", "author", "createdAt"]), xf = (e) => ln(e, Tf), Mf = (e, t, n) => {
258
259
  if (!Vr(e) || typeof e.t != "string")
259
260
  return !1;
260
261
  for (const r of Object.keys(e)) {
@@ -281,7 +282,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
281
282
  return !1;
282
283
  break;
283
284
  case "comments":
284
- if (!(Array.isArray(o) && o.every(Tf)))
285
+ if (!(Array.isArray(o) && o.every(xf)))
285
286
  return !1;
286
287
  break;
287
288
  default:
@@ -289,11 +290,11 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
289
290
  }
290
291
  }
291
292
  return !0;
292
- }, Dl = (e, t) => Array.isArray(e) && e.length === t && e.every(sf), Mf = /* @__PURE__ */ new Set(["v", "rows", "cols", "clipId", "formats", "validations", "cells", "colWidths", "rowHeights", "wholeRows", "wholeCols", "conditionalFormats"]), wa = (e) => {
293
+ }, Dl = (e, t) => Array.isArray(e) && e.length === t && e.every(lf), zf = /* @__PURE__ */ new Set(["v", "rows", "cols", "clipId", "formats", "validations", "cells", "colWidths", "rowHeights", "wholeRows", "wholeCols", "conditionalFormats"]), wa = (e) => {
293
294
  if (!Vr(e))
294
295
  return !1;
295
296
  for (const l of Object.keys(e))
296
- if (e[l] !== void 0 && !Mf.has(l))
297
+ if (e[l] !== void 0 && !zf.has(l))
297
298
  return !1;
298
299
  if (e.v !== 1)
299
300
  return !1;
@@ -301,10 +302,10 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
301
302
  if (!(Nl(t) && Nl(n)) || typeof e.clipId != "string" || e.clipId === "")
302
303
  return !1;
303
304
  const r = e.formats;
304
- if (!(Array.isArray(r) && r.every(yf)))
305
+ if (!(Array.isArray(r) && r.every(Cf)))
305
306
  return !1;
306
307
  const o = e.validations;
307
- if (!(Array.isArray(o) && o.every(vf)))
308
+ if (!(Array.isArray(o) && o.every(bf)))
308
309
  return !1;
309
310
  const s = e.cells;
310
311
  if (!Array.isArray(s) || s.length !== t)
@@ -313,23 +314,23 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
313
314
  if (!Array.isArray(l) || l.length !== n)
314
315
  return !1;
315
316
  for (const c of l)
316
- if (!xf(c, r.length, o.length))
317
+ if (!Mf(c, r.length, o.length))
317
318
  return !1;
318
319
  }
319
320
  if (e.colWidths !== void 0 && !Dl(e.colWidths, n) || e.rowHeights !== void 0 && !Dl(e.rowHeights, t) || typeof e.wholeRows != "boolean" || typeof e.wholeCols != "boolean")
320
321
  return !1;
321
322
  const i = e.conditionalFormats;
322
- return Array.isArray(i) && i.every((l) => Af(l, t, n));
323
- }, jr = (e) => Array.isArray(e) ? `[${e.map(jr).join(",")}]` : Vr(e) ? `{${Object.keys(e).filter((n) => e[n] !== void 0).sort().map((n) => `${JSON.stringify(n)}:${jr(e[n])}`).join(",")}}` : JSON.stringify(e), zf = (e) => {
323
+ return Array.isArray(i) && i.every((l) => $f(l, t, n));
324
+ }, jr = (e) => Array.isArray(e) ? `[${e.map(jr).join(",")}]` : Vr(e) ? `{${Object.keys(e).filter((n) => e[n] !== void 0).sort().map((n) => `${JSON.stringify(n)}:${jr(e[n])}`).join(",")}}` : JSON.stringify(e), Nf = (e) => {
324
325
  const t = Xt(e);
325
326
  return t === void 0 ? "{}" : JSON.stringify(t);
326
- }, Nf = (e) => `{"text":${JSON.stringify(e.text)},"author":${JSON.stringify(e.author)},"createdAt":${JSON.stringify(e.createdAt)}}`, Df = (e) => {
327
+ }, Df = (e) => `{"text":${JSON.stringify(e.text)},"author":${JSON.stringify(e.author)},"createdAt":${JSON.stringify(e.createdAt)}}`, Ff = (e) => {
327
328
  let t = `{"t":${JSON.stringify(e.t)}`;
328
- return e.f !== void 0 && (t += `,"f":${JSON.stringify(e.f)}`), e.fmt !== void 0 && (t += `,"fmt":${e.fmt}`), e.val !== void 0 && (t += `,"val":${e.val}`), e.note !== void 0 && (t += `,"note":${JSON.stringify(e.note)}`), e.comments !== void 0 && (t += `,"comments":[${e.comments.map(Nf).join(",")}]`), e.link !== void 0 && (t += `,"link":${JSON.stringify(e.link)}`), `${t}}`;
329
- }, Ff = (e) => {
329
+ return e.f !== void 0 && (t += `,"f":${JSON.stringify(e.f)}`), e.fmt !== void 0 && (t += `,"fmt":${e.fmt}`), e.val !== void 0 && (t += `,"val":${e.val}`), e.note !== void 0 && (t += `,"note":${JSON.stringify(e.note)}`), e.comments !== void 0 && (t += `,"comments":[${e.comments.map(Df).join(",")}]`), e.link !== void 0 && (t += `,"link":${JSON.stringify(e.link)}`), `${t}}`;
330
+ }, Lf = (e) => {
330
331
  if (!wa(e))
331
332
  throw new RangeError("[spreadsheet] serializeClipPayload received a payload outside the wire format v1 vocabulary");
332
- const t = `{"v":1,"rows":${e.rows},"cols":${e.cols},"clipId":${JSON.stringify(e.clipId)}`, n = e.formats.map(zf).join(","), r = e.validations.map(jr).join(","), o = e.cells.map((c) => `[${c.map(Df).join(",")}]`).join(","), s = e.colWidths === void 0 ? "" : `,"colWidths":[${e.colWidths.join(",")}]`, i = e.rowHeights === void 0 ? "" : `,"rowHeights":[${e.rowHeights.join(",")}]`, l = e.conditionalFormats.map(jr).join(",");
333
+ const t = `{"v":1,"rows":${e.rows},"cols":${e.cols},"clipId":${JSON.stringify(e.clipId)}`, n = e.formats.map(Nf).join(","), r = e.validations.map(jr).join(","), o = e.cells.map((c) => `[${c.map(Ff).join(",")}]`).join(","), s = e.colWidths === void 0 ? "" : `,"colWidths":[${e.colWidths.join(",")}]`, i = e.rowHeights === void 0 ? "" : `,"rowHeights":[${e.rowHeights.join(",")}]`, l = e.conditionalFormats.map(jr).join(",");
333
334
  return `${t},"formats":[${n}],"validations":[${r}],"cells":[${o}]${s}${i},"wholeRows":${e.wholeRows},"wholeCols":${e.wholeCols},"conditionalFormats":[${l}]}`;
334
335
  }, Fl = (e) => {
335
336
  let t;
@@ -339,10 +340,10 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
339
340
  return null;
340
341
  }
341
342
  return wa(t) ? t : null;
342
- }, Lf = /&(?:amp|lt|gt|quot|#39|nbsp);/g, qf = Object.freeze({ "&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'", "&nbsp;": " " }), ya = (e) => e.includes("&") ? e.replace(Lf, (t) => qf[t]) : e, Pf = /^\{"v":1,"rows":([1-9]\d{0,14}),"cols":([1-9]\d{0,14}),"clipId":"([^"\\]+)"/, Ll = (e) => {
343
- const t = e.length > Hs ? e.slice(0, Hs) : e, n = Pf.exec(ya(t));
343
+ }, qf = /&(?:amp|lt|gt|quot|#39|nbsp);/g, Pf = Object.freeze({ "&amp;": "&", "&lt;": "<", "&gt;": ">", "&quot;": '"', "&#39;": "'", "&nbsp;": " " }), ya = (e) => e.includes("&") ? e.replace(qf, (t) => Pf[t]) : e, _f = /^\{"v":1,"rows":([1-9]\d{0,14}),"cols":([1-9]\d{0,14}),"clipId":"([^"\\]+)"/, Ll = (e) => {
344
+ const t = e.length > Hs ? e.slice(0, Hs) : e, n = _f.exec(ya(t));
344
345
  return n === null ? null : { v: 1, rows: Number(n[1]), cols: Number(n[2]), clipId: n[3] };
345
- }, _f = (e) => {
346
+ }, If = (e) => {
346
347
  const t = e.indexOf(js);
347
348
  if (t === -1)
348
349
  return null;
@@ -353,12 +354,12 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
353
354
  return { kind: "mime", json: e.getData(zo) };
354
355
  if (!e.types.includes("text/html"))
355
356
  return null;
356
- const n = e.getData("text/html"), r = _f(n);
357
+ const n = e.getData("text/html"), r = If(n);
357
358
  return r === null ? null : { kind: "attribute", html: n, at: r };
358
- }, If = (e, t) => {
359
+ }, Hf = (e, t) => {
359
360
  const n = Ca(e, t);
360
361
  return n === null ? null : n.kind === "mime" ? Ll(n.json) : Ll(n.html.slice(n.at.start, n.at.start + Hs));
361
- }, Hf = (e, t) => {
362
+ }, jf = (e, t) => {
362
363
  const n = Ca(e, t);
363
364
  if (n === null)
364
365
  return null;
@@ -366,33 +367,33 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
366
367
  return Fl(n.json);
367
368
  const r = n.html.indexOf(n.at.quote, n.at.start);
368
369
  return r === -1 ? null : Fl(ya(n.html.slice(n.at.start, r)));
369
- }, jf = /<google-sheets-html-origin[\s>]/, Bf = 'data-sheets-root="1"', Vf = /<meta\s+name=["']?Generator["']?\s+content=["']?Microsoft Excel/, Wf = "mso-", Kf = /\.xl\d+\s*\{/, Yf = "<table", Xf = (e) => e.includes(js) ? "aqsp" : jf.test(e) && e.includes(Bf) ? "sheets" : Vf.test(e) || e.includes(Wf) || Kf.test(e) ? "excel" : null, Uf = (e, t) => {
370
+ }, Bf = /<google-sheets-html-origin[\s>]/, Vf = 'data-sheets-root="1"', Wf = /<meta\s+name=["']?Generator["']?\s+content=["']?Microsoft Excel/, Kf = "mso-", Yf = /\.xl\d+\s*\{/, Xf = "<table", Uf = (e) => e.includes(js) ? "aqsp" : Bf.test(e) && e.includes(Vf) ? "sheets" : Wf.test(e) || e.includes(Kf) || Yf.test(e) ? "excel" : null, Gf = (e, t) => {
370
371
  if (t === "event" && e.types.includes(zo))
371
372
  return "aqsp";
372
373
  if (e.types.includes("text/html")) {
373
- const n = e.getData("text/html"), r = n.length > zl ? n.slice(0, zl) : n, o = Xf(r);
374
+ const n = e.getData("text/html"), r = n.length > zl ? n.slice(0, zl) : n, o = Uf(r);
374
375
  if (o === "aqsp")
375
376
  return "aqsp";
376
- if (n.includes(Yf))
377
+ if (n.includes(Xf))
377
378
  return o === null ? "html" : o;
378
379
  }
379
380
  return e.types.includes("text/plain") && e.getData("text/plain") !== "" ? "tsv" : "none";
380
- }, pi = 1e3, va = 65534, Gf = 9, Jf = 10, Zf = 12, Qf = 13, ep = 32, ba = 34, Ra = 39, tp = 43, hi = 47, ql = 48, np = 57, rp = 61, op = 62, sp = 97, ip = 98, lp = 100, cp = 102, Sa = 104, Ea = 114, ka = 116, ap = ["able", "body", "head", "foot"], _r = (e) => e === ep || e === Gf || e === Jf || e === Qf || e === Zf, Bs = (e) => e === op || e === hi || _r(e), up = (e) => _r(e) || e === hi || e === ba || e === Ra, dp = (e, t, n, r) => {
381
- if (t === 0 || !up(e.charCodeAt(t - 1)))
381
+ }, pi = 1e3, va = 65534, Jf = 9, Zf = 10, Qf = 12, ep = 13, tp = 32, ba = 34, Ra = 39, np = 43, hi = 47, ql = 48, rp = 57, op = 61, sp = 62, ip = 97, lp = 98, cp = 100, ap = 102, Sa = 104, Ea = 114, ka = 116, up = ["able", "body", "head", "foot"], _r = (e) => e === tp || e === Jf || e === Zf || e === ep || e === Qf, Bs = (e) => e === sp || e === hi || _r(e), dp = (e) => _r(e) || e === hi || e === ba || e === Ra, fp = (e, t, n, r) => {
382
+ if (t === 0 || !dp(e.charCodeAt(t - 1)))
382
383
  return null;
383
384
  let o = t + n;
384
385
  for (; _r(e.charCodeAt(o)); )
385
386
  o += 1;
386
- if (e.charCodeAt(o) !== rp)
387
+ if (e.charCodeAt(o) !== op)
387
388
  return 1;
388
389
  for (o += 1; _r(e.charCodeAt(o)); )
389
390
  o += 1;
390
391
  const s = e.charCodeAt(o);
391
392
  for ((s === ba || s === Ra) && (o += 1); _r(e.charCodeAt(o)); )
392
393
  o += 1;
393
- e.charCodeAt(o) === tp && (o += 1);
394
+ e.charCodeAt(o) === np && (o += 1);
394
395
  let i = 0, l = 0;
395
- for (let c = e.charCodeAt(o); c >= ql && c <= np; c = e.charCodeAt(o))
396
+ for (let c = e.charCodeAt(o); c >= ql && c <= rp; c = e.charCodeAt(o))
396
397
  i = i * 10 + (c - ql), l += 1, o += 1;
397
398
  return l === 0 || i === 0 ? 1 : i > r ? r : i;
398
399
  }, Pl = (e, t, n) => {
@@ -401,25 +402,25 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
401
402
  for (; r !== -1 && r < o; )
402
403
  r = e.indexOf(t, r + t.length);
403
404
  for (; r !== -1 && r < s; r = e.indexOf(t, r + t.length)) {
404
- const i = dp(e, r, t.length, n);
405
+ const i = fp(e, r, t.length, n);
405
406
  if (i !== null)
406
407
  return i;
407
408
  }
408
409
  return 1;
409
410
  };
410
- }, fp = (e, t) => {
411
+ }, pp = (e, t) => {
411
412
  if (e.charCodeAt(t + 2) !== ka)
412
413
  return !1;
413
414
  const n = e.charCodeAt(t + 3);
414
415
  if (n === Ea)
415
416
  return Bs(e.charCodeAt(t + 4));
416
- if (n !== sp && n !== ip && n !== Sa && n !== cp)
417
+ if (n !== ip && n !== lp && n !== Sa && n !== ap)
417
418
  return !1;
418
- for (const r of ap)
419
+ for (const r of up)
419
420
  if (e.startsWith(r, t + 3) && Bs(e.charCodeAt(t + 3 + r.length)))
420
421
  return !0;
421
422
  return !1;
422
- }, pp = (e) => {
423
+ }, hp = (e) => {
423
424
  const t = e.toLowerCase(), n = Pl(t, "colspan", pi), r = Pl(t, "rowspan", va);
424
425
  let o = 0;
425
426
  const s = (j) => (o !== -1 && o < j && (o = t.indexOf(">", j)), o === -1 ? t.length : o);
@@ -437,7 +438,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
437
438
  for (let j = t.indexOf("<"); j !== -1; j = t.indexOf("<", j + 1)) {
438
439
  const Z = t.charCodeAt(j + 1);
439
440
  if (Z === hi) {
440
- fp(t, j) && z();
441
+ pp(t, j) && z();
441
442
  continue;
442
443
  }
443
444
  if (Z !== ka || !Bs(t.charCodeAt(j + 3)))
@@ -445,7 +446,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
445
446
  const Q = t.charCodeAt(j + 2);
446
447
  if (Q === Ea)
447
448
  M();
448
- else if (Q === lp || Q === Sa) {
449
+ else if (Q === cp || Q === Sa) {
449
450
  p || M();
450
451
  const A = j + 3, L = s(A), W = n(A, L);
451
452
  c += W;
@@ -471,7 +472,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
471
472
  const o = Xt(r), s = o === void 0 ? void 0 : t.intern(o);
472
473
  return e.set(r, s), s;
473
474
  }, entries: t.entries };
474
- }, hp = () => {
475
+ }, mp = () => {
475
476
  const e = /* @__PURE__ */ new WeakMap(), t = Oa(jr);
476
477
  return { intern: (r) => {
477
478
  const o = e.get(r);
@@ -480,18 +481,18 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
480
481
  const s = t.intern(r);
481
482
  return e.set(r, s), s;
482
483
  }, entries: t.entries };
483
- }, mp = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "tel:"]), _n = (e) => {
484
+ }, gp = /* @__PURE__ */ new Set(["http:", "https:", "mailto:", "tel:"]), _n = (e) => {
484
485
  const t = e.trim();
485
486
  if (!URL.canParse(t))
486
487
  return null;
487
488
  const n = new URL(t);
488
- return mp.has(n.protocol) ? n.href : null;
489
+ return gp.has(n.protocol) ? n.href : null;
489
490
  }, wr = (e) => {
490
491
  if (e === void 0)
491
492
  return;
492
493
  const t = _n(e);
493
494
  return t === null ? void 0 : t;
494
- }, $a = (e, t) => e.startCol === 0 && e.endCol === t - 1, Ta = (e, t) => e.startRow === 0 && e.endRow === t - 1, Vs = 13, rn = Object.freeze({ style: Object.freeze({}), lineBoxPx: Vs, verticalAlign: "middle" }), gp = {
495
+ }, $a = (e, t) => e.startCol === 0 && e.endCol === t - 1, Ta = (e, t) => e.startRow === 0 && e.endRow === t - 1, Vs = 13, rn = Object.freeze({ style: Object.freeze({}), lineBoxPx: Vs, verticalAlign: "middle" }), wp = {
495
496
  aliceblue: "#f0f8ff",
496
497
  antiquewhite: "#faebd7",
497
498
  aqua: "#00ffff",
@@ -641,7 +642,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
641
642
  yellow: "#ffff00",
642
643
  yellowgreen: "#9acd32",
643
644
  transparent: "#00000000"
644
- }, wp = new Map(Object.entries(gp)), yp = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/, Cp = /^rgba?\((.*)\)$/, xa = /^(\d+(?:\.\d+)?)%$/, ao = (e) => e.toString(16).padStart(2, "0"), Rs = (e) => {
645
+ }, yp = new Map(Object.entries(wp)), Cp = /^#([0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/, vp = /^rgba?\((.*)\)$/, xa = /^(\d+(?:\.\d+)?)%$/, ao = (e) => e.toString(16).padStart(2, "0"), Rs = (e) => {
645
646
  const t = xa.exec(e);
646
647
  if (t !== null) {
647
648
  const r = Number(t[1]);
@@ -651,7 +652,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
651
652
  return null;
652
653
  const n = Number(e);
653
654
  return n <= 255 ? n : null;
654
- }, vp = (e) => {
655
+ }, bp = (e) => {
655
656
  const t = xa.exec(e);
656
657
  if (t !== null) {
657
658
  const r = Number(t[1]);
@@ -661,7 +662,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
661
662
  return null;
662
663
  const n = Number(e);
663
664
  return n <= 1 ? Math.round(n * 255) : null;
664
- }, bp = (e) => {
665
+ }, Rp = (e) => {
665
666
  const t = e.trim().split(/\s*[,/]\s*|\s+/);
666
667
  if (t.length !== 3 && t.length !== 4)
667
668
  return null;
@@ -671,18 +672,18 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
671
672
  const s = `#${ao(n)}${ao(r)}${ao(o)}`;
672
673
  if (t.length === 3)
673
674
  return s;
674
- const i = vp(t[3]);
675
+ const i = bp(t[3]);
675
676
  return i === null ? null : i === 255 ? s : `${s}${ao(i)}`;
676
677
  }, ut = (e) => {
677
- const t = e.trim().toLowerCase(), n = yp.exec(t);
678
+ const t = e.trim().toLowerCase(), n = Cp.exec(t);
678
679
  if (n !== null) {
679
680
  const s = n[1], i = s.length <= 4 ? s.replace(/./g, (l) => l + l) : s;
680
681
  return i.length === 8 && i.endsWith("ff") ? `#${i.slice(0, 6)}` : `#${i}`;
681
682
  }
682
- const r = Cp.exec(t);
683
+ const r = vp.exec(t);
683
684
  if (r !== null)
684
- return bp(r[1]);
685
- const o = wp.get(t);
685
+ return Rp(r[1]);
686
+ const o = yp.get(t);
686
687
  return o === void 0 ? null : o;
687
688
  }, _l = {
688
689
  thin: { width: 1, line: "solid" },
@@ -697,7 +698,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
697
698
  return null;
698
699
  const t = _l[e.style], n = e.color === void 0 ? ua : ut(e.color);
699
700
  return n === null ? null : `${t.width}px ${t.line} ${n}`;
700
- }, Rp = { top: "flex-start", middle: "center", bottom: "flex-end" }, Sp = (e) => e === "left" || e === "center" || e === "right", Ma = (e) => e === "top" || e === "middle" || e === "bottom", za = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 ? e * 4 / 3 : null, Na = (e, t) => {
701
+ }, Sp = { top: "flex-start", middle: "center", bottom: "flex-end" }, Ep = (e) => e === "left" || e === "center" || e === "right", Ma = (e) => e === "top" || e === "middle" || e === "bottom", za = (e) => typeof e == "number" && Number.isFinite(e) && e > 0 ? e * 4 / 3 : null, Na = (e, t) => {
701
702
  if (typeof e.background == "string") {
702
703
  const s = ut(e.background);
703
704
  s !== null && (t.background = s);
@@ -716,7 +717,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
716
717
  return n !== null ? n : t === void 0 ? null : Il(t);
717
718
  }, Ss = (e, t, n, r, o) => {
718
719
  const s = {}, i = {};
719
- e !== void 0 && (Sp(e.align) && (i["data-aqsp-align"] = e.align, s.justifyContent = Pr(e.align)), Ma(e.verticalAlign) && (i["data-aqsp-valign"] = e.verticalAlign, s.alignItems = Rp[e.verticalAlign]), e.wrap === !0 && (i["data-aqsp-wrap"] = ""), Na(e, s));
720
+ e !== void 0 && (Ep(e.align) && (i["data-aqsp-align"] = e.align, s.justifyContent = Pr(e.align)), Ma(e.verticalAlign) && (i["data-aqsp-valign"] = e.verticalAlign, s.alignItems = Sp[e.verticalAlign]), e.wrap === !0 && (i["data-aqsp-wrap"] = ""), Na(e, s));
720
721
  const l = e?.borders, c = uo(l?.right, t);
721
722
  c !== null && (s.borderRight = c);
722
723
  const a = uo(l?.bottom, n);
@@ -729,7 +730,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
729
730
  p !== null && (s.borderTop = p);
730
731
  }
731
732
  return Object.keys(s).length === 0 && Object.keys(i).length === 0 ? null : Object.freeze({ style: Object.freeze(s), attrs: Object.freeze(i) });
732
- }, Hl = /* @__PURE__ */ new WeakMap(), Ep = (e, t, n, r, o) => {
733
+ }, Hl = /* @__PURE__ */ new WeakMap(), kp = (e, t, n, r, o) => {
733
734
  const s = t?.borders?.left, i = n?.borders?.top, l = !(r || o) && s === void 0 && i === void 0;
734
735
  if (e === void 0)
735
736
  return l ? null : Ss(void 0, s, i, r, o);
@@ -740,14 +741,14 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
740
741
  return c;
741
742
  const a = Ss(e, void 0, void 0, !1, !1);
742
743
  return Hl.set(e, a), a;
743
- }, kp = (e) => {
744
+ }, Op = (e) => {
744
745
  if (e === void 0)
745
746
  return rn;
746
747
  const t = {};
747
748
  Na(e, t);
748
749
  const n = za(e.fontSize), r = n === null ? Vs : Math.round(n), o = Ma(e.verticalAlign) ? e.verticalAlign : "middle";
749
750
  return Object.keys(t).length === 0 && r === Vs && o === "middle" ? rn : Object.freeze({ style: Object.freeze(t), lineBoxPx: r, verticalAlign: o });
750
- }, Op = "#REF!", Ap = 11, $p = 15, Tp = 4096, ko = 33, Ir = 34, mi = 36, xp = 38, Ws = 39, Da = 40, Mp = 42, zp = 43, Np = 44, Fa = 45, Dp = 46, Fp = 47, ar = 58, Lp = 59, qp = 60, La = 61, Pp = 62, _p = 67, Ip = 82, Bo = 91, qa = 93, Hp = 94, jp = 95, Pa = (e) => e >= 65 && e <= 90 || e >= 97 && e <= 122, _a = (e) => e >= 48 && e <= 57, gi = (e) => Pa(e) || _a(e) || e === jp || e === Dp || e === mi || e >= 128, Bp = (e) => e === 32 || e >= 9 && e <= 13 || e === 160 || e === 5760 || e >= 8192 && e <= 8202 || e === 8232 || e === 8233 || e === 8239 || e === 8287 || e === 12288 || e === 65279, Vp = (e) => e === La || e === Da || e === Np || e === Lp || e === zp || e === Fa || e === Mp || e === Fp || e === Hp || e === xp || e === qp || e === Pp || e === ar, Ia = (e, t) => {
751
+ }, Ap = "#REF!", $p = 11, Tp = 15, xp = 4096, ko = 33, Ir = 34, mi = 36, Mp = 38, Ws = 39, Da = 40, zp = 42, Np = 43, Dp = 44, Fa = 45, Fp = 46, Lp = 47, ar = 58, qp = 59, Pp = 60, La = 61, _p = 62, Ip = 67, Hp = 82, Bo = 91, qa = 93, jp = 94, Bp = 95, Pa = (e) => e >= 65 && e <= 90 || e >= 97 && e <= 122, _a = (e) => e >= 48 && e <= 57, gi = (e) => Pa(e) || _a(e) || e === Bp || e === Fp || e === mi || e >= 128, Vp = (e) => e === 32 || e >= 9 && e <= 13 || e === 160 || e === 5760 || e >= 8192 && e <= 8202 || e === 8232 || e === 8233 || e === 8239 || e === 8287 || e === 12288 || e === 65279, Wp = (e) => e === La || e === Da || e === Dp || e === qp || e === Np || e === Fa || e === zp || e === Lp || e === jp || e === Mp || e === Pp || e === _p || e === ar, Ia = (e, t) => {
751
752
  if (t >= e.length)
752
753
  return !0;
753
754
  const n = e.charCodeAt(t);
@@ -770,7 +771,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
770
771
  r += 1;
771
772
  }
772
773
  return e.length;
773
- }, Wp = (e, t) => {
774
+ }, Kp = (e, t) => {
774
775
  let n = 0, r = t;
775
776
  for (; r < e.length; ) {
776
777
  const o = e.charCodeAt(r);
@@ -803,7 +804,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
803
804
  continue;
804
805
  }
805
806
  if (s === Bo) {
806
- o = Wp(e, o);
807
+ o = Kp(e, o);
807
808
  continue;
808
809
  }
809
810
  if (!gi(s)) {
@@ -832,7 +833,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
832
833
  const i = e.charCodeAt(n);
833
834
  if (!Pa(i))
834
835
  break;
835
- if (s += 1, s > Ap)
836
+ if (s += 1, s > $p)
836
837
  return null;
837
838
  o = o * 26 + (i & 31), n += 1;
838
839
  }
@@ -843,7 +844,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
843
844
  const o = e.charCodeAt(n);
844
845
  if (!_a(o))
845
846
  break;
846
- if (n - t >= $p)
847
+ if (n - t >= Tp)
847
848
  return null;
848
849
  r = r * 10 + (o - 48), n += 1;
849
850
  }
@@ -851,7 +852,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
851
852
  }, fo = (e, t) => {
852
853
  const n = e.charCodeAt(t) === mi, r = Ys(e, n ? t + 1 : t);
853
854
  return r === null || r.value === 0 ? null : { end: r.end, index: r.value - 1, abs: n };
854
- }, Kp = (e, t) => {
855
+ }, Yp = (e, t) => {
855
856
  const n = Es(e, t);
856
857
  if (n !== null) {
857
858
  const o = fo(e, n.end);
@@ -883,7 +884,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
883
884
  return { end: o.end, token: { kind: "row", start: { row: r.index, abs: r.abs }, end: { row: o.index, abs: o.abs } } };
884
885
  }
885
886
  return null;
886
- }, Wr = (e) => Ha(e, Kp), ja = (e, t = Tp) => {
887
+ }, Wr = (e) => Ha(e, Yp), ja = (e, t = xp) => {
887
888
  if (!Number.isInteger(t) || t <= 0)
888
889
  throw new RangeError(`[spreadsheet] createFormulaMemo requires a positive integer limit, received ${t}`);
889
890
  const n = /* @__PURE__ */ new Map();
@@ -917,7 +918,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
917
918
  }, rr = (e, t) => {
918
919
  if (!Number.isInteger(e) || e < 0)
919
920
  throw new RangeError(`[spreadsheet] ${t} must be a non-negative integer, received ${e}`);
920
- }, Yp = (e, t) => {
921
+ }, Xp = (e, t) => {
921
922
  const n = "startRow" in e ? e : { startRow: e.row, startCol: e.col, endRow: e.row, endCol: e.col };
922
923
  switch (rr(n.startRow, "formatRangeReference startRow"), rr(n.startCol, "formatRangeReference startCol"), rr(n.endRow, "formatRangeReference endRow"), rr(n.endCol, "formatRangeReference endCol"), t) {
923
924
  case "columns":
@@ -937,13 +938,13 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
937
938
  let r = "", o = 0;
938
939
  for (const s of t) {
939
940
  const i = n(s.token);
940
- r += e.slice(o, s.start) + (i === null ? `${wi(s.token)}${Op}` : i), o = s.end;
941
+ r += e.slice(o, s.start) + (i === null ? `${wi(s.token)}${Ap}` : i), o = s.end;
941
942
  }
942
943
  return r + e.slice(o);
943
944
  }, Vo = (e) => e.charCodeAt(0) === La, Os = (e, t, n) => {
944
945
  const r = e.absRow ? e.row : e.row + t, o = e.absCol ? e.col : e.col + n;
945
946
  return r < 0 || o < 0 ? null : { row: r, col: o, absRow: e.absRow, absCol: e.absCol };
946
- }, Xp = (e, t, n) => {
947
+ }, Up = (e, t, n) => {
947
948
  switch (e.kind) {
948
949
  case "cell": {
949
950
  const r = Os(e, t, n);
@@ -962,16 +963,16 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
962
963
  return r < 0 || o < 0 ? null : { ...e, start: { row: r, abs: e.start.abs }, end: { row: o, abs: e.end.abs } };
963
964
  }
964
965
  }
965
- }, Up = (e, t, n) => {
966
+ }, Gp = (e, t, n) => {
966
967
  if (!(Number.isInteger(t) && Number.isInteger(n)))
967
968
  throw new RangeError(`[spreadsheet] shiftFormula requires integer deltas, received ${t}, ${n}`);
968
969
  return Vo(e) ? yi(e, Wr(e), (r) => {
969
- const o = Xp(r, t, n);
970
+ const o = Up(r, t, n);
970
971
  return o === null ? null : wn(o);
971
972
  }) : e;
972
973
  }, Ba = (e, t) => {
973
974
  rr(e.row, `${t} origin.row`), rr(e.col, `${t} origin.col`);
974
- }, or = (e, t, n, r) => n ? `${e}${t + 1}` : `${e}[${t - r}]`, As = (e, t) => `${or("R", e.row, e.absRow, t.row)}${or("C", e.col, e.absCol, t.col)}`, Gp = (e, t) => {
975
+ }, or = (e, t, n, r) => n ? `${e}${t + 1}` : `${e}[${t - r}]`, As = (e, t) => `${or("R", e.row, e.absRow, t.row)}${or("C", e.col, e.absCol, t.col)}`, Jp = (e, t) => {
975
976
  const n = wi(e);
976
977
  switch (e.kind) {
977
978
  case "cell":
@@ -983,7 +984,7 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
983
984
  case "row":
984
985
  return `${n}${or("R", e.start.row, e.start.abs, t.row)}:${or("R", e.end.row, e.end.abs, t.row)}`;
985
986
  }
986
- }, Ci = (e, t) => (Ba(t, "toR1C1"), Vo(e) ? yi(e, Wr(e), (n) => Gp(n, t)) : e), Vl = (e, t, n) => {
987
+ }, Ci = (e, t) => (Ba(t, "toR1C1"), Vo(e) ? yi(e, Wr(e), (n) => Jp(n, t)) : e), Vl = (e, t, n) => {
987
988
  const r = e.charCodeAt(t);
988
989
  if (r !== n && r !== n + 32)
989
990
  return null;
@@ -995,9 +996,9 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
995
996
  const s = Ys(e, o);
996
997
  return s === null ? { end: o, axis: { rel: !0, n: 0 } } : s.value === 0 ? null : { end: s.end, axis: { rel: !1, n: s.value } };
997
998
  }, Wl = (e, t) => {
998
- const n = Vl(e, t, Ip), r = Vl(e, n === null ? t : n.end, _p);
999
+ const n = Vl(e, t, Hp), r = Vl(e, n === null ? t : n.end, Ip);
999
1000
  return n !== null && r !== null ? { end: r.end, shape: "cell", cell: { row: n.axis, col: r.axis } } : n !== null ? { end: n.end, shape: "row", row: n.axis } : r === null ? null : { end: r.end, shape: "column", col: r.axis };
1000
- }, Jp = (e) => {
1001
+ }, Zp = (e) => {
1001
1002
  switch (e.shape) {
1002
1003
  case "cell":
1003
1004
  return { shape: "cell", start: e.cell, end: null };
@@ -1006,23 +1007,23 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
1006
1007
  case "column":
1007
1008
  return { shape: "column", start: e.col, end: null };
1008
1009
  }
1009
- }, Zp = (e, t) => e.shape === "cell" && t.shape === "cell" ? { shape: "cell", start: e.cell, end: t.cell } : e.shape === "row" && t.shape === "row" ? { shape: "row", start: e.row, end: t.row } : e.shape === "column" && t.shape === "column" ? { shape: "column", start: e.col, end: t.col } : null, Qp = (e, t) => {
1010
+ }, Qp = (e, t) => e.shape === "cell" && t.shape === "cell" ? { shape: "cell", start: e.cell, end: t.cell } : e.shape === "row" && t.shape === "row" ? { shape: "row", start: e.row, end: t.row } : e.shape === "column" && t.shape === "column" ? { shape: "column", start: e.col, end: t.col } : null, eh = (e, t) => {
1010
1011
  const n = Wl(e, t);
1011
1012
  if (n === null)
1012
1013
  return null;
1013
1014
  if (e.charCodeAt(n.end) === ar) {
1014
1015
  const r = Wl(e, n.end + 1);
1015
1016
  if (r !== null) {
1016
- const o = Zp(n, r);
1017
+ const o = Qp(n, r);
1017
1018
  if (o !== null)
1018
1019
  return { end: r.end, token: o };
1019
1020
  }
1020
1021
  }
1021
- return { end: n.end, token: Jp(n) };
1022
- }, eh = (e) => Ha(e, Qp), th = ja(eh), sr = (e, t) => e.rel ? t + e.n : e.n - 1, Kl = (e, t) => {
1022
+ return { end: n.end, token: Zp(n) };
1023
+ }, th = (e) => Ha(e, eh), nh = ja(th), sr = (e, t) => e.rel ? t + e.n : e.n - 1, Kl = (e, t) => {
1023
1024
  const n = sr(e.row, t.row), r = sr(e.col, t.col);
1024
1025
  return n < 0 || r < 0 ? null : { row: n, col: r, absRow: !e.row.rel, absCol: !e.col.rel };
1025
- }, nh = (e, t) => {
1026
+ }, rh = (e, t) => {
1026
1027
  const n = e.sheet === void 0 ? {} : { sheet: e.sheet };
1027
1028
  switch (e.shape) {
1028
1029
  case "cell": {
@@ -1043,10 +1044,10 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
1043
1044
  return o < 0 || s < 0 ? null : { kind: "column", start: { col: o, abs: !e.start.rel }, end: { col: s, abs: !r.rel }, ...n };
1044
1045
  }
1045
1046
  }
1046
- }, Wo = (e, t) => (Ba(t, "fromR1C1"), Vo(e) ? yi(e, th(e), (n) => {
1047
- const r = nh(n, t);
1047
+ }, Wo = (e, t) => (Ba(t, "fromR1C1"), Vo(e) ? yi(e, nh(e), (n) => {
1048
+ const r = rh(n, t);
1048
1049
  return r === null ? null : wn(r);
1049
- }) : e), Yl = (e, t) => e || t ? e && t ? { absCol: !1, absRow: !0 } : !e && t ? { absCol: !0, absRow: !1 } : { absCol: !1, absRow: !1 } : { absCol: !0, absRow: !0 }, rh = (e) => {
1050
+ }) : e), Yl = (e, t) => e || t ? e && t ? { absCol: !1, absRow: !0 } : !e && t ? { absCol: !0, absRow: !1 } : { absCol: !1, absRow: !1 } : { absCol: !0, absRow: !0 }, oh = (e) => {
1050
1051
  switch (e.kind) {
1051
1052
  case "cell":
1052
1053
  return { ...e, ...Yl(e.absCol, e.absRow) };
@@ -1070,11 +1071,11 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
1070
1071
  if (n.start <= t && t <= n.end)
1071
1072
  return n;
1072
1073
  return null;
1073
- }, oh = (e, t) => {
1074
+ }, sh = (e, t) => {
1074
1075
  const n = Wa(e, t);
1075
1076
  if (n === null)
1076
1077
  return null;
1077
- const r = wn(rh(n.token));
1078
+ const r = wn(oh(n.token));
1078
1079
  return { text: `${e.slice(0, n.start)}${r}${e.slice(n.end)}`, caret: n.start + r.length };
1079
1080
  }, Xl = (e, t) => {
1080
1081
  let n = -1, r = 0;
@@ -1087,9 +1088,9 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
1087
1088
  n = Ir, r = s;
1088
1089
  continue;
1089
1090
  }
1090
- Bp(o) || (n = o), r += 1;
1091
+ Vp(o) || (n = o), r += 1;
1091
1092
  }
1092
- return Vp(n);
1093
+ return Wp(n);
1093
1094
  }, Ka = (e, t) => {
1094
1095
  if (!Va(e, t))
1095
1096
  return null;
@@ -1120,9 +1121,9 @@ const li = 1e3, Sn = 1e4, ci = 10, Tl = 2 ** (1 / 4), Xd = (e, t) => e <= 0 ? e
1120
1121
  { code: "NZD", symbol: "$", lcid: "1409", locale: "en-NZ", digits: 2 },
1121
1122
  { code: "MXN", symbol: "$", lcid: "80a", locale: "es-MX", digits: 2 },
1122
1123
  { code: "BRL", symbol: "R$", lcid: "416", locale: "pt-BR", digits: 2 }
1123
- ], Ko = (e, t) => `[$${e}-${t}]`, sh = new Map(mr.map((e) => [Ko(e.symbol, e.lcid), e])), ih = new Map(mr.filter((e, t) => mr.findIndex((n) => n.code === e.code) === t).map((e) => [e.code, e]));
1124
+ ], Ko = (e, t) => `[$${e}-${t}]`, ih = new Map(mr.map((e) => [Ko(e.symbol, e.lcid), e])), lh = new Map(mr.filter((e, t) => mr.findIndex((n) => n.code === e.code) === t).map((e) => [e.code, e]));
1124
1125
  new Map(mr.map((e) => [Ko(e.symbol, e.lcid), e.code]));
1125
- const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) => e.code), "¥"]), ch = 20, ah = "yyyy/MM/dd", Ya = /yyyy|MM|dd|HH|mm|ss/g, Xa = " -+/():!^&'~{}<>=", uh = "$¥€£₩₹¥", Us = (e) => {
1126
+ const ch = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) => e.code), "¥"]), ah = 20, uh = "yyyy/MM/dd", Ya = /yyyy|MM|dd|HH|mm|ss/g, Xa = " -+/():!^&'~{}<>=", dh = "$¥€£₩₹¥", Us = (e) => {
1126
1127
  let t = "", n = 0;
1127
1128
  for (; n < e.length; ) {
1128
1129
  const r = e[n];
@@ -1142,7 +1143,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1142
1143
  t += r, n += 1;
1143
1144
  }
1144
1145
  return t;
1145
- }, dh = (e) => {
1146
+ }, fh = (e) => {
1146
1147
  let t = 0;
1147
1148
  for (; t < e.length; ) {
1148
1149
  const n = e[t];
@@ -1161,7 +1162,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1161
1162
  }
1162
1163
  }
1163
1164
  return e;
1164
- }, fh = (e) => {
1165
+ }, ph = (e) => {
1165
1166
  const t = [], n = (o) => {
1166
1167
  const s = t[t.length - 1];
1167
1168
  s !== void 0 && s.kind === "literal" ? t[t.length - 1] = { kind: "literal", text: s.text + o } : t.push({ kind: "literal", text: o });
@@ -1213,20 +1214,20 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1213
1214
  s += 1;
1214
1215
  t.push({ kind: "date", text: e.slice(r, s).toLowerCase() }), r = s;
1215
1216
  }
1216
- else if (Xa.includes(o) || uh.includes(o) || o.charCodeAt(0) >= 128)
1217
+ else if (Xa.includes(o) || dh.includes(o) || o.charCodeAt(0) >= 128)
1217
1218
  n(o), r += 1;
1218
1219
  else
1219
1220
  return null;
1220
1221
  }
1221
1222
  return t;
1222
- }, Lt = (e) => e === void 0 ? {} : { locale: e }, ph = /^(0|#,##0)(?:\.(0+))?$/, Ul = (e, t, n, r) => {
1223
+ }, Lt = (e) => e === void 0 ? {} : { locale: e }, hh = /^(0|#,##0)(?:\.(0+))?$/, Ul = (e, t, n, r) => {
1223
1224
  if (t !== null) {
1224
- const o = sh.get(Ko(e, t));
1225
+ const o = ih.get(Ko(e, t));
1225
1226
  return o === void 0 ? void 0 : { type: "currency", currency: o.code, decimals: n, locale: o.locale };
1226
1227
  }
1227
- if (!(!lh.has(e) || r.currency === void 0))
1228
+ if (!(!ch.has(e) || r.currency === void 0))
1228
1229
  return { type: "currency", currency: r.currency, decimals: n, ...Lt(r.locale) };
1229
- }, hh = (e, t) => {
1230
+ }, mh = (e, t) => {
1230
1231
  let n = "", r = !1, o = null, s = !1, i = 0, l = "", c = "";
1231
1232
  for (const M of e)
1232
1233
  switch (M.kind) {
@@ -1256,7 +1257,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1256
1257
  default:
1257
1258
  return;
1258
1259
  }
1259
- const a = ph.exec(n);
1260
+ const a = hh.exec(n);
1260
1261
  if (a === null)
1261
1262
  return;
1262
1263
  const p = a[1] === "#,##0", m = a[2] === void 0 ? 0 : a[2].length, N = l.trim(), z = c.trim();
@@ -1270,15 +1271,15 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1270
1271
  return N === "" && z === "" ? Ul(o.symbol, o.lcid, m, t) : void 0;
1271
1272
  if (!(N !== "" && z !== ""))
1272
1273
  return N !== "" || z !== "" ? Ul(N + z, null, m, t) : { type: "number", decimals: m, ...p ? { grouping: !0 } : {}, ...Lt(t.locale) };
1273
- }, mh = /* @__PURE__ */ new Map([
1274
+ }, gh = /* @__PURE__ */ new Map([
1274
1275
  ["yyyy", "yyyy"],
1275
1276
  ["dd", "dd"],
1276
1277
  ["hh", "HH"],
1277
1278
  ["ss", "ss"]
1278
- ]), gh = (e, t) => {
1279
+ ]), wh = (e, t) => {
1279
1280
  const n = [...e.matchAll(Ya)];
1280
1281
  return n.length === t.length && n.every((r, o) => r.index === t[o].index && r[0] === t[o].text);
1281
- }, wh = (e) => {
1282
+ }, yh = (e) => {
1282
1283
  const t = e.flatMap((s) => s.kind === "date" ? [s.text] : []), n = [];
1283
1284
  let r = "", o = 0;
1284
1285
  for (const s of e) {
@@ -1290,13 +1291,13 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1290
1291
  }
1291
1292
  if (s.kind !== "date")
1292
1293
  return;
1293
- const i = s.text === "mm" ? t[o - 1] === "hh" || t[o + 1] === "ss" ? "mm" : "MM" : mh.get(s.text);
1294
+ const i = s.text === "mm" ? t[o - 1] === "hh" || t[o + 1] === "ss" ? "mm" : "MM" : gh.get(s.text);
1294
1295
  if (o += 1, i === void 0)
1295
1296
  return;
1296
1297
  n.push({ index: r.length, text: i }), r += i;
1297
1298
  }
1298
- return n.length > 0 && gh(r, n) ? { type: "date", pattern: r } : void 0;
1299
- }, yh = /* @__PURE__ */ new Map([
1299
+ return n.length > 0 && wh(r, n) ? { type: "date", pattern: r } : void 0;
1300
+ }, Ch = /* @__PURE__ */ new Map([
1300
1301
  ["General", () => {
1301
1302
  }],
1302
1303
  ["@", () => ({ type: "text" })],
@@ -1309,17 +1310,17 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1309
1310
  ["Short Date", () => ({ type: "date" })],
1310
1311
  ["Short Time", () => ({ type: "date", pattern: "HH:mm" })]
1311
1312
  ]), vi = (e, t) => {
1312
- const n = dh(e).trim(), r = yh.get(n);
1313
+ const n = fh(e).trim(), r = Ch.get(n);
1313
1314
  if (r !== void 0)
1314
1315
  return r(t);
1315
- const o = fh(n);
1316
+ const o = ph(n);
1316
1317
  if (o !== null) {
1317
1318
  if (o.some((s) => s.kind === "digits"))
1318
- return hh(o, t);
1319
+ return mh(o, t);
1319
1320
  if (o.some((s) => s.kind === "date"))
1320
- return wh(o);
1321
+ return yh(o);
1321
1322
  }
1322
- }, Ch = (e, t) => {
1323
+ }, vh = (e, t) => {
1323
1324
  let n;
1324
1325
  try {
1325
1326
  n = JSON.parse(e);
@@ -1335,7 +1336,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1335
1336
  return { type: "text" };
1336
1337
  const i = s === void 0 ? void 0 : vi(s, t);
1337
1338
  return o === 5 ? i !== void 0 && i.type === "date" ? i : { type: "date" } : i;
1338
- }, Fr = (e) => e === 0 ? "" : `.${"0".repeat(e)}`, Oo = (e) => e !== void 0 && Number.isInteger(e) && e >= 0 && e <= ch, vh = `${Xa}.,`, Gl = (e) => e.includes('"') ? null : [...e].every((t) => vh.includes(t)) ? e : `"${e}"`, bh = (e) => {
1339
+ }, Fr = (e) => e === 0 ? "" : `.${"0".repeat(e)}`, Oo = (e) => e !== void 0 && Number.isInteger(e) && e >= 0 && e <= ah, bh = `${Xa}.,`, Gl = (e) => e.includes('"') ? null : [...e].every((t) => bh.includes(t)) ? e : `"${e}"`, Rh = (e) => {
1339
1340
  const t = [];
1340
1341
  let n = 0, r = 0;
1341
1342
  for (const l of e.matchAll(Ya)) {
@@ -1350,8 +1351,8 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1350
1351
  t.push(o);
1351
1352
  const s = t.join(""), i = vi(s, {});
1352
1353
  return i !== void 0 && i.type === "date" && i.pattern === e ? s : null;
1353
- }, Rh = (e) => {
1354
- const t = ih.get(e.currency.toUpperCase());
1354
+ }, Sh = (e) => {
1355
+ const t = lh.get(e.currency.toUpperCase());
1355
1356
  if (t === void 0)
1356
1357
  return null;
1357
1358
  const n = e.decimals === void 0 ? t.digits : e.decimals;
@@ -1364,7 +1365,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1364
1365
  case "text":
1365
1366
  return "@";
1366
1367
  case "date":
1367
- return bh(e.pattern === void 0 ? ah : e.pattern);
1368
+ return Rh(e.pattern === void 0 ? uh : e.pattern);
1368
1369
  case "number":
1369
1370
  return Oo(e.decimals) ? `${e.grouping === !0 ? "#,##0" : "0"}${Fr(e.decimals)}` : null;
1370
1371
  case "percent": {
@@ -1374,16 +1375,16 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1374
1375
  case "scientific":
1375
1376
  return Oo(e.decimals) ? `0${Fr(e.decimals)}E+00` : null;
1376
1377
  case "currency":
1377
- return Rh(e);
1378
+ return Sh(e);
1378
1379
  default:
1379
1380
  return null;
1380
1381
  }
1381
- }, Jl = "-−", Sh = (e, t) => {
1382
+ }, Jl = "-−", Eh = (e, t) => {
1382
1383
  if (t === "" || !e.includes(t))
1383
1384
  return /^\d+$/.test(e) ? e : null;
1384
1385
  const n = e.split(t);
1385
1386
  return !/^\d{1,3}$/.test(n[0]) || n.slice(1).some((r) => !/^\d{3}$/.test(r)) ? null : n.join("");
1386
- }, Eh = (e, t, n, r) => {
1387
+ }, kh = (e, t, n, r) => {
1387
1388
  const o = /^(.*?)[eE]([+-]?\d{1,4})$/.exec(e);
1388
1389
  if (o !== null && r === "none" || o === null && r === "required")
1389
1390
  return null;
@@ -1393,15 +1394,15 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1393
1394
  const c = l.length === 2 ? l[1] : "";
1394
1395
  if (l.length === 2 && !/^\d+$/.test(c))
1395
1396
  return null;
1396
- const a = Sh(l[0], t);
1397
+ const a = Eh(l[0], t);
1397
1398
  return a === null ? null : { integer: a, fraction: c, exponent: i };
1398
- }, kh = (e, t, n, r) => {
1399
+ }, Oh = (e, t, n, r) => {
1399
1400
  const o = e + t, s = e.length + n;
1400
1401
  let i, l;
1401
1402
  s <= 0 ? (i = "0", l = "0".repeat(-s) + o) : s >= o.length ? (i = o + "0".repeat(s - o.length), l = "") : (i = o.slice(0, s), l = o.slice(s)), i = i.replace(/^0+(?=\d)/, ""), l = l.replace(/0+$/, "");
1402
1403
  const c = l === "" ? i : `${i}.${l}`;
1403
1404
  return r && c !== "0" ? `-${c}` : c;
1404
- }, Oh = (e, t, n) => {
1405
+ }, Ah = (e, t, n) => {
1405
1406
  if (n.decimal === "" || n.group === n.decimal)
1406
1407
  throw new RangeError(`numberDisplayToCanonical: separators must declare a non-empty decimal separator distinct from the group separator (got group="${n.group}", decimal="${n.decimal}")`);
1407
1408
  if (t !== void 0 && (t.type === "date" || t.type === "text"))
@@ -1429,13 +1430,13 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1429
1430
  const j = m + N;
1430
1431
  if (N !== z || j > 1 || j === 1 && s || (s = s || j === 1, r !== "currency" && M.trim() !== ""))
1431
1432
  return e;
1432
- const Z = Eh(o.slice(a, p).trim(), i, n.decimal, r === "scientific" ? "required" : r === "general" ? "optional" : "none");
1433
+ const Z = kh(o.slice(a, p).trim(), i, n.decimal, r === "scientific" ? "required" : r === "general" ? "optional" : "none");
1433
1434
  if (Z === null)
1434
1435
  return e;
1435
1436
  const Q = t !== void 0 && t.type === "percent" && t.scale !== !1 ? -2 : 0, A = Z.exponent + Q;
1436
1437
  if (A > 330 || A < -330)
1437
1438
  return e;
1438
- const L = kh(Z.integer, Z.fraction, A, s);
1439
+ const L = Oh(Z.integer, Z.fraction, A, s);
1439
1440
  return Number.isFinite(Number(L)) ? L : e;
1440
1441
  }, Zl = "google-sheets-html-origin", Ga = Object.freeze({ group: ",", decimal: "." }), Ql = Object.freeze({
1441
1442
  thin: ".5pt solid",
@@ -1445,7 +1446,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1445
1446
  dotted: ".5pt dotted",
1446
1447
  double: "1.5pt double",
1447
1448
  hair: ".5pt hairline"
1448
- }), Ja = ["top", "right", "bottom", "left"], Ah = /* @__PURE__ */ new Set(["solid", "dashed", "dotted", "double", "hairline", "none", "hidden", "groove", "ridge", "inset", "outset"]), $h = /* @__PURE__ */ new Set(["windowtext", "currentcolor", "inherit", "initial", "unset"]), Th = /* @__PURE__ */ new Set(["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui", "ui-serif", "ui-sans-serif", "ui-monospace", "ui-rounded", "math", "emoji", "fangsong", "inherit", "initial", "unset"]), ec = ["", "#NULL!", "#DIV/0!", "#VALUE!", "#REF!", "#NAME?", "#NUM!", "#N/A", "#ERROR!"], xh = Object.freeze({ number: 2, percent: 3, currency: 4, scientific: 8 }), Mh = /* @__PURE__ */ new Set(["script", "style", "template", "noscript", "rt", "rp", "img", "svg", "video", "audio", "picture", "canvas", "iframe", "object", "textarea", "select", "button", "input"]), zh = /* @__PURE__ */ new Set(["div", "p", "li", "ul", "ol", "dl", "dt", "dd", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "pre", "section", "article", "header", "footer", "table", "tr", "hr"]), Nh = /* @__PURE__ */ new Set(["b", "strong", "i", "em", "u", "s", "strike", "del", "a", "font", "span"]), Dh = 3, Fh = 1, Za = -25569, Ao = 86400, Lh = -693959, qh = 2958465, Ph = " ", Yo = (e) => {
1449
+ }), Ja = ["top", "right", "bottom", "left"], $h = /* @__PURE__ */ new Set(["solid", "dashed", "dotted", "double", "hairline", "none", "hidden", "groove", "ridge", "inset", "outset"]), Th = /* @__PURE__ */ new Set(["windowtext", "currentcolor", "inherit", "initial", "unset"]), xh = /* @__PURE__ */ new Set(["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui", "ui-serif", "ui-sans-serif", "ui-monospace", "ui-rounded", "math", "emoji", "fangsong", "inherit", "initial", "unset"]), ec = ["", "#NULL!", "#DIV/0!", "#VALUE!", "#REF!", "#NAME?", "#NUM!", "#N/A", "#ERROR!"], Mh = Object.freeze({ number: 2, percent: 3, currency: 4, scientific: 8 }), zh = /* @__PURE__ */ new Set(["script", "style", "template", "noscript", "rt", "rp", "img", "svg", "video", "audio", "picture", "canvas", "iframe", "object", "textarea", "select", "button", "input"]), Nh = /* @__PURE__ */ new Set(["div", "p", "li", "ul", "ol", "dl", "dt", "dd", "h1", "h2", "h3", "h4", "h5", "h6", "blockquote", "pre", "section", "article", "header", "footer", "table", "tr", "hr"]), Dh = /* @__PURE__ */ new Set(["b", "strong", "i", "em", "u", "s", "strike", "del", "a", "font", "span"]), Fh = 3, Lh = 1, Za = -25569, Ao = 86400, qh = -693959, Ph = 2958465, _h = " ", Yo = (e) => {
1449
1450
  const t = /* @__PURE__ */ new Map();
1450
1451
  let n = 0, r = null, o = 0;
1451
1452
  const s = (i) => {
@@ -1470,7 +1471,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1470
1471
  for (const o of e)
1471
1472
  o === "(" ? r += 1 : o === ")" && (r = r > 0 ? r - 1 : 0), r === 0 && /\s/.test(o) ? n !== "" && (t.push(n), n = "") : n += o;
1472
1473
  return n !== "" && t.push(n), t;
1473
- }, _h = /^(?:[a-z][a-z0-9]*)?\.([A-Za-z_-][\w-]*)$/i, Ih = (e) => {
1474
+ }, Ih = /^(?:[a-z][a-z0-9]*)?\.([A-Za-z_-][\w-]*)$/i, Hh = (e) => {
1474
1475
  const t = /* @__PURE__ */ new Map();
1475
1476
  let n = null, r = null;
1476
1477
  for (const s of e.querySelectorAll("style")) {
@@ -1488,7 +1489,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1488
1489
  continue;
1489
1490
  const N = Yo(m);
1490
1491
  for (const z of p.split(",")) {
1491
- const M = z.trim(), j = _h.exec(M);
1492
+ const M = z.trim(), j = Ih.exec(M);
1492
1493
  if (j !== null) {
1493
1494
  const Z = t.get(j[1]);
1494
1495
  if (Z === void 0)
@@ -1504,19 +1505,19 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1504
1505
  }
1505
1506
  }
1506
1507
  return { classes: t, separators: n !== null && r !== null && n !== "" && r !== n ? { group: r, decimal: n } : Ga };
1507
- }, Hh = "%_-*? ", jh = (e) => {
1508
+ }, jh = "%_-*? ", Bh = (e) => {
1508
1509
  let t = "";
1509
1510
  for (const n of e)
1510
- n === '"' ? t += "\\0022" : n === "\\" ? t += "\\\\" : /[A-Za-z0-9]/.test(n) || Hh.includes(n) || n.charCodeAt(0) >= 128 ? t += n : t += `\\${n}`;
1511
+ n === '"' ? t += "\\0022" : n === "\\" ? t += "\\\\" : /[A-Za-z0-9]/.test(n) || jh.includes(n) || n.charCodeAt(0) >= 128 ? t += n : t += `\\${n}`;
1511
1512
  return t;
1512
- }, Bh = (e, t, n) => {
1513
+ }, Vh = (e, t, n) => {
1513
1514
  const r = t <= 2 ? e - 1 : e, o = Math.floor(r / 400), s = r - o * 400, i = t > 2 ? t - 3 : t + 9, l = Math.floor((153 * i + 2) / 5) + n - 1, c = s * 365 + Math.floor(s / 4) - Math.floor(s / 100) + l;
1514
1515
  return o * 146097 + c - 719468;
1515
1516
  }, Qa = (e) => {
1516
1517
  const t = e + 719468, n = Math.floor(t / 146097), r = t - n * 146097, o = Math.floor((r - Math.floor(r / 1460) + Math.floor(r / 36524) - Math.floor(r / 146096)) / 365), s = r - (365 * o + Math.floor(o / 4) - Math.floor(o / 100)), i = Math.floor((5 * s + 2) / 153), l = s - Math.floor((153 * i + 2) / 5) + 1, c = i < 10 ? i + 3 : i - 9;
1517
1518
  return { year: o + n * 400 + (c <= 2 ? 1 : 0), month: c, day: l };
1518
1519
  }, Qn = (e, t) => String(e).padStart(t, "0"), eu = (e) => {
1519
- if (e < Lh || e > qh)
1520
+ if (e < qh || e > Ph)
1520
1521
  return null;
1521
1522
  let t = Math.floor(e), n = Math.round((e - t) * Ao);
1522
1523
  n >= Ao && (t += 1, n -= Ao);
@@ -1525,33 +1526,33 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1525
1526
  return o;
1526
1527
  const s = Math.floor(n / 3600), i = Math.floor(n % 3600 / 60);
1527
1528
  return `${o} ${Qn(s, 2)}:${Qn(i, 2)}:${Qn(n % 60, 2)}`;
1528
- }, Vh = /^(\d{4})([-/])(\d{2})\2(\d{2})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/, Wh = (e) => {
1529
- const t = Vh.exec(e);
1529
+ }, Wh = /^(\d{4})([-/])(\d{2})\2(\d{2})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/, Kh = (e) => {
1530
+ const t = Wh.exec(e);
1530
1531
  if (t === null)
1531
1532
  return null;
1532
1533
  const n = Number(t[1]), r = Number(t[3]), o = Number(t[4]), s = t[5] === void 0 ? 0 : Number(t[5]), i = t[6] === void 0 ? 0 : Number(t[6]), l = t[7] === void 0 ? 0 : Number(t[7]);
1533
1534
  if (r < 1 || r > 12 || o < 1 || s > 23 || i > 59 || l > 59)
1534
1535
  return null;
1535
- const c = Bh(n, r, o), a = Qa(c);
1536
+ const c = Vh(n, r, o), a = Qa(c);
1536
1537
  return a.year !== n || a.month !== r || a.day !== o ? null : c - Za + (s * 3600 + i * 60 + l) / Ao;
1537
- }, Ri = (e) => e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;"), Nn = (e) => Ri(e).replaceAll('"', "&quot;"), tu = (e) => Ri(e).replaceAll("'", "&#39;"), Kh = (e) => Ri(e).replaceAll(`\r
1538
+ }, Ri = (e) => e.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;"), Nn = (e) => Ri(e).replaceAll('"', "&quot;"), tu = (e) => Ri(e).replaceAll("'", "&#39;"), Yh = (e) => Ri(e).replaceAll(`\r
1538
1539
  `, `
1539
1540
  `).replaceAll("\r", `
1540
1541
  `).replaceAll(`
1541
- `, '<br style="mso-data-placement:same-cell">').replaceAll(" ", "&#9;"), $o = (e, t) => `${e}="${Nn(JSON.stringify(t))}"`, nu = (e) => e.type === "number" || e.type === "percent" || e.type === "currency" || e.type === "scientific", Yh = (e) => {
1542
+ `, '<br style="mso-data-placement:same-cell">').replaceAll(" ", "&#9;"), $o = (e, t) => `${e}="${Nn(JSON.stringify(t))}"`, nu = (e) => e.type === "number" || e.type === "percent" || e.type === "currency" || e.type === "scientific", Xh = (e) => {
1542
1543
  if (At(e) === null)
1543
1544
  return null;
1544
1545
  const t = Number(e);
1545
1546
  return Number.isFinite(t) ? t : null;
1546
- }, Xh = (e) => {
1547
+ }, Uh = (e) => {
1547
1548
  const t = /yyyy|MM|dd/.test(e), n = /HH|mm|ss/.test(e);
1548
1549
  return t && n ? 7 : n ? 6 : 5;
1549
- }, Uh = (e) => {
1550
+ }, Gh = (e) => {
1550
1551
  if (e.type === "text")
1551
1552
  return { 1: 1 };
1552
1553
  const t = Ua(e);
1553
- return t === null ? null : { 1: e.type === "date" ? Xh(e.pattern === void 0 ? "yyyy/MM/dd" : e.pattern) : xh[e.type], 2: t, 3: 1 };
1554
- }, Gh = /[;"'{}<>&\\]/, ru = (e) => e === "left" || e === "center" || e === "right", ou = (e) => e === "top" || e === "middle" || e === "bottom", Jh = (e) => {
1554
+ return t === null ? null : { 1: e.type === "date" ? Uh(e.pattern === void 0 ? "yyyy/MM/dd" : e.pattern) : Mh[e.type], 2: t, 3: 1 };
1555
+ }, Jh = /[;"'{}<>&\\]/, ru = (e) => e === "left" || e === "center" || e === "right", ou = (e) => e === "top" || e === "middle" || e === "bottom", Zh = (e) => {
1555
1556
  const t = [];
1556
1557
  e.bold === !0 && t.push("font-weight:bold"), e.italic === !0 && t.push("font-style:italic");
1557
1558
  const n = [...e.underline === !0 ? ["underline"] : [], ...e.strikethrough === !0 ? ["line-through"] : []];
@@ -1559,7 +1560,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1559
1560
  const r = typeof e.color == "string" ? ut(e.color) : null;
1560
1561
  r !== null && t.push(`color:${r}`);
1561
1562
  const o = typeof e.background == "string" ? ut(e.background) : null;
1562
- if (o !== null && t.push(`background-color:${o}`), ru(e.align) && t.push(`text-align:${e.align}`), ou(e.verticalAlign) && t.push(`vertical-align:${e.verticalAlign}`), typeof e.fontFamily == "string" && e.fontFamily.trim() !== "" && !Gh.test(e.fontFamily) && t.push(`font-family:${e.fontFamily.trim()}`), typeof e.fontSize == "number" && Number.isFinite(e.fontSize) && e.fontSize > 0 && t.push(`font-size:${e.fontSize}pt`), e.borders !== void 0)
1563
+ if (o !== null && t.push(`background-color:${o}`), ru(e.align) && t.push(`text-align:${e.align}`), ou(e.verticalAlign) && t.push(`vertical-align:${e.verticalAlign}`), typeof e.fontFamily == "string" && e.fontFamily.trim() !== "" && !Jh.test(e.fontFamily) && t.push(`font-family:${e.fontFamily.trim()}`), typeof e.fontSize == "number" && Number.isFinite(e.fontSize) && e.fontSize > 0 && t.push(`font-size:${e.fontSize}pt`), e.borders !== void 0)
1563
1564
  for (const s of Ja) {
1564
1565
  const i = e.borders[s];
1565
1566
  if (i === void 0 || !Object.hasOwn(Ql, i.style))
@@ -1569,36 +1570,36 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1569
1570
  }
1570
1571
  if (e.value !== void 0) {
1571
1572
  const s = Ua(e.value);
1572
- s !== null && t.push(`mso-number-format:"${jh(s)}"`);
1573
+ s !== null && t.push(`mso-number-format:"${Bh(s)}"`);
1573
1574
  }
1574
1575
  return t;
1575
- }, Zh = { value: void 0, style: "white-space:pre", numberFormatAttribute: null }, Qh = (e) => {
1576
- const t = e.value, n = e.wrap === !0 ? "white-space:pre-wrap;word-wrap:break-word" : "white-space:pre", r = tu([n, ...Jh(e)].join(";"));
1576
+ }, Qh = { value: void 0, style: "white-space:pre", numberFormatAttribute: null }, em = (e) => {
1577
+ const t = e.value, n = e.wrap === !0 ? "white-space:pre-wrap;word-wrap:break-word" : "white-space:pre", r = tu([n, ...Zh(e)].join(";"));
1577
1578
  let o = null;
1578
1579
  if (t !== void 0) {
1579
- const s = Uh(t);
1580
+ const s = Gh(t);
1580
1581
  s !== null && (o = $o("data-sheets-numberformat", s));
1581
1582
  }
1582
1583
  return { value: t, style: r, numberFormatAttribute: o };
1583
- }, em = (e, t, n, r) => {
1584
- const o = t.value, s = o === void 0 ? e.t : cr(e.t, o), i = e.t !== "" && (o !== void 0 && o.type === "text" || e.t.startsWith("=")), l = !i && o !== void 0 && nu(o) ? Yh(e.t) : null, c = !i && l === null && o !== void 0 && o.type === "date" ? Wh(e.t) : null, a = [];
1584
+ }, tm = (e, t, n, r) => {
1585
+ const o = t.value, s = o === void 0 ? e.t : cr(e.t, o), i = e.t !== "" && (o !== void 0 && o.type === "text" || e.t.startsWith("=")), l = !i && o !== void 0 && nu(o) ? Xh(e.t) : null, c = !i && l === null && o !== void 0 && o.type === "date" ? Kh(e.t) : null, a = [];
1585
1586
  if (i ? a.push($o("data-sheets-value", { 1: 2, 2: e.t })) : l !== null ? a.push($o("data-sheets-value", { 1: 3, 3: l })) : c !== null && a.push($o("data-sheets-value", { 1: 3, 3: c })), e.f !== void 0 && a.push(`data-sheets-formula="${Nn(e.f)}"`), t.numberFormatAttribute !== null && a.push(t.numberFormatAttribute), e.link !== void 0 && a.push(`data-sheets-hyperlink="${Nn(e.link)}"`), e.note !== void 0 && a.push(`data-sheets-note="${Nn(e.note)}"`), i ? a.push("x:str") : l !== null ? a.push(`x:num="${Nn(e.t)}"`) : c !== null && a.push(`x:num="${c}"`), e.f !== void 0) {
1586
1587
  const N = Wo(e.f, { row: n, col: r });
1587
1588
  N.includes("#REF!") || a.push(`x:fmla="${Nn(N)}"`);
1588
1589
  }
1589
- const p = Kh(s), m = e.link === void 0 ? p : `<a href="${Nn(e.link)}">${p}</a>`;
1590
+ const p = Yh(s), m = e.link === void 0 ? p : `<a href="${Nn(e.link)}">${p}</a>`;
1590
1591
  return `<td style='${t.style}'${a.map((N) => ` ${N}`).join("")}>${m}</td>`;
1591
- }, tm = (e, t) => {
1592
+ }, nm = (e, t) => {
1592
1593
  if (e.cells.length !== e.rows || e.cells.some((s) => s.length !== e.cols))
1593
1594
  throw new RangeError(`serializeHtmlTable: cells must be exactly rows × cols (${e.rows} × ${e.cols})`);
1594
- const n = e.colWidths === void 0 ? "" : `<colgroup>${e.colWidths.map((s) => `<col width="${s}">`).join("")}</colgroup>`, r = e.formats.map(Qh);
1595
+ const n = e.colWidths === void 0 ? "" : `<colgroup>${e.colWidths.map((s) => `<col width="${s}">`).join("")}</colgroup>`, r = e.formats.map(em);
1595
1596
  let o = "";
1596
1597
  for (let s = 0; s < e.rows; s += 1) {
1597
1598
  const i = e.rowHeights === void 0 ? "" : ` height="${e.rowHeights[s]}" style="height:${e.rowHeights[s]}px;"`;
1598
1599
  let l = "";
1599
1600
  for (let c = 0; c < e.cols; c += 1) {
1600
1601
  const a = e.cells[s][c], p = a.fmt === void 0 ? void 0 : r[a.fmt];
1601
- l += em(a, p === void 0 ? Zh : p, s, c);
1602
+ l += tm(a, p === void 0 ? Qh : p, s, c);
1602
1603
  }
1603
1604
  o += `<tr${i}>${l}</tr>`;
1604
1605
  }
@@ -1615,7 +1616,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1615
1616
  }
1616
1617
  const o = e.getAttribute("style");
1617
1618
  return o !== null && Gs(n, Yo(o)), n;
1618
- }, nm = (e) => {
1619
+ }, rm = (e) => {
1619
1620
  const t = e.toLowerCase();
1620
1621
  if (t === "thin")
1621
1622
  return { pt: 0.75, unit: "px" };
@@ -1628,32 +1629,32 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1628
1629
  return null;
1629
1630
  const r = Number(n[1]);
1630
1631
  return n[2] === "pt" ? { pt: r, unit: "pt" } : { pt: r * 0.75, unit: "px" };
1631
- }, rm = (e) => {
1632
+ }, om = (e) => {
1632
1633
  if (e.unit === "px") {
1633
1634
  const t = e.pt / 0.75;
1634
1635
  return t <= 1 ? "thin" : t < 3 ? "medium" : "thick";
1635
1636
  }
1636
1637
  return e.pt < 0.75 ? "thin" : e.pt < 1.25 ? "medium" : "thick";
1637
- }, om = /* @__PURE__ */ new Map([
1638
+ }, sm = /* @__PURE__ */ new Map([
1638
1639
  ["dashed", "dashed"],
1639
1640
  ["dotted", "dotted"],
1640
1641
  ["double", "double"],
1641
1642
  ["hairline", "hair"]
1642
- ]), sm = { pt: 1.5, unit: "px" }, tc = (e) => {
1643
+ ]), im = { pt: 1.5, unit: "px" }, tc = (e) => {
1643
1644
  let t = null, n = null;
1644
1645
  const r = [];
1645
1646
  for (const c of bi(e)) {
1646
- const a = c.toLowerCase(), p = nm(c);
1647
- Ah.has(a) ? n = a : p !== null ? t = p : r.push(c);
1647
+ const a = c.toLowerCase(), p = rm(c);
1648
+ $h.has(a) ? n = a : p !== null ? t = p : r.push(c);
1648
1649
  }
1649
1650
  if (n === null || n === "none" || n === "hidden")
1650
1651
  return null;
1651
- const o = om.get(n), s = o === void 0 ? rm(t === null ? sm : t) : o, i = r.join(" ");
1652
- if (i === "" || $h.has(i.toLowerCase()))
1652
+ const o = sm.get(n), s = o === void 0 ? om(t === null ? im : t) : o, i = r.join(" ");
1653
+ if (i === "" || Th.has(i.toLowerCase()))
1653
1654
  return { style: s };
1654
1655
  const l = ut(i);
1655
1656
  return l === null || l.length === 9 ? null : { style: s, color: l };
1656
- }, im = (e) => e.style === "thin" && e.color === "#cccccc", lm = (e) => {
1657
+ }, lm = (e) => e.style === "thin" && e.color === "#cccccc", cm = (e) => {
1657
1658
  const t = ut(e);
1658
1659
  if (t !== null)
1659
1660
  return t;
@@ -1663,16 +1664,16 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1663
1664
  return r;
1664
1665
  }
1665
1666
  return null;
1666
- }, cm = (e) => {
1667
- const t = No(bi(e.split(",")[0]).join(" ").trim()).trim();
1668
- return t === "" || Th.has(t.toLowerCase()) ? null : t;
1669
1667
  }, am = (e) => {
1668
+ const t = No(bi(e.split(",")[0]).join(" ").trim()).trim();
1669
+ return t === "" || xh.has(t.toLowerCase()) ? null : t;
1670
+ }, um = (e) => {
1670
1671
  const t = /^(\d*\.?\d+)(pt|px)$/i.exec(e.trim());
1671
1672
  if (t === null)
1672
1673
  return null;
1673
1674
  const n = Number(t[1]), r = t[2].toLowerCase() === "pt" ? n : n * 0.75;
1674
1675
  return Number.isFinite(r) && r > 0 ? r : null;
1675
- }, um = (e) => {
1676
+ }, dm = (e) => {
1676
1677
  const t = /* @__PURE__ */ new Set();
1677
1678
  for (const n of ["text-decoration", "text-decoration-line"]) {
1678
1679
  const r = e.get(n);
@@ -1681,10 +1682,10 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1681
1682
  t.add(o);
1682
1683
  }
1683
1684
  return t;
1684
- }, dm = (e) => {
1685
+ }, fm = (e) => {
1685
1686
  const t = e.get("white-space"), n = t === void 0 ? "" : t.toLowerCase();
1686
1687
  return n === "pre" || n === "pre-wrap" ? "pre" : n === "pre-line" ? "pre-line" : "collapse";
1687
- }, fm = /* @__PURE__ */ new Set(["normal", "pre-wrap", "pre-line"]), pm = (e, t, n) => {
1688
+ }, pm = /* @__PURE__ */ new Set(["normal", "pre-wrap", "pre-line"]), hm = (e, t, n) => {
1688
1689
  const r = {}, o = e.get("font-weight");
1689
1690
  if (o !== void 0) {
1690
1691
  const _ = o.toLowerCase();
@@ -1692,60 +1693,60 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1692
1693
  }
1693
1694
  const s = e.get("font-style");
1694
1695
  s !== void 0 && (s.toLowerCase() === "italic" || s.toLowerCase().startsWith("oblique")) && (r.italic = !0);
1695
- const i = um(e);
1696
+ const i = dm(e);
1696
1697
  (t.underline || i.has("underline")) && (r.underline = !0), (t.strikethrough || i.has("line-through")) && (r.strikethrough = !0);
1697
1698
  const l = e.get("color"), c = l === void 0 ? null : ut(l);
1698
1699
  c !== null && c.length !== 9 && (r.color = c);
1699
- const a = e.has("background-color") ? e.get("background-color") : e.get("background"), p = a === void 0 ? null : lm(a);
1700
+ const a = e.has("background-color") ? e.get("background-color") : e.get("background"), p = a === void 0 ? null : cm(a);
1700
1701
  p !== null && p.length !== 9 && (r.background = p);
1701
1702
  const m = e.get("text-align"), N = m === void 0 ? "" : m.toLowerCase();
1702
1703
  ru(N) && (r.align = N);
1703
1704
  const z = e.get("vertical-align"), M = z === void 0 ? "" : z.toLowerCase();
1704
1705
  ou(M) && (r.verticalAlign = M);
1705
- const j = e.get("font-family"), Z = j === void 0 ? null : cm(j);
1706
+ const j = e.get("font-family"), Z = j === void 0 ? null : am(j);
1706
1707
  Z !== null && (r.fontFamily = Z);
1707
- const Q = e.get("font-size"), A = Q === void 0 ? null : am(Q);
1708
+ const Q = e.get("font-size"), A = Q === void 0 ? null : um(Q);
1708
1709
  A !== null && (r.fontSize = A);
1709
1710
  const L = e.get("white-space");
1710
- L !== void 0 && fm.has(L.toLowerCase()) && (r.wrap = !0);
1711
+ L !== void 0 && pm.has(L.toLowerCase()) && (r.wrap = !0);
1711
1712
  const W = {}, K = e.get("border"), k = K === void 0 ? null : tc(K);
1712
1713
  for (const _ of Ja) {
1713
1714
  const H = e.get(`border-${_}`), h = H === void 0 ? k : tc(H);
1714
- h !== null && !(n === "sheets" && im(h)) && (W[_] = h);
1715
+ h !== null && !(n === "sheets" && lm(h)) && (W[_] = h);
1715
1716
  }
1716
1717
  return Object.keys(W).length > 0 && (r.borders = W), r;
1717
1718
  }, nc = (e) => {
1718
1719
  e.text !== "" && !e.text.endsWith(`
1719
1720
  `) && (e.text += `
1720
1721
  `);
1721
- }, hm = (e) => {
1722
+ }, mm = (e) => {
1722
1723
  const t = e.getAttribute("style");
1723
1724
  return t !== null && Yo(t).get("mso-spacerun") === "yes";
1724
- }, mm = (e, t) => {
1725
+ }, gm = (e, t) => {
1725
1726
  const n = [{ kind: "enter", node: e }];
1726
1727
  for (let r = n.pop(); r !== void 0; r = n.pop()) {
1727
1728
  if (r.kind === "exit") {
1728
- Nh.has(r.element.localName) && t.runs.push({ element: r.element, before: r.before, end: t.text.length }), r.block && nc(t);
1729
+ Dh.has(r.element.localName) && t.runs.push({ element: r.element, before: r.before, end: t.text.length }), r.block && nc(t);
1729
1730
  continue;
1730
1731
  }
1731
1732
  const o = r.node;
1732
- if (o.nodeType === Dh) {
1733
+ if (o.nodeType === Fh) {
1733
1734
  const c = o.data;
1734
1735
  t.text += t.mode === "collapse" ? c.replace(/[\r\n\t\f]/g, " ") : c.replace(/\r\n?/g, `
1735
1736
  `);
1736
1737
  continue;
1737
1738
  }
1738
- if (o.nodeType !== Fh)
1739
+ if (o.nodeType !== Lh)
1739
1740
  continue;
1740
1741
  const s = o, i = s.localName;
1741
- if (Mh.has(i) || hm(s))
1742
+ if (zh.has(i) || mm(s))
1742
1743
  continue;
1743
1744
  if (i === "br") {
1744
1745
  t.text += `
1745
1746
  `;
1746
1747
  continue;
1747
1748
  }
1748
- const l = t.mode === "collapse" && zh.has(i);
1749
+ const l = t.mode === "collapse" && Nh.has(i);
1749
1750
  if (l && nc(t), t.mode === "collapse" && (i === "td" || i === "th") && t.text !== "" && !/\s$/.test(t.text) && (t.text += " "), i === "a" && t.href === null) {
1750
1751
  const c = s.getAttribute("href");
1751
1752
  c !== null && (t.href = c);
@@ -1754,15 +1755,15 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1754
1755
  for (let c = s.lastChild; c !== null; c = c.previousSibling)
1755
1756
  n.push({ kind: "enter", node: c });
1756
1757
  }
1757
- }, gm = (e, t, n, r) => {
1758
+ }, wm = (e, t, n, r) => {
1758
1759
  const o = e.text.trimEnd().length;
1759
1760
  if (o === 0)
1760
1761
  return;
1761
1762
  const s = e.text.length - e.text.trimStart().length;
1762
1763
  for (const i of e.runs)
1763
- i.before <= s && i.end >= o && ym(i.element, t, n, r);
1764
- }, wm = (e, t) => {
1765
- const n = e.replaceAll(Ph, " ");
1764
+ i.before <= s && i.end >= o && Cm(i.element, t, n, r);
1765
+ }, ym = (e, t) => {
1766
+ const n = e.replaceAll(_h, " ");
1766
1767
  if (t === "pre")
1767
1768
  return n;
1768
1769
  const r = n.split(`
@@ -1778,7 +1779,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1778
1779
  s -= 1;
1779
1780
  return r.slice(o, s).join(`
1780
1781
  `);
1781
- }, ym = (e, t, n, r) => {
1782
+ }, Cm = (e, t, n, r) => {
1782
1783
  const o = e.localName;
1783
1784
  if (o === "b" || o === "strong")
1784
1785
  t.set("font-weight", "bold");
@@ -1793,7 +1794,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1793
1794
  s !== null && s.trim() !== "" && t.set("color", s), i !== null && i.trim() !== "" && t.set("font-family", i);
1794
1795
  }
1795
1796
  Gs(t, su(e, r));
1796
- }, Cm = (e, t) => {
1797
+ }, vm = (e, t) => {
1797
1798
  let n;
1798
1799
  try {
1799
1800
  n = JSON.parse(e);
@@ -1817,7 +1818,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1817
1818
  return typeof i == "number" && i >= 1 && i < ec.length ? ec[i] : null;
1818
1819
  }
1819
1820
  return null;
1820
- }, iu = (e, t, n) => t !== void 0 && nu(t) ? Oh(e, t, n) : e, vm = (e, t, n, r) => {
1821
+ }, iu = (e, t, n) => t !== void 0 && nu(t) ? Ah(e, t, n) : e, bm = (e, t, n, r) => {
1821
1822
  const o = e.getAttribute("x:str");
1822
1823
  if (o !== null)
1823
1824
  return o === "" ? t : o;
@@ -1838,16 +1839,16 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1838
1839
  } else
1839
1840
  return l;
1840
1841
  return iu(t, n, r);
1841
- }, bm = (e, t, n, r) => {
1842
- const o = su(e, r.rules), s = { underline: !1, strikethrough: !1 }, i = { text: "", runs: [], href: null, mode: dm(o) };
1843
- for (const p of km(e))
1844
- mm(p, i);
1845
- gm(i, o, s, r.rules);
1846
- const l = wm(i.text, i.mode), c = pm(o, s, r.kind), a = { t: "" };
1842
+ }, Rm = (e, t, n, r) => {
1843
+ const o = su(e, r.rules), s = { underline: !1, strikethrough: !1 }, i = { text: "", runs: [], href: null, mode: fm(o) };
1844
+ for (const p of Om(e))
1845
+ gm(p, i);
1846
+ wm(i, o, s, r.rules);
1847
+ const l = ym(i.text, i.mode), c = hm(o, s, r.kind), a = { t: "" };
1847
1848
  if (r.kind === "sheets") {
1848
- const p = e.getAttribute("data-sheets-numberformat"), m = p === null ? void 0 : Ch(p, r.options);
1849
+ const p = e.getAttribute("data-sheets-numberformat"), m = p === null ? void 0 : vh(p, r.options);
1849
1850
  m !== void 0 && (c.value = m);
1850
- const N = e.getAttribute("data-sheets-value"), z = N === null ? null : Cm(N, m);
1851
+ const N = e.getAttribute("data-sheets-value"), z = N === null ? null : vm(N, m);
1851
1852
  a.t = z === null ? iu(l, m, Ga) : z;
1852
1853
  const M = e.getAttribute("data-sheets-formula");
1853
1854
  M?.startsWith("=") && (a.f = M);
@@ -1857,7 +1858,7 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1857
1858
  A !== null && A !== "" && (a.note = A);
1858
1859
  } else {
1859
1860
  const p = o.get("mso-number-format"), m = p === void 0 ? void 0 : vi(Us(No(p)), r.options);
1860
- m !== void 0 && (c.value = m), a.t = vm(e, l, m, r.separators);
1861
+ m !== void 0 && (c.value = m), a.t = bm(e, l, m, r.separators);
1861
1862
  const N = e.getAttribute("x:fmla");
1862
1863
  N?.startsWith("=") && (a.f = Ci(N, { row: t, col: n }));
1863
1864
  const z = i.href === null ? null : _n(i.href);
@@ -1873,13 +1874,13 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1873
1874
  return 1;
1874
1875
  const s = Number(o[1]);
1875
1876
  return s < 1 ? 1 : s > n ? n : s;
1876
- }, Rm = (e) => {
1877
+ }, Sm = (e) => {
1877
1878
  const t = /^(\d*\.?\d+)(px|pt)$/i.exec(e.trim());
1878
1879
  if (t === null)
1879
1880
  return null;
1880
1881
  const n = Number(t[1]);
1881
1882
  return t[2].toLowerCase() === "pt" ? Math.round(n * 4 / 3) : Math.round(n);
1882
- }, Sm = (e, t) => {
1883
+ }, Em = (e, t) => {
1883
1884
  const n = e.getAttribute(t);
1884
1885
  if (n === null)
1885
1886
  return null;
@@ -1891,13 +1892,13 @@ const lh = /* @__PURE__ */ new Set([...mr.map((e) => e.symbol), ...mr.map((e) =>
1891
1892
  const s = r.get("display");
1892
1893
  if (s !== void 0 && s.toLowerCase() === "none")
1893
1894
  return 0;
1894
- const i = r.get(t), l = i === void 0 ? null : Rm(i);
1895
+ const i = r.get(t), l = i === void 0 ? null : Sm(i);
1895
1896
  if (l !== null)
1896
1897
  return Math.min(l, Sn);
1897
1898
  }
1898
- const o = Sm(e, t);
1899
+ const o = Em(e, t);
1899
1900
  return o === null ? null : Math.min(o, Sn);
1900
- }, Em = (e, t) => {
1901
+ }, km = (e, t) => {
1901
1902
  const n = [], r = (o) => {
1902
1903
  const s = lu(o, "width");
1903
1904
  for (let i = Js(o, "span", pi); i > 0 && n.length < t; i -= 1)
@@ -1918,11 +1919,11 @@ function* Br(e) {
1918
1919
  for (let t = e.firstElementChild; t !== null; t = t.nextElementSibling)
1919
1920
  yield t;
1920
1921
  }
1921
- function* km(e) {
1922
+ function* Om(e) {
1922
1923
  for (let t = e.firstChild; t !== null; t = t.nextSibling)
1923
1924
  yield t;
1924
1925
  }
1925
- function* Om(e) {
1926
+ function* Am(e) {
1926
1927
  for (const t of ["thead", "tbody", "tfoot"])
1927
1928
  for (const n of Br(e)) {
1928
1929
  const r = n.localName;
@@ -1933,10 +1934,10 @@ function* Om(e) {
1933
1934
  o.localName === "tr" && (yield o);
1934
1935
  }
1935
1936
  }
1936
- const $s = () => ({ t: "" }), Am = (e, t, n) => {
1937
+ const $s = () => ({ t: "" }), $m = (e, t, n) => {
1937
1938
  const r = Aa(), o = [], s = [], i = [];
1938
1939
  let l = 0;
1939
- for (const z of Om(e)) {
1940
+ for (const z of Am(e)) {
1940
1941
  const M = o.length, j = (M + 1) * Math.max(l, 1);
1941
1942
  if (j > n)
1942
1943
  return { outcome: "limit", cells: j };
@@ -1953,7 +1954,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
1953
1954
  const W = Js(A, "colspan", pi), K = Js(A, "rowspan", va), k = (M + 1) * Math.max(l, Q + W);
1954
1955
  if (k > n)
1955
1956
  return { outcome: "limit", cells: k };
1956
- const _ = bm(A, M, Q, t), H = r.intern(_.format);
1957
+ const _ = Rm(A, M, Q, t), H = r.intern(_.format);
1957
1958
  H !== void 0 && (_.cell.fmt = H), Z[Q] = _.cell;
1958
1959
  for (let h = 1; h < W; h += 1)
1959
1960
  Z[Q + h] === void 0 && (Z[Q + h] = $s());
@@ -1975,7 +1976,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
1975
1976
  M.push(Z === void 0 ? $s() : Z);
1976
1977
  }
1977
1978
  return M;
1978
- }), a = Em(e, l), p = a.length === l && a.every((z) => z !== null) ? a.map((z) => z === null ? 0 : z) : void 0, m = s.every((z) => z !== null) ? s.map((z) => z === null ? 0 : z) : void 0;
1979
+ }), a = km(e, l), p = a.length === l && a.every((z) => z !== null) ? a.map((z) => z === null ? 0 : z) : void 0, m = s.every((z) => z !== null) ? s.map((z) => z === null ? 0 : z) : void 0;
1979
1980
  return { outcome: "payload", payload: {
1980
1981
  v: 1,
1981
1982
  rows: o.length,
@@ -1990,7 +1991,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
1990
1991
  wholeCols: !1,
1991
1992
  conditionalFormats: []
1992
1993
  } };
1993
- }, $m = (e, t, n, r) => {
1994
+ }, Tm = (e, t, n, r) => {
1994
1995
  if (!Number.isInteger(r) || r <= 0)
1995
1996
  throw new RangeError(`[spreadsheet] parseHtmlTable requires a positive integer maxCells, received ${r}`);
1996
1997
  let o;
@@ -2002,8 +2003,8 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2002
2003
  const s = o.querySelector("table");
2003
2004
  if (s === null)
2004
2005
  return { outcome: "none" };
2005
- const i = Ih(o);
2006
- return Am(s, { kind: t, rules: i, options: n, separators: i.separators }, r);
2006
+ const i = Hh(o);
2007
+ return $m(s, { kind: t, rules: i, options: n, separators: i.separators }, r);
2007
2008
  }, Ce = (e, t) => ({
2008
2009
  startRow: Math.min(e.row, t.row),
2009
2010
  endRow: Math.max(e.row, t.row),
@@ -2012,7 +2013,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2012
2013
  }), sn = (e, t) => t.row >= e.startRow && t.row <= e.endRow && t.col >= e.startCol && t.col <= e.endCol, Pt = (e) => ({
2013
2014
  rows: e.endRow - e.startRow + 1,
2014
2015
  cols: e.endCol - e.startCol + 1
2015
- }), Ot = (e) => e.reduce((t, n) => t + Pt(n).rows * Pt(n).cols, 0), Tm = (e, t) => {
2016
+ }), Ot = (e) => e.reduce((t, n) => t + Pt(n).rows * Pt(n).cols, 0), xm = (e, t) => {
2016
2017
  if (!sn(e, t))
2017
2018
  return [e];
2018
2019
  const n = [];
@@ -2060,7 +2061,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2060
2061
  validation: e.getCellValidation !== void 0,
2061
2062
  cf: e.getConditionalFormats !== void 0,
2062
2063
  formula: e.getCellFormula !== void 0
2063
- }), au = (e) => e.isCellReadOnly !== void 0, lt = (e, t, n) => e.isCellReadOnly?.(t, n) === !0, xm = [
2064
+ }), au = (e) => e.isCellReadOnly !== void 0, lt = (e, t, n) => e.isCellReadOnly?.(t, n) === !0, Mm = [
2064
2065
  "rowCount",
2065
2066
  "colCount",
2066
2067
  "getCellText",
@@ -2078,16 +2079,16 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2078
2079
  "getCellAttributes",
2079
2080
  "getRangeExtrema",
2080
2081
  "evaluateFormula"
2081
- ], rc = ["text", "decimal", "numeric", "tel", "search", "email", "url"], Mm = (e, t, n) => {
2082
+ ], rc = ["text", "decimal", "numeric", "tel", "search", "email", "url"], zm = (e, t, n) => {
2082
2083
  if (e.getCellInputMode === void 0)
2083
2084
  return "text";
2084
2085
  const r = e.getCellInputMode(t, n), o = rc.find((s) => s === r);
2085
2086
  if (o === void 0)
2086
2087
  throw new RangeError(`[Spreadsheet] getCellInputMode(${t}, ${n}) must return one of ${rc.join(" / ")}; got ${typeof r == "string" ? JSON.stringify(r) : String(r)}`);
2087
2088
  return o;
2088
- }, zm = () => !0, Nm = (e) => {
2089
+ }, Nm = () => !0, Dm = (e) => {
2089
2090
  const t = /* @__PURE__ */ new WeakMap(), n = {};
2090
- for (const r of xm)
2091
+ for (const r of Mm)
2091
2092
  r !== "isCellReadOnly" && Object.defineProperty(n, r, {
2092
2093
  enumerable: !0,
2093
2094
  get: () => {
@@ -2101,22 +2102,22 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2101
2102
  return t.set(o, i), i;
2102
2103
  }
2103
2104
  });
2104
- return Object.defineProperty(n, "isCellReadOnly", { enumerable: !0, value: zm }), n;
2105
- }, Dm = /^data-[a-z0-9-]+$/, Fm = (e) => {
2105
+ return Object.defineProperty(n, "isCellReadOnly", { enumerable: !0, value: Nm }), n;
2106
+ }, Fm = /^data-[a-z0-9-]+$/, Lm = (e) => {
2106
2107
  if (typeof e != "object" || e === null || Array.isArray(e))
2107
2108
  return !1;
2108
2109
  const t = Object.getPrototypeOf(e);
2109
2110
  return t === Object.prototype || t === null;
2110
- }, Lm = (e, t, n) => {
2111
+ }, qm = (e, t, n) => {
2111
2112
  if (e.getCellAttributes === void 0)
2112
2113
  return null;
2113
2114
  const r = e.getCellAttributes(t, n);
2114
2115
  if (r === null)
2115
2116
  return null;
2116
- if (!Fm(r))
2117
+ if (!Lm(r))
2117
2118
  throw new RangeError(`[spreadsheet] getCellAttributes must return a plain data-* record or null (got ${Object.prototype.toString.call(r)})`);
2118
2119
  for (const [o, s] of Object.entries(r)) {
2119
- if (!Dm.test(o))
2120
+ if (!Fm.test(o))
2120
2121
  throw new RangeError(`[spreadsheet] getCellAttributes key must be a lowercase data-* name (got ${JSON.stringify(o)})`);
2121
2122
  if (o.startsWith("data-aqsp") || o.startsWith("data-aqvs") || o === "data-row" || o === "data-col")
2122
2123
  throw new RangeError(`[spreadsheet] getCellAttributes key ${JSON.stringify(o)} shadows a package- or engine-emitted cell attribute`);
@@ -2138,7 +2139,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2138
2139
  if (Lr(e, n))
2139
2140
  return !0;
2140
2141
  return !1;
2141
- }, uC = (e, t) => {
2142
+ }, fC = (e, t) => {
2142
2143
  const n = e.length, r = e[0]?.length ?? 0;
2143
2144
  if (n === 0 || r === 0)
2144
2145
  return 0;
@@ -2171,7 +2172,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2171
2172
  }
2172
2173
  }
2173
2174
  return N;
2174
- }, dC = (e, t, n, r, o) => {
2175
+ }, pC = (e, t, n, r, o) => {
2175
2176
  const s = [];
2176
2177
  return uu(e, t, n, r, o, (i, l, c) => {
2177
2178
  s.push({ row: i, col: l, text: c });
@@ -2186,16 +2187,16 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2186
2187
  const n = t.startRow <= e.startRow && t.endRow >= e.endRow && t.startCol <= e.startCol && t.endCol >= e.endCol, r = t.startRow !== e.startRow || t.endRow !== e.endRow || t.startCol !== e.startCol || t.endCol !== e.endCol;
2187
2188
  if (!(n && r))
2188
2189
  throw new RangeError(`[spreadsheet] expandFill requires a box strictly containing the source (source ${JSON.stringify(e)}, box ${JSON.stringify(t)})`);
2189
- }, qm = (e, t) => {
2190
+ }, Pm = (e, t) => {
2190
2191
  du(e, t);
2191
2192
  const n = Pt(t), r = Pt(e), o = n.rows - r.rows, s = n.cols - r.cols, i = s > 0 ? r.rows : Math.min(r.rows, o), l = o > 0 ? r.cols : Math.min(r.cols, s);
2192
2193
  return n.rows * n.cols - r.rows * r.cols + i * l;
2193
- }, Pm = (e, t) => {
2194
+ }, _m = (e, t) => {
2194
2195
  if (!(t.startRow <= e.startRow && t.endRow >= e.endRow && t.startCol <= e.startCol && t.endCol >= e.endCol))
2195
2196
  throw new RangeError(`[spreadsheet] fillExtensionRects requires a box containing the source (source ${JSON.stringify(e)}, box ${JSON.stringify(t)})`);
2196
2197
  const r = [];
2197
2198
  return t.startRow < e.startRow && r.push(Ce({ row: t.startRow, col: t.startCol }, { row: e.startRow - 1, col: t.endCol })), t.endRow > e.endRow && r.push(Ce({ row: e.endRow + 1, col: t.startCol }, { row: t.endRow, col: t.endCol })), t.startCol < e.startCol && r.push(Ce({ row: e.startRow, col: t.startCol }, { row: e.endRow, col: e.startCol - 1 })), t.endCol > e.endCol && r.push(Ce({ row: e.startRow, col: e.endCol + 1 }, { row: e.endRow, col: t.endCol })), r;
2198
- }, _m = (e, t, n, r) => {
2199
+ }, Im = (e, t, n, r) => {
2199
2200
  du(t, n);
2200
2201
  const o = Pt(t).rows, s = Pt(t).cols, i = [], l = /* @__PURE__ */ new Map();
2201
2202
  for (let c = n.startRow; c <= n.endRow; c += 1) {
@@ -2229,7 +2230,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2229
2230
  }
2230
2231
  return o;
2231
2232
  }, pu = (e, t, n) => {
2232
- const r = { row: n.row, col: n.col, text: e.isFormula ? Up(e.text, n.row - t.row, n.col - t.col) : e.text };
2233
+ const r = { row: n.row, col: n.col, text: e.isFormula ? Gp(e.text, n.row - t.row, n.col - t.col) : e.text };
2233
2234
  return e.format !== void 0 && (r.format = e.format), e.validation !== void 0 && (r.validation = e.validation), e.hyperlink !== void 0 && (r.hyperlink = e.hyperlink), e.note !== void 0 && (r.note = e.note), r;
2234
2235
  }, Xo = [
2235
2236
  "bold",
@@ -2307,7 +2308,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2307
2308
  "toggleColumnHighlight",
2308
2309
  "toggleBothHighlight",
2309
2310
  "toggleIntersectionHighlight"
2310
- ], Im = /^[A-Z]$/, Hm = /^[A-Za-z]$/, jm = /^Key([A-Z])$/, hu = /* @__PURE__ */ new Set([
2311
+ ], Hm = /^[A-Z]$/, jm = /^[A-Za-z]$/, Bm = /^Key([A-Z])$/, hu = /* @__PURE__ */ new Set([
2311
2312
  ...Array.from({ length: 10 }, (e, t) => `Digit${t}`),
2312
2313
  ...Array.from({ length: 10 }, (e, t) => `Numpad${t}`),
2313
2314
  "NumpadAdd",
@@ -2347,7 +2348,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2347
2348
  "Backspace",
2348
2349
  "Insert",
2349
2350
  "ContextMenu"
2350
- ]), Bm = (e) => Im.test(e) || hu.has(e), mn = (e) => {
2351
+ ]), Vm = (e) => Hm.test(e) || hu.has(e), mn = (e) => {
2351
2352
  const t = e.split("+");
2352
2353
  let n = 0;
2353
2354
  const r = t[n] === "Ctrl";
@@ -2357,26 +2358,26 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2357
2358
  const s = t[n] === "Shift";
2358
2359
  s && (n += 1);
2359
2360
  const i = t[n];
2360
- if (n !== t.length - 1 || i === void 0 || !Bm(i))
2361
+ if (n !== t.length - 1 || i === void 0 || !Vm(i))
2361
2362
  throw new RangeError(`[spreadsheet] shortcut ${JSON.stringify(e)} is not canonical (expected Ctrl+Alt+Shift+KEY with used modifiers only, KEY = A-Z or a code name such as Digit1 / Semicolon / F2)`);
2362
2363
  return { ctrl: r, alt: o, shift: s, key: i };
2363
- }, Vm = (e) => `${e.ctrl ? "Ctrl+" : ""}${e.alt ? "Alt+" : ""}${e.shift ? "Shift+" : ""}${e.key}`, mu = (e) => {
2364
- if (Hm.test(e.key))
2364
+ }, Wm = (e) => `${e.ctrl ? "Ctrl+" : ""}${e.alt ? "Alt+" : ""}${e.shift ? "Shift+" : ""}${e.key}`, mu = (e) => {
2365
+ if (jm.test(e.key))
2365
2366
  return e.key.toUpperCase();
2366
- const t = jm.exec(e.code);
2367
+ const t = Bm.exec(e.code);
2367
2368
  return t !== null ? t[1] : hu.has(e.code) ? e.code : null;
2368
- }, xr = (e, t) => e.ctrl !== (t.ctrlKey || t.metaKey) || e.alt !== t.altKey || e.shift !== t.shiftKey || e.alt && t.getModifierState("AltGraph") ? !1 : mu(t) === e.key, ke = (e, t, n) => ({ chord: e, column: t, rebindable: !1, note: n }), $e = (e, t, n, r) => ({ chord: t, column: n, rebindable: !0, command: e, note: r }), Wm = () => {
2369
+ }, xr = (e, t) => e.ctrl !== (t.ctrlKey || t.metaKey) || e.alt !== t.altKey || e.shift !== t.shiftKey || e.alt && t.getModifierState("AltGraph") ? !1 : mu(t) === e.key, ke = (e, t, n) => ({ chord: e, column: t, rebindable: !1, note: n }), $e = (e, t, n, r) => ({ chord: t, column: n, rebindable: !0, command: e, note: r }), Km = () => {
2369
2370
  const e = [];
2370
2371
  for (const t of ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"])
2371
2372
  e.push(ke(t, "both", "move active (idle) / commit + move in replace mode, caret in edit mode, reference cursor while pointing")), e.push(ke(`Shift+${t}`, "both", "extend selection (idle) / commit + extend in replace mode, text selection in edit mode")), e.push(ke(`Ctrl+${t}`, "both", "data-edge jump (idle) / native word caret (editing), Ctrl reference cursor while pointing")), e.push(ke(`Ctrl+Shift+${t}`, "both", "extend to data edge (idle) / consume + no-op (editing)"));
2372
2373
  return e;
2373
- }, Km = () => {
2374
+ }, Ym = () => {
2374
2375
  const e = [];
2375
2376
  for (const t of ["Equal", "Minus", "Digit0", "NumpadAdd", "NumpadSubtract", "Numpad0"])
2376
2377
  e.push(ke(`Ctrl+Alt+${t}`, "both", "zoom token space (root capture listener, produced-character matching — v0.3.3 contract)")), e.push(ke(`Ctrl+Alt+Shift+${t}`, "both", "zoom token space, Shift-independent (JIS `=` is Shift+Minus, AZERTY `0` is Shift+Digit0)"));
2377
2378
  return e;
2378
2379
  }, Kr = [
2379
- ...Wm(),
2380
+ ...Km(),
2380
2381
  ke("Home", "idle", "row start (first visible column)"),
2381
2382
  ke("Ctrl+Home", "idle", "first visible cell"),
2382
2383
  ke("Shift+Home", "idle", "extend to row start"),
@@ -2414,7 +2415,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2414
2415
  ke("Ctrl+V", "idle", "native paste (ClipboardEvent path — never preventDefault)"),
2415
2416
  ke("Ctrl+Shift+V", "idle", "pasteValues: arms the paste options, the native paste follows (not a command)"),
2416
2417
  { chord: "Ctrl+Alt+V", column: "idle", rebindable: !1, command: "pasteSpecial", note: "paste special (onPasteSpecialRequest / formats-only branch) — a command row that cannot be rebound" },
2417
- ...Km(),
2418
+ ...Ym(),
2418
2419
  $e("bold", "Ctrl+B", "both", "toggle bold"),
2419
2420
  $e("italic", "Ctrl+I", "both", "toggle italic"),
2420
2421
  $e("underline", "Ctrl+U", "both", "toggle underline"),
@@ -2473,18 +2474,18 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2473
2474
  NumpadDivide: "/",
2474
2475
  NumpadDecimal: ".",
2475
2476
  NumpadEnter: "Enter"
2476
- }), Ym = (e) => {
2477
+ }), Xm = (e) => {
2477
2478
  const t = mn(e);
2478
2479
  if (t.key === "IntlYen" || t.key === "IntlRo" || t.key === "IntlBackslash")
2479
2480
  return null;
2480
2481
  const n = /^(?:Digit|Numpad)(\d)$/u.exec(t.key), r = n !== null ? n[1] : t.key in sc ? sc[t.key] : t.key;
2481
2482
  return `${t.ctrl ? "Control+" : ""}${t.alt ? "Alt+" : ""}${t.shift ? "Shift+" : ""}${r}`;
2482
- }, Do = (e, t) => e.column === "both" || e.column === t, fC = Array.from(new Set(Kr.filter((e) => !e.rebindable && Do(e, "idle")).map((e) => e.chord))), Fo = new Set(Kr.filter((e) => e.command !== void 0 && Do(e, "editing")).map((e) => e.command)), Xm = new Set(Kr.filter((e) => e.command !== void 0 && !e.rebindable).map((e) => e.command)), gu = (e) => {
2483
+ }, Do = (e, t) => e.column === "both" || e.column === t, hC = Array.from(new Set(Kr.filter((e) => !e.rebindable && Do(e, "idle")).map((e) => e.chord))), Fo = new Set(Kr.filter((e) => e.command !== void 0 && Do(e, "editing")).map((e) => e.command)), Um = new Set(Kr.filter((e) => e.command !== void 0 && !e.rebindable).map((e) => e.command)), gu = (e) => {
2483
2484
  const t = {};
2484
2485
  for (const n of Xo)
2485
2486
  t[n] = e(n);
2486
2487
  return t;
2487
- }, Um = gu((e) => Kr.filter((t) => t.command === e).map((t) => t.chord)), Gm = (e) => {
2488
+ }, Gm = gu((e) => Kr.filter((t) => t.command === e).map((t) => t.chord)), Jm = (e) => {
2488
2489
  const t = /* @__PURE__ */ new Map();
2489
2490
  for (const n of Xo) {
2490
2491
  const r = e[n];
@@ -2495,14 +2496,14 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2495
2496
  }
2496
2497
  }
2497
2498
  return t;
2498
- }, Jm = (e) => {
2499
+ }, Zm = (e) => {
2499
2500
  const t = new Set(Xo);
2500
2501
  for (const n of Object.keys(e)) {
2501
2502
  if (!t.has(n))
2502
2503
  throw new RangeError(`[spreadsheet] shortcuts.${n} is not a SpreadsheetCommand`);
2503
2504
  const r = e[n];
2504
2505
  if (r !== void 0) {
2505
- if (Xm.has(n))
2506
+ if (Um.has(n))
2506
2507
  throw new RangeError(`[spreadsheet] shortcuts.${n} is not rebindable`);
2507
2508
  if (r !== null) {
2508
2509
  if (!Array.isArray(r))
@@ -2513,7 +2514,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2513
2514
  }
2514
2515
  }
2515
2516
  }
2516
- }, Zm = (e, t) => {
2517
+ }, Qm = (e, t) => {
2517
2518
  const n = mn(t);
2518
2519
  if (!(n.ctrl || n.alt || n.shift))
2519
2520
  throw new RangeError(`[spreadsheet] shortcut ${t} for ${e} has no modifier`);
@@ -2521,17 +2522,17 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2521
2522
  for (const o of Kr)
2522
2523
  if (!(o.rebindable || o.command === e || o.chord !== t) && (Do(o, "idle") || r && Do(o, "editing")))
2523
2524
  throw new RangeError(`[spreadsheet] shortcut ${t} for ${e} is reserved by a built-in row (${o.column} column: ${o.note})`);
2524
- }, Qm = (e) => {
2525
- e !== void 0 && Jm(e);
2525
+ }, eg = (e) => {
2526
+ e !== void 0 && Zm(e);
2526
2527
  const t = gu((r) => {
2527
2528
  const o = e === void 0 ? void 0 : e[r];
2528
- return o === void 0 ? Um[r] : o === null ? [] : o;
2529
+ return o === void 0 ? Gm[r] : o === null ? [] : o;
2529
2530
  });
2530
2531
  for (const r of Xo)
2531
2532
  for (const o of t[r])
2532
- Zm(r, o);
2533
+ Qm(r, o);
2533
2534
  const n = /* @__PURE__ */ new Map();
2534
- for (const [r, o] of Gm(t)) {
2535
+ for (const [r, o] of Jm(t)) {
2535
2536
  if (o.length > 1)
2536
2537
  throw new RangeError(`[spreadsheet] shortcut ${r} bound to ${o.slice(0, -1).join(", ")} and ${o[o.length - 1]}`);
2537
2538
  n.set(r, o[0]);
@@ -2544,14 +2545,14 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2544
2545
  const r = t.altKey;
2545
2546
  if (r && t.getModifierState("AltGraph"))
2546
2547
  return null;
2547
- const o = Vm({ ctrl: t.ctrlKey || t.metaKey, alt: r, shift: t.shiftKey, key: n }), s = e.get(o);
2548
+ const o = Wm({ ctrl: t.ctrlKey || t.metaKey, alt: r, shift: t.shiftKey, key: n }), s = e.get(o);
2548
2549
  return s === void 0 ? null : { command: s, chord: o };
2549
- }, eg = (e, t) => {
2550
+ }, tg = (e, t) => {
2550
2551
  const n = Qs(e, t);
2551
2552
  return n === null ? null : n.command;
2552
- }, tg = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End", "PageUp", "PageDown", "Enter", "NumpadEnter", "Escape", "Space", "Tab", "Delete", "Backspace", "Insert", "ContextMenu"]), ng = /^F(?:[1-9]|1[0-2])$/, rg = (e) => {
2553
+ }, ng = /* @__PURE__ */ new Set(["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Home", "End", "PageUp", "PageDown", "Enter", "NumpadEnter", "Escape", "Space", "Tab", "Delete", "Backspace", "Insert", "ContextMenu"]), rg = /^F(?:[1-9]|1[0-2])$/, og = (e) => {
2553
2554
  const t = mn(e);
2554
- return t.alt || tg.has(t.key) ? !1 : t.ctrl || ng.test(t.key);
2555
+ return t.alt || ng.has(t.key) ? !1 : t.ctrl || rg.test(t.key);
2555
2556
  }, Si = [
2556
2557
  "sinkAriaLabel",
2557
2558
  "rootAriaLabel",
@@ -2675,10 +2676,10 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2675
2676
  filterClearColumn: "この列の絞り込みを外す",
2676
2677
  filterClearAll: "すべての絞り込みを外す"
2677
2678
  })
2678
- }), og = Object.freeze({
2679
+ }), sg = Object.freeze({
2679
2680
  en: Object.freeze({ ...$l.en, ...ei.en }),
2680
2681
  ja: Object.freeze({ ...$l.ja, ...ei.ja })
2681
- }), Ln = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, lc = (e) => e === "commentCount" || e === "listMore", sg = (e) => {
2682
+ }), Ln = (e) => typeof e == "string" ? JSON.stringify(e) : e === null ? "null" : typeof e, lc = (e) => e === "commentCount" || e === "listMore", ig = (e) => {
2682
2683
  const t = e.sinkAriaLabel;
2683
2684
  if (typeof t != "string" || !t.includes("Escape"))
2684
2685
  throw new RangeError(`[spreadsheet] labels.sinkAriaLabel must be a string mentioning "Escape" (WCAG 2.1.2 escape advisement, spec 00 §10-4); got ${Ln(t)}`);
@@ -2689,7 +2690,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2689
2690
  throw new RangeError(`[spreadsheet] labels.${n} must be ${o}; got ${Ln(r)}`);
2690
2691
  }
2691
2692
  }
2692
- }, ig = (e) => {
2693
+ }, lg = (e) => {
2693
2694
  const t = {};
2694
2695
  let n = !1;
2695
2696
  for (const r of Io) {
@@ -2697,12 +2698,12 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2697
2698
  o !== void 0 && (t[r] = o, n = !0);
2698
2699
  }
2699
2700
  return n ? t : void 0;
2700
- }, lg = (e, t, n) => {
2701
+ }, cg = (e, t, n) => {
2701
2702
  e[t] = n;
2702
- }, cg = (e, t) => {
2703
+ }, ag = (e, t) => {
2703
2704
  const n = aa(e);
2704
2705
  if (t === void 0)
2705
- return og[n];
2706
+ return sg[n];
2706
2707
  if (t === null || typeof t != "object")
2707
2708
  throw new RangeError(`[spreadsheet] labels must be an object; got ${Ln(t)}`);
2708
2709
  const r = Object.getPrototypeOf(t);
@@ -2711,13 +2712,13 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2711
2712
  for (const i of Object.keys(t))
2712
2713
  if (!ic.includes(i))
2713
2714
  throw new RangeError(`[spreadsheet] labels.${i} is not a known label key; expected one of ${ic.join(", ")}`);
2714
- const s = { ...Hd(n, ig(t)), ...ei[n] };
2715
+ const s = { ...Hd(n, lg(t)), ...ei[n] };
2715
2716
  for (const i of Si) {
2716
2717
  const l = Object.hasOwn(t, i) ? t[i] : void 0;
2717
- l !== void 0 && lg(s, i, l);
2718
+ l !== void 0 && cg(s, i, l);
2718
2719
  }
2719
- return sg(s), Object.freeze(s);
2720
- }, ag = (e) => {
2720
+ return ig(s), Object.freeze(s);
2721
+ }, ug = (e) => {
2721
2722
  const t = {};
2722
2723
  for (const n of Io)
2723
2724
  t[n] = e[n];
@@ -2730,7 +2731,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2730
2731
  return r(n);
2731
2732
  }
2732
2733
  return r;
2733
- }, cc = { gt: "greater than", gte: "greater than or equal to", lt: "less than", lte: "less than or equal to" }, ug = { gt: "after", gte: "on or after", lt: "before", lte: "on or before" }, dg = (e, t, n, r) => {
2734
+ }, cc = { gt: "greater than", gte: "greater than or equal to", lt: "less than", lte: "less than or equal to" }, dg = { gt: "after", gte: "on or after", lt: "before", lte: "on or before" }, fg = (e, t, n, r) => {
2734
2735
  switch (e) {
2735
2736
  case "gt":
2736
2737
  case "gte":
@@ -2747,7 +2748,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2747
2748
  return `not between ${t} and ${n}`;
2748
2749
  }
2749
2750
  }, xs = (e, t) => {
2750
- const n = (r) => (o, s) => `${e} ${dg(r, o, s, t)}.`;
2751
+ const n = (r) => (o, s) => `${e} ${fg(r, o, s, t)}.`;
2751
2752
  return Object.freeze({
2752
2753
  gt: n("gt"),
2753
2754
  gte: n("gte"),
@@ -2758,11 +2759,11 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2758
2759
  between: n("between"),
2759
2760
  notBetween: n("notBetween")
2760
2761
  });
2761
- }, fg = Object.freeze({
2762
+ }, pg = Object.freeze({
2762
2763
  list: "Value must be one of the list items.",
2763
2764
  number: xs("Value must be a number", cc),
2764
2765
  textLength: xs("Text length must be", cc),
2765
- date: xs("Value must be a date", ug),
2766
+ date: xs("Value must be a date", dg),
2766
2767
  text: Object.freeze({
2767
2768
  contains: (e) => `Value must contain "${e}".`,
2768
2769
  notContains: (e) => `Value must not contain "${e}".`,
@@ -2773,7 +2774,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2773
2774
  }),
2774
2775
  checkbox: (e, t) => `Value must be "${e}" or "${t}".`,
2775
2776
  custom: (e) => `Value does not satisfy the formula ${e}.`
2776
- }), pg = Object.freeze({
2777
+ }), hg = Object.freeze({
2777
2778
  list: "リストの項目のいずれかを入力してください。",
2778
2779
  number: Object.freeze({
2779
2780
  gt: (e) => `${e} より大きい数値を入力してください。`,
@@ -2815,20 +2816,20 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2815
2816
  }),
2816
2817
  checkbox: (e, t) => `「${e}」または「${t}」を入力してください。`,
2817
2818
  custom: (e) => `数式 ${e} を満たす値を入力してください。`
2818
- }), Ms = Object.freeze({ en: fg, ja: pg }), hg = Object.freeze({ ok: !0 }), mg = "TRUE", gg = "FALSE", wg = /* @__PURE__ */ new Set(["gt", "gte", "lt", "lte", "eq", "neq", "between", "notBetween"]), yg = /* @__PURE__ */ new Set(["contains", "notContains", "startsWith", "endsWith", "isEmail", "isUrl"]), Cg = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d{1,4})?$/, vg = /^(\d{4})([-/])(\d{1,2})\2(\d{1,2})(?:[ T](\d{1,2}):(\d{1,2})(?::(\d{1,2}))?)?$/, bg = /^[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$/, ac = (e) => {
2819
+ }), Ms = Object.freeze({ en: pg, ja: hg }), mg = Object.freeze({ ok: !0 }), gg = "TRUE", wg = "FALSE", yg = /* @__PURE__ */ new Set(["gt", "gte", "lt", "lte", "eq", "neq", "between", "notBetween"]), Cg = /* @__PURE__ */ new Set(["contains", "notContains", "startsWith", "endsWith", "isEmail", "isUrl"]), vg = /^[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d{1,4})?$/, bg = /^(\d{4})([-/])(\d{1,2})\2(\d{1,2})(?:[ T](\d{1,2}):(\d{1,2})(?::(\d{1,2}))?)?$/, Rg = /^[A-Za-z0-9.!#$%&'*+/=?^_`{|}~-]+@[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?(?:\.[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?)+$/, ac = (e) => {
2819
2820
  const t = e.trim();
2820
- if (!(Cg.test(t) && Number.isFinite(Number(t))))
2821
+ if (!(vg.test(t) && Number.isFinite(Number(t))))
2821
2822
  return null;
2822
2823
  const n = t.startsWith("-"), r = t.replace(/^[+-]/, ""), o = r.search(/[eE]/), s = o < 0 ? r : r.slice(0, o), i = o < 0 ? 0 : Number(r.slice(o + 1)), l = s.indexOf("."), c = l < 0 ? s : s.slice(0, l), a = l < 0 ? "" : s.slice(l + 1), p = c + a, m = p.search(/[^0]/);
2823
2824
  return m < 0 ? { sign: 0, digits: "", point: 0 } : { sign: n ? -1 : 1, digits: p.slice(m).replace(/0+$/, ""), point: c.length + i - m };
2824
- }, Rg = (e) => e === 1 ? -1 : e === -1 ? 1 : 0, Sg = (e, t) => {
2825
+ }, Sg = (e) => e === 1 ? -1 : e === -1 ? 1 : 0, Eg = (e, t) => {
2825
2826
  if (e.sign !== t.sign)
2826
2827
  return e.sign < t.sign ? -1 : 1;
2827
2828
  if (e.sign === 0)
2828
2829
  return 0;
2829
2830
  const n = e.point !== t.point ? e.point < t.point ? -1 : 1 : e.digits === t.digits ? 0 : e.digits < t.digits ? -1 : 1;
2830
- return e.sign === 1 ? n : Rg(n);
2831
- }, Eg = (e, t) => {
2831
+ return e.sign === 1 ? n : Sg(n);
2832
+ }, kg = (e, t) => {
2832
2833
  switch (t) {
2833
2834
  case 2:
2834
2835
  return e % 4 === 0 && e % 100 !== 0 || e % 400 === 0 ? 29 : 28;
@@ -2841,26 +2842,26 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2841
2842
  return 31;
2842
2843
  }
2843
2844
  }, uc = (e) => {
2844
- const t = vg.exec(e.trim());
2845
+ const t = bg.exec(e.trim());
2845
2846
  if (t === null)
2846
2847
  return null;
2847
2848
  const n = Number(t[1]), r = Number(t[3]), o = Number(t[4]), s = t[5] === void 0 ? 0 : Number(t[5]), i = t[6] === void 0 ? 0 : Number(t[6]), l = t[7] === void 0 ? 0 : Number(t[7]);
2848
- return r < 1 || r > 12 || o < 1 || o > Eg(n, r) || s > 23 || i > 59 || l > 59 ? null : { year: n, month: r, day: o, hour: s, minute: i, second: l };
2849
- }, kg = (e, t) => {
2849
+ return r < 1 || r > 12 || o < 1 || o > kg(n, r) || s > 23 || i > 59 || l > 59 ? null : { year: n, month: r, day: o, hour: s, minute: i, second: l };
2850
+ }, Og = (e, t) => {
2850
2851
  const n = [e.year, e.month, e.day, e.hour, e.minute, e.second], r = [t.year, t.month, t.day, t.hour, t.minute, t.second];
2851
2852
  for (let o = 0; o < n.length; o += 1)
2852
2853
  if (n[o] !== r[o])
2853
2854
  return n[o] < r[o] ? -1 : 1;
2854
2855
  return 0;
2855
- }, Og = (e, t) => e < t ? -1 : e > t ? 1 : 0, Ag = (e) => e === "between" || e === "notBetween", $g = (e, t, n, r) => {
2856
+ }, Ag = (e, t) => e < t ? -1 : e > t ? 1 : 0, $g = (e) => e === "between" || e === "notBetween", Tg = (e, t, n, r) => {
2856
2857
  const o = r(t);
2857
2858
  if (o === null)
2858
2859
  return null;
2859
- if (!Ag(e))
2860
+ if (!$g(e))
2860
2861
  return { a: o, b: null };
2861
2862
  const s = n === void 0 ? null : r(n);
2862
2863
  return s === null ? null : { a: o, b: s };
2863
- }, Tg = (e, t, n) => {
2864
+ }, xg = (e, t, n) => {
2864
2865
  switch (e) {
2865
2866
  case "gt":
2866
2867
  return t === 1;
@@ -2880,19 +2881,19 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2880
2881
  return t === -1 || n === 1;
2881
2882
  }
2882
2883
  }, zs = (e, t, n, r, o, s) => {
2883
- const i = $g(e, t, n, r);
2884
- return i === null ? !0 : o === null ? !1 : Tg(e, s(o, i.a), i.b === null ? 0 : s(o, i.b));
2885
- }, xg = (e) => Number.isFinite(e) ? e : null, Mg = (e) => {
2884
+ const i = Tg(e, t, n, r);
2885
+ return i === null ? !0 : o === null ? !1 : xg(e, s(o, i.a), i.b === null ? 0 : s(o, i.b));
2886
+ }, Mg = (e) => Number.isFinite(e) ? e : null, zg = (e) => {
2886
2887
  let t = 0;
2887
2888
  for (const n of e)
2888
2889
  t += 1;
2889
2890
  return t;
2890
- }, zg = (e) => URL.canParse(e) && /^https?:$/.test(new URL(e).protocol), Ng = (e, t) => {
2891
+ }, Ng = (e) => URL.canParse(e) && /^https?:$/.test(new URL(e).protocol), Dg = (e, t) => {
2891
2892
  switch (e.op) {
2892
2893
  case "isEmail":
2893
- return bg.test(t);
2894
+ return Rg.test(t);
2894
2895
  case "isUrl":
2895
- return zg(t);
2896
+ return Ng(t);
2896
2897
  }
2897
2898
  if (e.value === void 0)
2898
2899
  return !0;
@@ -2906,10 +2907,10 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2906
2907
  default:
2907
2908
  return t.endsWith(e.value);
2908
2909
  }
2909
- }, Dg = (e) => e === !0 || typeof e == "number" && Number.isFinite(e) && e !== 0, wu = (e) => ({
2910
- checked: e.checked === void 0 ? mg : e.checked,
2911
- unchecked: e.unchecked === void 0 ? gg : e.unchecked
2912
- }), Fg = (e) => {
2910
+ }, Fg = (e) => e === !0 || typeof e == "number" && Number.isFinite(e) && e !== 0, wu = (e) => ({
2911
+ checked: e.checked === void 0 ? gg : e.checked,
2912
+ unchecked: e.unchecked === void 0 ? wg : e.unchecked
2913
+ }), Lg = (e) => {
2913
2914
  switch (e.type) {
2914
2915
  case "list":
2915
2916
  case "checkbox":
@@ -2918,36 +2919,36 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2918
2919
  case "number":
2919
2920
  case "textLength":
2920
2921
  case "date":
2921
- if (!wg.has(e.op))
2922
+ if (!yg.has(e.op))
2922
2923
  throw new RangeError(`[spreadsheet] unknown data-validation op ${Ln(e.op)} for type "${e.type}"`);
2923
2924
  return;
2924
2925
  case "text":
2925
- if (!yg.has(e.op))
2926
+ if (!Cg.has(e.op))
2926
2927
  throw new RangeError(`[spreadsheet] unknown data-validation op ${Ln(e.op)} for type "text"`);
2927
2928
  return;
2928
2929
  default:
2929
2930
  throw new RangeError(`[spreadsheet] unknown data-validation rule type ${Ln(e.type)}`);
2930
2931
  }
2931
- }, Lg = (e, t, n) => {
2932
+ }, qg = (e, t, n) => {
2932
2933
  switch (e.type) {
2933
2934
  case "list":
2934
- return _g(e).has(t);
2935
+ return Ig(e).has(t);
2935
2936
  case "number":
2936
- return zs(e.op, e.a, e.b, ac, ac(t), Sg);
2937
+ return zs(e.op, e.a, e.b, ac, ac(t), Eg);
2937
2938
  case "textLength":
2938
- return zs(e.op, e.a, e.b, xg, Mg(t), Og);
2939
+ return zs(e.op, e.a, e.b, Mg, zg(t), Ag);
2939
2940
  case "date":
2940
- return zs(e.op, e.a, e.b, uc, uc(t), kg);
2941
+ return zs(e.op, e.a, e.b, uc, uc(t), Og);
2941
2942
  case "text":
2942
- return Ng(e, t);
2943
+ return Dg(e, t);
2943
2944
  case "checkbox": {
2944
2945
  const r = wu(e);
2945
2946
  return t === r.checked || t === r.unchecked;
2946
2947
  }
2947
2948
  default:
2948
- return n === void 0 || Dg(n(e.formula));
2949
+ return n === void 0 || Fg(n(e.formula));
2949
2950
  }
2950
- }, yu = (e, t, n) => (Fg(e), t === "" || Lg(e, t, n)), dc = (e) => e === void 0 ? void 0 : e.trim(), qg = (e, t) => {
2951
+ }, yu = (e, t, n) => (Lg(e), t === "" || qg(e, t, n)), dc = (e) => e === void 0 ? void 0 : e.trim(), Pg = (e, t) => {
2951
2952
  switch (e.type) {
2952
2953
  case "list":
2953
2954
  return t.list;
@@ -2958,7 +2959,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2958
2959
  case "date":
2959
2960
  return t.date[e.op](e.a.trim(), dc(e.b));
2960
2961
  case "text":
2961
- return Pg(e, t.text);
2962
+ return _g(e, t.text);
2962
2963
  case "checkbox": {
2963
2964
  const n = wu(e);
2964
2965
  return t.checkbox(n.checked, n.unchecked);
@@ -2966,7 +2967,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2966
2967
  default:
2967
2968
  return t.custom(e.formula);
2968
2969
  }
2969
- }, Pg = (e, t) => {
2970
+ }, _g = (e, t) => {
2970
2971
  switch (e.op) {
2971
2972
  case "isEmail":
2972
2973
  return t.isEmail;
@@ -2975,19 +2976,19 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
2975
2976
  default:
2976
2977
  return t[e.op](e.value);
2977
2978
  }
2978
- }, fc = /* @__PURE__ */ new WeakMap(), _g = (e) => {
2979
+ }, fc = /* @__PURE__ */ new WeakMap(), Ig = (e) => {
2979
2980
  const t = fc.get(e);
2980
2981
  if (t !== void 0)
2981
2982
  return t;
2982
2983
  const n = new Set(e.values);
2983
2984
  return fc.set(e, n), n;
2984
- }, Ig = (e, t, n, r) => {
2985
+ }, Hg = (e, t, n, r) => {
2985
2986
  if (typeof n != "string" || !Object.hasOwn(Ms, n)) {
2986
2987
  const o = Object.keys(Ms).map((s) => JSON.stringify(s)).join(", ");
2987
2988
  throw new RangeError(`[spreadsheet] validateCellText locale must be one of ${o}; got ${Ln(n)}`);
2988
2989
  }
2989
- return yu(e, t, r) ? hg : { ok: !1, message: e.errorMessage === void 0 ? qg(e, Ms[n]) : e.errorMessage };
2990
- }, Hg = (e) => e.type !== "custom", jg = (e, t) => Hg(e) && !yu(e, t, void 0), Cu = (e, t) => t <= 0 || e.count === 0 ? 0 : t >= e.count ? e.totalSize() : e.offsetOf(t), vu = (e, t) => t <= 0 || e.count === 0 ? 0 : t >= e.count ? e.totalSize() : e.totalSize() - e.offsetOf(e.count - t), bu = (e, t, { scroll: n, frozenCount: r, trailingCount: o, extent: s }) => t < r ? (
2990
+ return yu(e, t, r) ? mg : { ok: !1, message: e.errorMessage === void 0 ? Pg(e, Ms[n]) : e.errorMessage };
2991
+ }, jg = (e) => e.type !== "custom", Bg = (e, t) => jg(e) && !yu(e, t, void 0), Cu = (e, t) => t <= 0 || e.count === 0 ? 0 : t >= e.count ? e.totalSize() : e.offsetOf(t), vu = (e, t) => t <= 0 || e.count === 0 ? 0 : t >= e.count ? e.totalSize() : e.totalSize() - e.offsetOf(e.count - t), bu = (e, t, { scroll: n, frozenCount: r, trailingCount: o, extent: s }) => t < r ? (
2991
2992
  // 先頭: 木座標の生値 (scroll 非依存の静的位置)
2992
2993
  e.offsetOf(t)
2993
2994
  ) : o > 0 && s > 0 && t >= e.count - o ? (
@@ -3005,7 +3006,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3005
3006
  ) : (
3006
3007
  // 中央が最後: 木 = p + scroll (v0.8 恒等形)
3007
3008
  e.indexAt(t + n)
3008
- ), Su = (e, t) => Cu(e, t), Eu = (e, t) => Cu(e, t), ku = (e, t) => vu(e, t), Ou = (e, t) => vu(e, t), qn = (e, t, n) => bu(e, t, n), Pn = (e, t, n) => bu(e, t, n), Yr = (e, t, n) => Ru(e, t, n), Xr = (e, t, n) => Ru(e, t, n), Bg = Object.freeze({ cols: 0, width: 0, rows: 0, height: 0, trailingCols: 0, trailingRows: 0, trailingWidth: 0, trailingHeight: 0, trailingVisibleWidth: 0, trailingVisibleHeight: 0 }), Yt = 1, qr = 3, po = (e) => `${-Math.min(qr, Math.max(0, Math.floor(e)))}px`, Vg = (e, t, n) => {
3009
+ ), Su = (e, t) => Cu(e, t), Eu = (e, t) => Cu(e, t), ku = (e, t) => vu(e, t), Ou = (e, t) => vu(e, t), qn = (e, t, n) => bu(e, t, n), Pn = (e, t, n) => bu(e, t, n), Yr = (e, t, n) => Ru(e, t, n), Xr = (e, t, n) => Ru(e, t, n), Vg = Object.freeze({ cols: 0, width: 0, rows: 0, height: 0, trailingCols: 0, trailingRows: 0, trailingWidth: 0, trailingHeight: 0, trailingVisibleWidth: 0, trailingVisibleHeight: 0 }), Yt = 1, qr = 3, po = (e) => `${-Math.min(qr, Math.max(0, Math.floor(e)))}px`, Wg = (e, t, n) => {
3009
3010
  const r = Math.min(e.endRow, t - 1), o = Math.min(e.endCol, n - 1);
3010
3011
  return e.startRow > r || e.startCol > o ? null : { startRow: e.startRow, startCol: e.startCol, endRow: r, endCol: o };
3011
3012
  }, pc = (e, t, n, r) => e === "m" ? t : e === "s" ? Math.max(0, t - n - r) : null, hc = (e, t) => t === null ? e : Math.min(e, t), mc = (e) => e === null ? "100%" : `min(100%, ${e}px)`, gc = (e) => e === null ? "0px" : `max(0px, calc(100% - ${e}px))`, wc = (e, t, n, r) => {
@@ -3026,7 +3027,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3026
3027
  return z <= c || N >= a ? !1 : (e.near = Math.max(N, c), e.far = Math.min(z, a), e.nearOpen = !p || N < c, e.farOpen = !m || z > a, !0);
3027
3028
  }, ho = () => ({ near: Number.NaN, far: Number.NaN, nearOpen: !1, farOpen: !1 }), vc = (e, t) => e.near === t.near && e.far === t.far && e.nearOpen === t.nearOpen && e.farOpen === t.farOpen, bc = (e, t) => {
3028
3029
  e.near = t.near, e.far = t.far, e.nearOpen = t.nearOpen, e.farOpen = t.farOpen;
3029
- }, Wg = Object.freeze(["top", "right", "bottom", "left"]), Kg = (e, t) => (t.nearOpen ? 1 : 0) | (e.farOpen ? 2 : 0) | (t.farOpen ? 4 : 0) | (e.nearOpen ? 8 : 0), Yg = (e) => Wg.filter((t, n) => (e & 1 << n) !== 0).join(" "), Xg = Object.freeze({ row: "#0084FF", column: "#42FF4F", intersection: "#E1FF00", opacity: 0.2 }), Ug = 16, Gg = 450, Jg = (e) => e > 4 ? Math.floor(Gg / (5 * e)) : Ug, Mr = (e, t) => {
3030
+ }, Kg = Object.freeze(["top", "right", "bottom", "left"]), Yg = (e, t) => (t.nearOpen ? 1 : 0) | (e.farOpen ? 2 : 0) | (t.farOpen ? 4 : 0) | (e.nearOpen ? 8 : 0), Xg = (e) => Kg.filter((t, n) => (e & 1 << n) !== 0).join(" "), Ug = Object.freeze({ row: "#0084FF", column: "#42FF4F", intersection: "#E1FF00", opacity: 0.2 }), Gg = 16, Jg = 450, Zg = (e) => e > 4 ? Math.floor(Jg / (5 * e)) : Gg, Mr = (e, t) => {
3030
3031
  const n = document.createElement("div");
3031
3032
  return n.className = "aqsp-band", n.setAttribute("data-aqsp-band", e), t !== null && n.setAttribute("data-aqsp-band-edge", t), n.style.display = "none", n;
3032
3033
  }, Rc = () => ({
@@ -3042,7 +3043,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3042
3043
  }, go = (e, t) => Math.min(Math.max(e, 0), t), Sc = "inset(100%)", ur = (e, t) => {
3043
3044
  for (const n of e)
3044
3045
  n.style.display = t ? "block" : "none";
3045
- }, Zg = (e, t, n, r, o) => {
3046
+ }, Qg = (e, t, n, r, o) => {
3046
3047
  const s = e.last, i = r.row && !o;
3047
3048
  if (i !== s.rowShown && (s.rowShown = i, ur([e.rowLeft, e.rowRight], i)), i) {
3048
3049
  if (t.height !== s.rowHeight) {
@@ -3079,15 +3080,15 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3079
3080
  }, wo = (e) => {
3080
3081
  for (const t of ti(e))
3081
3082
  t.remove();
3082
- }, Qg = (e, t) => {
3083
+ }, ew = (e, t) => {
3083
3084
  const n = e - 1 - t.lineBoxPx;
3084
3085
  return t.verticalAlign === "top" ? 0 : t.verticalAlign === "bottom" ? Math.max(0, n) : Math.max(0, n / 2);
3085
- }, ew = Object.freeze([]), kc = (e) => e.farOpen ? { start: `${e.near}px`, end: "0px", size: "" } : { start: `${e.near}px`, end: "", size: `${e.far - e.near}px` }, Oc = (e) => e.chrome[0] ?? e.active, Ac = (e) => {
3086
+ }, tw = Object.freeze([]), kc = (e) => e.farOpen ? { start: `${e.near}px`, end: "0px", size: "" } : { start: `${e.near}px`, end: "", size: `${e.far - e.near}px` }, Oc = (e) => e.chrome[0] ?? e.active, Ac = (e) => {
3086
3087
  e.chrome.length = 0;
3087
3088
  for (const t of e.dividerSlots)
3088
3089
  t !== null && e.chrome.push(t);
3089
3090
  e.frame !== null && e.chrome.push(e.frame.node);
3090
- }, tw = { left: "0px", right: "0px", width: "" }, nw = { top: "0px", bottom: "0px", height: "" }, $c = () => ({
3091
+ }, nw = { left: "0px", right: "0px", width: "" }, rw = { top: "0px", bottom: "0px", height: "" }, $c = () => ({
3091
3092
  container: null,
3092
3093
  active: null,
3093
3094
  dragRect: null,
@@ -3107,7 +3108,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3107
3108
  bandClipWidth: "",
3108
3109
  bandClipHeight: "",
3109
3110
  chrome: []
3110
- }), Tc = ["mm", "mf", "ms", "mt", "fm", "ff", "fs", "ft", "sm", "sf", "ss", "st", "tm", "tf", "ts", "tt"], xc = 6, rw = ({
3111
+ }), Tc = ["mm", "mf", "ms", "mt", "fm", "ff", "fs", "ft", "sm", "sf", "ss", "st", "tm", "tf", "ts", "tt"], xc = 6, ow = ({
3111
3112
  rowAxis: e,
3112
3113
  colAxis: t,
3113
3114
  handleRef: n,
@@ -3173,12 +3174,12 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3173
3174
  P === null || x.dividerEnd[q] === J || (x.dividerEnd[q] = J, q < 2 ? P.style.bottom = J : P.style.right = J);
3174
3175
  }, []), se = E({ x: 0, y: 0 }), ae = E(null), O = R(
3175
3176
  (x, q) => {
3176
- const J = n.current, P = J?.getFrozenSize() ?? Bg, re = J?.getViewportSize(), ce = re?.width ?? -1, pe = re?.height ?? -1, qe = se.current;
3177
+ const J = n.current, P = J?.getFrozenSize() ?? Vg, re = J?.getViewportSize(), ce = re?.width ?? -1, pe = re?.height ?? -1, qe = se.current;
3177
3178
  qe.x = x, qe.y = q;
3178
3179
  const ze = w.current !== void 0, de = b.current, Ge = ze ? de.rowAxis.count : -1, Je = ze ? de.colAxis.count : -1, xe = ze ? de.rowAxis.totalSize() : -1, we = ze ? de.colAxis.totalSize() : -1;
3179
3180
  let fe = ae.current;
3180
3181
  if (fe === null || fe.framed !== ze || fe.rowCount !== Ge || fe.colCount !== Je || fe.rowsTotal !== xe || fe.colsTotal !== we || fe.frozenCols !== P.cols || fe.frozenWidth !== P.width || fe.frozenRows !== P.rows || fe.frozenHeight !== P.height || fe.trailingCols !== P.trailingCols || fe.trailingWidth !== P.trailingWidth || fe.trailingVisibleWidth !== P.trailingVisibleWidth || fe.trailingRows !== P.trailingRows || fe.trailingHeight !== P.trailingHeight || fe.trailingVisibleHeight !== P.trailingVisibleHeight || fe.bodyWidth !== ce || fe.bodyHeight !== pe) {
3181
- const le = P.trailingVisibleWidth, Ne = P.trailingVisibleHeight, vt = P.cols <= 0 && P.trailingCols <= 0 ? [{ kind: "m", map: (De) => De - qe.x, clamp: ce, style: tw, seamLead: !1, seamTrail: !1 }] : [
3182
+ const le = P.trailingVisibleWidth, Ne = P.trailingVisibleHeight, vt = P.cols <= 0 && P.trailingCols <= 0 ? [{ kind: "m", map: (De) => De - qe.x, clamp: ce, style: nw, seamLead: !1, seamTrail: !1 }] : [
3182
3183
  ...P.cols > 0 ? [{ kind: "f", map: (De) => De, clamp: P.width, style: { left: "0px", width: `${P.width}px`, right: "" }, seamLead: !1, seamTrail: !0 }] : [],
3183
3184
  // s 帯クリップ [W_F, extent − W_T_vis) — clamp = body − W_F − W_T_vis、
3184
3185
  // right = W_T_vis (導出: v0.9 §2.5 の s 変形。T = 0 は vis 0 で v0.8 と byte 一致)
@@ -3197,7 +3198,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3197
3198
  // (スクロール帯トラックのリサイズはキャッシュキー外 — 入力 treeX が鮮度軸で来る
3198
3199
  // ため total も鮮度で読む。W_T / vis の変化はキャッシュキーが再構築する)
3199
3200
  ...P.trailingCols > 0 ? [{ kind: "t", map: (De) => De - b.current.colAxis.totalSize() + le, clamp: le, style: { left: "", right: "0px", width: `${le}px` }, seamLead: !0, seamTrail: !1 }] : []
3200
- ], pt = P.rows <= 0 && P.trailingRows <= 0 ? [{ kind: "m", map: (De) => De - qe.y, clamp: pe, style: nw, seamLead: !1, seamTrail: !1 }] : [
3201
+ ], pt = P.rows <= 0 && P.trailingRows <= 0 ? [{ kind: "m", map: (De) => De - qe.y, clamp: pe, style: rw, seamLead: !1, seamTrail: !1 }] : [
3201
3202
  ...P.rows > 0 ? [{ kind: "f", map: (De) => De, clamp: P.height, style: { top: "0px", height: `${P.height}px`, bottom: "" }, seamLead: !1, seamTrail: !0 }] : [],
3202
3203
  // s 帯クリップ [H_F, extent − H_T_vis) — x の転置双子 (v0.9 §2.5)
3203
3204
  {
@@ -3365,7 +3366,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3365
3366
  if (q === null)
3366
3367
  return;
3367
3368
  const J = be.current, P = w.current;
3368
- (J.range !== P || J.rows !== e.count || J.cols !== t.count) && (J.range = P, J.rows = e.count, J.cols = t.count, J.within = P === void 0 ? null : Vg(P, e.count, t.count));
3369
+ (J.range !== P || J.rows !== e.count || J.cols !== t.count) && (J.range = P, J.rows = e.count, J.cols = t.count, J.within = P === void 0 ? null : Wg(P, e.count, t.count));
3369
3370
  const re = J.within, ce = q.last, pe = q.node.style;
3370
3371
  if (!(re !== null && Cc(q.x, re.startCol, re.endCol, x.xFirst, x.xLast, x.mapX(t.offsetOf(re.startCol)), x.mapX(t.offsetOf(re.endCol) + t.sizeOf(re.endCol)), x.clampWidth) && Cc(q.y, re.startRow, re.endRow, x.yFirst, x.yLast, x.mapY(e.offsetOf(re.startRow)), x.mapY(e.offsetOf(re.endRow) + e.sizeOf(re.endRow)), x.clampHeight))) {
3371
3372
  ce.shown && (ce.shown = !1, pe.display = "none");
@@ -3381,8 +3382,8 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3381
3382
  const de = kc(q.y);
3382
3383
  de.start !== ce.top && (ce.top = de.start, pe.top = de.start), de.end !== ce.bottom && (ce.bottom = de.end, pe.bottom = de.end), de.size !== ce.height && (ce.height = de.size, pe.height = de.size);
3383
3384
  }
3384
- const ze = Kg(q.x, q.y);
3385
- ze !== ce.open && (ce.open = ze, ze === 0 ? q.node.removeAttribute("data-aqsp-frame-open") : q.node.setAttribute("data-aqsp-frame-open", Yg(ze)));
3385
+ const ze = Yg(q.x, q.y);
3386
+ ze !== ce.open && (ce.open = ze, ze === 0 ? q.node.removeAttribute("data-aqsp-frame-open") : q.node.setAttribute("data-aqsp-frame-open", Xg(ze)));
3386
3387
  },
3387
3388
  [e, t]
3388
3389
  ), Le = R(
@@ -3392,7 +3393,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3392
3393
  Ec(x);
3393
3394
  return;
3394
3395
  }
3395
- Zg(x, re, J, P, $a(q, t.count) || Ta(q, e.count));
3396
+ Qg(x, re, J, P, $a(q, t.count) || Ta(q, e.count));
3396
3397
  },
3397
3398
  [Ur, e, t]
3398
3399
  ), Hn = R(
@@ -3507,7 +3508,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3507
3508
  const x = V.current, q = n.current;
3508
3509
  if (x === null || q === null)
3509
3510
  return;
3510
- const J = q.getScrollPosition(), P = Math.max(0, J.y), re = Math.max(0, J.x), ce = o(), pe = O(re, P), qe = ue(), ze = qe === null ? ew : ce.ranges.slice(-Jg(pe.length));
3511
+ const J = q.getScrollPosition(), P = Math.max(0, J.y), re = Math.max(0, J.x), ce = o(), pe = O(re, P), qe = ue(), ze = qe === null ? tw : ce.ranges.slice(-Zg(pe.length));
3511
3512
  for (const we of pe) {
3512
3513
  const fe = we.nodes.container;
3513
3514
  if (fe === null)
@@ -3562,7 +3563,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3562
3563
  const xe = r.current;
3563
3564
  if (xe !== null) {
3564
3565
  const we = ce.active, { width: fe, height: he } = q.getViewportSize(), Se = q.getFrozenSize(), Ee = { scroll: re, frozenCount: Se.cols, trailingCount: Se.trailingCols, extent: fe }, ft = { scroll: P, frozenCount: Se.rows, trailingCount: Se.trailingRows, extent: he }, le = Pn(e, we.row, ft), Ne = qn(t, we.col, Ee), vt = he > 0 ? Math.min(Math.max(le, 0), Math.max(0, he - 1)) : 0, pt = fe > 0 ? Math.min(Math.max(Ne, 0), Math.max(0, fe - 1)) : 0;
3565
- xe.style.top = `${vt}px`, xe.style.left = `${pt}px`, rt.current ? (xe.style.width = `${t.sizeOf(we.col)}px`, xe.style.height = `${e.sizeOf(we.row)}px`, xe.style.paddingTop = `${Qg(e.sizeOf(we.row), H === void 0 ? rn : H.current)}px`) : (xe.style.width = "1px", xe.style.height = "1px", xe.style.paddingTop = "0px");
3566
+ xe.style.top = `${vt}px`, xe.style.left = `${pt}px`, rt.current ? (xe.style.width = `${t.sizeOf(we.col)}px`, xe.style.height = `${e.sizeOf(we.row)}px`, xe.style.paddingTop = `${ew(e.sizeOf(we.row), H === void 0 ? rn : H.current)}px`) : (xe.style.width = "1px", xe.style.height = "1px", xe.style.paddingTop = "0px");
3566
3567
  const ht = we.col >= Se.cols && Ne < Se.width, De = we.row >= Se.rows && le < Se.height, mt = Se.trailingWidth > 0 && we.col < t.count - Se.trailingCols && Ne + t.sizeOf(we.col) > fe - Se.trailingVisibleWidth, Gt = Se.trailingHeight > 0 && we.row < e.count - Se.trailingRows && le + e.sizeOf(we.row) > he - Se.trailingVisibleHeight, bt = rt.current && le === vt && Ne === pt && !ht && !De && !mt && !Gt;
3567
3568
  bt !== Tt.current && (Tt.current = bt, bt ? xe.setAttribute("data-aqsp-editing", "") : xe.removeAttribute("data-aqsp-editing"));
3568
3569
  }
@@ -3704,7 +3705,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3704
3705
  j ? /* @__PURE__ */ ee("div", { ref: M, className: "aqsp-autofill-handle", "data-aqsp-autofill-handle": "", style: { display: "none" } }) : null
3705
3706
  ] })
3706
3707
  );
3707
- }, ow = ({ ctx: e, labels: t }) => {
3708
+ }, sw = ({ ctx: e, labels: t }) => {
3708
3709
  const [n, r] = Ue(""), o = e.cellReadOnly === !0, s = Rn(), i = E(!1), l = (m) => {
3709
3710
  i.current = !0;
3710
3711
  try {
@@ -3751,7 +3752,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3751
3752
  /* @__PURE__ */ ee("button", { type: "button", className: "aqsp-popover-button", "data-aqsp-popover-close": "", "aria-label": Re(t, "popoverClose"), onClick: () => l(e.close), children: "×" })
3752
3753
  ] })
3753
3754
  ] });
3754
- }, sw = ({ ctx: e, labels: t }) => {
3755
+ }, iw = ({ ctx: e, labels: t }) => {
3755
3756
  const [n, r] = Ue(e.current.text), [o, s] = Ue(e.current.url === void 0 ? "" : e.current.url), i = e.cellReadOnly === !0, l = Rn(), c = E(!1), a = o.trim() === "" ? null : _n(o), p = o.trim() !== "" && a === null, m = (j) => {
3756
3757
  c.current = !0;
3757
3758
  try {
@@ -3786,7 +3787,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3786
3787
  /* @__PURE__ */ ee("button", { type: "button", className: "aqsp-popover-button", "data-aqsp-popover-close": "", "aria-label": Re(t, "popoverClose"), onClick: () => m(e.close), children: "×" })
3787
3788
  ] })
3788
3789
  ] });
3789
- }, Lo = 500, iw = ({ ctx: e, labels: t }) => {
3790
+ }, Lo = 500, lw = ({ ctx: e, labels: t }) => {
3790
3791
  const [n, r] = Ue(e.typed), [o, s] = Ue(0), i = Rn(), l = E(!1), c = Fe(() => {
3791
3792
  const Q = n.toLowerCase();
3792
3793
  return e.current.filter((A) => A.toLowerCase().startsWith(Q));
@@ -3867,11 +3868,11 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3867
3868
  ] })
3868
3869
  ] })
3869
3870
  );
3870
- }, lw = ({ ctx: e, labels: t }) => /* @__PURE__ */ Te("div", { className: "aqsp-popover-message", "data-aqsp-popover": "message", "data-aqsp-popover-rejected": e.current.rejected ? "" : void 0, role: "status", children: [
3871
+ }, cw = ({ ctx: e, labels: t }) => /* @__PURE__ */ Te("div", { className: "aqsp-popover-message", "data-aqsp-popover": "message", "data-aqsp-popover-rejected": e.current.rejected ? "" : void 0, role: "status", children: [
3871
3872
  /* @__PURE__ */ ee("div", { className: "aqsp-popover-title", "data-aqsp-popover-title": "", children: e.current.title }),
3872
3873
  /* @__PURE__ */ ee("p", { className: "aqsp-popover-message-text", "data-aqsp-popover-message-text": "", children: e.current.message }),
3873
3874
  /* @__PURE__ */ ee("button", { type: "button", className: "aqsp-popover-button", "data-aqsp-popover-close": "", "aria-label": Re(t, "popoverClose"), onClick: e.close, children: "×" })
3874
- ] }), cw = ({ ctx: e, labels: t }) => {
3875
+ ] }), aw = ({ ctx: e, labels: t }) => {
3875
3876
  const n = e.current === void 0 ? "" : e.current, [r, o] = Ue(n), s = e.cellReadOnly === !0, i = Rn(), l = Rn(), c = E(!1), a = (M) => {
3876
3877
  c.current = !0;
3877
3878
  try {
@@ -3901,7 +3902,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3901
3902
  /* @__PURE__ */ ee("button", { type: "button", className: "aqsp-popover-button", "data-aqsp-popover-close": "", "aria-label": Re(t, "popoverClose"), onClick: () => a(e.close), children: "×" })
3902
3903
  ] })
3903
3904
  ] });
3904
- }, aw = ({ ctx: e }) => /* @__PURE__ */ ee("div", { className: "aqsp-popover-note-tip", "data-aqsp-popover": "note-tip", role: "tooltip", children: e.current }), tn = (e) => Object.freeze({
3905
+ }, uw = ({ ctx: e }) => /* @__PURE__ */ ee("div", { className: "aqsp-popover-note-tip", "data-aqsp-popover": "note-tip", role: "tooltip", children: e.current }), tn = (e) => Object.freeze({
3905
3906
  text: e.includes("text"),
3906
3907
  formula: e.includes("formula"),
3907
3908
  format: e.includes("format"),
@@ -3922,7 +3923,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3922
3923
  validation: tn(["validation"]),
3923
3924
  conditionalFormats: tn(["cf"]),
3924
3925
  commentsAndNotes: tn(["note", "comments"])
3925
- }), zc = Object.freeze({ mode: "all" }), ni = Object.freeze({ t: "" }), Nc = Object.freeze({ row: 1 << 30, col: 1 << 30 }), uw = Object.freeze({ add: "+", subtract: "-", multiply: "*", divide: "/" }), dw = (e) => e.t === "" && e.f === void 0, fw = (e) => e.length > 1 && e.startsWith("="), pw = (e, t, n) => {
3926
+ }), zc = Object.freeze({ mode: "all" }), ni = Object.freeze({ t: "" }), Nc = Object.freeze({ row: 1 << 30, col: 1 << 30 }), dw = Object.freeze({ add: "+", subtract: "-", multiply: "*", divide: "/" }), fw = (e) => e.t === "" && e.f === void 0, pw = (e) => e.length > 1 && e.startsWith("="), hw = (e, t, n) => {
3926
3927
  switch (n) {
3927
3928
  case "add":
3928
3929
  return e + t;
@@ -3933,11 +3934,11 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3933
3934
  case "divide":
3934
3935
  return e / t;
3935
3936
  }
3936
- }, Dc = (e) => Number.isFinite(e) ? String(Number(e.toPrecision(15))) : null, hw = (e, t, n, r) => {
3937
- const o = fw(e), s = e === "" ? "0" : At(e);
3937
+ }, Dc = (e) => Number.isFinite(e) ? String(Number(e.toPrecision(15))) : null, mw = (e, t, n, r) => {
3938
+ const o = pw(e), s = e === "" ? "0" : At(e);
3938
3939
  if (!o && s === null)
3939
3940
  return null;
3940
- const i = uw[n];
3941
+ const i = dw[n];
3941
3942
  if (t.f !== void 0) {
3942
3943
  const a = Wo(t.f, r), p = a.startsWith("=") ? a.slice(1) : a;
3943
3944
  return `=(${o ? e.slice(1) : s})${i}(${p})`;
@@ -3948,8 +3949,8 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3948
3949
  if (l === null)
3949
3950
  return null;
3950
3951
  const c = Number(l);
3951
- return n === "divide" && c === 0 ? null : o ? `=(${e.slice(1)})${i}(${l})` : Dc(pw(Number(s), c, n));
3952
- }, Fc = (e) => ({ row: e.col, col: e.row, absRow: !1, absCol: !1 }), mw = (e) => {
3952
+ return n === "divide" && c === 0 ? null : o ? `=(${e.slice(1)})${i}(${l})` : Dc(hw(Number(s), c, n));
3953
+ }, Fc = (e) => ({ row: e.col, col: e.row, absRow: !1, absCol: !1 }), gw = (e) => {
3953
3954
  switch (e.kind) {
3954
3955
  case "cell":
3955
3956
  return e.absRow || e.absCol ? e : { ...e, row: e.col, col: e.row };
@@ -3960,28 +3961,28 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3960
3961
  case "row":
3961
3962
  return e.start.abs || e.end.abs ? e : { ...e, kind: "column", start: { col: e.start.row, abs: !1 }, end: { col: e.end.row, abs: !1 } };
3962
3963
  }
3963
- }, gw = (e) => {
3964
+ }, ww = (e) => {
3964
3965
  const t = Wo(e, Nc), n = Wr(t);
3965
3966
  let r = "", o = 0, s = !1;
3966
3967
  for (const i of n) {
3967
- const l = mw(i.token);
3968
+ const l = gw(i.token);
3968
3969
  l !== i.token && (r += `${t.slice(o, i.start)}${wn(l)}`, o = i.end, s = !0);
3969
3970
  }
3970
3971
  return s ? Ci(`${r}${t.slice(o)}`, Nc) : e;
3971
- }, ww = (e, t, n) => {
3972
+ }, yw = (e, t, n) => {
3972
3973
  const r = e.cells[t];
3973
3974
  if (r === void 0)
3974
3975
  return ni;
3975
3976
  const o = r[n];
3976
3977
  return o === void 0 ? ni : o;
3977
- }, yw = (e) => {
3978
- const { rows: t, cols: n } = e, r = ja(gw);
3978
+ }, Cw = (e) => {
3979
+ const { rows: t, cols: n } = e, r = ja(ww);
3979
3980
  let o = t === 1 && n === 1 && e.colWidths === void 0 && e.rowHeights === void 0 && !e.wholeRows && !e.wholeCols;
3980
3981
  const s = [];
3981
3982
  for (let l = 0; l < n; l += 1) {
3982
3983
  const c = [];
3983
3984
  for (let a = 0; a < t; a += 1) {
3984
- const p = ww(e, a, l);
3985
+ const p = yw(e, a, l);
3985
3986
  let m = p;
3986
3987
  if (p.f !== void 0) {
3987
3988
  const N = r(p.f);
@@ -3995,7 +3996,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
3995
3996
  return e;
3996
3997
  const i = e.conditionalFormats.length === 0 ? e.conditionalFormats : e.conditionalFormats.map((l) => ({ ...l, ranges: l.ranges.map((c) => ({ startRow: c.startCol, startCol: c.startRow, endRow: c.endCol, endCol: c.endRow })) }));
3997
3998
  return { v: 1, rows: n, cols: t, clipId: e.clipId, formats: e.formats, validations: e.validations, cells: s, wholeRows: !1, wholeCols: !1, conditionalFormats: i };
3998
- }, Cw = (e, t) => !t.formula && e.f !== void 0 || !t.format && e.fmt !== void 0 || !t.validation && e.val !== void 0 || !t.note && e.note !== void 0 || !t.comments && e.comments !== void 0 || !t.hyperlink && e.link !== void 0, vw = (e, t) => {
3999
+ }, vw = (e, t) => !t.formula && e.f !== void 0 || !t.format && e.fmt !== void 0 || !t.validation && e.val !== void 0 || !t.note && e.note !== void 0 || !t.comments && e.comments !== void 0 || !t.hyperlink && e.link !== void 0, bw = (e, t) => {
3999
4000
  const n = { t: e.t };
4000
4001
  return t.formula && e.f !== void 0 && (n.f = e.f), t.format && e.fmt !== void 0 && (n.fmt = e.fmt), t.validation && e.val !== void 0 && (n.val = e.val), t.note && e.note !== void 0 && (n.note = e.note), t.comments && e.comments !== void 0 && (n.comments = e.comments), t.hyperlink && e.link !== void 0 && (n.link = e.link), n;
4001
4002
  }, Lc = (e, t) => {
@@ -4005,7 +4006,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4005
4006
  let c = !1;
4006
4007
  const a = [];
4007
4008
  for (const p of l)
4008
- Cw(p, t) ? (a.push(vw(p, t)), c = !0) : a.push(p);
4009
+ vw(p, t) ? (a.push(bw(p, t)), c = !0) : a.push(p);
4009
4010
  c && (n = !0), r.push(c ? a : l);
4010
4011
  }
4011
4012
  const o = !t.format && e.formats.length > 0 ? [] : e.formats, s = !t.validation && e.validations.length > 0 ? [] : e.validations, i = !t.cf && e.conditionalFormats.length > 0 ? [] : e.conditionalFormats;
@@ -4016,7 +4017,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4016
4017
  return t;
4017
4018
  const n = e.formats.map((s) => Xt(s)), r = n.map((s) => s === void 0 || s.borders === void 0 ? s : Xt({ ...s, borders: void 0 })), o = { canonical: n, borderless: r };
4018
4019
  return qc.set(e, o), o;
4019
- }, qo = (e, t) => t === void 0 ? void 0 : e[t], bw = (e, t, n, r) => {
4020
+ }, qo = (e, t) => t === void 0 ? void 0 : e[t], Rw = (e, t, n, r) => {
4020
4021
  const o = $u(e);
4021
4022
  if (n) {
4022
4023
  const a = qo(o.canonical, t.fmt);
@@ -4027,22 +4028,22 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4027
4028
  return s === void 0 ? null : s;
4028
4029
  const c = Xt(s === void 0 ? { borders: l } : { ...s, borders: l });
4029
4030
  return c === void 0 ? null : c;
4030
- }, Rw = (e, t, n, r) => {
4031
+ }, Sw = (e, t, n, r) => {
4031
4032
  const o = t || e.f === void 0 ? e : { t: e.t };
4032
- return r !== void 0 ? hw(n.readText(), o, r, n) : o.f === void 0 ? o.t : Wo(o.f, n);
4033
+ return r !== void 0 ? mw(n.readText(), o, r, n) : o.f === void 0 ? o.t : Wo(o.f, n);
4033
4034
  }, Pc = (e, t, n, r, o) => {
4034
4035
  const s = Au[r.mode];
4035
- if (r.skipBlanks === !0 && dw(e))
4036
+ if (r.skipBlanks === !0 && fw(e))
4036
4037
  return null;
4037
4038
  const i = {};
4038
4039
  let l = !1;
4039
4040
  if (s.text) {
4040
- const c = Rw(e, s.formula && o.formula, n, r.operation);
4041
+ const c = Sw(e, s.formula && o.formula, n, r.operation);
4041
4042
  c !== null && (i.text = c, l = !0);
4042
4043
  }
4043
4044
  if (o.format) {
4044
4045
  if (s.format)
4045
- i.format = bw(t, e, s.borders, n), l = !0;
4046
+ i.format = Rw(t, e, s.borders, n), l = !0;
4046
4047
  else if (r.injectIntoEmpty === !0 && e.fmt !== void 0 && n.readText() === "") {
4047
4048
  const c = qo($u(t).canonical, e.fmt);
4048
4049
  c !== void 0 && (i.format = c, l = !0);
@@ -4059,12 +4060,12 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4059
4060
  for (const s of n.ranges)
4060
4061
  r.push({ startRow: o.row + s.startRow, startCol: o.col + s.startCol, endRow: o.row + s.endRow, endCol: o.col + s.endCol });
4061
4062
  return { ...n, ranges: r };
4062
- }), Sw = ["text/html", "text/plain"], Ew = (e, t, n) => {
4063
+ }), Ew = ["text/html", "text/plain"], kw = (e, t, n) => {
4063
4064
  if (e === 0 || t === 0)
4064
4065
  return 0;
4065
4066
  const r = Pt(n);
4066
4067
  return !(r.rows === 1 && r.cols === 1) && r.rows % e === 0 && r.cols % t === 0 ? r.rows * r.cols : e * t;
4067
- }, kw = (e) => e.mode === "all" && e.operation === void 0 && e.transpose !== !0 && e.skipBlanks !== !0, Ow = (e) => e.text || e.formula || e.format || e.borders || e.note || e.comments || e.hyperlink || e.validation, Aw = (e) => {
4068
+ }, Ow = (e) => e.mode === "all" && e.operation === void 0 && e.transpose !== !0 && e.skipBlanks !== !0, Aw = (e) => e.text || e.formula || e.format || e.borders || e.note || e.comments || e.hyperlink || e.validation, $w = (e) => {
4068
4069
  const t = Array.from(e.types), n = /* @__PURE__ */ new Map();
4069
4070
  return {
4070
4071
  types: t,
@@ -4079,15 +4080,15 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4079
4080
  }, Ic = (e) => {
4080
4081
  const t = e.clipboardData;
4081
4082
  return t ?? null;
4082
- }, $w = (e, t) => {
4083
+ }, Tw = (e, t) => {
4083
4084
  const n = Math.max(e.startRow, t.startRow), r = Math.min(e.endRow, t.endRow), o = Math.max(e.startCol, t.startCol), s = Math.min(e.endCol, t.endCol);
4084
4085
  return n > r || o > s ? null : { startRow: n, startCol: o, endRow: r, endCol: s };
4085
- }, Tw = (e, t) => {
4086
+ }, xw = (e, t) => {
4086
4087
  const n = [];
4087
4088
  for (const r of e) {
4088
4089
  const o = [];
4089
4090
  for (const i of r.ranges) {
4090
- const l = $w(i, t);
4091
+ const l = Tw(i, t);
4091
4092
  l !== null && o.push({ startRow: l.startRow - t.startRow, startCol: l.startCol - t.startCol, endRow: l.endRow - t.startRow, endCol: l.endCol - t.startCol });
4092
4093
  }
4093
4094
  if (o.length === 0)
@@ -4096,7 +4097,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4096
4097
  r.stopIfTrue !== void 0 && (s.stopIfTrue = r.stopIfTrue), n.push(s);
4097
4098
  }
4098
4099
  return n;
4099
- }, xw = (e, t, n, r, o) => {
4100
+ }, Mw = (e, t, n, r, o) => {
4100
4101
  const s = gr(e, r, o), i = { t: s.isFormula ? e.getCellText(r, o) : s.text };
4101
4102
  if (s.isFormula && (i.f = Ci(s.text, { row: r, col: o })), e.getCellFormat !== void 0) {
4102
4103
  const l = e.getCellFormat(r, o);
@@ -4123,11 +4124,11 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4123
4124
  }
4124
4125
  return i;
4125
4126
  }, Tu = (e, t) => {
4126
- const n = Aa(), r = hp(), o = [];
4127
+ const n = Aa(), r = mp(), o = [];
4127
4128
  for (let s = t.startRow; s <= t.endRow; s += 1) {
4128
4129
  const i = [];
4129
4130
  for (let l = t.startCol; l <= t.endCol; l += 1)
4130
- i.push(xw(e, n, r, s, l));
4131
+ i.push(Mw(e, n, r, s, l));
4131
4132
  o.push(i);
4132
4133
  }
4133
4134
  return {
@@ -4135,9 +4136,9 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4135
4136
  validations: r.entries,
4136
4137
  cells: o,
4137
4138
  // 能力分岐: 条件付き書式は getConditionalFormats 宣言時だけ運ぶ
4138
- conditionalFormats: e.getConditionalFormats === void 0 ? [] : Tw(e.getConditionalFormats(), t)
4139
+ conditionalFormats: e.getConditionalFormats === void 0 ? [] : xw(e.getConditionalFormats(), t)
4139
4140
  };
4140
- }, Hc = (e) => e.kind === "cut" ? { ...e.payload, ...Tu(e.sourceAdapter, e.range) } : e.payload, Mw = (e) => ({
4141
+ }, Hc = (e) => e.kind === "cut" ? { ...e.payload, ...Tu(e.sourceAdapter, e.range) } : e.payload, zw = (e) => ({
4141
4142
  v: 1,
4142
4143
  rows: e.length,
4143
4144
  cols: e[0].length,
@@ -4148,7 +4149,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4148
4149
  wholeRows: !1,
4149
4150
  wholeCols: !1,
4150
4151
  conditionalFormats: []
4151
- }), zw = (e) => {
4152
+ }), Nw = (e) => {
4152
4153
  let t = !1;
4153
4154
  const n = [];
4154
4155
  for (const r of e.cells) {
@@ -4173,17 +4174,17 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4173
4174
  o && (t = !0), n.push(o ? s : r);
4174
4175
  }
4175
4176
  return t ? { ...e, cells: n } : e;
4176
- }, Nw = (e, t, n) => {
4177
+ }, Dw = (e, t, n) => {
4177
4178
  const r = { row: e, col: t, text: "" };
4178
4179
  return n.format && (r.format = null), n.note && (r.note = null), n.comments && (r.comments = null), n.hyperlink && (r.hyperlink = null), n.validation && (r.validation = null), r;
4179
- }, Dw = (e, t, n, r, o) => {
4180
+ }, Fw = (e, t, n, r, o) => {
4180
4181
  if (e.length === 0)
4181
4182
  return null;
4182
4183
  let s = 0, i = 0;
4183
4184
  for (const l of e)
4184
4185
  s = Math.max(s, l.row + t - 1), i = Math.max(i, l.col + n - 1);
4185
4186
  return Ce({ row: e[0].row, col: e[0].col }, { row: Math.min(s, r - 1), col: Math.min(i, o - 1) });
4186
- }, Fw = (e) => {
4187
+ }, Lw = (e) => {
4187
4188
  const t = E(e);
4188
4189
  t.current = e;
4189
4190
  const n = E(null), r = E("none"), o = R(() => {
@@ -4243,8 +4244,8 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4243
4244
  if (L === "cut" && Lr(W.adapter, k))
4244
4245
  return A.preventDefault(), W.rejectReadOnly({ kind: "operation", op: "cut", cellCount: _ }), null;
4245
4246
  K.ranges.length > 1 && W.onCopyMultiRange?.();
4246
- const H = c(k), h = Ff(H), u = Ic(A);
4247
- return u !== null && (u.setData("text/plain", Ld(H.cells.map((y) => y.map((v) => v.t)))), u.setData("text/html", tm(H, h)), u.setData(zo, h)), A.preventDefault(), { payload: H, range: k };
4247
+ const H = c(k), h = Lf(H), u = Ic(A);
4248
+ return u !== null && (u.setData("text/plain", Ld(H.cells.map((y) => y.map((v) => v.t)))), u.setData("text/html", nm(H, h)), u.setData(zo, h)), A.preventDefault(), { payload: H, range: k };
4248
4249
  },
4249
4250
  [c]
4250
4251
  ), p = R((A, L) => t.current.commitPaste(A, L) !== null, []), m = R((A, L, W) => {
@@ -4293,7 +4294,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4293
4294
  readFormat: () => K.getCellFormat === void 0 ? void 0 : K.getCellFormat($.row, $.col)
4294
4295
  }, { edits: S, tiles: V } = oc(v.cells, Ce(_, _), _, K.rowCount, K.colCount, (X, g, G) => ($.row = A.range.startRow + (g - _.row), $.col = A.range.startCol + (G - _.col), Pc(X, v, $, zc, y))), w = xo(A.sourceAdapter), T = [];
4295
4296
  if (Dn([A.range], (X) => {
4296
- T.push(Nw(X.row, X.col, w));
4297
+ T.push(Dw(X.row, X.col, w));
4297
4298
  }), A.sourceAdapter === K) {
4298
4299
  if (!p([...T, ...S], { sameSheet: !0, conditionalFormats: [] }))
4299
4300
  return "rejected";
@@ -4312,20 +4313,20 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4312
4313
  [p]
4313
4314
  ), z = R(
4314
4315
  (A, L, W) => {
4315
- const K = t.current, k = K.adapter, _ = (I) => (K.onClipboardUnavailable?.(I), "rejected"), H = Uf(A, L);
4316
+ const K = t.current, k = K.adapter, _ = (I) => (K.onClipboardUnavailable?.(I), "rejected"), H = Gf(A, L);
4316
4317
  if (H === "none")
4317
4318
  return L === "menu" ? _("empty") : "empty";
4318
4319
  const h = K.getSelection(), u = h.ranges[h.ranges.length - 1], y = W.transpose === !0, v = (I, Y) => {
4319
- const U = Ew(y ? Y : I, y ? I : Y, u);
4320
+ const U = kw(y ? Y : I, y ? I : Y, u);
4320
4321
  return U > K.maxOperationCells ? (K.onOperationRejected?.("paste", U, "limit"), !0) : !1;
4321
4322
  };
4322
4323
  let $, S = null;
4323
4324
  if (H === "aqsp") {
4324
- const I = If(A, L);
4325
+ const I = Hf(A, L);
4325
4326
  if (I === null)
4326
4327
  return _("unreadable");
4327
4328
  const Y = n.current;
4328
- if (Y !== null && I.clipId === Y.clipId && (S = Y), S !== null && S.kind === "cut" && kw(W))
4329
+ if (Y !== null && I.clipId === Y.clipId && (S = Y), S !== null && S.kind === "cut" && Ow(W))
4329
4330
  return N(S, u);
4330
4331
  if (v(I.rows, I.cols))
4331
4332
  return "rejected";
@@ -4334,25 +4335,25 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4334
4335
  return K.onOperationRejected?.("paste", S.payload.rows * S.payload.cols, "bounds"), "rejected";
4335
4336
  $ = Hc(S);
4336
4337
  } else {
4337
- const U = Hf(A, L);
4338
+ const U = jf(A, L);
4338
4339
  if (U === null)
4339
4340
  return _("unreadable");
4340
4341
  if (v(U.rows, U.cols))
4341
4342
  return "rejected";
4342
- $ = zw(U);
4343
+ $ = Nw(U);
4343
4344
  }
4344
4345
  } else if (H === "tsv") {
4345
4346
  const I = A.getData("text/plain"), Y = qd(I);
4346
4347
  if (v(Y.rows, Y.cols))
4347
4348
  return "rejected";
4348
- $ = Mw(Pd(I));
4349
+ $ = zw(Pd(I));
4349
4350
  } else {
4350
- const I = A.getData("text/html"), Y = pp(I);
4351
+ const I = A.getData("text/html"), Y = hp(I);
4351
4352
  if (Y.cols === 0 && Y.rows > K.maxOperationCells)
4352
4353
  return K.onOperationRejected?.("paste", Y.rows, "limit"), "rejected";
4353
4354
  if (v(Y.rows, Y.cols))
4354
4355
  return "rejected";
4355
- const U = $m(I, H, K.formats === void 0 ? {} : { currency: K.formats.currency, locale: K.formats.locale }, K.maxOperationCells);
4356
+ const U = Tm(I, H, K.formats === void 0 ? {} : { currency: K.formats.currency, locale: K.formats.locale }, K.maxOperationCells);
4356
4357
  if (U.outcome === "none")
4357
4358
  return _("unreadable");
4358
4359
  if (U.outcome === "limit")
@@ -4361,8 +4362,8 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4361
4362
  return "rejected";
4362
4363
  $ = U.payload;
4363
4364
  }
4364
- const V = xo(k), w = Lc(y ? yw($) : $, V), T = Au[W.mode];
4365
- if (Ow(T)) {
4365
+ const V = xo(k), w = Lc(y ? Cw($) : $, V), T = Au[W.mode];
4366
+ if (Aw(T)) {
4366
4367
  const I = Zs({ rows: w.rows, cols: w.cols }, u, h.active, k.rowCount, k.colCount);
4367
4368
  if (I !== null && Lr(k, I))
4368
4369
  return K.rejectReadOnly({ kind: "operation", op: "paste", cellCount: Ot([I]) }), "rejected";
@@ -4372,7 +4373,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4372
4373
  col: 0,
4373
4374
  readText: () => gr(k, X.row, X.col).text,
4374
4375
  readFormat: () => k.getCellFormat === void 0 ? void 0 : k.getCellFormat(X.row, X.col)
4375
- }, { edits: g, tiles: G } = oc(w.cells, u, h.active, k.rowCount, k.colCount, (I, Y, U) => (X.row = Y, X.col = U, Pc(I, w, X, W, V))), ne = Dw(G, w.rows, w.cols, k.rowCount, k.colCount);
4376
+ }, { edits: g, tiles: G } = oc(w.cells, u, h.active, k.rowCount, k.colCount, (I, Y, U) => (X.row = Y, X.col = U, Pc(I, w, X, W, V))), ne = Fw(G, w.rows, w.cols, k.rowCount, k.colCount);
4376
4377
  if (ne === null)
4377
4378
  return "empty";
4378
4379
  if (T.cf && w.conditionalFormats.length > 0) {
@@ -4415,7 +4416,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4415
4416
  return L("empty");
4416
4417
  const k = K[0], _ = Array.from(k.types), H = /* @__PURE__ */ new Map();
4417
4418
  try {
4418
- for (const y of Sw)
4419
+ for (const y of Ew)
4419
4420
  _.includes(y) && H.set(y, await (await k.getType(y)).text());
4420
4421
  } catch {
4421
4422
  return L("unreadable");
@@ -4466,7 +4467,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4466
4467
  const y = Ic(_);
4467
4468
  if (y === null)
4468
4469
  return;
4469
- const v = z(Aw(y), "event", h);
4470
+ const v = z($w(y), "event", h);
4470
4471
  H.onPasteResolved?.(v, "event");
4471
4472
  };
4472
4473
  return A.addEventListener("copy", W), A.addEventListener("cut", K), A.addEventListener("paste", k), () => {
@@ -4508,11 +4509,11 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4508
4509
  n = r === "0" ? "0" : `${r}e${e.exponent + t}`;
4509
4510
  }
4510
4511
  return At(n) === null ? null : n;
4511
- }, Lw = (e, t) => {
4512
+ }, qw = (e, t) => {
4512
4513
  xu(t);
4513
4514
  const n = At(e);
4514
4515
  return n === null ? null : zu(Mu(n), t);
4515
- }, qw = (e) => {
4516
+ }, Pw = (e) => {
4516
4517
  const t = At(e);
4517
4518
  if (t !== null) {
4518
4519
  const r = Mu(t);
@@ -4524,7 +4525,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4524
4525
  if (!e.startsWith("=") || e.length === 1)
4525
4526
  throw new RangeError(`[spreadsheet] self-calc expects a formula ("=" followed by a body); got ${JSON.stringify(e)}`);
4526
4527
  return e.slice(1);
4527
- }, Pw = (e) => {
4528
+ }, _w = (e) => {
4528
4529
  let t = 0, n = null;
4529
4530
  for (let r = 0; r < e.length; r++) {
4530
4531
  const o = e[r];
@@ -4544,12 +4545,12 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4544
4545
  if (e.length <= t.length + n.length || !e.startsWith(t) || !e.endsWith(n))
4545
4546
  return null;
4546
4547
  const r = e.slice(t.length, e.length - n.length);
4547
- return Pw(r) ? r : null;
4548
- }, _w = (e, t) => {
4548
+ return _w(r) ? r : null;
4549
+ }, Iw = (e, t) => {
4549
4550
  xu(t);
4550
4551
  const n = Nu(e), r = Math.abs(t) === 2 ? "100" : "1000", o = t > 0 ? "*" : "/", s = t > 0 ? "/" : "*", i = Du(n, "(", `)${s}${r}`);
4551
4552
  return i === null ? `=(${n})${o}${r}` : `=${i}`;
4552
- }, Iw = (e) => {
4553
+ }, Hw = (e) => {
4553
4554
  const t = Nu(e), n = Du(t, "-(", ")");
4554
4555
  return n === null ? `=-(${t})` : `=${n}`;
4555
4556
  }, zr = (e, t, n, r) => {
@@ -4631,23 +4632,23 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4631
4632
  toggleColumnHighlight: { kind: "highlight", target: "column" },
4632
4633
  toggleBothHighlight: { kind: "highlight", target: "both" },
4633
4634
  toggleIntersectionHighlight: { kind: "highlight", target: "intersection" }
4634
- }, Hw = { down: "fillDown", right: "fillRight", selection: "fillSelection" }, jw = { value: null, align: null, verticalAlign: null, wrap: null, background: null, color: null, bold: null, italic: null, underline: null, strikethrough: null, fontFamily: null, fontSize: null, borders: null }, Hr = (e) => e < 10 ? `0${e}` : String(e), Bw = (e) => {
4635
+ }, jw = { down: "fillDown", right: "fillRight", selection: "fillSelection" }, Bw = { value: null, align: null, verticalAlign: null, wrap: null, background: null, color: null, bold: null, italic: null, underline: null, strikethrough: null, fontFamily: null, fontSize: null, borders: null }, Hr = (e) => e < 10 ? `0${e}` : String(e), Vw = (e) => {
4635
4636
  const t = new Date(e);
4636
4637
  return `${t.getFullYear()}-${Hr(t.getMonth() + 1)}-${Hr(t.getDate())}`;
4637
- }, Vw = (e) => {
4638
+ }, Ww = (e) => {
4638
4639
  const t = new Date(e);
4639
4640
  return `${Hr(t.getHours())}:${Hr(t.getMinutes())}:${Hr(t.getSeconds())}`;
4640
- }, Ww = (e, t) => (e.row === t.startRow ? 1 : 0) | (e.col === t.endCol ? 2 : 0) | (e.row === t.endRow ? 4 : 0) | (e.col === t.startCol ? 8 : 0), Kw = (e, t) => ({
4641
+ }, Kw = (e, t) => (e.row === t.startRow ? 1 : 0) | (e.col === t.endCol ? 2 : 0) | (e.row === t.endRow ? 4 : 0) | (e.col === t.startCol ? 8 : 0), Yw = (e, t) => ({
4641
4642
  ...(e & 1) !== 0 ? { top: t } : {},
4642
4643
  ...(e & 2) !== 0 ? { right: t } : {},
4643
4644
  ...(e & 4) !== 0 ? { bottom: t } : {},
4644
4645
  ...(e & 8) !== 0 ? { left: t } : {}
4645
- }), Yw = (e) => e === void 0 || e.borders === void 0 ? {} : e.borders, Xw = { top: 1, right: 2, bottom: 4, left: 8 }, Uw = { style: "thin", color: ua }, Gw = (e, t) => {
4646
+ }), Xw = (e) => e === void 0 || e.borders === void 0 ? {} : e.borders, Uw = { top: 1, right: 2, bottom: 4, left: 8 }, Gw = { style: "thin", color: ua }, Jw = (e, t) => {
4646
4647
  if (e === void 0)
4647
4648
  return !1;
4648
4649
  const n = ut(e);
4649
4650
  return n !== null && n === ut(t);
4650
- }, Jw = (e, t) => {
4651
+ }, Zw = (e, t) => {
4651
4652
  const n = t === void 0 || t.locale === void 0 ? {} : { locale: t.locale };
4652
4653
  switch (e) {
4653
4654
  case "number":
@@ -4665,7 +4666,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4665
4666
  default:
4666
4667
  return { type: "scientific", decimals: 2, ...n };
4667
4668
  }
4668
- }, Zw = (e) => {
4669
+ }, Qw = (e) => {
4669
4670
  const t = E(e);
4670
4671
  t.current = e;
4671
4672
  const n = R(() => {
@@ -4701,15 +4702,15 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4701
4702
  const y = t.current;
4702
4703
  y.formatCommandAnnouncement !== void 0 && y.announce(y.formatCommandAnnouncement({ command: h, state: u }));
4703
4704
  }, []), l = R(
4704
- (h, u = Uw) => {
4705
+ (h, u = Gw) => {
4705
4706
  if (h === "clear")
4706
4707
  return s({ borders: null });
4707
4708
  if (h === "all")
4708
4709
  return s({ borders: { top: u, right: u, bottom: u, left: u } });
4709
- const y = h === "outer" ? 15 : Xw[h];
4710
+ const y = h === "outer" ? 15 : Uw[h];
4710
4711
  return o((v, $, S) => {
4711
- const V = Ww(v, $) & y;
4712
- return { bucket: V, patch: { borders: { ...Yw(S), ...Kw(V, u) } } };
4712
+ const V = Kw(v, $) & y;
4713
+ return { bucket: V, patch: { borders: { ...Xw(S), ...Yw(V, u) } } };
4713
4714
  });
4714
4715
  },
4715
4716
  [s, o]
@@ -4729,7 +4730,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4729
4730
  (X.row !== w.row || X.col !== w.col) && T.push(X);
4730
4731
  }), v.push({ source: w, targets: T }), $.push(Ce(w, w));
4731
4732
  for (const X of y.ranges)
4732
- S.push(...Tm(X, w));
4733
+ S.push(...xm(X, w));
4733
4734
  } else
4734
4735
  for (const w of y.ranges)
4735
4736
  if (h === "down") {
@@ -4760,7 +4761,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4760
4761
  for (const w of v)
4761
4762
  for (const T of w.targets)
4762
4763
  if (lt(u.adapter, T.row, T.col))
4763
- return u.rejectReadOnly({ kind: "operation", op: "fill", cellCount: Ot(S), gesture: Hw[h], sources: $, targets: S }), !1;
4764
+ return u.rejectReadOnly({ kind: "operation", op: "fill", cellCount: Ot(S), gesture: jw[h], sources: $, targets: S }), !1;
4764
4765
  const V = [];
4765
4766
  for (const w of v)
4766
4767
  c(w.source, w.targets, V);
@@ -4916,22 +4917,22 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4916
4917
  case "patch":
4917
4918
  return s(y.patch) ? (i(h, null), !0) : !1;
4918
4919
  case "clear":
4919
- return s(jw) ? (i(h, null), !0) : !1;
4920
+ return s(Bw) ? (i(h, null), !0) : !1;
4920
4921
  case "value":
4921
- return s({ value: Jw(y.value, u.formats) }) ? (i(h, null), !0) : !1;
4922
+ return s({ value: Zw(y.value, u.formats) }) ? (i(h, null), !0) : !1;
4922
4923
  case "borders":
4923
4924
  return l(y.preset) ? (i(h, null), !0) : !1;
4924
4925
  case "color": {
4925
4926
  const $ = y.key === "background" ? u.colors.fill : u.colors.font, S = y.preset !== null ? y.preset : y.custom !== null && y.custom < $.length ? $[y.custom] : void 0;
4926
4927
  if (S === void 0)
4927
4928
  return !1;
4928
- const V = r(), w = Gw(V === void 0 ? void 0 : V[y.key], S);
4929
+ const V = r(), w = Jw(V === void 0 ? void 0 : V[y.key], S);
4929
4930
  return s({ [y.key]: w ? null : S }) ? (i(h, !w), !0) : !1;
4930
4931
  }
4931
4932
  case "calc":
4932
- return m({ text: ($) => Lw($, y.exponent), formula: ($) => _w($, y.exponent) });
4933
+ return m({ text: ($) => qw($, y.exponent), formula: ($) => Iw($, y.exponent) });
4933
4934
  case "sign":
4934
- return m({ text: qw, formula: Iw });
4935
+ return m({ text: Pw, formula: Hw });
4935
4936
  case "fill":
4936
4937
  return v && y.direction === "selection" ? p() : a(y.direction);
4937
4938
  case "popover":
@@ -4948,7 +4949,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
4948
4949
  case "paste":
4949
4950
  return u.paste(y.options), !0;
4950
4951
  case "insertNow": {
4951
- const $ = y.unit === "date" ? Bw(u.now()) : Vw(u.now());
4952
+ const $ = y.unit === "date" ? Vw(u.now()) : Ww(u.now());
4952
4953
  if (v)
4953
4954
  return u.insertAtCaret($), !0;
4954
4955
  const S = u.getActive();
@@ -5052,12 +5053,12 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5052
5053
  [l]
5053
5054
  );
5054
5055
  return Fe(() => ({ executeCommand: Q, applyFormat: _, setBorders: H, setHyperlink: L, setNote: W, addComment: K, setValidation: k, isCommandAvailable: M }), [Q, _, H, L, W, K, k, M]);
5055
- }, vo = "data-aqsp-pointing", Qw = (e, t) => {
5056
+ }, vo = "data-aqsp-pointing", e0 = (e, t) => {
5056
5057
  const n = Ka(e, t);
5057
5058
  return n !== null && "insertAt" in n;
5058
- }, e0 = (e, t) => {
5059
+ }, t0 = (e, t) => {
5059
5060
  Object.assign(e.style, Object.fromEntries(t.map((n) => [n, ""])));
5060
- }, t0 = (e) => {
5061
+ }, n0 = (e) => {
5061
5062
  const t = E(e);
5062
5063
  t.current = e;
5063
5064
  const n = E(null), [r, o] = Ue(!1), s = E(!1), i = E(!1), l = E(!1), c = E(null), a = E(rn), p = R(() => {
@@ -5079,7 +5080,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5079
5080
  const g = X.resolveEditPaint(T), G = g === null ? rn : g;
5080
5081
  G !== rn && Object.assign(w.style, G.style), a.current = G, X.editPaintRef !== void 0 && (X.editPaintRef.current = G);
5081
5082
  }, []), z = R((w) => {
5082
- e0(w, Object.keys(a.current.style)), a.current = rn;
5083
+ t0(w, Object.keys(a.current.style)), a.current = rn;
5083
5084
  const T = t.current.editPaintRef;
5084
5085
  T !== void 0 && (T.current = rn);
5085
5086
  }, []), M = R(
@@ -5186,7 +5187,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5186
5187
  const X = p();
5187
5188
  if (X === null)
5188
5189
  return;
5189
- const g = Yp(w, T), { sink: G } = X, [ne, d] = "replace" in X.target ? X.target.replace : [X.target.insertAt, X.target.insertAt], C = G.value;
5190
+ const g = Xp(w, T), { sink: G } = X, [ne, d] = "replace" in X.target ? X.target.replace : [X.target.insertAt, X.target.insertAt], C = G.value;
5190
5191
  G.value = `${C.slice(0, ne)}${g}${C.slice(d)}`;
5191
5192
  const b = ne + g.length;
5192
5193
  G.setSelectionRange(b, b), "row" in w && (c.current = { row: w.row, col: w.col }), m();
@@ -5205,7 +5206,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5205
5206
  const w = t.current, T = w.sinkRef.current;
5206
5207
  if (w.adapter.getCellFormula === void 0 || n.current === null || T === null)
5207
5208
  return !1;
5208
- const X = oh(T.value, T.selectionStart);
5209
+ const X = sh(T.value, T.selectionStart);
5209
5210
  return X === null ? !1 : (T.value = X.text, T.setSelectionRange(X.caret, X.caret), m(), !0);
5210
5211
  }, [m]), h = R(
5211
5212
  (w) => {
@@ -5241,7 +5242,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5241
5242
  b !== null && I instanceof Node && b.contains(I) || M({ rearm: !1, commit: !0, onReject: "discard" });
5242
5243
  }, G = () => {
5243
5244
  const d = t.current;
5244
- c.current = null, d.adapter.getCellFormula !== void 0 && n.current !== null && !l.current && Qw(w.value, w.selectionStart) && (l.current = !0), m();
5245
+ c.current = null, d.adapter.getCellFormula !== void 0 && n.current !== null && !l.current && e0(w.value, w.selectionStart) && (l.current = !0), m();
5245
5246
  }, ne = () => {
5246
5247
  n.current !== null && m();
5247
5248
  };
@@ -5273,7 +5274,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5273
5274
  }),
5274
5275
  [Q, Z, j, A, L, W, K, k, _, H, h, u, y, v, $, r]
5275
5276
  );
5276
- }, n0 = (e, t, n) => {
5277
+ }, r0 = (e, t, n) => {
5277
5278
  const r = new jd(e, t);
5278
5279
  let o = 0;
5279
5280
  if (n)
@@ -5282,8 +5283,8 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5282
5283
  i !== t && r.update(s, i), i === 0 && (o += 1);
5283
5284
  }
5284
5285
  return { tree: r, initialHidden: o };
5285
- }, r0 = (e, t, n) => {
5286
- const { tree: r, initialHidden: o } = n0(e, t, n);
5286
+ }, o0 = (e, t, n) => {
5287
+ const { tree: r, initialHidden: o } = r0(e, t, n);
5287
5288
  let s = o;
5288
5289
  const c = {
5289
5290
  count: e,
@@ -5327,16 +5328,16 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5327
5328
  if (!(Number.isInteger(t) && t > 0))
5328
5329
  throw new TypeError(`[spreadsheet] useAxisModel requires a positive integer defaultSize, received ${t}`);
5329
5330
  const r = E(n).current, o = E(null), s = `${e}:${t}`;
5330
- return (o.current === null || o.current.key !== s) && (o.current = r0(e, t, r)), o.current.model;
5331
- }, fr = 256, Ns = 256, o0 = 2 ** 32, s0 = 4096, Fu = Object.freeze([]), Lu = ["background", "color", "bold", "italic", "underline", "strikethrough"], qu = (e, t) => {
5331
+ return (o.current === null || o.current.key !== s) && (o.current = o0(e, t, r)), o.current.model;
5332
+ }, fr = 256, Ns = 256, s0 = 2 ** 32, i0 = 4096, Fu = Object.freeze([]), Lu = ["background", "color", "bold", "italic", "underline", "strikethrough"], qu = (e, t) => {
5332
5333
  if (!Array.isArray(e))
5333
5334
  throw new RangeError(`[spreadsheet] ${t} requires an array of conditional-format rules, received ${typeof e}`);
5334
- }, bn = (e, t, n) => (e.size >= s0 && e.clear(), e.set(t, n), n), Pu = (e) => (qu(e, "buildCfIndex"), { rules: e, buckets: /* @__PURE__ */ new Map(), columns: /* @__PURE__ */ new Map() }), _u = (e, t, n, r, o) => {
5335
+ }, bn = (e, t, n) => (e.size >= i0 && e.clear(), e.set(t, n), n), Pu = (e) => (qu(e, "buildCfIndex"), { rules: e, buckets: /* @__PURE__ */ new Map(), columns: /* @__PURE__ */ new Map() }), _u = (e, t, n, r, o) => {
5335
5336
  for (const s of e)
5336
5337
  if (s.startRow <= n && s.endRow >= t && s.startCol <= o && s.endCol >= r)
5337
5338
  return !0;
5338
5339
  return !1;
5339
- }, i0 = (e, t, n) => {
5340
+ }, l0 = (e, t, n) => {
5340
5341
  const r = Math.floor(t / fr), o = Math.floor(n / Ns), s = r * 65536 + o, i = e.buckets.get(s);
5341
5342
  if (i !== void 0)
5342
5343
  return i;
@@ -5344,15 +5345,15 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5344
5345
  for (const p of e.rules)
5345
5346
  _u(p.ranges, l, l + fr - 1, c, c + Ns - 1) && a.push(p);
5346
5347
  return bn(e.buckets, s, a.length === 0 ? Fu : a);
5347
- }, l0 = (e, t, n) => {
5348
- const r = Math.floor(t / fr), o = r * o0 + n, s = e.columns.get(o);
5348
+ }, c0 = (e, t, n) => {
5349
+ const r = Math.floor(t / fr), o = r * s0 + n, s = e.columns.get(o);
5349
5350
  if (s !== void 0)
5350
5351
  return s;
5351
- const i = i0(e, t, n), l = r * fr, c = [];
5352
+ const i = l0(e, t, n), l = r * fr, c = [];
5352
5353
  for (const a of i)
5353
5354
  _u(a.ranges, l, l + fr - 1, n, n) && c.push(a);
5354
5355
  return bn(e.columns, o, c.length === 0 ? Fu : c);
5355
- }, c0 = (e, t) => {
5356
+ }, a0 = (e, t) => {
5356
5357
  for (const n of e)
5357
5358
  if (sn(n, t))
5358
5359
  return !0;
@@ -5378,7 +5379,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5378
5379
  default:
5379
5380
  return !1;
5380
5381
  }
5381
- }, Kc = /* @__PURE__ */ new WeakMap(), ri = (e) => e === null ? null : Number(e), a0 = (e) => {
5382
+ }, Kc = /* @__PURE__ */ new WeakMap(), ri = (e) => e === null ? null : Number(e), u0 = (e) => {
5382
5383
  const t = Kc.get(e);
5383
5384
  if (t !== void 0)
5384
5385
  return t;
@@ -5387,13 +5388,13 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5387
5388
  }, Iu = (e, t, n) => {
5388
5389
  const r = `${t.row}\0${t.col}`, o = e.numbers.get(r);
5389
5390
  return o !== void 0 ? o : bn(e.numbers, r, ri(At(n())));
5390
- }, u0 = (e, t, n, r) => {
5391
- const o = e.op === "between" || e.op === "notBetween", s = a0(e), i = Iu(r, t, n), l = o ? s.b : null;
5391
+ }, d0 = (e, t, n, r) => {
5392
+ const o = e.op === "between" || e.op === "notBetween", s = u0(e), i = Iu(r, t, n), l = o ? s.b : null;
5392
5393
  if (i !== null && s.a !== null && (!o || l !== null))
5393
5394
  return Wc(e.op, bo(i, s.a), l === null ? null : bo(i, l));
5394
5395
  const c = n(), a = e.b;
5395
5396
  return Wc(e.op, bo(c, e.a), a === void 0 ? null : bo(c, a));
5396
- }, d0 = (e, t) => {
5397
+ }, f0 = (e, t) => {
5397
5398
  switch (e.op) {
5398
5399
  case "contains":
5399
5400
  return t.includes(e.value);
@@ -5415,7 +5416,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5415
5416
  }, Ro = (e) => e.toString(16).padStart(2, "0"), Fs = (e, t, n) => {
5416
5417
  const r = (i) => Math.round(e[i] + (t[i] - e[i]) * n), o = `#${Ro(r(0))}${Ro(r(1))}${Ro(r(2))}`, s = r(3);
5417
5418
  return s === 255 ? o : `${o}${Ro(s)}`;
5418
- }, Ls = (e, t, n) => t === n ? e <= t ? 0 : 1 : Math.min(1, Math.max(0, (e - t) / (n - t))), f0 = (e, t, n, r, o) => {
5419
+ }, Ls = (e, t, n) => t === n ? e <= t ? 0 : 1 : Math.min(1, Math.max(0, (e - t) / (n - t))), p0 = (e, t, n, r, o) => {
5419
5420
  let s = t.value === void 0 ? o.min : t.value, i = r.value === void 0 ? o.max : r.value, l = Ds(t.color), c = Ds(r.color);
5420
5421
  const a = n === void 0 ? void 0 : Ds(n.color);
5421
5422
  if (!(Number.isFinite(e) && Number.isFinite(s) && Number.isFinite(i)) || l === null || c === null || a === null)
@@ -5432,7 +5433,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5432
5433
  return e <= m ? Fs(l, a, Ls(e, s, m)) : Fs(a, c, Ls(e, m, i));
5433
5434
  }
5434
5435
  return Fs(l, c, Ls(e, s, i));
5435
- }, p0 = (e, t, n, r) => {
5436
+ }, h0 = (e, t, n, r) => {
5436
5437
  const o = r.extrema.get(e.id);
5437
5438
  if (o !== void 0)
5438
5439
  return o;
@@ -5449,59 +5450,59 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5449
5450
  l = Math.min(l, p.min), c = Math.max(c, p.max);
5450
5451
  }
5451
5452
  return bn(r.extrema, e.id, { min: l, max: c });
5452
- }, h0 = (e, t, n, r, o, s) => {
5453
+ }, m0 = (e, t, n, r, o, s) => {
5453
5454
  const i = Iu(s, n, r);
5454
5455
  if (i === null)
5455
5456
  return null;
5456
- const l = p0(e, t, o, s);
5457
- return l === null ? null : f0(i, t.min, t.mid, t.max, l);
5458
- }, m0 = (e, t, n, r, o) => {
5457
+ const l = h0(e, t, o, s);
5458
+ return l === null ? null : p0(i, t.min, t.mid, t.max, l);
5459
+ }, g0 = (e, t, n, r, o) => {
5459
5460
  if (r.evaluateFormula === void 0)
5460
5461
  return !1;
5461
5462
  const s = `${e.id}\0${n.row}\0${n.col}`, i = o.formulas.get(s), l = i !== void 0 ? i : bn(o.formulas, s, r.evaluateFormula(t.formula, n));
5462
5463
  return l === !0 || typeof l == "number" && Number.isFinite(l) && l !== 0;
5463
- }, g0 = (e, t, n, r, o) => {
5464
+ }, w0 = (e, t, n, r, o) => {
5464
5465
  const s = e.condition;
5465
5466
  switch (s.type) {
5466
5467
  case "cellValue":
5467
- return u0(s, t, n, o) ? e.style : null;
5468
+ return d0(s, t, n, o) ? e.style : null;
5468
5469
  case "text":
5469
- return d0(s, n()) ? e.style : null;
5470
+ return f0(s, n()) ? e.style : null;
5470
5471
  case "empty":
5471
5472
  return n() === "" ? e.style : null;
5472
5473
  case "notEmpty":
5473
5474
  return n() !== "" ? e.style : null;
5474
5475
  case "colorScale": {
5475
- const i = h0(e, s, t, n, r, o);
5476
+ const i = m0(e, s, t, n, r, o);
5476
5477
  return i === null ? null : { ...e.style, background: i };
5477
5478
  }
5478
5479
  case "customFormula":
5479
- return m0(e, s, t, r, o) ? e.style : null;
5480
+ return g0(e, s, t, r, o) ? e.style : null;
5480
5481
  default:
5481
5482
  return null;
5482
5483
  }
5483
- }, Yc = (e, t) => ma(e, t), w0 = (e, t, n) => {
5484
+ }, Yc = (e, t) => ma(e, t), y0 = (e, t, n) => {
5484
5485
  e[t] = n;
5485
- }, y0 = (e, t) => {
5486
+ }, C0 = (e, t) => {
5486
5487
  let n = e;
5487
5488
  for (const r of Lu)
5488
- e[r] === void 0 && t[r] !== void 0 && (n === e && (n = { ...e }), w0(n, r, t[r]));
5489
+ e[r] === void 0 && t[r] !== void 0 && (n === e && (n = { ...e }), y0(n, r, t[r]));
5489
5490
  return n;
5490
- }, C0 = (e) => {
5491
+ }, v0 = (e) => {
5491
5492
  let t = "";
5492
5493
  for (const n of Lu) {
5493
5494
  const r = e[n];
5494
5495
  t += r === void 0 ? "" : typeof r == "boolean" ? r ? "t" : "f" : `s${r.length}:${r}`, t += "\0";
5495
5496
  }
5496
5497
  return t;
5497
- }, Xc = /* @__PURE__ */ new WeakMap(), v0 = Object.freeze({}), b0 = (e) => {
5498
- const t = e === void 0 ? v0 : e, n = Xc.get(t);
5498
+ }, Xc = /* @__PURE__ */ new WeakMap(), b0 = Object.freeze({}), R0 = (e) => {
5499
+ const t = e === void 0 ? b0 : e, n = Xc.get(t);
5499
5500
  if (n !== void 0)
5500
5501
  return n;
5501
5502
  const r = { byStyle: /* @__PURE__ */ new WeakMap(), byKey: /* @__PURE__ */ new Map() };
5502
5503
  return Xc.set(t, r), r;
5503
- }, R0 = (e, t, n) => {
5504
- const r = b0(e);
5504
+ }, S0 = (e, t, n) => {
5505
+ const r = R0(e);
5505
5506
  if (n) {
5506
5507
  const l = r.byStyle.get(t);
5507
5508
  if (l !== void 0)
@@ -5509,7 +5510,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5509
5510
  const c = Yc(e, t);
5510
5511
  return c !== void 0 && r.byStyle.set(t, c), c;
5511
5512
  }
5512
- const o = C0(t), s = r.byKey.get(o);
5513
+ const o = v0(t), s = r.byKey.get(o);
5513
5514
  if (s !== void 0)
5514
5515
  return s;
5515
5516
  const i = Yc(e, t);
@@ -5520,38 +5521,38 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5520
5521
  const i = e.getCellFormat(r, o);
5521
5522
  if (t === null)
5522
5523
  return i;
5523
- const l = l0(t, r, o);
5524
+ const l = c0(t, r, o);
5524
5525
  if (l.length === 0)
5525
5526
  return i;
5526
5527
  const c = { row: r, col: o };
5527
5528
  let a = null, p = !0;
5528
5529
  for (const m of l) {
5529
- if (!c0(m.ranges, c))
5530
+ if (!a0(m.ranges, c))
5530
5531
  continue;
5531
- const N = g0(m, c, s, e, n);
5532
+ const N = w0(m, c, s, e, n);
5532
5533
  if (N !== null) {
5533
5534
  if (N !== m.style && (p = !1), a === null)
5534
5535
  a = N;
5535
5536
  else {
5536
- const z = y0(a, N);
5537
+ const z = C0(a, N);
5537
5538
  z !== a && (p = !1, a = z);
5538
5539
  }
5539
5540
  if (m.stopIfTrue === !0)
5540
5541
  break;
5541
5542
  }
5542
5543
  }
5543
- return a === null ? i : R0(i, a, p);
5544
- }, Uc = /* @__PURE__ */ new WeakMap(), S0 = (e) => {
5544
+ return a === null ? i : S0(i, a, p);
5545
+ }, Uc = /* @__PURE__ */ new WeakMap(), E0 = (e) => {
5545
5546
  qu(e, "widthRelevantRules");
5546
5547
  const t = Uc.get(e);
5547
5548
  if (t !== void 0)
5548
5549
  return t;
5549
5550
  const n = e.filter((o) => o.style.bold !== void 0 || o.style.italic !== void 0 || o.stopIfTrue === !0), r = n.length === e.length ? e : n;
5550
5551
  return Uc.set(e, r), r;
5551
- }, E0 = (e, t, n, r) => {
5552
+ }, k0 = (e, t, n, r) => {
5552
5553
  const o = e.trim() === "" ? t : `${e} ${t}`;
5553
5554
  return r ? `${o} (${n})` : o;
5554
- }, k0 = ({ col: e, direction: t, filtered: n, expanded: r, columnName: o, menuLabel: s, filteredLabel: i, onToggle: l }) => {
5555
+ }, O0 = ({ col: e, direction: t, filtered: n, expanded: r, columnName: o, menuLabel: s, filteredLabel: i, onToggle: l }) => {
5555
5556
  const c = E(null);
5556
5557
  return je(() => {
5557
5558
  const a = c.current;
@@ -5575,7 +5576,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5575
5576
  tabIndex: -1,
5576
5577
  "aria-haspopup": "dialog",
5577
5578
  "aria-expanded": r,
5578
- "aria-label": E0(o, s, i, n),
5579
+ "aria-label": k0(o, s, i, n),
5579
5580
  onClick: () => l(e),
5580
5581
  children: [
5581
5582
  t === null ? null : /* @__PURE__ */ ee("svg", { className: "aqsp-column-menu-glyph", "data-aqsp-glyph": t, viewBox: "0 0 10 10", width: "10", height: "10", "aria-hidden": "true", focusable: "false", children: /* @__PURE__ */ ee("path", { d: t === "asc" ? "M5 1.5 9 8.5H1Z" : "M5 8.5 1 1.5h8Z", fill: "currentColor" }) }),
@@ -5583,7 +5584,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5583
5584
  ]
5584
5585
  }
5585
5586
  );
5586
- }, O0 = ii(k0), A0 = Object.freeze({ state: !0, onStateChange: !0, getColumnKey: !0, defaults: !0, getColumnOptions: !0, getFilterValues: !0 }), Gc = Object.freeze({ sortable: !0, filterable: !0, matchModes: !0, defaultMatchMode: !0 }), $0 = Object.freeze({ sort: !0, filters: !0 }), T0 = Object.freeze({ columnKey: !0, direction: !0 }), x0 = Object.freeze({ value: !0, label: !0, count: !0 }), Hu = Object.freeze(["exact", "fuzzy"]), M0 = Object.freeze(["asc", "desc"]), He = (e) => typeof e == "string" ? JSON.stringify(e) : e == null || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? String(e) : Array.isArray(e) ? "an array" : typeof e == "function" ? "a function" : typeof e == "symbol" ? "a symbol" : "an object", yn = (e) => {
5587
+ }, A0 = ii(O0), $0 = Object.freeze({ state: !0, onStateChange: !0, getColumnKey: !0, defaults: !0, getColumnOptions: !0, getFilterValues: !0 }), Gc = Object.freeze({ sortable: !0, filterable: !0, matchModes: !0, defaultMatchMode: !0 }), T0 = Object.freeze({ sort: !0, filters: !0 }), x0 = Object.freeze({ columnKey: !0, direction: !0 }), M0 = Object.freeze({ value: !0, label: !0, count: !0 }), Hu = Object.freeze(["exact", "fuzzy"]), z0 = Object.freeze(["asc", "desc"]), He = (e) => typeof e == "string" ? JSON.stringify(e) : e == null || typeof e == "number" || typeof e == "boolean" || typeof e == "bigint" ? String(e) : Array.isArray(e) ? "an array" : typeof e == "function" ? "a function" : typeof e == "symbol" ? "a symbol" : "an object", yn = (e) => {
5587
5588
  if (typeof e != "object" || e === null || Array.isArray(e))
5588
5589
  return !1;
5589
5590
  const t = Object.getPrototypeOf(e);
@@ -5613,10 +5614,10 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5613
5614
  if (!i.has(s))
5614
5615
  throw new RangeError(`[spreadsheet] ${t}.defaultMatchMode ${He(s)} is not one of ${t}.matchModes (${[...i].map((l) => JSON.stringify(l)).join(", ")})`);
5615
5616
  return { sortable: n, filterable: r, matchModes: o, defaultMatchMode: s };
5616
- }, z0 = (e, t) => {
5617
+ }, N0 = (e, t) => {
5617
5618
  if (!yn(e))
5618
5619
  throw new RangeError(`[spreadsheet] sortFilter.state must be an object with sort and filters (got ${He(e)})`);
5619
- Cn(e, $0, "sortFilter.state");
5620
+ Cn(e, T0, "sortFilter.state");
5620
5621
  const n = (l, c) => {
5621
5622
  const a = t.get(l);
5622
5623
  if (a === void 0)
@@ -5627,11 +5628,11 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5627
5628
  if (r !== null) {
5628
5629
  if (!yn(r))
5629
5630
  throw new RangeError(`[spreadsheet] sortFilter.state.sort must be null or { columnKey, direction } (got ${He(r)})`);
5630
- Cn(r, T0, "sortFilter.state.sort");
5631
+ Cn(r, x0, "sortFilter.state.sort");
5631
5632
  const { columnKey: l, direction: c } = r;
5632
5633
  if (typeof l != "string")
5633
5634
  throw new RangeError(`[spreadsheet] sortFilter.state.sort.columnKey must be a string (got ${He(l)})`);
5634
- if (!M0.includes(c))
5635
+ if (!z0.includes(c))
5635
5636
  throw new RangeError(`[spreadsheet] sortFilter.state.sort.direction must be "asc" or "desc" (got ${He(c)})`);
5636
5637
  const { col: a, column: p } = n(l, "sortFilter.state.sort.columnKey");
5637
5638
  if (!p.sortable)
@@ -5665,13 +5666,13 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5665
5666
  i.add(a);
5666
5667
  }
5667
5668
  return { sort: o, filteredColumns: i };
5668
- }, N0 = (e, t, n) => {
5669
+ }, D0 = (e, t, n) => {
5669
5670
  const r = e;
5670
5671
  if (!yn(r))
5671
5672
  throw new RangeError(`[spreadsheet] sortFilter must be an object or absent (got ${He(r)})`);
5672
5673
  if (n < 1)
5673
5674
  throw new RangeError(`[spreadsheet] sortFilter needs headerRows of 1 or more: the sort and filter controls sit on the last header row (got headerRows ${n})`);
5674
- Cn(r, A0, "sortFilter");
5675
+ Cn(r, $0, "sortFilter");
5675
5676
  for (const z of ["onStateChange", "getColumnKey"])
5676
5677
  if (typeof r[z] != "function")
5677
5678
  throw new RangeError(`[spreadsheet] sortFilter.${z} must be a function (got ${He(r[z])})`);
@@ -5711,31 +5712,31 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5711
5712
  }
5712
5713
  if (c !== null && e.getFilterValues === void 0)
5713
5714
  throw new RangeError(`[spreadsheet] sortFilter.getFilterValues is required: column ${c.col} (${JSON.stringify(c.column.key)}) can filter by exact match`);
5714
- const { sort: p, filteredColumns: m } = z0(r.state, l), N = /* @__PURE__ */ new Map();
5715
+ const { sort: p, filteredColumns: m } = N0(r.state, l), N = /* @__PURE__ */ new Map();
5715
5716
  for (const [z, M] of l)
5716
5717
  N.set(z, M.col);
5717
5718
  return { columns: i, columnOfKey: N, headerRow: n - 1, sort: p, filteredColumns: m, hasControls: a };
5718
5719
  }, pr = (e, t) => {
5719
5720
  const n = e.columns[t];
5720
5721
  return n != null && (n.sortable || n.filterable) ? n : null;
5721
- }, D0 = (e, t) => e.key === t.key && e.sortable === t.sortable && e.filterable === t.filterable && e.defaultMatchMode === t.defaultMatchMode && e.matchModes.length === t.matchModes.length && e.matchModes.every((n, r) => n === t.matchModes[r]), F0 = (e, t) => e.sort === null || e.sort.columnKey !== t ? { sort: { columnKey: t, direction: "asc" }, filters: e.filters } : e.sort.direction === "asc" ? { sort: { columnKey: t, direction: "desc" }, filters: e.filters } : { sort: null, filters: e.filters }, L0 = (e, t, n) => n !== null ? { sort: { columnKey: t, direction: n }, filters: e.filters } : e.sort !== null && e.sort.columnKey === t ? { sort: null, filters: e.filters } : e, Oi = (e, t) => {
5722
+ }, F0 = (e, t) => e.key === t.key && e.sortable === t.sortable && e.filterable === t.filterable && e.defaultMatchMode === t.defaultMatchMode && e.matchModes.length === t.matchModes.length && e.matchModes.every((n, r) => n === t.matchModes[r]), L0 = (e, t) => e.sort === null || e.sort.columnKey !== t ? { sort: { columnKey: t, direction: "asc" }, filters: e.filters } : e.sort.direction === "asc" ? { sort: { columnKey: t, direction: "desc" }, filters: e.filters } : { sort: null, filters: e.filters }, q0 = (e, t, n) => n !== null ? { sort: { columnKey: t, direction: n }, filters: e.filters } : e.sort !== null && e.sort.columnKey === t ? { sort: null, filters: e.filters } : e, Oi = (e, t) => {
5722
5723
  if (!Object.hasOwn(e.filters, t))
5723
5724
  return e;
5724
5725
  const n = {};
5725
5726
  for (const r of Object.keys(e.filters))
5726
5727
  r !== t && (n[r] = e.filters[r]);
5727
5728
  return { sort: e.sort, filters: n };
5728
- }, q0 = (e) => Object.keys(e.filters).length === 0 ? e : { sort: e.sort, filters: {} }, P0 = (e, t, n, r) => {
5729
+ }, P0 = (e) => Object.keys(e.filters).length === 0 ? e : { sort: e.sort, filters: {} }, _0 = (e, t, n, r) => {
5729
5730
  const o = r.filter((s) => n.has(s));
5730
5731
  return o.length === r.length ? Oi(e, t) : { sort: e.sort, filters: { ...e.filters, [t]: { mode: "exact", values: o } } };
5731
- }, _0 = (e, t, n) => n.trim() === "" ? Oi(e, t) : { sort: e.sort, filters: { ...e.filters, [t]: { mode: "fuzzy", query: n } } }, I0 = (e, t) => e.mode === "fuzzy" || t.mode === "fuzzy" ? e.mode === "fuzzy" && t.mode === "fuzzy" && e.query === t.query : e.values.length === t.values.length && e.values.every((n, r) => n === t.values[r]), H0 = (e, t) => {
5732
+ }, I0 = (e, t, n) => n.trim() === "" ? Oi(e, t) : { sort: e.sort, filters: { ...e.filters, [t]: { mode: "fuzzy", query: n } } }, H0 = (e, t) => e.mode === "fuzzy" || t.mode === "fuzzy" ? e.mode === "fuzzy" && t.mode === "fuzzy" && e.query === t.query : e.values.length === t.values.length && e.values.every((n, r) => n === t.values[r]), j0 = (e, t) => {
5732
5733
  if (e === t)
5733
5734
  return !0;
5734
5735
  if (e.sort === null || t.sort === null ? e.sort !== t.sort : e.sort.columnKey !== t.sort.columnKey || e.sort.direction !== t.sort.direction)
5735
5736
  return !1;
5736
5737
  const n = Object.keys(e.filters);
5737
- return n.length !== Object.keys(t.filters).length ? !1 : n.every((r) => Object.hasOwn(t.filters, r) && I0(e.filters[r], t.filters[r]));
5738
- }, j0 = (e) => {
5738
+ return n.length !== Object.keys(t.filters).length ? !1 : n.every((r) => Object.hasOwn(t.filters, r) && H0(e.filters[r], t.filters[r]));
5739
+ }, B0 = (e) => {
5739
5740
  if (!Array.isArray(e))
5740
5741
  throw new RangeError(`[spreadsheet] sortFilter.getFilterValues must resolve with an array (got ${He(e)})`);
5741
5742
  const t = /* @__PURE__ */ new Set();
@@ -5743,7 +5744,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5743
5744
  const o = `sortFilter.getFilterValues()[${n}]`;
5744
5745
  if (!yn(r))
5745
5746
  throw new RangeError(`[spreadsheet] ${o} must be { value, label, count } (got ${He(r)})`);
5746
- if (Cn(r, x0, o), typeof r.value != "string")
5747
+ if (Cn(r, M0, o), typeof r.value != "string")
5747
5748
  throw new RangeError(`[spreadsheet] ${o}.value must be a string (got ${He(r.value)})`);
5748
5749
  if (typeof r.label != "string")
5749
5750
  throw new RangeError(`[spreadsheet] ${o}.label must be a string (got ${He(r.label)})`);
@@ -5754,7 +5755,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5754
5755
  t.add(r.value);
5755
5756
  }
5756
5757
  return e;
5757
- }, Zc = (e) => e.normalize("NFKC").toLowerCase(), B0 = (e, t) => Zc(e).includes(Zc(t)), ju = (e) => e.replace(/\r\n|\r|\n/g, " "), V0 = ({ row: e, col: t, text: n, display: r, renderCell: o, __onCellRender: s }) => {
5758
+ }, Zc = (e) => e.normalize("NFKC").toLowerCase(), V0 = (e, t) => Zc(e).includes(Zc(t)), ju = (e) => e.replace(/\r\n|\r|\n/g, " "), W0 = ({ row: e, col: t, text: n, display: r, renderCell: o, __onCellRender: s }) => {
5758
5759
  const i = E(!1);
5759
5760
  if (je(() => {
5760
5761
  const l = i.current ? "update" : "mount";
@@ -5764,13 +5765,13 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5764
5765
  return l === void 0 ? r : l;
5765
5766
  }
5766
5767
  return r;
5767
- }, W0 = ii(V0), K0 = Object.freeze({
5768
+ }, K0 = ii(W0), Y0 = Object.freeze({
5768
5769
  left: Object.freeze({ justifyContent: Pr("left") }),
5769
5770
  center: Object.freeze({ justifyContent: Pr("center") }),
5770
5771
  right: Object.freeze({ justifyContent: Pr("right") })
5771
- }), Y0 = Object.freeze({ role: "rowgroup" }), X0 = 4096, Qc = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new Map(), U0 = (e, t) => {
5772
+ }), X0 = Object.freeze({ role: "rowgroup" }), U0 = 4096, Qc = /* @__PURE__ */ new WeakMap(), So = /* @__PURE__ */ new Map(), G0 = (e, t) => {
5772
5773
  if (e === null)
5773
- return K0[t];
5774
+ return Y0[t];
5774
5775
  let n = Qc.get(e);
5775
5776
  n === void 0 && (n = {}, Qc.set(e, n));
5776
5777
  const r = n[t];
@@ -5778,21 +5779,21 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5778
5779
  return r;
5779
5780
  const o = { ...e.style, justifyContent: Pr(t) }, s = JSON.stringify(o);
5780
5781
  let i = So.get(s);
5781
- return i === void 0 && (So.size >= X0 && So.clear(), i = Object.freeze(o), So.set(s, i)), n[t] = i, i;
5782
- }, G0 = Ei(), J0 = (e, t, n) => {
5782
+ return i === void 0 && (So.size >= U0 && So.clear(), i = Object.freeze(o), So.set(s, i)), n[t] = i, i;
5783
+ }, J0 = Ei(), Z0 = (e, t, n) => {
5783
5784
  if (e.row !== t || e.col !== n)
5784
5785
  throw new RangeError(`[spreadsheet] cell renderer (${t}, ${n}) ran without its getCellProps (latched ${e.row}, ${e.col})`);
5785
5786
  return e.value;
5786
- }, Z0 = (e, t, n, r, o, s) => {
5787
+ }, Q0 = (e, t, n, r, o, s) => {
5787
5788
  if (e.getCellFormat === void 0 && e.getCellNote === void 0 && e.getCellComments === void 0 && e.getCellHyperlink === void 0 && e.getCellValidation === void 0)
5788
5789
  return null;
5789
5790
  const i = To(e, o, s), l = {};
5790
5791
  let c = null, a;
5791
5792
  if (e.getCellFormat !== void 0) {
5792
- const p = ki(e, r === null ? null : r.indexRef.current, r === null ? G0 : r.memoRef.current, o, s, i);
5793
+ const p = ki(e, r === null ? null : r.indexRef.current, r === null ? J0 : r.memoRef.current, o, s, i);
5793
5794
  a = p === void 0 ? void 0 : p.value;
5794
- const m = cu(p, i), N = vn(n, s, 1), z = vn(t, o, 1), M = Ep(p, N === null ? void 0 : e.getCellFormat(o, N), z === null ? void 0 : e.getCellFormat(z, s), n.offsetOf(s) === 0, t.offsetOf(o) === 0);
5795
- M !== null && Object.assign(l, M.attrs), l["data-aqsp-align"] = m, c = U0(M, m);
5795
+ const m = cu(p, i), N = vn(n, s, 1), z = vn(t, o, 1), M = kp(p, N === null ? void 0 : e.getCellFormat(o, N), z === null ? void 0 : e.getCellFormat(z, s), n.offsetOf(s) === 0, t.offsetOf(o) === 0);
5796
+ M !== null && Object.assign(l, M.attrs), l["data-aqsp-align"] = m, c = G0(M, m);
5796
5797
  }
5797
5798
  if (e.getCellNote !== void 0 && e.getCellNote(o, s) !== void 0 && (l["data-aqsp-note"] = ""), e.getCellComments !== void 0) {
5798
5799
  const p = e.getCellComments(o, s);
@@ -5800,10 +5801,10 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5800
5801
  }
5801
5802
  if (e.getCellHyperlink !== void 0 && wr(e.getCellHyperlink(o, s)) !== void 0 && (l["data-aqsp-link"] = ""), e.getCellValidation !== void 0) {
5802
5803
  const p = e.getCellValidation(o, s);
5803
- p !== void 0 && jg(p, i()) && (l["data-aqsp-invalid"] = "");
5804
+ p !== void 0 && Bg(p, i()) && (l["data-aqsp-invalid"] = "");
5804
5805
  }
5805
5806
  return { attrs: l, style: c, value: a };
5806
- }, Q0 = ({
5807
+ }, ey = ({
5807
5808
  adapter: e,
5808
5809
  rowAxis: t,
5809
5810
  colAxis: n,
@@ -5874,7 +5875,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5874
5875
  ...d.sort !== null && d.sort.col === Ve ? { "aria-sort": d.sort.direction === "asc" ? "ascending" : "descending", "data-aqsp-sort": d.sort.direction } : {},
5875
5876
  ...d.filteredColumns.has(Ve) ? { "data-aqsp-filtered": "" } : {}
5876
5877
  }
5877
- }, dt = Lm(e, Ae, Ve), cn = dt === null ? $t : { ...$t, ...dt }, rt = Z0(e, t, n, Y, Ae, Ve), Tt = Ie.current;
5878
+ }, dt = qm(e, Ae, Ve), cn = dt === null ? $t : { ...$t, ...dt }, rt = Q0(e, t, n, Y, Ae, Ve), Tt = Ie.current;
5878
5879
  return Tt.row = Ae, Tt.col = Ve, Tt.value = rt === null ? void 0 : rt.value, rt === null ? cn : rt.style === null ? { ...cn, ...rt.attrs } : { ...cn, ...rt.attrs, style: rt.style };
5879
5880
  },
5880
5881
  [e, t, n, Y, N, d]
@@ -5893,12 +5894,12 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5893
5894
  ), Qe = R(
5894
5895
  (Ae, Ve, Ke) => {
5895
5896
  let $t = Ae;
5896
- e.getCellFormat !== void 0 && ($t = cr(Ae, J0(Ie.current, Ve, Ke)));
5897
- const dt = /* @__PURE__ */ ee(W0, { row: Ve, col: Ke, text: Ae, display: $t, renderCell: Z, __onCellRender: _ });
5897
+ e.getCellFormat !== void 0 && ($t = cr(Ae, Z0(Ie.current, Ve, Ke)));
5898
+ const dt = /* @__PURE__ */ ee(K0, { row: Ve, col: Ke, text: Ae, display: $t, renderCell: Z, __onCellRender: _ });
5898
5899
  return d == null || C === void 0 || C === null || Ve !== d.headerRow || pr(d, Ke) === null ? dt : /* @__PURE__ */ Te(Ho, { children: [
5899
5900
  dt,
5900
5901
  /* @__PURE__ */ ee(
5901
- O0,
5902
+ A0,
5902
5903
  {
5903
5904
  col: Ke,
5904
5905
  direction: d.sort !== null && d.sort.col === Ke ? d.sort.direction : null,
@@ -5961,7 +5962,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5961
5962
  getCell: oe,
5962
5963
  getCellProps: ct,
5963
5964
  getRowProps: Be,
5964
- contentProps: Y0,
5965
+ contentProps: X0,
5965
5966
  behaviorOptions: ge,
5966
5967
  scrollBarOptions: Me,
5967
5968
  overscanRows: w,
@@ -5981,7 +5982,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
5981
5982
  }
5982
5983
  )
5983
5984
  );
5984
- }, ey = ii(Q0), lr = 6, kt = 3, Po = (e, t) => {
5985
+ }, ty = ii(ey), lr = 6, kt = 3, Po = (e, t) => {
5985
5986
  const n = [], r = [];
5986
5987
  if (t.length === 0)
5987
5988
  return n;
@@ -6003,7 +6004,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6003
6004
  }
6004
6005
  const i = t[t.length - 1];
6005
6006
  return i < e.count - 1 && e.sizeOf(i + 1) === 0 && r.push({ kind: "unhide", index: i + 1, start: s - kt, length: kt }), [...n.reverse(), ...r];
6006
- }, ty = ({ viewStore: e, colAxis: t, frozenCols: n, frozenTrailingCols: r, handleRef: o, bandRef: s, colTrackRef: i, windowOriginXRef: l, repaintColHeaders: c, selectionRanges: a, enableResizeUI: p, dividerLeadingRef: m, dividerTrailingRef: N }) => {
6007
+ }, ny = ({ viewStore: e, colAxis: t, frozenCols: n, frozenTrailingCols: r, handleRef: o, bandRef: s, colTrackRef: i, windowOriginXRef: l, repaintColHeaders: c, selectionRanges: a, enableResizeUI: p, dividerLeadingRef: m, dividerTrailingRef: N }) => {
6007
6008
  const z = si(o), M = R(
6008
6009
  (g) => (s.current = g, z(g)),
6009
6010
  [s, z]
@@ -6059,7 +6060,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6059
6060
  ] }) })
6060
6061
  ) : null
6061
6062
  ] }) });
6062
- }, ny = ({ viewStore: e, rowAxis: t, handleRef: n, bandRef: r, selectionRanges: o, rowTrackRef: s, windowOriginYRef: i, repaintHeaders: l, enableResizeUI: c, frozenRows: a, frozenTrailingRows: p, dividerLeadingRef: m, dividerTrailingRef: N }) => {
6063
+ }, ry = ({ viewStore: e, rowAxis: t, handleRef: n, bandRef: r, selectionRanges: o, rowTrackRef: s, windowOriginYRef: i, repaintHeaders: l, enableResizeUI: c, frozenRows: a, frozenTrailingRows: p, dividerLeadingRef: m, dividerTrailingRef: N }) => {
6063
6064
  const z = si(n), M = R(
6064
6065
  (g) => (r.current = g, z(g)),
6065
6066
  [r, z]
@@ -6106,13 +6107,13 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6106
6107
  ] }) })
6107
6108
  ) : null
6108
6109
  ] }) });
6109
- }, ry = 9, oy = 4, ea = (e, t, n) => {
6110
+ }, oy = 9, sy = 4, ea = (e, t, n) => {
6110
6111
  const r = t.get(e);
6111
6112
  if (r !== void 0)
6112
6113
  return r;
6113
6114
  const o = e.italic === !0 ? "italic" : n.fontStyle, s = e.bold === !0 ? "bold" : n.fontWeight, i = typeof e.fontSize == "number" && Number.isFinite(e.fontSize) && e.fontSize > 0 ? `${e.fontSize * 4 / 3}px` : n.fontSize, l = typeof e.fontFamily == "string" && e.fontFamily !== "" ? e.fontFamily : n.fontFamily, c = `${o} ${s} ${i} ${l}`;
6114
6115
  return t.set(e, c), c;
6115
- }, ta = (e, t, n) => e.anchor === "trailing" ? t.offsetOf(e.index) + e.initialSize - n : t.offsetOf(e.index) + n, sy = (e) => {
6116
+ }, ta = (e, t, n) => e.anchor === "trailing" ? t.offsetOf(e.index) + e.initialSize - n : t.offsetOf(e.index) + n, iy = (e) => {
6116
6117
  const t = E(e);
6117
6118
  t.current = e;
6118
6119
  const n = E(!1), r = E(null), o = E(0), s = E(null), i = E(0), l = E(null), c = E(null), a = E(""), p = E(null), m = R((h) => s.current !== null ? h.pointerId === s.current : h.pointerType === "mouse", []), N = R(() => {
@@ -6170,7 +6171,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6170
6171
  const w = document.createElement("canvas").getContext("2d");
6171
6172
  if (w === null)
6172
6173
  return !0;
6173
- const T = getComputedStyle(S), X = `${T.fontStyle} ${T.fontWeight} ${T.fontSize} ${T.fontFamily}`, g = T.getPropertyValue("--_aqsp-header-row-font-weight").trim(), G = { fontStyle: T.fontStyle, fontWeight: g === "" ? T.fontWeight : g, fontSize: T.fontSize, fontFamily: T.fontFamily }, ne = `${G.fontStyle} ${G.fontWeight} ${G.fontSize} ${G.fontFamily}`, d = $.adapter.getConditionalFormats === void 0 ? null : S0($.adapter.getConditionalFormats()), C = Ei(), b = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new Map();
6174
+ const T = getComputedStyle(S), X = `${T.fontStyle} ${T.fontWeight} ${T.fontSize} ${T.fontFamily}`, g = T.getPropertyValue("--_aqsp-header-row-font-weight").trim(), G = { fontStyle: T.fontStyle, fontWeight: g === "" ? T.fontWeight : g, fontSize: T.fontSize, fontFamily: T.fontFamily }, ne = `${G.fontStyle} ${G.fontWeight} ${G.fontSize} ${G.fontFamily}`, d = $.adapter.getConditionalFormats === void 0 ? null : E0($.adapter.getConditionalFormats()), C = Ei(), b = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new Map();
6174
6175
  for (const O of h) {
6175
6176
  const B = d === null ? null : Pu(d.filter((D) => D.ranges.some((oe) => O >= oe.startCol && O <= oe.endCol)));
6176
6177
  for (const D of u) {
@@ -6194,7 +6195,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6194
6195
  const ae = [];
6195
6196
  for (const O of h) {
6196
6197
  const B = se.get(O);
6197
- B !== void 0 && B > 0 && ae.push({ index: O, size: Math.ceil(B) + ry });
6198
+ B !== void 0 && B > 0 && ae.push({ index: O, size: Math.ceil(B) + oy });
6198
6199
  }
6199
6200
  return ae.length === 0 ? !0 : j("col", ae, v);
6200
6201
  },
@@ -6213,12 +6214,12 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6213
6214
  ne(d);
6214
6215
  for (let d = u.rowAxis.count - V; d < u.rowAxis.count; d += 1)
6215
6216
  ne(d);
6216
- return Q(y, g, Math.floor(u.maxOperationCells / oy), h);
6217
+ return Q(y, g, Math.floor(u.maxOperationCells / sy), h);
6217
6218
  },
6218
6219
  [M, Q]
6219
6220
  ), L = R(
6220
6221
  (h, u, y) => {
6221
- const v = h === "col" ? t.current.colAxis : t.current.rowAxis, $ = Xd(v.sizeOf(u), y);
6222
+ const v = h === "col" ? t.current.colAxis : t.current.rowAxis, $ = Ud(v.sizeOf(u), y);
6222
6223
  if ($ === v.sizeOf(u))
6223
6224
  return !0;
6224
6225
  const S = M(h, u);
@@ -6362,7 +6363,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6362
6363
  }),
6363
6364
  [N, L, W, K]
6364
6365
  );
6365
- }, Ai = (e, t) => e.startRow === t.startRow && e.startCol === t.startCol && e.endRow === t.endRow && e.endCol === t.endCol, iy = (e, t) => e.ranges.length === t.ranges.length && e.ranges.every((n, r) => Ai(n, t.ranges[r])) && _t(e.anchor, t.anchor) && _t(e.active, t.active), na = (e, t, n) => {
6366
+ }, Ai = (e, t) => e.startRow === t.startRow && e.startCol === t.startCol && e.endRow === t.endRow && e.endCol === t.endCol, ly = (e, t) => e.ranges.length === t.ranges.length && e.ranges.every((n, r) => Ai(n, t.ranges[r])) && _t(e.anchor, t.anchor) && _t(e.active, t.active), na = (e, t, n) => {
6366
6367
  const r = (i) => i.row < t && i.col < n, o = (i) => i.endRow < t && i.endCol < n;
6367
6368
  if (r(e.anchor) && r(e.active) && e.ranges.every(o))
6368
6369
  return e;
@@ -6376,7 +6377,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6376
6377
  if (typeof e != "object" || e === null)
6377
6378
  throw new RangeError(`[spreadsheet] setSelection: the ${t} must be an object (got ${String(e)})`);
6378
6379
  return e;
6379
- }, ly = (e, t, n) => {
6380
+ }, cy = (e, t, n) => {
6380
6381
  const r = qs(e, "selection"), o = r.ranges;
6381
6382
  if (!Array.isArray(o) || o.length === 0)
6382
6383
  throw new RangeError("[spreadsheet] setSelection: the selection must have at least one range");
@@ -6396,15 +6397,15 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6396
6397
  if (!c.some((m) => sn(m, p)))
6397
6398
  throw new RangeError(`[spreadsheet] setSelection: the active cell {row: ${p.row}, col: ${p.col}} must lie in one of the ranges`);
6398
6399
  return { ranges: c, anchor: a, active: p };
6399
- }, cy = (e, t) => {
6400
+ }, ay = (e, t) => {
6400
6401
  const n = e.ranges[e.ranges.length - 1];
6401
6402
  return Ai(n, t) ? e : { ...e, ranges: [...e.ranges.slice(0, -1), t] };
6402
- }, hr = (e, t, n) => n.extend ? Fn(e, t) : n.append ? { ranges: [...e.ranges, Ce(t, t)], anchor: t, active: t } : e.ranges.length === 1 && _t(e.anchor, t) && _t(e.active, t) && Ai(e.ranges[0], Ce(t, t)) ? e : { ranges: [Ce(t, t)], anchor: t, active: t }, ay = (e, t) => ({
6403
+ }, hr = (e, t, n) => n.extend ? Fn(e, t) : n.append ? { ranges: [...e.ranges, Ce(t, t)], anchor: t, active: t } : e.ranges.length === 1 && _t(e.anchor, t) && _t(e.active, t) && Ai(e.ranges[0], Ce(t, t)) ? e : { ranges: [Ce(t, t)], anchor: t, active: t }, uy = (e, t) => ({
6403
6404
  row: Math.min(Math.max(e.row, t.startRow), t.endRow),
6404
6405
  col: Math.min(Math.max(e.col, t.startCol), t.endCol)
6405
6406
  }), Fn = (e, t) => {
6406
- const n = cy(e, Ce(e.anchor, t));
6407
- return n.ranges.some((r) => sn(r, n.active)) ? n : { ...n, active: ay(n.active, n.ranges[n.ranges.length - 1]) };
6407
+ const n = ay(e, Ce(e.anchor, t));
6408
+ return n.ranges.some((r) => sn(r, n.active)) ? n : { ...n, active: uy(n.active, n.ranges[n.ranges.length - 1]) };
6408
6409
  }, Vu = (e, t, n) => {
6409
6410
  let r = !1;
6410
6411
  const o = [];
@@ -6428,7 +6429,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6428
6429
  }
6429
6430
  const i = { row: o[o.length - 1].startRow, col: o[o.length - 1].startCol };
6430
6431
  return { ranges: o, anchor: i, active: i };
6431
- }, uy = (e, t, n, r) => {
6432
+ }, dy = (e, t, n, r) => {
6432
6433
  const o = e[t];
6433
6434
  if (r === "right") {
6434
6435
  if (n.col < o.endCol)
@@ -6463,7 +6464,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6463
6464
  throw new RangeError("[spreadsheet] reduceActiveCycle requires active inside some range (invariant violation)");
6464
6465
  let r = { rangeIndex: n, cell: e.active };
6465
6466
  do
6466
- if (r = uy(e.ranges, r.rangeIndex, r.cell, t), !_t(r.cell, e.active))
6467
+ if (r = dy(e.ranges, r.rangeIndex, r.cell, t), !_t(r.cell, e.active))
6467
6468
  return { ...e, active: r.cell };
6468
6469
  while (r.rangeIndex !== n);
6469
6470
  return e;
@@ -6676,7 +6677,7 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6676
6677
  }),
6677
6678
  [L, A]
6678
6679
  );
6679
- }, dy = ({ handleRef: e, rowAxis: t, colAxis: n }) => (r) => {
6680
+ }, fy = ({ handleRef: e, rowAxis: t, colAxis: n }) => (r) => {
6680
6681
  const o = e.current;
6681
6682
  if (o === null)
6682
6683
  return;
@@ -6694,18 +6695,18 @@ const $s = () => ({ t: "" }), Am = (e, t, n) => {
6694
6695
  const p = n.offsetOf(r.col), m = p + n.sizeOf(r.col);
6695
6696
  p < a.width + s ? o.scrollBy({ x: p - (a.width + s) }) : m > s + l - a.trailingVisibleWidth && o.scrollBy({ x: m - (s + l - a.trailingVisibleWidth) });
6696
6697
  }
6697
- }, fy = 50, py = 100, Ku = (e, t) => e.isComposing || e.keyCode === 229 ? !0 : (e.key === "Enter" || e.key === "Escape") && t !== null ? e.timeStamp - t < fy : !1, Nr = {
6698
+ }, py = 50, hy = 100, Ku = (e, t) => Xd(e) ? !0 : (e.key === "Enter" || e.key === "Escape") && t !== null ? e.timeStamp - t < py : !1, Nr = {
6698
6699
  selectAll: mn("Ctrl+A"),
6699
6700
  undo: mn("Ctrl+Z"),
6700
6701
  redo: mn("Ctrl+Y"),
6701
6702
  redoShiftZ: mn("Ctrl+Shift+Z"),
6702
6703
  pasteValues: mn("Ctrl+Shift+V")
6703
- }, hy = /* @__PURE__ */ new Set(["Shift", "Control", "Alt", "Meta", "AltGraph"]), my = {
6704
+ }, my = /* @__PURE__ */ new Set(["Shift", "Control", "Alt", "Meta", "AltGraph"]), gy = {
6704
6705
  ArrowRight: "right",
6705
6706
  ArrowLeft: "left",
6706
6707
  ArrowDown: "down",
6707
6708
  ArrowUp: "up"
6708
- }, gy = (e) => !e.shiftKey || e.altKey || !(e.ctrlKey || e.metaKey) ? !1 : e.key === "PageUp" || e.key === "PageDown", wy = (e) => {
6709
+ }, wy = (e) => !e.shiftKey || e.altKey || !(e.ctrlKey || e.metaKey) ? !1 : e.key === "PageUp" || e.key === "PageDown", yy = (e) => {
6709
6710
  const t = E(null), n = E(null), r = E(!1), o = E(!1), s = E(null), i = E(!1), l = E(!1), c = E(e);
6710
6711
  c.current = e;
6711
6712
  const { enabled: a, sinkRef: p, rootRef: m, handleRef: N } = e;
@@ -6792,8 +6793,8 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
6792
6793
  $(d);
6793
6794
  return;
6794
6795
  }
6795
- const b = d.ctrlKey || d.metaKey, I = d.altKey, Y = my[d.key];
6796
- if (l.current && !hy.has(d.key) && !C.isDragging() && j(), C.isEditing()) {
6796
+ const b = d.ctrlKey || d.metaKey, I = d.altKey, Y = gy[d.key];
6797
+ if (l.current && !my.has(d.key) && !C.isDragging() && j(), C.isEditing()) {
6797
6798
  const se = C.getEditingMode();
6798
6799
  if (C.isDragging()) {
6799
6800
  d.preventDefault(), d.key === "Escape" && !b && !d.shiftKey && !I && C.abortDrag();
@@ -6866,7 +6867,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
6866
6867
  d.preventDefault(), C.cancelEdit();
6867
6868
  return;
6868
6869
  }
6869
- if (O !== void 0 && B !== null && !Fo.has(B.command) && rg(B.chord) && O.isAvailable(B.command)) {
6870
+ if (O !== void 0 && B !== null && !Fo.has(B.command) && og(B.chord) && O.isAvailable(B.command)) {
6870
6871
  d.preventDefault(), C.onCommandBlockedWhileEditing?.(B);
6871
6872
  return;
6872
6873
  }
@@ -6880,7 +6881,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
6880
6881
  }
6881
6882
  const U = C.commands;
6882
6883
  if (U !== void 0) {
6883
- const se = eg(U.table, d);
6884
+ const se = tg(U.table, d);
6884
6885
  if (se !== null && U.isAvailable(se)) {
6885
6886
  d.preventDefault(), U.execute(se);
6886
6887
  return;
@@ -6913,7 +6914,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
6913
6914
  d.preventDefault(), C.moveActive({ mode: "reset", cell: Q(C.getSelection().active, Y) });
6914
6915
  return;
6915
6916
  }
6916
- if (gy(d)) {
6917
+ if (wy(d)) {
6917
6918
  d.preventDefault();
6918
6919
  return;
6919
6920
  }
@@ -7046,7 +7047,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7046
7047
  }, X = (d) => {
7047
7048
  r.current = !1, t.current = d.timeStamp, n.current !== null && window.clearTimeout(n.current), n.current = window.setTimeout(() => {
7048
7049
  t.current = null, n.current = null;
7049
- }, py), o.current && (o.current = !1, d.data !== "" && (s.current !== null && window.clearTimeout(s.current), s.current = window.setTimeout(v, 0)));
7050
+ }, hy), o.current && (o.current = !1, d.data !== "" && (s.current !== null && window.clearTimeout(s.current), s.current = window.setTimeout(v, 0)));
7050
7051
  }, g = () => {
7051
7052
  const d = c.current;
7052
7053
  if (j(), !d.isEditing()) {
@@ -7073,7 +7074,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7073
7074
  z.removeEventListener("keydown", w), z.removeEventListener("keyup", G), z.removeEventListener("blur", ne), z.removeEventListener("compositionstart", T), z.removeEventListener("compositionend", X), z.removeEventListener("input", g), n.current !== null && window.clearTimeout(n.current), s.current !== null && (window.clearTimeout(s.current), s.current = null), r.current = !1, o.current = !1, j();
7074
7075
  };
7075
7076
  }, [a, p, m, N]);
7076
- }, yy = () => {
7077
+ }, Cy = () => {
7077
7078
  let e = { vy: 0, rowStart: 0, rowEnd: 0, colStart: 0, colEnd: 0, colVersion: 0, rowGeomVersion: 0, editVersion: 0 };
7078
7079
  const t = /* @__PURE__ */ new Set();
7079
7080
  let n = null;
@@ -7104,7 +7105,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7104
7105
  t.delete(i), t.size === 0 && n !== null && (cancelAnimationFrame(n), n = null);
7105
7106
  })
7106
7107
  };
7107
- }, Cy = 4, vy = Object.freeze({ cols: 0, width: 0, rows: 0, height: 0, trailingCols: 0, trailingRows: 0, trailingWidth: 0, trailingHeight: 0, trailingVisibleWidth: 0, trailingVisibleHeight: 0 }), by = (e) => {
7108
+ }, vy = 4, by = Object.freeze({ cols: 0, width: 0, rows: 0, height: 0, trailingCols: 0, trailingRows: 0, trailingWidth: 0, trailingHeight: 0, trailingVisibleWidth: 0, trailingVisibleHeight: 0 }), Ry = (e) => {
7108
7109
  const t = E(e);
7109
7110
  t.current = e;
7110
7111
  const n = E(!1), r = E(null), o = E(null), s = E(null), i = E({ clientX: 0, clientY: 0 }), l = E({ clientX: 0, clientY: 0 }), c = E(!1), a = E({ dx: 0, dy: 0 }), p = E(null), m = E(0), N = E(null), z = E(null), M = E(!1), j = R((k) => p.current !== null ? k.pointerId === p.current : k.pointerType === "mouse", []), Z = R((k, _) => {
@@ -7140,17 +7141,17 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7140
7141
  const k = t.current, _ = r.current, H = o.current;
7141
7142
  if (A(), _ === null || H === null)
7142
7143
  return;
7143
- const h = qm(_, H);
7144
+ const h = Pm(_, H);
7144
7145
  if (h > k.maxOperationCells) {
7145
7146
  k.onOperationRejected?.("fill", h, "limit");
7146
7147
  return;
7147
7148
  }
7148
- const u = Pm(_, H);
7149
+ const u = _m(_, H);
7149
7150
  if (ir(k.adapter, u)) {
7150
7151
  k.rejectReadOnly({ kind: "operation", op: "fill", cellCount: Ot(u), gesture: "fillHandle", sources: [_], targets: u });
7151
7152
  return;
7152
7153
  }
7153
- const y = _m(($, S) => fu(k.adapter, $, S), _, H, pu);
7154
+ const y = Im(($, S) => fu(k.adapter, $, S), _, H, pu);
7154
7155
  if (k.commitEdits(y, { source: "fill" }) === null)
7155
7156
  return;
7156
7157
  const v = k.getSelection();
@@ -7167,7 +7168,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7167
7168
  return;
7168
7169
  i.current = { clientX: v.clientX, clientY: v.clientY };
7169
7170
  const $ = Math.abs(v.clientX - l.current.clientX), S = Math.abs(v.clientY - l.current.clientY);
7170
- if (!c.current && Math.max($, S) >= Cy && (c.current = !0), !!c.current) {
7171
+ if (!c.current && Math.max($, S) >= vy && (c.current = !0), !!c.current) {
7171
7172
  if (!M.current) {
7172
7173
  const V = t.current, w = {
7173
7174
  getPointerPosition: () => ({ clientX: i.current.clientX - a.current.dx, clientY: i.current.clientY - a.current.dy }),
@@ -7200,7 +7201,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7200
7201
  r.current = V, o.current = null, c.current = !1, $.xAutoScroller.stop(), $.yAutoScroller.stop(), M.current = !1, l.current = { clientX: v.clientX, clientY: v.clientY }, i.current = l.current, m.current = v.buttons, n.current = !0, $.repaintOverlay(), s.current = $.bodyRef.current?.getBoundingClientRect() ?? null;
7201
7202
  const w = s.current, T = $.handleRef.current?.getScrollPosition() ?? { x: -1, y: -1 }, X = T.y;
7202
7203
  if (w !== null && X >= 0 && T.x >= 0) {
7203
- const ne = T.x, d = $.zoomRef.current, C = $.handleRef.current?.getFrozenSize() ?? vy, b = $.handleRef.current?.getViewportSize() ?? { width: 0, height: 0 }, I = { scroll: ne, frozenCount: C.cols, trailingCount: C.trailingCols, extent: b.width }, Y = { scroll: X, frozenCount: C.rows, trailingCount: C.trailingRows, extent: b.height }, U = qn($.colAxis, V.endCol, I) + $.colAxis.sizeOf(V.endCol), se = Pn($.rowAxis, V.endRow, Y) + $.rowAxis.sizeOf(V.endRow), ae = U - 1, O = V.endCol >= C.cols && C.width > 0 ? Math.max(ae, C.width) : ae, D = !(V.endCol >= $.colAxis.count - C.trailingCols) && C.trailingWidth > 0 ? Math.min(O, b.width - C.trailingVisibleWidth - 1) : O, oe = se - 1, ge = V.endRow >= C.rows && C.height > 0 ? Math.max(oe, C.height) : oe, Ie = !(V.endRow >= $.rowAxis.count - C.trailingRows) && C.trailingHeight > 0 ? Math.min(ge, b.height - C.trailingVisibleHeight - 1) : ge;
7204
+ const ne = T.x, d = $.zoomRef.current, C = $.handleRef.current?.getFrozenSize() ?? by, b = $.handleRef.current?.getViewportSize() ?? { width: 0, height: 0 }, I = { scroll: ne, frozenCount: C.cols, trailingCount: C.trailingCols, extent: b.width }, Y = { scroll: X, frozenCount: C.rows, trailingCount: C.trailingRows, extent: b.height }, U = qn($.colAxis, V.endCol, I) + $.colAxis.sizeOf(V.endCol), se = Pn($.rowAxis, V.endRow, Y) + $.rowAxis.sizeOf(V.endRow), ae = U - 1, O = V.endCol >= C.cols && C.width > 0 ? Math.max(ae, C.width) : ae, D = !(V.endCol >= $.colAxis.count - C.trailingCols) && C.trailingWidth > 0 ? Math.min(O, b.width - C.trailingVisibleWidth - 1) : O, oe = se - 1, ge = V.endRow >= C.rows && C.height > 0 ? Math.max(oe, C.height) : oe, Ie = !(V.endRow >= $.rowAxis.count - C.trailingRows) && C.trailingHeight > 0 ? Math.min(ge, b.height - C.trailingVisibleHeight - 1) : ge;
7204
7205
  a.current = { dx: v.clientX - (w.left + D * d), dy: v.clientY - (w.top + Ie * d) };
7205
7206
  } else
7206
7207
  a.current = { dx: 0, dy: 0 };
@@ -7231,10 +7232,10 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7231
7232
  }),
7232
7233
  [A]
7233
7234
  );
7234
- }, Ry = (e, t, n) => {
7235
+ }, Sy = (e, t, n) => {
7235
7236
  const r = Object.hasOwn(e.filters, t) ? e.filters[t] : void 0;
7236
7237
  return new Set(r !== void 0 && r.mode === "exact" ? r.values : n.map((o) => o.value));
7237
- }, Sy = ({ column: e, columnName: t, state: n, getFilterValues: r, changeState: o, close: s, isInsideGrid: i, relayout: l, labels: c }) => {
7238
+ }, Ey = ({ column: e, columnName: t, state: n, getFilterValues: r, changeState: o, close: s, isInsideGrid: i, relayout: l, labels: c }) => {
7238
7239
  const a = e.key, p = Object.hasOwn(n.filters, a) ? n.filters[a] : void 0, m = n.sort !== null && n.sort.columnKey === a ? n.sort.direction : null, [N, z] = Ue(() => p === void 0 ? e.defaultMatchMode : p.mode), [M, j] = Ue(() => p !== void 0 && p.mode === "fuzzy" ? p.query : ""), [Z, Q] = Ue(""), [A, L] = Ue({ status: "idle" }), [W, K] = Ue(() => /* @__PURE__ */ new Set()), k = E(!1), _ = E(n);
7239
7240
  _.current = n;
7240
7241
  const H = Rn(), h = Rn(), u = e.filterable && N === "exact", y = u || A.status !== "idle";
@@ -7258,12 +7259,12 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7258
7259
  return;
7259
7260
  let Me;
7260
7261
  try {
7261
- Me = j0(ge);
7262
+ Me = B0(ge);
7262
7263
  } catch {
7263
7264
  L({ status: "failed" });
7264
7265
  return;
7265
7266
  }
7266
- L({ status: "loaded", values: Me }), K(Ry(_.current, a, Me));
7267
+ L({ status: "loaded", values: Me }), K(Sy(_.current, a, Me));
7267
7268
  },
7268
7269
  () => {
7269
7270
  D.signal.aborted || L({ status: "failed" });
@@ -7278,7 +7279,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7278
7279
  }
7279
7280
  l();
7280
7281
  }, [N, v]);
7281
- const S = A.status === "loaded" ? A.values : null, V = (D) => D.label === "" ? Re(c, "filterBlank") : D.label, w = Fe(() => S === null ? [] : S.filter((D) => B0(D.label === "" ? Re(c, "filterBlank") : D.label, Z)), [S, Z, c]), T = w.length > Lo ? w.slice(0, Lo) : w, X = w.length - T.length, g = S === null ? 0 : S.filter((D) => W.has(D.value)).length, G = (D) => {
7282
+ const S = A.status === "loaded" ? A.values : null, V = (D) => D.label === "" ? Re(c, "filterBlank") : D.label, w = Fe(() => S === null ? [] : S.filter((D) => V0(D.label === "" ? Re(c, "filterBlank") : D.label, Z)), [S, Z, c]), T = w.length > Lo ? w.slice(0, Lo) : w, X = w.length - T.length, g = S === null ? 0 : S.filter((D) => W.has(D.value)).length, G = (D) => {
7282
7283
  k.current = !0;
7283
7284
  try {
7284
7285
  D();
@@ -7287,13 +7288,13 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7287
7288
  }
7288
7289
  }, ne = (D) => G(() => {
7289
7290
  o(D);
7290
- }), d = (D) => ne(L0(n, a, D)), C = () => {
7291
+ }), d = (D) => ne(q0(n, a, D)), C = () => {
7291
7292
  if (N === "fuzzy") {
7292
- ne(_0(n, a, M));
7293
+ ne(I0(n, a, M));
7293
7294
  return;
7294
7295
  }
7295
7296
  S === null || g === 0 || ne(
7296
- P0(
7297
+ _0(
7297
7298
  n,
7298
7299
  a,
7299
7300
  W,
@@ -7385,10 +7386,10 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7385
7386
  e.filterable ? /* @__PURE__ */ Te("div", { className: "aqsp-popover-actions", children: [
7386
7387
  /* @__PURE__ */ ee("button", { type: "button", className: "aqsp-popover-button", "data-aqsp-column-menu-action": "apply", disabled: N === "exact" && g === 0, onClick: C, children: Re(c, "filterApply") }),
7387
7388
  /* @__PURE__ */ ee("button", { type: "button", className: "aqsp-popover-button", "data-aqsp-column-menu-action": "clear", disabled: p === void 0, onClick: () => ne(Oi(n, a)), children: Re(c, "filterClearColumn") }),
7388
- /* @__PURE__ */ ee("button", { type: "button", className: "aqsp-popover-button", "data-aqsp-column-menu-action": "clearAll", disabled: !B, onClick: () => ne(q0(n)), children: Re(c, "filterClearAll") })
7389
+ /* @__PURE__ */ ee("button", { type: "button", className: "aqsp-popover-button", "data-aqsp-column-menu-action": "clearAll", disabled: !B, onClick: () => ne(P0(n)), children: Re(c, "filterClearAll") })
7389
7390
  ] }) : null
7390
7391
  ] });
7391
- }, Ey = 320, Mo = 8, ky = 64, Oy = 150, Yu = (e) => Math.max(0, Math.min(Ey, e.width - Ct - Mo)), Ay = (e, t, n) => {
7392
+ }, ky = 320, Mo = 8, Oy = 64, Ay = 150, Yu = (e) => Math.max(0, Math.min(ky, e.width - Ct - Mo)), $y = (e, t, n) => {
7392
7393
  const r = n.width - Ct, o = n.height - Ct, s = Yu(n), i = Math.max(0, Math.min(t, o - Mo)), l = e.left + e.width, c = e.top + e.height, a = (j) => j >= 0 && j + s <= r, p = [e.left, l - s], m = [
7393
7394
  { left: e.left, top: c },
7394
7395
  { left: l - s, top: c },
@@ -7399,29 +7400,29 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7399
7400
  if (a(j.left) && j.top >= 0 && j.top + i <= o)
7400
7401
  return { left: j.left, top: j.top, width: s, height: i };
7401
7402
  const N = o - c, z = e.top, M = Math.min(i, Math.max(N, z));
7402
- if (M >= ky) {
7403
+ if (M >= Oy) {
7403
7404
  const j = N >= z ? c : e.top - M;
7404
7405
  for (const Z of p)
7405
7406
  if (a(Z))
7406
7407
  return { left: Z, top: j, width: s, height: M };
7407
7408
  }
7408
7409
  return { left: Mo, top: Mo, width: s, height: i };
7409
- }, $y = (e, t, n, r) => t === null || e !== null && _t(e, t) || n ? !1 : r(t), Ty = (e, t) => {
7410
+ }, Ty = (e, t, n, r) => t === null || e !== null && _t(e, t) || n ? !1 : r(t), xy = (e, t) => {
7410
7411
  switch (e.kind) {
7411
7412
  case "note":
7412
- return /* @__PURE__ */ ee(cw, { ctx: e, labels: t });
7413
- case "note-tip":
7414
7413
  return /* @__PURE__ */ ee(aw, { ctx: e, labels: t });
7414
+ case "note-tip":
7415
+ return /* @__PURE__ */ ee(uw, { ctx: e, labels: t });
7415
7416
  case "comment":
7416
- return /* @__PURE__ */ ee(ow, { ctx: e, labels: t });
7417
- case "link":
7418
7417
  return /* @__PURE__ */ ee(sw, { ctx: e, labels: t });
7419
- case "list":
7418
+ case "link":
7420
7419
  return /* @__PURE__ */ ee(iw, { ctx: e, labels: t });
7421
- default:
7420
+ case "list":
7422
7421
  return /* @__PURE__ */ ee(lw, { ctx: e, labels: t });
7422
+ default:
7423
+ return /* @__PURE__ */ ee(cw, { ctx: e, labels: t });
7423
7424
  }
7424
- }, Ps = (e) => e === null ? null : `${e.kind}:${e.cell.row}:${e.cell.col}`, xy = ({ controller: e, renderPopover: t, labels: n, interactiveAnchorRef: r, tipAnchorRef: o, columnMenu: s }) => {
7425
+ }, Ps = (e) => e === null ? null : `${e.kind}:${e.cell.row}:${e.cell.col}`, My = ({ controller: e, renderPopover: t, labels: n, interactiveAnchorRef: r, tipAnchorRef: o, columnMenu: s }) => {
7425
7426
  const { context: i, tipContext: l } = e, c = E(null), a = E(null), p = E(l);
7426
7427
  p.current = l;
7427
7428
  const m = E(e);
@@ -7429,7 +7430,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7429
7430
  const N = Ps(i), z = Ps(l), M = E(null), j = (k, _) => {
7430
7431
  const H = m.current.getLayerSize();
7431
7432
  k.style.width = `${Yu(H)}px`, k.style.maxHeight = "";
7432
- const h = Ay(_, k.offsetHeight, H);
7433
+ const h = $y(_, k.offsetHeight, H);
7433
7434
  k.style.left = `${h.left - _.left}px`, k.style.top = `${h.top - _.top}px`, k.style.maxHeight = `${h.height}px`;
7434
7435
  };
7435
7436
  Xe(() => {
@@ -7450,7 +7451,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7450
7451
  const k = a.current, _ = p.current;
7451
7452
  k === null || _ === null || j(k, _.anchorRect);
7452
7453
  }, [z]);
7453
- const Z = (k) => t === void 0 ? Ty(k, n) : t(k), Q = () => {
7454
+ const Z = (k) => t === void 0 ? xy(k, n) : t(k), Q = () => {
7454
7455
  const k = c.current, _ = m.current.context;
7455
7456
  k !== null && _ !== null && j(k, _.anchorRect);
7456
7457
  }, A = (k) => {
@@ -7458,7 +7459,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7458
7459
  return null;
7459
7460
  const _ = pr(s.resolved, k.cell.col);
7460
7461
  return _ === null ? null : /* @__PURE__ */ ee(
7461
- Sy,
7462
+ Ey,
7462
7463
  {
7463
7464
  column: _,
7464
7465
  columnName: s.columnNameOf(k.cell),
@@ -7500,7 +7501,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7500
7501
  )
7501
7502
  ] })
7502
7503
  );
7503
- }, My = ["note", "note-tip", "comment", "link", "list", "message"], zy = (e, t) => {
7504
+ }, zy = ["note", "note-tip", "comment", "link", "list", "message"], Ny = (e, t) => {
7504
7505
  switch (t) {
7505
7506
  case "note":
7506
7507
  case "note-tip":
@@ -7512,7 +7513,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7512
7513
  default:
7513
7514
  return e.getCellValidation !== void 0;
7514
7515
  }
7515
- }, Dr = (e, t, n) => (t === void 0 ? !0 : t[n] !== !1) && zy(e, n), Ny = (e) => {
7516
+ }, Dr = (e, t, n) => (t === void 0 ? !0 : t[n] !== !1) && Ny(e, n), Dy = (e) => {
7516
7517
  const t = E(e);
7517
7518
  t.current = e;
7518
7519
  const [n, r] = Ue(null), [o, s] = Ue(null), i = E(null), l = E(null), c = E(null), a = E(!1), p = E(null), m = E(null), N = E(null), z = E(null), M = Rn(), j = R((b) => {
@@ -7537,7 +7538,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7537
7538
  }, [M]), L = R(() => (Q(), a.current = !1, l.current === null ? !1 : (l.current = null, s(null), Z({ tip: null }), A(), !0)), [Q, Z, A]), W = R(() => {
7538
7539
  Q(), p.current = window.setTimeout(() => {
7539
7540
  p.current = null, L();
7540
- }, Oy);
7541
+ }, Ay);
7541
7542
  }, [Q, L]), K = R(
7542
7543
  (b) => {
7543
7544
  const I = t.current;
@@ -7562,7 +7563,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7562
7563
  const O = I.adapter.getCellNote === void 0 ? void 0 : I.adapter.getCellNote(ae.row, ae.col);
7563
7564
  return O !== void 0 && O !== "";
7564
7565
  };
7565
- if ($y(Y, b, I.isDraggingAny(), se)) {
7566
+ if (Ty(Y, b, I.isDraggingAny(), se)) {
7566
7567
  b !== null && K(b);
7567
7568
  return;
7568
7569
  }
@@ -7759,7 +7760,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7759
7760
  },
7760
7761
  []
7761
7762
  );
7762
- const { adapter: G, popovers: ne } = e, d = e.columnMenuAt !== void 0, C = Fe(() => d || My.some((b) => Dr(G, ne, b)), [G, ne, d]);
7763
+ const { adapter: G, popovers: ne } = e, d = e.columnMenuAt !== void 0, C = Fe(() => d || zy.some((b) => Dr(G, ne, b)), [G, ne, d]);
7763
7764
  return Fe(
7764
7765
  () => ({
7765
7766
  layerEnabled: C,
@@ -7792,7 +7793,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7792
7793
  }),
7793
7794
  [C, V, y, w, T, h, u, Q, W, A, n, o, M]
7794
7795
  );
7795
- }, Dy = 6, Fy = 500, tr = (e, t) => Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY)) >= Dy, _s = (e, t) => e !== null && _t(e, t), Ly = (e, t, n) => {
7796
+ }, Fy = 6, Ly = 500, tr = (e, t) => Math.max(Math.abs(t.clientX - e.clientX), Math.abs(t.clientY - e.clientY)) >= Fy, _s = (e, t) => e !== null && _t(e, t), qy = (e, t, n) => {
7796
7797
  let r = null, o = 0;
7797
7798
  if (typeof document.caretPositionFromPoint == "function") {
7798
7799
  const i = document.caretPositionFromPoint(e, t);
@@ -7826,7 +7827,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7826
7827
  n.count,
7827
7828
  r.count
7828
7829
  );
7829
- }, qy = (e) => {
7830
+ }, Py = (e) => {
7830
7831
  const t = E(e);
7831
7832
  t.current = e;
7832
7833
  const n = E(!1), r = E(null), o = E(null), s = E({ clientX: 0, clientY: 0 }), i = E(null), l = E(null), c = E(0), a = E(null), p = E(!1), m = E(null), N = E(""), z = E(!1), M = E(!1), j = E(null), Z = E(null), Q = E(null), A = E(null), L = R((v, $) => {
@@ -7869,7 +7870,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
7869
7870
  A.current = null;
7870
7871
  const D = Q.current;
7871
7872
  D !== null && (Q.current = null, T(D.cell, D.event));
7872
- }, Fy));
7873
+ }, Ly));
7873
7874
  }, g = (O) => {
7874
7875
  const B = t.current, D = B.onRequestTouchEdit;
7875
7876
  if (D === void 0 || B.isAnyDragging())
@@ -8016,7 +8017,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8016
8017
  return;
8017
8018
  o.current = v.getBoundingClientRect();
8018
8019
  const D = L(O.clientX, O.clientY);
8019
- D !== null && _t(B.getSelection().active, D) && B.onRequestEdit(D, B.caretFromPointEnabled(D) ? Ly(O.clientX, O.clientY, D) : void 0);
8020
+ D !== null && _t(B.getSelection().active, D) && B.onRequestEdit(D, B.caretFromPointEnabled(D) ? qy(O.clientX, O.clientY, D) : void 0);
8020
8021
  };
8021
8022
  return v.addEventListener("pointerdown", G), v.addEventListener("pointermove", C), v.addEventListener("pointerup", b), v.addEventListener("pointercancel", I), v.addEventListener("lostpointercapture", U), v.addEventListener("contextmenu", se), v.addEventListener("dblclick", ae), () => {
8022
8023
  v.removeEventListener("pointerdown", G), v.removeEventListener("pointermove", C), v.removeEventListener("pointerup", b), v.removeEventListener("pointercancel", I), v.removeEventListener("lostpointercapture", U), v.removeEventListener("contextmenu", se), v.removeEventListener("dblclick", ae), V(), H();
@@ -8031,7 +8032,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8031
8032
  }),
8032
8033
  [h, H]
8033
8034
  );
8034
- }, Py = (e) => {
8035
+ }, _y = (e) => {
8035
8036
  const t = E(e);
8036
8037
  t.current = e;
8037
8038
  const n = E(!1), r = E(null), o = E(null), s = E({ clientX: 0, clientY: 0 }), i = E({ clientX: 0, clientY: 0 }), l = E(null), c = E(null), a = E(0), p = E(null), m = E(null), N = E(!1), z = R((L, W) => {
@@ -8112,7 +8113,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8112
8113
  }),
8113
8114
  [j, M, Z]
8114
8115
  );
8115
- }, _y = Object.freeze({ width: 0, height: 0 }), Is = 33, Iy = (e) => e.nodeType === Node.DOCUMENT_NODE || e.nodeType === Node.DOCUMENT_FRAGMENT_NODE, Hy = (e, t, n) => {
8116
+ }, Iy = Object.freeze({ width: 0, height: 0 }), Is = 33, Hy = (e) => e.nodeType === Node.DOCUMENT_NODE || e.nodeType === Node.DOCUMENT_FRAGMENT_NODE, jy = (e, t, n) => {
8116
8117
  const r = (n - t) / (Is - 1);
8117
8118
  let o = -1, s = -1;
8118
8119
  for (let l = 0; l < Is; l++)
@@ -8131,7 +8132,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8131
8132
  top: o === 0 ? t : i(t + r * (o - 1), t + r * o),
8132
8133
  bottom: s === Is - 1 ? n : i(t + r * (s + 1), t + r * s)
8133
8134
  };
8134
- }, jy = (e) => {
8135
+ }, By = (e) => {
8135
8136
  if (e === void 0)
8136
8137
  return !1;
8137
8138
  if (typeof e != "object" || e === null)
@@ -8140,22 +8141,22 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8140
8141
  if (t !== void 0 && t !== !0 && t !== !1)
8141
8142
  throw new RangeError(`[spreadsheet] setSelection: options.scroll must be true, false or absent (got ${String(t)})`);
8142
8143
  return t === !0;
8143
- }, By = (e, t) => {
8144
+ }, Vy = (e, t) => {
8144
8145
  if (!Number.isInteger(e) || e < 0 || e > 0 && e > t)
8145
8146
  throw new RangeError(`[spreadsheet] headerRows must be a whole number from 0 to frozenRows = ${t} (got ${e})`);
8146
- }, Vy = (e) => {
8147
+ }, Wy = (e) => {
8147
8148
  if (e !== void 0 && (typeof e != "string" || e === "" || /\s/u.test(e)))
8148
8149
  throw new RangeError(`[spreadsheet] labelledBy must be one non-empty id without whitespace (got ${JSON.stringify(e)})`);
8149
- }, Wy = (e) => {
8150
+ }, Ky = (e) => {
8150
8151
  if (e === void 0)
8151
8152
  return;
8152
8153
  if (![e.startRow, e.startCol, e.endRow, e.endCol].every((n) => Number.isInteger(n) && n >= 0) || e.startRow > e.endRow || e.startCol > e.endCol)
8153
8154
  throw new RangeError(`[spreadsheet] frame must hold non-negative integer bounds with each start at most its end (got startRow ${String(e.startRow)}, startCol ${String(e.startCol)}, endRow ${String(e.endRow)}, endCol ${String(e.endCol)})`);
8154
- }, Ky = Object.freeze({ showArrowButtons: !0, enableThumbDrag: !0, enableTrackClick: !0 }), Yy = (e) => {
8155
+ }, Yy = Object.freeze({ showArrowButtons: !0, enableThumbDrag: !0, enableTrackClick: !0 }), Xy = (e) => {
8155
8156
  if (e !== void 0) {
8156
8157
  if (typeof e != "object" || e === null)
8157
8158
  throw new RangeError(`[spreadsheet] scrollBarControls must be an object or absent (got ${typeof e == "string" ? JSON.stringify(e) : String(e)})`);
8158
- for (const t of Object.keys(Ky)) {
8159
+ for (const t of Object.keys(Yy)) {
8159
8160
  const n = e[t];
8160
8161
  if (n !== void 0 && typeof n != "boolean")
8161
8162
  throw new RangeError(`[spreadsheet] scrollBarControls.${t} must be true, false or absent (got ${typeof n == "string" ? JSON.stringify(n) : String(n)})`);
@@ -8165,45 +8166,45 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8165
8166
  if (t !== void 0 && !(Number.isInteger(t) && t >= 0))
8166
8167
  throw new RangeError(`[spreadsheet] ${e} must be a non-negative integer (got ${typeof t == "string" ? JSON.stringify(t) : String(t)})`);
8167
8168
  return t;
8168
- }, Xy = 24, Uy = 200, Gy = Object.freeze(["#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF"]), ia = 5, Jy = /^#[0-9A-Fa-f]{6}$/, Zy = Object.freeze({ row: !1, column: !1, intersection: !1 }), la = Object.freeze({ ok: !0 }), ca = (e, t) => {
8169
+ }, Uy = 24, Gy = 200, Jy = Object.freeze(["#FF0000", "#00FF00", "#0000FF", "#FFFF00", "#FF00FF"]), ia = 5, Zy = /^#[0-9A-Fa-f]{6}$/, Qy = Object.freeze({ row: !1, column: !1, intersection: !1 }), la = Object.freeze({ ok: !0 }), ca = (e, t) => {
8169
8170
  if (t === void 0)
8170
- return Gy;
8171
+ return Jy;
8171
8172
  if (t.length !== ia)
8172
8173
  throw new RangeError(`[spreadsheet] colors.${e} must contain exactly ${ia} colours (got ${t.length})`);
8173
8174
  for (const n of t)
8174
- if (typeof n != "string" || !Jy.test(n))
8175
+ if (typeof n != "string" || !Zy.test(n))
8175
8176
  throw new RangeError(`[spreadsheet] colors.${e} entries must be #rrggbb strings (got ${JSON.stringify(n)})`);
8176
8177
  return t;
8177
- }, Qy = (e) => {
8178
+ }, eC = (e) => {
8178
8179
  for (const t of ["row", "column", "intersection"])
8179
8180
  if (ut(e[t]) === null)
8180
8181
  throw new RangeError(`[spreadsheet] highlightColors.${t} is not a colour (got ${JSON.stringify(e[t])})`);
8181
8182
  if (!(Number.isFinite(e.opacity) && e.opacity >= 0 && e.opacity <= 1))
8182
8183
  throw new RangeError(`[spreadsheet] highlightColors.opacity must be a number in [0, 1] (got ${e.opacity})`);
8183
8184
  return e;
8184
- }, eC = (e, t) => {
8185
+ }, tC = (e, t) => {
8185
8186
  if (e !== void 0)
8186
8187
  return e;
8187
8188
  if (t.row || t.column || t.intersection)
8188
- return Xg;
8189
- }, tC = (e) => {
8189
+ return Ug;
8190
+ }, nC = (e) => {
8190
8191
  if (e === void 0)
8191
8192
  throw new RangeError("[spreadsheet] commitEdits: a paste commit requires its sheet context (sameSheet / conditionalFormats)");
8192
8193
  return e;
8193
- }, nC = (e) => {
8194
+ }, rC = (e) => {
8194
8195
  const t = E(null), n = t.current;
8195
8196
  return n !== null && Io.every((r) => n[r] === e[r]) ? n : (t.current = e, e);
8196
8197
  }, nr = {
8197
8198
  ranges: [Ce({ row: 0, col: 0 }, { row: 0, col: 0 })],
8198
8199
  anchor: { row: 0, col: 0 },
8199
8200
  active: { row: 0, col: 0 }
8200
- }, pC = Wd(function({
8201
+ }, mC = Wd(function({
8201
8202
  adapter: t,
8202
8203
  headerRows: n = 0,
8203
8204
  sortFilter: r,
8204
8205
  readOnly: o = !1,
8205
8206
  labelledBy: s,
8206
- defaultRowHeight: i = Xy,
8207
+ defaultRowHeight: i = Uy,
8207
8208
  defaultColumnWidth: l = _d,
8208
8209
  frozenColumns: c = 0,
8209
8210
  frozenRows: a = 0,
@@ -8266,17 +8267,17 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8266
8267
  __onVirtualKeyboardRaise: On,
8267
8268
  __maxRenderedCells: It
8268
8269
  }, Ur) {
8269
- const ue = Fe(() => o ? Nm(t) : t, [t, o]), ve = Vc(ue.rowCount, i), be = Vc(ue.colCount, l), In = E(null);
8270
- In.current === null && (In.current = yy());
8271
- const Le = In.current, Hn = aa(I), ot = Fe(() => cg(I, Y), [I, Y]), an = nC(ag(ot)), Ut = Fe(() => Qm(U), [U]), jn = Fe(() => {
8270
+ const ue = Fe(() => o ? Dm(t) : t, [t, o]), ve = Vc(ue.rowCount, i), be = Vc(ue.colCount, l), In = E(null);
8271
+ In.current === null && (In.current = Cy());
8272
+ const Le = In.current, Hn = aa(I), ot = Fe(() => ag(I, Y), [I, Y]), an = rC(ug(ot)), Ut = Fe(() => eg(U), [U]), jn = Fe(() => {
8272
8273
  if (!w)
8273
8274
  return;
8274
- const F = [...Ut].filter(([, te]) => Ts.includes(te)).sort(([, te], [, ie]) => Ts.indexOf(te) - Ts.indexOf(ie)).map(([te]) => Ym(te)).filter((te) => te !== null);
8275
+ const F = [...Ut].filter(([, te]) => Ts.includes(te)).sort(([, te], [, ie]) => Ts.indexOf(te) - Ts.indexOf(ie)).map(([te]) => Xm(te)).filter((te) => te !== null);
8275
8276
  return F.length === 0 ? void 0 : F.join(" ");
8276
- }, [Ut, w]), Bn = Fe(() => ({ fill: ca("fill", ae === void 0 ? void 0 : ae.fill), font: ca("font", ae === void 0 ? void 0 : ae.font) }), [ae]), yr = Fe(() => ge === void 0 ? void 0 : Qy(ge), [ge]);
8277
+ }, [Ut, w]), Bn = Fe(() => ({ fill: ca("fill", ae === void 0 ? void 0 : ae.fill), font: ca("font", ae === void 0 ? void 0 : ae.font) }), [ae]), yr = Fe(() => ge === void 0 ? void 0 : eC(ge), [ge]);
8277
8278
  if (ue.getConditionalFormats !== void 0 && ue.getCellFormat === void 0)
8278
8279
  throw new RangeError("[spreadsheet] getConditionalFormats requires getCellFormat");
8279
- By(n, a), Vy(s), Wy(G), Yy(z);
8280
+ Vy(n, a), Wy(s), Ky(G), Xy(z);
8280
8281
  const Cr = R(() => Le.get().editVersion, [Le]), vr = R((f) => Le.subscribeCoalesced(f), [Le]), Go = jo(vr, Cr, Cr) + ($ === void 0 ? 0 : $), br = ue.getConditionalFormats === void 0 ? null : ue.getConditionalFormats(), Vn = Fe(() => ({ index: br === null ? null : Pu(br), memo: Ei() }), [ue, br, Go]), Rr = E(Vn.index);
8281
8282
  Rr.current = Vn.index;
8282
8283
  const un = E(Vn.memo);
@@ -8292,7 +8293,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8292
8293
  const ze = R((f) => {
8293
8294
  const F = ws(f);
8294
8295
  F !== re.current && (re.current = F, qe.current || q(F), pe.current?.(F));
8295
- }, []), de = ue.rowCount === 0 || ue.colCount === 0, Ge = !de, Je = ue.colCount, xe = Fe(() => r === void 0 || de ? null : N0(r, Je, n), [r, de, Je, n]), we = E(r);
8296
+ }, []), de = ue.rowCount === 0 || ue.colCount === 0, Ge = !de, Je = ue.colCount, xe = Fe(() => r === void 0 || de ? null : D0(r, Je, n), [r, de, Je, n]), we = E(r);
8296
8297
  we.current = r;
8297
8298
  const fe = E(xe);
8298
8299
  fe.current = xe, je(() => {
@@ -8311,9 +8312,9 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8311
8312
  f.removeEventListener("wheel", F, { capture: !0 }), f.removeEventListener("keydown", te, !0);
8312
8313
  };
8313
8314
  }, [ze, Ge]);
8314
- const he = E(null), Se = E(null), Ee = E(null), ft = E(null), le = E(null), Ne = E(null), vt = E(null), pt = E(0), ht = E(null), De = E(0), mt = E(null), Gt = E(null), bt = E(null), Ze = E(null), Ht = E(null), Wn = E(null), Gr = E(null), [An, Jo] = Ue(nr), jt = E(An), Jt = R(() => jt.current, []), [Xu, Uu] = Ue(() => D === void 0 ? Zy : D), Kn = B !== void 0 ? B : Xu, Zo = E(Kn);
8315
+ const he = E(null), Se = E(null), Ee = E(null), ft = E(null), le = E(null), Ne = E(null), vt = E(null), pt = E(0), ht = E(null), De = E(0), mt = E(null), Gt = E(null), bt = E(null), Ze = E(null), Ht = E(null), Wn = E(null), Gr = E(null), [An, Jo] = Ue(nr), jt = E(An), Jt = R(() => jt.current, []), [Xu, Uu] = Ue(() => D === void 0 ? Qy : D), Kn = B !== void 0 ? B : Xu, Zo = E(Kn);
8315
8316
  Zo.current = Kn;
8316
- const Gu = eC(yr, Kn), Ti = E(B !== void 0);
8317
+ const Gu = tC(yr, Kn), Ti = E(B !== void 0);
8317
8318
  Ti.current = B !== void 0;
8318
8319
  const xi = E(oe);
8319
8320
  xi.current = oe;
@@ -8386,7 +8387,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8386
8387
  []
8387
8388
  );
8388
8389
  const is = E(null), ls = E(null);
8389
- (is.current === null || ls.current?.rowAxis !== ve || ls.current?.colAxis !== be) && (ls.current = { rowAxis: ve, colAxis: be }, is.current = dy({ handleRef: le, rowAxis: ve, colAxis: be }));
8390
+ (is.current === null || ls.current?.rowAxis !== ve || ls.current?.colAxis !== be) && (ls.current = { rowAxis: ve, colAxis: be }, is.current = fy({ handleRef: le, rowAxis: ve, colAxis: be }));
8390
8391
  const Zr = R(
8391
8392
  (f) => {
8392
8393
  const F = le.current, te = F === null ? { x: 0, y: 0 } : F.getScrollPosition(), ie = F === null ? { rows: 0, cols: 0, trailingRows: 0, trailingCols: 0 } : F.getFrozenSize(), ye = F === null ? { width: 0, height: 0 } : F.getViewportSize(), Oe = P.current;
@@ -8422,9 +8423,9 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8422
8423
  if (F <= 0 || te === null || ie === null)
8423
8424
  return F;
8424
8425
  const ye = te.getBoundingClientRect(), Oe = ie.getRootNode();
8425
- if (ye.height <= 0 || te.offsetHeight <= 0 || !Iy(Oe))
8426
+ if (ye.height <= 0 || te.offsetHeight <= 0 || !Hy(Oe))
8426
8427
  return F;
8427
- const it = ie.ownerDocument.documentElement, yt = Math.max(ye.left, 0), nt = Math.min(ye.right, it.clientWidth), Kt = Math.max(ye.top, 0) + 0.5, hn = Math.min(ye.bottom, it.clientHeight) - 0.5, so = (yt + nt) / 2, Zn = nt > yt && hn >= Kt ? Hy(
8428
+ const it = ie.ownerDocument.documentElement, yt = Math.max(ye.left, 0), nt = Math.min(ye.right, it.clientWidth), Kt = Math.max(ye.top, 0) + 0.5, hn = Math.min(ye.bottom, it.clientHeight) - 0.5, so = (yt + nt) / 2, Zn = nt > yt && hn >= Kt ? jy(
8428
8429
  (Fd) => {
8429
8430
  const Al = Oe.elementFromPoint(so, Fd);
8430
8431
  return Al !== null && ie.contains(Al);
@@ -8442,7 +8443,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8442
8443
  const F = Se.current;
8443
8444
  let te;
8444
8445
  if (F === null)
8445
- te = _y;
8446
+ te = Iy;
8446
8447
  else {
8447
8448
  if (F.getClientRects().length === 0)
8448
8449
  return;
@@ -8479,7 +8480,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8479
8480
  F !== null && (F.textContent = "", Tn.current = requestAnimationFrame(() => {
8480
8481
  Tn.current = null, F.textContent = f;
8481
8482
  }));
8482
- }, Uy);
8483
+ }, Gy);
8483
8484
  }, []);
8484
8485
  je(
8485
8486
  () => () => {
@@ -8534,7 +8535,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8534
8535
  ), fn = R(
8535
8536
  (f, F) => {
8536
8537
  const te = jt.current;
8537
- Object.is(f, te) || iy(f, te) || (jt.current = f, Jo(f), L?.(f, F), Wi(te, f), (Zt.current?.() ?? !1) || gt());
8538
+ Object.is(f, te) || ly(f, te) || (jt.current = f, Jo(f), L?.(f, F), Wi(te, f), (Zt.current?.() ?? !1) || gt());
8538
8539
  },
8539
8540
  [L, Wi, gt]
8540
8541
  ), Nt = R((f) => fn(f, "user"), [fn]), ed = R(
@@ -8561,7 +8562,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8561
8562
  [Sr]
8562
8563
  ), [td, as] = Ue(!1), Qr = R(() => {
8563
8564
  On?.(), as(!0);
8564
- }, [On]), us = td && !de ? na(An, ue.rowCount, ue.colCount).active : null, nd = us === null ? "none" : Mm(ue, us.row, us.col), Xi = R(() => {
8565
+ }, [On]), us = td && !de ? na(An, ue.rowCount, ue.colCount).active : null, nd = us === null ? "none" : zm(ue, us.row, us.col), Xi = R(() => {
8565
8566
  Ye.current?.focus({ preventScroll: !0 });
8566
8567
  }, []), eo = R(
8567
8568
  (f, F, te) => {
@@ -8588,13 +8589,13 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8588
8589
  }), no = R(
8589
8590
  (f) => {
8590
8591
  const F = we.current;
8591
- return F === void 0 || !st() ? !1 : (Rt.current?.hideTip(), Rt.current?.close(), St(), H0(F.state, f) || F.onStateChange(f), !0);
8592
+ return F === void 0 || !st() ? !1 : (Rt.current?.hideTip(), Rt.current?.close(), St(), j0(F.state, f) || F.onStateChange(f), !0);
8592
8593
  },
8593
8594
  [st, St]
8594
8595
  ), sd = R(
8595
8596
  (f, F) => {
8596
8597
  const te = we.current, ie = fe.current, ye = ie === null ? null : pr(ie, f);
8597
- te !== void 0 && ye?.sortable === !0 && no(F0(te.state, ye.key)), F !== "mouse" && xt({ preventScroll: !0 });
8598
+ te !== void 0 && ye?.sortable === !0 && no(L0(te.state, ye.key)), F !== "mouse" && xt({ preventScroll: !0 });
8598
8599
  },
8599
8600
  [no, xt]
8600
8601
  ), tl = R((f) => {
@@ -8627,7 +8628,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8627
8628
  (f, F, te) => {
8628
8629
  let ie;
8629
8630
  if (F.source === "paste") {
8630
- const ye = tC(te);
8631
+ const ye = nC(te);
8631
8632
  if (f.length === 0 && ye.conditionalFormats.length === 0)
8632
8633
  return null;
8633
8634
  ro.current += 1, ie = { transaction: ro.current, source: "paste", sameSheet: ye.sameSheet, conditionalFormats: ye.conditionalFormats };
@@ -8689,7 +8690,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8689
8690
  K?.(f, { kind: "pointer", event: F });
8690
8691
  },
8691
8692
  [K]
8692
- ), pd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: pn, axis: "both", zoomRef: P }), hd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: pn, axis: "x", zoomRef: P }), md = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: pn, axis: "y", zoomRef: P }), gd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: fs, axis: "x", zoomRef: P }), wd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: fs, axis: "y", zoomRef: P }), yd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: pn, axis: "both", zoomRef: P }), dl = E(null), fl = E(() => !1), Or = R(() => fl.current(), []), Dt = qy({
8693
+ ), pd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: pn, axis: "both", zoomRef: P }), hd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: pn, axis: "x", zoomRef: P }), md = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: pn, axis: "y", zoomRef: P }), gd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: fs, axis: "x", zoomRef: P }), wd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: fs, axis: "y", zoomRef: P }), yd = er({ handleRef: le, rowAxis: ve, colAxis: be, bodyRef: he, onDragFrame: pn, axis: "both", zoomRef: P }), dl = E(null), fl = E(() => !1), Or = R(() => fl.current(), []), Dt = Py({
8693
8694
  zoomRef: P,
8694
8695
  enabled: !de,
8695
8696
  rowAxis: ve,
@@ -8773,7 +8774,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8773
8774
  repaintOverlay: Pe,
8774
8775
  // v0.8 (§4.2.9): ポインティング中の帯押下は全行参照 (1:1) の挿入
8775
8776
  pointing: ts
8776
- }), wt = sy({
8777
+ }), wt = iy({
8777
8778
  zoomRef: P,
8778
8779
  enabled: !de && w && X,
8779
8780
  colBandRef: mt,
@@ -8800,7 +8801,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8800
8801
  repaintOverlay: Pe,
8801
8802
  // v0.8 (§4.2.10): ポインティング中のストリップ押下は consume (挿入なし・確定なし)
8802
8803
  isPointing: $n
8803
- }), Ft = by({
8804
+ }), Ft = Ry({
8804
8805
  zoomRef: P,
8805
8806
  enabled: !de && V,
8806
8807
  handleNodeRef: cl,
@@ -8821,7 +8822,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8821
8822
  repaintOverlay: Pe,
8822
8823
  xAutoScroller: gd,
8823
8824
  yAutoScroller: wd
8824
- }), Et = Py({
8825
+ }), Et = _y({
8825
8826
  zoomRef: P,
8826
8827
  enabled: !de,
8827
8828
  bodyRef: he,
@@ -8850,11 +8851,11 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8850
8851
  const te = ue.getCellValidation === void 0 ? void 0 : ue.getCellValidation(f.row, f.col);
8851
8852
  if (te === void 0)
8852
8853
  return la;
8853
- const ie = ue.evaluateFormula, ye = Ig(te, F, Hn, ie === void 0 ? void 0 : (Oe) => ie(Oe, f));
8854
+ const ie = ue.evaluateFormula, ye = Hg(te, F, Hn, ie === void 0 ? void 0 : (Oe) => ie(Oe, f));
8854
8855
  return ye.ok || te.strict !== !0 ? la : (Qe?.({ cell: f, rule: te, text: F, message: ye.message }), Rt.current?.isKindEnabled("message") && Jr.current("message", { message: ye.message, rejected: !0 }), ye);
8855
8856
  },
8856
8857
  [ue, Qe, Hn]
8857
- ), We = t0({
8858
+ ), We = n0({
8858
8859
  enabled: !de,
8859
8860
  sinkRef: Ne,
8860
8861
  rootRef: Ye,
@@ -8878,7 +8879,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8878
8879
  return cu(dn(f.row, f.col, F), F);
8879
8880
  },
8880
8881
  // エディタ塗り (v0.8 §2.3): 塗り書式の文字装飾をシンクへ、行箱 / 垂直揃えは editPaintRef 経由で overlay へ
8881
- resolveEditPaint: (f) => ue.getCellFormat === void 0 ? null : kp(dn(f.row, f.col, To(ue, f.row, f.col))),
8882
+ resolveEditPaint: (f) => ue.getCellFormat === void 0 ? null : Op(dn(f.row, f.col, To(ue, f.row, f.col))),
8882
8883
  editPaintRef: Fi,
8883
8884
  repaintOverlay: Pe,
8884
8885
  // 検証ゲート (v0.8 §4.2.6) — 編集列 fillSelection と共有する root の useCallback
@@ -8888,7 +8889,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8888
8889
  Zt.current = We.isEditing, Ki.current = We.requestCommit, Yi.current = We.startEdit, es.current = We.getPointing, zi.current = We.insertReference, Ni.current = We.captureSink, Di.current = We.restoreSink;
8889
8890
  const hl = R(() => {
8890
8891
  We.cancelEdit(), Sr();
8891
- }, [We.cancelEdit, Sr]), $r = Fw({
8892
+ }, [We.cancelEdit, Sr]), $r = Lw({
8892
8893
  enabled: !de,
8893
8894
  sinkRef: Ne,
8894
8895
  adapter: ue,
@@ -8914,7 +8915,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8914
8915
  onPasteResolved: Ke
8915
8916
  });
8916
8917
  Gi.current = $r.getClip, Ji.current = $r.discardClip, Zi.current = $r.discardClipOnCommit, el.current = $r.onAdapterSwitch, os.current = $r.paste;
8917
- const en = Ny({
8918
+ const en = Dy({
8918
8919
  enabled: !de,
8919
8920
  adapter: ue,
8920
8921
  popovers: Me,
@@ -8944,7 +8945,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8944
8945
  const vd = R(() => {
8945
8946
  const f = jt.current.active;
8946
8947
  return Bt(f), Zr(f);
8947
- }, [Bt, Zr]), hs = Zw({
8948
+ }, [Bt, Zr]), hs = Qw({
8948
8949
  adapter: ue,
8949
8950
  // キーボードの寸法の変更は帯のリサイズ UI と同じ可否 (enableResizeUI が false なら利用者は寸法を変えない)
8950
8951
  trackResize: w && !de ? wt : void 0,
@@ -8990,7 +8991,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
8990
8991
  }, [St, k]), Sd = R(() => {
8991
8992
  St(), _?.();
8992
8993
  }, [St, _]);
8993
- wy({
8994
+ yy({
8994
8995
  zoomRef: P,
8995
8996
  enabled: !de,
8996
8997
  sinkRef: Ne,
@@ -9049,7 +9050,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
9049
9050
  if (f === null || F === null || F.kind !== "columnMenu")
9050
9051
  return;
9051
9052
  const te = xe === null || F.cell.row !== xe.headerRow ? null : pr(xe, F.cell.col);
9052
- (te === null || !D0(te, F.column)) && f.closeColumnMenu({ restoreFocus: Ye.current?.contains(document.activeElement) === !0 });
9053
+ (te === null || !F0(te, F.column)) && f.closeColumnMenu({ restoreFocus: Ye.current?.contains(document.activeElement) === !0 });
9053
9054
  }, [xe]);
9054
9055
  const Od = An.active.row, Ad = An.active.col;
9055
9056
  Xe(() => {
@@ -9218,7 +9219,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
9218
9219
  paste: (f) => os.current(f),
9219
9220
  getSelection: () => jt.current,
9220
9221
  setSelection: (f, F) => {
9221
- const te = ly(f, ve.count, be.count), ie = jy(F);
9222
+ const te = cy(f, ve.count, be.count), ie = By(F);
9222
9223
  return tt() || Or() ? !1 : (fn(te, "setSelection"), ie && Bt(te.active), !0);
9223
9224
  },
9224
9225
  getEditSession: vl,
@@ -9314,7 +9315,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
9314
9315
  }
9315
9316
  ),
9316
9317
  /* @__PURE__ */ ee(
9317
- ty,
9318
+ ny,
9318
9319
  {
9319
9320
  viewStore: Le,
9320
9321
  colAxis: be,
@@ -9332,7 +9333,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
9332
9333
  }
9333
9334
  ),
9334
9335
  /* @__PURE__ */ ee(
9335
- ny,
9336
+ ry,
9336
9337
  {
9337
9338
  viewStore: Le,
9338
9339
  rowAxis: ve,
@@ -9352,7 +9353,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
9352
9353
  ] }) : null,
9353
9354
  /* @__PURE__ */ Te("div", { ref: Se, className: "aqsp-body-stack", "data-aqsp-body-stack": "", children: [
9354
9355
  /* @__PURE__ */ ee(
9355
- ey,
9356
+ ty,
9356
9357
  {
9357
9358
  adapter: ue,
9358
9359
  rowAxis: ve,
@@ -9397,7 +9398,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
9397
9398
  }
9398
9399
  ),
9399
9400
  /* @__PURE__ */ ee(
9400
- rw,
9401
+ ow,
9401
9402
  {
9402
9403
  rowAxis: ve,
9403
9404
  colAxis: be,
@@ -9432,7 +9433,7 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
9432
9433
  tipAnchorRef: Pi
9433
9434
  }
9434
9435
  ),
9435
- en.layerEnabled ? /* @__PURE__ */ ee(xy, { controller: en, labels: ot, renderPopover: Ie, interactiveAnchorRef: qi, tipAnchorRef: Pi, columnMenu: kd }) : null
9436
+ en.layerEnabled ? /* @__PURE__ */ ee(My, { controller: en, labels: ot, renderPopover: Ie, interactiveAnchorRef: qi, tipAnchorRef: Pi, columnMenu: kd }) : null
9436
9437
  ] }),
9437
9438
  zd ? /* @__PURE__ */ ee("div", { ref: Gr, className: "aqsp-live-region", "aria-live": "polite", "data-aqsp-live-region": "" }) : null
9438
9439
  ]
@@ -9446,47 +9447,47 @@ ${d.value.slice(b)}`, d.setSelectionRange(C + 1, C + 1);
9446
9447
  });
9447
9448
  export {
9448
9449
  ua as BORDER_DEFAULT_COLOR,
9449
- ow as CommentPopover,
9450
- Gy as DEFAULT_CUSTOM_COLORS,
9451
- Xg as DEFAULT_HIGHLIGHT_COLORS,
9452
- Um as DEFAULT_SHORTCUTS,
9453
- sw as LinkPopover,
9454
- iw as ListPopover,
9455
- lw as MessagePopover,
9456
- cw as NotePopover,
9457
- aw as NoteTip,
9458
- og as SPREADSHEET_LABEL_CATALOGS,
9459
- fC as SPREADSHEET_RESERVED_SHORTCUTS,
9460
- pC as Spreadsheet,
9450
+ sw as CommentPopover,
9451
+ Jy as DEFAULT_CUSTOM_COLORS,
9452
+ Ug as DEFAULT_HIGHLIGHT_COLORS,
9453
+ Gm as DEFAULT_SHORTCUTS,
9454
+ iw as LinkPopover,
9455
+ lw as ListPopover,
9456
+ cw as MessagePopover,
9457
+ aw as NotePopover,
9458
+ uw as NoteTip,
9459
+ sg as SPREADSHEET_LABEL_CATALOGS,
9460
+ hC as SPREADSHEET_RESERVED_SHORTCUTS,
9461
+ mC as Spreadsheet,
9461
9462
  Xt as canonicalizeFormat,
9462
9463
  Eo as columnIndexToName,
9463
- vC as columnNameToIndex,
9464
- Uf as detectClipSource,
9464
+ RC as columnNameToIndex,
9465
+ Gf as detectClipSource,
9465
9466
  Dn as enumerateRangeCells,
9466
- uC as estimatePasteCellCount,
9467
- dC as expandPaste,
9467
+ fC as estimatePasteCellCount,
9468
+ pC as expandPaste,
9468
9469
  cr as formatCellValue,
9469
- aC as formatEquals,
9470
+ dC as formatEquals,
9470
9471
  Wo as fromR1C1,
9471
- gC as iterateTsvPrefixRows,
9472
- wC as iterateTsvRows,
9472
+ yC as iterateTsvPrefixRows,
9473
+ CC as iterateTsvRows,
9473
9474
  Ce as makeRange,
9474
9475
  qd as measureTsv,
9475
9476
  ma as mergeFormat,
9476
9477
  _n as normalizeHyperlink,
9477
9478
  mn as parseChord,
9478
9479
  Fl as parseClipPayload,
9479
- $m as parseHtmlTable,
9480
+ Tm as parseHtmlTable,
9480
9481
  Pd as parseTsv,
9481
9482
  sn as rangeContains,
9482
9483
  Pt as rangeSize,
9483
9484
  Re as resolveLabel,
9484
- cg as resolveLabels,
9485
- Ff as serializeClipPayload,
9485
+ ag as resolveLabels,
9486
+ Lf as serializeClipPayload,
9486
9487
  Ld as serializeClipboardTsv,
9487
- tm as serializeHtmlTable,
9488
- yC as serializeTsv,
9489
- Up as shiftFormula,
9488
+ nm as serializeHtmlTable,
9489
+ vC as serializeTsv,
9490
+ Gp as shiftFormula,
9490
9491
  Ci as toR1C1,
9491
- Ig as validateCellText
9492
+ Hg as validateCellText
9492
9493
  };