@_solaris/messenger-widget 0.2.18 → 0.2.20

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,4 +1,4 @@
1
- import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as z, Transition as Se, withCtx as xe, withKeys as me, withModifiers as Y, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as $, resolveComponent as O, createBlock as R, createTextVNode as re, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as H, vModelText as G, vModelCheckbox as Ie, vModelSelect as Oe, createStaticVNode as ue, markRaw as fe } from "vue";
1
+ import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as z, Transition as Se, withCtx as xe, withKeys as me, withModifiers as X, createElementVNode as i, toDisplayString as b, createCommentVNode as w, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as j, resolveComponent as O, createBlock as R, createTextVNode as ie, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as H, vModelText as K, vModelCheckbox as Ie, vModelSelect as Oe, createStaticVNode as ue, markRaw as fe } from "vue";
2
2
  const Ee = [
3
3
  "connected",
4
4
  "message",
@@ -36,9 +36,9 @@ function $e(t) {
36
36
  }
37
37
  function a(h, f) {
38
38
  const _ = e.listeners.get(h);
39
- _ && _.forEach((k) => {
39
+ _ && _.forEach((C) => {
40
40
  try {
41
- k(f);
41
+ C(f);
42
42
  } catch (I) {
43
43
  console.error("[transport] listener", h, I);
44
44
  }
@@ -55,18 +55,18 @@ function $e(t) {
55
55
  };
56
56
  }
57
57
  async function o(h, f, _) {
58
- const k = await fetch(`${e.baseUrl}${f}`, {
58
+ const C = await fetch(`${e.baseUrl}${f}`, {
59
59
  method: h,
60
60
  headers: { "Content-Type": "application/json", ...s() },
61
61
  body: _ !== void 0 ? JSON.stringify(_) : void 0
62
62
  });
63
- if (!k.ok) {
64
- const I = await c(k), T = new Error(
65
- `HTTP ${k.status} ${h} ${f} :: ${(I == null ? void 0 : I.error) || k.statusText}`
63
+ if (!C.ok) {
64
+ const I = await c(C), T = new Error(
65
+ `HTTP ${C.status} ${h} ${f} :: ${(I == null ? void 0 : I.error) || C.statusText}`
66
66
  );
67
- throw T.status = k.status, T.body = I, T;
67
+ throw T.status = C.status, T.body = I, T;
68
68
  }
69
- return k.status === 204 ? null : k.json();
69
+ return C.status === 204 ? null : C.json();
70
70
  }
71
71
  async function c(h) {
72
72
  try {
@@ -80,8 +80,8 @@ function $e(t) {
80
80
  // Public — no HMAC required.
81
81
  fetch(`${e.baseUrl}/widgets/${encodeURIComponent(e.widgetId)}/config`).then(async (_) => {
82
82
  if (!_.ok) {
83
- const k = await c(_);
84
- throw new Error(`HTTP ${_.status} GET /widgets/:id/config :: ${(k == null ? void 0 : k.error) || _.statusText}`);
83
+ const C = await c(_);
84
+ throw new Error(`HTTP ${_.status} GET /widgets/:id/config :: ${(C == null ? void 0 : C.error) || _.statusText}`);
85
85
  }
86
86
  return _.json();
87
87
  }),
@@ -96,11 +96,11 @@ function $e(t) {
96
96
  customer: (f == null ? void 0 : f.customer) ?? null
97
97
  };
98
98
  }
99
- async function C() {
99
+ async function k() {
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 y(h) {
104
104
  const f = await o("PATCH", "/customers/me", h);
105
105
  return (f == null ? void 0 : f.customer) ?? null;
106
106
  }
@@ -108,26 +108,26 @@ function $e(t) {
108
108
  const h = await o("GET", "/conversations");
109
109
  return (h == null ? void 0 : h.conversations) ?? [];
110
110
  }
111
- async function F(h = {}) {
111
+ async function $(h = {}) {
112
112
  return (await o("POST", "/conversations", h)).conversation;
113
113
  }
114
114
  async function A(h) {
115
115
  return (await o("GET", `/conversations/${encodeURIComponent(h)}`)).conversation;
116
116
  }
117
- async function N(h, f) {
117
+ async function D(h, f) {
118
118
  return (await o("PATCH", `/conversations/${encodeURIComponent(h)}`, f)).conversation;
119
119
  }
120
120
  async function x(h, f = {}) {
121
121
  const _ = new URLSearchParams();
122
122
  f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
123
- const k = _.toString() ? `?${_.toString()}` : "";
123
+ const C = _.toString() ? `?${_.toString()}` : "";
124
124
  return o(
125
125
  "GET",
126
- `/conversations/${encodeURIComponent(h)}/messages${k}`
126
+ `/conversations/${encodeURIComponent(h)}/messages${C}`
127
127
  );
128
128
  }
129
- async function D(h, f) {
130
- W();
129
+ async function N(h, f) {
130
+ G();
131
131
  const _ = {
132
132
  client_msg_id: f.client_msg_id,
133
133
  type: "content",
@@ -141,8 +141,8 @@ function $e(t) {
141
141
  _
142
142
  );
143
143
  }
144
- async function j(h, f, _) {
145
- return W(), o(
144
+ async function F(h, f, _) {
145
+ return G(), o(
146
146
  "POST",
147
147
  `/messages/${encodeURIComponent(h)}/callbacks/${encodeURIComponent(f)}`,
148
148
  _ ? { inputs: _ } : {}
@@ -152,11 +152,11 @@ function $e(t) {
152
152
  const f = (
153
153
  /** @type {File} */
154
154
  h.name || "attachment"
155
- ), _ = h.type || "application/octet-stream", k = h.size || 0, I = (
155
+ ), _ = h.type || "application/octet-stream", C = h.size || 0, I = (
156
156
  /** @type {import('./types.js').AttachmentUploadTicket} */
157
157
  await o("POST", "/attachments", {
158
158
  mime_type: _,
159
- size_bytes: k,
159
+ size_bytes: C,
160
160
  name: f
161
161
  })
162
162
  ), T = await fetch(I.upload_url, {
@@ -170,16 +170,16 @@ function $e(t) {
170
170
  type: je(_),
171
171
  path: I.path,
172
172
  mime_type: _,
173
- size_bytes: k
173
+ size_bytes: C
174
174
  };
175
175
  }
176
- async function X(h) {
176
+ async function q(h) {
177
177
  return o(
178
178
  "GET",
179
179
  `/attachments/sign?path=${encodeURIComponent(h)}`
180
180
  );
181
181
  }
182
- function ie() {
182
+ function Y() {
183
183
  const h = new URLSearchParams({
184
184
  userId: e.userId,
185
185
  userHash: e.userHash,
@@ -187,10 +187,10 @@ function $e(t) {
187
187
  }).toString();
188
188
  return `${e.baseUrl}/stream?${h}`;
189
189
  }
190
- function q() {
190
+ function W() {
191
191
  if (!e.eventSource && !(typeof document < "u" && document.hidden))
192
192
  try {
193
- const h = new EventSource(ie());
193
+ const h = new EventSource(Y());
194
194
  for (const f of Ee)
195
195
  h.addEventListener(f, (_) => ae(f, _.data));
196
196
  h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
@@ -200,35 +200,35 @@ function $e(t) {
200
200
  }
201
201
  function ae(h, f) {
202
202
  try {
203
- const _ = JSON.parse(f), k = _ && typeof _ == "object" && "data" in _ ? _.data : _;
204
- a(h, k);
203
+ const _ = JSON.parse(f), C = _ && typeof _ == "object" && "data" in _ ? _.data : _;
204
+ a(h, C);
205
205
  } catch (_) {
206
206
  console.error("[transport] bad SSE payload", h, _);
207
207
  }
208
208
  }
209
- function K() {
209
+ function J() {
210
210
  e.eventSource && (e.eventSource.close(), e.eventSource = null), e.connection !== "paused" && r("idle");
211
211
  }
212
- function W() {
213
- clearTimeout(e.burstTimer), q(), e.panelOpen || (e.burstTimer = setTimeout(() => {
214
- e.panelOpen || K();
212
+ function G() {
213
+ clearTimeout(e.burstTimer), W(), e.panelOpen || (e.burstTimer = setTimeout(() => {
214
+ e.panelOpen || J();
215
215
  }, Le));
216
216
  }
217
217
  function oe(h) {
218
- e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), q()) : W();
218
+ e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), W()) : G();
219
219
  }
220
220
  async function le() {
221
221
  try {
222
- const h = await S(), f = h.reduce((k, I) => {
222
+ const h = await S(), f = h.reduce((C, I) => {
223
223
  const T = I == null ? void 0 : I.last_message_at;
224
- return T && (!k || T > k) ? T : k;
224
+ return T && (!C || T > C) ? T : C;
225
225
  }, null);
226
- f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), W());
226
+ f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), G());
227
227
  } catch (h) {
228
228
  console.error("[transport] poll failed", h);
229
229
  }
230
230
  }
231
- function Q() {
231
+ function Z() {
232
232
  u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(le, Be));
233
233
  }
234
234
  function u() {
@@ -237,14 +237,14 @@ function $e(t) {
237
237
  function m() {
238
238
  if (document.hidden)
239
239
  clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = setTimeout(() => {
240
- e.hiddenGraceTimer = null, document.hidden && (u(), K(), r("paused"));
240
+ e.hiddenGraceTimer = null, document.hidden && (u(), J(), r("paused"));
241
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"), Q(), e.panelOpen && q();
247
+ r("idle"), Z(), e.panelOpen && W();
248
248
  }
249
249
  }
250
250
  async function p() {
@@ -254,17 +254,17 @@ function $e(t) {
254
254
  e.lastBootstrap = h;
255
255
  try {
256
256
  const f = await S();
257
- e.lastActivityAt = f.reduce((_, k) => {
258
- const I = k == null ? void 0 : k.last_message_at;
257
+ e.lastActivityAt = f.reduce((_, C) => {
258
+ const I = C == null ? void 0 : C.last_message_at;
259
259
  return I && (!_ || I > _) ? I : _;
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)), Q(), h;
264
+ return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), Z(), h;
265
265
  }
266
266
  function g() {
267
- u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, K(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
267
+ u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, J(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
268
268
  }
269
269
  return {
270
270
  on: n,
@@ -273,17 +273,17 @@ function $e(t) {
273
273
  setPanelOpen: oe,
274
274
  // REST
275
275
  bootstrap: v,
276
- getCustomer: C,
277
- patchCustomer: w,
276
+ getCustomer: k,
277
+ patchCustomer: y,
278
278
  listConversations: S,
279
- createConversation: F,
279
+ createConversation: $,
280
280
  getConversation: A,
281
- patchConversation: N,
281
+ patchConversation: D,
282
282
  listMessages: x,
283
- postMessage: D,
284
- postCallback: j,
283
+ postMessage: N,
284
+ postCallback: F,
285
285
  uploadAttachment: P,
286
- signAttachment: X,
286
+ signAttachment: q,
287
287
  // Read-only state
288
288
  get connection() {
289
289
  return e.connection;
@@ -344,7 +344,7 @@ function De(t) {
344
344
  e.connection = u;
345
345
  })), n.push(t.on("message", (u) => {
346
346
  const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.message;
347
- !m || !(p != null && p.id) || (q(m, p), p.client_msg_id && delete e.streamingByMsgId[p.client_msg_id], W(m, p.created_at));
347
+ !m || !(p != null && p.id) || (W(m, p), p.client_msg_id && delete e.streamingByMsgId[p.client_msg_id], G(m, p.created_at));
348
348
  })), n.push(t.on("message_stream", (u) => {
349
349
  const m = u == null ? void 0 : u.message_id, p = u == null ? void 0 : u.token;
350
350
  !m || typeof p != "string" || (e.streamingByMsgId[m] = (e.streamingByMsgId[m] || "") + p);
@@ -400,48 +400,48 @@ function De(t) {
400
400
  async function v(u) {
401
401
  if (e.messagesByConv[u]) return;
402
402
  const m = await t.listMessages(u, { limit: c });
403
- e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], w(u, {
403
+ e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], y(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
- async function C(u) {
409
+ async function k(u) {
410
410
  const m = e.paginationByConv[u];
411
411
  if (!(!m || m.loading || !m.nextCursor)) {
412
- w(u, { ...m, loading: !0 });
412
+ y(u, { ...m, loading: !0 });
413
413
  try {
414
414
  let h = m.nextCursor, f = [], _ = 0;
415
415
  for (; _ < 6 && h; _++) {
416
416
  const L = await t.listMessages(u, {
417
417
  before: h,
418
418
  limit: c
419
- }), Z = (L == null ? void 0 : L.messages) ?? [];
420
- if (f = [...Z, ...f], h = (L == null ? void 0 : L.next_cursor) ?? null, !Z.length || f.length >= 60) break;
419
+ }), ee = (L == null ? void 0 : L.messages) ?? [];
420
+ if (f = [...ee, ...f], h = (L == null ? void 0 : L.next_cursor) ?? null, !ee.length || f.length >= 60) break;
421
421
  }
422
- const k = e.messagesByConv[u] || [], I = new Set(k.map((L) => String(L == null ? void 0 : L.id))), T = [...f.filter((L) => !I.has(String(L == null ? void 0 : L.id))), ...k];
423
- e.messagesByConv[u] = T, w(u, {
422
+ const C = e.messagesByConv[u] || [], I = new Set(C.map((L) => String(L == null ? void 0 : L.id))), T = [...f.filter((L) => !I.has(String(L == null ? void 0 : L.id))), ...C];
423
+ e.messagesByConv[u] = T, y(u, {
424
424
  nextCursor: h,
425
425
  loading: !1,
426
426
  loaded: !0
427
427
  });
428
428
  } catch (p) {
429
- console.error("[store] loadMore failed", p), w(u, { ...m, loading: !1 });
429
+ console.error("[store] loadMore failed", p), y(u, { ...m, loading: !1 });
430
430
  }
431
431
  }
432
432
  }
433
- function w(u, m) {
433
+ function y(u, m) {
434
434
  e.paginationByConv = { ...e.paginationByConv, [u]: m };
435
435
  }
436
436
  async function S(u, m) {
437
437
  const p = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
438
438
  g !== -1 && (e.conversations[g] = p);
439
439
  }
440
- async function F(u, m, { attachments: p, metadata: g } = {}) {
440
+ async function $(u, m, { attachments: p, metadata: g } = {}) {
441
441
  var T;
442
442
  const h = (m || "").trim(), f = Array.isArray(p) && p.length > 0;
443
443
  if (!u || !h && !f) return;
444
- const _ = Ue(), k = Q(u), I = {
444
+ const _ = Ue(), C = Z(u), I = {
445
445
  id: _,
446
446
  client_msg_id: _,
447
447
  conversation_id: u,
@@ -451,23 +451,23 @@ function De(t) {
451
451
  type: "user",
452
452
  id: ((T = e.customer) == null ? void 0 : T.external_id) || null
453
453
  },
454
- created_at: k,
454
+ created_at: C,
455
455
  // Local-only flag — UI may render dimmed until the SSE echo lands.
456
456
  _pending: !0,
457
457
  ...f ? { payload: { type: "content", attachments: p } } : {},
458
458
  ...g && typeof g == "object" ? { metadata: g } : {}
459
459
  };
460
- q(u, I);
460
+ W(u, I);
461
461
  try {
462
462
  await t.postMessage(u, {
463
463
  client_msg_id: _,
464
464
  text_md: h,
465
- created_at: k,
465
+ created_at: C,
466
466
  ...f ? { attachments: p } : {},
467
467
  ...g && typeof g == "object" ? { metadata: g } : {}
468
468
  });
469
469
  } catch (L) {
470
- console.error("[store] send failed", L), K(u, _, { _failed: !0, _pending: !1 });
470
+ console.error("[store] send failed", L), J(u, _, { _failed: !0, _pending: !1 });
471
471
  }
472
472
  }
473
473
  async function A(u, m, p) {
@@ -478,10 +478,10 @@ function De(t) {
478
478
  console.error("[store] callback failed", g), u != null && delete e.awaitingCallback[u];
479
479
  }
480
480
  }
481
- const N = /* @__PURE__ */ new Map();
481
+ const D = /* @__PURE__ */ new Map();
482
482
  async function x(u) {
483
483
  if (!u) return null;
484
- const m = N.get(u);
484
+ const m = D.get(u);
485
485
  if (m != null && m.url) {
486
486
  const p = m.expires_at ? Date.parse(m.expires_at) : 0;
487
487
  if (!p || p - Date.now() > 6e4) return m.url;
@@ -489,13 +489,13 @@ function De(t) {
489
489
  try {
490
490
  const p = await t.signAttachment(u);
491
491
  if (p != null && p.signed_url)
492
- return N.set(u, { url: p.signed_url, expires_at: p.expires_at }), p.signed_url;
492
+ return D.set(u, { url: p.signed_url, expires_at: p.expires_at }), p.signed_url;
493
493
  } catch (p) {
494
494
  console.error("[store] sign attachment failed", p);
495
495
  }
496
496
  return null;
497
497
  }
498
- async function D(u, { rating: m, comment: p } = {}) {
498
+ async function N(u, { rating: m, comment: p } = {}) {
499
499
  const g = e.conversations.find((_) => _.id === u), f = {
500
500
  ...(g == null ? void 0 : g.metadata) || {},
501
501
  feedback: {
@@ -506,7 +506,7 @@ function De(t) {
506
506
  };
507
507
  await S(u, { metadata: f });
508
508
  }
509
- function j(u) {
509
+ function F(u) {
510
510
  var p, g;
511
511
  const m = e.messagesByConv[u] || [];
512
512
  for (let h = m.length - 1; h >= 0; h--) {
@@ -522,13 +522,13 @@ function De(t) {
522
522
  for (let f = m.length - 1; f >= 0; f--) {
523
523
  const _ = m[f];
524
524
  if (((p = _ == null ? void 0 : _.author) == null ? void 0 : p.type) === "user" || (_ == null ? void 0 : _.type) === "action" && ((g = _ == null ? void 0 : _.payload) == null ? void 0 : g.state) === "pending") return null;
525
- const k = (h = _ == null ? void 0 : _.metadata) == null ? void 0 : h.form;
526
- if (k && Array.isArray(k.fields) && k.fields.length > 0)
527
- return { message: _, form: k };
525
+ const C = (h = _ == null ? void 0 : _.metadata) == null ? void 0 : h.form;
526
+ if (C && Array.isArray(C.fields) && C.fields.length > 0)
527
+ return { message: _, form: C };
528
528
  }
529
529
  return null;
530
530
  }
531
- function X(u) {
531
+ function q(u) {
532
532
  const m = e.runningActionsByConv[u];
533
533
  if (!m) return null;
534
534
  const p = Object.keys(m);
@@ -536,15 +536,15 @@ function De(t) {
536
536
  const g = p[0];
537
537
  return { id: g, payload: { name: m[g] } };
538
538
  }
539
- function ie(u) {
539
+ function Y(u) {
540
540
  var p, g, h, f;
541
541
  const m = e.messagesByConv[u] || [];
542
542
  for (let _ = m.length - 1; _ >= 0; _--) {
543
- const k = m[_];
544
- if (((p = k == null ? void 0 : k.author) == null ? void 0 : p.type) === "user") return [];
545
- if ((k == null ? void 0 : k.type) === "action" && ((g = k == null ? void 0 : k.payload) == null ? void 0 : g.state) === "pending") return [];
546
- if (((h = k == null ? void 0 : k.author) == null ? void 0 : h.type) !== "agent_ia") continue;
547
- const I = (f = k == null ? void 0 : k.metadata) == null ? void 0 : f.suggested_replies;
543
+ const C = m[_];
544
+ if (((p = C == null ? void 0 : C.author) == null ? void 0 : p.type) === "user") return [];
545
+ if ((C == null ? void 0 : C.type) === "action" && ((g = C == null ? void 0 : C.payload) == null ? void 0 : g.state) === "pending") return [];
546
+ if (((h = C == null ? void 0 : C.author) == null ? void 0 : h.type) !== "agent_ia") continue;
547
+ const I = (f = C == null ? void 0 : C.metadata) == null ? void 0 : f.suggested_replies;
548
548
  return Array.isArray(I) && I.length ? I.map((T) => {
549
549
  if (typeof T == "string") {
550
550
  const L = T.trim();
@@ -553,15 +553,15 @@ function De(t) {
553
553
  if (T && typeof T == "object" && typeof T.label == "string") {
554
554
  const L = T.label.trim();
555
555
  if (!L) return null;
556
- const Z = T.kind === "cta" || T.kind === "choice" || T.kind === "followup" ? T.kind : null;
557
- return { label: L, kind: Z };
556
+ const ee = T.kind === "cta" || T.kind === "choice" || T.kind === "followup" ? T.kind : null;
557
+ return { label: L, kind: ee };
558
558
  }
559
559
  return null;
560
560
  }).filter(Boolean).slice(0, 4) : [];
561
561
  }
562
562
  return [];
563
563
  }
564
- function q(u, m) {
564
+ function W(u, m) {
565
565
  var f;
566
566
  const p = e.messagesByConv[u] || [];
567
567
  let g = -1;
@@ -574,7 +574,7 @@ function De(t) {
574
574
  function ae(u, m) {
575
575
  return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
576
576
  }
577
- function K(u, m, p) {
577
+ function J(u, m, p) {
578
578
  const g = e.messagesByConv[u];
579
579
  if (!g) return;
580
580
  const h = g.findIndex((_) => _.id === m);
@@ -582,7 +582,7 @@ function De(t) {
582
582
  const f = g.slice();
583
583
  f[h] = { ...g[h], ...p }, e.messagesByConv[u] = f;
584
584
  }
585
- function W(u, m) {
585
+ function G(u, m) {
586
586
  const p = e.conversations.findIndex((h) => h.id === u);
587
587
  if (p === -1) return;
588
588
  const g = e.conversations[p];
@@ -603,7 +603,7 @@ function De(t) {
603
603
  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(p, h) : p[g] = h);
604
604
  return Object.keys(p).length && (m.values = p), Object.keys(m).length ? m : null;
605
605
  }
606
- function Q(u) {
606
+ function Z(u) {
607
607
  const m = e.messagesByConv[u] || [];
608
608
  let p = "";
609
609
  for (const f of m)
@@ -618,15 +618,15 @@ function De(t) {
618
618
  applyCustomer: s,
619
619
  createConversation: o,
620
620
  openConversation: v,
621
- loadMore: C,
621
+ loadMore: k,
622
622
  patchConversation: S,
623
- send: F,
623
+ send: $,
624
624
  clickCallback: A,
625
625
  signAttachment: x,
626
- submitFeedback: D,
627
- getPendingApproval: j,
628
- getActionInFlight: X,
629
- getLatestSuggestions: ie,
626
+ submitFeedback: N,
627
+ getPendingApproval: F,
628
+ getActionInFlight: q,
629
+ getLatestSuggestions: Y,
630
630
  getLatestForm: P,
631
631
  // Pass-through for panel open/close (controls SSE burst).
632
632
  setPanelOpen: t.setPanelOpen
@@ -732,8 +732,8 @@ function We(t, e, n, a, r, s) {
732
732
  "aria-label": "Ouvrir le messenger sur le dernier message",
733
733
  onClick: e[1] || (e[1] = (o) => t.$emit("open")),
734
734
  onKeydown: [
735
- e[2] || (e[2] = me(Y((o) => t.$emit("open"), ["prevent"]), ["enter"])),
736
- e[3] || (e[3] = me(Y((o) => t.$emit("open"), ["prevent"]), ["space"]))
735
+ e[2] || (e[2] = me(X((o) => t.$emit("open"), ["prevent"]), ["enter"])),
736
+ e[3] || (e[3] = me(X((o) => t.$emit("open"), ["prevent"]), ["space"]))
737
737
  ]
738
738
  }, [
739
739
  i("p", Ve, b(n.peek), 1),
@@ -741,7 +741,7 @@ function We(t, e, n, a, r, s) {
741
741
  type: "button",
742
742
  class: "wm-peek__close",
743
743
  "aria-label": "Ignorer",
744
- onClick: e[0] || (e[0] = Y((o) => t.$emit("dismiss"), ["stop"]))
744
+ onClick: e[0] || (e[0] = X((o) => t.$emit("dismiss"), ["stop"]))
745
745
  }, [...e[5] || (e[5] = [
746
746
  i("svg", {
747
747
  width: "11",
@@ -757,7 +757,7 @@ function We(t, e, n, a, r, s) {
757
757
  i("path", { d: "M18 6L6 18M6 6l12 12" })
758
758
  ], -1)
759
759
  ])])
760
- ], 32)) : y("", !0)
760
+ ], 32)) : w("", !0)
761
761
  ]),
762
762
  _: 1
763
763
  }),
@@ -784,7 +784,7 @@ function We(t, e, n, a, r, s) {
784
784
  key: 0,
785
785
  class: "wm-launcher__badge",
786
786
  "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)
787
+ }, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, qe)) : w("", !0)
788
788
  ])
789
789
  ]);
790
790
  }
@@ -809,7 +809,7 @@ function Xe(t, e, n, a, r, s) {
809
809
  class: E(["wm-aiav", { "wm-aiav--tail": n.tail }]),
810
810
  style: V({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
811
811
  }, [
812
- n.pulse ? (l(), d("div", Ye)) : y("", !0),
812
+ n.pulse ? (l(), d("div", Ye)) : w("", !0),
813
813
  i("div", {
814
814
  class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
815
815
  }, [
@@ -843,7 +843,7 @@ function Xe(t, e, n, a, r, s) {
843
843
  ], 2)
844
844
  ], 6);
845
845
  }
846
- const J = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
846
+ const Q = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
847
847
  name: "WmHumanAvatar",
848
848
  props: {
849
849
  name: { type: String, default: "" },
@@ -914,7 +914,7 @@ function at(t, e, n, a, r, s) {
914
914
  class: "wm-team__stack",
915
915
  style: V({ width: s.stackWidth + "px" })
916
916
  }, [
917
- (l(!0), d(M, null, $(n.members.slice(0, 3), (o, c) => (l(), d("div", {
917
+ (l(!0), d(M, null, j(n.members.slice(0, 3), (o, c) => (l(), d("div", {
918
918
  key: c,
919
919
  class: "wm-team__pill",
920
920
  style: V({ left: c * 13 + "px", zIndex: 3 - c, background: s.colorFor(o) })
@@ -926,12 +926,12 @@ function at(t, e, n, a, r, s) {
926
926
  }, null, 8, st)) : (l(), d("span", rt, b(s.initialsFor(o)), 1))
927
927
  ], 4))), 128))
928
928
  ], 4),
929
- n.responseLabel ? (l(), d("span", it, b(n.responseLabel), 1)) : y("", !0)
930
- ])) : y("", !0);
929
+ n.responseLabel ? (l(), d("span", it, b(n.responseLabel), 1)) : w("", !0)
930
+ ])) : w("", !0);
931
931
  }
932
932
  const ot = /* @__PURE__ */ B(tt, [["render", at], ["__scopeId", "data-v-3659b9c1"]]), lt = {
933
933
  name: "WmHeader",
934
- components: { AIAvatar: J, HumanAvatar: ke, TeamAvatars: ot },
934
+ components: { AIAvatar: Q, HumanAvatar: ke, TeamAvatars: ot },
935
935
  props: {
936
936
  title: { type: String, default: "Nouvelle conversation" },
937
937
  escalated: { type: Boolean, default: !1 },
@@ -980,7 +980,7 @@ function gt(t, e, n, a, r, s) {
980
980
  type: "button",
981
981
  class: "wm-header__icon",
982
982
  "aria-label": "Retour à l'accueil",
983
- onClick: e[0] || (e[0] = (C) => t.$emit("back"))
983
+ onClick: e[0] || (e[0] = (k) => t.$emit("back"))
984
984
  }, [...e[3] || (e[3] = [
985
985
  i("svg", {
986
986
  width: "13",
@@ -1015,12 +1015,12 @@ function gt(t, e, n, a, r, s) {
1015
1015
  key: 0,
1016
1016
  members: n.teamMembers,
1017
1017
  "response-label": n.responseLabel
1018
- }, null, 8, ["members", "response-label"])) : y("", !0),
1018
+ }, null, 8, ["members", "response-label"])) : w("", !0),
1019
1019
  i("span", pt, [
1020
1020
  e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
1021
- re(" " + b(s.statusText), 1)
1021
+ ie(" " + b(s.statusText), 1)
1022
1022
  ])
1023
- ])) : y("", !0)
1023
+ ])) : w("", !0)
1024
1024
  ])
1025
1025
  ], 64)) : (l(), d("div", _t)),
1026
1026
  i("div", vt, [
@@ -1030,7 +1030,7 @@ function gt(t, e, n, a, r, s) {
1030
1030
  class: E(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
1031
1031
  "aria-label": "Plus d'options",
1032
1032
  title: "Plus d'options",
1033
- onClick: e[1] || (e[1] = (C) => t.$emit("more"))
1033
+ onClick: e[1] || (e[1] = (k) => t.$emit("more"))
1034
1034
  }, [...e[5] || (e[5] = [
1035
1035
  i("svg", {
1036
1036
  width: "13",
@@ -1055,14 +1055,14 @@ function gt(t, e, n, a, r, s) {
1055
1055
  r: "1.6"
1056
1056
  })
1057
1057
  ], -1)
1058
- ])], 2)) : y("", !0),
1058
+ ])], 2)) : w("", !0),
1059
1059
  n.showClose ? (l(), d("button", {
1060
1060
  key: 1,
1061
1061
  type: "button",
1062
1062
  class: "wm-header__icon",
1063
1063
  "aria-label": "Fermer le widget",
1064
1064
  title: "Fermer le widget",
1065
- onClick: e[2] || (e[2] = (C) => t.$emit("close"))
1065
+ onClick: e[2] || (e[2] = (k) => t.$emit("close"))
1066
1066
  }, [...e[6] || (e[6] = [
1067
1067
  i("svg", {
1068
1068
  width: "13",
@@ -1077,7 +1077,7 @@ function gt(t, e, n, a, r, s) {
1077
1077
  }, [
1078
1078
  i("path", { d: "M18 6L6 18M6 6l12 12" })
1079
1079
  ], -1)
1080
- ])])) : y("", !0)
1080
+ ])])) : w("", !0)
1081
1081
  ])
1082
1082
  ]);
1083
1083
  }
@@ -1089,7 +1089,7 @@ const yt = /* @__PURE__ */ B(lt, [["render", gt], ["__scopeId", "data-v-b5f5f6a9
1089
1089
  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
1090
  }, wt = {
1091
1091
  name: "WmOnboarding",
1092
- components: { AIAvatar: J },
1092
+ components: { AIAvatar: Q },
1093
1093
  props: {
1094
1094
  welcomeMessage: { type: String, default: "" },
1095
1095
  agentName: { type: String, default: "" },
@@ -1143,7 +1143,7 @@ function Nt(t, e, n, a, r, s) {
1143
1143
  n.unreadThreads.length ? (l(), d("div", St, [
1144
1144
  e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Messages non lus", -1)),
1145
1145
  i("div", xt, [
1146
- (l(!0), d(M, null, $(n.unreadThreads, (c) => (l(), d("button", {
1146
+ (l(!0), d(M, null, j(n.unreadThreads, (c) => (l(), d("button", {
1147
1147
  key: c.id,
1148
1148
  type: "button",
1149
1149
  class: "wm-onb__link wm-onb__resume",
@@ -1188,15 +1188,15 @@ function Nt(t, e, n, a, r, s) {
1188
1188
  ], -1))
1189
1189
  ], 8, Mt))), 128))
1190
1190
  ])
1191
- ])) : y("", !0),
1191
+ ])) : w("", !0),
1192
1192
  n.quickLinks.length ? (l(), d("div", Et, [
1193
1193
  e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
1194
1194
  i("div", Bt, [
1195
- (l(!0), d(M, null, $(n.quickLinks, (c, v) => (l(), d("button", {
1195
+ (l(!0), d(M, null, j(n.quickLinks, (c, v) => (l(), d("button", {
1196
1196
  key: v,
1197
1197
  type: "button",
1198
1198
  class: "wm-onb__link",
1199
- onClick: (C) => t.$emit("select", c)
1199
+ onClick: (k) => t.$emit("select", c)
1200
1200
  }, [
1201
1201
  i("span", Rt, [
1202
1202
  (l(), d("svg", $t, [
@@ -1222,7 +1222,7 @@ function Nt(t, e, n, a, r, s) {
1222
1222
  ], -1))
1223
1223
  ], 8, Lt))), 128))
1224
1224
  ])
1225
- ])) : y("", !0),
1225
+ ])) : w("", !0),
1226
1226
  i("div", Ut, [
1227
1227
  i("button", {
1228
1228
  type: "button",
@@ -1333,7 +1333,7 @@ function Xt(t, e, n, a, r, s) {
1333
1333
  "aria-hidden": "true"
1334
1334
  }, "·", -1)),
1335
1335
  i("span", Jt, b(s.detailText), 1)
1336
- ], 64)) : y("", !0)
1336
+ ], 64)) : w("", !0)
1337
1337
  ], 2);
1338
1338
  }
1339
1339
  const Qt = /* @__PURE__ */ B(zt, [["render", Xt], ["__scopeId", "data-v-7f90dad6"]]), Zt = {
@@ -1366,11 +1366,11 @@ function an(t, e, n, a, r, s) {
1366
1366
  }, [
1367
1367
  i("polyline", { points: "20 6 9 17 4 12" })
1368
1368
  ]),
1369
- re(" Envoyé ")
1369
+ ie(" Envoyé ")
1370
1370
  ], -1))
1371
1371
  ]),
1372
1372
  i("div", sn, [
1373
- (l(!0), d(M, null, $(s.fields, (o, c) => (l(), d("div", {
1373
+ (l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
1374
1374
  key: c,
1375
1375
  class: "wm-art__field"
1376
1376
  }, [
@@ -1418,20 +1418,20 @@ function yn(t, e, n, a, r, s) {
1418
1418
  alt: n.data.title || "",
1419
1419
  loading: "lazy"
1420
1420
  }, null, 8, un)
1421
- ])) : y("", !0),
1421
+ ])) : w("", !0),
1422
1422
  i("div", hn, [
1423
1423
  i("div", mn, [
1424
1424
  i("div", fn, b(n.data.title), 1),
1425
- n.data.subtitle ? (l(), d("div", pn, b(n.data.subtitle), 1)) : y("", !0)
1425
+ n.data.subtitle ? (l(), d("div", pn, b(n.data.subtitle), 1)) : w("", !0)
1426
1426
  ]),
1427
1427
  n.data.badge && n.data.badge.label ? (l(), d("span", {
1428
1428
  key: 0,
1429
1429
  class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
1430
- }, b(n.data.badge.label), 3)) : y("", !0)
1430
+ }, b(n.data.badge.label), 3)) : w("", !0)
1431
1431
  ]),
1432
1432
  s.hasBody ? (l(), d("div", _n, [
1433
- n.data.body ? (l(), d("div", vn, b(n.data.body), 1)) : y("", !0),
1434
- s.fields.length ? (l(!0), d(M, { key: 1 }, $(s.fields, (o, c) => (l(), d("div", {
1433
+ n.data.body ? (l(), d("div", vn, b(n.data.body), 1)) : w("", !0),
1434
+ s.fields.length ? (l(!0), d(M, { key: 1 }, j(s.fields, (o, c) => (l(), d("div", {
1435
1435
  key: c,
1436
1436
  class: "wm-art__field"
1437
1437
  }, [
@@ -1439,8 +1439,8 @@ function yn(t, e, n, a, r, s) {
1439
1439
  i("div", {
1440
1440
  class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
1441
1441
  }, b(o.value), 3)
1442
- ]))), 128)) : y("", !0)
1443
- ])) : y("", !0)
1442
+ ]))), 128)) : w("", !0)
1443
+ ])) : w("", !0)
1444
1444
  ]);
1445
1445
  }
1446
1446
  const wn = /* @__PURE__ */ B(ln, [["render", yn], ["__scopeId", "data-v-d7369333"]]);
@@ -1519,13 +1519,13 @@ function Ln(t, e, n, a, r, s) {
1519
1519
  class: "wm-tk__dot",
1520
1520
  "aria-hidden": "true"
1521
1521
  }, null, -1)),
1522
- re(" " + b(n.data.status.label), 1)
1522
+ ie(" " + b(n.data.status.label), 1)
1523
1523
  ], 2)
1524
1524
  ]),
1525
- n.data.body ? (l(), d("div", Tn, b(n.data.body), 1)) : y("", !0)
1525
+ n.data.body ? (l(), d("div", Tn, b(n.data.body), 1)) : w("", !0)
1526
1526
  ]),
1527
1527
  s.fields.length ? (l(), d("div", In, [
1528
- (l(!0), d(M, null, $(s.fields, (o, c) => (l(), d("div", {
1528
+ (l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
1529
1529
  key: c,
1530
1530
  class: "wm-art__field"
1531
1531
  }, [
@@ -1563,11 +1563,11 @@ function Ln(t, e, n, a, r, s) {
1563
1563
  height: "9",
1564
1564
  rx: "0.5"
1565
1565
  }, null, -1)
1566
- ])], 8, En)) : y("", !0),
1566
+ ])], 8, En)) : w("", !0),
1567
1567
  i("span", null, b(o.value), 1)
1568
1568
  ], 2)
1569
1569
  ]))), 128))
1570
- ])) : y("", !0),
1570
+ ])) : w("", !0),
1571
1571
  n.data.created_at ? (l(), d("div", Bn, [
1572
1572
  e[3] || (e[3] = i("svg", {
1573
1573
  width: "11",
@@ -1590,7 +1590,7 @@ function Ln(t, e, n, a, r, s) {
1590
1590
  i("path", { d: "M16 2v4M8 2v4M3 10h18" })
1591
1591
  ], -1)),
1592
1592
  i("span", null, b(s.formattedDate), 1)
1593
- ])) : y("", !0)
1593
+ ])) : w("", !0)
1594
1594
  ]);
