@_solaris/messenger-widget 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,15 +1,15 @@
1
- import { reactive as Ae, openBlock as l, createElementBlock as c, createVNode as K, Transition as Se, withCtx as xe, withKeys as ae, withModifiers as X, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as G, normalizeClass as B, Fragment as T, renderList as D, resolveComponent as I, createBlock as $, createTextVNode as de, resolveDynamicComponent as Te, renderSlot as Me, withDirectives as q, vModelText as J, vModelCheckbox as Oe, vModelSelect as Ie, createStaticVNode as he, markRaw as fe } from "vue";
2
- const Be = [
1
+ import { reactive as Se, openBlock as l, createElementBlock as c, createVNode as K, Transition as xe, withCtx as Te, withKeys as ae, withModifiers as X, createElementVNode as i, toDisplayString as w, createCommentVNode as y, normalizeStyle as G, normalizeClass as E, Fragment as M, renderList as D, resolveComponent as B, createBlock as L, createTextVNode as te, resolveDynamicComponent as Me, renderSlot as Oe, withDirectives as q, vModelText as J, vModelCheckbox as Ie, vModelSelect as Be, createStaticVNode as ue, markRaw as me } from "vue";
2
+ const Ee = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], Ee = 5 * 60 * 1e3, $e = 10 * 60 * 1e3, Le = 5 * 60 * 1e3;
10
- function Re(t) {
9
+ ], fe = "/client", $e = 5 * 60 * 1e3, Le = 10 * 60 * 1e3, Re = 5 * 60 * 1e3;
10
+ function Fe(t) {
11
11
  const e = {
12
- baseUrl: Fe(t.baseUrl || ""),
12
+ baseUrl: De(t.baseUrl || ""),
13
13
  widgetId: t.widgetId || "",
14
14
  userId: t.userId || "",
15
15
  userHash: t.userHash || "",
@@ -39,8 +39,8 @@ function Re(t) {
39
39
  p && p.forEach((C) => {
40
40
  try {
41
41
  C(f);
42
- } catch (O) {
43
- console.error("[transport] listener", h, O);
42
+ } catch (T) {
43
+ console.error("[transport] listener", h, T);
44
44
  }
45
45
  });
46
46
  }
@@ -55,16 +55,16 @@ function Re(t) {
55
55
  };
56
56
  }
57
57
  async function o(h, f, p) {
58
- const C = await fetch(`${e.baseUrl}${f}`, {
58
+ const C = await fetch(`${e.baseUrl}${fe}${f}`, {
59
59
  method: h,
60
60
  headers: { "Content-Type": "application/json", ...s() },
61
61
  body: p !== void 0 ? JSON.stringify(p) : void 0
62
62
  });
63
63
  if (!C.ok) {
64
- const O = await d(C), M = new Error(
65
- `HTTP ${C.status} ${h} ${f} :: ${(O == null ? void 0 : O.error) || C.statusText}`
64
+ const T = await d(C), O = new Error(
65
+ `HTTP ${C.status} ${h} ${f} :: ${(T == null ? void 0 : T.error) || C.statusText}`
66
66
  );
67
- throw M.status = C.status, M.body = O, M;
67
+ throw O.status = C.status, O.body = T, O;
68
68
  }
69
69
  return C.status === 204 ? null : C.json();
70
70
  }
@@ -100,7 +100,7 @@ function Re(t) {
100
100
  const h = await o("GET", "/customers/me");
101
101
  return (h == null ? void 0 : h.customer) ?? null;
102
102
  }
103
- async function w(h) {
103
+ async function b(h) {
104
104
  const f = await o("PATCH", "/customers/me", h);
105
105
  return (f == null ? void 0 : f.customer) ?? null;
106
106
  }
@@ -108,7 +108,7 @@ function Re(t) {
108
108
  const h = await o("GET", "/conversations");
109
109
  return (h == null ? void 0 : h.conversations) ?? [];
110
110
  }
111
- async function R(h = {}) {
111
+ async function F(h = {}) {
112
112
  return (await o("POST", "/conversations", h)).conversation;
113
113
  }
114
114
  async function A(h) {
@@ -148,27 +148,27 @@ function Re(t) {
148
148
  p ? { inputs: p } : {}
149
149
  );
150
150
  }
151
- async function F(h) {
151
+ async function R(h) {
152
152
  const f = (
153
153
  /** @type {File} */
154
154
  h.name || "attachment"
155
- ), p = h.type || "application/octet-stream", C = h.size || 0, O = (
155
+ ), p = h.type || "application/octet-stream", C = h.size || 0, T = (
156
156
  /** @type {import('./types.js').AttachmentUploadTicket} */
157
157
  await o("POST", "/attachments", {
158
158
  mime_type: p,
159
159
  size_bytes: C,
160
160
  name: f
161
161
  })
162
- ), M = await fetch(O.upload_url, {
162
+ ), O = await fetch(T.upload_url, {
163
163
  method: "PUT",
164
164
  headers: { "Content-Type": p },
165
165
  body: h
166
166
  });
167
- if (!M.ok)
168
- throw new Error(`HTTP ${M.status} PUT signed upload`);
167
+ if (!O.ok)
168
+ throw new Error(`HTTP ${O.status} PUT signed upload`);
169
169
  return {
170
- type: De(p),
171
- path: O.path,
170
+ type: Ne(p),
171
+ path: T.path,
172
172
  mime_type: p,
173
173
  size_bytes: C
174
174
  };
@@ -185,20 +185,20 @@ function Re(t) {
185
185
  userHash: e.userHash,
186
186
  widgetId: e.widgetId
187
187
  }).toString();
188
- return `${e.baseUrl}/stream?${h}`;
188
+ return `${e.baseUrl}${fe}/stream?${h}`;
189
189
  }
190
190
  function z() {
191
191
  if (!e.eventSource && !(typeof document < "u" && document.hidden))
192
192
  try {
193
193
  const h = new EventSource(Y());
194
- for (const f of Be)
195
- h.addEventListener(f, (p) => Q(f, p.data));
194
+ for (const f of Ee)
195
+ h.addEventListener(f, (p) => Z(f, p.data));
196
196
  h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
197
197
  } catch (h) {
198
198
  console.error("[transport] SSE open failed", h), a("error", h);
199
199
  }
200
200
  }
201
- function Q(h, f) {
201
+ function Z(h, f) {
202
202
  try {
203
203
  const p = JSON.parse(f), C = p && typeof p == "object" && "data" in p ? p.data : p;
204
204
  a(h, C);
@@ -212,24 +212,24 @@ function Re(t) {
212
212
  function V() {
213
213
  clearTimeout(e.burstTimer), z(), e.panelOpen || (e.burstTimer = setTimeout(() => {
214
214
  e.panelOpen || W();
215
- }, $e));
215
+ }, Le));
216
216
  }
217
- function Z(h) {
217
+ function Q(h) {
218
218
  e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), z()) : V();
219
219
  }
220
- async function ce() {
220
+ async function de() {
221
221
  try {
222
- const h = await S(), f = h.reduce((C, O) => {
223
- const M = O == null ? void 0 : O.last_message_at;
224
- return M && (!C || M > C) ? M : C;
222
+ const h = await S(), f = h.reduce((C, T) => {
223
+ const O = T == null ? void 0 : T.last_message_at;
224
+ return O && (!C || O > C) ? O : C;
225
225
  }, null);
226
226
  f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), V());
227
227
  } catch (h) {
228
228
  console.error("[transport] poll failed", h);
229
229
  }
230
230
  }
231
- function ne() {
232
- u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(ce, Ee));
231
+ function se() {
232
+ u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(de, $e));
233
233
  }
234
234
  function u() {
235
235
  e.pollTimer && (clearInterval(e.pollTimer), e.pollTimer = null);
@@ -238,13 +238,13 @@ function Re(t) {
238
238
  if (document.hidden)
239
239
  clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = setTimeout(() => {
240
240
  e.hiddenGraceTimer = null, document.hidden && (u(), W(), r("paused"));
241
- }, Le);
241
+ }, Re);
242
242
  else {
243
243
  if (e.hiddenGraceTimer) {
244
244
  clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null;
245
245
  return;
246
246
  }
247
- r("idle"), ne(), e.panelOpen && z();
247
+ r("idle"), se(), e.panelOpen && z();
248
248
  }
249
249
  }
250
250
  async function _() {
@@ -255,13 +255,13 @@ function Re(t) {
255
255
  try {
256
256
  const f = await S();
257
257
  e.lastActivityAt = f.reduce((p, C) => {
258
- const O = C == null ? void 0 : C.last_message_at;
259
- return O && (!p || O > p) ? O : p;
258
+ const T = C == null ? void 0 : C.last_message_at;
259
+ return T && (!p || T > p) ? T : p;
260
260
  }, null);
261
261
  } catch (f) {
262
262
  console.error("[transport] initial /conversations failed", f);
263
263
  }
264
- return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), ne(), h;
264
+ return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), se(), h;
265
265
  }
266
266
  function g() {
267
267
  u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, W(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
@@ -270,19 +270,19 @@ function Re(t) {
270
270
  on: n,
271
271
  start: _,
272
272
  stop: g,
273
- setPanelOpen: Z,
273
+ setPanelOpen: Q,
274
274
  // REST
275
275
  bootstrap: v,
276
276
  getCustomer: k,
277
- patchCustomer: w,
277
+ patchCustomer: b,
278
278
  listConversations: S,
279
- createConversation: R,
279
+ createConversation: F,
280
280
  getConversation: A,
281
281
  patchConversation: U,
282
282
  listMessages: x,
283
283
  postMessage: j,
284
284
  postCallback: P,
285
- uploadAttachment: F,
285
+ uploadAttachment: R,
286
286
  signAttachment: H,
287
287
  // Read-only state
288
288
  get connection() {
@@ -290,13 +290,13 @@ function Re(t) {
290
290
  }
291
291
  };
292
292
  }
293
- function Fe(t) {
293
+ function De(t) {
294
294
  return t.endsWith("/") ? t.slice(0, -1) : t;
295
295
  }
296
- function De(t) {
296
+ function Ne(t) {
297
297
  return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : "file";
298
298
  }
299
- function Ne() {
299
+ function je() {
300
300
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
301
301
  return crypto.randomUUID();
302
302
  const t = new Uint8Array(16);
@@ -308,8 +308,8 @@ function Ne() {
308
308
  const e = [...t].map((n) => n.toString(16).padStart(2, "0"));
309
309
  return e.slice(0, 4).join("") + "-" + e.slice(4, 6).join("") + "-" + e.slice(6, 8).join("") + "-" + e.slice(8, 10).join("") + "-" + e.slice(10, 16).join("");
310
310
  }
311
- function je(t) {
312
- const e = Ae({
311
+ function Ue(t) {
312
+ const e = Se({
313
313
  ready: !1,
314
314
  error: null,
315
315
  config: null,
@@ -382,7 +382,7 @@ function je(t) {
382
382
  t.stop();
383
383
  }
384
384
  async function s(u) {
385
- const m = ce(u);
385
+ const m = de(u);
386
386
  if (!m) return e.customer;
387
387
  try {
388
388
  const _ = await t.patchCustomer(m);
@@ -400,48 +400,49 @@ function je(t) {
400
400
  async function v(u) {
401
401
  if (e.messagesByConv[u]) return;
402
402
  const m = await t.listMessages(u, { limit: d });
403
- e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], w(u, {
403
+ e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], b(u, {
404
404
  nextCursor: (m == null ? void 0 : m.next_cursor) ?? null,
405
405
  loading: !1,
406
406
  loaded: !0
407
407
  });
408
408
  }
409
409
  async function k(u) {
410
+ var h;
410
411
  const m = e.paginationByConv[u];
411
- if (!(!m || m.loading || !m.nextCursor)) {
412
- w(u, { ...m, loading: !0 });
412
+ if (!m || m.loading || !m.nextCursor) return;
413
+ const g = (h = (e.messagesByConv[u] || []).find((f) => f == null ? void 0 : f.created_at)) == null ? void 0 : h.created_at;
414
+ if (g) {
415
+ b(u, { ...m, loading: !0 });
413
416
  try {
414
- let h = m.nextCursor, f = [], p = 0;
415
- for (; p < 6 && h; p++) {
416
- const L = await t.listMessages(u, {
417
- before: h,
418
- limit: d
419
- }), se = (L == null ? void 0 : L.messages) ?? [];
420
- if (f = [...se, ...f], h = (L == null ? void 0 : L.next_cursor) ?? null, !se.length || f.length >= 60) break;
421
- }
422
- const C = e.messagesByConv[u] || [], O = new Set(C.map((L) => String(L == null ? void 0 : L.id))), M = [...f.filter((L) => !O.has(String(L == null ? void 0 : L.id))), ...C];
423
- e.messagesByConv[u] = M, w(u, {
424
- nextCursor: h,
417
+ const f = await t.listMessages(u, {
418
+ before: g,
419
+ limit: d
420
+ }), p = (f == null ? void 0 : f.messages) ?? [], C = e.messagesByConv[u] || [], T = /* @__PURE__ */ new Set();
421
+ for (const I of C)
422
+ (I == null ? void 0 : I.id) != null && T.add(`id:${String(I.id)}`), I != null && I.client_msg_id && T.add(`c:${I.client_msg_id}`);
423
+ const O = p.filter((I) => !((I == null ? void 0 : I.id) != null && T.has(`id:${String(I.id)}`) || I != null && I.client_msg_id && T.has(`c:${I.client_msg_id}`)));
424
+ e.messagesByConv[u] = [...O, ...C], b(u, {
425
+ nextCursor: (f == null ? void 0 : f.next_cursor) ?? null,
425
426
  loading: !1,
426
427
  loaded: !0
427
428
  });
428
- } catch (_) {
429
- console.error("[store] loadMore failed", _), w(u, { ...m, loading: !1 });
429
+ } catch (f) {
430
+ console.error("[store] loadMore failed", f), b(u, { ...m, loading: !1 });
430
431
  }
431
432
  }
432
433
  }
433
- function w(u, m) {
434
+ function b(u, m) {
434
435
  e.paginationByConv = { ...e.paginationByConv, [u]: m };
435
436
  }
436
437
  async function S(u, m) {
437
438
  const _ = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
438
439
  g !== -1 && (e.conversations[g] = _);
439
440
  }
440
- async function R(u, m, { attachments: _, metadata: g } = {}) {
441
- var M;
441
+ async function F(u, m, { attachments: _, metadata: g } = {}) {
442
+ var O;
442
443
  const h = (m || "").trim(), f = Array.isArray(_) && _.length > 0;
443
444
  if (!u || !h && !f) return;
444
- const p = Ne(), C = ne(u), O = {
445
+ const p = je(), C = se(u), T = {
445
446
  id: p,
446
447
  client_msg_id: p,
447
448
  conversation_id: u,
@@ -449,7 +450,7 @@ function je(t) {
449
450
  text_md: h,
450
451
  author: {
451
452
  type: "user",
452
- id: ((M = e.customer) == null ? void 0 : M.external_id) || null
453
+ id: ((O = e.customer) == null ? void 0 : O.external_id) || null
453
454
  },
454
455
  created_at: C,
455
456
  // Local-only flag — UI may render dimmed until the SSE echo lands.
@@ -457,7 +458,7 @@ function je(t) {
457
458
  ...f ? { payload: { type: "content", attachments: _ } } : {},
458
459
  ...g && typeof g == "object" ? { metadata: g } : {}
459
460
  };
460
- z(u, O);
461
+ z(u, T);
461
462
  try {
462
463
  await t.postMessage(u, {
463
464
  client_msg_id: p,
@@ -466,8 +467,8 @@ function je(t) {
466
467
  ...f ? { attachments: _ } : {},
467
468
  ...g && typeof g == "object" ? { metadata: g } : {}
468
469
  });
469
- } catch (L) {
470
- console.error("[store] send failed", L), W(u, p, { _failed: !0, _pending: !1 });
470
+ } catch (I) {
471
+ console.error("[store] send failed", I), W(u, p, { _failed: !0, _pending: !1 });
471
472
  }
472
473
  }
473
474
  async function A(u, m, _) {
@@ -516,7 +517,7 @@ function je(t) {
516
517
  }
517
518
  return null;
518
519
  }
519
- function F(u) {
520
+ function R(u) {
520
521
  var _, g, h;
521
522
  const m = e.messagesByConv[u] || [];
522
523
  for (let f = m.length - 1; f >= 0; f--) {
@@ -544,17 +545,17 @@ function je(t) {
544
545
  if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user") return [];
545
546
  if ((C == null ? void 0 : C.type) === "action" && ((g = C == null ? void 0 : C.payload) == null ? void 0 : g.state) === "pending") return [];
546
547
  if (((h = C == null ? void 0 : C.author) == null ? void 0 : h.type) !== "agent_ia") continue;
547
- const O = (f = C == null ? void 0 : C.metadata) == null ? void 0 : f.suggested_replies;
548
- return Array.isArray(O) && O.length ? O.map((M) => {
549
- if (typeof M == "string") {
550
- const L = M.trim();
551
- return L ? { label: L, kind: null } : null;
548
+ const T = (f = C == null ? void 0 : C.metadata) == null ? void 0 : f.suggested_replies;
549
+ return Array.isArray(T) && T.length ? T.map((O) => {
550
+ if (typeof O == "string") {
551
+ const I = O.trim();
552
+ return I ? { label: I, kind: null } : null;
552
553
  }
553
- if (M && typeof M == "object" && typeof M.label == "string") {
554
- const L = M.label.trim();
555
- if (!L) return null;
556
- const se = M.kind === "cta" || M.kind === "choice" || M.kind === "followup" ? M.kind : null;
557
- return { label: L, kind: se };
554
+ if (O && typeof O == "object" && typeof O.label == "string") {
555
+ const I = O.label.trim();
556
+ if (!I) return null;
557
+ const Ae = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
558
+ return { label: I, kind: Ae };
558
559
  }
559
560
  return null;
560
561
  }).filter(Boolean).slice(0, 4) : [];
@@ -567,11 +568,11 @@ function je(t) {
567
568
  let g = -1;
568
569
  m != null && m.client_msg_id && (g = _.findIndex(
569
570
  (p) => (p == null ? void 0 : p.client_msg_id) && p.client_msg_id === m.client_msg_id
570
- )), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = _.findIndex((p) => Q(p == null ? void 0 : p.id, m.id)));
571
+ )), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = _.findIndex((p) => Z(p == null ? void 0 : p.id, m.id)));
571
572
  let h;
572
- g === -1 ? h = [..._, m].sort(Z) : (h = _.slice(), h[g] = { ..._[g], ...m, _pending: !1, _failed: !1 }), e.messagesByConv[u] = h, (m == null ? void 0 : m.type) === "action" && ((f = m == null ? void 0 : m.payload) != null && f.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && e.awaitingCallback[m.id] && delete e.awaitingCallback[m.id];
573
+ g === -1 ? h = [..._, m].sort(Q) : (h = _.slice(), h[g] = { ..._[g], ...m, _pending: !1, _failed: !1 }), e.messagesByConv[u] = h, (m == null ? void 0 : m.type) === "action" && ((f = m == null ? void 0 : m.payload) != null && f.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && e.awaitingCallback[m.id] && delete e.awaitingCallback[m.id];
573
574
  }
574
- function Q(u, m) {
575
+ function Z(u, m) {
575
576
  return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
576
577
  }
577
578
  function W(u, m, _) {
@@ -593,17 +594,17 @@ function je(t) {
593
594
  ), e.conversations = h;
594
595
  }
595
596
  }
596
- function Z(u, m) {
597
+ function Q(u, m) {
597
598
  return (u.created_at || "").localeCompare(m.created_at || "");
598
599
  }
599
- function ce(u) {
600
+ function de(u) {
600
601
  if (!u || typeof u != "object") return null;
601
602
  const m = {}, _ = {};
602
603
  for (const [g, h] of Object.entries(u))
603
604
  h !== void 0 && (g === "name" || g === "email" ? h != null && String(h).trim() !== "" && (m[g] = h) : (g === "values" || g === "metadata") && h && typeof h == "object" ? Object.assign(_, h) : _[g] = h);
604
605
  return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
605
606
  }
606
- function ne(u) {
607
+ function se(u) {
607
608
  const m = e.messagesByConv[u] || [];
608
609
  let _ = "";
609
610
  for (const f of m)
@@ -620,14 +621,14 @@ function je(t) {
620
621
  openConversation: v,
621
622
  loadMore: k,
622
623
  patchConversation: S,
623
- send: R,
624
+ send: F,
624
625
  clickCallback: A,
625
626
  signAttachment: x,
626
627
  submitFeedback: j,
627
628
  getPendingApproval: P,
628
629
  getActionInFlight: H,
629
630
  getLatestSuggestions: Y,
630
- getLatestForm: F,
631
+ getLatestForm: R,
631
632
  // Pass-through for panel open/close (controls SSE burst).
632
633
  setPanelOpen: t.setPanelOpen
633
634
  };
@@ -648,9 +649,9 @@ const N = {
648
649
  green: "#22C55E",
649
650
  red: "#B91C1C",
650
651
  redBg: "#FDECEC"
651
- }, ue = ["#5B5FEF", "#7C3AED", "#DB2777", "#0891B2", "#D97706", "#059669"];
652
+ }, ce = ["#5B5FEF", "#7C3AED", "#DB2777", "#0891B2", "#D97706", "#059669"];
652
653
  function ye(t = "") {
653
- return t ? ue[t.charCodeAt(0) % ue.length] : ue[0];
654
+ return t ? ce[t.charCodeAt(0) % ce.length] : ce[0];
654
655
  }
655
656
  function we(t = "") {
656
657
  return t.split(" ").map((e) => e[0] || "").join("").toUpperCase().slice(0, 2);
@@ -658,7 +659,7 @@ function we(t = "") {
658
659
  function be(t = /* @__PURE__ */ new Date()) {
659
660
  return t.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
660
661
  }
661
- const Ue = `
662
+ const Pe = `
662
663
  @import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
663
664
 
664
665
  .wm-root {
@@ -704,12 +705,12 @@ const Ue = `
704
705
  0% { transform: translateX(110%); opacity: 0; }
705
706
  100% { transform: translateX(0); opacity: 1; }
706
707
  }
707
- `, Pe = "https://api.messenger.victorc.fr", E = (t, e) => {
708
+ `, He = "https://api.messenger.victorc.fr", $ = (t, e) => {
708
709
  const n = t.__vccOpts || t;
709
710
  for (const [a, r] of e)
710
711
  n[a] = r;
711
712
  return n;
712
- }, He = {
713
+ }, ze = {
713
714
  name: "WmLauncher",
714
715
  props: {
715
716
  // Nombre de conversations non lues — pilote la pastille.
@@ -719,11 +720,11 @@ const Ue = `
719
720
  peek: { type: String, default: "" }
720
721
  },
721
722
  emits: ["open", "dismiss"]
722
- }, ze = { class: "wm-launcherWrap" }, Ve = { class: "wm-peek__text" }, qe = ["aria-label"];
723
- function We(t, e, n, a, r, s) {
724
- return l(), c("div", ze, [
725
- K(Se, { name: "wm-peek" }, {
726
- default: xe(() => [
723
+ }, Ve = { class: "wm-launcherWrap" }, qe = { class: "wm-peek__text" }, We = ["aria-label"];
724
+ function Ke(t, e, n, a, r, s) {
725
+ return l(), c("div", Ve, [
726
+ K(xe, { name: "wm-peek" }, {
727
+ default: Te(() => [
727
728
  n.peek ? (l(), c("div", {
728
729
  key: 0,
729
730
  class: "wm-peek",
@@ -736,7 +737,7 @@ function We(t, e, n, a, r, s) {
736
737
  e[3] || (e[3] = ae(X((o) => t.$emit("open"), ["prevent"]), ["space"]))
737
738
  ]
738
739
  }, [
739
- i("p", Ve, b(n.peek), 1),
740
+ i("p", qe, w(n.peek), 1),
740
741
  i("button", {
741
742
  type: "button",
742
743
  class: "wm-peek__close",
@@ -784,11 +785,11 @@ function We(t, e, n, a, r, s) {
784
785
  key: 0,
785
786
  class: "wm-launcher__badge",
786
787
  "aria-label": `${n.unreadCount} conversation${n.unreadCount > 1 ? "s" : ""} non lue${n.unreadCount > 1 ? "s" : ""}`
787
- }, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, qe)) : y("", !0)
788
+ }, w(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, We)) : y("", !0)
788
789
  ])
789
790
  ]);
790
791
  }
791
- const Ke = /* @__PURE__ */ E(He, [["render", We], ["__scopeId", "data-v-fabef371"]]), Ge = {
792
+ const Ge = /* @__PURE__ */ $(ze, [["render", Ke], ["__scopeId", "data-v-fabef371"]]), Ye = {
792
793
  name: "WmAIAvatar",
793
794
  props: {
794
795
  size: { type: Number, default: 26 },
@@ -800,18 +801,18 @@ const Ke = /* @__PURE__ */ E(He, [["render", We], ["__scopeId", "data-v-fabef371
800
801
  // pour garder l'avatar pleinement arrondi.
801
802
  tail: { type: Boolean, default: !1 }
802
803
  }
803
- }, Ye = {
804
+ }, Je = {
804
805
  key: 0,
805
806
  class: "wm-aiav__pulse"
806
- }, Je = ["width", "height"];
807
- function Xe(t, e, n, a, r, s) {
807
+ }, Xe = ["width", "height"];
808
+ function Ze(t, e, n, a, r, s) {
808
809
  return l(), c("div", {
809
- class: B(["wm-aiav", { "wm-aiav--tail": n.tail }]),
810
+ class: E(["wm-aiav", { "wm-aiav--tail": n.tail }]),
810
811
  style: G({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
811
812
  }, [
812
- n.pulse ? (l(), c("div", Ye)) : y("", !0),
813
+ n.pulse ? (l(), c("div", Je)) : y("", !0),
813
814
  i("div", {
814
- class: B(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
815
+ class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
815
816
  }, [
816
817
  (l(), c("svg", {
817
818
  width: n.size * 0.5,
@@ -839,11 +840,11 @@ function Xe(t, e, n, a, r, s) {
839
840
  fill: "white",
840
841
  opacity: "0.38"
841
842
  }, null, -1)
842
- ])], 8, Je))
843
+ ])], 8, Xe))
843
844
  ], 2)
844
845
  ], 6);
845
846
  }
846
- const te = /* @__PURE__ */ E(Ge, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
847
+ const ne = /* @__PURE__ */ $(Ye, [["render", Ze], ["__scopeId", "data-v-8c924688"]]), Qe = {
847
848
  name: "WmHumanAvatar",
848
849
  props: {
849
850
  name: { type: String, default: "" },
@@ -858,8 +859,8 @@ const te = /* @__PURE__ */ E(Ge, [["render", Xe], ["__scopeId", "data-v-8c924688
858
859
  return we(this.name);
859
860
  }
860
861
  }
861
- }, Ze = ["src", "alt"];
862
- function et(t, e, n, a, r, s) {
862
+ }, et = ["src", "alt"];
863
+ function tt(t, e, n, a, r, s) {
863
864
  return l(), c("div", {
864
865
  class: "wm-huav",
865
866
  style: G({
@@ -873,13 +874,13 @@ function et(t, e, n, a, r, s) {
873
874
  key: 0,
874
875
  src: n.avatarUrl,
875
876
  alt: n.name || ""
876
- }, null, 8, Ze)) : (l(), c("span", {
877
+ }, null, 8, et)) : (l(), c("span", {
877
878
  key: 1,
878
879
  style: G({ fontSize: n.size * 0.36 + "px" })
879
- }, b(s.initials), 5))
880
+ }, w(s.initials), 5))
880
881
  ], 4);
881
882
  }
882
- const ke = /* @__PURE__ */ E(Qe, [["render", et], ["__scopeId", "data-v-a772b179"]]), tt = {
883
+ const ke = /* @__PURE__ */ $(Qe, [["render", tt], ["__scopeId", "data-v-a772b179"]]), nt = {
883
884
  name: "WmTeamAvatars",
884
885
  props: {
885
886
  members: { type: Array, default: () => [] },
@@ -901,20 +902,20 @@ const ke = /* @__PURE__ */ E(Qe, [["render", et], ["__scopeId", "data-v-a772b179
901
902
  return we(t.name || "");
902
903
  }
903
904
  }
904
- }, nt = {
905
+ }, st = {
905
906
  key: 0,
906
907
  class: "wm-team"
907
- }, st = ["src", "alt"], rt = { key: 1 }, it = {
908
+ }, rt = ["src", "alt"], it = { key: 1 }, at = {
908
909
  key: 0,
909
910
  class: "wm-team__label"
910
911
  };
911
- function at(t, e, n, a, r, s) {
912
- return s.visible ? (l(), c("div", nt, [
912
+ function ot(t, e, n, a, r, s) {
913
+ return s.visible ? (l(), c("div", st, [
913
914
  i("div", {
914
915
  class: "wm-team__stack",
915
916
  style: G({ width: s.stackWidth + "px" })
916
917
  }, [
917
- (l(!0), c(T, null, D(n.members.slice(0, 3), (o, d) => (l(), c("div", {
918
+ (l(!0), c(M, null, D(n.members.slice(0, 3), (o, d) => (l(), c("div", {
918
919
  key: d,
919
920
  class: "wm-team__pill",
920
921
  style: G({ left: d * 13 + "px", zIndex: 3 - d, background: s.colorFor(o) })
@@ -923,15 +924,15 @@ function at(t, e, n, a, r, s) {
923
924
  key: 0,
924
925
  src: o.avatar_url,
925
926
  alt: o.name || ""
926
- }, null, 8, st)) : (l(), c("span", rt, b(s.initialsFor(o)), 1))
927
+ }, null, 8, rt)) : (l(), c("span", it, w(s.initialsFor(o)), 1))
927
928
  ], 4))), 128))
928
929
  ], 4),
929
- n.responseLabel ? (l(), c("span", it, b(n.responseLabel), 1)) : y("", !0)
930
+ n.responseLabel ? (l(), c("span", at, w(n.responseLabel), 1)) : y("", !0)
930
931
  ])) : y("", !0);
931
932
  }
932
- const ot = /* @__PURE__ */ E(tt, [["render", at], ["__scopeId", "data-v-3659b9c1"]]), lt = {
933
+ const lt = /* @__PURE__ */ $(nt, [["render", ot], ["__scopeId", "data-v-3659b9c1"]]), dt = {
933
934
  name: "WmHeader",
934
- components: { AIAvatar: te, HumanAvatar: ke, TeamAvatars: ot },
935
+ components: { AIAvatar: ne, HumanAvatar: ke, TeamAvatars: lt },
935
936
  props: {
936
937
  title: { type: String, default: "Nouvelle conversation" },
937
938
  escalated: { type: Boolean, default: !1 },
@@ -962,19 +963,19 @@ const ot = /* @__PURE__ */ E(tt, [["render", at], ["__scopeId", "data-v-3659b9c1
962
963
  return this.escalated && this.agentName ? this.agentName : "En ligne";
963
964
  }
964
965
  }
965
- }, dt = { class: "wm-header" }, ct = {
966
+ }, ct = { class: "wm-header" }, ut = {
966
967
  key: 1,
967
968
  style: { width: "30px", height: "30px", "flex-shrink": "0" }
968
- }, ut = { class: "wm-header__avatar" }, ht = { class: "wm-header__main" }, mt = { class: "wm-header__title" }, ft = {
969
+ }, ht = { class: "wm-header__avatar" }, mt = { class: "wm-header__main" }, ft = { class: "wm-header__title" }, _t = {
969
970
  key: 0,
970
971
  class: "wm-header__sub"
971
- }, _t = { class: "wm-header__status" }, pt = {
972
+ }, pt = { class: "wm-header__status" }, vt = {
972
973
  key: 3,
973
974
  class: "wm-header__fill"
974
- }, vt = { class: "wm-header__actions" };
975
- function gt(t, e, n, a, r, s) {
976
- const o = I("HumanAvatar"), d = I("AIAvatar"), v = I("TeamAvatars");
977
- return l(), c("div", dt, [
975
+ }, gt = { class: "wm-header__actions" };
976
+ function yt(t, e, n, a, r, s) {
977
+ const o = B("HumanAvatar"), d = B("AIAvatar"), v = B("TeamAvatars");
978
+ return l(), c("div", ct, [
978
979
  n.showBack ? (l(), c("button", {
979
980
  key: 0,
980
981
  type: "button",
@@ -995,39 +996,39 @@ function gt(t, e, n, a, r, s) {
995
996
  }, [
996
997
  i("path", { d: "M19 12H5M12 5l-7 7 7 7" })
997
998
  ], -1)
998
- ])])) : (l(), c("div", ct)),
999
- n.showIdentity ? (l(), c(T, { key: 2 }, [
1000
- i("div", ut, [
1001
- n.escalated ? (l(), $(o, {
999
+ ])])) : (l(), c("div", ut)),
1000
+ n.showIdentity ? (l(), c(M, { key: 2 }, [
1001
+ i("div", ht, [
1002
+ n.escalated ? (l(), L(o, {
1002
1003
  key: 0,
1003
1004
  name: n.agentName,
1004
1005
  "avatar-url": n.agentAvatarUrl,
1005
1006
  size: 34
1006
- }, null, 8, ["name", "avatar-url"])) : (l(), $(d, {
1007
+ }, null, 8, ["name", "avatar-url"])) : (l(), L(d, {
1007
1008
  key: 1,
1008
1009
  size: 34
1009
1010
  }))
1010
1011
  ]),
1011
- i("div", ht, [
1012
- i("div", mt, b(n.title), 1),
1013
- s.showPresence ? (l(), c("div", ft, [
1014
- s.hasTeam ? (l(), $(v, {
1012
+ i("div", mt, [
1013
+ i("div", ft, w(n.title), 1),
1014
+ s.showPresence ? (l(), c("div", _t, [
1015
+ s.hasTeam ? (l(), L(v, {
1015
1016
  key: 0,
1016
1017
  members: n.teamMembers,
1017
1018
  "response-label": n.responseLabel
1018
1019
  }, null, 8, ["members", "response-label"])) : y("", !0),
1019
- i("span", _t, [
1020
+ i("span", pt, [
1020
1021
  e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
1021
- de(" " + b(s.statusText), 1)
1022
+ te(" " + w(s.statusText), 1)
1022
1023
  ])
1023
1024
  ])) : y("", !0)
1024
1025
  ])
1025
- ], 64)) : (l(), c("div", pt)),
1026
- i("div", vt, [
1026
+ ], 64)) : (l(), c("div", vt)),
1027
+ i("div", gt, [
1027
1028
  n.showMore ? (l(), c("button", {
1028
1029
  key: 0,
1029
1030
  type: "button",
1030
- class: B(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
1031
+ class: E(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
1031
1032
  "aria-label": "Plus d'options",
1032
1033
  title: "Plus d'options",
1033
1034
  onClick: e[1] || (e[1] = (k) => t.$emit("more"))
@@ -1081,23 +1082,23 @@ function gt(t, e, n, a, r, s) {
1081
1082
  ])
1082
1083
  ]);
1083
1084
  }
1084
- const yt = /* @__PURE__ */ E(lt, [["render", gt], ["__scopeId", "data-v-b5f5f6a9"]]), _e = {
1085
+ const wt = /* @__PURE__ */ $(dt, [["render", yt], ["__scopeId", "data-v-b5f5f6a9"]]), _e = {
1085
1086
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
1086
1087
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
1087
1088
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
1088
1089
  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",
1089
1090
  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"
1090
- }, wt = {
1091
+ }, bt = {
1091
1092
  name: "WmOnboarding",
1092
- components: { AIAvatar: te },
1093
+ components: { AIAvatar: ne },
1093
1094
  props: {
1094
1095
  welcomeMessage: { type: String, default: "" },
1095
1096
  agentName: { type: String, default: "" },
1096
1097
  quickLinks: { type: Array, default: () => [] },
1097
- unreadThreads: { type: Array, default: () => [] },
1098
+ openThreads: { type: Array, default: () => [] },
1098
1099
  busy: { type: Boolean, default: !1 }
1099
1100
  },
1100
- emits: ["start", "select", "resume"],
1101
+ emits: ["start", "select", "resume", "view-all"],
1101
1102
  computed: {
1102
1103
  heroTitle() {
1103
1104
  return this.welcomeMessage ? this.welcomeMessage : this.agentName ? `Bonjour, je suis ${this.agentName}` : "Bonjour, je suis votre assistant";
@@ -1112,13 +1113,10 @@ Je réponds en quelques secondes.`;
1112
1113
  return _e[t] || _e.link;
1113
1114
  }
1114
1115
  }
1115
- }, bt = { class: "wm-onb" }, kt = { class: "wm-onb__hero" }, Ct = { class: "wm-onb__title" }, At = { class: "wm-onb__sub" }, St = {
1116
+ }, kt = { class: "wm-onb" }, Ct = { class: "wm-onb__hero" }, At = { class: "wm-onb__title" }, St = { class: "wm-onb__sub" }, xt = {
1116
1117
  key: 0,
1117
1118
  class: "wm-onb__section"
1118
- }, xt = { class: "wm-onb__links" }, Tt = ["onClick"], Mt = { class: "wm-onb__resume-body" }, Ot = { class: "wm-onb__resume-title" }, It = { class: "wm-onb__resume-preview" }, Bt = {
1119
- key: 1,
1120
- class: "wm-onb__section"
1121
- }, Et = { class: "wm-onb__links" }, $t = ["onClick"], Lt = { class: "wm-onb__link-icon" }, Rt = {
1119
+ }, Tt = { class: "wm-onb__links" }, Mt = ["onClick"], Ot = { class: "wm-onb__link-icon" }, It = {
1122
1120
  width: "14",
1123
1121
  height: "14",
1124
1122
  viewBox: "0 0 24 24",
@@ -1128,29 +1126,72 @@ Je réponds en quelques secondes.`;
1128
1126
  "stroke-linecap": "round",
1129
1127
  "stroke-linejoin": "round",
1130
1128
  "aria-hidden": "true"
1131
- }, Ft = ["d"], Dt = { class: "wm-onb__link-label" }, Nt = { class: "wm-onb__cta" }, jt = ["disabled"];
1132
- function Ut(t, e, n, a, r, s) {
1133
- const o = I("AIAvatar");
1134
- return l(), c("div", bt, [
1135
- i("div", kt, [
1129
+ }, Bt = ["d"], Et = { class: "wm-onb__link-label" }, $t = {
1130
+ key: 1,
1131
+ class: "wm-onb__section"
1132
+ }, Lt = { class: "wm-onb__links" }, Rt = ["onClick"], Ft = {
1133
+ key: 0,
1134
+ class: "wm-onb__resume-dot",
1135
+ "aria-label": "Non lu"
1136
+ }, Dt = { class: "wm-onb__resume-body" }, Nt = { class: "wm-onb__resume-title" }, jt = { class: "wm-onb__resume-preview" }, Ut = { class: "wm-onb__cta" }, Pt = ["disabled"];
1137
+ function Ht(t, e, n, a, r, s) {
1138
+ const o = B("AIAvatar");
1139
+ return l(), c("div", kt, [
1140
+ i("div", Ct, [
1136
1141
  K(o, {
1137
1142
  size: 56,
1138
1143
  pulse: !0
1139
1144
  }),
1140
- i("div", Ct, b(s.heroTitle), 1),
1141
- i("div", At, b(s.heroSub), 1)
1145
+ i("div", At, w(s.heroTitle), 1),
1146
+ i("div", St, w(s.heroSub), 1)
1142
1147
  ]),
1143
- n.unreadThreads.length ? (l(), c("div", St, [
1144
- e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Messages non lus", -1)),
1145
- i("div", xt, [
1146
- (l(!0), c(T, null, D(n.unreadThreads, (d) => (l(), c("button", {
1148
+ n.quickLinks.length ? (l(), c("div", xt, [
1149
+ e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
1150
+ i("div", Tt, [
1151
+ (l(!0), c(M, null, D(n.quickLinks, (d, v) => (l(), c("button", {
1152
+ key: v,
1153
+ type: "button",
1154
+ class: "wm-onb__link",
1155
+ onClick: (k) => t.$emit("select", d)
1156
+ }, [
1157
+ i("span", Ot, [
1158
+ (l(), c("svg", It, [
1159
+ i("path", {
1160
+ d: s.iconPath(d.icon)
1161
+ }, null, 8, Bt)
1162
+ ]))
1163
+ ]),
1164
+ i("span", Et, w(d.label), 1),
1165
+ e[2] || (e[2] = i("svg", {
1166
+ width: "13",
1167
+ height: "13",
1168
+ viewBox: "0 0 24 24",
1169
+ fill: "none",
1170
+ stroke: "currentColor",
1171
+ "stroke-width": "1.8",
1172
+ "stroke-linecap": "round",
1173
+ "stroke-linejoin": "round",
1174
+ class: "wm-onb__link-chev",
1175
+ "aria-hidden": "true"
1176
+ }, [
1177
+ i("path", { d: "M9 18l6-6-6-6" })
1178
+ ], -1))
1179
+ ], 8, Mt))), 128))
1180
+ ])
1181
+ ])) : y("", !0),
1182
+ n.openThreads.length ? (l(), c("div", $t, [
1183
+ e[7] || (e[7] = i("div", { class: "wm-onb__section-title" }, "Vos conversations", -1)),
1184
+ i("div", Lt, [
1185
+ (l(!0), c(M, null, D(n.openThreads, (d) => (l(), c("button", {
1147
1186
  key: d.id,
1148
1187
  type: "button",
1149
1188
  class: "wm-onb__link wm-onb__resume",
1150
1189
  onClick: (v) => t.$emit("resume", d)
1151
1190
  }, [
1152
- e[1] || (e[1] = i("span", { class: "wm-onb__link-icon wm-onb__resume-icon" }, [
1153
- i("svg", {
1191
+ i("span", {
1192
+ class: E(["wm-onb__link-icon", { "wm-onb__resume-icon": d.unread }])
1193
+ }, [
1194
+ e[4] || (e[4] = i("svg", {
1154
1195
  width: "14",
1155
1196
  height: "14",
1156
1197
  viewBox: "0 0 24 24",
@@ -1162,17 +1203,14 @@ function Ut(t, e, n, a, r, s) {
1162
1203
  "aria-hidden": "true"
1163
1204
  }, [
1164
1205
  i("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
1165
- ]),
1166
- i("span", {
1167
- class: "wm-onb__resume-dot",
1168
- "aria-label": "Non lu"
1169
- })
1170
- ], -1)),
1171
- i("span", Mt, [
1172
- i("span", Ot, b(d.title), 1),
1173
- i("span", It, b(d.preview), 1)
1206
+ ], -1)),
1207
+ d.unread ? (l(), c("span", Ft)) : y("", !0)
1208
+ ], 2),
1209
+ i("span", Dt, [
1210
+ i("span", Nt, w(d.title), 1),
1211
+ i("span", jt, w(d.preview), 1)
1174
1212
  ]),
1175
- e[2] || (e[2] = i("svg", {
1213
+ e[5] || (e[5] = i("svg", {
1176
1214
  width: "13",
1177
1215
  height: "13",
1178
1216
  viewBox: "0 0 24 24",
@@ -1186,58 +1224,44 @@ function Ut(t, e, n, a, r, s) {
1186
1224
  }, [
1187
1225
  i("path", { d: "M9 18l6-6-6-6" })
1188
1226
  ], -1))
1189
- ], 8, Tt))), 128))
1190
- ])
1191
- ])) : y("", !0),
1192
- n.quickLinks.length ? (l(), c("div", Bt, [
1193
- e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
1194
- i("div", Et, [
1195
- (l(!0), c(T, null, D(n.quickLinks, (d, v) => (l(), c("button", {
1196
- key: v,
1227
+ ], 8, Rt))), 128)),
1228
+ i("button", {
1197
1229
  type: "button",
1198
- class: "wm-onb__link",
1199
- onClick: (k) => t.$emit("select", d)
1200
- }, [
1201
- i("span", Lt, [
1202
- (l(), c("svg", Rt, [
1203
- i("path", {
1204
- d: s.iconPath(d.icon)
1205
- }, null, 8, Ft)
1206
- ]))
1207
- ]),
1208
- i("span", Dt, b(d.label), 1),
1209
- e[4] || (e[4] = i("svg", {
1210
- width: "13",
1211
- height: "13",
1230
+ class: "wm-onb__viewAll",
1231
+ onClick: e[0] || (e[0] = (d) => t.$emit("view-all"))
1232
+ }, [...e[6] || (e[6] = [
1233
+ te(" Voir toutes les conversations ", -1),
1234
+ i("svg", {
1235
+ width: "12",
1236
+ height: "12",
1212
1237
  viewBox: "0 0 24 24",
1213
1238
  fill: "none",
1214
1239
  stroke: "currentColor",
1215
1240
  "stroke-width": "1.8",
1216
1241
  "stroke-linecap": "round",
1217
1242
  "stroke-linejoin": "round",
1218
- class: "wm-onb__link-chev",
1219
1243
  "aria-hidden": "true"
1220
1244
  }, [
1221
1245
  i("path", { d: "M9 18l6-6-6-6" })
1222
- ], -1))
1223
- ], 8, $t))), 128))
1246
+ ], -1)
1247
+ ])])
1224
1248
  ])
1225
1249
  ])) : y("", !0),
1226
- i("div", Nt, [
1250
+ i("div", Ut, [
1227
1251
  i("button", {
1228
1252
  type: "button",
1229
1253
  class: "wm-onb__startBtn",
1230
1254
  disabled: n.busy,
1231
- onClick: e[0] || (e[0] = (d) => t.$emit("start"))
1232
- }, b(n.busy ? "…" : "Commencer une conversation"), 9, jt)
1255
+ onClick: e[1] || (e[1] = (d) => t.$emit("start"))
1256
+ }, w(n.busy ? "…" : "Commencer une conversation"), 9, Pt)
1233
1257
  ])
1234
1258
  ]);
1235
1259
  }
1236
- const Pt = /* @__PURE__ */ E(wt, [["render", Ut], ["__scopeId", "data-v-bd89bc8f"]]);
1237
- function Ht(t) {
1260
+ const zt = /* @__PURE__ */ $(bt, [["render", Ht], ["__scopeId", "data-v-13584fe8"]]);
1261
+ function Vt(t) {
1238
1262
  return typeof t != "string" ? "" : t.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
1239
1263
  }
1240
- const zt = {
1264
+ const qt = {
1241
1265
  name: "WmActionResult",
1242
1266
  props: {
1243
1267
  state: { type: String, default: "success" },
@@ -1247,13 +1271,13 @@ const zt = {
1247
1271
  },
1248
1272
  computed: {
1249
1273
  detailText() {
1250
- return Ht(this.detail);
1274
+ return Vt(this.detail);
1251
1275
  }
1252
1276
  }
1253
- }, Vt = {
1277
+ }, Wt = {
1254
1278
  class: "wm-result__icon",
1255
1279
  "aria-hidden": "true"
1256
- }, qt = {
1280
+ }, Kt = {
1257
1281
  key: 0,
1258
1282
  width: "11",
1259
1283
  height: "11",
@@ -1263,7 +1287,7 @@ const zt = {
1263
1287
  "stroke-width": "2.8",
1264
1288
  "stroke-linecap": "round",
1265
1289
  "stroke-linejoin": "round"
1266
- }, Wt = {
1290
+ }, Gt = {
1267
1291
  key: 1,
1268
1292
  width: "11",
1269
1293
  height: "11",
@@ -1273,7 +1297,7 @@ const zt = {
1273
1297
  "stroke-width": "2.6",
1274
1298
  "stroke-linecap": "round",
1275
1299
  "stroke-linejoin": "round"
1276
- }, Kt = {
1300
+ }, Yt = {
1277
1301
  key: 2,
1278
1302
  width: "11",
1279
1303
  height: "11",
@@ -1283,7 +1307,7 @@ const zt = {
1283
1307
  "stroke-width": "2.4",
1284
1308
  "stroke-linecap": "round",
1285
1309
  "stroke-linejoin": "round"
1286
- }, Gt = {
1310
+ }, Jt = {
1287
1311
  key: 3,
1288
1312
  width: "12",
1289
1313
  height: "12",
@@ -1293,24 +1317,24 @@ const zt = {
1293
1317
  "stroke-width": "2.2",
1294
1318
  "stroke-linecap": "round",
1295
1319
  "stroke-linejoin": "round"
1296
- }, Yt = { class: "wm-result__body" }, Jt = { class: "wm-result__label" }, Xt = { class: "wm-result__detail" };
1297
- function Qt(t, e, n, a, r, s) {
1320
+ }, Xt = { class: "wm-result__body" }, Zt = { class: "wm-result__label" }, Qt = { class: "wm-result__detail" };
1321
+ function en(t, e, n, a, r, s) {
1298
1322
  return l(), c("div", {
1299
- class: B(["wm-result", `wm-result--${n.state}`])
1323
+ class: E(["wm-result", `wm-result--${n.state}`])
1300
1324
  }, [
1301
- i("span", Vt, [
1302
- n.state === "success" ? (l(), c("svg", qt, [...e[0] || (e[0] = [
1325
+ i("span", Wt, [
1326
+ n.state === "success" ? (l(), c("svg", Kt, [...e[0] || (e[0] = [
1303
1327
  i("path", { d: "M20 6L9 17l-5-5" }, null, -1)
1304
- ])])) : n.state === "rejected" ? (l(), c("svg", Wt, [...e[1] || (e[1] = [
1328
+ ])])) : n.state === "rejected" ? (l(), c("svg", Gt, [...e[1] || (e[1] = [
1305
1329
  i("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
1306
- ])])) : n.state === "awaiting" ? (l(), c("svg", Kt, [...e[2] || (e[2] = [
1330
+ ])])) : n.state === "awaiting" ? (l(), c("svg", Yt, [...e[2] || (e[2] = [
1307
1331
  i("circle", {
1308
1332
  cx: "12",
1309
1333
  cy: "12",
1310
1334
  r: "10"
1311
1335
  }, null, -1),
1312
1336
  i("polyline", { points: "12 7 12 12 15 14" }, null, -1)
1313
- ])])) : (l(), c("svg", Gt, [...e[3] || (e[3] = [
1337
+ ])])) : (l(), c("svg", Jt, [...e[3] || (e[3] = [
1314
1338
  i("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
1315
1339
  i("line", {
1316
1340
  x1: "12",
@@ -1326,19 +1350,19 @@ function Qt(t, e, n, a, r, s) {
1326
1350
  }, null, -1)
1327
1351
  ])]))
1328
1352
  ]),
1329
- i("span", Yt, [
1330
- i("span", Jt, b(n.label), 1),
1331
- s.detailText ? (l(), c(T, { key: 0 }, [
1353
+ i("span", Xt, [
1354
+ i("span", Zt, w(n.label), 1),
1355
+ s.detailText ? (l(), c(M, { key: 0 }, [
1332
1356
  e[4] || (e[4] = i("span", {
1333
1357
  class: "wm-result__sep",
1334
1358
  "aria-hidden": "true"
1335
1359
  }, " · ", -1)),
1336
- i("span", Xt, b(s.detailText), 1)
1360
+ i("span", Qt, w(s.detailText), 1)
1337
1361
  ], 64)) : y("", !0)
1338
1362
  ])
1339
1363
  ], 2);
1340
1364
  }
1341
- const Zt = /* @__PURE__ */ E(zt, [["render", Qt], ["__scopeId", "data-v-64a83fb8"]]), en = {
1365
+ const tn = /* @__PURE__ */ $(qt, [["render", en], ["__scopeId", "data-v-64a83fb8"]]), nn = {
1342
1366
  name: "WmArtifactFormResponse",
1343
1367
  props: {
1344
1368
  data: { type: Object, required: !0 }
@@ -1349,11 +1373,11 @@ const Zt = /* @__PURE__ */ E(zt, [["render", Qt], ["__scopeId", "data-v-64a83fb8
1349
1373
  return Array.isArray((t = this.data) == null ? void 0 : t.fields) ? this.data.fields : [];
1350
1374
  }
1351
1375
  }
1352
- }, tn = { class: "wm-art wm-art--formResponse" }, nn = { class: "wm-art__head" }, sn = { class: "wm-art__title" }, rn = { class: "wm-art__body" }, an = { class: "wm-art__fieldLabel" };
1353
- function on(t, e, n, a, r, s) {
1354
- return l(), c("div", tn, [
1355
- i("div", nn, [
1356
- i("div", sn, b(n.data.title || "Formulaire"), 1),
1376
+ }, sn = { class: "wm-art wm-art--formResponse" }, rn = { class: "wm-art__head" }, an = { class: "wm-art__title" }, on = { class: "wm-art__body" }, ln = { class: "wm-art__fieldLabel" };
1377
+ function dn(t, e, n, a, r, s) {
1378
+ return l(), c("div", sn, [
1379
+ i("div", rn, [
1380
+ i("div", an, w(n.data.title || "Formulaire"), 1),
1357
1381
  e[0] || (e[0] = i("span", { class: "wm-art__badge wm-art__badge--success" }, [
1358
1382
  i("svg", {
1359
1383
  width: "11",
@@ -1368,23 +1392,23 @@ function on(t, e, n, a, r, s) {
1368
1392
  }, [
1369
1393
  i("polyline", { points: "20 6 9 17 4 12" })
1370
1394
  ]),
1371
- de(" Envoyé ")
1395
+ te(" Envoyé ")
1372
1396
  ], -1))
1373
1397
  ]),
1374
- i("div", rn, [
1375
- (l(!0), c(T, null, D(s.fields, (o, d) => (l(), c("div", {
1398
+ i("div", on, [
1399
+ (l(!0), c(M, null, D(s.fields, (o, d) => (l(), c("div", {
1376
1400
  key: d,
1377
1401
  class: "wm-art__field"
1378
1402
  }, [
1379
- i("div", an, b(o.label), 1),
1403
+ i("div", ln, w(o.label), 1),
1380
1404
  i("div", {
1381
- class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1382
- }, b(o.value), 3)
1405
+ class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1406
+ }, w(o.value), 3)
1383
1407
  ]))), 128))
1384
1408
  ])
1385
1409
  ]);
1386
1410
  }
1387
- const ln = /* @__PURE__ */ E(en, [["render", on], ["__scopeId", "data-v-ca24a9c9"]]), dn = {
1411
+ const cn = /* @__PURE__ */ $(nn, [["render", dn], ["__scopeId", "data-v-ca24a9c9"]]), un = {
1388
1412
  name: "WmArtifactInfoCard",
1389
1413
  props: {
1390
1414
  data: { type: Object, required: !0 }
@@ -1399,61 +1423,61 @@ const ln = /* @__PURE__ */ E(en, [["render", on], ["__scopeId", "data-v-ca24a9c9
1399
1423
  return !!((t = this.data) != null && t.body) || this.fields.length > 0;
1400
1424
  }
1401
1425
  }
1402
- }, cn = { class: "wm-art wm-art--infoCard" }, un = {
1426
+ }, hn = { class: "wm-art wm-art--infoCard" }, mn = {
1403
1427
  key: 0,
1404
1428
  class: "wm-art__image"
1405
- }, hn = ["src", "alt"], mn = { class: "wm-art__head" }, fn = { class: "wm-art__headMain" }, _n = { class: "wm-art__title" }, pn = {
1429
+ }, fn = ["src", "alt"], _n = { class: "wm-art__head" }, pn = { class: "wm-art__headMain" }, vn = { class: "wm-art__title" }, gn = {
1406
1430
  key: 0,
1407
1431
  class: "wm-art__subtitle"
1408
- }, vn = {
1432
+ }, yn = {
1409
1433
  key: 1,
1410
1434
  class: "wm-art__body"
1411
- }, gn = {
1435
+ }, wn = {
1412
1436
  key: 0,
1413
1437
  class: "wm-art__text"
1414
- }, yn = { class: "wm-art__fieldLabel" };
1415
- function wn(t, e, n, a, r, s) {
1416
- return l(), c("div", cn, [
1417
- n.data.image_url ? (l(), c("figure", un, [
1438
+ }, bn = { class: "wm-art__fieldLabel" };
1439
+ function kn(t, e, n, a, r, s) {
1440
+ return l(), c("div", hn, [
1441
+ n.data.image_url ? (l(), c("figure", mn, [
1418
1442
  i("img", {
1419
1443
  src: n.data.image_url,
1420
1444
  alt: n.data.title || "",
1421
1445
  loading: "lazy"
1422
- }, null, 8, hn)
1446
+ }, null, 8, fn)
1423
1447
  ])) : y("", !0),
1424
- i("div", mn, [
1425
- i("div", fn, [
1426
- i("div", _n, b(n.data.title), 1),
1427
- n.data.subtitle ? (l(), c("div", pn, b(n.data.subtitle), 1)) : y("", !0)
1448
+ i("div", _n, [
1449
+ i("div", pn, [
1450
+ i("div", vn, w(n.data.title), 1),
1451
+ n.data.subtitle ? (l(), c("div", gn, w(n.data.subtitle), 1)) : y("", !0)
1428
1452
  ]),
1429
1453
  n.data.badge && n.data.badge.label ? (l(), c("span", {
1430
1454
  key: 0,
1431
- class: B(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
1432
- }, b(n.data.badge.label), 3)) : y("", !0)
1455
+ class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
1456
+ }, w(n.data.badge.label), 3)) : y("", !0)
1433
1457
  ]),
1434
- s.hasBody ? (l(), c("div", vn, [
1435
- n.data.body ? (l(), c("div", gn, b(n.data.body), 1)) : y("", !0),
1436
- s.fields.length ? (l(!0), c(T, { key: 1 }, D(s.fields, (o, d) => (l(), c("div", {
1458
+ s.hasBody ? (l(), c("div", yn, [
1459
+ n.data.body ? (l(), c("div", wn, w(n.data.body), 1)) : y("", !0),
1460
+ s.fields.length ? (l(!0), c(M, { key: 1 }, D(s.fields, (o, d) => (l(), c("div", {
1437
1461
  key: d,
1438
1462
  class: "wm-art__field"
1439
1463
  }, [
1440
- i("div", yn, b(o.label), 1),
1464
+ i("div", bn, w(o.label), 1),
1441
1465
  i("div", {
1442
- class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1443
- }, b(o.value), 3)
1466
+ class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1467
+ }, w(o.value), 3)
1444
1468
  ]))), 128)) : y("", !0)
1445
1469
  ])) : y("", !0)
1446
1470
  ]);
1447
1471
  }
1448
- const bn = /* @__PURE__ */ E(dn, [["render", wn], ["__scopeId", "data-v-d7369333"]]);
1449
- function kn(t) {
1472
+ const Cn = /* @__PURE__ */ $(un, [["render", kn], ["__scopeId", "data-v-d7369333"]]);
1473
+ function An(t) {
1450
1474
  if (!t) return "";
1451
1475
  const e = new Date(t);
1452
1476
  if (Number.isNaN(e.getTime())) return t;
1453
1477
  const n = e.toLocaleDateString("fr-FR", { day: "numeric", month: "long", year: "numeric" }), a = e.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
1454
1478
  return `${n} à ${a}`;
1455
1479
  }
1456
- const Cn = {
1480
+ const Sn = {
1457
1481
  name: "WmArtifactTicket",
1458
1482
  props: {
1459
1483
  data: { type: Object, required: !0 }
@@ -1465,7 +1489,7 @@ const Cn = {
1465
1489
  },
1466
1490
  formattedDate() {
1467
1491
  var t;
1468
- return kn((t = this.data) == null ? void 0 : t.created_at);
1492
+ return An((t = this.data) == null ? void 0 : t.created_at);
1469
1493
  }
1470
1494
  },
1471
1495
  methods: {
@@ -1487,13 +1511,13 @@ const Cn = {
1487
1511
  return /high|haute|élev|elev|critic|critiq|urgent/.test(e) ? 3 : /low|basse|faible|minor/.test(e) ? 1 : 2;
1488
1512
  }
1489
1513
  }
1490
- }, An = { class: "wm-art wm-art--ticket" }, Sn = { class: "wm-art__head wm-tk__head" }, xn = { class: "wm-art__title wm-tk__title" }, Tn = { class: "wm-tk__sub" }, Mn = { class: "wm-tk__ref" }, On = {
1514
+ }, xn = { class: "wm-art wm-art--ticket" }, Tn = { class: "wm-art__head wm-tk__head" }, Mn = { class: "wm-art__title wm-tk__title" }, On = { class: "wm-tk__sub" }, In = { class: "wm-tk__ref" }, Bn = {
1491
1515
  key: 0,
1492
1516
  class: "wm-tk__text"
1493
- }, In = {
1517
+ }, En = {
1494
1518
  key: 0,
1495
1519
  class: "wm-art__body"
1496
- }, Bn = { class: "wm-art__fieldLabel" }, En = ["data-level"], $n = {
1520
+ }, $n = { class: "wm-art__fieldLabel" }, Ln = ["data-level"], Rn = {
1497
1521
  key: 1,
1498
1522
  class: "wm-tk__date",
1499
1523
  width: "12",
@@ -1505,16 +1529,16 @@ const Cn = {
1505
1529
  "stroke-linecap": "round",
1506
1530
  "stroke-linejoin": "round",
1507
1531
  "aria-hidden": "true"
1508
- }, Ln = {
1532
+ }, Fn = {
1509
1533
  key: 1,
1510
1534
  class: "wm-art__footer wm-tk__footer"
1511
1535
  };
1512
- function Rn(t, e, n, a, r, s) {
1513
- return l(), c("div", An, [
1514
- i("div", Sn, [
1515
- i("div", xn, b(n.data.title), 1),
1516
- i("div", Tn, [
1517
- i("div", Mn, [
1536
+ function Dn(t, e, n, a, r, s) {
1537
+ return l(), c("div", xn, [
1538
+ i("div", Tn, [
1539
+ i("div", Mn, w(n.data.title), 1),
1540
+ i("div", On, [
1541
+ i("div", In, [
1518
1542
  e[0] || (e[0] = i("svg", {
1519
1543
  width: "11",
1520
1544
  height: "11",
@@ -1529,28 +1553,28 @@ function Rn(t, e, n, a, r, s) {
1529
1553
  i("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
1530
1554
  i("path", { d: "M13 5v2M13 17v2M13 11v2" })
1531
1555
  ], -1)),
1532
- i("span", null, b(n.data.reference), 1)
1556
+ i("span", null, w(n.data.reference), 1)
1533
1557
  ]),
1534
1558
  i("span", {
1535
- class: B(["wm-art__badge", "wm-tk__badge", `wm-art__badge--${n.data.status.tone || "neutral"}`])
1559
+ class: E(["wm-art__badge", "wm-tk__badge", `wm-art__badge--${n.data.status.tone || "neutral"}`])
1536
1560
  }, [
1537
1561
  e[1] || (e[1] = i("span", {
1538
1562
  class: "wm-tk__dot",
1539
1563
  "aria-hidden": "true"
1540
1564
  }, null, -1)),
1541
- de(" " + b(n.data.status.label), 1)
1565
+ te(" " + w(n.data.status.label), 1)
1542
1566
  ], 2)
1543
1567
  ]),
1544
- n.data.body ? (l(), c("div", On, b(n.data.body), 1)) : y("", !0)
1568
+ n.data.body ? (l(), c("div", Bn, w(n.data.body), 1)) : y("", !0)
1545
1569
  ]),
1546
- s.fields.length ? (l(), c("div", In, [
1547
- (l(!0), c(T, null, D(s.fields, (o, d) => (l(), c("div", {
1570
+ s.fields.length ? (l(), c("div", En, [
1571
+ (l(!0), c(M, null, D(s.fields, (o, d) => (l(), c("div", {
1548
1572
  key: d,
1549
1573
  class: "wm-art__field"
1550
1574
  }, [
1551
- i("div", Bn, b(o.label), 1),
1575
+ i("div", $n, w(o.label), 1),
1552
1576
  i("div", {
1553
- class: B(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1577
+ class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1554
1578
  }, [
1555
1579
  s.isPriority(o.label) ? (l(), c("svg", {
1556
1580
  key: 0,
@@ -1582,7 +1606,7 @@ function Rn(t, e, n, a, r, s) {
1582
1606
  height: "9",
1583
1607
  rx: "0.5"
1584
1608
  }, null, -1)
1585
- ])], 8, En)) : s.isDate(o.label) ? (l(), c("svg", $n, [...e[3] || (e[3] = [
1609
+ ])], 8, Ln)) : s.isDate(o.label) ? (l(), c("svg", Rn, [...e[3] || (e[3] = [
1586
1610
  i("rect", {
1587
1611
  x: "3",
1588
1612
  y: "4",
@@ -1592,11 +1616,11 @@ function Rn(t, e, n, a, r, s) {
1592
1616
  }, null, -1),
1593
1617
  i("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
1594
1618
  ])])) : y("", !0),
1595
- i("span", null, b(o.value), 1)
1619
+ i("span", null, w(o.value), 1)
1596
1620
  ], 2)
1597
1621
  ]))), 128))
1598
1622
  ])) : y("", !0),
1599
- n.data.created_at ? (l(), c("div", Ln, [
1623
+ n.data.created_at ? (l(), c("div", Fn, [
1600
1624
  e[4] || (e[4] = i("svg", {
1601
1625
  width: "11",
1602
1626
  height: "11",
@@ -1617,15 +1641,15 @@ function Rn(t, e, n, a, r, s) {
1617
1641
  }),
1618
1642
  i("path", { d: "M16 2v4M8 2v4M3 10h18" })
1619
1643
  ], -1)),
1620
- i("span", null, b(s.formattedDate), 1)
1644
+ i("span", null, w(s.formattedDate), 1)
1621
1645
  ])) : y("", !0)
1622
1646
  ]);
1623
1647
  }
1624
- const Fn = /* @__PURE__ */ E(Cn, [["render", Rn], ["__scopeId", "data-v-8b274eb7"]]), Dn = {
1625
- form_response: ln,
1626
- info_card: bn,
1627
- ticket: Fn
1628
- }, Nn = {
1648
+ const Nn = /* @__PURE__ */ $(Sn, [["render", Dn], ["__scopeId", "data-v-8b274eb7"]]), jn = {
1649
+ form_response: cn,
1650
+ info_card: Cn,
1651
+ ticket: Nn
1652
+ }, Un = {
1629
1653
  name: "WmArtifactRenderer",
1630
1654
  props: {
1631
1655
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -1636,17 +1660,17 @@ const Fn = /* @__PURE__ */ E(Cn, [["render", Rn], ["__scopeId", "data-v-8b274eb7
1636
1660
  component() {
1637
1661
  var e;
1638
1662
  const t = (e = this.artifact) == null ? void 0 : e.kind;
1639
- return t && Dn[t] || null;
1663
+ return t && jn[t] || null;
1640
1664
  }
1641
1665
  }
1642
1666
  };
1643
- function jn(t, e, n, a, r, s) {
1644
- return s.component ? (l(), $(Te(s.component), {
1667
+ function Pn(t, e, n, a, r, s) {
1668
+ return s.component ? (l(), L(Me(s.component), {
1645
1669
  key: 0,
1646
1670
  data: n.artifact.data
1647
1671
  }, null, 8, ["data"])) : y("", !0);
1648
1672
  }
1649
- const Un = /* @__PURE__ */ E(Nn, [["render", jn]]), Pn = {
1673
+ const Hn = /* @__PURE__ */ $(Un, [["render", Pn]]), zn = {
1650
1674
  name: "WmAttachmentPreview",
1651
1675
  inject: {
1652
1676
  signAttachmentFn: { default: null }
@@ -1700,17 +1724,17 @@ const Un = /* @__PURE__ */ E(Nn, [["render", jn]]), Pn = {
1700
1724
  this.url || t.preventDefault();
1701
1725
  }
1702
1726
  }
1703
- }, Hn = ["href"], zn = ["src", "alt"], Vn = ["src"], qn = ["src"], Wn = ["href", "download"], Kn = { class: "wm-att__main" }, Gn = { class: "wm-att__name" }, Yn = {
1727
+ }, Vn = ["href"], qn = ["src", "alt"], Wn = ["src"], Kn = ["src"], Gn = ["href", "download"], Yn = { class: "wm-att__main" }, Jn = { class: "wm-att__name" }, Xn = {
1704
1728
  key: 0,
1705
1729
  class: "wm-att__meta"
1706
- }, Jn = {
1730
+ }, Zn = {
1707
1731
  key: 0,
1708
1732
  class: "wm-att__spin",
1709
1733
  "aria-hidden": "true"
1710
1734
  };
1711
- function Xn(t, e, n, a, r, s) {
1735
+ function Qn(t, e, n, a, r, s) {
1712
1736
  return l(), c("div", {
1713
- class: B(["wm-att", ["wm-att--" + (s.kind || "file")]])
1737
+ class: E(["wm-att", ["wm-att--" + (s.kind || "file")]])
1714
1738
  }, [
1715
1739
  s.kind === "image" && r.url ? (l(), c("a", {
1716
1740
  key: 0,
@@ -1723,18 +1747,18 @@ function Xn(t, e, n, a, r, s) {
1723
1747
  src: r.url,
1724
1748
  alt: s.displayName,
1725
1749
  loading: "lazy"
1726
- }, null, 8, zn)
1727
- ], 8, Hn)) : s.kind === "audio" && r.url ? (l(), c("audio", {
1750
+ }, null, 8, qn)
1751
+ ], 8, Vn)) : s.kind === "audio" && r.url ? (l(), c("audio", {
1728
1752
  key: 1,
1729
1753
  src: r.url,
1730
1754
  controls: "",
1731
1755
  preload: "metadata"
1732
- }, null, 8, Vn)) : s.kind === "video" && r.url ? (l(), c("video", {
1756
+ }, null, 8, Wn)) : s.kind === "video" && r.url ? (l(), c("video", {
1733
1757
  key: 2,
1734
1758
  src: r.url,
1735
1759
  controls: "",
1736
1760
  preload: "metadata"
1737
- }, null, 8, qn)) : (l(), c("a", {
1761
+ }, null, 8, Kn)) : (l(), c("a", {
1738
1762
  key: 3,
1739
1763
  class: "wm-att__file",
1740
1764
  href: r.url || "#",
@@ -1759,19 +1783,19 @@ function Xn(t, e, n, a, r, s) {
1759
1783
  i("path", { d: "M14 2v6h6" })
1760
1784
  ])
1761
1785
  ], -1)),
1762
- i("span", Kn, [
1763
- i("span", Gn, b(s.displayName), 1),
1764
- s.sizeLabel ? (l(), c("span", Yn, b(s.sizeLabel), 1)) : y("", !0)
1786
+ i("span", Yn, [
1787
+ i("span", Jn, w(s.displayName), 1),
1788
+ s.sizeLabel ? (l(), c("span", Xn, w(s.sizeLabel), 1)) : y("", !0)
1765
1789
  ]),
1766
- r.loading ? (l(), c("span", Jn)) : y("", !0)
1767
- ], 8, Wn))
1790
+ r.loading ? (l(), c("span", Zn)) : y("", !0)
1791
+ ], 8, Gn))
1768
1792
  ], 2);
1769
1793
  }
1770
- const Qn = /* @__PURE__ */ E(Pn, [["render", Xn], ["__scopeId", "data-v-1cd1267b"]]);
1771
- function Zn(t) {
1794
+ const es = /* @__PURE__ */ $(zn, [["render", Qn], ["__scopeId", "data-v-1cd1267b"]]);
1795
+ function ts(t) {
1772
1796
  return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1773
1797
  }
1774
- function es(t) {
1798
+ function ns(t) {
1775
1799
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
1776
1800
  }
1777
1801
  const pe = "";
@@ -1781,11 +1805,11 @@ function re(t) {
1781
1805
  return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
1782
1806
  const s = n.length;
1783
1807
  return n.push(r), `${pe}CODE${s}${pe}`;
1784
- }), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => es(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), e = e.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), e = e.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), e = e.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/CODE(\d+)/g, (a, r) => `<code class="wm-md-code">${n[+r]}</code>`), e;
1808
+ }), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => ns(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), e = e.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), e = e.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), e = e.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/CODE(\d+)/g, (a, r) => `<code class="wm-md-code">${n[+r]}</code>`), e;
1785
1809
  }
1786
- function ts(t) {
1810
+ function ss(t) {
1787
1811
  if (!t) return "";
1788
- const e = Zn(t).split(`
1812
+ const e = ts(t).split(`
1789
1813
  `), n = [];
1790
1814
  let a = 0;
1791
1815
  for (; a < e.length; ) {
@@ -1809,20 +1833,20 @@ function ts(t) {
1809
1833
  if (!S) break;
1810
1834
  k.push(S[1]), a++;
1811
1835
  }
1812
- const w = k.map((S) => `<li>${re(S)}</li>`).join("");
1813
- n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
1836
+ const b = k.map((S) => `<li>${re(S)}</li>`).join("");
1837
+ n.push({ type: "block", html: `<ul class="wm-md-ul">${b}</ul>` });
1814
1838
  continue;
1815
1839
  }
1816
1840
  const d = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1817
1841
  if (d) {
1818
- const k = parseInt(d[1], 10), w = [d[2]];
1842
+ const k = parseInt(d[1], 10), b = [d[2]];
1819
1843
  for (a++; a < e.length; ) {
1820
1844
  const A = /^\s*\d+\.\s+(.*)$/.exec(e[a]);
1821
1845
  if (!A) break;
1822
- w.push(A[1]), a++;
1846
+ b.push(A[1]), a++;
1823
1847
  }
1824
- const S = w.map((A) => `<li>${re(A)}</li>`).join(""), R = k !== 1 ? ` start="${k}"` : "";
1825
- n.push({ type: "block", html: `<ol class="wm-md-ol"${R}>${S}</ol>` });
1848
+ const S = b.map((A) => `<li>${re(A)}</li>`).join(""), F = k !== 1 ? ` start="${k}"` : "";
1849
+ n.push({ type: "block", html: `<ol class="wm-md-ol"${F}>${S}</ol>` });
1826
1850
  continue;
1827
1851
  }
1828
1852
  const v = /^(#{1,6})\s+(.*)$/.exec(s);
@@ -1846,7 +1870,7 @@ function ts(t) {
1846
1870
  }
1847
1871
  return r;
1848
1872
  }
1849
- const ns = {
1873
+ const rs = {
1850
1874
  name: "WmBubble",
1851
1875
  props: {
1852
1876
  role: { type: String, default: "ai" },
@@ -1855,41 +1879,41 @@ const ns = {
1855
1879
  },
1856
1880
  computed: {
1857
1881
  rendered() {
1858
- return ts(this.text);
1882
+ return ss(this.text);
1859
1883
  }
1860
1884
  }
1861
- }, ss = ["innerHTML"];
1862
- function rs(t, e, n, a, r, s) {
1885
+ }, is = ["innerHTML"];
1886
+ function as(t, e, n, a, r, s) {
1863
1887
  return l(), c("div", {
1864
- class: B(["wm-bubble", "wm-bubble--" + n.role])
1888
+ class: E(["wm-bubble", "wm-bubble--" + n.role])
1865
1889
  }, [
1866
- Me(t.$slots, "default", {}, () => [
1867
- i("span", { innerHTML: s.rendered }, null, 8, ss)
1890
+ Oe(t.$slots, "default", {}, () => [
1891
+ i("span", { innerHTML: s.rendered }, null, 8, is)
1868
1892
  ], !0)
1869
1893
  ], 2);
1870
1894
  }
1871
- const is = /* @__PURE__ */ E(ns, [["render", rs], ["__scopeId", "data-v-5c9e9f2b"]]), as = { name: "WmTyping" }, os = { class: "wm-typing" };
1872
- function ls(t, e, n, a, r, s) {
1873
- return l(), c("div", os, [...e[0] || (e[0] = [
1895
+ const os = /* @__PURE__ */ $(rs, [["render", as], ["__scopeId", "data-v-5c9e9f2b"]]), ls = { name: "WmTyping" }, ds = { class: "wm-typing" };
1896
+ function cs(t, e, n, a, r, s) {
1897
+ return l(), c("div", ds, [...e[0] || (e[0] = [
1874
1898
  i("span", { style: { "animation-delay": "0s" } }, null, -1),
1875
1899
  i("span", { style: { "animation-delay": "0.2s" } }, null, -1),
1876
1900
  i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
1877
1901
  ])]);
1878
1902
  }
1879
- const ds = /* @__PURE__ */ E(as, [["render", ls], ["__scopeId", "data-v-df2447fd"]]);
1903
+ const us = /* @__PURE__ */ $(ls, [["render", cs], ["__scopeId", "data-v-df2447fd"]]);
1880
1904
  function ee(t) {
1881
1905
  return t ? t.client_msg_id || t.id : "";
1882
1906
  }
1883
- const cs = {
1907
+ const hs = {
1884
1908
  transferred_to_human: "Conversation transférée à un humain",
1885
1909
  assigned: "{name} a rejoint la conversation",
1886
1910
  unassigned: "L'agent a quitté la conversation",
1887
1911
  resolved: "Conversation résolue",
1888
1912
  reopened: "Conversation rouverte",
1889
1913
  idle: "Conversation en pause"
1890
- }, us = 80, hs = 200, ms = {
1914
+ }, ms = 80, fs = 200, _s = {
1891
1915
  name: "WmMessageList",
1892
- components: { AIAvatar: te, HumanAvatar: ke, Bubble: is, Typing: ds, ActionResult: Zt, AttachmentPreview: Qn, ArtifactRenderer: Un },
1916
+ components: { AIAvatar: ne, HumanAvatar: ke, Bubble: os, Typing: us, ActionResult: tn, AttachmentPreview: es, ArtifactRenderer: Hn },
1893
1917
  props: {
1894
1918
  messages: { type: Array, default: () => [] },
1895
1919
  streamingActive: { type: Boolean, default: !1 },
@@ -2015,11 +2039,11 @@ const cs = {
2015
2039
  methods: {
2016
2040
  messageKey: ee,
2017
2041
  isAtBottom(t) {
2018
- return t.scrollHeight - t.scrollTop - t.clientHeight <= us;
2042
+ return t.scrollHeight - t.scrollTop - t.clientHeight <= ms;
2019
2043
  },
2020
2044
  onScroll() {
2021
2045
  const t = this.$refs.scrollEl;
2022
- t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= hs && (this._pendingLoadMore = !0, this.$emit("load-more")));
2046
+ t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= fs && (this._pendingLoadMore = !0, this.$emit("load-more")));
2023
2047
  },
2024
2048
  // Capture pre-patch scroll state and restore it on the next tick.
2025
2049
  //
@@ -2194,10 +2218,10 @@ const cs = {
2194
2218
  // adjacent à une `bubble`) : mon coin déborde le voisin et
2195
2219
  // doit garder son arrondi.
2196
2220
  cornersFor(t, e) {
2197
- var Y, z, Q;
2198
- const n = t.items, a = (Y = n[e]) == null ? void 0 : Y.kind, r = (z = n[e - 1]) == null ? void 0 : z.kind, s = (Q = n[e + 1]) == null ? void 0 : Q.kind, o = t.role === "user", d = 14, v = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, S = this.widthByKey[this.rowKeyOf(t, e)], R = this.widthByKey[this.rowKeyOf(t, e - 1)], A = this.widthByKey[this.rowKeyOf(t, e + 1)], U = 0.5, x = (W, V, Z) => W != null && S != null ? W + U >= S : V === Z || V === "card" && Z === "bubble";
2199
- let j = d, P = d, F = d, H = d;
2200
- return o ? (k && (P = v), (w || !s) && (F = v), k && x(R, k, a == null ? void 0 : a.top) && (j = v), w && x(A, w, a == null ? void 0 : a.bottom) && (H = v)) : (k && (j = v), (w || !s) && (H = v), k && x(R, k, a == null ? void 0 : a.top) && (P = v), w && x(A, w, a == null ? void 0 : a.bottom) && (F = v)), { tl: j, tr: P, br: F, bl: H };
2221
+ var Y, z, Z;
2222
+ const n = t.items, a = (Y = n[e]) == null ? void 0 : Y.kind, r = (z = n[e - 1]) == null ? void 0 : z.kind, s = (Z = n[e + 1]) == null ? void 0 : Z.kind, o = t.role === "user", d = 14, v = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, S = this.widthByKey[this.rowKeyOf(t, e)], F = this.widthByKey[this.rowKeyOf(t, e - 1)], A = this.widthByKey[this.rowKeyOf(t, e + 1)], U = 0.5, x = (W, V, Q) => W != null && S != null ? W + U >= S : V === Q || V === "card" && Q === "bubble";
2223
+ let j = d, P = d, R = d, H = d;
2224
+ return o ? (k && (P = v), (b || !s) && (R = v), k && x(F, k, a == null ? void 0 : a.top) && (j = v), b && x(A, b, a == null ? void 0 : a.bottom) && (H = v)) : (k && (j = v), (b || !s) && (H = v), k && x(F, k, a == null ? void 0 : a.top) && (P = v), b && x(A, b, a == null ? void 0 : a.bottom) && (R = v)), { tl: j, tr: P, br: R, bl: H };
2201
2225
  },
2202
2226
  // Inline style emitting the four corner CSS variables. Set on
2203
2227
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -2303,7 +2327,7 @@ const cs = {
2303
2327
  },
2304
2328
  systemLabel(t) {
2305
2329
  var r, s, o;
2306
- const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = cs[e] || (t == null ? void 0 : t.text_md) || "Mise à jour de la conversation", a = ((s = t == null ? void 0 : t.metadata) == null ? void 0 : s.agent_name) || ((o = t == null ? void 0 : t.author) == null ? void 0 : o.name) || "";
2330
+ const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = hs[e] || (t == null ? void 0 : t.text_md) || "Mise à jour de la conversation", a = ((s = t == null ? void 0 : t.metadata) == null ? void 0 : s.agent_name) || ((o = t == null ? void 0 : t.author) == null ? void 0 : o.name) || "";
2307
2331
  return n.replace("{name}", a || "Un agent");
2308
2332
  },
2309
2333
  scrollToBottom() {
@@ -2311,85 +2335,85 @@ const cs = {
2311
2335
  t && (t.scrollTop = t.scrollHeight);
2312
2336
  }
2313
2337
  }
2314
- }, fs = {
2338
+ }, ps = {
2315
2339
  key: 0,
2316
2340
  class: "wm-list__loadMore",
2317
2341
  role: "status",
2318
2342
  "aria-live": "polite"
2319
- }, _s = {
2343
+ }, vs = {
2320
2344
  key: 1,
2321
2345
  class: "wm-list__historyEnd"
2322
- }, ps = {
2346
+ }, gs = {
2323
2347
  key: 2,
2324
2348
  class: "wm-list__sep"
2325
- }, vs = { class: "wm-list__sep-label" }, gs = {
2349
+ }, ys = { class: "wm-list__sep-label" }, ws = {
2326
2350
  key: 0,
2327
2351
  class: "wm-list__sep wm-list__sep--unread"
2328
- }, ys = {
2352
+ }, bs = {
2329
2353
  key: 0,
2330
2354
  class: "wm-list__sysep"
2331
- }, ws = { class: "wm-list__sysep-label" }, bs = ["data-row-key"], ks = {
2355
+ }, ks = { class: "wm-list__sysep-label" }, Cs = ["data-row-key"], As = {
2332
2356
  key: 0,
2333
2357
  class: "wm-list__avatarSlot"
2334
- }, Cs = {
2358
+ }, Ss = {
2335
2359
  key: 5,
2336
2360
  class: "wm-list__body"
2337
- }, As = { key: 0 }, Ss = {
2361
+ }, xs = { key: 0 }, Ts = {
2338
2362
  key: 1,
2339
2363
  "aria-hidden": "true"
2340
- }, xs = { key: 2 }, Ts = {
2364
+ }, Ms = { key: 2 }, Os = {
2341
2365
  key: 3,
2342
2366
  class: "wm-list__row wm-list__row--ai fade-up"
2343
- }, Ms = { class: "wm-list__avatarSlot" };
2344
- function Os(t, e, n, a, r, s) {
2345
- const o = I("AIAvatar"), d = I("HumanAvatar"), v = I("ActionResult"), k = I("ArtifactRenderer"), w = I("Bubble"), S = I("AttachmentPreview"), R = I("Typing");
2367
+ }, Is = { class: "wm-list__avatarSlot" };
2368
+ function Bs(t, e, n, a, r, s) {
2369
+ const o = B("AIAvatar"), d = B("HumanAvatar"), v = B("ActionResult"), k = B("ArtifactRenderer"), b = B("Bubble"), S = B("AttachmentPreview"), F = B("Typing");
2346
2370
  return l(), c("div", {
2347
2371
  ref: "scrollEl",
2348
- class: B(["wm-list", { "wm-list--silent": r.silentFades }]),
2372
+ class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
2349
2373
  onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
2350
2374
  }, [
2351
- n.loadingMore ? (l(), c("div", fs, [...e[1] || (e[1] = [
2375
+ n.loadingMore ? (l(), c("div", ps, [...e[1] || (e[1] = [
2352
2376
  i("span", {
2353
2377
  class: "wm-list__loadMore-spinner",
2354
2378
  "aria-hidden": "true"
2355
2379
  }, null, -1),
2356
2380
  i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
2357
- ])])) : s.historyExhausted ? (l(), c("div", _s, "Début de la conversation")) : y("", !0),
2358
- n.dateLabel ? (l(), c("div", ps, [
2381
+ ])])) : s.historyExhausted ? (l(), c("div", vs, "Début de la conversation")) : y("", !0),
2382
+ n.dateLabel ? (l(), c("div", gs, [
2359
2383
  e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
2360
- i("span", vs, b(n.dateLabel), 1),
2384
+ i("span", ys, w(n.dateLabel), 1),
2361
2385
  e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
2362
2386
  ])) : y("", !0),
2363
- (l(!0), c(T, null, D(s.groups, (A, U) => (l(), c(T, {
2387
+ (l(!0), c(M, null, D(s.groups, (A, U) => (l(), c(M, {
2364
2388
  key: A.key
2365
2389
  }, [
2366
- A.key === s.unreadGroupKey ? (l(), c("div", gs, [...e[4] || (e[4] = [
2390
+ A.key === s.unreadGroupKey ? (l(), c("div", ws, [...e[4] || (e[4] = [
2367
2391
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
2368
2392
  i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
2369
2393
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
2370
2394
  ])])) : y("", !0),
2371
2395
  A.role === "system" || A.items.length ? (l(), c("div", {
2372
2396
  key: 1,
2373
- class: B(["wm-list__group", "wm-list__group--" + A.role])
2397
+ class: E(["wm-list__group", "wm-list__group--" + A.role])
2374
2398
  }, [
2375
- A.role === "system" ? (l(), c("div", ys, [
2399
+ A.role === "system" ? (l(), c("div", bs, [
2376
2400
  e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
2377
- i("span", ws, b(A.systemLabel), 1),
2401
+ i("span", ks, w(A.systemLabel), 1),
2378
2402
  e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
2379
- ])) : (l(), c(T, { key: 1 }, [
2380
- (l(!0), c(T, null, D(A.items, (x, j) => (l(), c("div", {
2403
+ ])) : (l(), c(M, { key: 1 }, [
2404
+ (l(!0), c(M, null, D(A.items, (x, j) => (l(), c("div", {
2381
2405
  key: `${s.messageKey(x.message)}-${x.partKey}`,
2382
2406
  "data-row-key": `${s.messageKey(x.message)}-${x.partKey}`,
2383
- class: B(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
2407
+ class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
2384
2408
  style: G(s.cornersStyle(A, j))
2385
2409
  }, [
2386
- A.role !== "user" ? (l(), c("div", ks, [
2387
- j === A.items.length - 1 ? (l(), c(T, { key: 0 }, [
2388
- A.role === "ai" ? (l(), $(o, {
2410
+ A.role !== "user" ? (l(), c("div", As, [
2411
+ j === A.items.length - 1 ? (l(), c(M, { key: 0 }, [
2412
+ A.role === "ai" ? (l(), L(o, {
2389
2413
  key: 0,
2390
2414
  size: 26,
2391
2415
  tail: !0
2392
- })) : (l(), $(d, {
2416
+ })) : (l(), L(d, {
2393
2417
  key: 1,
2394
2418
  name: A.agentName,
2395
2419
  "avatar-url": A.agentAvatarUrl,
@@ -2397,64 +2421,64 @@ function Os(t, e, n, a, r, s) {
2397
2421
  }, null, 8, ["name", "avatar-url"]))
2398
2422
  ], 64)) : y("", !0)
2399
2423
  ])) : y("", !0),
2400
- x.renderAs === "action" ? (l(), $(v, {
2424
+ x.renderAs === "action" ? (l(), L(v, {
2401
2425
  key: 1,
2402
2426
  state: x.message.payload.state,
2403
2427
  label: s.actionLabel(x.message),
2404
2428
  detail: s.actionDetail(x.message)
2405
- }, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(), $(v, {
2429
+ }, null, 8, ["state", "label", "detail"])) : x.renderAs === "admin-pending" ? (l(), L(v, {
2406
2430
  key: 2,
2407
2431
  state: "awaiting",
2408
2432
  label: "Demande d'approbation envoyée",
2409
2433
  detail: x.message.text_md || ""
2410
- }, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), $(k, {
2434
+ }, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), L(k, {
2411
2435
  key: 3,
2412
2436
  artifact: s.actionArtifact(x.message)
2413
- }, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), $(k, {
2437
+ }, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), L(k, {
2414
2438
  key: 4,
2415
2439
  artifact: s.artifactOf(x.message)
2416
- }, null, 8, ["artifact"])) : (l(), c("div", Cs, [
2417
- x.message.text_md ? (l(), $(w, {
2440
+ }, null, 8, ["artifact"])) : (l(), c("div", Ss, [
2441
+ x.message.text_md ? (l(), L(b, {
2418
2442
  key: 0,
2419
2443
  role: A.role,
2420
2444
  text: x.message.text_md
2421
2445
  }, null, 8, ["role", "text"])) : y("", !0),
2422
2446
  s.attachmentsOf(x.message).length ? (l(), c("div", {
2423
2447
  key: 1,
2424
- class: B(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
2448
+ class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
2425
2449
  }, [
2426
- (l(!0), c(T, null, D(s.attachmentsOf(x.message), (P, F) => (l(), $(S, {
2427
- key: `${s.messageKey(x.message)}-att-${F}`,
2450
+ (l(!0), c(M, null, D(s.attachmentsOf(x.message), (P, R) => (l(), L(S, {
2451
+ key: `${s.messageKey(x.message)}-att-${R}`,
2428
2452
  attachment: P
2429
2453
  }, null, 8, ["attachment"]))), 128))
2430
2454
  ], 2)) : y("", !0)
2431
2455
  ]))
2432
- ], 14, bs))), 128)),
2456
+ ], 14, Cs))), 128)),
2433
2457
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (l(), c("div", {
2434
2458
  key: 0,
2435
- class: B(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
2459
+ class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
2436
2460
  }, [
2437
- A.role !== "user" ? (l(), c("span", As, b(s.roleLabel(A)), 1)) : y("", !0),
2438
- A.role !== "user" && s.lastTimeOf(A) ? (l(), c("span", Ss, "·")) : y("", !0),
2439
- s.lastTimeOf(A) ? (l(), c("span", xs, b(s.lastTimeOf(A)), 1)) : y("", !0)
2461
+ A.role !== "user" ? (l(), c("span", xs, w(s.roleLabel(A)), 1)) : y("", !0),
2462
+ A.role !== "user" && s.lastTimeOf(A) ? (l(), c("span", Ts, "·")) : y("", !0),
2463
+ s.lastTimeOf(A) ? (l(), c("span", Ms, w(s.lastTimeOf(A)), 1)) : y("", !0)
2440
2464
  ], 2)) : y("", !0)
2441
2465
  ], 64))
2442
2466
  ], 2)) : y("", !0)
2443
2467
  ], 64))), 128)),
2444
- n.streamingActive ? (l(), c("div", Ts, [
2445
- i("div", Ms, [
2468
+ n.streamingActive ? (l(), c("div", Os, [
2469
+ i("div", Is, [
2446
2470
  K(o, {
2447
2471
  size: 26,
2448
2472
  tail: !0
2449
2473
  })
2450
2474
  ]),
2451
- K(R)
2475
+ K(F)
2452
2476
  ])) : y("", !0)
2453
2477
  ], 34);
2454
2478
  }
2455
- const Is = /* @__PURE__ */ E(ms, [["render", Os], ["__scopeId", "data-v-6bd35fa5"]]), oe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", me = typeof window < "u" && typeof window.MediaRecorder < "u";
2456
- function Bs() {
2457
- return me && [
2479
+ const Es = /* @__PURE__ */ $(_s, [["render", Bs], ["__scopeId", "data-v-6bd35fa5"]]), oe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
2480
+ function $s() {
2481
+ return he && [
2458
2482
  "video/webm;codecs=vp9,opus",
2459
2483
  "video/webm;codecs=vp8,opus",
2460
2484
  "video/webm",
@@ -2473,10 +2497,10 @@ function Ce({ audio: t }) {
2473
2497
  systemAudio: t ? "include" : "exclude"
2474
2498
  };
2475
2499
  }
2476
- function ea(t) {
2500
+ function na(t) {
2477
2501
  return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
2478
2502
  }
2479
- async function Es() {
2503
+ async function Ls() {
2480
2504
  if (!oe) return null;
2481
2505
  let t;
2482
2506
  try {
@@ -2485,7 +2509,7 @@ async function Es() {
2485
2509
  return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
2486
2510
  }
2487
2511
  try {
2488
- return await $s(t);
2512
+ return await Rs(t);
2489
2513
  } catch (e) {
2490
2514
  return console.error("[media] screenshot capture", e), null;
2491
2515
  } finally {
@@ -2494,7 +2518,7 @@ async function Es() {
2494
2518
  });
2495
2519
  }
2496
2520
  }
2497
- async function $s(t) {
2521
+ async function Rs(t) {
2498
2522
  const e = document.createElement("video");
2499
2523
  e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((d) => requestAnimationFrame(d));
2500
2524
  const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
@@ -2504,60 +2528,60 @@ async function $s(t) {
2504
2528
  }), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
2505
2529
  return new File([s], `capture-${o}.png`, { type: "image/png" });
2506
2530
  }
2507
- async function Ls(t = {}) {
2531
+ async function Fs(t = {}) {
2508
2532
  var k;
2509
- if (!oe || !me) return null;
2533
+ if (!oe || !he) return null;
2510
2534
  let e;
2511
2535
  try {
2512
2536
  e = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !0 }));
2513
- } catch (w) {
2514
- return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
2537
+ } catch (b) {
2538
+ return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
2515
2539
  }
2516
- const n = Bs();
2540
+ const n = $s();
2517
2541
  let a;
2518
2542
  try {
2519
2543
  a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
2520
- } catch (w) {
2521
- return console.error("[media] recorder init", w), e.getTracks().forEach((S) => {
2544
+ } catch (b) {
2545
+ return console.error("[media] recorder init", b), e.getTracks().forEach((S) => {
2522
2546
  S.stop();
2523
2547
  }), null;
2524
2548
  }
2525
2549
  const r = [];
2526
2550
  let s = null, o = !1;
2527
- a.addEventListener("dataavailable", (w) => {
2528
- w.data && w.data.size > 0 && r.push(w.data);
2551
+ a.addEventListener("dataavailable", (b) => {
2552
+ b.data && b.data.size > 0 && r.push(b.data);
2529
2553
  }), a.addEventListener("stop", () => {
2530
- var w, S;
2531
- if (s && clearInterval(s), e.getTracks().forEach((R) => {
2532
- R.stop();
2554
+ var b, S;
2555
+ if (s && clearInterval(s), e.getTracks().forEach((F) => {
2556
+ F.stop();
2533
2557
  }), r.length) {
2534
- const R = a.mimeType || n || "video/webm", A = new Blob(r, { type: R }), U = /mp4/.test(R) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), j = new File([A], `ecran-${x}.${U}`, { type: R });
2535
- (w = t.onfinalize) == null || w.call(t, j);
2558
+ const F = a.mimeType || n || "video/webm", A = new Blob(r, { type: F }), U = /mp4/.test(F) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), j = new File([A], `ecran-${x}.${U}`, { type: F });
2559
+ (b = t.onfinalize) == null || b.call(t, j);
2536
2560
  } else
2537
2561
  (S = t.oncancel) == null || S.call(t);
2538
- }), e.getVideoTracks().forEach((w) => {
2539
- w.addEventListener("ended", () => d(), { once: !0 });
2562
+ }), e.getVideoTracks().forEach((b) => {
2563
+ b.addEventListener("ended", () => d(), { once: !0 });
2540
2564
  });
2541
2565
  function d() {
2542
2566
  if (!o && (o = !0, a.state !== "inactive"))
2543
2567
  try {
2544
2568
  a.stop();
2545
- } catch (w) {
2546
- console.error("[media] recorder stop", w);
2569
+ } catch (b) {
2570
+ console.error("[media] recorder stop", b);
2547
2571
  }
2548
2572
  }
2549
2573
  try {
2550
2574
  a.start(1e3);
2551
- } catch (w) {
2552
- return console.error("[media] recorder start", w), e.getTracks().forEach((S) => {
2575
+ } catch (b) {
2576
+ return console.error("[media] recorder start", b), e.getTracks().forEach((S) => {
2553
2577
  S.stop();
2554
2578
  }), null;
2555
2579
  }
2556
2580
  (k = t.onstart) == null || k.call(t);
2557
2581
  const v = Date.now();
2558
2582
  return s = setInterval(() => {
2559
- var w;
2560
- (w = t.ontick) == null || w.call(t, Date.now() - v);
2583
+ var b;
2584
+ (b = t.ontick) == null || b.call(t, Date.now() - v);
2561
2585
  }, 500), {
2562
2586
  stop: d,
2563
2587
  get state() {
@@ -2565,7 +2589,7 @@ async function Ls(t = {}) {
2565
2589
  }
2566
2590
  };
2567
2591
  }
2568
- const Rs = [
2592
+ const Ds = [
2569
2593
  {
2570
2594
  action: "file",
2571
2595
  label: "Joindre un fichier",
@@ -2581,7 +2605,7 @@ const Rs = [
2581
2605
  label: "Enregistrer l'écran",
2582
2606
  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"
2583
2607
  }
2584
- ], Fs = {
2608
+ ], Ns = {
2585
2609
  name: "WmComposer",
2586
2610
  props: {
2587
2611
  modelValue: { type: String, default: "" },
@@ -2604,9 +2628,9 @@ const Rs = [
2604
2628
  return !this.disabled && !!this.local.trim();
2605
2629
  },
2606
2630
  attachItems() {
2607
- return Rs.map((t) => ({
2631
+ return Ds.map((t) => ({
2608
2632
  ...t,
2609
- disabled: t.action === "screenshot" && !oe || t.action === "record" && (!oe || !me)
2633
+ disabled: t.action === "screenshot" && !oe || t.action === "record" && (!oe || !he)
2610
2634
  }));
2611
2635
  },
2612
2636
  recordingElapsedLabel() {
@@ -2676,13 +2700,13 @@ const Rs = [
2676
2700
  },
2677
2701
  async captureScreenshot() {
2678
2702
  if (this.disabled) return;
2679
- const t = await Es();
2703
+ const t = await Ls();
2680
2704
  t && this.$emit("attach", t);
2681
2705
  },
2682
2706
  async startRecording() {
2683
2707
  if (this.recording || this.disabled) return;
2684
2708
  this.recordingElapsed = 0;
2685
- const t = await Ls({
2709
+ const t = await Fs({
2686
2710
  onstart: () => {
2687
2711
  this.recording = !0;
2688
2712
  },
@@ -2707,27 +2731,27 @@ const Rs = [
2707
2731
  }
2708
2732
  }
2709
2733
  }
2710
- }, Ds = { class: "wm-compose-wrap" }, Ns = {
2734
+ }, js = { class: "wm-compose-wrap" }, Us = {
2711
2735
  key: 0,
2712
2736
  class: "wm-rec"
2713
- }, js = { class: "wm-rec__lbl" }, Us = {
2737
+ }, Ps = { class: "wm-rec__lbl" }, Hs = {
2714
2738
  key: 1,
2715
2739
  class: "wm-compose__menu",
2716
2740
  role: "menu"
2717
- }, Ps = ["disabled", "onClick"], Hs = { class: "wm-compose__menuIcon" }, zs = {
2741
+ }, zs = ["disabled", "onClick"], Vs = { class: "wm-compose__menuIcon" }, qs = {
2718
2742
  viewBox: "0 0 24 24",
2719
2743
  width: "14",
2720
2744
  height: "14",
2721
2745
  "aria-hidden": "true"
2722
- }, Vs = ["d"], qs = ["placeholder", "disabled"], Ws = { class: "wm-compose__actions" }, Ks = ["title", "aria-label", "disabled"], Gs = ["disabled"];
2723
- function Ys(t, e, n, a, r, s) {
2724
- return l(), c("div", Ds, [
2725
- r.recording ? (l(), c("div", Ns, [
2746
+ }, Ws = ["d"], Ks = ["placeholder", "disabled"], Gs = { class: "wm-compose__actions" }, Ys = ["title", "aria-label", "disabled"], Js = ["disabled"];
2747
+ function Xs(t, e, n, a, r, s) {
2748
+ return l(), c("div", js, [
2749
+ r.recording ? (l(), c("div", Us, [
2726
2750
  e[8] || (e[8] = i("span", {
2727
2751
  class: "wm-rec__dot",
2728
2752
  "aria-hidden": "true"
2729
2753
  }, null, -1)),
2730
- i("span", js, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
2754
+ i("span", Ps, "Enregistrement · " + w(s.recordingElapsedLabel), 1),
2731
2755
  i("button", {
2732
2756
  type: "button",
2733
2757
  class: "wm-rec__stop",
@@ -2735,7 +2759,7 @@ function Ys(t, e, n, a, r, s) {
2735
2759
  }, "Arrêter")
2736
2760
  ])) : y("", !0),
2737
2761
  i("form", {
2738
- class: B(["wm-compose", { "has-attach": r.attachOpen }]),
2762
+ class: E(["wm-compose", { "has-attach": r.attachOpen }]),
2739
2763
  onSubmit: e[7] || (e[7] = X((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
2740
2764
  }, [
2741
2765
  i("input", {
@@ -2750,16 +2774,16 @@ function Ys(t, e, n, a, r, s) {
2750
2774
  class: "wm-compose__overlay",
2751
2775
  onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
2752
2776
  })) : y("", !0),
2753
- r.attachOpen ? (l(), c("div", Us, [
2754
- (l(!0), c(T, null, D(s.attachItems, (o) => (l(), c("button", {
2777
+ r.attachOpen ? (l(), c("div", Hs, [
2778
+ (l(!0), c(M, null, D(s.attachItems, (o) => (l(), c("button", {
2755
2779
  key: o.action,
2756
2780
  type: "button",
2757
2781
  class: "wm-compose__menuItem",
2758
2782
  disabled: o.disabled,
2759
2783
  onClick: (d) => s.onAttachAction(o.action)
2760
2784
  }, [
2761
- i("span", Hs, [
2762
- (l(), c("svg", zs, [
2785
+ i("span", Vs, [
2786
+ (l(), c("svg", qs, [
2763
2787
  i("path", {
2764
2788
  d: o.path,
2765
2789
  stroke: "currentColor",
@@ -2767,11 +2791,11 @@ function Ys(t, e, n, a, r, s) {
2767
2791
  "stroke-linecap": "round",
2768
2792
  "stroke-linejoin": "round",
2769
2793
  fill: "none"
2770
- }, null, 8, Vs)
2794
+ }, null, 8, Ws)
2771
2795
  ]))
2772
2796
  ]),
2773
- i("span", null, b(o.label), 1)
2774
- ], 8, Ps))), 128))
2797
+ i("span", null, w(o.label), 1)
2798
+ ], 8, zs))), 128))
2775
2799
  ])) : y("", !0),
2776
2800
  q(i("textarea", {
2777
2801
  ref: "inputEl",
@@ -2782,13 +2806,13 @@ function Ys(t, e, n, a, r, s) {
2782
2806
  disabled: n.disabled,
2783
2807
  onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
2784
2808
  onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
2785
- }, null, 40, qs), [
2809
+ }, null, 40, Ks), [
2786
2810
  [J, r.local]
2787
2811
  ]),
2788
- i("div", Ws, [
2812
+ i("div", Gs, [
2789
2813
  i("button", {
2790
2814
  type: "button",
2791
- class: B(["wm-compose__icon", { "is-open": r.attachOpen }]),
2815
+ class: E(["wm-compose__icon", { "is-open": r.attachOpen }]),
2792
2816
  title: n.attachLabel,
2793
2817
  "aria-label": n.attachLabel,
2794
2818
  disabled: r.recording,
@@ -2807,10 +2831,10 @@ function Ys(t, e, n, a, r, s) {
2807
2831
  }, [
2808
2832
  i("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
2809
2833
  ], -1)
2810
- ])], 10, Ks),
2834
+ ])], 10, Ys),
2811
2835
  i("button", {
2812
2836
  type: "submit",
2813
- class: B(["wm-compose__send", { "is-empty": !s.canSend }]),
2837
+ class: E(["wm-compose__send", { "is-empty": !s.canSend }]),
2814
2838
  disabled: !s.canSend,
2815
2839
  "aria-label": "Envoyer"
2816
2840
  }, [...e[10] || (e[10] = [
@@ -2827,12 +2851,12 @@ function Ys(t, e, n, a, r, s) {
2827
2851
  }, [
2828
2852
  i("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
2829
2853
  ], -1)
2830
- ])], 10, Gs)
2854
+ ])], 10, Js)
2831
2855
  ])
2832
2856
  ], 34)
2833
2857
  ]);
2834
2858
  }
2835
- const Js = /* @__PURE__ */ E(Fs, [["render", Ys], ["__scopeId", "data-v-14fa9ec0"]]), Xs = {
2859
+ const Zs = /* @__PURE__ */ $(Ns, [["render", Xs], ["__scopeId", "data-v-14fa9ec0"]]), Qs = {
2836
2860
  name: "WmSuggestionChips",
2837
2861
  props: {
2838
2862
  items: { type: Array, default: () => [] },
@@ -2849,24 +2873,24 @@ const Js = /* @__PURE__ */ E(Fs, [["render", Ys], ["__scopeId", "data-v-14fa9ec0
2849
2873
  return this.items.map((t) => (t == null ? void 0 : t.label) || (t == null ? void 0 : t.text) || "").join("§");
2850
2874
  }
2851
2875
  }
2852
- }, Qs = ["onClick"];
2853
- function Zs(t, e, n, a, r, s) {
2876
+ }, er = ["onClick"];
2877
+ function tr(t, e, n, a, r, s) {
2854
2878
  return n.items.length ? (l(), c("div", {
2855
2879
  key: s.batchKey,
2856
2880
  class: "wm-chips"
2857
2881
  }, [
2858
- (l(!0), c(T, null, D(n.items, (o, d) => (l(), c("button", {
2882
+ (l(!0), c(M, null, D(n.items, (o, d) => (l(), c("button", {
2859
2883
  key: d,
2860
2884
  type: "button",
2861
2885
  class: "wm-chip",
2862
2886
  style: G({ animationDelay: n.baseDelay + d * n.stepDelay + "ms" }),
2863
2887
  onClick: (v) => t.$emit("select", o)
2864
- }, b(o.label), 13, Qs))), 128))
2888
+ }, w(o.label), 13, er))), 128))
2865
2889
  ])) : y("", !0);
2866
2890
  }
2867
- const er = /* @__PURE__ */ E(Xs, [["render", Zs], ["__scopeId", "data-v-55aa529d"]]), tr = {
2891
+ const nr = /* @__PURE__ */ $(Qs, [["render", tr], ["__scopeId", "data-v-55aa529d"]]), sr = {
2868
2892
  name: "WmApprovalCard",
2869
- components: { AIAvatar: te },
2893
+ components: { AIAvatar: ne },
2870
2894
  props: {
2871
2895
  action: { type: String, required: !0 },
2872
2896
  detail: { type: String, default: "" },
@@ -2897,41 +2921,41 @@ const er = /* @__PURE__ */ E(Xs, [["render", Zs], ["__scopeId", "data-v-55aa529d
2897
2921
  return ((t = this.rejectCallback) == null ? void 0 : t.label) || "Refuser";
2898
2922
  }
2899
2923
  }
2900
- }, nr = { class: "wm-approval" }, sr = { class: "wm-approval__head" }, rr = { class: "wm-approval__icon" }, ir = { class: "wm-approval__main" }, ar = { class: "wm-approval__title" }, or = {
2924
+ }, rr = { class: "wm-approval" }, ir = { class: "wm-approval__head" }, ar = { class: "wm-approval__icon" }, or = { class: "wm-approval__main" }, lr = { class: "wm-approval__title" }, dr = {
2901
2925
  key: 0,
2902
2926
  class: "wm-approval__detail"
2903
- }, lr = { class: "wm-approval__actions" };
2904
- function dr(t, e, n, a, r, s) {
2905
- const o = I("AIAvatar");
2906
- return l(), c("div", nr, [
2907
- i("div", sr, [
2908
- i("div", rr, [
2927
+ }, cr = { class: "wm-approval__actions" };
2928
+ function ur(t, e, n, a, r, s) {
2929
+ const o = B("AIAvatar");
2930
+ return l(), c("div", rr, [
2931
+ i("div", ir, [
2932
+ i("div", ar, [
2909
2933
  K(o, { size: 24 })
2910
2934
  ]),
2911
- i("div", ir, [
2912
- i("div", ar, b(n.action), 1),
2913
- n.detail ? (l(), c("div", or, b(n.detail), 1)) : y("", !0)
2935
+ i("div", or, [
2936
+ i("div", lr, w(n.action), 1),
2937
+ n.detail ? (l(), c("div", dr, w(n.detail), 1)) : y("", !0)
2914
2938
  ])
2915
2939
  ]),
2916
- i("div", lr, [
2940
+ i("div", cr, [
2917
2941
  s.rejectId ? (l(), c("button", {
2918
2942
  key: 0,
2919
2943
  type: "button",
2920
2944
  class: "wm-approval__btn wm-approval__btn--neutral",
2921
2945
  onClick: e[0] || (e[0] = (d) => t.$emit("callback", s.rejectId))
2922
- }, b(s.rejectLabel), 1)) : y("", !0),
2946
+ }, w(s.rejectLabel), 1)) : y("", !0),
2923
2947
  s.approveId ? (l(), c("button", {
2924
2948
  key: 1,
2925
2949
  type: "button",
2926
2950
  class: "wm-approval__btn wm-approval__btn--primary",
2927
2951
  onClick: e[1] || (e[1] = (d) => t.$emit("callback", s.approveId))
2928
- }, b(s.approveLabel), 1)) : y("", !0)
2952
+ }, w(s.approveLabel), 1)) : y("", !0)
2929
2953
  ])
2930
2954
  ]);
2931
2955
  }
2932
- const cr = /* @__PURE__ */ E(tr, [["render", dr], ["__scopeId", "data-v-b1be139c"]]);
2956
+ const hr = /* @__PURE__ */ $(sr, [["render", ur], ["__scopeId", "data-v-b1be139c"]]);
2933
2957
  let ve = 0;
2934
- const ur = /* @__PURE__ */ new Set([
2958
+ const mr = /* @__PURE__ */ new Set([
2935
2959
  "text",
2936
2960
  "textarea",
2937
2961
  "number",
@@ -2939,9 +2963,9 @@ const ur = /* @__PURE__ */ new Set([
2939
2963
  "select",
2940
2964
  "multiselect",
2941
2965
  "date"
2942
- ]), hr = {
2966
+ ]), fr = {
2943
2967
  name: "WmFormCard",
2944
- components: { AIAvatar: te },
2968
+ components: { AIAvatar: ne },
2945
2969
  props: {
2946
2970
  form: { type: Object, required: !0 },
2947
2971
  readOnly: { type: Boolean, default: !1 },
@@ -2962,7 +2986,7 @@ const ur = /* @__PURE__ */ new Set([
2962
2986
  // douteux.
2963
2987
  normalizedFields() {
2964
2988
  var e;
2965
- return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !ur.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
2989
+ return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !mr.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
2966
2990
  }
2967
2991
  },
2968
2992
  created() {
@@ -3013,50 +3037,50 @@ const ur = /* @__PURE__ */ new Set([
3013
3037
  }
3014
3038
  }
3015
3039
  }
3016
- }, mr = { class: "wm-form" }, fr = { class: "wm-form__head" }, _r = { class: "wm-form__icon" }, pr = { class: "wm-form__main" }, vr = { class: "wm-form__title" }, gr = {
3040
+ }, _r = { class: "wm-form" }, pr = { class: "wm-form__head" }, vr = { class: "wm-form__icon" }, gr = { class: "wm-form__main" }, yr = { class: "wm-form__title" }, wr = {
3017
3041
  key: 0,
3018
3042
  class: "wm-form__detail"
3019
- }, yr = ["for"], wr = {
3043
+ }, br = ["for"], kr = {
3020
3044
  key: 0,
3021
3045
  class: "wm-form__req",
3022
3046
  "aria-hidden": "true"
3023
- }, br = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], kr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Cr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ar = ["id", "onUpdate:modelValue", "required", "disabled"], Sr = {
3047
+ }, Cr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ar = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Sr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], xr = ["id", "onUpdate:modelValue", "required", "disabled"], Tr = {
3024
3048
  key: 4,
3025
3049
  class: "wm-form__bool"
3026
- }, xr = ["id", "onUpdate:modelValue", "disabled"], Tr = ["id", "onUpdate:modelValue", "required", "disabled"], Mr = {
3050
+ }, Mr = ["id", "onUpdate:modelValue", "disabled"], Or = ["id", "onUpdate:modelValue", "required", "disabled"], Ir = {
3027
3051
  value: "",
3028
3052
  disabled: ""
3029
- }, Or = ["value"], Ir = {
3053
+ }, Br = ["value"], Er = {
3030
3054
  key: 6,
3031
3055
  class: "wm-form__multi"
3032
- }, Br = ["value", "checked", "disabled", "onChange"], Er = {
3056
+ }, $r = ["value", "checked", "disabled", "onChange"], Lr = {
3033
3057
  key: 0,
3034
3058
  class: "wm-form__err"
3035
- }, $r = ["disabled"], Lr = {
3059
+ }, Rr = ["disabled"], Fr = {
3036
3060
  key: 0,
3037
3061
  class: "wm-form__spinner",
3038
3062
  "aria-hidden": "true"
3039
- }, Rr = {
3063
+ }, Dr = {
3040
3064
  key: 2,
3041
3065
  class: "wm-form__doneLbl"
3042
3066
  };
3043
- function Fr(t, e, n, a, r, s) {
3044
- const o = I("AIAvatar");
3045
- return l(), c("div", mr, [
3046
- i("div", fr, [
3047
- i("div", _r, [
3067
+ function Nr(t, e, n, a, r, s) {
3068
+ const o = B("AIAvatar");
3069
+ return l(), c("div", _r, [
3070
+ i("div", pr, [
3071
+ i("div", vr, [
3048
3072
  K(o, { size: 24 })
3049
3073
  ]),
3050
- i("div", pr, [
3051
- i("div", vr, b(n.form.title || "Formulaire"), 1),
3052
- n.form.description ? (l(), c("div", gr, b(n.form.description), 1)) : y("", !0)
3074
+ i("div", gr, [
3075
+ i("div", yr, w(n.form.title || "Formulaire"), 1),
3076
+ n.form.description ? (l(), c("div", wr, w(n.form.description), 1)) : y("", !0)
3053
3077
  ])
3054
3078
  ]),
3055
3079
  i("form", {
3056
3080
  class: "wm-form__body",
3057
3081
  onSubmit: e[0] || (e[0] = X((...d) => s.onSubmit && s.onSubmit(...d), ["prevent"]))
3058
3082
  }, [
3059
- (l(!0), c(T, null, D(s.normalizedFields, (d) => (l(), c("div", {
3083
+ (l(!0), c(M, null, D(s.normalizedFields, (d) => (l(), c("div", {
3060
3084
  key: d.key,
3061
3085
  class: "wm-form__field"
3062
3086
  }, [
@@ -3064,9 +3088,9 @@ function Fr(t, e, n, a, r, s) {
3064
3088
  for: `wm-f-${r._uid}-${d.key}`,
3065
3089
  class: "wm-form__label"
3066
3090
  }, [
3067
- de(b(d.label), 1),
3068
- d.required ? (l(), c("span", wr, "*")) : y("", !0)
3069
- ], 8, yr),
3091
+ te(w(d.label), 1),
3092
+ d.required ? (l(), c("span", kr, "*")) : y("", !0)
3093
+ ], 8, br),
3070
3094
  d.type === "text" ? q((l(), c("input", {
3071
3095
  key: 0,
3072
3096
  id: `wm-f-${r._uid}-${d.key}`,
@@ -3076,7 +3100,7 @@ function Fr(t, e, n, a, r, s) {
3076
3100
  placeholder: d.placeholder || "",
3077
3101
  required: d.required,
3078
3102
  disabled: n.readOnly || r.busy
3079
- }, null, 8, br)), [
3103
+ }, null, 8, Cr)), [
3080
3104
  [J, r.values[d.key]]
3081
3105
  ]) : d.type === "textarea" ? q((l(), c("textarea", {
3082
3106
  key: 1,
@@ -3087,7 +3111,7 @@ function Fr(t, e, n, a, r, s) {
3087
3111
  placeholder: d.placeholder || "",
3088
3112
  required: d.required,
3089
3113
  disabled: n.readOnly || r.busy
3090
- }, null, 8, kr)), [
3114
+ }, null, 8, Ar)), [
3091
3115
  [J, r.values[d.key]]
3092
3116
  ]) : d.type === "number" ? q((l(), c("input", {
3093
3117
  key: 2,
@@ -3098,7 +3122,7 @@ function Fr(t, e, n, a, r, s) {
3098
3122
  placeholder: d.placeholder || "",
3099
3123
  required: d.required,
3100
3124
  disabled: n.readOnly || r.busy
3101
- }, null, 8, Cr)), [
3125
+ }, null, 8, Sr)), [
3102
3126
  [
3103
3127
  J,
3104
3128
  r.values[d.key],
@@ -3113,18 +3137,18 @@ function Fr(t, e, n, a, r, s) {
3113
3137
  class: "wm-form__input",
3114
3138
  required: d.required,
3115
3139
  disabled: n.readOnly || r.busy
3116
- }, null, 8, Ar)), [
3140
+ }, null, 8, xr)), [
3117
3141
  [J, r.values[d.key]]
3118
- ]) : d.type === "boolean" ? (l(), c("label", Sr, [
3142
+ ]) : d.type === "boolean" ? (l(), c("label", Tr, [
3119
3143
  q(i("input", {
3120
3144
  id: `wm-f-${r._uid}-${d.key}`,
3121
3145
  "onUpdate:modelValue": (v) => r.values[d.key] = v,
3122
3146
  type: "checkbox",
3123
3147
  disabled: n.readOnly || r.busy
3124
- }, null, 8, xr), [
3125
- [Oe, r.values[d.key]]
3148
+ }, null, 8, Mr), [
3149
+ [Ie, r.values[d.key]]
3126
3150
  ]),
3127
- i("span", null, b(d.placeholder || "Oui"), 1)
3151
+ i("span", null, w(d.placeholder || "Oui"), 1)
3128
3152
  ])) : d.type === "select" ? q((l(), c("select", {
3129
3153
  key: 5,
3130
3154
  id: `wm-f-${r._uid}-${d.key}`,
@@ -3133,15 +3157,15 @@ function Fr(t, e, n, a, r, s) {
3133
3157
  required: d.required,
3134
3158
  disabled: n.readOnly || r.busy
3135
3159
  }, [
3136
- i("option", Mr, b(d.placeholder || "Choisir…"), 1),
3137
- (l(!0), c(T, null, D(d.options, (v) => (l(), c("option", {
3160
+ i("option", Ir, w(d.placeholder || "Choisir…"), 1),
3161
+ (l(!0), c(M, null, D(d.options, (v) => (l(), c("option", {
3138
3162
  key: v.value,
3139
3163
  value: v.value
3140
- }, b(v.label), 9, Or))), 128))
3141
- ], 8, Tr)), [
3142
- [Ie, r.values[d.key]]
3143
- ]) : d.type === "multiselect" ? (l(), c("div", Ir, [
3144
- (l(!0), c(T, null, D(d.options, (v) => (l(), c("label", {
3164
+ }, w(v.label), 9, Br))), 128))
3165
+ ], 8, Or)), [
3166
+ [Be, r.values[d.key]]
3167
+ ]) : d.type === "multiselect" ? (l(), c("div", Er, [
3168
+ (l(!0), c(M, null, D(d.options, (v) => (l(), c("label", {
3145
3169
  key: v.value,
3146
3170
  class: "wm-form__multiItem"
3147
3171
  }, [
@@ -3151,25 +3175,25 @@ function Fr(t, e, n, a, r, s) {
3151
3175
  checked: Array.isArray(r.values[d.key]) && r.values[d.key].includes(v.value),
3152
3176
  disabled: n.readOnly || r.busy,
3153
3177
  onChange: (k) => s.toggleMulti(d.key, v.value, k.target.checked)
3154
- }, null, 40, Br),
3155
- i("span", null, b(v.label), 1)
3178
+ }, null, 40, $r),
3179
+ i("span", null, w(v.label), 1)
3156
3180
  ]))), 128))
3157
3181
  ])) : y("", !0)
3158
3182
  ]))), 128)),
3159
- r.error ? (l(), c("div", Er, b(r.error), 1)) : y("", !0),
3160
- n.readOnly ? (l(), c("div", Rr, "Réponse envoyée")) : (l(), c("button", {
3183
+ r.error ? (l(), c("div", Lr, w(r.error), 1)) : y("", !0),
3184
+ n.readOnly ? (l(), c("div", Dr, "Réponse envoyée")) : (l(), c("button", {
3161
3185
  key: 1,
3162
3186
  type: "submit",
3163
3187
  class: "wm-form__submit",
3164
3188
  disabled: r.busy
3165
3189
  }, [
3166
- r.busy ? (l(), c("span", Lr)) : y("", !0),
3167
- i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
3168
- ], 8, $r))
3190
+ r.busy ? (l(), c("span", Fr)) : y("", !0),
3191
+ i("span", null, w(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
3192
+ ], 8, Rr))
3169
3193
  ], 32)
3170
3194
  ]);
3171
3195
  }
3172
- const Dr = /* @__PURE__ */ E(hr, [["render", Fr], ["__scopeId", "data-v-64b40f76"]]), Nr = {
3196
+ const jr = /* @__PURE__ */ $(fr, [["render", Nr], ["__scopeId", "data-v-64b40f76"]]), Ur = {
3173
3197
  name: "WmFeedback",
3174
3198
  props: {
3175
3199
  busy: { type: Boolean, default: !1 },
@@ -3193,43 +3217,43 @@ const Dr = /* @__PURE__ */ E(hr, [["render", Fr], ["__scopeId", "data-v-64b40f76
3193
3217
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
3194
3218
  }
3195
3219
  }
3196
- }, jr = { class: "wm-fb" }, Ur = { class: "wm-fb__row" }, Pr = ["onClick"], Hr = { class: "wm-fb__emoji" }, zr = { class: "wm-fb__label" }, Vr = ["disabled"], qr = {
3220
+ }, Pr = { class: "wm-fb" }, Hr = { class: "wm-fb__row" }, zr = ["onClick"], Vr = { class: "wm-fb__emoji" }, qr = { class: "wm-fb__label" }, Wr = ["disabled"], Kr = {
3197
3221
  key: 1,
3198
3222
  class: "wm-fb__done"
3199
3223
  };
3200
- function Wr(t, e, n, a, r, s) {
3201
- return l(), c("div", jr, [
3202
- n.done ? (l(), c("div", qr, [...e[3] || (e[3] = [
3203
- he('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>', 3)
3204
- ])])) : (l(), c(T, { key: 0 }, [
3224
+ function Gr(t, e, n, a, r, s) {
3225
+ return l(), c("div", Pr, [
3226
+ n.done ? (l(), c("div", Kr, [...e[3] || (e[3] = [
3227
+ ue('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>', 3)
3228
+ ])])) : (l(), c(M, { key: 0 }, [
3205
3229
  e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
3206
3230
  e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
3207
- i("div", Ur, [
3208
- (l(!0), c(T, null, D(r.options, (o) => (l(), c("button", {
3231
+ i("div", Hr, [
3232
+ (l(!0), c(M, null, D(r.options, (o) => (l(), c("button", {
3209
3233
  key: o.v,
3210
3234
  type: "button",
3211
- class: B(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
3235
+ class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
3212
3236
  onClick: (d) => r.sel = o.v
3213
3237
  }, [
3214
- i("span", Hr, b(o.e), 1),
3215
- i("span", zr, b(o.l), 1)
3216
- ], 10, Pr))), 128))
3238
+ i("span", Vr, w(o.e), 1),
3239
+ i("span", qr, w(o.l), 1)
3240
+ ], 10, zr))), 128))
3217
3241
  ]),
3218
3242
  i("button", {
3219
3243
  type: "button",
3220
3244
  class: "wm-fb__send",
3221
3245
  disabled: !r.sel || n.busy,
3222
3246
  onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
3223
- }, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Vr)
3247
+ }, w(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Wr)
3224
3248
  ], 64))
3225
3249
  ]);
3226
3250
  }
3227
- const Kr = /* @__PURE__ */ E(Nr, [["render", Wr], ["__scopeId", "data-v-6f45ff3b"]]);
3228
- function Gr(t) {
3251
+ const Yr = /* @__PURE__ */ $(Ur, [["render", Gr], ["__scopeId", "data-v-6f45ff3b"]]);
3252
+ function Jr(t) {
3229
3253
  const e = new Date(t);
3230
3254
  return e.setHours(0, 0, 0, 0), e;
3231
3255
  }
3232
- const Yr = {
3256
+ const Xr = {
3233
3257
  name: "WmHistoryDrawer",
3234
3258
  props: {
3235
3259
  conversations: { type: Array, default: () => [] },
@@ -3263,7 +3287,7 @@ const Yr = {
3263
3287
  ) : this.normalized;
3264
3288
  },
3265
3289
  groups() {
3266
- const e = Gr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
3290
+ const e = Jr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
3267
3291
  for (const o of this.filtered) {
3268
3292
  if (!o.stamp) {
3269
3293
  s.push(o);
@@ -3281,29 +3305,29 @@ const Yr = {
3281
3305
  return this.filtered.length > 0;
3282
3306
  }
3283
3307
  }
3284
- }, Jr = { class: "wm-hd" }, Xr = {
3308
+ }, Zr = { class: "wm-hd" }, Qr = {
3285
3309
  class: "wm-hd__panel",
3286
3310
  role: "dialog",
3287
3311
  "aria-label": "Vos discussions"
3288
- }, Qr = { class: "wm-hd__head" }, Zr = { class: "wm-hd__top" }, ei = { class: "wm-hd__search" }, ti = { class: "wm-hd__list" }, ni = {
3312
+ }, ei = { class: "wm-hd__head" }, ti = { class: "wm-hd__top" }, ni = { class: "wm-hd__search" }, si = { class: "wm-hd__list" }, ri = {
3289
3313
  key: 0,
3290
3314
  class: "wm-hd__group"
3291
- }, si = { class: "wm-hd__groupLabel" }, ri = { class: "wm-hd__rows" }, ii = ["onClick"], ai = { class: "wm-hd__rowIcon" }, oi = {
3315
+ }, ii = { class: "wm-hd__groupLabel" }, ai = { class: "wm-hd__rows" }, oi = ["onClick"], li = { class: "wm-hd__rowIcon" }, di = {
3292
3316
  key: 0,
3293
3317
  class: "wm-hd__rowDot",
3294
3318
  "aria-label": "Message non lu"
3295
- }, li = { class: "wm-hd__rowBody" }, di = { class: "wm-hd__rowTop" }, ci = { class: "wm-hd__rowTitle" }, ui = { class: "wm-hd__rowPreview" }, hi = {
3319
+ }, ci = { class: "wm-hd__rowBody" }, ui = { class: "wm-hd__rowTop" }, hi = { class: "wm-hd__rowTitle" }, mi = { class: "wm-hd__rowPreview" }, fi = {
3296
3320
  key: 0,
3297
3321
  class: "wm-hd__empty"
3298
3322
  };
3299
- function mi(t, e, n, a, r, s) {
3300
- return l(), c("div", Jr, [
3323
+ function _i(t, e, n, a, r, s) {
3324
+ return l(), c("div", Zr, [
3301
3325
  i("div", {
3302
3326
  class: "wm-hd__scrim",
3303
3327
  onClick: e[0] || (e[0] = (o) => t.$emit("close"))
3304
3328
  }),
3305
- i("aside", Xr, [
3306
- i("div", Qr, [
3329
+ i("aside", Qr, [
3330
+ i("div", ei, [
3307
3331
  e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
3308
3332
  i("div", { class: "wm-hd__title" }, "Vos discussions"),
3309
3333
  i("div", { class: "wm-hd__sub" }, "Reprenez là où vous en étiez.")
@@ -3329,7 +3353,7 @@ function mi(t, e, n, a, r, s) {
3329
3353
  ], -1)
3330
3354
  ])])
3331
3355
  ]),
3332
- i("div", Zr, [
3356
+ i("div", ti, [
3333
3357
  i("button", {
3334
3358
  type: "button",
3335
3359
  class: "wm-hd__new",
@@ -3352,7 +3376,7 @@ function mi(t, e, n, a, r, s) {
3352
3376
  ], -1),
3353
3377
  i("span", null, "Démarrer un nouveau fil", -1)
3354
3378
  ])]),
3355
- i("div", ei, [
3379
+ i("div", ni, [
3356
3380
  e[7] || (e[7] = i("span", { class: "wm-hd__searchIcon" }, [
3357
3381
  i("svg", {
3358
3382
  width: "12",
@@ -3378,23 +3402,23 @@ function mi(t, e, n, a, r, s) {
3378
3402
  ])
3379
3403
  ])
3380
3404
  ]),
3381
- i("div", ti, [
3382
- (l(!0), c(T, null, D(s.groups, (o) => (l(), c(T, {
3405
+ i("div", si, [
3406
+ (l(!0), c(M, null, D(s.groups, (o) => (l(), c(M, {
3383
3407
  key: o.key
3384
3408
  }, [
3385
- o.items.length ? (l(), c("div", ni, [
3386
- i("div", si, b(o.label), 1),
3387
- i("div", ri, [
3388
- (l(!0), c(T, null, D(o.items, (d) => (l(), c("button", {
3409
+ o.items.length ? (l(), c("div", ri, [
3410
+ i("div", ii, w(o.label), 1),
3411
+ i("div", ai, [
3412
+ (l(!0), c(M, null, D(o.items, (d) => (l(), c("button", {
3389
3413
  key: d.id,
3390
3414
  type: "button",
3391
- class: B(["wm-hd__row", {
3415
+ class: E(["wm-hd__row", {
3392
3416
  "wm-hd__row--active": d.id === n.activeId,
3393
3417
  "wm-hd__row--unread": d.unread
3394
3418
  }]),
3395
3419
  onClick: (v) => t.$emit("pick", d)
3396
3420
  }, [
3397
- i("div", ai, [
3421
+ i("div", li, [
3398
3422
  e[8] || (e[8] = i("svg", {
3399
3423
  width: "11",
3400
3424
  height: "11",
@@ -3408,24 +3432,24 @@ function mi(t, e, n, a, r, s) {
3408
3432
  opacity: "0.92"
3409
3433
  })
3410
3434
  ], -1)),
3411
- d.unread ? (l(), c("span", oi)) : y("", !0)
3435
+ d.unread ? (l(), c("span", di)) : y("", !0)
3412
3436
  ]),
3413
- i("div", li, [
3414
- i("div", di, [
3415
- i("span", ci, b(d.title), 1)
3437
+ i("div", ci, [
3438
+ i("div", ui, [
3439
+ i("span", hi, w(d.title), 1)
3416
3440
  ]),
3417
- i("div", ui, b(d.preview || "Aucun message"), 1)
3441
+ i("div", mi, w(d.preview || "Aucun message"), 1)
3418
3442
  ])
3419
- ], 10, ii))), 128))
3443
+ ], 10, oi))), 128))
3420
3444
  ])
3421
3445
  ])) : y("", !0)
3422
3446
  ], 64))), 128)),
3423
- s.hasAny ? y("", !0) : (l(), c("div", hi, " Aucun fil pour le moment. "))
3447
+ s.hasAny ? y("", !0) : (l(), c("div", fi, " Aucun fil pour le moment. "))
3424
3448
  ])
3425
3449
  ])
3426
3450
  ]);
3427
3451
  }
3428
- const fi = /* @__PURE__ */ E(Yr, [["render", mi], ["__scopeId", "data-v-1259e822"]]), _i = {
3452
+ const pi = /* @__PURE__ */ $(Xr, [["render", _i], ["__scopeId", "data-v-1259e822"]]), vi = {
3429
3453
  name: "WmMoreMenu",
3430
3454
  props: {
3431
3455
  canRename: { type: Boolean, default: !0 },
@@ -3451,18 +3475,18 @@ const fi = /* @__PURE__ */ E(Yr, [["render", mi], ["__scopeId", "data-v-1259e822
3451
3475
  this.notifOn = !this.notifOn, this.$emit("notif-toggle", this.notifOn);
3452
3476
  }
3453
3477
  }
3454
- }, pi = { class: "wm-mm" }, vi = {
3478
+ }, gi = { class: "wm-mm" }, yi = {
3455
3479
  class: "wm-mm__pop",
3456
3480
  role: "menu"
3457
- }, gi = { class: "wm-mm__section" }, yi = { class: "wm-mm__section" }, wi = { class: "wm-mm__section" };
3458
- function bi(t, e, n, a, r, s) {
3459
- return l(), c("div", pi, [
3481
+ }, wi = { class: "wm-mm__section" }, bi = { class: "wm-mm__section" }, ki = { class: "wm-mm__section" };
3482
+ function Ci(t, e, n, a, r, s) {
3483
+ return l(), c("div", gi, [
3460
3484
  i("div", {
3461
3485
  class: "wm-mm__scrim",
3462
3486
  onClick: e[0] || (e[0] = (o) => t.$emit("close"))
3463
3487
  }),
3464
- i("div", vi, [
3465
- i("div", gi, [
3488
+ i("div", yi, [
3489
+ i("div", wi, [
3466
3490
  i("button", {
3467
3491
  type: "button",
3468
3492
  class: "wm-mm__item",
@@ -3491,7 +3515,7 @@ function bi(t, e, n, a, r, s) {
3491
3515
  class: "wm-mm__item",
3492
3516
  onClick: e[2] || (e[2] = (o) => s.emit("rename"))
3493
3517
  }, [...e[8] || (e[8] = [
3494
- he('<span class="wm-mm__icon" data-v-3181ad1b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3181ad1b><path d="M12 20h9" data-v-3181ad1b></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-3181ad1b></path></svg></span><span class="wm-mm__label" data-v-3181ad1b>Modifier le titre</span>', 2)
3518
+ ue('<span class="wm-mm__icon" data-v-3181ad1b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3181ad1b><path d="M12 20h9" data-v-3181ad1b></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-3181ad1b></path></svg></span><span class="wm-mm__label" data-v-3181ad1b>Modifier le titre</span>', 2)
3495
3519
  ])])) : y("", !0),
3496
3520
  n.canExport ? (l(), c("button", {
3497
3521
  key: 1,
@@ -3499,11 +3523,11 @@ function bi(t, e, n, a, r, s) {
3499
3523
  class: "wm-mm__item",
3500
3524
  onClick: e[3] || (e[3] = (o) => s.emit("export"))
3501
3525
  }, [...e[9] || (e[9] = [
3502
- he('<span class="wm-mm__icon" data-v-3181ad1b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3181ad1b><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-3181ad1b></path></svg></span><span class="wm-mm__label" data-v-3181ad1b>Exporter la transcription</span><span class="wm-mm__hint" data-v-3181ad1b>.txt</span>', 3)
3526
+ ue('<span class="wm-mm__icon" data-v-3181ad1b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3181ad1b><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-3181ad1b></path></svg></span><span class="wm-mm__label" data-v-3181ad1b>Exporter la transcription</span><span class="wm-mm__hint" data-v-3181ad1b>.txt</span>', 3)
3503
3527
  ])])) : y("", !0)
3504
3528
  ]),
3505
3529
  e[15] || (e[15] = i("div", { class: "wm-mm__sep" }, null, -1)),
3506
- i("div", yi, [
3530
+ i("div", bi, [
3507
3531
  i("button", {
3508
3532
  type: "button",
3509
3533
  class: "wm-mm__item",
@@ -3526,14 +3550,14 @@ function bi(t, e, n, a, r, s) {
3526
3550
  ], -1)),
3527
3551
  e[12] || (e[12] = i("span", { class: "wm-mm__label" }, "Notifications", -1)),
3528
3552
  i("span", {
3529
- class: B(["wm-mm__toggle", { "wm-mm__toggle--on": r.notifOn }])
3553
+ class: E(["wm-mm__toggle", { "wm-mm__toggle--on": r.notifOn }])
3530
3554
  }, [...e[10] || (e[10] = [
3531
3555
  i("span", { class: "wm-mm__knob" }, null, -1)
3532
3556
  ])], 2)
3533
3557
  ])
3534
3558
  ]),
3535
3559
  e[16] || (e[16] = i("div", { class: "wm-mm__sep" }, null, -1)),
3536
- i("div", wi, [
3560
+ i("div", ki, [
3537
3561
  n.statusUrl ? (l(), c("button", {
3538
3562
  key: 0,
3539
3563
  type: "button",
@@ -3584,7 +3608,7 @@ function bi(t, e, n, a, r, s) {
3584
3608
  ])
3585
3609
  ]);
3586
3610
  }
3587
- const ki = /* @__PURE__ */ E(_i, [["render", bi], ["__scopeId", "data-v-3181ad1b"]]), Ci = {
3611
+ const Ai = /* @__PURE__ */ $(vi, [["render", Ci], ["__scopeId", "data-v-3181ad1b"]]), Si = {
3588
3612
  name: "WmRenameDialog",
3589
3613
  props: {
3590
3614
  title: { type: String, default: "Modifier le titre" },
@@ -3618,20 +3642,20 @@ const ki = /* @__PURE__ */ E(_i, [["render", bi], ["__scopeId", "data-v-3181ad1b
3618
3642
  this.canSubmit && this.$emit("submit", this.value.trim());
3619
3643
  }
3620
3644
  }
3621
- }, Ai = { class: "wm-dialog" }, Si = {
3645
+ }, xi = { class: "wm-dialog" }, Ti = {
3622
3646
  class: "wm-dialog__card",
3623
3647
  role: "dialog",
3624
3648
  "aria-modal": "true"
3625
- }, xi = { class: "wm-dialog__head" }, Ti = { class: "wm-dialog__title" }, Mi = { class: "wm-dialog__body" }, Oi = ["placeholder"], Ii = { class: "wm-dialog__actions" }, Bi = ["disabled"];
3626
- function Ei(t, e, n, a, r, s) {
3627
- return l(), c("div", Ai, [
3649
+ }, Mi = { class: "wm-dialog__head" }, Oi = { class: "wm-dialog__title" }, Ii = { class: "wm-dialog__body" }, Bi = ["placeholder"], Ei = { class: "wm-dialog__actions" }, $i = ["disabled"];
3650
+ function Li(t, e, n, a, r, s) {
3651
+ return l(), c("div", xi, [
3628
3652
  i("div", {
3629
3653
  class: "wm-dialog__scrim",
3630
3654
  onClick: e[0] || (e[0] = (o) => t.$emit("close"))
3631
3655
  }),
3632
- i("div", Si, [
3633
- i("div", xi, [
3634
- i("div", Ti, b(n.title), 1),
3656
+ i("div", Ti, [
3657
+ i("div", Mi, [
3658
+ i("div", Oi, w(n.title), 1),
3635
3659
  i("button", {
3636
3660
  type: "button",
3637
3661
  class: "wm-dialog__close",
@@ -3653,7 +3677,7 @@ function Ei(t, e, n, a, r, s) {
3653
3677
  ], -1)
3654
3678
  ])])
3655
3679
  ]),
3656
- i("div", Mi, [
3680
+ i("div", Ii, [
3657
3681
  q(i("input", {
3658
3682
  ref: "input",
3659
3683
  "onUpdate:modelValue": e[2] || (e[2] = (o) => r.value = o),
@@ -3665,11 +3689,11 @@ function Ei(t, e, n, a, r, s) {
3665
3689
  e[3] || (e[3] = ae(X((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]), ["enter"])),
3666
3690
  e[4] || (e[4] = ae(X((o) => t.$emit("close"), ["prevent"]), ["esc"]))
3667
3691
  ]
3668
- }, null, 40, Oi), [
3692
+ }, null, 40, Bi), [
3669
3693
  [J, r.value]
3670
3694
  ])
3671
3695
  ]),
3672
- i("div", Ii, [
3696
+ i("div", Ei, [
3673
3697
  i("button", {
3674
3698
  type: "button",
3675
3699
  class: "wm-dialog__btn",
@@ -3680,18 +3704,18 @@ function Ei(t, e, n, a, r, s) {
3680
3704
  class: "wm-dialog__btn wm-dialog__btn--primary",
3681
3705
  disabled: !s.canSubmit,
3682
3706
  onClick: e[6] || (e[6] = (...o) => s.onSubmit && s.onSubmit(...o))
3683
- }, "Enregistrer", 8, Bi)
3707
+ }, "Enregistrer", 8, $i)
3684
3708
  ])
3685
3709
  ])
3686
3710
  ]);
3687
3711
  }
3688
- const $i = /* @__PURE__ */ E(Ci, [["render", Ei], ["__scopeId", "data-v-4f4b37c9"]]), ge = "ww-messenger-tokens";
3712
+ const Ri = /* @__PURE__ */ $(Si, [["render", Li], ["__scopeId", "data-v-4f4b37c9"]]), ge = "ww-messenger-tokens";
3689
3713
  function ie(t) {
3690
3714
  var n;
3691
3715
  const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
3692
3716
  return e === "agent_ia" || e === "agent_human";
3693
3717
  }
3694
- function Li(t, e) {
3718
+ function Fi(t, e) {
3695
3719
  if (!t || !e) return "";
3696
3720
  const n = Array.isArray(t.fields) ? t.fields : [], a = [];
3697
3721
  for (const r of n) {
@@ -3714,7 +3738,7 @@ function le(t, e) {
3714
3738
  const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
3715
3739
  return (n == null ? void 0 : n.label) || e;
3716
3740
  }
3717
- function Ri(t, e) {
3741
+ function Di(t, e) {
3718
3742
  const n = [], a = Array.isArray(t == null ? void 0 : t.fields) ? t.fields : [];
3719
3743
  for (const r of a) {
3720
3744
  if (!(r != null && r.key) || !(r != null && r.label)) continue;
@@ -3736,21 +3760,21 @@ function Ri(t, e) {
3736
3760
  }
3737
3761
  };
3738
3762
  }
3739
- const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
3763
+ const Ni = 450, ji = 50, Ui = 900, Pi = 12e3, Hi = 300, zi = {
3740
3764
  name: "Messenger",
3741
3765
  components: {
3742
- Launcher: Ke,
3743
- Header: yt,
3744
- Onboarding: Pt,
3745
- MessageList: Is,
3746
- Composer: Js,
3747
- SuggestionChips: er,
3748
- ApprovalCard: cr,
3749
- FormCard: Dr,
3750
- Feedback: Kr,
3751
- HistoryDrawer: fi,
3752
- MoreMenu: ki,
3753
- RenameDialog: $i
3766
+ Launcher: Ge,
3767
+ Header: wt,
3768
+ Onboarding: zt,
3769
+ MessageList: Es,
3770
+ Composer: Zs,
3771
+ SuggestionChips: nr,
3772
+ ApprovalCard: hr,
3773
+ FormCard: jr,
3774
+ Feedback: Yr,
3775
+ HistoryDrawer: pi,
3776
+ MoreMenu: Ai,
3777
+ RenameDialog: Ri
3754
3778
  },
3755
3779
  // Make signAttachment available to deep children (AttachmentPreview)
3756
3780
  // without prop drilling. The store may not exist yet at provide-time
@@ -3766,7 +3790,7 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
3766
3790
  },
3767
3791
  props: {
3768
3792
  // Hardcoded server default (overridable for staging/dev).
3769
- baseUrl: { type: String, default: Pe },
3793
+ baseUrl: { type: String, default: He },
3770
3794
  widgetId: { type: String, default: "" },
3771
3795
  userId: { type: String, default: "" },
3772
3796
  userHash: { type: String, default: "" },
@@ -3940,17 +3964,20 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
3940
3964
  unreadCount() {
3941
3965
  return this.drawerConversations.filter((t) => t._unread).length;
3942
3966
  },
3943
- // Unread threads, freshest first, trimmed to a handful — surfaced on
3944
- // the onboarding/home screen so the user can jump straight back in.
3945
- unreadThreads() {
3967
+ // Open (non-resolved) threads, freshest first, trimmed to a handful —
3968
+ // surfaced on the onboarding/home screen so the user can jump straight
3969
+ // back into anything in flight. The `unread` flag lets the home screen
3970
+ // badge the ones with unseen agent/human activity.
3971
+ openThreads() {
3946
3972
  var e;
3947
3973
  const t = ((e = this.s) == null ? void 0 : e.messagesByConv) || {};
3948
- return this.drawerConversations.filter((n) => n._unread).map((n) => ({
3974
+ return this.drawerConversations.filter((n) => n.status !== "resolved").map((n) => ({
3949
3975
  id: n.id,
3950
3976
  title: n.name || "Nouvelle conversation",
3951
3977
  preview: n._preview || "Nouveau message",
3978
+ unread: !!n._unread,
3952
3979
  _ts: this.convLastActivity(n, t[n.id] || [])
3953
- })).sort((n, a) => n._ts < a._ts ? 1 : n._ts > a._ts ? -1 : 0).slice(0, 3);
3980
+ })).sort((n, a) => n._ts < a._ts ? 1 : n._ts > a._ts ? -1 : 0).slice(0, 5);
3954
3981
  },
3955
3982
  // The unread thread with the freshest activity — what the étiquette
3956
3983
  // previews. `{ convId, preview, ts }` or null when nothing's unread.
@@ -4075,14 +4102,11 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4075
4102
  displayedMessages() {
4076
4103
  const t = this.currentConv;
4077
4104
  if (!t) return [];
4078
- const e = (r) => {
4079
- var s, o, d, v;
4080
- return (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.type) === "system" || Array.isArray((o = r == null ? void 0 : r.payload) == null ? void 0 : o.attachments) && r.payload.attachments.length || (d = r == null ? void 0 : r.metadata) != null && d.artifact || (v = r == null ? void 0 : r.metadata) != null && v.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
4081
- }, n = (r) => {
4082
- var s;
4083
- return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending";
4084
- }, a = this.revealedAt;
4085
- return (this.s.messagesByConv[t.id] || []).filter((r) => !n(r)).filter((r) => ie(r) ? a[r.id] > 0 : !0).filter(e);
4105
+ const e = this.revealedAt;
4106
+ return (this.s.messagesByConv[t.id] || []).filter((n) => {
4107
+ var a, r, s, o, d;
4108
+ return (n == null ? void 0 : n.type) === "action" && ((a = n == null ? void 0 : n.payload) == null ? void 0 : a.state) === "pending" || ie(n) && !(e[n.id] > 0) ? !1 : (n == null ? void 0 : n.type) === "action" || (n == null ? void 0 : n.type) === "system" || ((r = n == null ? void 0 : n.payload) == null ? void 0 : r.type) === "system" || Array.isArray((s = n == null ? void 0 : n.payload) == null ? void 0 : s.attachments) && n.payload.attachments.length || (o = n == null ? void 0 : n.metadata) != null && o.artifact || (d = n == null ? void 0 : n.metadata) != null && d.form ? !0 : typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0;
4109
+ });
4086
4110
  },
4087
4111
  // True whenever we should show the "typing" indicator at the bottom
4088
4112
  // of the list: either the LLM is actively streaming tokens, or one
@@ -4130,7 +4154,7 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4130
4154
  const e = (v = (d = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : d.pending) == null ? void 0 : v.prepared_params;
4131
4155
  if (!e || typeof e != "object") return "";
4132
4156
  const n = Object.entries(e);
4133
- return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
4157
+ return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
4134
4158
  },
4135
4159
  actionInFlight() {
4136
4160
  var t, e;
@@ -4302,7 +4326,7 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4302
4326
  hasUserHash: !!this.userHash
4303
4327
  }), typeof document < "u" && !document.getElementById(ge)) {
4304
4328
  const t = document.createElement("style");
4305
- t.id = ge, t.textContent = Ue, document.head.appendChild(t);
4329
+ t.id = ge, t.textContent = Pe, document.head.appendChild(t);
4306
4330
  }
4307
4331
  this.hydrateReadState(), await this.boot(), this.isEmbedded && this.store && await this.open();
4308
4332
  },
@@ -4407,11 +4431,7 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4407
4431
  n && this.readState[t.id] !== n && (this.readState = { ...this.readState, [t.id]: n }, this.persistReadState());
4408
4432
  },
4409
4433
  cancelReveals() {
4410
- for (const t of this.revealTimers)
4411
- try {
4412
- clearTimeout(t);
4413
- } catch {
4414
- }
4434
+ for (const t of this.revealTimers) clearTimeout(t);
4415
4435
  this.revealTimers = [];
4416
4436
  },
4417
4437
  // Clears any in-flight settle timer and returns the approval pacing
@@ -4420,14 +4440,7 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4420
4440
  // switch, on `pendingApproval` cleared (approve/reject/expire), and
4421
4441
  // on unmount.
4422
4442
  resetApprovalPacing() {
4423
- if (this.approvalSettleTimer) {
4424
- try {
4425
- clearTimeout(this.approvalSettleTimer);
4426
- } catch {
4427
- }
4428
- this.approvalSettleTimer = null;
4429
- }
4430
- this.approvalSettled = !0, this.approvalLatchId = null;
4443
+ this.approvalSettleTimer && (clearTimeout(this.approvalSettleTimer), this.approvalSettleTimer = null), this.approvalSettled = !0, this.approvalLatchId = null;
4431
4444
  },
4432
4445
  // Pause the approval card for one settle period. A follow-on bubble
4433
4446
  // from the same SSE burst should land (and start streaming, which
@@ -4437,12 +4450,7 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4437
4450
  // Each call resets the timer; the card reveals only after a full
4438
4451
  // quiet period.
4439
4452
  bumpApprovalSettle(t = 800) {
4440
- if (this.approvalSettled = !1, this.approvalSettleTimer)
4441
- try {
4442
- clearTimeout(this.approvalSettleTimer);
4443
- } catch {
4444
- }
4445
- this.approvalSettleTimer = setTimeout(() => {
4453
+ this.approvalSettled = !1, this.approvalSettleTimer && clearTimeout(this.approvalSettleTimer), this.approvalSettleTimer = setTimeout(() => {
4446
4454
  this.approvalSettled = !0, this.approvalSettleTimer = null;
4447
4455
  }, t);
4448
4456
  },
@@ -4453,21 +4461,17 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4453
4461
  // bounded by MIN/MAX_BETWEEN_MS.
4454
4462
  scheduleReveal(t) {
4455
4463
  const e = Date.now(), n = ((t == null ? void 0 : t.text_md) || "").length, a = Math.min(
4456
- ji,
4457
- Math.max(Ni, n * Di)
4464
+ Pi,
4465
+ Math.max(Ui, n * ji)
4458
4466
  ), s = Math.max(
4459
- e + Fi,
4460
- this.nextRevealAt + Ui
4467
+ e + Ni,
4468
+ this.nextRevealAt + Hi
4461
4469
  ) + a;
4462
4470
  this.nextRevealAt = s;
4463
4471
  const o = Math.max(0, s - e), d = t.id, v = setTimeout(() => {
4464
- this.revealedAt = { ...this.revealedAt, [d]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== v);
4472
+ this.revealedAt = { ...this.revealedAt, [d]: Date.now() }, this.revealTimers = this.revealTimers.filter((k) => k !== v);
4465
4473
  }, o);
4466
4474
  this.revealTimers.push(v);
4467
- const k = setTimeout(() => {
4468
- this.revealedAt[d] > 0 || (this.revealedAt = { ...this.revealedAt, [d]: Date.now() }), this.revealTimers = this.revealTimers.filter((w) => w !== k);
4469
- }, o + 4e3);
4470
- this.revealTimers.push(k);
4471
4475
  },
4472
4476
  async boot() {
4473
4477
  if (!this.canBoot) {
@@ -4484,12 +4488,12 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4484
4488
  baseUrl: this.baseUrl,
4485
4489
  widgetId: this.widgetId,
4486
4490
  userId: this.userId
4487
- }), this.transport = fe(Re({
4491
+ }), this.transport = me(Fe({
4488
4492
  baseUrl: this.baseUrl,
4489
4493
  widgetId: this.widgetId,
4490
4494
  userId: this.userId,
4491
4495
  userHash: this.userHash
4492
- })), this.store = fe(je(this.transport)), this.hydrateNotifPref(), this.setupNotifications(), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
4496
+ })), this.store = me(Ue(this.transport)), this.hydrateNotifPref(), this.setupNotifications(), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
4493
4497
  ready: this.store.state.ready,
4494
4498
  error: this.store.state.error
4495
4499
  });
@@ -4735,18 +4739,18 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4735
4739
  t.created_at ? `Créée le : ${t.created_at}` : "",
4736
4740
  ""
4737
4741
  ];
4738
- for (const w of e) {
4739
- if (!w) continue;
4740
- const S = ((o = w.author) == null ? void 0 : o.name) || (((d = w.author) == null ? void 0 : d.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((k = w.author) == null ? void 0 : k.type) === "agent_ia" ? "Assistant IA" : "Système"), R = w.created_at ? new Date(w.created_at).toLocaleString("fr-FR") : "", A = (w.text_md || "").trim();
4741
- A && (n.push(`[${R}] ${S} :`), n.push(A), n.push(""));
4742
+ for (const b of e) {
4743
+ if (!b) continue;
4744
+ const S = ((o = b.author) == null ? void 0 : o.name) || (((d = b.author) == null ? void 0 : d.type) === "user" ? "Vous" : ((v = b.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((k = b.author) == null ? void 0 : k.type) === "agent_ia" ? "Assistant IA" : "Système"), F = b.created_at ? new Date(b.created_at).toLocaleString("fr-FR") : "", A = (b.text_md || "").trim();
4745
+ A && (n.push(`[${F}] ${S} :`), n.push(A), n.push(""));
4742
4746
  }
4743
4747
  const a = new Blob([n.join(`
4744
4748
  `)], { type: "text/plain;charset=utf-8" });
4745
4749
  try {
4746
- const w = URL.createObjectURL(a), S = document.createElement("a");
4747
- S.href = w, S.download = `${(t.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(S), S.click(), document.body.removeChild(S), setTimeout(() => URL.revokeObjectURL(w), 1e3);
4748
- } catch (w) {
4749
- console.error("[ww-messenger] export failed", w);
4750
+ const b = URL.createObjectURL(a), S = document.createElement("a");
4751
+ S.href = b, S.download = `${(t.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(S), S.click(), document.body.removeChild(S), setTimeout(() => URL.revokeObjectURL(b), 1e3);
4752
+ } catch (b) {
4753
+ console.error("[ww-messenger] export failed", b);
4750
4754
  }
4751
4755
  },
4752
4756
  async onSend(t) {
@@ -4772,12 +4776,12 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4772
4776
  async onFormSubmit({ values: t }) {
4773
4777
  const e = this.pendingForm;
4774
4778
  if (!(e != null && e.form)) return;
4775
- const n = Li(e.form, t);
4779
+ const n = Fi(e.form, t);
4776
4780
  if (!n) return;
4777
4781
  let a = this.currentConv;
4778
4782
  a && (a._draft && (a = await this.ensureRealConv(), !a) || await this.store.send(a.id, n, {
4779
4783
  metadata: {
4780
- artifact: Ri(e.form, t)
4784
+ artifact: Di(e.form, t)
4781
4785
  }
4782
4786
  }));
4783
4787
  },
@@ -4821,54 +4825,54 @@ const Fi = 450, Di = 50, Ni = 900, ji = 12e3, Ui = 300, Pi = {
4821
4825
  }
4822
4826
  }
4823
4827
  }
4824
- }, Hi = {
4828
+ }, Vi = {
4825
4829
  key: 0,
4826
4830
  class: "wm-loading",
4827
4831
  "aria-busy": "true",
4828
4832
  "aria-live": "polite"
4829
- }, zi = {
4833
+ }, qi = {
4830
4834
  key: 0,
4831
4835
  class: "wm-state"
4832
- }, Vi = { class: "wm-state__err" }, qi = { class: "wm-state__errSub" }, Wi = { class: "wm-bottom" }, Ki = {
4836
+ }, Wi = { class: "wm-state__err" }, Ki = { class: "wm-state__errSub" }, Gi = { class: "wm-bottom" }, Yi = {
4833
4837
  key: 0,
4834
4838
  ref: "floatEl",
4835
4839
  class: "wm-float"
4836
- }, Gi = {
4840
+ }, Ji = {
4837
4841
  key: 1,
4838
4842
  class: "wm-actionWait",
4839
4843
  role: "status",
4840
4844
  "aria-live": "polite"
4841
- }, Yi = { class: "wm-actionWait__lbl" }, Ji = {
4845
+ }, Xi = { class: "wm-actionWait__lbl" }, Zi = {
4842
4846
  key: 2,
4843
4847
  class: "wm-attached"
4844
- }, Xi = ["onClick"];
4845
- function Qi(t, e, n, a, r, s) {
4846
- const o = I("Launcher"), d = I("Header"), v = I("Onboarding"), k = I("MessageList"), w = I("ApprovalCard"), S = I("FormCard"), R = I("Feedback"), A = I("SuggestionChips"), U = I("Composer"), x = I("MoreMenu"), j = I("RenameDialog"), P = I("HistoryDrawer");
4848
+ }, Qi = ["onClick"];
4849
+ function ea(t, e, n, a, r, s) {
4850
+ const o = B("Launcher"), d = B("Header"), v = B("Onboarding"), k = B("MessageList"), b = B("ApprovalCard"), S = B("FormCard"), F = B("Feedback"), A = B("SuggestionChips"), U = B("Composer"), x = B("MoreMenu"), j = B("RenameDialog"), P = B("HistoryDrawer");
4847
4851
  return l(), c("div", {
4848
- class: B(["wm-root", `wm-root--${n.displayMode}`])
4852
+ class: E(["wm-root", `wm-root--${n.displayMode}`])
4849
4853
  }, [
4850
- !r.isOpen && !s.isEmbedded ? (l(), $(o, {
4854
+ !r.isOpen && !s.isEmbedded ? (l(), L(o, {
4851
4855
  key: 0,
4852
4856
  "unread-count": s.unreadCount,
4853
4857
  peek: s.launcherPeek,
4854
4858
  onOpen: s.openFromPeek,
4855
- onDismiss: e[0] || (e[0] = (F) => r.labelDismissed = !0)
4859
+ onDismiss: e[0] || (e[0] = (R) => r.labelDismissed = !0)
4856
4860
  }, null, 8, ["unread-count", "peek", "onOpen"])) : y("", !0),
4857
4861
  r.isOpen || s.isEmbedded ? (l(), c("section", {
4858
4862
  key: 1,
4859
- class: B(["wm-panel", `wm-panel--${n.displayMode}`]),
4863
+ class: E(["wm-panel", `wm-panel--${n.displayMode}`]),
4860
4864
  style: G(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
4861
4865
  role: "dialog",
4862
4866
  "aria-label": "Messenger"
4863
4867
  }, [
4864
- !s.ready && !s.error ? (l(), c("div", Hi, [
4868
+ !s.ready && !s.error ? (l(), c("div", Vi, [
4865
4869
  s.isEmbedded ? y("", !0) : (l(), c("button", {
4866
4870
  key: 0,
4867
4871
  type: "button",
4868
4872
  class: "wm-loading__close",
4869
4873
  "aria-label": "Réduire",
4870
- onClick: e[1] || (e[1] = (...F) => s.close && s.close(...F))
4871
- }, [...e[7] || (e[7] = [
4874
+ onClick: e[1] || (e[1] = (...R) => s.close && s.close(...R))
4875
+ }, [...e[8] || (e[8] = [
4872
4876
  i("svg", {
4873
4877
  width: "13",
4874
4878
  height: "13",
@@ -4883,11 +4887,11 @@ function Qi(t, e, n, a, r, s) {
4883
4887
  i("path", { d: "M18 6L6 18M6 6l12 12" })
4884
4888
  ], -1)
4885
4889
  ])])),
4886
- e[8] || (e[8] = i("div", {
4890
+ e[9] || (e[9] = i("div", {
4887
4891
  class: "wm-loading__spinner",
4888
4892
  "aria-hidden": "true"
4889
4893
  }, null, -1))
4890
- ])) : (l(), c(T, { key: 1 }, [
4894
+ ])) : (l(), c(M, { key: 1 }, [
4891
4895
  K(d, {
4892
4896
  title: s.headerTitle,
4893
4897
  escalated: s.isEscalated,
@@ -4903,9 +4907,9 @@ function Qi(t, e, n, a, r, s) {
4903
4907
  onMore: s.toggleMore,
4904
4908
  onClose: s.close
4905
4909
  }, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
4906
- s.error ? (l(), c("div", zi, [
4907
- i("div", Vi, [
4908
- e[10] || (e[10] = i("div", { class: "wm-state__errIcon" }, [
4910
+ s.error ? (l(), c("div", qi, [
4911
+ i("div", Wi, [
4912
+ e[11] || (e[11] = i("div", { class: "wm-state__errIcon" }, [
4909
4913
  i("svg", {
4910
4914
  width: "14",
4911
4915
  height: "14",
@@ -4921,11 +4925,11 @@ function Qi(t, e, n, a, r, s) {
4921
4925
  ])
4922
4926
  ], -1)),
4923
4927
  i("div", null, [
4924
- e[9] || (e[9] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
4925
- i("div", qi, b(s.error), 1)
4928
+ e[10] || (e[10] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
4929
+ i("div", Ki, w(s.error), 1)
4926
4930
  ])
4927
4931
  ])
4928
- ])) : s.currentConv ? (l(), c(T, { key: 2 }, [
4932
+ ])) : s.currentConv ? (l(), c(M, { key: 2 }, [
4929
4933
  K(k, {
4930
4934
  ref: "messageList",
4931
4935
  messages: s.displayedMessages,
@@ -4938,40 +4942,40 @@ function Qi(t, e, n, a, r, s) {
4938
4942
  "unread-boundary-ts": r.unreadBoundaryTs,
4939
4943
  onLoadMore: s.onLoadMore
4940
4944
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "unread-boundary-ts", "onLoadMore"]),
4941
- i("div", Wi, [
4942
- s.floatVisible ? (l(), c("div", Ki, [
4943
- s.approvalReady ? (l(), $(w, {
4945
+ i("div", Gi, [
4946
+ s.floatVisible ? (l(), c("div", Yi, [
4947
+ s.approvalReady ? (l(), L(b, {
4944
4948
  key: 0,
4945
4949
  action: s.approvalTitle,
4946
4950
  detail: s.approvalDetail,
4947
4951
  callbacks: s.pendingApproval.callbacks,
4948
4952
  onCallback: s.onApprovalCallback
4949
- }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(), $(S, {
4953
+ }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (l(), L(S, {
4950
4954
  key: s.pendingForm.message && s.pendingForm.message.id,
4951
4955
  form: s.pendingForm.form,
4952
4956
  onSubmit: s.onFormSubmit
4953
- }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), $(R, {
4957
+ }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), L(F, {
4954
4958
  key: 2,
4955
4959
  busy: r.feedbackBusy,
4956
4960
  done: r.feedbackDone,
4957
4961
  onSubmit: s.onFeedback
4958
- }, null, 8, ["busy", "done", "onSubmit"])) : (l(), $(A, {
4962
+ }, null, 8, ["busy", "done", "onSubmit"])) : (l(), L(A, {
4959
4963
  key: 3,
4960
4964
  items: s.suggestions,
4961
4965
  onSelect: s.onSuggestion
4962
4966
  }, null, 8, ["items", "onSelect"]))
4963
4967
  ], 512)) : y("", !0),
4964
- s.actionInFlight ? (l(), c("div", Gi, [
4965
- e[11] || (e[11] = i("span", {
4968
+ s.actionInFlight ? (l(), c("div", Ji, [
4969
+ e[12] || (e[12] = i("span", {
4966
4970
  class: "wm-actionWait__spinner",
4967
4971
  "aria-hidden": "true"
4968
4972
  }, null, -1)),
4969
- i("span", Yi, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4970
- ])) : (l(), $(U, {
4973
+ i("span", Xi, w(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4974
+ ])) : (l(), L(U, {
4971
4975
  key: 2,
4972
4976
  ref: "composer",
4973
4977
  modelValue: r.draft,
4974
- "onUpdate:modelValue": e[2] || (e[2] = (F) => r.draft = F),
4978
+ "onUpdate:modelValue": e[3] || (e[3] = (R) => r.draft = R),
4975
4979
  placeholder: s.composerPlaceholder,
4976
4980
  disabled: !!s.pendingApproval,
4977
4981
  "attach-label": "Joindre un fichier",
@@ -4979,30 +4983,30 @@ function Qi(t, e, n, a, r, s) {
4979
4983
  onAttach: s.onAttach
4980
4984
  }, null, 8, ["modelValue", "placeholder", "disabled", "onSend", "onAttach"]))
4981
4985
  ]),
4982
- r.moreOpen ? (l(), $(x, {
4986
+ r.moreOpen ? (l(), L(x, {
4983
4987
  key: 0,
4984
4988
  "can-rename": !!s.currentConv && !s.currentConv._draft,
4985
4989
  "can-export": !!s.currentConv && !s.currentConv._draft,
4986
4990
  "notif-enabled": r.notifEnabled,
4987
4991
  "status-url": s.statusUrl,
4988
4992
  "help-url": s.helpUrl,
4989
- onClose: e[3] || (e[3] = (F) => r.moreOpen = !1),
4993
+ onClose: e[4] || (e[4] = (R) => r.moreOpen = !1),
4990
4994
  onNotifToggle: s.onNotifToggle,
4991
4995
  onAction: s.onMoreAction
4992
4996
  }, null, 8, ["can-rename", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
4993
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (l(), $(j, {
4997
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (l(), L(j, {
4994
4998
  key: 1,
4995
4999
  "initial-value": s.currentConv.name || "",
4996
5000
  title: "Modifier le titre de la conversation",
4997
- onClose: e[4] || (e[4] = (F) => r.renameDialogOpen = !1),
5001
+ onClose: e[5] || (e[5] = (R) => r.renameDialogOpen = !1),
4998
5002
  onSubmit: s.onRenameSubmit
4999
5003
  }, null, 8, ["initial-value", "onSubmit"])) : y("", !0),
5000
- r.pendingAttachments.length ? (l(), c("div", Ji, [
5001
- (l(!0), c(T, null, D(r.pendingAttachments, (F, H) => (l(), c("div", {
5004
+ r.pendingAttachments.length ? (l(), c("div", Zi, [
5005
+ (l(!0), c(M, null, D(r.pendingAttachments, (R, H) => (l(), c("div", {
5002
5006
  key: H,
5003
5007
  class: "wm-attached__chip"
5004
5008
  }, [
5005
- e[13] || (e[13] = i("svg", {
5009
+ e[14] || (e[14] = i("svg", {
5006
5010
  width: "11",
5007
5011
  height: "11",
5008
5012
  viewBox: "0 0 24 24",
@@ -5015,12 +5019,12 @@ function Qi(t, e, n, a, r, s) {
5015
5019
  }, [
5016
5020
  i("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
5017
5021
  ], -1)),
5018
- i("span", null, b(F.name), 1),
5022
+ i("span", null, w(R.name), 1),
5019
5023
  i("button", {
5020
5024
  type: "button",
5021
5025
  "aria-label": "Retirer",
5022
5026
  onClick: (Y) => r.pendingAttachments.splice(H, 1)
5023
- }, [...e[12] || (e[12] = [
5027
+ }, [...e[13] || (e[13] = [
5024
5028
  i("svg", {
5025
5029
  width: "10",
5026
5030
  height: "10",
@@ -5034,36 +5038,37 @@ function Qi(t, e, n, a, r, s) {
5034
5038
  }, [
5035
5039
  i("path", { d: "M18 6L6 18M6 6l12 12" })
5036
5040
  ], -1)
5037
- ])], 8, Xi)
5041
+ ])], 8, Qi)
5038
5042
  ]))), 128))
5039
5043
  ])) : y("", !0)
5040
- ], 64)) : (l(), $(v, {
5044
+ ], 64)) : (l(), L(v, {
5041
5045
  key: 1,
5042
5046
  "welcome-message": s.widgetWelcomeMessage,
5043
5047
  "agent-name": s.agentName,
5044
5048
  "quick-links": s.quickLinks,
5045
- "unread-threads": s.unreadThreads,
5049
+ "open-threads": s.openThreads,
5046
5050
  busy: r.busy,
5047
5051
  onStart: s.startConv,
5048
5052
  onSelect: s.onQuickLink,
5049
- onResume: s.onDrawerPick
5050
- }, null, 8, ["welcome-message", "agent-name", "quick-links", "unread-threads", "busy", "onStart", "onSelect", "onResume"])),
5051
- r.historyOpen ? (l(), $(P, {
5053
+ onResume: s.onDrawerPick,
5054
+ onViewAll: e[2] || (e[2] = (R) => r.historyOpen = !0)
5055
+ }, null, 8, ["welcome-message", "agent-name", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
5056
+ r.historyOpen ? (l(), L(P, {
5052
5057
  key: 3,
5053
5058
  conversations: s.drawerConversations,
5054
5059
  "active-id": s.currentConv ? s.currentConv.id : null,
5055
- onClose: e[5] || (e[5] = (F) => r.historyOpen = !1),
5060
+ onClose: e[6] || (e[6] = (R) => r.historyOpen = !1),
5056
5061
  onNew: s.onDrawerNew,
5057
5062
  onPick: s.onDrawerPick
5058
5063
  }, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
5059
- r.moreOpen && !s.currentConv ? (l(), $(x, {
5064
+ r.moreOpen && !s.currentConv ? (l(), L(x, {
5060
5065
  key: 4,
5061
5066
  "can-rename": !1,
5062
5067
  "can-export": !1,
5063
5068
  "notif-enabled": r.notifEnabled,
5064
5069
  "status-url": s.statusUrl,
5065
5070
  "help-url": s.helpUrl,
5066
- onClose: e[6] || (e[6] = (F) => r.moreOpen = !1),
5071
+ onClose: e[7] || (e[7] = (R) => r.moreOpen = !1),
5067
5072
  onNotifToggle: s.onNotifToggle,
5068
5073
  onAction: s.onMoreAction
5069
5074
  }, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0)
@@ -5071,49 +5076,49 @@ function Qi(t, e, n, a, r, s) {
5071
5076
  ], 6)) : y("", !0)
5072
5077
  ], 2);
5073
5078
  }
5074
- const ta = /* @__PURE__ */ E(Pi, [["render", Qi], ["__scopeId", "data-v-1d79cc79"]]), na = "0.3.0";
5079
+ const sa = /* @__PURE__ */ $(zi, [["render", ea], ["__scopeId", "data-v-5889aa58"]]), ra = "0.3.2";
5075
5080
  export {
5076
- te as AIAvatar,
5077
- ue as AVATAR_COLORS,
5078
- Zt as ActionResult,
5079
- cr as ApprovalCard,
5080
- ln as ArtifactFormResponse,
5081
- bn as ArtifactInfoCard,
5082
- Un as ArtifactRenderer,
5083
- Fn as ArtifactTicket,
5084
- Qn as AttachmentPreview,
5085
- is as Bubble,
5086
- Js as Composer,
5087
- Pe as DEFAULT_BASE_URL,
5088
- Kr as Feedback,
5089
- Dr as FormCard,
5090
- yt as Header,
5091
- fi as HistoryDrawer,
5081
+ ne as AIAvatar,
5082
+ ce as AVATAR_COLORS,
5083
+ tn as ActionResult,
5084
+ hr as ApprovalCard,
5085
+ cn as ArtifactFormResponse,
5086
+ Cn as ArtifactInfoCard,
5087
+ Hn as ArtifactRenderer,
5088
+ Nn as ArtifactTicket,
5089
+ es as AttachmentPreview,
5090
+ os as Bubble,
5091
+ Zs as Composer,
5092
+ He as DEFAULT_BASE_URL,
5093
+ Yr as Feedback,
5094
+ jr as FormCard,
5095
+ wt as Header,
5096
+ pi as HistoryDrawer,
5092
5097
  ke as HumanAvatar,
5093
- Ke as Launcher,
5094
- me as MEDIA_RECORDER_SUPPORTED,
5095
- Is as MessageList,
5096
- ta as Messenger,
5097
- ki as MoreMenu,
5098
- Pt as Onboarding,
5098
+ Ge as Launcher,
5099
+ he as MEDIA_RECORDER_SUPPORTED,
5100
+ Es as MessageList,
5101
+ sa as Messenger,
5102
+ Ai as MoreMenu,
5103
+ zt as Onboarding,
5099
5104
  oe as SCREEN_CAPTURE_SUPPORTED,
5100
- er as SuggestionChips,
5101
- ot as TeamAvatars,
5102
- ds as Typing,
5103
- na as VERSION,
5105
+ nr as SuggestionChips,
5106
+ lt as TeamAvatars,
5107
+ us as Typing,
5108
+ ra as VERSION,
5104
5109
  ye as avatarColor,
5105
5110
  we as avatarInitials,
5106
- Es as captureScreenshotFile,
5111
+ Ls as captureScreenshotFile,
5107
5112
  N as colors,
5108
- je as createStore,
5109
- Re as createTransport,
5110
- ta as default,
5113
+ Ue as createStore,
5114
+ Fe as createTransport,
5115
+ sa as default,
5111
5116
  be as formatTime,
5112
- ea as guessAttachmentKind,
5113
- Bs as pickRecorderMime,
5114
- ts as renderMarkdown,
5115
- Ls as startScreenRecording,
5116
- Ue as tokensCss,
5117
- Ne as uuid,
5118
- Ne as v4
5117
+ na as guessAttachmentKind,
5118
+ $s as pickRecorderMime,
5119
+ ss as renderMarkdown,
5120
+ Fs as startScreenRecording,
5121
+ Pe as tokensCss,
5122
+ je as uuid,
5123
+ je as v4
5119
5124
  };