dccxx-s3-explorer 1.0.16 → 1.0.17
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/s3-explorer.js +251 -260
- package/dist/s3-explorer.js.map +1 -1
- package/dist/s3-explorer.umd.cjs +8 -8
- package/dist/s3-explorer.umd.cjs.map +1 -1
- package/package.json +130 -130
package/dist/s3-explorer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as p, Fragment as ce, jsxs as
|
|
1
|
+
import { jsx as p, Fragment as ce, jsxs as O } from "react/jsx-runtime";
|
|
2
2
|
import * as u from "react";
|
|
3
3
|
import le, { forwardRef as ys, createElement as _o, useState as Q, useRef as Er, useEffect as qt, useMemo as Zt, useImperativeHandle as gd, memo as Pa, useLayoutEffect as md } from "react";
|
|
4
4
|
import * as Nr from "react-dom";
|
|
@@ -921,8 +921,8 @@ const Gd = {
|
|
|
921
921
|
var N, b;
|
|
922
922
|
const S = t.options.columnResizeDirection === "rtl" ? -1 : 1, R = (x - ((N = E == null ? void 0 : E.startOffset) != null ? N : 0)) * S, M = Math.max(R / ((b = E == null ? void 0 : E.startSize) != null ? b : 0), -0.999999);
|
|
923
923
|
return E.columnSizingStart.forEach((j) => {
|
|
924
|
-
let [
|
|
925
|
-
l[
|
|
924
|
+
let [z, Z] = j;
|
|
925
|
+
l[z] = Math.round(Math.max(Z + Z * M, 0) * 100) / 100;
|
|
926
926
|
}), {
|
|
927
927
|
...E,
|
|
928
928
|
deltaOffset: R,
|
|
@@ -4113,7 +4113,7 @@ const de = (e) => {
|
|
|
4113
4113
|
// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
|
|
4114
4114
|
Cg.test(e) && !Sg.test(e)
|
|
4115
4115
|
), bl = () => !1, Mg = (e) => Rg.test(e), kg = (e) => Eg.test(e), $g = () => {
|
|
4116
|
-
const e = de("colors"), t = de("spacing"), n = de("blur"), r = de("brightness"), o = de("borderColor"), s = de("borderRadius"), i = de("borderSpacing"), a = de("borderWidth"), c = de("contrast"), l = de("grayscale"), d = de("hueRotate"), g = de("invert"), h = de("gap"), f = de("gradientColorStops"), v = de("gradientColorStopPositions"), m = de("inset"), y = de("margin"), w = de("opacity"), x = de("padding"), E = de("saturate"), N = de("scale"), b = de("sepia"), S = de("skew"), R = de("space"), M = de("translate"), j = () => ["auto", "contain", "none"],
|
|
4116
|
+
const e = de("colors"), t = de("spacing"), n = de("blur"), r = de("brightness"), o = de("borderColor"), s = de("borderRadius"), i = de("borderSpacing"), a = de("borderWidth"), c = de("contrast"), l = de("grayscale"), d = de("hueRotate"), g = de("invert"), h = de("gap"), f = de("gradientColorStops"), v = de("gradientColorStopPositions"), m = de("inset"), y = de("margin"), w = de("opacity"), x = de("padding"), E = de("saturate"), N = de("scale"), b = de("sepia"), S = de("skew"), R = de("space"), M = de("translate"), j = () => ["auto", "contain", "none"], z = () => ["auto", "hidden", "clip", "visible", "scroll"], Z = () => ["auto", re, t], _ = () => [re, t], $ = () => ["", dt, Ct], F = () => ["auto", en, re], G = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], B = () => ["solid", "dashed", "dotted", "double", "none"], q = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], te = () => ["", "0", re], ue = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], oe = () => [en, re];
|
|
4117
4117
|
return {
|
|
4118
4118
|
cacheSize: 500,
|
|
4119
4119
|
separator: ":",
|
|
@@ -4243,21 +4243,21 @@ const de = (e) => {
|
|
|
4243
4243
|
* @see https://tailwindcss.com/docs/overflow
|
|
4244
4244
|
*/
|
|
4245
4245
|
overflow: [{
|
|
4246
|
-
overflow:
|
|
4246
|
+
overflow: z()
|
|
4247
4247
|
}],
|
|
4248
4248
|
/**
|
|
4249
4249
|
* Overflow X
|
|
4250
4250
|
* @see https://tailwindcss.com/docs/overflow
|
|
4251
4251
|
*/
|
|
4252
4252
|
"overflow-x": [{
|
|
4253
|
-
"overflow-x":
|
|
4253
|
+
"overflow-x": z()
|
|
4254
4254
|
}],
|
|
4255
4255
|
/**
|
|
4256
4256
|
* Overflow Y
|
|
4257
4257
|
* @see https://tailwindcss.com/docs/overflow
|
|
4258
4258
|
*/
|
|
4259
4259
|
"overflow-y": [{
|
|
4260
|
-
"overflow-y":
|
|
4260
|
+
"overflow-y": z()
|
|
4261
4261
|
}],
|
|
4262
4262
|
/**
|
|
4263
4263
|
* Overscroll Behavior
|
|
@@ -4431,14 +4431,14 @@ const de = (e) => {
|
|
|
4431
4431
|
* @see https://tailwindcss.com/docs/grid-column
|
|
4432
4432
|
*/
|
|
4433
4433
|
"col-start": [{
|
|
4434
|
-
"col-start":
|
|
4434
|
+
"col-start": F()
|
|
4435
4435
|
}],
|
|
4436
4436
|
/**
|
|
4437
4437
|
* Grid Column End
|
|
4438
4438
|
* @see https://tailwindcss.com/docs/grid-column
|
|
4439
4439
|
*/
|
|
4440
4440
|
"col-end": [{
|
|
4441
|
-
"col-end":
|
|
4441
|
+
"col-end": F()
|
|
4442
4442
|
}],
|
|
4443
4443
|
/**
|
|
4444
4444
|
* Grid Template Rows
|
|
@@ -4461,14 +4461,14 @@ const de = (e) => {
|
|
|
4461
4461
|
* @see https://tailwindcss.com/docs/grid-row
|
|
4462
4462
|
*/
|
|
4463
4463
|
"row-start": [{
|
|
4464
|
-
"row-start":
|
|
4464
|
+
"row-start": F()
|
|
4465
4465
|
}],
|
|
4466
4466
|
/**
|
|
4467
4467
|
* Grid Row End
|
|
4468
4468
|
* @see https://tailwindcss.com/docs/grid-row
|
|
4469
4469
|
*/
|
|
4470
4470
|
"row-end": [{
|
|
4471
|
-
"row-end":
|
|
4471
|
+
"row-end": F()
|
|
4472
4472
|
}],
|
|
4473
4473
|
/**
|
|
4474
4474
|
* Grid Auto Flow
|
|
@@ -6580,7 +6580,7 @@ var As = "Checkbox", [Qg, Px] = Mt(As), [em, tm] = Qg(As), Tl = u.forwardRef(
|
|
|
6580
6580
|
const b = () => x(E.current);
|
|
6581
6581
|
return N.addEventListener("reset", b), () => N.removeEventListener("reset", b);
|
|
6582
6582
|
}
|
|
6583
|
-
}, [h, x]), /* @__PURE__ */
|
|
6583
|
+
}, [h, x]), /* @__PURE__ */ O(em, { scope: n, state: w, disabled: a, children: [
|
|
6584
6584
|
/* @__PURE__ */ p(
|
|
6585
6585
|
xe.button,
|
|
6586
6586
|
{
|
|
@@ -6725,11 +6725,11 @@ var im = "DismissableLayer", Ko = "dismissableLayer.update", am = "dismissableLa
|
|
|
6725
6725
|
onDismiss: a,
|
|
6726
6726
|
...c
|
|
6727
6727
|
} = e, l = u.useContext(Ml), [d, g] = u.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, f] = u.useState({}), v = ze(t, (R) => g(R)), m = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), w = m.indexOf(y), x = d ? m.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, N = x >= w, b = um((R) => {
|
|
6728
|
-
const M = R.target, j = [...l.branches].some((
|
|
6728
|
+
const M = R.target, j = [...l.branches].some((z) => z.contains(M));
|
|
6729
6729
|
!N || j || (o == null || o(R), i == null || i(R), R.defaultPrevented || a == null || a());
|
|
6730
6730
|
}, h), S = dm((R) => {
|
|
6731
6731
|
const M = R.target;
|
|
6732
|
-
[...l.branches].some((
|
|
6732
|
+
[...l.branches].some((z) => z.contains(M)) || (s == null || s(R), i == null || i(R), R.defaultPrevented || a == null || a());
|
|
6733
6733
|
}, h);
|
|
6734
6734
|
return Dl((R) => {
|
|
6735
6735
|
x === l.layers.size - 1 && (r == null || r(R), !R.defaultPrevented && a && (R.preventDefault(), a()));
|
|
@@ -7692,7 +7692,7 @@ var mh = u.forwardRef(
|
|
|
7692
7692
|
), sc = u.forwardRef(
|
|
7693
7693
|
(e, t) => {
|
|
7694
7694
|
const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Ze(Gt, n), c = u.useRef(null), l = ze(t, c);
|
|
7695
|
-
return Cm(), /* @__PURE__ */
|
|
7695
|
+
return Cm(), /* @__PURE__ */ O(ce, { children: [
|
|
7696
7696
|
/* @__PURE__ */ p(
|
|
7697
7697
|
Il,
|
|
7698
7698
|
{
|
|
@@ -7716,7 +7716,7 @@ var mh = u.forwardRef(
|
|
|
7716
7716
|
)
|
|
7717
7717
|
}
|
|
7718
7718
|
),
|
|
7719
|
-
/* @__PURE__ */
|
|
7719
|
+
/* @__PURE__ */ O(ce, { children: [
|
|
7720
7720
|
/* @__PURE__ */ p(vh, { titleId: a.titleId }),
|
|
7721
7721
|
/* @__PURE__ */ p(wh, { contentRef: c, descriptionId: a.descriptionId })
|
|
7722
7722
|
] })
|
|
@@ -7787,9 +7787,9 @@ const Qt = bh, hr = xh, Rh = Ch, vc = u.forwardRef(({ className: e, ...t }, n) =
|
|
|
7787
7787
|
}
|
|
7788
7788
|
));
|
|
7789
7789
|
vc.displayName = pc.displayName;
|
|
7790
|
-
const Vt = u.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */
|
|
7790
|
+
const Vt = u.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ O(Rh, { children: [
|
|
7791
7791
|
/* @__PURE__ */ p(vc, {}),
|
|
7792
|
-
/* @__PURE__ */
|
|
7792
|
+
/* @__PURE__ */ O(
|
|
7793
7793
|
gc,
|
|
7794
7794
|
{
|
|
7795
7795
|
ref: r,
|
|
@@ -7800,7 +7800,7 @@ const Vt = u.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
|
|
|
7800
7800
|
...n,
|
|
7801
7801
|
children: [
|
|
7802
7802
|
t,
|
|
7803
|
-
/* @__PURE__ */
|
|
7803
|
+
/* @__PURE__ */ O(
|
|
7804
7804
|
Sh,
|
|
7805
7805
|
{
|
|
7806
7806
|
className: J(
|
|
@@ -8259,8 +8259,8 @@ var Gh = u.forwardRef((e, t) => {
|
|
|
8259
8259
|
onFocus: rn(e.onFocus, (M) => {
|
|
8260
8260
|
const j = !b.current;
|
|
8261
8261
|
if (M.target === M.currentTarget && j && !w) {
|
|
8262
|
-
const
|
|
8263
|
-
if (M.currentTarget.dispatchEvent(
|
|
8262
|
+
const z = new CustomEvent(bo, Bh);
|
|
8263
|
+
if (M.currentTarget.dispatchEvent(z), !z.defaultPrevented) {
|
|
8264
8264
|
const Z = N().filter((B) => B.focusable), _ = Z.find((B) => B.active), $ = Z.find((B) => B.id === m), G = [_, $, ...Z].filter(
|
|
8265
8265
|
Boolean
|
|
8266
8266
|
).map((B) => B.ref.current);
|
|
@@ -8964,13 +8964,13 @@ var qc = "ToastViewport", Rv = ["F8"], ls = "toast.viewportPause", cs = "toast.v
|
|
|
8964
8964
|
(b = l.current) == null || b.focus();
|
|
8965
8965
|
return;
|
|
8966
8966
|
}
|
|
8967
|
-
const _ = m({ tabbingDirection: j ? "backwards" : "forwards" }), $ = _.findIndex((
|
|
8967
|
+
const _ = m({ tabbingDirection: j ? "backwards" : "forwards" }), $ = _.findIndex((F) => F === M);
|
|
8968
8968
|
xo(_.slice($ + 1)) ? x.preventDefault() : j ? (S = l.current) == null || S.focus() : (R = d.current) == null || R.focus();
|
|
8969
8969
|
}
|
|
8970
8970
|
};
|
|
8971
8971
|
return y.addEventListener("keydown", w), () => y.removeEventListener("keydown", w);
|
|
8972
8972
|
}
|
|
8973
|
-
}, [a, m]), /* @__PURE__ */
|
|
8973
|
+
}, [a, m]), /* @__PURE__ */ O(
|
|
8974
8974
|
pm,
|
|
8975
8975
|
{
|
|
8976
8976
|
ref: c,
|
|
@@ -9085,33 +9085,33 @@ var [Av, _v] = Gc(Hr, {
|
|
|
9085
9085
|
onSwipeCancel: h,
|
|
9086
9086
|
onSwipeEnd: f,
|
|
9087
9087
|
...v
|
|
9088
|
-
} = e, m = zr(Hr, n), [y, w] = u.useState(null), x = ze(t, (
|
|
9088
|
+
} = e, m = zr(Hr, n), [y, w] = u.useState(null), x = ze(t, (F) => w(F)), E = u.useRef(null), N = u.useRef(null), b = o || m.duration, S = u.useRef(0), R = u.useRef(b), M = u.useRef(0), { onToastAdd: j, onToastRemove: z } = m, Z = Ne(() => {
|
|
9089
9089
|
var G;
|
|
9090
9090
|
(y == null ? void 0 : y.contains(document.activeElement)) && ((G = m.viewport) == null || G.focus()), i();
|
|
9091
9091
|
}), _ = u.useCallback(
|
|
9092
|
-
(
|
|
9093
|
-
!
|
|
9092
|
+
(F) => {
|
|
9093
|
+
!F || F === 1 / 0 || (window.clearTimeout(M.current), S.current = (/* @__PURE__ */ new Date()).getTime(), M.current = window.setTimeout(Z, F));
|
|
9094
9094
|
},
|
|
9095
9095
|
[Z]
|
|
9096
9096
|
);
|
|
9097
9097
|
u.useEffect(() => {
|
|
9098
|
-
const
|
|
9099
|
-
if (
|
|
9098
|
+
const F = m.viewport;
|
|
9099
|
+
if (F) {
|
|
9100
9100
|
const G = () => {
|
|
9101
9101
|
_(R.current), l == null || l();
|
|
9102
9102
|
}, B = () => {
|
|
9103
9103
|
const q = (/* @__PURE__ */ new Date()).getTime() - S.current;
|
|
9104
9104
|
R.current = R.current - q, window.clearTimeout(M.current), c == null || c();
|
|
9105
9105
|
};
|
|
9106
|
-
return
|
|
9107
|
-
|
|
9106
|
+
return F.addEventListener(ls, B), F.addEventListener(cs, G), () => {
|
|
9107
|
+
F.removeEventListener(ls, B), F.removeEventListener(cs, G);
|
|
9108
9108
|
};
|
|
9109
9109
|
}
|
|
9110
9110
|
}, [m.viewport, b, c, l, _]), u.useEffect(() => {
|
|
9111
9111
|
s && !m.isClosePausedRef.current && _(b);
|
|
9112
|
-
}, [s, b, m.isClosePausedRef, _]), u.useEffect(() => (j(), () =>
|
|
9112
|
+
}, [s, b, m.isClosePausedRef, _]), u.useEffect(() => (j(), () => z()), [j, z]);
|
|
9113
9113
|
const $ = u.useMemo(() => y ? ru(y) : null, [y]);
|
|
9114
|
-
return m.viewport ? /* @__PURE__ */
|
|
9114
|
+
return m.viewport ? /* @__PURE__ */ O(ce, { children: [
|
|
9115
9115
|
$ && /* @__PURE__ */ p(
|
|
9116
9116
|
Ov,
|
|
9117
9117
|
{
|
|
@@ -9142,25 +9142,25 @@ var [Av, _v] = Gc(Hr, {
|
|
|
9142
9142
|
...v,
|
|
9143
9143
|
ref: x,
|
|
9144
9144
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
9145
|
-
onKeyDown: we(e.onKeyDown, (
|
|
9146
|
-
|
|
9145
|
+
onKeyDown: we(e.onKeyDown, (F) => {
|
|
9146
|
+
F.key === "Escape" && (a == null || a(F.nativeEvent), F.nativeEvent.defaultPrevented || (m.isFocusedToastEscapeKeyDownRef.current = !0, Z()));
|
|
9147
9147
|
}),
|
|
9148
|
-
onPointerDown: we(e.onPointerDown, (
|
|
9149
|
-
|
|
9148
|
+
onPointerDown: we(e.onPointerDown, (F) => {
|
|
9149
|
+
F.button === 0 && (E.current = { x: F.clientX, y: F.clientY });
|
|
9150
9150
|
}),
|
|
9151
|
-
onPointerMove: we(e.onPointerMove, (
|
|
9151
|
+
onPointerMove: we(e.onPointerMove, (F) => {
|
|
9152
9152
|
if (!E.current) return;
|
|
9153
|
-
const G =
|
|
9153
|
+
const G = F.clientX - E.current.x, B = F.clientY - E.current.y, q = !!N.current, K = ["left", "right"].includes(m.swipeDirection), te = ["left", "up"].includes(m.swipeDirection) ? Math.min : Math.max, ue = K ? te(0, G) : 0, oe = K ? 0 : te(0, B), Pe = F.pointerType === "touch" ? 10 : 2, He = { x: ue, y: oe }, Qe = { originalEvent: F, delta: He };
|
|
9154
9154
|
q ? (N.current = He, Xn(Nv, g, Qe, {
|
|
9155
9155
|
discrete: !1
|
|
9156
9156
|
})) : Xi(He, m.swipeDirection, Pe) ? (N.current = He, Xn(Ev, d, Qe, {
|
|
9157
9157
|
discrete: !1
|
|
9158
|
-
}),
|
|
9158
|
+
}), F.target.setPointerCapture(F.pointerId)) : (Math.abs(G) > Pe || Math.abs(B) > Pe) && (E.current = null);
|
|
9159
9159
|
}),
|
|
9160
|
-
onPointerUp: we(e.onPointerUp, (
|
|
9161
|
-
const G = N.current, B =
|
|
9162
|
-
if (B.hasPointerCapture(
|
|
9163
|
-
const q =
|
|
9160
|
+
onPointerUp: we(e.onPointerUp, (F) => {
|
|
9161
|
+
const G = N.current, B = F.target;
|
|
9162
|
+
if (B.hasPointerCapture(F.pointerId) && B.releasePointerCapture(F.pointerId), N.current = null, E.current = null, G) {
|
|
9163
|
+
const q = F.currentTarget, K = { originalEvent: F, delta: G };
|
|
9164
9164
|
Xi(G, m.swipeDirection, m.swipeThreshold) ? Xn(Tv, f, K, {
|
|
9165
9165
|
discrete: !0
|
|
9166
9166
|
}) : Xn(
|
|
@@ -9188,7 +9188,7 @@ var [Av, _v] = Gc(Hr, {
|
|
|
9188
9188
|
return kv(() => i(!0)), u.useEffect(() => {
|
|
9189
9189
|
const l = window.setTimeout(() => c(!0), 1e3);
|
|
9190
9190
|
return () => window.clearTimeout(l);
|
|
9191
|
-
}, []), a ? null : /* @__PURE__ */ p(Fs, { asChild: !0, children: /* @__PURE__ */ p(Vs, { ...r, children: s && /* @__PURE__ */
|
|
9191
|
+
}, []), a ? null : /* @__PURE__ */ p(Fs, { asChild: !0, children: /* @__PURE__ */ p(Vs, { ...r, children: s && /* @__PURE__ */ O(ce, { children: [
|
|
9192
9192
|
o.label,
|
|
9193
9193
|
" ",
|
|
9194
9194
|
n
|
|
@@ -9462,10 +9462,10 @@ function js() {
|
|
|
9462
9462
|
}
|
|
9463
9463
|
function mu() {
|
|
9464
9464
|
const { toasts: e } = js();
|
|
9465
|
-
return /* @__PURE__ */
|
|
9465
|
+
return /* @__PURE__ */ O(Vv, { children: [
|
|
9466
9466
|
e.map(function({ id: t, title: n, description: r, action: o, ...s }) {
|
|
9467
|
-
return /* @__PURE__ */
|
|
9468
|
-
/* @__PURE__ */
|
|
9467
|
+
return /* @__PURE__ */ O(du, { ...s, className: `s3-explr-ui-toast ${s.className || ""}`, children: [
|
|
9468
|
+
/* @__PURE__ */ O("div", { className: "s3-explr-ui-toast-content grid gap-1", children: [
|
|
9469
9469
|
n && /* @__PURE__ */ p(pu, { className: "s3-explr-ui-toast-title", children: n }),
|
|
9470
9470
|
r && /* @__PURE__ */ p(gu, { className: "s3-explr-ui-toast-description", children: r })
|
|
9471
9471
|
] }),
|
|
@@ -9687,7 +9687,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
9687
9687
|
{
|
|
9688
9688
|
wait: 300
|
|
9689
9689
|
}
|
|
9690
|
-
), /* @__PURE__ */
|
|
9690
|
+
), /* @__PURE__ */ O(ce, { children: [
|
|
9691
9691
|
/* @__PURE__ */ p(
|
|
9692
9692
|
Tt,
|
|
9693
9693
|
{
|
|
@@ -9784,7 +9784,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
9784
9784
|
asSelector: r = !1,
|
|
9785
9785
|
onSelected: o = (s) => console.log("selected:", s)
|
|
9786
9786
|
}) => {
|
|
9787
|
-
const [s, i] = Q(""), [a, c] = Q(/* @__PURE__ */ new Set()), [l, d] = Q(n), [g, h] = Q(!1), [f, v] = Q(""), [m, y] = Q(!1), [w, x] = Q(null), [E, N] = Q(!1), [b, S] = Q(!1), [R, M] = Q(!1), [j,
|
|
9787
|
+
const [s, i] = Q(""), [a, c] = Q(/* @__PURE__ */ new Set()), [l, d] = Q(n), [g, h] = Q(!1), [f, v] = Q(""), [m, y] = Q(!1), [w, x] = Q(null), [E, N] = Q(!1), [b, S] = Q(!1), [R, M] = Q(!1), [j, z] = Q(null), Z = Er(null), { toast: _ } = js(), [$, F] = Q(null), [G, B] = Q(""), [q, K] = Q(!1), [te, ue] = Q(/* @__PURE__ */ new Set()), [oe, Pe] = Q(""), [He, Qe] = Q(!1), [kt, yt] = Q(!1), [wt, je] = Q("rename"), {
|
|
9788
9788
|
data: Ce = {},
|
|
9789
9789
|
isLoading: bt,
|
|
9790
9790
|
error: $t,
|
|
@@ -9833,7 +9833,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
9833
9833
|
y(!1);
|
|
9834
9834
|
}
|
|
9835
9835
|
}, P = async (D, I, U) => {
|
|
9836
|
-
|
|
9836
|
+
z(U);
|
|
9837
9837
|
try {
|
|
9838
9838
|
const se = new FormData();
|
|
9839
9839
|
se.append("prefix", I), Array.from(D).forEach((ge) => {
|
|
@@ -9853,7 +9853,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
9853
9853
|
variant: "destructive"
|
|
9854
9854
|
});
|
|
9855
9855
|
} finally {
|
|
9856
|
-
|
|
9856
|
+
z(null);
|
|
9857
9857
|
}
|
|
9858
9858
|
}, A = async (D) => {
|
|
9859
9859
|
N(!0);
|
|
@@ -9927,7 +9927,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
9927
9927
|
}), nt.current = !0, await Ve(), _({
|
|
9928
9928
|
title: "Item Renamed",
|
|
9929
9929
|
description: `Successfully renamed "${D.name}" to "${I}"`
|
|
9930
|
-
}),
|
|
9930
|
+
}), F(null), B("");
|
|
9931
9931
|
} catch (U) {
|
|
9932
9932
|
console.error("Error renaming item:", U), _({
|
|
9933
9933
|
title: "Error",
|
|
@@ -10016,8 +10016,8 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10016
10016
|
accessorKey: "name",
|
|
10017
10017
|
cell: ({ row: I }) => {
|
|
10018
10018
|
const U = I.original, se = U.key.substring(0, U.key.lastIndexOf("/")) || "/", ae = s.trim() !== "" && se !== l, ge = se.split("/").filter(Boolean);
|
|
10019
|
-
return /* @__PURE__ */
|
|
10020
|
-
/* @__PURE__ */
|
|
10019
|
+
return /* @__PURE__ */ O("div", { className: "flex flex-col", children: [
|
|
10020
|
+
/* @__PURE__ */ O(
|
|
10021
10021
|
"div",
|
|
10022
10022
|
{
|
|
10023
10023
|
className: `flex items-center gap-2 ${U.isFolder ? "cursor-pointer hover:text-blue-600" : ""}`,
|
|
@@ -10030,9 +10030,9 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10030
10030
|
]
|
|
10031
10031
|
}
|
|
10032
10032
|
),
|
|
10033
|
-
ae && /* @__PURE__ */
|
|
10033
|
+
ae && /* @__PURE__ */ O("div", { className: "text-sm text-gray-500 flex items-center", children: [
|
|
10034
10034
|
/* @__PURE__ */ p(Zr, { className: "h-4 w-4 text-gray-500 my-auto" }),
|
|
10035
|
-
/* @__PURE__ */
|
|
10035
|
+
/* @__PURE__ */ O("span", { className: "flex items-center ml-1", children: [
|
|
10036
10036
|
/* @__PURE__ */ p(
|
|
10037
10037
|
"span",
|
|
10038
10038
|
{
|
|
@@ -10043,7 +10043,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10043
10043
|
children: "/"
|
|
10044
10044
|
}
|
|
10045
10045
|
),
|
|
10046
|
-
ge.map((Te, ut) => /* @__PURE__ */
|
|
10046
|
+
ge.map((Te, ut) => /* @__PURE__ */ O("span", { className: "flex items-center", children: [
|
|
10047
10047
|
/* @__PURE__ */ p(
|
|
10048
10048
|
"span",
|
|
10049
10049
|
{
|
|
@@ -10085,7 +10085,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10085
10085
|
id: "actions",
|
|
10086
10086
|
header: "Actions",
|
|
10087
10087
|
accessorKey: "key",
|
|
10088
|
-
cell: ({ row: I }) => /* @__PURE__ */
|
|
10088
|
+
cell: ({ row: I }) => /* @__PURE__ */ O("div", { className: "flex items-center gap-2", children: [
|
|
10089
10089
|
/* @__PURE__ */ p(
|
|
10090
10090
|
pe,
|
|
10091
10091
|
{
|
|
@@ -10103,7 +10103,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10103
10103
|
variant: "ghost",
|
|
10104
10104
|
size: "icon",
|
|
10105
10105
|
onClick: () => {
|
|
10106
|
-
|
|
10106
|
+
F(I.original), B(I.original.name);
|
|
10107
10107
|
},
|
|
10108
10108
|
className: "h-8 w-8 p-0",
|
|
10109
10109
|
children: /* @__PURE__ */ p(Ed, { className: "h-4 w-4" })
|
|
@@ -10158,7 +10158,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10158
10158
|
}), _({
|
|
10159
10159
|
title: "File Saved",
|
|
10160
10160
|
description: "File content has been updated successfully"
|
|
10161
|
-
}), nt.current = !0, await Ve(),
|
|
10161
|
+
}), nt.current = !0, await Ve(), F(null), Pe(""), je("rename");
|
|
10162
10162
|
} catch (U) {
|
|
10163
10163
|
console.error("Error saving file content:", U), _({
|
|
10164
10164
|
title: "Error",
|
|
@@ -10171,8 +10171,8 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10171
10171
|
};
|
|
10172
10172
|
return qt(() => {
|
|
10173
10173
|
$ && Jn($) && (Yr($), je("rename"));
|
|
10174
|
-
}, [$]), /* @__PURE__ */
|
|
10175
|
-
/* @__PURE__ */ p(xl, { className: "s3-explr-breadcrumb", children: /* @__PURE__ */
|
|
10174
|
+
}, [$]), /* @__PURE__ */ O("div", { className: "space-y-4 s3-explr-container", children: [
|
|
10175
|
+
/* @__PURE__ */ p(xl, { className: "s3-explr-breadcrumb", children: /* @__PURE__ */ O(Cl, { className: "s3-explr-breadcrumb-list", children: [
|
|
10176
10176
|
/* @__PURE__ */ p(Uo, { className: "s3-explr-breadcrumb-item", children: /* @__PURE__ */ p(
|
|
10177
10177
|
Go,
|
|
10178
10178
|
{
|
|
@@ -10181,7 +10181,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10181
10181
|
children: e
|
|
10182
10182
|
}
|
|
10183
10183
|
) }),
|
|
10184
|
-
ne.map((D, I) => /* @__PURE__ */
|
|
10184
|
+
ne.map((D, I) => /* @__PURE__ */ O(ce, { children: [
|
|
10185
10185
|
/* @__PURE__ */ p(
|
|
10186
10186
|
Sl,
|
|
10187
10187
|
{
|
|
@@ -10201,7 +10201,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10201
10201
|
) }, `item-${D}`)
|
|
10202
10202
|
] }))
|
|
10203
10203
|
] }) }),
|
|
10204
|
-
/* @__PURE__ */
|
|
10204
|
+
/* @__PURE__ */ O("div", { className: "flex items-center space-x-4 s3-explr-toolbar", children: [
|
|
10205
10205
|
/* @__PURE__ */ p("div", { className: "relative max-w-sm w-full s3-explr-search-container", children: /* @__PURE__ */ p(
|
|
10206
10206
|
nw,
|
|
10207
10207
|
{
|
|
@@ -10209,7 +10209,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10209
10209
|
onChange: (D) => i(D)
|
|
10210
10210
|
}
|
|
10211
10211
|
) }),
|
|
10212
|
-
/* @__PURE__ */
|
|
10212
|
+
/* @__PURE__ */ O(
|
|
10213
10213
|
pe,
|
|
10214
10214
|
{
|
|
10215
10215
|
variant: "outline",
|
|
@@ -10230,9 +10230,9 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10230
10230
|
]
|
|
10231
10231
|
}
|
|
10232
10232
|
),
|
|
10233
|
-
!r && /* @__PURE__ */
|
|
10234
|
-
a.size > 0 && /* @__PURE__ */
|
|
10235
|
-
/* @__PURE__ */
|
|
10233
|
+
!r && /* @__PURE__ */ O(ce, { children: [
|
|
10234
|
+
a.size > 0 && /* @__PURE__ */ O(ce, { children: [
|
|
10235
|
+
/* @__PURE__ */ O(
|
|
10236
10236
|
pe,
|
|
10237
10237
|
{
|
|
10238
10238
|
variant: "outline",
|
|
@@ -10248,8 +10248,8 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10248
10248
|
]
|
|
10249
10249
|
}
|
|
10250
10250
|
),
|
|
10251
|
-
/* @__PURE__ */
|
|
10252
|
-
/* @__PURE__ */ p(hr, { asChild: !0, children: /* @__PURE__ */
|
|
10251
|
+
/* @__PURE__ */ O(Qt, { open: R, onOpenChange: M, children: [
|
|
10252
|
+
/* @__PURE__ */ p(hr, { asChild: !0, children: /* @__PURE__ */ O(
|
|
10253
10253
|
pe,
|
|
10254
10254
|
{
|
|
10255
10255
|
variant: "destructive",
|
|
@@ -10263,16 +10263,16 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10263
10263
|
]
|
|
10264
10264
|
}
|
|
10265
10265
|
) }),
|
|
10266
|
-
/* @__PURE__ */
|
|
10267
|
-
/* @__PURE__ */
|
|
10266
|
+
/* @__PURE__ */ O(Vt, { className: "s3-explr-dialog-content", children: [
|
|
10267
|
+
/* @__PURE__ */ O(Bt, { className: "s3-explr-dialog-header", children: [
|
|
10268
10268
|
/* @__PURE__ */ p(zt, { className: "s3-explr-dialog-title", children: "Confirm Bulk Deletion" }),
|
|
10269
|
-
/* @__PURE__ */
|
|
10269
|
+
/* @__PURE__ */ O(Jo, { className: "s3-explr-dialog-description", children: [
|
|
10270
10270
|
"Are you sure you want to delete ",
|
|
10271
10271
|
a.size,
|
|
10272
10272
|
" selected items? This action cannot be undone."
|
|
10273
10273
|
] })
|
|
10274
10274
|
] }),
|
|
10275
|
-
/* @__PURE__ */
|
|
10275
|
+
/* @__PURE__ */ O(sr, { className: "s3-explr-dialog-footer", children: [
|
|
10276
10276
|
/* @__PURE__ */ p(
|
|
10277
10277
|
pe,
|
|
10278
10278
|
{
|
|
@@ -10289,7 +10289,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10289
10289
|
onClick: L,
|
|
10290
10290
|
disabled: b,
|
|
10291
10291
|
className: "s3-explr-confirm-delete-btn",
|
|
10292
|
-
children: b ? /* @__PURE__ */
|
|
10292
|
+
children: b ? /* @__PURE__ */ O(ce, { children: [
|
|
10293
10293
|
/* @__PURE__ */ p(Ae, { className: "mr-2 h-4 w-4 animate-spin s3-explr-loader" }),
|
|
10294
10294
|
"Deleting..."
|
|
10295
10295
|
] }) : "Delete Selected"
|
|
@@ -10299,8 +10299,8 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10299
10299
|
] })
|
|
10300
10300
|
] })
|
|
10301
10301
|
] }),
|
|
10302
|
-
/* @__PURE__ */
|
|
10303
|
-
/* @__PURE__ */ p(hr, { asChild: !0, children: /* @__PURE__ */
|
|
10302
|
+
/* @__PURE__ */ O(Qt, { open: g, onOpenChange: h, children: [
|
|
10303
|
+
/* @__PURE__ */ p(hr, { asChild: !0, children: /* @__PURE__ */ O(
|
|
10304
10304
|
pe,
|
|
10305
10305
|
{
|
|
10306
10306
|
variant: "outline",
|
|
@@ -10312,10 +10312,10 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10312
10312
|
]
|
|
10313
10313
|
}
|
|
10314
10314
|
) }),
|
|
10315
|
-
/* @__PURE__ */
|
|
10315
|
+
/* @__PURE__ */ O(Vt, { className: "s3-explr-dialog-content", children: [
|
|
10316
10316
|
/* @__PURE__ */ p(Bt, { className: "s3-explr-dialog-header", children: /* @__PURE__ */ p(zt, { className: "s3-explr-dialog-title", children: "Create New Folder" }) }),
|
|
10317
|
-
/* @__PURE__ */
|
|
10318
|
-
/* @__PURE__ */
|
|
10317
|
+
/* @__PURE__ */ O("div", { className: "space-y-4 py-4 s3-explr-dialog-body", children: [
|
|
10318
|
+
/* @__PURE__ */ O("div", { className: "space-y-2 s3-explr-input-group", children: [
|
|
10319
10319
|
/* @__PURE__ */ p(Rn, { htmlFor: "name", className: "s3-explr-label", children: "Folder Name" }),
|
|
10320
10320
|
/* @__PURE__ */ p(
|
|
10321
10321
|
Tt,
|
|
@@ -10329,7 +10329,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10329
10329
|
}
|
|
10330
10330
|
)
|
|
10331
10331
|
] }),
|
|
10332
|
-
/* @__PURE__ */
|
|
10332
|
+
/* @__PURE__ */ O(
|
|
10333
10333
|
pe,
|
|
10334
10334
|
{
|
|
10335
10335
|
onClick: () => {
|
|
@@ -10346,7 +10346,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10346
10346
|
] })
|
|
10347
10347
|
] })
|
|
10348
10348
|
] }),
|
|
10349
|
-
/* @__PURE__ */
|
|
10349
|
+
/* @__PURE__ */ O("div", { className: "flex items-center gap-2 s3-explr-upload-group", children: [
|
|
10350
10350
|
/* @__PURE__ */ p(
|
|
10351
10351
|
pe,
|
|
10352
10352
|
{
|
|
@@ -10361,10 +10361,10 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10361
10361
|
}, D.click();
|
|
10362
10362
|
},
|
|
10363
10363
|
disabled: j !== null,
|
|
10364
|
-
children: j === "files" ? /* @__PURE__ */
|
|
10364
|
+
children: j === "files" ? /* @__PURE__ */ O(ce, { children: [
|
|
10365
10365
|
/* @__PURE__ */ p(Ae, { className: "h-4 w-4 animate-spin mr-2 s3-explr-loader" }),
|
|
10366
10366
|
"Uploading..."
|
|
10367
|
-
] }) : /* @__PURE__ */
|
|
10367
|
+
] }) : /* @__PURE__ */ O(ce, { children: [
|
|
10368
10368
|
/* @__PURE__ */ p(bd, { className: "h-4 w-4 s3-explr-upload-icon" }),
|
|
10369
10369
|
"Upload Files"
|
|
10370
10370
|
] })
|
|
@@ -10384,26 +10384,26 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10384
10384
|
}, D.click();
|
|
10385
10385
|
},
|
|
10386
10386
|
disabled: j !== null,
|
|
10387
|
-
children: j === "folder" ? /* @__PURE__ */
|
|
10387
|
+
children: j === "folder" ? /* @__PURE__ */ O(ce, { children: [
|
|
10388
10388
|
/* @__PURE__ */ p(Ae, { className: "h-4 w-4 animate-spin mr-2 s3-explr-loader" }),
|
|
10389
10389
|
"Uploading..."
|
|
10390
|
-
] }) : /* @__PURE__ */
|
|
10390
|
+
] }) : /* @__PURE__ */ O(ce, { children: [
|
|
10391
10391
|
/* @__PURE__ */ p(Zr, { className: "h-4 w-4 s3-explr-folder-icon" }),
|
|
10392
10392
|
"Upload Folder"
|
|
10393
10393
|
] })
|
|
10394
10394
|
}
|
|
10395
10395
|
)
|
|
10396
10396
|
] }),
|
|
10397
|
-
/* @__PURE__ */ p(Qt, { open: !!w, onOpenChange: (D) => !D && x(null), children: /* @__PURE__ */
|
|
10398
|
-
/* @__PURE__ */
|
|
10397
|
+
/* @__PURE__ */ p(Qt, { open: !!w, onOpenChange: (D) => !D && x(null), children: /* @__PURE__ */ O(Vt, { className: "s3-explr-dialog-content", children: [
|
|
10398
|
+
/* @__PURE__ */ O(Bt, { className: "s3-explr-dialog-header", children: [
|
|
10399
10399
|
/* @__PURE__ */ p(zt, { className: "s3-explr-dialog-title", children: "Confirm Deletion" }),
|
|
10400
|
-
/* @__PURE__ */
|
|
10400
|
+
/* @__PURE__ */ O(Jo, { className: "s3-explr-dialog-description", children: [
|
|
10401
10401
|
"Are you sure you want to delete ",
|
|
10402
10402
|
w == null ? void 0 : w.name,
|
|
10403
10403
|
"? This action cannot be undone."
|
|
10404
10404
|
] })
|
|
10405
10405
|
] }),
|
|
10406
|
-
/* @__PURE__ */
|
|
10406
|
+
/* @__PURE__ */ O(sr, { className: "s3-explr-dialog-footer", children: [
|
|
10407
10407
|
/* @__PURE__ */ p(
|
|
10408
10408
|
pe,
|
|
10409
10409
|
{
|
|
@@ -10420,7 +10420,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10420
10420
|
onClick: () => A(w),
|
|
10421
10421
|
disabled: E,
|
|
10422
10422
|
className: "s3-explr-confirm-delete-btn",
|
|
10423
|
-
children: E ? /* @__PURE__ */
|
|
10423
|
+
children: E ? /* @__PURE__ */ O(ce, { children: [
|
|
10424
10424
|
/* @__PURE__ */ p(Ae, { className: "mr-2 h-4 w-4 animate-spin s3-explr-loader" }),
|
|
10425
10425
|
"Deleting..."
|
|
10426
10426
|
] }) : "Delete"
|
|
@@ -10433,21 +10433,21 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10433
10433
|
{
|
|
10434
10434
|
open: !!$,
|
|
10435
10435
|
onOpenChange: (D) => {
|
|
10436
|
-
D || (
|
|
10436
|
+
D || (F(null), B(""), Pe(""), je("rename"));
|
|
10437
10437
|
},
|
|
10438
|
-
children: /* @__PURE__ */
|
|
10438
|
+
children: /* @__PURE__ */ O(Vt, { className: "s3-explr-dialog-content max-w-2xl", children: [
|
|
10439
10439
|
/* @__PURE__ */ p(Bt, { className: "s3-explr-dialog-header", children: /* @__PURE__ */ p(zt, { className: "s3-explr-dialog-title", children: $ != null && $.isFolder ? "Rename Folder" : Jn($) ? "Manage File" : "Rename File" }) }),
|
|
10440
|
-
$ && !$.isFolder && Jn($) ? /* @__PURE__ */
|
|
10440
|
+
$ && !$.isFolder && Jn($) ? /* @__PURE__ */ O(
|
|
10441
10441
|
fv,
|
|
10442
10442
|
{
|
|
10443
10443
|
value: wt,
|
|
10444
10444
|
onValueChange: (D) => je(D),
|
|
10445
10445
|
children: [
|
|
10446
|
-
/* @__PURE__ */
|
|
10446
|
+
/* @__PURE__ */ O(Uc, { className: "grid w-full grid-cols-2", children: [
|
|
10447
10447
|
/* @__PURE__ */ p(os, { value: "rename", children: "Rename" }),
|
|
10448
10448
|
/* @__PURE__ */ p(os, { value: "edit", children: "Edit Content" })
|
|
10449
10449
|
] }),
|
|
10450
|
-
/* @__PURE__ */ p(ss, { value: "rename", children: /* @__PURE__ */ p("div", { className: "space-y-4 py-4 s3-explr-dialog-body", children: /* @__PURE__ */
|
|
10450
|
+
/* @__PURE__ */ p(ss, { value: "rename", children: /* @__PURE__ */ p("div", { className: "space-y-4 py-4 s3-explr-dialog-body", children: /* @__PURE__ */ O("div", { className: "space-y-2 s3-explr-input-group", children: [
|
|
10451
10451
|
/* @__PURE__ */ p(Rn, { htmlFor: "newName", className: "s3-explr-label", children: "New Name" }),
|
|
10452
10452
|
/* @__PURE__ */ p(
|
|
10453
10453
|
Tt,
|
|
@@ -10461,7 +10461,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10461
10461
|
}
|
|
10462
10462
|
)
|
|
10463
10463
|
] }) }) }),
|
|
10464
|
-
/* @__PURE__ */ p(ss, { value: "edit", children: /* @__PURE__ */ p("div", { className: "space-y-4 py-4", children: He ? /* @__PURE__ */ p("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ p(Ae, { className: "h-6 w-6 animate-spin" }) }) : /* @__PURE__ */
|
|
10464
|
+
/* @__PURE__ */ p(ss, { value: "edit", children: /* @__PURE__ */ p("div", { className: "space-y-4 py-4", children: He ? /* @__PURE__ */ p("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ p(Ae, { className: "h-6 w-6 animate-spin" }) }) : /* @__PURE__ */ O("div", { className: "space-y-2", children: [
|
|
10465
10465
|
/* @__PURE__ */ p(Rn, { htmlFor: "content", className: "s3-explr-label", children: "File Content" }),
|
|
10466
10466
|
/* @__PURE__ */ p(
|
|
10467
10467
|
vr,
|
|
@@ -10477,7 +10477,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10477
10477
|
] }) }) })
|
|
10478
10478
|
]
|
|
10479
10479
|
}
|
|
10480
|
-
) : /* @__PURE__ */ p("div", { className: "space-y-4 py-4 s3-explr-dialog-body", children: /* @__PURE__ */
|
|
10480
|
+
) : /* @__PURE__ */ p("div", { className: "space-y-4 py-4 s3-explr-dialog-body", children: /* @__PURE__ */ O("div", { className: "space-y-2 s3-explr-input-group", children: [
|
|
10481
10481
|
/* @__PURE__ */ p(Rn, { htmlFor: "newName", className: "s3-explr-label", children: "New Name" }),
|
|
10482
10482
|
/* @__PURE__ */ p(
|
|
10483
10483
|
Tt,
|
|
@@ -10491,13 +10491,13 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10491
10491
|
}
|
|
10492
10492
|
)
|
|
10493
10493
|
] }) }),
|
|
10494
|
-
/* @__PURE__ */
|
|
10494
|
+
/* @__PURE__ */ O(sr, { className: "s3-explr-dialog-footer", children: [
|
|
10495
10495
|
/* @__PURE__ */ p(
|
|
10496
10496
|
pe,
|
|
10497
10497
|
{
|
|
10498
10498
|
variant: "outline",
|
|
10499
10499
|
onClick: () => {
|
|
10500
|
-
|
|
10500
|
+
F(null), B(""), Pe("");
|
|
10501
10501
|
},
|
|
10502
10502
|
className: "s3-explr-cancel-btn",
|
|
10503
10503
|
children: "Cancel"
|
|
@@ -10509,7 +10509,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10509
10509
|
onClick: () => $ && hn($, oe),
|
|
10510
10510
|
disabled: kt || He,
|
|
10511
10511
|
className: "s3-explr-save-btn",
|
|
10512
|
-
children: kt ? /* @__PURE__ */
|
|
10512
|
+
children: kt ? /* @__PURE__ */ O(ce, { children: [
|
|
10513
10513
|
/* @__PURE__ */ p(Ae, { className: "mr-2 h-4 w-4 animate-spin s3-explr-loader" }),
|
|
10514
10514
|
"Saving..."
|
|
10515
10515
|
] }) : "Save Changes"
|
|
@@ -10522,7 +10522,7 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10522
10522
|
},
|
|
10523
10523
|
disabled: q || !G.trim() || G.trim() === ($ == null ? void 0 : $.name),
|
|
10524
10524
|
className: "s3-explr-rename-btn",
|
|
10525
|
-
children: q ? /* @__PURE__ */
|
|
10525
|
+
children: q ? /* @__PURE__ */ O(ce, { children: [
|
|
10526
10526
|
/* @__PURE__ */ p(Ae, { className: "mr-2 h-4 w-4 animate-spin s3-explr-loader" }),
|
|
10527
10527
|
"Renaming..."
|
|
10528
10528
|
] }) : "Rename"
|
|
@@ -10535,14 +10535,14 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10535
10535
|
] })
|
|
10536
10536
|
] }),
|
|
10537
10537
|
$t && /* @__PURE__ */ p("div", { className: "bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative s3-explr-error", children: "An error occurred while fetching files" }),
|
|
10538
|
-
/* @__PURE__ */ p("div", { className: "rounded-md border s3-explr-table-container", children: /* @__PURE__ */
|
|
10538
|
+
/* @__PURE__ */ p("div", { className: "rounded-md border s3-explr-table-container", children: /* @__PURE__ */ O($r, { className: "s3-explr-table", children: [
|
|
10539
10539
|
/* @__PURE__ */ p(Ir, { className: "s3-explr-table-header", children: Ge.getHeaderGroups().map((D) => /* @__PURE__ */ p(qe, { className: "hover:bg-transparent s3-explr-header-row", children: D.headers.map((I) => /* @__PURE__ */ p(tt, { className: "s3-explr-header-cell", children: I.isPlaceholder ? null : fr(I.column.columnDef.header, I.getContext()) }, I.id)) }, D.id)) }),
|
|
10540
10540
|
/* @__PURE__ */ p(Lr, { className: "s3-explr-table-body", children: Ge.getRowModel().rows.length === 0 ? /* @__PURE__ */ p(qe, { className: "s3-explr-empty-row", children: /* @__PURE__ */ p(
|
|
10541
10541
|
Fe,
|
|
10542
10542
|
{
|
|
10543
10543
|
colSpan: he.length,
|
|
10544
10544
|
className: "h-24 text-center s3-explr-empty-cell",
|
|
10545
|
-
children: s ? /* @__PURE__ */
|
|
10545
|
+
children: s ? /* @__PURE__ */ O("div", { className: "text-gray-500 s3-explr-no-results", children: [
|
|
10546
10546
|
'No files or folders found matching "',
|
|
10547
10547
|
s,
|
|
10548
10548
|
'"'
|
|
@@ -10550,8 +10550,8 @@ const nw = ys(({ onChange: e }, t) => {
|
|
|
10550
10550
|
}
|
|
10551
10551
|
) }) : Ge.getRowModel().rows.map((D) => /* @__PURE__ */ p(qe, { className: "h-12 s3-explr-row", children: D.getVisibleCells().map((I) => /* @__PURE__ */ p(Fe, { className: "align-middle s3-explr-cell", children: fr(I.column.columnDef.cell, I.getContext()) }, I.id)) }, D.id)) })
|
|
10552
10552
|
] }) }),
|
|
10553
|
-
r && o && /* @__PURE__ */
|
|
10554
|
-
/* @__PURE__ */
|
|
10553
|
+
r && o && /* @__PURE__ */ O("div", { className: "flex justify-between items-center mt-4 s3-explr-selector-footer", children: [
|
|
10554
|
+
/* @__PURE__ */ O("div", { className: "text-sm text-gray-500 s3-explr-selection-count", children: [
|
|
10555
10555
|
a.size,
|
|
10556
10556
|
" ",
|
|
10557
10557
|
a.size === 1 ? "file" : "files",
|
|
@@ -10595,7 +10595,7 @@ function Be(e) {
|
|
|
10595
10595
|
return e;
|
|
10596
10596
|
return t;
|
|
10597
10597
|
}
|
|
10598
|
-
var jr = (e) => Array.isArray(e) ? e.filter(Boolean) : [], me = (e) => e === void 0,
|
|
10598
|
+
var jr = (e) => Array.isArray(e) ? e.filter(Boolean) : [], me = (e) => e === void 0, H = (e, t, n) => {
|
|
10599
10599
|
if (!t || !ve(e))
|
|
10600
10600
|
return n;
|
|
10601
10601
|
const r = jr(t.split(/[,[\].]+?/)).reduce((o, s) => Ee(o) ? o : o[s], e);
|
|
@@ -10664,7 +10664,7 @@ function fw(e) {
|
|
|
10664
10664
|
};
|
|
10665
10665
|
}, [e.disabled]);
|
|
10666
10666
|
}
|
|
10667
|
-
var it = (e) => typeof e == "string", pw = (e, t, n, r, o) => it(e) ? (r && t.watch.add(e),
|
|
10667
|
+
var it = (e) => typeof e == "string", pw = (e, t, n, r, o) => it(e) ? (r && t.watch.add(e), H(n, e, o)) : Array.isArray(e) ? e.map((s) => (r && t.watch.add(s), H(n, s))) : (r && (t.watchAll = !0), n), gw = (e, t, n, r, o) => t ? {
|
|
10668
10668
|
...n[e],
|
|
10669
10669
|
types: {
|
|
10670
10670
|
...n[e] && n[e].types ? n[e].types : {},
|
|
@@ -10679,7 +10679,7 @@ var it = (e) => typeof e == "string", pw = (e, t, n, r, o) => it(e) ? (r && t.wa
|
|
|
10679
10679
|
}), sa = (e, t, n) => !n && (t.watchAll || t.watch.has(e) || [...t.watch].some((r) => e.startsWith(r) && /^\.\w+/.test(e.slice(r.length))));
|
|
10680
10680
|
const Pn = (e, t, n, r) => {
|
|
10681
10681
|
for (const o of n || Object.keys(e)) {
|
|
10682
|
-
const s =
|
|
10682
|
+
const s = H(e, o);
|
|
10683
10683
|
if (s) {
|
|
10684
10684
|
const { _f: i, ...a } = s;
|
|
10685
10685
|
if (i) {
|
|
@@ -10695,7 +10695,7 @@ const Pn = (e, t, n, r) => {
|
|
|
10695
10695
|
}
|
|
10696
10696
|
};
|
|
10697
10697
|
var mw = (e, t, n) => {
|
|
10698
|
-
const r = cr(
|
|
10698
|
+
const r = cr(H(e, n));
|
|
10699
10699
|
return fe(r, "root", t[n]), fe(e, n, r), e;
|
|
10700
10700
|
}, Ws = (e) => e.type === "file", st = (e) => typeof e == "function", yr = (e) => {
|
|
10701
10701
|
if (!Us)
|
|
@@ -10740,18 +10740,18 @@ var Jt = (e) => ve(e) && !wr(e) ? e : {
|
|
|
10740
10740
|
value: e,
|
|
10741
10741
|
message: ""
|
|
10742
10742
|
}, ua = async (e, t, n, r, o) => {
|
|
10743
|
-
const { ref: s, refs: i, required: a, maxLength: c, minLength: l, min: d, max: g, pattern: h, validate: f, name: v, valueAsNumber: m, mount: y, disabled: w } = e._f, x =
|
|
10743
|
+
const { ref: s, refs: i, required: a, maxLength: c, minLength: l, min: d, max: g, pattern: h, validate: f, name: v, valueAsNumber: m, mount: y, disabled: w } = e._f, x = H(t, v);
|
|
10744
10744
|
if (!y || w)
|
|
10745
10745
|
return {};
|
|
10746
10746
|
const E = i ? i[0] : s, N = (_) => {
|
|
10747
10747
|
r && E.reportValidity && (E.setCustomValidity(rt(_) ? "" : _ || ""), E.reportValidity());
|
|
10748
|
-
}, b = {}, S = qs(s), R = Dn(s), M = S || R, j = (m || Ws(s)) && me(s.value) && me(x) || yr(s) && s.value === "" || x === "" || Array.isArray(x) && !x.length,
|
|
10749
|
-
const q = _ ? $ :
|
|
10748
|
+
}, b = {}, S = qs(s), R = Dn(s), M = S || R, j = (m || Ws(s)) && me(s.value) && me(x) || yr(s) && s.value === "" || x === "" || Array.isArray(x) && !x.length, z = gw.bind(null, v, n, b), Z = (_, $, F, G = ft.maxLength, B = ft.minLength) => {
|
|
10749
|
+
const q = _ ? $ : F;
|
|
10750
10750
|
b[v] = {
|
|
10751
10751
|
type: _ ? G : B,
|
|
10752
10752
|
message: q,
|
|
10753
10753
|
ref: s,
|
|
10754
|
-
...
|
|
10754
|
+
...z(_ ? G : B, q)
|
|
10755
10755
|
};
|
|
10756
10756
|
};
|
|
10757
10757
|
if (o ? !Array.isArray(x) || !x.length : a && (!M && (j || Ee(x)) || rt(x) && !x || R && !Eu(i).isValid || S && !Nu(i).isValid)) {
|
|
@@ -10760,26 +10760,26 @@ var Jt = (e) => ve(e) && !wr(e) ? e : {
|
|
|
10760
10760
|
type: ft.required,
|
|
10761
10761
|
message: $,
|
|
10762
10762
|
ref: E,
|
|
10763
|
-
...
|
|
10763
|
+
...z(ft.required, $)
|
|
10764
10764
|
}, !n))
|
|
10765
10765
|
return N($), b;
|
|
10766
10766
|
}
|
|
10767
10767
|
if (!j && (!Ee(d) || !Ee(g))) {
|
|
10768
10768
|
let _, $;
|
|
10769
|
-
const
|
|
10769
|
+
const F = Jt(g), G = Jt(d);
|
|
10770
10770
|
if (!Ee(x) && !isNaN(x)) {
|
|
10771
10771
|
const B = s.valueAsNumber || x && +x;
|
|
10772
|
-
Ee(
|
|
10772
|
+
Ee(F.value) || (_ = B > F.value), Ee(G.value) || ($ = B < G.value);
|
|
10773
10773
|
} else {
|
|
10774
10774
|
const B = s.valueAsDate || new Date(x), q = (ue) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + ue), K = s.type == "time", te = s.type == "week";
|
|
10775
|
-
it(
|
|
10775
|
+
it(F.value) && x && (_ = K ? q(x) > q(F.value) : te ? x > F.value : B > new Date(F.value)), it(G.value) && x && ($ = K ? q(x) < q(G.value) : te ? x < G.value : B < new Date(G.value));
|
|
10776
10776
|
}
|
|
10777
|
-
if ((_ || $) && (Z(!!_,
|
|
10777
|
+
if ((_ || $) && (Z(!!_, F.message, G.message, ft.max, ft.min), !n))
|
|
10778
10778
|
return N(b[v].message), b;
|
|
10779
10779
|
}
|
|
10780
10780
|
if ((c || l) && !j && (it(x) || o && Array.isArray(x))) {
|
|
10781
|
-
const _ = Jt(c), $ = Jt(l),
|
|
10782
|
-
if ((
|
|
10781
|
+
const _ = Jt(c), $ = Jt(l), F = !Ee(_.value) && x.length > +_.value, G = !Ee($.value) && x.length < +$.value;
|
|
10782
|
+
if ((F || G) && (Z(F, _.message, $.message), !n))
|
|
10783
10783
|
return N(b[v].message), b;
|
|
10784
10784
|
}
|
|
10785
10785
|
if (h && !j && it(x)) {
|
|
@@ -10788,7 +10788,7 @@ var Jt = (e) => ve(e) && !wr(e) ? e : {
|
|
|
10788
10788
|
type: ft.pattern,
|
|
10789
10789
|
message: $,
|
|
10790
10790
|
ref: s,
|
|
10791
|
-
...
|
|
10791
|
+
...z(ft.pattern, $)
|
|
10792
10792
|
}, !n))
|
|
10793
10793
|
return N($), b;
|
|
10794
10794
|
}
|
|
@@ -10797,7 +10797,7 @@ var Jt = (e) => ve(e) && !wr(e) ? e : {
|
|
|
10797
10797
|
const _ = await f(x, t), $ = ca(_, E);
|
|
10798
10798
|
if ($ && (b[v] = {
|
|
10799
10799
|
...$,
|
|
10800
|
-
...
|
|
10800
|
+
...z(ft.validate, $.message)
|
|
10801
10801
|
}, !n))
|
|
10802
10802
|
return N($.message), b;
|
|
10803
10803
|
} else if (ve(f)) {
|
|
@@ -10805,11 +10805,11 @@ var Jt = (e) => ve(e) && !wr(e) ? e : {
|
|
|
10805
10805
|
for (const $ in f) {
|
|
10806
10806
|
if (!_e(_) && !n)
|
|
10807
10807
|
break;
|
|
10808
|
-
const
|
|
10809
|
-
|
|
10810
|
-
...
|
|
10811
|
-
...
|
|
10812
|
-
}, N(
|
|
10808
|
+
const F = ca(await f[$](x, t), E, $);
|
|
10809
|
+
F && (_ = {
|
|
10810
|
+
...F,
|
|
10811
|
+
...z($, F.message)
|
|
10812
|
+
}, N(F.message), n && (b[v] = _));
|
|
10813
10813
|
}
|
|
10814
10814
|
if (!_e(_) && (b[v] = {
|
|
10815
10815
|
ref: E,
|
|
@@ -10906,7 +10906,7 @@ function Po(e) {
|
|
|
10906
10906
|
var ww = (e, t, n, r) => {
|
|
10907
10907
|
const o = {};
|
|
10908
10908
|
for (const s of e) {
|
|
10909
|
-
const i =
|
|
10909
|
+
const i = H(t, s);
|
|
10910
10910
|
i && fe(o, s, i._f);
|
|
10911
10911
|
}
|
|
10912
10912
|
return {
|
|
@@ -10919,7 +10919,7 @@ var ww = (e, t, n, r) => {
|
|
|
10919
10919
|
const da = "AsyncFunction";
|
|
10920
10920
|
var bw = (e) => !!e && !!e.validate && !!(st(e.validate) && e.validate.constructor.name === da || ve(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === da)), xw = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
|
|
10921
10921
|
function fa(e, t, n) {
|
|
10922
|
-
const r =
|
|
10922
|
+
const r = H(e, n);
|
|
10923
10923
|
if (r || Gs(n))
|
|
10924
10924
|
return {
|
|
10925
10925
|
error: r,
|
|
@@ -10927,7 +10927,7 @@ function fa(e, t, n) {
|
|
|
10927
10927
|
};
|
|
10928
10928
|
const o = n.split(".");
|
|
10929
10929
|
for (; o.length; ) {
|
|
10930
|
-
const s = o.join("."), i =
|
|
10930
|
+
const s = o.join("."), i = H(t, s), a = H(e, s);
|
|
10931
10931
|
if (i && !Array.isArray(i) && n !== s)
|
|
10932
10932
|
return { name: n };
|
|
10933
10933
|
if (a && a.type)
|
|
@@ -10941,7 +10941,7 @@ function fa(e, t, n) {
|
|
|
10941
10941
|
name: n
|
|
10942
10942
|
};
|
|
10943
10943
|
}
|
|
10944
|
-
var Cw = (e, t, n, r, o) => o.isOnAll ? !1 : !n && o.isOnTouch ? !(t || e) : (n ? r.isOnBlur : o.isOnBlur) ? !e : (n ? r.isOnChange : o.isOnChange) ? e : !0, Sw = (e, t) => !jr(
|
|
10944
|
+
var Cw = (e, t, n, r, o) => o.isOnAll ? !1 : !n && o.isOnTouch ? !(t || e) : (n ? r.isOnBlur : o.isOnBlur) ? !e : (n ? r.isOnChange : o.isOnChange) ? e : !0, Sw = (e, t) => !jr(H(e, t)).length && be(e, t);
|
|
10945
10945
|
const Rw = {
|
|
10946
10946
|
mode: We.onSubmit,
|
|
10947
10947
|
reValidateMode: We.onChange,
|
|
@@ -10991,7 +10991,7 @@ function Ew(e = {}) {
|
|
|
10991
10991
|
clearTimeout(l), l = setTimeout(C, P);
|
|
10992
10992
|
}, y = async (C) => {
|
|
10993
10993
|
if (!t.disabled && (d.isValid || C)) {
|
|
10994
|
-
const P = t.resolver ? _e((await M()).errors) : await
|
|
10994
|
+
const P = t.resolver ? _e((await M()).errors) : await z(r, !0);
|
|
10995
10995
|
P !== n.isValid && g.state.next({
|
|
10996
10996
|
isValid: P
|
|
10997
10997
|
});
|
|
@@ -11005,16 +11005,16 @@ function Ew(e = {}) {
|
|
|
11005
11005
|
}));
|
|
11006
11006
|
}, x = (C, P = [], A, V, L = !0, k = !0) => {
|
|
11007
11007
|
if (V && A && !t.disabled) {
|
|
11008
|
-
if (i.action = !0, k && Array.isArray(
|
|
11009
|
-
const W = A(
|
|
11008
|
+
if (i.action = !0, k && Array.isArray(H(r, C))) {
|
|
11009
|
+
const W = A(H(r, C), V.argA, V.argB);
|
|
11010
11010
|
L && fe(r, C, W);
|
|
11011
11011
|
}
|
|
11012
|
-
if (k && Array.isArray(
|
|
11013
|
-
const W = A(
|
|
11012
|
+
if (k && Array.isArray(H(n.errors, C))) {
|
|
11013
|
+
const W = A(H(n.errors, C), V.argA, V.argB);
|
|
11014
11014
|
L && fe(n.errors, C, W), Sw(n.errors, C);
|
|
11015
11015
|
}
|
|
11016
|
-
if (d.touchedFields && k && Array.isArray(
|
|
11017
|
-
const W = A(
|
|
11016
|
+
if (d.touchedFields && k && Array.isArray(H(n.touchedFields, C))) {
|
|
11017
|
+
const W = A(H(n.touchedFields, C), V.argA, V.argB);
|
|
11018
11018
|
L && fe(n.touchedFields, C, W);
|
|
11019
11019
|
}
|
|
11020
11020
|
d.dirtyFields && (n.dirtyFields = Cn(o, s)), g.state.next({
|
|
@@ -11036,9 +11036,9 @@ function Ew(e = {}) {
|
|
|
11036
11036
|
isValid: !1
|
|
11037
11037
|
});
|
|
11038
11038
|
}, b = (C, P, A, V) => {
|
|
11039
|
-
const L =
|
|
11039
|
+
const L = H(r, C);
|
|
11040
11040
|
if (L) {
|
|
11041
|
-
const k =
|
|
11041
|
+
const k = H(s, C, me(A) ? H(o, C) : A);
|
|
11042
11042
|
me(k) || V && V.defaultChecked || P ? fe(s, C, P ? k : Po(L._f)) : G(C, k), i.mount && y();
|
|
11043
11043
|
}
|
|
11044
11044
|
}, S = (C, P, A, V, L) => {
|
|
@@ -11047,21 +11047,21 @@ function Ew(e = {}) {
|
|
|
11047
11047
|
name: C
|
|
11048
11048
|
};
|
|
11049
11049
|
if (!t.disabled) {
|
|
11050
|
-
const ye = !!(
|
|
11050
|
+
const ye = !!(H(r, C) && H(r, C)._f && H(r, C)._f.disabled);
|
|
11051
11051
|
if (!A || V) {
|
|
11052
11052
|
d.isDirty && (W = n.isDirty, n.isDirty = ne.isDirty = _(), k = W !== ne.isDirty);
|
|
11053
|
-
const he = ye || Et(
|
|
11054
|
-
W = !!(!ye &&
|
|
11053
|
+
const he = ye || Et(H(o, C), P);
|
|
11054
|
+
W = !!(!ye && H(n.dirtyFields, C)), he || ye ? be(n.dirtyFields, C) : fe(n.dirtyFields, C, !0), ne.dirtyFields = n.dirtyFields, k = k || d.dirtyFields && W !== !he;
|
|
11055
11055
|
}
|
|
11056
11056
|
if (A) {
|
|
11057
|
-
const he =
|
|
11057
|
+
const he = H(n.touchedFields, C);
|
|
11058
11058
|
he || (fe(n.touchedFields, C, A), ne.touchedFields = n.touchedFields, k = k || d.touchedFields && he !== A);
|
|
11059
11059
|
}
|
|
11060
11060
|
k && L && g.state.next(ne);
|
|
11061
11061
|
}
|
|
11062
11062
|
return k ? ne : {};
|
|
11063
11063
|
}, R = (C, P, A, V) => {
|
|
11064
|
-
const L =
|
|
11064
|
+
const L = H(n.errors, C), k = d.isValid && rt(P) && n.isValid !== P;
|
|
11065
11065
|
if (t.delayError && A ? (c = m(() => E(C, A)), c(t.delayError)) : (clearTimeout(l), c = null, A ? fe(n.errors, C, A) : be(n.errors, C)), (A ? !Et(L, A) : L) || !_e(V) || k) {
|
|
11066
11066
|
const W = {
|
|
11067
11067
|
...V,
|
|
@@ -11082,13 +11082,13 @@ function Ew(e = {}) {
|
|
|
11082
11082
|
const { errors: P } = await M(C);
|
|
11083
11083
|
if (C)
|
|
11084
11084
|
for (const A of C) {
|
|
11085
|
-
const V =
|
|
11085
|
+
const V = H(P, A);
|
|
11086
11086
|
V ? fe(n.errors, A, V) : be(n.errors, A);
|
|
11087
11087
|
}
|
|
11088
11088
|
else
|
|
11089
11089
|
n.errors = P;
|
|
11090
11090
|
return P;
|
|
11091
|
-
},
|
|
11091
|
+
}, z = async (C, P, A = {
|
|
11092
11092
|
valid: !0
|
|
11093
11093
|
}) => {
|
|
11094
11094
|
for (const V in C) {
|
|
@@ -11101,22 +11101,22 @@ function Ew(e = {}) {
|
|
|
11101
11101
|
const he = await ua(L, s, v, t.shouldUseNativeValidation && !P, ne);
|
|
11102
11102
|
if (ye && d.validatingFields && w([V]), he[k.name] && (A.valid = !1, P))
|
|
11103
11103
|
break;
|
|
11104
|
-
!P && (
|
|
11104
|
+
!P && (H(he, k.name) ? ne ? mw(n.errors, he, k.name) : fe(n.errors, k.name, he[k.name]) : be(n.errors, k.name));
|
|
11105
11105
|
}
|
|
11106
|
-
!_e(W) && await
|
|
11106
|
+
!_e(W) && await z(W, P, A);
|
|
11107
11107
|
}
|
|
11108
11108
|
}
|
|
11109
11109
|
return A.valid;
|
|
11110
11110
|
}, Z = () => {
|
|
11111
11111
|
for (const C of a.unMount) {
|
|
11112
|
-
const P =
|
|
11112
|
+
const P = H(r, C);
|
|
11113
11113
|
P && (P._f.refs ? P._f.refs.every((A) => !No(A)) : !No(P._f.ref)) && yt(C);
|
|
11114
11114
|
}
|
|
11115
11115
|
a.unMount = /* @__PURE__ */ new Set();
|
|
11116
11116
|
}, _ = (C, P) => !t.disabled && (C && P && fe(s, C, P), !Et(oe(), o)), $ = (C, P, A) => pw(C, a, {
|
|
11117
11117
|
...i.mount ? s : me(P) ? o : it(C) ? { [C]: P } : P
|
|
11118
|
-
}, A, P),
|
|
11119
|
-
const V =
|
|
11118
|
+
}, A, P), F = (C) => jr(H(i.mount ? s : o, C, t.shouldUnregister ? H(o, C, []) : [])), G = (C, P, A = {}) => {
|
|
11119
|
+
const V = H(r, C);
|
|
11120
11120
|
let L = P;
|
|
11121
11121
|
if (V) {
|
|
11122
11122
|
const k = V._f;
|
|
@@ -11128,11 +11128,11 @@ function Ew(e = {}) {
|
|
|
11128
11128
|
(A.shouldDirty || A.shouldTouch) && S(C, L, A.shouldTouch, A.shouldDirty, !0), A.shouldValidate && ue(C);
|
|
11129
11129
|
}, B = (C, P, A) => {
|
|
11130
11130
|
for (const V in P) {
|
|
11131
|
-
const L = P[V], k = `${C}.${V}`, W =
|
|
11131
|
+
const L = P[V], k = `${C}.${V}`, W = H(r, k);
|
|
11132
11132
|
(a.array.has(C) || ve(L) || W && !W._f) && !Ht(L) ? B(k, L, A) : G(k, L, A);
|
|
11133
11133
|
}
|
|
11134
11134
|
}, q = (C, P, A = {}) => {
|
|
11135
|
-
const V =
|
|
11135
|
+
const V = H(r, C), L = a.array.has(C), k = Be(P);
|
|
11136
11136
|
fe(s, C, k), L ? (g.array.next({
|
|
11137
11137
|
name: C,
|
|
11138
11138
|
values: { ...s }
|
|
@@ -11148,12 +11148,12 @@ function Ew(e = {}) {
|
|
|
11148
11148
|
i.mount = !0;
|
|
11149
11149
|
const P = C.target;
|
|
11150
11150
|
let A = P.name, V = !0;
|
|
11151
|
-
const L =
|
|
11152
|
-
V = Number.isNaN(ne) || Ht(ne) && isNaN(ne.getTime()) || Et(ne,
|
|
11151
|
+
const L = H(r, A), k = () => P.type ? Po(L._f) : iw(C), W = (ne) => {
|
|
11152
|
+
V = Number.isNaN(ne) || Ht(ne) && isNaN(ne.getTime()) || Et(ne, H(s, A, ne));
|
|
11153
11153
|
};
|
|
11154
11154
|
if (L) {
|
|
11155
11155
|
let ne, ye;
|
|
11156
|
-
const he = k(), Ge = C.type === ra.BLUR || C.type === ra.FOCUS_OUT, Yr = !xw(L._f) && !t.resolver && !
|
|
11156
|
+
const he = k(), Ge = C.type === ra.BLUR || C.type === ra.FOCUS_OUT, Yr = !xw(L._f) && !t.resolver && !H(n.errors, A) && !L._f.deps || Cw(Ge, H(n.touchedFields, A), n.isSubmitted, f, h), hn = sa(A, a, Ge);
|
|
11157
11157
|
fe(s, A, he), Ge ? (L._f.onBlur && L._f.onBlur(C), c && c(0)) : L._f.onChange && L._f.onChange(C);
|
|
11158
11158
|
const D = S(A, he, Ge, !1), I = !_e(D) || hn;
|
|
11159
11159
|
if (!Ge && g.values.next({
|
|
@@ -11169,22 +11169,22 @@ function Ew(e = {}) {
|
|
|
11169
11169
|
ne = ae.error, A = ae.name, ye = _e(U);
|
|
11170
11170
|
}
|
|
11171
11171
|
} else
|
|
11172
|
-
w([A], !0), ne = (await ua(L, s, v, t.shouldUseNativeValidation))[A], w([A]), W(he), V && (ne ? ye = !1 : d.isValid && (ye = await
|
|
11172
|
+
w([A], !0), ne = (await ua(L, s, v, t.shouldUseNativeValidation))[A], w([A]), W(he), V && (ne ? ye = !1 : d.isValid && (ye = await z(r, !0)));
|
|
11173
11173
|
V && (L._f.deps && ue(L._f.deps), R(A, ye, ne, D));
|
|
11174
11174
|
}
|
|
11175
11175
|
}, te = (C, P) => {
|
|
11176
|
-
if (
|
|
11176
|
+
if (H(n.errors, P) && C.focus)
|
|
11177
11177
|
return C.focus(), 1;
|
|
11178
11178
|
}, ue = async (C, P = {}) => {
|
|
11179
11179
|
let A, V;
|
|
11180
11180
|
const L = cr(C);
|
|
11181
11181
|
if (t.resolver) {
|
|
11182
11182
|
const k = await j(me(C) ? C : L);
|
|
11183
|
-
A = _e(k), V = C ? !L.some((W) =>
|
|
11183
|
+
A = _e(k), V = C ? !L.some((W) => H(k, W)) : A;
|
|
11184
11184
|
} else C ? (V = (await Promise.all(L.map(async (k) => {
|
|
11185
|
-
const W =
|
|
11186
|
-
return await
|
|
11187
|
-
}))).every(Boolean), !(!V && !n.isValid) && y()) : V = A = await
|
|
11185
|
+
const W = H(r, k);
|
|
11186
|
+
return await z(W && W._f ? { [k]: W } : W);
|
|
11187
|
+
}))).every(Boolean), !(!V && !n.isValid) && y()) : V = A = await z(r);
|
|
11188
11188
|
return g.state.next({
|
|
11189
11189
|
...!it(C) || d.isValid && A !== n.isValid ? {} : { name: C },
|
|
11190
11190
|
...t.resolver || !C ? { isValid: A } : {},
|
|
@@ -11194,19 +11194,19 @@ function Ew(e = {}) {
|
|
|
11194
11194
|
const P = {
|
|
11195
11195
|
...i.mount ? s : o
|
|
11196
11196
|
};
|
|
11197
|
-
return me(C) ? P : it(C) ?
|
|
11197
|
+
return me(C) ? P : it(C) ? H(P, C) : C.map((A) => H(P, A));
|
|
11198
11198
|
}, Pe = (C, P) => ({
|
|
11199
|
-
invalid: !!
|
|
11200
|
-
isDirty: !!
|
|
11201
|
-
error:
|
|
11202
|
-
isValidating: !!
|
|
11203
|
-
isTouched: !!
|
|
11199
|
+
invalid: !!H((P || n).errors, C),
|
|
11200
|
+
isDirty: !!H((P || n).dirtyFields, C),
|
|
11201
|
+
error: H((P || n).errors, C),
|
|
11202
|
+
isValidating: !!H(n.validatingFields, C),
|
|
11203
|
+
isTouched: !!H((P || n).touchedFields, C)
|
|
11204
11204
|
}), He = (C) => {
|
|
11205
11205
|
C && cr(C).forEach((P) => be(n.errors, P)), g.state.next({
|
|
11206
11206
|
errors: C ? n.errors : {}
|
|
11207
11207
|
});
|
|
11208
11208
|
}, Qe = (C, P, A) => {
|
|
11209
|
-
const V = (
|
|
11209
|
+
const V = (H(r, C, { _f: {} })._f || {}).ref, L = H(n.errors, C) || {}, { ref: k, message: W, type: ne, ...ye } = L;
|
|
11210
11210
|
fe(n.errors, C, {
|
|
11211
11211
|
...ye,
|
|
11212
11212
|
...P,
|
|
@@ -11229,11 +11229,11 @@ function Ew(e = {}) {
|
|
|
11229
11229
|
}), !P.keepIsValid && y();
|
|
11230
11230
|
}, wt = ({ disabled: C, name: P, field: A, fields: V, value: L }) => {
|
|
11231
11231
|
if (rt(C) && i.mount || C) {
|
|
11232
|
-
const k = C ? void 0 : me(L) ? Po(A ? A._f :
|
|
11232
|
+
const k = C ? void 0 : me(L) ? Po(A ? A._f : H(V, P)._f) : L;
|
|
11233
11233
|
(C || !C && !me(k)) && fe(s, P, k), S(P, k, !1, !1, !0);
|
|
11234
11234
|
}
|
|
11235
11235
|
}, je = (C, P = {}) => {
|
|
11236
|
-
let A =
|
|
11236
|
+
let A = H(r, C);
|
|
11237
11237
|
const V = rt(P.disabled) || rt(t.disabled);
|
|
11238
11238
|
return fe(r, C, {
|
|
11239
11239
|
...A || {},
|
|
@@ -11263,7 +11263,7 @@ function Ew(e = {}) {
|
|
|
11263
11263
|
onBlur: K,
|
|
11264
11264
|
ref: (L) => {
|
|
11265
11265
|
if (L) {
|
|
11266
|
-
je(C, P), A =
|
|
11266
|
+
je(C, P), A = H(r, C);
|
|
11267
11267
|
const k = me(L.value) && L.querySelectorAll && L.querySelectorAll("input,select,textarea")[0] || L, W = yw(k), ne = A._f.refs || [];
|
|
11268
11268
|
if (W ? ne.find((ye) => ye === k) : k === A._f.ref)
|
|
11269
11269
|
return;
|
|
@@ -11274,19 +11274,19 @@ function Ew(e = {}) {
|
|
|
11274
11274
|
refs: [
|
|
11275
11275
|
...ne.filter(No),
|
|
11276
11276
|
k,
|
|
11277
|
-
...Array.isArray(
|
|
11277
|
+
...Array.isArray(H(o, C)) ? [{}] : []
|
|
11278
11278
|
],
|
|
11279
11279
|
ref: { type: k.type, name: C }
|
|
11280
11280
|
} : { ref: k }
|
|
11281
11281
|
}
|
|
11282
11282
|
}), b(C, !1, void 0, k);
|
|
11283
11283
|
} else
|
|
11284
|
-
A =
|
|
11284
|
+
A = H(r, C, {}), A._f && (A._f.mount = !1), (t.shouldUnregister || P.shouldUnregister) && !(lw(a.array, C) && i.action) && a.unMount.add(C);
|
|
11285
11285
|
}
|
|
11286
11286
|
};
|
|
11287
11287
|
}, Ce = () => t.shouldFocusError && Pn(r, te, a.mount), bt = (C) => {
|
|
11288
11288
|
rt(C) && (g.state.next({ disabled: C }), Pn(r, (P, A) => {
|
|
11289
|
-
const V =
|
|
11289
|
+
const V = H(r, A);
|
|
11290
11290
|
V && (P.disabled = V._f.disabled || C, Array.isArray(V._f.refs) && V._f.refs.forEach((L) => {
|
|
11291
11291
|
L.disabled = V._f.disabled || C;
|
|
11292
11292
|
}));
|
|
@@ -11304,7 +11304,7 @@ function Ew(e = {}) {
|
|
|
11304
11304
|
const { errors: k, values: W } = await M();
|
|
11305
11305
|
n.errors = k, L = W;
|
|
11306
11306
|
} else
|
|
11307
|
-
await
|
|
11307
|
+
await z(r);
|
|
11308
11308
|
if (be(n.errors, "root"), _e(n.errors)) {
|
|
11309
11309
|
g.state.next({
|
|
11310
11310
|
errors: {}
|
|
@@ -11325,7 +11325,7 @@ function Ew(e = {}) {
|
|
|
11325
11325
|
}), V)
|
|
11326
11326
|
throw V;
|
|
11327
11327
|
}, Ve = (C, P = {}) => {
|
|
11328
|
-
|
|
11328
|
+
H(r, C) && (me(P.defaultValue) ? q(C, Be(H(o, C))) : (q(C, P.defaultValue), fe(o, C, Be(P.defaultValue))), P.keepTouched || be(n.touchedFields, C), P.keepDirty || (be(n.dirtyFields, C), n.isDirty = P.defaultValue ? _(C, Be(H(o, C))) : _()), P.keepError || (be(n.errors, C), d.isValid && y()), g.state.next({ ...n }));
|
|
11329
11329
|
}, Ue = (C, P = {}) => {
|
|
11330
11330
|
const A = C ? Be(C) : o, V = Be(A), L = _e(C), k = L ? o : V;
|
|
11331
11331
|
if (P.keepDefaultValues || (o = A), !P.keepValues) {
|
|
@@ -11335,11 +11335,11 @@ function Ew(e = {}) {
|
|
|
11335
11335
|
...Object.keys(Cn(o, s))
|
|
11336
11336
|
]);
|
|
11337
11337
|
for (const ne of Array.from(W))
|
|
11338
|
-
|
|
11338
|
+
H(n.dirtyFields, ne) ? fe(k, ne, H(s, ne)) : q(ne, H(k, ne));
|
|
11339
11339
|
} else {
|
|
11340
11340
|
if (Us && me(C))
|
|
11341
11341
|
for (const W of a.mount) {
|
|
11342
|
-
const ne =
|
|
11342
|
+
const ne = H(r, W);
|
|
11343
11343
|
if (ne && ne._f) {
|
|
11344
11344
|
const ye = Array.isArray(ne._f.refs) ? ne._f.refs[0] : ne._f.ref;
|
|
11345
11345
|
if (yr(ye)) {
|
|
@@ -11391,7 +11391,7 @@ function Ew(e = {}) {
|
|
|
11391
11391
|
_removeUnmounted: Z,
|
|
11392
11392
|
_updateFieldArray: x,
|
|
11393
11393
|
_updateDisabledField: wt,
|
|
11394
|
-
_getFieldArray:
|
|
11394
|
+
_getFieldArray: F,
|
|
11395
11395
|
_reset: Ue,
|
|
11396
11396
|
_resetDefaultValues: () => st(t.defaultValues) && t.defaultValues().then((C) => {
|
|
11397
11397
|
De(C, t.resetOptions), g.state.next({
|
|
@@ -11457,7 +11457,7 @@ function Ew(e = {}) {
|
|
|
11457
11457
|
unregister: yt,
|
|
11458
11458
|
setError: Qe,
|
|
11459
11459
|
setFocus: (C, P = {}) => {
|
|
11460
|
-
const A =
|
|
11460
|
+
const A = H(r, C), V = A && A._f;
|
|
11461
11461
|
if (V) {
|
|
11462
11462
|
const L = V.refs ? V.refs[0] : V.ref;
|
|
11463
11463
|
L.focus && (L.focus(), P.shouldSelect && st(L.select) && L.select());
|
|
@@ -11587,11 +11587,11 @@ var _w = "DismissableLayer", fs = "dismissableLayer.update", Fw = "dismissableLa
|
|
|
11587
11587
|
onDismiss: a,
|
|
11588
11588
|
...c
|
|
11589
11589
|
} = e, l = u.useContext(Fu), [d, g] = u.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, f] = u.useState({}), v = Mn(t, (R) => g(R)), m = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), w = m.indexOf(y), x = d ? m.indexOf(d) : -1, E = l.layersWithOutsidePointerEventsDisabled.size > 0, N = x >= w, b = kw((R) => {
|
|
11590
|
-
const M = R.target, j = [...l.branches].some((
|
|
11590
|
+
const M = R.target, j = [...l.branches].some((z) => z.contains(M));
|
|
11591
11591
|
!N || j || (o == null || o(R), i == null || i(R), R.defaultPrevented || a == null || a());
|
|
11592
11592
|
}, h), S = $w((R) => {
|
|
11593
11593
|
const M = R.target;
|
|
11594
|
-
[...l.branches].some((
|
|
11594
|
+
[...l.branches].some((z) => z.contains(M)) || (s == null || s(R), i == null || i(R), R.defaultPrevented || a == null || a());
|
|
11595
11595
|
}, h);
|
|
11596
11596
|
return Dl((R) => {
|
|
11597
11597
|
x === l.layers.size - 1 && (r == null || r(R), !R.defaultPrevented && a && (R.preventDefault(), a()));
|
|
@@ -11971,12 +11971,12 @@ const Ww = (e) => ({
|
|
|
11971
11971
|
}, f = Ys(o), v = Xs(f), m = await i.getDimensions(l), y = f === "y", w = y ? "top" : "left", x = y ? "bottom" : "right", E = y ? "clientHeight" : "clientWidth", N = s.reference[v] + s.reference[f] - h[f] - s.floating[v], b = h[f] - s.reference[f], S = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
|
|
11972
11972
|
let R = S ? S[E] : 0;
|
|
11973
11973
|
(!R || !await (i.isElement == null ? void 0 : i.isElement(S))) && (R = a.floating[E] || s.floating[v]);
|
|
11974
|
-
const M = N / 2 - b / 2, j = R / 2 - m[v] / 2 - 1,
|
|
11974
|
+
const M = N / 2 - b / 2, j = R / 2 - m[v] / 2 - 1, z = _t(g[w], j), Z = _t(g[x], j), _ = z, $ = R - m[v] - Z, F = R / 2 - m[v] / 2 + M, G = ps(_, F, $), B = !c.arrow && gn(o) != null && F !== G && s.reference[v] / 2 - (F < _ ? z : Z) - m[v] / 2 < 0, q = B ? F < _ ? F - _ : F - $ : 0;
|
|
11975
11975
|
return {
|
|
11976
11976
|
[f]: h[f] + q,
|
|
11977
11977
|
data: {
|
|
11978
11978
|
[f]: G,
|
|
11979
|
-
centerOffset:
|
|
11979
|
+
centerOffset: F - G - q,
|
|
11980
11980
|
...B && {
|
|
11981
11981
|
alignmentOffset: q
|
|
11982
11982
|
}
|
|
@@ -12011,33 +12011,33 @@ const Ww = (e) => ({
|
|
|
12011
12011
|
const w = vt(o), x = Ft(a), E = vt(a) === a, N = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), b = h || (E || !m ? [Cr(a)] : zw(a)), S = v !== "none";
|
|
12012
12012
|
!h && S && b.push(...jw(a, m, v, N));
|
|
12013
12013
|
const R = [a, ...b], M = await An(t, y), j = [];
|
|
12014
|
-
let
|
|
12014
|
+
let z = ((r = s.flip) == null ? void 0 : r.overflows) || [];
|
|
12015
12015
|
if (d && j.push(M[w]), g) {
|
|
12016
|
-
const
|
|
12017
|
-
j.push(M[
|
|
12016
|
+
const F = Bw(o, i, N);
|
|
12017
|
+
j.push(M[F[0]], M[F[1]]);
|
|
12018
12018
|
}
|
|
12019
|
-
if (
|
|
12019
|
+
if (z = [...z, {
|
|
12020
12020
|
placement: o,
|
|
12021
12021
|
overflows: j
|
|
12022
|
-
}], !j.every((
|
|
12022
|
+
}], !j.every((F) => F <= 0)) {
|
|
12023
12023
|
var Z, _;
|
|
12024
|
-
const
|
|
12024
|
+
const F = (((Z = s.flip) == null ? void 0 : Z.index) || 0) + 1, G = R[F];
|
|
12025
12025
|
if (G)
|
|
12026
12026
|
return {
|
|
12027
12027
|
data: {
|
|
12028
|
-
index:
|
|
12029
|
-
overflows:
|
|
12028
|
+
index: F,
|
|
12029
|
+
overflows: z
|
|
12030
12030
|
},
|
|
12031
12031
|
reset: {
|
|
12032
12032
|
placement: G
|
|
12033
12033
|
}
|
|
12034
12034
|
};
|
|
12035
|
-
let B = (_ =
|
|
12035
|
+
let B = (_ = z.filter((q) => q.overflows[0] <= 0).sort((q, K) => q.overflows[1] - K.overflows[1])[0]) == null ? void 0 : _.placement;
|
|
12036
12036
|
if (!B)
|
|
12037
12037
|
switch (f) {
|
|
12038
12038
|
case "bestFit": {
|
|
12039
12039
|
var $;
|
|
12040
|
-
const q = ($ =
|
|
12040
|
+
const q = ($ = z.filter((K) => {
|
|
12041
12041
|
if (S) {
|
|
12042
12042
|
const te = Ft(K.placement);
|
|
12043
12043
|
return te === x || // Create a bias to the `y` side axis due to horizontal
|
|
@@ -12288,8 +12288,8 @@ const Yw = function(e) {
|
|
|
12288
12288
|
const x = m - d.top - d.bottom, E = v - d.left - d.right, N = _t(m - d[y], x), b = _t(v - d[w], E), S = !t.middlewareData.shift;
|
|
12289
12289
|
let R = N, M = b;
|
|
12290
12290
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (M = E), (r = t.middlewareData.shift) != null && r.enabled.y && (R = x), S && !h) {
|
|
12291
|
-
const
|
|
12292
|
-
f ? M = v - 2 * (
|
|
12291
|
+
const z = Me(d.left, 0), Z = Me(d.right, 0), _ = Me(d.top, 0), $ = Me(d.bottom, 0);
|
|
12292
|
+
f ? M = v - 2 * (z !== 0 || Z !== 0 ? z + Z : Me(d.left, d.right)) : R = m - 2 * (_ !== 0 || $ !== 0 ? _ + $ : Me(d.top, d.bottom));
|
|
12293
12293
|
}
|
|
12294
12294
|
await c({
|
|
12295
12295
|
...t,
|
|
@@ -12861,7 +12861,7 @@ function Eb(e) {
|
|
|
12861
12861
|
K !== S.current && (S.current = K, m(K));
|
|
12862
12862
|
}, []), E = u.useCallback((K) => {
|
|
12863
12863
|
K !== R.current && (R.current = K, w(K));
|
|
12864
|
-
}, []), N = s || v, b = i || y, S = u.useRef(null), R = u.useRef(null), M = u.useRef(d), j = c != null,
|
|
12864
|
+
}, []), N = s || v, b = i || y, S = u.useRef(null), R = u.useRef(null), M = u.useRef(d), j = c != null, z = Ao(c), Z = Ao(o), _ = Ao(l), $ = u.useCallback(() => {
|
|
12865
12865
|
if (!S.current || !R.current)
|
|
12866
12866
|
return;
|
|
12867
12867
|
const K = {
|
|
@@ -12878,7 +12878,7 @@ function Eb(e) {
|
|
|
12878
12878
|
// setting it to `true` when `open === false` (must be specified).
|
|
12879
12879
|
isPositioned: _.current !== !1
|
|
12880
12880
|
};
|
|
12881
|
-
|
|
12881
|
+
F.current && !Rr(M.current, ue) && (M.current = ue, Nr.flushSync(() => {
|
|
12882
12882
|
g(ue);
|
|
12883
12883
|
}));
|
|
12884
12884
|
});
|
|
@@ -12889,16 +12889,16 @@ function Eb(e) {
|
|
|
12889
12889
|
isPositioned: !1
|
|
12890
12890
|
})));
|
|
12891
12891
|
}, [l]);
|
|
12892
|
-
const
|
|
12893
|
-
dr(() => (
|
|
12894
|
-
|
|
12892
|
+
const F = u.useRef(!1);
|
|
12893
|
+
dr(() => (F.current = !0, () => {
|
|
12894
|
+
F.current = !1;
|
|
12895
12895
|
}), []), dr(() => {
|
|
12896
12896
|
if (N && (S.current = N), b && (R.current = b), N && b) {
|
|
12897
|
-
if (
|
|
12898
|
-
return
|
|
12897
|
+
if (z.current)
|
|
12898
|
+
return z.current(N, b, $);
|
|
12899
12899
|
$();
|
|
12900
12900
|
}
|
|
12901
|
-
}, [N, b, $,
|
|
12901
|
+
}, [N, b, $, z, j]);
|
|
12902
12902
|
const G = u.useMemo(() => ({
|
|
12903
12903
|
reference: S,
|
|
12904
12904
|
floating: R,
|
|
@@ -13098,12 +13098,12 @@ var ni = "PopperContent", [zb, Hb] = Wu(ni), Zu = u.forwardRef(
|
|
|
13098
13098
|
updatePositionStrategy: f = "optimized",
|
|
13099
13099
|
onPlaced: v,
|
|
13100
13100
|
...m
|
|
13101
|
-
} = e, y = Ku(ni, n), [w, x] = u.useState(null), E = Uu(t, (Ue) => x(Ue)), [N, b] = u.useState(null), S = El(N), R = (S == null ? void 0 : S.width) ?? 0, M = (S == null ? void 0 : S.height) ?? 0, j = r + (s !== "center" ? "-" + s : ""),
|
|
13102
|
-
padding:
|
|
13101
|
+
} = e, y = Ku(ni, n), [w, x] = u.useState(null), E = Uu(t, (Ue) => x(Ue)), [N, b] = u.useState(null), S = El(N), R = (S == null ? void 0 : S.width) ?? 0, M = (S == null ? void 0 : S.height) ?? 0, j = r + (s !== "center" ? "-" + s : ""), z = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, Z = Array.isArray(l) ? l : [l], _ = Z.length > 0, $ = {
|
|
13102
|
+
padding: z,
|
|
13103
13103
|
boundary: Z.filter(Ub),
|
|
13104
13104
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
13105
13105
|
altBoundary: _
|
|
13106
|
-
}, { refs:
|
|
13106
|
+
}, { refs: F, floatingStyles: G, placement: B, isPositioned: q, middlewareData: K } = Eb({
|
|
13107
13107
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
13108
13108
|
strategy: "fixed",
|
|
13109
13109
|
placement: j,
|
|
@@ -13143,7 +13143,7 @@ var ni = "PopperContent", [zb, Hb] = Wu(ni), Zu = u.forwardRef(
|
|
|
13143
13143
|
}, [w]), /* @__PURE__ */ p(
|
|
13144
13144
|
"div",
|
|
13145
13145
|
{
|
|
13146
|
-
ref:
|
|
13146
|
+
ref: F.setFloating,
|
|
13147
13147
|
"data-radix-popper-content-wrapper": "",
|
|
13148
13148
|
style: {
|
|
13149
13149
|
...G,
|
|
@@ -13541,7 +13541,7 @@ var an = "TooltipContent", cd = u.forwardRef(
|
|
|
13541
13541
|
onPointerDownOutside: i,
|
|
13542
13542
|
onFocusOutside: (g) => g.preventDefault(),
|
|
13543
13543
|
onDismiss: d,
|
|
13544
|
-
children: /* @__PURE__ */
|
|
13544
|
+
children: /* @__PURE__ */ O(
|
|
13545
13545
|
Kb,
|
|
13546
13546
|
{
|
|
13547
13547
|
"data-state": c.stateAttribute,
|
|
@@ -13685,7 +13685,7 @@ const xx = vx, Cx = yx, Sx = wx, pd = u.forwardRef(({ className: e, sideOffset:
|
|
|
13685
13685
|
pd.displayName = fd.displayName;
|
|
13686
13686
|
const Ea = ({ className: e, children: t, content: n, side: r }) => {
|
|
13687
13687
|
const [o, s] = Q(!1);
|
|
13688
|
-
return /* @__PURE__ */ p(xx, { delayDuration: 0, children: /* @__PURE__ */
|
|
13688
|
+
return /* @__PURE__ */ p(xx, { delayDuration: 0, children: /* @__PURE__ */ O(Cx, { open: o, children: [
|
|
13689
13689
|
/* @__PURE__ */ p(Sx, { asChild: !0, children: /* @__PURE__ */ p(
|
|
13690
13690
|
"button",
|
|
13691
13691
|
{
|
|
@@ -13747,7 +13747,7 @@ Ln.displayName = "PaginationLink";
|
|
|
13747
13747
|
const li = ({
|
|
13748
13748
|
className: e,
|
|
13749
13749
|
...t
|
|
13750
|
-
}) => /* @__PURE__ */
|
|
13750
|
+
}) => /* @__PURE__ */ O(
|
|
13751
13751
|
Ln,
|
|
13752
13752
|
{
|
|
13753
13753
|
"aria-label": "Go to previous page",
|
|
@@ -13764,7 +13764,7 @@ li.displayName = "PaginationPrevious";
|
|
|
13764
13764
|
const ci = ({
|
|
13765
13765
|
className: e,
|
|
13766
13766
|
...t
|
|
13767
|
-
}) => /* @__PURE__ */
|
|
13767
|
+
}) => /* @__PURE__ */ O(
|
|
13768
13768
|
Ln,
|
|
13769
13769
|
{
|
|
13770
13770
|
"aria-label": "Go to next page",
|
|
@@ -13781,7 +13781,7 @@ ci.displayName = "PaginationNext";
|
|
|
13781
13781
|
const ui = ({
|
|
13782
13782
|
className: e,
|
|
13783
13783
|
...t
|
|
13784
|
-
}) => /* @__PURE__ */
|
|
13784
|
+
}) => /* @__PURE__ */ O(
|
|
13785
13785
|
"span",
|
|
13786
13786
|
{
|
|
13787
13787
|
"aria-hidden": !0,
|
|
@@ -13836,12 +13836,6 @@ const Mx = ({
|
|
|
13836
13836
|
accessorKey: "code",
|
|
13837
13837
|
cell: ({ row: S }) => /* @__PURE__ */ p("span", { className: "flex flex-col", children: S.original.code })
|
|
13838
13838
|
},
|
|
13839
|
-
{
|
|
13840
|
-
id: "fileName",
|
|
13841
|
-
header: "Tên file",
|
|
13842
|
-
accessorKey: "fileName",
|
|
13843
|
-
cell: ({ row: S }) => /* @__PURE__ */ p("span", { className: "flex flex-col", children: S.original.fileName })
|
|
13844
|
-
},
|
|
13845
13839
|
{
|
|
13846
13840
|
id: "content",
|
|
13847
13841
|
header: "Nội dung",
|
|
@@ -13880,24 +13874,21 @@ const Mx = ({
|
|
|
13880
13874
|
header: "Cập nhật",
|
|
13881
13875
|
accessorKey: "last-update",
|
|
13882
13876
|
cell: ({ row: S }) => {
|
|
13883
|
-
const
|
|
13884
|
-
return /* @__PURE__ */
|
|
13885
|
-
"tháng ",
|
|
13886
|
-
M
|
|
13887
|
-
] });
|
|
13877
|
+
const R = new Date(S.original.lastUpdate), M = R.getDate(), j = R.getMonth() + 1, z = `ngày ${M} tháng ${j}`;
|
|
13878
|
+
return /* @__PURE__ */ p("span", { className: "flex flex-col", children: z });
|
|
13888
13879
|
}
|
|
13889
13880
|
},
|
|
13890
13881
|
{
|
|
13891
13882
|
accessorKey: "edit",
|
|
13892
13883
|
header: () => /* @__PURE__ */ p("div", { className: "font-medium text-center", children: "Sửa" }),
|
|
13893
13884
|
cell: ({ row: S }) => {
|
|
13894
|
-
const [R, M] = Q(!1), [j,
|
|
13895
|
-
return /* @__PURE__ */
|
|
13885
|
+
const [R, M] = Q(!1), [j, z] = Q(!1), { handleSubmit: Z, register: _, reset: $ } = Nw(), F = S.original.id;
|
|
13886
|
+
return /* @__PURE__ */ O(
|
|
13896
13887
|
Qt,
|
|
13897
13888
|
{
|
|
13898
13889
|
open: j,
|
|
13899
13890
|
onOpenChange: (B) => {
|
|
13900
|
-
|
|
13891
|
+
z(B), B ? $({
|
|
13901
13892
|
content: S.original.content,
|
|
13902
13893
|
note: S.original.note
|
|
13903
13894
|
}) : $();
|
|
@@ -13906,14 +13897,14 @@ const Mx = ({
|
|
|
13906
13897
|
/* @__PURE__ */ p(hr, { className: "w-full", children: /* @__PURE__ */ p(
|
|
13907
13898
|
"div",
|
|
13908
13899
|
{
|
|
13909
|
-
onClick: () =>
|
|
13900
|
+
onClick: () => z((B) => !B),
|
|
13910
13901
|
className: "font-medium text-center text-orange-500 cursor-pointer",
|
|
13911
13902
|
children: "sửa"
|
|
13912
13903
|
}
|
|
13913
13904
|
) }),
|
|
13914
|
-
/* @__PURE__ */ p(Vt, { className: "rounded-lg sm:px-3 h-[calc(100dvh-200px)] min-w-[calc(100dvw-112px)]", children: /* @__PURE__ */
|
|
13905
|
+
/* @__PURE__ */ p(Vt, { className: "rounded-lg sm:px-3 h-[calc(100dvh-200px)] min-w-[calc(100dvw-112px)]", children: /* @__PURE__ */ O(Bt, { className: "flex flex-col gap-3", children: [
|
|
13915
13906
|
/* @__PURE__ */ p(zt, { className: "max-sm:hidden text-center", children: "Sửa summary" }),
|
|
13916
|
-
/* @__PURE__ */
|
|
13907
|
+
/* @__PURE__ */ O(
|
|
13917
13908
|
"form",
|
|
13918
13909
|
{
|
|
13919
13910
|
className: "flex flex-col gap-3 h-full justify-between",
|
|
@@ -13923,17 +13914,17 @@ const Mx = ({
|
|
|
13923
13914
|
const q = await ie.patch(`${e}/api/update-summary`, {
|
|
13924
13915
|
note: B.note,
|
|
13925
13916
|
text_summary: B.content,
|
|
13926
|
-
id:
|
|
13917
|
+
id: F
|
|
13927
13918
|
});
|
|
13928
|
-
q.status === 200 ? (await m(a),
|
|
13919
|
+
q.status === 200 ? (await m(a), z(!1)) : console.error("Failed to update summary:", q);
|
|
13929
13920
|
} catch (q) {
|
|
13930
13921
|
console.error("Error updating summary:", q);
|
|
13931
13922
|
}
|
|
13932
13923
|
return M(!1);
|
|
13933
13924
|
}),
|
|
13934
13925
|
children: [
|
|
13935
|
-
/* @__PURE__ */
|
|
13936
|
-
/* @__PURE__ */
|
|
13926
|
+
/* @__PURE__ */ O("div", { className: "flex flex-col gap-2", children: [
|
|
13927
|
+
/* @__PURE__ */ O("div", { className: "flex flex-col items-start", children: [
|
|
13937
13928
|
/* @__PURE__ */ p("span", { children: "Nội dung:" }),
|
|
13938
13929
|
/* @__PURE__ */ p(
|
|
13939
13930
|
vr,
|
|
@@ -13946,7 +13937,7 @@ const Mx = ({
|
|
|
13946
13937
|
}
|
|
13947
13938
|
)
|
|
13948
13939
|
] }),
|
|
13949
|
-
/* @__PURE__ */
|
|
13940
|
+
/* @__PURE__ */ O("div", { className: "flex flex-col items-start", children: [
|
|
13950
13941
|
/* @__PURE__ */ p("span", { children: "Lưu ý:" }),
|
|
13951
13942
|
/* @__PURE__ */ p(
|
|
13952
13943
|
vr,
|
|
@@ -13975,29 +13966,29 @@ const Mx = ({
|
|
|
13975
13966
|
header: "",
|
|
13976
13967
|
accessorKey: "publish",
|
|
13977
13968
|
cell: ({ row: S }) => {
|
|
13978
|
-
const [R, M] = Q(!1), [j,
|
|
13979
|
-
return /* @__PURE__ */
|
|
13969
|
+
const [R, M] = Q(!1), [j, z] = Q(!1), Z = S.original.id, _ = S.getValue("status"), $ = S.getValue("code"), G = new Date(S.original.lastUpdate).getMonth() + 1, [B, q] = Q(""), [K, te] = Q("1");
|
|
13970
|
+
return /* @__PURE__ */ O(
|
|
13980
13971
|
Qt,
|
|
13981
13972
|
{
|
|
13982
13973
|
open: j,
|
|
13983
13974
|
onOpenChange: (oe) => {
|
|
13984
|
-
|
|
13975
|
+
z(oe);
|
|
13985
13976
|
},
|
|
13986
13977
|
children: [
|
|
13987
13978
|
/* @__PURE__ */ p(hr, { className: "w-full", children: /* @__PURE__ */ p(
|
|
13988
13979
|
"div",
|
|
13989
13980
|
{
|
|
13990
|
-
onClick: () =>
|
|
13981
|
+
onClick: () => z((oe) => !oe),
|
|
13991
13982
|
className: "font-medium text-start text-green-400 cursor-pointer",
|
|
13992
13983
|
children: _ === "unpublish" ? "Publish" : "Unpublish"
|
|
13993
13984
|
}
|
|
13994
13985
|
) }),
|
|
13995
|
-
/* @__PURE__ */ p(Vt, { className: "rounded-lg sm:px-3 sm:w-[calc(100%-30px)]", children: /* @__PURE__ */
|
|
13996
|
-
/* @__PURE__ */
|
|
13986
|
+
/* @__PURE__ */ p(Vt, { className: "rounded-lg sm:px-3 sm:w-[calc(100%-30px)]", children: /* @__PURE__ */ O(Bt, { className: "flex flex-col gap-3", children: [
|
|
13987
|
+
/* @__PURE__ */ O(zt, { children: [
|
|
13997
13988
|
_ === "unpublish" ? "Publish" : "Unpublish",
|
|
13998
13989
|
" Summary?"
|
|
13999
13990
|
] }),
|
|
14000
|
-
/* @__PURE__ */
|
|
13991
|
+
/* @__PURE__ */ O("span", { children: [
|
|
14001
13992
|
"Bạn có muốn ",
|
|
14002
13993
|
_ === "unpublish" ? "publish" : "unpublish",
|
|
14003
13994
|
" summary mã ",
|
|
@@ -14007,7 +13998,7 @@ const Mx = ({
|
|
|
14007
13998
|
G,
|
|
14008
13999
|
" không?"
|
|
14009
14000
|
] }),
|
|
14010
|
-
/* @__PURE__ */
|
|
14001
|
+
/* @__PURE__ */ O("div", { children: [
|
|
14011
14002
|
/* @__PURE__ */ p("span", { children: "id:" }),
|
|
14012
14003
|
/* @__PURE__ */ p(
|
|
14013
14004
|
Tt,
|
|
@@ -14018,7 +14009,7 @@ const Mx = ({
|
|
|
14018
14009
|
}
|
|
14019
14010
|
)
|
|
14020
14011
|
] }),
|
|
14021
|
-
/* @__PURE__ */
|
|
14012
|
+
/* @__PURE__ */ O("div", { children: [
|
|
14022
14013
|
/* @__PURE__ */ p("span", { children: "bucket:" }),
|
|
14023
14014
|
/* @__PURE__ */ p(Tt, { value: B, onChange: (oe) => q(oe.target.value) })
|
|
14024
14015
|
] }),
|
|
@@ -14037,7 +14028,7 @@ const Mx = ({
|
|
|
14037
14028
|
summary_result: S.original.content,
|
|
14038
14029
|
note: S.original.note
|
|
14039
14030
|
});
|
|
14040
|
-
oe.status === 200 ? (m(a),
|
|
14031
|
+
oe.status === 200 ? (m(a), z(!1)) : console.error("Failed to toggle publish status:", oe);
|
|
14041
14032
|
} catch (oe) {
|
|
14042
14033
|
console.error("Error toggling publish status:", oe);
|
|
14043
14034
|
} finally {
|
|
@@ -14063,7 +14054,7 @@ const Mx = ({
|
|
|
14063
14054
|
getFilteredRowModel: mf(),
|
|
14064
14055
|
getCoreRowModel: La()
|
|
14065
14056
|
});
|
|
14066
|
-
return /* @__PURE__ */
|
|
14057
|
+
return /* @__PURE__ */ O("div", { className: "space-y-4 s3-explr-container", children: [
|
|
14067
14058
|
/* @__PURE__ */ p("div", { className: "flex items-center space-x-4 s3-explr-toolbar", children: /* @__PURE__ */ p(
|
|
14068
14059
|
Tt,
|
|
14069
14060
|
{
|
|
@@ -14076,11 +14067,11 @@ const Mx = ({
|
|
|
14076
14067
|
className: "max-w-sm"
|
|
14077
14068
|
}
|
|
14078
14069
|
) }),
|
|
14079
|
-
/* @__PURE__ */ p("div", { className: "rounded-md border s3-explr-table-container", children: /* @__PURE__ */
|
|
14070
|
+
/* @__PURE__ */ p("div", { className: "rounded-md border s3-explr-table-container", children: /* @__PURE__ */ O($r, { className: "s3-explr-table", children: [
|
|
14080
14071
|
/* @__PURE__ */ p(Ir, { className: "s3-explr-table-header", children: w.getHeaderGroups().map((b) => /* @__PURE__ */ p(qe, { className: "hover:bg-transparent s3-explr-header-row", children: b.headers.map((S) => /* @__PURE__ */ p(tt, { className: "s3-explr-header-cell", children: S.isPlaceholder ? null : fr(S.column.columnDef.header, S.getContext()) }, S.id)) }, b.id)) }),
|
|
14081
14072
|
/* @__PURE__ */ p(Lr, { className: "s3-explr-table-body", children: (E = w.getRowModel().rows) != null && E.length ? (N = w.getRowModel().rows) == null ? void 0 : N.map((b) => /* @__PURE__ */ p(qe, { className: "h-12 s3-explr-row", children: b.getVisibleCells().map((S) => /* @__PURE__ */ p(Fe, { className: "align-middle s3-explr-cell", children: fr(S.column.columnDef.cell, S.getContext()) }, S.id)) }, b.id)) : r ? /* @__PURE__ */ p(qe, { children: /* @__PURE__ */ p(Fe, { colSpan: y.length, className: "h-24 text-center", children: "loading..." }) }) : /* @__PURE__ */ p(qe, { children: /* @__PURE__ */ p(Fe, { colSpan: y.length, className: "h-24 text-center", children: "Không có kết quả." }) }) })
|
|
14082
14073
|
] }) }),
|
|
14083
|
-
/* @__PURE__ */ p("div", { className: "mt-4", children: /* @__PURE__ */ p(ii, { children: /* @__PURE__ */
|
|
14074
|
+
/* @__PURE__ */ p("div", { className: "mt-4", children: /* @__PURE__ */ p(ii, { children: /* @__PURE__ */ O(ai, { children: [
|
|
14084
14075
|
/* @__PURE__ */ p(mt, { children: /* @__PURE__ */ p(
|
|
14085
14076
|
li,
|
|
14086
14077
|
{
|
|
@@ -14090,7 +14081,7 @@ const Mx = ({
|
|
|
14090
14081
|
) }),
|
|
14091
14082
|
Array.from({ length: l }, (b, S) => S + 1).filter(
|
|
14092
14083
|
(b) => b === 1 || b === l || Math.abs(b - a) <= 1
|
|
14093
|
-
).map((b, S, R) => /* @__PURE__ */
|
|
14084
|
+
).map((b, S, R) => /* @__PURE__ */ O(ce, { children: [
|
|
14094
14085
|
S > 0 && R[S - 1] !== b - 1 && /* @__PURE__ */ p(mt, { children: /* @__PURE__ */ p(ui, {}) }, b + "..."),
|
|
14095
14086
|
/* @__PURE__ */ p(mt, { children: /* @__PURE__ */ p(
|
|
14096
14087
|
Ln,
|
|
@@ -14167,8 +14158,8 @@ const Mx = ({
|
|
|
14167
14158
|
const S = Math.floor(b / 60), R = (b % 60).toFixed(0);
|
|
14168
14159
|
return `${S}m ${R}s`;
|
|
14169
14160
|
};
|
|
14170
|
-
return /* @__PURE__ */
|
|
14171
|
-
/* @__PURE__ */
|
|
14161
|
+
return /* @__PURE__ */ O("div", { children: [
|
|
14162
|
+
/* @__PURE__ */ O("div", { className: "flex items-center gap-2 mb-6", children: [
|
|
14172
14163
|
/* @__PURE__ */ p(Jp, { className: "w-8 h-8 text-primary" }),
|
|
14173
14164
|
/* @__PURE__ */ p("h2", { className: "text-3xl font-bold tracking-tight", children: "Job Management" }),
|
|
14174
14165
|
/* @__PURE__ */ p(
|
|
@@ -14183,8 +14174,8 @@ const Mx = ({
|
|
|
14183
14174
|
}
|
|
14184
14175
|
)
|
|
14185
14176
|
] }),
|
|
14186
|
-
/* @__PURE__ */ p("div", { className: "rounded-md border", children: /* @__PURE__ */
|
|
14187
|
-
/* @__PURE__ */ p(Ir, { children: /* @__PURE__ */
|
|
14177
|
+
/* @__PURE__ */ p("div", { className: "rounded-md border", children: /* @__PURE__ */ O($r, { children: [
|
|
14178
|
+
/* @__PURE__ */ p(Ir, { children: /* @__PURE__ */ O(qe, { children: [
|
|
14188
14179
|
/* @__PURE__ */ p(tt, { children: "ID" }),
|
|
14189
14180
|
/* @__PURE__ */ p(tt, { children: "Tên Công Việc" }),
|
|
14190
14181
|
/* @__PURE__ */ p(tt, { children: "Thời Gian Bắt Đầu" }),
|
|
@@ -14195,7 +14186,7 @@ const Mx = ({
|
|
|
14195
14186
|
] }) }),
|
|
14196
14187
|
/* @__PURE__ */ p(Lr, { children: a && r.length === 0 ? /* @__PURE__ */ p(qe, { children: /* @__PURE__ */ p(Fe, { colSpan: 7, className: "text-center py-4", children: /* @__PURE__ */ p(Ae, { className: "w-6 h-6 animate-spin mx-auto" }) }) }) : r.map((b) => {
|
|
14197
14188
|
var S, R;
|
|
14198
|
-
return /* @__PURE__ */
|
|
14189
|
+
return /* @__PURE__ */ O(qe, { children: [
|
|
14199
14190
|
/* @__PURE__ */ p(Fe, { className: "!w-[100px]", children: b.id }),
|
|
14200
14191
|
/* @__PURE__ */ p(Fe, { className: "font-medium", children: (S = b.job_name) == null ? void 0 : S.replace("Upload file", "Summary") }),
|
|
14201
14192
|
/* @__PURE__ */ p(Fe, { className: "!w-[200px]", children: E(b.created_at) }),
|
|
@@ -14217,7 +14208,7 @@ const Mx = ({
|
|
|
14217
14208
|
onClick: () => w(b.id),
|
|
14218
14209
|
disabled: g.has(b.id.toString()),
|
|
14219
14210
|
className: "h-[32px]",
|
|
14220
|
-
children: g.has(b.id.toString()) ? /* @__PURE__ */
|
|
14211
|
+
children: g.has(b.id.toString()) ? /* @__PURE__ */ O(ce, { children: [
|
|
14221
14212
|
/* @__PURE__ */ p(Ae, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
14222
14213
|
"Đang thử lại..."
|
|
14223
14214
|
] }) : "Thử Lại"
|
|
@@ -14226,7 +14217,7 @@ const Mx = ({
|
|
|
14226
14217
|
] }, b.id);
|
|
14227
14218
|
}) })
|
|
14228
14219
|
] }) }),
|
|
14229
|
-
/* @__PURE__ */ p("div", { className: "mt-4", children: /* @__PURE__ */ p(ii, { children: /* @__PURE__ */
|
|
14220
|
+
/* @__PURE__ */ p("div", { className: "mt-4", children: /* @__PURE__ */ p(ii, { children: /* @__PURE__ */ O(ai, { children: [
|
|
14230
14221
|
/* @__PURE__ */ p(mt, { children: /* @__PURE__ */ p(
|
|
14231
14222
|
li,
|
|
14232
14223
|
{
|
|
@@ -14236,7 +14227,7 @@ const Mx = ({
|
|
|
14236
14227
|
) }),
|
|
14237
14228
|
Array.from({ length: s.totalPages }, (b, S) => S + 1).filter(
|
|
14238
14229
|
(b) => b === 1 || b === s.totalPages || Math.abs(b - t) <= 1
|
|
14239
|
-
).map((b, S, R) => /* @__PURE__ */
|
|
14230
|
+
).map((b, S, R) => /* @__PURE__ */ O(ce, { children: [
|
|
14240
14231
|
S > 0 && R[S - 1] !== b - 1 && /* @__PURE__ */ p(mt, { children: /* @__PURE__ */ p(ui, {}) }, b + "..."),
|
|
14241
14232
|
/* @__PURE__ */ p(mt, { children: /* @__PURE__ */ p(
|
|
14242
14233
|
Ln,
|