@aintela/chat 0.2.37 → 0.2.38
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/components.js
CHANGED
|
@@ -723,7 +723,7 @@ const os = /* @__PURE__ */ n(({
|
|
|
723
723
|
showToolCalls: S = !1,
|
|
724
724
|
showStickyHeader: w = !0,
|
|
725
725
|
autoCreateSession: k = !1,
|
|
726
|
-
showModelSelector:
|
|
726
|
+
showModelSelector: d = !0,
|
|
727
727
|
showSessionInfo: x = !0,
|
|
728
728
|
// v2 is the default: TaskList and sub-agent boxes live in the
|
|
729
729
|
// RunProgressPanel side rail, NOT inline in the chat. Legacy v1
|
|
@@ -741,7 +741,7 @@ const os = /* @__PURE__ */ n(({
|
|
|
741
741
|
// Hosts that own their own prompt input (e.g. v2 Composer's
|
|
742
742
|
// UnifiedComposerV2) pass `true` to suppress ChatPane's internal
|
|
743
743
|
// Prompt and use ChatPane purely as a transcript.
|
|
744
|
-
hidePromptInput:
|
|
744
|
+
hidePromptInput: u = !1,
|
|
745
745
|
friendlyMode: A = !0,
|
|
746
746
|
partRenderers: c,
|
|
747
747
|
uiTools: _,
|
|
@@ -902,13 +902,13 @@ const os = /* @__PURE__ */ n(({
|
|
|
902
902
|
sessionStateManagerService: ht,
|
|
903
903
|
showStatistics: D,
|
|
904
904
|
showStickyHeader: w,
|
|
905
|
-
showModelSelector:
|
|
905
|
+
showModelSelector: d,
|
|
906
906
|
showSessionInfo: x,
|
|
907
907
|
showTaskList: y,
|
|
908
908
|
showSubAgents: b,
|
|
909
909
|
compactPrompt: h,
|
|
910
910
|
showConnectionState: z,
|
|
911
|
-
hidePromptInput:
|
|
911
|
+
hidePromptInput: u,
|
|
912
912
|
onRenderPrompt: G,
|
|
913
913
|
showToolCalls: st,
|
|
914
914
|
setShowToolCalls: xe,
|
|
@@ -925,7 +925,7 @@ const os = /* @__PURE__ */ n(({
|
|
|
925
925
|
formatTimestamp: N,
|
|
926
926
|
resolvePersona: B,
|
|
927
927
|
userMessageRenderer: J
|
|
928
|
-
}), [G, Qe, V, Be, s, be, At, xt, Oe, E, D,
|
|
928
|
+
}), [G, Qe, V, Be, s, be, At, xt, Oe, E, D, d, x, y, b, h, z, u, st, et, lt, Nt, _t, je, qe, c, _, j, N, B, J]);
|
|
929
929
|
return /* @__PURE__ */ t(hn.Provider, { value: Fe, children: ze });
|
|
930
930
|
}, "AiChatProvider"), Tu = /* @__PURE__ */ n(({ onPromptSelected: e, forceExpanded: a = 0, cancelTimeout: l, children: p }) => {
|
|
931
931
|
const [m, s] = Q([]), [v, g] = Q(!1), { storageService: T } = Ze(), { promptState: E } = Li(T), D = ue(null), S = ue([]), w = bt();
|
|
@@ -934,20 +934,20 @@ const os = /* @__PURE__ */ n(({
|
|
|
934
934
|
}, [E]), le(() => {
|
|
935
935
|
a > 0 && g(() => !1);
|
|
936
936
|
}, [a]), le(() => {
|
|
937
|
-
const
|
|
937
|
+
const u = /* @__PURE__ */ n((c) => {
|
|
938
938
|
c.key === "Escape" && (c.preventDefault(), g(() => !1));
|
|
939
939
|
}, "handleKeyDown"), A = /* @__PURE__ */ n((c) => {
|
|
940
940
|
g(() => !1);
|
|
941
941
|
}, "handleMouseUp");
|
|
942
|
-
return document.addEventListener("keydown",
|
|
943
|
-
document.removeEventListener("keydown",
|
|
942
|
+
return document.addEventListener("keydown", u), document.addEventListener("mouseup", A), () => {
|
|
943
|
+
document.removeEventListener("keydown", u), document.removeEventListener("mouseup", A);
|
|
944
944
|
};
|
|
945
945
|
}, []);
|
|
946
946
|
const k = /* @__PURE__ */ n(() => {
|
|
947
|
-
const
|
|
948
|
-
s(
|
|
949
|
-
}, "loadPrompts"),
|
|
950
|
-
e(
|
|
947
|
+
const u = T.getPrompts();
|
|
948
|
+
s(u);
|
|
949
|
+
}, "loadPrompts"), d = /* @__PURE__ */ n((u, A) => {
|
|
950
|
+
e(u, A), g(() => !1);
|
|
951
951
|
}, "handlePromptClick"), x = /* @__PURE__ */ n(() => {
|
|
952
952
|
g(!v), l();
|
|
953
953
|
}, "toggleExpanded");
|
|
@@ -1024,13 +1024,13 @@ const os = /* @__PURE__ */ n(({
|
|
|
1024
1024
|
// Maximum 30% of viewport height
|
|
1025
1025
|
overflowY: "auto"
|
|
1026
1026
|
},
|
|
1027
|
-
children: /* @__PURE__ */ t(Zc, { sx: { p: 0 }, children: m.map((
|
|
1027
|
+
children: /* @__PURE__ */ t(Zc, { sx: { p: 0 }, children: m.map((u, A) => /* @__PURE__ */ t(
|
|
1028
1028
|
ed,
|
|
1029
1029
|
{
|
|
1030
1030
|
ref: /* @__PURE__ */ n((c) => {
|
|
1031
1031
|
S.current[A] = c;
|
|
1032
1032
|
}, "ref"),
|
|
1033
|
-
onClick: /* @__PURE__ */ n(() => u
|
|
1033
|
+
onClick: /* @__PURE__ */ n(() => d(u.promptText, u.promptJson), "onClick"),
|
|
1034
1034
|
sx: {
|
|
1035
1035
|
py: 1,
|
|
1036
1036
|
px: 1,
|
|
@@ -1087,14 +1087,14 @@ const os = /* @__PURE__ */ n(({
|
|
|
1087
1087
|
whiteSpace: "pre-wrap",
|
|
1088
1088
|
flex: 1
|
|
1089
1089
|
},
|
|
1090
|
-
children:
|
|
1090
|
+
children: u.promptText
|
|
1091
1091
|
}
|
|
1092
1092
|
)
|
|
1093
1093
|
] })
|
|
1094
1094
|
}
|
|
1095
1095
|
)
|
|
1096
1096
|
},
|
|
1097
|
-
A +
|
|
1097
|
+
A + u.id
|
|
1098
1098
|
)) })
|
|
1099
1099
|
}
|
|
1100
1100
|
) })
|
|
@@ -1319,31 +1319,31 @@ const xs = /* @__PURE__ */ n(({
|
|
|
1319
1319
|
previousRatio: 0,
|
|
1320
1320
|
threshold: 0.9,
|
|
1321
1321
|
maxSize: 0
|
|
1322
|
-
}, [p, m] = Q(0), s = bt(), [v, g] = Q(l), T = de((
|
|
1322
|
+
}, [p, m] = Q(0), s = bt(), [v, g] = Q(l), T = de((u) => u.session), E = de((u) => u.statistics), D = de((u) => u.connectionStatus);
|
|
1323
1323
|
le(() => {
|
|
1324
1324
|
g(l);
|
|
1325
1325
|
}, [T]), le(() => {
|
|
1326
|
-
const
|
|
1327
|
-
|
|
1326
|
+
const u = E == null ? void 0 : E.sessionInformation;
|
|
1327
|
+
u && g(u);
|
|
1328
1328
|
}, [E]), le(() => {
|
|
1329
|
-
E && m(E.buffer.reduce((
|
|
1329
|
+
E && m(E.buffer.reduce((u, A) => u + A.length, 0));
|
|
1330
1330
|
}, [E]);
|
|
1331
|
-
const S = ((E == null ? void 0 : E.buffer.length) ?? 0) > 1, w = ((E == null ? void 0 : E.unknonwCount) ?? 0) + ((E == null ? void 0 : E.unparsedCount) ?? 0), k = w > 0,
|
|
1332
|
-
if (
|
|
1333
|
-
return `${
|
|
1331
|
+
const S = ((E == null ? void 0 : E.buffer.length) ?? 0) > 1, w = ((E == null ? void 0 : E.unknonwCount) ?? 0) + ((E == null ? void 0 : E.unparsedCount) ?? 0), k = w > 0, d = /* @__PURE__ */ n((u) => {
|
|
1332
|
+
if (u < 60)
|
|
1333
|
+
return `${u.toFixed(2)}s`;
|
|
1334
1334
|
{
|
|
1335
|
-
const A = Math.floor(
|
|
1335
|
+
const A = Math.floor(u / 60), c = u % 60;
|
|
1336
1336
|
return `${A}.${Math.floor(c / 6)}min`;
|
|
1337
1337
|
}
|
|
1338
|
-
}, "formatElapsed"), x = ye((
|
|
1339
|
-
const
|
|
1340
|
-
return
|
|
1341
|
-
}, "getPerSecondColor"), b = ye((
|
|
1342
|
-
const A = 900 - Math.min(Math.round(1e3 * Math.max(
|
|
1338
|
+
}, "formatElapsed"), x = ye((u) => u < 1024 ? `${u.toFixed(1)}B` : u < 1024 * 1024 ? `${(u / 1024).toFixed(1)}KB` : `${(u / (1024 * 1024)).toFixed(1)}MB`, [E]), y = /* @__PURE__ */ n(() => {
|
|
1339
|
+
const u = (E == null ? void 0 : E.tokensPerSecond) ?? 0, A = 1e3 / 50;
|
|
1340
|
+
return u > A ? s.palette.warning.dark : u > A * 0.8 ? s.palette.secondary.light : u > A * 0.6 ? s.palette.secondary.dark : u > A * 0.4 ? s.palette.primary.dark : u > A * 0.2 ? s.palette.text.primary : s.palette.text.secondary;
|
|
1341
|
+
}, "getPerSecondColor"), b = ye((u) => {
|
|
1342
|
+
const A = 900 - Math.min(Math.round(1e3 * Math.max(u, 0.2) / 100), 9) * 100 + 100;
|
|
1343
1343
|
return Hd[A];
|
|
1344
1344
|
}, [v]), h = e ? { fontFamily: Jo, fontSize: "0.7rem" } : { fontSize: "0.7rem" }, z = /* @__PURE__ */ n(() => {
|
|
1345
1345
|
if (!a) return null;
|
|
1346
|
-
const { turnOpen:
|
|
1346
|
+
const { turnOpen: u, suspended: A, suspending: c, onPause: _, onCancel: j } = a, N = A, B = u || A;
|
|
1347
1347
|
return /* @__PURE__ */ t(He, { title: N ? "Cancelar — encerra o turno em execução" : c ? "Pausando…" : "Para continuar envie uma nova mensagem; o agente vai seguir do ponto que parou", placement: "top", arrow: !0, children: /* @__PURE__ */ t(R, { component: "span", sx: { display: "inline-flex" }, children: /* @__PURE__ */ t(
|
|
1348
1348
|
Je,
|
|
1349
1349
|
{
|
|
@@ -1396,7 +1396,7 @@ const xs = /* @__PURE__ */ n(({
|
|
|
1396
1396
|
{
|
|
1397
1397
|
variant: "caption",
|
|
1398
1398
|
sx: { color: "text.secondary", ...h },
|
|
1399
|
-
children:
|
|
1399
|
+
children: d((E == null ? void 0 : E.elapsed) ?? 0)
|
|
1400
1400
|
}
|
|
1401
1401
|
),
|
|
1402
1402
|
/* @__PURE__ */ t(R, { sx: { width: "5px" } })
|
|
@@ -1437,8 +1437,8 @@ const xs = /* @__PURE__ */ n(({
|
|
|
1437
1437
|
] })
|
|
1438
1438
|
] }),
|
|
1439
1439
|
(() => {
|
|
1440
|
-
const
|
|
1441
|
-
return !!v && v.size > 0 &&
|
|
1440
|
+
const u = v ? Math.round(v.ratio * 100) : 0;
|
|
1441
|
+
return !!v && v.size > 0 && u > 0 ? e ? (
|
|
1442
1442
|
// v2 compact — replace the wide progress bar with
|
|
1443
1443
|
// a small badge that surfaces the integer % and
|
|
1444
1444
|
// exposes the full numbers via tooltip.
|
|
@@ -1503,14 +1503,14 @@ function ju(e) {
|
|
|
1503
1503
|
n(ju, "statusColor$1");
|
|
1504
1504
|
const Lu = /* @__PURE__ */ n(({}) => {
|
|
1505
1505
|
var k;
|
|
1506
|
-
const [e, a] = Q(!0), l = de((
|
|
1506
|
+
const [e, a] = Q(!0), l = de((d) => d.lastToolEvent), { agentGatewayService: p } = Ze();
|
|
1507
1507
|
if ((l == null ? void 0 : l.eventName) !== "todolistUpdated" || l != null && l.subAgentId || l.eventData == "" && !l.subAgentId)
|
|
1508
1508
|
return null;
|
|
1509
1509
|
const m = JSON.parse(l.eventData), s = p.getCurrentInteraction();
|
|
1510
1510
|
p && s && (s.todoList = m);
|
|
1511
|
-
const v = m.items.filter((
|
|
1511
|
+
const v = m.items.filter((d) => d.status === "completed").length, g = m.items.length, T = g > 0 ? v / g * 100 : 0, D = `${v > 0 ? `${v} de ${g} completos` : "Iniciando..."} - ${T.toFixed(0)}%`;
|
|
1512
1512
|
if (g == 0) return null;
|
|
1513
|
-
const S = m.currentWorkingItemKey ? m.items.find((
|
|
1513
|
+
const S = m.currentWorkingItemKey ? m.items.find((d) => d.key === m.currentWorkingItemKey) : null, w = S ? `${S.label}${S.detail ? `: ${S.detail}` : ""}` : "";
|
|
1514
1514
|
return /* @__PURE__ */ t(
|
|
1515
1515
|
R,
|
|
1516
1516
|
{
|
|
@@ -1553,7 +1553,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
|
|
|
1553
1553
|
/* @__PURE__ */ t(Wt, { size: "small", children: e ? /* @__PURE__ */ t(_r, { fontSize: "small", sx: { rotate: "90deg" } }) : /* @__PURE__ */ t(_r, { fontSize: "small", sx: { rotate: "-90deg" } }) })
|
|
1554
1554
|
] }) })
|
|
1555
1555
|
] }) }) }),
|
|
1556
|
-
/* @__PURE__ */ t(Tr, { in: e, sx: { maxHeight: "150px", overflow: "auto", display: "inline-flex" }, children: /* @__PURE__ */ t(it, { gap: 1, sx: { display: "inline-flex" }, children: m.items.map((
|
|
1556
|
+
/* @__PURE__ */ t(Tr, { in: e, sx: { maxHeight: "150px", overflow: "auto", display: "inline-flex" }, children: /* @__PURE__ */ t(it, { gap: 1, sx: { display: "inline-flex" }, children: m.items.map((d) => /* @__PURE__ */ I(
|
|
1557
1557
|
R,
|
|
1558
1558
|
{
|
|
1559
1559
|
sx: {
|
|
@@ -1561,17 +1561,17 @@ const Lu = /* @__PURE__ */ n(({}) => {
|
|
|
1561
1561
|
alignItems: "flex-start",
|
|
1562
1562
|
gap: 0.75,
|
|
1563
1563
|
py: 0.4,
|
|
1564
|
-
opacity:
|
|
1564
|
+
opacity: d.status === "completed" ? 0.5 : 1
|
|
1565
1565
|
},
|
|
1566
1566
|
children: [
|
|
1567
|
-
/* @__PURE__ */ t(R, { sx: { mt: "1px", flexShrink: 0, color: ju(
|
|
1567
|
+
/* @__PURE__ */ t(R, { sx: { mt: "1px", flexShrink: 0, color: ju(d.status) }, children: /* @__PURE__ */ t(Fu, { status: d.status }) }),
|
|
1568
1568
|
/* @__PURE__ */ I(R, { children: [
|
|
1569
|
-
/* @__PURE__ */ t(Z, { variant: "caption", sx: { display: "block", fontSize: "0.78rem", lineHeight: 1.3, textDecoration:
|
|
1570
|
-
|
|
1569
|
+
/* @__PURE__ */ t(Z, { variant: "caption", sx: { display: "block", fontSize: "0.78rem", lineHeight: 1.3, textDecoration: d.status === "completed" ? "line-through" : "none" }, children: d.label }),
|
|
1570
|
+
d.detail && /* @__PURE__ */ t(Z, { variant: "caption", sx: { display: "block", fontSize: "0.7rem", color: "text.secondary", lineHeight: 1.3 }, children: d.detail })
|
|
1571
1571
|
] })
|
|
1572
1572
|
]
|
|
1573
1573
|
},
|
|
1574
|
-
|
|
1574
|
+
d.key
|
|
1575
1575
|
)) }) })
|
|
1576
1576
|
] })
|
|
1577
1577
|
}
|
|
@@ -1600,7 +1600,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
|
|
|
1600
1600
|
/* @__PURE__ */ I(_e, { spacing: 0.5, sx: e ? { maxWidth: 250, flex: "0 0 250px", minWidth: 0 } : void 0, children: [
|
|
1601
1601
|
/* @__PURE__ */ t(Ee, { variant: "h6", width: "100%", textAlign: "center", children: "Fast models" }),
|
|
1602
1602
|
/* @__PURE__ */ t(Ro, {}),
|
|
1603
|
-
di.map(({ id: w, config: k, vendor:
|
|
1603
|
+
di.map(({ id: w, config: k, vendor: d }) => {
|
|
1604
1604
|
const x = w === l, y = k.icon;
|
|
1605
1605
|
return k.speed !== "Fast" ? null : /* @__PURE__ */ I(
|
|
1606
1606
|
se,
|
|
@@ -1654,7 +1654,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
|
|
|
1654
1654
|
/* @__PURE__ */ t(
|
|
1655
1655
|
ln,
|
|
1656
1656
|
{
|
|
1657
|
-
label:
|
|
1657
|
+
label: d,
|
|
1658
1658
|
size: "small",
|
|
1659
1659
|
variant: "filled",
|
|
1660
1660
|
sx: { height: 18, fontSize: "0.6rem", "& .MuiChip-label": { px: 0.8 }, bgcolor: "action.selected" }
|
|
@@ -1671,7 +1671,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
|
|
|
1671
1671
|
/* @__PURE__ */ I(_e, { spacing: 0.5, sx: e ? { maxWidth: 250, flex: "0 0 250px", minWidth: 0 } : void 0, children: [
|
|
1672
1672
|
/* @__PURE__ */ t(Ee, { variant: "h6", width: "100%", textAlign: "center", children: "High Precision" }),
|
|
1673
1673
|
/* @__PURE__ */ t(Ro, {}),
|
|
1674
|
-
di.map(({ id: w, config: k, vendor:
|
|
1674
|
+
di.map(({ id: w, config: k, vendor: d }) => {
|
|
1675
1675
|
const x = w === l, y = k.icon;
|
|
1676
1676
|
return k.quality !== "Highest" ? null : /* @__PURE__ */ I(
|
|
1677
1677
|
se,
|
|
@@ -1725,7 +1725,7 @@ const Lu = /* @__PURE__ */ n(({}) => {
|
|
|
1725
1725
|
/* @__PURE__ */ t(
|
|
1726
1726
|
ln,
|
|
1727
1727
|
{
|
|
1728
|
-
label:
|
|
1728
|
+
label: d,
|
|
1729
1729
|
size: "small",
|
|
1730
1730
|
variant: "filled",
|
|
1731
1731
|
sx: { height: 18, fontSize: "0.6rem", "& .MuiChip-label": { px: 0.8 }, bgcolor: "action.selected" }
|
|
@@ -1772,11 +1772,11 @@ const Lu = /* @__PURE__ */ n(({}) => {
|
|
|
1772
1772
|
] });
|
|
1773
1773
|
}, "ModelSelector"), $u = /* @__PURE__ */ n(() => null, "PromptEditorDialog"), Bu = /* @__PURE__ */ n(() => null, "ChatSettings"), Wu = /* @__PURE__ */ n(({ forceMessage: e, onHeightChange: a }) => {
|
|
1774
1774
|
var st;
|
|
1775
|
-
const [l, p] = Q(!1), m = wt(), s = Ar(m.breakpoints.down("sm")), v = Ar("(max-width: 900px)"), [g, T] = Q(!1), [E, D] = Q(!1), [S, w] = Q(!1), [k,
|
|
1775
|
+
const [l, p] = Q(!1), m = wt(), s = Ar(m.breakpoints.down("sm")), v = Ar("(max-width: 900px)"), [g, T] = Q(!1), [E, D] = Q(!1), [S, w] = Q(!1), [k, d] = Q(!1), [x, y] = Q(0), b = ue(null), [h, z] = Gi(b, (/* @__PURE__ */ new Date()).getTime().toString());
|
|
1776
1776
|
le(() => {
|
|
1777
1777
|
a && a(z);
|
|
1778
1778
|
}, [z]);
|
|
1779
|
-
const [
|
|
1779
|
+
const [u, A] = Q(0), c = ue(null), { agentGatewayService: _, showPromptHistory: j, showStatistics: N, showModelSelector: B, showSessionInfo: J, showTaskList: q } = Ze(), [ee, K] = Q(null), { notificationPort: U } = Ze(), ne = U.pushNotification.bind(U), Se = de((xe) => xe.turnOpen), Re = de((xe) => xe.connectionStatus), Ue = de((xe) => xe.session), G = de((xe) => xe.lastToolEvent);
|
|
1780
1780
|
let $ = !1;
|
|
1781
1781
|
(G == null ? void 0 : G.eventName) === "todolistUpdated" && (G == null ? void 0 : G.eventData) !== "" && ($ = !0);
|
|
1782
1782
|
const [me, Pe] = Q(!1);
|
|
@@ -1800,19 +1800,19 @@ const Lu = /* @__PURE__ */ n(({}) => {
|
|
|
1800
1800
|
return;
|
|
1801
1801
|
}
|
|
1802
1802
|
if (je && !et) {
|
|
1803
|
-
|
|
1804
|
-
|
|
1803
|
+
d(!0), setTimeout(() => {
|
|
1804
|
+
d(!1);
|
|
1805
1805
|
}, 4e3);
|
|
1806
1806
|
return;
|
|
1807
1807
|
}
|
|
1808
1808
|
let kt = xe ?? ((lt = c.current) == null ? void 0 : lt.value) ?? "";
|
|
1809
|
-
c.current && (c.current.value = ""), S && (w(!1), kt.trim() == "" && (kt = "Continue, por favor")), A(
|
|
1809
|
+
c.current && (c.current.value = ""), S && (w(!1), kt.trim() == "" && (kt = "Continue, por favor")), A(u + 1), T(() => !0), Ue || ne({
|
|
1810
1810
|
message: "There is no session to send a message",
|
|
1811
1811
|
type: "error"
|
|
1812
1812
|
}), _.sendMessage(new Lr(kt, "text/plain")).catch((ft) => {
|
|
1813
1813
|
console.error("Prompt send", ft);
|
|
1814
1814
|
}).finally(() => {
|
|
1815
|
-
T(() => !1),
|
|
1815
|
+
T(() => !1), d(!1), y((ft) => ft + 1);
|
|
1816
1816
|
});
|
|
1817
1817
|
}, "handleSend");
|
|
1818
1818
|
le(() => {
|
|
@@ -2082,105 +2082,105 @@ function qu() {
|
|
|
2082
2082
|
})(Hu, (l) => (() => {
|
|
2083
2083
|
var p = { 165(g, T, E) {
|
|
2084
2084
|
const D = E(877), S = {};
|
|
2085
|
-
for (const
|
|
2085
|
+
for (const d of Object.keys(D)) S[D[d]] = d;
|
|
2086
2086
|
const w = { rgb: { channels: 3, labels: "rgb" }, hsl: { channels: 3, labels: "hsl" }, hsv: { channels: 3, labels: "hsv" }, hwb: { channels: 3, labels: "hwb" }, cmyk: { channels: 4, labels: "cmyk" }, xyz: { channels: 3, labels: "xyz" }, lab: { channels: 3, labels: "lab" }, lch: { channels: 3, labels: "lch" }, hex: { channels: 1, labels: ["hex"] }, keyword: { channels: 1, labels: ["keyword"] }, ansi16: { channels: 1, labels: ["ansi16"] }, ansi256: { channels: 1, labels: ["ansi256"] }, hcg: { channels: 3, labels: ["h", "c", "g"] }, apple: { channels: 3, labels: ["r16", "g16", "b16"] }, gray: { channels: 1, labels: ["gray"] } };
|
|
2087
2087
|
g.exports = w;
|
|
2088
|
-
for (const
|
|
2089
|
-
if (!("channels" in w[
|
|
2090
|
-
if (!("labels" in w[
|
|
2091
|
-
if (w[
|
|
2092
|
-
const { channels: x, labels: y } = w[
|
|
2093
|
-
delete w[
|
|
2088
|
+
for (const d of Object.keys(w)) {
|
|
2089
|
+
if (!("channels" in w[d])) throw new Error("missing channels property: " + d);
|
|
2090
|
+
if (!("labels" in w[d])) throw new Error("missing channel labels property: " + d);
|
|
2091
|
+
if (w[d].labels.length !== w[d].channels) throw new Error("channel and label counts mismatch: " + d);
|
|
2092
|
+
const { channels: x, labels: y } = w[d];
|
|
2093
|
+
delete w[d].channels, delete w[d].labels, Object.defineProperty(w[d], "channels", { value: x }), Object.defineProperty(w[d], "labels", { value: y });
|
|
2094
2094
|
}
|
|
2095
|
-
function k(
|
|
2096
|
-
return (
|
|
2095
|
+
function k(d, x) {
|
|
2096
|
+
return (d[0] - x[0]) ** 2 + (d[1] - x[1]) ** 2 + (d[2] - x[2]) ** 2;
|
|
2097
2097
|
}
|
|
2098
|
-
n(k, "s"), w.rgb.hsl = function(
|
|
2099
|
-
const x =
|
|
2098
|
+
n(k, "s"), w.rgb.hsl = function(d) {
|
|
2099
|
+
const x = d[0] / 255, y = d[1] / 255, b = d[2] / 255, h = Math.min(x, y, b), z = Math.max(x, y, b), u = z - h;
|
|
2100
2100
|
let A, c;
|
|
2101
|
-
z === h ? A = 0 : x === z ? A = (y - b) /
|
|
2101
|
+
z === h ? A = 0 : x === z ? A = (y - b) / u : y === z ? A = 2 + (b - x) / u : b === z && (A = 4 + (x - y) / u), A = Math.min(60 * A, 360), A < 0 && (A += 360);
|
|
2102
2102
|
const _ = (h + z) / 2;
|
|
2103
|
-
return c = z === h ? 0 : _ <= 0.5 ?
|
|
2104
|
-
}, w.rgb.hsv = function(
|
|
2103
|
+
return c = z === h ? 0 : _ <= 0.5 ? u / (z + h) : u / (2 - z - h), [A, 100 * c, 100 * _];
|
|
2104
|
+
}, w.rgb.hsv = function(d) {
|
|
2105
2105
|
let x, y, b, h, z;
|
|
2106
|
-
const
|
|
2106
|
+
const u = d[0] / 255, A = d[1] / 255, c = d[2] / 255, _ = Math.max(u, A, c), j = _ - Math.min(u, A, c), N = /* @__PURE__ */ n(function(B) {
|
|
2107
2107
|
return (_ - B) / 6 / j + 0.5;
|
|
2108
2108
|
}, "b");
|
|
2109
|
-
return j === 0 ? (h = 0, z = 0) : (z = j / _, x = N(
|
|
2110
|
-
}, w.rgb.hwb = function(
|
|
2111
|
-
const x =
|
|
2112
|
-
let b =
|
|
2113
|
-
const h = w.rgb.hsl(
|
|
2109
|
+
return j === 0 ? (h = 0, z = 0) : (z = j / _, x = N(u), y = N(A), b = N(c), u === _ ? h = b - y : A === _ ? h = 0.3333333333333333 + x - b : c === _ && (h = 0.6666666666666666 + y - x), h < 0 ? h += 1 : h > 1 && (h -= 1)), [360 * h, 100 * z, 100 * _];
|
|
2110
|
+
}, w.rgb.hwb = function(d) {
|
|
2111
|
+
const x = d[0], y = d[1];
|
|
2112
|
+
let b = d[2];
|
|
2113
|
+
const h = w.rgb.hsl(d)[0], z = 1 / 255 * Math.min(x, Math.min(y, b));
|
|
2114
2114
|
return b = 1 - 0.00392156862745098 * Math.max(x, Math.max(y, b)), [h, 100 * z, 100 * b];
|
|
2115
|
-
}, w.rgb.cmyk = function(
|
|
2116
|
-
const x =
|
|
2115
|
+
}, w.rgb.cmyk = function(d) {
|
|
2116
|
+
const x = d[0] / 255, y = d[1] / 255, b = d[2] / 255, h = Math.min(1 - x, 1 - y, 1 - b);
|
|
2117
2117
|
return [100 * ((1 - x - h) / (1 - h) || 0), 100 * ((1 - y - h) / (1 - h) || 0), 100 * ((1 - b - h) / (1 - h) || 0), 100 * h];
|
|
2118
|
-
}, w.rgb.keyword = function(
|
|
2119
|
-
const x = S[
|
|
2118
|
+
}, w.rgb.keyword = function(d) {
|
|
2119
|
+
const x = S[d];
|
|
2120
2120
|
if (x) return x;
|
|
2121
2121
|
let y, b = 1 / 0;
|
|
2122
2122
|
for (const h of Object.keys(D)) {
|
|
2123
|
-
const z = k(
|
|
2123
|
+
const z = k(d, D[h]);
|
|
2124
2124
|
z < b && (b = z, y = h);
|
|
2125
2125
|
}
|
|
2126
2126
|
return y;
|
|
2127
|
-
}, w.keyword.rgb = function(
|
|
2128
|
-
return D[
|
|
2129
|
-
}, w.rgb.xyz = function(
|
|
2130
|
-
let x =
|
|
2127
|
+
}, w.keyword.rgb = function(d) {
|
|
2128
|
+
return D[d];
|
|
2129
|
+
}, w.rgb.xyz = function(d) {
|
|
2130
|
+
let x = d[0] / 255, y = d[1] / 255, b = d[2] / 255;
|
|
2131
2131
|
return x = x > 0.04045 ? ((x + 0.055) / 1.055) ** 2.4 : x / 12.92, y = y > 0.04045 ? ((y + 0.055) / 1.055) ** 2.4 : y / 12.92, b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92, [100 * (0.4124 * x + 0.3576 * y + 0.1805 * b), 100 * (0.2126 * x + 0.7152 * y + 0.0722 * b), 100 * (0.0193 * x + 0.1192 * y + 0.9505 * b)];
|
|
2132
|
-
}, w.rgb.lab = function(
|
|
2133
|
-
const x = w.rgb.xyz(
|
|
2132
|
+
}, w.rgb.lab = function(d) {
|
|
2133
|
+
const x = w.rgb.xyz(d);
|
|
2134
2134
|
let y = x[0], b = x[1], h = x[2];
|
|
2135
2135
|
return y /= 95.047, b /= 100, h /= 108.883, y = y > 8856e-6 ? y ** 0.3333333333333333 : 7.787 * y + 0.13793103448275862, b = b > 8856e-6 ? b ** 0.3333333333333333 : 7.787 * b + 0.13793103448275862, h = h > 8856e-6 ? h ** 0.3333333333333333 : 7.787 * h + 0.13793103448275862, [116 * b - 16, 500 * (y - b), 200 * (b - h)];
|
|
2136
|
-
}, w.hsl.rgb = function(
|
|
2137
|
-
const x =
|
|
2138
|
-
let h, z,
|
|
2139
|
-
if (y === 0) return
|
|
2136
|
+
}, w.hsl.rgb = function(d) {
|
|
2137
|
+
const x = d[0] / 360, y = d[1] / 100, b = d[2] / 100;
|
|
2138
|
+
let h, z, u;
|
|
2139
|
+
if (y === 0) return u = 255 * b, [u, u, u];
|
|
2140
2140
|
h = b < 0.5 ? b * (1 + y) : b + y - b * y;
|
|
2141
2141
|
const A = 2 * b - h, c = [0, 0, 0];
|
|
2142
|
-
for (let _ = 0; _ < 3; _++) z = x + 0.3333333333333333 * -(_ - 1), z < 0 && z++, z > 1 && z--,
|
|
2142
|
+
for (let _ = 0; _ < 3; _++) z = x + 0.3333333333333333 * -(_ - 1), z < 0 && z++, z > 1 && z--, u = 6 * z < 1 ? A + 6 * (h - A) * z : 2 * z < 1 ? h : 3 * z < 2 ? A + (h - A) * (0.6666666666666666 - z) * 6 : A, c[_] = 255 * u;
|
|
2143
2143
|
return c;
|
|
2144
|
-
}, w.hsl.hsv = function(
|
|
2145
|
-
const x =
|
|
2146
|
-
let y =
|
|
2144
|
+
}, w.hsl.hsv = function(d) {
|
|
2145
|
+
const x = d[0];
|
|
2146
|
+
let y = d[1] / 100, b = d[2] / 100, h = y;
|
|
2147
2147
|
const z = Math.max(b, 0.01);
|
|
2148
2148
|
return b *= 2, y *= b <= 1 ? b : 2 - b, h *= z <= 1 ? z : 2 - z, [x, 100 * (b === 0 ? 2 * h / (z + h) : 2 * y / (b + y)), 100 * ((b + y) / 2)];
|
|
2149
|
-
}, w.hsv.rgb = function(
|
|
2150
|
-
const x =
|
|
2151
|
-
let b =
|
|
2152
|
-
const h = Math.floor(x) % 6, z = x - Math.floor(x),
|
|
2149
|
+
}, w.hsv.rgb = function(d) {
|
|
2150
|
+
const x = d[0] / 60, y = d[1] / 100;
|
|
2151
|
+
let b = d[2] / 100;
|
|
2152
|
+
const h = Math.floor(x) % 6, z = x - Math.floor(x), u = 255 * b * (1 - y), A = 255 * b * (1 - y * z), c = 255 * b * (1 - y * (1 - z));
|
|
2153
2153
|
switch (b *= 255, h) {
|
|
2154
2154
|
case 0:
|
|
2155
|
-
return [b, c,
|
|
2155
|
+
return [b, c, u];
|
|
2156
2156
|
case 1:
|
|
2157
|
-
return [A, b,
|
|
2157
|
+
return [A, b, u];
|
|
2158
2158
|
case 2:
|
|
2159
|
-
return [
|
|
2159
|
+
return [u, b, c];
|
|
2160
2160
|
case 3:
|
|
2161
|
-
return [
|
|
2161
|
+
return [u, A, b];
|
|
2162
2162
|
case 4:
|
|
2163
|
-
return [c,
|
|
2163
|
+
return [c, u, b];
|
|
2164
2164
|
case 5:
|
|
2165
|
-
return [b,
|
|
2165
|
+
return [b, u, A];
|
|
2166
2166
|
}
|
|
2167
|
-
}, w.hsv.hsl = function(
|
|
2168
|
-
const x =
|
|
2169
|
-
let z,
|
|
2170
|
-
|
|
2167
|
+
}, w.hsv.hsl = function(d) {
|
|
2168
|
+
const x = d[0], y = d[1] / 100, b = d[2] / 100, h = Math.max(b, 0.01);
|
|
2169
|
+
let z, u;
|
|
2170
|
+
u = (2 - y) * b;
|
|
2171
2171
|
const A = (2 - y) * h;
|
|
2172
|
-
return z = y * h, z /= A <= 1 ? A : 2 - A, z = z || 0,
|
|
2173
|
-
}, w.hwb.rgb = function(
|
|
2174
|
-
const x =
|
|
2175
|
-
let y =
|
|
2172
|
+
return z = y * h, z /= A <= 1 ? A : 2 - A, z = z || 0, u /= 2, [x, 100 * z, 100 * u];
|
|
2173
|
+
}, w.hwb.rgb = function(d) {
|
|
2174
|
+
const x = d[0] / 360;
|
|
2175
|
+
let y = d[1] / 100, b = d[2] / 100;
|
|
2176
2176
|
const h = y + b;
|
|
2177
2177
|
let z;
|
|
2178
2178
|
h > 1 && (y /= h, b /= h);
|
|
2179
|
-
const
|
|
2180
|
-
z = 6 * x -
|
|
2179
|
+
const u = Math.floor(6 * x), A = 1 - b;
|
|
2180
|
+
z = 6 * x - u, 1 & u && (z = 1 - z);
|
|
2181
2181
|
const c = y + z * (A - y);
|
|
2182
2182
|
let _, j, N;
|
|
2183
|
-
switch (
|
|
2183
|
+
switch (u) {
|
|
2184
2184
|
default:
|
|
2185
2185
|
case 6:
|
|
2186
2186
|
case 0:
|
|
@@ -2202,145 +2202,145 @@ function qu() {
|
|
|
2202
2202
|
_ = A, j = y, N = c;
|
|
2203
2203
|
}
|
|
2204
2204
|
return [255 * _, 255 * j, 255 * N];
|
|
2205
|
-
}, w.cmyk.rgb = function(
|
|
2206
|
-
const x =
|
|
2205
|
+
}, w.cmyk.rgb = function(d) {
|
|
2206
|
+
const x = d[0] / 100, y = d[1] / 100, b = d[2] / 100, h = d[3] / 100;
|
|
2207
2207
|
return [255 * (1 - Math.min(1, x * (1 - h) + h)), 255 * (1 - Math.min(1, y * (1 - h) + h)), 255 * (1 - Math.min(1, b * (1 - h) + h))];
|
|
2208
|
-
}, w.xyz.rgb = function(
|
|
2209
|
-
const x =
|
|
2210
|
-
let h, z,
|
|
2211
|
-
return h = 3.2406 * x + -1.5372 * y + -0.4986 * b, z = -0.9689 * x + 1.8758 * y + 0.0415 * b,
|
|
2212
|
-
}, w.xyz.lab = function(
|
|
2213
|
-
let x =
|
|
2208
|
+
}, w.xyz.rgb = function(d) {
|
|
2209
|
+
const x = d[0] / 100, y = d[1] / 100, b = d[2] / 100;
|
|
2210
|
+
let h, z, u;
|
|
2211
|
+
return h = 3.2406 * x + -1.5372 * y + -0.4986 * b, z = -0.9689 * x + 1.8758 * y + 0.0415 * b, u = 0.0557 * x + -0.204 * y + 1.057 * b, h = h > 31308e-7 ? 1.055 * h ** 0.4166666666666667 - 0.055 : 12.92 * h, z = z > 31308e-7 ? 1.055 * z ** 0.4166666666666667 - 0.055 : 12.92 * z, u = u > 31308e-7 ? 1.055 * u ** 0.4166666666666667 - 0.055 : 12.92 * u, h = Math.min(Math.max(0, h), 1), z = Math.min(Math.max(0, z), 1), u = Math.min(Math.max(0, u), 1), [255 * h, 255 * z, 255 * u];
|
|
2212
|
+
}, w.xyz.lab = function(d) {
|
|
2213
|
+
let x = d[0], y = d[1], b = d[2];
|
|
2214
2214
|
return x /= 95.047, y /= 100, b /= 108.883, x = x > 8856e-6 ? x ** 0.3333333333333333 : 7.787 * x + 0.13793103448275862, y = y > 8856e-6 ? y ** 0.3333333333333333 : 7.787 * y + 0.13793103448275862, b = b > 8856e-6 ? b ** 0.3333333333333333 : 7.787 * b + 0.13793103448275862, [116 * y - 16, 500 * (x - y), 200 * (y - b)];
|
|
2215
|
-
}, w.lab.xyz = function(
|
|
2215
|
+
}, w.lab.xyz = function(d) {
|
|
2216
2216
|
let x, y, b;
|
|
2217
|
-
y = (
|
|
2218
|
-
const h = y ** 3, z = x ** 3,
|
|
2219
|
-
return y = h > 8856e-6 ? h : (y - 0.13793103448275862) / 7.787, x = z > 8856e-6 ? z : (x - 0.13793103448275862) / 7.787, b =
|
|
2220
|
-
}, w.lab.lch = function(
|
|
2221
|
-
const x =
|
|
2217
|
+
y = (d[0] + 16) / 116, x = d[1] / 500 + y, b = y - d[2] / 200;
|
|
2218
|
+
const h = y ** 3, z = x ** 3, u = b ** 3;
|
|
2219
|
+
return y = h > 8856e-6 ? h : (y - 0.13793103448275862) / 7.787, x = z > 8856e-6 ? z : (x - 0.13793103448275862) / 7.787, b = u > 8856e-6 ? u : (b - 0.13793103448275862) / 7.787, x *= 95.047, y *= 100, b *= 108.883, [x, y, b];
|
|
2220
|
+
}, w.lab.lch = function(d) {
|
|
2221
|
+
const x = d[0], y = d[1], b = d[2];
|
|
2222
2222
|
let h;
|
|
2223
2223
|
return h = 360 * Math.atan2(b, y) / 2 / Math.PI, h < 0 && (h += 360), [x, Math.sqrt(y * y + b * b), h];
|
|
2224
|
-
}, w.lch.lab = function(
|
|
2225
|
-
const x =
|
|
2224
|
+
}, w.lch.lab = function(d) {
|
|
2225
|
+
const x = d[0], y = d[1], b = d[2] / 360 * 2 * Math.PI;
|
|
2226
2226
|
return [x, y * Math.cos(b), y * Math.sin(b)];
|
|
2227
|
-
}, w.rgb.ansi16 = function(
|
|
2228
|
-
const [y, b, h] =
|
|
2229
|
-
let z = x === null ? w.rgb.hsv(
|
|
2227
|
+
}, w.rgb.ansi16 = function(d, x = null) {
|
|
2228
|
+
const [y, b, h] = d;
|
|
2229
|
+
let z = x === null ? w.rgb.hsv(d)[2] : x;
|
|
2230
2230
|
if (z = Math.round(z / 50), z === 0) return 30;
|
|
2231
|
-
let
|
|
2232
|
-
return z === 2 && (
|
|
2233
|
-
}, w.hsv.ansi16 = function(
|
|
2234
|
-
return w.rgb.ansi16(w.hsv.rgb(
|
|
2235
|
-
}, w.rgb.ansi256 = function(
|
|
2236
|
-
const x =
|
|
2231
|
+
let u = 30 + (Math.round(h / 255) << 2 | Math.round(b / 255) << 1 | Math.round(y / 255));
|
|
2232
|
+
return z === 2 && (u += 60), u;
|
|
2233
|
+
}, w.hsv.ansi16 = function(d) {
|
|
2234
|
+
return w.rgb.ansi16(w.hsv.rgb(d), d[2]);
|
|
2235
|
+
}, w.rgb.ansi256 = function(d) {
|
|
2236
|
+
const x = d[0], y = d[1], b = d[2];
|
|
2237
2237
|
return x === y && y === b ? x < 8 ? 16 : x > 248 ? 231 : Math.round((x - 8) / 247 * 24) + 232 : 16 + 36 * Math.round(x / 255 * 5) + 6 * Math.round(y / 255 * 5) + Math.round(b / 255 * 5);
|
|
2238
|
-
}, w.ansi16.rgb = function(
|
|
2239
|
-
let x =
|
|
2240
|
-
if (x === 0 || x === 7) return
|
|
2241
|
-
const y = 0.5 * (1 + ~~(
|
|
2238
|
+
}, w.ansi16.rgb = function(d) {
|
|
2239
|
+
let x = d % 10;
|
|
2240
|
+
if (x === 0 || x === 7) return d > 50 && (x += 3.5), x = x / 10.5 * 255, [x, x, x];
|
|
2241
|
+
const y = 0.5 * (1 + ~~(d > 50));
|
|
2242
2242
|
return [(1 & x) * y * 255, (x >> 1 & 1) * y * 255, (x >> 2 & 1) * y * 255];
|
|
2243
|
-
}, w.ansi256.rgb = function(
|
|
2244
|
-
if (
|
|
2245
|
-
const y = 10 * (
|
|
2243
|
+
}, w.ansi256.rgb = function(d) {
|
|
2244
|
+
if (d >= 232) {
|
|
2245
|
+
const y = 10 * (d - 232) + 8;
|
|
2246
2246
|
return [y, y, y];
|
|
2247
2247
|
}
|
|
2248
2248
|
let x;
|
|
2249
|
-
return
|
|
2250
|
-
}, w.rgb.hex = function(
|
|
2251
|
-
const x = (((255 & Math.round(
|
|
2249
|
+
return d -= 16, [Math.floor(d / 36) / 5 * 255, Math.floor((x = d % 36) / 6) / 5 * 255, x % 6 / 5 * 255];
|
|
2250
|
+
}, w.rgb.hex = function(d) {
|
|
2251
|
+
const x = (((255 & Math.round(d[0])) << 16) + ((255 & Math.round(d[1])) << 8) + (255 & Math.round(d[2]))).toString(16).toUpperCase();
|
|
2252
2252
|
return "000000".substring(x.length) + x;
|
|
2253
|
-
}, w.hex.rgb = function(
|
|
2254
|
-
const x =
|
|
2253
|
+
}, w.hex.rgb = function(d) {
|
|
2254
|
+
const x = d.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
2255
2255
|
if (!x) return [0, 0, 0];
|
|
2256
2256
|
let y = x[0];
|
|
2257
2257
|
x[0].length === 3 && (y = y.split("").map((h) => h + h).join(""));
|
|
2258
2258
|
const b = parseInt(y, 16);
|
|
2259
2259
|
return [b >> 16 & 255, b >> 8 & 255, 255 & b];
|
|
2260
|
-
}, w.rgb.hcg = function(
|
|
2261
|
-
const x =
|
|
2260
|
+
}, w.rgb.hcg = function(d) {
|
|
2261
|
+
const x = d[0] / 255, y = d[1] / 255, b = d[2] / 255, h = Math.max(Math.max(x, y), b), z = Math.min(Math.min(x, y), b), u = h - z;
|
|
2262
2262
|
let A, c;
|
|
2263
|
-
return A =
|
|
2264
|
-
}, w.hsl.hcg = function(
|
|
2265
|
-
const x =
|
|
2263
|
+
return A = u < 1 ? z / (1 - u) : 0, c = u <= 0 ? 0 : h === x ? (y - b) / u % 6 : h === y ? 2 + (b - x) / u : 4 + (x - y) / u, c /= 6, c %= 1, [360 * c, 100 * u, 100 * A];
|
|
2264
|
+
}, w.hsl.hcg = function(d) {
|
|
2265
|
+
const x = d[1] / 100, y = d[2] / 100, b = y < 0.5 ? 2 * x * y : 2 * x * (1 - y);
|
|
2266
2266
|
let h = 0;
|
|
2267
|
-
return b < 1 && (h = (y - 0.5 * b) / (1 - b)), [
|
|
2268
|
-
}, w.hsv.hcg = function(
|
|
2269
|
-
const x =
|
|
2267
|
+
return b < 1 && (h = (y - 0.5 * b) / (1 - b)), [d[0], 100 * b, 100 * h];
|
|
2268
|
+
}, w.hsv.hcg = function(d) {
|
|
2269
|
+
const x = d[1] / 100, y = d[2] / 100, b = x * y;
|
|
2270
2270
|
let h = 0;
|
|
2271
|
-
return b < 1 && (h = (y - b) / (1 - b)), [
|
|
2272
|
-
}, w.hcg.rgb = function(
|
|
2273
|
-
const x =
|
|
2271
|
+
return b < 1 && (h = (y - b) / (1 - b)), [d[0], 100 * b, 100 * h];
|
|
2272
|
+
}, w.hcg.rgb = function(d) {
|
|
2273
|
+
const x = d[0] / 360, y = d[1] / 100, b = d[2] / 100;
|
|
2274
2274
|
if (y === 0) return [255 * b, 255 * b, 255 * b];
|
|
2275
|
-
const h = [0, 0, 0], z = x % 1 * 6,
|
|
2275
|
+
const h = [0, 0, 0], z = x % 1 * 6, u = z % 1, A = 1 - u;
|
|
2276
2276
|
let c = 0;
|
|
2277
2277
|
switch (Math.floor(z)) {
|
|
2278
2278
|
case 0:
|
|
2279
|
-
h[0] = 1, h[1] =
|
|
2279
|
+
h[0] = 1, h[1] = u, h[2] = 0;
|
|
2280
2280
|
break;
|
|
2281
2281
|
case 1:
|
|
2282
2282
|
h[0] = A, h[1] = 1, h[2] = 0;
|
|
2283
2283
|
break;
|
|
2284
2284
|
case 2:
|
|
2285
|
-
h[0] = 0, h[1] = 1, h[2] =
|
|
2285
|
+
h[0] = 0, h[1] = 1, h[2] = u;
|
|
2286
2286
|
break;
|
|
2287
2287
|
case 3:
|
|
2288
2288
|
h[0] = 0, h[1] = A, h[2] = 1;
|
|
2289
2289
|
break;
|
|
2290
2290
|
case 4:
|
|
2291
|
-
h[0] =
|
|
2291
|
+
h[0] = u, h[1] = 0, h[2] = 1;
|
|
2292
2292
|
break;
|
|
2293
2293
|
default:
|
|
2294
2294
|
h[0] = 1, h[1] = 0, h[2] = A;
|
|
2295
2295
|
}
|
|
2296
2296
|
return c = (1 - y) * b, [255 * (y * h[0] + c), 255 * (y * h[1] + c), 255 * (y * h[2] + c)];
|
|
2297
|
-
}, w.hcg.hsv = function(
|
|
2298
|
-
const x =
|
|
2297
|
+
}, w.hcg.hsv = function(d) {
|
|
2298
|
+
const x = d[1] / 100, y = x + d[2] / 100 * (1 - x);
|
|
2299
2299
|
let b = 0;
|
|
2300
|
-
return y > 0 && (b = x / y), [
|
|
2301
|
-
}, w.hcg.hsl = function(
|
|
2302
|
-
const x =
|
|
2300
|
+
return y > 0 && (b = x / y), [d[0], 100 * b, 100 * y];
|
|
2301
|
+
}, w.hcg.hsl = function(d) {
|
|
2302
|
+
const x = d[1] / 100, y = d[2] / 100 * (1 - x) + 0.5 * x;
|
|
2303
2303
|
let b = 0;
|
|
2304
|
-
return y > 0 && y < 0.5 ? b = x / (2 * y) : y >= 0.5 && y < 1 && (b = x / (2 * (1 - y))), [
|
|
2305
|
-
}, w.hcg.hwb = function(
|
|
2306
|
-
const x =
|
|
2307
|
-
return [
|
|
2308
|
-
}, w.hwb.hcg = function(
|
|
2309
|
-
const x =
|
|
2304
|
+
return y > 0 && y < 0.5 ? b = x / (2 * y) : y >= 0.5 && y < 1 && (b = x / (2 * (1 - y))), [d[0], 100 * b, 100 * y];
|
|
2305
|
+
}, w.hcg.hwb = function(d) {
|
|
2306
|
+
const x = d[1] / 100, y = x + d[2] / 100 * (1 - x);
|
|
2307
|
+
return [d[0], 100 * (y - x), 100 * (1 - y)];
|
|
2308
|
+
}, w.hwb.hcg = function(d) {
|
|
2309
|
+
const x = d[1] / 100, y = 1 - d[2] / 100, b = y - x;
|
|
2310
2310
|
let h = 0;
|
|
2311
|
-
return b < 1 && (h = (y - b) / (1 - b)), [
|
|
2312
|
-
}, w.apple.rgb = function(
|
|
2313
|
-
return [
|
|
2314
|
-
}, w.rgb.apple = function(
|
|
2315
|
-
return [
|
|
2316
|
-
}, w.gray.rgb = function(
|
|
2317
|
-
return [
|
|
2318
|
-
}, w.gray.hsl = function(
|
|
2319
|
-
return [0, 0,
|
|
2320
|
-
}, w.gray.hsv = w.gray.hsl, w.gray.hwb = function(
|
|
2321
|
-
return [0, 100,
|
|
2322
|
-
}, w.gray.cmyk = function(
|
|
2323
|
-
return [0, 0, 0,
|
|
2324
|
-
}, w.gray.lab = function(
|
|
2325
|
-
return [
|
|
2326
|
-
}, w.gray.hex = function(
|
|
2327
|
-
const x = 255 & Math.round(
|
|
2311
|
+
return b < 1 && (h = (y - b) / (1 - b)), [d[0], 100 * b, 100 * h];
|
|
2312
|
+
}, w.apple.rgb = function(d) {
|
|
2313
|
+
return [d[0] / 65535 * 255, d[1] / 65535 * 255, d[2] / 65535 * 255];
|
|
2314
|
+
}, w.rgb.apple = function(d) {
|
|
2315
|
+
return [d[0] / 255 * 65535, d[1] / 255 * 65535, d[2] / 255 * 65535];
|
|
2316
|
+
}, w.gray.rgb = function(d) {
|
|
2317
|
+
return [d[0] / 100 * 255, d[0] / 100 * 255, d[0] / 100 * 255];
|
|
2318
|
+
}, w.gray.hsl = function(d) {
|
|
2319
|
+
return [0, 0, d[0]];
|
|
2320
|
+
}, w.gray.hsv = w.gray.hsl, w.gray.hwb = function(d) {
|
|
2321
|
+
return [0, 100, d[0]];
|
|
2322
|
+
}, w.gray.cmyk = function(d) {
|
|
2323
|
+
return [0, 0, 0, d[0]];
|
|
2324
|
+
}, w.gray.lab = function(d) {
|
|
2325
|
+
return [d[0], 0, 0];
|
|
2326
|
+
}, w.gray.hex = function(d) {
|
|
2327
|
+
const x = 255 & Math.round(d[0] / 100 * 255), y = ((x << 16) + (x << 8) + x).toString(16).toUpperCase();
|
|
2328
2328
|
return "000000".substring(y.length) + y;
|
|
2329
|
-
}, w.rgb.gray = function(
|
|
2330
|
-
return [(
|
|
2329
|
+
}, w.rgb.gray = function(d) {
|
|
2330
|
+
return [(d[0] + d[1] + d[2]) / 3 / 255 * 100];
|
|
2331
2331
|
};
|
|
2332
2332
|
}, 880(g, T, E) {
|
|
2333
2333
|
const D = E(165), S = E(985), w = {};
|
|
2334
2334
|
Object.keys(D).forEach((k) => {
|
|
2335
2335
|
w[k] = {}, Object.defineProperty(w[k], "channels", { value: D[k].channels }), Object.defineProperty(w[k], "labels", { value: D[k].labels });
|
|
2336
|
-
const
|
|
2337
|
-
Object.keys(
|
|
2338
|
-
const y =
|
|
2336
|
+
const d = S(k);
|
|
2337
|
+
Object.keys(d).forEach((x) => {
|
|
2338
|
+
const y = d[x];
|
|
2339
2339
|
w[k][x] = (function(b) {
|
|
2340
2340
|
const h = /* @__PURE__ */ n(function(...z) {
|
|
2341
|
-
const
|
|
2342
|
-
if (
|
|
2343
|
-
|
|
2341
|
+
const u = z[0];
|
|
2342
|
+
if (u == null) return u;
|
|
2343
|
+
u.length > 1 && (z = u);
|
|
2344
2344
|
const A = b(z);
|
|
2345
2345
|
if (typeof A == "object") for (let c = A.length, _ = 0; _ < c; _++) A[_] = Math.round(A[_]);
|
|
2346
2346
|
return A;
|
|
@@ -2348,8 +2348,8 @@ function qu() {
|
|
|
2348
2348
|
return "conversion" in b && (h.conversion = b.conversion), h;
|
|
2349
2349
|
})(y), w[k][x].raw = (function(b) {
|
|
2350
2350
|
const h = /* @__PURE__ */ n(function(...z) {
|
|
2351
|
-
const
|
|
2352
|
-
return
|
|
2351
|
+
const u = z[0];
|
|
2352
|
+
return u == null ? u : (u.length > 1 && (z = u), b(z));
|
|
2353
2353
|
}, "t");
|
|
2354
2354
|
return "conversion" in b && (h.conversion = b.conversion), h;
|
|
2355
2355
|
})(y);
|
|
@@ -2357,39 +2357,39 @@ function qu() {
|
|
|
2357
2357
|
}), g.exports = w;
|
|
2358
2358
|
}, 985(g, T, E) {
|
|
2359
2359
|
const D = E(165);
|
|
2360
|
-
function S(
|
|
2360
|
+
function S(d) {
|
|
2361
2361
|
const x = (function() {
|
|
2362
2362
|
const b = {}, h = Object.keys(D);
|
|
2363
|
-
for (let z = h.length,
|
|
2363
|
+
for (let z = h.length, u = 0; u < z; u++) b[h[u]] = { distance: -1, parent: null };
|
|
2364
2364
|
return b;
|
|
2365
|
-
})(), y = [
|
|
2366
|
-
for (x[
|
|
2365
|
+
})(), y = [d];
|
|
2366
|
+
for (x[d].distance = 0; y.length; ) {
|
|
2367
2367
|
const b = y.pop(), h = Object.keys(D[b]);
|
|
2368
|
-
for (let z = h.length,
|
|
2369
|
-
const A = h[
|
|
2368
|
+
for (let z = h.length, u = 0; u < z; u++) {
|
|
2369
|
+
const A = h[u], c = x[A];
|
|
2370
2370
|
c.distance === -1 && (c.distance = x[b].distance + 1, c.parent = b, y.unshift(A));
|
|
2371
2371
|
}
|
|
2372
2372
|
}
|
|
2373
2373
|
return x;
|
|
2374
2374
|
}
|
|
2375
2375
|
n(S, "r");
|
|
2376
|
-
function w(
|
|
2376
|
+
function w(d, x) {
|
|
2377
2377
|
return function(y) {
|
|
2378
|
-
return x(
|
|
2378
|
+
return x(d(y));
|
|
2379
2379
|
};
|
|
2380
2380
|
}
|
|
2381
2381
|
n(w, "o");
|
|
2382
|
-
function k(
|
|
2383
|
-
const y = [x[
|
|
2384
|
-
let b = D[x[
|
|
2382
|
+
function k(d, x) {
|
|
2383
|
+
const y = [x[d].parent, d];
|
|
2384
|
+
let b = D[x[d].parent][d], h = x[d].parent;
|
|
2385
2385
|
for (; x[h].parent; ) y.unshift(x[h].parent), b = w(D[x[h].parent][h], b), h = x[h].parent;
|
|
2386
2386
|
return b.conversion = y, b;
|
|
2387
2387
|
}
|
|
2388
|
-
n(k, "s"), g.exports = function(
|
|
2389
|
-
const x = S(
|
|
2388
|
+
n(k, "s"), g.exports = function(d) {
|
|
2389
|
+
const x = S(d), y = {}, b = Object.keys(x);
|
|
2390
2390
|
for (let h = b.length, z = 0; z < h; z++) {
|
|
2391
|
-
const
|
|
2392
|
-
x[
|
|
2391
|
+
const u = b[z];
|
|
2392
|
+
x[u].parent !== null && (y[u] = k(u, x));
|
|
2393
2393
|
}
|
|
2394
2394
|
return y;
|
|
2395
2395
|
};
|
|
@@ -2397,10 +2397,10 @@ function qu() {
|
|
|
2397
2397
|
g.exports = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] };
|
|
2398
2398
|
}, 138(g, T, E) {
|
|
2399
2399
|
var D = E(877), S = E(403), w = Object.hasOwnProperty, k = /* @__PURE__ */ Object.create(null);
|
|
2400
|
-
for (var
|
|
2400
|
+
for (var d in D) w.call(D, d) && (k[D[d]] = d);
|
|
2401
2401
|
var x = g.exports = { to: {}, get: {} };
|
|
2402
|
-
function y(h, z,
|
|
2403
|
-
return Math.min(Math.max(z, h),
|
|
2402
|
+
function y(h, z, u) {
|
|
2403
|
+
return Math.min(Math.max(z, h), u);
|
|
2404
2404
|
}
|
|
2405
2405
|
n(y, "l");
|
|
2406
2406
|
function b(h) {
|
|
@@ -2408,54 +2408,54 @@ function qu() {
|
|
|
2408
2408
|
return z.length < 2 ? "0" + z : z;
|
|
2409
2409
|
}
|
|
2410
2410
|
n(b, "u"), x.get = function(h) {
|
|
2411
|
-
var z,
|
|
2411
|
+
var z, u;
|
|
2412
2412
|
switch (h.substring(0, 3).toLowerCase()) {
|
|
2413
2413
|
case "hsl":
|
|
2414
|
-
z = x.get.hsl(h),
|
|
2414
|
+
z = x.get.hsl(h), u = "hsl";
|
|
2415
2415
|
break;
|
|
2416
2416
|
case "hwb":
|
|
2417
|
-
z = x.get.hwb(h),
|
|
2417
|
+
z = x.get.hwb(h), u = "hwb";
|
|
2418
2418
|
break;
|
|
2419
2419
|
default:
|
|
2420
|
-
z = x.get.rgb(h),
|
|
2420
|
+
z = x.get.rgb(h), u = "rgb";
|
|
2421
2421
|
}
|
|
2422
|
-
return z ? { model:
|
|
2422
|
+
return z ? { model: u, value: z } : null;
|
|
2423
2423
|
}, x.get.rgb = function(h) {
|
|
2424
2424
|
if (!h) return null;
|
|
2425
|
-
var z,
|
|
2425
|
+
var z, u, A, c = [0, 0, 0, 1];
|
|
2426
2426
|
if (z = h.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)) {
|
|
2427
|
-
for (A = z[2], z = z[1],
|
|
2428
|
-
var _ = 2 *
|
|
2429
|
-
c[
|
|
2427
|
+
for (A = z[2], z = z[1], u = 0; u < 3; u++) {
|
|
2428
|
+
var _ = 2 * u;
|
|
2429
|
+
c[u] = parseInt(z.slice(_, _ + 2), 16);
|
|
2430
2430
|
}
|
|
2431
2431
|
A && (c[3] = parseInt(A, 16) / 255);
|
|
2432
2432
|
} else if (z = h.match(/^#([a-f0-9]{3,4})$/i)) {
|
|
2433
|
-
for (A = (z = z[1])[3],
|
|
2433
|
+
for (A = (z = z[1])[3], u = 0; u < 3; u++) c[u] = parseInt(z[u] + z[u], 16);
|
|
2434
2434
|
A && (c[3] = parseInt(A + A, 16) / 255);
|
|
2435
2435
|
} else if (z = h.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)) {
|
|
2436
|
-
for (
|
|
2436
|
+
for (u = 0; u < 3; u++) c[u] = parseInt(z[u + 1], 0);
|
|
2437
2437
|
z[4] && (z[5] ? c[3] = 0.01 * parseFloat(z[4]) : c[3] = parseFloat(z[4]));
|
|
2438
2438
|
} else {
|
|
2439
2439
|
if (!(z = h.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))) return (z = h.match(/^(\w+)$/)) ? z[1] === "transparent" ? [0, 0, 0, 0] : w.call(D, z[1]) ? ((c = D[z[1]])[3] = 1, c) : null : null;
|
|
2440
|
-
for (
|
|
2440
|
+
for (u = 0; u < 3; u++) c[u] = Math.round(2.55 * parseFloat(z[u + 1]));
|
|
2441
2441
|
z[4] && (z[5] ? c[3] = 0.01 * parseFloat(z[4]) : c[3] = parseFloat(z[4]));
|
|
2442
2442
|
}
|
|
2443
|
-
for (
|
|
2443
|
+
for (u = 0; u < 3; u++) c[u] = y(c[u], 0, 255);
|
|
2444
2444
|
return c[3] = y(c[3], 0, 1), c;
|
|
2445
2445
|
}, x.get.hsl = function(h) {
|
|
2446
2446
|
if (!h) return null;
|
|
2447
2447
|
var z = h.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);
|
|
2448
2448
|
if (z) {
|
|
2449
|
-
var
|
|
2450
|
-
return [(parseFloat(z[1]) % 360 + 360) % 360, y(parseFloat(z[2]), 0, 100), y(parseFloat(z[3]), 0, 100), y(isNaN(
|
|
2449
|
+
var u = parseFloat(z[4]);
|
|
2450
|
+
return [(parseFloat(z[1]) % 360 + 360) % 360, y(parseFloat(z[2]), 0, 100), y(parseFloat(z[3]), 0, 100), y(isNaN(u) ? 1 : u, 0, 1)];
|
|
2451
2451
|
}
|
|
2452
2452
|
return null;
|
|
2453
2453
|
}, x.get.hwb = function(h) {
|
|
2454
2454
|
if (!h) return null;
|
|
2455
2455
|
var z = h.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);
|
|
2456
2456
|
if (z) {
|
|
2457
|
-
var
|
|
2458
|
-
return [(parseFloat(z[1]) % 360 + 360) % 360, y(parseFloat(z[2]), 0, 100), y(parseFloat(z[3]), 0, 100), y(isNaN(
|
|
2457
|
+
var u = parseFloat(z[4]);
|
|
2458
|
+
return [(parseFloat(z[1]) % 360 + 360) % 360, y(parseFloat(z[2]), 0, 100), y(parseFloat(z[3]), 0, 100), y(isNaN(u) ? 1 : u, 0, 1)];
|
|
2459
2459
|
}
|
|
2460
2460
|
return null;
|
|
2461
2461
|
}, x.to.hex = function() {
|
|
@@ -2465,8 +2465,8 @@ function qu() {
|
|
|
2465
2465
|
var h = S(arguments);
|
|
2466
2466
|
return h.length < 4 || h[3] === 1 ? "rgb(" + Math.round(h[0]) + ", " + Math.round(h[1]) + ", " + Math.round(h[2]) + ")" : "rgba(" + Math.round(h[0]) + ", " + Math.round(h[1]) + ", " + Math.round(h[2]) + ", " + h[3] + ")";
|
|
2467
2467
|
}, x.to.rgb.percent = function() {
|
|
2468
|
-
var h = S(arguments), z = Math.round(h[0] / 255 * 100),
|
|
2469
|
-
return h.length < 4 || h[3] === 1 ? "rgb(" + z + "%, " +
|
|
2468
|
+
var h = S(arguments), z = Math.round(h[0] / 255 * 100), u = Math.round(h[1] / 255 * 100), A = Math.round(h[2] / 255 * 100);
|
|
2469
|
+
return h.length < 4 || h[3] === 1 ? "rgb(" + z + "%, " + u + "%, " + A + "%)" : "rgba(" + z + "%, " + u + "%, " + A + "%, " + h[3] + ")";
|
|
2470
2470
|
}, x.to.hsl = function() {
|
|
2471
2471
|
var h = S(arguments);
|
|
2472
2472
|
return h.length < 4 || h[3] === 1 ? "hsl(" + h[0] + ", " + h[1] + "%, " + h[2] + "%)" : "hsla(" + h[0] + ", " + h[1] + "%, " + h[2] + "%, " + h[3] + ")";
|
|
@@ -2478,36 +2478,36 @@ function qu() {
|
|
|
2478
2478
|
};
|
|
2479
2479
|
}, 742(g, T, E) {
|
|
2480
2480
|
const D = E(138), S = E(880), w = ["keyword", "gray", "hex"], k = {};
|
|
2481
|
-
for (const
|
|
2482
|
-
const
|
|
2483
|
-
function x(
|
|
2484
|
-
if (!(this instanceof x)) return new x(
|
|
2481
|
+
for (const u of Object.keys(S)) k[[...S[u].labels].sort().join("")] = u;
|
|
2482
|
+
const d = {};
|
|
2483
|
+
function x(u, A) {
|
|
2484
|
+
if (!(this instanceof x)) return new x(u, A);
|
|
2485
2485
|
if (A && A in w && (A = null), A && !(A in S)) throw new Error("Unknown model: " + A);
|
|
2486
2486
|
let c, _;
|
|
2487
|
-
if (
|
|
2488
|
-
else if (
|
|
2489
|
-
else if (typeof
|
|
2490
|
-
const j = D.get(
|
|
2491
|
-
if (j === null) throw new Error("Unable to parse color from string: " +
|
|
2487
|
+
if (u == null) this.model = "rgb", this.color = [0, 0, 0], this.valpha = 1;
|
|
2488
|
+
else if (u instanceof x) this.model = u.model, this.color = [...u.color], this.valpha = u.valpha;
|
|
2489
|
+
else if (typeof u == "string") {
|
|
2490
|
+
const j = D.get(u);
|
|
2491
|
+
if (j === null) throw new Error("Unable to parse color from string: " + u);
|
|
2492
2492
|
this.model = j.model, _ = S[this.model].channels, this.color = j.value.slice(0, _), this.valpha = typeof j.value[_] == "number" ? j.value[_] : 1;
|
|
2493
|
-
} else if (
|
|
2493
|
+
} else if (u.length > 0) {
|
|
2494
2494
|
this.model = A || "rgb", _ = S[this.model].channels;
|
|
2495
|
-
const j = Array.prototype.slice.call(
|
|
2496
|
-
this.color = z(j, _), this.valpha = typeof
|
|
2497
|
-
} else if (typeof
|
|
2495
|
+
const j = Array.prototype.slice.call(u, 0, _);
|
|
2496
|
+
this.color = z(j, _), this.valpha = typeof u[_] == "number" ? u[_] : 1;
|
|
2497
|
+
} else if (typeof u == "number") this.model = "rgb", this.color = [u >> 16 & 255, u >> 8 & 255, 255 & u], this.valpha = 1;
|
|
2498
2498
|
else {
|
|
2499
2499
|
this.valpha = 1;
|
|
2500
|
-
const j = Object.keys(
|
|
2501
|
-
"alpha" in
|
|
2500
|
+
const j = Object.keys(u);
|
|
2501
|
+
"alpha" in u && (j.splice(j.indexOf("alpha"), 1), this.valpha = typeof u.alpha == "number" ? u.alpha : 0);
|
|
2502
2502
|
const N = j.sort().join("");
|
|
2503
|
-
if (!(N in k)) throw new Error("Unable to parse color from object: " + JSON.stringify(
|
|
2503
|
+
if (!(N in k)) throw new Error("Unable to parse color from object: " + JSON.stringify(u));
|
|
2504
2504
|
this.model = k[N];
|
|
2505
2505
|
const { labels: B } = S[this.model], J = [];
|
|
2506
|
-
for (c = 0; c < B.length; c++) J.push(
|
|
2506
|
+
for (c = 0; c < B.length; c++) J.push(u[B[c]]);
|
|
2507
2507
|
this.color = z(J);
|
|
2508
2508
|
}
|
|
2509
|
-
if (
|
|
2510
|
-
const j =
|
|
2509
|
+
if (d[this.model]) for (_ = S[this.model].channels, c = 0; c < _; c++) {
|
|
2510
|
+
const j = d[this.model][c];
|
|
2511
2511
|
j && (this.color[c] = j(this.color[c]));
|
|
2512
2512
|
}
|
|
2513
2513
|
this.valpha = Math.max(0, Math.min(1, this.valpha)), Object.freeze && Object.freeze(this);
|
|
@@ -2516,135 +2516,135 @@ function qu() {
|
|
|
2516
2516
|
return this.string();
|
|
2517
2517
|
}, toJSON() {
|
|
2518
2518
|
return this[this.model]();
|
|
2519
|
-
}, string(
|
|
2519
|
+
}, string(u) {
|
|
2520
2520
|
let A = this.model in D.to ? this : this.rgb();
|
|
2521
|
-
A = A.round(typeof
|
|
2521
|
+
A = A.round(typeof u == "number" ? u : 1);
|
|
2522
2522
|
const c = A.valpha === 1 ? A.color : [...A.color, this.valpha];
|
|
2523
2523
|
return D.to[A.model](c);
|
|
2524
|
-
}, percentString(
|
|
2525
|
-
const A = this.rgb().round(typeof
|
|
2524
|
+
}, percentString(u) {
|
|
2525
|
+
const A = this.rgb().round(typeof u == "number" ? u : 1), c = A.valpha === 1 ? A.color : [...A.color, this.valpha];
|
|
2526
2526
|
return D.to.rgb.percent(c);
|
|
2527
2527
|
}, array() {
|
|
2528
2528
|
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
|
|
2529
2529
|
}, object() {
|
|
2530
|
-
const
|
|
2531
|
-
for (let _ = 0; _ < A; _++)
|
|
2532
|
-
return this.valpha !== 1 && (
|
|
2530
|
+
const u = {}, { channels: A } = S[this.model], { labels: c } = S[this.model];
|
|
2531
|
+
for (let _ = 0; _ < A; _++) u[c[_]] = this.color[_];
|
|
2532
|
+
return this.valpha !== 1 && (u.alpha = this.valpha), u;
|
|
2533
2533
|
}, unitArray() {
|
|
2534
|
-
const
|
|
2535
|
-
return
|
|
2534
|
+
const u = this.rgb().color;
|
|
2535
|
+
return u[0] /= 255, u[1] /= 255, u[2] /= 255, this.valpha !== 1 && u.push(this.valpha), u;
|
|
2536
2536
|
}, unitObject() {
|
|
2537
|
-
const
|
|
2538
|
-
return
|
|
2539
|
-
}, round(
|
|
2540
|
-
return
|
|
2541
|
-
}, alpha(
|
|
2542
|
-
return
|
|
2543
|
-
}, red: b("rgb", 0, h(255)), green: b("rgb", 1, h(255)), blue: b("rgb", 2, h(255)), hue: b(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (
|
|
2544
|
-
return
|
|
2545
|
-
}, hex(
|
|
2546
|
-
return
|
|
2547
|
-
}, hexa(
|
|
2548
|
-
if (
|
|
2537
|
+
const u = this.rgb().object();
|
|
2538
|
+
return u.r /= 255, u.g /= 255, u.b /= 255, this.valpha !== 1 && (u.alpha = this.valpha), u;
|
|
2539
|
+
}, round(u) {
|
|
2540
|
+
return u = Math.max(u || 0, 0), new x([...this.color.map(y(u)), this.valpha], this.model);
|
|
2541
|
+
}, alpha(u) {
|
|
2542
|
+
return u !== void 0 ? new x([...this.color, Math.max(0, Math.min(1, u))], this.model) : this.valpha;
|
|
2543
|
+
}, red: b("rgb", 0, h(255)), green: b("rgb", 1, h(255)), blue: b("rgb", 2, h(255)), hue: b(["hsl", "hsv", "hsl", "hwb", "hcg"], 0, (u) => (u % 360 + 360) % 360), saturationl: b("hsl", 1, h(100)), lightness: b("hsl", 2, h(100)), saturationv: b("hsv", 1, h(100)), value: b("hsv", 2, h(100)), chroma: b("hcg", 1, h(100)), gray: b("hcg", 2, h(100)), white: b("hwb", 1, h(100)), wblack: b("hwb", 2, h(100)), cyan: b("cmyk", 0, h(100)), magenta: b("cmyk", 1, h(100)), yellow: b("cmyk", 2, h(100)), black: b("cmyk", 3, h(100)), x: b("xyz", 0, h(95.047)), y: b("xyz", 1, h(100)), z: b("xyz", 2, h(108.833)), l: b("lab", 0, h(100)), a: b("lab", 1), b: b("lab", 2), keyword(u) {
|
|
2544
|
+
return u !== void 0 ? new x(u) : S[this.model].keyword(this.color);
|
|
2545
|
+
}, hex(u) {
|
|
2546
|
+
return u !== void 0 ? new x(u) : D.to.hex(this.rgb().round().color);
|
|
2547
|
+
}, hexa(u) {
|
|
2548
|
+
if (u !== void 0) return new x(u);
|
|
2549
2549
|
const A = this.rgb().round().color;
|
|
2550
2550
|
let c = Math.round(255 * this.valpha).toString(16).toUpperCase();
|
|
2551
2551
|
return c.length === 1 && (c = "0" + c), D.to.hex(A) + c;
|
|
2552
2552
|
}, rgbNumber() {
|
|
2553
|
-
const
|
|
2554
|
-
return (255 &
|
|
2553
|
+
const u = this.rgb().color;
|
|
2554
|
+
return (255 & u[0]) << 16 | (255 & u[1]) << 8 | 255 & u[2];
|
|
2555
2555
|
}, luminosity() {
|
|
2556
|
-
const
|
|
2557
|
-
for (const [c, _] of
|
|
2556
|
+
const u = this.rgb().color, A = [];
|
|
2557
|
+
for (const [c, _] of u.entries()) {
|
|
2558
2558
|
const j = _ / 255;
|
|
2559
2559
|
A[c] = j <= 0.04045 ? j / 12.92 : ((j + 0.055) / 1.055) ** 2.4;
|
|
2560
2560
|
}
|
|
2561
2561
|
return 0.2126 * A[0] + 0.7152 * A[1] + 0.0722 * A[2];
|
|
2562
|
-
}, contrast(
|
|
2563
|
-
const A = this.luminosity(), c =
|
|
2562
|
+
}, contrast(u) {
|
|
2563
|
+
const A = this.luminosity(), c = u.luminosity();
|
|
2564
2564
|
return A > c ? (A + 0.05) / (c + 0.05) : (c + 0.05) / (A + 0.05);
|
|
2565
|
-
}, level(
|
|
2566
|
-
const A = this.contrast(
|
|
2565
|
+
}, level(u) {
|
|
2566
|
+
const A = this.contrast(u);
|
|
2567
2567
|
return A >= 7 ? "AAA" : A >= 4.5 ? "AA" : "";
|
|
2568
2568
|
}, isDark() {
|
|
2569
|
-
const
|
|
2570
|
-
return (2126 *
|
|
2569
|
+
const u = this.rgb().color;
|
|
2570
|
+
return (2126 * u[0] + 7152 * u[1] + 722 * u[2]) / 1e4 < 128;
|
|
2571
2571
|
}, isLight() {
|
|
2572
2572
|
return !this.isDark();
|
|
2573
2573
|
}, negate() {
|
|
2574
|
-
const
|
|
2575
|
-
for (let A = 0; A < 3; A++)
|
|
2576
|
-
return
|
|
2577
|
-
}, lighten(
|
|
2574
|
+
const u = this.rgb();
|
|
2575
|
+
for (let A = 0; A < 3; A++) u.color[A] = 255 - u.color[A];
|
|
2576
|
+
return u;
|
|
2577
|
+
}, lighten(u) {
|
|
2578
2578
|
const A = this.hsl();
|
|
2579
|
-
return A.color[2] += A.color[2] *
|
|
2580
|
-
}, darken(
|
|
2579
|
+
return A.color[2] += A.color[2] * u, A;
|
|
2580
|
+
}, darken(u) {
|
|
2581
2581
|
const A = this.hsl();
|
|
2582
|
-
return A.color[2] -= A.color[2] *
|
|
2583
|
-
}, saturate(
|
|
2582
|
+
return A.color[2] -= A.color[2] * u, A;
|
|
2583
|
+
}, saturate(u) {
|
|
2584
2584
|
const A = this.hsl();
|
|
2585
|
-
return A.color[1] += A.color[1] *
|
|
2586
|
-
}, desaturate(
|
|
2585
|
+
return A.color[1] += A.color[1] * u, A;
|
|
2586
|
+
}, desaturate(u) {
|
|
2587
2587
|
const A = this.hsl();
|
|
2588
|
-
return A.color[1] -= A.color[1] *
|
|
2589
|
-
}, whiten(
|
|
2588
|
+
return A.color[1] -= A.color[1] * u, A;
|
|
2589
|
+
}, whiten(u) {
|
|
2590
2590
|
const A = this.hwb();
|
|
2591
|
-
return A.color[1] += A.color[1] *
|
|
2592
|
-
}, blacken(
|
|
2591
|
+
return A.color[1] += A.color[1] * u, A;
|
|
2592
|
+
}, blacken(u) {
|
|
2593
2593
|
const A = this.hwb();
|
|
2594
|
-
return A.color[2] += A.color[2] *
|
|
2594
|
+
return A.color[2] += A.color[2] * u, A;
|
|
2595
2595
|
}, grayscale() {
|
|
2596
|
-
const
|
|
2596
|
+
const u = this.rgb().color, A = 0.3 * u[0] + 0.59 * u[1] + 0.11 * u[2];
|
|
2597
2597
|
return x.rgb(A, A, A);
|
|
2598
|
-
}, fade(
|
|
2599
|
-
return this.alpha(this.valpha - this.valpha *
|
|
2600
|
-
}, opaquer(
|
|
2601
|
-
return this.alpha(this.valpha + this.valpha *
|
|
2602
|
-
}, rotate(
|
|
2598
|
+
}, fade(u) {
|
|
2599
|
+
return this.alpha(this.valpha - this.valpha * u);
|
|
2600
|
+
}, opaquer(u) {
|
|
2601
|
+
return this.alpha(this.valpha + this.valpha * u);
|
|
2602
|
+
}, rotate(u) {
|
|
2603
2603
|
const A = this.hsl();
|
|
2604
2604
|
let c = A.color[0];
|
|
2605
|
-
return c = (c +
|
|
2606
|
-
}, mix(
|
|
2607
|
-
if (!
|
|
2608
|
-
const c =
|
|
2605
|
+
return c = (c + u) % 360, c = c < 0 ? 360 + c : c, A.color[0] = c, A;
|
|
2606
|
+
}, mix(u, A) {
|
|
2607
|
+
if (!u || !u.rgb) throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof u);
|
|
2608
|
+
const c = u.rgb(), _ = this.rgb(), j = A === void 0 ? 0.5 : A, N = 2 * j - 1, B = c.alpha() - _.alpha(), J = ((N * B === -1 ? N : (N + B) / (1 + N * B)) + 1) / 2, q = 1 - J;
|
|
2609
2609
|
return x.rgb(J * c.red() + q * _.red(), J * c.green() + q * _.green(), J * c.blue() + q * _.blue(), c.alpha() * j + _.alpha() * (1 - j));
|
|
2610
2610
|
} };
|
|
2611
|
-
for (const
|
|
2612
|
-
if (w.includes(
|
|
2613
|
-
const { channels: A } = S[
|
|
2614
|
-
x.prototype[
|
|
2615
|
-
return this.model ===
|
|
2611
|
+
for (const u of Object.keys(S)) {
|
|
2612
|
+
if (w.includes(u)) continue;
|
|
2613
|
+
const { channels: A } = S[u];
|
|
2614
|
+
x.prototype[u] = function(...c) {
|
|
2615
|
+
return this.model === u ? new x(this) : c.length > 0 ? new x(c, u) : new x([...(_ = S[this.model][u].raw(this.color), Array.isArray(_) ? _ : [_]), this.valpha], u);
|
|
2616
2616
|
var _;
|
|
2617
|
-
}, x[
|
|
2617
|
+
}, x[u] = function(...c) {
|
|
2618
2618
|
let _ = c[0];
|
|
2619
|
-
return typeof _ == "number" && (_ = z(c, A)), new x(_,
|
|
2619
|
+
return typeof _ == "number" && (_ = z(c, A)), new x(_, u);
|
|
2620
2620
|
};
|
|
2621
2621
|
}
|
|
2622
|
-
function y(
|
|
2622
|
+
function y(u) {
|
|
2623
2623
|
return function(A) {
|
|
2624
2624
|
return (function(c, _) {
|
|
2625
2625
|
return Number(c.toFixed(_));
|
|
2626
|
-
})(A,
|
|
2626
|
+
})(A, u);
|
|
2627
2627
|
};
|
|
2628
2628
|
}
|
|
2629
2629
|
n(y, "l");
|
|
2630
|
-
function b(
|
|
2631
|
-
|
|
2632
|
-
for (const _ of
|
|
2633
|
-
return
|
|
2630
|
+
function b(u, A, c) {
|
|
2631
|
+
u = Array.isArray(u) ? u : [u];
|
|
2632
|
+
for (const _ of u) (d[_] || (d[_] = []))[A] = c;
|
|
2633
|
+
return u = u[0], function(_) {
|
|
2634
2634
|
let j;
|
|
2635
|
-
return _ !== void 0 ? (c && (_ = c(_)), j = this[
|
|
2635
|
+
return _ !== void 0 ? (c && (_ = c(_)), j = this[u](), j.color[A] = _, j) : (j = this[u]().color[A], c && (j = c(j)), j);
|
|
2636
2636
|
};
|
|
2637
2637
|
}
|
|
2638
2638
|
n(b, "u");
|
|
2639
|
-
function h(
|
|
2639
|
+
function h(u) {
|
|
2640
2640
|
return function(A) {
|
|
2641
|
-
return Math.max(0, Math.min(
|
|
2641
|
+
return Math.max(0, Math.min(u, A));
|
|
2642
2642
|
};
|
|
2643
2643
|
}
|
|
2644
2644
|
n(h, "b");
|
|
2645
|
-
function z(
|
|
2646
|
-
for (let c = 0; c < A; c++) typeof
|
|
2647
|
-
return
|
|
2645
|
+
function z(u, A) {
|
|
2646
|
+
for (let c = 0; c < A; c++) typeof u[c] != "number" && (u[c] = 0);
|
|
2647
|
+
return u;
|
|
2648
2648
|
}
|
|
2649
2649
|
n(z, "d"), g.exports = x;
|
|
2650
2650
|
}, 784(g) {
|
|
@@ -2677,17 +2677,17 @@ function qu() {
|
|
|
2677
2677
|
});
|
|
2678
2678
|
}, w.EventEmitter = w, w.prototype._events = void 0, w.prototype._eventsCount = 0, w.prototype._maxListeners = void 0;
|
|
2679
2679
|
var k = 10;
|
|
2680
|
-
function
|
|
2680
|
+
function d(_) {
|
|
2681
2681
|
if (typeof _ != "function") throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof _);
|
|
2682
2682
|
}
|
|
2683
|
-
n(
|
|
2683
|
+
n(d, "i");
|
|
2684
2684
|
function x(_) {
|
|
2685
2685
|
return _._maxListeners === void 0 ? w.defaultMaxListeners : _._maxListeners;
|
|
2686
2686
|
}
|
|
2687
2687
|
n(x, "c");
|
|
2688
2688
|
function y(_, j, N, B) {
|
|
2689
2689
|
var J, q, ee, K;
|
|
2690
|
-
if (
|
|
2690
|
+
if (d(N), (q = _._events) === void 0 ? (q = _._events = /* @__PURE__ */ Object.create(null), _._eventsCount = 0) : (q.newListener !== void 0 && (_.emit("newListener", j, N.listener ? N.listener : N), q = _._events), ee = q[j]), ee === void 0) ee = q[j] = N, ++_._eventsCount;
|
|
2691
2691
|
else if (typeof ee == "function" ? ee = q[j] = B ? [N, ee] : [ee, N] : B ? ee.unshift(N) : ee.push(N), (J = x(_)) > 0 && ee.length > J && !ee.warned) {
|
|
2692
2692
|
ee.warned = !0;
|
|
2693
2693
|
var U = new Error("Possible EventEmitter memory leak detected. " + ee.length + " " + String(j) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
@@ -2715,7 +2715,7 @@ function qu() {
|
|
|
2715
2715
|
})(J) : A(J, J.length);
|
|
2716
2716
|
}
|
|
2717
2717
|
n(z, "d");
|
|
2718
|
-
function
|
|
2718
|
+
function u(_) {
|
|
2719
2719
|
var j = this._events;
|
|
2720
2720
|
if (j !== void 0) {
|
|
2721
2721
|
var N = j[_];
|
|
@@ -2724,7 +2724,7 @@ function qu() {
|
|
|
2724
2724
|
}
|
|
2725
2725
|
return 0;
|
|
2726
2726
|
}
|
|
2727
|
-
n(
|
|
2727
|
+
n(u, "p");
|
|
2728
2728
|
function A(_, j) {
|
|
2729
2729
|
for (var N = new Array(j), B = 0; B < j; ++B) N[B] = _[B];
|
|
2730
2730
|
return N;
|
|
@@ -2775,12 +2775,12 @@ function qu() {
|
|
|
2775
2775
|
}, w.prototype.on = w.prototype.addListener, w.prototype.prependListener = function(_, j) {
|
|
2776
2776
|
return y(this, _, j, !0);
|
|
2777
2777
|
}, w.prototype.once = function(_, j) {
|
|
2778
|
-
return
|
|
2778
|
+
return d(j), this.on(_, h(this, _, j)), this;
|
|
2779
2779
|
}, w.prototype.prependOnceListener = function(_, j) {
|
|
2780
|
-
return
|
|
2780
|
+
return d(j), this.prependListener(_, h(this, _, j)), this;
|
|
2781
2781
|
}, w.prototype.removeListener = function(_, j) {
|
|
2782
2782
|
var N, B, J, q, ee;
|
|
2783
|
-
if (
|
|
2783
|
+
if (d(j), (B = this._events) === void 0) return this;
|
|
2784
2784
|
if ((N = B[_]) === void 0) return this;
|
|
2785
2785
|
if (N === j || N.listener === j) --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete B[_], B.removeListener && this.emit("removeListener", _, N.listener || j));
|
|
2786
2786
|
else if (typeof N != "function") {
|
|
@@ -2812,8 +2812,8 @@ function qu() {
|
|
|
2812
2812
|
}, w.prototype.rawListeners = function(_) {
|
|
2813
2813
|
return z(this, _, !1);
|
|
2814
2814
|
}, w.listenerCount = function(_, j) {
|
|
2815
|
-
return typeof _.listenerCount == "function" ? _.listenerCount(j) :
|
|
2816
|
-
}, w.prototype.listenerCount =
|
|
2815
|
+
return typeof _.listenerCount == "function" ? _.listenerCount(j) : u.call(_, j);
|
|
2816
|
+
}, w.prototype.listenerCount = u, w.prototype.eventNames = function() {
|
|
2817
2817
|
return this._eventsCount > 0 ? T(this._events) : [];
|
|
2818
2818
|
};
|
|
2819
2819
|
}, 94(g) {
|
|
@@ -2821,16 +2821,16 @@ function qu() {
|
|
|
2821
2821
|
return !(!T || typeof T == "string") && (T instanceof Array || Array.isArray(T) || T.length >= 0 && (T.splice instanceof Function || Object.getOwnPropertyDescriptor(T, T.length - 1) && T.constructor.name !== "String"));
|
|
2822
2822
|
};
|
|
2823
2823
|
}, 403(g, T, E) {
|
|
2824
|
-
var D = E(94), S = Array.prototype.concat, w = Array.prototype.slice, k = g.exports = function(
|
|
2825
|
-
for (var x = [], y = 0, b =
|
|
2826
|
-
var h =
|
|
2824
|
+
var D = E(94), S = Array.prototype.concat, w = Array.prototype.slice, k = g.exports = function(d) {
|
|
2825
|
+
for (var x = [], y = 0, b = d.length; y < b; y++) {
|
|
2826
|
+
var h = d[y];
|
|
2827
2827
|
D(h) ? x = S.call(x, w.call(h)) : x.push(h);
|
|
2828
2828
|
}
|
|
2829
2829
|
return x;
|
|
2830
2830
|
};
|
|
2831
|
-
k.wrap = function(
|
|
2831
|
+
k.wrap = function(d) {
|
|
2832
2832
|
return function() {
|
|
2833
|
-
return
|
|
2833
|
+
return d(k(arguments));
|
|
2834
2834
|
};
|
|
2835
2835
|
};
|
|
2836
2836
|
}, 119(g) {
|
|
@@ -2912,10 +2912,10 @@ function qu() {
|
|
|
2912
2912
|
}
|
|
2913
2913
|
}
|
|
2914
2914
|
n(k, "c");
|
|
2915
|
-
function
|
|
2915
|
+
function d(o, r, i) {
|
|
2916
2916
|
return r && k(o.prototype, r), i && k(o, i), Object.defineProperty(o, "prototype", { writable: !1 }), o;
|
|
2917
2917
|
}
|
|
2918
|
-
n(
|
|
2918
|
+
n(d, "l");
|
|
2919
2919
|
function x(o) {
|
|
2920
2920
|
return x = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
|
|
2921
2921
|
return r.__proto__ || Object.getPrototypeOf(r);
|
|
@@ -2952,11 +2952,11 @@ function qu() {
|
|
|
2952
2952
|
}, z(o, r);
|
|
2953
2953
|
}
|
|
2954
2954
|
n(z, "h");
|
|
2955
|
-
function
|
|
2955
|
+
function u(o, r) {
|
|
2956
2956
|
if (typeof r != "function" && r !== null) throw new TypeError("Super expression must either be null or a function");
|
|
2957
2957
|
o.prototype = Object.create(r && r.prototype, { constructor: { value: o, writable: !0, configurable: !0 } }), Object.defineProperty(o, "prototype", { writable: !1 }), r && z(o, r);
|
|
2958
2958
|
}
|
|
2959
|
-
n(
|
|
2959
|
+
n(u, "f"), s.r(v), s.d(v, { default: /* @__PURE__ */ n(() => cc, "default") });
|
|
2960
2960
|
var A = s(119), c = s.n(A);
|
|
2961
2961
|
function _() {
|
|
2962
2962
|
var o = this.constructor.getDerivedStateFromProps(this.props, this.state);
|
|
@@ -3069,7 +3069,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3069
3069
|
function r() {
|
|
3070
3070
|
return w(this, r), h(this, r, arguments);
|
|
3071
3071
|
}
|
|
3072
|
-
return n(r, "t"),
|
|
3072
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3073
3073
|
var i = this.props, f = (i.parent_type, i.namespace), M = i.quotesOnKeys, P = i.indentWidth, F = i.theme, O = i.singleIndent, L = i.showComma, W = i.isLast, Y = i.jsvRoot, te = i.name ? i.name : "";
|
|
3074
3074
|
return c().createElement("div", { className: "variable-row" }, c().createElement("span", Object.assign({}, X(F, "object-name"), { key: f }, X(F, "objectKeyVal", { paddingLeft: P * O })), c().createElement("span", { className: "object-key" }, M && c().createElement("span", { style: { verticalAlign: "top" } }, '"'), c().createElement("span", null, te), M && c().createElement("span", { style: { verticalAlign: "top" } }, '"')), c().createElement("span", X(F, "colon"), ":")), c().createElement("span", X(F, "circularReference"), "[CIRCULAR REFERENCE]"), L && !W && !Y && c().createElement("span", X(F, "comma"), ","));
|
|
3075
3075
|
}, "value") }]);
|
|
@@ -3523,7 +3523,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3523
3523
|
function r() {
|
|
3524
3524
|
return w(this, r), h(this, r, arguments);
|
|
3525
3525
|
}
|
|
3526
|
-
return n(r, "t"),
|
|
3526
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3527
3527
|
var i = this.props, f = i.typeName, M = i.displayDataTypes, P = i.theme;
|
|
3528
3528
|
return M ? c().createElement("span", Object.assign({ className: "data-type-label" }, X(P, "data-type-label")), f) : null;
|
|
3529
3529
|
}, "value") }]);
|
|
@@ -3531,7 +3531,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3531
3531
|
function r() {
|
|
3532
3532
|
return w(this, r), h(this, r, arguments);
|
|
3533
3533
|
}
|
|
3534
|
-
return n(r, "t"),
|
|
3534
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3535
3535
|
var i = this.props;
|
|
3536
3536
|
return c().createElement("div", X(i.theme, "boolean"), c().createElement(en, Object.assign({ typeName: "bool" }, i)), i.value ? "true" : "false");
|
|
3537
3537
|
}, "value") }]);
|
|
@@ -3539,7 +3539,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3539
3539
|
function r() {
|
|
3540
3540
|
return w(this, r), h(this, r, arguments);
|
|
3541
3541
|
}
|
|
3542
|
-
return n(r, "t"),
|
|
3542
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3543
3543
|
var i = this.props;
|
|
3544
3544
|
return c().createElement("div", X(i.theme, "date"), c().createElement(en, Object.assign({ typeName: "date" }, i)), c().createElement("span", Object.assign({ className: "date-value" }, X(i.theme, "date-value")), i.value.toLocaleTimeString("en-us", { weekday: "short", year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" })));
|
|
3545
3545
|
}, "value") }]);
|
|
@@ -3547,12 +3547,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3547
3547
|
function r() {
|
|
3548
3548
|
return w(this, r), h(this, r, arguments);
|
|
3549
3549
|
}
|
|
3550
|
-
return n(r, "t"),
|
|
3550
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3551
3551
|
var i = this.props;
|
|
3552
3552
|
return c().createElement("div", X(i.theme, "float"), c().createElement(en, Object.assign({ typeName: "float" }, i)), this.props.value);
|
|
3553
3553
|
}, "value") }]);
|
|
3554
3554
|
})(c().PureComponent), El = s(784), Il = (function() {
|
|
3555
|
-
return
|
|
3555
|
+
return d(/* @__PURE__ */ n(function o() {
|
|
3556
3556
|
w(this, o), this.handler = function() {
|
|
3557
3557
|
};
|
|
3558
3558
|
}, "e"), [{ key: "register", value: /* @__PURE__ */ n(function(o) {
|
|
@@ -3640,7 +3640,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3640
3640
|
return W === "array" ? L = U(F) : W === "object" && (L = S({}, F)), Y !== void 0 && (L[Y] = i.deepCopy(F[Y], O)), L;
|
|
3641
3641
|
}, i;
|
|
3642
3642
|
}
|
|
3643
|
-
return n(r, "t"),
|
|
3643
|
+
return n(r, "t"), u(r, o), d(r);
|
|
3644
3644
|
})(El.EventEmitter))();
|
|
3645
3645
|
Bt.register(io.handleAction.bind(io));
|
|
3646
3646
|
const Ct = io;
|
|
@@ -3656,7 +3656,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3656
3656
|
return M ? c().createElement("span", null, f.props.value.toString().slice(9, -1).replace(/\{[\s\S]+/, ""), c().createElement("span", { className: "function-collapsed", style: { fontWeight: "bold" } }, c().createElement("span", null, "{"), c().createElement("span", X(P.theme, "ellipsis"), "..."), c().createElement("span", null, "}"))) : f.props.value.toString().slice(9, -1);
|
|
3657
3657
|
}, f.state = { collapsed: Ct.get(i.rjvId, i.namespace, "collapsed", !0) }, f;
|
|
3658
3658
|
}
|
|
3659
|
-
return n(r, "t"),
|
|
3659
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3660
3660
|
var i = this.props, f = this.state.collapsed;
|
|
3661
3661
|
return c().createElement("div", X(i.theme, "function"), c().createElement(en, Object.assign({ typeName: "function" }, i)), c().createElement("span", Object.assign({}, X(i.theme, "function-value"), { className: "rjv-function-container", onClick: this.handleToggleCollapsed }), this.getFunctionDisplay(f)));
|
|
3662
3662
|
}, "value") }]);
|
|
@@ -3664,21 +3664,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3664
3664
|
function r() {
|
|
3665
3665
|
return w(this, r), h(this, r, arguments);
|
|
3666
3666
|
}
|
|
3667
|
-
return n(r, "t"),
|
|
3667
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3668
3668
|
return c().createElement("div", X(this.props.theme, "nan"), "NaN");
|
|
3669
3669
|
}, "value") }]);
|
|
3670
3670
|
})(c().PureComponent), _a = (function(o) {
|
|
3671
3671
|
function r() {
|
|
3672
3672
|
return w(this, r), h(this, r, arguments);
|
|
3673
3673
|
}
|
|
3674
|
-
return n(r, "t"),
|
|
3674
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3675
3675
|
return c().createElement("div", X(this.props.theme, "null"), "NULL");
|
|
3676
3676
|
}, "value") }]);
|
|
3677
3677
|
})(c().PureComponent), Ma = (function(o) {
|
|
3678
3678
|
function r() {
|
|
3679
3679
|
return w(this, r), h(this, r, arguments);
|
|
3680
3680
|
}
|
|
3681
|
-
return n(r, "t"),
|
|
3681
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3682
3682
|
var i = this.props;
|
|
3683
3683
|
return c().createElement("div", X(i.theme, "integer"), c().createElement(en, Object.assign({ typeName: "int" }, i)), this.props.value);
|
|
3684
3684
|
}, "value") }]);
|
|
@@ -3686,7 +3686,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3686
3686
|
function r() {
|
|
3687
3687
|
return w(this, r), h(this, r, arguments);
|
|
3688
3688
|
}
|
|
3689
|
-
return n(r, "t"),
|
|
3689
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3690
3690
|
var i = this.props;
|
|
3691
3691
|
return c().createElement("div", X(i.theme, "regexp"), c().createElement(en, Object.assign({ typeName: "regexp" }, i)), this.props.value.toString());
|
|
3692
3692
|
}, "value") }]);
|
|
@@ -3699,7 +3699,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3699
3699
|
});
|
|
3700
3700
|
}, f.state = { collapsed: Ct.get(i.rjvId, i.namespace, "collapsed", !0) }, f;
|
|
3701
3701
|
}
|
|
3702
|
-
return n(r, "t"),
|
|
3702
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3703
3703
|
var i = this.state.collapsed, f = this.props, M = f.collapseStringsAfterLength, P = f.theme, F = f.escapeStrings, O = f.value, L = ne(M) === "integer", W = { style: { cursor: "default", wordBreak: "break-all" } };
|
|
3704
3704
|
return F && (O = Se(O)), L && O.length > M && (W.style.cursor = "pointer", i && (O = c().createElement("span", null, O.substring(0, M), c().createElement("span", X(P, "ellipsis"), " ...")))), c().createElement("div", X(P, "string"), c().createElement(en, Object.assign({ typeName: "string" }, f)), c().createElement("span", Object.assign({ className: "string-value" }, W, { onClick: this.handleToggleCollapsed }), '"', O, '"'));
|
|
3705
3705
|
}, "value") }]);
|
|
@@ -3707,14 +3707,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3707
3707
|
function r() {
|
|
3708
3708
|
return w(this, r), h(this, r, arguments);
|
|
3709
3709
|
}
|
|
3710
|
-
return n(r, "t"),
|
|
3710
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3711
3711
|
return c().createElement("div", X(this.props.theme, "undefined"), "undefined");
|
|
3712
3712
|
}, "value") }]);
|
|
3713
3713
|
})(c().PureComponent), Ra = (function(o) {
|
|
3714
3714
|
function r() {
|
|
3715
3715
|
return w(this, r), h(this, r, arguments);
|
|
3716
3716
|
}
|
|
3717
|
-
return n(r, "t"),
|
|
3717
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3718
3718
|
var i = this.props;
|
|
3719
3719
|
return c().createElement("div", X(i.theme, "bigNumber"), c().createElement(en, Object.assign({ typeName: "bigNumber" }, i)), this.props.value.toString());
|
|
3720
3720
|
}, "value") }]);
|
|
@@ -3870,7 +3870,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3870
3870
|
function r() {
|
|
3871
3871
|
return w(this, r), h(this, r, arguments);
|
|
3872
3872
|
}
|
|
3873
|
-
return n(r, "t"),
|
|
3873
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3874
3874
|
var i = this.props, f = i.style, M = q(i, Pl);
|
|
3875
3875
|
return c().createElement("span", M, c().createElement("svg", Object.assign({}, Dt(f), { viewBox: "0 0 24 24", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), c().createElement("path", { d: "M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7" })));
|
|
3876
3876
|
}, "value") }]);
|
|
@@ -3878,7 +3878,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3878
3878
|
function r() {
|
|
3879
3879
|
return w(this, r), h(this, r, arguments);
|
|
3880
3880
|
}
|
|
3881
|
-
return n(r, "t"),
|
|
3881
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3882
3882
|
var i = this.props, f = i.style, M = q(i, Fl);
|
|
3883
3883
|
return c().createElement("span", M, c().createElement("svg", Object.assign({}, Dt(f), { viewBox: "0 0 24 24", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), c().createElement("path", { d: "M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z" })));
|
|
3884
3884
|
}, "value") }]);
|
|
@@ -3886,7 +3886,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3886
3886
|
function r() {
|
|
3887
3887
|
return w(this, r), h(this, r, arguments);
|
|
3888
3888
|
}
|
|
3889
|
-
return n(r, "t"),
|
|
3889
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3890
3890
|
var i = this.props, f = i.style, M = q(i, jl), P = Dt(f).style;
|
|
3891
3891
|
return c().createElement("span", M, c().createElement("svg", { fill: P.color, width: P.height, height: P.width, style: P, viewBox: "0 0 1792 1792" }, c().createElement("path", { d: "M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z" })));
|
|
3892
3892
|
}, "value") }]);
|
|
@@ -3894,7 +3894,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3894
3894
|
function r() {
|
|
3895
3895
|
return w(this, r), h(this, r, arguments);
|
|
3896
3896
|
}
|
|
3897
|
-
return n(r, "t"),
|
|
3897
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3898
3898
|
var i = this.props, f = i.style, M = q(i, Ll), P = Dt(f).style;
|
|
3899
3899
|
return c().createElement("span", M, c().createElement("svg", { fill: P.color, width: P.height, height: P.width, style: P, viewBox: "0 0 1792 1792" }, c().createElement("path", { d: "M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z" })));
|
|
3900
3900
|
}, "value") }]);
|
|
@@ -3902,7 +3902,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3902
3902
|
function r() {
|
|
3903
3903
|
return w(this, r), h(this, r, arguments);
|
|
3904
3904
|
}
|
|
3905
|
-
return n(r, "t"),
|
|
3905
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3906
3906
|
var i = this.props, f = i.style, M = q(i, $l);
|
|
3907
3907
|
return c().createElement("span", M, c().createElement("svg", { style: S(S({}, Dt(f).style), {}, { paddingLeft: "2px", verticalAlign: "top" }), viewBox: "0 0 15 15", fill: "currentColor" }, c().createElement("path", { d: "M0 14l6-6-6-6z" })));
|
|
3908
3908
|
}, "value") }]);
|
|
@@ -3910,7 +3910,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3910
3910
|
function r() {
|
|
3911
3911
|
return w(this, r), h(this, r, arguments);
|
|
3912
3912
|
}
|
|
3913
|
-
return n(r, "t"),
|
|
3913
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3914
3914
|
var i = this.props, f = i.style, M = q(i, Bl);
|
|
3915
3915
|
return c().createElement("span", M, c().createElement("svg", { style: S(S({}, Dt(f).style), {}, { paddingLeft: "2px", verticalAlign: "top" }), viewBox: "0 0 15 15", fill: "currentColor" }, c().createElement("path", { d: "M0 5l6 6 6-6z" })));
|
|
3916
3916
|
}, "value") }]);
|
|
@@ -3918,7 +3918,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3918
3918
|
function r() {
|
|
3919
3919
|
return w(this, r), h(this, r, arguments);
|
|
3920
3920
|
}
|
|
3921
|
-
return n(r, "t"),
|
|
3921
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3922
3922
|
var i = this.props, f = i.style, M = q(i, Wl);
|
|
3923
3923
|
return c().createElement("span", M, c().createElement("svg", Object.assign({}, Dt(f), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), c().createElement("g", null, c().createElement("path", { d: "m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z" }))));
|
|
3924
3924
|
}, "value") }]);
|
|
@@ -3926,7 +3926,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3926
3926
|
function r() {
|
|
3927
3927
|
return w(this, r), h(this, r, arguments);
|
|
3928
3928
|
}
|
|
3929
|
-
return n(r, "t"),
|
|
3929
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3930
3930
|
var i = this.props, f = i.style, M = q(i, Nl);
|
|
3931
3931
|
return c().createElement("span", M, c().createElement("svg", Object.assign({}, Dt(f), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), c().createElement("g", null, c().createElement("path", { d: "m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z" }))));
|
|
3932
3932
|
}, "value") }]);
|
|
@@ -3934,7 +3934,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3934
3934
|
function r() {
|
|
3935
3935
|
return w(this, r), h(this, r, arguments);
|
|
3936
3936
|
}
|
|
3937
|
-
return n(r, "t"),
|
|
3937
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3938
3938
|
var i = this.props, f = i.style, M = q(i, Hl);
|
|
3939
3939
|
return c().createElement("span", M, c().createElement("svg", Object.assign({}, Dt(f), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), c().createElement("g", null, c().createElement("path", { d: "m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z" }))));
|
|
3940
3940
|
}, "value") }]);
|
|
@@ -3942,7 +3942,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3942
3942
|
function r() {
|
|
3943
3943
|
return w(this, r), h(this, r, arguments);
|
|
3944
3944
|
}
|
|
3945
|
-
return n(r, "t"),
|
|
3945
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3946
3946
|
var i = this.props, f = i.style, M = q(i, ql);
|
|
3947
3947
|
return c().createElement("span", M, c().createElement("svg", Object.assign({}, Dt(f), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), c().createElement("g", null, c().createElement("path", { d: "m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z" }))));
|
|
3948
3948
|
}, "value") }]);
|
|
@@ -3950,7 +3950,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3950
3950
|
function r() {
|
|
3951
3951
|
return w(this, r), h(this, r, arguments);
|
|
3952
3952
|
}
|
|
3953
|
-
return n(r, "t"),
|
|
3953
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3954
3954
|
var i = this.props, f = i.style, M = q(i, Vl);
|
|
3955
3955
|
return c().createElement("span", M, c().createElement("svg", Object.assign({}, Dt(f), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), c().createElement("g", null, c().createElement("path", { d: "m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2 0.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z" }))));
|
|
3956
3956
|
}, "value") }]);
|
|
@@ -3958,7 +3958,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3958
3958
|
function r() {
|
|
3959
3959
|
return w(this, r), h(this, r, arguments);
|
|
3960
3960
|
}
|
|
3961
|
-
return n(r, "t"),
|
|
3961
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
3962
3962
|
var i = this.props, f = i.style, M = q(i, Ul);
|
|
3963
3963
|
return c().createElement("span", M, c().createElement("svg", Object.assign({}, Dt(f), { viewBox: "0 0 40 40", fill: "currentColor", preserveAspectRatio: "xMidYMid meet" }), c().createElement("g", null, c().createElement("path", { d: "m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z" }))));
|
|
3964
3964
|
}, "value") }]);
|
|
@@ -3995,7 +3995,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3995
3995
|
}
|
|
3996
3996
|
}, f.state = { copied: !1 }, f;
|
|
3997
3997
|
}
|
|
3998
|
-
return n(r, "t"),
|
|
3998
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "componentWillUnmount", value: /* @__PURE__ */ n(function() {
|
|
3999
3999
|
this.copiedTimer && (clearTimeout(this.copiedTimer), this.copiedTimer = null);
|
|
4000
4000
|
}, "value") }, { key: "render", value: /* @__PURE__ */ n(function() {
|
|
4001
4001
|
var i = this.props, f = i.theme, M = i.hidden, P = i.rowHovered, F = X(f, "copy-to-clipboard").style, O = "inline";
|
|
@@ -4122,7 +4122,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4122
4122
|
}
|
|
4123
4123
|
}, f.state = { editMode: !1, editValue: "", hovered: !1, renameKey: !1, parsedInput: { type: !1, value: null } }, f;
|
|
4124
4124
|
}
|
|
4125
|
-
return n(r, "t"),
|
|
4125
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
4126
4126
|
var i = this, f = this.props, M = f.variable, P = f.singleIndent, F = f.type, O = f.theme, L = f.namespace, W = f.indentWidth, Y = f.enableClipboard, te = f.onEdit, ce = f.onDelete, oe = f.onSelect, Me = f.displayArrayKey, Le = f.quotesOnKeys, fe = f.showComma, Te = f.isLast, $e = this.state.editMode, Ae = oe !== !1 || te !== !1;
|
|
4127
4127
|
return c().createElement("div", Object.assign({}, X(O, "objectKeyVal", { paddingLeft: W * P }), { onMouseEnter: /* @__PURE__ */ n(function() {
|
|
4128
4128
|
return i.setState(S(S({}, i.state), {}, { hovered: !0 }));
|
|
@@ -4157,7 +4157,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4157
4157
|
}, "onClick") }), i.getObjectSize(), Y ? c().createElement(Na, { rowHovered: oe, clickCallback: Y, src: te, theme: O, namespace: ce }) : null, W !== !1 ? i.getAddAttribute(oe) : null, L !== !1 ? i.getRemoveObject(oe) : null);
|
|
4158
4158
|
}, i;
|
|
4159
4159
|
}
|
|
4160
|
-
return n(r, "t"),
|
|
4160
|
+
return n(r, "t"), u(r, o), d(r);
|
|
4161
4161
|
})(c().PureComponent);
|
|
4162
4162
|
function qa(o) {
|
|
4163
4163
|
var r = o.parent_type, i = o.namespace, f = o.quotesOnKeys, M = o.theme, P = o.jsvRoot, F = o.name, O = o.displayArrayKey, L = o.onKeyClick, W = o.name ? o.name : "", Y = typeof L == "function" ? L : null;
|
|
@@ -4202,7 +4202,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4202
4202
|
}
|
|
4203
4203
|
}, f.state = { expanded: [] }, f;
|
|
4204
4204
|
}
|
|
4205
|
-
return n(r, "t"),
|
|
4205
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "getExpandedIcon", value: /* @__PURE__ */ n(function(i) {
|
|
4206
4206
|
var f = this.props, M = f.theme, P = f.iconStyle;
|
|
4207
4207
|
return this.state.expanded[i] ? c().createElement(Va, { theme: M, iconStyle: P }) : c().createElement(Ua, { theme: M, iconStyle: P });
|
|
4208
4208
|
}, "value") }, { key: "render", value: /* @__PURE__ */ n(function() {
|
|
@@ -4253,7 +4253,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4253
4253
|
var M = r.getState(i);
|
|
4254
4254
|
return f.state = S(S({}, M), {}, { prevProps: {} }), f.listOfAncestors = Array.from(f.props.listOfAncestors || []), f.listOfAncestors.push(i.src), f;
|
|
4255
4255
|
}
|
|
4256
|
-
return n(r, "t"),
|
|
4256
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "getBraceStart", value: /* @__PURE__ */ n(function(i, f) {
|
|
4257
4257
|
var M = this.props, P = M.theme, F = M.iconStyle;
|
|
4258
4258
|
if (M.parent_type === "array_group") return c().createElement("span", null, c().createElement("span", X(P, "brace"), i === "array" ? "[" : "{"));
|
|
4259
4259
|
var O = f ? Va : Ua;
|
|
@@ -4276,7 +4276,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4276
4276
|
var r = Object.keys(o.src).length, i = (o.collapsed === !1 || o.collapsed !== !0 && o.collapsed > o.depth) && (!o.shouldCollapse || o.shouldCollapse({ name: o.name, src: o.src, type: ne(o.src), namespace: o.namespace }) === !1) && r !== 0;
|
|
4277
4277
|
return { expanded: Ct.get(o.rjvId, o.namespace, "expanded", i), object_type: o.type === "array" ? "array" : "object", parent_type: o.type === "array" ? "array" : "object", size: r, hovered: !1 };
|
|
4278
4278
|
};
|
|
4279
|
-
var oc =
|
|
4279
|
+
var oc = d(/* @__PURE__ */ n(function o(r, i, f) {
|
|
4280
4280
|
w(this, o), this.name = r, this.value = i, this.type = ne(i, f);
|
|
4281
4281
|
}, "e"));
|
|
4282
4282
|
B(ho);
|
|
@@ -4291,7 +4291,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4291
4291
|
return typeof Y.name != "object" || Array.isArray(Y.name) || (te = [((F = Y.name) === null || F === void 0 ? void 0 : F.displayName) || ((O = Y.name) === null || O === void 0 ? void 0 : O.name) || ((L = Y.name) === null || L === void 0 || (W = L.type) === null || W === void 0 ? void 0 : W.name) || "Anonymous"]), Array.isArray(Y.src) && Y.groupArraysAfterLength && Y.src.length > Y.groupArraysAfterLength && (ce = Ka), c().createElement("div", { className: "pretty-json-container object-container" }, c().createElement("div", { className: "object-content" }, c().createElement(ce, Object.assign({ namespace: te, depth: 0, jsvRoot: !0 }, Y))));
|
|
4292
4292
|
}, i;
|
|
4293
4293
|
}
|
|
4294
|
-
return n(r, "t"),
|
|
4294
|
+
return n(r, "t"), u(r, o), d(r);
|
|
4295
4295
|
})(c().PureComponent), ic = (function(o) {
|
|
4296
4296
|
function r(i) {
|
|
4297
4297
|
var f;
|
|
@@ -4301,7 +4301,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4301
4301
|
f.props.submit(f.state.input);
|
|
4302
4302
|
}, f.state = { input: i.input ? i.input : "" }, f;
|
|
4303
4303
|
}
|
|
4304
|
-
return n(r, "t"),
|
|
4304
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
4305
4305
|
var i = this, f = this.props, M = f.theme, P = f.rjvId, F = f.isValid, O = this.state.input, L = F(O);
|
|
4306
4306
|
return c().createElement("div", Object.assign({ className: "key-modal-request" }, X(M, "key-modal-request"), { onClick: this.handleCloseModal }), c().createElement("div", Object.assign({}, X(M, "key-modal"), { onClick: /* @__PURE__ */ n(function(W) {
|
|
4307
4307
|
W.stopPropagation();
|
|
@@ -4328,7 +4328,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4328
4328
|
L.new_value = S({}, L.existing_value), L.new_value[F] = i.props.defaultValue, Bt.dispatch({ name: "VARIABLE_ADDED", rjvId: O, data: L });
|
|
4329
4329
|
}, i;
|
|
4330
4330
|
}
|
|
4331
|
-
return n(r, "t"),
|
|
4331
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
4332
4332
|
var i = this.props, f = i.active, M = i.theme, P = i.rjvId;
|
|
4333
4333
|
return f ? c().createElement(ic, { rjvId: P, theme: M, isValid: this.isValid, submit: this.submit }) : null;
|
|
4334
4334
|
}, "value") }]);
|
|
@@ -4336,7 +4336,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4336
4336
|
function r() {
|
|
4337
4337
|
return w(this, r), h(this, r, arguments);
|
|
4338
4338
|
}
|
|
4339
|
-
return n(r, "t"),
|
|
4339
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "render", value: /* @__PURE__ */ n(function() {
|
|
4340
4340
|
var i = this.props, f = i.message, M = i.active, P = i.theme, F = i.rjvId;
|
|
4341
4341
|
return M ? c().createElement("div", Object.assign({ className: "validation-failure" }, X(P, "validation-failure"), { onClick: /* @__PURE__ */ n(function() {
|
|
4342
4342
|
Bt.dispatch({ rjvId: F, name: "RESET" });
|
|
@@ -4366,7 +4366,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4366
4366
|
f.setState({ validationFailure: !1, addKeyRequest: !1 });
|
|
4367
4367
|
}, f.state = { addKeyRequest: !1, editKeyRequest: !1, validationFailure: !1, src: r.defaultProps.src, name: r.defaultProps.name, theme: r.defaultProps.theme, validationMessage: r.defaultProps.validationMessage, prevSrc: r.defaultProps.src, prevName: r.defaultProps.name, prevTheme: r.defaultProps.theme }, f;
|
|
4368
4368
|
}
|
|
4369
|
-
return n(r, "t"),
|
|
4369
|
+
return n(r, "t"), u(r, o), d(r, [{ key: "componentDidMount", value: /* @__PURE__ */ n(function() {
|
|
4370
4370
|
Ct.set(this.rjvId, "global", "src", this.state.src);
|
|
4371
4371
|
var i = this.getListeners();
|
|
4372
4372
|
for (var f in i) Ct.on(f + "-" + this.rjvId, i[f]);
|
|
@@ -4442,19 +4442,19 @@ const Ku = /* @__PURE__ */ n(({ open: e, onClose: a }) => {
|
|
|
4442
4442
|
}, "handleJsonEdit"), w = /* @__PURE__ */ n(() => {
|
|
4443
4443
|
v && p({ ...v, interactions: [...v.interactions ?? []] }), g(null), a();
|
|
4444
4444
|
}, "handleClose"), k = /* @__PURE__ */ n((y) => y ? y.map((b, h) => {
|
|
4445
|
-
const z = b.interactionQuestion || "No question available",
|
|
4445
|
+
const z = b.interactionQuestion || "No question available", u = b.parts.filter((A) => A.text).map((A) => A.text).join(`
|
|
4446
4446
|
|
|
4447
4447
|
`);
|
|
4448
4448
|
return `------ Interaction ${h + 1} ---------
|
|
4449
4449
|
Question: ${z}
|
|
4450
4450
|
Response:
|
|
4451
4451
|
|
|
4452
|
-
${
|
|
4452
|
+
${u || "No response available"}
|
|
4453
4453
|
|
|
4454
4454
|
`;
|
|
4455
4455
|
}).join(`
|
|
4456
|
-
`) : "", "formatInteractionsAsText"),
|
|
4457
|
-
if (!
|
|
4456
|
+
`) : "", "formatInteractionsAsText"), d = v || l;
|
|
4457
|
+
if (!d)
|
|
4458
4458
|
return /* @__PURE__ */ I(Po, { open: e, onClose: w, maxWidth: "lg", fullWidth: !0, children: [
|
|
4459
4459
|
/* @__PURE__ */ I(Fo, { children: [
|
|
4460
4460
|
"Session Data",
|
|
@@ -4533,7 +4533,7 @@ ${d || "No response available"}
|
|
|
4533
4533
|
/* @__PURE__ */ t(mi, { value: m, index: 0, children: /* @__PURE__ */ t(se, { sx: { height: "50vh", overflow: "auto" }, children: /* @__PURE__ */ t(
|
|
4534
4534
|
Uu,
|
|
4535
4535
|
{
|
|
4536
|
-
src:
|
|
4536
|
+
src: d,
|
|
4537
4537
|
theme: "monokai",
|
|
4538
4538
|
name: "session",
|
|
4539
4539
|
collapsed: T,
|
|
@@ -4563,7 +4563,7 @@ ${d || "No response available"}
|
|
|
4563
4563
|
whiteSpace: "pre-wrap",
|
|
4564
4564
|
color: "#ffffff"
|
|
4565
4565
|
},
|
|
4566
|
-
children: k(
|
|
4566
|
+
children: k(d.interactions)
|
|
4567
4567
|
}
|
|
4568
4568
|
) })
|
|
4569
4569
|
] }),
|
|
@@ -4630,11 +4630,11 @@ ${d || "No response available"}
|
|
|
4630
4630
|
le(() => {
|
|
4631
4631
|
v(a.getPrompts());
|
|
4632
4632
|
}, [l, a]);
|
|
4633
|
-
const T = ye((
|
|
4634
|
-
m(
|
|
4633
|
+
const T = ye((d) => {
|
|
4634
|
+
m(d.currentTarget);
|
|
4635
4635
|
}, []), E = ye(() => m(null), []), D = ye(
|
|
4636
|
-
(
|
|
4637
|
-
e(
|
|
4636
|
+
(d) => {
|
|
4637
|
+
e(d.promptText, d.promptJson), m(null);
|
|
4638
4638
|
},
|
|
4639
4639
|
[e]
|
|
4640
4640
|
), S = ye(() => {
|
|
@@ -4649,10 +4649,10 @@ ${d || "No response available"}
|
|
|
4649
4649
|
ref: g,
|
|
4650
4650
|
size: "small",
|
|
4651
4651
|
onClick: T,
|
|
4652
|
-
sx: /* @__PURE__ */ n((
|
|
4653
|
-
color: k ?
|
|
4652
|
+
sx: /* @__PURE__ */ n((d) => ({
|
|
4653
|
+
color: k ? d.palette.text.primary : d.palette.text.secondary,
|
|
4654
4654
|
p: 0.75,
|
|
4655
|
-
"&:hover": { color:
|
|
4655
|
+
"&:hover": { color: d.palette.text.primary, backgroundColor: d.palette.background.paper }
|
|
4656
4656
|
}), "sx"),
|
|
4657
4657
|
"aria-label": "Histórico de prompts",
|
|
4658
4658
|
children: /* @__PURE__ */ t(ds, { size: 16 })
|
|
@@ -4668,9 +4668,9 @@ ${d || "No response available"}
|
|
|
4668
4668
|
transformOrigin: { vertical: "bottom", horizontal: "left" },
|
|
4669
4669
|
slotProps: {
|
|
4670
4670
|
paper: {
|
|
4671
|
-
sx: /* @__PURE__ */ n((
|
|
4672
|
-
backgroundColor:
|
|
4673
|
-
border: `1px solid ${
|
|
4671
|
+
sx: /* @__PURE__ */ n((d) => ({
|
|
4672
|
+
backgroundColor: d.palette.surface.raised,
|
|
4673
|
+
border: `1px solid ${d.palette.divider}`,
|
|
4674
4674
|
mb: 0.5,
|
|
4675
4675
|
width: 380,
|
|
4676
4676
|
maxWidth: "90vw",
|
|
@@ -4682,21 +4682,21 @@ ${d || "No response available"}
|
|
|
4682
4682
|
/* @__PURE__ */ I(
|
|
4683
4683
|
R,
|
|
4684
4684
|
{
|
|
4685
|
-
sx: /* @__PURE__ */ n((
|
|
4685
|
+
sx: /* @__PURE__ */ n((d) => ({
|
|
4686
4686
|
display: "flex",
|
|
4687
4687
|
alignItems: "center",
|
|
4688
4688
|
justifyContent: "space-between",
|
|
4689
4689
|
px: 1.5,
|
|
4690
4690
|
py: 1,
|
|
4691
|
-
borderBottom: `1px solid ${
|
|
4691
|
+
borderBottom: `1px solid ${d.palette.border.soft}`
|
|
4692
4692
|
}), "sx"),
|
|
4693
4693
|
children: [
|
|
4694
4694
|
/* @__PURE__ */ I(
|
|
4695
4695
|
Z,
|
|
4696
4696
|
{
|
|
4697
|
-
sx: /* @__PURE__ */ n((
|
|
4697
|
+
sx: /* @__PURE__ */ n((d) => ({
|
|
4698
4698
|
fontSize: 10,
|
|
4699
|
-
color:
|
|
4699
|
+
color: d.palette.text.disabled,
|
|
4700
4700
|
textTransform: "uppercase",
|
|
4701
4701
|
letterSpacing: 0.6,
|
|
4702
4702
|
fontWeight: 500
|
|
@@ -4715,14 +4715,14 @@ ${d || "No response available"}
|
|
|
4715
4715
|
size: "small",
|
|
4716
4716
|
onClick: S,
|
|
4717
4717
|
startIcon: /* @__PURE__ */ t(ls, { size: 12 }),
|
|
4718
|
-
sx: /* @__PURE__ */ n((
|
|
4718
|
+
sx: /* @__PURE__ */ n((d) => ({
|
|
4719
4719
|
fontSize: 10,
|
|
4720
|
-
color:
|
|
4720
|
+
color: d.palette.text.secondary,
|
|
4721
4721
|
textTransform: "none",
|
|
4722
4722
|
minWidth: 0,
|
|
4723
4723
|
px: 0.75,
|
|
4724
4724
|
py: 0.25,
|
|
4725
|
-
"&:hover": { color:
|
|
4725
|
+
"&:hover": { color: d.palette.secondary.main, backgroundColor: d.palette.surface.hover }
|
|
4726
4726
|
}), "sx"),
|
|
4727
4727
|
children: "Limpar"
|
|
4728
4728
|
}
|
|
@@ -4738,12 +4738,12 @@ ${d || "No response available"}
|
|
|
4738
4738
|
overflowY: "auto",
|
|
4739
4739
|
py: 0.5
|
|
4740
4740
|
},
|
|
4741
|
-
children: w.map((
|
|
4741
|
+
children: w.map((d, x) => {
|
|
4742
4742
|
const y = s.length - x;
|
|
4743
4743
|
return /* @__PURE__ */ I(
|
|
4744
4744
|
R,
|
|
4745
4745
|
{
|
|
4746
|
-
onClick: /* @__PURE__ */ n(() => D(
|
|
4746
|
+
onClick: /* @__PURE__ */ n(() => D(d), "onClick"),
|
|
4747
4747
|
sx: /* @__PURE__ */ n((b) => ({
|
|
4748
4748
|
display: "flex",
|
|
4749
4749
|
alignItems: "flex-start",
|
|
@@ -4791,12 +4791,12 @@ ${d || "No response available"}
|
|
|
4791
4791
|
whiteSpace: "pre-wrap",
|
|
4792
4792
|
wordBreak: "break-word"
|
|
4793
4793
|
}), "sx"),
|
|
4794
|
-
children:
|
|
4794
|
+
children: d.promptText
|
|
4795
4795
|
}
|
|
4796
4796
|
)
|
|
4797
4797
|
]
|
|
4798
4798
|
},
|
|
4799
|
-
|
|
4799
|
+
d.id ?? `${x}-${d.created}`
|
|
4800
4800
|
);
|
|
4801
4801
|
})
|
|
4802
4802
|
}
|
|
@@ -4804,14 +4804,14 @@ ${d || "No response available"}
|
|
|
4804
4804
|
s.length > wo && /* @__PURE__ */ I(
|
|
4805
4805
|
R,
|
|
4806
4806
|
{
|
|
4807
|
-
sx: /* @__PURE__ */ n((
|
|
4807
|
+
sx: /* @__PURE__ */ n((d) => ({
|
|
4808
4808
|
px: 1.5,
|
|
4809
4809
|
py: 0.75,
|
|
4810
|
-
borderTop: `1px solid ${
|
|
4810
|
+
borderTop: `1px solid ${d.palette.border.soft}`,
|
|
4811
4811
|
fontSize: 10,
|
|
4812
|
-
color:
|
|
4812
|
+
color: d.palette.text.disabled,
|
|
4813
4813
|
textAlign: "center",
|
|
4814
|
-
fontFamily:
|
|
4814
|
+
fontFamily: d.typography.fontFamilyMono
|
|
4815
4815
|
}), "sx"),
|
|
4816
4816
|
children: [
|
|
4817
4817
|
"+",
|
|
@@ -4875,13 +4875,13 @@ const bi = 70, yi = 300, ua = In(({
|
|
|
4875
4875
|
onTopSlotExpandedChange: S,
|
|
4876
4876
|
inputMinHeight: w,
|
|
4877
4877
|
onBeforeSend: k,
|
|
4878
|
-
onSubmit:
|
|
4878
|
+
onSubmit: d,
|
|
4879
4879
|
sendButtonProps: x,
|
|
4880
4880
|
allowEmptyDraft: y = !0,
|
|
4881
4881
|
submitAdornment: b,
|
|
4882
4882
|
onSlashQuery: h,
|
|
4883
4883
|
onAtQuery: z,
|
|
4884
|
-
onAtPersonQuery:
|
|
4884
|
+
onAtPersonQuery: u,
|
|
4885
4885
|
atPersonLabel: A = "Pessoas",
|
|
4886
4886
|
atLocationLabel: c = "Locais",
|
|
4887
4887
|
onAnalyzePrompt: _,
|
|
@@ -4928,8 +4928,8 @@ const bi = 70, yi = 300, ua = In(({
|
|
|
4928
4928
|
var C;
|
|
4929
4929
|
(C = kt.current) == null || C.click();
|
|
4930
4930
|
}, []);
|
|
4931
|
-
const [V, be] = Q(null), [Fe, at] = Q([]), [jt, zt] = Q(!1), [Ot, Ie] = Q(0), [We, he] = Q(null), [Ve, tt] = Q(null), Xe = ue(0), Ke = ue(null), mt = ue({ onSlashQuery: h, onAtQuery: z, onAtPersonQuery:
|
|
4932
|
-
mt.current = { onSlashQuery: h, onAtQuery: z, onAtPersonQuery:
|
|
4931
|
+
const [V, be] = Q(null), [Fe, at] = Q([]), [jt, zt] = Q(!1), [Ot, Ie] = Q(0), [We, he] = Q(null), [Ve, tt] = Q(null), Xe = ue(0), Ke = ue(null), mt = ue({ onSlashQuery: h, onAtQuery: z, onAtPersonQuery: u });
|
|
4932
|
+
mt.current = { onSlashQuery: h, onAtQuery: z, onAtPersonQuery: u };
|
|
4933
4933
|
const rn = ue(0), Jt = ue(0), fn = _ ?? (qe ? (C, H) => qe.analyze(C, H) : void 0), Ht = j ?? (qe ? (C, H, ie) => qe.resolveDates(C, H, ie) : void 0), Yt = ue(V);
|
|
4934
4934
|
Yt.current = V;
|
|
4935
4935
|
const mn = ue(() => {
|
|
@@ -5238,7 +5238,7 @@ const bi = 70, yi = 300, ua = In(({
|
|
|
5238
5238
|
}, [a]);
|
|
5239
5239
|
const wn = /* @__PURE__ */ n(async (C) => {
|
|
5240
5240
|
const H = (C ?? pe).trim().replace(/\u00A0/g, " "), ie = C === void 0, ae = ie ? rt : [];
|
|
5241
|
-
if (!H && !y && ae.length === 0 || Be || Qt && !qt || !
|
|
5241
|
+
if (!H && !y && ae.length === 0 || Be || Qt && !qt || !d && Xt !== ke.Connected) return;
|
|
5242
5242
|
qt && on("idle");
|
|
5243
5243
|
const we = (C ?? pe).trim();
|
|
5244
5244
|
we && Ur(we), Ye(""), ie && Qe([]), At(!0);
|
|
@@ -5247,9 +5247,9 @@ const bi = 70, yi = 300, ua = In(({
|
|
|
5247
5247
|
const Zt = Ne.dataUrl.indexOf(","), kn = Zt >= 0 ? Ne.dataUrl.slice(Zt + 1) : Ne.dataUrl;
|
|
5248
5248
|
return { mimeType: Ne.mimeType, data: kn };
|
|
5249
5249
|
}) : void 0;
|
|
5250
|
-
if (
|
|
5250
|
+
if (d) {
|
|
5251
5251
|
try {
|
|
5252
|
-
await
|
|
5252
|
+
await d(H);
|
|
5253
5253
|
} catch (Ne) {
|
|
5254
5254
|
console.error("[PromptV2] onSubmit failed", Ne);
|
|
5255
5255
|
}
|
|
@@ -5306,7 +5306,7 @@ const bi = 70, yi = 300, ua = In(({
|
|
|
5306
5306
|
}
|
|
5307
5307
|
C.key === "Enter" && !C.shiftKey && (C.preventDefault(), wn());
|
|
5308
5308
|
}
|
|
5309
|
-
}, "handleKeyDown"), to = !
|
|
5309
|
+
}, "handleKeyDown"), to = !d && Xt === ke.Idle, no = !!d || Xt === ke.Connected, an = !d && Xt !== ke.Connected, mr = !no || Qt && !qt || Be || !y && !pe.trim() && rt.length === 0, ro = v && E ? "" : m ?? "Pergunte sobre seus dados…", oo = /* @__PURE__ */ n(() => {
|
|
5310
5310
|
S == null || S(!E);
|
|
5311
5311
|
}, "handleToggleTopSlot"), gr = v ? 2 : g ?? 999;
|
|
5312
5312
|
return /* @__PURE__ */ I(
|
|
@@ -6550,7 +6550,7 @@ const Gu = `${na()}/open/getImage`, Ju = Zo({}), Yu = /* @__PURE__ */ n(() => pn
|
|
|
6550
6550
|
] }) }), "blockquote")
|
|
6551
6551
|
};
|
|
6552
6552
|
T.palette.primary.main, `${T.palette.primary.main}`, T.palette.text.primary, Object.assign(S, {});
|
|
6553
|
-
const
|
|
6553
|
+
const d = s === "compact" ? {
|
|
6554
6554
|
input: /* @__PURE__ */ n(({ checked: y, disabled: b, ...h }) => h.type === "checkbox" ? y ? /* @__PURE__ */ t(
|
|
6555
6555
|
li,
|
|
6556
6556
|
{
|
|
@@ -6609,7 +6609,7 @@ const Gu = `${na()}/open/getImage`, Ju = Zo({}), Yu = /* @__PURE__ */ n(() => pn
|
|
|
6609
6609
|
{
|
|
6610
6610
|
skipHtml: !1,
|
|
6611
6611
|
urlTransform: /* @__PURE__ */ n((y) => y, "urlTransform"),
|
|
6612
|
-
components:
|
|
6612
|
+
components: d,
|
|
6613
6613
|
remarkPlugins: [Qd],
|
|
6614
6614
|
rehypePlugins: [Xd],
|
|
6615
6615
|
children: E
|
|
@@ -6683,14 +6683,14 @@ const Zu = vc`
|
|
|
6683
6683
|
elevation: T = 8,
|
|
6684
6684
|
onVisibleQuestionChange: E,
|
|
6685
6685
|
...D
|
|
6686
|
-
} = e, [S, w] = Q(!1), [k,
|
|
6686
|
+
} = e, [S, w] = Q(!1), [k, d] = Q(null), x = ye((N) => {
|
|
6687
6687
|
let B = N;
|
|
6688
6688
|
if (e.onRenderPrompt && N) {
|
|
6689
6689
|
const { promptAsString: J, json: q } = e.onRenderPrompt(N);
|
|
6690
6690
|
B = J ?? null;
|
|
6691
6691
|
}
|
|
6692
|
-
|
|
6693
|
-
}, [E]), y = k || v || "Chat", b = l.bottom ? l.bottom + (((A = e.chatPositionOffSet) == null ? void 0 : A.bottom) ?? 0) : void 0, h = l.right ? (l.right ?? 0) + (((c = e.chatPositionOffSet) == null ? void 0 : c.right) ?? 0) : void 0, z = l.left ? l.left + (((_ = e.chatPositionOffSet) == null ? void 0 : _.left) ?? 0) : void 0,
|
|
6692
|
+
d(B ?? ""), E == null || E(N);
|
|
6693
|
+
}, [E]), y = k || v || "Chat", b = l.bottom ? l.bottom + (((A = e.chatPositionOffSet) == null ? void 0 : A.bottom) ?? 0) : void 0, h = l.right ? (l.right ?? 0) + (((c = e.chatPositionOffSet) == null ? void 0 : c.right) ?? 0) : void 0, z = l.left ? l.left + (((_ = e.chatPositionOffSet) == null ? void 0 : _.left) ?? 0) : void 0, u = l.top != null ? l.top + 20 + (((j = e.chatPositionOffSet) == null ? void 0 : j.top) ?? 0) : void 0;
|
|
6694
6694
|
return /* @__PURE__ */ I(re, { children: [
|
|
6695
6695
|
/* @__PURE__ */ t(xc, { direction: "up", in: S, children: /* @__PURE__ */ I(
|
|
6696
6696
|
ea,
|
|
@@ -6698,8 +6698,8 @@ const Zu = vc`
|
|
|
6698
6698
|
elevation: T,
|
|
6699
6699
|
sx: {
|
|
6700
6700
|
position: "fixed",
|
|
6701
|
-
bottom:
|
|
6702
|
-
top:
|
|
6701
|
+
bottom: u != null ? void 0 : b,
|
|
6702
|
+
top: u,
|
|
6703
6703
|
right: h,
|
|
6704
6704
|
left: z,
|
|
6705
6705
|
backgroundColor: "#000000d6",
|
|
@@ -6847,7 +6847,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
|
|
|
6847
6847
|
behavior: "smooth"
|
|
6848
6848
|
});
|
|
6849
6849
|
}, [(y = e.textDetails) == null ? void 0 : y.version]), !l) return null;
|
|
6850
|
-
const D = ot.getPartTextContent(e), w = (((e.ended ?? /* @__PURE__ */ new Date()).getTime() - e.created.getTime()) / 1e3).toFixed(2),
|
|
6850
|
+
const D = ot.getPartTextContent(e), w = (((e.ended ?? /* @__PURE__ */ new Date()).getTime() - e.created.getTime()) / 1e3).toFixed(2), d = s ? m ? "Pensando..." : `Pensou por ${w}s` : `Thought ${w}s`, x = /* @__PURE__ */ n((b, h) => null, "onDrawCodeBlock");
|
|
6851
6851
|
return /* @__PURE__ */ I(_e, { direction: "column", style: { display: "flex", borderRadius: "5px", marginTop: "10px", color: "var(--text-secondary)", fontSize: "0.75rem" }, children: [
|
|
6852
6852
|
/* @__PURE__ */ t(Wt, { size: "small", disableRipple: !0, onClick: /* @__PURE__ */ n(() => T(!g), "onClick"), sx: {
|
|
6853
6853
|
color: "inherit",
|
|
@@ -6862,7 +6862,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
|
|
|
6862
6862
|
"&:focus-visible": { outline: "none" },
|
|
6863
6863
|
"&.Mui-focusVisible": { outline: "none", boxShadow: "none" }
|
|
6864
6864
|
}, children: /* @__PURE__ */ I(_e, { direction: "row", sx: { display: "flex", cursor: "pointer", alignItems: "center", alignContent: "flex-end", flexWrap: "nowrap" }, gap: 0.5, children: [
|
|
6865
|
-
/* @__PURE__ */ t("div", { style: { minWidth: "90px" }, children:
|
|
6865
|
+
/* @__PURE__ */ t("div", { style: { minWidth: "90px" }, children: d }),
|
|
6866
6866
|
/* @__PURE__ */ t(_r, { sx: { fontSize: "1rem", rotate: g ? "0deg" : "90deg", transition: "rotate 180ms ease-out" } })
|
|
6867
6867
|
] }) }),
|
|
6868
6868
|
/* @__PURE__ */ t("div", { ref: E, style: {
|
|
@@ -6987,7 +6987,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
|
|
|
6987
6987
|
isLastInlineInGroup: E = !1
|
|
6988
6988
|
}) => {
|
|
6989
6989
|
var K, U, ne, Se, Re, Ue;
|
|
6990
|
-
const [D, S] = Q(null), w = ue(null), k = ue(null),
|
|
6990
|
+
const [D, S] = Q(null), w = ue(null), k = ue(null), d = wt(), x = Ar(d.breakpoints.down("sm")), y = !!D, b = /* @__PURE__ */ n((G) => {
|
|
6991
6991
|
S(G.currentTarget);
|
|
6992
6992
|
}, "handleViewClick"), h = /* @__PURE__ */ n(() => {
|
|
6993
6993
|
S(null);
|
|
@@ -6995,14 +6995,14 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
|
|
|
6995
6995
|
padding: "0px",
|
|
6996
6996
|
borderRadius: "0px",
|
|
6997
6997
|
margin: "0px"
|
|
6998
|
-
},
|
|
6998
|
+
}, u = (K = s.functionDetails) == null ? void 0 : K.status, A = s.eventType === ve.PartialFunctionCall || s.eventType === ve.FunctionCall || s.eventType === ve.FunctionResponse, c = (ne = (U = s.functionDetails) == null ? void 0 : U.start) == null ? void 0 : ne.getTime(), _ = (Re = (Se = s.functionDetails) == null ? void 0 : Se.end) == null ? void 0 : Re.getTime(), j = E || A && u !== "Done", N = j ? "parallax-container" : "";
|
|
6999
6999
|
le(() => {
|
|
7000
7000
|
k.current && j && k.current.scrollTo({
|
|
7001
7001
|
top: k.current.scrollHeight,
|
|
7002
7002
|
behavior: "smooth"
|
|
7003
7003
|
});
|
|
7004
7004
|
}, [m, j]);
|
|
7005
|
-
const B =
|
|
7005
|
+
const B = d.palette.text.secondary, J = d.palette.action.hover, q = d.palette.divider, ee = d.palette.mode === "dark" ? "rgba(255, 255, 255, 0.15)" : "rgba(0, 0, 0, 0.06)";
|
|
7006
7006
|
return /* @__PURE__ */ I(re, { children: [
|
|
7007
7007
|
/* @__PURE__ */ I(
|
|
7008
7008
|
se,
|
|
@@ -7094,7 +7094,7 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
|
|
|
7094
7094
|
width: "16px",
|
|
7095
7095
|
height: "16px",
|
|
7096
7096
|
"&:hover": {
|
|
7097
|
-
backgroundColor:
|
|
7097
|
+
backgroundColor: d.palette.action.selected
|
|
7098
7098
|
}
|
|
7099
7099
|
},
|
|
7100
7100
|
children: /* @__PURE__ */ t(iu, { style: { fontSize: 10 } })
|
|
@@ -7115,20 +7115,20 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
|
|
|
7115
7115
|
flex: 1,
|
|
7116
7116
|
"&::-webkit-scrollbar": {
|
|
7117
7117
|
width: "5px",
|
|
7118
|
-
background:
|
|
7118
|
+
background: d.palette.background.paper
|
|
7119
7119
|
},
|
|
7120
7120
|
"&::-webkit-scrollbar-track": {
|
|
7121
|
-
background:
|
|
7121
|
+
background: d.palette.background.paper,
|
|
7122
7122
|
width: "1px"
|
|
7123
7123
|
},
|
|
7124
7124
|
"&::-webkit-scrollbar-thumb": {
|
|
7125
|
-
background:
|
|
7125
|
+
background: d.palette.background.paper,
|
|
7126
7126
|
border: "1px solid",
|
|
7127
7127
|
width: "5px",
|
|
7128
|
-
borderColor:
|
|
7128
|
+
borderColor: d.palette.grey[800],
|
|
7129
7129
|
borderRadius: "4px",
|
|
7130
7130
|
"&:hover": {
|
|
7131
|
-
background:
|
|
7131
|
+
background: d.palette.background.default
|
|
7132
7132
|
}
|
|
7133
7133
|
}
|
|
7134
7134
|
},
|
|
@@ -7162,16 +7162,16 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
|
|
|
7162
7162
|
borderTop: `1px solid ${q}`,
|
|
7163
7163
|
zIndex: 2
|
|
7164
7164
|
}, children: [
|
|
7165
|
-
|
|
7165
|
+
u === "Composing" && /* @__PURE__ */ I(_e, { direction: "row", gap: 1, sx: { mt: 0.5 }, children: [
|
|
7166
7166
|
/* @__PURE__ */ t(Ee, { sx: { fontSize: "10px" }, children: "Composing" }),
|
|
7167
|
-
/* @__PURE__ */ t(Or, { size: 3, color:
|
|
7167
|
+
/* @__PURE__ */ t(Or, { size: 3, color: d.palette.primary.main })
|
|
7168
7168
|
] }),
|
|
7169
|
-
|
|
7169
|
+
u === "Executing" && /* @__PURE__ */ I(_e, { direction: "row", gap: 1, sx: { mt: 0.5, fontSize: "10px" }, children: [
|
|
7170
7170
|
/* @__PURE__ */ t(Ee, { sx: { fontSize: "10px" }, children: "Running:" }),
|
|
7171
7171
|
/* @__PURE__ */ t(En, { sx: { fontSize: "12px", mt: 0.2 } }),
|
|
7172
7172
|
/* @__PURE__ */ t(Wr, { startingPoint: ((Ue = s.functionDetails) == null ? void 0 : Ue.start) ?? /* @__PURE__ */ new Date(), on: !0 })
|
|
7173
7173
|
] }),
|
|
7174
|
-
|
|
7174
|
+
u === "Done" && /* @__PURE__ */ I(_e, { direction: "row", gap: 1, sx: { mt: 0.5, fontSize: "10px" }, children: [
|
|
7175
7175
|
/* @__PURE__ */ t(Ee, { sx: { fontSize: "10px" }, children: "Done!" }),
|
|
7176
7176
|
/* @__PURE__ */ t(En, { sx: { fontSize: "12px", mt: 0.2 } }),
|
|
7177
7177
|
/* @__PURE__ */ t(Ee, { sx: { fontSize: "10px" }, children: _ && c ? `${((_ - c) / 1e3).toFixed(2)}s` : "N\\D" })
|
|
@@ -7207,19 +7207,19 @@ const Es = /* @__PURE__ */ n((e) => !!e && (e === "ask_user" || e.endsWith("-ask
|
|
|
7207
7207
|
"&::-webkit-scrollbar": {
|
|
7208
7208
|
width: x ? "none" : "8px",
|
|
7209
7209
|
height: x ? "none" : "8px",
|
|
7210
|
-
background:
|
|
7210
|
+
background: d.palette.background.paper
|
|
7211
7211
|
},
|
|
7212
7212
|
"&::-webkit-scrollbar-track": {
|
|
7213
|
-
background:
|
|
7213
|
+
background: d.palette.background.paper,
|
|
7214
7214
|
width: x ? "none" : "5px"
|
|
7215
7215
|
},
|
|
7216
7216
|
"&::-webkit-scrollbar-thumb": {
|
|
7217
|
-
background:
|
|
7217
|
+
background: d.palette.background.default,
|
|
7218
7218
|
border: "1px solid",
|
|
7219
|
-
borderColor:
|
|
7219
|
+
borderColor: d.palette.grey[800],
|
|
7220
7220
|
borderRadius: "4px",
|
|
7221
7221
|
"&:hover": {
|
|
7222
|
-
background:
|
|
7222
|
+
background: d.palette.grey[500]
|
|
7223
7223
|
}
|
|
7224
7224
|
},
|
|
7225
7225
|
padding: "12px",
|
|
@@ -7807,7 +7807,7 @@ const ip = /* @__PURE__ */ n(({
|
|
|
7807
7807
|
);
|
|
7808
7808
|
}, "FriendlyPartDisplay"), sp = { fontSize: 10, color: "currentColor" };
|
|
7809
7809
|
function lp(e) {
|
|
7810
|
-
var v, g, T, E, D, S, w, k,
|
|
7810
|
+
var v, g, T, E, D, S, w, k, d, x, y, b;
|
|
7811
7811
|
if (e.eventType === ve.PartialFunctionCall)
|
|
7812
7812
|
return {
|
|
7813
7813
|
title: ei(((v = e.functionDetails) == null ? void 0 : v.name) ?? "Unknown"),
|
|
@@ -7815,10 +7815,10 @@ function lp(e) {
|
|
|
7815
7815
|
};
|
|
7816
7816
|
const a = (g = e.functionDetails) == null ? void 0 : g.name;
|
|
7817
7817
|
if (!a) {
|
|
7818
|
-
const h = e.eventType === ve.FunctionCall ? ((T = e.functionDetails) == null ? void 0 : T.args) ?? {} : ((E = e.functionDetails) == null ? void 0 : E.response) ?? {},
|
|
7818
|
+
const h = e.eventType === ve.FunctionCall ? ((T = e.functionDetails) == null ? void 0 : T.args) ?? {} : ((E = e.functionDetails) == null ? void 0 : E.response) ?? {}, u = (ot.isCharArray(h) ? h.join("") : ot.tryCollapseCharIndexedObject(h)) ?? h;
|
|
7819
7819
|
return {
|
|
7820
7820
|
title: "Unknown",
|
|
7821
|
-
content: ot.jsonToString(
|
|
7821
|
+
content: ot.jsonToString(u)
|
|
7822
7822
|
};
|
|
7823
7823
|
}
|
|
7824
7824
|
let l = ei(a);
|
|
@@ -7829,7 +7829,7 @@ function lp(e) {
|
|
|
7829
7829
|
let s;
|
|
7830
7830
|
if (e.eventType === ve.FunctionCall)
|
|
7831
7831
|
try {
|
|
7832
|
-
s = JSON.stringify(((
|
|
7832
|
+
s = JSON.stringify(((d = e.functionDetails) == null ? void 0 : d.args) ?? {}, null, 4);
|
|
7833
7833
|
} catch {
|
|
7834
7834
|
s = String(((x = e.functionDetails) == null ? void 0 : x.args) ?? "{}");
|
|
7835
7835
|
}
|
|
@@ -7846,8 +7846,8 @@ function lp(e) {
|
|
|
7846
7846
|
} catch {
|
|
7847
7847
|
s = String(h ?? "");
|
|
7848
7848
|
}
|
|
7849
|
-
const
|
|
7850
|
-
s.length >
|
|
7849
|
+
const u = 1e5;
|
|
7850
|
+
s.length > u && (s = s.substring(0, u) + `
|
|
7851
7851
|
|
|
7852
7852
|
... [truncated — response too large to display]`);
|
|
7853
7853
|
}
|
|
@@ -7869,12 +7869,12 @@ const cp = {
|
|
|
7869
7869
|
var D, S, w, k;
|
|
7870
7870
|
const v = lp(e);
|
|
7871
7871
|
if (m) {
|
|
7872
|
-
const
|
|
7872
|
+
const d = cp[e.eventType] ?? "partial";
|
|
7873
7873
|
return /* @__PURE__ */ t(
|
|
7874
7874
|
ip,
|
|
7875
7875
|
{
|
|
7876
7876
|
toolName: ((D = e.functionDetails) == null ? void 0 : D.name) ?? "unknown",
|
|
7877
|
-
state:
|
|
7877
|
+
state: d,
|
|
7878
7878
|
args: ((S = e.functionDetails) == null ? void 0 : S.args) ?? ot.getPartTextContent(e),
|
|
7879
7879
|
isError: !1,
|
|
7880
7880
|
startTime: (w = e.functionDetails) == null ? void 0 : w.start,
|
|
@@ -7887,7 +7887,7 @@ const cp = {
|
|
|
7887
7887
|
|
|
7888
7888
|
${v.content}
|
|
7889
7889
|
|
|
7890
|
-
\`\`\``, E = /* @__PURE__ */ n((
|
|
7890
|
+
\`\`\``, E = /* @__PURE__ */ n((d, x) => null, "onDrawCodeBlock");
|
|
7891
7891
|
return /* @__PURE__ */ t(
|
|
7892
7892
|
Ms,
|
|
7893
7893
|
{
|
|
@@ -8063,7 +8063,7 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
|
|
|
8063
8063
|
);
|
|
8064
8064
|
const D = e.eventType === ve.FunctionResponse ? ((Ue = e.functionDetails) == null ? void 0 : Ue.response) ?? null : null, S = p ?? D, w = S != null || !T || !E;
|
|
8065
8065
|
if (!E) return null;
|
|
8066
|
-
const { title: k, questions:
|
|
8066
|
+
const { title: k, questions: d } = E, x = /* @__PURE__ */ n((G) => d[G].id || String(G), "qid"), y = a ? { maxWidth: "100%" } : { border: "1px solid", borderColor: "divider", borderRadius: 2, px: 2, py: 1.5, my: 0.5, maxWidth: "100%" };
|
|
8067
8067
|
if (w) {
|
|
8068
8068
|
if (S.indexOf("Prompt cancelado") != -1)
|
|
8069
8069
|
return /* @__PURE__ */ I(it, { sx: { display: "inline-flex", backgroundColor: g.palette.background.paper, px: 2, pb: 0.5, mb: 2, borderRadius: 1, flexWrap: "nowrap", alignItems: "center" }, direction: "row", gap: 1, children: [
|
|
@@ -8073,7 +8073,7 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
|
|
|
8073
8073
|
const $ = mp(S), me = $ ? null : gp(S);
|
|
8074
8074
|
return /* @__PURE__ */ I(R, { sx: y, children: [
|
|
8075
8075
|
k && /* @__PURE__ */ t(Z, { variant: "subtitle2", sx: { mb: 1.25, fontWeight: 600 }, children: k }),
|
|
8076
|
-
/* @__PURE__ */ t(it, { spacing: 1.25, children:
|
|
8076
|
+
/* @__PURE__ */ t(it, { spacing: 1.25, children: d.map((Pe, je) => {
|
|
8077
8077
|
const qe = ($ == null ? void 0 : $.find((Be) => Be.questionId === x(je))) ?? null, ze = (qe == null ? void 0 : qe.selected) ?? [], pe = ((qe == null ? void 0 : qe.note) ?? "").trim(), Ye = ze.length ? ze.join(", ") : pe || "—", yt = ze.length && pe ? pe : "", ut = ze.length > 0 || Pe.options.length === 0 && !!pe;
|
|
8078
8078
|
return /* @__PURE__ */ I(R, { children: [
|
|
8079
8079
|
/* @__PURE__ */ t(Z, { variant: "body2", sx: { fontWeight: 500 }, children: Pe.text }),
|
|
@@ -8095,8 +8095,8 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
|
|
|
8095
8095
|
/* @__PURE__ */ t(Z, { variant: "caption", sx: { display: "block", mt: 1, color: "text.secondary" }, children: me ?? "✓ answered" })
|
|
8096
8096
|
] });
|
|
8097
8097
|
}
|
|
8098
|
-
const b = /* @__PURE__ */ n((G) => s[G] ?? { selected: [], note: "" }, "getState"), h = /* @__PURE__ */ n((G) => b(G).selected, "selectedFor"), z = /* @__PURE__ */ n((G) => b(G).note, "noteFor"),
|
|
8099
|
-
answers:
|
|
8098
|
+
const b = /* @__PURE__ */ n((G) => s[G] ?? { selected: [], note: "" }, "getState"), h = /* @__PURE__ */ n((G) => b(G).selected, "selectedFor"), z = /* @__PURE__ */ n((G) => b(G).note, "noteFor"), u = Object.values(s).some((G) => G.note.trim().length > 0), c = d.length === 1 && d[0].kind === "single" && !u, _ = !c, j = /* @__PURE__ */ n((G) => JSON.stringify({
|
|
8099
|
+
answers: d.map(($, me) => {
|
|
8100
8100
|
const Pe = G[me] ?? { selected: [], note: "" }, je = Pe.note.trim();
|
|
8101
8101
|
return { questionId: $.id || String(me), selected: Pe.selected, ...je ? { note: je } : {} };
|
|
8102
8102
|
})
|
|
@@ -8121,7 +8121,7 @@ const bp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
|
|
|
8121
8121
|
}, "setValue"), K = /* @__PURE__ */ n((G) => h(G)[0] ?? "", "valueFor");
|
|
8122
8122
|
return /* @__PURE__ */ I(R, { sx: y, children: [
|
|
8123
8123
|
k && /* @__PURE__ */ t(Z, { variant: "subtitle2", sx: { mb: 1.25, fontWeight: 600 }, children: k }),
|
|
8124
|
-
/* @__PURE__ */ t(it, { spacing: 2, children:
|
|
8124
|
+
/* @__PURE__ */ t(it, { spacing: 2, children: d.map((G, $) => /* @__PURE__ */ I(R, { children: [
|
|
8125
8125
|
/* @__PURE__ */ t(Z, { variant: "body2", sx: { mb: 0.75, fontWeight: 500 }, children: G.text }),
|
|
8126
8126
|
G.kind === "multi" && /* @__PURE__ */ t(cu, { children: G.options.map((me) => /* @__PURE__ */ t(
|
|
8127
8127
|
lu,
|
|
@@ -8224,30 +8224,30 @@ n(xp, "sentinelOf");
|
|
|
8224
8224
|
const vp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
|
|
8225
8225
|
var b, h, z;
|
|
8226
8226
|
const { agentGatewayService: l, onRequestAuth: p, renderAuthPrompt: m } = Ze(), [s, v] = Q("idle"), g = ue(null), T = (b = e.functionDetails) == null ? void 0 : b.id, E = Ce(() => {
|
|
8227
|
-
var
|
|
8228
|
-
return yp((
|
|
8227
|
+
var u;
|
|
8228
|
+
return yp((u = e.functionDetails) == null ? void 0 : u.args);
|
|
8229
8229
|
}, [(h = e.functionDetails) == null ? void 0 : h.args]), D = e.eventType === ve.FunctionResponse ? ((z = e.functionDetails) == null ? void 0 : z.response) ?? null : null, S = s === "done" || D != null || !T, w = a ? { maxWidth: "100%", pb: 2 } : { border: "1px solid", borderColor: "divider", borderRadius: 2, px: 2, py: 1.5, my: 0.5, maxWidth: "100%" };
|
|
8230
8230
|
if (S) {
|
|
8231
|
-
const
|
|
8232
|
-
return /* @__PURE__ */ t(R, { sx: w, children: /* @__PURE__ */ t(Z, { variant: "body2", sx: { color: "text.secondary" }, children:
|
|
8231
|
+
const u = s === "done" ? null : xp(D);
|
|
8232
|
+
return /* @__PURE__ */ t(R, { sx: w, children: /* @__PURE__ */ t(Z, { variant: "body2", sx: { color: "text.secondary" }, children: u ?? "✓ Conectado" }) });
|
|
8233
8233
|
}
|
|
8234
|
-
const k = /* @__PURE__ */ n((
|
|
8234
|
+
const k = /* @__PURE__ */ n((u) => {
|
|
8235
8235
|
if (T) {
|
|
8236
|
-
g.current =
|
|
8236
|
+
g.current = u;
|
|
8237
8237
|
try {
|
|
8238
|
-
l.answerHumanTool(T,
|
|
8238
|
+
l.answerHumanTool(T, u), v("done");
|
|
8239
8239
|
} catch {
|
|
8240
8240
|
v("failed");
|
|
8241
8241
|
}
|
|
8242
8242
|
}
|
|
8243
|
-
}, "deliverToken"),
|
|
8243
|
+
}, "deliverToken"), d = /* @__PURE__ */ n(() => {
|
|
8244
8244
|
g.current && k(g.current);
|
|
8245
8245
|
}, "retryDeliver"), x = /* @__PURE__ */ n(() => v("idle"), "cancel"), y = /* @__PURE__ */ n(async () => {
|
|
8246
8246
|
if (!(!T || !p)) {
|
|
8247
8247
|
v("pending");
|
|
8248
8248
|
try {
|
|
8249
|
-
const
|
|
8250
|
-
|
|
8249
|
+
const u = await p();
|
|
8250
|
+
u ? k(u) : x();
|
|
8251
8251
|
} catch {
|
|
8252
8252
|
v("failed");
|
|
8253
8253
|
}
|
|
@@ -8256,7 +8256,7 @@ const vp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
|
|
|
8256
8256
|
return m ? /* @__PURE__ */ I(R, { sx: w, children: [
|
|
8257
8257
|
s === "failed" && /* @__PURE__ */ I(it, { direction: "row", spacing: 1, alignItems: "center", sx: { mb: 1 }, children: [
|
|
8258
8258
|
/* @__PURE__ */ t(Z, { variant: "caption", sx: { color: "error.main" }, children: "Login concluído, mas a resposta não chegou ao agente." }),
|
|
8259
|
-
/* @__PURE__ */ t(nn, { size: "small", onClick:
|
|
8259
|
+
/* @__PURE__ */ t(nn, { size: "small", onClick: d, sx: { textTransform: "none", fontSize: 12 }, children: "tentar novamente" })
|
|
8260
8260
|
] }),
|
|
8261
8261
|
m({ reason: E, onToken: k, onCancel: x })
|
|
8262
8262
|
] }) : /* @__PURE__ */ I(R, { sx: w, children: [
|
|
@@ -8268,8 +8268,8 @@ const vp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
|
|
|
8268
8268
|
onClick: y,
|
|
8269
8269
|
disabled: s === "pending",
|
|
8270
8270
|
startIcon: s === "pending" ? /* @__PURE__ */ t(No, { size: 14, color: "inherit" }) : void 0,
|
|
8271
|
-
sx: /* @__PURE__ */ n((
|
|
8272
|
-
fontFamily:
|
|
8271
|
+
sx: /* @__PURE__ */ n((u) => ({
|
|
8272
|
+
fontFamily: u.typography.fontFamilyMono,
|
|
8273
8273
|
fontSize: 12,
|
|
8274
8274
|
textTransform: "none",
|
|
8275
8275
|
px: 2,
|
|
@@ -8285,7 +8285,7 @@ const vp = /* @__PURE__ */ n(({ part: e, embedded: a = !1 }) => {
|
|
|
8285
8285
|
),
|
|
8286
8286
|
s === "failed" && /* @__PURE__ */ I(it, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
8287
8287
|
/* @__PURE__ */ t(Z, { variant: "caption", sx: { color: "error.main" }, children: g.current ? "Login concluído, mas a resposta não chegou ao agente." : "Não foi possível entrar — tente novamente." }),
|
|
8288
|
-
g.current && /* @__PURE__ */ t(nn, { size: "small", onClick:
|
|
8288
|
+
g.current && /* @__PURE__ */ t(nn, { size: "small", onClick: d, sx: { textTransform: "none", fontSize: 12 }, children: "tentar novamente" })
|
|
8289
8289
|
] })
|
|
8290
8290
|
] }) : /* @__PURE__ */ t(Z, { variant: "caption", sx: { color: "text.secondary" }, children: "Login indisponível aqui." })
|
|
8291
8291
|
] });
|
|
@@ -8378,7 +8378,7 @@ const Qo = /* @__PURE__ */ n((e) => {
|
|
|
8378
8378
|
var S, w;
|
|
8379
8379
|
const { part: a, message: l, onGoing: p = !1, preview: m = !1, embedded: s } = e, v = pn(hn), g = a.functionDetails, T = tp(g), E = wt(), D = (S = v == null ? void 0 : v.uiTools) == null ? void 0 : S.resolveAskUser(T);
|
|
8380
8380
|
if (D) {
|
|
8381
|
-
const k = D.parse ? D.parse(g == null ? void 0 : g.args) : Nr(g == null ? void 0 : g.args),
|
|
8381
|
+
const k = D.parse ? D.parse(g == null ? void 0 : g.args) : Nr(g == null ? void 0 : g.args), d = {
|
|
8382
8382
|
name: D.name,
|
|
8383
8383
|
callId: (g == null ? void 0 : g.id) ?? "",
|
|
8384
8384
|
response: g == null ? void 0 : g.response,
|
|
@@ -8386,7 +8386,14 @@ const Qo = /* @__PURE__ */ n((e) => {
|
|
|
8386
8386
|
parts: (l == null ? void 0 : l.parts) ?? [],
|
|
8387
8387
|
message: l ?? { parts: [] },
|
|
8388
8388
|
onGoing: p,
|
|
8389
|
-
preview: m
|
|
8389
|
+
preview: m,
|
|
8390
|
+
answer: /* @__PURE__ */ n((b) => {
|
|
8391
|
+
var h;
|
|
8392
|
+
return (h = v == null ? void 0 : v.agentGatewayService) == null ? void 0 : h.answerHumanTool(
|
|
8393
|
+
(g == null ? void 0 : g.id) ?? "",
|
|
8394
|
+
typeof b == "string" ? b : JSON.stringify(b)
|
|
8395
|
+
);
|
|
8396
|
+
}, "answer")
|
|
8390
8397
|
}, x = (g == null ? void 0 : g.status) === "Done", y = (w = g == null ? void 0 : g.response) == null ? void 0 : w.toString();
|
|
8391
8398
|
if (!s && x) {
|
|
8392
8399
|
if ((y == null ? void 0 : y.indexOf("Prompt cancelado")) != -1)
|
|
@@ -8395,9 +8402,9 @@ const Qo = /* @__PURE__ */ n((e) => {
|
|
|
8395
8402
|
/* @__PURE__ */ t(Ee, { variant: "body2", sx: { display: "inline-flex", mt: 1, color: "text.secondary" }, children: "Prompt Cancelado" })
|
|
8396
8403
|
] });
|
|
8397
8404
|
if (D.response)
|
|
8398
|
-
return /* @__PURE__ */ t(re, { children: D.response(k ?? {},
|
|
8405
|
+
return /* @__PURE__ */ t(re, { children: D.response(k ?? {}, d, g == null ? void 0 : g.response) });
|
|
8399
8406
|
}
|
|
8400
|
-
return /* @__PURE__ */ t(re, { children: D.question(k ?? {},
|
|
8407
|
+
return /* @__PURE__ */ t(re, { children: D.question(k ?? {}, d) });
|
|
8401
8408
|
}
|
|
8402
8409
|
return T === Ts ? /* @__PURE__ */ t(vp, { part: a, embedded: s }) : /* @__PURE__ */ t(bp, { part: a, embedded: s });
|
|
8403
8410
|
}, "AskUserDispatcher"), Un = dt.createContext(null), kp = /* @__PURE__ */ n(({ value: e, children: a }) => /* @__PURE__ */ t(Un.Provider, { value: e, children: a }), "EnvironmentProvider");
|
|
@@ -8453,7 +8460,14 @@ const js = /* @__PURE__ */ n(({ children: e }) => {
|
|
|
8453
8460
|
parts: l.parts,
|
|
8454
8461
|
message: l,
|
|
8455
8462
|
onGoing: p,
|
|
8456
|
-
preview: m
|
|
8463
|
+
preview: m,
|
|
8464
|
+
answer: /* @__PURE__ */ n((d) => {
|
|
8465
|
+
var x;
|
|
8466
|
+
return (x = s == null ? void 0 : s.agentGatewayService) == null ? void 0 : x.answerHumanTool(
|
|
8467
|
+
E,
|
|
8468
|
+
typeof d == "string" ? d : JSON.stringify(d)
|
|
8469
|
+
);
|
|
8470
|
+
}, "answer")
|
|
8457
8471
|
};
|
|
8458
8472
|
return /* @__PURE__ */ t(se, { "data-ui-tool-content": "", children: T.render(S, w) });
|
|
8459
8473
|
}, "UiToolDispatcher"), Sp = /* @__PURE__ */ n(({
|
|
@@ -8477,9 +8491,21 @@ const js = /* @__PURE__ */ n(({ children: e }) => {
|
|
|
8477
8491
|
console.warn("[uiTool] action args rejected by parse():", e.name);
|
|
8478
8492
|
return;
|
|
8479
8493
|
}
|
|
8480
|
-
const
|
|
8481
|
-
|
|
8482
|
-
|
|
8494
|
+
const d = {
|
|
8495
|
+
name: e.name,
|
|
8496
|
+
callId: a,
|
|
8497
|
+
response: p,
|
|
8498
|
+
clientOutput: m,
|
|
8499
|
+
parts: s,
|
|
8500
|
+
message: v,
|
|
8501
|
+
onGoing: g,
|
|
8502
|
+
preview: T,
|
|
8503
|
+
env: E,
|
|
8504
|
+
answer: /* @__PURE__ */ n(() => {
|
|
8505
|
+
}, "answer")
|
|
8506
|
+
};
|
|
8507
|
+
Promise.resolve().then(() => e.run(k, d)).then(() => {
|
|
8508
|
+
const x = typeof e.status == "function" ? e.status(k, d) : e.status ?? null;
|
|
8483
8509
|
x && w({ label: x, ok: !0 });
|
|
8484
8510
|
}).catch((x) => {
|
|
8485
8511
|
console.error("[uiTool] action failed:", e.name, x), w({ label: "Ação não pôde ser executada", ok: !1 });
|
|
@@ -8815,9 +8841,9 @@ function Pp(e, a) {
|
|
|
8815
8841
|
n(Pp, "suppressSlottedUiParts");
|
|
8816
8842
|
const ma = /* @__PURE__ */ n(({ message: e, showSubAgents: a, onGoing: l, container: p, preview: m, onLinkClicked: s, appendWaitingPart: v, messagesRef: g, isConnectionOpen: T, friendlyMode: E = !1 }) => {
|
|
8817
8843
|
[...de((B) => B.subAgents).values()];
|
|
8818
|
-
const { showToolCalls: S, showPersona: w } = Ze(), k = bt(),
|
|
8844
|
+
const { showToolCalls: S, showPersona: w } = Ze(), k = bt(), d = ue(null), [x, y] = Q(!1);
|
|
8819
8845
|
le(() => {
|
|
8820
|
-
const B =
|
|
8846
|
+
const B = d.current;
|
|
8821
8847
|
if (!B) return;
|
|
8822
8848
|
const J = new ResizeObserver((q) => {
|
|
8823
8849
|
var K;
|
|
@@ -8827,8 +8853,8 @@ const ma = /* @__PURE__ */ n(({ message: e, showSubAgents: a, onGoing: l, contai
|
|
|
8827
8853
|
return J.observe(B), () => J.disconnect();
|
|
8828
8854
|
}, [k.breakpoints.values.md]);
|
|
8829
8855
|
const b = e.isSuspended === !0, h = (e.parts ?? []).filter((B) => B.eventType !== ve.UserAnswer).length;
|
|
8830
|
-
let z = null,
|
|
8831
|
-
if (b ? z = ot.createSuspended() : z = ot.createWaiting(T && h == 0, !1, "", /* @__PURE__ */ new Date()), v && (!e.parts || e.parts.length == 1) && (
|
|
8856
|
+
let z = null, u = null;
|
|
8857
|
+
if (b ? z = ot.createSuspended() : z = ot.createWaiting(T && h == 0, !1, "", /* @__PURE__ */ new Date()), v && (!e.parts || e.parts.length == 1) && (u = ot.fromText("Planejando próximos passos", "system", "planningPart")), !e.asyncFinalResponse && e.parts.length > 0) {
|
|
8832
8858
|
const B = e.parts[e.parts.length - 1];
|
|
8833
8859
|
B.waitingDetails && (B.waitingDetails.loadDots = !0);
|
|
8834
8860
|
}
|
|
@@ -8898,10 +8924,10 @@ const ma = /* @__PURE__ */ n(({ message: e, showSubAgents: a, onGoing: l, contai
|
|
|
8898
8924
|
"data-interactionid": e.interactionId,
|
|
8899
8925
|
ref: /* @__PURE__ */ n((B) => {
|
|
8900
8926
|
var J;
|
|
8901
|
-
|
|
8927
|
+
d.current = B, B && ((J = g == null ? void 0 : g.current) == null || J.set(e.interactionId, B));
|
|
8902
8928
|
}, "ref"),
|
|
8903
8929
|
children: [
|
|
8904
|
-
|
|
8930
|
+
u && /* @__PURE__ */ t(Er, { onGoing: l, part: u, message: e, onLinkClicked: s, preview: m, friendlyMode: E }),
|
|
8905
8931
|
c.map((B, J) => {
|
|
8906
8932
|
const q = B.parts.map(
|
|
8907
8933
|
(ee) => N(ee, B)
|
|
@@ -8962,7 +8988,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
8962
8988
|
}, [p]);
|
|
8963
8989
|
const S = /* @__PURE__ */ n(() => {
|
|
8964
8990
|
m((c) => c == 2 ? 0 : c + 1);
|
|
8965
|
-
}, "cycleLevel"), w = (s == null ? void 0 : s.items.filter((c) => c.status === "completed").length) ?? 0, k = (s == null ? void 0 : s.items.length) ?? 0,
|
|
8991
|
+
}, "cycleLevel"), w = (s == null ? void 0 : s.items.filter((c) => c.status === "completed").length) ?? 0, k = (s == null ? void 0 : s.items.length) ?? 0, d = k > 0 ? w / k * 100 : 0, y = `${w > 0 ? `${w} de ${k} completos` : "Iniciando..."} - ${d.toFixed(2)}%`, b = `${d.toFixed(2)}%`, h = s != null && s.currentWorkingItemKey ? s.items.find((c) => c.key === s.currentWorkingItemKey) : null, z = (s == null ? void 0 : s.items.slice(0, Eo)) ?? [], u = ((s == null ? void 0 : s.items.length) ?? 0) > Eo, A = /* @__PURE__ */ n((c) => /* @__PURE__ */ t(_e, { gap: 0.5, sx: { py: 0.5 }, children: c.map((_) => /* @__PURE__ */ I(
|
|
8966
8992
|
se,
|
|
8967
8993
|
{
|
|
8968
8994
|
sx: {
|
|
@@ -9037,7 +9063,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9037
9063
|
(E || s) && /* @__PURE__ */ t(
|
|
9038
9064
|
ca,
|
|
9039
9065
|
{
|
|
9040
|
-
value:
|
|
9066
|
+
value: d,
|
|
9041
9067
|
completedColor: "rgba(120,120,120,0.2)",
|
|
9042
9068
|
unCompletedColor: "rgba(120,120,120,0.05)",
|
|
9043
9069
|
children: /* @__PURE__ */ t(
|
|
@@ -9141,7 +9167,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9141
9167
|
/* @__PURE__ */ t(Tr, { in: p === 2, timeout: "auto", unmountOnExit: !0, children: /* @__PURE__ */ I(se, { sx: { borderTop: `1px solid ${g.palette.divider}` }, children: [
|
|
9142
9168
|
s && s.items.length > 0 && /* @__PURE__ */ I(se, { sx: { px: 2, pb: 0.5, maxHeight: "160px", overflowY: "auto" }, children: [
|
|
9143
9169
|
A(z),
|
|
9144
|
-
|
|
9170
|
+
u && /* @__PURE__ */ I(Ee, { variant: "caption", sx: { color: "text.disabled", fontSize: "0.7rem", pl: 2.5 }, children: [
|
|
9145
9171
|
"+",
|
|
9146
9172
|
s.items.length - Eo,
|
|
9147
9173
|
" more"
|
|
@@ -9179,7 +9205,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9179
9205
|
}
|
|
9180
9206
|
);
|
|
9181
9207
|
}, "SubAgentBox"), $p = /* @__PURE__ */ n(({ message: e, onLinkClicked: a }) => {
|
|
9182
|
-
var
|
|
9208
|
+
var u, A;
|
|
9183
9209
|
const [l, p] = Q(null), [m, s] = Q(!1), { onRenderPrompt: v, userMessageRenderer: g, showPersona: T } = Ze(), E = e.parts.filter((c) => c.eventType === ve.UserAnswer), D = bt(), S = 20;
|
|
9184
9210
|
let w = e.parts.some((c) => {
|
|
9185
9211
|
var _;
|
|
@@ -9198,7 +9224,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9198
9224
|
} else
|
|
9199
9225
|
s(!1);
|
|
9200
9226
|
}, [e.turn_complete, w]);
|
|
9201
|
-
const
|
|
9227
|
+
const d = /* @__PURE__ */ n((c) => {
|
|
9202
9228
|
p(c.currentTarget);
|
|
9203
9229
|
}, "handleTipsClick"), x = /* @__PURE__ */ n(() => {
|
|
9204
9230
|
p(null);
|
|
@@ -9221,7 +9247,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9221
9247
|
|
|
9222
9248
|
`);
|
|
9223
9249
|
return w = w && h.length > 0, k = k && z.length > 0, /* @__PURE__ */ I(re, { children: [
|
|
9224
|
-
(
|
|
9250
|
+
(u = e.interactionQuestion) != null && u.trim() ? /* @__PURE__ */ t(Ws, { tone: "light", isUser: !0, message: e }) : null,
|
|
9225
9251
|
/* @__PURE__ */ t(R, { sx: { pl: T && ((A = e.interactionQuestion) != null && A.trim()) ? `${Bs}px` : 0 }, children: E.length > 0 ? E.map((c) => /* @__PURE__ */ t(
|
|
9226
9252
|
Er,
|
|
9227
9253
|
{
|
|
@@ -9298,7 +9324,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9298
9324
|
e.turn_complete && k && /* @__PURE__ */ t(
|
|
9299
9325
|
Je,
|
|
9300
9326
|
{
|
|
9301
|
-
onClick:
|
|
9327
|
+
onClick: d,
|
|
9302
9328
|
sx: {
|
|
9303
9329
|
color: m ? D.palette.warning.light : D.palette.warning.dark,
|
|
9304
9330
|
ml: 1,
|
|
@@ -9332,7 +9358,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9332
9358
|
e.turn_complete && w && /* @__PURE__ */ t(
|
|
9333
9359
|
Je,
|
|
9334
9360
|
{
|
|
9335
|
-
onClick:
|
|
9361
|
+
onClick: d,
|
|
9336
9362
|
sx: {
|
|
9337
9363
|
color: D.palette.secondary.main,
|
|
9338
9364
|
ml: 1,
|
|
@@ -9462,13 +9488,13 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9462
9488
|
}), p = de((q) => q.loadingType), m = de((q) => q.loading), s = de((q) => q.messages), v = de((q) => q.sendingMessage), g = de((q) => q.currentMessage), [T, E] = Q(null), D = ue(null), S = bt(), w = S.breakpoints.down("sm");
|
|
9463
9489
|
le(() => {
|
|
9464
9490
|
}, [w]);
|
|
9465
|
-
const { onVisibleQuestionChange: k } = Ze(), [
|
|
9491
|
+
const { onVisibleQuestionChange: k } = Ze(), [d, x] = Q(null), [y] = Q(null), [b, h] = Q(!1), z = uu((q) => {
|
|
9466
9492
|
x(q);
|
|
9467
9493
|
}, 10);
|
|
9468
9494
|
le(() => {
|
|
9469
|
-
k == null || k((
|
|
9470
|
-
}, [
|
|
9471
|
-
const
|
|
9495
|
+
k == null || k((d == null ? void 0 : d.question) ?? null);
|
|
9496
|
+
}, [d, k]);
|
|
9497
|
+
const u = b ? 8 : 2.25, A = 20, c = u * A;
|
|
9472
9498
|
le(() => {
|
|
9473
9499
|
const q = document.getElementById("chat-container-" + (l ?? "new"));
|
|
9474
9500
|
if (!q)
|
|
@@ -9517,7 +9543,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9517
9543
|
}, "handleTipsClick"), J = /* @__PURE__ */ n(() => {
|
|
9518
9544
|
E(null);
|
|
9519
9545
|
}, "handleTipsClose");
|
|
9520
|
-
return
|
|
9546
|
+
return d && a ? /* @__PURE__ */ t(R, { sx: {
|
|
9521
9547
|
position: "relative",
|
|
9522
9548
|
top: -3,
|
|
9523
9549
|
left: -19,
|
|
@@ -9599,7 +9625,7 @@ const Lp = /* @__PURE__ */ n(({ subAgent: e, compact: a, onLinkClicked: l }) =>
|
|
|
9599
9625
|
lineHeight: `${A}px`,
|
|
9600
9626
|
flex: 1
|
|
9601
9627
|
},
|
|
9602
|
-
children:
|
|
9628
|
+
children: d.question
|
|
9603
9629
|
}
|
|
9604
9630
|
)
|
|
9605
9631
|
] }),
|
|
@@ -9848,7 +9874,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
|
|
|
9848
9874
|
}
|
|
9849
9875
|
) }) : null;
|
|
9850
9876
|
}, "CurrentMessage"), Hp = /* @__PURE__ */ n(({ promptHeight: e }) => {
|
|
9851
|
-
var
|
|
9877
|
+
var d, x;
|
|
9852
9878
|
const a = bt(), l = de((y) => y.turnOpen), p = de((y) => y.currentMessage), { agentGatewayService: m } = Ze(), [s, v] = Q(!1), [g, T] = Ce(() => {
|
|
9853
9879
|
var y;
|
|
9854
9880
|
if (!l || !(p != null && p.parts)) return [null, -1];
|
|
@@ -9864,7 +9890,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
|
|
|
9864
9890
|
le(() => {
|
|
9865
9891
|
g != D && v(!1), g && S(g);
|
|
9866
9892
|
}, [g]);
|
|
9867
|
-
const w = g ?? D, k = (
|
|
9893
|
+
const w = g ?? D, k = (d = w == null ? void 0 : w.functionDetails) == null ? void 0 : d.id;
|
|
9868
9894
|
return /* @__PURE__ */ t(ts, { direction: "up", in: !!g, mountOnEnter: !0, unmountOnExit: !0, appear: !0, children: /* @__PURE__ */ I(
|
|
9869
9895
|
R,
|
|
9870
9896
|
{
|
|
@@ -9979,7 +10005,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
|
|
|
9979
10005
|
const { eventBusService: l, showStickyHeader: p, currentModel: m, friendlyMode: s, compactPrompt: v, showConnectionState: g, hidePromptInput: T } = Ze(), E = m ? ta[m] : void 0, D = de((V) => {
|
|
9980
10006
|
var be;
|
|
9981
10007
|
return (be = V.session) == null ? void 0 : be.id;
|
|
9982
|
-
}), S = de((V) => V.turnOpen), w = de((V) => V.connectionStatus), k = de((V) => V.messages),
|
|
10008
|
+
}), S = de((V) => V.turnOpen), w = de((V) => V.connectionStatus), k = de((V) => V.messages), d = de((V) => V.loadingType), x = de((V) => V.setLastActivity), y = ue(null), b = wt(), h = Ar(b.breakpoints.down("sm")), z = h, u = ue(null), A = ue(null), c = ue(!1), _ = ue(/* @__PURE__ */ new Map()), [j, N] = Q(null), { artifactService: B } = Ze(), [J, q] = Q(!1), [ee, K] = Q(!1), [U, ne] = Q(!1), [Se, Re] = Q(!1), [Ue, G] = Q(null), [$, me] = Q(!1), Pe = ue(!1), je = ue(0), qe = ue(0), [ze, pe] = Q(0), [Ye, yt] = Q({
|
|
9983
10009
|
open: !1,
|
|
9984
10010
|
title: "",
|
|
9985
10011
|
message: "",
|
|
@@ -10134,7 +10160,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
|
|
|
10134
10160
|
}
|
|
10135
10161
|
),
|
|
10136
10162
|
g && /* @__PURE__ */ t("div", { style: { position: "absolute", right: "0px", top: "5px", zIndex: 1e4 }, children: /* @__PURE__ */ t(Vp, {}) }),
|
|
10137
|
-
|
|
10163
|
+
d !== void 0 && w != "Idle" && w != "Connected" && /* @__PURE__ */ t("div", { style: { display: "inline-flex", position: "absolute", backgroundColor: cn(b.palette.background.default, 0.6), justifyContent: "center", alignItems: "center", height: "100%", width: "100%", right: "0px", top: "0", zIndex: 1e4 }, children: /* @__PURE__ */ t(R, { sx: {
|
|
10138
10164
|
width: "100%",
|
|
10139
10165
|
height: "100%",
|
|
10140
10166
|
alignContent: "end",
|
|
@@ -10249,7 +10275,7 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
|
|
|
10249
10275
|
friendlyMode: s
|
|
10250
10276
|
}
|
|
10251
10277
|
),
|
|
10252
|
-
/* @__PURE__ */ t("div", { ref:
|
|
10278
|
+
/* @__PURE__ */ t("div", { ref: u })
|
|
10253
10279
|
]
|
|
10254
10280
|
}
|
|
10255
10281
|
),
|
|
@@ -10453,9 +10479,9 @@ const Np = /* @__PURE__ */ n(({ onLinkClicked: e, eventBusService: a, messagesRe
|
|
|
10453
10479
|
getSession: /* @__PURE__ */ n(() => g.getState().session, "getSession"),
|
|
10454
10480
|
getConnectionState: /* @__PURE__ */ n(() => g.getState().connectionStatus, "getConnectionState")
|
|
10455
10481
|
}), [E, g]), le(() => {
|
|
10456
|
-
const k = /* @__PURE__ */ n(async (
|
|
10482
|
+
const k = /* @__PURE__ */ n(async (d, x) => {
|
|
10457
10483
|
var y;
|
|
10458
|
-
(y = D.current) == null || y.call(D,
|
|
10484
|
+
(y = D.current) == null || y.call(D, d, x);
|
|
10459
10485
|
}, "handler");
|
|
10460
10486
|
return T.gatewayOnToolEvent(k), () => {
|
|
10461
10487
|
T.gatewayOffToolEvent(k);
|
|
@@ -10570,10 +10596,10 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: p,
|
|
|
10570
10596
|
] }) }) : e != null && e.src ? /* @__PURE__ */ t("div", { className: "iframe-container", children: /* @__PURE__ */ t("iframe", { src: `${e == null ? void 0 : e.src}`, style: { minHeight: "80vh", width: "100%", borderRadius: "var(--radius-md)" } }) }) : /* @__PURE__ */ t("div", { id: `container-table_${(e == null ? void 0 : e.id) ?? "idnull"}_${a}_${v}`, children: /* @__PURE__ */ t("div", { dangerouslySetInnerHTML: { __html: (e == null ? void 0 : e.html) ?? "" } }) });
|
|
10571
10597
|
}
|
|
10572
10598
|
n(k, "getHtmlContent");
|
|
10573
|
-
function
|
|
10599
|
+
function d(y) {
|
|
10574
10600
|
var A;
|
|
10575
10601
|
const b = y.description ?? "", h = ((A = y.name) == null ? void 0 : A.indexOf("http")) == -1 ? `${na()}/open/getImage/${l}/${y.name}` : y.name, z = /* @__PURE__ */ n(() => {
|
|
10576
|
-
}, "handleImageLoad"),
|
|
10602
|
+
}, "handleImageLoad"), u = /* @__PURE__ */ n(() => {
|
|
10577
10603
|
}, "handleImageError");
|
|
10578
10604
|
return /* @__PURE__ */ I(se, { sx: {
|
|
10579
10605
|
display: a === "compact" && v === !1 ? "flex" : "block",
|
|
@@ -10638,12 +10664,12 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: p,
|
|
|
10638
10664
|
// Hide image while loading
|
|
10639
10665
|
},
|
|
10640
10666
|
onLoad: s === "browser" ? z : void 0,
|
|
10641
|
-
onError: s === "browser" ?
|
|
10667
|
+
onError: s === "browser" ? u : void 0
|
|
10642
10668
|
}
|
|
10643
10669
|
)
|
|
10644
10670
|
] });
|
|
10645
10671
|
}
|
|
10646
|
-
return n(
|
|
10672
|
+
return n(d, "getEmbbedImage"), (x = e == null ? void 0 : e.mimeType) != null && x.startsWith("image") ? d(e) : p ? w() : k((e == null ? void 0 : e.html) ?? "", !1);
|
|
10647
10673
|
}, "ArtifactRender"), Gp = /* @__PURE__ */ n(({
|
|
10648
10674
|
text: e,
|
|
10649
10675
|
totalTime: a,
|
|
@@ -10658,21 +10684,21 @@ const Kp = /* @__PURE__ */ n(({ artifact: e, mode: a, sessionId: l, preview: p,
|
|
|
10658
10684
|
E.length === 0 && s(e);
|
|
10659
10685
|
const D = a / E.length, S = D * 0.4;
|
|
10660
10686
|
let w = "", k = l;
|
|
10661
|
-
const
|
|
10687
|
+
const d = [];
|
|
10662
10688
|
w = ":thumbsup: OK!";
|
|
10663
10689
|
const x = setTimeout(() => {
|
|
10664
10690
|
s(":thumbsup: OK!");
|
|
10665
10691
|
}, 0);
|
|
10666
|
-
return
|
|
10692
|
+
return d.push(x), E.forEach((y, b) => {
|
|
10667
10693
|
w += y;
|
|
10668
|
-
const h = w, z = (Math.random() - 0.5) * 2 * S,
|
|
10669
|
-
k +=
|
|
10694
|
+
const h = w, z = (Math.random() - 0.5) * 2 * S, u = Math.max(150, D + z);
|
|
10695
|
+
k += u;
|
|
10670
10696
|
const A = setTimeout(() => {
|
|
10671
10697
|
b == E.length - 1 && (v.current = !0), s(h);
|
|
10672
10698
|
}, k);
|
|
10673
|
-
|
|
10699
|
+
d.push(A);
|
|
10674
10700
|
}), () => {
|
|
10675
|
-
|
|
10701
|
+
d.forEach((y) => clearTimeout(y));
|
|
10676
10702
|
};
|
|
10677
10703
|
}, l);
|
|
10678
10704
|
}, [e, a, l]), v.current ? p ? /* @__PURE__ */ t(Pt, { sessionId: "", text: e }) : /* @__PURE__ */ t(re, { children: e }) : p ? /* @__PURE__ */ t(Pt, { sessionId: "", text: m }) : /* @__PURE__ */ t(re, { children: m });
|
|
@@ -10769,14 +10795,14 @@ const oh = /* @__PURE__ */ n(({ maxCharsForFull: e, children: a }) => {
|
|
|
10769
10795
|
() => Vs(S, { maxCharsForFull: D }),
|
|
10770
10796
|
[S, D]
|
|
10771
10797
|
);
|
|
10772
|
-
return w.filter((
|
|
10798
|
+
return w.filter((d) => {
|
|
10773
10799
|
var x;
|
|
10774
|
-
return (((x =
|
|
10775
|
-
}).length > 0 ? null : w.map((
|
|
10800
|
+
return (((x = d.code) == null ? void 0 : x.indexOf("<!--liveTsx:invalid-->")) ?? -1) > -1;
|
|
10801
|
+
}).length > 0 ? null : w.map((d, x) => {
|
|
10776
10802
|
var y, b;
|
|
10777
|
-
if (
|
|
10803
|
+
if (d.type === "slot") {
|
|
10778
10804
|
const h = (y = v == null ? void 0 : v.parts) == null ? void 0 : y.find(
|
|
10779
|
-
(
|
|
10805
|
+
(u) => ot.uiSlotId(u) === d.slotId
|
|
10780
10806
|
), z = ((b = E == null ? void 0 : E.partRenderers) == null ? void 0 : b.uiTool) ?? fa.uiTool;
|
|
10781
10807
|
return !h || !z ? null : /* @__PURE__ */ t(
|
|
10782
10808
|
se,
|
|
@@ -10802,13 +10828,13 @@ const oh = /* @__PURE__ */ n(({ maxCharsForFull: e, children: a }) => {
|
|
|
10802
10828
|
}
|
|
10803
10829
|
)
|
|
10804
10830
|
},
|
|
10805
|
-
`slot-${
|
|
10831
|
+
`slot-${d.slotId}`
|
|
10806
10832
|
);
|
|
10807
10833
|
}
|
|
10808
10834
|
return /* @__PURE__ */ t(
|
|
10809
10835
|
Pt,
|
|
10810
10836
|
{
|
|
10811
|
-
text:
|
|
10837
|
+
text: d.content ?? "",
|
|
10812
10838
|
partial: p,
|
|
10813
10839
|
sessionId: a,
|
|
10814
10840
|
onLinkClicked: s
|
|
@@ -10911,9 +10937,9 @@ function Ti(e) {
|
|
|
10911
10937
|
n(Ti, "unitFromIndex");
|
|
10912
10938
|
const _o = 15, ch = /* @__PURE__ */ n(() => {
|
|
10913
10939
|
const e = wt(), a = e.palette.mode === "dark", l = Ge(e.palette.text.primary, a ? 0.1 : 0.08), p = Ge(e.palette.text.primary, a ? 0.22 : 0.18), m = Ge(e.palette.text.primary, a ? 0.18 : 0.14), s = Ge(e.palette.text.primary, a ? 0.22 : 0.18), v = Ge(e.palette.text.primary, a ? 0.13 : 0.1), { bars: g, linePoints: T } = Ce(() => {
|
|
10914
|
-
const E = Array.from({ length: _o }, (_, j) => 0.18 + Ti(j) * 0.78), D = Array.from({ length: _o }, (_, j) => 0.18 + Ti(j + 100) * 0.78), S = 360, w = 160, k = 14,
|
|
10915
|
-
const N = _ * h, B = k + j * z + (z -
|
|
10916
|
-
return { x: B, y: J, w:
|
|
10940
|
+
const E = Array.from({ length: _o }, (_, j) => 0.18 + Ti(j) * 0.78), D = Array.from({ length: _o }, (_, j) => 0.18 + Ti(j + 100) * 0.78), S = 360, w = 160, k = 14, d = 12, y = w - d - 18, b = d + 6, h = y - b, z = (S - k * 2) / _o, u = z * 0.52, A = E.map((_, j) => {
|
|
10941
|
+
const N = _ * h, B = k + j * z + (z - u) / 2, J = y - N;
|
|
10942
|
+
return { x: B, y: J, w: u, h: N };
|
|
10917
10943
|
}), c = D.map((_, j) => {
|
|
10918
10944
|
const N = k + j * z + z / 2, B = y - _ * h;
|
|
10919
10945
|
return `${N},${B}`;
|
|
@@ -11134,14 +11160,14 @@ const _o = 15, ch = /* @__PURE__ */ n(() => {
|
|
|
11134
11160
|
for (let b = 0; b < g.length; b++)
|
|
11135
11161
|
w += g[b].h, g[b].acc = w, g[b].x = v + b * T;
|
|
11136
11162
|
function k(b, h = 2, z = !0) {
|
|
11137
|
-
const
|
|
11163
|
+
const u = Math.abs(b);
|
|
11138
11164
|
for (const [A, c] of ph)
|
|
11139
|
-
if (
|
|
11165
|
+
if (u >= A)
|
|
11140
11166
|
return (b / A).toFixed(h) + (z ? c : "");
|
|
11141
11167
|
return b.toFixed(0) + "b";
|
|
11142
11168
|
}
|
|
11143
11169
|
n(k, "formatCompact");
|
|
11144
|
-
const
|
|
11170
|
+
const d = g.reduce((b, h) => b + h.h, 0), x = e * d, y = /* @__PURE__ */ n((b) => g[b].h - Math.max(g[b].acc - x, 0), "barFill");
|
|
11145
11171
|
return /* @__PURE__ */ I(
|
|
11146
11172
|
se,
|
|
11147
11173
|
{
|
|
@@ -11192,12 +11218,12 @@ const _o = 15, ch = /* @__PURE__ */ n(() => {
|
|
|
11192
11218
|
);
|
|
11193
11219
|
}),
|
|
11194
11220
|
g.map((b, h) => {
|
|
11195
|
-
const z = Math.max(y(h), 0),
|
|
11221
|
+
const z = Math.max(y(h), 0), u = D - z;
|
|
11196
11222
|
return /* @__PURE__ */ t(
|
|
11197
11223
|
"rect",
|
|
11198
11224
|
{
|
|
11199
11225
|
x: b.x,
|
|
11200
|
-
y:
|
|
11226
|
+
y: u,
|
|
11201
11227
|
width: E,
|
|
11202
11228
|
height: z,
|
|
11203
11229
|
fill: p,
|
|
@@ -11349,30 +11375,30 @@ let jr = Sa;
|
|
|
11349
11375
|
const vh = /* @__PURE__ */ n(({ code: e, partial: a, scope: l, progress: p = 0, bytes: m = 0 }) => {
|
|
11350
11376
|
const [s, v] = Q(null);
|
|
11351
11377
|
le(() => {
|
|
11352
|
-
let
|
|
11378
|
+
let u = !1;
|
|
11353
11379
|
return lh().then((A) => {
|
|
11354
|
-
|
|
11380
|
+
u || v(A);
|
|
11355
11381
|
}).catch((A) => {
|
|
11356
11382
|
console.error("[LiveJsxBlock] Failed to load module registry:", A);
|
|
11357
11383
|
}), () => {
|
|
11358
|
-
|
|
11384
|
+
u = !0;
|
|
11359
11385
|
};
|
|
11360
11386
|
}, []);
|
|
11361
11387
|
const g = Ce(() => {
|
|
11362
11388
|
if (!s) return null;
|
|
11363
|
-
const
|
|
11364
|
-
return { ...s, ...
|
|
11389
|
+
const u = Qs();
|
|
11390
|
+
return { ...s, ...u, ...l ?? {} };
|
|
11365
11391
|
}, [s, l]), T = Ce(() => {
|
|
11366
11392
|
if (a || !g) return { Component: null, error: null };
|
|
11367
11393
|
try {
|
|
11368
11394
|
return { Component: gh(e, g), error: null };
|
|
11369
|
-
} catch (
|
|
11395
|
+
} catch (u) {
|
|
11370
11396
|
return {
|
|
11371
11397
|
Component: null,
|
|
11372
|
-
error:
|
|
11398
|
+
error: u instanceof Error ? u : new Error(String(u))
|
|
11373
11399
|
};
|
|
11374
11400
|
}
|
|
11375
|
-
}, [e, a, g]), E = /* @__PURE__ */ n((
|
|
11401
|
+
}, [e, a, g]), E = /* @__PURE__ */ n((u, A) => /* @__PURE__ */ I("div", { style: {
|
|
11376
11402
|
border: `1px solid ${A ? "lightgrey" : "#f44336"}`,
|
|
11377
11403
|
borderRadius: 6,
|
|
11378
11404
|
padding: "12px 16px",
|
|
@@ -11385,31 +11411,31 @@ const vh = /* @__PURE__ */ n(({ code: e, partial: a, scope: l, progress: p = 0,
|
|
|
11385
11411
|
fontWeight: 500,
|
|
11386
11412
|
marginBottom: 6,
|
|
11387
11413
|
whiteSpace: "pre-wrap",
|
|
11388
|
-
fontFamily:
|
|
11414
|
+
fontFamily: u.message.includes(`
|
|
11389
11415
|
`) ? "monospace" : void 0
|
|
11390
11416
|
}, children: [
|
|
11391
11417
|
"JSX render error: ",
|
|
11392
|
-
|
|
11418
|
+
u.message
|
|
11393
11419
|
] }),
|
|
11394
11420
|
/* @__PURE__ */ t("pre", { style: { fontSize: "0.8em", overflow: "auto", margin: 0, opacity: 0.7, whiteSpace: "pre-wrap" }, children: /* @__PURE__ */ t("code", { children: e }) })
|
|
11395
|
-
] }), "errorFallback"), D = wt(), S = a || !g, w = !S && !!T.error, [k,
|
|
11421
|
+
] }), "errorFallback"), D = wt(), S = a || !g, w = !S && !!T.error, [k, d] = Q(() => S ? "partial" : "final"), x = ue(null), y = ue(null);
|
|
11396
11422
|
if (Xa(() => {
|
|
11397
11423
|
if (k === "partial" && !S && !w) {
|
|
11398
|
-
const
|
|
11399
|
-
|
|
11424
|
+
const u = x.current, A = (u == null ? void 0 : u.offsetHeight) ?? 0;
|
|
11425
|
+
u && A > 0 && (u.style.height = `${A}px`), d("arriving");
|
|
11400
11426
|
} else if (k !== "partial" && S) {
|
|
11401
|
-
const
|
|
11402
|
-
|
|
11427
|
+
const u = x.current;
|
|
11428
|
+
u && (u.style.height = "", u.style.transition = ""), d("partial");
|
|
11403
11429
|
}
|
|
11404
11430
|
}, [k, S, w]), Xa(() => {
|
|
11405
11431
|
if (k !== "arriving") return;
|
|
11406
|
-
const
|
|
11407
|
-
if (!
|
|
11432
|
+
const u = x.current, A = y.current;
|
|
11433
|
+
if (!u || !A) return;
|
|
11408
11434
|
const c = A.offsetHeight;
|
|
11409
|
-
|
|
11435
|
+
u.offsetHeight, u.style.transition = "height 1500ms cubic-bezier(0.16, 1, 0.3, 1)", u.style.height = `${c}px`;
|
|
11410
11436
|
const _ = window.setTimeout(() => {
|
|
11411
11437
|
const j = x.current;
|
|
11412
|
-
j && (j.style.height = "", j.style.transition = ""),
|
|
11438
|
+
j && (j.style.height = "", j.style.transition = ""), d("final");
|
|
11413
11439
|
}, 1500);
|
|
11414
11440
|
return () => window.clearTimeout(_);
|
|
11415
11441
|
}, [k]), e.includes(fh)) return null;
|
|
@@ -11740,10 +11766,10 @@ ${e}\`\`\``, sessionId: "" }) }) })
|
|
|
11740
11766
|
}) => {
|
|
11741
11767
|
const v = bt(), g = a ?? v.palette.primary.main, T = mc();
|
|
11742
11768
|
if (!e || e.length === 0) return null;
|
|
11743
|
-
const E = Math.max(...e), D = Math.min(...e), S = E - D || 1, w = e.length > 1 ? l / (e.length - 1) : l,
|
|
11769
|
+
const E = Math.max(...e), D = Math.min(...e), S = E - D || 1, w = e.length > 1 ? l / (e.length - 1) : l, d = e.map((y, b) => [
|
|
11744
11770
|
b * w,
|
|
11745
11771
|
p - (y - D) / S * (p - 4) - 2
|
|
11746
|
-
]).map((y, b) => (b === 0 ? "M" : "L") + y[0].toFixed(1) + "," + y[1].toFixed(1)).join(" "), x = `${
|
|
11772
|
+
]).map((y, b) => (b === 0 ? "M" : "L") + y[0].toFixed(1) + "," + y[1].toFixed(1)).join(" "), x = `${d} L${l},${p} L0,${p} Z`;
|
|
11747
11773
|
return /* @__PURE__ */ I("svg", { width: l, height: p, style: { display: "block" }, "aria-hidden": !0, children: [
|
|
11748
11774
|
m && /* @__PURE__ */ I(re, { children: [
|
|
11749
11775
|
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ I("linearGradient", { id: T, x1: "0", x2: "0", y1: "0", y2: "1", children: [
|
|
@@ -11755,7 +11781,7 @@ ${e}\`\`\``, sessionId: "" }) }) })
|
|
|
11755
11781
|
/* @__PURE__ */ t(
|
|
11756
11782
|
"path",
|
|
11757
11783
|
{
|
|
11758
|
-
d
|
|
11784
|
+
d,
|
|
11759
11785
|
stroke: g,
|
|
11760
11786
|
strokeWidth: s,
|
|
11761
11787
|
fill: "none",
|
|
@@ -11970,7 +11996,7 @@ const zh = 300, ol = [
|
|
|
11970
11996
|
}) => {
|
|
11971
11997
|
const { pathname: D } = ns(), S = D.startsWith("/data-explorer") ? g : D.startsWith("/board") ? T : null, w = Ce(
|
|
11972
11998
|
() => l.map((k) => {
|
|
11973
|
-
const
|
|
11999
|
+
const d = k.isActive ? k.isActive(D) : D === k.to || D.startsWith(k.to + "/");
|
|
11974
12000
|
return /* @__PURE__ */ I(
|
|
11975
12001
|
R,
|
|
11976
12002
|
{
|
|
@@ -11984,16 +12010,16 @@ const zh = 300, ol = [
|
|
|
11984
12010
|
px: 1.5,
|
|
11985
12011
|
py: 1.25,
|
|
11986
12012
|
borderRadius: `${x.shape.radiusSm}px`,
|
|
11987
|
-
color:
|
|
11988
|
-
backgroundColor:
|
|
12013
|
+
color: d ? x.palette.primary.main : x.palette.text.secondary,
|
|
12014
|
+
backgroundColor: d ? x.palette.surface.hover : "transparent",
|
|
11989
12015
|
textDecoration: "none",
|
|
11990
12016
|
transition: "background-color .12s, color .12s",
|
|
11991
12017
|
"&:hover": {
|
|
11992
12018
|
backgroundColor: x.palette.surface.raised,
|
|
11993
|
-
color:
|
|
12019
|
+
color: d ? x.palette.primary.main : x.palette.text.primary
|
|
11994
12020
|
}
|
|
11995
12021
|
}), "sx"),
|
|
11996
|
-
"aria-current":
|
|
12022
|
+
"aria-current": d ? "page" : void 0,
|
|
11997
12023
|
children: [
|
|
11998
12024
|
k.icon,
|
|
11999
12025
|
/* @__PURE__ */ t(Z, { sx: { fontSize: 13, fontWeight: 500, color: "inherit" }, children: k.label })
|
|
@@ -12192,14 +12218,14 @@ const ba = /* @__PURE__ */ n(() => {
|
|
|
12192
12218
|
), s = de((k) => k.currentMessage), v = de((k) => k.messages), g = Ce(() => {
|
|
12193
12219
|
const k = s ?? (v == null ? void 0 : v[v.length - 1]) ?? null;
|
|
12194
12220
|
if (!(k != null && k.parts)) return null;
|
|
12195
|
-
for (let
|
|
12196
|
-
const x = k.parts[
|
|
12221
|
+
for (let d = k.parts.length - 1; d >= 0; d--) {
|
|
12222
|
+
const x = k.parts[d];
|
|
12197
12223
|
if (!(x.eventType === "function_call" || x.eventType === "partial_function_call" || x.eventType === "function_response")) continue;
|
|
12198
12224
|
const b = x.functionDetails;
|
|
12199
12225
|
if (!b || b.silent) continue;
|
|
12200
|
-
const h = x.eventType === "function_response" ? "response" : x.eventType === "partial_function_call" || b.status === "Composing" ? "partial" : "call",
|
|
12201
|
-
if (
|
|
12202
|
-
return { label:
|
|
12226
|
+
const h = x.eventType === "function_response" ? "response" : x.eventType === "partial_function_call" || b.status === "Composing" ? "partial" : "call", u = Jn(b.name, h, b.args ?? b.text, !1);
|
|
12227
|
+
if (u)
|
|
12228
|
+
return { label: u };
|
|
12203
12229
|
}
|
|
12204
12230
|
return null;
|
|
12205
12231
|
}, [s, v]), T = (m == null ? void 0 : m.items.length) ?? 0, E = (m == null ? void 0 : m.items.filter(
|
|
@@ -12321,7 +12347,7 @@ const Fh = 440, jh = 480, sl = In((e, a) => {
|
|
|
12321
12347
|
onVisibleQuestionChange: T,
|
|
12322
12348
|
onFloatingOpened: E,
|
|
12323
12349
|
...D
|
|
12324
|
-
} = e, S = { bottom: 20, right: 20, ...l }, [w, k] = Q(!1), [
|
|
12350
|
+
} = e, S = { bottom: 20, right: 20, ...l }, [w, k] = Q(!1), [d, x] = Q(null), y = ye(
|
|
12325
12351
|
(_) => {
|
|
12326
12352
|
let j = _;
|
|
12327
12353
|
if (e.onRenderPrompt && _) {
|
|
@@ -12331,7 +12357,7 @@ const Fh = 440, jh = 480, sl = In((e, a) => {
|
|
|
12331
12357
|
x(j ?? ""), T == null || T(_);
|
|
12332
12358
|
},
|
|
12333
12359
|
[T, e.onRenderPrompt]
|
|
12334
|
-
), b = (
|
|
12360
|
+
), b = (d == null ? void 0 : d.trim()) || g, h = S.bottom != null ? S.bottom + ((p == null ? void 0 : p.bottom) ?? 0) : void 0, z = S.right != null ? S.right + ((p == null ? void 0 : p.right) ?? 0) : void 0, u = S.left != null ? S.left + ((p == null ? void 0 : p.left) ?? 0) : void 0, A = S.top != null ? S.top + ((p == null ? void 0 : p.top) ?? 0) : void 0, c = /* @__PURE__ */ n(() => {
|
|
12335
12361
|
k(!0), E == null || E();
|
|
12336
12362
|
}, "handleOpen");
|
|
12337
12363
|
return /* @__PURE__ */ I(re, { children: [
|
|
@@ -12344,7 +12370,7 @@ const Fh = 440, jh = 480, sl = In((e, a) => {
|
|
|
12344
12370
|
bottom: A != null ? void 0 : h,
|
|
12345
12371
|
top: A,
|
|
12346
12372
|
right: z,
|
|
12347
|
-
left:
|
|
12373
|
+
left: u,
|
|
12348
12374
|
width: s,
|
|
12349
12375
|
height: v,
|
|
12350
12376
|
backgroundColor: _.palette.background.paper,
|
|
@@ -12595,7 +12621,7 @@ const Lh = /* @__PURE__ */ n(({
|
|
|
12595
12621
|
}) => {
|
|
12596
12622
|
const [S, w] = Q("");
|
|
12597
12623
|
Ce(() => e.reduce((U, ne) => U + ne.items.length, 0), [e]);
|
|
12598
|
-
const k = E ?? "Buscar...", [
|
|
12624
|
+
const k = E ?? "Buscar...", [d, x] = Q(null), y = /* @__PURE__ */ n(() => x(null), "closeMenu"), [b, h] = Q(null), [z, u] = Q(""), A = ue(null), c = ue(!1), _ = /* @__PURE__ */ n((U) => {
|
|
12599
12625
|
U && (U.style.height = "auto", U.style.height = `${Math.min(U.scrollHeight, 80)}px`);
|
|
12600
12626
|
}, "fitTextarea");
|
|
12601
12627
|
le(() => {
|
|
@@ -12608,9 +12634,9 @@ const Lh = /* @__PURE__ */ n(({
|
|
|
12608
12634
|
return () => window.clearTimeout(U);
|
|
12609
12635
|
}, [b]);
|
|
12610
12636
|
const [j, N] = Q(null), B = /* @__PURE__ */ n((U) => {
|
|
12611
|
-
h(U.id),
|
|
12637
|
+
h(U.id), u(U.title), y();
|
|
12612
12638
|
}, "startRename"), J = /* @__PURE__ */ n(() => {
|
|
12613
|
-
h(null),
|
|
12639
|
+
h(null), u("");
|
|
12614
12640
|
}, "cancelRename"), q = /* @__PURE__ */ n((U) => {
|
|
12615
12641
|
Promise.resolve(s == null ? void 0 : s(U, z)).finally(J);
|
|
12616
12642
|
}, "commitRename"), ee = /* @__PURE__ */ n(() => {
|
|
@@ -12755,7 +12781,7 @@ const Lh = /* @__PURE__ */ n(({
|
|
|
12755
12781
|
rows: 1,
|
|
12756
12782
|
value: z,
|
|
12757
12783
|
onChange: /* @__PURE__ */ n((G) => {
|
|
12758
|
-
|
|
12784
|
+
u(G.target.value), _(G.currentTarget);
|
|
12759
12785
|
}, "onChange"),
|
|
12760
12786
|
onClick: /* @__PURE__ */ n((G) => G.stopPropagation(), "onClick"),
|
|
12761
12787
|
onKeyDown: /* @__PURE__ */ n((G) => {
|
|
@@ -12897,8 +12923,8 @@ const Lh = /* @__PURE__ */ n(({
|
|
|
12897
12923
|
/* @__PURE__ */ I(
|
|
12898
12924
|
Ji,
|
|
12899
12925
|
{
|
|
12900
|
-
open: !!
|
|
12901
|
-
anchorEl: (
|
|
12926
|
+
open: !!d,
|
|
12927
|
+
anchorEl: (d == null ? void 0 : d.el) ?? null,
|
|
12902
12928
|
onClose: y,
|
|
12903
12929
|
anchorOrigin: { vertical: "bottom", horizontal: "right" },
|
|
12904
12930
|
transformOrigin: { vertical: "top", horizontal: "right" },
|
|
@@ -12917,7 +12943,7 @@ const Lh = /* @__PURE__ */ n(({
|
|
|
12917
12943
|
Gt,
|
|
12918
12944
|
{
|
|
12919
12945
|
onClick: /* @__PURE__ */ n(() => {
|
|
12920
|
-
|
|
12946
|
+
d && B(d.item);
|
|
12921
12947
|
}, "onClick"),
|
|
12922
12948
|
sx: /* @__PURE__ */ n((U) => ({ fontSize: 12, color: U.palette.text.primary }), "sx"),
|
|
12923
12949
|
children: [
|
|
@@ -12936,7 +12962,7 @@ const Lh = /* @__PURE__ */ n(({
|
|
|
12936
12962
|
Gt,
|
|
12937
12963
|
{
|
|
12938
12964
|
onClick: /* @__PURE__ */ n(() => {
|
|
12939
|
-
|
|
12965
|
+
d && (N(d.item), y());
|
|
12940
12966
|
}, "onClick"),
|
|
12941
12967
|
sx: /* @__PURE__ */ n((U) => ({ fontSize: 12, color: U.palette.secondary.main }), "sx"),
|
|
12942
12968
|
children: [
|
|
@@ -13183,8 +13209,8 @@ const ya = /* @__PURE__ */ n(({
|
|
|
13183
13209
|
}
|
|
13184
13210
|
}, [g, e.id]);
|
|
13185
13211
|
const E = Ce(() => {
|
|
13186
|
-
const k = (s == null ? void 0 : s.items) ?? [],
|
|
13187
|
-
return { completed:
|
|
13212
|
+
const k = (s == null ? void 0 : s.items) ?? [], d = k.filter((b) => String(b.status).toLowerCase() === "completed").length, x = k.length, y = x > 0 ? d / x : 0;
|
|
13213
|
+
return { completed: d, total: x, pct: y };
|
|
13188
13214
|
}, [s]), D = ye(() => {
|
|
13189
13215
|
m((k) => k >= (l ? 1 : 2) ? 0 : k + 1);
|
|
13190
13216
|
}, [l]), S = p >= 1 && ((s == null ? void 0 : s.items.length) ?? 0) > 0, w = p >= 2 && !l;
|
|
@@ -13490,9 +13516,9 @@ function Qh({ part: e, isLast: a, compact: l = !0 }) {
|
|
|
13490
13516
|
} catch {
|
|
13491
13517
|
return String(s.response);
|
|
13492
13518
|
}
|
|
13493
|
-
}, [s.response]),
|
|
13494
|
-
() => Jn(s.name,
|
|
13495
|
-
[s.name,
|
|
13519
|
+
}, [s.response]), d = e.eventType === "function_response" ? "response" : e.eventType === "partial_function_call" || S ? "partial" : "call", x = !1, y = Ce(
|
|
13520
|
+
() => Jn(s.name, d, s.args ?? s.text, x),
|
|
13521
|
+
[s.name, d, s.args, s.text, x]
|
|
13496
13522
|
), b = Ce(() => {
|
|
13497
13523
|
const h = ot.getPartTextContent(e);
|
|
13498
13524
|
return typeof h == "string" && h.length > 0 ? h.length : w.length;
|
|
@@ -13711,14 +13737,14 @@ function e0({
|
|
|
13711
13737
|
const E = /* @__PURE__ */ n((S) => {
|
|
13712
13738
|
var w;
|
|
13713
13739
|
(w = p.current) == null || w.scrollBy({ left: S, behavior: "smooth" });
|
|
13714
|
-
}, "scrollBy"), D = /* @__PURE__ */ n((S, w, k,
|
|
13740
|
+
}, "scrollBy"), D = /* @__PURE__ */ n((S, w, k, d) => /* @__PURE__ */ t(
|
|
13715
13741
|
R,
|
|
13716
13742
|
{
|
|
13717
13743
|
role: "button",
|
|
13718
13744
|
tabIndex: 0,
|
|
13719
|
-
onClick:
|
|
13745
|
+
onClick: d,
|
|
13720
13746
|
onKeyDown: /* @__PURE__ */ n((x) => {
|
|
13721
|
-
(x.key === "Enter" || x.key === " ") && (x.preventDefault(),
|
|
13747
|
+
(x.key === "Enter" || x.key === " ") && (x.preventDefault(), d());
|
|
13722
13748
|
}, "onKeyDown"),
|
|
13723
13749
|
sx: /* @__PURE__ */ n((x) => ({
|
|
13724
13750
|
flex: "0 0 auto",
|
|
@@ -13844,23 +13870,23 @@ const xa = /* @__PURE__ */ n(({
|
|
|
13844
13870
|
}) => {
|
|
13845
13871
|
const v = de((b) => b.currentMessage), g = de((b) => b.messages), T = de((b) => b.turnOpen), E = Ce(() => {
|
|
13846
13872
|
if (!s || !g || g.length === 0) return [];
|
|
13847
|
-
const b = /* @__PURE__ */ new Set(["thought", "function_call", "function_response", "partial_function_call"]), h = [...g].sort((
|
|
13848
|
-
const c =
|
|
13873
|
+
const b = /* @__PURE__ */ new Set(["thought", "function_call", "function_response", "partial_function_call"]), h = [...g].sort((u, A) => {
|
|
13874
|
+
const c = u.created ? new Date(u.created).getTime() : 0, _ = A.created ? new Date(A.created).getTime() : 0;
|
|
13849
13875
|
return c - _;
|
|
13850
13876
|
}), z = [];
|
|
13851
|
-
return h.forEach((
|
|
13877
|
+
return h.forEach((u, A) => {
|
|
13852
13878
|
var j;
|
|
13853
|
-
const c = Sn(
|
|
13854
|
-
!c || !((j =
|
|
13879
|
+
const c = Sn(u);
|
|
13880
|
+
!c || !((j = u.parts) != null && j.some(
|
|
13855
13881
|
(N) => {
|
|
13856
13882
|
var B;
|
|
13857
13883
|
return b.has(N.eventType) && !((B = N.functionDetails) != null && B.silent);
|
|
13858
13884
|
}
|
|
13859
13885
|
)) || z.push({
|
|
13860
13886
|
id: c,
|
|
13861
|
-
interaction:
|
|
13887
|
+
interaction: u,
|
|
13862
13888
|
number: A + 1,
|
|
13863
|
-
timeLabel: Zh(
|
|
13889
|
+
timeLabel: Zh(u.created)
|
|
13864
13890
|
});
|
|
13865
13891
|
}), z.reverse();
|
|
13866
13892
|
}, [g, s]), [D, S] = Q(null), w = ue(T);
|
|
@@ -13869,7 +13895,7 @@ const xa = /* @__PURE__ */ n(({
|
|
|
13869
13895
|
w.current = T, T && !b && S(null);
|
|
13870
13896
|
}, [T]);
|
|
13871
13897
|
const k = Ce(() => {
|
|
13872
|
-
const b = /* @__PURE__ */ new Set(["thought", "function_call", "function_response", "partial_function_call"]), h = /* @__PURE__ */ n((
|
|
13898
|
+
const b = /* @__PURE__ */ new Set(["thought", "function_call", "function_response", "partial_function_call"]), h = /* @__PURE__ */ n((u) => u != null && u.parts ? u.parts.filter(
|
|
13873
13899
|
(A) => {
|
|
13874
13900
|
var c;
|
|
13875
13901
|
return b.has(A.eventType) && !((c = A.functionDetails) != null && c.silent);
|
|
@@ -13877,30 +13903,30 @@ const xa = /* @__PURE__ */ n(({
|
|
|
13877
13903
|
) : [], "collect");
|
|
13878
13904
|
let z = [];
|
|
13879
13905
|
if (D === "all") {
|
|
13880
|
-
const
|
|
13906
|
+
const u = [...g ?? []].sort((A, c) => {
|
|
13881
13907
|
const _ = A.created ? new Date(A.created).getTime() : 0, j = c.created ? new Date(c.created).getTime() : 0;
|
|
13882
13908
|
return _ - j;
|
|
13883
13909
|
});
|
|
13884
|
-
if (
|
|
13910
|
+
if (u.forEach((A) => {
|
|
13885
13911
|
z = z.concat(h(A));
|
|
13886
13912
|
}), v && Sn(v) !== null) {
|
|
13887
13913
|
const A = Sn(v);
|
|
13888
|
-
|
|
13914
|
+
u.some((_) => Sn(_) === A) || (z = z.concat(h(v)));
|
|
13889
13915
|
}
|
|
13890
13916
|
} else if (D) {
|
|
13891
13917
|
const A = Sn(v) === D ? v : (g ?? []).find((c) => Sn(c) === D) ?? null;
|
|
13892
13918
|
z = h(A);
|
|
13893
13919
|
} else T && v && (z = h(v));
|
|
13894
13920
|
return p === "newest-first" ? [...z].reverse() : z;
|
|
13895
|
-
}, [D, v, g, T, p]),
|
|
13921
|
+
}, [D, v, g, T, p]), d = ue(null);
|
|
13896
13922
|
le(() => {
|
|
13897
13923
|
if (p !== "chronological") return;
|
|
13898
|
-
const b =
|
|
13924
|
+
const b = d.current;
|
|
13899
13925
|
if (!b) return;
|
|
13900
13926
|
let h = b.parentElement;
|
|
13901
13927
|
for (; h; ) {
|
|
13902
|
-
const
|
|
13903
|
-
if ((
|
|
13928
|
+
const u = window.getComputedStyle(h);
|
|
13929
|
+
if ((u.overflowY === "auto" || u.overflowY === "scroll") && h.scrollHeight > h.clientHeight)
|
|
13904
13930
|
break;
|
|
13905
13931
|
h = h.parentElement;
|
|
13906
13932
|
}
|
|
@@ -13937,7 +13963,7 @@ const xa = /* @__PURE__ */ n(({
|
|
|
13937
13963
|
},
|
|
13938
13964
|
b.id
|
|
13939
13965
|
) : b.eventType === "function_call" || b.eventType === "partial_function_call" || b.eventType === "function_response" ? /* @__PURE__ */ t(Qh, { part: b, isLast: h === y, compact: m }, b.id) : null),
|
|
13940
|
-
/* @__PURE__ */ t(R, { ref:
|
|
13966
|
+
/* @__PURE__ */ t(R, { ref: d, "aria-hidden": !0, sx: { height: 0 } })
|
|
13941
13967
|
] })
|
|
13942
13968
|
] });
|
|
13943
13969
|
}, "AgentActivityV2");
|
|
@@ -14205,7 +14231,7 @@ const hl = /* @__PURE__ */ n(({ call: e }) => {
|
|
|
14205
14231
|
R,
|
|
14206
14232
|
{
|
|
14207
14233
|
sx: /* @__PURE__ */ n((w) => {
|
|
14208
|
-
const k = T ? w.palette.secondary.main : v ? w.palette.primary.main : g ? w.palette.success.main : w.palette.text.disabled,
|
|
14234
|
+
const k = T ? w.palette.secondary.main : v ? w.palette.primary.main : g ? w.palette.success.main : w.palette.text.disabled, d = v || s || T;
|
|
14209
14235
|
return {
|
|
14210
14236
|
width: 30,
|
|
14211
14237
|
maxHeight: "50px",
|
|
@@ -14214,7 +14240,7 @@ const hl = /* @__PURE__ */ n(({ call: e }) => {
|
|
|
14214
14240
|
paddingBottom: 0.5,
|
|
14215
14241
|
borderRadius: 0.875,
|
|
14216
14242
|
backgroundColor: w.palette.surface.raised,
|
|
14217
|
-
border: `1px solid ${
|
|
14243
|
+
border: `1px solid ${d ? k : w.palette.divider}`,
|
|
14218
14244
|
display: "flex",
|
|
14219
14245
|
flexDirection: "column",
|
|
14220
14246
|
alignItems: "center",
|
|
@@ -14504,7 +14530,7 @@ const yl = /* @__PURE__ */ n(({
|
|
|
14504
14530
|
}) => {
|
|
14505
14531
|
const T = bt(), [E, D] = Q(g), S = s ?? E, w = /* @__PURE__ */ n((K) => {
|
|
14506
14532
|
s === void 0 && D(K), v == null || v(K);
|
|
14507
|
-
}, "setCollapsed"), k = de((K) => K.turnOpen),
|
|
14533
|
+
}, "setCollapsed"), k = de((K) => K.turnOpen), d = de((K) => K.lastToolEvent), x = de((K) => K.connectionStatus), { agentGatewayService: y } = Ze();
|
|
14508
14534
|
le(() => {
|
|
14509
14535
|
D(g);
|
|
14510
14536
|
}, [g]);
|
|
@@ -14531,7 +14557,7 @@ const yl = /* @__PURE__ */ n(({
|
|
|
14531
14557
|
default:
|
|
14532
14558
|
return { color: T.palette.text.disabled, label: "Sessão Inativa", pulse: !1 };
|
|
14533
14559
|
}
|
|
14534
|
-
}, [x, k, T]), h = de((K) => K.suspendState), z = de((K) => K.setSuspendState),
|
|
14560
|
+
}, [x, k, T]), h = de((K) => K.suspendState), z = de((K) => K.setSuspendState), u = h === "suspending", A = h === "suspended", c = ye(async () => {
|
|
14535
14561
|
if (y instanceof un) {
|
|
14536
14562
|
if (A) {
|
|
14537
14563
|
z("idle");
|
|
@@ -14561,11 +14587,11 @@ const yl = /* @__PURE__ */ n(({
|
|
|
14561
14587
|
}
|
|
14562
14588
|
}, [y, z]), j = l === null ? null : l ?? c, N = p === null ? null : p ?? _, B = Ce(
|
|
14563
14589
|
() => u0(
|
|
14564
|
-
|
|
14565
|
-
|
|
14566
|
-
|
|
14590
|
+
d == null ? void 0 : d.eventName,
|
|
14591
|
+
d == null ? void 0 : d.eventData,
|
|
14592
|
+
d == null ? void 0 : d.subAgentId
|
|
14567
14593
|
),
|
|
14568
|
-
[
|
|
14594
|
+
[d == null ? void 0 : d.eventName, d == null ? void 0 : d.eventData, d == null ? void 0 : d.subAgentId]
|
|
14569
14595
|
), J = (B == null ? void 0 : B.items.filter(
|
|
14570
14596
|
(K) => String(K.status).toLowerCase() === "completed"
|
|
14571
14597
|
).length) ?? 0, q = (B == null ? void 0 : B.items.length) ?? 0, ee = (B == null ? void 0 : B.percentComplete) != null && Number.isFinite(B.percentComplete) ? Math.max(0, Math.min(1, B.percentComplete)) : q > 0 ? J / q : 0;
|
|
@@ -14819,7 +14845,7 @@ const yl = /* @__PURE__ */ n(({
|
|
|
14819
14845
|
pauseControl: j || N ? {
|
|
14820
14846
|
turnOpen: k,
|
|
14821
14847
|
suspended: A,
|
|
14822
|
-
suspending:
|
|
14848
|
+
suspending: u,
|
|
14823
14849
|
onPause: j ?? c,
|
|
14824
14850
|
onCancel: N ?? _
|
|
14825
14851
|
} : void 0
|