1595
1595
  }
1596
1596
  const Rn = /* @__PURE__ */ B(kn, [["render", Ln], ["__scopeId", "data-v-97001af0"]]), $n = {
@@ -1616,7 +1616,7 @@ function jn(t, e, n, a, r, s) {
1616
1616
  return s.component ? (l(), R(Me(s.component), {
1617
1617
  key: 0,
1618
1618
  data: n.artifact.data
1619
- }, null, 8, ["data"])) : y("", !0);
1619
+ }, null, 8, ["data"])) : w("", !0);
1620
1620
  }
1621
1621
  const Un = /* @__PURE__ */ B(Fn, [["render", jn]]), Dn = {
1622
1622
  name: "WmAttachmentPreview",
@@ -1733,9 +1733,9 @@ function Yn(t, e, n, a, r, s) {
1733
1733
  ], -1)),
1734
1734
  i("span", qn, [
1735
1735
  i("span", Wn, b(s.displayName), 1),
1736
- s.sizeLabel ? (l(), d("span", Gn, b(s.sizeLabel), 1)) : y("", !0)
1736
+ s.sizeLabel ? (l(), d("span", Gn, b(s.sizeLabel), 1)) : w("", !0)
1737
1737
  ]),
1738
- r.loading ? (l(), d("span", Kn)) : y("", !0)
1738
+ r.loading ? (l(), d("span", Kn)) : w("", !0)
1739
1739
  ], 8, Vn))
