@redi.run/redi-components 0.0.34 → 0.0.36
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.d.ts +6 -3
- package/dist/redi-components.css +1 -1
- package/dist/redi-components.js +519 -505
- package/dist/redi-components.umd.cjs +44 -44
- package/package.json +1 -1
package/dist/redi-components.js
CHANGED
|
@@ -113,6 +113,44 @@ const CloseIcon = ({ color: e, size: t = 24 }) => /* @__PURE__ */ jsx("svg", {
|
|
|
113
113
|
strokeWidth: "2",
|
|
114
114
|
strokeLinecap: "round"
|
|
115
115
|
})]
|
|
116
|
+
}), PinIcon = ({ size: e = 20, color: t = "currentColor", className: n = "" }) => /* @__PURE__ */ jsxs("svg", {
|
|
117
|
+
width: e,
|
|
118
|
+
height: e,
|
|
119
|
+
viewBox: "0 0 24 24",
|
|
120
|
+
fill: "none",
|
|
121
|
+
stroke: t,
|
|
122
|
+
strokeWidth: "2",
|
|
123
|
+
strokeLinecap: "round",
|
|
124
|
+
strokeLinejoin: "round",
|
|
125
|
+
className: n,
|
|
126
|
+
children: [/* @__PURE__ */ jsx("line", {
|
|
127
|
+
x1: "12",
|
|
128
|
+
y1: "17",
|
|
129
|
+
x2: "12",
|
|
130
|
+
y2: "22"
|
|
131
|
+
}), /* @__PURE__ */ jsx("path", { d: "M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z" })]
|
|
132
|
+
}), PinOffIcon = ({ size: e = 20, color: t = "currentColor", className: n = "" }) => /* @__PURE__ */ jsxs("svg", {
|
|
133
|
+
width: e,
|
|
134
|
+
height: e,
|
|
135
|
+
viewBox: "0 0 24 24",
|
|
136
|
+
fill: "none",
|
|
137
|
+
stroke: t,
|
|
138
|
+
strokeWidth: "2",
|
|
139
|
+
strokeLinecap: "round",
|
|
140
|
+
strokeLinejoin: "round",
|
|
141
|
+
className: n,
|
|
142
|
+
children: [
|
|
143
|
+
/* @__PURE__ */ jsx("line", {
|
|
144
|
+
x1: "2",
|
|
145
|
+
y1: "2",
|
|
146
|
+
x2: "22",
|
|
147
|
+
y2: "22"
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ jsx("path", { d: "M12 17v5" }),
|
|
150
|
+
/* @__PURE__ */ jsx("path", { d: "M9 9V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v.76" }),
|
|
151
|
+
/* @__PURE__ */ jsx("path", { d: "M15 6v4.76a2 2 0 0 1 1.11 1.79l1.78.9A2 2 0 0 1 19 15.24v1.76H10" }),
|
|
152
|
+
/* @__PURE__ */ jsx("path", { d: "M5 17h.35" })
|
|
153
|
+
]
|
|
116
154
|
});
|
|
117
155
|
/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
|
|
118
156
|
var XLSX = {};
|
|
@@ -1415,8 +1453,8 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1415
1453
|
return s ||= {};
|
|
1416
1454
|
}
|
|
1417
1455
|
function l(e, t) {
|
|
1418
|
-
if (e[0] == 80 && e[1] == 75) return
|
|
1419
|
-
if ((e[0] | 32) == 109 && (e[1] | 32) == 105) return
|
|
1456
|
+
if (e[0] == 80 && e[1] == 75) return xp(e, t);
|
|
1457
|
+
if ((e[0] | 32) == 109 && (e[1] | 32) == 105) return Ap(e, t);
|
|
1420
1458
|
if (e.length < 512) throw Error("CFB file size " + e.length + " < 512");
|
|
1421
1459
|
var n = 3, r = 512, i = 0, a = 0, o = 0, s = 0, c = 0, l = [], m = e.slice(0, 512);
|
|
1422
1460
|
prep_blob(m, 0);
|
|
@@ -1428,7 +1466,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1428
1466
|
case 4:
|
|
1429
1467
|
r = 4096;
|
|
1430
1468
|
break;
|
|
1431
|
-
case 0: if (g[1] == 0) return
|
|
1469
|
+
case 0: if (g[1] == 0) return xp(e, t);
|
|
1432
1470
|
default: throw Error("Major Version: Expected 3 or 4 saw " + n);
|
|
1433
1471
|
}
|
|
1434
1472
|
r !== 512 && (m = e.slice(0, r), prep_blob(m, 28));
|
|
@@ -1642,9 +1680,9 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1642
1680
|
}
|
|
1643
1681
|
function T(e, t) {
|
|
1644
1682
|
var n = t || {};
|
|
1645
|
-
if (n.fileType == "mad") return
|
|
1683
|
+
if (n.fileType == "mad") return jp(e, n);
|
|
1646
1684
|
switch (w(e), n.fileType) {
|
|
1647
|
-
case "zip": return
|
|
1685
|
+
case "zip": return Cp(e, n);
|
|
1648
1686
|
}
|
|
1649
1687
|
var r = (function(e) {
|
|
1650
1688
|
for (var t = 0, n = 0, r = 0; r < e.FileIndex.length; ++r) {
|
|
@@ -1679,13 +1717,13 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1679
1717
|
for (o += e; a < o - 1; ++a) i.write_shift(-4, a + 1);
|
|
1680
1718
|
e && (++a, i.write_shift(-4, O));
|
|
1681
1719
|
};
|
|
1682
|
-
for (o = a = 0, o += r[1]; a < o; ++a) i.write_shift(-4,
|
|
1683
|
-
for (o += r[2]; a < o; ++a) i.write_shift(-4,
|
|
1720
|
+
for (o = a = 0, o += r[1]; a < o; ++a) i.write_shift(-4, M.DIFSECT);
|
|
1721
|
+
for (o += r[2]; a < o; ++a) i.write_shift(-4, M.FATSECT);
|
|
1684
1722
|
s(r[3]), s(r[4]);
|
|
1685
1723
|
for (var c = 0, l = 0, u = e.FileIndex[0]; c < e.FileIndex.length; ++c) u = e.FileIndex[c], u.content && (l = u.content.length, !(l < 4096) && (u.start = o, s(l + 511 >> 9)));
|
|
1686
|
-
for (s(r[6] + 7 >> 3); i.l & 511;) i.write_shift(-4,
|
|
1724
|
+
for (s(r[6] + 7 >> 3); i.l & 511;) i.write_shift(-4, M.ENDOFCHAIN);
|
|
1687
1725
|
for (o = a = 0, c = 0; c < e.FileIndex.length; ++c) u = e.FileIndex[c], u.content && (l = u.content.length, !(!l || l >= 4096) && (u.start = o, s(l + 63 >> 6)));
|
|
1688
|
-
for (; i.l & 511;) i.write_shift(-4,
|
|
1726
|
+
for (; i.l & 511;) i.write_shift(-4, M.ENDOFCHAIN);
|
|
1689
1727
|
for (a = 0; a < r[4] << 2; ++a) {
|
|
1690
1728
|
var d = e.FullPaths[a];
|
|
1691
1729
|
if (!d || d.length === 0) {
|
|
@@ -1737,7 +1775,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1737
1775
|
177,
|
|
1738
1776
|
26,
|
|
1739
1777
|
225
|
|
1740
|
-
], j = "00000000000000000000000000000000",
|
|
1778
|
+
], j = "00000000000000000000000000000000", M = {
|
|
1741
1779
|
MAXREGSECT: -6,
|
|
1742
1780
|
DIFSECT: -4,
|
|
1743
1781
|
FATSECT: -3,
|
|
@@ -1757,45 +1795,45 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1757
1795
|
"root"
|
|
1758
1796
|
]
|
|
1759
1797
|
};
|
|
1760
|
-
function
|
|
1798
|
+
function N(e, t, n) {
|
|
1761
1799
|
c();
|
|
1762
1800
|
var r = T(e, n);
|
|
1763
1801
|
s.writeFileSync(t, r);
|
|
1764
1802
|
}
|
|
1765
|
-
function
|
|
1803
|
+
function L(e) {
|
|
1766
1804
|
for (var t = Array(e.length), n = 0; n < e.length; ++n) t[n] = String.fromCharCode(e[n]);
|
|
1767
1805
|
return t.join("");
|
|
1768
1806
|
}
|
|
1769
|
-
function
|
|
1807
|
+
function R(e, t) {
|
|
1770
1808
|
var n = T(e, t);
|
|
1771
1809
|
switch (t && t.type || "buffer") {
|
|
1772
1810
|
case "file": return c(), s.writeFileSync(t.filename, n), n;
|
|
1773
|
-
case "binary": return typeof n == "string" ? n :
|
|
1774
|
-
case "base64": return Base64_encode(typeof n == "string" ? n :
|
|
1811
|
+
case "binary": return typeof n == "string" ? n : L(n);
|
|
1812
|
+
case "base64": return Base64_encode(typeof n == "string" ? n : L(n));
|
|
1775
1813
|
case "buffer": if (has_buf) return Buffer.isBuffer(n) ? n : Buffer_from(n);
|
|
1776
1814
|
case "array": return typeof n == "string" ? s2a(n) : n;
|
|
1777
1815
|
}
|
|
1778
1816
|
return n;
|
|
1779
1817
|
}
|
|
1780
|
-
var
|
|
1781
|
-
function
|
|
1818
|
+
var z;
|
|
1819
|
+
function Jf(e) {
|
|
1782
1820
|
try {
|
|
1783
1821
|
var t = e.InflateRaw, n = new t();
|
|
1784
|
-
if (n._processChunk(new Uint8Array([3, 0]), n._finishFlushFlag), n.bytesRead)
|
|
1822
|
+
if (n._processChunk(new Uint8Array([3, 0]), n._finishFlushFlag), n.bytesRead) z = e;
|
|
1785
1823
|
else throw Error("zlib does not expose bytesRead");
|
|
1786
1824
|
} catch (e) {
|
|
1787
1825
|
console.error("cannot use native zlib: " + (e.message || e));
|
|
1788
1826
|
}
|
|
1789
1827
|
}
|
|
1790
|
-
function
|
|
1791
|
-
if (!
|
|
1792
|
-
var n =
|
|
1828
|
+
function Zf(e, t) {
|
|
1829
|
+
if (!z) return yp(e, t);
|
|
1830
|
+
var n = z.InflateRaw, r = new n(), i = r._processChunk(e.slice(e.l), r._finishFlushFlag);
|
|
1793
1831
|
return e.l += r.bytesRead, i;
|
|
1794
1832
|
}
|
|
1795
|
-
function
|
|
1796
|
-
return
|
|
1833
|
+
function B(e) {
|
|
1834
|
+
return z ? z.deflateRawSync(e) : dp(e);
|
|
1797
1835
|
}
|
|
1798
|
-
var
|
|
1836
|
+
var Qf = [
|
|
1799
1837
|
16,
|
|
1800
1838
|
17,
|
|
1801
1839
|
18,
|
|
@@ -1815,7 +1853,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1815
1853
|
14,
|
|
1816
1854
|
1,
|
|
1817
1855
|
15
|
|
1818
|
-
],
|
|
1856
|
+
], V = [
|
|
1819
1857
|
3,
|
|
1820
1858
|
4,
|
|
1821
1859
|
5,
|
|
@@ -1845,7 +1883,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1845
1883
|
195,
|
|
1846
1884
|
227,
|
|
1847
1885
|
258
|
|
1848
|
-
],
|
|
1886
|
+
], $f = [
|
|
1849
1887
|
1,
|
|
1850
1888
|
2,
|
|
1851
1889
|
3,
|
|
@@ -1877,56 +1915,56 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1877
1915
|
16385,
|
|
1878
1916
|
24577
|
|
1879
1917
|
];
|
|
1880
|
-
function
|
|
1918
|
+
function ep(e) {
|
|
1881
1919
|
var t = (e << 1 | e << 11) & 139536 | (e << 5 | e << 15) & 558144;
|
|
1882
1920
|
return (t >> 16 | t >> 8 | t) & 255;
|
|
1883
1921
|
}
|
|
1884
|
-
for (var
|
|
1885
|
-
function
|
|
1886
|
-
var n =
|
|
1887
|
-
return t <= 8 ? n >>> 8 - t : (n = n << 8 |
|
|
1922
|
+
for (var H = typeof Uint8Array < "u", U = H ? new Uint8Array(256) : [], W = 0; W < 256; ++W) U[W] = ep(W);
|
|
1923
|
+
function G(e, t) {
|
|
1924
|
+
var n = U[e & 255];
|
|
1925
|
+
return t <= 8 ? n >>> 8 - t : (n = n << 8 | U[e >> 8 & 255], t <= 16 ? n >>> 16 - t : (n = n << 8 | U[e >> 16 & 255], n >>> 24 - t));
|
|
1888
1926
|
}
|
|
1889
|
-
function
|
|
1927
|
+
function tp(e, t) {
|
|
1890
1928
|
var n = t & 7, r = t >>> 3;
|
|
1891
1929
|
return (e[r] | (n <= 6 ? 0 : e[r + 1] << 8)) >>> n & 3;
|
|
1892
1930
|
}
|
|
1893
|
-
function
|
|
1931
|
+
function K(e, t) {
|
|
1894
1932
|
var n = t & 7, r = t >>> 3;
|
|
1895
1933
|
return (e[r] | (n <= 5 ? 0 : e[r + 1] << 8)) >>> n & 7;
|
|
1896
1934
|
}
|
|
1897
|
-
function
|
|
1935
|
+
function q(e, t) {
|
|
1898
1936
|
var n = t & 7, r = t >>> 3;
|
|
1899
1937
|
return (e[r] | (n <= 4 ? 0 : e[r + 1] << 8)) >>> n & 15;
|
|
1900
1938
|
}
|
|
1901
|
-
function
|
|
1939
|
+
function np(e, t) {
|
|
1902
1940
|
var n = t & 7, r = t >>> 3;
|
|
1903
1941
|
return (e[r] | (n <= 3 ? 0 : e[r + 1] << 8)) >>> n & 31;
|
|
1904
1942
|
}
|
|
1905
|
-
function
|
|
1943
|
+
function rp(e, t) {
|
|
1906
1944
|
var n = t & 7, r = t >>> 3;
|
|
1907
1945
|
return (e[r] | (n <= 1 ? 0 : e[r + 1] << 8)) >>> n & 127;
|
|
1908
1946
|
}
|
|
1909
|
-
function
|
|
1947
|
+
function ip(e, t, n) {
|
|
1910
1948
|
var r = t & 7, i = t >>> 3, a = (1 << n) - 1, o = e[i] >>> r;
|
|
1911
1949
|
return n < 8 - r || (o |= e[i + 1] << 8 - r, n < 16 - r) || (o |= e[i + 2] << 16 - r, n < 24 - r) || (o |= e[i + 3] << 24 - r), o & a;
|
|
1912
1950
|
}
|
|
1913
|
-
function
|
|
1951
|
+
function ap(e, t, n) {
|
|
1914
1952
|
var r = t & 7, i = t >>> 3;
|
|
1915
1953
|
return r <= 5 ? e[i] |= (n & 7) << r : (e[i] |= n << r & 255, e[i + 1] = (n & 7) >> 8 - r), t + 3;
|
|
1916
1954
|
}
|
|
1917
|
-
function
|
|
1955
|
+
function op(e, t, n) {
|
|
1918
1956
|
var r = t & 7, i = t >>> 3;
|
|
1919
1957
|
return n = (n & 1) << r, e[i] |= n, t + 1;
|
|
1920
1958
|
}
|
|
1921
|
-
function
|
|
1959
|
+
function J(e, t, n) {
|
|
1922
1960
|
var r = t & 7, i = t >>> 3;
|
|
1923
1961
|
return n <<= r, e[i] |= n & 255, n >>>= 8, e[i + 1] = n, t + 8;
|
|
1924
1962
|
}
|
|
1925
|
-
function
|
|
1963
|
+
function sp(e, t, n) {
|
|
1926
1964
|
var r = t & 7, i = t >>> 3;
|
|
1927
1965
|
return n <<= r, e[i] |= n & 255, n >>>= 8, e[i + 1] = n & 255, e[i + 2] = n >>> 8, t + 16;
|
|
1928
1966
|
}
|
|
1929
|
-
function
|
|
1967
|
+
function cp(e, t) {
|
|
1930
1968
|
var n = e.length, r = 2 * n > t ? 2 * n : t + 5, i = 0;
|
|
1931
1969
|
if (n >= t) return e;
|
|
1932
1970
|
if (has_buf) {
|
|
@@ -1934,7 +1972,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1934
1972
|
if (e.copy) e.copy(a);
|
|
1935
1973
|
else for (; i < e.length; ++i) a[i] = e[i];
|
|
1936
1974
|
return a;
|
|
1937
|
-
} else if (
|
|
1975
|
+
} else if (H) {
|
|
1938
1976
|
var o = new Uint8Array(r);
|
|
1939
1977
|
if (o.set) o.set(e);
|
|
1940
1978
|
else for (; i < n; ++i) o[i] = e[i];
|
|
@@ -1942,43 +1980,43 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1942
1980
|
}
|
|
1943
1981
|
return e.length = r, e;
|
|
1944
1982
|
}
|
|
1945
|
-
function
|
|
1983
|
+
function Y(e) {
|
|
1946
1984
|
for (var t = Array(e), n = 0; n < e; ++n) t[n] = 0;
|
|
1947
1985
|
return t;
|
|
1948
1986
|
}
|
|
1949
|
-
function
|
|
1950
|
-
var r = 1, i = 0, a = 0, o = 0, s = 0, c = e.length, l =
|
|
1987
|
+
function X(e, t, n) {
|
|
1988
|
+
var r = 1, i = 0, a = 0, o = 0, s = 0, c = e.length, l = H ? new Uint16Array(32) : Y(32);
|
|
1951
1989
|
for (a = 0; a < 32; ++a) l[a] = 0;
|
|
1952
1990
|
for (a = c; a < n; ++a) e[a] = 0;
|
|
1953
1991
|
c = e.length;
|
|
1954
|
-
var u =
|
|
1992
|
+
var u = H ? new Uint16Array(c) : Y(c);
|
|
1955
1993
|
for (a = 0; a < c; ++a) l[i = e[a]]++, r < i && (r = i), u[a] = 0;
|
|
1956
1994
|
for (l[0] = 0, a = 1; a <= r; ++a) l[a + 16] = s = s + l[a - 1] << 1;
|
|
1957
1995
|
for (a = 0; a < c; ++a) s = e[a], s != 0 && (u[a] = l[s + 16]++);
|
|
1958
1996
|
var d = 0;
|
|
1959
|
-
for (a = 0; a < c; ++a) if (d = e[a], d != 0) for (s =
|
|
1997
|
+
for (a = 0; a < c; ++a) if (d = e[a], d != 0) for (s = G(u[a], r) >> r - d, o = (1 << r + 4 - d) - 1; o >= 0; --o) t[s | o << d] = d & 15 | a << 4;
|
|
1960
1998
|
return r;
|
|
1961
1999
|
}
|
|
1962
|
-
var
|
|
1963
|
-
if (!
|
|
1964
|
-
for (var Q = 0; Q < 512; ++Q)
|
|
1965
|
-
for (Q = 0; Q < 32; ++Q)
|
|
2000
|
+
var Z = H ? new Uint16Array(512) : Y(512), lp = H ? new Uint16Array(32) : Y(32);
|
|
2001
|
+
if (!H) {
|
|
2002
|
+
for (var Q = 0; Q < 512; ++Q) Z[Q] = 0;
|
|
2003
|
+
for (Q = 0; Q < 32; ++Q) lp[Q] = 0;
|
|
1966
2004
|
}
|
|
1967
2005
|
(function() {
|
|
1968
2006
|
for (var e = [], t = 0; t < 32; t++) e.push(5);
|
|
1969
|
-
|
|
2007
|
+
X(e, lp, 32);
|
|
1970
2008
|
var n = [];
|
|
1971
2009
|
for (t = 0; t <= 143; t++) n.push(8);
|
|
1972
2010
|
for (; t <= 255; t++) n.push(9);
|
|
1973
2011
|
for (; t <= 279; t++) n.push(7);
|
|
1974
2012
|
for (; t <= 287; t++) n.push(8);
|
|
1975
|
-
|
|
2013
|
+
X(n, Z, 288);
|
|
1976
2014
|
})();
|
|
1977
|
-
var
|
|
1978
|
-
for (var e =
|
|
2015
|
+
var up = /* @__PURE__ */ (function() {
|
|
2016
|
+
for (var e = H ? new Uint8Array(32768) : [], t = 0, n = 0; t < $f.length - 1; ++t) for (; n < $f[t + 1]; ++n) e[n] = t;
|
|
1979
2017
|
for (; n < 32768; ++n) e[n] = 29;
|
|
1980
|
-
var r =
|
|
1981
|
-
for (t = 0, n = 0; t <
|
|
2018
|
+
var r = H ? new Uint8Array(259) : [];
|
|
2019
|
+
for (t = 0, n = 0; t < V.length - 1; ++t) for (; n < V[t + 1]; ++n) r[n] = t;
|
|
1982
2020
|
function i(e, t) {
|
|
1983
2021
|
for (var n = 0; n < e.length;) {
|
|
1984
2022
|
var r = Math.min(65535, e.length - n), i = n + r == e.length;
|
|
@@ -1987,30 +2025,30 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
1987
2025
|
return t.l;
|
|
1988
2026
|
}
|
|
1989
2027
|
function a(t, n) {
|
|
1990
|
-
for (var i = 0, a = 0, o =
|
|
2028
|
+
for (var i = 0, a = 0, o = H ? new Uint16Array(32768) : []; a < t.length;) {
|
|
1991
2029
|
var s = Math.min(65535, t.length - a);
|
|
1992
2030
|
if (s < 10) {
|
|
1993
|
-
for (i =
|
|
2031
|
+
for (i = ap(n, i, +(a + s == t.length)), i & 7 && (i += 8 - (i & 7)), n.l = i / 8 | 0, n.write_shift(2, s), n.write_shift(2, ~s & 65535); s-- > 0;) n[n.l++] = t[a++];
|
|
1994
2032
|
i = n.l * 8;
|
|
1995
2033
|
continue;
|
|
1996
2034
|
}
|
|
1997
|
-
i =
|
|
2035
|
+
i = ap(n, i, +(a + s == t.length) + 2);
|
|
1998
2036
|
for (var c = 0; s-- > 0;) {
|
|
1999
2037
|
var l = t[a];
|
|
2000
2038
|
c = (c << 5 ^ l) & 32767;
|
|
2001
2039
|
var u = -1, d = 0;
|
|
2002
2040
|
if ((u = o[c]) && (u |= a & -32768, u > a && (u -= 32768), u < a)) for (; t[u + d] == t[a + d] && d < 250;) ++d;
|
|
2003
2041
|
if (d > 2) {
|
|
2004
|
-
l = r[d], l <= 22 ? i =
|
|
2042
|
+
l = r[d], l <= 22 ? i = J(n, i, U[l + 1] >> 1) - 1 : (J(n, i, 3), i += 5, J(n, i, U[l - 23] >> 5), i += 3);
|
|
2005
2043
|
var f = l < 8 ? 0 : l - 4 >> 2;
|
|
2006
|
-
f > 0 && (
|
|
2044
|
+
f > 0 && (sp(n, i, d - V[l]), i += f), l = e[a - u], i = J(n, i, U[l] >> 3), i -= 3;
|
|
2007
2045
|
var p = l < 4 ? 0 : l - 2 >> 1;
|
|
2008
|
-
p > 0 && (
|
|
2046
|
+
p > 0 && (sp(n, i, a - u - $f[l]), i += p);
|
|
2009
2047
|
for (var m = 0; m < d; ++m) o[c] = a & 32767, c = (c << 5 ^ t[a]) & 32767, ++a;
|
|
2010
2048
|
s -= d - 1;
|
|
2011
|
-
} else l <= 143 ? l += 48 : i =
|
|
2049
|
+
} else l <= 143 ? l += 48 : i = op(n, i, 1), i = J(n, i, U[l]), o[c] = a & 32767, ++a;
|
|
2012
2050
|
}
|
|
2013
|
-
i =
|
|
2051
|
+
i = J(n, i, 0) - 1;
|
|
2014
2052
|
}
|
|
2015
2053
|
return n.l = (i + 7) / 8 | 0, n.l;
|
|
2016
2054
|
}
|
|
@@ -2018,19 +2056,19 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2018
2056
|
return e.length < 8 ? i(e, t) : a(e, t);
|
|
2019
2057
|
};
|
|
2020
2058
|
})();
|
|
2021
|
-
function
|
|
2022
|
-
var t = new_buf(50 + Math.floor(e.length * 1.1)), n =
|
|
2059
|
+
function dp(e) {
|
|
2060
|
+
var t = new_buf(50 + Math.floor(e.length * 1.1)), n = up(e, t);
|
|
2023
2061
|
return t.slice(0, n);
|
|
2024
2062
|
}
|
|
2025
|
-
var
|
|
2026
|
-
function
|
|
2027
|
-
var n =
|
|
2063
|
+
var fp = H ? new Uint16Array(32768) : Y(32768), pp = H ? new Uint16Array(32768) : Y(32768), mp = H ? new Uint16Array(128) : Y(128), hp = 1, gp = 1;
|
|
2064
|
+
function _p(e, t) {
|
|
2065
|
+
var n = np(e, t) + 257;
|
|
2028
2066
|
t += 5;
|
|
2029
|
-
var r =
|
|
2067
|
+
var r = np(e, t) + 1;
|
|
2030
2068
|
t += 5;
|
|
2031
|
-
var i =
|
|
2069
|
+
var i = q(e, t) + 4;
|
|
2032
2070
|
t += 4;
|
|
2033
|
-
for (var a = 0, o =
|
|
2071
|
+
for (var a = 0, o = H ? new Uint8Array(19) : Y(19), s = [
|
|
2034
2072
|
0,
|
|
2035
2073
|
0,
|
|
2036
2074
|
0,
|
|
@@ -2050,25 +2088,25 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2050
2088
|
0,
|
|
2051
2089
|
0,
|
|
2052
2090
|
0
|
|
2053
|
-
], c = 1, l =
|
|
2091
|
+
], c = 1, l = H ? new Uint8Array(8) : Y(8), u = H ? new Uint8Array(8) : Y(8), d = o.length, f = 0; f < i; ++f) o[Qf[f]] = a = K(e, t), c < a && (c = a), l[a]++, t += 3;
|
|
2054
2092
|
var p = 0;
|
|
2055
2093
|
for (l[0] = 0, f = 1; f <= c; ++f) u[f] = p = p + l[f - 1] << 1;
|
|
2056
2094
|
for (f = 0; f < d; ++f) (p = o[f]) != 0 && (s[f] = u[p]++);
|
|
2057
2095
|
var m = 0;
|
|
2058
2096
|
for (f = 0; f < d; ++f) if (m = o[f], m != 0) {
|
|
2059
|
-
p =
|
|
2060
|
-
for (var h = (1 << 7 - m) - 1; h >= 0; --h)
|
|
2097
|
+
p = U[s[f]] >> 8 - m;
|
|
2098
|
+
for (var h = (1 << 7 - m) - 1; h >= 0; --h) mp[p | h << m] = m & 7 | f << 3;
|
|
2061
2099
|
}
|
|
2062
2100
|
var g = [];
|
|
2063
|
-
for (c = 1; g.length < n + r;) switch (p =
|
|
2101
|
+
for (c = 1; g.length < n + r;) switch (p = mp[rp(e, t)], t += p & 7, p >>>= 3) {
|
|
2064
2102
|
case 16:
|
|
2065
|
-
for (a = 3 +
|
|
2103
|
+
for (a = 3 + tp(e, t), t += 2, p = g[g.length - 1]; a-- > 0;) g.push(p);
|
|
2066
2104
|
break;
|
|
2067
2105
|
case 17:
|
|
2068
|
-
for (a = 3 +
|
|
2106
|
+
for (a = 3 + K(e, t), t += 3; a-- > 0;) g.push(0);
|
|
2069
2107
|
break;
|
|
2070
2108
|
case 18:
|
|
2071
|
-
for (a = 11 +
|
|
2109
|
+
for (a = 11 + rp(e, t), t += 7; a-- > 0;) g.push(0);
|
|
2072
2110
|
break;
|
|
2073
2111
|
default:
|
|
2074
2112
|
g.push(p), c < p && (c = p);
|
|
@@ -2077,45 +2115,45 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2077
2115
|
var _ = g.slice(0, n), v = g.slice(n);
|
|
2078
2116
|
for (f = n; f < 286; ++f) _[f] = 0;
|
|
2079
2117
|
for (f = r; f < 30; ++f) v[f] = 0;
|
|
2080
|
-
return
|
|
2118
|
+
return hp = X(_, fp, 286), gp = X(v, pp, 30), t;
|
|
2081
2119
|
}
|
|
2082
|
-
function
|
|
2120
|
+
function vp(e, t) {
|
|
2083
2121
|
if (e[0] == 3 && !(e[1] & 3)) return [new_raw_buf(t), 2];
|
|
2084
2122
|
for (var n = 0, r = 0, i = new_unsafe_buf(t || 1 << 18), a = 0, o = i.length >>> 0, s = 0, c = 0; !(r & 1);) {
|
|
2085
|
-
if (r =
|
|
2123
|
+
if (r = K(e, n), n += 3, r >>> 1) r >> 1 == 1 ? (s = 9, c = 5) : (n = _p(e, n), s = hp, c = gp);
|
|
2086
2124
|
else {
|
|
2087
2125
|
n & 7 && (n += 8 - (n & 7));
|
|
2088
2126
|
var l = e[n >>> 3] | e[(n >>> 3) + 1] << 8;
|
|
2089
|
-
if (n += 32, l > 0) for (!t && o < a + l && (i =
|
|
2127
|
+
if (n += 32, l > 0) for (!t && o < a + l && (i = cp(i, a + l), o = i.length); l-- > 0;) i[a++] = e[n >>> 3], n += 8;
|
|
2090
2128
|
continue;
|
|
2091
2129
|
}
|
|
2092
2130
|
for (;;) {
|
|
2093
|
-
!t && o < a + 32767 && (i =
|
|
2094
|
-
var u =
|
|
2131
|
+
!t && o < a + 32767 && (i = cp(i, a + 32767), o = i.length);
|
|
2132
|
+
var u = ip(e, n, s), d = r >>> 1 == 1 ? Z[u] : fp[u];
|
|
2095
2133
|
if (n += d & 15, d >>>= 4, !(d >>> 8 & 255)) i[a++] = d;
|
|
2096
2134
|
else if (d == 256) break;
|
|
2097
2135
|
else {
|
|
2098
2136
|
d -= 257;
|
|
2099
2137
|
var f = d < 8 ? 0 : d - 4 >> 2;
|
|
2100
2138
|
f > 5 && (f = 0);
|
|
2101
|
-
var p = a +
|
|
2102
|
-
f > 0 && (p +=
|
|
2103
|
-
var m = d < 4 ? 0 : d - 2 >> 1, h =
|
|
2104
|
-
for (m > 0 && (h +=
|
|
2139
|
+
var p = a + V[d];
|
|
2140
|
+
f > 0 && (p += ip(e, n, f), n += f), u = ip(e, n, c), d = r >>> 1 == 1 ? lp[u] : pp[u], n += d & 15, d >>>= 4;
|
|
2141
|
+
var m = d < 4 ? 0 : d - 2 >> 1, h = $f[d];
|
|
2142
|
+
for (m > 0 && (h += ip(e, n, m), n += m), !t && o < p && (i = cp(i, p + 100), o = i.length); a < p;) i[a] = i[a - h], ++a;
|
|
2105
2143
|
}
|
|
2106
2144
|
}
|
|
2107
2145
|
}
|
|
2108
2146
|
return t ? [i, n + 7 >>> 3] : [i.slice(0, a), n + 7 >>> 3];
|
|
2109
2147
|
}
|
|
2110
|
-
function
|
|
2111
|
-
var n = e.slice(e.l || 0), r =
|
|
2148
|
+
function yp(e, t) {
|
|
2149
|
+
var n = e.slice(e.l || 0), r = vp(n, t);
|
|
2112
2150
|
return e.l += r[1], r[0];
|
|
2113
2151
|
}
|
|
2114
|
-
function
|
|
2152
|
+
function bp(e, t) {
|
|
2115
2153
|
if (e) typeof console < "u" && console.error(t);
|
|
2116
2154
|
else throw Error(t);
|
|
2117
2155
|
}
|
|
2118
|
-
function
|
|
2156
|
+
function xp(e, t) {
|
|
2119
2157
|
var n = e;
|
|
2120
2158
|
prep_blob(n, 0);
|
|
2121
2159
|
var r = {
|
|
@@ -2133,11 +2171,11 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2133
2171
|
var f = n.read_shift(4), p = o(n.slice(n.l + l, n.l + l + u));
|
|
2134
2172
|
n.l += l + u + d;
|
|
2135
2173
|
var m = n.l;
|
|
2136
|
-
n.l = f + 4,
|
|
2174
|
+
n.l = f + 4, Sp(n, s, c, r, p), n.l = m;
|
|
2137
2175
|
}
|
|
2138
2176
|
return r;
|
|
2139
2177
|
}
|
|
2140
|
-
function
|
|
2178
|
+
function Sp(e, t, n, r, i) {
|
|
2141
2179
|
e.l += 2;
|
|
2142
2180
|
var s = e.read_shift(2), c = e.read_shift(2), l = a(e);
|
|
2143
2181
|
if (s & 8257) throw Error("Unsupported ZIP encryption");
|
|
@@ -2150,25 +2188,25 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2150
2188
|
var v = e.slice(e.l, e.l + d);
|
|
2151
2189
|
switch (c) {
|
|
2152
2190
|
case 8:
|
|
2153
|
-
v =
|
|
2191
|
+
v = Zf(e, f);
|
|
2154
2192
|
break;
|
|
2155
2193
|
case 0: break;
|
|
2156
2194
|
default: throw Error("Unsupported ZIP Compression method " + c);
|
|
2157
2195
|
}
|
|
2158
2196
|
var y = !1;
|
|
2159
|
-
s & 8 && (u = e.read_shift(4), u == 134695760 && (u = e.read_shift(4), y = !0), d = e.read_shift(4), f = e.read_shift(4)), d != t &&
|
|
2197
|
+
s & 8 && (u = e.read_shift(4), u == 134695760 && (u = e.read_shift(4), y = !0), d = e.read_shift(4), f = e.read_shift(4)), d != t && bp(y, "Bad compressed size: " + t + " != " + d), f != n && bp(y, "Bad uncompressed size: " + n + " != " + f), Np(r, h, v, {
|
|
2160
2198
|
unsafe: !0,
|
|
2161
2199
|
mt: l
|
|
2162
2200
|
});
|
|
2163
2201
|
}
|
|
2164
|
-
function
|
|
2202
|
+
function Cp(e, t) {
|
|
2165
2203
|
var n = t || {}, r = [], a = [], o = new_buf(1), s = n.compression ? 8 : 0, c = 0, l = 0, u = 0, d = 0, f = 0, p = e.FullPaths[0], m = p, h = e.FileIndex[0], g = [], _ = 0;
|
|
2166
2204
|
for (l = 1; l < e.FullPaths.length; ++l) if (m = e.FullPaths[l].slice(p.length), h = e.FileIndex[l], !(!h.size || !h.content || m == "Sh33tJ5")) {
|
|
2167
2205
|
var v = d, y = new_buf(m.length);
|
|
2168
2206
|
for (u = 0; u < m.length; ++u) y.write_shift(1, m.charCodeAt(u) & 127);
|
|
2169
2207
|
y = y.slice(0, y.l), g[f] = CRC32.buf(h.content, 0);
|
|
2170
2208
|
var b = h.content;
|
|
2171
|
-
s == 8 && (b =
|
|
2209
|
+
s == 8 && (b = B(b)), o = new_buf(30), o.write_shift(4, 67324752), o.write_shift(2, 20), o.write_shift(2, c), o.write_shift(2, s), h.mt ? i(o, h.mt) : o.write_shift(4, 0), o.write_shift(-4, c & 8 ? 0 : g[f]), o.write_shift(4, c & 8 ? 0 : b.length), o.write_shift(4, c & 8 ? 0 : h.content.length), o.write_shift(2, y.length), o.write_shift(2, 0), d += o.length, r.push(o), d += y.length, r.push(y), d += b.length, r.push(b), c & 8 && (o = new_buf(12), o.write_shift(-4, g[f]), o.write_shift(4, b.length), o.write_shift(4, h.content.length), d += o.l, r.push(o)), o = new_buf(46), o.write_shift(4, 33639248), o.write_shift(2, 0), o.write_shift(2, 20), o.write_shift(2, c), o.write_shift(2, s), o.write_shift(4, 0), o.write_shift(-4, g[f]), o.write_shift(4, b.length), o.write_shift(4, h.content.length), o.write_shift(2, y.length), o.write_shift(2, 0), o.write_shift(2, 0), o.write_shift(2, 0), o.write_shift(2, 0), o.write_shift(4, 0), o.write_shift(4, v), _ += o.l, a.push(o), _ += y.length, a.push(y), ++f;
|
|
2172
2210
|
}
|
|
2173
2211
|
return o = new_buf(22), o.write_shift(4, 101010256), o.write_shift(2, 0), o.write_shift(2, 0), o.write_shift(2, f), o.write_shift(2, f), o.write_shift(4, _), o.write_shift(4, d), o.write_shift(2, 0), bconcat([
|
|
2174
2212
|
bconcat(r),
|
|
@@ -2176,7 +2214,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2176
2214
|
o
|
|
2177
2215
|
]);
|
|
2178
2216
|
}
|
|
2179
|
-
var
|
|
2217
|
+
var wp = {
|
|
2180
2218
|
htm: "text/html",
|
|
2181
2219
|
xml: "text/xml",
|
|
2182
2220
|
gif: "image/gif",
|
|
@@ -2186,16 +2224,16 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2186
2224
|
thmx: "application/vnd.ms-officetheme",
|
|
2187
2225
|
sh33tj5: "application/octet-stream"
|
|
2188
2226
|
};
|
|
2189
|
-
function
|
|
2227
|
+
function Tp(e, t) {
|
|
2190
2228
|
if (e.ctype) return e.ctype;
|
|
2191
2229
|
var n = e.name || "", r = n.match(/\.([^\.]+)$/);
|
|
2192
|
-
return r &&
|
|
2230
|
+
return r && wp[r[1]] || t && (r = (n = t).match(/[\.\\]([^\.\\])+$/), r && wp[r[1]]) ? wp[r[1]] : "application/octet-stream";
|
|
2193
2231
|
}
|
|
2194
|
-
function
|
|
2232
|
+
function Ep(e) {
|
|
2195
2233
|
for (var t = Base64_encode(e), n = [], r = 0; r < t.length; r += 76) n.push(t.slice(r, r + 76));
|
|
2196
2234
|
return n.join("\r\n") + "\r\n";
|
|
2197
2235
|
}
|
|
2198
|
-
function
|
|
2236
|
+
function Dp(e) {
|
|
2199
2237
|
var t = e.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF=]/g, function(e) {
|
|
2200
2238
|
var t = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2201
2239
|
return "=" + (t.length == 1 ? "0" + t : t);
|
|
@@ -2214,7 +2252,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2214
2252
|
}
|
|
2215
2253
|
return n.join("\r\n");
|
|
2216
2254
|
}
|
|
2217
|
-
function
|
|
2255
|
+
function Op(e) {
|
|
2218
2256
|
for (var t = [], n = 0; n < e.length; ++n) {
|
|
2219
2257
|
for (var r = e[n]; n <= e.length && r.charAt(r.length - 1) == "=";) r = r.slice(0, r.length - 1) + e[++n];
|
|
2220
2258
|
t.push(r);
|
|
@@ -2224,7 +2262,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2224
2262
|
});
|
|
2225
2263
|
return s2a(t.join("\r\n"));
|
|
2226
2264
|
}
|
|
2227
|
-
function
|
|
2265
|
+
function kp(e, t, n) {
|
|
2228
2266
|
for (var r = "", i = "", a = "", o, s = 0; s < 10; ++s) {
|
|
2229
2267
|
var c = t[s];
|
|
2230
2268
|
if (!c || c.match(/^\s*$/)) break;
|
|
@@ -2246,16 +2284,16 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2246
2284
|
o = s2a(Base64_decode(t.slice(s).join("")));
|
|
2247
2285
|
break;
|
|
2248
2286
|
case "quoted-printable":
|
|
2249
|
-
o =
|
|
2287
|
+
o = Op(t.slice(s));
|
|
2250
2288
|
break;
|
|
2251
2289
|
default: throw Error("Unsupported Content-Transfer-Encoding " + i);
|
|
2252
2290
|
}
|
|
2253
|
-
var u =
|
|
2291
|
+
var u = Np(e, r.slice(n.length), o, { unsafe: !0 });
|
|
2254
2292
|
a && (u.ctype = a);
|
|
2255
2293
|
}
|
|
2256
|
-
function
|
|
2257
|
-
if (
|
|
2258
|
-
var n = t && t.root || "", r = (has_buf && Buffer.isBuffer(e) ? e.toString("binary") :
|
|
2294
|
+
function Ap(e, t) {
|
|
2295
|
+
if (L(e.slice(0, 13)).toLowerCase() != "mime-version:") throw Error("Unsupported MAD header");
|
|
2296
|
+
var n = t && t.root || "", r = (has_buf && Buffer.isBuffer(e) ? e.toString("binary") : L(e)).split("\r\n"), i = 0, a = "";
|
|
2259
2297
|
for (i = 0; i < r.length; ++i) if (a = r[i], /^Content-Location:/i.test(a) && (a = a.slice(a.indexOf("file")), n ||= a.slice(0, a.lastIndexOf("/") + 1), a.slice(0, n.length) != n)) for (; n.length > 0 && (n = n.slice(0, n.length - 1), n = n.slice(0, n.lastIndexOf("/") + 1), a.slice(0, n.length) != n););
|
|
2260
2298
|
var o = (r[1] || "").match(/boundary="(.*?)"/);
|
|
2261
2299
|
if (!o) throw Error("MAD cannot find boundary");
|
|
@@ -2267,11 +2305,11 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2267
2305
|
var l, u = 0;
|
|
2268
2306
|
for (i = 0; i < r.length; ++i) {
|
|
2269
2307
|
var d = r[i];
|
|
2270
|
-
d !== s && d !== s + "--" || (u++ &&
|
|
2308
|
+
d !== s && d !== s + "--" || (u++ && kp(c, r.slice(l, i), n), l = i);
|
|
2271
2309
|
}
|
|
2272
2310
|
return c;
|
|
2273
2311
|
}
|
|
2274
|
-
function
|
|
2312
|
+
function jp(e, t) {
|
|
2275
2313
|
var n = t || {}, r = n.boundary || "SheetJS";
|
|
2276
2314
|
r = "------=" + r;
|
|
2277
2315
|
for (var i = [
|
|
@@ -2286,17 +2324,17 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2286
2324
|
}).replace(/[\u0080-\uFFFF]/g, function(e) {
|
|
2287
2325
|
return "_u" + e.charCodeAt(0).toString(16) + "_";
|
|
2288
2326
|
});
|
|
2289
|
-
for (var l = s.content, u = has_buf && Buffer.isBuffer(l) ? l.toString("binary") :
|
|
2327
|
+
for (var l = s.content, u = has_buf && Buffer.isBuffer(l) ? l.toString("binary") : L(l), d = 0, f = Math.min(1024, u.length), p = 0, m = 0; m <= f; ++m) (p = u.charCodeAt(m)) >= 32 && p < 128 && ++d;
|
|
2290
2328
|
var h = d >= f * 4 / 5;
|
|
2291
|
-
i.push(r), i.push("Content-Location: " + (n.root || "file:///C:/SheetJS/") + o), i.push("Content-Transfer-Encoding: " + (h ? "quoted-printable" : "base64")), i.push("Content-Type: " +
|
|
2329
|
+
i.push(r), i.push("Content-Location: " + (n.root || "file:///C:/SheetJS/") + o), i.push("Content-Transfer-Encoding: " + (h ? "quoted-printable" : "base64")), i.push("Content-Type: " + Tp(s, o)), i.push(""), i.push(h ? Dp(u) : Ep(u));
|
|
2292
2330
|
}
|
|
2293
2331
|
return i.push(r + "--\r\n"), i.join("\r\n");
|
|
2294
2332
|
}
|
|
2295
|
-
function
|
|
2333
|
+
function Mp(e) {
|
|
2296
2334
|
var t = {};
|
|
2297
2335
|
return S(t, e), t;
|
|
2298
2336
|
}
|
|
2299
|
-
function
|
|
2337
|
+
function Np(e, t, n, i) {
|
|
2300
2338
|
var a = i && i.unsafe;
|
|
2301
2339
|
a || S(e);
|
|
2302
2340
|
var o = !a && CFB.find(e, t);
|
|
@@ -2309,7 +2347,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2309
2347
|
}
|
|
2310
2348
|
return o.content = n, o.size = n ? n.length : 0, i && (i.CLSID && (o.clsid = i.CLSID), i.mt && (o.mt = i.mt), i.ct && (o.ct = i.ct)), o;
|
|
2311
2349
|
}
|
|
2312
|
-
function
|
|
2350
|
+
function Pp(e, t) {
|
|
2313
2351
|
S(e);
|
|
2314
2352
|
var n = CFB.find(e, t);
|
|
2315
2353
|
if (n) {
|
|
@@ -2317,7 +2355,7 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2317
2355
|
}
|
|
2318
2356
|
return !1;
|
|
2319
2357
|
}
|
|
2320
|
-
function
|
|
2358
|
+
function Fp(e, t, n) {
|
|
2321
2359
|
S(e);
|
|
2322
2360
|
var i = CFB.find(e, t);
|
|
2323
2361
|
if (i) {
|
|
@@ -2325,23 +2363,23 @@ var CRC32 = /* @__PURE__ */ (function() {
|
|
|
2325
2363
|
}
|
|
2326
2364
|
return !1;
|
|
2327
2365
|
}
|
|
2328
|
-
function
|
|
2366
|
+
function Ip(e) {
|
|
2329
2367
|
w(e, !0);
|
|
2330
2368
|
}
|
|
2331
|
-
return e.find = E, e.read = x, e.parse = l, e.write =
|
|
2332
|
-
cfb_new:
|
|
2333
|
-
cfb_add:
|
|
2334
|
-
cfb_del:
|
|
2335
|
-
cfb_mov:
|
|
2336
|
-
cfb_gc:
|
|
2369
|
+
return e.find = E, e.read = x, e.parse = l, e.write = R, e.writeFile = N, e.utils = {
|
|
2370
|
+
cfb_new: Mp,
|
|
2371
|
+
cfb_add: Np,
|
|
2372
|
+
cfb_del: Pp,
|
|
2373
|
+
cfb_mov: Fp,
|
|
2374
|
+
cfb_gc: Ip,
|
|
2337
2375
|
ReadShift,
|
|
2338
2376
|
CheckField,
|
|
2339
2377
|
prep_blob,
|
|
2340
2378
|
bconcat,
|
|
2341
|
-
use_zlib:
|
|
2342
|
-
_deflateRaw:
|
|
2343
|
-
_inflateRaw:
|
|
2344
|
-
consts:
|
|
2379
|
+
use_zlib: Jf,
|
|
2380
|
+
_deflateRaw: dp,
|
|
2381
|
+
_inflateRaw: yp,
|
|
2382
|
+
consts: M
|
|
2345
2383
|
}, e;
|
|
2346
2384
|
})(), _fs = void 0;
|
|
2347
2385
|
function blobify(e) {
|
|
@@ -4810,7 +4848,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
4810
4848
|
}
|
|
4811
4849
|
var m = safe_decode_range(e["!ref"]), h = [], g = [], _ = [];
|
|
4812
4850
|
for (u = 0; u <= m.e.c - m.s.c; ++u) {
|
|
4813
|
-
var
|
|
4851
|
+
var v = "", y = "", x = 0, S = [];
|
|
4814
4852
|
for (d = 0; d < c.length; ++d) c[d][u] != null && S.push(c[d][u]);
|
|
4815
4853
|
if (S.length == 0 || s[u] == null) {
|
|
4816
4854
|
h[u] = "?";
|
|
@@ -4819,28 +4857,28 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
4819
4857
|
for (d = 0; d < S.length; ++d) {
|
|
4820
4858
|
switch (typeof S[d]) {
|
|
4821
4859
|
case "number":
|
|
4822
|
-
|
|
4860
|
+
y = "B";
|
|
4823
4861
|
break;
|
|
4824
4862
|
case "string":
|
|
4825
|
-
|
|
4863
|
+
y = "C";
|
|
4826
4864
|
break;
|
|
4827
4865
|
case "boolean":
|
|
4828
|
-
|
|
4866
|
+
y = "L";
|
|
4829
4867
|
break;
|
|
4830
4868
|
case "object":
|
|
4831
|
-
|
|
4869
|
+
y = S[d] instanceof Date ? "D" : "C";
|
|
4832
4870
|
break;
|
|
4833
|
-
default:
|
|
4871
|
+
default: y = "C";
|
|
4834
4872
|
}
|
|
4835
|
-
x = Math.max(x, String(S[d]).length),
|
|
4873
|
+
x = Math.max(x, String(S[d]).length), v = v && v != y ? "C" : y;
|
|
4836
4874
|
}
|
|
4837
|
-
x > 250 && (x = 250),
|
|
4875
|
+
x > 250 && (x = 250), y = ((l[u] || {}).DBF || {}).type, y == "C" && l[u].DBF.len > x && (x = l[u].DBF.len), v == "B" && y == "N" && (v = "N", _[u] = l[u].DBF.dec, x = l[u].DBF.len), g[u] = v == "C" || y == "N" ? x : a[v] || 0, p += g[u], h[u] = v;
|
|
4838
4876
|
}
|
|
4839
|
-
var
|
|
4840
|
-
for (
|
|
4841
|
-
for (
|
|
4842
|
-
var
|
|
4843
|
-
|
|
4877
|
+
var C = i.next(32);
|
|
4878
|
+
for (C.write_shift(4, 318902576), C.write_shift(4, c.length), C.write_shift(2, 296 + 32 * f), C.write_shift(2, p), u = 0; u < 4; ++u) C.write_shift(4, 0);
|
|
4879
|
+
for (C.write_shift(4, 0 | (+t[current_ansi] || 3) << 8), u = 0, d = 0; u < s.length; ++u) if (s[u] != null) {
|
|
4880
|
+
var w = i.next(32), E = (s[u].slice(-10) + "\0\0\0\0\0\0\0\0\0\0\0").slice(0, 11);
|
|
4881
|
+
w.write_shift(1, E, "sbcs"), w.write_shift(1, h[u] == "?" ? "C" : h[u], "sbcs"), w.write_shift(4, d), w.write_shift(1, g[u] || a[h[u]] || 0), w.write_shift(1, _[u] || 0), w.write_shift(1, 2), w.write_shift(4, 0), w.write_shift(1, 0), w.write_shift(4, 0), w.write_shift(4, 0), d += g[u] || a[h[u]] || 0;
|
|
4844
4882
|
}
|
|
4845
4883
|
var D = i.next(264);
|
|
4846
4884
|
for (D.write_shift(4, 13), u = 0; u < 65; ++u) D.write_shift(4, 0);
|
|
@@ -4997,17 +5035,17 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
4997
5035
|
b[1].charAt(0) == "P" && d.push(y.slice(3).replace(/;;/g, ";"));
|
|
4998
5036
|
break;
|
|
4999
5037
|
case "C":
|
|
5000
|
-
var
|
|
5038
|
+
var C = !1, w = !1, E = !1, D = !1, O = -1, k = -1;
|
|
5001
5039
|
for (l = 1; l < b.length; ++l) switch (b[l].charAt(0)) {
|
|
5002
5040
|
case "A": break;
|
|
5003
5041
|
case "X":
|
|
5004
|
-
s = parseInt(b[l].slice(1)) - 1,
|
|
5042
|
+
s = parseInt(b[l].slice(1)) - 1, w = !0;
|
|
5005
5043
|
break;
|
|
5006
5044
|
case "Y":
|
|
5007
|
-
for (o = parseInt(b[l].slice(1)) - 1,
|
|
5045
|
+
for (o = parseInt(b[l].slice(1)) - 1, w || (s = 0), v = u.length; v <= o; ++v) u[v] = [];
|
|
5008
5046
|
break;
|
|
5009
5047
|
case "K":
|
|
5010
|
-
S = b[l].slice(1), S.charAt(0) === "\"" ? S = S.slice(1, S.length - 1) : S === "TRUE" ? S = !0 : S === "FALSE" ? S = !1 : isNaN(fuzzynum(S)) ? isNaN(fuzzydate(S).getDate()) || (S = parseDate(S)) : (S = fuzzynum(S), f !== null && fmt_is_date(f) && (S = numdate(S))), $cptable !== void 0 && typeof S == "string" && (i || {}).type != "string" && (i || {}).codepage && (S = $cptable.utils.decode(i.codepage, S)),
|
|
5048
|
+
S = b[l].slice(1), S.charAt(0) === "\"" ? S = S.slice(1, S.length - 1) : S === "TRUE" ? S = !0 : S === "FALSE" ? S = !1 : isNaN(fuzzynum(S)) ? isNaN(fuzzydate(S).getDate()) || (S = parseDate(S)) : (S = fuzzynum(S), f !== null && fmt_is_date(f) && (S = numdate(S))), $cptable !== void 0 && typeof S == "string" && (i || {}).type != "string" && (i || {}).codepage && (S = $cptable.utils.decode(i.codepage, S)), C = !0;
|
|
5011
5049
|
break;
|
|
5012
5050
|
case "E":
|
|
5013
5051
|
D = !0;
|
|
@@ -5022,20 +5060,20 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5022
5060
|
break;
|
|
5023
5061
|
case "G": break;
|
|
5024
5062
|
case "R":
|
|
5025
|
-
|
|
5063
|
+
O = parseInt(b[l].slice(1)) - 1;
|
|
5026
5064
|
break;
|
|
5027
5065
|
case "C":
|
|
5028
|
-
|
|
5066
|
+
k = parseInt(b[l].slice(1)) - 1;
|
|
5029
5067
|
break;
|
|
5030
5068
|
default: if (i && i.WTF) throw Error("SYLK bad record " + y);
|
|
5031
5069
|
}
|
|
5032
|
-
if (
|
|
5070
|
+
if (C && (u[o][s] && u[o][s].length == 2 ? u[o][s][0] = S : u[o][s] = S, f = null), E) {
|
|
5033
5071
|
if (D) throw Error("SYLK shared formula cannot have own formula");
|
|
5034
|
-
var M =
|
|
5072
|
+
var M = O > -1 && u[O][k];
|
|
5035
5073
|
if (!M || !M[1]) throw Error("SYLK shared formula cannot find base");
|
|
5036
5074
|
u[o][s][1] = shift_formula_str(M[1], {
|
|
5037
|
-
r: o -
|
|
5038
|
-
c: s -
|
|
5075
|
+
r: o - O,
|
|
5076
|
+
c: s - k
|
|
5039
5077
|
});
|
|
5040
5078
|
}
|
|
5041
5079
|
break;
|
|
@@ -5472,7 +5510,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5472
5510
|
function e(e, t, n) {
|
|
5473
5511
|
if (e) {
|
|
5474
5512
|
prep_blob(e, e.l || 0);
|
|
5475
|
-
for (var r = n.Enum ||
|
|
5513
|
+
for (var r = n.Enum || Gf; e.l < e.length;) {
|
|
5476
5514
|
var i = e.read_shift(2), a = r[i] || r[65535], o = e.read_shift(2), s = e.l + o, c = a.f && a.f(e, o, n);
|
|
5477
5515
|
if (e.l = s, t(c, a, i)) return;
|
|
5478
5516
|
}
|
|
@@ -5502,7 +5540,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5502
5540
|
}
|
|
5503
5541
|
}, f = r.sheetRows || 0;
|
|
5504
5542
|
if (t[2] == 0 && (t[3] == 8 || t[3] == 9) && t.length >= 16 && t[14] == 5 && t[15] === 108) throw Error("Unsupported Works 3 for Mac file");
|
|
5505
|
-
if (t[2] == 2) r.Enum =
|
|
5543
|
+
if (t[2] == 2) r.Enum = Gf, e(t, function(e, t, n) {
|
|
5506
5544
|
switch (n) {
|
|
5507
5545
|
case 0:
|
|
5508
5546
|
r.vers = e, e >= 4096 && (r.qpro = !0);
|
|
@@ -5541,7 +5579,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5541
5579
|
default:
|
|
5542
5580
|
}
|
|
5543
5581
|
}, r);
|
|
5544
|
-
else if (t[2] == 26 || t[2] == 14) r.Enum =
|
|
5582
|
+
else if (t[2] == 26 || t[2] == 14) r.Enum = L, t[2] == 14 && (r.qpro = !0, t.l = 0), e(t, function(e, t, n) {
|
|
5545
5583
|
switch (n) {
|
|
5546
5584
|
case 204:
|
|
5547
5585
|
a = e;
|
|
@@ -5606,7 +5644,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5606
5644
|
if (+n.codepage >= 0 && set_cp(+n.codepage), n.type == "string") throw Error("Cannot write WK3 to JS string");
|
|
5607
5645
|
var r = buf_array();
|
|
5608
5646
|
write_biff_rec(r, 0, o(e));
|
|
5609
|
-
for (var i = 0, a = 0; i < e.SheetNames.length; ++i) (e.Sheets[e.SheetNames[i]] || {})["!ref"] && write_biff_rec(r, 27,
|
|
5647
|
+
for (var i = 0, a = 0; i < e.SheetNames.length; ++i) (e.Sheets[e.SheetNames[i]] || {})["!ref"] && write_biff_rec(r, 27, Wf(e.SheetNames[i], a++));
|
|
5610
5648
|
var s = 0;
|
|
5611
5649
|
for (i = 0; i < e.SheetNames.length; ++i) {
|
|
5612
5650
|
var c = e.Sheets[e.SheetNames[i]];
|
|
@@ -5617,7 +5655,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5617
5655
|
if (!(!_ || _.t == "z")) if (_.t == "n") write_biff_rec(r, 23, D(p, h, s, _.v));
|
|
5618
5656
|
else {
|
|
5619
5657
|
var v = format_cell(_);
|
|
5620
|
-
write_biff_rec(r, 22,
|
|
5658
|
+
write_biff_rec(r, 22, C(p, h, s, v.slice(0, 239)));
|
|
5621
5659
|
}
|
|
5622
5660
|
}
|
|
5623
5661
|
++s;
|
|
@@ -5811,7 +5849,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5811
5849
|
var n = x(e, t);
|
|
5812
5850
|
return n[1].t = "s", n[1].v = e.read_shift(t - 4, "cstr"), n;
|
|
5813
5851
|
}
|
|
5814
|
-
function
|
|
5852
|
+
function C(e, t, n, r) {
|
|
5815
5853
|
var i = new_buf(6 + r.length);
|
|
5816
5854
|
i.write_shift(2, e), i.write_shift(1, n), i.write_shift(1, t), i.write_shift(1, 39);
|
|
5817
5855
|
for (var a = 0; a < r.length; ++a) {
|
|
@@ -5820,7 +5858,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5820
5858
|
}
|
|
5821
5859
|
return i.write_shift(1, 0), i;
|
|
5822
5860
|
}
|
|
5823
|
-
function
|
|
5861
|
+
function w(e, t) {
|
|
5824
5862
|
var n = x(e, t);
|
|
5825
5863
|
n[1].v = e.read_shift(2);
|
|
5826
5864
|
var r = n[1].v >> 1;
|
|
@@ -5868,28 +5906,28 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5868
5906
|
var n = E(e, 14);
|
|
5869
5907
|
return e.l += t - 14, n;
|
|
5870
5908
|
}
|
|
5871
|
-
function
|
|
5909
|
+
function k(e, t) {
|
|
5872
5910
|
var n = x(e, t), r = e.read_shift(4);
|
|
5873
5911
|
return n[1].v = r >> 6, n;
|
|
5874
5912
|
}
|
|
5875
|
-
function
|
|
5913
|
+
function A(e, t) {
|
|
5876
5914
|
var n = x(e, t), r = e.read_shift(8, "f");
|
|
5877
5915
|
return n[1].v = r, n;
|
|
5878
5916
|
}
|
|
5879
5917
|
function M(e, t) {
|
|
5880
|
-
var n =
|
|
5918
|
+
var n = A(e, 14);
|
|
5881
5919
|
return e.l += t - 10, n;
|
|
5882
5920
|
}
|
|
5883
|
-
function
|
|
5921
|
+
function N(e, t) {
|
|
5884
5922
|
return e[e.l + t - 1] == 0 ? e.read_shift(t, "cstr") : "";
|
|
5885
5923
|
}
|
|
5886
|
-
function
|
|
5924
|
+
function P(e, t) {
|
|
5887
5925
|
var n = e[e.l++];
|
|
5888
5926
|
n > t - 1 && (n = t - 1);
|
|
5889
5927
|
for (var r = ""; r.length < n;) r += String.fromCharCode(e[e.l++]);
|
|
5890
5928
|
return r;
|
|
5891
5929
|
}
|
|
5892
|
-
function
|
|
5930
|
+
function F(e, t, n) {
|
|
5893
5931
|
if (!(!n.qpro || t < 21)) {
|
|
5894
5932
|
var r = e.read_shift(1);
|
|
5895
5933
|
e.l += 17, e.l += 1, e.l += 2;
|
|
@@ -5897,7 +5935,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5897
5935
|
return [r, i];
|
|
5898
5936
|
}
|
|
5899
5937
|
}
|
|
5900
|
-
function
|
|
5938
|
+
function I(e, t) {
|
|
5901
5939
|
for (var n = {}, r = e.l + t; e.l < r;) {
|
|
5902
5940
|
var i = e.read_shift(2);
|
|
5903
5941
|
if (i == 14e3) {
|
|
@@ -5907,7 +5945,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5907
5945
|
}
|
|
5908
5946
|
return n;
|
|
5909
5947
|
}
|
|
5910
|
-
function
|
|
5948
|
+
function Wf(e, t) {
|
|
5911
5949
|
var n = new_buf(5 + e.length);
|
|
5912
5950
|
n.write_shift(2, 14e3), n.write_shift(2, t);
|
|
5913
5951
|
for (var r = 0; r < e.length; ++r) {
|
|
@@ -5916,7 +5954,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
5916
5954
|
}
|
|
5917
5955
|
return n[n.l++] = 0, n;
|
|
5918
5956
|
}
|
|
5919
|
-
var
|
|
5957
|
+
var Gf = {
|
|
5920
5958
|
0: {
|
|
5921
5959
|
n: "BOF",
|
|
5922
5960
|
f: parseuint16
|
|
@@ -6001,14 +6039,14 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
6001
6039
|
105: { n: "MRANGES??" },
|
|
6002
6040
|
204: {
|
|
6003
6041
|
n: "SHEETNAMECS",
|
|
6004
|
-
f:
|
|
6042
|
+
f: N
|
|
6005
6043
|
},
|
|
6006
6044
|
222: {
|
|
6007
6045
|
n: "SHEETNAMELP",
|
|
6008
|
-
f:
|
|
6046
|
+
f: P
|
|
6009
6047
|
},
|
|
6010
6048
|
65535: { n: "" }
|
|
6011
|
-
},
|
|
6049
|
+
}, L = {
|
|
6012
6050
|
0: { n: "BOF" },
|
|
6013
6051
|
1: { n: "EOF" },
|
|
6014
6052
|
2: { n: "PASSWORD" },
|
|
@@ -6041,7 +6079,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
6041
6079
|
},
|
|
6042
6080
|
24: {
|
|
6043
6081
|
n: "NUMBER18",
|
|
6044
|
-
f:
|
|
6082
|
+
f: w
|
|
6045
6083
|
},
|
|
6046
6084
|
25: {
|
|
6047
6085
|
n: "FORMULA19",
|
|
@@ -6050,7 +6088,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
6050
6088
|
26: { n: "FORMULA1A" },
|
|
6051
6089
|
27: {
|
|
6052
6090
|
n: "XFORMAT",
|
|
6053
|
-
f:
|
|
6091
|
+
f: I
|
|
6054
6092
|
},
|
|
6055
6093
|
28: { n: "DTLABELMISC" },
|
|
6056
6094
|
29: { n: "DTLABELCELL" },
|
|
@@ -6062,12 +6100,12 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
6062
6100
|
35: { n: "??" },
|
|
6063
6101
|
37: {
|
|
6064
6102
|
n: "NUMBER25",
|
|
6065
|
-
f:
|
|
6103
|
+
f: k
|
|
6066
6104
|
},
|
|
6067
6105
|
38: { n: "??" },
|
|
6068
6106
|
39: {
|
|
6069
6107
|
n: "NUMBER27",
|
|
6070
|
-
f:
|
|
6108
|
+
f: A
|
|
6071
6109
|
},
|
|
6072
6110
|
40: {
|
|
6073
6111
|
n: "FORMULA28",
|
|
@@ -6096,7 +6134,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
6096
6134
|
201: { n: "??" },
|
|
6097
6135
|
204: {
|
|
6098
6136
|
n: "SHEETNAMECS",
|
|
6099
|
-
f:
|
|
6137
|
+
f: N
|
|
6100
6138
|
},
|
|
6101
6139
|
205: { n: "??" },
|
|
6102
6140
|
206: { n: "??" },
|
|
@@ -6144,7 +6182,7 @@ var DBF = /* @__PURE__ */ (function() {
|
|
|
6144
6182
|
772: { n: "??" },
|
|
6145
6183
|
1537: {
|
|
6146
6184
|
n: "SHEETINFOQP",
|
|
6147
|
-
f:
|
|
6185
|
+
f: F
|
|
6148
6186
|
},
|
|
6149
6187
|
1600: { n: "??" },
|
|
6150
6188
|
1602: { n: "??" },
|
|
@@ -11338,8 +11376,8 @@ function sheet_add_dom(e, t, n) {
|
|
|
11338
11376
|
t: "n",
|
|
11339
11377
|
v: fuzzynum(C)
|
|
11340
11378
|
})), E.z === void 0 && w != null && (E.z = w);
|
|
11341
|
-
var O = "",
|
|
11342
|
-
if (
|
|
11379
|
+
var O = "", k = S.getElementsByTagName("A");
|
|
11380
|
+
if (k && k.length) for (var A = 0; A < k.length && !(k[A].hasAttribute("href") && (O = k[A].getAttribute("href"), O.charAt(0) != "#")); ++A);
|
|
11343
11381
|
O && O.charAt(0) != "#" && (E.l = { Target: O }), r.dense ? (e[h + i] || (e[h + i] = []), e[h + i][_ + a] = E) : e[encode_cell({
|
|
11344
11382
|
c: _ + a,
|
|
11345
11383
|
r: h + i
|
|
@@ -11961,11 +11999,11 @@ function write_numbers_iwa(e, t) {
|
|
|
11961
11999
|
})();
|
|
11962
12000
|
var N = parse_shallow(E[3][0].data), P = N[1][0];
|
|
11963
12001
|
delete N[2];
|
|
11964
|
-
var
|
|
12002
|
+
var Uf = parse_shallow(P.data), F = parse_TSP_Reference(Uf[2][0].data);
|
|
11965
12003
|
(function() {
|
|
11966
|
-
for (var e = CFB.find(l, s[
|
|
12004
|
+
for (var e = CFB.find(l, s[F].location), t = parse_iwa_file(decompress_iwa_file(e.content)), n, i = 0; i < t.length; ++i) {
|
|
11967
12005
|
var c = t[i];
|
|
11968
|
-
c.id ==
|
|
12006
|
+
c.id == F && (n = c);
|
|
11969
12007
|
}
|
|
11970
12008
|
var u = parse_shallow(n.messages[0].data);
|
|
11971
12009
|
delete u[6], delete N[7];
|
|
@@ -11993,9 +12031,9 @@ function write_numbers_iwa(e, t) {
|
|
|
11993
12031
|
}], n.messages[0].data = write_shallow(u);
|
|
11994
12032
|
var h = write_iwa_file(t);
|
|
11995
12033
|
e.content = compress_iwa_file(h), e.size = e.content.length;
|
|
11996
|
-
})(), P.data = write_shallow(
|
|
11997
|
-
var
|
|
11998
|
-
return d.content = compress_iwa_file(
|
|
12034
|
+
})(), P.data = write_shallow(Uf), E[3][0].data = write_shallow(N), _[4][0].data = write_shallow(E), p.messages[0].data = write_shallow(_);
|
|
12035
|
+
var I = write_iwa_file(f);
|
|
12036
|
+
return d.content = compress_iwa_file(I), d.size = d.content.length, l;
|
|
11999
12037
|
}
|
|
12000
12038
|
function fix_opts_func(e) {
|
|
12001
12039
|
return function(t) {
|
|
@@ -12593,7 +12631,7 @@ const exportToExcel = (e, t, n = "table-export") => {
|
|
|
12593
12631
|
utils.book_append_sheet(a, i, "Data"), i["!cols"] = t.map((e) => ({ wch: Math.max(e.label.length, 15) }));
|
|
12594
12632
|
let o = n.endsWith(".xlsx") ? n : `${n}.xlsx`;
|
|
12595
12633
|
writeFileSync(a, o);
|
|
12596
|
-
}, formatCellValue = (e) => e == null ? "" : typeof e == "
|
|
12634
|
+
}, formatCellValue = (e) => e == null ? "" : typeof e == "number" ? e.toLocaleString() : e instanceof Date ? e.toLocaleDateString() : String(e);
|
|
12597
12635
|
var adjustColor = (e, t) => "#" + e.replace(/^#/, "").replace(/../g, (e) => ("0" + Math.min(255, Math.max(0, parseInt(e, 16) + t)).toString(16)).substr(-2)), hexToRgba = (e, t) => {
|
|
12598
12636
|
let n = parseInt(e.slice(1, 3), 16), r = parseInt(e.slice(3, 5), 16), i = parseInt(e.slice(5, 7), 16);
|
|
12599
12637
|
return `rgba(${n}, ${r}, ${i}, ${t})`;
|
|
@@ -12894,61 +12932,6 @@ var Button_default = ({ level: t = "primary", size: n = "medium", type: r = "but
|
|
|
12894
12932
|
]
|
|
12895
12933
|
});
|
|
12896
12934
|
};
|
|
12897
|
-
/*! js-cookie v3.0.5 | MIT */
|
|
12898
|
-
function assign(e) {
|
|
12899
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
12900
|
-
var n = arguments[t];
|
|
12901
|
-
for (var r in n) e[r] = n[r];
|
|
12902
|
-
}
|
|
12903
|
-
return e;
|
|
12904
|
-
}
|
|
12905
|
-
var defaultConverter = {
|
|
12906
|
-
read: function(e) {
|
|
12907
|
-
return e[0] === "\"" && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
12908
|
-
},
|
|
12909
|
-
write: function(e) {
|
|
12910
|
-
return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
|
12911
|
-
}
|
|
12912
|
-
};
|
|
12913
|
-
function init(e, t) {
|
|
12914
|
-
function n(n, r, i) {
|
|
12915
|
-
if (!(typeof document > "u")) {
|
|
12916
|
-
i = assign({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires &&= i.expires.toUTCString(), n = encodeURIComponent(n).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
12917
|
-
var a = "";
|
|
12918
|
-
for (var o in i) i[o] && (a += "; " + o, i[o] !== !0 && (a += "=" + i[o].split(";")[0]));
|
|
12919
|
-
return document.cookie = n + "=" + e.write(r, n) + a;
|
|
12920
|
-
}
|
|
12921
|
-
}
|
|
12922
|
-
function r(t) {
|
|
12923
|
-
if (!(typeof document > "u" || arguments.length && !t)) {
|
|
12924
|
-
for (var n = document.cookie ? document.cookie.split("; ") : [], r = {}, i = 0; i < n.length; i++) {
|
|
12925
|
-
var a = n[i].split("="), o = a.slice(1).join("=");
|
|
12926
|
-
try {
|
|
12927
|
-
var s = decodeURIComponent(a[0]);
|
|
12928
|
-
if (r[s] = e.read(o, s), t === s) break;
|
|
12929
|
-
} catch {}
|
|
12930
|
-
}
|
|
12931
|
-
return t ? r[t] : r;
|
|
12932
|
-
}
|
|
12933
|
-
}
|
|
12934
|
-
return Object.create({
|
|
12935
|
-
set: n,
|
|
12936
|
-
get: r,
|
|
12937
|
-
remove: function(e, t) {
|
|
12938
|
-
n(e, "", assign({}, t, { expires: -1 }));
|
|
12939
|
-
},
|
|
12940
|
-
withAttributes: function(e) {
|
|
12941
|
-
return init(this.converter, assign({}, this.attributes, e));
|
|
12942
|
-
},
|
|
12943
|
-
withConverter: function(e) {
|
|
12944
|
-
return init(assign({}, this.converter, e), this.attributes);
|
|
12945
|
-
}
|
|
12946
|
-
}, {
|
|
12947
|
-
attributes: { value: Object.freeze(t) },
|
|
12948
|
-
converter: { value: Object.freeze(e) }
|
|
12949
|
-
});
|
|
12950
|
-
}
|
|
12951
|
-
var api = init(defaultConverter, { path: "/" }), COOKIE_EXPIRES = 30;
|
|
12952
12935
|
const useAdvancedTable = (e) => {
|
|
12953
12936
|
let { data: i, columns: o, defaultSort: s, defaultFilters: c = {}, defaultPageSize: l = 10, pageSizeOptions: u = [
|
|
12954
12937
|
10,
|
|
@@ -12959,35 +12942,21 @@ const useAdvancedTable = (e) => {
|
|
|
12959
12942
|
300,
|
|
12960
12943
|
400,
|
|
12961
12944
|
500
|
|
12962
|
-
],
|
|
12963
|
-
if (!d) return null;
|
|
12964
|
-
try {
|
|
12965
|
-
let e = api.get(f);
|
|
12966
|
-
return e ? JSON.parse(e) : null;
|
|
12967
|
-
} catch (e) {
|
|
12968
|
-
return console.warn("Error loading table config from cookies:", e), null;
|
|
12969
|
-
}
|
|
12970
|
-
}, [d, f]), h = useCallback((e) => {
|
|
12971
|
-
if (d) try {
|
|
12972
|
-
api.set(f, JSON.stringify(e), { expires: COOKIE_EXPIRES });
|
|
12973
|
-
} catch (e) {
|
|
12974
|
-
console.warn("Error saving table config to cookies:", e);
|
|
12975
|
-
}
|
|
12976
|
-
}, [d, f]), g = m(), [_, v] = useState(g?.sortConfig || s || void 0), [y, b] = useState(g?.filters || c), [x, S] = useState(g?.columnOrder || o.map((e) => e.id)), [C, w] = useState(g?.hiddenColumns || []), [T, E] = useState({
|
|
12945
|
+
], initialConfig: d, onConfigChange: f } = e, [p, m] = useState(d?.sort || s || void 0), [h, g] = useState(d?.filters || c), [_, v] = useState(d?.columnOrder || o.map((e) => e.id)), [y, b] = useState(d?.hiddenColumns || []), [x, S] = useState(d?.pinnedColumns || []), [C, w] = useState({
|
|
12977
12946
|
page: 1,
|
|
12978
|
-
pageSize:
|
|
12947
|
+
pageSize: d?.pagination?.pageSize || l,
|
|
12979
12948
|
total: i.length
|
|
12980
12949
|
});
|
|
12981
12950
|
useEffect(() => {
|
|
12982
12951
|
let e = o.map((e) => e.id);
|
|
12983
|
-
|
|
12952
|
+
v((t) => {
|
|
12984
12953
|
let n = t.filter((t) => e.includes(t)), r = e.filter((e) => !n.includes(e));
|
|
12985
12954
|
return [...n, ...r];
|
|
12986
|
-
}),
|
|
12955
|
+
}), b((t) => t.filter((t) => e.includes(t))), S((t) => t.filter((t) => e.includes(t)));
|
|
12987
12956
|
}, [o]);
|
|
12988
|
-
let
|
|
12957
|
+
let T = useMemo(() => {
|
|
12989
12958
|
let e = [...i];
|
|
12990
|
-
return Object.entries(
|
|
12959
|
+
return Object.entries(h).forEach(([t, n]) => {
|
|
12991
12960
|
let r = o.find((e) => e.id === t);
|
|
12992
12961
|
r && (e = e.filter((e) => {
|
|
12993
12962
|
let t = typeof r.accessor == "function" ? r.accessor(e) : e[r.accessor], i = String(t || "").toLowerCase(), a = !0;
|
|
@@ -12996,12 +12965,12 @@ const useAdvancedTable = (e) => {
|
|
|
12996
12965
|
}), e;
|
|
12997
12966
|
}, [
|
|
12998
12967
|
i,
|
|
12999
|
-
|
|
12968
|
+
h,
|
|
13000
12969
|
o
|
|
13001
|
-
]),
|
|
13002
|
-
if (!
|
|
13003
|
-
let e = o.find((e) => e.id ===
|
|
13004
|
-
return e ? [...
|
|
12970
|
+
]), E = useMemo(() => {
|
|
12971
|
+
if (!p) return T;
|
|
12972
|
+
let e = o.find((e) => e.id === p.column);
|
|
12973
|
+
return e ? [...T].sort((t, n) => {
|
|
13005
12974
|
let r = typeof e.accessor == "function" ? e.accessor(t) : t[e.accessor], i = typeof e.accessor == "function" ? e.accessor(n) : n[e.accessor];
|
|
13006
12975
|
if (r == null) return 1;
|
|
13007
12976
|
if (i == null) return -1;
|
|
@@ -13013,129 +12982,127 @@ const useAdvancedTable = (e) => {
|
|
|
13013
12982
|
let e = String(r).toLowerCase(), t = String(i).toLowerCase();
|
|
13014
12983
|
a = e.localeCompare(t);
|
|
13015
12984
|
}
|
|
13016
|
-
return
|
|
13017
|
-
}) :
|
|
12985
|
+
return p.direction === "desc" ? a * -1 : a;
|
|
12986
|
+
}) : T;
|
|
13018
12987
|
}, [
|
|
13019
|
-
|
|
13020
|
-
|
|
12988
|
+
T,
|
|
12989
|
+
p,
|
|
13021
12990
|
o
|
|
13022
|
-
]),
|
|
13023
|
-
let e = (
|
|
13024
|
-
return
|
|
12991
|
+
]), D = useMemo(() => {
|
|
12992
|
+
let e = (C.page - 1) * C.pageSize, t = e + C.pageSize;
|
|
12993
|
+
return E.slice(e, t);
|
|
13025
12994
|
}, [
|
|
13026
|
-
|
|
13027
|
-
|
|
13028
|
-
|
|
12995
|
+
E,
|
|
12996
|
+
C.page,
|
|
12997
|
+
C.pageSize
|
|
13029
12998
|
]);
|
|
13030
12999
|
useEffect(() => {
|
|
13031
|
-
|
|
13000
|
+
w((e) => ({
|
|
13032
13001
|
...e,
|
|
13033
|
-
total:
|
|
13034
|
-
page: Math.min(e.page, Math.ceil(
|
|
13002
|
+
total: T.length,
|
|
13003
|
+
page: Math.min(e.page, Math.ceil(T.length / e.pageSize) || 1)
|
|
13035
13004
|
}));
|
|
13036
|
-
}, [
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
sort: _,
|
|
13046
|
-
filters: y,
|
|
13047
|
-
pagination: T,
|
|
13048
|
-
columnOrder: x,
|
|
13049
|
-
hiddenColumns: C,
|
|
13050
|
-
columns: o
|
|
13005
|
+
}, [T.length]), useEffect(() => {
|
|
13006
|
+
f?.({
|
|
13007
|
+
columns: o,
|
|
13008
|
+
sort: p,
|
|
13009
|
+
filters: h,
|
|
13010
|
+
pagination: C,
|
|
13011
|
+
columnOrder: _,
|
|
13012
|
+
hiddenColumns: y,
|
|
13013
|
+
pinnedColumns: x
|
|
13051
13014
|
});
|
|
13052
13015
|
}, [
|
|
13016
|
+
p,
|
|
13017
|
+
h,
|
|
13053
13018
|
_,
|
|
13054
13019
|
y,
|
|
13055
13020
|
x,
|
|
13021
|
+
C.pageSize,
|
|
13022
|
+
f,
|
|
13056
13023
|
C,
|
|
13057
|
-
T.pageSize,
|
|
13058
|
-
h,
|
|
13059
|
-
p,
|
|
13060
|
-
T,
|
|
13061
13024
|
o
|
|
13062
13025
|
]);
|
|
13063
|
-
let
|
|
13064
|
-
|
|
13026
|
+
let O = useCallback((e) => {
|
|
13027
|
+
m((t) => t?.column === e ? t.direction === "asc" ? {
|
|
13065
13028
|
column: e,
|
|
13066
13029
|
direction: "desc"
|
|
13067
13030
|
} : void 0 : {
|
|
13068
13031
|
column: e,
|
|
13069
13032
|
direction: "asc"
|
|
13070
13033
|
});
|
|
13071
|
-
}, []),
|
|
13072
|
-
|
|
13034
|
+
}, []), k = useCallback((e, t, n = "text") => {
|
|
13035
|
+
g((r) => ({
|
|
13073
13036
|
...r,
|
|
13074
13037
|
[e]: {
|
|
13075
13038
|
type: n,
|
|
13076
13039
|
value: t,
|
|
13077
13040
|
options: r[e]?.options
|
|
13078
13041
|
}
|
|
13079
|
-
})),
|
|
13042
|
+
})), w((e) => ({
|
|
13080
13043
|
...e,
|
|
13081
13044
|
page: 1
|
|
13082
13045
|
}));
|
|
13083
|
-
}, []),
|
|
13084
|
-
|
|
13046
|
+
}, []), A = useCallback((e) => {
|
|
13047
|
+
g((t) => {
|
|
13085
13048
|
let n = { ...t };
|
|
13086
13049
|
return delete n[e], n;
|
|
13087
13050
|
});
|
|
13088
|
-
}, []),
|
|
13089
|
-
|
|
13090
|
-
}, []),
|
|
13091
|
-
|
|
13051
|
+
}, []), j = useCallback(() => {
|
|
13052
|
+
g({});
|
|
13053
|
+
}, []), M = useCallback((e) => {
|
|
13054
|
+
w((t) => ({
|
|
13092
13055
|
...t,
|
|
13093
13056
|
page: e
|
|
13094
13057
|
}));
|
|
13095
|
-
}, []),
|
|
13096
|
-
|
|
13058
|
+
}, []), N = useCallback((e) => {
|
|
13059
|
+
w((t) => ({
|
|
13097
13060
|
...t,
|
|
13098
13061
|
pageSize: e,
|
|
13099
13062
|
page: 1
|
|
13100
13063
|
}));
|
|
13101
|
-
}, []),
|
|
13102
|
-
|
|
13103
|
-
}, []),
|
|
13104
|
-
|
|
13105
|
-
}, []),
|
|
13106
|
-
|
|
13107
|
-
|
|
13064
|
+
}, []), P = useCallback((e) => {
|
|
13065
|
+
v(e);
|
|
13066
|
+
}, []), Uf = useCallback((e) => {
|
|
13067
|
+
b((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
13068
|
+
}, []), F = useCallback((e) => {
|
|
13069
|
+
S((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
13070
|
+
}, []), I = useMemo(() => {
|
|
13071
|
+
let e = new Map(o.map((e) => [e.id, e])), t = _.map((t) => e.get(t)).filter(Boolean), n = new Set(t.map((e) => e.id)), r = o.filter((e) => !n.has(e.id));
|
|
13072
|
+
return [...t, ...r].filter((e) => !y.includes(e.id));
|
|
13108
13073
|
}, [
|
|
13109
|
-
|
|
13074
|
+
_,
|
|
13110
13075
|
o,
|
|
13111
|
-
|
|
13076
|
+
y
|
|
13112
13077
|
]);
|
|
13113
13078
|
return {
|
|
13114
13079
|
state: {
|
|
13115
13080
|
data: i,
|
|
13116
|
-
filteredData:
|
|
13117
|
-
paginatedData:
|
|
13118
|
-
sortConfig:
|
|
13119
|
-
filters:
|
|
13120
|
-
pagination:
|
|
13121
|
-
columnOrder:
|
|
13122
|
-
hiddenColumns:
|
|
13081
|
+
filteredData: T,
|
|
13082
|
+
paginatedData: D,
|
|
13083
|
+
sortConfig: p,
|
|
13084
|
+
filters: h,
|
|
13085
|
+
pagination: C,
|
|
13086
|
+
columnOrder: _,
|
|
13087
|
+
hiddenColumns: y,
|
|
13088
|
+
pinnedColumns: x,
|
|
13123
13089
|
loading: !1
|
|
13124
13090
|
},
|
|
13125
|
-
orderedColumns:
|
|
13091
|
+
orderedColumns: I,
|
|
13126
13092
|
pageSizeOptions: u,
|
|
13127
|
-
handleSort:
|
|
13128
|
-
handleFilter:
|
|
13129
|
-
clearFilter:
|
|
13130
|
-
clearAllFilters:
|
|
13131
|
-
handlePageChange:
|
|
13132
|
-
handlePageSizeChange:
|
|
13133
|
-
handleColumnReorder:
|
|
13134
|
-
handleToggleColumn:
|
|
13093
|
+
handleSort: O,
|
|
13094
|
+
handleFilter: k,
|
|
13095
|
+
clearFilter: A,
|
|
13096
|
+
clearAllFilters: j,
|
|
13097
|
+
handlePageChange: M,
|
|
13098
|
+
handlePageSizeChange: N,
|
|
13099
|
+
handleColumnReorder: P,
|
|
13100
|
+
handleToggleColumn: Uf,
|
|
13101
|
+
handleTogglePin: F,
|
|
13135
13102
|
allColumns: o
|
|
13136
13103
|
};
|
|
13137
13104
|
};
|
|
13138
|
-
var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilters: d = {}, defaultPageSize:
|
|
13105
|
+
var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilters: d = {}, defaultPageSize: v = 10, pageSizeOptions: y = [
|
|
13139
13106
|
10,
|
|
13140
13107
|
25,
|
|
13141
13108
|
50,
|
|
@@ -13144,7 +13111,7 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13144
13111
|
300,
|
|
13145
13112
|
400,
|
|
13146
13113
|
500
|
|
13147
|
-
], enableSorting:
|
|
13114
|
+
], enableSorting: b = !0, enableFiltering: x = !0, enablePagination: S = !0, enableExport: C = !0, initialConfig: w, onConfigChange: T, className: E = "", labels: D = {
|
|
13148
13115
|
configuration: "Configuración",
|
|
13149
13116
|
columnVisibility: "Columnas visibles",
|
|
13150
13117
|
pagination: {
|
|
@@ -13155,26 +13122,27 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13155
13122
|
showPerPage: "Mostrar",
|
|
13156
13123
|
perPageItems: "elementos"
|
|
13157
13124
|
},
|
|
13158
|
-
clearAllFilters: "Limpiar todos los filtros"
|
|
13159
|
-
|
|
13160
|
-
|
|
13125
|
+
clearAllFilters: "Limpiar todos los filtros",
|
|
13126
|
+
noData: "No hay datos disponibles"
|
|
13127
|
+
}, enableColumnReordering: O = !0, enableColumnPinning: k = !1, renderActions: A, actionsColumnLabel: j, loading: M = !1 }) => {
|
|
13128
|
+
let [N, P] = useState(null), [Uf, F] = useState(null), [I, Wf] = useState(!1), [Gf, Kf] = useState(null), L = useRef(null), [R, z] = useState(t), { state: qf, orderedColumns: Jf, handleSort: Yf, handleFilter: Xf, clearAllFilters: Zf, handlePageChange: B, handlePageSizeChange: Qf, handleColumnReorder: V, handleToggleColumn: $f, handleTogglePin: ep } = useAdvancedTable({
|
|
13161
13129
|
data: e,
|
|
13162
13130
|
columns: R,
|
|
13163
13131
|
defaultSort: o,
|
|
13164
13132
|
defaultFilters: d,
|
|
13165
|
-
defaultPageSize:
|
|
13166
|
-
pageSizeOptions:
|
|
13167
|
-
|
|
13168
|
-
|
|
13169
|
-
}), { paginatedData:
|
|
13133
|
+
defaultPageSize: v,
|
|
13134
|
+
pageSizeOptions: y,
|
|
13135
|
+
initialConfig: w,
|
|
13136
|
+
onConfigChange: T
|
|
13137
|
+
}), { paginatedData: H, sortConfig: U, filters: W, pagination: G, hiddenColumns: tp, pinnedColumns: K } = qf;
|
|
13170
13138
|
useEffect(() => z(t), [t]);
|
|
13171
|
-
let
|
|
13172
|
-
let e = [...
|
|
13173
|
-
return
|
|
13139
|
+
let q = useMemo(() => {
|
|
13140
|
+
let e = [...Jf], t = e.filter((e) => e.isAction), n = [...e.filter((e) => !e.isAction), ...t];
|
|
13141
|
+
return A && n.push({
|
|
13174
13142
|
id: "actions-synthetic",
|
|
13175
|
-
label:
|
|
13143
|
+
label: j || "",
|
|
13176
13144
|
accessor: (e) => e,
|
|
13177
|
-
render: ({ row: e, column: t, index: n }) =>
|
|
13145
|
+
render: ({ row: e, column: t, index: n }) => A({
|
|
13178
13146
|
row: e,
|
|
13179
13147
|
index: n,
|
|
13180
13148
|
column: t
|
|
@@ -13186,32 +13154,33 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13186
13154
|
draggable: !1
|
|
13187
13155
|
}), n;
|
|
13188
13156
|
}, [
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
]),
|
|
13193
|
-
|
|
13194
|
-
}, tp = (e, t) => {
|
|
13195
|
-
e.preventDefault(), e.dataTransfer.dropEffect = "move", N(t);
|
|
13196
|
-
}, np = () => {
|
|
13197
|
-
N(null);
|
|
13157
|
+
Jf,
|
|
13158
|
+
A,
|
|
13159
|
+
j
|
|
13160
|
+
]), np = (e, t) => {
|
|
13161
|
+
P(t), e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/html", "");
|
|
13198
13162
|
}, rp = (e, t) => {
|
|
13199
|
-
|
|
13200
|
-
if (A !== t) {
|
|
13201
|
-
let e = [...B.columnOrder], [n] = e.splice(A, 1);
|
|
13202
|
-
e.splice(t, 0, n), Qf(e);
|
|
13203
|
-
}
|
|
13204
|
-
j(null), N(null);
|
|
13205
|
-
}
|
|
13163
|
+
e.preventDefault(), e.dataTransfer.dropEffect = "move", F(t);
|
|
13206
13164
|
}, ip = () => {
|
|
13207
|
-
|
|
13208
|
-
}, ap = () => {
|
|
13209
|
-
if (
|
|
13210
|
-
let
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13165
|
+
F(null);
|
|
13166
|
+
}, ap = (e, t) => {
|
|
13167
|
+
if (e.preventDefault(), N === null) return;
|
|
13168
|
+
let n = q[N].id, r = q[t].id;
|
|
13169
|
+
if (n === r) {
|
|
13170
|
+
P(null), F(null);
|
|
13171
|
+
return;
|
|
13172
|
+
}
|
|
13173
|
+
let i = e.currentTarget.getBoundingClientRect(), a = e.clientX - i.left > i.width / 2, o = [...qf.columnOrder], s = o.indexOf(n), c = o.indexOf(r);
|
|
13174
|
+
s === -1 || c === -1 || (o.splice(s, 1), c = o.indexOf(r), a ? o.splice(c + 1, 0, n) : o.splice(c, 0, n), V(o), P(null), F(null));
|
|
13175
|
+
}, op = () => {
|
|
13176
|
+
P(null), F(null);
|
|
13177
|
+
}, J = () => {
|
|
13178
|
+
if (!C) return;
|
|
13179
|
+
let e = q.filter((e) => !e.isAction);
|
|
13180
|
+
exportToExcel(qf.filteredData, e, "table-data.xlsx");
|
|
13181
|
+
}, sp = (e) => {
|
|
13182
|
+
Kf(Gf === e ? null : e);
|
|
13183
|
+
}, cp = (t) => {
|
|
13215
13184
|
let n = R.find((e) => e.id === t);
|
|
13216
13185
|
if (!n) return [];
|
|
13217
13186
|
let r = /* @__PURE__ */ new Map();
|
|
@@ -13223,18 +13192,18 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13223
13192
|
count: t,
|
|
13224
13193
|
label: `${e} (${t})`
|
|
13225
13194
|
})).sort((e, t) => e.value.localeCompare(t.value));
|
|
13226
|
-
},
|
|
13195
|
+
}, Y = Object.values(W).some((e) => e.type === "text" && e.value || e.type === "select" && e.value || e.type === "multiselect" && Array.isArray(e.value) && e.value.length > 0);
|
|
13227
13196
|
useEffect(() => {
|
|
13228
13197
|
let e = (e) => {
|
|
13229
|
-
|
|
13198
|
+
L.current && !L.current.contains(e.target) && Wf(!1);
|
|
13230
13199
|
};
|
|
13231
|
-
return
|
|
13200
|
+
return I && document.addEventListener("mousedown", e), () => {
|
|
13232
13201
|
document.removeEventListener("mousedown", e);
|
|
13233
13202
|
};
|
|
13234
|
-
}, [
|
|
13235
|
-
let
|
|
13203
|
+
}, [I]);
|
|
13204
|
+
let X = Math.ceil(G.total / G.pageSize), Z = (e) => e.width ? e.width : e.isAction ? 100 : 150 + (e.filterable ? 50 : 0);
|
|
13236
13205
|
return /* @__PURE__ */ jsxs("div", {
|
|
13237
|
-
className: `w-full bg-redi-background border border-solid border-gray-500 rounded-xl overflow-hidden font-family-base shadow ${
|
|
13206
|
+
className: `w-full bg-redi-background border border-solid border-gray-500 rounded-xl overflow-hidden font-family-base shadow ${E}`,
|
|
13238
13207
|
children: [
|
|
13239
13208
|
/* @__PURE__ */ jsxs("div", {
|
|
13240
13209
|
className: "flex items-center justify-between p-4 bg-transparent border-b border-solid border-gray-400",
|
|
@@ -13244,23 +13213,23 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13244
13213
|
className: "relative",
|
|
13245
13214
|
children: [/* @__PURE__ */ jsxs(Button_default, {
|
|
13246
13215
|
level: "secondary",
|
|
13247
|
-
onClick: () =>
|
|
13216
|
+
onClick: () => Wf(!I),
|
|
13248
13217
|
children: [/* @__PURE__ */ jsx(EyeIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
13249
13218
|
className: "hidden md:block",
|
|
13250
|
-
children:
|
|
13219
|
+
children: D.configuration
|
|
13251
13220
|
})]
|
|
13252
|
-
}),
|
|
13221
|
+
}), I && /* @__PURE__ */ jsx("div", {
|
|
13253
13222
|
className: "absolute top-full left-0 bg-white border border-solid border-gray-300 rounded-md shadow-lg z-1000 mt-2 min-w-2xs max-w-xs opacity-100 visible p-4",
|
|
13254
|
-
ref:
|
|
13223
|
+
ref: L,
|
|
13255
13224
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13256
13225
|
className: "mb-4 last:mb-0",
|
|
13257
13226
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13258
13227
|
className: "text-sm font-semibold text-redi-text mb-2 uppercase",
|
|
13259
|
-
children:
|
|
13228
|
+
children: D.columnVisibility
|
|
13260
13229
|
}), /* @__PURE__ */ jsx("div", {
|
|
13261
13230
|
className: "flex flex-col gap-2",
|
|
13262
13231
|
children: R.filter((e) => !e.isAction).map((e) => {
|
|
13263
|
-
let t = !
|
|
13232
|
+
let t = !tp.includes(e.id);
|
|
13264
13233
|
return /* @__PURE__ */ jsxs("div", {
|
|
13265
13234
|
className: "flex items-center justify-between gap-2 hover:bg-gray-50 p-1 rounded",
|
|
13266
13235
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -13278,60 +13247,78 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13278
13247
|
})]
|
|
13279
13248
|
}), t && /* @__PURE__ */ jsxs("div", {
|
|
13280
13249
|
className: "flex items-center gap-1",
|
|
13281
|
-
children: [
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
t
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
|
|
13290
|
-
|
|
13291
|
-
|
|
13292
|
-
|
|
13293
|
-
|
|
13294
|
-
|
|
13295
|
-
|
|
13296
|
-
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
-
|
|
13301
|
-
|
|
13302
|
-
|
|
13303
|
-
|
|
13304
|
-
|
|
13305
|
-
|
|
13306
|
-
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
|
|
13313
|
-
|
|
13314
|
-
|
|
13315
|
-
|
|
13250
|
+
children: [
|
|
13251
|
+
k && /* @__PURE__ */ jsx(Button_default, {
|
|
13252
|
+
level: "icon",
|
|
13253
|
+
onClick: (t) => {
|
|
13254
|
+
t.stopPropagation(), ep(e.id);
|
|
13255
|
+
},
|
|
13256
|
+
"aria-label": K.includes(e.id) ? "Unpin column" : "Pin column",
|
|
13257
|
+
className: "p-1 hover:bg-gray-200 rounded-full",
|
|
13258
|
+
children: K.includes(e.id) ? /* @__PURE__ */ jsx(PinIcon, {
|
|
13259
|
+
size: 14,
|
|
13260
|
+
className: "text-redi-primary"
|
|
13261
|
+
}) : /* @__PURE__ */ jsx(PinOffIcon, {
|
|
13262
|
+
size: 14,
|
|
13263
|
+
className: "text-gray-400"
|
|
13264
|
+
})
|
|
13265
|
+
}),
|
|
13266
|
+
/* @__PURE__ */ jsx(Button_default, {
|
|
13267
|
+
level: "icon",
|
|
13268
|
+
onClick: (t) => {
|
|
13269
|
+
t.stopPropagation();
|
|
13270
|
+
let n = R.map((t) => t.id === e.id ? {
|
|
13271
|
+
...t,
|
|
13272
|
+
draggable: !t.draggable
|
|
13273
|
+
} : t);
|
|
13274
|
+
z(n);
|
|
13275
|
+
},
|
|
13276
|
+
"aria-label": e.draggable ? "Disable drag" : "Enable drag",
|
|
13277
|
+
className: "p-1 hover:bg-gray-200 rounded-full",
|
|
13278
|
+
children: /* @__PURE__ */ jsx(DragToggleIcon, {
|
|
13279
|
+
active: !!e.draggable,
|
|
13280
|
+
size: 14,
|
|
13281
|
+
label: "Draggable"
|
|
13282
|
+
})
|
|
13283
|
+
}),
|
|
13284
|
+
/* @__PURE__ */ jsx(Button_default, {
|
|
13285
|
+
level: "icon",
|
|
13286
|
+
onClick: (t) => {
|
|
13287
|
+
t.stopPropagation();
|
|
13288
|
+
let n = R.map((t) => t.id === e.id ? {
|
|
13289
|
+
...t,
|
|
13290
|
+
filterable: !t.filterable
|
|
13291
|
+
} : t);
|
|
13292
|
+
z(n);
|
|
13293
|
+
},
|
|
13294
|
+
"aria-label": e.filterable ? "Disable filter" : "Enable filter",
|
|
13295
|
+
className: "p-1 hover:bg-gray-200 rounded-full",
|
|
13296
|
+
children: e.filterable ? /* @__PURE__ */ jsx(FilterIcon, {
|
|
13297
|
+
size: 14,
|
|
13298
|
+
color: "#fa8c16"
|
|
13299
|
+
}) : /* @__PURE__ */ jsx(FilterOffIcon, {
|
|
13300
|
+
size: 14,
|
|
13301
|
+
color: "#9ca3af"
|
|
13302
|
+
})
|
|
13316
13303
|
})
|
|
13317
|
-
|
|
13304
|
+
]
|
|
13318
13305
|
})]
|
|
13319
13306
|
}, e.id);
|
|
13320
13307
|
})
|
|
13321
13308
|
})]
|
|
13322
13309
|
})
|
|
13323
13310
|
})]
|
|
13324
|
-
}),
|
|
13311
|
+
}), x && Y && /* @__PURE__ */ jsx(Button_default, {
|
|
13325
13312
|
level: "icon",
|
|
13326
|
-
onClick:
|
|
13327
|
-
label:
|
|
13313
|
+
onClick: Zf,
|
|
13314
|
+
label: D.clearAllFilters,
|
|
13328
13315
|
children: /* @__PURE__ */ jsx(CloseIcon, { color: "white" })
|
|
13329
13316
|
})]
|
|
13330
13317
|
}), /* @__PURE__ */ jsx("div", {
|
|
13331
13318
|
className: "flex items-center gap-2",
|
|
13332
|
-
children:
|
|
13319
|
+
children: C && /* @__PURE__ */ jsx(Button_default, {
|
|
13333
13320
|
level: "secondary",
|
|
13334
|
-
onClick:
|
|
13321
|
+
onClick: J,
|
|
13335
13322
|
children: /* @__PURE__ */ jsx(DownloadIcon, { size: 18 })
|
|
13336
13323
|
})
|
|
13337
13324
|
})]
|
|
@@ -13341,47 +13328,56 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13341
13328
|
children: /* @__PURE__ */ jsxs("table", {
|
|
13342
13329
|
className: "w-full border-separate border-spacing-0 table-auto text-sm relative",
|
|
13343
13330
|
"aria-label": "Data Table",
|
|
13344
|
-
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children:
|
|
13345
|
-
let n =
|
|
13331
|
+
children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: q.map((e, t) => {
|
|
13332
|
+
let n = Z(e), r = K.includes(e.id), i = 0;
|
|
13333
|
+
if (r) for (let e = 0; e < t; e++) K.includes(q[e].id) && (i += Z(q[e]));
|
|
13334
|
+
let a = {
|
|
13335
|
+
width: n,
|
|
13336
|
+
minWidth: n,
|
|
13337
|
+
maxWidth: n,
|
|
13338
|
+
...r ? {
|
|
13339
|
+
position: "sticky",
|
|
13340
|
+
left: i,
|
|
13341
|
+
zIndex: 20,
|
|
13342
|
+
backgroundColor: "#f9fafb"
|
|
13343
|
+
} : {}
|
|
13344
|
+
};
|
|
13346
13345
|
return /* @__PURE__ */ jsx("th", {
|
|
13347
|
-
className: `bg-gray-50 border-b border-solid border-gray-200 text-left font-semibold text-redi-text p-0 sticky top-0 z-10 select-none hover:bg-gray-200
|
|
13348
|
-
${
|
|
13349
|
-
${
|
|
13350
|
-
${
|
|
13346
|
+
className: `bg-gray-50 border-b border-solid border-gray-200 text-left font-semibold text-redi-text p-0 sticky top-0 z-10 select-none hover:bg-gray-200
|
|
13347
|
+
${N === t ? "opacity-50 bg-gray-300" : ""}
|
|
13348
|
+
${Uf === t ? "bg-redi-primary-bg border-l border-solid border-redi-primary" : ""}
|
|
13349
|
+
${Uf === t ? "bg-redi-primary-bg border-l border-solid border-redi-primary" : ""}
|
|
13350
|
+
${r ? "shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)]" : ""}
|
|
13351
13351
|
`,
|
|
13352
|
-
style:
|
|
13353
|
-
|
|
13354
|
-
|
|
13355
|
-
|
|
13356
|
-
|
|
13357
|
-
|
|
13358
|
-
|
|
13359
|
-
|
|
13360
|
-
onDragLeave: np,
|
|
13361
|
-
onDrop: (n) => !e.isAction && E && rp(n, t),
|
|
13362
|
-
onDragEnd: ip,
|
|
13363
|
-
"aria-sort": H?.column === e.id ? H.direction === "asc" ? "ascending" : "descending" : "none",
|
|
13352
|
+
style: a,
|
|
13353
|
+
draggable: !e.isAction && O && (e.draggable ?? !1),
|
|
13354
|
+
onDragStart: (n) => !e.isAction && O && (e.draggable ?? !1) && np(n, t),
|
|
13355
|
+
onDragOver: (n) => !e.isAction && O && rp(n, t),
|
|
13356
|
+
onDragLeave: ip,
|
|
13357
|
+
onDrop: (n) => !e.isAction && O && ap(n, t),
|
|
13358
|
+
onDragEnd: op,
|
|
13359
|
+
"aria-sort": U?.column === e.id ? U.direction === "asc" ? "ascending" : "descending" : "none",
|
|
13364
13360
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13365
13361
|
className: "flex items-center py-3 px-4 gap-2 min-h-12",
|
|
13366
|
-
children: [!e.isAction &&
|
|
13362
|
+
children: [!e.isAction && O && (e.draggable ?? !1) && /* @__PURE__ */ jsx("div", {
|
|
13367
13363
|
className: "text-gray-600 cursor-grab opacity-70 hover:opacity-100 text-base",
|
|
13368
13364
|
"aria-hidden": "true",
|
|
13369
13365
|
children: "⋮⋮"
|
|
13370
13366
|
}), /* @__PURE__ */ jsxs("div", {
|
|
13371
13367
|
className: "flex flex-1 items-center gap-2",
|
|
13372
13368
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
13373
|
-
className:
|
|
13369
|
+
className: b ? "cursor-pointer py-1 px-1.5 rounded-sm flex items-center gap-1.5 text-sm font-semibold text-redi-text uppercase hover:bg-redi-background hover:text-redi-link-text" : "",
|
|
13374
13370
|
onClick: (t) => {
|
|
13375
|
-
t.stopPropagation(), e.sortable &&
|
|
13371
|
+
t.stopPropagation(), e.sortable && Yf(e.id);
|
|
13376
13372
|
},
|
|
13377
13373
|
role: "button",
|
|
13378
13374
|
tabIndex: 0,
|
|
13379
13375
|
onKeyDown: (t) => {
|
|
13380
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.sortable &&
|
|
13376
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.sortable && Yf(e.id));
|
|
13381
13377
|
},
|
|
13382
|
-
children: [e.label, e.sortable &&
|
|
13378
|
+
children: [e.label, e.sortable && U?.column === e.id && /* @__PURE__ */ jsx("span", {
|
|
13383
13379
|
className: "font-bold text-redi-link-text text-base",
|
|
13384
|
-
children:
|
|
13380
|
+
children: U.direction === "asc" ? " ↑" : " ↓"
|
|
13385
13381
|
})]
|
|
13386
13382
|
}), /* @__PURE__ */ jsx("div", {
|
|
13387
13383
|
className: "flex items-center gap-1",
|
|
@@ -13390,52 +13386,70 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13390
13386
|
children: [/* @__PURE__ */ jsx(Button_default, {
|
|
13391
13387
|
level: "icon",
|
|
13392
13388
|
onClick: (t) => {
|
|
13393
|
-
t.stopPropagation(),
|
|
13389
|
+
t.stopPropagation(), sp(e.id);
|
|
13394
13390
|
},
|
|
13395
13391
|
"aria-label": `Filter by ${e.label}`,
|
|
13396
13392
|
children: /* @__PURE__ */ jsx(FilterIcon, { size: 16 })
|
|
13397
|
-
}),
|
|
13393
|
+
}), Gf === e.id && /* @__PURE__ */ jsx(AdvancedFilter_default, {
|
|
13398
13394
|
columnId: e.id,
|
|
13399
13395
|
label: e.label,
|
|
13400
|
-
options:
|
|
13401
|
-
textValue:
|
|
13402
|
-
selectedValues:
|
|
13403
|
-
onTextChange: (t) =>
|
|
13404
|
-
onSelectionChange: (t) =>
|
|
13405
|
-
onClose: () =>
|
|
13396
|
+
options: cp(e.id),
|
|
13397
|
+
textValue: W[e.id]?.type === "text" ? String(W[e.id].value || "") : "",
|
|
13398
|
+
selectedValues: W[e.id]?.type === "multiselect" && Array.isArray(W[e.id]?.value) ? W[e.id].value : [],
|
|
13399
|
+
onTextChange: (t) => Xf(e.id, t, "text"),
|
|
13400
|
+
onSelectionChange: (t) => Xf(e.id, t, "multiselect"),
|
|
13401
|
+
onClose: () => Kf(null)
|
|
13406
13402
|
})]
|
|
13407
13403
|
})
|
|
13408
13404
|
})]
|
|
13409
13405
|
})]
|
|
13410
13406
|
})
|
|
13411
13407
|
}, e.id);
|
|
13412
|
-
}) }) }), /* @__PURE__ */ jsx("tbody", { children:
|
|
13408
|
+
}) }) }), /* @__PURE__ */ jsx("tbody", { children: M ? Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ jsx("tr", {
|
|
13413
13409
|
className: "border-b border-solid border-gray-100",
|
|
13414
|
-
children:
|
|
13415
|
-
let n =
|
|
13410
|
+
children: q.map((e, t) => {
|
|
13411
|
+
let n = Z(e), r = K.includes(e.id), i = 0;
|
|
13412
|
+
if (r) for (let e = 0; e < t; e++) K.includes(q[e].id) && (i += Z(q[e]));
|
|
13413
|
+
let a = {
|
|
13416
13414
|
width: n,
|
|
13417
13415
|
minWidth: n,
|
|
13418
|
-
maxWidth: n
|
|
13416
|
+
maxWidth: n,
|
|
13417
|
+
...r ? {
|
|
13418
|
+
position: "sticky",
|
|
13419
|
+
left: i,
|
|
13420
|
+
zIndex: 10,
|
|
13421
|
+
backgroundColor: "white"
|
|
13422
|
+
} : {}
|
|
13419
13423
|
};
|
|
13420
13424
|
return /* @__PURE__ */ jsx("td", {
|
|
13421
|
-
className: `py-4 px-4 ${e.isAction ? "bg-white border-l border-gray-200" : ""}`,
|
|
13422
|
-
style:
|
|
13425
|
+
className: `py-4 px-4 ${e.isAction ? "bg-white border-l border-gray-200" : ""} ${r ? "shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)]" : ""}`,
|
|
13426
|
+
style: a,
|
|
13423
13427
|
children: /* @__PURE__ */ jsx("div", { className: "h-4 bg-gray-200 rounded animate-pulse w-3/4" })
|
|
13424
13428
|
}, `skeleton-cell-${t}`);
|
|
13425
13429
|
})
|
|
13426
|
-
}, `skeleton-${t}`)) :
|
|
13430
|
+
}, `skeleton-${t}`)) : H.length > 0 ? H.map((e, t) => /* @__PURE__ */ jsx("tr", {
|
|
13427
13431
|
className: "even:bg-gray-50 hover:bg-gray-100 border-b border-solid border-b-gray-100 odd:bg-white",
|
|
13428
|
-
children:
|
|
13429
|
-
let i = typeof n.accessor == "function" ? n.accessor(e) : e[n.accessor], a = n.isAction, o =
|
|
13432
|
+
children: q.map((n, r) => {
|
|
13433
|
+
let i = typeof n.accessor == "function" ? n.accessor(e) : e[n.accessor], a = n.isAction, o = Z(n), c = K.includes(n.id), l = 0;
|
|
13434
|
+
if (c) for (let e = 0; e < r; e++) K.includes(q[e].id) && (l += Z(q[e]));
|
|
13435
|
+
let u = `py-3 px-4 text-redi-text font-normal leading-6 align-middle border-r border-solid border-r-gray-300 static table-cell last:border-r-0 first:font-medium
|
|
13430
13436
|
${a ? "border-l border-gray-300 shadow-[-2px_0_5px_-2px_rgba(0,0,0,0.05)]" : ""}
|
|
13431
|
-
|
|
13437
|
+
${c ? "shadow-[2px_0_5px_-2px_rgba(0,0,0,0.1)]" : ""}
|
|
13438
|
+
`, d = {
|
|
13432
13439
|
width: o,
|
|
13433
13440
|
minWidth: o,
|
|
13434
|
-
maxWidth: o
|
|
13441
|
+
maxWidth: o,
|
|
13442
|
+
overflowWrap: "break-word",
|
|
13443
|
+
...c ? {
|
|
13444
|
+
position: "sticky",
|
|
13445
|
+
left: l,
|
|
13446
|
+
zIndex: 10,
|
|
13447
|
+
backgroundColor: "inherit"
|
|
13448
|
+
} : {}
|
|
13435
13449
|
};
|
|
13436
13450
|
return n.render ? /* @__PURE__ */ jsx("td", {
|
|
13437
|
-
className:
|
|
13438
|
-
style:
|
|
13451
|
+
className: u,
|
|
13452
|
+
style: d,
|
|
13439
13453
|
children: n.render({
|
|
13440
13454
|
value: i,
|
|
13441
13455
|
row: e,
|
|
@@ -13443,13 +13457,13 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13443
13457
|
index: t
|
|
13444
13458
|
})
|
|
13445
13459
|
}, n.id) : /* @__PURE__ */ jsx("td", {
|
|
13446
|
-
className:
|
|
13447
|
-
style:
|
|
13460
|
+
className: u,
|
|
13461
|
+
style: d,
|
|
13448
13462
|
children: formatCellValue(i)
|
|
13449
13463
|
}, n.id);
|
|
13450
13464
|
})
|
|
13451
13465
|
}, t)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
|
|
13452
|
-
colSpan:
|
|
13466
|
+
colSpan: q.length,
|
|
13453
13467
|
className: "py-12 text-center text-gray-500",
|
|
13454
13468
|
children: /* @__PURE__ */ jsxs("div", {
|
|
13455
13469
|
className: "flex flex-col items-center justify-center gap-2",
|
|
@@ -13466,81 +13480,81 @@ var AdvancedTable_default = ({ data: e, columns: t, defaultSort: o, defaultFilte
|
|
|
13466
13480
|
})
|
|
13467
13481
|
}), /* @__PURE__ */ jsx("span", {
|
|
13468
13482
|
className: "text-sm font-medium",
|
|
13469
|
-
children:
|
|
13483
|
+
children: D.noData
|
|
13470
13484
|
})]
|
|
13471
13485
|
})
|
|
13472
13486
|
}) }) })]
|
|
13473
13487
|
})
|
|
13474
13488
|
}),
|
|
13475
|
-
|
|
13489
|
+
S && /* @__PURE__ */ jsxs("div", {
|
|
13476
13490
|
className: "flex items-center justify-between py-4 px-6 bg-white border-t-gray-300 border-solid border-t gap-4",
|
|
13477
13491
|
children: [/* @__PURE__ */ jsx("div", {
|
|
13478
13492
|
className: "text-redi-text text-base font-medium shrink-0",
|
|
13479
13493
|
children: /* @__PURE__ */ jsxs("span", { children: [
|
|
13480
|
-
|
|
13494
|
+
D.pagination?.showingItems,
|
|
13481
13495
|
" ",
|
|
13482
|
-
(
|
|
13496
|
+
(G.page - 1) * G.pageSize + 1,
|
|
13483
13497
|
" ",
|
|
13484
|
-
|
|
13498
|
+
D.pagination?.to,
|
|
13485
13499
|
" ",
|
|
13486
|
-
Math.min(
|
|
13500
|
+
Math.min(G.page * G.pageSize, G.total),
|
|
13487
13501
|
" ",
|
|
13488
|
-
|
|
13502
|
+
D.pagination?.of,
|
|
13489
13503
|
" ",
|
|
13490
|
-
|
|
13504
|
+
G.total,
|
|
13491
13505
|
" ",
|
|
13492
|
-
|
|
13506
|
+
D.pagination?.items
|
|
13493
13507
|
] })
|
|
13494
13508
|
}), /* @__PURE__ */ jsxs("div", {
|
|
13495
13509
|
className: "flex items-center gap-5",
|
|
13496
13510
|
children: [/* @__PURE__ */ jsxs("label", {
|
|
13497
13511
|
className: "flex items-center gap-3 text-sm font-semibold text-redi-text",
|
|
13498
13512
|
children: [
|
|
13499
|
-
|
|
13513
|
+
D.pagination?.showPerPage,
|
|
13500
13514
|
/* @__PURE__ */ jsx("select", {
|
|
13501
|
-
value:
|
|
13502
|
-
onChange: (e) =>
|
|
13515
|
+
value: G.pageSize,
|
|
13516
|
+
onChange: (e) => Qf(Number(e.target.value)),
|
|
13503
13517
|
className: "py-1.5 px-2.5 border border-solid border-gray-300 rounded-md bg-white text-redi-text focus:outline-none focus:ring-2 focus:ring-redi-primary",
|
|
13504
|
-
children:
|
|
13518
|
+
children: y.map((e) => /* @__PURE__ */ jsx("option", {
|
|
13505
13519
|
value: e,
|
|
13506
13520
|
children: e
|
|
13507
13521
|
}, e))
|
|
13508
13522
|
}),
|
|
13509
|
-
|
|
13523
|
+
D.pagination?.perPageItems
|
|
13510
13524
|
]
|
|
13511
13525
|
}), /* @__PURE__ */ jsxs("div", {
|
|
13512
13526
|
className: "flex gap-1 items-center",
|
|
13513
13527
|
children: [
|
|
13514
13528
|
/* @__PURE__ */ jsx(Button_default, {
|
|
13515
13529
|
level: "icon",
|
|
13516
|
-
onClick: () =>
|
|
13517
|
-
disabled:
|
|
13530
|
+
onClick: () => B(1),
|
|
13531
|
+
disabled: G.page === 1,
|
|
13518
13532
|
children: "<<"
|
|
13519
13533
|
}),
|
|
13520
13534
|
/* @__PURE__ */ jsx(Button_default, {
|
|
13521
13535
|
level: "icon",
|
|
13522
|
-
onClick: () =>
|
|
13523
|
-
disabled:
|
|
13536
|
+
onClick: () => B(G.page - 1),
|
|
13537
|
+
disabled: G.page === 1,
|
|
13524
13538
|
children: "<"
|
|
13525
13539
|
}),
|
|
13526
|
-
Array.from({ length: Math.min(3,
|
|
13540
|
+
Array.from({ length: Math.min(3, X) }, (e, t) => {
|
|
13527
13541
|
let n;
|
|
13528
|
-
return n =
|
|
13529
|
-
level:
|
|
13530
|
-
onClick: () =>
|
|
13542
|
+
return n = X <= 3 || G.page <= 2 ? t + 1 : G.page > X - 2 ? X - 2 + t : G.page - 1 + t, /* @__PURE__ */ jsx(Button_default, {
|
|
13543
|
+
level: G.page === n ? "primary" : "secondary",
|
|
13544
|
+
onClick: () => B(n),
|
|
13531
13545
|
children: n
|
|
13532
13546
|
}, n);
|
|
13533
13547
|
}),
|
|
13534
13548
|
/* @__PURE__ */ jsx(Button_default, {
|
|
13535
13549
|
level: "icon",
|
|
13536
|
-
onClick: () =>
|
|
13537
|
-
disabled:
|
|
13550
|
+
onClick: () => B(G.page + 1),
|
|
13551
|
+
disabled: G.page === X,
|
|
13538
13552
|
children: ">"
|
|
13539
13553
|
}),
|
|
13540
13554
|
/* @__PURE__ */ jsx(Button_default, {
|
|
13541
13555
|
level: "icon",
|
|
13542
|
-
onClick: () =>
|
|
13543
|
-
disabled:
|
|
13556
|
+
onClick: () => B(X),
|
|
13557
|
+
disabled: G.page === X,
|
|
13544
13558
|
children: ">>"
|
|
13545
13559
|
})
|
|
13546
13560
|
]
|