@_solaris/messenger-widget 0.6.8 → 0.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +5 -5
- package/dist/messenger.cjs +4 -4
- package/dist/messenger.js +727 -664
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as We, openBlock as c, createElementBlock as d, normalizeStyle as F, normalizeClass as
|
|
1
|
+
import { reactive as We, openBlock as c, createElementBlock as d, normalizeStyle as F, normalizeClass as x, toDisplayString as v, resolveComponent as P, createVNode as K, Transition as Ae, withCtx as Se, Fragment as E, renderList as N, withKeys as _e, withModifiers as G, createElementVNode as l, createCommentVNode as b, createBlock as B, resolveDynamicComponent as Te, mergeProps as je, withDirectives as $, vModelText as ee, createTextVNode as Me, renderSlot as $e, vModelCheckbox as Ge, vModelSelect as Ye, markRaw as Ie } from "vue";
|
|
2
2
|
const Je = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -43,8 +43,8 @@ function tt(e) {
|
|
|
43
43
|
p && p.forEach((L) => {
|
|
44
44
|
try {
|
|
45
45
|
L(g);
|
|
46
|
-
} catch (
|
|
47
|
-
console.error("[transport] listener", u,
|
|
46
|
+
} catch (R) {
|
|
47
|
+
console.error("[transport] listener", u, R);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
@@ -72,10 +72,10 @@ function tt(e) {
|
|
|
72
72
|
body: p !== void 0 ? JSON.stringify(p) : void 0
|
|
73
73
|
});
|
|
74
74
|
if (!L.ok) {
|
|
75
|
-
const
|
|
76
|
-
`HTTP ${L.status} ${u} ${g} :: ${(
|
|
75
|
+
const R = await o(L), V = new Error(
|
|
76
|
+
`HTTP ${L.status} ${u} ${g} :: ${(R == null ? void 0 : R.error) || L.statusText}`
|
|
77
77
|
);
|
|
78
|
-
throw V.status = L.status, V.body =
|
|
78
|
+
throw V.status = L.status, V.body = R, V;
|
|
79
79
|
}
|
|
80
80
|
return L.status === 204 ? null : L.json();
|
|
81
81
|
}
|
|
@@ -119,7 +119,7 @@ function tt(e) {
|
|
|
119
119
|
}
|
|
120
120
|
const p = await g.json();
|
|
121
121
|
t.userId = p.external_id;
|
|
122
|
-
const [L,
|
|
122
|
+
const [L, R] = await Promise.all([
|
|
123
123
|
fetch(
|
|
124
124
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
125
125
|
{ credentials: "include" }
|
|
@@ -133,11 +133,11 @@ function tt(e) {
|
|
|
133
133
|
return W.json();
|
|
134
134
|
}),
|
|
135
135
|
a("GET", "/customers/me")
|
|
136
|
-
]), V = { config: L, customer: (
|
|
136
|
+
]), V = { config: L, customer: (R == null ? void 0 : R.customer) ?? null };
|
|
137
137
|
return t.lastBootstrap = V, await k(), typeof document < "u" && (t.visibilityHandler = _, document.addEventListener(
|
|
138
138
|
"visibilitychange",
|
|
139
139
|
t.visibilityHandler
|
|
140
|
-
)),
|
|
140
|
+
)), h(), V;
|
|
141
141
|
}
|
|
142
142
|
async function k() {
|
|
143
143
|
try {
|
|
@@ -185,7 +185,7 @@ function tt(e) {
|
|
|
185
185
|
{ message_id: g }
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function O(u, g = {}) {
|
|
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 L = p.toString() ? `?${p.toString()}` : "";
|
|
@@ -217,11 +217,11 @@ function tt(e) {
|
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
219
|
async function ie(u) {
|
|
220
|
-
const g = u.name || "attachment", p = u.type || "application/octet-stream", L = u.size || 0,
|
|
220
|
+
const g = u.name || "attachment", p = u.type || "application/octet-stream", L = u.size || 0, R = await a("POST", "/attachments", {
|
|
221
221
|
mime_type: p,
|
|
222
222
|
size_bytes: L,
|
|
223
223
|
name: g
|
|
224
|
-
}), V = await fetch(
|
|
224
|
+
}), V = await fetch(R.upload_url, {
|
|
225
225
|
method: "PUT",
|
|
226
226
|
headers: { "Content-Type": p },
|
|
227
227
|
body: u
|
|
@@ -230,7 +230,7 @@ function tt(e) {
|
|
|
230
230
|
throw new Error(`HTTP ${V.status} PUT signed upload`);
|
|
231
231
|
return {
|
|
232
232
|
type: st(p),
|
|
233
|
-
path:
|
|
233
|
+
path: R.path,
|
|
234
234
|
mime_type: p,
|
|
235
235
|
size_bytes: L
|
|
236
236
|
};
|
|
@@ -277,12 +277,12 @@ function tt(e) {
|
|
|
277
277
|
}
|
|
278
278
|
function ye(u) {
|
|
279
279
|
const g = t.panelOpen;
|
|
280
|
-
t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), Q()) : te(), g !== t.panelOpen &&
|
|
280
|
+
t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), Q()) : te(), g !== t.panelOpen && h();
|
|
281
281
|
}
|
|
282
282
|
async function pe() {
|
|
283
283
|
try {
|
|
284
|
-
const u = await I(), g = u.reduce((L,
|
|
285
|
-
const V =
|
|
284
|
+
const u = await I(), g = u.reduce((L, R) => {
|
|
285
|
+
const V = R == null ? void 0 : R.last_message_at;
|
|
286
286
|
return V && (!L || V > L) ? V : L;
|
|
287
287
|
}, null);
|
|
288
288
|
g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), te());
|
|
@@ -290,29 +290,29 @@ function tt(e) {
|
|
|
290
290
|
console.error("[transport] poll failed", u);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
if (
|
|
293
|
+
function h() {
|
|
294
|
+
if (m(), typeof document < "u" && document.hidden) return;
|
|
295
295
|
const u = t.panelOpen ? Qe : Xe;
|
|
296
296
|
t.pollTimer = setInterval(pe, u);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function m() {
|
|
299
299
|
t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
|
|
300
300
|
}
|
|
301
301
|
function _() {
|
|
302
302
|
if (document.hidden)
|
|
303
303
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
304
|
-
t.hiddenGraceTimer = null, document.hidden && (
|
|
304
|
+
t.hiddenGraceTimer = null, document.hidden && (m(), Z(), i("paused"));
|
|
305
305
|
}, et);
|
|
306
306
|
else {
|
|
307
307
|
if (t.hiddenGraceTimer) {
|
|
308
308
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
|
-
i("idle"),
|
|
311
|
+
i("idle"), h(), t.panelOpen && Q();
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
function w() {
|
|
315
|
-
|
|
315
|
+
m(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Z(), t.visibilityHandler && (document.removeEventListener(
|
|
316
316
|
"visibilitychange",
|
|
317
317
|
t.visibilityHandler
|
|
318
318
|
), t.visibilityHandler = null), t.started = !1;
|
|
@@ -345,7 +345,7 @@ function tt(e) {
|
|
|
345
345
|
getConversation: z,
|
|
346
346
|
patchConversation: M,
|
|
347
347
|
markConversationRead: D,
|
|
348
|
-
listMessages:
|
|
348
|
+
listMessages: O,
|
|
349
349
|
postMessage: q,
|
|
350
350
|
postCallback: J,
|
|
351
351
|
uploadAttachment: ie,
|
|
@@ -407,48 +407,48 @@ function it(e) {
|
|
|
407
407
|
connection: "idle"
|
|
408
408
|
}), s = [];
|
|
409
409
|
s.push(
|
|
410
|
-
e.on("connection", (
|
|
411
|
-
t.connection =
|
|
410
|
+
e.on("connection", (h) => {
|
|
411
|
+
t.connection = h;
|
|
412
412
|
})
|
|
413
413
|
), s.push(
|
|
414
|
-
e.on("message", (
|
|
415
|
-
const
|
|
416
|
-
!
|
|
414
|
+
e.on("message", (h) => {
|
|
415
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
|
|
416
|
+
!m || !(_ != null && _.id) || (X(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], Z(m, _.created_at));
|
|
417
417
|
})
|
|
418
418
|
), s.push(
|
|
419
|
-
e.on("message_stream", (
|
|
420
|
-
const
|
|
421
|
-
!
|
|
419
|
+
e.on("message_stream", (h) => {
|
|
420
|
+
const m = h == null ? void 0 : h.message_id, _ = h == null ? void 0 : h.token;
|
|
421
|
+
!m || typeof _ != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + _);
|
|
422
422
|
})
|
|
423
423
|
), s.push(
|
|
424
|
-
e.on("conversation_updated", (
|
|
425
|
-
const
|
|
426
|
-
if (!
|
|
427
|
-
const w = t.conversations.findIndex((A) => A.id ===
|
|
424
|
+
e.on("conversation_updated", (h) => {
|
|
425
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.changes;
|
|
426
|
+
if (!m || !_) return;
|
|
427
|
+
const w = t.conversations.findIndex((A) => A.id === m);
|
|
428
428
|
w !== -1 && (t.conversations[w] = {
|
|
429
429
|
...t.conversations[w],
|
|
430
430
|
..._
|
|
431
431
|
});
|
|
432
432
|
})
|
|
433
433
|
), s.push(
|
|
434
|
-
e.on("config_updated", (
|
|
435
|
-
|
|
434
|
+
e.on("config_updated", (h) => {
|
|
435
|
+
h != null && h.config && (t.config = h.config);
|
|
436
436
|
})
|
|
437
437
|
), s.push(
|
|
438
|
-
e.on("action_status", (
|
|
439
|
-
const
|
|
440
|
-
if (!
|
|
441
|
-
const A = t.runningActionsByConv[
|
|
442
|
-
|
|
438
|
+
e.on("action_status", (h) => {
|
|
439
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.action_id, w = h == null ? void 0 : h.action_name;
|
|
440
|
+
if (!m || !_) return;
|
|
441
|
+
const A = t.runningActionsByConv[m] || {};
|
|
442
|
+
h.state === "running" ? (A[_] = w || _, t.runningActionsByConv[m] = { ...A }) : h.state === "done" && (delete A[_], t.runningActionsByConv[m] = { ...A });
|
|
443
443
|
})
|
|
444
444
|
), s.push(
|
|
445
|
-
e.on("activity", (
|
|
446
|
-
Array.isArray(
|
|
445
|
+
e.on("activity", (h) => {
|
|
446
|
+
Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
|
|
447
447
|
})
|
|
448
448
|
);
|
|
449
|
-
async function r(
|
|
449
|
+
async function r(h) {
|
|
450
450
|
try {
|
|
451
|
-
const
|
|
451
|
+
const m = new Promise(
|
|
452
452
|
(w, A) => setTimeout(
|
|
453
453
|
() => A(
|
|
454
454
|
new Error(
|
|
@@ -458,61 +458,61 @@ function it(e) {
|
|
|
458
458
|
15e3
|
|
459
459
|
)
|
|
460
460
|
), _ = await Promise.race([
|
|
461
|
-
e.start(
|
|
462
|
-
|
|
461
|
+
e.start(h),
|
|
462
|
+
m
|
|
463
463
|
]);
|
|
464
464
|
t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
|
|
465
465
|
e.listConversations(),
|
|
466
|
-
|
|
466
|
+
m
|
|
467
467
|
]), t.ready = !0;
|
|
468
|
-
} catch (
|
|
469
|
-
console.error("[store] start failed",
|
|
468
|
+
} catch (m) {
|
|
469
|
+
console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
function i() {
|
|
473
|
-
for (const
|
|
473
|
+
for (const h of s)
|
|
474
474
|
try {
|
|
475
|
-
|
|
475
|
+
h();
|
|
476
476
|
} catch {
|
|
477
477
|
}
|
|
478
478
|
e.stop();
|
|
479
479
|
}
|
|
480
|
-
async function n(
|
|
481
|
-
const
|
|
482
|
-
if (!
|
|
480
|
+
async function n(h) {
|
|
481
|
+
const m = ye(h);
|
|
482
|
+
if (!m) return t.customer;
|
|
483
483
|
try {
|
|
484
|
-
const _ = await e.patchCustomer(
|
|
484
|
+
const _ = await e.patchCustomer(m);
|
|
485
485
|
_ && (t.customer = _);
|
|
486
486
|
} catch (_) {
|
|
487
487
|
console.error("[store] applyCustomer failed", _);
|
|
488
488
|
}
|
|
489
489
|
return t.customer;
|
|
490
490
|
}
|
|
491
|
-
async function a(
|
|
492
|
-
const
|
|
493
|
-
return _ === -1 ? t.conversations = [
|
|
491
|
+
async function a(h = {}) {
|
|
492
|
+
const m = await e.createConversation(h), _ = t.conversations.findIndex((w) => w.id === m.id);
|
|
493
|
+
return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
|
|
494
494
|
}
|
|
495
495
|
const o = 50;
|
|
496
|
-
async function f(
|
|
497
|
-
const
|
|
498
|
-
if (!(
|
|
499
|
-
y(
|
|
496
|
+
async function f(h) {
|
|
497
|
+
const m = t.paginationByConv[h];
|
|
498
|
+
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
499
|
+
y(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
500
500
|
try {
|
|
501
|
-
const _ = await e.listMessages(
|
|
501
|
+
const _ = await e.listMessages(h, {
|
|
502
502
|
limit: o
|
|
503
|
-
}), w = (_ == null ? void 0 : _.messages) ?? [], A = t.messagesByConv[
|
|
503
|
+
}), w = (_ == null ? void 0 : _.messages) ?? [], A = t.messagesByConv[h] || [], C = /* @__PURE__ */ new Set();
|
|
504
504
|
for (const g of w)
|
|
505
505
|
(g == null ? void 0 : g.id) != null && C.add(`id:${String(g.id)}`), g != null && g.client_msg_id && C.add(`c:${g.client_msg_id}`);
|
|
506
506
|
const u = A.filter((g) => !((g == null ? void 0 : g.id) != null && C.has(`id:${String(g.id)}`) || g != null && g.client_msg_id && C.has(`c:${g.client_msg_id}`)));
|
|
507
|
-
t.messagesByConv[
|
|
507
|
+
t.messagesByConv[h] = [...w, ...u].sort(
|
|
508
508
|
te
|
|
509
|
-
), y(
|
|
509
|
+
), y(h, {
|
|
510
510
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
511
511
|
loading: !1,
|
|
512
512
|
loaded: !0
|
|
513
513
|
});
|
|
514
514
|
} catch (_) {
|
|
515
|
-
console.error("[store] openConversation failed", _), y(
|
|
515
|
+
console.error("[store] openConversation failed", _), y(h, {
|
|
516
516
|
nextCursor: null,
|
|
517
517
|
loading: !1,
|
|
518
518
|
loaded: !1
|
|
@@ -520,67 +520,67 @@ function it(e) {
|
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
async function k(
|
|
523
|
+
async function k(h) {
|
|
524
524
|
var A;
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
const w = (A = (t.messagesByConv[
|
|
525
|
+
const m = t.paginationByConv[h];
|
|
526
|
+
if (!m || m.loading || !m.nextCursor) return;
|
|
527
|
+
const w = (A = (t.messagesByConv[h] || []).find((C) => C == null ? void 0 : C.created_at)) == null ? void 0 : A.created_at;
|
|
528
528
|
if (w) {
|
|
529
|
-
y(
|
|
529
|
+
y(h, { ...m, loading: !0 });
|
|
530
530
|
try {
|
|
531
|
-
const C = await e.listMessages(
|
|
531
|
+
const C = await e.listMessages(h, {
|
|
532
532
|
before: w,
|
|
533
533
|
limit: o
|
|
534
|
-
}), u = (C == null ? void 0 : C.messages) ?? [], g = t.messagesByConv[
|
|
535
|
-
for (const
|
|
536
|
-
(
|
|
537
|
-
const L = u.filter((
|
|
538
|
-
t.messagesByConv[
|
|
534
|
+
}), u = (C == null ? void 0 : C.messages) ?? [], g = t.messagesByConv[h] || [], p = /* @__PURE__ */ new Set();
|
|
535
|
+
for (const R of g)
|
|
536
|
+
(R == null ? void 0 : R.id) != null && p.add(`id:${String(R.id)}`), R != null && R.client_msg_id && p.add(`c:${R.client_msg_id}`);
|
|
537
|
+
const L = u.filter((R) => !((R == null ? void 0 : R.id) != null && p.has(`id:${String(R.id)}`) || R != null && R.client_msg_id && p.has(`c:${R.client_msg_id}`)));
|
|
538
|
+
t.messagesByConv[h] = [...L, ...g], y(h, {
|
|
539
539
|
nextCursor: (C == null ? void 0 : C.next_cursor) ?? null,
|
|
540
540
|
loading: !1,
|
|
541
541
|
loaded: !0
|
|
542
542
|
});
|
|
543
543
|
} catch (C) {
|
|
544
|
-
console.error("[store] loadMore failed", C), y(
|
|
544
|
+
console.error("[store] loadMore failed", C), y(h, { ...m, loading: !1 });
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function y(
|
|
549
|
-
t.paginationByConv = { ...t.paginationByConv, [
|
|
548
|
+
function y(h, m) {
|
|
549
|
+
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
550
550
|
}
|
|
551
|
-
async function T(
|
|
552
|
-
const _ = await e.patchConversation(
|
|
551
|
+
async function T(h, m) {
|
|
552
|
+
const _ = await e.patchConversation(h, m), w = t.conversations.findIndex((A) => A.id === h);
|
|
553
553
|
w !== -1 && (t.conversations[w] = _);
|
|
554
554
|
}
|
|
555
|
-
async function I(
|
|
556
|
-
if (!
|
|
557
|
-
const
|
|
555
|
+
async function I(h) {
|
|
556
|
+
if (!h) return [];
|
|
557
|
+
const m = t.messagesByConv[h] || [];
|
|
558
558
|
let _ = "";
|
|
559
|
-
for (const w of
|
|
559
|
+
for (const w of m)
|
|
560
560
|
w != null && w.created_at && w.created_at > _ && (_ = w.created_at);
|
|
561
561
|
try {
|
|
562
562
|
const w = await e.listMessages(
|
|
563
|
-
|
|
563
|
+
h,
|
|
564
564
|
_ ? { since: _ } : {}
|
|
565
565
|
), A = (w == null ? void 0 : w.messages) || [];
|
|
566
566
|
if (!A.length) return [];
|
|
567
567
|
const C = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
568
|
-
for (const p of
|
|
568
|
+
for (const p of m)
|
|
569
569
|
(p == null ? void 0 : p.id) != null && C.add(String(p.id)), p != null && p.client_msg_id && u.add(p.client_msg_id);
|
|
570
570
|
const g = [];
|
|
571
571
|
for (const p of A) {
|
|
572
572
|
const L = (p == null ? void 0 : p.id) != null && C.has(String(p.id)) || (p == null ? void 0 : p.client_msg_id) && u.has(p.client_msg_id);
|
|
573
|
-
X(
|
|
573
|
+
X(h, p), L || g.push(p);
|
|
574
574
|
}
|
|
575
575
|
return g;
|
|
576
576
|
} catch (w) {
|
|
577
577
|
return console.error("[store] fetchSinceLast failed", w), [];
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
async function S(
|
|
581
|
-
if (!(!
|
|
580
|
+
async function S(h, m) {
|
|
581
|
+
if (!(!h || m == null))
|
|
582
582
|
try {
|
|
583
|
-
const _ = await e.markConversationRead(
|
|
583
|
+
const _ = await e.markConversationRead(h, m), w = (_ == null ? void 0 : _.last_read_message_id) ?? m, A = t.conversations.findIndex((C) => (C == null ? void 0 : C.id) === h);
|
|
584
584
|
A !== -1 && (t.conversations[A] = {
|
|
585
585
|
...t.conversations[A],
|
|
586
586
|
last_read_message_id: w
|
|
@@ -589,14 +589,14 @@ function it(e) {
|
|
|
589
589
|
console.error("[store] markConversationRead failed", _);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
async function z(
|
|
592
|
+
async function z(h, m, { attachments: _, metadata: w } = {}) {
|
|
593
593
|
var L;
|
|
594
|
-
const A = (
|
|
595
|
-
if (!
|
|
596
|
-
const u = rt(), g = pe(
|
|
594
|
+
const A = (m || "").trim(), C = Array.isArray(_) && _.length > 0;
|
|
595
|
+
if (!h || !A && !C) return;
|
|
596
|
+
const u = rt(), g = pe(h), p = {
|
|
597
597
|
id: u,
|
|
598
598
|
client_msg_id: u,
|
|
599
|
-
conversation_id:
|
|
599
|
+
conversation_id: h,
|
|
600
600
|
type: "content",
|
|
601
601
|
text_md: A,
|
|
602
602
|
author: {
|
|
@@ -609,42 +609,42 @@ function it(e) {
|
|
|
609
609
|
...C ? { payload: { type: "content", attachments: _ } } : {},
|
|
610
610
|
...w && typeof w == "object" ? { metadata: w } : {}
|
|
611
611
|
};
|
|
612
|
-
X(
|
|
612
|
+
X(h, p);
|
|
613
613
|
try {
|
|
614
|
-
await e.postMessage(
|
|
614
|
+
await e.postMessage(h, {
|
|
615
615
|
client_msg_id: u,
|
|
616
616
|
text_md: A,
|
|
617
617
|
created_at: g,
|
|
618
618
|
...C ? { attachments: _ } : {},
|
|
619
619
|
...w && typeof w == "object" ? { metadata: w } : {}
|
|
620
620
|
});
|
|
621
|
-
} catch (
|
|
622
|
-
console.error("[store] send failed",
|
|
621
|
+
} catch (R) {
|
|
622
|
+
console.error("[store] send failed", R), oe(h, u, {
|
|
623
623
|
_failed: !0,
|
|
624
624
|
_pending: !1
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
-
async function M(
|
|
629
|
-
|
|
628
|
+
async function M(h, m, _) {
|
|
629
|
+
h != null && (t.awaitingCallback[h] = !0);
|
|
630
630
|
try {
|
|
631
|
-
await e.postCallback(
|
|
631
|
+
await e.postCallback(h, m, _);
|
|
632
632
|
} catch (w) {
|
|
633
|
-
console.error("[store] callback failed", w),
|
|
633
|
+
console.error("[store] callback failed", w), h != null && delete t.awaitingCallback[h];
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
const D = /* @__PURE__ */ new Map();
|
|
637
|
-
async function
|
|
638
|
-
if (!
|
|
639
|
-
const
|
|
640
|
-
if (
|
|
641
|
-
const _ =
|
|
642
|
-
if (!_ || _ - Date.now() > 6e4) return
|
|
637
|
+
async function O(h) {
|
|
638
|
+
if (!h) return null;
|
|
639
|
+
const m = D.get(h);
|
|
640
|
+
if (m != null && m.url) {
|
|
641
|
+
const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
642
|
+
if (!_ || _ - Date.now() > 6e4) return m.url;
|
|
643
643
|
}
|
|
644
644
|
try {
|
|
645
|
-
const _ = await e.signAttachment(
|
|
645
|
+
const _ = await e.signAttachment(h);
|
|
646
646
|
if (_ != null && _.signed_url)
|
|
647
|
-
return D.set(
|
|
647
|
+
return D.set(h, {
|
|
648
648
|
url: _.signed_url,
|
|
649
649
|
expires_at: _.expires_at
|
|
650
650
|
}), _.signed_url;
|
|
@@ -653,22 +653,22 @@ function it(e) {
|
|
|
653
653
|
}
|
|
654
654
|
return null;
|
|
655
655
|
}
|
|
656
|
-
async function q(
|
|
657
|
-
const w = t.conversations.find((u) => u.id ===
|
|
656
|
+
async function q(h, { rating: m, comment: _ } = {}) {
|
|
657
|
+
const w = t.conversations.find((u) => u.id === h), C = {
|
|
658
658
|
...(w == null ? void 0 : w.metadata) || {},
|
|
659
659
|
feedback: {
|
|
660
|
-
rating:
|
|
660
|
+
rating: m,
|
|
661
661
|
comment: _ || null,
|
|
662
662
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
663
663
|
}
|
|
664
664
|
};
|
|
665
|
-
await T(
|
|
665
|
+
await T(h, { metadata: C });
|
|
666
666
|
}
|
|
667
|
-
function J(
|
|
667
|
+
function J(h) {
|
|
668
668
|
var _, w;
|
|
669
|
-
const
|
|
670
|
-
for (let A =
|
|
671
|
-
const C =
|
|
669
|
+
const m = t.messagesByConv[h] || [];
|
|
670
|
+
for (let A = m.length - 1; A >= 0; A--) {
|
|
671
|
+
const C = m[A];
|
|
672
672
|
if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user" || (C == null ? void 0 : C.type) === "action" && ((w = C == null ? void 0 : C.payload) == null ? void 0 : w.state) === "pending")
|
|
673
673
|
return null;
|
|
674
674
|
const u = Array.isArray(C == null ? void 0 : C.callbacks) ? C.callbacks.find((g) => (g == null ? void 0 : g.intent) === "submit_form") : null;
|
|
@@ -685,19 +685,19 @@ function it(e) {
|
|
|
685
685
|
}
|
|
686
686
|
return null;
|
|
687
687
|
}
|
|
688
|
-
function ie(
|
|
689
|
-
const
|
|
690
|
-
if (!
|
|
691
|
-
const _ = Object.keys(
|
|
688
|
+
function ie(h) {
|
|
689
|
+
const m = t.runningActionsByConv[h];
|
|
690
|
+
if (!m) return null;
|
|
691
|
+
const _ = Object.keys(m);
|
|
692
692
|
if (_.length === 0) return null;
|
|
693
693
|
const w = _[0];
|
|
694
|
-
return { id: w, payload: { name:
|
|
694
|
+
return { id: w, payload: { name: m[w] } };
|
|
695
695
|
}
|
|
696
|
-
function ae(
|
|
696
|
+
function ae(h) {
|
|
697
697
|
var _, w, A;
|
|
698
|
-
const
|
|
699
|
-
for (let C =
|
|
700
|
-
const u =
|
|
698
|
+
const m = t.messagesByConv[h] || [];
|
|
699
|
+
for (let C = m.length - 1; C >= 0; C--) {
|
|
700
|
+
const u = m[C];
|
|
701
701
|
if (((_ = u == null ? void 0 : u.author) == null ? void 0 : _.type) === "user") return [];
|
|
702
702
|
if ((u == null ? void 0 : u.type) === "action" && ((w = u == null ? void 0 : u.payload) == null ? void 0 : w.state) === "pending")
|
|
703
703
|
return [];
|
|
@@ -711,57 +711,57 @@ function it(e) {
|
|
|
711
711
|
}
|
|
712
712
|
return [];
|
|
713
713
|
}
|
|
714
|
-
function X(
|
|
714
|
+
function X(h, m) {
|
|
715
715
|
var C;
|
|
716
|
-
const _ = t.messagesByConv[
|
|
716
|
+
const _ = t.messagesByConv[h] || [];
|
|
717
717
|
let w = -1;
|
|
718
|
-
|
|
719
|
-
(u) => (u == null ? void 0 : u.client_msg_id) && u.client_msg_id ===
|
|
720
|
-
)), w === -1 && (
|
|
718
|
+
m != null && m.client_msg_id && (w = _.findIndex(
|
|
719
|
+
(u) => (u == null ? void 0 : u.client_msg_id) && u.client_msg_id === m.client_msg_id
|
|
720
|
+
)), w === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (w = _.findIndex((u) => Q(u == null ? void 0 : u.id, m.id)));
|
|
721
721
|
let A;
|
|
722
|
-
w === -1 ? A = [..._,
|
|
722
|
+
w === -1 ? A = [..._, m].sort(te) : (A = _.slice(), A[w] = {
|
|
723
723
|
..._[w],
|
|
724
|
-
...
|
|
724
|
+
...m,
|
|
725
725
|
_pending: !1,
|
|
726
726
|
_failed: !1
|
|
727
|
-
}), t.messagesByConv[
|
|
727
|
+
}), t.messagesByConv[h] = A, (m == null ? void 0 : m.type) === "action" && ((C = m == null ? void 0 : m.payload) != null && C.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
|
|
728
728
|
}
|
|
729
|
-
function Q(
|
|
730
|
-
return
|
|
729
|
+
function Q(h, m) {
|
|
730
|
+
return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
|
|
731
731
|
}
|
|
732
|
-
function oe(
|
|
733
|
-
const w = t.messagesByConv[
|
|
732
|
+
function oe(h, m, _) {
|
|
733
|
+
const w = t.messagesByConv[h];
|
|
734
734
|
if (!w) return;
|
|
735
|
-
const A = w.findIndex((u) => u.id ===
|
|
735
|
+
const A = w.findIndex((u) => u.id === m);
|
|
736
736
|
if (A === -1) return;
|
|
737
737
|
const C = w.slice();
|
|
738
|
-
C[A] = { ...w[A], ..._ }, t.messagesByConv[
|
|
738
|
+
C[A] = { ...w[A], ..._ }, t.messagesByConv[h] = C;
|
|
739
739
|
}
|
|
740
|
-
function Z(
|
|
741
|
-
const _ = t.conversations.findIndex((A) => A.id ===
|
|
740
|
+
function Z(h, m) {
|
|
741
|
+
const _ = t.conversations.findIndex((A) => A.id === h);
|
|
742
742
|
if (_ === -1) return;
|
|
743
743
|
const w = t.conversations[_];
|
|
744
|
-
if (
|
|
744
|
+
if (m && (!w.last_message_at || m > w.last_message_at)) {
|
|
745
745
|
const A = t.conversations.slice();
|
|
746
|
-
A[_] = { ...w, last_message_at:
|
|
746
|
+
A[_] = { ...w, last_message_at: m }, A.sort(
|
|
747
747
|
(C, u) => (u.last_message_at || "").localeCompare(C.last_message_at || "")
|
|
748
748
|
), t.conversations = A;
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
function te(
|
|
752
|
-
return (
|
|
751
|
+
function te(h, m) {
|
|
752
|
+
return (h.created_at || "").localeCompare(m.created_at || "");
|
|
753
753
|
}
|
|
754
|
-
function ye(
|
|
755
|
-
if (!
|
|
756
|
-
const
|
|
757
|
-
for (const [w, A] of Object.entries(
|
|
758
|
-
A !== void 0 && (w === "name" || w === "email" || w === "language" ? A != null && String(A).trim() !== "" && (
|
|
759
|
-
return Object.keys(_).length && (
|
|
754
|
+
function ye(h) {
|
|
755
|
+
if (!h || typeof h != "object") return null;
|
|
756
|
+
const m = {}, _ = {};
|
|
757
|
+
for (const [w, A] of Object.entries(h))
|
|
758
|
+
A !== void 0 && (w === "name" || w === "email" || w === "language" ? A != null && String(A).trim() !== "" && (m[w] = A) : (w === "values" || w === "metadata") && A && typeof A == "object" ? Object.assign(_, A) : _[w] = A);
|
|
759
|
+
return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
|
|
760
760
|
}
|
|
761
|
-
function pe(
|
|
762
|
-
const
|
|
761
|
+
function pe(h) {
|
|
762
|
+
const m = t.messagesByConv[h] || [];
|
|
763
763
|
let _ = "";
|
|
764
|
-
for (const C of
|
|
764
|
+
for (const C of m)
|
|
765
765
|
C != null && C.created_at && C.created_at > _ && (_ = C.created_at);
|
|
766
766
|
const w = (/* @__PURE__ */ new Date()).toISOString();
|
|
767
767
|
return !_ || w > _ ? w : new Date(Date.parse(_) + 1).toISOString();
|
|
@@ -779,7 +779,7 @@ function it(e) {
|
|
|
779
779
|
markConversationRead: S,
|
|
780
780
|
send: z,
|
|
781
781
|
clickCallback: M,
|
|
782
|
-
signAttachment:
|
|
782
|
+
signAttachment: O,
|
|
783
783
|
submitFeedback: q,
|
|
784
784
|
getActionInFlight: ie,
|
|
785
785
|
getLatestSuggestions: ae,
|
|
@@ -882,7 +882,7 @@ function Ee(e) {
|
|
|
882
882
|
}
|
|
883
883
|
return t.protocol === "https:" || t.protocol === "http:" || t.protocol === "data:" && /^data:image\//i.test(e) ? e : null;
|
|
884
884
|
}
|
|
885
|
-
const ue = "fr",
|
|
885
|
+
const ue = "fr", ht = ["fr", "en"], Be = { fr: "fr-FR", en: "en-US" }, ke = {
|
|
886
886
|
fr: {
|
|
887
887
|
// ── Common ───────────────────────────────────────────────────────
|
|
888
888
|
"common.newConversation": "Nouvelle conversation",
|
|
@@ -1159,7 +1159,7 @@ I reply within seconds.`,
|
|
|
1159
1159
|
function Re(e) {
|
|
1160
1160
|
if (typeof e != "string") return ue;
|
|
1161
1161
|
const t = e.trim().toLowerCase().slice(0, 2);
|
|
1162
|
-
return
|
|
1162
|
+
return ht.includes(t) ? t : ue;
|
|
1163
1163
|
}
|
|
1164
1164
|
function re(e) {
|
|
1165
1165
|
return Be[Re(e)] || Be[ue];
|
|
@@ -1182,7 +1182,7 @@ function Pe(e, t) {
|
|
|
1182
1182
|
function ze(e, t, s) {
|
|
1183
1183
|
return Array.isArray(t) ? t.map((r) => Pe(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Pe(e, String(t));
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function mt(e, t, s = H()) {
|
|
1186
1186
|
if (!e || !t) return "";
|
|
1187
1187
|
const r = Array.isArray(e.fields) ? e.fields : [], i = [];
|
|
1188
1188
|
for (const n of r) {
|
|
@@ -1306,7 +1306,7 @@ function _t(e) {
|
|
|
1306
1306
|
}
|
|
1307
1307
|
return i;
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function he(e) {
|
|
1310
1310
|
var s;
|
|
1311
1311
|
const t = (s = e == null ? void 0 : e.author) == null ? void 0 : s.type;
|
|
1312
1312
|
return t === "agent_ia" || t === "agent_human";
|
|
@@ -1477,7 +1477,7 @@ const wt = {
|
|
|
1477
1477
|
// panel or switched threads during the typing dwell.
|
|
1478
1478
|
onMessageRevealed(e, t) {
|
|
1479
1479
|
var i;
|
|
1480
|
-
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !
|
|
1480
|
+
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !he(e)) return;
|
|
1481
1481
|
const s = typeof document < "u" && document.hidden;
|
|
1482
1482
|
this.isOpen && !s && ((i = this.currentConv) == null ? void 0 : i.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
|
|
1483
1483
|
},
|
|
@@ -1707,7 +1707,7 @@ const wt = {
|
|
|
1707
1707
|
const s = Date.now(), r = { ...this.revealedAt };
|
|
1708
1708
|
for (const n of e) {
|
|
1709
1709
|
if ((n == null ? void 0 : n.id) == null || r[n.id] !== void 0) continue;
|
|
1710
|
-
if (!
|
|
1710
|
+
if (!he(n)) {
|
|
1711
1711
|
r[n.id] = s;
|
|
1712
1712
|
continue;
|
|
1713
1713
|
}
|
|
@@ -1743,7 +1743,7 @@ const wt = {
|
|
|
1743
1743
|
paceLiveMessage(e, t) {
|
|
1744
1744
|
var o;
|
|
1745
1745
|
if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
|
|
1746
|
-
if (!
|
|
1746
|
+
if (!he(e)) {
|
|
1747
1747
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1748
1748
|
return;
|
|
1749
1749
|
}
|
|
@@ -1840,7 +1840,7 @@ const U = (e, t) => {
|
|
|
1840
1840
|
}, Tt = ["src", "alt"];
|
|
1841
1841
|
function Mt(e, t, s, r, i, n) {
|
|
1842
1842
|
return c(), d("div", {
|
|
1843
|
-
class:
|
|
1843
|
+
class: x(["wm-huav", { "wm-huav--tail": s.tail }]),
|
|
1844
1844
|
style: F({
|
|
1845
1845
|
width: s.size + "px",
|
|
1846
1846
|
height: s.size + "px",
|
|
@@ -1898,7 +1898,7 @@ function zt(e, t, s, r, i, n) {
|
|
|
1898
1898
|
default: Se(() => [
|
|
1899
1899
|
n.visiblePeeks.length ? (c(), d("div", {
|
|
1900
1900
|
key: 0,
|
|
1901
|
-
class:
|
|
1901
|
+
class: x(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
|
|
1902
1902
|
}, [
|
|
1903
1903
|
(c(!0), d(E, null, N(n.visiblePeeks, (o, f) => (c(), d("div", {
|
|
1904
1904
|
key: o.convId,
|
|
@@ -2033,7 +2033,7 @@ const qt = /* @__PURE__ */ U(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
|
|
|
2033
2033
|
}, Wt = ["src", "alt"], $t = ["width", "height"];
|
|
2034
2034
|
function Gt(e, t, s, r, i, n) {
|
|
2035
2035
|
return c(), d("div", {
|
|
2036
|
-
class:
|
|
2036
|
+
class: x(["wm-aiav", { "wm-aiav--tail": s.tail }]),
|
|
2037
2037
|
style: F({
|
|
2038
2038
|
width: s.size + "px",
|
|
2039
2039
|
height: s.size + "px",
|
|
@@ -2042,7 +2042,7 @@ function Gt(e, t, s, r, i, n) {
|
|
|
2042
2042
|
}, [
|
|
2043
2043
|
s.pulse ? (c(), d("div", Kt)) : b("", !0),
|
|
2044
2044
|
l("div", {
|
|
2045
|
-
class:
|
|
2045
|
+
class: x(["wm-aiav__inner", {
|
|
2046
2046
|
"wm-aiav__inner--glow": s.pulse,
|
|
2047
2047
|
"wm-aiav__inner--img": !!s.imageUrl,
|
|
2048
2048
|
"wm-aiav__inner--initials": !s.imageUrl && !!n.initials
|
|
@@ -2089,7 +2089,7 @@ function Gt(e, t, s, r, i, n) {
|
|
|
2089
2089
|
], 6)
|
|
2090
2090
|
], 6);
|
|
2091
2091
|
}
|
|
2092
|
-
const
|
|
2092
|
+
const me = /* @__PURE__ */ U(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
|
|
2093
2093
|
name: "WmTeamAvatars",
|
|
2094
2094
|
props: {
|
|
2095
2095
|
members: { type: Array, default: () => [] },
|
|
@@ -2145,7 +2145,7 @@ function en(e, t, s, r, i, n) {
|
|
|
2145
2145
|
}
|
|
2146
2146
|
const tn = /* @__PURE__ */ U(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
|
|
2147
2147
|
name: "WmHeader",
|
|
2148
|
-
components: { AIAvatar:
|
|
2148
|
+
components: { AIAvatar: me, TeamAvatars: tn },
|
|
2149
2149
|
inject: {
|
|
2150
2150
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
2151
2151
|
// translator when the component is used standalone (no provider).
|
|
@@ -2188,7 +2188,7 @@ const tn = /* @__PURE__ */ U(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
|
|
|
2188
2188
|
}, on = { class: "wm-header__avatar" }, ln = { class: "wm-header__main" }, cn = { class: "wm-header__title" }, dn = {
|
|
2189
2189
|
key: 3,
|
|
2190
2190
|
class: "wm-header__fill"
|
|
2191
|
-
}, un = { class: "wm-header__actions" },
|
|
2191
|
+
}, un = { class: "wm-header__actions" }, hn = ["aria-label", "title"], mn = ["aria-label", "title"];
|
|
2192
2192
|
function fn(e, t, s, r, i, n) {
|
|
2193
2193
|
const a = P("AIAvatar"), o = P("TeamAvatars");
|
|
2194
2194
|
return c(), d("div", sn, [
|
|
@@ -2234,7 +2234,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2234
2234
|
s.showMore ? (c(), d("button", {
|
|
2235
2235
|
key: 0,
|
|
2236
2236
|
type: "button",
|
|
2237
|
-
class:
|
|
2237
|
+
class: x(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
|
|
2238
2238
|
"aria-label": n.t("header.moreOptions"),
|
|
2239
2239
|
title: n.t("header.moreOptions"),
|
|
2240
2240
|
onClick: t[1] || (t[1] = (f) => e.$emit("more"))
|
|
@@ -2262,7 +2262,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2262
2262
|
r: "1.6"
|
|
2263
2263
|
})
|
|
2264
2264
|
], -1)
|
|
2265
|
-
])], 10,
|
|
2265
|
+
])], 10, hn)) : b("", !0),
|
|
2266
2266
|
s.showClose ? (c(), d("button", {
|
|
2267
2267
|
key: 1,
|
|
2268
2268
|
type: "button",
|
|
@@ -2284,7 +2284,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2284
2284
|
}, [
|
|
2285
2285
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2286
2286
|
], -1)
|
|
2287
|
-
])], 8,
|
|
2287
|
+
])], 8, mn)) : b("", !0)
|
|
2288
2288
|
])
|
|
2289
2289
|
]);
|
|
2290
2290
|
}
|
|
@@ -2296,7 +2296,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2296
2296
|
link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
|
|
2297
2297
|
}, gn = {
|
|
2298
2298
|
name: "WmOnboarding",
|
|
2299
|
-
components: { AIAvatar:
|
|
2299
|
+
components: { AIAvatar: me, HumanAvatar: ve },
|
|
2300
2300
|
inject: {
|
|
2301
2301
|
// Translator + resolved-language getter shared by the Messenger
|
|
2302
2302
|
// shell. The language getter feeds `formatTs` (relative date
|
|
@@ -2313,17 +2313,31 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2313
2313
|
coverImageUrl: { type: String, default: null },
|
|
2314
2314
|
quickLinks: { type: Array, default: () => [] },
|
|
2315
2315
|
openThreads: { type: Array, default: () => [] },
|
|
2316
|
-
busy: { type: Boolean, default: !1 }
|
|
2316
|
+
busy: { type: Boolean, default: !1 },
|
|
2317
|
+
// Flipped on by the shell when the user starts a conversation from
|
|
2318
|
+
// the input. Triggers the launch choreography (cf. `runLaunch`).
|
|
2319
|
+
launching: { type: Boolean, default: !1 }
|
|
2317
2320
|
},
|
|
2318
|
-
emits: ["start", "select", "resume", "view-history"],
|
|
2321
|
+
emits: ["start", "launched", "select", "resume", "view-history"],
|
|
2319
2322
|
data() {
|
|
2320
2323
|
return {
|
|
2324
|
+
// Launch animation phase: 'idle' → 'fade' (everything but the
|
|
2325
|
+
// input fades out) → 'slide' (the input glides down to the
|
|
2326
|
+
// composer slot). Drives the `wm-onb--*` classes.
|
|
2327
|
+
launchPhase: "idle",
|
|
2328
|
+
// One-shot guard so `launched` is emitted exactly once.
|
|
2329
|
+
launchDone: !1,
|
|
2321
2330
|
// First-message draft typed straight on the home screen. On
|
|
2322
2331
|
// submit it's emitted with `start` so the conversation opens
|
|
2323
2332
|
// with this message already on its way.
|
|
2324
2333
|
starterText: ""
|
|
2325
2334
|
};
|
|
2326
2335
|
},
|
|
2336
|
+
watch: {
|
|
2337
|
+
launching(e) {
|
|
2338
|
+
e && this.runLaunch();
|
|
2339
|
+
}
|
|
2340
|
+
},
|
|
2327
2341
|
computed: {
|
|
2328
2342
|
// Gate the send button: needs non-blank text and no in-flight
|
|
2329
2343
|
// conversation creation.
|
|
@@ -2354,14 +2368,45 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2354
2368
|
}
|
|
2355
2369
|
},
|
|
2356
2370
|
methods: {
|
|
2357
|
-
//
|
|
2358
|
-
//
|
|
2359
|
-
//
|
|
2360
|
-
// the
|
|
2371
|
+
// Hand the typed message to the shell, which kicks off the launch
|
|
2372
|
+
// (it flips our `launching` prop → `runLaunch`). We keep the field
|
|
2373
|
+
// value: it stays visible in the input as it slides into the
|
|
2374
|
+
// composer slot, masking the hand-off to the real composer.
|
|
2361
2375
|
submitStarter() {
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2376
|
+
this.canStart && this.$emit("start", this.starterText.trim());
|
|
2377
|
+
},
|
|
2378
|
+
// Launch choreography, in two beats:
|
|
2379
|
+
// 1. 'fade' — hero, alerts and quick-link buttons fade out,
|
|
2380
|
+
// leaving a white panel with just the input pill.
|
|
2381
|
+
// 2. 'slide' — the input pill (now pulled out of flow, pinned to
|
|
2382
|
+
// the bottom composer slot) glides down into place
|
|
2383
|
+
// via a FLIP transform.
|
|
2384
|
+
// When the slide settles we emit `launched`; the shell then swaps
|
|
2385
|
+
// in the real conversation (composer landing exactly where the
|
|
2386
|
+
// input stopped) and fades the chat in.
|
|
2387
|
+
async runLaunch() {
|
|
2388
|
+
const e = this.$refs.starterForm, t = typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2389
|
+
if (!e || t) {
|
|
2390
|
+
this.launchPhase = "fade", await this.wait(t ? 120 : 0), this.finishLaunch();
|
|
2391
|
+
return;
|
|
2392
|
+
}
|
|
2393
|
+
this.launchPhase = "fade", await this.wait(230);
|
|
2394
|
+
const s = e.getBoundingClientRect();
|
|
2395
|
+
this.launchPhase = "slide", await this.$nextTick();
|
|
2396
|
+
const r = e.getBoundingClientRect(), i = s.left - r.left, n = s.top - r.top;
|
|
2397
|
+
e.style.transition = "none", e.style.transform = `translate(${i}px, ${n}px)`, e.offsetWidth, e.style.transition = "transform 0.34s cubic-bezier(0.32, 0.72, 0, 1)", e.style.transform = "translate(0, 0)";
|
|
2398
|
+
const a = () => {
|
|
2399
|
+
e.removeEventListener("transitionend", a), this.finishLaunch();
|
|
2400
|
+
};
|
|
2401
|
+
e.addEventListener("transitionend", a), this.wait(420).then(() => this.finishLaunch());
|
|
2402
|
+
},
|
|
2403
|
+
// Emit `launched` exactly once, however we got here (transitionend,
|
|
2404
|
+
// safety timeout, or the reduced-motion shortcut).
|
|
2405
|
+
finishLaunch() {
|
|
2406
|
+
this.launchDone || (this.launchDone = !0, this.$emit("launched"));
|
|
2407
|
+
},
|
|
2408
|
+
wait(e) {
|
|
2409
|
+
return new Promise((t) => window.setTimeout(t, e));
|
|
2365
2410
|
},
|
|
2366
2411
|
iconPath(e) {
|
|
2367
2412
|
return Ne[e] || Ne.link;
|
|
@@ -2446,7 +2491,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2446
2491
|
});
|
|
2447
2492
|
}
|
|
2448
2493
|
}
|
|
2449
|
-
}, vn =
|
|
2494
|
+
}, vn = ["aria-label"], yn = {
|
|
2450
2495
|
key: 1,
|
|
2451
2496
|
class: "wm-onb__hero-deco",
|
|
2452
2497
|
width: "180",
|
|
@@ -2454,19 +2499,19 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2454
2499
|
viewBox: "0 0 180 180",
|
|
2455
2500
|
fill: "none",
|
|
2456
2501
|
"aria-hidden": "true"
|
|
2457
|
-
},
|
|
2502
|
+
}, pn = { class: "wm-onb__hero-text" }, wn = { class: "wm-onb__title" }, bn = { class: "wm-onb__sub" }, kn = {
|
|
2458
2503
|
key: 0,
|
|
2459
2504
|
class: "wm-onb__alertList"
|
|
2460
|
-
},
|
|
2505
|
+
}, Cn = ["onClick"], An = {
|
|
2461
2506
|
key: 0,
|
|
2462
2507
|
class: "wm-onb__defaultAvatar"
|
|
2463
|
-
},
|
|
2508
|
+
}, Sn = ["aria-label"], Tn = { class: "wm-onb__alert-body" }, Mn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
|
|
2464
2509
|
key: 0,
|
|
2465
2510
|
class: "wm-onb__alert-sender"
|
|
2466
|
-
},
|
|
2511
|
+
}, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
|
|
2467
2512
|
key: 0,
|
|
2468
2513
|
class: "wm-onb__alert-time"
|
|
2469
|
-
},
|
|
2514
|
+
}, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["placeholder", "disabled", "aria-label"], Un = ["disabled", "aria-label"], Dn = {
|
|
2470
2515
|
key: 0,
|
|
2471
2516
|
width: "16",
|
|
2472
2517
|
height: "16",
|
|
@@ -2477,11 +2522,11 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2477
2522
|
"stroke-linecap": "round",
|
|
2478
2523
|
"stroke-linejoin": "round",
|
|
2479
2524
|
"aria-hidden": "true"
|
|
2480
|
-
},
|
|
2525
|
+
}, Nn = {
|
|
2481
2526
|
key: 1,
|
|
2482
2527
|
class: "wm-onb__starter-spinner",
|
|
2483
2528
|
"aria-hidden": "true"
|
|
2484
|
-
},
|
|
2529
|
+
}, Fn = ["onClick"], Hn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], zn = {
|
|
2485
2530
|
key: 1,
|
|
2486
2531
|
width: "18",
|
|
2487
2532
|
height: "18",
|
|
@@ -2492,7 +2537,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2492
2537
|
"stroke-linecap": "round",
|
|
2493
2538
|
"stroke-linejoin": "round",
|
|
2494
2539
|
"aria-hidden": "true"
|
|
2495
|
-
},
|
|
2540
|
+
}, qn = ["d"], Vn = { class: "wm-onb__btn-label" }, Kn = {
|
|
2496
2541
|
key: 0,
|
|
2497
2542
|
class: "wm-onb__btn-trail",
|
|
2498
2543
|
width: "13",
|
|
@@ -2504,7 +2549,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2504
2549
|
"stroke-linecap": "round",
|
|
2505
2550
|
"stroke-linejoin": "round",
|
|
2506
2551
|
"aria-hidden": "true"
|
|
2507
|
-
},
|
|
2552
|
+
}, Wn = { class: "wm-onb__btn-icon" }, $n = {
|
|
2508
2553
|
width: "18",
|
|
2509
2554
|
height: "18",
|
|
2510
2555
|
viewBox: "0 0 24 24",
|
|
@@ -2514,12 +2559,17 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2514
2559
|
"stroke-linecap": "round",
|
|
2515
2560
|
"stroke-linejoin": "round",
|
|
2516
2561
|
"aria-hidden": "true"
|
|
2517
|
-
},
|
|
2518
|
-
function
|
|
2562
|
+
}, Gn = ["d"], Yn = { class: "wm-onb__btn-label" }, Jn = { class: "wm-onb__btn-count" };
|
|
2563
|
+
function Xn(e, t, s, r, i, n) {
|
|
2519
2564
|
const a = P("AIAvatar");
|
|
2520
|
-
return c(), d("div",
|
|
2565
|
+
return c(), d("div", {
|
|
2566
|
+
class: x(["wm-onb", {
|
|
2567
|
+
"wm-onb--launching": i.launchPhase !== "idle",
|
|
2568
|
+
"wm-onb--sliding": i.launchPhase === "slide"
|
|
2569
|
+
}])
|
|
2570
|
+
}, [
|
|
2521
2571
|
l("div", {
|
|
2522
|
-
class:
|
|
2572
|
+
class: x(["wm-onb__hero", { "wm-onb__hero--cover": n.hasCover }])
|
|
2523
2573
|
}, [
|
|
2524
2574
|
n.hasCover ? (c(), d("div", {
|
|
2525
2575
|
key: 0,
|
|
@@ -2527,8 +2577,8 @@ function Qn(e, t, s, r, i, n) {
|
|
|
2527
2577
|
style: F(n.coverStyle),
|
|
2528
2578
|
role: "img",
|
|
2529
2579
|
"aria-label": n.heroTitle
|
|
2530
|
-
}, null, 12,
|
|
2531
|
-
n.hasCover ? b("", !0) : (c(), d("svg",
|
|
2580
|
+
}, null, 12, vn)) : b("", !0),
|
|
2581
|
+
n.hasCover ? b("", !0) : (c(), d("svg", yn, [...t[3] || (t[3] = [
|
|
2532
2582
|
l("circle", {
|
|
2533
2583
|
cx: "170",
|
|
2534
2584
|
cy: "10",
|
|
@@ -2559,12 +2609,12 @@ function Qn(e, t, s, r, i, n) {
|
|
|
2559
2609
|
size: 52,
|
|
2560
2610
|
"image-url": s.defaultIconUrl
|
|
2561
2611
|
}, null, 8, ["image-url"]),
|
|
2562
|
-
l("div",
|
|
2563
|
-
l("div",
|
|
2564
|
-
l("div",
|
|
2612
|
+
l("div", pn, [
|
|
2613
|
+
l("div", wn, v(n.heroTitle), 1),
|
|
2614
|
+
l("div", bn, v(n.heroSub), 1)
|
|
2565
2615
|
])
|
|
2566
2616
|
], 2),
|
|
2567
|
-
n.unreadThreads.length ? (c(), d("div",
|
|
2617
|
+
n.unreadThreads.length ? (c(), d("div", kn, [
|
|
2568
2618
|
(c(!0), d(E, null, N(n.unreadThreads, (o) => (c(), d("button", {
|
|
2569
2619
|
key: o.id,
|
|
2570
2620
|
type: "button",
|
|
@@ -2572,9 +2622,9 @@ function Qn(e, t, s, r, i, n) {
|
|
|
2572
2622
|
onClick: (f) => e.$emit("resume", o)
|
|
2573
2623
|
}, [
|
|
2574
2624
|
l("span", {
|
|
2575
|
-
class:
|
|
2625
|
+
class: x(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
|
|
2576
2626
|
}, [
|
|
2577
|
-
n.isDefaultAvatar(o) ? (c(), d("span",
|
|
2627
|
+
n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[4] || (t[4] = [
|
|
2578
2628
|
l("svg", {
|
|
2579
2629
|
width: "20",
|
|
2580
2630
|
height: "20",
|
|
@@ -2595,26 +2645,30 @@ function Qn(e, t, s, r, i, n) {
|
|
|
2595
2645
|
l("span", {
|
|
2596
2646
|
class: "wm-onb__alert-dot",
|
|
2597
2647
|
"aria-label": n.t("onboarding.unread")
|
|
2598
|
-
}, null, 8,
|
|
2648
|
+
}, null, 8, Sn)
|
|
2599
2649
|
], 2),
|
|
2600
|
-
l("span",
|
|
2601
|
-
l("span",
|
|
2602
|
-
l("span",
|
|
2603
|
-
n.senderLabel(o) ? (c(), d("span",
|
|
2650
|
+
l("span", Tn, [
|
|
2651
|
+
l("span", Mn, v(o.title), 1),
|
|
2652
|
+
l("span", xn, [
|
|
2653
|
+
n.senderLabel(o) ? (c(), d("span", On, v(n.senderLabel(o)) + " · ", 1)) : b("", !0),
|
|
2604
2654
|
l("span", {
|
|
2605
2655
|
innerHTML: n.renderPreview(o.preview)
|
|
2606
|
-
}, null, 8,
|
|
2656
|
+
}, null, 8, Rn)
|
|
2607
2657
|
])
|
|
2608
2658
|
]),
|
|
2609
|
-
l("span",
|
|
2610
|
-
n.formatTs(o._ts) ? (c(), d("span",
|
|
2611
|
-
l("span",
|
|
2659
|
+
l("span", Ln, [
|
|
2660
|
+
n.formatTs(o._ts) ? (c(), d("span", In, v(n.formatTs(o._ts)), 1)) : b("", !0),
|
|
2661
|
+
l("span", En, v(n.t("onboarding.resume")), 1)
|
|
2612
2662
|
])
|
|
2613
|
-
], 8,
|
|
2663
|
+
], 8, Cn))), 128))
|
|
2614
2664
|
])) : b("", !0),
|
|
2615
|
-
l("div",
|
|
2665
|
+
l("div", Bn, [
|
|
2616
2666
|
l("form", {
|
|
2617
|
-
|
|
2667
|
+
ref: "starterForm",
|
|
2668
|
+
class: x(["wm-onb__starter", {
|
|
2669
|
+
"is-active": !!i.starterText.trim(),
|
|
2670
|
+
"wm-onb__starter--toBottom": i.launchPhase === "slide"
|
|
2671
|
+
}]),
|
|
2618
2672
|
onSubmit: t[1] || (t[1] = G((...o) => n.submitStarter && n.submitStarter(...o), ["prevent"]))
|
|
2619
2673
|
}, [
|
|
2620
2674
|
$(l("input", {
|
|
@@ -2626,19 +2680,19 @@ function Qn(e, t, s, r, i, n) {
|
|
|
2626
2680
|
disabled: s.busy,
|
|
2627
2681
|
"aria-label": n.t("onboarding.start"),
|
|
2628
2682
|
enterkeyhint: "send"
|
|
2629
|
-
}, null, 8,
|
|
2683
|
+
}, null, 8, Pn), [
|
|
2630
2684
|
[ee, i.starterText]
|
|
2631
2685
|
]),
|
|
2632
2686
|
l("button", {
|
|
2633
2687
|
type: "submit",
|
|
2634
|
-
class:
|
|
2688
|
+
class: x(["wm-onb__starter-send", { "is-empty": !n.canStart }]),
|
|
2635
2689
|
disabled: s.busy || !n.canStart,
|
|
2636
2690
|
"aria-label": n.t("composer.send")
|
|
2637
2691
|
}, [
|
|
2638
|
-
s.busy ? (c(), d("span",
|
|
2692
|
+
s.busy ? (c(), d("span", Nn)) : (c(), d("svg", Dn, [...t[5] || (t[5] = [
|
|
2639
2693
|
l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" }, null, -1)
|
|
2640
2694
|
])]))
|
|
2641
|
-
], 10,
|
|
2695
|
+
], 10, Un)
|
|
2642
2696
|
], 34),
|
|
2643
2697
|
(c(!0), d(E, null, N(s.quickLinks, (o, f) => (c(), d("button", {
|
|
2644
2698
|
key: "ql-" + f,
|
|
@@ -2646,39 +2700,39 @@ function Qn(e, t, s, r, i, n) {
|
|
|
2646
2700
|
class: "wm-onb__btn",
|
|
2647
2701
|
onClick: (k) => e.$emit("select", o)
|
|
2648
2702
|
}, [
|
|
2649
|
-
l("span",
|
|
2703
|
+
l("span", Hn, [
|
|
2650
2704
|
n.safeIconUrl(o) ? (c(), d("span", {
|
|
2651
2705
|
key: 0,
|
|
2652
2706
|
class: "wm-onb__btn-iconImg",
|
|
2653
2707
|
style: F(n.iconUrlStyle(o)),
|
|
2654
2708
|
role: "img",
|
|
2655
2709
|
"aria-label": o.label || ""
|
|
2656
|
-
}, null, 12,
|
|
2710
|
+
}, null, 12, jn)) : (c(), d("svg", zn, [
|
|
2657
2711
|
l("path", {
|
|
2658
2712
|
d: n.iconPath(o.icon)
|
|
2659
|
-
}, null, 8,
|
|
2713
|
+
}, null, 8, qn)
|
|
2660
2714
|
]))
|
|
2661
2715
|
]),
|
|
2662
|
-
l("span",
|
|
2663
|
-
n.isExternalLink(o) ? (c(), d("svg",
|
|
2716
|
+
l("span", Vn, v(o.label), 1),
|
|
2717
|
+
n.isExternalLink(o) ? (c(), d("svg", Kn, [...t[6] || (t[6] = [
|
|
2664
2718
|
l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
|
|
2665
2719
|
])])) : b("", !0)
|
|
2666
|
-
], 8,
|
|
2720
|
+
], 8, Fn))), 128)),
|
|
2667
2721
|
s.openThreads.length ? (c(), d("button", {
|
|
2668
2722
|
key: 0,
|
|
2669
2723
|
type: "button",
|
|
2670
2724
|
class: "wm-onb__btn",
|
|
2671
2725
|
onClick: t[2] || (t[2] = (o) => e.$emit("view-history"))
|
|
2672
2726
|
}, [
|
|
2673
|
-
l("span",
|
|
2674
|
-
(c(), d("svg",
|
|
2727
|
+
l("span", Wn, [
|
|
2728
|
+
(c(), d("svg", $n, [
|
|
2675
2729
|
l("path", {
|
|
2676
2730
|
d: n.iconPath("chat")
|
|
2677
|
-
}, null, 8,
|
|
2731
|
+
}, null, 8, Gn)
|
|
2678
2732
|
]))
|
|
2679
2733
|
]),
|
|
2680
|
-
l("span",
|
|
2681
|
-
l("span",
|
|
2734
|
+
l("span", Yn, v(n.t("onboarding.allConversations")), 1),
|
|
2735
|
+
l("span", Jn, v(s.openThreads.length), 1),
|
|
2682
2736
|
t[7] || (t[7] = l("svg", {
|
|
2683
2737
|
class: "wm-onb__btn-trail",
|
|
2684
2738
|
width: "13",
|
|
@@ -2695,11 +2749,11 @@ function Qn(e, t, s, r, i, n) {
|
|
|
2695
2749
|
], -1))
|
|
2696
2750
|
])) : b("", !0)
|
|
2697
2751
|
])
|
|
2698
|
-
]);
|
|
2752
|
+
], 2);
|
|
2699
2753
|
}
|
|
2700
|
-
const
|
|
2754
|
+
const Qn = /* @__PURE__ */ U(gn, [["render", Xn], ["__scopeId", "data-v-aafac3f0"]]), Zn = {
|
|
2701
2755
|
name: "WmHistory",
|
|
2702
|
-
components: { AIAvatar:
|
|
2756
|
+
components: { AIAvatar: me, HumanAvatar: ve },
|
|
2703
2757
|
inject: {
|
|
2704
2758
|
t: { default: () => H() },
|
|
2705
2759
|
wmLocale: { default: () => () => "fr" }
|
|
@@ -2766,19 +2820,19 @@ const Zn = /* @__PURE__ */ U(gn, [["render", Qn], ["__scopeId", "data-v-c754e832
|
|
|
2766
2820
|
});
|
|
2767
2821
|
}
|
|
2768
2822
|
}
|
|
2769
|
-
},
|
|
2823
|
+
}, es = { class: "wm-hist" }, ts = { class: "wm-hist__search" }, ns = ["placeholder", "aria-label"], ss = { class: "wm-hist__list" }, rs = ["onClick"], is = {
|
|
2770
2824
|
key: 0,
|
|
2771
2825
|
class: "wm-hist__defaultAvatar"
|
|
2772
|
-
},
|
|
2826
|
+
}, as = ["aria-label"], os = { class: "wm-hist__thread-body" }, ls = { class: "wm-hist__thread-title" }, cs = ["innerHTML"], ds = { class: "wm-hist__thread-meta" }, us = {
|
|
2773
2827
|
key: 0,
|
|
2774
2828
|
class: "wm-hist__thread-time"
|
|
2775
2829
|
}, hs = {
|
|
2776
2830
|
key: 0,
|
|
2777
2831
|
class: "wm-hist__empty"
|
|
2778
2832
|
};
|
|
2779
|
-
function
|
|
2780
|
-
return c(), d("div",
|
|
2781
|
-
l("div",
|
|
2833
|
+
function ms(e, t, s, r, i, n) {
|
|
2834
|
+
return c(), d("div", es, [
|
|
2835
|
+
l("div", ts, [
|
|
2782
2836
|
t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
|
|
2783
2837
|
l("svg", {
|
|
2784
2838
|
width: "13",
|
|
@@ -2799,21 +2853,21 @@ function fs(e, t, s, r, i, n) {
|
|
|
2799
2853
|
type: "text",
|
|
2800
2854
|
placeholder: n.t("onboarding.search"),
|
|
2801
2855
|
"aria-label": n.t("onboarding.search")
|
|
2802
|
-
}, null, 8,
|
|
2856
|
+
}, null, 8, ns), [
|
|
2803
2857
|
[ee, i.query]
|
|
2804
2858
|
])
|
|
2805
2859
|
]),
|
|
2806
|
-
l("div",
|
|
2860
|
+
l("div", ss, [
|
|
2807
2861
|
(c(!0), d(E, null, N(n.filteredThreads, (a) => (c(), d("button", {
|
|
2808
2862
|
key: a.id,
|
|
2809
2863
|
type: "button",
|
|
2810
|
-
class:
|
|
2864
|
+
class: x(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
|
|
2811
2865
|
onClick: (o) => e.$emit("resume", a)
|
|
2812
2866
|
}, [
|
|
2813
2867
|
l("span", {
|
|
2814
|
-
class:
|
|
2868
|
+
class: x(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
|
|
2815
2869
|
}, [
|
|
2816
|
-
n.isDefaultAvatar(a) ? (c(), d("span",
|
|
2870
|
+
n.isDefaultAvatar(a) ? (c(), d("span", is, [...t[2] || (t[2] = [
|
|
2817
2871
|
l("svg", {
|
|
2818
2872
|
width: "18",
|
|
2819
2873
|
height: "18",
|
|
@@ -2835,17 +2889,17 @@ function fs(e, t, s, r, i, n) {
|
|
|
2835
2889
|
key: 2,
|
|
2836
2890
|
class: "wm-hist__thread-dot",
|
|
2837
2891
|
"aria-label": n.t("onboarding.unread")
|
|
2838
|
-
}, null, 8,
|
|
2892
|
+
}, null, 8, as)) : b("", !0)
|
|
2839
2893
|
], 2),
|
|
2840
|
-
l("span",
|
|
2841
|
-
l("span",
|
|
2894
|
+
l("span", os, [
|
|
2895
|
+
l("span", ls, v(a.title), 1),
|
|
2842
2896
|
l("span", {
|
|
2843
2897
|
class: "wm-hist__thread-preview",
|
|
2844
2898
|
innerHTML: n.renderPreview(a.preview)
|
|
2845
|
-
}, null, 8,
|
|
2899
|
+
}, null, 8, cs)
|
|
2846
2900
|
]),
|
|
2847
|
-
l("span",
|
|
2848
|
-
n.formatTs(a._ts) ? (c(), d("span",
|
|
2901
|
+
l("span", ds, [
|
|
2902
|
+
n.formatTs(a._ts) ? (c(), d("span", us, v(n.formatTs(a._ts)), 1)) : b("", !0),
|
|
2849
2903
|
t[3] || (t[3] = l("svg", {
|
|
2850
2904
|
width: "14",
|
|
2851
2905
|
height: "14",
|
|
@@ -2861,16 +2915,16 @@ function fs(e, t, s, r, i, n) {
|
|
|
2861
2915
|
l("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2862
2916
|
], -1))
|
|
2863
2917
|
])
|
|
2864
|
-
], 10,
|
|
2918
|
+
], 10, rs))), 128)),
|
|
2865
2919
|
n.filteredThreads.length ? b("", !0) : (c(), d("div", hs, v(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
|
|
2866
2920
|
])
|
|
2867
2921
|
]);
|
|
2868
2922
|
}
|
|
2869
|
-
const
|
|
2870
|
-
function
|
|
2923
|
+
const fs = /* @__PURE__ */ U(Zn, [["render", ms], ["__scopeId", "data-v-6bf35ef1"]]);
|
|
2924
|
+
function _s(e) {
|
|
2871
2925
|
return typeof e != "string" ? "" : e.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
|
|
2872
2926
|
}
|
|
2873
|
-
const
|
|
2927
|
+
const gs = {
|
|
2874
2928
|
name: "WmActionResult",
|
|
2875
2929
|
props: {
|
|
2876
2930
|
state: { type: String, default: "success" },
|
|
@@ -2880,13 +2934,13 @@ const vs = {
|
|
|
2880
2934
|
},
|
|
2881
2935
|
computed: {
|
|
2882
2936
|
detailText() {
|
|
2883
|
-
return
|
|
2937
|
+
return _s(this.detail);
|
|
2884
2938
|
}
|
|
2885
2939
|
}
|
|
2886
|
-
},
|
|
2940
|
+
}, vs = {
|
|
2887
2941
|
class: "wm-result__icon",
|
|
2888
2942
|
"aria-hidden": "true"
|
|
2889
|
-
},
|
|
2943
|
+
}, ys = {
|
|
2890
2944
|
key: 0,
|
|
2891
2945
|
width: "11",
|
|
2892
2946
|
height: "11",
|
|
@@ -2896,7 +2950,7 @@ const vs = {
|
|
|
2896
2950
|
"stroke-width": "2.8",
|
|
2897
2951
|
"stroke-linecap": "round",
|
|
2898
2952
|
"stroke-linejoin": "round"
|
|
2899
|
-
},
|
|
2953
|
+
}, ps = {
|
|
2900
2954
|
key: 1,
|
|
2901
2955
|
width: "11",
|
|
2902
2956
|
height: "11",
|
|
@@ -2906,7 +2960,7 @@ const vs = {
|
|
|
2906
2960
|
"stroke-width": "2.6",
|
|
2907
2961
|
"stroke-linecap": "round",
|
|
2908
2962
|
"stroke-linejoin": "round"
|
|
2909
|
-
},
|
|
2963
|
+
}, ws = {
|
|
2910
2964
|
key: 2,
|
|
2911
2965
|
width: "11",
|
|
2912
2966
|
height: "11",
|
|
@@ -2916,7 +2970,7 @@ const vs = {
|
|
|
2916
2970
|
"stroke-width": "2.4",
|
|
2917
2971
|
"stroke-linecap": "round",
|
|
2918
2972
|
"stroke-linejoin": "round"
|
|
2919
|
-
},
|
|
2973
|
+
}, bs = {
|
|
2920
2974
|
key: 3,
|
|
2921
2975
|
width: "12",
|
|
2922
2976
|
height: "12",
|
|
@@ -2926,24 +2980,24 @@ const vs = {
|
|
|
2926
2980
|
"stroke-width": "2.2",
|
|
2927
2981
|
"stroke-linecap": "round",
|
|
2928
2982
|
"stroke-linejoin": "round"
|
|
2929
|
-
},
|
|
2930
|
-
function
|
|
2983
|
+
}, ks = { class: "wm-result__body" }, Cs = { class: "wm-result__label" }, As = { class: "wm-result__detail" };
|
|
2984
|
+
function Ss(e, t, s, r, i, n) {
|
|
2931
2985
|
return c(), d("div", {
|
|
2932
|
-
class:
|
|
2986
|
+
class: x(["wm-result", `wm-result--${s.state}`])
|
|
2933
2987
|
}, [
|
|
2934
|
-
l("span",
|
|
2935
|
-
s.state === "success" ? (c(), d("svg",
|
|
2988
|
+
l("span", vs, [
|
|
2989
|
+
s.state === "success" ? (c(), d("svg", ys, [...t[0] || (t[0] = [
|
|
2936
2990
|
l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2937
|
-
])])) : s.state === "rejected" ? (c(), d("svg",
|
|
2991
|
+
])])) : s.state === "rejected" ? (c(), d("svg", ps, [...t[1] || (t[1] = [
|
|
2938
2992
|
l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2939
|
-
])])) : s.state === "awaiting" ? (c(), d("svg",
|
|
2993
|
+
])])) : s.state === "awaiting" ? (c(), d("svg", ws, [...t[2] || (t[2] = [
|
|
2940
2994
|
l("circle", {
|
|
2941
2995
|
cx: "12",
|
|
2942
2996
|
cy: "12",
|
|
2943
2997
|
r: "10"
|
|
2944
2998
|
}, null, -1),
|
|
2945
2999
|
l("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2946
|
-
])])) : (c(), d("svg",
|
|
3000
|
+
])])) : (c(), d("svg", bs, [...t[3] || (t[3] = [
|
|
2947
3001
|
l("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
|
|
2948
3002
|
l("line", {
|
|
2949
3003
|
x1: "12",
|
|
@@ -2959,19 +3013,19 @@ function Ts(e, t, s, r, i, n) {
|
|
|
2959
3013
|
}, null, -1)
|
|
2960
3014
|
])]))
|
|
2961
3015
|
]),
|
|
2962
|
-
l("span",
|
|
2963
|
-
l("span",
|
|
3016
|
+
l("span", ks, [
|
|
3017
|
+
l("span", Cs, v(s.label), 1),
|
|
2964
3018
|
n.detailText ? (c(), d(E, { key: 0 }, [
|
|
2965
3019
|
t[4] || (t[4] = l("span", {
|
|
2966
3020
|
class: "wm-result__sep",
|
|
2967
3021
|
"aria-hidden": "true"
|
|
2968
3022
|
}, " · ", -1)),
|
|
2969
|
-
l("span",
|
|
3023
|
+
l("span", As, v(n.detailText), 1)
|
|
2970
3024
|
], 64)) : b("", !0)
|
|
2971
3025
|
])
|
|
2972
3026
|
], 2);
|
|
2973
3027
|
}
|
|
2974
|
-
const
|
|
3028
|
+
const Ts = /* @__PURE__ */ U(gs, [["render", Ss], ["__scopeId", "data-v-7284acd0"]]), Ms = {
|
|
2975
3029
|
name: "WmArtifactFormResponse",
|
|
2976
3030
|
inject: {
|
|
2977
3031
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -2987,12 +3041,12 @@ const Ms = /* @__PURE__ */ U(vs, [["render", Ts], ["__scopeId", "data-v-7284acd0
|
|
|
2987
3041
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2988
3042
|
}
|
|
2989
3043
|
}
|
|
2990
|
-
},
|
|
2991
|
-
function
|
|
2992
|
-
return c(), d("div",
|
|
2993
|
-
l("div",
|
|
2994
|
-
l("div",
|
|
2995
|
-
l("span",
|
|
3044
|
+
}, xs = { class: "wm-art wm-art--formResponse" }, Os = { class: "wm-art__head" }, Rs = { class: "wm-art__title" }, Ls = { class: "wm-art__badge wm-art__badge--success" }, Is = { class: "wm-art__body" }, Es = { class: "wm-art__fieldLabel" };
|
|
3045
|
+
function Bs(e, t, s, r, i, n) {
|
|
3046
|
+
return c(), d("div", xs, [
|
|
3047
|
+
l("div", Os, [
|
|
3048
|
+
l("div", Rs, v(s.data.title || n.t("form.title")), 1),
|
|
3049
|
+
l("span", Ls, [
|
|
2996
3050
|
t[0] || (t[0] = l("svg", {
|
|
2997
3051
|
width: "11",
|
|
2998
3052
|
height: "11",
|
|
@@ -3009,14 +3063,14 @@ function Ps(e, t, s, r, i, n) {
|
|
|
3009
3063
|
Me(" " + v(n.t("form.sent")), 1)
|
|
3010
3064
|
])
|
|
3011
3065
|
]),
|
|
3012
|
-
l("div",
|
|
3066
|
+
l("div", Is, [
|
|
3013
3067
|
(c(!0), d(E, null, N(n.fields, (a, o) => (c(), d("div", {
|
|
3014
3068
|
key: o,
|
|
3015
3069
|
class: "wm-art__field"
|
|
3016
3070
|
}, [
|
|
3017
|
-
l("div",
|
|
3071
|
+
l("div", Es, v(a.label), 1),
|
|
3018
3072
|
l("div", {
|
|
3019
|
-
class:
|
|
3073
|
+
class: x([
|
|
3020
3074
|
"wm-art__fieldValue",
|
|
3021
3075
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3022
3076
|
])
|
|
@@ -3025,7 +3079,7 @@ function Ps(e, t, s, r, i, n) {
|
|
|
3025
3079
|
])
|
|
3026
3080
|
]);
|
|
3027
3081
|
}
|
|
3028
|
-
const
|
|
3082
|
+
const Ps = /* @__PURE__ */ U(Ms, [["render", Bs], ["__scopeId", "data-v-713aecf1"]]), Us = {
|
|
3029
3083
|
name: "WmArtifactInfoCard",
|
|
3030
3084
|
props: {
|
|
3031
3085
|
data: { type: Object, required: !0 }
|
|
@@ -3040,50 +3094,50 @@ const Us = /* @__PURE__ */ U(xs, [["render", Ps], ["__scopeId", "data-v-713aecf1
|
|
|
3040
3094
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
3041
3095
|
}
|
|
3042
3096
|
}
|
|
3043
|
-
},
|
|
3097
|
+
}, Ds = { class: "wm-art wm-art--infoCard" }, Ns = {
|
|
3044
3098
|
key: 0,
|
|
3045
3099
|
class: "wm-art__image"
|
|
3046
|
-
},
|
|
3100
|
+
}, Fs = ["src", "alt"], Hs = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, zs = { class: "wm-art__title" }, qs = {
|
|
3047
3101
|
key: 0,
|
|
3048
3102
|
class: "wm-art__subtitle"
|
|
3049
|
-
},
|
|
3103
|
+
}, Vs = {
|
|
3050
3104
|
key: 1,
|
|
3051
3105
|
class: "wm-art__body"
|
|
3052
|
-
},
|
|
3106
|
+
}, Ks = {
|
|
3053
3107
|
key: 0,
|
|
3054
3108
|
class: "wm-art__text"
|
|
3055
|
-
},
|
|
3056
|
-
function
|
|
3057
|
-
return c(), d("div",
|
|
3058
|
-
s.data.image_url ? (c(), d("figure",
|
|
3109
|
+
}, Ws = { class: "wm-art__fieldLabel" };
|
|
3110
|
+
function $s(e, t, s, r, i, n) {
|
|
3111
|
+
return c(), d("div", Ds, [
|
|
3112
|
+
s.data.image_url ? (c(), d("figure", Ns, [
|
|
3059
3113
|
l("img", {
|
|
3060
3114
|
src: s.data.image_url,
|
|
3061
3115
|
alt: s.data.title || "",
|
|
3062
3116
|
loading: "lazy"
|
|
3063
|
-
}, null, 8,
|
|
3117
|
+
}, null, 8, Fs)
|
|
3064
3118
|
])) : b("", !0),
|
|
3065
|
-
l("div",
|
|
3066
|
-
l("div",
|
|
3067
|
-
l("div",
|
|
3068
|
-
s.data.subtitle ? (c(), d("div",
|
|
3119
|
+
l("div", Hs, [
|
|
3120
|
+
l("div", js, [
|
|
3121
|
+
l("div", zs, v(s.data.title), 1),
|
|
3122
|
+
s.data.subtitle ? (c(), d("div", qs, v(s.data.subtitle), 1)) : b("", !0)
|
|
3069
3123
|
]),
|
|
3070
3124
|
s.data.badge && s.data.badge.label ? (c(), d("span", {
|
|
3071
3125
|
key: 0,
|
|
3072
|
-
class:
|
|
3126
|
+
class: x([
|
|
3073
3127
|
"wm-art__badge",
|
|
3074
3128
|
`wm-art__badge--${s.data.badge.tone || "neutral"}`
|
|
3075
3129
|
])
|
|
3076
3130
|
}, v(s.data.badge.label), 3)) : b("", !0)
|
|
3077
3131
|
]),
|
|
3078
|
-
n.hasBody ? (c(), d("div",
|
|
3079
|
-
s.data.body ? (c(), d("div",
|
|
3132
|
+
n.hasBody ? (c(), d("div", Vs, [
|
|
3133
|
+
s.data.body ? (c(), d("div", Ks, v(s.data.body), 1)) : b("", !0),
|
|
3080
3134
|
n.fields.length ? (c(!0), d(E, { key: 1 }, N(n.fields, (a, o) => (c(), d("div", {
|
|
3081
3135
|
key: o,
|
|
3082
3136
|
class: "wm-art__field"
|
|
3083
3137
|
}, [
|
|
3084
|
-
l("div",
|
|
3138
|
+
l("div", Ws, v(a.label), 1),
|
|
3085
3139
|
l("div", {
|
|
3086
|
-
class:
|
|
3140
|
+
class: x([
|
|
3087
3141
|
"wm-art__fieldValue",
|
|
3088
3142
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3089
3143
|
])
|
|
@@ -3092,8 +3146,8 @@ function Gs(e, t, s, r, i, n) {
|
|
|
3092
3146
|
])) : b("", !0)
|
|
3093
3147
|
]);
|
|
3094
3148
|
}
|
|
3095
|
-
const
|
|
3096
|
-
function
|
|
3149
|
+
const Gs = /* @__PURE__ */ U(Us, [["render", $s], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
3150
|
+
function Ys(e, t, s) {
|
|
3097
3151
|
if (!e) return "";
|
|
3098
3152
|
const r = new Date(e);
|
|
3099
3153
|
if (Number.isNaN(r.getTime())) return e;
|
|
@@ -3107,7 +3161,7 @@ function Js(e, t, s) {
|
|
|
3107
3161
|
});
|
|
3108
3162
|
return `${i}${s}${n}`;
|
|
3109
3163
|
}
|
|
3110
|
-
const
|
|
3164
|
+
const Js = {
|
|
3111
3165
|
name: "WmArtifactTicket",
|
|
3112
3166
|
inject: {
|
|
3113
3167
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -3125,7 +3179,7 @@ const Xs = {
|
|
|
3125
3179
|
},
|
|
3126
3180
|
formattedDate() {
|
|
3127
3181
|
var e;
|
|
3128
|
-
return
|
|
3182
|
+
return Ys(
|
|
3129
3183
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
3130
3184
|
re(this.wmLocale()),
|
|
3131
3185
|
this.t("ticket.dateAt")
|
|
@@ -3153,13 +3207,13 @@ const Xs = {
|
|
|
3153
3207
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
3154
3208
|
}
|
|
3155
3209
|
}
|
|
3156
|
-
},
|
|
3210
|
+
}, Xs = { class: "wm-art wm-art--ticket" }, Qs = { class: "wm-art__head wm-tk__head" }, Zs = { class: "wm-art__title wm-tk__title" }, er = { class: "wm-tk__sub" }, tr = { class: "wm-tk__ref" }, nr = {
|
|
3157
3211
|
key: 0,
|
|
3158
3212
|
class: "wm-tk__text"
|
|
3159
|
-
},
|
|
3213
|
+
}, sr = {
|
|
3160
3214
|
key: 0,
|
|
3161
3215
|
class: "wm-art__body"
|
|
3162
|
-
},
|
|
3216
|
+
}, rr = { class: "wm-art__fieldLabel" }, ir = ["data-level"], ar = {
|
|
3163
3217
|
key: 1,
|
|
3164
3218
|
class: "wm-tk__date",
|
|
3165
3219
|
width: "12",
|
|
@@ -3171,16 +3225,16 @@ const Xs = {
|
|
|
3171
3225
|
"stroke-linecap": "round",
|
|
3172
3226
|
"stroke-linejoin": "round",
|
|
3173
3227
|
"aria-hidden": "true"
|
|
3174
|
-
},
|
|
3228
|
+
}, or = {
|
|
3175
3229
|
key: 1,
|
|
3176
3230
|
class: "wm-art__footer wm-tk__footer"
|
|
3177
3231
|
};
|
|
3178
|
-
function
|
|
3179
|
-
return c(), d("div",
|
|
3180
|
-
l("div",
|
|
3181
|
-
l("div",
|
|
3182
|
-
l("div",
|
|
3183
|
-
l("div",
|
|
3232
|
+
function lr(e, t, s, r, i, n) {
|
|
3233
|
+
return c(), d("div", Xs, [
|
|
3234
|
+
l("div", Qs, [
|
|
3235
|
+
l("div", Zs, v(s.data.title), 1),
|
|
3236
|
+
l("div", er, [
|
|
3237
|
+
l("div", tr, [
|
|
3184
3238
|
t[0] || (t[0] = l("svg", {
|
|
3185
3239
|
width: "11",
|
|
3186
3240
|
height: "11",
|
|
@@ -3198,7 +3252,7 @@ function cr(e, t, s, r, i, n) {
|
|
|
3198
3252
|
l("span", null, v(s.data.reference), 1)
|
|
3199
3253
|
]),
|
|
3200
3254
|
l("span", {
|
|
3201
|
-
class:
|
|
3255
|
+
class: x([
|
|
3202
3256
|
"wm-art__badge",
|
|
3203
3257
|
"wm-tk__badge",
|
|
3204
3258
|
`wm-art__badge--${s.data.status.tone || "neutral"}`
|
|
@@ -3211,16 +3265,16 @@ function cr(e, t, s, r, i, n) {
|
|
|
3211
3265
|
Me(" " + v(s.data.status.label), 1)
|
|
3212
3266
|
], 2)
|
|
3213
3267
|
]),
|
|
3214
|
-
s.data.body ? (c(), d("div",
|
|
3268
|
+
s.data.body ? (c(), d("div", nr, v(s.data.body), 1)) : b("", !0)
|
|
3215
3269
|
]),
|
|
3216
|
-
n.fields.length ? (c(), d("div",
|
|
3270
|
+
n.fields.length ? (c(), d("div", sr, [
|
|
3217
3271
|
(c(!0), d(E, null, N(n.fields, (a, o) => (c(), d("div", {
|
|
3218
3272
|
key: o,
|
|
3219
3273
|
class: "wm-art__field"
|
|
3220
3274
|
}, [
|
|
3221
|
-
l("div",
|
|
3275
|
+
l("div", rr, v(a.label), 1),
|
|
3222
3276
|
l("div", {
|
|
3223
|
-
class:
|
|
3277
|
+
class: x([
|
|
3224
3278
|
"wm-art__fieldValue",
|
|
3225
3279
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3226
3280
|
])
|
|
@@ -3255,7 +3309,7 @@ function cr(e, t, s, r, i, n) {
|
|
|
3255
3309
|
height: "9",
|
|
3256
3310
|
rx: "0.5"
|
|
3257
3311
|
}, null, -1)
|
|
3258
|
-
])], 8,
|
|
3312
|
+
])], 8, ir)) : n.isDate(a.label) ? (c(), d("svg", ar, [...t[3] || (t[3] = [
|
|
3259
3313
|
l("rect", {
|
|
3260
3314
|
x: "3",
|
|
3261
3315
|
y: "4",
|
|
@@ -3269,7 +3323,7 @@ function cr(e, t, s, r, i, n) {
|
|
|
3269
3323
|
], 2)
|
|
3270
3324
|
]))), 128))
|
|
3271
3325
|
])) : b("", !0),
|
|
3272
|
-
s.data.created_at ? (c(), d("div",
|
|
3326
|
+
s.data.created_at ? (c(), d("div", or, [
|
|
3273
3327
|
t[4] || (t[4] = l("svg", {
|
|
3274
3328
|
width: "11",
|
|
3275
3329
|
height: "11",
|
|
@@ -3294,11 +3348,11 @@ function cr(e, t, s, r, i, n) {
|
|
|
3294
3348
|
])) : b("", !0)
|
|
3295
3349
|
]);
|
|
3296
3350
|
}
|
|
3297
|
-
const
|
|
3298
|
-
form_response:
|
|
3299
|
-
info_card:
|
|
3300
|
-
ticket:
|
|
3301
|
-
},
|
|
3351
|
+
const cr = /* @__PURE__ */ U(Js, [["render", lr], ["__scopeId", "data-v-5f30c914"]]), dr = {
|
|
3352
|
+
form_response: Ps,
|
|
3353
|
+
info_card: Gs,
|
|
3354
|
+
ticket: cr
|
|
3355
|
+
}, ur = {
|
|
3302
3356
|
name: "WmArtifactRenderer",
|
|
3303
3357
|
props: {
|
|
3304
3358
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -3309,7 +3363,7 @@ const dr = /* @__PURE__ */ U(Xs, [["render", cr], ["__scopeId", "data-v-5f30c914
|
|
|
3309
3363
|
component() {
|
|
3310
3364
|
var t;
|
|
3311
3365
|
const e = (t = this.artifact) == null ? void 0 : t.kind;
|
|
3312
|
-
return e &&
|
|
3366
|
+
return e && dr[e] || null;
|
|
3313
3367
|
}
|
|
3314
3368
|
}
|
|
3315
3369
|
};
|
|
@@ -3319,7 +3373,7 @@ function hr(e, t, s, r, i, n) {
|
|
|
3319
3373
|
data: s.artifact.data
|
|
3320
3374
|
}, null, 8, ["data"])) : b("", !0);
|
|
3321
3375
|
}
|
|
3322
|
-
const
|
|
3376
|
+
const mr = /* @__PURE__ */ U(ur, [["render", hr]]), fr = {
|
|
3323
3377
|
name: "WmAttachmentPreview",
|
|
3324
3378
|
inject: {
|
|
3325
3379
|
signAttachmentFn: { default: null },
|
|
@@ -3387,17 +3441,17 @@ const fr = /* @__PURE__ */ U(mr, [["render", hr]]), _r = {
|
|
|
3387
3441
|
this.safeHref === "#" && e.preventDefault();
|
|
3388
3442
|
}
|
|
3389
3443
|
}
|
|
3390
|
-
},
|
|
3444
|
+
}, _r = ["href"], gr = ["src", "alt"], vr = ["src"], yr = ["src"], pr = ["href", "download"], wr = { class: "wm-att__main" }, br = { class: "wm-att__name" }, kr = {
|
|
3391
3445
|
key: 0,
|
|
3392
3446
|
class: "wm-att__meta"
|
|
3393
|
-
},
|
|
3447
|
+
}, Cr = {
|
|
3394
3448
|
key: 0,
|
|
3395
3449
|
class: "wm-att__spin",
|
|
3396
3450
|
"aria-hidden": "true"
|
|
3397
3451
|
};
|
|
3398
|
-
function
|
|
3452
|
+
function Ar(e, t, s, r, i, n) {
|
|
3399
3453
|
return c(), d("div", {
|
|
3400
|
-
class:
|
|
3454
|
+
class: x(["wm-att", ["wm-att--" + (n.kind || "file")]])
|
|
3401
3455
|
}, [
|
|
3402
3456
|
n.kind === "image" && i.url ? (c(), d("a", {
|
|
3403
3457
|
key: 0,
|
|
@@ -3410,19 +3464,19 @@ function Sr(e, t, s, r, i, n) {
|
|
|
3410
3464
|
src: i.url,
|
|
3411
3465
|
alt: n.displayName,
|
|
3412
3466
|
loading: "lazy"
|
|
3413
|
-
}, null, 8,
|
|
3414
|
-
], 8,
|
|
3467
|
+
}, null, 8, gr)
|
|
3468
|
+
], 8, _r)) : n.kind === "audio" && i.url ? (c(), d("audio", {
|
|
3415
3469
|
key: 1,
|
|
3416
3470
|
src: i.url,
|
|
3417
3471
|
controls: "",
|
|
3418
3472
|
preload: "metadata"
|
|
3419
|
-
}, null, 8,
|
|
3473
|
+
}, null, 8, vr)) : n.kind === "video" && i.url ? (c(), d("video", {
|
|
3420
3474
|
key: 2,
|
|
3421
3475
|
src: i.url,
|
|
3422
3476
|
controls: "",
|
|
3423
3477
|
playsinline: "",
|
|
3424
3478
|
preload: "auto"
|
|
3425
|
-
}, null, 8,
|
|
3479
|
+
}, null, 8, yr)) : (c(), d("a", {
|
|
3426
3480
|
key: 3,
|
|
3427
3481
|
class: "wm-att__file",
|
|
3428
3482
|
href: n.safeHref,
|
|
@@ -3447,15 +3501,15 @@ function Sr(e, t, s, r, i, n) {
|
|
|
3447
3501
|
l("path", { d: "M14 2v6h6" })
|
|
3448
3502
|
])
|
|
3449
3503
|
], -1)),
|
|
3450
|
-
l("span",
|
|
3451
|
-
l("span",
|
|
3452
|
-
n.sizeLabel ? (c(), d("span",
|
|
3504
|
+
l("span", wr, [
|
|
3505
|
+
l("span", br, v(n.displayName), 1),
|
|
3506
|
+
n.sizeLabel ? (c(), d("span", kr, v(n.sizeLabel), 1)) : b("", !0)
|
|
3453
3507
|
]),
|
|
3454
|
-
i.loading ? (c(), d("span",
|
|
3455
|
-
], 8,
|
|
3508
|
+
i.loading ? (c(), d("span", Cr)) : b("", !0)
|
|
3509
|
+
], 8, pr))
|
|
3456
3510
|
], 2);
|
|
3457
3511
|
}
|
|
3458
|
-
const
|
|
3512
|
+
const Sr = /* @__PURE__ */ U(fr, [["render", Ar], ["__scopeId", "data-v-b207a8bd"]]), Tr = {
|
|
3459
3513
|
name: "WmBubble",
|
|
3460
3514
|
props: {
|
|
3461
3515
|
role: { type: String, default: "ai" },
|
|
@@ -3467,29 +3521,29 @@ const Tr = /* @__PURE__ */ U(_r, [["render", Sr], ["__scopeId", "data-v-b207a8bd
|
|
|
3467
3521
|
return _t(this.text);
|
|
3468
3522
|
}
|
|
3469
3523
|
}
|
|
3470
|
-
},
|
|
3471
|
-
function
|
|
3524
|
+
}, Mr = ["innerHTML"];
|
|
3525
|
+
function xr(e, t, s, r, i, n) {
|
|
3472
3526
|
return c(), d("div", {
|
|
3473
|
-
class:
|
|
3527
|
+
class: x(["wm-bubble", "wm-bubble--" + s.role])
|
|
3474
3528
|
}, [
|
|
3475
3529
|
$e(e.$slots, "default", {}, () => [
|
|
3476
|
-
l("span", { innerHTML: n.rendered }, null, 8,
|
|
3530
|
+
l("span", { innerHTML: n.rendered }, null, 8, Mr)
|
|
3477
3531
|
], !0)
|
|
3478
3532
|
], 2);
|
|
3479
3533
|
}
|
|
3480
|
-
const
|
|
3481
|
-
function
|
|
3482
|
-
return c(), d("div",
|
|
3534
|
+
const Or = /* @__PURE__ */ U(Tr, [["render", xr], ["__scopeId", "data-v-7ab13147"]]), Rr = { name: "WmTyping" }, Lr = { class: "wm-typing" };
|
|
3535
|
+
function Ir(e, t, s, r, i, n) {
|
|
3536
|
+
return c(), d("div", Lr, [...t[0] || (t[0] = [
|
|
3483
3537
|
l("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3484
3538
|
l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3485
3539
|
l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3486
3540
|
])]);
|
|
3487
3541
|
}
|
|
3488
|
-
const
|
|
3542
|
+
const Er = /* @__PURE__ */ U(Rr, [["render", Ir], ["__scopeId", "data-v-df2447fd"]]);
|
|
3489
3543
|
function se(e) {
|
|
3490
3544
|
return e ? e.client_msg_id || e.id : "";
|
|
3491
3545
|
}
|
|
3492
|
-
const
|
|
3546
|
+
const Br = {
|
|
3493
3547
|
transferred_to_human: "system.transferredToHuman",
|
|
3494
3548
|
assigned: "system.assigned",
|
|
3495
3549
|
unassigned: "system.unassigned",
|
|
@@ -3497,16 +3551,16 @@ const Pr = {
|
|
|
3497
3551
|
closed: "system.closed",
|
|
3498
3552
|
reopened: "system.reopened",
|
|
3499
3553
|
idle: "system.idle"
|
|
3500
|
-
},
|
|
3554
|
+
}, Pr = 80, Ur = 200, Dr = {
|
|
3501
3555
|
name: "WmMessageList",
|
|
3502
3556
|
components: {
|
|
3503
|
-
AIAvatar:
|
|
3557
|
+
AIAvatar: me,
|
|
3504
3558
|
HumanAvatar: ve,
|
|
3505
|
-
Bubble:
|
|
3506
|
-
Typing:
|
|
3507
|
-
ActionResult:
|
|
3508
|
-
AttachmentPreview:
|
|
3509
|
-
ArtifactRenderer:
|
|
3559
|
+
Bubble: Or,
|
|
3560
|
+
Typing: Er,
|
|
3561
|
+
ActionResult: Ts,
|
|
3562
|
+
AttachmentPreview: Sr,
|
|
3563
|
+
ArtifactRenderer: mr
|
|
3510
3564
|
},
|
|
3511
3565
|
inject: {
|
|
3512
3566
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -3697,11 +3751,11 @@ const Pr = {
|
|
|
3697
3751
|
return `g-${s}`;
|
|
3698
3752
|
},
|
|
3699
3753
|
isAtBottom(e) {
|
|
3700
|
-
return e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
3754
|
+
return e.scrollHeight - e.scrollTop - e.clientHeight <= Pr;
|
|
3701
3755
|
},
|
|
3702
3756
|
onScroll() {
|
|
3703
3757
|
const e = this.$refs.scrollEl;
|
|
3704
|
-
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <=
|
|
3758
|
+
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Ur && (this._pendingLoadMore = !0, this.$emit("load-more"))));
|
|
3705
3759
|
},
|
|
3706
3760
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3707
3761
|
//
|
|
@@ -3903,8 +3957,8 @@ const Pr = {
|
|
|
3903
3957
|
cornersFor(e, t) {
|
|
3904
3958
|
var ie, ae, X;
|
|
3905
3959
|
const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, k = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], I = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = (Q, oe, Z) => Q != null && T != null ? Q + z >= T : oe === Z || oe === "card" && Z === "bubble";
|
|
3906
|
-
let D = o,
|
|
3907
|
-
return a ? (k && (
|
|
3960
|
+
let D = o, O = o, q = o, J = o;
|
|
3961
|
+
return a ? (k && (O = f), (y || !n) && (q = f), k && M(I, k, r == null ? void 0 : r.top) && (D = f), y && M(S, y, r == null ? void 0 : r.bottom) && (J = f)) : (k && (D = f), (y || !n) && (J = f), k && M(I, k, r == null ? void 0 : r.top) && (O = f), y && M(S, y, r == null ? void 0 : r.bottom) && (q = f)), { tl: D, tr: O, br: q, bl: J };
|
|
3908
3962
|
},
|
|
3909
3963
|
// Inline column-count for the mosaic grid, capped at 4. Single
|
|
3910
3964
|
// attachment falls back to the vertical-list layout (null). Two
|
|
@@ -4071,7 +4125,7 @@ const Pr = {
|
|
|
4071
4125
|
},
|
|
4072
4126
|
systemLabel(e) {
|
|
4073
4127
|
var i, n, a;
|
|
4074
|
-
const t = (i = e == null ? void 0 : e.payload) == null ? void 0 : i.event, s =
|
|
4128
|
+
const t = (i = e == null ? void 0 : e.payload) == null ? void 0 : i.event, s = Br[t], r = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
|
|
4075
4129
|
return s ? this.t(s, { name: r }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
4076
4130
|
},
|
|
4077
4131
|
scrollToBottom() {
|
|
@@ -4086,71 +4140,71 @@ const Pr = {
|
|
|
4086
4140
|
e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
|
|
4087
4141
|
}
|
|
4088
4142
|
}
|
|
4089
|
-
},
|
|
4143
|
+
}, Nr = { class: "wm-list__wrap" }, Fr = {
|
|
4090
4144
|
key: 0,
|
|
4091
4145
|
class: "wm-list__loadMore",
|
|
4092
4146
|
role: "status",
|
|
4093
4147
|
"aria-live": "polite"
|
|
4094
|
-
},
|
|
4148
|
+
}, Hr = { class: "wm-list__loadMore-lbl" }, jr = {
|
|
4095
4149
|
key: 1,
|
|
4096
4150
|
class: "wm-list__historyEnd"
|
|
4097
|
-
},
|
|
4151
|
+
}, zr = {
|
|
4098
4152
|
key: 2,
|
|
4099
4153
|
class: "wm-list__sep"
|
|
4100
|
-
},
|
|
4154
|
+
}, qr = { class: "wm-list__sep-label" }, Vr = {
|
|
4101
4155
|
key: 0,
|
|
4102
4156
|
class: "wm-list__sep wm-list__sep--unread"
|
|
4103
|
-
},
|
|
4157
|
+
}, Kr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Wr = {
|
|
4104
4158
|
key: 0,
|
|
4105
4159
|
class: "wm-list__sysep"
|
|
4106
|
-
},
|
|
4160
|
+
}, $r = { class: "wm-list__sysep-label" }, Gr = ["data-row-key", "onPointerdown"], Yr = {
|
|
4107
4161
|
key: 0,
|
|
4108
4162
|
class: "wm-list__avatarSlot"
|
|
4109
|
-
},
|
|
4163
|
+
}, Jr = { key: 0 }, Xr = {
|
|
4110
4164
|
key: 1,
|
|
4111
4165
|
"aria-hidden": "true"
|
|
4112
|
-
},
|
|
4166
|
+
}, Qr = { key: 2 }, Zr = { key: 0 }, ei = {
|
|
4113
4167
|
key: 1,
|
|
4114
4168
|
"aria-hidden": "true"
|
|
4115
|
-
},
|
|
4169
|
+
}, ti = { key: 2 }, ni = {
|
|
4116
4170
|
key: 3,
|
|
4117
4171
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
4118
|
-
},
|
|
4119
|
-
function
|
|
4172
|
+
}, si = { class: "wm-list__avatarSlot" }, ri = ["aria-label", "title"];
|
|
4173
|
+
function ii(e, t, s, r, i, n) {
|
|
4120
4174
|
const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), k = P("ArtifactRenderer"), y = P("Bubble"), T = P("AttachmentPreview"), I = P("Typing");
|
|
4121
|
-
return c(), d("div",
|
|
4175
|
+
return c(), d("div", Nr, [
|
|
4122
4176
|
l("div", {
|
|
4123
4177
|
ref: "scrollEl",
|
|
4124
|
-
class:
|
|
4178
|
+
class: x(["wm-list", { "wm-list--silent": i.silentFades }]),
|
|
4125
4179
|
onScrollPassive: t[4] || (t[4] = (...S) => n.onScroll && n.onScroll(...S))
|
|
4126
4180
|
}, [
|
|
4127
|
-
s.loadingMore ? (c(), d("div",
|
|
4181
|
+
s.loadingMore ? (c(), d("div", Fr, [
|
|
4128
4182
|
t[6] || (t[6] = l("span", {
|
|
4129
4183
|
class: "wm-list__loadMore-spinner",
|
|
4130
4184
|
"aria-hidden": "true"
|
|
4131
4185
|
}, null, -1)),
|
|
4132
|
-
l("span",
|
|
4133
|
-
])) : n.historyExhausted ? (c(), d("div",
|
|
4134
|
-
s.dateLabel ? (c(), d("div",
|
|
4186
|
+
l("span", Hr, v(n.t("messageList.loadingHistory")), 1)
|
|
4187
|
+
])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : b("", !0),
|
|
4188
|
+
s.dateLabel ? (c(), d("div", zr, [
|
|
4135
4189
|
t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
|
|
4136
|
-
l("span",
|
|
4190
|
+
l("span", qr, v(s.dateLabel), 1),
|
|
4137
4191
|
t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
|
|
4138
4192
|
])) : b("", !0),
|
|
4139
4193
|
(c(!0), d(E, null, N(n.groups, (S, z) => (c(), d(E, {
|
|
4140
4194
|
key: S.key
|
|
4141
4195
|
}, [
|
|
4142
|
-
S.key === n.unreadGroupKey ? (c(), d("div",
|
|
4196
|
+
S.key === n.unreadGroupKey ? (c(), d("div", Vr, [
|
|
4143
4197
|
t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
4144
|
-
l("span",
|
|
4198
|
+
l("span", Kr, v(n.t("messageList.unread")), 1),
|
|
4145
4199
|
t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
4146
4200
|
])) : b("", !0),
|
|
4147
4201
|
S.role === "system" || S.items.length ? (c(), d("div", {
|
|
4148
4202
|
key: 1,
|
|
4149
|
-
class:
|
|
4203
|
+
class: x(["wm-list__group", "wm-list__group--" + S.role])
|
|
4150
4204
|
}, [
|
|
4151
|
-
S.role === "system" ? (c(), d("div",
|
|
4205
|
+
S.role === "system" ? (c(), d("div", Wr, [
|
|
4152
4206
|
t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
4153
|
-
l("span",
|
|
4207
|
+
l("span", $r, v(S.systemLabel), 1),
|
|
4154
4208
|
t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
4155
4209
|
])) : (c(), d(E, { key: 1 }, [
|
|
4156
4210
|
(c(!0), d(E, null, N(S.items, (M, D) => (c(), d(E, {
|
|
@@ -4158,7 +4212,7 @@ function ai(e, t, s, r, i, n) {
|
|
|
4158
4212
|
}, [
|
|
4159
4213
|
l("div", {
|
|
4160
4214
|
"data-row-key": `${n.messageKey(M.message)}-${M.partKey}`,
|
|
4161
|
-
class:
|
|
4215
|
+
class: x(["wm-list__row fade-up", [
|
|
4162
4216
|
"wm-list__row--" + S.role,
|
|
4163
4217
|
{
|
|
4164
4218
|
"is-pending": M.message._pending,
|
|
@@ -4166,14 +4220,14 @@ function ai(e, t, s, r, i, n) {
|
|
|
4166
4220
|
}
|
|
4167
4221
|
]]),
|
|
4168
4222
|
style: F(n.cornersStyle(S, D)),
|
|
4169
|
-
onPointerdown: (
|
|
4170
|
-
onPointerup: t[0] || (t[0] = (
|
|
4171
|
-
onPointercancel: t[1] || (t[1] = (
|
|
4172
|
-
onPointerleave: t[2] || (t[2] = (
|
|
4223
|
+
onPointerdown: (O) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
|
|
4224
|
+
onPointerup: t[0] || (t[0] = (O) => n.onPressEnd()),
|
|
4225
|
+
onPointercancel: t[1] || (t[1] = (O) => n.onPressEnd()),
|
|
4226
|
+
onPointerleave: t[2] || (t[2] = (O) => n.onPressEnd()),
|
|
4173
4227
|
onContextmenu: t[3] || (t[3] = G(() => {
|
|
4174
4228
|
}, ["prevent"]))
|
|
4175
4229
|
}, [
|
|
4176
|
-
S.role !== "user" ? (c(), d("div",
|
|
4230
|
+
S.role !== "user" ? (c(), d("div", Yr, [
|
|
4177
4231
|
D === S.items.length - 1 ? (c(), d(E, { key: 0 }, [
|
|
4178
4232
|
S.role === "ai" ? (c(), B(a, {
|
|
4179
4233
|
key: 0,
|
|
@@ -4208,7 +4262,7 @@ function ai(e, t, s, r, i, n) {
|
|
|
4208
4262
|
artifact: n.artifactOf(M.message)
|
|
4209
4263
|
}, null, 8, ["artifact"])) : (c(), d("div", {
|
|
4210
4264
|
key: 5,
|
|
4211
|
-
class:
|
|
4265
|
+
class: x(["wm-list__body", {
|
|
4212
4266
|
"wm-list__body--mixed": !!M.message.text_md && n.attachmentsOf(M.message).length > 0
|
|
4213
4267
|
}])
|
|
4214
4268
|
}, [
|
|
@@ -4219,7 +4273,7 @@ function ai(e, t, s, r, i, n) {
|
|
|
4219
4273
|
}, null, 8, ["role", "text"])) : b("", !0),
|
|
4220
4274
|
n.attachmentsOf(M.message).length ? (c(), d("div", {
|
|
4221
4275
|
key: 1,
|
|
4222
|
-
class:
|
|
4276
|
+
class: x(["wm-list__atts", {
|
|
4223
4277
|
"wm-list__atts--align-end": S.role === "user",
|
|
4224
4278
|
"wm-list__atts--mosaic": n.attachmentsOf(M.message).length >= 2
|
|
4225
4279
|
}]),
|
|
@@ -4231,9 +4285,9 @@ function ai(e, t, s, r, i, n) {
|
|
|
4231
4285
|
}, [
|
|
4232
4286
|
(c(!0), d(E, null, N(n.attachmentsOf(
|
|
4233
4287
|
M.message
|
|
4234
|
-
), (
|
|
4288
|
+
), (O, q) => (c(), B(T, {
|
|
4235
4289
|
key: `${n.messageKey(M.message)}-att-${q}`,
|
|
4236
|
-
attachment:
|
|
4290
|
+
attachment: O,
|
|
4237
4291
|
style: F(
|
|
4238
4292
|
n.mosaicCornerStyle(
|
|
4239
4293
|
q,
|
|
@@ -4244,29 +4298,29 @@ function ai(e, t, s, r, i, n) {
|
|
|
4244
4298
|
}, null, 8, ["attachment", "style"]))), 128))
|
|
4245
4299
|
], 6)) : b("", !0)
|
|
4246
4300
|
], 2))
|
|
4247
|
-
], 46,
|
|
4301
|
+
], 46, Gr),
|
|
4248
4302
|
D < S.items.length - 1 && i.pressedItemKey === `${n.messageKey(M.message)}-${M.partKey}` && (S.role !== "user" || n.timeOf(M.message)) ? (c(), d("div", {
|
|
4249
4303
|
key: 0,
|
|
4250
|
-
class:
|
|
4304
|
+
class: x(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": S.role === "user" }])
|
|
4251
4305
|
}, [
|
|
4252
|
-
S.role !== "user" ? (c(), d("span",
|
|
4253
|
-
S.role !== "user" && n.timeOf(M.message) ? (c(), d("span",
|
|
4254
|
-
n.timeOf(M.message) ? (c(), d("span",
|
|
4306
|
+
S.role !== "user" ? (c(), d("span", Jr, v(n.roleLabel(S)), 1)) : b("", !0),
|
|
4307
|
+
S.role !== "user" && n.timeOf(M.message) ? (c(), d("span", Xr, "•")) : b("", !0),
|
|
4308
|
+
n.timeOf(M.message) ? (c(), d("span", Qr, v(n.timeOf(M.message)), 1)) : b("", !0)
|
|
4255
4309
|
], 2)) : b("", !0)
|
|
4256
4310
|
], 64))), 128)),
|
|
4257
4311
|
(S.role !== "user" || n.lastTimeOf(S)) && !n.hasTrailingOverlay(S) ? (c(), d("div", {
|
|
4258
4312
|
key: 0,
|
|
4259
|
-
class:
|
|
4313
|
+
class: x(["wm-list__meta", { "wm-list__meta--right": S.role === "user" }])
|
|
4260
4314
|
}, [
|
|
4261
|
-
S.role !== "user" ? (c(), d("span",
|
|
4262
|
-
S.role !== "user" && n.lastTimeOf(S) ? (c(), d("span",
|
|
4263
|
-
n.lastTimeOf(S) ? (c(), d("span",
|
|
4315
|
+
S.role !== "user" ? (c(), d("span", Zr, v(n.roleLabel(S)), 1)) : b("", !0),
|
|
4316
|
+
S.role !== "user" && n.lastTimeOf(S) ? (c(), d("span", ei, "•")) : b("", !0),
|
|
4317
|
+
n.lastTimeOf(S) ? (c(), d("span", ti, v(n.lastTimeOf(S)), 1)) : b("", !0)
|
|
4264
4318
|
], 2)) : b("", !0)
|
|
4265
4319
|
], 64))
|
|
4266
4320
|
], 2)) : b("", !0)
|
|
4267
4321
|
], 64))), 128)),
|
|
4268
|
-
s.streamingActive ? (c(), d("div",
|
|
4269
|
-
l("div",
|
|
4322
|
+
s.streamingActive ? (c(), d("div", ni, [
|
|
4323
|
+
l("div", si, [
|
|
4270
4324
|
K(a, {
|
|
4271
4325
|
size: 26,
|
|
4272
4326
|
tail: !0,
|
|
@@ -4300,14 +4354,14 @@ function ai(e, t, s, r, i, n) {
|
|
|
4300
4354
|
}, [
|
|
4301
4355
|
l("path", { d: "M6 9l6 6 6-6" })
|
|
4302
4356
|
], -1)
|
|
4303
|
-
])], 8,
|
|
4357
|
+
])], 8, ri)) : b("", !0)
|
|
4304
4358
|
]),
|
|
4305
4359
|
_: 1
|
|
4306
4360
|
})
|
|
4307
4361
|
]);
|
|
4308
4362
|
}
|
|
4309
|
-
const
|
|
4310
|
-
function
|
|
4363
|
+
const ai = /* @__PURE__ */ U(Dr, [["render", ii], ["__scopeId", "data-v-79b30a8f"]]), ge = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Le = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
4364
|
+
function oi() {
|
|
4311
4365
|
return Le && [
|
|
4312
4366
|
"video/webm;codecs=vp9,opus",
|
|
4313
4367
|
"video/webm;codecs=vp8,opus",
|
|
@@ -4327,10 +4381,10 @@ function Ke({ audio: e }) {
|
|
|
4327
4381
|
systemAudio: e ? "include" : "exclude"
|
|
4328
4382
|
};
|
|
4329
4383
|
}
|
|
4330
|
-
function
|
|
4384
|
+
function go(e) {
|
|
4331
4385
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
4332
4386
|
}
|
|
4333
|
-
async function
|
|
4387
|
+
async function li() {
|
|
4334
4388
|
if (!ge) return null;
|
|
4335
4389
|
let e;
|
|
4336
4390
|
try {
|
|
@@ -4341,7 +4395,7 @@ async function ci() {
|
|
|
4341
4395
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
4342
4396
|
}
|
|
4343
4397
|
try {
|
|
4344
|
-
return await
|
|
4398
|
+
return await ci(e);
|
|
4345
4399
|
} catch (t) {
|
|
4346
4400
|
return console.error("[media] screenshot capture", t), null;
|
|
4347
4401
|
} finally {
|
|
@@ -4350,7 +4404,7 @@ async function ci() {
|
|
|
4350
4404
|
});
|
|
4351
4405
|
}
|
|
4352
4406
|
}
|
|
4353
|
-
async function
|
|
4407
|
+
async function ci(e) {
|
|
4354
4408
|
const t = document.createElement("video");
|
|
4355
4409
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
|
|
4356
4410
|
const s = t.videoWidth || 1280, r = t.videoHeight || 720, i = document.createElement("canvas");
|
|
@@ -4363,7 +4417,7 @@ async function di(e) {
|
|
|
4363
4417
|
}), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
4364
4418
|
return new File([n], `capture-${a}.png`, { type: "image/png" });
|
|
4365
4419
|
}
|
|
4366
|
-
async function
|
|
4420
|
+
async function di(e = {}) {
|
|
4367
4421
|
var k;
|
|
4368
4422
|
if (!ge || !Le) return null;
|
|
4369
4423
|
let t;
|
|
@@ -4374,7 +4428,7 @@ async function ui(e = {}) {
|
|
|
4374
4428
|
} catch (y) {
|
|
4375
4429
|
return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
|
|
4376
4430
|
}
|
|
4377
|
-
const s =
|
|
4431
|
+
const s = oi();
|
|
4378
4432
|
let r;
|
|
4379
4433
|
try {
|
|
4380
4434
|
r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
|
|
@@ -4428,7 +4482,7 @@ async function ui(e = {}) {
|
|
|
4428
4482
|
}
|
|
4429
4483
|
};
|
|
4430
4484
|
}
|
|
4431
|
-
const
|
|
4485
|
+
const ui = [
|
|
4432
4486
|
{
|
|
4433
4487
|
action: "file",
|
|
4434
4488
|
labelKey: "composer.attachFile",
|
|
@@ -4478,7 +4532,7 @@ const mi = [
|
|
|
4478
4532
|
return !this.disabled && !!this.local.trim();
|
|
4479
4533
|
},
|
|
4480
4534
|
attachItems() {
|
|
4481
|
-
return
|
|
4535
|
+
return ui.map((e) => ({
|
|
4482
4536
|
...e,
|
|
4483
4537
|
label: this.t(e.labelKey),
|
|
4484
4538
|
disabled: e.action === "screenshot" && !ge || e.action === "record" && (!ge || !Le)
|
|
@@ -4552,13 +4606,13 @@ const mi = [
|
|
|
4552
4606
|
},
|
|
4553
4607
|
async captureScreenshot() {
|
|
4554
4608
|
if (this.disabled) return;
|
|
4555
|
-
const e = await
|
|
4609
|
+
const e = await li();
|
|
4556
4610
|
e && this.$emit("attach", e);
|
|
4557
4611
|
},
|
|
4558
4612
|
async startRecording() {
|
|
4559
4613
|
if (this.recording || this.disabled) return;
|
|
4560
4614
|
this.recordingElapsed = 0;
|
|
4561
|
-
const e = await
|
|
4615
|
+
const e = await di({
|
|
4562
4616
|
onstart: () => {
|
|
4563
4617
|
this.recording = !0;
|
|
4564
4618
|
},
|
|
@@ -4600,30 +4654,30 @@ const mi = [
|
|
|
4600
4654
|
!e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
|
|
4601
4655
|
}
|
|
4602
4656
|
}
|
|
4603
|
-
},
|
|
4657
|
+
}, mi = {
|
|
4604
4658
|
key: 0,
|
|
4605
4659
|
class: "wm-rec"
|
|
4606
|
-
},
|
|
4660
|
+
}, fi = { class: "wm-rec__lbl" }, _i = {
|
|
4607
4661
|
key: 1,
|
|
4608
4662
|
class: "wm-compose__menu",
|
|
4609
4663
|
role: "menu"
|
|
4610
|
-
},
|
|
4664
|
+
}, gi = ["disabled", "onClick"], vi = { class: "wm-compose__menuIcon" }, yi = {
|
|
4611
4665
|
viewBox: "0 0 24 24",
|
|
4612
4666
|
width: "14",
|
|
4613
4667
|
height: "14",
|
|
4614
4668
|
"aria-hidden": "true"
|
|
4615
|
-
},
|
|
4616
|
-
function
|
|
4669
|
+
}, pi = ["d"], wi = ["placeholder", "disabled"], bi = { class: "wm-compose__actions" }, ki = ["title", "aria-label", "disabled"], Ci = ["disabled", "aria-label"];
|
|
4670
|
+
function Ai(e, t, s, r, i, n) {
|
|
4617
4671
|
return c(), d("div", {
|
|
4618
|
-
class:
|
|
4672
|
+
class: x(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
|
|
4619
4673
|
style: F(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
|
|
4620
4674
|
}, [
|
|
4621
|
-
i.recording ? (c(), d("div",
|
|
4675
|
+
i.recording ? (c(), d("div", mi, [
|
|
4622
4676
|
t[8] || (t[8] = l("span", {
|
|
4623
4677
|
class: "wm-rec__dot",
|
|
4624
4678
|
"aria-hidden": "true"
|
|
4625
4679
|
}, null, -1)),
|
|
4626
|
-
l("span",
|
|
4680
|
+
l("span", fi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
|
|
4627
4681
|
l("button", {
|
|
4628
4682
|
type: "button",
|
|
4629
4683
|
class: "wm-rec__stop",
|
|
@@ -4631,7 +4685,7 @@ function Si(e, t, s, r, i, n) {
|
|
|
4631
4685
|
}, v(n.t("composer.stop")), 1)
|
|
4632
4686
|
])) : b("", !0),
|
|
4633
4687
|
l("form", {
|
|
4634
|
-
class:
|
|
4688
|
+
class: x(["wm-compose", { "has-attach": i.attachOpen }]),
|
|
4635
4689
|
onSubmit: t[7] || (t[7] = G((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
|
|
4636
4690
|
}, [
|
|
4637
4691
|
l("input", {
|
|
@@ -4646,7 +4700,7 @@ function Si(e, t, s, r, i, n) {
|
|
|
4646
4700
|
class: "wm-compose__overlay",
|
|
4647
4701
|
onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
|
|
4648
4702
|
})) : b("", !0),
|
|
4649
|
-
i.attachOpen ? (c(), d("div",
|
|
4703
|
+
i.attachOpen ? (c(), d("div", _i, [
|
|
4650
4704
|
(c(!0), d(E, null, N(n.attachItems, (a) => (c(), d("button", {
|
|
4651
4705
|
key: a.action,
|
|
4652
4706
|
type: "button",
|
|
@@ -4654,8 +4708,8 @@ function Si(e, t, s, r, i, n) {
|
|
|
4654
4708
|
disabled: a.disabled,
|
|
4655
4709
|
onClick: (o) => n.onAttachAction(a.action)
|
|
4656
4710
|
}, [
|
|
4657
|
-
l("span",
|
|
4658
|
-
(c(), d("svg",
|
|
4711
|
+
l("span", vi, [
|
|
4712
|
+
(c(), d("svg", yi, [
|
|
4659
4713
|
l("path", {
|
|
4660
4714
|
d: a.path,
|
|
4661
4715
|
stroke: "currentColor",
|
|
@@ -4663,28 +4717,28 @@ function Si(e, t, s, r, i, n) {
|
|
|
4663
4717
|
"stroke-linecap": "round",
|
|
4664
4718
|
"stroke-linejoin": "round",
|
|
4665
4719
|
fill: "none"
|
|
4666
|
-
}, null, 8,
|
|
4720
|
+
}, null, 8, pi)
|
|
4667
4721
|
]))
|
|
4668
4722
|
]),
|
|
4669
4723
|
l("span", null, v(a.label), 1)
|
|
4670
|
-
], 8,
|
|
4724
|
+
], 8, gi))), 128))
|
|
4671
4725
|
])) : b("", !0),
|
|
4672
4726
|
$(l("textarea", {
|
|
4673
4727
|
ref: "inputEl",
|
|
4674
4728
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => i.local = a),
|
|
4675
4729
|
class: "wm-compose__input",
|
|
4676
|
-
rows: "
|
|
4730
|
+
rows: "1",
|
|
4677
4731
|
placeholder: s.placeholder,
|
|
4678
4732
|
disabled: s.disabled,
|
|
4679
4733
|
onKeydown: t[4] || (t[4] = (...a) => n.onKeydown && n.onKeydown(...a)),
|
|
4680
4734
|
onInput: t[5] || (t[5] = (...a) => n.autosize && n.autosize(...a))
|
|
4681
|
-
}, null, 40,
|
|
4735
|
+
}, null, 40, wi), [
|
|
4682
4736
|
[ee, i.local]
|
|
4683
4737
|
]),
|
|
4684
|
-
l("div",
|
|
4738
|
+
l("div", bi, [
|
|
4685
4739
|
l("button", {
|
|
4686
4740
|
type: "button",
|
|
4687
|
-
class:
|
|
4741
|
+
class: x(["wm-compose__icon", { "is-open": i.attachOpen }]),
|
|
4688
4742
|
title: s.attachLabel,
|
|
4689
4743
|
"aria-label": s.attachLabel,
|
|
4690
4744
|
disabled: i.recording,
|
|
@@ -4703,16 +4757,16 @@ function Si(e, t, s, r, i, n) {
|
|
|
4703
4757
|
}, [
|
|
4704
4758
|
l("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
|
|
4705
4759
|
], -1)
|
|
4706
|
-
])], 10,
|
|
4760
|
+
])], 10, ki),
|
|
4707
4761
|
l("button", {
|
|
4708
4762
|
type: "submit",
|
|
4709
|
-
class:
|
|
4763
|
+
class: x(["wm-compose__send", { "is-empty": !n.canSend }]),
|
|
4710
4764
|
disabled: !n.canSend,
|
|
4711
4765
|
"aria-label": n.t("composer.send")
|
|
4712
4766
|
}, [...t[10] || (t[10] = [
|
|
4713
4767
|
l("svg", {
|
|
4714
|
-
width: "
|
|
4715
|
-
height: "
|
|
4768
|
+
width: "16",
|
|
4769
|
+
height: "16",
|
|
4716
4770
|
viewBox: "0 0 24 24",
|
|
4717
4771
|
fill: "none",
|
|
4718
4772
|
stroke: "currentColor",
|
|
@@ -4723,12 +4777,12 @@ function Si(e, t, s, r, i, n) {
|
|
|
4723
4777
|
}, [
|
|
4724
4778
|
l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4725
4779
|
], -1)
|
|
4726
|
-
])], 10,
|
|
4780
|
+
])], 10, Ci)
|
|
4727
4781
|
])
|
|
4728
4782
|
], 34)
|
|
4729
4783
|
], 6);
|
|
4730
4784
|
}
|
|
4731
|
-
const
|
|
4785
|
+
const Si = /* @__PURE__ */ U(hi, [["render", Ai], ["__scopeId", "data-v-3c5bccae"]]), Ti = {
|
|
4732
4786
|
name: "WmInlineCallbacks",
|
|
4733
4787
|
props: {
|
|
4734
4788
|
// Array d'items `{ id?, label, style?, ... }`. Pour les suggestions,
|
|
@@ -4766,14 +4820,14 @@ const Ti = /* @__PURE__ */ U(hi, [["render", Si], ["__scopeId", "data-v-bba29b9c
|
|
|
4766
4820
|
return this.variant === "chips" ? "wm-icb__btn--chip" : ["wm-icb__btn--action", `wm-icb__btn--${(e == null ? void 0 : e.style) || "neutral"}`];
|
|
4767
4821
|
}
|
|
4768
4822
|
}
|
|
4769
|
-
},
|
|
4823
|
+
}, Mi = ["onClick"], xi = {
|
|
4770
4824
|
key: 0,
|
|
4771
4825
|
class: "wm-icb__title"
|
|
4772
|
-
},
|
|
4773
|
-
function
|
|
4826
|
+
}, Oi = { class: "wm-icb__row" }, Ri = ["onClick"];
|
|
4827
|
+
function Li(e, t, s, r, i, n) {
|
|
4774
4828
|
return s.items.length ? (c(), d("div", {
|
|
4775
4829
|
key: n.batchKey,
|
|
4776
|
-
class:
|
|
4830
|
+
class: x(["wm-icb", `wm-icb--${s.variant}`])
|
|
4777
4831
|
}, [
|
|
4778
4832
|
s.variant === "chips" ? (c(!0), d(E, { key: 0 }, N(s.items, (a, o) => (c(), d("button", {
|
|
4779
4833
|
key: a.id != null ? a.id : o,
|
|
@@ -4781,22 +4835,22 @@ function Ii(e, t, s, r, i, n) {
|
|
|
4781
4835
|
class: "wm-icb__btn wm-icb__btn--chip",
|
|
4782
4836
|
style: F({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
|
|
4783
4837
|
onClick: (f) => e.$emit("select", a)
|
|
4784
|
-
}, v(a.label), 13,
|
|
4785
|
-
n.headerTitle ? (c(), d("div",
|
|
4786
|
-
l("div",
|
|
4838
|
+
}, v(a.label), 13, Mi))), 128)) : (c(), d(E, { key: 1 }, [
|
|
4839
|
+
n.headerTitle ? (c(), d("div", xi, v(n.headerTitle), 1)) : b("", !0),
|
|
4840
|
+
l("div", Oi, [
|
|
4787
4841
|
(c(!0), d(E, null, N(s.items, (a, o) => (c(), d("button", {
|
|
4788
4842
|
key: a.id != null ? a.id : o,
|
|
4789
4843
|
type: "button",
|
|
4790
|
-
class:
|
|
4844
|
+
class: x(["wm-icb__btn", n.btnClass(a)]),
|
|
4791
4845
|
onClick: (f) => e.$emit("select", a)
|
|
4792
|
-
}, v(a.label), 11,
|
|
4846
|
+
}, v(a.label), 11, Ri))), 128))
|
|
4793
4847
|
])
|
|
4794
4848
|
], 64))
|
|
4795
4849
|
], 2)) : b("", !0);
|
|
4796
4850
|
}
|
|
4797
|
-
const
|
|
4851
|
+
const Ii = /* @__PURE__ */ U(Ti, [["render", Li], ["__scopeId", "data-v-c8cc8cbf"]]);
|
|
4798
4852
|
let Fe = 0;
|
|
4799
|
-
const
|
|
4853
|
+
const Ei = /* @__PURE__ */ new Set([
|
|
4800
4854
|
"text",
|
|
4801
4855
|
"textarea",
|
|
4802
4856
|
"number",
|
|
@@ -4804,9 +4858,9 @@ const Bi = /* @__PURE__ */ new Set([
|
|
|
4804
4858
|
"select",
|
|
4805
4859
|
"multiselect",
|
|
4806
4860
|
"date"
|
|
4807
|
-
]),
|
|
4861
|
+
]), Bi = {
|
|
4808
4862
|
name: "WmFormCard",
|
|
4809
|
-
components: { AIAvatar:
|
|
4863
|
+
components: { AIAvatar: me },
|
|
4810
4864
|
inject: {
|
|
4811
4865
|
// Translator shared by the Messenger shell; French fallback when
|
|
4812
4866
|
// the component is used standalone.
|
|
@@ -4834,7 +4888,7 @@ const Bi = /* @__PURE__ */ new Set([
|
|
|
4834
4888
|
// douteux.
|
|
4835
4889
|
normalizedFields() {
|
|
4836
4890
|
var t;
|
|
4837
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !
|
|
4891
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Ei.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
|
|
4838
4892
|
}
|
|
4839
4893
|
},
|
|
4840
4894
|
created() {
|
|
@@ -4887,47 +4941,47 @@ const Bi = /* @__PURE__ */ new Set([
|
|
|
4887
4941
|
}
|
|
4888
4942
|
}
|
|
4889
4943
|
}
|
|
4890
|
-
},
|
|
4944
|
+
}, Pi = { class: "wm-form" }, Ui = { class: "wm-form__head" }, Di = { class: "wm-form__icon" }, Ni = { class: "wm-form__main" }, Fi = { class: "wm-form__title" }, Hi = {
|
|
4891
4945
|
key: 0,
|
|
4892
4946
|
class: "wm-form__detail"
|
|
4893
|
-
},
|
|
4947
|
+
}, ji = ["for"], zi = {
|
|
4894
4948
|
key: 0,
|
|
4895
4949
|
class: "wm-form__req",
|
|
4896
4950
|
"aria-hidden": "true"
|
|
4897
|
-
},
|
|
4951
|
+
}, qi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Vi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Wi = ["id", "onUpdate:modelValue", "required", "disabled"], $i = {
|
|
4898
4952
|
key: 4,
|
|
4899
4953
|
class: "wm-form__bool"
|
|
4900
|
-
},
|
|
4954
|
+
}, Gi = ["id", "onUpdate:modelValue", "disabled"], Yi = ["id", "onUpdate:modelValue", "required", "disabled"], Ji = {
|
|
4901
4955
|
value: "",
|
|
4902
4956
|
disabled: ""
|
|
4903
|
-
},
|
|
4957
|
+
}, Xi = ["value"], Qi = {
|
|
4904
4958
|
key: 6,
|
|
4905
4959
|
class: "wm-form__multi"
|
|
4906
|
-
},
|
|
4960
|
+
}, Zi = ["value", "checked", "disabled", "onChange"], ea = {
|
|
4907
4961
|
key: 0,
|
|
4908
4962
|
class: "wm-form__err"
|
|
4909
|
-
},
|
|
4963
|
+
}, ta = ["disabled"], na = {
|
|
4910
4964
|
key: 0,
|
|
4911
4965
|
class: "wm-form__spinner",
|
|
4912
4966
|
"aria-hidden": "true"
|
|
4913
|
-
},
|
|
4967
|
+
}, sa = {
|
|
4914
4968
|
key: 2,
|
|
4915
4969
|
class: "wm-form__doneLbl"
|
|
4916
4970
|
};
|
|
4917
|
-
function
|
|
4971
|
+
function ra(e, t, s, r, i, n) {
|
|
4918
4972
|
const a = P("AIAvatar");
|
|
4919
|
-
return c(), d("div",
|
|
4920
|
-
l("div",
|
|
4921
|
-
l("div",
|
|
4973
|
+
return c(), d("div", Pi, [
|
|
4974
|
+
l("div", Ui, [
|
|
4975
|
+
l("div", Di, [
|
|
4922
4976
|
K(a, {
|
|
4923
4977
|
size: 24,
|
|
4924
4978
|
name: s.agentName,
|
|
4925
4979
|
"image-url": s.agentAvatarUrl
|
|
4926
4980
|
}, null, 8, ["name", "image-url"])
|
|
4927
4981
|
]),
|
|
4928
|
-
l("div",
|
|
4929
|
-
l("div",
|
|
4930
|
-
s.form.description ? (c(), d("div",
|
|
4982
|
+
l("div", Ni, [
|
|
4983
|
+
l("div", Fi, v(s.form.title || n.t("form.title")), 1),
|
|
4984
|
+
s.form.description ? (c(), d("div", Hi, v(s.form.description), 1)) : b("", !0)
|
|
4931
4985
|
])
|
|
4932
4986
|
]),
|
|
4933
4987
|
l("form", {
|
|
@@ -4943,8 +4997,8 @@ function ia(e, t, s, r, i, n) {
|
|
|
4943
4997
|
class: "wm-form__label"
|
|
4944
4998
|
}, [
|
|
4945
4999
|
Me(v(o.label), 1),
|
|
4946
|
-
o.required ? (c(), d("span",
|
|
4947
|
-
], 8,
|
|
5000
|
+
o.required ? (c(), d("span", zi, "*")) : b("", !0)
|
|
5001
|
+
], 8, ji),
|
|
4948
5002
|
o.type === "text" ? $((c(), d("input", {
|
|
4949
5003
|
key: 0,
|
|
4950
5004
|
id: `wm-f-${i._uid}-${o.key}`,
|
|
@@ -4954,7 +5008,7 @@ function ia(e, t, s, r, i, n) {
|
|
|
4954
5008
|
placeholder: o.placeholder || "",
|
|
4955
5009
|
required: o.required,
|
|
4956
5010
|
disabled: s.readOnly || i.busy
|
|
4957
|
-
}, null, 8,
|
|
5011
|
+
}, null, 8, qi)), [
|
|
4958
5012
|
[ee, i.values[o.key]]
|
|
4959
5013
|
]) : o.type === "textarea" ? $((c(), d("textarea", {
|
|
4960
5014
|
key: 1,
|
|
@@ -4965,7 +5019,7 @@ function ia(e, t, s, r, i, n) {
|
|
|
4965
5019
|
placeholder: o.placeholder || "",
|
|
4966
5020
|
required: o.required,
|
|
4967
5021
|
disabled: s.readOnly || i.busy
|
|
4968
|
-
}, null, 8,
|
|
5022
|
+
}, null, 8, Vi)), [
|
|
4969
5023
|
[ee, i.values[o.key]]
|
|
4970
5024
|
]) : o.type === "number" ? $((c(), d("input", {
|
|
4971
5025
|
key: 2,
|
|
@@ -4976,7 +5030,7 @@ function ia(e, t, s, r, i, n) {
|
|
|
4976
5030
|
placeholder: o.placeholder || "",
|
|
4977
5031
|
required: o.required,
|
|
4978
5032
|
disabled: s.readOnly || i.busy
|
|
4979
|
-
}, null, 8,
|
|
5033
|
+
}, null, 8, Ki)), [
|
|
4980
5034
|
[
|
|
4981
5035
|
ee,
|
|
4982
5036
|
i.values[o.key],
|
|
@@ -4991,15 +5045,15 @@ function ia(e, t, s, r, i, n) {
|
|
|
4991
5045
|
class: "wm-form__input",
|
|
4992
5046
|
required: o.required,
|
|
4993
5047
|
disabled: s.readOnly || i.busy
|
|
4994
|
-
}, null, 8,
|
|
5048
|
+
}, null, 8, Wi)), [
|
|
4995
5049
|
[ee, i.values[o.key]]
|
|
4996
|
-
]) : o.type === "boolean" ? (c(), d("label",
|
|
5050
|
+
]) : o.type === "boolean" ? (c(), d("label", $i, [
|
|
4997
5051
|
$(l("input", {
|
|
4998
5052
|
id: `wm-f-${i._uid}-${o.key}`,
|
|
4999
5053
|
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
5000
5054
|
type: "checkbox",
|
|
5001
5055
|
disabled: s.readOnly || i.busy
|
|
5002
|
-
}, null, 8,
|
|
5056
|
+
}, null, 8, Gi), [
|
|
5003
5057
|
[Ge, i.values[o.key]]
|
|
5004
5058
|
]),
|
|
5005
5059
|
l("span", null, v(o.placeholder || n.t("common.yes")), 1)
|
|
@@ -5011,14 +5065,14 @@ function ia(e, t, s, r, i, n) {
|
|
|
5011
5065
|
required: o.required,
|
|
5012
5066
|
disabled: s.readOnly || i.busy
|
|
5013
5067
|
}, [
|
|
5014
|
-
l("option",
|
|
5068
|
+
l("option", Ji, v(o.placeholder || n.t("form.choose")), 1),
|
|
5015
5069
|
(c(!0), d(E, null, N(o.options, (f) => (c(), d("option", {
|
|
5016
5070
|
key: f.value,
|
|
5017
5071
|
value: f.value
|
|
5018
|
-
}, v(f.label), 9,
|
|
5019
|
-
], 8,
|
|
5072
|
+
}, v(f.label), 9, Xi))), 128))
|
|
5073
|
+
], 8, Yi)), [
|
|
5020
5074
|
[Ye, i.values[o.key]]
|
|
5021
|
-
]) : o.type === "multiselect" ? (c(), d("div",
|
|
5075
|
+
]) : o.type === "multiselect" ? (c(), d("div", Qi, [
|
|
5022
5076
|
(c(!0), d(E, null, N(o.options, (f) => (c(), d("label", {
|
|
5023
5077
|
key: f.value,
|
|
5024
5078
|
class: "wm-form__multiItem"
|
|
@@ -5033,25 +5087,25 @@ function ia(e, t, s, r, i, n) {
|
|
|
5033
5087
|
f.value,
|
|
5034
5088
|
k.target.checked
|
|
5035
5089
|
)
|
|
5036
|
-
}, null, 40,
|
|
5090
|
+
}, null, 40, Zi),
|
|
5037
5091
|
l("span", null, v(f.label), 1)
|
|
5038
5092
|
]))), 128))
|
|
5039
5093
|
])) : b("", !0)
|
|
5040
5094
|
]))), 128)),
|
|
5041
|
-
i.error ? (c(), d("div",
|
|
5042
|
-
s.readOnly ? (c(), d("div",
|
|
5095
|
+
i.error ? (c(), d("div", ea, v(i.error), 1)) : b("", !0),
|
|
5096
|
+
s.readOnly ? (c(), d("div", sa, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
|
|
5043
5097
|
key: 1,
|
|
5044
5098
|
type: "submit",
|
|
5045
5099
|
class: "wm-form__submit",
|
|
5046
5100
|
disabled: i.busy
|
|
5047
5101
|
}, [
|
|
5048
|
-
i.busy ? (c(), d("span",
|
|
5102
|
+
i.busy ? (c(), d("span", na)) : b("", !0),
|
|
5049
5103
|
l("span", null, v(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
|
|
5050
|
-
], 8,
|
|
5104
|
+
], 8, ta))
|
|
5051
5105
|
], 32)
|
|
5052
5106
|
]);
|
|
5053
5107
|
}
|
|
5054
|
-
const
|
|
5108
|
+
const ia = /* @__PURE__ */ U(Bi, [["render", ra], ["__scopeId", "data-v-fe65cc56"]]), aa = {
|
|
5055
5109
|
name: "WmFeedback",
|
|
5056
5110
|
inject: {
|
|
5057
5111
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5085,13 +5139,13 @@ const aa = /* @__PURE__ */ U(Pi, [["render", ia], ["__scopeId", "data-v-fe65cc56
|
|
|
5085
5139
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
5086
5140
|
}
|
|
5087
5141
|
}
|
|
5088
|
-
},
|
|
5142
|
+
}, oa = { class: "wm-fb" }, la = { class: "wm-fb__title" }, ca = { class: "wm-fb__sub" }, da = { class: "wm-fb__row" }, ua = ["onClick"], ha = { class: "wm-fb__emoji" }, ma = { class: "wm-fb__label" }, fa = ["disabled"], _a = {
|
|
5089
5143
|
key: 1,
|
|
5090
5144
|
class: "wm-fb__done"
|
|
5091
|
-
},
|
|
5092
|
-
function
|
|
5093
|
-
return c(), d("div",
|
|
5094
|
-
s.done ? (c(), d("div",
|
|
5145
|
+
}, ga = { class: "wm-fb__doneTitle" }, va = { class: "wm-fb__doneSub" };
|
|
5146
|
+
function ya(e, t, s, r, i, n) {
|
|
5147
|
+
return c(), d("div", oa, [
|
|
5148
|
+
s.done ? (c(), d("div", _a, [
|
|
5095
5149
|
t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
|
|
5096
5150
|
l("svg", {
|
|
5097
5151
|
width: "16",
|
|
@@ -5107,32 +5161,32 @@ function pa(e, t, s, r, i, n) {
|
|
|
5107
5161
|
l("path", { d: "M20 6L9 17l-5-5" })
|
|
5108
5162
|
])
|
|
5109
5163
|
], -1)),
|
|
5110
|
-
l("div",
|
|
5111
|
-
l("div",
|
|
5164
|
+
l("div", ga, v(n.t("feedback.doneTitle")), 1),
|
|
5165
|
+
l("div", va, v(n.t("feedback.doneSubtitle")), 1)
|
|
5112
5166
|
])) : (c(), d(E, { key: 0 }, [
|
|
5113
|
-
l("div",
|
|
5114
|
-
l("div",
|
|
5115
|
-
l("div",
|
|
5167
|
+
l("div", la, v(n.t("feedback.question")), 1),
|
|
5168
|
+
l("div", ca, v(n.t("feedback.subtitle")), 1),
|
|
5169
|
+
l("div", da, [
|
|
5116
5170
|
(c(!0), d(E, null, N(n.options, (a) => (c(), d("button", {
|
|
5117
5171
|
key: a.v,
|
|
5118
5172
|
type: "button",
|
|
5119
|
-
class:
|
|
5173
|
+
class: x(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
|
|
5120
5174
|
onClick: (o) => i.sel = a.v
|
|
5121
5175
|
}, [
|
|
5122
5176
|
l("span", ha, v(a.e), 1),
|
|
5123
|
-
l("span",
|
|
5124
|
-
], 10,
|
|
5177
|
+
l("span", ma, v(a.l), 1)
|
|
5178
|
+
], 10, ua))), 128))
|
|
5125
5179
|
]),
|
|
5126
5180
|
l("button", {
|
|
5127
5181
|
type: "button",
|
|
5128
5182
|
class: "wm-fb__send",
|
|
5129
5183
|
disabled: !i.sel || s.busy,
|
|
5130
5184
|
onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
|
|
5131
|
-
}, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9,
|
|
5185
|
+
}, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, fa)
|
|
5132
5186
|
], 64))
|
|
5133
5187
|
]);
|
|
5134
5188
|
}
|
|
5135
|
-
const
|
|
5189
|
+
const pa = /* @__PURE__ */ U(aa, [["render", ya], ["__scopeId", "data-v-9b630564"]]), wa = {
|
|
5136
5190
|
name: "WmMoreMenu",
|
|
5137
5191
|
inject: {
|
|
5138
5192
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5167,24 +5221,24 @@ const wa = /* @__PURE__ */ U(oa, [["render", pa], ["__scopeId", "data-v-9b630564
|
|
|
5167
5221
|
this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
|
|
5168
5222
|
}
|
|
5169
5223
|
}
|
|
5170
|
-
},
|
|
5224
|
+
}, ba = { class: "wm-mm" }, ka = {
|
|
5171
5225
|
class: "wm-mm__pop",
|
|
5172
5226
|
role: "menu"
|
|
5173
|
-
},
|
|
5227
|
+
}, Ca = {
|
|
5174
5228
|
key: 0,
|
|
5175
5229
|
class: "wm-mm__section"
|
|
5176
|
-
},
|
|
5230
|
+
}, Aa = { class: "wm-mm__label" }, Sa = { class: "wm-mm__label" }, Ta = {
|
|
5177
5231
|
key: 1,
|
|
5178
5232
|
class: "wm-mm__sep"
|
|
5179
|
-
},
|
|
5180
|
-
function
|
|
5181
|
-
return c(), d("div",
|
|
5233
|
+
}, Ma = { class: "wm-mm__section" }, xa = { class: "wm-mm__label" }, Oa = { class: "wm-mm__section" }, Ra = { class: "wm-mm__label" }, La = { class: "wm-mm__label" };
|
|
5234
|
+
function Ia(e, t, s, r, i, n) {
|
|
5235
|
+
return c(), d("div", ba, [
|
|
5182
5236
|
l("div", {
|
|
5183
5237
|
class: "wm-mm__scrim",
|
|
5184
5238
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
5185
5239
|
}),
|
|
5186
|
-
l("div",
|
|
5187
|
-
s.canRename || s.canExport ? (c(), d("div",
|
|
5240
|
+
l("div", ka, [
|
|
5241
|
+
s.canRename || s.canExport ? (c(), d("div", Ca, [
|
|
5188
5242
|
s.canRename ? (c(), d("button", {
|
|
5189
5243
|
key: 0,
|
|
5190
5244
|
type: "button",
|
|
@@ -5207,7 +5261,7 @@ function Ea(e, t, s, r, i, n) {
|
|
|
5207
5261
|
l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
5208
5262
|
])
|
|
5209
5263
|
], -1)),
|
|
5210
|
-
l("span",
|
|
5264
|
+
l("span", Aa, v(n.t("moreMenu.editTitle")), 1)
|
|
5211
5265
|
])) : b("", !0),
|
|
5212
5266
|
s.canExport ? (c(), d("button", {
|
|
5213
5267
|
key: 1,
|
|
@@ -5230,12 +5284,12 @@ function Ea(e, t, s, r, i, n) {
|
|
|
5230
5284
|
l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
5231
5285
|
])
|
|
5232
5286
|
], -1)),
|
|
5233
|
-
l("span",
|
|
5287
|
+
l("span", Sa, v(n.t("moreMenu.exportTranscript")), 1),
|
|
5234
5288
|
t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
5235
5289
|
])) : b("", !0)
|
|
5236
5290
|
])) : b("", !0),
|
|
5237
|
-
s.canRename || s.canExport ? (c(), d("div",
|
|
5238
|
-
l("div",
|
|
5291
|
+
s.canRename || s.canExport ? (c(), d("div", Ta)) : b("", !0),
|
|
5292
|
+
l("div", Ma, [
|
|
5239
5293
|
l("button", {
|
|
5240
5294
|
type: "button",
|
|
5241
5295
|
class: "wm-mm__item",
|
|
@@ -5257,16 +5311,16 @@ function Ea(e, t, s, r, i, n) {
|
|
|
5257
5311
|
l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
5258
5312
|
])
|
|
5259
5313
|
], -1)),
|
|
5260
|
-
l("span",
|
|
5314
|
+
l("span", xa, v(n.t("moreMenu.sound")), 1),
|
|
5261
5315
|
l("span", {
|
|
5262
|
-
class:
|
|
5316
|
+
class: x(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
|
|
5263
5317
|
}, [...t[9] || (t[9] = [
|
|
5264
5318
|
l("span", { class: "wm-mm__knob" }, null, -1)
|
|
5265
5319
|
])], 2)
|
|
5266
5320
|
])
|
|
5267
5321
|
]),
|
|
5268
5322
|
t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
|
|
5269
|
-
l("div",
|
|
5323
|
+
l("div", Oa, [
|
|
5270
5324
|
s.statusUrl ? (c(), d("button", {
|
|
5271
5325
|
key: 0,
|
|
5272
5326
|
type: "button",
|
|
@@ -5288,7 +5342,7 @@ function Ea(e, t, s, r, i, n) {
|
|
|
5288
5342
|
l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
5289
5343
|
])
|
|
5290
5344
|
], -1)),
|
|
5291
|
-
l("span",
|
|
5345
|
+
l("span", Ra, v(n.t("moreMenu.serviceStatus")), 1)
|
|
5292
5346
|
])) : b("", !0),
|
|
5293
5347
|
s.helpUrl ? (c(), d("button", {
|
|
5294
5348
|
key: 1,
|
|
@@ -5311,13 +5365,13 @@ function Ea(e, t, s, r, i, n) {
|
|
|
5311
5365
|
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" })
|
|
5312
5366
|
])
|
|
5313
5367
|
], -1)),
|
|
5314
|
-
l("span",
|
|
5368
|
+
l("span", La, v(n.t("moreMenu.helpCenter")), 1)
|
|
5315
5369
|
])) : b("", !0)
|
|
5316
5370
|
])
|
|
5317
5371
|
])
|
|
5318
5372
|
]);
|
|
5319
5373
|
}
|
|
5320
|
-
const
|
|
5374
|
+
const Ea = /* @__PURE__ */ U(wa, [["render", Ia], ["__scopeId", "data-v-4cf6d578"]]), Ba = {
|
|
5321
5375
|
name: "WmRenameDialog",
|
|
5322
5376
|
inject: {
|
|
5323
5377
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5359,20 +5413,20 @@ const Ba = /* @__PURE__ */ U(ba, [["render", Ea], ["__scopeId", "data-v-4cf6d578
|
|
|
5359
5413
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
5360
5414
|
}
|
|
5361
5415
|
}
|
|
5362
|
-
},
|
|
5416
|
+
}, Pa = { class: "wm-dialog" }, Ua = {
|
|
5363
5417
|
class: "wm-dialog__card",
|
|
5364
5418
|
role: "dialog",
|
|
5365
5419
|
"aria-modal": "true"
|
|
5366
|
-
},
|
|
5367
|
-
function
|
|
5368
|
-
return c(), d("div",
|
|
5420
|
+
}, Da = { class: "wm-dialog__head" }, Na = { class: "wm-dialog__title" }, Fa = ["aria-label"], Ha = { class: "wm-dialog__body" }, ja = ["placeholder"], za = { class: "wm-dialog__actions" }, qa = ["disabled"];
|
|
5421
|
+
function Va(e, t, s, r, i, n) {
|
|
5422
|
+
return c(), d("div", Pa, [
|
|
5369
5423
|
l("div", {
|
|
5370
5424
|
class: "wm-dialog__scrim",
|
|
5371
5425
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
5372
5426
|
}),
|
|
5373
|
-
l("div",
|
|
5374
|
-
l("div",
|
|
5375
|
-
l("div",
|
|
5427
|
+
l("div", Ua, [
|
|
5428
|
+
l("div", Da, [
|
|
5429
|
+
l("div", Na, v(s.title || n.t("rename.title")), 1),
|
|
5376
5430
|
l("button", {
|
|
5377
5431
|
type: "button",
|
|
5378
5432
|
class: "wm-dialog__close",
|
|
@@ -5392,9 +5446,9 @@ function Ka(e, t, s, r, i, n) {
|
|
|
5392
5446
|
}, [
|
|
5393
5447
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5394
5448
|
], -1)
|
|
5395
|
-
])], 8,
|
|
5449
|
+
])], 8, Fa)
|
|
5396
5450
|
]),
|
|
5397
|
-
l("div",
|
|
5451
|
+
l("div", Ha, [
|
|
5398
5452
|
$(l("input", {
|
|
5399
5453
|
ref: "input",
|
|
5400
5454
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => i.value = a),
|
|
@@ -5406,11 +5460,11 @@ function Ka(e, t, s, r, i, n) {
|
|
|
5406
5460
|
t[3] || (t[3] = _e(G((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
5407
5461
|
t[4] || (t[4] = _e(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5408
5462
|
]
|
|
5409
|
-
}, null, 40,
|
|
5463
|
+
}, null, 40, ja), [
|
|
5410
5464
|
[ee, i.value]
|
|
5411
5465
|
])
|
|
5412
5466
|
]),
|
|
5413
|
-
l("div",
|
|
5467
|
+
l("div", za, [
|
|
5414
5468
|
l("button", {
|
|
5415
5469
|
type: "button",
|
|
5416
5470
|
class: "wm-dialog__btn",
|
|
@@ -5421,25 +5475,25 @@ function Ka(e, t, s, r, i, n) {
|
|
|
5421
5475
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5422
5476
|
disabled: !n.canSubmit,
|
|
5423
5477
|
onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
|
|
5424
|
-
}, v(n.t("common.save")), 9,
|
|
5478
|
+
}, v(n.t("common.save")), 9, qa)
|
|
5425
5479
|
])
|
|
5426
5480
|
])
|
|
5427
5481
|
]);
|
|
5428
5482
|
}
|
|
5429
|
-
const
|
|
5483
|
+
const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8"]]), He = "ww-messenger-tokens", Wa = {
|
|
5430
5484
|
name: "Messenger",
|
|
5431
5485
|
components: {
|
|
5432
5486
|
Launcher: qt,
|
|
5433
5487
|
Header: _n,
|
|
5434
|
-
Onboarding:
|
|
5435
|
-
History:
|
|
5436
|
-
MessageList:
|
|
5437
|
-
Composer:
|
|
5438
|
-
InlineCallbacks:
|
|
5439
|
-
FormCard:
|
|
5440
|
-
Feedback:
|
|
5441
|
-
MoreMenu:
|
|
5442
|
-
RenameDialog:
|
|
5488
|
+
Onboarding: Qn,
|
|
5489
|
+
History: fs,
|
|
5490
|
+
MessageList: ai,
|
|
5491
|
+
Composer: Si,
|
|
5492
|
+
InlineCallbacks: Ii,
|
|
5493
|
+
FormCard: ia,
|
|
5494
|
+
Feedback: pa,
|
|
5495
|
+
MoreMenu: Ea,
|
|
5496
|
+
RenameDialog: Ka
|
|
5443
5497
|
},
|
|
5444
5498
|
mixins: [
|
|
5445
5499
|
wt,
|
|
@@ -5517,13 +5571,17 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
5517
5571
|
// PJ, formulaire, quick-link sans URL). Évite de polluer la liste
|
|
5518
5572
|
// côté serveur avec des fils vides abandonnés.
|
|
5519
5573
|
draftConv: null,
|
|
5520
|
-
//
|
|
5521
|
-
//
|
|
5522
|
-
//
|
|
5523
|
-
//
|
|
5524
|
-
//
|
|
5525
|
-
//
|
|
5526
|
-
|
|
5574
|
+
// Drives the one-off "launch" animation played ONLY when the
|
|
5575
|
+
// user starts a conversation by typing in the home input (not
|
|
5576
|
+
// when opening an existing thread). While true, the home fades
|
|
5577
|
+
// everything but its input, slides that input down to the
|
|
5578
|
+
// composer slot, then the chat fades in. See `onOnboardingStart`
|
|
5579
|
+
// / `onHomeLaunched` / `screenTransition` / Onboarding's
|
|
5580
|
+
// `launching` prop.
|
|
5581
|
+
launching: !1,
|
|
5582
|
+
// First message captured from the home input, sent once the
|
|
5583
|
+
// launch animation has handed off to the real conversation.
|
|
5584
|
+
pendingLaunchText: "",
|
|
5527
5585
|
// convId → true quand l'utilisateur a cliqué "Rouvrir" sur une conv
|
|
5528
5586
|
// fermée : débloque le composer localement le temps qu'un message la
|
|
5529
5587
|
// réactive côté serveur. Reset au reload (non persisté, volontaire).
|
|
@@ -5602,12 +5660,6 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
5602
5660
|
isEmbedded() {
|
|
5603
5661
|
return this.displayMode === "embedded";
|
|
5604
5662
|
},
|
|
5605
|
-
// Transition name for the screen crossfade, flipped by nav direction
|
|
5606
|
-
// so "enter a conversation" slides forward/up and "back to home"
|
|
5607
|
-
// slides back/down.
|
|
5608
|
-
screenTransition() {
|
|
5609
|
-
return this.navForward ? "wm-screen-fwd" : "wm-screen-back";
|
|
5610
|
-
},
|
|
5611
5663
|
// Language set on the authenticated customer. Checked both as a
|
|
5612
5664
|
// top-level column and as a named variable (`values.language`).
|
|
5613
5665
|
// Falls back to the consumer-supplied `context.customer.language`
|
|
@@ -5909,7 +5961,7 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
5909
5961
|
}
|
|
5910
5962
|
const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
|
|
5911
5963
|
var o, f, k, y, T;
|
|
5912
|
-
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" ||
|
|
5964
|
+
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = a == null ? void 0 : a.payload) == null ? void 0 : k.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((I) => (I == null ? void 0 : I.intent) === "submit_form") ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
|
|
5913
5965
|
});
|
|
5914
5966
|
return t.length ? [...t, ...r] : r;
|
|
5915
5967
|
},
|
|
@@ -5921,7 +5973,7 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
5921
5973
|
var s, r, i;
|
|
5922
5974
|
const e = this.currentConv;
|
|
5923
5975
|
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 : (((i = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : i[e.id]) || []).some(
|
|
5924
|
-
(n) =>
|
|
5976
|
+
(n) => he(n) && !(this.revealedAt[n.id] > 0)
|
|
5925
5977
|
) : !1;
|
|
5926
5978
|
},
|
|
5927
5979
|
// Internal: the raw persisted list for the current conversation. We
|
|
@@ -6334,12 +6386,12 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6334
6386
|
const s = (((I = this.launcherPeeks) == null ? void 0 : I.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (z = (S = this.$el) == null ? void 0 : S.querySelector) == null ? void 0 : z.call(S, ".wm-launcher"), o = (D = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : D.call(M, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
|
|
6335
6387
|
let k = null;
|
|
6336
6388
|
if (f) {
|
|
6337
|
-
const
|
|
6389
|
+
const O = f.getBoundingClientRect();
|
|
6338
6390
|
k = {
|
|
6339
|
-
width: Math.ceil(
|
|
6340
|
-
height: Math.ceil(
|
|
6341
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
6342
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
6391
|
+
width: Math.ceil(O.width),
|
|
6392
|
+
height: Math.ceil(O.height),
|
|
6393
|
+
rightOffset: Math.max(0, Math.ceil(t.right - O.right)),
|
|
6394
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - O.bottom))
|
|
6343
6395
|
};
|
|
6344
6396
|
}
|
|
6345
6397
|
this.notifyParentResize("closed", {
|
|
@@ -6381,17 +6433,29 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6381
6433
|
// lazily on the first outbound action (text / attachment / form /
|
|
6382
6434
|
// quick-link without URL), so users who open the chat and walk away
|
|
6383
6435
|
// don't leave empty threads behind.
|
|
6384
|
-
// Home-screen starter input →
|
|
6385
|
-
//
|
|
6386
|
-
//
|
|
6387
|
-
//
|
|
6388
|
-
//
|
|
6436
|
+
// Home-screen starter input → kick off the launch animation. We do
|
|
6437
|
+
// NOT switch to the chat yet: the Onboarding component first fades
|
|
6438
|
+
// out everything but its input and slides that input down to the
|
|
6439
|
+
// composer slot, then emits `launched` (→ `onHomeLaunched`). The
|
|
6440
|
+
// text is stashed until then. An empty submit just opens the chat.
|
|
6389
6441
|
onOnboardingStart(e) {
|
|
6390
6442
|
const t = (e || "").trim();
|
|
6391
|
-
this.
|
|
6443
|
+
this.pendingLaunchText = t, this.launching = !0;
|
|
6444
|
+
},
|
|
6445
|
+
// Second half of the launch: the home input has reached the
|
|
6446
|
+
// composer slot, so materialize the conversation. The swap is
|
|
6447
|
+
// instant — the composer is iso with the home input and lands in
|
|
6448
|
+
// the same spot, so the input simply becomes the composer — while
|
|
6449
|
+
// the message area animates in (`wm-screen--launching`). `onSend`
|
|
6450
|
+
// posts the stashed text.
|
|
6451
|
+
onHomeLaunched() {
|
|
6452
|
+
const e = this.pendingLaunchText;
|
|
6453
|
+
this.pendingLaunchText = "", this.startConv(), e && this.$nextTick(() => this.onSend(e)), window.setTimeout(() => {
|
|
6454
|
+
this.launching = !1;
|
|
6455
|
+
}, 650);
|
|
6392
6456
|
},
|
|
6393
6457
|
startConv() {
|
|
6394
|
-
this.
|
|
6458
|
+
this.draftConv = {
|
|
6395
6459
|
id: "__draft__",
|
|
6396
6460
|
_draft: !0,
|
|
6397
6461
|
name: "",
|
|
@@ -6517,11 +6581,10 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6517
6581
|
this.moreOpen = !this.moreOpen;
|
|
6518
6582
|
},
|
|
6519
6583
|
goHome() {
|
|
6520
|
-
this.
|
|
6584
|
+
this.moreOpen = !1, this.draftConv = null, this.activeConvId = null, this.backToHistory ? (this.showOnboarding = !1, this.showHistory = !0, this.backToHistory = !1) : (this.showOnboarding = !0, this.showHistory = !1);
|
|
6521
6585
|
},
|
|
6522
6586
|
async onDrawerPick(e) {
|
|
6523
6587
|
if (!(e != null && e.id) || !this.store) return;
|
|
6524
|
-
this.navForward = !0;
|
|
6525
6588
|
const t = this.showHistory;
|
|
6526
6589
|
this.draftConv = null, this.activeConvId = e.id, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = t;
|
|
6527
6590
|
try {
|
|
@@ -6619,7 +6682,7 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6619
6682
|
async onFormSubmit({ values: e }) {
|
|
6620
6683
|
const t = this.pendingForm;
|
|
6621
6684
|
if (!(t != null && t.form)) return;
|
|
6622
|
-
const s =
|
|
6685
|
+
const s = mt(t.form, e, this.translator);
|
|
6623
6686
|
if (!s) return;
|
|
6624
6687
|
let r = this.currentConv;
|
|
6625
6688
|
r && (r._draft && (r = await this.ensureRealConv(), !r) || await this.store.send(r.id, s, {
|
|
@@ -6732,45 +6795,42 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6732
6795
|
}
|
|
6733
6796
|
}
|
|
6734
6797
|
}
|
|
6735
|
-
},
|
|
6798
|
+
}, $a = {
|
|
6736
6799
|
key: 0,
|
|
6737
6800
|
class: "wm-loading",
|
|
6738
6801
|
"aria-busy": "true",
|
|
6739
6802
|
"aria-live": "polite"
|
|
6740
|
-
},
|
|
6803
|
+
}, Ga = ["aria-label"], Ya = { class: "wm-screens" }, Ja = {
|
|
6741
6804
|
key: "error",
|
|
6742
6805
|
class: "wm-screen wm-state"
|
|
6743
|
-
},
|
|
6744
|
-
key: "chat",
|
|
6745
|
-
class: "wm-screen wm-screen--chat"
|
|
6746
|
-
}, no = { class: "wm-bottom" }, so = {
|
|
6806
|
+
}, Xa = { class: "wm-state__err" }, Qa = { class: "wm-state__errTitle" }, Za = { class: "wm-state__errSub" }, eo = { class: "wm-bottom" }, to = {
|
|
6747
6807
|
key: 0,
|
|
6748
6808
|
ref: "floatEl",
|
|
6749
6809
|
class: "wm-float"
|
|
6750
|
-
},
|
|
6810
|
+
}, no = {
|
|
6751
6811
|
key: 1,
|
|
6752
6812
|
class: "wm-actionWait",
|
|
6753
6813
|
role: "status",
|
|
6754
6814
|
"aria-live": "polite"
|
|
6755
|
-
},
|
|
6815
|
+
}, so = { class: "wm-actionWait__lbl" }, ro = {
|
|
6756
6816
|
key: 2,
|
|
6757
6817
|
class: "wm-attached"
|
|
6758
|
-
},
|
|
6818
|
+
}, io = ["src", "alt"], ao = {
|
|
6759
6819
|
key: 1,
|
|
6760
6820
|
class: "wm-attached__file"
|
|
6761
|
-
},
|
|
6821
|
+
}, oo = { class: "wm-attached__fileMeta" }, lo = { class: "wm-attached__fileName" }, co = {
|
|
6762
6822
|
key: 0,
|
|
6763
6823
|
class: "wm-attached__fileSize"
|
|
6764
|
-
},
|
|
6824
|
+
}, uo = ["aria-label", "onClick"], ho = {
|
|
6765
6825
|
key: 3,
|
|
6766
6826
|
class: "wm-ended",
|
|
6767
6827
|
role: "status",
|
|
6768
6828
|
"aria-live": "polite"
|
|
6769
|
-
},
|
|
6770
|
-
function
|
|
6829
|
+
}, mo = { class: "wm-ended__lbl" };
|
|
6830
|
+
function fo(e, t, s, r, i, n) {
|
|
6771
6831
|
const a = P("Launcher"), o = P("Header"), f = P("History"), k = P("Onboarding"), y = P("MessageList"), T = P("InlineCallbacks"), I = P("FormCard"), S = P("Feedback"), z = P("Composer"), M = P("MoreMenu"), D = P("RenameDialog");
|
|
6772
6832
|
return c(), d("div", {
|
|
6773
|
-
class:
|
|
6833
|
+
class: x(["wm-root", `wm-root--${s.displayMode}`]),
|
|
6774
6834
|
style: F(n.rootStyle)
|
|
6775
6835
|
}, [
|
|
6776
6836
|
!i.isOpen && !n.isEmbedded ? (c(), B(a, {
|
|
@@ -6783,7 +6843,7 @@ function go(e, t, s, r, i, n) {
|
|
|
6783
6843
|
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
|
|
6784
6844
|
i.isOpen || n.isEmbedded ? (c(), d("section", {
|
|
6785
6845
|
key: 1,
|
|
6786
|
-
class:
|
|
6846
|
+
class: x([
|
|
6787
6847
|
"wm-panel",
|
|
6788
6848
|
`wm-panel--${s.displayMode}`,
|
|
6789
6849
|
{ "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
|
|
@@ -6791,15 +6851,15 @@ function go(e, t, s, r, i, n) {
|
|
|
6791
6851
|
style: F(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
|
|
6792
6852
|
role: "dialog",
|
|
6793
6853
|
"aria-label": "Messenger",
|
|
6794
|
-
onClick: t[7] || (t[7] = (...
|
|
6854
|
+
onClick: t[7] || (t[7] = (...O) => n.onPanelClick && n.onPanelClick(...O))
|
|
6795
6855
|
}, [
|
|
6796
|
-
!n.ready && !n.error ? (c(), d("div",
|
|
6856
|
+
!n.ready && !n.error ? (c(), d("div", $a, [
|
|
6797
6857
|
n.isEmbedded ? b("", !0) : (c(), d("button", {
|
|
6798
6858
|
key: 0,
|
|
6799
6859
|
type: "button",
|
|
6800
6860
|
class: "wm-loading__close",
|
|
6801
6861
|
"aria-label": n.t("loading.minimize"),
|
|
6802
|
-
onClick: t[0] || (t[0] = (...
|
|
6862
|
+
onClick: t[0] || (t[0] = (...O) => n.close && n.close(...O))
|
|
6803
6863
|
}, [...t[8] || (t[8] = [
|
|
6804
6864
|
l("svg", {
|
|
6805
6865
|
width: "13",
|
|
@@ -6814,7 +6874,7 @@ function go(e, t, s, r, i, n) {
|
|
|
6814
6874
|
}, [
|
|
6815
6875
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6816
6876
|
], -1)
|
|
6817
|
-
])], 8,
|
|
6877
|
+
])], 8, Ga)),
|
|
6818
6878
|
t[9] || (t[9] = l("div", {
|
|
6819
6879
|
class: "wm-loading__spinner",
|
|
6820
6880
|
"aria-hidden": "true"
|
|
@@ -6834,11 +6894,11 @@ function go(e, t, s, r, i, n) {
|
|
|
6834
6894
|
onMore: n.toggleMore,
|
|
6835
6895
|
onClose: n.close
|
|
6836
6896
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6837
|
-
l("div",
|
|
6838
|
-
K(Ae, { name:
|
|
6897
|
+
l("div", Ya, [
|
|
6898
|
+
K(Ae, { name: "wm-none" }, {
|
|
6839
6899
|
default: Se(() => [
|
|
6840
|
-
n.error ? (c(), d("div",
|
|
6841
|
-
l("div",
|
|
6900
|
+
n.error ? (c(), d("div", Ja, [
|
|
6901
|
+
l("div", Xa, [
|
|
6842
6902
|
t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
|
|
6843
6903
|
l("svg", {
|
|
6844
6904
|
width: "14",
|
|
@@ -6855,8 +6915,8 @@ function go(e, t, s, r, i, n) {
|
|
|
6855
6915
|
])
|
|
6856
6916
|
], -1)),
|
|
6857
6917
|
l("div", null, [
|
|
6858
|
-
l("div",
|
|
6859
|
-
l("div",
|
|
6918
|
+
l("div", Qa, v(n.t("error.connectionFailed")), 1),
|
|
6919
|
+
l("div", Za, v(n.error), 1)
|
|
6860
6920
|
])
|
|
6861
6921
|
])
|
|
6862
6922
|
])) : !n.currentConv && i.showHistory ? (c(), B(f, {
|
|
@@ -6864,7 +6924,10 @@ function go(e, t, s, r, i, n) {
|
|
|
6864
6924
|
class: "wm-screen",
|
|
6865
6925
|
threads: n.openThreads,
|
|
6866
6926
|
onResume: n.onDrawerPick
|
|
6867
|
-
}, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d("div",
|
|
6927
|
+
}, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d("div", {
|
|
6928
|
+
key: "chat",
|
|
6929
|
+
class: x(["wm-screen wm-screen--chat", { "wm-screen--launching": i.launching }])
|
|
6930
|
+
}, [
|
|
6868
6931
|
K(y, {
|
|
6869
6932
|
ref: "messageList",
|
|
6870
6933
|
messages: n.displayedMessages,
|
|
@@ -6879,8 +6942,8 @@ function go(e, t, s, r, i, n) {
|
|
|
6879
6942
|
"ai-agent-avatar-url": n.agentAvatarUrl,
|
|
6880
6943
|
onLoadMore: n.onLoadMore
|
|
6881
6944
|
}, 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"]),
|
|
6882
|
-
l("div",
|
|
6883
|
-
n.floatVisible ? (c(), d("div",
|
|
6945
|
+
l("div", eo, [
|
|
6946
|
+
n.floatVisible ? (c(), d("div", to, [
|
|
6884
6947
|
n.pendingApproval ? (c(), B(T, {
|
|
6885
6948
|
key: `appr-${n.pendingApproval.id}`,
|
|
6886
6949
|
variant: "buttons",
|
|
@@ -6908,26 +6971,26 @@ function go(e, t, s, r, i, n) {
|
|
|
6908
6971
|
onSelect: n.onSuggestion
|
|
6909
6972
|
}, null, 8, ["items", "onSelect"]))
|
|
6910
6973
|
], 512)) : b("", !0),
|
|
6911
|
-
n.actionInFlight ? (c(), d("div",
|
|
6974
|
+
n.actionInFlight ? (c(), d("div", no, [
|
|
6912
6975
|
t[11] || (t[11] = l("span", {
|
|
6913
6976
|
class: "wm-actionWait__spinner",
|
|
6914
6977
|
"aria-hidden": "true"
|
|
6915
6978
|
}, null, -1)),
|
|
6916
|
-
l("span",
|
|
6979
|
+
l("span", so, v(n.t("action.inProgress", {
|
|
6917
6980
|
name: n.actionInFlightName
|
|
6918
6981
|
})), 1)
|
|
6919
6982
|
])) : b("", !0),
|
|
6920
|
-
i.pendingAttachments.length ? (c(), d("div",
|
|
6921
|
-
(c(!0), d(E, null, N(i.pendingAttachments, (
|
|
6922
|
-
key:
|
|
6983
|
+
i.pendingAttachments.length ? (c(), d("div", ro, [
|
|
6984
|
+
(c(!0), d(E, null, N(i.pendingAttachments, (O, q) => (c(), d("div", {
|
|
6985
|
+
key: O.path || q,
|
|
6923
6986
|
class: "wm-attached__item"
|
|
6924
6987
|
}, [
|
|
6925
|
-
|
|
6988
|
+
O.previewUrl ? (c(), d("img", {
|
|
6926
6989
|
key: 0,
|
|
6927
6990
|
class: "wm-attached__thumb",
|
|
6928
|
-
src:
|
|
6929
|
-
alt:
|
|
6930
|
-
}, null, 8,
|
|
6991
|
+
src: O.previewUrl,
|
|
6992
|
+
alt: O.name
|
|
6993
|
+
}, null, 8, io)) : (c(), d("div", ao, [
|
|
6931
6994
|
t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
|
|
6932
6995
|
l("svg", {
|
|
6933
6996
|
width: "16",
|
|
@@ -6944,10 +7007,10 @@ function go(e, t, s, r, i, n) {
|
|
|
6944
7007
|
l("path", { d: "M14 2v6h6" })
|
|
6945
7008
|
])
|
|
6946
7009
|
], -1)),
|
|
6947
|
-
l("span",
|
|
6948
|
-
l("span",
|
|
6949
|
-
n.formatAttachmentSize(
|
|
6950
|
-
|
|
7010
|
+
l("span", oo, [
|
|
7011
|
+
l("span", lo, v(O.name), 1),
|
|
7012
|
+
n.formatAttachmentSize(O.size_bytes) ? (c(), d("span", co, v(n.formatAttachmentSize(
|
|
7013
|
+
O.size_bytes
|
|
6951
7014
|
)), 1)) : b("", !0)
|
|
6952
7015
|
])
|
|
6953
7016
|
])),
|
|
@@ -6970,21 +7033,21 @@ function go(e, t, s, r, i, n) {
|
|
|
6970
7033
|
}, [
|
|
6971
7034
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6972
7035
|
], -1)
|
|
6973
|
-
])], 8,
|
|
7036
|
+
])], 8, uo)
|
|
6974
7037
|
]))), 128))
|
|
6975
7038
|
])) : b("", !0),
|
|
6976
|
-
n.endedBlockVisible ? (c(), d("div",
|
|
6977
|
-
l("span",
|
|
7039
|
+
n.endedBlockVisible ? (c(), d("div", ho, [
|
|
7040
|
+
l("span", mo, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
|
|
6978
7041
|
l("button", {
|
|
6979
7042
|
type: "button",
|
|
6980
7043
|
class: "wm-ended__btn",
|
|
6981
|
-
onClick: t[2] || (t[2] = (
|
|
7044
|
+
onClick: t[2] || (t[2] = (O) => n.isClosed ? n.onReopen() : n.startConv())
|
|
6982
7045
|
}, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
|
|
6983
7046
|
])) : n.actionInFlight ? b("", !0) : (c(), B(z, {
|
|
6984
7047
|
key: 4,
|
|
6985
7048
|
ref: "composer",
|
|
6986
7049
|
modelValue: i.draft,
|
|
6987
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
7050
|
+
"onUpdate:modelValue": t[3] || (t[3] = (O) => i.draft = O),
|
|
6988
7051
|
placeholder: n.composerPlaceholder,
|
|
6989
7052
|
"attach-label": n.t("composer.attachFile"),
|
|
6990
7053
|
"display-mode": s.displayMode,
|
|
@@ -6999,7 +7062,7 @@ function go(e, t, s, r, i, n) {
|
|
|
6999
7062
|
"sound-enabled": e.soundEnabled,
|
|
7000
7063
|
"status-url": n.statusUrl,
|
|
7001
7064
|
"help-url": n.helpUrl,
|
|
7002
|
-
onClose: t[4] || (t[4] = (
|
|
7065
|
+
onClose: t[4] || (t[4] = (O) => i.moreOpen = !1),
|
|
7003
7066
|
onSoundToggle: e.onSoundToggle,
|
|
7004
7067
|
onAction: n.onMoreAction
|
|
7005
7068
|
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
|
|
@@ -7007,10 +7070,10 @@ function go(e, t, s, r, i, n) {
|
|
|
7007
7070
|
key: 1,
|
|
7008
7071
|
"initial-value": n.currentConv.name || "",
|
|
7009
7072
|
title: n.t("rename.dialogTitle"),
|
|
7010
|
-
onClose: t[5] || (t[5] = (
|
|
7073
|
+
onClose: t[5] || (t[5] = (O) => i.renameDialogOpen = !1),
|
|
7011
7074
|
onSubmit: n.onRenameSubmit
|
|
7012
7075
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
|
|
7013
|
-
])) : (c(), B(k, {
|
|
7076
|
+
], 2)) : (c(), B(k, {
|
|
7014
7077
|
key: "home",
|
|
7015
7078
|
class: "wm-screen",
|
|
7016
7079
|
title: n.widgetTitle,
|
|
@@ -7021,16 +7084,16 @@ function go(e, t, s, r, i, n) {
|
|
|
7021
7084
|
"quick-links": n.quickLinks,
|
|
7022
7085
|
"open-threads": n.openThreads,
|
|
7023
7086
|
busy: i.busy,
|
|
7087
|
+
launching: i.launching,
|
|
7024
7088
|
onStart: n.onOnboardingStart,
|
|
7089
|
+
onLaunched: n.onHomeLaunched,
|
|
7025
7090
|
onSelect: n.onQuickLink,
|
|
7026
7091
|
onResume: n.onDrawerPick,
|
|
7027
|
-
onViewHistory: t[1] || (t[1] = (
|
|
7028
|
-
|
|
7029
|
-
})
|
|
7030
|
-
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "cover-image-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"]))
|
|
7092
|
+
onViewHistory: t[1] || (t[1] = (O) => i.showHistory = !0)
|
|
7093
|
+
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "cover-image-url", "quick-links", "open-threads", "busy", "launching", "onStart", "onLaunched", "onSelect", "onResume"]))
|
|
7031
7094
|
]),
|
|
7032
7095
|
_: 1
|
|
7033
|
-
}
|
|
7096
|
+
})
|
|
7034
7097
|
]),
|
|
7035
7098
|
i.moreOpen && !n.currentConv ? (c(), B(M, {
|
|
7036
7099
|
key: 0,
|
|
@@ -7039,7 +7102,7 @@ function go(e, t, s, r, i, n) {
|
|
|
7039
7102
|
"sound-enabled": e.soundEnabled,
|
|
7040
7103
|
"status-url": n.statusUrl,
|
|
7041
7104
|
"help-url": n.helpUrl,
|
|
7042
|
-
onClose: t[6] || (t[6] = (
|
|
7105
|
+
onClose: t[6] || (t[6] = (O) => i.moreOpen = !1),
|
|
7043
7106
|
onSoundToggle: e.onSoundToggle,
|
|
7044
7107
|
onAction: n.onMoreAction
|
|
7045
7108
|
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
|
|
@@ -7047,52 +7110,52 @@ function go(e, t, s, r, i, n) {
|
|
|
7047
7110
|
], 6)) : b("", !0)
|
|
7048
7111
|
], 6);
|
|
7049
7112
|
}
|
|
7050
|
-
const
|
|
7113
|
+
const vo = /* @__PURE__ */ U(Wa, [["render", fo], ["__scopeId", "data-v-ae5eee36"]]), yo = "0.6.10";
|
|
7051
7114
|
export {
|
|
7052
|
-
|
|
7115
|
+
me as AIAvatar,
|
|
7053
7116
|
be as AVATAR_COLORS,
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7117
|
+
Ts as ActionResult,
|
|
7118
|
+
Ps as ArtifactFormResponse,
|
|
7119
|
+
Gs as ArtifactInfoCard,
|
|
7120
|
+
mr as ArtifactRenderer,
|
|
7121
|
+
cr as ArtifactTicket,
|
|
7122
|
+
Sr as AttachmentPreview,
|
|
7123
|
+
Or as Bubble,
|
|
7124
|
+
Si as Composer,
|
|
7062
7125
|
ot as DEFAULT_BASE_URL,
|
|
7063
7126
|
ue as DEFAULT_LANGUAGE,
|
|
7064
|
-
|
|
7065
|
-
|
|
7127
|
+
pa as Feedback,
|
|
7128
|
+
ia as FormCard,
|
|
7066
7129
|
_n as Header,
|
|
7067
7130
|
ve as HumanAvatar,
|
|
7068
|
-
|
|
7131
|
+
Ii as InlineCallbacks,
|
|
7069
7132
|
qt as Launcher,
|
|
7070
7133
|
Le as MEDIA_RECORDER_SUPPORTED,
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7134
|
+
ai as MessageList,
|
|
7135
|
+
vo as Messenger,
|
|
7136
|
+
Ea as MoreMenu,
|
|
7137
|
+
Qn as Onboarding,
|
|
7075
7138
|
ge as SCREEN_CAPTURE_SUPPORTED,
|
|
7076
|
-
|
|
7139
|
+
ht as SUPPORTED_LANGUAGES,
|
|
7077
7140
|
tn as TeamAvatars,
|
|
7078
|
-
|
|
7079
|
-
|
|
7141
|
+
Er as Typing,
|
|
7142
|
+
yo as VERSION,
|
|
7080
7143
|
xe as avatarColor,
|
|
7081
7144
|
Oe as avatarInitials,
|
|
7082
|
-
|
|
7145
|
+
li as captureScreenshotFile,
|
|
7083
7146
|
j as colors,
|
|
7084
7147
|
it as createStore,
|
|
7085
7148
|
H as createTranslator,
|
|
7086
7149
|
tt as createTransport,
|
|
7087
7150
|
re as dateLocale,
|
|
7088
|
-
|
|
7151
|
+
vo as default,
|
|
7089
7152
|
Ce as formatTime,
|
|
7090
|
-
|
|
7091
|
-
|
|
7153
|
+
go as guessAttachmentKind,
|
|
7154
|
+
oi as pickRecorderMime,
|
|
7092
7155
|
Ve as renderInlineMarkdown,
|
|
7093
7156
|
_t as renderMarkdown,
|
|
7094
7157
|
Re as resolveLanguage,
|
|
7095
|
-
|
|
7158
|
+
di as startScreenRecording,
|
|
7096
7159
|
at as tokensCss,
|
|
7097
7160
|
rt as uuid,
|
|
7098
7161
|
rt as v4
|