cecomponent 1.0.52 → 1.0.53
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/ce-component-lib.js +5 -5
- package/dist/ce-component-lib.mjs +167 -167
- package/package.json +1 -1
|
@@ -13775,8 +13775,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
13775
13775
|
N >>>= 4, B.setMilliseconds(0), B.setFullYear(N + 1980), B.setMonth(G - 1), B.setDate(U);
|
|
13776
13776
|
var ee = V & 31;
|
|
13777
13777
|
V >>>= 5;
|
|
13778
|
-
var
|
|
13779
|
-
return V >>>= 6, B.setHours(V), B.setMinutes(
|
|
13778
|
+
var ne = V & 63;
|
|
13779
|
+
return V >>>= 6, B.setHours(V), B.setMinutes(ne), B.setSeconds(ee << 1), B;
|
|
13780
13780
|
}
|
|
13781
13781
|
function o(F) {
|
|
13782
13782
|
prep_blob(F, 0);
|
|
@@ -13803,7 +13803,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
13803
13803
|
if (F[0] == 80 && F[1] == 75) return nt(F, V);
|
|
13804
13804
|
if ((F[0] | 32) == 109 && (F[1] | 32) == 105) return ct(F, V);
|
|
13805
13805
|
if (F.length < 512) throw new Error("CFB file size " + F.length + " < 512");
|
|
13806
|
-
var N = 3, B = 512, U = 0, G = 0, ee = 0,
|
|
13806
|
+
var N = 3, B = 512, U = 0, G = 0, ee = 0, ne = 0, Q = 0, te = [], re = (
|
|
13807
13807
|
/*::(*/
|
|
13808
13808
|
F.slice(0, 512)
|
|
13809
13809
|
);
|
|
@@ -13832,15 +13832,15 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
13832
13832
|
u(re, N);
|
|
13833
13833
|
var ge = re.read_shift(4, "i");
|
|
13834
13834
|
if (N === 3 && ge !== 0) throw new Error("# Directory Sectors: Expected 0 saw " + ge);
|
|
13835
|
-
re.l += 4, ee = re.read_shift(4, "i"), re.l += 4, re.chk("00100000", "Mini Stream Cutoff Size: "),
|
|
13835
|
+
re.l += 4, ee = re.read_shift(4, "i"), re.l += 4, re.chk("00100000", "Mini Stream Cutoff Size: "), ne = re.read_shift(4, "i"), U = re.read_shift(4, "i"), Q = re.read_shift(4, "i"), G = re.read_shift(4, "i");
|
|
13836
13836
|
for (var pe = -1, ye = 0; ye < 109 && (pe = re.read_shift(4, "i"), !(pe < 0)); ++ye)
|
|
13837
13837
|
te[ye] = pe;
|
|
13838
13838
|
var Te = x(F, B);
|
|
13839
13839
|
E(Q, G, Te, B, te);
|
|
13840
13840
|
var K = _(Te, ee, te, B);
|
|
13841
|
-
K[ee].name = "!Directory", U > 0 &&
|
|
13842
|
-
var
|
|
13843
|
-
g(ee, K, Te, le, U,
|
|
13841
|
+
K[ee].name = "!Directory", U > 0 && ne !== J && (K[ne].name = "!MiniFAT"), K[te[0]].name = "!FAT", K.fat_addrs = te, K.ssz = B;
|
|
13842
|
+
var se = {}, le = [], oe = [], ve = [];
|
|
13843
|
+
g(ee, K, Te, le, U, se, oe, ne), d(oe, ve, le), le.shift();
|
|
13844
13844
|
var Se = {
|
|
13845
13845
|
FileIndex: oe,
|
|
13846
13846
|
FullPaths: ve
|
|
@@ -13872,16 +13872,16 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
13872
13872
|
return B[N - 1] = F.slice(N * V), B;
|
|
13873
13873
|
}
|
|
13874
13874
|
function d(F, V, N) {
|
|
13875
|
-
for (var B = 0, U = 0, G = 0, ee = 0,
|
|
13875
|
+
for (var B = 0, U = 0, G = 0, ee = 0, ne = 0, Q = N.length, te = [], re = []; B < Q; ++B)
|
|
13876
13876
|
te[B] = re[B] = B, V[B] = N[B];
|
|
13877
|
-
for (;
|
|
13878
|
-
B = re[
|
|
13877
|
+
for (; ne < re.length; ++ne)
|
|
13878
|
+
B = re[ne], U = F[B].L, G = F[B].R, ee = F[B].C, te[B] === B && (U !== -1 && te[U] !== U && (te[B] = te[U]), G !== -1 && te[G] !== G && (te[B] = te[G])), ee !== -1 && (te[ee] = B), U !== -1 && B != te[B] && (te[U] = te[B], re.lastIndexOf(U) < ne && re.push(U)), G !== -1 && B != te[B] && (te[G] = te[B], re.lastIndexOf(G) < ne && re.push(G));
|
|
13879
13879
|
for (B = 1; B < Q; ++B) te[B] === B && (G !== -1 && te[G] !== G ? te[B] = te[G] : U !== -1 && te[U] !== U && (te[B] = te[U]));
|
|
13880
13880
|
for (B = 1; B < Q; ++B)
|
|
13881
13881
|
if (F[B].type !== 0) {
|
|
13882
|
-
if (
|
|
13883
|
-
|
|
13884
|
-
while (
|
|
13882
|
+
if (ne = B, ne != te[ne]) do
|
|
13883
|
+
ne = te[ne], V[B] = V[ne] + "/" + V[B];
|
|
13884
|
+
while (ne !== 0 && te[ne] !== -1 && ne != te[ne]);
|
|
13885
13885
|
te[B] = -1;
|
|
13886
13886
|
}
|
|
13887
13887
|
for (V[0] += "/", B = 1; B < Q; ++B)
|
|
@@ -13897,9 +13897,9 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
13897
13897
|
if (F === J) {
|
|
13898
13898
|
if (V !== 0) throw new Error("DIFAT chain shorter than expected");
|
|
13899
13899
|
} else if (F !== -1) {
|
|
13900
|
-
var ee = N[F],
|
|
13900
|
+
var ee = N[F], ne = (B >>> 2) - 1;
|
|
13901
13901
|
if (!ee) return;
|
|
13902
|
-
for (var Q = 0; Q <
|
|
13902
|
+
for (var Q = 0; Q < ne && (G = __readInt32LE(ee, Q * 4)) !== J; ++Q)
|
|
13903
13903
|
U.push(G);
|
|
13904
13904
|
E(__readInt32LE(ee, B - 4), V - 1, N, B, U);
|
|
13905
13905
|
}
|
|
@@ -13907,33 +13907,33 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
13907
13907
|
function y(F, V, N, B, U) {
|
|
13908
13908
|
var G = [], ee = [];
|
|
13909
13909
|
U || (U = []);
|
|
13910
|
-
var
|
|
13910
|
+
var ne = B - 1, Q = 0, te = 0;
|
|
13911
13911
|
for (Q = V; Q >= 0; ) {
|
|
13912
13912
|
U[Q] = !0, G[G.length] = Q, ee.push(F[Q]);
|
|
13913
13913
|
var re = N[Math.floor(Q * 4 / B)];
|
|
13914
|
-
if (te = Q * 4 &
|
|
13914
|
+
if (te = Q * 4 & ne, B < 4 + te) throw new Error("FAT boundary crossed: " + Q + " 4 " + B);
|
|
13915
13915
|
if (!F[re]) break;
|
|
13916
13916
|
Q = __readInt32LE(F[re], te);
|
|
13917
13917
|
}
|
|
13918
13918
|
return { nodes: G, data: __toBuffer([ee]) };
|
|
13919
13919
|
}
|
|
13920
13920
|
function _(F, V, N, B) {
|
|
13921
|
-
var U = F.length, G = [], ee = [],
|
|
13921
|
+
var U = F.length, G = [], ee = [], ne = [], Q = [], te = B - 1, re = 0, ce = 0, de = 0, ge = 0;
|
|
13922
13922
|
for (re = 0; re < U; ++re)
|
|
13923
|
-
if (
|
|
13923
|
+
if (ne = [], de = re + V, de >= U && (de -= U), !ee[de]) {
|
|
13924
13924
|
Q = [];
|
|
13925
13925
|
var pe = [];
|
|
13926
13926
|
for (ce = de; ce >= 0; ) {
|
|
13927
|
-
pe[ce] = !0, ee[ce] = !0,
|
|
13927
|
+
pe[ce] = !0, ee[ce] = !0, ne[ne.length] = ce, Q.push(F[ce]);
|
|
13928
13928
|
var ye = N[Math.floor(ce * 4 / B)];
|
|
13929
13929
|
if (ge = ce * 4 & te, B < 4 + ge) throw new Error("FAT boundary crossed: " + ce + " 4 " + B);
|
|
13930
13930
|
if (!F[ye] || (ce = __readInt32LE(F[ye], ge), pe[ce])) break;
|
|
13931
13931
|
}
|
|
13932
|
-
G[de] = { nodes:
|
|
13932
|
+
G[de] = { nodes: ne, data: __toBuffer([Q]) };
|
|
13933
13933
|
}
|
|
13934
13934
|
return G;
|
|
13935
13935
|
}
|
|
13936
|
-
function g(F, V, N, B, U, G, ee,
|
|
13936
|
+
function g(F, V, N, B, U, G, ee, ne) {
|
|
13937
13937
|
for (var Q = 0, te = B.length ? 2 : 0, re = V[F].data, ce = 0, de = 0, ge; ce < re.length; ce += 128) {
|
|
13938
13938
|
var pe = (
|
|
13939
13939
|
/*::(*/
|
|
@@ -13954,7 +13954,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
13954
13954
|
}, Te = pe.read_shift(2) + pe.read_shift(2) + pe.read_shift(2) + pe.read_shift(2);
|
|
13955
13955
|
Te !== 0 && (ye.ct = S(pe, pe.l - 8));
|
|
13956
13956
|
var K = pe.read_shift(2) + pe.read_shift(2) + pe.read_shift(2) + pe.read_shift(2);
|
|
13957
|
-
K !== 0 && (ye.mt = S(pe, pe.l - 8)), ye.start = pe.read_shift(4, "i"), ye.size = pe.read_shift(4, "i"), ye.size < 0 && ye.start < 0 && (ye.size = ye.type = 0, ye.start = J, ye.name = ""), ye.type === 5 ? (Q = ye.start, U > 0 && Q !== J && (V[Q].name = "!StreamData")) : ye.size >= 4096 ? (ye.storage = "fat", V[ye.start] === void 0 && (V[ye.start] = y(N, ye.start, V.fat_addrs, V.ssz)), V[ye.start].name = ye.name, ye.content = V[ye.start].data.slice(0, ye.size)) : (ye.storage = "minifat", ye.size < 0 ? ye.size = 0 : Q !== J && ye.start !== J && V[Q] && (ye.content = p(ye, V[Q].data, (V[
|
|
13957
|
+
K !== 0 && (ye.mt = S(pe, pe.l - 8)), ye.start = pe.read_shift(4, "i"), ye.size = pe.read_shift(4, "i"), ye.size < 0 && ye.start < 0 && (ye.size = ye.type = 0, ye.start = J, ye.name = ""), ye.type === 5 ? (Q = ye.start, U > 0 && Q !== J && (V[Q].name = "!StreamData")) : ye.size >= 4096 ? (ye.storage = "fat", V[ye.start] === void 0 && (V[ye.start] = y(N, ye.start, V.fat_addrs, V.ssz)), V[ye.start].name = ye.name, ye.content = V[ye.start].data.slice(0, ye.size)) : (ye.storage = "minifat", ye.size < 0 ? ye.size = 0 : Q !== J && ye.start !== J && V[Q] && (ye.content = p(ye, V[Q].data, (V[ne] || {}).data))), ye.content && prep_blob(ye.content, 0), G[ge] = ye, ee.push(ye);
|
|
13958
13958
|
}
|
|
13959
13959
|
}
|
|
13960
13960
|
function S(F, V) {
|
|
@@ -14010,7 +14010,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14010
14010
|
}
|
|
14011
14011
|
}
|
|
14012
14012
|
if (!(!N && !V)) {
|
|
14013
|
-
var ee = new Date(1987, 1, 19),
|
|
14013
|
+
var ee = new Date(1987, 1, 19), ne = 0, Q = Object.create ? /* @__PURE__ */ Object.create(null) : {}, te = [];
|
|
14014
14014
|
for (U = 0; U < F.FullPaths.length; ++U)
|
|
14015
14015
|
Q[F.FullPaths[U]] = !0, F.FileIndex[U].type !== 0 && te.push([F.FullPaths[U], F.FileIndex[U]]);
|
|
14016
14016
|
for (U = 0; U < te.length; ++U) {
|
|
@@ -14033,9 +14033,9 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14033
14033
|
if (ce.name = s(de).replace("/", ""), ce.L = ce.R = ce.C = -(ce.color = 1), ce.size = ce.content ? ce.content.length : 0, ce.start = 0, ce.clsid = ce.clsid || I, U === 0)
|
|
14034
14034
|
ce.C = te.length > 1 ? 1 : -1, ce.size = 0, ce.type = 5;
|
|
14035
14035
|
else if (de.slice(-1) == "/") {
|
|
14036
|
-
for (
|
|
14037
|
-
for (ce.C =
|
|
14038
|
-
ce.R =
|
|
14036
|
+
for (ne = U + 1; ne < te.length && i(F.FullPaths[ne]) != de; ++ne) ;
|
|
14037
|
+
for (ce.C = ne >= te.length ? -1 : ne, ne = U + 1; ne < te.length && i(F.FullPaths[ne]) != i(de); ++ne) ;
|
|
14038
|
+
ce.R = ne >= te.length ? -1 : ne, ce.type = 1;
|
|
14039
14039
|
} else
|
|
14040
14040
|
i(F.FullPaths[U + 1] || "") == i(de) && (ce.R = U + 1), ce.type = 2;
|
|
14041
14041
|
}
|
|
@@ -14052,8 +14052,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14052
14052
|
for (var pe = 0, ye = 0, Te = 0; Te < ge.FileIndex.length; ++Te) {
|
|
14053
14053
|
var K = ge.FileIndex[Te];
|
|
14054
14054
|
if (K.content) {
|
|
14055
|
-
var
|
|
14056
|
-
|
|
14055
|
+
var se = K.content.length;
|
|
14056
|
+
se > 0 && (se < 4096 ? pe += se + 63 >> 6 : ye += se + 511 >> 9);
|
|
14057
14057
|
}
|
|
14058
14058
|
}
|
|
14059
14059
|
for (var le = ge.FullPaths.length + 3 >> 2, oe = pe + 7 >> 3, ve = pe + 127 >> 7, Se = oe + ye + le + ve, Ce = Se + 127 >> 7, Ie = Ce <= 109 ? 0 : Math.ceil((Ce - 109) / 127); Se + Ce + Ie + 127 >> 7 > Ce; ) Ie = ++Ce <= 109 ? 0 : Math.ceil((Ce - 109) / 127);
|
|
@@ -14071,18 +14071,18 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14071
14071
|
for (; G < 236 + ee * 127; ++G) U.write_shift(-4, G < B[2] ? B[1] + G : -1);
|
|
14072
14072
|
U.write_shift(-4, ee === B[1] - 1 ? J : ee + 1);
|
|
14073
14073
|
}
|
|
14074
|
-
var
|
|
14074
|
+
var ne = function(ge) {
|
|
14075
14075
|
for (ee += ge; G < ee - 1; ++G) U.write_shift(-4, G + 1);
|
|
14076
14076
|
ge && (++G, U.write_shift(-4, J));
|
|
14077
14077
|
};
|
|
14078
14078
|
for (ee = G = 0, ee += B[1]; G < ee; ++G) U.write_shift(-4, j.DIFSECT);
|
|
14079
14079
|
for (ee += B[2]; G < ee; ++G) U.write_shift(-4, j.FATSECT);
|
|
14080
|
-
|
|
14080
|
+
ne(B[3]), ne(B[4]);
|
|
14081
14081
|
for (var Q = 0, te = 0, re = F.FileIndex[0]; Q < F.FileIndex.length; ++Q)
|
|
14082
|
-
re = F.FileIndex[Q], re.content && (te = re.content.length, !(te < 4096) && (re.start = ee,
|
|
14083
|
-
for (
|
|
14082
|
+
re = F.FileIndex[Q], re.content && (te = re.content.length, !(te < 4096) && (re.start = ee, ne(te + 511 >> 9)));
|
|
14083
|
+
for (ne(B[6] + 7 >> 3); U.l & 511; ) U.write_shift(-4, j.ENDOFCHAIN);
|
|
14084
14084
|
for (ee = G = 0, Q = 0; Q < F.FileIndex.length; ++Q)
|
|
14085
|
-
re = F.FileIndex[Q], re.content && (te = re.content.length, !(!te || te >= 4096) && (re.start = ee,
|
|
14085
|
+
re = F.FileIndex[Q], re.content && (te = re.content.length, !(!te || te >= 4096) && (re.start = ee, ne(te + 63 >> 6)));
|
|
14086
14086
|
for (; U.l & 511; ) U.write_shift(-4, j.ENDOFCHAIN);
|
|
14087
14087
|
for (G = 0; G < B[4] << 2; ++G) {
|
|
14088
14088
|
var ce = F.FullPaths[G];
|
|
@@ -14130,9 +14130,9 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14130
14130
|
V.charCodeAt(0) === 47 ? (U = !0, V = N[0].slice(0, -1) + V) : U = V.indexOf("/") !== -1;
|
|
14131
14131
|
var G = V.toUpperCase(), ee = U === !0 ? N.indexOf(G) : B.indexOf(G);
|
|
14132
14132
|
if (ee !== -1) return F.FileIndex[ee];
|
|
14133
|
-
var
|
|
14134
|
-
for (G = G.replace(chr0, ""),
|
|
14135
|
-
if ((
|
|
14133
|
+
var ne = !G.match(chr1);
|
|
14134
|
+
for (G = G.replace(chr0, ""), ne && (G = G.replace(chr1, "!")), ee = 0; ee < N.length; ++ee)
|
|
14135
|
+
if ((ne ? N[ee].replace(chr1, "!") : N[ee]).replace(chr0, "") == G || (ne ? B[ee].replace(chr1, "!") : B[ee]).replace(chr0, "") == G) return F.FileIndex[ee];
|
|
14136
14136
|
return null;
|
|
14137
14137
|
}
|
|
14138
14138
|
var W = 64, J = -2, ie = "d0cf11e0a1b11ae1", Y = [208, 207, 17, 224, 161, 177, 26, 225], I = "00000000000000000000000000000000", j = {
|
|
@@ -14266,21 +14266,21 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14266
14266
|
return V;
|
|
14267
14267
|
}
|
|
14268
14268
|
function Oe(F, V, N) {
|
|
14269
|
-
var B = 1, U = 0, G = 0, ee = 0,
|
|
14269
|
+
var B = 1, U = 0, G = 0, ee = 0, ne = 0, Q = F.length, te = xe ? new Uint16Array(32) : ke(32);
|
|
14270
14270
|
for (G = 0; G < 32; ++G) te[G] = 0;
|
|
14271
14271
|
for (G = Q; G < N; ++G) F[G] = 0;
|
|
14272
14272
|
Q = F.length;
|
|
14273
14273
|
var re = xe ? new Uint16Array(Q) : ke(Q);
|
|
14274
14274
|
for (G = 0; G < Q; ++G)
|
|
14275
14275
|
te[U = F[G]]++, B < U && (B = U), re[G] = 0;
|
|
14276
|
-
for (te[0] = 0, G = 1; G <= B; ++G) te[G + 16] =
|
|
14276
|
+
for (te[0] = 0, G = 1; G <= B; ++G) te[G + 16] = ne = ne + te[G - 1] << 1;
|
|
14277
14277
|
for (G = 0; G < Q; ++G)
|
|
14278
|
-
|
|
14278
|
+
ne = F[G], ne != 0 && (re[G] = te[ne + 16]++);
|
|
14279
14279
|
var ce = 0;
|
|
14280
14280
|
for (G = 0; G < Q; ++G)
|
|
14281
14281
|
if (ce = F[G], ce != 0)
|
|
14282
|
-
for (
|
|
14283
|
-
V[
|
|
14282
|
+
for (ne = Ee(re[G], B) >> B - ce, ee = (1 << B + 4 - ce) - 1; ee >= 0; --ee)
|
|
14283
|
+
V[ne | ee << ce] = ce & 15 | G << 4;
|
|
14284
14284
|
return B;
|
|
14285
14285
|
}
|
|
14286
14286
|
var De = xe ? new Uint16Array(512) : ke(512), He = xe ? new Uint16Array(32) : ke(32);
|
|
@@ -14305,39 +14305,39 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14305
14305
|
var U = xe ? new Uint8Array(259) : [];
|
|
14306
14306
|
for (N = 0, B = 0; N < Z.length - 1; ++N)
|
|
14307
14307
|
for (; B < Z[N + 1]; ++B) U[B] = N;
|
|
14308
|
-
function G(
|
|
14309
|
-
for (var te = 0; te <
|
|
14310
|
-
var re = Math.min(65535,
|
|
14311
|
-
for (Q.write_shift(1, +ce), Q.write_shift(2, re), Q.write_shift(2, ~re & 65535); re-- > 0; ) Q[Q.l++] =
|
|
14308
|
+
function G(ne, Q) {
|
|
14309
|
+
for (var te = 0; te < ne.length; ) {
|
|
14310
|
+
var re = Math.min(65535, ne.length - te), ce = te + re == ne.length;
|
|
14311
|
+
for (Q.write_shift(1, +ce), Q.write_shift(2, re), Q.write_shift(2, ~re & 65535); re-- > 0; ) Q[Q.l++] = ne[te++];
|
|
14312
14312
|
}
|
|
14313
14313
|
return Q.l;
|
|
14314
14314
|
}
|
|
14315
|
-
function ee(
|
|
14316
|
-
for (var te = 0, re = 0, ce = xe ? new Uint16Array(32768) : []; re <
|
|
14315
|
+
function ee(ne, Q) {
|
|
14316
|
+
for (var te = 0, re = 0, ce = xe ? new Uint16Array(32768) : []; re < ne.length; ) {
|
|
14317
14317
|
var de = (
|
|
14318
14318
|
/* data.length - boff; */
|
|
14319
|
-
Math.min(65535,
|
|
14319
|
+
Math.min(65535, ne.length - re)
|
|
14320
14320
|
);
|
|
14321
14321
|
if (de < 10) {
|
|
14322
|
-
for (te = Me(Q, te, +(re + de ==
|
|
14322
|
+
for (te = Me(Q, te, +(re + de == ne.length)), te & 7 && (te += 8 - (te & 7)), Q.l = te / 8 | 0, Q.write_shift(2, de), Q.write_shift(2, ~de & 65535); de-- > 0; ) Q[Q.l++] = ne[re++];
|
|
14323
14323
|
te = Q.l * 8;
|
|
14324
14324
|
continue;
|
|
14325
14325
|
}
|
|
14326
|
-
te = Me(Q, te, +(re + de ==
|
|
14326
|
+
te = Me(Q, te, +(re + de == ne.length) + 2);
|
|
14327
14327
|
for (var ge = 0; de-- > 0; ) {
|
|
14328
|
-
var pe =
|
|
14328
|
+
var pe = ne[re];
|
|
14329
14329
|
ge = (ge << 5 ^ pe) & 32767;
|
|
14330
14330
|
var ye = -1, Te = 0;
|
|
14331
14331
|
if ((ye = ce[ge]) && (ye |= re & -32768, ye > re && (ye -= 32768), ye < re))
|
|
14332
|
-
for (;
|
|
14332
|
+
for (; ne[ye + Te] == ne[re + Te] && Te < 250; ) ++Te;
|
|
14333
14333
|
if (Te > 2) {
|
|
14334
14334
|
pe = U[Te], pe <= 22 ? te = Fe(Q, te, fe[pe + 1] >> 1) - 1 : (Fe(Q, te, 3), te += 5, Fe(Q, te, fe[pe - 23] >> 5), te += 3);
|
|
14335
14335
|
var K = pe < 8 ? 0 : pe - 4 >> 2;
|
|
14336
14336
|
K > 0 && (Ne(Q, te, Te - Z[pe]), te += K), pe = V[re - ye], te = Fe(Q, te, fe[pe] >> 3), te -= 3;
|
|
14337
|
-
var
|
|
14338
|
-
|
|
14337
|
+
var se = pe < 4 ? 0 : pe - 2 >> 1;
|
|
14338
|
+
se > 0 && (Ne(Q, te, re - ye - ae[pe]), te += se);
|
|
14339
14339
|
for (var le = 0; le < Te; ++le)
|
|
14340
|
-
ce[ge] = re & 32767, ge = (ge << 5 ^
|
|
14340
|
+
ce[ge] = re & 32767, ge = (ge << 5 ^ ne[re]) & 32767, ++re;
|
|
14341
14341
|
de -= Te - 1;
|
|
14342
14342
|
} else
|
|
14343
14343
|
pe <= 143 ? pe = pe + 48 : te = Re(Q, te, 1), te = Fe(Q, te, fe[pe]), ce[ge] = re & 32767, ++re;
|
|
@@ -14362,15 +14362,15 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14362
14362
|
V += 5;
|
|
14363
14363
|
var U = Pe(F, V) + 4;
|
|
14364
14364
|
V += 4;
|
|
14365
|
-
for (var G = 0, ee = xe ? new Uint8Array(19) : ke(19),
|
|
14365
|
+
for (var G = 0, ee = xe ? new Uint8Array(19) : ke(19), ne = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], Q = 1, te = xe ? new Uint8Array(8) : ke(8), re = xe ? new Uint8Array(8) : ke(8), ce = ee.length, de = 0; de < U; ++de)
|
|
14366
14366
|
ee[z[de]] = G = he(F, V), Q < G && (Q = G), te[G]++, V += 3;
|
|
14367
14367
|
var ge = 0;
|
|
14368
14368
|
for (te[0] = 0, de = 1; de <= Q; ++de) re[de] = ge = ge + te[de - 1] << 1;
|
|
14369
|
-
for (de = 0; de < ce; ++de) (ge = ee[de]) != 0 && (
|
|
14369
|
+
for (de = 0; de < ce; ++de) (ge = ee[de]) != 0 && (ne[de] = re[ge]++);
|
|
14370
14370
|
var pe = 0;
|
|
14371
14371
|
for (de = 0; de < ce; ++de)
|
|
14372
14372
|
if (pe = ee[de], pe != 0) {
|
|
14373
|
-
ge = fe[
|
|
14373
|
+
ge = fe[ne[de]] >> 8 - pe;
|
|
14374
14374
|
for (var ye = (1 << 7 - pe) - 1; ye >= 0; --ye) Xe[ge | ye << pe] = pe & 7 | de << 3;
|
|
14375
14375
|
}
|
|
14376
14376
|
var Te = [];
|
|
@@ -14389,17 +14389,17 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14389
14389
|
Te.push(ge), Q < ge && (Q = ge);
|
|
14390
14390
|
break;
|
|
14391
14391
|
}
|
|
14392
|
-
var K = Te.slice(0, N),
|
|
14392
|
+
var K = Te.slice(0, N), se = Te.slice(N);
|
|
14393
14393
|
for (de = N; de < 286; ++de) K[de] = 0;
|
|
14394
|
-
for (de = B; de < 30; ++de)
|
|
14395
|
-
return Ke = Oe(K, Ye, 286), it = Oe(
|
|
14394
|
+
for (de = B; de < 30; ++de) se[de] = 0;
|
|
14395
|
+
return Ke = Oe(K, Ye, 286), it = Oe(se, je, 30), V;
|
|
14396
14396
|
}
|
|
14397
14397
|
function qe(F, V) {
|
|
14398
14398
|
if (F[0] == 3 && !(F[1] & 3))
|
|
14399
14399
|
return [new_raw_buf(V), 2];
|
|
14400
|
-
for (var N = 0, B = 0, U = new_unsafe_buf(V || 1 << 18), G = 0, ee = U.length >>> 0,
|
|
14400
|
+
for (var N = 0, B = 0, U = new_unsafe_buf(V || 1 << 18), G = 0, ee = U.length >>> 0, ne = 0, Q = 0; (B & 1) == 0; ) {
|
|
14401
14401
|
if (B = he(F, N), N += 3, B >>> 1)
|
|
14402
|
-
B >> 1 == 1 ? (
|
|
14402
|
+
B >> 1 == 1 ? (ne = 9, Q = 5) : (N = et(F, N), ne = Ke, Q = it);
|
|
14403
14403
|
else {
|
|
14404
14404
|
N & 7 && (N += 8 - (N & 7));
|
|
14405
14405
|
var te = F[N >>> 3] | F[(N >>> 3) + 1] << 8;
|
|
@@ -14410,7 +14410,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14410
14410
|
}
|
|
14411
14411
|
for (; ; ) {
|
|
14412
14412
|
!V && ee < G + 32767 && (U = Be(U, G + 32767), ee = U.length);
|
|
14413
|
-
var re = be(F, N,
|
|
14413
|
+
var re = be(F, N, ne), ce = B >>> 1 == 1 ? De[re] : Ye[re];
|
|
14414
14414
|
if (N += ce & 15, ce >>>= 4, (ce >>> 8 & 255) === 0) U[G++] = ce;
|
|
14415
14415
|
else {
|
|
14416
14416
|
if (ce == 256) break;
|
|
@@ -14449,10 +14449,10 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14449
14449
|
b(G, { root: V.root });
|
|
14450
14450
|
for (var ee = N.length - 4; (N[ee] != 80 || N[ee + 1] != 75 || N[ee + 2] != 5 || N[ee + 3] != 6) && ee >= 0; ) --ee;
|
|
14451
14451
|
N.l = ee + 4, N.l += 4;
|
|
14452
|
-
var
|
|
14452
|
+
var ne = N.read_shift(2);
|
|
14453
14453
|
N.l += 6;
|
|
14454
14454
|
var Q = N.read_shift(4);
|
|
14455
|
-
for (N.l = Q, ee = 0; ee <
|
|
14455
|
+
for (N.l = Q, ee = 0; ee < ne; ++ee) {
|
|
14456
14456
|
N.l += 20;
|
|
14457
14457
|
var te = N.read_shift(4), re = N.read_shift(4), ce = N.read_shift(2), de = N.read_shift(2), ge = N.read_shift(2);
|
|
14458
14458
|
N.l += 8;
|
|
@@ -14469,7 +14469,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14469
14469
|
}
|
|
14470
14470
|
function ot(F, V, N, B, U) {
|
|
14471
14471
|
F.l += 2;
|
|
14472
|
-
var G = F.read_shift(2), ee = F.read_shift(2),
|
|
14472
|
+
var G = F.read_shift(2), ee = F.read_shift(2), ne = a(F);
|
|
14473
14473
|
if (G & 8257) throw new Error("Unsupported ZIP encryption");
|
|
14474
14474
|
for (var Q = F.read_shift(4), te = F.read_shift(4), re = F.read_shift(4), ce = F.read_shift(2), de = F.read_shift(2), ge = "", pe = 0; pe < ce; ++pe) ge += String.fromCharCode(F[F.l++]);
|
|
14475
14475
|
if (de) {
|
|
@@ -14478,7 +14478,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14478
14478
|
F.slice(F.l, F.l + de)
|
|
14479
14479
|
/*:: :any)*/
|
|
14480
14480
|
);
|
|
14481
|
-
(ye[21589] || {}).mt && (
|
|
14481
|
+
(ye[21589] || {}).mt && (ne = ye[21589].mt), ((U || {})[21589] || {}).mt && (ne = U[21589].mt);
|
|
14482
14482
|
}
|
|
14483
14483
|
F.l += de;
|
|
14484
14484
|
var Te = F.slice(F.l, F.l + te);
|
|
@@ -14493,29 +14493,29 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14493
14493
|
throw new Error("Unsupported ZIP Compression method " + ee);
|
|
14494
14494
|
}
|
|
14495
14495
|
var K = !1;
|
|
14496
|
-
G & 8 && (Q = F.read_shift(4), Q == 134695760 && (Q = F.read_shift(4), K = !0), te = F.read_shift(4), re = F.read_shift(4)), te != V && Ue(K, "Bad compressed size: " + V + " != " + te), re != N && Ue(K, "Bad uncompressed size: " + N + " != " + re), Ze(B, ge, Te, { unsafe: !0, mt:
|
|
14496
|
+
G & 8 && (Q = F.read_shift(4), Q == 134695760 && (Q = F.read_shift(4), K = !0), te = F.read_shift(4), re = F.read_shift(4)), te != V && Ue(K, "Bad compressed size: " + V + " != " + te), re != N && Ue(K, "Bad uncompressed size: " + N + " != " + re), Ze(B, ge, Te, { unsafe: !0, mt: ne });
|
|
14497
14497
|
}
|
|
14498
14498
|
function lt(F, V) {
|
|
14499
|
-
var N = V || {}, B = [], U = [], G = new_buf(1), ee = N.compression ? 8 : 0,
|
|
14499
|
+
var N = V || {}, B = [], U = [], G = new_buf(1), ee = N.compression ? 8 : 0, ne = 0, Q = 0, te = 0, re = 0, ce = 0, de = F.FullPaths[0], ge = de, pe = F.FileIndex[0], ye = [], Te = 0;
|
|
14500
14500
|
for (Q = 1; Q < F.FullPaths.length; ++Q)
|
|
14501
14501
|
if (ge = F.FullPaths[Q].slice(de.length), pe = F.FileIndex[Q], !(!pe.size || !pe.content || ge == "Sh33tJ5")) {
|
|
14502
|
-
var K = re,
|
|
14503
|
-
for (te = 0; te < ge.length; ++te)
|
|
14504
|
-
|
|
14502
|
+
var K = re, se = new_buf(ge.length);
|
|
14503
|
+
for (te = 0; te < ge.length; ++te) se.write_shift(1, ge.charCodeAt(te) & 127);
|
|
14504
|
+
se = se.slice(0, se.l), ye[ce] = CRC32.buf(
|
|
14505
14505
|
/*::((*/
|
|
14506
14506
|
pe.content,
|
|
14507
14507
|
0
|
|
14508
14508
|
);
|
|
14509
14509
|
var le = pe.content;
|
|
14510
|
-
ee == 8 && (le = O(le)), G = new_buf(30), G.write_shift(4, 67324752), G.write_shift(2, 20), G.write_shift(2,
|
|
14510
|
+
ee == 8 && (le = O(le)), G = new_buf(30), G.write_shift(4, 67324752), G.write_shift(2, 20), G.write_shift(2, ne), G.write_shift(2, ee), pe.mt ? n(G, pe.mt) : G.write_shift(4, 0), G.write_shift(-4, ye[ce]), G.write_shift(4, le.length), G.write_shift(
|
|
14511
14511
|
4,
|
|
14512
14512
|
/*::(*/
|
|
14513
14513
|
pe.content.length
|
|
14514
|
-
), G.write_shift(2,
|
|
14514
|
+
), G.write_shift(2, se.length), G.write_shift(2, 0), re += G.length, B.push(G), re += se.length, B.push(se), re += le.length, B.push(le), G = new_buf(46), G.write_shift(4, 33639248), G.write_shift(2, 0), G.write_shift(2, 20), G.write_shift(2, ne), G.write_shift(2, ee), G.write_shift(4, 0), G.write_shift(-4, ye[ce]), G.write_shift(4, le.length), G.write_shift(
|
|
14515
14515
|
4,
|
|
14516
14516
|
/*::(*/
|
|
14517
14517
|
pe.content.length
|
|
14518
|
-
), G.write_shift(2,
|
|
14518
|
+
), G.write_shift(2, se.length), G.write_shift(2, 0), G.write_shift(2, 0), G.write_shift(2, 0), G.write_shift(2, 0), G.write_shift(4, 0), G.write_shift(4, K), Te += G.l, U.push(G), Te += se.length, U.push(se), ++ce;
|
|
14519
14519
|
}
|
|
14520
14520
|
return G = new_buf(22), G.write_shift(4, 101010256), G.write_shift(2, 0), G.write_shift(2, 0), G.write_shift(2, ce), G.write_shift(2, ce), G.write_shift(4, Te), G.write_shift(4, re), G.write_shift(2, 0), bconcat([bconcat(B), bconcat(U), G]);
|
|
14521
14521
|
}
|
|
@@ -14556,8 +14556,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14556
14556
|
continue;
|
|
14557
14557
|
}
|
|
14558
14558
|
for (var ee = 0; ee < G.length; ) {
|
|
14559
|
-
var
|
|
14560
|
-
Q.charAt(
|
|
14559
|
+
var ne = 76, Q = G.slice(ee, ee + ne);
|
|
14560
|
+
Q.charAt(ne - 1) == "=" ? ne-- : Q.charAt(ne - 2) == "=" ? ne -= 2 : Q.charAt(ne - 3) == "=" && (ne -= 3), Q = G.slice(ee, ee + ne), ee += ne, ee < G.length && (Q += "="), N.push(Q);
|
|
14561
14561
|
}
|
|
14562
14562
|
}
|
|
14563
14563
|
return N.join(`\r
|
|
@@ -14575,8 +14575,8 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14575
14575
|
`));
|
|
14576
14576
|
}
|
|
14577
14577
|
function ht(F, V, N) {
|
|
14578
|
-
for (var B = "", U = "", G = "", ee,
|
|
14579
|
-
var Q = V[
|
|
14578
|
+
for (var B = "", U = "", G = "", ee, ne = 0; ne < 10; ++ne) {
|
|
14579
|
+
var Q = V[ne];
|
|
14580
14580
|
if (!Q || Q.match(/^\s*$/)) break;
|
|
14581
14581
|
var te = Q.match(/^(.*?):\s*([^\s].*)$/);
|
|
14582
14582
|
if (te) switch (te[1].toLowerCase()) {
|
|
@@ -14591,12 +14591,12 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14591
14591
|
break;
|
|
14592
14592
|
}
|
|
14593
14593
|
}
|
|
14594
|
-
switch (++
|
|
14594
|
+
switch (++ne, U.toLowerCase()) {
|
|
14595
14595
|
case "base64":
|
|
14596
|
-
ee = s2a(Base64_decode(V.slice(
|
|
14596
|
+
ee = s2a(Base64_decode(V.slice(ne).join("")));
|
|
14597
14597
|
break;
|
|
14598
14598
|
case "quoted-printable":
|
|
14599
|
-
ee = ft(V.slice(
|
|
14599
|
+
ee = ft(V.slice(ne));
|
|
14600
14600
|
break;
|
|
14601
14601
|
default:
|
|
14602
14602
|
throw new Error("Unsupported Content-Transfer-Encoding " + U);
|
|
@@ -14614,7 +14614,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14614
14614
|
;
|
|
14615
14615
|
var ee = (B[1] || "").match(/boundary="(.*?)"/);
|
|
14616
14616
|
if (!ee) throw new Error("MAD cannot find boundary");
|
|
14617
|
-
var
|
|
14617
|
+
var ne = "--" + (ee[1] || ""), Q = [], te = [], re = {
|
|
14618
14618
|
FileIndex: Q,
|
|
14619
14619
|
FullPaths: te
|
|
14620
14620
|
};
|
|
@@ -14622,7 +14622,7 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14622
14622
|
var ce, de = 0;
|
|
14623
14623
|
for (U = 0; U < B.length; ++U) {
|
|
14624
14624
|
var ge = B[U];
|
|
14625
|
-
ge !==
|
|
14625
|
+
ge !== ne && ge !== ne + "--" || (de++ && ht(re, B.slice(ce, U), N), ce = U);
|
|
14626
14626
|
}
|
|
14627
14627
|
return re;
|
|
14628
14628
|
}
|
|
@@ -14635,16 +14635,16 @@ var CRC32 = /* @__PURE__ */ function() {
|
|
|
14635
14635
|
"",
|
|
14636
14636
|
"",
|
|
14637
14637
|
""
|
|
14638
|
-
], G = F.FullPaths[0], ee = G,
|
|
14639
|
-
if (ee = F.FullPaths[Q].slice(G.length),
|
|
14638
|
+
], G = F.FullPaths[0], ee = G, ne = F.FileIndex[0], Q = 1; Q < F.FullPaths.length; ++Q)
|
|
14639
|
+
if (ee = F.FullPaths[Q].slice(G.length), ne = F.FileIndex[Q], !(!ne.size || !ne.content || ee == "Sh33tJ5")) {
|
|
14640
14640
|
ee = ee.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7E-\xFF]/g, function(Te) {
|
|
14641
14641
|
return "_x" + Te.charCodeAt(0).toString(16) + "_";
|
|
14642
14642
|
}).replace(/[\u0080-\uFFFF]/g, function(Te) {
|
|
14643
14643
|
return "_u" + Te.charCodeAt(0).toString(16) + "_";
|
|
14644
14644
|
});
|
|
14645
|
-
for (var te =
|
|
14645
|
+
for (var te = ne.content, re = has_buf && Buffer.isBuffer(te) ? te.toString("binary") : k(te), ce = 0, de = Math.min(1024, re.length), ge = 0, pe = 0; pe <= de; ++pe) (ge = re.charCodeAt(pe)) >= 32 && ge < 128 && ++ce;
|
|
14646
14646
|
var ye = ce >= de * 4 / 5;
|
|
14647
|
-
U.push(B), U.push("Content-Location: " + (N.root || "file:///C:/SheetJS/") + ee), U.push("Content-Transfer-Encoding: " + (ye ? "quoted-printable" : "base64")), U.push("Content-Type: " + tt(
|
|
14647
|
+
U.push(B), U.push("Content-Location: " + (N.root || "file:///C:/SheetJS/") + ee), U.push("Content-Transfer-Encoding: " + (ye ? "quoted-printable" : "base64")), U.push("Content-Type: " + tt(ne, ee)), U.push(""), U.push(ye ? at(re) : Je(re));
|
|
14648
14648
|
}
|
|
14649
14649
|
return U.push(B + `--\r
|
|
14650
14650
|
`), U.join(`\r
|
|
@@ -28322,42 +28322,42 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28322
28322
|
if (t && Array.isArray(t)) {
|
|
28323
28323
|
let K = [...t];
|
|
28324
28324
|
if (A) {
|
|
28325
|
-
const { column:
|
|
28325
|
+
const { column: se, direction: le } = A;
|
|
28326
28326
|
K.sort((oe, ve) => {
|
|
28327
|
-
if (oe[
|
|
28328
|
-
if (ve[
|
|
28329
|
-
if (oe[
|
|
28327
|
+
if (oe[se] == null) return 1;
|
|
28328
|
+
if (ve[se] == null) return -1;
|
|
28329
|
+
if (oe[se] === ve[se]) return 0;
|
|
28330
28330
|
const Se = (Le) => {
|
|
28331
28331
|
if (typeof Le != "string") return null;
|
|
28332
28332
|
const Qe = Le.match(/\d+/);
|
|
28333
28333
|
return Qe ? parseInt(Qe[0], 10) : null;
|
|
28334
|
-
}, Ce = Se(oe[
|
|
28334
|
+
}, Ce = Se(oe[se]), Ie = Se(ve[se]);
|
|
28335
28335
|
if (Ce !== null && Ie !== null)
|
|
28336
28336
|
return le === "asc" ? Ce - Ie : Ie - Ce;
|
|
28337
28337
|
if (Ce !== null || Ie !== null)
|
|
28338
28338
|
return Ce !== null ? -1 : 1;
|
|
28339
28339
|
{
|
|
28340
|
-
const Le = String(oe[
|
|
28340
|
+
const Le = String(oe[se] || "").toLowerCase(), Qe = String(ve[se] || "").toLowerCase();
|
|
28341
28341
|
return le === "asc" ? Le.localeCompare(Qe) : Qe.localeCompare(Le);
|
|
28342
28342
|
}
|
|
28343
28343
|
}), tt(A);
|
|
28344
28344
|
}
|
|
28345
28345
|
if (z(K), ae(K), We(!1), o) {
|
|
28346
|
-
const
|
|
28346
|
+
const se = {}, le = Array.isArray(o) ? o : [o];
|
|
28347
28347
|
K.forEach((oe, ve) => {
|
|
28348
28348
|
const Se = oe.id ?? `__row_${ve}`;
|
|
28349
28349
|
for (const Ce of le)
|
|
28350
28350
|
if (oe[Ce] === !0) {
|
|
28351
|
-
|
|
28351
|
+
se[Se] = { columnId: Ce, rowData: oe };
|
|
28352
28352
|
break;
|
|
28353
28353
|
}
|
|
28354
|
-
}), Ze(
|
|
28354
|
+
}), Ze(se);
|
|
28355
28355
|
}
|
|
28356
28356
|
} else
|
|
28357
28357
|
We(!0);
|
|
28358
28358
|
}, [t, A, o]), useEffect(() => {
|
|
28359
28359
|
if (O.length > 0) {
|
|
28360
|
-
const K = Object.keys(O[0]),
|
|
28360
|
+
const K = Object.keys(O[0]), se = K.map((le) => {
|
|
28361
28361
|
const oe = r == null ? void 0 : r.find((ve) => ve.id === le);
|
|
28362
28362
|
return {
|
|
28363
28363
|
id: le,
|
|
@@ -28367,7 +28367,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28367
28367
|
shouldVisible: (oe == null ? void 0 : oe.shouldVisible) ?? !0
|
|
28368
28368
|
};
|
|
28369
28369
|
});
|
|
28370
|
-
if (nt(
|
|
28370
|
+
if (nt(se), !ot) {
|
|
28371
28371
|
const le = (r == null ? void 0 : r.filter((oe) => oe.shouldDisplay !== !1).map((oe) => oe.id)) || K;
|
|
28372
28372
|
Xe(new Set(le)), lt(!0);
|
|
28373
28373
|
}
|
|
@@ -28375,36 +28375,36 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28375
28375
|
}, [O, r]);
|
|
28376
28376
|
const [ut, Ze] = useState({}), pt = ({
|
|
28377
28377
|
rowIndex: K,
|
|
28378
|
-
columnId:
|
|
28378
|
+
columnId: se,
|
|
28379
28379
|
rowData: le
|
|
28380
28380
|
}) => {
|
|
28381
28381
|
const oe = Array.isArray(o) ? o : [o], ve = {
|
|
28382
28382
|
...le,
|
|
28383
|
-
...Object.fromEntries(oe.map((Ie) => [Ie, Ie ===
|
|
28383
|
+
...Object.fromEntries(oe.map((Ie) => [Ie, Ie === se]))
|
|
28384
28384
|
}, Se = le.id ?? `__row_${K}`;
|
|
28385
28385
|
Ze((Ie) => ({
|
|
28386
28386
|
...Ie,
|
|
28387
|
-
[Se]: { columnId:
|
|
28387
|
+
[Se]: { columnId: se, rowData: ve }
|
|
28388
28388
|
}));
|
|
28389
28389
|
const Ce = O.map((Ie, Le) => (Ie.id ?? `__row_${Le}`) === Se ? {
|
|
28390
28390
|
...Ie,
|
|
28391
28391
|
...Object.fromEntries(
|
|
28392
|
-
oe.map((xt) => [xt, xt ===
|
|
28392
|
+
oe.map((xt) => [xt, xt === se])
|
|
28393
28393
|
)
|
|
28394
28394
|
} : Ie);
|
|
28395
28395
|
z(Ce), ae(Ce), k && k({ fullData: Ce, updatedRow: ve });
|
|
28396
28396
|
}, dt = (K) => {
|
|
28397
28397
|
var oe;
|
|
28398
|
-
const
|
|
28398
|
+
const se = O.findIndex((ve) => ve === K), le = K.id ?? `__row_${se}`;
|
|
28399
28399
|
return ((oe = ut[le]) == null ? void 0 : oe.columnId) || "";
|
|
28400
28400
|
}, rt = useMemo(() => {
|
|
28401
|
-
const K = Ne * ke,
|
|
28402
|
-
return O.slice(K,
|
|
28401
|
+
const K = Ne * ke, se = K + ke;
|
|
28402
|
+
return O.slice(K, se);
|
|
28403
28403
|
}, [O, Ne, ke]), F = (K) => {
|
|
28404
|
-
const
|
|
28405
|
-
|
|
28406
|
-
}, V = (K,
|
|
28407
|
-
const le =
|
|
28404
|
+
const se = new Set(je);
|
|
28405
|
+
se.has(K) ? se.size > 1 && se.delete(K) : se.add(K), Xe(se);
|
|
28406
|
+
}, V = (K, se = null) => {
|
|
28407
|
+
const le = se ? `${K}-${se}` : `${K}`, oe = new Set(De);
|
|
28408
28408
|
oe.has(le) ? oe.delete(le) : (Array.from(oe).forEach((ve) => {
|
|
28409
28409
|
ve.startsWith(`${K}`) && oe.delete(ve);
|
|
28410
28410
|
}), oe.add(le)), He(oe);
|
|
@@ -28412,26 +28412,26 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28412
28412
|
we(Ee === K ? null : K);
|
|
28413
28413
|
}, B = (K) => {
|
|
28414
28414
|
if (Z.length === 0) return;
|
|
28415
|
-
let
|
|
28416
|
-
Ve && Ve.column === K && (
|
|
28417
|
-
const le = [...Z].sort((oe, ve) => oe[K] == null ? 1 : ve[K] == null ? -1 : oe[K] === ve[K] ? 0 :
|
|
28418
|
-
z(le), tt({ column: K, direction:
|
|
28415
|
+
let se = "asc";
|
|
28416
|
+
Ve && Ve.column === K && (se = Ve.direction === "asc" ? "desc" : "asc");
|
|
28417
|
+
const le = [...Z].sort((oe, ve) => oe[K] == null ? 1 : ve[K] == null ? -1 : oe[K] === ve[K] ? 0 : se === "asc" ? oe[K] > ve[K] ? 1 : -1 : oe[K] < ve[K] ? 1 : -1);
|
|
28418
|
+
z(le), tt({ column: K, direction: se });
|
|
28419
28419
|
}, U = () => {
|
|
28420
28420
|
let K = [];
|
|
28421
28421
|
K = Z;
|
|
28422
|
-
const
|
|
28422
|
+
const se = K.filter((le) => {
|
|
28423
28423
|
var ve;
|
|
28424
28424
|
const oe = ((ve = le[Ae]) == null ? void 0 : ve.toLowerCase().toString()) || "";
|
|
28425
28425
|
return be === "contains" ? oe.includes(Re.toLowerCase()) : be === "equals" ? oe === Re : be === "startsWith" ? oe.startsWith(Re) : be === "endsWith" ? oe.endsWith(Re) : be === "does not contain" ? !oe.includes(Re) : be === "does not equal" ? oe !== Re : be === "is empty" ? oe.trim() === "" : be === "is not empty" ? oe.trim() !== "" : be === "is any of" ? Re.split(",").map((Se) => Se.trim()).includes(oe) : !0;
|
|
28426
28426
|
});
|
|
28427
|
-
z(
|
|
28428
|
-
}, G = (K,
|
|
28427
|
+
z(se), Pe(!1), Fe(""), me("");
|
|
28428
|
+
}, G = (K, se) => {
|
|
28429
28429
|
let le = [];
|
|
28430
28430
|
le = Z;
|
|
28431
28431
|
const oe = le.filter((ve) => {
|
|
28432
28432
|
var Ce;
|
|
28433
28433
|
const Se = ((Ce = ve[K]) == null ? void 0 : Ce.toLowerCase().toString()) || "";
|
|
28434
|
-
return be === "contains" ? Se.includes(
|
|
28434
|
+
return be === "contains" ? Se.includes(se.toLowerCase()) : be === "equals" ? Se === se : be === "startsWith" ? Se.startsWith(se) : be === "endsWith" ? Se.endsWith(se) : be === "does not contain" ? !Se.includes(se) : be === "does not equal" ? Se !== se : be === "is empty" ? Se.trim() === "" : be === "is not empty" ? Se.trim() !== "" : be === "is any of" ? se.split(",").map((Ie) => Ie.trim()).includes(Se) : !0;
|
|
28435
28435
|
});
|
|
28436
28436
|
z(oe), Pe(!1);
|
|
28437
28437
|
}, ee = (K) => {
|
|
@@ -28440,7 +28440,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28440
28440
|
useEscapeKey(() => {
|
|
28441
28441
|
we(null), Pe(!1);
|
|
28442
28442
|
});
|
|
28443
|
-
const
|
|
28443
|
+
const ne = (K, se = "") => {
|
|
28444
28444
|
const le = (oe) => {
|
|
28445
28445
|
const ve = new Set(qe);
|
|
28446
28446
|
ve.has(oe) ? ve.delete(oe) : ve.add(oe), st(ve);
|
|
@@ -28458,15 +28458,15 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28458
28458
|
"button",
|
|
28459
28459
|
{
|
|
28460
28460
|
className: "toggle-button",
|
|
28461
|
-
onClick: () => le(`${
|
|
28462
|
-
children: qe.has(`${
|
|
28461
|
+
onClick: () => le(`${se}-${Se}-${Ce}`),
|
|
28462
|
+
children: qe.has(`${se}-${Se}-${Ce}`) ? "▼" : "▶"
|
|
28463
28463
|
}
|
|
28464
28464
|
),
|
|
28465
|
-
qe.has(`${
|
|
28465
|
+
qe.has(`${se}-${Se}-${Ce}`) && ne(
|
|
28466
28466
|
ve[Ce],
|
|
28467
|
-
`${
|
|
28467
|
+
`${se}-${Se}-${Ce}`
|
|
28468
28468
|
)
|
|
28469
|
-
] }) : String(ve[Ce] || "") }, `${
|
|
28469
|
+
] }) : String(ve[Ce] || "") }, `${se}-${Se}-${Ce}`)) }, `${se}-${Se}`)) })
|
|
28470
28470
|
] }) }) });
|
|
28471
28471
|
} else if (typeof K == "object" && K !== null)
|
|
28472
28472
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "nested-object", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("table", { className: "custom-table nested", children: [
|
|
@@ -28481,67 +28481,67 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28481
28481
|
"button",
|
|
28482
28482
|
{
|
|
28483
28483
|
className: "toggle-button",
|
|
28484
|
-
onClick: () => le(`${
|
|
28485
|
-
children: qe.has(`${
|
|
28484
|
+
onClick: () => le(`${se}-${oe}`),
|
|
28485
|
+
children: qe.has(`${se}-${oe}`) ? "▼" : "▶"
|
|
28486
28486
|
}
|
|
28487
28487
|
),
|
|
28488
|
-
qe.has(`${
|
|
28488
|
+
qe.has(`${se}-${oe}`) && ne(ve, `${se}-${oe}`)
|
|
28489
28489
|
] }) : String(ve) })
|
|
28490
|
-
] }, `${
|
|
28490
|
+
] }, `${se}-${oe}`)) })
|
|
28491
28491
|
] }) });
|
|
28492
28492
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: String(K) });
|
|
28493
28493
|
}, Q = (K) => {
|
|
28494
28494
|
if (K) {
|
|
28495
|
-
const
|
|
28495
|
+
const se = K.getBoundingClientRect(), le = se.right > window.innerWidth, oe = se.left < 0;
|
|
28496
28496
|
le ? (K.classList.add("adjust-left"), K.classList.remove("adjust-right")) : oe ? (K.classList.add("adjust-right"), K.classList.remove("adjust-left")) : (K.classList.remove("adjust-left"), K.classList.remove("adjust-right"));
|
|
28497
28497
|
}
|
|
28498
28498
|
};
|
|
28499
28499
|
useEffect(() => {
|
|
28500
|
-
const K = (
|
|
28501
|
-
he && Ke.current && !Ke.current.contains(
|
|
28500
|
+
const K = (se) => {
|
|
28501
|
+
he && Ke.current && !Ke.current.contains(se.target) && Pe(!1);
|
|
28502
28502
|
};
|
|
28503
28503
|
return document.addEventListener("mousedown", K), () => {
|
|
28504
28504
|
document.removeEventListener("mousedown", K);
|
|
28505
28505
|
};
|
|
28506
28506
|
}, [he]), useEffect(() => {
|
|
28507
|
-
const K = (
|
|
28508
|
-
Ge && et.current && !et.current.contains(
|
|
28507
|
+
const K = (se) => {
|
|
28508
|
+
Ge && et.current && !et.current.contains(se.target) && Ye(!1);
|
|
28509
28509
|
};
|
|
28510
28510
|
return document.addEventListener("mousedown", K), () => {
|
|
28511
28511
|
document.removeEventListener("mousedown", K);
|
|
28512
28512
|
};
|
|
28513
28513
|
}, [Ge]);
|
|
28514
|
-
const te = (K,
|
|
28514
|
+
const te = (K, se) => {
|
|
28515
28515
|
K.preventDefault();
|
|
28516
|
-
const le = K.pageX, oe = M[
|
|
28516
|
+
const le = K.pageX, oe = M[se] || 150, ve = (Ce) => {
|
|
28517
28517
|
const Ie = Math.max(100, oe + (Ce.pageX - le));
|
|
28518
28518
|
D((Le) => ({
|
|
28519
28519
|
...Le,
|
|
28520
|
-
[
|
|
28520
|
+
[se]: Ie
|
|
28521
28521
|
}));
|
|
28522
28522
|
}, Se = () => {
|
|
28523
28523
|
document.removeEventListener("mousemove", ve), document.removeEventListener("mouseup", Se);
|
|
28524
28524
|
};
|
|
28525
28525
|
document.addEventListener("mousemove", ve), document.addEventListener("mouseup", Se);
|
|
28526
|
-
}, re = (K,
|
|
28526
|
+
}, re = (K, se) => {
|
|
28527
28527
|
var oe;
|
|
28528
|
-
const le = String(
|
|
28528
|
+
const le = String(se);
|
|
28529
28529
|
return b != null && b.includes(K) ? R != null && R[K] ? R[K].includes(le) : !0 : !!((oe = R == null ? void 0 : R._global_) != null && oe.includes(le));
|
|
28530
|
-
}, ce = (K,
|
|
28531
|
-
re(
|
|
28530
|
+
}, ce = (K, se) => {
|
|
28531
|
+
re(se, K[se]) && L && L(K);
|
|
28532
28532
|
}, de = rt.some(
|
|
28533
28533
|
(K) => Array.from(je).some(
|
|
28534
|
-
(
|
|
28534
|
+
(se) => Array.isArray(K[se]) && K[se].length > 0 && K[se].some(
|
|
28535
28535
|
(le) => typeof le == "object" && le !== null
|
|
28536
28536
|
)
|
|
28537
28537
|
)
|
|
28538
28538
|
), ge = () => {
|
|
28539
|
-
const K = Ue.filter((ve) => je.has(ve.id)),
|
|
28539
|
+
const K = Ue.filter((ve) => je.has(ve.id)), se = Z.map(
|
|
28540
28540
|
(ve) => K.reduce(
|
|
28541
28541
|
(Se, Ce) => (Se[Ce.label || Ce.id] = ve[Ce.id], Se),
|
|
28542
28542
|
{}
|
|
28543
28543
|
)
|
|
28544
|
-
), le = utils.json_to_sheet(
|
|
28544
|
+
), le = utils.json_to_sheet(se), oe = utils.book_new();
|
|
28545
28545
|
utils.book_append_sheet(oe, le, "Data"), writeFileSync(oe, "data-grid-export.xlsx");
|
|
28546
28546
|
}, pe = () => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "table-container", children: [
|
|
28547
28547
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "table-scroll-container", children: je.size === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -28577,10 +28577,10 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28577
28577
|
checked: fe.size === O.length && O.length > 0,
|
|
28578
28578
|
onChange: (K) => {
|
|
28579
28579
|
if (K) {
|
|
28580
|
-
const
|
|
28580
|
+
const se = new Set(
|
|
28581
28581
|
O.map((le, oe) => oe)
|
|
28582
28582
|
);
|
|
28583
|
-
_e(
|
|
28583
|
+
_e(se);
|
|
28584
28584
|
} else
|
|
28585
28585
|
_e(/* @__PURE__ */ new Set());
|
|
28586
28586
|
}
|
|
@@ -28649,7 +28649,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28649
28649
|
"div",
|
|
28650
28650
|
{
|
|
28651
28651
|
className: "dropdown-menu",
|
|
28652
|
-
ref: (
|
|
28652
|
+
ref: (se) => Q(se),
|
|
28653
28653
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28654
28654
|
"button",
|
|
28655
28655
|
{
|
|
@@ -28670,7 +28670,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28670
28670
|
"div",
|
|
28671
28671
|
{
|
|
28672
28672
|
className: "column-resizer",
|
|
28673
|
-
onMouseDown: (
|
|
28673
|
+
onMouseDown: (se) => te(se, K.id)
|
|
28674
28674
|
}
|
|
28675
28675
|
)
|
|
28676
28676
|
] })
|
|
@@ -28708,8 +28708,8 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28708
28708
|
type: "text",
|
|
28709
28709
|
placeholder: `Search ${K.label}`,
|
|
28710
28710
|
value: Ae === K.id ? Re : "",
|
|
28711
|
-
onChange: (
|
|
28712
|
-
const le =
|
|
28711
|
+
onChange: (se) => {
|
|
28712
|
+
const le = se.target.value;
|
|
28713
28713
|
Fe(le), me(K.id), G(K.id, le);
|
|
28714
28714
|
},
|
|
28715
28715
|
className: "filter-input-with-clear",
|
|
@@ -28736,11 +28736,11 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28736
28736
|
(c || x || d || u || m || f) && /* @__PURE__ */ jsxRuntimeExports.jsx("td", {})
|
|
28737
28737
|
] })
|
|
28738
28738
|
] }),
|
|
28739
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: rt.map((K,
|
|
28739
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: rt.map((K, se) => /* @__PURE__ */ jsxRuntimeExports.jsxs(React2__default.Fragment, { children: [
|
|
28740
28740
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
28741
28741
|
"tr",
|
|
28742
28742
|
{
|
|
28743
|
-
className:
|
|
28743
|
+
className: se % 2 === 0 ? "table-row-even" : "table-row-odd",
|
|
28744
28744
|
children: [
|
|
28745
28745
|
de && /* @__PURE__ */ jsxRuntimeExports.jsx("td", { className: "expand-column", children: Array.from(je).some(
|
|
28746
28746
|
(le) => Array.isArray(K[le]) && K[le].length > 0 && K[le].some(
|
|
@@ -28750,9 +28750,9 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28750
28750
|
"button",
|
|
28751
28751
|
{
|
|
28752
28752
|
className: "expand-button",
|
|
28753
|
-
onClick: () => V(
|
|
28753
|
+
onClick: () => V(se),
|
|
28754
28754
|
children: Array.from(De).some(
|
|
28755
|
-
(le) => le.startsWith(`${
|
|
28755
|
+
(le) => le.startsWith(`${se}`)
|
|
28756
28756
|
) ? "▼" : "▶"
|
|
28757
28757
|
}
|
|
28758
28758
|
) }),
|
|
@@ -28760,10 +28760,10 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28760
28760
|
CECheckBox,
|
|
28761
28761
|
{
|
|
28762
28762
|
label: "",
|
|
28763
|
-
checked: fe.has(
|
|
28763
|
+
checked: fe.has(se),
|
|
28764
28764
|
onChange: (le) => {
|
|
28765
28765
|
const oe = new Set(fe);
|
|
28766
|
-
le ? oe.add(
|
|
28766
|
+
le ? oe.add(se) : oe.delete(se), _e(oe);
|
|
28767
28767
|
}
|
|
28768
28768
|
}
|
|
28769
28769
|
) }),
|
|
@@ -28772,9 +28772,9 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28772
28772
|
{
|
|
28773
28773
|
label: "",
|
|
28774
28774
|
value: "selected",
|
|
28775
|
-
checked: (a == null ? void 0 : a(
|
|
28775
|
+
checked: (a == null ? void 0 : a(se)) === "selected",
|
|
28776
28776
|
onChange: () => n == null ? void 0 : n({
|
|
28777
|
-
rowIndex:
|
|
28777
|
+
rowIndex: se,
|
|
28778
28778
|
columnId: "selected",
|
|
28779
28779
|
rowData: K
|
|
28780
28780
|
})
|
|
@@ -28793,7 +28793,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28793
28793
|
},
|
|
28794
28794
|
className: `table-cell ${re(le.id, K[le.id]) ? "ce-clickable-cell" : ""}`,
|
|
28795
28795
|
onClick: () => {
|
|
28796
|
-
re(le.id, K[le.id]) ? ce(K, le.id) : Array.isArray(K[le.id]) && K[le.id].length > 0 && V(
|
|
28796
|
+
re(le.id, K[le.id]) ? ce(K, le.id) : Array.isArray(K[le.id]) && K[le.id].length > 0 && V(se, le.id);
|
|
28797
28797
|
},
|
|
28798
28798
|
children: (Array.isArray(o) ? o.includes(le.id) : o === le.id) ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "radio-center-wrapper", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
28799
28799
|
CERadioButton,
|
|
@@ -28802,7 +28802,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28802
28802
|
value: le.id,
|
|
28803
28803
|
checked: dt(K) === le.id,
|
|
28804
28804
|
onChange: () => pt({
|
|
28805
|
-
rowIndex:
|
|
28805
|
+
rowIndex: se,
|
|
28806
28806
|
// keep if needed elsewhere, but not used in radio map
|
|
28807
28807
|
columnId: le.id,
|
|
28808
28808
|
rowData: K
|
|
@@ -28911,7 +28911,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28911
28911
|
),
|
|
28912
28912
|
Array.from(De).map((le) => {
|
|
28913
28913
|
const [oe, ve] = le.split("-");
|
|
28914
|
-
if (Number(oe) ===
|
|
28914
|
+
if (Number(oe) === se) {
|
|
28915
28915
|
const Se = ve ? { [ve]: K[ve] } : Object.keys(K).filter(
|
|
28916
28916
|
(Ce) => Array.isArray(K[Ce]) || typeof K[Ce] == "object"
|
|
28917
28917
|
).reduce(
|
|
@@ -28945,7 +28945,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28945
28945
|
children: Ce.charAt(0).toUpperCase() + Ce.slice(1)
|
|
28946
28946
|
}
|
|
28947
28947
|
),
|
|
28948
|
-
|
|
28948
|
+
ne(Ie)
|
|
28949
28949
|
]
|
|
28950
28950
|
},
|
|
28951
28951
|
Ce
|
|
@@ -28956,7 +28956,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
28956
28956
|
}
|
|
28957
28957
|
return null;
|
|
28958
28958
|
})
|
|
28959
|
-
] },
|
|
28959
|
+
] }, se)) })
|
|
28960
28960
|
]
|
|
28961
28961
|
}
|
|
28962
28962
|
) }),
|
|
@@ -29054,11 +29054,11 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
29054
29054
|
}
|
|
29055
29055
|
) })
|
|
29056
29056
|
] }), ye = () => {
|
|
29057
|
-
const K = Ue.filter((ve) => je.has(ve.id)),
|
|
29057
|
+
const K = Ue.filter((ve) => je.has(ve.id)), se = rt.map(
|
|
29058
29058
|
(ve) => Object.fromEntries(
|
|
29059
29059
|
K.map((Se) => [Se.label || Se.id, ve[Se.id]])
|
|
29060
29060
|
)
|
|
29061
|
-
), le = utils.json_to_sheet(
|
|
29061
|
+
), le = utils.json_to_sheet(se), oe = utils.book_new();
|
|
29062
29062
|
utils.book_append_sheet(oe, le, "Data"), writeFileSync(oe, "data-grid-export.xls");
|
|
29063
29063
|
}, Te = () => {
|
|
29064
29064
|
X ? (We(!0), Promise.resolve(X()).finally(() => We(!1))) : (We(!0), setTimeout(() => {
|
|
@@ -29172,7 +29172,7 @@ const ExportIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewB
|
|
|
29172
29172
|
label: "Select All",
|
|
29173
29173
|
checked: je.size === Ue.length,
|
|
29174
29174
|
onChange: (K) => {
|
|
29175
|
-
Xe(K ? new Set(Ue.map((
|
|
29175
|
+
Xe(K ? new Set(Ue.filter((se) => se.shouldVisible !== !1).map((se) => se.id)) : /* @__PURE__ */ new Set());
|
|
29176
29176
|
}
|
|
29177
29177
|
}
|
|
29178
29178
|
) }) }),
|