1740
1740
  ], 2);
1741
1741
  }
@@ -1747,7 +1747,7 @@ function Qn(t) {
1747
1747
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
1748
1748
  }
1749
1749
  const _e = "";
1750
- function ee(t) {
1750
+ function te(t) {
1751
1751
  let e = t;
1752
1752
  const n = [];
1753
1753
  return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
@@ -1764,49 +1764,49 @@ function Zn(t) {
1764
1764
  const s = e[a];
1765
1765
  if (/^\s*```([\w-]*)\s*$/.exec(s)) {
1766
1766
  a++;
1767
- const C = [];
1767
+ const k = [];
1768
1768
  for (; a < e.length && !/^\s*```\s*$/.test(e[a]); )
1769
- C.push(e[a]), a++;
1769
+ k.push(e[a]), a++;
1770
1770
  a < e.length && a++, n.push({
1771
1771
  type: "block",
1772
- html: `<pre class="wm-md-pre"><code>${C.join(`
1772
+ html: `<pre class="wm-md-pre"><code>${k.join(`
1773
1773
  `)}</code></pre>`
1774
1774
  });
1775
1775
  continue;
1776
1776
  }
1777
1777
  if (/^\s*[-*]\s+/.test(s)) {
1778
- const C = [];
1778
+ const k = [];
1779
1779
  for (; a < e.length; ) {
1780
1780
  const S = /^\s*[-*]\s+(.*)$/.exec(e[a]);
1781
1781
  if (!S) break;
1782
- C.push(S[1]), a++;
1782
+ k.push(S[1]), a++;
1783
1783
  }
1784
- const w = C.map((S) => `<li>${ee(S)}</li>`).join("");
1785
- n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
1784
+ const y = k.map((S) => `<li>${te(S)}</li>`).join("");
1785
+ n.push({ type: "block", html: `<ul class="wm-md-ul">${y}</ul>` });
1786
1786
  continue;
1787
1787
  }
1788
1788
  const c = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1789
1789
  if (c) {
1790
- const C = parseInt(c[1], 10), w = [c[2]];
1790
+ const k = parseInt(c[1], 10), y = [c[2]];
1791
1791
  for (a++; a < e.length; ) {
1792
1792
  const A = /^\s*\d+\.\s+(.*)$/.exec(e[a]);
1793
1793
  if (!A) break;
1794
- w.push(A[1]), a++;
1794
+ y.push(A[1]), a++;
1795
1795
  }
1796
- const S = w.map((A) => `<li>${ee(A)}</li>`).join(""), F = C !== 1 ? ` start="${C}"` : "";
1797
- n.push({ type: "block", html: `<ol class="wm-md-ol"${F}>${S}</ol>` });
1796
+ const S = y.map((A) => `<li>${te(A)}</li>`).join(""), $ = k !== 1 ? ` start="${k}"` : "";
1797
+ n.push({ type: "block", html: `<ol class="wm-md-ol"${$}>${S}</ol>` });
1798
1798
  continue;
1799
1799
  }
1800
1800
  const v = /^(#{1,6})\s+(.*)$/.exec(s);
1801
1801
  if (v) {
1802
- const C = v[1].length;
1802
+ const k = v[1].length;
1803
1803
  n.push({
1804
1804
  type: "block",
1805
- html: `<h${C} class="wm-md-h wm-md-h${C}">${ee(v[2])}</h${C}>`
1805
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${te(v[2])}</h${k}>`
1806
1806
  }), a++;
1807
1807
  continue;
1808
1808
  }
1809
- n.push({ type: "text", html: ee(s) }), a++;
1809
+ n.push({ type: "text", html: te(s) }), a++;
1810
1810
  }
1811
1811
  let r = "";
1812
1812
  for (let s = 0; s < n.length; s++) {
@@ -1849,7 +1849,7 @@ function as(t, e, n, a, r, s) {
1849
1849
  ])]);
1850
1850
  }
1851
1851
  const os = /* @__PURE__ */ B(rs, [["render", as], ["__scopeId", "data-v-df2447fd"]]);
1852
- function te(t) {
1852
+ function ne(t) {
1853
1853
  return t ? t.client_msg_id || t.id : "";
1854
1854
  }
1855
1855
  const ls = {
@@ -1861,7 +1861,7 @@ const ls = {
1861
1861
  idle: "Conversation en pause"
1862
1862
  }, cs = 80, ds = 200, us = {
1863
1863
  name: "WmMessageList",
1864
- components: { AIAvatar: J, HumanAvatar: ke, Bubble: ss, Typing: os, ActionResult: Qt, AttachmentPreview: Jn, ArtifactRenderer: Un },
1864
+ components: { AIAvatar: Q, HumanAvatar: ke, Bubble: ss, Typing: os, ActionResult: Qt, AttachmentPreview: Jn, ArtifactRenderer: Un },
1865
1865
  props: {
1866
1866
  messages: { type: Array, default: () => [] },
1867
1867
  streamingActive: { type: Boolean, default: !1 },
@@ -1900,9 +1900,9 @@ const ls = {
1900
1900
  const o = this.roleOf(s);
1901
1901
  if (o === "system") {
1902
1902
  if (((e = s == null ? void 0 : s.payload) == null ? void 0 : e.event) === "action_admin_pending") {
1903
- const C = t[t.length - 1];
1904
- C && C.role === "ai" ? C.messages.push(s) : t.push({
1905
- key: `g-${te(s)}`,
1903
+ const k = t[t.length - 1];
1904
+ k && k.role === "ai" ? k.messages.push(s) : t.push({
1905
+ key: `g-${ne(s)}`,
1906
1906
  role: "ai",
1907
1907
  agentName: "",
1908
1908
  agentAvatarUrl: null,
@@ -1912,7 +1912,7 @@ const ls = {
1912
1912
  continue;
1913
1913
  }
1914
1914
  t.push({
1915
- key: `sys-${te(s)}`,
1915
+ key: `sys-${ne(s)}`,
1916
1916
  role: o,
1917
1917
  messages: [s],
1918
1918
  items: [],
@@ -1922,7 +1922,7 @@ const ls = {
1922
1922
  }
1923
1923
  const c = t[t.length - 1];
1924
1924
  c && c.role === o && (o === "ai" || c.agentName === (((n = s == null ? void 0 : s.author) == null ? void 0 : n.name) || "")) ? c.messages.push(s) : t.push({
1925
- key: `g-${te(s)}`,
1925
+ key: `g-${ne(s)}`,
1926
1926
  role: o,
1927
1927
  agentName: ((a = s == null ? void 0 : s.author) == null ? void 0 : a.name) || "",
1928
1928
  agentAvatarUrl: ((r = s == null ? void 0 : s.author) == null ? void 0 : r.avatar_url) || null,
@@ -1966,7 +1966,7 @@ const ls = {
1966
1966
  this._lastSeenConvId = this.conversationId, this.scrollToBottom();
1967
1967
  },
1968
1968
  methods: {
1969
- messageKey: te,
1969
+ messageKey: ne,
1970
1970
  isAtBottom(t) {
1971
1971
  return t.scrollHeight - t.scrollTop - t.clientHeight <= cs;
1972
1972
  },
@@ -2020,9 +2020,9 @@ const ls = {
2020
2020
  }
2021
2021
  if (!r.anchor) return;
2022
2022
  const s = () => {
2023
- var C;
2023
+ var k;
2024
2024
  const o = r.anchor;
2025
- if (!((C = o.el) != null && C.isConnected)) return;
2025
+ if (!((k = o.el) != null && k.isConnected)) return;
2026
2026
  const v = o.el.getBoundingClientRect().top - t.getBoundingClientRect().top - o.relY;
2027
2027
  Math.abs(v) > 0.5 && (t.scrollTop += v);
2028
2028
  };
@@ -2118,24 +2118,38 @@ const ls = {
2118
2118
  }] : [];
2119
2119
  },
2120
2120
  // Per-corner border radius for an item inside a multi-item
2121
- // cluster. Geometric model :
2122
- // - The two corners on the *shared* edge (left for ai/human,
2123
- // right for user) become small whenever a neighbour exists
2124
- // on that side the items are flush along that edge.
2125
- // - The two corners on the *opposite* edge stay rounded unless
2126
- // the touching half of the neighbour is strictly wider than
2127
- // our touching half (card vs bubble) and physically covers
2128
- // them.
2129
- // We compare *halves* : my top corners vs `prev.bottom` (what
2130
- // touches me from above), my bottom corners vs `next.top` (what
2131
- // touches me from below).
2132
- // Bubbles get a small "tail" on their bottom lateral corner when
2133
- // they're the last item of the cluster — BL for ai/human, BR for
2134
- // user.
2121
+ // cluster. Chaque coin est calculé indépendamment selon deux
2122
+ // familles de règles :
2123
+ //
2124
+ // Côté EXTÉRIEUR (côté avatar : left pour ai/human, right pour
2125
+ // user) existence-based, kind-agnostic :
2126
+ // · coin haut SM s'il y a un voisin au-dessus ;
2127
+ // · coin bas SM s'il y a un voisin en-dessous OU si l'item
2128
+ // est le dernier du cluster (tail Messenger : la pointe
2129
+ // avatar-side du dernier item est toujours rétractée).
2130
+ // En pratique dans un cluster ≥ 2, le coin bas extérieur est
2131
+ // toujours SM ; seul le coin haut extérieur du premier item
2132
+ // reste LG.
2133
+ //
2134
+ // Côté INTÉRIEUR (opposé avatar) — width-based, asymétrique :
2135
+ // · coin haut SM si `prev.bottom` est strictement plus large
2136
+ // que `me.top` ;
2137
+ // · coin bas SM si `next.top` est strictement plus large
2138
+ // que `me.bottom`.
2139
+ // On compare *moitiés* : ma moitié haute (`me.top`) vs ce que
2140
+ // le voisin du dessus me présente (`prev.bottom`), et
2141
+ // symétriquement en bas. La comparaison de largeur est
2142
+ // `card > bubble`, asymétrique : à un joint `card↔bubble`,
2143
+ // seule la bubble voit son coin intérieur rétracté (un coin
2144
+ // rond rentré sous un voisin plus large semblerait flotter).
2145
+ // Aux joints même-kind (bubble↔bubble, card↔card), aucun coin
2146
+ // intérieur n'est rétracté : on n'extrapole pas la largeur
2147
+ // réelle, qui est content-driven.
2135
2148
  cornersFor(t, e) {
2136
- const n = t.items, a = t.role === "user", r = 14, s = 4, o = !!n[e - 1], c = !!n[e + 1];
2137
- let v = r, C = r, w = r, S = r;
2138
- return a ? (o && (C = s, v = s), c && (w = s, S = s), c || (w = s)) : (o && (v = s, C = s), c && (S = s, w = s), c || (S = s)), { tl: v, tr: C, br: w, bl: S };
2149
+ var N, F, P;
2150
+ const n = t.items, a = (N = n[e]) == null ? void 0 : N.kind, r = (F = n[e - 1]) == null ? void 0 : F.kind, s = (P = n[e + 1]) == null ? void 0 : P.kind, o = t.role === "user", c = 14, v = 4, k = r == null ? void 0 : r.bottom, y = s == null ? void 0 : s.top, S = (q, Y) => q === "card" && Y === "bubble";
2151
+ let $ = c, A = c, D = c, x = c;
2152
+ return o ? (k && (A = v), (y || !s) && (D = v), k && S(k, a == null ? void 0 : a.top) && ($ = v), y && S(y, a == null ? void 0 : a.bottom) && (x = v)) : (k && ($ = v), (y || !s) && (x = v), k && S(k, a == null ? void 0 : a.top) && (A = v), y && S(y, a == null ? void 0 : a.bottom) && (D = v)), { tl: $, tr: A, br: D, bl: x };
2139
2153
  },
2140
2154
  // Inline style emitting the four corner CSS variables. Set on
2141
2155
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -2229,7 +2243,7 @@ const ls = {
2229
2243
  class: "wm-list__row wm-list__row--ai fade-up"
2230
2244
  }, Ss = { class: "wm-list__avatarSlot" };
2231
2245
  function xs(t, e, n, a, r, s) {
2232
- const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), w = O("Bubble"), S = O("AttachmentPreview"), F = O("Typing");
2246
+ const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), k = O("ArtifactRenderer"), y = O("Bubble"), S = O("AttachmentPreview"), $ = O("Typing");
2233
2247
  return l(), d("div", {
2234
2248
  ref: "scrollEl",
2235
2249
  class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
@@ -2241,20 +2255,20 @@ function xs(t, e, n, a, r, s) {
2241
2255
  "aria-hidden": "true"
2242
2256
  }, null, -1),
2243
2257
  i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
2244
- ])])) : s.historyExhausted ? (l(), d("div", ms, "Début de la conversation")) : y("", !0),
2258
+ ])])) : s.historyExhausted ? (l(), d("div", ms, "Début de la conversation")) : w("", !0),
2245
2259
  n.dateLabel ? (l(), d("div", fs, [
2246
2260
  e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
2247
2261
  i("span", ps, b(n.dateLabel), 1),
2248
2262
  e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
2249
- ])) : y("", !0),
2250
- (l(!0), d(M, null, $(s.groups, (A, N) => (l(), d(M, {
2263
+ ])) : w("", !0),
2264
+ (l(!0), d(M, null, j(s.groups, (A, D) => (l(), d(M, {
2251
2265
  key: A.key
2252
2266
  }, [
2253
2267
  A.key === s.unreadGroupKey ? (l(), d("div", _s, [...e[4] || (e[4] = [
2254
2268
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
2255
2269
  i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
2256
2270
  i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
2257
- ])])) : y("", !0),
2271
+ ])])) : w("", !0),
2258
2272
  i("div", {
2259
2273
  class: E(["wm-list__group", "wm-list__group--" + A.role])
2260
2274
  }, [
@@ -2263,13 +2277,13 @@ function xs(t, e, n, a, r, s) {
2263
2277
  i("span", gs, b(A.systemLabel), 1),
2264
2278
  e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
2265
2279
  ])) : (l(), d(M, { key: 1 }, [
2266
- (l(!0), d(M, null, $(A.items, (x, D) => (l(), d("div", {
2280
+ (l(!0), d(M, null, j(A.items, (x, N) => (l(), d("div", {
2267
2281
  key: `${s.messageKey(x.message)}-${x.partKey}`,
2268
2282
  class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
2269
- style: V(s.cornersStyle(A, D))
2283
+ style: V(s.cornersStyle(A, N))
2270
2284
  }, [
2271
2285
  A.role !== "user" ? (l(), d("div", ys, [
2272
- D === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
2286
+ N === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
2273
2287
  A.role === "ai" ? (l(), R(o, {
2274
2288
  key: 0,
2275
2289
  size: 26,
@@ -2280,8 +2294,8 @@ function xs(t, e, n, a, r, s) {
2280
2294
  "avatar-url": A.agentAvatarUrl,
2281
2295
  size: 26
2282
2296
  }, null, 8, ["name", "avatar-url"]))
2283
- ], 64)) : y("", !0)
2284
- ])) : y("", !0),
2297
+ ], 64)) : w("", !0)
2298
+ ])) : w("", !0),
2285
2299
  x.renderAs === "action" ? (l(), R(v, {
2286
2300
  key: 1,
2287
2301
  state: x.message.payload.state,
@@ -2292,37 +2306,37 @@ function xs(t, e, n, a, r, s) {
2292
2306
  state: "awaiting",
2293
2307
  label: "Demande d'approbation envoyée",
2294
2308
  detail: x.message.text_md || ""
2295
- }, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), R(C, {
2309
+ }, null, 8, ["detail"])) : x.renderAs === "artifact-of-action" ? (l(), R(k, {
2296
2310
  key: 3,
2297
2311
  artifact: s.actionArtifact(x.message)
2298
- }, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), R(C, {
2312
+ }, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), R(k, {
2299
2313
  key: 4,
2300
2314
  artifact: s.artifactOf(x.message)
2301
2315
  }, null, 8, ["artifact"])) : (l(), d("div", ws, [
2302
- x.message.text_md ? (l(), R(w, {
2316
+ x.message.text_md ? (l(), R(y, {
2303
2317
  key: 0,
2304
2318
  role: A.role,
2305
2319
  text: x.message.text_md
2306
- }, null, 8, ["role", "text"])) : y("", !0),
2320
+ }, null, 8, ["role", "text"])) : w("", !0),
2307
2321
  s.attachmentsOf(x.message).length ? (l(), d("div", {
2308
2322
  key: 1,
2309
2323
  class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
2310
2324
  }, [
2311
- (l(!0), d(M, null, $(s.attachmentsOf(x.message), (j, P) => (l(), R(S, {
2325
+ (l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, P) => (l(), R(S, {
2312
2326
  key: `${s.messageKey(x.message)}-att-${P}`,
2313
- attachment: j
2327
+ attachment: F
2314
2328
  }, null, 8, ["attachment"]))), 128))
2315
- ], 2)) : y("", !0)
2329
+ ], 2)) : w("", !0)
2316
2330
  ]))
2317
2331
  ], 6))), 128)),
2318
2332
  A.role !== "user" || s.lastTimeOf(A) ? (l(), d("div", {
2319
2333
  key: 0,
2320
2334
  class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
2321
2335
  }, [
2322
- A.role !== "user" ? (l(), d("span", bs, b(s.roleLabel(A)), 1)) : y("", !0),
2323
- A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", ks, "·")) : y("", !0),
2324
- s.lastTimeOf(A) ? (l(), d("span", Cs, b(s.lastTimeOf(A)), 1)) : y("", !0)
2325
- ], 2)) : y("", !0)
2336
+ A.role !== "user" ? (l(), d("span", bs, b(s.roleLabel(A)), 1)) : w("", !0),
2337
+ A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", ks, "·")) : w("", !0),
2338
+ s.lastTimeOf(A) ? (l(), d("span", Cs, b(s.lastTimeOf(A)), 1)) : w("", !0)
2339
+ ], 2)) : w("", !0)
2326
2340
  ], 64))
2327
2341
  ], 2)
2328
2342
  ], 64))), 128)),
@@ -2333,11 +2347,11 @@ function xs(t, e, n, a, r, s) {
2333
2347
  tail: !0
2334
2348
  })
2335
2349
  ]),
2336
- z(F)
2337
- ])) : y("", !0)
2350
+ z($)
2351
+ ])) : w("", !0)
2338
2352
  ], 34);
2339
2353
  }
2340
- const Ms = /* @__PURE__ */ B(us, [["render", xs], ["__scopeId", "data-v-5374b236"]]), ne = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
2354
+ const Ms = /* @__PURE__ */ B(us, [["render", xs], ["__scopeId", "data-v-0e60114e"]]), se = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
2341
2355
  function Ts() {
2342
2356
  return he && [
2343
2357
  "video/webm;codecs=vp9,opus",
@@ -2362,7 +2376,7 @@ function Ni(t) {
2362
2376
  return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
2363
2377
  }
2364
2378
  async function Is() {
2365
- if (!ne) return null;
2379
+ if (!se) return null;
2366
2380
  let t;
2367
2381
  try {
2368
2382
  t = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !1 }));
@@ -2385,64 +2399,64 @@ async function Os(t) {
2385
2399
  const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
2386
2400
  r.width = n, r.height = a, r.getContext("2d").drawImage(e, 0, 0, n, a);
2387
2401
  const s = await new Promise((c, v) => {
2388
- r.toBlob((C) => C ? c(C) : v(new Error("toBlob failed")), "image/png");
2402
+ r.toBlob((k) => k ? c(k) : v(new Error("toBlob failed")), "image/png");
2389
2403
  }), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
2390
2404
  return new File([s], `capture-${o}.png`, { type: "image/png" });
2391
2405
  }
2392
2406
  async function Es(t = {}) {
2393
- var C;
2394
- if (!ne || !he) return null;
2407
+ var k;
2408
+ if (!se || !he) return null;
2395
2409
  let e;
2396
2410
  try {
2397
2411
  e = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !0 }));
2398
- } catch (w) {
2399
- return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
2412
+ } catch (y) {
2413
+ return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
2400
2414
  }
2401
2415
  const n = Ts();
2402
2416
  let a;
2403
2417
  try {
2404
2418
  a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
2405
- } catch (w) {
2406
- return console.error("[media] recorder init", w), e.getTracks().forEach((S) => {
2419
+ } catch (y) {
2420
+ return console.error("[media] recorder init", y), e.getTracks().forEach((S) => {
2407
2421
  S.stop();
2408
2422
  }), null;
2409
2423
  }
2410
2424
  const r = [];
2411
2425
  let s = null, o = !1;
2412
- a.addEventListener("dataavailable", (w) => {
2413
- w.data && w.data.size > 0 && r.push(w.data);
2426
+ a.addEventListener("dataavailable", (y) => {
2427
+ y.data && y.data.size > 0 && r.push(y.data);
2414
2428
  }), a.addEventListener("stop", () => {
2415
- var w, S;
2416
- if (s && clearInterval(s), e.getTracks().forEach((F) => {
2417
- F.stop();
2429
+ var y, S;
2430
+ if (s && clearInterval(s), e.getTracks().forEach(($) => {
2431
+ $.stop();
2418
2432
  }), r.length) {
2419
- const F = a.mimeType || n || "video/webm", A = new Blob(r, { type: F }), N = /mp4/.test(F) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${x}.${N}`, { type: F });
2420
- (w = t.onfinalize) == null || w.call(t, D);
2433
+ const $ = a.mimeType || n || "video/webm", A = new Blob(r, { type: $ }), D = /mp4/.test($) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), N = new File([A], `ecran-${x}.${D}`, { type: $ });
2434
+ (y = t.onfinalize) == null || y.call(t, N);
2421
2435
  } else
2422
2436
  (S = t.oncancel) == null || S.call(t);
2423
- }), e.getVideoTracks().forEach((w) => {
2424
- w.addEventListener("ended", () => c(), { once: !0 });
2437
+ }), e.getVideoTracks().forEach((y) => {
2438
+ y.addEventListener("ended", () => c(), { once: !0 });
2425
2439
  });
2426
2440
  function c() {
2427
2441
  if (!o && (o = !0, a.state !== "inactive"))
2428
2442
  try {
2429
2443
  a.stop();
2430
- } catch (w) {
2431
- console.error("[media] recorder stop", w);
2444
+ } catch (y) {
2445
+ console.error("[media] recorder stop", y);
2432
2446
  }
2433
2447
  }
2434
2448
  try {
2435
2449
  a.start(1e3);
2436
- } catch (w) {
2437
- return console.error("[media] recorder start", w), e.getTracks().forEach((S) => {
2450
+ } catch (y) {
2451
+ return console.error("[media] recorder start", y), e.getTracks().forEach((S) => {
2438
2452
  S.stop();
2439
2453
  }), null;
2440
2454
  }
2441
- (C = t.onstart) == null || C.call(t);
2455
+ (k = t.onstart) == null || k.call(t);
2442
2456
  const v = Date.now();
2443
2457
  return s = setInterval(() => {
2444
- var w;
2445
- (w = t.ontick) == null || w.call(t, Date.now() - v);
2458
+ var y;
2459
+ (y = t.ontick) == null || y.call(t, Date.now() - v);
2446
2460
  }, 500), {
2447
2461
  stop: c,
2448
2462
  get state() {
@@ -2491,7 +2505,7 @@ const Bs = [
2491
2505
  attachItems() {
2492
2506
  return Bs.map((t) => ({
2493
2507
  ...t,
2494
- disabled: t.action === "screenshot" && !ne || t.action === "record" && (!ne || !he)
2508
+ disabled: t.action === "screenshot" && !se || t.action === "record" && (!se || !he)
2495
2509
  }));
2496
2510
  },
2497
2511
  recordingElapsedLabel() {
@@ -2618,10 +2632,10 @@ function Ws(t, e, n, a, r, s) {
2618
2632
  class: "wm-rec__stop",
2619
2633
  onClick: e[0] || (e[0] = (...o) => s.stopRecording && s.stopRecording(...o))
2620
2634
  }, "Arrêter")
2621
- ])) : y("", !0),
2635
+ ])) : w("", !0),
2622
2636
  i("form", {
2623
2637
  class: E(["wm-compose", { "has-attach": r.attachOpen }]),
2624
- onSubmit: e[7] || (e[7] = Y((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
2638
+ onSubmit: e[7] || (e[7] = X((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
2625
2639
  }, [
2626
2640
  i("input", {
2627
2641
  ref: "fileEl",
@@ -2634,9 +2648,9 @@ function Ws(t, e, n, a, r, s) {
2634
2648
  key: 0,
2635
2649
  class: "wm-compose__overlay",
2636
2650
  onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
2637
- })) : y("", !0),
2651
+ })) : w("", !0),
2638
2652
  r.attachOpen ? (l(), d("div", js, [
2639
- (l(!0), d(M, null, $(s.attachItems, (o) => (l(), d("button", {
2653
+ (l(!0), d(M, null, j(s.attachItems, (o) => (l(), d("button", {
2640
2654
  key: o.action,
2641
2655
  type: "button",
2642
2656
  class: "wm-compose__menuItem",
@@ -2657,7 +2671,7 @@ function Ws(t, e, n, a, r, s) {
2657
2671
  ]),
2658
2672
  i("span", null, b(o.label), 1)
2659
2673
  ], 8, Us))), 128))
2660
- ])) : y("", !0),
2674
+ ])) : w("", !0),
2661
2675
  H(i("textarea", {
2662
2676
  ref: "inputEl",
2663
2677
  "onUpdate:modelValue": e[3] || (e[3] = (o) => r.local = o),
@@ -2668,7 +2682,7 @@ function Ws(t, e, n, a, r, s) {
2668
2682
  onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
2669
2683
  onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
2670
2684
  }, null, 40, Hs), [
2671
- [G, r.local]
2685
+ [K, r.local]
2672
2686
  ]),
2673
2687
  i("div", zs, [
2674
2688
  i("button", {
@@ -2740,18 +2754,18 @@ function Js(t, e, n, a, r, s) {
2740
2754
  key: s.batchKey,
2741
2755
  class: "wm-chips"
2742
2756
  }, [
2743
- (l(!0), d(M, null, $(n.items, (o, c) => (l(), d("button", {
2757
+ (l(!0), d(M, null, j(n.items, (o, c) => (l(), d("button", {
2744
2758
  key: c,
2745
2759
  type: "button",
2746
2760
  class: "wm-chip",
2747
2761
  style: V({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
2748
2762
  onClick: (v) => t.$emit("select", o)
2749
2763
  }, b(o.label), 13, Ys))), 128))
2750
- ])) : y("", !0);
2764
+ ])) : w("", !0);
2751
2765
  }
2752
2766
  const Xs = /* @__PURE__ */ B(Ks, [["render", Js], ["__scopeId", "data-v-55aa529d"]]), Qs = {
2753
2767
  name: "WmApprovalCard",
2754
- components: { AIAvatar: J },
2768
+ components: { AIAvatar: Q },
2755
2769
  props: {
2756
2770
  action: { type: String, required: !0 },
2757
2771
  detail: { type: String, default: "" },
@@ -2795,7 +2809,7 @@ function ar(t, e, n, a, r, s) {
2795
2809
  ]),
2796
2810
  i("div", nr, [
2797
2811
  i("div", sr, b(n.action), 1),
2798
- n.detail ? (l(), d("div", rr, b(n.detail), 1)) : y("", !0)
2812
+ n.detail ? (l(), d("div", rr, b(n.detail), 1)) : w("", !0)
2799
2813
  ])
2800
2814
  ]),
2801
2815
  i("div", ir, [
@@ -2804,13 +2818,13 @@ function ar(t, e, n, a, r, s) {
2804
2818
  type: "button",
2805
2819
  class: "wm-approval__btn wm-approval__btn--neutral",
2806
2820
  onClick: e[0] || (e[0] = (c) => t.$emit("callback", s.rejectId))
2807
- }, b(s.rejectLabel), 1)) : y("", !0),
2821
+ }, b(s.rejectLabel), 1)) : w("", !0),
2808
2822
  s.approveId ? (l(), d("button", {
2809
2823
  key: 1,
2810
2824
  type: "button",
2811
2825
  class: "wm-approval__btn wm-approval__btn--primary",
2812
2826
  onClick: e[1] || (e[1] = (c) => t.$emit("callback", s.approveId))
2813
- }, b(s.approveLabel), 1)) : y("", !0)
2827
+ }, b(s.approveLabel), 1)) : w("", !0)
2814
2828
  ])
2815
2829
  ]);
2816
2830
  }
@@ -2826,7 +2840,7 @@ const lr = /* @__PURE__ */ new Set([
2826
2840
  "date"
2827
2841
  ]), cr = {
2828
2842
  name: "WmFormCard",
2829
- components: { AIAvatar: J },
2843
+ components: { AIAvatar: Q },
2830
2844
  props: {
2831
2845
  form: { type: Object, required: !0 },
2832
2846
  readOnly: { type: Boolean, default: !1 },
@@ -2934,14 +2948,14 @@ function Lr(t, e, n, a, r, s) {
2934
2948
  ]),
2935
2949
  i("div", mr, [
2936
2950
  i("div", fr, b(n.form.title || "Formulaire"), 1),
2937
- n.form.description ? (l(), d("div", pr, b(n.form.description), 1)) : y("", !0)
2951
+ n.form.description ? (l(), d("div", pr, b(n.form.description), 1)) : w("", !0)
2938
2952
  ])
2939
2953
  ]),
2940
2954
  i("form", {
2941
2955
  class: "wm-form__body",
2942
- onSubmit: e[0] || (e[0] = Y((...c) => s.onSubmit && s.onSubmit(...c), ["prevent"]))
2956
+ onSubmit: e[0] || (e[0] = X((...c) => s.onSubmit && s.onSubmit(...c), ["prevent"]))
2943
2957
  }, [
2944
- (l(!0), d(M, null, $(s.normalizedFields, (c) => (l(), d("div", {
2958
+ (l(!0), d(M, null, j(s.normalizedFields, (c) => (l(), d("div", {
2945
2959
  key: c.key,
2946
2960
  class: "wm-form__field"
2947
2961
  }, [
@@ -2949,8 +2963,8 @@ function Lr(t, e, n, a, r, s) {
2949
2963
  for: `wm-f-${r._uid}-${c.key}`,
2950
2964
  class: "wm-form__label"
2951
2965
  }, [
2952
- re(b(c.label), 1),
2953
- c.required ? (l(), d("span", vr, "*")) : y("", !0)
2966
+ ie(b(c.label), 1),
2967
+ c.required ? (l(), d("span", vr, "*")) : w("", !0)
2954
2968
  ], 8, _r),
2955
2969
  c.type === "text" ? H((l(), d("input", {
2956
2970
  key: 0,
@@ -2962,7 +2976,7 @@ function Lr(t, e, n, a, r, s) {
2962
2976
  required: c.required,
2963
2977
  disabled: n.readOnly || r.busy
2964
2978
  }, null, 8, gr)), [
2965
- [G, r.values[c.key]]
2979
+ [K, r.values[c.key]]
2966
2980
  ]) : c.type === "textarea" ? H((l(), d("textarea", {
2967
2981
  key: 1,
2968
2982
  id: `wm-f-${r._uid}-${c.key}`,
@@ -2973,7 +2987,7 @@ function Lr(t, e, n, a, r, s) {
2973
2987
  required: c.required,
2974
2988
  disabled: n.readOnly || r.busy
2975
2989
  }, null, 8, yr)), [
2976
- [G, r.values[c.key]]
2990
+ [K, r.values[c.key]]
2977
2991
  ]) : c.type === "number" ? H((l(), d("input", {
2978
2992
  key: 2,
2979
2993
  id: `wm-f-${r._uid}-${c.key}`,
@@ -2985,7 +2999,7 @@ function Lr(t, e, n, a, r, s) {
2985
2999
  disabled: n.readOnly || r.busy
2986
3000
  }, null, 8, wr)), [
2987
3001
  [
2988
- G,
3002
+ K,
2989
3003
  r.values[c.key],
2990
3004
  void 0,
2991
3005
  { number: !0 }
@@ -2999,7 +3013,7 @@ function Lr(t, e, n, a, r, s) {
2999
3013
  required: c.required,
3000
3014
  disabled: n.readOnly || r.busy
3001
3015
  }, null, 8, br)), [
3002
- [G, r.values[c.key]]
3016
+ [K, r.values[c.key]]
3003
3017
  ]) : c.type === "boolean" ? (l(), d("label", kr, [
3004
3018
  H(i("input", {
3005
3019
  id: `wm-f-${r._uid}-${c.key}`,
@@ -3019,14 +3033,14 @@ function Lr(t, e, n, a, r, s) {
3019
3033
  disabled: n.readOnly || r.busy
3020
3034
  }, [
3021
3035
  i("option", Sr, b(c.placeholder || "Choisir…"), 1),
3022
- (l(!0), d(M, null, $(c.options, (v) => (l(), d("option", {
3036
+ (l(!0), d(M, null, j(c.options, (v) => (l(), d("option", {
3023
3037
  key: v.value,
3024
3038
  value: v.value
3025
3039
  }, b(v.label), 9, xr))), 128))
3026
3040
  ], 8, Ar)), [
3027
3041
  [Oe, r.values[c.key]]
3028
3042
  ]) : c.type === "multiselect" ? (l(), d("div", Mr, [
3029
- (l(!0), d(M, null, $(c.options, (v) => (l(), d("label", {
3043
+ (l(!0), d(M, null, j(c.options, (v) => (l(), d("label", {
3030
3044
  key: v.value,
3031
3045
  class: "wm-form__multiItem"
3032
3046
  }, [
@@ -3035,20 +3049,20 @@ function Lr(t, e, n, a, r, s) {
3035
3049
  value: v.value,
3036
3050
  checked: Array.isArray(r.values[c.key]) && r.values[c.key].includes(v.value),
3037
3051
  disabled: n.readOnly || r.busy,
3038
- onChange: (C) => s.toggleMulti(c.key, v.value, C.target.checked)
3052
+ onChange: (k) => s.toggleMulti(c.key, v.value, k.target.checked)
3039
3053
  }, null, 40, Tr),
3040
3054
  i("span", null, b(v.label), 1)
3041
3055
  ]))), 128))
3042
- ])) : y("", !0)
3056
+ ])) : w("", !0)
3043
3057
  ]))), 128)),
3044
- r.error ? (l(), d("div", Ir, b(r.error), 1)) : y("", !0),
3058
+ r.error ? (l(), d("div", Ir, b(r.error), 1)) : w("", !0),
3045
3059
  n.readOnly ? (l(), d("div", Br, "Réponse envoyée")) : (l(), d("button", {
3046
3060
  key: 1,
3047
3061
  type: "submit",
3048
3062
  class: "wm-form__submit",
3049
3063
  disabled: r.busy
3050
3064
  }, [
3051
- r.busy ? (l(), d("span", Er)) : y("", !0),
3065
+ r.busy ? (l(), d("span", Er)) : w("", !0),
3052
3066
  i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
3053
3067
  ], 8, Or))
3054
3068
  ], 32)
@@ -3090,7 +3104,7 @@ function zr(t, e, n, a, r, s) {
3090
3104
  e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
3091
3105
  e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
3092
3106
  i("div", jr, [
3093
- (l(!0), d(M, null, $(r.options, (o) => (l(), d("button", {
3107
+ (l(!0), d(M, null, j(r.options, (o) => (l(), d("button", {
3094
3108
  key: o.v,
3095
3109
  type: "button",
3096
3110
  class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
@@ -3259,18 +3273,18 @@ function di(t, e, n, a, r, s) {
3259
3273
  placeholder: "Rechercher dans vos messages",
3260
3274
  "aria-label": "Rechercher dans vos messages"
3261
3275
  }, null, 512), [
3262
- [G, r.query]
3276
+ [K, r.query]
3263
3277
  ])
3264
3278
  ])
3265
3279
  ]),
3266
3280
  i("div", Qr, [
3267
- (l(!0), d(M, null, $(s.groups, (o) => (l(), d(M, {
3281
+ (l(!0), d(M, null, j(s.groups, (o) => (l(), d(M, {
3268
3282
  key: o.key
3269
3283
  }, [
3270
3284
  o.items.length ? (l(), d("div", Zr, [
3271
3285
  i("div", ei, b(o.label), 1),
3272
3286
  i("div", ti, [
3273
- (l(!0), d(M, null, $(o.items, (c) => (l(), d("button", {
3287
+ (l(!0), d(M, null, j(o.items, (c) => (l(), d("button", {
3274
3288
  key: c.id,
3275
3289
  type: "button",
3276
3290
  class: E(["wm-hd__row", {
@@ -3293,7 +3307,7 @@ function di(t, e, n, a, r, s) {
3293
3307
  opacity: "0.92"
3294
3308
  })
3295
3309
  ], -1)),
3296
- c.unread ? (l(), d("span", ri)) : y("", !0)
3310
+ c.unread ? (l(), d("span", ri)) : w("", !0)
3297
3311
  ]),
3298
3312
  i("div", ii, [
3299
3313
  i("div", ai, [
@@ -3303,9 +3317,9 @@ function di(t, e, n, a, r, s) {
3303
3317
  ])
3304
3318
  ], 10, ni))), 128))
3305
3319
  ])
3306
- ])) : y("", !0)
3320
+ ])) : w("", !0)
3307
3321
  ], 64))), 128)),
3308
- s.hasAny ? y("", !0) : (l(), d("div", ci, " Aucun fil pour le moment. "))
3322
+ s.hasAny ? w("", !0) : (l(), d("div", ci, " Aucun fil pour le moment. "))
3309
3323
  ])
3310
3324
  ])
3311
3325
  ]);
@@ -3378,7 +3392,7 @@ function gi(t, e, n, a, r, s) {
3378
3392
  onClick: e[2] || (e[2] = (o) => s.emit("rename"))
3379
3393
  }, [...e[9] || (e[9] = [
3380
3394
  ue('<span class="wm-mm__icon" data-v-c1bb81d2><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-c1bb81d2><path d="M12 20h9" data-v-c1bb81d2></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-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Renommer le fil</span>', 2)
3381
- ])])) : y("", !0),
3395
+ ])])) : w("", !0),
3382
3396
  n.canClear ? (l(), d("button", {
3383
3397
  key: 1,
3384
3398
  type: "button",
@@ -3401,7 +3415,7 @@ function gi(t, e, n, a, r, s) {
3401
3415
  ])
3402
3416
  ], -1),
3403
3417
  i("span", { class: "wm-mm__label" }, "Effacer ce fil", -1)
3404
- ])])) : y("", !0),
3418
+ ])])) : w("", !0),
3405
3419
  n.canExport ? (l(), d("button", {
3406
3420
  key: 2,
3407
3421
  type: "button",
@@ -3409,7 +3423,7 @@ function gi(t, e, n, a, r, s) {
3409
3423
  onClick: e[4] || (e[4] = (o) => s.emit("export"))
3410
3424
  }, [...e[11] || (e[11] = [
3411
3425
  ue('<span class="wm-mm__icon" data-v-c1bb81d2><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-c1bb81d2><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Exporter la transcription</span><span class="wm-mm__hint" data-v-c1bb81d2>.txt</span>', 3)
3412
- ])])) : y("", !0)
3426
+ ])])) : w("", !0)
3413
3427
  ]),
3414
3428
  e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
3415
3429
  i("div", _i, [
@@ -3465,7 +3479,7 @@ function gi(t, e, n, a, r, s) {
3465
3479
  ])
3466
3480
  ], -1),
3467
3481
  i("span", { class: "wm-mm__label" }, "Statut des services", -1)
3468
- ])])) : y("", !0),
3482
+ ])])) : w("", !0),
3469
3483
  n.helpUrl ? (l(), d("button", {
3470
3484
  key: 1,
3471
3485
  type: "button",
@@ -3488,7 +3502,7 @@ function gi(t, e, n, a, r, s) {
3488
3502
  ])
3489
3503
  ], -1),
