@_solaris/messenger-widget 0.6.8 → 0.6.9
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 +641 -572
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -137,7 +137,7 @@ function tt(e) {
|
|
|
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 {
|
|
@@ -277,7 +277,7 @@ 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 {
|
|
@@ -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;
|
|
@@ -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[
|
|
534
|
+
}), u = (C == null ? void 0 : C.messages) ?? [], g = t.messagesByConv[h] || [], p = /* @__PURE__ */ new Set();
|
|
535
535
|
for (const O of g)
|
|
536
536
|
(O == null ? void 0 : O.id) != null && p.add(`id:${String(O.id)}`), O != null && O.client_msg_id && p.add(`c:${O.client_msg_id}`);
|
|
537
537
|
const L = u.filter((O) => !((O == null ? void 0 : O.id) != null && p.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && p.has(`c:${O.client_msg_id}`)));
|
|
538
|
-
t.messagesByConv[
|
|
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,9 +609,9 @@ 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,
|
|
@@ -619,32 +619,32 @@ function it(e) {
|
|
|
619
619
|
...w && typeof w == "object" ? { metadata: w } : {}
|
|
620
620
|
});
|
|
621
621
|
} catch (O) {
|
|
622
|
-
console.error("[store] send failed", O), oe(
|
|
622
|
+
console.error("[store] send failed", O), 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 x(
|
|
638
|
-
if (!
|
|
639
|
-
const
|
|
640
|
-
if (
|
|
641
|
-
const _ =
|
|
642
|
-
if (!_ || _ - Date.now() > 6e4) return
|
|
637
|
+
async function x(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();
|
|
@@ -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
|
}
|
|
@@ -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, [
|
|
@@ -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,10 +2559,15 @@ 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: R(["wm-onb", {
|
|
2567
|
+
"wm-onb--launching": i.launchPhase !== "idle",
|
|
2568
|
+
"wm-onb--sliding": i.launchPhase === "slide"
|
|
2569
|
+
}])
|
|
2570
|
+
}, [
|
|
2521
2571
|
l("div", {
|
|
2522
2572
|
class: R(["wm-onb__hero", { "wm-onb__hero--cover": n.hasCover }])
|
|
2523
2573
|
}, [
|
|
@@ -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",
|
|
@@ -2574,7 +2624,7 @@ function Qn(e, t, s, r, i, n) {
|
|
|
2574
2624
|
l("span", {
|
|
2575
2625
|
class: R(["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: R(["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,7 +2680,7 @@ 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", {
|
|
@@ -2635,10 +2689,10 @@ function Qn(e, t, s, r, i, n) {
|
|
|
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-9618b769"]]), 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,11 +2853,11 @@ 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",
|
|
@@ -2813,7 +2867,7 @@ function fs(e, t, s, r, i, n) {
|
|
|
2813
2867
|
l("span", {
|
|
2814
2868
|
class: R(["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
2986
|
class: R(["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,12 +3063,12 @@ 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
3073
|
class: R([
|
|
3020
3074
|
"wm-art__fieldValue",
|
|
@@ -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,32 +3094,32 @@ 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,
|
|
@@ -3075,13 +3129,13 @@ function Gs(e, t, s, r, i, n) {
|
|
|
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
3140
|
class: R([
|
|
3087
3141
|
"wm-art__fieldValue",
|
|
@@ -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",
|
|
@@ -3211,14 +3265,14 @@ 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
3277
|
class: R([
|
|
3224
3278
|
"wm-art__fieldValue",
|
|
@@ -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,15 +3441,15 @@ 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
3454
|
class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
|
|
3401
3455
|
}, [
|
|
@@ -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
3527
|
class: R(["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
|
//
|
|
@@ -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
4178
|
class: R(["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
4203
|
class: R(["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, {
|
|
@@ -4173,7 +4227,7 @@ function ai(e, t, s, r, i, n) {
|
|
|
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,
|
|
@@ -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
4304
|
class: R(["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
4313
|
class: R(["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 vo(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
4672
|
class: R(["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",
|
|
@@ -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,11 +4717,11 @@ 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",
|
|
@@ -4678,10 +4732,10 @@ function Si(e, t, s, r, i, n) {
|
|
|
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
4741
|
class: R(["wm-compose__icon", { "is-open": i.attachOpen }]),
|
|
@@ -4703,7 +4757,7 @@ 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
4763
|
class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
|
|
@@ -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-bba29b9c"]]), Ti = {
|
|
4732
4786
|
name: "WmInlineCallbacks",
|
|
4733
4787
|
props: {
|
|
4734
4788
|
// Array d'items `{ id?, label, style?, ... }`. Pour les suggestions,
|
|
@@ -4766,11 +4820,11 @@ 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
4830
|
class: R(["wm-icb", `wm-icb--${s.variant}`])
|
|
@@ -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
4844
|
class: R(["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,12 +5161,12 @@ 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",
|
|
@@ -5120,19 +5174,19 @@ function pa(e, t, s, r, i, n) {
|
|
|
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,7 +5311,7 @@ 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
5316
|
class: R(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
|
|
5263
5317
|
}, [...t[9] || (t[9] = [
|
|
@@ -5266,7 +5320,7 @@ function Ea(e, t, s, r, i, n) {
|
|
|
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,11 +5660,11 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
5602
5660
|
isEmbedded() {
|
|
5603
5661
|
return this.displayMode === "embedded";
|
|
5604
5662
|
},
|
|
5605
|
-
//
|
|
5606
|
-
//
|
|
5607
|
-
//
|
|
5663
|
+
// No screen transition on ordinary navigation (opening/closing a
|
|
5664
|
+
// thread is instant) — only the dedicated "launch" fade plays, and
|
|
5665
|
+
// only when starting a conversation from the home input.
|
|
5608
5666
|
screenTransition() {
|
|
5609
|
-
return this.
|
|
5667
|
+
return this.launching ? "wm-launch" : "wm-none";
|
|
5610
5668
|
},
|
|
5611
5669
|
// Language set on the authenticated customer. Checked both as a
|
|
5612
5670
|
// top-level column and as a named variable (`values.language`).
|
|
@@ -5909,7 +5967,7 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
5909
5967
|
}
|
|
5910
5968
|
const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
|
|
5911
5969
|
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" ||
|
|
5970
|
+
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
5971
|
});
|
|
5914
5972
|
return t.length ? [...t, ...r] : r;
|
|
5915
5973
|
},
|
|
@@ -5921,7 +5979,7 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
5921
5979
|
var s, r, i;
|
|
5922
5980
|
const e = this.currentConv;
|
|
5923
5981
|
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) =>
|
|
5982
|
+
(n) => he(n) && !(this.revealedAt[n.id] > 0)
|
|
5925
5983
|
) : !1;
|
|
5926
5984
|
},
|
|
5927
5985
|
// Internal: the raw persisted list for the current conversation. We
|
|
@@ -6381,17 +6439,29 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6381
6439
|
// lazily on the first outbound action (text / attachment / form /
|
|
6382
6440
|
// quick-link without URL), so users who open the chat and walk away
|
|
6383
6441
|
// don't leave empty threads behind.
|
|
6384
|
-
// Home-screen starter input →
|
|
6385
|
-
//
|
|
6386
|
-
//
|
|
6387
|
-
//
|
|
6388
|
-
//
|
|
6442
|
+
// Home-screen starter input → kick off the launch animation. We do
|
|
6443
|
+
// NOT switch to the chat yet: the Onboarding component first fades
|
|
6444
|
+
// out everything but its input and slides that input down to the
|
|
6445
|
+
// composer slot, then emits `launched` (→ `onHomeLaunched`). The
|
|
6446
|
+
// text is stashed until then. An empty submit just opens the chat.
|
|
6389
6447
|
onOnboardingStart(e) {
|
|
6390
6448
|
const t = (e || "").trim();
|
|
6391
|
-
this.
|
|
6449
|
+
this.pendingLaunchText = t, this.launching = !0;
|
|
6450
|
+
},
|
|
6451
|
+
// Second half of the launch: the home input has reached the
|
|
6452
|
+
// composer slot, so materialize the conversation. The chat fades in
|
|
6453
|
+
// (via the `wm-launch` transition) over the now-empty home, the
|
|
6454
|
+
// composer taking the input's place ; `onSend` posts the stashed
|
|
6455
|
+
// text. `launching` is cleared after the fade so the transition
|
|
6456
|
+
// reverts to instant for subsequent navigation.
|
|
6457
|
+
onHomeLaunched() {
|
|
6458
|
+
const e = this.pendingLaunchText;
|
|
6459
|
+
this.pendingLaunchText = "", this.startConv(), e && this.$nextTick(() => this.onSend(e)), window.setTimeout(() => {
|
|
6460
|
+
this.launching = !1;
|
|
6461
|
+
}, 360);
|
|
6392
6462
|
},
|
|
6393
6463
|
startConv() {
|
|
6394
|
-
this.
|
|
6464
|
+
this.draftConv = {
|
|
6395
6465
|
id: "__draft__",
|
|
6396
6466
|
_draft: !0,
|
|
6397
6467
|
name: "",
|
|
@@ -6517,11 +6587,10 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6517
6587
|
this.moreOpen = !this.moreOpen;
|
|
6518
6588
|
},
|
|
6519
6589
|
goHome() {
|
|
6520
|
-
this.
|
|
6590
|
+
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
6591
|
},
|
|
6522
6592
|
async onDrawerPick(e) {
|
|
6523
6593
|
if (!(e != null && e.id) || !this.store) return;
|
|
6524
|
-
this.navForward = !0;
|
|
6525
6594
|
const t = this.showHistory;
|
|
6526
6595
|
this.draftConv = null, this.activeConvId = e.id, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = t;
|
|
6527
6596
|
try {
|
|
@@ -6619,7 +6688,7 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6619
6688
|
async onFormSubmit({ values: e }) {
|
|
6620
6689
|
const t = this.pendingForm;
|
|
6621
6690
|
if (!(t != null && t.form)) return;
|
|
6622
|
-
const s =
|
|
6691
|
+
const s = mt(t.form, e, this.translator);
|
|
6623
6692
|
if (!s) return;
|
|
6624
6693
|
let r = this.currentConv;
|
|
6625
6694
|
r && (r._draft && (r = await this.ensureRealConv(), !r) || await this.store.send(r.id, s, {
|
|
@@ -6732,42 +6801,42 @@ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8
|
|
|
6732
6801
|
}
|
|
6733
6802
|
}
|
|
6734
6803
|
}
|
|
6735
|
-
},
|
|
6804
|
+
}, $a = {
|
|
6736
6805
|
key: 0,
|
|
6737
6806
|
class: "wm-loading",
|
|
6738
6807
|
"aria-busy": "true",
|
|
6739
6808
|
"aria-live": "polite"
|
|
6740
|
-
},
|
|
6809
|
+
}, Ga = ["aria-label"], Ya = { class: "wm-screens" }, Ja = {
|
|
6741
6810
|
key: "error",
|
|
6742
6811
|
class: "wm-screen wm-state"
|
|
6743
|
-
},
|
|
6812
|
+
}, Xa = { class: "wm-state__err" }, Qa = { class: "wm-state__errTitle" }, Za = { class: "wm-state__errSub" }, eo = {
|
|
6744
6813
|
key: "chat",
|
|
6745
6814
|
class: "wm-screen wm-screen--chat"
|
|
6746
|
-
},
|
|
6815
|
+
}, to = { class: "wm-bottom" }, no = {
|
|
6747
6816
|
key: 0,
|
|
6748
6817
|
ref: "floatEl",
|
|
6749
6818
|
class: "wm-float"
|
|
6750
|
-
},
|
|
6819
|
+
}, so = {
|
|
6751
6820
|
key: 1,
|
|
6752
6821
|
class: "wm-actionWait",
|
|
6753
6822
|
role: "status",
|
|
6754
6823
|
"aria-live": "polite"
|
|
6755
|
-
},
|
|
6824
|
+
}, ro = { class: "wm-actionWait__lbl" }, io = {
|
|
6756
6825
|
key: 2,
|
|
6757
6826
|
class: "wm-attached"
|
|
6758
|
-
},
|
|
6827
|
+
}, ao = ["src", "alt"], oo = {
|
|
6759
6828
|
key: 1,
|
|
6760
6829
|
class: "wm-attached__file"
|
|
6761
|
-
},
|
|
6830
|
+
}, lo = { class: "wm-attached__fileMeta" }, co = { class: "wm-attached__fileName" }, uo = {
|
|
6762
6831
|
key: 0,
|
|
6763
6832
|
class: "wm-attached__fileSize"
|
|
6764
|
-
}, ho = ["aria-label", "onClick"],
|
|
6833
|
+
}, ho = ["aria-label", "onClick"], mo = {
|
|
6765
6834
|
key: 3,
|
|
6766
6835
|
class: "wm-ended",
|
|
6767
6836
|
role: "status",
|
|
6768
6837
|
"aria-live": "polite"
|
|
6769
|
-
},
|
|
6770
|
-
function
|
|
6838
|
+
}, fo = { class: "wm-ended__lbl" };
|
|
6839
|
+
function _o(e, t, s, r, i, n) {
|
|
6771
6840
|
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
6841
|
return c(), d("div", {
|
|
6773
6842
|
class: R(["wm-root", `wm-root--${s.displayMode}`]),
|
|
@@ -6793,7 +6862,7 @@ function go(e, t, s, r, i, n) {
|
|
|
6793
6862
|
"aria-label": "Messenger",
|
|
6794
6863
|
onClick: t[7] || (t[7] = (...x) => n.onPanelClick && n.onPanelClick(...x))
|
|
6795
6864
|
}, [
|
|
6796
|
-
!n.ready && !n.error ? (c(), d("div",
|
|
6865
|
+
!n.ready && !n.error ? (c(), d("div", $a, [
|
|
6797
6866
|
n.isEmbedded ? b("", !0) : (c(), d("button", {
|
|
6798
6867
|
key: 0,
|
|
6799
6868
|
type: "button",
|
|
@@ -6814,7 +6883,7 @@ function go(e, t, s, r, i, n) {
|
|
|
6814
6883
|
}, [
|
|
6815
6884
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6816
6885
|
], -1)
|
|
6817
|
-
])], 8,
|
|
6886
|
+
])], 8, Ga)),
|
|
6818
6887
|
t[9] || (t[9] = l("div", {
|
|
6819
6888
|
class: "wm-loading__spinner",
|
|
6820
6889
|
"aria-hidden": "true"
|
|
@@ -6834,11 +6903,11 @@ function go(e, t, s, r, i, n) {
|
|
|
6834
6903
|
onMore: n.toggleMore,
|
|
6835
6904
|
onClose: n.close
|
|
6836
6905
|
}, 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",
|
|
6906
|
+
l("div", Ya, [
|
|
6838
6907
|
K(Ae, { name: n.screenTransition }, {
|
|
6839
6908
|
default: Se(() => [
|
|
6840
|
-
n.error ? (c(), d("div",
|
|
6841
|
-
l("div",
|
|
6909
|
+
n.error ? (c(), d("div", Ja, [
|
|
6910
|
+
l("div", Xa, [
|
|
6842
6911
|
t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
|
|
6843
6912
|
l("svg", {
|
|
6844
6913
|
width: "14",
|
|
@@ -6855,8 +6924,8 @@ function go(e, t, s, r, i, n) {
|
|
|
6855
6924
|
])
|
|
6856
6925
|
], -1)),
|
|
6857
6926
|
l("div", null, [
|
|
6858
|
-
l("div",
|
|
6859
|
-
l("div",
|
|
6927
|
+
l("div", Qa, v(n.t("error.connectionFailed")), 1),
|
|
6928
|
+
l("div", Za, v(n.error), 1)
|
|
6860
6929
|
])
|
|
6861
6930
|
])
|
|
6862
6931
|
])) : !n.currentConv && i.showHistory ? (c(), B(f, {
|
|
@@ -6864,7 +6933,7 @@ function go(e, t, s, r, i, n) {
|
|
|
6864
6933
|
class: "wm-screen",
|
|
6865
6934
|
threads: n.openThreads,
|
|
6866
6935
|
onResume: n.onDrawerPick
|
|
6867
|
-
}, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d("div",
|
|
6936
|
+
}, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d("div", eo, [
|
|
6868
6937
|
K(y, {
|
|
6869
6938
|
ref: "messageList",
|
|
6870
6939
|
messages: n.displayedMessages,
|
|
@@ -6879,8 +6948,8 @@ function go(e, t, s, r, i, n) {
|
|
|
6879
6948
|
"ai-agent-avatar-url": n.agentAvatarUrl,
|
|
6880
6949
|
onLoadMore: n.onLoadMore
|
|
6881
6950
|
}, 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",
|
|
6951
|
+
l("div", to, [
|
|
6952
|
+
n.floatVisible ? (c(), d("div", no, [
|
|
6884
6953
|
n.pendingApproval ? (c(), B(T, {
|
|
6885
6954
|
key: `appr-${n.pendingApproval.id}`,
|
|
6886
6955
|
variant: "buttons",
|
|
@@ -6908,16 +6977,16 @@ function go(e, t, s, r, i, n) {
|
|
|
6908
6977
|
onSelect: n.onSuggestion
|
|
6909
6978
|
}, null, 8, ["items", "onSelect"]))
|
|
6910
6979
|
], 512)) : b("", !0),
|
|
6911
|
-
n.actionInFlight ? (c(), d("div",
|
|
6980
|
+
n.actionInFlight ? (c(), d("div", so, [
|
|
6912
6981
|
t[11] || (t[11] = l("span", {
|
|
6913
6982
|
class: "wm-actionWait__spinner",
|
|
6914
6983
|
"aria-hidden": "true"
|
|
6915
6984
|
}, null, -1)),
|
|
6916
|
-
l("span",
|
|
6985
|
+
l("span", ro, v(n.t("action.inProgress", {
|
|
6917
6986
|
name: n.actionInFlightName
|
|
6918
6987
|
})), 1)
|
|
6919
6988
|
])) : b("", !0),
|
|
6920
|
-
i.pendingAttachments.length ? (c(), d("div",
|
|
6989
|
+
i.pendingAttachments.length ? (c(), d("div", io, [
|
|
6921
6990
|
(c(!0), d(E, null, N(i.pendingAttachments, (x, q) => (c(), d("div", {
|
|
6922
6991
|
key: x.path || q,
|
|
6923
6992
|
class: "wm-attached__item"
|
|
@@ -6927,7 +6996,7 @@ function go(e, t, s, r, i, n) {
|
|
|
6927
6996
|
class: "wm-attached__thumb",
|
|
6928
6997
|
src: x.previewUrl,
|
|
6929
6998
|
alt: x.name
|
|
6930
|
-
}, null, 8,
|
|
6999
|
+
}, null, 8, ao)) : (c(), d("div", oo, [
|
|
6931
7000
|
t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
|
|
6932
7001
|
l("svg", {
|
|
6933
7002
|
width: "16",
|
|
@@ -6944,9 +7013,9 @@ function go(e, t, s, r, i, n) {
|
|
|
6944
7013
|
l("path", { d: "M14 2v6h6" })
|
|
6945
7014
|
])
|
|
6946
7015
|
], -1)),
|
|
6947
|
-
l("span",
|
|
6948
|
-
l("span",
|
|
6949
|
-
n.formatAttachmentSize(x.size_bytes) ? (c(), d("span",
|
|
7016
|
+
l("span", lo, [
|
|
7017
|
+
l("span", co, v(x.name), 1),
|
|
7018
|
+
n.formatAttachmentSize(x.size_bytes) ? (c(), d("span", uo, v(n.formatAttachmentSize(
|
|
6950
7019
|
x.size_bytes
|
|
6951
7020
|
)), 1)) : b("", !0)
|
|
6952
7021
|
])
|
|
@@ -6973,8 +7042,8 @@ function go(e, t, s, r, i, n) {
|
|
|
6973
7042
|
])], 8, ho)
|
|
6974
7043
|
]))), 128))
|
|
6975
7044
|
])) : b("", !0),
|
|
6976
|
-
n.endedBlockVisible ? (c(), d("div",
|
|
6977
|
-
l("span",
|
|
7045
|
+
n.endedBlockVisible ? (c(), d("div", mo, [
|
|
7046
|
+
l("span", fo, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
|
|
6978
7047
|
l("button", {
|
|
6979
7048
|
type: "button",
|
|
6980
7049
|
class: "wm-ended__btn",
|
|
@@ -7021,13 +7090,13 @@ function go(e, t, s, r, i, n) {
|
|
|
7021
7090
|
"quick-links": n.quickLinks,
|
|
7022
7091
|
"open-threads": n.openThreads,
|
|
7023
7092
|
busy: i.busy,
|
|
7093
|
+
launching: i.launching,
|
|
7024
7094
|
onStart: n.onOnboardingStart,
|
|
7095
|
+
onLaunched: n.onHomeLaunched,
|
|
7025
7096
|
onSelect: n.onQuickLink,
|
|
7026
7097
|
onResume: n.onDrawerPick,
|
|
7027
|
-
onViewHistory: t[1] || (t[1] = (x) =>
|
|
7028
|
-
|
|
7029
|
-
})
|
|
7030
|
-
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "cover-image-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"]))
|
|
7098
|
+
onViewHistory: t[1] || (t[1] = (x) => i.showHistory = !0)
|
|
7099
|
+
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "cover-image-url", "quick-links", "open-threads", "busy", "launching", "onStart", "onLaunched", "onSelect", "onResume"]))
|
|
7031
7100
|
]),
|
|
7032
7101
|
_: 1
|
|
7033
7102
|
}, 8, ["name"])
|
|
@@ -7047,52 +7116,52 @@ function go(e, t, s, r, i, n) {
|
|
|
7047
7116
|
], 6)) : b("", !0)
|
|
7048
7117
|
], 6);
|
|
7049
7118
|
}
|
|
7050
|
-
const
|
|
7119
|
+
const yo = /* @__PURE__ */ U(Wa, [["render", _o], ["__scopeId", "data-v-d27c146a"]]), po = "0.6.9";
|
|
7051
7120
|
export {
|
|
7052
|
-
|
|
7121
|
+
me as AIAvatar,
|
|
7053
7122
|
be as AVATAR_COLORS,
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7123
|
+
Ts as ActionResult,
|
|
7124
|
+
Ps as ArtifactFormResponse,
|
|
7125
|
+
Gs as ArtifactInfoCard,
|
|
7126
|
+
mr as ArtifactRenderer,
|
|
7127
|
+
cr as ArtifactTicket,
|
|
7128
|
+
Sr as AttachmentPreview,
|
|
7129
|
+
Or as Bubble,
|
|
7130
|
+
Si as Composer,
|
|
7062
7131
|
ot as DEFAULT_BASE_URL,
|
|
7063
7132
|
ue as DEFAULT_LANGUAGE,
|
|
7064
|
-
|
|
7065
|
-
|
|
7133
|
+
pa as Feedback,
|
|
7134
|
+
ia as FormCard,
|
|
7066
7135
|
_n as Header,
|
|
7067
7136
|
ve as HumanAvatar,
|
|
7068
|
-
|
|
7137
|
+
Ii as InlineCallbacks,
|
|
7069
7138
|
qt as Launcher,
|
|
7070
7139
|
Le as MEDIA_RECORDER_SUPPORTED,
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7140
|
+
ai as MessageList,
|
|
7141
|
+
yo as Messenger,
|
|
7142
|
+
Ea as MoreMenu,
|
|
7143
|
+
Qn as Onboarding,
|
|
7075
7144
|
ge as SCREEN_CAPTURE_SUPPORTED,
|
|
7076
|
-
|
|
7145
|
+
ht as SUPPORTED_LANGUAGES,
|
|
7077
7146
|
tn as TeamAvatars,
|
|
7078
|
-
|
|
7079
|
-
|
|
7147
|
+
Er as Typing,
|
|
7148
|
+
po as VERSION,
|
|
7080
7149
|
xe as avatarColor,
|
|
7081
7150
|
Oe as avatarInitials,
|
|
7082
|
-
|
|
7151
|
+
li as captureScreenshotFile,
|
|
7083
7152
|
j as colors,
|
|
7084
7153
|
it as createStore,
|
|
7085
7154
|
H as createTranslator,
|
|
7086
7155
|
tt as createTransport,
|
|
7087
7156
|
re as dateLocale,
|
|
7088
|
-
|
|
7157
|
+
yo as default,
|
|
7089
7158
|
Ce as formatTime,
|
|
7090
|
-
|
|
7091
|
-
|
|
7159
|
+
vo as guessAttachmentKind,
|
|
7160
|
+
oi as pickRecorderMime,
|
|
7092
7161
|
Ve as renderInlineMarkdown,
|
|
7093
7162
|
_t as renderMarkdown,
|
|
7094
7163
|
Re as resolveLanguage,
|
|
7095
|
-
|
|
7164
|
+
di as startScreenRecording,
|
|
7096
7165
|
at as tokensCss,
|
|
7097
7166
|
rt as uuid,
|
|
7098
7167
|
rt as v4
|