@gridsheet/preact-core 2.0.0-rc.4 → 2.0.0-rc.5

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,8 +1,8 @@
1
- import { h as kc, render as Dc } from "preact";
2
- import { jsx as v, jsxs as K, Fragment as yt } from "preact/compat/jsx-runtime";
3
- import ar, { createContext as rn, useRef as ue, useEffect as q, useState as pe, createPortal as cr, memo as Lt, useContext as Re, useCallback as _, useMemo as lr, createRef as ur, useReducer as hr } from "preact/compat";
1
+ import { h as Oc, render as Dc } from "preact";
2
+ import { jsx as R, jsxs as K, Fragment as yt } from "preact/compat/jsx-runtime";
3
+ import ar, { createContext as rn, useRef as ue, useEffect as q, useState as pe, createPortal as cr, memo as Lt, useContext as ve, useCallback as _, useMemo as lr, createRef as ur, useReducer as hr } from "preact/compat";
4
4
  import { Children as Fc, Component as Pc, Fragment as Yc, PureComponent as Bc, StrictMode as Lc, Suspense as Hc, SuspenseList as _c, cloneElement as Uc, render as Xc, createContext as zc, createElement as Wc, createFactory as jc, createPortal as Zc, createRef as Kc, findDOMNode as Vc, forwardRef as qc, hydrate as Gc, isValidElement as Qc, lazy as Jc, memo as el, unmountComponentAtNode as tl, unstable_batchedUpdates as sl, useCallback as nl, useContext as rl, useDebugValue as il, useEffect as ol, useImperativeHandle as al, useLayoutEffect as cl, useMemo as ll, useReducer as ul, useRef as hl, useState as dl, version as fl } from "preact/compat";
5
- const dr = 20, me = 24, be = 90, Ms = 500, Os = 1e3, ts = 24, ss = 50, ks = 5, Ds = 5, $s = 5, Fs = 10, on = 1e3;
5
+ const dr = 20, me = 24, be = 90, Ms = 500, ks = 1e3, ts = 24, ss = 50, Os = 5, Ds = 5, $s = 5, Fs = 10, on = 1e3;
6
6
  class fr {
7
7
  constructor(e) {
8
8
  this.name = e;
@@ -13,7 +13,7 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
13
13
  startX: -1,
14
14
  endY: -1,
15
15
  endX: -1
16
- }, ve = rn(
16
+ }, Re = rn(
17
17
  {}
18
18
  ), rs = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", ht = /* @__PURE__ */ new Map(), dt = /* @__PURE__ */ new Map(), mr = (n, e = on) => {
19
19
  const t = ht.get(--n);
@@ -92,7 +92,7 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
92
92
  return re({ y: e, x: t });
93
93
  const i = re({ y: e, x: t }), o = re({ y: s, x: r });
94
94
  return `${i}:${o}`;
95
- }, Ct = (n, e) => n.start === -1 || n.end === -1 ? !1 : n.start <= e && e <= n.end || n.end <= e && e <= n.start, Rr = (n, e) => {
95
+ }, Ct = (n, e) => n.start === -1 || n.end === -1 ? !1 : n.start <= e && e <= n.end || n.end <= e && e <= n.start, vr = (n, e) => {
96
96
  if (n.top === -1 || n.left === -1 || n.bottom === -1 || n.right === -1)
97
97
  return !1;
98
98
  const { y: t, x: s } = e, { top: r, left: i, bottom: o, right: a } = n;
@@ -125,7 +125,7 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
125
125
  r[a] = i;
126
126
  }), t.push(r);
127
127
  }), t;