3490
3504
  i("span", { class: "wm-mm__label" }, "Centre d'aide", -1)
3491
- ])])) : y("", !0)
3505
+ ])])) : w("", !0)
3492
3506
  ])
3493
3507
  ])
3494
3508
  ]);
@@ -3508,8 +3522,8 @@ function wi(t, e) {
3508
3522
  if (s == null || s === "") continue;
3509
3523
  let o;
3510
3524
  if (Array.isArray(s)) {
3511
- if (o = s.map((c) => se(r, String(c))).join(", "), !o) continue;
3512
- } else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
3525
+ if (o = s.map((c) => re(r, String(c))).join(", "), !o) continue;
3526
+ } else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = re(r, String(s));
3513
3527
  a.push(`${r.label} :
3514
3528
  ${o}`);
3515
3529
  }
@@ -3517,7 +3531,7 @@ ${o}`);
3517
3531
 
3518
3532
  `);
3519
3533
  }
3520
- function se(t, e) {
3534
+ function re(t, e) {
3521
3535
  if (!Array.isArray(t == null ? void 0 : t.options)) return e;
3522
3536
  const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
3523
3537
  return (n == null ? void 0 : n.label) || e;
@@ -3530,8 +3544,8 @@ function bi(t, e) {
3530
3544
  if (s == null || s === "") continue;
3531
3545
  let o;
3532
3546
  if (Array.isArray(s)) {
3533
- if (o = s.map((v) => se(r, String(v))).join(", "), !o) continue;
3534
- } else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
3547
+ if (o = s.map((v) => re(r, String(v))).join(", "), !o) continue;
3548
+ } else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = re(r, String(s));
3535
3549
  const c = r.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
3536
3550
  `));
3537
3551
  n.push({ label: r.label, value: o, multiline: c });
@@ -3910,7 +3924,7 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
3910
3924
  const e = (v = (c = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : c.pending) == null ? void 0 : v.prepared_params;
3911
3925
  if (!e || typeof e != "object") return "";
3912
3926
  const n = Object.entries(e);
3913
- return n.length ? n.slice(0, 2).map(([C, w]) => `${C}: ${w}`).join(" · ") : "";
3927
+ return n.length ? n.slice(0, 2).map(([k, y]) => `${k}: ${y}`).join(" · ") : "";
3914
3928
  },
3915
3929
  actionInFlight() {
3916
3930
  var t, e;
@@ -4241,13 +4255,13 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
4241
4255
  ) + a;
4242
4256
  this.nextRevealAt = s;
4243
4257
  const o = Math.max(0, s - e), c = t.id, v = setTimeout(() => {
4244
- this.revealedAt = { ...this.revealedAt, [c]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== v);
4258
+ this.revealedAt = { ...this.revealedAt, [c]: Date.now() }, this.revealTimers = this.revealTimers.filter((y) => y !== v);
4245
4259
  }, o);
4246
4260
  this.revealTimers.push(v);
4247
- const C = setTimeout(() => {
4248
- this.revealedAt[c] > 0 || (this.revealedAt = { ...this.revealedAt, [c]: Date.now() }), this.revealTimers = this.revealTimers.filter((w) => w !== C);
4261
+ const k = setTimeout(() => {
4262
+ this.revealedAt[c] > 0 || (this.revealedAt = { ...this.revealedAt, [c]: Date.now() }), this.revealTimers = this.revealTimers.filter((y) => y !== k);
4249
4263
  }, o + 4e3);
4250
- this.revealTimers.push(C);
4264
+ this.revealTimers.push(k);
4251
4265
  },
4252
4266
  async boot() {
4253
4267
  if (!this.canBoot) {
@@ -4400,7 +4414,7 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
4400
4414
  !t || !this.store || !(!(typeof window < "u" && typeof window.confirm == "function") || window.confirm("Effacer ce fil de votre côté ? Cette action ne supprime pas les messages côté agent.")) || ((n = this.s) != null && n.messagesByConv && (this.s.messagesByConv[t.id] = []), this.activeConvId = null, this.showOnboarding = !0);
4401
4415
  },
4402
4416
  exportCurrentConv() {
4403
- var r, s, o, c, v, C;
4417
+ var r, s, o, c, v, k;
4404
4418
  const t = this.currentConv;
4405
4419
  if (!t) return;
4406
4420
  const e = (((s = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : s[t.id]) || []).slice(), n = [
@@ -4408,18 +4422,18 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
4408
4422
  t.created_at ? `Créée le : ${t.created_at}` : "",
4409
4423
  ""
4410
4424
  ];
4411
- for (const w of e) {
4412
- if (!w) continue;
4413
- const S = ((o = w.author) == null ? void 0 : o.name) || (((c = w.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((C = w.author) == null ? void 0 : C.type) === "agent_ia" ? "Assistant IA" : "Système"), F = w.created_at ? new Date(w.created_at).toLocaleString("fr-FR") : "", A = (w.text_md || "").trim();
4414
- A && (n.push(`[${F}] ${S} :`), n.push(A), n.push(""));
4425
+ for (const y of e) {
4426
+ if (!y) continue;
4427
+ const S = ((o = y.author) == null ? void 0 : o.name) || (((c = y.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = y.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((k = y.author) == null ? void 0 : k.type) === "agent_ia" ? "Assistant IA" : "Système"), $ = y.created_at ? new Date(y.created_at).toLocaleString("fr-FR") : "", A = (y.text_md || "").trim();
4428
+ A && (n.push(`[${$}] ${S} :`), n.push(A), n.push(""));
4415
4429
  }
4416
4430
  const a = new Blob([n.join(`
4417
4431
  `)], { type: "text/plain;charset=utf-8" });
4418
4432
  try {
4419
- const w = URL.createObjectURL(a), S = document.createElement("a");
4420
- 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);
4421
- } catch (w) {
4422
- console.error("[ww-messenger] export failed", w);
4433
+ const y = URL.createObjectURL(a), S = document.createElement("a");
4434
+ S.href = y, S.download = `${(t.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(S), S.click(), document.body.removeChild(S), setTimeout(() => URL.revokeObjectURL(y), 1e3);
4435
+ } catch (y) {
4436
+ console.error("[ww-messenger] export failed", y);
4423
4437
  }
4424
4438
  },
4425
4439
  async onSend(t) {
@@ -4516,7 +4530,7 @@ const ki = 450, Ci = 50, Ai = 900, Si = 12e3, xi = 300, Mi = {
4516
4530
  class: "wm-attached"
4517
4531
  }, ji = ["onClick"];
4518
4532
  function Ui(t, e, n, a, r, s) {
4519
- const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), w = O("ApprovalCard"), S = O("FormCard"), F = O("Feedback"), A = O("SuggestionChips"), N = O("Composer"), x = O("MoreMenu"), D = O("HistoryDrawer");
4533
+ const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), k = O("MessageList"), y = O("ApprovalCard"), S = O("FormCard"), $ = O("Feedback"), A = O("SuggestionChips"), D = O("Composer"), x = O("MoreMenu"), N = O("HistoryDrawer");
4520
4534
  return l(), d("div", {
4521
4535
  class: E(["wm-root", `wm-root--${n.displayMode}`])
4522
4536
  }, [
@@ -4525,8 +4539,8 @@ function Ui(t, e, n, a, r, s) {
4525
4539
  "unread-count": s.unreadCount,
4526
4540
  peek: s.launcherPeek,
4527
4541
  onOpen: s.openFromPeek,
4528
- onDismiss: e[0] || (e[0] = (j) => r.labelDismissed = !0)
4529
- }, null, 8, ["unread-count", "peek", "onOpen"])) : y("", !0),
4542
+ onDismiss: e[0] || (e[0] = (F) => r.labelDismissed = !0)
4543
+ }, null, 8, ["unread-count", "peek", "onOpen"])) : w("", !0),
4530
4544
  r.isOpen || s.isEmbedded ? (l(), d("section", {
4531
4545
  key: 1,
4532
4546
  class: E(["wm-panel", `wm-panel--${n.displayMode}`]),
@@ -4535,12 +4549,12 @@ function Ui(t, e, n, a, r, s) {
4535
4549
  "aria-label": "Messenger"
4536
4550
  }, [
4537
4551
  !s.ready && !s.error ? (l(), d("div", Ti, [
4538
- s.isEmbedded ? y("", !0) : (l(), d("button", {
4552
+ s.isEmbedded ? w("", !0) : (l(), d("button", {
4539
4553
  key: 0,
4540
4554
  type: "button",
4541
4555
  class: "wm-loading__close",
4542
4556
  "aria-label": "Réduire",
4543
- onClick: e[1] || (e[1] = (...j) => s.close && s.close(...j))
4557
+ onClick: e[1] || (e[1] = (...F) => s.close && s.close(...F))
4544
4558
  }, [...e[6] || (e[6] = [
4545
4559
  i("svg", {
4546
4560
  width: "13",
@@ -4599,7 +4613,7 @@ function Ui(t, e, n, a, r, s) {
4599
4613
  ])
4600
4614
  ])
4601
4615
  ])) : s.currentConv ? (l(), d(M, { key: 2 }, [
4602
- z(C, {
4616
+ z(k, {
4603
4617
  ref: "messageList",
4604
4618
  messages: s.displayedMessages,
4605
4619
  "streaming-active": s.streamingActive,
@@ -4612,7 +4626,7 @@ function Ui(t, e, n, a, r, s) {
4612
4626
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
4613
4627
  i("div", Bi, [
4614
4628
  s.floatVisible ? (l(), d("div", Li, [
4615
- s.approvalReady ? (l(), R(w, {
4629
+ s.approvalReady ? (l(), R(y, {
4616
4630
  key: 0,
4617
4631
  action: s.approvalTitle,
4618
4632
  detail: s.approvalDetail,
@@ -4622,7 +4636,7 @@ function Ui(t, e, n, a, r, s) {
4622
4636
  key: s.pendingForm.message && s.pendingForm.message.id,
4623
4637
  form: s.pendingForm.form,
4624
4638
  onSubmit: s.onFormSubmit
4625
- }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), R(F, {
4639
+ }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), R($, {
4626
4640
  key: 2,
4627
4641
  busy: r.feedbackBusy,
4628
4642
  done: r.feedbackDone,
@@ -4632,18 +4646,18 @@ function Ui(t, e, n, a, r, s) {
4632
4646
  items: s.suggestions,
4633
4647
  onSelect: s.onSuggestion
4634
4648
  }, null, 8, ["items", "onSelect"]))
4635
- ], 512)) : y("", !0),
4649
+ ], 512)) : w("", !0),
4636
4650
  s.actionInFlight ? (l(), d("div", Ri, [
4637
4651
  e[10] || (e[10] = i("span", {
4638
4652
  class: "wm-actionWait__spinner",
4639
4653
  "aria-hidden": "true"
4640
4654
  }, null, -1)),
4641
4655
  i("span", $i, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4642
- ])) : (l(), R(N, {
4656
+ ])) : (l(), R(D, {
4643
4657
  key: 2,
4644
4658
  ref: "composer",
4645
4659
  modelValue: r.draft,
4646
- "onUpdate:modelValue": e[2] || (e[2] = (j) => r.draft = j),
4660
+ "onUpdate:modelValue": e[2] || (e[2] = (F) => r.draft = F),
4647
4661
  placeholder: s.composerPlaceholder,
4648
4662
  disabled: !!s.pendingApproval,
4649
4663
  "attach-label": "Joindre un fichier",
@@ -4659,12 +4673,12 @@ function Ui(t, e, n, a, r, s) {
4659
4673
  "notif-enabled": r.notifEnabled,
4660
4674
  "status-url": s.statusUrl,
4661
4675
  "help-url": s.helpUrl,
4662
- onClose: e[3] || (e[3] = (j) => r.moreOpen = !1),
4676
+ onClose: e[3] || (e[3] = (F) => r.moreOpen = !1),
4663
4677
  onNotifToggle: s.onNotifToggle,
4664
4678
  onAction: s.onMoreAction
4665
- }, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
4679
+ }, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : w("", !0),
4666
4680
  r.pendingAttachments.length ? (l(), d("div", Fi, [
4667
- (l(!0), d(M, null, $(r.pendingAttachments, (j, P) => (l(), d("div", {
4681
+ (l(!0), d(M, null, j(r.pendingAttachments, (F, P) => (l(), d("div", {
4668
4682
  key: P,
4669
4683
  class: "wm-attached__chip"
4670
4684
  }, [
@@ -4681,11 +4695,11 @@ function Ui(t, e, n, a, r, s) {
4681
4695
  }, [
4682
4696
  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" })
4683
4697
  ], -1)),
4684
- i("span", null, b(j.name), 1),
4698
+ i("span", null, b(F.name), 1),
4685
4699
  i("button", {
4686
4700
  type: "button",
4687
4701
  "aria-label": "Retirer",
4688
- onClick: (X) => r.pendingAttachments.splice(P, 1)
4702
+ onClick: (q) => r.pendingAttachments.splice(P, 1)
4689
4703
  }, [...e[11] || (e[11] = [
4690
4704
  i("svg", {
4691
4705
  width: "10",
@@ -4702,7 +4716,7 @@ function Ui(t, e, n, a, r, s) {
4702
4716
  ], -1)
4703
4717
  ])], 8, ji)
4704
4718
  ]))), 128))
4705
- ])) : y("", !0)
4719
+ ])) : w("", !0)
4706
4720
  ], 64)) : (l(), R(v, {
4707
4721
  key: 1,
4708
4722
  "welcome-message": s.widgetWelcomeMessage,
@@ -4714,14 +4728,14 @@ function Ui(t, e, n, a, r, s) {
4714
4728
  onSelect: s.onQuickLink,
4715
4729
  onResume: s.onDrawerPick
4716
4730
  }, null, 8, ["welcome-message", "agent-name", "quick-links", "unread-threads", "busy", "onStart", "onSelect", "onResume"])),
4717
- r.historyOpen ? (l(), R(D, {
4731
+ r.historyOpen ? (l(), R(N, {
4718
4732
  key: 3,
4719
4733
  conversations: s.drawerConversations,
4720
4734
  "active-id": s.currentConv ? s.currentConv.id : null,
4721
- onClose: e[4] || (e[4] = (j) => r.historyOpen = !1),
4735
+ onClose: e[4] || (e[4] = (F) => r.historyOpen = !1),
4722
4736
  onNew: s.onDrawerNew,
4723
4737
  onPick: s.onDrawerPick
4724
- }, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
4738
+ }, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : w("", !0),
4725
4739
  r.moreOpen && !s.currentConv ? (l(), R(x, {
4726
4740
  key: 4,
4727
4741
  "can-rename": !1,
@@ -4730,17 +4744,17 @@ function Ui(t, e, n, a, r, s) {
4730
4744
  "notif-enabled": r.notifEnabled,
4731
4745
  "status-url": s.statusUrl,
4732
4746
  "help-url": s.helpUrl,
4733
- onClose: e[5] || (e[5] = (j) => r.moreOpen = !1),
4747
+ onClose: e[5] || (e[5] = (F) => r.moreOpen = !1),
4734
4748
  onNotifToggle: s.onNotifToggle,
4735
4749
  onAction: s.onMoreAction
4736
- }, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0)
4750
+ }, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : w("", !0)
4737
4751
  ], 64))
4738
- ], 6)) : y("", !0)
4752
+ ], 6)) : w("", !0)
4739
4753
  ], 2);
4740
4754
  }
4741
- const Pi = /* @__PURE__ */ B(Mi, [["render", Ui], ["__scopeId", "data-v-8264e504"]]), Hi = "0.2.18";
4755
+ const Pi = /* @__PURE__ */ B(Mi, [["render", Ui], ["__scopeId", "data-v-8264e504"]]), Hi = "0.2.20";
4742
4756
  export {
4743
- J as AIAvatar,
4757
+ Q as AIAvatar,
4744
4758
  ce as AVATAR_COLORS,
4745
4759
  Qt as ActionResult,
4746
4760
  or as ApprovalCard,
@@ -4763,7 +4777,7 @@ export {
4763
4777
  Pi as Messenger,
4764
4778
  yi as MoreMenu,
4765
4779
  Pt as Onboarding,
4766
- ne as SCREEN_CAPTURE_SUPPORTED,
4780
+ se as SCREEN_CAPTURE_SUPPORTED,
4767
4781
  Xs as SuggestionChips,
4768
4782
  ot as TeamAvatars,
4769
4783
  os as Typing,