@_solaris/messenger-widget 0.6.1 → 0.6.2
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 +4 -4
- package/dist/messenger.cjs +8 -8
- package/dist/messenger.js +549 -529
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -48,7 +48,7 @@ function et(e) {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function a(u) {
|
|
52
52
|
t.connection !== u && (t.connection = u, r("connection", u));
|
|
53
53
|
}
|
|
54
54
|
function n() {
|
|
@@ -64,7 +64,7 @@ function et(e) {
|
|
|
64
64
|
...t.origin ? { "X-Parent-Origin": t.origin } : {}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
async function
|
|
67
|
+
async function i(u, g, p) {
|
|
68
68
|
const R = await fetch(`${t.baseUrl}${we}${g}`, {
|
|
69
69
|
method: u,
|
|
70
70
|
credentials: "include",
|
|
@@ -132,7 +132,7 @@ function et(e) {
|
|
|
132
132
|
}
|
|
133
133
|
return K.json();
|
|
134
134
|
}),
|
|
135
|
-
|
|
135
|
+
i("GET", "/customers/me")
|
|
136
136
|
]), V = { config: R, customer: (O == null ? void 0 : O.customer) ?? null };
|
|
137
137
|
return t.lastBootstrap = V, await b(), typeof document < "u" && (t.visibilityHandler = _, document.addEventListener(
|
|
138
138
|
"visibilitychange",
|
|
@@ -151,35 +151,35 @@ function et(e) {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
async function v() {
|
|
154
|
-
const u = await
|
|
154
|
+
const u = await i("GET", "/customers/me");
|
|
155
155
|
return (u == null ? void 0 : u.customer) ?? null;
|
|
156
156
|
}
|
|
157
157
|
async function M(u) {
|
|
158
|
-
const g = await
|
|
158
|
+
const g = await i("PATCH", "/customers/me", u);
|
|
159
159
|
return (g == null ? void 0 : g.customer) ?? null;
|
|
160
160
|
}
|
|
161
161
|
async function E() {
|
|
162
|
-
const u = await
|
|
162
|
+
const u = await i("GET", "/conversations");
|
|
163
163
|
return (u == null ? void 0 : u.conversations) ?? [];
|
|
164
164
|
}
|
|
165
165
|
async function S(u = {}) {
|
|
166
|
-
return (await
|
|
166
|
+
return (await i("POST", "/conversations", u)).conversation;
|
|
167
167
|
}
|
|
168
168
|
async function z(u) {
|
|
169
|
-
return (await
|
|
169
|
+
return (await i(
|
|
170
170
|
"GET",
|
|
171
171
|
`/conversations/${encodeURIComponent(u)}`
|
|
172
172
|
)).conversation;
|
|
173
173
|
}
|
|
174
174
|
async function T(u, g) {
|
|
175
|
-
return (await
|
|
175
|
+
return (await i(
|
|
176
176
|
"PATCH",
|
|
177
177
|
`/conversations/${encodeURIComponent(u)}`,
|
|
178
178
|
g
|
|
179
179
|
)).conversation;
|
|
180
180
|
}
|
|
181
181
|
async function U(u, g) {
|
|
182
|
-
return
|
|
182
|
+
return i(
|
|
183
183
|
"PATCH",
|
|
184
184
|
`/conversations/${encodeURIComponent(u)}/read`,
|
|
185
185
|
{ message_id: g }
|
|
@@ -189,7 +189,7 @@ function et(e) {
|
|
|
189
189
|
const p = new URLSearchParams();
|
|
190
190
|
g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
|
|
191
191
|
const R = p.toString() ? `?${p.toString()}` : "";
|
|
192
|
-
return
|
|
192
|
+
return i(
|
|
193
193
|
"GET",
|
|
194
194
|
`/conversations/${encodeURIComponent(u)}/messages${R}`
|
|
195
195
|
);
|
|
@@ -203,21 +203,21 @@ function et(e) {
|
|
|
203
203
|
author: { id: t.userId, type: "user" },
|
|
204
204
|
created_at: g.created_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
205
205
|
};
|
|
206
|
-
return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext),
|
|
206
|
+
return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), i(
|
|
207
207
|
"POST",
|
|
208
208
|
`/conversations/${encodeURIComponent(u)}/messages`,
|
|
209
209
|
p
|
|
210
210
|
);
|
|
211
211
|
}
|
|
212
212
|
async function J(u, g, p) {
|
|
213
|
-
return ee(),
|
|
213
|
+
return ee(), i(
|
|
214
214
|
"POST",
|
|
215
215
|
`/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
|
|
216
216
|
p ? { inputs: p } : {}
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
219
|
async function ie(u) {
|
|
220
|
-
const g = u.name || "attachment", p = u.type || "application/octet-stream", R = u.size || 0, O = await
|
|
220
|
+
const g = u.name || "attachment", p = u.type || "application/octet-stream", R = u.size || 0, O = await i("POST", "/attachments", {
|
|
221
221
|
mime_type: p,
|
|
222
222
|
size_bytes: R,
|
|
223
223
|
name: g
|
|
@@ -236,7 +236,7 @@ function et(e) {
|
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
async function ae(u) {
|
|
239
|
-
return
|
|
239
|
+
return i(
|
|
240
240
|
"GET",
|
|
241
241
|
`/attachments/sign?path=${encodeURIComponent(u)}`
|
|
242
242
|
);
|
|
@@ -254,7 +254,7 @@ function et(e) {
|
|
|
254
254
|
u.addEventListener(
|
|
255
255
|
"error",
|
|
256
256
|
() => r("error", new Error("SSE error"))
|
|
257
|
-
), t.eventSource = u,
|
|
257
|
+
), t.eventSource = u, a("open");
|
|
258
258
|
} catch (u) {
|
|
259
259
|
console.error("[transport] SSE open failed", u), r("error", u);
|
|
260
260
|
}
|
|
@@ -268,7 +268,7 @@ function et(e) {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
function Z() {
|
|
271
|
-
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" &&
|
|
271
|
+
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && a("idle");
|
|
272
272
|
}
|
|
273
273
|
function ee() {
|
|
274
274
|
clearTimeout(t.burstTimer), Q(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
@@ -301,14 +301,14 @@ function et(e) {
|
|
|
301
301
|
function _() {
|
|
302
302
|
if (document.hidden)
|
|
303
303
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
304
|
-
t.hiddenGraceTimer = null, document.hidden && (h(), Z(),
|
|
304
|
+
t.hiddenGraceTimer = null, document.hidden && (h(), Z(), a("paused"));
|
|
305
305
|
}, Ze);
|
|
306
306
|
else {
|
|
307
307
|
if (t.hiddenGraceTimer) {
|
|
308
308
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
|
-
|
|
311
|
+
a("idle"), m(), t.panelOpen && Q();
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
function w() {
|
|
@@ -318,7 +318,7 @@ function et(e) {
|
|
|
318
318
|
), t.visibilityHandler = null), t.started = !1;
|
|
319
319
|
}
|
|
320
320
|
async function A(u) {
|
|
321
|
-
return !u || typeof u != "object" ? null :
|
|
321
|
+
return !u || typeof u != "object" ? null : i("POST", "/update", u);
|
|
322
322
|
}
|
|
323
323
|
function C(u) {
|
|
324
324
|
if (!(!u || typeof u != "object"))
|
|
@@ -469,7 +469,7 @@ function rt(e) {
|
|
|
469
469
|
console.error("[store] start failed", h), t.error = (h == null ? void 0 : h.message) || String(h);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function a() {
|
|
473
473
|
for (const m of s)
|
|
474
474
|
try {
|
|
475
475
|
m();
|
|
@@ -488,7 +488,7 @@ function rt(e) {
|
|
|
488
488
|
}
|
|
489
489
|
return t.customer;
|
|
490
490
|
}
|
|
491
|
-
async function
|
|
491
|
+
async function i(m = {}) {
|
|
492
492
|
const h = await e.createConversation(m), _ = t.conversations.findIndex((w) => w.id === h.id);
|
|
493
493
|
return _ === -1 ? t.conversations = [h, ...t.conversations] : t.conversations[_] = h, h;
|
|
494
494
|
}
|
|
@@ -769,9 +769,9 @@ function rt(e) {
|
|
|
769
769
|
return {
|
|
770
770
|
state: t,
|
|
771
771
|
start: r,
|
|
772
|
-
destroy:
|
|
772
|
+
destroy: a,
|
|
773
773
|
applyCustomer: n,
|
|
774
|
-
createConversation:
|
|
774
|
+
createConversation: i,
|
|
775
775
|
openConversation: f,
|
|
776
776
|
loadMore: b,
|
|
777
777
|
fetchSinceLast: E,
|
|
@@ -1164,11 +1164,11 @@ function re(e) {
|
|
|
1164
1164
|
}
|
|
1165
1165
|
function F(e) {
|
|
1166
1166
|
const t = xe(e), s = ke[t] || ke[ue], r = ke[ue];
|
|
1167
|
-
return function(n,
|
|
1167
|
+
return function(n, i) {
|
|
1168
1168
|
let o = s[n];
|
|
1169
|
-
return o == null && (o = r[n]), o == null ? n : (
|
|
1169
|
+
return o == null && (o = r[n]), o == null ? n : (i && (o = o.replace(
|
|
1170
1170
|
/\{(\w+)\}/g,
|
|
1171
|
-
(f, b) =>
|
|
1171
|
+
(f, b) => i[b] != null ? String(i[b]) : f
|
|
1172
1172
|
)), o);
|
|
1173
1173
|
};
|
|
1174
1174
|
}
|
|
@@ -1182,26 +1182,26 @@ function je(e, t, s) {
|
|
|
1182
1182
|
}
|
|
1183
1183
|
function ht(e, t, s = F()) {
|
|
1184
1184
|
if (!e || !t) return "";
|
|
1185
|
-
const r = Array.isArray(e.fields) ? e.fields : [],
|
|
1185
|
+
const r = Array.isArray(e.fields) ? e.fields : [], a = [];
|
|
1186
1186
|
for (const n of r) {
|
|
1187
1187
|
if (!(n != null && n.key) || !(n != null && n.label)) continue;
|
|
1188
|
-
const
|
|
1189
|
-
if (
|
|
1190
|
-
const o = je(n,
|
|
1191
|
-
o &&
|
|
1188
|
+
const i = t[n.key];
|
|
1189
|
+
if (i == null || i === "") continue;
|
|
1190
|
+
const o = je(n, i, s);
|
|
1191
|
+
o && a.push(`${n.label} :
|
|
1192
1192
|
${o}`);
|
|
1193
1193
|
}
|
|
1194
|
-
return
|
|
1194
|
+
return a.join(`
|
|
1195
1195
|
|
|
1196
1196
|
`);
|
|
1197
1197
|
}
|
|
1198
1198
|
function ft(e, t, s = F()) {
|
|
1199
|
-
const r = [],
|
|
1200
|
-
for (const n of
|
|
1199
|
+
const r = [], a = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1200
|
+
for (const n of a) {
|
|
1201
1201
|
if (!(n != null && n.key) || !(n != null && n.label)) continue;
|
|
1202
|
-
const
|
|
1203
|
-
if (
|
|
1204
|
-
const o = je(n,
|
|
1202
|
+
const i = t == null ? void 0 : t[n.key];
|
|
1203
|
+
if (i == null || i === "") continue;
|
|
1204
|
+
const o = je(n, i, s);
|
|
1205
1205
|
if (!o) continue;
|
|
1206
1206
|
const f = n.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
|
|
1207
1207
|
`));
|
|
@@ -1225,10 +1225,10 @@ const Be = "";
|
|
|
1225
1225
|
function de(e) {
|
|
1226
1226
|
let t = e;
|
|
1227
1227
|
const s = [];
|
|
1228
|
-
return t = t.replace(/`([^`\n]+)`/g, (r,
|
|
1228
|
+
return t = t.replace(/`([^`\n]+)`/g, (r, a) => {
|
|
1229
1229
|
const n = s.length;
|
|
1230
|
-
return s.push(
|
|
1231
|
-
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r,
|
|
1230
|
+
return s.push(a), `${Be}CODE${n}${Be}`;
|
|
1231
|
+
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, a, n) => fe(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${a}</a>` : a), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (r, a) => `<code class="wm-md-code">${s[+a]}</code>`), t;
|
|
1232
1232
|
}
|
|
1233
1233
|
function qe(e) {
|
|
1234
1234
|
if (!e) return "";
|
|
@@ -1294,15 +1294,15 @@ function _t(e) {
|
|
|
1294
1294
|
}
|
|
1295
1295
|
s.push({ type: "text", html: de(n) }), r++;
|
|
1296
1296
|
}
|
|
1297
|
-
let
|
|
1297
|
+
let a = "";
|
|
1298
1298
|
for (let n = 0; n < s.length; n++) {
|
|
1299
|
-
const
|
|
1300
|
-
|
|
1299
|
+
const i = s[n];
|
|
1300
|
+
a += i.html;
|
|
1301
1301
|
const o = s[n + 1];
|
|
1302
|
-
o &&
|
|
1302
|
+
o && i.type !== "block" && o.type !== "block" && (a += `
|
|
1303
1303
|
`);
|
|
1304
1304
|
}
|
|
1305
|
-
return
|
|
1305
|
+
return a;
|
|
1306
1306
|
}
|
|
1307
1307
|
function me(e) {
|
|
1308
1308
|
var s;
|
|
@@ -1321,23 +1321,23 @@ function Ie(e, t) {
|
|
|
1321
1321
|
return s;
|
|
1322
1322
|
}
|
|
1323
1323
|
function gt(e, t) {
|
|
1324
|
-
var s, r,
|
|
1324
|
+
var s, r, a;
|
|
1325
1325
|
for (let n = t.length - 1; n >= 0; n--) {
|
|
1326
|
-
const
|
|
1327
|
-
if (!
|
|
1328
|
-
const o = typeof
|
|
1326
|
+
const i = t[n];
|
|
1327
|
+
if (!i) continue;
|
|
1328
|
+
const o = typeof i.text_md == "string" ? i.text_md.trim() : "";
|
|
1329
1329
|
if (o)
|
|
1330
|
-
return (((s =
|
|
1331
|
-
const f = (r =
|
|
1330
|
+
return (((s = i.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + o.replace(/\s+/g, " ");
|
|
1331
|
+
const f = (r = i.payload) == null ? void 0 : r.attachments;
|
|
1332
1332
|
if (Array.isArray(f) && f.length) return "📎 Pièce jointe";
|
|
1333
1333
|
}
|
|
1334
|
-
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((
|
|
1334
|
+
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((a = e == null ? void 0 : e.metadata) == null ? void 0 : a.last_preview) || "";
|
|
1335
1335
|
}
|
|
1336
1336
|
function yt(e, t) {
|
|
1337
1337
|
return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
|
|
1338
1338
|
}
|
|
1339
1339
|
function vt(e, t, s, r) {
|
|
1340
|
-
const
|
|
1340
|
+
const a = [
|
|
1341
1341
|
`# ${e.name || s("common.conversation")}`,
|
|
1342
1342
|
e.created_at ? s("export.createdOn", {
|
|
1343
1343
|
date: new Date(e.created_at).toLocaleString(r)
|
|
@@ -1346,22 +1346,22 @@ function vt(e, t, s, r) {
|
|
|
1346
1346
|
];
|
|
1347
1347
|
for (const n of t) {
|
|
1348
1348
|
if (!n) continue;
|
|
1349
|
-
const
|
|
1350
|
-
if (!
|
|
1349
|
+
const i = (n.text_md || "").trim();
|
|
1350
|
+
if (!i) continue;
|
|
1351
1351
|
const o = yt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
|
|
1352
|
-
|
|
1352
|
+
a.push(`[${f}] ${o} :`), a.push(i), a.push("");
|
|
1353
1353
|
}
|
|
1354
|
-
return
|
|
1354
|
+
return a.join(`
|
|
1355
1355
|
`);
|
|
1356
1356
|
}
|
|
1357
1357
|
function pt(e, t, s = F(), r) {
|
|
1358
1358
|
if (!e) return;
|
|
1359
|
-
const
|
|
1359
|
+
const a = vt(e, t || [], s, re(r)), n = new Blob([a], { type: "text/plain;charset=utf-8" });
|
|
1360
1360
|
try {
|
|
1361
|
-
const
|
|
1362
|
-
o.href =
|
|
1363
|
-
} catch (
|
|
1364
|
-
console.error("[ww-messenger] export failed",
|
|
1361
|
+
const i = URL.createObjectURL(n), o = document.createElement("a");
|
|
1362
|
+
o.href = i, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(i), 1e3);
|
|
1363
|
+
} catch (i) {
|
|
1364
|
+
console.error("[ww-messenger] export failed", i);
|
|
1365
1365
|
}
|
|
1366
1366
|
}
|
|
1367
1367
|
const wt = {
|
|
@@ -1474,10 +1474,10 @@ const wt = {
|
|
|
1474
1474
|
// at message-arrival time because the user may have closed the
|
|
1475
1475
|
// panel or switched threads during the typing dwell.
|
|
1476
1476
|
onMessageRevealed(e, t) {
|
|
1477
|
-
var
|
|
1477
|
+
var a;
|
|
1478
1478
|
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !me(e)) return;
|
|
1479
1479
|
const s = typeof document < "u" && document.hidden;
|
|
1480
|
-
this.isOpen && !s && ((
|
|
1480
|
+
this.isOpen && !s && ((a = this.currentConv) == null ? void 0 : a.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
|
|
1481
1481
|
},
|
|
1482
1482
|
playNotificationSound() {
|
|
1483
1483
|
if (typeof window > "u") return;
|
|
@@ -1491,14 +1491,14 @@ const wt = {
|
|
|
1491
1491
|
t.resume();
|
|
1492
1492
|
} catch {
|
|
1493
1493
|
}
|
|
1494
|
-
const s = t.currentTime, r = t.createOscillator(),
|
|
1495
|
-
r.connect(
|
|
1494
|
+
const s = t.currentTime, r = t.createOscillator(), a = t.createGain();
|
|
1495
|
+
r.connect(a), a.connect(t.destination), r.type = "sine", r.frequency.setValueAtTime(880, s), r.frequency.exponentialRampToValueAtTime(1320, s + 0.08), a.gain.setValueAtTime(0, s), a.gain.linearRampToValueAtTime(0.12, s + 0.02), a.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), r.start(s), r.stop(s + 0.32);
|
|
1496
1496
|
} catch {
|
|
1497
1497
|
}
|
|
1498
1498
|
},
|
|
1499
1499
|
showBrowserNotification(e, t) {
|
|
1500
1500
|
if (typeof Notification > "u" || Notification.permission !== "granted") return;
|
|
1501
|
-
const s = t == null ? void 0 : t.author, r = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (r ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"),
|
|
1501
|
+
const s = t == null ? void 0 : t.author, r = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (r ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), i = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", o = i ? i.slice(0, 140) : this.t("notification.youHaveNewMessage");
|
|
1502
1502
|
try {
|
|
1503
1503
|
const f = new Notification(n, {
|
|
1504
1504
|
body: o,
|
|
@@ -1603,23 +1603,23 @@ const wt = {
|
|
|
1603
1603
|
var s, r;
|
|
1604
1604
|
if (!this.transport) return;
|
|
1605
1605
|
this.teardownLiveReveal();
|
|
1606
|
-
const e = this.transport.on("message", (
|
|
1607
|
-
const n =
|
|
1608
|
-
n &&
|
|
1606
|
+
const e = this.transport.on("message", (a) => {
|
|
1607
|
+
const n = a == null ? void 0 : a.conversation_id, i = a == null ? void 0 : a.message;
|
|
1608
|
+
n && i && this.paceLiveMessage(i, n);
|
|
1609
1609
|
});
|
|
1610
1610
|
this._liveRevealConvSnapshot = new Map(
|
|
1611
|
-
(((s = this.s) == null ? void 0 : s.conversations) || []).map((
|
|
1612
|
-
|
|
1613
|
-
(
|
|
1611
|
+
(((s = this.s) == null ? void 0 : s.conversations) || []).map((a) => [
|
|
1612
|
+
a.id,
|
|
1613
|
+
(a == null ? void 0 : a.last_message_at) || ""
|
|
1614
1614
|
])
|
|
1615
1615
|
), this._liveHwm = Object.fromEntries(
|
|
1616
|
-
(((r = this.s) == null ? void 0 : r.conversations) || []).map((
|
|
1617
|
-
|
|
1618
|
-
(
|
|
1616
|
+
(((r = this.s) == null ? void 0 : r.conversations) || []).map((a) => [
|
|
1617
|
+
a.id,
|
|
1618
|
+
(a == null ? void 0 : a.last_message_at) || ""
|
|
1619
1619
|
])
|
|
1620
1620
|
);
|
|
1621
|
-
const t = this.transport.on("activity", (
|
|
1622
|
-
this.handleLiveActivity(
|
|
1621
|
+
const t = this.transport.on("activity", (a) => {
|
|
1622
|
+
this.handleLiveActivity(a);
|
|
1623
1623
|
});
|
|
1624
1624
|
this._liveRevealOff = () => {
|
|
1625
1625
|
try {
|
|
@@ -1649,25 +1649,25 @@ const wt = {
|
|
|
1649
1649
|
// on background convs when SSE wasn't open at the moment they
|
|
1650
1650
|
// arrived.
|
|
1651
1651
|
async handleLiveActivity(e) {
|
|
1652
|
-
var
|
|
1652
|
+
var a, n;
|
|
1653
1653
|
const t = e == null ? void 0 : e.conversations;
|
|
1654
1654
|
if (!Array.isArray(t) || !this.store) return;
|
|
1655
1655
|
const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), r = [];
|
|
1656
|
-
for (const
|
|
1657
|
-
if (!(
|
|
1658
|
-
const o =
|
|
1656
|
+
for (const i of t) {
|
|
1657
|
+
if (!(i != null && i.id)) continue;
|
|
1658
|
+
const o = i.last_message_at || "";
|
|
1659
1659
|
if (!o) continue;
|
|
1660
|
-
const f = s.get(
|
|
1661
|
-
o > f && r.push(
|
|
1660
|
+
const f = s.get(i.id) || "";
|
|
1661
|
+
o > f && r.push(i.id);
|
|
1662
1662
|
}
|
|
1663
1663
|
this._liveRevealConvSnapshot = new Map(
|
|
1664
|
-
t.map((
|
|
1664
|
+
t.map((i) => [i.id, (i == null ? void 0 : i.last_message_at) || ""])
|
|
1665
1665
|
);
|
|
1666
|
-
for (const
|
|
1666
|
+
for (const i of r)
|
|
1667
1667
|
try {
|
|
1668
|
-
const o = await ((n = (
|
|
1668
|
+
const o = await ((n = (a = this.store).fetchSinceLast) == null ? void 0 : n.call(a, i));
|
|
1669
1669
|
if (!Array.isArray(o)) continue;
|
|
1670
|
-
for (const f of o) this.paceLiveMessage(f,
|
|
1670
|
+
for (const f of o) this.paceLiveMessage(f, i);
|
|
1671
1671
|
} catch (o) {
|
|
1672
1672
|
console.error(
|
|
1673
1673
|
"[ww-messenger] activity delta fetch failed",
|
|
@@ -1681,9 +1681,9 @@ const wt = {
|
|
|
1681
1681
|
// - inter-bubble gap scales with message length (reading time),
|
|
1682
1682
|
// bounded by MIN/MAX_TYPING_MS.
|
|
1683
1683
|
scheduleReveal(e, t) {
|
|
1684
|
-
const s = this.revealPacing, r = Date.now(),
|
|
1684
|
+
const s = this.revealPacing, r = Date.now(), a = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
|
|
1685
1685
|
s.maxTypingMs,
|
|
1686
|
-
Math.max(s.minTypingMs,
|
|
1686
|
+
Math.max(s.minTypingMs, a * s.msPerChar)
|
|
1687
1687
|
), o = Math.max(
|
|
1688
1688
|
r + s.firstRevealDelayMs,
|
|
1689
1689
|
this.nextRevealAt + s.pauseBetweenMs
|
|
@@ -1700,7 +1700,7 @@ const wt = {
|
|
|
1700
1700
|
// history (instant) and any live message that the transport
|
|
1701
1701
|
// subscription already paced (idempotent on msg.id).
|
|
1702
1702
|
paceMessages(e, t) {
|
|
1703
|
-
var
|
|
1703
|
+
var a;
|
|
1704
1704
|
if (!Array.isArray(e) || !e.length) return;
|
|
1705
1705
|
const s = Date.now(), r = { ...this.revealedAt };
|
|
1706
1706
|
for (const n of e) {
|
|
@@ -1709,12 +1709,12 @@ const wt = {
|
|
|
1709
1709
|
r[n.id] = s;
|
|
1710
1710
|
continue;
|
|
1711
1711
|
}
|
|
1712
|
-
const
|
|
1713
|
-
if (!Number.isFinite(
|
|
1712
|
+
const i = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
|
|
1713
|
+
if (!Number.isFinite(i) || i < this.convOpenedAt) {
|
|
1714
1714
|
r[n.id] = s;
|
|
1715
1715
|
continue;
|
|
1716
1716
|
}
|
|
1717
|
-
const o = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((
|
|
1717
|
+
const o = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((a = n == null ? void 0 : n.payload) == null ? void 0 : a.attachments) && n.payload.attachments.length > 0;
|
|
1718
1718
|
if (!o && !f) {
|
|
1719
1719
|
r[n.id] = s;
|
|
1720
1720
|
continue;
|
|
@@ -1750,8 +1750,8 @@ const wt = {
|
|
|
1750
1750
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1751
1751
|
return;
|
|
1752
1752
|
}
|
|
1753
|
-
const
|
|
1754
|
-
if (n && (
|
|
1753
|
+
const a = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
|
|
1754
|
+
if (n && (a === void 0 || n > a) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(a !== void 0 && n && n > a)) {
|
|
1755
1755
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1756
1756
|
return;
|
|
1757
1757
|
}
|
|
@@ -1787,12 +1787,12 @@ const wt = {
|
|
|
1787
1787
|
// messages, or when the pointer is already at/ahead of the
|
|
1788
1788
|
// candidate id.
|
|
1789
1789
|
markConvRead(e) {
|
|
1790
|
-
var n,
|
|
1790
|
+
var n, i;
|
|
1791
1791
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1792
|
-
const t = ((
|
|
1792
|
+
const t = ((i = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : i[e.id]) || [], s = At(t);
|
|
1793
1793
|
if (s == null) return;
|
|
1794
|
-
const r = G(e.last_read_message_id),
|
|
1795
|
-
|
|
1794
|
+
const r = G(e.last_read_message_id), a = G(s);
|
|
1795
|
+
a != null && (r != null && a <= r || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
1796
1796
|
const o = this._readMarkerPending;
|
|
1797
1797
|
this._readMarkerPending = null, this._readMarkerTimer = null, o && this.store && this.store.markConversationRead(
|
|
1798
1798
|
o.convId,
|
|
@@ -1812,8 +1812,8 @@ function At(e) {
|
|
|
1812
1812
|
}
|
|
1813
1813
|
const D = (e, t) => {
|
|
1814
1814
|
const s = e.__vccOpts || e;
|
|
1815
|
-
for (const [r,
|
|
1816
|
-
s[r] =
|
|
1815
|
+
for (const [r, a] of t)
|
|
1816
|
+
s[r] = a;
|
|
1817
1817
|
return s;
|
|
1818
1818
|
}, St = {
|
|
1819
1819
|
name: "WmHumanAvatar",
|
|
@@ -1836,7 +1836,7 @@ const D = (e, t) => {
|
|
|
1836
1836
|
}
|
|
1837
1837
|
}
|
|
1838
1838
|
}, Mt = ["src", "alt"];
|
|
1839
|
-
function Tt(e, t, s, r,
|
|
1839
|
+
function Tt(e, t, s, r, a, n) {
|
|
1840
1840
|
return c(), d("div", {
|
|
1841
1841
|
class: L(["wm-huav", { "wm-huav--tail": s.tail }]),
|
|
1842
1842
|
style: j({
|
|
@@ -1883,8 +1883,8 @@ const ye = /* @__PURE__ */ D(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
|
|
|
1883
1883
|
}
|
|
1884
1884
|
}
|
|
1885
1885
|
}, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], Et = { class: "wm-peek__avatar" }, Bt = ["aria-label"], It = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, Ft = ["onClick"], Ht = ["aria-label"], jt = ["aria-label"];
|
|
1886
|
-
function zt(e, t, s, r,
|
|
1887
|
-
const
|
|
1886
|
+
function zt(e, t, s, r, a, n) {
|
|
1887
|
+
const i = P("HumanAvatar");
|
|
1888
1888
|
return c(), d("div", {
|
|
1889
1889
|
class: "wm-launcherWrap",
|
|
1890
1890
|
onMouseenter: t[1] || (t[1] = (o) => e.$emit("hover", !0)),
|
|
@@ -1937,7 +1937,7 @@ function zt(e, t, s, r, i, n) {
|
|
|
1937
1937
|
], -1)
|
|
1938
1938
|
])], 8, Lt),
|
|
1939
1939
|
l("div", Et, [
|
|
1940
|
-
W(
|
|
1940
|
+
W(i, {
|
|
1941
1941
|
name: o.senderName,
|
|
1942
1942
|
"avatar-url": o.senderAvatarUrl,
|
|
1943
1943
|
size: 34
|
|
@@ -2029,7 +2029,7 @@ const qt = /* @__PURE__ */ D(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
|
|
|
2029
2029
|
key: 0,
|
|
2030
2030
|
class: "wm-aiav__pulse"
|
|
2031
2031
|
}, Wt = ["src", "alt"], $t = ["width", "height"];
|
|
2032
|
-
function Gt(e, t, s, r,
|
|
2032
|
+
function Gt(e, t, s, r, a, n) {
|
|
2033
2033
|
return c(), d("div", {
|
|
2034
2034
|
class: L(["wm-aiav", { "wm-aiav--tail": s.tail }]),
|
|
2035
2035
|
style: j({
|
|
@@ -2116,26 +2116,26 @@ const he = /* @__PURE__ */ D(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
|
|
|
2116
2116
|
key: 0,
|
|
2117
2117
|
class: "wm-team__label"
|
|
2118
2118
|
};
|
|
2119
|
-
function en(e, t, s, r,
|
|
2119
|
+
function en(e, t, s, r, a, n) {
|
|
2120
2120
|
return n.visible ? (c(), d("div", Jt, [
|
|
2121
2121
|
l("div", {
|
|
2122
2122
|
class: "wm-team__stack",
|
|
2123
2123
|
style: j({ width: n.stackWidth + "px" })
|
|
2124
2124
|
}, [
|
|
2125
|
-
(c(!0), d(B, null, N(s.members.slice(0, 3), (
|
|
2125
|
+
(c(!0), d(B, null, N(s.members.slice(0, 3), (i, o) => (c(), d("div", {
|
|
2126
2126
|
key: o,
|
|
2127
2127
|
class: "wm-team__pill",
|
|
2128
2128
|
style: j({
|
|
2129
2129
|
left: o * 13 + "px",
|
|
2130
2130
|
zIndex: 3 - o,
|
|
2131
|
-
background: n.colorFor(
|
|
2131
|
+
background: n.colorFor(i)
|
|
2132
2132
|
})
|
|
2133
2133
|
}, [
|
|
2134
|
-
|
|
2134
|
+
i.avatar_url ? (c(), d("img", {
|
|
2135
2135
|
key: 0,
|
|
2136
|
-
src:
|
|
2137
|
-
alt:
|
|
2138
|
-
}, null, 8, Xt)) : (c(), d("span", Qt, y(n.initialsFor(
|
|
2136
|
+
src: i.avatar_url,
|
|
2137
|
+
alt: i.name || ""
|
|
2138
|
+
}, null, 8, Xt)) : (c(), d("span", Qt, y(n.initialsFor(i)), 1))
|
|
2139
2139
|
], 4))), 128))
|
|
2140
2140
|
], 4),
|
|
2141
2141
|
s.responseLabel ? (c(), d("span", Zt, y(s.responseLabel), 1)) : k("", !0)
|
|
@@ -2187,8 +2187,8 @@ const tn = /* @__PURE__ */ D(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
|
|
|
2187
2187
|
key: 3,
|
|
2188
2188
|
class: "wm-header__fill"
|
|
2189
2189
|
}, un = { class: "wm-header__actions" }, mn = ["aria-label", "title"], hn = ["aria-label", "title"];
|
|
2190
|
-
function fn(e, t, s, r,
|
|
2191
|
-
const
|
|
2190
|
+
function fn(e, t, s, r, a, n) {
|
|
2191
|
+
const i = P("AIAvatar"), o = P("TeamAvatars");
|
|
2192
2192
|
return c(), d("div", sn, [
|
|
2193
2193
|
s.showBack ? (c(), d("button", {
|
|
2194
2194
|
key: 0,
|
|
@@ -2213,7 +2213,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2213
2213
|
])], 8, rn)) : (c(), d("div", an)),
|
|
2214
2214
|
s.showIdentity ? (c(), d(B, { key: 2 }, [
|
|
2215
2215
|
l("div", on, [
|
|
2216
|
-
W(
|
|
2216
|
+
W(i, {
|
|
2217
2217
|
size: 30,
|
|
2218
2218
|
name: s.agentName,
|
|
2219
2219
|
"image-url": s.agentAvatarUrl
|
|
@@ -2399,8 +2399,8 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2399
2399
|
minute: "2-digit"
|
|
2400
2400
|
});
|
|
2401
2401
|
if (r.getTime() - t.getTime() < 7 * 864e5) {
|
|
2402
|
-
const
|
|
2403
|
-
return
|
|
2402
|
+
const i = t.toLocaleDateString(s, { weekday: "short" });
|
|
2403
|
+
return i.charAt(0).toUpperCase() + i.slice(1);
|
|
2404
2404
|
}
|
|
2405
2405
|
return t.toLocaleDateString(s, {
|
|
2406
2406
|
day: "2-digit",
|
|
@@ -2454,8 +2454,8 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2454
2454
|
"stroke-linejoin": "round",
|
|
2455
2455
|
"aria-hidden": "true"
|
|
2456
2456
|
}, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
|
|
2457
|
-
function Yn(e, t, s, r,
|
|
2458
|
-
const
|
|
2457
|
+
function Yn(e, t, s, r, a, n) {
|
|
2458
|
+
const i = P("AIAvatar");
|
|
2459
2459
|
return c(), d("div", yn, [
|
|
2460
2460
|
l("div", vn, [
|
|
2461
2461
|
t[2] || (t[2] = l("svg", {
|
|
@@ -2492,7 +2492,7 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2492
2492
|
opacity: "0.65"
|
|
2493
2493
|
})
|
|
2494
2494
|
], -1)),
|
|
2495
|
-
W(
|
|
2495
|
+
W(i, {
|
|
2496
2496
|
size: 52,
|
|
2497
2497
|
"image-url": s.defaultIconUrl
|
|
2498
2498
|
}, null, 8, ["image-url"]),
|
|
@@ -2690,8 +2690,8 @@ const Jn = /* @__PURE__ */ D(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
|
|
|
2690
2690
|
minute: "2-digit"
|
|
2691
2691
|
});
|
|
2692
2692
|
if (r.getTime() - t.getTime() < 7 * 864e5) {
|
|
2693
|
-
const
|
|
2694
|
-
return
|
|
2693
|
+
const i = t.toLocaleDateString(s, { weekday: "short" });
|
|
2694
|
+
return i.charAt(0).toUpperCase() + i.slice(1);
|
|
2695
2695
|
}
|
|
2696
2696
|
return t.toLocaleDateString(s, {
|
|
2697
2697
|
day: "2-digit",
|
|
@@ -2709,7 +2709,7 @@ const Jn = /* @__PURE__ */ D(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
|
|
|
2709
2709
|
key: 0,
|
|
2710
2710
|
class: "wm-hist__empty"
|
|
2711
2711
|
};
|
|
2712
|
-
function us(e, t, s, r,
|
|
2712
|
+
function us(e, t, s, r, a, n) {
|
|
2713
2713
|
return c(), d("div", Qn, [
|
|
2714
2714
|
l("div", Zn, [
|
|
2715
2715
|
t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
|
|
@@ -2728,25 +2728,25 @@ function us(e, t, s, r, i, n) {
|
|
|
2728
2728
|
])
|
|
2729
2729
|
], -1)),
|
|
2730
2730
|
$(l("input", {
|
|
2731
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
2731
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => a.query = i),
|
|
2732
2732
|
type: "text",
|
|
2733
2733
|
placeholder: n.t("onboarding.search"),
|
|
2734
2734
|
"aria-label": n.t("onboarding.search")
|
|
2735
2735
|
}, null, 8, es), [
|
|
2736
|
-
[se,
|
|
2736
|
+
[se, a.query]
|
|
2737
2737
|
])
|
|
2738
2738
|
]),
|
|
2739
2739
|
l("div", ts, [
|
|
2740
|
-
(c(!0), d(B, null, N(n.filteredThreads, (
|
|
2741
|
-
key:
|
|
2740
|
+
(c(!0), d(B, null, N(n.filteredThreads, (i) => (c(), d("button", {
|
|
2741
|
+
key: i.id,
|
|
2742
2742
|
type: "button",
|
|
2743
|
-
class: L(["wm-hist__thread", { "wm-hist__thread--unread":
|
|
2744
|
-
onClick: (o) => e.$emit("resume",
|
|
2743
|
+
class: L(["wm-hist__thread", { "wm-hist__thread--unread": i.unread }]),
|
|
2744
|
+
onClick: (o) => e.$emit("resume", i)
|
|
2745
2745
|
}, [
|
|
2746
2746
|
l("span", {
|
|
2747
|
-
class: L(["wm-hist__thread-avatar", n.avatarWrapperClass(
|
|
2747
|
+
class: L(["wm-hist__thread-avatar", n.avatarWrapperClass(i)])
|
|
2748
2748
|
}, [
|
|
2749
|
-
n.isDefaultAvatar(
|
|
2749
|
+
n.isDefaultAvatar(i) ? (c(), d("span", ss, [...t[2] || (t[2] = [
|
|
2750
2750
|
l("svg", {
|
|
2751
2751
|
width: "18",
|
|
2752
2752
|
height: "18",
|
|
@@ -2760,25 +2760,25 @@ function us(e, t, s, r, i, n) {
|
|
|
2760
2760
|
}, [
|
|
2761
2761
|
l("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
|
|
2762
2762
|
], -1)
|
|
2763
|
-
])])) : (c(), I(Ae(n.avatarComponent(
|
|
2763
|
+
])])) : (c(), I(Ae(n.avatarComponent(i)), He({
|
|
2764
2764
|
key: 1,
|
|
2765
2765
|
ref_for: !0
|
|
2766
|
-
}, n.avatarProps(
|
|
2767
|
-
|
|
2766
|
+
}, n.avatarProps(i)), null, 16)),
|
|
2767
|
+
i.unread ? (c(), d("span", {
|
|
2768
2768
|
key: 2,
|
|
2769
2769
|
class: "wm-hist__thread-dot",
|
|
2770
2770
|
"aria-label": n.t("onboarding.unread")
|
|
2771
2771
|
}, null, 8, rs)) : k("", !0)
|
|
2772
2772
|
], 2),
|
|
2773
2773
|
l("span", is, [
|
|
2774
|
-
l("span", as, y(
|
|
2774
|
+
l("span", as, y(i.title), 1),
|
|
2775
2775
|
l("span", {
|
|
2776
2776
|
class: "wm-hist__thread-preview",
|
|
2777
|
-
innerHTML: n.renderPreview(
|
|
2777
|
+
innerHTML: n.renderPreview(i.preview)
|
|
2778
2778
|
}, null, 8, os)
|
|
2779
2779
|
]),
|
|
2780
2780
|
l("span", ls, [
|
|
2781
|
-
n.formatTs(
|
|
2781
|
+
n.formatTs(i._ts) ? (c(), d("span", cs, y(n.formatTs(i._ts)), 1)) : k("", !0),
|
|
2782
2782
|
t[3] || (t[3] = l("svg", {
|
|
2783
2783
|
width: "14",
|
|
2784
2784
|
height: "14",
|
|
@@ -2795,7 +2795,7 @@ function us(e, t, s, r, i, n) {
|
|
|
2795
2795
|
], -1))
|
|
2796
2796
|
])
|
|
2797
2797
|
], 10, ns))), 128)),
|
|
2798
|
-
n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, y(
|
|
2798
|
+
n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, y(a.query ? n.t("onboarding.noResults", { query: a.query }) : n.t("onboarding.noConversations")), 1))
|
|
2799
2799
|
])
|
|
2800
2800
|
]);
|
|
2801
2801
|
}
|
|
@@ -2860,7 +2860,7 @@ const fs = {
|
|
|
2860
2860
|
"stroke-linecap": "round",
|
|
2861
2861
|
"stroke-linejoin": "round"
|
|
2862
2862
|
}, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
|
|
2863
|
-
function Cs(e, t, s, r,
|
|
2863
|
+
function Cs(e, t, s, r, a, n) {
|
|
2864
2864
|
return c(), d("div", {
|
|
2865
2865
|
class: L(["wm-result", `wm-result--${s.state}`])
|
|
2866
2866
|
}, [
|
|
@@ -2921,7 +2921,7 @@ const As = /* @__PURE__ */ D(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
|
|
|
2921
2921
|
}
|
|
2922
2922
|
}
|
|
2923
2923
|
}, Ms = { class: "wm-art wm-art--formResponse" }, Ts = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
|
|
2924
|
-
function Es(e, t, s, r,
|
|
2924
|
+
function Es(e, t, s, r, a, n) {
|
|
2925
2925
|
return c(), d("div", Ms, [
|
|
2926
2926
|
l("div", Ts, [
|
|
2927
2927
|
l("div", xs, y(s.data.title || n.t("form.title")), 1),
|
|
@@ -2943,17 +2943,17 @@ function Es(e, t, s, r, i, n) {
|
|
|
2943
2943
|
])
|
|
2944
2944
|
]),
|
|
2945
2945
|
l("div", Rs, [
|
|
2946
|
-
(c(!0), d(B, null, N(n.fields, (
|
|
2946
|
+
(c(!0), d(B, null, N(n.fields, (i, o) => (c(), d("div", {
|
|
2947
2947
|
key: o,
|
|
2948
2948
|
class: "wm-art__field"
|
|
2949
2949
|
}, [
|
|
2950
|
-
l("div", Ls, y(
|
|
2950
|
+
l("div", Ls, y(i.label), 1),
|
|
2951
2951
|
l("div", {
|
|
2952
2952
|
class: L([
|
|
2953
2953
|
"wm-art__fieldValue",
|
|
2954
|
-
{ "wm-art__fieldValue--multi":
|
|
2954
|
+
{ "wm-art__fieldValue--multi": i.multiline }
|
|
2955
2955
|
])
|
|
2956
|
-
}, y(
|
|
2956
|
+
}, y(i.value), 3)
|
|
2957
2957
|
]))), 128))
|
|
2958
2958
|
])
|
|
2959
2959
|
]);
|
|
@@ -2986,7 +2986,7 @@ const Bs = /* @__PURE__ */ D(Ss, [["render", Es], ["__scopeId", "data-v-713aecf1
|
|
|
2986
2986
|
key: 0,
|
|
2987
2987
|
class: "wm-art__text"
|
|
2988
2988
|
}, Vs = { class: "wm-art__fieldLabel" };
|
|
2989
|
-
function Ks(e, t, s, r,
|
|
2989
|
+
function Ks(e, t, s, r, a, n) {
|
|
2990
2990
|
return c(), d("div", Ps, [
|
|
2991
2991
|
s.data.image_url ? (c(), d("figure", Ds, [
|
|
2992
2992
|
l("img", {
|
|
@@ -3010,17 +3010,17 @@ function Ks(e, t, s, r, i, n) {
|
|
|
3010
3010
|
]),
|
|
3011
3011
|
n.hasBody ? (c(), d("div", zs, [
|
|
3012
3012
|
s.data.body ? (c(), d("div", qs, y(s.data.body), 1)) : k("", !0),
|
|
3013
|
-
n.fields.length ? (c(!0), d(B, { key: 1 }, N(n.fields, (
|
|
3013
|
+
n.fields.length ? (c(!0), d(B, { key: 1 }, N(n.fields, (i, o) => (c(), d("div", {
|
|
3014
3014
|
key: o,
|
|
3015
3015
|
class: "wm-art__field"
|
|
3016
3016
|
}, [
|
|
3017
|
-
l("div", Vs, y(
|
|
3017
|
+
l("div", Vs, y(i.label), 1),
|
|
3018
3018
|
l("div", {
|
|
3019
3019
|
class: L([
|
|
3020
3020
|
"wm-art__fieldValue",
|
|
3021
|
-
{ "wm-art__fieldValue--multi":
|
|
3021
|
+
{ "wm-art__fieldValue--multi": i.multiline }
|
|
3022
3022
|
])
|
|
3023
|
-
}, y(
|
|
3023
|
+
}, y(i.value), 3)
|
|
3024
3024
|
]))), 128)) : k("", !0)
|
|
3025
3025
|
])) : k("", !0)
|
|
3026
3026
|
]);
|
|
@@ -3030,7 +3030,7 @@ function $s(e, t, s) {
|
|
|
3030
3030
|
if (!e) return "";
|
|
3031
3031
|
const r = new Date(e);
|
|
3032
3032
|
if (Number.isNaN(r.getTime())) return e;
|
|
3033
|
-
const
|
|
3033
|
+
const a = r.toLocaleDateString(t, {
|
|
3034
3034
|
day: "numeric",
|
|
3035
3035
|
month: "long",
|
|
3036
3036
|
year: "numeric"
|
|
@@ -3038,7 +3038,7 @@ function $s(e, t, s) {
|
|
|
3038
3038
|
hour: "2-digit",
|
|
3039
3039
|
minute: "2-digit"
|
|
3040
3040
|
});
|
|
3041
|
-
return `${
|
|
3041
|
+
return `${a}${s}${n}`;
|
|
3042
3042
|
}
|
|
3043
3043
|
const Gs = {
|
|
3044
3044
|
name: "WmArtifactTicket",
|
|
@@ -3108,7 +3108,7 @@ const Gs = {
|
|
|
3108
3108
|
key: 1,
|
|
3109
3109
|
class: "wm-art__footer wm-tk__footer"
|
|
3110
3110
|
};
|
|
3111
|
-
function ar(e, t, s, r,
|
|
3111
|
+
function ar(e, t, s, r, a, n) {
|
|
3112
3112
|
return c(), d("div", Ys, [
|
|
3113
3113
|
l("div", Js, [
|
|
3114
3114
|
l("div", Xs, y(s.data.title), 1),
|
|
@@ -3147,21 +3147,21 @@ function ar(e, t, s, r, i, n) {
|
|
|
3147
3147
|
s.data.body ? (c(), d("div", er, y(s.data.body), 1)) : k("", !0)
|
|
3148
3148
|
]),
|
|
3149
3149
|
n.fields.length ? (c(), d("div", tr, [
|
|
3150
|
-
(c(!0), d(B, null, N(n.fields, (
|
|
3150
|
+
(c(!0), d(B, null, N(n.fields, (i, o) => (c(), d("div", {
|
|
3151
3151
|
key: o,
|
|
3152
3152
|
class: "wm-art__field"
|
|
3153
3153
|
}, [
|
|
3154
|
-
l("div", nr, y(
|
|
3154
|
+
l("div", nr, y(i.label), 1),
|
|
3155
3155
|
l("div", {
|
|
3156
3156
|
class: L([
|
|
3157
3157
|
"wm-art__fieldValue",
|
|
3158
|
-
{ "wm-art__fieldValue--multi":
|
|
3158
|
+
{ "wm-art__fieldValue--multi": i.multiline }
|
|
3159
3159
|
])
|
|
3160
3160
|
}, [
|
|
3161
|
-
n.isPriority(
|
|
3161
|
+
n.isPriority(i.label) ? (c(), d("svg", {
|
|
3162
3162
|
key: 0,
|
|
3163
3163
|
class: "wm-tk__prio",
|
|
3164
|
-
"data-level": n.priorityLevel(
|
|
3164
|
+
"data-level": n.priorityLevel(i.value),
|
|
3165
3165
|
width: "12",
|
|
3166
3166
|
height: "12",
|
|
3167
3167
|
viewBox: "0 0 12 12",
|
|
@@ -3188,7 +3188,7 @@ function ar(e, t, s, r, i, n) {
|
|
|
3188
3188
|
height: "9",
|
|
3189
3189
|
rx: "0.5"
|
|
3190
3190
|
}, null, -1)
|
|
3191
|
-
])], 8, sr)) : n.isDate(
|
|
3191
|
+
])], 8, sr)) : n.isDate(i.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
|
|
3192
3192
|
l("rect", {
|
|
3193
3193
|
x: "3",
|
|
3194
3194
|
y: "4",
|
|
@@ -3198,7 +3198,7 @@ function ar(e, t, s, r, i, n) {
|
|
|
3198
3198
|
}, null, -1),
|
|
3199
3199
|
l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
3200
3200
|
])])) : k("", !0),
|
|
3201
|
-
l("span", null, y(
|
|
3201
|
+
l("span", null, y(i.value), 1)
|
|
3202
3202
|
], 2)
|
|
3203
3203
|
]))), 128))
|
|
3204
3204
|
])) : k("", !0),
|
|
@@ -3246,7 +3246,7 @@ const or = /* @__PURE__ */ D(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914
|
|
|
3246
3246
|
}
|
|
3247
3247
|
}
|
|
3248
3248
|
};
|
|
3249
|
-
function dr(e, t, s, r,
|
|
3249
|
+
function dr(e, t, s, r, a, n) {
|
|
3250
3250
|
return n.component ? (c(), I(Ae(n.component), {
|
|
3251
3251
|
key: 0,
|
|
3252
3252
|
data: s.artifact.data
|
|
@@ -3328,11 +3328,11 @@ const ur = /* @__PURE__ */ D(cr, [["render", dr]]), mr = {
|
|
|
3328
3328
|
class: "wm-att__spin",
|
|
3329
3329
|
"aria-hidden": "true"
|
|
3330
3330
|
};
|
|
3331
|
-
function kr(e, t, s, r,
|
|
3331
|
+
function kr(e, t, s, r, a, n) {
|
|
3332
3332
|
return c(), d("div", {
|
|
3333
3333
|
class: L(["wm-att", ["wm-att--" + (n.kind || "file")]])
|
|
3334
3334
|
}, [
|
|
3335
|
-
n.kind === "image" &&
|
|
3335
|
+
n.kind === "image" && a.url ? (c(), d("a", {
|
|
3336
3336
|
key: 0,
|
|
3337
3337
|
href: n.safeHref,
|
|
3338
3338
|
target: "_blank",
|
|
@@ -3340,18 +3340,18 @@ function kr(e, t, s, r, i, n) {
|
|
|
3340
3340
|
class: "wm-att__imgWrap"
|
|
3341
3341
|
}, [
|
|
3342
3342
|
l("img", {
|
|
3343
|
-
src:
|
|
3343
|
+
src: a.url,
|
|
3344
3344
|
alt: n.displayName,
|
|
3345
3345
|
loading: "lazy"
|
|
3346
3346
|
}, null, 8, fr)
|
|
3347
|
-
], 8, hr)) : n.kind === "audio" &&
|
|
3347
|
+
], 8, hr)) : n.kind === "audio" && a.url ? (c(), d("audio", {
|
|
3348
3348
|
key: 1,
|
|
3349
|
-
src:
|
|
3349
|
+
src: a.url,
|
|
3350
3350
|
controls: "",
|
|
3351
3351
|
preload: "metadata"
|
|
3352
|
-
}, null, 8, _r)) : n.kind === "video" &&
|
|
3352
|
+
}, null, 8, _r)) : n.kind === "video" && a.url ? (c(), d("video", {
|
|
3353
3353
|
key: 2,
|
|
3354
|
-
src:
|
|
3354
|
+
src: a.url,
|
|
3355
3355
|
controls: "",
|
|
3356
3356
|
playsinline: "",
|
|
3357
3357
|
preload: "auto"
|
|
@@ -3362,7 +3362,7 @@ function kr(e, t, s, r, i, n) {
|
|
|
3362
3362
|
download: n.displayName,
|
|
3363
3363
|
target: "_blank",
|
|
3364
3364
|
rel: "noopener",
|
|
3365
|
-
onClick: t[0] || (t[0] = (...
|
|
3365
|
+
onClick: t[0] || (t[0] = (...i) => n.onFileClick && n.onFileClick(...i))
|
|
3366
3366
|
}, [
|
|
3367
3367
|
t[1] || (t[1] = l("span", { class: "wm-att__icon" }, [
|
|
3368
3368
|
l("svg", {
|
|
@@ -3384,7 +3384,7 @@ function kr(e, t, s, r, i, n) {
|
|
|
3384
3384
|
l("span", pr, y(n.displayName), 1),
|
|
3385
3385
|
n.sizeLabel ? (c(), d("span", wr, y(n.sizeLabel), 1)) : k("", !0)
|
|
3386
3386
|
]),
|
|
3387
|
-
|
|
3387
|
+
a.loading ? (c(), d("span", br)) : k("", !0)
|
|
3388
3388
|
], 8, yr))
|
|
3389
3389
|
], 2);
|
|
3390
3390
|
}
|
|
@@ -3401,7 +3401,7 @@ const Cr = /* @__PURE__ */ D(mr, [["render", kr], ["__scopeId", "data-v-b207a8bd
|
|
|
3401
3401
|
}
|
|
3402
3402
|
}
|
|
3403
3403
|
}, Sr = ["innerHTML"];
|
|
3404
|
-
function Mr(e, t, s, r,
|
|
3404
|
+
function Mr(e, t, s, r, a, n) {
|
|
3405
3405
|
return c(), d("div", {
|
|
3406
3406
|
class: L(["wm-bubble", "wm-bubble--" + s.role])
|
|
3407
3407
|
}, [
|
|
@@ -3411,7 +3411,7 @@ function Mr(e, t, s, r, i, n) {
|
|
|
3411
3411
|
], 2);
|
|
3412
3412
|
}
|
|
3413
3413
|
const Tr = /* @__PURE__ */ D(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
|
|
3414
|
-
function Rr(e, t, s, r,
|
|
3414
|
+
function Rr(e, t, s, r, a, n) {
|
|
3415
3415
|
return c(), d("div", Or, [...t[0] || (t[0] = [
|
|
3416
3416
|
l("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3417
3417
|
l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
@@ -3508,7 +3508,7 @@ const Er = {
|
|
|
3508
3508
|
return !this.hasMore && !this.loadingMore && this.messages.length >= 20;
|
|
3509
3509
|
},
|
|
3510
3510
|
groups() {
|
|
3511
|
-
var s, r,
|
|
3511
|
+
var s, r, a, n, i;
|
|
3512
3512
|
const e = [];
|
|
3513
3513
|
for (const o of this.messages) {
|
|
3514
3514
|
if ((s = o == null ? void 0 : o.metadata) != null && s.resolution_request) continue;
|
|
@@ -3536,11 +3536,11 @@ const Er = {
|
|
|
3536
3536
|
continue;
|
|
3537
3537
|
}
|
|
3538
3538
|
const b = e[e.length - 1];
|
|
3539
|
-
b && b.role === f && (f === "ai" || b.agentName === (((
|
|
3539
|
+
b && b.role === f && (f === "ai" || b.agentName === (((a = o == null ? void 0 : o.author) == null ? void 0 : a.name) || "")) ? b.messages.push(o) : e.push({
|
|
3540
3540
|
key: `g-${ne(o)}`,
|
|
3541
3541
|
role: f,
|
|
3542
3542
|
agentName: ((n = o == null ? void 0 : o.author) == null ? void 0 : n.name) || "",
|
|
3543
|
-
agentAvatarUrl: ((
|
|
3543
|
+
agentAvatarUrl: ((i = o == null ? void 0 : o.author) == null ? void 0 : i.avatar_url) || null,
|
|
3544
3544
|
messages: [o],
|
|
3545
3545
|
items: []
|
|
3546
3546
|
});
|
|
@@ -3576,8 +3576,8 @@ const Er = {
|
|
|
3576
3576
|
if (s.role === "user" || s.role === "system" || !s.items.length) continue;
|
|
3577
3577
|
const r = s.messages[0];
|
|
3578
3578
|
if (!r) continue;
|
|
3579
|
-
const
|
|
3580
|
-
if (
|
|
3579
|
+
const a = G(r.id);
|
|
3580
|
+
if (a != null && !(a <= e) && !(t && r.created_at && r.created_at > t))
|
|
3581
3581
|
return s.key;
|
|
3582
3582
|
}
|
|
3583
3583
|
return null;
|
|
@@ -3616,16 +3616,16 @@ const Er = {
|
|
|
3616
3616
|
const t = this._groupIdByMsgKey;
|
|
3617
3617
|
let s = null;
|
|
3618
3618
|
for (const r of e) {
|
|
3619
|
-
const
|
|
3620
|
-
if (
|
|
3621
|
-
s = t.get(
|
|
3619
|
+
const a = ne(r);
|
|
3620
|
+
if (a && t.has(a)) {
|
|
3621
|
+
s = t.get(a);
|
|
3622
3622
|
break;
|
|
3623
3623
|
}
|
|
3624
3624
|
}
|
|
3625
3625
|
s == null && (s = ++this._groupIdCounter);
|
|
3626
3626
|
for (const r of e) {
|
|
3627
|
-
const
|
|
3628
|
-
|
|
3627
|
+
const a = ne(r);
|
|
3628
|
+
a && t.set(a, s);
|
|
3629
3629
|
}
|
|
3630
3630
|
return `g-${s}`;
|
|
3631
3631
|
},
|
|
@@ -3667,27 +3667,27 @@ const Er = {
|
|
|
3667
3667
|
if (!t && !s) {
|
|
3668
3668
|
const n = this.pickAnchor(e);
|
|
3669
3669
|
if (n != null && n.rowKey) {
|
|
3670
|
-
const
|
|
3671
|
-
if (
|
|
3670
|
+
const i = this.findRowByKey(e, n.rowKey);
|
|
3671
|
+
if (i) {
|
|
3672
3672
|
const o = e.getBoundingClientRect().top;
|
|
3673
3673
|
r = {
|
|
3674
3674
|
rowKey: n.rowKey,
|
|
3675
|
-
relY:
|
|
3675
|
+
relY: i.getBoundingClientRect().top - o
|
|
3676
3676
|
};
|
|
3677
3677
|
}
|
|
3678
3678
|
}
|
|
3679
3679
|
}
|
|
3680
|
-
const
|
|
3681
|
-
this._scrollSnap =
|
|
3682
|
-
if (this._scrollSnap = null,
|
|
3680
|
+
const a = { forceBottom: t, wasPinned: s, anchor: r };
|
|
3681
|
+
this._scrollSnap = a, this.$nextTick(() => {
|
|
3682
|
+
if (this._scrollSnap = null, a.forceBottom || a.wasPinned) {
|
|
3683
3683
|
e.scrollTop = e.scrollHeight;
|
|
3684
3684
|
return;
|
|
3685
3685
|
}
|
|
3686
|
-
if (!
|
|
3686
|
+
if (!a.anchor) return;
|
|
3687
3687
|
const n = () => {
|
|
3688
|
-
const
|
|
3688
|
+
const i = a.anchor, o = this.findRowByKey(e, i.rowKey);
|
|
3689
3689
|
if (!o) return;
|
|
3690
|
-
const b = o.getBoundingClientRect().top - e.getBoundingClientRect().top -
|
|
3690
|
+
const b = o.getBoundingClientRect().top - e.getBoundingClientRect().top - i.relY;
|
|
3691
3691
|
Math.abs(b) > 0.5 && (e.scrollTop += b);
|
|
3692
3692
|
};
|
|
3693
3693
|
n(), requestAnimationFrame(() => {
|
|
@@ -3720,9 +3720,9 @@ const Er = {
|
|
|
3720
3720
|
pickAnchor(e) {
|
|
3721
3721
|
const t = e.getBoundingClientRect().top, s = e.querySelectorAll(".wm-list__row[data-row-key]");
|
|
3722
3722
|
let r = null;
|
|
3723
|
-
for (const
|
|
3724
|
-
if (r || (r =
|
|
3725
|
-
return { rowKey:
|
|
3723
|
+
for (const a of s)
|
|
3724
|
+
if (r || (r = a), a.getBoundingClientRect().bottom >= t)
|
|
3725
|
+
return { rowKey: a.dataset.rowKey };
|
|
3726
3726
|
return r ? { rowKey: r.dataset.rowKey } : null;
|
|
3727
3727
|
},
|
|
3728
3728
|
findRowByKey(e, t) {
|
|
@@ -3835,9 +3835,9 @@ const Er = {
|
|
|
3835
3835
|
// doit garder son arrondi.
|
|
3836
3836
|
cornersFor(e, t) {
|
|
3837
3837
|
var ie, ae, X;
|
|
3838
|
-
const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind,
|
|
3838
|
+
const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, a = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, i = e.role === "user", o = 14, f = 4, b = a == null ? void 0 : a.bottom, v = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, T = (Q, oe, Z) => Q != null && M != null ? Q + z >= M : oe === Z || oe === "card" && Z === "bubble";
|
|
3839
3839
|
let U = o, x = o, q = o, J = o;
|
|
3840
|
-
return
|
|
3840
|
+
return i ? (b && (x = f), (v || !n) && (q = f), b && T(E, b, r == null ? void 0 : r.top) && (U = f), v && T(S, v, r == null ? void 0 : r.bottom) && (J = f)) : (b && (U = f), (v || !n) && (J = f), b && T(E, b, r == null ? void 0 : r.top) && (x = f), v && T(S, v, r == null ? void 0 : r.bottom) && (q = f)), { tl: U, tr: x, br: q, bl: J };
|
|
3841
3841
|
},
|
|
3842
3842
|
// Inline column-count for the mosaic grid, capped at 4. Single
|
|
3843
3843
|
// attachment falls back to the vertical-list layout (null). Two
|
|
@@ -3860,8 +3860,8 @@ const Er = {
|
|
|
3860
3860
|
// corners of every top-row cell flatten too.
|
|
3861
3861
|
mosaicCornerStyle(e, t, s) {
|
|
3862
3862
|
if (!t || t < 2) return null;
|
|
3863
|
-
const r = Math.min(t, 4),
|
|
3864
|
-
return (
|
|
3863
|
+
const r = Math.min(t, 4), a = Math.floor(e / r), n = e % r, i = n > 0, o = n < r - 1 && e + 1 < t, f = a > 0, b = e + r < t, v = "4px", M = {};
|
|
3864
|
+
return (i || f) && (M["--wm-r-tl"] = v), (o || f) && (M["--wm-r-tr"] = v), (i || b) && (M["--wm-r-bl"] = v), (o || b) && (M["--wm-r-br"] = v), s && (M["--wm-r-tl"] = v, M["--wm-r-tr"] = v), Object.keys(M).length ? M : null;
|
|
3865
3865
|
},
|
|
3866
3866
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3867
3867
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3902,20 +3902,20 @@ const Er = {
|
|
|
3902
3902
|
for (const n of e.querySelectorAll(
|
|
3903
3903
|
".wm-list__row[data-row-key]"
|
|
3904
3904
|
)) {
|
|
3905
|
-
const
|
|
3906
|
-
if (!
|
|
3905
|
+
const i = n.dataset.rowKey;
|
|
3906
|
+
if (!i) continue;
|
|
3907
3907
|
const o = n.querySelector(
|
|
3908
3908
|
".wm-bubble, .wm-result, .wm-art, .wm-list__body"
|
|
3909
3909
|
);
|
|
3910
3910
|
if (!o) continue;
|
|
3911
3911
|
const f = o.getBoundingClientRect().width;
|
|
3912
|
-
f > 0 && (t[
|
|
3912
|
+
f > 0 && (t[i] = f);
|
|
3913
3913
|
}
|
|
3914
|
-
const s = this.widthByKey, r = Object.keys(s),
|
|
3915
|
-
if (r.length ===
|
|
3914
|
+
const s = this.widthByKey, r = Object.keys(s), a = Object.keys(t);
|
|
3915
|
+
if (r.length === a.length) {
|
|
3916
3916
|
let n = !0;
|
|
3917
|
-
for (const
|
|
3918
|
-
if (Math.abs((s[
|
|
3917
|
+
for (const i of a)
|
|
3918
|
+
if (Math.abs((s[i] ?? 0) - t[i]) > 0.5) {
|
|
3919
3919
|
n = !1;
|
|
3920
3920
|
break;
|
|
3921
3921
|
}
|
|
@@ -3985,14 +3985,14 @@ const Er = {
|
|
|
3985
3985
|
return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
|
|
3986
3986
|
},
|
|
3987
3987
|
actionDetail(e) {
|
|
3988
|
-
var s, r,
|
|
3988
|
+
var s, r, a, n, i, o, f, b;
|
|
3989
3989
|
const t = e == null ? void 0 : e.payload;
|
|
3990
3990
|
if (!t) return "";
|
|
3991
3991
|
if (t.state === "success")
|
|
3992
|
-
return ((s = t.success) == null ? void 0 : s.summary) || ((
|
|
3992
|
+
return ((s = t.success) == null ? void 0 : s.summary) || ((a = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : a.description) || "";
|
|
3993
3993
|
if (t.state === "rejected") {
|
|
3994
3994
|
if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
|
|
3995
|
-
const v = (o = (
|
|
3995
|
+
const v = (o = (i = t.rejected) == null ? void 0 : i.metadata) == null ? void 0 : o.resolution, M = typeof v == "string" && v.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
|
|
3996
3996
|
return this.t(M);
|
|
3997
3997
|
}
|
|
3998
3998
|
return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
|
|
@@ -4003,8 +4003,8 @@ const Er = {
|
|
|
4003
4003
|
return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
|
|
4004
4004
|
},
|
|
4005
4005
|
systemLabel(e) {
|
|
4006
|
-
var
|
|
4007
|
-
const t = (
|
|
4006
|
+
var a, n, i;
|
|
4007
|
+
const t = (a = e == null ? void 0 : e.payload) == null ? void 0 : a.event, s = Er[t], r = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((i = e == null ? void 0 : e.author) == null ? void 0 : i.name) || this.t("messageList.anAgent");
|
|
4008
4008
|
return s ? this.t(s, { name: r }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
4009
4009
|
},
|
|
4010
4010
|
scrollToBottom() {
|
|
@@ -4049,12 +4049,12 @@ const Er = {
|
|
|
4049
4049
|
key: 3,
|
|
4050
4050
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
4051
4051
|
}, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
|
|
4052
|
-
function si(e, t, s, r,
|
|
4053
|
-
const
|
|
4052
|
+
function si(e, t, s, r, a, n) {
|
|
4053
|
+
const i = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), b = P("ArtifactRenderer"), v = P("Bubble"), M = P("AttachmentPreview"), E = P("Typing");
|
|
4054
4054
|
return c(), d("div", Dr, [
|
|
4055
4055
|
l("div", {
|
|
4056
4056
|
ref: "scrollEl",
|
|
4057
|
-
class: L(["wm-list", { "wm-list--silent":
|
|
4057
|
+
class: L(["wm-list", { "wm-list--silent": a.silentFades }]),
|
|
4058
4058
|
onScrollPassive: t[4] || (t[4] = (...S) => n.onScroll && n.onScroll(...S))
|
|
4059
4059
|
}, [
|
|
4060
4060
|
s.loadingMore ? (c(), d("div", Ur, [
|
|
@@ -4108,7 +4108,7 @@ function si(e, t, s, r, i, n) {
|
|
|
4108
4108
|
}, [
|
|
4109
4109
|
S.role !== "user" ? (c(), d("div", $r, [
|
|
4110
4110
|
U === S.items.length - 1 ? (c(), d(B, { key: 0 }, [
|
|
4111
|
-
S.role === "ai" ? (c(), I(
|
|
4111
|
+
S.role === "ai" ? (c(), I(i, {
|
|
4112
4112
|
key: 0,
|
|
4113
4113
|
size: 26,
|
|
4114
4114
|
tail: !0,
|
|
@@ -4178,7 +4178,7 @@ function si(e, t, s, r, i, n) {
|
|
|
4178
4178
|
], 6)) : k("", !0)
|
|
4179
4179
|
], 2))
|
|
4180
4180
|
], 46, Wr),
|
|
4181
|
-
U < S.items.length - 1 &&
|
|
4181
|
+
U < S.items.length - 1 && a.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (S.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
|
|
4182
4182
|
key: 0,
|
|
4183
4183
|
class: L(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": S.role === "user" }])
|
|
4184
4184
|
}, [
|
|
@@ -4200,7 +4200,7 @@ function si(e, t, s, r, i, n) {
|
|
|
4200
4200
|
], 64))), 128)),
|
|
4201
4201
|
s.streamingActive ? (c(), d("div", ei, [
|
|
4202
4202
|
l("div", ti, [
|
|
4203
|
-
W(
|
|
4203
|
+
W(i, {
|
|
4204
4204
|
size: 26,
|
|
4205
4205
|
tail: !0,
|
|
4206
4206
|
name: s.aiAgentName,
|
|
@@ -4212,7 +4212,7 @@ function si(e, t, s, r, i, n) {
|
|
|
4212
4212
|
], 34),
|
|
4213
4213
|
W(Ne, { name: "wm-scrollDown" }, {
|
|
4214
4214
|
default: Fe(() => [
|
|
4215
|
-
|
|
4215
|
+
a.showScrollDown ? (c(), d("button", {
|
|
4216
4216
|
key: 0,
|
|
4217
4217
|
type: "button",
|
|
4218
4218
|
class: "wm-list__scrollDown",
|
|
@@ -4260,7 +4260,7 @@ function Ve({ audio: e }) {
|
|
|
4260
4260
|
systemAudio: e ? "include" : "exclude"
|
|
4261
4261
|
};
|
|
4262
4262
|
}
|
|
4263
|
-
function
|
|
4263
|
+
function ho(e) {
|
|
4264
4264
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
4265
4265
|
}
|
|
4266
4266
|
async function ai() {
|
|
@@ -4286,15 +4286,15 @@ async function ai() {
|
|
|
4286
4286
|
async function oi(e) {
|
|
4287
4287
|
const t = document.createElement("video");
|
|
4288
4288
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
|
|
4289
|
-
const s = t.videoWidth || 1280, r = t.videoHeight || 720,
|
|
4290
|
-
|
|
4289
|
+
const s = t.videoWidth || 1280, r = t.videoHeight || 720, a = document.createElement("canvas");
|
|
4290
|
+
a.width = s, a.height = r, a.getContext("2d").drawImage(t, 0, 0, s, r);
|
|
4291
4291
|
const n = await new Promise((o, f) => {
|
|
4292
|
-
|
|
4292
|
+
a.toBlob(
|
|
4293
4293
|
(b) => b ? o(b) : f(new Error("toBlob failed")),
|
|
4294
4294
|
"image/png"
|
|
4295
4295
|
);
|
|
4296
|
-
}),
|
|
4297
|
-
return new File([n], `capture-${
|
|
4296
|
+
}), i = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
4297
|
+
return new File([n], `capture-${i}.png`, { type: "image/png" });
|
|
4298
4298
|
}
|
|
4299
4299
|
async function li(e = {}) {
|
|
4300
4300
|
var b;
|
|
@@ -4316,16 +4316,16 @@ async function li(e = {}) {
|
|
|
4316
4316
|
M.stop();
|
|
4317
4317
|
}), null;
|
|
4318
4318
|
}
|
|
4319
|
-
const
|
|
4320
|
-
let n = null,
|
|
4319
|
+
const a = [];
|
|
4320
|
+
let n = null, i = !1;
|
|
4321
4321
|
r.addEventListener("dataavailable", (v) => {
|
|
4322
|
-
v.data && v.data.size > 0 &&
|
|
4322
|
+
v.data && v.data.size > 0 && a.push(v.data);
|
|
4323
4323
|
}), r.addEventListener("stop", () => {
|
|
4324
4324
|
var v, M;
|
|
4325
4325
|
if (n && clearInterval(n), t.getTracks().forEach((E) => {
|
|
4326
4326
|
E.stop();
|
|
4327
|
-
}),
|
|
4328
|
-
const E = r.mimeType || s || "video/webm", S = new Blob(
|
|
4327
|
+
}), a.length) {
|
|
4328
|
+
const E = r.mimeType || s || "video/webm", S = new Blob(a, { type: E }), z = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([S], `ecran-${T}.${z}`, {
|
|
4329
4329
|
type: E
|
|
4330
4330
|
});
|
|
4331
4331
|
(v = e.onfinalize) == null || v.call(e, U);
|
|
@@ -4335,7 +4335,7 @@ async function li(e = {}) {
|
|
|
4335
4335
|
v.addEventListener("ended", () => o(), { once: !0 });
|
|
4336
4336
|
});
|
|
4337
4337
|
function o() {
|
|
4338
|
-
if (!
|
|
4338
|
+
if (!i && (i = !0, r.state !== "inactive"))
|
|
4339
4339
|
try {
|
|
4340
4340
|
r.stop();
|
|
4341
4341
|
} catch (v) {
|
|
@@ -4546,12 +4546,12 @@ const ci = [
|
|
|
4546
4546
|
height: "14",
|
|
4547
4547
|
"aria-hidden": "true"
|
|
4548
4548
|
}, yi = ["d"], vi = ["placeholder", "disabled"], pi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
|
|
4549
|
-
function ki(e, t, s, r,
|
|
4549
|
+
function ki(e, t, s, r, a, n) {
|
|
4550
4550
|
return c(), d("div", {
|
|
4551
4551
|
class: L(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
|
|
4552
|
-
style: j(
|
|
4552
|
+
style: j(a.kbOffset ? { transform: `translateY(-${a.kbOffset}px)` } : null)
|
|
4553
4553
|
}, [
|
|
4554
|
-
|
|
4554
|
+
a.recording ? (c(), d("div", ui, [
|
|
4555
4555
|
t[8] || (t[8] = l("span", {
|
|
4556
4556
|
class: "wm-rec__dot",
|
|
4557
4557
|
"aria-hidden": "true"
|
|
@@ -4560,37 +4560,37 @@ function ki(e, t, s, r, i, n) {
|
|
|
4560
4560
|
l("button", {
|
|
4561
4561
|
type: "button",
|
|
4562
4562
|
class: "wm-rec__stop",
|
|
4563
|
-
onClick: t[0] || (t[0] = (...
|
|
4563
|
+
onClick: t[0] || (t[0] = (...i) => n.stopRecording && n.stopRecording(...i))
|
|
4564
4564
|
}, y(n.t("composer.stop")), 1)
|
|
4565
4565
|
])) : k("", !0),
|
|
4566
4566
|
l("form", {
|
|
4567
|
-
class: L(["wm-compose", { "has-attach":
|
|
4568
|
-
onSubmit: t[7] || (t[7] = Y((...
|
|
4567
|
+
class: L(["wm-compose", { "has-attach": a.attachOpen }]),
|
|
4568
|
+
onSubmit: t[7] || (t[7] = Y((...i) => n.onSubmit && n.onSubmit(...i), ["prevent"]))
|
|
4569
4569
|
}, [
|
|
4570
4570
|
l("input", {
|
|
4571
4571
|
ref: "fileEl",
|
|
4572
4572
|
type: "file",
|
|
4573
4573
|
hidden: "",
|
|
4574
4574
|
multiple: "",
|
|
4575
|
-
onChange: t[1] || (t[1] = (...
|
|
4575
|
+
onChange: t[1] || (t[1] = (...i) => n.onFile && n.onFile(...i))
|
|
4576
4576
|
}, null, 544),
|
|
4577
|
-
|
|
4577
|
+
a.attachOpen ? (c(), d("div", {
|
|
4578
4578
|
key: 0,
|
|
4579
4579
|
class: "wm-compose__overlay",
|
|
4580
|
-
onClick: t[2] || (t[2] = (
|
|
4580
|
+
onClick: t[2] || (t[2] = (i) => a.attachOpen = !1)
|
|
4581
4581
|
})) : k("", !0),
|
|
4582
|
-
|
|
4583
|
-
(c(!0), d(B, null, N(n.attachItems, (
|
|
4584
|
-
key:
|
|
4582
|
+
a.attachOpen ? (c(), d("div", hi, [
|
|
4583
|
+
(c(!0), d(B, null, N(n.attachItems, (i) => (c(), d("button", {
|
|
4584
|
+
key: i.action,
|
|
4585
4585
|
type: "button",
|
|
4586
4586
|
class: "wm-compose__menuItem",
|
|
4587
|
-
disabled:
|
|
4588
|
-
onClick: (o) => n.onAttachAction(
|
|
4587
|
+
disabled: i.disabled,
|
|
4588
|
+
onClick: (o) => n.onAttachAction(i.action)
|
|
4589
4589
|
}, [
|
|
4590
4590
|
l("span", _i, [
|
|
4591
4591
|
(c(), d("svg", gi, [
|
|
4592
4592
|
l("path", {
|
|
4593
|
-
d:
|
|
4593
|
+
d: i.path,
|
|
4594
4594
|
stroke: "currentColor",
|
|
4595
4595
|
"stroke-width": "1.8",
|
|
4596
4596
|
"stroke-linecap": "round",
|
|
@@ -4599,29 +4599,29 @@ function ki(e, t, s, r, i, n) {
|
|
|
4599
4599
|
}, null, 8, yi)
|
|
4600
4600
|
]))
|
|
4601
4601
|
]),
|
|
4602
|
-
l("span", null, y(
|
|
4602
|
+
l("span", null, y(i.label), 1)
|
|
4603
4603
|
], 8, fi))), 128))
|
|
4604
4604
|
])) : k("", !0),
|
|
4605
4605
|
$(l("textarea", {
|
|
4606
4606
|
ref: "inputEl",
|
|
4607
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
4607
|
+
"onUpdate:modelValue": t[3] || (t[3] = (i) => a.local = i),
|
|
4608
4608
|
class: "wm-compose__input",
|
|
4609
4609
|
rows: "3",
|
|
4610
4610
|
placeholder: s.placeholder,
|
|
4611
4611
|
disabled: s.disabled,
|
|
4612
|
-
onKeydown: t[4] || (t[4] = (...
|
|
4613
|
-
onInput: t[5] || (t[5] = (...
|
|
4612
|
+
onKeydown: t[4] || (t[4] = (...i) => n.onKeydown && n.onKeydown(...i)),
|
|
4613
|
+
onInput: t[5] || (t[5] = (...i) => n.autosize && n.autosize(...i))
|
|
4614
4614
|
}, null, 40, vi), [
|
|
4615
|
-
[se,
|
|
4615
|
+
[se, a.local]
|
|
4616
4616
|
]),
|
|
4617
4617
|
l("div", pi, [
|
|
4618
4618
|
l("button", {
|
|
4619
4619
|
type: "button",
|
|
4620
|
-
class: L(["wm-compose__icon", { "is-open":
|
|
4620
|
+
class: L(["wm-compose__icon", { "is-open": a.attachOpen }]),
|
|
4621
4621
|
title: s.attachLabel,
|
|
4622
4622
|
"aria-label": s.attachLabel,
|
|
4623
|
-
disabled:
|
|
4624
|
-
onClick: t[6] || (t[6] = (
|
|
4623
|
+
disabled: a.recording,
|
|
4624
|
+
onClick: t[6] || (t[6] = (i) => a.attachOpen = !a.attachOpen)
|
|
4625
4625
|
}, [...t[9] || (t[9] = [
|
|
4626
4626
|
l("svg", {
|
|
4627
4627
|
width: "13",
|
|
@@ -4683,6 +4683,15 @@ const Ci = /* @__PURE__ */ D(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
|
|
|
4683
4683
|
// détruise/recrée les boutons et rejoue l'animation d'entrée.
|
|
4684
4684
|
batchKey() {
|
|
4685
4685
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4686
|
+
},
|
|
4687
|
+
// En-tête factuel de la carte (variante buttons) : premier `title` non
|
|
4688
|
+
// vide parmi les callbacks — le serveur le pose sur le callback primaire.
|
|
4689
|
+
headerTitle() {
|
|
4690
|
+
if (this.variant !== "buttons") return "";
|
|
4691
|
+
const e = this.items.find(
|
|
4692
|
+
(t) => typeof (t == null ? void 0 : t.title) == "string" && t.title.trim()
|
|
4693
|
+
);
|
|
4694
|
+
return e ? e.title.trim() : "";
|
|
4686
4695
|
}
|
|
4687
4696
|
},
|
|
4688
4697
|
methods: {
|
|
@@ -4690,26 +4699,37 @@ const Ci = /* @__PURE__ */ D(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
|
|
|
4690
4699
|
return this.variant === "chips" ? "wm-icb__btn--chip" : ["wm-icb__btn--action", `wm-icb__btn--${(e == null ? void 0 : e.style) || "neutral"}`];
|
|
4691
4700
|
}
|
|
4692
4701
|
}
|
|
4693
|
-
}, Si = ["onClick"]
|
|
4694
|
-
|
|
4702
|
+
}, Si = ["onClick"], Mi = {
|
|
4703
|
+
key: 0,
|
|
4704
|
+
class: "wm-icb__title"
|
|
4705
|
+
}, Ti = { class: "wm-icb__row" }, xi = ["onClick"];
|
|
4706
|
+
function Oi(e, t, s, r, a, n) {
|
|
4695
4707
|
return s.items.length ? (c(), d("div", {
|
|
4696
4708
|
key: n.batchKey,
|
|
4697
4709
|
class: L(["wm-icb", `wm-icb--${s.variant}`])
|
|
4698
4710
|
}, [
|
|
4699
|
-
(c(!0), d(B,
|
|
4700
|
-
key:
|
|
4711
|
+
s.variant === "chips" ? (c(!0), d(B, { key: 0 }, N(s.items, (i, o) => (c(), d("button", {
|
|
4712
|
+
key: i.id != null ? i.id : o,
|
|
4701
4713
|
type: "button",
|
|
4702
|
-
class:
|
|
4703
|
-
style: j(
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4714
|
+
class: "wm-icb__btn wm-icb__btn--chip",
|
|
4715
|
+
style: j({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
|
|
4716
|
+
onClick: (f) => e.$emit("select", i)
|
|
4717
|
+
}, y(i.label), 13, Si))), 128)) : (c(), d(B, { key: 1 }, [
|
|
4718
|
+
n.headerTitle ? (c(), d("div", Mi, y(n.headerTitle), 1)) : k("", !0),
|
|
4719
|
+
l("div", Ti, [
|
|
4720
|
+
(c(!0), d(B, null, N(s.items, (i, o) => (c(), d("button", {
|
|
4721
|
+
key: i.id != null ? i.id : o,
|
|
4722
|
+
type: "button",
|
|
4723
|
+
class: L(["wm-icb__btn", n.btnClass(i)]),
|
|
4724
|
+
onClick: (f) => e.$emit("select", i)
|
|
4725
|
+
}, y(i.label), 11, xi))), 128))
|
|
4726
|
+
])
|
|
4727
|
+
], 64))
|
|
4708
4728
|
], 2)) : k("", !0);
|
|
4709
4729
|
}
|
|
4710
|
-
const
|
|
4730
|
+
const Ri = /* @__PURE__ */ D(Ai, [["render", Oi], ["__scopeId", "data-v-c8cc8cbf"]]);
|
|
4711
4731
|
let De = 0;
|
|
4712
|
-
const
|
|
4732
|
+
const Li = /* @__PURE__ */ new Set([
|
|
4713
4733
|
"text",
|
|
4714
4734
|
"textarea",
|
|
4715
4735
|
"number",
|
|
@@ -4717,7 +4737,7 @@ const xi = /* @__PURE__ */ new Set([
|
|
|
4717
4737
|
"select",
|
|
4718
4738
|
"multiselect",
|
|
4719
4739
|
"date"
|
|
4720
|
-
]),
|
|
4740
|
+
]), Ei = {
|
|
4721
4741
|
name: "WmFormCard",
|
|
4722
4742
|
components: { AIAvatar: he },
|
|
4723
4743
|
inject: {
|
|
@@ -4747,7 +4767,7 @@ const xi = /* @__PURE__ */ new Set([
|
|
|
4747
4767
|
// douteux.
|
|
4748
4768
|
normalizedFields() {
|
|
4749
4769
|
var t;
|
|
4750
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !
|
|
4770
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Li.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
|
|
4751
4771
|
}
|
|
4752
4772
|
},
|
|
4753
4773
|
created() {
|
|
@@ -4766,8 +4786,8 @@ const xi = /* @__PURE__ */ new Set([
|
|
|
4766
4786
|
this.values = t, this.error = "";
|
|
4767
4787
|
},
|
|
4768
4788
|
toggleMulti(e, t, s) {
|
|
4769
|
-
const r = Array.isArray(this.values[e]) ? this.values[e].slice() : [],
|
|
4770
|
-
s &&
|
|
4789
|
+
const r = Array.isArray(this.values[e]) ? this.values[e].slice() : [], a = r.indexOf(t);
|
|
4790
|
+
s && a === -1 ? r.push(t) : !s && a !== -1 && r.splice(a, 1), this.values = { ...this.values, [e]: r };
|
|
4771
4791
|
},
|
|
4772
4792
|
validate() {
|
|
4773
4793
|
for (const e of this.normalizedFields) {
|
|
@@ -4800,47 +4820,47 @@ const xi = /* @__PURE__ */ new Set([
|
|
|
4800
4820
|
}
|
|
4801
4821
|
}
|
|
4802
4822
|
}
|
|
4803
|
-
},
|
|
4823
|
+
}, Bi = { class: "wm-form" }, Ii = { class: "wm-form__head" }, Pi = { class: "wm-form__icon" }, Di = { class: "wm-form__main" }, Ui = { class: "wm-form__title" }, Ni = {
|
|
4804
4824
|
key: 0,
|
|
4805
4825
|
class: "wm-form__detail"
|
|
4806
|
-
},
|
|
4826
|
+
}, Fi = ["for"], Hi = {
|
|
4807
4827
|
key: 0,
|
|
4808
4828
|
class: "wm-form__req",
|
|
4809
4829
|
"aria-hidden": "true"
|
|
4810
|
-
},
|
|
4830
|
+
}, ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], zi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], qi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Vi = ["id", "onUpdate:modelValue", "required", "disabled"], Ki = {
|
|
4811
4831
|
key: 4,
|
|
4812
4832
|
class: "wm-form__bool"
|
|
4813
|
-
},
|
|
4833
|
+
}, Wi = ["id", "onUpdate:modelValue", "disabled"], $i = ["id", "onUpdate:modelValue", "required", "disabled"], Gi = {
|
|
4814
4834
|
value: "",
|
|
4815
4835
|
disabled: ""
|
|
4816
|
-
},
|
|
4836
|
+
}, Yi = ["value"], Ji = {
|
|
4817
4837
|
key: 6,
|
|
4818
4838
|
class: "wm-form__multi"
|
|
4819
|
-
},
|
|
4839
|
+
}, Xi = ["value", "checked", "disabled", "onChange"], Qi = {
|
|
4820
4840
|
key: 0,
|
|
4821
4841
|
class: "wm-form__err"
|
|
4822
|
-
},
|
|
4842
|
+
}, Zi = ["disabled"], ea = {
|
|
4823
4843
|
key: 0,
|
|
4824
4844
|
class: "wm-form__spinner",
|
|
4825
4845
|
"aria-hidden": "true"
|
|
4826
|
-
},
|
|
4846
|
+
}, ta = {
|
|
4827
4847
|
key: 2,
|
|
4828
4848
|
class: "wm-form__doneLbl"
|
|
4829
4849
|
};
|
|
4830
|
-
function
|
|
4831
|
-
const
|
|
4832
|
-
return c(), d("div",
|
|
4833
|
-
l("div",
|
|
4834
|
-
l("div",
|
|
4835
|
-
W(
|
|
4850
|
+
function na(e, t, s, r, a, n) {
|
|
4851
|
+
const i = P("AIAvatar");
|
|
4852
|
+
return c(), d("div", Bi, [
|
|
4853
|
+
l("div", Ii, [
|
|
4854
|
+
l("div", Pi, [
|
|
4855
|
+
W(i, {
|
|
4836
4856
|
size: 24,
|
|
4837
4857
|
name: s.agentName,
|
|
4838
4858
|
"image-url": s.agentAvatarUrl
|
|
4839
4859
|
}, null, 8, ["name", "image-url"])
|
|
4840
4860
|
]),
|
|
4841
|
-
l("div",
|
|
4842
|
-
l("div",
|
|
4843
|
-
s.form.description ? (c(), d("div",
|
|
4861
|
+
l("div", Di, [
|
|
4862
|
+
l("div", Ui, y(s.form.title || n.t("form.title")), 1),
|
|
4863
|
+
s.form.description ? (c(), d("div", Ni, y(s.form.description), 1)) : k("", !0)
|
|
4844
4864
|
])
|
|
4845
4865
|
]),
|
|
4846
4866
|
l("form", {
|
|
@@ -4852,86 +4872,86 @@ function Zi(e, t, s, r, i, n) {
|
|
|
4852
4872
|
class: "wm-form__field"
|
|
4853
4873
|
}, [
|
|
4854
4874
|
l("label", {
|
|
4855
|
-
for: `wm-f-${
|
|
4875
|
+
for: `wm-f-${a._uid}-${o.key}`,
|
|
4856
4876
|
class: "wm-form__label"
|
|
4857
4877
|
}, [
|
|
4858
4878
|
Se(y(o.label), 1),
|
|
4859
|
-
o.required ? (c(), d("span",
|
|
4860
|
-
], 8,
|
|
4879
|
+
o.required ? (c(), d("span", Hi, "*")) : k("", !0)
|
|
4880
|
+
], 8, Fi),
|
|
4861
4881
|
o.type === "text" ? $((c(), d("input", {
|
|
4862
4882
|
key: 0,
|
|
4863
|
-
id: `wm-f-${
|
|
4864
|
-
"onUpdate:modelValue": (f) =>
|
|
4883
|
+
id: `wm-f-${a._uid}-${o.key}`,
|
|
4884
|
+
"onUpdate:modelValue": (f) => a.values[o.key] = f,
|
|
4865
4885
|
type: "text",
|
|
4866
4886
|
class: "wm-form__input",
|
|
4867
4887
|
placeholder: o.placeholder || "",
|
|
4868
4888
|
required: o.required,
|
|
4869
|
-
disabled: s.readOnly ||
|
|
4870
|
-
}, null, 8,
|
|
4871
|
-
[se,
|
|
4889
|
+
disabled: s.readOnly || a.busy
|
|
4890
|
+
}, null, 8, ji)), [
|
|
4891
|
+
[se, a.values[o.key]]
|
|
4872
4892
|
]) : o.type === "textarea" ? $((c(), d("textarea", {
|
|
4873
4893
|
key: 1,
|
|
4874
|
-
id: `wm-f-${
|
|
4875
|
-
"onUpdate:modelValue": (f) =>
|
|
4894
|
+
id: `wm-f-${a._uid}-${o.key}`,
|
|
4895
|
+
"onUpdate:modelValue": (f) => a.values[o.key] = f,
|
|
4876
4896
|
class: "wm-form__textarea",
|
|
4877
4897
|
rows: "3",
|
|
4878
4898
|
placeholder: o.placeholder || "",
|
|
4879
4899
|
required: o.required,
|
|
4880
|
-
disabled: s.readOnly ||
|
|
4881
|
-
}, null, 8,
|
|
4882
|
-
[se,
|
|
4900
|
+
disabled: s.readOnly || a.busy
|
|
4901
|
+
}, null, 8, zi)), [
|
|
4902
|
+
[se, a.values[o.key]]
|
|
4883
4903
|
]) : o.type === "number" ? $((c(), d("input", {
|
|
4884
4904
|
key: 2,
|
|
4885
|
-
id: `wm-f-${
|
|
4886
|
-
"onUpdate:modelValue": (f) =>
|
|
4905
|
+
id: `wm-f-${a._uid}-${o.key}`,
|
|
4906
|
+
"onUpdate:modelValue": (f) => a.values[o.key] = f,
|
|
4887
4907
|
type: "number",
|
|
4888
4908
|
class: "wm-form__input",
|
|
4889
4909
|
placeholder: o.placeholder || "",
|
|
4890
4910
|
required: o.required,
|
|
4891
|
-
disabled: s.readOnly ||
|
|
4892
|
-
}, null, 8,
|
|
4911
|
+
disabled: s.readOnly || a.busy
|
|
4912
|
+
}, null, 8, qi)), [
|
|
4893
4913
|
[
|
|
4894
4914
|
se,
|
|
4895
|
-
|
|
4915
|
+
a.values[o.key],
|
|
4896
4916
|
void 0,
|
|
4897
4917
|
{ number: !0 }
|
|
4898
4918
|
]
|
|
4899
4919
|
]) : o.type === "date" ? $((c(), d("input", {
|
|
4900
4920
|
key: 3,
|
|
4901
|
-
id: `wm-f-${
|
|
4902
|
-
"onUpdate:modelValue": (f) =>
|
|
4921
|
+
id: `wm-f-${a._uid}-${o.key}`,
|
|
4922
|
+
"onUpdate:modelValue": (f) => a.values[o.key] = f,
|
|
4903
4923
|
type: "date",
|
|
4904
4924
|
class: "wm-form__input",
|
|
4905
4925
|
required: o.required,
|
|
4906
|
-
disabled: s.readOnly ||
|
|
4907
|
-
}, null, 8,
|
|
4908
|
-
[se,
|
|
4909
|
-
]) : o.type === "boolean" ? (c(), d("label",
|
|
4926
|
+
disabled: s.readOnly || a.busy
|
|
4927
|
+
}, null, 8, Vi)), [
|
|
4928
|
+
[se, a.values[o.key]]
|
|
4929
|
+
]) : o.type === "boolean" ? (c(), d("label", Ki, [
|
|
4910
4930
|
$(l("input", {
|
|
4911
|
-
id: `wm-f-${
|
|
4912
|
-
"onUpdate:modelValue": (f) =>
|
|
4931
|
+
id: `wm-f-${a._uid}-${o.key}`,
|
|
4932
|
+
"onUpdate:modelValue": (f) => a.values[o.key] = f,
|
|
4913
4933
|
type: "checkbox",
|
|
4914
|
-
disabled: s.readOnly ||
|
|
4915
|
-
}, null, 8,
|
|
4916
|
-
[$e,
|
|
4934
|
+
disabled: s.readOnly || a.busy
|
|
4935
|
+
}, null, 8, Wi), [
|
|
4936
|
+
[$e, a.values[o.key]]
|
|
4917
4937
|
]),
|
|
4918
4938
|
l("span", null, y(o.placeholder || n.t("common.yes")), 1)
|
|
4919
4939
|
])) : o.type === "select" ? $((c(), d("select", {
|
|
4920
4940
|
key: 5,
|
|
4921
|
-
id: `wm-f-${
|
|
4922
|
-
"onUpdate:modelValue": (f) =>
|
|
4941
|
+
id: `wm-f-${a._uid}-${o.key}`,
|
|
4942
|
+
"onUpdate:modelValue": (f) => a.values[o.key] = f,
|
|
4923
4943
|
class: "wm-form__select",
|
|
4924
4944
|
required: o.required,
|
|
4925
|
-
disabled: s.readOnly ||
|
|
4945
|
+
disabled: s.readOnly || a.busy
|
|
4926
4946
|
}, [
|
|
4927
|
-
l("option",
|
|
4947
|
+
l("option", Gi, y(o.placeholder || n.t("form.choose")), 1),
|
|
4928
4948
|
(c(!0), d(B, null, N(o.options, (f) => (c(), d("option", {
|
|
4929
4949
|
key: f.value,
|
|
4930
4950
|
value: f.value
|
|
4931
|
-
}, y(f.label), 9,
|
|
4932
|
-
], 8,
|
|
4933
|
-
[Ge,
|
|
4934
|
-
]) : o.type === "multiselect" ? (c(), d("div",
|
|
4951
|
+
}, y(f.label), 9, Yi))), 128))
|
|
4952
|
+
], 8, $i)), [
|
|
4953
|
+
[Ge, a.values[o.key]]
|
|
4954
|
+
]) : o.type === "multiselect" ? (c(), d("div", Ji, [
|
|
4935
4955
|
(c(!0), d(B, null, N(o.options, (f) => (c(), d("label", {
|
|
4936
4956
|
key: f.value,
|
|
4937
4957
|
class: "wm-form__multiItem"
|
|
@@ -4939,32 +4959,32 @@ function Zi(e, t, s, r, i, n) {
|
|
|
4939
4959
|
l("input", {
|
|
4940
4960
|
type: "checkbox",
|
|
4941
4961
|
value: f.value,
|
|
4942
|
-
checked: Array.isArray(
|
|
4943
|
-
disabled: s.readOnly ||
|
|
4962
|
+
checked: Array.isArray(a.values[o.key]) && a.values[o.key].includes(f.value),
|
|
4963
|
+
disabled: s.readOnly || a.busy,
|
|
4944
4964
|
onChange: (b) => n.toggleMulti(
|
|
4945
4965
|
o.key,
|
|
4946
4966
|
f.value,
|
|
4947
4967
|
b.target.checked
|
|
4948
4968
|
)
|
|
4949
|
-
}, null, 40,
|
|
4969
|
+
}, null, 40, Xi),
|
|
4950
4970
|
l("span", null, y(f.label), 1)
|
|
4951
4971
|
]))), 128))
|
|
4952
4972
|
])) : k("", !0)
|
|
4953
4973
|
]))), 128)),
|
|
4954
|
-
|
|
4955
|
-
s.readOnly ? (c(), d("div",
|
|
4974
|
+
a.error ? (c(), d("div", Qi, y(a.error), 1)) : k("", !0),
|
|
4975
|
+
s.readOnly ? (c(), d("div", ta, y(n.t("form.responseSent")), 1)) : (c(), d("button", {
|
|
4956
4976
|
key: 1,
|
|
4957
4977
|
type: "submit",
|
|
4958
4978
|
class: "wm-form__submit",
|
|
4959
|
-
disabled:
|
|
4979
|
+
disabled: a.busy
|
|
4960
4980
|
}, [
|
|
4961
|
-
|
|
4962
|
-
l("span", null, y(
|
|
4963
|
-
], 8,
|
|
4981
|
+
a.busy ? (c(), d("span", ea)) : k("", !0),
|
|
4982
|
+
l("span", null, y(a.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
|
|
4983
|
+
], 8, Zi))
|
|
4964
4984
|
], 32)
|
|
4965
4985
|
]);
|
|
4966
4986
|
}
|
|
4967
|
-
const
|
|
4987
|
+
const sa = /* @__PURE__ */ D(Ei, [["render", na], ["__scopeId", "data-v-fe65cc56"]]), ra = {
|
|
4968
4988
|
name: "WmFeedback",
|
|
4969
4989
|
inject: {
|
|
4970
4990
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4998,13 +5018,13 @@ const ea = /* @__PURE__ */ D(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56
|
|
|
4998
5018
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4999
5019
|
}
|
|
5000
5020
|
}
|
|
5001
|
-
},
|
|
5021
|
+
}, ia = { class: "wm-fb" }, aa = { class: "wm-fb__title" }, oa = { class: "wm-fb__sub" }, la = { class: "wm-fb__row" }, ca = ["onClick"], da = { class: "wm-fb__emoji" }, ua = { class: "wm-fb__label" }, ma = ["disabled"], ha = {
|
|
5002
5022
|
key: 1,
|
|
5003
5023
|
class: "wm-fb__done"
|
|
5004
|
-
},
|
|
5005
|
-
function
|
|
5006
|
-
return c(), d("div",
|
|
5007
|
-
s.done ? (c(), d("div",
|
|
5024
|
+
}, fa = { class: "wm-fb__doneTitle" }, _a = { class: "wm-fb__doneSub" };
|
|
5025
|
+
function ga(e, t, s, r, a, n) {
|
|
5026
|
+
return c(), d("div", ia, [
|
|
5027
|
+
s.done ? (c(), d("div", ha, [
|
|
5008
5028
|
t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
|
|
5009
5029
|
l("svg", {
|
|
5010
5030
|
width: "16",
|
|
@@ -5020,32 +5040,32 @@ function ha(e, t, s, r, i, n) {
|
|
|
5020
5040
|
l("path", { d: "M20 6L9 17l-5-5" })
|
|
5021
5041
|
])
|
|
5022
5042
|
], -1)),
|
|
5023
|
-
l("div",
|
|
5024
|
-
l("div",
|
|
5043
|
+
l("div", fa, y(n.t("feedback.doneTitle")), 1),
|
|
5044
|
+
l("div", _a, y(n.t("feedback.doneSubtitle")), 1)
|
|
5025
5045
|
])) : (c(), d(B, { key: 0 }, [
|
|
5026
|
-
l("div",
|
|
5027
|
-
l("div",
|
|
5028
|
-
l("div",
|
|
5029
|
-
(c(!0), d(B, null, N(n.options, (
|
|
5030
|
-
key:
|
|
5046
|
+
l("div", aa, y(n.t("feedback.question")), 1),
|
|
5047
|
+
l("div", oa, y(n.t("feedback.subtitle")), 1),
|
|
5048
|
+
l("div", la, [
|
|
5049
|
+
(c(!0), d(B, null, N(n.options, (i) => (c(), d("button", {
|
|
5050
|
+
key: i.v,
|
|
5031
5051
|
type: "button",
|
|
5032
|
-
class: L(["wm-fb__opt", { "is-selected":
|
|
5033
|
-
onClick: (o) =>
|
|
5052
|
+
class: L(["wm-fb__opt", { "is-selected": a.sel === i.v }]),
|
|
5053
|
+
onClick: (o) => a.sel = i.v
|
|
5034
5054
|
}, [
|
|
5035
|
-
l("span",
|
|
5036
|
-
l("span",
|
|
5037
|
-
], 10,
|
|
5055
|
+
l("span", da, y(i.e), 1),
|
|
5056
|
+
l("span", ua, y(i.l), 1)
|
|
5057
|
+
], 10, ca))), 128))
|
|
5038
5058
|
]),
|
|
5039
5059
|
l("button", {
|
|
5040
5060
|
type: "button",
|
|
5041
5061
|
class: "wm-fb__send",
|
|
5042
|
-
disabled: !
|
|
5043
|
-
onClick: t[0] || (t[0] = (...
|
|
5044
|
-
}, y(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9,
|
|
5062
|
+
disabled: !a.sel || s.busy,
|
|
5063
|
+
onClick: t[0] || (t[0] = (...i) => n.onSend && n.onSend(...i))
|
|
5064
|
+
}, y(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ma)
|
|
5045
5065
|
], 64))
|
|
5046
5066
|
]);
|
|
5047
5067
|
}
|
|
5048
|
-
const
|
|
5068
|
+
const ya = /* @__PURE__ */ D(ra, [["render", ga], ["__scopeId", "data-v-9b630564"]]), va = {
|
|
5049
5069
|
name: "WmMoreMenu",
|
|
5050
5070
|
inject: {
|
|
5051
5071
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5080,29 +5100,29 @@ const fa = /* @__PURE__ */ D(ta, [["render", ha], ["__scopeId", "data-v-9b630564
|
|
|
5080
5100
|
this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
|
|
5081
5101
|
}
|
|
5082
5102
|
}
|
|
5083
|
-
},
|
|
5103
|
+
}, pa = { class: "wm-mm" }, wa = {
|
|
5084
5104
|
class: "wm-mm__pop",
|
|
5085
5105
|
role: "menu"
|
|
5086
|
-
},
|
|
5106
|
+
}, ba = {
|
|
5087
5107
|
key: 0,
|
|
5088
5108
|
class: "wm-mm__section"
|
|
5089
|
-
},
|
|
5109
|
+
}, ka = { class: "wm-mm__label" }, Ca = { class: "wm-mm__label" }, Aa = {
|
|
5090
5110
|
key: 1,
|
|
5091
5111
|
class: "wm-mm__sep"
|
|
5092
|
-
},
|
|
5093
|
-
function
|
|
5094
|
-
return c(), d("div",
|
|
5112
|
+
}, Sa = { class: "wm-mm__section" }, Ma = { class: "wm-mm__label" }, Ta = { class: "wm-mm__section" }, xa = { class: "wm-mm__label" }, Oa = { class: "wm-mm__label" };
|
|
5113
|
+
function Ra(e, t, s, r, a, n) {
|
|
5114
|
+
return c(), d("div", pa, [
|
|
5095
5115
|
l("div", {
|
|
5096
5116
|
class: "wm-mm__scrim",
|
|
5097
|
-
onClick: t[0] || (t[0] = (
|
|
5117
|
+
onClick: t[0] || (t[0] = (i) => e.$emit("close"))
|
|
5098
5118
|
}),
|
|
5099
|
-
l("div",
|
|
5100
|
-
s.canRename || s.canExport ? (c(), d("div",
|
|
5119
|
+
l("div", wa, [
|
|
5120
|
+
s.canRename || s.canExport ? (c(), d("div", ba, [
|
|
5101
5121
|
s.canRename ? (c(), d("button", {
|
|
5102
5122
|
key: 0,
|
|
5103
5123
|
type: "button",
|
|
5104
5124
|
class: "wm-mm__item",
|
|
5105
|
-
onClick: t[1] || (t[1] = (
|
|
5125
|
+
onClick: t[1] || (t[1] = (i) => n.emit("rename"))
|
|
5106
5126
|
}, [
|
|
5107
5127
|
t[6] || (t[6] = l("span", { class: "wm-mm__icon" }, [
|
|
5108
5128
|
l("svg", {
|
|
@@ -5120,13 +5140,13 @@ function Ta(e, t, s, r, i, n) {
|
|
|
5120
5140
|
l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
5121
5141
|
])
|
|
5122
5142
|
], -1)),
|
|
5123
|
-
l("span",
|
|
5143
|
+
l("span", ka, y(n.t("moreMenu.editTitle")), 1)
|
|
5124
5144
|
])) : k("", !0),
|
|
5125
5145
|
s.canExport ? (c(), d("button", {
|
|
5126
5146
|
key: 1,
|
|
5127
5147
|
type: "button",
|
|
5128
5148
|
class: "wm-mm__item",
|
|
5129
|
-
onClick: t[2] || (t[2] = (
|
|
5149
|
+
onClick: t[2] || (t[2] = (i) => n.emit("export"))
|
|
5130
5150
|
}, [
|
|
5131
5151
|
t[7] || (t[7] = l("span", { class: "wm-mm__icon" }, [
|
|
5132
5152
|
l("svg", {
|
|
@@ -5143,16 +5163,16 @@ function Ta(e, t, s, r, i, n) {
|
|
|
5143
5163
|
l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
5144
5164
|
])
|
|
5145
5165
|
], -1)),
|
|
5146
|
-
l("span",
|
|
5166
|
+
l("span", Ca, y(n.t("moreMenu.exportTranscript")), 1),
|
|
5147
5167
|
t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
5148
5168
|
])) : k("", !0)
|
|
5149
5169
|
])) : k("", !0),
|
|
5150
|
-
s.canRename || s.canExport ? (c(), d("div",
|
|
5151
|
-
l("div",
|
|
5170
|
+
s.canRename || s.canExport ? (c(), d("div", Aa)) : k("", !0),
|
|
5171
|
+
l("div", Sa, [
|
|
5152
5172
|
l("button", {
|
|
5153
5173
|
type: "button",
|
|
5154
5174
|
class: "wm-mm__item",
|
|
5155
|
-
onClick: t[3] || (t[3] = (...
|
|
5175
|
+
onClick: t[3] || (t[3] = (...i) => n.toggleSound && n.toggleSound(...i))
|
|
5156
5176
|
}, [
|
|
5157
5177
|
t[10] || (t[10] = l("span", { class: "wm-mm__icon" }, [
|
|
5158
5178
|
l("svg", {
|
|
@@ -5170,21 +5190,21 @@ function Ta(e, t, s, r, i, n) {
|
|
|
5170
5190
|
l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
5171
5191
|
])
|
|
5172
5192
|
], -1)),
|
|
5173
|
-
l("span",
|
|
5193
|
+
l("span", Ma, y(n.t("moreMenu.sound")), 1),
|
|
5174
5194
|
l("span", {
|
|
5175
|
-
class: L(["wm-mm__toggle", { "wm-mm__toggle--on":
|
|
5195
|
+
class: L(["wm-mm__toggle", { "wm-mm__toggle--on": a.soundOn }])
|
|
5176
5196
|
}, [...t[9] || (t[9] = [
|
|
5177
5197
|
l("span", { class: "wm-mm__knob" }, null, -1)
|
|
5178
5198
|
])], 2)
|
|
5179
5199
|
])
|
|
5180
5200
|
]),
|
|
5181
5201
|
t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
|
|
5182
|
-
l("div",
|
|
5202
|
+
l("div", Ta, [
|
|
5183
5203
|
s.statusUrl ? (c(), d("button", {
|
|
5184
5204
|
key: 0,
|
|
5185
5205
|
type: "button",
|
|
5186
5206
|
class: "wm-mm__item",
|
|
5187
|
-
onClick: t[4] || (t[4] = (
|
|
5207
|
+
onClick: t[4] || (t[4] = (i) => n.emit("status"))
|
|
5188
5208
|
}, [
|
|
5189
5209
|
t[11] || (t[11] = l("span", { class: "wm-mm__icon" }, [
|
|
5190
5210
|
l("svg", {
|
|
@@ -5201,13 +5221,13 @@ function Ta(e, t, s, r, i, n) {
|
|
|
5201
5221
|
l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
5202
5222
|
])
|
|
5203
5223
|
], -1)),
|
|
5204
|
-
l("span",
|
|
5224
|
+
l("span", xa, y(n.t("moreMenu.serviceStatus")), 1)
|
|
5205
5225
|
])) : k("", !0),
|
|
5206
5226
|
s.helpUrl ? (c(), d("button", {
|
|
5207
5227
|
key: 1,
|
|
5208
5228
|
type: "button",
|
|
5209
5229
|
class: "wm-mm__item",
|
|
5210
|
-
onClick: t[5] || (t[5] = (
|
|
5230
|
+
onClick: t[5] || (t[5] = (i) => n.emit("help"))
|
|
5211
5231
|
}, [
|
|
5212
5232
|
t[12] || (t[12] = l("span", { class: "wm-mm__icon" }, [
|
|
5213
5233
|
l("svg", {
|
|
@@ -5224,13 +5244,13 @@ function Ta(e, t, s, r, i, n) {
|
|
|
5224
5244
|
l("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
|
|
5225
5245
|
])
|
|
5226
5246
|
], -1)),
|
|
5227
|
-
l("span",
|
|
5247
|
+
l("span", Oa, y(n.t("moreMenu.helpCenter")), 1)
|
|
5228
5248
|
])) : k("", !0)
|
|
5229
5249
|
])
|
|
5230
5250
|
])
|
|
5231
5251
|
]);
|
|
5232
5252
|
}
|
|
5233
|
-
const
|
|
5253
|
+
const La = /* @__PURE__ */ D(va, [["render", Ra], ["__scopeId", "data-v-4cf6d578"]]), Ea = {
|
|
5234
5254
|
name: "WmRenameDialog",
|
|
5235
5255
|
inject: {
|
|
5236
5256
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5272,25 +5292,25 @@ const xa = /* @__PURE__ */ D(_a, [["render", Ta], ["__scopeId", "data-v-4cf6d578
|
|
|
5272
5292
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
5273
5293
|
}
|
|
5274
5294
|
}
|
|
5275
|
-
},
|
|
5295
|
+
}, Ba = { class: "wm-dialog" }, Ia = {
|
|
5276
5296
|
class: "wm-dialog__card",
|
|
5277
5297
|
role: "dialog",
|
|
5278
5298
|
"aria-modal": "true"
|
|
5279
|
-
},
|
|
5280
|
-
function
|
|
5281
|
-
return c(), d("div",
|
|
5299
|
+
}, Pa = { class: "wm-dialog__head" }, Da = { class: "wm-dialog__title" }, Ua = ["aria-label"], Na = { class: "wm-dialog__body" }, Fa = ["placeholder"], Ha = { class: "wm-dialog__actions" }, ja = ["disabled"];
|
|
5300
|
+
function za(e, t, s, r, a, n) {
|
|
5301
|
+
return c(), d("div", Ba, [
|
|
5282
5302
|
l("div", {
|
|
5283
5303
|
class: "wm-dialog__scrim",
|
|
5284
|
-
onClick: t[0] || (t[0] = (
|
|
5304
|
+
onClick: t[0] || (t[0] = (i) => e.$emit("close"))
|
|
5285
5305
|
}),
|
|
5286
|
-
l("div",
|
|
5287
|
-
l("div",
|
|
5288
|
-
l("div",
|
|
5306
|
+
l("div", Ia, [
|
|
5307
|
+
l("div", Pa, [
|
|
5308
|
+
l("div", Da, y(s.title || n.t("rename.title")), 1),
|
|
5289
5309
|
l("button", {
|
|
5290
5310
|
type: "button",
|
|
5291
5311
|
class: "wm-dialog__close",
|
|
5292
5312
|
"aria-label": n.t("common.close"),
|
|
5293
|
-
onClick: t[1] || (t[1] = (
|
|
5313
|
+
onClick: t[1] || (t[1] = (i) => e.$emit("close"))
|
|
5294
5314
|
}, [...t[7] || (t[7] = [
|
|
5295
5315
|
l("svg", {
|
|
5296
5316
|
width: "12",
|
|
@@ -5305,41 +5325,41 @@ function Fa(e, t, s, r, i, n) {
|
|
|
5305
5325
|
}, [
|
|
5306
5326
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5307
5327
|
], -1)
|
|
5308
|
-
])], 8,
|
|
5328
|
+
])], 8, Ua)
|
|
5309
5329
|
]),
|
|
5310
|
-
l("div",
|
|
5330
|
+
l("div", Na, [
|
|
5311
5331
|
$(l("input", {
|
|
5312
5332
|
ref: "input",
|
|
5313
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
5333
|
+
"onUpdate:modelValue": t[2] || (t[2] = (i) => a.value = i),
|
|
5314
5334
|
type: "text",
|
|
5315
5335
|
class: "wm-dialog__input",
|
|
5316
5336
|
placeholder: s.placeholder || n.t("rename.placeholder"),
|
|
5317
5337
|
maxlength: 120,
|
|
5318
5338
|
onKeydown: [
|
|
5319
|
-
t[3] || (t[3] = _e(Y((...
|
|
5320
|
-
t[4] || (t[4] = _e(Y((
|
|
5339
|
+
t[3] || (t[3] = _e(Y((...i) => n.onSubmit && n.onSubmit(...i), ["prevent"]), ["enter"])),
|
|
5340
|
+
t[4] || (t[4] = _e(Y((i) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5321
5341
|
]
|
|
5322
|
-
}, null, 40,
|
|
5323
|
-
[se,
|
|
5342
|
+
}, null, 40, Fa), [
|
|
5343
|
+
[se, a.value]
|
|
5324
5344
|
])
|
|
5325
5345
|
]),
|
|
5326
|
-
l("div",
|
|
5346
|
+
l("div", Ha, [
|
|
5327
5347
|
l("button", {
|
|
5328
5348
|
type: "button",
|
|
5329
5349
|
class: "wm-dialog__btn",
|
|
5330
|
-
onClick: t[5] || (t[5] = (
|
|
5350
|
+
onClick: t[5] || (t[5] = (i) => e.$emit("close"))
|
|
5331
5351
|
}, y(n.t("common.cancel")), 1),
|
|
5332
5352
|
l("button", {
|
|
5333
5353
|
type: "button",
|
|
5334
5354
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5335
5355
|
disabled: !n.canSubmit,
|
|
5336
|
-
onClick: t[6] || (t[6] = (...
|
|
5337
|
-
}, y(n.t("common.save")), 9,
|
|
5356
|
+
onClick: t[6] || (t[6] = (...i) => n.onSubmit && n.onSubmit(...i))
|
|
5357
|
+
}, y(n.t("common.save")), 9, ja)
|
|
5338
5358
|
])
|
|
5339
5359
|
])
|
|
5340
5360
|
]);
|
|
5341
5361
|
}
|
|
5342
|
-
const
|
|
5362
|
+
const qa = /* @__PURE__ */ D(Ea, [["render", za], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", Va = {
|
|
5343
5363
|
name: "Messenger",
|
|
5344
5364
|
components: {
|
|
5345
5365
|
Launcher: qt,
|
|
@@ -5348,11 +5368,11 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5348
5368
|
History: ms,
|
|
5349
5369
|
MessageList: ri,
|
|
5350
5370
|
Composer: Ci,
|
|
5351
|
-
InlineCallbacks:
|
|
5352
|
-
FormCard:
|
|
5353
|
-
Feedback:
|
|
5354
|
-
MoreMenu:
|
|
5355
|
-
RenameDialog:
|
|
5371
|
+
InlineCallbacks: Ri,
|
|
5372
|
+
FormCard: sa,
|
|
5373
|
+
Feedback: ya,
|
|
5374
|
+
MoreMenu: La,
|
|
5375
|
+
RenameDialog: qa
|
|
5356
5376
|
},
|
|
5357
5377
|
mixins: [
|
|
5358
5378
|
wt,
|
|
@@ -5514,9 +5534,9 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5514
5534
|
// so the choice applies immediately, before the boot round-trip
|
|
5515
5535
|
// that materializes `state.customer` has completed.
|
|
5516
5536
|
customerLanguage() {
|
|
5517
|
-
var s, r,
|
|
5537
|
+
var s, r, a, n;
|
|
5518
5538
|
const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((r = e.values) == null ? void 0 : r.language));
|
|
5519
|
-
return t || ((n = (
|
|
5539
|
+
return t || ((n = (a = this.context) == null ? void 0 : a.customer) == null ? void 0 : n.language) || "";
|
|
5520
5540
|
},
|
|
5521
5541
|
// Resolved UI language, by priority:
|
|
5522
5542
|
// 1. explicit `language` prop (consumer override)
|
|
@@ -5565,30 +5585,30 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5565
5585
|
const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
|
|
5566
5586
|
return this.allConversations.map((r) => {
|
|
5567
5587
|
var b;
|
|
5568
|
-
const
|
|
5569
|
-
let
|
|
5570
|
-
for (let v =
|
|
5571
|
-
const M =
|
|
5588
|
+
const a = e[r.id] || [], n = G(r.last_read_message_id);
|
|
5589
|
+
let i = 0, o = null;
|
|
5590
|
+
for (let v = a.length - 1; v >= 0; v--) {
|
|
5591
|
+
const M = a[v];
|
|
5572
5592
|
if (!M) continue;
|
|
5573
5593
|
if (((b = M.author) == null ? void 0 : b.type) === "user") break;
|
|
5574
5594
|
const E = G(M.id);
|
|
5575
5595
|
if (E != null) {
|
|
5576
5596
|
if (n != null && E <= n) break;
|
|
5577
|
-
t[M.id] !== 0 && (!o && M.author && (o = M.author),
|
|
5597
|
+
t[M.id] !== 0 && (!o && M.author && (o = M.author), i++);
|
|
5578
5598
|
}
|
|
5579
5599
|
}
|
|
5580
|
-
if (!
|
|
5600
|
+
if (!a.length) {
|
|
5581
5601
|
const v = G(r.last_message_id);
|
|
5582
|
-
v != null && (n == null || v > n) && (
|
|
5602
|
+
v != null && (n == null || v > n) && (i = 1, o = r.last_message_author || null);
|
|
5583
5603
|
}
|
|
5584
|
-
const f =
|
|
5604
|
+
const f = a.filter(
|
|
5585
5605
|
(v) => !((v == null ? void 0 : v.id) != null && t[v.id] === 0)
|
|
5586
5606
|
);
|
|
5587
5607
|
return {
|
|
5588
5608
|
...r,
|
|
5589
5609
|
_preview: gt(r, f),
|
|
5590
|
-
_unread:
|
|
5591
|
-
_unreadCount:
|
|
5610
|
+
_unread: i > 0,
|
|
5611
|
+
_unreadCount: i,
|
|
5592
5612
|
_lastAuthor: o
|
|
5593
5613
|
};
|
|
5594
5614
|
});
|
|
@@ -5625,17 +5645,17 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5625
5645
|
const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
|
|
5626
5646
|
for (const r of this.drawerConversations) {
|
|
5627
5647
|
if (!r._unread) continue;
|
|
5628
|
-
const
|
|
5648
|
+
const a = Ie(r, e[r.id] || []), n = r._lastAuthor, i = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (i ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (i ? this.agentAvatarUrl : null);
|
|
5629
5649
|
t.push({
|
|
5630
5650
|
convId: r.id,
|
|
5631
5651
|
preview: r._preview || this.t("notification.youHaveNewMessage"),
|
|
5632
|
-
ts:
|
|
5652
|
+
ts: a,
|
|
5633
5653
|
count: r._unreadCount || 1,
|
|
5634
5654
|
senderName: o,
|
|
5635
5655
|
senderAvatarUrl: f
|
|
5636
5656
|
});
|
|
5637
5657
|
}
|
|
5638
|
-
return t.sort((r,
|
|
5658
|
+
return t.sort((r, a) => r.ts < a.ts ? 1 : r.ts > a.ts ? -1 : 0), t;
|
|
5639
5659
|
},
|
|
5640
5660
|
// Notification cards shown in the closed-launcher stack: the unread
|
|
5641
5661
|
// threads above, minus any the user has dismissed (×) for their
|
|
@@ -5749,9 +5769,9 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5749
5769
|
var t, s, r;
|
|
5750
5770
|
if (!this.currentConv) return null;
|
|
5751
5771
|
const e = ((t = this.s.messagesByConv) == null ? void 0 : t[this.currentConv.id]) || [];
|
|
5752
|
-
for (let
|
|
5753
|
-
if (((r = (s = e[
|
|
5754
|
-
return e[
|
|
5772
|
+
for (let a = e.length - 1; a >= 0; a--)
|
|
5773
|
+
if (((r = (s = e[a]) == null ? void 0 : s.author) == null ? void 0 : r.type) === "agent_human")
|
|
5774
|
+
return e[a].author;
|
|
5755
5775
|
return null;
|
|
5756
5776
|
},
|
|
5757
5777
|
humanAgentName() {
|
|
@@ -5795,17 +5815,17 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5795
5815
|
}) : this.isWaitingHuman ? this.t("composer.agentTakingOver") : this.t("composer.placeholder");
|
|
5796
5816
|
},
|
|
5797
5817
|
displayedMessages() {
|
|
5798
|
-
var
|
|
5818
|
+
var a, n;
|
|
5799
5819
|
const e = this.currentConv;
|
|
5800
5820
|
if (!e) return [];
|
|
5801
5821
|
const t = this.welcomeRevealedAt[e.id] > 0 ? this.buildWelcomePrefix(e) : [];
|
|
5802
5822
|
if (!e._draft) {
|
|
5803
|
-
const
|
|
5804
|
-
if (!(
|
|
5823
|
+
const i = (n = (a = this.s) == null ? void 0 : a.paginationByConv) == null ? void 0 : n[e.id];
|
|
5824
|
+
if (!(i != null && i.loaded)) return t;
|
|
5805
5825
|
}
|
|
5806
|
-
const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((
|
|
5826
|
+
const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((i) => {
|
|
5807
5827
|
var o, f, b, v, M;
|
|
5808
|
-
return (
|
|
5828
|
+
return (i == null ? void 0 : i.type) === "action" && ((o = i == null ? void 0 : i.payload) == null ? void 0 : o.state) === "pending" || me(i) && !(s[i.id] > 0) ? !1 : (i == null ? void 0 : i.type) === "action" || (i == null ? void 0 : i.type) === "system" || ((f = i == null ? void 0 : i.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = i == null ? void 0 : i.payload) == null ? void 0 : b.attachments) && i.payload.attachments.length || (v = i == null ? void 0 : i.metadata) != null && v.artifact || (M = i == null ? void 0 : i.metadata) != null && M.form || Array.isArray(i == null ? void 0 : i.callbacks) && i.callbacks.some((E) => (E == null ? void 0 : E.intent) === "submit_form") ? !0 : typeof (i == null ? void 0 : i.text_md) == "string" && i.text_md.trim().length > 0;
|
|
5809
5829
|
});
|
|
5810
5830
|
return t.length ? [...t, ...r] : r;
|
|
5811
5831
|
},
|
|
@@ -5814,9 +5834,9 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5814
5834
|
// or more agent messages are queued and waiting for their reveal
|
|
5815
5835
|
// slot to fire.
|
|
5816
5836
|
streamingActive() {
|
|
5817
|
-
var s, r,
|
|
5837
|
+
var s, r, a;
|
|
5818
5838
|
const e = this.currentConv;
|
|
5819
|
-
return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((
|
|
5839
|
+
return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((a = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : a[e.id]) || []).some(
|
|
5820
5840
|
(n) => me(n) && !(this.revealedAt[n.id] > 0)
|
|
5821
5841
|
) : !1;
|
|
5822
5842
|
},
|
|
@@ -5832,13 +5852,13 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5832
5852
|
// `metadata.resolution_request` dont les callbacks ne sont pas encore
|
|
5833
5853
|
// consommés (le serveur les clear au clic) et sans clic optimiste en vol.
|
|
5834
5854
|
pendingResolution() {
|
|
5835
|
-
var t, s, r,
|
|
5855
|
+
var t, s, r, a, n;
|
|
5836
5856
|
if (!this.currentConv) return null;
|
|
5837
5857
|
const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
|
|
5838
|
-
for (let
|
|
5839
|
-
const o = e[
|
|
5858
|
+
for (let i = e.length - 1; i >= 0; i--) {
|
|
5859
|
+
const o = e[i];
|
|
5840
5860
|
if ((r = o == null ? void 0 : o.metadata) != null && r.resolution_request)
|
|
5841
|
-
return !Array.isArray(o.callbacks) || !o.callbacks.length || (n = (
|
|
5861
|
+
return !Array.isArray(o.callbacks) || !o.callbacks.length || (n = (a = this.s) == null ? void 0 : a.awaitingCallback) != null && n[o.id] ? null : o;
|
|
5842
5862
|
}
|
|
5843
5863
|
return null;
|
|
5844
5864
|
},
|
|
@@ -5863,15 +5883,15 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5863
5883
|
// de boutons. Détection par callbacks (pas de flag metadata dédié) ;
|
|
5864
5884
|
// après le clic le serveur efface les callbacks → la carte disparaît.
|
|
5865
5885
|
pendingApproval() {
|
|
5866
|
-
var t, s, r,
|
|
5886
|
+
var t, s, r, a;
|
|
5867
5887
|
if (!this.currentConv) return null;
|
|
5868
5888
|
const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
|
|
5869
5889
|
for (let n = e.length - 1; n >= 0; n--) {
|
|
5870
|
-
const
|
|
5871
|
-
if (!(!Array.isArray(
|
|
5890
|
+
const i = e[n];
|
|
5891
|
+
if (!(!Array.isArray(i == null ? void 0 : i.callbacks) || !i.callbacks.length || !i.callbacks.some(
|
|
5872
5892
|
(f) => (f == null ? void 0 : f.intent) === "approve" && (f.audience ?? "customer") === "customer"
|
|
5873
5893
|
)))
|
|
5874
|
-
return (
|
|
5894
|
+
return (a = (r = this.s) == null ? void 0 : r.awaitingCallback) != null && a[i.id] ? null : i;
|
|
5875
5895
|
}
|
|
5876
5896
|
return null;
|
|
5877
5897
|
},
|
|
@@ -5925,12 +5945,12 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5925
5945
|
const t = [];
|
|
5926
5946
|
for (const r of e) {
|
|
5927
5947
|
if (!r || typeof r != "object") continue;
|
|
5928
|
-
const
|
|
5929
|
-
if (!
|
|
5948
|
+
const a = typeof r.title == "string" ? r.title.trim() : "";
|
|
5949
|
+
if (!a) continue;
|
|
5930
5950
|
const n = typeof r.message == "string" ? r.message.trim() : "";
|
|
5931
5951
|
t.push({
|
|
5932
|
-
label:
|
|
5933
|
-
text: n ||
|
|
5952
|
+
label: a,
|
|
5953
|
+
text: n || a,
|
|
5934
5954
|
kind: "starter"
|
|
5935
5955
|
});
|
|
5936
5956
|
}
|
|
@@ -5953,13 +5973,13 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5953
5973
|
return !!this.pendingApproval || !!this.pendingResolution || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
|
|
5954
5974
|
},
|
|
5955
5975
|
dateLabel() {
|
|
5956
|
-
var s, r,
|
|
5976
|
+
var s, r, a;
|
|
5957
5977
|
const e = this.currentConv;
|
|
5958
5978
|
let t = /* @__PURE__ */ new Date();
|
|
5959
5979
|
if (e) {
|
|
5960
|
-
const
|
|
5961
|
-
if (
|
|
5962
|
-
const o = new Date(
|
|
5980
|
+
const i = ((a = (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).find((o) => o == null ? void 0 : o.created_at)) == null ? void 0 : a.created_at) || e.created_at;
|
|
5981
|
+
if (i) {
|
|
5982
|
+
const o = new Date(i);
|
|
5963
5983
|
Number.isNaN(o.getTime()) || (t = o);
|
|
5964
5984
|
}
|
|
5965
5985
|
}
|
|
@@ -5972,8 +5992,8 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5972
5992
|
// history available, nothing loading) so the loader stays inert
|
|
5973
5993
|
// until `openConversation` has populated the entry.
|
|
5974
5994
|
paginationState() {
|
|
5975
|
-
var s, r,
|
|
5976
|
-
const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (
|
|
5995
|
+
var s, r, a;
|
|
5996
|
+
const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (a = (r = this.s) == null ? void 0 : r.paginationByConv) == null ? void 0 : a[e] : null;
|
|
5977
5997
|
return {
|
|
5978
5998
|
loading: !!(t != null && t.loading),
|
|
5979
5999
|
hasMore: !!(t != null && t.nextCursor)
|
|
@@ -5988,13 +6008,13 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5988
6008
|
// ts comparison in `launcherPeeks`.
|
|
5989
6009
|
latestUnreads: {
|
|
5990
6010
|
handler(e) {
|
|
5991
|
-
const t = new Set(e.map((
|
|
6011
|
+
const t = new Set(e.map((i) => i.convId)), s = this.dismissedPeeks || {}, r = Object.keys(s);
|
|
5992
6012
|
if (!r.length) return;
|
|
5993
|
-
const
|
|
6013
|
+
const a = {};
|
|
5994
6014
|
let n = !1;
|
|
5995
|
-
for (const
|
|
5996
|
-
t.has(
|
|
5997
|
-
n && (this.dismissedPeeks =
|
|
6015
|
+
for (const i of r)
|
|
6016
|
+
t.has(i) ? a[i] = s[i] : n = !0;
|
|
6017
|
+
n && (this.dismissedPeeks = a);
|
|
5998
6018
|
},
|
|
5999
6019
|
deep: !0
|
|
6000
6020
|
},
|
|
@@ -6054,11 +6074,11 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6054
6074
|
// sinon le champ `conv.status` (convs sans messages chargés), sinon
|
|
6055
6075
|
// 'open'. Un seul point de vérité pour tout ce qui dépend du statut.
|
|
6056
6076
|
convStatus(e) {
|
|
6057
|
-
var s, r,
|
|
6077
|
+
var s, r, a, n;
|
|
6058
6078
|
if (!e) return "open";
|
|
6059
6079
|
const t = ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || [];
|
|
6060
|
-
for (let
|
|
6061
|
-
const o = (n = (
|
|
6080
|
+
for (let i = t.length - 1; i >= 0; i--) {
|
|
6081
|
+
const o = (n = (a = t[i]) == null ? void 0 : a.metadata) == null ? void 0 : n.conversation_status;
|
|
6062
6082
|
if (o) return o;
|
|
6063
6083
|
}
|
|
6064
6084
|
return e.status || "open";
|
|
@@ -6164,10 +6184,10 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6164
6184
|
this.floatRO = new ResizeObserver((s) => {
|
|
6165
6185
|
const r = s[0];
|
|
6166
6186
|
if (!r) return;
|
|
6167
|
-
const
|
|
6168
|
-
|
|
6169
|
-
var n,
|
|
6170
|
-
(
|
|
6187
|
+
const a = Math.ceil(r.contentRect.height + 8);
|
|
6188
|
+
a !== this.floatHeight && (this.floatHeight = a, this.$nextTick(() => {
|
|
6189
|
+
var n, i;
|
|
6190
|
+
(i = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || i.call(n);
|
|
6171
6191
|
}));
|
|
6172
6192
|
}), this.floatRO.observe(t);
|
|
6173
6193
|
}
|
|
@@ -6227,7 +6247,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6227
6247
|
if (!e) return;
|
|
6228
6248
|
const t = e.getBoundingClientRect();
|
|
6229
6249
|
if (!t.width || !t.height) return;
|
|
6230
|
-
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16,
|
|
6250
|
+
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, a = Math.ceil(t.width), n = Math.ceil(t.height), i = (z = (S = this.$el) == null ? void 0 : S.querySelector) == null ? void 0 : z.call(S, ".wm-launcher"), o = (U = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : U.call(T, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
|
|
6231
6251
|
let b = null;
|
|
6232
6252
|
if (f) {
|
|
6233
6253
|
const x = f.getBoundingClientRect();
|
|
@@ -6239,10 +6259,10 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6239
6259
|
};
|
|
6240
6260
|
}
|
|
6241
6261
|
this.notifyParentResize("closed", {
|
|
6242
|
-
width:
|
|
6262
|
+
width: a + r,
|
|
6243
6263
|
height: n + r,
|
|
6244
|
-
launcherWidth: (
|
|
6245
|
-
launcherHeight: (
|
|
6264
|
+
launcherWidth: (i == null ? void 0 : i.offsetWidth) || null,
|
|
6265
|
+
launcherHeight: (i == null ? void 0 : i.offsetHeight) || null,
|
|
6246
6266
|
launcherHovered: this.launcherHovered,
|
|
6247
6267
|
peek: b,
|
|
6248
6268
|
peekHovered: this.launcherHovered && s
|
|
@@ -6372,10 +6392,10 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6372
6392
|
...this.welcomeRevealedAt,
|
|
6373
6393
|
[e]: 0
|
|
6374
6394
|
};
|
|
6375
|
-
const
|
|
6376
|
-
|
|
6377
|
-
Math.max(
|
|
6378
|
-
), o =
|
|
6395
|
+
const a = this.revealPacing, n = t.trim().length, i = Math.min(
|
|
6396
|
+
a.maxTypingMs,
|
|
6397
|
+
Math.max(a.minTypingMs, n * a.msPerChar)
|
|
6398
|
+
), o = a.firstRevealDelayMs + i, f = setTimeout(() => {
|
|
6379
6399
|
this.welcomeRevealedAt = {
|
|
6380
6400
|
...this.welcomeRevealedAt,
|
|
6381
6401
|
[e]: Date.now()
|
|
@@ -6470,12 +6490,12 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6470
6490
|
return;
|
|
6471
6491
|
const s = t.id, r = this.pendingAttachments.slice();
|
|
6472
6492
|
this.pendingAttachments = [], this.unreadAnchorId = null, this.unreadBoundaryTs = "";
|
|
6473
|
-
const
|
|
6474
|
-
const { previewUrl:
|
|
6493
|
+
const a = r.map((n) => {
|
|
6494
|
+
const { previewUrl: i, ...o } = n;
|
|
6475
6495
|
return o;
|
|
6476
6496
|
});
|
|
6477
6497
|
await this.store.send(s, e, {
|
|
6478
|
-
attachments:
|
|
6498
|
+
attachments: a.length ? a : void 0
|
|
6479
6499
|
});
|
|
6480
6500
|
},
|
|
6481
6501
|
async onSuggestion(e) {
|
|
@@ -6536,9 +6556,9 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6536
6556
|
var t, s;
|
|
6537
6557
|
if (!(!e || !this.transport))
|
|
6538
6558
|
try {
|
|
6539
|
-
const r = await this.transport.uploadAttachment(e),
|
|
6559
|
+
const r = await this.transport.uploadAttachment(e), a = (r == null ? void 0 : r.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((r == null ? void 0 : r.mime_type) || "").toLowerCase().startsWith("image/");
|
|
6540
6560
|
let n = null;
|
|
6541
|
-
if (
|
|
6561
|
+
if (a)
|
|
6542
6562
|
try {
|
|
6543
6563
|
n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, r.path)) || null;
|
|
6544
6564
|
} catch {
|
|
@@ -6618,45 +6638,45 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6618
6638
|
}
|
|
6619
6639
|
}
|
|
6620
6640
|
}
|
|
6621
|
-
},
|
|
6641
|
+
}, Ka = {
|
|
6622
6642
|
key: 0,
|
|
6623
6643
|
class: "wm-loading",
|
|
6624
6644
|
"aria-busy": "true",
|
|
6625
6645
|
"aria-live": "polite"
|
|
6626
|
-
},
|
|
6646
|
+
}, Wa = ["aria-label"], $a = {
|
|
6627
6647
|
key: 0,
|
|
6628
6648
|
class: "wm-state"
|
|
6629
|
-
},
|
|
6649
|
+
}, Ga = { class: "wm-state__err" }, Ya = { class: "wm-state__errTitle" }, Ja = { class: "wm-state__errSub" }, Xa = { class: "wm-bottom" }, Qa = {
|
|
6630
6650
|
key: 0,
|
|
6631
6651
|
ref: "floatEl",
|
|
6632
6652
|
class: "wm-float"
|
|
6633
|
-
},
|
|
6653
|
+
}, Za = {
|
|
6634
6654
|
key: 1,
|
|
6635
6655
|
class: "wm-actionWait",
|
|
6636
6656
|
role: "status",
|
|
6637
6657
|
"aria-live": "polite"
|
|
6638
|
-
},
|
|
6658
|
+
}, eo = { class: "wm-actionWait__lbl" }, to = {
|
|
6639
6659
|
key: 2,
|
|
6640
6660
|
class: "wm-attached"
|
|
6641
|
-
},
|
|
6661
|
+
}, no = ["src", "alt"], so = {
|
|
6642
6662
|
key: 1,
|
|
6643
6663
|
class: "wm-attached__file"
|
|
6644
|
-
},
|
|
6664
|
+
}, ro = { class: "wm-attached__fileMeta" }, io = { class: "wm-attached__fileName" }, ao = {
|
|
6645
6665
|
key: 0,
|
|
6646
6666
|
class: "wm-attached__fileSize"
|
|
6647
|
-
},
|
|
6667
|
+
}, oo = ["aria-label", "onClick"], lo = {
|
|
6648
6668
|
key: 3,
|
|
6649
6669
|
class: "wm-ended",
|
|
6650
6670
|
role: "status",
|
|
6651
6671
|
"aria-live": "polite"
|
|
6652
|
-
},
|
|
6653
|
-
function
|
|
6654
|
-
const
|
|
6672
|
+
}, co = { class: "wm-ended__lbl" };
|
|
6673
|
+
function uo(e, t, s, r, a, n) {
|
|
6674
|
+
const i = P("Launcher"), o = P("Header"), f = P("History"), b = P("Onboarding"), v = P("MessageList"), M = P("InlineCallbacks"), E = P("FormCard"), S = P("Feedback"), z = P("Composer"), T = P("MoreMenu"), U = P("RenameDialog");
|
|
6655
6675
|
return c(), d("div", {
|
|
6656
6676
|
class: L(["wm-root", `wm-root--${s.displayMode}`]),
|
|
6657
6677
|
style: j(n.rootStyle)
|
|
6658
6678
|
}, [
|
|
6659
|
-
!
|
|
6679
|
+
!a.isOpen && !n.isEmbedded ? (c(), I(i, {
|
|
6660
6680
|
key: 0,
|
|
6661
6681
|
"unread-count": n.unreadCount,
|
|
6662
6682
|
peeks: n.launcherPeeks,
|
|
@@ -6664,19 +6684,19 @@ function oo(e, t, s, r, i, n) {
|
|
|
6664
6684
|
onDismiss: n.dismissPeek,
|
|
6665
6685
|
onHover: n.onLauncherHover
|
|
6666
6686
|
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
|
|
6667
|
-
|
|
6687
|
+
a.isOpen || n.isEmbedded ? (c(), d("section", {
|
|
6668
6688
|
key: 1,
|
|
6669
6689
|
class: L([
|
|
6670
6690
|
"wm-panel",
|
|
6671
6691
|
`wm-panel--${s.displayMode}`,
|
|
6672
6692
|
{ "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
|
|
6673
6693
|
]),
|
|
6674
|
-
style: j(
|
|
6694
|
+
style: j(a.floatHeight ? { "--wm-float-h": a.floatHeight + "px" } : null),
|
|
6675
6695
|
role: "dialog",
|
|
6676
6696
|
"aria-label": "Messenger",
|
|
6677
6697
|
onClick: t[7] || (t[7] = (...x) => n.onPanelClick && n.onPanelClick(...x))
|
|
6678
6698
|
}, [
|
|
6679
|
-
!n.ready && !n.error ? (c(), d("div",
|
|
6699
|
+
!n.ready && !n.error ? (c(), d("div", Ka, [
|
|
6680
6700
|
n.isEmbedded ? k("", !0) : (c(), d("button", {
|
|
6681
6701
|
key: 0,
|
|
6682
6702
|
type: "button",
|
|
@@ -6697,7 +6717,7 @@ function oo(e, t, s, r, i, n) {
|
|
|
6697
6717
|
}, [
|
|
6698
6718
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6699
6719
|
], -1)
|
|
6700
|
-
])], 8,
|
|
6720
|
+
])], 8, Wa)),
|
|
6701
6721
|
t[9] || (t[9] = l("div", {
|
|
6702
6722
|
class: "wm-loading__spinner",
|
|
6703
6723
|
"aria-hidden": "true"
|
|
@@ -6710,15 +6730,15 @@ function oo(e, t, s, r, i, n) {
|
|
|
6710
6730
|
"show-identity": !!n.currentConv,
|
|
6711
6731
|
"show-back": n.canBack,
|
|
6712
6732
|
"show-close": !n.isEmbedded,
|
|
6713
|
-
"more-active":
|
|
6733
|
+
"more-active": a.moreOpen,
|
|
6714
6734
|
"agent-name": n.agentName,
|
|
6715
6735
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6716
6736
|
onBack: n.goHome,
|
|
6717
6737
|
onMore: n.toggleMore,
|
|
6718
6738
|
onClose: n.close
|
|
6719
6739
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6720
|
-
n.error ? (c(), d("div",
|
|
6721
|
-
l("div",
|
|
6740
|
+
n.error ? (c(), d("div", $a, [
|
|
6741
|
+
l("div", Ga, [
|
|
6722
6742
|
t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
|
|
6723
6743
|
l("svg", {
|
|
6724
6744
|
width: "14",
|
|
@@ -6735,11 +6755,11 @@ function oo(e, t, s, r, i, n) {
|
|
|
6735
6755
|
])
|
|
6736
6756
|
], -1)),
|
|
6737
6757
|
l("div", null, [
|
|
6738
|
-
l("div",
|
|
6739
|
-
l("div",
|
|
6758
|
+
l("div", Ya, y(n.t("error.connectionFailed")), 1),
|
|
6759
|
+
l("div", Ja, y(n.error), 1)
|
|
6740
6760
|
])
|
|
6741
6761
|
])
|
|
6742
|
-
])) : !n.currentConv &&
|
|
6762
|
+
])) : !n.currentConv && a.showHistory ? (c(), I(f, {
|
|
6743
6763
|
key: 1,
|
|
6744
6764
|
threads: n.openThreads,
|
|
6745
6765
|
onResume: n.onDrawerPick
|
|
@@ -6758,8 +6778,8 @@ function oo(e, t, s, r, i, n) {
|
|
|
6758
6778
|
"ai-agent-avatar-url": n.agentAvatarUrl,
|
|
6759
6779
|
onLoadMore: n.onLoadMore
|
|
6760
6780
|
}, 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"]),
|
|
6761
|
-
l("div",
|
|
6762
|
-
n.floatVisible ? (c(), d("div",
|
|
6781
|
+
l("div", Xa, [
|
|
6782
|
+
n.floatVisible ? (c(), d("div", Qa, [
|
|
6763
6783
|
n.pendingApproval ? (c(), I(M, {
|
|
6764
6784
|
key: `appr-${n.pendingApproval.id}`,
|
|
6765
6785
|
variant: "buttons",
|
|
@@ -6778,8 +6798,8 @@ function oo(e, t, s, r, i, n) {
|
|
|
6778
6798
|
onSubmit: n.onFormSubmit
|
|
6779
6799
|
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), I(S, {
|
|
6780
6800
|
key: 3,
|
|
6781
|
-
busy:
|
|
6782
|
-
done: !!(n.currentConv &&
|
|
6801
|
+
busy: a.feedbackBusy,
|
|
6802
|
+
done: !!(n.currentConv && a.feedbackDone[n.currentConv.id]),
|
|
6783
6803
|
onSubmit: n.onFeedback
|
|
6784
6804
|
}, null, 8, ["busy", "done", "onSubmit"])) : (c(), I(M, {
|
|
6785
6805
|
key: 4,
|
|
@@ -6787,17 +6807,17 @@ function oo(e, t, s, r, i, n) {
|
|
|
6787
6807
|
onSelect: n.onSuggestion
|
|
6788
6808
|
}, null, 8, ["items", "onSelect"]))
|
|
6789
6809
|
], 512)) : k("", !0),
|
|
6790
|
-
n.actionInFlight ? (c(), d("div",
|
|
6810
|
+
n.actionInFlight ? (c(), d("div", Za, [
|
|
6791
6811
|
t[11] || (t[11] = l("span", {
|
|
6792
6812
|
class: "wm-actionWait__spinner",
|
|
6793
6813
|
"aria-hidden": "true"
|
|
6794
6814
|
}, null, -1)),
|
|
6795
|
-
l("span",
|
|
6815
|
+
l("span", eo, y(n.t("action.inProgress", {
|
|
6796
6816
|
name: n.actionInFlightName
|
|
6797
6817
|
})), 1)
|
|
6798
6818
|
])) : k("", !0),
|
|
6799
|
-
|
|
6800
|
-
(c(!0), d(B, null, N(
|
|
6819
|
+
a.pendingAttachments.length ? (c(), d("div", to, [
|
|
6820
|
+
(c(!0), d(B, null, N(a.pendingAttachments, (x, q) => (c(), d("div", {
|
|
6801
6821
|
key: x.path || q,
|
|
6802
6822
|
class: "wm-attached__item"
|
|
6803
6823
|
}, [
|
|
@@ -6806,7 +6826,7 @@ function oo(e, t, s, r, i, n) {
|
|
|
6806
6826
|
class: "wm-attached__thumb",
|
|
6807
6827
|
src: x.previewUrl,
|
|
6808
6828
|
alt: x.name
|
|
6809
|
-
}, null, 8,
|
|
6829
|
+
}, null, 8, no)) : (c(), d("div", so, [
|
|
6810
6830
|
t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
|
|
6811
6831
|
l("svg", {
|
|
6812
6832
|
width: "16",
|
|
@@ -6823,9 +6843,9 @@ function oo(e, t, s, r, i, n) {
|
|
|
6823
6843
|
l("path", { d: "M14 2v6h6" })
|
|
6824
6844
|
])
|
|
6825
6845
|
], -1)),
|
|
6826
|
-
l("span",
|
|
6827
|
-
l("span",
|
|
6828
|
-
n.formatAttachmentSize(x.size_bytes) ? (c(), d("span",
|
|
6846
|
+
l("span", ro, [
|
|
6847
|
+
l("span", io, y(x.name), 1),
|
|
6848
|
+
n.formatAttachmentSize(x.size_bytes) ? (c(), d("span", ao, y(n.formatAttachmentSize(
|
|
6829
6849
|
x.size_bytes
|
|
6830
6850
|
)), 1)) : k("", !0)
|
|
6831
6851
|
])
|
|
@@ -6849,11 +6869,11 @@ function oo(e, t, s, r, i, n) {
|
|
|
6849
6869
|
}, [
|
|
6850
6870
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6851
6871
|
], -1)
|
|
6852
|
-
])], 8,
|
|
6872
|
+
])], 8, oo)
|
|
6853
6873
|
]))), 128))
|
|
6854
6874
|
])) : k("", !0),
|
|
6855
|
-
n.endedBlockVisible ? (c(), d("div",
|
|
6856
|
-
l("span",
|
|
6875
|
+
n.endedBlockVisible ? (c(), d("div", lo, [
|
|
6876
|
+
l("span", co, y(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
|
|
6857
6877
|
l("button", {
|
|
6858
6878
|
type: "button",
|
|
6859
6879
|
class: "wm-ended__btn",
|
|
@@ -6862,8 +6882,8 @@ function oo(e, t, s, r, i, n) {
|
|
|
6862
6882
|
])) : n.actionInFlight ? k("", !0) : (c(), I(z, {
|
|
6863
6883
|
key: 4,
|
|
6864
6884
|
ref: "composer",
|
|
6865
|
-
modelValue:
|
|
6866
|
-
"onUpdate:modelValue": t[3] || (t[3] = (x) =>
|
|
6885
|
+
modelValue: a.draft,
|
|
6886
|
+
"onUpdate:modelValue": t[3] || (t[3] = (x) => a.draft = x),
|
|
6867
6887
|
placeholder: n.composerPlaceholder,
|
|
6868
6888
|
"attach-label": n.t("composer.attachFile"),
|
|
6869
6889
|
"display-mode": s.displayMode,
|
|
@@ -6871,22 +6891,22 @@ function oo(e, t, s, r, i, n) {
|
|
|
6871
6891
|
onAttach: n.onAttach
|
|
6872
6892
|
}, null, 8, ["modelValue", "placeholder", "attach-label", "display-mode", "onSend", "onAttach"]))
|
|
6873
6893
|
]),
|
|
6874
|
-
|
|
6894
|
+
a.moreOpen ? (c(), I(T, {
|
|
6875
6895
|
key: 0,
|
|
6876
6896
|
"can-rename": !!n.currentConv && !n.currentConv._draft,
|
|
6877
6897
|
"can-export": !!n.currentConv && !n.currentConv._draft,
|
|
6878
6898
|
"sound-enabled": e.soundEnabled,
|
|
6879
6899
|
"status-url": n.statusUrl,
|
|
6880
6900
|
"help-url": n.helpUrl,
|
|
6881
|
-
onClose: t[4] || (t[4] = (x) =>
|
|
6901
|
+
onClose: t[4] || (t[4] = (x) => a.moreOpen = !1),
|
|
6882
6902
|
onSoundToggle: e.onSoundToggle,
|
|
6883
6903
|
onAction: n.onMoreAction
|
|
6884
6904
|
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0),
|
|
6885
|
-
|
|
6905
|
+
a.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), I(U, {
|
|
6886
6906
|
key: 1,
|
|
6887
6907
|
"initial-value": n.currentConv.name || "",
|
|
6888
6908
|
title: n.t("rename.dialogTitle"),
|
|
6889
|
-
onClose: t[5] || (t[5] = (x) =>
|
|
6909
|
+
onClose: t[5] || (t[5] = (x) => a.renameDialogOpen = !1),
|
|
6890
6910
|
onSubmit: n.onRenameSubmit
|
|
6891
6911
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : k("", !0)
|
|
6892
6912
|
], 64)) : (c(), I(b, {
|
|
@@ -6897,20 +6917,20 @@ function oo(e, t, s, r, i, n) {
|
|
|
6897
6917
|
"default-icon-url": n.defaultIconUrl,
|
|
6898
6918
|
"quick-links": n.quickLinks,
|
|
6899
6919
|
"open-threads": n.openThreads,
|
|
6900
|
-
busy:
|
|
6920
|
+
busy: a.busy,
|
|
6901
6921
|
onStart: n.startConv,
|
|
6902
6922
|
onSelect: n.onQuickLink,
|
|
6903
6923
|
onResume: n.onDrawerPick,
|
|
6904
|
-
onViewHistory: t[1] || (t[1] = (x) =>
|
|
6924
|
+
onViewHistory: t[1] || (t[1] = (x) => a.showHistory = !0)
|
|
6905
6925
|
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
6906
|
-
|
|
6926
|
+
a.moreOpen && !n.currentConv ? (c(), I(T, {
|
|
6907
6927
|
key: 4,
|
|
6908
6928
|
"can-rename": !1,
|
|
6909
6929
|
"can-export": !1,
|
|
6910
6930
|
"sound-enabled": e.soundEnabled,
|
|
6911
6931
|
"status-url": n.statusUrl,
|
|
6912
6932
|
"help-url": n.helpUrl,
|
|
6913
|
-
onClose: t[6] || (t[6] = (x) =>
|
|
6933
|
+
onClose: t[6] || (t[6] = (x) => a.moreOpen = !1),
|
|
6914
6934
|
onSoundToggle: e.onSoundToggle,
|
|
6915
6935
|
onAction: n.onMoreAction
|
|
6916
6936
|
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0)
|
|
@@ -6918,7 +6938,7 @@ function oo(e, t, s, r, i, n) {
|
|
|
6918
6938
|
], 6)) : k("", !0)
|
|
6919
6939
|
], 6);
|
|
6920
6940
|
}
|
|
6921
|
-
const
|
|
6941
|
+
const fo = /* @__PURE__ */ D(Va, [["render", uo], ["__scopeId", "data-v-caa7f955"]]), _o = "0.6.2";
|
|
6922
6942
|
export {
|
|
6923
6943
|
he as AIAvatar,
|
|
6924
6944
|
be as AVATAR_COLORS,
|
|
@@ -6932,22 +6952,22 @@ export {
|
|
|
6932
6952
|
Ci as Composer,
|
|
6933
6953
|
at as DEFAULT_BASE_URL,
|
|
6934
6954
|
ue as DEFAULT_LANGUAGE,
|
|
6935
|
-
|
|
6936
|
-
|
|
6955
|
+
ya as Feedback,
|
|
6956
|
+
sa as FormCard,
|
|
6937
6957
|
_n as Header,
|
|
6938
6958
|
ye as HumanAvatar,
|
|
6939
|
-
|
|
6959
|
+
Ri as InlineCallbacks,
|
|
6940
6960
|
qt as Launcher,
|
|
6941
6961
|
Oe as MEDIA_RECORDER_SUPPORTED,
|
|
6942
6962
|
ri as MessageList,
|
|
6943
|
-
|
|
6944
|
-
|
|
6963
|
+
fo as Messenger,
|
|
6964
|
+
La as MoreMenu,
|
|
6945
6965
|
Jn as Onboarding,
|
|
6946
6966
|
ge as SCREEN_CAPTURE_SUPPORTED,
|
|
6947
6967
|
mt as SUPPORTED_LANGUAGES,
|
|
6948
6968
|
tn as TeamAvatars,
|
|
6949
6969
|
Lr as Typing,
|
|
6950
|
-
|
|
6970
|
+
_o as VERSION,
|
|
6951
6971
|
Me as avatarColor,
|
|
6952
6972
|
Te as avatarInitials,
|
|
6953
6973
|
ai as captureScreenshotFile,
|
|
@@ -6956,9 +6976,9 @@ export {
|
|
|
6956
6976
|
F as createTranslator,
|
|
6957
6977
|
et as createTransport,
|
|
6958
6978
|
re as dateLocale,
|
|
6959
|
-
|
|
6979
|
+
fo as default,
|
|
6960
6980
|
Ce as formatTime,
|
|
6961
|
-
|
|
6981
|
+
ho as guessAttachmentKind,
|
|
6962
6982
|
ii as pickRecorderMime,
|
|
6963
6983
|
qe as renderInlineMarkdown,
|
|
6964
6984
|
_t as renderMarkdown,
|