@overmap-ai/forms 1.0.17-master.5 → 1.0.17-master.7
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/forms.js +209 -213
- package/dist/forms.umd.cjs +1 -1
- package/package.json +4 -4
package/dist/forms.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var fr = Object.defineProperty;
|
|
2
2
|
var mr = (t, n, e) => n in t ? fr(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
|
|
3
3
|
var S = (t, n, e) => mr(t, typeof n != "symbol" ? n + "" : n, e);
|
|
4
|
-
import { jsxs as
|
|
4
|
+
import { jsxs as g, jsx as a, Fragment as Y } from "react/jsx-runtime";
|
|
5
5
|
import { Popover as Oe, IconButton as A, RiIcon as L, useViewportSize as Qt, ButtonGroup as pe, Badge as qe, Spinner as Be, Text as $e, Checkbox as dt, Input as oe, useToast as Jt, Button as Q, Card as Ve, Menu as $, TextArea as Wn, useSize as qn, Heading as Hn, Separator as Gn, useAlertDialog as hr, Tabs as xe, IconToggleButton as pr } from "@overmap-ai/blocks";
|
|
6
6
|
import * as p from "react";
|
|
7
7
|
import { memo as F, useCallback as I, useState as z, useRef as X, useLayoutEffect as zt, useEffect as q, useMemo as P, lazy as gr, Suspense as vr, forwardRef as He, createContext as yr, useContext as br, useReducer as wr, Fragment as xr } from "react";
|
|
@@ -27,7 +27,7 @@ const Qn = F((t) => {
|
|
|
27
27
|
},
|
|
28
28
|
[i]
|
|
29
29
|
);
|
|
30
|
-
return /* @__PURE__ */
|
|
30
|
+
return /* @__PURE__ */ g(Oe.Root, { children: [
|
|
31
31
|
/* @__PURE__ */ a(Oe.Trigger, { children: r }),
|
|
32
32
|
/* @__PURE__ */ a(Oe.Content, { size: "sm", children: /* @__PURE__ */ a("div", { className: "grid w-max grid-cols-7 gap-x-1 gap-y-1", children: e.map((l) => /* @__PURE__ */ a(
|
|
33
33
|
A,
|
|
@@ -98,13 +98,13 @@ function Yr(t, n = []) {
|
|
|
98
98
|
e = [...e, l];
|
|
99
99
|
const c = (u) => {
|
|
100
100
|
var C;
|
|
101
|
-
const { scope: h, children:
|
|
102
|
-
return /* @__PURE__ */ a(m.Provider, { value: y, children:
|
|
101
|
+
const { scope: h, children: v, ...w } = u, m = ((C = h == null ? void 0 : h[t]) == null ? void 0 : C[f]) || s, y = p.useMemo(() => w, Object.values(w));
|
|
102
|
+
return /* @__PURE__ */ a(m.Provider, { value: y, children: v });
|
|
103
103
|
};
|
|
104
104
|
c.displayName = o + "Provider";
|
|
105
105
|
function d(u, h) {
|
|
106
106
|
var m;
|
|
107
|
-
const
|
|
107
|
+
const v = ((m = h == null ? void 0 : h[t]) == null ? void 0 : m[f]) || s, w = p.useContext(v);
|
|
108
108
|
if (w) return w;
|
|
109
109
|
if (l !== void 0) return l;
|
|
110
110
|
throw new Error(`\`${u}\` must be used within \`${o}\``);
|
|
@@ -277,7 +277,7 @@ var co = "DismissableLayer", jt = "dismissableLayer.update", uo = "dismissableLa
|
|
|
277
277
|
onInteractOutside: l,
|
|
278
278
|
onDismiss: s,
|
|
279
279
|
...f
|
|
280
|
-
} = t, c = p.useContext(ei), [d, u] = p.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [,
|
|
280
|
+
} = t, c = p.useContext(ei), [d, u] = p.useState(null), h = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, v] = p.useState({}), w = we(n, (R) => u(R)), m = Array.from(c.layers), [y] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), C = m.indexOf(y), b = d ? m.indexOf(d) : -1, E = c.layersWithOutsidePointerEventsDisabled.size > 0, x = b >= C, N = po((R) => {
|
|
281
281
|
const O = R.target, M = [...c.branches].some((V) => V.contains(O));
|
|
282
282
|
!x || M || (r == null || r(R), l == null || l(R), R.defaultPrevented || s == null || s());
|
|
283
283
|
}, h), T = go((R) => {
|
|
@@ -294,7 +294,7 @@ var co = "DismissableLayer", jt = "dismissableLayer.update", uo = "dismissableLa
|
|
|
294
294
|
}, [d, h, e, c]), p.useEffect(() => () => {
|
|
295
295
|
d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Ln());
|
|
296
296
|
}, [d, c]), p.useEffect(() => {
|
|
297
|
-
const R = () =>
|
|
297
|
+
const R = () => v({});
|
|
298
298
|
return document.addEventListener(jt, R), () => document.removeEventListener(jt, R);
|
|
299
299
|
}, []), /* @__PURE__ */ a(
|
|
300
300
|
ce.div,
|
|
@@ -386,7 +386,7 @@ var Dt = "focusScope.autoFocusOnMount", kt = "focusScope.autoFocusOnUnmount", Tn
|
|
|
386
386
|
onMountAutoFocus: r,
|
|
387
387
|
onUnmountAutoFocus: o,
|
|
388
388
|
...l
|
|
389
|
-
} = t, [s, f] = p.useState(null), c = ge(r), d = ge(o), u = p.useRef(null), h = we(n, (m) => f(m)),
|
|
389
|
+
} = t, [s, f] = p.useState(null), c = ge(r), d = ge(o), u = p.useRef(null), h = we(n, (m) => f(m)), v = p.useRef({
|
|
390
390
|
paused: !1,
|
|
391
391
|
pause() {
|
|
392
392
|
this.paused = !0;
|
|
@@ -398,11 +398,11 @@ var Dt = "focusScope.autoFocusOnMount", kt = "focusScope.autoFocusOnUnmount", Tn
|
|
|
398
398
|
p.useEffect(() => {
|
|
399
399
|
if (i) {
|
|
400
400
|
let m = function(E) {
|
|
401
|
-
if (
|
|
401
|
+
if (v.paused || !s) return;
|
|
402
402
|
const x = E.target;
|
|
403
403
|
s.contains(x) ? u.current = x : ue(u.current, { select: !0 });
|
|
404
404
|
}, y = function(E) {
|
|
405
|
-
if (
|
|
405
|
+
if (v.paused || !s) return;
|
|
406
406
|
const x = E.relatedTarget;
|
|
407
407
|
x !== null && (s.contains(x) || ue(u.current, { select: !0 }));
|
|
408
408
|
}, C = function(E) {
|
|
@@ -416,9 +416,9 @@ var Dt = "focusScope.autoFocusOnMount", kt = "focusScope.autoFocusOnUnmount", Tn
|
|
|
416
416
|
document.removeEventListener("focusin", m), document.removeEventListener("focusout", y), b.disconnect();
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
}, [i, s,
|
|
419
|
+
}, [i, s, v.paused]), p.useEffect(() => {
|
|
420
420
|
if (s) {
|
|
421
|
-
Dn.add(
|
|
421
|
+
Dn.add(v);
|
|
422
422
|
const m = document.activeElement;
|
|
423
423
|
if (!s.contains(m)) {
|
|
424
424
|
const C = new CustomEvent(Dt, Tn);
|
|
@@ -427,21 +427,21 @@ var Dt = "focusScope.autoFocusOnMount", kt = "focusScope.autoFocusOnUnmount", Tn
|
|
|
427
427
|
return () => {
|
|
428
428
|
s.removeEventListener(Dt, c), setTimeout(() => {
|
|
429
429
|
const C = new CustomEvent(kt, Tn);
|
|
430
|
-
s.addEventListener(kt, d), s.dispatchEvent(C), C.defaultPrevented || ue(m ?? document.body, { select: !0 }), s.removeEventListener(kt, d), Dn.remove(
|
|
430
|
+
s.addEventListener(kt, d), s.dispatchEvent(C), C.defaultPrevented || ue(m ?? document.body, { select: !0 }), s.removeEventListener(kt, d), Dn.remove(v);
|
|
431
431
|
}, 0);
|
|
432
432
|
};
|
|
433
433
|
}
|
|
434
|
-
}, [s, c, d,
|
|
434
|
+
}, [s, c, d, v]);
|
|
435
435
|
const w = p.useCallback(
|
|
436
436
|
(m) => {
|
|
437
|
-
if (!e && !i ||
|
|
437
|
+
if (!e && !i || v.paused) return;
|
|
438
438
|
const y = m.key === "Tab" && !m.altKey && !m.ctrlKey && !m.metaKey, C = document.activeElement;
|
|
439
439
|
if (y && C) {
|
|
440
440
|
const b = m.currentTarget, [E, x] = bo(b);
|
|
441
441
|
E && x ? !m.shiftKey && C === x ? (m.preventDefault(), e && ue(E, { select: !0 })) : m.shiftKey && C === E && (m.preventDefault(), e && ue(x, { select: !0 })) : C === b && m.preventDefault();
|
|
442
442
|
}
|
|
443
443
|
},
|
|
444
|
-
[e, i,
|
|
444
|
+
[e, i, v.paused]
|
|
445
445
|
);
|
|
446
446
|
return /* @__PURE__ */ a(ce.div, { tabIndex: -1, ...l, ref: h, onKeyDown: w });
|
|
447
447
|
});
|
|
@@ -544,22 +544,22 @@ function Io(t) {
|
|
|
544
544
|
}, [s]), ut(() => {
|
|
545
545
|
const c = i.current, d = r.current;
|
|
546
546
|
if (d !== t) {
|
|
547
|
-
const h = o.current,
|
|
548
|
-
t ? f("MOUNT") :
|
|
547
|
+
const h = o.current, v = Je(c);
|
|
548
|
+
t ? f("MOUNT") : v === "none" || (c == null ? void 0 : c.display) === "none" ? f("UNMOUNT") : f(d && h !== v ? "ANIMATION_OUT" : "UNMOUNT"), r.current = t;
|
|
549
549
|
}
|
|
550
550
|
}, [t, f]), ut(() => {
|
|
551
551
|
if (n) {
|
|
552
552
|
let c;
|
|
553
|
-
const d = n.ownerDocument.defaultView ?? window, u = (
|
|
554
|
-
const m = Je(i.current).includes(
|
|
555
|
-
if (
|
|
553
|
+
const d = n.ownerDocument.defaultView ?? window, u = (v) => {
|
|
554
|
+
const m = Je(i.current).includes(v.animationName);
|
|
555
|
+
if (v.target === n && m && (f("ANIMATION_END"), !r.current)) {
|
|
556
556
|
const y = n.style.animationFillMode;
|
|
557
557
|
n.style.animationFillMode = "forwards", c = d.setTimeout(() => {
|
|
558
558
|
n.style.animationFillMode === "forwards" && (n.style.animationFillMode = y);
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
|
-
}, h = (
|
|
562
|
-
|
|
561
|
+
}, h = (v) => {
|
|
562
|
+
v.target === n && (o.current = Je(i.current));
|
|
563
563
|
};
|
|
564
564
|
return n.addEventListener("animationstart", h), n.addEventListener("animationcancel", u), n.addEventListener("animationend", u), () => {
|
|
565
565
|
d.clearTimeout(c), n.removeEventListener("animationstart", h), n.removeEventListener("animationcancel", u), n.removeEventListener("animationend", u);
|
|
@@ -743,11 +743,11 @@ var si = _o(), Ot = function() {
|
|
|
743
743
|
onScrollCapture: Ot,
|
|
744
744
|
onWheelCapture: Ot,
|
|
745
745
|
onTouchMoveCapture: Ot
|
|
746
|
-
}), r = i[0], o = i[1], l = t.forwardProps, s = t.children, f = t.className, c = t.removeScrollBar, d = t.enabled, u = t.shards, h = t.sideCar,
|
|
746
|
+
}), r = i[0], o = i[1], l = t.forwardProps, s = t.children, f = t.className, c = t.removeScrollBar, d = t.enabled, u = t.shards, h = t.sideCar, v = t.noIsolation, w = t.inert, m = t.allowPinchZoom, y = t.as, C = y === void 0 ? "div" : y, b = t.gapMode, E = ai(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = h, N = Po([e, n]), T = re(re({}, E), r);
|
|
747
747
|
return p.createElement(
|
|
748
748
|
p.Fragment,
|
|
749
749
|
null,
|
|
750
|
-
d && p.createElement(x, { sideCar: si, removeScrollBar: c, shards: u, noIsolation:
|
|
750
|
+
d && p.createElement(x, { sideCar: si, removeScrollBar: c, shards: u, noIsolation: v, inert: w, setCallbacks: o, allowPinchZoom: !!m, lockRef: e, gapMode: b }),
|
|
751
751
|
l ? p.cloneElement(p.Children.only(s), re(re({}, T), { ref: N })) : p.createElement(C, re({}, T, { className: f, ref: N }), s)
|
|
752
752
|
);
|
|
753
753
|
});
|
|
@@ -948,7 +948,7 @@ var Ce = Bt ? { passive: !1 } : !1, Jo = function(t) {
|
|
|
948
948
|
}, ra = function(t, n, e, i, r) {
|
|
949
949
|
var o = ia(t, window.getComputedStyle(n).direction), l = o * i, s = e.target, f = n.contains(s), c = !1, d = l > 0, u = 0, h = 0;
|
|
950
950
|
do {
|
|
951
|
-
var
|
|
951
|
+
var v = fi(t, s), w = v[0], m = v[1], y = v[2], C = m - y - o * w;
|
|
952
952
|
(w || C) && ui(t, s) && (u += C, h += w), s instanceof ShadowRoot ? s = s.host : s = s.parentNode;
|
|
953
953
|
} while (
|
|
954
954
|
// portaled content
|
|
@@ -1044,12 +1044,12 @@ function sa(t) {
|
|
|
1044
1044
|
}), document.removeEventListener("wheel", f, Ce), document.removeEventListener("touchmove", f, Ce), document.removeEventListener("touchstart", d, Ce);
|
|
1045
1045
|
};
|
|
1046
1046
|
}, []);
|
|
1047
|
-
var
|
|
1047
|
+
var v = t.removeScrollBar, w = t.inert;
|
|
1048
1048
|
return p.createElement(
|
|
1049
1049
|
p.Fragment,
|
|
1050
1050
|
null,
|
|
1051
1051
|
w ? p.createElement(o, { styles: aa(r) }) : null,
|
|
1052
|
-
|
|
1052
|
+
v ? p.createElement(Qo, { gapMode: t.gapMode }) : null
|
|
1053
1053
|
);
|
|
1054
1054
|
}
|
|
1055
1055
|
function ca(t) {
|
|
@@ -1091,7 +1091,7 @@ var ua = function(t) {
|
|
|
1091
1091
|
d(h);
|
|
1092
1092
|
else
|
|
1093
1093
|
try {
|
|
1094
|
-
var
|
|
1094
|
+
var v = h.getAttribute(i), w = v !== null && v !== "false", m = (Se.get(h) || 0) + 1, y = (o.get(h) || 0) + 1;
|
|
1095
1095
|
Se.set(h, m), o.set(h, y), l.push(h), m === 1 && w && tt.set(h, !0), y === 1 && h.setAttribute(e, "true"), w || h.setAttribute(i, "true");
|
|
1096
1096
|
} catch (C) {
|
|
1097
1097
|
console.error("aria-hidden: cannot operate on ", h, C);
|
|
@@ -1100,8 +1100,8 @@ var ua = function(t) {
|
|
|
1100
1100
|
};
|
|
1101
1101
|
return d(n), s.clear(), _t++, function() {
|
|
1102
1102
|
l.forEach(function(u) {
|
|
1103
|
-
var h = Se.get(u) - 1,
|
|
1104
|
-
Se.set(u, h), o.set(u,
|
|
1103
|
+
var h = Se.get(u) - 1, v = o.get(u) - 1;
|
|
1104
|
+
Se.set(u, h), o.set(u, v), h || (tt.has(u) || u.removeAttribute(i), tt.delete(u)), v || u.removeAttribute(e);
|
|
1105
1105
|
}), _t--, _t || (Se = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), nt = {});
|
|
1106
1106
|
};
|
|
1107
1107
|
}, ha = function(t, n, e) {
|
|
@@ -1252,7 +1252,7 @@ var ba = p.forwardRef(
|
|
|
1252
1252
|
), Ci = p.forwardRef(
|
|
1253
1253
|
(t, n) => {
|
|
1254
1254
|
const { __scopeDialog: e, trapFocus: i, onOpenAutoFocus: r, onCloseAutoFocus: o, ...l } = t, s = ee(ve, e), f = p.useRef(null), c = we(n, f);
|
|
1255
|
-
return Lo(), /* @__PURE__ */
|
|
1255
|
+
return Lo(), /* @__PURE__ */ g(Y, { children: [
|
|
1256
1256
|
/* @__PURE__ */ a(
|
|
1257
1257
|
ii,
|
|
1258
1258
|
{
|
|
@@ -1276,7 +1276,7 @@ var ba = p.forwardRef(
|
|
|
1276
1276
|
)
|
|
1277
1277
|
}
|
|
1278
1278
|
),
|
|
1279
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ g(Y, { children: [
|
|
1280
1280
|
/* @__PURE__ */ a(Sa, { titleId: s.titleId }),
|
|
1281
1281
|
/* @__PURE__ */ a(Ia, { contentRef: f, descriptionId: s.descriptionId })
|
|
1282
1282
|
] })
|
|
@@ -1372,7 +1372,7 @@ const at = 500, _e = 1e4, se = {
|
|
|
1372
1372
|
return u.observe(l.current), () => {
|
|
1373
1373
|
u.disconnect();
|
|
1374
1374
|
};
|
|
1375
|
-
}, [f]), /* @__PURE__ */ a(Ge, { open: !0, onOpenChange: e, children: /* @__PURE__ */
|
|
1375
|
+
}, [f]), /* @__PURE__ */ a(Ge, { open: !0, onOpenChange: e, children: /* @__PURE__ */ g(Ke, { children: [
|
|
1376
1376
|
/* @__PURE__ */ a(
|
|
1377
1377
|
Xe,
|
|
1378
1378
|
{
|
|
@@ -1380,9 +1380,9 @@ const at = 500, _e = 1e4, se = {
|
|
|
1380
1380
|
"data-floating-content": ""
|
|
1381
1381
|
}
|
|
1382
1382
|
),
|
|
1383
|
-
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", "data-floating-content": "", children: /* @__PURE__ */
|
|
1384
|
-
/* @__PURE__ */ a("div", { className: "flex h-max w-full items-center bg-(--color-background) p-2", children: /* @__PURE__ */ a(pe, { className: "w-full", accentColor: "base", variant: "soft", children: /* @__PURE__ */
|
|
1385
|
-
/* @__PURE__ */
|
|
1383
|
+
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", "data-floating-content": "", children: /* @__PURE__ */ g("div", { className: "flex h-full w-full flex-col", children: [
|
|
1384
|
+
/* @__PURE__ */ a("div", { className: "flex h-max w-full items-center bg-(--color-background) p-2", children: /* @__PURE__ */ a(pe, { className: "w-full", accentColor: "base", variant: "soft", children: /* @__PURE__ */ g("div", { className: "grid w-full grid-cols-3", children: [
|
|
1385
|
+
/* @__PURE__ */ g("div", { className: "flex justify-start gap-2 items-center", children: [
|
|
1386
1386
|
/* @__PURE__ */ a(A, { onClick: e, "aria-label": "close", children: /* @__PURE__ */ a(L, { icon: "RiCloseLine" }) }),
|
|
1387
1387
|
/* @__PURE__ */ a(A, { onClick: d, "aria-label": "close", children: /* @__PURE__ */ a(L, { icon: "RiDownload2Line" }) })
|
|
1388
1388
|
] }),
|
|
@@ -1424,7 +1424,7 @@ const Ra = {
|
|
|
1424
1424
|
}, [n]);
|
|
1425
1425
|
const h = I((b) => {
|
|
1426
1426
|
s(0), o(b);
|
|
1427
|
-
}, []),
|
|
1427
|
+
}, []), v = I(() => {
|
|
1428
1428
|
c(!0);
|
|
1429
1429
|
}, []), w = I(() => {
|
|
1430
1430
|
!r || l === r.numPages - 1 || s((b) => b + 1);
|
|
@@ -1435,7 +1435,7 @@ const Ra = {
|
|
|
1435
1435
|
}, [l]), C = I(() => {
|
|
1436
1436
|
e && e(n);
|
|
1437
1437
|
}, [n, e]);
|
|
1438
|
-
return /* @__PURE__ */ a(Ge, { open: !0, onOpenChange: i, children: /* @__PURE__ */
|
|
1438
|
+
return /* @__PURE__ */ a(Ge, { open: !0, onOpenChange: i, children: /* @__PURE__ */ g(Ke, { children: [
|
|
1439
1439
|
/* @__PURE__ */ a(
|
|
1440
1440
|
Xe,
|
|
1441
1441
|
{
|
|
@@ -1443,9 +1443,9 @@ const Ra = {
|
|
|
1443
1443
|
"data-floating-content": ""
|
|
1444
1444
|
}
|
|
1445
1445
|
),
|
|
1446
|
-
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", "data-floating-content": "", children: /* @__PURE__ */
|
|
1447
|
-
/* @__PURE__ */ a("div", { className: "h-max w-full shrink-0 items-center bg-(--color-background) p-2", children: /* @__PURE__ */ a(pe, { className: "flex items-center gap-1", variant: "soft", accentColor: "base", children: /* @__PURE__ */
|
|
1448
|
-
/* @__PURE__ */
|
|
1446
|
+
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", "data-floating-content": "", children: /* @__PURE__ */ g("div", { className: "flex h-full w-full flex-col items-center", children: [
|
|
1447
|
+
/* @__PURE__ */ a("div", { className: "h-max w-full shrink-0 items-center bg-(--color-background) p-2", children: /* @__PURE__ */ a(pe, { className: "flex items-center gap-1", variant: "soft", accentColor: "base", children: /* @__PURE__ */ g("div", { className: "grid w-full grid-cols-3", children: [
|
|
1448
|
+
/* @__PURE__ */ g("div", { className: "w-full gap-2 flex items-center", children: [
|
|
1449
1449
|
/* @__PURE__ */ a(A, { onClick: i, "aria-label": "close", children: /* @__PURE__ */ a(L, { icon: "RiCloseLine" }) }),
|
|
1450
1450
|
/* @__PURE__ */ a(A, { onClick: m, "aria-label": "download", children: /* @__PURE__ */ a(L, { icon: "RiDownload2Line" }) })
|
|
1451
1451
|
] }),
|
|
@@ -1459,22 +1459,22 @@ const Ra = {
|
|
|
1459
1459
|
) }),
|
|
1460
1460
|
/* @__PURE__ */ a("div", { className: "flex justify-end", children: !!e && /* @__PURE__ */ a(A, { onClick: C, "aria-label": "delete", children: /* @__PURE__ */ a(L, { icon: "RiDeleteBin2Line" }) }) })
|
|
1461
1461
|
] }) }) }),
|
|
1462
|
-
/* @__PURE__ */
|
|
1462
|
+
/* @__PURE__ */ g("div", { className: "relative flex h-full w-full flex-col items-center gap-2 p-3", children: [
|
|
1463
1463
|
!r && !f && /* @__PURE__ */ a(Fi, {}),
|
|
1464
|
-
/* @__PURE__ */ a("div", { className: "flex h-max max-h-full w-max max-w-full flex-col items-center justify-center overflow-auto [scrollbar-color:var(--base-6)_transparent] [scrollbar-width:thin]", children: /* @__PURE__ */
|
|
1464
|
+
/* @__PURE__ */ a("div", { className: "flex h-max max-h-full w-max max-w-full flex-col items-center justify-center overflow-auto [scrollbar-color:var(--base-6)_transparent] [scrollbar-width:thin]", children: /* @__PURE__ */ g(
|
|
1465
1465
|
Rr,
|
|
1466
1466
|
{
|
|
1467
1467
|
className: "relative",
|
|
1468
1468
|
file: n,
|
|
1469
1469
|
onLoadSuccess: h,
|
|
1470
|
-
onLoadError:
|
|
1470
|
+
onLoadError: v,
|
|
1471
1471
|
error: "",
|
|
1472
1472
|
loading: "",
|
|
1473
1473
|
children: [
|
|
1474
1474
|
/* @__PURE__ */ a(Lr, { scale: Ra[u], pageIndex: l }),
|
|
1475
|
-
!!r && !f && /* @__PURE__ */ a("div", { className: "absolute top-0 z-[2] flex w-full justify-center py-2", children: /* @__PURE__ */
|
|
1475
|
+
!!r && !f && /* @__PURE__ */ a("div", { className: "absolute top-0 z-[2] flex w-full justify-center py-2", children: /* @__PURE__ */ g(pe, { variant: "solid", accentColor: "base", size: "sm", children: [
|
|
1476
1476
|
/* @__PURE__ */ a(A, { onClick: y, "aria-label": "previous page", children: /* @__PURE__ */ a(L, { icon: "RiArrowLeftLine" }) }),
|
|
1477
|
-
/* @__PURE__ */
|
|
1477
|
+
/* @__PURE__ */ g(qe, { accentColor: "base", style: { borderRadius: 0 }, variant: "solid", children: [
|
|
1478
1478
|
l + 1,
|
|
1479
1479
|
"/",
|
|
1480
1480
|
r.numPages
|
|
@@ -1492,7 +1492,7 @@ const Ra = {
|
|
|
1492
1492
|
Ti.displayName = "PDFViewer";
|
|
1493
1493
|
const Fi = F(() => /* @__PURE__ */ a("div", { className: "absolute flex h-full w-full items-center justify-center", children: /* @__PURE__ */ a(Be, {}) }));
|
|
1494
1494
|
Fi.displayName = "SpinnerComponent";
|
|
1495
|
-
const Di = F(() => /* @__PURE__ */
|
|
1495
|
+
const Di = F(() => /* @__PURE__ */ g("div", { className: "flex h-[70%] w-[40%] flex-col items-center justify-center rounded-md border border-(--base-a6) bg-(--base-2)", children: [
|
|
1496
1496
|
/* @__PURE__ */ a(L, { icon: "RiFileWarningLine", size: 40 }),
|
|
1497
1497
|
/* @__PURE__ */ a("span", { className: "text-sm font-light text-(--accent-a11)", "data-accent-color": "base", children: "Failed to load" })
|
|
1498
1498
|
] }));
|
|
@@ -1509,7 +1509,7 @@ const ki = [
|
|
|
1509
1509
|
rowLabels: [],
|
|
1510
1510
|
columnLabels: [],
|
|
1511
1511
|
data: [[]]
|
|
1512
|
-
}),
|
|
1512
|
+
}), v = P(() => gr(() => import("react-spreadsheet")), []);
|
|
1513
1513
|
q(() => {
|
|
1514
1514
|
n.arrayBuffer().then((b) => {
|
|
1515
1515
|
const { SheetNames: E, Sheets: x } = Tr(b);
|
|
@@ -1541,7 +1541,7 @@ const ki = [
|
|
|
1541
1541
|
);
|
|
1542
1542
|
b !== 0 && d(o[b - 1]);
|
|
1543
1543
|
}, [c, o]);
|
|
1544
|
-
return /* @__PURE__ */ a(Ge, { open: !0, onOpenChange: e, children: /* @__PURE__ */
|
|
1544
|
+
return /* @__PURE__ */ a(Ge, { open: !0, onOpenChange: e, children: /* @__PURE__ */ g(Ke, { children: [
|
|
1545
1545
|
/* @__PURE__ */ a(
|
|
1546
1546
|
Xe,
|
|
1547
1547
|
{
|
|
@@ -1549,9 +1549,9 @@ const ki = [
|
|
|
1549
1549
|
"data-floating-content": ""
|
|
1550
1550
|
}
|
|
1551
1551
|
),
|
|
1552
|
-
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", "data-floating-content": "", children: /* @__PURE__ */
|
|
1553
|
-
/* @__PURE__ */ a("div", { className: "h-max w-full shrink-0 bg-(--color-background) p-2", children: /* @__PURE__ */ a(pe, { size: "md", variant: "soft", accentColor: "base", children: /* @__PURE__ */
|
|
1554
|
-
/* @__PURE__ */
|
|
1552
|
+
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", "data-floating-content": "", children: /* @__PURE__ */ g("div", { className: "flex h-full w-full flex-col overflow-hidden", children: [
|
|
1553
|
+
/* @__PURE__ */ a("div", { className: "h-max w-full shrink-0 bg-(--color-background) p-2", children: /* @__PURE__ */ a(pe, { size: "md", variant: "soft", accentColor: "base", children: /* @__PURE__ */ g("div", { className: "grid w-full grid-cols-3", children: [
|
|
1554
|
+
/* @__PURE__ */ g("div", { className: "flex gap-2 items-center", children: [
|
|
1555
1555
|
/* @__PURE__ */ a(A, { onClick: e, "aria-label": "close", children: /* @__PURE__ */ a(L, { icon: "RiCloseLine" }) }),
|
|
1556
1556
|
/* @__PURE__ */ a(A, { onClick: m, "aria-label": "download", children: /* @__PURE__ */ a(L, { icon: "RiDownload2Line" }) })
|
|
1557
1557
|
] }),
|
|
@@ -1565,9 +1565,9 @@ const ki = [
|
|
|
1565
1565
|
) }),
|
|
1566
1566
|
/* @__PURE__ */ a("div", { className: "flex justify-end gap-2", children: !!i && /* @__PURE__ */ a(A, { "aria-label": "delete", onClick: w, children: /* @__PURE__ */ a(L, { icon: "RiDeleteBin2Line" }) }) })
|
|
1567
1567
|
] }) }) }),
|
|
1568
|
-
/* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col items-center gap-3 overflow-hidden p-2", children: /* @__PURE__ */
|
|
1568
|
+
/* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col items-center gap-3 overflow-hidden p-2", children: /* @__PURE__ */ g(vr, { fallback: /* @__PURE__ */ a(Be, {}), children: [
|
|
1569
1569
|
/* @__PURE__ */ a("div", { className: "flex h-max max-h-[calc(100%-50px)] w-max max-w-full overflow-auto [scrollbar-color:var(--base-6)_transparent] [scrollbar-width:thin]", children: /* @__PURE__ */ a(
|
|
1570
|
-
|
|
1570
|
+
v,
|
|
1571
1571
|
{
|
|
1572
1572
|
className: "z-[1] h-full",
|
|
1573
1573
|
data: u.data,
|
|
@@ -1575,7 +1575,7 @@ const ki = [
|
|
|
1575
1575
|
columnLabels: u.columnLabels
|
|
1576
1576
|
}
|
|
1577
1577
|
) }),
|
|
1578
|
-
/* @__PURE__ */ a("div", { className: "flex h-max shrink-0 bg-(--base-2)", children: /* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ a("div", { className: "flex h-max shrink-0 bg-(--base-2)", children: /* @__PURE__ */ g(
|
|
1579
1579
|
pe,
|
|
1580
1580
|
{
|
|
1581
1581
|
className: "flex items-center",
|
|
@@ -1604,7 +1604,7 @@ const It = F((t) => {
|
|
|
1604
1604
|
() => e !== void 0 ? Zt(n.name, e) : n.name,
|
|
1605
1605
|
[n.name, e]
|
|
1606
1606
|
);
|
|
1607
|
-
return /* @__PURE__ */
|
|
1607
|
+
return /* @__PURE__ */ g(qe, { ...r, children: [
|
|
1608
1608
|
/* @__PURE__ */ a(Nt, { fileType: n.type }),
|
|
1609
1609
|
!i && o
|
|
1610
1610
|
] });
|
|
@@ -1629,7 +1629,7 @@ const je = La, Oi = F(
|
|
|
1629
1629
|
if (e)
|
|
1630
1630
|
return o !== void 0 ? Zt(e.name, o) : e.name;
|
|
1631
1631
|
}, [e, o]);
|
|
1632
|
-
return /* @__PURE__ */
|
|
1632
|
+
return /* @__PURE__ */ g(
|
|
1633
1633
|
"div",
|
|
1634
1634
|
{
|
|
1635
1635
|
className: je(
|
|
@@ -1681,9 +1681,9 @@ const Mi = yr(() => {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
}, [e]);
|
|
1683
1683
|
const c = P(() => s, [s]);
|
|
1684
|
-
return /* @__PURE__ */
|
|
1684
|
+
return /* @__PURE__ */ g(Mi.Provider, { value: c, children: [
|
|
1685
1685
|
n,
|
|
1686
|
-
e && /* @__PURE__ */
|
|
1686
|
+
e && /* @__PURE__ */ g(Y, { children: [
|
|
1687
1687
|
r === "spreadsheet" && /* @__PURE__ */ a(Ai, { file: e.file, onDelete: e.onDelete, onClose: f }),
|
|
1688
1688
|
r === "pdf" && /* @__PURE__ */ a(Ti, { file: e.file, onDelete: e.onDelete, onClose: f }),
|
|
1689
1689
|
r === "image" && /* @__PURE__ */ a(Ri, { file: e.file, onDelete: e.onDelete, onClose: f })
|
|
@@ -1784,7 +1784,7 @@ class K extends _i {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
S(K, "fieldTypeName"), S(K, "fieldTypeDescription");
|
|
1786
1786
|
const U = (t) => {
|
|
1787
|
-
const { id: n, field: e, formId: i, size: r, showInputOnly: o, internal: l, ...s } = t, [f, c, d] = en(e.getId()), { touched: u } = c, h = c.error ?? e.description,
|
|
1787
|
+
const { id: n, field: e, formId: i, size: r, showInputOnly: o, internal: l, ...s } = t, [f, c, d] = en(e.getId()), { touched: u } = c, h = c.error ?? e.description, v = c.error ? "danger" : void 0, w = n ?? `${i}-${e.getId()}-input`, m = `${w}-label`, y = e.required ? `${e.label} *` : e.label, C = P(() => ({
|
|
1788
1788
|
...f,
|
|
1789
1789
|
onChange: (x) => {
|
|
1790
1790
|
const N = e.getValueFromChangeEvent(x);
|
|
@@ -1794,11 +1794,11 @@ const U = (t) => {
|
|
|
1794
1794
|
d.setTouched(!0, !1).then(), d.setError(e.getError(e.getValueFromChangeEvent(x)));
|
|
1795
1795
|
}
|
|
1796
1796
|
}), [e, f, d, u]);
|
|
1797
|
-
return console.debug("severity",
|
|
1797
|
+
return console.debug("severity", v), [
|
|
1798
1798
|
{
|
|
1799
1799
|
helpText: h,
|
|
1800
1800
|
size: r,
|
|
1801
|
-
severity:
|
|
1801
|
+
severity: v,
|
|
1802
1802
|
inputId: w,
|
|
1803
1803
|
labelId: m,
|
|
1804
1804
|
label: y,
|
|
@@ -1851,11 +1851,11 @@ function Aa() {
|
|
|
1851
1851
|
}
|
|
1852
1852
|
var l = typeof window == "object" && window.window === window ? window : typeof self == "object" && self.self === self ? self : typeof it == "object" && it.global === it ? it : void 0, s = l.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent), f = l.saveAs || (typeof window != "object" || window !== l ? function() {
|
|
1853
1853
|
} : "download" in HTMLAnchorElement.prototype && !s ? function(c, d, u) {
|
|
1854
|
-
var h = l.URL || l.webkitURL,
|
|
1855
|
-
d = d || c.name || "download",
|
|
1856
|
-
h.revokeObjectURL(
|
|
1854
|
+
var h = l.URL || l.webkitURL, v = document.createElement("a");
|
|
1855
|
+
d = d || c.name || "download", v.download = d, v.rel = "noopener", typeof c == "string" ? (v.href = c, v.origin === location.origin ? o(v) : r(v.href) ? i(c, d, u) : o(v, v.target = "_blank")) : (v.href = h.createObjectURL(c), setTimeout(function() {
|
|
1856
|
+
h.revokeObjectURL(v.href);
|
|
1857
1857
|
}, 4e4), setTimeout(function() {
|
|
1858
|
-
o(
|
|
1858
|
+
o(v);
|
|
1859
1859
|
}, 0));
|
|
1860
1860
|
} : "msSaveOrOpenBlob" in navigator ? function(c, d, u) {
|
|
1861
1861
|
if (d = d || c.name || "download", typeof c != "string") navigator.msSaveOrOpenBlob(e(c, u), d);
|
|
@@ -1868,8 +1868,8 @@ function Aa() {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
} : function(c, d, u, h) {
|
|
1870
1870
|
if (h = h || open("", "_blank"), h && (h.document.title = h.document.body.innerText = "downloading..."), typeof c == "string") return i(c, d, u);
|
|
1871
|
-
var
|
|
1872
|
-
if ((m ||
|
|
1871
|
+
var v = c.type === "application/octet-stream", w = /constructor/i.test(l.HTMLElement) || l.safari, m = /CriOS\/[\d]+/.test(navigator.userAgent);
|
|
1872
|
+
if ((m || v && w || s) && typeof FileReader < "u") {
|
|
1873
1873
|
var y = new FileReader();
|
|
1874
1874
|
y.onloadend = function() {
|
|
1875
1875
|
var E = y.result;
|
|
@@ -1896,7 +1896,7 @@ const Pa = /* @__PURE__ */ Da(zi), mn = F((t) => {
|
|
|
1896
1896
|
},
|
|
1897
1897
|
[i, n]
|
|
1898
1898
|
);
|
|
1899
|
-
return /* @__PURE__ */
|
|
1899
|
+
return /* @__PURE__ */ g(Y, { children: [
|
|
1900
1900
|
/* @__PURE__ */ a(
|
|
1901
1901
|
"button",
|
|
1902
1902
|
{
|
|
@@ -1918,7 +1918,7 @@ const Pa = /* @__PURE__ */ Da(zi), mn = F((t) => {
|
|
|
1918
1918
|
)
|
|
1919
1919
|
}
|
|
1920
1920
|
),
|
|
1921
|
-
/* @__PURE__ */
|
|
1921
|
+
/* @__PURE__ */ g("div", { className: "fixed top-0 left-0 z-[5001] flex w-full items-center bg-(--color-background)", children: [
|
|
1922
1922
|
/* @__PURE__ */ a(
|
|
1923
1923
|
A,
|
|
1924
1924
|
{
|
|
@@ -1947,13 +1947,13 @@ const Pa = /* @__PURE__ */ Da(zi), mn = F((t) => {
|
|
|
1947
1947
|
});
|
|
1948
1948
|
mn.displayName = "FullScreenImagePreview";
|
|
1949
1949
|
const ae = (t) => {
|
|
1950
|
-
const { className: n, label: e, children: i, size: r, severity: o, inputId: l, labelId: s, image: f } = t, [c, d] = z(void 0), [u, h] = z(!1),
|
|
1951
|
-
console.debug(o,
|
|
1950
|
+
const { className: n, label: e, children: i, size: r, severity: o, inputId: l, labelId: s, image: f } = t, [c, d] = z(void 0), [u, h] = z(!1), v = o ? se[o] : "base";
|
|
1951
|
+
console.debug(o, v), q(() => {
|
|
1952
1952
|
f instanceof Promise ? f.then(d).catch(console.error) : d(f);
|
|
1953
1953
|
}, [f]);
|
|
1954
1954
|
const w = c ? URL.createObjectURL(c) : void 0;
|
|
1955
|
-
return /* @__PURE__ */
|
|
1956
|
-
c && /* @__PURE__ */
|
|
1955
|
+
return /* @__PURE__ */ g("div", { className: "flex flex-col gap-2", children: [
|
|
1956
|
+
c && /* @__PURE__ */ g(Y, { children: [
|
|
1957
1957
|
/* @__PURE__ */ a(
|
|
1958
1958
|
"img",
|
|
1959
1959
|
{
|
|
@@ -1975,14 +1975,14 @@ const ae = (t) => {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
)
|
|
1977
1977
|
] }),
|
|
1978
|
-
/* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */ a($e, { accentColor:
|
|
1978
|
+
/* @__PURE__ */ g("label", { className: je(n, "flex flex-col gap-1"), htmlFor: l, children: [
|
|
1979
|
+
/* @__PURE__ */ a($e, { accentColor: v, size: r, id: s, weight: "medium", children: e }),
|
|
1980
1980
|
i
|
|
1981
1981
|
] })
|
|
1982
1982
|
] });
|
|
1983
1983
|
}, $i = (t) => {
|
|
1984
1984
|
const { helpText: n, children: e, severity: i } = t, r = i ? se[i] : "base";
|
|
1985
|
-
return /* @__PURE__ */
|
|
1985
|
+
return /* @__PURE__ */ g("div", { className: "flex flex-col gap-1", children: [
|
|
1986
1986
|
e,
|
|
1987
1987
|
/* @__PURE__ */ a("div", { className: "flex flex-col w-full", children: /* @__PURE__ */ a($e, { accentColor: r, size: "xs", children: n }) })
|
|
1988
1988
|
] });
|
|
@@ -2243,11 +2243,11 @@ const hn = (t, n) => {
|
|
|
2243
2243
|
const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: l, fieldProps: s }, f] = U(t);
|
|
2244
2244
|
let [{ helpText: c, label: d }] = U(t);
|
|
2245
2245
|
c = o ? null : c, d = o ? "" : d;
|
|
2246
|
-
const u = P(() => Array.isArray(s.value) ? s.value : [], [s.value]), { onChange: h, onBlur:
|
|
2246
|
+
const u = P(() => Array.isArray(s.value) ? s.value : [], [s.value]), { onChange: h, onBlur: v } = s, w = `${n}-droppable`, { disabled: m } = f, [y, C] = z(""), [b, E] = z(""), x = b || c, N = I(
|
|
2247
2247
|
(k) => {
|
|
2248
|
-
h(k),
|
|
2248
|
+
h(k), v(k);
|
|
2249
2249
|
},
|
|
2250
|
-
[h,
|
|
2250
|
+
[h, v]
|
|
2251
2251
|
), T = I(
|
|
2252
2252
|
(k) => {
|
|
2253
2253
|
u.findIndex((j) => j === k.target.value.trim()) >= 0 ? E("All options must be unique") : k.target.value ? E("") : E("Option cannot be empty"), C(k.target.value);
|
|
@@ -2279,7 +2279,7 @@ const hn = (t, n) => {
|
|
|
2279
2279
|
},
|
|
2280
2280
|
[N, u]
|
|
2281
2281
|
);
|
|
2282
|
-
return /* @__PURE__ */ a(Yn, { onDragEnd: V, children: /* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ a(Yn, { onDragEnd: V, children: /* @__PURE__ */ g("div", { className: "flex flex-col gap-2", children: [
|
|
2283
2283
|
/* @__PURE__ */ a(le, { helpText: x, severity: r, children: /* @__PURE__ */ a(
|
|
2284
2284
|
ae,
|
|
2285
2285
|
{
|
|
@@ -2289,7 +2289,7 @@ const hn = (t, n) => {
|
|
|
2289
2289
|
labelId: e,
|
|
2290
2290
|
label: d,
|
|
2291
2291
|
image: o ? void 0 : l.image,
|
|
2292
|
-
children: (!m || u.length === 0) && /* @__PURE__ */
|
|
2292
|
+
children: (!m || u.length === 0) && /* @__PURE__ */ g("div", { className: "flex gap-2", children: [
|
|
2293
2293
|
/* @__PURE__ */ a("div", { className: "grow", children: /* @__PURE__ */ a(oe.Root, { accentColor: "base", variant: "surface", children: /* @__PURE__ */ a(
|
|
2294
2294
|
oe.Field,
|
|
2295
2295
|
{
|
|
@@ -2316,7 +2316,7 @@ const hn = (t, n) => {
|
|
|
2316
2316
|
] })
|
|
2317
2317
|
}
|
|
2318
2318
|
) }),
|
|
2319
|
-
/* @__PURE__ */ a(on, { droppableId: w, children: (k) => /* @__PURE__ */
|
|
2319
|
+
/* @__PURE__ */ a(on, { droppableId: w, children: (k) => /* @__PURE__ */ g(
|
|
2320
2320
|
"div",
|
|
2321
2321
|
{
|
|
2322
2322
|
className: "flex flex-col",
|
|
@@ -2329,7 +2329,7 @@ const hn = (t, n) => {
|
|
|
2329
2329
|
draggableId: `${j}-draggable`,
|
|
2330
2330
|
index: B,
|
|
2331
2331
|
isDragDisabled: m,
|
|
2332
|
-
children: ({ draggableProps: ne, dragHandleProps: de, innerRef: Ue }) => /* @__PURE__ */
|
|
2332
|
+
children: ({ draggableProps: ne, dragHandleProps: de, innerRef: Ue }) => /* @__PURE__ */ g(
|
|
2333
2333
|
qe,
|
|
2334
2334
|
{
|
|
2335
2335
|
...de,
|
|
@@ -2552,7 +2552,7 @@ S(ie, "fieldTypeName", "Number"), S(ie, "fieldTypeDescription", "Allows specifyi
|
|
|
2552
2552
|
});
|
|
2553
2553
|
let ye = ie;
|
|
2554
2554
|
const Xi = F((t) => {
|
|
2555
|
-
const [{ inputId: n, labelId: e, label: i, helpText: r, size: o, severity: l, showInputOnly: s, field: f, fieldProps: c }, d] = U(t), [u, h] = z(!1),
|
|
2555
|
+
const [{ inputId: n, labelId: e, label: i, helpText: r, size: o, severity: l, showInputOnly: s, field: f, fieldProps: c }, d] = U(t), [u, h] = z(!1), v = c.value, w = I(
|
|
2556
2556
|
(b) => {
|
|
2557
2557
|
c.onChange({ target: { value: b } }), h(!1);
|
|
2558
2558
|
},
|
|
@@ -2564,7 +2564,7 @@ const Xi = F((t) => {
|
|
|
2564
2564
|
}, []), C = I(() => {
|
|
2565
2565
|
h(!1);
|
|
2566
2566
|
}, []);
|
|
2567
|
-
return /* @__PURE__ */ a(le, { helpText: r, severity: l, children: /* @__PURE__ */
|
|
2567
|
+
return /* @__PURE__ */ a(le, { helpText: r, severity: l, children: /* @__PURE__ */ g(
|
|
2568
2568
|
ae,
|
|
2569
2569
|
{
|
|
2570
2570
|
size: o,
|
|
@@ -2575,19 +2575,19 @@ const Xi = F((t) => {
|
|
|
2575
2575
|
image: s ? void 0 : f.image,
|
|
2576
2576
|
className: "flex-col items-start justify-start gap-1",
|
|
2577
2577
|
children: [
|
|
2578
|
-
/* @__PURE__ */ a(Ge, { open: u, onOpenChange: h, children: /* @__PURE__ */
|
|
2578
|
+
/* @__PURE__ */ a(Ge, { open: u, onOpenChange: h, children: /* @__PURE__ */ g(Ke, { children: [
|
|
2579
2579
|
/* @__PURE__ */ a(Xe, { className: "light:bg-(--black-a6) fixed inset-0 dark:bg-(--black-a8)" }),
|
|
2580
2580
|
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", children: /* @__PURE__ */ a(Yi, { onQrScan: w, onClose: C }) })
|
|
2581
2581
|
] }) }),
|
|
2582
|
-
/* @__PURE__ */
|
|
2583
|
-
/* @__PURE__ */
|
|
2582
|
+
/* @__PURE__ */ g("div", { className: "flex w-max items-center gap-1", children: [
|
|
2583
|
+
/* @__PURE__ */ g(Q, { ...d, variant: "soft", onClick: y, type: "button", children: [
|
|
2584
2584
|
/* @__PURE__ */ a(L, { icon: "RiQrCodeLine" }),
|
|
2585
2585
|
"Scan"
|
|
2586
2586
|
] }),
|
|
2587
|
-
|
|
2587
|
+
v && /* @__PURE__ */ a("span", { className: "text-xs text-(--accent-a11)", "data-accent-color": "primary", children: /* @__PURE__ */ a(L, { icon: "RiCheckLine", style: { verticalAlign: "bottom" } }) })
|
|
2588
2588
|
] }),
|
|
2589
|
-
!!
|
|
2590
|
-
/* @__PURE__ */ a("code", { className: "bg-(--base-a3)", children:
|
|
2589
|
+
!!v && /* @__PURE__ */ a(Ve, { children: /* @__PURE__ */ g("div", { className: "w-max items-center gap-2", children: [
|
|
2590
|
+
/* @__PURE__ */ a("code", { className: "bg-(--base-a3)", children: v }),
|
|
2591
2591
|
/* @__PURE__ */ a(
|
|
2592
2592
|
A,
|
|
2593
2593
|
{
|
|
@@ -2624,9 +2624,9 @@ const Yi = F((t) => {
|
|
|
2624
2624
|
o(!0), l.start().finally(() => {
|
|
2625
2625
|
o(!1);
|
|
2626
2626
|
});
|
|
2627
|
-
}, [n]), /* @__PURE__ */
|
|
2627
|
+
}, [n]), /* @__PURE__ */ g("div", { className: "relative flex h-full w-full flex-col justify-center gap-2 bg-(--color-background)", children: [
|
|
2628
2628
|
/* @__PURE__ */ a("div", { className: "absolute top-0 flex w-full p-2", children: /* @__PURE__ */ a(A, { "aria-label": "close", variant: "soft", accentColor: "base", onClick: e, children: /* @__PURE__ */ a(L, { icon: "RiCloseLine" }) }) }),
|
|
2629
|
-
/* @__PURE__ */
|
|
2629
|
+
/* @__PURE__ */ g("div", { className: "relative max-h-full max-w-full", children: [
|
|
2630
2630
|
/* @__PURE__ */ a("video", { ref: i, style: { width: "100%", height: "100%" } }),
|
|
2631
2631
|
r && /* @__PURE__ */ a("div", { className: "absolute inset-0 flex items-center justify-center bg-(--color-background)", children: /* @__PURE__ */ a(Be, {}) })
|
|
2632
2632
|
] })
|
|
@@ -2695,7 +2695,7 @@ const qa = (t) => t ? Array.isArray(t) ? t : [t] : [], Ji = F((t) => {
|
|
|
2695
2695
|
const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: l, fieldProps: s }, f] = U(t), { onChange: c, onBlur: d } = s;
|
|
2696
2696
|
let [{ helpText: u, label: h }] = U(t);
|
|
2697
2697
|
u = o ? null : u, h = o ? "" : h;
|
|
2698
|
-
const
|
|
2698
|
+
const v = P(() => qa(s.value), [s.value]), w = I(
|
|
2699
2699
|
(m) => {
|
|
2700
2700
|
c(m), d(m);
|
|
2701
2701
|
},
|
|
@@ -2710,8 +2710,8 @@ const qa = (t) => t ? Array.isArray(t) ? t : [t] : [], Ji = F((t) => {
|
|
|
2710
2710
|
labelId: e,
|
|
2711
2711
|
label: h,
|
|
2712
2712
|
image: o ? void 0 : l.image,
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2714
|
-
/* @__PURE__ */ a($.ClickTrigger, { children: /* @__PURE__ */
|
|
2713
|
+
children: /* @__PURE__ */ g($.Root, { children: [
|
|
2714
|
+
/* @__PURE__ */ a($.ClickTrigger, { children: /* @__PURE__ */ g(
|
|
2715
2715
|
Q,
|
|
2716
2716
|
{
|
|
2717
2717
|
id: n,
|
|
@@ -2722,17 +2722,17 @@ const qa = (t) => t ? Array.isArray(t) ? t : [t] : [], Ji = F((t) => {
|
|
|
2722
2722
|
accentColor: "base",
|
|
2723
2723
|
...f,
|
|
2724
2724
|
children: [
|
|
2725
|
-
|
|
2725
|
+
v.length > 0 ? v.join(", ") : l.placeholder,
|
|
2726
2726
|
/* @__PURE__ */ a(L, { icon: "RiArrowDownSLine" })
|
|
2727
2727
|
]
|
|
2728
2728
|
}
|
|
2729
2729
|
) }),
|
|
2730
|
-
/* @__PURE__ */ a($.Content, { children: /* @__PURE__ */
|
|
2731
|
-
/* @__PURE__ */
|
|
2730
|
+
/* @__PURE__ */ a($.Content, { children: /* @__PURE__ */ g($.MultiSelectGroup, { values: v, onValuesChange: w, children: [
|
|
2731
|
+
/* @__PURE__ */ g($.SelectAllItem, { allValues: l.options.map(({ value: m }) => m), children: [
|
|
2732
2732
|
/* @__PURE__ */ a($.SelectAllIndicator, { children: (m) => m ? /* @__PURE__ */ a(L, { icon: "RiSubtractLine" }) : /* @__PURE__ */ a(L, { icon: "RiCheckLine" }) }),
|
|
2733
2733
|
"Select all"
|
|
2734
2734
|
] }),
|
|
2735
|
-
l.options.map((m) => /* @__PURE__ */
|
|
2735
|
+
l.options.map((m) => /* @__PURE__ */ g($.MultiSelectItem, { value: m.value, children: [
|
|
2736
2736
|
/* @__PURE__ */ a($.SelectedIndicator, { children: /* @__PURE__ */ a(L, { icon: "RiCheckLine" }) }),
|
|
2737
2737
|
m.label
|
|
2738
2738
|
] }, m.value))
|
|
@@ -2775,7 +2775,7 @@ const Zi = F((t) => {
|
|
|
2775
2775
|
const [{ inputId: n, labelId: e, size: i, severity: r, showInputOnly: o, field: l, fieldProps: s }, f] = U(t), { onChange: c, onBlur: d } = s;
|
|
2776
2776
|
let [{ helpText: u, label: h }] = U(t);
|
|
2777
2777
|
u = o ? null : u, h = o ? "" : h;
|
|
2778
|
-
const
|
|
2778
|
+
const v = I(
|
|
2779
2779
|
(m) => {
|
|
2780
2780
|
c(m), d(m);
|
|
2781
2781
|
},
|
|
@@ -2790,8 +2790,8 @@ const Zi = F((t) => {
|
|
|
2790
2790
|
labelId: e,
|
|
2791
2791
|
label: h,
|
|
2792
2792
|
image: o ? void 0 : l.image,
|
|
2793
|
-
children: /* @__PURE__ */
|
|
2794
|
-
/* @__PURE__ */ a($.ClickTrigger, { children: /* @__PURE__ */
|
|
2793
|
+
children: /* @__PURE__ */ g($.Root, { children: [
|
|
2794
|
+
/* @__PURE__ */ a($.ClickTrigger, { children: /* @__PURE__ */ g(
|
|
2795
2795
|
Q,
|
|
2796
2796
|
{
|
|
2797
2797
|
...s,
|
|
@@ -2808,7 +2808,7 @@ const Zi = F((t) => {
|
|
|
2808
2808
|
]
|
|
2809
2809
|
}
|
|
2810
2810
|
) }),
|
|
2811
|
-
/* @__PURE__ */ a($.Content, { children: /* @__PURE__ */ a($.SelectGroup, { value: s.value, onValueChange:
|
|
2811
|
+
/* @__PURE__ */ a($.Content, { children: /* @__PURE__ */ a($.SelectGroup, { value: s.value, onValueChange: v, children: l.options.map((m) => /* @__PURE__ */ g($.SelectItem, { value: m.value, children: [
|
|
2812
2812
|
/* @__PURE__ */ a($.SelectedIndicator, { children: /* @__PURE__ */ a(L, { icon: "RiCheckLine" }) }),
|
|
2813
2813
|
m.label
|
|
2814
2814
|
] }, m.value)) }) })
|
|
@@ -3050,7 +3050,7 @@ const Ya = F(
|
|
|
3050
3050
|
if (e)
|
|
3051
3051
|
return s !== void 0 ? Zt(e.name, s) : e.name;
|
|
3052
3052
|
}, [e, s]);
|
|
3053
|
-
return /* @__PURE__ */
|
|
3053
|
+
return /* @__PURE__ */ g(
|
|
3054
3054
|
"div",
|
|
3055
3055
|
{
|
|
3056
3056
|
className: je(
|
|
@@ -3076,7 +3076,7 @@ const Ya = F(
|
|
|
3076
3076
|
)
|
|
3077
3077
|
}
|
|
3078
3078
|
),
|
|
3079
|
-
/* @__PURE__ */
|
|
3079
|
+
/* @__PURE__ */ g(
|
|
3080
3080
|
"div",
|
|
3081
3081
|
{
|
|
3082
3082
|
className: je("flex h-max w-full items-center gap-1 bg-(--base-2) px-2 py-1", {
|
|
@@ -3110,9 +3110,9 @@ const Ya = F(
|
|
|
3110
3110
|
const [{ inputId: n, labelId: e, size: i, severity: r, helpText: o, showInputOnly: l, field: s, fieldProps: f }, c] = U(t), { onChange: d } = f;
|
|
3111
3111
|
let [{ label: u }] = U(t);
|
|
3112
3112
|
u = l ? "" : u;
|
|
3113
|
-
const h = r ? se[r] : void 0,
|
|
3113
|
+
const h = r ? se[r] : void 0, v = X(null), { value: w } = f, m = P(() => l ? null : o || (s.maxFileSize ? `Maximum file size: ${s.maxFileSize}MB` : null), [s.maxFileSize, o, l]), y = I(() => {
|
|
3114
3114
|
var T;
|
|
3115
|
-
(T =
|
|
3115
|
+
(T = v.current) == null || T.click();
|
|
3116
3116
|
}, []), C = I(
|
|
3117
3117
|
(T) => {
|
|
3118
3118
|
const R = [...w];
|
|
@@ -3120,8 +3120,8 @@ const Ya = F(
|
|
|
3120
3120
|
},
|
|
3121
3121
|
[w, d]
|
|
3122
3122
|
), b = w ? "Select new files" : "Select files", E = w ? "Select new file" : "Select a file", x = s.maxFiles > 1 ? b : E;
|
|
3123
|
-
return /* @__PURE__ */
|
|
3124
|
-
/* @__PURE__ */ a(le, { helpText: m, severity: r, children: /* @__PURE__ */
|
|
3123
|
+
return /* @__PURE__ */ g("div", { className: "flex flex-col gap-2", children: [
|
|
3124
|
+
/* @__PURE__ */ a(le, { helpText: m, severity: r, children: /* @__PURE__ */ g(
|
|
3125
3125
|
ae,
|
|
3126
3126
|
{
|
|
3127
3127
|
size: i,
|
|
@@ -3131,7 +3131,7 @@ const Ya = F(
|
|
|
3131
3131
|
label: u,
|
|
3132
3132
|
image: l ? void 0 : s.image,
|
|
3133
3133
|
children: [
|
|
3134
|
-
/* @__PURE__ */ a("div", { className: "flex gap-2", children: /* @__PURE__ */
|
|
3134
|
+
/* @__PURE__ */ a("div", { className: "flex gap-2", children: /* @__PURE__ */ g(
|
|
3135
3135
|
Q,
|
|
3136
3136
|
{
|
|
3137
3137
|
...c,
|
|
@@ -3152,7 +3152,7 @@ const Ya = F(
|
|
|
3152
3152
|
{
|
|
3153
3153
|
...c,
|
|
3154
3154
|
type: "file",
|
|
3155
|
-
ref:
|
|
3155
|
+
ref: v,
|
|
3156
3156
|
id: n,
|
|
3157
3157
|
accept: (N = s.extensions) == null ? void 0 : N.join(","),
|
|
3158
3158
|
multiple: s.maxFiles > 1,
|
|
@@ -3201,7 +3201,7 @@ const ir = F((t) => {
|
|
|
3201
3201
|
m.stopPropagation(), i();
|
|
3202
3202
|
},
|
|
3203
3203
|
[i]
|
|
3204
|
-
),
|
|
3204
|
+
), v = I(() => {
|
|
3205
3205
|
o && s((m) => ({
|
|
3206
3206
|
file: o,
|
|
3207
3207
|
onDelete: r ? void 0 : () => {
|
|
@@ -3209,7 +3209,7 @@ const ir = F((t) => {
|
|
|
3209
3209
|
}
|
|
3210
3210
|
}));
|
|
3211
3211
|
}, [r, i, s, o]), w = P(
|
|
3212
|
-
() => /* @__PURE__ */
|
|
3212
|
+
() => /* @__PURE__ */ g(pe, { variant: "ghost", accentColor: "base", size: "sm", children: [
|
|
3213
3213
|
/* @__PURE__ */ a(A, { "aria-label": `Download ${d}`, onClick: u, disabled: !o, children: /* @__PURE__ */ a(L, { icon: "RiDownload2Line" }) }),
|
|
3214
3214
|
!r && /* @__PURE__ */ a(A, { "aria-label": `Remove ${d}`, disabled: r, onClick: h, children: /* @__PURE__ */ a(L, { icon: "RiCloseLargeLine" }) })
|
|
3215
3215
|
] }),
|
|
@@ -3219,7 +3219,7 @@ const ir = F((t) => {
|
|
|
3219
3219
|
Ya,
|
|
3220
3220
|
{
|
|
3221
3221
|
style: { cursor: "pointer" },
|
|
3222
|
-
onClick:
|
|
3222
|
+
onClick: v,
|
|
3223
3223
|
file: o,
|
|
3224
3224
|
error: f ?? void 0,
|
|
3225
3225
|
rightSlot: w
|
|
@@ -3228,7 +3228,7 @@ const ir = F((t) => {
|
|
|
3228
3228
|
Oi,
|
|
3229
3229
|
{
|
|
3230
3230
|
style: { cursor: "pointer" },
|
|
3231
|
-
onClick:
|
|
3231
|
+
onClick: v,
|
|
3232
3232
|
file: o,
|
|
3233
3233
|
error: f ?? void 0,
|
|
3234
3234
|
rightSlot: w
|
|
@@ -3440,8 +3440,8 @@ const lr = F((t) => {
|
|
|
3440
3440
|
f(h.getId(), "").then();
|
|
3441
3441
|
}, [d, o, f]);
|
|
3442
3442
|
const u = ht(o, e);
|
|
3443
|
-
return d ? /* @__PURE__ */ a(Ve, { children: /* @__PURE__ */
|
|
3444
|
-
/* @__PURE__ */
|
|
3443
|
+
return d ? /* @__PURE__ */ a(Ve, { children: /* @__PURE__ */ g("div", { className: "flex flex-col gap-6", children: [
|
|
3444
|
+
/* @__PURE__ */ g("div", { className: "flex flex-col", children: [
|
|
3445
3445
|
/* @__PURE__ */ a(Hn, { size: "lg", children: i }),
|
|
3446
3446
|
/* @__PURE__ */ a($e, { accentColor: "base", children: r })
|
|
3447
3447
|
] }),
|
|
@@ -3600,7 +3600,7 @@ const he = (t) => Object.keys(t).length > 0, yn = (t, n) => {
|
|
|
3600
3600
|
hideTitle: d = !e.title,
|
|
3601
3601
|
hideDescription: u,
|
|
3602
3602
|
className: h,
|
|
3603
|
-
buttonProps:
|
|
3603
|
+
buttonProps: v
|
|
3604
3604
|
} = t, { readonly: w } = e.meta, m = P(() => crypto.randomUUID(), []), y = tn({
|
|
3605
3605
|
initialValues: bn(e.fields, i),
|
|
3606
3606
|
onSubmit: r,
|
|
@@ -3617,7 +3617,7 @@ const he = (t) => Object.keys(t).length > 0, yn = (t, n) => {
|
|
|
3617
3617
|
), x = ht(e.fields, { formId: m, disabled: w });
|
|
3618
3618
|
return q(() => {
|
|
3619
3619
|
C && f && f(), c && c(C);
|
|
3620
|
-
}, [C, f, c]), /* @__PURE__ */ a(nn, { value: y, children: /* @__PURE__ */
|
|
3620
|
+
}, [C, f, c]), /* @__PURE__ */ a(nn, { value: y, children: /* @__PURE__ */ g(
|
|
3621
3621
|
"form",
|
|
3622
3622
|
{
|
|
3623
3623
|
id: m,
|
|
@@ -3625,17 +3625,17 @@ const he = (t) => Object.keys(t).length > 0, yn = (t, n) => {
|
|
|
3625
3625
|
className: je(h, "flex flex-col gap-2"),
|
|
3626
3626
|
onSubmit: y.handleSubmit,
|
|
3627
3627
|
children: [
|
|
3628
|
-
!d && /* @__PURE__ */ a(Ve, { children: /* @__PURE__ */
|
|
3628
|
+
!d && /* @__PURE__ */ a(Ve, { children: /* @__PURE__ */ g("div", { className: "flex flex-col gap-1", children: [
|
|
3629
3629
|
b,
|
|
3630
3630
|
!u && E
|
|
3631
3631
|
] }) }),
|
|
3632
3632
|
x,
|
|
3633
|
-
!w && /* @__PURE__ */
|
|
3634
|
-
l && /* @__PURE__ */
|
|
3633
|
+
!w && /* @__PURE__ */ g("div", { className: "flex items-center justify-end gap-2", children: [
|
|
3634
|
+
l && /* @__PURE__ */ g(
|
|
3635
3635
|
Q,
|
|
3636
3636
|
{
|
|
3637
3637
|
accentColor: se.danger,
|
|
3638
|
-
...
|
|
3638
|
+
...v,
|
|
3639
3639
|
type: "button",
|
|
3640
3640
|
onClick: s,
|
|
3641
3641
|
children: [
|
|
@@ -3644,7 +3644,7 @@ const he = (t) => Object.keys(t).length > 0, yn = (t, n) => {
|
|
|
3644
3644
|
]
|
|
3645
3645
|
}
|
|
3646
3646
|
),
|
|
3647
|
-
/* @__PURE__ */
|
|
3647
|
+
/* @__PURE__ */ g(Q, { ...v, type: "submit", disabled: !y.isValid, accentColor: "success", children: [
|
|
3648
3648
|
/* @__PURE__ */ a(L, { icon: "RiCheckLine" }),
|
|
3649
3649
|
o
|
|
3650
3650
|
] })
|
|
@@ -3688,7 +3688,7 @@ const Ml = F(
|
|
|
3688
3688
|
s && !he(E) || o(E);
|
|
3689
3689
|
},
|
|
3690
3690
|
[u, o, s]
|
|
3691
|
-
),
|
|
3691
|
+
), v = I(
|
|
3692
3692
|
(b) => {
|
|
3693
3693
|
const E = yn(i, b);
|
|
3694
3694
|
if (E && l(E), f) {
|
|
@@ -3701,7 +3701,7 @@ const Ml = F(
|
|
|
3701
3701
|
), w = tn({
|
|
3702
3702
|
initialValues: d,
|
|
3703
3703
|
onSubmit: h,
|
|
3704
|
-
validate:
|
|
3704
|
+
validate: v,
|
|
3705
3705
|
// only validate the entire form on submit
|
|
3706
3706
|
validateOnBlur: !1,
|
|
3707
3707
|
validateOnChange: !1
|
|
@@ -3810,29 +3810,25 @@ const Ml = F(
|
|
|
3810
3810
|
}
|
|
3811
3811
|
}), u;
|
|
3812
3812
|
}, [o, n, l, r, i, e, f.fields]);
|
|
3813
|
-
return /* @__PURE__ */
|
|
3814
|
-
/* @__PURE__ */ a("div", { className: "mx-2
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
);
|
|
3828
|
-
}) }),
|
|
3829
|
-
/* @__PURE__ */ a("div", { className: "sm:hidden", children: /* @__PURE__ */ v($.Root, { children: [
|
|
3813
|
+
return /* @__PURE__ */ g(Y, { children: [
|
|
3814
|
+
/* @__PURE__ */ a("div", { className: "mx-2 hidden flex-col gap-5 sm:flex", children: d.map((u) => /* @__PURE__ */ a(
|
|
3815
|
+
A,
|
|
3816
|
+
{
|
|
3817
|
+
type: "button",
|
|
3818
|
+
variant: "ghost",
|
|
3819
|
+
accentColor: u.key.startsWith("move") ? "base" : void 0,
|
|
3820
|
+
"aria-label": u.text,
|
|
3821
|
+
...u.buttonProps,
|
|
3822
|
+
children: /* @__PURE__ */ a(u.Icon, {})
|
|
3823
|
+
},
|
|
3824
|
+
u.key
|
|
3825
|
+
)) }),
|
|
3826
|
+
/* @__PURE__ */ a("div", { className: "sm:hidden", children: /* @__PURE__ */ g($.Root, { children: [
|
|
3830
3827
|
/* @__PURE__ */ a($.ClickTrigger, { children: /* @__PURE__ */ a(A, { variant: "ghost", "aria-label": "Actions menu", children: /* @__PURE__ */ a(L, { icon: "RiMore2Line" }) }) }),
|
|
3831
3828
|
/* @__PURE__ */ a($.Content, { children: d.map((u) => {
|
|
3832
|
-
var
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
/* @__PURE__ */ a(h, {}),
|
|
3829
|
+
var h;
|
|
3830
|
+
return /* @__PURE__ */ g($.Item, { onClick: (h = u.buttonProps) == null ? void 0 : h.onClick, children: [
|
|
3831
|
+
/* @__PURE__ */ a(u.Icon, {}),
|
|
3836
3832
|
u.text
|
|
3837
3833
|
] }, u.key);
|
|
3838
3834
|
}) })
|
|
@@ -3853,8 +3849,8 @@ const sr = (t = () => null) => P(() => al.map((n) => n.map((e) => {
|
|
|
3853
3849
|
};
|
|
3854
3850
|
})), [t]), me = (t) => t.type === "section", Yt = F((t) => {
|
|
3855
3851
|
const { popoverInputs: n, hasError: e } = t;
|
|
3856
|
-
return /* @__PURE__ */
|
|
3857
|
-
/* @__PURE__ */ a(Oe.Trigger, { children: /* @__PURE__ */
|
|
3852
|
+
return /* @__PURE__ */ g(Oe.Root, { children: [
|
|
3853
|
+
/* @__PURE__ */ a(Oe.Trigger, { children: /* @__PURE__ */ g(
|
|
3858
3854
|
Q,
|
|
3859
3855
|
{
|
|
3860
3856
|
variant: "soft",
|
|
@@ -3888,11 +3884,11 @@ const xn = F((t) => {
|
|
|
3888
3884
|
};
|
|
3889
3885
|
}
|
|
3890
3886
|
}, []);
|
|
3891
|
-
const [
|
|
3887
|
+
const [v, w] = z(void 0), [m, y] = z(!1);
|
|
3892
3888
|
q(() => {
|
|
3893
3889
|
me(i) ? w(void 0) : i.image instanceof Promise ? i.image.then(w).catch(console.error) : w(i.image);
|
|
3894
3890
|
}, [i]);
|
|
3895
|
-
const C =
|
|
3891
|
+
const C = v ? URL.createObjectURL(v) : void 0, b = I(
|
|
3896
3892
|
(D) => {
|
|
3897
3893
|
D.stopPropagation();
|
|
3898
3894
|
const { image: _, ...H } = i;
|
|
@@ -3964,12 +3960,12 @@ const xn = F((t) => {
|
|
|
3964
3960
|
() => f.flat().find((D) => D.value === O),
|
|
3965
3961
|
[f, O]
|
|
3966
3962
|
);
|
|
3967
|
-
return /* @__PURE__ */ a("div", { className: "flex grow items-center w-full", ref: c, children: /* @__PURE__ */
|
|
3968
|
-
M === G && /* @__PURE__ */
|
|
3963
|
+
return /* @__PURE__ */ a("div", { className: "flex grow items-center w-full", ref: c, children: /* @__PURE__ */ g("div", { className: "flex w-full flex-col gap-4", children: [
|
|
3964
|
+
M === G && /* @__PURE__ */ g("div", { className: "flex flex-col gap-2", children: [
|
|
3969
3965
|
V.length > 0 && j,
|
|
3970
|
-
/* @__PURE__ */
|
|
3966
|
+
/* @__PURE__ */ g("div", { className: "flex items-center gap-4", children: [
|
|
3971
3967
|
ne && /* @__PURE__ */ a(Yt, { popoverInputs: B, hasError: de }),
|
|
3972
|
-
me(i) && i.conditional && /* @__PURE__ */ a("span", { className: "text-sm text-(--accent-a11)", "data-accent-color": Ue, children: /* @__PURE__ */
|
|
3968
|
+
me(i) && i.conditional && /* @__PURE__ */ a("span", { className: "text-sm text-(--accent-a11)", "data-accent-color": Ue, children: /* @__PURE__ */ g("em", { children: [
|
|
3973
3969
|
"Display only if ",
|
|
3974
3970
|
/* @__PURE__ */ a("strong", { children: E }),
|
|
3975
3971
|
" ",
|
|
@@ -3979,9 +3975,9 @@ const xn = F((t) => {
|
|
|
3979
3975
|
] }) })
|
|
3980
3976
|
] })
|
|
3981
3977
|
] }),
|
|
3982
|
-
M !== G && /* @__PURE__ */
|
|
3983
|
-
/* @__PURE__ */
|
|
3984
|
-
/* @__PURE__ */
|
|
3978
|
+
M !== G && /* @__PURE__ */ g("div", { className: "flex gap-2 w-full justify-between", children: [
|
|
3979
|
+
/* @__PURE__ */ g("div", { className: "flex gap-2 items-center", children: [
|
|
3980
|
+
/* @__PURE__ */ g(qe, { accentColor: "base", variant: "soft", children: [
|
|
3985
3981
|
J == null ? void 0 : J.icon,
|
|
3986
3982
|
J == null ? void 0 : J.children
|
|
3987
3983
|
] }),
|
|
@@ -3989,7 +3985,7 @@ const xn = F((t) => {
|
|
|
3989
3985
|
ze,
|
|
3990
3986
|
{
|
|
3991
3987
|
name: `${n}.${e}.required`,
|
|
3992
|
-
render: ({ setValue: D, value: _ }) => /* @__PURE__ */
|
|
3988
|
+
render: ({ setValue: D, value: _ }) => /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
3993
3989
|
/* @__PURE__ */ a(dt.Root, { checked: _, onCheckedChange: D, children: /* @__PURE__ */ a(dt.Indicator, { children: /* @__PURE__ */ a(L, { icon: "RiCheckLine" }) }) }),
|
|
3994
3990
|
/* @__PURE__ */ a($e, { size: "sm", accentColor: "base", children: "Required" })
|
|
3995
3991
|
] })
|
|
@@ -3998,14 +3994,14 @@ const xn = F((t) => {
|
|
|
3998
3994
|
] }),
|
|
3999
3995
|
ne && /* @__PURE__ */ a(Yt, { popoverInputs: B, hasError: de })
|
|
4000
3996
|
] }),
|
|
4001
|
-
|
|
4002
|
-
/* @__PURE__ */
|
|
3997
|
+
v && /* @__PURE__ */ g(Y, { children: [
|
|
3998
|
+
/* @__PURE__ */ g("div", { className: "group relative inline-block w-full min-w-[300px]", children: [
|
|
4003
3999
|
/* @__PURE__ */ a(
|
|
4004
4000
|
"img",
|
|
4005
4001
|
{
|
|
4006
4002
|
className: "h-[100px] w-full min-w-[300px] cursor-pointer rounded-md object-cover",
|
|
4007
4003
|
src: C,
|
|
4008
|
-
alt:
|
|
4004
|
+
alt: v.name,
|
|
4009
4005
|
onClick: () => {
|
|
4010
4006
|
y(!0);
|
|
4011
4007
|
}
|
|
@@ -4026,9 +4022,9 @@ const xn = F((t) => {
|
|
|
4026
4022
|
m && /* @__PURE__ */ a(
|
|
4027
4023
|
mn,
|
|
4028
4024
|
{
|
|
4029
|
-
file:
|
|
4025
|
+
file: v,
|
|
4030
4026
|
url: C,
|
|
4031
|
-
name:
|
|
4027
|
+
name: v.name,
|
|
4032
4028
|
setShowPreview: y
|
|
4033
4029
|
}
|
|
4034
4030
|
)
|
|
@@ -4072,9 +4068,9 @@ const xn = F((t) => {
|
|
|
4072
4068
|
}
|
|
4073
4069
|
),
|
|
4074
4070
|
M !== G && V.length > 0 && /* @__PURE__ */ a("div", { className: "w-full", children: j }),
|
|
4075
|
-
M !== G && /* @__PURE__ */
|
|
4071
|
+
M !== G && /* @__PURE__ */ g(Y, { children: [
|
|
4076
4072
|
/* @__PURE__ */ a(Gn, { size: "full" }),
|
|
4077
|
-
/* @__PURE__ */
|
|
4073
|
+
/* @__PURE__ */ g(Ve, { className: "flex flex-col gap-2 bg-(--accent-a2)", children: [
|
|
4078
4074
|
/* @__PURE__ */ a($e, { accentColor: "base", children: "Field preview" }),
|
|
4079
4075
|
/* @__PURE__ */ a("div", { children: Lt })
|
|
4080
4076
|
] })
|
|
@@ -4113,7 +4109,7 @@ const cr = F((t) => {
|
|
|
4113
4109
|
);
|
|
4114
4110
|
},
|
|
4115
4111
|
[i, l.fields, e, s, o]
|
|
4116
|
-
),
|
|
4112
|
+
), v = I(
|
|
4117
4113
|
(w) => {
|
|
4118
4114
|
const { files: m } = w.target;
|
|
4119
4115
|
if (!m || m.length !== 1) return;
|
|
@@ -4141,7 +4137,7 @@ const cr = F((t) => {
|
|
|
4141
4137
|
...w.draggableProps,
|
|
4142
4138
|
...w.dragHandleProps,
|
|
4143
4139
|
className: "mb-4",
|
|
4144
|
-
children: /* @__PURE__ */
|
|
4140
|
+
children: /* @__PURE__ */ g("div", { className: "flex items-center justify-between gap-4 w-full", children: [
|
|
4145
4141
|
/* @__PURE__ */ a(xn, { ...d }),
|
|
4146
4142
|
/* @__PURE__ */ a(
|
|
4147
4143
|
wn,
|
|
@@ -4152,7 +4148,7 @@ const cr = F((t) => {
|
|
|
4152
4148
|
remove: r,
|
|
4153
4149
|
duplicate: u,
|
|
4154
4150
|
move: h,
|
|
4155
|
-
upload:
|
|
4151
|
+
upload: v
|
|
4156
4152
|
}
|
|
4157
4153
|
)
|
|
4158
4154
|
] })
|
|
@@ -4203,7 +4199,7 @@ const dr = F((t) => {
|
|
|
4203
4199
|
O();
|
|
4204
4200
|
},
|
|
4205
4201
|
[u, d, s.fields, f]
|
|
4206
|
-
),
|
|
4202
|
+
), v = I(() => {
|
|
4207
4203
|
const N = n.fields.map((j, B) => u(B)).flatMap((j) => j.affectedSections), T = N.length ? "Remove fields and conditions?" : "Remove fields?", R = n.fields.length, O = N.map((j) => j.label).join(", "), M = N.length ? `Deleting this section will remove the ${R} field(s) it contains and will remove the conditions from following sections: ${O}` : `Deleting this section will remove the ${R} field(s) it contains.`, V = gt(s.fields, e), k = () => l("fields", V);
|
|
4208
4204
|
if (N.length > 0) {
|
|
4209
4205
|
f({
|
|
@@ -4267,8 +4263,8 @@ const dr = F((t) => {
|
|
|
4267
4263
|
...x.dragHandleProps,
|
|
4268
4264
|
variant: "outline",
|
|
4269
4265
|
className: "mb-4 w-full",
|
|
4270
|
-
children: /* @__PURE__ */
|
|
4271
|
-
/* @__PURE__ */
|
|
4266
|
+
children: /* @__PURE__ */ g("div", { className: "flex items-center justify-between gap-3 w-full", children: [
|
|
4267
|
+
/* @__PURE__ */ g("div", { className: "flex grow flex-col gap-2 w-full", children: [
|
|
4272
4268
|
!r && /* @__PURE__ */ a(xn, { ...m }),
|
|
4273
4269
|
/* @__PURE__ */ a(
|
|
4274
4270
|
on,
|
|
@@ -4276,7 +4272,7 @@ const dr = F((t) => {
|
|
|
4276
4272
|
droppableId: n.identifier,
|
|
4277
4273
|
type: "SECTION",
|
|
4278
4274
|
isDropDisabled: o,
|
|
4279
|
-
children: (N) => /* @__PURE__ */
|
|
4275
|
+
children: (N) => /* @__PURE__ */ g(
|
|
4280
4276
|
"div",
|
|
4281
4277
|
{
|
|
4282
4278
|
className: "flex flex-col gap-0 w-full",
|
|
@@ -4296,12 +4292,12 @@ const dr = F((t) => {
|
|
|
4296
4292
|
T.identifier
|
|
4297
4293
|
)),
|
|
4298
4294
|
N.placeholder,
|
|
4299
|
-
/* @__PURE__ */
|
|
4300
|
-
/* @__PURE__ */ a($.ClickTrigger, { children: /* @__PURE__ */
|
|
4295
|
+
/* @__PURE__ */ g($.Root, { children: [
|
|
4296
|
+
/* @__PURE__ */ a($.ClickTrigger, { children: /* @__PURE__ */ g(Q, { type: "button", variant: "solid", children: [
|
|
4301
4297
|
/* @__PURE__ */ a(L, { icon: "RiAddLine" }),
|
|
4302
4298
|
" Add field"
|
|
4303
4299
|
] }) }),
|
|
4304
|
-
/* @__PURE__ */ a($.Content, { children: b.flat().map((T) => /* @__PURE__ */
|
|
4300
|
+
/* @__PURE__ */ a($.Content, { children: b.flat().map((T) => /* @__PURE__ */ g($.Item, { onSelect: T.onSelect, children: [
|
|
4305
4301
|
T.icon,
|
|
4306
4302
|
T.children
|
|
4307
4303
|
] }, T.value)) })
|
|
@@ -4317,7 +4313,7 @@ const dr = F((t) => {
|
|
|
4317
4313
|
{
|
|
4318
4314
|
index: e,
|
|
4319
4315
|
type: n.type,
|
|
4320
|
-
remove:
|
|
4316
|
+
remove: v,
|
|
4321
4317
|
duplicate: y,
|
|
4322
4318
|
move: w
|
|
4323
4319
|
}
|
|
@@ -4339,21 +4335,21 @@ const Un = (t, n) => {
|
|
|
4339
4335
|
u.type === "SECTION" && o({ type: "hold", fieldId: u.draggableId });
|
|
4340
4336
|
}, []), c = I(
|
|
4341
4337
|
(u) => {
|
|
4342
|
-
const { source: h, destination:
|
|
4343
|
-
if (o({ type: "release" }), !
|
|
4338
|
+
const { source: h, destination: v, type: w, reason: m, draggableId: y } = u;
|
|
4339
|
+
if (o({ type: "release" }), !v || m === "CANCEL") return;
|
|
4344
4340
|
if (w === "ROOT") {
|
|
4345
|
-
l(r, y, h.index,
|
|
4341
|
+
l(r, y, h.index, v.index, e, i);
|
|
4346
4342
|
return;
|
|
4347
4343
|
}
|
|
4348
4344
|
if (w !== "SECTION") throw new Error("Unexpected droppable type.");
|
|
4349
|
-
const [C, b] = Un(e.fields, h.droppableId) ?? [], [E, x] = Un(e.fields,
|
|
4345
|
+
const [C, b] = Un(e.fields, h.droppableId) ?? [], [E, x] = Un(e.fields, v.droppableId) ?? [];
|
|
4350
4346
|
s(
|
|
4351
4347
|
C,
|
|
4352
4348
|
b,
|
|
4353
4349
|
h.index,
|
|
4354
4350
|
E,
|
|
4355
4351
|
x,
|
|
4356
|
-
|
|
4352
|
+
v.index,
|
|
4357
4353
|
i
|
|
4358
4354
|
);
|
|
4359
4355
|
},
|
|
@@ -4364,24 +4360,24 @@ const Un = (t, n) => {
|
|
|
4364
4360
|
},
|
|
4365
4361
|
[e, i]
|
|
4366
4362
|
);
|
|
4367
|
-
return /* @__PURE__ */ a(Yn, { onDragStart: f, onDragEnd: c, children: /* @__PURE__ */ a(on, { droppableId: "droppable", type: "ROOT", children: (u) => /* @__PURE__ */
|
|
4363
|
+
return /* @__PURE__ */ a(Yn, { onDragStart: f, onDragEnd: c, children: /* @__PURE__ */ a(on, { droppableId: "droppable", type: "ROOT", children: (u) => /* @__PURE__ */ g(
|
|
4368
4364
|
"div",
|
|
4369
4365
|
{
|
|
4370
4366
|
className: "flex flex-col gap-0",
|
|
4371
4367
|
ref: u.innerRef,
|
|
4372
4368
|
...u.droppableProps,
|
|
4373
4369
|
children: [
|
|
4374
|
-
e.fields.map((h,
|
|
4370
|
+
e.fields.map((h, v) => /* @__PURE__ */ g(xr, { children: [
|
|
4375
4371
|
/* @__PURE__ */ a(
|
|
4376
4372
|
dr,
|
|
4377
4373
|
{
|
|
4378
4374
|
field: h,
|
|
4379
|
-
index:
|
|
4375
|
+
index: v,
|
|
4380
4376
|
dropState: r,
|
|
4381
4377
|
fieldsOnly: n
|
|
4382
4378
|
}
|
|
4383
4379
|
),
|
|
4384
|
-
!n &&
|
|
4380
|
+
!n && v !== e.fields.length - 1 && /* @__PURE__ */ g(
|
|
4385
4381
|
Q,
|
|
4386
4382
|
{
|
|
4387
4383
|
className: "mb-4",
|
|
@@ -4389,7 +4385,7 @@ const Un = (t, n) => {
|
|
|
4389
4385
|
variant: "soft",
|
|
4390
4386
|
accentColor: "base",
|
|
4391
4387
|
onClick: () => {
|
|
4392
|
-
d(
|
|
4388
|
+
d(v);
|
|
4393
4389
|
},
|
|
4394
4390
|
children: [
|
|
4395
4391
|
/* @__PURE__ */ a(L, { icon: "RiAddLine" }),
|
|
@@ -4398,7 +4394,7 @@ const Un = (t, n) => {
|
|
|
4398
4394
|
}
|
|
4399
4395
|
)
|
|
4400
4396
|
] }, h.identifier)),
|
|
4401
|
-
/* @__PURE__ */
|
|
4397
|
+
/* @__PURE__ */ g(
|
|
4402
4398
|
Q,
|
|
4403
4399
|
{
|
|
4404
4400
|
className: "mb-4",
|
|
@@ -4435,7 +4431,7 @@ const cl = () => {
|
|
|
4435
4431
|
showTabs: c = !0,
|
|
4436
4432
|
tabsListClassName: d,
|
|
4437
4433
|
hydrateRevisionWithImages: u
|
|
4438
|
-
} = t, { showError: h } = Jt(),
|
|
4434
|
+
} = t, { showError: h } = Jt(), v = I(
|
|
4439
4435
|
(b) => {
|
|
4440
4436
|
const E = {};
|
|
4441
4437
|
b.title || (E.title = "Title is required."), (!b.fields || b.fields.length === 0) && (E.fields = "At least one field is required.");
|
|
@@ -4473,30 +4469,30 @@ const cl = () => {
|
|
|
4473
4469
|
[o]
|
|
4474
4470
|
), m = r ? u(r) : void 0, y = tn({
|
|
4475
4471
|
initialValues: ja(m) ?? w,
|
|
4476
|
-
validate:
|
|
4472
|
+
validate: v,
|
|
4477
4473
|
onSubmit: i,
|
|
4478
4474
|
validateOnChange: !1,
|
|
4479
4475
|
validateOnBlur: !1
|
|
4480
4476
|
}), C = P(() => nl(y.values), [y.values]);
|
|
4481
|
-
return /* @__PURE__ */ a(xe.Root, { ref: n, defaultValue: "edit", children: /* @__PURE__ */
|
|
4482
|
-
c && /* @__PURE__ */
|
|
4477
|
+
return /* @__PURE__ */ a(xe.Root, { ref: n, defaultValue: "edit", children: /* @__PURE__ */ g("div", { className: "flex flex-col gap-2", children: [
|
|
4478
|
+
c && /* @__PURE__ */ g(
|
|
4483
4479
|
xe.List,
|
|
4484
4480
|
{
|
|
4485
4481
|
className: je("sticky top-0 z-[2000] flex bg-(--color-background)", d),
|
|
4486
4482
|
children: [
|
|
4487
|
-
/* @__PURE__ */ a(xe.Trigger, { className: "grow", value: "edit", children: /* @__PURE__ */
|
|
4483
|
+
/* @__PURE__ */ a(xe.Trigger, { className: "grow", value: "edit", children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
4488
4484
|
/* @__PURE__ */ a(L, { icon: "RiPencilLine" }),
|
|
4489
4485
|
"Edit form"
|
|
4490
4486
|
] }) }),
|
|
4491
|
-
/* @__PURE__ */ a(xe.Trigger, { className: "grow", value: "preview", children: /* @__PURE__ */
|
|
4487
|
+
/* @__PURE__ */ a(xe.Trigger, { className: "grow", value: "preview", children: /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
|
|
4492
4488
|
/* @__PURE__ */ a(L, { icon: "RiEyeLine" }),
|
|
4493
4489
|
"Preview form"
|
|
4494
4490
|
] }) })
|
|
4495
4491
|
]
|
|
4496
4492
|
}
|
|
4497
4493
|
),
|
|
4498
|
-
/* @__PURE__ */
|
|
4499
|
-
l && /* @__PURE__ */
|
|
4494
|
+
/* @__PURE__ */ g(xe.Content, { value: "edit", children: [
|
|
4495
|
+
l && /* @__PURE__ */ g("span", { children: [
|
|
4500
4496
|
"Create your form using various field types. Sections can be",
|
|
4501
4497
|
" ",
|
|
4502
4498
|
/* @__PURE__ */ a("strong", { children: "conditionally rendered" }),
|
|
@@ -4504,9 +4500,9 @@ const cl = () => {
|
|
|
4504
4500
|
" ",
|
|
4505
4501
|
/* @__PURE__ */ a("strong", { children: "answers to fields in preceding sections. " })
|
|
4506
4502
|
] }),
|
|
4507
|
-
/* @__PURE__ */
|
|
4508
|
-
/* @__PURE__ */
|
|
4509
|
-
s && /* @__PURE__ */
|
|
4503
|
+
/* @__PURE__ */ g("form", { className: "mt-3 flex flex-col gap-2", id: ct, onSubmit: y.handleSubmit, children: [
|
|
4504
|
+
/* @__PURE__ */ g(nn, { value: y, children: [
|
|
4505
|
+
s && /* @__PURE__ */ g(Y, { children: [
|
|
4510
4506
|
/* @__PURE__ */ a(
|
|
4511
4507
|
ze,
|
|
4512
4508
|
{
|
|
@@ -4562,7 +4558,7 @@ const cl = () => {
|
|
|
4562
4558
|
}
|
|
4563
4559
|
)
|
|
4564
4560
|
] }),
|
|
4565
|
-
/* @__PURE__ */
|
|
4561
|
+
/* @__PURE__ */ g("div", { className: "flex items-center justify-end gap-2", children: [
|
|
4566
4562
|
e && /* @__PURE__ */ a(Q, { type: "button", variant: "solid", accentColor: "base", onClick: e, children: "Cancel" }),
|
|
4567
4563
|
/* @__PURE__ */ a(Q, { type: "submit", children: "Save form" })
|
|
4568
4564
|
] })
|
|
@@ -4585,7 +4581,7 @@ async function fl(t, n, e, i) {
|
|
|
4585
4581
|
const ml = F((t) => {
|
|
4586
4582
|
const { file: n, onClose: e, onSave: i, onDelete: r, dirty: o, onDirty: l } = t;
|
|
4587
4583
|
n.objectURL || (n.objectURL = URL.createObjectURL(n));
|
|
4588
|
-
const s = X(null), f = X(null), [c, d] = z(Kn.red), [u, h] = z(null), [
|
|
4584
|
+
const s = X(null), f = X(null), [c, d] = z(Kn.red), [u, h] = z(null), [v, w] = z(!1), [m, y] = z(!1), C = X(null), b = qn(C);
|
|
4589
4585
|
q(() => {
|
|
4590
4586
|
const B = new Image();
|
|
4591
4587
|
B.onload = function() {
|
|
@@ -4626,7 +4622,7 @@ const ml = F((t) => {
|
|
|
4626
4622
|
}, [E]), j = I(() => {
|
|
4627
4623
|
Ct(n);
|
|
4628
4624
|
}, [n]);
|
|
4629
|
-
return /* @__PURE__ */ a(Ge, { open: !0, onOpenChange: e, children: /* @__PURE__ */
|
|
4625
|
+
return /* @__PURE__ */ a(Ge, { open: !0, onOpenChange: e, children: /* @__PURE__ */ g(Ke, { children: [
|
|
4630
4626
|
/* @__PURE__ */ a(
|
|
4631
4627
|
Xe,
|
|
4632
4628
|
{
|
|
@@ -4634,7 +4630,7 @@ const ml = F((t) => {
|
|
|
4634
4630
|
"data-floating-content": ""
|
|
4635
4631
|
}
|
|
4636
4632
|
),
|
|
4637
|
-
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", "data-floating-content": "", children: /* @__PURE__ */
|
|
4633
|
+
/* @__PURE__ */ a(Ye, { className: "fixed inset-0", "data-floating-content": "", children: /* @__PURE__ */ g(Y, { children: [
|
|
4638
4634
|
u && /* @__PURE__ */ a(
|
|
4639
4635
|
"canvas",
|
|
4640
4636
|
{
|
|
@@ -4645,13 +4641,13 @@ const ml = F((t) => {
|
|
|
4645
4641
|
height: u.height
|
|
4646
4642
|
}
|
|
4647
4643
|
),
|
|
4648
|
-
/* @__PURE__ */
|
|
4649
|
-
/* @__PURE__ */ a("div", { className: "flex h-8 w-full items-center bg-(--color-background) px-2", children: /* @__PURE__ */ a(pe, { accentColor: "base", size: "md", variant: "soft", children: /* @__PURE__ */
|
|
4650
|
-
/* @__PURE__ */
|
|
4644
|
+
/* @__PURE__ */ g("div", { className: "relative flex h-full w-full flex-col", children: [
|
|
4645
|
+
/* @__PURE__ */ a("div", { className: "flex h-8 w-full items-center bg-(--color-background) px-2", children: /* @__PURE__ */ a(pe, { accentColor: "base", size: "md", variant: "soft", children: /* @__PURE__ */ g("div", { className: "grid w-full grid-cols-3", children: [
|
|
4646
|
+
/* @__PURE__ */ g("div", { className: "flex gap-2", children: [
|
|
4651
4647
|
/* @__PURE__ */ a(A, { "aria-label": "close", onClick: N, children: /* @__PURE__ */ a(L, { icon: "RiCloseLine" }) }),
|
|
4652
4648
|
/* @__PURE__ */ a(A, { "aria-label": `Download ${n.name}`, onClick: j, children: /* @__PURE__ */ a(L, { icon: "RiDownload2Line" }) })
|
|
4653
4649
|
] }),
|
|
4654
|
-
/* @__PURE__ */
|
|
4650
|
+
/* @__PURE__ */ g("div", { className: "flex items-center justify-center gap-2", children: [
|
|
4655
4651
|
/* @__PURE__ */ a(
|
|
4656
4652
|
Qn,
|
|
4657
4653
|
{
|
|
@@ -4686,7 +4682,7 @@ const ml = F((t) => {
|
|
|
4686
4682
|
/* @__PURE__ */ a(A, { "aria-label": "undo", onClick: R, children: /* @__PURE__ */ a(L, { icon: "RiArrowGoForwardLine" }) }),
|
|
4687
4683
|
/* @__PURE__ */ a(A, { "aria-label": "undo all", onClick: M, children: /* @__PURE__ */ a(L, { icon: "RiLoopLeftLine" }) })
|
|
4688
4684
|
] }),
|
|
4689
|
-
/* @__PURE__ */
|
|
4685
|
+
/* @__PURE__ */ g("div", { className: "flex justify-end gap-2", children: [
|
|
4690
4686
|
/* @__PURE__ */ a(
|
|
4691
4687
|
A,
|
|
4692
4688
|
{
|
|
@@ -4699,7 +4695,7 @@ const ml = F((t) => {
|
|
|
4699
4695
|
/* @__PURE__ */ a(A, { "aria-label": "Delete attachment", onClick: x, children: /* @__PURE__ */ a(L, { icon: "RiDeleteBin2Line" }) })
|
|
4700
4696
|
] })
|
|
4701
4697
|
] }) }) }),
|
|
4702
|
-
/* @__PURE__ */
|
|
4698
|
+
/* @__PURE__ */ g("div", { className: "relative flex w-full grow items-center justify-center p-4", children: [
|
|
4703
4699
|
/* @__PURE__ */ a(
|
|
4704
4700
|
"img",
|
|
4705
4701
|
{
|
|
@@ -4709,7 +4705,7 @@ const ml = F((t) => {
|
|
|
4709
4705
|
src: n.objectURL
|
|
4710
4706
|
}
|
|
4711
4707
|
),
|
|
4712
|
-
|
|
4708
|
+
v ? /* @__PURE__ */ a(Be, {}) : /* @__PURE__ */ a(
|
|
4713
4709
|
Kr,
|
|
4714
4710
|
{
|
|
4715
4711
|
backgroundImage: n.objectURL,
|