@_solaris/messenger-widget 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,15 +1,15 @@
1
- import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as j, normalizeClass as L, toDisplayString as y, resolveComponent as P, createVNode as W, Transition as Ne, withCtx as Fe, Fragment as B, renderList as N, withKeys as _e, withModifiers as Y, createElementVNode as l, createCommentVNode as k, createBlock as I, resolveDynamicComponent as Ae, mergeProps as He, withDirectives as $, vModelText as se, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
2
- const Ye = [
1
+ import { reactive as We, openBlock as c, createElementBlock as d, normalizeStyle as F, normalizeClass as R, toDisplayString as v, resolveComponent as P, createVNode as K, Transition as Ae, withCtx as Se, Fragment as E, renderList as N, withKeys as _e, withModifiers as G, createElementVNode as l, createCommentVNode as b, createBlock as B, resolveDynamicComponent as Te, mergeProps as je, withDirectives as $, vModelText as ee, createTextVNode as Me, renderSlot as $e, vModelCheckbox as Ge, vModelSelect as Ye, markRaw as Ie } from "vue";
2
+ const Je = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], we = "/client", Je = 5 * 60 * 1e3, Xe = 15 * 1e3, Qe = 10 * 60 * 1e3, Ze = 5 * 60 * 1e3;
10
- function et(e) {
9
+ ], we = "/client", Xe = 5 * 60 * 1e3, Qe = 15 * 1e3, Ze = 10 * 60 * 1e3, et = 5 * 60 * 1e3;
10
+ function tt(e) {
11
11
  const t = {
12
- baseUrl: tt(e.baseUrl || ""),
12
+ baseUrl: nt(e.baseUrl || ""),
13
13
  widgetId: e.widgetId || "",
14
14
  // Posé après `start()` à partir de la response /session.
15
15
  userId: "",
@@ -40,9 +40,9 @@ function et(e) {
40
40
  }
41
41
  function r(u, g) {
42
42
  const p = t.listeners.get(u);
43
- p && p.forEach((R) => {
43
+ p && p.forEach((L) => {
44
44
  try {
45
- R(g);
45
+ L(g);
46
46
  } catch (O) {
47
47
  console.error("[transport] listener", u, O);
48
48
  }
@@ -65,19 +65,19 @@ function et(e) {
65
65
  };
66
66
  }
67
67
  async function a(u, g, p) {
68
- const R = await fetch(`${t.baseUrl}${we}${g}`, {
68
+ const L = await fetch(`${t.baseUrl}${we}${g}`, {
69
69
  method: u,
70
70
  credentials: "include",
71
71
  headers: n(),
72
72
  body: p !== void 0 ? JSON.stringify(p) : void 0
73
73
  });
74
- if (!R.ok) {
75
- const O = await o(R), V = new Error(
76
- `HTTP ${R.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || R.statusText}`
74
+ if (!L.ok) {
75
+ const O = await o(L), V = new Error(
76
+ `HTTP ${L.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || L.statusText}`
77
77
  );
78
- throw V.status = R.status, V.body = O, V;
78
+ throw V.status = L.status, V.body = O, V;
79
79
  }
80
- return R.status === 204 ? null : R.json();
80
+ return L.status === 204 ? null : L.json();
81
81
  }
82
82
  async function o(u) {
83
83
  try {
@@ -112,53 +112,53 @@ function et(e) {
112
112
  }
113
113
  );
114
114
  if (!g.ok) {
115
- const K = await o(g), te = new Error(
116
- `Session bootstrap failed: HTTP ${g.status} :: ${(K == null ? void 0 : K.error) || g.statusText}`
115
+ const W = await o(g), ne = new Error(
116
+ `Session bootstrap failed: HTTP ${g.status} :: ${(W == null ? void 0 : W.error) || g.statusText}`
117
117
  );
118
- throw te.status = g.status, te.body = K, te;
118
+ throw ne.status = g.status, ne.body = W, ne;
119
119
  }
120
120
  const p = await g.json();
121
121
  t.userId = p.external_id;
122
- const [R, O] = await Promise.all([
122
+ const [L, O] = await Promise.all([
123
123
  fetch(
124
124
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
125
125
  { credentials: "include" }
126
- ).then(async (K) => {
127
- if (!K.ok) {
128
- const te = await o(K);
126
+ ).then(async (W) => {
127
+ if (!W.ok) {
128
+ const ne = await o(W);
129
129
  throw new Error(
130
- `HTTP ${K.status} GET /widgets/:id/config :: ${(te == null ? void 0 : te.error) || K.statusText}`
130
+ `HTTP ${W.status} GET /widgets/:id/config :: ${(ne == null ? void 0 : ne.error) || W.statusText}`
131
131
  );
132
132
  }
133
- return K.json();
133
+ return W.json();
134
134
  }),
135
135
  a("GET", "/customers/me")
136
- ]), V = { config: R, customer: (O == null ? void 0 : O.customer) ?? null };
137
- return t.lastBootstrap = V, await b(), typeof document < "u" && (t.visibilityHandler = _, document.addEventListener(
136
+ ]), V = { config: L, customer: (O == null ? void 0 : O.customer) ?? null };
137
+ return t.lastBootstrap = V, await k(), typeof document < "u" && (t.visibilityHandler = _, document.addEventListener(
138
138
  "visibilitychange",
139
139
  t.visibilityHandler
140
140
  )), m(), V;
141
141
  }
142
- async function b() {
142
+ async function k() {
143
143
  try {
144
- const u = await E();
144
+ const u = await I();
145
145
  t.lastActivityAt = u.reduce((g, p) => {
146
- const R = p == null ? void 0 : p.last_message_at;
147
- return R && (!g || R > g) ? R : g;
146
+ const L = p == null ? void 0 : p.last_message_at;
147
+ return L && (!g || L > g) ? L : g;
148
148
  }, null);
149
149
  } catch (u) {
150
150
  console.error("[transport] initial /conversations failed", u);
151
151
  }
152
152
  }
153
- async function v() {
153
+ async function y() {
154
154
  const u = await a("GET", "/customers/me");
155
155
  return (u == null ? void 0 : u.customer) ?? null;
156
156
  }
157
- async function M(u) {
157
+ async function T(u) {
158
158
  const g = await a("PATCH", "/customers/me", u);
159
159
  return (g == null ? void 0 : g.customer) ?? null;
160
160
  }
161
- async function E() {
161
+ async function I() {
162
162
  const u = await a("GET", "/conversations");
163
163
  return (u == null ? void 0 : u.conversations) ?? [];
164
164
  }
@@ -171,14 +171,14 @@ function et(e) {
171
171
  `/conversations/${encodeURIComponent(u)}`
172
172
  )).conversation;
173
173
  }
174
- async function T(u, g) {
174
+ async function M(u, g) {
175
175
  return (await a(
176
176
  "PATCH",
177
177
  `/conversations/${encodeURIComponent(u)}`,
178
178
  g
179
179
  )).conversation;
180
180
  }
181
- async function U(u, g) {
181
+ async function D(u, g) {
182
182
  return a(
183
183
  "PATCH",
184
184
  `/conversations/${encodeURIComponent(u)}/read`,
@@ -188,14 +188,14 @@ function et(e) {
188
188
  async function x(u, g = {}) {
189
189
  const p = new URLSearchParams();
190
190
  g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
191
- const R = p.toString() ? `?${p.toString()}` : "";
191
+ const L = p.toString() ? `?${p.toString()}` : "";
192
192
  return a(
193
193
  "GET",
194
- `/conversations/${encodeURIComponent(u)}/messages${R}`
194
+ `/conversations/${encodeURIComponent(u)}/messages${L}`
195
195
  );
196
196
  }
197
197
  async function q(u, g) {
198
- ee();
198
+ te();
199
199
  const p = {
200
200
  client_msg_id: g.client_msg_id,
201
201
  type: "content",
@@ -210,16 +210,16 @@ function et(e) {
210
210
  );
211
211
  }
212
212
  async function J(u, g, p) {
213
- return ee(), a(
213
+ return te(), a(
214
214
  "POST",
215
215
  `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
216
216
  p ? { inputs: p } : {}
217
217
  );
218
218
  }
219
219
  async function ie(u) {
220
- const g = u.name || "attachment", p = u.type || "application/octet-stream", R = u.size || 0, O = await a("POST", "/attachments", {
220
+ const g = u.name || "attachment", p = u.type || "application/octet-stream", L = u.size || 0, O = await a("POST", "/attachments", {
221
221
  mime_type: p,
222
- size_bytes: R,
222
+ size_bytes: L,
223
223
  name: g
224
224
  }), V = await fetch(O.upload_url, {
225
225
  method: "PUT",
@@ -229,10 +229,10 @@ function et(e) {
229
229
  if (!V.ok)
230
230
  throw new Error(`HTTP ${V.status} PUT signed upload`);
231
231
  return {
232
- type: nt(p),
232
+ type: st(p),
233
233
  path: O.path,
234
234
  mime_type: p,
235
- size_bytes: R
235
+ size_bytes: L
236
236
  };
237
237
  }
238
238
  async function ae(u) {
@@ -249,7 +249,7 @@ function et(e) {
249
249
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
250
250
  try {
251
251
  const u = new EventSource(X(), { withCredentials: !0 });
252
- for (const g of Ye)
252
+ for (const g of Je)
253
253
  u.addEventListener(g, (p) => oe(g, p.data));
254
254
  u.addEventListener(
255
255
  "error",
@@ -261,8 +261,8 @@ function et(e) {
261
261
  }
262
262
  function oe(u, g) {
263
263
  try {
264
- const p = JSON.parse(g), R = p && typeof p == "object" && "data" in p ? p.data : p;
265
- r(u, R);
264
+ const p = JSON.parse(g), L = p && typeof p == "object" && "data" in p ? p.data : p;
265
+ r(u, L);
266
266
  } catch (p) {
267
267
  console.error("[transport] bad SSE payload", u, p);
268
268
  }
@@ -270,29 +270,29 @@ function et(e) {
270
270
  function Z() {
271
271
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && i("idle");
272
272
  }
273
- function ee() {
273
+ function te() {
274
274
  clearTimeout(t.burstTimer), Q(), t.panelOpen || (t.burstTimer = setTimeout(() => {
275
275
  t.panelOpen || Z();
276
- }, Qe));
276
+ }, Ze));
277
277
  }
278
- function ve(u) {
278
+ function ye(u) {
279
279
  const g = t.panelOpen;
280
- t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), Q()) : ee(), g !== t.panelOpen && m();
280
+ t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), Q()) : te(), g !== t.panelOpen && m();
281
281
  }
282
282
  async function pe() {
283
283
  try {
284
- const u = await E(), g = u.reduce((R, O) => {
284
+ const u = await I(), g = u.reduce((L, O) => {
285
285
  const V = O == null ? void 0 : O.last_message_at;
286
- return V && (!R || V > R) ? V : R;
286
+ return V && (!L || V > L) ? V : L;
287
287
  }, null);
288
- g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ee());
288
+ g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), te());
289
289
  } catch (u) {
290
290
  console.error("[transport] poll failed", u);
291
291
  }
292
292
  }
293
293
  function m() {
294
294
  if (h(), typeof document < "u" && document.hidden) return;
295
- const u = t.panelOpen ? Xe : Je;
295
+ const u = t.panelOpen ? Qe : Xe;
296
296
  t.pollTimer = setInterval(pe, u);
297
297
  }
298
298
  function h() {
@@ -302,7 +302,7 @@ function et(e) {
302
302
  if (document.hidden)
303
303
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
304
304
  t.hiddenGraceTimer = null, document.hidden && (h(), Z(), i("paused"));
305
- }, Ze);
305
+ }, et);
306
306
  else {
307
307
  if (t.hiddenGraceTimer) {
308
308
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
@@ -334,17 +334,17 @@ function et(e) {
334
334
  on: s,
335
335
  start: f,
336
336
  stop: w,
337
- setPanelOpen: ve,
337
+ setPanelOpen: ye,
338
338
  update: A,
339
339
  context: C,
340
340
  // REST
341
- getCustomer: v,
342
- patchCustomer: M,
343
- listConversations: E,
341
+ getCustomer: y,
342
+ patchCustomer: T,
343
+ listConversations: I,
344
344
  createConversation: S,
345
345
  getConversation: z,
346
- patchConversation: T,
347
- markConversationRead: U,
346
+ patchConversation: M,
347
+ markConversationRead: D,
348
348
  listMessages: x,
349
349
  postMessage: q,
350
350
  postCallback: J,
@@ -356,13 +356,13 @@ function et(e) {
356
356
  }
357
357
  };
358
358
  }
359
- function tt(e) {
359
+ function nt(e) {
360
360
  return e.endsWith("/") ? e.slice(0, -1) : e;
361
361
  }
362
- function nt(e) {
362
+ function st(e) {
363
363
  return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : "file";
364
364
  }
365
- function st() {
365
+ function rt() {
366
366
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
367
367
  return crypto.randomUUID();
368
368
  const e = new Uint8Array(16);
@@ -374,8 +374,8 @@ function st() {
374
374
  const t = [...e].map((s) => s.toString(16).padStart(2, "0"));
375
375
  return t.slice(0, 4).join("") + "-" + t.slice(4, 6).join("") + "-" + t.slice(6, 8).join("") + "-" + t.slice(8, 10).join("") + "-" + t.slice(10, 16).join("");
376
376
  }
377
- function rt(e) {
378
- const t = Ke({
377
+ function it(e) {
378
+ const t = We({
379
379
  ready: !1,
380
380
  error: null,
381
381
  config: null,
@@ -478,7 +478,7 @@ function rt(e) {
478
478
  e.stop();
479
479
  }
480
480
  async function n(m) {
481
- const h = ve(m);
481
+ const h = ye(m);
482
482
  if (!h) return t.customer;
483
483
  try {
484
484
  const _ = await e.patchCustomer(h);
@@ -496,7 +496,7 @@ function rt(e) {
496
496
  async function f(m) {
497
497
  const h = t.paginationByConv[m];
498
498
  if (!(h != null && h.loaded || h != null && h.loading)) {
499
- v(m, { nextCursor: null, loading: !0, loaded: !1 });
499
+ y(m, { nextCursor: null, loading: !0, loaded: !1 });
500
500
  try {
501
501
  const _ = await e.listMessages(m, {
502
502
  limit: o
@@ -505,14 +505,14 @@ function rt(e) {
505
505
  (g == null ? void 0 : g.id) != null && C.add(`id:${String(g.id)}`), g != null && g.client_msg_id && C.add(`c:${g.client_msg_id}`);
506
506
  const u = A.filter((g) => !((g == null ? void 0 : g.id) != null && C.has(`id:${String(g.id)}`) || g != null && g.client_msg_id && C.has(`c:${g.client_msg_id}`)));
507
507
  t.messagesByConv[m] = [...w, ...u].sort(
508
- ee
509
- ), v(m, {
508
+ te
509
+ ), y(m, {
510
510
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
511
511
  loading: !1,
512
512
  loaded: !0
513
513
  });
514
514
  } catch (_) {
515
- console.error("[store] openConversation failed", _), v(m, {
515
+ console.error("[store] openConversation failed", _), y(m, {
516
516
  nextCursor: null,
517
517
  loading: !1,
518
518
  loaded: !1
@@ -520,13 +520,13 @@ function rt(e) {
520
520
  }
521
521
  }
522
522
  }
523
- async function b(m) {
523
+ async function k(m) {
524
524
  var A;
525
525
  const h = t.paginationByConv[m];
526
526
  if (!h || h.loading || !h.nextCursor) return;
527
527
  const w = (A = (t.messagesByConv[m] || []).find((C) => C == null ? void 0 : C.created_at)) == null ? void 0 : A.created_at;
528
528
  if (w) {
529
- v(m, { ...h, loading: !0 });
529
+ y(m, { ...h, loading: !0 });
530
530
  try {
531
531
  const C = await e.listMessages(m, {
532
532
  before: w,
@@ -534,25 +534,25 @@ function rt(e) {
534
534
  }), u = (C == null ? void 0 : C.messages) ?? [], g = t.messagesByConv[m] || [], p = /* @__PURE__ */ new Set();
535
535
  for (const O of g)
536
536
  (O == null ? void 0 : O.id) != null && p.add(`id:${String(O.id)}`), O != null && O.client_msg_id && p.add(`c:${O.client_msg_id}`);
537
- const R = u.filter((O) => !((O == null ? void 0 : O.id) != null && p.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && p.has(`c:${O.client_msg_id}`)));
538
- t.messagesByConv[m] = [...R, ...g], v(m, {
537
+ const L = u.filter((O) => !((O == null ? void 0 : O.id) != null && p.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && p.has(`c:${O.client_msg_id}`)));
538
+ t.messagesByConv[m] = [...L, ...g], y(m, {
539
539
  nextCursor: (C == null ? void 0 : C.next_cursor) ?? null,
540
540
  loading: !1,
541
541
  loaded: !0
542
542
  });
543
543
  } catch (C) {
544
- console.error("[store] loadMore failed", C), v(m, { ...h, loading: !1 });
544
+ console.error("[store] loadMore failed", C), y(m, { ...h, loading: !1 });
545
545
  }
546
546
  }
547
547
  }
548
- function v(m, h) {
548
+ function y(m, h) {
549
549
  t.paginationByConv = { ...t.paginationByConv, [m]: h };
550
550
  }
551
- async function M(m, h) {
551
+ async function T(m, h) {
552
552
  const _ = await e.patchConversation(m, h), w = t.conversations.findIndex((A) => A.id === m);
553
553
  w !== -1 && (t.conversations[w] = _);
554
554
  }
555
- async function E(m) {
555
+ async function I(m) {
556
556
  if (!m) return [];
557
557
  const h = t.messagesByConv[m] || [];
558
558
  let _ = "";
@@ -569,8 +569,8 @@ function rt(e) {
569
569
  (p == null ? void 0 : p.id) != null && C.add(String(p.id)), p != null && p.client_msg_id && u.add(p.client_msg_id);
570
570
  const g = [];
571
571
  for (const p of A) {
572
- const R = (p == null ? void 0 : p.id) != null && C.has(String(p.id)) || (p == null ? void 0 : p.client_msg_id) && u.has(p.client_msg_id);
573
- X(m, p), R || g.push(p);
572
+ const L = (p == null ? void 0 : p.id) != null && C.has(String(p.id)) || (p == null ? void 0 : p.client_msg_id) && u.has(p.client_msg_id);
573
+ X(m, p), L || g.push(p);
574
574
  }
575
575
  return g;
576
576
  } catch (w) {
@@ -590,10 +590,10 @@ function rt(e) {
590
590
  }
591
591
  }
592
592
  async function z(m, h, { attachments: _, metadata: w } = {}) {
593
- var R;
593
+ var L;
594
594
  const A = (h || "").trim(), C = Array.isArray(_) && _.length > 0;
595
595
  if (!m || !A && !C) return;
596
- const u = st(), g = pe(m), p = {
596
+ const u = rt(), g = pe(m), p = {
597
597
  id: u,
598
598
  client_msg_id: u,
599
599
  conversation_id: m,
@@ -601,7 +601,7 @@ function rt(e) {
601
601
  text_md: A,
602
602
  author: {
603
603
  type: "user",
604
- id: ((R = t.customer) == null ? void 0 : R.external_id) || null
604
+ id: ((L = t.customer) == null ? void 0 : L.external_id) || null
605
605
  },
606
606
  created_at: g,
607
607
  // Local-only flag — UI may render dimmed until the SSE echo lands.
@@ -625,7 +625,7 @@ function rt(e) {
625
625
  });
626
626
  }
627
627
  }
628
- async function T(m, h, _) {
628
+ async function M(m, h, _) {
629
629
  m != null && (t.awaitingCallback[m] = !0);
630
630
  try {
631
631
  await e.postCallback(m, h, _);
@@ -633,10 +633,10 @@ function rt(e) {
633
633
  console.error("[store] callback failed", w), m != null && delete t.awaitingCallback[m];
634
634
  }
635
635
  }
636
- const U = /* @__PURE__ */ new Map();
636
+ const D = /* @__PURE__ */ new Map();
637
637
  async function x(m) {
638
638
  if (!m) return null;
639
- const h = U.get(m);
639
+ const h = D.get(m);
640
640
  if (h != null && h.url) {
641
641
  const _ = h.expires_at ? Date.parse(h.expires_at) : 0;
642
642
  if (!_ || _ - Date.now() > 6e4) return h.url;
@@ -644,7 +644,7 @@ function rt(e) {
644
644
  try {
645
645
  const _ = await e.signAttachment(m);
646
646
  if (_ != null && _.signed_url)
647
- return U.set(m, {
647
+ return D.set(m, {
648
648
  url: _.signed_url,
649
649
  expires_at: _.expires_at
650
650
  }), _.signed_url;
@@ -662,7 +662,7 @@ function rt(e) {
662
662
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
663
663
  }
664
664
  };
665
- await M(m, { metadata: C });
665
+ await T(m, { metadata: C });
666
666
  }
667
667
  function J(m) {
668
668
  var _, w;
@@ -719,7 +719,7 @@ function rt(e) {
719
719
  (u) => (u == null ? void 0 : u.client_msg_id) && u.client_msg_id === h.client_msg_id
720
720
  )), w === -1 && (h == null ? void 0 : h.id) !== void 0 && (h == null ? void 0 : h.id) !== null && (w = _.findIndex((u) => Q(u == null ? void 0 : u.id, h.id)));
721
721
  let A;
722
- w === -1 ? A = [..._, h].sort(ee) : (A = _.slice(), A[w] = {
722
+ w === -1 ? A = [..._, h].sort(te) : (A = _.slice(), A[w] = {
723
723
  ..._[w],
724
724
  ...h,
725
725
  _pending: !1,
@@ -748,10 +748,10 @@ function rt(e) {
748
748
  ), t.conversations = A;
749
749
  }
750
750
  }
751
- function ee(m, h) {
751
+ function te(m, h) {
752
752
  return (m.created_at || "").localeCompare(h.created_at || "");
753
753
  }
754
- function ve(m) {
754
+ function ye(m) {
755
755
  if (!m || typeof m != "object") return null;
756
756
  const h = {}, _ = {};
757
757
  for (const [w, A] of Object.entries(m))
@@ -773,12 +773,12 @@ function rt(e) {
773
773
  applyCustomer: n,
774
774
  createConversation: a,
775
775
  openConversation: f,
776
- loadMore: b,
777
- fetchSinceLast: E,
778
- patchConversation: M,
776
+ loadMore: k,
777
+ fetchSinceLast: I,
778
+ patchConversation: T,
779
779
  markConversationRead: S,
780
780
  send: z,
781
- clickCallback: T,
781
+ clickCallback: M,
782
782
  signAttachment: x,
783
783
  submitFeedback: q,
784
784
  getActionInFlight: ie,
@@ -788,7 +788,7 @@ function rt(e) {
788
788
  setPanelOpen: e.setPanelOpen
789
789
  };
790
790
  }
791
- const H = {
791
+ const j = {
792
792
  w: "#ffffff",
793
793
  g50: "#F9F9F7",
794
794
  g100: "#F2F1EE",
@@ -812,37 +812,37 @@ const H = {
812
812
  "#D97706",
813
813
  "#059669"
814
814
  ];
815
- function Me(e = "") {
815
+ function xe(e = "") {
816
816
  return e ? be[e.charCodeAt(0) % be.length] : be[0];
817
817
  }
818
- function Te(e = "") {
818
+ function Oe(e = "") {
819
819
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
820
820
  }
821
821
  function Ce(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
822
822
  return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
823
823
  }
824
- const it = `
824
+ const at = `
825
825
  @import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
826
826
 
827
827
  .wm-root {
828
828
  --wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
829
829
  --wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
830
- --wm-w: ${H.w};
831
- --wm-g50: ${H.g50};
832
- --wm-g100: ${H.g100};
833
- --wm-g150: ${H.g150};
834
- --wm-g200: ${H.g200};
835
- --wm-g300: ${H.g300};
836
- --wm-g400: ${H.g400};
837
- --wm-g500: ${H.g500};
838
- --wm-g700: ${H.g700};
839
- --wm-g900: ${H.g900};
840
- --wm-a: ${H.accent};
841
- --wm-al: ${H.accentLight};
842
- --wm-primary: ${H.accent};
843
- --wm-green: ${H.green};
844
- --wm-red: ${H.red};
845
- --wm-redBg: ${H.redBg};
830
+ --wm-w: ${j.w};
831
+ --wm-g50: ${j.g50};
832
+ --wm-g100: ${j.g100};
833
+ --wm-g150: ${j.g150};
834
+ --wm-g200: ${j.g200};
835
+ --wm-g300: ${j.g300};
836
+ --wm-g400: ${j.g400};
837
+ --wm-g500: ${j.g500};
838
+ --wm-g700: ${j.g700};
839
+ --wm-g900: ${j.g900};
840
+ --wm-a: ${j.accent};
841
+ --wm-al: ${j.accentLight};
842
+ --wm-primary: ${j.accent};
843
+ --wm-green: ${j.green};
844
+ --wm-red: ${j.red};
845
+ --wm-redBg: ${j.redBg};
846
846
  --wm-sh1: 0 1px 3px rgba(0,0,0,.06);
847
847
  --wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
848
848
  --wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
@@ -868,11 +868,11 @@ const it = `
868
868
  0% { transform: translateX(110%); opacity: 0; }
869
869
  100% { transform: translateX(0); opacity: 1; }
870
870
  }
871
- `, at = "https://api.messenger.victorc.fr", ot = /^[a-zA-Z]{3,32}$/, lt = /^#[0-9a-fA-F]{3,8}$/, ct = /^(rgb|rgba|hsl|hsla)\(\s*[\d.,%\s/]{1,60}\)$/;
872
- function dt(e) {
873
- return typeof e != "string" || !e || e.length > 64 ? !1 : lt.test(e) || ct.test(e) || ot.test(e);
874
- }
871
+ `, ot = "https://api.messenger.victorc.fr", lt = /^[a-zA-Z]{3,32}$/, ct = /^#[0-9a-fA-F]{3,8}$/, dt = /^(rgb|rgba|hsl|hsla)\(\s*[\d.,%\s/]{1,60}\)$/;
875
872
  function ut(e) {
873
+ return typeof e != "string" || !e || e.length > 64 ? !1 : ct.test(e) || dt.test(e) || lt.test(e);
874
+ }
875
+ function Ee(e) {
876
876
  if (typeof e != "string" || !e || e.length > 2048 || /["'()\\;\s<>]/.test(e)) return null;
877
877
  let t;
878
878
  try {
@@ -882,7 +882,7 @@ function ut(e) {
882
882
  }
883
883
  return t.protocol === "https:" || t.protocol === "http:" || t.protocol === "data:" && /^data:image\//i.test(e) ? e : null;
884
884
  }
885
- const ue = "fr", mt = ["fr", "en"], Le = { fr: "fr-FR", en: "en-US" }, ke = {
885
+ const ue = "fr", mt = ["fr", "en"], Be = { fr: "fr-FR", en: "en-US" }, ke = {
886
886
  fr: {
887
887
  // ── Common ───────────────────────────────────────────────────────
888
888
  "common.newConversation": "Nouvelle conversation",
@@ -918,6 +918,7 @@ const ue = "fr", mt = ["fr", "en"], Le = { fr: "fr-FR", en: "en-US" }, ke = {
918
918
  "launcher.unreadConversationsMany": "{count} conversations non lues",
919
919
  // ── Onboarding ───────────────────────────────────────────────────
920
920
  "onboarding.start": "Commencer une conversation",
921
+ "onboarding.starterPlaceholder": "Écrivez votre message…",
921
922
  "onboarding.quickAccess": "Accès rapide",
922
923
  "onboarding.recentConversations": "Conversations récentes",
923
924
  "onboarding.search": "Rechercher dans vos messages",
@@ -1053,6 +1054,7 @@ Je réponds en quelques secondes.`,
1053
1054
  "launcher.unreadConversationsMany": "{count} unread conversations",
1054
1055
  // ── Onboarding ───────────────────────────────────────────────────
1055
1056
  "onboarding.start": "Start a conversation",
1057
+ "onboarding.starterPlaceholder": "Type your message…",
1056
1058
  "onboarding.quickAccess": "Quick access",
1057
1059
  "onboarding.recentConversations": "Recent conversations",
1058
1060
  "onboarding.search": "Search your messages",
@@ -1154,40 +1156,40 @@ I reply within seconds.`,
1154
1156
  "export.createdOn": "Created on: {date}"
1155
1157
  }
1156
1158
  };
1157
- function xe(e) {
1159
+ function Re(e) {
1158
1160
  if (typeof e != "string") return ue;
1159
1161
  const t = e.trim().toLowerCase().slice(0, 2);
1160
1162
  return mt.includes(t) ? t : ue;
1161
1163
  }
1162
1164
  function re(e) {
1163
- return Le[xe(e)] || Le[ue];
1165
+ return Be[Re(e)] || Be[ue];
1164
1166
  }
1165
- function F(e) {
1166
- const t = xe(e), s = ke[t] || ke[ue], r = ke[ue];
1167
+ function H(e) {
1168
+ const t = Re(e), s = ke[t] || ke[ue], r = ke[ue];
1167
1169
  return function(n, a) {
1168
1170
  let o = s[n];
1169
1171
  return o == null && (o = r[n]), o == null ? n : (a && (o = o.replace(
1170
1172
  /\{(\w+)\}/g,
1171
- (f, b) => a[b] != null ? String(a[b]) : f
1173
+ (f, k) => a[k] != null ? String(a[k]) : f
1172
1174
  )), o);
1173
1175
  };
1174
1176
  }
1175
- function Ee(e, t) {
1177
+ function Pe(e, t) {
1176
1178
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1177
1179
  const s = e.options.find((r) => (r == null ? void 0 : r.value) === t);
1178
1180
  return (s == null ? void 0 : s.label) || t;
1179
1181
  }
1180
- function je(e, t, s) {
1181
- return Array.isArray(t) ? t.map((r) => Ee(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ee(e, String(t));
1182
+ function ze(e, t, s) {
1183
+ return Array.isArray(t) ? t.map((r) => Pe(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Pe(e, String(t));
1182
1184
  }
1183
- function ht(e, t, s = F()) {
1185
+ function ht(e, t, s = H()) {
1184
1186
  if (!e || !t) return "";
1185
1187
  const r = Array.isArray(e.fields) ? e.fields : [], i = [];
1186
1188
  for (const n of r) {
1187
1189
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1188
1190
  const a = t[n.key];
1189
1191
  if (a == null || a === "") continue;
1190
- const o = je(n, a, s);
1192
+ const o = ze(n, a, s);
1191
1193
  o && i.push(`${n.label} :
1192
1194
  ${o}`);
1193
1195
  }
@@ -1195,13 +1197,13 @@ ${o}`);
1195
1197
 
1196
1198
  `);
1197
1199
  }
1198
- function ft(e, t, s = F()) {
1200
+ function ft(e, t, s = H()) {
1199
1201
  const r = [], i = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1200
1202
  for (const n of i) {
1201
1203
  if (!(n != null && n.key) || !(n != null && n.label)) continue;
1202
1204
  const a = t == null ? void 0 : t[n.key];
1203
1205
  if (a == null || a === "") continue;
1204
- const o = je(n, a, s);
1206
+ const o = ze(n, a, s);
1205
1207
  if (!o) continue;
1206
1208
  const f = n.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
1207
1209
  `));
@@ -1215,80 +1217,80 @@ function ft(e, t, s = F()) {
1215
1217
  }
1216
1218
  };
1217
1219
  }
1218
- function ze(e) {
1220
+ function qe(e) {
1219
1221
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1220
1222
  }
1221
1223
  function fe(e) {
1222
1224
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
1223
1225
  }
1224
- const Be = "";
1226
+ const Ue = "";
1225
1227
  function de(e) {
1226
1228
  let t = e;
1227
1229
  const s = [];
1228
1230
  return t = t.replace(/`([^`\n]+)`/g, (r, i) => {
1229
1231
  const n = s.length;
1230
- return s.push(i), `${Be}CODE${n}${Be}`;
1232
+ return s.push(i), `${Ue}CODE${n}${Ue}`;
1231
1233
  }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) => fe(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${i}</a>` : i), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (r, i) => `<code class="wm-md-code">${s[+i]}</code>`), t;
1232
1234
  }
1233
- function qe(e) {
1235
+ function Ve(e) {
1234
1236
  if (!e) return "";
1235
1237
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
1236
- return de(ze(t));
1238
+ return de(qe(t));
1237
1239
  }
1238
1240
  function _t(e) {
1239
1241
  if (!e) return "";
1240
- const t = ze(e).split(`
1242
+ const t = qe(e).split(`
1241
1243
  `), s = [];
1242
1244
  let r = 0;
1243
1245
  for (; r < t.length; ) {
1244
1246
  const n = t[r];
1245
1247
  if (/^\s*```([\w-]*)\s*$/.exec(n)) {
1246
1248
  r++;
1247
- const b = [];
1249
+ const k = [];
1248
1250
  for (; r < t.length && !/^\s*```\s*$/.test(t[r]); )
1249
- b.push(t[r]), r++;
1251
+ k.push(t[r]), r++;
1250
1252
  r < t.length && r++, s.push({
1251
1253
  type: "block",
1252
- html: `<pre class="wm-md-pre"><code>${b.join(`
1254
+ html: `<pre class="wm-md-pre"><code>${k.join(`
1253
1255
  `)}</code></pre>`
1254
1256
  });
1255
1257
  continue;
1256
1258
  }
1257
1259
  if (/^\s*[-*]\s+/.test(n)) {
1258
- const b = [];
1260
+ const k = [];
1259
1261
  for (; r < t.length; ) {
1260
- const M = /^\s*[-*]\s+(.*)$/.exec(t[r]);
1261
- if (!M) break;
1262
- b.push(M[1]), r++;
1262
+ const T = /^\s*[-*]\s+(.*)$/.exec(t[r]);
1263
+ if (!T) break;
1264
+ k.push(T[1]), r++;
1263
1265
  }
1264
- const v = b.map((M) => `<li>${de(M)}</li>`).join("");
1266
+ const y = k.map((T) => `<li>${de(T)}</li>`).join("");
1265
1267
  s.push({
1266
1268
  type: "block",
1267
- html: `<ul class="wm-md-ul">${v}</ul>`
1269
+ html: `<ul class="wm-md-ul">${y}</ul>`
1268
1270
  });
1269
1271
  continue;
1270
1272
  }
1271
1273
  const o = /^\s*(\d+)\.\s+(.*)$/.exec(n);
1272
1274
  if (o) {
1273
- const b = parseInt(o[1], 10), v = [o[2]];
1275
+ const k = parseInt(o[1], 10), y = [o[2]];
1274
1276
  for (r++; r < t.length; ) {
1275
1277
  const S = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
1276
1278
  if (!S) break;
1277
- v.push(S[1]), r++;
1279
+ y.push(S[1]), r++;
1278
1280
  }
1279
- const M = v.map((S) => `<li>${de(S)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
1281
+ const T = y.map((S) => `<li>${de(S)}</li>`).join(""), I = k !== 1 ? ` start="${k}"` : "";
1280
1282
  s.push({
1281
1283
  type: "block",
1282
- html: `<ol class="wm-md-ol"${E}>${M}</ol>`
1284
+ html: `<ol class="wm-md-ol"${I}>${T}</ol>`
1283
1285
  });
1284
1286
  continue;
1285
1287
  }
1286
1288
  const f = /^(#{1,6})\s+(.*)$/.exec(n);
1287
1289
  if (f) {
1288
- const b = f[1].length;
1290
+ const k = f[1].length;
1289
1291
  s.push({
1290
1292
  type: "block",
1291
- html: `<h${b} class="wm-md-h wm-md-h${b}">${de(f[2])}</h${b}>`
1293
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${de(f[2])}</h${k}>`
1292
1294
  }), r++;
1293
1295
  continue;
1294
1296
  }
@@ -1309,12 +1311,12 @@ function me(e) {
1309
1311
  const t = (s = e == null ? void 0 : e.author) == null ? void 0 : s.type;
1310
1312
  return t === "agent_ia" || t === "agent_human";
1311
1313
  }
1312
- function G(e) {
1314
+ function Y(e) {
1313
1315
  if (e == null) return null;
1314
1316
  const t = typeof e == "number" ? e : Number(e);
1315
1317
  return Number.isFinite(t) ? t : null;
1316
1318
  }
1317
- function Ie(e, t) {
1319
+ function De(e, t) {
1318
1320
  let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
1319
1321
  for (const r of t)
1320
1322
  r != null && r.created_at && r.created_at > s && (s = r.created_at);
@@ -1333,10 +1335,10 @@ function gt(e, t) {
1333
1335
  }
1334
1336
  return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((i = e == null ? void 0 : e.metadata) == null ? void 0 : i.last_preview) || "";
1335
1337
  }
1336
- function yt(e, t) {
1338
+ function vt(e, t) {
1337
1339
  return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
1338
1340
  }
1339
- function vt(e, t, s, r) {
1341
+ function yt(e, t, s, r) {
1340
1342
  const i = [
1341
1343
  `# ${e.name || s("common.conversation")}`,
1342
1344
  e.created_at ? s("export.createdOn", {
@@ -1348,15 +1350,15 @@ function vt(e, t, s, r) {
1348
1350
  if (!n) continue;
1349
1351
  const a = (n.text_md || "").trim();
1350
1352
  if (!a) continue;
1351
- const o = yt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1353
+ const o = vt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
1352
1354
  i.push(`[${f}] ${o} :`), i.push(a), i.push("");
1353
1355
  }
1354
1356
  return i.join(`
1355
1357
  `);
1356
1358
  }
1357
- function pt(e, t, s = F(), r) {
1359
+ function pt(e, t, s = H(), r) {
1358
1360
  if (!e) return;
1359
- const i = vt(e, t || [], s, re(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1361
+ const i = yt(e, t || [], s, re(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
1360
1362
  try {
1361
1363
  const a = URL.createObjectURL(n), o = document.createElement("a");
1362
1364
  o.href = a, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(a), 1e3);
@@ -1689,10 +1691,10 @@ const wt = {
1689
1691
  this.nextRevealAt + s.pauseBetweenMs
1690
1692
  ) + n;
1691
1693
  this.nextRevealAt = o;
1692
- const f = Math.max(0, o - r), b = e.id, v = setTimeout(() => {
1693
- this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== v), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1694
+ const f = Math.max(0, o - r), k = e.id, y = setTimeout(() => {
1695
+ this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1694
1696
  }, f);
1695
- this.revealTimers.push(v);
1697
+ this.revealTimers.push(y);
1696
1698
  },
1697
1699
  // Walk the message list and queue / instantly-reveal every new
1698
1700
  // entry according to its origin. Used by the `currentConvMessages`
@@ -1791,7 +1793,7 @@ const wt = {
1791
1793
  if (!(e != null && e.id) || e._draft || !this.store) return;
1792
1794
  const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s = At(t);
1793
1795
  if (s == null) return;
1794
- const r = G(e.last_read_message_id), i = G(s);
1796
+ const r = Y(e.last_read_message_id), i = Y(s);
1795
1797
  i != null && (r != null && i <= r || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
1796
1798
  const o = this._readMarkerPending;
1797
1799
  this._readMarkerPending = null, this._readMarkerTimer = null, o && this.store && this.store.markConversationRead(
@@ -1805,12 +1807,12 @@ const wt = {
1805
1807
  function At(e) {
1806
1808
  for (let t = e.length - 1; t >= 0; t--) {
1807
1809
  const s = e[t];
1808
- if (!(!s || s._pending) && G(s.id) != null)
1810
+ if (!(!s || s._pending) && Y(s.id) != null)
1809
1811
  return s.id;
1810
1812
  }
1811
1813
  return null;
1812
1814
  }
1813
- const D = (e, t) => {
1815
+ const U = (e, t) => {
1814
1816
  const s = e.__vccOpts || e;
1815
1817
  for (const [r, i] of t)
1816
1818
  s[r] = i;
@@ -1829,17 +1831,17 @@ const D = (e, t) => {
1829
1831
  },
1830
1832
  computed: {
1831
1833
  bg() {
1832
- return this.avatarUrl ? "transparent" : Me(this.name);
1834
+ return this.avatarUrl ? "transparent" : xe(this.name);
1833
1835
  },
1834
1836
  initials() {
1835
- return Te(this.name);
1837
+ return Oe(this.name);
1836
1838
  }
1837
1839
  }
1838
- }, Mt = ["src", "alt"];
1839
- function Tt(e, t, s, r, i, n) {
1840
+ }, Tt = ["src", "alt"];
1841
+ function Mt(e, t, s, r, i, n) {
1840
1842
  return c(), d("div", {
1841
- class: L(["wm-huav", { "wm-huav--tail": s.tail }]),
1842
- style: j({
1843
+ class: R(["wm-huav", { "wm-huav--tail": s.tail }]),
1844
+ style: F({
1843
1845
  width: s.size + "px",
1844
1846
  height: s.size + "px",
1845
1847
  "--wm-avr": Math.round(s.size * 0.32) + "px",
@@ -1850,19 +1852,19 @@ function Tt(e, t, s, r, i, n) {
1850
1852
  key: 0,
1851
1853
  src: s.avatarUrl,
1852
1854
  alt: s.name || ""
1853
- }, null, 8, Mt)) : (c(), d("span", {
1855
+ }, null, 8, Tt)) : (c(), d("span", {
1854
1856
  key: 1,
1855
- style: j({ fontSize: s.size * 0.36 + "px" })
1856
- }, y(n.initials), 5))
1857
+ style: F({ fontSize: s.size * 0.36 + "px" })
1858
+ }, v(n.initials), 5))
1857
1859
  ], 6);
1858
1860
  }
1859
- const ye = /* @__PURE__ */ D(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1861
+ const ve = /* @__PURE__ */ U(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
1860
1862
  name: "WmLauncher",
1861
- components: { HumanAvatar: ye },
1863
+ components: { HumanAvatar: ve },
1862
1864
  inject: {
1863
1865
  // Translator shared by the Messenger shell; French fallback when
1864
1866
  // the component is used standalone.
1865
- t: { default: () => F() }
1867
+ t: { default: () => H() }
1866
1868
  },
1867
1869
  props: {
1868
1870
  // Nombre de conversations non lues — pilote la pastille.
@@ -1882,7 +1884,7 @@ const ye = /* @__PURE__ */ D(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
1882
1884
  return this.peeks.slice(0, xt).reverse();
1883
1885
  }
1884
1886
  }
1885
- }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], Et = { class: "wm-peek__avatar" }, Bt = ["aria-label"], It = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, Ft = ["onClick"], Ht = ["aria-label"], jt = ["aria-label"];
1887
+ }, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Ut = { class: "wm-peek__name" }, Dt = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, Ft = ["onClick"], Ht = ["aria-label"], jt = ["aria-label"];
1886
1888
  function zt(e, t, s, r, i, n) {
1887
1889
  const a = P("HumanAvatar");
1888
1890
  return c(), d("div", {
@@ -1892,16 +1894,16 @@ function zt(e, t, s, r, i, n) {
1892
1894
  onFocusin: t[3] || (t[3] = (o) => e.$emit("hover", !0)),
1893
1895
  onFocusout: t[4] || (t[4] = (o) => e.$emit("hover", !1))
1894
1896
  }, [
1895
- W(Ne, { name: "wm-peek" }, {
1896
- default: Fe(() => [
1897
+ K(Ae, { name: "wm-peek" }, {
1898
+ default: Se(() => [
1897
1899
  n.visiblePeeks.length ? (c(), d("div", {
1898
1900
  key: 0,
1899
- class: L(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1901
+ class: R(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
1900
1902
  }, [
1901
- (c(!0), d(B, null, N(n.visiblePeeks, (o, f) => (c(), d("div", {
1903
+ (c(!0), d(E, null, N(n.visiblePeeks, (o, f) => (c(), d("div", {
1902
1904
  key: o.convId,
1903
1905
  class: "wm-peek",
1904
- style: j({
1906
+ style: F({
1905
1907
  "--depth": n.visiblePeeks.length - 1 - f,
1906
1908
  zIndex: f + 1
1907
1909
  }),
@@ -1910,17 +1912,17 @@ function zt(e, t, s, r, i, n) {
1910
1912
  "aria-label": n.t("launcher.openConversationWith", {
1911
1913
  name: o.senderName || n.t("launcher.theAgent")
1912
1914
  }),
1913
- onClick: (b) => e.$emit("open", o.convId),
1915
+ onClick: (k) => e.$emit("open", o.convId),
1914
1916
  onKeydown: [
1915
- _e(Y((b) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
1916
- _e(Y((b) => e.$emit("open", o.convId), ["prevent"]), ["space"])
1917
+ _e(G((k) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
1918
+ _e(G((k) => e.$emit("open", o.convId), ["prevent"]), ["space"])
1917
1919
  ]
1918
1920
  }, [
1919
1921
  l("button", {
1920
1922
  type: "button",
1921
1923
  class: "wm-peek__close",
1922
1924
  "aria-label": n.t("launcher.dismiss"),
1923
- onClick: Y((b) => e.$emit("dismiss", o.convId), ["stop"])
1925
+ onClick: G((k) => e.$emit("dismiss", o.convId), ["stop"])
1924
1926
  }, [...t[5] || (t[5] = [
1925
1927
  l("svg", {
1926
1928
  width: "9",
@@ -1936,8 +1938,8 @@ function zt(e, t, s, r, i, n) {
1936
1938
  l("path", { d: "M18 6L6 18M6 6l12 12" })
1937
1939
  ], -1)
1938
1940
  ])], 8, Lt),
1939
- l("div", Et, [
1940
- W(a, {
1941
+ l("div", It, [
1942
+ K(a, {
1941
1943
  name: o.senderName,
1942
1944
  "avatar-url": o.senderAvatarUrl,
1943
1945
  size: 34
@@ -1946,22 +1948,22 @@ function zt(e, t, s, r, i, n) {
1946
1948
  key: 0,
1947
1949
  class: "wm-peek__avatarBadge",
1948
1950
  "aria-label": n.t("launcher.unreadMessages", { count: o.count })
1949
- }, y(o.count > 9 ? "9+" : o.count), 9, Bt)) : k("", !0)
1951
+ }, v(o.count > 9 ? "9+" : o.count), 9, Et)) : b("", !0)
1950
1952
  ]),
1951
- l("div", It, [
1953
+ l("div", Bt, [
1952
1954
  l("div", Pt, [
1953
- l("span", Dt, y(o.senderName || n.t("common.agent")), 1),
1954
- l("span", Ut, y(n.t("launcher.repliedToYou")), 1)
1955
+ l("span", Ut, v(o.senderName || n.t("common.agent")), 1),
1956
+ l("span", Dt, v(n.t("launcher.repliedToYou")), 1)
1955
1957
  ]),
1956
- l("p", Nt, y(o.preview), 1)
1958
+ l("p", Nt, v(o.preview), 1)
1957
1959
  ]),
1958
1960
  l("button", {
1959
1961
  type: "button",
1960
1962
  class: "wm-peek__open",
1961
- onClick: Y((b) => e.$emit("open", o.convId), ["stop"])
1962
- }, y(n.t("common.open")), 9, Ft)
1963
+ onClick: G((k) => e.$emit("open", o.convId), ["stop"])
1964
+ }, v(n.t("common.open")), 9, Ft)
1963
1965
  ], 44, Rt))), 128))
1964
- ], 2)) : k("", !0)
1966
+ ], 2)) : b("", !0)
1965
1967
  ]),
1966
1968
  _: 1
1967
1969
  }),
@@ -1992,11 +1994,11 @@ function zt(e, t, s, r, i, n) {
1992
1994
  }) : n.t("launcher.unreadConversationsOne", {
1993
1995
  count: s.unreadCount
1994
1996
  })
1995
- }, y(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, jt)) : k("", !0)
1997
+ }, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, jt)) : b("", !0)
1996
1998
  ], 8, Ht)
1997
1999
  ], 32);
1998
2000
  }
1999
- const qt = /* @__PURE__ */ D(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2001
+ const qt = /* @__PURE__ */ U(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
2000
2002
  name: "WmAIAvatar",
2001
2003
  props: {
2002
2004
  size: { type: Number, default: 26 },
@@ -2019,10 +2021,10 @@ const qt = /* @__PURE__ */ D(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
2019
2021
  },
2020
2022
  computed: {
2021
2023
  initials() {
2022
- return Te(this.name);
2024
+ return Oe(this.name);
2023
2025
  },
2024
2026
  bgColor() {
2025
- return Me(this.name);
2027
+ return xe(this.name);
2026
2028
  }
2027
2029
  }
2028
2030
  }, Kt = {
@@ -2031,21 +2033,21 @@ const qt = /* @__PURE__ */ D(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
2031
2033
  }, Wt = ["src", "alt"], $t = ["width", "height"];
2032
2034
  function Gt(e, t, s, r, i, n) {
2033
2035
  return c(), d("div", {
2034
- class: L(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2035
- style: j({
2036
+ class: R(["wm-aiav", { "wm-aiav--tail": s.tail }]),
2037
+ style: F({
2036
2038
  width: s.size + "px",
2037
2039
  height: s.size + "px",
2038
2040
  "--wm-avr": s.size * 0.32 + "px"
2039
2041
  })
2040
2042
  }, [
2041
- s.pulse ? (c(), d("div", Kt)) : k("", !0),
2043
+ s.pulse ? (c(), d("div", Kt)) : b("", !0),
2042
2044
  l("div", {
2043
- class: L(["wm-aiav__inner", {
2045
+ class: R(["wm-aiav__inner", {
2044
2046
  "wm-aiav__inner--glow": s.pulse,
2045
2047
  "wm-aiav__inner--img": !!s.imageUrl,
2046
2048
  "wm-aiav__inner--initials": !s.imageUrl && !!n.initials
2047
2049
  }]),
2048
- style: j(
2050
+ style: F(
2049
2051
  !s.imageUrl && n.initials ? { background: n.bgColor } : null
2050
2052
  )
2051
2053
  }, [
@@ -2055,8 +2057,8 @@ function Gt(e, t, s, r, i, n) {
2055
2057
  alt: s.name || ""
2056
2058
  }, null, 8, Wt)) : n.initials ? (c(), d("span", {
2057
2059
  key: 1,
2058
- style: j({ fontSize: s.size * 0.36 + "px" })
2059
- }, y(n.initials), 5)) : (c(), d("svg", {
2060
+ style: F({ fontSize: s.size * 0.36 + "px" })
2061
+ }, v(n.initials), 5)) : (c(), d("svg", {
2060
2062
  key: 2,
2061
2063
  width: s.size * 0.5,
2062
2064
  height: s.size * 0.5,
@@ -2087,7 +2089,7 @@ function Gt(e, t, s, r, i, n) {
2087
2089
  ], 6)
2088
2090
  ], 6);
2089
2091
  }
2090
- const he = /* @__PURE__ */ D(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2092
+ const he = /* @__PURE__ */ U(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2091
2093
  name: "WmTeamAvatars",
2092
2094
  props: {
2093
2095
  members: { type: Array, default: () => [] },
@@ -2103,10 +2105,10 @@ const he = /* @__PURE__ */ D(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
2103
2105
  },
2104
2106
  methods: {
2105
2107
  colorFor(e) {
2106
- return e.avatar_url ? "transparent" : Me(e.name || "");
2108
+ return e.avatar_url ? "transparent" : xe(e.name || "");
2107
2109
  },
2108
2110
  initialsFor(e) {
2109
- return Te(e.name || "");
2111
+ return Oe(e.name || "");
2110
2112
  }
2111
2113
  }
2112
2114
  }, Jt = {
@@ -2120,12 +2122,12 @@ function en(e, t, s, r, i, n) {
2120
2122
  return n.visible ? (c(), d("div", Jt, [
2121
2123
  l("div", {
2122
2124
  class: "wm-team__stack",
2123
- style: j({ width: n.stackWidth + "px" })
2125
+ style: F({ width: n.stackWidth + "px" })
2124
2126
  }, [
2125
- (c(!0), d(B, null, N(s.members.slice(0, 3), (a, o) => (c(), d("div", {
2127
+ (c(!0), d(E, null, N(s.members.slice(0, 3), (a, o) => (c(), d("div", {
2126
2128
  key: o,
2127
2129
  class: "wm-team__pill",
2128
- style: j({
2130
+ style: F({
2129
2131
  left: o * 13 + "px",
2130
2132
  zIndex: 3 - o,
2131
2133
  background: n.colorFor(a)
@@ -2135,19 +2137,19 @@ function en(e, t, s, r, i, n) {
2135
2137
  key: 0,
2136
2138
  src: a.avatar_url,
2137
2139
  alt: a.name || ""
2138
- }, null, 8, Xt)) : (c(), d("span", Qt, y(n.initialsFor(a)), 1))
2140
+ }, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(a)), 1))
2139
2141
  ], 4))), 128))
2140
2142
  ], 4),
2141
- s.responseLabel ? (c(), d("span", Zt, y(s.responseLabel), 1)) : k("", !0)
2142
- ])) : k("", !0);
2143
+ s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : b("", !0)
2144
+ ])) : b("", !0);
2143
2145
  }
2144
- const tn = /* @__PURE__ */ D(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2146
+ const tn = /* @__PURE__ */ U(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2145
2147
  name: "WmHeader",
2146
2148
  components: { AIAvatar: he, TeamAvatars: tn },
2147
2149
  inject: {
2148
2150
  // Translator shared by the Messenger shell. Falls back to a French
2149
2151
  // translator when the component is used standalone (no provider).
2150
- t: { default: () => F() }
2152
+ t: { default: () => H() }
2151
2153
  },
2152
2154
  props: {
2153
2155
  title: { type: String, default: "Nouvelle conversation" },
@@ -2211,28 +2213,28 @@ function fn(e, t, s, r, i, n) {
2211
2213
  l("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2212
2214
  ], -1)
2213
2215
  ])], 8, rn)) : (c(), d("div", an)),
2214
- s.showIdentity ? (c(), d(B, { key: 2 }, [
2216
+ s.showIdentity ? (c(), d(E, { key: 2 }, [
2215
2217
  l("div", on, [
2216
- W(a, {
2218
+ K(a, {
2217
2219
  size: 30,
2218
2220
  name: s.agentName,
2219
2221
  "image-url": s.agentAvatarUrl
2220
2222
  }, null, 8, ["name", "image-url"])
2221
2223
  ]),
2222
2224
  l("div", ln, [
2223
- l("div", cn, y(s.title), 1)
2225
+ l("div", cn, v(s.title), 1)
2224
2226
  ]),
2225
- n.hasTeam ? (c(), I(o, {
2227
+ n.hasTeam ? (c(), B(o, {
2226
2228
  key: 0,
2227
2229
  members: n.displayedTeamMembers,
2228
2230
  "response-label": ""
2229
- }, null, 8, ["members"])) : k("", !0)
2231
+ }, null, 8, ["members"])) : b("", !0)
2230
2232
  ], 64)) : (c(), d("div", dn)),
2231
2233
  l("div", un, [
2232
2234
  s.showMore ? (c(), d("button", {
2233
2235
  key: 0,
2234
2236
  type: "button",
2235
- class: L(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
2237
+ class: R(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
2236
2238
  "aria-label": n.t("header.moreOptions"),
2237
2239
  title: n.t("header.moreOptions"),
2238
2240
  onClick: t[1] || (t[1] = (f) => e.$emit("more"))
@@ -2260,7 +2262,7 @@ function fn(e, t, s, r, i, n) {
2260
2262
  r: "1.6"
2261
2263
  })
2262
2264
  ], -1)
2263
- ])], 10, mn)) : k("", !0),
2265
+ ])], 10, mn)) : b("", !0),
2264
2266
  s.showClose ? (c(), d("button", {
2265
2267
  key: 1,
2266
2268
  type: "button",
@@ -2282,11 +2284,11 @@ function fn(e, t, s, r, i, n) {
2282
2284
  }, [
2283
2285
  l("path", { d: "M18 6L6 18M6 6l12 12" })
2284
2286
  ], -1)
2285
- ])], 8, hn)) : k("", !0)
2287
+ ])], 8, hn)) : b("", !0)
2286
2288
  ])
2287
2289
  ]);
2288
2290
  }
2289
- const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
2291
+ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Ne = {
2290
2292
  book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
2291
2293
  changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
2292
2294
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2294,13 +2296,13 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2294
2296
  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"
2295
2297
  }, gn = {
2296
2298
  name: "WmOnboarding",
2297
- components: { AIAvatar: he, HumanAvatar: ye },
2299
+ components: { AIAvatar: he, HumanAvatar: ve },
2298
2300
  inject: {
2299
2301
  // Translator + resolved-language getter shared by the Messenger
2300
2302
  // shell. The language getter feeds `formatTs` (relative date
2301
2303
  // labels on unread alerts) ; falls back to French when the
2302
2304
  // component is used standalone.
2303
- t: { default: () => F() },
2305
+ t: { default: () => H() },
2304
2306
  wmLocale: { default: () => () => "fr" }
2305
2307
  },
2306
2308
  props: {
@@ -2308,12 +2310,26 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2308
2310
  subtitle: { type: String, default: "" },
2309
2311
  agentName: { type: String, default: "" },
2310
2312
  defaultIconUrl: { type: String, default: null },
2313
+ coverImageUrl: { type: String, default: null },
2311
2314
  quickLinks: { type: Array, default: () => [] },
2312
2315
  openThreads: { type: Array, default: () => [] },
2313
2316
  busy: { type: Boolean, default: !1 }
2314
2317
  },
2315
2318
  emits: ["start", "select", "resume", "view-history"],
2319
+ data() {
2320
+ return {
2321
+ // First-message draft typed straight on the home screen. On
2322
+ // submit it's emitted with `start` so the conversation opens
2323
+ // with this message already on its way.
2324
+ starterText: ""
2325
+ };
2326
+ },
2316
2327
  computed: {
2328
+ // Gate the send button: needs non-blank text and no in-flight
2329
+ // conversation creation.
2330
+ canStart() {
2331
+ return !this.busy && !!this.starterText.trim();
2332
+ },
2317
2333
  heroTitle() {
2318
2334
  return this.title ? this.title : this.agentName ? this.t("onboarding.greetingNamed", { name: this.agentName }) : this.t("onboarding.greeting");
2319
2335
  },
@@ -2322,11 +2338,32 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2322
2338
  },
2323
2339
  unreadThreads() {
2324
2340
  return this.openThreads.filter((e) => e.unread);
2341
+ },
2342
+ // Admin-supplied banner shown across the top of the hero, with the
2343
+ // logo straddling its bottom edge. Gated through the same CSS-url
2344
+ // safety check as the quick-link icons (cf. safeIconUrl) so a
2345
+ // malformed config can't inject CSS into the background declaration.
2346
+ safeCoverUrl() {
2347
+ return Ee(this.coverImageUrl);
2348
+ },
2349
+ hasCover() {
2350
+ return !!this.safeCoverUrl;
2351
+ },
2352
+ coverStyle() {
2353
+ return this.safeCoverUrl ? { backgroundImage: `url("${this.safeCoverUrl}")` } : null;
2325
2354
  }
2326
2355
  },
2327
2356
  methods: {
2357
+ // Open a conversation seeded with the typed first message. The
2358
+ // parent (`startConv` + send) handles draft creation and the
2359
+ // screen transition; we just hand it the text and clear the field.
2360
+ submitStarter() {
2361
+ if (!this.canStart) return;
2362
+ const e = this.starterText.trim();
2363
+ this.starterText = "", this.$emit("start", e);
2364
+ },
2328
2365
  iconPath(e) {
2329
- return Pe[e] || Pe.link;
2366
+ return Ne[e] || Ne.link;
2330
2367
  },
2331
2368
  // True when activating the link opens an external destination
2332
2369
  // (full URL or relative path) — anchor links (`#…`, which route
@@ -2340,7 +2377,7 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2340
2377
  // on the masked-glyph span and as the source of `--icon-url`
2341
2378
  // (cf. iconUrlStyle).
2342
2379
  safeIconUrl(e) {
2343
- return ut(e == null ? void 0 : e.icon_url);
2380
+ return Ee(e == null ? void 0 : e.icon_url);
2344
2381
  },
2345
2382
  // Inline style exposing the link's icon_url as a CSS custom
2346
2383
  // property — only when the URL passes the safety gate, so a
@@ -2350,7 +2387,7 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2350
2387
  return t ? { "--icon-url": `url("${t}")` } : null;
2351
2388
  },
2352
2389
  renderPreview(e) {
2353
- return qe(e);
2390
+ return Ve(e);
2354
2391
  },
2355
2392
  // Avatar resolution for a thread row, in priority order :
2356
2393
  // 1. last sender's `avatar_url` (image)
@@ -2408,19 +2445,42 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2408
2445
  });
2409
2446
  }
2410
2447
  }
2411
- }, yn = { class: "wm-onb" }, vn = { class: "wm-onb__hero" }, pn = { class: "wm-onb__hero-text" }, wn = { class: "wm-onb__title" }, bn = { class: "wm-onb__sub" }, kn = {
2448
+ }, vn = { class: "wm-onb" }, yn = ["aria-label"], pn = {
2449
+ key: 1,
2450
+ class: "wm-onb__hero-deco",
2451
+ width: "180",
2452
+ height: "180",
2453
+ viewBox: "0 0 180 180",
2454
+ fill: "none",
2455
+ "aria-hidden": "true"
2456
+ }, wn = { class: "wm-onb__hero-text" }, bn = { class: "wm-onb__title" }, kn = { class: "wm-onb__sub" }, Cn = {
2412
2457
  key: 0,
2413
2458
  class: "wm-onb__alertList"
2414
- }, Cn = ["onClick"], An = {
2459
+ }, An = ["onClick"], Sn = {
2415
2460
  key: 0,
2416
2461
  class: "wm-onb__defaultAvatar"
2417
- }, Sn = ["aria-label"], Mn = { class: "wm-onb__alert-body" }, Tn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
2462
+ }, Tn = ["aria-label"], Mn = { class: "wm-onb__alert-body" }, xn = { class: "wm-onb__alert-title" }, On = { class: "wm-onb__alert-preview" }, Rn = {
2418
2463
  key: 0,
2419
2464
  class: "wm-onb__alert-sender"
2420
- }, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, En = {
2465
+ }, Ln = ["innerHTML"], In = { class: "wm-onb__alert-meta" }, En = {
2421
2466
  key: 0,
2422
2467
  class: "wm-onb__alert-time"
2423
- }, Bn = { class: "wm-onb__alert-resume" }, In = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Nn = { class: "wm-onb__btn-icon" }, Fn = ["aria-label"], Hn = {
2468
+ }, Bn = { class: "wm-onb__alert-resume" }, Pn = { class: "wm-onb__actions" }, Un = ["placeholder", "disabled", "aria-label"], Dn = ["disabled", "aria-label"], Nn = {
2469
+ key: 0,
2470
+ width: "16",
2471
+ height: "16",
2472
+ viewBox: "0 0 24 24",
2473
+ fill: "none",
2474
+ stroke: "currentColor",
2475
+ "stroke-width": "2",
2476
+ "stroke-linecap": "round",
2477
+ "stroke-linejoin": "round",
2478
+ "aria-hidden": "true"
2479
+ }, Fn = {
2480
+ key: 1,
2481
+ class: "wm-onb__starter-spinner",
2482
+ "aria-hidden": "true"
2483
+ }, Hn = ["onClick"], jn = { class: "wm-onb__btn-icon" }, zn = ["aria-label"], qn = {
2424
2484
  key: 1,
2425
2485
  width: "18",
2426
2486
  height: "18",
@@ -2431,7 +2491,7 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2431
2491
  "stroke-linecap": "round",
2432
2492
  "stroke-linejoin": "round",
2433
2493
  "aria-hidden": "true"
2434
- }, jn = ["d"], zn = { class: "wm-onb__btn-label" }, qn = {
2494
+ }, Vn = ["d"], Kn = { class: "wm-onb__btn-label" }, Wn = {
2435
2495
  key: 0,
2436
2496
  class: "wm-onb__btn-trail",
2437
2497
  width: "13",
@@ -2443,7 +2503,7 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2443
2503
  "stroke-linecap": "round",
2444
2504
  "stroke-linejoin": "round",
2445
2505
  "aria-hidden": "true"
2446
- }, Vn = { class: "wm-onb__btn-icon" }, Kn = {
2506
+ }, $n = { class: "wm-onb__btn-icon" }, Gn = {
2447
2507
  width: "18",
2448
2508
  height: "18",
2449
2509
  viewBox: "0 0 24 24",
@@ -2453,19 +2513,21 @@ const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2453
2513
  "stroke-linecap": "round",
2454
2514
  "stroke-linejoin": "round",
2455
2515
  "aria-hidden": "true"
2456
- }, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
2457
- function Yn(e, t, s, r, i, n) {
2516
+ }, Yn = ["d"], Jn = { class: "wm-onb__btn-label" }, Xn = { class: "wm-onb__btn-count" };
2517
+ function Qn(e, t, s, r, i, n) {
2458
2518
  const a = P("AIAvatar");
2459
- return c(), d("div", yn, [
2460
- l("div", vn, [
2461
- t[2] || (t[2] = l("svg", {
2462
- class: "wm-onb__hero-deco",
2463
- width: "180",
2464
- height: "180",
2465
- viewBox: "0 0 180 180",
2466
- fill: "none",
2467
- "aria-hidden": "true"
2468
- }, [
2519
+ return c(), d("div", vn, [
2520
+ l("div", {
2521
+ class: R(["wm-onb__hero", { "wm-onb__hero--cover": n.hasCover }])
2522
+ }, [
2523
+ n.hasCover ? (c(), d("div", {
2524
+ key: 0,
2525
+ class: "wm-onb__cover",
2526
+ style: F(n.coverStyle),
2527
+ role: "img",
2528
+ "aria-label": n.heroTitle
2529
+ }, null, 12, yn)) : b("", !0),
2530
+ n.hasCover ? b("", !0) : (c(), d("svg", pn, [...t[3] || (t[3] = [
2469
2531
  l("circle", {
2470
2532
  cx: "170",
2471
2533
  cy: "10",
@@ -2474,7 +2536,7 @@ function Yn(e, t, s, r, i, n) {
2474
2536
  "stroke-width": "1",
2475
2537
  "stroke-dasharray": "1 5",
2476
2538
  opacity: "0.35"
2477
- }),
2539
+ }, null, -1),
2478
2540
  l("circle", {
2479
2541
  cx: "170",
2480
2542
  cy: "10",
@@ -2483,35 +2545,35 @@ function Yn(e, t, s, r, i, n) {
2483
2545
  "stroke-width": "1",
2484
2546
  "stroke-dasharray": "1 5",
2485
2547
  opacity: "0.5"
2486
- }),
2548
+ }, null, -1),
2487
2549
  l("circle", {
2488
2550
  cx: "152",
2489
2551
  cy: "34",
2490
2552
  r: "2.5",
2491
2553
  fill: "#5B5FEF",
2492
2554
  opacity: "0.65"
2493
- })
2494
- ], -1)),
2495
- W(a, {
2555
+ }, null, -1)
2556
+ ])])),
2557
+ K(a, {
2496
2558
  size: 52,
2497
2559
  "image-url": s.defaultIconUrl
2498
2560
  }, null, 8, ["image-url"]),
2499
- l("div", pn, [
2500
- l("div", wn, y(n.heroTitle), 1),
2501
- l("div", bn, y(n.heroSub), 1)
2561
+ l("div", wn, [
2562
+ l("div", bn, v(n.heroTitle), 1),
2563
+ l("div", kn, v(n.heroSub), 1)
2502
2564
  ])
2503
- ]),
2504
- n.unreadThreads.length ? (c(), d("div", kn, [
2505
- (c(!0), d(B, null, N(n.unreadThreads, (o) => (c(), d("button", {
2565
+ ], 2),
2566
+ n.unreadThreads.length ? (c(), d("div", Cn, [
2567
+ (c(!0), d(E, null, N(n.unreadThreads, (o) => (c(), d("button", {
2506
2568
  key: o.id,
2507
2569
  type: "button",
2508
2570
  class: "wm-onb__alert",
2509
2571
  onClick: (f) => e.$emit("resume", o)
2510
2572
  }, [
2511
2573
  l("span", {
2512
- class: L(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2574
+ class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
2513
2575
  }, [
2514
- n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[3] || (t[3] = [
2576
+ n.isDefaultAvatar(o) ? (c(), d("span", Sn, [...t[4] || (t[4] = [
2515
2577
  l("svg", {
2516
2578
  width: "20",
2517
2579
  height: "20",
@@ -2525,94 +2587,98 @@ function Yn(e, t, s, r, i, n) {
2525
2587
  }, [
2526
2588
  l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2527
2589
  ], -1)
2528
- ])])) : (c(), I(Ae(n.avatarComponent(o)), He({
2590
+ ])])) : (c(), B(Te(n.avatarComponent(o)), je({
2529
2591
  key: 1,
2530
2592
  ref_for: !0
2531
2593
  }, n.avatarProps(o)), null, 16)),
2532
2594
  l("span", {
2533
2595
  class: "wm-onb__alert-dot",
2534
2596
  "aria-label": n.t("onboarding.unread")
2535
- }, null, 8, Sn)
2597
+ }, null, 8, Tn)
2536
2598
  ], 2),
2537
2599
  l("span", Mn, [
2538
- l("span", Tn, y(o.title), 1),
2539
- l("span", xn, [
2540
- n.senderLabel(o) ? (c(), d("span", On, y(n.senderLabel(o)) + " · ", 1)) : k("", !0),
2600
+ l("span", xn, v(o.title), 1),
2601
+ l("span", On, [
2602
+ n.senderLabel(o) ? (c(), d("span", Rn, v(n.senderLabel(o)) + " · ", 1)) : b("", !0),
2541
2603
  l("span", {
2542
2604
  innerHTML: n.renderPreview(o.preview)
2543
- }, null, 8, Rn)
2605
+ }, null, 8, Ln)
2544
2606
  ])
2545
2607
  ]),
2546
- l("span", Ln, [
2547
- n.formatTs(o._ts) ? (c(), d("span", En, y(n.formatTs(o._ts)), 1)) : k("", !0),
2548
- l("span", Bn, y(n.t("onboarding.resume")), 1)
2608
+ l("span", In, [
2609
+ n.formatTs(o._ts) ? (c(), d("span", En, v(n.formatTs(o._ts)), 1)) : b("", !0),
2610
+ l("span", Bn, v(n.t("onboarding.resume")), 1)
2549
2611
  ])
2550
- ], 8, Cn))), 128))
2551
- ])) : k("", !0),
2552
- l("div", In, [
2553
- l("button", {
2554
- type: "button",
2555
- class: "wm-onb__btn wm-onb__btn--start",
2556
- disabled: s.busy,
2557
- onClick: t[0] || (t[0] = (o) => e.$emit("start"))
2612
+ ], 8, An))), 128))
2613
+ ])) : b("", !0),
2614
+ l("div", Pn, [
2615
+ l("form", {
2616
+ class: R(["wm-onb__starter", { "is-active": !!i.starterText.trim() }]),
2617
+ onSubmit: t[1] || (t[1] = G((...o) => n.submitStarter && n.submitStarter(...o), ["prevent"]))
2558
2618
  }, [
2559
- t[4] || (t[4] = l("span", { class: "wm-onb__btn-icon" }, [
2560
- l("svg", {
2561
- width: "18",
2562
- height: "18",
2563
- viewBox: "0 0 24 24",
2564
- fill: "none",
2565
- stroke: "currentColor",
2566
- "stroke-width": "2",
2567
- "stroke-linecap": "round",
2568
- "stroke-linejoin": "round",
2569
- "aria-hidden": "true"
2570
- }, [
2571
- l("path", { d: "M12 5v14M5 12h14" })
2572
- ])
2573
- ], -1)),
2574
- l("span", Dn, y(s.busy ? "…" : n.t("onboarding.start")), 1)
2575
- ], 8, Pn),
2576
- (c(!0), d(B, null, N(s.quickLinks, (o, f) => (c(), d("button", {
2619
+ $(l("input", {
2620
+ ref: "starterInput",
2621
+ "onUpdate:modelValue": t[0] || (t[0] = (o) => i.starterText = o),
2622
+ type: "text",
2623
+ class: "wm-onb__starter-input",
2624
+ placeholder: n.t("onboarding.starterPlaceholder"),
2625
+ disabled: s.busy,
2626
+ "aria-label": n.t("onboarding.start"),
2627
+ enterkeyhint: "send"
2628
+ }, null, 8, Un), [
2629
+ [ee, i.starterText]
2630
+ ]),
2631
+ l("button", {
2632
+ type: "submit",
2633
+ class: R(["wm-onb__starter-send", { "is-empty": !n.canStart }]),
2634
+ disabled: s.busy || !n.canStart,
2635
+ "aria-label": n.t("composer.send")
2636
+ }, [
2637
+ s.busy ? (c(), d("span", Fn)) : (c(), d("svg", Nn, [...t[5] || (t[5] = [
2638
+ l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" }, null, -1)
2639
+ ])]))
2640
+ ], 10, Dn)
2641
+ ], 34),
2642
+ (c(!0), d(E, null, N(s.quickLinks, (o, f) => (c(), d("button", {
2577
2643
  key: "ql-" + f,
2578
2644
  type: "button",
2579
2645
  class: "wm-onb__btn",
2580
- onClick: (b) => e.$emit("select", o)
2646
+ onClick: (k) => e.$emit("select", o)
2581
2647
  }, [
2582
- l("span", Nn, [
2648
+ l("span", jn, [
2583
2649
  n.safeIconUrl(o) ? (c(), d("span", {
2584
2650
  key: 0,
2585
2651
  class: "wm-onb__btn-iconImg",
2586
- style: j(n.iconUrlStyle(o)),
2652
+ style: F(n.iconUrlStyle(o)),
2587
2653
  role: "img",
2588
2654
  "aria-label": o.label || ""
2589
- }, null, 12, Fn)) : (c(), d("svg", Hn, [
2655
+ }, null, 12, zn)) : (c(), d("svg", qn, [
2590
2656
  l("path", {
2591
2657
  d: n.iconPath(o.icon)
2592
- }, null, 8, jn)
2658
+ }, null, 8, Vn)
2593
2659
  ]))
2594
2660
  ]),
2595
- l("span", zn, y(o.label), 1),
2596
- n.isExternalLink(o) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2661
+ l("span", Kn, v(o.label), 1),
2662
+ n.isExternalLink(o) ? (c(), d("svg", Wn, [...t[6] || (t[6] = [
2597
2663
  l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2598
- ])])) : k("", !0)
2599
- ], 8, Un))), 128)),
2664
+ ])])) : b("", !0)
2665
+ ], 8, Hn))), 128)),
2600
2666
  s.openThreads.length ? (c(), d("button", {
2601
2667
  key: 0,
2602
2668
  type: "button",
2603
2669
  class: "wm-onb__btn",
2604
- onClick: t[1] || (t[1] = (o) => e.$emit("view-history"))
2670
+ onClick: t[2] || (t[2] = (o) => e.$emit("view-history"))
2605
2671
  }, [
2606
- l("span", Vn, [
2607
- (c(), d("svg", Kn, [
2672
+ l("span", $n, [
2673
+ (c(), d("svg", Gn, [
2608
2674
  l("path", {
2609
2675
  d: n.iconPath("chat")
2610
- }, null, 8, Wn)
2676
+ }, null, 8, Yn)
2611
2677
  ]))
2612
2678
  ]),
2613
- l("span", $n, y(n.t("onboarding.allConversations")), 1),
2614
- l("span", Gn, y(s.openThreads.length), 1),
2615
- t[6] || (t[6] = l("svg", {
2679
+ l("span", Jn, v(n.t("onboarding.allConversations")), 1),
2680
+ l("span", Xn, v(s.openThreads.length), 1),
2681
+ t[7] || (t[7] = l("svg", {
2616
2682
  class: "wm-onb__btn-trail",
2617
2683
  width: "13",
2618
2684
  height: "13",
@@ -2626,15 +2692,15 @@ function Yn(e, t, s, r, i, n) {
2626
2692
  }, [
2627
2693
  l("path", { d: "M9 18l6-6-6-6" })
2628
2694
  ], -1))
2629
- ])) : k("", !0)
2695
+ ])) : b("", !0)
2630
2696
  ])
2631
2697
  ]);
2632
2698
  }
2633
- const Jn = /* @__PURE__ */ D(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
2699
+ const Zn = /* @__PURE__ */ U(gn, [["render", Qn], ["__scopeId", "data-v-ca29f614"]]), es = {
2634
2700
  name: "WmHistory",
2635
- components: { AIAvatar: he, HumanAvatar: ye },
2701
+ components: { AIAvatar: he, HumanAvatar: ve },
2636
2702
  inject: {
2637
- t: { default: () => F() },
2703
+ t: { default: () => H() },
2638
2704
  wmLocale: { default: () => () => "fr" }
2639
2705
  },
2640
2706
  props: {
@@ -2654,7 +2720,7 @@ const Jn = /* @__PURE__ */ D(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2654
2720
  },
2655
2721
  methods: {
2656
2722
  renderPreview(e) {
2657
- return qe(e);
2723
+ return Ve(e);
2658
2724
  },
2659
2725
  avatarComponent(e) {
2660
2726
  var t;
@@ -2699,19 +2765,19 @@ const Jn = /* @__PURE__ */ D(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
2699
2765
  });
2700
2766
  }
2701
2767
  }
2702
- }, Qn = { class: "wm-hist" }, Zn = { class: "wm-hist__search" }, es = ["placeholder", "aria-label"], ts = { class: "wm-hist__list" }, ns = ["onClick"], ss = {
2768
+ }, ts = { class: "wm-hist" }, ns = { class: "wm-hist__search" }, ss = ["placeholder", "aria-label"], rs = { class: "wm-hist__list" }, is = ["onClick"], as = {
2703
2769
  key: 0,
2704
2770
  class: "wm-hist__defaultAvatar"
2705
- }, rs = ["aria-label"], is = { class: "wm-hist__thread-body" }, as = { class: "wm-hist__thread-title" }, os = ["innerHTML"], ls = { class: "wm-hist__thread-meta" }, cs = {
2771
+ }, os = ["aria-label"], ls = { class: "wm-hist__thread-body" }, cs = { class: "wm-hist__thread-title" }, ds = ["innerHTML"], us = { class: "wm-hist__thread-meta" }, ms = {
2706
2772
  key: 0,
2707
2773
  class: "wm-hist__thread-time"
2708
- }, ds = {
2774
+ }, hs = {
2709
2775
  key: 0,
2710
2776
  class: "wm-hist__empty"
2711
2777
  };
2712
- function us(e, t, s, r, i, n) {
2713
- return c(), d("div", Qn, [
2714
- l("div", Zn, [
2778
+ function fs(e, t, s, r, i, n) {
2779
+ return c(), d("div", ts, [
2780
+ l("div", ns, [
2715
2781
  t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
2716
2782
  l("svg", {
2717
2783
  width: "13",
@@ -2732,21 +2798,21 @@ function us(e, t, s, r, i, n) {
2732
2798
  type: "text",
2733
2799
  placeholder: n.t("onboarding.search"),
2734
2800
  "aria-label": n.t("onboarding.search")
2735
- }, null, 8, es), [
2736
- [se, i.query]
2801
+ }, null, 8, ss), [
2802
+ [ee, i.query]
2737
2803
  ])
2738
2804
  ]),
2739
- l("div", ts, [
2740
- (c(!0), d(B, null, N(n.filteredThreads, (a) => (c(), d("button", {
2805
+ l("div", rs, [
2806
+ (c(!0), d(E, null, N(n.filteredThreads, (a) => (c(), d("button", {
2741
2807
  key: a.id,
2742
2808
  type: "button",
2743
- class: L(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2809
+ class: R(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2744
2810
  onClick: (o) => e.$emit("resume", a)
2745
2811
  }, [
2746
2812
  l("span", {
2747
- class: L(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2813
+ class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
2748
2814
  }, [
2749
- n.isDefaultAvatar(a) ? (c(), d("span", ss, [...t[2] || (t[2] = [
2815
+ n.isDefaultAvatar(a) ? (c(), d("span", as, [...t[2] || (t[2] = [
2750
2816
  l("svg", {
2751
2817
  width: "18",
2752
2818
  height: "18",
@@ -2760,7 +2826,7 @@ function us(e, t, s, r, i, n) {
2760
2826
  }, [
2761
2827
  l("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
2762
2828
  ], -1)
2763
- ])])) : (c(), I(Ae(n.avatarComponent(a)), He({
2829
+ ])])) : (c(), B(Te(n.avatarComponent(a)), je({
2764
2830
  key: 1,
2765
2831
  ref_for: !0
2766
2832
  }, n.avatarProps(a)), null, 16)),
@@ -2768,17 +2834,17 @@ function us(e, t, s, r, i, n) {
2768
2834
  key: 2,
2769
2835
  class: "wm-hist__thread-dot",
2770
2836
  "aria-label": n.t("onboarding.unread")
2771
- }, null, 8, rs)) : k("", !0)
2837
+ }, null, 8, os)) : b("", !0)
2772
2838
  ], 2),
2773
- l("span", is, [
2774
- l("span", as, y(a.title), 1),
2839
+ l("span", ls, [
2840
+ l("span", cs, v(a.title), 1),
2775
2841
  l("span", {
2776
2842
  class: "wm-hist__thread-preview",
2777
2843
  innerHTML: n.renderPreview(a.preview)
2778
- }, null, 8, os)
2844
+ }, null, 8, ds)
2779
2845
  ]),
2780
- l("span", ls, [
2781
- n.formatTs(a._ts) ? (c(), d("span", cs, y(n.formatTs(a._ts)), 1)) : k("", !0),
2846
+ l("span", us, [
2847
+ n.formatTs(a._ts) ? (c(), d("span", ms, v(n.formatTs(a._ts)), 1)) : b("", !0),
2782
2848
  t[3] || (t[3] = l("svg", {
2783
2849
  width: "14",
2784
2850
  height: "14",
@@ -2794,16 +2860,16 @@ function us(e, t, s, r, i, n) {
2794
2860
  l("path", { d: "M5 12h14M13 5l7 7-7 7" })
2795
2861
  ], -1))
2796
2862
  ])
2797
- ], 10, ns))), 128)),
2798
- n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, y(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2863
+ ], 10, is))), 128)),
2864
+ n.filteredThreads.length ? b("", !0) : (c(), d("div", hs, v(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
2799
2865
  ])
2800
2866
  ]);
2801
2867
  }
2802
- const ms = /* @__PURE__ */ D(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
2803
- function hs(e) {
2868
+ const _s = /* @__PURE__ */ U(es, [["render", fs], ["__scopeId", "data-v-6bf35ef1"]]);
2869
+ function gs(e) {
2804
2870
  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();
2805
2871
  }
2806
- const fs = {
2872
+ const vs = {
2807
2873
  name: "WmActionResult",
2808
2874
  props: {
2809
2875
  state: { type: String, default: "success" },
@@ -2813,13 +2879,13 @@ const fs = {
2813
2879
  },
2814
2880
  computed: {
2815
2881
  detailText() {
2816
- return hs(this.detail);
2882
+ return gs(this.detail);
2817
2883
  }
2818
2884
  }
2819
- }, _s = {
2885
+ }, ys = {
2820
2886
  class: "wm-result__icon",
2821
2887
  "aria-hidden": "true"
2822
- }, gs = {
2888
+ }, ps = {
2823
2889
  key: 0,
2824
2890
  width: "11",
2825
2891
  height: "11",
@@ -2829,7 +2895,7 @@ const fs = {
2829
2895
  "stroke-width": "2.8",
2830
2896
  "stroke-linecap": "round",
2831
2897
  "stroke-linejoin": "round"
2832
- }, ys = {
2898
+ }, ws = {
2833
2899
  key: 1,
2834
2900
  width: "11",
2835
2901
  height: "11",
@@ -2839,7 +2905,7 @@ const fs = {
2839
2905
  "stroke-width": "2.6",
2840
2906
  "stroke-linecap": "round",
2841
2907
  "stroke-linejoin": "round"
2842
- }, vs = {
2908
+ }, bs = {
2843
2909
  key: 2,
2844
2910
  width: "11",
2845
2911
  height: "11",
@@ -2849,7 +2915,7 @@ const fs = {
2849
2915
  "stroke-width": "2.4",
2850
2916
  "stroke-linecap": "round",
2851
2917
  "stroke-linejoin": "round"
2852
- }, ps = {
2918
+ }, ks = {
2853
2919
  key: 3,
2854
2920
  width: "12",
2855
2921
  height: "12",
@@ -2859,24 +2925,24 @@ const fs = {
2859
2925
  "stroke-width": "2.2",
2860
2926
  "stroke-linecap": "round",
2861
2927
  "stroke-linejoin": "round"
2862
- }, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
2863
- function Cs(e, t, s, r, i, n) {
2928
+ }, Cs = { class: "wm-result__body" }, As = { class: "wm-result__label" }, Ss = { class: "wm-result__detail" };
2929
+ function Ts(e, t, s, r, i, n) {
2864
2930
  return c(), d("div", {
2865
- class: L(["wm-result", `wm-result--${s.state}`])
2931
+ class: R(["wm-result", `wm-result--${s.state}`])
2866
2932
  }, [
2867
- l("span", _s, [
2868
- s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
2933
+ l("span", ys, [
2934
+ s.state === "success" ? (c(), d("svg", ps, [...t[0] || (t[0] = [
2869
2935
  l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2870
- ])])) : s.state === "rejected" ? (c(), d("svg", ys, [...t[1] || (t[1] = [
2936
+ ])])) : s.state === "rejected" ? (c(), d("svg", ws, [...t[1] || (t[1] = [
2871
2937
  l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2872
- ])])) : s.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
2938
+ ])])) : s.state === "awaiting" ? (c(), d("svg", bs, [...t[2] || (t[2] = [
2873
2939
  l("circle", {
2874
2940
  cx: "12",
2875
2941
  cy: "12",
2876
2942
  r: "10"
2877
2943
  }, null, -1),
2878
2944
  l("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2879
- ])])) : (c(), d("svg", ps, [...t[3] || (t[3] = [
2945
+ ])])) : (c(), d("svg", ks, [...t[3] || (t[3] = [
2880
2946
  l("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),
2881
2947
  l("line", {
2882
2948
  x1: "12",
@@ -2892,24 +2958,24 @@ function Cs(e, t, s, r, i, n) {
2892
2958
  }, null, -1)
2893
2959
  ])]))
2894
2960
  ]),
2895
- l("span", ws, [
2896
- l("span", bs, y(s.label), 1),
2897
- n.detailText ? (c(), d(B, { key: 0 }, [
2961
+ l("span", Cs, [
2962
+ l("span", As, v(s.label), 1),
2963
+ n.detailText ? (c(), d(E, { key: 0 }, [
2898
2964
  t[4] || (t[4] = l("span", {
2899
2965
  class: "wm-result__sep",
2900
2966
  "aria-hidden": "true"
2901
2967
  }, " · ", -1)),
2902
- l("span", ks, y(n.detailText), 1)
2903
- ], 64)) : k("", !0)
2968
+ l("span", Ss, v(n.detailText), 1)
2969
+ ], 64)) : b("", !0)
2904
2970
  ])
2905
2971
  ], 2);
2906
2972
  }
2907
- const As = /* @__PURE__ */ D(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
2973
+ const Ms = /* @__PURE__ */ U(vs, [["render", Ts], ["__scopeId", "data-v-7284acd0"]]), xs = {
2908
2974
  name: "WmArtifactFormResponse",
2909
2975
  inject: {
2910
2976
  // Translator shared by the Messenger shell; French fallback when
2911
2977
  // the component is used standalone.
2912
- t: { default: () => F() }
2978
+ t: { default: () => H() }
2913
2979
  },
2914
2980
  props: {
2915
2981
  data: { type: Object, required: !0 }
@@ -2920,12 +2986,12 @@ const As = /* @__PURE__ */ D(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
2920
2986
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2921
2987
  }
2922
2988
  }
2923
- }, Ms = { class: "wm-art wm-art--formResponse" }, Ts = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
2924
- function Es(e, t, s, r, i, n) {
2925
- return c(), d("div", Ms, [
2926
- l("div", Ts, [
2927
- l("div", xs, y(s.data.title || n.t("form.title")), 1),
2928
- l("span", Os, [
2989
+ }, Os = { class: "wm-art wm-art--formResponse" }, Rs = { class: "wm-art__head" }, Ls = { class: "wm-art__title" }, Is = { class: "wm-art__badge wm-art__badge--success" }, Es = { class: "wm-art__body" }, Bs = { class: "wm-art__fieldLabel" };
2990
+ function Ps(e, t, s, r, i, n) {
2991
+ return c(), d("div", Os, [
2992
+ l("div", Rs, [
2993
+ l("div", Ls, v(s.data.title || n.t("form.title")), 1),
2994
+ l("span", Is, [
2929
2995
  t[0] || (t[0] = l("svg", {
2930
2996
  width: "11",
2931
2997
  height: "11",
@@ -2939,26 +3005,26 @@ function Es(e, t, s, r, i, n) {
2939
3005
  }, [
2940
3006
  l("polyline", { points: "20 6 9 17 4 12" })
2941
3007
  ], -1)),
2942
- Se(" " + y(n.t("form.sent")), 1)
3008
+ Me(" " + v(n.t("form.sent")), 1)
2943
3009
  ])
2944
3010
  ]),
2945
- l("div", Rs, [
2946
- (c(!0), d(B, null, N(n.fields, (a, o) => (c(), d("div", {
3011
+ l("div", Es, [
3012
+ (c(!0), d(E, null, N(n.fields, (a, o) => (c(), d("div", {
2947
3013
  key: o,
2948
3014
  class: "wm-art__field"
2949
3015
  }, [
2950
- l("div", Ls, y(a.label), 1),
3016
+ l("div", Bs, v(a.label), 1),
2951
3017
  l("div", {
2952
- class: L([
3018
+ class: R([
2953
3019
  "wm-art__fieldValue",
2954
3020
  { "wm-art__fieldValue--multi": a.multiline }
2955
3021
  ])
2956
- }, y(a.value), 3)
3022
+ }, v(a.value), 3)
2957
3023
  ]))), 128))
2958
3024
  ])
2959
3025
  ]);
2960
3026
  }
2961
- const Bs = /* @__PURE__ */ D(Ss, [["render", Es], ["__scopeId", "data-v-713aecf1"]]), Is = {
3027
+ const Us = /* @__PURE__ */ U(xs, [["render", Ps], ["__scopeId", "data-v-713aecf1"]]), Ds = {
2962
3028
  name: "WmArtifactInfoCard",
2963
3029
  props: {
2964
3030
  data: { type: Object, required: !0 }
@@ -2973,60 +3039,60 @@ const Bs = /* @__PURE__ */ D(Ss, [["render", Es], ["__scopeId", "data-v-713aecf1
2973
3039
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2974
3040
  }
2975
3041
  }
2976
- }, Ps = { class: "wm-art wm-art--infoCard" }, Ds = {
3042
+ }, Ns = { class: "wm-art wm-art--infoCard" }, Fs = {
2977
3043
  key: 0,
2978
3044
  class: "wm-art__image"
2979
- }, Us = ["src", "alt"], Ns = { class: "wm-art__head" }, Fs = { class: "wm-art__headMain" }, Hs = { class: "wm-art__title" }, js = {
3045
+ }, Hs = ["src", "alt"], js = { class: "wm-art__head" }, zs = { class: "wm-art__headMain" }, qs = { class: "wm-art__title" }, Vs = {
2980
3046
  key: 0,
2981
3047
  class: "wm-art__subtitle"
2982
- }, zs = {
3048
+ }, Ks = {
2983
3049
  key: 1,
2984
3050
  class: "wm-art__body"
2985
- }, qs = {
3051
+ }, Ws = {
2986
3052
  key: 0,
2987
3053
  class: "wm-art__text"
2988
- }, Vs = { class: "wm-art__fieldLabel" };
2989
- function Ks(e, t, s, r, i, n) {
2990
- return c(), d("div", Ps, [
2991
- s.data.image_url ? (c(), d("figure", Ds, [
3054
+ }, $s = { class: "wm-art__fieldLabel" };
3055
+ function Gs(e, t, s, r, i, n) {
3056
+ return c(), d("div", Ns, [
3057
+ s.data.image_url ? (c(), d("figure", Fs, [
2992
3058
  l("img", {
2993
3059
  src: s.data.image_url,
2994
3060
  alt: s.data.title || "",
2995
3061
  loading: "lazy"
2996
- }, null, 8, Us)
2997
- ])) : k("", !0),
2998
- l("div", Ns, [
2999
- l("div", Fs, [
3000
- l("div", Hs, y(s.data.title), 1),
3001
- s.data.subtitle ? (c(), d("div", js, y(s.data.subtitle), 1)) : k("", !0)
3062
+ }, null, 8, Hs)
3063
+ ])) : b("", !0),
3064
+ l("div", js, [
3065
+ l("div", zs, [
3066
+ l("div", qs, v(s.data.title), 1),
3067
+ s.data.subtitle ? (c(), d("div", Vs, v(s.data.subtitle), 1)) : b("", !0)
3002
3068
  ]),
3003
3069
  s.data.badge && s.data.badge.label ? (c(), d("span", {
3004
3070
  key: 0,
3005
- class: L([
3071
+ class: R([
3006
3072
  "wm-art__badge",
3007
3073
  `wm-art__badge--${s.data.badge.tone || "neutral"}`
3008
3074
  ])
3009
- }, y(s.data.badge.label), 3)) : k("", !0)
3075
+ }, v(s.data.badge.label), 3)) : b("", !0)
3010
3076
  ]),
3011
- n.hasBody ? (c(), d("div", zs, [
3012
- s.data.body ? (c(), d("div", qs, y(s.data.body), 1)) : k("", !0),
3013
- n.fields.length ? (c(!0), d(B, { key: 1 }, N(n.fields, (a, o) => (c(), d("div", {
3077
+ n.hasBody ? (c(), d("div", Ks, [
3078
+ s.data.body ? (c(), d("div", Ws, v(s.data.body), 1)) : b("", !0),
3079
+ n.fields.length ? (c(!0), d(E, { key: 1 }, N(n.fields, (a, o) => (c(), d("div", {
3014
3080
  key: o,
3015
3081
  class: "wm-art__field"
3016
3082
  }, [
3017
- l("div", Vs, y(a.label), 1),
3083
+ l("div", $s, v(a.label), 1),
3018
3084
  l("div", {
3019
- class: L([
3085
+ class: R([
3020
3086
  "wm-art__fieldValue",
3021
3087
  { "wm-art__fieldValue--multi": a.multiline }
3022
3088
  ])
3023
- }, y(a.value), 3)
3024
- ]))), 128)) : k("", !0)
3025
- ])) : k("", !0)
3089
+ }, v(a.value), 3)
3090
+ ]))), 128)) : b("", !0)
3091
+ ])) : b("", !0)
3026
3092
  ]);
3027
3093
  }
3028
- const Ws = /* @__PURE__ */ D(Is, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3029
- function $s(e, t, s) {
3094
+ const Ys = /* @__PURE__ */ U(Ds, [["render", Gs], ["__scopeId", "data-v-7eae0e4a"]]);
3095
+ function Js(e, t, s) {
3030
3096
  if (!e) return "";
3031
3097
  const r = new Date(e);
3032
3098
  if (Number.isNaN(r.getTime())) return e;
@@ -3040,12 +3106,12 @@ function $s(e, t, s) {
3040
3106
  });
3041
3107
  return `${i}${s}${n}`;
3042
3108
  }
3043
- const Gs = {
3109
+ const Xs = {
3044
3110
  name: "WmArtifactTicket",
3045
3111
  inject: {
3046
3112
  // Translator + resolved-language getter shared by the Messenger
3047
3113
  // shell. Fall back to French wording when used standalone.
3048
- t: { default: () => F() },
3114
+ t: { default: () => H() },
3049
3115
  wmLocale: { default: () => () => "fr" }
3050
3116
  },
3051
3117
  props: {
@@ -3058,7 +3124,7 @@ const Gs = {
3058
3124
  },
3059
3125
  formattedDate() {
3060
3126
  var e;
3061
- return $s(
3127
+ return Js(
3062
3128
  (e = this.data) == null ? void 0 : e.created_at,
3063
3129
  re(this.wmLocale()),
3064
3130
  this.t("ticket.dateAt")
@@ -3086,13 +3152,13 @@ const Gs = {
3086
3152
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
3087
3153
  }
3088
3154
  }
3089
- }, Ys = { class: "wm-art wm-art--ticket" }, Js = { class: "wm-art__head wm-tk__head" }, Xs = { class: "wm-art__title wm-tk__title" }, Qs = { class: "wm-tk__sub" }, Zs = { class: "wm-tk__ref" }, er = {
3155
+ }, Qs = { class: "wm-art wm-art--ticket" }, Zs = { class: "wm-art__head wm-tk__head" }, er = { class: "wm-art__title wm-tk__title" }, tr = { class: "wm-tk__sub" }, nr = { class: "wm-tk__ref" }, sr = {
3090
3156
  key: 0,
3091
3157
  class: "wm-tk__text"
3092
- }, tr = {
3158
+ }, rr = {
3093
3159
  key: 0,
3094
3160
  class: "wm-art__body"
3095
- }, nr = { class: "wm-art__fieldLabel" }, sr = ["data-level"], rr = {
3161
+ }, ir = { class: "wm-art__fieldLabel" }, ar = ["data-level"], or = {
3096
3162
  key: 1,
3097
3163
  class: "wm-tk__date",
3098
3164
  width: "12",
@@ -3104,16 +3170,16 @@ const Gs = {
3104
3170
  "stroke-linecap": "round",
3105
3171
  "stroke-linejoin": "round",
3106
3172
  "aria-hidden": "true"
3107
- }, ir = {
3173
+ }, lr = {
3108
3174
  key: 1,
3109
3175
  class: "wm-art__footer wm-tk__footer"
3110
3176
  };
3111
- function ar(e, t, s, r, i, n) {
3112
- return c(), d("div", Ys, [
3113
- l("div", Js, [
3114
- l("div", Xs, y(s.data.title), 1),
3115
- l("div", Qs, [
3116
- l("div", Zs, [
3177
+ function cr(e, t, s, r, i, n) {
3178
+ return c(), d("div", Qs, [
3179
+ l("div", Zs, [
3180
+ l("div", er, v(s.data.title), 1),
3181
+ l("div", tr, [
3182
+ l("div", nr, [
3117
3183
  t[0] || (t[0] = l("svg", {
3118
3184
  width: "11",
3119
3185
  height: "11",
@@ -3128,10 +3194,10 @@ function ar(e, t, s, r, i, n) {
3128
3194
  l("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" }),
3129
3195
  l("path", { d: "M13 5v2M13 17v2M13 11v2" })
3130
3196
  ], -1)),
3131
- l("span", null, y(s.data.reference), 1)
3197
+ l("span", null, v(s.data.reference), 1)
3132
3198
  ]),
3133
3199
  l("span", {
3134
- class: L([
3200
+ class: R([
3135
3201
  "wm-art__badge",
3136
3202
  "wm-tk__badge",
3137
3203
  `wm-art__badge--${s.data.status.tone || "neutral"}`
@@ -3141,19 +3207,19 @@ function ar(e, t, s, r, i, n) {
3141
3207
  class: "wm-tk__dot",
3142
3208
  "aria-hidden": "true"
3143
3209
  }, null, -1)),
3144
- Se(" " + y(s.data.status.label), 1)
3210
+ Me(" " + v(s.data.status.label), 1)
3145
3211
  ], 2)
3146
3212
  ]),
3147
- s.data.body ? (c(), d("div", er, y(s.data.body), 1)) : k("", !0)
3213
+ s.data.body ? (c(), d("div", sr, v(s.data.body), 1)) : b("", !0)
3148
3214
  ]),
3149
- n.fields.length ? (c(), d("div", tr, [
3150
- (c(!0), d(B, null, N(n.fields, (a, o) => (c(), d("div", {
3215
+ n.fields.length ? (c(), d("div", rr, [
3216
+ (c(!0), d(E, null, N(n.fields, (a, o) => (c(), d("div", {
3151
3217
  key: o,
3152
3218
  class: "wm-art__field"
3153
3219
  }, [
3154
- l("div", nr, y(a.label), 1),
3220
+ l("div", ir, v(a.label), 1),
3155
3221
  l("div", {
3156
- class: L([
3222
+ class: R([
3157
3223
  "wm-art__fieldValue",
3158
3224
  { "wm-art__fieldValue--multi": a.multiline }
3159
3225
  ])
@@ -3188,7 +3254,7 @@ function ar(e, t, s, r, i, n) {
3188
3254
  height: "9",
3189
3255
  rx: "0.5"
3190
3256
  }, null, -1)
3191
- ])], 8, sr)) : n.isDate(a.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
3257
+ ])], 8, ar)) : n.isDate(a.label) ? (c(), d("svg", or, [...t[3] || (t[3] = [
3192
3258
  l("rect", {
3193
3259
  x: "3",
3194
3260
  y: "4",
@@ -3197,12 +3263,12 @@ function ar(e, t, s, r, i, n) {
3197
3263
  rx: "2"
3198
3264
  }, null, -1),
3199
3265
  l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3200
- ])])) : k("", !0),
3201
- l("span", null, y(a.value), 1)
3266
+ ])])) : b("", !0),
3267
+ l("span", null, v(a.value), 1)
3202
3268
  ], 2)
3203
3269
  ]))), 128))
3204
- ])) : k("", !0),
3205
- s.data.created_at ? (c(), d("div", ir, [
3270
+ ])) : b("", !0),
3271
+ s.data.created_at ? (c(), d("div", lr, [
3206
3272
  t[4] || (t[4] = l("svg", {
3207
3273
  width: "11",
3208
3274
  height: "11",
@@ -3223,15 +3289,15 @@ function ar(e, t, s, r, i, n) {
3223
3289
  }),
3224
3290
  l("path", { d: "M16 2v4M8 2v4M3 10h18" })
3225
3291
  ], -1)),
3226
- l("span", null, y(n.formattedDate), 1)
3227
- ])) : k("", !0)
3292
+ l("span", null, v(n.formattedDate), 1)
3293
+ ])) : b("", !0)
3228
3294
  ]);
3229
3295
  }
3230
- const or = /* @__PURE__ */ D(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
3231
- form_response: Bs,
3232
- info_card: Ws,
3233
- ticket: or
3234
- }, cr = {
3296
+ const dr = /* @__PURE__ */ U(Xs, [["render", cr], ["__scopeId", "data-v-5f30c914"]]), ur = {
3297
+ form_response: Us,
3298
+ info_card: Ys,
3299
+ ticket: dr
3300
+ }, mr = {
3235
3301
  name: "WmArtifactRenderer",
3236
3302
  props: {
3237
3303
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -3242,23 +3308,23 @@ const or = /* @__PURE__ */ D(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914
3242
3308
  component() {
3243
3309
  var t;
3244
3310
  const e = (t = this.artifact) == null ? void 0 : t.kind;
3245
- return e && lr[e] || null;
3311
+ return e && ur[e] || null;
3246
3312
  }
3247
3313
  }
3248
3314
  };
3249
- function dr(e, t, s, r, i, n) {
3250
- return n.component ? (c(), I(Ae(n.component), {
3315
+ function hr(e, t, s, r, i, n) {
3316
+ return n.component ? (c(), B(Te(n.component), {
3251
3317
  key: 0,
3252
3318
  data: s.artifact.data
3253
- }, null, 8, ["data"])) : k("", !0);
3319
+ }, null, 8, ["data"])) : b("", !0);
3254
3320
  }
3255
- const ur = /* @__PURE__ */ D(cr, [["render", dr]]), mr = {
3321
+ const fr = /* @__PURE__ */ U(mr, [["render", hr]]), _r = {
3256
3322
  name: "WmAttachmentPreview",
3257
3323
  inject: {
3258
3324
  signAttachmentFn: { default: null },
3259
3325
  // Translator shared by the Messenger shell; French fallback when
3260
3326
  // the component is used standalone.
3261
- t: { default: () => F() }
3327
+ t: { default: () => H() }
3262
3328
  },
3263
3329
  props: {
3264
3330
  attachment: { type: Object, required: !0 }
@@ -3320,17 +3386,17 @@ const ur = /* @__PURE__ */ D(cr, [["render", dr]]), mr = {
3320
3386
  this.safeHref === "#" && e.preventDefault();
3321
3387
  }
3322
3388
  }
3323
- }, hr = ["href"], fr = ["src", "alt"], _r = ["src"], gr = ["src"], yr = ["href", "download"], vr = { class: "wm-att__main" }, pr = { class: "wm-att__name" }, wr = {
3389
+ }, gr = ["href"], vr = ["src", "alt"], yr = ["src"], pr = ["src"], wr = ["href", "download"], br = { class: "wm-att__main" }, kr = { class: "wm-att__name" }, Cr = {
3324
3390
  key: 0,
3325
3391
  class: "wm-att__meta"
3326
- }, br = {
3392
+ }, Ar = {
3327
3393
  key: 0,
3328
3394
  class: "wm-att__spin",
3329
3395
  "aria-hidden": "true"
3330
3396
  };
3331
- function kr(e, t, s, r, i, n) {
3397
+ function Sr(e, t, s, r, i, n) {
3332
3398
  return c(), d("div", {
3333
- class: L(["wm-att", ["wm-att--" + (n.kind || "file")]])
3399
+ class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
3334
3400
  }, [
3335
3401
  n.kind === "image" && i.url ? (c(), d("a", {
3336
3402
  key: 0,
@@ -3343,19 +3409,19 @@ function kr(e, t, s, r, i, n) {
3343
3409
  src: i.url,
3344
3410
  alt: n.displayName,
3345
3411
  loading: "lazy"
3346
- }, null, 8, fr)
3347
- ], 8, hr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
3412
+ }, null, 8, vr)
3413
+ ], 8, gr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
3348
3414
  key: 1,
3349
3415
  src: i.url,
3350
3416
  controls: "",
3351
3417
  preload: "metadata"
3352
- }, null, 8, _r)) : n.kind === "video" && i.url ? (c(), d("video", {
3418
+ }, null, 8, yr)) : n.kind === "video" && i.url ? (c(), d("video", {
3353
3419
  key: 2,
3354
3420
  src: i.url,
3355
3421
  controls: "",
3356
3422
  playsinline: "",
3357
3423
  preload: "auto"
3358
- }, null, 8, gr)) : (c(), d("a", {
3424
+ }, null, 8, pr)) : (c(), d("a", {
3359
3425
  key: 3,
3360
3426
  class: "wm-att__file",
3361
3427
  href: n.safeHref,
@@ -3380,15 +3446,15 @@ function kr(e, t, s, r, i, n) {
3380
3446
  l("path", { d: "M14 2v6h6" })
3381
3447
  ])
3382
3448
  ], -1)),
3383
- l("span", vr, [
3384
- l("span", pr, y(n.displayName), 1),
3385
- n.sizeLabel ? (c(), d("span", wr, y(n.sizeLabel), 1)) : k("", !0)
3449
+ l("span", br, [
3450
+ l("span", kr, v(n.displayName), 1),
3451
+ n.sizeLabel ? (c(), d("span", Cr, v(n.sizeLabel), 1)) : b("", !0)
3386
3452
  ]),
3387
- i.loading ? (c(), d("span", br)) : k("", !0)
3388
- ], 8, yr))
3453
+ i.loading ? (c(), d("span", Ar)) : b("", !0)
3454
+ ], 8, wr))
3389
3455
  ], 2);
3390
3456
  }
3391
- const Cr = /* @__PURE__ */ D(mr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3457
+ const Tr = /* @__PURE__ */ U(_r, [["render", Sr], ["__scopeId", "data-v-b207a8bd"]]), Mr = {
3392
3458
  name: "WmBubble",
3393
3459
  props: {
3394
3460
  role: { type: String, default: "ai" },
@@ -3400,29 +3466,29 @@ const Cr = /* @__PURE__ */ D(mr, [["render", kr], ["__scopeId", "data-v-b207a8bd
3400
3466
  return _t(this.text);
3401
3467
  }
3402
3468
  }
3403
- }, Sr = ["innerHTML"];
3404
- function Mr(e, t, s, r, i, n) {
3469
+ }, xr = ["innerHTML"];
3470
+ function Or(e, t, s, r, i, n) {
3405
3471
  return c(), d("div", {
3406
- class: L(["wm-bubble", "wm-bubble--" + s.role])
3472
+ class: R(["wm-bubble", "wm-bubble--" + s.role])
3407
3473
  }, [
3408
- We(e.$slots, "default", {}, () => [
3409
- l("span", { innerHTML: n.rendered }, null, 8, Sr)
3474
+ $e(e.$slots, "default", {}, () => [
3475
+ l("span", { innerHTML: n.rendered }, null, 8, xr)
3410
3476
  ], !0)
3411
3477
  ], 2);
3412
3478
  }
3413
- const Tr = /* @__PURE__ */ D(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
3414
- function Rr(e, t, s, r, i, n) {
3415
- return c(), d("div", Or, [...t[0] || (t[0] = [
3479
+ const Rr = /* @__PURE__ */ U(Mr, [["render", Or], ["__scopeId", "data-v-7ab13147"]]), Lr = { name: "WmTyping" }, Ir = { class: "wm-typing" };
3480
+ function Er(e, t, s, r, i, n) {
3481
+ return c(), d("div", Ir, [...t[0] || (t[0] = [
3416
3482
  l("span", { style: { "animation-delay": "0s" } }, null, -1),
3417
3483
  l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3418
3484
  l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3419
3485
  ])]);
3420
3486
  }
3421
- const Lr = /* @__PURE__ */ D(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
3422
- function ne(e) {
3487
+ const Br = /* @__PURE__ */ U(Lr, [["render", Er], ["__scopeId", "data-v-df2447fd"]]);
3488
+ function se(e) {
3423
3489
  return e ? e.client_msg_id || e.id : "";
3424
3490
  }
3425
- const Er = {
3491
+ const Pr = {
3426
3492
  transferred_to_human: "system.transferredToHuman",
3427
3493
  assigned: "system.assigned",
3428
3494
  unassigned: "system.unassigned",
@@ -3430,21 +3496,21 @@ const Er = {
3430
3496
  closed: "system.closed",
3431
3497
  reopened: "system.reopened",
3432
3498
  idle: "system.idle"
3433
- }, Br = 80, Ir = 200, Pr = {
3499
+ }, Ur = 80, Dr = 200, Nr = {
3434
3500
  name: "WmMessageList",
3435
3501
  components: {
3436
3502
  AIAvatar: he,
3437
- HumanAvatar: ye,
3438
- Bubble: Tr,
3439
- Typing: Lr,
3440
- ActionResult: As,
3441
- AttachmentPreview: Cr,
3442
- ArtifactRenderer: ur
3503
+ HumanAvatar: ve,
3504
+ Bubble: Rr,
3505
+ Typing: Br,
3506
+ ActionResult: Ms,
3507
+ AttachmentPreview: Tr,
3508
+ ArtifactRenderer: fr
3443
3509
  },
3444
3510
  inject: {
3445
3511
  // Translator + resolved-language getter shared by the Messenger
3446
3512
  // shell. Fall back to French wording when used standalone.
3447
- t: { default: () => F() },
3513
+ t: { default: () => H() },
3448
3514
  wmLocale: { default: () => () => "fr" }
3449
3515
  },
3450
3516
  props: {
@@ -3515,9 +3581,9 @@ const Er = {
3515
3581
  const f = this.roleOf(o);
3516
3582
  if (f === "system") {
3517
3583
  if (((r = o == null ? void 0 : o.payload) == null ? void 0 : r.event) === "action_admin_pending") {
3518
- const M = e[e.length - 1];
3519
- M && M.role === "ai" ? M.messages.push(o) : e.push({
3520
- key: `g-${ne(o)}`,
3584
+ const T = e[e.length - 1];
3585
+ T && T.role === "ai" ? T.messages.push(o) : e.push({
3586
+ key: `g-${se(o)}`,
3521
3587
  role: "ai",
3522
3588
  agentName: "",
3523
3589
  agentAvatarUrl: null,
@@ -3527,7 +3593,7 @@ const Er = {
3527
3593
  continue;
3528
3594
  }
3529
3595
  e.push({
3530
- key: `sys-${ne(o)}`,
3596
+ key: `sys-${se(o)}`,
3531
3597
  role: f,
3532
3598
  messages: [o],
3533
3599
  items: [],
@@ -3535,9 +3601,9 @@ const Er = {
3535
3601
  });
3536
3602
  continue;
3537
3603
  }
3538
- const b = e[e.length - 1];
3539
- b && b.role === f && (f === "ai" || b.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? b.messages.push(o) : e.push({
3540
- key: `g-${ne(o)}`,
3604
+ const k = e[e.length - 1];
3605
+ k && k.role === f && (f === "ai" || k.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? k.messages.push(o) : e.push({
3606
+ key: `g-${se(o)}`,
3541
3607
  role: f,
3542
3608
  agentName: ((n = o == null ? void 0 : o.author) == null ? void 0 : n.name) || "",
3543
3609
  agentAvatarUrl: ((a = o == null ? void 0 : o.author) == null ? void 0 : a.avatar_url) || null,
@@ -3548,8 +3614,8 @@ const Er = {
3548
3614
  for (const o of e) {
3549
3615
  if (o.role === "system") continue;
3550
3616
  const f = [];
3551
- for (const b of o.messages)
3552
- for (const v of this.itemsOf(b)) f.push(v);
3617
+ for (const k of o.messages)
3618
+ for (const y of this.itemsOf(k)) f.push(y);
3553
3619
  o.items = f;
3554
3620
  }
3555
3621
  const t = [];
@@ -3576,7 +3642,7 @@ const Er = {
3576
3642
  if (s.role === "user" || s.role === "system" || !s.items.length) continue;
3577
3643
  const r = s.messages[0];
3578
3644
  if (!r) continue;
3579
- const i = G(r.id);
3645
+ const i = Y(r.id);
3580
3646
  if (i != null && !(i <= e) && !(t && r.created_at && r.created_at > t))
3581
3647
  return s.key;
3582
3648
  }
@@ -3604,7 +3670,7 @@ const Er = {
3604
3670
  this.scheduleMeasure();
3605
3671
  },
3606
3672
  methods: {
3607
- messageKey: ne,
3673
+ messageKey: se,
3608
3674
  // Resolve a stable Vue :key for a non-system group by checking if
3609
3675
  // any of its messages were previously part of a group we'd already
3610
3676
  // assigned an id to; if so, reuse that id, otherwise mint a new
@@ -3616,7 +3682,7 @@ const Er = {
3616
3682
  const t = this._groupIdByMsgKey;
3617
3683
  let s = null;
3618
3684
  for (const r of e) {
3619
- const i = ne(r);
3685
+ const i = se(r);
3620
3686
  if (i && t.has(i)) {
3621
3687
  s = t.get(i);
3622
3688
  break;
@@ -3624,17 +3690,17 @@ const Er = {
3624
3690
  }
3625
3691
  s == null && (s = ++this._groupIdCounter);
3626
3692
  for (const r of e) {
3627
- const i = ne(r);
3693
+ const i = se(r);
3628
3694
  i && t.set(i, s);
3629
3695
  }
3630
3696
  return `g-${s}`;
3631
3697
  },
3632
3698
  isAtBottom(e) {
3633
- return e.scrollHeight - e.scrollTop - e.clientHeight <= Br;
3699
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= Ur;
3634
3700
  },
3635
3701
  onScroll() {
3636
3702
  const e = this.$refs.scrollEl;
3637
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Ir && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3703
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Dr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3638
3704
  },
3639
3705
  // Capture pre-patch scroll state and restore it on the next tick.
3640
3706
  //
@@ -3687,8 +3753,8 @@ const Er = {
3687
3753
  const n = () => {
3688
3754
  const a = i.anchor, o = this.findRowByKey(e, a.rowKey);
3689
3755
  if (!o) return;
3690
- const b = o.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3691
- Math.abs(b) > 0.5 && (e.scrollTop += b);
3756
+ const k = o.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
3757
+ Math.abs(k) > 0.5 && (e.scrollTop += k);
3692
3758
  };
3693
3759
  n(), requestAnimationFrame(() => {
3694
3760
  n(), requestAnimationFrame(n);
@@ -3835,9 +3901,9 @@ const Er = {
3835
3901
  // doit garder son arrondi.
3836
3902
  cornersFor(e, t) {
3837
3903
  var ie, ae, X;
3838
- const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, v = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, T = (Q, oe, Z) => Q != null && M != null ? Q + z >= M : oe === Z || oe === "card" && Z === "bubble";
3839
- let U = o, x = o, q = o, J = o;
3840
- return a ? (b && (x = f), (v || !n) && (q = f), b && T(E, b, r == null ? void 0 : r.top) && (U = f), v && T(S, v, r == null ? void 0 : r.bottom) && (J = f)) : (b && (U = f), (v || !n) && (J = f), b && T(E, b, r == null ? void 0 : r.top) && (x = f), v && T(S, v, r == null ? void 0 : r.bottom) && (q = f)), { tl: U, tr: x, br: q, bl: J };
3904
+ const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, k = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], I = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = (Q, oe, Z) => Q != null && T != null ? Q + z >= T : oe === Z || oe === "card" && Z === "bubble";
3905
+ let D = o, x = o, q = o, J = o;
3906
+ return a ? (k && (x = f), (y || !n) && (q = f), k && M(I, k, r == null ? void 0 : r.top) && (D = f), y && M(S, y, r == null ? void 0 : r.bottom) && (J = f)) : (k && (D = f), (y || !n) && (J = f), k && M(I, k, r == null ? void 0 : r.top) && (x = f), y && M(S, y, r == null ? void 0 : r.bottom) && (q = f)), { tl: D, tr: x, br: q, bl: J };
3841
3907
  },
3842
3908
  // Inline column-count for the mosaic grid, capped at 4. Single
3843
3909
  // attachment falls back to the vertical-list layout (null). Two
@@ -3860,8 +3926,8 @@ const Er = {
3860
3926
  // corners of every top-row cell flatten too.
3861
3927
  mosaicCornerStyle(e, t, s) {
3862
3928
  if (!t || t < 2) return null;
3863
- const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, v = "4px", M = {};
3864
- return (a || f) && (M["--wm-r-tl"] = v), (o || f) && (M["--wm-r-tr"] = v), (a || b) && (M["--wm-r-bl"] = v), (o || b) && (M["--wm-r-br"] = v), s && (M["--wm-r-tl"] = v, M["--wm-r-tr"] = v), Object.keys(M).length ? M : null;
3929
+ const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, k = e + r < t, y = "4px", T = {};
3930
+ return (a || f) && (T["--wm-r-tl"] = y), (o || f) && (T["--wm-r-tr"] = y), (a || k) && (T["--wm-r-bl"] = y), (o || k) && (T["--wm-r-br"] = y), s && (T["--wm-r-tl"] = y, T["--wm-r-tr"] = y), Object.keys(T).length ? T : null;
3865
3931
  },
3866
3932
  // Inline style emitting the four corner CSS variables. Set on
3867
3933
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3882,7 +3948,7 @@ const Er = {
3882
3948
  rowKeyOf(e, t) {
3883
3949
  var r;
3884
3950
  const s = (r = e == null ? void 0 : e.items) == null ? void 0 : r[t];
3885
- return s ? `${ne(s.message)}-${s.partKey}` : "";
3951
+ return s ? `${se(s.message)}-${s.partKey}` : "";
3886
3952
  },
3887
3953
  // rAF-debouncé : `updated()` peut être appelé en rafale (stream,
3888
3954
  // typing, scroll), un seul flush layout par frame suffit.
@@ -3985,17 +4051,17 @@ const Er = {
3985
4051
  return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
3986
4052
  },
3987
4053
  actionDetail(e) {
3988
- var s, r, i, n, a, o, f, b;
4054
+ var s, r, i, n, a, o, f, k;
3989
4055
  const t = e == null ? void 0 : e.payload;
3990
4056
  if (!t) return "";
3991
4057
  if (t.state === "success")
3992
4058
  return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
3993
4059
  if (t.state === "rejected") {
3994
4060
  if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
3995
- const v = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, M = typeof v == "string" && v.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
3996
- return this.t(M);
4061
+ const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, T = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
4062
+ return this.t(T);
3997
4063
  }
3998
- return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
4064
+ return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((k = t.failure) == null ? void 0 : k.error)) || "";
3999
4065
  },
4000
4066
  actionArtifact(e) {
4001
4067
  var s, r;
@@ -4004,7 +4070,7 @@ const Er = {
4004
4070
  },
4005
4071
  systemLabel(e) {
4006
4072
  var i, n, a;
4007
- const t = (i = e == null ? void 0 : e.payload) == null ? void 0 : i.event, s = Er[t], r = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
4073
+ const t = (i = e == null ? void 0 : e.payload) == null ? void 0 : i.event, s = Pr[t], r = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
4008
4074
  return s ? this.t(s, { name: r }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
4009
4075
  },
4010
4076
  scrollToBottom() {
@@ -4019,199 +4085,199 @@ const Er = {
4019
4085
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
4020
4086
  }
4021
4087
  }
4022
- }, Dr = { class: "wm-list__wrap" }, Ur = {
4088
+ }, Fr = { class: "wm-list__wrap" }, Hr = {
4023
4089
  key: 0,
4024
4090
  class: "wm-list__loadMore",
4025
4091
  role: "status",
4026
4092
  "aria-live": "polite"
4027
- }, Nr = { class: "wm-list__loadMore-lbl" }, Fr = {
4093
+ }, jr = { class: "wm-list__loadMore-lbl" }, zr = {
4028
4094
  key: 1,
4029
4095
  class: "wm-list__historyEnd"
4030
- }, Hr = {
4096
+ }, qr = {
4031
4097
  key: 2,
4032
4098
  class: "wm-list__sep"
4033
- }, jr = { class: "wm-list__sep-label" }, zr = {
4099
+ }, Vr = { class: "wm-list__sep-label" }, Kr = {
4034
4100
  key: 0,
4035
4101
  class: "wm-list__sep wm-list__sep--unread"
4036
- }, qr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Vr = {
4102
+ }, Wr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, $r = {
4037
4103
  key: 0,
4038
4104
  class: "wm-list__sysep"
4039
- }, Kr = { class: "wm-list__sysep-label" }, Wr = ["data-row-key", "onPointerdown"], $r = {
4105
+ }, Gr = { class: "wm-list__sysep-label" }, Yr = ["data-row-key", "onPointerdown"], Jr = {
4040
4106
  key: 0,
4041
4107
  class: "wm-list__avatarSlot"
4042
- }, Gr = { key: 0 }, Yr = {
4108
+ }, Xr = { key: 0 }, Qr = {
4043
4109
  key: 1,
4044
4110
  "aria-hidden": "true"
4045
- }, Jr = { key: 2 }, Xr = { key: 0 }, Qr = {
4111
+ }, Zr = { key: 2 }, ei = { key: 0 }, ti = {
4046
4112
  key: 1,
4047
4113
  "aria-hidden": "true"
4048
- }, Zr = { key: 2 }, ei = {
4114
+ }, ni = { key: 2 }, si = {
4049
4115
  key: 3,
4050
4116
  class: "wm-list__row wm-list__row--ai fade-up"
4051
- }, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
4052
- function si(e, t, s, r, i, n) {
4053
- const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), b = P("ArtifactRenderer"), v = P("Bubble"), M = P("AttachmentPreview"), E = P("Typing");
4054
- return c(), d("div", Dr, [
4117
+ }, ri = { class: "wm-list__avatarSlot" }, ii = ["aria-label", "title"];
4118
+ function ai(e, t, s, r, i, n) {
4119
+ const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), k = P("ArtifactRenderer"), y = P("Bubble"), T = P("AttachmentPreview"), I = P("Typing");
4120
+ return c(), d("div", Fr, [
4055
4121
  l("div", {
4056
4122
  ref: "scrollEl",
4057
- class: L(["wm-list", { "wm-list--silent": i.silentFades }]),
4123
+ class: R(["wm-list", { "wm-list--silent": i.silentFades }]),
4058
4124
  onScrollPassive: t[4] || (t[4] = (...S) => n.onScroll && n.onScroll(...S))
4059
4125
  }, [
4060
- s.loadingMore ? (c(), d("div", Ur, [
4126
+ s.loadingMore ? (c(), d("div", Hr, [
4061
4127
  t[6] || (t[6] = l("span", {
4062
4128
  class: "wm-list__loadMore-spinner",
4063
4129
  "aria-hidden": "true"
4064
4130
  }, null, -1)),
4065
- l("span", Nr, y(n.t("messageList.loadingHistory")), 1)
4066
- ])) : n.historyExhausted ? (c(), d("div", Fr, y(n.t("messageList.conversationStart")), 1)) : k("", !0),
4067
- s.dateLabel ? (c(), d("div", Hr, [
4131
+ l("span", jr, v(n.t("messageList.loadingHistory")), 1)
4132
+ ])) : n.historyExhausted ? (c(), d("div", zr, v(n.t("messageList.conversationStart")), 1)) : b("", !0),
4133
+ s.dateLabel ? (c(), d("div", qr, [
4068
4134
  t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
4069
- l("span", jr, y(s.dateLabel), 1),
4135
+ l("span", Vr, v(s.dateLabel), 1),
4070
4136
  t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
4071
- ])) : k("", !0),
4072
- (c(!0), d(B, null, N(n.groups, (S, z) => (c(), d(B, {
4137
+ ])) : b("", !0),
4138
+ (c(!0), d(E, null, N(n.groups, (S, z) => (c(), d(E, {
4073
4139
  key: S.key
4074
4140
  }, [
4075
- S.key === n.unreadGroupKey ? (c(), d("div", zr, [
4141
+ S.key === n.unreadGroupKey ? (c(), d("div", Kr, [
4076
4142
  t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4077
- l("span", qr, y(n.t("messageList.unread")), 1),
4143
+ l("span", Wr, v(n.t("messageList.unread")), 1),
4078
4144
  t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4079
- ])) : k("", !0),
4145
+ ])) : b("", !0),
4080
4146
  S.role === "system" || S.items.length ? (c(), d("div", {
4081
4147
  key: 1,
4082
- class: L(["wm-list__group", "wm-list__group--" + S.role])
4148
+ class: R(["wm-list__group", "wm-list__group--" + S.role])
4083
4149
  }, [
4084
- S.role === "system" ? (c(), d("div", Vr, [
4150
+ S.role === "system" ? (c(), d("div", $r, [
4085
4151
  t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4086
- l("span", Kr, y(S.systemLabel), 1),
4152
+ l("span", Gr, v(S.systemLabel), 1),
4087
4153
  t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4088
- ])) : (c(), d(B, { key: 1 }, [
4089
- (c(!0), d(B, null, N(S.items, (T, U) => (c(), d(B, {
4090
- key: `${n.messageKey(T.message)}-${T.partKey}`
4154
+ ])) : (c(), d(E, { key: 1 }, [
4155
+ (c(!0), d(E, null, N(S.items, (M, D) => (c(), d(E, {
4156
+ key: `${n.messageKey(M.message)}-${M.partKey}`
4091
4157
  }, [
4092
4158
  l("div", {
4093
- "data-row-key": `${n.messageKey(T.message)}-${T.partKey}`,
4094
- class: L(["wm-list__row fade-up", [
4159
+ "data-row-key": `${n.messageKey(M.message)}-${M.partKey}`,
4160
+ class: R(["wm-list__row fade-up", [
4095
4161
  "wm-list__row--" + S.role,
4096
4162
  {
4097
- "is-pending": T.message._pending,
4098
- "is-failed": T.message._failed
4163
+ "is-pending": M.message._pending,
4164
+ "is-failed": M.message._failed
4099
4165
  }
4100
4166
  ]]),
4101
- style: j(n.cornersStyle(S, U)),
4102
- onPointerdown: (x) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
4167
+ style: F(n.cornersStyle(S, D)),
4168
+ onPointerdown: (x) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
4103
4169
  onPointerup: t[0] || (t[0] = (x) => n.onPressEnd()),
4104
4170
  onPointercancel: t[1] || (t[1] = (x) => n.onPressEnd()),
4105
4171
  onPointerleave: t[2] || (t[2] = (x) => n.onPressEnd()),
4106
- onContextmenu: t[3] || (t[3] = Y(() => {
4172
+ onContextmenu: t[3] || (t[3] = G(() => {
4107
4173
  }, ["prevent"]))
4108
4174
  }, [
4109
- S.role !== "user" ? (c(), d("div", $r, [
4110
- U === S.items.length - 1 ? (c(), d(B, { key: 0 }, [
4111
- S.role === "ai" ? (c(), I(a, {
4175
+ S.role !== "user" ? (c(), d("div", Jr, [
4176
+ D === S.items.length - 1 ? (c(), d(E, { key: 0 }, [
4177
+ S.role === "ai" ? (c(), B(a, {
4112
4178
  key: 0,
4113
4179
  size: 26,
4114
4180
  tail: !0,
4115
4181
  name: s.aiAgentName,
4116
4182
  "image-url": s.aiAgentAvatarUrl
4117
- }, null, 8, ["name", "image-url"])) : (c(), I(o, {
4183
+ }, null, 8, ["name", "image-url"])) : (c(), B(o, {
4118
4184
  key: 1,
4119
4185
  name: S.agentName,
4120
4186
  "avatar-url": S.agentAvatarUrl,
4121
4187
  size: 26,
4122
4188
  tail: !0
4123
4189
  }, null, 8, ["name", "avatar-url"]))
4124
- ], 64)) : k("", !0)
4125
- ])) : k("", !0),
4126
- T.renderAs === "action" ? (c(), I(f, {
4190
+ ], 64)) : b("", !0)
4191
+ ])) : b("", !0),
4192
+ M.renderAs === "action" ? (c(), B(f, {
4127
4193
  key: 1,
4128
- state: T.message.payload.state,
4129
- label: n.actionLabel(T.message),
4130
- detail: n.actionDetail(T.message)
4131
- }, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), I(f, {
4194
+ state: M.message.payload.state,
4195
+ label: n.actionLabel(M.message),
4196
+ detail: n.actionDetail(M.message)
4197
+ }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), B(f, {
4132
4198
  key: 2,
4133
4199
  state: "awaiting",
4134
4200
  label: n.t("messageList.approvalRequestSent"),
4135
- detail: T.message.text_md || ""
4136
- }, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), I(b, {
4201
+ detail: M.message.text_md || ""
4202
+ }, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), B(k, {
4137
4203
  key: 3,
4138
- artifact: n.actionArtifact(T.message)
4139
- }, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), I(b, {
4204
+ artifact: n.actionArtifact(M.message)
4205
+ }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), B(k, {
4140
4206
  key: 4,
4141
- artifact: n.artifactOf(T.message)
4207
+ artifact: n.artifactOf(M.message)
4142
4208
  }, null, 8, ["artifact"])) : (c(), d("div", {
4143
4209
  key: 5,
4144
- class: L(["wm-list__body", {
4145
- "wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
4210
+ class: R(["wm-list__body", {
4211
+ "wm-list__body--mixed": !!M.message.text_md && n.attachmentsOf(M.message).length > 0
4146
4212
  }])
4147
4213
  }, [
4148
- T.message.text_md ? (c(), I(v, {
4214
+ M.message.text_md ? (c(), B(y, {
4149
4215
  key: 0,
4150
4216
  role: S.role,
4151
- text: T.message.text_md
4152
- }, null, 8, ["role", "text"])) : k("", !0),
4153
- n.attachmentsOf(T.message).length ? (c(), d("div", {
4217
+ text: M.message.text_md
4218
+ }, null, 8, ["role", "text"])) : b("", !0),
4219
+ n.attachmentsOf(M.message).length ? (c(), d("div", {
4154
4220
  key: 1,
4155
- class: L(["wm-list__atts", {
4221
+ class: R(["wm-list__atts", {
4156
4222
  "wm-list__atts--align-end": S.role === "user",
4157
- "wm-list__atts--mosaic": n.attachmentsOf(T.message).length >= 2
4223
+ "wm-list__atts--mosaic": n.attachmentsOf(M.message).length >= 2
4158
4224
  }]),
4159
- style: j(
4225
+ style: F(
4160
4226
  n.mosaicGridStyle(
4161
- n.attachmentsOf(T.message).length
4227
+ n.attachmentsOf(M.message).length
4162
4228
  )
4163
4229
  )
4164
4230
  }, [
4165
- (c(!0), d(B, null, N(n.attachmentsOf(
4166
- T.message
4167
- ), (x, q) => (c(), I(M, {
4168
- key: `${n.messageKey(T.message)}-att-${q}`,
4231
+ (c(!0), d(E, null, N(n.attachmentsOf(
4232
+ M.message
4233
+ ), (x, q) => (c(), B(T, {
4234
+ key: `${n.messageKey(M.message)}-att-${q}`,
4169
4235
  attachment: x,
4170
- style: j(
4236
+ style: F(
4171
4237
  n.mosaicCornerStyle(
4172
4238
  q,
4173
- n.attachmentsOf(T.message).length,
4174
- !!T.message.text_md
4239
+ n.attachmentsOf(M.message).length,
4240
+ !!M.message.text_md
4175
4241
  )
4176
4242
  )
4177
4243
  }, null, 8, ["attachment", "style"]))), 128))
4178
- ], 6)) : k("", !0)
4244
+ ], 6)) : b("", !0)
4179
4245
  ], 2))
4180
- ], 46, Wr),
4181
- U < S.items.length - 1 && i.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (S.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
4246
+ ], 46, Yr),
4247
+ D < S.items.length - 1 && i.pressedItemKey === `${n.messageKey(M.message)}-${M.partKey}` && (S.role !== "user" || n.timeOf(M.message)) ? (c(), d("div", {
4182
4248
  key: 0,
4183
- class: L(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": S.role === "user" }])
4249
+ class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": S.role === "user" }])
4184
4250
  }, [
4185
- S.role !== "user" ? (c(), d("span", Gr, y(n.roleLabel(S)), 1)) : k("", !0),
4186
- S.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : k("", !0),
4187
- n.timeOf(T.message) ? (c(), d("span", Jr, y(n.timeOf(T.message)), 1)) : k("", !0)
4188
- ], 2)) : k("", !0)
4251
+ S.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(S)), 1)) : b("", !0),
4252
+ S.role !== "user" && n.timeOf(M.message) ? (c(), d("span", Qr, "•")) : b("", !0),
4253
+ n.timeOf(M.message) ? (c(), d("span", Zr, v(n.timeOf(M.message)), 1)) : b("", !0)
4254
+ ], 2)) : b("", !0)
4189
4255
  ], 64))), 128)),
4190
4256
  (S.role !== "user" || n.lastTimeOf(S)) && !n.hasTrailingOverlay(S) ? (c(), d("div", {
4191
4257
  key: 0,
4192
- class: L(["wm-list__meta", { "wm-list__meta--right": S.role === "user" }])
4258
+ class: R(["wm-list__meta", { "wm-list__meta--right": S.role === "user" }])
4193
4259
  }, [
4194
- S.role !== "user" ? (c(), d("span", Xr, y(n.roleLabel(S)), 1)) : k("", !0),
4195
- S.role !== "user" && n.lastTimeOf(S) ? (c(), d("span", Qr, "•")) : k("", !0),
4196
- n.lastTimeOf(S) ? (c(), d("span", Zr, y(n.lastTimeOf(S)), 1)) : k("", !0)
4197
- ], 2)) : k("", !0)
4260
+ S.role !== "user" ? (c(), d("span", ei, v(n.roleLabel(S)), 1)) : b("", !0),
4261
+ S.role !== "user" && n.lastTimeOf(S) ? (c(), d("span", ti, "•")) : b("", !0),
4262
+ n.lastTimeOf(S) ? (c(), d("span", ni, v(n.lastTimeOf(S)), 1)) : b("", !0)
4263
+ ], 2)) : b("", !0)
4198
4264
  ], 64))
4199
- ], 2)) : k("", !0)
4265
+ ], 2)) : b("", !0)
4200
4266
  ], 64))), 128)),
4201
- s.streamingActive ? (c(), d("div", ei, [
4202
- l("div", ti, [
4203
- W(a, {
4267
+ s.streamingActive ? (c(), d("div", si, [
4268
+ l("div", ri, [
4269
+ K(a, {
4204
4270
  size: 26,
4205
4271
  tail: !0,
4206
4272
  name: s.aiAgentName,
4207
4273
  "image-url": s.aiAgentAvatarUrl
4208
4274
  }, null, 8, ["name", "image-url"])
4209
4275
  ]),
4210
- W(E)
4211
- ])) : k("", !0)
4276
+ K(I)
4277
+ ])) : b("", !0)
4212
4278
  ], 34),
4213
- W(Ne, { name: "wm-scrollDown" }, {
4214
- default: Fe(() => [
4279
+ K(Ae, { name: "wm-scrollDown" }, {
4280
+ default: Se(() => [
4215
4281
  i.showScrollDown ? (c(), d("button", {
4216
4282
  key: 0,
4217
4283
  type: "button",
@@ -4233,15 +4299,15 @@ function si(e, t, s, r, i, n) {
4233
4299
  }, [
4234
4300
  l("path", { d: "M6 9l6 6 6-6" })
4235
4301
  ], -1)
4236
- ])], 8, ni)) : k("", !0)
4302
+ ])], 8, ii)) : b("", !0)
4237
4303
  ]),
4238
4304
  _: 1
4239
4305
  })
4240
4306
  ]);
4241
4307
  }
4242
- const ri = /* @__PURE__ */ D(Pr, [["render", si], ["__scopeId", "data-v-79b30a8f"]]), ge = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4243
- function ii() {
4244
- return Oe && [
4308
+ const oi = /* @__PURE__ */ U(Nr, [["render", ai], ["__scopeId", "data-v-79b30a8f"]]), ge = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Le = typeof window < "u" && typeof window.MediaRecorder < "u";
4309
+ function li() {
4310
+ return Le && [
4245
4311
  "video/webm;codecs=vp9,opus",
4246
4312
  "video/webm;codecs=vp8,opus",
4247
4313
  "video/webm",
@@ -4251,7 +4317,7 @@ function ii() {
4251
4317
  return (r = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : r.call(s, t);
4252
4318
  }) || "";
4253
4319
  }
4254
- function Ve({ audio: e }) {
4320
+ function Ke({ audio: e }) {
4255
4321
  return {
4256
4322
  video: !0,
4257
4323
  audio: !!e,
@@ -4260,21 +4326,21 @@ function Ve({ audio: e }) {
4260
4326
  systemAudio: e ? "include" : "exclude"
4261
4327
  };
4262
4328
  }
4263
- function co(e) {
4329
+ function go(e) {
4264
4330
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
4265
4331
  }
4266
- async function ai() {
4332
+ async function ci() {
4267
4333
  if (!ge) return null;
4268
4334
  let e;
4269
4335
  try {
4270
4336
  e = await navigator.mediaDevices.getDisplayMedia(
4271
- Ve({ audio: !1 })
4337
+ Ke({ audio: !1 })
4272
4338
  );
4273
4339
  } catch (t) {
4274
4340
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
4275
4341
  }
4276
4342
  try {
4277
- return await oi(e);
4343
+ return await di(e);
4278
4344
  } catch (t) {
4279
4345
  return console.error("[media] screenshot capture", t), null;
4280
4346
  } finally {
@@ -4283,77 +4349,77 @@ async function ai() {
4283
4349
  });
4284
4350
  }
4285
4351
  }
4286
- async function oi(e) {
4352
+ async function di(e) {
4287
4353
  const t = document.createElement("video");
4288
4354
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
4289
4355
  const s = t.videoWidth || 1280, r = t.videoHeight || 720, i = document.createElement("canvas");
4290
4356
  i.width = s, i.height = r, i.getContext("2d").drawImage(t, 0, 0, s, r);
4291
4357
  const n = await new Promise((o, f) => {
4292
4358
  i.toBlob(
4293
- (b) => b ? o(b) : f(new Error("toBlob failed")),
4359
+ (k) => k ? o(k) : f(new Error("toBlob failed")),
4294
4360
  "image/png"
4295
4361
  );
4296
4362
  }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4297
4363
  return new File([n], `capture-${a}.png`, { type: "image/png" });
4298
4364
  }
4299
- async function li(e = {}) {
4300
- var b;
4301
- if (!ge || !Oe) return null;
4365
+ async function ui(e = {}) {
4366
+ var k;
4367
+ if (!ge || !Le) return null;
4302
4368
  let t;
4303
4369
  try {
4304
4370
  t = await navigator.mediaDevices.getDisplayMedia(
4305
- Ve({ audio: !0 })
4371
+ Ke({ audio: !0 })
4306
4372
  );
4307
- } catch (v) {
4308
- return (v == null ? void 0 : v.name) !== "NotAllowedError" && console.error("[media] record picker", v), null;
4373
+ } catch (y) {
4374
+ return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
4309
4375
  }
4310
- const s = ii();
4376
+ const s = li();
4311
4377
  let r;
4312
4378
  try {
4313
4379
  r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
4314
- } catch (v) {
4315
- return console.error("[media] recorder init", v), t.getTracks().forEach((M) => {
4316
- M.stop();
4380
+ } catch (y) {
4381
+ return console.error("[media] recorder init", y), t.getTracks().forEach((T) => {
4382
+ T.stop();
4317
4383
  }), null;
4318
4384
  }
4319
4385
  const i = [];
4320
4386
  let n = null, a = !1;
4321
- r.addEventListener("dataavailable", (v) => {
4322
- v.data && v.data.size > 0 && i.push(v.data);
4387
+ r.addEventListener("dataavailable", (y) => {
4388
+ y.data && y.data.size > 0 && i.push(y.data);
4323
4389
  }), r.addEventListener("stop", () => {
4324
- var v, M;
4325
- if (n && clearInterval(n), t.getTracks().forEach((E) => {
4326
- E.stop();
4390
+ var y, T;
4391
+ if (n && clearInterval(n), t.getTracks().forEach((I) => {
4392
+ I.stop();
4327
4393
  }), i.length) {
4328
- const E = r.mimeType || s || "video/webm", S = new Blob(i, { type: E }), z = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([S], `ecran-${T}.${z}`, {
4329
- type: E
4394
+ const I = r.mimeType || s || "video/webm", S = new Blob(i, { type: I }), z = /mp4/.test(I) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([S], `ecran-${M}.${z}`, {
4395
+ type: I
4330
4396
  });
4331
- (v = e.onfinalize) == null || v.call(e, U);
4397
+ (y = e.onfinalize) == null || y.call(e, D);
4332
4398
  } else
4333
- (M = e.oncancel) == null || M.call(e);
4334
- }), t.getVideoTracks().forEach((v) => {
4335
- v.addEventListener("ended", () => o(), { once: !0 });
4399
+ (T = e.oncancel) == null || T.call(e);
4400
+ }), t.getVideoTracks().forEach((y) => {
4401
+ y.addEventListener("ended", () => o(), { once: !0 });
4336
4402
  });
4337
4403
  function o() {
4338
4404
  if (!a && (a = !0, r.state !== "inactive"))
4339
4405
  try {
4340
4406
  r.stop();
4341
- } catch (v) {
4342
- console.error("[media] recorder stop", v);
4407
+ } catch (y) {
4408
+ console.error("[media] recorder stop", y);
4343
4409
  }
4344
4410
  }
4345
4411
  try {
4346
4412
  r.start(1e3);
4347
- } catch (v) {
4348
- return console.error("[media] recorder start", v), t.getTracks().forEach((M) => {
4349
- M.stop();
4413
+ } catch (y) {
4414
+ return console.error("[media] recorder start", y), t.getTracks().forEach((T) => {
4415
+ T.stop();
4350
4416
  }), null;
4351
4417
  }
4352
- (b = e.onstart) == null || b.call(e);
4418
+ (k = e.onstart) == null || k.call(e);
4353
4419
  const f = Date.now();
4354
4420
  return n = setInterval(() => {
4355
- var v;
4356
- (v = e.ontick) == null || v.call(e, Date.now() - f);
4421
+ var y;
4422
+ (y = e.ontick) == null || y.call(e, Date.now() - f);
4357
4423
  }, 500), {
4358
4424
  stop: o,
4359
4425
  get state() {
@@ -4361,7 +4427,7 @@ async function li(e = {}) {
4361
4427
  }
4362
4428
  };
4363
4429
  }
4364
- const ci = [
4430
+ const mi = [
4365
4431
  {
4366
4432
  action: "file",
4367
4433
  labelKey: "composer.attachFile",
@@ -4377,12 +4443,12 @@ const ci = [
4377
4443
  labelKey: "composer.recordScreen",
4378
4444
  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"
4379
4445
  }
4380
- ], di = {
4446
+ ], hi = {
4381
4447
  name: "WmComposer",
4382
4448
  inject: {
4383
4449
  // Translator shared by the Messenger shell; French fallback when
4384
4450
  // the component is used standalone.
4385
- t: { default: () => F() }
4451
+ t: { default: () => H() }
4386
4452
  },
4387
4453
  props: {
4388
4454
  modelValue: { type: String, default: "" },
@@ -4411,10 +4477,10 @@ const ci = [
4411
4477
  return !this.disabled && !!this.local.trim();
4412
4478
  },
4413
4479
  attachItems() {
4414
- return ci.map((e) => ({
4480
+ return mi.map((e) => ({
4415
4481
  ...e,
4416
4482
  label: this.t(e.labelKey),
4417
- disabled: e.action === "screenshot" && !ge || e.action === "record" && (!ge || !Oe)
4483
+ disabled: e.action === "screenshot" && !ge || e.action === "record" && (!ge || !Le)
4418
4484
  }));
4419
4485
  },
4420
4486
  recordingElapsedLabel() {
@@ -4485,13 +4551,13 @@ const ci = [
4485
4551
  },
4486
4552
  async captureScreenshot() {
4487
4553
  if (this.disabled) return;
4488
- const e = await ai();
4554
+ const e = await ci();
4489
4555
  e && this.$emit("attach", e);
4490
4556
  },
4491
4557
  async startRecording() {
4492
4558
  if (this.recording || this.disabled) return;
4493
4559
  this.recordingElapsed = 0;
4494
- const e = await li({
4560
+ const e = await ui({
4495
4561
  onstart: () => {
4496
4562
  this.recording = !0;
4497
4563
  },
@@ -4533,39 +4599,39 @@ const ci = [
4533
4599
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4534
4600
  }
4535
4601
  }
4536
- }, ui = {
4602
+ }, fi = {
4537
4603
  key: 0,
4538
4604
  class: "wm-rec"
4539
- }, mi = { class: "wm-rec__lbl" }, hi = {
4605
+ }, _i = { class: "wm-rec__lbl" }, gi = {
4540
4606
  key: 1,
4541
4607
  class: "wm-compose__menu",
4542
4608
  role: "menu"
4543
- }, fi = ["disabled", "onClick"], _i = { class: "wm-compose__menuIcon" }, gi = {
4609
+ }, vi = ["disabled", "onClick"], yi = { class: "wm-compose__menuIcon" }, pi = {
4544
4610
  viewBox: "0 0 24 24",
4545
4611
  width: "14",
4546
4612
  height: "14",
4547
4613
  "aria-hidden": "true"
4548
- }, yi = ["d"], vi = ["placeholder", "disabled"], pi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
4549
- function ki(e, t, s, r, i, n) {
4614
+ }, wi = ["d"], bi = ["placeholder", "disabled"], ki = { class: "wm-compose__actions" }, Ci = ["title", "aria-label", "disabled"], Ai = ["disabled", "aria-label"];
4615
+ function Si(e, t, s, r, i, n) {
4550
4616
  return c(), d("div", {
4551
- class: L(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4552
- style: j(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
4617
+ class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
4618
+ style: F(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
4553
4619
  }, [
4554
- i.recording ? (c(), d("div", ui, [
4620
+ i.recording ? (c(), d("div", fi, [
4555
4621
  t[8] || (t[8] = l("span", {
4556
4622
  class: "wm-rec__dot",
4557
4623
  "aria-hidden": "true"
4558
4624
  }, null, -1)),
4559
- l("span", mi, y(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4625
+ l("span", _i, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
4560
4626
  l("button", {
4561
4627
  type: "button",
4562
4628
  class: "wm-rec__stop",
4563
4629
  onClick: t[0] || (t[0] = (...a) => n.stopRecording && n.stopRecording(...a))
4564
- }, y(n.t("composer.stop")), 1)
4565
- ])) : k("", !0),
4630
+ }, v(n.t("composer.stop")), 1)
4631
+ ])) : b("", !0),
4566
4632
  l("form", {
4567
- class: L(["wm-compose", { "has-attach": i.attachOpen }]),
4568
- onSubmit: t[7] || (t[7] = Y((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
4633
+ class: R(["wm-compose", { "has-attach": i.attachOpen }]),
4634
+ onSubmit: t[7] || (t[7] = G((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
4569
4635
  }, [
4570
4636
  l("input", {
4571
4637
  ref: "fileEl",
@@ -4578,17 +4644,17 @@ function ki(e, t, s, r, i, n) {
4578
4644
  key: 0,
4579
4645
  class: "wm-compose__overlay",
4580
4646
  onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
4581
- })) : k("", !0),
4582
- i.attachOpen ? (c(), d("div", hi, [
4583
- (c(!0), d(B, null, N(n.attachItems, (a) => (c(), d("button", {
4647
+ })) : b("", !0),
4648
+ i.attachOpen ? (c(), d("div", gi, [
4649
+ (c(!0), d(E, null, N(n.attachItems, (a) => (c(), d("button", {
4584
4650
  key: a.action,
4585
4651
  type: "button",
4586
4652
  class: "wm-compose__menuItem",
4587
4653
  disabled: a.disabled,
4588
4654
  onClick: (o) => n.onAttachAction(a.action)
4589
4655
  }, [
4590
- l("span", _i, [
4591
- (c(), d("svg", gi, [
4656
+ l("span", yi, [
4657
+ (c(), d("svg", pi, [
4592
4658
  l("path", {
4593
4659
  d: a.path,
4594
4660
  stroke: "currentColor",
@@ -4596,12 +4662,12 @@ function ki(e, t, s, r, i, n) {
4596
4662
  "stroke-linecap": "round",
4597
4663
  "stroke-linejoin": "round",
4598
4664
  fill: "none"
4599
- }, null, 8, yi)
4665
+ }, null, 8, wi)
4600
4666
  ]))
4601
4667
  ]),
4602
- l("span", null, y(a.label), 1)
4603
- ], 8, fi))), 128))
4604
- ])) : k("", !0),
4668
+ l("span", null, v(a.label), 1)
4669
+ ], 8, vi))), 128))
4670
+ ])) : b("", !0),
4605
4671
  $(l("textarea", {
4606
4672
  ref: "inputEl",
4607
4673
  "onUpdate:modelValue": t[3] || (t[3] = (a) => i.local = a),
@@ -4611,13 +4677,13 @@ function ki(e, t, s, r, i, n) {
4611
4677
  disabled: s.disabled,
4612
4678
  onKeydown: t[4] || (t[4] = (...a) => n.onKeydown && n.onKeydown(...a)),
4613
4679
  onInput: t[5] || (t[5] = (...a) => n.autosize && n.autosize(...a))
4614
- }, null, 40, vi), [
4615
- [se, i.local]
4680
+ }, null, 40, bi), [
4681
+ [ee, i.local]
4616
4682
  ]),
4617
- l("div", pi, [
4683
+ l("div", ki, [
4618
4684
  l("button", {
4619
4685
  type: "button",
4620
- class: L(["wm-compose__icon", { "is-open": i.attachOpen }]),
4686
+ class: R(["wm-compose__icon", { "is-open": i.attachOpen }]),
4621
4687
  title: s.attachLabel,
4622
4688
  "aria-label": s.attachLabel,
4623
4689
  disabled: i.recording,
@@ -4636,10 +4702,10 @@ function ki(e, t, s, r, i, n) {
4636
4702
  }, [
4637
4703
  l("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" })
4638
4704
  ], -1)
4639
- ])], 10, wi),
4705
+ ])], 10, Ci),
4640
4706
  l("button", {
4641
4707
  type: "submit",
4642
- class: L(["wm-compose__send", { "is-empty": !n.canSend }]),
4708
+ class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
4643
4709
  disabled: !n.canSend,
4644
4710
  "aria-label": n.t("composer.send")
4645
4711
  }, [...t[10] || (t[10] = [
@@ -4656,12 +4722,12 @@ function ki(e, t, s, r, i, n) {
4656
4722
  }, [
4657
4723
  l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4658
4724
  ], -1)
4659
- ])], 10, bi)
4725
+ ])], 10, Ai)
4660
4726
  ])
4661
4727
  ], 34)
4662
4728
  ], 6);
4663
4729
  }
4664
- const Ci = /* @__PURE__ */ D(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
4730
+ const Ti = /* @__PURE__ */ U(hi, [["render", Si], ["__scopeId", "data-v-bba29b9c"]]), Mi = {
4665
4731
  name: "WmInlineCallbacks",
4666
4732
  props: {
4667
4733
  // Array d'items `{ id?, label, style?, ... }`. Pour les suggestions,
@@ -4683,6 +4749,15 @@ const Ci = /* @__PURE__ */ D(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
4683
4749
  // détruise/recrée les boutons et rejoue l'animation d'entrée.
4684
4750
  batchKey() {
4685
4751
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4752
+ },
4753
+ // En-tête factuel de la carte (variante buttons) : premier `title` non
4754
+ // vide parmi les callbacks — le serveur le pose sur le callback primaire.
4755
+ headerTitle() {
4756
+ if (this.variant !== "buttons") return "";
4757
+ const e = this.items.find(
4758
+ (t) => typeof (t == null ? void 0 : t.title) == "string" && t.title.trim()
4759
+ );
4760
+ return e ? e.title.trim() : "";
4686
4761
  }
4687
4762
  },
4688
4763
  methods: {
@@ -4690,26 +4765,37 @@ const Ci = /* @__PURE__ */ D(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
4690
4765
  return this.variant === "chips" ? "wm-icb__btn--chip" : ["wm-icb__btn--action", `wm-icb__btn--${(e == null ? void 0 : e.style) || "neutral"}`];
4691
4766
  }
4692
4767
  }
4693
- }, Si = ["onClick"];
4694
- function Mi(e, t, s, r, i, n) {
4768
+ }, xi = ["onClick"], Oi = {
4769
+ key: 0,
4770
+ class: "wm-icb__title"
4771
+ }, Ri = { class: "wm-icb__row" }, Li = ["onClick"];
4772
+ function Ii(e, t, s, r, i, n) {
4695
4773
  return s.items.length ? (c(), d("div", {
4696
4774
  key: n.batchKey,
4697
- class: L(["wm-icb", `wm-icb--${s.variant}`])
4775
+ class: R(["wm-icb", `wm-icb--${s.variant}`])
4698
4776
  }, [
4699
- (c(!0), d(B, null, N(s.items, (a, o) => (c(), d("button", {
4777
+ s.variant === "chips" ? (c(!0), d(E, { key: 0 }, N(s.items, (a, o) => (c(), d("button", {
4700
4778
  key: a.id != null ? a.id : o,
4701
4779
  type: "button",
4702
- class: L(["wm-icb__btn", n.btnClass(a)]),
4703
- style: j(
4704
- s.variant === "chips" ? { animationDelay: s.baseDelay + o * s.stepDelay + "ms" } : null
4705
- ),
4780
+ class: "wm-icb__btn wm-icb__btn--chip",
4781
+ style: F({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
4706
4782
  onClick: (f) => e.$emit("select", a)
4707
- }, y(a.label), 15, Si))), 128))
4708
- ], 2)) : k("", !0);
4783
+ }, v(a.label), 13, xi))), 128)) : (c(), d(E, { key: 1 }, [
4784
+ n.headerTitle ? (c(), d("div", Oi, v(n.headerTitle), 1)) : b("", !0),
4785
+ l("div", Ri, [
4786
+ (c(!0), d(E, null, N(s.items, (a, o) => (c(), d("button", {
4787
+ key: a.id != null ? a.id : o,
4788
+ type: "button",
4789
+ class: R(["wm-icb__btn", n.btnClass(a)]),
4790
+ onClick: (f) => e.$emit("select", a)
4791
+ }, v(a.label), 11, Li))), 128))
4792
+ ])
4793
+ ], 64))
4794
+ ], 2)) : b("", !0);
4709
4795
  }
4710
- const Ti = /* @__PURE__ */ D(Ai, [["render", Mi], ["__scopeId", "data-v-9a4ce94e"]]);
4711
- let De = 0;
4712
- const xi = /* @__PURE__ */ new Set([
4796
+ const Ei = /* @__PURE__ */ U(Mi, [["render", Ii], ["__scopeId", "data-v-c8cc8cbf"]]);
4797
+ let Fe = 0;
4798
+ const Bi = /* @__PURE__ */ new Set([
4713
4799
  "text",
4714
4800
  "textarea",
4715
4801
  "number",
@@ -4717,13 +4803,13 @@ const xi = /* @__PURE__ */ new Set([
4717
4803
  "select",
4718
4804
  "multiselect",
4719
4805
  "date"
4720
- ]), Oi = {
4806
+ ]), Pi = {
4721
4807
  name: "WmFormCard",
4722
4808
  components: { AIAvatar: he },
4723
4809
  inject: {
4724
4810
  // Translator shared by the Messenger shell; French fallback when
4725
4811
  // the component is used standalone.
4726
- t: { default: () => F() }
4812
+ t: { default: () => H() }
4727
4813
  },
4728
4814
  props: {
4729
4815
  form: { type: Object, required: !0 },
@@ -4734,8 +4820,8 @@ const xi = /* @__PURE__ */ new Set([
4734
4820
  },
4735
4821
  emits: ["submit"],
4736
4822
  data() {
4737
- return De += 1, {
4738
- _uid: De,
4823
+ return Fe += 1, {
4824
+ _uid: Fe,
4739
4825
  values: {},
4740
4826
  busy: !1,
4741
4827
  error: ""
@@ -4747,7 +4833,7 @@ const xi = /* @__PURE__ */ new Set([
4747
4833
  // douteux.
4748
4834
  normalizedFields() {
4749
4835
  var t;
4750
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !xi.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4836
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Bi.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
4751
4837
  }
4752
4838
  },
4753
4839
  created() {
@@ -4800,54 +4886,54 @@ const xi = /* @__PURE__ */ new Set([
4800
4886
  }
4801
4887
  }
4802
4888
  }
4803
- }, Ri = { class: "wm-form" }, Li = { class: "wm-form__head" }, Ei = { class: "wm-form__icon" }, Bi = { class: "wm-form__main" }, Ii = { class: "wm-form__title" }, Pi = {
4889
+ }, Ui = { class: "wm-form" }, Di = { class: "wm-form__head" }, Ni = { class: "wm-form__icon" }, Fi = { class: "wm-form__main" }, Hi = { class: "wm-form__title" }, ji = {
4804
4890
  key: 0,
4805
4891
  class: "wm-form__detail"
4806
- }, Di = ["for"], Ui = {
4892
+ }, zi = ["for"], qi = {
4807
4893
  key: 0,
4808
4894
  class: "wm-form__req",
4809
4895
  "aria-hidden": "true"
4810
- }, Ni = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Hi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ji = ["id", "onUpdate:modelValue", "required", "disabled"], zi = {
4896
+ }, Vi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Wi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], $i = ["id", "onUpdate:modelValue", "required", "disabled"], Gi = {
4811
4897
  key: 4,
4812
4898
  class: "wm-form__bool"
4813
- }, qi = ["id", "onUpdate:modelValue", "disabled"], Vi = ["id", "onUpdate:modelValue", "required", "disabled"], Ki = {
4899
+ }, Yi = ["id", "onUpdate:modelValue", "disabled"], Ji = ["id", "onUpdate:modelValue", "required", "disabled"], Xi = {
4814
4900
  value: "",
4815
4901
  disabled: ""
4816
- }, Wi = ["value"], $i = {
4902
+ }, Qi = ["value"], Zi = {
4817
4903
  key: 6,
4818
4904
  class: "wm-form__multi"
4819
- }, Gi = ["value", "checked", "disabled", "onChange"], Yi = {
4905
+ }, ea = ["value", "checked", "disabled", "onChange"], ta = {
4820
4906
  key: 0,
4821
4907
  class: "wm-form__err"
4822
- }, Ji = ["disabled"], Xi = {
4908
+ }, na = ["disabled"], sa = {
4823
4909
  key: 0,
4824
4910
  class: "wm-form__spinner",
4825
4911
  "aria-hidden": "true"
4826
- }, Qi = {
4912
+ }, ra = {
4827
4913
  key: 2,
4828
4914
  class: "wm-form__doneLbl"
4829
4915
  };
4830
- function Zi(e, t, s, r, i, n) {
4916
+ function ia(e, t, s, r, i, n) {
4831
4917
  const a = P("AIAvatar");
4832
- return c(), d("div", Ri, [
4833
- l("div", Li, [
4834
- l("div", Ei, [
4835
- W(a, {
4918
+ return c(), d("div", Ui, [
4919
+ l("div", Di, [
4920
+ l("div", Ni, [
4921
+ K(a, {
4836
4922
  size: 24,
4837
4923
  name: s.agentName,
4838
4924
  "image-url": s.agentAvatarUrl
4839
4925
  }, null, 8, ["name", "image-url"])
4840
4926
  ]),
4841
- l("div", Bi, [
4842
- l("div", Ii, y(s.form.title || n.t("form.title")), 1),
4843
- s.form.description ? (c(), d("div", Pi, y(s.form.description), 1)) : k("", !0)
4927
+ l("div", Fi, [
4928
+ l("div", Hi, v(s.form.title || n.t("form.title")), 1),
4929
+ s.form.description ? (c(), d("div", ji, v(s.form.description), 1)) : b("", !0)
4844
4930
  ])
4845
4931
  ]),
4846
4932
  l("form", {
4847
4933
  class: "wm-form__body",
4848
- onSubmit: t[0] || (t[0] = Y((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
4934
+ onSubmit: t[0] || (t[0] = G((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
4849
4935
  }, [
4850
- (c(!0), d(B, null, N(n.normalizedFields, (o) => (c(), d("div", {
4936
+ (c(!0), d(E, null, N(n.normalizedFields, (o) => (c(), d("div", {
4851
4937
  key: o.key,
4852
4938
  class: "wm-form__field"
4853
4939
  }, [
@@ -4855,9 +4941,9 @@ function Zi(e, t, s, r, i, n) {
4855
4941
  for: `wm-f-${i._uid}-${o.key}`,
4856
4942
  class: "wm-form__label"
4857
4943
  }, [
4858
- Se(y(o.label), 1),
4859
- o.required ? (c(), d("span", Ui, "*")) : k("", !0)
4860
- ], 8, Di),
4944
+ Me(v(o.label), 1),
4945
+ o.required ? (c(), d("span", qi, "*")) : b("", !0)
4946
+ ], 8, zi),
4861
4947
  o.type === "text" ? $((c(), d("input", {
4862
4948
  key: 0,
4863
4949
  id: `wm-f-${i._uid}-${o.key}`,
@@ -4867,8 +4953,8 @@ function Zi(e, t, s, r, i, n) {
4867
4953
  placeholder: o.placeholder || "",
4868
4954
  required: o.required,
4869
4955
  disabled: s.readOnly || i.busy
4870
- }, null, 8, Ni)), [
4871
- [se, i.values[o.key]]
4956
+ }, null, 8, Vi)), [
4957
+ [ee, i.values[o.key]]
4872
4958
  ]) : o.type === "textarea" ? $((c(), d("textarea", {
4873
4959
  key: 1,
4874
4960
  id: `wm-f-${i._uid}-${o.key}`,
@@ -4878,8 +4964,8 @@ function Zi(e, t, s, r, i, n) {
4878
4964
  placeholder: o.placeholder || "",
4879
4965
  required: o.required,
4880
4966
  disabled: s.readOnly || i.busy
4881
- }, null, 8, Fi)), [
4882
- [se, i.values[o.key]]
4967
+ }, null, 8, Ki)), [
4968
+ [ee, i.values[o.key]]
4883
4969
  ]) : o.type === "number" ? $((c(), d("input", {
4884
4970
  key: 2,
4885
4971
  id: `wm-f-${i._uid}-${o.key}`,
@@ -4889,9 +4975,9 @@ function Zi(e, t, s, r, i, n) {
4889
4975
  placeholder: o.placeholder || "",
4890
4976
  required: o.required,
4891
4977
  disabled: s.readOnly || i.busy
4892
- }, null, 8, Hi)), [
4978
+ }, null, 8, Wi)), [
4893
4979
  [
4894
- se,
4980
+ ee,
4895
4981
  i.values[o.key],
4896
4982
  void 0,
4897
4983
  { number: !0 }
@@ -4904,18 +4990,18 @@ function Zi(e, t, s, r, i, n) {
4904
4990
  class: "wm-form__input",
4905
4991
  required: o.required,
4906
4992
  disabled: s.readOnly || i.busy
4907
- }, null, 8, ji)), [
4908
- [se, i.values[o.key]]
4909
- ]) : o.type === "boolean" ? (c(), d("label", zi, [
4993
+ }, null, 8, $i)), [
4994
+ [ee, i.values[o.key]]
4995
+ ]) : o.type === "boolean" ? (c(), d("label", Gi, [
4910
4996
  $(l("input", {
4911
4997
  id: `wm-f-${i._uid}-${o.key}`,
4912
4998
  "onUpdate:modelValue": (f) => i.values[o.key] = f,
4913
4999
  type: "checkbox",
4914
5000
  disabled: s.readOnly || i.busy
4915
- }, null, 8, qi), [
4916
- [$e, i.values[o.key]]
5001
+ }, null, 8, Yi), [
5002
+ [Ge, i.values[o.key]]
4917
5003
  ]),
4918
- l("span", null, y(o.placeholder || n.t("common.yes")), 1)
5004
+ l("span", null, v(o.placeholder || n.t("common.yes")), 1)
4919
5005
  ])) : o.type === "select" ? $((c(), d("select", {
4920
5006
  key: 5,
4921
5007
  id: `wm-f-${i._uid}-${o.key}`,
@@ -4924,15 +5010,15 @@ function Zi(e, t, s, r, i, n) {
4924
5010
  required: o.required,
4925
5011
  disabled: s.readOnly || i.busy
4926
5012
  }, [
4927
- l("option", Ki, y(o.placeholder || n.t("form.choose")), 1),
4928
- (c(!0), d(B, null, N(o.options, (f) => (c(), d("option", {
5013
+ l("option", Xi, v(o.placeholder || n.t("form.choose")), 1),
5014
+ (c(!0), d(E, null, N(o.options, (f) => (c(), d("option", {
4929
5015
  key: f.value,
4930
5016
  value: f.value
4931
- }, y(f.label), 9, Wi))), 128))
4932
- ], 8, Vi)), [
4933
- [Ge, i.values[o.key]]
4934
- ]) : o.type === "multiselect" ? (c(), d("div", $i, [
4935
- (c(!0), d(B, null, N(o.options, (f) => (c(), d("label", {
5017
+ }, v(f.label), 9, Qi))), 128))
5018
+ ], 8, Ji)), [
5019
+ [Ye, i.values[o.key]]
5020
+ ]) : o.type === "multiselect" ? (c(), d("div", Zi, [
5021
+ (c(!0), d(E, null, N(o.options, (f) => (c(), d("label", {
4936
5022
  key: f.value,
4937
5023
  class: "wm-form__multiItem"
4938
5024
  }, [
@@ -4941,35 +5027,35 @@ function Zi(e, t, s, r, i, n) {
4941
5027
  value: f.value,
4942
5028
  checked: Array.isArray(i.values[o.key]) && i.values[o.key].includes(f.value),
4943
5029
  disabled: s.readOnly || i.busy,
4944
- onChange: (b) => n.toggleMulti(
5030
+ onChange: (k) => n.toggleMulti(
4945
5031
  o.key,
4946
5032
  f.value,
4947
- b.target.checked
5033
+ k.target.checked
4948
5034
  )
4949
- }, null, 40, Gi),
4950
- l("span", null, y(f.label), 1)
5035
+ }, null, 40, ea),
5036
+ l("span", null, v(f.label), 1)
4951
5037
  ]))), 128))
4952
- ])) : k("", !0)
5038
+ ])) : b("", !0)
4953
5039
  ]))), 128)),
4954
- i.error ? (c(), d("div", Yi, y(i.error), 1)) : k("", !0),
4955
- s.readOnly ? (c(), d("div", Qi, y(n.t("form.responseSent")), 1)) : (c(), d("button", {
5040
+ i.error ? (c(), d("div", ta, v(i.error), 1)) : b("", !0),
5041
+ s.readOnly ? (c(), d("div", ra, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
4956
5042
  key: 1,
4957
5043
  type: "submit",
4958
5044
  class: "wm-form__submit",
4959
5045
  disabled: i.busy
4960
5046
  }, [
4961
- i.busy ? (c(), d("span", Xi)) : k("", !0),
4962
- l("span", null, y(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
4963
- ], 8, Ji))
5047
+ i.busy ? (c(), d("span", sa)) : b("", !0),
5048
+ l("span", null, v(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
5049
+ ], 8, na))
4964
5050
  ], 32)
4965
5051
  ]);
4966
5052
  }
4967
- const ea = /* @__PURE__ */ D(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56"]]), ta = {
5053
+ const aa = /* @__PURE__ */ U(Pi, [["render", ia], ["__scopeId", "data-v-fe65cc56"]]), oa = {
4968
5054
  name: "WmFeedback",
4969
5055
  inject: {
4970
5056
  // Translator shared by the Messenger shell; French fallback when
4971
5057
  // the component is used standalone.
4972
- t: { default: () => F() }
5058
+ t: { default: () => H() }
4973
5059
  },
4974
5060
  props: {
4975
5061
  busy: { type: Boolean, default: !1 },
@@ -4998,13 +5084,13 @@ const ea = /* @__PURE__ */ D(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56
4998
5084
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
4999
5085
  }
5000
5086
  }
5001
- }, 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 = {
5087
+ }, la = { class: "wm-fb" }, ca = { class: "wm-fb__title" }, da = { class: "wm-fb__sub" }, ua = { class: "wm-fb__row" }, ma = ["onClick"], ha = { class: "wm-fb__emoji" }, fa = { class: "wm-fb__label" }, _a = ["disabled"], ga = {
5002
5088
  key: 1,
5003
5089
  class: "wm-fb__done"
5004
- }, ua = { class: "wm-fb__doneTitle" }, ma = { class: "wm-fb__doneSub" };
5005
- function ha(e, t, s, r, i, n) {
5006
- return c(), d("div", na, [
5007
- s.done ? (c(), d("div", da, [
5090
+ }, va = { class: "wm-fb__doneTitle" }, ya = { class: "wm-fb__doneSub" };
5091
+ function pa(e, t, s, r, i, n) {
5092
+ return c(), d("div", la, [
5093
+ s.done ? (c(), d("div", ga, [
5008
5094
  t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
5009
5095
  l("svg", {
5010
5096
  width: "16",
@@ -5020,37 +5106,37 @@ function ha(e, t, s, r, i, n) {
5020
5106
  l("path", { d: "M20 6L9 17l-5-5" })
5021
5107
  ])
5022
5108
  ], -1)),
5023
- l("div", ua, y(n.t("feedback.doneTitle")), 1),
5024
- l("div", ma, y(n.t("feedback.doneSubtitle")), 1)
5025
- ])) : (c(), d(B, { key: 0 }, [
5026
- l("div", sa, y(n.t("feedback.question")), 1),
5027
- l("div", ra, y(n.t("feedback.subtitle")), 1),
5028
- l("div", ia, [
5029
- (c(!0), d(B, null, N(n.options, (a) => (c(), d("button", {
5109
+ l("div", va, v(n.t("feedback.doneTitle")), 1),
5110
+ l("div", ya, v(n.t("feedback.doneSubtitle")), 1)
5111
+ ])) : (c(), d(E, { key: 0 }, [
5112
+ l("div", ca, v(n.t("feedback.question")), 1),
5113
+ l("div", da, v(n.t("feedback.subtitle")), 1),
5114
+ l("div", ua, [
5115
+ (c(!0), d(E, null, N(n.options, (a) => (c(), d("button", {
5030
5116
  key: a.v,
5031
5117
  type: "button",
5032
- class: L(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5118
+ class: R(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
5033
5119
  onClick: (o) => i.sel = a.v
5034
5120
  }, [
5035
- l("span", oa, y(a.e), 1),
5036
- l("span", la, y(a.l), 1)
5037
- ], 10, aa))), 128))
5121
+ l("span", ha, v(a.e), 1),
5122
+ l("span", fa, v(a.l), 1)
5123
+ ], 10, ma))), 128))
5038
5124
  ]),
5039
5125
  l("button", {
5040
5126
  type: "button",
5041
5127
  class: "wm-fb__send",
5042
5128
  disabled: !i.sel || s.busy,
5043
5129
  onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
5044
- }, y(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ca)
5130
+ }, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, _a)
5045
5131
  ], 64))
5046
5132
  ]);
5047
5133
  }
5048
- const fa = /* @__PURE__ */ D(ta, [["render", ha], ["__scopeId", "data-v-9b630564"]]), _a = {
5134
+ const wa = /* @__PURE__ */ U(oa, [["render", pa], ["__scopeId", "data-v-9b630564"]]), ba = {
5049
5135
  name: "WmMoreMenu",
5050
5136
  inject: {
5051
5137
  // Translator shared by the Messenger shell; French fallback when
5052
5138
  // the component is used standalone.
5053
- t: { default: () => F() }
5139
+ t: { default: () => H() }
5054
5140
  },
5055
5141
  props: {
5056
5142
  canRename: { type: Boolean, default: !0 },
@@ -5080,24 +5166,24 @@ const fa = /* @__PURE__ */ D(ta, [["render", ha], ["__scopeId", "data-v-9b630564
5080
5166
  this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
5081
5167
  }
5082
5168
  }
5083
- }, ga = { class: "wm-mm" }, ya = {
5169
+ }, ka = { class: "wm-mm" }, Ca = {
5084
5170
  class: "wm-mm__pop",
5085
5171
  role: "menu"
5086
- }, va = {
5172
+ }, Aa = {
5087
5173
  key: 0,
5088
5174
  class: "wm-mm__section"
5089
- }, pa = { class: "wm-mm__label" }, wa = { class: "wm-mm__label" }, ba = {
5175
+ }, Sa = { class: "wm-mm__label" }, Ta = { class: "wm-mm__label" }, Ma = {
5090
5176
  key: 1,
5091
5177
  class: "wm-mm__sep"
5092
- }, ka = { class: "wm-mm__section" }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__section" }, Sa = { class: "wm-mm__label" }, Ma = { class: "wm-mm__label" };
5093
- function Ta(e, t, s, r, i, n) {
5094
- return c(), d("div", ga, [
5178
+ }, xa = { class: "wm-mm__section" }, Oa = { class: "wm-mm__label" }, Ra = { class: "wm-mm__section" }, La = { class: "wm-mm__label" }, Ia = { class: "wm-mm__label" };
5179
+ function Ea(e, t, s, r, i, n) {
5180
+ return c(), d("div", ka, [
5095
5181
  l("div", {
5096
5182
  class: "wm-mm__scrim",
5097
5183
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5098
5184
  }),
5099
- l("div", ya, [
5100
- s.canRename || s.canExport ? (c(), d("div", va, [
5185
+ l("div", Ca, [
5186
+ s.canRename || s.canExport ? (c(), d("div", Aa, [
5101
5187
  s.canRename ? (c(), d("button", {
5102
5188
  key: 0,
5103
5189
  type: "button",
@@ -5120,8 +5206,8 @@ function Ta(e, t, s, r, i, n) {
5120
5206
  l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5121
5207
  ])
5122
5208
  ], -1)),
5123
- l("span", pa, y(n.t("moreMenu.editTitle")), 1)
5124
- ])) : k("", !0),
5209
+ l("span", Sa, v(n.t("moreMenu.editTitle")), 1)
5210
+ ])) : b("", !0),
5125
5211
  s.canExport ? (c(), d("button", {
5126
5212
  key: 1,
5127
5213
  type: "button",
@@ -5143,12 +5229,12 @@ function Ta(e, t, s, r, i, n) {
5143
5229
  l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5144
5230
  ])
5145
5231
  ], -1)),
5146
- l("span", wa, y(n.t("moreMenu.exportTranscript")), 1),
5232
+ l("span", Ta, v(n.t("moreMenu.exportTranscript")), 1),
5147
5233
  t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
5148
- ])) : k("", !0)
5149
- ])) : k("", !0),
5150
- s.canRename || s.canExport ? (c(), d("div", ba)) : k("", !0),
5151
- l("div", ka, [
5234
+ ])) : b("", !0)
5235
+ ])) : b("", !0),
5236
+ s.canRename || s.canExport ? (c(), d("div", Ma)) : b("", !0),
5237
+ l("div", xa, [
5152
5238
  l("button", {
5153
5239
  type: "button",
5154
5240
  class: "wm-mm__item",
@@ -5170,16 +5256,16 @@ function Ta(e, t, s, r, i, n) {
5170
5256
  l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5171
5257
  ])
5172
5258
  ], -1)),
5173
- l("span", Ca, y(n.t("moreMenu.sound")), 1),
5259
+ l("span", Oa, v(n.t("moreMenu.sound")), 1),
5174
5260
  l("span", {
5175
- class: L(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5261
+ class: R(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
5176
5262
  }, [...t[9] || (t[9] = [
5177
5263
  l("span", { class: "wm-mm__knob" }, null, -1)
5178
5264
  ])], 2)
5179
5265
  ])
5180
5266
  ]),
5181
5267
  t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
5182
- l("div", Aa, [
5268
+ l("div", Ra, [
5183
5269
  s.statusUrl ? (c(), d("button", {
5184
5270
  key: 0,
5185
5271
  type: "button",
@@ -5201,8 +5287,8 @@ function Ta(e, t, s, r, i, n) {
5201
5287
  l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5202
5288
  ])
5203
5289
  ], -1)),
5204
- l("span", Sa, y(n.t("moreMenu.serviceStatus")), 1)
5205
- ])) : k("", !0),
5290
+ l("span", La, v(n.t("moreMenu.serviceStatus")), 1)
5291
+ ])) : b("", !0),
5206
5292
  s.helpUrl ? (c(), d("button", {
5207
5293
  key: 1,
5208
5294
  type: "button",
@@ -5224,18 +5310,18 @@ function Ta(e, t, s, r, i, n) {
5224
5310
  l("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" })
5225
5311
  ])
5226
5312
  ], -1)),
5227
- l("span", Ma, y(n.t("moreMenu.helpCenter")), 1)
5228
- ])) : k("", !0)
5313
+ l("span", Ia, v(n.t("moreMenu.helpCenter")), 1)
5314
+ ])) : b("", !0)
5229
5315
  ])
5230
5316
  ])
5231
5317
  ]);
5232
5318
  }
5233
- const xa = /* @__PURE__ */ D(_a, [["render", Ta], ["__scopeId", "data-v-4cf6d578"]]), Oa = {
5319
+ const Ba = /* @__PURE__ */ U(ba, [["render", Ea], ["__scopeId", "data-v-4cf6d578"]]), Pa = {
5234
5320
  name: "WmRenameDialog",
5235
5321
  inject: {
5236
5322
  // Translator shared by the Messenger shell; French fallback when
5237
5323
  // the component is used standalone.
5238
- t: { default: () => F() }
5324
+ t: { default: () => H() }
5239
5325
  },
5240
5326
  props: {
5241
5327
  // Empty defaults: the resolved fallback comes from the translator
@@ -5272,20 +5358,20 @@ const xa = /* @__PURE__ */ D(_a, [["render", Ta], ["__scopeId", "data-v-4cf6d578
5272
5358
  this.canSubmit && this.$emit("submit", this.value.trim());
5273
5359
  }
5274
5360
  }
5275
- }, Ra = { class: "wm-dialog" }, La = {
5361
+ }, Ua = { class: "wm-dialog" }, Da = {
5276
5362
  class: "wm-dialog__card",
5277
5363
  role: "dialog",
5278
5364
  "aria-modal": "true"
5279
- }, Ea = { class: "wm-dialog__head" }, Ba = { class: "wm-dialog__title" }, Ia = ["aria-label"], Pa = { class: "wm-dialog__body" }, Da = ["placeholder"], Ua = { class: "wm-dialog__actions" }, Na = ["disabled"];
5280
- function Fa(e, t, s, r, i, n) {
5281
- return c(), d("div", Ra, [
5365
+ }, Na = { class: "wm-dialog__head" }, Fa = { class: "wm-dialog__title" }, Ha = ["aria-label"], ja = { class: "wm-dialog__body" }, za = ["placeholder"], qa = { class: "wm-dialog__actions" }, Va = ["disabled"];
5366
+ function Ka(e, t, s, r, i, n) {
5367
+ return c(), d("div", Ua, [
5282
5368
  l("div", {
5283
5369
  class: "wm-dialog__scrim",
5284
5370
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5285
5371
  }),
5286
- l("div", La, [
5287
- l("div", Ea, [
5288
- l("div", Ba, y(s.title || n.t("rename.title")), 1),
5372
+ l("div", Da, [
5373
+ l("div", Na, [
5374
+ l("div", Fa, v(s.title || n.t("rename.title")), 1),
5289
5375
  l("button", {
5290
5376
  type: "button",
5291
5377
  class: "wm-dialog__close",
@@ -5305,9 +5391,9 @@ function Fa(e, t, s, r, i, n) {
5305
5391
  }, [
5306
5392
  l("path", { d: "M18 6L6 18M6 6l12 12" })
5307
5393
  ], -1)
5308
- ])], 8, Ia)
5394
+ ])], 8, Ha)
5309
5395
  ]),
5310
- l("div", Pa, [
5396
+ l("div", ja, [
5311
5397
  $(l("input", {
5312
5398
  ref: "input",
5313
5399
  "onUpdate:modelValue": t[2] || (t[2] = (a) => i.value = a),
@@ -5316,43 +5402,43 @@ function Fa(e, t, s, r, i, n) {
5316
5402
  placeholder: s.placeholder || n.t("rename.placeholder"),
5317
5403
  maxlength: 120,
5318
5404
  onKeydown: [
5319
- t[3] || (t[3] = _e(Y((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
5320
- t[4] || (t[4] = _e(Y((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5405
+ t[3] || (t[3] = _e(G((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
5406
+ t[4] || (t[4] = _e(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5321
5407
  ]
5322
- }, null, 40, Da), [
5323
- [se, i.value]
5408
+ }, null, 40, za), [
5409
+ [ee, i.value]
5324
5410
  ])
5325
5411
  ]),
5326
- l("div", Ua, [
5412
+ l("div", qa, [
5327
5413
  l("button", {
5328
5414
  type: "button",
5329
5415
  class: "wm-dialog__btn",
5330
5416
  onClick: t[5] || (t[5] = (a) => e.$emit("close"))
5331
- }, y(n.t("common.cancel")), 1),
5417
+ }, v(n.t("common.cancel")), 1),
5332
5418
  l("button", {
5333
5419
  type: "button",
5334
5420
  class: "wm-dialog__btn wm-dialog__btn--primary",
5335
5421
  disabled: !n.canSubmit,
5336
5422
  onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
5337
- }, y(n.t("common.save")), 9, Na)
5423
+ }, v(n.t("common.save")), 9, Va)
5338
5424
  ])
5339
5425
  ])
5340
5426
  ]);
5341
5427
  }
5342
- const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", ja = {
5428
+ const Wa = /* @__PURE__ */ U(Pa, [["render", Ka], ["__scopeId", "data-v-6d5f94a8"]]), He = "ww-messenger-tokens", $a = {
5343
5429
  name: "Messenger",
5344
5430
  components: {
5345
5431
  Launcher: qt,
5346
5432
  Header: _n,
5347
- Onboarding: Jn,
5348
- History: ms,
5349
- MessageList: ri,
5350
- Composer: Ci,
5351
- InlineCallbacks: Ti,
5352
- FormCard: ea,
5353
- Feedback: fa,
5354
- MoreMenu: xa,
5355
- RenameDialog: Ha
5433
+ Onboarding: Zn,
5434
+ History: _s,
5435
+ MessageList: oi,
5436
+ Composer: Ti,
5437
+ InlineCallbacks: Ei,
5438
+ FormCard: aa,
5439
+ Feedback: wa,
5440
+ MoreMenu: Ba,
5441
+ RenameDialog: Wa
5356
5442
  },
5357
5443
  mixins: [
5358
5444
  wt,
@@ -5379,7 +5465,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5379
5465
  },
5380
5466
  props: {
5381
5467
  // Hardcoded server default (overridable for staging/dev).
5382
- baseUrl: { type: String, default: at },
5468
+ baseUrl: { type: String, default: ot },
5383
5469
  widgetId: { type: String, default: "" },
5384
5470
  // En mode iframe (modèle par défaut), `origin` et `token` ne sont
5385
5471
  // PAS des props : ils sont reçus via `postMessage` du parent
@@ -5525,7 +5611,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5525
5611
  // 4. French.
5526
5612
  locale() {
5527
5613
  var e;
5528
- return xe(
5614
+ return Re(
5529
5615
  this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
5530
5616
  );
5531
5617
  },
@@ -5533,7 +5619,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5533
5619
  // `locale` changes. `t()` below (and the provided closure) delegate
5534
5620
  // to it so every string resolves against the current language.
5535
5621
  translator() {
5536
- return F(this.locale);
5622
+ return H(this.locale);
5537
5623
  },
5538
5624
  error() {
5539
5625
  var e;
@@ -5564,25 +5650,25 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5564
5650
  var s;
5565
5651
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
5566
5652
  return this.allConversations.map((r) => {
5567
- var b;
5568
- const i = e[r.id] || [], n = G(r.last_read_message_id);
5653
+ var k;
5654
+ const i = e[r.id] || [], n = Y(r.last_read_message_id);
5569
5655
  let a = 0, o = null;
5570
- for (let v = i.length - 1; v >= 0; v--) {
5571
- const M = i[v];
5572
- if (!M) continue;
5573
- if (((b = M.author) == null ? void 0 : b.type) === "user") break;
5574
- const E = G(M.id);
5575
- if (E != null) {
5576
- if (n != null && E <= n) break;
5577
- t[M.id] !== 0 && (!o && M.author && (o = M.author), a++);
5656
+ for (let y = i.length - 1; y >= 0; y--) {
5657
+ const T = i[y];
5658
+ if (!T) continue;
5659
+ if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5660
+ const I = Y(T.id);
5661
+ if (I != null) {
5662
+ if (n != null && I <= n) break;
5663
+ t[T.id] !== 0 && (!o && T.author && (o = T.author), a++);
5578
5664
  }
5579
5665
  }
5580
5666
  if (!i.length) {
5581
- const v = G(r.last_message_id);
5582
- v != null && (n == null || v > n) && (a = 1, o = r.last_message_author || null);
5667
+ const y = Y(r.last_message_id);
5668
+ y != null && (n == null || y > n) && (a = 1, o = r.last_message_author || null);
5583
5669
  }
5584
5670
  const f = i.filter(
5585
- (v) => !((v == null ? void 0 : v.id) != null && t[v.id] === 0)
5671
+ (y) => !((y == null ? void 0 : y.id) != null && t[y.id] === 0)
5586
5672
  );
5587
5673
  return {
5588
5674
  ...r,
@@ -5613,7 +5699,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5613
5699
  preview: s._preview || this.t("onboarding.newMessage"),
5614
5700
  unread: !!s._unread,
5615
5701
  author: s._lastAuthor || null,
5616
- _ts: Ie(s, e[s.id] || [])
5702
+ _ts: De(s, e[s.id] || [])
5617
5703
  })).sort((s, r) => s._ts < r._ts ? 1 : s._ts > r._ts ? -1 : 0);
5618
5704
  },
5619
5705
  // Unread threads (one entry per conv with unseen agent/human
@@ -5625,7 +5711,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5625
5711
  const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
5626
5712
  for (const r of this.drawerConversations) {
5627
5713
  if (!r._unread) continue;
5628
- const i = Ie(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
5714
+ const i = De(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
5629
5715
  t.push({
5630
5716
  convId: r.id,
5631
5717
  preview: r._preview || this.t("notification.youHaveNewMessage"),
@@ -5697,7 +5783,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5697
5783
  rootStyle() {
5698
5784
  var t;
5699
5785
  const e = (t = this.widget) == null ? void 0 : t.primary_color;
5700
- return e && dt(e) ? { "--wm-primary": e } : null;
5786
+ return e && ut(e) ? { "--wm-primary": e } : null;
5701
5787
  },
5702
5788
  // Hero title shown above the onboarding actions. Schema-side the
5703
5789
  // column was renamed `welcome_message` → `title` ; the old name
@@ -5721,6 +5807,10 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5721
5807
  var e;
5722
5808
  return ((e = this.widget) == null ? void 0 : e.default_icon_url) || null;
5723
5809
  },
5810
+ coverImageUrl() {
5811
+ var e;
5812
+ return ((e = this.widget) == null ? void 0 : e.cover_image_url) || null;
5813
+ },
5724
5814
  agentName() {
5725
5815
  var e, t, s;
5726
5816
  return ((s = (t = (e = this.s) == null ? void 0 : e.config) == null ? void 0 : t.agent) == null ? void 0 : s.name) || "";
@@ -5804,8 +5894,8 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
5804
5894
  if (!(a != null && a.loaded)) return t;
5805
5895
  }
5806
5896
  const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
5807
- var o, f, b, v, M;
5808
- return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || me(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (v = a == null ? void 0 : a.metadata) != null && v.artifact || (M = a == null ? void 0 : a.metadata) != null && M.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((E) => (E == null ? void 0 : E.intent) === "submit_form") ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5897
+ var o, f, k, y, T;
5898
+ return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || me(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = a == null ? void 0 : a.payload) == null ? void 0 : k.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((I) => (I == null ? void 0 : I.intent) === "submit_form") ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
5809
5899
  });
5810
5900
  return t.length ? [...t, ...r] : r;
5811
5901
  },
@@ -6004,7 +6094,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6004
6094
  "currentConv.id": {
6005
6095
  handler(e) {
6006
6096
  var t;
6007
- this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.isViewingThread && (this.unreadAnchorId = G(
6097
+ this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.isViewingThread && (this.unreadAnchorId = Y(
6008
6098
  (t = this.currentConv) == null ? void 0 : t.last_read_message_id
6009
6099
  ), this.unreadBoundaryTs = e ? (/* @__PURE__ */ new Date()).toISOString() : ""), e && this.scheduleWelcomeReveal(e);
6010
6100
  },
@@ -6016,7 +6106,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6016
6106
  // render.
6017
6107
  isViewingThread(e, t) {
6018
6108
  var s;
6019
- e && !t ? (this.unreadAnchorId = G(
6109
+ e && !t ? (this.unreadAnchorId = Y(
6020
6110
  (s = this.currentConv) == null ? void 0 : s.last_read_message_id
6021
6111
  ), this.unreadBoundaryTs = (/* @__PURE__ */ new Date()).toISOString()) : e || (this.unreadAnchorId = null, this.unreadBoundaryTs = "");
6022
6112
  },
@@ -6039,9 +6129,9 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6039
6129
  }
6040
6130
  },
6041
6131
  async mounted() {
6042
- if (typeof document < "u" && !document.getElementById(Ue)) {
6132
+ if (typeof document < "u" && !document.getElementById(He)) {
6043
6133
  const e = document.createElement("style");
6044
- e.id = Ue, e.textContent = it, document.head.appendChild(e);
6134
+ e.id = He, e.textContent = at, document.head.appendChild(e);
6045
6135
  }
6046
6136
  this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
6047
6137
  },
@@ -6121,12 +6211,12 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6121
6211
  return;
6122
6212
  }
6123
6213
  try {
6124
- await this.waitForParentInit(), this.transport = Re(
6125
- et({
6214
+ await this.waitForParentInit(), this.transport = Ie(
6215
+ tt({
6126
6216
  baseUrl: this.baseUrl,
6127
6217
  widgetId: this.widgetId
6128
6218
  })
6129
- ), this.store = Re(rt(this.transport)), this.hydrateNotifPref();
6219
+ ), this.store = Ie(it(this.transport)), this.hydrateNotifPref();
6130
6220
  const e = this.parentVariables || this.context || null;
6131
6221
  if (await this.store.start({
6132
6222
  origin: this.parentOrigin,
@@ -6221,17 +6311,17 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6221
6311
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6222
6312
  },
6223
6313
  sendCurrentLauncherSize() {
6224
- var v, M, E, S, z, T, U;
6314
+ var y, T, I, S, z, M, D;
6225
6315
  if (this.isOpen) return;
6226
- const e = (M = (v = this.$el) == null ? void 0 : v.querySelector) == null ? void 0 : M.call(v, ".wm-launcherWrap");
6316
+ const e = (T = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : T.call(y, ".wm-launcherWrap");
6227
6317
  if (!e) return;
6228
6318
  const t = e.getBoundingClientRect();
6229
6319
  if (!t.width || !t.height) return;
6230
- const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (z = (S = this.$el) == null ? void 0 : S.querySelector) == null ? void 0 : z.call(S, ".wm-launcher"), o = (U = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : U.call(T, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
6231
- let b = null;
6320
+ const s = (((I = this.launcherPeeks) == null ? void 0 : I.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (z = (S = this.$el) == null ? void 0 : S.querySelector) == null ? void 0 : z.call(S, ".wm-launcher"), o = (D = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : D.call(M, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
6321
+ let k = null;
6232
6322
  if (f) {
6233
6323
  const x = f.getBoundingClientRect();
6234
- b = {
6324
+ k = {
6235
6325
  width: Math.ceil(x.width),
6236
6326
  height: Math.ceil(x.height),
6237
6327
  rightOffset: Math.max(0, Math.ceil(t.right - x.right)),
@@ -6244,7 +6334,7 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6244
6334
  launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
6245
6335
  launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
6246
6336
  launcherHovered: this.launcherHovered,
6247
- peek: b,
6337
+ peek: k,
6248
6338
  peekHovered: this.launcherHovered && s
6249
6339
  });
6250
6340
  },
@@ -6277,6 +6367,16 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6277
6367
  // lazily on the first outbound action (text / attachment / form /
6278
6368
  // quick-link without URL), so users who open the chat and walk away
6279
6369
  // don't leave empty threads behind.
6370
+ // Home-screen starter input → open a conversation already seeded
6371
+ // with the user's first message. Entering draft mode mounts the
6372
+ // conversation view (which animates in via the `wm-convEnter`
6373
+ // transition) ; `onSend` then materializes the draft server-side
6374
+ // and posts the text. Empty payloads just open an empty draft.
6375
+ onOnboardingStart(e) {
6376
+ this.startConv();
6377
+ const t = (e || "").trim();
6378
+ t && this.$nextTick(() => this.onSend(t));
6379
+ },
6280
6380
  startConv() {
6281
6381
  this.draftConv = {
6282
6382
  id: "__draft__",
@@ -6380,8 +6480,8 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6380
6480
  ...this.welcomeRevealedAt,
6381
6481
  [e]: Date.now()
6382
6482
  };
6383
- const b = { ...this.welcomeRevealTimers };
6384
- delete b[e], this.welcomeRevealTimers = b;
6483
+ const k = { ...this.welcomeRevealTimers };
6484
+ delete k[e], this.welcomeRevealTimers = k;
6385
6485
  }, o);
6386
6486
  this.welcomeRevealTimers = {
6387
6487
  ...this.welcomeRevealTimers,
@@ -6618,66 +6718,66 @@ const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8
6618
6718
  }
6619
6719
  }
6620
6720
  }
6621
- }, za = {
6721
+ }, Ga = {
6622
6722
  key: 0,
6623
6723
  class: "wm-loading",
6624
6724
  "aria-busy": "true",
6625
6725
  "aria-live": "polite"
6626
- }, qa = ["aria-label"], Va = {
6726
+ }, Ya = ["aria-label"], Ja = {
6627
6727
  key: 0,
6628
6728
  class: "wm-state"
6629
- }, Ka = { class: "wm-state__err" }, Wa = { class: "wm-state__errTitle" }, $a = { class: "wm-state__errSub" }, Ga = { class: "wm-bottom" }, Ya = {
6729
+ }, Xa = { class: "wm-state__err" }, Qa = { class: "wm-state__errTitle" }, Za = { class: "wm-state__errSub" }, eo = { class: "wm-bottom" }, to = {
6630
6730
  key: 0,
6631
6731
  ref: "floatEl",
6632
6732
  class: "wm-float"
6633
- }, Ja = {
6733
+ }, no = {
6634
6734
  key: 1,
6635
6735
  class: "wm-actionWait",
6636
6736
  role: "status",
6637
6737
  "aria-live": "polite"
6638
- }, Xa = { class: "wm-actionWait__lbl" }, Qa = {
6738
+ }, so = { class: "wm-actionWait__lbl" }, ro = {
6639
6739
  key: 2,
6640
6740
  class: "wm-attached"
6641
- }, Za = ["src", "alt"], eo = {
6741
+ }, io = ["src", "alt"], ao = {
6642
6742
  key: 1,
6643
6743
  class: "wm-attached__file"
6644
- }, to = { class: "wm-attached__fileMeta" }, no = { class: "wm-attached__fileName" }, so = {
6744
+ }, oo = { class: "wm-attached__fileMeta" }, lo = { class: "wm-attached__fileName" }, co = {
6645
6745
  key: 0,
6646
6746
  class: "wm-attached__fileSize"
6647
- }, ro = ["aria-label", "onClick"], io = {
6747
+ }, uo = ["aria-label", "onClick"], mo = {
6648
6748
  key: 3,
6649
6749
  class: "wm-ended",
6650
6750
  role: "status",
6651
6751
  "aria-live": "polite"
6652
- }, ao = { class: "wm-ended__lbl" };
6653
- function oo(e, t, s, r, i, n) {
6654
- const a = P("Launcher"), o = P("Header"), f = P("History"), b = P("Onboarding"), v = P("MessageList"), M = P("InlineCallbacks"), E = P("FormCard"), S = P("Feedback"), z = P("Composer"), T = P("MoreMenu"), U = P("RenameDialog");
6752
+ }, ho = { class: "wm-ended__lbl" };
6753
+ function fo(e, t, s, r, i, n) {
6754
+ const a = P("Launcher"), o = P("Header"), f = P("History"), k = P("Onboarding"), y = P("MessageList"), T = P("InlineCallbacks"), I = P("FormCard"), S = P("Feedback"), z = P("Composer"), M = P("MoreMenu"), D = P("RenameDialog");
6655
6755
  return c(), d("div", {
6656
- class: L(["wm-root", `wm-root--${s.displayMode}`]),
6657
- style: j(n.rootStyle)
6756
+ class: R(["wm-root", `wm-root--${s.displayMode}`]),
6757
+ style: F(n.rootStyle)
6658
6758
  }, [
6659
- !i.isOpen && !n.isEmbedded ? (c(), I(a, {
6759
+ !i.isOpen && !n.isEmbedded ? (c(), B(a, {
6660
6760
  key: 0,
6661
6761
  "unread-count": n.unreadCount,
6662
6762
  peeks: n.launcherPeeks,
6663
6763
  onOpen: n.openFromPeek,
6664
6764
  onDismiss: n.dismissPeek,
6665
6765
  onHover: n.onLauncherHover
6666
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
6766
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6667
6767
  i.isOpen || n.isEmbedded ? (c(), d("section", {
6668
6768
  key: 1,
6669
- class: L([
6769
+ class: R([
6670
6770
  "wm-panel",
6671
6771
  `wm-panel--${s.displayMode}`,
6672
6772
  { "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
6673
6773
  ]),
6674
- style: j(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
6774
+ style: F(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
6675
6775
  role: "dialog",
6676
6776
  "aria-label": "Messenger",
6677
6777
  onClick: t[7] || (t[7] = (...x) => n.onPanelClick && n.onPanelClick(...x))
6678
6778
  }, [
6679
- !n.ready && !n.error ? (c(), d("div", za, [
6680
- n.isEmbedded ? k("", !0) : (c(), d("button", {
6779
+ !n.ready && !n.error ? (c(), d("div", Ga, [
6780
+ n.isEmbedded ? b("", !0) : (c(), d("button", {
6681
6781
  key: 0,
6682
6782
  type: "button",
6683
6783
  class: "wm-loading__close",
@@ -6697,13 +6797,13 @@ function oo(e, t, s, r, i, n) {
6697
6797
  }, [
6698
6798
  l("path", { d: "M18 6L6 18M6 6l12 12" })
6699
6799
  ], -1)
6700
- ])], 8, qa)),
6800
+ ])], 8, Ya)),
6701
6801
  t[9] || (t[9] = l("div", {
6702
6802
  class: "wm-loading__spinner",
6703
6803
  "aria-hidden": "true"
6704
6804
  }, null, -1))
6705
- ])) : (c(), d(B, { key: 1 }, [
6706
- W(o, {
6805
+ ])) : (c(), d(E, { key: 1 }, [
6806
+ K(o, {
6707
6807
  title: n.headerTitle,
6708
6808
  "team-members": n.teamMembers,
6709
6809
  "response-label": n.responseLabel,
@@ -6717,8 +6817,8 @@ function oo(e, t, s, r, i, n) {
6717
6817
  onMore: n.toggleMore,
6718
6818
  onClose: n.close
6719
6819
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6720
- n.error ? (c(), d("div", Va, [
6721
- l("div", Ka, [
6820
+ n.error ? (c(), d("div", Ja, [
6821
+ l("div", Xa, [
6722
6822
  t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
6723
6823
  l("svg", {
6724
6824
  width: "14",
@@ -6735,69 +6835,77 @@ function oo(e, t, s, r, i, n) {
6735
6835
  ])
6736
6836
  ], -1)),
6737
6837
  l("div", null, [
6738
- l("div", Wa, y(n.t("error.connectionFailed")), 1),
6739
- l("div", $a, y(n.error), 1)
6838
+ l("div", Qa, v(n.t("error.connectionFailed")), 1),
6839
+ l("div", Za, v(n.error), 1)
6740
6840
  ])
6741
6841
  ])
6742
- ])) : !n.currentConv && i.showHistory ? (c(), I(f, {
6842
+ ])) : !n.currentConv && i.showHistory ? (c(), B(f, {
6743
6843
  key: 1,
6744
6844
  threads: n.openThreads,
6745
6845
  onResume: n.onDrawerPick
6746
- }, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d(B, { key: 3 }, [
6747
- W(v, {
6748
- ref: "messageList",
6749
- messages: n.displayedMessages,
6750
- "streaming-active": n.streamingActive,
6751
- "date-label": n.dateLabel,
6752
- "conversation-id": n.currentConv ? n.currentConv.id : null,
6753
- "loading-more": n.paginationState.loading,
6754
- "has-more": n.paginationState.hasMore,
6755
- "unread-anchor-id": e.unreadAnchorId,
6756
- "unread-boundary-ts": e.unreadBoundaryTs,
6757
- "ai-agent-name": n.agentName,
6758
- "ai-agent-avatar-url": n.agentAvatarUrl,
6759
- onLoadMore: n.onLoadMore
6760
- }, 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"]),
6761
- l("div", Ga, [
6762
- n.floatVisible ? (c(), d("div", Ya, [
6763
- n.pendingApproval ? (c(), I(M, {
6846
+ }, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d(E, { key: 3 }, [
6847
+ K(Ae, {
6848
+ appear: "",
6849
+ name: "wm-convEnter"
6850
+ }, {
6851
+ default: Se(() => [
6852
+ K(y, {
6853
+ ref: "messageList",
6854
+ messages: n.displayedMessages,
6855
+ "streaming-active": n.streamingActive,
6856
+ "date-label": n.dateLabel,
6857
+ "conversation-id": n.currentConv ? n.currentConv.id : null,
6858
+ "loading-more": n.paginationState.loading,
6859
+ "has-more": n.paginationState.hasMore,
6860
+ "unread-anchor-id": e.unreadAnchorId,
6861
+ "unread-boundary-ts": e.unreadBoundaryTs,
6862
+ "ai-agent-name": n.agentName,
6863
+ "ai-agent-avatar-url": n.agentAvatarUrl,
6864
+ onLoadMore: n.onLoadMore
6865
+ }, 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"])
6866
+ ]),
6867
+ _: 1
6868
+ }),
6869
+ l("div", eo, [
6870
+ n.floatVisible ? (c(), d("div", to, [
6871
+ n.pendingApproval ? (c(), B(T, {
6764
6872
  key: `appr-${n.pendingApproval.id}`,
6765
6873
  variant: "buttons",
6766
6874
  items: n.approvalCallbacks,
6767
6875
  onSelect: n.onApprovalSelect
6768
- }, null, 8, ["items", "onSelect"])) : n.pendingResolution ? (c(), I(M, {
6876
+ }, null, 8, ["items", "onSelect"])) : n.pendingResolution ? (c(), B(T, {
6769
6877
  key: `res-${n.pendingResolution.id}`,
6770
6878
  variant: "buttons",
6771
6879
  items: n.resolutionCallbacks,
6772
6880
  onSelect: n.onResolutionSelect
6773
- }, null, 8, ["items", "onSelect"])) : n.pendingForm ? (c(), I(E, {
6881
+ }, null, 8, ["items", "onSelect"])) : n.pendingForm ? (c(), B(I, {
6774
6882
  key: n.pendingForm.message && n.pendingForm.message.id,
6775
6883
  form: n.pendingForm.form,
6776
6884
  "agent-name": n.agentName,
6777
6885
  "agent-avatar-url": n.agentAvatarUrl,
6778
6886
  onSubmit: n.onFormSubmit
6779
- }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), I(S, {
6887
+ }, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), B(S, {
6780
6888
  key: 3,
6781
6889
  busy: i.feedbackBusy,
6782
6890
  done: !!(n.currentConv && i.feedbackDone[n.currentConv.id]),
6783
6891
  onSubmit: n.onFeedback
6784
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), I(M, {
6892
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), B(T, {
6785
6893
  key: 4,
6786
6894
  items: n.suggestions,
6787
6895
  onSelect: n.onSuggestion
6788
6896
  }, null, 8, ["items", "onSelect"]))
6789
- ], 512)) : k("", !0),
6790
- n.actionInFlight ? (c(), d("div", Ja, [
6897
+ ], 512)) : b("", !0),
6898
+ n.actionInFlight ? (c(), d("div", no, [
6791
6899
  t[11] || (t[11] = l("span", {
6792
6900
  class: "wm-actionWait__spinner",
6793
6901
  "aria-hidden": "true"
6794
6902
  }, null, -1)),
6795
- l("span", Xa, y(n.t("action.inProgress", {
6903
+ l("span", so, v(n.t("action.inProgress", {
6796
6904
  name: n.actionInFlightName
6797
6905
  })), 1)
6798
- ])) : k("", !0),
6799
- i.pendingAttachments.length ? (c(), d("div", Qa, [
6800
- (c(!0), d(B, null, N(i.pendingAttachments, (x, q) => (c(), d("div", {
6906
+ ])) : b("", !0),
6907
+ i.pendingAttachments.length ? (c(), d("div", ro, [
6908
+ (c(!0), d(E, null, N(i.pendingAttachments, (x, q) => (c(), d("div", {
6801
6909
  key: x.path || q,
6802
6910
  class: "wm-attached__item"
6803
6911
  }, [
@@ -6806,7 +6914,7 @@ function oo(e, t, s, r, i, n) {
6806
6914
  class: "wm-attached__thumb",
6807
6915
  src: x.previewUrl,
6808
6916
  alt: x.name
6809
- }, null, 8, Za)) : (c(), d("div", eo, [
6917
+ }, null, 8, io)) : (c(), d("div", ao, [
6810
6918
  t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
6811
6919
  l("svg", {
6812
6920
  width: "16",
@@ -6823,11 +6931,11 @@ function oo(e, t, s, r, i, n) {
6823
6931
  l("path", { d: "M14 2v6h6" })
6824
6932
  ])
6825
6933
  ], -1)),
6826
- l("span", to, [
6827
- l("span", no, y(x.name), 1),
6828
- n.formatAttachmentSize(x.size_bytes) ? (c(), d("span", so, y(n.formatAttachmentSize(
6934
+ l("span", oo, [
6935
+ l("span", lo, v(x.name), 1),
6936
+ n.formatAttachmentSize(x.size_bytes) ? (c(), d("span", co, v(n.formatAttachmentSize(
6829
6937
  x.size_bytes
6830
- )), 1)) : k("", !0)
6938
+ )), 1)) : b("", !0)
6831
6939
  ])
6832
6940
  ])),
6833
6941
  l("button", {
@@ -6849,17 +6957,17 @@ function oo(e, t, s, r, i, n) {
6849
6957
  }, [
6850
6958
  l("path", { d: "M18 6L6 18M6 6l12 12" })
6851
6959
  ], -1)
6852
- ])], 8, ro)
6960
+ ])], 8, uo)
6853
6961
  ]))), 128))
6854
- ])) : k("", !0),
6855
- n.endedBlockVisible ? (c(), d("div", io, [
6856
- l("span", ao, y(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6962
+ ])) : b("", !0),
6963
+ n.endedBlockVisible ? (c(), d("div", mo, [
6964
+ l("span", ho, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
6857
6965
  l("button", {
6858
6966
  type: "button",
6859
6967
  class: "wm-ended__btn",
6860
6968
  onClick: t[2] || (t[2] = (x) => n.isClosed ? n.onReopen() : n.startConv())
6861
- }, y(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
6862
- ])) : n.actionInFlight ? k("", !0) : (c(), I(z, {
6969
+ }, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
6970
+ ])) : n.actionInFlight ? b("", !0) : (c(), B(z, {
6863
6971
  key: 4,
6864
6972
  ref: "composer",
6865
6973
  modelValue: i.draft,
@@ -6871,7 +6979,7 @@ function oo(e, t, s, r, i, n) {
6871
6979
  onAttach: n.onAttach
6872
6980
  }, null, 8, ["modelValue", "placeholder", "attach-label", "display-mode", "onSend", "onAttach"]))
6873
6981
  ]),
6874
- i.moreOpen ? (c(), I(T, {
6982
+ i.moreOpen ? (c(), B(M, {
6875
6983
  key: 0,
6876
6984
  "can-rename": !!n.currentConv && !n.currentConv._draft,
6877
6985
  "can-export": !!n.currentConv && !n.currentConv._draft,
@@ -6881,29 +6989,30 @@ function oo(e, t, s, r, i, n) {
6881
6989
  onClose: t[4] || (t[4] = (x) => i.moreOpen = !1),
6882
6990
  onSoundToggle: e.onSoundToggle,
6883
6991
  onAction: n.onMoreAction
6884
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0),
6885
- i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), I(U, {
6992
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
6993
+ i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), B(D, {
6886
6994
  key: 1,
6887
6995
  "initial-value": n.currentConv.name || "",
6888
6996
  title: n.t("rename.dialogTitle"),
6889
6997
  onClose: t[5] || (t[5] = (x) => i.renameDialogOpen = !1),
6890
6998
  onSubmit: n.onRenameSubmit
6891
- }, null, 8, ["initial-value", "title", "onSubmit"])) : k("", !0)
6892
- ], 64)) : (c(), I(b, {
6999
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
7000
+ ], 64)) : (c(), B(k, {
6893
7001
  key: 2,
6894
7002
  title: n.widgetTitle,
6895
7003
  subtitle: n.widgetSubtitle,
6896
7004
  "agent-name": n.agentName,
6897
7005
  "default-icon-url": n.defaultIconUrl,
7006
+ "cover-image-url": n.coverImageUrl,
6898
7007
  "quick-links": n.quickLinks,
6899
7008
  "open-threads": n.openThreads,
6900
7009
  busy: i.busy,
6901
- onStart: n.startConv,
7010
+ onStart: n.onOnboardingStart,
6902
7011
  onSelect: n.onQuickLink,
6903
7012
  onResume: n.onDrawerPick,
6904
7013
  onViewHistory: t[1] || (t[1] = (x) => i.showHistory = !0)
6905
- }, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
6906
- i.moreOpen && !n.currentConv ? (c(), I(T, {
7014
+ }, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "cover-image-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
7015
+ i.moreOpen && !n.currentConv ? (c(), B(M, {
6907
7016
  key: 4,
6908
7017
  "can-rename": !1,
6909
7018
  "can-export": !1,
@@ -6913,58 +7022,58 @@ function oo(e, t, s, r, i, n) {
6913
7022
  onClose: t[6] || (t[6] = (x) => i.moreOpen = !1),
6914
7023
  onSoundToggle: e.onSoundToggle,
6915
7024
  onAction: n.onMoreAction
6916
- }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0)
7025
+ }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
6917
7026
  ], 64))
6918
- ], 6)) : k("", !0)
7027
+ ], 6)) : b("", !0)
6919
7028
  ], 6);
6920
7029
  }
6921
- const uo = /* @__PURE__ */ D(ja, [["render", oo], ["__scopeId", "data-v-caa7f955"]]), mo = "0.6.1";
7030
+ const vo = /* @__PURE__ */ U($a, [["render", fo], ["__scopeId", "data-v-cab6b48e"]]), yo = "0.6.3";
6922
7031
  export {
6923
7032
  he as AIAvatar,
6924
7033
  be as AVATAR_COLORS,
6925
- As as ActionResult,
6926
- Bs as ArtifactFormResponse,
6927
- Ws as ArtifactInfoCard,
6928
- ur as ArtifactRenderer,
6929
- or as ArtifactTicket,
6930
- Cr as AttachmentPreview,
6931
- Tr as Bubble,
6932
- Ci as Composer,
6933
- at as DEFAULT_BASE_URL,
7034
+ Ms as ActionResult,
7035
+ Us as ArtifactFormResponse,
7036
+ Ys as ArtifactInfoCard,
7037
+ fr as ArtifactRenderer,
7038
+ dr as ArtifactTicket,
7039
+ Tr as AttachmentPreview,
7040
+ Rr as Bubble,
7041
+ Ti as Composer,
7042
+ ot as DEFAULT_BASE_URL,
6934
7043
  ue as DEFAULT_LANGUAGE,
6935
- fa as Feedback,
6936
- ea as FormCard,
7044
+ wa as Feedback,
7045
+ aa as FormCard,
6937
7046
  _n as Header,
6938
- ye as HumanAvatar,
6939
- Ti as InlineCallbacks,
7047
+ ve as HumanAvatar,
7048
+ Ei as InlineCallbacks,
6940
7049
  qt as Launcher,
6941
- Oe as MEDIA_RECORDER_SUPPORTED,
6942
- ri as MessageList,
6943
- uo as Messenger,
6944
- xa as MoreMenu,
6945
- Jn as Onboarding,
7050
+ Le as MEDIA_RECORDER_SUPPORTED,
7051
+ oi as MessageList,
7052
+ vo as Messenger,
7053
+ Ba as MoreMenu,
7054
+ Zn as Onboarding,
6946
7055
  ge as SCREEN_CAPTURE_SUPPORTED,
6947
7056
  mt as SUPPORTED_LANGUAGES,
6948
7057
  tn as TeamAvatars,
6949
- Lr as Typing,
6950
- mo as VERSION,
6951
- Me as avatarColor,
6952
- Te as avatarInitials,
6953
- ai as captureScreenshotFile,
6954
- H as colors,
6955
- rt as createStore,
6956
- F as createTranslator,
6957
- et as createTransport,
7058
+ Br as Typing,
7059
+ yo as VERSION,
7060
+ xe as avatarColor,
7061
+ Oe as avatarInitials,
7062
+ ci as captureScreenshotFile,
7063
+ j as colors,
7064
+ it as createStore,
7065
+ H as createTranslator,
7066
+ tt as createTransport,
6958
7067
  re as dateLocale,
6959
- uo as default,
7068
+ vo as default,
6960
7069
  Ce as formatTime,
6961
- co as guessAttachmentKind,
6962
- ii as pickRecorderMime,
6963
- qe as renderInlineMarkdown,
7070
+ go as guessAttachmentKind,
7071
+ li as pickRecorderMime,
7072
+ Ve as renderInlineMarkdown,
6964
7073
  _t as renderMarkdown,
6965
- xe as resolveLanguage,
6966
- li as startScreenRecording,
6967
- it as tokensCss,
6968
- st as uuid,
6969
- st as v4
7074
+ Re as resolveLanguage,
7075
+ ui as startScreenRecording,
7076
+ at as tokensCss,
7077
+ rt as uuid,
7078
+ rt as v4
6970
7079
  };