128
- }, vt = (n, e, t, s = () => !0) => {
128
+ }, Rt = (n, e, t, s = () => !0) => {
129
129
  const r = {}, { top: i, left: o, bottom: a, right: c } = t, { height: h, width: l } = Ve({
130
130
  matrix: n,
131
131
  base: 1
@@ -148,12 +148,12 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
148
148
  matrix: t = [],
149
149
  flattenAs: s = "value",
150
150
  origin: r = "A1"
151
- }) => vr({
151
+ }) => Rr({
152
152
  cells: n,
153
153
  ensured: e,
154
154
  matrices: { [r]: t },
155
155
  flattenAs: s
156
- }), vr = ({
156
+ }), Rr = ({
157
157
  cells: n = {},
158
158
  ensured: e = {},
159
159
  matrices: t = {},
@@ -248,7 +248,7 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
248
248
  return !0;
249
249
  }
250
250
  return !1;
251
- }, $e = (n, e) => {
251
+ }, Fe = (n, e) => {
252
252
  const { searchQuery: t, searchCaseSensitive: s } = e;
253
253
  let { choosing: r } = e;
254
254
  if (!t)
@@ -297,15 +297,15 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
297
297
  const { top: o, left: a, bottom: c, right: h } = cn(e);
298
298
  let l = 0, u = 0;
299
299
  for (let x = 1; x <= n.getNumCols(); x++) {
300
- const R = ((y = n.getCellByPoint({ y: 0, x }, "SYSTEM")) == null ? void 0 : y.width) || be;
301
- if (l += R, s === 0 && l > a && (s = Math.max(x - $s, 1)), l > h) {
300
+ const v = ((y = n.getCellByPoint({ y: 0, x }, "SYSTEM")) == null ? void 0 : y.width) || be;
301
+ if (l += v, s === 0 && l > a && (s = Math.max(x - $s, 1)), l > h) {
302
302
  i = Math.min(x + $s, n.getNumCols());
303
303
  break;
304
304
  }
305
305
  }
306
306
  for (let x = 1; x <= n.getNumRows(); x++) {
307
- const R = ((b = n.getCellByPoint({ y: x, x: 0 }, "SYSTEM")) == null ? void 0 : b.height) || me;
308
- if (u += R, t === 0 && u > o && (t = Math.max(x - Fs, 1)), u > c) {
307
+ const v = ((b = n.getCellByPoint({ y: x, x: 0 }, "SYSTEM")) == null ? void 0 : b.height) || me;
308
+ if (u += v, t === 0 && u > o && (t = Math.max(x - Fs, 1)), u > c) {
309
309
  r = Math.min(x + Fs, n.getNumRows());
310
310
  break;
311
311
  }
@@ -352,9 +352,9 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
352
352
  right: r
353
353
  } = n.getBoundingClientRect(), i = Array.from(n.querySelectorAll(".gs-th-left")), o = Array.from(n.querySelectorAll(".gs-th-top")), a = St(i, (u) => u.top, e, "y"), c = St(i, (u) => u.bottom, s, "y"), h = St(o, (u) => u.left, t, "x"), l = St(o, (u) => u.right, r, "x");
354
354
  return { top: a, left: h, bottom: c, right: l };
355
- }, At = 1, Rt = 2, Ut = 4, Xt = 8, zt = 16, Wt = 32, nt = 64, wt = 128, Me = 256, jt = 512, ms = 8192, at = 1024, Zt = 2048, Kt = 4096, ln = 16384, Cr = 0, un = nt | wt, mt = Me | jt | ms | at | Zt | Kt | ln, hn = Ut | Xt, dn = zt | Wt, fn = hn | dn, gn = At | Rt, Mr = mt | gn | fn | un, Z = (n, e) => n === void 0 ? !1 : (n & e) === e, Or = (n) => {
355
+ }, At = 1, vt = 2, Ut = 4, Xt = 8, zt = 16, Wt = 32, nt = 64, wt = 128, Me = 256, jt = 512, ms = 8192, at = 1024, Zt = 2048, Kt = 4096, ln = 16384, Cr = 0, un = nt | wt, mt = Me | jt | ms | at | Zt | Kt | ln, hn = Ut | Xt, dn = zt | Wt, fn = hn | dn, gn = At | vt, Mr = mt | gn | fn | un, Z = (n, e) => n === void 0 ? !1 : (n & e) === e, kr = (n) => {
356
356
  const e = [];
357
- return Z(n, At) && e.push("RemoveRow"), Z(n, Rt) && e.push("RemoveCol"), Z(n, Ut) && e.push("InsertRowAbove"), Z(n, Xt) && e.push("InsertRowBelow"), Z(n, zt) && e.push("InsertColLeft"), Z(n, Wt) && e.push("InsertColRight"), Z(n, nt) && e.push("MoveFrom"), Z(n, wt) && e.push("MoveTo"), Z(n, Me) && e.push("Write"), Z(n, jt) && e.push("Style"), Z(n, at) && e.push("Resize"), Z(n, Zt) && e.push("SetRenderer"), Z(n, Kt) && e.push("SetParser"), e;
357
+ return Z(n, At) && e.push("RemoveRow"), Z(n, vt) && e.push("RemoveCol"), Z(n, Ut) && e.push("InsertRowAbove"), Z(n, Xt) && e.push("InsertRowBelow"), Z(n, zt) && e.push("InsertColLeft"), Z(n, Wt) && e.push("InsertColRight"), Z(n, nt) && e.push("MoveFrom"), Z(n, wt) && e.push("MoveTo"), Z(n, Me) && e.push("Write"), Z(n, jt) && e.push("Style"), Z(n, at) && e.push("Resize"), Z(n, Zt) && e.push("SetRenderer"), Z(n, Kt) && e.push("SetParser"), e;
358
358
  }, wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
359
359
  __proto__: null,
360
360
  Add: fn,
@@ -371,7 +371,7 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
371
371
  MoveTo: wt,
372
372
  NoOperation: Cr,
373
373
  ReadOnly: Mr,
374
- RemoveCols: Rt,
374
+ RemoveCols: vt,
375
375
  RemoveRows: At,
376
376
  Resize: at,
377
377
  SetParser: Kt,
@@ -380,31 +380,31 @@ const ns = 86400, gr = "YYYY-MM-DDTHH:mm:ss.SSSZ", pr = {
380
380
  Style: jt,
381
381
  Update: mt,
382
382
  Write: Me,
383
- debugOperations: Or,
383
+ debugOperations: kr,
384
384
  hasOperation: Z
385
385
  }, Symbol.toStringTag, { value: "Module" }));
386
386
  function bs(n) {
387
387
  return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
388
388
  }
389
- var Nt = { exports: {} }, kr = Nt.exports, Us;
389
+ var Nt = { exports: {} }, Or = Nt.exports, Us;
390
390
  function Dr() {
391
391
  return Us || (Us = 1, function(n, e) {
392
392
  (function(t, s) {
393
393
  n.exports = s();
394
- })(kr, function() {
394
+ })(Or, function() {
395
395
  var t = 1e3, s = 6e4, r = 36e5, i = "millisecond", o = "second", a = "minute", c = "hour", h = "day", l = "week", u = "month", d = "quarter", f = "year", g = "date", p = "Invalid Date", y = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, b = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, x = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(F) {
396
396
  var E = ["th", "st", "nd", "rd"], w = F % 100;
397
397
  return "[" + F + (E[(w - 20) % 10] || E[w] || E[0]) + "]";
398
- } }, R = function(F, E, w) {
398
+ } }, v = function(F, E, w) {
399
399
  var M = String(F);
400
400
  return !M || M.length >= E ? F : "" + Array(E + 1 - M.length).join(w) + F;
401
- }, A = { s: R, z: function(F) {
402
- var E = -F.utcOffset(), w = Math.abs(E), M = Math.floor(w / 60), k = w % 60;
403
- return (E <= 0 ? "+" : "-") + R(M, 2, "0") + ":" + R(k, 2, "0");
401
+ }, A = { s: v, z: function(F) {
402
+ var E = -F.utcOffset(), w = Math.abs(E), M = Math.floor(w / 60), O = w % 60;
403
+ return (E <= 0 ? "+" : "-") + v(M, 2, "0") + ":" + v(O, 2, "0");
404
404
  }, m: function F(E, w) {
405
405
  if (E.date() < w.date()) return -F(w, E);
406
- var M = 12 * (w.year() - E.year()) + (w.month() - E.month()), k = E.clone().add(M, u), H = w - k < 0, L = E.clone().add(M + (H ? -1 : 1), u);
407
- return +(-(M + (w - k) / (H ? k - L : L - k)) || 0);
406
+ var M = 12 * (w.year() - E.year()) + (w.month() - E.month()), O = E.clone().add(M, u), H = w - O < 0, L = E.clone().add(M + (H ? -1 : 1), u);
407
+ return +(-(M + (w - O) / (H ? O - L : L - O)) || 0);
408
408
  }, a: function(F) {
409
409
  return F < 0 ? Math.ceil(F) || 0 : Math.floor(F);
410
410
  }, p: function(F) {
@@ -415,46 +415,46 @@ function Dr() {
415
415
  m[S] = x;
416
416
  var $ = "$isDayjsObject", T = function(F) {
417
417
  return F instanceof B || !(!F || !F[$]);
418
- }, O = function F(E, w, M) {
419
- var k;
418
+ }, k = function F(E, w, M) {
419
+ var O;
420
420
  if (!E) return S;
421
421
  if (typeof E == "string") {
422
422
  var H = E.toLowerCase();
423
- m[H] && (k = H), w && (m[H] = w, k = H);
423
+ m[H] && (O = H), w && (m[H] = w, O = H);
424
424
  var L = E.split("-");
425
- if (!k && L.length > 1) return F(L[0]);
425
+ if (!O && L.length > 1) return F(L[0]);
426
426
  } else {
427
427
  var j = E.name;
428
- m[j] = E, k = j;
428
+ m[j] = E, O = j;
429
429
  }
430
- return !M && k && (S = k), k || !M && S;
430
+ return !M && O && (S = O), O || !M && S;
431
431
  }, N = function(F, E) {
432
432
  if (T(F)) return F.clone();
433
433
  var w = typeof E == "object" ? E : {};
434
434
  return w.date = F, w.args = arguments, new B(w);
435
435
  }, I = A;
436
- I.l = O, I.i = T, I.w = function(F, E) {
436
+ I.l = k, I.i = T, I.w = function(F, E) {
437
437
  return N(F, { locale: E.$L, utc: E.$u, x: E.$x, $offset: E.$offset });
438
438
  };
439
439
  var B = function() {
440
440
  function F(w) {
441
- this.$L = O(w.locale, null, !0), this.parse(w), this.$x = this.$x || w.x || {}, this[$] = !0;
441
+ this.$L = k(w.locale, null, !0), this.parse(w), this.$x = this.$x || w.x || {}, this[$] = !0;
442
442
  }
443
443
  var E = F.prototype;
444
444
  return E.parse = function(w) {
445
445
  this.$d = function(M) {
446
- var k = M.date, H = M.utc;
447
- if (k === null) return /* @__PURE__ */ new Date(NaN);
448
- if (I.u(k)) return /* @__PURE__ */ new Date();
449
- if (k instanceof Date) return new Date(k);
450
- if (typeof k == "string" && !/Z$/i.test(k)) {
451
- var L = k.match(y);
446
+ var O = M.date, H = M.utc;
447
+ if (O === null) return /* @__PURE__ */ new Date(NaN);
448
+ if (I.u(O)) return /* @__PURE__ */ new Date();
449
+ if (O instanceof Date) return new Date(O);
450
+ if (typeof O == "string" && !/Z$/i.test(O)) {
451
+ var L = O.match(y);
452
452
  if (L) {
453
453
  var j = L[2] - 1 || 0, V = (L[7] || "0").substring(0, 3);
454
454
  return H ? new Date(Date.UTC(L[1], j, L[3] || 1, L[4] || 0, L[5] || 0, L[6] || 0, V)) : new Date(L[1], j, L[3] || 1, L[4] || 0, L[5] || 0, L[6] || 0, V);
455
455
  }
456
456
  }
457
- return new Date(k);
457
+ return new Date(O);
458
458
  }(w), this.init();
459
459
  }, E.init = function() {
460
460
  var w = this.$d;
@@ -464,24 +464,24 @@ function Dr() {
464
464
  }, E.isValid = function() {
465
465
  return this.$d.toString() !== p;
466
466
  }, E.isSame = function(w, M) {
467
- var k = N(w);
468
- return this.startOf(M) <= k && k <= this.endOf(M);
467
+ var O = N(w);
468
+ return this.startOf(M) <= O && O <= this.endOf(M);
469
469
  }, E.isAfter = function(w, M) {
470
470
  return N(w) < this.startOf(M);
471
471
  }, E.isBefore = function(w, M) {
472
472
  return this.endOf(M) < N(w);
473
- }, E.$g = function(w, M, k) {
474
- return I.u(w) ? this[M] : this.set(k, w);
473
+ }, E.$g = function(w, M, O) {
474
+ return I.u(w) ? this[M] : this.set(O, w);
475
475
  }, E.unix = function() {
476
476
  return Math.floor(this.valueOf() / 1e3);
477
477
  }, E.valueOf = function() {
478
478
  return this.$d.getTime();
479
479
  }, E.startOf = function(w, M) {
480
- var k = this, H = !!I.u(M) || M, L = I.p(w), j = function(ke, ae) {
481
- var De = I.w(k.$u ? Date.UTC(k.$y, ae, ke) : new Date(k.$y, ae, ke), k);
480
+ var O = this, H = !!I.u(M) || M, L = I.p(w), j = function(Oe, ae) {
481
+ var De = I.w(O.$u ? Date.UTC(O.$y, ae, Oe) : new Date(O.$y, ae, Oe), O);
482
482
  return H ? De : De.endOf(h);
483
- }, V = function(ke, ae) {
484
- return I.w(k.toDate()[ke].apply(k.toDate("s"), (H ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), k);
483
+ }, V = function(Oe, ae) {
484
+ return I.w(O.toDate()[Oe].apply(O.toDate("s"), (H ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), O);
485
485
  }, ee = this.$W, te = this.$M, P = this.$D, G = "set" + (this.$u ? "UTC" : "");
486
486
  switch (L) {
487
487
  case f:
@@ -506,7 +506,7 @@ function Dr() {
506
506
  }, E.endOf = function(w) {
507
507
  return this.startOf(w, !1);
508
508
  }, E.$set = function(w, M) {
509
- var k, H = I.p(w), L = "set" + (this.$u ? "UTC" : ""), j = (k = {}, k[h] = L + "Date", k[g] = L + "Date", k[u] = L + "Month", k[f] = L + "FullYear", k[c] = L + "Hours", k[a] = L + "Minutes", k[o] = L + "Seconds", k[i] = L + "Milliseconds", k)[H], V = H === h ? this.$D + (M - this.$W) : M;
509
+ var O, H = I.p(w), L = "set" + (this.$u ? "UTC" : ""), j = (O = {}, O[h] = L + "Date", O[g] = L + "Date", O[u] = L + "Month", O[f] = L + "FullYear", O[c] = L + "Hours", O[a] = L + "Minutes", O[o] = L + "Seconds", O[i] = L + "Milliseconds", O)[H], V = H === h ? this.$D + (M - this.$W) : M;
510
510
  if (H === u || H === f) {
511
511
  var ee = this.clone().set(g, 1);
512
512
  ee.$d[j](V), ee.init(), this.$d = ee.set(g, Math.min(this.$D, ee.daysInMonth())).$d;
@@ -517,7 +517,7 @@ function Dr() {
517
517
  }, E.get = function(w) {
518
518
  return this[I.p(w)]();
519
519
  }, E.add = function(w, M) {
520
- var k, H = this;
520
+ var O, H = this;
521
521
  w = Number(w);
522
522
  var L = I.p(M), j = function(te) {
523
523
  var P = N(H);
@@ -527,18 +527,18 @@ function Dr() {
527
527
  if (L === f) return this.set(f, this.$y + w);
528
528
  if (L === h) return j(1);
529
529
  if (L === l) return j(7);
530
- var V = (k = {}, k[a] = s, k[c] = r, k[o] = t, k)[L] || 1, ee = this.$d.getTime() + w * V;
530
+ var V = (O = {}, O[a] = s, O[c] = r, O[o] = t, O)[L] || 1, ee = this.$d.getTime() + w * V;
531
531
  return I.w(ee, this);
532
532
  }, E.subtract = function(w, M) {
533
533
  return this.add(-1 * w, M);
534
534
  }, E.format = function(w) {
535
- var M = this, k = this.$locale();
536
- if (!this.isValid()) return k.invalidDate || p;
537
- var H = w || "YYYY-MM-DDTHH:mm:ssZ", L = I.z(this), j = this.$H, V = this.$m, ee = this.$M, te = k.weekdays, P = k.months, G = k.meridiem, le = function(ae, De, Ze, et) {
535
+ var M = this, O = this.$locale();
536
+ if (!this.isValid()) return O.invalidDate || p;
537
+ var H = w || "YYYY-MM-DDTHH:mm:ssZ", L = I.z(this), j = this.$H, V = this.$m, ee = this.$M, te = O.weekdays, P = O.months, G = O.meridiem, le = function(ae, De, Ze, et) {
538
538
  return ae && (ae[De] || ae(M, H)) || Ze[De].slice(0, et);
539
539
  }, Ye = function(ae) {
540
540
  return I.s(j % 12 || 12, ae, "0");
541
- }, ke = G || function(ae, De, Ze) {
541
+ }, Oe = G || function(ae, De, Ze) {
542
542
  var et = ae < 12 ? "AM" : "PM";
543
543
  return Ze ? et.toLowerCase() : et;
544
544
  };
@@ -554,7 +554,7 @@ function Dr() {
554
554
  case "MM":
555
555
  return I.s(ee + 1, 2, "0");
556
556
  case "MMM":
557
- return le(k.monthsShort, ee, P, 3);
557
+ return le(O.monthsShort, ee, P, 3);
558
558
  case "MMMM":
559
559
  return le(P, ee);
560
560
  case "D":
@@ -564,9 +564,9 @@ function Dr() {
564
564
  case "d":
565
565
  return String(M.$W);
566
566
  case "dd":
567
- return le(k.weekdaysMin, M.$W, te, 2);
567
+ return le(O.weekdaysMin, M.$W, te, 2);
568
568
  case "ddd":
569
- return le(k.weekdaysShort, M.$W, te, 3);
569
+ return le(O.weekdaysShort, M.$W, te, 3);
570
570
  case "dddd":
571
571
  return te[M.$W];
572
572
  case "H":
@@ -578,9 +578,9 @@ function Dr() {
578
578
  case "hh":
579
579
  return Ye(2);
580
580
  case "a":
581
- return ke(j, V, !0);
581
+ return Oe(j, V, !0);
582
582
  case "A":
583
- return ke(j, V, !1);
583
+ return Oe(j, V, !1);
584
584
  case "m":
585
585
  return String(V);
586
586
  case "mm":
@@ -599,7 +599,7 @@ function Dr() {
599
599
  });
600
600
  }, E.utcOffset = function() {
601
601
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
602
- }, E.diff = function(w, M, k) {
602
+ }, E.diff = function(w, M, O) {
603
603
  var H, L = this, j = I.p(M), V = N(w), ee = (V.utcOffset() - this.utcOffset()) * s, te = this - V, P = function() {
604
604
  return I.m(L, V);
605
605
  };
@@ -631,15 +631,15 @@ function Dr() {
631
631
  default:
632
632
  H = te;
633
633
  }
634
- return k ? H : I.a(H);
634
+ return O ? H : I.a(H);
635
635
  }, E.daysInMonth = function() {
636
636
  return this.endOf(u).$D;
637
637
  }, E.$locale = function() {
638
638
  return m[this.$L];
639
639
  }, E.locale = function(w, M) {
640
640
  if (!w) return this.$L;
641
- var k = this.clone(), H = O(w, M, !0);
642
- return H && (k.$L = H), k;
641
+ var O = this.clone(), H = k(w, M, !0);
642
+ return H && (O.$L = H), O;
643
643
  }, E.clone = function() {
644
644
  return I.w(this.$d, this);
645
645
  }, E.toDate = function() {
@@ -658,7 +658,7 @@ function Dr() {
658
658
  };
659
659
  }), N.extend = function(F, E) {
660
660
  return F.$i || (F(E, B, N), F.$i = !0), N;
661
- }, N.locale = O, N.isDayjs = T, N.unix = function(F) {
661
+ }, N.locale = k, N.isDayjs = T, N.unix = function(F) {
662
662
  return N(1e3 * F);
663
663
  }, N.en = m[S], N.Ls = m, N.p = {}, N;
664
664
  });
@@ -1378,13 +1378,13 @@ class wn {
1378
1378
  for (let l = 0; l < i.height; l++) {
1379
1379
  const u = this.getChangePatterns(s[l], "");
1380
1380
  for (let d = 0; d < i.width; d++) {
1381
- const f = (c = s[l % r.height]) == null ? void 0 : c[d % r.width], g = t > 0 ? this.dst.left + d : this.dst.right - d, p = t > 0 ? d % r.width : (r.width - 1 - d % r.width) % r.width, y = { y: this.dst.top + l, x: g }, b = this.table.getId(y), x = u[p].next().value, R = rt(x, {
1381
+ const f = (c = s[l % r.height]) == null ? void 0 : c[d % r.width], g = t > 0 ? this.dst.left + d : this.dst.right - d, p = t > 0 ? d % r.width : (r.width - 1 - d % r.width) % r.width, y = { y: this.dst.top + l, x: g }, b = this.table.getId(y), x = u[p].next().value, v = rt(x, {
1382
1382
  dependency: b,
1383
1383
  table: this.table
1384
1384
  });
1385
1385
  o[re(y)] = {
1386
1386
  ...f,
1387
- value: R
1387
+ value: v
1388
1388
  };
1389
1389
  }
1390
1390
  }
@@ -1543,7 +1543,7 @@ const xn = new RegExp("(.+?)(\\d+)$"), qe = (n) => {
1543
1543
  }
1544
1544
  return { prefix: "", number: 0 };
1545
1545
  };
1546
- class Ot {
1546
+ class kt {
1547
1547
  constructor(e) {
1548
1548
  this.timeDelta = J.create(), this.numericDelta = 0, this.equidistant = !0, this.first = e, this.nexts = [], this.kind = this.discriminate(e);
1549
1549
  }
@@ -1557,7 +1557,7 @@ class Ot {
1557
1557
  add(e) {
1558
1558
  const t = this.discriminate(e);
1559
1559
  if (this.kind !== t || t === "other" || t === "formula")
1560
- return new Ot(e);
1560
+ return new kt(e);
1561
1561
  if (this.nexts.length === 0)
1562
1562
  switch (t) {
1563
1563
  case "date": {
@@ -1596,7 +1596,7 @@ class Ot {
1596
1596
  const i = t.nexts[r], { prefix: o, number: a } = qe(i);
1597
1597
  if (s !== o) {
1598
1598
  const c = this.nexts.splice(r, this.nexts.length);
1599
- t = new Ot(c.splice(0, 1)[0]), c.forEach(t.add.bind(t)), e.push(t, ...t.subdivide());
1599
+ t = new kt(c.splice(0, 1)[0]), c.forEach(t.add.bind(t)), e.push(t, ...t.subdivide());
1600
1600
  break;
1601
1601
  } else {
1602
1602
  const { number: c } = qe(t.first);
@@ -1611,7 +1611,7 @@ class Ot {
1611
1611
  }
1612
1612
  function ci(n) {
1613
1613
  var s, r;
1614
- let e = new Ot((s = n[0]) == null ? void 0 : s.value);
1614
+ let e = new kt((s = n[0]) == null ? void 0 : s.value);
1615
1615
  const t = [e];
1616
1616
  for (let i = 1; i < n.length; i++) {
1617
1617
  const o = (r = n[i]) == null ? void 0 : r.value, a = e.add(o);
@@ -1653,7 +1653,7 @@ class ui extends W {
1653
1653
  const s = t, { tableReactive: r } = e;
1654
1654
  return r.current == null ? e : {
1655
1655
  ...e,
1656
- ...$e(r.current, { ...e, searchQuery: s }),
1656
+ ...Fe(r.current, { ...e, searchQuery: s }),
1657
1657
  searchQuery: s
1658
1658
  };
1659
1659
  }
@@ -1664,7 +1664,7 @@ class hi extends W {
1664
1664
  const s = t, { tableReactive: r } = e;
1665
1665
  return r.current == null ? e : {
1666
1666
  ...e,
1667
- ...$e(r.current, { ...e, searchCaseSensitive: s }),
1667
+ ...Fe(r.current, { ...e, searchCaseSensitive: s }),
1668
1668
  searchCaseSensitive: s
1669
1669
  };
1670
1670
  }
@@ -1694,7 +1694,7 @@ class pi extends W {
1694
1694
  return {
1695
1695
  ...e,
1696
1696
  tableReactive: { current: r },
1697
- ...$e(r, e),
1697
+ ...Fe(r, e),
1698
1698
  ...Ht(e, r),
1699
1699
  selectingZone: i,
1700
1700
  leftHeaderSelecting: !1,
@@ -1703,7 +1703,7 @@ class pi extends W {
1703
1703
  };
1704
1704
  }
1705
1705
  }
1706
- const Rn = new pi().bind();
1706
+ const vn = new pi().bind();
1707
1707
  class mi extends W {
1708
1708
  reduce(e, t) {
1709
1709
  return {
@@ -1745,13 +1745,13 @@ class Ai extends W {
1745
1745
  return {
1746
1746
  ...e,
1747
1747
  tableReactive: { current: t },
1748
- ...$e(t, e),
1748
+ ...Fe(t, e),
1749
1749
  ...Ht(e, t)
1750
1750
  };
1751
1751
  }
1752
1752
  }
1753
1753
  const qt = new Ai().bind();
1754
- class Ri extends W {
1754
+ class vi extends W {
1755
1755
  reduce(e, t) {
1756
1756
  return {
1757
1757
  ...e,
@@ -1759,7 +1759,7 @@ class Ri extends W {
1759
1759
  };
1760
1760
  }
1761
1761
  }
1762
- const vi = new Ri().bind();
1762
+ const Ri = new vi().bind();
1763
1763
  class Si extends W {
1764
1764
  reduce(e, t) {
1765
1765
  return {
@@ -1831,7 +1831,7 @@ class Ci extends W {
1831
1831
  left: s.x,
1832
1832
  bottom: s.y + S,
1833
1833
  right: s.x + m
1834
- }, T = Gt(Te($)), O = o.move({
1834
+ }, T = Gt(Te($)), k = o.move({
1835
1835
  srcTable: u,
1836
1836
  src: A,
1837
1837
  dst: $,
@@ -1850,10 +1850,10 @@ class Ci extends W {
1850
1850
  });
1851
1851
  return {
1852
1852
  ...e,
1853
- ...$e(O, e),
1854
- tableReactive: { current: O },
1853
+ ...Fe(k, e),
1854
+ tableReactive: { current: k },
1855
1855
  selectingZone: T,
1856
- inputting: O.stringify({ point: s, refEvaluation: "RAW" }),
1856
+ inputting: k.stringify({ point: s, refEvaluation: "RAW" }),
1857
1857
  callback: ({ tableReactive: N }) => {
1858
1858
  a.transmit({
1859
1859
  cutting: !1,
@@ -1914,13 +1914,13 @@ class Ci extends W {
1914
1914
  }
1915
1915
  });
1916
1916
  }
1917
- const R = Gt(Te(d));
1917
+ const v = Gt(Te(d));
1918
1918
  return {
1919
1919
  ...e,
1920
1920
  tableReactive: { current: y },
1921
- selectingZone: R,
1921
+ selectingZone: v,
1922
1922
  inputting: y.stringify({ point: s, refEvaluation: "RAW" }),
1923
- ...$e(y, e),
1923
+ ...Fe(y, e),
1924
1924
  callback: ({ tableReactive: A }) => {
1925
1925
  a.transmit({
1926
1926
  copyingZone: tt
@@ -1929,7 +1929,7 @@ class Ci extends W {
1929
1929
  };
1930
1930
  }
1931
1931
  }
1932
- const kt = new Ci().bind();
1932
+ const Ot = new Ci().bind();
1933
1933
  class Mi extends W {
1934
1934
  reduce(e, t) {
1935
1935
  const { tableReactive: s } = e;
@@ -1947,8 +1947,8 @@ class Mi extends W {
1947
1947
  };
1948
1948
  }
1949
1949
  }
1950
- const vn = new Mi().bind();
1951
- class Oi extends W {
1950
+ const Rn = new Mi().bind();
1951
+ class ki extends W {
1952
1952
  reduce(e, t) {
1953
1953
  return {
1954
1954
  ...e,
@@ -1957,8 +1957,8 @@ class Oi extends W {
1957
1957
  };
1958
1958
  }
1959
1959
  }
1960
- const Pe = new Oi().bind();
1961
- class ki extends W {
1960
+ const Pe = new ki().bind();
1961
+ class Oi extends W {
1962
1962
  reduce(e, t) {
1963
1963
  return {
1964
1964
  ...e,
@@ -1968,7 +1968,7 @@ class ki extends W {
1968
1968
  };
1969
1969
  }
1970
1970
  }
1971
- const Oe = new ki().bind();
1971
+ const ke = new Oi().bind();
1972
1972
  class Di extends W {
1973
1973
  reduce(e, t) {
1974
1974
  const { range: s, numCols: r } = t, { start: i, end: o } = s;
@@ -2054,7 +2054,7 @@ class Yi extends W {
2054
2054
  });
2055
2055
  return {
2056
2056
  ...e,
2057
- ...$e(h, e),
2057
+ ...Fe(h, e),
2058
2058
  tableReactive: { current: h },
2059
2059
  callback: ({ tableReactive: l }) => {
2060
2060
  c.wire.transmit({
@@ -2098,7 +2098,7 @@ class Bi extends W {
2098
2098
  }
2099
2099
  }), {
2100
2100
  ...e,
2101
- ...$e(o, e),
2101
+ ...Fe(o, e),
2102
2102
  tableReactive: { current: o }
2103
2103
  });
2104
2104
  }
@@ -2113,14 +2113,14 @@ class Li extends W {
2113
2113
  if (i == null)
2114
2114
  return e;
2115
2115
  if (i.dstSheetId !== r.sheetId) {
2116
- const { sync: a, store: c } = r.wire.contextsBySheetId[i.dstSheetId];
2117
- return a(Fe({ ...c, ...i.undoReflection })), e;
2116
+ const { dispatch: a, store: c } = r.wire.contextsBySheetId[i.dstSheetId];
2117
+ return a($e({ ...c, ...i.undoReflection })), e;
2118
2118
  }
2119
2119
  return {
2120
2120
  ...e,
2121
2121
  ...Ht(e, r),
2122
2122
  ...i.undoReflection,
2123
- ...$e(r, e),
2123
+ ...Fe(r, e),
2124
2124
  tableReactive: { current: r },
2125
2125
  callback: o
2126
2126
  };
@@ -2136,14 +2136,14 @@ class Hi extends W {
2136
2136
  if (i == null)
2137
2137
  return e;
2138
2138
  if (i.dstSheetId !== r.sheetId) {
2139
- const { sync: c, store: h } = r.wire.contextsBySheetId[i.dstSheetId];
2140
- return c(Fe({ ...h, ...i.redoReflection })), e;
2139
+ const { dispatch: c, store: h } = r.wire.contextsBySheetId[i.dstSheetId];
2140
+ return c($e({ ...h, ...i.redoReflection })), e;
2141
2141
  }
2142
2142
  return {
2143
2143
  ...e,
2144
2144
  ...Ht(e, r),
2145
2145
  ...i.redoReflection,
2146
- ...$e(r, e),
2146
+ ...Fe(r, e),
2147
2147
  tableReactive: { current: r },
2148
2148
  callback: a
2149
2149
  };
@@ -2152,7 +2152,7 @@ class Hi extends W {
2152
2152
  const Dt = new Hi().bind();
2153
2153
  class _i extends W {
2154
2154
  reduce(e, t) {
2155
- var m, $, T, O;
2155
+ var m, $, T, k;
2156
2156
  const { shiftKey: s, deltaY: r, deltaX: i, numRows: o, numCols: a } = t, { choosing: c, tableReactive: h, tabularRef: l } = e, u = h.current;
2157
2157
  if (u == null)
2158
2158
  return e;
@@ -2171,7 +2171,7 @@ class _i extends W {
2171
2171
  const [p, y] = [f + r, g + i];
2172
2172
  if (p < 1 || o < p || y < 1 || a < y)
2173
2173
  return e;
2174
- let { y: b, x, height: R, width: A } = e.editorRect;
2174
+ let { y: b, x, height: v, width: A } = e.editorRect;
2175
2175
  if (r > 0)
2176
2176
  for (let N = f; N < p; N++)
2177
2177
  b += ((m = u.getCellByPoint({ y: N, x: 0 }, "SYSTEM")) == null ? void 0 : m.height) || me;
@@ -2183,13 +2183,13 @@ class _i extends W {
2183
2183
  x += ((T = u.getCellByPoint({ y: 0, x: N }, "SYSTEM")) == null ? void 0 : T.width) || be;
2184
2184
  else if (i < 0)
2185
2185
  for (let N = g - 1; N >= y; N--)
2186
- x -= ((O = u.getCellByPoint({ y: 0, x: N }, "SYSTEM")) == null ? void 0 : O.width) || be;
2186
+ x -= ((k = u.getCellByPoint({ y: 0, x: N }, "SYSTEM")) == null ? void 0 : k.width) || be;
2187
2187
  const S = u.getCellByPoint({ y: p, x: y }, "SYSTEM");
2188
- return R = (S == null ? void 0 : S.height) || me, A = (S == null ? void 0 : S.width) || be, ps(u, l.current, { y: p, x: y }), {
2188
+ return v = (S == null ? void 0 : S.height) || me, A = (S == null ? void 0 : S.width) || be, ps(u, l.current, { y: p, x: y }), {
2189
2189
  ...e,
2190
2190
  selectingZone: { startY: -1, startX: -1, endY: -1, endX: -1 },
2191
2191
  choosing: { y: p, x: y },
2192
- editorRect: { y: b, x, height: R, width: A }
2192
+ editorRect: { y: b, x, height: v, width: A }
2193
2193
  };
2194
2194
  }
2195
2195
  }
@@ -2203,9 +2203,9 @@ class Ui extends W {
2203
2203
  if (u == null)
2204
2204
  return e;
2205
2205
  let { y: d, x: f, height: g, width: p } = e.editorRect;
2206
- const { y, x: b } = a, x = ie(c), { top: R, left: A, bottom: S, right: m } = x;
2206
+ const { y, x: b } = a, x = ie(c), { top: v, left: A, bottom: S, right: m } = x;
2207
2207
  let [$, T] = [y + i, b + o];
2208
- if ($ < R && R !== -1 && (i = S - $, $ = S, T > A ? (T--, o--) : (o = m - T, T = m)), $ > S && S !== -1 && (i = R - $, $ = R, T < m ? (T++, o++) : (o = A - T, T = A)), T < A && A !== -1 && (o = m - T, T = m, $ > R ? ($--, i--) : (i = S - $, $ = S)), T > m && m !== -1 && (o = A - T, T = A, $ < S ? ($++, i++) : (i = R - $, $ = R)), $ < 1 || s < $ || T < 1 || r < T)
2208
+ if ($ < v && v !== -1 && (i = S - $, $ = S, T > A ? (T--, o--) : (o = m - T, T = m)), $ > S && S !== -1 && (i = v - $, $ = v, T < m ? (T++, o++) : (o = A - T, T = A)), T < A && A !== -1 && (o = m - T, T = m, $ > v ? ($--, i--) : (i = S - $, $ = S)), T > m && m !== -1 && (o = A - T, T = A, $ < S ? ($++, i++) : (i = v - $, $ = v)), $ < 1 || s < $ || T < 1 || r < T)
2209
2209
  return e;
2210
2210
  if (i > 0)
2211
2211
  for (let F = y; F < $; F++)
@@ -2219,8 +2219,8 @@ class Ui extends W {
2219
2219
  else if (o < 0)
2220
2220
  for (let F = b - 1; F >= T; F--)
2221
2221
  f -= ((z = u.getCellByPoint({ y: 0, x: F }, "SYSTEM")) == null ? void 0 : z.width) || be;
2222
- const O = u.getCellByPoint({ y: $, x: T }, "SYSTEM");
2223
- return g = (O == null ? void 0 : O.height) || me, p = (O == null ? void 0 : O.width) || be, ps(u, l.current, { y: $, x: T }), {
2222
+ const k = u.getCellByPoint({ y: $, x: T }, "SYSTEM");
2223
+ return g = (k == null ? void 0 : k.height) || me, p = (k == null ? void 0 : k.width) || be, ps(u, l.current, { y: $, x: T }), {
2224
2224
  ...e,
2225
2225
  choosing: { y: $, x: T },
2226
2226
  editorRect: { y: d, x: f, height: g, width: p }
@@ -2384,7 +2384,7 @@ class Ki extends W {
2384
2384
  });
2385
2385
  }
2386
2386
  }
2387
- const On = new Ki().bind();
2387
+ const kn = new Ki().bind();
2388
2388
  class Vi extends W {
2389
2389
  reduce(e, t) {
2390
2390
  const { numCols: s, x: r, operator: i } = t, { tableReactive: o, selectingZone: a, choosing: c, editorRef: h } = e, l = o.current;
@@ -2410,7 +2410,7 @@ class Vi extends W {
2410
2410
  });
2411
2411
  }
2412
2412
  }
2413
- const kn = new Vi().bind();
2413
+ const On = new Vi().bind();
2414
2414
  class qi extends W {
2415
2415
  reduce(e, t) {
2416
2416
  return {
@@ -2419,14 +2419,14 @@ class qi extends W {
2419
2419
  };
2420
2420
  }
2421
2421
  }
2422
- const Fe = new qi().bind(), Ac = {
2422
+ const $e = new qi().bind(), Ac = {
2423
2423
  blur: Ei,
2424
2424
  copy: ws,
2425
2425
  cut: xs,
2426
- paste: kt,
2427
- escape: vn,
2426
+ paste: Ot,
2427
+ escape: Rn,
2428
2428
  choose: Pe,
2429
- select: Oe,
2429
+ select: ke,
2430
2430
  selectRows: Sn,
2431
2431
  selectCols: Nn,
2432
2432
  drag: Ee,
@@ -2441,8 +2441,8 @@ const Fe = new qi().bind(), Ac = {
2441
2441
  insertRowsBelow: Tn,
2442
2442
  insertColsLeft: Cn,
2443
2443
  insertColsRight: Mn,
2444
- removeRows: On,
2445
- removeCols: kn
2444
+ removeRows: kn,
2445
+ removeCols: On
2446
2446
  }, Ft = (n) => {
2447
2447
  const { selectingZone: e, choosing: t, editorRef: s, tableReactive: r } = n, i = r.current;
2448
2448
  if (!i)
@@ -2556,7 +2556,7 @@ const Fe = new qi().bind(), Ac = {
2556
2556
  }, Pn = ({ children: n, style: e, className: t = "", ...s }) => {
2557
2557
  const { document: r } = no();
2558
2558
  return r == null ? null : cr(
2559
- /* @__PURE__ */ v("div", { ...s, className: `gs-fixed ${t}`, style: e, children: n }),
2559
+ /* @__PURE__ */ R("div", { ...s, className: `gs-fixed ${t}`, style: e, children: n }),
2560
2560
  r.body
2561
2561
  );
2562
2562
  }, Yn = (n, e = !1) => {
@@ -2573,13 +2573,13 @@ const Fe = new qi().bind(), Ac = {
2573
2573
  const p = Array.from(g.querySelectorAll("td, th")), y = [];
2574
2574
  let b = 0;
2575
2575
  for (const x of p) {
2576
- const R = ((d = x.textContent) == null ? void 0 : d.trim()) ?? "", A = e ? void 0 : (() => {
2576
+ const v = ((d = x.textContent) == null ? void 0 : d.trim()) ?? "", A = e ? void 0 : (() => {
2577
2577
  const $ = Vs(x.firstElementChild);
2578
2578
  return { ...Vs(x), ...$ };
2579
2579
  })();
2580
2580
  for (; h.has(`${f}-${++b}`); )
2581
2581
  y.push({ value: "", style: A, skip: !0 });
2582
- y.push({ value: R, style: A });
2582
+ y.push({ value: v, style: A });
2583
2583
  const S = parseInt(x.getAttribute("rowspan") ?? "1", 10), m = parseInt(x.getAttribute("colspan") ?? "1", 10);
2584
2584
  for (let $ = 0; $ < S; $++)
2585
2585
  for (let T = 0; T < m; T++)
@@ -2713,7 +2713,7 @@ const Bn = (n, e = " ") => {
2713
2713
  "UL"
2714
2714
  ]), io = ({ mode: n }) => {
2715
2715
  var Es, Is, Ts;
2716
- const { store: e, dispatch: t } = Re(ve), [s, r] = pe(0), [i, o] = pe(!1), {
2716
+ const { store: e, dispatch: t } = ve(Re), [s, r] = pe(0), [i, o] = pe(!1), {
2717
2717
  choosing: a,
2718
2718
  inputting: c,
2719
2719
  selectingZone: h,
@@ -2726,19 +2726,19 @@ const Bn = (n, e = " ") => {
2726
2726
  editorRef: y,
2727
2727
  largeEditorRef: b,
2728
2728
  searchInputRef: x,
2729
- editingOnEnter: R,
2729
+ editingOnEnter: v,
2730
2730
  tableReactive: A,
2731
2731
  sheetId: S
2732
2732
  } = e, m = A.current;
2733
2733
  if (!m)
2734
2734
  return null;
2735
- const T = m.getPolicyByPoint(a).getOptions(), O = c.toLocaleLowerCase(), N = T.map((D) => {
2735
+ const T = m.getPolicyByPoint(a).getOptions(), k = c.toLocaleLowerCase(), N = T.map((D) => {
2736
2736
  const X = D.keywords ?? [String(D.value)];
2737
2737
  let se = { index: -1, startsWith: !1, keyword: "" };
2738
2738
  for (const we of X) {
2739
- const Be = we.toLowerCase(), ce = Be.indexOf(O);
2739
+ const Be = we.toLowerCase(), ce = Be.indexOf(k);
2740
2740
  if (ce !== -1) {
2741
- const ut = Be.startsWith(O);
2741
+ const ut = Be.startsWith(k);
2742
2742
  (se.index === -1 || ce < se.index || ce === se.index && ut && !se.startsWith) && (se = { index: ce, startsWith: ut, keyword: we });
2743
2743
  }
2744
2744
  }
@@ -2759,7 +2759,7 @@ const Bn = (n, e = " ") => {
2759
2759
  }, [u, m, S]), q(() => {
2760
2760
  eo(y.current);
2761
2761
  }, [c, u, y]);
2762
- const { y: I, x: B } = a, z = `${Ce(I)}`, E = `${xe(B)}${z}`, w = u === E, M = m.getCellByPoint({ y: I, x: B }, "SYSTEM"), k = m.stringify({ point: a, cell: M, refEvaluation: "RAW" }), [H, L] = pe(k), j = _(
2762
+ const { y: I, x: B } = a, z = `${Ce(I)}`, E = `${xe(B)}${z}`, w = u === E, M = m.getCellByPoint({ y: I, x: B }, "SYSTEM"), O = m.stringify({ point: a, cell: M, refEvaluation: "RAW" }), [H, L] = pe(O), j = _(
2763
2763
  (D) => {
2764
2764
  const X = N[D];
2765
2765
  if (X) {
@@ -2773,21 +2773,21 @@ const Bn = (n, e = " ") => {
2773
2773
  [N, m, E]
2774
2774
  );
2775
2775
  q(() => {
2776
- L(k), t(ge(k)), to(y.current, m, a);
2777
- }, [a, k, t, y, m]);
2776
+ L(O), t(ge(O)), to(y.current, m, a);
2777
+ }, [a, O, t, y, m]);
2778
2778
  const { y: V, x: ee, height: te, width: P } = l, G = _(
2779
2779
  (D) => {
2780
2780
  H !== D && t(lt({ value: D })), L(D);
2781
2781
  },
2782
2782
  [H]
2783
- ), le = k.split(`
2784
- `).length, [Ye, ke] = pe(!1), ae = _(
2783
+ ), le = O.split(`
2784
+ `).length, [Ye, Oe] = pe(!1), ae = _(
2785
2785
  (D) => {
2786
2786
  var we, Be;
2787
2787
  if (Ye)
2788
2788
  return;
2789
- D.key === "Meta" || D.key === "Control" || (ke(!0), requestAnimationFrame(() => {
2790
- ke(!1);
2789
+ D.key === "Meta" || D.key === "Control" || (Oe(!0), requestAnimationFrame(() => {
2790
+ Oe(!1);
2791
2791
  }));
2792
2792
  const X = D.currentTarget, se = D.shiftKey;
2793
2793
  switch (D.key) {
@@ -2808,7 +2808,7 @@ const Bn = (n, e = " ") => {
2808
2808
  if (D.nativeEvent.isComposing)
2809
2809
  return !1;
2810
2810
  N.length ? j(s) : (G(X.value), t(he("")), t(ge("")));
2811
- } else if (R && h.endY === -1) {
2811
+ } else if (v && h.endY === -1) {
2812
2812
  const ce = document.createEvent("MouseEvents");
2813
2813
  return ce.initEvent("dblclick", !0, !0), X.dispatchEvent(ce), D.preventDefault(), !1;
2814
2814
  }
@@ -2835,7 +2835,7 @@ const Bn = (n, e = " ") => {
2835
2835
  case "NumLock":
2836
2836
  return !1;
2837
2837
  case "Escape":
2838
- return t(vn(null)), t(bt(void 0)), t(ge(H)), !1;
2838
+ return t(Rn(null)), t(bt(void 0)), t(ge(H)), !1;
2839
2839
  case "ArrowLeft":
2840
2840
  if (!w)
2841
2841
  return t(
@@ -2891,7 +2891,7 @@ const Bn = (n, e = " ") => {
2891
2891
  case "a":
2892
2892
  if ((D.ctrlKey || D.metaKey) && !w)
2893
2893
  return D.preventDefault(), t(
2894
- Oe({
2894
+ ke({
2895
2895
  startY: 1,
2896
2896
  startX: 1,
2897
2897
  endY: m.getNumRows(),
@@ -2960,7 +2960,7 @@ const Bn = (n, e = " ") => {
2960
2960
  w,
2961
2961
  N,
2962
2962
  s,
2963
- R,
2963
+ v,
2964
2964
  h,
2965
2965
  H,
2966
2966
  m,
@@ -2983,13 +2983,13 @@ const Bn = (n, e = " ") => {
2983
2983
  return;
2984
2984
  }
2985
2985
  const X = D.currentTarget;
2986
- w || (t(ge(k)), t(he(E)), requestAnimationFrame(() => {
2986
+ w || (t(ge(O)), t(he(E)), requestAnimationFrame(() => {
2987
2987
  X.style.width = `${X.scrollWidth}px`, X.style.height = `${X.scrollHeight}px`;
2988
- const se = new String(k).length;
2988
+ const se = new String(O).length;
2989
2989
  X.setSelectionRange(se, se);
2990
2990
  }));
2991
2991
  },
2992
- [M, w, k, E]
2992
+ [M, w, O, E]
2993
2993
  ), et = _(
2994
2994
  (D) => {
2995
2995
  if ($n(D.currentTarget))
@@ -3009,10 +3009,10 @@ const Bn = (n, e = " ") => {
3009
3009
  return !0;
3010
3010
  const X = i, se = (Be = (we = D.clipboardData) == null ? void 0 : we.getData) == null ? void 0 : Be.call(we, "text/html");
3011
3011
  if (se)
3012
- t(kt({ matrix: Yn(se), onlyValue: X }));
3012
+ t(Ot({ matrix: Yn(se), onlyValue: X }));
3013
3013
  else {
3014
3014
  const Cs = (ut = (ce = D.clipboardData) == null ? void 0 : ce.getData) == null ? void 0 : ut.call(ce, "text/plain");
3015
- Cs ? t(kt({ matrix: Bn(Cs), onlyValue: X })) : console.warn("No clipboard data found.");
3015
+ Cs ? t(Ot({ matrix: Bn(Cs), onlyValue: X })) : console.warn("No clipboard data found.");
3016
3016
  }
3017
3017
  return D.preventDefault(), D.stopPropagation(), !1;
3018
3018
  },
@@ -3022,11 +3022,14 @@ const Bn = (n, e = " ") => {
3022
3022
  var se, we;
3023
3023
  o(!1);
3024
3024
  const X = ie(e.selectingZone);
3025
- (we = (se = m.wire).onKeyUp) == null || we.call(se, { e: D, points: {
3026
- pointing: a,
3027
- selectingFrom: { y: X.top, x: X.left },
3028
- selectingTo: { y: X.bottom, x: X.right }
3029
- } });
3025
+ (we = (se = m.wire).onKeyUp) == null || we.call(se, {
3026
+ e: D,
3027
+ points: {
3028
+ pointing: a,
3029
+ selectingFrom: { y: X.top, x: X.left },
3030
+ selectingTo: { y: X.bottom, x: X.right }
3031
+ }
3032
+ });
3030
3033
  },
3031
3034
  [e.selectingZone, a]
3032
3035
  ), or = _(
@@ -3041,9 +3044,9 @@ const Bn = (n, e = " ") => {
3041
3044
  "data-mode": n,
3042
3045
  "data-sheet-id": S,
3043
3046
  children: [
3044
- /* @__PURE__ */ v("div", { className: `gs-cell-label ${w ? " gs-hidden" : ""}`, children: E }),
3047
+ /* @__PURE__ */ R("div", { className: `gs-cell-label ${w ? " gs-hidden" : ""}`, children: E }),
3045
3048
  /* @__PURE__ */ K("div", { className: "gs-editor-inner", style: { width: P }, children: [
3046
- /* @__PURE__ */ v(
3049
+ /* @__PURE__ */ R(
3047
3050
  "pre",
3048
3051
  {
3049
3052
  className: "gs-editor-hl",
@@ -3055,7 +3058,7 @@ const Bn = (n, e = " ") => {
3055
3058
  children: M != null && M.disableFormula ? c : Ln(c)
3056
3059
  }
3057
3060
  ),
3058
- /* @__PURE__ */ v(
3061
+ /* @__PURE__ */ R(
3059
3062
  "textarea",
3060
3063
  {
3061
3064
  "data-sheet-id": S,
@@ -3078,7 +3081,7 @@ const Bn = (n, e = " ") => {
3078
3081
  }
3079
3082
  )
3080
3083
  ] }),
3081
- /* @__PURE__ */ v("ul", { className: "gs-editor-options", style: { marginTop: (Ts = y.current) == null ? void 0 : Ts.scrollHeight }, children: N.map((D, X) => /* @__PURE__ */ v(
3084
+ /* @__PURE__ */ R("ul", { className: "gs-editor-options", style: { marginTop: (Ts = y.current) == null ? void 0 : Ts.scrollHeight }, children: N.map((D, X) => /* @__PURE__ */ R(
3082
3085
  "li",
3083
3086
  {
3084
3087
  className: `gs-editor-option ${s === X ? " gs-editor-option-selected" : ""}`,
@@ -3091,11 +3094,11 @@ const Bn = (n, e = " ") => {
3091
3094
  }
3092
3095
  );
3093
3096
  }, Jt = Lt(
3094
- ({ token: n, tokenKey: e, color: t, className: s }) => /* @__PURE__ */ v("span", { style: t ? { color: t } : void 0, className: s, children: n.stringify() }, e),
3097
+ ({ token: n, tokenKey: e, color: t, className: s }) => /* @__PURE__ */ R("span", { style: t ? { color: t } : void 0, className: s, children: n.stringify() }, e),
3095
3098
  (n, e) => n.tokenKey === e.tokenKey && n.color === e.color && n.className === e.className && n.token.stringify() === e.token.stringify()
3096
3099
  ), Ln = (n) => {
3097
3100
  if (n[0] !== "=")
3098
- return /* @__PURE__ */ v(yt, { children: n });
3101
+ return /* @__PURE__ */ R(yt, { children: n });
3099
3102
  const e = new ct(n.substring(1));
3100
3103
  e.tokenize();
3101
3104
  let t = 0;
@@ -3104,12 +3107,12 @@ const Bn = (n, e = " ") => {
3104
3107
  "=",
3105
3108
  e.tokens.map((i, o) => {
3106
3109
  if (i.type === "SPACE")
3107
- return /* @__PURE__ */ v(ar.Fragment, { children: i.stringify() }, `${r}-SPACE-${o}`);
3110
+ return /* @__PURE__ */ R(ar.Fragment, { children: i.stringify() }, `${r}-SPACE-${o}`);
3108
3111
  const a = `${r}-${i.type}-${i.stringify()}-${o}`;
3109
3112
  if (i.type === "REF" || i.type === "RANGE") {
3110
3113
  const c = i.stringify(), h = s[c];
3111
3114
  if (h !== void 0)
3112
- return /* @__PURE__ */ v(
3115
+ return /* @__PURE__ */ R(
3113
3116
  Jt,
3114
3117
  {
3115
3118
  token: i,
@@ -3119,7 +3122,7 @@ const Bn = (n, e = " ") => {
3119
3122
  a
3120
3123
  );
3121
3124
  const l = st[t % st.length];
3122
- return s[c] = t++, /* @__PURE__ */ v(
3125
+ return s[c] = t++, /* @__PURE__ */ R(
3123
3126
  Jt,
3124
3127
  {
3125
3128
  token: i,
@@ -3130,7 +3133,7 @@ const Bn = (n, e = " ") => {
3130
3133
  a
3131
3134
  );
3132
3135
  }
3133
- return /* @__PURE__ */ v(
3136
+ return /* @__PURE__ */ R(
3134
3137
  Jt,
3135
3138
  {
3136
3139
  token: i,
@@ -3142,7 +3145,7 @@ const Bn = (n, e = " ") => {
3142
3145
  })
3143
3146
  ] });
3144
3147
  }, Hn = rn({});
3145
- function Rc() {
3148
+ function vc() {
3146
3149
  const [n, e] = pe(void 0), [t, s] = pe();
3147
3150
  return {
3148
3151
  provided: !0,
@@ -3153,12 +3156,12 @@ function Rc() {
3153
3156
  };
3154
3157
  }
3155
3158
  function _n() {
3156
- const n = Re(Hn);
3159
+ const n = ve(Hn);
3157
3160
  return (n == null ? void 0 : n.provided) == null ? [!1, n] : [!0, n];
3158
3161
  }
3159
- function vc({ children: n, context: e }) {
3162
+ function Rc({ children: n, context: e }) {
3160
3163
  const [t] = _n();
3161
- return t ? /* @__PURE__ */ v(yt, { children: n }) : /* @__PURE__ */ v(Hn.Provider, { value: e, children: n });
3164
+ return t ? /* @__PURE__ */ R(yt, { children: n }) : /* @__PURE__ */ R(Hn.Provider, { value: e, children: n });
3162
3165
  }
3163
3166
  const oo = ({
3164
3167
  sheetName: n,
@@ -3169,42 +3172,45 @@ const oo = ({
3169
3172
  showAddress: i,
3170
3173
  mode: o
3171
3174
  }) => {
3172
- const { store: a, dispatch: c } = Re(ve), { tableReactive: h } = a, l = h.current;
3175
+ const { store: a, dispatch: c } = ve(Re), { tableReactive: h } = a, l = h.current;
3173
3176
  q(() => {
3174
3177
  l && n && n !== l.sheetName && (l.sheetName = n, l.wire.sheetIdsByName[n] = l.sheetId, delete l.wire.sheetIdsByName[l.prevSheetName], l.prevSheetName = n);
3175
3178
  }, [n]), q(() => {
3176
3179
  if (!l)
3177
3180
  return;
3178
3181
  const { wire: f } = l;
3179
- requestAnimationFrame(() => f.identifyFormula()), f.contextsBySheetId[l.sheetId] = { store: a, sync: c }, f.transmit(), s && (s.current = {
3182
+ requestAnimationFrame(() => f.identifyFormula()), f.contextsBySheetId[l.sheetId] = { store: a, dispatch: c }, f.transmit(), s && (s.current = {
3180
3183
  tableManager: {
3181
- instance: l,
3184
+ table: l,
3182
3185
  sync: (g) => {
3183
3186
  c(qt(g));
3184
3187
  }
3185
3188
  },
3186
3189
  storeManager: {
3187
- instance: a,
3188
- sync: c
3190
+ store: a,
3191
+ sync: (g) => {
3192
+ c($e(g));
3193
+ },
3194
+ dispatch: c
3189
3195
  }
3190
3196
  });
3191
3197
  }, [a, l, s]), q(() => {
3192
- e && c(Fe({ sheetHeight: e }));
3198
+ e && c($e({ sheetHeight: e }));
3193
3199
  }, [e, c]), q(() => {
3194
- t && c(Fe({ sheetWidth: t }));
3200
+ t && c($e({ sheetWidth: t }));
3195
3201
  }, [t]), q(() => {
3196
- typeof r < "u" && c(Fe({ editingOnEnter: r }));
3202
+ typeof r < "u" && c($e({ editingOnEnter: r }));
3197
3203
  }, [r]), q(() => {
3198
- typeof i < "u" && c(Fe({ showAddress: i }));
3204
+ typeof i < "u" && c($e({ showAddress: i }));
3199
3205
  }, [i]), q(() => {
3200
- o && c(Fe({ mode: o }));
3206
+ o && c($e({ mode: o }));
3201
3207
  }, [o]);
3202
3208
  const [u, d] = _n();
3203
3209
  return q(() => {
3204
3210
  u && (d.setStore(a), d.setSync(() => c));
3205
- }, [a, u, d]), /* @__PURE__ */ v(yt, {});
3211
+ }, [a, u, d]), /* @__PURE__ */ R(yt, {});
3206
3212
  }, ao = () => {
3207
- const { store: n, dispatch: e } = Re(ve), {
3213
+ const { store: n, dispatch: e } = ve(Re), {
3208
3214
  resizingPositionY: t,
3209
3215
  resizingPositionX: s,
3210
3216
  tableReactive: r,
@@ -3215,8 +3221,8 @@ const oo = ({
3215
3221
  mainRef: h
3216
3222
  } = n, l = r.current, [u, d, f] = t, [g, p, y] = s;
3217
3223
  if (h.current == null || c.current == null || !l)
3218
- return /* @__PURE__ */ v("div", { className: "gs-resizing gs-hidden" });
3219
- const b = l.getCellByPoint({ y: u === -1 ? 0 : u, x: g === -1 ? 0 : g }, "SYSTEM"), { y: x, x: R } = h.current.getBoundingClientRect(), A = (b == null ? void 0 : b.width) || be, S = (b == null ? void 0 : b.height) || me, m = A + (y - p), $ = S + (f - d);
3224
+ return /* @__PURE__ */ R("div", { className: "gs-resizing gs-hidden" });
3225
+ const b = l.getCellByPoint({ y: u === -1 ? 0 : u, x: g === -1 ? 0 : g }, "SYSTEM"), { y: x, x: v } = h.current.getBoundingClientRect(), A = (b == null ? void 0 : b.width) || be, S = (b == null ? void 0 : b.height) || me, m = A + (y - p), $ = S + (f - d);
3220
3226
  return /* @__PURE__ */ K(
3221
3227
  "div",
3222
3228
  {
@@ -3241,7 +3247,7 @@ const oo = ({
3241
3247
  operator: "USER",
3242
3248
  undoReflection: { selectingZone: a, sheetId: l.sheetId }
3243
3249
  }), e(
3244
- Fe({
3250
+ $e({
3245
3251
  tableReactive: { current: l },
3246
3252
  ...l.getTotalSize()
3247
3253
  })
@@ -3255,18 +3261,18 @@ const oo = ({
3255
3261
  } else if (g !== -1) {
3256
3262
  let I = N.clientX;
3257
3263
  const B = A + (I - p);
3258
- B < ks && (I += ks - B), e(us([g, p, I]));
3264
+ B < Os && (I += Os - B), e(us([g, p, I]));
3259
3265
  }
3260
3266
  },
3261
3267
  children: [
3262
- /* @__PURE__ */ v(
3268
+ /* @__PURE__ */ R(
3263
3269
  "div",
3264
3270
  {
3265
3271
  className: `gs-line ${g === -1 ? "gs-hidden" : ""}`,
3266
3272
  style: {
3267
3273
  width: 1,
3268
3274
  height: "100%",
3269
- left: y - R
3275
+ left: y - v
3270
3276
  },
3271
3277
  children: /* @__PURE__ */ K("span", { style: { left: "-50%" }, children: [
3272
3278
  m,
@@ -3274,7 +3280,7 @@ const oo = ({
3274
3280
  ] })
3275
3281
  }
3276
3282
  ),
3277
- /* @__PURE__ */ v(
3283
+ /* @__PURE__ */ R(
3278
3284
  "div",
3279
3285
  {
3280
3286
  className: `gs-line ${u === -1 ? "gs-hidden" : ""}`,
@@ -3293,7 +3299,7 @@ const oo = ({
3293
3299
  }
3294
3300
  );
3295
3301
  }, co = () => {
3296
- const { store: n } = Re(ve), { choosing: e, selectingZone: t, tableReactive: s } = n, r = s.current;
3302
+ const { store: n } = ve(Re), { choosing: e, selectingZone: t, tableReactive: s } = n, r = s.current;
3297
3303
  return q(() => {
3298
3304
  r != null && r.isInitialized && r.wire.onChange && r.wire.onChange({
3299
3305
  table: r,
@@ -3313,15 +3319,15 @@ const oo = ({
3313
3319
  }
3314
3320
  });
3315
3321
  }, [e, t]), null;
3316
- }, Un = async ({ store: n, sync: e }) => {
3322
+ }, Un = async ({ store: n, dispatch: e }) => {
3317
3323
  var r;
3318
3324
  const { editorRef: t } = n, s = Ft(n);
3319
3325
  e(ws(Te(s))), (r = t.current) == null || r.focus();
3320
- }, Xn = async ({ store: n, sync: e }) => {
3326
+ }, Xn = async ({ store: n, dispatch: e }) => {
3321
3327
  var r;
3322
3328
  const { editorRef: t } = n, s = Ft(n);
3323
3329
  e(xs(Te(s))), (r = t.current) == null || r.focus();
3324
- }, Rs = async ({ store: n, sync: e }, t = !1) => {
3330
+ }, vs = async ({ store: n, dispatch: e }, t = !1) => {
3325
3331
  var o;
3326
3332
  const { editorRef: s } = n, r = await navigator.clipboard.read();
3327
3333
  let i = [];
@@ -3341,43 +3347,43 @@ const oo = ({
3341
3347
  }
3342
3348
  }
3343
3349
  }
3344
- e(kt({ matrix: i, onlyValue: t })), (o = s.current) == null || o.focus();
3345
- }, zn = async ({ store: n, sync: e }) => {
3350
+ e(Ot({ matrix: i, onlyValue: t })), (o = s.current) == null || o.focus();
3351
+ }, zn = async ({ store: n, dispatch: e }) => {
3346
3352
  var s;
3347
3353
  const { editorRef: t } = n;
3348
3354
  e(As(null)), (s = t.current) == null || s.focus();
3349
- }, Wn = async ({ store: n, sync: e }) => {
3355
+ }, Wn = async ({ store: n, dispatch: e }) => {
3350
3356
  var s;
3351
3357
  const { editorRef: t } = n;
3352
3358
  e(Dt(null)), (s = t.current) == null || s.focus();
3353
- }, jn = async ({ store: n, sync: e }) => {
3359
+ }, jn = async ({ store: n, dispatch: e }) => {
3354
3360
  var o;
3355
3361
  const { selectingZone: t, editorRef: s } = n, { top: r } = ie(t), i = Se({ ...t, base: 1 }).height;
3356
3362
  e(In({ numRows: i, y: r, operator: "USER" })), (o = s.current) == null || o.focus();
3357
- }, Zn = async ({ store: n, sync: e }) => {
3363
+ }, Zn = async ({ store: n, dispatch: e }) => {
3358
3364
  var o;
3359
3365
  const { selectingZone: t, editorRef: s } = n, { bottom: r } = ie(t), i = Se({ ...t, base: 1 }).height;
3360
3366
  e(Tn({ numRows: i, y: r, operator: "USER" })), (o = s.current) == null || o.focus();
3361
- }, Kn = async ({ store: n, sync: e }) => {
3367
+ }, Kn = async ({ store: n, dispatch: e }) => {
3362
3368
  var o;
3363
3369
  const { selectingZone: t, editorRef: s } = n, { left: r } = ie(t), i = Se({ ...t, base: 1 }).width;
3364
3370
  e(Cn({ numCols: i, x: r, operator: "USER" })), (o = s.current) == null || o.focus();
3365
- }, Vn = async ({ store: n, sync: e }) => {
3371
+ }, Vn = async ({ store: n, dispatch: e }) => {
3366
3372
  var o;
3367
3373
  const { selectingZone: t, editorRef: s } = n, { right: r } = ie(t), i = Se({ ...t, base: 1 }).width;
3368
3374
  e(Mn({ numCols: i, x: r, operator: "USER" })), (o = s.current) == null || o.focus();
3369
- }, qn = async ({ store: n, sync: e }) => {
3375
+ }, qn = async ({ store: n, dispatch: e }) => {
3370
3376
  var o;
3371
3377
  const { selectingZone: t, editorRef: s } = n, { top: r } = ie(t), i = Se({ ...t, base: 1 }).height;
3372
- e(On({ numRows: i, y: r, operator: "USER" })), (o = s.current) == null || o.focus();
3373
- }, Gn = async ({ store: n, sync: e }) => {
3378
+ e(kn({ numRows: i, y: r, operator: "USER" })), (o = s.current) == null || o.focus();
3379
+ }, Gn = async ({ store: n, dispatch: e }) => {
3374
3380
  var o;
3375
3381
  const { selectingZone: t, editorRef: s } = n, { left: r } = ie(t), i = Se({ ...t, base: 1 }).width;
3376
- e(kn({ numCols: i, x: r, operator: "USER" })), (o = s.current) == null || o.focus();
3382
+ e(On({ numCols: i, x: r, operator: "USER" })), (o = s.current) == null || o.focus();
3377
3383
  }, Sc = {
3378
3384
  copy: Un,
3379
3385
  cut: Xn,
3380
- paste: Rs,
3386
+ paste: vs,
3381
3387
  undo: zn,
3382
3388
  redo: Wn,
3383
3389
  insertRowsAbove: jn,
@@ -3387,39 +3393,39 @@ const oo = ({
3387
3393
  removeRows: qn,
3388
3394
  removeCols: Gn
3389
3395
  }, lo = () => {
3390
- const { store: n, dispatch: e } = Re(ve), { contextMenuPosition: t, contextMenuItems: s } = n, { y: r, x: i } = t;
3391
- return r === -1 ? null : /* @__PURE__ */ v(
3396
+ const { store: n, dispatch: e } = ve(Re), { contextMenuPosition: t, contextMenuItems: s } = n, { y: r, x: i } = t;
3397
+ return r === -1 ? null : /* @__PURE__ */ R(
3392
3398
  Pn,
3393
3399
  {
3394
3400
  className: "gs-contextmenu-modal",
3395
3401
  onClick: (o) => (o.preventDefault(), e(Vt({ y: -1, x: -1 })), !1),
3396
- children: /* @__PURE__ */ v("div", { className: "gs-contextmenu", style: { top: r, left: i }, children: /* @__PURE__ */ v("ul", { children: s.map((o, a) => /* @__PURE__ */ v(o, { store: n, sync: e }, a)) }) })
3402
+ children: /* @__PURE__ */ R("div", { className: "gs-contextmenu", style: { top: r, left: i }, children: /* @__PURE__ */ R("ul", { children: s.map((o, a) => /* @__PURE__ */ R(o, { store: n, dispatch: e }, a)) }) })
3397
3403
  }
3398
3404
  );
3399
3405
  }, uo = (n) => /* @__PURE__ */ K("li", { className: "gs-enabled", "data-testid": "cut-item", onClick: async () => await Xn(n), children: [
3400
- /* @__PURE__ */ v("div", { className: "gs-menu-name", children: "Cut" }),
3401
- /* @__PURE__ */ v("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ v("span", { className: "gs-menu-underline", children: "X" }) })
3406
+ /* @__PURE__ */ R("div", { className: "gs-menu-name", children: "Cut" }),
3407
+ /* @__PURE__ */ R("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ R("span", { className: "gs-menu-underline", children: "X" }) })
3402
3408
  ] }), ho = (n) => /* @__PURE__ */ K("li", { className: "gs-enabled", "data-testid": "copy-item", onClick: async () => await Un(n), children: [
3403
- /* @__PURE__ */ v("div", { className: "gs-menu-name", children: "Copy" }),
3404
- /* @__PURE__ */ v("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ v("span", { className: "gs-menu-underline", children: "C" }) })
3405
- ] }), fo = (n) => /* @__PURE__ */ K("li", { className: "gs-enabled", "data-testid": "paste-item", onClick: async () => await Rs(n, !1), children: [
3406
- /* @__PURE__ */ v("div", { className: "gs-menu-name", children: "Paste" }),
3407
- /* @__PURE__ */ v("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ v("span", { className: "gs-menu-underline", children: "V" }) })
3408
- ] }), go = (n) => /* @__PURE__ */ K("li", { className: "gs-enabled", "data-testid": "paste-only-value-item", onClick: async () => await Rs(n, !0), children: [
3409
- /* @__PURE__ */ v("div", { className: "gs-menu-name", children: "Paste only value" }),
3409
+ /* @__PURE__ */ R("div", { className: "gs-menu-name", children: "Copy" }),
3410
+ /* @__PURE__ */ R("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ R("span", { className: "gs-menu-underline", children: "C" }) })
3411
+ ] }), fo = (n) => /* @__PURE__ */ K("li", { className: "gs-enabled", "data-testid": "paste-item", onClick: async () => await vs(n, !1), children: [
3412
+ /* @__PURE__ */ R("div", { className: "gs-menu-name", children: "Paste" }),
3413
+ /* @__PURE__ */ R("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ R("span", { className: "gs-menu-underline", children: "V" }) })
3414
+ ] }), go = (n) => /* @__PURE__ */ K("li", { className: "gs-enabled", "data-testid": "paste-only-value-item", onClick: async () => await vs(n, !0), children: [
3415
+ /* @__PURE__ */ R("div", { className: "gs-menu-name", children: "Paste only value" }),
3410
3416
  /* @__PURE__ */ K("div", { className: "gs-menu-shortcut", children: [
3411
3417
  "Shift + ",
3412
- /* @__PURE__ */ v("span", { className: "gs-menu-underline", children: "V" })
3418
+ /* @__PURE__ */ R("span", { className: "gs-menu-underline", children: "V" })
3413
3419
  ] })
3414
3420
  ] }), po = (n) => {
3415
3421
  const { leftHeaderSelecting: e, topHeaderSelecting: t } = n.store;
3416
- return e || t ? /* @__PURE__ */ v("li", { className: "gs-menu-divider" }) : null;
3422
+ return e || t ? /* @__PURE__ */ R("li", { className: "gs-menu-divider" }) : null;
3417
3423
  }, mo = (n) => {
3418
3424
  const { tableReactive: e, choosing: t, selectingZone: s, leftHeaderSelecting: r } = n.store, i = e.current;
3419
3425
  if (!r || !i)
3420
3426
  return null;
3421
3427
  const { y: o } = t, { height: a } = Se({ ...s, base: 1 }), c = i.getCellByPoint({ y: o, x: 0 }, "SYSTEM"), h = i.maxNumRows !== -1 && i.getNumRows() + a > i.maxNumRows || Z(c == null ? void 0 : c.prevention, Ut);
3422
- return /* @__PURE__ */ v(
3428
+ return /* @__PURE__ */ R(
3423
3429
  "li",
3424
3430
  {
3425
3431
  className: h ? "gs-disabled" : "gs-enabled",
@@ -3441,7 +3447,7 @@ const oo = ({
3441
3447
  if (!r || !i)
3442
3448
  return null;
3443
3449
  const { y: o } = t, { height: a } = Se({ ...s, base: 1 }), c = i.getCellByPoint({ y: o, x: 0 }, "SYSTEM"), h = i.maxNumRows !== -1 && i.getNumRows() + a > i.maxNumRows || Z(c == null ? void 0 : c.prevention, Xt);
3444
- return /* @__PURE__ */ v(
3450
+ return /* @__PURE__ */ R(
3445
3451
  "li",
3446
3452
  {
3447
3453
  className: h ? "gs-disabled" : "gs-enabled",
@@ -3463,7 +3469,7 @@ const oo = ({
3463
3469
  if (!r || !i)
3464
3470
  return null;
3465
3471
  const { x: o } = t, { width: a } = Se({ ...s, base: 1 }), c = i.getCellByPoint({ y: 0, x: o }, "SYSTEM"), h = i.maxNumCols !== -1 && i.getNumCols() + a > i.maxNumCols || Z(c == null ? void 0 : c.prevention, zt);
3466
- return /* @__PURE__ */ v(
3472
+ return /* @__PURE__ */ R(
3467
3473
  "li",
3468
3474
  {
3469
3475
  className: h ? "gs-disabled" : "gs-enabled",
@@ -3485,7 +3491,7 @@ const oo = ({
3485
3491
  if (!r || !i)
3486
3492
  return null;
3487
3493
  const { x: o } = t, { width: a } = Se({ ...s, base: 1 }), c = i.getCellByPoint({ y: 0, x: o }, "SYSTEM"), h = i.maxNumCols !== -1 && i.getNumCols() + a > i.maxNumCols || Z(c == null ? void 0 : c.prevention, Wt);
3488
- return /* @__PURE__ */ v(
3494
+ return /* @__PURE__ */ R(
3489
3495
  "li",
3490
3496
  {
3491
3497
  className: h ? "gs-disabled" : "gs-enabled",
@@ -3507,7 +3513,7 @@ const oo = ({
3507
3513
  if (!r || !i)
3508
3514
  return null;
3509
3515
  const { y: o } = t, { height: a } = Se({ ...s, base: 1 }), c = i.getCellByPoint({ y: o, x: 0 }, "SYSTEM"), h = i.minNumRows !== -1 && i.getNumRows() - a < i.minNumRows || Z(c == null ? void 0 : c.prevention, At);
3510
- return /* @__PURE__ */ v(
3516
+ return /* @__PURE__ */ R(
3511
3517
  "li",
3512
3518
  {
3513
3519
  className: h ? "gs-disabled" : "gs-enabled",
@@ -3527,8 +3533,8 @@ const oo = ({
3527
3533
  const { tableReactive: e, choosing: t, selectingZone: s, topHeaderSelecting: r } = n.store, i = e.current;
3528
3534
  if (!r || !i)
3529
3535
  return null;
3530
- const { x: o } = t, { width: a } = Se({ ...s, base: 1 }), c = i.getCellByPoint({ y: 0, x: o }, "SYSTEM"), h = i.minNumCols !== -1 && i.getNumCols() - a < i.minNumCols || Z(c == null ? void 0 : c.prevention, Rt);
3531
- return /* @__PURE__ */ v(
3536
+ const { x: o } = t, { width: a } = Se({ ...s, base: 1 }), c = i.getCellByPoint({ y: 0, x: o }, "SYSTEM"), h = i.minNumCols !== -1 && i.getNumCols() - a < i.minNumCols || Z(c == null ? void 0 : c.prevention, vt);
3537
+ return /* @__PURE__ */ R(
3532
3538
  "li",
3533
3539
  {
3534
3540
  className: h ? "gs-disabled" : "gs-enabled",
@@ -3544,23 +3550,23 @@ const oo = ({
3544
3550
  ] })
3545
3551
  }
3546
3552
  );
3547
- }, Ro = (n) => {
3553
+ }, vo = (n) => {
3548
3554
  const { tableReactive: e } = n.store, t = e.current;
3549
3555
  if (!t)
3550
3556
  return null;
3551
3557
  const s = t.getHistoryIndex();
3552
- return s > -1 || s < t.getHistorySize() - 1 ? /* @__PURE__ */ v("li", { className: "gs-menu-divider" }) : null;
3553
- }, vo = (n) => {
3558
+ return s > -1 || s < t.getHistorySize() - 1 ? /* @__PURE__ */ R("li", { className: "gs-menu-divider" }) : null;
3559
+ }, Ro = (n) => {
3554
3560
  const { tableReactive: e } = n.store, t = e.current;
3555
3561
  return !t || t.getHistoryIndex() <= -1 ? null : /* @__PURE__ */ K("li", { className: "gs-enabled", "data-testid": "undo-item", onClick: async () => zn(n), children: [
3556
- /* @__PURE__ */ v("div", { className: "gs-menu-name", children: "Undo" }),
3557
- /* @__PURE__ */ v("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ v("span", { className: "gs-menu-underline", children: "Z" }) })
3562
+ /* @__PURE__ */ R("div", { className: "gs-menu-name", children: "Undo" }),
3563
+ /* @__PURE__ */ R("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ R("span", { className: "gs-menu-underline", children: "Z" }) })
3558
3564
  ] });
3559
3565
  }, So = (n) => {
3560
3566
  const { tableReactive: e } = n.store, t = e.current;
3561
3567
  return !t || t.getHistoryIndex() >= t.getHistorySize() - 1 ? null : /* @__PURE__ */ K("li", { className: "gs-enabled", "data-testid": "redo-item", onClick: async () => Wn(n), children: [
3562
- /* @__PURE__ */ v("div", { className: "gs-menu-name", children: "Redo" }),
3563
- /* @__PURE__ */ v("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ v("span", { className: "gs-menu-underline", children: "R" }) })
3568
+ /* @__PURE__ */ R("div", { className: "gs-menu-name", children: "Redo" }),
3569
+ /* @__PURE__ */ R("div", { className: "gs-menu-shortcut", children: /* @__PURE__ */ R("span", { className: "gs-menu-underline", children: "R" }) })
3564
3570
  ] });
3565
3571
  }, No = [
3566
3572
  uo,
@@ -3574,8 +3580,8 @@ const oo = ({
3574
3580
  wo,
3575
3581
  xo,
3576
3582
  Ao,
3577
- Ro,
3578
3583
  vo,
3584
+ Ro,
3579
3585
  So
3580
3586
  ];
3581
3587
  var It = { exports: {} }, Eo = It.exports, qs;
@@ -3615,16 +3621,16 @@ function Io() {
3615
3621
  S === void 0 && (S = "");
3616
3622
  var m = S.match(s);
3617
3623
  if (!m) return null;
3618
- var $ = ("" + m[0]).match(r) || ["-", 0, 0], T = $[0], O = 60 * +$[1] + +$[2];
3619
- return O === 0 ? 0 : T === "+" ? O : -O;
3624
+ var $ = ("" + m[0]).match(r) || ["-", 0, 0], T = $[0], k = 60 * +$[1] + +$[2];
3625
+ return k === 0 ? 0 : T === "+" ? k : -k;
3620
3626
  }(p), p === null)) return this;
3621
- var x = Math.abs(p) <= 16 ? 60 * p : p, R = this;
3622
- if (y) return R.$offset = x, R.$u = p === 0, R;
3627
+ var x = Math.abs(p) <= 16 ? 60 * p : p, v = this;
3628
+ if (y) return v.$offset = x, v.$u = p === 0, v;
3623
3629
  if (p !== 0) {
3624
3630
  var A = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
3625
- (R = this.local().add(x + A, t)).$offset = x, R.$x.$localOffset = A;
3626
- } else R = this.utc();
3627
- return R;
3631
+ (v = this.local().add(x + A, t)).$offset = x, v.$x.$localOffset = A;
3632
+ } else v = this.utc();
3633
+ return v;
3628
3634
  };
3629
3635
  var d = c.format;
3630
3636
  c.format = function(p) {
@@ -3647,8 +3653,8 @@ function Io() {
3647
3653
  var g = c.diff;
3648
3654
  c.diff = function(p, y, b) {
3649
3655
  if (p && this.$u === p.$u) return g.call(this, p, y, b);
3650
- var x = this.local(), R = a(p).local();
3651
- return g.call(x, R, y, b);
3656
+ var x = this.local(), v = a(p).local();
3657
+ return g.call(x, v, y, b);
3652
3658
  };
3653
3659
  };
3654
3660
  });
@@ -3657,7 +3663,7 @@ function Io() {
3657
3663
  var To = Io();
3658
3664
  const Co = /* @__PURE__ */ bs(To);
3659
3665
  var Tt = { exports: {} }, Mo = Tt.exports, Gs;
3660
- function Oo() {
3666
+ function ko() {
3661
3667
  return Gs || (Gs = 1, function(n, e) {
3662
3668
  (function(t, s) {
3663
3669
  n.exports = s();
@@ -3668,23 +3674,23 @@ function Oo() {
3668
3674
  g === void 0 && (g = {});
3669
3675
  var p = new Date(d), y = function(b, x) {
3670
3676
  x === void 0 && (x = {});
3671
- var R = x.timeZoneName || "short", A = b + "|" + R, S = s[A];
3672
- return S || (S = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: b, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: R }), s[A] = S), S;
3677
+ var v = x.timeZoneName || "short", A = b + "|" + v, S = s[A];
3678
+ return S || (S = new Intl.DateTimeFormat("en-US", { hour12: !1, timeZone: b, year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit", timeZoneName: v }), s[A] = S), S;
3673
3679
  }(f, g);
3674
3680
  return y.formatToParts(p);
3675
3681
  }, h = function(d, f) {
3676
3682
  for (var g = c(d, f), p = [], y = 0; y < g.length; y += 1) {
3677
- var b = g[y], x = b.type, R = b.value, A = t[x];
3678
- A >= 0 && (p[A] = parseInt(R, 10));
3683
+ var b = g[y], x = b.type, v = b.value, A = t[x];
3684
+ A >= 0 && (p[A] = parseInt(v, 10));
3679
3685
  }
3680
3686
  var S = p[3], m = S === 24 ? 0 : S, $ = p[0] + "-" + p[1] + "-" + p[2] + " " + m + ":" + p[4] + ":" + p[5] + ":000", T = +d;
3681
3687
  return (o.utc($).valueOf() - (T -= T % 1e3)) / 6e4;
3682
3688
  }, l = i.prototype;
3683
3689
  l.tz = function(d, f) {
3684
3690
  d === void 0 && (d = a);
3685
- var g, p = this.utcOffset(), y = this.toDate(), b = y.toLocaleString("en-US", { timeZone: d }), x = Math.round((y - new Date(b)) / 1e3 / 60), R = 15 * -Math.round(y.getTimezoneOffset() / 15) - x;
3686
- if (!Number(R)) g = this.utcOffset(0, f);
3687
- else if (g = o(b, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(R, !0), f) {
3691
+ var g, p = this.utcOffset(), y = this.toDate(), b = y.toLocaleString("en-US", { timeZone: d }), x = Math.round((y - new Date(b)) / 1e3 / 60), v = 15 * -Math.round(y.getTimezoneOffset() / 15) - x;
3692
+ if (!Number(v)) g = this.utcOffset(0, f);
3693
+ else if (g = o(b, { locale: this.$L }).$set("millisecond", this.$ms).utcOffset(v, !0), f) {
3688
3694
  var A = g.utcOffset();
3689
3695
  g = g.add(p - A, "minute");
3690
3696
  }
@@ -3704,11 +3710,11 @@ function Oo() {
3704
3710
  var p = g && f, y = g || f || a, b = h(+o(), y);
3705
3711
  if (typeof d != "string") return o(d).tz(y);
3706
3712
  var x = function(m, $, T) {
3707
- var O = m - 60 * $ * 1e3, N = h(O, T);
3708
- if ($ === N) return [O, $];
3709
- var I = h(O -= 60 * (N - $) * 1e3, T);
3710
- return N === I ? [O, N] : [m - 60 * Math.min(N, I) * 1e3, Math.max(N, I)];
3711
- }(o.utc(d, p).valueOf(), b, y), R = x[0], A = x[1], S = o(R).utcOffset(A);
3713
+ var k = m - 60 * $ * 1e3, N = h(k, T);
3714
+ if ($ === N) return [k, $];
3715
+ var I = h(k -= 60 * (N - $) * 1e3, T);
3716
+ return N === I ? [k, N] : [m - 60 * Math.min(N, I) * 1e3, Math.max(N, I)];
3717
+ }(o.utc(d, p).valueOf(), b, y), v = x[0], A = x[1], S = o(v).utcOffset(A);
3712
3718
  return S.$x.$timezone = y, S;
3713
3719
  }, o.tz.guess = function() {
3714
3720
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
@@ -3719,8 +3725,8 @@ function Oo() {
3719
3725
  });
3720
3726
  }(Tt)), Tt.exports;
3721
3727
  }
3722
- var ko = Oo();
3723
- const Do = /* @__PURE__ */ bs(ko);
3728
+ var Oo = ko();
3729
+ const Do = /* @__PURE__ */ bs(Oo);
3724
3730
  Ie.extend(Do);
3725
3731
  Ie.extend(Co);
3726
3732
  const $o = { true: !0, false: !1 }, Qn = /* @__PURE__ */ new Set(["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]), Fo = /* @__PURE__ */ new Set([...Qn, "Z", "z"]), Po = /* @__PURE__ */ new Set(["J", "F", "M", "A", "S", "O", "N", "D", ...Qn]), Yo = /* @__PURE__ */ new Set(["N", "B", "R", "Y", "N", "L", "G", "P", "T", "V", "C", ...Fo]);
@@ -3957,7 +3963,7 @@ class Y {
3957
3963
  return this.validate(), this.main(...this.bareArgs);
3958
3964
  }
3959
3965
  }
3960
- const vs = (n, e) => {
3966
+ const Rs = (n, e) => {
3961
3967
  if (typeof n == "string" || typeof e == "string")
3962
3968
  return Ae(n) > Ae(e);
3963
3969
  try {
@@ -3973,7 +3979,7 @@ const vs = (n, e) => {
3973
3979
  } catch {
3974
3980
  return !1;
3975
3981
  }
3976
- }, Jn = (n, e) => !Ss(n, e), er = (n, e) => !vs(n, e), Ns = (n, e) => Ae(n) === Ae(e), _o = (n, e) => !Ns(n, e), U = (n, e) => {
3982
+ }, Jn = (n, e) => !Ss(n, e), er = (n, e) => !Rs(n, e), Ns = (n, e) => Ae(n) === Ae(e), _o = (n, e) => !Ns(n, e), U = (n, e) => {
3977
3983
  const { alternative: t, ignore: s } = e || {};
3978
3984
  if (typeof n > "u" && typeof t < "u")
3979
3985
  return t;
@@ -4038,7 +4044,7 @@ const vs = (n, e) => {
4038
4044
  if (s === ">" || s === "<" || s === ">=" || s === "<=")
4039
4045
  switch (typeof n == "number" && (i = parseFloat(r)), s) {
4040
4046
  case ">":
4041
- return vs(n, i);
4047
+ return Rs(n, i);
4042
4048
  case ">=":
4043
4049
  return Ss(n, i);
4044
4050
  case "<":
@@ -4287,7 +4293,7 @@ class Jo extends Y {
4287
4293
  throw new C("#N/A", "Number of arguments for GT is incorrect.");
4288
4294
  }
4289
4295
  main(e, t) {
4290
- return vs(e, t);
4296
+ return Rs(e, t);
4291
4297
  }
4292
4298
  }
4293
4299
  class ea extends Y {
@@ -4873,7 +4879,7 @@ class Aa extends Y {
4873
4879
  return Math.random();
4874
4880
  }
4875
4881
  }
4876
- class Ra extends Y {
4882
+ class va extends Y {
4877
4883
  constructor() {
4878
4884
  super(...arguments), this.example = "PI()", this.helpText = ["Returns the value of pi."], this.helpArgs = [];
4879
4885
  }
@@ -4885,7 +4891,7 @@ class Ra extends Y {
4885
4891
  return Math.PI;
4886
4892
  }
4887
4893
  }
4888
- class va extends Y {
4894
+ class Ra extends Y {
4889
4895
  constructor() {
4890
4896
  super(...arguments), this.example = "EXP(2)", this.helpText = ["Returns the power of a number whose base is the Euler number e."], this.helpArgs = [
4891
4897
  {
@@ -5064,7 +5070,7 @@ class Ma extends Y {
5064
5070
  return Math.cos(e);
5065
5071
  }
5066
5072
  }
5067
- class Oa extends Y {
5073
+ class ka extends Y {
5068
5074
  constructor() {
5069
5075
  super(...arguments), this.example = "TAN(1)", this.helpText = ["Returns the tan of the angle specified in radians."], this.helpArgs = [
5070
5076
  {
@@ -5082,7 +5088,7 @@ class Oa extends Y {
5082
5088
  return Math.tan(e);
5083
5089
  }
5084
5090
  }
5085
- class ka extends Y {
5091
+ class Oa extends Y {
5086
5092
  constructor() {
5087
5093
  super(...arguments), this.example = "ASIN(0)", this.helpText = ["Returns the inverse sin of the value in radians."], this.helpArgs = [
5088
5094
  {
@@ -5424,13 +5430,13 @@ const za = {
5424
5430
  log: ma,
5425
5431
  log10: ba,
5426
5432
  ln: ya,
5427
- exp: va,
5428
- pi: Ra,
5433
+ exp: Ra,
5434
+ pi: va,
5429
5435
  radians: Sa,
5430
5436
  sin: Ca,
5431
5437
  cos: Ma,
5432
- tan: Oa,
5433
- asin: ka,
5438
+ tan: ka,
5439
+ asin: Oa,
5434
5440
  acos: Da,
5435
5441
  atan: $a,
5436
5442
  atan2: Fa,
@@ -5473,12 +5479,8 @@ class Wa {
5473
5479
  t.push(i);
5474
5480
  }
5475
5481
  for (let s = 0; s < t.length; s++) {
5476
- const { store: r, sync: i } = t[s], o = r.tableReactive.current;
5477
- if (!o)
5478
- continue;
5479
- o.identifyFormula();
5480
- const a = o.clone();
5481
- i(qt(a));
5482
+ const { store: r, dispatch: i } = t[s], o = r.tableReactive.current;
5483
+ o && (o.identifyFormula(), i(qt(o)));
5482
5484
  }
5483
5485
  this.ready = !0;
5484
5486
  }
@@ -5596,7 +5598,7 @@ class ne {
5596
5598
  });
5597
5599
  }
5598
5600
  get isInitialized() {
5599
- return this.version > 0;
5601
+ return this.status === 2;
5600
5602
  }
5601
5603
  get functions() {
5602
5604
  return this.wire.functions;
@@ -6029,7 +6031,7 @@ class ne {
6029
6031
  undoReflection: o,
6030
6032
  redoReflection: a
6031
6033
  }) {
6032
- const c = this.getNewIdMatrix(t), h = e.__raw__.getIdMatrixFromArea(t), l = this.getIdMatrixFromArea(s), u = {}, d = new es(this), f = vt(this.idMatrix, h, s, (b, x, R) => {
6034
+ const c = this.getNewIdMatrix(t), h = e.__raw__.getIdMatrixFromArea(t), l = this.getIdMatrixFromArea(s), u = {}, d = new es(this), f = Rt(this.idMatrix, h, s, (b, x, v) => {
6033
6035
  var T;
6034
6036
  if (b == null || x == null)
6035
6037
  return !1;
@@ -6055,17 +6057,17 @@ class ne {
6055
6057
  }
6056
6058
  }), A != null && this.setChangedAt(A, /* @__PURE__ */ new Date()), !0;
6057
6059
  }), g = e.__raw__, p = this.wire.contextsBySheetId[g.sheetId];
6058
- vt(g.idMatrix, c, t, (b, x) => {
6060
+ Rt(g.idMatrix, c, t, (b, x) => {
6059
6061
  var m;
6060
6062
  d.map[x] = b;
6061
- const R = g.wire.data[x];
6062
- if (i === "USER" && Z(R == null ? void 0 : R.prevention, nt))
6063
+ const v = g.wire.data[x];
6064
+ if (i === "USER" && Z(v == null ? void 0 : v.prevention, nt))
6063
6065
  return !1;
6064
- const S = (this.policies[R == null ? void 0 : R.policy] ?? ft).restrict({
6066
+ const S = (this.policies[v == null ? void 0 : v.policy] ?? ft).restrict({
6065
6067
  table: g,
6066
6068
  point: g.getPointById(x),
6067
6069
  patch: void 0,
6068
- original: R,
6070
+ original: v,
6069
6071
  operation: nt
6070
6072
  });
6071
6073
  return g.wire.data[b] = {
@@ -6075,13 +6077,13 @@ class ne {
6075
6077
  id: b,
6076
6078
  sheetId: g.sheetId,
6077
6079
  changedAt: /* @__PURE__ */ new Date(),
6078
- dependents: ((m = R == null ? void 0 : R.system) == null ? void 0 : m.dependents) ?? /* @__PURE__ */ new Set()
6080
+ dependents: ((m = v == null ? void 0 : v.system) == null ? void 0 : m.dependents) ?? /* @__PURE__ */ new Set()
6079
6081
  }
6080
6082
  }, !0;
6081
6083
  });
6082
6084
  const y = d.resolveDependents();
6083
6085
  if (Object.assign(u, y), e !== this && p !== null) {
6084
- const { sync: b } = p;
6086
+ const { dispatch: b } = p;
6085
6087
  b(qt(g));
6086
6088
  }
6087
6089
  return r && this.pushHistory({
@@ -6111,17 +6113,17 @@ class ne {
6111
6113
  redoReflection: a
6112
6114
  }) {
6113
6115
  const c = e !== this, { height: h, width: l } = Ge({ ...t, base: 1 }), { top: u, left: d } = t, { top: f, left: g, bottom: p, right: y } = s, b = {}, x = /* @__PURE__ */ new Date();
6114
- for (let R = 0; R <= p - f; R++) {
6115
- const A = f + R;
6116
+ for (let v = 0; v <= p - f; v++) {
6117
+ const A = f + v;
6116
6118
  if (!(A > this.getNumRows()))
6117
6119
  for (let S = 0; S <= y - g; S++) {
6118
6120
  const m = g + S;
6119
6121
  if (m > this.getNumCols())
6120
6122
  continue;
6121
- const $ = u + R % h, T = d + S % l, O = c ? 0 : A - $, N = c ? 0 : m - T, I = {
6123
+ const $ = u + v % h, T = d + S % l, k = c ? 0 : A - $, N = c ? 0 : m - T, I = {
6122
6124
  ...e.getCellByPoint(
6123
6125
  {
6124
- y: u + R % h,
6126
+ y: u + v % h,
6125
6127
  x: d + S % l
6126
6128
  },
6127
6129
  "SYSTEM"
@@ -6129,7 +6131,7 @@ class ne {
6129
6131
  }, B = { y: A, x: m }, z = rt(I == null ? void 0 : I.value, {
6130
6132
  table: this,
6131
6133
  dependency: this.getId(B),
6132
- slideY: O,
6134
+ slideY: k,
6133
6135
  slideX: N
6134
6136
  });
6135
6137
  this.setChangedAt(I, x);
@@ -6165,7 +6167,7 @@ class ne {
6165
6167
  }) {
6166
6168
  const c = {}, h = {}, l = /* @__PURE__ */ new Date();
6167
6169
  if (Object.keys(e).forEach((u) => {
6168
- var x, R, A, S;
6170
+ var x, v, A, S;
6169
6171
  const d = oe(u), f = this.getId(d), g = this.wire.data[f];
6170
6172
  let p = { ...e[u] };
6171
6173
  if (i === "USER" && Z(g.prevention, mt))
@@ -6175,7 +6177,7 @@ class ne {
6175
6177
  dependency: f
6176
6178
  })), r.forEach((m) => {
6177
6179
  p[m] = g == null ? void 0 : g[m];
6178
- }), i === "USER" && Z(g == null ? void 0 : g.prevention, Me) && delete p.value, i === "USER" && Z(g == null ? void 0 : g.prevention, jt) && ((x = p == null ? void 0 : p.style) == null || delete x.justifyContent, (R = p == null ? void 0 : p.style) == null || delete R.alignItems), i === "USER" && Z(g == null ? void 0 : g.prevention, at) && ((A = p == null ? void 0 : p.style) == null || delete A.width, (S = p == null ? void 0 : p.style) == null || delete S.height), i === "USER" && Z(g == null ? void 0 : g.prevention, Zt) && (p == null || delete p.renderer), i === "USER" && Z(g == null ? void 0 : g.prevention, Kt) && (p == null || delete p.parser), s && this.setChangedAt(p, l), c[f] = { ...g }, p = { ...(this.policies[g.policy] ?? ft).restrict({
6180
+ }), i === "USER" && Z(g == null ? void 0 : g.prevention, Me) && delete p.value, i === "USER" && Z(g == null ? void 0 : g.prevention, jt) && ((x = p == null ? void 0 : p.style) == null || delete x.justifyContent, (v = p == null ? void 0 : p.style) == null || delete v.alignItems), i === "USER" && Z(g == null ? void 0 : g.prevention, at) && ((A = p == null ? void 0 : p.style) == null || delete A.width, (S = p == null ? void 0 : p.style) == null || delete S.height), i === "USER" && Z(g == null ? void 0 : g.prevention, Zt) && (p == null || delete p.renderer), i === "USER" && Z(g == null ? void 0 : g.prevention, Kt) && (p == null || delete p.parser), s && this.setChangedAt(p, l), c[f] = { ...g }, p = { ...(this.policies[g.policy] ?? ft).restrict({
6179
6181
  table: this,
6180
6182
  point: d,
6181
6183
  patch: p,
@@ -6237,12 +6239,12 @@ class ne {
6237
6239
  const b = l + y;
6238
6240
  if (b > this.right)
6239
6241
  return;
6240
- const x = { y: g, x: b }, R = this.parse(x, p.value ?? "");
6241
- if (R.style = { ...p.style, ...R.style }, i) {
6242
+ const x = { y: g, x: b }, v = this.parse(x, p.value ?? "");
6243
+ if (v.style = { ...p.style, ...v.style }, i) {
6242
6244
  const A = this.getCellByPoint(x, "SYSTEM");
6243
- R.style = A == null ? void 0 : A.style, R.justifyContent = A == null ? void 0 : A.justifyContent, R.alignItems = A == null ? void 0 : A.alignItems;
6245
+ v.style = A == null ? void 0 : A.style, v.justifyContent = A == null ? void 0 : A.justifyContent, v.alignItems = A == null ? void 0 : A.alignItems;
6244
6246
  }
6245
- u[re(x)] = R;
6247
+ u[re(x)] = v;
6246
6248
  });
6247
6249
  }), this.update({
6248
6250
  diff: u,
@@ -6436,7 +6438,7 @@ class ne {
6436
6438
  const o = new es(this), a = [], c = this.idMatrix.map((u) => [...u]);
6437
6439
  for (let u = e; u < e + t; u++) {
6438
6440
  const d = this.getCellByPoint({ y: 0, x: u }, "SYSTEM");
6439
- if (s === "USER" && Z(d == null ? void 0 : d.prevention, Rt)) {
6441
+ if (s === "USER" && Z(d == null ? void 0 : d.prevention, vt)) {
6440
6442
  console.warn(`Cannot delete col ${u}.`);
6441
6443
  continue;
6442
6444
  }
@@ -6581,12 +6583,12 @@ class ne {
6581
6583
  matrix: e.matrixFrom,
6582
6584
  base: -1
6583
6585
  });
6584
- t && vt(t.idMatrix, e.matrixFrom, {
6586
+ t && Rt(t.idMatrix, e.matrixFrom, {
6585
6587
  top: r,
6586
6588
  left: i,
6587
6589
  bottom: r + c,
6588
6590
  right: i + h
6589
- }), vt(s.idMatrix, e.matrixTo, {
6591
+ }), Rt(s.idMatrix, e.matrixTo, {
6590
6592
  top: o,
6591
6593
  left: a,
6592
6594
  bottom: o + c,
@@ -6715,7 +6717,7 @@ const ot = (n) => {
6715
6717
  }, de = (n) => {
6716
6718
  n.type.startsWith("touch") || n.preventDefault();
6717
6719
  }, Va = Lt(({ y: n, x: e, operationStyle: t }) => {
6718
- const s = Ce(n), i = `${xe(e)}${s}`, { store: o, dispatch: a } = Re(ve), c = ue(!0), h = ue(null), {
6720
+ const s = Ce(n), i = `${xe(e)}${s}`, { store: o, dispatch: a } = ve(Re), c = ue(!0), h = ue(null), {
6719
6721
  tableReactive: l,
6720
6722
  editingAddress: u,
6721
6723
  choosing: d,
@@ -6725,14 +6727,14 @@ const ot = (n) => {
6725
6727
  editorRef: y,
6726
6728
  showAddress: b,
6727
6729
  autofillDraggingTo: x,
6728
- contextMenuItems: R
6729
- } = o, A = l.current, S = _t(o), m = A == null ? void 0 : A.wire.lastFocused, $ = ie(f), T = u === i, O = d.y === n && d.x === e, N = _(() => {
6730
+ contextMenuItems: v
6731
+ } = o, A = l.current, S = _t(o), m = A == null ? void 0 : A.wire.lastFocused, $ = ie(f), T = u === i, k = d.y === n && d.x === e, N = _(() => {
6730
6732
  var G;
6731
6733
  const P = (G = h.current) == null ? void 0 : G.getBoundingClientRect();
6732
6734
  if (P == null)
6733
6735
  return null;
6734
6736
  a(
6735
- vi({
6737
+ Ri({
6736
6738
  y: P.y,
6737
6739
  x: P.x,
6738
6740
  height: P.height,
@@ -6741,17 +6743,17 @@ const ot = (n) => {
6741
6743
  );
6742
6744
  }, []);
6743
6745
  if (q(() => {
6744
- if (O && !c.current) {
6746
+ if (k && !c.current) {
6745
6747
  N();
6746
6748
  return;
6747
6749
  }
6748
6750
  c.current = !1;
6749
- }, [O, T]), !A)
6751
+ }, [k, T]), !A)
6750
6752
  return null;
6751
6753
  const I = A.getCellByPoint({ y: n, x: e }, "SYSTEM"), B = _((P) => {
6752
6754
  a(lt({ value: P }));
6753
6755
  }, []), z = _((P) => {
6754
- a(Fe({ tableReactive: { current: P.__raw__ } }));
6756
+ a($e({ tableReactive: { current: P.__raw__ } }));
6755
6757
  }, []);
6756
6758
  let F = "", E;
6757
6759
  try {
@@ -6759,13 +6761,13 @@ const ot = (n) => {
6759
6761
  } catch (P) {
6760
6762
  P instanceof C ? (F = P.message, E = P.code) : (F = P.message, E = "#UNKNOWN", console.error(P));
6761
6763
  }
6762
- const w = y.current, M = !!(A.wire.editingAddress || u), k = _(
6764
+ const w = y.current, M = !!(A.wire.editingAddress || u), O = _(
6763
6765
  (P) => {
6764
6766
  if (P.stopPropagation(), de(P), !ot(P) || !w)
6765
6767
  return !1;
6766
6768
  if (P.type.startsWith("touch"))
6767
- return M && w && w.blur(), a(Pe({ y: n, x: e })), a(Oe({ startY: n, startX: e, endY: n, endX: e })), !0;
6768
- P.shiftKey ? a(Ee({ y: n, x: e })) : a(Oe({ startY: n, startX: e, endY: -1, endX: -1 })), a(ze(!0));
6769
+ return M && w && w.blur(), a(Pe({ y: n, x: e })), a(ke({ startY: n, startX: e, endY: n, endX: e })), !0;
6770
+ P.shiftKey ? a(Ee({ y: n, x: e })) : a(ke({ startY: n, startX: e, endY: -1, endX: -1 })), a(ze(!0));
6769
6771
  const G = `${A.sheetPrefix(!S)}${i}`;
6770
6772
  return M && je({ input: m || null, ref: G }) || (A.wire.lastFocused = w, w.focus(), a(he("")), x) ? !1 : (M && B(w.value), P.shiftKey || a(Pe({ y: n, x: e })), !0);
6771
6773
  },
@@ -6774,7 +6776,7 @@ const ot = (n) => {
6774
6776
  (P) => {
6775
6777
  if (P.stopPropagation(), !P.type.startsWith("touch")) {
6776
6778
  if (de(P), a(ze(!1)), x)
6777
- return a(Rn(x)), w == null || w.focus(), !1;
6779
+ return a(vn(x)), w == null || w.focus(), !1;
6778
6780
  M && a(Ee({ y: -1, x: -1 }));
6779
6781
  }
6780
6782
  },
@@ -6810,8 +6812,8 @@ const ot = (n) => {
6810
6812
  ), j = _((P) => {
6811
6813
  a(xt({ x: e, y: n })), a(ze(!0)), P.stopPropagation();
6812
6814
  }, []), V = _(
6813
- (P) => R.length > 0 ? (P.stopPropagation(), de(P), a(Vt({ y: P.clientY, x: P.clientX })), !1) : !0,
6814
- [R.length]
6815
+ (P) => v.length > 0 ? (P.stopPropagation(), de(P), a(Vt({ y: P.clientY, x: P.clientX })), !1) : !0,
6816
+ [v.length]
6815
6817
  ), ee = _(
6816
6818
  (P) => {
6817
6819
  P.stopPropagation(), de(P), he(i);
@@ -6819,15 +6821,15 @@ const ot = (n) => {
6819
6821
  return G.initEvent("dblclick", !0, !0), w == null || w.dispatchEvent(G), !1;
6820
6822
  },
6821
6823
  [i, w]
6822
- ), te = lr(() => !T && O && $.bottom === -1 || $.bottom === n && $.right === e ? "gs-autofill-drag" : "gs-autofill-drag gs-hidden", [T, O, $]);
6823
- return w ? /* @__PURE__ */ v(
6824
+ ), te = lr(() => !T && k && $.bottom === -1 || $.bottom === n && $.right === e ? "gs-autofill-drag" : "gs-autofill-drag gs-hidden", [T, k, $]);
6825
+ return w ? /* @__PURE__ */ R(
6824
6826
  "td",
6825
6827
  {
6826
6828
  ref: h,
6827
6829
  "data-x": e,
6828
6830
  "data-y": n,
6829
6831
  "data-address": i,
6830
- className: `gs-cell ${Rr($, { y: n, x: e }) ? "gs-selecting" : ""} ${O ? "gs-choosing" : ""} ${T ? "gs-editing" : ""}`,
6832
+ className: `gs-cell ${vr($, { y: n, x: e }) ? "gs-selecting" : ""} ${k ? "gs-choosing" : ""} ${T ? "gs-editing" : ""}`,
6831
6833
  style: {
6832
6834
  ...I == null ? void 0 : I.style,
6833
6835
  ...t
@@ -6838,8 +6840,8 @@ const ot = (n) => {
6838
6840
  "div",
6839
6841
  {
6840
6842
  className: "gs-cell-inner-wrap",
6841
- onMouseDown: k,
6842
- onTouchStart: k,
6843
+ onMouseDown: O,
6844
+ onTouchStart: O,
6843
6845
  onMouseEnter: L,
6844
6846
  onMouseUp: H,
6845
6847
  children: [
@@ -6853,26 +6855,26 @@ const ot = (n) => {
6853
6855
  alignItems: (I == null ? void 0 : I.alignItems) || "start"
6854
6856
  },
6855
6857
  children: [
6856
- F && /* @__PURE__ */ v("div", { className: "gs-formula-error-triangle", title: F }),
6857
- b && /* @__PURE__ */ v("div", { className: "gs-cell-label", children: i }),
6858
- /* @__PURE__ */ v("div", { className: "gs-cell-rendered", children: E })
6858
+ F && /* @__PURE__ */ R("div", { className: "gs-formula-error-triangle", title: F }),
6859
+ b && /* @__PURE__ */ R("div", { className: "gs-cell-label", children: i }),
6860
+ /* @__PURE__ */ R("div", { className: "gs-cell-rendered", children: E })
6859
6861
  ]
6860
6862
  }
6861
6863
  ),
6862
- /* @__PURE__ */ v("div", { className: te, onMouseDown: j })
6864
+ /* @__PURE__ */ R("div", { className: te, onMouseDown: j })
6863
6865
  ]
6864
6866
  }
6865
6867
  )
6866
6868
  },
6867
6869
  e
6868
- ) : /* @__PURE__ */ v("td", { "data-x": e, "data-y": n, "data-address": i, className: "gs-cell gs-hidden", children: /* @__PURE__ */ K("div", { className: "gs-cell-inner-wrap", children: [
6869
- /* @__PURE__ */ v("div", { className: "gs-cell-inner", children: /* @__PURE__ */ v("div", { className: "gs-cell-rendered" }) }),
6870
- /* @__PURE__ */ v("div", { className: "gs-autofill-drag" })
6870
+ ) : /* @__PURE__ */ R("td", { "data-x": e, "data-y": n, "data-address": i, className: "gs-cell gs-hidden", children: /* @__PURE__ */ K("div", { className: "gs-cell-inner-wrap", children: [
6871
+ /* @__PURE__ */ R("div", { className: "gs-cell-inner", children: /* @__PURE__ */ R("div", { className: "gs-cell-rendered" }) }),
6872
+ /* @__PURE__ */ R("div", { className: "gs-autofill-drag" })
6871
6873
  ] }) }, e);
6872
6874
  }), qa = 0.4, Ga = 200;
6873
6875
  let sn = (/* @__PURE__ */ new Date()).getTime(), gt = 0;
6874
6876
  function We({ style: n, horizontal: e = 0, vertical: t = 0, className: s = "" }) {
6875
- const r = ue(null), { store: i, dispatch: o } = Re(ve), {
6877
+ const r = ue(null), { store: i, dispatch: o } = ve(Re), {
6876
6878
  tabularRef: a,
6877
6879
  autofillDraggingTo: c,
6878
6880
  dragging: h,
@@ -6883,13 +6885,13 @@ function We({ style: n, horizontal: e = 0, vertical: t = 0, className: s = "" })
6883
6885
  editingAddress: g
6884
6886
  } = i, p = d.current;
6885
6887
  let y = !1;
6886
- const b = _t(i), x = !!(p != null && p.wire.editingAddress || g), R = _(
6888
+ const b = _t(i), x = !!(p != null && p.wire.editingAddress || g), v = _(
6887
6889
  (N) => {
6888
6890
  if (!p)
6889
6891
  return { x: -1, y: -1 };
6890
6892
  if (e == 0 && t == 0) {
6891
- const F = a.current.getBoundingClientRect(), { left: E, top: w, right: M, bottom: k } = F;
6892
- e = N.pageX > M ? 1 : N.pageX < E ? -1 : 0, e === 0 && (t = N.pageY > k ? 1 : N.pageY < w ? -1 : 0);
6893
+ const F = a.current.getBoundingClientRect(), { left: E, top: w, right: M, bottom: O } = F;
6894
+ e = N.pageX > M ? 1 : N.pageX < E ? -1 : 0, e === 0 && (t = N.pageY > O ? 1 : N.pageY < w ? -1 : 0);
6893
6895
  }
6894
6896
  const I = _s(a.current);
6895
6897
  let { endX: B, endY: z } = l;
@@ -6905,7 +6907,7 @@ function We({ style: n, horizontal: e = 0, vertical: t = 0, className: s = "" })
6905
6907
  left: gt * e,
6906
6908
  top: gt * t
6907
6909
  }), u.current.focus();
6908
- const { x: B, y: z } = R(N);
6910
+ const { x: B, y: z } = v(N);
6909
6911
  if (c) {
6910
6912
  const { y: F, x: E } = c;
6911
6913
  o(xt({ y: z === -1 ? F : z, x: B === -1 ? E : B }));
@@ -6927,7 +6929,7 @@ function We({ style: n, horizontal: e = 0, vertical: t = 0, className: s = "" })
6927
6929
  x,
6928
6930
  l,
6929
6931
  b,
6930
- R
6932
+ v
6931
6933
  ]
6932
6934
  ), S = _(
6933
6935
  (N) => {
@@ -6949,23 +6951,23 @@ function We({ style: n, horizontal: e = 0, vertical: t = 0, className: s = "" })
6949
6951
  const I = _s(a.current);
6950
6952
  if (I.bottom === -1 || I.right === -1)
6951
6953
  return;
6952
- const { x: B, y: z } = R(N);
6954
+ const { x: B, y: z } = v(N);
6953
6955
  if (c) {
6954
6956
  const { y: F, x: E } = c;
6955
- o(Rn({ y: z === -1 ? F : z, x: B === -1 ? E : B })), u.current.focus();
6957
+ o(vn({ y: z === -1 ? F : z, x: B === -1 ? E : B })), u.current.focus();
6956
6958
  } else
6957
6959
  x && o(Ee({ y: -1, x: -1 }));
6958
6960
  },
6959
- [c, x, R]
6961
+ [c, x, v]
6960
6962
  ), T = _(
6961
6963
  (N) => {
6962
6964
  m(), o(ze(!1)), requestAnimationFrame(() => $(N));
6963
6965
  },
6964
6966
  [m, $]
6965
- ), O = _(() => {
6967
+ ), k = _(() => {
6966
6968
  m();
6967
6969
  }, [m]);
6968
- return q(() => m, [m]), !u.current || !h && !c ? /* @__PURE__ */ v("div", { className: `gs-scroll-handle gs-hidden ${s}` }) : /* @__PURE__ */ v(
6970
+ return q(() => m, [m]), !u.current || !h && !c ? /* @__PURE__ */ R("div", { className: `gs-scroll-handle gs-hidden ${s}` }) : /* @__PURE__ */ R(
6969
6971
  "div",
6970
6972
  {
6971
6973
  style: n,
@@ -6974,12 +6976,12 @@ function We({ style: n, horizontal: e = 0, vertical: t = 0, className: s = "" })
6974
6976
  T(N);
6975
6977
  },
6976
6978
  onMouseEnter: S,
6977
- onMouseLeave: O
6979
+ onMouseLeave: k
6978
6980
  }
6979
6981
  );
6980
6982
  }
6981
6983
  const Qa = Lt(({ x: n }) => {
6982
- const e = xe(n), { store: t, dispatch: s } = Re(ve), {
6984
+ const e = xe(n), { store: t, dispatch: s } = ve(Re), {
6983
6985
  tableReactive: r,
6984
6986
  editingAddress: i,
6985
6987
  choosing: o,
@@ -6989,7 +6991,7 @@ const Qa = Lt(({ x: n }) => {
6989
6991
  autofillDraggingTo: l,
6990
6992
  dragging: u,
6991
6993
  contextMenuItems: d
6992
- } = t, f = r.current, g = f == null ? void 0 : f.getCellByPoint({ y: 0, x: n }, "SYSTEM"), p = (g == null ? void 0 : g.width) || be, y = _t(t), b = f == null ? void 0 : f.wire.lastFocused, x = !!(f != null && f.wire.editingAddress || i), R = _(
6994
+ } = t, f = r.current, g = f == null ? void 0 : f.getCellByPoint({ y: 0, x: n }, "SYSTEM"), p = (g == null ? void 0 : g.width) || be, y = _t(t), b = f == null ? void 0 : f.wire.lastFocused, x = !!(f != null && f.wire.editingAddress || i), v = _(
6993
6995
  (T) => {
6994
6996
  s(lt({ value: T, point: o }));
6995
6997
  },
@@ -7001,18 +7003,18 @@ const Qa = Lt(({ x: n }) => {
7001
7003
  if (T.stopPropagation(), de(T), !ot(T) || !f || u)
7002
7004
  return !1;
7003
7005
  if (T.type.startsWith("touch"))
7004
- return x && h.current && h.current.blur(), s(Pe({ y: 1, x: n })), s(Oe({ startY: 1, startX: n, endY: f.getNumRows(), endX: n })), !0;
7005
- s(Oe({ startY: 1, startX: n, endY: -1, endX: n }));
7006
- const O = `${f.sheetPrefix(!y)}${e}:${e}`;
7007
- if (x && je({ input: b || null, ref: O }))
7008
- return s(Oe({ startY: f.getNumRows(), startX: n, endY: 0, endX: n })), !1;
7006
+ return x && h.current && h.current.blur(), s(Pe({ y: 1, x: n })), s(ke({ startY: 1, startX: n, endY: f.getNumRows(), endX: n })), !0;
7007
+ s(ke({ startY: 1, startX: n, endY: -1, endX: n }));
7008
+ const k = `${f.sheetPrefix(!y)}${e}:${e}`;
7009
+ if (x && je({ input: b || null, ref: k }))
7010
+ return s(ke({ startY: f.getNumRows(), startX: n, endY: 0, endX: n })), !1;
7009
7011
  let N = T.shiftKey ? a.startX : n;
7010
7012
  return N === -1 && (N = o.x), s(
7011
7013
  Nn({
7012
7014
  range: { start: N, end: n },
7013
7015
  numRows: f.getNumRows()
7014
7016
  })
7015
- ), x && R((b == null ? void 0 : b.value) ?? ""), s(Pe({ y: 1, x: N })), s(he("")), s(ze(!0)), !l;
7017
+ ), x && v((b == null ? void 0 : b.value) ?? ""), s(Pe({ y: 1, x: N })), s(he("")), s(ze(!0)), !l;
7016
7018
  },
7017
7019
  [u, x, y, e, b, a, o, l]
7018
7020
  ), m = _(
@@ -7027,23 +7029,23 @@ const Qa = Lt(({ x: n }) => {
7027
7029
  if (de(T), T.stopPropagation(), l)
7028
7030
  return s(xt({ y: 1, x: n })), !1;
7029
7031
  if (x) {
7030
- const O = ie({ ...a, endY: 1, endX: n }), [N, I] = [xe(O.left), xe(O.right)], B = `${f.sheetPrefix(!y)}${N}:${I}`;
7032
+ const k = ie({ ...a, endY: 1, endX: n }), [N, I] = [xe(k.left), xe(k.right)], B = `${f.sheetPrefix(!y)}${N}:${I}`;
7031
7033
  je({ input: b || null, ref: B });
7032
7034
  }
7033
7035
  if (l == null) {
7034
- const { startY: O } = a;
7035
- s(Ee(O === 1 ? { y: f.getNumRows(), x: n } : { y: 1, x: n }));
7036
+ const { startY: k } = a;
7037
+ s(Ee(k === 1 ? { y: f.getNumRows(), x: n } : { y: 1, x: n }));
7036
7038
  }
7037
7039
  return !1;
7038
7040
  }, 100);
7039
- return f ? /* @__PURE__ */ v(
7041
+ return f ? /* @__PURE__ */ R(
7040
7042
  "th",
7041
7043
  {
7042
7044
  "data-x": n,
7043
7045
  className: `gs-th gs-th-top ${o.x === n ? "gs-choosing" : ""} ${Ct({ start: a.startX, end: a.endX }, n) ? c ? "gs-th-selecting" : "gs-selecting" : ""}`,
7044
7046
  style: { width: p, minWidth: p, maxWidth: p },
7045
7047
  onContextMenu: (T) => d.length > 0 ? (T.stopPropagation(), de(T), s(Vt({ y: T.clientY, x: T.clientX })), !1) : !0,
7046
- children: /* @__PURE__ */ v(
7048
+ children: /* @__PURE__ */ R(
7047
7049
  "div",
7048
7050
  {
7049
7051
  className: "gs-th-inner-wrap",
@@ -7052,7 +7054,7 @@ const Qa = Lt(({ x: n }) => {
7052
7054
  onMouseEnter: $,
7053
7055
  onMouseUp: m,
7054
7056
  children: /* @__PURE__ */ K("div", { className: "gs-th-inner", style: { height: f.headerHeight, position: "relative" }, children: [
7055
- /* @__PURE__ */ v(
7057
+ /* @__PURE__ */ R(
7056
7058
  We,
7057
7059
  {
7058
7060
  style: {
@@ -7063,7 +7065,7 @@ const Qa = Lt(({ x: n }) => {
7063
7065
  }
7064
7066
  ),
7065
7067
  f.getLabel(g == null ? void 0 : g.labeler, n) ?? e,
7066
- /* @__PURE__ */ v(
7068
+ /* @__PURE__ */ R(
7067
7069
  "div",
7068
7070
  {
7069
7071
  className: `
@@ -7072,19 +7074,19 @@ const Qa = Lt(({ x: n }) => {
7072
7074
  ${u ? "gs-hidden" : ""}`,
7073
7075
  style: { height: f.headerHeight },
7074
7076
  onMouseDown: A,
7075
- children: /* @__PURE__ */ v("i", {})
7077
+ children: /* @__PURE__ */ R("i", {})
7076
7078
  }
7077
7079
  )
7078
7080
  ] })
7079
7081
  }
7080
7082
  )
7081
7083
  }
7082
- ) : /* @__PURE__ */ v("th", { "data-x": n, className: "gs-th gs-th-top gs-hidden", children: /* @__PURE__ */ v("div", { className: "gs-th-inner-wrap", children: /* @__PURE__ */ K("div", { className: "gs-th-inner", children: [
7083
- /* @__PURE__ */ v(We, { style: { position: "absolute" }, vertical: -1 }),
7084
- /* @__PURE__ */ v("div", { className: "gs-resizer" })
7084
+ ) : /* @__PURE__ */ R("th", { "data-x": n, className: "gs-th gs-th-top gs-hidden", children: /* @__PURE__ */ R("div", { className: "gs-th-inner-wrap", children: /* @__PURE__ */ K("div", { className: "gs-th-inner", children: [
7085
+ /* @__PURE__ */ R(We, { style: { position: "absolute" }, vertical: -1 }),
7086
+ /* @__PURE__ */ R("div", { className: "gs-resizer" })
7085
7087
  ] }) }) });
7086
7088
  }), Ja = Lt(({ y: n }) => {
7087
- const e = `${Ce(n)}`, { store: t, dispatch: s } = Re(ve), {
7089
+ const e = `${Ce(n)}`, { store: t, dispatch: s } = ve(Re), {
7088
7090
  choosing: r,
7089
7091
  editingAddress: i,
7090
7092
  selectingZone: o,
@@ -7094,42 +7096,42 @@ const Qa = Lt(({ x: n }) => {
7094
7096
  autofillDraggingTo: l,
7095
7097
  dragging: u,
7096
7098
  contextMenuItems: d
7097
- } = t, f = h.current, g = f == null ? void 0 : f.getCellByPoint({ y: n, x: 0 }, "SYSTEM"), p = (g == null ? void 0 : g.height) || me, y = _t(t), b = f == null ? void 0 : f.wire.lastFocused, x = !!(f != null && f.wire.editingAddress || i), R = _(
7098
- (O) => {
7099
- s(lt({ value: O, point: r }));
7099
+ } = t, f = h.current, g = f == null ? void 0 : f.getCellByPoint({ y: n, x: 0 }, "SYSTEM"), p = (g == null ? void 0 : g.height) || me, y = _t(t), b = f == null ? void 0 : f.wire.lastFocused, x = !!(f != null && f.wire.editingAddress || i), v = _(
7100
+ (k) => {
7101
+ s(lt({ value: k, point: r }));
7100
7102
  },
7101
7103
  [r]
7102
- ), A = _((O) => {
7103
- s(ls([n, O.clientY, O.clientY])), O.stopPropagation(), de(O);
7104
+ ), A = _((k) => {
7105
+ s(ls([n, k.clientY, k.clientY])), k.stopPropagation(), de(k);
7104
7106
  }, []), S = _(
7105
- (O) => {
7106
- if (O.stopPropagation(), de(O), !ot(O) || !f || u)
7107
+ (k) => {
7108
+ if (k.stopPropagation(), de(k), !ot(k) || !f || u)
7107
7109
  return !1;
7108
- if (O.type.startsWith("touch"))
7109
- return x && c.current && c.current.blur(), s(Pe({ y: n, x: 1 })), s(Oe({ startY: n, startX: 1, endY: n, endX: f.getNumCols() })), !0;
7110
- s(Oe({ startY: n, startX: 1, endY: n, endX: -1 }));
7110
+ if (k.type.startsWith("touch"))
7111
+ return x && c.current && c.current.blur(), s(Pe({ y: n, x: 1 })), s(ke({ startY: n, startX: 1, endY: n, endX: f.getNumCols() })), !0;
7112
+ s(ke({ startY: n, startX: 1, endY: n, endX: -1 }));
7111
7113
  const N = `${f.sheetPrefix(!y)}${e}:${e}`;
7112
7114
  if (x && je({ input: b || null, ref: N }))
7113
- return s(Oe({ startY: n, startX: f.getNumCols(), endY: n, endX: 0 })), !1;
7114
- let I = O.shiftKey ? o.startY : n;
7115
+ return s(ke({ startY: n, startX: f.getNumCols(), endY: n, endX: 0 })), !1;
7116
+ let I = k.shiftKey ? o.startY : n;
7115
7117
  return I === -1 && (I = r.y), s(
7116
7118
  Sn({
7117
7119
  range: { start: I, end: n },
7118
7120
  numCols: f.getNumCols()
7119
7121
  })
7120
- ), x && R((b == null ? void 0 : b.value) ?? ""), s(Pe({ y: I, x: 1 })), s(he("")), s(ze(!0)), !l;
7122
+ ), x && v((b == null ? void 0 : b.value) ?? ""), s(Pe({ y: I, x: 1 })), s(he("")), s(ze(!0)), !l;
7121
7123
  },
7122
7124
  [u, x, y, e, b, o, r, l]
7123
7125
  ), m = _(
7124
- (O) => {
7125
- if (O.stopPropagation(), !O.type.startsWith("touch") && (de(O), s(ze(!1)), l))
7126
+ (k) => {
7127
+ if (k.stopPropagation(), !k.type.startsWith("touch") && (de(k), s(ze(!1)), l))
7126
7128
  return c.current.focus(), !1;
7127
7129
  },
7128
7130
  [l]
7129
- ), $ = Fn((O) => {
7130
- if (!ot(O) || !f || O.type.startsWith("touch"))
7131
+ ), $ = Fn((k) => {
7132
+ if (!ot(k) || !f || k.type.startsWith("touch"))
7131
7133
  return !1;
7132
- if (de(O), O.stopPropagation(), l)
7134
+ if (de(k), k.stopPropagation(), l)
7133
7135
  return s(xt({ y: n, x: 1 })), !1;
7134
7136
  if (x) {
7135
7137
  const N = ie({ ...o, endY: n, endX: 1 }), [I, B] = [Ce(N.top), Ce(N.bottom)], z = `${f.sheetPrefix(!y)}${I}:${B}`;
@@ -7141,17 +7143,17 @@ const Qa = Lt(({ x: n }) => {
7141
7143
  }
7142
7144
  return !1;
7143
7145
  }, 100), T = _(
7144
- (O) => d.length > 0 ? (O.stopPropagation(), de(O), s(Vt({ y: O.clientY, x: O.clientX })), !1) : !0,
7146
+ (k) => d.length > 0 ? (k.stopPropagation(), de(k), s(Vt({ y: k.clientY, x: k.clientX })), !1) : !0,
7145
7147
  [d.length]
7146
7148
  );
7147
- return f ? /* @__PURE__ */ v(
7149
+ return f ? /* @__PURE__ */ R(
7148
7150
  "th",
7149
7151
  {
7150
7152
  "data-y": n,
7151
7153
  className: `gs-th gs-th-left ${r.y === n ? "gs-choosing" : ""} ${Ct({ start: o.startY, end: o.endY }, n) ? a ? "gs-th-selecting" : "gs-selecting" : ""}`,
7152
7154
  style: { height: p },
7153
7155
  onContextMenu: T,
7154
- children: /* @__PURE__ */ v(
7156
+ children: /* @__PURE__ */ R(
7155
7157
  "div",
7156
7158
  {
7157
7159
  className: "gs-th-inner-wrap",
@@ -7160,7 +7162,7 @@ const Qa = Lt(({ x: n }) => {
7160
7162
  onMouseEnter: $,
7161
7163
  onMouseUp: m,
7162
7164
  children: /* @__PURE__ */ K("div", { className: "gs-th-inner", style: { width: f.headerWidth, position: "relative" }, children: [
7163
- /* @__PURE__ */ v(
7165
+ /* @__PURE__ */ R(
7164
7166
  We,
7165
7167
  {
7166
7168
  style: {
@@ -7171,7 +7173,7 @@ const Qa = Lt(({ x: n }) => {
7171
7173
  }
7172
7174
  ),
7173
7175
  f.getLabel(g == null ? void 0 : g.labeler, n) ?? e,
7174
- /* @__PURE__ */ v(
7176
+ /* @__PURE__ */ R(
7175
7177
  "div",
7176
7178
  {
7177
7179
  className: `
@@ -7188,8 +7190,8 @@ const Qa = Lt(({ x: n }) => {
7188
7190
  }
7189
7191
  ) : null;
7190
7192
  }), ec = () => {
7191
- var $, T, O, N, I, B, z, F, E;
7192
- const [n, e] = pe({}), { store: t, dispatch: s } = Re(ve), {
7193
+ var $, T, k, N, I, B, z, F, E;
7194
+ const [n, e] = pe({}), { store: t, dispatch: s } = ve(Re), {
7193
7195
  tableReactive: r,
7194
7196
  choosing: i,
7195
7197
  editingAddress: o,
@@ -7202,7 +7204,7 @@ const Qa = Lt(({ x: n }) => {
7202
7204
  topHeaderSelecting: f,
7203
7205
  totalWidth: g,
7204
7206
  totalHeight: p
7205
- } = t, y = r.current, [b, x] = pe(null), R = _((w) => {
7207
+ } = t, y = r.current, [b, x] = pe(null), v = _((w) => {
7206
7208
  w.preventDefault(), w.stopPropagation();
7207
7209
  }, []), A = _(
7208
7210
  (w) => {
@@ -7212,7 +7214,7 @@ const Qa = Lt(({ x: n }) => {
7212
7214
  ), S = _(() => {
7213
7215
  y && (s(Pe({ y: -1, x: -1 })), requestAnimationFrame(() => {
7214
7216
  s(Pe({ y: 1, x: 1 })), s(
7215
- Oe({
7217
+ ke({
7216
7218
  startY: 1,
7217
7219
  startX: 1,
7218
7220
  endY: y.getNumRows(),
@@ -7228,7 +7230,7 @@ const Qa = Lt(({ x: n }) => {
7228
7230
  e({}), y.wire.paletteBySheetName = {};
7229
7231
  return;
7230
7232
  }
7231
- const M = {}, k = {}, H = new ct(u.substring(1));
7233
+ const M = {}, O = {}, H = new ct(u.substring(1));
7232
7234
  H.tokenize();
7233
7235
  let L = 0;
7234
7236
  for (const j of H.tokens)
@@ -7236,13 +7238,13 @@ const Qa = Lt(({ x: n }) => {
7236
7238
  const V = wr(j.stringify()), ee = V.indexOf("!");
7237
7239
  if (ee !== -1) {
7238
7240
  const te = V.substring(0, ee), P = V.substring(ee + 1), G = ii(te), le = P.toUpperCase();
7239
- k[G] == null && (k[G] = {}), k[G][le] == null && (k[G][le] = L++);
7241
+ O[G] == null && (O[G] = {}), O[G][le] == null && (O[G][le] = L++);
7240
7242
  } else {
7241
7243
  const te = V.toUpperCase();
7242
7244
  M[te] == null && (M[te] = L++);
7243
7245
  }
7244
7246
  }
7245
- e(M), y.wire.paletteBySheetName = k;
7247
+ e(M), y.wire.paletteBySheetName = O;
7246
7248
  }, [t.inputting, t.editingAddress, r]), q(() => {
7247
7249
  y && (y.wire.choosingAddress = re(i));
7248
7250
  }, [i]), q(() => {
@@ -7253,7 +7255,7 @@ const Qa = Lt(({ x: n }) => {
7253
7255
  ...n,
7254
7256
  ...y.wire.paletteBySheetName[y.sheetName]
7255
7257
  });
7256
- return /* @__PURE__ */ v(yt, { children: /* @__PURE__ */ v(
7258
+ return /* @__PURE__ */ R(yt, { children: /* @__PURE__ */ R(
7257
7259
  "div",
7258
7260
  {
7259
7261
  className: "gs-tabular",
@@ -7262,9 +7264,9 @@ const Qa = Lt(({ x: n }) => {
7262
7264
  height: l === -1 ? void 0 : l
7263
7265
  },
7264
7266
  ref: a,
7265
- onMouseMove: R,
7267
+ onMouseMove: v,
7266
7268
  onScroll: A,
7267
- children: /* @__PURE__ */ v(
7269
+ children: /* @__PURE__ */ R(
7268
7270
  "div",
7269
7271
  {
7270
7272
  className: "gs-tabular-inner",
@@ -7273,14 +7275,14 @@ const Qa = Lt(({ x: n }) => {
7273
7275
  height: p + 1
7274
7276
  },
7275
7277
  children: /* @__PURE__ */ K("table", { className: "gs-table", children: [
7276
- /* @__PURE__ */ v("thead", { className: "gs-thead", style: { height: y.headerHeight }, children: /* @__PURE__ */ K("tr", { className: "gs-row", children: [
7277
- /* @__PURE__ */ v(
7278
+ /* @__PURE__ */ R("thead", { className: "gs-thead", style: { height: y.headerHeight }, children: /* @__PURE__ */ K("tr", { className: "gs-row", children: [
7279
+ /* @__PURE__ */ R(
7278
7280
  "th",
7279
7281
  {
7280
7282
  className: "gs-th gs-th-left gs-th-top",
7281
7283
  style: { position: "sticky", width: y.headerWidth, height: y.headerHeight },
7282
7284
  onClick: S,
7283
- children: /* @__PURE__ */ v("div", { className: "gs-th-inner", children: /* @__PURE__ */ v(
7285
+ children: /* @__PURE__ */ R("div", { className: "gs-th-inner", children: /* @__PURE__ */ R(
7284
7286
  We,
7285
7287
  {
7286
7288
  className: d || f ? "gs-hidden" : "",
@@ -7291,15 +7293,15 @@ const Qa = Lt(({ x: n }) => {
7291
7293
  ) })
7292
7294
  }
7293
7295
  ),
7294
- /* @__PURE__ */ v(
7296
+ /* @__PURE__ */ R(
7295
7297
  "th",
7296
7298
  {
7297
7299
  className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-left",
7298
- style: { width: ((O = b == null ? void 0 : b.adjuster) == null ? void 0 : O.left) ?? 1 }
7300
+ style: { width: ((k = b == null ? void 0 : b.adjuster) == null ? void 0 : k.left) ?? 1 }
7299
7301
  }
7300
7302
  ),
7301
- (I = (N = b == null ? void 0 : b.xs) == null ? void 0 : N.map) == null ? void 0 : I.call(N, (w) => /* @__PURE__ */ v(Qa, { x: w }, w)),
7302
- /* @__PURE__ */ v(
7303
+ (I = (N = b == null ? void 0 : b.xs) == null ? void 0 : N.map) == null ? void 0 : I.call(N, (w) => /* @__PURE__ */ R(Qa, { x: w }, w)),
7304
+ /* @__PURE__ */ R(
7303
7305
  "th",
7304
7306
  {
7305
7307
  className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-right",
@@ -7307,25 +7309,25 @@ const Qa = Lt(({ x: n }) => {
7307
7309
  }
7308
7310
  )
7309
7311
  ] }) }),
7310
- /* @__PURE__ */ v("tbody", { className: "gs-table-body-adjuster", children: /* @__PURE__ */ K("tr", { className: "gs-row", children: [
7311
- /* @__PURE__ */ v(
7312
+ /* @__PURE__ */ R("tbody", { className: "gs-table-body-adjuster", children: /* @__PURE__ */ K("tr", { className: "gs-row", children: [
7313
+ /* @__PURE__ */ R(
7312
7314
  "th",
7313
7315
  {
7314
7316
  className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-vertical",
7315
7317
  style: { height: ((z = b == null ? void 0 : b.adjuster) == null ? void 0 : z.top) ?? 1 }
7316
7318
  }
7317
7319
  ),
7318
- /* @__PURE__ */ v("td", { className: "gs-adjuster gs-adjuster-vertical" }),
7319
- (F = b == null ? void 0 : b.xs) == null ? void 0 : F.map((w) => /* @__PURE__ */ v("td", { className: "gs-adjuster gs-adjuster-vertical" }, w)),
7320
- /* @__PURE__ */ v("th", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-vertical" })
7320
+ /* @__PURE__ */ R("td", { className: "gs-adjuster gs-adjuster-vertical" }),
7321
+ (F = b == null ? void 0 : b.xs) == null ? void 0 : F.map((w) => /* @__PURE__ */ R("td", { className: "gs-adjuster gs-adjuster-vertical" }, w)),
7322
+ /* @__PURE__ */ R("th", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-vertical" })
7321
7323
  ] }) }),
7322
- /* @__PURE__ */ v("tbody", { className: "gs-table-body-data", children: (E = b == null ? void 0 : b.ys) == null ? void 0 : E.map((w) => {
7324
+ /* @__PURE__ */ R("tbody", { className: "gs-table-body-data", children: (E = b == null ? void 0 : b.ys) == null ? void 0 : E.map((w) => {
7323
7325
  var M;
7324
7326
  return /* @__PURE__ */ K("tr", { className: "gs-row", children: [
7325
- /* @__PURE__ */ v(Ja, { y: w }),
7326
- /* @__PURE__ */ v("td", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-left" }),
7327
- (M = b == null ? void 0 : b.xs) == null ? void 0 : M.map((k) => /* @__PURE__ */ v(Va, { y: w, x: k, operationStyle: m[re({ y: w, x: k })] }, k)),
7328
- /* @__PURE__ */ v("td", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-right" })
7327
+ /* @__PURE__ */ R(Ja, { y: w }),
7328
+ /* @__PURE__ */ R("td", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-left" }),
7329
+ (M = b == null ? void 0 : b.xs) == null ? void 0 : M.map((O) => /* @__PURE__ */ R(Va, { y: w, x: O, operationStyle: m[re({ y: w, x: O })] }, O)),
7330
+ /* @__PURE__ */ R("td", { className: "gs-adjuster gs-adjuster-horizontal gs-adjuster-horizontal-right" })
7329
7331
  ] }, w);
7330
7332
  }) })
7331
7333
  ] })
@@ -7335,8 +7337,8 @@ const Qa = Lt(({ x: n }) => {
7335
7337
  ) });
7336
7338
  }, He = "solid 2px #0077ff", _e = "solid 1px #0077ff", tc = "dotted 2px #0077ff", sc = "dashed 2px #0077ff", nc = "rgba(0,200,100,.2)", Ue = "solid 2px #00aa78", Xe = "dashed 1px #444444", rc = (n, e) => {
7337
7339
  const t = {}, s = (b, x) => {
7338
- const R = re(b);
7339
- t[R] = t[R] || {}, Object.assign(t[R], x);
7340
+ const v = re(b);
7341
+ t[v] = t[v] || {}, Object.assign(t[v], x);
7340
7342
  }, {
7341
7343
  choosing: r,
7342
7344
  selectingZone: i,
@@ -7350,19 +7352,19 @@ const Qa = Lt(({ x: n }) => {
7350
7352
  return {};
7351
7353
  const { wire: d } = u, { copyingSheetId: f, copyingZone: g, cutting: p } = d, y = !!(d.editingAddress || l);
7352
7354
  {
7353
- const { top: b, left: x, bottom: R, right: A } = ie(i);
7355
+ const { top: b, left: x, bottom: v, right: A } = ie(i);
7354
7356
  if (!y) {
7355
- for (let S = b; S <= R; S++)
7357
+ for (let S = b; S <= v; S++)
7356
7358
  s({ y: S, x: x - 1 }, { borderRight: _e }), s({ y: S, x }, { borderLeft: _e }), s({ y: S, x: A }, { borderRight: _e }), s({ y: S, x: A + 1 }, { borderLeft: _e });
7357
7359
  for (let S = x; S <= A; S++)
7358
- s({ y: b - 1, x: S }, { borderBottom: _e }), s({ y: b, x: S }, { borderTop: _e }), s({ y: R, x: S }, { borderBottom: _e }), s({ y: R + 1, x: S }, { borderTop: _e });
7360
+ s({ y: b - 1, x: S }, { borderBottom: _e }), s({ y: b, x: S }, { borderTop: _e }), s({ y: v, x: S }, { borderBottom: _e }), s({ y: v + 1, x: S }, { borderTop: _e });
7359
7361
  }
7360
7362
  }
7361
7363
  if (h) {
7362
- const b = new wn(n, h), { top: x, left: R, bottom: A, right: S } = b.wholeArea;
7364
+ const b = new wn(n, h), { top: x, left: v, bottom: A, right: S } = b.wholeArea;
7363
7365
  for (let m = x; m <= A; m++)
7364
- s({ y: m, x: R - 1 }, { borderRight: Xe }), s({ y: m, x: R }, { borderLeft: Xe }), s({ y: m, x: S }, { borderRight: Xe }), s({ y: m, x: S + 1 }, { borderLeft: Xe });
7365
- for (let m = R; m <= S; m++)
7366
+ s({ y: m, x: v - 1 }, { borderRight: Xe }), s({ y: m, x: v }, { borderLeft: Xe }), s({ y: m, x: S }, { borderRight: Xe }), s({ y: m, x: S + 1 }, { borderLeft: Xe });
7367
+ for (let m = v; m <= S; m++)
7366
7368
  s({ y: x - 1, x: m }, { borderBottom: Xe }), s({ y: x, x: m }, { borderTop: Xe }), s({ y: A, x: m }, { borderBottom: Xe }), s({ y: A + 1, x: m }, { borderTop: Xe });
7367
7369
  }
7368
7370
  {
@@ -7378,21 +7380,21 @@ const Qa = Lt(({ x: n }) => {
7378
7380
  ), s({ y: b, x: x - 1 }, { borderRight: He }), s({ y: b, x: x + 1 }, { borderLeft: He }), s({ y: b - 1, x }, { borderBottom: He }), s({ y: b + 1, x }, { borderTop: He });
7379
7381
  }
7380
7382
  if (u.sheetId === f) {
7381
- const b = p ? tc : sc, { top: x, left: R, bottom: A, right: S } = ie(g);
7383
+ const b = p ? tc : sc, { top: x, left: v, bottom: A, right: S } = ie(g);
7382
7384
  for (let m = x; m <= A; m++)
7383
- s({ y: m, x: R - 1 }, { borderRight: b }), s({ y: m, x: R }, { borderLeft: b }), s({ y: m, x: S }, { borderRight: b }), s({ y: m, x: S + 1 }, { borderLeft: b });
7384
- for (let m = R; m <= S; m++)
7385
+ s({ y: m, x: v - 1 }, { borderRight: b }), s({ y: m, x: v }, { borderLeft: b }), s({ y: m, x: S }, { borderRight: b }), s({ y: m, x: S + 1 }, { borderLeft: b });
7386
+ for (let m = v; m <= S; m++)
7385
7387
  s({ y: x - 1, x: m }, { borderBottom: b }), s({ y: x, x: m }, { borderTop: b }), s({ y: A, x: m }, { borderBottom: b }), s({ y: A + 1, x: m }, { borderTop: b });
7386
7388
  }
7387
7389
  if (Object.entries(e).forEach(([b, x]) => {
7388
7390
  const A = `dashed 2px ${st[x % st.length]}`, { top: S, left: m, bottom: $, right: T } = u.rangeToArea(b);
7389
- for (let O = S; O <= $; O++)
7390
- s({ y: O, x: m - 1 }, { borderRight: A }), s({ y: O, x: m }, { borderLeft: A }), s({ y: O, x: T }, { borderRight: A }), s({ y: O, x: T + 1 }, { borderLeft: A });
7391
- for (let O = m; O <= T; O++)
7392
- s({ y: S - 1, x: O }, { borderBottom: A }), s({ y: S, x: O }, { borderTop: A }), s({ y: $, x: O }, { borderBottom: A }), s({ y: $ + 1, x: O }, { borderTop: A });
7391
+ for (let k = S; k <= $; k++)
7392
+ s({ y: k, x: m - 1 }, { borderRight: A }), s({ y: k, x: m }, { borderLeft: A }), s({ y: k, x: T }, { borderRight: A }), s({ y: k, x: T + 1 }, { borderLeft: A });
7393
+ for (let k = m; k <= T; k++)
7394
+ s({ y: S - 1, x: k }, { borderBottom: A }), s({ y: S, x: k }, { borderTop: A }), s({ y: $, x: k }, { borderBottom: A }), s({ y: $ + 1, x: k }, { borderTop: A });
7393
7395
  }), o.forEach((b) => {
7394
- const { y: x, x: R } = oe(b);
7395
- s({ y: x, x: R }, { backgroundColor: nc });
7396
+ const { y: x, x: v } = oe(b);
7397
+ s({ y: x, x: v }, { backgroundColor: nc });
7396
7398
  }), o.length > 0) {
7397
7399
  const { y: b, x } = oe(o[a]);
7398
7400
  s(
@@ -7406,14 +7408,14 @@ const Qa = Lt(({ x: n }) => {
7406
7408
  ), s({ y: b, x: x - 1 }, { borderRight: Ue }), s({ y: b, x: x + 1 }, { borderLeft: Ue }), s({ y: b - 1, x }, { borderBottom: Ue }), s({ y: b + 1, x }, { borderTop: Ue });
7407
7409
  }
7408
7410
  return t;
7409
- }, nn = 1753186053, ic = '.gs-root1{display:inline-block;position:relative;border-spacing:0;width:fit-content;max-width:100%;overflow:auto;font-family:"SF Pro Text","SF Pro Icons","Helvetica Neue",Helvetica,Arial,Meiryo,sans-serif}.gs-root1 .gs-main{flex:1;max-width:100%;overflow:hidden;position:relative;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.gs-root1 .gs-resizing{width:100%;height:100%;position:absolute;background-color:rgba(0,127,255,.08);top:0;left:0;z-index:2}.gs-root1 .gs-line{position:relative;top:0;left:0;border:dotted 1px #07f;box-sizing:border-box}.gs-root1 .gs-line span{font-size:10px;padding:3px;background-color:#07f;color:#fff;margin:0;position:absolute;top:0;left:0}.gs-root1 .gs-scroll-handle{width:100%;height:100%;cursor:cell}.gs-hidden{visibility:hidden;position:absolute;top:0;left:0;width:0;height:0;overflow:hidden;pointer-events:none;z-index:-1}.gs-fixed{position:fixed;top:0;left:0;z-index:1}.gs-root1[data-mode=light]{background-color:#e2e2e2;color:#000}.gs-root1[data-mode=light] .gs-main{background-color:#e2e2e2;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd}.gs-root1[data-mode=light] .gs-tabular{background-color:#e2e2e2}.gs-root1[data-mode=light] .gs-formula-bar{background-color:#efefef}.gs-root1[data-mode=light] .gs-formula-bar-editor-inner{color:#555}.gs-root1[data-mode=light] .gs-cell{border-top:solid 1px #ddd;border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-adjuster{background-color:#ddd}.gs-root1[data-mode=light] .gs-tabular-inner{background-color:#f7f7f7}.gs-root1[data-mode=light] .gs-th{background-color:#efefef;color:#666}.gs-root1[data-mode=light] .gs-th.gs-selecting{background-color:#d2d2d2}.gs-root1[data-mode=light] .gs-th.gs-choosing{background-color:#bbb}.gs-root1[data-mode=light] .gs-th.gs-th-selecting{background-color:#555;color:#fff}.gs-root1[data-mode=light] .gs-th-top .gs-th-inner{border-top:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-top .gs-th-inner-wrap{border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-left{border-top:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-left .gs-th-inner{border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-search-bar{color:rgba(0,0,0,.3)}.gs-editor[data-mode=light].gs-editing textarea{caret-color:#000000}.gs-editor[data-mode=light].gs-editing .gs-editor-hl{background-color:#f7f7f7;color:#000}.gs-editor[data-mode=light] .gs-editor-options{color:#000;background-color:#f7f7f7;border:solid 1px #ddd}.gs-root1[data-mode=dark]{background-color:#5a5a5a;color:#eee}.gs-root1[data-mode=dark] .gs-main{background-color:#3f3f3f;border-right:solid 1px #5a5a5a;border-bottom:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-tabular{background-color:#3f3f3f}.gs-root1[data-mode=dark] .gs-formula-bar{background-color:#4f4f4f}.gs-root1[data-mode=dark] .gs-formula-bar-editor-inner{color:#bbb}.gs-root1[data-mode=dark] .gs-cell{border-top:solid 1px #5a5a5a;border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-adjuster{background-color:#5a5a5a}.gs-root1[data-mode=dark] .gs-tabular-inner{background-color:#212121}.gs-root1[data-mode=dark] .gs-large-editor textarea{color:#eee;caret-color:#eeeeee}.gs-root1[data-mode=dark] .gs-th{background-color:#4f4f4f;color:#eee}.gs-root1[data-mode=dark] .gs-th.gs-selecting{background-color:#606060}.gs-root1[data-mode=dark] .gs-th.gs-choosing{background-color:#777}.gs-root1[data-mode=dark] .gs-th.gs-th-selecting{background-color:#aaa;color:#444}.gs-root1[data-mode=dark] .gs-th-top .gs-th-inner{border-top:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-top .gs-th-inner-wrap{border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-left{border-top:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-left .gs-th-inner{border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-search-bar textarea{color:#eee;caret-color:#eeeeee}.gs-root1[data-mode=dark] .gs-search-bar{color:rgba(255,255,255,.3)}.gs-editor[data-mode=dark].gs-editing textarea{caret-color:#eeeeee}.gs-editor[data-mode=dark].gs-editing .gs-editor-hl{background-color:#212121;color:#eee}.gs-editor[data-mode=dark] .gs-editor-options{color:#eee;background-color:#5a5a5a;border:solid 1px #5a5a5a}.gs-cell{transition:border-color .2s ease;padding:0;margin:0;box-sizing:border-box;position:relative;font-size:13px;letter-spacing:1px;line-height:24px;cursor:cell;user-select:none;-webkit-user-select:none;-moz-user-select:none}.gs-cell .gs-cell-inner-wrap.gs-selecting{background-color:rgba(0,128,255,.2)}.gs-cell.gs-copying textarea:focus{outline:solid 1px #0077ff}.gs-cell.gs-selecting{z-index:1}.gs-cell.gs-selecting .gs-cell-inner{background-color:rgba(0,128,255,.2)}.gs-cell.gs-selecting .gs-cell-label{display:block}.gs-cell.gs-choosing{margin-top:-1px;margin-left:-1px;z-index:1}.gs-cell.gs-choosing.gs-editing{color:transparent}.gs-cell.gs-choosing .gs-cell-label{display:block}.gs-cell .gs-formula-error-triangle{position:absolute;top:0;right:0;border-top:3px solid rgba(200,0,0,.9);border-right:3px solid rgba(200,0,0,.9);border-bottom:3px solid transparent;border-left:3px solid transparent;z-index:1}.gs-cell .gs-cell-label{font-size:8px;font-weight:400;font-style:normal;font-family:math,monospace,serif;letter-spacing:1px;line-height:14px;position:absolute;top:0;right:0;background-color:rgba(0,128,255,.2);color:rgba(255,255,255,.6);padding:0 2px;display:none;opacity:.7}.gs-cell .gs-cell-inner-wrap{width:100%;height:100%;position:absolute;top:0;left:0}.gs-cell .gs-cell-inner{width:100%;height:100%;overflow:hidden;display:flex;box-sizing:border-box;border:none!important}.gs-cell .gs-cell-rendered{overflow:hidden;white-space:pre-wrap;cursor:cell;word-wrap:break-word;word-break:break-all;padding:0 2px;width:100%;height:100%}.gs-cell .gs-cell-rendered>*{position:relative}.gs-cell .gs-cell-rendered>.backface{z-index:0}.gs-cell .gs-autofill-drag{background-color:#07f;position:absolute;width:7px;height:7px;bottom:0;right:0;margin-right:-3.5px;margin-bottom:-3.5px;cursor:crosshair;z-index:1}.gs-th[data-x="1"] .gs-th-inner-wrap{border-left:none}.gs-th[data-y="1"] .gs-th-inner-wrap{border-top:none}.gs-cell[data-x="1"]{border-left:none}.gs-cell[data-y="1"]{border-top:none}.gs-contextmenu-modal{width:100%;height:100vh;z-index:3}.gs-contextmenu{z-index:3;position:fixed;background-color:#fff;padding:5px 0;border-radius:5px;box-shadow:rgba(60,64,67,.3) 0 1px 2px 0,rgba(60,64,67,.15) 0 1px 3px 1px}.gs-contextmenu ul{min-width:250px;color:#555;margin:0;padding:0}.gs-contextmenu li{padding:5px 10px;list-style-type:none;display:flex}.gs-contextmenu li.gs-enabled{cursor:pointer}.gs-contextmenu li.gs-enabled:hover{background-color:#eee}.gs-contextmenu li.gs-disabled{opacity:.5;cursor:not-allowed}.gs-contextmenu li.gs-menu-divider{background-color:#aaa;margin:10px 0;padding:0;height:1px}.gs-contextmenu li .gs-menu-name{flex:1;font-size:15px;letter-spacing:1px}.gs-contextmenu li .gs-menu-shortcut{font-size:10px;line-height:20px;color:#999}.gs-contextmenu li .gs-menu-shortcut:before{content:"( "}.gs-contextmenu li .gs-menu-shortcut:after{content:" )"}.gs-contextmenu li .gs-menu-shortcut .gs-menu-underline{text-decoration:underline}.gs-editor-hl{padding:0 2px!important;position:absolute;font-family:monospace,Arial;font-size:12px;line-height:24px;letter-spacing:1px}.gs-formula-bar-editor-inner{position:relative;display:table-cell}.gs-editor{opacity:0;z-index:-1}.gs-editor .gs-editor-inner{position:relative}.gs-editor .gs-editor-hl{box-sizing:content-box;border:solid 2px #07f;margin:-2px -1px}.gs-editor textarea{width:100%;padding:0 2px!important;position:absolute;font-size:12px;font-family:monospace,Arial;line-height:24px;letter-spacing:1px;top:0;left:0;border:none;outline:0;background-color:transparent;color:transparent;resize:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;overflow:hidden;cursor:default;white-space:pre;height:auto}.gs-editor.gs-editing{z-index:3;opacity:1}.gs-editor.gs-editing .gs-cell-label{pointer-events:none;font-family:math,monospace,serif;position:absolute;top:0;right:0;margin-top:-15px;margin-right:-2px;padding:0 2px;font-size:10px;background-color:rgba(0,119,255,.75);color:#fff;z-index:1}.gs-formula-bar{width:100%;position:relative;display:table;align-items:center;justify-content:center;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);border-right:solid 1px rgba(128,128,128,.3);box-sizing:border-box}.gs-formula-bar .gs-selecting-address{display:table-cell;vertical-align:middle;width:60px;color:rgba(200,200,200);font-size:13px;text-align:center}.gs-formula-bar .gs-fx{display:table-cell;vertical-align:middle;width:30px;color:rgba(200,200,200);font-style:italic;font-family:cursive;text-align:center;border-left:solid 1px rgba(128,128,128,.5);font-size:15px}.gs-formula-bar .gs-editor-hl{z-index:0;overflow-y:auto;box-sizing:border-box;white-space:pre-wrap;word-break:break-all}.gs-formula-bar textarea{position:relative;z-index:1;width:100%;vertical-align:bottom;color:transparent;border:none;background-color:transparent;padding:0 2px;box-sizing:border-box;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;font-size:12px;font-family:monospace,Arial;height:24px;line-height:24px;min-height:24px;letter-spacing:1px;resize:vertical;caret-color:rgba(128,128,128);white-space:pre-wrap;word-break:break-all}.gs-token-type-INVALID_REF{color:red}.gs-token-type-VALUE.gs-token-entity-type-boolean,.gs-token-type-VALUE.gs-token-entity-type-number{color:#39f}.gs-token-type-VALUE.gs-token-entity-type-string{color:#090}.gs-editor-options{padding:0;box-shadow:0 2px 8px rgba(0,0,0,.25);border:1px solid rgba(128,128,128,.2);border-radius:4px}.gs-editor-option{cursor:pointer;list-style:none;padding:5px;font-size:12px}.gs-editor-option:hover{background-color:rgba(128,128,128,.1)}.gs-editor-option-selected{background-color:rgba(128,128,128,.2)}.gs-adjuster{padding:0}.gs-table{margin:0}.gs-tabular{overflow:auto;display:block;box-sizing:border-box;overscroll-behavior-x:contain}.gs-tabular-inner>table{table-layout:fixed;border-collapse:collapse;border-spacing:0}.gs-th{z-index:2;padding:0;position:sticky;font-size:13px;font-weight:400;box-sizing:border-box;vertical-align:top}.gs-th .gs-resizer{position:absolute;border-color:transparent;box-sizing:border-box;z-index:2}.gs-th .gs-resizer:hover{background-color:#07f}.gs-th .gs-resizer.gs-protected{display:none}.gs-th-inner{height:100%;box-sizing:border-box;vertical-align:middle;overflow:hidden;display:flex;align-items:center;justify-content:center}.gs-th-inner-wrap{height:100%;box-sizing:border-box;background-color:transparent}.gs-th-top{top:0;overflow:hidden}.gs-th-top .gs-resizer{top:0;right:0;width:3px;cursor:e-resize}.gs-th-top .gs-resizer.gs-dragging{border-right-style:dotted;height:1000000px!important;cursor:e-resize}.gs-th-left{left:0;overflow:hidden;min-width:30px;border-top:solid 1px #ddd}.gs-th-left .gs-resizer{left:0;bottom:0;height:3px;cursor:n-resize}.gs-th-left .gs-resizer.gs-dragging{border-bottom-style:dotted;width:1000000px!important;cursor:n-resize}.gs-th-top.gs-th-left{top:0;left:0;z-index:3;border:none!important}.gs-search-bar{width:100%;display:table;align-items:center;justify-content:center;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);border-right:solid 1px rgba(128,128,128,.3);box-sizing:border-box;background-color:rgba(200,50,0,.2)}.gs-search-bar.gs-search-found{background-color:rgba(0,200,100,.2)}.gs-search-bar .gs-search-bar-inner{vertical-align:middle;border-left:solid 1px rgba(128,128,128,.5)}.gs-search-bar .gs-search-bar-icon{border-left:solid 1px rgba(128,128,128,.3);display:table-cell;vertical-align:middle;width:30px}.gs-search-bar textarea{background-color:transparent;border:none;padding:0 2px;box-sizing:border-box;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;font-size:12px;font-family:monospace,Arial;height:24px;line-height:24px;min-height:24px;letter-spacing:1px;caret-color:rgba(128,128,128);white-space:pre-wrap;word-break:break-all;display:table-cell;vertical-align:middle;width:100%;resize:none}.gs-search-progress{display:table-cell;color:#999;font-size:13px;width:60px;vertical-align:middle;white-space:nowrap;text-align:center}.gs-search-close{display:table-cell;cursor:pointer;vertical-align:middle;width:24px}.gs-search-casesensitive{display:table-cell;cursor:pointer;vertical-align:middle;width:30px}.gs-search-casesensitive span{font-size:14px;padding:0 3px}.gs-search-casesensitive span.gs-search-casesensitive-on{color:#07f;background-color:rgba(200,200,255,.5);border-radius:3px}', oc = () => {
7411
+ }, nn = 1753244050, ic = '.gs-root1{display:inline-block;position:relative;border-spacing:0;width:fit-content;max-width:100%;overflow:auto;font-family:"SF Pro Text","SF Pro Icons","Helvetica Neue",Helvetica,Arial,Meiryo,sans-serif;visibility:hidden;opacity:0}.gs-root1.gs-initialized{visibility:visible;opacity:1;transition:opacity .2s ease-in-out}.gs-root1 .gs-main{flex:1;max-width:100%;overflow:hidden;position:relative;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.gs-root1 .gs-resizing{width:100%;height:100%;position:absolute;background-color:rgba(0,127,255,.08);top:0;left:0;z-index:2}.gs-root1 .gs-line{position:relative;top:0;left:0;border:dotted 1px #07f;box-sizing:border-box}.gs-root1 .gs-line span{font-size:10px;padding:3px;background-color:#07f;color:#fff;margin:0;position:absolute;top:0;left:0}.gs-root1 .gs-scroll-handle{width:100%;height:100%;cursor:cell}.gs-hidden{visibility:hidden;position:absolute;top:0;left:0;width:0;height:0;overflow:hidden;pointer-events:none;z-index:-1}.gs-fixed{position:fixed;top:0;left:0;z-index:1}.gs-root1[data-mode=light]{background-color:#e2e2e2;color:#000}.gs-root1[data-mode=light] .gs-main{background-color:#e2e2e2;border-right:solid 1px #ddd;border-bottom:solid 1px #ddd}.gs-root1[data-mode=light] .gs-tabular{background-color:#e2e2e2}.gs-root1[data-mode=light] .gs-formula-bar{background-color:#efefef}.gs-root1[data-mode=light] .gs-formula-bar-editor-inner{color:#555}.gs-root1[data-mode=light] .gs-cell{border-top:solid 1px #ddd;border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-adjuster{background-color:#ddd}.gs-root1[data-mode=light] .gs-tabular-inner{background-color:#f7f7f7}.gs-root1[data-mode=light] .gs-th{background-color:#efefef;color:#666}.gs-root1[data-mode=light] .gs-th.gs-selecting{background-color:#d2d2d2}.gs-root1[data-mode=light] .gs-th.gs-choosing{background-color:#bbb}.gs-root1[data-mode=light] .gs-th.gs-th-selecting{background-color:#555;color:#fff}.gs-root1[data-mode=light] .gs-th-top .gs-th-inner{border-top:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-top .gs-th-inner-wrap{border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-left{border-top:solid 1px #ddd}.gs-root1[data-mode=light] .gs-th-left .gs-th-inner{border-left:solid 1px #ddd}.gs-root1[data-mode=light] .gs-search-bar{color:rgba(0,0,0,.3)}.gs-editor[data-mode=light].gs-editing textarea{caret-color:#000000}.gs-editor[data-mode=light].gs-editing .gs-editor-hl{background-color:#f7f7f7;color:#000}.gs-editor[data-mode=light] .gs-editor-options{color:#000;background-color:#f7f7f7;border:solid 1px #ddd}.gs-root1[data-mode=dark]{background-color:#5a5a5a;color:#eee}.gs-root1[data-mode=dark] .gs-main{background-color:#3f3f3f;border-right:solid 1px #5a5a5a;border-bottom:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-tabular{background-color:#3f3f3f}.gs-root1[data-mode=dark] .gs-formula-bar{background-color:#4f4f4f}.gs-root1[data-mode=dark] .gs-formula-bar-editor-inner{color:#bbb}.gs-root1[data-mode=dark] .gs-cell{border-top:solid 1px #5a5a5a;border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-adjuster{background-color:#5a5a5a}.gs-root1[data-mode=dark] .gs-tabular-inner{background-color:#212121}.gs-root1[data-mode=dark] .gs-large-editor textarea{color:#eee;caret-color:#eeeeee}.gs-root1[data-mode=dark] .gs-th{background-color:#4f4f4f;color:#eee}.gs-root1[data-mode=dark] .gs-th.gs-selecting{background-color:#606060}.gs-root1[data-mode=dark] .gs-th.gs-choosing{background-color:#777}.gs-root1[data-mode=dark] .gs-th.gs-th-selecting{background-color:#aaa;color:#444}.gs-root1[data-mode=dark] .gs-th-top .gs-th-inner{border-top:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-top .gs-th-inner-wrap{border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-left{border-top:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-th-left .gs-th-inner{border-left:solid 1px #5a5a5a}.gs-root1[data-mode=dark] .gs-search-bar textarea{color:#eee;caret-color:#eeeeee}.gs-root1[data-mode=dark] .gs-search-bar{color:rgba(255,255,255,.3)}.gs-editor[data-mode=dark].gs-editing textarea{caret-color:#eeeeee}.gs-editor[data-mode=dark].gs-editing .gs-editor-hl{background-color:#212121;color:#eee}.gs-editor[data-mode=dark] .gs-editor-options{color:#eee;background-color:#5a5a5a;border:solid 1px #5a5a5a}.gs-cell{transition:border-color .2s ease;padding:0;margin:0;box-sizing:border-box;position:relative;font-size:13px;letter-spacing:1px;line-height:24px;cursor:cell;user-select:none;-webkit-user-select:none;-moz-user-select:none}.gs-cell .gs-cell-inner-wrap.gs-selecting{background-color:rgba(0,128,255,.2)}.gs-cell.gs-copying textarea:focus{outline:solid 1px #0077ff}.gs-cell.gs-selecting{z-index:1}.gs-cell.gs-selecting .gs-cell-inner{background-color:rgba(0,128,255,.2)}.gs-cell.gs-selecting .gs-cell-label{display:block}.gs-cell.gs-choosing{margin-top:-1px;margin-left:-1px;z-index:1}.gs-cell.gs-choosing.gs-editing{color:transparent}.gs-cell.gs-choosing .gs-cell-label{display:block}.gs-cell .gs-formula-error-triangle{position:absolute;top:0;right:0;border-top:3px solid rgba(200,0,0,.9);border-right:3px solid rgba(200,0,0,.9);border-bottom:3px solid transparent;border-left:3px solid transparent;z-index:1}.gs-cell .gs-cell-label{font-size:8px;font-weight:400;font-style:normal;font-family:math,monospace,serif;letter-spacing:1px;line-height:14px;position:absolute;top:0;right:0;background-color:rgba(0,128,255,.2);color:rgba(255,255,255,.6);padding:0 2px;display:none;opacity:.7}.gs-cell .gs-cell-inner-wrap{width:100%;height:100%;position:absolute;top:0;left:0}.gs-cell .gs-cell-inner{width:100%;height:100%;overflow:hidden;display:flex;box-sizing:border-box;border:none!important}.gs-cell .gs-cell-rendered{overflow:hidden;white-space:pre-wrap;cursor:cell;word-wrap:break-word;word-break:break-all;padding:0 2px;width:100%;height:100%}.gs-cell .gs-cell-rendered>*{position:relative}.gs-cell .gs-cell-rendered>.backface{z-index:0}.gs-cell .gs-autofill-drag{background-color:#07f;position:absolute;width:7px;height:7px;bottom:0;right:0;margin-right:-3.5px;margin-bottom:-3.5px;cursor:crosshair;z-index:1}.gs-th[data-x="1"] .gs-th-inner-wrap{border-left:none}.gs-th[data-y="1"] .gs-th-inner-wrap{border-top:none}.gs-cell[data-x="1"]{border-left:none}.gs-cell[data-y="1"]{border-top:none}.gs-contextmenu-modal{width:100%;height:100vh;z-index:3}.gs-contextmenu{z-index:3;position:fixed;background-color:#fff;padding:5px 0;border-radius:5px;box-shadow:rgba(60,64,67,.3) 0 1px 2px 0,rgba(60,64,67,.15) 0 1px 3px 1px}.gs-contextmenu ul{min-width:250px;color:#555;margin:0;padding:0}.gs-contextmenu li{padding:5px 10px;list-style-type:none;display:flex}.gs-contextmenu li.gs-enabled{cursor:pointer}.gs-contextmenu li.gs-enabled:hover{background-color:#eee}.gs-contextmenu li.gs-disabled{opacity:.5;cursor:not-allowed}.gs-contextmenu li.gs-menu-divider{background-color:#aaa;margin:10px 0;padding:0;height:1px}.gs-contextmenu li .gs-menu-name{flex:1;font-size:15px;letter-spacing:1px}.gs-contextmenu li .gs-menu-shortcut{font-size:10px;line-height:20px;color:#999}.gs-contextmenu li .gs-menu-shortcut:before{content:"( "}.gs-contextmenu li .gs-menu-shortcut:after{content:" )"}.gs-contextmenu li .gs-menu-shortcut .gs-menu-underline{text-decoration:underline}.gs-editor-hl{padding:0 2px!important;position:absolute;font-family:monospace,Arial;font-size:12px;line-height:24px;letter-spacing:1px}.gs-formula-bar-editor-inner{position:relative;display:table-cell}.gs-editor{opacity:0;z-index:-1}.gs-editor .gs-editor-inner{position:relative}.gs-editor .gs-editor-hl{box-sizing:content-box;border:solid 2px #07f;margin:-2px -1px}.gs-editor textarea{width:100%;padding:0 2px!important;position:absolute;font-size:12px;font-family:monospace,Arial;line-height:24px;letter-spacing:1px;top:0;left:0;border:none;outline:0;background-color:transparent;color:transparent;resize:none;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;overflow:hidden;cursor:default;white-space:pre;height:auto}.gs-editor.gs-editing{z-index:3;opacity:1}.gs-editor.gs-editing .gs-cell-label{pointer-events:none;font-family:math,monospace,serif;position:absolute;top:0;right:0;margin-top:-15px;margin-right:-2px;padding:0 2px;font-size:10px;background-color:rgba(0,119,255,.75);color:#fff;z-index:1}.gs-formula-bar{width:100%;position:relative;display:table;align-items:center;justify-content:center;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);border-right:solid 1px rgba(128,128,128,.3);box-sizing:border-box}.gs-formula-bar .gs-selecting-address{display:table-cell;vertical-align:middle;width:60px;color:rgba(200,200,200);font-size:13px;text-align:center}.gs-formula-bar .gs-fx{display:table-cell;vertical-align:middle;width:30px;color:rgba(200,200,200);font-style:italic;font-family:cursive;text-align:center;border-left:solid 1px rgba(128,128,128,.5);font-size:15px}.gs-formula-bar .gs-editor-hl{z-index:0;overflow-y:auto;box-sizing:border-box;white-space:pre-wrap;word-break:break-all}.gs-formula-bar textarea{position:relative;z-index:1;width:100%;vertical-align:bottom;color:transparent;border:none;background-color:transparent;padding:0 2px;box-sizing:border-box;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;font-size:12px;font-family:monospace,Arial;height:24px;line-height:24px;min-height:24px;letter-spacing:1px;resize:vertical;caret-color:rgba(128,128,128);white-space:pre-wrap;word-break:break-all}.gs-token-type-INVALID_REF{color:red}.gs-token-type-VALUE.gs-token-entity-type-boolean,.gs-token-type-VALUE.gs-token-entity-type-number{color:#39f}.gs-token-type-VALUE.gs-token-entity-type-string{color:#090}.gs-editor-options{padding:0;box-shadow:0 2px 8px rgba(0,0,0,.25);border:1px solid rgba(128,128,128,.2);border-radius:4px}.gs-editor-option{cursor:pointer;list-style:none;padding:5px;font-size:12px}.gs-editor-option:hover{background-color:rgba(128,128,128,.1)}.gs-editor-option-selected{background-color:rgba(128,128,128,.2)}.gs-adjuster{padding:0}.gs-table{margin:0}.gs-tabular{overflow:auto;display:block;box-sizing:border-box;overscroll-behavior-x:contain}.gs-tabular-inner>table{table-layout:fixed;border-collapse:collapse;border-spacing:0}.gs-th{z-index:2;padding:0;position:sticky;font-size:13px;font-weight:400;box-sizing:border-box;vertical-align:top}.gs-th .gs-resizer{position:absolute;border-color:transparent;box-sizing:border-box;z-index:2}.gs-th .gs-resizer:hover{background-color:#07f}.gs-th .gs-resizer.gs-protected{display:none}.gs-th-inner{height:100%;box-sizing:border-box;vertical-align:middle;overflow:hidden;display:flex;align-items:center;justify-content:center}.gs-th-inner-wrap{height:100%;box-sizing:border-box;background-color:transparent}.gs-th-top{top:0;overflow:hidden}.gs-th-top .gs-resizer{top:0;right:0;width:3px;cursor:e-resize}.gs-th-top .gs-resizer.gs-dragging{border-right-style:dotted;height:1000000px!important;cursor:e-resize}.gs-th-left{left:0;overflow:hidden;min-width:30px;border-top:solid 1px #ddd}.gs-th-left .gs-resizer{left:0;bottom:0;height:3px;cursor:n-resize}.gs-th-left .gs-resizer.gs-dragging{border-bottom-style:dotted;width:1000000px!important;cursor:n-resize}.gs-th-top.gs-th-left{top:0;left:0;z-index:3;border:none!important}.gs-search-bar{width:100%;display:table;align-items:center;justify-content:center;border-top:solid 1px rgba(128,128,128,.3);border-left:solid 1px rgba(128,128,128,.3);border-right:solid 1px rgba(128,128,128,.3);box-sizing:border-box;background-color:rgba(200,50,0,.2)}.gs-search-bar.gs-search-found{background-color:rgba(0,200,100,.2)}.gs-search-bar .gs-search-bar-inner{vertical-align:middle;border-left:solid 1px rgba(128,128,128,.5)}.gs-search-bar .gs-search-bar-icon{border-left:solid 1px rgba(128,128,128,.3);display:table-cell;vertical-align:middle;width:30px}.gs-search-bar textarea{background-color:transparent;border:none;padding:0 2px;box-sizing:border-box;outline:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;font-size:12px;font-family:monospace,Arial;height:24px;line-height:24px;min-height:24px;letter-spacing:1px;caret-color:rgba(128,128,128);white-space:pre-wrap;word-break:break-all;display:table-cell;vertical-align:middle;width:100%;resize:none}.gs-search-progress{display:table-cell;color:#999;font-size:13px;width:60px;vertical-align:middle;white-space:nowrap;text-align:center}.gs-search-close{display:table-cell;cursor:pointer;vertical-align:middle;width:24px}.gs-search-casesensitive{display:table-cell;cursor:pointer;vertical-align:middle;width:30px}.gs-search-casesensitive span{font-size:14px;padding:0 3px}.gs-search-casesensitive span.gs-search-casesensitive-on{color:#07f;background-color:rgba(200,200,255,.5);border-radius:3px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}', oc = () => {
7410
7412
  if (typeof window > "u" || document.querySelector(`style.gs-styling[data-modified-at='${nn}']`))
7411
7413
  return;
7412
7414
  const e = document.createElement("style");
7413
7415
  document.head.appendChild(e), e.setAttribute("class", "gs-styling"), e.setAttribute("data-modified-at", `${nn}`), e.innerText = ic;
7414
7416
  }, ac = () => {
7415
7417
  var S;
7416
- const { store: n, dispatch: e } = Re(ve), [t, s] = pe(""), {
7418
+ const { store: n, dispatch: e } = ve(Re), [t, s] = pe(""), {
7417
7419
  choosing: r,
7418
7420
  editorRef: i,
7419
7421
  largeEditorRef: o,
@@ -7451,7 +7453,7 @@ const Qa = Lt(({ x: n }) => {
7451
7453
  !p || !l || (e(he(d)), l.wire.lastFocused = m.currentTarget);
7452
7454
  },
7453
7455
  [p, d, l]
7454
- ), R = _(
7456
+ ), v = _(
7455
7457
  (m) => {
7456
7458
  if (m.currentTarget.value.startsWith("="))
7457
7459
  return !0;
@@ -7501,11 +7503,11 @@ const Qa = Lt(({ x: n }) => {
7501
7503
  [l, r, t, g, b]
7502
7504
  );
7503
7505
  return l ? /* @__PURE__ */ K("label", { className: "gs-formula-bar", children: [
7504
- /* @__PURE__ */ v(We, { style: { position: "absolute", left: 0, top: 0, zIndex: 2 }, vertical: -1 }),
7505
- /* @__PURE__ */ v("div", { className: "gs-selecting-address", children: d }),
7506
- /* @__PURE__ */ v("div", { className: "gs-fx", children: "Fx" }),
7506
+ /* @__PURE__ */ R(We, { style: { position: "absolute", left: 0, top: 0, zIndex: 2 }, vertical: -1 }),
7507
+ /* @__PURE__ */ R("div", { className: "gs-selecting-address", children: d }),
7508
+ /* @__PURE__ */ R("div", { className: "gs-fx", children: "Fx" }),
7507
7509
  /* @__PURE__ */ K("div", { className: "gs-formula-bar-editor-inner", children: [
7508
- /* @__PURE__ */ v(
7510
+ /* @__PURE__ */ R(
7509
7511
  "div",
7510
7512
  {
7511
7513
  className: "gs-editor-hl",
@@ -7517,7 +7519,7 @@ const Qa = Lt(({ x: n }) => {
7517
7519
  children: f != null && f.disableFormula ? c : Ln(c)
7518
7520
  }
7519
7521
  ),
7520
- /* @__PURE__ */ v(
7522
+ /* @__PURE__ */ R(
7521
7523
  "textarea",
7522
7524
  {
7523
7525
  name: "gs-formula-bar-editor",
@@ -7529,7 +7531,7 @@ const Qa = Lt(({ x: n }) => {
7529
7531
  value: c,
7530
7532
  onInput: y,
7531
7533
  onFocus: x,
7532
- onBlur: R,
7534
+ onBlur: v,
7533
7535
  onKeyDown: A,
7534
7536
  onKeyUp: b,
7535
7537
  onScroll: b
@@ -7537,11 +7539,11 @@ const Qa = Lt(({ x: n }) => {
7537
7539
  )
7538
7540
  ] })
7539
7541
  ] }) : /* @__PURE__ */ K("label", { className: "gs-formula-bar gs-hidden", children: [
7540
- /* @__PURE__ */ v("div", { className: "gs-selecting-address" }),
7541
- /* @__PURE__ */ v("div", { className: "gs-fx", children: "Fx" }),
7542
- /* @__PURE__ */ v("div", { className: "gs-formula-bar-editor-inner", children: /* @__PURE__ */ v("textarea", {}) })
7542
+ /* @__PURE__ */ R("div", { className: "gs-selecting-address" }),
7543
+ /* @__PURE__ */ R("div", { className: "gs-fx", children: "Fx" }),
7544
+ /* @__PURE__ */ R("div", { className: "gs-formula-bar-editor-inner", children: /* @__PURE__ */ R("textarea", {}) })
7543
7545
  ] });
7544
- }, sr = ({ style: n, size: e = 24, children: t }) => /* @__PURE__ */ v(
7546
+ }, sr = ({ style: n, size: e = 24, children: t }) => /* @__PURE__ */ R(
7545
7547
  "svg",
7546
7548
  {
7547
7549
  xmlns: "http://www.w3.org/2000/svg",
@@ -7558,15 +7560,15 @@ const Qa = Lt(({ x: n }) => {
7558
7560
  children: t
7559
7561
  }
7560
7562
  ), cc = ({ style: n, color: e = "none", size: t = 24 }) => /* @__PURE__ */ K(sr, { style: n, size: t, children: [
7561
- /* @__PURE__ */ v("path", { stroke: "none", d: "M0 0h24v24H0z", fill: e }),
7562
- /* @__PURE__ */ v("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", fill: e }),
7563
- /* @__PURE__ */ v("path", { d: "M21 21l-6 -6", fill: e })
7563
+ /* @__PURE__ */ R("path", { stroke: "none", d: "M0 0h24v24H0z", fill: e }),
7564
+ /* @__PURE__ */ R("path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", fill: e }),
7565
+ /* @__PURE__ */ R("path", { d: "M21 21l-6 -6", fill: e })
7564
7566
  ] }), lc = ({ style: n, color: e = "none", size: t = 24 }) => /* @__PURE__ */ K(sr, { style: n, size: t, children: [
7565
- /* @__PURE__ */ v("path", { stroke: "none", d: "M0 0h24v24H0z", fill: e }),
7566
- /* @__PURE__ */ v("path", { d: "M18 6l-12 12", fill: e }),
7567
- /* @__PURE__ */ v("path", { d: "M6 6l12 12", fill: e })
7567
+ /* @__PURE__ */ R("path", { stroke: "none", d: "M0 0h24v24H0z", fill: e }),
7568
+ /* @__PURE__ */ R("path", { d: "M18 6l-12 12", fill: e }),
7569
+ /* @__PURE__ */ R("path", { d: "M6 6l12 12", fill: e })
7568
7570
  ] }), uc = () => {
7569
- const { store: n, dispatch: e } = Re(ve), {
7571
+ const { store: n, dispatch: e } = ve(Re), {
7570
7572
  rootRef: t,
7571
7573
  editorRef: s,
7572
7574
  searchInputRef: r,
@@ -7580,30 +7582,30 @@ const Qa = Lt(({ x: n }) => {
7580
7582
  q(() => {
7581
7583
  if (!d || !u)
7582
7584
  return;
7583
- const R = oe(d);
7584
- typeof R > "u" || ps(u, i.current, R);
7585
+ const v = oe(d);
7586
+ typeof v > "u" || ps(u, i.current, v);
7585
7587
  }, [o, c, a, u, i]);
7586
- const f = _((R) => {
7587
- const A = R.currentTarget.previousSibling;
7588
+ const f = _((v) => {
7589
+ const A = v.currentTarget.previousSibling;
7588
7590
  (A == null ? void 0 : A.nodeName) === "INPUT" && A.focus();
7589
7591
  }, []), g = _(() => {
7590
7592
  e(hs(1));
7591
- }, []), p = _((R) => {
7592
- e(bt(R.currentTarget.value));
7593
+ }, []), p = _((v) => {
7594
+ e(bt(v.currentTarget.value));
7593
7595
  }, []), y = _(
7594
- (R) => {
7595
- if (R.key === "Escape") {
7596
+ (v) => {
7597
+ if (v.key === "Escape") {
7596
7598
  const A = s == null ? void 0 : s.current;
7597
7599
  A && A.focus(), e(bt(void 0));
7598
7600
  }
7599
- return R.key === "f" && (R.ctrlKey || R.metaKey) ? (R.preventDefault(), !1) : R.key === "Enter" ? (e(hs(R.shiftKey ? -1 : 1)), R.preventDefault(), !1) : !0;
7601
+ return v.key === "f" && (v.ctrlKey || v.metaKey) ? (v.preventDefault(), !1) : v.key === "Enter" ? (e(hs(v.shiftKey ? -1 : 1)), v.preventDefault(), !1) : !0;
7600
7602
  },
7601
7603
  [s]
7602
7604
  ), b = _(() => {
7603
7605
  e(di(!a));
7604
7606
  }, [a]), x = _(() => {
7605
- var R;
7606
- e(bt(void 0)), (R = s.current) == null || R.focus();
7607
+ var v;
7608
+ e(bt(void 0)), (v = s.current) == null || v.focus();
7607
7609
  }, [s]);
7608
7610
  return typeof o > "u" || t.current === null ? null : /* @__PURE__ */ K("label", { className: `gs-search-bar ${h.length > 0 ? "gs-search-found" : ""}`, children: [
7609
7611
  /* @__PURE__ */ K("div", { className: "gs-search-progress", onClick: f, children: [
@@ -7611,9 +7613,9 @@ const Qa = Lt(({ x: n }) => {
7611
7613
  " / ",
7612
7614
  h.length
7613
7615
  ] }),
7614
- /* @__PURE__ */ v("div", { className: "gs-search-bar-icon", onClick: g, children: /* @__PURE__ */ v(cc, { style: { verticalAlign: "middle", marginLeft: "5px" } }) }),
7615
- /* @__PURE__ */ v("textarea", { ref: r, value: o, onChange: p, onKeyDown: y }),
7616
- /* @__PURE__ */ v("div", { className: "gs-search-casesensitive", children: /* @__PURE__ */ v(
7616
+ /* @__PURE__ */ R("div", { className: "gs-search-bar-icon", onClick: g, children: /* @__PURE__ */ R(cc, { style: { verticalAlign: "middle", marginLeft: "5px" } }) }),
7617
+ /* @__PURE__ */ R("textarea", { ref: r, value: o, onChange: p, onKeyDown: y }),
7618
+ /* @__PURE__ */ R("div", { className: "gs-search-casesensitive", children: /* @__PURE__ */ R(
7617
7619
  "span",
7618
7620
  {
7619
7621
  className: `${a ? "gs-search-casesensitive-on" : ""}`,
@@ -7621,7 +7623,7 @@ const Qa = Lt(({ x: n }) => {
7621
7623
  children: "Aa"
7622
7624
  }
7623
7625
  ) }),
7624
- /* @__PURE__ */ v("a", { className: "gs-search-close", onClick: x, children: /* @__PURE__ */ v(lc, { style: { verticalAlign: "middle" } }) })
7626
+ /* @__PURE__ */ R("a", { className: "gs-search-close", onClick: x, children: /* @__PURE__ */ R(lc, { style: { verticalAlign: "middle" } }) })
7625
7627
  ] });
7626
7628
  }, Nc = () => ur(), hc = () => ue(null);
7627
7629
  function Ec({
@@ -7633,16 +7635,16 @@ function Ec({
7633
7635
  style: i,
7634
7636
  hub: o
7635
7637
  }) {
7636
- const { sheetResize: a, showFormulaBar: c = !0, mode: h = "light" } = s, l = ue(null), u = ue(null), d = ue(null), f = ue(null), g = ue(null), p = ue(null), y = hc(), b = t ?? y, x = Za({}), R = o ?? x, { wire: A } = R, S = ue(null);
7638
+ const { sheetResize: a, showFormulaBar: c = !0, mode: h = "light" } = s, l = ue(null), u = ue(null), d = ue(null), f = ue(null), g = ue(null), p = ue(null), y = hc(), b = t ?? y, x = Za({}), v = o ?? x, { wire: A } = v, S = ue(null);
7637
7639
  S.current === null && (S.current = ++A.sheetHead);
7638
7640
  const m = S.current, $ = ue(null), [T] = pe(() => {
7639
7641
  var V;
7640
7642
  e || (e = `Sheet${m}`, console.debug("GridSheet: sheetName is not provided, using default name:", e));
7641
- const { minNumRows: E, maxNumRows: w, minNumCols: M, maxNumCols: k, contextMenuItems: H } = s, L = new ne({
7643
+ const { minNumRows: E, maxNumRows: w, minNumCols: M, maxNumCols: O, contextMenuItems: H } = s, L = new ne({
7642
7644
  minNumRows: E,
7643
7645
  maxNumRows: w,
7644
7646
  minNumCols: M,
7645
- maxNumCols: k,
7647
+ maxNumCols: O,
7646
7648
  sheetName: e,
7647
7649
  hub: A
7648
7650
  });
@@ -7683,7 +7685,7 @@ function Ec({
7683
7685
  mode: "light",
7684
7686
  ...L.getTotalSize()
7685
7687
  };
7686
- }), [O, N] = hr(
7688
+ }), [k, N] = hr(
7687
7689
  li,
7688
7690
  T,
7689
7691
  () => T
@@ -7702,35 +7704,44 @@ function Ec({
7702
7704
  s.sheetHeight && B(s.sheetHeight);
7703
7705
  }, [s.sheetHeight]), q(() => {
7704
7706
  s.sheetWidth && F(s.sheetWidth);
7705
- }, [s.sheetWidth]), /* @__PURE__ */ v(ve.Provider, { value: { store: O, dispatch: N }, children: /* @__PURE__ */ K("div", { className: "gs-root1", ref: l, "data-sheet-name": e, "data-mode": h, children: [
7706
- /* @__PURE__ */ v(We, { style: { position: "fixed", top: 0, left: 0 } }),
7707
- /* @__PURE__ */ v(We, { style: { position: "absolute", zIndex: 4, right: 0, top: 0, width: 5 }, horizontal: 1 }),
7708
- /* @__PURE__ */ v(We, { style: { position: "absolute", zIndex: 4, left: 0, bottom: 0, height: 5 }, vertical: 1 }),
7709
- typeof O.searchQuery > "u" ? c && /* @__PURE__ */ v(ac, {}) : /* @__PURE__ */ v(uc, {}),
7710
- /* @__PURE__ */ K(
7711
- "div",
7712
- {
7713
- className: `gs-main ${r || ""}`,
7714
- ref: u,
7715
- style: {
7716
- //width: '100%',
7717
- maxWidth: (O.totalWidth || 0) + 2,
7718
- maxHeight: (O.totalHeight || 0) + 2,
7719
- overflow: "auto",
7720
- resize: a,
7721
- ...i
7722
- },
7723
- children: [
7724
- /* @__PURE__ */ v(io, { mode: h }),
7725
- /* @__PURE__ */ v(ec, {}),
7726
- /* @__PURE__ */ v(oo, { ...s, sheetHeight: I, sheetWidth: z, sheetName: e, connector: b }),
7727
- /* @__PURE__ */ v(lo, {}),
7728
- /* @__PURE__ */ v(ao, {}),
7729
- /* @__PURE__ */ v(co, {})
7730
- ]
7731
- }
7732
- )
7733
- ] }) });
7707
+ }, [s.sheetWidth]), /* @__PURE__ */ R(Re.Provider, { value: { store: k, dispatch: N }, children: /* @__PURE__ */ K(
7708
+ "div",
7709
+ {
7710
+ className: `gs-root1 ${A.ready ? "gs-initialized" : ""}`,
7711
+ ref: l,
7712
+ "data-sheet-name": e,
7713
+ "data-mode": h,
7714
+ children: [
7715
+ /* @__PURE__ */ R(We, { style: { position: "fixed", top: 0, left: 0 } }),
7716
+ /* @__PURE__ */ R(We, { style: { position: "absolute", zIndex: 4, right: 0, top: 0, width: 5 }, horizontal: 1 }),
7717
+ /* @__PURE__ */ R(We, { style: { position: "absolute", zIndex: 4, left: 0, bottom: 0, height: 5 }, vertical: 1 }),
7718
+ typeof k.searchQuery > "u" ? c && /* @__PURE__ */ R(ac, {}) : /* @__PURE__ */ R(uc, {}),
7719
+ /* @__PURE__ */ K(
7720
+ "div",
7721
+ {
7722
+ className: `gs-main ${r || ""}`,
7723
+ ref: u,
7724
+ style: {
7725
+ //width: '100%',
7726
+ maxWidth: (k.totalWidth || 0) + 2,
7727
+ maxHeight: (k.totalHeight || 0) + 2,
7728
+ overflow: "auto",
7729
+ resize: a,
7730
+ ...i
7731
+ },
7732
+ children: [
7733
+ /* @__PURE__ */ R(io, { mode: h }),
7734
+ /* @__PURE__ */ R(ec, {}),
7735
+ /* @__PURE__ */ R(oo, { ...s, sheetHeight: I, sheetWidth: z, sheetName: e, connector: b }),
7736
+ /* @__PURE__ */ R(lo, {}),
7737
+ /* @__PURE__ */ R(ao, {}),
7738
+ /* @__PURE__ */ R(co, {})
7739
+ ]
7740
+ }
7741
+ )
7742
+ ]
7743
+ }
7744
+ ) });
7734
7745
  }
7735
7746
  const dc = (n) => {
7736
7747
  var s, r, i;
@@ -7749,8 +7760,8 @@ const dc = (n) => {
7749
7760
  let t = ((s = n[0]) == null ? void 0 : s.width) ?? ss;
7750
7761
  for (let o = 0; o < e.numCols; o++) {
7751
7762
  const a = xe(o), c = ((r = n == null ? void 0 : n[a]) == null ? void 0 : r.width) || ((i = n == null ? void 0 : n.default) == null ? void 0 : i.width) || be;
7752
- if (t + c > Os)
7753
- return Os;
7763
+ if (t + c > ks)
7764
+ return ks;
7754
7765
  t += c;
7755
7766
  }
7756
7767
  return t + 3;
@@ -7763,7 +7774,7 @@ const dc = (n) => {
7763
7774
  }
7764
7775
  }, Tc = {
7765
7776
  bool({ value: n, sync: e, table: t, point: s }) {
7766
- return /* @__PURE__ */ v(
7777
+ return /* @__PURE__ */ R(
7767
7778
  "input",
7768
7779
  {
7769
7780
  type: "checkbox",
@@ -7789,7 +7800,7 @@ export {
7789
7800
  Yc as Fragment,
7790
7801
  Ec as GridSheet,
7791
7802
  Bo as Parser,
7792
- vc as PluginBase,
7803
+ Rc as PluginBase,
7793
7804
  Ka as Policy,
7794
7805
  Bc as PureComponent,
7795
7806
  Ho as Renderer,
@@ -7804,7 +7815,7 @@ export {
7804
7815
  bc as aa2oa,
7805
7816
  an as areaToRange,
7806
7817
  Te as areaToZone,
7807
- vr as buildInitialCells,
7818
+ Rr as buildInitialCells,
7808
7819
  yc as buildInitialCellsFromOrigin,
7809
7820
  is as c2x,
7810
7821
  Ft as clip,
@@ -7822,7 +7833,7 @@ export {
7822
7833
  Ae as ensureString,
7823
7834
  Vc as findDOMNode,
7824
7835
  qc as forwardRef,
7825
- kc as h,
7836
+ Oc as h,
7826
7837
  Gc as hydrate,
7827
7838
  Qc as isValidElement,
7828
7839
  Jc as lazy,
@@ -7844,7 +7855,7 @@ export {
7844
7855
  ol as useEffect,
7845
7856
  Za as useHub,
7846
7857
  al as useImperativeHandle,
7847
- Rc as useInitialPluginContext,
7858
+ vc as useInitialPluginContext,
7848
7859
  cl as useLayoutEffect,
7849
7860
  ll as useMemo,
7850
7861
  _n as usePluginContext,