@_solaris/messenger-widget 0.5.39 → 0.5.41

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,12 +1,12 @@
1
- import { reactive as je, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as K, Transition as Re, withCtx as Ne, Fragment as E, renderList as F, withKeys as ue, withModifiers as G, createElementVNode as o, createCommentVNode as y, createBlock as P, resolveDynamicComponent as pe, mergeProps as Se, withDirectives as $, vModelText as X, createTextVNode as ye, renderSlot as He, vModelCheckbox as ze, vModelSelect as qe, markRaw as Me } from "vue";
2
- const Ke = [
1
+ import { reactive as je, openBlock as c, createElementBlock as d, normalizeStyle as H, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as V, Transition as Re, withCtx as Ne, Fragment as E, renderList as F, withKeys as ue, withModifiers as G, createElementVNode as a, createCommentVNode as y, createBlock as P, resolveDynamicComponent as pe, mergeProps as Se, withDirectives as $, vModelText as X, createTextVNode as ye, renderSlot as He, vModelCheckbox as ze, vModelSelect as qe, markRaw as Me } from "vue";
2
+ const Ve = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], fe = "/client", Ve = 5 * 60 * 1e3, $e = 10 * 60 * 1e3, We = 5 * 60 * 1e3;
9
+ ], fe = "/client", Ke = 5 * 60 * 1e3, $e = 10 * 60 * 1e3, We = 5 * 60 * 1e3;
10
10
  function Ge(e) {
11
11
  const t = {
12
12
  baseUrl: Ye(e.baseUrl || ""),
@@ -31,21 +31,21 @@ function Ge(e) {
31
31
  };
32
32
  if (!t.baseUrl || !t.widgetId)
33
33
  throw new Error("[transport] baseUrl and widgetId are required");
34
- function n(d, f) {
35
- return t.listeners.has(d) || t.listeners.set(d, /* @__PURE__ */ new Set()), t.listeners.get(d).add(f), () => t.listeners.get(d).delete(f);
34
+ function n(u, f) {
35
+ return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(f), () => t.listeners.get(u).delete(f);
36
36
  }
37
- function i(d, f) {
38
- const g = t.listeners.get(d);
37
+ function i(u, f) {
38
+ const g = t.listeners.get(u);
39
39
  g && g.forEach((b) => {
40
40
  try {
41
41
  b(f);
42
42
  } catch (C) {
43
- console.error("[transport] listener", d, C);
43
+ console.error("[transport] listener", u, C);
44
44
  }
45
45
  });
46
46
  }
47
- function r(d) {
48
- t.connection !== d && (t.connection = d, i("connection", d));
47
+ function r(u) {
48
+ t.connection !== u && (t.connection = u, i("connection", u));
49
49
  }
50
50
  function s() {
51
51
  return {
@@ -60,33 +60,33 @@ function Ge(e) {
60
60
  ...t.origin ? { "X-Parent-Origin": t.origin } : {}
61
61
  };
62
62
  }
63
- async function a(d, f, g) {
63
+ async function o(u, f, g) {
64
64
  const b = await fetch(`${t.baseUrl}${fe}${f}`, {
65
- method: d,
65
+ method: u,
66
66
  credentials: "include",
67
67
  headers: s(),
68
68
  body: g !== void 0 ? JSON.stringify(g) : void 0
69
69
  });
70
70
  if (!b.ok) {
71
71
  const C = await l(b), M = new Error(
72
- `HTTP ${b.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || b.statusText}`
72
+ `HTTP ${b.status} ${u} ${f} :: ${(C == null ? void 0 : C.error) || b.statusText}`
73
73
  );
74
74
  throw M.status = b.status, M.body = C, M;
75
75
  }
76
76
  return b.status === 204 ? null : b.json();
77
77
  }
78
- async function l(d) {
78
+ async function l(u) {
79
79
  try {
80
- return await d.json();
80
+ return await u.json();
81
81
  } catch {
82
82
  return null;
83
83
  }
84
84
  }
85
- async function p(d) {
85
+ async function p(u) {
86
86
  if (t.started) return t.lastBootstrap;
87
- if (!(d != null && d.origin))
87
+ if (!(u != null && u.origin))
88
88
  throw new Error("[transport] start requires origin");
89
- t.started = !0, t.origin = d.origin, t.token = d.token || "";
89
+ t.started = !0, t.origin = u.origin, t.token = u.token || "";
90
90
  const f = await fetch(
91
91
  `${t.baseUrl}${fe}/session`,
92
92
  {
@@ -98,13 +98,13 @@ function Ge(e) {
98
98
  ...t.token ? { token: t.token } : {},
99
99
  // Déclaration de mode du marchand (validée serveur contre
100
100
  // widgets.allow_unauthenticated). Le serveur 400 si mismatch.
101
- allowUnauthenticated: d.allowUnauthenticated === !0,
101
+ allowUnauthenticated: u.allowUnauthenticated === !0,
102
102
  // Data customer du marchand (`context.customer`). Stockée
103
103
  // sur la session en `pending_customer` jusqu'à création
104
104
  // du row au premier message. Permet aux templates
105
105
  // `{{customer.*}}` du widget config d'être résolus dès
106
106
  // le premier render.
107
- ...d.customer && typeof d.customer == "object" ? { customer: d.customer } : {}
107
+ ...u.customer && typeof u.customer == "object" ? { customer: u.customer } : {}
108
108
  })
109
109
  }
110
110
  );
@@ -129,69 +129,69 @@ function Ge(e) {
129
129
  }
130
130
  return L.json();
131
131
  }),
132
- a("GET", "/customers/me")
132
+ o("GET", "/customers/me")
133
133
  ]), M = { config: b, customer: (C == null ? void 0 : C.customer) ?? null };
134
- return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = h, document.addEventListener(
134
+ return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
135
135
  "visibilitychange",
136
136
  t.visibilityHandler
137
137
  )), de(), M;
138
138
  }
139
139
  async function k() {
140
140
  try {
141
- const d = await B();
142
- t.lastActivityAt = d.reduce((f, g) => {
141
+ const u = await B();
142
+ t.lastActivityAt = u.reduce((f, g) => {
143
143
  const b = g == null ? void 0 : g.last_message_at;
144
144
  return b && (!f || b > f) ? b : f;
145
145
  }, null);
146
- } catch (d) {
147
- console.error("[transport] initial /conversations failed", d);
146
+ } catch (u) {
147
+ console.error("[transport] initial /conversations failed", u);
148
148
  }
149
149
  }
150
150
  async function w() {
151
- const d = await a("GET", "/customers/me");
152
- return (d == null ? void 0 : d.customer) ?? null;
151
+ const u = await o("GET", "/customers/me");
152
+ return (u == null ? void 0 : u.customer) ?? null;
153
153
  }
154
- async function T(d) {
155
- const f = await a("PATCH", "/customers/me", d);
154
+ async function T(u) {
155
+ const f = await o("PATCH", "/customers/me", u);
156
156
  return (f == null ? void 0 : f.customer) ?? null;
157
157
  }
158
158
  async function B() {
159
- const d = await a("GET", "/conversations");
160
- return (d == null ? void 0 : d.conversations) ?? [];
159
+ const u = await o("GET", "/conversations");
160
+ return (u == null ? void 0 : u.conversations) ?? [];
161
161
  }
162
- async function A(d = {}) {
163
- return (await a("POST", "/conversations", d)).conversation;
162
+ async function A(u = {}) {
163
+ return (await o("POST", "/conversations", u)).conversation;
164
164
  }
165
- async function H(d) {
166
- return (await a(
165
+ async function z(u) {
166
+ return (await o(
167
167
  "GET",
168
- `/conversations/${encodeURIComponent(d)}`
168
+ `/conversations/${encodeURIComponent(u)}`
169
169
  )).conversation;
170
170
  }
171
- async function S(d, f) {
172
- return (await a(
171
+ async function S(u, f) {
172
+ return (await o(
173
173
  "PATCH",
174
- `/conversations/${encodeURIComponent(d)}`,
174
+ `/conversations/${encodeURIComponent(u)}`,
175
175
  f
176
176
  )).conversation;
177
177
  }
178
- async function U(d, f) {
179
- return a(
178
+ async function U(u, f) {
179
+ return o(
180
180
  "PATCH",
181
- `/conversations/${encodeURIComponent(d)}/read`,
181
+ `/conversations/${encodeURIComponent(u)}/read`,
182
182
  { message_id: f }
183
183
  );
184
184
  }
185
- async function I(d, f = {}) {
185
+ async function I(u, f = {}) {
186
186
  const g = new URLSearchParams();
187
187
  f.before && g.set("before", f.before), f.since && g.set("since", f.since), f.limit && g.set("limit", String(f.limit));
188
188
  const b = g.toString() ? `?${g.toString()}` : "";
189
- return a(
189
+ return o(
190
190
  "GET",
191
- `/conversations/${encodeURIComponent(d)}/messages${b}`
191
+ `/conversations/${encodeURIComponent(u)}/messages${b}`
192
192
  );
193
193
  }
194
- async function z(d, f) {
194
+ async function q(u, f) {
195
195
  se();
196
196
  const g = {
197
197
  client_msg_id: f.client_msg_id,
@@ -200,28 +200,28 @@ function Ge(e) {
200
200
  author: { id: t.userId, type: "user" },
201
201
  created_at: f.created_at || (/* @__PURE__ */ new Date()).toISOString()
202
202
  };
203
- return Array.isArray(f.attachments) && f.attachments.length && (g.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (g.metadata = f.metadata), a(
203
+ return Array.isArray(f.attachments) && f.attachments.length && (g.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (g.metadata = f.metadata), o(
204
204
  "POST",
205
- `/conversations/${encodeURIComponent(d)}/messages`,
205
+ `/conversations/${encodeURIComponent(u)}/messages`,
206
206
  g
207
207
  );
208
208
  }
209
- async function Y(d, f, g) {
210
- return se(), a(
209
+ async function Y(u, f, g) {
210
+ return se(), o(
211
211
  "POST",
212
- `/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
212
+ `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(f)}`,
213
213
  g ? { inputs: g } : {}
214
214
  );
215
215
  }
216
- async function Z(d) {
217
- const f = d.name || "attachment", g = d.type || "application/octet-stream", b = d.size || 0, C = await a("POST", "/attachments", {
216
+ async function Z(u) {
217
+ const f = u.name || "attachment", g = u.type || "application/octet-stream", b = u.size || 0, C = await o("POST", "/attachments", {
218
218
  mime_type: g,
219
219
  size_bytes: b,
220
220
  name: f
221
221
  }), M = await fetch(C.upload_url, {
222
222
  method: "PUT",
223
223
  headers: { "Content-Type": g },
224
- body: d
224
+ body: u
225
225
  });
226
226
  if (!M.ok)
227
227
  throw new Error(`HTTP ${M.status} PUT signed upload`);
@@ -232,81 +232,81 @@ function Ge(e) {
232
232
  size_bytes: b
233
233
  };
234
234
  }
235
- async function ee(d) {
236
- return a(
235
+ async function ee(u) {
236
+ return o(
237
237
  "GET",
238
- `/attachments/sign?path=${encodeURIComponent(d)}`
238
+ `/attachments/sign?path=${encodeURIComponent(u)}`
239
239
  );
240
240
  }
241
241
  function te() {
242
- const d = new URLSearchParams({ widgetId: t.widgetId }).toString();
243
- return `${t.baseUrl}${fe}/stream?${d}`;
242
+ const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
243
+ return `${t.baseUrl}${fe}/stream?${u}`;
244
244
  }
245
- function V() {
245
+ function K() {
246
246
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
247
247
  try {
248
- const d = new EventSource(te(), { withCredentials: !0 });
249
- for (const f of Ke)
250
- d.addEventListener(f, (g) => ne(f, g.data));
251
- d.addEventListener(
248
+ const u = new EventSource(te(), { withCredentials: !0 });
249
+ for (const f of Ve)
250
+ u.addEventListener(f, (g) => ne(f, g.data));
251
+ u.addEventListener(
252
252
  "error",
253
253
  () => i("error", new Error("SSE error"))
254
- ), t.eventSource = d, r("open");
255
- } catch (d) {
256
- console.error("[transport] SSE open failed", d), i("error", d);
254
+ ), t.eventSource = u, r("open");
255
+ } catch (u) {
256
+ console.error("[transport] SSE open failed", u), i("error", u);
257
257
  }
258
258
  }
259
- function ne(d, f) {
259
+ function ne(u, f) {
260
260
  try {
261
261
  const g = JSON.parse(f), b = g && typeof g == "object" && "data" in g ? g.data : g;
262
- i(d, b);
262
+ i(u, b);
263
263
  } catch (g) {
264
- console.error("[transport] bad SSE payload", d, g);
264
+ console.error("[transport] bad SSE payload", u, g);
265
265
  }
266
266
  }
267
267
  function J() {
268
268
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
269
269
  }
270
270
  function se() {
271
- clearTimeout(t.burstTimer), V(), t.panelOpen || (t.burstTimer = setTimeout(() => {
271
+ clearTimeout(t.burstTimer), K(), t.panelOpen || (t.burstTimer = setTimeout(() => {
272
272
  t.panelOpen || J();
273
273
  }, $e));
274
274
  }
275
- function ce(d) {
276
- t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), V()) : se();
275
+ function ce(u) {
276
+ t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), K()) : se();
277
277
  }
278
- async function he() {
278
+ async function me() {
279
279
  try {
280
- const d = await B(), f = d.reduce((b, C) => {
280
+ const u = await B(), f = u.reduce((b, C) => {
281
281
  const M = C == null ? void 0 : C.last_message_at;
282
282
  return M && (!b || M > b) ? M : b;
283
283
  }, null);
284
- f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), se());
285
- } catch (d) {
286
- console.error("[transport] poll failed", d);
284
+ f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: u, latestAt: f }), se());
285
+ } catch (u) {
286
+ console.error("[transport] poll failed", u);
287
287
  }
288
288
  }
289
289
  function de() {
290
- m(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(he, Ve));
290
+ h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(me, Ke));
291
291
  }
292
- function m() {
292
+ function h() {
293
293
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
294
294
  }
295
- function h() {
295
+ function m() {
296
296
  if (document.hidden)
297
297
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
298
- t.hiddenGraceTimer = null, document.hidden && (m(), J(), r("paused"));
298
+ t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
299
299
  }, We);
300
300
  else {
301
301
  if (t.hiddenGraceTimer) {
302
302
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
303
303
  return;
304
304
  }
305
- r("idle"), de(), t.panelOpen && V();
305
+ r("idle"), de(), t.panelOpen && K();
306
306
  }
307
307
  }
308
308
  function _() {
309
- m(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
309
+ h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
310
310
  "visibilitychange",
311
311
  t.visibilityHandler
312
312
  ), t.visibilityHandler = null), t.started = !1;
@@ -321,11 +321,11 @@ function Ge(e) {
321
321
  patchCustomer: T,
322
322
  listConversations: B,
323
323
  createConversation: A,
324
- getConversation: H,
324
+ getConversation: z,
325
325
  patchConversation: S,
326
326
  markConversationRead: U,
327
327
  listMessages: I,
328
- postMessage: z,
328
+ postMessage: q,
329
329
  postCallback: Y,
330
330
  uploadAttachment: Z,
331
331
  signAttachment: ee,
@@ -386,49 +386,49 @@ function Xe(e) {
386
386
  connection: "idle"
387
387
  }), n = [];
388
388
  n.push(
389
- e.on("connection", (m) => {
390
- t.connection = m;
389
+ e.on("connection", (h) => {
390
+ t.connection = h;
391
391
  })
392
392
  ), n.push(
393
- e.on("message", (m) => {
394
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.message;
395
- !h || !(_ != null && _.id) || (V(h, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(h, _.created_at));
393
+ e.on("message", (h) => {
394
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
395
+ !m || !(_ != null && _.id) || (K(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(m, _.created_at));
396
396
  })
397
397
  ), n.push(
398
- e.on("message_stream", (m) => {
399
- const h = m == null ? void 0 : m.message_id, _ = m == null ? void 0 : m.token;
400
- !h || typeof _ != "string" || (t.streamingByMsgId[h] = (t.streamingByMsgId[h] || "") + _);
398
+ e.on("message_stream", (h) => {
399
+ const m = h == null ? void 0 : h.message_id, _ = h == null ? void 0 : h.token;
400
+ !m || typeof _ != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + _);
401
401
  })
402
402
  ), n.push(
403
- e.on("conversation_updated", (m) => {
404
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.changes;
405
- if (!h || !_) return;
406
- const d = t.conversations.findIndex((f) => f.id === h);
407
- d !== -1 && (t.conversations[d] = {
408
- ...t.conversations[d],
403
+ e.on("conversation_updated", (h) => {
404
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.changes;
405
+ if (!m || !_) return;
406
+ const u = t.conversations.findIndex((f) => f.id === m);
407
+ u !== -1 && (t.conversations[u] = {
408
+ ...t.conversations[u],
409
409
  ..._
410
410
  });
411
411
  })
412
412
  ), n.push(
413
- e.on("config_updated", (m) => {
414
- m != null && m.config && (t.config = m.config);
413
+ e.on("config_updated", (h) => {
414
+ h != null && h.config && (t.config = h.config);
415
415
  })
416
416
  ), n.push(
417
- e.on("action_status", (m) => {
418
- const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.action_id, d = m == null ? void 0 : m.action_name;
419
- if (!h || !_) return;
420
- const f = t.runningActionsByConv[h] || {};
421
- m.state === "running" ? (f[_] = d || _, t.runningActionsByConv[h] = { ...f }) : m.state === "done" && (delete f[_], t.runningActionsByConv[h] = { ...f });
417
+ e.on("action_status", (h) => {
418
+ const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.action_id, u = h == null ? void 0 : h.action_name;
419
+ if (!m || !_) return;
420
+ const f = t.runningActionsByConv[m] || {};
421
+ h.state === "running" ? (f[_] = u || _, t.runningActionsByConv[m] = { ...f }) : h.state === "done" && (delete f[_], t.runningActionsByConv[m] = { ...f });
422
422
  })
423
423
  ), n.push(
424
- e.on("activity", (m) => {
425
- Array.isArray(m == null ? void 0 : m.conversations) && (t.conversations = m.conversations);
424
+ e.on("activity", (h) => {
425
+ Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
426
426
  })
427
427
  );
428
- async function i(m) {
428
+ async function i(h) {
429
429
  try {
430
- const h = new Promise(
431
- (d, f) => setTimeout(
430
+ const m = new Promise(
431
+ (u, f) => setTimeout(
432
432
  () => f(
433
433
  new Error(
434
434
  "bootstrap timeout (15s) — check baseUrl, CORS, and network"
@@ -437,61 +437,61 @@ function Xe(e) {
437
437
  15e3
438
438
  )
439
439
  ), _ = await Promise.race([
440
- e.start(m),
441
- h
440
+ e.start(h),
441
+ m
442
442
  ]);
443
443
  t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
444
444
  e.listConversations(),
445
- h
445
+ m
446
446
  ]), t.ready = !0;
447
- } catch (h) {
448
- console.error("[store] start failed", h), t.error = (h == null ? void 0 : h.message) || String(h);
447
+ } catch (m) {
448
+ console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
449
449
  }
450
450
  }
451
451
  function r() {
452
- for (const m of n)
452
+ for (const h of n)
453
453
  try {
454
- m();
454
+ h();
455
455
  } catch {
456
456
  }
457
457
  e.stop();
458
458
  }
459
- async function s(m) {
460
- const h = he(m);
461
- if (!h) return t.customer;
459
+ async function s(h) {
460
+ const m = me(h);
461
+ if (!m) return t.customer;
462
462
  try {
463
- const _ = await e.patchCustomer(h);
463
+ const _ = await e.patchCustomer(m);
464
464
  _ && (t.customer = _);
465
465
  } catch (_) {
466
466
  console.error("[store] applyCustomer failed", _);
467
467
  }
468
468
  return t.customer;
469
469
  }
470
- async function a(m = {}) {
471
- const h = await e.createConversation(m), _ = t.conversations.findIndex((d) => d.id === h.id);
472
- return _ === -1 ? t.conversations = [h, ...t.conversations] : t.conversations[_] = h, h;
470
+ async function o(h = {}) {
471
+ const m = await e.createConversation(h), _ = t.conversations.findIndex((u) => u.id === m.id);
472
+ return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
473
473
  }
474
474
  const l = 50;
475
- async function p(m) {
476
- const h = t.paginationByConv[m];
477
- if (!(h != null && h.loaded || h != null && h.loading)) {
478
- w(m, { nextCursor: null, loading: !0, loaded: !1 });
475
+ async function p(h) {
476
+ const m = t.paginationByConv[h];
477
+ if (!(m != null && m.loaded || m != null && m.loading)) {
478
+ w(h, { nextCursor: null, loading: !0, loaded: !1 });
479
479
  try {
480
- const _ = await e.listMessages(m, {
480
+ const _ = await e.listMessages(h, {
481
481
  limit: l
482
- }), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[m] || [], g = /* @__PURE__ */ new Set();
483
- for (const C of d)
482
+ }), u = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[h] || [], g = /* @__PURE__ */ new Set();
483
+ for (const C of u)
484
484
  (C == null ? void 0 : C.id) != null && g.add(`id:${String(C.id)}`), C != null && C.client_msg_id && g.add(`c:${C.client_msg_id}`);
485
485
  const b = f.filter((C) => !((C == null ? void 0 : C.id) != null && g.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && g.has(`c:${C.client_msg_id}`)));
486
- t.messagesByConv[m] = [...d, ...b].sort(
486
+ t.messagesByConv[h] = [...u, ...b].sort(
487
487
  ce
488
- ), w(m, {
488
+ ), w(h, {
489
489
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
490
490
  loading: !1,
491
491
  loaded: !0
492
492
  });
493
493
  } catch (_) {
494
- console.error("[store] openConversation failed", _), w(m, {
494
+ console.error("[store] openConversation failed", _), w(h, {
495
495
  nextCursor: null,
496
496
  loading: !1,
497
497
  loaded: !1
@@ -499,83 +499,83 @@ function Xe(e) {
499
499
  }
500
500
  }
501
501
  }
502
- async function k(m) {
502
+ async function k(h) {
503
503
  var f;
504
- const h = t.paginationByConv[m];
505
- if (!h || h.loading || !h.nextCursor) return;
506
- const d = (f = (t.messagesByConv[m] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
507
- if (d) {
508
- w(m, { ...h, loading: !0 });
504
+ const m = t.paginationByConv[h];
505
+ if (!m || m.loading || !m.nextCursor) return;
506
+ const u = (f = (t.messagesByConv[h] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
507
+ if (u) {
508
+ w(h, { ...m, loading: !0 });
509
509
  try {
510
- const g = await e.listMessages(m, {
511
- before: d,
510
+ const g = await e.listMessages(h, {
511
+ before: u,
512
512
  limit: l
513
- }), b = (g == null ? void 0 : g.messages) ?? [], C = t.messagesByConv[m] || [], M = /* @__PURE__ */ new Set();
513
+ }), b = (g == null ? void 0 : g.messages) ?? [], C = t.messagesByConv[h] || [], M = /* @__PURE__ */ new Set();
514
514
  for (const x of C)
515
515
  (x == null ? void 0 : x.id) != null && M.add(`id:${String(x.id)}`), x != null && x.client_msg_id && M.add(`c:${x.client_msg_id}`);
516
516
  const L = b.filter((x) => !((x == null ? void 0 : x.id) != null && M.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && M.has(`c:${x.client_msg_id}`)));
517
- t.messagesByConv[m] = [...L, ...C], w(m, {
517
+ t.messagesByConv[h] = [...L, ...C], w(h, {
518
518
  nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
519
519
  loading: !1,
520
520
  loaded: !0
521
521
  });
522
522
  } catch (g) {
523
- console.error("[store] loadMore failed", g), w(m, { ...h, loading: !1 });
523
+ console.error("[store] loadMore failed", g), w(h, { ...m, loading: !1 });
524
524
  }
525
525
  }
526
526
  }
527
- function w(m, h) {
528
- t.paginationByConv = { ...t.paginationByConv, [m]: h };
527
+ function w(h, m) {
528
+ t.paginationByConv = { ...t.paginationByConv, [h]: m };
529
529
  }
530
- async function T(m, h) {
531
- const _ = await e.patchConversation(m, h), d = t.conversations.findIndex((f) => f.id === m);
532
- d !== -1 && (t.conversations[d] = _);
530
+ async function T(h, m) {
531
+ const _ = await e.patchConversation(h, m), u = t.conversations.findIndex((f) => f.id === h);
532
+ u !== -1 && (t.conversations[u] = _);
533
533
  }
534
- async function B(m) {
535
- if (!m) return [];
536
- const h = t.messagesByConv[m] || [];
534
+ async function B(h) {
535
+ if (!h) return [];
536
+ const m = t.messagesByConv[h] || [];
537
537
  let _ = "";
538
- for (const d of h)
539
- d != null && d.created_at && d.created_at > _ && (_ = d.created_at);
538
+ for (const u of m)
539
+ u != null && u.created_at && u.created_at > _ && (_ = u.created_at);
540
540
  try {
541
- const d = await e.listMessages(
542
- m,
541
+ const u = await e.listMessages(
542
+ h,
543
543
  _ ? { since: _ } : {}
544
- ), f = (d == null ? void 0 : d.messages) || [];
544
+ ), f = (u == null ? void 0 : u.messages) || [];
545
545
  if (!f.length) return [];
546
546
  const g = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
547
- for (const M of h)
547
+ for (const M of m)
548
548
  (M == null ? void 0 : M.id) != null && g.add(String(M.id)), M != null && M.client_msg_id && b.add(M.client_msg_id);
549
549
  const C = [];
550
550
  for (const M of f) {
551
551
  const L = (M == null ? void 0 : M.id) != null && g.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && b.has(M.client_msg_id);
552
- V(m, M), L || C.push(M);
552
+ K(h, M), L || C.push(M);
553
553
  }
554
554
  return C;
555
- } catch (d) {
556
- return console.error("[store] fetchSinceLast failed", d), [];
555
+ } catch (u) {
556
+ return console.error("[store] fetchSinceLast failed", u), [];
557
557
  }
558
558
  }
559
- async function A(m, h) {
560
- if (!(!m || h == null))
559
+ async function A(h, m) {
560
+ if (!(!h || m == null))
561
561
  try {
562
- const _ = await e.markConversationRead(m, h), d = (_ == null ? void 0 : _.last_read_message_id) ?? h, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === m);
562
+ const _ = await e.markConversationRead(h, m), u = (_ == null ? void 0 : _.last_read_message_id) ?? m, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === h);
563
563
  f !== -1 && (t.conversations[f] = {
564
564
  ...t.conversations[f],
565
- last_read_message_id: d
565
+ last_read_message_id: u
566
566
  });
567
567
  } catch (_) {
568
568
  console.error("[store] markConversationRead failed", _);
569
569
  }
570
570
  }
571
- async function H(m, h, { attachments: _, metadata: d } = {}) {
571
+ async function z(h, m, { attachments: _, metadata: u } = {}) {
572
572
  var L;
573
- const f = (h || "").trim(), g = Array.isArray(_) && _.length > 0;
574
- if (!m || !f && !g) return;
575
- const b = Qe(), C = de(m), M = {
573
+ const f = (m || "").trim(), g = Array.isArray(_) && _.length > 0;
574
+ if (!h || !f && !g) return;
575
+ const b = Qe(), C = de(h), M = {
576
576
  id: b,
577
577
  client_msg_id: b,
578
- conversation_id: m,
578
+ conversation_id: h,
579
579
  type: "content",
580
580
  text_md: f,
581
581
  author: {
@@ -586,44 +586,44 @@ function Xe(e) {
586
586
  // Local-only flag — UI may render dimmed until the SSE echo lands.
587
587
  _pending: !0,
588
588
  ...g ? { payload: { type: "content", attachments: _ } } : {},
589
- ...d && typeof d == "object" ? { metadata: d } : {}
589
+ ...u && typeof u == "object" ? { metadata: u } : {}
590
590
  };
591
- V(m, M);
591
+ K(h, M);
592
592
  try {
593
- await e.postMessage(m, {
593
+ await e.postMessage(h, {
594
594
  client_msg_id: b,
595
595
  text_md: f,
596
596
  created_at: C,
597
597
  ...g ? { attachments: _ } : {},
598
- ...d && typeof d == "object" ? { metadata: d } : {}
598
+ ...u && typeof u == "object" ? { metadata: u } : {}
599
599
  });
600
600
  } catch (x) {
601
- console.error("[store] send failed", x), J(m, b, {
601
+ console.error("[store] send failed", x), J(h, b, {
602
602
  _failed: !0,
603
603
  _pending: !1
604
604
  });
605
605
  }
606
606
  }
607
- async function S(m, h, _) {
608
- m != null && (t.awaitingCallback[m] = !0);
607
+ async function S(h, m, _) {
608
+ h != null && (t.awaitingCallback[h] = !0);
609
609
  try {
610
- await e.postCallback(m, h, _);
611
- } catch (d) {
612
- console.error("[store] callback failed", d), m != null && delete t.awaitingCallback[m];
610
+ await e.postCallback(h, m, _);
611
+ } catch (u) {
612
+ console.error("[store] callback failed", u), h != null && delete t.awaitingCallback[h];
613
613
  }
614
614
  }
615
615
  const U = /* @__PURE__ */ new Map();
616
- async function I(m) {
617
- if (!m) return null;
618
- const h = U.get(m);
619
- if (h != null && h.url) {
620
- const _ = h.expires_at ? Date.parse(h.expires_at) : 0;
621
- if (!_ || _ - Date.now() > 6e4) return h.url;
616
+ async function I(h) {
617
+ if (!h) return null;
618
+ const m = U.get(h);
619
+ if (m != null && m.url) {
620
+ const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
621
+ if (!_ || _ - Date.now() > 6e4) return m.url;
622
622
  }
623
623
  try {
624
- const _ = await e.signAttachment(m);
624
+ const _ = await e.signAttachment(h);
625
625
  if (_ != null && _.signed_url)
626
- return U.set(m, {
626
+ return U.set(h, {
627
627
  url: _.signed_url,
628
628
  expires_at: _.expires_at
629
629
  }), _.signed_url;
@@ -632,33 +632,33 @@ function Xe(e) {
632
632
  }
633
633
  return null;
634
634
  }
635
- async function z(m, { rating: h, comment: _ } = {}) {
636
- const d = t.conversations.find((b) => b.id === m), g = {
637
- ...(d == null ? void 0 : d.metadata) || {},
635
+ async function q(h, { rating: m, comment: _ } = {}) {
636
+ const u = t.conversations.find((b) => b.id === h), g = {
637
+ ...(u == null ? void 0 : u.metadata) || {},
638
638
  feedback: {
639
- rating: h,
639
+ rating: m,
640
640
  comment: _ || null,
641
641
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
642
642
  }
643
643
  };
644
- await T(m, { metadata: g });
644
+ await T(h, { metadata: g });
645
645
  }
646
- function Y(m) {
647
- var _, d;
648
- const h = t.messagesByConv[m] || [];
649
- for (let f = h.length - 1; f >= 0; f--) {
650
- const g = h[f];
651
- if ((g == null ? void 0 : g.type) === "action" && ((_ = g == null ? void 0 : g.payload) == null ? void 0 : _.type) === "action" && ((d = g == null ? void 0 : g.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(g == null ? void 0 : g.callbacks) && g.callbacks.length > 0 && !t.awaitingCallback[g.id])
646
+ function Y(h) {
647
+ var _, u;
648
+ const m = t.messagesByConv[h] || [];
649
+ for (let f = m.length - 1; f >= 0; f--) {
650
+ const g = m[f];
651
+ if ((g == null ? void 0 : g.type) === "action" && ((_ = g == null ? void 0 : g.payload) == null ? void 0 : _.type) === "action" && ((u = g == null ? void 0 : g.payload) == null ? void 0 : u.state) === "pending" && Array.isArray(g == null ? void 0 : g.callbacks) && g.callbacks.length > 0 && !t.awaitingCallback[g.id])
652
652
  return g;
653
653
  }
654
654
  return null;
655
655
  }
656
- function Z(m) {
657
- var _, d, f;
658
- const h = t.messagesByConv[m] || [];
659
- for (let g = h.length - 1; g >= 0; g--) {
660
- const b = h[g];
661
- if (((_ = b == null ? void 0 : b.author) == null ? void 0 : _.type) === "user" || (b == null ? void 0 : b.type) === "action" && ((d = b == null ? void 0 : b.payload) == null ? void 0 : d.state) === "pending")
656
+ function Z(h) {
657
+ var _, u, f;
658
+ const m = t.messagesByConv[h] || [];
659
+ for (let g = m.length - 1; g >= 0; g--) {
660
+ const b = m[g];
661
+ if (((_ = b == null ? void 0 : b.author) == null ? void 0 : _.type) === "user" || (b == null ? void 0 : b.type) === "action" && ((u = b == null ? void 0 : b.payload) == null ? void 0 : u.state) === "pending")
662
662
  return null;
663
663
  const C = (f = b == null ? void 0 : b.metadata) == null ? void 0 : f.form;
664
664
  if (C && Array.isArray(C.fields) && C.fields.length > 0)
@@ -666,21 +666,21 @@ function Xe(e) {
666
666
  }
667
667
  return null;
668
668
  }
669
- function ee(m) {
670
- const h = t.runningActionsByConv[m];
671
- if (!h) return null;
672
- const _ = Object.keys(h);
669
+ function ee(h) {
670
+ const m = t.runningActionsByConv[h];
671
+ if (!m) return null;
672
+ const _ = Object.keys(m);
673
673
  if (_.length === 0) return null;
674
- const d = _[0];
675
- return { id: d, payload: { name: h[d] } };
674
+ const u = _[0];
675
+ return { id: u, payload: { name: m[u] } };
676
676
  }
677
- function te(m) {
678
- var _, d, f, g;
679
- const h = t.messagesByConv[m] || [];
680
- for (let b = h.length - 1; b >= 0; b--) {
681
- const C = h[b];
677
+ function te(h) {
678
+ var _, u, f, g;
679
+ const m = t.messagesByConv[h] || [];
680
+ for (let b = m.length - 1; b >= 0; b--) {
681
+ const C = m[b];
682
682
  if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user") return [];
683
- if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
683
+ if ((C == null ? void 0 : C.type) === "action" && ((u = C == null ? void 0 : C.payload) == null ? void 0 : u.state) === "pending")
684
684
  return [];
685
685
  if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
686
686
  const M = (g = C == null ? void 0 : C.metadata) == null ? void 0 : g.suggested_replies;
@@ -700,76 +700,76 @@ function Xe(e) {
700
700
  }
701
701
  return [];
702
702
  }
703
- function V(m, h) {
703
+ function K(h, m) {
704
704
  var g;
705
- const _ = t.messagesByConv[m] || [];
706
- let d = -1;
707
- h != null && h.client_msg_id && (d = _.findIndex(
708
- (b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id === h.client_msg_id
709
- )), d === -1 && (h == null ? void 0 : h.id) !== void 0 && (h == null ? void 0 : h.id) !== null && (d = _.findIndex((b) => ne(b == null ? void 0 : b.id, h.id)));
705
+ const _ = t.messagesByConv[h] || [];
706
+ let u = -1;
707
+ m != null && m.client_msg_id && (u = _.findIndex(
708
+ (b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id === m.client_msg_id
709
+ )), u === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (u = _.findIndex((b) => ne(b == null ? void 0 : b.id, m.id)));
710
710
  let f;
711
- d === -1 ? f = [..._, h].sort(ce) : (f = _.slice(), f[d] = {
712
- ..._[d],
713
- ...h,
711
+ u === -1 ? f = [..._, m].sort(ce) : (f = _.slice(), f[u] = {
712
+ ..._[u],
713
+ ...m,
714
714
  _pending: !1,
715
715
  _failed: !1
716
- }), t.messagesByConv[m] = f, (h == null ? void 0 : h.type) === "action" && ((g = h == null ? void 0 : h.payload) != null && g.state) && h.payload.state !== "pending" && (h == null ? void 0 : h.id) != null && t.awaitingCallback[h.id] && delete t.awaitingCallback[h.id];
716
+ }), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((g = m == null ? void 0 : m.payload) != null && g.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
717
717
  }
718
- function ne(m, h) {
719
- return m === h ? !0 : m == null || h == null ? !1 : String(m) === String(h);
718
+ function ne(h, m) {
719
+ return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
720
720
  }
721
- function J(m, h, _) {
722
- const d = t.messagesByConv[m];
723
- if (!d) return;
724
- const f = d.findIndex((b) => b.id === h);
721
+ function J(h, m, _) {
722
+ const u = t.messagesByConv[h];
723
+ if (!u) return;
724
+ const f = u.findIndex((b) => b.id === m);
725
725
  if (f === -1) return;
726
- const g = d.slice();
727
- g[f] = { ...d[f], ..._ }, t.messagesByConv[m] = g;
726
+ const g = u.slice();
727
+ g[f] = { ...u[f], ..._ }, t.messagesByConv[h] = g;
728
728
  }
729
- function se(m, h) {
730
- const _ = t.conversations.findIndex((f) => f.id === m);
729
+ function se(h, m) {
730
+ const _ = t.conversations.findIndex((f) => f.id === h);
731
731
  if (_ === -1) return;
732
- const d = t.conversations[_];
733
- if (h && (!d.last_message_at || h > d.last_message_at)) {
732
+ const u = t.conversations[_];
733
+ if (m && (!u.last_message_at || m > u.last_message_at)) {
734
734
  const f = t.conversations.slice();
735
- f[_] = { ...d, last_message_at: h }, f.sort(
735
+ f[_] = { ...u, last_message_at: m }, f.sort(
736
736
  (g, b) => (b.last_message_at || "").localeCompare(g.last_message_at || "")
737
737
  ), t.conversations = f;
738
738
  }
739
739
  }
740
- function ce(m, h) {
741
- return (m.created_at || "").localeCompare(h.created_at || "");
740
+ function ce(h, m) {
741
+ return (h.created_at || "").localeCompare(m.created_at || "");
742
742
  }
743
- function he(m) {
744
- if (!m || typeof m != "object") return null;
745
- const h = {}, _ = {};
746
- for (const [d, f] of Object.entries(m))
747
- f !== void 0 && (d === "name" || d === "email" || d === "language" ? f != null && String(f).trim() !== "" && (h[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[d] = f);
748
- return Object.keys(_).length && (h.values = _), Object.keys(h).length ? h : null;
743
+ function me(h) {
744
+ if (!h || typeof h != "object") return null;
745
+ const m = {}, _ = {};
746
+ for (const [u, f] of Object.entries(h))
747
+ f !== void 0 && (u === "name" || u === "email" || u === "language" ? f != null && String(f).trim() !== "" && (m[u] = f) : (u === "values" || u === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[u] = f);
748
+ return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
749
749
  }
750
- function de(m) {
751
- const h = t.messagesByConv[m] || [];
750
+ function de(h) {
751
+ const m = t.messagesByConv[h] || [];
752
752
  let _ = "";
753
- for (const g of h)
753
+ for (const g of m)
754
754
  g != null && g.created_at && g.created_at > _ && (_ = g.created_at);
755
- const d = (/* @__PURE__ */ new Date()).toISOString();
756
- return !_ || d > _ ? d : new Date(Date.parse(_) + 1).toISOString();
755
+ const u = (/* @__PURE__ */ new Date()).toISOString();
756
+ return !_ || u > _ ? u : new Date(Date.parse(_) + 1).toISOString();
757
757
  }
758
758
  return {
759
759
  state: t,
760
760
  start: i,
761
761
  destroy: r,
762
762
  applyCustomer: s,
763
- createConversation: a,
763
+ createConversation: o,
764
764
  openConversation: p,
765
765
  loadMore: k,
766
766
  fetchSinceLast: B,
767
767
  patchConversation: T,
768
768
  markConversationRead: A,
769
- send: H,
769
+ send: z,
770
770
  clickCallback: S,
771
771
  signAttachment: I,
772
- submitFeedback: z,
772
+ submitFeedback: q,
773
773
  getPendingApproval: Y,
774
774
  getActionInFlight: ee,
775
775
  getLatestSuggestions: te,
@@ -829,6 +829,7 @@ const Ze = `
829
829
  --wm-g900: ${j.g900};
830
830
  --wm-a: ${j.accent};
831
831
  --wm-al: ${j.accentLight};
832
+ --wm-primary: ${j.accent};
832
833
  --wm-green: ${j.green};
833
834
  --wm-red: ${j.red};
834
835
  --wm-redBg: ${j.redBg};
@@ -1117,11 +1118,11 @@ function re(e) {
1117
1118
  }
1118
1119
  function D(e) {
1119
1120
  const t = ke(e), n = ge[t] || ge[ae], i = ge[ae];
1120
- return function(s, a) {
1121
+ return function(s, o) {
1121
1122
  let l = n[s];
1122
- return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
1123
+ return l == null && (l = i[s]), l == null ? s : (o && (l = l.replace(
1123
1124
  /\{(\w+)\}/g,
1124
- (p, k) => a[k] != null ? String(a[k]) : p
1125
+ (p, k) => o[k] != null ? String(o[k]) : p
1125
1126
  )), l);
1126
1127
  };
1127
1128
  }
@@ -1138,9 +1139,9 @@ function nt(e, t, n = D()) {
1138
1139
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1139
1140
  for (const s of i) {
1140
1141
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1141
- const a = t[s.key];
1142
- if (a == null || a === "") continue;
1143
- const l = Pe(s, a, n);
1142
+ const o = t[s.key];
1143
+ if (o == null || o === "") continue;
1144
+ const l = Pe(s, o, n);
1144
1145
  l && r.push(`${s.label} :
1145
1146
  ${l}`);
1146
1147
  }
@@ -1152,9 +1153,9 @@ function st(e, t, n = D()) {
1152
1153
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1153
1154
  for (const s of r) {
1154
1155
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1155
- const a = t == null ? void 0 : t[s.key];
1156
- if (a == null || a === "") continue;
1157
- const l = Pe(s, a, n);
1156
+ const o = t == null ? void 0 : t[s.key];
1157
+ if (o == null || o === "") continue;
1158
+ const l = Pe(s, o, n);
1158
1159
  if (!l) continue;
1159
1160
  const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1160
1161
  `));
@@ -1187,12 +1188,12 @@ function Oe(e, t) {
1187
1188
  function rt(e, t) {
1188
1189
  var n, i, r;
1189
1190
  for (let s = t.length - 1; s >= 0; s--) {
1190
- const a = t[s];
1191
- if (!a) continue;
1192
- const l = typeof a.text_md == "string" ? a.text_md.trim() : "";
1191
+ const o = t[s];
1192
+ if (!o) continue;
1193
+ const l = typeof o.text_md == "string" ? o.text_md.trim() : "";
1193
1194
  if (l)
1194
- return (((n = a.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1195
- const p = (i = a.payload) == null ? void 0 : i.attachments;
1195
+ return (((n = o.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1196
+ const p = (i = o.payload) == null ? void 0 : i.attachments;
1196
1197
  if (Array.isArray(p) && p.length) return "📎 Pièce jointe";
1197
1198
  }
1198
1199
  return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((r = e == null ? void 0 : e.metadata) == null ? void 0 : r.last_preview) || "";
@@ -1210,10 +1211,10 @@ function at(e, t, n, i) {
1210
1211
  ];
1211
1212
  for (const s of t) {
1212
1213
  if (!s) continue;
1213
- const a = (s.text_md || "").trim();
1214
- if (!a) continue;
1214
+ const o = (s.text_md || "").trim();
1215
+ if (!o) continue;
1215
1216
  const l = it(s.author, n), p = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
1216
- r.push(`[${p}] ${l} :`), r.push(a), r.push("");
1217
+ r.push(`[${p}] ${l} :`), r.push(o), r.push("");
1217
1218
  }
1218
1219
  return r.join(`
1219
1220
  `);
@@ -1222,10 +1223,10 @@ function ot(e, t, n = D(), i) {
1222
1223
  if (!e) return;
1223
1224
  const r = at(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1224
1225
  try {
1225
- const a = URL.createObjectURL(s), l = document.createElement("a");
1226
- l.href = a, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(a), 1e3);
1227
- } catch (a) {
1228
- console.error("[ww-messenger] export failed", a);
1226
+ const o = URL.createObjectURL(s), l = document.createElement("a");
1227
+ l.href = o, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(o), 1e3);
1228
+ } catch (o) {
1229
+ console.error("[ww-messenger] export failed", o);
1229
1230
  }
1230
1231
  }
1231
1232
  const lt = {
@@ -1362,7 +1363,7 @@ const lt = {
1362
1363
  },
1363
1364
  showBrowserNotification(e, t) {
1364
1365
  if (typeof Notification > "u" || Notification.permission !== "granted") return;
1365
- const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), a = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = a ? a.slice(0, 140) : this.t("notification.youHaveNewMessage");
1366
+ const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), o = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = o ? o.slice(0, 140) : this.t("notification.youHaveNewMessage");
1366
1367
  try {
1367
1368
  const p = new Notification(s, {
1368
1369
  body: l,
@@ -1386,7 +1387,7 @@ const lt = {
1386
1387
  }
1387
1388
  }
1388
1389
  }
1389
- }, ct = 450, dt = 50, ut = 900, mt = 12e3, ht = 300, ft = {
1390
+ }, ct = 450, dt = 50, ut = 900, ht = 12e3, mt = 300, ft = {
1390
1391
  data() {
1391
1392
  return {
1392
1393
  // Map: messageId → ms timestamp once shown.
@@ -1466,21 +1467,21 @@ const lt = {
1466
1467
  const t = e == null ? void 0 : e.conversations;
1467
1468
  if (!Array.isArray(t) || !this.store) return;
1468
1469
  const n = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
1469
- for (const a of t) {
1470
- if (!(a != null && a.id)) continue;
1471
- const l = a.last_message_at || "";
1470
+ for (const o of t) {
1471
+ if (!(o != null && o.id)) continue;
1472
+ const l = o.last_message_at || "";
1472
1473
  if (!l) continue;
1473
- const p = n.get(a.id) || "";
1474
- l > p && i.push(a.id);
1474
+ const p = n.get(o.id) || "";
1475
+ l > p && i.push(o.id);
1475
1476
  }
1476
1477
  this._liveRevealConvSnapshot = new Map(
1477
- t.map((a) => [a.id, (a == null ? void 0 : a.last_message_at) || ""])
1478
+ t.map((o) => [o.id, (o == null ? void 0 : o.last_message_at) || ""])
1478
1479
  );
1479
- for (const a of i)
1480
+ for (const o of i)
1480
1481
  try {
1481
- const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r, a));
1482
+ const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r, o));
1482
1483
  if (!Array.isArray(l)) continue;
1483
- for (const p of l) this.paceLiveMessage(p, a);
1484
+ for (const p of l) this.paceLiveMessage(p, o);
1484
1485
  } catch (l) {
1485
1486
  console.error(
1486
1487
  "[ww-messenger] activity delta fetch failed",
@@ -1495,14 +1496,14 @@ const lt = {
1495
1496
  // bounded by MIN/MAX_TYPING_MS.
1496
1497
  scheduleReveal(e, t) {
1497
1498
  const n = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, r = Math.min(
1498
- mt,
1499
+ ht,
1499
1500
  Math.max(ut, i * dt)
1500
- ), a = Math.max(
1501
+ ), o = Math.max(
1501
1502
  n + ct,
1502
- this.nextRevealAt + ht
1503
+ this.nextRevealAt + mt
1503
1504
  ) + r;
1504
- this.nextRevealAt = a;
1505
- const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
1505
+ this.nextRevealAt = o;
1506
+ const l = Math.max(0, o - n), p = e.id, k = setTimeout(() => {
1506
1507
  this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1507
1508
  }, l);
1508
1509
  this.revealTimers.push(k);
@@ -1522,8 +1523,8 @@ const lt = {
1522
1523
  i[s.id] = n;
1523
1524
  continue;
1524
1525
  }
1525
- const a = s != null && s.created_at ? Date.parse(s.created_at) : NaN;
1526
- if (!Number.isFinite(a) || a < this.convOpenedAt) {
1526
+ const o = s != null && s.created_at ? Date.parse(s.created_at) : NaN;
1527
+ if (!Number.isFinite(o) || o < this.convOpenedAt) {
1527
1528
  i[s.id] = n;
1528
1529
  continue;
1529
1530
  }
@@ -1620,9 +1621,9 @@ const lt = {
1620
1621
  // messages, or when the pointer is already at/ahead of the
1621
1622
  // candidate id.
1622
1623
  markConvRead(e) {
1623
- var s, a;
1624
+ var s, o;
1624
1625
  if (!(e != null && e.id) || e._draft || !this.store) return;
1625
- const t = ((a = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : a[e.id]) || [], n = vt(t);
1626
+ const t = ((o = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : o[e.id]) || [], n = vt(t);
1626
1627
  if (n == null) return;
1627
1628
  const i = W(e.last_read_message_id), r = W(n);
1628
1629
  r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
@@ -1670,22 +1671,22 @@ const N = (e, t) => {
1670
1671
  }
1671
1672
  }, wt = ["src", "alt"];
1672
1673
  function bt(e, t, n, i, r, s) {
1673
- return c(), u("div", {
1674
+ return c(), d("div", {
1674
1675
  class: O(["wm-huav", { "wm-huav--tail": n.tail }]),
1675
- style: q({
1676
+ style: H({
1676
1677
  width: n.size + "px",
1677
1678
  height: n.size + "px",
1678
1679
  "--wm-avr": Math.round(n.size * 0.32) + "px",
1679
1680
  background: s.bg
1680
1681
  })
1681
1682
  }, [
1682
- n.avatarUrl ? (c(), u("img", {
1683
+ n.avatarUrl ? (c(), d("img", {
1683
1684
  key: 0,
1684
1685
  src: n.avatarUrl,
1685
1686
  alt: n.name || ""
1686
- }, null, 8, wt)) : (c(), u("span", {
1687
+ }, null, 8, wt)) : (c(), d("span", {
1687
1688
  key: 1,
1688
- style: q({ fontSize: n.size * 0.36 + "px" })
1689
+ style: H({ fontSize: n.size * 0.36 + "px" })
1689
1690
  }, v(s.initials), 5))
1690
1691
  ], 6);
1691
1692
  }
@@ -1717,24 +1718,24 @@ const Ce = /* @__PURE__ */ N(yt, [["render", bt], ["__scopeId", "data-v-14e10c0d
1717
1718
  }
1718
1719
  }, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, It = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, Bt = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
1719
1720
  function Pt(e, t, n, i, r, s) {
1720
- const a = R("HumanAvatar");
1721
- return c(), u("div", {
1721
+ const o = R("HumanAvatar");
1722
+ return c(), d("div", {
1722
1723
  class: "wm-launcherWrap",
1723
1724
  onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
1724
1725
  onMouseleave: t[2] || (t[2] = (l) => e.$emit("hover", !1)),
1725
1726
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1726
1727
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1727
1728
  }, [
1728
- K(Re, { name: "wm-peek" }, {
1729
+ V(Re, { name: "wm-peek" }, {
1729
1730
  default: Ne(() => [
1730
- s.visiblePeeks.length ? (c(), u("div", {
1731
+ s.visiblePeeks.length ? (c(), d("div", {
1731
1732
  key: 0,
1732
1733
  class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1733
1734
  }, [
1734
- (c(!0), u(E, null, F(s.visiblePeeks, (l, p) => (c(), u("div", {
1735
+ (c(!0), d(E, null, F(s.visiblePeeks, (l, p) => (c(), d("div", {
1735
1736
  key: l.convId,
1736
1737
  class: "wm-peek",
1737
- style: q({
1738
+ style: H({
1738
1739
  "--depth": s.visiblePeeks.length - 1 - p,
1739
1740
  zIndex: p + 1
1740
1741
  }),
@@ -1749,13 +1750,13 @@ function Pt(e, t, n, i, r, s) {
1749
1750
  ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
1750
1751
  ]
1751
1752
  }, [
1752
- o("button", {
1753
+ a("button", {
1753
1754
  type: "button",
1754
1755
  class: "wm-peek__close",
1755
1756
  "aria-label": s.t("launcher.dismiss"),
1756
1757
  onClick: G((k) => e.$emit("dismiss", l.convId), ["stop"])
1757
1758
  }, [...t[5] || (t[5] = [
1758
- o("svg", {
1759
+ a("svg", {
1759
1760
  width: "9",
1760
1761
  height: "9",
1761
1762
  viewBox: "0 0 24 24",
@@ -1766,29 +1767,29 @@ function Pt(e, t, n, i, r, s) {
1766
1767
  "stroke-linejoin": "round",
1767
1768
  "aria-hidden": "true"
1768
1769
  }, [
1769
- o("path", { d: "M18 6L6 18M6 6l12 12" })
1770
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
1770
1771
  ], -1)
1771
1772
  ])], 8, St),
1772
- o("div", Mt, [
1773
- K(a, {
1773
+ a("div", Mt, [
1774
+ V(o, {
1774
1775
  name: l.senderName,
1775
1776
  "avatar-url": l.senderAvatarUrl,
1776
1777
  size: 34
1777
1778
  }, null, 8, ["name", "avatar-url"]),
1778
- l.count > 1 ? (c(), u("span", {
1779
+ l.count > 1 ? (c(), d("span", {
1779
1780
  key: 0,
1780
1781
  class: "wm-peek__avatarBadge",
1781
1782
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1782
1783
  }, v(l.count > 9 ? "9+" : l.count), 9, Tt)) : y("", !0)
1783
1784
  ]),
1784
- o("div", xt, [
1785
- o("div", Ot, [
1786
- o("span", It, v(l.senderName || s.t("common.agent")), 1),
1787
- o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1785
+ a("div", xt, [
1786
+ a("div", Ot, [
1787
+ a("span", It, v(l.senderName || s.t("common.agent")), 1),
1788
+ a("span", Lt, v(s.t("launcher.repliedToYou")), 1)
1788
1789
  ]),
1789
- o("p", Et, v(l.preview), 1)
1790
+ a("p", Et, v(l.preview), 1)
1790
1791
  ]),
1791
- o("button", {
1792
+ a("button", {
1792
1793
  type: "button",
1793
1794
  class: "wm-peek__open",
1794
1795
  onClick: G((k) => e.$emit("open", l.convId), ["stop"])
@@ -1798,13 +1799,13 @@ function Pt(e, t, n, i, r, s) {
1798
1799
  ]),
1799
1800
  _: 1
1800
1801
  }),
1801
- o("button", {
1802
+ a("button", {
1802
1803
  type: "button",
1803
1804
  class: "wm-launcher",
1804
1805
  "aria-label": s.t("launcher.open"),
1805
1806
  onClick: t[0] || (t[0] = (l) => e.$emit("open"))
1806
1807
  }, [
1807
- t[6] || (t[6] = o("svg", {
1808
+ t[6] || (t[6] = a("svg", {
1808
1809
  width: "20",
1809
1810
  height: "20",
1810
1811
  viewBox: "0 0 24 24",
@@ -1815,9 +1816,9 @@ function Pt(e, t, n, i, r, s) {
1815
1816
  "stroke-linejoin": "round",
1816
1817
  "aria-hidden": "true"
1817
1818
  }, [
1818
- o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
1819
+ a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
1819
1820
  ], -1)),
1820
- n.unreadCount > 0 ? (c(), u("span", {
1821
+ n.unreadCount > 0 ? (c(), d("span", {
1821
1822
  key: 0,
1822
1823
  class: "wm-launcher__badge",
1823
1824
  "aria-label": n.unreadCount > 1 ? s.t("launcher.unreadConversationsMany", {
@@ -1863,33 +1864,33 @@ const Ut = /* @__PURE__ */ N(Ct, [["render", Pt], ["__scopeId", "data-v-44ddf1a1
1863
1864
  class: "wm-aiav__pulse"
1864
1865
  }, jt = ["src", "alt"], Ht = ["width", "height"];
1865
1866
  function zt(e, t, n, i, r, s) {
1866
- return c(), u("div", {
1867
+ return c(), d("div", {
1867
1868
  class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1868
- style: q({
1869
+ style: H({
1869
1870
  width: n.size + "px",
1870
1871
  height: n.size + "px",
1871
1872
  "--wm-avr": n.size * 0.32 + "px"
1872
1873
  })
1873
1874
  }, [
1874
- n.pulse ? (c(), u("div", Dt)) : y("", !0),
1875
- o("div", {
1875
+ n.pulse ? (c(), d("div", Dt)) : y("", !0),
1876
+ a("div", {
1876
1877
  class: O(["wm-aiav__inner", {
1877
1878
  "wm-aiav__inner--glow": n.pulse,
1878
1879
  "wm-aiav__inner--img": !!n.imageUrl,
1879
1880
  "wm-aiav__inner--initials": !n.imageUrl && !!s.initials
1880
1881
  }]),
1881
- style: q(
1882
+ style: H(
1882
1883
  !n.imageUrl && s.initials ? { background: s.bgColor } : null
1883
1884
  )
1884
1885
  }, [
1885
- n.imageUrl ? (c(), u("img", {
1886
+ n.imageUrl ? (c(), d("img", {
1886
1887
  key: 0,
1887
1888
  src: n.imageUrl,
1888
1889
  alt: n.name || ""
1889
- }, null, 8, jt)) : s.initials ? (c(), u("span", {
1890
+ }, null, 8, jt)) : s.initials ? (c(), d("span", {
1890
1891
  key: 1,
1891
- style: q({ fontSize: n.size * 0.36 + "px" })
1892
- }, v(s.initials), 5)) : (c(), u("svg", {
1892
+ style: H({ fontSize: n.size * 0.36 + "px" })
1893
+ }, v(s.initials), 5)) : (c(), d("svg", {
1893
1894
  key: 2,
1894
1895
  width: n.size * 0.5,
1895
1896
  height: n.size * 0.5,
@@ -1897,19 +1898,19 @@ function zt(e, t, n, i, r, s) {
1897
1898
  fill: "none",
1898
1899
  "aria-hidden": "true"
1899
1900
  }, [...t[0] || (t[0] = [
1900
- o("path", {
1901
+ a("path", {
1901
1902
  d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
1902
1903
  fill: "white",
1903
1904
  opacity: "0.92"
1904
1905
  }, null, -1),
1905
- o("circle", {
1906
+ a("circle", {
1906
1907
  cx: "19",
1907
1908
  cy: "5",
1908
1909
  r: "1.5",
1909
1910
  fill: "white",
1910
1911
  opacity: "0.55"
1911
1912
  }, null, -1),
1912
- o("circle", {
1913
+ a("circle", {
1913
1914
  cx: "5",
1914
1915
  cy: "18",
1915
1916
  r: "1",
@@ -1942,36 +1943,36 @@ const le = /* @__PURE__ */ N(Ft, [["render", zt], ["__scopeId", "data-v-6f7f685d
1942
1943
  return be(e.name || "");
1943
1944
  }
1944
1945
  }
1945
- }, Kt = {
1946
+ }, Vt = {
1946
1947
  key: 0,
1947
1948
  class: "wm-team"
1948
- }, Vt = ["src", "alt"], $t = { key: 1 }, Wt = {
1949
+ }, Kt = ["src", "alt"], $t = { key: 1 }, Wt = {
1949
1950
  key: 0,
1950
1951
  class: "wm-team__label"
1951
1952
  };
1952
1953
  function Gt(e, t, n, i, r, s) {
1953
- return s.visible ? (c(), u("div", Kt, [
1954
- o("div", {
1954
+ return s.visible ? (c(), d("div", Vt, [
1955
+ a("div", {
1955
1956
  class: "wm-team__stack",
1956
- style: q({ width: s.stackWidth + "px" })
1957
+ style: H({ width: s.stackWidth + "px" })
1957
1958
  }, [
1958
- (c(!0), u(E, null, F(n.members.slice(0, 3), (a, l) => (c(), u("div", {
1959
+ (c(!0), d(E, null, F(n.members.slice(0, 3), (o, l) => (c(), d("div", {
1959
1960
  key: l,
1960
1961
  class: "wm-team__pill",
1961
- style: q({
1962
+ style: H({
1962
1963
  left: l * 13 + "px",
1963
1964
  zIndex: 3 - l,
1964
- background: s.colorFor(a)
1965
+ background: s.colorFor(o)
1965
1966
  })
1966
1967
  }, [
1967
- a.avatar_url ? (c(), u("img", {
1968
+ o.avatar_url ? (c(), d("img", {
1968
1969
  key: 0,
1969
- src: a.avatar_url,
1970
- alt: a.name || ""
1971
- }, null, 8, Vt)) : (c(), u("span", $t, v(s.initialsFor(a)), 1))
1970
+ src: o.avatar_url,
1971
+ alt: o.name || ""
1972
+ }, null, 8, Kt)) : (c(), d("span", $t, v(s.initialsFor(o)), 1))
1972
1973
  ], 4))), 128))
1973
1974
  ], 4),
1974
- n.responseLabel ? (c(), u("span", Wt, v(n.responseLabel), 1)) : y("", !0)
1975
+ n.responseLabel ? (c(), d("span", Wt, v(n.responseLabel), 1)) : y("", !0)
1975
1976
  ])) : y("", !0);
1976
1977
  }
1977
1978
  const Yt = /* @__PURE__ */ N(qt, [["render", Gt], ["__scopeId", "data-v-e49a9063"]]), Jt = {
@@ -2021,16 +2022,16 @@ const Yt = /* @__PURE__ */ N(qt, [["render", Gt], ["__scopeId", "data-v-e49a9063
2021
2022
  class: "wm-header__fill"
2022
2023
  }, rn = { class: "wm-header__actions" }, an = ["aria-label", "title"], on = ["aria-label", "title"];
2023
2024
  function ln(e, t, n, i, r, s) {
2024
- const a = R("AIAvatar"), l = R("TeamAvatars");
2025
- return c(), u("div", Qt, [
2026
- n.showBack ? (c(), u("button", {
2025
+ const o = R("AIAvatar"), l = R("TeamAvatars");
2026
+ return c(), d("div", Qt, [
2027
+ n.showBack ? (c(), d("button", {
2027
2028
  key: 0,
2028
2029
  type: "button",
2029
2030
  class: "wm-header__icon",
2030
2031
  "aria-label": s.t("header.backToHome"),
2031
2032
  onClick: t[0] || (t[0] = (p) => e.$emit("back"))
2032
2033
  }, [...t[3] || (t[3] = [
2033
- o("svg", {
2034
+ a("svg", {
2034
2035
  width: "13",
2035
2036
  height: "13",
2036
2037
  viewBox: "0 0 24 24",
@@ -2041,28 +2042,28 @@ function ln(e, t, n, i, r, s) {
2041
2042
  "stroke-linejoin": "round",
2042
2043
  "aria-hidden": "true"
2043
2044
  }, [
2044
- o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2045
+ a("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2045
2046
  ], -1)
2046
- ])], 8, Xt)) : (c(), u("div", Zt)),
2047
- n.showIdentity ? (c(), u(E, { key: 2 }, [
2048
- o("div", en, [
2049
- K(a, {
2047
+ ])], 8, Xt)) : (c(), d("div", Zt)),
2048
+ n.showIdentity ? (c(), d(E, { key: 2 }, [
2049
+ a("div", en, [
2050
+ V(o, {
2050
2051
  size: 30,
2051
2052
  name: n.agentName,
2052
2053
  "image-url": n.agentAvatarUrl
2053
2054
  }, null, 8, ["name", "image-url"])
2054
2055
  ]),
2055
- o("div", tn, [
2056
- o("div", nn, v(n.title), 1)
2056
+ a("div", tn, [
2057
+ a("div", nn, v(n.title), 1)
2057
2058
  ]),
2058
2059
  s.hasTeam ? (c(), P(l, {
2059
2060
  key: 0,
2060
2061
  members: s.displayedTeamMembers,
2061
2062
  "response-label": ""
2062
2063
  }, null, 8, ["members"])) : y("", !0)
2063
- ], 64)) : (c(), u("div", sn)),
2064
- o("div", rn, [
2065
- n.showMore ? (c(), u("button", {
2064
+ ], 64)) : (c(), d("div", sn)),
2065
+ a("div", rn, [
2066
+ n.showMore ? (c(), d("button", {
2066
2067
  key: 0,
2067
2068
  type: "button",
2068
2069
  class: O(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
@@ -2070,31 +2071,31 @@ function ln(e, t, n, i, r, s) {
2070
2071
  title: s.t("header.moreOptions"),
2071
2072
  onClick: t[1] || (t[1] = (p) => e.$emit("more"))
2072
2073
  }, [...t[4] || (t[4] = [
2073
- o("svg", {
2074
+ a("svg", {
2074
2075
  width: "13",
2075
2076
  height: "13",
2076
2077
  viewBox: "0 0 24 24",
2077
2078
  fill: "currentColor",
2078
2079
  "aria-hidden": "true"
2079
2080
  }, [
2080
- o("circle", {
2081
+ a("circle", {
2081
2082
  cx: "12",
2082
2083
  cy: "5",
2083
2084
  r: "1.6"
2084
2085
  }),
2085
- o("circle", {
2086
+ a("circle", {
2086
2087
  cx: "12",
2087
2088
  cy: "12",
2088
2089
  r: "1.6"
2089
2090
  }),
2090
- o("circle", {
2091
+ a("circle", {
2091
2092
  cx: "12",
2092
2093
  cy: "19",
2093
2094
  r: "1.6"
2094
2095
  })
2095
2096
  ], -1)
2096
2097
  ])], 10, an)) : y("", !0),
2097
- n.showClose ? (c(), u("button", {
2098
+ n.showClose ? (c(), d("button", {
2098
2099
  key: 1,
2099
2100
  type: "button",
2100
2101
  class: "wm-header__icon",
@@ -2102,7 +2103,7 @@ function ln(e, t, n, i, r, s) {
2102
2103
  title: s.t("header.closeWidget"),
2103
2104
  onClick: t[2] || (t[2] = (p) => e.$emit("close"))
2104
2105
  }, [...t[5] || (t[5] = [
2105
- o("svg", {
2106
+ a("svg", {
2106
2107
  width: "13",
2107
2108
  height: "13",
2108
2109
  viewBox: "0 0 24 24",
@@ -2113,13 +2114,13 @@ function ln(e, t, n, i, r, s) {
2113
2114
  "stroke-linejoin": "round",
2114
2115
  "aria-hidden": "true"
2115
2116
  }, [
2116
- o("path", { d: "M18 6L6 18M6 6l12 12" })
2117
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
2117
2118
  ], -1)
2118
2119
  ])], 8, on)) : y("", !0)
2119
2120
  ])
2120
2121
  ]);
2121
2122
  }
2122
- const cn = /* @__PURE__ */ N(Jt, [["render", ln], ["__scopeId", "data-v-0da6fbcd"]]);
2123
+ const cn = /* @__PURE__ */ N(Jt, [["render", ln], ["__scopeId", "data-v-7af4c118"]]);
2123
2124
  function Ue(e) {
2124
2125
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2125
2126
  }
@@ -2140,7 +2141,7 @@ function un(e) {
2140
2141
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
2141
2142
  return ie(Ue(t));
2142
2143
  }
2143
- function mn(e) {
2144
+ function hn(e) {
2144
2145
  if (!e) return "";
2145
2146
  const t = Ue(e).split(`
2146
2147
  `), n = [];
@@ -2201,10 +2202,10 @@ function mn(e) {
2201
2202
  }
2202
2203
  let r = "";
2203
2204
  for (let s = 0; s < n.length; s++) {
2204
- const a = n[s];
2205
- r += a.html;
2205
+ const o = n[s];
2206
+ r += o.html;
2206
2207
  const l = n[s + 1];
2207
- l && a.type !== "block" && l.type !== "block" && (r += `
2208
+ l && o.type !== "block" && l.type !== "block" && (r += `
2208
2209
  `);
2209
2210
  }
2210
2211
  return r;
@@ -2215,7 +2216,7 @@ const Le = {
2215
2216
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
2216
2217
  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",
2217
2218
  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"
2218
- }, hn = {
2219
+ }, mn = {
2219
2220
  name: "WmOnboarding",
2220
2221
  components: { AIAvatar: le, HumanAvatar: Ce },
2221
2222
  inject: {
@@ -2264,6 +2265,13 @@ const Le = {
2264
2265
  iconPath(e) {
2265
2266
  return Le[e] || Le.link;
2266
2267
  },
2268
+ // True when activating the link opens an external destination
2269
+ // (full URL or relative path) — anchor links (`#…`, which route
2270
+ // inside the messenger / host page) stay badge-free.
2271
+ isExternalLink(e) {
2272
+ const t = e == null ? void 0 : e.url;
2273
+ return !!t && !t.startsWith("#");
2274
+ },
2267
2275
  renderPreview(e) {
2268
2276
  return un(e);
2269
2277
  },
@@ -2282,14 +2290,10 @@ const Le = {
2282
2290
  size: 40,
2283
2291
  name: t.name || "",
2284
2292
  avatarUrl: t.avatar_url || null
2285
- } : t != null && t.avatar_url || t != null && t.name ? {
2286
- size: 40,
2287
- name: t.name || "",
2288
- imageUrl: t.avatar_url || null
2289
2293
  } : {
2290
2294
  size: 40,
2291
- name: "",
2292
- imageUrl: this.defaultIconUrl
2295
+ name: (t == null ? void 0 : t.name) || "",
2296
+ imageUrl: (t == null ? void 0 : t.avatar_url) || null
2293
2297
  };
2294
2298
  },
2295
2299
  // True when neither avatar_url nor name is known for the last
@@ -2316,8 +2320,8 @@ const Le = {
2316
2320
  minute: "2-digit"
2317
2321
  });
2318
2322
  if (i.getTime() - t.getTime() < 7 * 864e5) {
2319
- const a = t.toLocaleDateString(n, { weekday: "short" });
2320
- return a.charAt(0).toUpperCase() + a.slice(1);
2323
+ const o = t.toLocaleDateString(n, { weekday: "short" });
2324
+ return o.charAt(0).toUpperCase() + o.slice(1);
2321
2325
  }
2322
2326
  return t.toLocaleDateString(n, {
2323
2327
  day: "2-digit",
@@ -2325,43 +2329,62 @@ const Le = {
2325
2329
  });
2326
2330
  }
2327
2331
  }
2328
- }, fn = { class: "wm-onb" }, _n = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, pn = { class: "wm-onb__title" }, vn = { class: "wm-onb__sub" }, yn = { class: "wm-onb__cta" }, wn = ["disabled"], bn = {
2332
+ }, fn = { class: "wm-onb" }, _n = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, pn = { class: "wm-onb__title" }, vn = { class: "wm-onb__sub" }, yn = { class: "wm-onb__cta" }, wn = ["disabled"], bn = { class: "wm-onb__startLabel" }, kn = {
2329
2333
  key: 0,
2330
2334
  class: "wm-onb__section wm-onb__section--card"
2331
- }, kn = { class: "wm-onb__section-title" }, Cn = ["onClick"], An = { class: "wm-onb__card-icon" }, Sn = {
2332
- width: "16",
2333
- height: "16",
2335
+ }, Cn = { class: "wm-onb__section-title" }, An = ["onClick"], Sn = { class: "wm-onb__card-icon" }, Mn = ["aria-label"], Tn = {
2336
+ key: 1,
2337
+ width: "18",
2338
+ height: "18",
2334
2339
  viewBox: "0 0 24 24",
2335
2340
  fill: "none",
2336
2341
  stroke: "currentColor",
2337
- "stroke-width": "1.7",
2342
+ "stroke-width": "1.9",
2338
2343
  "stroke-linecap": "round",
2339
2344
  "stroke-linejoin": "round",
2340
2345
  "aria-hidden": "true"
2341
- }, Mn = ["d"], Tn = { class: "wm-onb__card-body" }, xn = { class: "wm-onb__card-title" }, On = {
2346
+ }, xn = ["d"], On = { class: "wm-onb__card-body" }, In = { class: "wm-onb__card-title" }, Ln = {
2342
2347
  key: 0,
2343
2348
  class: "wm-onb__card-sub"
2344
- }, In = {
2349
+ }, En = {
2350
+ key: 0,
2351
+ class: "wm-onb__card-ext",
2352
+ width: "11",
2353
+ height: "11",
2354
+ viewBox: "0 0 24 24",
2355
+ fill: "none",
2356
+ stroke: "currentColor",
2357
+ "stroke-width": "2",
2358
+ "stroke-linecap": "round",
2359
+ "stroke-linejoin": "round",
2360
+ "aria-hidden": "true"
2361
+ }, Bn = {
2345
2362
  key: 1,
2346
2363
  class: "wm-onb__section wm-onb__section--card"
2347
- }, Ln = { class: "wm-onb__section-title" }, En = { class: "wm-onb__alertList" }, Bn = ["onClick"], Rn = ["aria-label"], Nn = { class: "wm-onb__alert-body" }, Pn = { class: "wm-onb__alert-title" }, Un = ["innerHTML"], Fn = { class: "wm-onb__alert-meta" }, Dn = {
2364
+ }, Rn = { class: "wm-onb__section-title" }, Nn = { class: "wm-onb__alertList" }, Pn = ["onClick"], Un = {
2365
+ key: 0,
2366
+ class: "wm-onb__defaultAvatar"
2367
+ }, Fn = ["aria-label"], Dn = { class: "wm-onb__alert-body" }, jn = { class: "wm-onb__alert-title" }, Hn = ["innerHTML"], zn = { class: "wm-onb__alert-meta" }, qn = {
2348
2368
  key: 0,
2349
2369
  class: "wm-onb__alert-time"
2350
- }, jn = { class: "wm-onb__alert-resume" }, Hn = {
2370
+ }, Vn = { class: "wm-onb__alert-resume" }, Kn = {
2351
2371
  key: 2,
2352
2372
  class: "wm-onb__section wm-onb__section--card"
2353
- }, zn = { class: "wm-onb__section-title" }, qn = { class: "wm-onb__search" }, Kn = ["placeholder", "aria-label"], Vn = { class: "wm-onb__list" }, $n = ["onClick"], Wn = ["aria-label"], Gn = { class: "wm-onb__thread-body" }, Yn = { class: "wm-onb__thread-title" }, Jn = ["innerHTML"], Qn = { class: "wm-onb__thread-meta" }, Xn = {
2373
+ }, $n = { class: "wm-onb__section-title" }, Wn = { class: "wm-onb__search" }, Gn = ["placeholder", "aria-label"], Yn = { class: "wm-onb__list" }, Jn = ["onClick"], Qn = {
2374
+ key: 0,
2375
+ class: "wm-onb__defaultAvatar"
2376
+ }, Xn = ["aria-label"], Zn = { class: "wm-onb__thread-body" }, es = { class: "wm-onb__thread-title" }, ts = ["innerHTML"], ns = { class: "wm-onb__thread-meta" }, ss = {
2354
2377
  key: 0,
2355
2378
  class: "wm-onb__thread-time"
2356
- }, Zn = {
2379
+ }, rs = {
2357
2380
  key: 0,
2358
2381
  class: "wm-onb__empty"
2359
2382
  };
2360
- function es(e, t, n, i, r, s) {
2361
- const a = R("AIAvatar");
2362
- return c(), u("div", fn, [
2363
- o("div", _n, [
2364
- t[2] || (t[2] = o("svg", {
2383
+ function is(e, t, n, i, r, s) {
2384
+ const o = R("AIAvatar");
2385
+ return c(), d("div", fn, [
2386
+ a("div", _n, [
2387
+ t[2] || (t[2] = a("svg", {
2365
2388
  class: "wm-onb__hero-deco",
2366
2389
  width: "180",
2367
2390
  height: "180",
@@ -2369,7 +2392,7 @@ function es(e, t, n, i, r, s) {
2369
2392
  fill: "none",
2370
2393
  "aria-hidden": "true"
2371
2394
  }, [
2372
- o("circle", {
2395
+ a("circle", {
2373
2396
  cx: "170",
2374
2397
  cy: "10",
2375
2398
  r: "105",
@@ -2378,7 +2401,7 @@ function es(e, t, n, i, r, s) {
2378
2401
  "stroke-dasharray": "1 5",
2379
2402
  opacity: "0.35"
2380
2403
  }),
2381
- o("circle", {
2404
+ a("circle", {
2382
2405
  cx: "170",
2383
2406
  cy: "10",
2384
2407
  r: "72",
@@ -2387,7 +2410,7 @@ function es(e, t, n, i, r, s) {
2387
2410
  "stroke-dasharray": "1 5",
2388
2411
  opacity: "0.5"
2389
2412
  }),
2390
- o("circle", {
2413
+ a("circle", {
2391
2414
  cx: "152",
2392
2415
  cy: "34",
2393
2416
  r: "2.5",
@@ -2395,102 +2418,145 @@ function es(e, t, n, i, r, s) {
2395
2418
  opacity: "0.65"
2396
2419
  })
2397
2420
  ], -1)),
2398
- K(a, {
2421
+ V(o, {
2399
2422
  size: 52,
2400
2423
  "image-url": n.defaultIconUrl
2401
2424
  }, null, 8, ["image-url"]),
2402
- o("div", gn, [
2403
- o("div", pn, v(s.heroTitle), 1),
2404
- o("div", vn, v(s.heroSub), 1)
2425
+ a("div", gn, [
2426
+ a("div", pn, v(s.heroTitle), 1),
2427
+ a("div", vn, v(s.heroSub), 1)
2405
2428
  ])
2406
2429
  ]),
2407
- o("div", yn, [
2408
- o("button", {
2430
+ a("div", yn, [
2431
+ a("button", {
2409
2432
  type: "button",
2410
2433
  class: "wm-onb__startBtn",
2411
2434
  disabled: n.busy,
2412
2435
  onClick: t[0] || (t[0] = (l) => e.$emit("start"))
2413
2436
  }, [
2414
- t[3] || (t[3] = o("span", { class: "wm-onb__startIcon" }, [
2415
- o("svg", {
2416
- width: "12",
2417
- height: "12",
2437
+ t[3] || (t[3] = a("span", { class: "wm-onb__startIcon" }, [
2438
+ a("svg", {
2439
+ width: "14",
2440
+ height: "14",
2418
2441
  viewBox: "0 0 24 24",
2419
2442
  fill: "none",
2420
2443
  stroke: "currentColor",
2421
- "stroke-width": "2.2",
2444
+ "stroke-width": "2.4",
2422
2445
  "stroke-linecap": "round",
2423
2446
  "stroke-linejoin": "round",
2424
2447
  "aria-hidden": "true"
2425
2448
  }, [
2426
- o("path", { d: "M12 5v14M5 12h14" })
2449
+ a("path", { d: "M12 5v14M5 12h14" })
2427
2450
  ])
2428
2451
  ], -1)),
2429
- o("span", null, v(n.busy ? "…" : s.t("onboarding.start")), 1)
2452
+ a("span", bn, v(n.busy ? "…" : s.t("onboarding.start")), 1),
2453
+ t[4] || (t[4] = a("svg", {
2454
+ class: "wm-onb__startArrow",
2455
+ width: "14",
2456
+ height: "14",
2457
+ viewBox: "0 0 24 24",
2458
+ fill: "none",
2459
+ stroke: "currentColor",
2460
+ "stroke-width": "2",
2461
+ "stroke-linecap": "round",
2462
+ "stroke-linejoin": "round",
2463
+ "aria-hidden": "true"
2464
+ }, [
2465
+ a("path", { d: "M5 12h14M13 5l7 7-7 7" })
2466
+ ], -1))
2430
2467
  ], 8, wn)
2431
2468
  ]),
2432
- n.quickLinks.length ? (c(), u("div", bn, [
2433
- o("div", kn, v(s.t("onboarding.quickAccess")), 1),
2434
- o("div", {
2469
+ n.quickLinks.length ? (c(), d("div", kn, [
2470
+ a("div", Cn, v(s.t("onboarding.quickAccess")), 1),
2471
+ a("div", {
2435
2472
  class: O(s.quickLinksLayout)
2436
2473
  }, [
2437
- (c(!0), u(E, null, F(n.quickLinks, (l, p) => (c(), u("button", {
2474
+ (c(!0), d(E, null, F(n.quickLinks, (l, p) => (c(), d("button", {
2438
2475
  key: p,
2439
2476
  type: "button",
2440
2477
  class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
2478
+ style: H(l.color ? { "--card-color": l.color } : null),
2441
2479
  onClick: (k) => e.$emit("select", l)
2442
2480
  }, [
2443
- o("span", An, [
2444
- (c(), u("svg", Sn, [
2445
- o("path", {
2481
+ a("span", Sn, [
2482
+ l.icon_url ? (c(), d("span", {
2483
+ key: 0,
2484
+ class: "wm-onb__card-iconImg",
2485
+ style: H({
2486
+ "--icon-url": `url('${l.icon_url}')`
2487
+ }),
2488
+ role: "img",
2489
+ "aria-label": l.label || ""
2490
+ }, null, 12, Mn)) : (c(), d("svg", Tn, [
2491
+ a("path", {
2446
2492
  d: s.iconPath(l.icon)
2447
- }, null, 8, Mn)
2493
+ }, null, 8, xn)
2448
2494
  ]))
2449
2495
  ]),
2450
- o("span", Tn, [
2451
- o("span", xn, v(l.label), 1),
2452
- l.description ? (c(), u("span", On, v(l.description), 1)) : y("", !0)
2453
- ])
2454
- ], 10, Cn))), 128))
2496
+ a("span", On, [
2497
+ a("span", In, v(l.label), 1),
2498
+ l.subtitle ? (c(), d("span", Ln, v(l.subtitle), 1)) : y("", !0)
2499
+ ]),
2500
+ s.isExternalLink(l) ? (c(), d("svg", En, [...t[5] || (t[5] = [
2501
+ a("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2502
+ ])])) : y("", !0)
2503
+ ], 14, An))), 128))
2455
2504
  ], 2)
2456
2505
  ])) : y("", !0),
2457
- s.unreadThreads.length ? (c(), u("div", In, [
2458
- o("div", Ln, v(s.t("onboarding.unreadConversations")), 1),
2459
- o("div", En, [
2460
- (c(!0), u(E, null, F(s.unreadThreads, (l) => (c(), u("button", {
2506
+ s.unreadThreads.length ? (c(), d("div", Bn, [
2507
+ a("div", Rn, v(s.t("onboarding.unreadConversations")), 1),
2508
+ a("div", Nn, [
2509
+ (c(!0), d(E, null, F(s.unreadThreads, (l) => (c(), d("button", {
2461
2510
  key: l.id,
2462
2511
  type: "button",
2463
2512
  class: "wm-onb__alert",
2464
2513
  onClick: (p) => e.$emit("resume", l)
2465
2514
  }, [
2466
- o("span", {
2515
+ a("span", {
2467
2516
  class: O(["wm-onb__alert-avatar", s.avatarWrapperClass(l)])
2468
2517
  }, [
2469
- (c(), P(pe(s.avatarComponent(l)), Se({ ref_for: !0 }, s.avatarProps(l)), null, 16)),
2470
- o("span", {
2518
+ s.isDefaultAvatar(l) ? (c(), d("span", Un, [...t[6] || (t[6] = [
2519
+ a("svg", {
2520
+ width: "20",
2521
+ height: "20",
2522
+ viewBox: "0 0 24 24",
2523
+ fill: "none",
2524
+ stroke: "currentColor",
2525
+ "stroke-width": "1.7",
2526
+ "stroke-linecap": "round",
2527
+ "stroke-linejoin": "round",
2528
+ "aria-hidden": "true"
2529
+ }, [
2530
+ a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2531
+ ], -1)
2532
+ ])])) : (c(), P(pe(s.avatarComponent(l)), Se({
2533
+ key: 1,
2534
+ ref_for: !0
2535
+ }, s.avatarProps(l)), null, 16)),
2536
+ a("span", {
2471
2537
  class: "wm-onb__alert-dot",
2472
2538
  "aria-label": s.t("onboarding.unread")
2473
- }, null, 8, Rn)
2539
+ }, null, 8, Fn)
2474
2540
  ], 2),
2475
- o("span", Nn, [
2476
- o("span", Pn, v(l.title), 1),
2477
- o("span", {
2541
+ a("span", Dn, [
2542
+ a("span", jn, v(l.title), 1),
2543
+ a("span", {
2478
2544
  class: "wm-onb__alert-preview",
2479
2545
  innerHTML: s.renderPreview(l.preview)
2480
- }, null, 8, Un)
2546
+ }, null, 8, Hn)
2481
2547
  ]),
2482
- o("span", Fn, [
2483
- s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : y("", !0),
2484
- o("span", jn, v(s.t("onboarding.resume")), 1)
2548
+ a("span", zn, [
2549
+ s.formatTs(l._ts) ? (c(), d("span", qn, v(s.formatTs(l._ts)), 1)) : y("", !0),
2550
+ a("span", Vn, v(s.t("onboarding.resume")), 1)
2485
2551
  ])
2486
- ], 8, Bn))), 128))
2552
+ ], 8, Pn))), 128))
2487
2553
  ])
2488
2554
  ])) : y("", !0),
2489
- n.openThreads.length ? (c(), u("div", Hn, [
2490
- o("div", zn, v(s.t("onboarding.recentConversations")), 1),
2491
- o("div", qn, [
2492
- t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
2493
- o("svg", {
2555
+ n.openThreads.length ? (c(), d("div", Kn, [
2556
+ a("div", $n, v(s.t("onboarding.recentConversations")), 1),
2557
+ a("div", Wn, [
2558
+ t[7] || (t[7] = a("span", { class: "wm-onb__searchIcon" }, [
2559
+ a("svg", {
2494
2560
  width: "12",
2495
2561
  height: "12",
2496
2562
  viewBox: "0 0 24 24",
@@ -2501,45 +2567,62 @@ function es(e, t, n, i, r, s) {
2501
2567
  "stroke-linejoin": "round",
2502
2568
  "aria-hidden": "true"
2503
2569
  }, [
2504
- o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2570
+ a("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
2505
2571
  ])
2506
2572
  ], -1)),
2507
- $(o("input", {
2573
+ $(a("input", {
2508
2574
  "onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
2509
2575
  type: "text",
2510
2576
  placeholder: s.t("onboarding.search"),
2511
2577
  "aria-label": s.t("onboarding.search")
2512
- }, null, 8, Kn), [
2578
+ }, null, 8, Gn), [
2513
2579
  [X, r.query]
2514
2580
  ])
2515
2581
  ]),
2516
- o("div", Vn, [
2517
- (c(!0), u(E, null, F(s.filteredThreads, (l) => (c(), u("button", {
2582
+ a("div", Yn, [
2583
+ (c(!0), d(E, null, F(s.filteredThreads, (l) => (c(), d("button", {
2518
2584
  key: l.id,
2519
2585
  type: "button",
2520
2586
  class: O(["wm-onb__thread", { "wm-onb__thread--unread": l.unread }]),
2521
2587
  onClick: (p) => e.$emit("resume", l)
2522
2588
  }, [
2523
- o("span", {
2589
+ a("span", {
2524
2590
  class: O(["wm-onb__thread-avatar", s.avatarWrapperClass(l)])
2525
2591
  }, [
2526
- (c(), P(pe(s.avatarComponent(l)), Se({ ref_for: !0 }, s.avatarProps(l)), null, 16)),
2527
- l.unread ? (c(), u("span", {
2528
- key: 0,
2592
+ s.isDefaultAvatar(l) ? (c(), d("span", Qn, [...t[8] || (t[8] = [
2593
+ a("svg", {
2594
+ width: "20",
2595
+ height: "20",
2596
+ viewBox: "0 0 24 24",
2597
+ fill: "none",
2598
+ stroke: "currentColor",
2599
+ "stroke-width": "1.7",
2600
+ "stroke-linecap": "round",
2601
+ "stroke-linejoin": "round",
2602
+ "aria-hidden": "true"
2603
+ }, [
2604
+ a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2605
+ ], -1)
2606
+ ])])) : (c(), P(pe(s.avatarComponent(l)), Se({
2607
+ key: 1,
2608
+ ref_for: !0
2609
+ }, s.avatarProps(l)), null, 16)),
2610
+ l.unread ? (c(), d("span", {
2611
+ key: 2,
2529
2612
  class: "wm-onb__thread-dot",
2530
2613
  "aria-label": s.t("onboarding.unread")
2531
- }, null, 8, Wn)) : y("", !0)
2614
+ }, null, 8, Xn)) : y("", !0)
2532
2615
  ], 2),
2533
- o("span", Gn, [
2534
- o("span", Yn, v(l.title), 1),
2535
- o("span", {
2616
+ a("span", Zn, [
2617
+ a("span", es, v(l.title), 1),
2618
+ a("span", {
2536
2619
  class: "wm-onb__thread-preview",
2537
2620
  innerHTML: s.renderPreview(l.preview)
2538
- }, null, 8, Jn)
2621
+ }, null, 8, ts)
2539
2622
  ]),
2540
- o("span", Qn, [
2541
- s.formatTs(l._ts) ? (c(), u("span", Xn, v(s.formatTs(l._ts)), 1)) : y("", !0),
2542
- t[5] || (t[5] = o("svg", {
2623
+ a("span", ns, [
2624
+ s.formatTs(l._ts) ? (c(), d("span", ss, v(s.formatTs(l._ts)), 1)) : y("", !0),
2625
+ t[9] || (t[9] = a("svg", {
2543
2626
  width: "14",
2544
2627
  height: "14",
2545
2628
  viewBox: "0 0 24 24",
@@ -2551,20 +2634,20 @@ function es(e, t, n, i, r, s) {
2551
2634
  class: "wm-onb__thread-chev",
2552
2635
  "aria-hidden": "true"
2553
2636
  }, [
2554
- o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2637
+ a("path", { d: "M5 12h14M13 5l7 7-7 7" })
2555
2638
  ], -1))
2556
2639
  ])
2557
- ], 10, $n))), 128)),
2558
- s.filteredThreads.length ? y("", !0) : (c(), u("div", Zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
2640
+ ], 10, Jn))), 128)),
2641
+ s.filteredThreads.length ? y("", !0) : (c(), d("div", rs, v(s.t("onboarding.noResults", { query: r.query })), 1))
2559
2642
  ])
2560
2643
  ])) : y("", !0)
2561
2644
  ]);
2562
2645
  }
2563
- const ts = /* @__PURE__ */ N(hn, [["render", es], ["__scopeId", "data-v-ee89cb1d"]]);
2564
- function ns(e) {
2646
+ const as = /* @__PURE__ */ N(mn, [["render", is], ["__scopeId", "data-v-369d70df"]]);
2647
+ function os(e) {
2565
2648
  return typeof e != "string" ? "" : e.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
2566
2649
  }
2567
- const ss = {
2650
+ const ls = {
2568
2651
  name: "WmActionResult",
2569
2652
  props: {
2570
2653
  state: { type: String, default: "success" },
@@ -2574,13 +2657,13 @@ const ss = {
2574
2657
  },
2575
2658
  computed: {
2576
2659
  detailText() {
2577
- return ns(this.detail);
2660
+ return os(this.detail);
2578
2661
  }
2579
2662
  }
2580
- }, rs = {
2663
+ }, cs = {
2581
2664
  class: "wm-result__icon",
2582
2665
  "aria-hidden": "true"
2583
- }, is = {
2666
+ }, ds = {
2584
2667
  key: 0,
2585
2668
  width: "11",
2586
2669
  height: "11",
@@ -2590,7 +2673,7 @@ const ss = {
2590
2673
  "stroke-width": "2.8",
2591
2674
  "stroke-linecap": "round",
2592
2675
  "stroke-linejoin": "round"
2593
- }, as = {
2676
+ }, us = {
2594
2677
  key: 1,
2595
2678
  width: "11",
2596
2679
  height: "11",
@@ -2600,7 +2683,7 @@ const ss = {
2600
2683
  "stroke-width": "2.6",
2601
2684
  "stroke-linecap": "round",
2602
2685
  "stroke-linejoin": "round"
2603
- }, os = {
2686
+ }, hs = {
2604
2687
  key: 2,
2605
2688
  width: "11",
2606
2689
  height: "11",
@@ -2610,7 +2693,7 @@ const ss = {
2610
2693
  "stroke-width": "2.4",
2611
2694
  "stroke-linecap": "round",
2612
2695
  "stroke-linejoin": "round"
2613
- }, ls = {
2696
+ }, ms = {
2614
2697
  key: 3,
2615
2698
  width: "12",
2616
2699
  height: "12",
@@ -2620,32 +2703,32 @@ const ss = {
2620
2703
  "stroke-width": "2.2",
2621
2704
  "stroke-linecap": "round",
2622
2705
  "stroke-linejoin": "round"
2623
- }, cs = { class: "wm-result__body" }, ds = { class: "wm-result__label" }, us = { class: "wm-result__detail" };
2624
- function ms(e, t, n, i, r, s) {
2625
- return c(), u("div", {
2706
+ }, fs = { class: "wm-result__body" }, _s = { class: "wm-result__label" }, gs = { class: "wm-result__detail" };
2707
+ function ps(e, t, n, i, r, s) {
2708
+ return c(), d("div", {
2626
2709
  class: O(["wm-result", `wm-result--${n.state}`])
2627
2710
  }, [
2628
- o("span", rs, [
2629
- n.state === "success" ? (c(), u("svg", is, [...t[0] || (t[0] = [
2630
- o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2631
- ])])) : n.state === "rejected" ? (c(), u("svg", as, [...t[1] || (t[1] = [
2632
- o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2633
- ])])) : n.state === "awaiting" ? (c(), u("svg", os, [...t[2] || (t[2] = [
2634
- o("circle", {
2711
+ a("span", cs, [
2712
+ n.state === "success" ? (c(), d("svg", ds, [...t[0] || (t[0] = [
2713
+ a("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2714
+ ])])) : n.state === "rejected" ? (c(), d("svg", us, [...t[1] || (t[1] = [
2715
+ a("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2716
+ ])])) : n.state === "awaiting" ? (c(), d("svg", hs, [...t[2] || (t[2] = [
2717
+ a("circle", {
2635
2718
  cx: "12",
2636
2719
  cy: "12",
2637
2720
  r: "10"
2638
2721
  }, null, -1),
2639
- o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2640
- ])])) : (c(), u("svg", ls, [...t[3] || (t[3] = [
2641
- o("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
2642
- o("line", {
2722
+ a("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2723
+ ])])) : (c(), d("svg", ms, [...t[3] || (t[3] = [
2724
+ a("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),
2725
+ a("line", {
2643
2726
  x1: "12",
2644
2727
  y1: "9",
2645
2728
  x2: "12",
2646
2729
  y2: "13"
2647
2730
  }, null, -1),
2648
- o("line", {
2731
+ a("line", {
2649
2732
  x1: "12",
2650
2733
  y1: "17",
2651
2734
  x2: "12.01",
@@ -2653,19 +2736,19 @@ function ms(e, t, n, i, r, s) {
2653
2736
  }, null, -1)
2654
2737
  ])]))
2655
2738
  ]),
2656
- o("span", cs, [
2657
- o("span", ds, v(n.label), 1),
2658
- s.detailText ? (c(), u(E, { key: 0 }, [
2659
- t[4] || (t[4] = o("span", {
2739
+ a("span", fs, [
2740
+ a("span", _s, v(n.label), 1),
2741
+ s.detailText ? (c(), d(E, { key: 0 }, [
2742
+ t[4] || (t[4] = a("span", {
2660
2743
  class: "wm-result__sep",
2661
2744
  "aria-hidden": "true"
2662
2745
  }, " · ", -1)),
2663
- o("span", us, v(s.detailText), 1)
2746
+ a("span", gs, v(s.detailText), 1)
2664
2747
  ], 64)) : y("", !0)
2665
2748
  ])
2666
2749
  ], 2);
2667
2750
  }
2668
- const hs = /* @__PURE__ */ N(ss, [["render", ms], ["__scopeId", "data-v-7284acd0"]]), fs = {
2751
+ const vs = /* @__PURE__ */ N(ls, [["render", ps], ["__scopeId", "data-v-7284acd0"]]), ys = {
2669
2752
  name: "WmArtifactFormResponse",
2670
2753
  inject: {
2671
2754
  // Translator shared by the Messenger shell; French fallback when
@@ -2681,13 +2764,13 @@ const hs = /* @__PURE__ */ N(ss, [["render", ms], ["__scopeId", "data-v-7284acd0
2681
2764
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2682
2765
  }
2683
2766
  }
2684
- }, _s = { class: "wm-art wm-art--formResponse" }, gs = { class: "wm-art__head" }, ps = { class: "wm-art__title" }, vs = { class: "wm-art__badge wm-art__badge--success" }, ys = { class: "wm-art__body" }, ws = { class: "wm-art__fieldLabel" };
2685
- function bs(e, t, n, i, r, s) {
2686
- return c(), u("div", _s, [
2687
- o("div", gs, [
2688
- o("div", ps, v(n.data.title || s.t("form.title")), 1),
2689
- o("span", vs, [
2690
- t[0] || (t[0] = o("svg", {
2767
+ }, ws = { class: "wm-art wm-art--formResponse" }, bs = { class: "wm-art__head" }, ks = { class: "wm-art__title" }, Cs = { class: "wm-art__badge wm-art__badge--success" }, As = { class: "wm-art__body" }, Ss = { class: "wm-art__fieldLabel" };
2768
+ function Ms(e, t, n, i, r, s) {
2769
+ return c(), d("div", ws, [
2770
+ a("div", bs, [
2771
+ a("div", ks, v(n.data.title || s.t("form.title")), 1),
2772
+ a("span", Cs, [
2773
+ t[0] || (t[0] = a("svg", {
2691
2774
  width: "11",
2692
2775
  height: "11",
2693
2776
  viewBox: "0 0 24 24",
@@ -2698,28 +2781,28 @@ function bs(e, t, n, i, r, s) {
2698
2781
  "stroke-linejoin": "round",
2699
2782
  "aria-hidden": "true"
2700
2783
  }, [
2701
- o("polyline", { points: "20 6 9 17 4 12" })
2784
+ a("polyline", { points: "20 6 9 17 4 12" })
2702
2785
  ], -1)),
2703
2786
  ye(" " + v(s.t("form.sent")), 1)
2704
2787
  ])
2705
2788
  ]),
2706
- o("div", ys, [
2707
- (c(!0), u(E, null, F(s.fields, (a, l) => (c(), u("div", {
2789
+ a("div", As, [
2790
+ (c(!0), d(E, null, F(s.fields, (o, l) => (c(), d("div", {
2708
2791
  key: l,
2709
2792
  class: "wm-art__field"
2710
2793
  }, [
2711
- o("div", ws, v(a.label), 1),
2712
- o("div", {
2794
+ a("div", Ss, v(o.label), 1),
2795
+ a("div", {
2713
2796
  class: O([
2714
2797
  "wm-art__fieldValue",
2715
- { "wm-art__fieldValue--multi": a.multiline }
2798
+ { "wm-art__fieldValue--multi": o.multiline }
2716
2799
  ])
2717
- }, v(a.value), 3)
2800
+ }, v(o.value), 3)
2718
2801
  ]))), 128))
2719
2802
  ])
2720
2803
  ]);
2721
2804
  }
2722
- const ks = /* @__PURE__ */ N(fs, [["render", bs], ["__scopeId", "data-v-713aecf1"]]), Cs = {
2805
+ const Ts = /* @__PURE__ */ N(ys, [["render", Ms], ["__scopeId", "data-v-713aecf1"]]), xs = {
2723
2806
  name: "WmArtifactInfoCard",
2724
2807
  props: {
2725
2808
  data: { type: Object, required: !0 }
@@ -2734,34 +2817,34 @@ const ks = /* @__PURE__ */ N(fs, [["render", bs], ["__scopeId", "data-v-713aecf1
2734
2817
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2735
2818
  }
2736
2819
  }
2737
- }, As = { class: "wm-art wm-art--infoCard" }, Ss = {
2820
+ }, Os = { class: "wm-art wm-art--infoCard" }, Is = {
2738
2821
  key: 0,
2739
2822
  class: "wm-art__image"
2740
- }, Ms = ["src", "alt"], Ts = { class: "wm-art__head" }, xs = { class: "wm-art__headMain" }, Os = { class: "wm-art__title" }, Is = {
2823
+ }, Ls = ["src", "alt"], Es = { class: "wm-art__head" }, Bs = { class: "wm-art__headMain" }, Rs = { class: "wm-art__title" }, Ns = {
2741
2824
  key: 0,
2742
2825
  class: "wm-art__subtitle"
2743
- }, Ls = {
2826
+ }, Ps = {
2744
2827
  key: 1,
2745
2828
  class: "wm-art__body"
2746
- }, Es = {
2829
+ }, Us = {
2747
2830
  key: 0,
2748
2831
  class: "wm-art__text"
2749
- }, Bs = { class: "wm-art__fieldLabel" };
2750
- function Rs(e, t, n, i, r, s) {
2751
- return c(), u("div", As, [
2752
- n.data.image_url ? (c(), u("figure", Ss, [
2753
- o("img", {
2832
+ }, Fs = { class: "wm-art__fieldLabel" };
2833
+ function Ds(e, t, n, i, r, s) {
2834
+ return c(), d("div", Os, [
2835
+ n.data.image_url ? (c(), d("figure", Is, [
2836
+ a("img", {
2754
2837
  src: n.data.image_url,
2755
2838
  alt: n.data.title || "",
2756
2839
  loading: "lazy"
2757
- }, null, 8, Ms)
2840
+ }, null, 8, Ls)
2758
2841
  ])) : y("", !0),
2759
- o("div", Ts, [
2760
- o("div", xs, [
2761
- o("div", Os, v(n.data.title), 1),
2762
- n.data.subtitle ? (c(), u("div", Is, v(n.data.subtitle), 1)) : y("", !0)
2842
+ a("div", Es, [
2843
+ a("div", Bs, [
2844
+ a("div", Rs, v(n.data.title), 1),
2845
+ n.data.subtitle ? (c(), d("div", Ns, v(n.data.subtitle), 1)) : y("", !0)
2763
2846
  ]),
2764
- n.data.badge && n.data.badge.label ? (c(), u("span", {
2847
+ n.data.badge && n.data.badge.label ? (c(), d("span", {
2765
2848
  key: 0,
2766
2849
  class: O([
2767
2850
  "wm-art__badge",
@@ -2769,25 +2852,25 @@ function Rs(e, t, n, i, r, s) {
2769
2852
  ])
2770
2853
  }, v(n.data.badge.label), 3)) : y("", !0)
2771
2854
  ]),
2772
- s.hasBody ? (c(), u("div", Ls, [
2773
- n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : y("", !0),
2774
- s.fields.length ? (c(!0), u(E, { key: 1 }, F(s.fields, (a, l) => (c(), u("div", {
2855
+ s.hasBody ? (c(), d("div", Ps, [
2856
+ n.data.body ? (c(), d("div", Us, v(n.data.body), 1)) : y("", !0),
2857
+ s.fields.length ? (c(!0), d(E, { key: 1 }, F(s.fields, (o, l) => (c(), d("div", {
2775
2858
  key: l,
2776
2859
  class: "wm-art__field"
2777
2860
  }, [
2778
- o("div", Bs, v(a.label), 1),
2779
- o("div", {
2861
+ a("div", Fs, v(o.label), 1),
2862
+ a("div", {
2780
2863
  class: O([
2781
2864
  "wm-art__fieldValue",
2782
- { "wm-art__fieldValue--multi": a.multiline }
2865
+ { "wm-art__fieldValue--multi": o.multiline }
2783
2866
  ])
2784
- }, v(a.value), 3)
2867
+ }, v(o.value), 3)
2785
2868
  ]))), 128)) : y("", !0)
2786
2869
  ])) : y("", !0)
2787
2870
  ]);
2788
2871
  }
2789
- const Ns = /* @__PURE__ */ N(Cs, [["render", Rs], ["__scopeId", "data-v-7eae0e4a"]]);
2790
- function Ps(e, t, n) {
2872
+ const js = /* @__PURE__ */ N(xs, [["render", Ds], ["__scopeId", "data-v-7eae0e4a"]]);
2873
+ function Hs(e, t, n) {
2791
2874
  if (!e) return "";
2792
2875
  const i = new Date(e);
2793
2876
  if (Number.isNaN(i.getTime())) return e;
@@ -2801,7 +2884,7 @@ function Ps(e, t, n) {
2801
2884
  });
2802
2885
  return `${r}${n}${s}`;
2803
2886
  }
2804
- const Us = {
2887
+ const zs = {
2805
2888
  name: "WmArtifactTicket",
2806
2889
  inject: {
2807
2890
  // Translator + resolved-language getter shared by the Messenger
@@ -2819,7 +2902,7 @@ const Us = {
2819
2902
  },
2820
2903
  formattedDate() {
2821
2904
  var e;
2822
- return Ps(
2905
+ return Hs(
2823
2906
  (e = this.data) == null ? void 0 : e.created_at,
2824
2907
  re(this.wmLocale()),
2825
2908
  this.t("ticket.dateAt")
@@ -2847,13 +2930,13 @@ const Us = {
2847
2930
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
2848
2931
  }
2849
2932
  }
2850
- }, Fs = { class: "wm-art wm-art--ticket" }, Ds = { class: "wm-art__head wm-tk__head" }, js = { class: "wm-art__title wm-tk__title" }, Hs = { class: "wm-tk__sub" }, zs = { class: "wm-tk__ref" }, qs = {
2933
+ }, qs = { class: "wm-art wm-art--ticket" }, Vs = { class: "wm-art__head wm-tk__head" }, Ks = { class: "wm-art__title wm-tk__title" }, $s = { class: "wm-tk__sub" }, Ws = { class: "wm-tk__ref" }, Gs = {
2851
2934
  key: 0,
2852
2935
  class: "wm-tk__text"
2853
- }, Ks = {
2936
+ }, Ys = {
2854
2937
  key: 0,
2855
2938
  class: "wm-art__body"
2856
- }, Vs = { class: "wm-art__fieldLabel" }, $s = ["data-level"], Ws = {
2939
+ }, Js = { class: "wm-art__fieldLabel" }, Qs = ["data-level"], Xs = {
2857
2940
  key: 1,
2858
2941
  class: "wm-tk__date",
2859
2942
  width: "12",
@@ -2865,17 +2948,17 @@ const Us = {
2865
2948
  "stroke-linecap": "round",
2866
2949
  "stroke-linejoin": "round",
2867
2950
  "aria-hidden": "true"
2868
- }, Gs = {
2951
+ }, Zs = {
2869
2952
  key: 1,
2870
2953
  class: "wm-art__footer wm-tk__footer"
2871
2954
  };
2872
- function Ys(e, t, n, i, r, s) {
2873
- return c(), u("div", Fs, [
2874
- o("div", Ds, [
2875
- o("div", js, v(n.data.title), 1),
2876
- o("div", Hs, [
2877
- o("div", zs, [
2878
- t[0] || (t[0] = o("svg", {
2955
+ function er(e, t, n, i, r, s) {
2956
+ return c(), d("div", qs, [
2957
+ a("div", Vs, [
2958
+ a("div", Ks, v(n.data.title), 1),
2959
+ a("div", $s, [
2960
+ a("div", Ws, [
2961
+ t[0] || (t[0] = a("svg", {
2879
2962
  width: "11",
2880
2963
  height: "11",
2881
2964
  viewBox: "0 0 24 24",
@@ -2886,85 +2969,85 @@ function Ys(e, t, n, i, r, s) {
2886
2969
  "stroke-linejoin": "round",
2887
2970
  "aria-hidden": "true"
2888
2971
  }, [
2889
- o("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" }),
2890
- o("path", { d: "M13 5v2M13 17v2M13 11v2" })
2972
+ a("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" }),
2973
+ a("path", { d: "M13 5v2M13 17v2M13 11v2" })
2891
2974
  ], -1)),
2892
- o("span", null, v(n.data.reference), 1)
2975
+ a("span", null, v(n.data.reference), 1)
2893
2976
  ]),
2894
- o("span", {
2977
+ a("span", {
2895
2978
  class: O([
2896
2979
  "wm-art__badge",
2897
2980
  "wm-tk__badge",
2898
2981
  `wm-art__badge--${n.data.status.tone || "neutral"}`
2899
2982
  ])
2900
2983
  }, [
2901
- t[1] || (t[1] = o("span", {
2984
+ t[1] || (t[1] = a("span", {
2902
2985
  class: "wm-tk__dot",
2903
2986
  "aria-hidden": "true"
2904
2987
  }, null, -1)),
2905
2988
  ye(" " + v(n.data.status.label), 1)
2906
2989
  ], 2)
2907
2990
  ]),
2908
- n.data.body ? (c(), u("div", qs, v(n.data.body), 1)) : y("", !0)
2991
+ n.data.body ? (c(), d("div", Gs, v(n.data.body), 1)) : y("", !0)
2909
2992
  ]),
2910
- s.fields.length ? (c(), u("div", Ks, [
2911
- (c(!0), u(E, null, F(s.fields, (a, l) => (c(), u("div", {
2993
+ s.fields.length ? (c(), d("div", Ys, [
2994
+ (c(!0), d(E, null, F(s.fields, (o, l) => (c(), d("div", {
2912
2995
  key: l,
2913
2996
  class: "wm-art__field"
2914
2997
  }, [
2915
- o("div", Vs, v(a.label), 1),
2916
- o("div", {
2998
+ a("div", Js, v(o.label), 1),
2999
+ a("div", {
2917
3000
  class: O([
2918
3001
  "wm-art__fieldValue",
2919
- { "wm-art__fieldValue--multi": a.multiline }
3002
+ { "wm-art__fieldValue--multi": o.multiline }
2920
3003
  ])
2921
3004
  }, [
2922
- s.isPriority(a.label) ? (c(), u("svg", {
3005
+ s.isPriority(o.label) ? (c(), d("svg", {
2923
3006
  key: 0,
2924
3007
  class: "wm-tk__prio",
2925
- "data-level": s.priorityLevel(a.value),
3008
+ "data-level": s.priorityLevel(o.value),
2926
3009
  width: "12",
2927
3010
  height: "12",
2928
3011
  viewBox: "0 0 12 12",
2929
3012
  "aria-hidden": "true"
2930
3013
  }, [...t[2] || (t[2] = [
2931
- o("rect", {
3014
+ a("rect", {
2932
3015
  x: "1",
2933
3016
  y: "8",
2934
3017
  width: "2",
2935
3018
  height: "3",
2936
3019
  rx: "0.5"
2937
3020
  }, null, -1),
2938
- o("rect", {
3021
+ a("rect", {
2939
3022
  x: "5",
2940
3023
  y: "5",
2941
3024
  width: "2",
2942
3025
  height: "6",
2943
3026
  rx: "0.5"
2944
3027
  }, null, -1),
2945
- o("rect", {
3028
+ a("rect", {
2946
3029
  x: "9",
2947
3030
  y: "2",
2948
3031
  width: "2",
2949
3032
  height: "9",
2950
3033
  rx: "0.5"
2951
3034
  }, null, -1)
2952
- ])], 8, $s)) : s.isDate(a.label) ? (c(), u("svg", Ws, [...t[3] || (t[3] = [
2953
- o("rect", {
3035
+ ])], 8, Qs)) : s.isDate(o.label) ? (c(), d("svg", Xs, [...t[3] || (t[3] = [
3036
+ a("rect", {
2954
3037
  x: "3",
2955
3038
  y: "4",
2956
3039
  width: "18",
2957
3040
  height: "18",
2958
3041
  rx: "2"
2959
3042
  }, null, -1),
2960
- o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3043
+ a("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
2961
3044
  ])])) : y("", !0),
2962
- o("span", null, v(a.value), 1)
3045
+ a("span", null, v(o.value), 1)
2963
3046
  ], 2)
2964
3047
  ]))), 128))
2965
3048
  ])) : y("", !0),
2966
- n.data.created_at ? (c(), u("div", Gs, [
2967
- t[4] || (t[4] = o("svg", {
3049
+ n.data.created_at ? (c(), d("div", Zs, [
3050
+ t[4] || (t[4] = a("svg", {
2968
3051
  width: "11",
2969
3052
  height: "11",
2970
3053
  viewBox: "0 0 24 24",
@@ -2975,24 +3058,24 @@ function Ys(e, t, n, i, r, s) {
2975
3058
  "stroke-linejoin": "round",
2976
3059
  "aria-hidden": "true"
2977
3060
  }, [
2978
- o("rect", {
3061
+ a("rect", {
2979
3062
  x: "3",
2980
3063
  y: "4",
2981
3064
  width: "18",
2982
3065
  height: "18",
2983
3066
  rx: "2"
2984
3067
  }),
2985
- o("path", { d: "M16 2v4M8 2v4M3 10h18" })
3068
+ a("path", { d: "M16 2v4M8 2v4M3 10h18" })
2986
3069
  ], -1)),
2987
- o("span", null, v(s.formattedDate), 1)
3070
+ a("span", null, v(s.formattedDate), 1)
2988
3071
  ])) : y("", !0)
2989
3072
  ]);
2990
3073
  }
2991
- const Js = /* @__PURE__ */ N(Us, [["render", Ys], ["__scopeId", "data-v-5f30c914"]]), Qs = {
2992
- form_response: ks,
2993
- info_card: Ns,
2994
- ticket: Js
2995
- }, Xs = {
3074
+ const tr = /* @__PURE__ */ N(zs, [["render", er], ["__scopeId", "data-v-5f30c914"]]), nr = {
3075
+ form_response: Ts,
3076
+ info_card: js,
3077
+ ticket: tr
3078
+ }, sr = {
2996
3079
  name: "WmArtifactRenderer",
2997
3080
  props: {
2998
3081
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -3003,17 +3086,17 @@ const Js = /* @__PURE__ */ N(Us, [["render", Ys], ["__scopeId", "data-v-5f30c914
3003
3086
  component() {
3004
3087
  var t;
3005
3088
  const e = (t = this.artifact) == null ? void 0 : t.kind;
3006
- return e && Qs[e] || null;
3089
+ return e && nr[e] || null;
3007
3090
  }
3008
3091
  }
3009
3092
  };
3010
- function Zs(e, t, n, i, r, s) {
3093
+ function rr(e, t, n, i, r, s) {
3011
3094
  return s.component ? (c(), P(pe(s.component), {
3012
3095
  key: 0,
3013
3096
  data: n.artifact.data
3014
3097
  }, null, 8, ["data"])) : y("", !0);
3015
3098
  }
3016
- const er = /* @__PURE__ */ N(Xs, [["render", Zs]]), tr = {
3099
+ const ir = /* @__PURE__ */ N(sr, [["render", rr]]), ar = {
3017
3100
  name: "WmAttachmentPreview",
3018
3101
  inject: {
3019
3102
  signAttachmentFn: { default: null },
@@ -3081,51 +3164,51 @@ const er = /* @__PURE__ */ N(Xs, [["render", Zs]]), tr = {
3081
3164
  this.safeHref === "#" && e.preventDefault();
3082
3165
  }
3083
3166
  }
3084
- }, nr = ["href"], sr = ["src", "alt"], rr = ["src"], ir = ["src"], ar = ["href", "download"], or = { class: "wm-att__main" }, lr = { class: "wm-att__name" }, cr = {
3167
+ }, or = ["href"], lr = ["src", "alt"], cr = ["src"], dr = ["src"], ur = ["href", "download"], hr = { class: "wm-att__main" }, mr = { class: "wm-att__name" }, fr = {
3085
3168
  key: 0,
3086
3169
  class: "wm-att__meta"
3087
- }, dr = {
3170
+ }, _r = {
3088
3171
  key: 0,
3089
3172
  class: "wm-att__spin",
3090
3173
  "aria-hidden": "true"
3091
3174
  };
3092
- function ur(e, t, n, i, r, s) {
3093
- return c(), u("div", {
3175
+ function gr(e, t, n, i, r, s) {
3176
+ return c(), d("div", {
3094
3177
  class: O(["wm-att", ["wm-att--" + (s.kind || "file")]])
3095
3178
  }, [
3096
- s.kind === "image" && r.url ? (c(), u("a", {
3179
+ s.kind === "image" && r.url ? (c(), d("a", {
3097
3180
  key: 0,
3098
3181
  href: s.safeHref,
3099
3182
  target: "_blank",
3100
3183
  rel: "noopener",
3101
3184
  class: "wm-att__imgWrap"
3102
3185
  }, [
3103
- o("img", {
3186
+ a("img", {
3104
3187
  src: r.url,
3105
3188
  alt: s.displayName,
3106
3189
  loading: "lazy"
3107
- }, null, 8, sr)
3108
- ], 8, nr)) : s.kind === "audio" && r.url ? (c(), u("audio", {
3190
+ }, null, 8, lr)
3191
+ ], 8, or)) : s.kind === "audio" && r.url ? (c(), d("audio", {
3109
3192
  key: 1,
3110
3193
  src: r.url,
3111
3194
  controls: "",
3112
3195
  preload: "metadata"
3113
- }, null, 8, rr)) : s.kind === "video" && r.url ? (c(), u("video", {
3196
+ }, null, 8, cr)) : s.kind === "video" && r.url ? (c(), d("video", {
3114
3197
  key: 2,
3115
3198
  src: r.url,
3116
3199
  controls: "",
3117
3200
  preload: "metadata"
3118
- }, null, 8, ir)) : (c(), u("a", {
3201
+ }, null, 8, dr)) : (c(), d("a", {
3119
3202
  key: 3,
3120
3203
  class: "wm-att__file",
3121
3204
  href: s.safeHref,
3122
3205
  download: s.displayName,
3123
3206
  target: "_blank",
3124
3207
  rel: "noopener",
3125
- onClick: t[0] || (t[0] = (...a) => s.onFileClick && s.onFileClick(...a))
3208
+ onClick: t[0] || (t[0] = (...o) => s.onFileClick && s.onFileClick(...o))
3126
3209
  }, [
3127
- t[1] || (t[1] = o("span", { class: "wm-att__icon" }, [
3128
- o("svg", {
3210
+ t[1] || (t[1] = a("span", { class: "wm-att__icon" }, [
3211
+ a("svg", {
3129
3212
  width: "14",
3130
3213
  height: "14",
3131
3214
  viewBox: "0 0 24 24",
@@ -3136,19 +3219,19 @@ function ur(e, t, n, i, r, s) {
3136
3219
  "stroke-linejoin": "round",
3137
3220
  "aria-hidden": "true"
3138
3221
  }, [
3139
- o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3140
- o("path", { d: "M14 2v6h6" })
3222
+ a("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
3223
+ a("path", { d: "M14 2v6h6" })
3141
3224
  ])
3142
3225
  ], -1)),
3143
- o("span", or, [
3144
- o("span", lr, v(s.displayName), 1),
3145
- s.sizeLabel ? (c(), u("span", cr, v(s.sizeLabel), 1)) : y("", !0)
3226
+ a("span", hr, [
3227
+ a("span", mr, v(s.displayName), 1),
3228
+ s.sizeLabel ? (c(), d("span", fr, v(s.sizeLabel), 1)) : y("", !0)
3146
3229
  ]),
3147
- r.loading ? (c(), u("span", dr)) : y("", !0)
3148
- ], 8, ar))
3230
+ r.loading ? (c(), d("span", _r)) : y("", !0)
3231
+ ], 8, ur))
3149
3232
  ], 2);
3150
3233
  }
3151
- const mr = /* @__PURE__ */ N(tr, [["render", ur], ["__scopeId", "data-v-0c877a62"]]), hr = {
3234
+ const pr = /* @__PURE__ */ N(ar, [["render", gr], ["__scopeId", "data-v-0c877a62"]]), vr = {
3152
3235
  name: "WmBubble",
3153
3236
  props: {
3154
3237
  role: { type: String, default: "ai" },
@@ -3157,48 +3240,48 @@ const mr = /* @__PURE__ */ N(tr, [["render", ur], ["__scopeId", "data-v-0c877a62
3157
3240
  },
3158
3241
  computed: {
3159
3242
  rendered() {
3160
- return mn(this.text);
3243
+ return hn(this.text);
3161
3244
  }
3162
3245
  }
3163
- }, fr = ["innerHTML"];
3164
- function _r(e, t, n, i, r, s) {
3165
- return c(), u("div", {
3246
+ }, yr = ["innerHTML"];
3247
+ function wr(e, t, n, i, r, s) {
3248
+ return c(), d("div", {
3166
3249
  class: O(["wm-bubble", "wm-bubble--" + n.role])
3167
3250
  }, [
3168
3251
  He(e.$slots, "default", {}, () => [
3169
- o("span", { innerHTML: s.rendered }, null, 8, fr)
3252
+ a("span", { innerHTML: s.rendered }, null, 8, yr)
3170
3253
  ], !0)
3171
3254
  ], 2);
3172
3255
  }
3173
- const gr = /* @__PURE__ */ N(hr, [["render", _r], ["__scopeId", "data-v-7ab13147"]]), pr = { name: "WmTyping" }, vr = { class: "wm-typing" };
3174
- function yr(e, t, n, i, r, s) {
3175
- return c(), u("div", vr, [...t[0] || (t[0] = [
3176
- o("span", { style: { "animation-delay": "0s" } }, null, -1),
3177
- o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3178
- o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3256
+ const br = /* @__PURE__ */ N(vr, [["render", wr], ["__scopeId", "data-v-7ab13147"]]), kr = { name: "WmTyping" }, Cr = { class: "wm-typing" };
3257
+ function Ar(e, t, n, i, r, s) {
3258
+ return c(), d("div", Cr, [...t[0] || (t[0] = [
3259
+ a("span", { style: { "animation-delay": "0s" } }, null, -1),
3260
+ a("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3261
+ a("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3179
3262
  ])]);
3180
3263
  }
3181
- const wr = /* @__PURE__ */ N(pr, [["render", yr], ["__scopeId", "data-v-df2447fd"]]);
3264
+ const Sr = /* @__PURE__ */ N(kr, [["render", Ar], ["__scopeId", "data-v-df2447fd"]]);
3182
3265
  function Q(e) {
3183
3266
  return e ? e.client_msg_id || e.id : "";
3184
3267
  }
3185
- const br = {
3268
+ const Mr = {
3186
3269
  transferred_to_human: "system.transferredToHuman",
3187
3270
  assigned: "system.assigned",
3188
3271
  unassigned: "system.unassigned",
3189
3272
  resolved: "system.resolved",
3190
3273
  reopened: "system.reopened",
3191
3274
  idle: "system.idle"
3192
- }, kr = 80, Cr = 200, Ar = {
3275
+ }, Tr = 80, xr = 200, Or = {
3193
3276
  name: "WmMessageList",
3194
3277
  components: {
3195
3278
  AIAvatar: le,
3196
3279
  HumanAvatar: Ce,
3197
- Bubble: gr,
3198
- Typing: wr,
3199
- ActionResult: hs,
3200
- AttachmentPreview: mr,
3201
- ArtifactRenderer: er
3280
+ Bubble: br,
3281
+ Typing: Sr,
3282
+ ActionResult: vs,
3283
+ AttachmentPreview: pr,
3284
+ ArtifactRenderer: ir
3202
3285
  },
3203
3286
  inject: {
3204
3287
  // Translator + resolved-language getter shared by the Messenger
@@ -3269,59 +3352,59 @@ const br = {
3269
3352
  groups() {
3270
3353
  var n, i, r, s;
3271
3354
  const e = [];
3272
- for (const a of this.messages) {
3273
- const l = this.roleOf(a);
3355
+ for (const o of this.messages) {
3356
+ const l = this.roleOf(o);
3274
3357
  if (l === "system") {
3275
- if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3358
+ if (((n = o == null ? void 0 : o.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3276
3359
  const w = e[e.length - 1];
3277
- w && w.role === "ai" ? w.messages.push(a) : e.push({
3278
- key: `g-${Q(a)}`,
3360
+ w && w.role === "ai" ? w.messages.push(o) : e.push({
3361
+ key: `g-${Q(o)}`,
3279
3362
  role: "ai",
3280
3363
  agentName: "",
3281
3364
  agentAvatarUrl: null,
3282
- messages: [a],
3365
+ messages: [o],
3283
3366
  items: []
3284
3367
  });
3285
3368
  continue;
3286
3369
  }
3287
3370
  e.push({
3288
- key: `sys-${Q(a)}`,
3371
+ key: `sys-${Q(o)}`,
3289
3372
  role: l,
3290
- messages: [a],
3373
+ messages: [o],
3291
3374
  items: [],
3292
- systemLabel: this.systemLabel(a)
3375
+ systemLabel: this.systemLabel(o)
3293
3376
  });
3294
3377
  continue;
3295
3378
  }
3296
3379
  const p = e[e.length - 1];
3297
- p && p.role === l && (l === "ai" || p.agentName === (((i = a == null ? void 0 : a.author) == null ? void 0 : i.name) || "")) ? p.messages.push(a) : e.push({
3298
- key: `g-${Q(a)}`,
3380
+ p && p.role === l && (l === "ai" || p.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? p.messages.push(o) : e.push({
3381
+ key: `g-${Q(o)}`,
3299
3382
  role: l,
3300
- agentName: ((r = a == null ? void 0 : a.author) == null ? void 0 : r.name) || "",
3301
- agentAvatarUrl: ((s = a == null ? void 0 : a.author) == null ? void 0 : s.avatar_url) || null,
3302
- messages: [a],
3383
+ agentName: ((r = o == null ? void 0 : o.author) == null ? void 0 : r.name) || "",
3384
+ agentAvatarUrl: ((s = o == null ? void 0 : o.author) == null ? void 0 : s.avatar_url) || null,
3385
+ messages: [o],
3303
3386
  items: []
3304
3387
  });
3305
3388
  }
3306
- for (const a of e) {
3307
- if (a.role === "system") continue;
3389
+ for (const o of e) {
3390
+ if (o.role === "system") continue;
3308
3391
  const l = [];
3309
- for (const p of a.messages)
3392
+ for (const p of o.messages)
3310
3393
  for (const k of this.itemsOf(p)) l.push(k);
3311
- a.items = l;
3394
+ o.items = l;
3312
3395
  }
3313
3396
  const t = [];
3314
- for (const a of e) {
3315
- if (a.role !== "system" && !a.items.length) continue;
3397
+ for (const o of e) {
3398
+ if (o.role !== "system" && !o.items.length) continue;
3316
3399
  const l = t[t.length - 1];
3317
- if (l && l.role !== "system" && l.role === a.role && (a.role === "ai" || l.agentName === a.agentName)) {
3318
- l.messages.push(...a.messages), l.items.push(...a.items);
3400
+ if (l && l.role !== "system" && l.role === o.role && (o.role === "ai" || l.agentName === o.agentName)) {
3401
+ l.messages.push(...o.messages), l.items.push(...o.items);
3319
3402
  continue;
3320
3403
  }
3321
- t.push(a);
3404
+ t.push(o);
3322
3405
  }
3323
- for (const a of t)
3324
- a.role !== "system" && (a.key = this.stableGroupKey(a.messages));
3406
+ for (const o of t)
3407
+ o.role !== "system" && (o.key = this.stableGroupKey(o.messages));
3325
3408
  return t;
3326
3409
  },
3327
3410
  // Key of the first non-user group that starts after the unread
@@ -3388,11 +3471,11 @@ const br = {
3388
3471
  return `g-${n}`;
3389
3472
  },
3390
3473
  isAtBottom(e) {
3391
- return e.scrollHeight - e.scrollTop - e.clientHeight <= kr;
3474
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= Tr;
3392
3475
  },
3393
3476
  onScroll() {
3394
3477
  const e = this.$refs.scrollEl;
3395
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Cr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3478
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= xr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3396
3479
  },
3397
3480
  // Capture pre-patch scroll state and restore it on the next tick.
3398
3481
  //
@@ -3425,12 +3508,12 @@ const br = {
3425
3508
  if (!t && !n) {
3426
3509
  const s = this.pickAnchor(e);
3427
3510
  if (s != null && s.rowKey) {
3428
- const a = this.findRowByKey(e, s.rowKey);
3429
- if (a) {
3511
+ const o = this.findRowByKey(e, s.rowKey);
3512
+ if (o) {
3430
3513
  const l = e.getBoundingClientRect().top;
3431
3514
  i = {
3432
3515
  rowKey: s.rowKey,
3433
- relY: a.getBoundingClientRect().top - l
3516
+ relY: o.getBoundingClientRect().top - l
3434
3517
  };
3435
3518
  }
3436
3519
  }
@@ -3443,9 +3526,9 @@ const br = {
3443
3526
  }
3444
3527
  if (!r.anchor) return;
3445
3528
  const s = () => {
3446
- const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
3529
+ const o = r.anchor, l = this.findRowByKey(e, o.rowKey);
3447
3530
  if (!l) return;
3448
- const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3531
+ const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - o.relY;
3449
3532
  Math.abs(k) > 0.5 && (e.scrollTop += k);
3450
3533
  };
3451
3534
  s(), requestAnimationFrame(() => {
@@ -3593,9 +3676,9 @@ const br = {
3593
3676
  // doit garder son arrondi.
3594
3677
  cornersFor(e, t) {
3595
3678
  var Z, ee, te;
3596
- const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, S = (V, ne, J) => V != null && T != null ? V + H >= T : ne === J || ne === "card" && J === "bubble";
3597
- let U = l, I = l, z = l, Y = l;
3598
- return a ? (k && (I = p), (w || !s) && (z = p), k && S(B, k, i == null ? void 0 : i.top) && (U = p), w && S(A, w, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (U = p), (w || !s) && (Y = p), k && S(B, k, i == null ? void 0 : i.top) && (I = p), w && S(A, w, i == null ? void 0 : i.bottom) && (z = p)), { tl: U, tr: I, br: z, bl: Y };
3679
+ const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, o = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, S = (K, ne, J) => K != null && T != null ? K + z >= T : ne === J || ne === "card" && J === "bubble";
3680
+ let U = l, I = l, q = l, Y = l;
3681
+ return o ? (k && (I = p), (w || !s) && (q = p), k && S(B, k, i == null ? void 0 : i.top) && (U = p), w && S(A, w, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (U = p), (w || !s) && (Y = p), k && S(B, k, i == null ? void 0 : i.top) && (I = p), w && S(A, w, i == null ? void 0 : i.bottom) && (q = p)), { tl: U, tr: I, br: q, bl: Y };
3599
3682
  },
3600
3683
  // Inline style emitting the four corner CSS variables. Set on
3601
3684
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3636,20 +3719,20 @@ const br = {
3636
3719
  for (const s of e.querySelectorAll(
3637
3720
  ".wm-list__row[data-row-key]"
3638
3721
  )) {
3639
- const a = s.dataset.rowKey;
3640
- if (!a) continue;
3722
+ const o = s.dataset.rowKey;
3723
+ if (!o) continue;
3641
3724
  const l = s.querySelector(
3642
3725
  ".wm-bubble, .wm-result, .wm-art, .wm-list__body"
3643
3726
  );
3644
3727
  if (!l) continue;
3645
3728
  const p = l.getBoundingClientRect().width;
3646
- p > 0 && (t[a] = p);
3729
+ p > 0 && (t[o] = p);
3647
3730
  }
3648
3731
  const n = this.widthByKey, i = Object.keys(n), r = Object.keys(t);
3649
3732
  if (i.length === r.length) {
3650
3733
  let s = !0;
3651
- for (const a of r)
3652
- if (Math.abs((n[a] ?? 0) - t[a]) > 0.5) {
3734
+ for (const o of r)
3735
+ if (Math.abs((n[o] ?? 0) - t[o]) > 0.5) {
3653
3736
  s = !1;
3654
3737
  break;
3655
3738
  }
@@ -3719,9 +3802,9 @@ const br = {
3719
3802
  return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
3720
3803
  },
3721
3804
  actionDetail(e) {
3722
- var n, i, r, s, a, l;
3805
+ var n, i, r, s, o, l;
3723
3806
  const t = e == null ? void 0 : e.payload;
3724
- return t ? t.state === "success" ? ((n = t.success) == null ? void 0 : n.summary) || ((r = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : r.description) || "" : t.state === "rejected" ? ((s = t.rejected) == null ? void 0 : s.reason) || this.t("action.rejectedByUser") : t.state === "failure" && (((a = t.failure) == null ? void 0 : a.summary) || ((l = t.failure) == null ? void 0 : l.error)) || "" : "";
3807
+ return t ? t.state === "success" ? ((n = t.success) == null ? void 0 : n.summary) || ((r = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : r.description) || "" : t.state === "rejected" ? ((s = t.rejected) == null ? void 0 : s.reason) || this.t("action.rejectedByUser") : t.state === "failure" && (((o = t.failure) == null ? void 0 : o.summary) || ((l = t.failure) == null ? void 0 : l.error)) || "" : "";
3725
3808
  },
3726
3809
  actionArtifact(e) {
3727
3810
  var n, i;
@@ -3729,8 +3812,8 @@ const br = {
3729
3812
  return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
3730
3813
  },
3731
3814
  systemLabel(e) {
3732
- var r, s, a;
3733
- const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = br[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
3815
+ var r, s, o;
3816
+ const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = Mr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((o = e == null ? void 0 : e.author) == null ? void 0 : o.name) || this.t("messageList.anAgent");
3734
3817
  return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
3735
3818
  },
3736
3819
  scrollToBottom() {
@@ -3745,80 +3828,80 @@ const br = {
3745
3828
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
3746
3829
  }
3747
3830
  }
3748
- }, Sr = { class: "wm-list__wrap" }, Mr = {
3831
+ }, Ir = { class: "wm-list__wrap" }, Lr = {
3749
3832
  key: 0,
3750
3833
  class: "wm-list__loadMore",
3751
3834
  role: "status",
3752
3835
  "aria-live": "polite"
3753
- }, Tr = { class: "wm-list__loadMore-lbl" }, xr = {
3836
+ }, Er = { class: "wm-list__loadMore-lbl" }, Br = {
3754
3837
  key: 1,
3755
3838
  class: "wm-list__historyEnd"
3756
- }, Or = {
3839
+ }, Rr = {
3757
3840
  key: 2,
3758
3841
  class: "wm-list__sep"
3759
- }, Ir = { class: "wm-list__sep-label" }, Lr = {
3842
+ }, Nr = { class: "wm-list__sep-label" }, Pr = {
3760
3843
  key: 0,
3761
3844
  class: "wm-list__sep wm-list__sep--unread"
3762
- }, Er = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Br = {
3845
+ }, Ur = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Fr = {
3763
3846
  key: 0,
3764
3847
  class: "wm-list__sysep"
3765
- }, Rr = { class: "wm-list__sysep-label" }, Nr = ["data-row-key", "onPointerdown"], Pr = {
3848
+ }, Dr = { class: "wm-list__sysep-label" }, jr = ["data-row-key", "onPointerdown"], Hr = {
3766
3849
  key: 0,
3767
3850
  class: "wm-list__avatarSlot"
3768
- }, Ur = {
3851
+ }, zr = {
3769
3852
  key: 5,
3770
3853
  class: "wm-list__body"
3771
- }, Fr = { key: 0 }, Dr = {
3854
+ }, qr = { key: 0 }, Vr = {
3772
3855
  key: 1,
3773
3856
  "aria-hidden": "true"
3774
- }, jr = { key: 2 }, Hr = { key: 0 }, zr = {
3857
+ }, Kr = { key: 2 }, $r = { key: 0 }, Wr = {
3775
3858
  key: 1,
3776
3859
  "aria-hidden": "true"
3777
- }, qr = { key: 2 }, Kr = {
3860
+ }, Gr = { key: 2 }, Yr = {
3778
3861
  key: 3,
3779
3862
  class: "wm-list__row wm-list__row--ai fade-up"
3780
- }, Vr = { class: "wm-list__avatarSlot" }, $r = ["aria-label", "title"];
3781
- function Wr(e, t, n, i, r, s) {
3782
- const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), B = R("Typing");
3783
- return c(), u("div", Sr, [
3784
- o("div", {
3863
+ }, Jr = { class: "wm-list__avatarSlot" }, Qr = ["aria-label", "title"];
3864
+ function Xr(e, t, n, i, r, s) {
3865
+ const o = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), B = R("Typing");
3866
+ return c(), d("div", Ir, [
3867
+ a("div", {
3785
3868
  ref: "scrollEl",
3786
3869
  class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
3787
3870
  onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
3788
3871
  }, [
3789
- n.loadingMore ? (c(), u("div", Mr, [
3790
- t[6] || (t[6] = o("span", {
3872
+ n.loadingMore ? (c(), d("div", Lr, [
3873
+ t[6] || (t[6] = a("span", {
3791
3874
  class: "wm-list__loadMore-spinner",
3792
3875
  "aria-hidden": "true"
3793
3876
  }, null, -1)),
3794
- o("span", Tr, v(s.t("messageList.loadingHistory")), 1)
3795
- ])) : s.historyExhausted ? (c(), u("div", xr, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
3796
- n.dateLabel ? (c(), u("div", Or, [
3797
- t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
3798
- o("span", Ir, v(n.dateLabel), 1),
3799
- t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
3877
+ a("span", Er, v(s.t("messageList.loadingHistory")), 1)
3878
+ ])) : s.historyExhausted ? (c(), d("div", Br, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
3879
+ n.dateLabel ? (c(), d("div", Rr, [
3880
+ t[7] || (t[7] = a("div", { class: "wm-list__line" }, null, -1)),
3881
+ a("span", Nr, v(n.dateLabel), 1),
3882
+ t[8] || (t[8] = a("div", { class: "wm-list__line" }, null, -1))
3800
3883
  ])) : y("", !0),
3801
- (c(!0), u(E, null, F(s.groups, (A, H) => (c(), u(E, {
3884
+ (c(!0), d(E, null, F(s.groups, (A, z) => (c(), d(E, {
3802
3885
  key: A.key
3803
3886
  }, [
3804
- A.key === s.unreadGroupKey ? (c(), u("div", Lr, [
3805
- t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3806
- o("span", Er, v(s.t("messageList.unread")), 1),
3807
- t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3887
+ A.key === s.unreadGroupKey ? (c(), d("div", Pr, [
3888
+ t[9] || (t[9] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
3889
+ a("span", Ur, v(s.t("messageList.unread")), 1),
3890
+ t[10] || (t[10] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
3808
3891
  ])) : y("", !0),
3809
- A.role === "system" || A.items.length ? (c(), u("div", {
3892
+ A.role === "system" || A.items.length ? (c(), d("div", {
3810
3893
  key: 1,
3811
3894
  class: O(["wm-list__group", "wm-list__group--" + A.role])
3812
3895
  }, [
3813
- A.role === "system" ? (c(), u("div", Br, [
3814
- t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3815
- o("span", Rr, v(A.systemLabel), 1),
3816
- t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3817
- ])) : (c(), u(E, { key: 1 }, [
3818
- (c(!0), u(E, null, F(A.items, (S, U) => (c(), u(E, {
3896
+ A.role === "system" ? (c(), d("div", Fr, [
3897
+ t[11] || (t[11] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
3898
+ a("span", Dr, v(A.systemLabel), 1),
3899
+ t[12] || (t[12] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
3900
+ ])) : (c(), d(E, { key: 1 }, [
3901
+ (c(!0), d(E, null, F(A.items, (S, U) => (c(), d(E, {
3819
3902
  key: `${s.messageKey(S.message)}-${S.partKey}`
3820
3903
  }, [
3821
- o("div", {
3904
+ a("div", {
3822
3905
  "data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
3823
3906
  class: O(["wm-list__row fade-up", [
3824
3907
  "wm-list__row--" + A.role,
@@ -3827,7 +3910,7 @@ function Wr(e, t, n, i, r, s) {
3827
3910
  "is-failed": S.message._failed
3828
3911
  }
3829
3912
  ]]),
3830
- style: q(s.cornersStyle(A, U)),
3913
+ style: H(s.cornersStyle(A, U)),
3831
3914
  onPointerdown: (I) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
3832
3915
  onPointerup: t[0] || (t[0] = (I) => s.onPressEnd()),
3833
3916
  onPointercancel: t[1] || (t[1] = (I) => s.onPressEnd()),
@@ -3835,9 +3918,9 @@ function Wr(e, t, n, i, r, s) {
3835
3918
  onContextmenu: t[3] || (t[3] = G(() => {
3836
3919
  }, ["prevent"]))
3837
3920
  }, [
3838
- A.role !== "user" ? (c(), u("div", Pr, [
3839
- U === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
3840
- A.role === "ai" ? (c(), P(a, {
3921
+ A.role !== "user" ? (c(), d("div", Hr, [
3922
+ U === A.items.length - 1 ? (c(), d(E, { key: 0 }, [
3923
+ A.role === "ai" ? (c(), P(o, {
3841
3924
  key: 0,
3842
3925
  size: 26,
3843
3926
  tail: !0,
@@ -3868,62 +3951,62 @@ function Wr(e, t, n, i, r, s) {
3868
3951
  }, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), P(k, {
3869
3952
  key: 4,
3870
3953
  artifact: s.artifactOf(S.message)
3871
- }, null, 8, ["artifact"])) : (c(), u("div", Ur, [
3954
+ }, null, 8, ["artifact"])) : (c(), d("div", zr, [
3872
3955
  S.message.text_md ? (c(), P(w, {
3873
3956
  key: 0,
3874
3957
  role: A.role,
3875
3958
  text: S.message.text_md
3876
3959
  }, null, 8, ["role", "text"])) : y("", !0),
3877
- s.attachmentsOf(S.message).length ? (c(), u("div", {
3960
+ s.attachmentsOf(S.message).length ? (c(), d("div", {
3878
3961
  key: 1,
3879
3962
  class: O(["wm-list__atts", {
3880
3963
  "wm-list__atts--align-end": A.role === "user"
3881
3964
  }])
3882
3965
  }, [
3883
- (c(!0), u(E, null, F(s.attachmentsOf(
3966
+ (c(!0), d(E, null, F(s.attachmentsOf(
3884
3967
  S.message
3885
- ), (I, z) => (c(), P(T, {
3886
- key: `${s.messageKey(S.message)}-att-${z}`,
3968
+ ), (I, q) => (c(), P(T, {
3969
+ key: `${s.messageKey(S.message)}-att-${q}`,
3887
3970
  attachment: I
3888
3971
  }, null, 8, ["attachment"]))), 128))
3889
3972
  ], 2)) : y("", !0)
3890
3973
  ]))
3891
- ], 46, Nr),
3892
- U < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
3974
+ ], 46, jr),
3975
+ U < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), d("div", {
3893
3976
  key: 0,
3894
3977
  class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
3895
3978
  }, [
3896
- A.role !== "user" ? (c(), u("span", Fr, v(s.roleLabel(A)), 1)) : y("", !0),
3897
- A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", Dr, "·")) : y("", !0),
3898
- s.timeOf(S.message) ? (c(), u("span", jr, v(s.timeOf(S.message)), 1)) : y("", !0)
3979
+ A.role !== "user" ? (c(), d("span", qr, v(s.roleLabel(A)), 1)) : y("", !0),
3980
+ A.role !== "user" && s.timeOf(S.message) ? (c(), d("span", Vr, "·")) : y("", !0),
3981
+ s.timeOf(S.message) ? (c(), d("span", Kr, v(s.timeOf(S.message)), 1)) : y("", !0)
3899
3982
  ], 2)) : y("", !0)
3900
3983
  ], 64))), 128)),
3901
- (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
3984
+ (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), d("div", {
3902
3985
  key: 0,
3903
3986
  class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
3904
3987
  }, [
3905
- A.role !== "user" ? (c(), u("span", Hr, v(s.roleLabel(A)), 1)) : y("", !0),
3906
- A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", zr, "·")) : y("", !0),
3907
- s.lastTimeOf(A) ? (c(), u("span", qr, v(s.lastTimeOf(A)), 1)) : y("", !0)
3988
+ A.role !== "user" ? (c(), d("span", $r, v(s.roleLabel(A)), 1)) : y("", !0),
3989
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", Wr, "·")) : y("", !0),
3990
+ s.lastTimeOf(A) ? (c(), d("span", Gr, v(s.lastTimeOf(A)), 1)) : y("", !0)
3908
3991
  ], 2)) : y("", !0)
3909
3992
  ], 64))
3910
3993
  ], 2)) : y("", !0)
3911
3994
  ], 64))), 128)),
3912
- n.streamingActive ? (c(), u("div", Kr, [
3913
- o("div", Vr, [
3914
- K(a, {
3995
+ n.streamingActive ? (c(), d("div", Yr, [
3996
+ a("div", Jr, [
3997
+ V(o, {
3915
3998
  size: 26,
3916
3999
  tail: !0,
3917
4000
  name: n.aiAgentName,
3918
4001
  "image-url": n.aiAgentAvatarUrl
3919
4002
  }, null, 8, ["name", "image-url"])
3920
4003
  ]),
3921
- K(B)
4004
+ V(B)
3922
4005
  ])) : y("", !0)
3923
4006
  ], 34),
3924
- K(Re, { name: "wm-scrollDown" }, {
4007
+ V(Re, { name: "wm-scrollDown" }, {
3925
4008
  default: Ne(() => [
3926
- r.showScrollDown ? (c(), u("button", {
4009
+ r.showScrollDown ? (c(), d("button", {
3927
4010
  key: 0,
3928
4011
  type: "button",
3929
4012
  class: "wm-list__scrollDown",
@@ -3931,7 +4014,7 @@ function Wr(e, t, n, i, r, s) {
3931
4014
  title: s.t("messageList.scrollToBottom"),
3932
4015
  onClick: t[5] || (t[5] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
3933
4016
  }, [...t[13] || (t[13] = [
3934
- o("svg", {
4017
+ a("svg", {
3935
4018
  width: "14",
3936
4019
  height: "14",
3937
4020
  viewBox: "0 0 24 24",
@@ -3942,16 +4025,16 @@ function Wr(e, t, n, i, r, s) {
3942
4025
  "stroke-linejoin": "round",
3943
4026
  "aria-hidden": "true"
3944
4027
  }, [
3945
- o("path", { d: "M6 9l6 6 6-6" })
4028
+ a("path", { d: "M6 9l6 6 6-6" })
3946
4029
  ], -1)
3947
- ])], 8, $r)) : y("", !0)
4030
+ ])], 8, Qr)) : y("", !0)
3948
4031
  ]),
3949
4032
  _: 1
3950
4033
  })
3951
4034
  ]);
3952
4035
  }
3953
- const Gr = /* @__PURE__ */ N(Ar, [["render", Wr], ["__scopeId", "data-v-9ddbd0e3"]]), me = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Ae = typeof window < "u" && typeof window.MediaRecorder < "u";
3954
- function Yr() {
4036
+ const Zr = /* @__PURE__ */ N(Or, [["render", Xr], ["__scopeId", "data-v-9ddbd0e3"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Ae = typeof window < "u" && typeof window.MediaRecorder < "u";
4037
+ function ei() {
3955
4038
  return Ae && [
3956
4039
  "video/webm;codecs=vp9,opus",
3957
4040
  "video/webm;codecs=vp8,opus",
@@ -3971,11 +4054,11 @@ function Fe({ audio: e }) {
3971
4054
  systemAudio: e ? "include" : "exclude"
3972
4055
  };
3973
4056
  }
3974
- function so(e) {
4057
+ function lo(e) {
3975
4058
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
3976
4059
  }
3977
- async function Jr() {
3978
- if (!me) return null;
4060
+ async function ti() {
4061
+ if (!he) return null;
3979
4062
  let e;
3980
4063
  try {
3981
4064
  e = await navigator.mediaDevices.getDisplayMedia(
@@ -3985,7 +4068,7 @@ async function Jr() {
3985
4068
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
3986
4069
  }
3987
4070
  try {
3988
- return await Qr(e);
4071
+ return await ni(e);
3989
4072
  } catch (t) {
3990
4073
  return console.error("[media] screenshot capture", t), null;
3991
4074
  } finally {
@@ -3994,7 +4077,7 @@ async function Jr() {
3994
4077
  });
3995
4078
  }
3996
4079
  }
3997
- async function Qr(e) {
4080
+ async function ni(e) {
3998
4081
  const t = document.createElement("video");
3999
4082
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4000
4083
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -4004,12 +4087,12 @@ async function Qr(e) {
4004
4087
  (k) => k ? l(k) : p(new Error("toBlob failed")),
4005
4088
  "image/png"
4006
4089
  );
4007
- }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4008
- return new File([s], `capture-${a}.png`, { type: "image/png" });
4090
+ }), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4091
+ return new File([s], `capture-${o}.png`, { type: "image/png" });
4009
4092
  }
4010
- async function Xr(e = {}) {
4093
+ async function si(e = {}) {
4011
4094
  var k;
4012
- if (!me || !Ae) return null;
4095
+ if (!he || !Ae) return null;
4013
4096
  let t;
4014
4097
  try {
4015
4098
  t = await navigator.mediaDevices.getDisplayMedia(
@@ -4018,7 +4101,7 @@ async function Xr(e = {}) {
4018
4101
  } catch (w) {
4019
4102
  return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
4020
4103
  }
4021
- const n = Yr();
4104
+ const n = ei();
4022
4105
  let i;
4023
4106
  try {
4024
4107
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
@@ -4028,7 +4111,7 @@ async function Xr(e = {}) {
4028
4111
  }), null;
4029
4112
  }
4030
4113
  const r = [];
4031
- let s = null, a = !1;
4114
+ let s = null, o = !1;
4032
4115
  i.addEventListener("dataavailable", (w) => {
4033
4116
  w.data && w.data.size > 0 && r.push(w.data);
4034
4117
  }), i.addEventListener("stop", () => {
@@ -4036,7 +4119,7 @@ async function Xr(e = {}) {
4036
4119
  if (s && clearInterval(s), t.getTracks().forEach((B) => {
4037
4120
  B.stop();
4038
4121
  }), r.length) {
4039
- const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${S}.${H}`, {
4122
+ const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), z = /mp4/.test(B) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${S}.${z}`, {
4040
4123
  type: B
4041
4124
  });
4042
4125
  (w = e.onfinalize) == null || w.call(e, U);
@@ -4046,7 +4129,7 @@ async function Xr(e = {}) {
4046
4129
  w.addEventListener("ended", () => l(), { once: !0 });
4047
4130
  });
4048
4131
  function l() {
4049
- if (!a && (a = !0, i.state !== "inactive"))
4132
+ if (!o && (o = !0, i.state !== "inactive"))
4050
4133
  try {
4051
4134
  i.stop();
4052
4135
  } catch (w) {
@@ -4072,7 +4155,7 @@ async function Xr(e = {}) {
4072
4155
  }
4073
4156
  };
4074
4157
  }
4075
- const Zr = [
4158
+ const ri = [
4076
4159
  {
4077
4160
  action: "file",
4078
4161
  labelKey: "composer.attachFile",
@@ -4088,7 +4171,7 @@ const Zr = [
4088
4171
  labelKey: "composer.recordScreen",
4089
4172
  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"
4090
4173
  }
4091
- ], ei = {
4174
+ ], ii = {
4092
4175
  name: "WmComposer",
4093
4176
  inject: {
4094
4177
  // Translator shared by the Messenger shell; French fallback when
@@ -4122,10 +4205,10 @@ const Zr = [
4122
4205
  return !this.disabled && !!this.local.trim();
4123
4206
  },
4124
4207
  attachItems() {
4125
- return Zr.map((e) => ({
4208
+ return ri.map((e) => ({
4126
4209
  ...e,
4127
4210
  label: this.t(e.labelKey),
4128
- disabled: e.action === "screenshot" && !me || e.action === "record" && (!me || !Ae)
4211
+ disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !Ae)
4129
4212
  }));
4130
4213
  },
4131
4214
  recordingElapsedLabel() {
@@ -4196,13 +4279,13 @@ const Zr = [
4196
4279
  },
4197
4280
  async captureScreenshot() {
4198
4281
  if (this.disabled) return;
4199
- const e = await Jr();
4282
+ const e = await ti();
4200
4283
  e && this.$emit("attach", e);
4201
4284
  },
4202
4285
  async startRecording() {
4203
4286
  if (this.recording || this.disabled) return;
4204
4287
  this.recordingElapsed = 0;
4205
- const e = await Xr({
4288
+ const e = await si({
4206
4289
  onstart: () => {
4207
4290
  this.recording = !0;
4208
4291
  },
@@ -4244,97 +4327,97 @@ const Zr = [
4244
4327
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4245
4328
  }
4246
4329
  }
4247
- }, ti = {
4330
+ }, ai = {
4248
4331
  key: 0,
4249
4332
  class: "wm-rec"
4250
- }, ni = { class: "wm-rec__lbl" }, si = {
4333
+ }, oi = { class: "wm-rec__lbl" }, li = {
4251
4334
  key: 1,
4252
4335
  class: "wm-compose__menu",
4253
4336
  role: "menu"
4254
- }, ri = ["disabled", "onClick"], ii = { class: "wm-compose__menuIcon" }, ai = {
4337
+ }, ci = ["disabled", "onClick"], di = { class: "wm-compose__menuIcon" }, ui = {
4255
4338
  viewBox: "0 0 24 24",
4256
4339
  width: "14",
4257
4340
  height: "14",
4258
4341
  "aria-hidden": "true"
4259
- }, oi = ["d"], li = ["placeholder", "disabled"], ci = { class: "wm-compose__actions" }, di = ["title", "aria-label", "disabled"], ui = ["disabled", "aria-label"];
4260
- function mi(e, t, n, i, r, s) {
4261
- return c(), u("div", {
4342
+ }, hi = ["d"], mi = ["placeholder", "disabled"], fi = { class: "wm-compose__actions" }, _i = ["title", "aria-label", "disabled"], gi = ["disabled", "aria-label"];
4343
+ function pi(e, t, n, i, r, s) {
4344
+ return c(), d("div", {
4262
4345
  class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4263
- style: q(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4346
+ style: H(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4264
4347
  }, [
4265
- r.recording ? (c(), u("div", ti, [
4266
- t[8] || (t[8] = o("span", {
4348
+ r.recording ? (c(), d("div", ai, [
4349
+ t[8] || (t[8] = a("span", {
4267
4350
  class: "wm-rec__dot",
4268
4351
  "aria-hidden": "true"
4269
4352
  }, null, -1)),
4270
- o("span", ni, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4271
- o("button", {
4353
+ a("span", oi, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4354
+ a("button", {
4272
4355
  type: "button",
4273
4356
  class: "wm-rec__stop",
4274
- onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
4357
+ onClick: t[0] || (t[0] = (...o) => s.stopRecording && s.stopRecording(...o))
4275
4358
  }, v(s.t("composer.stop")), 1)
4276
4359
  ])) : y("", !0),
4277
- o("form", {
4360
+ a("form", {
4278
4361
  class: O(["wm-compose", { "has-attach": r.attachOpen }]),
4279
- onSubmit: t[7] || (t[7] = G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4362
+ onSubmit: t[7] || (t[7] = G((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
4280
4363
  }, [
4281
- o("input", {
4364
+ a("input", {
4282
4365
  ref: "fileEl",
4283
4366
  type: "file",
4284
4367
  hidden: "",
4285
4368
  multiple: "",
4286
- onChange: t[1] || (t[1] = (...a) => s.onFile && s.onFile(...a))
4369
+ onChange: t[1] || (t[1] = (...o) => s.onFile && s.onFile(...o))
4287
4370
  }, null, 544),
4288
- r.attachOpen ? (c(), u("div", {
4371
+ r.attachOpen ? (c(), d("div", {
4289
4372
  key: 0,
4290
4373
  class: "wm-compose__overlay",
4291
- onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4374
+ onClick: t[2] || (t[2] = (o) => r.attachOpen = !1)
4292
4375
  })) : y("", !0),
4293
- r.attachOpen ? (c(), u("div", si, [
4294
- (c(!0), u(E, null, F(s.attachItems, (a) => (c(), u("button", {
4295
- key: a.action,
4376
+ r.attachOpen ? (c(), d("div", li, [
4377
+ (c(!0), d(E, null, F(s.attachItems, (o) => (c(), d("button", {
4378
+ key: o.action,
4296
4379
  type: "button",
4297
4380
  class: "wm-compose__menuItem",
4298
- disabled: a.disabled,
4299
- onClick: (l) => s.onAttachAction(a.action)
4381
+ disabled: o.disabled,
4382
+ onClick: (l) => s.onAttachAction(o.action)
4300
4383
  }, [
4301
- o("span", ii, [
4302
- (c(), u("svg", ai, [
4303
- o("path", {
4304
- d: a.path,
4384
+ a("span", di, [
4385
+ (c(), d("svg", ui, [
4386
+ a("path", {
4387
+ d: o.path,
4305
4388
  stroke: "currentColor",
4306
4389
  "stroke-width": "1.8",
4307
4390
  "stroke-linecap": "round",
4308
4391
  "stroke-linejoin": "round",
4309
4392
  fill: "none"
4310
- }, null, 8, oi)
4393
+ }, null, 8, hi)
4311
4394
  ]))
4312
4395
  ]),
4313
- o("span", null, v(a.label), 1)
4314
- ], 8, ri))), 128))
4396
+ a("span", null, v(o.label), 1)
4397
+ ], 8, ci))), 128))
4315
4398
  ])) : y("", !0),
4316
- $(o("textarea", {
4399
+ $(a("textarea", {
4317
4400
  ref: "inputEl",
4318
- "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
4401
+ "onUpdate:modelValue": t[3] || (t[3] = (o) => r.local = o),
4319
4402
  class: "wm-compose__input",
4320
4403
  rows: "3",
4321
4404
  placeholder: n.placeholder,
4322
4405
  disabled: n.disabled,
4323
- onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
4324
- onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
4325
- }, null, 40, li), [
4406
+ onKeydown: t[4] || (t[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
4407
+ onInput: t[5] || (t[5] = (...o) => s.autosize && s.autosize(...o))
4408
+ }, null, 40, mi), [
4326
4409
  [X, r.local]
4327
4410
  ]),
4328
- o("div", ci, [
4329
- o("button", {
4411
+ a("div", fi, [
4412
+ a("button", {
4330
4413
  type: "button",
4331
4414
  class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
4332
4415
  title: n.attachLabel,
4333
4416
  "aria-label": n.attachLabel,
4334
4417
  disabled: r.recording,
4335
- onClick: t[6] || (t[6] = (a) => r.attachOpen = !r.attachOpen)
4418
+ onClick: t[6] || (t[6] = (o) => r.attachOpen = !r.attachOpen)
4336
4419
  }, [...t[9] || (t[9] = [
4337
- o("svg", {
4420
+ a("svg", {
4338
4421
  width: "13",
4339
4422
  height: "13",
4340
4423
  viewBox: "0 0 24 24",
@@ -4345,16 +4428,16 @@ function mi(e, t, n, i, r, s) {
4345
4428
  "stroke-linejoin": "round",
4346
4429
  "aria-hidden": "true"
4347
4430
  }, [
4348
- o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4431
+ a("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" })
4349
4432
  ], -1)
4350
- ])], 10, di),
4351
- o("button", {
4433
+ ])], 10, _i),
4434
+ a("button", {
4352
4435
  type: "submit",
4353
4436
  class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
4354
4437
  disabled: !s.canSend,
4355
4438
  "aria-label": s.t("composer.send")
4356
4439
  }, [...t[10] || (t[10] = [
4357
- o("svg", {
4440
+ a("svg", {
4358
4441
  width: "13",
4359
4442
  height: "13",
4360
4443
  viewBox: "0 0 24 24",
@@ -4365,14 +4448,14 @@ function mi(e, t, n, i, r, s) {
4365
4448
  "stroke-linejoin": "round",
4366
4449
  "aria-hidden": "true"
4367
4450
  }, [
4368
- o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4451
+ a("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4369
4452
  ], -1)
4370
- ])], 10, ui)
4453
+ ])], 10, gi)
4371
4454
  ])
4372
4455
  ], 34)
4373
4456
  ], 6);
4374
4457
  }
4375
- const hi = /* @__PURE__ */ N(ei, [["render", mi], ["__scopeId", "data-v-01e81a27"]]), fi = {
4458
+ const vi = /* @__PURE__ */ N(ii, [["render", pi], ["__scopeId", "data-v-01e81a27"]]), yi = {
4376
4459
  name: "WmSuggestionChips",
4377
4460
  props: {
4378
4461
  items: { type: Array, default: () => [] },
@@ -4389,22 +4472,22 @@ const hi = /* @__PURE__ */ N(ei, [["render", mi], ["__scopeId", "data-v-01e81a27
4389
4472
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4390
4473
  }
4391
4474
  }
4392
- }, _i = ["onClick"];
4393
- function gi(e, t, n, i, r, s) {
4394
- return n.items.length ? (c(), u("div", {
4475
+ }, wi = ["onClick"];
4476
+ function bi(e, t, n, i, r, s) {
4477
+ return n.items.length ? (c(), d("div", {
4395
4478
  key: s.batchKey,
4396
4479
  class: "wm-chips"
4397
4480
  }, [
4398
- (c(!0), u(E, null, F(n.items, (a, l) => (c(), u("button", {
4481
+ (c(!0), d(E, null, F(n.items, (o, l) => (c(), d("button", {
4399
4482
  key: l,
4400
4483
  type: "button",
4401
4484
  class: "wm-chip",
4402
- style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4403
- onClick: (p) => e.$emit("select", a)
4404
- }, v(a.label), 13, _i))), 128))
4485
+ style: H({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4486
+ onClick: (p) => e.$emit("select", o)
4487
+ }, v(o.label), 13, wi))), 128))
4405
4488
  ])) : y("", !0);
4406
4489
  }
4407
- const pi = /* @__PURE__ */ N(fi, [["render", gi], ["__scopeId", "data-v-47ad8085"]]), vi = {
4490
+ const ki = /* @__PURE__ */ N(yi, [["render", bi], ["__scopeId", "data-v-47ad8085"]]), Ci = {
4408
4491
  name: "WmApprovalCard",
4409
4492
  components: { AIAvatar: le },
4410
4493
  inject: {
@@ -4448,34 +4531,34 @@ const pi = /* @__PURE__ */ N(fi, [["render", gi], ["__scopeId", "data-v-47ad8085
4448
4531
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4449
4532
  }
4450
4533
  }
4451
- }, yi = { class: "wm-approval" }, wi = { class: "wm-approval__head" }, bi = { class: "wm-approval__icon" }, ki = { class: "wm-approval__main" }, Ci = { class: "wm-approval__title" }, Ai = {
4534
+ }, Ai = { class: "wm-approval" }, Si = { class: "wm-approval__head" }, Mi = { class: "wm-approval__icon" }, Ti = { class: "wm-approval__main" }, xi = { class: "wm-approval__title" }, Oi = {
4452
4535
  key: 0,
4453
4536
  class: "wm-approval__detail"
4454
- }, Si = { class: "wm-approval__actions" };
4455
- function Mi(e, t, n, i, r, s) {
4456
- const a = R("AIAvatar");
4457
- return c(), u("div", yi, [
4458
- o("div", wi, [
4459
- o("div", bi, [
4460
- K(a, {
4537
+ }, Ii = { class: "wm-approval__actions" };
4538
+ function Li(e, t, n, i, r, s) {
4539
+ const o = R("AIAvatar");
4540
+ return c(), d("div", Ai, [
4541
+ a("div", Si, [
4542
+ a("div", Mi, [
4543
+ V(o, {
4461
4544
  size: 24,
4462
4545
  name: n.agentName,
4463
4546
  "image-url": n.agentAvatarUrl
4464
4547
  }, null, 8, ["name", "image-url"])
4465
4548
  ]),
4466
- o("div", ki, [
4467
- o("div", Ci, v(n.action), 1),
4468
- n.detail ? (c(), u("div", Ai, v(n.detail), 1)) : y("", !0)
4549
+ a("div", Ti, [
4550
+ a("div", xi, v(n.action), 1),
4551
+ n.detail ? (c(), d("div", Oi, v(n.detail), 1)) : y("", !0)
4469
4552
  ])
4470
4553
  ]),
4471
- o("div", Si, [
4472
- s.rejectId ? (c(), u("button", {
4554
+ a("div", Ii, [
4555
+ s.rejectId ? (c(), d("button", {
4473
4556
  key: 0,
4474
4557
  type: "button",
4475
4558
  class: "wm-approval__btn wm-approval__btn--neutral",
4476
4559
  onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
4477
4560
  }, v(s.rejectLabel), 1)) : y("", !0),
4478
- s.approveId ? (c(), u("button", {
4561
+ s.approveId ? (c(), d("button", {
4479
4562
  key: 1,
4480
4563
  type: "button",
4481
4564
  class: "wm-approval__btn wm-approval__btn--primary",
@@ -4484,9 +4567,9 @@ function Mi(e, t, n, i, r, s) {
4484
4567
  ])
4485
4568
  ]);
4486
4569
  }
4487
- const Ti = /* @__PURE__ */ N(vi, [["render", Mi], ["__scopeId", "data-v-a2bed37e"]]);
4570
+ const Ei = /* @__PURE__ */ N(Ci, [["render", Li], ["__scopeId", "data-v-a2bed37e"]]);
4488
4571
  let Ee = 0;
4489
- const xi = /* @__PURE__ */ new Set([
4572
+ const Bi = /* @__PURE__ */ new Set([
4490
4573
  "text",
4491
4574
  "textarea",
4492
4575
  "number",
@@ -4494,7 +4577,7 @@ const xi = /* @__PURE__ */ new Set([
4494
4577
  "select",
4495
4578
  "multiselect",
4496
4579
  "date"
4497
- ]), Oi = {
4580
+ ]), Ri = {
4498
4581
  name: "WmFormCard",
4499
4582
  components: { AIAvatar: le },
4500
4583
  inject: {
@@ -4524,7 +4607,7 @@ const xi = /* @__PURE__ */ new Set([
4524
4607
  // douteux.
4525
4608
  normalizedFields() {
4526
4609
  var t;
4527
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !xi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4610
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !Bi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4528
4611
  }
4529
4612
  },
4530
4613
  created() {
@@ -4577,65 +4660,65 @@ const xi = /* @__PURE__ */ new Set([
4577
4660
  }
4578
4661
  }
4579
4662
  }
4580
- }, Ii = { class: "wm-form" }, Li = { class: "wm-form__head" }, Ei = { class: "wm-form__icon" }, Bi = { class: "wm-form__main" }, Ri = { class: "wm-form__title" }, Ni = {
4663
+ }, Ni = { class: "wm-form" }, Pi = { class: "wm-form__head" }, Ui = { class: "wm-form__icon" }, Fi = { class: "wm-form__main" }, Di = { class: "wm-form__title" }, ji = {
4581
4664
  key: 0,
4582
4665
  class: "wm-form__detail"
4583
- }, Pi = ["for"], Ui = {
4666
+ }, Hi = ["for"], zi = {
4584
4667
  key: 0,
4585
4668
  class: "wm-form__req",
4586
4669
  "aria-hidden": "true"
4587
- }, Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Di = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Hi = ["id", "onUpdate:modelValue", "required", "disabled"], zi = {
4670
+ }, qi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Vi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], $i = ["id", "onUpdate:modelValue", "required", "disabled"], Wi = {
4588
4671
  key: 4,
4589
4672
  class: "wm-form__bool"
4590
- }, qi = ["id", "onUpdate:modelValue", "disabled"], Ki = ["id", "onUpdate:modelValue", "required", "disabled"], Vi = {
4673
+ }, Gi = ["id", "onUpdate:modelValue", "disabled"], Yi = ["id", "onUpdate:modelValue", "required", "disabled"], Ji = {
4591
4674
  value: "",
4592
4675
  disabled: ""
4593
- }, $i = ["value"], Wi = {
4676
+ }, Qi = ["value"], Xi = {
4594
4677
  key: 6,
4595
4678
  class: "wm-form__multi"
4596
- }, Gi = ["value", "checked", "disabled", "onChange"], Yi = {
4679
+ }, Zi = ["value", "checked", "disabled", "onChange"], ea = {
4597
4680
  key: 0,
4598
4681
  class: "wm-form__err"
4599
- }, Ji = ["disabled"], Qi = {
4682
+ }, ta = ["disabled"], na = {
4600
4683
  key: 0,
4601
4684
  class: "wm-form__spinner",
4602
4685
  "aria-hidden": "true"
4603
- }, Xi = {
4686
+ }, sa = {
4604
4687
  key: 2,
4605
4688
  class: "wm-form__doneLbl"
4606
4689
  };
4607
- function Zi(e, t, n, i, r, s) {
4608
- const a = R("AIAvatar");
4609
- return c(), u("div", Ii, [
4610
- o("div", Li, [
4611
- o("div", Ei, [
4612
- K(a, {
4690
+ function ra(e, t, n, i, r, s) {
4691
+ const o = R("AIAvatar");
4692
+ return c(), d("div", Ni, [
4693
+ a("div", Pi, [
4694
+ a("div", Ui, [
4695
+ V(o, {
4613
4696
  size: 24,
4614
4697
  name: n.agentName,
4615
4698
  "image-url": n.agentAvatarUrl
4616
4699
  }, null, 8, ["name", "image-url"])
4617
4700
  ]),
4618
- o("div", Bi, [
4619
- o("div", Ri, v(n.form.title || s.t("form.title")), 1),
4620
- n.form.description ? (c(), u("div", Ni, v(n.form.description), 1)) : y("", !0)
4701
+ a("div", Fi, [
4702
+ a("div", Di, v(n.form.title || s.t("form.title")), 1),
4703
+ n.form.description ? (c(), d("div", ji, v(n.form.description), 1)) : y("", !0)
4621
4704
  ])
4622
4705
  ]),
4623
- o("form", {
4706
+ a("form", {
4624
4707
  class: "wm-form__body",
4625
4708
  onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4626
4709
  }, [
4627
- (c(!0), u(E, null, F(s.normalizedFields, (l) => (c(), u("div", {
4710
+ (c(!0), d(E, null, F(s.normalizedFields, (l) => (c(), d("div", {
4628
4711
  key: l.key,
4629
4712
  class: "wm-form__field"
4630
4713
  }, [
4631
- o("label", {
4714
+ a("label", {
4632
4715
  for: `wm-f-${r._uid}-${l.key}`,
4633
4716
  class: "wm-form__label"
4634
4717
  }, [
4635
4718
  ye(v(l.label), 1),
4636
- l.required ? (c(), u("span", Ui, "*")) : y("", !0)
4637
- ], 8, Pi),
4638
- l.type === "text" ? $((c(), u("input", {
4719
+ l.required ? (c(), d("span", zi, "*")) : y("", !0)
4720
+ ], 8, Hi),
4721
+ l.type === "text" ? $((c(), d("input", {
4639
4722
  key: 0,
4640
4723
  id: `wm-f-${r._uid}-${l.key}`,
4641
4724
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4644,9 +4727,9 @@ function Zi(e, t, n, i, r, s) {
4644
4727
  placeholder: l.placeholder || "",
4645
4728
  required: l.required,
4646
4729
  disabled: n.readOnly || r.busy
4647
- }, null, 8, Fi)), [
4730
+ }, null, 8, qi)), [
4648
4731
  [X, r.values[l.key]]
4649
- ]) : l.type === "textarea" ? $((c(), u("textarea", {
4732
+ ]) : l.type === "textarea" ? $((c(), d("textarea", {
4650
4733
  key: 1,
4651
4734
  id: `wm-f-${r._uid}-${l.key}`,
4652
4735
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4655,9 +4738,9 @@ function Zi(e, t, n, i, r, s) {
4655
4738
  placeholder: l.placeholder || "",
4656
4739
  required: l.required,
4657
4740
  disabled: n.readOnly || r.busy
4658
- }, null, 8, Di)), [
4741
+ }, null, 8, Vi)), [
4659
4742
  [X, r.values[l.key]]
4660
- ]) : l.type === "number" ? $((c(), u("input", {
4743
+ ]) : l.type === "number" ? $((c(), d("input", {
4661
4744
  key: 2,
4662
4745
  id: `wm-f-${r._uid}-${l.key}`,
4663
4746
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4666,14 +4749,14 @@ function Zi(e, t, n, i, r, s) {
4666
4749
  placeholder: l.placeholder || "",
4667
4750
  required: l.required,
4668
4751
  disabled: n.readOnly || r.busy
4669
- }, null, 8, ji)), [
4752
+ }, null, 8, Ki)), [
4670
4753
  [
4671
4754
  X,
4672
4755
  r.values[l.key],
4673
4756
  void 0,
4674
4757
  { number: !0 }
4675
4758
  ]
4676
- ]) : l.type === "date" ? $((c(), u("input", {
4759
+ ]) : l.type === "date" ? $((c(), d("input", {
4677
4760
  key: 3,
4678
4761
  id: `wm-f-${r._uid}-${l.key}`,
4679
4762
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4681,19 +4764,19 @@ function Zi(e, t, n, i, r, s) {
4681
4764
  class: "wm-form__input",
4682
4765
  required: l.required,
4683
4766
  disabled: n.readOnly || r.busy
4684
- }, null, 8, Hi)), [
4767
+ }, null, 8, $i)), [
4685
4768
  [X, r.values[l.key]]
4686
- ]) : l.type === "boolean" ? (c(), u("label", zi, [
4687
- $(o("input", {
4769
+ ]) : l.type === "boolean" ? (c(), d("label", Wi, [
4770
+ $(a("input", {
4688
4771
  id: `wm-f-${r._uid}-${l.key}`,
4689
4772
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
4690
4773
  type: "checkbox",
4691
4774
  disabled: n.readOnly || r.busy
4692
- }, null, 8, qi), [
4775
+ }, null, 8, Gi), [
4693
4776
  [ze, r.values[l.key]]
4694
4777
  ]),
4695
- o("span", null, v(l.placeholder || s.t("common.yes")), 1)
4696
- ])) : l.type === "select" ? $((c(), u("select", {
4778
+ a("span", null, v(l.placeholder || s.t("common.yes")), 1)
4779
+ ])) : l.type === "select" ? $((c(), d("select", {
4697
4780
  key: 5,
4698
4781
  id: `wm-f-${r._uid}-${l.key}`,
4699
4782
  "onUpdate:modelValue": (p) => r.values[l.key] = p,
@@ -4701,19 +4784,19 @@ function Zi(e, t, n, i, r, s) {
4701
4784
  required: l.required,
4702
4785
  disabled: n.readOnly || r.busy
4703
4786
  }, [
4704
- o("option", Vi, v(l.placeholder || s.t("form.choose")), 1),
4705
- (c(!0), u(E, null, F(l.options, (p) => (c(), u("option", {
4787
+ a("option", Ji, v(l.placeholder || s.t("form.choose")), 1),
4788
+ (c(!0), d(E, null, F(l.options, (p) => (c(), d("option", {
4706
4789
  key: p.value,
4707
4790
  value: p.value
4708
- }, v(p.label), 9, $i))), 128))
4709
- ], 8, Ki)), [
4791
+ }, v(p.label), 9, Qi))), 128))
4792
+ ], 8, Yi)), [
4710
4793
  [qe, r.values[l.key]]
4711
- ]) : l.type === "multiselect" ? (c(), u("div", Wi, [
4712
- (c(!0), u(E, null, F(l.options, (p) => (c(), u("label", {
4794
+ ]) : l.type === "multiselect" ? (c(), d("div", Xi, [
4795
+ (c(!0), d(E, null, F(l.options, (p) => (c(), d("label", {
4713
4796
  key: p.value,
4714
4797
  class: "wm-form__multiItem"
4715
4798
  }, [
4716
- o("input", {
4799
+ a("input", {
4717
4800
  type: "checkbox",
4718
4801
  value: p.value,
4719
4802
  checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(p.value),
@@ -4723,25 +4806,25 @@ function Zi(e, t, n, i, r, s) {
4723
4806
  p.value,
4724
4807
  k.target.checked
4725
4808
  )
4726
- }, null, 40, Gi),
4727
- o("span", null, v(p.label), 1)
4809
+ }, null, 40, Zi),
4810
+ a("span", null, v(p.label), 1)
4728
4811
  ]))), 128))
4729
4812
  ])) : y("", !0)
4730
4813
  ]))), 128)),
4731
- r.error ? (c(), u("div", Yi, v(r.error), 1)) : y("", !0),
4732
- n.readOnly ? (c(), u("div", Xi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
4814
+ r.error ? (c(), d("div", ea, v(r.error), 1)) : y("", !0),
4815
+ n.readOnly ? (c(), d("div", sa, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
4733
4816
  key: 1,
4734
4817
  type: "submit",
4735
4818
  class: "wm-form__submit",
4736
4819
  disabled: r.busy
4737
4820
  }, [
4738
- r.busy ? (c(), u("span", Qi)) : y("", !0),
4739
- o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4740
- ], 8, Ji))
4821
+ r.busy ? (c(), d("span", na)) : y("", !0),
4822
+ a("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4823
+ ], 8, ta))
4741
4824
  ], 32)
4742
4825
  ]);
4743
4826
  }
4744
- const ea = /* @__PURE__ */ N(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56"]]), ta = {
4827
+ const ia = /* @__PURE__ */ N(Ri, [["render", ra], ["__scopeId", "data-v-fe65cc56"]]), aa = {
4745
4828
  name: "WmFeedback",
4746
4829
  inject: {
4747
4830
  // Translator shared by the Messenger shell; French fallback when
@@ -4775,15 +4858,15 @@ const ea = /* @__PURE__ */ N(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56
4775
4858
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4776
4859
  }
4777
4860
  }
4778
- }, na = { class: "wm-fb" }, sa = { class: "wm-fb__title" }, ra = { class: "wm-fb__sub" }, ia = { class: "wm-fb__row" }, aa = ["onClick"], oa = { class: "wm-fb__emoji" }, la = { class: "wm-fb__label" }, ca = ["disabled"], da = {
4861
+ }, oa = { class: "wm-fb" }, la = { class: "wm-fb__title" }, ca = { class: "wm-fb__sub" }, da = { class: "wm-fb__row" }, ua = ["onClick"], ha = { class: "wm-fb__emoji" }, ma = { class: "wm-fb__label" }, fa = ["disabled"], _a = {
4779
4862
  key: 1,
4780
4863
  class: "wm-fb__done"
4781
- }, ua = { class: "wm-fb__doneTitle" }, ma = { class: "wm-fb__doneSub" };
4782
- function ha(e, t, n, i, r, s) {
4783
- return c(), u("div", na, [
4784
- n.done ? (c(), u("div", da, [
4785
- t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
4786
- o("svg", {
4864
+ }, ga = { class: "wm-fb__doneTitle" }, pa = { class: "wm-fb__doneSub" };
4865
+ function va(e, t, n, i, r, s) {
4866
+ return c(), d("div", oa, [
4867
+ n.done ? (c(), d("div", _a, [
4868
+ t[1] || (t[1] = a("div", { class: "wm-fb__check" }, [
4869
+ a("svg", {
4787
4870
  width: "16",
4788
4871
  height: "16",
4789
4872
  viewBox: "0 0 24 24",
@@ -4794,35 +4877,35 @@ function ha(e, t, n, i, r, s) {
4794
4877
  "stroke-linejoin": "round",
4795
4878
  "aria-hidden": "true"
4796
4879
  }, [
4797
- o("path", { d: "M20 6L9 17l-5-5" })
4880
+ a("path", { d: "M20 6L9 17l-5-5" })
4798
4881
  ])
4799
4882
  ], -1)),
4800
- o("div", ua, v(s.t("feedback.doneTitle")), 1),
4801
- o("div", ma, v(s.t("feedback.doneSubtitle")), 1)
4802
- ])) : (c(), u(E, { key: 0 }, [
4803
- o("div", sa, v(s.t("feedback.question")), 1),
4804
- o("div", ra, v(s.t("feedback.subtitle")), 1),
4805
- o("div", ia, [
4806
- (c(!0), u(E, null, F(s.options, (a) => (c(), u("button", {
4807
- key: a.v,
4883
+ a("div", ga, v(s.t("feedback.doneTitle")), 1),
4884
+ a("div", pa, v(s.t("feedback.doneSubtitle")), 1)
4885
+ ])) : (c(), d(E, { key: 0 }, [
4886
+ a("div", la, v(s.t("feedback.question")), 1),
4887
+ a("div", ca, v(s.t("feedback.subtitle")), 1),
4888
+ a("div", da, [
4889
+ (c(!0), d(E, null, F(s.options, (o) => (c(), d("button", {
4890
+ key: o.v,
4808
4891
  type: "button",
4809
- class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4810
- onClick: (l) => r.sel = a.v
4892
+ class: O(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
4893
+ onClick: (l) => r.sel = o.v
4811
4894
  }, [
4812
- o("span", oa, v(a.e), 1),
4813
- o("span", la, v(a.l), 1)
4814
- ], 10, aa))), 128))
4895
+ a("span", ha, v(o.e), 1),
4896
+ a("span", ma, v(o.l), 1)
4897
+ ], 10, ua))), 128))
4815
4898
  ]),
4816
- o("button", {
4899
+ a("button", {
4817
4900
  type: "button",
4818
4901
  class: "wm-fb__send",
4819
4902
  disabled: !r.sel || n.busy,
4820
- onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
4821
- }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, ca)
4903
+ onClick: t[0] || (t[0] = (...o) => s.onSend && s.onSend(...o))
4904
+ }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, fa)
4822
4905
  ], 64))
4823
4906
  ]);
4824
4907
  }
4825
- const fa = /* @__PURE__ */ N(ta, [["render", ha], ["__scopeId", "data-v-9b630564"]]), _a = {
4908
+ const ya = /* @__PURE__ */ N(aa, [["render", va], ["__scopeId", "data-v-9b630564"]]), wa = {
4826
4909
  name: "WmMoreMenu",
4827
4910
  inject: {
4828
4911
  // Translator shared by the Messenger shell; French fallback when
@@ -4865,32 +4948,32 @@ const fa = /* @__PURE__ */ N(ta, [["render", ha], ["__scopeId", "data-v-9b630564
4865
4948
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
4866
4949
  }
4867
4950
  }
4868
- }, ga = { class: "wm-mm" }, pa = {
4951
+ }, ba = { class: "wm-mm" }, ka = {
4869
4952
  class: "wm-mm__pop",
4870
4953
  role: "menu"
4871
- }, va = {
4954
+ }, Ca = {
4872
4955
  key: 0,
4873
4956
  class: "wm-mm__section"
4874
- }, ya = { class: "wm-mm__label" }, wa = { class: "wm-mm__label" }, ba = {
4957
+ }, Aa = { class: "wm-mm__label" }, Sa = { class: "wm-mm__label" }, Ma = {
4875
4958
  key: 1,
4876
4959
  class: "wm-mm__sep"
4877
- }, ka = { class: "wm-mm__section" }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__label" }, Sa = { class: "wm-mm__section" }, Ma = { class: "wm-mm__label" }, Ta = { class: "wm-mm__label" };
4878
- function xa(e, t, n, i, r, s) {
4879
- return c(), u("div", ga, [
4880
- o("div", {
4960
+ }, Ta = { class: "wm-mm__section" }, xa = { class: "wm-mm__label" }, Oa = { class: "wm-mm__label" }, Ia = { class: "wm-mm__section" }, La = { class: "wm-mm__label" }, Ea = { class: "wm-mm__label" };
4961
+ function Ba(e, t, n, i, r, s) {
4962
+ return c(), d("div", ba, [
4963
+ a("div", {
4881
4964
  class: "wm-mm__scrim",
4882
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
4965
+ onClick: t[0] || (t[0] = (o) => e.$emit("close"))
4883
4966
  }),
4884
- o("div", pa, [
4885
- n.canRename || n.canExport ? (c(), u("div", va, [
4886
- n.canRename ? (c(), u("button", {
4967
+ a("div", ka, [
4968
+ n.canRename || n.canExport ? (c(), d("div", Ca, [
4969
+ n.canRename ? (c(), d("button", {
4887
4970
  key: 0,
4888
4971
  type: "button",
4889
4972
  class: "wm-mm__item",
4890
- onClick: t[1] || (t[1] = (a) => s.emit("rename"))
4973
+ onClick: t[1] || (t[1] = (o) => s.emit("rename"))
4891
4974
  }, [
4892
- t[7] || (t[7] = o("span", { class: "wm-mm__icon" }, [
4893
- o("svg", {
4975
+ t[7] || (t[7] = a("span", { class: "wm-mm__icon" }, [
4976
+ a("svg", {
4894
4977
  width: "12",
4895
4978
  height: "12",
4896
4979
  viewBox: "0 0 24 24",
@@ -4901,20 +4984,20 @@ function xa(e, t, n, i, r, s) {
4901
4984
  "stroke-linejoin": "round",
4902
4985
  "aria-hidden": "true"
4903
4986
  }, [
4904
- o("path", { d: "M12 20h9" }),
4905
- o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4987
+ a("path", { d: "M12 20h9" }),
4988
+ a("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
4906
4989
  ])
4907
4990
  ], -1)),
4908
- o("span", ya, v(s.t("moreMenu.editTitle")), 1)
4991
+ a("span", Aa, v(s.t("moreMenu.editTitle")), 1)
4909
4992
  ])) : y("", !0),
4910
- n.canExport ? (c(), u("button", {
4993
+ n.canExport ? (c(), d("button", {
4911
4994
  key: 1,
4912
4995
  type: "button",
4913
4996
  class: "wm-mm__item",
4914
- onClick: t[2] || (t[2] = (a) => s.emit("export"))
4997
+ onClick: t[2] || (t[2] = (o) => s.emit("export"))
4915
4998
  }, [
4916
- t[8] || (t[8] = o("span", { class: "wm-mm__icon" }, [
4917
- o("svg", {
4999
+ t[8] || (t[8] = a("span", { class: "wm-mm__icon" }, [
5000
+ a("svg", {
4918
5001
  width: "12",
4919
5002
  height: "12",
4920
5003
  viewBox: "0 0 24 24",
@@ -4925,22 +5008,22 @@ function xa(e, t, n, i, r, s) {
4925
5008
  "stroke-linejoin": "round",
4926
5009
  "aria-hidden": "true"
4927
5010
  }, [
4928
- o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5011
+ a("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
4929
5012
  ])
4930
5013
  ], -1)),
4931
- o("span", wa, v(s.t("moreMenu.exportTranscript")), 1),
4932
- t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
5014
+ a("span", Sa, v(s.t("moreMenu.exportTranscript")), 1),
5015
+ t[9] || (t[9] = a("span", { class: "wm-mm__hint" }, ".txt", -1))
4933
5016
  ])) : y("", !0)
4934
5017
  ])) : y("", !0),
4935
- n.canRename || n.canExport ? (c(), u("div", ba)) : y("", !0),
4936
- o("div", ka, [
4937
- o("button", {
5018
+ n.canRename || n.canExport ? (c(), d("div", Ma)) : y("", !0),
5019
+ a("div", Ta, [
5020
+ a("button", {
4938
5021
  type: "button",
4939
5022
  class: "wm-mm__item",
4940
- onClick: t[3] || (t[3] = (...a) => s.toggleSound && s.toggleSound(...a))
5023
+ onClick: t[3] || (t[3] = (...o) => s.toggleSound && s.toggleSound(...o))
4941
5024
  }, [
4942
- t[11] || (t[11] = o("span", { class: "wm-mm__icon" }, [
4943
- o("svg", {
5025
+ t[11] || (t[11] = a("span", { class: "wm-mm__icon" }, [
5026
+ a("svg", {
4944
5027
  width: "12",
4945
5028
  height: "12",
4946
5029
  viewBox: "0 0 24 24",
@@ -4951,24 +5034,24 @@ function xa(e, t, n, i, r, s) {
4951
5034
  "stroke-linejoin": "round",
4952
5035
  "aria-hidden": "true"
4953
5036
  }, [
4954
- o("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
4955
- o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5037
+ a("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
5038
+ a("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
4956
5039
  ])
4957
5040
  ], -1)),
4958
- o("span", Ca, v(s.t("moreMenu.sound")), 1),
4959
- o("span", {
5041
+ a("span", xa, v(s.t("moreMenu.sound")), 1),
5042
+ a("span", {
4960
5043
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
4961
5044
  }, [...t[10] || (t[10] = [
4962
- o("span", { class: "wm-mm__knob" }, null, -1)
5045
+ a("span", { class: "wm-mm__knob" }, null, -1)
4963
5046
  ])], 2)
4964
5047
  ]),
4965
- o("button", {
5048
+ a("button", {
4966
5049
  type: "button",
4967
5050
  class: "wm-mm__item",
4968
- onClick: t[4] || (t[4] = (...a) => s.toggleBrowserNotif && s.toggleBrowserNotif(...a))
5051
+ onClick: t[4] || (t[4] = (...o) => s.toggleBrowserNotif && s.toggleBrowserNotif(...o))
4969
5052
  }, [
4970
- t[13] || (t[13] = o("span", { class: "wm-mm__icon" }, [
4971
- o("svg", {
5053
+ t[13] || (t[13] = a("span", { class: "wm-mm__icon" }, [
5054
+ a("svg", {
4972
5055
  width: "12",
4973
5056
  height: "12",
4974
5057
  viewBox: "0 0 24 24",
@@ -4979,27 +5062,27 @@ function xa(e, t, n, i, r, s) {
4979
5062
  "stroke-linejoin": "round",
4980
5063
  "aria-hidden": "true"
4981
5064
  }, [
4982
- o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
5065
+ a("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
4983
5066
  ])
4984
5067
  ], -1)),
4985
- o("span", Aa, v(s.t("moreMenu.browserNotifications")), 1),
4986
- o("span", {
5068
+ a("span", Oa, v(s.t("moreMenu.browserNotifications")), 1),
5069
+ a("span", {
4987
5070
  class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
4988
5071
  }, [...t[12] || (t[12] = [
4989
- o("span", { class: "wm-mm__knob" }, null, -1)
5072
+ a("span", { class: "wm-mm__knob" }, null, -1)
4990
5073
  ])], 2)
4991
5074
  ])
4992
5075
  ]),
4993
- t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
4994
- o("div", Sa, [
4995
- n.statusUrl ? (c(), u("button", {
5076
+ t[16] || (t[16] = a("div", { class: "wm-mm__sep" }, null, -1)),
5077
+ a("div", Ia, [
5078
+ n.statusUrl ? (c(), d("button", {
4996
5079
  key: 0,
4997
5080
  type: "button",
4998
5081
  class: "wm-mm__item",
4999
- onClick: t[5] || (t[5] = (a) => s.emit("status"))
5082
+ onClick: t[5] || (t[5] = (o) => s.emit("status"))
5000
5083
  }, [
5001
- t[14] || (t[14] = o("span", { class: "wm-mm__icon" }, [
5002
- o("svg", {
5084
+ t[14] || (t[14] = a("span", { class: "wm-mm__icon" }, [
5085
+ a("svg", {
5003
5086
  width: "12",
5004
5087
  height: "12",
5005
5088
  viewBox: "0 0 24 24",
@@ -5010,19 +5093,19 @@ function xa(e, t, n, i, r, s) {
5010
5093
  "stroke-linejoin": "round",
5011
5094
  "aria-hidden": "true"
5012
5095
  }, [
5013
- o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5096
+ a("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5014
5097
  ])
5015
5098
  ], -1)),
5016
- o("span", Ma, v(s.t("moreMenu.serviceStatus")), 1)
5099
+ a("span", La, v(s.t("moreMenu.serviceStatus")), 1)
5017
5100
  ])) : y("", !0),
5018
- n.helpUrl ? (c(), u("button", {
5101
+ n.helpUrl ? (c(), d("button", {
5019
5102
  key: 1,
5020
5103
  type: "button",
5021
5104
  class: "wm-mm__item",
5022
- onClick: t[6] || (t[6] = (a) => s.emit("help"))
5105
+ onClick: t[6] || (t[6] = (o) => s.emit("help"))
5023
5106
  }, [
5024
- t[15] || (t[15] = o("span", { class: "wm-mm__icon" }, [
5025
- o("svg", {
5107
+ t[15] || (t[15] = a("span", { class: "wm-mm__icon" }, [
5108
+ a("svg", {
5026
5109
  width: "12",
5027
5110
  height: "12",
5028
5111
  viewBox: "0 0 24 24",
@@ -5033,16 +5116,16 @@ function xa(e, t, n, i, r, s) {
5033
5116
  "stroke-linejoin": "round",
5034
5117
  "aria-hidden": "true"
5035
5118
  }, [
5036
- o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
5119
+ a("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
5037
5120
  ])
5038
5121
  ], -1)),
5039
- o("span", Ta, v(s.t("moreMenu.helpCenter")), 1)
5122
+ a("span", Ea, v(s.t("moreMenu.helpCenter")), 1)
5040
5123
  ])) : y("", !0)
5041
5124
  ])
5042
5125
  ])
5043
5126
  ]);
5044
5127
  }
5045
- const Oa = /* @__PURE__ */ N(_a, [["render", xa], ["__scopeId", "data-v-76281e95"]]), Ia = {
5128
+ const Ra = /* @__PURE__ */ N(wa, [["render", Ba], ["__scopeId", "data-v-76281e95"]]), Na = {
5046
5129
  name: "WmRenameDialog",
5047
5130
  inject: {
5048
5131
  // Translator shared by the Messenger shell; French fallback when
@@ -5084,27 +5167,27 @@ const Oa = /* @__PURE__ */ N(_a, [["render", xa], ["__scopeId", "data-v-76281e95
5084
5167
  this.canSubmit && this.$emit("submit", this.value.trim());
5085
5168
  }
5086
5169
  }
5087
- }, La = { class: "wm-dialog" }, Ea = {
5170
+ }, Pa = { class: "wm-dialog" }, Ua = {
5088
5171
  class: "wm-dialog__card",
5089
5172
  role: "dialog",
5090
5173
  "aria-modal": "true"
5091
- }, Ba = { class: "wm-dialog__head" }, Ra = { class: "wm-dialog__title" }, Na = ["aria-label"], Pa = { class: "wm-dialog__body" }, Ua = ["placeholder"], Fa = { class: "wm-dialog__actions" }, Da = ["disabled"];
5092
- function ja(e, t, n, i, r, s) {
5093
- return c(), u("div", La, [
5094
- o("div", {
5174
+ }, Fa = { class: "wm-dialog__head" }, Da = { class: "wm-dialog__title" }, ja = ["aria-label"], Ha = { class: "wm-dialog__body" }, za = ["placeholder"], qa = { class: "wm-dialog__actions" }, Va = ["disabled"];
5175
+ function Ka(e, t, n, i, r, s) {
5176
+ return c(), d("div", Pa, [
5177
+ a("div", {
5095
5178
  class: "wm-dialog__scrim",
5096
- onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5179
+ onClick: t[0] || (t[0] = (o) => e.$emit("close"))
5097
5180
  }),
5098
- o("div", Ea, [
5099
- o("div", Ba, [
5100
- o("div", Ra, v(n.title || s.t("rename.title")), 1),
5101
- o("button", {
5181
+ a("div", Ua, [
5182
+ a("div", Fa, [
5183
+ a("div", Da, v(n.title || s.t("rename.title")), 1),
5184
+ a("button", {
5102
5185
  type: "button",
5103
5186
  class: "wm-dialog__close",
5104
5187
  "aria-label": s.t("common.close"),
5105
- onClick: t[1] || (t[1] = (a) => e.$emit("close"))
5188
+ onClick: t[1] || (t[1] = (o) => e.$emit("close"))
5106
5189
  }, [...t[7] || (t[7] = [
5107
- o("svg", {
5190
+ a("svg", {
5108
5191
  width: "12",
5109
5192
  height: "12",
5110
5193
  viewBox: "0 0 24 24",
@@ -5115,56 +5198,56 @@ function ja(e, t, n, i, r, s) {
5115
5198
  "stroke-linejoin": "round",
5116
5199
  "aria-hidden": "true"
5117
5200
  }, [
5118
- o("path", { d: "M18 6L6 18M6 6l12 12" })
5201
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
5119
5202
  ], -1)
5120
- ])], 8, Na)
5203
+ ])], 8, ja)
5121
5204
  ]),
5122
- o("div", Pa, [
5123
- $(o("input", {
5205
+ a("div", Ha, [
5206
+ $(a("input", {
5124
5207
  ref: "input",
5125
- "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
5208
+ "onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
5126
5209
  type: "text",
5127
5210
  class: "wm-dialog__input",
5128
5211
  placeholder: n.placeholder || s.t("rename.placeholder"),
5129
5212
  maxlength: 120,
5130
5213
  onKeydown: [
5131
- t[3] || (t[3] = ue(G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
5132
- t[4] || (t[4] = ue(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5214
+ t[3] || (t[3] = ue(G((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]), ["enter"])),
5215
+ t[4] || (t[4] = ue(G((o) => e.$emit("close"), ["prevent"]), ["esc"]))
5133
5216
  ]
5134
- }, null, 40, Ua), [
5217
+ }, null, 40, za), [
5135
5218
  [X, r.value]
5136
5219
  ])
5137
5220
  ]),
5138
- o("div", Fa, [
5139
- o("button", {
5221
+ a("div", qa, [
5222
+ a("button", {
5140
5223
  type: "button",
5141
5224
  class: "wm-dialog__btn",
5142
- onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5225
+ onClick: t[5] || (t[5] = (o) => e.$emit("close"))
5143
5226
  }, v(s.t("common.cancel")), 1),
5144
- o("button", {
5227
+ a("button", {
5145
5228
  type: "button",
5146
5229
  class: "wm-dialog__btn wm-dialog__btn--primary",
5147
5230
  disabled: !s.canSubmit,
5148
- onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
5149
- }, v(s.t("common.save")), 9, Da)
5231
+ onClick: t[6] || (t[6] = (...o) => s.onSubmit && s.onSubmit(...o))
5232
+ }, v(s.t("common.save")), 9, Va)
5150
5233
  ])
5151
5234
  ])
5152
5235
  ]);
5153
5236
  }
5154
- const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8"]]), Be = "ww-messenger-tokens", za = {
5237
+ const $a = /* @__PURE__ */ N(Na, [["render", Ka], ["__scopeId", "data-v-6d5f94a8"]]), Be = "ww-messenger-tokens", Wa = {
5155
5238
  name: "Messenger",
5156
5239
  components: {
5157
5240
  Launcher: Ut,
5158
5241
  Header: cn,
5159
- Onboarding: ts,
5160
- MessageList: Gr,
5161
- Composer: hi,
5162
- SuggestionChips: pi,
5163
- ApprovalCard: Ti,
5164
- FormCard: ea,
5165
- Feedback: fa,
5166
- MoreMenu: Oa,
5167
- RenameDialog: Ha
5242
+ Onboarding: as,
5243
+ MessageList: Zr,
5244
+ Composer: vi,
5245
+ SuggestionChips: ki,
5246
+ ApprovalCard: Ei,
5247
+ FormCard: ia,
5248
+ Feedback: ya,
5249
+ MoreMenu: Ra,
5250
+ RenameDialog: $a
5168
5251
  },
5169
5252
  mixins: [
5170
5253
  lt,
@@ -5348,7 +5431,7 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5348
5431
  return this.allConversations.map((i) => {
5349
5432
  var k;
5350
5433
  const r = e[i.id] || [], s = W(i.last_read_message_id);
5351
- let a = 0, l = null;
5434
+ let o = 0, l = null;
5352
5435
  for (let w = r.length - 1; w >= 0; w--) {
5353
5436
  const T = r[w];
5354
5437
  if (!T) continue;
@@ -5356,12 +5439,12 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5356
5439
  const B = W(T.id);
5357
5440
  if (B != null) {
5358
5441
  if (s != null && B <= s) break;
5359
- t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
5442
+ t[T.id] !== 0 && (!l && T.author && (l = T.author), o++);
5360
5443
  }
5361
5444
  }
5362
5445
  if (!r.length) {
5363
5446
  const w = W(i.last_message_id);
5364
- w != null && (s == null || w > s) && (a = 1, l = i.last_message_author || null);
5447
+ w != null && (s == null || w > s) && (o = 1, l = i.last_message_author || null);
5365
5448
  }
5366
5449
  const p = r.filter(
5367
5450
  (w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
@@ -5369,8 +5452,8 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5369
5452
  return {
5370
5453
  ...i,
5371
5454
  _preview: rt(i, p),
5372
- _unread: a > 0,
5373
- _unreadCount: a,
5455
+ _unread: o > 0,
5456
+ _unreadCount: o,
5374
5457
  _lastAuthor: l
5375
5458
  };
5376
5459
  });
@@ -5404,7 +5487,7 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5404
5487
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
5405
5488
  for (const i of this.drawerConversations) {
5406
5489
  if (!i._unread) continue;
5407
- const r = Oe(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
5490
+ const r = Oe(i, e[i.id] || []), s = i._lastAuthor, o = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (o ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (o ? this.agentAvatarUrl : null);
5408
5491
  t.push({
5409
5492
  convId: i.id,
5410
5493
  preview: i._preview || this.t("notification.youHaveNewMessage"),
@@ -5466,6 +5549,15 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5466
5549
  var e, t;
5467
5550
  return ((t = (e = this.s) == null ? void 0 : e.config) == null ? void 0 : t.widget) || null;
5468
5551
  },
5552
+ // Lets the merchant override the brand colour via widget.primary_color.
5553
+ // Only --wm-primary is overridden (used by the CTA swatch + hero
5554
+ // halo) ; --wm-a (unread dot, caret, AI ring) keeps its default
5555
+ // token value, intentionally fixed.
5556
+ rootStyle() {
5557
+ var t;
5558
+ const e = (t = this.widget) == null ? void 0 : t.primary_color;
5559
+ return e ? { "--wm-primary": e } : null;
5560
+ },
5469
5561
  widgetWelcomeMessage() {
5470
5562
  var e;
5471
5563
  return ((e = this.widget) == null ? void 0 : e.welcome_message) || "";
@@ -5549,8 +5641,8 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5549
5641
  }
5550
5642
  const t = this.revealedAt;
5551
5643
  return (this.s.messagesByConv[e.id] || []).filter((r) => {
5552
- var s, a, l, p, k;
5553
- return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5644
+ var s, o, l, p, k;
5645
+ return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((o = r == null ? void 0 : r.payload) == null ? void 0 : o.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
5554
5646
  });
5555
5647
  },
5556
5648
  // True whenever we should show the "typing" indicator at the bottom
@@ -5586,11 +5678,11 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5586
5678
  return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || this.t("action.title");
5587
5679
  },
5588
5680
  approvalDetail() {
5589
- var i, r, s, a, l, p;
5681
+ var i, r, s, o, l, p;
5590
5682
  const e = (s = (r = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : r.pending) == null ? void 0 : s.user_explanation;
5591
5683
  if (typeof e == "string" && e.trim())
5592
5684
  return e.trim();
5593
- const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5685
+ const t = (p = (l = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
5594
5686
  if (!t || typeof t != "object") return "";
5595
5687
  const n = Object.entries(t);
5596
5688
  return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
@@ -5629,9 +5721,9 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5629
5721
  const e = this.currentConv;
5630
5722
  let t = /* @__PURE__ */ new Date();
5631
5723
  if (e) {
5632
- const a = ((r = (((i = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : r.created_at) || e.created_at;
5633
- if (a) {
5634
- const l = new Date(a);
5724
+ const o = ((r = (((i = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : r.created_at) || e.created_at;
5725
+ if (o) {
5726
+ const l = new Date(o);
5635
5727
  Number.isNaN(l.getTime()) || (t = l);
5636
5728
  }
5637
5729
  }
@@ -5660,12 +5752,12 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5660
5752
  // ts comparison in `launcherPeeks`.
5661
5753
  latestUnreads: {
5662
5754
  handler(e) {
5663
- const t = new Set(e.map((a) => a.convId)), n = this.dismissedPeeks || {}, i = Object.keys(n);
5755
+ const t = new Set(e.map((o) => o.convId)), n = this.dismissedPeeks || {}, i = Object.keys(n);
5664
5756
  if (!i.length) return;
5665
5757
  const r = {};
5666
5758
  let s = !1;
5667
- for (const a of i)
5668
- t.has(a) ? r[a] = n[a] : s = !0;
5759
+ for (const o of i)
5760
+ t.has(o) ? r[o] = n[o] : s = !0;
5669
5761
  s && (this.dismissedPeeks = r);
5670
5762
  },
5671
5763
  deep: !0
@@ -5837,8 +5929,8 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5837
5929
  if (!i) return;
5838
5930
  const r = Math.ceil(i.contentRect.height + 8);
5839
5931
  r !== this.floatHeight && (this.floatHeight = r, this.$nextTick(() => {
5840
- var s, a;
5841
- (a = (s = this.$refs.messageList) == null ? void 0 : s.scrollToBottom) == null || a.call(s);
5932
+ var s, o;
5933
+ (o = (s = this.$refs.messageList) == null ? void 0 : s.scrollToBottom) == null || o.call(s);
5842
5934
  }));
5843
5935
  }), this.floatRO.observe(t);
5844
5936
  }
@@ -5892,13 +5984,13 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5892
5984
  this.launcherHovered = e, this.sendCurrentLauncherSize();
5893
5985
  },
5894
5986
  sendCurrentLauncherSize() {
5895
- var w, T, B, A, H, S, U;
5987
+ var w, T, B, A, z, S, U;
5896
5988
  if (this.isOpen) return;
5897
5989
  const e = (T = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : T.call(w, ".wm-launcherWrap");
5898
5990
  if (!e) return;
5899
5991
  const t = e.getBoundingClientRect();
5900
5992
  if (!t.width || !t.height) return;
5901
- const n = (((B = this.launcherPeeks) == null ? void 0 : B.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (H = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : H.call(A, ".wm-launcher"), l = (U = (S = this.$el) == null ? void 0 : S.querySelectorAll) == null ? void 0 : U.call(S, ".wm-peek"), p = l && l.length ? l[l.length - 1] : null;
5993
+ const n = (((B = this.launcherPeeks) == null ? void 0 : B.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), o = (z = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : z.call(A, ".wm-launcher"), l = (U = (S = this.$el) == null ? void 0 : S.querySelectorAll) == null ? void 0 : U.call(S, ".wm-peek"), p = l && l.length ? l[l.length - 1] : null;
5902
5994
  let k = null;
5903
5995
  if (p) {
5904
5996
  const I = p.getBoundingClientRect();
@@ -5912,8 +6004,8 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
5912
6004
  this.notifyParentResize("closed", {
5913
6005
  width: r + i,
5914
6006
  height: s + i,
5915
- launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
5916
- launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
6007
+ launcherWidth: (o == null ? void 0 : o.offsetWidth) || null,
6008
+ launcherHeight: (o == null ? void 0 : o.offsetHeight) || null,
5917
6009
  launcherHovered: this.launcherHovered,
5918
6010
  peek: k,
5919
6011
  peekHovered: this.launcherHovered && n
@@ -6154,33 +6246,34 @@ const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8
6154
6246
  }
6155
6247
  }
6156
6248
  }
6157
- }, qa = {
6249
+ }, Ga = {
6158
6250
  key: 0,
6159
6251
  class: "wm-loading",
6160
6252
  "aria-busy": "true",
6161
6253
  "aria-live": "polite"
6162
- }, Ka = ["aria-label"], Va = {
6254
+ }, Ya = ["aria-label"], Ja = {
6163
6255
  key: 0,
6164
6256
  class: "wm-state"
6165
- }, $a = { class: "wm-state__err" }, Wa = { class: "wm-state__errTitle" }, Ga = { class: "wm-state__errSub" }, Ya = { class: "wm-bottom" }, Ja = {
6257
+ }, Qa = { class: "wm-state__err" }, Xa = { class: "wm-state__errTitle" }, Za = { class: "wm-state__errSub" }, eo = { class: "wm-bottom" }, to = {
6166
6258
  key: 0,
6167
6259
  ref: "floatEl",
6168
6260
  class: "wm-float"
6169
- }, Qa = {
6261
+ }, no = {
6170
6262
  key: 1,
6171
6263
  class: "wm-actionWait",
6172
6264
  role: "status",
6173
6265
  "aria-live": "polite"
6174
- }, Xa = { class: "wm-actionWait__lbl" }, Za = {
6266
+ }, so = { class: "wm-actionWait__lbl" }, ro = {
6175
6267
  key: 2,
6176
6268
  class: "wm-attached"
6177
- }, eo = ["aria-label", "onClick"];
6178
- function to(e, t, n, i, r, s) {
6179
- const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), w = R("ApprovalCard"), T = R("FormCard"), B = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), U = R("RenameDialog");
6180
- return c(), u("div", {
6181
- class: O(["wm-root", `wm-root--${n.displayMode}`])
6269
+ }, io = ["aria-label", "onClick"];
6270
+ function ao(e, t, n, i, r, s) {
6271
+ const o = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), w = R("ApprovalCard"), T = R("FormCard"), B = R("Feedback"), A = R("SuggestionChips"), z = R("Composer"), S = R("MoreMenu"), U = R("RenameDialog");
6272
+ return c(), d("div", {
6273
+ class: O(["wm-root", `wm-root--${n.displayMode}`]),
6274
+ style: H(s.rootStyle)
6182
6275
  }, [
6183
- !r.isOpen && !s.isEmbedded ? (c(), P(a, {
6276
+ !r.isOpen && !s.isEmbedded ? (c(), P(o, {
6184
6277
  key: 0,
6185
6278
  "unread-count": s.unreadCount,
6186
6279
  peeks: s.launcherPeeks,
@@ -6188,27 +6281,27 @@ function to(e, t, n, i, r, s) {
6188
6281
  onDismiss: s.dismissPeek,
6189
6282
  onHover: s.onLauncherHover
6190
6283
  }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : y("", !0),
6191
- r.isOpen || s.isEmbedded ? (c(), u("section", {
6284
+ r.isOpen || s.isEmbedded ? (c(), d("section", {
6192
6285
  key: 1,
6193
6286
  class: O([
6194
6287
  "wm-panel",
6195
6288
  `wm-panel--${n.displayMode}`,
6196
6289
  { "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
6197
6290
  ]),
6198
- style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
6291
+ style: H(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
6199
6292
  role: "dialog",
6200
6293
  "aria-label": "Messenger",
6201
6294
  onClick: t[5] || (t[5] = (...I) => s.onPanelClick && s.onPanelClick(...I))
6202
6295
  }, [
6203
- !s.ready && !s.error ? (c(), u("div", qa, [
6204
- s.isEmbedded ? y("", !0) : (c(), u("button", {
6296
+ !s.ready && !s.error ? (c(), d("div", Ga, [
6297
+ s.isEmbedded ? y("", !0) : (c(), d("button", {
6205
6298
  key: 0,
6206
6299
  type: "button",
6207
6300
  class: "wm-loading__close",
6208
6301
  "aria-label": s.t("loading.minimize"),
6209
6302
  onClick: t[0] || (t[0] = (...I) => s.close && s.close(...I))
6210
6303
  }, [...t[6] || (t[6] = [
6211
- o("svg", {
6304
+ a("svg", {
6212
6305
  width: "13",
6213
6306
  height: "13",
6214
6307
  viewBox: "0 0 24 24",
@@ -6219,15 +6312,15 @@ function to(e, t, n, i, r, s) {
6219
6312
  "stroke-linejoin": "round",
6220
6313
  "aria-hidden": "true"
6221
6314
  }, [
6222
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6315
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6223
6316
  ], -1)
6224
- ])], 8, Ka)),
6225
- t[7] || (t[7] = o("div", {
6317
+ ])], 8, Ya)),
6318
+ t[7] || (t[7] = a("div", {
6226
6319
  class: "wm-loading__spinner",
6227
6320
  "aria-hidden": "true"
6228
6321
  }, null, -1))
6229
- ])) : (c(), u(E, { key: 1 }, [
6230
- K(l, {
6322
+ ])) : (c(), d(E, { key: 1 }, [
6323
+ V(l, {
6231
6324
  title: s.headerTitle,
6232
6325
  "team-members": s.teamMembers,
6233
6326
  "response-label": s.responseLabel,
@@ -6241,10 +6334,10 @@ function to(e, t, n, i, r, s) {
6241
6334
  onMore: s.toggleMore,
6242
6335
  onClose: s.close
6243
6336
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6244
- s.error ? (c(), u("div", Va, [
6245
- o("div", $a, [
6246
- t[8] || (t[8] = o("div", { class: "wm-state__errIcon" }, [
6247
- o("svg", {
6337
+ s.error ? (c(), d("div", Ja, [
6338
+ a("div", Qa, [
6339
+ t[8] || (t[8] = a("div", { class: "wm-state__errIcon" }, [
6340
+ a("svg", {
6248
6341
  width: "14",
6249
6342
  height: "14",
6250
6343
  viewBox: "0 0 24 24",
@@ -6255,16 +6348,16 @@ function to(e, t, n, i, r, s) {
6255
6348
  "stroke-linejoin": "round",
6256
6349
  "aria-hidden": "true"
6257
6350
  }, [
6258
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6351
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6259
6352
  ])
6260
6353
  ], -1)),
6261
- o("div", null, [
6262
- o("div", Wa, v(s.t("error.connectionFailed")), 1),
6263
- o("div", Ga, v(s.error), 1)
6354
+ a("div", null, [
6355
+ a("div", Xa, v(s.t("error.connectionFailed")), 1),
6356
+ a("div", Za, v(s.error), 1)
6264
6357
  ])
6265
6358
  ])
6266
- ])) : s.currentConv ? (c(), u(E, { key: 2 }, [
6267
- K(k, {
6359
+ ])) : s.currentConv ? (c(), d(E, { key: 2 }, [
6360
+ V(k, {
6268
6361
  ref: "messageList",
6269
6362
  messages: s.displayedMessages,
6270
6363
  "streaming-active": s.streamingActive,
@@ -6278,8 +6371,8 @@ function to(e, t, n, i, r, s) {
6278
6371
  "ai-agent-avatar-url": s.agentAvatarUrl,
6279
6372
  onLoadMore: s.onLoadMore
6280
6373
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
6281
- o("div", Ya, [
6282
- s.floatVisible ? (c(), u("div", Ja, [
6374
+ a("div", eo, [
6375
+ s.floatVisible ? (c(), d("div", to, [
6283
6376
  s.approvalReady ? (c(), P(w, {
6284
6377
  key: 0,
6285
6378
  action: s.approvalTitle,
@@ -6305,15 +6398,15 @@ function to(e, t, n, i, r, s) {
6305
6398
  onSelect: s.onSuggestion
6306
6399
  }, null, 8, ["items", "onSelect"]))
6307
6400
  ], 512)) : y("", !0),
6308
- s.actionInFlight ? (c(), u("div", Qa, [
6309
- t[9] || (t[9] = o("span", {
6401
+ s.actionInFlight ? (c(), d("div", no, [
6402
+ t[9] || (t[9] = a("span", {
6310
6403
  class: "wm-actionWait__spinner",
6311
6404
  "aria-hidden": "true"
6312
6405
  }, null, -1)),
6313
- o("span", Xa, v(s.t("action.inProgress", {
6406
+ a("span", so, v(s.t("action.inProgress", {
6314
6407
  name: s.actionInFlightName
6315
6408
  })), 1)
6316
- ])) : (c(), P(H, {
6409
+ ])) : (c(), P(z, {
6317
6410
  key: 2,
6318
6411
  ref: "composer",
6319
6412
  modelValue: r.draft,
@@ -6346,12 +6439,12 @@ function to(e, t, n, i, r, s) {
6346
6439
  onClose: t[3] || (t[3] = (I) => r.renameDialogOpen = !1),
6347
6440
  onSubmit: s.onRenameSubmit
6348
6441
  }, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
6349
- r.pendingAttachments.length ? (c(), u("div", Za, [
6350
- (c(!0), u(E, null, F(r.pendingAttachments, (I, z) => (c(), u("div", {
6351
- key: z,
6442
+ r.pendingAttachments.length ? (c(), d("div", ro, [
6443
+ (c(!0), d(E, null, F(r.pendingAttachments, (I, q) => (c(), d("div", {
6444
+ key: q,
6352
6445
  class: "wm-attached__chip"
6353
6446
  }, [
6354
- t[11] || (t[11] = o("svg", {
6447
+ t[11] || (t[11] = a("svg", {
6355
6448
  width: "11",
6356
6449
  height: "11",
6357
6450
  viewBox: "0 0 24 24",
@@ -6362,15 +6455,15 @@ function to(e, t, n, i, r, s) {
6362
6455
  "stroke-linejoin": "round",
6363
6456
  "aria-hidden": "true"
6364
6457
  }, [
6365
- o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
6458
+ a("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" })
6366
6459
  ], -1)),
6367
- o("span", null, v(I.name), 1),
6368
- o("button", {
6460
+ a("span", null, v(I.name), 1),
6461
+ a("button", {
6369
6462
  type: "button",
6370
6463
  "aria-label": s.t("attachment.remove"),
6371
- onClick: (Y) => r.pendingAttachments.splice(z, 1)
6464
+ onClick: (Y) => r.pendingAttachments.splice(q, 1)
6372
6465
  }, [...t[10] || (t[10] = [
6373
- o("svg", {
6466
+ a("svg", {
6374
6467
  width: "10",
6375
6468
  height: "10",
6376
6469
  viewBox: "0 0 24 24",
@@ -6381,9 +6474,9 @@ function to(e, t, n, i, r, s) {
6381
6474
  "stroke-linejoin": "round",
6382
6475
  "aria-hidden": "true"
6383
6476
  }, [
6384
- o("path", { d: "M18 6L6 18M6 6l12 12" })
6477
+ a("path", { d: "M18 6L6 18M6 6l12 12" })
6385
6478
  ], -1)
6386
- ])], 8, eo)
6479
+ ])], 8, io)
6387
6480
  ]))), 128))
6388
6481
  ])) : y("", !0)
6389
6482
  ], 64)) : (c(), P(p, {
@@ -6414,55 +6507,55 @@ function to(e, t, n, i, r, s) {
6414
6507
  }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0)
6415
6508
  ], 64))
6416
6509
  ], 6)) : y("", !0)
6417
- ], 2);
6510
+ ], 6);
6418
6511
  }
6419
- const ro = /* @__PURE__ */ N(za, [["render", to], ["__scopeId", "data-v-9e47cfb4"]]), io = "0.5.39";
6512
+ const co = /* @__PURE__ */ N(Wa, [["render", ao], ["__scopeId", "data-v-0d59093c"]]), uo = "0.5.41";
6420
6513
  export {
6421
6514
  le as AIAvatar,
6422
6515
  _e as AVATAR_COLORS,
6423
- hs as ActionResult,
6424
- Ti as ApprovalCard,
6425
- ks as ArtifactFormResponse,
6426
- Ns as ArtifactInfoCard,
6427
- er as ArtifactRenderer,
6428
- Js as ArtifactTicket,
6429
- mr as AttachmentPreview,
6430
- gr as Bubble,
6431
- hi as Composer,
6516
+ vs as ActionResult,
6517
+ Ei as ApprovalCard,
6518
+ Ts as ArtifactFormResponse,
6519
+ js as ArtifactInfoCard,
6520
+ ir as ArtifactRenderer,
6521
+ tr as ArtifactTicket,
6522
+ pr as AttachmentPreview,
6523
+ br as Bubble,
6524
+ vi as Composer,
6432
6525
  et as DEFAULT_BASE_URL,
6433
6526
  ae as DEFAULT_LANGUAGE,
6434
- fa as Feedback,
6435
- ea as FormCard,
6527
+ ya as Feedback,
6528
+ ia as FormCard,
6436
6529
  cn as Header,
6437
6530
  Ce as HumanAvatar,
6438
6531
  Ut as Launcher,
6439
6532
  Ae as MEDIA_RECORDER_SUPPORTED,
6440
- Gr as MessageList,
6441
- ro as Messenger,
6442
- Oa as MoreMenu,
6443
- ts as Onboarding,
6444
- me as SCREEN_CAPTURE_SUPPORTED,
6533
+ Zr as MessageList,
6534
+ co as Messenger,
6535
+ Ra as MoreMenu,
6536
+ as as Onboarding,
6537
+ he as SCREEN_CAPTURE_SUPPORTED,
6445
6538
  tt as SUPPORTED_LANGUAGES,
6446
- pi as SuggestionChips,
6539
+ ki as SuggestionChips,
6447
6540
  Yt as TeamAvatars,
6448
- wr as Typing,
6449
- io as VERSION,
6541
+ Sr as Typing,
6542
+ uo as VERSION,
6450
6543
  we as avatarColor,
6451
6544
  be as avatarInitials,
6452
- Jr as captureScreenshotFile,
6545
+ ti as captureScreenshotFile,
6453
6546
  j as colors,
6454
6547
  Xe as createStore,
6455
6548
  D as createTranslator,
6456
6549
  Ge as createTransport,
6457
6550
  re as dateLocale,
6458
- ro as default,
6551
+ co as default,
6459
6552
  ve as formatTime,
6460
- so as guessAttachmentKind,
6461
- Yr as pickRecorderMime,
6553
+ lo as guessAttachmentKind,
6554
+ ei as pickRecorderMime,
6462
6555
  un as renderInlineMarkdown,
6463
- mn as renderMarkdown,
6556
+ hn as renderMarkdown,
6464
6557
  ke as resolveLanguage,
6465
- Xr as startScreenRecording,
6558
+ si as startScreenRecording,
6466
6559
  Ze as tokensCss,
6467
6560
  Qe as uuid,
6468
6561
  Qe as v4