@viglet/viglet-design-system 2026.3.13 → 2026.3.14
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/README.md +6 -0
- package/dist/catalogue.json +7 -1
- package/dist/components/ui/index.d.ts +1 -1
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/viglet-assistant.d.ts +11 -1
- package/dist/components/ui/viglet-assistant.d.ts.map +1 -1
- package/dist/exports.json +4 -1
- package/dist/index.cjs +1 -1
- package/dist/index.es.js +321 -293
- package/dist/viglet-design-system.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { a as e, n as t, r as n, t as r } from "./utils-Fk5jmzzb.js";
|
|
3
3
|
import { C as i, S as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, r as ee, s as b, t as x, u as S, x as C } from "./badge-locale-Bx7m7tg2.js";
|
|
4
|
-
import { A as w, B as T, C as te, D as
|
|
4
|
+
import { A as w, B as T, C as te, D as ne, E, F as D, G as O, H as k, I as A, J as j, K as M, L as re, M as ie, N, O as P, P as F, R as ae, S as oe, T as se, U as ce, V as le, W as ue, X as de, Y as fe, _ as I, a as pe, b as me, c as L, d as he, f as ge, g as _e, h as ve, i as ye, j as be, k as xe, l as Se, m as Ce, n as we, o as Te, p as Ee, q as R, s as De, t as Oe, u as ke, v as Ae, w as je, x as Me, y as Ne, z as Pe } from "./user.context-D3kmD3_y.js";
|
|
5
5
|
import { FloatingFormulasBg as Fe } from "./floating-formulas-bg.es.js";
|
|
6
6
|
import { i as Ie, n as Le, r as Re } from "./products-Du9KB6Xl.js";
|
|
7
7
|
import * as ze from "@radix-ui/react-accordion";
|
|
@@ -880,7 +880,7 @@ fr.displayName = "PaginationItem";
|
|
|
880
880
|
function pr({ className: e, isActive: t, size: n = "icon", children: i, ...a }) {
|
|
881
881
|
return /* @__PURE__ */ H("a", {
|
|
882
882
|
"aria-current": t ? "page" : void 0,
|
|
883
|
-
className: r(
|
|
883
|
+
className: r(j({
|
|
884
884
|
variant: t ? "outline" : "ghost",
|
|
885
885
|
size: n
|
|
886
886
|
}), t && "bg-accent text-accent-foreground", e),
|
|
@@ -2157,129 +2157,129 @@ function pa({ state: e = "idle", size: t = 128, compact: n = !1, activity: r = 0
|
|
|
2157
2157
|
center: [...Qi[e].center],
|
|
2158
2158
|
rim: [...Qi[e].rim],
|
|
2159
2159
|
glow: Qi[e].glow
|
|
2160
|
-
}, x = 0, S = la, C = 0, w = 0, T = performance.now(), te = 0,
|
|
2160
|
+
}, x = 0, S = la, C = 0, w = 0, T = performance.now(), te = 0, ne = .34, E = n ? 7.4 : 9, D = -Infinity, O = {
|
|
2161
2161
|
x: 0,
|
|
2162
2162
|
y: 0
|
|
2163
|
-
},
|
|
2163
|
+
}, k = {
|
|
2164
2164
|
x: 0,
|
|
2165
2165
|
y: 0
|
|
2166
|
-
},
|
|
2167
|
-
|
|
2168
|
-
},
|
|
2169
|
-
let i =
|
|
2170
|
-
return [_ + e * r * i *
|
|
2166
|
+
}, A = (e) => {
|
|
2167
|
+
O.x = e.clientX / window.innerWidth * 2 - 1, O.y = -(e.clientY / window.innerHeight * 2 - 1), D = performance.now(), S = la, x ||= requestAnimationFrame(F);
|
|
2168
|
+
}, j = t * (n ? .27 : .24), M = (e, t, n, r) => {
|
|
2169
|
+
let i = E / (E - n * r);
|
|
2170
|
+
return [_ + e * r * i * j, v - t * r * i * j];
|
|
2171
2171
|
};
|
|
2172
|
-
function
|
|
2172
|
+
function re(e, t, n, r) {
|
|
2173
2173
|
let i = a.createRadialGradient(e, t, 0, e, t, Math.max(n, .01));
|
|
2174
2174
|
for (let [e, t] of r) i.addColorStop(e, t);
|
|
2175
2175
|
return i;
|
|
2176
2176
|
}
|
|
2177
|
-
function
|
|
2177
|
+
function ie(e, t, n, r, i, o) {
|
|
2178
2178
|
if (i <= .002) return;
|
|
2179
2179
|
a.save(), a.globalCompositeOperation = "lighter", a.strokeStyle = r, a.lineWidth = n, a.lineCap = "round", a.beginPath();
|
|
2180
2180
|
let s = !1;
|
|
2181
2181
|
for (let n = 0; n <= 96; n += 1) {
|
|
2182
|
-
let r = n / 96 * Math.PI * 2, i = Math.cos(r) * t, c = Math.sin(r) * t, l = c * Math.cos(
|
|
2182
|
+
let r = n / 96 * Math.PI * 2, i = Math.cos(r) * t, c = Math.sin(r) * t, l = c * Math.cos(ne), u = c * Math.sin(ne), d = u >= 0 ? 1 : -1, f = !o || r >= o[0] && r <= o[1];
|
|
2183
2183
|
if (d !== e || !f) {
|
|
2184
2184
|
s = !1;
|
|
2185
2185
|
continue;
|
|
2186
2186
|
}
|
|
2187
|
-
let [p, m] =
|
|
2187
|
+
let [p, m] = M(i, l, u, 1);
|
|
2188
2188
|
s ? a.lineTo(p, m) : (a.moveTo(p, m), s = !0);
|
|
2189
2189
|
}
|
|
2190
2190
|
a.globalAlpha = e === -1 ? i * .32 : i, a.stroke(), a.restore();
|
|
2191
2191
|
}
|
|
2192
|
-
let
|
|
2192
|
+
let N = new Float64Array(ta.points.length), P = [
|
|
2193
2193
|
0,
|
|
2194
2194
|
0,
|
|
2195
2195
|
0
|
|
2196
2196
|
];
|
|
2197
|
-
function
|
|
2197
|
+
function F(e) {
|
|
2198
2198
|
x = 0;
|
|
2199
2199
|
let n = a, r = Math.min((e - T) / 1e3, .05);
|
|
2200
2200
|
T = e;
|
|
2201
|
-
let i = u.current, o = Qi[i], c = f.current, l = m.current || s, g = l ? 0 : e / 1e3,
|
|
2201
|
+
let i = u.current, o = Qi[i], c = f.current, l = m.current || s, g = l ? 0 : e / 1e3, A = l ? 0 : (e - d.current) / 1e3, ae = l ? Infinity : (e - h.current) / 1e3, oe = !l && e - D < 1200;
|
|
2202
2202
|
w = l ? 0 : Z(w, +!!oe, oe ? .05 : .02), l || (C += r * (.25 + w * .75));
|
|
2203
|
-
let se = c ? 7.4 : 9, ce = !l && Math.abs(
|
|
2204
|
-
|
|
2203
|
+
let se = c ? 7.4 : 9, ce = !l && Math.abs(E - se) > .01;
|
|
2204
|
+
E = l ? se : Z(E, se, .12), (i !== "idle" || ae < 2.2 || p.current || w > .004 || ce) && (S = la);
|
|
2205
2205
|
let le = l ? 1 : .06;
|
|
2206
2206
|
for (let e = 0; e < 3; e += 1) b.center[e] = Z(b.center[e], o.center[e], le), b.rim[e] = Z(b.rim[e], o.rim[e], le);
|
|
2207
2207
|
let ue = o.glow, de = 1;
|
|
2208
2208
|
ue += Math.sin(C * .9) * .05 * w;
|
|
2209
2209
|
let fe = ae < 1.8 ? Math.sin(na(ae / 1.8) * Math.PI) * .14 : 0;
|
|
2210
2210
|
if (ue += fe, i === "working" && (ue += Math.sin(g * 2.2) * .06), i === "success") {
|
|
2211
|
-
let e = na(
|
|
2212
|
-
de = 1 + Math.sin((1 - (1 - e) ** 3) * Math.PI) * .06,
|
|
2211
|
+
let e = na(A / 1.4);
|
|
2212
|
+
de = 1 + Math.sin((1 - (1 - e) ** 3) * Math.PI) * .06, A > 1.4 && (ue = Z(o.glow, Qi.idle.glow + .25, na((A - 1.4) / 2)));
|
|
2213
2213
|
}
|
|
2214
2214
|
i === "error" && (de = .94), b.glow = Z(b.glow, ue, l ? 1 : .08);
|
|
2215
2215
|
let I = b.glow;
|
|
2216
|
-
l || (te += r * (.06 + w * .1),
|
|
2217
|
-
let pe = l ? 0 : Math.sin(C * .35) * .05 +
|
|
2218
|
-
n.clearRect(0, 0, t, t), n.fillStyle =
|
|
2216
|
+
l || (te += r * (.06 + w * .1), ne = .34 + Math.sin(C * .6) * .12, k.x = Z(k.x, O.x, .02), k.y = Z(k.y, O.y, .02));
|
|
2217
|
+
let pe = l ? 0 : Math.sin(C * .35) * .05 + k.x * .12, me = l ? 0 : -k.y * .08, L = de * (1 + fe * .08);
|
|
2218
|
+
n.clearRect(0, 0, t, t), n.fillStyle = re(_, v, j * 1.95, [
|
|
2219
2219
|
[0, "rgba(9,11,15,0.5)"],
|
|
2220
2220
|
[.52, "rgba(9,11,15,0.3)"],
|
|
2221
2221
|
[.8, "rgba(9,11,15,0.08)"],
|
|
2222
2222
|
[1, "rgba(9,11,15,0)"]
|
|
2223
2223
|
]), n.fillRect(0, 0, t, t), n.save(), n.globalCompositeOperation = "lighter";
|
|
2224
|
-
let he =
|
|
2225
|
-
n.fillStyle =
|
|
2224
|
+
let he = j * (1.5 + I * .5) * L, ge = .06 + I * .24;
|
|
2225
|
+
n.fillStyle = re(_, v, he, [
|
|
2226
2226
|
[0, `rgba(${Q(b.center[0])},${Q(b.center[1])},${Q(b.center[2])},${ge * .5})`],
|
|
2227
2227
|
[.34, `rgba(${Q(b.rim[0] * 1.4)},${Q(b.rim[1] * 1.4)},${Q(b.rim[2] * 1.4)},${ge * .2})`],
|
|
2228
2228
|
[1, "rgba(160,50,10,0)"]
|
|
2229
2229
|
]), n.fillRect(0, 0, t, t), n.restore();
|
|
2230
2230
|
let _e = i === "working" ? .55 : p.current ? .26 + Math.sin(g * .8) * .07 : 0, ve = g * 1.6 % (Math.PI * 2), ye = 1.5 * L, be = Math.max(1, t * .007), xe = Math.max(1, t * .011), Se = (e) => {
|
|
2231
|
-
|
|
2231
|
+
ie(e, ye, be, "rgba(255,224,160,1)", _e * .45), i === "working" && ie(e, ye, xe, "rgba(255,236,190,1)", .75, [ve, ve + 1.1]);
|
|
2232
2232
|
};
|
|
2233
2233
|
Se(-1), n.save(), n.globalCompositeOperation = "lighter";
|
|
2234
2234
|
let Ce = l ? 0 : i === "success" || i === "attention" ? 1 : Math.max(w, .12), we = .08 + I * .4;
|
|
2235
2235
|
n.fillStyle = `rgba(${Q(b.center[0])},${Q(b.center[1])},${Q(b.center[2])},${we})`;
|
|
2236
2236
|
for (let e of ee) {
|
|
2237
2237
|
e.y += e.speed * r * (.4 + I) * Ce, e.y > 2.4 && (e.y = -.4, e.x = (y() - .5) * 1.9, e.z = (y() - .5) * 1.9);
|
|
2238
|
-
let [i, a] =
|
|
2238
|
+
let [i, a] = M(e.x, e.y, e.z, 1), o = Math.max(t * .005, 1) * (e.z > 0 ? 1 : .7);
|
|
2239
2239
|
n.beginPath(), n.arc(i, a, o, 0, Math.PI * 2), n.fill();
|
|
2240
2240
|
}
|
|
2241
2241
|
n.restore();
|
|
2242
2242
|
let Te = Math.cos(te + pe), Ee = Math.sin(te + pe), R = Math.cos(.32 + me), De = Math.sin(.32 + me), { points: Oe, grain: ke, count: Ae } = ta;
|
|
2243
2243
|
for (let e = 0; e < Oe.length; e += 3) {
|
|
2244
2244
|
let t = Oe[e], n = Oe[e + 1], r = Oe[e + 2], i = t * Te + r * Ee, a = -t * Ee + r * Te, o = n * R - a * De, s = n * De + a * R;
|
|
2245
|
-
|
|
2245
|
+
N[e] = i, N[e + 1] = o, N[e + 2] = s;
|
|
2246
2246
|
}
|
|
2247
2247
|
for (let e = 0; e < Ae; e += 1) {
|
|
2248
|
-
let t = e * 9, r = t + 3, i = t + 6, a =
|
|
2248
|
+
let t = e * 9, r = t + 3, i = t + 6, a = N[r] - N[t], o = N[r + 1] - N[t + 1], s = N[r + 2] - N[t + 2], c = N[i] - N[t], l = N[i + 1] - N[t + 1], u = N[i + 2] - N[t + 2], d = o * u - s * l, f = s * c - a * u, p = a * l - o * c;
|
|
2249
2249
|
if (p <= 0) continue;
|
|
2250
2250
|
let m = 1 - p / Math.hypot(d, f, p), h = ke[e], g = .9 + .14 * h + .06 * Math.sin(C * .8 + h * 6.28), _ = ra(.08, .82, m), v = ra(.66, 0, m) * I * .62, y = 1 - .18 * ra(.82, 1, m);
|
|
2251
|
-
ca(
|
|
2252
|
-
let ee = `rgb(${
|
|
2253
|
-
n.beginPath(), n.moveTo(x, S), n.lineTo(w, T), n.lineTo(te,
|
|
2251
|
+
ca(P, (Z(b.center[0], b.rim[0], _) * g + v) * y, (Z(b.center[1], b.rim[1], _) * g + v * .72) * y, (Z(b.center[2], b.rim[2], _) * g + v * .3) * y);
|
|
2252
|
+
let ee = `rgb(${P[0]},${P[1]},${P[2]})`, [x, S] = M(N[t], N[t + 1], N[t + 2], L), [w, T] = M(N[r], N[r + 1], N[r + 2], L), [te, ne] = M(N[i], N[i + 1], N[i + 2], L);
|
|
2253
|
+
n.beginPath(), n.moveTo(x, S), n.lineTo(w, T), n.lineTo(te, ne), n.closePath(), n.fillStyle = ee, n.fill(), n.strokeStyle = ua, n.lineWidth = 1, n.stroke();
|
|
2254
2254
|
}
|
|
2255
2255
|
Se(1), n.save(), n.globalCompositeOperation = "lighter";
|
|
2256
|
-
let je =
|
|
2257
|
-
if (n.fillStyle =
|
|
2256
|
+
let je = j * .34 * L;
|
|
2257
|
+
if (n.fillStyle = re(_ - j * .38 * L, v - j * .44 * L, je, [
|
|
2258
2258
|
[0, `rgba(255,246,228,${.05 + I * .09})`],
|
|
2259
2259
|
[.5, `rgba(255,240,214,${.015 + I * .03})`],
|
|
2260
2260
|
[1, "rgba(255,240,214,0)"]
|
|
2261
|
-
]), n.fillRect(0, 0, t, t), i === "success" &&
|
|
2262
|
-
let e =
|
|
2263
|
-
|
|
2261
|
+
]), n.fillRect(0, 0, t, t), i === "success" && A < 2.6) {
|
|
2262
|
+
let e = A / 2.6, n = 1.05 + e * 1.5, r = Math.max(1, t * .009), i = .65 * (1 - e);
|
|
2263
|
+
ie(-1, n, r, "rgba(255,241,192,1)", i), ie(1, n, r, "rgba(255,241,192,1)", i);
|
|
2264
2264
|
}
|
|
2265
2265
|
if (n.restore(), i === "attention") {
|
|
2266
|
-
let e = na(
|
|
2266
|
+
let e = na(A / 2.4), r = Z(-1.9, .25, 1 - (1 - e) ** 2), i = e < 1 ? .7 : .7 * Math.max(0, 1 - (A - 2.4) / 2.5);
|
|
2267
2267
|
if (i > .002) {
|
|
2268
2268
|
n.save(), n.globalCompositeOperation = "lighter", n.globalAlpha = i, n.strokeStyle = "rgba(255,230,160,1)", n.lineWidth = Math.max(1, t * .009);
|
|
2269
|
-
let [, e] =
|
|
2270
|
-
n.beginPath(), n.ellipse(_, e,
|
|
2269
|
+
let [, e] = M(0, r, 0, 1);
|
|
2270
|
+
n.beginPath(), n.ellipse(_, e, j * 1.6, j * .42, 0, 0, Math.PI * 2), n.stroke(), n.restore();
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
2273
|
if (!c) {
|
|
2274
|
-
let e = v +
|
|
2275
|
-
n.save(), n.globalCompositeOperation = "lighter", n.fillStyle =
|
|
2274
|
+
let e = v + j * 1.5;
|
|
2275
|
+
n.save(), n.globalCompositeOperation = "lighter", n.fillStyle = re(_, e, j * 1.5, [[0, `rgba(220,140,60,${.1 + I * .2})`], [1, "rgba(220,140,60,0)"]]), n.fillRect(0, 0, t, t), n.restore();
|
|
2276
2276
|
}
|
|
2277
|
-
l || (--S, S > 0 && (x = requestAnimationFrame(
|
|
2277
|
+
l || (--S, S > 0 && (x = requestAnimationFrame(F)));
|
|
2278
2278
|
}
|
|
2279
2279
|
return g.current = () => {
|
|
2280
|
-
S = la, T = performance.now(), x ||= requestAnimationFrame(
|
|
2281
|
-
}, s || window.addEventListener("mousemove",
|
|
2282
|
-
g.current = null, x && cancelAnimationFrame(x), window.removeEventListener("mousemove",
|
|
2280
|
+
S = la, T = performance.now(), x ||= requestAnimationFrame(F);
|
|
2281
|
+
}, s || window.addEventListener("mousemove", A, { passive: !0 }), F(performance.now()), () => {
|
|
2282
|
+
g.current = null, x && cancelAnimationFrame(x), window.removeEventListener("mousemove", A);
|
|
2283
2283
|
};
|
|
2284
2284
|
}, [t, o]), /* @__PURE__ */ H("canvas", {
|
|
2285
2285
|
ref: l,
|
|
@@ -2297,46 +2297,64 @@ function pa({ state: e = "idle", size: t = 128, compact: n = !1, activity: r = 0
|
|
|
2297
2297
|
//#endregion
|
|
2298
2298
|
//#region src/components/ui/viglet-assistant.tsx
|
|
2299
2299
|
var ma = {
|
|
2300
|
+
sm: 44,
|
|
2301
|
+
md: 88,
|
|
2302
|
+
lg: 132
|
|
2303
|
+
}, ha = 76;
|
|
2304
|
+
function ga(e) {
|
|
2305
|
+
return typeof e == "number" ? Math.max(24, Math.round(e)) : ma[e];
|
|
2306
|
+
}
|
|
2307
|
+
function _a(e) {
|
|
2308
|
+
let t = Math.round(e * .88 + 8);
|
|
2309
|
+
return {
|
|
2310
|
+
captionRight: t,
|
|
2311
|
+
captionBottom: Math.round(e * .3),
|
|
2312
|
+
captionMaxWidth: `min(23rem, calc(100vw - ${t + 20}px))`,
|
|
2313
|
+
badgeInset: Math.round(e * .2) - 8
|
|
2314
|
+
};
|
|
2315
|
+
}
|
|
2316
|
+
var va = {
|
|
2300
2317
|
idle: "assistant.idle",
|
|
2301
2318
|
working: "assistant.working",
|
|
2302
2319
|
success: "assistant.success",
|
|
2303
2320
|
error: "assistant.error",
|
|
2304
2321
|
attention: "assistant.attention"
|
|
2305
|
-
},
|
|
2322
|
+
}, ya = {
|
|
2306
2323
|
idle: "text-muted-foreground",
|
|
2307
2324
|
working: "text-amber-700 dark:text-amber-400",
|
|
2308
2325
|
success: "text-emerald-700 dark:text-emerald-400",
|
|
2309
2326
|
error: "text-destructive",
|
|
2310
2327
|
attention: "text-amber-800 dark:text-amber-300"
|
|
2311
|
-
},
|
|
2312
|
-
function
|
|
2328
|
+
}, ba = 3;
|
|
2329
|
+
function xa(e) {
|
|
2313
2330
|
return e.role === "report";
|
|
2314
2331
|
}
|
|
2315
|
-
function
|
|
2332
|
+
function Sa() {
|
|
2316
2333
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2317
2334
|
}
|
|
2318
|
-
function
|
|
2319
|
-
let [
|
|
2335
|
+
function Ca({ text: e, still: t = !1, className: n, style: r }) {
|
|
2336
|
+
let [i, a] = Ge(0);
|
|
2320
2337
|
return B(() => {
|
|
2321
2338
|
let n = e.length;
|
|
2322
2339
|
if (n === 0) return;
|
|
2323
|
-
if (t ||
|
|
2324
|
-
let e = setTimeout(() =>
|
|
2340
|
+
if (t || Sa()) {
|
|
2341
|
+
let e = setTimeout(() => a(n), 0);
|
|
2325
2342
|
return () => clearTimeout(e);
|
|
2326
2343
|
}
|
|
2327
|
-
let r = Math.max(14, Math.min(34, 1400 / n)),
|
|
2328
|
-
|
|
2344
|
+
let r = Math.max(14, Math.min(34, 1400 / n)), i = setInterval(() => {
|
|
2345
|
+
a((e) => e >= n ? (clearInterval(i), e) : e + 1);
|
|
2329
2346
|
}, r);
|
|
2330
|
-
return () => clearInterval(
|
|
2347
|
+
return () => clearInterval(i);
|
|
2331
2348
|
}, [e, t]), /* @__PURE__ */ H("span", {
|
|
2332
2349
|
className: n,
|
|
2350
|
+
style: r,
|
|
2333
2351
|
children: /* @__PURE__ */ U("span", {
|
|
2334
2352
|
"aria-hidden": "true",
|
|
2335
|
-
children: [e.slice(0,
|
|
2353
|
+
children: [e.slice(0, i), i < e.length && /* @__PURE__ */ H("span", { className: "ml-px inline-block h-[0.95em] w-px translate-y-[0.15em] bg-current align-baseline motion-safe:animate-pulse" })]
|
|
2336
2354
|
})
|
|
2337
2355
|
});
|
|
2338
2356
|
}
|
|
2339
|
-
function
|
|
2357
|
+
function wa({ at: e, locale: t }) {
|
|
2340
2358
|
let n = new Date(e);
|
|
2341
2359
|
if (Number.isNaN(n.getTime())) return null;
|
|
2342
2360
|
let r = n.toDateString() === (/* @__PURE__ */ new Date()).toDateString(), i = new Intl.DateTimeFormat(t, r ? { timeStyle: "short" } : {
|
|
@@ -2349,111 +2367,121 @@ function ba({ at: e, locale: t }) {
|
|
|
2349
2367
|
children: i
|
|
2350
2368
|
});
|
|
2351
2369
|
}
|
|
2352
|
-
function
|
|
2353
|
-
let { t:
|
|
2354
|
-
source:
|
|
2355
|
-
text:
|
|
2370
|
+
function Ta({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open: a, defaultOpen: o = !1, onOpenChange: c, unread: l, onRead: u, onDismiss: d, activity: f = 0, inline: p = !1, paused: m = !1, size: h = "sm", className: g }) {
|
|
2371
|
+
let _ = ga(h), v = _a(_), { t: y, i18n: ee } = W(), b = ye(), [x, S] = Ge(o), [C, w] = Ge(""), T = V(null), te = n ?? [], ne = te.filter(xa), E = ne.filter((e) => !e.read), D = E[E.length - 1], O = a ?? x, k = typeof i == "function", A = e ?? D?.tone ?? "idle", j = t === void 0 ? D?.text ?? null : t, M = typeof l == "number" ? l : E.length, re = l === !0 || M > 0, [ie, N] = Ge({
|
|
2372
|
+
source: j,
|
|
2373
|
+
text: O ? "" : j ?? ""
|
|
2356
2374
|
});
|
|
2357
|
-
|
|
2358
|
-
source:
|
|
2359
|
-
text:
|
|
2375
|
+
ie.source !== j && N({
|
|
2376
|
+
source: j,
|
|
2377
|
+
text: O ? "" : j ?? ""
|
|
2360
2378
|
});
|
|
2361
2379
|
let P = (e) => {
|
|
2362
|
-
if (e !==
|
|
2363
|
-
a === void 0 &&
|
|
2380
|
+
if (e !== O) for (let e of E) u?.(e.id);
|
|
2381
|
+
a === void 0 && S(e), c?.(e);
|
|
2364
2382
|
};
|
|
2365
2383
|
B(() => {
|
|
2366
|
-
let e =
|
|
2384
|
+
let e = T.current;
|
|
2367
2385
|
e && (e.scrollTop = e.scrollHeight);
|
|
2368
2386
|
}, [n, r]);
|
|
2369
|
-
let
|
|
2370
|
-
let e =
|
|
2371
|
-
!e || r || !i || (i(e),
|
|
2372
|
-
},
|
|
2387
|
+
let F = () => {
|
|
2388
|
+
let e = C.trim();
|
|
2389
|
+
!e || r || !i || (i(e), w(""));
|
|
2390
|
+
}, ae = O ? y("assistant.collapse") : [y("assistant.open"), M > 0 ? y("assistant.unreadCount", { count: M }) : null].filter(Boolean).join(", ");
|
|
2373
2391
|
return /* @__PURE__ */ U("div", {
|
|
2374
2392
|
className: [
|
|
2375
|
-
p ||
|
|
2376
|
-
|
|
2393
|
+
p || b ? "relative" : "fixed bottom-5 right-5 z-50",
|
|
2394
|
+
b ? "pointer-events-auto" : "",
|
|
2377
2395
|
"flex flex-col",
|
|
2378
|
-
|
|
2379
|
-
|
|
2396
|
+
O ? "w-[min(22.5rem,calc(100vw-2.5rem))] rounded-2xl border border-border bg-popover p-4 text-popover-foreground shadow-2xl" : "w-[var(--vg-assistant-orb)] items-end",
|
|
2397
|
+
g ?? ""
|
|
2380
2398
|
].join(" "),
|
|
2399
|
+
style: { "--vg-assistant-orb": `${_}px` },
|
|
2381
2400
|
onKeyDown: (e) => {
|
|
2382
|
-
e.key === "Escape" &&
|
|
2401
|
+
e.key === "Escape" && O && P(!1);
|
|
2383
2402
|
},
|
|
2384
2403
|
children: [
|
|
2385
2404
|
/* @__PURE__ */ H("span", {
|
|
2386
2405
|
role: "status",
|
|
2387
2406
|
"aria-live": "polite",
|
|
2388
2407
|
className: "sr-only",
|
|
2389
|
-
children:
|
|
2408
|
+
children: ie.text
|
|
2390
2409
|
}),
|
|
2391
|
-
!
|
|
2392
|
-
text:
|
|
2410
|
+
!O && j && /* @__PURE__ */ H(Ca, {
|
|
2411
|
+
text: j,
|
|
2393
2412
|
still: m,
|
|
2394
|
-
|
|
2395
|
-
|
|
2413
|
+
style: {
|
|
2414
|
+
right: v.captionRight,
|
|
2415
|
+
bottom: v.captionBottom,
|
|
2416
|
+
maxWidth: v.captionMaxWidth
|
|
2417
|
+
},
|
|
2418
|
+
className: "pointer-events-none absolute w-max text-right text-sm font-semibold leading-snug text-foreground drop-shadow-sm"
|
|
2419
|
+
}, j),
|
|
2396
2420
|
/* @__PURE__ */ U("div", {
|
|
2397
2421
|
className: "flex flex-none items-center gap-3",
|
|
2398
2422
|
children: [
|
|
2399
2423
|
/* @__PURE__ */ U("button", {
|
|
2400
2424
|
type: "button",
|
|
2401
|
-
"aria-label":
|
|
2402
|
-
"aria-expanded":
|
|
2403
|
-
onClick: () => P(!
|
|
2425
|
+
"aria-label": ae,
|
|
2426
|
+
"aria-expanded": O,
|
|
2427
|
+
onClick: () => P(!O),
|
|
2404
2428
|
className: "relative flex-none rounded-full focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring",
|
|
2405
2429
|
children: [/* @__PURE__ */ H(pa, {
|
|
2406
|
-
state:
|
|
2407
|
-
compact: !
|
|
2408
|
-
unread:
|
|
2430
|
+
state: A,
|
|
2431
|
+
compact: !O,
|
|
2432
|
+
unread: re,
|
|
2409
2433
|
activity: f,
|
|
2410
2434
|
paused: m,
|
|
2411
|
-
size:
|
|
2412
|
-
}), !
|
|
2435
|
+
size: O ? ha : _
|
|
2436
|
+
}), !O && M > 0 && /* @__PURE__ */ H("span", {
|
|
2413
2437
|
"aria-hidden": "true",
|
|
2414
|
-
|
|
2415
|
-
|
|
2438
|
+
style: {
|
|
2439
|
+
right: v.badgeInset,
|
|
2440
|
+
top: v.badgeInset
|
|
2441
|
+
},
|
|
2442
|
+
className: "absolute grid h-5 min-w-5 place-items-center rounded-full bg-primary px-1 text-[0.6875rem] font-semibold leading-none text-primary-foreground",
|
|
2443
|
+
children: M
|
|
2416
2444
|
})]
|
|
2417
2445
|
}),
|
|
2418
|
-
|
|
2446
|
+
O && /* @__PURE__ */ U("div", {
|
|
2419
2447
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
2420
2448
|
children: [
|
|
2421
2449
|
/* @__PURE__ */ H("span", {
|
|
2422
2450
|
className: "text-xs text-muted-foreground",
|
|
2423
|
-
children:
|
|
2451
|
+
children: y("assistant.state")
|
|
2424
2452
|
}),
|
|
2425
2453
|
/* @__PURE__ */ H("span", {
|
|
2426
|
-
className: `text-sm font-semibold ${
|
|
2427
|
-
children:
|
|
2454
|
+
className: `text-sm font-semibold ${ya[A]}`,
|
|
2455
|
+
children: y(va[A])
|
|
2428
2456
|
}),
|
|
2429
|
-
|
|
2430
|
-
text:
|
|
2457
|
+
j && /* @__PURE__ */ H(Ca, {
|
|
2458
|
+
text: j,
|
|
2431
2459
|
still: m,
|
|
2432
2460
|
className: "text-xs leading-snug text-muted-foreground"
|
|
2433
|
-
},
|
|
2461
|
+
}, j)
|
|
2434
2462
|
]
|
|
2435
2463
|
}),
|
|
2436
|
-
|
|
2464
|
+
O && /* @__PURE__ */ H(R, {
|
|
2437
2465
|
variant: "ghost",
|
|
2438
2466
|
size: "sm",
|
|
2439
2467
|
className: "flex-none self-start",
|
|
2440
2468
|
onClick: () => P(!1),
|
|
2441
|
-
children:
|
|
2469
|
+
children: y("assistant.collapseAction")
|
|
2442
2470
|
})
|
|
2443
2471
|
]
|
|
2444
2472
|
}),
|
|
2445
|
-
|
|
2446
|
-
ref:
|
|
2473
|
+
O && (k || ne.length > 0) && /* @__PURE__ */ U("div", {
|
|
2474
|
+
ref: T,
|
|
2447
2475
|
role: "log",
|
|
2448
|
-
"aria-label":
|
|
2476
|
+
"aria-label": y("assistant.transcript"),
|
|
2449
2477
|
"aria-busy": r,
|
|
2450
2478
|
className: "mt-3 flex max-h-96 min-h-32 flex-1 flex-col gap-2.5 overflow-y-auto pr-1",
|
|
2451
2479
|
children: [
|
|
2452
|
-
|
|
2480
|
+
te.length === 0 && !r && /* @__PURE__ */ H("p", {
|
|
2453
2481
|
className: "m-auto max-w-52 text-center text-xs leading-relaxed text-muted-foreground",
|
|
2454
|
-
children:
|
|
2482
|
+
children: y("assistant.empty")
|
|
2455
2483
|
}),
|
|
2456
|
-
|
|
2484
|
+
te.map((e, t) => xa(e) ? /* @__PURE__ */ U("div", {
|
|
2457
2485
|
"data-kind": "report",
|
|
2458
2486
|
className: `w-full rounded-lg border px-3 py-2 text-sm ${e.read ? "border-border/60" : "border-border bg-muted/50"}`,
|
|
2459
2487
|
children: [
|
|
@@ -2462,25 +2490,25 @@ function xa({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open:
|
|
|
2462
2490
|
children: [
|
|
2463
2491
|
/* @__PURE__ */ H("span", {
|
|
2464
2492
|
"aria-hidden": "true",
|
|
2465
|
-
className: `size-2 flex-none rounded-full bg-current ${
|
|
2493
|
+
className: `size-2 flex-none rounded-full bg-current ${ya[e.tone]}`
|
|
2466
2494
|
}),
|
|
2467
2495
|
/* @__PURE__ */ H("span", {
|
|
2468
2496
|
className: "font-semibold",
|
|
2469
|
-
children:
|
|
2497
|
+
children: y(va[e.tone])
|
|
2470
2498
|
}),
|
|
2471
|
-
/* @__PURE__ */ H(
|
|
2499
|
+
/* @__PURE__ */ H(wa, {
|
|
2472
2500
|
at: e.at,
|
|
2473
|
-
locale:
|
|
2501
|
+
locale: ee?.resolvedLanguage
|
|
2474
2502
|
}),
|
|
2475
2503
|
!e.read && /* @__PURE__ */ H("span", {
|
|
2476
2504
|
className: "rounded-full border border-border px-1.5 leading-4",
|
|
2477
|
-
children:
|
|
2505
|
+
children: y("assistant.new")
|
|
2478
2506
|
}),
|
|
2479
2507
|
d && /* @__PURE__ */ H(R, {
|
|
2480
2508
|
variant: "ghost",
|
|
2481
2509
|
size: "icon",
|
|
2482
2510
|
className: "ml-auto size-6",
|
|
2483
|
-
"aria-label":
|
|
2511
|
+
"aria-label": y("assistant.dismiss"),
|
|
2484
2512
|
onClick: () => d(e.id),
|
|
2485
2513
|
children: /* @__PURE__ */ H(dt, {
|
|
2486
2514
|
"aria-hidden": "true",
|
|
@@ -2495,7 +2523,7 @@ function xa({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open:
|
|
|
2495
2523
|
}),
|
|
2496
2524
|
e.actions && e.actions.length > 0 && /* @__PURE__ */ H("div", {
|
|
2497
2525
|
className: "mt-2 flex flex-wrap gap-2",
|
|
2498
|
-
children: e.actions.slice(0,
|
|
2526
|
+
children: e.actions.slice(0, ba).map((e) => /* @__PURE__ */ H(R, {
|
|
2499
2527
|
variant: "outline",
|
|
2500
2528
|
size: "sm",
|
|
2501
2529
|
onClick: e.onSelect,
|
|
@@ -2519,26 +2547,26 @@ function xa({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open:
|
|
|
2519
2547
|
}, e.id ?? t)),
|
|
2520
2548
|
r && /* @__PURE__ */ H("p", {
|
|
2521
2549
|
className: "m-0 self-start px-3 py-2 text-sm text-muted-foreground",
|
|
2522
|
-
children:
|
|
2550
|
+
children: y("assistant.thinking")
|
|
2523
2551
|
})
|
|
2524
2552
|
]
|
|
2525
2553
|
}),
|
|
2526
|
-
|
|
2554
|
+
O && k && /* @__PURE__ */ U("div", {
|
|
2527
2555
|
className: "mt-3 flex flex-none gap-2",
|
|
2528
2556
|
children: [/* @__PURE__ */ H(s, {
|
|
2529
|
-
value:
|
|
2557
|
+
value: C,
|
|
2530
2558
|
disabled: r,
|
|
2531
|
-
placeholder:
|
|
2532
|
-
"aria-label":
|
|
2533
|
-
onChange: (e) =>
|
|
2559
|
+
placeholder: y("assistant.placeholder"),
|
|
2560
|
+
"aria-label": y("assistant.placeholder"),
|
|
2561
|
+
onChange: (e) => w(e.target.value),
|
|
2534
2562
|
onKeyDown: (e) => {
|
|
2535
|
-
e.key === "Enter" && (e.preventDefault(),
|
|
2563
|
+
e.key === "Enter" && (e.preventDefault(), F());
|
|
2536
2564
|
}
|
|
2537
2565
|
}), /* @__PURE__ */ H(R, {
|
|
2538
2566
|
variant: "outline",
|
|
2539
|
-
disabled: r ||
|
|
2540
|
-
onClick:
|
|
2541
|
-
children:
|
|
2567
|
+
disabled: r || C.trim().length === 0,
|
|
2568
|
+
onClick: F,
|
|
2569
|
+
children: y("assistant.send")
|
|
2542
2570
|
})]
|
|
2543
2571
|
})
|
|
2544
2572
|
]
|
|
@@ -2546,9 +2574,9 @@ function xa({ state: e, caption: t, messages: n, busy: r = !1, onSend: i, open:
|
|
|
2546
2574
|
}
|
|
2547
2575
|
//#endregion
|
|
2548
2576
|
//#region src/components/ui/user-menu.tsx
|
|
2549
|
-
function
|
|
2577
|
+
function Ea({ user: e, onAccount: t, onSignOut: n, extraItems: i, className: a, align: o = "end" }) {
|
|
2550
2578
|
let { t: s } = W(), c = `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim() || e.username || "";
|
|
2551
|
-
return /* @__PURE__ */ U(be, { children: [/* @__PURE__ */ H(
|
|
2579
|
+
return /* @__PURE__ */ U(be, { children: [/* @__PURE__ */ H(O, {
|
|
2552
2580
|
asChild: !0,
|
|
2553
2581
|
children: /* @__PURE__ */ H("button", {
|
|
2554
2582
|
type: "button",
|
|
@@ -2563,12 +2591,12 @@ function Sa({ user: e, onAccount: t, onSignOut: n, extraItems: i, className: a,
|
|
|
2563
2591
|
className: "hover:ring-2 hover:ring-border transition-all"
|
|
2564
2592
|
})
|
|
2565
2593
|
})
|
|
2566
|
-
}), /* @__PURE__ */ U(
|
|
2594
|
+
}), /* @__PURE__ */ U(N, {
|
|
2567
2595
|
className: "min-w-56 rounded-lg",
|
|
2568
2596
|
align: o,
|
|
2569
2597
|
sideOffset: 8,
|
|
2570
2598
|
children: [
|
|
2571
|
-
/* @__PURE__ */ H(
|
|
2599
|
+
/* @__PURE__ */ H(A, {
|
|
2572
2600
|
className: "p-0 font-normal",
|
|
2573
2601
|
children: /* @__PURE__ */ U("div", {
|
|
2574
2602
|
className: "flex items-center gap-2 px-1 py-1.5 text-left text-sm",
|
|
@@ -2591,13 +2619,13 @@ function Sa({ user: e, onAccount: t, onSignOut: n, extraItems: i, className: a,
|
|
|
2591
2619
|
})
|
|
2592
2620
|
}),
|
|
2593
2621
|
/* @__PURE__ */ H(T, {}),
|
|
2594
|
-
/* @__PURE__ */ U(
|
|
2622
|
+
/* @__PURE__ */ U(F, { children: [t && /* @__PURE__ */ U(D, {
|
|
2595
2623
|
onSelect: t,
|
|
2596
2624
|
className: "cursor-pointer",
|
|
2597
2625
|
children: [/* @__PURE__ */ H(ut, {}), s("nav.account")]
|
|
2598
2626
|
}), i] }),
|
|
2599
2627
|
(t || i) && /* @__PURE__ */ H(T, {}),
|
|
2600
|
-
n && /* @__PURE__ */ U(
|
|
2628
|
+
n && /* @__PURE__ */ U(D, {
|
|
2601
2629
|
onSelect: n,
|
|
2602
2630
|
className: "cursor-pointer text-red-500 focus:text-red-500 focus:bg-red-50 dark:focus:bg-red-950",
|
|
2603
2631
|
children: [/* @__PURE__ */ H(st, {}), s("nav.logOut")]
|
|
@@ -2607,8 +2635,8 @@ function Sa({ user: e, onAccount: t, onSignOut: n, extraItems: i, className: a,
|
|
|
2607
2635
|
}
|
|
2608
2636
|
//#endregion
|
|
2609
2637
|
//#region src/components/login/login.tsx
|
|
2610
|
-
var
|
|
2611
|
-
function
|
|
2638
|
+
var Da = Ve({});
|
|
2639
|
+
function Oa(e) {
|
|
2612
2640
|
if (!e) return null;
|
|
2613
2641
|
let t = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());
|
|
2614
2642
|
if (t) {
|
|
@@ -2622,13 +2650,13 @@ function wa(e) {
|
|
|
2622
2650
|
}
|
|
2623
2651
|
return null;
|
|
2624
2652
|
}
|
|
2625
|
-
function
|
|
2653
|
+
function ka({ color: e, colorDark: t, children: n, className: i, style: a, ...o }) {
|
|
2626
2654
|
let s = {};
|
|
2627
2655
|
e && (s["--ff-color"] = e), t ? s["--ff-color-dark"] = t : e && (s["--ff-color-dark"] = e);
|
|
2628
|
-
let c =
|
|
2656
|
+
let c = Oa(e);
|
|
2629
2657
|
c && (s["--ff-color-rgb"] = c);
|
|
2630
|
-
let l =
|
|
2631
|
-
return l && (s["--ff-color-dark-rgb"] = l), /* @__PURE__ */ H(
|
|
2658
|
+
let l = Oa(t) ?? c;
|
|
2659
|
+
return l && (s["--ff-color-dark-rgb"] = l), /* @__PURE__ */ H(Da.Provider, {
|
|
2632
2660
|
value: {
|
|
2633
2661
|
color: e,
|
|
2634
2662
|
colorDark: t
|
|
@@ -2644,29 +2672,29 @@ function Ta({ color: e, colorDark: t, children: n, className: i, style: a, ...o
|
|
|
2644
2672
|
})
|
|
2645
2673
|
});
|
|
2646
2674
|
}
|
|
2647
|
-
function
|
|
2648
|
-
let { color: t, colorDark: n } = Ue(
|
|
2675
|
+
function Aa(e) {
|
|
2676
|
+
let { color: t, colorDark: n } = Ue(Da);
|
|
2649
2677
|
return /* @__PURE__ */ H(Fe, {
|
|
2650
2678
|
color: t,
|
|
2651
2679
|
colorDark: n,
|
|
2652
2680
|
...e
|
|
2653
2681
|
});
|
|
2654
2682
|
}
|
|
2655
|
-
function
|
|
2683
|
+
function ja({ children: e, className: t, ...n }) {
|
|
2656
2684
|
return /* @__PURE__ */ H("div", {
|
|
2657
2685
|
className: r("absolute top-4 right-4 z-30 flex items-center gap-2", t),
|
|
2658
2686
|
...n,
|
|
2659
2687
|
children: e
|
|
2660
2688
|
});
|
|
2661
2689
|
}
|
|
2662
|
-
function
|
|
2690
|
+
function Ma({ children: e, className: t, ...n }) {
|
|
2663
2691
|
return /* @__PURE__ */ H("div", {
|
|
2664
2692
|
className: r("relative z-20 flex flex-col items-center w-full max-w-md px-6 py-4", t),
|
|
2665
2693
|
...n,
|
|
2666
2694
|
children: e
|
|
2667
2695
|
});
|
|
2668
2696
|
}
|
|
2669
|
-
function
|
|
2697
|
+
function Na({ children: e, pulsePaused: t, className: n, ...i }) {
|
|
2670
2698
|
return /* @__PURE__ */ H("div", {
|
|
2671
2699
|
className: r("vig-login__fade-in mb-3", n),
|
|
2672
2700
|
...i,
|
|
@@ -2679,7 +2707,7 @@ function ka({ children: e, pulsePaused: t, className: n, ...i }) {
|
|
|
2679
2707
|
})
|
|
2680
2708
|
});
|
|
2681
2709
|
}
|
|
2682
|
-
function
|
|
2710
|
+
function Pa({ children: e, className: t, ...n }) {
|
|
2683
2711
|
return /* @__PURE__ */ H("div", {
|
|
2684
2712
|
className: "vig-login__fade-in-d1 text-center mb-1",
|
|
2685
2713
|
children: /* @__PURE__ */ H("h1", {
|
|
@@ -2689,7 +2717,7 @@ function Aa({ children: e, className: t, ...n }) {
|
|
|
2689
2717
|
})
|
|
2690
2718
|
});
|
|
2691
2719
|
}
|
|
2692
|
-
function
|
|
2720
|
+
function Fa({ children: e, className: t, ...n }) {
|
|
2693
2721
|
return /* @__PURE__ */ H("div", {
|
|
2694
2722
|
className: "vig-login__fade-in-d1 text-center mb-4",
|
|
2695
2723
|
children: /* @__PURE__ */ H("p", {
|
|
@@ -2699,14 +2727,14 @@ function ja({ children: e, className: t, ...n }) {
|
|
|
2699
2727
|
})
|
|
2700
2728
|
});
|
|
2701
2729
|
}
|
|
2702
|
-
function
|
|
2730
|
+
function Ia({ children: e, className: t, ...n }) {
|
|
2703
2731
|
return /* @__PURE__ */ H("div", {
|
|
2704
2732
|
className: r("vig-login__fade-in-d2 flex flex-wrap justify-center gap-2 mb-5", t),
|
|
2705
2733
|
...n,
|
|
2706
2734
|
children: e
|
|
2707
2735
|
});
|
|
2708
2736
|
}
|
|
2709
|
-
function
|
|
2737
|
+
function La({ icon: e, children: t, className: n, ...i }) {
|
|
2710
2738
|
return /* @__PURE__ */ U("div", {
|
|
2711
2739
|
className: r("vig-login__feature-pill flex items-center gap-1.5 rounded-full px-3 py-1", n),
|
|
2712
2740
|
...i,
|
|
@@ -2716,14 +2744,14 @@ function Na({ icon: e, children: t, className: n, ...i }) {
|
|
|
2716
2744
|
})]
|
|
2717
2745
|
});
|
|
2718
2746
|
}
|
|
2719
|
-
function
|
|
2747
|
+
function Ra({ children: e, className: t, ...n }) {
|
|
2720
2748
|
return /* @__PURE__ */ H("div", {
|
|
2721
2749
|
className: r("vig-login__fade-in-d3 w-full", t),
|
|
2722
2750
|
...n,
|
|
2723
2751
|
children: /* @__PURE__ */ H(Xn, { children: e })
|
|
2724
2752
|
});
|
|
2725
2753
|
}
|
|
2726
|
-
function
|
|
2754
|
+
function za({ children: e, className: t, ...n }) {
|
|
2727
2755
|
return /* @__PURE__ */ H("div", {
|
|
2728
2756
|
className: "vig-login__fade-in-d3 mt-4 text-center",
|
|
2729
2757
|
children: /* @__PURE__ */ H("p", {
|
|
@@ -2733,19 +2761,19 @@ function Fa({ children: e, className: t, ...n }) {
|
|
|
2733
2761
|
})
|
|
2734
2762
|
});
|
|
2735
2763
|
}
|
|
2736
|
-
var
|
|
2737
|
-
Background:
|
|
2738
|
-
Settings:
|
|
2739
|
-
Content:
|
|
2740
|
-
Logo:
|
|
2741
|
-
Title:
|
|
2742
|
-
Tagline:
|
|
2743
|
-
Features:
|
|
2744
|
-
FeaturePill:
|
|
2745
|
-
Card:
|
|
2746
|
-
Footer:
|
|
2747
|
-
}),
|
|
2748
|
-
function
|
|
2764
|
+
var Ba = Object.assign(ka, {
|
|
2765
|
+
Background: Aa,
|
|
2766
|
+
Settings: ja,
|
|
2767
|
+
Content: Ma,
|
|
2768
|
+
Logo: Na,
|
|
2769
|
+
Title: Pa,
|
|
2770
|
+
Tagline: Fa,
|
|
2771
|
+
Features: Ia,
|
|
2772
|
+
FeaturePill: La,
|
|
2773
|
+
Card: Ra,
|
|
2774
|
+
Footer: za
|
|
2775
|
+
}), Va = Ve({});
|
|
2776
|
+
function Ha(e) {
|
|
2749
2777
|
if (!e) return null;
|
|
2750
2778
|
let t = /^#([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e.trim());
|
|
2751
2779
|
if (t) {
|
|
@@ -2759,13 +2787,13 @@ function Ra(e) {
|
|
|
2759
2787
|
}
|
|
2760
2788
|
return null;
|
|
2761
2789
|
}
|
|
2762
|
-
function
|
|
2790
|
+
function Ua({ color: e, colorDark: t, children: n, className: i, style: a, ...o }) {
|
|
2763
2791
|
let s = {};
|
|
2764
2792
|
e && (s["--ff-color"] = e), t ? s["--ff-color-dark"] = t : e && (s["--ff-color-dark"] = e);
|
|
2765
|
-
let c =
|
|
2793
|
+
let c = Ha(e);
|
|
2766
2794
|
c && (s["--ff-color-rgb"] = c);
|
|
2767
|
-
let l =
|
|
2768
|
-
return l && (s["--ff-color-dark-rgb"] = l), /* @__PURE__ */ H(
|
|
2795
|
+
let l = Ha(t) ?? c;
|
|
2796
|
+
return l && (s["--ff-color-dark-rgb"] = l), /* @__PURE__ */ H(Va.Provider, {
|
|
2769
2797
|
value: {
|
|
2770
2798
|
color: e,
|
|
2771
2799
|
colorDark: t
|
|
@@ -2781,22 +2809,22 @@ function za({ color: e, colorDark: t, children: n, className: i, style: a, ...o
|
|
|
2781
2809
|
})
|
|
2782
2810
|
});
|
|
2783
2811
|
}
|
|
2784
|
-
function
|
|
2785
|
-
let { color: t, colorDark: n } = Ue(
|
|
2812
|
+
function Wa(e) {
|
|
2813
|
+
let { color: t, colorDark: n } = Ue(Va);
|
|
2786
2814
|
return /* @__PURE__ */ H(Fe, {
|
|
2787
2815
|
color: t,
|
|
2788
2816
|
colorDark: n,
|
|
2789
2817
|
...e
|
|
2790
2818
|
});
|
|
2791
2819
|
}
|
|
2792
|
-
function
|
|
2820
|
+
function Ga({ children: e, className: t, ...n }) {
|
|
2793
2821
|
return /* @__PURE__ */ H("div", {
|
|
2794
2822
|
className: r("relative z-20 flex flex-col items-center w-full max-w-lg px-6 py-6", t),
|
|
2795
2823
|
...n,
|
|
2796
2824
|
children: e
|
|
2797
2825
|
});
|
|
2798
2826
|
}
|
|
2799
|
-
function
|
|
2827
|
+
function Ka({ current: e, total: t, className: n, ...i }) {
|
|
2800
2828
|
let { t: a } = W();
|
|
2801
2829
|
return /* @__PURE__ */ H("div", {
|
|
2802
2830
|
className: r("vig-sf__fade-in flex items-center gap-2 mb-4", n),
|
|
@@ -2813,7 +2841,7 @@ function Ha({ current: e, total: t, className: n, ...i }) {
|
|
|
2813
2841
|
}, `step-${n + 1}`))
|
|
2814
2842
|
});
|
|
2815
2843
|
}
|
|
2816
|
-
function
|
|
2844
|
+
function qa({ children: e, pulsePaused: t, size: n = 80, className: i, style: a, ...o }) {
|
|
2817
2845
|
return /* @__PURE__ */ H("div", {
|
|
2818
2846
|
className: r("vig-sf__fade-in mb-4", i),
|
|
2819
2847
|
style: a,
|
|
@@ -2831,7 +2859,7 @@ function Ua({ children: e, pulsePaused: t, size: n = 80, className: i, style: a,
|
|
|
2831
2859
|
})
|
|
2832
2860
|
});
|
|
2833
2861
|
}
|
|
2834
|
-
function
|
|
2862
|
+
function Ja({ children: e, className: t, ...n }) {
|
|
2835
2863
|
return /* @__PURE__ */ H("div", {
|
|
2836
2864
|
className: "vig-sf__fade-in-d1 text-center mb-2",
|
|
2837
2865
|
children: /* @__PURE__ */ H("h1", {
|
|
@@ -2841,7 +2869,7 @@ function Wa({ children: e, className: t, ...n }) {
|
|
|
2841
2869
|
})
|
|
2842
2870
|
});
|
|
2843
2871
|
}
|
|
2844
|
-
function
|
|
2872
|
+
function Ya({ children: e, className: t, ...n }) {
|
|
2845
2873
|
return /* @__PURE__ */ H("div", {
|
|
2846
2874
|
className: "vig-sf__fade-in-d1 text-center mb-5",
|
|
2847
2875
|
children: /* @__PURE__ */ H("p", {
|
|
@@ -2851,21 +2879,21 @@ function Ga({ children: e, className: t, ...n }) {
|
|
|
2851
2879
|
})
|
|
2852
2880
|
});
|
|
2853
2881
|
}
|
|
2854
|
-
function
|
|
2882
|
+
function Xa({ children: e, className: t, ...n }) {
|
|
2855
2883
|
return /* @__PURE__ */ H("div", {
|
|
2856
2884
|
className: r("vig-sf__fade-in-d2 w-full", t),
|
|
2857
2885
|
...n,
|
|
2858
2886
|
children: /* @__PURE__ */ H(Xn, { children: e })
|
|
2859
2887
|
});
|
|
2860
2888
|
}
|
|
2861
|
-
function
|
|
2889
|
+
function Za({ children: e, className: t, ...n }) {
|
|
2862
2890
|
return /* @__PURE__ */ H("div", {
|
|
2863
2891
|
className: r("vig-sf__fade-in-d3 w-full mt-4 flex items-center justify-between gap-3", t),
|
|
2864
2892
|
...n,
|
|
2865
2893
|
children: e
|
|
2866
2894
|
});
|
|
2867
2895
|
}
|
|
2868
|
-
function
|
|
2896
|
+
function Qa({ children: e, className: t, ...n }) {
|
|
2869
2897
|
return /* @__PURE__ */ H("div", {
|
|
2870
2898
|
className: "vig-sf__fade-in-d3 mt-6 text-center",
|
|
2871
2899
|
children: /* @__PURE__ */ H("p", {
|
|
@@ -2875,28 +2903,28 @@ function Ja({ children: e, className: t, ...n }) {
|
|
|
2875
2903
|
})
|
|
2876
2904
|
});
|
|
2877
2905
|
}
|
|
2878
|
-
function
|
|
2906
|
+
function $a({ icon: e, children: t, className: n, ...i }) {
|
|
2879
2907
|
return /* @__PURE__ */ U("div", {
|
|
2880
2908
|
className: r("vig-sf__hint flex items-start gap-2 rounded-lg px-3 py-2 text-xs text-slate-600 dark:text-slate-300", n),
|
|
2881
2909
|
...i,
|
|
2882
2910
|
children: [e, /* @__PURE__ */ H("span", { children: t })]
|
|
2883
2911
|
});
|
|
2884
2912
|
}
|
|
2885
|
-
var
|
|
2886
|
-
Background:
|
|
2887
|
-
Content:
|
|
2888
|
-
Steps:
|
|
2889
|
-
Logo:
|
|
2890
|
-
Title:
|
|
2891
|
-
Description:
|
|
2892
|
-
Card:
|
|
2893
|
-
Actions:
|
|
2894
|
-
Footer:
|
|
2895
|
-
Hint:
|
|
2913
|
+
var eo = Object.assign(Ua, {
|
|
2914
|
+
Background: Wa,
|
|
2915
|
+
Content: Ga,
|
|
2916
|
+
Steps: Ka,
|
|
2917
|
+
Logo: qa,
|
|
2918
|
+
Title: Ja,
|
|
2919
|
+
Description: Ya,
|
|
2920
|
+
Card: Xa,
|
|
2921
|
+
Actions: Za,
|
|
2922
|
+
Footer: Qa,
|
|
2923
|
+
Hint: $a
|
|
2896
2924
|
});
|
|
2897
2925
|
//#endregion
|
|
2898
2926
|
//#region src/components/app-footer.tsx
|
|
2899
|
-
function
|
|
2927
|
+
function to({ logo: e, productName: t, version: n, links: r = [] }) {
|
|
2900
2928
|
return /* @__PURE__ */ U("footer", {
|
|
2901
2929
|
className: "mt-auto",
|
|
2902
2930
|
children: [/* @__PURE__ */ H("div", { className: "mx-6 border-t" }), /* @__PURE__ */ U("div", {
|
|
@@ -2924,7 +2952,7 @@ function Za({ logo: e, productName: t, version: n, links: r = [] }) {
|
|
|
2924
2952
|
}
|
|
2925
2953
|
//#endregion
|
|
2926
2954
|
//#region src/components/app-switcher.tsx
|
|
2927
|
-
function
|
|
2955
|
+
function no({ open: e, onToggle: t, apps: n, triggerTitle: r, closeLabel: i, showTrigger: a = !0, headerHeight: o = 56 }) {
|
|
2928
2956
|
let { t: s } = W(), c = r ?? s("common.apps"), l = i ?? s("common.closeAppSwitcher"), u = {
|
|
2929
2957
|
top: `${o}px`,
|
|
2930
2958
|
height: `calc(100vh - ${o}px)`
|
|
@@ -2949,7 +2977,7 @@ function Qa({ open: e, onToggle: t, apps: n, triggerTitle: r, closeLabel: i, sho
|
|
|
2949
2977
|
style: u,
|
|
2950
2978
|
children: /* @__PURE__ */ H("div", {
|
|
2951
2979
|
className: "p-4",
|
|
2952
|
-
children: n.map((e) => /* @__PURE__ */ H(
|
|
2980
|
+
children: n.map((e) => /* @__PURE__ */ H(ro, {
|
|
2953
2981
|
app: e,
|
|
2954
2982
|
onToggle: t
|
|
2955
2983
|
}, e.id))
|
|
@@ -2957,7 +2985,7 @@ function Qa({ open: e, onToggle: t, apps: n, triggerTitle: r, closeLabel: i, sho
|
|
|
2957
2985
|
})
|
|
2958
2986
|
] });
|
|
2959
2987
|
}
|
|
2960
|
-
function
|
|
2988
|
+
function ro({ app: e, onToggle: t }) {
|
|
2961
2989
|
let { t: n } = W(), r = e.name.includes(".") ? n(e.name, { defaultValue: e.name }) : e.name;
|
|
2962
2990
|
return /* @__PURE__ */ U("a", {
|
|
2963
2991
|
href: e.href,
|
|
@@ -2987,7 +3015,7 @@ function $a({ app: e, onToggle: t }) {
|
|
|
2987
3015
|
]
|
|
2988
3016
|
});
|
|
2989
3017
|
}
|
|
2990
|
-
var
|
|
3018
|
+
var io = new class {
|
|
2991
3019
|
status = "online";
|
|
2992
3020
|
listeners = /* @__PURE__ */ new Set();
|
|
2993
3021
|
get current() {
|
|
@@ -3002,27 +3030,27 @@ var eo = new class {
|
|
|
3002
3030
|
};
|
|
3003
3031
|
}
|
|
3004
3032
|
}();
|
|
3005
|
-
function
|
|
3006
|
-
|
|
3033
|
+
function ao() {
|
|
3034
|
+
io.set("offline");
|
|
3007
3035
|
}
|
|
3008
|
-
function
|
|
3009
|
-
|
|
3036
|
+
function oo() {
|
|
3037
|
+
io.set("online");
|
|
3010
3038
|
}
|
|
3011
|
-
var
|
|
3012
|
-
function
|
|
3013
|
-
let e = Ue(
|
|
3039
|
+
var so = Ve(null);
|
|
3040
|
+
function co() {
|
|
3041
|
+
let e = Ue(so);
|
|
3014
3042
|
if (!e) throw Error("useBackendStatus must be used inside <BackendStatusProvider>");
|
|
3015
3043
|
return e;
|
|
3016
3044
|
}
|
|
3017
|
-
function
|
|
3018
|
-
let [i, a] = Ge(
|
|
3019
|
-
B(() =>
|
|
3045
|
+
function lo({ healthEndpoint: e = "/api/v2/ping", pollInterval: t = 5e3, showBanner: n = !0, children: r }) {
|
|
3046
|
+
let [i, a] = Ge(io.current);
|
|
3047
|
+
B(() => io.subscribe(a), []);
|
|
3020
3048
|
let o = He(async () => {
|
|
3021
|
-
|
|
3049
|
+
io.set("checking");
|
|
3022
3050
|
try {
|
|
3023
|
-
await Y.get(e, { timeout: 4e3 }),
|
|
3051
|
+
await Y.get(e, { timeout: 4e3 }), io.set("online");
|
|
3024
3052
|
} catch {
|
|
3025
|
-
|
|
3053
|
+
io.set("offline");
|
|
3026
3054
|
}
|
|
3027
3055
|
}, [e]);
|
|
3028
3056
|
return B(() => {
|
|
@@ -3033,16 +3061,16 @@ function ao({ healthEndpoint: e = "/api/v2/ping", pollInterval: t = 5e3, showBan
|
|
|
3033
3061
|
i,
|
|
3034
3062
|
t,
|
|
3035
3063
|
o
|
|
3036
|
-
]), /* @__PURE__ */ U(
|
|
3064
|
+
]), /* @__PURE__ */ U(so.Provider, {
|
|
3037
3065
|
value: {
|
|
3038
3066
|
status: i,
|
|
3039
3067
|
retry: o
|
|
3040
3068
|
},
|
|
3041
|
-
children: [n && /* @__PURE__ */ H(
|
|
3069
|
+
children: [n && /* @__PURE__ */ H(uo, {}), r]
|
|
3042
3070
|
});
|
|
3043
3071
|
}
|
|
3044
|
-
function
|
|
3045
|
-
let { status: e, retry: t } =
|
|
3072
|
+
function uo() {
|
|
3073
|
+
let { status: e, retry: t } = co(), { t: n } = W();
|
|
3046
3074
|
if (e === "online") return null;
|
|
3047
3075
|
let r = e === "checking";
|
|
3048
3076
|
return /* @__PURE__ */ H("div", {
|
|
@@ -3072,7 +3100,7 @@ function oo() {
|
|
|
3072
3100
|
}
|
|
3073
3101
|
//#endregion
|
|
3074
3102
|
//#region src/components/error-boundary.tsx
|
|
3075
|
-
var
|
|
3103
|
+
var fo = class extends Be.Component {
|
|
3076
3104
|
state = { hasError: !1 };
|
|
3077
3105
|
static getDerivedStateFromError(e) {
|
|
3078
3106
|
return {
|
|
@@ -3095,10 +3123,10 @@ var so = class extends Be.Component {
|
|
|
3095
3123
|
return this.props.fallback ? this.props.fallback({
|
|
3096
3124
|
error: e,
|
|
3097
3125
|
reset: this.reset
|
|
3098
|
-
}) : /* @__PURE__ */ H(
|
|
3126
|
+
}) : /* @__PURE__ */ H(po, { error: e });
|
|
3099
3127
|
}
|
|
3100
3128
|
};
|
|
3101
|
-
function
|
|
3129
|
+
function po({ error: e }) {
|
|
3102
3130
|
let { t } = W();
|
|
3103
3131
|
return /* @__PURE__ */ H("div", {
|
|
3104
3132
|
className: "flex items-center justify-center min-h-[80vh] px-6 py-16",
|
|
@@ -3146,7 +3174,7 @@ function co({ error: e }) {
|
|
|
3146
3174
|
}
|
|
3147
3175
|
//#endregion
|
|
3148
3176
|
//#region src/components/language-select.tsx
|
|
3149
|
-
function
|
|
3177
|
+
function mo({ value: e, onValueChange: t, locales: n, extraLocaleValues: r = [], placeholder: i, className: a }) {
|
|
3150
3178
|
let { t: o } = W(), s = i ?? o("forms.common.chooseLanguage"), c = /* @__PURE__ */ new Map();
|
|
3151
3179
|
n.forEach((e) => {
|
|
3152
3180
|
c.set(e.initials, {
|
|
@@ -3191,7 +3219,7 @@ function lo({ value: e, onValueChange: t, locales: n, extraLocaleValues: r = [],
|
|
|
3191
3219
|
}
|
|
3192
3220
|
//#endregion
|
|
3193
3221
|
//#region src/components/language-switcher.tsx
|
|
3194
|
-
var
|
|
3222
|
+
var ho = [{
|
|
3195
3223
|
code: "en",
|
|
3196
3224
|
label: "English",
|
|
3197
3225
|
flag: "🇺🇸"
|
|
@@ -3200,9 +3228,9 @@ var uo = [{
|
|
|
3200
3228
|
label: "Português",
|
|
3201
3229
|
flag: "🇧🇷"
|
|
3202
3230
|
}];
|
|
3203
|
-
function
|
|
3231
|
+
function go({ languages: e = ho }) {
|
|
3204
3232
|
let { i18n: t, t: n } = W();
|
|
3205
|
-
return /* @__PURE__ */ U(be, { children: [/* @__PURE__ */ H(
|
|
3233
|
+
return /* @__PURE__ */ U(be, { children: [/* @__PURE__ */ H(O, {
|
|
3206
3234
|
asChild: !0,
|
|
3207
3235
|
children: /* @__PURE__ */ U(v, {
|
|
3208
3236
|
variant: "outline",
|
|
@@ -3212,9 +3240,9 @@ function fo({ languages: e = uo }) {
|
|
|
3212
3240
|
children: n("language.toggle")
|
|
3213
3241
|
})]
|
|
3214
3242
|
})
|
|
3215
|
-
}), /* @__PURE__ */ H(
|
|
3243
|
+
}), /* @__PURE__ */ H(N, {
|
|
3216
3244
|
align: "end",
|
|
3217
|
-
children: e.map((e) => /* @__PURE__ */ U(
|
|
3245
|
+
children: e.map((e) => /* @__PURE__ */ U(D, {
|
|
3218
3246
|
onClick: () => t.changeLanguage(e.code),
|
|
3219
3247
|
className: t.language === e.code ? "font-semibold bg-accent" : "",
|
|
3220
3248
|
children: [e.flag && /* @__PURE__ */ H("span", {
|
|
@@ -3226,7 +3254,7 @@ function fo({ languages: e = uo }) {
|
|
|
3226
3254
|
}
|
|
3227
3255
|
//#endregion
|
|
3228
3256
|
//#region src/components/theme-provider.tsx
|
|
3229
|
-
function
|
|
3257
|
+
function _o({ children: e, defaultTheme: t = "system", storageKey: n = "vite-ui-theme", ...r }) {
|
|
3230
3258
|
return /* @__PURE__ */ H(_t, {
|
|
3231
3259
|
attribute: "class",
|
|
3232
3260
|
enableSystem: !0,
|
|
@@ -3236,7 +3264,7 @@ function po({ children: e, defaultTheme: t = "system", storageKey: n = "vite-ui-
|
|
|
3236
3264
|
children: e
|
|
3237
3265
|
});
|
|
3238
3266
|
}
|
|
3239
|
-
var
|
|
3267
|
+
var vo = () => {
|
|
3240
3268
|
let { theme: e, setTheme: t } = vt();
|
|
3241
3269
|
return {
|
|
3242
3270
|
theme: e ?? "system",
|
|
@@ -3245,9 +3273,9 @@ var mo = () => {
|
|
|
3245
3273
|
};
|
|
3246
3274
|
//#endregion
|
|
3247
3275
|
//#region src/components/mode-toggle.tsx
|
|
3248
|
-
function
|
|
3249
|
-
let { setTheme: e } =
|
|
3250
|
-
return /* @__PURE__ */ U(be, { children: [/* @__PURE__ */ H(
|
|
3276
|
+
function yo() {
|
|
3277
|
+
let { setTheme: e } = vo(), { t } = W();
|
|
3278
|
+
return /* @__PURE__ */ U(be, { children: [/* @__PURE__ */ H(O, {
|
|
3251
3279
|
asChild: !0,
|
|
3252
3280
|
children: /* @__PURE__ */ U(v, {
|
|
3253
3281
|
variant: "outline",
|
|
@@ -3261,25 +3289,25 @@ function ho() {
|
|
|
3261
3289
|
})
|
|
3262
3290
|
]
|
|
3263
3291
|
})
|
|
3264
|
-
}), /* @__PURE__ */ U(
|
|
3292
|
+
}), /* @__PURE__ */ U(N, {
|
|
3265
3293
|
align: "end",
|
|
3266
3294
|
children: [
|
|
3267
|
-
/* @__PURE__ */ H(
|
|
3295
|
+
/* @__PURE__ */ H(D, {
|
|
3268
3296
|
onClick: () => e("light"),
|
|
3269
3297
|
children: t("theme.light")
|
|
3270
3298
|
}),
|
|
3271
|
-
/* @__PURE__ */ H(
|
|
3299
|
+
/* @__PURE__ */ H(D, {
|
|
3272
3300
|
onClick: () => e("dark"),
|
|
3273
3301
|
children: t("theme.dark")
|
|
3274
3302
|
}),
|
|
3275
|
-
/* @__PURE__ */ H(
|
|
3303
|
+
/* @__PURE__ */ H(D, {
|
|
3276
3304
|
onClick: () => e("system"),
|
|
3277
3305
|
children: t("theme.system")
|
|
3278
3306
|
})
|
|
3279
3307
|
]
|
|
3280
3308
|
})] });
|
|
3281
3309
|
}
|
|
3282
|
-
var
|
|
3310
|
+
var bo = [
|
|
3283
3311
|
{
|
|
3284
3312
|
value: "light",
|
|
3285
3313
|
labelKey: "theme.light",
|
|
@@ -3296,10 +3324,10 @@ var go = [
|
|
|
3296
3324
|
icon: Kt
|
|
3297
3325
|
}
|
|
3298
3326
|
];
|
|
3299
|
-
function
|
|
3300
|
-
let { theme: e, setTheme: t } =
|
|
3327
|
+
function xo() {
|
|
3328
|
+
let { theme: e, setTheme: t } = vo(), { t: n } = W(), r = bo.find((t) => t.value === e) ?? bo[2];
|
|
3301
3329
|
function i() {
|
|
3302
|
-
let n =
|
|
3330
|
+
let n = bo[(bo.findIndex((t) => t.value === e) + 1) % bo.length];
|
|
3303
3331
|
t(n.value);
|
|
3304
3332
|
}
|
|
3305
3333
|
let a = r.icon;
|
|
@@ -3313,7 +3341,7 @@ function _o() {
|
|
|
3313
3341
|
}
|
|
3314
3342
|
//#endregion
|
|
3315
3343
|
//#region src/components/nav-secondary.tsx
|
|
3316
|
-
function
|
|
3344
|
+
function So({ items: e, ...t }) {
|
|
3317
3345
|
return /* @__PURE__ */ H(ii, {
|
|
3318
3346
|
...t,
|
|
3319
3347
|
children: /* @__PURE__ */ H(si, { children: /* @__PURE__ */ H(ci, { children: e.map((e) => /* @__PURE__ */ H(li, { children: /* @__PURE__ */ H(di, {
|
|
@@ -3327,16 +3355,16 @@ function vo({ items: e, ...t }) {
|
|
|
3327
3355
|
}
|
|
3328
3356
|
//#endregion
|
|
3329
3357
|
//#region src/components/viglet-app-switcher.tsx
|
|
3330
|
-
var
|
|
3358
|
+
var Co = {
|
|
3331
3359
|
cloud: "https://console.viglet.cloud",
|
|
3332
3360
|
turing: "https://turing.viglet.cloud",
|
|
3333
3361
|
shio: "https://shio.viglet.cloud",
|
|
3334
3362
|
dumont: "https://dumont.viglet.cloud",
|
|
3335
3363
|
docs: "https://docs.viglet.org"
|
|
3336
3364
|
};
|
|
3337
|
-
function
|
|
3365
|
+
function wo({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i, closeLabel: a, headerHeight: o = 56 }) {
|
|
3338
3366
|
let { t: s } = W(), c = {
|
|
3339
|
-
...
|
|
3367
|
+
...Co,
|
|
3340
3368
|
...r
|
|
3341
3369
|
}, l = [
|
|
3342
3370
|
{
|
|
@@ -3381,7 +3409,7 @@ function bo({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i,
|
|
|
3381
3409
|
external: !0
|
|
3382
3410
|
}
|
|
3383
3411
|
], u = i ?? s("common.apps", { defaultValue: "Apps" });
|
|
3384
|
-
return /* @__PURE__ */ H(
|
|
3412
|
+
return /* @__PURE__ */ H(no, {
|
|
3385
3413
|
open: e,
|
|
3386
3414
|
onToggle: t,
|
|
3387
3415
|
apps: l,
|
|
@@ -3392,17 +3420,17 @@ function bo({ open: e, onToggle: t, activeProduct: n, urls: r, triggerTitle: i,
|
|
|
3392
3420
|
}
|
|
3393
3421
|
//#endregion
|
|
3394
3422
|
//#region src/hooks/use-date-locale.ts
|
|
3395
|
-
var
|
|
3423
|
+
var To = {
|
|
3396
3424
|
en: St,
|
|
3397
3425
|
pt: Ct
|
|
3398
3426
|
};
|
|
3399
|
-
function
|
|
3427
|
+
function Eo() {
|
|
3400
3428
|
let { i18n: e } = W();
|
|
3401
|
-
return We(() =>
|
|
3429
|
+
return We(() => To[e.language?.substring(0, 2)] ?? St, [e.language]);
|
|
3402
3430
|
}
|
|
3403
3431
|
//#endregion
|
|
3404
3432
|
//#region src/hooks/use-grid-adapter.ts
|
|
3405
|
-
function
|
|
3433
|
+
function Do(e, t) {
|
|
3406
3434
|
let { id: n, name: r, description: i, url: a, icon: o } = t;
|
|
3407
3435
|
return We(() => {
|
|
3408
3436
|
if (!Array.isArray(e) || e.length === 0) return [];
|
|
@@ -3435,8 +3463,8 @@ function Co(e, t) {
|
|
|
3435
3463
|
}
|
|
3436
3464
|
//#endregion
|
|
3437
3465
|
//#region src/contexts/breadcrumb.context.tsx
|
|
3438
|
-
var
|
|
3439
|
-
function
|
|
3466
|
+
var Oo = Ve(void 0);
|
|
3467
|
+
function ko({ children: e }) {
|
|
3440
3468
|
let [t, n] = Ge([]), r = He((e) => {
|
|
3441
3469
|
n((t) => t.length > 0 && t[t.length - 1].label === e.label ? t : [...t, e]);
|
|
3442
3470
|
}, []), i = He(() => {
|
|
@@ -3455,20 +3483,20 @@ function To({ children: e }) {
|
|
|
3455
3483
|
i,
|
|
3456
3484
|
a
|
|
3457
3485
|
]);
|
|
3458
|
-
return /* @__PURE__ */ H(
|
|
3486
|
+
return /* @__PURE__ */ H(Oo.Provider, {
|
|
3459
3487
|
value: o,
|
|
3460
3488
|
children: e
|
|
3461
3489
|
});
|
|
3462
3490
|
}
|
|
3463
|
-
var
|
|
3464
|
-
let e = Ue(
|
|
3491
|
+
var Ao = () => {
|
|
3492
|
+
let e = Ue(Oo);
|
|
3465
3493
|
if (!e) throw Error("useBreadcrumb must be used within Provider");
|
|
3466
3494
|
return e;
|
|
3467
|
-
},
|
|
3495
|
+
}, jo = () => Ue(Oo);
|
|
3468
3496
|
//#endregion
|
|
3469
3497
|
//#region src/hooks/use-sub-page-breadcrumb.ts
|
|
3470
|
-
function
|
|
3471
|
-
let t =
|
|
3498
|
+
function Mo(e) {
|
|
3499
|
+
let t = jo()?.setItems, n = V([]);
|
|
3472
3500
|
B(() => {
|
|
3473
3501
|
if (e === void 0 || !t) return;
|
|
3474
3502
|
let r = typeof e == "string" ? [{ label: e }] : Array.isArray(e) ? e : [e], i = n.current;
|
|
@@ -3495,28 +3523,28 @@ function Oo(e) {
|
|
|
3495
3523
|
}
|
|
3496
3524
|
//#endregion
|
|
3497
3525
|
//#region src/hooks/use-assistant-notifications.ts
|
|
3498
|
-
var
|
|
3526
|
+
var No = {
|
|
3499
3527
|
loading: "working",
|
|
3500
3528
|
success: "success",
|
|
3501
3529
|
error: "error",
|
|
3502
3530
|
warning: "attention",
|
|
3503
3531
|
info: "attention"
|
|
3504
|
-
},
|
|
3532
|
+
}, Po = [
|
|
3505
3533
|
"working",
|
|
3506
3534
|
"error",
|
|
3507
3535
|
"attention",
|
|
3508
3536
|
"success"
|
|
3509
3537
|
];
|
|
3510
|
-
function
|
|
3538
|
+
function Fo(e) {
|
|
3511
3539
|
let { title: t } = e;
|
|
3512
3540
|
return typeof t == "string" ? t : typeof t == "number" ? String(t) : null;
|
|
3513
3541
|
}
|
|
3514
|
-
function
|
|
3542
|
+
function Io() {
|
|
3515
3543
|
let { toasts: e } = yt(), t = e.filter((e) => !e.delete), n = "idle", r = null;
|
|
3516
|
-
for (let e of
|
|
3517
|
-
let i = t.find((t) =>
|
|
3544
|
+
for (let e of Po) {
|
|
3545
|
+
let i = t.find((t) => No[t.type ?? ""] === e);
|
|
3518
3546
|
if (i) {
|
|
3519
|
-
n = e, r =
|
|
3547
|
+
n = e, r = Fo(i);
|
|
3520
3548
|
break;
|
|
3521
3549
|
}
|
|
3522
3550
|
}
|
|
@@ -3528,8 +3556,8 @@ function Mo() {
|
|
|
3528
3556
|
}
|
|
3529
3557
|
//#endregion
|
|
3530
3558
|
//#region src/lib/axios.ts
|
|
3531
|
-
var
|
|
3532
|
-
function
|
|
3559
|
+
var Lo = "X-XSRF-TOKEN", Ro = "/csrf", $ = null, zo = Y.create({ withCredentials: !0 });
|
|
3560
|
+
function Bo(e) {
|
|
3533
3561
|
return [
|
|
3534
3562
|
"post",
|
|
3535
3563
|
"put",
|
|
@@ -3537,58 +3565,58 @@ function Io(e) {
|
|
|
3537
3565
|
"patch"
|
|
3538
3566
|
].includes(e?.toLowerCase() || "");
|
|
3539
3567
|
}
|
|
3540
|
-
function
|
|
3541
|
-
return e ? typeof e == "object" && e && "get" in e && typeof e.get == "function" ? e.get(
|
|
3568
|
+
function Vo(e) {
|
|
3569
|
+
return e ? typeof e == "object" && e && "get" in e && typeof e.get == "function" ? e.get(Lo) || null : typeof e == "object" && e && e[Lo.toLowerCase()] || null : null;
|
|
3542
3570
|
}
|
|
3543
|
-
function
|
|
3571
|
+
function Ho(e, t) {
|
|
3544
3572
|
if (typeof e.headers == "object" && e.headers !== null && "set" in e.headers && typeof e.headers.set == "function") {
|
|
3545
|
-
e.headers.set(
|
|
3573
|
+
e.headers.set(Lo, t);
|
|
3546
3574
|
return;
|
|
3547
3575
|
}
|
|
3548
3576
|
let n = e.headers || {};
|
|
3549
|
-
n[
|
|
3577
|
+
n[Lo] = t, e.headers = n;
|
|
3550
3578
|
}
|
|
3551
|
-
function
|
|
3552
|
-
$ = null,
|
|
3579
|
+
function Uo() {
|
|
3580
|
+
$ = null, Go = null;
|
|
3553
3581
|
}
|
|
3554
|
-
function
|
|
3582
|
+
function Wo() {
|
|
3555
3583
|
let e = /(?:^|;\s*)XSRF-TOKEN=([^;]+)/.exec(globalThis.document.cookie);
|
|
3556
3584
|
return e ? decodeURIComponent(e[1]) : null;
|
|
3557
3585
|
}
|
|
3558
|
-
var
|
|
3559
|
-
async function
|
|
3560
|
-
|
|
3561
|
-
let e = await
|
|
3586
|
+
var Go = null;
|
|
3587
|
+
async function Ko() {
|
|
3588
|
+
zo.defaults.baseURL = Y.defaults.baseURL;
|
|
3589
|
+
let e = await zo.get(Ro), t = Vo(e.headers), n = typeof e.data == "object" && e.data !== null ? e.data.token : void 0, r = Wo();
|
|
3562
3590
|
$ = t || n || r || null;
|
|
3563
3591
|
}
|
|
3564
|
-
async function
|
|
3592
|
+
async function qo() {
|
|
3565
3593
|
if (!$) {
|
|
3566
|
-
if (!
|
|
3567
|
-
let e =
|
|
3568
|
-
|
|
3594
|
+
if (!Go) {
|
|
3595
|
+
let e = Ko().finally(() => {
|
|
3596
|
+
Go === e && (Go = null);
|
|
3569
3597
|
});
|
|
3570
|
-
|
|
3598
|
+
Go = e;
|
|
3571
3599
|
}
|
|
3572
|
-
await
|
|
3600
|
+
await Go;
|
|
3573
3601
|
}
|
|
3574
3602
|
}
|
|
3575
|
-
function
|
|
3603
|
+
function Jo(e = {}) {
|
|
3576
3604
|
let t = e.loginPath ?? "/login";
|
|
3577
|
-
e.baseURL && (Y.defaults.baseURL = e.baseURL), Y.defaults.withCredentials = !0, Y.defaults.xsrfCookieName = "XSRF-TOKEN", Y.defaults.xsrfHeaderName =
|
|
3605
|
+
e.baseURL && (Y.defaults.baseURL = e.baseURL), Y.defaults.withCredentials = !0, Y.defaults.xsrfCookieName = "XSRF-TOKEN", Y.defaults.xsrfHeaderName = Lo, Y.interceptors.request.use(async (e) => {
|
|
3578
3606
|
let t = e.url || "", n = e.baseURL || Y.defaults.baseURL;
|
|
3579
|
-
if (
|
|
3580
|
-
if ($ || await
|
|
3581
|
-
return
|
|
3607
|
+
if (zo.defaults.baseURL = n, t.includes(Ro) || !Bo(e.method)) return e;
|
|
3608
|
+
if ($ || await qo(), !$) throw Error("Unable to obtain CSRF token for mutating request.");
|
|
3609
|
+
return Ho(e, $), e;
|
|
3582
3610
|
}, (e) => Promise.reject(e)), Y.interceptors.response.use((e) => {
|
|
3583
|
-
let t =
|
|
3611
|
+
let t = Vo(e.headers);
|
|
3584
3612
|
return t && ($ = t), e;
|
|
3585
3613
|
}, async (e) => {
|
|
3586
|
-
let n =
|
|
3614
|
+
let n = Vo(e.response?.headers);
|
|
3587
3615
|
n && ($ = n);
|
|
3588
3616
|
let r = e.config;
|
|
3589
|
-
if (e.response?.status === 403 && r && !r._csrfRetried &&
|
|
3590
|
-
if (r._csrfRetried = !0,
|
|
3591
|
-
return
|
|
3617
|
+
if (e.response?.status === 403 && r && !r._csrfRetried && Bo(r.method)) {
|
|
3618
|
+
if (r._csrfRetried = !0, Uo(), zo.defaults.baseURL = r.baseURL || Y.defaults.baseURL, await qo(), !$) throw e;
|
|
3619
|
+
return Ho(r, $), Y.request(r);
|
|
3592
3620
|
}
|
|
3593
3621
|
if (e.response?.status === 401 && !globalThis.location.pathname.startsWith(t)) {
|
|
3594
3622
|
let e = globalThis.location.pathname + globalThis.location.search;
|
|
@@ -3599,15 +3627,15 @@ function Wo(e = {}) {
|
|
|
3599
3627
|
}
|
|
3600
3628
|
//#endregion
|
|
3601
3629
|
//#region src/lib/export-xlsx.ts
|
|
3602
|
-
var
|
|
3603
|
-
function
|
|
3604
|
-
return e.replace(
|
|
3630
|
+
var Yo = /[[\]:*?/\\]/g, Xo = 31;
|
|
3631
|
+
function Zo(e) {
|
|
3632
|
+
return e.replace(Yo, " ").trim().slice(0, Xo) || "Sheet1";
|
|
3605
3633
|
}
|
|
3606
|
-
function
|
|
3634
|
+
function Qo(e) {
|
|
3607
3635
|
return Array.isArray(e) ? e.join(", ") : e instanceof Date ? e.toISOString() : e;
|
|
3608
3636
|
}
|
|
3609
|
-
function
|
|
3610
|
-
let i = t.map((e) => e.label), a = e.map((e) => t.map((t) =>
|
|
3637
|
+
function $o(e, t, n, r) {
|
|
3638
|
+
let i = t.map((e) => e.label), a = e.map((e) => t.map((t) => Qo(e[t.key]))), o = wt.utils.aoa_to_sheet([i, ...a]);
|
|
3611
3639
|
o["!cols"] = t.map((e, t) => {
|
|
3612
3640
|
let n = e.label.length;
|
|
3613
3641
|
for (let e of a) {
|
|
@@ -3617,7 +3645,7 @@ function Yo(e, t, n, r) {
|
|
|
3617
3645
|
return { wch: Math.min(Math.max(n + 2, 12), 60) };
|
|
3618
3646
|
});
|
|
3619
3647
|
let s = wt.utils.book_new();
|
|
3620
|
-
wt.utils.book_append_sheet(s, o,
|
|
3648
|
+
wt.utils.book_append_sheet(s, o, Zo(r ?? n)), wt.writeFile(s, `${n}.xlsx`);
|
|
3621
3649
|
}
|
|
3622
3650
|
//#endregion
|
|
3623
|
-
export { $t as Accordion, nn as AccordionContent, en as AccordionItem, tn as AccordionTrigger,
|
|
3651
|
+
export { $t as Accordion, nn as AccordionContent, en as AccordionItem, tn as AccordionTrigger, to as AppFooter, no as AppSwitcher, rn as Avatar, on as AvatarFallback, an as AvatarImage, uo as BackendStatusBanner, lo as BackendStatusProvider, c as Badge, ee as BadgeColorful, x as BadgeLocale, sn as Breadcrumb, pn as BreadcrumbEllipsis, ln as BreadcrumbItem, un as BreadcrumbLink, cn as BreadcrumbList, dn as BreadcrumbPage, ko as BreadcrumbProvider, fn as BreadcrumbSeparator, R as Button, mn as Card, vn as CardAction, yn as CardContent, _n as CardDescription, bn as CardFooter, hn as CardHeader, gn as CardTitle, M as Checkbox, l as Dialog, h as DialogClose, S as DialogContent, u as DialogDescription, d as DialogFooter, y as DialogHeader, g as DialogOverlay, p as DialogPortal, f as DialogTitle, o as DialogTrigger, xn as Drawer, wn as DrawerClose, En as DrawerContent, An as DrawerDescription, On as DrawerFooter, Dn as DrawerHeader, Tn as DrawerOverlay, Cn as DrawerPortal, kn as DrawerTitle, Sn as DrawerTrigger, be as DropdownMenu, ie as DropdownMenuCheckboxItem, N as DropdownMenuContent, F as DropdownMenuGroup, D as DropdownMenuItem, A as DropdownMenuLabel, re as DropdownMenuPortal, ae as DropdownMenuRadioGroup, Pe as DropdownMenuRadioItem, T as DropdownMenuSeparator, le as DropdownMenuShortcut, k as DropdownMenuSub, ce as DropdownMenuSubContent, ue as DropdownMenuSubTrigger, O as DropdownMenuTrigger, fo as ErrorBoundary, Fe as FloatingFormulasBg, Mn as Form, Hn as FormActions, zn as FormControl, Bn as FormDescription, Pn as FormField, Ln as FormItem, Kn as FormItemTwoColumns, Rn as FormLabel, Vn as FormMessage, Xn as GlassCard, v as GradientButton, Jn as GradientSwitch, Qn as HoverCard, er as HoverCardContent, $n as HoverCardTrigger, w as IconPickerDialog, s as Input, jn as Label, mo as LanguageSelect, go as LanguageSwitcher, Ba as Login, yo as ModeToggle, xo as ModeToggleSidebar, So as NavSecondary, tr as NavigationMenu, or as NavigationMenuContent, lr as NavigationMenuIndicator, rr as NavigationMenuItem, cr as NavigationMenuLink, nr as NavigationMenuList, ar as NavigationMenuTrigger, sr as NavigationMenuViewport, ur as Pagination, dr as PaginationContent, gr as PaginationEllipsis, fr as PaginationItem, pr as PaginationLink, hr as PaginationNext, mr as PaginationPrevious, te as Popover, je as PopoverAnchor, se as PopoverContent, E as PopoverDescription, ne as PopoverHeader, P as PopoverTitle, xe as PopoverTrigger, _r as Progress, Zn as PulseRing, me as ResizableHandle, Me as ResizablePanel, oe as ResizablePanelGroup, Ae as SectionCard, vr as Select, Sr as SelectContent, yr as SelectGroup, wr as SelectItem, Cr as SelectLabel, Dr as SelectScrollDownButton, Er as SelectScrollUpButton, Tr as SelectSeparator, xr as SelectTrigger, br as SelectValue, Or as Separator, kr as Sheet, jr as SheetClose, Pr as SheetContent, Rr as SheetDescription, Ir as SheetFooter, Fr as SheetHeader, Lr as SheetTitle, Ar as SheetTrigger, Yr as Sidebar, ri as SidebarContent, ti as SidebarFooter, ii as SidebarGroup, oi as SidebarGroupAction, si as SidebarGroupContent, ai as SidebarGroupLabel, ei as SidebarHeader, $r as SidebarInput, Qr as SidebarInset, ci as SidebarMenu, fi as SidebarMenuAction, pi as SidebarMenuBadge, di as SidebarMenuButton, li as SidebarMenuItem, hi as SidebarMenuSkeleton, gi as SidebarMenuSub, vi as SidebarMenuSubButton, _i as SidebarMenuSubItem, Jr as SidebarProvider, Zr as SidebarRail, ni as SidebarSeparator, Xr as SidebarTrigger, m as Skeleton, Si as Slider, eo as StartupFirst, Mi as Stepper, bi as StickySaveBar, Fi as Switch, Ii as Table, Ri as TableBody, Ui as TableCaption, Hi as TableCell, zi as TableFooter, Vi as TableHead, Li as TableHeader, Bi as TableRow, De as Tabs, L as TabsContent, Se as TabsList, ke as TabsTrigger, Wi as Textarea, _o as ThemeProvider, he as Toaster, Ki as Toggle, Ji as ToggleGroup, Yi as ToggleGroupItem, Ce as Tooltip, ve as TooltipContent, _e as TooltipProvider, I as TooltipTrigger, ki as Tree, pe as UserAvatar, Ea as UserMenu, Oe as UserProvider, ma as VIGLET_ASSISTANT_SIZES, wo as VigletAppSwitcher, Ta as VigletAssistant, pa as VigletAvatar, C as badgeVariants, j as buttonVariants, r as cn, $o as exportToXlsx, t as getFlagEmoji, n as getHashedColor, _ as getLocaleCountryCode, Te as getUserInitials, b as gradientButtonVariants, qn as gradientSwitchVariants, ir as navigationMenuTriggerStyle, ao as reportBackendOffline, oo as reportBackendOnline, Ne as sectionCardColorVariants, Jo as setupAxiosInterceptors, ge as toast, Gi as toggleVariants, Ai as treeFromPaths, e as truncateMiddle, Io as useAssistantNotifications, co as useBackendStatus, Ao as useBreadcrumb, jo as useBreadcrumbOptional, we as useCurrentUser, Eo as useDateLocale, Fn as useFormField, Do as useGridAdapter, Ee as useIsMobile, Kr as useSidebar, qr as useSidebarOptional, Mo as useSubPageBreadcrumb, vo as useTheme };
|