@_solaris/messenger-widget 0.5.77 → 0.5.78
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/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +5 -5
- package/dist/messenger.cjs +3 -3
- package/dist/messenger.js +219 -193
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/core/i18n.d.ts +2 -0
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as
|
|
1
|
+
import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as O, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as De, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as l, createCommentVNode as k, createBlock as P, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Oe } from "vue";
|
|
2
2
|
const Ye = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -43,8 +43,8 @@ function Ze(e) {
|
|
|
43
43
|
p && p.forEach((S) => {
|
|
44
44
|
try {
|
|
45
45
|
S(g);
|
|
46
|
-
} catch (
|
|
47
|
-
console.error("[transport] listener", u,
|
|
46
|
+
} catch (R) {
|
|
47
|
+
console.error("[transport] listener", u, R);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
@@ -72,10 +72,10 @@ function Ze(e) {
|
|
|
72
72
|
body: p !== void 0 ? JSON.stringify(p) : void 0
|
|
73
73
|
});
|
|
74
74
|
if (!S.ok) {
|
|
75
|
-
const
|
|
76
|
-
`HTTP ${S.status} ${u} ${g} :: ${(
|
|
75
|
+
const R = await o(S), x = new Error(
|
|
76
|
+
`HTTP ${S.status} ${u} ${g} :: ${(R == null ? void 0 : R.error) || S.statusText}`
|
|
77
77
|
);
|
|
78
|
-
throw x.status = S.status, x.body =
|
|
78
|
+
throw x.status = S.status, x.body = R, x;
|
|
79
79
|
}
|
|
80
80
|
return S.status === 204 ? null : S.json();
|
|
81
81
|
}
|
|
@@ -119,7 +119,7 @@ function Ze(e) {
|
|
|
119
119
|
}
|
|
120
120
|
const p = await g.json();
|
|
121
121
|
t.userId = p.external_id;
|
|
122
|
-
const [S,
|
|
122
|
+
const [S, R] = await Promise.all([
|
|
123
123
|
fetch(
|
|
124
124
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
125
125
|
{ credentials: "include" }
|
|
@@ -133,7 +133,7 @@ function Ze(e) {
|
|
|
133
133
|
return V.json();
|
|
134
134
|
}),
|
|
135
135
|
a("GET", "/customers/me")
|
|
136
|
-
]), x = { config: S, customer: (
|
|
136
|
+
]), x = { config: S, customer: (R == null ? void 0 : R.customer) ?? null };
|
|
137
137
|
return t.lastBootstrap = x, await b(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
138
138
|
"visibilitychange",
|
|
139
139
|
t.visibilityHandler
|
|
@@ -154,7 +154,7 @@ function Ze(e) {
|
|
|
154
154
|
const u = await a("GET", "/customers/me");
|
|
155
155
|
return (u == null ? void 0 : u.customer) ?? null;
|
|
156
156
|
}
|
|
157
|
-
async function
|
|
157
|
+
async function T(u) {
|
|
158
158
|
const g = await a("PATCH", "/customers/me", u);
|
|
159
159
|
return (g == null ? void 0 : g.customer) ?? null;
|
|
160
160
|
}
|
|
@@ -171,7 +171,7 @@ function Ze(e) {
|
|
|
171
171
|
`/conversations/${encodeURIComponent(u)}`
|
|
172
172
|
)).conversation;
|
|
173
173
|
}
|
|
174
|
-
async function
|
|
174
|
+
async function M(u, g) {
|
|
175
175
|
return (await a(
|
|
176
176
|
"PATCH",
|
|
177
177
|
`/conversations/${encodeURIComponent(u)}`,
|
|
@@ -217,11 +217,11 @@ function Ze(e) {
|
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
219
|
async function Q(u) {
|
|
220
|
-
const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0,
|
|
220
|
+
const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, R = await a("POST", "/attachments", {
|
|
221
221
|
mime_type: p,
|
|
222
222
|
size_bytes: S,
|
|
223
223
|
name: g
|
|
224
|
-
}), x = await fetch(
|
|
224
|
+
}), x = await fetch(R.upload_url, {
|
|
225
225
|
method: "PUT",
|
|
226
226
|
headers: { "Content-Type": p },
|
|
227
227
|
body: u
|
|
@@ -230,7 +230,7 @@ function Ze(e) {
|
|
|
230
230
|
throw new Error(`HTTP ${x.status} PUT signed upload`);
|
|
231
231
|
return {
|
|
232
232
|
type: tt(p),
|
|
233
|
-
path:
|
|
233
|
+
path: R.path,
|
|
234
234
|
mime_type: p,
|
|
235
235
|
size_bytes: S
|
|
236
236
|
};
|
|
@@ -280,8 +280,8 @@ function Ze(e) {
|
|
|
280
280
|
}
|
|
281
281
|
async function ye() {
|
|
282
282
|
try {
|
|
283
|
-
const u = await E(), g = u.reduce((S,
|
|
284
|
-
const x =
|
|
283
|
+
const u = await E(), g = u.reduce((S, R) => {
|
|
284
|
+
const x = R == null ? void 0 : R.last_message_at;
|
|
285
285
|
return x && (!S || x > S) ? x : S;
|
|
286
286
|
}, null);
|
|
287
287
|
g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ae());
|
|
@@ -336,11 +336,11 @@ function Ze(e) {
|
|
|
336
336
|
context: C,
|
|
337
337
|
// REST
|
|
338
338
|
getCustomer: y,
|
|
339
|
-
patchCustomer:
|
|
339
|
+
patchCustomer: T,
|
|
340
340
|
listConversations: E,
|
|
341
341
|
createConversation: A,
|
|
342
342
|
getConversation: q,
|
|
343
|
-
patchConversation:
|
|
343
|
+
patchConversation: M,
|
|
344
344
|
markConversationRead: U,
|
|
345
345
|
listMessages: D,
|
|
346
346
|
postMessage: L,
|
|
@@ -531,8 +531,8 @@ function st(e) {
|
|
|
531
531
|
}), g = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
|
|
532
532
|
for (const x of p)
|
|
533
533
|
(x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
|
|
534
|
-
const
|
|
535
|
-
t.messagesByConv[h] = [...
|
|
534
|
+
const R = g.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
|
|
535
|
+
t.messagesByConv[h] = [...R, ...p], y(h, {
|
|
536
536
|
nextCursor: (u == null ? void 0 : u.next_cursor) ?? null,
|
|
537
537
|
loading: !1,
|
|
538
538
|
loaded: !0
|
|
@@ -545,7 +545,7 @@ function st(e) {
|
|
|
545
545
|
function y(h, m) {
|
|
546
546
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
547
547
|
}
|
|
548
|
-
async function
|
|
548
|
+
async function T(h, m) {
|
|
549
549
|
const _ = await e.patchConversation(h, m), w = t.conversations.findIndex((C) => C.id === h);
|
|
550
550
|
w !== -1 && (t.conversations[w] = _);
|
|
551
551
|
}
|
|
@@ -566,8 +566,8 @@ function st(e) {
|
|
|
566
566
|
(S == null ? void 0 : S.id) != null && u.add(String(S.id)), S != null && S.client_msg_id && g.add(S.client_msg_id);
|
|
567
567
|
const p = [];
|
|
568
568
|
for (const S of C) {
|
|
569
|
-
const
|
|
570
|
-
$(h, S),
|
|
569
|
+
const R = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && g.has(S.client_msg_id);
|
|
570
|
+
$(h, S), R || p.push(S);
|
|
571
571
|
}
|
|
572
572
|
return p;
|
|
573
573
|
} catch (w) {
|
|
@@ -587,7 +587,7 @@ function st(e) {
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
async function q(h, m, { attachments: _, metadata: w } = {}) {
|
|
590
|
-
var
|
|
590
|
+
var R;
|
|
591
591
|
const C = (m || "").trim(), u = Array.isArray(_) && _.length > 0;
|
|
592
592
|
if (!h || !C && !u) return;
|
|
593
593
|
const g = nt(), p = fe(h), S = {
|
|
@@ -598,7 +598,7 @@ function st(e) {
|
|
|
598
598
|
text_md: C,
|
|
599
599
|
author: {
|
|
600
600
|
type: "user",
|
|
601
|
-
id: ((
|
|
601
|
+
id: ((R = t.customer) == null ? void 0 : R.external_id) || null
|
|
602
602
|
},
|
|
603
603
|
created_at: p,
|
|
604
604
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
@@ -622,7 +622,7 @@ function st(e) {
|
|
|
622
622
|
});
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
async function
|
|
625
|
+
async function M(h, m, _) {
|
|
626
626
|
h != null && (t.awaitingCallback[h] = !0);
|
|
627
627
|
try {
|
|
628
628
|
await e.postCallback(h, m, _);
|
|
@@ -659,7 +659,7 @@ function st(e) {
|
|
|
659
659
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
|
-
await
|
|
662
|
+
await T(h, { metadata: u });
|
|
663
663
|
}
|
|
664
664
|
function W(h) {
|
|
665
665
|
var _, w;
|
|
@@ -702,15 +702,15 @@ function st(e) {
|
|
|
702
702
|
return [];
|
|
703
703
|
if (((C = p == null ? void 0 : p.author) == null ? void 0 : C.type) !== "agent_ia") continue;
|
|
704
704
|
const S = (u = p == null ? void 0 : p.metadata) == null ? void 0 : u.suggested_replies;
|
|
705
|
-
return Array.isArray(S) && S.length ? S.map((
|
|
706
|
-
if (typeof
|
|
707
|
-
const x =
|
|
705
|
+
return Array.isArray(S) && S.length ? S.map((R) => {
|
|
706
|
+
if (typeof R == "string") {
|
|
707
|
+
const x = R.trim();
|
|
708
708
|
return x ? { label: x, kind: null } : null;
|
|
709
709
|
}
|
|
710
|
-
if (
|
|
711
|
-
const x =
|
|
710
|
+
if (R && typeof R == "object" && typeof R.label == "string") {
|
|
711
|
+
const x = R.label.trim();
|
|
712
712
|
if (!x) return null;
|
|
713
|
-
const V =
|
|
713
|
+
const V = R.kind === "cta" || R.kind === "choice" || R.kind === "followup" ? R.kind : null;
|
|
714
714
|
return { label: x, kind: V };
|
|
715
715
|
}
|
|
716
716
|
return null;
|
|
@@ -782,10 +782,10 @@ function st(e) {
|
|
|
782
782
|
openConversation: f,
|
|
783
783
|
loadMore: b,
|
|
784
784
|
fetchSinceLast: E,
|
|
785
|
-
patchConversation:
|
|
785
|
+
patchConversation: T,
|
|
786
786
|
markConversationRead: A,
|
|
787
787
|
send: q,
|
|
788
|
-
clickCallback:
|
|
788
|
+
clickCallback: M,
|
|
789
789
|
signAttachment: D,
|
|
790
790
|
submitFeedback: L,
|
|
791
791
|
getPendingApproval: W,
|
|
@@ -820,10 +820,10 @@ const H = {
|
|
|
820
820
|
"#D97706",
|
|
821
821
|
"#059669"
|
|
822
822
|
];
|
|
823
|
-
function
|
|
823
|
+
function Te(e = "") {
|
|
824
824
|
return e ? be[e.charCodeAt(0) % be.length] : be[0];
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function Me(e = "") {
|
|
827
827
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
828
828
|
}
|
|
829
829
|
function Ce(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
|
|
@@ -953,6 +953,8 @@ Je réponds en quelques secondes.`,
|
|
|
953
953
|
"composer.recording": "Enregistrement · {time}",
|
|
954
954
|
"composer.stop": "Arrêter",
|
|
955
955
|
"composer.conversationEnded": "Cette conversation est terminée.",
|
|
956
|
+
"composer.conversationClosed": "Cette conversation a été fermée.",
|
|
957
|
+
"composer.reopen": "Rouvrir la conversation",
|
|
956
958
|
"composer.newConversation": "Nouvelle conversation",
|
|
957
959
|
// ── Message list ─────────────────────────────────────────────────
|
|
958
960
|
"messageList.loadingHistory": "Chargement de l'historique…",
|
|
@@ -1253,11 +1255,11 @@ function ft(e) {
|
|
|
1253
1255
|
if (/^\s*[-*]\s+/.test(n)) {
|
|
1254
1256
|
const b = [];
|
|
1255
1257
|
for (; r < t.length; ) {
|
|
1256
|
-
const
|
|
1257
|
-
if (!
|
|
1258
|
-
b.push(
|
|
1258
|
+
const T = /^\s*[-*]\s+(.*)$/.exec(t[r]);
|
|
1259
|
+
if (!T) break;
|
|
1260
|
+
b.push(T[1]), r++;
|
|
1259
1261
|
}
|
|
1260
|
-
const y = b.map((
|
|
1262
|
+
const y = b.map((T) => `<li>${de(T)}</li>`).join("");
|
|
1261
1263
|
s.push({
|
|
1262
1264
|
type: "block",
|
|
1263
1265
|
html: `<ul class="wm-md-ul">${y}</ul>`
|
|
@@ -1272,10 +1274,10 @@ function ft(e) {
|
|
|
1272
1274
|
if (!A) break;
|
|
1273
1275
|
y.push(A[1]), r++;
|
|
1274
1276
|
}
|
|
1275
|
-
const
|
|
1277
|
+
const T = y.map((A) => `<li>${de(A)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
|
|
1276
1278
|
s.push({
|
|
1277
1279
|
type: "block",
|
|
1278
|
-
html: `<ol class="wm-md-ol"${E}>${
|
|
1280
|
+
html: `<ol class="wm-md-ol"${E}>${T}</ol>`
|
|
1279
1281
|
});
|
|
1280
1282
|
continue;
|
|
1281
1283
|
}
|
|
@@ -1686,7 +1688,7 @@ const yt = {
|
|
|
1686
1688
|
) + n;
|
|
1687
1689
|
this.nextRevealAt = o;
|
|
1688
1690
|
const f = Math.max(0, o - r), b = e.id, y = setTimeout(() => {
|
|
1689
|
-
this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((
|
|
1691
|
+
this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1690
1692
|
}, f);
|
|
1691
1693
|
this.revealTimers.push(y);
|
|
1692
1694
|
},
|
|
@@ -1855,16 +1857,16 @@ const N = (e, t) => {
|
|
|
1855
1857
|
},
|
|
1856
1858
|
computed: {
|
|
1857
1859
|
bg() {
|
|
1858
|
-
return this.avatarUrl ? "transparent" :
|
|
1860
|
+
return this.avatarUrl ? "transparent" : Te(this.name);
|
|
1859
1861
|
},
|
|
1860
1862
|
initials() {
|
|
1861
|
-
return
|
|
1863
|
+
return Me(this.name);
|
|
1862
1864
|
}
|
|
1863
1865
|
}
|
|
1864
|
-
},
|
|
1865
|
-
function
|
|
1866
|
+
}, Tt = ["src", "alt"];
|
|
1867
|
+
function Mt(e, t, s, r, i, n) {
|
|
1866
1868
|
return c(), d("div", {
|
|
1867
|
-
class:
|
|
1869
|
+
class: O(["wm-huav", { "wm-huav--tail": s.tail }]),
|
|
1868
1870
|
style: z({
|
|
1869
1871
|
width: s.size + "px",
|
|
1870
1872
|
height: s.size + "px",
|
|
@@ -1876,13 +1878,13 @@ function Tt(e, t, s, r, i, n) {
|
|
|
1876
1878
|
key: 0,
|
|
1877
1879
|
src: s.avatarUrl,
|
|
1878
1880
|
alt: s.name || ""
|
|
1879
|
-
}, null, 8,
|
|
1881
|
+
}, null, 8, Tt)) : (c(), d("span", {
|
|
1880
1882
|
key: 1,
|
|
1881
1883
|
style: z({ fontSize: s.size * 0.36 + "px" })
|
|
1882
1884
|
}, v(n.initials), 5))
|
|
1883
1885
|
], 6);
|
|
1884
1886
|
}
|
|
1885
|
-
const ve = /* @__PURE__ */ N(St, [["render",
|
|
1887
|
+
const ve = /* @__PURE__ */ N(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Rt = {
|
|
1886
1888
|
name: "WmLauncher",
|
|
1887
1889
|
components: { HumanAvatar: ve },
|
|
1888
1890
|
inject: {
|
|
@@ -1908,7 +1910,7 @@ const ve = /* @__PURE__ */ N(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
|
|
|
1908
1910
|
return this.peeks.slice(0, xt).reverse();
|
|
1909
1911
|
}
|
|
1910
1912
|
}
|
|
1911
|
-
},
|
|
1913
|
+
}, Ot = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Nt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Dt = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
|
|
1912
1914
|
function zt(e, t, s, r, i, n) {
|
|
1913
1915
|
const a = B("HumanAvatar");
|
|
1914
1916
|
return c(), d("div", {
|
|
@@ -1922,7 +1924,7 @@ function zt(e, t, s, r, i, n) {
|
|
|
1922
1924
|
default: je(() => [
|
|
1923
1925
|
n.visiblePeeks.length ? (c(), d("div", {
|
|
1924
1926
|
key: 0,
|
|
1925
|
-
class:
|
|
1927
|
+
class: O(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
|
|
1926
1928
|
}, [
|
|
1927
1929
|
(c(!0), d(I, null, j(n.visiblePeeks, (o, f) => (c(), d("div", {
|
|
1928
1930
|
key: o.convId,
|
|
@@ -1986,7 +1988,7 @@ function zt(e, t, s, r, i, n) {
|
|
|
1986
1988
|
class: "wm-peek__open",
|
|
1987
1989
|
onClick: J((b) => e.$emit("open", o.convId), ["stop"])
|
|
1988
1990
|
}, v(n.t("common.open")), 9, jt)
|
|
1989
|
-
], 44,
|
|
1991
|
+
], 44, Ot))), 128))
|
|
1990
1992
|
], 2)) : k("", !0)
|
|
1991
1993
|
]),
|
|
1992
1994
|
_: 1
|
|
@@ -2022,7 +2024,7 @@ function zt(e, t, s, r, i, n) {
|
|
|
2022
2024
|
], 8, Ft)
|
|
2023
2025
|
], 32);
|
|
2024
2026
|
}
|
|
2025
|
-
const qt = /* @__PURE__ */ N(
|
|
2027
|
+
const qt = /* @__PURE__ */ N(Rt, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
|
|
2026
2028
|
name: "WmAIAvatar",
|
|
2027
2029
|
props: {
|
|
2028
2030
|
size: { type: Number, default: 26 },
|
|
@@ -2045,10 +2047,10 @@ const qt = /* @__PURE__ */ N(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
|
|
|
2045
2047
|
},
|
|
2046
2048
|
computed: {
|
|
2047
2049
|
initials() {
|
|
2048
|
-
return
|
|
2050
|
+
return Me(this.name);
|
|
2049
2051
|
},
|
|
2050
2052
|
bgColor() {
|
|
2051
|
-
return
|
|
2053
|
+
return Te(this.name);
|
|
2052
2054
|
}
|
|
2053
2055
|
}
|
|
2054
2056
|
}, Kt = {
|
|
@@ -2057,7 +2059,7 @@ const qt = /* @__PURE__ */ N(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
|
|
|
2057
2059
|
}, Wt = ["src", "alt"], $t = ["width", "height"];
|
|
2058
2060
|
function Gt(e, t, s, r, i, n) {
|
|
2059
2061
|
return c(), d("div", {
|
|
2060
|
-
class:
|
|
2062
|
+
class: O(["wm-aiav", { "wm-aiav--tail": s.tail }]),
|
|
2061
2063
|
style: z({
|
|
2062
2064
|
width: s.size + "px",
|
|
2063
2065
|
height: s.size + "px",
|
|
@@ -2066,7 +2068,7 @@ function Gt(e, t, s, r, i, n) {
|
|
|
2066
2068
|
}, [
|
|
2067
2069
|
s.pulse ? (c(), d("div", Kt)) : k("", !0),
|
|
2068
2070
|
l("div", {
|
|
2069
|
-
class:
|
|
2071
|
+
class: O(["wm-aiav__inner", {
|
|
2070
2072
|
"wm-aiav__inner--glow": s.pulse,
|
|
2071
2073
|
"wm-aiav__inner--img": !!s.imageUrl,
|
|
2072
2074
|
"wm-aiav__inner--initials": !s.imageUrl && !!n.initials
|
|
@@ -2129,10 +2131,10 @@ const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
|
|
|
2129
2131
|
},
|
|
2130
2132
|
methods: {
|
|
2131
2133
|
colorFor(e) {
|
|
2132
|
-
return e.avatar_url ? "transparent" :
|
|
2134
|
+
return e.avatar_url ? "transparent" : Te(e.name || "");
|
|
2133
2135
|
},
|
|
2134
2136
|
initialsFor(e) {
|
|
2135
|
-
return
|
|
2137
|
+
return Me(e.name || "");
|
|
2136
2138
|
}
|
|
2137
2139
|
}
|
|
2138
2140
|
}, Jt = {
|
|
@@ -2258,7 +2260,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2258
2260
|
s.showMore ? (c(), d("button", {
|
|
2259
2261
|
key: 0,
|
|
2260
2262
|
type: "button",
|
|
2261
|
-
class:
|
|
2263
|
+
class: O(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
|
|
2262
2264
|
"aria-label": n.t("header.moreOptions"),
|
|
2263
2265
|
title: n.t("header.moreOptions"),
|
|
2264
2266
|
onClick: t[1] || (t[1] = (f) => e.$emit("more"))
|
|
@@ -2440,10 +2442,10 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2440
2442
|
}, Cn = ["onClick"], An = {
|
|
2441
2443
|
key: 0,
|
|
2442
2444
|
class: "wm-onb__defaultAvatar"
|
|
2443
|
-
}, Sn = ["aria-label"],
|
|
2445
|
+
}, Sn = ["aria-label"], Tn = { class: "wm-onb__alert-body" }, Mn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, Rn = {
|
|
2444
2446
|
key: 0,
|
|
2445
2447
|
class: "wm-onb__alert-sender"
|
|
2446
|
-
},
|
|
2448
|
+
}, On = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
|
|
2447
2449
|
key: 0,
|
|
2448
2450
|
class: "wm-onb__alert-time"
|
|
2449
2451
|
}, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Nn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Dn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
|
|
@@ -2535,7 +2537,7 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2535
2537
|
onClick: (f) => e.$emit("resume", o)
|
|
2536
2538
|
}, [
|
|
2537
2539
|
l("span", {
|
|
2538
|
-
class:
|
|
2540
|
+
class: O(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
|
|
2539
2541
|
}, [
|
|
2540
2542
|
n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[3] || (t[3] = [
|
|
2541
2543
|
l("svg", {
|
|
@@ -2560,13 +2562,13 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2560
2562
|
"aria-label": n.t("onboarding.unread")
|
|
2561
2563
|
}, null, 8, Sn)
|
|
2562
2564
|
], 2),
|
|
2563
|
-
l("span",
|
|
2564
|
-
l("span",
|
|
2565
|
+
l("span", Tn, [
|
|
2566
|
+
l("span", Mn, v(o.title), 1),
|
|
2565
2567
|
l("span", xn, [
|
|
2566
|
-
n.senderLabel(o) ? (c(), d("span",
|
|
2568
|
+
n.senderLabel(o) ? (c(), d("span", Rn, v(n.senderLabel(o)) + " · ", 1)) : k("", !0),
|
|
2567
2569
|
l("span", {
|
|
2568
2570
|
innerHTML: n.renderPreview(o.preview)
|
|
2569
|
-
}, null, 8,
|
|
2571
|
+
}, null, 8, On)
|
|
2570
2572
|
])
|
|
2571
2573
|
]),
|
|
2572
2574
|
l("span", Ln, [
|
|
@@ -2766,11 +2768,11 @@ function us(e, t, s, r, i, n) {
|
|
|
2766
2768
|
(c(!0), d(I, null, j(n.filteredThreads, (a) => (c(), d("button", {
|
|
2767
2769
|
key: a.id,
|
|
2768
2770
|
type: "button",
|
|
2769
|
-
class:
|
|
2771
|
+
class: O(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
|
|
2770
2772
|
onClick: (o) => e.$emit("resume", a)
|
|
2771
2773
|
}, [
|
|
2772
2774
|
l("span", {
|
|
2773
|
-
class:
|
|
2775
|
+
class: O(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
|
|
2774
2776
|
}, [
|
|
2775
2777
|
n.isDefaultAvatar(a) ? (c(), d("span", ss, [...t[2] || (t[2] = [
|
|
2776
2778
|
l("svg", {
|
|
@@ -2888,7 +2890,7 @@ const fs = {
|
|
|
2888
2890
|
}, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
|
|
2889
2891
|
function Cs(e, t, s, r, i, n) {
|
|
2890
2892
|
return c(), d("div", {
|
|
2891
|
-
class:
|
|
2893
|
+
class: O(["wm-result", `wm-result--${s.state}`])
|
|
2892
2894
|
}, [
|
|
2893
2895
|
l("span", _s, [
|
|
2894
2896
|
s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
|
|
@@ -2946,12 +2948,12 @@ const As = /* @__PURE__ */ N(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
|
|
|
2946
2948
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2947
2949
|
}
|
|
2948
2950
|
}
|
|
2949
|
-
},
|
|
2951
|
+
}, Ts = { class: "wm-art wm-art--formResponse" }, Ms = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Rs = { class: "wm-art__badge wm-art__badge--success" }, Os = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
|
|
2950
2952
|
function Is(e, t, s, r, i, n) {
|
|
2951
|
-
return c(), d("div",
|
|
2952
|
-
l("div",
|
|
2953
|
+
return c(), d("div", Ts, [
|
|
2954
|
+
l("div", Ms, [
|
|
2953
2955
|
l("div", xs, v(s.data.title || n.t("form.title")), 1),
|
|
2954
|
-
l("span",
|
|
2956
|
+
l("span", Rs, [
|
|
2955
2957
|
t[0] || (t[0] = l("svg", {
|
|
2956
2958
|
width: "11",
|
|
2957
2959
|
height: "11",
|
|
@@ -2968,14 +2970,14 @@ function Is(e, t, s, r, i, n) {
|
|
|
2968
2970
|
Se(" " + v(n.t("form.sent")), 1)
|
|
2969
2971
|
])
|
|
2970
2972
|
]),
|
|
2971
|
-
l("div",
|
|
2973
|
+
l("div", Os, [
|
|
2972
2974
|
(c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
|
|
2973
2975
|
key: o,
|
|
2974
2976
|
class: "wm-art__field"
|
|
2975
2977
|
}, [
|
|
2976
2978
|
l("div", Ls, v(a.label), 1),
|
|
2977
2979
|
l("div", {
|
|
2978
|
-
class:
|
|
2980
|
+
class: O([
|
|
2979
2981
|
"wm-art__fieldValue",
|
|
2980
2982
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2981
2983
|
])
|
|
@@ -3028,7 +3030,7 @@ function Ks(e, t, s, r, i, n) {
|
|
|
3028
3030
|
]),
|
|
3029
3031
|
s.data.badge && s.data.badge.label ? (c(), d("span", {
|
|
3030
3032
|
key: 0,
|
|
3031
|
-
class:
|
|
3033
|
+
class: O([
|
|
3032
3034
|
"wm-art__badge",
|
|
3033
3035
|
`wm-art__badge--${s.data.badge.tone || "neutral"}`
|
|
3034
3036
|
])
|
|
@@ -3042,7 +3044,7 @@ function Ks(e, t, s, r, i, n) {
|
|
|
3042
3044
|
}, [
|
|
3043
3045
|
l("div", Vs, v(a.label), 1),
|
|
3044
3046
|
l("div", {
|
|
3045
|
-
class:
|
|
3047
|
+
class: O([
|
|
3046
3048
|
"wm-art__fieldValue",
|
|
3047
3049
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3048
3050
|
])
|
|
@@ -3157,7 +3159,7 @@ function ar(e, t, s, r, i, n) {
|
|
|
3157
3159
|
l("span", null, v(s.data.reference), 1)
|
|
3158
3160
|
]),
|
|
3159
3161
|
l("span", {
|
|
3160
|
-
class:
|
|
3162
|
+
class: O([
|
|
3161
3163
|
"wm-art__badge",
|
|
3162
3164
|
"wm-tk__badge",
|
|
3163
3165
|
`wm-art__badge--${s.data.status.tone || "neutral"}`
|
|
@@ -3179,7 +3181,7 @@ function ar(e, t, s, r, i, n) {
|
|
|
3179
3181
|
}, [
|
|
3180
3182
|
l("div", nr, v(a.label), 1),
|
|
3181
3183
|
l("div", {
|
|
3182
|
-
class:
|
|
3184
|
+
class: O([
|
|
3183
3185
|
"wm-art__fieldValue",
|
|
3184
3186
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3185
3187
|
])
|
|
@@ -3356,7 +3358,7 @@ const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
|
|
|
3356
3358
|
};
|
|
3357
3359
|
function kr(e, t, s, r, i, n) {
|
|
3358
3360
|
return c(), d("div", {
|
|
3359
|
-
class:
|
|
3361
|
+
class: O(["wm-att", ["wm-att--" + (n.kind || "file")]])
|
|
3360
3362
|
}, [
|
|
3361
3363
|
n.kind === "image" && i.url ? (c(), d("a", {
|
|
3362
3364
|
key: 0,
|
|
@@ -3427,24 +3429,24 @@ const Cr = /* @__PURE__ */ N(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd
|
|
|
3427
3429
|
}
|
|
3428
3430
|
}
|
|
3429
3431
|
}, Sr = ["innerHTML"];
|
|
3430
|
-
function
|
|
3432
|
+
function Tr(e, t, s, r, i, n) {
|
|
3431
3433
|
return c(), d("div", {
|
|
3432
|
-
class:
|
|
3434
|
+
class: O(["wm-bubble", "wm-bubble--" + s.role])
|
|
3433
3435
|
}, [
|
|
3434
3436
|
We(e.$slots, "default", {}, () => [
|
|
3435
3437
|
l("span", { innerHTML: n.rendered }, null, 8, Sr)
|
|
3436
3438
|
], !0)
|
|
3437
3439
|
], 2);
|
|
3438
3440
|
}
|
|
3439
|
-
const
|
|
3440
|
-
function
|
|
3441
|
-
return c(), d("div",
|
|
3441
|
+
const Mr = /* @__PURE__ */ N(Ar, [["render", Tr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Rr = { class: "wm-typing" };
|
|
3442
|
+
function Or(e, t, s, r, i, n) {
|
|
3443
|
+
return c(), d("div", Rr, [...t[0] || (t[0] = [
|
|
3442
3444
|
l("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3443
3445
|
l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3444
3446
|
l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3445
3447
|
])]);
|
|
3446
3448
|
}
|
|
3447
|
-
const Lr = /* @__PURE__ */ N(xr, [["render",
|
|
3449
|
+
const Lr = /* @__PURE__ */ N(xr, [["render", Or], ["__scopeId", "data-v-df2447fd"]]);
|
|
3448
3450
|
function ee(e) {
|
|
3449
3451
|
return e ? e.client_msg_id || e.id : "";
|
|
3450
3452
|
}
|
|
@@ -3461,7 +3463,7 @@ const Ir = {
|
|
|
3461
3463
|
components: {
|
|
3462
3464
|
AIAvatar: oe,
|
|
3463
3465
|
HumanAvatar: ve,
|
|
3464
|
-
Bubble:
|
|
3466
|
+
Bubble: Mr,
|
|
3465
3467
|
Typing: Lr,
|
|
3466
3468
|
ActionResult: As,
|
|
3467
3469
|
AttachmentPreview: Cr,
|
|
@@ -3541,8 +3543,8 @@ const Ir = {
|
|
|
3541
3543
|
const f = this.roleOf(o);
|
|
3542
3544
|
if (f === "system") {
|
|
3543
3545
|
if (((r = o == null ? void 0 : o.payload) == null ? void 0 : r.event) === "action_admin_pending") {
|
|
3544
|
-
const
|
|
3545
|
-
|
|
3546
|
+
const T = e[e.length - 1];
|
|
3547
|
+
T && T.role === "ai" ? T.messages.push(o) : e.push({
|
|
3546
3548
|
key: `g-${ee(o)}`,
|
|
3547
3549
|
role: "ai",
|
|
3548
3550
|
agentName: "",
|
|
@@ -3861,9 +3863,9 @@ const Ir = {
|
|
|
3861
3863
|
// doit garder son arrondi.
|
|
3862
3864
|
cornersFor(e, t) {
|
|
3863
3865
|
var Q, se, re;
|
|
3864
|
-
const s = e.items, r = (Q = s[t]) == null ? void 0 : Q.kind, i = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top,
|
|
3866
|
+
const s = e.items, r = (Q = s[t]) == null ? void 0 : Q.kind, i = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = ($, ie, X) => $ != null && T != null ? $ + q >= T : ie === X || ie === "card" && X === "bubble";
|
|
3865
3867
|
let U = o, D = o, L = o, W = o;
|
|
3866
|
-
return a ? (b && (D = f), (y || !n) && (L = f), b &&
|
|
3868
|
+
return a ? (b && (D = f), (y || !n) && (L = f), b && M(E, b, r == null ? void 0 : r.top) && (U = f), y && M(A, y, r == null ? void 0 : r.bottom) && (W = f)) : (b && (U = f), (y || !n) && (W = f), b && M(E, b, r == null ? void 0 : r.top) && (D = f), y && M(A, y, r == null ? void 0 : r.bottom) && (L = f)), { tl: U, tr: D, br: L, bl: W };
|
|
3867
3869
|
},
|
|
3868
3870
|
// Inline column-count for the mosaic grid, capped at 4. Single
|
|
3869
3871
|
// attachment falls back to the vertical-list layout (null). Two
|
|
@@ -3886,8 +3888,8 @@ const Ir = {
|
|
|
3886
3888
|
// corners of every top-row cell flatten too.
|
|
3887
3889
|
mosaicCornerStyle(e, t, s) {
|
|
3888
3890
|
if (!t || t < 2) return null;
|
|
3889
|
-
const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, y = "4px",
|
|
3890
|
-
return (a || f) && (
|
|
3891
|
+
const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, y = "4px", T = {};
|
|
3892
|
+
return (a || f) && (T["--wm-r-tl"] = y), (o || f) && (T["--wm-r-tr"] = y), (a || b) && (T["--wm-r-bl"] = y), (o || b) && (T["--wm-r-br"] = y), s && (T["--wm-r-tl"] = y, T["--wm-r-tr"] = y), Object.keys(T).length ? T : null;
|
|
3891
3893
|
},
|
|
3892
3894
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3893
3895
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -4018,8 +4020,8 @@ const Ir = {
|
|
|
4018
4020
|
return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
|
|
4019
4021
|
if (t.state === "rejected") {
|
|
4020
4022
|
if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
|
|
4021
|
-
const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution,
|
|
4022
|
-
return this.t(
|
|
4023
|
+
const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, T = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
|
|
4024
|
+
return this.t(T);
|
|
4023
4025
|
}
|
|
4024
4026
|
return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
|
|
4025
4027
|
},
|
|
@@ -4076,11 +4078,11 @@ const Ir = {
|
|
|
4076
4078
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
4077
4079
|
}, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
|
|
4078
4080
|
function si(e, t, s, r, i, n) {
|
|
4079
|
-
const a = B("AIAvatar"), o = B("HumanAvatar"), f = B("ActionResult"), b = B("ArtifactRenderer"), y = B("Bubble"),
|
|
4081
|
+
const a = B("AIAvatar"), o = B("HumanAvatar"), f = B("ActionResult"), b = B("ArtifactRenderer"), y = B("Bubble"), T = B("AttachmentPreview"), E = B("Typing");
|
|
4080
4082
|
return c(), d("div", Nr, [
|
|
4081
4083
|
l("div", {
|
|
4082
4084
|
ref: "scrollEl",
|
|
4083
|
-
class:
|
|
4085
|
+
class: O(["wm-list", { "wm-list--silent": i.silentFades }]),
|
|
4084
4086
|
onScrollPassive: t[4] || (t[4] = (...A) => n.onScroll && n.onScroll(...A))
|
|
4085
4087
|
}, [
|
|
4086
4088
|
s.loadingMore ? (c(), d("div", Ur, [
|
|
@@ -4105,27 +4107,27 @@ function si(e, t, s, r, i, n) {
|
|
|
4105
4107
|
])) : k("", !0),
|
|
4106
4108
|
A.role === "system" || A.items.length ? (c(), d("div", {
|
|
4107
4109
|
key: 1,
|
|
4108
|
-
class:
|
|
4110
|
+
class: O(["wm-list__group", "wm-list__group--" + A.role])
|
|
4109
4111
|
}, [
|
|
4110
4112
|
A.role === "system" ? (c(), d("div", Vr, [
|
|
4111
4113
|
t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
4112
4114
|
l("span", Kr, v(A.systemLabel), 1),
|
|
4113
4115
|
t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
4114
4116
|
])) : (c(), d(I, { key: 1 }, [
|
|
4115
|
-
(c(!0), d(I, null, j(A.items, (
|
|
4116
|
-
key: `${n.messageKey(
|
|
4117
|
+
(c(!0), d(I, null, j(A.items, (M, U) => (c(), d(I, {
|
|
4118
|
+
key: `${n.messageKey(M.message)}-${M.partKey}`
|
|
4117
4119
|
}, [
|
|
4118
4120
|
l("div", {
|
|
4119
|
-
"data-row-key": `${n.messageKey(
|
|
4120
|
-
class:
|
|
4121
|
+
"data-row-key": `${n.messageKey(M.message)}-${M.partKey}`,
|
|
4122
|
+
class: O(["wm-list__row fade-up", [
|
|
4121
4123
|
"wm-list__row--" + A.role,
|
|
4122
4124
|
{
|
|
4123
|
-
"is-pending":
|
|
4124
|
-
"is-failed":
|
|
4125
|
+
"is-pending": M.message._pending,
|
|
4126
|
+
"is-failed": M.message._failed
|
|
4125
4127
|
}
|
|
4126
4128
|
]]),
|
|
4127
4129
|
style: z(n.cornersStyle(A, U)),
|
|
4128
|
-
onPointerdown: (D) => n.onPressStart(`${n.messageKey(
|
|
4130
|
+
onPointerdown: (D) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
|
|
4129
4131
|
onPointerup: t[0] || (t[0] = (D) => n.onPressEnd()),
|
|
4130
4132
|
onPointercancel: t[1] || (t[1] = (D) => n.onPressEnd()),
|
|
4131
4133
|
onPointerleave: t[2] || (t[2] = (D) => n.onPressEnd()),
|
|
@@ -4149,73 +4151,73 @@ function si(e, t, s, r, i, n) {
|
|
|
4149
4151
|
}, null, 8, ["name", "avatar-url"]))
|
|
4150
4152
|
], 64)) : k("", !0)
|
|
4151
4153
|
])) : k("", !0),
|
|
4152
|
-
|
|
4154
|
+
M.renderAs === "action" ? (c(), P(f, {
|
|
4153
4155
|
key: 1,
|
|
4154
|
-
state:
|
|
4155
|
-
label: n.actionLabel(
|
|
4156
|
-
detail: n.actionDetail(
|
|
4157
|
-
}, null, 8, ["state", "label", "detail"])) :
|
|
4156
|
+
state: M.message.payload.state,
|
|
4157
|
+
label: n.actionLabel(M.message),
|
|
4158
|
+
detail: n.actionDetail(M.message)
|
|
4159
|
+
}, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), P(f, {
|
|
4158
4160
|
key: 2,
|
|
4159
4161
|
state: "awaiting",
|
|
4160
4162
|
label: n.t("messageList.approvalRequestSent"),
|
|
4161
|
-
detail:
|
|
4162
|
-
}, null, 8, ["label", "detail"])) :
|
|
4163
|
+
detail: M.message.text_md || ""
|
|
4164
|
+
}, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), P(b, {
|
|
4163
4165
|
key: 3,
|
|
4164
|
-
artifact: n.actionArtifact(
|
|
4165
|
-
}, null, 8, ["artifact"])) :
|
|
4166
|
+
artifact: n.actionArtifact(M.message)
|
|
4167
|
+
}, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), P(b, {
|
|
4166
4168
|
key: 4,
|
|
4167
|
-
artifact: n.artifactOf(
|
|
4169
|
+
artifact: n.artifactOf(M.message)
|
|
4168
4170
|
}, null, 8, ["artifact"])) : (c(), d("div", {
|
|
4169
4171
|
key: 5,
|
|
4170
|
-
class:
|
|
4171
|
-
"wm-list__body--mixed": !!
|
|
4172
|
+
class: O(["wm-list__body", {
|
|
4173
|
+
"wm-list__body--mixed": !!M.message.text_md && n.attachmentsOf(M.message).length > 0
|
|
4172
4174
|
}])
|
|
4173
4175
|
}, [
|
|
4174
|
-
|
|
4176
|
+
M.message.text_md ? (c(), P(y, {
|
|
4175
4177
|
key: 0,
|
|
4176
4178
|
role: A.role,
|
|
4177
|
-
text:
|
|
4179
|
+
text: M.message.text_md
|
|
4178
4180
|
}, null, 8, ["role", "text"])) : k("", !0),
|
|
4179
|
-
n.attachmentsOf(
|
|
4181
|
+
n.attachmentsOf(M.message).length ? (c(), d("div", {
|
|
4180
4182
|
key: 1,
|
|
4181
|
-
class:
|
|
4183
|
+
class: O(["wm-list__atts", {
|
|
4182
4184
|
"wm-list__atts--align-end": A.role === "user",
|
|
4183
|
-
"wm-list__atts--mosaic": n.attachmentsOf(
|
|
4185
|
+
"wm-list__atts--mosaic": n.attachmentsOf(M.message).length >= 2
|
|
4184
4186
|
}]),
|
|
4185
4187
|
style: z(
|
|
4186
4188
|
n.mosaicGridStyle(
|
|
4187
|
-
n.attachmentsOf(
|
|
4189
|
+
n.attachmentsOf(M.message).length
|
|
4188
4190
|
)
|
|
4189
4191
|
)
|
|
4190
4192
|
}, [
|
|
4191
4193
|
(c(!0), d(I, null, j(n.attachmentsOf(
|
|
4192
|
-
|
|
4193
|
-
), (D, L) => (c(), P(
|
|
4194
|
-
key: `${n.messageKey(
|
|
4194
|
+
M.message
|
|
4195
|
+
), (D, L) => (c(), P(T, {
|
|
4196
|
+
key: `${n.messageKey(M.message)}-att-${L}`,
|
|
4195
4197
|
attachment: D,
|
|
4196
4198
|
style: z(
|
|
4197
4199
|
n.mosaicCornerStyle(
|
|
4198
4200
|
L,
|
|
4199
|
-
n.attachmentsOf(
|
|
4200
|
-
!!
|
|
4201
|
+
n.attachmentsOf(M.message).length,
|
|
4202
|
+
!!M.message.text_md
|
|
4201
4203
|
)
|
|
4202
4204
|
)
|
|
4203
4205
|
}, null, 8, ["attachment", "style"]))), 128))
|
|
4204
4206
|
], 6)) : k("", !0)
|
|
4205
4207
|
], 2))
|
|
4206
4208
|
], 46, Wr),
|
|
4207
|
-
U < A.items.length - 1 && i.pressedItemKey === `${n.messageKey(
|
|
4209
|
+
U < A.items.length - 1 && i.pressedItemKey === `${n.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || n.timeOf(M.message)) ? (c(), d("div", {
|
|
4208
4210
|
key: 0,
|
|
4209
|
-
class:
|
|
4211
|
+
class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
4210
4212
|
}, [
|
|
4211
4213
|
A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : k("", !0),
|
|
4212
|
-
A.role !== "user" && n.timeOf(
|
|
4213
|
-
n.timeOf(
|
|
4214
|
+
A.role !== "user" && n.timeOf(M.message) ? (c(), d("span", Yr, "•")) : k("", !0),
|
|
4215
|
+
n.timeOf(M.message) ? (c(), d("span", Jr, v(n.timeOf(M.message)), 1)) : k("", !0)
|
|
4214
4216
|
], 2)) : k("", !0)
|
|
4215
4217
|
], 64))), 128)),
|
|
4216
4218
|
(A.role !== "user" || n.lastTimeOf(A)) && !n.hasTrailingOverlay(A) ? (c(), d("div", {
|
|
4217
4219
|
key: 0,
|
|
4218
|
-
class:
|
|
4220
|
+
class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
4219
4221
|
}, [
|
|
4220
4222
|
A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : k("", !0),
|
|
4221
4223
|
A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : k("", !0),
|
|
@@ -4265,9 +4267,9 @@ function si(e, t, s, r, i, n) {
|
|
|
4265
4267
|
})
|
|
4266
4268
|
]);
|
|
4267
4269
|
}
|
|
4268
|
-
const ri = /* @__PURE__ */ N(Pr, [["render", si], ["__scopeId", "data-v-fd42a48c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function",
|
|
4270
|
+
const ri = /* @__PURE__ */ N(Pr, [["render", si], ["__scopeId", "data-v-fd42a48c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Re = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
4269
4271
|
function ii() {
|
|
4270
|
-
return
|
|
4272
|
+
return Re && [
|
|
4271
4273
|
"video/webm;codecs=vp9,opus",
|
|
4272
4274
|
"video/webm;codecs=vp8,opus",
|
|
4273
4275
|
"video/webm",
|
|
@@ -4324,7 +4326,7 @@ async function oi(e) {
|
|
|
4324
4326
|
}
|
|
4325
4327
|
async function li(e = {}) {
|
|
4326
4328
|
var b;
|
|
4327
|
-
if (!pe || !
|
|
4329
|
+
if (!pe || !Re) return null;
|
|
4328
4330
|
let t;
|
|
4329
4331
|
try {
|
|
4330
4332
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
@@ -4338,8 +4340,8 @@ async function li(e = {}) {
|
|
|
4338
4340
|
try {
|
|
4339
4341
|
r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
|
|
4340
4342
|
} catch (y) {
|
|
4341
|
-
return console.error("[media] recorder init", y), t.getTracks().forEach((
|
|
4342
|
-
|
|
4343
|
+
return console.error("[media] recorder init", y), t.getTracks().forEach((T) => {
|
|
4344
|
+
T.stop();
|
|
4343
4345
|
}), null;
|
|
4344
4346
|
}
|
|
4345
4347
|
const i = [];
|
|
@@ -4347,16 +4349,16 @@ async function li(e = {}) {
|
|
|
4347
4349
|
r.addEventListener("dataavailable", (y) => {
|
|
4348
4350
|
y.data && y.data.size > 0 && i.push(y.data);
|
|
4349
4351
|
}), r.addEventListener("stop", () => {
|
|
4350
|
-
var y,
|
|
4352
|
+
var y, T;
|
|
4351
4353
|
if (n && clearInterval(n), t.getTracks().forEach((E) => {
|
|
4352
4354
|
E.stop();
|
|
4353
4355
|
}), i.length) {
|
|
4354
|
-
const E = r.mimeType || s || "video/webm", A = new Blob(i, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm",
|
|
4356
|
+
const E = r.mimeType || s || "video/webm", A = new Blob(i, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${M}.${q}`, {
|
|
4355
4357
|
type: E
|
|
4356
4358
|
});
|
|
4357
4359
|
(y = e.onfinalize) == null || y.call(e, U);
|
|
4358
4360
|
} else
|
|
4359
|
-
(
|
|
4361
|
+
(T = e.oncancel) == null || T.call(e);
|
|
4360
4362
|
}), t.getVideoTracks().forEach((y) => {
|
|
4361
4363
|
y.addEventListener("ended", () => o(), { once: !0 });
|
|
4362
4364
|
});
|
|
@@ -4371,8 +4373,8 @@ async function li(e = {}) {
|
|
|
4371
4373
|
try {
|
|
4372
4374
|
r.start(1e3);
|
|
4373
4375
|
} catch (y) {
|
|
4374
|
-
return console.error("[media] recorder start", y), t.getTracks().forEach((
|
|
4375
|
-
|
|
4376
|
+
return console.error("[media] recorder start", y), t.getTracks().forEach((T) => {
|
|
4377
|
+
T.stop();
|
|
4376
4378
|
}), null;
|
|
4377
4379
|
}
|
|
4378
4380
|
(b = e.onstart) == null || b.call(e);
|
|
@@ -4440,7 +4442,7 @@ const ci = [
|
|
|
4440
4442
|
return ci.map((e) => ({
|
|
4441
4443
|
...e,
|
|
4442
4444
|
label: this.t(e.labelKey),
|
|
4443
|
-
disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !
|
|
4445
|
+
disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !Re)
|
|
4444
4446
|
}));
|
|
4445
4447
|
},
|
|
4446
4448
|
recordingElapsedLabel() {
|
|
@@ -4574,7 +4576,7 @@ const ci = [
|
|
|
4574
4576
|
}, pi = ["d"], vi = ["placeholder", "disabled"], yi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
|
|
4575
4577
|
function ki(e, t, s, r, i, n) {
|
|
4576
4578
|
return c(), d("div", {
|
|
4577
|
-
class:
|
|
4579
|
+
class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
|
|
4578
4580
|
style: z(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
|
|
4579
4581
|
}, [
|
|
4580
4582
|
i.recording ? (c(), d("div", ui, [
|
|
@@ -4590,7 +4592,7 @@ function ki(e, t, s, r, i, n) {
|
|
|
4590
4592
|
}, v(n.t("composer.stop")), 1)
|
|
4591
4593
|
])) : k("", !0),
|
|
4592
4594
|
l("form", {
|
|
4593
|
-
class:
|
|
4595
|
+
class: O(["wm-compose", { "has-attach": i.attachOpen }]),
|
|
4594
4596
|
onSubmit: t[7] || (t[7] = J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
|
|
4595
4597
|
}, [
|
|
4596
4598
|
l("input", {
|
|
@@ -4643,7 +4645,7 @@ function ki(e, t, s, r, i, n) {
|
|
|
4643
4645
|
l("div", yi, [
|
|
4644
4646
|
l("button", {
|
|
4645
4647
|
type: "button",
|
|
4646
|
-
class:
|
|
4648
|
+
class: O(["wm-compose__icon", { "is-open": i.attachOpen }]),
|
|
4647
4649
|
title: s.attachLabel,
|
|
4648
4650
|
"aria-label": s.attachLabel,
|
|
4649
4651
|
disabled: i.recording,
|
|
@@ -4665,7 +4667,7 @@ function ki(e, t, s, r, i, n) {
|
|
|
4665
4667
|
])], 10, wi),
|
|
4666
4668
|
l("button", {
|
|
4667
4669
|
type: "submit",
|
|
4668
|
-
class:
|
|
4670
|
+
class: O(["wm-compose__send", { "is-empty": !n.canSend }]),
|
|
4669
4671
|
disabled: !n.canSend,
|
|
4670
4672
|
"aria-label": n.t("composer.send")
|
|
4671
4673
|
}, [...t[10] || (t[10] = [
|
|
@@ -4705,7 +4707,7 @@ const Ci = /* @__PURE__ */ N(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
|
|
|
4705
4707
|
}
|
|
4706
4708
|
}
|
|
4707
4709
|
}, Si = ["onClick"];
|
|
4708
|
-
function
|
|
4710
|
+
function Ti(e, t, s, r, i, n) {
|
|
4709
4711
|
return s.items.length ? (c(), d("div", {
|
|
4710
4712
|
key: n.batchKey,
|
|
4711
4713
|
class: "wm-chips"
|
|
@@ -4719,7 +4721,7 @@ function Mi(e, t, s, r, i, n) {
|
|
|
4719
4721
|
}, v(a.label), 13, Si))), 128))
|
|
4720
4722
|
])) : k("", !0);
|
|
4721
4723
|
}
|
|
4722
|
-
const
|
|
4724
|
+
const Mi = /* @__PURE__ */ N(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085"]]), xi = {
|
|
4723
4725
|
name: "WmApprovalCard",
|
|
4724
4726
|
components: { AIAvatar: oe },
|
|
4725
4727
|
inject: {
|
|
@@ -4763,14 +4765,14 @@ const Ti = /* @__PURE__ */ N(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085
|
|
|
4763
4765
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4764
4766
|
}
|
|
4765
4767
|
}
|
|
4766
|
-
},
|
|
4768
|
+
}, Ri = { class: "wm-approval" }, Oi = { class: "wm-approval__head" }, Li = { class: "wm-approval__icon" }, Ii = { class: "wm-approval__main" }, Ei = { class: "wm-approval__title" }, Bi = {
|
|
4767
4769
|
key: 0,
|
|
4768
4770
|
class: "wm-approval__detail"
|
|
4769
4771
|
}, Pi = { class: "wm-approval__actions" };
|
|
4770
4772
|
function Ni(e, t, s, r, i, n) {
|
|
4771
4773
|
const a = B("AIAvatar");
|
|
4772
|
-
return c(), d("div",
|
|
4773
|
-
l("div",
|
|
4774
|
+
return c(), d("div", Ri, [
|
|
4775
|
+
l("div", Oi, [
|
|
4774
4776
|
l("div", Li, [
|
|
4775
4777
|
K(a, {
|
|
4776
4778
|
size: 24,
|
|
@@ -5121,7 +5123,7 @@ function Ca(e, t, s, r, i, n) {
|
|
|
5121
5123
|
(c(!0), d(I, null, j(n.options, (a) => (c(), d("button", {
|
|
5122
5124
|
key: a.v,
|
|
5123
5125
|
type: "button",
|
|
5124
|
-
class:
|
|
5126
|
+
class: O(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
|
|
5125
5127
|
onClick: (o) => i.sel = a.v
|
|
5126
5128
|
}, [
|
|
5127
5129
|
l("span", pa, v(a.e), 1),
|
|
@@ -5172,23 +5174,23 @@ const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
|
|
|
5172
5174
|
this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
|
|
5173
5175
|
}
|
|
5174
5176
|
}
|
|
5175
|
-
},
|
|
5177
|
+
}, Ta = { class: "wm-mm" }, Ma = {
|
|
5176
5178
|
class: "wm-mm__pop",
|
|
5177
5179
|
role: "menu"
|
|
5178
5180
|
}, xa = {
|
|
5179
5181
|
key: 0,
|
|
5180
5182
|
class: "wm-mm__section"
|
|
5181
|
-
},
|
|
5183
|
+
}, Ra = { class: "wm-mm__label" }, Oa = { class: "wm-mm__label" }, La = {
|
|
5182
5184
|
key: 1,
|
|
5183
5185
|
class: "wm-mm__sep"
|
|
5184
5186
|
}, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Na = { class: "wm-mm__label" };
|
|
5185
5187
|
function Ua(e, t, s, r, i, n) {
|
|
5186
|
-
return c(), d("div",
|
|
5188
|
+
return c(), d("div", Ta, [
|
|
5187
5189
|
l("div", {
|
|
5188
5190
|
class: "wm-mm__scrim",
|
|
5189
5191
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
5190
5192
|
}),
|
|
5191
|
-
l("div",
|
|
5193
|
+
l("div", Ma, [
|
|
5192
5194
|
s.canRename || s.canExport ? (c(), d("div", xa, [
|
|
5193
5195
|
s.canRename ? (c(), d("button", {
|
|
5194
5196
|
key: 0,
|
|
@@ -5212,7 +5214,7 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5212
5214
|
l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
5213
5215
|
])
|
|
5214
5216
|
], -1)),
|
|
5215
|
-
l("span",
|
|
5217
|
+
l("span", Ra, v(n.t("moreMenu.editTitle")), 1)
|
|
5216
5218
|
])) : k("", !0),
|
|
5217
5219
|
s.canExport ? (c(), d("button", {
|
|
5218
5220
|
key: 1,
|
|
@@ -5235,7 +5237,7 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5235
5237
|
l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
5236
5238
|
])
|
|
5237
5239
|
], -1)),
|
|
5238
|
-
l("span",
|
|
5240
|
+
l("span", Oa, v(n.t("moreMenu.exportTranscript")), 1),
|
|
5239
5241
|
t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
5240
5242
|
])) : k("", !0)
|
|
5241
5243
|
])) : k("", !0),
|
|
@@ -5264,7 +5266,7 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5264
5266
|
], -1)),
|
|
5265
5267
|
l("span", Ea, v(n.t("moreMenu.sound")), 1),
|
|
5266
5268
|
l("span", {
|
|
5267
|
-
class:
|
|
5269
|
+
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
|
|
5268
5270
|
}, [...t[9] || (t[9] = [
|
|
5269
5271
|
l("span", { class: "wm-mm__knob" }, null, -1)
|
|
5270
5272
|
])], 2)
|
|
@@ -5440,7 +5442,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5440
5442
|
History: hs,
|
|
5441
5443
|
MessageList: ri,
|
|
5442
5444
|
Composer: Ci,
|
|
5443
|
-
SuggestionChips:
|
|
5445
|
+
SuggestionChips: Mi,
|
|
5444
5446
|
ApprovalCard: Ui,
|
|
5445
5447
|
FormCard: da,
|
|
5446
5448
|
Feedback: Aa,
|
|
@@ -5523,6 +5525,10 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5523
5525
|
// PJ, formulaire, quick-link sans URL). Évite de polluer la liste
|
|
5524
5526
|
// côté serveur avec des fils vides abandonnés.
|
|
5525
5527
|
draftConv: null,
|
|
5528
|
+
// convId → true quand l'utilisateur a cliqué "Rouvrir" sur une conv
|
|
5529
|
+
// fermée : débloque le composer localement le temps qu'un message la
|
|
5530
|
+
// réactive côté serveur. Reset au reload (non persisté, volontaire).
|
|
5531
|
+
reopenedLocally: {},
|
|
5526
5532
|
// When set, takes precedence over the latest-conversation
|
|
5527
5533
|
// selection so the user can browse another thread from the
|
|
5528
5534
|
// onboarding list without losing live updates on the others.
|
|
@@ -5657,13 +5663,13 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5657
5663
|
const i = e[r.id] || [], n = Y(r.last_read_message_id);
|
|
5658
5664
|
let a = 0, o = null;
|
|
5659
5665
|
for (let y = i.length - 1; y >= 0; y--) {
|
|
5660
|
-
const
|
|
5661
|
-
if (!
|
|
5662
|
-
if (((b =
|
|
5663
|
-
const E = Y(
|
|
5666
|
+
const T = i[y];
|
|
5667
|
+
if (!T) continue;
|
|
5668
|
+
if (((b = T.author) == null ? void 0 : b.type) === "user") break;
|
|
5669
|
+
const E = Y(T.id);
|
|
5664
5670
|
if (E != null) {
|
|
5665
5671
|
if (n != null && E <= n) break;
|
|
5666
|
-
t[
|
|
5672
|
+
t[T.id] !== 0 && (!o && T.author && (o = T.author), a++);
|
|
5667
5673
|
}
|
|
5668
5674
|
}
|
|
5669
5675
|
if (!i.length) {
|
|
@@ -5863,6 +5869,18 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5863
5869
|
const e = (t = this.currentConv) == null ? void 0 : t.status;
|
|
5864
5870
|
return e === "resolved" || e === "closed";
|
|
5865
5871
|
},
|
|
5872
|
+
isClosed() {
|
|
5873
|
+
var e;
|
|
5874
|
+
return ((e = this.currentConv) == null ? void 0 : e.status) === "closed";
|
|
5875
|
+
},
|
|
5876
|
+
// Bloc "conversation terminée" (remplace le composer) : visible sur tout
|
|
5877
|
+
// statut terminal, SAUF si l'utilisateur a cliqué "Rouvrir" sur une conv
|
|
5878
|
+
// fermée — on rouvre alors le composer pour qu'un message la réactive
|
|
5879
|
+
// (règle serveur universelle : message client sur conv terminée → reopen).
|
|
5880
|
+
endedBlockVisible() {
|
|
5881
|
+
var e;
|
|
5882
|
+
return !(!this.isTerminal || this.isClosed && this.reopenedLocally[(e = this.currentConv) == null ? void 0 : e.id]);
|
|
5883
|
+
},
|
|
5866
5884
|
headerTitle() {
|
|
5867
5885
|
var e, t;
|
|
5868
5886
|
return ((e = this.currentConv) == null ? void 0 : e.name) || ((t = this.widget) == null ? void 0 : t.name) || this.t("common.newConversation");
|
|
@@ -5882,8 +5900,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5882
5900
|
if (!(a != null && a.loaded)) return t;
|
|
5883
5901
|
}
|
|
5884
5902
|
const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
|
|
5885
|
-
var o, f, b, y,
|
|
5886
|
-
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (
|
|
5903
|
+
var o, f, b, y, T;
|
|
5904
|
+
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
|
|
5887
5905
|
});
|
|
5888
5906
|
return t.length ? [...t, ...r] : r;
|
|
5889
5907
|
},
|
|
@@ -5953,7 +5971,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5953
5971
|
return e ? ((t = e.payload) == null ? void 0 : t.name) || e.text_md || this.t("common.action") : "";
|
|
5954
5972
|
},
|
|
5955
5973
|
suggestions() {
|
|
5956
|
-
return this.currentConv ? this.streamingActive ? [] : this.pendingForm ? [] : this.conversationIsEmpty ? this.starterPrompts : this.store ? this.store.getLatestSuggestions(this.currentConv.id) : [] : [];
|
|
5974
|
+
return this.currentConv ? this.isTerminal ? [] : this.streamingActive ? [] : this.pendingForm ? [] : this.conversationIsEmpty ? this.starterPrompts : this.store ? this.store.getLatestSuggestions(this.currentConv.id) : [] : [];
|
|
5957
5975
|
},
|
|
5958
5976
|
// True for drafts and for real conversations that the server
|
|
5959
5977
|
// still holds no message for — i.e. the user hasn't sent
|
|
@@ -6191,12 +6209,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6191
6209
|
return;
|
|
6192
6210
|
}
|
|
6193
6211
|
try {
|
|
6194
|
-
await this.waitForParentInit(), this.transport =
|
|
6212
|
+
await this.waitForParentInit(), this.transport = Oe(
|
|
6195
6213
|
Ze({
|
|
6196
6214
|
baseUrl: this.baseUrl,
|
|
6197
6215
|
widgetId: this.widgetId
|
|
6198
6216
|
})
|
|
6199
|
-
), this.store =
|
|
6217
|
+
), this.store = Oe(st(this.transport)), this.hydrateNotifPref();
|
|
6200
6218
|
const e = this.parentVariables || this.context || null;
|
|
6201
6219
|
if (await this.store.start({
|
|
6202
6220
|
origin: this.parentOrigin,
|
|
@@ -6291,13 +6309,13 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6291
6309
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
6292
6310
|
},
|
|
6293
6311
|
sendCurrentLauncherSize() {
|
|
6294
|
-
var y,
|
|
6312
|
+
var y, T, E, A, q, M, U;
|
|
6295
6313
|
if (this.isOpen) return;
|
|
6296
|
-
const e = (
|
|
6314
|
+
const e = (T = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : T.call(y, ".wm-launcherWrap");
|
|
6297
6315
|
if (!e) return;
|
|
6298
6316
|
const t = e.getBoundingClientRect();
|
|
6299
6317
|
if (!t.width || !t.height) return;
|
|
6300
|
-
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), o = (U = (
|
|
6318
|
+
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), o = (U = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : U.call(M, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
|
|
6301
6319
|
let b = null;
|
|
6302
6320
|
if (f) {
|
|
6303
6321
|
const D = f.getBoundingClientRect();
|
|
@@ -6355,6 +6373,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6355
6373
|
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
6356
6374
|
}, this.activeConvId = null, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1, this.focusComposer();
|
|
6357
6375
|
},
|
|
6376
|
+
// "Rouvrir" sur une conv fermée : débloque le composer localement. Le
|
|
6377
|
+
// prochain message envoyé rouvre la conv côté serveur (règle universelle
|
|
6378
|
+
// message-sur-conv-terminée → reopen). Pas d'appel réseau ici.
|
|
6379
|
+
onReopen() {
|
|
6380
|
+
var t;
|
|
6381
|
+
const e = (t = this.currentConv) == null ? void 0 : t.id;
|
|
6382
|
+
e && (this.reopenedLocally = { ...this.reopenedLocally, [e]: !0 }, this.focusComposer());
|
|
6383
|
+
},
|
|
6358
6384
|
// Materialize the draft into a real server-side conversation. Returns
|
|
6359
6385
|
// the freshly-created conv (so callers can `send` against its id) or
|
|
6360
6386
|
// `null` if the creation failed.
|
|
@@ -6703,9 +6729,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6703
6729
|
"aria-live": "polite"
|
|
6704
6730
|
}, po = { class: "wm-ended__lbl" };
|
|
6705
6731
|
function vo(e, t, s, r, i, n) {
|
|
6706
|
-
const a = B("Launcher"), o = B("Header"), f = B("History"), b = B("Onboarding"), y = B("MessageList"),
|
|
6732
|
+
const a = B("Launcher"), o = B("Header"), f = B("History"), b = B("Onboarding"), y = B("MessageList"), T = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), M = B("Composer"), U = B("MoreMenu"), D = B("RenameDialog");
|
|
6707
6733
|
return c(), d("div", {
|
|
6708
|
-
class:
|
|
6734
|
+
class: O(["wm-root", `wm-root--${s.displayMode}`]),
|
|
6709
6735
|
style: z(n.rootStyle)
|
|
6710
6736
|
}, [
|
|
6711
6737
|
!i.isOpen && !n.isEmbedded ? (c(), P(a, {
|
|
@@ -6718,7 +6744,7 @@ function vo(e, t, s, r, i, n) {
|
|
|
6718
6744
|
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
|
|
6719
6745
|
i.isOpen || n.isEmbedded ? (c(), d("section", {
|
|
6720
6746
|
key: 1,
|
|
6721
|
-
class:
|
|
6747
|
+
class: O([
|
|
6722
6748
|
"wm-panel",
|
|
6723
6749
|
`wm-panel--${s.displayMode}`,
|
|
6724
6750
|
{ "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
|
|
@@ -6812,7 +6838,7 @@ function vo(e, t, s, r, i, n) {
|
|
|
6812
6838
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
|
|
6813
6839
|
l("div", ro, [
|
|
6814
6840
|
n.floatVisible ? (c(), d("div", io, [
|
|
6815
|
-
n.approvalReady ? (c(), P(
|
|
6841
|
+
n.approvalReady ? (c(), P(T, {
|
|
6816
6842
|
key: 0,
|
|
6817
6843
|
action: n.approvalTitle,
|
|
6818
6844
|
detail: n.approvalDetail,
|
|
@@ -6820,7 +6846,7 @@ function vo(e, t, s, r, i, n) {
|
|
|
6820
6846
|
"agent-name": n.agentName,
|
|
6821
6847
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6822
6848
|
onCallback: n.onApprovalCallback
|
|
6823
|
-
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingResolution ? (c(), P(
|
|
6849
|
+
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingResolution ? (c(), P(T, {
|
|
6824
6850
|
key: 1,
|
|
6825
6851
|
action: n.pendingResolution.text_md,
|
|
6826
6852
|
callbacks: n.pendingResolution.callbacks,
|
|
@@ -6909,14 +6935,14 @@ function vo(e, t, s, r, i, n) {
|
|
|
6909
6935
|
])], 8, _o)
|
|
6910
6936
|
]))), 128))
|
|
6911
6937
|
])) : k("", !0),
|
|
6912
|
-
n.
|
|
6913
|
-
l("span", po, v(n.t("composer.conversationEnded")), 1),
|
|
6938
|
+
n.endedBlockVisible ? (c(), d("div", go, [
|
|
6939
|
+
l("span", po, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
|
|
6914
6940
|
l("button", {
|
|
6915
6941
|
type: "button",
|
|
6916
6942
|
class: "wm-ended__btn",
|
|
6917
|
-
onClick: t[2] || (t[2] = (
|
|
6918
|
-
}, v(n.t("composer.newConversation")), 1)
|
|
6919
|
-
])) : n.actionInFlight ? k("", !0) : (c(), P(
|
|
6943
|
+
onClick: t[2] || (t[2] = (L) => n.isClosed ? n.onReopen() : n.startConv())
|
|
6944
|
+
}, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
|
|
6945
|
+
])) : n.actionInFlight ? k("", !0) : (c(), P(M, {
|
|
6920
6946
|
key: 4,
|
|
6921
6947
|
ref: "composer",
|
|
6922
6948
|
modelValue: i.draft,
|
|
@@ -6976,7 +7002,7 @@ function vo(e, t, s, r, i, n) {
|
|
|
6976
7002
|
], 6)) : k("", !0)
|
|
6977
7003
|
], 6);
|
|
6978
7004
|
}
|
|
6979
|
-
const bo = /* @__PURE__ */ N(Xa, [["render", vo], ["__scopeId", "data-v-
|
|
7005
|
+
const bo = /* @__PURE__ */ N(Xa, [["render", vo], ["__scopeId", "data-v-441d76b9"]]), ko = "0.5.78";
|
|
6980
7006
|
export {
|
|
6981
7007
|
oe as AIAvatar,
|
|
6982
7008
|
be as AVATAR_COLORS,
|
|
@@ -6987,7 +7013,7 @@ export {
|
|
|
6987
7013
|
ur as ArtifactRenderer,
|
|
6988
7014
|
or as ArtifactTicket,
|
|
6989
7015
|
Cr as AttachmentPreview,
|
|
6990
|
-
|
|
7016
|
+
Mr as Bubble,
|
|
6991
7017
|
Ci as Composer,
|
|
6992
7018
|
it as DEFAULT_BASE_URL,
|
|
6993
7019
|
ue as DEFAULT_LANGUAGE,
|
|
@@ -6996,19 +7022,19 @@ export {
|
|
|
6996
7022
|
_n as Header,
|
|
6997
7023
|
ve as HumanAvatar,
|
|
6998
7024
|
qt as Launcher,
|
|
6999
|
-
|
|
7025
|
+
Re as MEDIA_RECORDER_SUPPORTED,
|
|
7000
7026
|
ri as MessageList,
|
|
7001
7027
|
bo as Messenger,
|
|
7002
7028
|
Da as MoreMenu,
|
|
7003
7029
|
Jn as Onboarding,
|
|
7004
7030
|
pe as SCREEN_CAPTURE_SUPPORTED,
|
|
7005
7031
|
ut as SUPPORTED_LANGUAGES,
|
|
7006
|
-
|
|
7032
|
+
Mi as SuggestionChips,
|
|
7007
7033
|
tn as TeamAvatars,
|
|
7008
7034
|
Lr as Typing,
|
|
7009
7035
|
ko as VERSION,
|
|
7010
|
-
|
|
7011
|
-
|
|
7036
|
+
Te as avatarColor,
|
|
7037
|
+
Me as avatarInitials,
|
|
7012
7038
|
ai as captureScreenshotFile,
|
|
7013
7039
|
H as colors,
|
|
7014
7040
|
st as createStore,
|