@lgsm/modules 1.6.11 → 1.6.12
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/main.js +85 -86
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -309,14 +309,14 @@ const Bn = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ln = bn, D
|
|
|
309
309
|
}
|
|
310
310
|
g = !1;
|
|
311
311
|
}
|
|
312
|
-
const O = s(b).join(":"), k = x ? O + rn : O,
|
|
313
|
-
if (a.includes(
|
|
312
|
+
const O = s(b).join(":"), k = x ? O + rn : O, A = k + y;
|
|
313
|
+
if (a.includes(A))
|
|
314
314
|
continue;
|
|
315
|
-
a.push(
|
|
315
|
+
a.push(A);
|
|
316
316
|
const P = o(y, g);
|
|
317
317
|
for (let L = 0; L < P.length; ++L) {
|
|
318
|
-
const
|
|
319
|
-
a.push(k +
|
|
318
|
+
const T = P[L];
|
|
319
|
+
a.push(k + T);
|
|
320
320
|
}
|
|
321
321
|
u = d + (u.length > 0 ? " " + u : u);
|
|
322
322
|
}
|
|
@@ -368,7 +368,7 @@ const q = (e) => {
|
|
|
368
368
|
const r = Ir.exec(e);
|
|
369
369
|
return r ? r[1] ? t(r[1]) : n : !1;
|
|
370
370
|
}, Lr = (e) => e === "position" || e === "percentage", Ur = (e) => e === "image" || e === "url", jr = (e) => e === "length" || e === "size" || e === "bg-size", zr = (e) => e === "length", $s = (e) => e === "number", ea = (e) => e === "family-name", _r = (e) => e === "shadow", ta = () => {
|
|
371
|
-
const e = q("color"), t = q("font"), n = q("text"), r = q("font-weight"), o = q("tracking"), s = q("leading"), a = q("breakpoint"), i = q("container"), u = q("spacing"), c = q("radius"), d = q("shadow"), l = q("inset-shadow"), b = q("text-shadow"), x = q("drop-shadow"), h = q("blur"), p = q("perspective"), g = q("aspect"), y = q("ease"), O = q("animate"), k = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"],
|
|
371
|
+
const e = q("color"), t = q("font"), n = q("text"), r = q("font-weight"), o = q("tracking"), s = q("leading"), a = q("breakpoint"), i = q("container"), u = q("spacing"), c = q("radius"), d = q("shadow"), l = q("inset-shadow"), b = q("text-shadow"), x = q("drop-shadow"), h = q("blur"), p = q("perspective"), g = q("aspect"), y = q("ease"), O = q("animate"), k = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], A = () => [
|
|
372
372
|
"center",
|
|
373
373
|
"top",
|
|
374
374
|
"bottom",
|
|
@@ -386,9 +386,9 @@ const q = (e) => {
|
|
|
386
386
|
"bottom-left",
|
|
387
387
|
// Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
|
|
388
388
|
"left-bottom"
|
|
389
|
-
], P = () => [...
|
|
389
|
+
], P = () => [...A(), C, R], L = () => ["auto", "hidden", "clip", "visible", "scroll"], T = () => ["auto", "contain", "none"], S = () => [C, R, u], H = () => [Ke, "full", "auto", ...S()], oe = () => [Te, "none", "subgrid", C, R], Ee = () => ["auto", {
|
|
390
390
|
span: ["full", Te, C, R]
|
|
391
|
-
}, Te, C, R], ee = () => [Te, "auto", C, R], K = () => ["auto", "min", "max", "fr", C, R], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], te = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], D = () => ["auto", ...S()], j = () => [Ke, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...S()], E = () => [e, C, R], le = () => [...
|
|
391
|
+
}, Te, C, R], ee = () => [Te, "auto", C, R], K = () => ["auto", "min", "max", "fr", C, R], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], te = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], D = () => ["auto", ...S()], j = () => [Ke, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...S()], E = () => [e, C, R], le = () => [...A(), _n, zn, {
|
|
392
392
|
position: [C, R]
|
|
393
393
|
}], Q = () => ["no-repeat", {
|
|
394
394
|
repeat: ["", "x", "y", "space", "round"]
|
|
@@ -561,21 +561,21 @@ const q = (e) => {
|
|
|
561
561
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
562
562
|
*/
|
|
563
563
|
overscroll: [{
|
|
564
|
-
overscroll:
|
|
564
|
+
overscroll: T()
|
|
565
565
|
}],
|
|
566
566
|
/**
|
|
567
567
|
* Overscroll Behavior X
|
|
568
568
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
569
569
|
*/
|
|
570
570
|
"overscroll-x": [{
|
|
571
|
-
"overscroll-x":
|
|
571
|
+
"overscroll-x": T()
|
|
572
572
|
}],
|
|
573
573
|
/**
|
|
574
574
|
* Overscroll Behavior Y
|
|
575
575
|
* @see https://tailwindcss.com/docs/overscroll-behavior
|
|
576
576
|
*/
|
|
577
577
|
"overscroll-y": [{
|
|
578
|
-
"overscroll-y":
|
|
578
|
+
"overscroll-y": T()
|
|
579
579
|
}],
|
|
580
580
|
/**
|
|
581
581
|
* Position
|
|
@@ -2002,7 +2002,7 @@ const q = (e) => {
|
|
|
2002
2002
|
}]
|
|
2003
2003
|
}],
|
|
2004
2004
|
"mask-image-radial-pos": [{
|
|
2005
|
-
"mask-radial-at":
|
|
2005
|
+
"mask-radial-at": A()
|
|
2006
2006
|
}],
|
|
2007
2007
|
"mask-image-conic-pos": [{
|
|
2008
2008
|
"mask-conic": [B]
|
|
@@ -3488,7 +3488,7 @@ function Qa(e) {
|
|
|
3488
3488
|
}
|
|
3489
3489
|
const Xa = (e) => {
|
|
3490
3490
|
var t, n, r, o, s, a, i, u, c;
|
|
3491
|
-
const { invert: d, toast: l, unstyled: b, interacting: x, setHeights: h, visibleToasts: p, heights: g, index: y, toasts: O, expanded: k, removeToast:
|
|
3491
|
+
const { invert: d, toast: l, unstyled: b, interacting: x, setHeights: h, visibleToasts: p, heights: g, index: y, toasts: O, expanded: k, removeToast: A, defaultRichColors: P, closeButton: L, style: T, cancelButtonStyle: S, actionButtonStyle: H, className: oe = "", descriptionClassName: Ee = "", duration: ee, position: K, gap: G, expandByDefault: te, classNames: D, icons: j, closeButtonAriaLabel: E = "Close toast" } = e, [le, Q] = w.useState(null), [V, ne] = w.useState(null), [N, I] = w.useState(!1), [U, re] = w.useState(!1), [_, z] = w.useState(!1), [fe, Se] = w.useState(!1), [Ne, me] = w.useState(!1), [rs, jt] = w.useState(0), [os, kn] = w.useState(0), et = w.useRef(l.duration || ee || Yn), Nn = w.useRef(null), Re = w.useRef(null), ss = y === 0, as = y + 1 <= p, ce = l.type, _e = l.dismissible !== !1, is = l.className || "", ls = l.descriptionClassName || "", dt = w.useMemo(() => g.findIndex((F) => F.toastId === l.id) || 0, [
|
|
3492
3492
|
g,
|
|
3493
3493
|
l.id
|
|
3494
3494
|
]), cs = w.useMemo(() => {
|
|
@@ -3557,11 +3557,11 @@ const Xa = (e) => {
|
|
|
3557
3557
|
]);
|
|
3558
3558
|
const Ae = w.useCallback(() => {
|
|
3559
3559
|
re(!0), jt(He.current), h((F) => F.filter((Y) => Y.toastId !== l.id)), setTimeout(() => {
|
|
3560
|
-
|
|
3560
|
+
A(l);
|
|
3561
3561
|
}, Ga);
|
|
3562
3562
|
}, [
|
|
3563
3563
|
l,
|
|
3564
|
-
|
|
3564
|
+
A,
|
|
3565
3565
|
h,
|
|
3566
3566
|
He
|
|
3567
3567
|
]);
|
|
@@ -3638,7 +3638,7 @@ const Xa = (e) => {
|
|
|
3638
3638
|
"--z-index": O.length - y,
|
|
3639
3639
|
"--offset": `${U ? rs : He.current}px`,
|
|
3640
3640
|
"--initial-height": te ? "auto" : `${os}px`,
|
|
3641
|
-
...
|
|
3641
|
+
...T,
|
|
3642
3642
|
...l.style
|
|
3643
3643
|
},
|
|
3644
3644
|
onDragEnd: () => {
|
|
@@ -3768,7 +3768,7 @@ const $a = /* @__PURE__ */ w.forwardRef(function(t, n) {
|
|
|
3768
3768
|
const { id: r, invert: o, position: s = "bottom-right", hotkey: a = [
|
|
3769
3769
|
"altKey",
|
|
3770
3770
|
"KeyT"
|
|
3771
|
-
], expand: i, closeButton: u, className: c, offset: d, mobileOffset: l, theme: b = "light", richColors: x, duration: h, style: p, visibleToasts: g = Wa, toastOptions: y, dir: O = Jn(), gap: k = Ya, icons:
|
|
3771
|
+
], expand: i, closeButton: u, className: c, offset: d, mobileOffset: l, theme: b = "light", richColors: x, duration: h, style: p, visibleToasts: g = Wa, toastOptions: y, dir: O = Jn(), gap: k = Ya, icons: A, containerAriaLabel: P = "Notifications" } = t, [L, T] = w.useState([]), S = w.useMemo(() => r ? L.filter((N) => N.toasterId === r) : L.filter((N) => !N.toasterId), [
|
|
3772
3772
|
L,
|
|
3773
3773
|
r
|
|
3774
3774
|
]), H = w.useMemo(() => Array.from(new Set([
|
|
@@ -3777,7 +3777,7 @@ const $a = /* @__PURE__ */ w.forwardRef(function(t, n) {
|
|
|
3777
3777
|
S,
|
|
3778
3778
|
s
|
|
3779
3779
|
]), [oe, Ee] = w.useState([]), [ee, K] = w.useState(!1), [G, te] = w.useState(!1), [D, j] = w.useState(b !== "system" ? b : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), E = w.useRef(null), le = a.join("+").replace(/Key/g, "").replace(/Digit/g, ""), Q = w.useRef(null), V = w.useRef(!1), ne = w.useCallback((N) => {
|
|
3780
|
-
|
|
3780
|
+
T((I) => {
|
|
3781
3781
|
var U;
|
|
3782
3782
|
return (U = I.find((re) => re.id === N.id)) != null && U.delete || se.dismiss(N.id), I.filter(({ id: re }) => re !== N.id);
|
|
3783
3783
|
});
|
|
@@ -3785,7 +3785,7 @@ const $a = /* @__PURE__ */ w.forwardRef(function(t, n) {
|
|
|
3785
3785
|
return w.useEffect(() => se.subscribe((N) => {
|
|
3786
3786
|
if (N.dismiss) {
|
|
3787
3787
|
requestAnimationFrame(() => {
|
|
3788
|
-
|
|
3788
|
+
T((I) => I.map((U) => U.id === N.id ? {
|
|
3789
3789
|
...U,
|
|
3790
3790
|
delete: !0
|
|
3791
3791
|
} : U));
|
|
@@ -3794,7 +3794,7 @@ const $a = /* @__PURE__ */ w.forwardRef(function(t, n) {
|
|
|
3794
3794
|
}
|
|
3795
3795
|
setTimeout(() => {
|
|
3796
3796
|
Ar.flushSync(() => {
|
|
3797
|
-
|
|
3797
|
+
T((I) => {
|
|
3798
3798
|
const U = I.findIndex((re) => re.id === N.id);
|
|
3799
3799
|
return U !== -1 ? [
|
|
3800
3800
|
...I.slice(0, U),
|
|
@@ -3910,7 +3910,7 @@ const $a = /* @__PURE__ */ w.forwardRef(function(t, n) {
|
|
|
3910
3910
|
var Se, Ne;
|
|
3911
3911
|
return /* @__PURE__ */ w.createElement(Xa, {
|
|
3912
3912
|
key: z.id,
|
|
3913
|
-
icons:
|
|
3913
|
+
icons: A,
|
|
3914
3914
|
index: fe,
|
|
3915
3915
|
toast: z,
|
|
3916
3916
|
defaultRichColors: x,
|
|
@@ -4137,15 +4137,15 @@ var fi = "DismissableLayer", ln = "dismissableLayer.update", mi = "dismissableLa
|
|
|
4137
4137
|
onInteractOutside: a,
|
|
4138
4138
|
onDismiss: i,
|
|
4139
4139
|
...u
|
|
4140
|
-
} = e, c = m.useContext(qr), [d, l] = m.useState(null), b = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, x] = m.useState({}), h = ze(t, (
|
|
4141
|
-
const S =
|
|
4142
|
-
!
|
|
4143
|
-
}, b), L = yi((
|
|
4144
|
-
const S =
|
|
4145
|
-
[...c.branches].some((oe) => oe.contains(S)) || (s == null || s(
|
|
4140
|
+
} = e, c = m.useContext(qr), [d, l] = m.useState(null), b = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, x] = m.useState({}), h = ze(t, (T) => l(T)), p = Array.from(c.layers), [g] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), y = p.indexOf(g), O = d ? p.indexOf(d) : -1, k = c.layersWithOutsidePointerEventsDisabled.size > 0, A = O >= y, P = bi((T) => {
|
|
4141
|
+
const S = T.target, H = [...c.branches].some((oe) => oe.contains(S));
|
|
4142
|
+
!A || H || (o == null || o(T), a == null || a(T), T.defaultPrevented || i == null || i());
|
|
4143
|
+
}, b), L = yi((T) => {
|
|
4144
|
+
const S = T.target;
|
|
4145
|
+
[...c.branches].some((oe) => oe.contains(S)) || (s == null || s(T), a == null || a(T), T.defaultPrevented || i == null || i());
|
|
4146
4146
|
}, b);
|
|
4147
|
-
return di((
|
|
4148
|
-
O === c.layers.size - 1 && (r == null || r(
|
|
4147
|
+
return di((T) => {
|
|
4148
|
+
O === c.layers.size - 1 && (r == null || r(T), !T.defaultPrevented && i && (T.preventDefault(), i()));
|
|
4149
4149
|
}, b), m.useEffect(() => {
|
|
4150
4150
|
if (d)
|
|
4151
4151
|
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Gn = b.body.style.pointerEvents, b.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), Qn(), () => {
|
|
@@ -4154,15 +4154,15 @@ var fi = "DismissableLayer", ln = "dismissableLayer.update", mi = "dismissableLa
|
|
|
4154
4154
|
}, [d, b, n, c]), m.useEffect(() => () => {
|
|
4155
4155
|
d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Qn());
|
|
4156
4156
|
}, [d, c]), m.useEffect(() => {
|
|
4157
|
-
const
|
|
4158
|
-
return document.addEventListener(ln,
|
|
4157
|
+
const T = () => x({});
|
|
4158
|
+
return document.addEventListener(ln, T), () => document.removeEventListener(ln, T);
|
|
4159
4159
|
}, []), /* @__PURE__ */ v(
|
|
4160
4160
|
ke.div,
|
|
4161
4161
|
{
|
|
4162
4162
|
...u,
|
|
4163
4163
|
ref: h,
|
|
4164
4164
|
style: {
|
|
4165
|
-
pointerEvents: k ?
|
|
4165
|
+
pointerEvents: k ? A ? "auto" : "none" : void 0,
|
|
4166
4166
|
...e.style
|
|
4167
4167
|
},
|
|
4168
4168
|
onFocusCapture: De(e.onFocusCapture, L.onFocusCapture),
|
|
@@ -4259,12 +4259,12 @@ var Vt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
|
|
|
4259
4259
|
if (r) {
|
|
4260
4260
|
let p = function(k) {
|
|
4261
4261
|
if (x.paused || !i) return;
|
|
4262
|
-
const
|
|
4263
|
-
i.contains(
|
|
4262
|
+
const A = k.target;
|
|
4263
|
+
i.contains(A) ? l.current = A : Oe(l.current, { select: !0 });
|
|
4264
4264
|
}, g = function(k) {
|
|
4265
4265
|
if (x.paused || !i) return;
|
|
4266
|
-
const
|
|
4267
|
-
|
|
4266
|
+
const A = k.relatedTarget;
|
|
4267
|
+
A !== null && (i.contains(A) || Oe(l.current, { select: !0 }));
|
|
4268
4268
|
}, y = function(k) {
|
|
4269
4269
|
if (document.activeElement === document.body)
|
|
4270
4270
|
for (const P of k)
|
|
@@ -4297,8 +4297,8 @@ var Vt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
|
|
|
4297
4297
|
if (!n && !r || x.paused) return;
|
|
4298
4298
|
const g = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, y = document.activeElement;
|
|
4299
4299
|
if (g && y) {
|
|
4300
|
-
const O = p.currentTarget, [k,
|
|
4301
|
-
k &&
|
|
4300
|
+
const O = p.currentTarget, [k, A] = xi(O);
|
|
4301
|
+
k && A ? !p.shiftKey && y === A ? (p.preventDefault(), n && Oe(k, { select: !0 })) : p.shiftKey && y === k && (p.preventDefault(), n && Oe(A, { select: !0 })) : y === O && p.preventDefault();
|
|
4302
4302
|
}
|
|
4303
4303
|
},
|
|
4304
4304
|
[n, r, x.paused]
|
|
@@ -4603,12 +4603,12 @@ var eo = ji(), Gt = function() {
|
|
|
4603
4603
|
onScrollCapture: Gt,
|
|
4604
4604
|
onWheelCapture: Gt,
|
|
4605
4605
|
onTouchMoveCapture: Gt
|
|
4606
|
-
}), o = r[0], s = r[1], a = e.forwardProps, i = e.children, u = e.className, c = e.removeScrollBar, d = e.enabled, l = e.shards, b = e.sideCar, x = e.noRelative, h = e.noIsolation, p = e.inert, g = e.allowPinchZoom, y = e.as, O = y === void 0 ? "div" : y, k = e.gapMode,
|
|
4606
|
+
}), o = r[0], s = r[1], a = e.forwardProps, i = e.children, u = e.className, c = e.removeScrollBar, d = e.enabled, l = e.shards, b = e.sideCar, x = e.noRelative, h = e.noIsolation, p = e.inert, g = e.allowPinchZoom, y = e.as, O = y === void 0 ? "div" : y, k = e.gapMode, A = Zr(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), P = b, L = Bi([n, t]), T = we(we({}, A), o);
|
|
4607
4607
|
return m.createElement(
|
|
4608
4608
|
m.Fragment,
|
|
4609
4609
|
null,
|
|
4610
4610
|
d && m.createElement(P, { sideCar: eo, removeScrollBar: c, shards: l, noRelative: x, noIsolation: h, inert: p, setCallbacks: s, allowPinchZoom: !!g, lockRef: n, gapMode: k }),
|
|
4611
|
-
a ? m.cloneElement(m.Children.only(i), we(we({},
|
|
4611
|
+
a ? m.cloneElement(m.Children.only(i), we(we({}, T), { ref: L })) : m.createElement(O, we({}, T, { className: u, ref: L }), i)
|
|
4612
4612
|
);
|
|
4613
4613
|
});
|
|
4614
4614
|
Pt.defaultProps = {
|
|
@@ -4854,18 +4854,18 @@ function ul(e) {
|
|
|
4854
4854
|
var i = m.useCallback(function(p, g) {
|
|
4855
4855
|
if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
|
|
4856
4856
|
return !a.current.allowPinchZoom;
|
|
4857
|
-
var y = vt(p), O = n.current, k = "deltaX" in p ? p.deltaX : O[0] - y[0],
|
|
4858
|
-
if ("touches" in p &&
|
|
4857
|
+
var y = vt(p), O = n.current, k = "deltaX" in p ? p.deltaX : O[0] - y[0], A = "deltaY" in p ? p.deltaY : O[1] - y[1], P, L = p.target, T = Math.abs(k) > Math.abs(A) ? "h" : "v";
|
|
4858
|
+
if ("touches" in p && T === "h" && L.type === "range")
|
|
4859
4859
|
return !1;
|
|
4860
|
-
var S = or(
|
|
4860
|
+
var S = or(T, L);
|
|
4861
4861
|
if (!S)
|
|
4862
4862
|
return !0;
|
|
4863
|
-
if (S ? P =
|
|
4863
|
+
if (S ? P = T : (P = T === "v" ? "h" : "v", S = or(T, L)), !S)
|
|
4864
4864
|
return !1;
|
|
4865
|
-
if (!r.current && "changedTouches" in p && (k ||
|
|
4865
|
+
if (!r.current && "changedTouches" in p && (k || A) && (r.current = P), !P)
|
|
4866
4866
|
return !0;
|
|
4867
4867
|
var H = r.current || P;
|
|
4868
|
-
return al(H, g, p, H === "h" ? k :
|
|
4868
|
+
return al(H, g, p, H === "h" ? k : A);
|
|
4869
4869
|
}, []), u = m.useCallback(function(p) {
|
|
4870
4870
|
var g = p;
|
|
4871
4871
|
if (!(!qe.length || qe[qe.length - 1] !== s)) {
|
|
@@ -4879,15 +4879,15 @@ function ul(e) {
|
|
|
4879
4879
|
if (!O) {
|
|
4880
4880
|
var k = (a.current.shards || []).map(ar).filter(Boolean).filter(function(P) {
|
|
4881
4881
|
return P.contains(g.target);
|
|
4882
|
-
}),
|
|
4883
|
-
|
|
4882
|
+
}), A = k.length > 0 ? i(g, k[0]) : !a.current.noIsolation;
|
|
4883
|
+
A && g.cancelable && g.preventDefault();
|
|
4884
4884
|
}
|
|
4885
4885
|
}
|
|
4886
4886
|
}, []), c = m.useCallback(function(p, g, y, O) {
|
|
4887
4887
|
var k = { name: p, delta: g, target: y, should: O, shadowParent: dl(y) };
|
|
4888
4888
|
t.current.push(k), setTimeout(function() {
|
|
4889
|
-
t.current = t.current.filter(function(
|
|
4890
|
-
return
|
|
4889
|
+
t.current = t.current.filter(function(A) {
|
|
4890
|
+
return A !== k;
|
|
4891
4891
|
});
|
|
4892
4892
|
}, 1);
|
|
4893
4893
|
}, []), d = m.useCallback(function(p) {
|
|
@@ -5735,10 +5735,10 @@ function Lt(e, t, n) {
|
|
|
5735
5735
|
if (f.endsWith(p, "{}"))
|
|
5736
5736
|
p = r ? p : p.slice(0, -2), h = JSON.stringify(h);
|
|
5737
5737
|
else if (f.isArray(h) && vc(h) || (f.isFileList(h) || f.endsWith(p, "[]")) && (y = f.toArray(h)))
|
|
5738
|
-
return p = Wo(p), y.forEach(function(k,
|
|
5738
|
+
return p = Wo(p), y.forEach(function(k, A) {
|
|
5739
5739
|
!(f.isUndefined(k) || k === null) && t.append(
|
|
5740
5740
|
// eslint-disable-next-line no-nested-ternary
|
|
5741
|
-
a === !0 ? dr([p],
|
|
5741
|
+
a === !0 ? dr([p], A, s) : a === null ? p : p + "[]",
|
|
5742
5742
|
c(k)
|
|
5743
5743
|
);
|
|
5744
5744
|
}), !1;
|
|
@@ -6443,30 +6443,30 @@ const Xo = (e) => {
|
|
|
6443
6443
|
config: e,
|
|
6444
6444
|
request: g
|
|
6445
6445
|
};
|
|
6446
|
-
Go(function(
|
|
6447
|
-
n(
|
|
6448
|
-
}, function(
|
|
6449
|
-
r(
|
|
6446
|
+
Go(function(T) {
|
|
6447
|
+
n(T), p();
|
|
6448
|
+
}, function(T) {
|
|
6449
|
+
r(T), p();
|
|
6450
6450
|
}, P), g = null;
|
|
6451
6451
|
}
|
|
6452
6452
|
"onloadend" in g ? g.onloadend = y : g.onreadystatechange = function() {
|
|
6453
6453
|
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(y);
|
|
6454
6454
|
}, g.onabort = function() {
|
|
6455
6455
|
g && (r(new M("Request aborted", M.ECONNABORTED, e, g)), g = null);
|
|
6456
|
-
}, g.onerror = function(
|
|
6457
|
-
const P =
|
|
6458
|
-
L.event =
|
|
6456
|
+
}, g.onerror = function(A) {
|
|
6457
|
+
const P = A && A.message ? A.message : "Network Error", L = new M(P, M.ERR_NETWORK, e, g);
|
|
6458
|
+
L.event = A || null, r(L), g = null;
|
|
6459
6459
|
}, g.ontimeout = function() {
|
|
6460
|
-
let
|
|
6460
|
+
let A = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
6461
6461
|
const P = o.transitional || qo;
|
|
6462
|
-
o.timeoutErrorMessage && (
|
|
6463
|
-
|
|
6462
|
+
o.timeoutErrorMessage && (A = o.timeoutErrorMessage), r(new M(
|
|
6463
|
+
A,
|
|
6464
6464
|
P.clarifyTimeoutError ? M.ETIMEDOUT : M.ECONNABORTED,
|
|
6465
6465
|
e,
|
|
6466
6466
|
g
|
|
6467
6467
|
)), g = null;
|
|
6468
|
-
}, s === void 0 && a.setContentType(null), "setRequestHeader" in g && f.forEach(a.toJSON(), function(
|
|
6469
|
-
g.setRequestHeader(P,
|
|
6468
|
+
}, s === void 0 && a.setContentType(null), "setRequestHeader" in g && f.forEach(a.toJSON(), function(A, P) {
|
|
6469
|
+
g.setRequestHeader(P, A);
|
|
6470
6470
|
}), f.isUndefined(o.withCredentials) || (g.withCredentials = !!o.withCredentials), i && i !== "json" && (g.responseType = o.responseType), c && ([b, h] = Tt(c, !0), g.addEventListener("progress", b)), u && g.upload && ([l, x] = Tt(u), g.upload.addEventListener("progress", l), g.upload.addEventListener("loadend", x)), (o.cancelToken || o.signal) && (d = (k) => {
|
|
6471
6471
|
g && (r(!k || k.type ? new $e(null, e, g) : k), g.abort(), g = null);
|
|
6472
6472
|
}, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
|
|
@@ -6622,16 +6622,16 @@ const Xo = (e) => {
|
|
|
6622
6622
|
data: y,
|
|
6623
6623
|
signal: O,
|
|
6624
6624
|
cancelToken: k,
|
|
6625
|
-
timeout:
|
|
6625
|
+
timeout: A,
|
|
6626
6626
|
onDownloadProgress: P,
|
|
6627
6627
|
onUploadProgress: L,
|
|
6628
|
-
responseType:
|
|
6628
|
+
responseType: T,
|
|
6629
6629
|
headers: S,
|
|
6630
6630
|
withCredentials: H = "same-origin",
|
|
6631
6631
|
fetchOptions: oe
|
|
6632
6632
|
} = Xo(h), Ee = t || fetch;
|
|
6633
|
-
|
|
6634
|
-
let ee = Gc([O, k && k.toAbortSignal()],
|
|
6633
|
+
T = T ? (T + "").toLowerCase() : "text";
|
|
6634
|
+
let ee = Gc([O, k && k.toAbortSignal()], A), K = null;
|
|
6635
6635
|
const G = ee && ee.unsubscribe && (() => {
|
|
6636
6636
|
ee.unsubscribe();
|
|
6637
6637
|
});
|
|
@@ -6663,7 +6663,7 @@ const Xo = (e) => {
|
|
|
6663
6663
|
};
|
|
6664
6664
|
K = s && new n(p, j);
|
|
6665
6665
|
let E = await (s ? Ee(K, oe) : Ee(p, j));
|
|
6666
|
-
const le = d && (
|
|
6666
|
+
const le = d && (T === "stream" || T === "response");
|
|
6667
6667
|
if (d && (P || le && G)) {
|
|
6668
6668
|
const V = {};
|
|
6669
6669
|
["status", "statusText", "headers"].forEach((U) => {
|
|
@@ -6680,8 +6680,8 @@ const Xo = (e) => {
|
|
|
6680
6680
|
V
|
|
6681
6681
|
);
|
|
6682
6682
|
}
|
|
6683
|
-
|
|
6684
|
-
let Q = await l[f.findKey(l,
|
|
6683
|
+
T = T || "text";
|
|
6684
|
+
let Q = await l[f.findKey(l, T) || "text"](E, h);
|
|
6685
6685
|
return !le && G && G(), await new Promise((V, ne) => {
|
|
6686
6686
|
Go(V, ne, {
|
|
6687
6687
|
data: Q,
|
|
@@ -7166,28 +7166,27 @@ function Ku(e, t, n) {
|
|
|
7166
7166
|
), Ie.interceptors.response.use(
|
|
7167
7167
|
(r) => r,
|
|
7168
7168
|
(r) => {
|
|
7169
|
-
var s, a, i, u, c, d, l, b, x, h, p, g;
|
|
7169
|
+
var s, a, i, u, c, d, l, b, x, h, p, g, y, O;
|
|
7170
7170
|
const o = r.response.status;
|
|
7171
|
-
if (o == 401 && ((a = (s = r.response) == null ? void 0 : s.data) == null ? void 0 : a.errorCode) != "SEC-0005"
|
|
7171
|
+
if (o == 401 && ((a = (s = r.response) == null ? void 0 : s.data) == null ? void 0 : a.errorCode) != "SEC-0005" && ((u = (i = r.response) == null ? void 0 : i.data) != null && u.message.includes("expired") || (d = (c = r.response) == null ? void 0 : c.data) != null && d.message.includes("revoked")))
|
|
7172
7172
|
if (window.sessionStorage.getItem("hasReloadedFor401"))
|
|
7173
|
-
window.sessionStorage.removeItem("hasReloadedFor401"), iu.post("/auth/logout", {}).then(() => {
|
|
7173
|
+
o == 401 && ((b = (l = r.response) == null ? void 0 : l.data) == null ? void 0 : b.errorCode) != "SEC-0005" && (window.sessionStorage.removeItem("hasReloadedFor401"), iu.post("/auth/logout", {}).then(() => {
|
|
7174
7174
|
lr("Session Ended", "Your session has ended. Please log in again to continue."), setTimeout(() => {
|
|
7175
7175
|
lu(n);
|
|
7176
7176
|
}, 1500);
|
|
7177
|
-
});
|
|
7178
|
-
else
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
});
|
|
7177
|
+
}));
|
|
7178
|
+
else return window.sessionStorage.setItem("hasReloadedFor401", "true"), typeof cr == "function" && cr(
|
|
7179
|
+
"Session Expired",
|
|
7180
|
+
"Your session has expired. We are refreshing your session, please wait..."
|
|
7181
|
+
), setTimeout(() => {
|
|
7182
|
+
window.location.reload();
|
|
7183
|
+
}, 1500), new Promise(() => {
|
|
7184
|
+
});
|
|
7186
7185
|
else if (o > 299) {
|
|
7187
|
-
const
|
|
7186
|
+
const k = ((x = r.config) == null ? void 0 : x.url) || "", A = k.substring(k.lastIndexOf("/"));
|
|
7188
7187
|
lr(
|
|
7189
|
-
`Error ${(
|
|
7190
|
-
`${((
|
|
7188
|
+
`Error ${(h = r.response) == null ? void 0 : h.status} for ${A}`,
|
|
7189
|
+
`${((g = (p = r.response) == null ? void 0 : p.data) == null ? void 0 : g.message) || r.message || "An unexpected error occurred"} [${((O = (y = r.response) == null ? void 0 : y.data) == null ? void 0 : O.errorCode) || "N/A"}]`
|
|
7191
7190
|
);
|
|
7192
7191
|
}
|
|
7193
7192
|
return Promise.reject(r);
|