@_solaris/messenger-widget 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +23 -23
- package/dist/messenger.cjs +4 -4
- package/dist/messenger.js +471 -443
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as
|
|
1
|
+
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Ue, withCtx as Pe, Fragment as I, renderList as U, withKeys as ue, withModifiers as Y, createElementVNode as o, createCommentVNode as w, createBlock as N, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as qe, markRaw as ke } from "vue";
|
|
2
2
|
const He = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -93,10 +93,10 @@ function We(e) {
|
|
|
93
93
|
}
|
|
94
94
|
);
|
|
95
95
|
if (!f.ok) {
|
|
96
|
-
const
|
|
97
|
-
`Session bootstrap failed: HTTP ${f.status} :: ${(
|
|
96
|
+
const L = await l(f), T = new Error(
|
|
97
|
+
`Session bootstrap failed: HTTP ${f.status} :: ${(L == null ? void 0 : L.error) || f.statusText}`
|
|
98
98
|
);
|
|
99
|
-
throw T.status = f.status, T.body =
|
|
99
|
+
throw T.status = f.status, T.body = L, T;
|
|
100
100
|
}
|
|
101
101
|
const g = await f.json();
|
|
102
102
|
t.userId = g.external_id;
|
|
@@ -104,25 +104,25 @@ function We(e) {
|
|
|
104
104
|
fetch(
|
|
105
105
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
106
106
|
{ credentials: "include" }
|
|
107
|
-
).then(async (
|
|
108
|
-
if (!
|
|
109
|
-
const T = await l(
|
|
107
|
+
).then(async (L) => {
|
|
108
|
+
if (!L.ok) {
|
|
109
|
+
const T = await l(L);
|
|
110
110
|
throw new Error(
|
|
111
|
-
`HTTP ${
|
|
111
|
+
`HTTP ${L.status} GET /widgets/:id/config :: ${(T == null ? void 0 : T.error) || L.statusText}`
|
|
112
112
|
);
|
|
113
113
|
}
|
|
114
|
-
return
|
|
114
|
+
return L.json();
|
|
115
115
|
}),
|
|
116
116
|
a("GET", "/customers/me")
|
|
117
117
|
]), S = { config: y, customer: (b == null ? void 0 : b.customer) ?? null };
|
|
118
|
-
return t.lastBootstrap = S, await C(), typeof document < "u" && (t.visibilityHandler =
|
|
118
|
+
return t.lastBootstrap = S, await C(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
119
119
|
"visibilitychange",
|
|
120
120
|
t.visibilityHandler
|
|
121
121
|
)), de(), S;
|
|
122
122
|
}
|
|
123
123
|
async function C() {
|
|
124
124
|
try {
|
|
125
|
-
const d = await
|
|
125
|
+
const d = await R();
|
|
126
126
|
t.lastActivityAt = d.reduce((f, g) => {
|
|
127
127
|
const y = g == null ? void 0 : g.last_message_at;
|
|
128
128
|
return y && (!f || y > f) ? y : f;
|
|
@@ -139,7 +139,7 @@ function We(e) {
|
|
|
139
139
|
const f = await a("PATCH", "/customers/me", d);
|
|
140
140
|
return (f == null ? void 0 : f.customer) ?? null;
|
|
141
141
|
}
|
|
142
|
-
async function
|
|
142
|
+
async function R() {
|
|
143
143
|
const d = await a("GET", "/conversations");
|
|
144
144
|
return (d == null ? void 0 : d.conversations) ?? [];
|
|
145
145
|
}
|
|
@@ -159,7 +159,7 @@ function We(e) {
|
|
|
159
159
|
f
|
|
160
160
|
)).conversation;
|
|
161
161
|
}
|
|
162
|
-
async function
|
|
162
|
+
async function j(d, f) {
|
|
163
163
|
return a(
|
|
164
164
|
"PATCH",
|
|
165
165
|
`/conversations/${encodeURIComponent(d)}/read`,
|
|
@@ -175,7 +175,7 @@ function We(e) {
|
|
|
175
175
|
`/conversations/${encodeURIComponent(d)}/messages${y}`
|
|
176
176
|
);
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
178
|
+
async function z(d, f) {
|
|
179
179
|
se();
|
|
180
180
|
const g = {
|
|
181
181
|
client_msg_id: f.client_msg_id,
|
|
@@ -259,9 +259,9 @@ function We(e) {
|
|
|
259
259
|
function ce(d) {
|
|
260
260
|
t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), $()) : se();
|
|
261
261
|
}
|
|
262
|
-
async function
|
|
262
|
+
async function me() {
|
|
263
263
|
try {
|
|
264
|
-
const d = await
|
|
264
|
+
const d = await R(), f = d.reduce((y, b) => {
|
|
265
265
|
const S = b == null ? void 0 : b.last_message_at;
|
|
266
266
|
return S && (!y || S > y) ? S : y;
|
|
267
267
|
}, null);
|
|
@@ -271,15 +271,15 @@ function We(e) {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
function de() {
|
|
274
|
-
|
|
274
|
+
h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(me, $e));
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function h() {
|
|
277
277
|
t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function m() {
|
|
280
280
|
if (document.hidden)
|
|
281
281
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
282
|
-
t.hiddenGraceTimer = null, document.hidden && (
|
|
282
|
+
t.hiddenGraceTimer = null, document.hidden && (h(), G(), r("paused"));
|
|
283
283
|
}, Ke);
|
|
284
284
|
else {
|
|
285
285
|
if (t.hiddenGraceTimer) {
|
|
@@ -290,7 +290,7 @@ function We(e) {
|
|
|
290
290
|
}
|
|
291
291
|
}
|
|
292
292
|
function _() {
|
|
293
|
-
|
|
293
|
+
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, G(), t.visibilityHandler && (document.removeEventListener(
|
|
294
294
|
"visibilitychange",
|
|
295
295
|
t.visibilityHandler
|
|
296
296
|
), t.visibilityHandler = null), t.started = !1;
|
|
@@ -303,13 +303,13 @@ function We(e) {
|
|
|
303
303
|
// REST
|
|
304
304
|
getCustomer: k,
|
|
305
305
|
patchCustomer: x,
|
|
306
|
-
listConversations:
|
|
306
|
+
listConversations: R,
|
|
307
307
|
createConversation: A,
|
|
308
308
|
getConversation: H,
|
|
309
309
|
patchConversation: M,
|
|
310
|
-
markConversationRead:
|
|
310
|
+
markConversationRead: j,
|
|
311
311
|
listMessages: F,
|
|
312
|
-
postMessage:
|
|
312
|
+
postMessage: z,
|
|
313
313
|
postCallback: W,
|
|
314
314
|
uploadAttachment: Z,
|
|
315
315
|
signAttachment: ee,
|
|
@@ -370,48 +370,48 @@ function Qe(e) {
|
|
|
370
370
|
connection: "idle"
|
|
371
371
|
}), n = [];
|
|
372
372
|
n.push(
|
|
373
|
-
e.on("connection", (
|
|
374
|
-
t.connection =
|
|
373
|
+
e.on("connection", (h) => {
|
|
374
|
+
t.connection = h;
|
|
375
375
|
})
|
|
376
376
|
), n.push(
|
|
377
|
-
e.on("message", (
|
|
378
|
-
const
|
|
379
|
-
!
|
|
377
|
+
e.on("message", (h) => {
|
|
378
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
|
|
379
|
+
!m || !(_ != null && _.id) || ($(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(m, _.created_at));
|
|
380
380
|
})
|
|
381
381
|
), n.push(
|
|
382
|
-
e.on("message_stream", (
|
|
383
|
-
const
|
|
384
|
-
!
|
|
382
|
+
e.on("message_stream", (h) => {
|
|
383
|
+
const m = h == null ? void 0 : h.message_id, _ = h == null ? void 0 : h.token;
|
|
384
|
+
!m || typeof _ != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + _);
|
|
385
385
|
})
|
|
386
386
|
), n.push(
|
|
387
|
-
e.on("conversation_updated", (
|
|
388
|
-
const
|
|
389
|
-
if (!
|
|
390
|
-
const d = t.conversations.findIndex((f) => f.id ===
|
|
387
|
+
e.on("conversation_updated", (h) => {
|
|
388
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.changes;
|
|
389
|
+
if (!m || !_) return;
|
|
390
|
+
const d = t.conversations.findIndex((f) => f.id === m);
|
|
391
391
|
d !== -1 && (t.conversations[d] = {
|
|
392
392
|
...t.conversations[d],
|
|
393
393
|
..._
|
|
394
394
|
});
|
|
395
395
|
})
|
|
396
396
|
), n.push(
|
|
397
|
-
e.on("config_updated", (
|
|
398
|
-
|
|
397
|
+
e.on("config_updated", (h) => {
|
|
398
|
+
h != null && h.config && (t.config = h.config);
|
|
399
399
|
})
|
|
400
400
|
), n.push(
|
|
401
|
-
e.on("action_status", (
|
|
402
|
-
const
|
|
403
|
-
if (!
|
|
404
|
-
const f = t.runningActionsByConv[
|
|
405
|
-
|
|
401
|
+
e.on("action_status", (h) => {
|
|
402
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.action_id, d = h == null ? void 0 : h.action_name;
|
|
403
|
+
if (!m || !_) return;
|
|
404
|
+
const f = t.runningActionsByConv[m] || {};
|
|
405
|
+
h.state === "running" ? (f[_] = d || _, t.runningActionsByConv[m] = { ...f }) : h.state === "done" && (delete f[_], t.runningActionsByConv[m] = { ...f });
|
|
406
406
|
})
|
|
407
407
|
), n.push(
|
|
408
|
-
e.on("activity", (
|
|
409
|
-
Array.isArray(
|
|
408
|
+
e.on("activity", (h) => {
|
|
409
|
+
Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
|
|
410
410
|
})
|
|
411
411
|
);
|
|
412
|
-
async function i(
|
|
412
|
+
async function i(h) {
|
|
413
413
|
try {
|
|
414
|
-
const
|
|
414
|
+
const m = new Promise(
|
|
415
415
|
(d, f) => setTimeout(
|
|
416
416
|
() => f(
|
|
417
417
|
new Error(
|
|
@@ -421,61 +421,61 @@ function Qe(e) {
|
|
|
421
421
|
15e3
|
|
422
422
|
)
|
|
423
423
|
), _ = await Promise.race([
|
|
424
|
-
e.start(
|
|
425
|
-
|
|
424
|
+
e.start(h),
|
|
425
|
+
m
|
|
426
426
|
]);
|
|
427
427
|
t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
|
|
428
428
|
e.listConversations(),
|
|
429
|
-
|
|
429
|
+
m
|
|
430
430
|
]), t.ready = !0;
|
|
431
|
-
} catch (
|
|
432
|
-
console.error("[store] start failed",
|
|
431
|
+
} catch (m) {
|
|
432
|
+
console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
function r() {
|
|
436
|
-
for (const
|
|
436
|
+
for (const h of n)
|
|
437
437
|
try {
|
|
438
|
-
|
|
438
|
+
h();
|
|
439
439
|
} catch {
|
|
440
440
|
}
|
|
441
441
|
e.stop();
|
|
442
442
|
}
|
|
443
|
-
async function s(
|
|
444
|
-
const
|
|
445
|
-
if (!
|
|
443
|
+
async function s(h) {
|
|
444
|
+
const m = me(h);
|
|
445
|
+
if (!m) return t.customer;
|
|
446
446
|
try {
|
|
447
|
-
const _ = await e.patchCustomer(
|
|
447
|
+
const _ = await e.patchCustomer(m);
|
|
448
448
|
_ && (t.customer = _);
|
|
449
449
|
} catch (_) {
|
|
450
450
|
console.error("[store] applyCustomer failed", _);
|
|
451
451
|
}
|
|
452
452
|
return t.customer;
|
|
453
453
|
}
|
|
454
|
-
async function a(
|
|
455
|
-
const
|
|
456
|
-
return _ === -1 ? t.conversations = [
|
|
454
|
+
async function a(h = {}) {
|
|
455
|
+
const m = await e.createConversation(h), _ = t.conversations.findIndex((d) => d.id === m.id);
|
|
456
|
+
return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
|
|
457
457
|
}
|
|
458
458
|
const l = 50;
|
|
459
|
-
async function p(
|
|
460
|
-
const
|
|
461
|
-
if (!(
|
|
462
|
-
k(
|
|
459
|
+
async function p(h) {
|
|
460
|
+
const m = t.paginationByConv[h];
|
|
461
|
+
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
462
|
+
k(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
463
463
|
try {
|
|
464
|
-
const _ = await e.listMessages(
|
|
464
|
+
const _ = await e.listMessages(h, {
|
|
465
465
|
limit: l
|
|
466
|
-
}), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[
|
|
466
|
+
}), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[h] || [], g = /* @__PURE__ */ new Set();
|
|
467
467
|
for (const b of d)
|
|
468
468
|
(b == null ? void 0 : b.id) != null && g.add(`id:${String(b.id)}`), b != null && b.client_msg_id && g.add(`c:${b.client_msg_id}`);
|
|
469
469
|
const y = f.filter((b) => !((b == null ? void 0 : b.id) != null && g.has(`id:${String(b.id)}`) || b != null && b.client_msg_id && g.has(`c:${b.client_msg_id}`)));
|
|
470
|
-
t.messagesByConv[
|
|
470
|
+
t.messagesByConv[h] = [...d, ...y].sort(
|
|
471
471
|
ce
|
|
472
|
-
), k(
|
|
472
|
+
), k(h, {
|
|
473
473
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
474
474
|
loading: !1,
|
|
475
475
|
loaded: !0
|
|
476
476
|
});
|
|
477
477
|
} catch (_) {
|
|
478
|
-
console.error("[store] openConversation failed", _), k(
|
|
478
|
+
console.error("[store] openConversation failed", _), k(h, {
|
|
479
479
|
nextCursor: null,
|
|
480
480
|
loading: !1,
|
|
481
481
|
loaded: !1
|
|
@@ -483,67 +483,67 @@ function Qe(e) {
|
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
async function C(
|
|
486
|
+
async function C(h) {
|
|
487
487
|
var f;
|
|
488
|
-
const
|
|
489
|
-
if (!
|
|
490
|
-
const d = (f = (t.messagesByConv[
|
|
488
|
+
const m = t.paginationByConv[h];
|
|
489
|
+
if (!m || m.loading || !m.nextCursor) return;
|
|
490
|
+
const d = (f = (t.messagesByConv[h] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
|
|
491
491
|
if (d) {
|
|
492
|
-
k(
|
|
492
|
+
k(h, { ...m, loading: !0 });
|
|
493
493
|
try {
|
|
494
|
-
const g = await e.listMessages(
|
|
494
|
+
const g = await e.listMessages(h, {
|
|
495
495
|
before: d,
|
|
496
496
|
limit: l
|
|
497
|
-
}), y = (g == null ? void 0 : g.messages) ?? [], b = t.messagesByConv[
|
|
497
|
+
}), y = (g == null ? void 0 : g.messages) ?? [], b = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
|
|
498
498
|
for (const T of b)
|
|
499
499
|
(T == null ? void 0 : T.id) != null && S.add(`id:${String(T.id)}`), T != null && T.client_msg_id && S.add(`c:${T.client_msg_id}`);
|
|
500
|
-
const
|
|
501
|
-
t.messagesByConv[
|
|
500
|
+
const L = y.filter((T) => !((T == null ? void 0 : T.id) != null && S.has(`id:${String(T.id)}`) || T != null && T.client_msg_id && S.has(`c:${T.client_msg_id}`)));
|
|
501
|
+
t.messagesByConv[h] = [...L, ...b], k(h, {
|
|
502
502
|
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
503
503
|
loading: !1,
|
|
504
504
|
loaded: !0
|
|
505
505
|
});
|
|
506
506
|
} catch (g) {
|
|
507
|
-
console.error("[store] loadMore failed", g), k(
|
|
507
|
+
console.error("[store] loadMore failed", g), k(h, { ...m, loading: !1 });
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
function k(
|
|
512
|
-
t.paginationByConv = { ...t.paginationByConv, [
|
|
511
|
+
function k(h, m) {
|
|
512
|
+
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
513
513
|
}
|
|
514
|
-
async function x(
|
|
515
|
-
const _ = await e.patchConversation(
|
|
514
|
+
async function x(h, m) {
|
|
515
|
+
const _ = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
|
|
516
516
|
d !== -1 && (t.conversations[d] = _);
|
|
517
517
|
}
|
|
518
|
-
async function
|
|
519
|
-
if (!
|
|
520
|
-
const
|
|
518
|
+
async function R(h) {
|
|
519
|
+
if (!h) return [];
|
|
520
|
+
const m = t.messagesByConv[h] || [];
|
|
521
521
|
let _ = "";
|
|
522
|
-
for (const d of
|
|
522
|
+
for (const d of m)
|
|
523
523
|
d != null && d.created_at && d.created_at > _ && (_ = d.created_at);
|
|
524
524
|
try {
|
|
525
525
|
const d = await e.listMessages(
|
|
526
|
-
|
|
526
|
+
h,
|
|
527
527
|
_ ? { since: _ } : {}
|
|
528
528
|
), f = (d == null ? void 0 : d.messages) || [];
|
|
529
529
|
if (!f.length) return [];
|
|
530
530
|
const g = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set();
|
|
531
|
-
for (const S of
|
|
531
|
+
for (const S of m)
|
|
532
532
|
(S == null ? void 0 : S.id) != null && g.add(String(S.id)), S != null && S.client_msg_id && y.add(S.client_msg_id);
|
|
533
533
|
const b = [];
|
|
534
534
|
for (const S of f) {
|
|
535
|
-
const
|
|
536
|
-
$(
|
|
535
|
+
const L = (S == null ? void 0 : S.id) != null && g.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && y.has(S.client_msg_id);
|
|
536
|
+
$(h, S), L || b.push(S);
|
|
537
537
|
}
|
|
538
538
|
return b;
|
|
539
539
|
} catch (d) {
|
|
540
540
|
return console.error("[store] fetchSinceLast failed", d), [];
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
async function A(
|
|
544
|
-
if (!(!
|
|
543
|
+
async function A(h, m) {
|
|
544
|
+
if (!(!h || m == null))
|
|
545
545
|
try {
|
|
546
|
-
const _ = await e.markConversationRead(
|
|
546
|
+
const _ = await e.markConversationRead(h, m), d = (_ == null ? void 0 : _.last_read_message_id) ?? m, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === h);
|
|
547
547
|
f !== -1 && (t.conversations[f] = {
|
|
548
548
|
...t.conversations[f],
|
|
549
549
|
last_read_message_id: d
|
|
@@ -552,19 +552,19 @@ function Qe(e) {
|
|
|
552
552
|
console.error("[store] markConversationRead failed", _);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
async function H(
|
|
556
|
-
var
|
|
557
|
-
const f = (
|
|
558
|
-
if (!
|
|
559
|
-
const y = Je(), b = de(
|
|
555
|
+
async function H(h, m, { attachments: _, metadata: d } = {}) {
|
|
556
|
+
var L;
|
|
557
|
+
const f = (m || "").trim(), g = Array.isArray(_) && _.length > 0;
|
|
558
|
+
if (!h || !f && !g) return;
|
|
559
|
+
const y = Je(), b = de(h), S = {
|
|
560
560
|
id: y,
|
|
561
561
|
client_msg_id: y,
|
|
562
|
-
conversation_id:
|
|
562
|
+
conversation_id: h,
|
|
563
563
|
type: "content",
|
|
564
564
|
text_md: f,
|
|
565
565
|
author: {
|
|
566
566
|
type: "user",
|
|
567
|
-
id: ((
|
|
567
|
+
id: ((L = t.customer) == null ? void 0 : L.external_id) || null
|
|
568
568
|
},
|
|
569
569
|
created_at: b,
|
|
570
570
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
@@ -572,9 +572,9 @@ function Qe(e) {
|
|
|
572
572
|
...g ? { payload: { type: "content", attachments: _ } } : {},
|
|
573
573
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
574
574
|
};
|
|
575
|
-
$(
|
|
575
|
+
$(h, S);
|
|
576
576
|
try {
|
|
577
|
-
await e.postMessage(
|
|
577
|
+
await e.postMessage(h, {
|
|
578
578
|
client_msg_id: y,
|
|
579
579
|
text_md: f,
|
|
580
580
|
created_at: b,
|
|
@@ -582,32 +582,32 @@ function Qe(e) {
|
|
|
582
582
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
583
583
|
});
|
|
584
584
|
} catch (T) {
|
|
585
|
-
console.error("[store] send failed", T), G(
|
|
585
|
+
console.error("[store] send failed", T), G(h, y, {
|
|
586
586
|
_failed: !0,
|
|
587
587
|
_pending: !1
|
|
588
588
|
});
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
async function M(
|
|
592
|
-
|
|
591
|
+
async function M(h, m, _) {
|
|
592
|
+
h != null && (t.awaitingCallback[h] = !0);
|
|
593
593
|
try {
|
|
594
|
-
await e.postCallback(
|
|
594
|
+
await e.postCallback(h, m, _);
|
|
595
595
|
} catch (d) {
|
|
596
|
-
console.error("[store] callback failed", d),
|
|
596
|
+
console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
const
|
|
600
|
-
async function F(
|
|
601
|
-
if (!
|
|
602
|
-
const
|
|
603
|
-
if (
|
|
604
|
-
const _ =
|
|
605
|
-
if (!_ || _ - Date.now() > 6e4) return
|
|
599
|
+
const j = /* @__PURE__ */ new Map();
|
|
600
|
+
async function F(h) {
|
|
601
|
+
if (!h) return null;
|
|
602
|
+
const m = j.get(h);
|
|
603
|
+
if (m != null && m.url) {
|
|
604
|
+
const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
605
|
+
if (!_ || _ - Date.now() > 6e4) return m.url;
|
|
606
606
|
}
|
|
607
607
|
try {
|
|
608
|
-
const _ = await e.signAttachment(
|
|
608
|
+
const _ = await e.signAttachment(h);
|
|
609
609
|
if (_ != null && _.signed_url)
|
|
610
|
-
return
|
|
610
|
+
return j.set(h, {
|
|
611
611
|
url: _.signed_url,
|
|
612
612
|
expires_at: _.expires_at
|
|
613
613
|
}), _.signed_url;
|
|
@@ -616,32 +616,32 @@ function Qe(e) {
|
|
|
616
616
|
}
|
|
617
617
|
return null;
|
|
618
618
|
}
|
|
619
|
-
async function
|
|
620
|
-
const d = t.conversations.find((y) => y.id ===
|
|
619
|
+
async function z(h, { rating: m, comment: _ } = {}) {
|
|
620
|
+
const d = t.conversations.find((y) => y.id === h), g = {
|
|
621
621
|
...(d == null ? void 0 : d.metadata) || {},
|
|
622
622
|
feedback: {
|
|
623
|
-
rating:
|
|
623
|
+
rating: m,
|
|
624
624
|
comment: _ || null,
|
|
625
625
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
626
626
|
}
|
|
627
627
|
};
|
|
628
|
-
await x(
|
|
628
|
+
await x(h, { metadata: g });
|
|
629
629
|
}
|
|
630
|
-
function W(
|
|
630
|
+
function W(h) {
|
|
631
631
|
var _, d;
|
|
632
|
-
const
|
|
633
|
-
for (let f =
|
|
634
|
-
const g =
|
|
632
|
+
const m = t.messagesByConv[h] || [];
|
|
633
|
+
for (let f = m.length - 1; f >= 0; f--) {
|
|
634
|
+
const g = m[f];
|
|
635
635
|
if ((g == null ? void 0 : g.type) === "action" && ((_ = g == null ? void 0 : g.payload) == null ? void 0 : _.type) === "action" && ((d = g == null ? void 0 : g.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(g == null ? void 0 : g.callbacks) && g.callbacks.length > 0 && !t.awaitingCallback[g.id])
|
|
636
636
|
return g;
|
|
637
637
|
}
|
|
638
638
|
return null;
|
|
639
639
|
}
|
|
640
|
-
function Z(
|
|
640
|
+
function Z(h) {
|
|
641
641
|
var _, d, f;
|
|
642
|
-
const
|
|
643
|
-
for (let g =
|
|
644
|
-
const y =
|
|
642
|
+
const m = t.messagesByConv[h] || [];
|
|
643
|
+
for (let g = m.length - 1; g >= 0; g--) {
|
|
644
|
+
const y = m[g];
|
|
645
645
|
if (((_ = y == null ? void 0 : y.author) == null ? void 0 : _.type) === "user" || (y == null ? void 0 : y.type) === "action" && ((d = y == null ? void 0 : y.payload) == null ? void 0 : d.state) === "pending")
|
|
646
646
|
return null;
|
|
647
647
|
const b = (f = y == null ? void 0 : y.metadata) == null ? void 0 : f.form;
|
|
@@ -650,33 +650,33 @@ function Qe(e) {
|
|
|
650
650
|
}
|
|
651
651
|
return null;
|
|
652
652
|
}
|
|
653
|
-
function ee(
|
|
654
|
-
const
|
|
655
|
-
if (!
|
|
656
|
-
const _ = Object.keys(
|
|
653
|
+
function ee(h) {
|
|
654
|
+
const m = t.runningActionsByConv[h];
|
|
655
|
+
if (!m) return null;
|
|
656
|
+
const _ = Object.keys(m);
|
|
657
657
|
if (_.length === 0) return null;
|
|
658
658
|
const d = _[0];
|
|
659
|
-
return { id: d, payload: { name:
|
|
659
|
+
return { id: d, payload: { name: m[d] } };
|
|
660
660
|
}
|
|
661
|
-
function te(
|
|
661
|
+
function te(h) {
|
|
662
662
|
var _, d, f, g;
|
|
663
|
-
const
|
|
664
|
-
for (let y =
|
|
665
|
-
const b =
|
|
663
|
+
const m = t.messagesByConv[h] || [];
|
|
664
|
+
for (let y = m.length - 1; y >= 0; y--) {
|
|
665
|
+
const b = m[y];
|
|
666
666
|
if (((_ = b == null ? void 0 : b.author) == null ? void 0 : _.type) === "user") return [];
|
|
667
667
|
if ((b == null ? void 0 : b.type) === "action" && ((d = b == null ? void 0 : b.payload) == null ? void 0 : d.state) === "pending")
|
|
668
668
|
return [];
|
|
669
669
|
if (((f = b == null ? void 0 : b.author) == null ? void 0 : f.type) !== "agent_ia") continue;
|
|
670
670
|
const S = (g = b == null ? void 0 : b.metadata) == null ? void 0 : g.suggested_replies;
|
|
671
|
-
return Array.isArray(S) && S.length ? S.map((
|
|
672
|
-
if (typeof
|
|
673
|
-
const T =
|
|
671
|
+
return Array.isArray(S) && S.length ? S.map((L) => {
|
|
672
|
+
if (typeof L == "string") {
|
|
673
|
+
const T = L.trim();
|
|
674
674
|
return T ? { label: T, kind: null } : null;
|
|
675
675
|
}
|
|
676
|
-
if (
|
|
677
|
-
const T =
|
|
676
|
+
if (L && typeof L == "object" && typeof L.label == "string") {
|
|
677
|
+
const T = L.label.trim();
|
|
678
678
|
if (!T) return null;
|
|
679
|
-
const Ne =
|
|
679
|
+
const Ne = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
|
|
680
680
|
return { label: T, kind: Ne };
|
|
681
681
|
}
|
|
682
682
|
return null;
|
|
@@ -684,57 +684,57 @@ function Qe(e) {
|
|
|
684
684
|
}
|
|
685
685
|
return [];
|
|
686
686
|
}
|
|
687
|
-
function $(
|
|
687
|
+
function $(h, m) {
|
|
688
688
|
var g;
|
|
689
|
-
const _ = t.messagesByConv[
|
|
689
|
+
const _ = t.messagesByConv[h] || [];
|
|
690
690
|
let d = -1;
|
|
691
|
-
|
|
692
|
-
(y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id ===
|
|
693
|
-
)), d === -1 && (
|
|
691
|
+
m != null && m.client_msg_id && (d = _.findIndex(
|
|
692
|
+
(y) => (y == null ? void 0 : y.client_msg_id) && y.client_msg_id === m.client_msg_id
|
|
693
|
+
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = _.findIndex((y) => ne(y == null ? void 0 : y.id, m.id)));
|
|
694
694
|
let f;
|
|
695
|
-
d === -1 ? f = [..._,
|
|
695
|
+
d === -1 ? f = [..._, m].sort(ce) : (f = _.slice(), f[d] = {
|
|
696
696
|
..._[d],
|
|
697
|
-
...
|
|
697
|
+
...m,
|
|
698
698
|
_pending: !1,
|
|
699
699
|
_failed: !1
|
|
700
|
-
}), t.messagesByConv[
|
|
700
|
+
}), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((g = m == null ? void 0 : m.payload) != null && g.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
|
|
701
701
|
}
|
|
702
|
-
function ne(
|
|
703
|
-
return
|
|
702
|
+
function ne(h, m) {
|
|
703
|
+
return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
|
|
704
704
|
}
|
|
705
|
-
function G(
|
|
706
|
-
const d = t.messagesByConv[
|
|
705
|
+
function G(h, m, _) {
|
|
706
|
+
const d = t.messagesByConv[h];
|
|
707
707
|
if (!d) return;
|
|
708
|
-
const f = d.findIndex((y) => y.id ===
|
|
708
|
+
const f = d.findIndex((y) => y.id === m);
|
|
709
709
|
if (f === -1) return;
|
|
710
710
|
const g = d.slice();
|
|
711
|
-
g[f] = { ...d[f], ..._ }, t.messagesByConv[
|
|
711
|
+
g[f] = { ...d[f], ..._ }, t.messagesByConv[h] = g;
|
|
712
712
|
}
|
|
713
|
-
function se(
|
|
714
|
-
const _ = t.conversations.findIndex((f) => f.id ===
|
|
713
|
+
function se(h, m) {
|
|
714
|
+
const _ = t.conversations.findIndex((f) => f.id === h);
|
|
715
715
|
if (_ === -1) return;
|
|
716
716
|
const d = t.conversations[_];
|
|
717
|
-
if (
|
|
717
|
+
if (m && (!d.last_message_at || m > d.last_message_at)) {
|
|
718
718
|
const f = t.conversations.slice();
|
|
719
|
-
f[_] = { ...d, last_message_at:
|
|
719
|
+
f[_] = { ...d, last_message_at: m }, f.sort(
|
|
720
720
|
(g, y) => (y.last_message_at || "").localeCompare(g.last_message_at || "")
|
|
721
721
|
), t.conversations = f;
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
-
function ce(
|
|
725
|
-
return (
|
|
724
|
+
function ce(h, m) {
|
|
725
|
+
return (h.created_at || "").localeCompare(m.created_at || "");
|
|
726
726
|
}
|
|
727
|
-
function
|
|
728
|
-
if (!
|
|
729
|
-
const
|
|
730
|
-
for (const [d, f] of Object.entries(
|
|
731
|
-
f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (
|
|
732
|
-
return Object.keys(_).length && (
|
|
727
|
+
function me(h) {
|
|
728
|
+
if (!h || typeof h != "object") return null;
|
|
729
|
+
const m = {}, _ = {};
|
|
730
|
+
for (const [d, f] of Object.entries(h))
|
|
731
|
+
f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[d] = f);
|
|
732
|
+
return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
|
|
733
733
|
}
|
|
734
|
-
function de(
|
|
735
|
-
const
|
|
734
|
+
function de(h) {
|
|
735
|
+
const m = t.messagesByConv[h] || [];
|
|
736
736
|
let _ = "";
|
|
737
|
-
for (const g of
|
|
737
|
+
for (const g of m)
|
|
738
738
|
g != null && g.created_at && g.created_at > _ && (_ = g.created_at);
|
|
739
739
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
740
740
|
return !_ || d > _ ? d : new Date(Date.parse(_) + 1).toISOString();
|
|
@@ -747,13 +747,13 @@ function Qe(e) {
|
|
|
747
747
|
createConversation: a,
|
|
748
748
|
openConversation: p,
|
|
749
749
|
loadMore: C,
|
|
750
|
-
fetchSinceLast:
|
|
750
|
+
fetchSinceLast: R,
|
|
751
751
|
patchConversation: x,
|
|
752
752
|
markConversationRead: A,
|
|
753
753
|
send: H,
|
|
754
754
|
clickCallback: M,
|
|
755
755
|
signAttachment: F,
|
|
756
|
-
submitFeedback:
|
|
756
|
+
submitFeedback: z,
|
|
757
757
|
getPendingApproval: W,
|
|
758
758
|
getActionInFlight: ee,
|
|
759
759
|
getLatestSuggestions: te,
|
|
@@ -762,7 +762,7 @@ function Qe(e) {
|
|
|
762
762
|
setPanelOpen: e.setPanelOpen
|
|
763
763
|
};
|
|
764
764
|
}
|
|
765
|
-
const
|
|
765
|
+
const D = {
|
|
766
766
|
w: "#ffffff",
|
|
767
767
|
g50: "#F9F9F7",
|
|
768
768
|
g100: "#F2F1EE",
|
|
@@ -792,7 +792,7 @@ function ve(e = "") {
|
|
|
792
792
|
function ye(e = "") {
|
|
793
793
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function Le(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
|
|
796
796
|
return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
|
|
797
797
|
}
|
|
798
798
|
const Xe = `
|
|
@@ -801,21 +801,21 @@ const Xe = `
|
|
|
801
801
|
.wm-root {
|
|
802
802
|
--wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
803
803
|
--wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
804
|
-
--wm-w: ${
|
|
805
|
-
--wm-g50: ${
|
|
806
|
-
--wm-g100: ${
|
|
807
|
-
--wm-g150: ${
|
|
808
|
-
--wm-g200: ${
|
|
809
|
-
--wm-g300: ${
|
|
810
|
-
--wm-g400: ${
|
|
811
|
-
--wm-g500: ${
|
|
812
|
-
--wm-g700: ${
|
|
813
|
-
--wm-g900: ${
|
|
814
|
-
--wm-a: ${
|
|
815
|
-
--wm-al: ${
|
|
816
|
-
--wm-green: ${
|
|
817
|
-
--wm-red: ${
|
|
818
|
-
--wm-redBg: ${
|
|
804
|
+
--wm-w: ${D.w};
|
|
805
|
+
--wm-g50: ${D.g50};
|
|
806
|
+
--wm-g100: ${D.g100};
|
|
807
|
+
--wm-g150: ${D.g150};
|
|
808
|
+
--wm-g200: ${D.g200};
|
|
809
|
+
--wm-g300: ${D.g300};
|
|
810
|
+
--wm-g400: ${D.g400};
|
|
811
|
+
--wm-g500: ${D.g500};
|
|
812
|
+
--wm-g700: ${D.g700};
|
|
813
|
+
--wm-g900: ${D.g900};
|
|
814
|
+
--wm-a: ${D.accent};
|
|
815
|
+
--wm-al: ${D.accentLight};
|
|
816
|
+
--wm-green: ${D.green};
|
|
817
|
+
--wm-red: ${D.red};
|
|
818
|
+
--wm-redBg: ${D.redBg};
|
|
819
819
|
--wm-sh1: 0 1px 3px rgba(0,0,0,.06);
|
|
820
820
|
--wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
|
|
821
821
|
--wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
|
|
@@ -1091,7 +1091,7 @@ function we(e) {
|
|
|
1091
1091
|
function oe(e) {
|
|
1092
1092
|
return Ce[we(e)] || Ce[ie];
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function P(e) {
|
|
1095
1095
|
const t = we(e), n = ge[t] || ge[ie], i = ge[ie];
|
|
1096
1096
|
return function(s, a) {
|
|
1097
1097
|
let l = n[s];
|
|
@@ -1106,17 +1106,17 @@ function Ae(e, t) {
|
|
|
1106
1106
|
const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
|
|
1107
1107
|
return (n == null ? void 0 : n.label) || t;
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function Ie(e, t, n) {
|
|
1110
1110
|
return Array.isArray(t) ? t.map((i) => Ae(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ae(e, String(t));
|
|
1111
1111
|
}
|
|
1112
|
-
function tt(e, t, n =
|
|
1112
|
+
function tt(e, t, n = P()) {
|
|
1113
1113
|
if (!e || !t) return "";
|
|
1114
1114
|
const i = Array.isArray(e.fields) ? e.fields : [], r = [];
|
|
1115
1115
|
for (const s of i) {
|
|
1116
1116
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1117
1117
|
const a = t[s.key];
|
|
1118
1118
|
if (a == null || a === "") continue;
|
|
1119
|
-
const l =
|
|
1119
|
+
const l = Ie(s, a, n);
|
|
1120
1120
|
l && r.push(`${s.label} :
|
|
1121
1121
|
${l}`);
|
|
1122
1122
|
}
|
|
@@ -1124,13 +1124,13 @@ ${l}`);
|
|
|
1124
1124
|
|
|
1125
1125
|
`);
|
|
1126
1126
|
}
|
|
1127
|
-
function nt(e, t, n =
|
|
1127
|
+
function nt(e, t, n = P()) {
|
|
1128
1128
|
const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1129
1129
|
for (const s of r) {
|
|
1130
1130
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1131
1131
|
const a = t == null ? void 0 : t[s.key];
|
|
1132
1132
|
if (a == null || a === "") continue;
|
|
1133
|
-
const l =
|
|
1133
|
+
const l = Ie(s, a, n);
|
|
1134
1134
|
if (!l) continue;
|
|
1135
1135
|
const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
|
|
1136
1136
|
`));
|
|
@@ -1194,7 +1194,7 @@ function it(e, t, n, i) {
|
|
|
1194
1194
|
return r.join(`
|
|
1195
1195
|
`);
|
|
1196
1196
|
}
|
|
1197
|
-
function at(e, t, n =
|
|
1197
|
+
function at(e, t, n = P(), i) {
|
|
1198
1198
|
if (!e) return;
|
|
1199
1199
|
const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
|
|
1200
1200
|
try {
|
|
@@ -1362,7 +1362,7 @@ const ot = {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
|
-
}, lt = 450, ct = 50, dt = 900, ut = 12e3,
|
|
1365
|
+
}, lt = 450, ct = 50, dt = 900, ut = 12e3, ht = 300, mt = {
|
|
1366
1366
|
data() {
|
|
1367
1367
|
return {
|
|
1368
1368
|
// Map: messageId → ms timestamp once shown.
|
|
@@ -1475,7 +1475,7 @@ const ot = {
|
|
|
1475
1475
|
Math.max(dt, i * ct)
|
|
1476
1476
|
), a = Math.max(
|
|
1477
1477
|
n + lt,
|
|
1478
|
-
this.nextRevealAt +
|
|
1478
|
+
this.nextRevealAt + ht
|
|
1479
1479
|
) + r;
|
|
1480
1480
|
this.nextRevealAt = a;
|
|
1481
1481
|
const l = Math.max(0, a - n), p = e.id, C = setTimeout(() => {
|
|
@@ -1619,7 +1619,7 @@ function pt(e) {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
return null;
|
|
1621
1621
|
}
|
|
1622
|
-
const
|
|
1622
|
+
const B = (e, t) => {
|
|
1623
1623
|
const n = e.__vccOpts || e;
|
|
1624
1624
|
for (const [i, r] of t)
|
|
1625
1625
|
n[i] = r;
|
|
@@ -1648,7 +1648,7 @@ const R = (e, t) => {
|
|
|
1648
1648
|
function wt(e, t, n, i, r, s) {
|
|
1649
1649
|
return c(), u("div", {
|
|
1650
1650
|
class: O(["wm-huav", { "wm-huav--tail": n.tail }]),
|
|
1651
|
-
style:
|
|
1651
|
+
style: q({
|
|
1652
1652
|
width: n.size + "px",
|
|
1653
1653
|
height: n.size + "px",
|
|
1654
1654
|
"--wm-avr": Math.round(n.size * 0.32) + "px",
|
|
@@ -1661,17 +1661,17 @@ function wt(e, t, n, i, r, s) {
|
|
|
1661
1661
|
alt: n.name || ""
|
|
1662
1662
|
}, null, 8, yt)) : (c(), u("span", {
|
|
1663
1663
|
key: 1,
|
|
1664
|
-
style:
|
|
1664
|
+
style: q({ fontSize: n.size * 0.36 + "px" })
|
|
1665
1665
|
}, v(s.initials), 5))
|
|
1666
1666
|
], 6);
|
|
1667
1667
|
}
|
|
1668
|
-
const
|
|
1668
|
+
const Ee = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
|
|
1669
1669
|
name: "WmLauncher",
|
|
1670
|
-
components: { HumanAvatar:
|
|
1670
|
+
components: { HumanAvatar: Ee },
|
|
1671
1671
|
inject: {
|
|
1672
1672
|
// Translator shared by the Messenger shell; French fallback when
|
|
1673
1673
|
// the component is used standalone.
|
|
1674
|
-
t: { default: () =>
|
|
1674
|
+
t: { default: () => P() }
|
|
1675
1675
|
},
|
|
1676
1676
|
props: {
|
|
1677
1677
|
// Nombre de conversations non lues — pilote la pastille.
|
|
@@ -1691,20 +1691,20 @@ const Le = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
|
|
|
1691
1691
|
return this.peeks.slice(0, bt).reverse();
|
|
1692
1692
|
}
|
|
1693
1693
|
}
|
|
1694
|
-
}, 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" },
|
|
1694
|
+
}, 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" }, Lt = { class: "wm-peek__name" }, It = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, Rt = ["onClick"], Bt = ["aria-label"], Nt = ["aria-label"];
|
|
1695
1695
|
function Ft(e, t, n, i, r, s) {
|
|
1696
|
-
const a =
|
|
1696
|
+
const a = E("HumanAvatar");
|
|
1697
1697
|
return c(), u("div", Ct, [
|
|
1698
1698
|
V(Ue, { name: "wm-peek" }, {
|
|
1699
|
-
default:
|
|
1699
|
+
default: Pe(() => [
|
|
1700
1700
|
s.visiblePeeks.length ? (c(), u("div", {
|
|
1701
1701
|
key: 0,
|
|
1702
1702
|
class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1703
1703
|
}, [
|
|
1704
|
-
(c(!0), u(
|
|
1704
|
+
(c(!0), u(I, null, U(s.visiblePeeks, (l, p) => (c(), u("div", {
|
|
1705
1705
|
key: l.convId,
|
|
1706
1706
|
class: "wm-peek",
|
|
1707
|
-
style:
|
|
1707
|
+
style: q({
|
|
1708
1708
|
"--depth": s.visiblePeeks.length - 1 - p,
|
|
1709
1709
|
zIndex: p + 1
|
|
1710
1710
|
}),
|
|
@@ -1753,16 +1753,16 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1753
1753
|
]),
|
|
1754
1754
|
o("div", xt, [
|
|
1755
1755
|
o("div", Ot, [
|
|
1756
|
-
o("span",
|
|
1757
|
-
o("span",
|
|
1756
|
+
o("span", Lt, v(l.senderName || s.t("common.agent")), 1),
|
|
1757
|
+
o("span", It, v(s.t("launcher.repliedToYou")), 1)
|
|
1758
1758
|
]),
|
|
1759
|
-
o("p",
|
|
1759
|
+
o("p", Et, v(l.preview), 1)
|
|
1760
1760
|
]),
|
|
1761
1761
|
o("button", {
|
|
1762
1762
|
type: "button",
|
|
1763
1763
|
class: "wm-peek__open",
|
|
1764
1764
|
onClick: Y((C) => e.$emit("open", l.convId), ["stop"])
|
|
1765
|
-
}, v(s.t("common.open")), 9,
|
|
1765
|
+
}, v(s.t("common.open")), 9, Rt)
|
|
1766
1766
|
], 44, At))), 128))
|
|
1767
1767
|
], 2)) : w("", !0)
|
|
1768
1768
|
]),
|
|
@@ -1796,10 +1796,10 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1796
1796
|
count: n.unreadCount
|
|
1797
1797
|
})
|
|
1798
1798
|
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Nt)) : w("", !0)
|
|
1799
|
-
], 8,
|
|
1799
|
+
], 8, Bt)
|
|
1800
1800
|
]);
|
|
1801
1801
|
}
|
|
1802
|
-
const Ut = /* @__PURE__ */
|
|
1802
|
+
const Ut = /* @__PURE__ */ B(kt, [["render", Ft], ["__scopeId", "data-v-5193a529"]]), Pt = {
|
|
1803
1803
|
name: "WmAIAvatar",
|
|
1804
1804
|
props: {
|
|
1805
1805
|
size: { type: Number, default: 26 },
|
|
@@ -1828,27 +1828,27 @@ const Ut = /* @__PURE__ */ R(kt, [["render", Ft], ["__scopeId", "data-v-5193a529
|
|
|
1828
1828
|
return ve(this.name);
|
|
1829
1829
|
}
|
|
1830
1830
|
}
|
|
1831
|
-
},
|
|
1831
|
+
}, jt = {
|
|
1832
1832
|
key: 0,
|
|
1833
1833
|
class: "wm-aiav__pulse"
|
|
1834
|
-
},
|
|
1835
|
-
function
|
|
1834
|
+
}, Dt = ["src", "alt"], zt = ["width", "height"];
|
|
1835
|
+
function qt(e, t, n, i, r, s) {
|
|
1836
1836
|
return c(), u("div", {
|
|
1837
1837
|
class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
1838
|
-
style:
|
|
1838
|
+
style: q({
|
|
1839
1839
|
width: n.size + "px",
|
|
1840
1840
|
height: n.size + "px",
|
|
1841
1841
|
"--wm-avr": n.size * 0.32 + "px"
|
|
1842
1842
|
})
|
|
1843
1843
|
}, [
|
|
1844
|
-
n.pulse ? (c(), u("div",
|
|
1844
|
+
n.pulse ? (c(), u("div", jt)) : w("", !0),
|
|
1845
1845
|
o("div", {
|
|
1846
1846
|
class: O(["wm-aiav__inner", {
|
|
1847
1847
|
"wm-aiav__inner--glow": n.pulse,
|
|
1848
1848
|
"wm-aiav__inner--img": !!n.imageUrl,
|
|
1849
1849
|
"wm-aiav__inner--initials": !n.imageUrl && !!s.initials
|
|
1850
1850
|
}]),
|
|
1851
|
-
style:
|
|
1851
|
+
style: q(
|
|
1852
1852
|
!n.imageUrl && s.initials ? { background: s.bgColor } : null
|
|
1853
1853
|
)
|
|
1854
1854
|
}, [
|
|
@@ -1856,9 +1856,9 @@ function zt(e, t, n, i, r, s) {
|
|
|
1856
1856
|
key: 0,
|
|
1857
1857
|
src: n.imageUrl,
|
|
1858
1858
|
alt: n.name || ""
|
|
1859
|
-
}, null, 8,
|
|
1859
|
+
}, null, 8, Dt)) : s.initials ? (c(), u("span", {
|
|
1860
1860
|
key: 1,
|
|
1861
|
-
style:
|
|
1861
|
+
style: q({ fontSize: n.size * 0.36 + "px" })
|
|
1862
1862
|
}, v(s.initials), 5)) : (c(), u("svg", {
|
|
1863
1863
|
key: 2,
|
|
1864
1864
|
width: n.size * 0.5,
|
|
@@ -1886,11 +1886,11 @@ function zt(e, t, n, i, r, s) {
|
|
|
1886
1886
|
fill: "white",
|
|
1887
1887
|
opacity: "0.38"
|
|
1888
1888
|
}, null, -1)
|
|
1889
|
-
])], 8,
|
|
1889
|
+
])], 8, zt))
|
|
1890
1890
|
], 6)
|
|
1891
1891
|
], 6);
|
|
1892
1892
|
}
|
|
1893
|
-
const le = /* @__PURE__ */
|
|
1893
|
+
const le = /* @__PURE__ */ B(Pt, [["render", qt], ["__scopeId", "data-v-6f7f685d"]]), Ht = {
|
|
1894
1894
|
name: "WmTeamAvatars",
|
|
1895
1895
|
props: {
|
|
1896
1896
|
members: { type: Array, default: () => [] },
|
|
@@ -1923,12 +1923,12 @@ function Gt(e, t, n, i, r, s) {
|
|
|
1923
1923
|
return s.visible ? (c(), u("div", $t, [
|
|
1924
1924
|
o("div", {
|
|
1925
1925
|
class: "wm-team__stack",
|
|
1926
|
-
style:
|
|
1926
|
+
style: q({ width: s.stackWidth + "px" })
|
|
1927
1927
|
}, [
|
|
1928
|
-
(c(!0), u(
|
|
1928
|
+
(c(!0), u(I, null, U(n.members.slice(0, 3), (a, l) => (c(), u("div", {
|
|
1929
1929
|
key: l,
|
|
1930
1930
|
class: "wm-team__pill",
|
|
1931
|
-
style:
|
|
1931
|
+
style: q({
|
|
1932
1932
|
left: l * 13 + "px",
|
|
1933
1933
|
zIndex: 3 - l,
|
|
1934
1934
|
background: s.colorFor(a)
|
|
@@ -1944,13 +1944,13 @@ function Gt(e, t, n, i, r, s) {
|
|
|
1944
1944
|
n.responseLabel ? (c(), u("span", Wt, v(n.responseLabel), 1)) : w("", !0)
|
|
1945
1945
|
])) : w("", !0);
|
|
1946
1946
|
}
|
|
1947
|
-
const Yt = /* @__PURE__ */
|
|
1947
|
+
const Yt = /* @__PURE__ */ B(Ht, [["render", Gt], ["__scopeId", "data-v-e49a9063"]]), Jt = {
|
|
1948
1948
|
name: "WmHeader",
|
|
1949
1949
|
components: { AIAvatar: le, TeamAvatars: Yt },
|
|
1950
1950
|
inject: {
|
|
1951
1951
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
1952
1952
|
// translator when the component is used standalone (no provider).
|
|
1953
|
-
t: { default: () =>
|
|
1953
|
+
t: { default: () => P() }
|
|
1954
1954
|
},
|
|
1955
1955
|
props: {
|
|
1956
1956
|
title: { type: String, default: "Nouvelle conversation" },
|
|
@@ -1991,7 +1991,7 @@ const Yt = /* @__PURE__ */ R(Ht, [["render", Gt], ["__scopeId", "data-v-e49a9063
|
|
|
1991
1991
|
class: "wm-header__fill"
|
|
1992
1992
|
}, rn = { class: "wm-header__actions" }, an = ["aria-label", "title"], on = ["aria-label", "title"];
|
|
1993
1993
|
function ln(e, t, n, i, r, s) {
|
|
1994
|
-
const a =
|
|
1994
|
+
const a = E("AIAvatar"), l = E("TeamAvatars");
|
|
1995
1995
|
return c(), u("div", Qt, [
|
|
1996
1996
|
n.showBack ? (c(), u("button", {
|
|
1997
1997
|
key: 0,
|
|
@@ -2014,7 +2014,7 @@ function ln(e, t, n, i, r, s) {
|
|
|
2014
2014
|
o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2015
2015
|
], -1)
|
|
2016
2016
|
])], 8, Xt)) : (c(), u("div", Zt)),
|
|
2017
|
-
n.showIdentity ? (c(), u(
|
|
2017
|
+
n.showIdentity ? (c(), u(I, { key: 2 }, [
|
|
2018
2018
|
o("div", en, [
|
|
2019
2019
|
V(a, {
|
|
2020
2020
|
size: 30,
|
|
@@ -2089,8 +2089,8 @@ function ln(e, t, n, i, r, s) {
|
|
|
2089
2089
|
])
|
|
2090
2090
|
]);
|
|
2091
2091
|
}
|
|
2092
|
-
const cn = /* @__PURE__ */
|
|
2093
|
-
function
|
|
2092
|
+
const cn = /* @__PURE__ */ B(Jt, [["render", ln], ["__scopeId", "data-v-925c9e94"]]);
|
|
2093
|
+
function Re(e) {
|
|
2094
2094
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2095
2095
|
}
|
|
2096
2096
|
function dn(e) {
|
|
@@ -2108,11 +2108,11 @@ function re(e) {
|
|
|
2108
2108
|
function un(e) {
|
|
2109
2109
|
if (!e) return "";
|
|
2110
2110
|
const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
|
|
2111
|
-
return re(
|
|
2111
|
+
return re(Re(t));
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function hn(e) {
|
|
2114
2114
|
if (!e) return "";
|
|
2115
|
-
const t =
|
|
2115
|
+
const t = Re(e).split(`
|
|
2116
2116
|
`), n = [];
|
|
2117
2117
|
let i = 0;
|
|
2118
2118
|
for (; i < t.length; ) {
|
|
@@ -2151,10 +2151,10 @@ function mn(e) {
|
|
|
2151
2151
|
if (!A) break;
|
|
2152
2152
|
k.push(A[1]), i++;
|
|
2153
2153
|
}
|
|
2154
|
-
const x = k.map((A) => `<li>${re(A)}</li>`).join(""),
|
|
2154
|
+
const x = k.map((A) => `<li>${re(A)}</li>`).join(""), R = C !== 1 ? ` start="${C}"` : "";
|
|
2155
2155
|
n.push({
|
|
2156
2156
|
type: "block",
|
|
2157
|
-
html: `<ol class="wm-md-ol"${
|
|
2157
|
+
html: `<ol class="wm-md-ol"${R}>${x}</ol>`
|
|
2158
2158
|
});
|
|
2159
2159
|
continue;
|
|
2160
2160
|
}
|
|
@@ -2185,13 +2185,13 @@ const Te = {
|
|
|
2185
2185
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
2186
2186
|
chat: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z",
|
|
2187
2187
|
link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
|
|
2188
|
-
},
|
|
2188
|
+
}, mn = {
|
|
2189
2189
|
name: "WmOnboarding",
|
|
2190
2190
|
components: { AIAvatar: le },
|
|
2191
2191
|
inject: {
|
|
2192
2192
|
// Translator + resolved-language getter shared by the Messenger
|
|
2193
2193
|
// shell. Fall back to French wording when used standalone.
|
|
2194
|
-
t: { default: () =>
|
|
2194
|
+
t: { default: () => P() },
|
|
2195
2195
|
wmLocale: { default: () => () => "fr" }
|
|
2196
2196
|
},
|
|
2197
2197
|
props: {
|
|
@@ -2270,18 +2270,18 @@ const Te = {
|
|
|
2270
2270
|
}, Mn = ["d"], Tn = { class: "wm-onb__card-body" }, xn = { class: "wm-onb__card-title" }, On = {
|
|
2271
2271
|
key: 0,
|
|
2272
2272
|
class: "wm-onb__card-sub"
|
|
2273
|
-
},
|
|
2273
|
+
}, Ln = {
|
|
2274
2274
|
key: 1,
|
|
2275
2275
|
class: "wm-onb__section"
|
|
2276
|
-
},
|
|
2276
|
+
}, In = { class: "wm-onb__section-title" }, En = { class: "wm-onb__search" }, Rn = ["placeholder", "aria-label"], Bn = { class: "wm-onb__list" }, Nn = ["onClick"], Fn = ["aria-label"], Un = { class: "wm-onb__thread-body" }, Pn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Dn = { class: "wm-onb__thread-meta" }, zn = {
|
|
2277
2277
|
key: 0,
|
|
2278
2278
|
class: "wm-onb__thread-time"
|
|
2279
|
-
},
|
|
2279
|
+
}, qn = {
|
|
2280
2280
|
key: 0,
|
|
2281
2281
|
class: "wm-onb__empty"
|
|
2282
2282
|
};
|
|
2283
2283
|
function Hn(e, t, n, i, r, s) {
|
|
2284
|
-
const a =
|
|
2284
|
+
const a = E("AIAvatar");
|
|
2285
2285
|
return c(), u("div", fn, [
|
|
2286
2286
|
o("div", _n, [
|
|
2287
2287
|
t[2] || (t[2] = o("svg", {
|
|
@@ -2357,7 +2357,7 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2357
2357
|
o("div", {
|
|
2358
2358
|
class: O(s.quickLinksLayout)
|
|
2359
2359
|
}, [
|
|
2360
|
-
(c(!0), u(
|
|
2360
|
+
(c(!0), u(I, null, U(n.quickLinks, (l, p) => (c(), u("button", {
|
|
2361
2361
|
key: p,
|
|
2362
2362
|
type: "button",
|
|
2363
2363
|
class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
|
|
@@ -2377,9 +2377,9 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2377
2377
|
], 10, Cn))), 128))
|
|
2378
2378
|
], 2)
|
|
2379
2379
|
])) : w("", !0),
|
|
2380
|
-
n.openThreads.length ? (c(), u("div",
|
|
2381
|
-
o("div",
|
|
2382
|
-
o("div",
|
|
2380
|
+
n.openThreads.length ? (c(), u("div", Ln, [
|
|
2381
|
+
o("div", In, v(s.t("onboarding.recentConversations")), 1),
|
|
2382
|
+
o("div", En, [
|
|
2383
2383
|
t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
|
|
2384
2384
|
o("svg", {
|
|
2385
2385
|
width: "12",
|
|
@@ -2400,12 +2400,12 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2400
2400
|
type: "text",
|
|
2401
2401
|
placeholder: s.t("onboarding.search"),
|
|
2402
2402
|
"aria-label": s.t("onboarding.search")
|
|
2403
|
-
}, null, 8,
|
|
2403
|
+
}, null, 8, Rn), [
|
|
2404
2404
|
[X, r.query]
|
|
2405
2405
|
])
|
|
2406
2406
|
]),
|
|
2407
|
-
o("div",
|
|
2408
|
-
(c(!0), u(
|
|
2407
|
+
o("div", Bn, [
|
|
2408
|
+
(c(!0), u(I, null, U(s.filteredThreads, (l) => (c(), u("button", {
|
|
2409
2409
|
key: l.id,
|
|
2410
2410
|
type: "button",
|
|
2411
2411
|
class: "wm-onb__thread",
|
|
@@ -2434,14 +2434,14 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2434
2434
|
}, null, 8, Fn)) : w("", !0)
|
|
2435
2435
|
], 2),
|
|
2436
2436
|
o("span", Un, [
|
|
2437
|
-
o("span",
|
|
2437
|
+
o("span", Pn, v(l.title), 1),
|
|
2438
2438
|
o("span", {
|
|
2439
2439
|
class: "wm-onb__thread-preview",
|
|
2440
2440
|
innerHTML: s.renderPreview(l.preview)
|
|
2441
|
-
}, null, 8,
|
|
2441
|
+
}, null, 8, jn)
|
|
2442
2442
|
]),
|
|
2443
|
-
o("span",
|
|
2444
|
-
s.formatTs(l._ts) ? (c(), u("span",
|
|
2443
|
+
o("span", Dn, [
|
|
2444
|
+
s.formatTs(l._ts) ? (c(), u("span", zn, v(s.formatTs(l._ts)), 1)) : w("", !0),
|
|
2445
2445
|
t[6] || (t[6] = o("svg", {
|
|
2446
2446
|
width: "14",
|
|
2447
2447
|
height: "14",
|
|
@@ -2458,12 +2458,12 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2458
2458
|
], -1))
|
|
2459
2459
|
])
|
|
2460
2460
|
], 8, Nn))), 128)),
|
|
2461
|
-
s.filteredThreads.length ? w("", !0) : (c(), u("div",
|
|
2461
|
+
s.filteredThreads.length ? w("", !0) : (c(), u("div", qn, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2462
2462
|
])
|
|
2463
2463
|
])) : w("", !0)
|
|
2464
2464
|
]);
|
|
2465
2465
|
}
|
|
2466
|
-
const $n = /* @__PURE__ */
|
|
2466
|
+
const $n = /* @__PURE__ */ B(mn, [["render", Hn], ["__scopeId", "data-v-28c0780b"]]);
|
|
2467
2467
|
function Vn(e) {
|
|
2468
2468
|
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();
|
|
2469
2469
|
}
|
|
@@ -2558,7 +2558,7 @@ function ts(e, t, n, i, r, s) {
|
|
|
2558
2558
|
]),
|
|
2559
2559
|
o("span", Xn, [
|
|
2560
2560
|
o("span", Zn, v(n.label), 1),
|
|
2561
|
-
s.detailText ? (c(), u(
|
|
2561
|
+
s.detailText ? (c(), u(I, { key: 0 }, [
|
|
2562
2562
|
t[4] || (t[4] = o("span", {
|
|
2563
2563
|
class: "wm-result__sep",
|
|
2564
2564
|
"aria-hidden": "true"
|
|
@@ -2568,12 +2568,12 @@ function ts(e, t, n, i, r, s) {
|
|
|
2568
2568
|
])
|
|
2569
2569
|
], 2);
|
|
2570
2570
|
}
|
|
2571
|
-
const ns = /* @__PURE__ */
|
|
2571
|
+
const ns = /* @__PURE__ */ B(Kn, [["render", ts], ["__scopeId", "data-v-7284acd0"]]), ss = {
|
|
2572
2572
|
name: "WmArtifactFormResponse",
|
|
2573
2573
|
inject: {
|
|
2574
2574
|
// Translator shared by the Messenger shell; French fallback when
|
|
2575
2575
|
// the component is used standalone.
|
|
2576
|
-
t: { default: () =>
|
|
2576
|
+
t: { default: () => P() }
|
|
2577
2577
|
},
|
|
2578
2578
|
props: {
|
|
2579
2579
|
data: { type: Object, required: !0 }
|
|
@@ -2607,7 +2607,7 @@ function ds(e, t, n, i, r, s) {
|
|
|
2607
2607
|
])
|
|
2608
2608
|
]),
|
|
2609
2609
|
o("div", ls, [
|
|
2610
|
-
(c(!0), u(
|
|
2610
|
+
(c(!0), u(I, null, U(s.fields, (a, l) => (c(), u("div", {
|
|
2611
2611
|
key: l,
|
|
2612
2612
|
class: "wm-art__field"
|
|
2613
2613
|
}, [
|
|
@@ -2622,7 +2622,7 @@ function ds(e, t, n, i, r, s) {
|
|
|
2622
2622
|
])
|
|
2623
2623
|
]);
|
|
2624
2624
|
}
|
|
2625
|
-
const us = /* @__PURE__ */
|
|
2625
|
+
const us = /* @__PURE__ */ B(ss, [["render", ds], ["__scopeId", "data-v-713aecf1"]]), hs = {
|
|
2626
2626
|
name: "WmArtifactInfoCard",
|
|
2627
2627
|
props: {
|
|
2628
2628
|
data: { type: Object, required: !0 }
|
|
@@ -2637,7 +2637,7 @@ const us = /* @__PURE__ */ R(ss, [["render", ds], ["__scopeId", "data-v-713aecf1
|
|
|
2637
2637
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
2638
2638
|
}
|
|
2639
2639
|
}
|
|
2640
|
-
},
|
|
2640
|
+
}, ms = { class: "wm-art wm-art--infoCard" }, fs = {
|
|
2641
2641
|
key: 0,
|
|
2642
2642
|
class: "wm-art__image"
|
|
2643
2643
|
}, _s = ["src", "alt"], gs = { class: "wm-art__head" }, ps = { class: "wm-art__headMain" }, vs = { class: "wm-art__title" }, ys = {
|
|
@@ -2651,7 +2651,7 @@ const us = /* @__PURE__ */ R(ss, [["render", ds], ["__scopeId", "data-v-713aecf1
|
|
|
2651
2651
|
class: "wm-art__text"
|
|
2652
2652
|
}, ks = { class: "wm-art__fieldLabel" };
|
|
2653
2653
|
function Cs(e, t, n, i, r, s) {
|
|
2654
|
-
return c(), u("div",
|
|
2654
|
+
return c(), u("div", ms, [
|
|
2655
2655
|
n.data.image_url ? (c(), u("figure", fs, [
|
|
2656
2656
|
o("img", {
|
|
2657
2657
|
src: n.data.image_url,
|
|
@@ -2674,7 +2674,7 @@ function Cs(e, t, n, i, r, s) {
|
|
|
2674
2674
|
]),
|
|
2675
2675
|
s.hasBody ? (c(), u("div", ws, [
|
|
2676
2676
|
n.data.body ? (c(), u("div", bs, v(n.data.body), 1)) : w("", !0),
|
|
2677
|
-
s.fields.length ? (c(!0), u(
|
|
2677
|
+
s.fields.length ? (c(!0), u(I, { key: 1 }, U(s.fields, (a, l) => (c(), u("div", {
|
|
2678
2678
|
key: l,
|
|
2679
2679
|
class: "wm-art__field"
|
|
2680
2680
|
}, [
|
|
@@ -2689,7 +2689,7 @@ function Cs(e, t, n, i, r, s) {
|
|
|
2689
2689
|
])) : w("", !0)
|
|
2690
2690
|
]);
|
|
2691
2691
|
}
|
|
2692
|
-
const As = /* @__PURE__ */
|
|
2692
|
+
const As = /* @__PURE__ */ B(hs, [["render", Cs], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
2693
2693
|
function Ss(e, t, n) {
|
|
2694
2694
|
if (!e) return "";
|
|
2695
2695
|
const i = new Date(e);
|
|
@@ -2709,7 +2709,7 @@ const Ms = {
|
|
|
2709
2709
|
inject: {
|
|
2710
2710
|
// Translator + resolved-language getter shared by the Messenger
|
|
2711
2711
|
// shell. Fall back to French wording when used standalone.
|
|
2712
|
-
t: { default: () =>
|
|
2712
|
+
t: { default: () => P() },
|
|
2713
2713
|
wmLocale: { default: () => () => "fr" }
|
|
2714
2714
|
},
|
|
2715
2715
|
props: {
|
|
@@ -2750,13 +2750,13 @@ const Ms = {
|
|
|
2750
2750
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
2751
2751
|
}
|
|
2752
2752
|
}
|
|
2753
|
-
}, Ts = { class: "wm-art wm-art--ticket" }, xs = { class: "wm-art__head wm-tk__head" }, Os = { class: "wm-art__title wm-tk__title" },
|
|
2753
|
+
}, Ts = { class: "wm-art wm-art--ticket" }, xs = { class: "wm-art__head wm-tk__head" }, Os = { class: "wm-art__title wm-tk__title" }, Ls = { class: "wm-tk__sub" }, Is = { class: "wm-tk__ref" }, Es = {
|
|
2754
2754
|
key: 0,
|
|
2755
2755
|
class: "wm-tk__text"
|
|
2756
|
-
},
|
|
2756
|
+
}, Rs = {
|
|
2757
2757
|
key: 0,
|
|
2758
2758
|
class: "wm-art__body"
|
|
2759
|
-
},
|
|
2759
|
+
}, Bs = { class: "wm-art__fieldLabel" }, Ns = ["data-level"], Fs = {
|
|
2760
2760
|
key: 1,
|
|
2761
2761
|
class: "wm-tk__date",
|
|
2762
2762
|
width: "12",
|
|
@@ -2772,12 +2772,12 @@ const Ms = {
|
|
|
2772
2772
|
key: 1,
|
|
2773
2773
|
class: "wm-art__footer wm-tk__footer"
|
|
2774
2774
|
};
|
|
2775
|
-
function
|
|
2775
|
+
function Ps(e, t, n, i, r, s) {
|
|
2776
2776
|
return c(), u("div", Ts, [
|
|
2777
2777
|
o("div", xs, [
|
|
2778
2778
|
o("div", Os, v(n.data.title), 1),
|
|
2779
|
-
o("div",
|
|
2780
|
-
o("div",
|
|
2779
|
+
o("div", Ls, [
|
|
2780
|
+
o("div", Is, [
|
|
2781
2781
|
t[0] || (t[0] = o("svg", {
|
|
2782
2782
|
width: "11",
|
|
2783
2783
|
height: "11",
|
|
@@ -2808,14 +2808,14 @@ function js(e, t, n, i, r, s) {
|
|
|
2808
2808
|
pe(" " + v(n.data.status.label), 1)
|
|
2809
2809
|
], 2)
|
|
2810
2810
|
]),
|
|
2811
|
-
n.data.body ? (c(), u("div",
|
|
2811
|
+
n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : w("", !0)
|
|
2812
2812
|
]),
|
|
2813
|
-
s.fields.length ? (c(), u("div",
|
|
2814
|
-
(c(!0), u(
|
|
2813
|
+
s.fields.length ? (c(), u("div", Rs, [
|
|
2814
|
+
(c(!0), u(I, null, U(s.fields, (a, l) => (c(), u("div", {
|
|
2815
2815
|
key: l,
|
|
2816
2816
|
class: "wm-art__field"
|
|
2817
2817
|
}, [
|
|
2818
|
-
o("div",
|
|
2818
|
+
o("div", Bs, v(a.label), 1),
|
|
2819
2819
|
o("div", {
|
|
2820
2820
|
class: O([
|
|
2821
2821
|
"wm-art__fieldValue",
|
|
@@ -2891,11 +2891,11 @@ function js(e, t, n, i, r, s) {
|
|
|
2891
2891
|
])) : w("", !0)
|
|
2892
2892
|
]);
|
|
2893
2893
|
}
|
|
2894
|
-
const
|
|
2894
|
+
const js = /* @__PURE__ */ B(Ms, [["render", Ps], ["__scopeId", "data-v-5f30c914"]]), Ds = {
|
|
2895
2895
|
form_response: us,
|
|
2896
2896
|
info_card: As,
|
|
2897
|
-
ticket:
|
|
2898
|
-
},
|
|
2897
|
+
ticket: js
|
|
2898
|
+
}, zs = {
|
|
2899
2899
|
name: "WmArtifactRenderer",
|
|
2900
2900
|
props: {
|
|
2901
2901
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -2906,23 +2906,23 @@ const Ds = /* @__PURE__ */ R(Ms, [["render", js], ["__scopeId", "data-v-5f30c914
|
|
|
2906
2906
|
component() {
|
|
2907
2907
|
var t;
|
|
2908
2908
|
const e = (t = this.artifact) == null ? void 0 : t.kind;
|
|
2909
|
-
return e &&
|
|
2909
|
+
return e && Ds[e] || null;
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
2912
|
};
|
|
2913
|
-
function
|
|
2914
|
-
return s.component ? (c(), N(
|
|
2913
|
+
function qs(e, t, n, i, r, s) {
|
|
2914
|
+
return s.component ? (c(), N(je(s.component), {
|
|
2915
2915
|
key: 0,
|
|
2916
2916
|
data: n.artifact.data
|
|
2917
2917
|
}, null, 8, ["data"])) : w("", !0);
|
|
2918
2918
|
}
|
|
2919
|
-
const Hs = /* @__PURE__ */
|
|
2919
|
+
const Hs = /* @__PURE__ */ B(zs, [["render", qs]]), $s = {
|
|
2920
2920
|
name: "WmAttachmentPreview",
|
|
2921
2921
|
inject: {
|
|
2922
2922
|
signAttachmentFn: { default: null },
|
|
2923
2923
|
// Translator shared by the Messenger shell; French fallback when
|
|
2924
2924
|
// the component is used standalone.
|
|
2925
|
-
t: { default: () =>
|
|
2925
|
+
t: { default: () => P() }
|
|
2926
2926
|
},
|
|
2927
2927
|
props: {
|
|
2928
2928
|
attachment: { type: Object, required: !0 }
|
|
@@ -3051,7 +3051,7 @@ function er(e, t, n, i, r, s) {
|
|
|
3051
3051
|
], 8, Ys))
|
|
3052
3052
|
], 2);
|
|
3053
3053
|
}
|
|
3054
|
-
const tr = /* @__PURE__ */
|
|
3054
|
+
const tr = /* @__PURE__ */ B($s, [["render", er], ["__scopeId", "data-v-0c877a62"]]), nr = {
|
|
3055
3055
|
name: "WmBubble",
|
|
3056
3056
|
props: {
|
|
3057
3057
|
role: { type: String, default: "ai" },
|
|
@@ -3060,7 +3060,7 @@ const tr = /* @__PURE__ */ R($s, [["render", er], ["__scopeId", "data-v-0c877a62
|
|
|
3060
3060
|
},
|
|
3061
3061
|
computed: {
|
|
3062
3062
|
rendered() {
|
|
3063
|
-
return
|
|
3063
|
+
return hn(this.text);
|
|
3064
3064
|
}
|
|
3065
3065
|
}
|
|
3066
3066
|
}, sr = ["innerHTML"];
|
|
@@ -3068,12 +3068,12 @@ function rr(e, t, n, i, r, s) {
|
|
|
3068
3068
|
return c(), u("div", {
|
|
3069
3069
|
class: O(["wm-bubble", "wm-bubble--" + n.role])
|
|
3070
3070
|
}, [
|
|
3071
|
-
|
|
3071
|
+
De(e.$slots, "default", {}, () => [
|
|
3072
3072
|
o("span", { innerHTML: s.rendered }, null, 8, sr)
|
|
3073
3073
|
], !0)
|
|
3074
3074
|
], 2);
|
|
3075
3075
|
}
|
|
3076
|
-
const ir = /* @__PURE__ */
|
|
3076
|
+
const ir = /* @__PURE__ */ B(nr, [["render", rr], ["__scopeId", "data-v-7ab13147"]]), ar = { name: "WmTyping" }, or = { class: "wm-typing" };
|
|
3077
3077
|
function lr(e, t, n, i, r, s) {
|
|
3078
3078
|
return c(), u("div", or, [...t[0] || (t[0] = [
|
|
3079
3079
|
o("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
@@ -3081,7 +3081,7 @@ function lr(e, t, n, i, r, s) {
|
|
|
3081
3081
|
o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3082
3082
|
])]);
|
|
3083
3083
|
}
|
|
3084
|
-
const cr = /* @__PURE__ */
|
|
3084
|
+
const cr = /* @__PURE__ */ B(ar, [["render", lr], ["__scopeId", "data-v-df2447fd"]]);
|
|
3085
3085
|
function Q(e) {
|
|
3086
3086
|
return e ? e.client_msg_id || e.id : "";
|
|
3087
3087
|
}
|
|
@@ -3092,11 +3092,11 @@ const dr = {
|
|
|
3092
3092
|
resolved: "system.resolved",
|
|
3093
3093
|
reopened: "system.reopened",
|
|
3094
3094
|
idle: "system.idle"
|
|
3095
|
-
}, ur = 80,
|
|
3095
|
+
}, ur = 80, hr = 200, mr = {
|
|
3096
3096
|
name: "WmMessageList",
|
|
3097
3097
|
components: {
|
|
3098
3098
|
AIAvatar: le,
|
|
3099
|
-
HumanAvatar:
|
|
3099
|
+
HumanAvatar: Ee,
|
|
3100
3100
|
Bubble: ir,
|
|
3101
3101
|
Typing: cr,
|
|
3102
3102
|
ActionResult: ns,
|
|
@@ -3106,7 +3106,7 @@ const dr = {
|
|
|
3106
3106
|
inject: {
|
|
3107
3107
|
// Translator + resolved-language getter shared by the Messenger
|
|
3108
3108
|
// shell. Fall back to French wording when used standalone.
|
|
3109
|
-
t: { default: () =>
|
|
3109
|
+
t: { default: () => P() },
|
|
3110
3110
|
wmLocale: { default: () => () => "fr" }
|
|
3111
3111
|
},
|
|
3112
3112
|
props: {
|
|
@@ -3285,7 +3285,7 @@ const dr = {
|
|
|
3285
3285
|
},
|
|
3286
3286
|
onScroll() {
|
|
3287
3287
|
const e = this.$refs.scrollEl;
|
|
3288
|
-
e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <=
|
|
3288
|
+
e && (this.loadingMore || !this.hasMore || this._pendingLoadMore || e.scrollTop <= hr && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
3289
3289
|
},
|
|
3290
3290
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3291
3291
|
//
|
|
@@ -3486,9 +3486,9 @@ const dr = {
|
|
|
3486
3486
|
// doit garder son arrondi.
|
|
3487
3487
|
cornersFor(e, t) {
|
|
3488
3488
|
var Z, ee, te;
|
|
3489
|
-
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)],
|
|
3490
|
-
let
|
|
3491
|
-
return a ? (C && (F = p), (k || !s) && (
|
|
3489
|
+
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], R = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = ($, ne, G) => $ != null && x != null ? $ + H >= x : ne === G || ne === "card" && G === "bubble";
|
|
3490
|
+
let j = l, F = l, z = l, W = l;
|
|
3491
|
+
return a ? (C && (F = p), (k || !s) && (z = p), C && M(R, C, i == null ? void 0 : i.top) && (j = p), k && M(A, k, i == null ? void 0 : i.bottom) && (W = p)) : (C && (j = p), (k || !s) && (W = p), C && M(R, C, i == null ? void 0 : i.top) && (F = p), k && M(A, k, i == null ? void 0 : i.bottom) && (z = p)), { tl: j, tr: F, br: z, bl: W };
|
|
3492
3492
|
},
|
|
3493
3493
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3494
3494
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3554,7 +3554,7 @@ const dr = {
|
|
|
3554
3554
|
const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
|
|
3555
3555
|
if (!(n != null && n.created_at)) return "";
|
|
3556
3556
|
try {
|
|
3557
|
-
return
|
|
3557
|
+
return Le(
|
|
3558
3558
|
new Date(n.created_at),
|
|
3559
3559
|
oe(this.wmLocale())
|
|
3560
3560
|
);
|
|
@@ -3638,9 +3638,9 @@ const dr = {
|
|
|
3638
3638
|
}, xr = { key: 2 }, Or = {
|
|
3639
3639
|
key: 3,
|
|
3640
3640
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3641
|
-
},
|
|
3642
|
-
function
|
|
3643
|
-
const a =
|
|
3641
|
+
}, Lr = { class: "wm-list__avatarSlot" };
|
|
3642
|
+
function Ir(e, t, n, i, r, s) {
|
|
3643
|
+
const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), C = E("ArtifactRenderer"), k = E("Bubble"), x = E("AttachmentPreview"), R = E("Typing");
|
|
3644
3644
|
return c(), u("div", {
|
|
3645
3645
|
ref: "scrollEl",
|
|
3646
3646
|
class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
@@ -3658,7 +3658,7 @@ function Er(e, t, n, i, r, s) {
|
|
|
3658
3658
|
o("span", vr, v(n.dateLabel), 1),
|
|
3659
3659
|
t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3660
3660
|
])) : w("", !0),
|
|
3661
|
-
(c(!0), u(
|
|
3661
|
+
(c(!0), u(I, null, U(s.groups, (A, H) => (c(), u(I, {
|
|
3662
3662
|
key: A.key
|
|
3663
3663
|
}, [
|
|
3664
3664
|
A.key === s.unreadGroupKey ? (c(), u("div", yr, [
|
|
@@ -3674,8 +3674,8 @@ function Er(e, t, n, i, r, s) {
|
|
|
3674
3674
|
t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
3675
3675
|
o("span", kr, v(A.systemLabel), 1),
|
|
3676
3676
|
t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3677
|
-
])) : (c(), u(
|
|
3678
|
-
(c(!0), u(
|
|
3677
|
+
])) : (c(), u(I, { key: 1 }, [
|
|
3678
|
+
(c(!0), u(I, null, U(A.items, (M, j) => (c(), u("div", {
|
|
3679
3679
|
key: `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3680
3680
|
"data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3681
3681
|
class: O(["wm-list__row fade-up", [
|
|
@@ -3685,10 +3685,10 @@ function Er(e, t, n, i, r, s) {
|
|
|
3685
3685
|
"is-failed": M.message._failed
|
|
3686
3686
|
}
|
|
3687
3687
|
]]),
|
|
3688
|
-
style:
|
|
3688
|
+
style: q(s.cornersStyle(A, j))
|
|
3689
3689
|
}, [
|
|
3690
3690
|
A.role !== "user" ? (c(), u("div", Ar, [
|
|
3691
|
-
|
|
3691
|
+
j === A.items.length - 1 ? (c(), u(I, { key: 0 }, [
|
|
3692
3692
|
A.role === "ai" ? (c(), N(a, {
|
|
3693
3693
|
key: 0,
|
|
3694
3694
|
size: 26,
|
|
@@ -3732,10 +3732,10 @@ function Er(e, t, n, i, r, s) {
|
|
|
3732
3732
|
"wm-list__atts--align-end": A.role === "user"
|
|
3733
3733
|
}])
|
|
3734
3734
|
}, [
|
|
3735
|
-
(c(!0), u(
|
|
3735
|
+
(c(!0), u(I, null, U(s.attachmentsOf(
|
|
3736
3736
|
M.message
|
|
3737
|
-
), (F,
|
|
3738
|
-
key: `${s.messageKey(M.message)}-att-${
|
|
3737
|
+
), (F, z) => (c(), N(x, {
|
|
3738
|
+
key: `${s.messageKey(M.message)}-att-${z}`,
|
|
3739
3739
|
attachment: F
|
|
3740
3740
|
}, null, 8, ["attachment"]))), 128))
|
|
3741
3741
|
], 2)) : w("", !0)
|
|
@@ -3753,7 +3753,7 @@ function Er(e, t, n, i, r, s) {
|
|
|
3753
3753
|
], 2)) : w("", !0)
|
|
3754
3754
|
], 64))), 128)),
|
|
3755
3755
|
n.streamingActive ? (c(), u("div", Or, [
|
|
3756
|
-
o("div",
|
|
3756
|
+
o("div", Lr, [
|
|
3757
3757
|
V(a, {
|
|
3758
3758
|
size: 26,
|
|
3759
3759
|
tail: !0,
|
|
@@ -3761,12 +3761,12 @@ function Er(e, t, n, i, r, s) {
|
|
|
3761
3761
|
"image-url": n.aiAgentAvatarUrl
|
|
3762
3762
|
}, null, 8, ["name", "image-url"])
|
|
3763
3763
|
]),
|
|
3764
|
-
V(
|
|
3764
|
+
V(R)
|
|
3765
3765
|
])) : w("", !0)
|
|
3766
3766
|
], 34);
|
|
3767
3767
|
}
|
|
3768
|
-
const
|
|
3769
|
-
function
|
|
3768
|
+
const Er = /* @__PURE__ */ B(mr, [["render", Ir], ["__scopeId", "data-v-d769b193"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
3769
|
+
function Rr() {
|
|
3770
3770
|
return be && [
|
|
3771
3771
|
"video/webm;codecs=vp9,opus",
|
|
3772
3772
|
"video/webm;codecs=vp8,opus",
|
|
@@ -3777,7 +3777,7 @@ function Br() {
|
|
|
3777
3777
|
return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
|
|
3778
3778
|
}) || "";
|
|
3779
3779
|
}
|
|
3780
|
-
function
|
|
3780
|
+
function Be({ audio: e }) {
|
|
3781
3781
|
return {
|
|
3782
3782
|
video: !0,
|
|
3783
3783
|
audio: !!e,
|
|
@@ -3786,15 +3786,15 @@ function Re({ audio: e }) {
|
|
|
3786
3786
|
systemAudio: e ? "include" : "exclude"
|
|
3787
3787
|
};
|
|
3788
3788
|
}
|
|
3789
|
-
function
|
|
3789
|
+
function qa(e) {
|
|
3790
3790
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
3791
3791
|
}
|
|
3792
|
-
async function
|
|
3793
|
-
if (!
|
|
3792
|
+
async function Br() {
|
|
3793
|
+
if (!he) return null;
|
|
3794
3794
|
let e;
|
|
3795
3795
|
try {
|
|
3796
3796
|
e = await navigator.mediaDevices.getDisplayMedia(
|
|
3797
|
-
|
|
3797
|
+
Be({ audio: !1 })
|
|
3798
3798
|
);
|
|
3799
3799
|
} catch (t) {
|
|
3800
3800
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
@@ -3824,16 +3824,16 @@ async function Nr(e) {
|
|
|
3824
3824
|
}
|
|
3825
3825
|
async function Fr(e = {}) {
|
|
3826
3826
|
var C;
|
|
3827
|
-
if (!
|
|
3827
|
+
if (!he || !be) return null;
|
|
3828
3828
|
let t;
|
|
3829
3829
|
try {
|
|
3830
3830
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
3831
|
-
|
|
3831
|
+
Be({ audio: !0 })
|
|
3832
3832
|
);
|
|
3833
3833
|
} catch (k) {
|
|
3834
3834
|
return (k == null ? void 0 : k.name) !== "NotAllowedError" && console.error("[media] record picker", k), null;
|
|
3835
3835
|
}
|
|
3836
|
-
const n =
|
|
3836
|
+
const n = Rr();
|
|
3837
3837
|
let i;
|
|
3838
3838
|
try {
|
|
3839
3839
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
@@ -3848,13 +3848,13 @@ async function Fr(e = {}) {
|
|
|
3848
3848
|
k.data && k.data.size > 0 && r.push(k.data);
|
|
3849
3849
|
}), i.addEventListener("stop", () => {
|
|
3850
3850
|
var k, x;
|
|
3851
|
-
if (s && clearInterval(s), t.getTracks().forEach((
|
|
3852
|
-
|
|
3851
|
+
if (s && clearInterval(s), t.getTracks().forEach((R) => {
|
|
3852
|
+
R.stop();
|
|
3853
3853
|
}), r.length) {
|
|
3854
|
-
const
|
|
3855
|
-
type:
|
|
3854
|
+
const R = i.mimeType || n || "video/webm", A = new Blob(r, { type: R }), H = /mp4/.test(R) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), j = new File([A], `ecran-${M}.${H}`, {
|
|
3855
|
+
type: R
|
|
3856
3856
|
});
|
|
3857
|
-
(k = e.onfinalize) == null || k.call(e,
|
|
3857
|
+
(k = e.onfinalize) == null || k.call(e, j);
|
|
3858
3858
|
} else
|
|
3859
3859
|
(x = e.oncancel) == null || x.call(e);
|
|
3860
3860
|
}), t.getVideoTracks().forEach((k) => {
|
|
@@ -3903,12 +3903,12 @@ const Ur = [
|
|
|
3903
3903
|
labelKey: "composer.recordScreen",
|
|
3904
3904
|
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"
|
|
3905
3905
|
}
|
|
3906
|
-
],
|
|
3906
|
+
], Pr = {
|
|
3907
3907
|
name: "WmComposer",
|
|
3908
3908
|
inject: {
|
|
3909
3909
|
// Translator shared by the Messenger shell; French fallback when
|
|
3910
3910
|
// the component is used standalone.
|
|
3911
|
-
t: { default: () =>
|
|
3911
|
+
t: { default: () => P() }
|
|
3912
3912
|
},
|
|
3913
3913
|
props: {
|
|
3914
3914
|
modelValue: { type: String, default: "" },
|
|
@@ -3934,7 +3934,7 @@ const Ur = [
|
|
|
3934
3934
|
return Ur.map((e) => ({
|
|
3935
3935
|
...e,
|
|
3936
3936
|
label: this.t(e.labelKey),
|
|
3937
|
-
disabled: e.action === "screenshot" && !
|
|
3937
|
+
disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !be)
|
|
3938
3938
|
}));
|
|
3939
3939
|
},
|
|
3940
3940
|
recordingElapsedLabel() {
|
|
@@ -4004,7 +4004,7 @@ const Ur = [
|
|
|
4004
4004
|
},
|
|
4005
4005
|
async captureScreenshot() {
|
|
4006
4006
|
if (this.disabled) return;
|
|
4007
|
-
const e = await
|
|
4007
|
+
const e = await Br();
|
|
4008
4008
|
e && this.$emit("attach", e);
|
|
4009
4009
|
},
|
|
4010
4010
|
async startRecording() {
|
|
@@ -4035,10 +4035,10 @@ const Ur = [
|
|
|
4035
4035
|
}
|
|
4036
4036
|
}
|
|
4037
4037
|
}
|
|
4038
|
-
},
|
|
4038
|
+
}, jr = { class: "wm-compose-wrap" }, Dr = {
|
|
4039
4039
|
key: 0,
|
|
4040
4040
|
class: "wm-rec"
|
|
4041
|
-
},
|
|
4041
|
+
}, zr = { class: "wm-rec__lbl" }, qr = {
|
|
4042
4042
|
key: 1,
|
|
4043
4043
|
class: "wm-compose__menu",
|
|
4044
4044
|
role: "menu"
|
|
@@ -4049,13 +4049,13 @@ const Ur = [
|
|
|
4049
4049
|
"aria-hidden": "true"
|
|
4050
4050
|
}, Kr = ["d"], Wr = ["placeholder", "disabled"], Gr = { class: "wm-compose__actions" }, Yr = ["title", "aria-label", "disabled"], Jr = ["disabled", "aria-label"];
|
|
4051
4051
|
function Qr(e, t, n, i, r, s) {
|
|
4052
|
-
return c(), u("div",
|
|
4053
|
-
r.recording ? (c(), u("div",
|
|
4052
|
+
return c(), u("div", jr, [
|
|
4053
|
+
r.recording ? (c(), u("div", Dr, [
|
|
4054
4054
|
t[8] || (t[8] = o("span", {
|
|
4055
4055
|
class: "wm-rec__dot",
|
|
4056
4056
|
"aria-hidden": "true"
|
|
4057
4057
|
}, null, -1)),
|
|
4058
|
-
o("span",
|
|
4058
|
+
o("span", zr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
|
|
4059
4059
|
o("button", {
|
|
4060
4060
|
type: "button",
|
|
4061
4061
|
class: "wm-rec__stop",
|
|
@@ -4078,8 +4078,8 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4078
4078
|
class: "wm-compose__overlay",
|
|
4079
4079
|
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
4080
4080
|
})) : w("", !0),
|
|
4081
|
-
r.attachOpen ? (c(), u("div",
|
|
4082
|
-
(c(!0), u(
|
|
4081
|
+
r.attachOpen ? (c(), u("div", qr, [
|
|
4082
|
+
(c(!0), u(I, null, U(s.attachItems, (a) => (c(), u("button", {
|
|
4083
4083
|
key: a.action,
|
|
4084
4084
|
type: "button",
|
|
4085
4085
|
class: "wm-compose__menuItem",
|
|
@@ -4160,7 +4160,7 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4160
4160
|
], 34)
|
|
4161
4161
|
]);
|
|
4162
4162
|
}
|
|
4163
|
-
const Xr = /* @__PURE__ */
|
|
4163
|
+
const Xr = /* @__PURE__ */ B(Pr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8"]]), Zr = {
|
|
4164
4164
|
name: "WmSuggestionChips",
|
|
4165
4165
|
props: {
|
|
4166
4166
|
items: { type: Array, default: () => [] },
|
|
@@ -4183,22 +4183,22 @@ function ti(e, t, n, i, r, s) {
|
|
|
4183
4183
|
key: s.batchKey,
|
|
4184
4184
|
class: "wm-chips"
|
|
4185
4185
|
}, [
|
|
4186
|
-
(c(!0), u(
|
|
4186
|
+
(c(!0), u(I, null, U(n.items, (a, l) => (c(), u("button", {
|
|
4187
4187
|
key: l,
|
|
4188
4188
|
type: "button",
|
|
4189
4189
|
class: "wm-chip",
|
|
4190
|
-
style:
|
|
4190
|
+
style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4191
4191
|
onClick: (p) => e.$emit("select", a)
|
|
4192
4192
|
}, v(a.label), 13, ei))), 128))
|
|
4193
4193
|
])) : w("", !0);
|
|
4194
4194
|
}
|
|
4195
|
-
const ni = /* @__PURE__ */
|
|
4195
|
+
const ni = /* @__PURE__ */ B(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085"]]), si = {
|
|
4196
4196
|
name: "WmApprovalCard",
|
|
4197
4197
|
components: { AIAvatar: le },
|
|
4198
4198
|
inject: {
|
|
4199
4199
|
// Translator shared by the Messenger shell; French fallback when
|
|
4200
4200
|
// the component is used standalone.
|
|
4201
|
-
t: { default: () =>
|
|
4201
|
+
t: { default: () => P() }
|
|
4202
4202
|
},
|
|
4203
4203
|
props: {
|
|
4204
4204
|
action: { type: String, required: !0 },
|
|
@@ -4241,7 +4241,7 @@ const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085
|
|
|
4241
4241
|
class: "wm-approval__detail"
|
|
4242
4242
|
}, di = { class: "wm-approval__actions" };
|
|
4243
4243
|
function ui(e, t, n, i, r, s) {
|
|
4244
|
-
const a =
|
|
4244
|
+
const a = E("AIAvatar");
|
|
4245
4245
|
return c(), u("div", ri, [
|
|
4246
4246
|
o("div", ii, [
|
|
4247
4247
|
o("div", ai, [
|
|
@@ -4272,9 +4272,9 @@ function ui(e, t, n, i, r, s) {
|
|
|
4272
4272
|
])
|
|
4273
4273
|
]);
|
|
4274
4274
|
}
|
|
4275
|
-
const
|
|
4275
|
+
const hi = /* @__PURE__ */ B(si, [["render", ui], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4276
4276
|
let xe = 0;
|
|
4277
|
-
const
|
|
4277
|
+
const mi = /* @__PURE__ */ new Set([
|
|
4278
4278
|
"text",
|
|
4279
4279
|
"textarea",
|
|
4280
4280
|
"number",
|
|
@@ -4288,7 +4288,7 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4288
4288
|
inject: {
|
|
4289
4289
|
// Translator shared by the Messenger shell; French fallback when
|
|
4290
4290
|
// the component is used standalone.
|
|
4291
|
-
t: { default: () =>
|
|
4291
|
+
t: { default: () => P() }
|
|
4292
4292
|
},
|
|
4293
4293
|
props: {
|
|
4294
4294
|
form: { type: Object, required: !0 },
|
|
@@ -4312,7 +4312,7 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4312
4312
|
// douteux.
|
|
4313
4313
|
normalizedFields() {
|
|
4314
4314
|
var t;
|
|
4315
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
4315
|
+
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)));
|
|
4316
4316
|
}
|
|
4317
4317
|
},
|
|
4318
4318
|
created() {
|
|
@@ -4375,13 +4375,13 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4375
4375
|
}, Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Si = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Mi = ["id", "onUpdate:modelValue", "required", "disabled"], Ti = {
|
|
4376
4376
|
key: 4,
|
|
4377
4377
|
class: "wm-form__bool"
|
|
4378
|
-
}, xi = ["id", "onUpdate:modelValue", "disabled"], Oi = ["id", "onUpdate:modelValue", "required", "disabled"],
|
|
4378
|
+
}, xi = ["id", "onUpdate:modelValue", "disabled"], Oi = ["id", "onUpdate:modelValue", "required", "disabled"], Li = {
|
|
4379
4379
|
value: "",
|
|
4380
4380
|
disabled: ""
|
|
4381
|
-
},
|
|
4381
|
+
}, Ii = ["value"], Ei = {
|
|
4382
4382
|
key: 6,
|
|
4383
4383
|
class: "wm-form__multi"
|
|
4384
|
-
},
|
|
4384
|
+
}, Ri = ["value", "checked", "disabled", "onChange"], Bi = {
|
|
4385
4385
|
key: 0,
|
|
4386
4386
|
class: "wm-form__err"
|
|
4387
4387
|
}, Ni = ["disabled"], Fi = {
|
|
@@ -4392,8 +4392,8 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4392
4392
|
key: 2,
|
|
4393
4393
|
class: "wm-form__doneLbl"
|
|
4394
4394
|
};
|
|
4395
|
-
function
|
|
4396
|
-
const a =
|
|
4395
|
+
function Pi(e, t, n, i, r, s) {
|
|
4396
|
+
const a = E("AIAvatar");
|
|
4397
4397
|
return c(), u("div", _i, [
|
|
4398
4398
|
o("div", gi, [
|
|
4399
4399
|
o("div", pi, [
|
|
@@ -4412,7 +4412,7 @@ function ji(e, t, n, i, r, s) {
|
|
|
4412
4412
|
class: "wm-form__body",
|
|
4413
4413
|
onSubmit: t[0] || (t[0] = Y((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4414
4414
|
}, [
|
|
4415
|
-
(c(!0), u(
|
|
4415
|
+
(c(!0), u(I, null, U(s.normalizedFields, (l) => (c(), u("div", {
|
|
4416
4416
|
key: l.key,
|
|
4417
4417
|
class: "wm-form__field"
|
|
4418
4418
|
}, [
|
|
@@ -4478,7 +4478,7 @@ function ji(e, t, n, i, r, s) {
|
|
|
4478
4478
|
type: "checkbox",
|
|
4479
4479
|
disabled: n.readOnly || r.busy
|
|
4480
4480
|
}, null, 8, xi), [
|
|
4481
|
-
[
|
|
4481
|
+
[ze, r.values[l.key]]
|
|
4482
4482
|
]),
|
|
4483
4483
|
o("span", null, v(l.placeholder || s.t("common.yes")), 1)
|
|
4484
4484
|
])) : l.type === "select" ? K((c(), u("select", {
|
|
@@ -4489,15 +4489,15 @@ function ji(e, t, n, i, r, s) {
|
|
|
4489
4489
|
required: l.required,
|
|
4490
4490
|
disabled: n.readOnly || r.busy
|
|
4491
4491
|
}, [
|
|
4492
|
-
o("option",
|
|
4493
|
-
(c(!0), u(
|
|
4492
|
+
o("option", Li, v(l.placeholder || s.t("form.choose")), 1),
|
|
4493
|
+
(c(!0), u(I, null, U(l.options, (p) => (c(), u("option", {
|
|
4494
4494
|
key: p.value,
|
|
4495
4495
|
value: p.value
|
|
4496
|
-
}, v(p.label), 9,
|
|
4496
|
+
}, v(p.label), 9, Ii))), 128))
|
|
4497
4497
|
], 8, Oi)), [
|
|
4498
|
-
[
|
|
4499
|
-
]) : l.type === "multiselect" ? (c(), u("div",
|
|
4500
|
-
(c(!0), u(
|
|
4498
|
+
[qe, r.values[l.key]]
|
|
4499
|
+
]) : l.type === "multiselect" ? (c(), u("div", Ei, [
|
|
4500
|
+
(c(!0), u(I, null, U(l.options, (p) => (c(), u("label", {
|
|
4501
4501
|
key: p.value,
|
|
4502
4502
|
class: "wm-form__multiItem"
|
|
4503
4503
|
}, [
|
|
@@ -4511,12 +4511,12 @@ function ji(e, t, n, i, r, s) {
|
|
|
4511
4511
|
p.value,
|
|
4512
4512
|
C.target.checked
|
|
4513
4513
|
)
|
|
4514
|
-
}, null, 40,
|
|
4514
|
+
}, null, 40, Ri),
|
|
4515
4515
|
o("span", null, v(p.label), 1)
|
|
4516
4516
|
]))), 128))
|
|
4517
4517
|
])) : w("", !0)
|
|
4518
4518
|
]))), 128)),
|
|
4519
|
-
r.error ? (c(), u("div",
|
|
4519
|
+
r.error ? (c(), u("div", Bi, v(r.error), 1)) : w("", !0),
|
|
4520
4520
|
n.readOnly ? (c(), u("div", Ui, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4521
4521
|
key: 1,
|
|
4522
4522
|
type: "submit",
|
|
@@ -4529,12 +4529,12 @@ function ji(e, t, n, i, r, s) {
|
|
|
4529
4529
|
], 32)
|
|
4530
4530
|
]);
|
|
4531
4531
|
}
|
|
4532
|
-
const
|
|
4532
|
+
const ji = /* @__PURE__ */ B(fi, [["render", Pi], ["__scopeId", "data-v-fe65cc56"]]), Di = {
|
|
4533
4533
|
name: "WmFeedback",
|
|
4534
4534
|
inject: {
|
|
4535
4535
|
// Translator shared by the Messenger shell; French fallback when
|
|
4536
4536
|
// the component is used standalone.
|
|
4537
|
-
t: { default: () =>
|
|
4537
|
+
t: { default: () => P() }
|
|
4538
4538
|
},
|
|
4539
4539
|
props: {
|
|
4540
4540
|
busy: { type: Boolean, default: !1 },
|
|
@@ -4563,12 +4563,12 @@ const Di = /* @__PURE__ */ R(fi, [["render", ji], ["__scopeId", "data-v-fe65cc56
|
|
|
4563
4563
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4564
4564
|
}
|
|
4565
4565
|
}
|
|
4566
|
-
},
|
|
4566
|
+
}, zi = { class: "wm-fb" }, qi = { class: "wm-fb__title" }, Hi = { class: "wm-fb__sub" }, $i = { class: "wm-fb__row" }, Vi = ["onClick"], Ki = { class: "wm-fb__emoji" }, Wi = { class: "wm-fb__label" }, Gi = ["disabled"], Yi = {
|
|
4567
4567
|
key: 1,
|
|
4568
4568
|
class: "wm-fb__done"
|
|
4569
4569
|
}, Ji = { class: "wm-fb__doneTitle" }, Qi = { class: "wm-fb__doneSub" };
|
|
4570
4570
|
function Xi(e, t, n, i, r, s) {
|
|
4571
|
-
return c(), u("div",
|
|
4571
|
+
return c(), u("div", zi, [
|
|
4572
4572
|
n.done ? (c(), u("div", Yi, [
|
|
4573
4573
|
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
4574
4574
|
o("svg", {
|
|
@@ -4587,11 +4587,11 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4587
4587
|
], -1)),
|
|
4588
4588
|
o("div", Ji, v(s.t("feedback.doneTitle")), 1),
|
|
4589
4589
|
o("div", Qi, v(s.t("feedback.doneSubtitle")), 1)
|
|
4590
|
-
])) : (c(), u(
|
|
4591
|
-
o("div",
|
|
4590
|
+
])) : (c(), u(I, { key: 0 }, [
|
|
4591
|
+
o("div", qi, v(s.t("feedback.question")), 1),
|
|
4592
4592
|
o("div", Hi, v(s.t("feedback.subtitle")), 1),
|
|
4593
4593
|
o("div", $i, [
|
|
4594
|
-
(c(!0), u(
|
|
4594
|
+
(c(!0), u(I, null, U(s.options, (a) => (c(), u("button", {
|
|
4595
4595
|
key: a.v,
|
|
4596
4596
|
type: "button",
|
|
4597
4597
|
class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
|
|
@@ -4610,12 +4610,12 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4610
4610
|
], 64))
|
|
4611
4611
|
]);
|
|
4612
4612
|
}
|
|
4613
|
-
const Zi = /* @__PURE__ */
|
|
4613
|
+
const Zi = /* @__PURE__ */ B(Di, [["render", Xi], ["__scopeId", "data-v-9b630564"]]), ea = {
|
|
4614
4614
|
name: "WmMoreMenu",
|
|
4615
4615
|
inject: {
|
|
4616
4616
|
// Translator shared by the Messenger shell; French fallback when
|
|
4617
4617
|
// the component is used standalone.
|
|
4618
|
-
t: { default: () =>
|
|
4618
|
+
t: { default: () => P() }
|
|
4619
4619
|
},
|
|
4620
4620
|
props: {
|
|
4621
4621
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -4662,8 +4662,8 @@ const Zi = /* @__PURE__ */ R(Pi, [["render", Xi], ["__scopeId", "data-v-9b630564
|
|
|
4662
4662
|
}, ra = { class: "wm-mm__label" }, ia = { class: "wm-mm__label" }, aa = {
|
|
4663
4663
|
key: 1,
|
|
4664
4664
|
class: "wm-mm__sep"
|
|
4665
|
-
}, oa = { class: "wm-mm__section" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__section" }, ua = { class: "wm-mm__label" },
|
|
4666
|
-
function
|
|
4665
|
+
}, oa = { class: "wm-mm__section" }, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__section" }, ua = { class: "wm-mm__label" }, ha = { class: "wm-mm__label" };
|
|
4666
|
+
function ma(e, t, n, i, r, s) {
|
|
4667
4667
|
return c(), u("div", ta, [
|
|
4668
4668
|
o("div", {
|
|
4669
4669
|
class: "wm-mm__scrim",
|
|
@@ -4824,18 +4824,18 @@ function ha(e, t, n, i, r, s) {
|
|
|
4824
4824
|
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" })
|
|
4825
4825
|
])
|
|
4826
4826
|
], -1)),
|
|
4827
|
-
o("span",
|
|
4827
|
+
o("span", ha, v(s.t("moreMenu.helpCenter")), 1)
|
|
4828
4828
|
])) : w("", !0)
|
|
4829
4829
|
])
|
|
4830
4830
|
])
|
|
4831
4831
|
]);
|
|
4832
4832
|
}
|
|
4833
|
-
const fa = /* @__PURE__ */
|
|
4833
|
+
const fa = /* @__PURE__ */ B(ea, [["render", ma], ["__scopeId", "data-v-76281e95"]]), _a = {
|
|
4834
4834
|
name: "WmRenameDialog",
|
|
4835
4835
|
inject: {
|
|
4836
4836
|
// Translator shared by the Messenger shell; French fallback when
|
|
4837
4837
|
// the component is used standalone.
|
|
4838
|
-
t: { default: () =>
|
|
4838
|
+
t: { default: () => P() }
|
|
4839
4839
|
},
|
|
4840
4840
|
props: {
|
|
4841
4841
|
// Empty defaults: the resolved fallback comes from the translator
|
|
@@ -4939,24 +4939,24 @@ function Sa(e, t, n, i, r, s) {
|
|
|
4939
4939
|
])
|
|
4940
4940
|
]);
|
|
4941
4941
|
}
|
|
4942
|
-
const Ma = /* @__PURE__ */
|
|
4942
|
+
const Ma = /* @__PURE__ */ B(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ta = {
|
|
4943
4943
|
name: "Messenger",
|
|
4944
4944
|
components: {
|
|
4945
4945
|
Launcher: Ut,
|
|
4946
4946
|
Header: cn,
|
|
4947
4947
|
Onboarding: $n,
|
|
4948
|
-
MessageList:
|
|
4948
|
+
MessageList: Er,
|
|
4949
4949
|
Composer: Xr,
|
|
4950
4950
|
SuggestionChips: ni,
|
|
4951
|
-
ApprovalCard:
|
|
4952
|
-
FormCard:
|
|
4951
|
+
ApprovalCard: hi,
|
|
4952
|
+
FormCard: ji,
|
|
4953
4953
|
Feedback: Zi,
|
|
4954
4954
|
MoreMenu: fa,
|
|
4955
4955
|
RenameDialog: Ma
|
|
4956
4956
|
},
|
|
4957
4957
|
mixins: [
|
|
4958
4958
|
ot,
|
|
4959
|
-
|
|
4959
|
+
mt,
|
|
4960
4960
|
ft,
|
|
4961
4961
|
gt
|
|
4962
4962
|
],
|
|
@@ -5097,7 +5097,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5097
5097
|
// `locale` changes. `t()` below (and the provided closure) delegate
|
|
5098
5098
|
// to it so every string resolves against the current language.
|
|
5099
5099
|
translator() {
|
|
5100
|
-
return
|
|
5100
|
+
return P(this.locale);
|
|
5101
5101
|
},
|
|
5102
5102
|
error() {
|
|
5103
5103
|
var e;
|
|
@@ -5135,9 +5135,9 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5135
5135
|
const x = r[k];
|
|
5136
5136
|
if (!x) continue;
|
|
5137
5137
|
if (((C = x.author) == null ? void 0 : C.type) === "user") break;
|
|
5138
|
-
const
|
|
5139
|
-
if (
|
|
5140
|
-
if (s != null &&
|
|
5138
|
+
const R = J(x.id);
|
|
5139
|
+
if (R != null) {
|
|
5140
|
+
if (s != null && R <= s) break;
|
|
5141
5141
|
t[x.id] !== 0 && (!l && x.author && (l = x.author), a++);
|
|
5142
5142
|
}
|
|
5143
5143
|
}
|
|
@@ -5413,7 +5413,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5413
5413
|
}
|
|
5414
5414
|
}
|
|
5415
5415
|
return this.t("messageList.today", {
|
|
5416
|
-
time:
|
|
5416
|
+
time: Le(t, oe(this.locale))
|
|
5417
5417
|
});
|
|
5418
5418
|
},
|
|
5419
5419
|
// Pagination state for the active conversation. Drives the
|
|
@@ -5430,18 +5430,6 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5430
5430
|
}
|
|
5431
5431
|
},
|
|
5432
5432
|
watch: {
|
|
5433
|
-
// Notifie le snippet parent du changement open/close pour qu'il
|
|
5434
|
-
// resize l'iframe (sinon en sheet la hauteur est plafonnée).
|
|
5435
|
-
isOpen(e) {
|
|
5436
|
-
window.parent && window.parent !== window && window.parent.postMessage(
|
|
5437
|
-
{
|
|
5438
|
-
type: "RESIZE",
|
|
5439
|
-
state: e ? "open" : "closed",
|
|
5440
|
-
displayMode: this.displayMode
|
|
5441
|
-
},
|
|
5442
|
-
"*"
|
|
5443
|
-
);
|
|
5444
|
-
},
|
|
5445
5433
|
// Prune `dismissedPeeks` entries for threads that are no longer
|
|
5446
5434
|
// unread (user opened them, or a user reply cleared the unread
|
|
5447
5435
|
// flag). Without this, the map would grow unbounded across a
|
|
@@ -5534,10 +5522,10 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5534
5522
|
const e = document.createElement("style");
|
|
5535
5523
|
e.id = Oe, e.textContent = Xe, document.head.appendChild(e);
|
|
5536
5524
|
}
|
|
5537
|
-
this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded
|
|
5525
|
+
this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
|
|
5538
5526
|
},
|
|
5539
5527
|
beforeUnmount() {
|
|
5540
|
-
this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this.cancelReveals(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.resetApprovalPacing(), this.teardownNotifications(), this.store && this.store.destroy();
|
|
5528
|
+
this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.resetApprovalPacing(), this.teardownNotifications(), this.store && this.store.destroy();
|
|
5541
5529
|
},
|
|
5542
5530
|
methods: {
|
|
5543
5531
|
// Translate a key against the resolved language. Used in this
|
|
@@ -5629,7 +5617,7 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5629
5617
|
},
|
|
5630
5618
|
// ── Panel open/close + draft conversation ────────────────────────
|
|
5631
5619
|
async open() {
|
|
5632
|
-
this.isOpen = !0, this.store || await this.boot(), this.store && this.store.setPanelOpen(!0);
|
|
5620
|
+
this.isOpen = !0, this.notifyParentResize("open"), this._launcherRo && this._launcherRo.disconnect(), this.store || await this.boot(), this.store && this.store.setPanelOpen(!0);
|
|
5633
5621
|
const e = this.currentConv;
|
|
5634
5622
|
if (e && !e._draft) {
|
|
5635
5623
|
this.activeConvId == null && (this.activeConvId = e.id);
|
|
@@ -5641,8 +5629,48 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5641
5629
|
this.markConvRead(e);
|
|
5642
5630
|
}
|
|
5643
5631
|
},
|
|
5644
|
-
close() {
|
|
5645
|
-
this.isOpen = !1, this.store && this.store.setPanelOpen(!1);
|
|
5632
|
+
async close() {
|
|
5633
|
+
this.isOpen = !1, await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize(), this.store && this.store.setPanelOpen(!1);
|
|
5634
|
+
},
|
|
5635
|
+
notifyParentResize(e, t) {
|
|
5636
|
+
if (window.parent && window.parent !== window)
|
|
5637
|
+
try {
|
|
5638
|
+
window.parent.postMessage(
|
|
5639
|
+
{
|
|
5640
|
+
type: "RESIZE",
|
|
5641
|
+
state: e,
|
|
5642
|
+
displayMode: this.displayMode,
|
|
5643
|
+
...t || {}
|
|
5644
|
+
},
|
|
5645
|
+
"*"
|
|
5646
|
+
);
|
|
5647
|
+
} catch (n) {
|
|
5648
|
+
console.warn("[ww-messenger] notifyParentResize failed", n);
|
|
5649
|
+
}
|
|
5650
|
+
},
|
|
5651
|
+
// Mesure la taille rendue du wm-launcherWrap (launcher + peeks éventuels)
|
|
5652
|
+
// et la pousse au parent. L'iframe s'ajuste pile à cette taille → la
|
|
5653
|
+
// page derrière redevient cliquable en dehors du launcher.
|
|
5654
|
+
sendCurrentLauncherSize() {
|
|
5655
|
+
var n, i;
|
|
5656
|
+
const e = (i = (n = this.$el) == null ? void 0 : n.querySelector) == null ? void 0 : i.call(n, ".wm-launcherWrap");
|
|
5657
|
+
if (!e) return;
|
|
5658
|
+
const t = e.getBoundingClientRect();
|
|
5659
|
+
!t.width || !t.height || this.notifyParentResize("closed", {
|
|
5660
|
+
width: Math.ceil(t.width) + 20,
|
|
5661
|
+
height: Math.ceil(t.height) + 20
|
|
5662
|
+
});
|
|
5663
|
+
},
|
|
5664
|
+
observeLauncherSize() {
|
|
5665
|
+
var n, i;
|
|
5666
|
+
if (typeof ResizeObserver > "u") return;
|
|
5667
|
+
const e = (i = (n = this.$el) == null ? void 0 : n.querySelector) == null ? void 0 : i.call(n, ".wm-launcherWrap");
|
|
5668
|
+
if (!e) return;
|
|
5669
|
+
this._launcherRo && this._launcherRo.disconnect();
|
|
5670
|
+
const t = new ResizeObserver(() => {
|
|
5671
|
+
this.isOpen || this.sendCurrentLauncherSize();
|
|
5672
|
+
});
|
|
5673
|
+
t.observe(e), this._launcherRo = t;
|
|
5646
5674
|
},
|
|
5647
5675
|
// Opening straight from a notification card: land on that card's
|
|
5648
5676
|
// thread rather than whatever was last active.
|
|
@@ -5848,10 +5876,10 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5848
5876
|
class: "wm-loading",
|
|
5849
5877
|
"aria-busy": "true",
|
|
5850
5878
|
"aria-live": "polite"
|
|
5851
|
-
}, Oa = ["aria-label"],
|
|
5879
|
+
}, Oa = ["aria-label"], La = {
|
|
5852
5880
|
key: 0,
|
|
5853
5881
|
class: "wm-state"
|
|
5854
|
-
},
|
|
5882
|
+
}, Ia = { class: "wm-state__err" }, Ea = { class: "wm-state__errTitle" }, Ra = { class: "wm-state__errSub" }, Ba = { class: "wm-bottom" }, Na = {
|
|
5855
5883
|
key: 0,
|
|
5856
5884
|
ref: "floatEl",
|
|
5857
5885
|
class: "wm-float"
|
|
@@ -5860,12 +5888,12 @@ const Ma = /* @__PURE__ */ R(_a, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5860
5888
|
class: "wm-actionWait",
|
|
5861
5889
|
role: "status",
|
|
5862
5890
|
"aria-live": "polite"
|
|
5863
|
-
}, Ua = { class: "wm-actionWait__lbl" },
|
|
5891
|
+
}, Ua = { class: "wm-actionWait__lbl" }, Pa = {
|
|
5864
5892
|
key: 2,
|
|
5865
5893
|
class: "wm-attached"
|
|
5866
|
-
},
|
|
5867
|
-
function
|
|
5868
|
-
const a =
|
|
5894
|
+
}, ja = ["aria-label", "onClick"];
|
|
5895
|
+
function Da(e, t, n, i, r, s) {
|
|
5896
|
+
const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), C = E("MessageList"), k = E("ApprovalCard"), x = E("FormCard"), R = E("Feedback"), A = E("SuggestionChips"), H = E("Composer"), M = E("MoreMenu"), j = E("RenameDialog");
|
|
5869
5897
|
return c(), u("div", {
|
|
5870
5898
|
class: O(["wm-root", `wm-root--${n.displayMode}`])
|
|
5871
5899
|
}, [
|
|
@@ -5883,7 +5911,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5883
5911
|
`wm-panel--${n.displayMode}`,
|
|
5884
5912
|
{ "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
|
|
5885
5913
|
]),
|
|
5886
|
-
style:
|
|
5914
|
+
style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
5887
5915
|
role: "dialog",
|
|
5888
5916
|
"aria-label": "Messenger"
|
|
5889
5917
|
}, [
|
|
@@ -5913,7 +5941,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5913
5941
|
class: "wm-loading__spinner",
|
|
5914
5942
|
"aria-hidden": "true"
|
|
5915
5943
|
}, null, -1))
|
|
5916
|
-
])) : (c(), u(
|
|
5944
|
+
])) : (c(), u(I, { key: 1 }, [
|
|
5917
5945
|
V(l, {
|
|
5918
5946
|
title: s.headerTitle,
|
|
5919
5947
|
"team-members": s.teamMembers,
|
|
@@ -5928,8 +5956,8 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5928
5956
|
onMore: s.toggleMore,
|
|
5929
5957
|
onClose: s.close
|
|
5930
5958
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
5931
|
-
s.error ? (c(), u("div",
|
|
5932
|
-
o("div",
|
|
5959
|
+
s.error ? (c(), u("div", La, [
|
|
5960
|
+
o("div", Ia, [
|
|
5933
5961
|
t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
|
|
5934
5962
|
o("svg", {
|
|
5935
5963
|
width: "14",
|
|
@@ -5946,11 +5974,11 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5946
5974
|
])
|
|
5947
5975
|
], -1)),
|
|
5948
5976
|
o("div", null, [
|
|
5949
|
-
o("div",
|
|
5950
|
-
o("div",
|
|
5977
|
+
o("div", Ea, v(s.t("error.connectionFailed")), 1),
|
|
5978
|
+
o("div", Ra, v(s.error), 1)
|
|
5951
5979
|
])
|
|
5952
5980
|
])
|
|
5953
|
-
])) : s.currentConv ? (c(), u(
|
|
5981
|
+
])) : s.currentConv ? (c(), u(I, { key: 2 }, [
|
|
5954
5982
|
V(C, {
|
|
5955
5983
|
ref: "messageList",
|
|
5956
5984
|
messages: s.displayedMessages,
|
|
@@ -5965,7 +5993,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5965
5993
|
"ai-agent-avatar-url": s.agentAvatarUrl,
|
|
5966
5994
|
onLoadMore: s.onLoadMore
|
|
5967
5995
|
}, 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"]),
|
|
5968
|
-
o("div",
|
|
5996
|
+
o("div", Ba, [
|
|
5969
5997
|
s.floatVisible ? (c(), u("div", Na, [
|
|
5970
5998
|
s.approvalReady ? (c(), N(k, {
|
|
5971
5999
|
key: 0,
|
|
@@ -5981,7 +6009,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5981
6009
|
"agent-name": s.agentName,
|
|
5982
6010
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
5983
6011
|
onSubmit: s.onFormSubmit
|
|
5984
|
-
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), N(
|
|
6012
|
+
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), N(R, {
|
|
5985
6013
|
key: 2,
|
|
5986
6014
|
busy: r.feedbackBusy,
|
|
5987
6015
|
done: r.feedbackDone,
|
|
@@ -6025,16 +6053,16 @@ function Pa(e, t, n, i, r, s) {
|
|
|
6025
6053
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6026
6054
|
onAction: s.onMoreAction
|
|
6027
6055
|
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0),
|
|
6028
|
-
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), N(
|
|
6056
|
+
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), N(j, {
|
|
6029
6057
|
key: 1,
|
|
6030
6058
|
"initial-value": s.currentConv.name || "",
|
|
6031
6059
|
title: s.t("rename.dialogTitle"),
|
|
6032
6060
|
onClose: t[3] || (t[3] = (F) => r.renameDialogOpen = !1),
|
|
6033
6061
|
onSubmit: s.onRenameSubmit
|
|
6034
6062
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0),
|
|
6035
|
-
r.pendingAttachments.length ? (c(), u("div",
|
|
6036
|
-
(c(!0), u(
|
|
6037
|
-
key:
|
|
6063
|
+
r.pendingAttachments.length ? (c(), u("div", Pa, [
|
|
6064
|
+
(c(!0), u(I, null, U(r.pendingAttachments, (F, z) => (c(), u("div", {
|
|
6065
|
+
key: z,
|
|
6038
6066
|
class: "wm-attached__chip"
|
|
6039
6067
|
}, [
|
|
6040
6068
|
t[10] || (t[10] = o("svg", {
|
|
@@ -6054,7 +6082,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
6054
6082
|
o("button", {
|
|
6055
6083
|
type: "button",
|
|
6056
6084
|
"aria-label": s.t("attachment.remove"),
|
|
6057
|
-
onClick: (W) => r.pendingAttachments.splice(
|
|
6085
|
+
onClick: (W) => r.pendingAttachments.splice(z, 1)
|
|
6058
6086
|
}, [...t[9] || (t[9] = [
|
|
6059
6087
|
o("svg", {
|
|
6060
6088
|
width: "10",
|
|
@@ -6069,7 +6097,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
6069
6097
|
}, [
|
|
6070
6098
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6071
6099
|
], -1)
|
|
6072
|
-
])], 8,
|
|
6100
|
+
])], 8, ja)
|
|
6073
6101
|
]))), 128))
|
|
6074
6102
|
])) : w("", !0)
|
|
6075
6103
|
], 64)) : (c(), N(p, {
|
|
@@ -6102,32 +6130,32 @@ function Pa(e, t, n, i, r, s) {
|
|
|
6102
6130
|
], 6)) : w("", !0)
|
|
6103
6131
|
], 2);
|
|
6104
6132
|
}
|
|
6105
|
-
const Ha = /* @__PURE__ */
|
|
6133
|
+
const Ha = /* @__PURE__ */ B(Ta, [["render", Da], ["__scopeId", "data-v-98fea820"]]), $a = "0.5.11";
|
|
6106
6134
|
export {
|
|
6107
6135
|
le as AIAvatar,
|
|
6108
6136
|
_e as AVATAR_COLORS,
|
|
6109
6137
|
ns as ActionResult,
|
|
6110
|
-
|
|
6138
|
+
hi as ApprovalCard,
|
|
6111
6139
|
us as ArtifactFormResponse,
|
|
6112
6140
|
As as ArtifactInfoCard,
|
|
6113
6141
|
Hs as ArtifactRenderer,
|
|
6114
|
-
|
|
6142
|
+
js as ArtifactTicket,
|
|
6115
6143
|
tr as AttachmentPreview,
|
|
6116
6144
|
ir as Bubble,
|
|
6117
6145
|
Xr as Composer,
|
|
6118
6146
|
Ze as DEFAULT_BASE_URL,
|
|
6119
6147
|
ie as DEFAULT_LANGUAGE,
|
|
6120
6148
|
Zi as Feedback,
|
|
6121
|
-
|
|
6149
|
+
ji as FormCard,
|
|
6122
6150
|
cn as Header,
|
|
6123
|
-
|
|
6151
|
+
Ee as HumanAvatar,
|
|
6124
6152
|
Ut as Launcher,
|
|
6125
6153
|
be as MEDIA_RECORDER_SUPPORTED,
|
|
6126
|
-
|
|
6154
|
+
Er as MessageList,
|
|
6127
6155
|
Ha as Messenger,
|
|
6128
6156
|
fa as MoreMenu,
|
|
6129
6157
|
$n as Onboarding,
|
|
6130
|
-
|
|
6158
|
+
he as SCREEN_CAPTURE_SUPPORTED,
|
|
6131
6159
|
et as SUPPORTED_LANGUAGES,
|
|
6132
6160
|
ni as SuggestionChips,
|
|
6133
6161
|
Yt as TeamAvatars,
|
|
@@ -6135,18 +6163,18 @@ export {
|
|
|
6135
6163
|
$a as VERSION,
|
|
6136
6164
|
ve as avatarColor,
|
|
6137
6165
|
ye as avatarInitials,
|
|
6138
|
-
|
|
6139
|
-
|
|
6166
|
+
Br as captureScreenshotFile,
|
|
6167
|
+
D as colors,
|
|
6140
6168
|
Qe as createStore,
|
|
6141
|
-
|
|
6169
|
+
P as createTranslator,
|
|
6142
6170
|
We as createTransport,
|
|
6143
6171
|
oe as dateLocale,
|
|
6144
6172
|
Ha as default,
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6173
|
+
Le as formatTime,
|
|
6174
|
+
qa as guessAttachmentKind,
|
|
6175
|
+
Rr as pickRecorderMime,
|
|
6148
6176
|
un as renderInlineMarkdown,
|
|
6149
|
-
|
|
6177
|
+
hn as renderMarkdown,
|
|
6150
6178
|
we as resolveLanguage,
|
|
6151
6179
|
Fr as startScreenRecording,
|
|
6152
6180
|
Xe as tokensCss,
|