@_solaris/messenger-widget 0.4.3 → 0.4.5
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/messenger.cjs +6 -6
- package/dist/messenger.embed.js +8 -8
- package/dist/messenger.js +855 -802
- package/dist/style.css +1 -1
- package/dist/types/core/types.d.ts +1 -0
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as K, normalizeClass as x, toDisplayString as v, resolveComponent as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as K, normalizeClass as x, toDisplayString as v, resolveComponent as L, createVNode as q, Transition as je, withCtx as Ue, Fragment as I, renderList as j, withKeys as ue, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as R, withDirectives as V, vModelText as ee, createTextVNode as ge, resolveDynamicComponent as Pe, renderSlot as De, vModelCheckbox as $e, vModelSelect as He, markRaw as ye } from "vue";
|
|
2
|
+
const qe = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
5
5
|
"message_stream",
|
|
6
6
|
"conversation_updated",
|
|
7
7
|
"config_updated",
|
|
8
8
|
"action_status"
|
|
9
|
-
], be = "/client",
|
|
9
|
+
], be = "/client", ze = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
|
|
10
10
|
function We(e) {
|
|
11
11
|
const t = {
|
|
12
12
|
baseUrl: Ge(e.baseUrl || ""),
|
|
@@ -75,7 +75,7 @@ function We(e) {
|
|
|
75
75
|
return null;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
async function
|
|
78
|
+
async function p() {
|
|
79
79
|
const [d, f] = await Promise.all([
|
|
80
80
|
// Public — no HMAC required.
|
|
81
81
|
fetch(
|
|
@@ -112,7 +112,7 @@ function We(e) {
|
|
|
112
112
|
const d = await a("GET", "/conversations");
|
|
113
113
|
return (d == null ? void 0 : d.conversations) ?? [];
|
|
114
114
|
}
|
|
115
|
-
async function
|
|
115
|
+
async function E(d = {}) {
|
|
116
116
|
return (await a("POST", "/conversations", d)).conversation;
|
|
117
117
|
}
|
|
118
118
|
async function A(d) {
|
|
@@ -135,7 +135,7 @@ function We(e) {
|
|
|
135
135
|
{ message_id: f }
|
|
136
136
|
);
|
|
137
137
|
}
|
|
138
|
-
async function
|
|
138
|
+
async function P(d, f = {}) {
|
|
139
139
|
const _ = new URLSearchParams();
|
|
140
140
|
f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
|
|
141
141
|
const y = _.toString() ? `?${_.toString()}` : "";
|
|
@@ -145,7 +145,7 @@ function We(e) {
|
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
147
|
async function N(d, f) {
|
|
148
|
-
|
|
148
|
+
z();
|
|
149
149
|
const _ = {
|
|
150
150
|
client_msg_id: f.client_msg_id,
|
|
151
151
|
type: "content",
|
|
@@ -160,7 +160,7 @@ function We(e) {
|
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
162
|
async function $(d, f, _) {
|
|
163
|
-
return
|
|
163
|
+
return z(), a(
|
|
164
164
|
"POST",
|
|
165
165
|
`/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
|
|
166
166
|
_ ? { inputs: _ } : {}
|
|
@@ -209,7 +209,7 @@ function We(e) {
|
|
|
209
209
|
if (!t.eventSource && !(typeof document < "u" && document.hidden))
|
|
210
210
|
try {
|
|
211
211
|
const d = new EventSource(ne());
|
|
212
|
-
for (const f of
|
|
212
|
+
for (const f of qe)
|
|
213
213
|
d.addEventListener(f, (_) => Y(f, _.data));
|
|
214
214
|
d.addEventListener(
|
|
215
215
|
"error",
|
|
@@ -230,13 +230,13 @@ function We(e) {
|
|
|
230
230
|
function Q() {
|
|
231
231
|
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function z() {
|
|
234
234
|
clearTimeout(t.burstTimer), G(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
235
235
|
t.panelOpen || Q();
|
|
236
236
|
}, Ve));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
239
|
-
t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), G()) :
|
|
238
|
+
function he(d) {
|
|
239
|
+
t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), G()) : z();
|
|
240
240
|
}
|
|
241
241
|
async function ce() {
|
|
242
242
|
try {
|
|
@@ -244,18 +244,18 @@ function We(e) {
|
|
|
244
244
|
const S = w == null ? void 0 : w.last_message_at;
|
|
245
245
|
return S && (!y || S > y) ? S : y;
|
|
246
246
|
}, null);
|
|
247
|
-
f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }),
|
|
247
|
+
f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), z());
|
|
248
248
|
} catch (d) {
|
|
249
249
|
console.error("[transport] poll failed", d);
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
function de() {
|
|
253
|
-
se(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce,
|
|
253
|
+
se(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce, ze));
|
|
254
254
|
}
|
|
255
255
|
function se() {
|
|
256
256
|
t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function m() {
|
|
259
259
|
if (document.hidden)
|
|
260
260
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
261
261
|
t.hiddenGraceTimer = null, document.hidden && (se(), Q(), r("paused"));
|
|
@@ -268,10 +268,10 @@ function We(e) {
|
|
|
268
268
|
r("idle"), de(), t.panelOpen && G();
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
async function
|
|
271
|
+
async function h() {
|
|
272
272
|
if (t.started) return t.lastBootstrap;
|
|
273
273
|
t.started = !0;
|
|
274
|
-
const d = await
|
|
274
|
+
const d = await p();
|
|
275
275
|
t.lastBootstrap = d;
|
|
276
276
|
try {
|
|
277
277
|
const f = await T();
|
|
@@ -282,12 +282,12 @@ function We(e) {
|
|
|
282
282
|
} catch (f) {
|
|
283
283
|
console.error("[transport] initial /conversations failed", f);
|
|
284
284
|
}
|
|
285
|
-
return typeof document < "u" && (t.visibilityHandler =
|
|
285
|
+
return typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
286
286
|
"visibilitychange",
|
|
287
287
|
t.visibilityHandler
|
|
288
288
|
)), de(), d;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function g() {
|
|
291
291
|
se(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Q(), t.visibilityHandler && (document.removeEventListener(
|
|
292
292
|
"visibilitychange",
|
|
293
293
|
t.visibilityHandler
|
|
@@ -295,19 +295,19 @@ function We(e) {
|
|
|
295
295
|
}
|
|
296
296
|
return {
|
|
297
297
|
on: n,
|
|
298
|
-
start:
|
|
299
|
-
stop:
|
|
300
|
-
setPanelOpen:
|
|
298
|
+
start: h,
|
|
299
|
+
stop: g,
|
|
300
|
+
setPanelOpen: he,
|
|
301
301
|
// REST
|
|
302
|
-
bootstrap:
|
|
302
|
+
bootstrap: p,
|
|
303
303
|
getCustomer: C,
|
|
304
304
|
patchCustomer: k,
|
|
305
305
|
listConversations: T,
|
|
306
|
-
createConversation:
|
|
306
|
+
createConversation: E,
|
|
307
307
|
getConversation: A,
|
|
308
308
|
patchConversation: H,
|
|
309
309
|
markConversationRead: M,
|
|
310
|
-
listMessages:
|
|
310
|
+
listMessages: P,
|
|
311
311
|
postMessage: N,
|
|
312
312
|
postCallback: $,
|
|
313
313
|
uploadAttachment: W,
|
|
@@ -369,49 +369,49 @@ function Xe(e) {
|
|
|
369
369
|
connection: "idle"
|
|
370
370
|
}), n = [];
|
|
371
371
|
n.push(
|
|
372
|
-
e.on("connection", (
|
|
373
|
-
t.connection =
|
|
372
|
+
e.on("connection", (m) => {
|
|
373
|
+
t.connection = m;
|
|
374
374
|
})
|
|
375
375
|
), n.push(
|
|
376
|
-
e.on("message", (
|
|
377
|
-
const
|
|
378
|
-
!
|
|
376
|
+
e.on("message", (m) => {
|
|
377
|
+
const h = m == null ? void 0 : m.conversation_id, g = m == null ? void 0 : m.message;
|
|
378
|
+
!h || !(g != null && g.id) || (Y(h, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], he(h, g.created_at));
|
|
379
379
|
})
|
|
380
380
|
), n.push(
|
|
381
|
-
e.on("message_stream", (
|
|
382
|
-
const
|
|
383
|
-
!
|
|
381
|
+
e.on("message_stream", (m) => {
|
|
382
|
+
const h = m == null ? void 0 : m.message_id, g = m == null ? void 0 : m.token;
|
|
383
|
+
!h || typeof g != "string" || (t.streamingByMsgId[h] = (t.streamingByMsgId[h] || "") + g);
|
|
384
384
|
})
|
|
385
385
|
), n.push(
|
|
386
|
-
e.on("conversation_updated", (
|
|
387
|
-
const
|
|
388
|
-
if (!
|
|
389
|
-
const d = t.conversations.findIndex((f) => f.id ===
|
|
386
|
+
e.on("conversation_updated", (m) => {
|
|
387
|
+
const h = m == null ? void 0 : m.conversation_id, g = m == null ? void 0 : m.changes;
|
|
388
|
+
if (!h || !g) return;
|
|
389
|
+
const d = t.conversations.findIndex((f) => f.id === h);
|
|
390
390
|
d !== -1 && (t.conversations[d] = {
|
|
391
391
|
...t.conversations[d],
|
|
392
|
-
...
|
|
392
|
+
...g
|
|
393
393
|
});
|
|
394
394
|
})
|
|
395
395
|
), n.push(
|
|
396
|
-
e.on("config_updated", (
|
|
397
|
-
|
|
396
|
+
e.on("config_updated", (m) => {
|
|
397
|
+
m != null && m.config && (t.config = m.config);
|
|
398
398
|
})
|
|
399
399
|
), n.push(
|
|
400
|
-
e.on("action_status", (
|
|
401
|
-
const
|
|
402
|
-
if (!
|
|
403
|
-
const f = t.runningActionsByConv[
|
|
404
|
-
|
|
400
|
+
e.on("action_status", (m) => {
|
|
401
|
+
const h = m == null ? void 0 : m.conversation_id, g = m == null ? void 0 : m.action_id, d = m == null ? void 0 : m.action_name;
|
|
402
|
+
if (!h || !g) return;
|
|
403
|
+
const f = t.runningActionsByConv[h] || {};
|
|
404
|
+
m.state === "running" ? (f[g] = d || g, t.runningActionsByConv[h] = { ...f }) : m.state === "done" && (delete f[g], t.runningActionsByConv[h] = { ...f });
|
|
405
405
|
})
|
|
406
406
|
), n.push(
|
|
407
|
-
e.on("activity", (
|
|
408
|
-
Array.isArray(
|
|
407
|
+
e.on("activity", (m) => {
|
|
408
|
+
Array.isArray(m == null ? void 0 : m.conversations) && (t.conversations = m.conversations);
|
|
409
409
|
})
|
|
410
410
|
);
|
|
411
411
|
async function i() {
|
|
412
412
|
try {
|
|
413
|
-
const
|
|
414
|
-
(
|
|
413
|
+
const m = new Promise(
|
|
414
|
+
(g, d) => setTimeout(
|
|
415
415
|
() => d(
|
|
416
416
|
new Error(
|
|
417
417
|
"bootstrap timeout (15s) — check baseUrl, CORS, and network"
|
|
@@ -419,59 +419,59 @@ function Xe(e) {
|
|
|
419
419
|
),
|
|
420
420
|
15e3
|
|
421
421
|
)
|
|
422
|
-
),
|
|
423
|
-
t.config =
|
|
422
|
+
), h = await Promise.race([e.start(), m]);
|
|
423
|
+
t.config = h.config, t.customer = h.customer, t.conversations = await Promise.race([
|
|
424
424
|
e.listConversations(),
|
|
425
|
-
|
|
425
|
+
m
|
|
426
426
|
]), t.ready = !0;
|
|
427
|
-
} catch (
|
|
428
|
-
console.error("[store] start failed",
|
|
427
|
+
} catch (m) {
|
|
428
|
+
console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
function r() {
|
|
432
|
-
for (const
|
|
432
|
+
for (const m of n)
|
|
433
433
|
try {
|
|
434
|
-
|
|
434
|
+
m();
|
|
435
435
|
} catch {
|
|
436
436
|
}
|
|
437
437
|
e.stop();
|
|
438
438
|
}
|
|
439
|
-
async function s(
|
|
440
|
-
const
|
|
441
|
-
if (!
|
|
439
|
+
async function s(m) {
|
|
440
|
+
const h = de(m);
|
|
441
|
+
if (!h) return t.customer;
|
|
442
442
|
try {
|
|
443
|
-
const
|
|
444
|
-
|
|
445
|
-
} catch (
|
|
446
|
-
console.error("[store] applyCustomer failed",
|
|
443
|
+
const g = await e.patchCustomer(h);
|
|
444
|
+
g && (t.customer = g);
|
|
445
|
+
} catch (g) {
|
|
446
|
+
console.error("[store] applyCustomer failed", g);
|
|
447
447
|
}
|
|
448
448
|
return t.customer;
|
|
449
449
|
}
|
|
450
|
-
async function a(
|
|
451
|
-
const
|
|
452
|
-
return
|
|
450
|
+
async function a(m = {}) {
|
|
451
|
+
const h = await e.createConversation(m), g = t.conversations.findIndex((d) => d.id === h.id);
|
|
452
|
+
return g === -1 ? t.conversations = [h, ...t.conversations] : t.conversations[g] = h, h;
|
|
453
453
|
}
|
|
454
454
|
const l = 50;
|
|
455
|
-
async function
|
|
456
|
-
const
|
|
457
|
-
if (!(
|
|
458
|
-
k(
|
|
455
|
+
async function p(m) {
|
|
456
|
+
const h = t.paginationByConv[m];
|
|
457
|
+
if (!(h != null && h.loaded || h != null && h.loading)) {
|
|
458
|
+
k(m, { nextCursor: null, loading: !0, loaded: !1 });
|
|
459
459
|
try {
|
|
460
|
-
const
|
|
460
|
+
const g = await e.listMessages(m, {
|
|
461
461
|
limit: l
|
|
462
|
-
}), d = (
|
|
462
|
+
}), d = (g == null ? void 0 : g.messages) ?? [], f = t.messagesByConv[m] || [], _ = /* @__PURE__ */ new Set();
|
|
463
463
|
for (const w of d)
|
|
464
464
|
(w == null ? void 0 : w.id) != null && _.add(`id:${String(w.id)}`), w != null && w.client_msg_id && _.add(`c:${w.client_msg_id}`);
|
|
465
465
|
const y = f.filter((w) => !((w == null ? void 0 : w.id) != null && _.has(`id:${String(w.id)}`) || w != null && w.client_msg_id && _.has(`c:${w.client_msg_id}`)));
|
|
466
|
-
t.messagesByConv[
|
|
466
|
+
t.messagesByConv[m] = [...d, ...y].sort(
|
|
467
467
|
ce
|
|
468
|
-
), k(
|
|
469
|
-
nextCursor: (
|
|
468
|
+
), k(m, {
|
|
469
|
+
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
470
470
|
loading: !1,
|
|
471
471
|
loaded: !0
|
|
472
472
|
});
|
|
473
|
-
} catch (
|
|
474
|
-
console.error("[store] openConversation failed",
|
|
473
|
+
} catch (g) {
|
|
474
|
+
console.error("[store] openConversation failed", g), k(m, {
|
|
475
475
|
nextCursor: null,
|
|
476
476
|
loading: !1,
|
|
477
477
|
loaded: !1
|
|
@@ -479,83 +479,83 @@ function Xe(e) {
|
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
async function C(
|
|
482
|
+
async function C(m) {
|
|
483
483
|
var f;
|
|
484
|
-
const
|
|
485
|
-
if (!
|
|
486
|
-
const d = (f = (t.messagesByConv[
|
|
484
|
+
const h = t.paginationByConv[m];
|
|
485
|
+
if (!h || h.loading || !h.nextCursor) return;
|
|
486
|
+
const d = (f = (t.messagesByConv[m] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
|
|
487
487
|
if (d) {
|
|
488
|
-
k(
|
|
488
|
+
k(m, { ...h, loading: !0 });
|
|
489
489
|
try {
|
|
490
|
-
const _ = await e.listMessages(
|
|
490
|
+
const _ = await e.listMessages(m, {
|
|
491
491
|
before: d,
|
|
492
492
|
limit: l
|
|
493
|
-
}), y = (_ == null ? void 0 : _.messages) ?? [], w = t.messagesByConv[
|
|
493
|
+
}), y = (_ == null ? void 0 : _.messages) ?? [], w = t.messagesByConv[m] || [], S = /* @__PURE__ */ new Set();
|
|
494
494
|
for (const O of w)
|
|
495
495
|
(O == null ? void 0 : O.id) != null && S.add(`id:${String(O.id)}`), O != null && O.client_msg_id && S.add(`c:${O.client_msg_id}`);
|
|
496
496
|
const F = y.filter((O) => !((O == null ? void 0 : O.id) != null && S.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && S.has(`c:${O.client_msg_id}`)));
|
|
497
|
-
t.messagesByConv[
|
|
497
|
+
t.messagesByConv[m] = [...F, ...w], k(m, {
|
|
498
498
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
499
499
|
loading: !1,
|
|
500
500
|
loaded: !0
|
|
501
501
|
});
|
|
502
502
|
} catch (_) {
|
|
503
|
-
console.error("[store] loadMore failed", _), k(
|
|
503
|
+
console.error("[store] loadMore failed", _), k(m, { ...h, loading: !1 });
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
-
function k(
|
|
508
|
-
t.paginationByConv = { ...t.paginationByConv, [
|
|
507
|
+
function k(m, h) {
|
|
508
|
+
t.paginationByConv = { ...t.paginationByConv, [m]: h };
|
|
509
509
|
}
|
|
510
|
-
async function T(
|
|
511
|
-
const
|
|
512
|
-
d !== -1 && (t.conversations[d] =
|
|
510
|
+
async function T(m, h) {
|
|
511
|
+
const g = await e.patchConversation(m, h), d = t.conversations.findIndex((f) => f.id === m);
|
|
512
|
+
d !== -1 && (t.conversations[d] = g);
|
|
513
513
|
}
|
|
514
|
-
async function
|
|
515
|
-
if (!
|
|
516
|
-
const
|
|
517
|
-
let
|
|
518
|
-
for (const d of
|
|
519
|
-
d != null && d.created_at && d.created_at >
|
|
514
|
+
async function E(m) {
|
|
515
|
+
if (!m) return [];
|
|
516
|
+
const h = t.messagesByConv[m] || [];
|
|
517
|
+
let g = "";
|
|
518
|
+
for (const d of h)
|
|
519
|
+
d != null && d.created_at && d.created_at > g && (g = d.created_at);
|
|
520
520
|
try {
|
|
521
521
|
const d = await e.listMessages(
|
|
522
|
-
|
|
523
|
-
|
|
522
|
+
m,
|
|
523
|
+
g ? { since: g } : {}
|
|
524
524
|
), f = (d == null ? void 0 : d.messages) || [];
|
|
525
525
|
if (!f.length) return [];
|
|
526
526
|
const _ = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
|
|
527
|
-
for (const S of
|
|
527
|
+
for (const S of h)
|
|
528
528
|
(S == null ? void 0 : S.id) != null && _.add(String(S.id)), S != null && S.client_msg_id && y.add(S.client_msg_id);
|
|
529
529
|
const w = [];
|
|
530
530
|
for (const S of f) {
|
|
531
531
|
const F = (S == null ? void 0 : S.id) != null && _.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
|
|
532
|
-
Y(
|
|
532
|
+
Y(m, S), F || w.push(S);
|
|
533
533
|
}
|
|
534
534
|
return w;
|
|
535
535
|
} catch (d) {
|
|
536
536
|
return console.error("[store] fetchSinceLast failed", d), [];
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
|
-
async function A(
|
|
540
|
-
if (!(!
|
|
539
|
+
async function A(m, h) {
|
|
540
|
+
if (!(!m || h == null))
|
|
541
541
|
try {
|
|
542
|
-
const
|
|
542
|
+
const g = await e.markConversationRead(m, h), d = (g == null ? void 0 : g.last_read_message_id) ?? h, f = t.conversations.findIndex((_) => (_ == null ? void 0 : _.id) === m);
|
|
543
543
|
f !== -1 && (t.conversations[f] = {
|
|
544
544
|
...t.conversations[f],
|
|
545
545
|
last_read_message_id: d
|
|
546
546
|
});
|
|
547
|
-
} catch (
|
|
548
|
-
console.error("[store] markConversationRead failed",
|
|
547
|
+
} catch (g) {
|
|
548
|
+
console.error("[store] markConversationRead failed", g);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
async function H(
|
|
551
|
+
async function H(m, h, { attachments: g, metadata: d } = {}) {
|
|
552
552
|
var F;
|
|
553
|
-
const f = (
|
|
554
|
-
if (!
|
|
555
|
-
const y = Qe(), w = se(
|
|
553
|
+
const f = (h || "").trim(), _ = Array.isArray(g) && g.length > 0;
|
|
554
|
+
if (!m || !f && !_) return;
|
|
555
|
+
const y = Qe(), w = se(m), S = {
|
|
556
556
|
id: y,
|
|
557
557
|
client_msg_id: y,
|
|
558
|
-
conversation_id:
|
|
558
|
+
conversation_id: m,
|
|
559
559
|
type: "content",
|
|
560
560
|
text_md: f,
|
|
561
561
|
author: {
|
|
@@ -565,80 +565,80 @@ function Xe(e) {
|
|
|
565
565
|
created_at: w,
|
|
566
566
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
567
567
|
_pending: !0,
|
|
568
|
-
..._ ? { payload: { type: "content", attachments:
|
|
568
|
+
..._ ? { payload: { type: "content", attachments: g } } : {},
|
|
569
569
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
570
570
|
};
|
|
571
|
-
Y(
|
|
571
|
+
Y(m, S);
|
|
572
572
|
try {
|
|
573
|
-
await e.postMessage(
|
|
573
|
+
await e.postMessage(m, {
|
|
574
574
|
client_msg_id: y,
|
|
575
575
|
text_md: f,
|
|
576
576
|
created_at: w,
|
|
577
|
-
..._ ? { attachments:
|
|
577
|
+
..._ ? { attachments: g } : {},
|
|
578
578
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
579
579
|
});
|
|
580
580
|
} catch (O) {
|
|
581
|
-
console.error("[store] send failed", O),
|
|
581
|
+
console.error("[store] send failed", O), z(m, y, {
|
|
582
582
|
_failed: !0,
|
|
583
583
|
_pending: !1
|
|
584
584
|
});
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
async function M(
|
|
588
|
-
|
|
587
|
+
async function M(m, h, g) {
|
|
588
|
+
m != null && (t.awaitingCallback[m] = !0);
|
|
589
589
|
try {
|
|
590
|
-
await e.postCallback(
|
|
590
|
+
await e.postCallback(m, h, g);
|
|
591
591
|
} catch (d) {
|
|
592
|
-
console.error("[store] callback failed", d),
|
|
592
|
+
console.error("[store] callback failed", d), m != null && delete t.awaitingCallback[m];
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
const
|
|
596
|
-
async function N(
|
|
597
|
-
if (!
|
|
598
|
-
const
|
|
599
|
-
if (
|
|
600
|
-
const
|
|
601
|
-
if (!
|
|
595
|
+
const P = /* @__PURE__ */ new Map();
|
|
596
|
+
async function N(m) {
|
|
597
|
+
if (!m) return null;
|
|
598
|
+
const h = P.get(m);
|
|
599
|
+
if (h != null && h.url) {
|
|
600
|
+
const g = h.expires_at ? Date.parse(h.expires_at) : 0;
|
|
601
|
+
if (!g || g - Date.now() > 6e4) return h.url;
|
|
602
602
|
}
|
|
603
603
|
try {
|
|
604
|
-
const
|
|
605
|
-
if (
|
|
606
|
-
return
|
|
607
|
-
url:
|
|
608
|
-
expires_at:
|
|
609
|
-
}),
|
|
610
|
-
} catch (
|
|
611
|
-
console.error("[store] sign attachment failed",
|
|
604
|
+
const g = await e.signAttachment(m);
|
|
605
|
+
if (g != null && g.signed_url)
|
|
606
|
+
return P.set(m, {
|
|
607
|
+
url: g.signed_url,
|
|
608
|
+
expires_at: g.expires_at
|
|
609
|
+
}), g.signed_url;
|
|
610
|
+
} catch (g) {
|
|
611
|
+
console.error("[store] sign attachment failed", g);
|
|
612
612
|
}
|
|
613
613
|
return null;
|
|
614
614
|
}
|
|
615
|
-
async function $(
|
|
616
|
-
const d = t.conversations.find((y) => y.id ===
|
|
615
|
+
async function $(m, { rating: h, comment: g } = {}) {
|
|
616
|
+
const d = t.conversations.find((y) => y.id === m), _ = {
|
|
617
617
|
...(d == null ? void 0 : d.metadata) || {},
|
|
618
618
|
feedback: {
|
|
619
|
-
rating:
|
|
620
|
-
comment:
|
|
619
|
+
rating: h,
|
|
620
|
+
comment: g || null,
|
|
621
621
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
622
622
|
}
|
|
623
623
|
};
|
|
624
|
-
await T(
|
|
624
|
+
await T(m, { metadata: _ });
|
|
625
625
|
}
|
|
626
|
-
function W(
|
|
627
|
-
var
|
|
628
|
-
const
|
|
629
|
-
for (let f =
|
|
630
|
-
const _ =
|
|
631
|
-
if ((_ == null ? void 0 : _.type) === "action" && ((
|
|
626
|
+
function W(m) {
|
|
627
|
+
var g, d;
|
|
628
|
+
const h = t.messagesByConv[m] || [];
|
|
629
|
+
for (let f = h.length - 1; f >= 0; f--) {
|
|
630
|
+
const _ = h[f];
|
|
631
|
+
if ((_ == null ? void 0 : _.type) === "action" && ((g = _ == null ? void 0 : _.payload) == null ? void 0 : g.type) === "action" && ((d = _ == null ? void 0 : _.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(_ == null ? void 0 : _.callbacks) && _.callbacks.length > 0 && !t.awaitingCallback[_.id])
|
|
632
632
|
return _;
|
|
633
633
|
}
|
|
634
634
|
return null;
|
|
635
635
|
}
|
|
636
|
-
function te(
|
|
637
|
-
var
|
|
638
|
-
const
|
|
639
|
-
for (let _ =
|
|
640
|
-
const y =
|
|
641
|
-
if (((
|
|
636
|
+
function te(m) {
|
|
637
|
+
var g, d, f;
|
|
638
|
+
const h = t.messagesByConv[m] || [];
|
|
639
|
+
for (let _ = h.length - 1; _ >= 0; _--) {
|
|
640
|
+
const y = h[_];
|
|
641
|
+
if (((g = y == null ? void 0 : y.author) == null ? void 0 : g.type) === "user" || (y == null ? void 0 : y.type) === "action" && ((d = y == null ? void 0 : y.payload) == null ? void 0 : d.state) === "pending")
|
|
642
642
|
return null;
|
|
643
643
|
const w = (f = y == null ? void 0 : y.metadata) == null ? void 0 : f.form;
|
|
644
644
|
if (w && Array.isArray(w.fields) && w.fields.length > 0)
|
|
@@ -646,20 +646,20 @@ function Xe(e) {
|
|
|
646
646
|
}
|
|
647
647
|
return null;
|
|
648
648
|
}
|
|
649
|
-
function ne(
|
|
650
|
-
const
|
|
651
|
-
if (!
|
|
652
|
-
const
|
|
653
|
-
if (
|
|
654
|
-
const d =
|
|
655
|
-
return { id: d, payload: { name:
|
|
649
|
+
function ne(m) {
|
|
650
|
+
const h = t.runningActionsByConv[m];
|
|
651
|
+
if (!h) return null;
|
|
652
|
+
const g = Object.keys(h);
|
|
653
|
+
if (g.length === 0) return null;
|
|
654
|
+
const d = g[0];
|
|
655
|
+
return { id: d, payload: { name: h[d] } };
|
|
656
656
|
}
|
|
657
|
-
function G(
|
|
658
|
-
var
|
|
659
|
-
const
|
|
660
|
-
for (let y =
|
|
661
|
-
const w =
|
|
662
|
-
if (((
|
|
657
|
+
function G(m) {
|
|
658
|
+
var g, d, f, _;
|
|
659
|
+
const h = t.messagesByConv[m] || [];
|
|
660
|
+
for (let y = h.length - 1; y >= 0; y--) {
|
|
661
|
+
const w = h[y];
|
|
662
|
+
if (((g = w == null ? void 0 : w.author) == null ? void 0 : g.type) === "user") return [];
|
|
663
663
|
if ((w == null ? void 0 : w.type) === "action" && ((d = w == null ? void 0 : w.payload) == null ? void 0 : d.state) === "pending")
|
|
664
664
|
return [];
|
|
665
665
|
if (((f = w == null ? void 0 : w.author) == null ? void 0 : f.type) !== "agent_ia") continue;
|
|
@@ -680,60 +680,60 @@ function Xe(e) {
|
|
|
680
680
|
}
|
|
681
681
|
return [];
|
|
682
682
|
}
|
|
683
|
-
function Y(
|
|
683
|
+
function Y(m, h) {
|
|
684
684
|
var _;
|
|
685
|
-
const
|
|
685
|
+
const g = t.messagesByConv[m] || [];
|
|
686
686
|
let d = -1;
|
|
687
|
-
|
|
688
|
-
(y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id ===
|
|
689
|
-
)), d === -1 && (
|
|
687
|
+
h != null && h.client_msg_id && (d = g.findIndex(
|
|
688
|
+
(y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id === h.client_msg_id
|
|
689
|
+
)), d === -1 && (h == null ? void 0 : h.id) !== void 0 && (h == null ? void 0 : h.id) !== null && (d = g.findIndex((y) => Q(y == null ? void 0 : y.id, h.id)));
|
|
690
690
|
let f;
|
|
691
|
-
d === -1 ? f = [...
|
|
692
|
-
...
|
|
693
|
-
...
|
|
691
|
+
d === -1 ? f = [...g, h].sort(ce) : (f = g.slice(), f[d] = {
|
|
692
|
+
...g[d],
|
|
693
|
+
...h,
|
|
694
694
|
_pending: !1,
|
|
695
695
|
_failed: !1
|
|
696
|
-
}), t.messagesByConv[
|
|
696
|
+
}), t.messagesByConv[m] = f, (h == null ? void 0 : h.type) === "action" && ((_ = h == null ? void 0 : h.payload) != null && _.state) && h.payload.state !== "pending" && (h == null ? void 0 : h.id) != null && t.awaitingCallback[h.id] && delete t.awaitingCallback[h.id];
|
|
697
697
|
}
|
|
698
|
-
function Q(
|
|
699
|
-
return
|
|
698
|
+
function Q(m, h) {
|
|
699
|
+
return m === h ? !0 : m == null || h == null ? !1 : String(m) === String(h);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
const d = t.messagesByConv[
|
|
701
|
+
function z(m, h, g) {
|
|
702
|
+
const d = t.messagesByConv[m];
|
|
703
703
|
if (!d) return;
|
|
704
|
-
const f = d.findIndex((y) => y.id ===
|
|
704
|
+
const f = d.findIndex((y) => y.id === h);
|
|
705
705
|
if (f === -1) return;
|
|
706
706
|
const _ = d.slice();
|
|
707
|
-
_[f] = { ...d[f], ...
|
|
707
|
+
_[f] = { ...d[f], ...g }, t.messagesByConv[m] = _;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
712
|
-
const d = t.conversations[
|
|
713
|
-
if (
|
|
709
|
+
function he(m, h) {
|
|
710
|
+
const g = t.conversations.findIndex((f) => f.id === m);
|
|
711
|
+
if (g === -1) return;
|
|
712
|
+
const d = t.conversations[g];
|
|
713
|
+
if (h && (!d.last_message_at || h > d.last_message_at)) {
|
|
714
714
|
const f = t.conversations.slice();
|
|
715
|
-
f[
|
|
715
|
+
f[g] = { ...d, last_message_at: h }, f.sort(
|
|
716
716
|
(_, y) => (y.last_message_at || "").localeCompare(_.last_message_at || "")
|
|
717
717
|
), t.conversations = f;
|
|
718
718
|
}
|
|
719
719
|
}
|
|
720
|
-
function ce(
|
|
721
|
-
return (
|
|
720
|
+
function ce(m, h) {
|
|
721
|
+
return (m.created_at || "").localeCompare(h.created_at || "");
|
|
722
722
|
}
|
|
723
|
-
function de(
|
|
724
|
-
if (!
|
|
725
|
-
const
|
|
726
|
-
for (const [d, f] of Object.entries(
|
|
727
|
-
f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (
|
|
728
|
-
return Object.keys(
|
|
723
|
+
function de(m) {
|
|
724
|
+
if (!m || typeof m != "object") return null;
|
|
725
|
+
const h = {}, g = {};
|
|
726
|
+
for (const [d, f] of Object.entries(m))
|
|
727
|
+
f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (h[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(g, f) : g[d] = f);
|
|
728
|
+
return Object.keys(g).length && (h.values = g), Object.keys(h).length ? h : null;
|
|
729
729
|
}
|
|
730
|
-
function se(
|
|
731
|
-
const
|
|
732
|
-
let
|
|
733
|
-
for (const _ of
|
|
734
|
-
_ != null && _.created_at && _.created_at >
|
|
730
|
+
function se(m) {
|
|
731
|
+
const h = t.messagesByConv[m] || [];
|
|
732
|
+
let g = "";
|
|
733
|
+
for (const _ of h)
|
|
734
|
+
_ != null && _.created_at && _.created_at > g && (g = _.created_at);
|
|
735
735
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
736
|
-
return !
|
|
736
|
+
return !g || d > g ? d : new Date(Date.parse(g) + 1).toISOString();
|
|
737
737
|
}
|
|
738
738
|
return {
|
|
739
739
|
state: t,
|
|
@@ -741,9 +741,9 @@ function Xe(e) {
|
|
|
741
741
|
destroy: r,
|
|
742
742
|
applyCustomer: s,
|
|
743
743
|
createConversation: a,
|
|
744
|
-
openConversation:
|
|
744
|
+
openConversation: p,
|
|
745
745
|
loadMore: C,
|
|
746
|
-
fetchSinceLast:
|
|
746
|
+
fetchSinceLast: E,
|
|
747
747
|
patchConversation: T,
|
|
748
748
|
markConversationRead: A,
|
|
749
749
|
send: H,
|
|
@@ -758,7 +758,7 @@ function Xe(e) {
|
|
|
758
758
|
setPanelOpen: e.setPanelOpen
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
const
|
|
761
|
+
const D = {
|
|
762
762
|
w: "#ffffff",
|
|
763
763
|
g50: "#F9F9F7",
|
|
764
764
|
g100: "#F2F1EE",
|
|
@@ -788,7 +788,7 @@ function xe(e = "") {
|
|
|
788
788
|
function Oe(e = "") {
|
|
789
789
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function Ie(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
|
|
792
792
|
return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
|
|
793
793
|
}
|
|
794
794
|
const Je = `
|
|
@@ -797,21 +797,21 @@ const Je = `
|
|
|
797
797
|
.wm-root {
|
|
798
798
|
--wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
799
799
|
--wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
800
|
-
--wm-w: ${
|
|
801
|
-
--wm-g50: ${
|
|
802
|
-
--wm-g100: ${
|
|
803
|
-
--wm-g150: ${
|
|
804
|
-
--wm-g200: ${
|
|
805
|
-
--wm-g300: ${
|
|
806
|
-
--wm-g400: ${
|
|
807
|
-
--wm-g500: ${
|
|
808
|
-
--wm-g700: ${
|
|
809
|
-
--wm-g900: ${
|
|
810
|
-
--wm-a: ${
|
|
811
|
-
--wm-al: ${
|
|
812
|
-
--wm-green: ${
|
|
813
|
-
--wm-red: ${
|
|
814
|
-
--wm-redBg: ${
|
|
800
|
+
--wm-w: ${D.w};
|
|
801
|
+
--wm-g50: ${D.g50};
|
|
802
|
+
--wm-g100: ${D.g100};
|
|
803
|
+
--wm-g150: ${D.g150};
|
|
804
|
+
--wm-g200: ${D.g200};
|
|
805
|
+
--wm-g300: ${D.g300};
|
|
806
|
+
--wm-g400: ${D.g400};
|
|
807
|
+
--wm-g500: ${D.g500};
|
|
808
|
+
--wm-g700: ${D.g700};
|
|
809
|
+
--wm-g900: ${D.g900};
|
|
810
|
+
--wm-a: ${D.accent};
|
|
811
|
+
--wm-al: ${D.accentLight};
|
|
812
|
+
--wm-green: ${D.green};
|
|
813
|
+
--wm-red: ${D.red};
|
|
814
|
+
--wm-redBg: ${D.redBg};
|
|
815
815
|
--wm-sh1: 0 1px 3px rgba(0,0,0,.06);
|
|
816
816
|
--wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
|
|
817
817
|
--wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
|
|
@@ -1079,21 +1079,21 @@ I reply within seconds.`,
|
|
|
1079
1079
|
"export.createdOn": "Created on: {date}"
|
|
1080
1080
|
}
|
|
1081
1081
|
};
|
|
1082
|
-
function
|
|
1082
|
+
function pe(e) {
|
|
1083
1083
|
if (typeof e != "string") return ie;
|
|
1084
1084
|
const t = e.trim().toLowerCase().slice(0, 2);
|
|
1085
1085
|
return et.includes(t) ? t : ie;
|
|
1086
1086
|
}
|
|
1087
1087
|
function oe(e) {
|
|
1088
|
-
return we[
|
|
1088
|
+
return we[pe(e)] || we[ie];
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1091
|
-
const t =
|
|
1090
|
+
function U(e) {
|
|
1091
|
+
const t = pe(e), n = _e[t] || _e[ie], i = _e[ie];
|
|
1092
1092
|
return function(s, a) {
|
|
1093
1093
|
let l = n[s];
|
|
1094
1094
|
return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
|
|
1095
1095
|
/\{(\w+)\}/g,
|
|
1096
|
-
(
|
|
1096
|
+
(p, C) => a[C] != null ? String(a[C]) : p
|
|
1097
1097
|
)), l);
|
|
1098
1098
|
};
|
|
1099
1099
|
}
|
|
@@ -1102,17 +1102,17 @@ function ke(e, t) {
|
|
|
1102
1102
|
const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
|
|
1103
1103
|
return (n == null ? void 0 : n.label) || t;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function Le(e, t, n) {
|
|
1106
1106
|
return Array.isArray(t) ? t.map((i) => ke(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : ke(e, String(t));
|
|
1107
1107
|
}
|
|
1108
|
-
function tt(e, t, n =
|
|
1108
|
+
function tt(e, t, n = U()) {
|
|
1109
1109
|
if (!e || !t) return "";
|
|
1110
1110
|
const i = Array.isArray(e.fields) ? e.fields : [], r = [];
|
|
1111
1111
|
for (const s of i) {
|
|
1112
1112
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1113
1113
|
const a = t[s.key];
|
|
1114
1114
|
if (a == null || a === "") continue;
|
|
1115
|
-
const l =
|
|
1115
|
+
const l = Le(s, a, n);
|
|
1116
1116
|
l && r.push(`${s.label} :
|
|
1117
1117
|
${l}`);
|
|
1118
1118
|
}
|
|
@@ -1120,17 +1120,17 @@ ${l}`);
|
|
|
1120
1120
|
|
|
1121
1121
|
`);
|
|
1122
1122
|
}
|
|
1123
|
-
function nt(e, t, n =
|
|
1123
|
+
function nt(e, t, n = U()) {
|
|
1124
1124
|
const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1125
1125
|
for (const s of r) {
|
|
1126
1126
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1127
1127
|
const a = t == null ? void 0 : t[s.key];
|
|
1128
1128
|
if (a == null || a === "") continue;
|
|
1129
|
-
const l =
|
|
1129
|
+
const l = Le(s, a, n);
|
|
1130
1130
|
if (!l) continue;
|
|
1131
|
-
const
|
|
1131
|
+
const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
|
|
1132
1132
|
`));
|
|
1133
|
-
i.push({ label: s.label, value: l, multiline:
|
|
1133
|
+
i.push({ label: s.label, value: l, multiline: p });
|
|
1134
1134
|
}
|
|
1135
1135
|
return {
|
|
1136
1136
|
kind: "form_response",
|
|
@@ -1164,8 +1164,8 @@ function st(e, t) {
|
|
|
1164
1164
|
const l = typeof a.text_md == "string" ? a.text_md.trim() : "";
|
|
1165
1165
|
if (l)
|
|
1166
1166
|
return (((n = a.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
|
|
1167
|
-
const
|
|
1168
|
-
if (Array.isArray(
|
|
1167
|
+
const p = (i = a.payload) == null ? void 0 : i.attachments;
|
|
1168
|
+
if (Array.isArray(p) && p.length) return "📎 Pièce jointe";
|
|
1169
1169
|
}
|
|
1170
1170
|
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((r = e == null ? void 0 : e.metadata) == null ? void 0 : r.last_preview) || "";
|
|
1171
1171
|
}
|
|
@@ -1184,13 +1184,13 @@ function it(e, t, n, i) {
|
|
|
1184
1184
|
if (!s) continue;
|
|
1185
1185
|
const a = (s.text_md || "").trim();
|
|
1186
1186
|
if (!a) continue;
|
|
1187
|
-
const l = rt(s.author, n),
|
|
1188
|
-
r.push(`[${
|
|
1187
|
+
const l = rt(s.author, n), p = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
|
|
1188
|
+
r.push(`[${p}] ${l} :`), r.push(a), r.push("");
|
|
1189
1189
|
}
|
|
1190
1190
|
return r.join(`
|
|
1191
1191
|
`);
|
|
1192
1192
|
}
|
|
1193
|
-
function at(e, t, n =
|
|
1193
|
+
function at(e, t, n = U(), i) {
|
|
1194
1194
|
if (!e) return;
|
|
1195
1195
|
const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
|
|
1196
1196
|
try {
|
|
@@ -1336,29 +1336,29 @@ const ot = {
|
|
|
1336
1336
|
if (typeof Notification > "u" || Notification.permission !== "granted") return;
|
|
1337
1337
|
const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), a = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = a ? a.slice(0, 140) : this.t("notification.youHaveNewMessage");
|
|
1338
1338
|
try {
|
|
1339
|
-
const
|
|
1339
|
+
const p = new Notification(s, {
|
|
1340
1340
|
body: l,
|
|
1341
1341
|
tag: `wm-${e}`,
|
|
1342
1342
|
renotify: !1,
|
|
1343
1343
|
silent: !0
|
|
1344
1344
|
});
|
|
1345
|
-
|
|
1345
|
+
p.onclick = () => {
|
|
1346
1346
|
try {
|
|
1347
1347
|
window.focus();
|
|
1348
1348
|
} catch {
|
|
1349
1349
|
}
|
|
1350
1350
|
this.draftConv = null, this.showOnboarding = !1, this.activeConvId = e, this.isOpen = !0, this.store && this.store.setPanelOpen(!0);
|
|
1351
1351
|
try {
|
|
1352
|
-
|
|
1352
|
+
p.close();
|
|
1353
1353
|
} catch {
|
|
1354
1354
|
}
|
|
1355
1355
|
};
|
|
1356
|
-
} catch (
|
|
1357
|
-
console.warn("[ww-messenger] notification failed",
|
|
1356
|
+
} catch (p) {
|
|
1357
|
+
console.warn("[ww-messenger] notification failed", p);
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
}, lt = 450, ct = 50, dt = 900, ut = 12e3,
|
|
1361
|
+
}, lt = 450, ct = 50, dt = 900, ut = 12e3, mt = 300, ht = {
|
|
1362
1362
|
data() {
|
|
1363
1363
|
return {
|
|
1364
1364
|
// Map: messageId → ms timestamp once shown.
|
|
@@ -1442,8 +1442,8 @@ const ot = {
|
|
|
1442
1442
|
if (!(a != null && a.id)) continue;
|
|
1443
1443
|
const l = a.last_message_at || "";
|
|
1444
1444
|
if (!l) continue;
|
|
1445
|
-
const
|
|
1446
|
-
l >
|
|
1445
|
+
const p = n.get(a.id) || "";
|
|
1446
|
+
l > p && i.push(a.id);
|
|
1447
1447
|
}
|
|
1448
1448
|
this._liveRevealConvSnapshot = new Map(
|
|
1449
1449
|
t.map((a) => [a.id, (a == null ? void 0 : a.last_message_at) || ""])
|
|
@@ -1452,7 +1452,7 @@ const ot = {
|
|
|
1452
1452
|
try {
|
|
1453
1453
|
const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r, a));
|
|
1454
1454
|
if (!Array.isArray(l)) continue;
|
|
1455
|
-
for (const
|
|
1455
|
+
for (const p of l) this.paceLiveMessage(p, a);
|
|
1456
1456
|
} catch (l) {
|
|
1457
1457
|
console.error(
|
|
1458
1458
|
"[ww-messenger] activity delta fetch failed",
|
|
@@ -1471,11 +1471,11 @@ const ot = {
|
|
|
1471
1471
|
Math.max(dt, i * ct)
|
|
1472
1472
|
), a = Math.max(
|
|
1473
1473
|
n + lt,
|
|
1474
|
-
this.nextRevealAt +
|
|
1474
|
+
this.nextRevealAt + mt
|
|
1475
1475
|
) + r;
|
|
1476
1476
|
this.nextRevealAt = a;
|
|
1477
|
-
const l = Math.max(0, a - n),
|
|
1478
|
-
this.revealedAt = { ...this.revealedAt, [
|
|
1477
|
+
const l = Math.max(0, a - n), p = e.id, C = setTimeout(() => {
|
|
1478
|
+
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((k) => k !== C), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1479
1479
|
}, l);
|
|
1480
1480
|
this.revealTimers.push(C);
|
|
1481
1481
|
},
|
|
@@ -1499,8 +1499,8 @@ const ot = {
|
|
|
1499
1499
|
i[s.id] = n;
|
|
1500
1500
|
continue;
|
|
1501
1501
|
}
|
|
1502
|
-
const l = typeof (s == null ? void 0 : s.text_md) == "string" && s.text_md.trim().length > 0,
|
|
1503
|
-
if (!l && !
|
|
1502
|
+
const l = typeof (s == null ? void 0 : s.text_md) == "string" && s.text_md.trim().length > 0, p = Array.isArray((r = s == null ? void 0 : s.payload) == null ? void 0 : r.attachments) && s.payload.attachments.length > 0;
|
|
1503
|
+
if (!l && !p) {
|
|
1504
1504
|
i[s.id] = n;
|
|
1505
1505
|
continue;
|
|
1506
1506
|
}
|
|
@@ -1563,7 +1563,7 @@ const ot = {
|
|
|
1563
1563
|
}, e);
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
|
-
}, _t = 300,
|
|
1566
|
+
}, _t = 300, gt = {
|
|
1567
1567
|
data() {
|
|
1568
1568
|
return {
|
|
1569
1569
|
// Numeric message id snapshot frozen the moment the user
|
|
@@ -1594,7 +1594,7 @@ const ot = {
|
|
|
1594
1594
|
markConvRead(e) {
|
|
1595
1595
|
var s, a;
|
|
1596
1596
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1597
|
-
const t = ((a = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : a[e.id]) || [], n =
|
|
1597
|
+
const t = ((a = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : a[e.id]) || [], n = pt(t);
|
|
1598
1598
|
if (n == null) return;
|
|
1599
1599
|
const i = J(e.last_read_message_id), r = J(n);
|
|
1600
1600
|
r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
@@ -1607,7 +1607,7 @@ const ot = {
|
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
1609
|
};
|
|
1610
|
-
function
|
|
1610
|
+
function pt(e) {
|
|
1611
1611
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
1612
1612
|
const n = e[t];
|
|
1613
1613
|
if (!(!n || n._pending) && J(n.id) != null)
|
|
@@ -1615,7 +1615,7 @@ function gt(e) {
|
|
|
1615
1615
|
}
|
|
1616
1616
|
return null;
|
|
1617
1617
|
}
|
|
1618
|
-
const
|
|
1618
|
+
const B = (e, t) => {
|
|
1619
1619
|
const n = e.__vccOpts || e;
|
|
1620
1620
|
for (const [i, r] of t)
|
|
1621
1621
|
n[i] = r;
|
|
@@ -1661,13 +1661,13 @@ function bt(e, t, n, i, r, s) {
|
|
|
1661
1661
|
}, v(s.initials), 5))
|
|
1662
1662
|
], 6);
|
|
1663
1663
|
}
|
|
1664
|
-
const
|
|
1664
|
+
const Be = /* @__PURE__ */ B(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d"]]), wt = 3, kt = {
|
|
1665
1665
|
name: "WmLauncher",
|
|
1666
|
-
components: { HumanAvatar:
|
|
1666
|
+
components: { HumanAvatar: Be },
|
|
1667
1667
|
inject: {
|
|
1668
1668
|
// Translator shared by the Messenger shell; French fallback when
|
|
1669
1669
|
// the component is used standalone.
|
|
1670
|
-
t: { default: () =>
|
|
1670
|
+
t: { default: () => U() }
|
|
1671
1671
|
},
|
|
1672
1672
|
props: {
|
|
1673
1673
|
// Nombre de conversations non lues — pilote la pastille.
|
|
@@ -1687,22 +1687,22 @@ const Ee = /* @__PURE__ */ E(vt, [["render", bt], ["__scopeId", "data-v-14e10c0d
|
|
|
1687
1687
|
return this.peeks.slice(0, wt).reverse();
|
|
1688
1688
|
}
|
|
1689
1689
|
}
|
|
1690
|
-
}, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" },
|
|
1690
|
+
}, Ct = { class: "wm-launcherWrap" }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, It = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Bt = { class: "wm-peek__text" }, Et = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
|
|
1691
1691
|
function Ft(e, t, n, i, r, s) {
|
|
1692
|
-
const a =
|
|
1692
|
+
const a = L("HumanAvatar");
|
|
1693
1693
|
return c(), u("div", Ct, [
|
|
1694
|
-
|
|
1695
|
-
default:
|
|
1694
|
+
q(je, { name: "wm-peek" }, {
|
|
1695
|
+
default: Ue(() => [
|
|
1696
1696
|
s.visiblePeeks.length ? (c(), u("div", {
|
|
1697
1697
|
key: 0,
|
|
1698
1698
|
class: x(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1699
1699
|
}, [
|
|
1700
|
-
(c(!0), u(
|
|
1700
|
+
(c(!0), u(I, null, j(s.visiblePeeks, (l, p) => (c(), u("div", {
|
|
1701
1701
|
key: l.convId,
|
|
1702
1702
|
class: "wm-peek",
|
|
1703
1703
|
style: K({
|
|
1704
|
-
"--depth": s.visiblePeeks.length - 1 -
|
|
1705
|
-
zIndex:
|
|
1704
|
+
"--depth": s.visiblePeeks.length - 1 - p,
|
|
1705
|
+
zIndex: p + 1
|
|
1706
1706
|
}),
|
|
1707
1707
|
role: "button",
|
|
1708
1708
|
tabindex: "0",
|
|
@@ -1736,7 +1736,7 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1736
1736
|
], -1)
|
|
1737
1737
|
])], 8, St),
|
|
1738
1738
|
o("div", Mt, [
|
|
1739
|
-
|
|
1739
|
+
q(a, {
|
|
1740
1740
|
name: l.senderName,
|
|
1741
1741
|
"avatar-url": l.senderAvatarUrl,
|
|
1742
1742
|
size: 34
|
|
@@ -1749,16 +1749,16 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1749
1749
|
]),
|
|
1750
1750
|
o("div", xt, [
|
|
1751
1751
|
o("div", Ot, [
|
|
1752
|
-
o("span",
|
|
1753
|
-
o("span",
|
|
1752
|
+
o("span", It, v(l.senderName || s.t("common.agent")), 1),
|
|
1753
|
+
o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
|
|
1754
1754
|
]),
|
|
1755
|
-
o("p",
|
|
1755
|
+
o("p", Bt, v(l.preview), 1)
|
|
1756
1756
|
]),
|
|
1757
1757
|
o("button", {
|
|
1758
1758
|
type: "button",
|
|
1759
1759
|
class: "wm-peek__open",
|
|
1760
1760
|
onClick: X((C) => e.$emit("open", l.convId), ["stop"])
|
|
1761
|
-
}, v(s.t("common.open")), 9,
|
|
1761
|
+
}, v(s.t("common.open")), 9, Et)
|
|
1762
1762
|
], 44, At))), 128))
|
|
1763
1763
|
], 2)) : b("", !0)
|
|
1764
1764
|
]),
|
|
@@ -1795,7 +1795,7 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1795
1795
|
], 8, Rt)
|
|
1796
1796
|
]);
|
|
1797
1797
|
}
|
|
1798
|
-
const jt = /* @__PURE__ */
|
|
1798
|
+
const jt = /* @__PURE__ */ B(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), Ut = {
|
|
1799
1799
|
name: "WmAIAvatar",
|
|
1800
1800
|
props: {
|
|
1801
1801
|
size: { type: Number, default: 26 },
|
|
@@ -1805,13 +1805,17 @@ const jt = /* @__PURE__ */ E(kt, [["render", Ft], ["__scopeId", "data-v-5193a529
|
|
|
1805
1805
|
// l'avatar est posé à côté de messages dans le fil. Ailleurs
|
|
1806
1806
|
// (Header, Onboarding, ApprovalCard, FormCard…) → laissé à false
|
|
1807
1807
|
// pour garder l'avatar pleinement arrondi.
|
|
1808
|
-
tail: { type: Boolean, default: !1 }
|
|
1808
|
+
tail: { type: Boolean, default: !1 },
|
|
1809
|
+
// Image distante (avatar de l'agent ou `default_icon_url` du
|
|
1810
|
+
// widget). Quand renseignée, remplace l'étoile par l'image dans
|
|
1811
|
+
// le même container arrondi.
|
|
1812
|
+
imageUrl: { type: String, default: null }
|
|
1809
1813
|
}
|
|
1810
|
-
},
|
|
1814
|
+
}, Pt = {
|
|
1811
1815
|
key: 0,
|
|
1812
1816
|
class: "wm-aiav__pulse"
|
|
1813
|
-
},
|
|
1814
|
-
function
|
|
1817
|
+
}, Dt = ["src"], $t = ["width", "height"];
|
|
1818
|
+
function Ht(e, t, n, i, r, s) {
|
|
1815
1819
|
return c(), u("div", {
|
|
1816
1820
|
class: x(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
1817
1821
|
style: K({
|
|
@@ -1820,11 +1824,19 @@ function $t(e, t, n, i, r, s) {
|
|
|
1820
1824
|
"--wm-avr": n.size * 0.32 + "px"
|
|
1821
1825
|
})
|
|
1822
1826
|
}, [
|
|
1823
|
-
n.pulse ? (c(), u("div",
|
|
1827
|
+
n.pulse ? (c(), u("div", Pt)) : b("", !0),
|
|
1824
1828
|
o("div", {
|
|
1825
|
-
class: x(["wm-aiav__inner", {
|
|
1829
|
+
class: x(["wm-aiav__inner", {
|
|
1830
|
+
"wm-aiav__inner--glow": n.pulse,
|
|
1831
|
+
"wm-aiav__inner--img": !!n.imageUrl
|
|
1832
|
+
}])
|
|
1826
1833
|
}, [
|
|
1827
|
-
(c(), u("
|
|
1834
|
+
n.imageUrl ? (c(), u("img", {
|
|
1835
|
+
key: 0,
|
|
1836
|
+
src: n.imageUrl,
|
|
1837
|
+
alt: ""
|
|
1838
|
+
}, null, 8, Dt)) : (c(), u("svg", {
|
|
1839
|
+
key: 1,
|
|
1828
1840
|
width: n.size * 0.5,
|
|
1829
1841
|
height: n.size * 0.5,
|
|
1830
1842
|
viewBox: "0 0 24 24",
|
|
@@ -1850,11 +1862,11 @@ function $t(e, t, n, i, r, s) {
|
|
|
1850
1862
|
fill: "white",
|
|
1851
1863
|
opacity: "0.38"
|
|
1852
1864
|
}, null, -1)
|
|
1853
|
-
])], 8,
|
|
1865
|
+
])], 8, $t))
|
|
1854
1866
|
], 2)
|
|
1855
1867
|
], 6);
|
|
1856
1868
|
}
|
|
1857
|
-
const le = /* @__PURE__ */
|
|
1869
|
+
const le = /* @__PURE__ */ B(Ut, [["render", Ht], ["__scopeId", "data-v-99d8093a"]]), qt = {
|
|
1858
1870
|
name: "WmTeamAvatars",
|
|
1859
1871
|
props: {
|
|
1860
1872
|
members: { type: Array, default: () => [] },
|
|
@@ -1879,17 +1891,17 @@ const le = /* @__PURE__ */ E(Pt, [["render", $t], ["__scopeId", "data-v-d621a129
|
|
|
1879
1891
|
}, zt = {
|
|
1880
1892
|
key: 0,
|
|
1881
1893
|
class: "wm-team"
|
|
1882
|
-
},
|
|
1894
|
+
}, Vt = ["src", "alt"], Kt = { key: 1 }, Wt = {
|
|
1883
1895
|
key: 0,
|
|
1884
1896
|
class: "wm-team__label"
|
|
1885
1897
|
};
|
|
1886
|
-
function
|
|
1898
|
+
function Gt(e, t, n, i, r, s) {
|
|
1887
1899
|
return s.visible ? (c(), u("div", zt, [
|
|
1888
1900
|
o("div", {
|
|
1889
1901
|
class: "wm-team__stack",
|
|
1890
1902
|
style: K({ width: s.stackWidth + "px" })
|
|
1891
1903
|
}, [
|
|
1892
|
-
(c(!0), u(
|
|
1904
|
+
(c(!0), u(I, null, j(n.members.slice(0, 3), (a, l) => (c(), u("div", {
|
|
1893
1905
|
key: l,
|
|
1894
1906
|
class: "wm-team__pill",
|
|
1895
1907
|
style: K({
|
|
@@ -1902,19 +1914,19 @@ function Wt(e, t, n, i, r, s) {
|
|
|
1902
1914
|
key: 0,
|
|
1903
1915
|
src: a.avatar_url,
|
|
1904
1916
|
alt: a.name || ""
|
|
1905
|
-
}, null, 8,
|
|
1917
|
+
}, null, 8, Vt)) : (c(), u("span", Kt, v(s.initialsFor(a)), 1))
|
|
1906
1918
|
], 4))), 128))
|
|
1907
1919
|
], 4),
|
|
1908
|
-
n.responseLabel ? (c(), u("span",
|
|
1920
|
+
n.responseLabel ? (c(), u("span", Wt, v(n.responseLabel), 1)) : b("", !0)
|
|
1909
1921
|
])) : b("", !0);
|
|
1910
1922
|
}
|
|
1911
|
-
const
|
|
1923
|
+
const Yt = /* @__PURE__ */ B(qt, [["render", Gt], ["__scopeId", "data-v-e49a9063"]]), Qt = {
|
|
1912
1924
|
name: "WmHeader",
|
|
1913
|
-
components: { AIAvatar: le, TeamAvatars:
|
|
1925
|
+
components: { AIAvatar: le, TeamAvatars: Yt },
|
|
1914
1926
|
inject: {
|
|
1915
1927
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
1916
1928
|
// translator when the component is used standalone (no provider).
|
|
1917
|
-
t: { default: () =>
|
|
1929
|
+
t: { default: () => U() }
|
|
1918
1930
|
},
|
|
1919
1931
|
props: {
|
|
1920
1932
|
title: { type: String, default: "Nouvelle conversation" },
|
|
@@ -1926,7 +1938,8 @@ const Gt = /* @__PURE__ */ E(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063
|
|
|
1926
1938
|
moreActive: { type: Boolean, default: !1 },
|
|
1927
1939
|
// When false (welcome / no conversation) the avatar + title + status
|
|
1928
1940
|
// block is hidden so the header stays a minimal action bar.
|
|
1929
|
-
showIdentity: { type: Boolean, default: !0 }
|
|
1941
|
+
showIdentity: { type: Boolean, default: !0 },
|
|
1942
|
+
agentAvatarUrl: { type: String, default: null }
|
|
1930
1943
|
},
|
|
1931
1944
|
emits: ["back", "close", "more"],
|
|
1932
1945
|
computed: {
|
|
@@ -1945,22 +1958,22 @@ const Gt = /* @__PURE__ */ E(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063
|
|
|
1945
1958
|
return n;
|
|
1946
1959
|
}
|
|
1947
1960
|
}
|
|
1948
|
-
},
|
|
1961
|
+
}, Xt = { class: "wm-header" }, Jt = ["aria-label"], Zt = {
|
|
1949
1962
|
key: 1,
|
|
1950
1963
|
style: { width: "30px", height: "30px", "flex-shrink": "0" }
|
|
1951
|
-
},
|
|
1964
|
+
}, en = { class: "wm-header__avatar" }, tn = { class: "wm-header__main" }, nn = { class: "wm-header__title" }, sn = {
|
|
1952
1965
|
key: 3,
|
|
1953
1966
|
class: "wm-header__fill"
|
|
1954
|
-
},
|
|
1955
|
-
function
|
|
1956
|
-
const a =
|
|
1957
|
-
return c(), u("div",
|
|
1967
|
+
}, rn = { class: "wm-header__actions" }, an = ["aria-label", "title"], on = ["aria-label", "title"];
|
|
1968
|
+
function ln(e, t, n, i, r, s) {
|
|
1969
|
+
const a = L("AIAvatar"), l = L("TeamAvatars");
|
|
1970
|
+
return c(), u("div", Xt, [
|
|
1958
1971
|
n.showBack ? (c(), u("button", {
|
|
1959
1972
|
key: 0,
|
|
1960
1973
|
type: "button",
|
|
1961
1974
|
class: "wm-header__icon",
|
|
1962
1975
|
"aria-label": s.t("header.backToHome"),
|
|
1963
|
-
onClick: t[0] || (t[0] = (
|
|
1976
|
+
onClick: t[0] || (t[0] = (p) => e.$emit("back"))
|
|
1964
1977
|
}, [...t[3] || (t[3] = [
|
|
1965
1978
|
o("svg", {
|
|
1966
1979
|
width: "13",
|
|
@@ -1975,28 +1988,31 @@ function on(e, t, n, i, r, s) {
|
|
|
1975
1988
|
}, [
|
|
1976
1989
|
o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
1977
1990
|
], -1)
|
|
1978
|
-
])], 8,
|
|
1979
|
-
n.showIdentity ? (c(), u(
|
|
1980
|
-
o("div", Zt, [
|
|
1981
|
-
z(a, { size: 30 })
|
|
1982
|
-
]),
|
|
1991
|
+
])], 8, Jt)) : (c(), u("div", Zt)),
|
|
1992
|
+
n.showIdentity ? (c(), u(I, { key: 2 }, [
|
|
1983
1993
|
o("div", en, [
|
|
1984
|
-
|
|
1994
|
+
q(a, {
|
|
1995
|
+
size: 30,
|
|
1996
|
+
"image-url": n.agentAvatarUrl
|
|
1997
|
+
}, null, 8, ["image-url"])
|
|
1998
|
+
]),
|
|
1999
|
+
o("div", tn, [
|
|
2000
|
+
o("div", nn, v(n.title), 1)
|
|
1985
2001
|
]),
|
|
1986
2002
|
s.hasTeam ? (c(), R(l, {
|
|
1987
2003
|
key: 0,
|
|
1988
2004
|
members: s.displayedTeamMembers,
|
|
1989
2005
|
"response-label": ""
|
|
1990
2006
|
}, null, 8, ["members"])) : b("", !0)
|
|
1991
|
-
], 64)) : (c(), u("div",
|
|
1992
|
-
o("div",
|
|
2007
|
+
], 64)) : (c(), u("div", sn)),
|
|
2008
|
+
o("div", rn, [
|
|
1993
2009
|
n.showMore ? (c(), u("button", {
|
|
1994
2010
|
key: 0,
|
|
1995
2011
|
type: "button",
|
|
1996
2012
|
class: x(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
|
|
1997
2013
|
"aria-label": s.t("header.moreOptions"),
|
|
1998
2014
|
title: s.t("header.moreOptions"),
|
|
1999
|
-
onClick: t[1] || (t[1] = (
|
|
2015
|
+
onClick: t[1] || (t[1] = (p) => e.$emit("more"))
|
|
2000
2016
|
}, [...t[4] || (t[4] = [
|
|
2001
2017
|
o("svg", {
|
|
2002
2018
|
width: "13",
|
|
@@ -2021,14 +2037,14 @@ function on(e, t, n, i, r, s) {
|
|
|
2021
2037
|
r: "1.6"
|
|
2022
2038
|
})
|
|
2023
2039
|
], -1)
|
|
2024
|
-
])], 10,
|
|
2040
|
+
])], 10, an)) : b("", !0),
|
|
2025
2041
|
n.showClose ? (c(), u("button", {
|
|
2026
2042
|
key: 1,
|
|
2027
2043
|
type: "button",
|
|
2028
2044
|
class: "wm-header__icon",
|
|
2029
2045
|
"aria-label": s.t("header.closeWidget"),
|
|
2030
2046
|
title: s.t("header.closeWidget"),
|
|
2031
|
-
onClick: t[2] || (t[2] = (
|
|
2047
|
+
onClick: t[2] || (t[2] = (p) => e.$emit("close"))
|
|
2032
2048
|
}, [...t[5] || (t[5] = [
|
|
2033
2049
|
o("svg", {
|
|
2034
2050
|
width: "13",
|
|
@@ -2043,15 +2059,15 @@ function on(e, t, n, i, r, s) {
|
|
|
2043
2059
|
}, [
|
|
2044
2060
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2045
2061
|
], -1)
|
|
2046
|
-
])], 8,
|
|
2062
|
+
])], 8, on)) : b("", !0)
|
|
2047
2063
|
])
|
|
2048
2064
|
]);
|
|
2049
2065
|
}
|
|
2050
|
-
const
|
|
2051
|
-
function
|
|
2066
|
+
const cn = /* @__PURE__ */ B(Qt, [["render", ln], ["__scopeId", "data-v-a94f9284"]]);
|
|
2067
|
+
function Ee(e) {
|
|
2052
2068
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2053
2069
|
}
|
|
2054
|
-
function
|
|
2070
|
+
function dn(e) {
|
|
2055
2071
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
|
|
2056
2072
|
}
|
|
2057
2073
|
const Ae = "";
|
|
@@ -2061,16 +2077,16 @@ function re(e) {
|
|
|
2061
2077
|
return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
|
|
2062
2078
|
const s = n.length;
|
|
2063
2079
|
return n.push(r), `${Ae}CODE${s}${Ae}`;
|
|
2064
|
-
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) =>
|
|
2080
|
+
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => dn(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, r) => `<code class="wm-md-code">${n[+r]}</code>`), t;
|
|
2065
2081
|
}
|
|
2066
|
-
function
|
|
2082
|
+
function un(e) {
|
|
2067
2083
|
if (!e) return "";
|
|
2068
2084
|
const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
|
|
2069
|
-
return re(
|
|
2085
|
+
return re(Ee(t));
|
|
2070
2086
|
}
|
|
2071
|
-
function
|
|
2087
|
+
function mn(e) {
|
|
2072
2088
|
if (!e) return "";
|
|
2073
|
-
const t =
|
|
2089
|
+
const t = Ee(e).split(`
|
|
2074
2090
|
`), n = [];
|
|
2075
2091
|
let i = 0;
|
|
2076
2092
|
for (; i < t.length; ) {
|
|
@@ -2109,19 +2125,19 @@ function un(e) {
|
|
|
2109
2125
|
if (!A) break;
|
|
2110
2126
|
k.push(A[1]), i++;
|
|
2111
2127
|
}
|
|
2112
|
-
const T = k.map((A) => `<li>${re(A)}</li>`).join(""),
|
|
2128
|
+
const T = k.map((A) => `<li>${re(A)}</li>`).join(""), E = C !== 1 ? ` start="${C}"` : "";
|
|
2113
2129
|
n.push({
|
|
2114
2130
|
type: "block",
|
|
2115
|
-
html: `<ol class="wm-md-ol"${
|
|
2131
|
+
html: `<ol class="wm-md-ol"${E}>${T}</ol>`
|
|
2116
2132
|
});
|
|
2117
2133
|
continue;
|
|
2118
2134
|
}
|
|
2119
|
-
const
|
|
2120
|
-
if (
|
|
2121
|
-
const C =
|
|
2135
|
+
const p = /^(#{1,6})\s+(.*)$/.exec(s);
|
|
2136
|
+
if (p) {
|
|
2137
|
+
const C = p[1].length;
|
|
2122
2138
|
n.push({
|
|
2123
2139
|
type: "block",
|
|
2124
|
-
html: `<h${C} class="wm-md-h wm-md-h${C}">${re(
|
|
2140
|
+
html: `<h${C} class="wm-md-h wm-md-h${C}">${re(p[2])}</h${C}>`
|
|
2125
2141
|
}), i++;
|
|
2126
2142
|
continue;
|
|
2127
2143
|
}
|
|
@@ -2149,12 +2165,14 @@ const Se = {
|
|
|
2149
2165
|
inject: {
|
|
2150
2166
|
// Translator + resolved-language getter shared by the Messenger
|
|
2151
2167
|
// shell. Fall back to French wording when used standalone.
|
|
2152
|
-
t: { default: () =>
|
|
2168
|
+
t: { default: () => U() },
|
|
2153
2169
|
wmLocale: { default: () => () => "fr" }
|
|
2154
2170
|
},
|
|
2155
2171
|
props: {
|
|
2156
2172
|
welcomeMessage: { type: String, default: "" },
|
|
2173
|
+
subtitle: { type: String, default: "" },
|
|
2157
2174
|
agentName: { type: String, default: "" },
|
|
2175
|
+
defaultIconUrl: { type: String, default: null },
|
|
2158
2176
|
quickLinks: { type: Array, default: () => [] },
|
|
2159
2177
|
openThreads: { type: Array, default: () => [] },
|
|
2160
2178
|
busy: { type: Boolean, default: !1 }
|
|
@@ -2168,7 +2186,7 @@ const Se = {
|
|
|
2168
2186
|
return this.welcomeMessage ? this.welcomeMessage : this.agentName ? this.t("onboarding.greetingNamed", { name: this.agentName }) : this.t("onboarding.greeting");
|
|
2169
2187
|
},
|
|
2170
2188
|
heroSub() {
|
|
2171
|
-
return this.t("onboarding.heroSub");
|
|
2189
|
+
return this.subtitle || this.t("onboarding.heroSub");
|
|
2172
2190
|
},
|
|
2173
2191
|
isOddQuickLinks() {
|
|
2174
2192
|
return this.quickLinks.length % 2 === 1;
|
|
@@ -2188,7 +2206,7 @@ const Se = {
|
|
|
2188
2206
|
return Se[e] || Se.link;
|
|
2189
2207
|
},
|
|
2190
2208
|
renderPreview(e) {
|
|
2191
|
-
return
|
|
2209
|
+
return un(e);
|
|
2192
2210
|
},
|
|
2193
2211
|
formatTs(e) {
|
|
2194
2212
|
if (!e) return "";
|
|
@@ -2210,10 +2228,10 @@ const Se = {
|
|
|
2210
2228
|
});
|
|
2211
2229
|
}
|
|
2212
2230
|
}
|
|
2213
|
-
},
|
|
2231
|
+
}, fn = { class: "wm-onb" }, _n = { class: "wm-onb__hero" }, gn = { class: "wm-onb__title" }, pn = { class: "wm-onb__sub" }, vn = { class: "wm-onb__cta" }, yn = ["disabled"], bn = {
|
|
2214
2232
|
key: 0,
|
|
2215
2233
|
class: "wm-onb__section"
|
|
2216
|
-
},
|
|
2234
|
+
}, wn = { class: "wm-onb__section-title" }, kn = ["onClick"], Cn = { class: "wm-onb__card-icon" }, An = {
|
|
2217
2235
|
width: "16",
|
|
2218
2236
|
height: "16",
|
|
2219
2237
|
viewBox: "0 0 24 24",
|
|
@@ -2223,31 +2241,32 @@ const Se = {
|
|
|
2223
2241
|
"stroke-linecap": "round",
|
|
2224
2242
|
"stroke-linejoin": "round",
|
|
2225
2243
|
"aria-hidden": "true"
|
|
2226
|
-
},
|
|
2244
|
+
}, Sn = ["d"], Mn = { class: "wm-onb__card-body" }, Tn = { class: "wm-onb__card-title" }, xn = {
|
|
2227
2245
|
key: 0,
|
|
2228
2246
|
class: "wm-onb__card-sub"
|
|
2229
|
-
},
|
|
2247
|
+
}, On = {
|
|
2230
2248
|
key: 1,
|
|
2231
2249
|
class: "wm-onb__section"
|
|
2232
|
-
},
|
|
2250
|
+
}, In = { class: "wm-onb__section-title" }, Ln = { class: "wm-onb__search" }, Bn = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Rn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, jn = { class: "wm-onb__thread-title" }, Un = ["innerHTML"], Pn = { class: "wm-onb__thread-meta" }, Dn = {
|
|
2233
2251
|
key: 0,
|
|
2234
2252
|
class: "wm-onb__thread-time"
|
|
2235
|
-
},
|
|
2253
|
+
}, $n = {
|
|
2236
2254
|
key: 0,
|
|
2237
2255
|
class: "wm-onb__empty"
|
|
2238
2256
|
};
|
|
2239
|
-
function
|
|
2240
|
-
const a =
|
|
2241
|
-
return c(), u("div",
|
|
2242
|
-
o("div",
|
|
2243
|
-
|
|
2257
|
+
function Hn(e, t, n, i, r, s) {
|
|
2258
|
+
const a = L("AIAvatar");
|
|
2259
|
+
return c(), u("div", fn, [
|
|
2260
|
+
o("div", _n, [
|
|
2261
|
+
q(a, {
|
|
2244
2262
|
size: 56,
|
|
2245
|
-
pulse: !0
|
|
2246
|
-
|
|
2247
|
-
|
|
2263
|
+
pulse: !0,
|
|
2264
|
+
"image-url": n.defaultIconUrl
|
|
2265
|
+
}, null, 8, ["image-url"]),
|
|
2266
|
+
o("div", gn, v(s.heroTitle), 1),
|
|
2248
2267
|
o("div", pn, v(s.heroSub), 1)
|
|
2249
2268
|
]),
|
|
2250
|
-
o("div",
|
|
2269
|
+
o("div", vn, [
|
|
2251
2270
|
o("button", {
|
|
2252
2271
|
type: "button",
|
|
2253
2272
|
class: "wm-onb__startBtn",
|
|
@@ -2270,35 +2289,35 @@ function $n(e, t, n, i, r, s) {
|
|
|
2270
2289
|
])
|
|
2271
2290
|
], -1)),
|
|
2272
2291
|
o("span", null, v(n.busy ? "…" : s.t("onboarding.start")), 1)
|
|
2273
|
-
], 8,
|
|
2292
|
+
], 8, yn)
|
|
2274
2293
|
]),
|
|
2275
|
-
n.quickLinks.length ? (c(), u("div",
|
|
2276
|
-
o("div",
|
|
2294
|
+
n.quickLinks.length ? (c(), u("div", bn, [
|
|
2295
|
+
o("div", wn, v(s.t("onboarding.quickAccess")), 1),
|
|
2277
2296
|
o("div", {
|
|
2278
2297
|
class: x(s.quickLinksLayout)
|
|
2279
2298
|
}, [
|
|
2280
|
-
(c(!0), u(
|
|
2281
|
-
key:
|
|
2299
|
+
(c(!0), u(I, null, j(n.quickLinks, (l, p) => (c(), u("button", {
|
|
2300
|
+
key: p,
|
|
2282
2301
|
type: "button",
|
|
2283
2302
|
class: x(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
|
|
2284
2303
|
onClick: (C) => e.$emit("select", l)
|
|
2285
2304
|
}, [
|
|
2286
|
-
o("span",
|
|
2287
|
-
(c(), u("svg",
|
|
2305
|
+
o("span", Cn, [
|
|
2306
|
+
(c(), u("svg", An, [
|
|
2288
2307
|
o("path", {
|
|
2289
2308
|
d: s.iconPath(l.icon)
|
|
2290
|
-
}, null, 8,
|
|
2309
|
+
}, null, 8, Sn)
|
|
2291
2310
|
]))
|
|
2292
2311
|
]),
|
|
2293
|
-
o("span",
|
|
2294
|
-
o("span",
|
|
2295
|
-
l.description ? (c(), u("span",
|
|
2312
|
+
o("span", Mn, [
|
|
2313
|
+
o("span", Tn, v(l.label), 1),
|
|
2314
|
+
l.description ? (c(), u("span", xn, v(l.description), 1)) : b("", !0)
|
|
2296
2315
|
])
|
|
2297
|
-
], 10,
|
|
2316
|
+
], 10, kn))), 128))
|
|
2298
2317
|
], 2)
|
|
2299
2318
|
])) : b("", !0),
|
|
2300
|
-
n.openThreads.length ? (c(), u("div",
|
|
2301
|
-
o("div",
|
|
2319
|
+
n.openThreads.length ? (c(), u("div", On, [
|
|
2320
|
+
o("div", In, v(s.t("onboarding.recentConversations")), 1),
|
|
2302
2321
|
o("div", Ln, [
|
|
2303
2322
|
t[3] || (t[3] = o("span", { class: "wm-onb__searchIcon" }, [
|
|
2304
2323
|
o("svg", {
|
|
@@ -2320,16 +2339,16 @@ function $n(e, t, n, i, r, s) {
|
|
|
2320
2339
|
type: "text",
|
|
2321
2340
|
placeholder: s.t("onboarding.search"),
|
|
2322
2341
|
"aria-label": s.t("onboarding.search")
|
|
2323
|
-
}, null, 8,
|
|
2342
|
+
}, null, 8, Bn), [
|
|
2324
2343
|
[ee, r.query]
|
|
2325
2344
|
])
|
|
2326
2345
|
]),
|
|
2327
2346
|
o("div", En, [
|
|
2328
|
-
(c(!0), u(
|
|
2347
|
+
(c(!0), u(I, null, j(s.filteredThreads, (l) => (c(), u("button", {
|
|
2329
2348
|
key: l.id,
|
|
2330
2349
|
type: "button",
|
|
2331
2350
|
class: "wm-onb__thread",
|
|
2332
|
-
onClick: (
|
|
2351
|
+
onClick: (p) => e.$emit("resume", l)
|
|
2333
2352
|
}, [
|
|
2334
2353
|
o("span", {
|
|
2335
2354
|
class: x(["wm-onb__thread-icon", { "wm-onb__thread-icon--inverted": !l.unread }])
|
|
@@ -2351,14 +2370,14 @@ function $n(e, t, n, i, r, s) {
|
|
|
2351
2370
|
key: 0,
|
|
2352
2371
|
class: "wm-onb__thread-dot",
|
|
2353
2372
|
"aria-label": s.t("onboarding.unread")
|
|
2354
|
-
}, null, 8,
|
|
2373
|
+
}, null, 8, Nn)) : b("", !0)
|
|
2355
2374
|
], 2),
|
|
2356
|
-
o("span",
|
|
2357
|
-
o("span",
|
|
2375
|
+
o("span", Fn, [
|
|
2376
|
+
o("span", jn, v(l.title), 1),
|
|
2358
2377
|
o("span", {
|
|
2359
2378
|
class: "wm-onb__thread-preview",
|
|
2360
2379
|
innerHTML: s.renderPreview(l.preview)
|
|
2361
|
-
}, null, 8,
|
|
2380
|
+
}, null, 8, Un)
|
|
2362
2381
|
]),
|
|
2363
2382
|
o("span", Pn, [
|
|
2364
2383
|
s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : b("", !0),
|
|
@@ -2377,17 +2396,17 @@ function $n(e, t, n, i, r, s) {
|
|
|
2377
2396
|
o("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2378
2397
|
], -1))
|
|
2379
2398
|
])
|
|
2380
|
-
], 8,
|
|
2381
|
-
s.filteredThreads.length ? b("", !0) : (c(), u("div",
|
|
2399
|
+
], 8, Rn))), 128)),
|
|
2400
|
+
s.filteredThreads.length ? b("", !0) : (c(), u("div", $n, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2382
2401
|
])
|
|
2383
2402
|
])) : b("", !0)
|
|
2384
2403
|
]);
|
|
2385
2404
|
}
|
|
2386
|
-
const
|
|
2405
|
+
const qn = /* @__PURE__ */ B(hn, [["render", Hn], ["__scopeId", "data-v-286413a5"]]);
|
|
2387
2406
|
function zn(e) {
|
|
2388
2407
|
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();
|
|
2389
2408
|
}
|
|
2390
|
-
const
|
|
2409
|
+
const Vn = {
|
|
2391
2410
|
name: "WmActionResult",
|
|
2392
2411
|
props: {
|
|
2393
2412
|
state: { type: String, default: "success" },
|
|
@@ -2400,10 +2419,10 @@ const qn = {
|
|
|
2400
2419
|
return zn(this.detail);
|
|
2401
2420
|
}
|
|
2402
2421
|
}
|
|
2403
|
-
},
|
|
2422
|
+
}, Kn = {
|
|
2404
2423
|
class: "wm-result__icon",
|
|
2405
2424
|
"aria-hidden": "true"
|
|
2406
|
-
},
|
|
2425
|
+
}, Wn = {
|
|
2407
2426
|
key: 0,
|
|
2408
2427
|
width: "11",
|
|
2409
2428
|
height: "11",
|
|
@@ -2413,7 +2432,7 @@ const qn = {
|
|
|
2413
2432
|
"stroke-width": "2.8",
|
|
2414
2433
|
"stroke-linecap": "round",
|
|
2415
2434
|
"stroke-linejoin": "round"
|
|
2416
|
-
},
|
|
2435
|
+
}, Gn = {
|
|
2417
2436
|
key: 1,
|
|
2418
2437
|
width: "11",
|
|
2419
2438
|
height: "11",
|
|
@@ -2423,7 +2442,7 @@ const qn = {
|
|
|
2423
2442
|
"stroke-width": "2.6",
|
|
2424
2443
|
"stroke-linecap": "round",
|
|
2425
2444
|
"stroke-linejoin": "round"
|
|
2426
|
-
},
|
|
2445
|
+
}, Yn = {
|
|
2427
2446
|
key: 2,
|
|
2428
2447
|
width: "11",
|
|
2429
2448
|
height: "11",
|
|
@@ -2433,7 +2452,7 @@ const qn = {
|
|
|
2433
2452
|
"stroke-width": "2.4",
|
|
2434
2453
|
"stroke-linecap": "round",
|
|
2435
2454
|
"stroke-linejoin": "round"
|
|
2436
|
-
},
|
|
2455
|
+
}, Qn = {
|
|
2437
2456
|
key: 3,
|
|
2438
2457
|
width: "12",
|
|
2439
2458
|
height: "12",
|
|
@@ -2443,24 +2462,24 @@ const qn = {
|
|
|
2443
2462
|
"stroke-width": "2.2",
|
|
2444
2463
|
"stroke-linecap": "round",
|
|
2445
2464
|
"stroke-linejoin": "round"
|
|
2446
|
-
},
|
|
2447
|
-
function
|
|
2465
|
+
}, Xn = { class: "wm-result__body" }, Jn = { class: "wm-result__label" }, Zn = { class: "wm-result__detail" };
|
|
2466
|
+
function es(e, t, n, i, r, s) {
|
|
2448
2467
|
return c(), u("div", {
|
|
2449
2468
|
class: x(["wm-result", `wm-result--${n.state}`])
|
|
2450
2469
|
}, [
|
|
2451
|
-
o("span",
|
|
2452
|
-
n.state === "success" ? (c(), u("svg",
|
|
2470
|
+
o("span", Kn, [
|
|
2471
|
+
n.state === "success" ? (c(), u("svg", Wn, [...t[0] || (t[0] = [
|
|
2453
2472
|
o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2454
|
-
])])) : n.state === "rejected" ? (c(), u("svg",
|
|
2473
|
+
])])) : n.state === "rejected" ? (c(), u("svg", Gn, [...t[1] || (t[1] = [
|
|
2455
2474
|
o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2456
|
-
])])) : n.state === "awaiting" ? (c(), u("svg",
|
|
2475
|
+
])])) : n.state === "awaiting" ? (c(), u("svg", Yn, [...t[2] || (t[2] = [
|
|
2457
2476
|
o("circle", {
|
|
2458
2477
|
cx: "12",
|
|
2459
2478
|
cy: "12",
|
|
2460
2479
|
r: "10"
|
|
2461
2480
|
}, null, -1),
|
|
2462
2481
|
o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2463
|
-
])])) : (c(), u("svg",
|
|
2482
|
+
])])) : (c(), u("svg", Qn, [...t[3] || (t[3] = [
|
|
2464
2483
|
o("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),
|
|
2465
2484
|
o("line", {
|
|
2466
2485
|
x1: "12",
|
|
@@ -2476,24 +2495,24 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2476
2495
|
}, null, -1)
|
|
2477
2496
|
])]))
|
|
2478
2497
|
]),
|
|
2479
|
-
o("span",
|
|
2480
|
-
o("span",
|
|
2481
|
-
s.detailText ? (c(), u(
|
|
2498
|
+
o("span", Xn, [
|
|
2499
|
+
o("span", Jn, v(n.label), 1),
|
|
2500
|
+
s.detailText ? (c(), u(I, { key: 0 }, [
|
|
2482
2501
|
t[4] || (t[4] = o("span", {
|
|
2483
2502
|
class: "wm-result__sep",
|
|
2484
2503
|
"aria-hidden": "true"
|
|
2485
2504
|
}, " · ", -1)),
|
|
2486
|
-
o("span",
|
|
2505
|
+
o("span", Zn, v(s.detailText), 1)
|
|
2487
2506
|
], 64)) : b("", !0)
|
|
2488
2507
|
])
|
|
2489
2508
|
], 2);
|
|
2490
2509
|
}
|
|
2491
|
-
const
|
|
2510
|
+
const ts = /* @__PURE__ */ B(Vn, [["render", es], ["__scopeId", "data-v-7284acd0"]]), ns = {
|
|
2492
2511
|
name: "WmArtifactFormResponse",
|
|
2493
2512
|
inject: {
|
|
2494
2513
|
// Translator shared by the Messenger shell; French fallback when
|
|
2495
2514
|
// the component is used standalone.
|
|
2496
|
-
t: { default: () =>
|
|
2515
|
+
t: { default: () => U() }
|
|
2497
2516
|
},
|
|
2498
2517
|
props: {
|
|
2499
2518
|
data: { type: Object, required: !0 }
|
|
@@ -2504,12 +2523,12 @@ const es = /* @__PURE__ */ E(qn, [["render", Zn], ["__scopeId", "data-v-7284acd0
|
|
|
2504
2523
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2505
2524
|
}
|
|
2506
2525
|
}
|
|
2507
|
-
},
|
|
2508
|
-
function
|
|
2509
|
-
return c(), u("div",
|
|
2510
|
-
o("div",
|
|
2511
|
-
o("div",
|
|
2512
|
-
o("span",
|
|
2526
|
+
}, ss = { class: "wm-art wm-art--formResponse" }, rs = { class: "wm-art__head" }, is = { class: "wm-art__title" }, as = { class: "wm-art__badge wm-art__badge--success" }, os = { class: "wm-art__body" }, ls = { class: "wm-art__fieldLabel" };
|
|
2527
|
+
function cs(e, t, n, i, r, s) {
|
|
2528
|
+
return c(), u("div", ss, [
|
|
2529
|
+
o("div", rs, [
|
|
2530
|
+
o("div", is, v(n.data.title || s.t("form.title")), 1),
|
|
2531
|
+
o("span", as, [
|
|
2513
2532
|
t[0] || (t[0] = o("svg", {
|
|
2514
2533
|
width: "11",
|
|
2515
2534
|
height: "11",
|
|
@@ -2523,15 +2542,15 @@ function ls(e, t, n, i, r, s) {
|
|
|
2523
2542
|
}, [
|
|
2524
2543
|
o("polyline", { points: "20 6 9 17 4 12" })
|
|
2525
2544
|
], -1)),
|
|
2526
|
-
|
|
2545
|
+
ge(" " + v(s.t("form.sent")), 1)
|
|
2527
2546
|
])
|
|
2528
2547
|
]),
|
|
2529
|
-
o("div",
|
|
2530
|
-
(c(!0), u(
|
|
2548
|
+
o("div", os, [
|
|
2549
|
+
(c(!0), u(I, null, j(s.fields, (a, l) => (c(), u("div", {
|
|
2531
2550
|
key: l,
|
|
2532
2551
|
class: "wm-art__field"
|
|
2533
2552
|
}, [
|
|
2534
|
-
o("div",
|
|
2553
|
+
o("div", ls, v(a.label), 1),
|
|
2535
2554
|
o("div", {
|
|
2536
2555
|
class: x([
|
|
2537
2556
|
"wm-art__fieldValue",
|
|
@@ -2542,7 +2561,7 @@ function ls(e, t, n, i, r, s) {
|
|
|
2542
2561
|
])
|
|
2543
2562
|
]);
|
|
2544
2563
|
}
|
|
2545
|
-
const
|
|
2564
|
+
const ds = /* @__PURE__ */ B(ns, [["render", cs], ["__scopeId", "data-v-713aecf1"]]), us = {
|
|
2546
2565
|
name: "WmArtifactInfoCard",
|
|
2547
2566
|
props: {
|
|
2548
2567
|
data: { type: Object, required: !0 }
|
|
@@ -2557,32 +2576,32 @@ const cs = /* @__PURE__ */ E(ts, [["render", ls], ["__scopeId", "data-v-713aecf1
|
|
|
2557
2576
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
2558
2577
|
}
|
|
2559
2578
|
}
|
|
2560
|
-
},
|
|
2579
|
+
}, ms = { class: "wm-art wm-art--infoCard" }, hs = {
|
|
2561
2580
|
key: 0,
|
|
2562
2581
|
class: "wm-art__image"
|
|
2563
|
-
},
|
|
2582
|
+
}, fs = ["src", "alt"], _s = { class: "wm-art__head" }, gs = { class: "wm-art__headMain" }, ps = { class: "wm-art__title" }, vs = {
|
|
2564
2583
|
key: 0,
|
|
2565
2584
|
class: "wm-art__subtitle"
|
|
2566
|
-
},
|
|
2585
|
+
}, ys = {
|
|
2567
2586
|
key: 1,
|
|
2568
2587
|
class: "wm-art__body"
|
|
2569
|
-
},
|
|
2588
|
+
}, bs = {
|
|
2570
2589
|
key: 0,
|
|
2571
2590
|
class: "wm-art__text"
|
|
2572
|
-
},
|
|
2573
|
-
function
|
|
2574
|
-
return c(), u("div",
|
|
2591
|
+
}, ws = { class: "wm-art__fieldLabel" };
|
|
2592
|
+
function ks(e, t, n, i, r, s) {
|
|
2593
|
+
return c(), u("div", ms, [
|
|
2575
2594
|
n.data.image_url ? (c(), u("figure", hs, [
|
|
2576
2595
|
o("img", {
|
|
2577
2596
|
src: n.data.image_url,
|
|
2578
2597
|
alt: n.data.title || "",
|
|
2579
2598
|
loading: "lazy"
|
|
2580
|
-
}, null, 8,
|
|
2599
|
+
}, null, 8, fs)
|
|
2581
2600
|
])) : b("", !0),
|
|
2582
|
-
o("div",
|
|
2583
|
-
o("div",
|
|
2601
|
+
o("div", _s, [
|
|
2602
|
+
o("div", gs, [
|
|
2584
2603
|
o("div", ps, v(n.data.title), 1),
|
|
2585
|
-
n.data.subtitle ? (c(), u("div",
|
|
2604
|
+
n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : b("", !0)
|
|
2586
2605
|
]),
|
|
2587
2606
|
n.data.badge && n.data.badge.label ? (c(), u("span", {
|
|
2588
2607
|
key: 0,
|
|
@@ -2592,13 +2611,13 @@ function ws(e, t, n, i, r, s) {
|
|
|
2592
2611
|
])
|
|
2593
2612
|
}, v(n.data.badge.label), 3)) : b("", !0)
|
|
2594
2613
|
]),
|
|
2595
|
-
s.hasBody ? (c(), u("div",
|
|
2596
|
-
n.data.body ? (c(), u("div",
|
|
2597
|
-
s.fields.length ? (c(!0), u(
|
|
2614
|
+
s.hasBody ? (c(), u("div", ys, [
|
|
2615
|
+
n.data.body ? (c(), u("div", bs, v(n.data.body), 1)) : b("", !0),
|
|
2616
|
+
s.fields.length ? (c(!0), u(I, { key: 1 }, j(s.fields, (a, l) => (c(), u("div", {
|
|
2598
2617
|
key: l,
|
|
2599
2618
|
class: "wm-art__field"
|
|
2600
2619
|
}, [
|
|
2601
|
-
o("div",
|
|
2620
|
+
o("div", ws, v(a.label), 1),
|
|
2602
2621
|
o("div", {
|
|
2603
2622
|
class: x([
|
|
2604
2623
|
"wm-art__fieldValue",
|
|
@@ -2609,8 +2628,8 @@ function ws(e, t, n, i, r, s) {
|
|
|
2609
2628
|
])) : b("", !0)
|
|
2610
2629
|
]);
|
|
2611
2630
|
}
|
|
2612
|
-
const
|
|
2613
|
-
function
|
|
2631
|
+
const Cs = /* @__PURE__ */ B(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
2632
|
+
function As(e, t, n) {
|
|
2614
2633
|
if (!e) return "";
|
|
2615
2634
|
const i = new Date(e);
|
|
2616
2635
|
if (Number.isNaN(i.getTime())) return e;
|
|
@@ -2624,12 +2643,12 @@ function Cs(e, t, n) {
|
|
|
2624
2643
|
});
|
|
2625
2644
|
return `${r}${n}${s}`;
|
|
2626
2645
|
}
|
|
2627
|
-
const
|
|
2646
|
+
const Ss = {
|
|
2628
2647
|
name: "WmArtifactTicket",
|
|
2629
2648
|
inject: {
|
|
2630
2649
|
// Translator + resolved-language getter shared by the Messenger
|
|
2631
2650
|
// shell. Fall back to French wording when used standalone.
|
|
2632
|
-
t: { default: () =>
|
|
2651
|
+
t: { default: () => U() },
|
|
2633
2652
|
wmLocale: { default: () => () => "fr" }
|
|
2634
2653
|
},
|
|
2635
2654
|
props: {
|
|
@@ -2642,7 +2661,7 @@ const As = {
|
|
|
2642
2661
|
},
|
|
2643
2662
|
formattedDate() {
|
|
2644
2663
|
var e;
|
|
2645
|
-
return
|
|
2664
|
+
return As(
|
|
2646
2665
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
2647
2666
|
oe(this.wmLocale()),
|
|
2648
2667
|
this.t("ticket.dateAt")
|
|
@@ -2670,13 +2689,13 @@ const As = {
|
|
|
2670
2689
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
2671
2690
|
}
|
|
2672
2691
|
}
|
|
2673
|
-
},
|
|
2692
|
+
}, Ms = { class: "wm-art wm-art--ticket" }, Ts = { class: "wm-art__head wm-tk__head" }, xs = { class: "wm-art__title wm-tk__title" }, Os = { class: "wm-tk__sub" }, Is = { class: "wm-tk__ref" }, Ls = {
|
|
2674
2693
|
key: 0,
|
|
2675
2694
|
class: "wm-tk__text"
|
|
2676
|
-
},
|
|
2695
|
+
}, Bs = {
|
|
2677
2696
|
key: 0,
|
|
2678
2697
|
class: "wm-art__body"
|
|
2679
|
-
}, Es = { class: "wm-art__fieldLabel" },
|
|
2698
|
+
}, Es = { class: "wm-art__fieldLabel" }, Rs = ["data-level"], Ns = {
|
|
2680
2699
|
key: 1,
|
|
2681
2700
|
class: "wm-tk__date",
|
|
2682
2701
|
width: "12",
|
|
@@ -2688,16 +2707,16 @@ const As = {
|
|
|
2688
2707
|
"stroke-linecap": "round",
|
|
2689
2708
|
"stroke-linejoin": "round",
|
|
2690
2709
|
"aria-hidden": "true"
|
|
2691
|
-
},
|
|
2710
|
+
}, Fs = {
|
|
2692
2711
|
key: 1,
|
|
2693
2712
|
class: "wm-art__footer wm-tk__footer"
|
|
2694
2713
|
};
|
|
2695
|
-
function
|
|
2696
|
-
return c(), u("div",
|
|
2697
|
-
o("div",
|
|
2698
|
-
o("div",
|
|
2699
|
-
o("div",
|
|
2700
|
-
o("div",
|
|
2714
|
+
function js(e, t, n, i, r, s) {
|
|
2715
|
+
return c(), u("div", Ms, [
|
|
2716
|
+
o("div", Ts, [
|
|
2717
|
+
o("div", xs, v(n.data.title), 1),
|
|
2718
|
+
o("div", Os, [
|
|
2719
|
+
o("div", Is, [
|
|
2701
2720
|
t[0] || (t[0] = o("svg", {
|
|
2702
2721
|
width: "11",
|
|
2703
2722
|
height: "11",
|
|
@@ -2725,13 +2744,13 @@ function Fs(e, t, n, i, r, s) {
|
|
|
2725
2744
|
class: "wm-tk__dot",
|
|
2726
2745
|
"aria-hidden": "true"
|
|
2727
2746
|
}, null, -1)),
|
|
2728
|
-
|
|
2747
|
+
ge(" " + v(n.data.status.label), 1)
|
|
2729
2748
|
], 2)
|
|
2730
2749
|
]),
|
|
2731
2750
|
n.data.body ? (c(), u("div", Ls, v(n.data.body), 1)) : b("", !0)
|
|
2732
2751
|
]),
|
|
2733
|
-
s.fields.length ? (c(), u("div",
|
|
2734
|
-
(c(!0), u(
|
|
2752
|
+
s.fields.length ? (c(), u("div", Bs, [
|
|
2753
|
+
(c(!0), u(I, null, j(s.fields, (a, l) => (c(), u("div", {
|
|
2735
2754
|
key: l,
|
|
2736
2755
|
class: "wm-art__field"
|
|
2737
2756
|
}, [
|
|
@@ -2772,7 +2791,7 @@ function Fs(e, t, n, i, r, s) {
|
|
|
2772
2791
|
height: "9",
|
|
2773
2792
|
rx: "0.5"
|
|
2774
2793
|
}, null, -1)
|
|
2775
|
-
])], 8,
|
|
2794
|
+
])], 8, Rs)) : s.isDate(a.label) ? (c(), u("svg", Ns, [...t[3] || (t[3] = [
|
|
2776
2795
|
o("rect", {
|
|
2777
2796
|
x: "3",
|
|
2778
2797
|
y: "4",
|
|
@@ -2786,7 +2805,7 @@ function Fs(e, t, n, i, r, s) {
|
|
|
2786
2805
|
], 2)
|
|
2787
2806
|
]))), 128))
|
|
2788
2807
|
])) : b("", !0),
|
|
2789
|
-
n.data.created_at ? (c(), u("div",
|
|
2808
|
+
n.data.created_at ? (c(), u("div", Fs, [
|
|
2790
2809
|
t[4] || (t[4] = o("svg", {
|
|
2791
2810
|
width: "11",
|
|
2792
2811
|
height: "11",
|
|
@@ -2811,10 +2830,10 @@ function Fs(e, t, n, i, r, s) {
|
|
|
2811
2830
|
])) : b("", !0)
|
|
2812
2831
|
]);
|
|
2813
2832
|
}
|
|
2814
|
-
const
|
|
2815
|
-
form_response:
|
|
2816
|
-
info_card:
|
|
2817
|
-
ticket:
|
|
2833
|
+
const Us = /* @__PURE__ */ B(Ss, [["render", js], ["__scopeId", "data-v-5f30c914"]]), Ps = {
|
|
2834
|
+
form_response: ds,
|
|
2835
|
+
info_card: Cs,
|
|
2836
|
+
ticket: Us
|
|
2818
2837
|
}, Ds = {
|
|
2819
2838
|
name: "WmArtifactRenderer",
|
|
2820
2839
|
props: {
|
|
@@ -2830,19 +2849,19 @@ const js = /* @__PURE__ */ E(As, [["render", Fs], ["__scopeId", "data-v-5f30c914
|
|
|
2830
2849
|
}
|
|
2831
2850
|
}
|
|
2832
2851
|
};
|
|
2833
|
-
function
|
|
2834
|
-
return s.component ? (c(), R(
|
|
2852
|
+
function $s(e, t, n, i, r, s) {
|
|
2853
|
+
return s.component ? (c(), R(Pe(s.component), {
|
|
2835
2854
|
key: 0,
|
|
2836
2855
|
data: n.artifact.data
|
|
2837
2856
|
}, null, 8, ["data"])) : b("", !0);
|
|
2838
2857
|
}
|
|
2839
|
-
const
|
|
2858
|
+
const Hs = /* @__PURE__ */ B(Ds, [["render", $s]]), qs = {
|
|
2840
2859
|
name: "WmAttachmentPreview",
|
|
2841
2860
|
inject: {
|
|
2842
2861
|
signAttachmentFn: { default: null },
|
|
2843
2862
|
// Translator shared by the Messenger shell; French fallback when
|
|
2844
2863
|
// the component is used standalone.
|
|
2845
|
-
t: { default: () =>
|
|
2864
|
+
t: { default: () => U() }
|
|
2846
2865
|
},
|
|
2847
2866
|
props: {
|
|
2848
2867
|
attachment: { type: Object, required: !0 }
|
|
@@ -2900,15 +2919,15 @@ const $s = /* @__PURE__ */ E(Ds, [["render", Us]]), Hs = {
|
|
|
2900
2919
|
this.url || e.preventDefault();
|
|
2901
2920
|
}
|
|
2902
2921
|
}
|
|
2903
|
-
}, zs = ["href"],
|
|
2922
|
+
}, zs = ["href"], Vs = ["src", "alt"], Ks = ["src"], Ws = ["src"], Gs = ["href", "download"], Ys = { class: "wm-att__main" }, Qs = { class: "wm-att__name" }, Xs = {
|
|
2904
2923
|
key: 0,
|
|
2905
2924
|
class: "wm-att__meta"
|
|
2906
|
-
},
|
|
2925
|
+
}, Js = {
|
|
2907
2926
|
key: 0,
|
|
2908
2927
|
class: "wm-att__spin",
|
|
2909
2928
|
"aria-hidden": "true"
|
|
2910
2929
|
};
|
|
2911
|
-
function
|
|
2930
|
+
function Zs(e, t, n, i, r, s) {
|
|
2912
2931
|
return c(), u("div", {
|
|
2913
2932
|
class: x(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
2914
2933
|
}, [
|
|
@@ -2923,18 +2942,18 @@ function Js(e, t, n, i, r, s) {
|
|
|
2923
2942
|
src: r.url,
|
|
2924
2943
|
alt: s.displayName,
|
|
2925
2944
|
loading: "lazy"
|
|
2926
|
-
}, null, 8,
|
|
2945
|
+
}, null, 8, Vs)
|
|
2927
2946
|
], 8, zs)) : s.kind === "audio" && r.url ? (c(), u("audio", {
|
|
2928
2947
|
key: 1,
|
|
2929
2948
|
src: r.url,
|
|
2930
2949
|
controls: "",
|
|
2931
2950
|
preload: "metadata"
|
|
2932
|
-
}, null, 8,
|
|
2951
|
+
}, null, 8, Ks)) : s.kind === "video" && r.url ? (c(), u("video", {
|
|
2933
2952
|
key: 2,
|
|
2934
2953
|
src: r.url,
|
|
2935
2954
|
controls: "",
|
|
2936
2955
|
preload: "metadata"
|
|
2937
|
-
}, null, 8,
|
|
2956
|
+
}, null, 8, Ws)) : (c(), u("a", {
|
|
2938
2957
|
key: 3,
|
|
2939
2958
|
class: "wm-att__file",
|
|
2940
2959
|
href: r.url || "#",
|
|
@@ -2959,15 +2978,15 @@ function Js(e, t, n, i, r, s) {
|
|
|
2959
2978
|
o("path", { d: "M14 2v6h6" })
|
|
2960
2979
|
])
|
|
2961
2980
|
], -1)),
|
|
2962
|
-
o("span",
|
|
2963
|
-
o("span",
|
|
2964
|
-
s.sizeLabel ? (c(), u("span",
|
|
2981
|
+
o("span", Ys, [
|
|
2982
|
+
o("span", Qs, v(s.displayName), 1),
|
|
2983
|
+
s.sizeLabel ? (c(), u("span", Xs, v(s.sizeLabel), 1)) : b("", !0)
|
|
2965
2984
|
]),
|
|
2966
|
-
r.loading ? (c(), u("span",
|
|
2967
|
-
], 8,
|
|
2985
|
+
r.loading ? (c(), u("span", Js)) : b("", !0)
|
|
2986
|
+
], 8, Gs))
|
|
2968
2987
|
], 2);
|
|
2969
2988
|
}
|
|
2970
|
-
const
|
|
2989
|
+
const er = /* @__PURE__ */ B(qs, [["render", Zs], ["__scopeId", "data-v-afc7b0d3"]]), tr = {
|
|
2971
2990
|
name: "WmBubble",
|
|
2972
2991
|
props: {
|
|
2973
2992
|
role: { type: String, default: "ai" },
|
|
@@ -2976,53 +2995,53 @@ const Zs = /* @__PURE__ */ E(Hs, [["render", Js], ["__scopeId", "data-v-afc7b0d3
|
|
|
2976
2995
|
},
|
|
2977
2996
|
computed: {
|
|
2978
2997
|
rendered() {
|
|
2979
|
-
return
|
|
2998
|
+
return mn(this.text);
|
|
2980
2999
|
}
|
|
2981
3000
|
}
|
|
2982
|
-
},
|
|
2983
|
-
function
|
|
3001
|
+
}, nr = ["innerHTML"];
|
|
3002
|
+
function sr(e, t, n, i, r, s) {
|
|
2984
3003
|
return c(), u("div", {
|
|
2985
3004
|
class: x(["wm-bubble", "wm-bubble--" + n.role])
|
|
2986
3005
|
}, [
|
|
2987
|
-
|
|
2988
|
-
o("span", { innerHTML: s.rendered }, null, 8,
|
|
3006
|
+
De(e.$slots, "default", {}, () => [
|
|
3007
|
+
o("span", { innerHTML: s.rendered }, null, 8, nr)
|
|
2989
3008
|
], !0)
|
|
2990
3009
|
], 2);
|
|
2991
3010
|
}
|
|
2992
|
-
const
|
|
2993
|
-
function
|
|
2994
|
-
return c(), u("div",
|
|
3011
|
+
const rr = /* @__PURE__ */ B(tr, [["render", sr], ["__scopeId", "data-v-7ab13147"]]), ir = { name: "WmTyping" }, ar = { class: "wm-typing" };
|
|
3012
|
+
function or(e, t, n, i, r, s) {
|
|
3013
|
+
return c(), u("div", ar, [...t[0] || (t[0] = [
|
|
2995
3014
|
o("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
2996
3015
|
o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
2997
3016
|
o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
2998
3017
|
])]);
|
|
2999
3018
|
}
|
|
3000
|
-
const
|
|
3019
|
+
const lr = /* @__PURE__ */ B(ir, [["render", or], ["__scopeId", "data-v-df2447fd"]]);
|
|
3001
3020
|
function Z(e) {
|
|
3002
3021
|
return e ? e.client_msg_id || e.id : "";
|
|
3003
3022
|
}
|
|
3004
|
-
const
|
|
3023
|
+
const cr = {
|
|
3005
3024
|
transferred_to_human: "system.transferredToHuman",
|
|
3006
3025
|
assigned: "system.assigned",
|
|
3007
3026
|
unassigned: "system.unassigned",
|
|
3008
3027
|
resolved: "system.resolved",
|
|
3009
3028
|
reopened: "system.reopened",
|
|
3010
3029
|
idle: "system.idle"
|
|
3011
|
-
},
|
|
3030
|
+
}, dr = 80, ur = 200, mr = {
|
|
3012
3031
|
name: "WmMessageList",
|
|
3013
3032
|
components: {
|
|
3014
3033
|
AIAvatar: le,
|
|
3015
|
-
HumanAvatar:
|
|
3016
|
-
Bubble:
|
|
3017
|
-
Typing:
|
|
3018
|
-
ActionResult:
|
|
3019
|
-
AttachmentPreview:
|
|
3020
|
-
ArtifactRenderer:
|
|
3034
|
+
HumanAvatar: Be,
|
|
3035
|
+
Bubble: rr,
|
|
3036
|
+
Typing: lr,
|
|
3037
|
+
ActionResult: ts,
|
|
3038
|
+
AttachmentPreview: er,
|
|
3039
|
+
ArtifactRenderer: Hs
|
|
3021
3040
|
},
|
|
3022
3041
|
inject: {
|
|
3023
3042
|
// Translator + resolved-language getter shared by the Messenger
|
|
3024
3043
|
// shell. Fall back to French wording when used standalone.
|
|
3025
|
-
t: { default: () =>
|
|
3044
|
+
t: { default: () => U() },
|
|
3026
3045
|
wmLocale: { default: () => () => "fr" }
|
|
3027
3046
|
},
|
|
3028
3047
|
props: {
|
|
@@ -3047,7 +3066,12 @@ const lr = {
|
|
|
3047
3066
|
// `created_at` la dépasse sont arrivés EN DIRECT pendant que
|
|
3048
3067
|
// l'utilisateur regardait — ils n'entrent pas dans le batch "Non lus".
|
|
3049
3068
|
// Vide ⇒ pas de borne haute (rétrocompatible).
|
|
3050
|
-
unreadBoundaryTs: { type: String, default: "" }
|
|
3069
|
+
unreadBoundaryTs: { type: String, default: "" },
|
|
3070
|
+
// Identité de l'agent IA configuré côté widget. Affichée à gauche
|
|
3071
|
+
// de "Assistant IA" dans le pied du cluster IA, et utilisée comme
|
|
3072
|
+
// image de l'avatar IA quand renseignée.
|
|
3073
|
+
aiAgentName: { type: String, default: "" },
|
|
3074
|
+
aiAgentAvatarUrl: { type: String, default: null }
|
|
3051
3075
|
},
|
|
3052
3076
|
emits: ["load-more"],
|
|
3053
3077
|
data() {
|
|
@@ -3097,8 +3121,8 @@ const lr = {
|
|
|
3097
3121
|
});
|
|
3098
3122
|
continue;
|
|
3099
3123
|
}
|
|
3100
|
-
const
|
|
3101
|
-
|
|
3124
|
+
const p = e[e.length - 1];
|
|
3125
|
+
p && p.role === l && (l === "ai" || p.agentName === (((i = a == null ? void 0 : a.author) == null ? void 0 : i.name) || "")) ? p.messages.push(a) : e.push({
|
|
3102
3126
|
key: `g-${Z(a)}`,
|
|
3103
3127
|
role: l,
|
|
3104
3128
|
agentName: ((r = a == null ? void 0 : a.author) == null ? void 0 : r.name) || "",
|
|
@@ -3110,8 +3134,8 @@ const lr = {
|
|
|
3110
3134
|
for (const a of e) {
|
|
3111
3135
|
if (a.role === "system") continue;
|
|
3112
3136
|
const l = [];
|
|
3113
|
-
for (const
|
|
3114
|
-
for (const C of this.itemsOf(
|
|
3137
|
+
for (const p of a.messages)
|
|
3138
|
+
for (const C of this.itemsOf(p)) l.push(C);
|
|
3115
3139
|
a.items = l;
|
|
3116
3140
|
}
|
|
3117
3141
|
const t = [];
|
|
@@ -3148,12 +3172,10 @@ const lr = {
|
|
|
3148
3172
|
watch: {
|
|
3149
3173
|
messages: { handler: "snapshotAndRestore", deep: !0 },
|
|
3150
3174
|
conversationId(e, t) {
|
|
3151
|
-
e !== t && (this._groupIdByMsgKey = null);
|
|
3175
|
+
e !== t && (this._groupIdByMsgKey = null, this.silentFades = !1);
|
|
3152
3176
|
},
|
|
3153
3177
|
loadingMore(e) {
|
|
3154
|
-
e || (this._pendingLoadMore = !1), this.silentFades = !0
|
|
3155
|
-
this.silentFades = !1;
|
|
3156
|
-
}, 250)), this.snapshotAndRestore();
|
|
3178
|
+
e || (this._pendingLoadMore = !1), e && (this.silentFades = !0), this.snapshotAndRestore();
|
|
3157
3179
|
},
|
|
3158
3180
|
streamingActive: "snapshotAndRestore"
|
|
3159
3181
|
},
|
|
@@ -3162,7 +3184,7 @@ const lr = {
|
|
|
3162
3184
|
},
|
|
3163
3185
|
beforeUnmount() {
|
|
3164
3186
|
var e;
|
|
3165
|
-
(e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame)
|
|
3187
|
+
(e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame);
|
|
3166
3188
|
},
|
|
3167
3189
|
updated() {
|
|
3168
3190
|
this.scheduleMeasure();
|
|
@@ -3194,11 +3216,11 @@ const lr = {
|
|
|
3194
3216
|
return `g-${n}`;
|
|
3195
3217
|
},
|
|
3196
3218
|
isAtBottom(e) {
|
|
3197
|
-
return e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
3219
|
+
return e.scrollHeight - e.scrollTop - e.clientHeight <= dr;
|
|
3198
3220
|
},
|
|
3199
3221
|
onScroll() {
|
|
3200
3222
|
const e = this.$refs.scrollEl;
|
|
3201
|
-
e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <=
|
|
3223
|
+
e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <= ur && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
3202
3224
|
},
|
|
3203
3225
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3204
3226
|
//
|
|
@@ -3230,12 +3252,15 @@ const lr = {
|
|
|
3230
3252
|
let i = null;
|
|
3231
3253
|
if (!t && !n) {
|
|
3232
3254
|
const s = this.pickAnchor(e);
|
|
3233
|
-
if (s != null && s.
|
|
3234
|
-
const a = e.
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3255
|
+
if (s != null && s.rowKey) {
|
|
3256
|
+
const a = this.findRowByKey(e, s.rowKey);
|
|
3257
|
+
if (a) {
|
|
3258
|
+
const l = e.getBoundingClientRect().top;
|
|
3259
|
+
i = {
|
|
3260
|
+
rowKey: s.rowKey,
|
|
3261
|
+
relY: a.getBoundingClientRect().top - l
|
|
3262
|
+
};
|
|
3263
|
+
}
|
|
3239
3264
|
}
|
|
3240
3265
|
}
|
|
3241
3266
|
const r = { forceBottom: t, wasPinned: n, anchor: i };
|
|
@@ -3246,42 +3271,52 @@ const lr = {
|
|
|
3246
3271
|
}
|
|
3247
3272
|
if (!r.anchor) return;
|
|
3248
3273
|
const s = () => {
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
Math.abs(g) > 0.5 && (e.scrollTop += g);
|
|
3274
|
+
const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
|
|
3275
|
+
if (!l) return;
|
|
3276
|
+
const C = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
|
|
3277
|
+
Math.abs(C) > 0.5 && (e.scrollTop += C);
|
|
3254
3278
|
};
|
|
3255
3279
|
s(), requestAnimationFrame(() => {
|
|
3256
3280
|
s(), requestAnimationFrame(s);
|
|
3257
3281
|
});
|
|
3258
3282
|
});
|
|
3259
3283
|
},
|
|
3260
|
-
// Pick a
|
|
3261
|
-
//
|
|
3262
|
-
// `offsetTop` moves in lockstep with content being prepended.
|
|
3284
|
+
// Pick a stable identifier for the topmost partially-visible row
|
|
3285
|
+
// to use as a scroll anchor.
|
|
3263
3286
|
//
|
|
3264
|
-
//
|
|
3265
|
-
//
|
|
3266
|
-
//
|
|
3267
|
-
//
|
|
3268
|
-
//
|
|
3269
|
-
//
|
|
3270
|
-
//
|
|
3271
|
-
//
|
|
3272
|
-
//
|
|
3287
|
+
// Why ROW level, not group level: when a load-more lands and the
|
|
3288
|
+
// prepended messages share the role of the current top group,
|
|
3289
|
+
// they merge INTO that group. The group's own `offsetTop` is
|
|
3290
|
+
// still 0 (it's still the first child of the scroller), so a
|
|
3291
|
+
// group-level anchor measures a zero delta and skips the
|
|
3292
|
+
// correction — the user, who was at the very top reading the
|
|
3293
|
+
// first message, suddenly sees the prepended history in its
|
|
3294
|
+
// place. A row-level anchor (every `.wm-list__row` carries a
|
|
3295
|
+
// stable `data-row-key` derived from `client_msg_id || id`)
|
|
3296
|
+
// captures the row's actual displacement within the new
|
|
3297
|
+
// content, regardless of whether a new group sits above it or
|
|
3298
|
+
// the existing group simply grew at the top.
|
|
3273
3299
|
//
|
|
3274
|
-
//
|
|
3275
|
-
//
|
|
3276
|
-
//
|
|
3277
|
-
//
|
|
3300
|
+
// We still skip the loader / history-end / date-sep nodes
|
|
3301
|
+
// implicitly because they are not `.wm-list__row`.
|
|
3302
|
+
//
|
|
3303
|
+
// Falling back to the *first* row (rather than only rows past
|
|
3304
|
+
// `scrollTop`) when nothing matches handles the
|
|
3305
|
+
// very-top-of-scroll edge case the same way the old logic did.
|
|
3278
3306
|
pickAnchor(e) {
|
|
3279
|
-
const t = e.
|
|
3280
|
-
let
|
|
3281
|
-
for (const
|
|
3282
|
-
if (i
|
|
3283
|
-
return {
|
|
3284
|
-
return
|
|
3307
|
+
const t = e.getBoundingClientRect().top, n = e.querySelectorAll(".wm-list__row[data-row-key]");
|
|
3308
|
+
let i = null;
|
|
3309
|
+
for (const r of n)
|
|
3310
|
+
if (i || (i = r), r.getBoundingClientRect().bottom >= t)
|
|
3311
|
+
return { rowKey: r.dataset.rowKey };
|
|
3312
|
+
return i ? { rowKey: i.dataset.rowKey } : null;
|
|
3313
|
+
},
|
|
3314
|
+
findRowByKey(e, t) {
|
|
3315
|
+
if (!t) return null;
|
|
3316
|
+
const n = typeof CSS < "u" && CSS.escape ? CSS.escape(t) : t.replace(/["\\]/g, "\\$&");
|
|
3317
|
+
return e.querySelector(
|
|
3318
|
+
`.wm-list__row[data-row-key="${n}"]`
|
|
3319
|
+
);
|
|
3285
3320
|
},
|
|
3286
3321
|
roleOf(e) {
|
|
3287
3322
|
var n, i;
|
|
@@ -3291,7 +3326,10 @@ const lr = {
|
|
|
3291
3326
|
return t === "user" ? "user" : t === "agent_human" ? "human" : "ai";
|
|
3292
3327
|
},
|
|
3293
3328
|
roleLabel(e) {
|
|
3294
|
-
|
|
3329
|
+
if (e.role === "human")
|
|
3330
|
+
return e.agentName || this.t("common.agent");
|
|
3331
|
+
const t = this.t("common.aiAssistant");
|
|
3332
|
+
return this.aiAgentName ? `${this.aiAgentName} • ${t}` : t;
|
|
3295
3333
|
},
|
|
3296
3334
|
// Expand a message into atomic visual items, each one a row in
|
|
3297
3335
|
// the smart-corner cluster. Most messages = 1 item. An
|
|
@@ -3383,9 +3421,9 @@ const lr = {
|
|
|
3383
3421
|
// doit garder son arrondi.
|
|
3384
3422
|
cornersFor(e, t) {
|
|
3385
3423
|
var te, ne, G;
|
|
3386
|
-
const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14,
|
|
3387
|
-
let
|
|
3388
|
-
return a ? (C && (N =
|
|
3424
|
+
const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14, p = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (Y, Q, z) => Y != null && T != null ? Y + H >= T : Q === z || Q === "card" && z === "bubble";
|
|
3425
|
+
let P = l, N = l, $ = l, W = l;
|
|
3426
|
+
return a ? (C && (N = p), (k || !s) && ($ = p), C && M(E, C, i == null ? void 0 : i.top) && (P = p), k && M(A, k, i == null ? void 0 : i.bottom) && (W = p)) : (C && (P = p), (k || !s) && (W = p), C && M(E, C, i == null ? void 0 : i.top) && (N = p), k && M(A, k, i == null ? void 0 : i.bottom) && ($ = p)), { tl: P, tr: N, br: $, bl: W };
|
|
3389
3427
|
},
|
|
3390
3428
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3391
3429
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3432,8 +3470,8 @@ const lr = {
|
|
|
3432
3470
|
".wm-bubble, .wm-result, .wm-art, .wm-list__body"
|
|
3433
3471
|
);
|
|
3434
3472
|
if (!l) continue;
|
|
3435
|
-
const
|
|
3436
|
-
|
|
3473
|
+
const p = l.getBoundingClientRect().width;
|
|
3474
|
+
p > 0 && (t[a] = p);
|
|
3437
3475
|
}
|
|
3438
3476
|
const n = this.widthByKey, i = Object.keys(n), r = Object.keys(t);
|
|
3439
3477
|
if (i.length === r.length) {
|
|
@@ -3451,7 +3489,7 @@ const lr = {
|
|
|
3451
3489
|
const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
|
|
3452
3490
|
if (!(n != null && n.created_at)) return "";
|
|
3453
3491
|
try {
|
|
3454
|
-
return
|
|
3492
|
+
return Ie(
|
|
3455
3493
|
new Date(n.created_at),
|
|
3456
3494
|
oe(this.wmLocale())
|
|
3457
3495
|
);
|
|
@@ -3498,7 +3536,7 @@ const lr = {
|
|
|
3498
3536
|
},
|
|
3499
3537
|
systemLabel(e) {
|
|
3500
3538
|
var r, s, a;
|
|
3501
|
-
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n =
|
|
3539
|
+
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = cr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
|
|
3502
3540
|
return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
3503
3541
|
},
|
|
3504
3542
|
scrollToBottom() {
|
|
@@ -3511,33 +3549,33 @@ const lr = {
|
|
|
3511
3549
|
class: "wm-list__loadMore",
|
|
3512
3550
|
role: "status",
|
|
3513
3551
|
"aria-live": "polite"
|
|
3514
|
-
},
|
|
3552
|
+
}, fr = { class: "wm-list__loadMore-lbl" }, _r = {
|
|
3515
3553
|
key: 1,
|
|
3516
3554
|
class: "wm-list__historyEnd"
|
|
3517
|
-
},
|
|
3555
|
+
}, gr = {
|
|
3518
3556
|
key: 2,
|
|
3519
3557
|
class: "wm-list__sep"
|
|
3520
|
-
}, pr = { class: "wm-list__sep-label" },
|
|
3558
|
+
}, pr = { class: "wm-list__sep-label" }, vr = {
|
|
3521
3559
|
key: 0,
|
|
3522
3560
|
class: "wm-list__sep wm-list__sep--unread"
|
|
3523
|
-
},
|
|
3561
|
+
}, yr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, br = {
|
|
3524
3562
|
key: 0,
|
|
3525
3563
|
class: "wm-list__sysep"
|
|
3526
|
-
},
|
|
3564
|
+
}, wr = { class: "wm-list__sysep-label" }, kr = ["data-row-key"], Cr = {
|
|
3527
3565
|
key: 0,
|
|
3528
3566
|
class: "wm-list__avatarSlot"
|
|
3529
|
-
},
|
|
3567
|
+
}, Ar = {
|
|
3530
3568
|
key: 5,
|
|
3531
3569
|
class: "wm-list__body"
|
|
3532
|
-
},
|
|
3570
|
+
}, Sr = { key: 0 }, Mr = {
|
|
3533
3571
|
key: 1,
|
|
3534
3572
|
"aria-hidden": "true"
|
|
3535
|
-
},
|
|
3573
|
+
}, Tr = { key: 2 }, xr = {
|
|
3536
3574
|
key: 3,
|
|
3537
3575
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3538
|
-
},
|
|
3539
|
-
function
|
|
3540
|
-
const a =
|
|
3576
|
+
}, Or = { class: "wm-list__avatarSlot" };
|
|
3577
|
+
function Ir(e, t, n, i, r, s) {
|
|
3578
|
+
const a = L("AIAvatar"), l = L("HumanAvatar"), p = L("ActionResult"), C = L("ArtifactRenderer"), k = L("Bubble"), T = L("AttachmentPreview"), E = L("Typing");
|
|
3541
3579
|
return c(), u("div", {
|
|
3542
3580
|
ref: "scrollEl",
|
|
3543
3581
|
class: x(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
@@ -3548,31 +3586,31 @@ function Or(e, t, n, i, r, s) {
|
|
|
3548
3586
|
class: "wm-list__loadMore-spinner",
|
|
3549
3587
|
"aria-hidden": "true"
|
|
3550
3588
|
}, null, -1)),
|
|
3551
|
-
o("span",
|
|
3552
|
-
])) : s.historyExhausted ? (c(), u("div",
|
|
3553
|
-
n.dateLabel ? (c(), u("div",
|
|
3589
|
+
o("span", fr, v(s.t("messageList.loadingHistory")), 1)
|
|
3590
|
+
])) : s.historyExhausted ? (c(), u("div", _r, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
|
|
3591
|
+
n.dateLabel ? (c(), u("div", gr, [
|
|
3554
3592
|
t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
3555
3593
|
o("span", pr, v(n.dateLabel), 1),
|
|
3556
3594
|
t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3557
3595
|
])) : b("", !0),
|
|
3558
|
-
(c(!0), u(
|
|
3596
|
+
(c(!0), u(I, null, j(s.groups, (A, H) => (c(), u(I, {
|
|
3559
3597
|
key: A.key
|
|
3560
3598
|
}, [
|
|
3561
|
-
A.key === s.unreadGroupKey ? (c(), u("div",
|
|
3599
|
+
A.key === s.unreadGroupKey ? (c(), u("div", vr, [
|
|
3562
3600
|
t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
3563
|
-
o("span",
|
|
3601
|
+
o("span", yr, v(s.t("messageList.unread")), 1),
|
|
3564
3602
|
t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
3565
3603
|
])) : b("", !0),
|
|
3566
3604
|
A.role === "system" || A.items.length ? (c(), u("div", {
|
|
3567
3605
|
key: 1,
|
|
3568
3606
|
class: x(["wm-list__group", "wm-list__group--" + A.role])
|
|
3569
3607
|
}, [
|
|
3570
|
-
A.role === "system" ? (c(), u("div",
|
|
3608
|
+
A.role === "system" ? (c(), u("div", br, [
|
|
3571
3609
|
t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
3572
|
-
o("span",
|
|
3610
|
+
o("span", wr, v(A.systemLabel), 1),
|
|
3573
3611
|
t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3574
|
-
])) : (c(), u(
|
|
3575
|
-
(c(!0), u(
|
|
3612
|
+
])) : (c(), u(I, { key: 1 }, [
|
|
3613
|
+
(c(!0), u(I, null, j(A.items, (M, P) => (c(), u("div", {
|
|
3576
3614
|
key: `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3577
3615
|
"data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3578
3616
|
class: x(["wm-list__row fade-up", [
|
|
@@ -3582,15 +3620,16 @@ function Or(e, t, n, i, r, s) {
|
|
|
3582
3620
|
"is-failed": M.message._failed
|
|
3583
3621
|
}
|
|
3584
3622
|
]]),
|
|
3585
|
-
style: K(s.cornersStyle(A,
|
|
3623
|
+
style: K(s.cornersStyle(A, P))
|
|
3586
3624
|
}, [
|
|
3587
|
-
A.role !== "user" ? (c(), u("div",
|
|
3588
|
-
|
|
3625
|
+
A.role !== "user" ? (c(), u("div", Cr, [
|
|
3626
|
+
P === A.items.length - 1 ? (c(), u(I, { key: 0 }, [
|
|
3589
3627
|
A.role === "ai" ? (c(), R(a, {
|
|
3590
3628
|
key: 0,
|
|
3591
3629
|
size: 26,
|
|
3592
|
-
tail: !0
|
|
3593
|
-
|
|
3630
|
+
tail: !0,
|
|
3631
|
+
"image-url": n.aiAgentAvatarUrl
|
|
3632
|
+
}, null, 8, ["image-url"])) : (c(), R(l, {
|
|
3594
3633
|
key: 1,
|
|
3595
3634
|
name: A.agentName,
|
|
3596
3635
|
"avatar-url": A.agentAvatarUrl,
|
|
@@ -3599,12 +3638,12 @@ function Or(e, t, n, i, r, s) {
|
|
|
3599
3638
|
}, null, 8, ["name", "avatar-url"]))
|
|
3600
3639
|
], 64)) : b("", !0)
|
|
3601
3640
|
])) : b("", !0),
|
|
3602
|
-
M.renderAs === "action" ? (c(), R(
|
|
3641
|
+
M.renderAs === "action" ? (c(), R(p, {
|
|
3603
3642
|
key: 1,
|
|
3604
3643
|
state: M.message.payload.state,
|
|
3605
3644
|
label: s.actionLabel(M.message),
|
|
3606
3645
|
detail: s.actionDetail(M.message)
|
|
3607
|
-
}, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), R(
|
|
3646
|
+
}, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), R(p, {
|
|
3608
3647
|
key: 2,
|
|
3609
3648
|
state: "awaiting",
|
|
3610
3649
|
label: s.t("messageList.approvalRequestSent"),
|
|
@@ -3615,7 +3654,7 @@ function Or(e, t, n, i, r, s) {
|
|
|
3615
3654
|
}, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), R(C, {
|
|
3616
3655
|
key: 4,
|
|
3617
3656
|
artifact: s.artifactOf(M.message)
|
|
3618
|
-
}, null, 8, ["artifact"])) : (c(), u("div",
|
|
3657
|
+
}, null, 8, ["artifact"])) : (c(), u("div", Ar, [
|
|
3619
3658
|
M.message.text_md ? (c(), R(k, {
|
|
3620
3659
|
key: 0,
|
|
3621
3660
|
role: A.role,
|
|
@@ -3627,7 +3666,7 @@ function Or(e, t, n, i, r, s) {
|
|
|
3627
3666
|
"wm-list__atts--align-end": A.role === "user"
|
|
3628
3667
|
}])
|
|
3629
3668
|
}, [
|
|
3630
|
-
(c(!0), u(
|
|
3669
|
+
(c(!0), u(I, null, j(s.attachmentsOf(
|
|
3631
3670
|
M.message
|
|
3632
3671
|
), (N, $) => (c(), R(T, {
|
|
3633
3672
|
key: `${s.messageKey(M.message)}-att-${$}`,
|
|
@@ -3635,31 +3674,32 @@ function Or(e, t, n, i, r, s) {
|
|
|
3635
3674
|
}, null, 8, ["attachment"]))), 128))
|
|
3636
3675
|
], 2)) : b("", !0)
|
|
3637
3676
|
]))
|
|
3638
|
-
], 14,
|
|
3677
|
+
], 14, kr))), 128)),
|
|
3639
3678
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
|
|
3640
3679
|
key: 0,
|
|
3641
3680
|
class: x(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
3642
3681
|
}, [
|
|
3643
|
-
A.role !== "user" ? (c(), u("span",
|
|
3644
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span",
|
|
3645
|
-
s.lastTimeOf(A) ? (c(), u("span",
|
|
3682
|
+
A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : b("", !0),
|
|
3683
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : b("", !0),
|
|
3684
|
+
s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : b("", !0)
|
|
3646
3685
|
], 2)) : b("", !0)
|
|
3647
3686
|
], 64))
|
|
3648
3687
|
], 2)) : b("", !0)
|
|
3649
3688
|
], 64))), 128)),
|
|
3650
|
-
n.streamingActive ? (c(), u("div",
|
|
3651
|
-
o("div",
|
|
3652
|
-
|
|
3689
|
+
n.streamingActive ? (c(), u("div", xr, [
|
|
3690
|
+
o("div", Or, [
|
|
3691
|
+
q(a, {
|
|
3653
3692
|
size: 26,
|
|
3654
|
-
tail: !0
|
|
3655
|
-
|
|
3693
|
+
tail: !0,
|
|
3694
|
+
"image-url": n.aiAgentAvatarUrl
|
|
3695
|
+
}, null, 8, ["image-url"])
|
|
3656
3696
|
]),
|
|
3657
|
-
|
|
3697
|
+
q(E)
|
|
3658
3698
|
])) : b("", !0)
|
|
3659
3699
|
], 34);
|
|
3660
3700
|
}
|
|
3661
|
-
const Lr = /* @__PURE__ */
|
|
3662
|
-
function
|
|
3701
|
+
const Lr = /* @__PURE__ */ B(mr, [["render", Ir], ["__scopeId", "data-v-fc7e23b9"]]), me = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ve = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
3702
|
+
function Br() {
|
|
3663
3703
|
return ve && [
|
|
3664
3704
|
"video/webm;codecs=vp9,opus",
|
|
3665
3705
|
"video/webm;codecs=vp8,opus",
|
|
@@ -3679,11 +3719,11 @@ function Re({ audio: e }) {
|
|
|
3679
3719
|
systemAudio: e ? "include" : "exclude"
|
|
3680
3720
|
};
|
|
3681
3721
|
}
|
|
3682
|
-
function
|
|
3722
|
+
function $a(e) {
|
|
3683
3723
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
3684
3724
|
}
|
|
3685
3725
|
async function Er() {
|
|
3686
|
-
if (!
|
|
3726
|
+
if (!me) return null;
|
|
3687
3727
|
let e;
|
|
3688
3728
|
try {
|
|
3689
3729
|
e = await navigator.mediaDevices.getDisplayMedia(
|
|
@@ -3693,7 +3733,7 @@ async function Er() {
|
|
|
3693
3733
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
3694
3734
|
}
|
|
3695
3735
|
try {
|
|
3696
|
-
return await
|
|
3736
|
+
return await Rr(e);
|
|
3697
3737
|
} catch (t) {
|
|
3698
3738
|
return console.error("[media] screenshot capture", t), null;
|
|
3699
3739
|
} finally {
|
|
@@ -3702,22 +3742,22 @@ async function Er() {
|
|
|
3702
3742
|
});
|
|
3703
3743
|
}
|
|
3704
3744
|
}
|
|
3705
|
-
async function
|
|
3745
|
+
async function Rr(e) {
|
|
3706
3746
|
const t = document.createElement("video");
|
|
3707
3747
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
3708
3748
|
const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
|
|
3709
3749
|
r.width = n, r.height = i, r.getContext("2d").drawImage(t, 0, 0, n, i);
|
|
3710
|
-
const s = await new Promise((l,
|
|
3750
|
+
const s = await new Promise((l, p) => {
|
|
3711
3751
|
r.toBlob(
|
|
3712
|
-
(C) => C ? l(C) :
|
|
3752
|
+
(C) => C ? l(C) : p(new Error("toBlob failed")),
|
|
3713
3753
|
"image/png"
|
|
3714
3754
|
);
|
|
3715
3755
|
}), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
3716
3756
|
return new File([s], `capture-${a}.png`, { type: "image/png" });
|
|
3717
3757
|
}
|
|
3718
|
-
async function
|
|
3758
|
+
async function Nr(e = {}) {
|
|
3719
3759
|
var C;
|
|
3720
|
-
if (!
|
|
3760
|
+
if (!me || !ve) return null;
|
|
3721
3761
|
let t;
|
|
3722
3762
|
try {
|
|
3723
3763
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
@@ -3726,7 +3766,7 @@ async function Rr(e = {}) {
|
|
|
3726
3766
|
} catch (k) {
|
|
3727
3767
|
return (k == null ? void 0 : k.name) !== "NotAllowedError" && console.error("[media] record picker", k), null;
|
|
3728
3768
|
}
|
|
3729
|
-
const n =
|
|
3769
|
+
const n = Br();
|
|
3730
3770
|
let i;
|
|
3731
3771
|
try {
|
|
3732
3772
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
@@ -3741,13 +3781,13 @@ async function Rr(e = {}) {
|
|
|
3741
3781
|
k.data && k.data.size > 0 && r.push(k.data);
|
|
3742
3782
|
}), i.addEventListener("stop", () => {
|
|
3743
3783
|
var k, T;
|
|
3744
|
-
if (s && clearInterval(s), t.getTracks().forEach((
|
|
3745
|
-
|
|
3784
|
+
if (s && clearInterval(s), t.getTracks().forEach((E) => {
|
|
3785
|
+
E.stop();
|
|
3746
3786
|
}), r.length) {
|
|
3747
|
-
const
|
|
3748
|
-
type:
|
|
3787
|
+
const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), P = new File([A], `ecran-${M}.${H}`, {
|
|
3788
|
+
type: E
|
|
3749
3789
|
});
|
|
3750
|
-
(k = e.onfinalize) == null || k.call(e,
|
|
3790
|
+
(k = e.onfinalize) == null || k.call(e, P);
|
|
3751
3791
|
} else
|
|
3752
3792
|
(T = e.oncancel) == null || T.call(e);
|
|
3753
3793
|
}), t.getVideoTracks().forEach((k) => {
|
|
@@ -3769,10 +3809,10 @@ async function Rr(e = {}) {
|
|
|
3769
3809
|
}), null;
|
|
3770
3810
|
}
|
|
3771
3811
|
(C = e.onstart) == null || C.call(e);
|
|
3772
|
-
const
|
|
3812
|
+
const p = Date.now();
|
|
3773
3813
|
return s = setInterval(() => {
|
|
3774
3814
|
var k;
|
|
3775
|
-
(k = e.ontick) == null || k.call(e, Date.now() -
|
|
3815
|
+
(k = e.ontick) == null || k.call(e, Date.now() - p);
|
|
3776
3816
|
}, 500), {
|
|
3777
3817
|
stop: l,
|
|
3778
3818
|
get state() {
|
|
@@ -3780,7 +3820,7 @@ async function Rr(e = {}) {
|
|
|
3780
3820
|
}
|
|
3781
3821
|
};
|
|
3782
3822
|
}
|
|
3783
|
-
const
|
|
3823
|
+
const Fr = [
|
|
3784
3824
|
{
|
|
3785
3825
|
action: "file",
|
|
3786
3826
|
labelKey: "composer.attachFile",
|
|
@@ -3796,12 +3836,12 @@ const Nr = [
|
|
|
3796
3836
|
labelKey: "composer.recordScreen",
|
|
3797
3837
|
path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
|
|
3798
3838
|
}
|
|
3799
|
-
],
|
|
3839
|
+
], jr = {
|
|
3800
3840
|
name: "WmComposer",
|
|
3801
3841
|
inject: {
|
|
3802
3842
|
// Translator shared by the Messenger shell; French fallback when
|
|
3803
3843
|
// the component is used standalone.
|
|
3804
|
-
t: { default: () =>
|
|
3844
|
+
t: { default: () => U() }
|
|
3805
3845
|
},
|
|
3806
3846
|
props: {
|
|
3807
3847
|
modelValue: { type: String, default: "" },
|
|
@@ -3824,10 +3864,10 @@ const Nr = [
|
|
|
3824
3864
|
return !this.disabled && !!this.local.trim();
|
|
3825
3865
|
},
|
|
3826
3866
|
attachItems() {
|
|
3827
|
-
return
|
|
3867
|
+
return Fr.map((e) => ({
|
|
3828
3868
|
...e,
|
|
3829
3869
|
label: this.t(e.labelKey),
|
|
3830
|
-
disabled: e.action === "screenshot" && !
|
|
3870
|
+
disabled: e.action === "screenshot" && !me || e.action === "record" && (!me || !ve)
|
|
3831
3871
|
}));
|
|
3832
3872
|
},
|
|
3833
3873
|
recordingElapsedLabel() {
|
|
@@ -3903,7 +3943,7 @@ const Nr = [
|
|
|
3903
3943
|
async startRecording() {
|
|
3904
3944
|
if (this.recording || this.disabled) return;
|
|
3905
3945
|
this.recordingElapsed = 0;
|
|
3906
|
-
const e = await
|
|
3946
|
+
const e = await Nr({
|
|
3907
3947
|
onstart: () => {
|
|
3908
3948
|
this.recording = !0;
|
|
3909
3949
|
},
|
|
@@ -3928,21 +3968,21 @@ const Nr = [
|
|
|
3928
3968
|
}
|
|
3929
3969
|
}
|
|
3930
3970
|
}
|
|
3931
|
-
},
|
|
3971
|
+
}, Ur = { class: "wm-compose-wrap" }, Pr = {
|
|
3932
3972
|
key: 0,
|
|
3933
3973
|
class: "wm-rec"
|
|
3934
|
-
}, Dr = { class: "wm-rec__lbl" },
|
|
3974
|
+
}, Dr = { class: "wm-rec__lbl" }, $r = {
|
|
3935
3975
|
key: 1,
|
|
3936
3976
|
class: "wm-compose__menu",
|
|
3937
3977
|
role: "menu"
|
|
3938
|
-
},
|
|
3978
|
+
}, Hr = ["disabled", "onClick"], qr = { class: "wm-compose__menuIcon" }, zr = {
|
|
3939
3979
|
viewBox: "0 0 24 24",
|
|
3940
3980
|
width: "14",
|
|
3941
3981
|
height: "14",
|
|
3942
3982
|
"aria-hidden": "true"
|
|
3943
|
-
},
|
|
3944
|
-
function
|
|
3945
|
-
return c(), u("div",
|
|
3983
|
+
}, Vr = ["d"], Kr = ["placeholder", "disabled"], Wr = { class: "wm-compose__actions" }, Gr = ["title", "aria-label", "disabled"], Yr = ["disabled", "aria-label"];
|
|
3984
|
+
function Qr(e, t, n, i, r, s) {
|
|
3985
|
+
return c(), u("div", Ur, [
|
|
3946
3986
|
r.recording ? (c(), u("div", Pr, [
|
|
3947
3987
|
t[8] || (t[8] = o("span", {
|
|
3948
3988
|
class: "wm-rec__dot",
|
|
@@ -3971,15 +4011,15 @@ function Yr(e, t, n, i, r, s) {
|
|
|
3971
4011
|
class: "wm-compose__overlay",
|
|
3972
4012
|
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
3973
4013
|
})) : b("", !0),
|
|
3974
|
-
r.attachOpen ? (c(), u("div",
|
|
3975
|
-
(c(!0), u(
|
|
4014
|
+
r.attachOpen ? (c(), u("div", $r, [
|
|
4015
|
+
(c(!0), u(I, null, j(s.attachItems, (a) => (c(), u("button", {
|
|
3976
4016
|
key: a.action,
|
|
3977
4017
|
type: "button",
|
|
3978
4018
|
class: "wm-compose__menuItem",
|
|
3979
4019
|
disabled: a.disabled,
|
|
3980
4020
|
onClick: (l) => s.onAttachAction(a.action)
|
|
3981
4021
|
}, [
|
|
3982
|
-
o("span",
|
|
4022
|
+
o("span", qr, [
|
|
3983
4023
|
(c(), u("svg", zr, [
|
|
3984
4024
|
o("path", {
|
|
3985
4025
|
d: a.path,
|
|
@@ -3988,11 +4028,11 @@ function Yr(e, t, n, i, r, s) {
|
|
|
3988
4028
|
"stroke-linecap": "round",
|
|
3989
4029
|
"stroke-linejoin": "round",
|
|
3990
4030
|
fill: "none"
|
|
3991
|
-
}, null, 8,
|
|
4031
|
+
}, null, 8, Vr)
|
|
3992
4032
|
]))
|
|
3993
4033
|
]),
|
|
3994
4034
|
o("span", null, v(a.label), 1)
|
|
3995
|
-
], 8,
|
|
4035
|
+
], 8, Hr))), 128))
|
|
3996
4036
|
])) : b("", !0),
|
|
3997
4037
|
V(o("textarea", {
|
|
3998
4038
|
ref: "inputEl",
|
|
@@ -4003,10 +4043,10 @@ function Yr(e, t, n, i, r, s) {
|
|
|
4003
4043
|
disabled: n.disabled,
|
|
4004
4044
|
onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
|
|
4005
4045
|
onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
|
|
4006
|
-
}, null, 40,
|
|
4046
|
+
}, null, 40, Kr), [
|
|
4007
4047
|
[ee, r.local]
|
|
4008
4048
|
]),
|
|
4009
|
-
o("div",
|
|
4049
|
+
o("div", Wr, [
|
|
4010
4050
|
o("button", {
|
|
4011
4051
|
type: "button",
|
|
4012
4052
|
class: x(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -4028,7 +4068,7 @@ function Yr(e, t, n, i, r, s) {
|
|
|
4028
4068
|
}, [
|
|
4029
4069
|
o("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" })
|
|
4030
4070
|
], -1)
|
|
4031
|
-
])], 10,
|
|
4071
|
+
])], 10, Gr),
|
|
4032
4072
|
o("button", {
|
|
4033
4073
|
type: "submit",
|
|
4034
4074
|
class: x(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -4048,12 +4088,12 @@ function Yr(e, t, n, i, r, s) {
|
|
|
4048
4088
|
}, [
|
|
4049
4089
|
o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4050
4090
|
], -1)
|
|
4051
|
-
])], 10,
|
|
4091
|
+
])], 10, Yr)
|
|
4052
4092
|
])
|
|
4053
4093
|
], 34)
|
|
4054
4094
|
]);
|
|
4055
4095
|
}
|
|
4056
|
-
const
|
|
4096
|
+
const Xr = /* @__PURE__ */ B(jr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8"]]), Jr = {
|
|
4057
4097
|
name: "WmSuggestionChips",
|
|
4058
4098
|
props: {
|
|
4059
4099
|
items: { type: Array, default: () => [] },
|
|
@@ -4070,28 +4110,28 @@ const Qr = /* @__PURE__ */ E(Fr, [["render", Yr], ["__scopeId", "data-v-aa81dbb8
|
|
|
4070
4110
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4071
4111
|
}
|
|
4072
4112
|
}
|
|
4073
|
-
},
|
|
4074
|
-
function
|
|
4113
|
+
}, Zr = ["onClick"];
|
|
4114
|
+
function ei(e, t, n, i, r, s) {
|
|
4075
4115
|
return n.items.length ? (c(), u("div", {
|
|
4076
4116
|
key: s.batchKey,
|
|
4077
4117
|
class: "wm-chips"
|
|
4078
4118
|
}, [
|
|
4079
|
-
(c(!0), u(
|
|
4119
|
+
(c(!0), u(I, null, j(n.items, (a, l) => (c(), u("button", {
|
|
4080
4120
|
key: l,
|
|
4081
4121
|
type: "button",
|
|
4082
4122
|
class: "wm-chip",
|
|
4083
4123
|
style: K({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4084
|
-
onClick: (
|
|
4085
|
-
}, v(a.label), 13,
|
|
4124
|
+
onClick: (p) => e.$emit("select", a)
|
|
4125
|
+
}, v(a.label), 13, Zr))), 128))
|
|
4086
4126
|
])) : b("", !0);
|
|
4087
4127
|
}
|
|
4088
|
-
const
|
|
4128
|
+
const ti = /* @__PURE__ */ B(Jr, [["render", ei], ["__scopeId", "data-v-47ad8085"]]), ni = {
|
|
4089
4129
|
name: "WmApprovalCard",
|
|
4090
4130
|
components: { AIAvatar: le },
|
|
4091
4131
|
inject: {
|
|
4092
4132
|
// Translator shared by the Messenger shell; French fallback when
|
|
4093
4133
|
// the component is used standalone.
|
|
4094
|
-
t: { default: () =>
|
|
4134
|
+
t: { default: () => U() }
|
|
4095
4135
|
},
|
|
4096
4136
|
props: {
|
|
4097
4137
|
action: { type: String, required: !0 },
|
|
@@ -4127,23 +4167,23 @@ const ei = /* @__PURE__ */ E(Xr, [["render", Zr], ["__scopeId", "data-v-47ad8085
|
|
|
4127
4167
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4128
4168
|
}
|
|
4129
4169
|
}
|
|
4130
|
-
},
|
|
4170
|
+
}, si = { class: "wm-approval" }, ri = { class: "wm-approval__head" }, ii = { class: "wm-approval__icon" }, ai = { class: "wm-approval__main" }, oi = { class: "wm-approval__title" }, li = {
|
|
4131
4171
|
key: 0,
|
|
4132
4172
|
class: "wm-approval__detail"
|
|
4133
|
-
},
|
|
4134
|
-
function
|
|
4135
|
-
const a =
|
|
4136
|
-
return c(), u("div",
|
|
4137
|
-
o("div",
|
|
4138
|
-
o("div", ri, [
|
|
4139
|
-
z(a, { size: 24 })
|
|
4140
|
-
]),
|
|
4173
|
+
}, ci = { class: "wm-approval__actions" };
|
|
4174
|
+
function di(e, t, n, i, r, s) {
|
|
4175
|
+
const a = L("AIAvatar");
|
|
4176
|
+
return c(), u("div", si, [
|
|
4177
|
+
o("div", ri, [
|
|
4141
4178
|
o("div", ii, [
|
|
4142
|
-
|
|
4143
|
-
|
|
4179
|
+
q(a, { size: 24 })
|
|
4180
|
+
]),
|
|
4181
|
+
o("div", ai, [
|
|
4182
|
+
o("div", oi, v(n.action), 1),
|
|
4183
|
+
n.detail ? (c(), u("div", li, v(n.detail), 1)) : b("", !0)
|
|
4144
4184
|
])
|
|
4145
4185
|
]),
|
|
4146
|
-
o("div",
|
|
4186
|
+
o("div", ci, [
|
|
4147
4187
|
s.rejectId ? (c(), u("button", {
|
|
4148
4188
|
key: 0,
|
|
4149
4189
|
type: "button",
|
|
@@ -4159,9 +4199,9 @@ function ci(e, t, n, i, r, s) {
|
|
|
4159
4199
|
])
|
|
4160
4200
|
]);
|
|
4161
4201
|
}
|
|
4162
|
-
const
|
|
4202
|
+
const ui = /* @__PURE__ */ B(ni, [["render", di], ["__scopeId", "data-v-53ddf2b2"]]);
|
|
4163
4203
|
let Me = 0;
|
|
4164
|
-
const
|
|
4204
|
+
const mi = /* @__PURE__ */ new Set([
|
|
4165
4205
|
"text",
|
|
4166
4206
|
"textarea",
|
|
4167
4207
|
"number",
|
|
@@ -4175,7 +4215,7 @@ const ui = /* @__PURE__ */ new Set([
|
|
|
4175
4215
|
inject: {
|
|
4176
4216
|
// Translator shared by the Messenger shell; French fallback when
|
|
4177
4217
|
// the component is used standalone.
|
|
4178
|
-
t: { default: () =>
|
|
4218
|
+
t: { default: () => U() }
|
|
4179
4219
|
},
|
|
4180
4220
|
props: {
|
|
4181
4221
|
form: { type: Object, required: !0 },
|
|
@@ -4197,7 +4237,7 @@ const ui = /* @__PURE__ */ new Set([
|
|
|
4197
4237
|
// douteux.
|
|
4198
4238
|
normalizedFields() {
|
|
4199
4239
|
var t;
|
|
4200
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
4240
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !mi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
4201
4241
|
}
|
|
4202
4242
|
},
|
|
4203
4243
|
created() {
|
|
@@ -4250,50 +4290,50 @@ const ui = /* @__PURE__ */ new Set([
|
|
|
4250
4290
|
}
|
|
4251
4291
|
}
|
|
4252
4292
|
}
|
|
4253
|
-
},
|
|
4293
|
+
}, fi = { class: "wm-form" }, _i = { class: "wm-form__head" }, gi = { class: "wm-form__icon" }, pi = { class: "wm-form__main" }, vi = { class: "wm-form__title" }, yi = {
|
|
4254
4294
|
key: 0,
|
|
4255
4295
|
class: "wm-form__detail"
|
|
4256
|
-
},
|
|
4296
|
+
}, bi = ["for"], wi = {
|
|
4257
4297
|
key: 0,
|
|
4258
4298
|
class: "wm-form__req",
|
|
4259
4299
|
"aria-hidden": "true"
|
|
4260
|
-
},
|
|
4300
|
+
}, ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Si = ["id", "onUpdate:modelValue", "required", "disabled"], Mi = {
|
|
4261
4301
|
key: 4,
|
|
4262
4302
|
class: "wm-form__bool"
|
|
4263
|
-
},
|
|
4303
|
+
}, Ti = ["id", "onUpdate:modelValue", "disabled"], xi = ["id", "onUpdate:modelValue", "required", "disabled"], Oi = {
|
|
4264
4304
|
value: "",
|
|
4265
4305
|
disabled: ""
|
|
4266
|
-
},
|
|
4306
|
+
}, Ii = ["value"], Li = {
|
|
4267
4307
|
key: 6,
|
|
4268
4308
|
class: "wm-form__multi"
|
|
4269
|
-
},
|
|
4309
|
+
}, Bi = ["value", "checked", "disabled", "onChange"], Ei = {
|
|
4270
4310
|
key: 0,
|
|
4271
4311
|
class: "wm-form__err"
|
|
4272
|
-
},
|
|
4312
|
+
}, Ri = ["disabled"], Ni = {
|
|
4273
4313
|
key: 0,
|
|
4274
4314
|
class: "wm-form__spinner",
|
|
4275
4315
|
"aria-hidden": "true"
|
|
4276
|
-
},
|
|
4316
|
+
}, Fi = {
|
|
4277
4317
|
key: 2,
|
|
4278
4318
|
class: "wm-form__doneLbl"
|
|
4279
4319
|
};
|
|
4280
|
-
function
|
|
4281
|
-
const a =
|
|
4282
|
-
return c(), u("div",
|
|
4283
|
-
o("div",
|
|
4284
|
-
o("div",
|
|
4285
|
-
|
|
4320
|
+
function ji(e, t, n, i, r, s) {
|
|
4321
|
+
const a = L("AIAvatar");
|
|
4322
|
+
return c(), u("div", fi, [
|
|
4323
|
+
o("div", _i, [
|
|
4324
|
+
o("div", gi, [
|
|
4325
|
+
q(a, { size: 24 })
|
|
4286
4326
|
]),
|
|
4287
4327
|
o("div", pi, [
|
|
4288
|
-
o("div",
|
|
4289
|
-
n.form.description ? (c(), u("div",
|
|
4328
|
+
o("div", vi, v(n.form.title || s.t("form.title")), 1),
|
|
4329
|
+
n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : b("", !0)
|
|
4290
4330
|
])
|
|
4291
4331
|
]),
|
|
4292
4332
|
o("form", {
|
|
4293
4333
|
class: "wm-form__body",
|
|
4294
4334
|
onSubmit: t[0] || (t[0] = X((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4295
4335
|
}, [
|
|
4296
|
-
(c(!0), u(
|
|
4336
|
+
(c(!0), u(I, null, j(s.normalizedFields, (l) => (c(), u("div", {
|
|
4297
4337
|
key: l.key,
|
|
4298
4338
|
class: "wm-form__field"
|
|
4299
4339
|
}, [
|
|
@@ -4301,41 +4341,41 @@ function Fi(e, t, n, i, r, s) {
|
|
|
4301
4341
|
for: `wm-f-${r._uid}-${l.key}`,
|
|
4302
4342
|
class: "wm-form__label"
|
|
4303
4343
|
}, [
|
|
4304
|
-
|
|
4305
|
-
l.required ? (c(), u("span",
|
|
4306
|
-
], 8,
|
|
4344
|
+
ge(v(l.label), 1),
|
|
4345
|
+
l.required ? (c(), u("span", wi, "*")) : b("", !0)
|
|
4346
|
+
], 8, bi),
|
|
4307
4347
|
l.type === "text" ? V((c(), u("input", {
|
|
4308
4348
|
key: 0,
|
|
4309
4349
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4310
|
-
"onUpdate:modelValue": (
|
|
4350
|
+
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4311
4351
|
type: "text",
|
|
4312
4352
|
class: "wm-form__input",
|
|
4313
4353
|
placeholder: l.placeholder || "",
|
|
4314
4354
|
required: l.required,
|
|
4315
4355
|
disabled: n.readOnly || r.busy
|
|
4316
|
-
}, null, 8,
|
|
4356
|
+
}, null, 8, ki)), [
|
|
4317
4357
|
[ee, r.values[l.key]]
|
|
4318
4358
|
]) : l.type === "textarea" ? V((c(), u("textarea", {
|
|
4319
4359
|
key: 1,
|
|
4320
4360
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4321
|
-
"onUpdate:modelValue": (
|
|
4361
|
+
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4322
4362
|
class: "wm-form__textarea",
|
|
4323
4363
|
rows: "3",
|
|
4324
4364
|
placeholder: l.placeholder || "",
|
|
4325
4365
|
required: l.required,
|
|
4326
4366
|
disabled: n.readOnly || r.busy
|
|
4327
|
-
}, null, 8,
|
|
4367
|
+
}, null, 8, Ci)), [
|
|
4328
4368
|
[ee, r.values[l.key]]
|
|
4329
4369
|
]) : l.type === "number" ? V((c(), u("input", {
|
|
4330
4370
|
key: 2,
|
|
4331
4371
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4332
|
-
"onUpdate:modelValue": (
|
|
4372
|
+
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4333
4373
|
type: "number",
|
|
4334
4374
|
class: "wm-form__input",
|
|
4335
4375
|
placeholder: l.placeholder || "",
|
|
4336
4376
|
required: l.required,
|
|
4337
4377
|
disabled: n.readOnly || r.busy
|
|
4338
|
-
}, null, 8,
|
|
4378
|
+
}, null, 8, Ai)), [
|
|
4339
4379
|
[
|
|
4340
4380
|
ee,
|
|
4341
4381
|
r.values[l.key],
|
|
@@ -4345,77 +4385,77 @@ function Fi(e, t, n, i, r, s) {
|
|
|
4345
4385
|
]) : l.type === "date" ? V((c(), u("input", {
|
|
4346
4386
|
key: 3,
|
|
4347
4387
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4348
|
-
"onUpdate:modelValue": (
|
|
4388
|
+
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4349
4389
|
type: "date",
|
|
4350
4390
|
class: "wm-form__input",
|
|
4351
4391
|
required: l.required,
|
|
4352
4392
|
disabled: n.readOnly || r.busy
|
|
4353
|
-
}, null, 8,
|
|
4393
|
+
}, null, 8, Si)), [
|
|
4354
4394
|
[ee, r.values[l.key]]
|
|
4355
|
-
]) : l.type === "boolean" ? (c(), u("label",
|
|
4395
|
+
]) : l.type === "boolean" ? (c(), u("label", Mi, [
|
|
4356
4396
|
V(o("input", {
|
|
4357
4397
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4358
|
-
"onUpdate:modelValue": (
|
|
4398
|
+
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4359
4399
|
type: "checkbox",
|
|
4360
4400
|
disabled: n.readOnly || r.busy
|
|
4361
|
-
}, null, 8,
|
|
4401
|
+
}, null, 8, Ti), [
|
|
4362
4402
|
[$e, r.values[l.key]]
|
|
4363
4403
|
]),
|
|
4364
4404
|
o("span", null, v(l.placeholder || s.t("common.yes")), 1)
|
|
4365
4405
|
])) : l.type === "select" ? V((c(), u("select", {
|
|
4366
4406
|
key: 5,
|
|
4367
4407
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4368
|
-
"onUpdate:modelValue": (
|
|
4408
|
+
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4369
4409
|
class: "wm-form__select",
|
|
4370
4410
|
required: l.required,
|
|
4371
4411
|
disabled: n.readOnly || r.busy
|
|
4372
4412
|
}, [
|
|
4373
|
-
o("option",
|
|
4374
|
-
(c(!0), u(
|
|
4375
|
-
key:
|
|
4376
|
-
value:
|
|
4377
|
-
}, v(
|
|
4378
|
-
], 8,
|
|
4413
|
+
o("option", Oi, v(l.placeholder || s.t("form.choose")), 1),
|
|
4414
|
+
(c(!0), u(I, null, j(l.options, (p) => (c(), u("option", {
|
|
4415
|
+
key: p.value,
|
|
4416
|
+
value: p.value
|
|
4417
|
+
}, v(p.label), 9, Ii))), 128))
|
|
4418
|
+
], 8, xi)), [
|
|
4379
4419
|
[He, r.values[l.key]]
|
|
4380
4420
|
]) : l.type === "multiselect" ? (c(), u("div", Li, [
|
|
4381
|
-
(c(!0), u(
|
|
4382
|
-
key:
|
|
4421
|
+
(c(!0), u(I, null, j(l.options, (p) => (c(), u("label", {
|
|
4422
|
+
key: p.value,
|
|
4383
4423
|
class: "wm-form__multiItem"
|
|
4384
4424
|
}, [
|
|
4385
4425
|
o("input", {
|
|
4386
4426
|
type: "checkbox",
|
|
4387
|
-
value:
|
|
4388
|
-
checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(
|
|
4427
|
+
value: p.value,
|
|
4428
|
+
checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(p.value),
|
|
4389
4429
|
disabled: n.readOnly || r.busy,
|
|
4390
4430
|
onChange: (C) => s.toggleMulti(
|
|
4391
4431
|
l.key,
|
|
4392
|
-
|
|
4432
|
+
p.value,
|
|
4393
4433
|
C.target.checked
|
|
4394
4434
|
)
|
|
4395
|
-
}, null, 40,
|
|
4396
|
-
o("span", null, v(
|
|
4435
|
+
}, null, 40, Bi),
|
|
4436
|
+
o("span", null, v(p.label), 1)
|
|
4397
4437
|
]))), 128))
|
|
4398
4438
|
])) : b("", !0)
|
|
4399
4439
|
]))), 128)),
|
|
4400
4440
|
r.error ? (c(), u("div", Ei, v(r.error), 1)) : b("", !0),
|
|
4401
|
-
n.readOnly ? (c(), u("div",
|
|
4441
|
+
n.readOnly ? (c(), u("div", Fi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4402
4442
|
key: 1,
|
|
4403
4443
|
type: "submit",
|
|
4404
4444
|
class: "wm-form__submit",
|
|
4405
4445
|
disabled: r.busy
|
|
4406
4446
|
}, [
|
|
4407
|
-
r.busy ? (c(), u("span",
|
|
4447
|
+
r.busy ? (c(), u("span", Ni)) : b("", !0),
|
|
4408
4448
|
o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4409
|
-
], 8,
|
|
4449
|
+
], 8, Ri))
|
|
4410
4450
|
], 32)
|
|
4411
4451
|
]);
|
|
4412
4452
|
}
|
|
4413
|
-
const
|
|
4453
|
+
const Ui = /* @__PURE__ */ B(hi, [["render", ji], ["__scopeId", "data-v-75332dad"]]), Pi = {
|
|
4414
4454
|
name: "WmFeedback",
|
|
4415
4455
|
inject: {
|
|
4416
4456
|
// Translator shared by the Messenger shell; French fallback when
|
|
4417
4457
|
// the component is used standalone.
|
|
4418
|
-
t: { default: () =>
|
|
4458
|
+
t: { default: () => U() }
|
|
4419
4459
|
},
|
|
4420
4460
|
props: {
|
|
4421
4461
|
busy: { type: Boolean, default: !1 },
|
|
@@ -4444,13 +4484,13 @@ const ji = /* @__PURE__ */ E(hi, [["render", Fi], ["__scopeId", "data-v-75332dad
|
|
|
4444
4484
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4445
4485
|
}
|
|
4446
4486
|
}
|
|
4447
|
-
}, Di = { class: "wm-fb" },
|
|
4487
|
+
}, Di = { class: "wm-fb" }, $i = { class: "wm-fb__title" }, Hi = { class: "wm-fb__sub" }, qi = { class: "wm-fb__row" }, zi = ["onClick"], Vi = { class: "wm-fb__emoji" }, Ki = { class: "wm-fb__label" }, Wi = ["disabled"], Gi = {
|
|
4448
4488
|
key: 1,
|
|
4449
4489
|
class: "wm-fb__done"
|
|
4450
|
-
},
|
|
4451
|
-
function
|
|
4490
|
+
}, Yi = { class: "wm-fb__doneTitle" }, Qi = { class: "wm-fb__doneSub" };
|
|
4491
|
+
function Xi(e, t, n, i, r, s) {
|
|
4452
4492
|
return c(), u("div", Di, [
|
|
4453
|
-
n.done ? (c(), u("div",
|
|
4493
|
+
n.done ? (c(), u("div", Gi, [
|
|
4454
4494
|
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
4455
4495
|
o("svg", {
|
|
4456
4496
|
width: "16",
|
|
@@ -4466,20 +4506,20 @@ function Qi(e, t, n, i, r, s) {
|
|
|
4466
4506
|
o("path", { d: "M20 6L9 17l-5-5" })
|
|
4467
4507
|
])
|
|
4468
4508
|
], -1)),
|
|
4469
|
-
o("div",
|
|
4470
|
-
o("div",
|
|
4471
|
-
])) : (c(), u(
|
|
4472
|
-
o("div",
|
|
4473
|
-
o("div",
|
|
4474
|
-
o("div",
|
|
4475
|
-
(c(!0), u(
|
|
4509
|
+
o("div", Yi, v(s.t("feedback.doneTitle")), 1),
|
|
4510
|
+
o("div", Qi, v(s.t("feedback.doneSubtitle")), 1)
|
|
4511
|
+
])) : (c(), u(I, { key: 0 }, [
|
|
4512
|
+
o("div", $i, v(s.t("feedback.question")), 1),
|
|
4513
|
+
o("div", Hi, v(s.t("feedback.subtitle")), 1),
|
|
4514
|
+
o("div", qi, [
|
|
4515
|
+
(c(!0), u(I, null, j(s.options, (a) => (c(), u("button", {
|
|
4476
4516
|
key: a.v,
|
|
4477
4517
|
type: "button",
|
|
4478
4518
|
class: x(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
|
|
4479
4519
|
onClick: (l) => r.sel = a.v
|
|
4480
4520
|
}, [
|
|
4481
|
-
o("span",
|
|
4482
|
-
o("span",
|
|
4521
|
+
o("span", Vi, v(a.e), 1),
|
|
4522
|
+
o("span", Ki, v(a.l), 1)
|
|
4483
4523
|
], 10, zi))), 128))
|
|
4484
4524
|
]),
|
|
4485
4525
|
o("button", {
|
|
@@ -4487,16 +4527,16 @@ function Qi(e, t, n, i, r, s) {
|
|
|
4487
4527
|
class: "wm-fb__send",
|
|
4488
4528
|
disabled: !r.sel || n.busy,
|
|
4489
4529
|
onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
|
|
4490
|
-
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9,
|
|
4530
|
+
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Wi)
|
|
4491
4531
|
], 64))
|
|
4492
4532
|
]);
|
|
4493
4533
|
}
|
|
4494
|
-
const
|
|
4534
|
+
const Ji = /* @__PURE__ */ B(Pi, [["render", Xi], ["__scopeId", "data-v-9b630564"]]), Zi = {
|
|
4495
4535
|
name: "WmMoreMenu",
|
|
4496
4536
|
inject: {
|
|
4497
4537
|
// Translator shared by the Messenger shell; French fallback when
|
|
4498
4538
|
// the component is used standalone.
|
|
4499
|
-
t: { default: () =>
|
|
4539
|
+
t: { default: () => U() }
|
|
4500
4540
|
},
|
|
4501
4541
|
props: {
|
|
4502
4542
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -4534,24 +4574,24 @@ const Xi = /* @__PURE__ */ E(Pi, [["render", Qi], ["__scopeId", "data-v-9b630564
|
|
|
4534
4574
|
this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
|
|
4535
4575
|
}
|
|
4536
4576
|
}
|
|
4537
|
-
},
|
|
4577
|
+
}, ea = { class: "wm-mm" }, ta = {
|
|
4538
4578
|
class: "wm-mm__pop",
|
|
4539
4579
|
role: "menu"
|
|
4540
|
-
},
|
|
4580
|
+
}, na = {
|
|
4541
4581
|
key: 0,
|
|
4542
4582
|
class: "wm-mm__section"
|
|
4543
|
-
},
|
|
4583
|
+
}, sa = { class: "wm-mm__label" }, ra = { class: "wm-mm__label" }, ia = {
|
|
4544
4584
|
key: 1,
|
|
4545
4585
|
class: "wm-mm__sep"
|
|
4546
|
-
},
|
|
4547
|
-
function
|
|
4548
|
-
return c(), u("div",
|
|
4586
|
+
}, aa = { class: "wm-mm__section" }, oa = { class: "wm-mm__label" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__section" }, da = { class: "wm-mm__label" }, ua = { class: "wm-mm__label" };
|
|
4587
|
+
function ma(e, t, n, i, r, s) {
|
|
4588
|
+
return c(), u("div", ea, [
|
|
4549
4589
|
o("div", {
|
|
4550
4590
|
class: "wm-mm__scrim",
|
|
4551
4591
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4552
4592
|
}),
|
|
4553
|
-
o("div",
|
|
4554
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4593
|
+
o("div", ta, [
|
|
4594
|
+
n.canRename || n.canExport ? (c(), u("div", na, [
|
|
4555
4595
|
n.canRename ? (c(), u("button", {
|
|
4556
4596
|
key: 0,
|
|
4557
4597
|
type: "button",
|
|
@@ -4574,7 +4614,7 @@ function ua(e, t, n, i, r, s) {
|
|
|
4574
4614
|
o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
4575
4615
|
])
|
|
4576
4616
|
], -1)),
|
|
4577
|
-
o("span",
|
|
4617
|
+
o("span", sa, v(s.t("moreMenu.editTitle")), 1)
|
|
4578
4618
|
])) : b("", !0),
|
|
4579
4619
|
n.canExport ? (c(), u("button", {
|
|
4580
4620
|
key: 1,
|
|
@@ -4597,12 +4637,12 @@ function ua(e, t, n, i, r, s) {
|
|
|
4597
4637
|
o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
4598
4638
|
])
|
|
4599
4639
|
], -1)),
|
|
4600
|
-
o("span",
|
|
4640
|
+
o("span", ra, v(s.t("moreMenu.exportTranscript")), 1),
|
|
4601
4641
|
t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
4602
4642
|
])) : b("", !0)
|
|
4603
4643
|
])) : b("", !0),
|
|
4604
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4605
|
-
o("div",
|
|
4644
|
+
n.canRename || n.canExport ? (c(), u("div", ia)) : b("", !0),
|
|
4645
|
+
o("div", aa, [
|
|
4606
4646
|
o("button", {
|
|
4607
4647
|
type: "button",
|
|
4608
4648
|
class: "wm-mm__item",
|
|
@@ -4624,7 +4664,7 @@ function ua(e, t, n, i, r, s) {
|
|
|
4624
4664
|
o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
4625
4665
|
])
|
|
4626
4666
|
], -1)),
|
|
4627
|
-
o("span",
|
|
4667
|
+
o("span", oa, v(s.t("moreMenu.sound")), 1),
|
|
4628
4668
|
o("span", {
|
|
4629
4669
|
class: x(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
|
|
4630
4670
|
}, [...t[10] || (t[10] = [
|
|
@@ -4651,7 +4691,7 @@ function ua(e, t, n, i, r, s) {
|
|
|
4651
4691
|
o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
|
|
4652
4692
|
])
|
|
4653
4693
|
], -1)),
|
|
4654
|
-
o("span",
|
|
4694
|
+
o("span", la, v(s.t("moreMenu.browserNotifications")), 1),
|
|
4655
4695
|
o("span", {
|
|
4656
4696
|
class: x(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
|
|
4657
4697
|
}, [...t[12] || (t[12] = [
|
|
@@ -4660,7 +4700,7 @@ function ua(e, t, n, i, r, s) {
|
|
|
4660
4700
|
])
|
|
4661
4701
|
]),
|
|
4662
4702
|
t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
|
|
4663
|
-
o("div",
|
|
4703
|
+
o("div", ca, [
|
|
4664
4704
|
n.statusUrl ? (c(), u("button", {
|
|
4665
4705
|
key: 0,
|
|
4666
4706
|
type: "button",
|
|
@@ -4682,7 +4722,7 @@ function ua(e, t, n, i, r, s) {
|
|
|
4682
4722
|
o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
4683
4723
|
])
|
|
4684
4724
|
], -1)),
|
|
4685
|
-
o("span",
|
|
4725
|
+
o("span", da, v(s.t("moreMenu.serviceStatus")), 1)
|
|
4686
4726
|
])) : b("", !0),
|
|
4687
4727
|
n.helpUrl ? (c(), u("button", {
|
|
4688
4728
|
key: 1,
|
|
@@ -4705,18 +4745,18 @@ function ua(e, t, n, i, r, s) {
|
|
|
4705
4745
|
o("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" })
|
|
4706
4746
|
])
|
|
4707
4747
|
], -1)),
|
|
4708
|
-
o("span",
|
|
4748
|
+
o("span", ua, v(s.t("moreMenu.helpCenter")), 1)
|
|
4709
4749
|
])) : b("", !0)
|
|
4710
4750
|
])
|
|
4711
4751
|
])
|
|
4712
4752
|
]);
|
|
4713
4753
|
}
|
|
4714
|
-
const ha = /* @__PURE__ */
|
|
4754
|
+
const ha = /* @__PURE__ */ B(Zi, [["render", ma], ["__scopeId", "data-v-76281e95"]]), fa = {
|
|
4715
4755
|
name: "WmRenameDialog",
|
|
4716
4756
|
inject: {
|
|
4717
4757
|
// Translator shared by the Messenger shell; French fallback when
|
|
4718
4758
|
// the component is used standalone.
|
|
4719
|
-
t: { default: () =>
|
|
4759
|
+
t: { default: () => U() }
|
|
4720
4760
|
},
|
|
4721
4761
|
props: {
|
|
4722
4762
|
// Empty defaults: the resolved fallback comes from the translator
|
|
@@ -4753,20 +4793,20 @@ const ha = /* @__PURE__ */ E(Ji, [["render", ua], ["__scopeId", "data-v-76281e95
|
|
|
4753
4793
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
4754
4794
|
}
|
|
4755
4795
|
}
|
|
4756
|
-
},
|
|
4796
|
+
}, _a = { class: "wm-dialog" }, ga = {
|
|
4757
4797
|
class: "wm-dialog__card",
|
|
4758
4798
|
role: "dialog",
|
|
4759
4799
|
"aria-modal": "true"
|
|
4760
|
-
}, pa = { class: "wm-dialog__head" },
|
|
4761
|
-
function
|
|
4762
|
-
return c(), u("div",
|
|
4800
|
+
}, pa = { class: "wm-dialog__head" }, va = { class: "wm-dialog__title" }, ya = ["aria-label"], ba = { class: "wm-dialog__body" }, wa = ["placeholder"], ka = { class: "wm-dialog__actions" }, Ca = ["disabled"];
|
|
4801
|
+
function Aa(e, t, n, i, r, s) {
|
|
4802
|
+
return c(), u("div", _a, [
|
|
4763
4803
|
o("div", {
|
|
4764
4804
|
class: "wm-dialog__scrim",
|
|
4765
4805
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4766
4806
|
}),
|
|
4767
|
-
o("div",
|
|
4807
|
+
o("div", ga, [
|
|
4768
4808
|
o("div", pa, [
|
|
4769
|
-
o("div",
|
|
4809
|
+
o("div", va, v(n.title || s.t("rename.title")), 1),
|
|
4770
4810
|
o("button", {
|
|
4771
4811
|
type: "button",
|
|
4772
4812
|
class: "wm-dialog__close",
|
|
@@ -4786,9 +4826,9 @@ function Ca(e, t, n, i, r, s) {
|
|
|
4786
4826
|
}, [
|
|
4787
4827
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4788
4828
|
], -1)
|
|
4789
|
-
])], 8,
|
|
4829
|
+
])], 8, ya)
|
|
4790
4830
|
]),
|
|
4791
|
-
o("div",
|
|
4831
|
+
o("div", ba, [
|
|
4792
4832
|
V(o("input", {
|
|
4793
4833
|
ref: "input",
|
|
4794
4834
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
|
|
@@ -4800,11 +4840,11 @@ function Ca(e, t, n, i, r, s) {
|
|
|
4800
4840
|
t[3] || (t[3] = ue(X((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
4801
4841
|
t[4] || (t[4] = ue(X((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
4802
4842
|
]
|
|
4803
|
-
}, null, 40,
|
|
4843
|
+
}, null, 40, wa), [
|
|
4804
4844
|
[ee, r.value]
|
|
4805
4845
|
])
|
|
4806
4846
|
]),
|
|
4807
|
-
o("div",
|
|
4847
|
+
o("div", ka, [
|
|
4808
4848
|
o("button", {
|
|
4809
4849
|
type: "button",
|
|
4810
4850
|
class: "wm-dialog__btn",
|
|
@@ -4815,31 +4855,31 @@ function Ca(e, t, n, i, r, s) {
|
|
|
4815
4855
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
4816
4856
|
disabled: !s.canSubmit,
|
|
4817
4857
|
onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
|
|
4818
|
-
}, v(s.t("common.save")), 9,
|
|
4858
|
+
}, v(s.t("common.save")), 9, Ca)
|
|
4819
4859
|
])
|
|
4820
4860
|
])
|
|
4821
4861
|
]);
|
|
4822
4862
|
}
|
|
4823
|
-
const
|
|
4863
|
+
const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8"]]), Te = "ww-messenger-tokens", Ma = {
|
|
4824
4864
|
name: "Messenger",
|
|
4825
4865
|
components: {
|
|
4826
4866
|
Launcher: jt,
|
|
4827
|
-
Header:
|
|
4828
|
-
Onboarding:
|
|
4867
|
+
Header: cn,
|
|
4868
|
+
Onboarding: qn,
|
|
4829
4869
|
MessageList: Lr,
|
|
4830
|
-
Composer:
|
|
4831
|
-
SuggestionChips:
|
|
4832
|
-
ApprovalCard:
|
|
4833
|
-
FormCard:
|
|
4834
|
-
Feedback:
|
|
4870
|
+
Composer: Xr,
|
|
4871
|
+
SuggestionChips: ti,
|
|
4872
|
+
ApprovalCard: ui,
|
|
4873
|
+
FormCard: Ui,
|
|
4874
|
+
Feedback: Ji,
|
|
4835
4875
|
MoreMenu: ha,
|
|
4836
|
-
RenameDialog:
|
|
4876
|
+
RenameDialog: Sa
|
|
4837
4877
|
},
|
|
4838
4878
|
mixins: [
|
|
4839
4879
|
ot,
|
|
4840
|
-
|
|
4880
|
+
ht,
|
|
4841
4881
|
ft,
|
|
4842
|
-
|
|
4882
|
+
gt
|
|
4843
4883
|
],
|
|
4844
4884
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
4845
4885
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -4954,7 +4994,7 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
4954
4994
|
// 4. French.
|
|
4955
4995
|
locale() {
|
|
4956
4996
|
var e;
|
|
4957
|
-
return
|
|
4997
|
+
return pe(
|
|
4958
4998
|
this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
|
|
4959
4999
|
);
|
|
4960
5000
|
},
|
|
@@ -4962,7 +5002,7 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
4962
5002
|
// `locale` changes. `t()` below (and the provided closure) delegate
|
|
4963
5003
|
// to it so every string resolves against the current language.
|
|
4964
5004
|
translator() {
|
|
4965
|
-
return
|
|
5005
|
+
return U(this.locale);
|
|
4966
5006
|
},
|
|
4967
5007
|
error() {
|
|
4968
5008
|
var e;
|
|
@@ -5000,18 +5040,18 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
5000
5040
|
const T = r[k];
|
|
5001
5041
|
if (!T) continue;
|
|
5002
5042
|
if (((C = T.author) == null ? void 0 : C.type) === "user") break;
|
|
5003
|
-
const
|
|
5004
|
-
if (
|
|
5005
|
-
if (s != null &&
|
|
5043
|
+
const E = J(T.id);
|
|
5044
|
+
if (E != null) {
|
|
5045
|
+
if (s != null && E <= s) break;
|
|
5006
5046
|
t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
|
|
5007
5047
|
}
|
|
5008
5048
|
}
|
|
5009
|
-
const
|
|
5049
|
+
const p = r.filter(
|
|
5010
5050
|
(k) => !((k == null ? void 0 : k.id) != null && t[k.id] === 0)
|
|
5011
5051
|
);
|
|
5012
5052
|
return {
|
|
5013
5053
|
...i,
|
|
5014
|
-
_preview: st(i,
|
|
5054
|
+
_preview: st(i, p),
|
|
5015
5055
|
_unread: a > 0,
|
|
5016
5056
|
_unreadCount: a,
|
|
5017
5057
|
_lastAuthor: l
|
|
@@ -5046,14 +5086,14 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
5046
5086
|
const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
|
|
5047
5087
|
for (const i of this.drawerConversations) {
|
|
5048
5088
|
if (!i._unread) continue;
|
|
5049
|
-
const r = Ce(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "",
|
|
5089
|
+
const r = Ce(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
|
|
5050
5090
|
t.push({
|
|
5051
5091
|
convId: i.id,
|
|
5052
5092
|
preview: i._preview || this.t("notification.youHaveNewMessage"),
|
|
5053
5093
|
ts: r,
|
|
5054
5094
|
count: i._unreadCount || 1,
|
|
5055
5095
|
senderName: l,
|
|
5056
|
-
senderAvatarUrl:
|
|
5096
|
+
senderAvatarUrl: p
|
|
5057
5097
|
});
|
|
5058
5098
|
}
|
|
5059
5099
|
return t.sort((i, r) => i.ts < r.ts ? 1 : i.ts > r.ts ? -1 : 0), t;
|
|
@@ -5112,6 +5152,14 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
5112
5152
|
var e;
|
|
5113
5153
|
return ((e = this.widget) == null ? void 0 : e.welcome_message) || "";
|
|
5114
5154
|
},
|
|
5155
|
+
widgetSubtitle() {
|
|
5156
|
+
var e;
|
|
5157
|
+
return ((e = this.widget) == null ? void 0 : e.subtitle) || "";
|
|
5158
|
+
},
|
|
5159
|
+
defaultIconUrl() {
|
|
5160
|
+
var e;
|
|
5161
|
+
return ((e = this.widget) == null ? void 0 : e.default_icon_url) || null;
|
|
5162
|
+
},
|
|
5115
5163
|
agentName() {
|
|
5116
5164
|
var e, t, n;
|
|
5117
5165
|
return ((n = (t = (e = this.s) == null ? void 0 : e.config) == null ? void 0 : t.agent) == null ? void 0 : n.name) || "";
|
|
@@ -5183,8 +5231,8 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
5183
5231
|
}
|
|
5184
5232
|
const t = this.revealedAt;
|
|
5185
5233
|
return (this.s.messagesByConv[e.id] || []).filter((r) => {
|
|
5186
|
-
var s, a, l,
|
|
5187
|
-
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || ae(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (
|
|
5234
|
+
var s, a, l, p, C;
|
|
5235
|
+
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || ae(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (C = r == null ? void 0 : r.metadata) != null && C.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
5188
5236
|
});
|
|
5189
5237
|
},
|
|
5190
5238
|
// True whenever we should show the "typing" indicator at the bottom
|
|
@@ -5220,11 +5268,11 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
5220
5268
|
return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || this.t("action.title");
|
|
5221
5269
|
},
|
|
5222
5270
|
approvalDetail() {
|
|
5223
|
-
var i, r, s, a, l,
|
|
5271
|
+
var i, r, s, a, l, p;
|
|
5224
5272
|
const e = (s = (r = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : r.pending) == null ? void 0 : s.user_explanation;
|
|
5225
5273
|
if (typeof e == "string" && e.trim())
|
|
5226
5274
|
return e.trim();
|
|
5227
|
-
const t = (
|
|
5275
|
+
const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
|
|
5228
5276
|
if (!t || typeof t != "object") return "";
|
|
5229
5277
|
const n = Object.entries(t);
|
|
5230
5278
|
return n.length ? n.slice(0, 2).map(([C, k]) => `${C}: ${k}`).join(" · ") : "";
|
|
@@ -5270,7 +5318,7 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
5270
5318
|
}
|
|
5271
5319
|
}
|
|
5272
5320
|
return this.t("messageList.today", {
|
|
5273
|
-
time:
|
|
5321
|
+
time: Ie(t, oe(this.locale))
|
|
5274
5322
|
});
|
|
5275
5323
|
},
|
|
5276
5324
|
// Pagination state for the active conversation. Drives the
|
|
@@ -5666,29 +5714,29 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
5666
5714
|
}
|
|
5667
5715
|
}
|
|
5668
5716
|
}
|
|
5669
|
-
},
|
|
5717
|
+
}, Ta = {
|
|
5670
5718
|
key: 0,
|
|
5671
5719
|
class: "wm-loading",
|
|
5672
5720
|
"aria-busy": "true",
|
|
5673
5721
|
"aria-live": "polite"
|
|
5674
|
-
},
|
|
5722
|
+
}, xa = ["aria-label"], Oa = {
|
|
5675
5723
|
key: 0,
|
|
5676
5724
|
class: "wm-state"
|
|
5677
|
-
},
|
|
5725
|
+
}, Ia = { class: "wm-state__err" }, La = { class: "wm-state__errTitle" }, Ba = { class: "wm-state__errSub" }, Ea = { class: "wm-bottom" }, Ra = {
|
|
5678
5726
|
key: 0,
|
|
5679
5727
|
ref: "floatEl",
|
|
5680
5728
|
class: "wm-float"
|
|
5681
|
-
},
|
|
5729
|
+
}, Na = {
|
|
5682
5730
|
key: 1,
|
|
5683
5731
|
class: "wm-actionWait",
|
|
5684
5732
|
role: "status",
|
|
5685
5733
|
"aria-live": "polite"
|
|
5686
|
-
},
|
|
5734
|
+
}, Fa = { class: "wm-actionWait__lbl" }, ja = {
|
|
5687
5735
|
key: 2,
|
|
5688
5736
|
class: "wm-attached"
|
|
5689
|
-
},
|
|
5737
|
+
}, Ua = ["aria-label", "onClick"];
|
|
5690
5738
|
function Pa(e, t, n, i, r, s) {
|
|
5691
|
-
const a =
|
|
5739
|
+
const a = L("Launcher"), l = L("Header"), p = L("Onboarding"), C = L("MessageList"), k = L("ApprovalCard"), T = L("FormCard"), E = L("Feedback"), A = L("SuggestionChips"), H = L("Composer"), M = L("MoreMenu"), P = L("RenameDialog");
|
|
5692
5740
|
return c(), u("div", {
|
|
5693
5741
|
class: x(["wm-root", `wm-root--${n.displayMode}`])
|
|
5694
5742
|
}, [
|
|
@@ -5706,7 +5754,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5706
5754
|
role: "dialog",
|
|
5707
5755
|
"aria-label": "Messenger"
|
|
5708
5756
|
}, [
|
|
5709
|
-
!s.ready && !s.error ? (c(), u("div",
|
|
5757
|
+
!s.ready && !s.error ? (c(), u("div", Ta, [
|
|
5710
5758
|
s.isEmbedded ? b("", !0) : (c(), u("button", {
|
|
5711
5759
|
key: 0,
|
|
5712
5760
|
type: "button",
|
|
@@ -5727,13 +5775,13 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5727
5775
|
}, [
|
|
5728
5776
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5729
5777
|
], -1)
|
|
5730
|
-
])], 8,
|
|
5778
|
+
])], 8, xa)),
|
|
5731
5779
|
t[6] || (t[6] = o("div", {
|
|
5732
5780
|
class: "wm-loading__spinner",
|
|
5733
5781
|
"aria-hidden": "true"
|
|
5734
5782
|
}, null, -1))
|
|
5735
|
-
])) : (c(), u(
|
|
5736
|
-
|
|
5783
|
+
])) : (c(), u(I, { key: 1 }, [
|
|
5784
|
+
q(l, {
|
|
5737
5785
|
title: s.headerTitle,
|
|
5738
5786
|
"team-members": s.teamMembers,
|
|
5739
5787
|
"response-label": s.responseLabel,
|
|
@@ -5741,12 +5789,13 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5741
5789
|
"show-back": s.canBack,
|
|
5742
5790
|
"show-close": !s.isEmbedded,
|
|
5743
5791
|
"more-active": r.moreOpen,
|
|
5792
|
+
"agent-avatar-url": s.agentAvatarUrl,
|
|
5744
5793
|
onBack: s.goHome,
|
|
5745
5794
|
onMore: s.toggleMore,
|
|
5746
5795
|
onClose: s.close
|
|
5747
|
-
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
|
|
5748
|
-
s.error ? (c(), u("div",
|
|
5749
|
-
o("div",
|
|
5796
|
+
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
5797
|
+
s.error ? (c(), u("div", Oa, [
|
|
5798
|
+
o("div", Ia, [
|
|
5750
5799
|
t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
|
|
5751
5800
|
o("svg", {
|
|
5752
5801
|
width: "14",
|
|
@@ -5764,11 +5813,11 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5764
5813
|
], -1)),
|
|
5765
5814
|
o("div", null, [
|
|
5766
5815
|
o("div", La, v(s.t("error.connectionFailed")), 1),
|
|
5767
|
-
o("div",
|
|
5816
|
+
o("div", Ba, v(s.error), 1)
|
|
5768
5817
|
])
|
|
5769
5818
|
])
|
|
5770
|
-
])) : s.currentConv ? (c(), u(
|
|
5771
|
-
|
|
5819
|
+
])) : s.currentConv ? (c(), u(I, { key: 2 }, [
|
|
5820
|
+
q(C, {
|
|
5772
5821
|
ref: "messageList",
|
|
5773
5822
|
messages: s.displayedMessages,
|
|
5774
5823
|
"streaming-active": s.streamingActive,
|
|
@@ -5778,10 +5827,12 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5778
5827
|
"has-more": s.paginationState.hasMore,
|
|
5779
5828
|
"unread-anchor-id": e.unreadAnchorId,
|
|
5780
5829
|
"unread-boundary-ts": e.unreadBoundaryTs,
|
|
5830
|
+
"ai-agent-name": s.agentName,
|
|
5831
|
+
"ai-agent-avatar-url": s.agentAvatarUrl,
|
|
5781
5832
|
onLoadMore: s.onLoadMore
|
|
5782
|
-
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "onLoadMore"]),
|
|
5833
|
+
}, 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"]),
|
|
5783
5834
|
o("div", Ea, [
|
|
5784
|
-
s.floatVisible ? (c(), u("div",
|
|
5835
|
+
s.floatVisible ? (c(), u("div", Ra, [
|
|
5785
5836
|
s.approvalReady ? (c(), R(k, {
|
|
5786
5837
|
key: 0,
|
|
5787
5838
|
action: s.approvalTitle,
|
|
@@ -5792,7 +5843,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5792
5843
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
5793
5844
|
form: s.pendingForm.form,
|
|
5794
5845
|
onSubmit: s.onFormSubmit
|
|
5795
|
-
}, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (c(), R(
|
|
5846
|
+
}, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (c(), R(E, {
|
|
5796
5847
|
key: 2,
|
|
5797
5848
|
busy: r.feedbackBusy,
|
|
5798
5849
|
done: r.feedbackDone,
|
|
@@ -5803,12 +5854,12 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5803
5854
|
onSelect: s.onSuggestion
|
|
5804
5855
|
}, null, 8, ["items", "onSelect"]))
|
|
5805
5856
|
], 512)) : b("", !0),
|
|
5806
|
-
s.actionInFlight ? (c(), u("div",
|
|
5857
|
+
s.actionInFlight ? (c(), u("div", Na, [
|
|
5807
5858
|
t[8] || (t[8] = o("span", {
|
|
5808
5859
|
class: "wm-actionWait__spinner",
|
|
5809
5860
|
"aria-hidden": "true"
|
|
5810
5861
|
}, null, -1)),
|
|
5811
|
-
o("span",
|
|
5862
|
+
o("span", Fa, v(s.t("action.inProgress", {
|
|
5812
5863
|
name: s.actionInFlightName
|
|
5813
5864
|
})), 1)
|
|
5814
5865
|
])) : (c(), R(H, {
|
|
@@ -5836,15 +5887,15 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5836
5887
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
5837
5888
|
onAction: s.onMoreAction
|
|
5838
5889
|
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0),
|
|
5839
|
-
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), R(
|
|
5890
|
+
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), R(P, {
|
|
5840
5891
|
key: 1,
|
|
5841
5892
|
"initial-value": s.currentConv.name || "",
|
|
5842
5893
|
title: s.t("rename.dialogTitle"),
|
|
5843
5894
|
onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
|
|
5844
5895
|
onSubmit: s.onRenameSubmit
|
|
5845
5896
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
|
|
5846
|
-
r.pendingAttachments.length ? (c(), u("div",
|
|
5847
|
-
(c(!0), u(
|
|
5897
|
+
r.pendingAttachments.length ? (c(), u("div", ja, [
|
|
5898
|
+
(c(!0), u(I, null, j(r.pendingAttachments, (N, $) => (c(), u("div", {
|
|
5848
5899
|
key: $,
|
|
5849
5900
|
class: "wm-attached__chip"
|
|
5850
5901
|
}, [
|
|
@@ -5880,20 +5931,22 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5880
5931
|
}, [
|
|
5881
5932
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5882
5933
|
], -1)
|
|
5883
|
-
])], 8,
|
|
5934
|
+
])], 8, Ua)
|
|
5884
5935
|
]))), 128))
|
|
5885
5936
|
])) : b("", !0)
|
|
5886
|
-
], 64)) : (c(), R(
|
|
5937
|
+
], 64)) : (c(), R(p, {
|
|
5887
5938
|
key: 1,
|
|
5888
5939
|
"welcome-message": s.widgetWelcomeMessage,
|
|
5940
|
+
subtitle: s.widgetSubtitle,
|
|
5889
5941
|
"agent-name": s.agentName,
|
|
5942
|
+
"default-icon-url": s.defaultIconUrl,
|
|
5890
5943
|
"quick-links": s.quickLinks,
|
|
5891
5944
|
"open-threads": s.openThreads,
|
|
5892
5945
|
busy: r.busy,
|
|
5893
5946
|
onStart: s.startConv,
|
|
5894
5947
|
onSelect: s.onQuickLink,
|
|
5895
5948
|
onResume: s.onDrawerPick
|
|
5896
|
-
}, null, 8, ["welcome-message", "agent-name", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
5949
|
+
}, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
5897
5950
|
r.moreOpen && !s.currentConv ? (c(), R(M, {
|
|
5898
5951
|
key: 3,
|
|
5899
5952
|
"can-rename": !1,
|
|
@@ -5911,53 +5964,53 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5911
5964
|
], 6)) : b("", !0)
|
|
5912
5965
|
], 2);
|
|
5913
5966
|
}
|
|
5914
|
-
const
|
|
5967
|
+
const Ha = /* @__PURE__ */ B(Ma, [["render", Pa], ["__scopeId", "data-v-7abab363"]]), qa = "0.4.5";
|
|
5915
5968
|
export {
|
|
5916
5969
|
le as AIAvatar,
|
|
5917
5970
|
fe as AVATAR_COLORS,
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5971
|
+
ts as ActionResult,
|
|
5972
|
+
ui as ApprovalCard,
|
|
5973
|
+
ds as ArtifactFormResponse,
|
|
5974
|
+
Cs as ArtifactInfoCard,
|
|
5975
|
+
Hs as ArtifactRenderer,
|
|
5976
|
+
Us as ArtifactTicket,
|
|
5977
|
+
er as AttachmentPreview,
|
|
5978
|
+
rr as Bubble,
|
|
5979
|
+
Xr as Composer,
|
|
5927
5980
|
Ze as DEFAULT_BASE_URL,
|
|
5928
5981
|
ie as DEFAULT_LANGUAGE,
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5982
|
+
Ji as Feedback,
|
|
5983
|
+
Ui as FormCard,
|
|
5984
|
+
cn as Header,
|
|
5985
|
+
Be as HumanAvatar,
|
|
5933
5986
|
jt as Launcher,
|
|
5934
5987
|
ve as MEDIA_RECORDER_SUPPORTED,
|
|
5935
5988
|
Lr as MessageList,
|
|
5936
|
-
|
|
5989
|
+
Ha as Messenger,
|
|
5937
5990
|
ha as MoreMenu,
|
|
5938
|
-
|
|
5939
|
-
|
|
5991
|
+
qn as Onboarding,
|
|
5992
|
+
me as SCREEN_CAPTURE_SUPPORTED,
|
|
5940
5993
|
et as SUPPORTED_LANGUAGES,
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5994
|
+
ti as SuggestionChips,
|
|
5995
|
+
Yt as TeamAvatars,
|
|
5996
|
+
lr as Typing,
|
|
5997
|
+
qa as VERSION,
|
|
5945
5998
|
xe as avatarColor,
|
|
5946
5999
|
Oe as avatarInitials,
|
|
5947
6000
|
Er as captureScreenshotFile,
|
|
5948
|
-
|
|
6001
|
+
D as colors,
|
|
5949
6002
|
Xe as createStore,
|
|
5950
|
-
|
|
6003
|
+
U as createTranslator,
|
|
5951
6004
|
We as createTransport,
|
|
5952
6005
|
oe as dateLocale,
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
6006
|
+
Ha as default,
|
|
6007
|
+
Ie as formatTime,
|
|
6008
|
+
$a as guessAttachmentKind,
|
|
6009
|
+
Br as pickRecorderMime,
|
|
6010
|
+
un as renderInlineMarkdown,
|
|
6011
|
+
mn as renderMarkdown,
|
|
6012
|
+
pe as resolveLanguage,
|
|
6013
|
+
Nr as startScreenRecording,
|
|
5961
6014
|
Je as tokensCss,
|
|
5962
6015
|
Qe as uuid,
|
|
5963
6016
|
Qe as v4
|