@_solaris/messenger-widget 0.5.47 → 0.5.49

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 Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as L, toDisplayString as v, resolveComponent as B, createVNode as $, Transition as Pe, withCtx as Ue, Fragment as I, renderList as j, withKeys as fe, withModifiers as X, createElementVNode as o, createCommentVNode as w, createBlock as N, resolveDynamicComponent as ke, mergeProps as De, withDirectives as G, vModelText as te, createTextVNode as Ce, renderSlot as $e, vModelCheckbox as Ke, vModelSelect as We, markRaw as xe } from "vue";
2
- const Ge = [
1
+ import { reactive as He, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as I, toDisplayString as v, resolveComponent as B, createVNode as V, Transition as Ne, withCtx as Pe, Fragment as E, renderList as F, withKeys as fe, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as N, withDirectives as G, vModelText as te, resolveDynamicComponent as Ue, mergeProps as ze, createTextVNode as be, renderSlot as $e, vModelCheckbox as qe, vModelSelect as Ve, markRaw as Te } from "vue";
2
+ const Ke = [
3
3
  "connected",
4
4
  "message",
5
5
  "message_stream",
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], ve = "/client", Ye = 5 * 60 * 1e3, Xe = 10 * 60 * 1e3, Je = 5 * 60 * 1e3;
10
- function Qe(e) {
9
+ ], pe = "/client", We = 5 * 60 * 1e3, Ge = 10 * 60 * 1e3, Ye = 5 * 60 * 1e3;
10
+ function Xe(e) {
11
11
  const t = {
12
- baseUrl: Ze(e.baseUrl || ""),
12
+ baseUrl: Je(e.baseUrl || ""),
13
13
  widgetId: e.widgetId || "",
14
14
  // Posé après `start()` à partir de la response /session.
15
15
  userId: "",
@@ -65,7 +65,7 @@ function Qe(e) {
65
65
  };
66
66
  }
67
67
  async function a(u, g, p) {
68
- const S = await fetch(`${t.baseUrl}${ve}${g}`, {
68
+ const S = await fetch(`${t.baseUrl}${pe}${g}`, {
69
69
  method: u,
70
70
  credentials: "include",
71
71
  headers: s(),
@@ -92,7 +92,7 @@ function Qe(e) {
92
92
  throw new Error("[transport] start requires origin");
93
93
  t.started = !0, t.origin = u.origin, t.token = u.token || "";
94
94
  const g = await fetch(
95
- `${t.baseUrl}${ve}/session`,
95
+ `${t.baseUrl}${pe}/session`,
96
96
  {
97
97
  method: "POST",
98
98
  credentials: "include",
@@ -112,10 +112,10 @@ function Qe(e) {
112
112
  }
113
113
  );
114
114
  if (!g.ok) {
115
- const V = await l(g), Z = new Error(
116
- `Session bootstrap failed: HTTP ${g.status} :: ${(V == null ? void 0 : V.error) || g.statusText}`
115
+ const q = await l(g), Z = new Error(
116
+ `Session bootstrap failed: HTTP ${g.status} :: ${(q == null ? void 0 : q.error) || g.statusText}`
117
117
  );
118
- throw Z.status = g.status, Z.body = V, Z;
118
+ throw Z.status = g.status, Z.body = q, Z;
119
119
  }
120
120
  const p = await g.json();
121
121
  t.userId = p.external_id;
@@ -123,14 +123,14 @@ function Qe(e) {
123
123
  fetch(
124
124
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
125
125
  { credentials: "include" }
126
- ).then(async (V) => {
127
- if (!V.ok) {
128
- const Z = await l(V);
126
+ ).then(async (q) => {
127
+ if (!q.ok) {
128
+ const Z = await l(q);
129
129
  throw new Error(
130
- `HTTP ${V.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || V.statusText}`
130
+ `HTTP ${q.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || q.statusText}`
131
131
  );
132
132
  }
133
- return V.json();
133
+ return q.json();
134
134
  }),
135
135
  a("GET", "/customers/me")
136
136
  ]), T = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
@@ -141,7 +141,7 @@ function Qe(e) {
141
141
  }
142
142
  async function k() {
143
143
  try {
144
- const u = await E();
144
+ const u = await L();
145
145
  t.lastActivityAt = u.reduce((g, p) => {
146
146
  const S = p == null ? void 0 : p.last_message_at;
147
147
  return S && (!g || S > g) ? S : g;
@@ -150,7 +150,7 @@ function Qe(e) {
150
150
  console.error("[transport] initial /conversations failed", u);
151
151
  }
152
152
  }
153
- async function b() {
153
+ async function w() {
154
154
  const u = await a("GET", "/customers/me");
155
155
  return (u == null ? void 0 : u.customer) ?? null;
156
156
  }
@@ -158,14 +158,14 @@ function Qe(e) {
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 L() {
162
162
  const u = await a("GET", "/conversations");
163
163
  return (u == null ? void 0 : u.conversations) ?? [];
164
164
  }
165
165
  async function A(u = {}) {
166
166
  return (await a("POST", "/conversations", u)).conversation;
167
167
  }
168
- async function q(u) {
168
+ async function $(u) {
169
169
  return (await a(
170
170
  "GET",
171
171
  `/conversations/${encodeURIComponent(u)}`
@@ -185,7 +185,7 @@ function Qe(e) {
185
185
  { message_id: g }
186
186
  );
187
187
  }
188
- async function D(u, g = {}) {
188
+ async function j(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
191
  const S = p.toString() ? `?${p.toString()}` : "";
@@ -195,7 +195,7 @@ function Qe(e) {
195
195
  );
196
196
  }
197
197
  async function P(u, g) {
198
- ae();
198
+ ie();
199
199
  const p = {
200
200
  client_msg_id: g.client_msg_id,
201
201
  type: "content",
@@ -210,7 +210,7 @@ function Qe(e) {
210
210
  );
211
211
  }
212
212
  async function K(u, g, p) {
213
- return ae(), a(
213
+ return ie(), a(
214
214
  "POST",
215
215
  `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
216
216
  p ? { inputs: p } : {}
@@ -229,28 +229,28 @@ function Qe(e) {
229
229
  if (!T.ok)
230
230
  throw new Error(`HTTP ${T.status} PUT signed upload`);
231
231
  return {
232
- type: et(p),
232
+ type: Qe(p),
233
233
  path: O.path,
234
234
  mime_type: p,
235
235
  size_bytes: S
236
236
  };
237
237
  }
238
- async function se(u) {
238
+ async function ne(u) {
239
239
  return a(
240
240
  "GET",
241
241
  `/attachments/sign?path=${encodeURIComponent(u)}`
242
242
  );
243
243
  }
244
- function re() {
244
+ function se() {
245
245
  const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
246
- return `${t.baseUrl}${ve}/stream?${u}`;
246
+ return `${t.baseUrl}${pe}/stream?${u}`;
247
247
  }
248
248
  function W() {
249
249
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
250
250
  try {
251
- const u = new EventSource(re(), { withCredentials: !0 });
252
- for (const g of Ge)
253
- u.addEventListener(g, (p) => ie(g, p.data));
251
+ const u = new EventSource(se(), { withCredentials: !0 });
252
+ for (const g of Ke)
253
+ u.addEventListener(g, (p) => re(g, p.data));
254
254
  u.addEventListener(
255
255
  "error",
256
256
  () => i("error", new Error("SSE error"))
@@ -259,7 +259,7 @@ function Qe(e) {
259
259
  console.error("[transport] SSE open failed", u), i("error", u);
260
260
  }
261
261
  }
262
- function ie(u, g) {
262
+ function re(u, g) {
263
263
  try {
264
264
  const p = JSON.parse(g), S = p && typeof p == "object" && "data" in p ? p.data : p;
265
265
  i(u, S);
@@ -270,27 +270,27 @@ function Qe(e) {
270
270
  function J() {
271
271
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
272
272
  }
273
- function ae() {
273
+ function ie() {
274
274
  clearTimeout(t.burstTimer), W(), t.panelOpen || (t.burstTimer = setTimeout(() => {
275
275
  t.panelOpen || J();
276
- }, Xe));
276
+ }, Ge));
277
277
  }
278
278
  function ue(u) {
279
- t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), W()) : ae();
279
+ t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), W()) : ie();
280
280
  }
281
- async function pe() {
281
+ async function _e() {
282
282
  try {
283
- const u = await E(), g = u.reduce((S, O) => {
283
+ const u = await L(), g = u.reduce((S, O) => {
284
284
  const T = O == null ? void 0 : O.last_message_at;
285
285
  return T && (!S || T > S) ? T : S;
286
286
  }, null);
287
- g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, i("activity", { conversations: u, latestAt: g }), ae());
287
+ g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, i("activity", { conversations: u, latestAt: g }), ie());
288
288
  } catch (u) {
289
289
  console.error("[transport] poll failed", u);
290
290
  }
291
291
  }
292
292
  function he() {
293
- h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(pe, Ye));
293
+ h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(_e, We));
294
294
  }
295
295
  function h() {
296
296
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
@@ -299,7 +299,7 @@ function Qe(e) {
299
299
  if (document.hidden)
300
300
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
301
301
  t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
302
- }, Je);
302
+ }, Ye);
303
303
  else {
304
304
  if (t.hiddenGraceTimer) {
305
305
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
@@ -335,31 +335,31 @@ function Qe(e) {
335
335
  update: y,
336
336
  context: C,
337
337
  // REST
338
- getCustomer: b,
338
+ getCustomer: w,
339
339
  patchCustomer: x,
340
- listConversations: E,
340
+ listConversations: L,
341
341
  createConversation: A,
342
- getConversation: q,
342
+ getConversation: $,
343
343
  patchConversation: M,
344
344
  markConversationRead: U,
345
- listMessages: D,
345
+ listMessages: j,
346
346
  postMessage: P,
347
347
  postCallback: K,
348
348
  uploadAttachment: Q,
349
- signAttachment: se,
349
+ signAttachment: ne,
350
350
  // Read-only state
351
351
  get connection() {
352
352
  return t.connection;
353
353
  }
354
354
  };
355
355
  }
356
- function Ze(e) {
356
+ function Je(e) {
357
357
  return e.endsWith("/") ? e.slice(0, -1) : e;
358
358
  }
359
- function et(e) {
359
+ function Qe(e) {
360
360
  return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : "file";
361
361
  }
362
- function tt() {
362
+ function Ze() {
363
363
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
364
364
  return crypto.randomUUID();
365
365
  const e = new Uint8Array(16);
@@ -371,8 +371,8 @@ function tt() {
371
371
  const t = [...e].map((n) => n.toString(16).padStart(2, "0"));
372
372
  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("");
373
373
  }
374
- function nt(e) {
375
- const t = Ve({
374
+ function et(e) {
375
+ const t = He({
376
376
  ready: !1,
377
377
  error: null,
378
378
  config: null,
@@ -410,7 +410,7 @@ function nt(e) {
410
410
  ), n.push(
411
411
  e.on("message", (h) => {
412
412
  const m = h == null ? void 0 : h.conversation_id, f = h == null ? void 0 : h.message;
413
- !m || !(f != null && f.id) || (W(m, f), f.client_msg_id && delete t.streamingByMsgId[f.client_msg_id], ae(m, f.created_at));
413
+ !m || !(f != null && f.id) || (W(m, f), f.client_msg_id && delete t.streamingByMsgId[f.client_msg_id], ie(m, f.created_at));
414
414
  })
415
415
  ), n.push(
416
416
  e.on("message_stream", (h) => {
@@ -475,7 +475,7 @@ function nt(e) {
475
475
  e.stop();
476
476
  }
477
477
  async function s(h) {
478
- const m = pe(h);
478
+ const m = _e(h);
479
479
  if (!m) return t.customer;
480
480
  try {
481
481
  const f = await e.patchCustomer(m);
@@ -493,7 +493,7 @@ function nt(e) {
493
493
  async function _(h) {
494
494
  const m = t.paginationByConv[h];
495
495
  if (!(m != null && m.loaded || m != null && m.loading)) {
496
- b(h, { nextCursor: null, loading: !0, loaded: !1 });
496
+ w(h, { nextCursor: null, loading: !0, loaded: !1 });
497
497
  try {
498
498
  const f = await e.listMessages(h, {
499
499
  limit: l
@@ -503,13 +503,13 @@ function nt(e) {
503
503
  const g = C.filter((p) => !((p == null ? void 0 : p.id) != null && u.has(`id:${String(p.id)}`) || p != null && p.client_msg_id && u.has(`c:${p.client_msg_id}`)));
504
504
  t.messagesByConv[h] = [...y, ...g].sort(
505
505
  ue
506
- ), b(h, {
506
+ ), w(h, {
507
507
  nextCursor: (f == null ? void 0 : f.next_cursor) ?? null,
508
508
  loading: !1,
509
509
  loaded: !0
510
510
  });
511
511
  } catch (f) {
512
- console.error("[store] openConversation failed", f), b(h, {
512
+ console.error("[store] openConversation failed", f), w(h, {
513
513
  nextCursor: null,
514
514
  loading: !1,
515
515
  loaded: !1
@@ -523,7 +523,7 @@ function nt(e) {
523
523
  if (!m || m.loading || !m.nextCursor) return;
524
524
  const y = (C = (t.messagesByConv[h] || []).find((u) => u == null ? void 0 : u.created_at)) == null ? void 0 : C.created_at;
525
525
  if (y) {
526
- b(h, { ...m, loading: !0 });
526
+ w(h, { ...m, loading: !0 });
527
527
  try {
528
528
  const u = await e.listMessages(h, {
529
529
  before: y,
@@ -532,24 +532,24 @@ function nt(e) {
532
532
  for (const T of p)
533
533
  (T == null ? void 0 : T.id) != null && S.add(`id:${String(T.id)}`), T != null && T.client_msg_id && S.add(`c:${T.client_msg_id}`);
534
534
  const O = g.filter((T) => !((T == null ? void 0 : T.id) != null && S.has(`id:${String(T.id)}`) || T != null && T.client_msg_id && S.has(`c:${T.client_msg_id}`)));
535
- t.messagesByConv[h] = [...O, ...p], b(h, {
535
+ t.messagesByConv[h] = [...O, ...p], w(h, {
536
536
  nextCursor: (u == null ? void 0 : u.next_cursor) ?? null,
537
537
  loading: !1,
538
538
  loaded: !0
539
539
  });
540
540
  } catch (u) {
541
- console.error("[store] loadMore failed", u), b(h, { ...m, loading: !1 });
541
+ console.error("[store] loadMore failed", u), w(h, { ...m, loading: !1 });
542
542
  }
543
543
  }
544
544
  }
545
- function b(h, m) {
545
+ function w(h, m) {
546
546
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
547
547
  }
548
548
  async function x(h, m) {
549
549
  const f = await e.patchConversation(h, m), y = t.conversations.findIndex((C) => C.id === h);
550
550
  y !== -1 && (t.conversations[y] = f);
551
551
  }
552
- async function E(h) {
552
+ async function L(h) {
553
553
  if (!h) return [];
554
554
  const m = t.messagesByConv[h] || [];
555
555
  let f = "";
@@ -586,11 +586,11 @@ function nt(e) {
586
586
  console.error("[store] markConversationRead failed", f);
587
587
  }
588
588
  }
589
- async function q(h, m, { attachments: f, metadata: y } = {}) {
589
+ async function $(h, m, { attachments: f, metadata: y } = {}) {
590
590
  var O;
591
591
  const C = (m || "").trim(), u = Array.isArray(f) && f.length > 0;
592
592
  if (!h || !C && !u) return;
593
- const g = tt(), p = he(h), S = {
593
+ const g = Ze(), p = he(h), S = {
594
594
  id: g,
595
595
  client_msg_id: g,
596
596
  conversation_id: h,
@@ -631,7 +631,7 @@ function nt(e) {
631
631
  }
632
632
  }
633
633
  const U = /* @__PURE__ */ new Map();
634
- async function D(h) {
634
+ async function j(h) {
635
635
  if (!h) return null;
636
636
  const m = U.get(h);
637
637
  if (m != null && m.url) {
@@ -684,7 +684,7 @@ function nt(e) {
684
684
  }
685
685
  return null;
686
686
  }
687
- function se(h) {
687
+ function ne(h) {
688
688
  const m = t.runningActionsByConv[h];
689
689
  if (!m) return null;
690
690
  const f = Object.keys(m);
@@ -692,7 +692,7 @@ function nt(e) {
692
692
  const y = f[0];
693
693
  return { id: y, payload: { name: m[y] } };
694
694
  }
695
- function re(h) {
695
+ function se(h) {
696
696
  var f, y, C, u;
697
697
  const m = t.messagesByConv[h] || [];
698
698
  for (let g = m.length - 1; g >= 0; g--) {
@@ -710,8 +710,8 @@ function nt(e) {
710
710
  if (O && typeof O == "object" && typeof O.label == "string") {
711
711
  const T = O.label.trim();
712
712
  if (!T) return null;
713
- const V = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
714
- return { label: T, kind: V };
713
+ const q = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
714
+ return { label: T, kind: q };
715
715
  }
716
716
  return null;
717
717
  }).filter(Boolean).slice(0, 4) : [];
@@ -724,7 +724,7 @@ function nt(e) {
724
724
  let y = -1;
725
725
  m != null && m.client_msg_id && (y = f.findIndex(
726
726
  (g) => (g == null ? void 0 : g.client_msg_id) && g.client_msg_id === m.client_msg_id
727
- )), y === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (y = f.findIndex((g) => ie(g == null ? void 0 : g.id, m.id)));
727
+ )), y === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (y = f.findIndex((g) => re(g == null ? void 0 : g.id, m.id)));
728
728
  let C;
729
729
  y === -1 ? C = [...f, m].sort(ue) : (C = f.slice(), C[y] = {
730
730
  ...f[y],
@@ -733,7 +733,7 @@ function nt(e) {
733
733
  _failed: !1
734
734
  }), t.messagesByConv[h] = C, (m == null ? void 0 : m.type) === "action" && ((u = m == null ? void 0 : m.payload) != null && u.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
735
735
  }
736
- function ie(h, m) {
736
+ function re(h, m) {
737
737
  return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
738
738
  }
739
739
  function J(h, m, f) {
@@ -744,7 +744,7 @@ function nt(e) {
744
744
  const u = y.slice();
745
745
  u[C] = { ...y[C], ...f }, t.messagesByConv[h] = u;
746
746
  }
747
- function ae(h, m) {
747
+ function ie(h, m) {
748
748
  const f = t.conversations.findIndex((C) => C.id === h);
749
749
  if (f === -1) return;
750
750
  const y = t.conversations[f];
@@ -758,7 +758,7 @@ function nt(e) {
758
758
  function ue(h, m) {
759
759
  return (h.created_at || "").localeCompare(m.created_at || "");
760
760
  }
761
- function pe(h) {
761
+ function _e(h) {
762
762
  if (!h || typeof h != "object") return null;
763
763
  const m = {}, f = {};
764
764
  for (const [y, C] of Object.entries(h))
@@ -781,16 +781,16 @@ function nt(e) {
781
781
  createConversation: a,
782
782
  openConversation: _,
783
783
  loadMore: k,
784
- fetchSinceLast: E,
784
+ fetchSinceLast: L,
785
785
  patchConversation: x,
786
786
  markConversationRead: A,
787
- send: q,
787
+ send: $,
788
788
  clickCallback: M,
789
- signAttachment: D,
789
+ signAttachment: j,
790
790
  submitFeedback: P,
791
791
  getPendingApproval: K,
792
- getActionInFlight: se,
793
- getLatestSuggestions: re,
792
+ getActionInFlight: ne,
793
+ getLatestSuggestions: se,
794
794
  getLatestForm: Q,
795
795
  // Pass-through for panel open/close (controls SSE burst).
796
796
  setPanelOpen: e.setPanelOpen
@@ -812,7 +812,7 @@ const H = {
812
812
  green: "#22C55E",
813
813
  red: "#B91C1C",
814
814
  redBg: "#FDECEC"
815
- }, ye = [
815
+ }, ve = [
816
816
  "#5B5FEF",
817
817
  "#7C3AED",
818
818
  "#DB2777",
@@ -820,16 +820,16 @@ const H = {
820
820
  "#D97706",
821
821
  "#059669"
822
822
  ];
823
- function Ae(e = "") {
824
- return e ? ye[e.charCodeAt(0) % ye.length] : ye[0];
823
+ function ke(e = "") {
824
+ return e ? ve[e.charCodeAt(0) % ve.length] : ve[0];
825
825
  }
826
- function Se(e = "") {
826
+ function Ce(e = "") {
827
827
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
828
828
  }
829
- function be(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
829
+ function we(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
830
830
  return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
831
831
  }
832
- const st = `
832
+ const tt = `
833
833
  @import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
834
834
 
835
835
  .wm-root {
@@ -876,11 +876,11 @@ const st = `
876
876
  0% { transform: translateX(110%); opacity: 0; }
877
877
  100% { transform: translateX(0); opacity: 1; }
878
878
  }
879
- `, rt = "https://api.messenger.victorc.fr", it = /^[a-zA-Z]{3,32}$/, at = /^#[0-9a-fA-F]{3,8}$/, ot = /^(rgb|rgba|hsl|hsla)\(\s*[\d.,%\s/]{1,60}\)$/;
880
- function je(e) {
881
- return typeof e != "string" || !e || e.length > 64 ? !1 : at.test(e) || ot.test(e) || it.test(e);
879
+ `, nt = "https://api.messenger.victorc.fr", st = /^[a-zA-Z]{3,32}$/, rt = /^#[0-9a-fA-F]{3,8}$/, it = /^(rgb|rgba|hsl|hsla)\(\s*[\d.,%\s/]{1,60}\)$/;
880
+ function at(e) {
881
+ return typeof e != "string" || !e || e.length > 64 ? !1 : rt.test(e) || it.test(e) || st.test(e);
882
882
  }
883
- function lt(e) {
883
+ function ot(e) {
884
884
  if (typeof e != "string" || !e || e.length > 2048 || /["'()\\;\s<>]/.test(e)) return null;
885
885
  let t;
886
886
  try {
@@ -890,7 +890,7 @@ function lt(e) {
890
890
  }
891
891
  return t.protocol === "https:" || t.protocol === "http:" || t.protocol === "data:" && /^data:image\//i.test(e) ? e : null;
892
892
  }
893
- const ce = "fr", ct = ["fr", "en"], Oe = { fr: "fr-FR", en: "en-US" }, we = {
893
+ const ce = "fr", lt = ["fr", "en"], xe = { fr: "fr-FR", en: "en-US" }, ye = {
894
894
  fr: {
895
895
  // ── Common ───────────────────────────────────────────────────────
896
896
  "common.newConversation": "Nouvelle conversation",
@@ -1144,16 +1144,16 @@ I reply within seconds.`,
1144
1144
  "export.createdOn": "Created on: {date}"
1145
1145
  }
1146
1146
  };
1147
- function Me(e) {
1147
+ function Ae(e) {
1148
1148
  if (typeof e != "string") return ce;
1149
1149
  const t = e.trim().toLowerCase().slice(0, 2);
1150
- return ct.includes(t) ? t : ce;
1150
+ return lt.includes(t) ? t : ce;
1151
1151
  }
1152
- function ne(e) {
1153
- return Oe[Me(e)] || Oe[ce];
1152
+ function ae(e) {
1153
+ return xe[Ae(e)] || xe[ce];
1154
1154
  }
1155
- function F(e) {
1156
- const t = Me(e), n = we[t] || we[ce], i = we[ce];
1155
+ function D(e) {
1156
+ const t = Ae(e), n = ye[t] || ye[ce], i = ye[ce];
1157
1157
  return function(s, a) {
1158
1158
  let l = n[s];
1159
1159
  return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
@@ -1162,22 +1162,22 @@ function F(e) {
1162
1162
  )), l);
1163
1163
  };
1164
1164
  }
1165
- function Le(e, t) {
1165
+ function Oe(e, t) {
1166
1166
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
1167
1167
  const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
1168
1168
  return (n == null ? void 0 : n.label) || t;
1169
1169
  }
1170
- function Fe(e, t, n) {
1171
- return Array.isArray(t) ? t.map((i) => Le(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Le(e, String(t));
1170
+ function je(e, t, n) {
1171
+ return Array.isArray(t) ? t.map((i) => Oe(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Oe(e, String(t));
1172
1172
  }
1173
- function dt(e, t, n = F()) {
1173
+ function ct(e, t, n = D()) {
1174
1174
  if (!e || !t) return "";
1175
1175
  const i = Array.isArray(e.fields) ? e.fields : [], r = [];
1176
1176
  for (const s of i) {
1177
1177
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1178
1178
  const a = t[s.key];
1179
1179
  if (a == null || a === "") continue;
1180
- const l = Fe(s, a, n);
1180
+ const l = je(s, a, n);
1181
1181
  l && r.push(`${s.label} :
1182
1182
  ${l}`);
1183
1183
  }
@@ -1185,13 +1185,13 @@ ${l}`);
1185
1185
 
1186
1186
  `);
1187
1187
  }
1188
- function ut(e, t, n = F()) {
1188
+ function dt(e, t, n = D()) {
1189
1189
  const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
1190
1190
  for (const s of r) {
1191
1191
  if (!(s != null && s.key) || !(s != null && s.label)) continue;
1192
1192
  const a = t == null ? void 0 : t[s.key];
1193
1193
  if (a == null || a === "") continue;
1194
- const l = Fe(s, a, n);
1194
+ const l = je(s, a, n);
1195
1195
  if (!l) continue;
1196
1196
  const _ = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1197
1197
  `));
@@ -1205,7 +1205,7 @@ function ut(e, t, n = F()) {
1205
1205
  }
1206
1206
  };
1207
1207
  }
1208
- function He(e) {
1208
+ function Fe(e) {
1209
1209
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1210
1210
  }
1211
1211
  function me(e) {
@@ -1220,14 +1220,14 @@ function le(e) {
1220
1220
  return n.push(r), `${Ie}CODE${s}${Ie}`;
1221
1221
  }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => me(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), 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, (i, r) => `<code class="wm-md-code">${n[+r]}</code>`), t;
1222
1222
  }
1223
- function ze(e) {
1223
+ function ut(e) {
1224
1224
  if (!e) return "";
1225
1225
  const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
1226
- return le(He(t));
1226
+ return le(Fe(t));
1227
1227
  }
1228
1228
  function ht(e) {
1229
1229
  if (!e) return "";
1230
- const t = He(e).split(`
1230
+ const t = Fe(e).split(`
1231
1231
  `), n = [];
1232
1232
  let i = 0;
1233
1233
  for (; i < t.length; ) {
@@ -1251,25 +1251,25 @@ function ht(e) {
1251
1251
  if (!x) break;
1252
1252
  k.push(x[1]), i++;
1253
1253
  }
1254
- const b = k.map((x) => `<li>${le(x)}</li>`).join("");
1254
+ const w = k.map((x) => `<li>${le(x)}</li>`).join("");
1255
1255
  n.push({
1256
1256
  type: "block",
1257
- html: `<ul class="wm-md-ul">${b}</ul>`
1257
+ html: `<ul class="wm-md-ul">${w}</ul>`
1258
1258
  });
1259
1259
  continue;
1260
1260
  }
1261
1261
  const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1262
1262
  if (l) {
1263
- const k = parseInt(l[1], 10), b = [l[2]];
1263
+ const k = parseInt(l[1], 10), w = [l[2]];
1264
1264
  for (i++; i < t.length; ) {
1265
1265
  const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
1266
1266
  if (!A) break;
1267
- b.push(A[1]), i++;
1267
+ w.push(A[1]), i++;
1268
1268
  }
1269
- const x = b.map((A) => `<li>${le(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1269
+ const x = w.map((A) => `<li>${le(A)}</li>`).join(""), L = k !== 1 ? ` start="${k}"` : "";
1270
1270
  n.push({
1271
1271
  type: "block",
1272
- html: `<ol class="wm-md-ol"${E}>${x}</ol>`
1272
+ html: `<ol class="wm-md-ol"${L}>${x}</ol>`
1273
1273
  });
1274
1274
  continue;
1275
1275
  }
@@ -1344,9 +1344,9 @@ function gt(e, t, n, i) {
1344
1344
  return r.join(`
1345
1345
  `);
1346
1346
  }
1347
- function _t(e, t, n = F(), i) {
1347
+ function _t(e, t, n = D(), i) {
1348
1348
  if (!e) return;
1349
- const r = gt(e, t || [], n, ne(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1349
+ const r = gt(e, t || [], n, ae(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
1350
1350
  try {
1351
1351
  const a = URL.createObjectURL(s), l = document.createElement("a");
1352
1352
  l.href = a, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(a), 1e3);
@@ -1629,7 +1629,7 @@ const pt = {
1629
1629
  ) + r;
1630
1630
  this.nextRevealAt = a;
1631
1631
  const l = Math.max(0, a - n), _ = e.id, k = setTimeout(() => {
1632
- this.revealedAt = { ...this.revealedAt, [_]: Date.now() }, this.revealTimers = this.revealTimers.filter((b) => b !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1632
+ this.revealedAt = { ...this.revealedAt, [_]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1633
1633
  }, l);
1634
1634
  this.revealTimers.push(k);
1635
1635
  },
@@ -1788,16 +1788,16 @@ const R = (e, t) => {
1788
1788
  },
1789
1789
  computed: {
1790
1790
  bg() {
1791
- return this.avatarUrl ? "transparent" : Ae(this.name);
1791
+ return this.avatarUrl ? "transparent" : ke(this.name);
1792
1792
  },
1793
1793
  initials() {
1794
- return Se(this.name);
1794
+ return Ce(this.name);
1795
1795
  }
1796
1796
  }
1797
1797
  }, Ot = ["src", "alt"];
1798
- function Lt(e, t, n, i, r, s) {
1798
+ function It(e, t, n, i, r, s) {
1799
1799
  return c(), d("div", {
1800
- class: L(["wm-huav", { "wm-huav--tail": n.tail }]),
1800
+ class: I(["wm-huav", { "wm-huav--tail": n.tail }]),
1801
1801
  style: z({
1802
1802
  width: n.size + "px",
1803
1803
  height: n.size + "px",
@@ -1815,13 +1815,13 @@ function Lt(e, t, n, i, r, s) {
1815
1815
  }, v(s.initials), 5))
1816
1816
  ], 6);
1817
1817
  }
1818
- const _e = /* @__PURE__ */ R(xt, [["render", Lt], ["__scopeId", "data-v-14e10c0d"]]), It = 3, Et = {
1818
+ const Se = /* @__PURE__ */ R(xt, [["render", It], ["__scopeId", "data-v-14e10c0d"]]), Et = 3, Lt = {
1819
1819
  name: "WmLauncher",
1820
- components: { HumanAvatar: _e },
1820
+ components: { HumanAvatar: Se },
1821
1821
  inject: {
1822
1822
  // Translator shared by the Messenger shell; French fallback when
1823
1823
  // the component is used standalone.
1824
- t: { default: () => F() }
1824
+ t: { default: () => D() }
1825
1825
  },
1826
1826
  props: {
1827
1827
  // Nombre de conversations non lues — pilote la pastille.
@@ -1838,11 +1838,11 @@ const _e = /* @__PURE__ */ R(xt, [["render", Lt], ["__scopeId", "data-v-14e10c0d
1838
1838
  // élément en ordre DOM avec un flex column normal). Les plus
1839
1839
  // anciens remontent dans la pile.
1840
1840
  visiblePeeks() {
1841
- return this.peeks.slice(0, It).reverse();
1841
+ return this.peeks.slice(0, Et).reverse();
1842
1842
  }
1843
1843
  }
1844
- }, Bt = ["aria-label", "onClick", "onKeydown"], Rt = ["aria-label", "onClick"], Nt = { class: "wm-peek__avatar" }, Pt = ["aria-label"], Ut = { class: "wm-peek__body" }, Dt = { class: "wm-peek__head" }, jt = { class: "wm-peek__name" }, Ft = { class: "wm-peek__action" }, Ht = { class: "wm-peek__text" }, zt = ["onClick"], qt = ["aria-label"], Vt = ["aria-label"];
1845
- function $t(e, t, n, i, r, s) {
1844
+ }, Bt = ["aria-label", "onClick", "onKeydown"], Rt = ["aria-label", "onClick"], Nt = { class: "wm-peek__avatar" }, Pt = ["aria-label"], Ut = { class: "wm-peek__body" }, jt = { class: "wm-peek__head" }, Ft = { class: "wm-peek__name" }, Dt = { class: "wm-peek__action" }, Ht = { class: "wm-peek__text" }, zt = ["onClick"], $t = ["aria-label"], qt = ["aria-label"];
1845
+ function Vt(e, t, n, i, r, s) {
1846
1846
  const a = B("HumanAvatar");
1847
1847
  return c(), d("div", {
1848
1848
  class: "wm-launcherWrap",
@@ -1851,13 +1851,13 @@ function $t(e, t, n, i, r, s) {
1851
1851
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1852
1852
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1853
1853
  }, [
1854
- $(Pe, { name: "wm-peek" }, {
1855
- default: Ue(() => [
1854
+ V(Ne, { name: "wm-peek" }, {
1855
+ default: Pe(() => [
1856
1856
  s.visiblePeeks.length ? (c(), d("div", {
1857
1857
  key: 0,
1858
- class: L(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1858
+ class: I(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1859
1859
  }, [
1860
- (c(!0), d(I, null, j(s.visiblePeeks, (l, _) => (c(), d("div", {
1860
+ (c(!0), d(E, null, F(s.visiblePeeks, (l, _) => (c(), d("div", {
1861
1861
  key: l.convId,
1862
1862
  class: "wm-peek",
1863
1863
  style: z({
@@ -1896,7 +1896,7 @@ function $t(e, t, n, i, r, s) {
1896
1896
  ], -1)
1897
1897
  ])], 8, Rt),
1898
1898
  o("div", Nt, [
1899
- $(a, {
1899
+ V(a, {
1900
1900
  name: l.senderName,
1901
1901
  "avatar-url": l.senderAvatarUrl,
1902
1902
  size: 34
@@ -1905,12 +1905,12 @@ function $t(e, t, n, i, r, s) {
1905
1905
  key: 0,
1906
1906
  class: "wm-peek__avatarBadge",
1907
1907
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1908
- }, v(l.count > 9 ? "9+" : l.count), 9, Pt)) : w("", !0)
1908
+ }, v(l.count > 9 ? "9+" : l.count), 9, Pt)) : b("", !0)
1909
1909
  ]),
1910
1910
  o("div", Ut, [
1911
- o("div", Dt, [
1912
- o("span", jt, v(l.senderName || s.t("common.agent")), 1),
1913
- o("span", Ft, v(s.t("launcher.repliedToYou")), 1)
1911
+ o("div", jt, [
1912
+ o("span", Ft, v(l.senderName || s.t("common.agent")), 1),
1913
+ o("span", Dt, v(s.t("launcher.repliedToYou")), 1)
1914
1914
  ]),
1915
1915
  o("p", Ht, v(l.preview), 1)
1916
1916
  ]),
@@ -1920,7 +1920,7 @@ function $t(e, t, n, i, r, s) {
1920
1920
  onClick: X((k) => e.$emit("open", l.convId), ["stop"])
1921
1921
  }, v(s.t("common.open")), 9, zt)
1922
1922
  ], 44, Bt))), 128))
1923
- ], 2)) : w("", !0)
1923
+ ], 2)) : b("", !0)
1924
1924
  ]),
1925
1925
  _: 1
1926
1926
  }),
@@ -1951,11 +1951,11 @@ function $t(e, t, n, i, r, s) {
1951
1951
  }) : s.t("launcher.unreadConversationsOne", {
1952
1952
  count: n.unreadCount
1953
1953
  })
1954
- }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Vt)) : w("", !0)
1955
- ], 8, qt)
1954
+ }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, qt)) : b("", !0)
1955
+ ], 8, $t)
1956
1956
  ], 32);
1957
1957
  }
1958
- const Kt = /* @__PURE__ */ R(Et, [["render", $t], ["__scopeId", "data-v-44ddf1a1"]]), Wt = {
1958
+ const Kt = /* @__PURE__ */ R(Lt, [["render", Vt], ["__scopeId", "data-v-44ddf1a1"]]), Wt = {
1959
1959
  name: "WmAIAvatar",
1960
1960
  props: {
1961
1961
  size: { type: Number, default: 26 },
@@ -1978,10 +1978,10 @@ const Kt = /* @__PURE__ */ R(Et, [["render", $t], ["__scopeId", "data-v-44ddf1a1
1978
1978
  },
1979
1979
  computed: {
1980
1980
  initials() {
1981
- return Se(this.name);
1981
+ return Ce(this.name);
1982
1982
  },
1983
1983
  bgColor() {
1984
- return Ae(this.name);
1984
+ return ke(this.name);
1985
1985
  }
1986
1986
  }
1987
1987
  }, Gt = {
@@ -1990,16 +1990,16 @@ const Kt = /* @__PURE__ */ R(Et, [["render", $t], ["__scopeId", "data-v-44ddf1a1
1990
1990
  }, Yt = ["src", "alt"], Xt = ["width", "height"];
1991
1991
  function Jt(e, t, n, i, r, s) {
1992
1992
  return c(), d("div", {
1993
- class: L(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1993
+ class: I(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1994
1994
  style: z({
1995
1995
  width: n.size + "px",
1996
1996
  height: n.size + "px",
1997
1997
  "--wm-avr": n.size * 0.32 + "px"
1998
1998
  })
1999
1999
  }, [
2000
- n.pulse ? (c(), d("div", Gt)) : w("", !0),
2000
+ n.pulse ? (c(), d("div", Gt)) : b("", !0),
2001
2001
  o("div", {
2002
- class: L(["wm-aiav__inner", {
2002
+ class: I(["wm-aiav__inner", {
2003
2003
  "wm-aiav__inner--glow": n.pulse,
2004
2004
  "wm-aiav__inner--img": !!n.imageUrl,
2005
2005
  "wm-aiav__inner--initials": !n.imageUrl && !!s.initials
@@ -2062,10 +2062,10 @@ const oe = /* @__PURE__ */ R(Wt, [["render", Jt], ["__scopeId", "data-v-6f7f685d
2062
2062
  },
2063
2063
  methods: {
2064
2064
  colorFor(e) {
2065
- return e.avatar_url ? "transparent" : Ae(e.name || "");
2065
+ return e.avatar_url ? "transparent" : ke(e.name || "");
2066
2066
  },
2067
2067
  initialsFor(e) {
2068
- return Se(e.name || "");
2068
+ return Ce(e.name || "");
2069
2069
  }
2070
2070
  }
2071
2071
  }, Zt = {
@@ -2081,7 +2081,7 @@ function sn(e, t, n, i, r, s) {
2081
2081
  class: "wm-team__stack",
2082
2082
  style: z({ width: s.stackWidth + "px" })
2083
2083
  }, [
2084
- (c(!0), d(I, null, j(n.members.slice(0, 3), (a, l) => (c(), d("div", {
2084
+ (c(!0), d(E, null, F(n.members.slice(0, 3), (a, l) => (c(), d("div", {
2085
2085
  key: l,
2086
2086
  class: "wm-team__pill",
2087
2087
  style: z({
@@ -2097,8 +2097,8 @@ function sn(e, t, n, i, r, s) {
2097
2097
  }, null, 8, en)) : (c(), d("span", tn, v(s.initialsFor(a)), 1))
2098
2098
  ], 4))), 128))
2099
2099
  ], 4),
2100
- n.responseLabel ? (c(), d("span", nn, v(n.responseLabel), 1)) : w("", !0)
2101
- ])) : w("", !0);
2100
+ n.responseLabel ? (c(), d("span", nn, v(n.responseLabel), 1)) : b("", !0)
2101
+ ])) : b("", !0);
2102
2102
  }
2103
2103
  const rn = /* @__PURE__ */ R(Qt, [["render", sn], ["__scopeId", "data-v-e49a9063"]]), an = {
2104
2104
  name: "WmHeader",
@@ -2106,7 +2106,7 @@ const rn = /* @__PURE__ */ R(Qt, [["render", sn], ["__scopeId", "data-v-e49a9063
2106
2106
  inject: {
2107
2107
  // Translator shared by the Messenger shell. Falls back to a French
2108
2108
  // translator when the component is used standalone (no provider).
2109
- t: { default: () => F() }
2109
+ t: { default: () => D() }
2110
2110
  },
2111
2111
  props: {
2112
2112
  title: { type: String, default: "Nouvelle conversation" },
@@ -2170,9 +2170,9 @@ function pn(e, t, n, i, r, s) {
2170
2170
  o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
2171
2171
  ], -1)
2172
2172
  ])], 8, ln)) : (c(), d("div", cn)),
2173
- n.showIdentity ? (c(), d(I, { key: 2 }, [
2173
+ n.showIdentity ? (c(), d(E, { key: 2 }, [
2174
2174
  o("div", dn, [
2175
- $(a, {
2175
+ V(a, {
2176
2176
  size: 30,
2177
2177
  name: n.agentName,
2178
2178
  "image-url": n.agentAvatarUrl
@@ -2185,13 +2185,13 @@ function pn(e, t, n, i, r, s) {
2185
2185
  key: 0,
2186
2186
  members: s.displayedTeamMembers,
2187
2187
  "response-label": ""
2188
- }, null, 8, ["members"])) : w("", !0)
2188
+ }, null, 8, ["members"])) : b("", !0)
2189
2189
  ], 64)) : (c(), d("div", mn)),
2190
2190
  o("div", fn, [
2191
2191
  n.showMore ? (c(), d("button", {
2192
2192
  key: 0,
2193
2193
  type: "button",
2194
- class: L(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
2194
+ class: I(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
2195
2195
  "aria-label": s.t("header.moreOptions"),
2196
2196
  title: s.t("header.moreOptions"),
2197
2197
  onClick: t[1] || (t[1] = (_) => e.$emit("more"))
@@ -2219,7 +2219,7 @@ function pn(e, t, n, i, r, s) {
2219
2219
  r: "1.6"
2220
2220
  })
2221
2221
  ], -1)
2222
- ])], 10, gn)) : w("", !0),
2222
+ ])], 10, gn)) : b("", !0),
2223
2223
  n.showClose ? (c(), d("button", {
2224
2224
  key: 1,
2225
2225
  type: "button",
@@ -2241,11 +2241,11 @@ function pn(e, t, n, i, r, s) {
2241
2241
  }, [
2242
2242
  o("path", { d: "M18 6L6 18M6 6l12 12" })
2243
2243
  ], -1)
2244
- ])], 8, _n)) : w("", !0)
2244
+ ])], 8, _n)) : b("", !0)
2245
2245
  ])
2246
2246
  ]);
2247
2247
  }
2248
- const vn = /* @__PURE__ */ R(an, [["render", pn], ["__scopeId", "data-v-7af4c118"]]), Be = {
2248
+ const vn = /* @__PURE__ */ R(an, [["render", pn], ["__scopeId", "data-v-7af4c118"]]), Le = {
2249
2249
  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",
2250
2250
  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",
2251
2251
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -2253,12 +2253,11 @@ const vn = /* @__PURE__ */ R(an, [["render", pn], ["__scopeId", "data-v-7af4c118
2253
2253
  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"
2254
2254
  }, yn = {
2255
2255
  name: "WmOnboarding",
2256
- components: { AIAvatar: oe, HumanAvatar: _e },
2256
+ components: { AIAvatar: oe },
2257
2257
  inject: {
2258
- // Translator + resolved-language getter shared by the Messenger
2259
- // shell. Fall back to French wording when used standalone.
2260
- t: { default: () => F() },
2261
- wmLocale: { default: () => () => "fr" }
2258
+ // Translator shared by the Messenger shell. Falls back to French
2259
+ // wording when used standalone.
2260
+ t: { default: () => D() }
2262
2261
  },
2263
2262
  props: {
2264
2263
  welcomeMessage: { type: String, default: "" },
@@ -2277,19 +2276,13 @@ const vn = /* @__PURE__ */ R(an, [["render", pn], ["__scopeId", "data-v-7af4c118
2277
2276
  heroSub() {
2278
2277
  return this.subtitle || this.t("onboarding.heroSub");
2279
2278
  },
2280
- isOddQuickLinks() {
2281
- return this.quickLinks.length % 2 === 1;
2282
- },
2283
- quickLinksLayout() {
2284
- return this.isOddQuickLinks ? "wm-onb__qlist" : "wm-onb__grid";
2285
- },
2286
2279
  unreadThreads() {
2287
2280
  return this.openThreads.filter((e) => e.unread);
2288
2281
  }
2289
2282
  },
2290
2283
  methods: {
2291
2284
  iconPath(e) {
2292
- return Be[e] || Be.link;
2285
+ return Le[e] || Le.link;
2293
2286
  },
2294
2287
  // True when activating the link opens an external destination
2295
2288
  // (full URL or relative path) — anchor links (`#…`, which route
@@ -2299,81 +2292,21 @@ const vn = /* @__PURE__ */ R(an, [["render", pn], ["__scopeId", "data-v-7af4c118
2299
2292
  return !!t && !t.startsWith("#");
2300
2293
  },
2301
2294
  // Returns the link's `icon_url` only if it's safe to embed as
2302
- // the body of a CSS `url("…")` token. Used both as a `v-if`
2303
- // guard on the masked-glyph span and as the source for the
2304
- // `--icon-url` custom property below.
2295
+ // the body of a CSS `url("…")` token. Used both as a `v-if` guard
2296
+ // on the masked-glyph span and as the source of `--icon-url`
2297
+ // (cf. iconUrlStyle).
2305
2298
  safeIconUrl(e) {
2306
- return lt(e == null ? void 0 : e.icon_url);
2307
- },
2308
- // Gated inline style for each quick-link card. `--card-color`
2309
- // is only set when `l.color` is a recognised CSS color literal,
2310
- // `--icon-url` only when `l.icon_url` parses to an http(s) or
2311
- // data:image URL free of CSS-breaking characters. Anything
2312
- // invalid silently falls through to the brand-accent fallback.
2313
- cardInlineStyle(e) {
2314
- const t = {};
2315
- e != null && e.color && je(e.color) && (t["--card-color"] = e.color);
2316
- const n = this.safeIconUrl(e);
2317
- return n && (t["--icon-url"] = `url("${n}")`), Object.keys(t).length ? t : null;
2318
- },
2319
- renderPreview(e) {
2320
- return ze(e);
2321
- },
2322
- // Avatar resolution for a thread row, in priority order :
2323
- // 1. last sender's `avatar_url` (image)
2324
- // 2. last sender's `name` (initials on a deterministic colour)
2325
- // 3. widget's `default_icon_url`, with a muted treatment when the
2326
- // thread has no unread activity (cf. avatarWrapperClass).
2327
- avatarComponent(e) {
2328
- var t;
2329
- return ((t = e == null ? void 0 : e.author) == null ? void 0 : t.type) === "agent_human" ? "HumanAvatar" : "AIAvatar";
2330
- },
2331
- avatarProps(e) {
2332
- const t = e == null ? void 0 : e.author;
2333
- return (t == null ? void 0 : t.type) === "agent_human" ? {
2334
- size: 40,
2335
- name: t.name || "",
2336
- avatarUrl: t.avatar_url || null
2337
- } : {
2338
- size: 40,
2339
- name: (t == null ? void 0 : t.name) || "",
2340
- imageUrl: (t == null ? void 0 : t.avatar_url) || null
2341
- };
2342
- },
2343
- // True when neither avatar_url nor name is known for the last
2344
- // sender — we'll display the widget's default icon. Drives the
2345
- // muted/inverted wrapper class so read default-icon rows recede.
2346
- isDefaultAvatar(e) {
2347
- const t = e == null ? void 0 : e.author;
2348
- return !(t != null && t.avatar_url || t != null && t.name);
2349
- },
2350
- // CSS class applied to the avatar wrapper. The default-icon
2351
- // fallback gets muted when the thread has no unread message, so
2352
- // caught-up rows visually recede next to the active ones.
2353
- avatarWrapperClass(e) {
2354
- return this.isDefaultAvatar(e) && !(e != null && e.unread) ? "wm-onb__avatar--muted" : null;
2355
- },
2356
- formatTs(e) {
2357
- if (!e) return "";
2358
- const t = new Date(e);
2359
- if (Number.isNaN(t.getTime())) return "";
2360
- const n = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
2361
- if (t.toDateString() === i.toDateString())
2362
- return t.toLocaleTimeString(n, {
2363
- hour: "2-digit",
2364
- minute: "2-digit"
2365
- });
2366
- if (i.getTime() - t.getTime() < 7 * 864e5) {
2367
- const a = t.toLocaleDateString(n, { weekday: "short" });
2368
- return a.charAt(0).toUpperCase() + a.slice(1);
2369
- }
2370
- return t.toLocaleDateString(n, {
2371
- day: "2-digit",
2372
- month: "2-digit"
2373
- });
2299
+ return ot(e == null ? void 0 : e.icon_url);
2300
+ },
2301
+ // Inline style exposing the link's icon_url as a CSS custom
2302
+ // property only when the URL passes the safety gate, so a
2303
+ // malformed config can't inject arbitrary CSS into the var.
2304
+ iconUrlStyle(e) {
2305
+ const t = this.safeIconUrl(e);
2306
+ return t ? { "--icon-url": `url("${t}")` } : null;
2374
2307
  }
2375
2308
  }
2376
- }, wn = { class: "wm-onb" }, bn = { class: "wm-onb__hero" }, kn = { class: "wm-onb__hero-text" }, Cn = { class: "wm-onb__title" }, An = { class: "wm-onb__sub" }, Sn = { class: "wm-onb__cta" }, Mn = ["disabled"], Tn = { class: "wm-onb__startLabel" }, xn = ["onClick"], On = { class: "wm-onb__card-icon" }, Ln = ["aria-label"], In = {
2309
+ }, wn = { class: "wm-onb" }, bn = { class: "wm-onb__hero" }, kn = { class: "wm-onb__hero-text" }, Cn = { class: "wm-onb__title" }, An = { class: "wm-onb__sub" }, Sn = { class: "wm-onb__actions" }, Mn = ["disabled"], Tn = { class: "wm-onb__btn-label" }, xn = ["onClick"], On = { class: "wm-onb__btn-icon" }, In = ["aria-label"], En = {
2377
2310
  key: 1,
2378
2311
  width: "18",
2379
2312
  height: "18",
@@ -2384,14 +2317,11 @@ const vn = /* @__PURE__ */ R(an, [["render", pn], ["__scopeId", "data-v-7af4c118
2384
2317
  "stroke-linecap": "round",
2385
2318
  "stroke-linejoin": "round",
2386
2319
  "aria-hidden": "true"
2387
- }, En = ["d"], Bn = { class: "wm-onb__card-body" }, Rn = { class: "wm-onb__card-title" }, Nn = {
2320
+ }, Ln = ["d"], Bn = { class: "wm-onb__btn-label" }, Rn = {
2388
2321
  key: 0,
2389
- class: "wm-onb__card-sub"
2390
- }, Pn = {
2391
- key: 0,
2392
- class: "wm-onb__card-ext",
2393
- width: "11",
2394
- height: "11",
2322
+ class: "wm-onb__btn-trail",
2323
+ width: "13",
2324
+ height: "13",
2395
2325
  viewBox: "0 0 24 24",
2396
2326
  fill: "none",
2397
2327
  stroke: "currentColor",
@@ -2399,20 +2329,18 @@ const vn = /* @__PURE__ */ R(an, [["render", pn], ["__scopeId", "data-v-7af4c118
2399
2329
  "stroke-linecap": "round",
2400
2330
  "stroke-linejoin": "round",
2401
2331
  "aria-hidden": "true"
2402
- }, Un = {
2403
- key: 1,
2404
- class: "wm-onb__sheet"
2405
- }, Dn = {
2406
- key: 0,
2407
- class: "wm-onb__alertList"
2408
- }, jn = ["onClick"], Fn = {
2409
- key: 0,
2410
- class: "wm-onb__defaultAvatar"
2411
- }, Hn = ["aria-label"], zn = { class: "wm-onb__alert-body" }, qn = { class: "wm-onb__alert-title" }, Vn = ["innerHTML"], $n = { class: "wm-onb__alert-meta" }, Kn = {
2412
- key: 0,
2413
- class: "wm-onb__alert-time"
2414
- }, Wn = { class: "wm-onb__alert-resume" }, Gn = { class: "wm-onb__historyLabel" }, Yn = { class: "wm-onb__historyCount" };
2415
- function Xn(e, t, n, i, r, s) {
2332
+ }, Nn = ["onClick"], Pn = { class: "wm-onb__btn-label" }, Un = ["aria-label"], jn = { class: "wm-onb__btn-icon" }, Fn = {
2333
+ width: "18",
2334
+ height: "18",
2335
+ viewBox: "0 0 24 24",
2336
+ fill: "none",
2337
+ stroke: "currentColor",
2338
+ "stroke-width": "1.8",
2339
+ "stroke-linecap": "round",
2340
+ "stroke-linejoin": "round",
2341
+ "aria-hidden": "true"
2342
+ }, Dn = ["d"], Hn = { class: "wm-onb__btn-label" }, zn = { class: "wm-onb__btn-count" };
2343
+ function $n(e, t, n, i, r, s) {
2416
2344
  const a = B("AIAvatar");
2417
2345
  return c(), d("div", wn, [
2418
2346
  o("div", bn, [
@@ -2450,7 +2378,7 @@ function Xn(e, t, n, i, r, s) {
2450
2378
  opacity: "0.65"
2451
2379
  })
2452
2380
  ], -1)),
2453
- $(a, {
2381
+ V(a, {
2454
2382
  size: 52,
2455
2383
  "image-url": n.defaultIconUrl
2456
2384
  }, null, 8, ["image-url"]),
@@ -2462,18 +2390,18 @@ function Xn(e, t, n, i, r, s) {
2462
2390
  o("div", Sn, [
2463
2391
  o("button", {
2464
2392
  type: "button",
2465
- class: "wm-onb__startBtn",
2393
+ class: "wm-onb__btn wm-onb__btn--start",
2466
2394
  disabled: n.busy,
2467
2395
  onClick: t[0] || (t[0] = (l) => e.$emit("start"))
2468
2396
  }, [
2469
- t[3] || (t[3] = o("span", { class: "wm-onb__startIcon" }, [
2397
+ t[3] || (t[3] = o("span", { class: "wm-onb__btn-icon" }, [
2470
2398
  o("svg", {
2471
- width: "14",
2472
- height: "14",
2399
+ width: "18",
2400
+ height: "18",
2473
2401
  viewBox: "0 0 24 24",
2474
2402
  fill: "none",
2475
2403
  stroke: "currentColor",
2476
- "stroke-width": "2.4",
2404
+ "stroke-width": "2",
2477
2405
  "stroke-linecap": "round",
2478
2406
  "stroke-linejoin": "round",
2479
2407
  "aria-hidden": "true"
@@ -2481,112 +2409,42 @@ function Xn(e, t, n, i, r, s) {
2481
2409
  o("path", { d: "M12 5v14M5 12h14" })
2482
2410
  ])
2483
2411
  ], -1)),
2484
- o("span", Tn, v(n.busy ? "…" : s.t("onboarding.start")), 1),
2485
- t[4] || (t[4] = o("svg", {
2486
- class: "wm-onb__startArrow",
2487
- width: "14",
2488
- height: "14",
2489
- viewBox: "0 0 24 24",
2490
- fill: "none",
2491
- stroke: "currentColor",
2492
- "stroke-width": "2",
2493
- "stroke-linecap": "round",
2494
- "stroke-linejoin": "round",
2495
- "aria-hidden": "true"
2496
- }, [
2497
- o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2498
- ], -1))
2499
- ], 8, Mn)
2500
- ]),
2501
- n.quickLinks.length ? (c(), d("div", {
2502
- key: 0,
2503
- class: L(s.quickLinksLayout)
2504
- }, [
2505
- (c(!0), d(I, null, j(n.quickLinks, (l, _) => (c(), d("button", {
2506
- key: _,
2412
+ o("span", Tn, v(n.busy ? "…" : s.t("onboarding.start")), 1)
2413
+ ], 8, Mn),
2414
+ (c(!0), d(E, null, F(n.quickLinks, (l, _) => (c(), d("button", {
2415
+ key: "ql-" + _,
2507
2416
  type: "button",
2508
- class: L(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
2509
- style: z(s.cardInlineStyle(l)),
2417
+ class: "wm-onb__btn",
2510
2418
  onClick: (k) => e.$emit("select", l)
2511
2419
  }, [
2512
2420
  o("span", On, [
2513
2421
  s.safeIconUrl(l) ? (c(), d("span", {
2514
2422
  key: 0,
2515
- class: "wm-onb__card-iconImg",
2423
+ class: "wm-onb__btn-iconImg",
2424
+ style: z(s.iconUrlStyle(l)),
2516
2425
  role: "img",
2517
2426
  "aria-label": l.label || ""
2518
- }, null, 8, Ln)) : (c(), d("svg", In, [
2427
+ }, null, 12, In)) : (c(), d("svg", En, [
2519
2428
  o("path", {
2520
2429
  d: s.iconPath(l.icon)
2521
- }, null, 8, En)
2430
+ }, null, 8, Ln)
2522
2431
  ]))
2523
2432
  ]),
2524
- o("span", Bn, [
2525
- o("span", Rn, v(l.label), 1),
2526
- l.subtitle ? (c(), d("span", Nn, v(l.subtitle), 1)) : w("", !0)
2527
- ]),
2528
- s.isExternalLink(l) ? (c(), d("svg", Pn, [...t[5] || (t[5] = [
2433
+ o("span", Bn, v(l.label), 1),
2434
+ s.isExternalLink(l) ? (c(), d("svg", Rn, [...t[4] || (t[4] = [
2529
2435
  o("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2530
- ])])) : w("", !0)
2531
- ], 14, xn))), 128))
2532
- ], 2)) : w("", !0),
2533
- s.unreadThreads.length || n.openThreads.length ? (c(), d("div", Un, [
2534
- s.unreadThreads.length ? (c(), d("div", Dn, [
2535
- (c(!0), d(I, null, j(s.unreadThreads, (l) => (c(), d("button", {
2536
- key: l.id,
2537
- type: "button",
2538
- class: "wm-onb__alert",
2539
- onClick: (_) => e.$emit("resume", l)
2540
- }, [
2541
- o("span", {
2542
- class: L(["wm-onb__alert-avatar", s.avatarWrapperClass(l)])
2543
- }, [
2544
- s.isDefaultAvatar(l) ? (c(), d("span", Fn, [...t[6] || (t[6] = [
2545
- o("svg", {
2546
- width: "20",
2547
- height: "20",
2548
- viewBox: "0 0 24 24",
2549
- fill: "none",
2550
- stroke: "currentColor",
2551
- "stroke-width": "1.7",
2552
- "stroke-linecap": "round",
2553
- "stroke-linejoin": "round",
2554
- "aria-hidden": "true"
2555
- }, [
2556
- o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2557
- ], -1)
2558
- ])])) : (c(), N(ke(s.avatarComponent(l)), De({
2559
- key: 1,
2560
- ref_for: !0
2561
- }, s.avatarProps(l)), null, 16)),
2562
- o("span", {
2563
- class: "wm-onb__alert-dot",
2564
- "aria-label": s.t("onboarding.unread")
2565
- }, null, 8, Hn)
2566
- ], 2),
2567
- o("span", zn, [
2568
- o("span", qn, v(l.title), 1),
2569
- o("span", {
2570
- class: "wm-onb__alert-preview",
2571
- innerHTML: s.renderPreview(l.preview)
2572
- }, null, 8, Vn)
2573
- ]),
2574
- o("span", $n, [
2575
- s.formatTs(l._ts) ? (c(), d("span", Kn, v(s.formatTs(l._ts)), 1)) : w("", !0),
2576
- o("span", Wn, v(s.t("onboarding.resume")), 1)
2577
- ])
2578
- ], 8, jn))), 128))
2579
- ])) : w("", !0),
2580
- n.openThreads.length ? (c(), d("button", {
2581
- key: 1,
2436
+ ])])) : b("", !0)
2437
+ ], 8, xn))), 128)),
2438
+ (c(!0), d(E, null, F(s.unreadThreads, (l) => (c(), d("button", {
2439
+ key: "un-" + l.id,
2582
2440
  type: "button",
2583
- class: "wm-onb__historyLink",
2584
- onClick: t[1] || (t[1] = (l) => e.$emit("view-history"))
2441
+ class: "wm-onb__btn wm-onb__btn--unread",
2442
+ onClick: (_) => e.$emit("resume", l)
2585
2443
  }, [
2586
- t[7] || (t[7] = o("span", { class: "wm-onb__historyIcon" }, [
2444
+ t[5] || (t[5] = o("span", { class: "wm-onb__btn-icon" }, [
2587
2445
  o("svg", {
2588
- width: "16",
2589
- height: "16",
2446
+ width: "18",
2447
+ height: "18",
2590
2448
  viewBox: "0 0 24 24",
2591
2449
  fill: "none",
2592
2450
  stroke: "currentColor",
@@ -2595,15 +2453,34 @@ function Xn(e, t, n, i, r, s) {
2595
2453
  "stroke-linejoin": "round",
2596
2454
  "aria-hidden": "true"
2597
2455
  }, [
2598
- o("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" })
2456
+ o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2599
2457
  ])
2600
2458
  ], -1)),
2601
- o("span", Gn, v(s.t("onboarding.allConversations")), 1),
2602
- o("span", Yn, v(n.openThreads.length), 1),
2603
- t[8] || (t[8] = o("svg", {
2604
- class: "wm-onb__historyChev",
2605
- width: "14",
2606
- height: "14",
2459
+ o("span", Pn, v(l.title), 1),
2460
+ o("span", {
2461
+ class: "wm-onb__btn-dot",
2462
+ "aria-label": s.t("onboarding.unread")
2463
+ }, null, 8, Un)
2464
+ ], 8, Nn))), 128)),
2465
+ n.openThreads.length ? (c(), d("button", {
2466
+ key: 0,
2467
+ type: "button",
2468
+ class: "wm-onb__btn",
2469
+ onClick: t[1] || (t[1] = (l) => e.$emit("view-history"))
2470
+ }, [
2471
+ o("span", jn, [
2472
+ (c(), d("svg", Fn, [
2473
+ o("path", {
2474
+ d: s.iconPath("chat")
2475
+ }, null, 8, Dn)
2476
+ ]))
2477
+ ]),
2478
+ o("span", Hn, v(s.t("onboarding.allConversations")), 1),
2479
+ o("span", zn, v(n.openThreads.length), 1),
2480
+ t[6] || (t[6] = o("svg", {
2481
+ class: "wm-onb__btn-trail",
2482
+ width: "13",
2483
+ height: "13",
2607
2484
  viewBox: "0 0 24 24",
2608
2485
  fill: "none",
2609
2486
  stroke: "currentColor",
@@ -2614,15 +2491,15 @@ function Xn(e, t, n, i, r, s) {
2614
2491
  }, [
2615
2492
  o("path", { d: "M9 18l6-6-6-6" })
2616
2493
  ], -1))
2617
- ])) : w("", !0)
2618
- ])) : w("", !0)
2494
+ ])) : b("", !0)
2495
+ ])
2619
2496
  ]);
2620
2497
  }
2621
- const Jn = /* @__PURE__ */ R(yn, [["render", Xn], ["__scopeId", "data-v-f4df454a"]]), Qn = {
2498
+ const qn = /* @__PURE__ */ R(yn, [["render", $n], ["__scopeId", "data-v-8b4ef2e1"]]), Vn = {
2622
2499
  name: "WmHistory",
2623
- components: { AIAvatar: oe, HumanAvatar: _e },
2500
+ components: { AIAvatar: oe, HumanAvatar: Se },
2624
2501
  inject: {
2625
- t: { default: () => F() },
2502
+ t: { default: () => D() },
2626
2503
  wmLocale: { default: () => () => "fr" }
2627
2504
  },
2628
2505
  props: {
@@ -2642,7 +2519,7 @@ const Jn = /* @__PURE__ */ R(yn, [["render", Xn], ["__scopeId", "data-v-f4df454a
2642
2519
  },
2643
2520
  methods: {
2644
2521
  renderPreview(e) {
2645
- return ze(e);
2522
+ return ut(e);
2646
2523
  },
2647
2524
  avatarComponent(e) {
2648
2525
  var t;
@@ -2671,7 +2548,7 @@ const Jn = /* @__PURE__ */ R(yn, [["render", Xn], ["__scopeId", "data-v-f4df454a
2671
2548
  if (!e) return "";
2672
2549
  const t = new Date(e);
2673
2550
  if (Number.isNaN(t.getTime())) return "";
2674
- const n = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
2551
+ const n = ae(this.wmLocale()), i = /* @__PURE__ */ new Date();
2675
2552
  if (t.toDateString() === i.toDateString())
2676
2553
  return t.toLocaleTimeString(n, {
2677
2554
  hour: "2-digit",
@@ -2687,19 +2564,19 @@ const Jn = /* @__PURE__ */ R(yn, [["render", Xn], ["__scopeId", "data-v-f4df454a
2687
2564
  });
2688
2565
  }
2689
2566
  }
2690
- }, Zn = { class: "wm-hist" }, es = { class: "wm-hist__search" }, ts = ["placeholder", "aria-label"], ns = { class: "wm-hist__list" }, ss = ["onClick"], rs = {
2567
+ }, Kn = { class: "wm-hist" }, Wn = { class: "wm-hist__search" }, Gn = ["placeholder", "aria-label"], Yn = { class: "wm-hist__list" }, Xn = ["onClick"], Jn = {
2691
2568
  key: 0,
2692
2569
  class: "wm-hist__defaultAvatar"
2693
- }, is = ["aria-label"], as = { class: "wm-hist__thread-body" }, os = { class: "wm-hist__thread-title" }, ls = ["innerHTML"], cs = { class: "wm-hist__thread-meta" }, ds = {
2570
+ }, Qn = ["aria-label"], Zn = { class: "wm-hist__thread-body" }, es = { class: "wm-hist__thread-title" }, ts = ["innerHTML"], ns = { class: "wm-hist__thread-meta" }, ss = {
2694
2571
  key: 0,
2695
2572
  class: "wm-hist__thread-time"
2696
- }, us = {
2573
+ }, rs = {
2697
2574
  key: 0,
2698
2575
  class: "wm-hist__empty"
2699
2576
  };
2700
- function hs(e, t, n, i, r, s) {
2701
- return c(), d("div", Zn, [
2702
- o("div", es, [
2577
+ function is(e, t, n, i, r, s) {
2578
+ return c(), d("div", Kn, [
2579
+ o("div", Wn, [
2703
2580
  t[1] || (t[1] = o("span", { class: "wm-hist__searchIcon" }, [
2704
2581
  o("svg", {
2705
2582
  width: "13",
@@ -2720,35 +2597,35 @@ function hs(e, t, n, i, r, s) {
2720
2597
  type: "text",
2721
2598
  placeholder: s.t("onboarding.search"),
2722
2599
  "aria-label": s.t("onboarding.search")
2723
- }, null, 8, ts), [
2600
+ }, null, 8, Gn), [
2724
2601
  [te, r.query]
2725
2602
  ])
2726
2603
  ]),
2727
- o("div", ns, [
2728
- (c(!0), d(I, null, j(s.filteredThreads, (a) => (c(), d("button", {
2604
+ o("div", Yn, [
2605
+ (c(!0), d(E, null, F(s.filteredThreads, (a) => (c(), d("button", {
2729
2606
  key: a.id,
2730
2607
  type: "button",
2731
- class: L(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2608
+ class: I(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
2732
2609
  onClick: (l) => e.$emit("resume", a)
2733
2610
  }, [
2734
2611
  o("span", {
2735
- class: L(["wm-hist__thread-avatar", s.avatarWrapperClass(a)])
2612
+ class: I(["wm-hist__thread-avatar", s.avatarWrapperClass(a)])
2736
2613
  }, [
2737
- s.isDefaultAvatar(a) ? (c(), d("span", rs, [...t[2] || (t[2] = [
2614
+ s.isDefaultAvatar(a) ? (c(), d("span", Jn, [...t[2] || (t[2] = [
2738
2615
  o("svg", {
2739
- width: "20",
2740
- height: "20",
2616
+ width: "18",
2617
+ height: "18",
2741
2618
  viewBox: "0 0 24 24",
2742
2619
  fill: "none",
2743
2620
  stroke: "currentColor",
2744
- "stroke-width": "1.7",
2621
+ "stroke-width": "1.8",
2745
2622
  "stroke-linecap": "round",
2746
2623
  "stroke-linejoin": "round",
2747
2624
  "aria-hidden": "true"
2748
2625
  }, [
2749
- o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
2626
+ o("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" })
2750
2627
  ], -1)
2751
- ])])) : (c(), N(ke(s.avatarComponent(a)), De({
2628
+ ])])) : (c(), N(Ue(s.avatarComponent(a)), ze({
2752
2629
  key: 1,
2753
2630
  ref_for: !0
2754
2631
  }, s.avatarProps(a)), null, 16)),
@@ -2756,17 +2633,17 @@ function hs(e, t, n, i, r, s) {
2756
2633
  key: 2,
2757
2634
  class: "wm-hist__thread-dot",
2758
2635
  "aria-label": s.t("onboarding.unread")
2759
- }, null, 8, is)) : w("", !0)
2636
+ }, null, 8, Qn)) : b("", !0)
2760
2637
  ], 2),
2761
- o("span", as, [
2762
- o("span", os, v(a.title), 1),
2638
+ o("span", Zn, [
2639
+ o("span", es, v(a.title), 1),
2763
2640
  o("span", {
2764
2641
  class: "wm-hist__thread-preview",
2765
2642
  innerHTML: s.renderPreview(a.preview)
2766
- }, null, 8, ls)
2643
+ }, null, 8, ts)
2767
2644
  ]),
2768
- o("span", cs, [
2769
- s.formatTs(a._ts) ? (c(), d("span", ds, v(s.formatTs(a._ts)), 1)) : w("", !0),
2645
+ o("span", ns, [
2646
+ s.formatTs(a._ts) ? (c(), d("span", ss, v(s.formatTs(a._ts)), 1)) : b("", !0),
2770
2647
  t[3] || (t[3] = o("svg", {
2771
2648
  width: "14",
2772
2649
  height: "14",
@@ -2782,16 +2659,16 @@ function hs(e, t, n, i, r, s) {
2782
2659
  o("path", { d: "M5 12h14M13 5l7 7-7 7" })
2783
2660
  ], -1))
2784
2661
  ])
2785
- ], 10, ss))), 128)),
2786
- s.filteredThreads.length ? w("", !0) : (c(), d("div", us, v(r.query ? s.t("onboarding.noResults", { query: r.query }) : s.t("onboarding.noConversations")), 1))
2662
+ ], 10, Xn))), 128)),
2663
+ s.filteredThreads.length ? b("", !0) : (c(), d("div", rs, v(r.query ? s.t("onboarding.noResults", { query: r.query }) : s.t("onboarding.noConversations")), 1))
2787
2664
  ])
2788
2665
  ]);
2789
2666
  }
2790
- const ms = /* @__PURE__ */ R(Qn, [["render", hs], ["__scopeId", "data-v-60929fb5"]]);
2791
- function fs(e) {
2667
+ const as = /* @__PURE__ */ R(Vn, [["render", is], ["__scopeId", "data-v-0d31869d"]]);
2668
+ function os(e) {
2792
2669
  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();
2793
2670
  }
2794
- const gs = {
2671
+ const ls = {
2795
2672
  name: "WmActionResult",
2796
2673
  props: {
2797
2674
  state: { type: String, default: "success" },
@@ -2801,13 +2678,13 @@ const gs = {
2801
2678
  },
2802
2679
  computed: {
2803
2680
  detailText() {
2804
- return fs(this.detail);
2681
+ return os(this.detail);
2805
2682
  }
2806
2683
  }
2807
- }, _s = {
2684
+ }, cs = {
2808
2685
  class: "wm-result__icon",
2809
2686
  "aria-hidden": "true"
2810
- }, ps = {
2687
+ }, ds = {
2811
2688
  key: 0,
2812
2689
  width: "11",
2813
2690
  height: "11",
@@ -2817,7 +2694,7 @@ const gs = {
2817
2694
  "stroke-width": "2.8",
2818
2695
  "stroke-linecap": "round",
2819
2696
  "stroke-linejoin": "round"
2820
- }, vs = {
2697
+ }, us = {
2821
2698
  key: 1,
2822
2699
  width: "11",
2823
2700
  height: "11",
@@ -2827,7 +2704,7 @@ const gs = {
2827
2704
  "stroke-width": "2.6",
2828
2705
  "stroke-linecap": "round",
2829
2706
  "stroke-linejoin": "round"
2830
- }, ys = {
2707
+ }, hs = {
2831
2708
  key: 2,
2832
2709
  width: "11",
2833
2710
  height: "11",
@@ -2837,7 +2714,7 @@ const gs = {
2837
2714
  "stroke-width": "2.4",
2838
2715
  "stroke-linecap": "round",
2839
2716
  "stroke-linejoin": "round"
2840
- }, ws = {
2717
+ }, ms = {
2841
2718
  key: 3,
2842
2719
  width: "12",
2843
2720
  height: "12",
@@ -2847,24 +2724,24 @@ const gs = {
2847
2724
  "stroke-width": "2.2",
2848
2725
  "stroke-linecap": "round",
2849
2726
  "stroke-linejoin": "round"
2850
- }, bs = { class: "wm-result__body" }, ks = { class: "wm-result__label" }, Cs = { class: "wm-result__detail" };
2851
- function As(e, t, n, i, r, s) {
2727
+ }, fs = { class: "wm-result__body" }, gs = { class: "wm-result__label" }, _s = { class: "wm-result__detail" };
2728
+ function ps(e, t, n, i, r, s) {
2852
2729
  return c(), d("div", {
2853
- class: L(["wm-result", `wm-result--${n.state}`])
2730
+ class: I(["wm-result", `wm-result--${n.state}`])
2854
2731
  }, [
2855
- o("span", _s, [
2856
- n.state === "success" ? (c(), d("svg", ps, [...t[0] || (t[0] = [
2732
+ o("span", cs, [
2733
+ n.state === "success" ? (c(), d("svg", ds, [...t[0] || (t[0] = [
2857
2734
  o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
2858
- ])])) : n.state === "rejected" ? (c(), d("svg", vs, [...t[1] || (t[1] = [
2735
+ ])])) : n.state === "rejected" ? (c(), d("svg", us, [...t[1] || (t[1] = [
2859
2736
  o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
2860
- ])])) : n.state === "awaiting" ? (c(), d("svg", ys, [...t[2] || (t[2] = [
2737
+ ])])) : n.state === "awaiting" ? (c(), d("svg", hs, [...t[2] || (t[2] = [
2861
2738
  o("circle", {
2862
2739
  cx: "12",
2863
2740
  cy: "12",
2864
2741
  r: "10"
2865
2742
  }, null, -1),
2866
2743
  o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
2867
- ])])) : (c(), d("svg", ws, [...t[3] || (t[3] = [
2744
+ ])])) : (c(), d("svg", ms, [...t[3] || (t[3] = [
2868
2745
  o("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
2869
2746
  o("line", {
2870
2747
  x1: "12",
@@ -2880,24 +2757,24 @@ function As(e, t, n, i, r, s) {
2880
2757
  }, null, -1)
2881
2758
  ])]))
2882
2759
  ]),
2883
- o("span", bs, [
2884
- o("span", ks, v(n.label), 1),
2885
- s.detailText ? (c(), d(I, { key: 0 }, [
2760
+ o("span", fs, [
2761
+ o("span", gs, v(n.label), 1),
2762
+ s.detailText ? (c(), d(E, { key: 0 }, [
2886
2763
  t[4] || (t[4] = o("span", {
2887
2764
  class: "wm-result__sep",
2888
2765
  "aria-hidden": "true"
2889
2766
  }, " · ", -1)),
2890
- o("span", Cs, v(s.detailText), 1)
2891
- ], 64)) : w("", !0)
2767
+ o("span", _s, v(s.detailText), 1)
2768
+ ], 64)) : b("", !0)
2892
2769
  ])
2893
2770
  ], 2);
2894
2771
  }
2895
- const Ss = /* @__PURE__ */ R(gs, [["render", As], ["__scopeId", "data-v-7284acd0"]]), Ms = {
2772
+ const vs = /* @__PURE__ */ R(ls, [["render", ps], ["__scopeId", "data-v-7284acd0"]]), ys = {
2896
2773
  name: "WmArtifactFormResponse",
2897
2774
  inject: {
2898
2775
  // Translator shared by the Messenger shell; French fallback when
2899
2776
  // the component is used standalone.
2900
- t: { default: () => F() }
2777
+ t: { default: () => D() }
2901
2778
  },
2902
2779
  props: {
2903
2780
  data: { type: Object, required: !0 }
@@ -2908,12 +2785,12 @@ const Ss = /* @__PURE__ */ R(gs, [["render", As], ["__scopeId", "data-v-7284acd0
2908
2785
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
2909
2786
  }
2910
2787
  }
2911
- }, Ts = { class: "wm-art wm-art--formResponse" }, xs = { class: "wm-art__head" }, Os = { class: "wm-art__title" }, Ls = { class: "wm-art__badge wm-art__badge--success" }, Is = { class: "wm-art__body" }, Es = { class: "wm-art__fieldLabel" };
2912
- function Bs(e, t, n, i, r, s) {
2913
- return c(), d("div", Ts, [
2914
- o("div", xs, [
2915
- o("div", Os, v(n.data.title || s.t("form.title")), 1),
2916
- o("span", Ls, [
2788
+ }, ws = { class: "wm-art wm-art--formResponse" }, bs = { class: "wm-art__head" }, ks = { class: "wm-art__title" }, Cs = { class: "wm-art__badge wm-art__badge--success" }, As = { class: "wm-art__body" }, Ss = { class: "wm-art__fieldLabel" };
2789
+ function Ms(e, t, n, i, r, s) {
2790
+ return c(), d("div", ws, [
2791
+ o("div", bs, [
2792
+ o("div", ks, v(n.data.title || s.t("form.title")), 1),
2793
+ o("span", Cs, [
2917
2794
  t[0] || (t[0] = o("svg", {
2918
2795
  width: "11",
2919
2796
  height: "11",
@@ -2927,17 +2804,17 @@ function Bs(e, t, n, i, r, s) {
2927
2804
  }, [
2928
2805
  o("polyline", { points: "20 6 9 17 4 12" })
2929
2806
  ], -1)),
2930
- Ce(" " + v(s.t("form.sent")), 1)
2807
+ be(" " + v(s.t("form.sent")), 1)
2931
2808
  ])
2932
2809
  ]),
2933
- o("div", Is, [
2934
- (c(!0), d(I, null, j(s.fields, (a, l) => (c(), d("div", {
2810
+ o("div", As, [
2811
+ (c(!0), d(E, null, F(s.fields, (a, l) => (c(), d("div", {
2935
2812
  key: l,
2936
2813
  class: "wm-art__field"
2937
2814
  }, [
2938
- o("div", Es, v(a.label), 1),
2815
+ o("div", Ss, v(a.label), 1),
2939
2816
  o("div", {
2940
- class: L([
2817
+ class: I([
2941
2818
  "wm-art__fieldValue",
2942
2819
  { "wm-art__fieldValue--multi": a.multiline }
2943
2820
  ])
@@ -2946,7 +2823,7 @@ function Bs(e, t, n, i, r, s) {
2946
2823
  ])
2947
2824
  ]);
2948
2825
  }
2949
- const Rs = /* @__PURE__ */ R(Ms, [["render", Bs], ["__scopeId", "data-v-713aecf1"]]), Ns = {
2826
+ const Ts = /* @__PURE__ */ R(ys, [["render", Ms], ["__scopeId", "data-v-713aecf1"]]), xs = {
2950
2827
  name: "WmArtifactInfoCard",
2951
2828
  props: {
2952
2829
  data: { type: Object, required: !0 }
@@ -2961,60 +2838,60 @@ const Rs = /* @__PURE__ */ R(Ms, [["render", Bs], ["__scopeId", "data-v-713aecf1
2961
2838
  return !!((e = this.data) != null && e.body) || this.fields.length > 0;
2962
2839
  }
2963
2840
  }
2964
- }, Ps = { class: "wm-art wm-art--infoCard" }, Us = {
2841
+ }, Os = { class: "wm-art wm-art--infoCard" }, Is = {
2965
2842
  key: 0,
2966
2843
  class: "wm-art__image"
2967
- }, Ds = ["src", "alt"], js = { class: "wm-art__head" }, Fs = { class: "wm-art__headMain" }, Hs = { class: "wm-art__title" }, zs = {
2844
+ }, Es = ["src", "alt"], Ls = { class: "wm-art__head" }, Bs = { class: "wm-art__headMain" }, Rs = { class: "wm-art__title" }, Ns = {
2968
2845
  key: 0,
2969
2846
  class: "wm-art__subtitle"
2970
- }, qs = {
2847
+ }, Ps = {
2971
2848
  key: 1,
2972
2849
  class: "wm-art__body"
2973
- }, Vs = {
2850
+ }, Us = {
2974
2851
  key: 0,
2975
2852
  class: "wm-art__text"
2976
- }, $s = { class: "wm-art__fieldLabel" };
2977
- function Ks(e, t, n, i, r, s) {
2978
- return c(), d("div", Ps, [
2979
- n.data.image_url ? (c(), d("figure", Us, [
2853
+ }, js = { class: "wm-art__fieldLabel" };
2854
+ function Fs(e, t, n, i, r, s) {
2855
+ return c(), d("div", Os, [
2856
+ n.data.image_url ? (c(), d("figure", Is, [
2980
2857
  o("img", {
2981
2858
  src: n.data.image_url,
2982
2859
  alt: n.data.title || "",
2983
2860
  loading: "lazy"
2984
- }, null, 8, Ds)
2985
- ])) : w("", !0),
2986
- o("div", js, [
2987
- o("div", Fs, [
2988
- o("div", Hs, v(n.data.title), 1),
2989
- n.data.subtitle ? (c(), d("div", zs, v(n.data.subtitle), 1)) : w("", !0)
2861
+ }, null, 8, Es)
2862
+ ])) : b("", !0),
2863
+ o("div", Ls, [
2864
+ o("div", Bs, [
2865
+ o("div", Rs, v(n.data.title), 1),
2866
+ n.data.subtitle ? (c(), d("div", Ns, v(n.data.subtitle), 1)) : b("", !0)
2990
2867
  ]),
2991
2868
  n.data.badge && n.data.badge.label ? (c(), d("span", {
2992
2869
  key: 0,
2993
- class: L([
2870
+ class: I([
2994
2871
  "wm-art__badge",
2995
2872
  `wm-art__badge--${n.data.badge.tone || "neutral"}`
2996
2873
  ])
2997
- }, v(n.data.badge.label), 3)) : w("", !0)
2874
+ }, v(n.data.badge.label), 3)) : b("", !0)
2998
2875
  ]),
2999
- s.hasBody ? (c(), d("div", qs, [
3000
- n.data.body ? (c(), d("div", Vs, v(n.data.body), 1)) : w("", !0),
3001
- s.fields.length ? (c(!0), d(I, { key: 1 }, j(s.fields, (a, l) => (c(), d("div", {
2876
+ s.hasBody ? (c(), d("div", Ps, [
2877
+ n.data.body ? (c(), d("div", Us, v(n.data.body), 1)) : b("", !0),
2878
+ s.fields.length ? (c(!0), d(E, { key: 1 }, F(s.fields, (a, l) => (c(), d("div", {
3002
2879
  key: l,
3003
2880
  class: "wm-art__field"
3004
2881
  }, [
3005
- o("div", $s, v(a.label), 1),
2882
+ o("div", js, v(a.label), 1),
3006
2883
  o("div", {
3007
- class: L([
2884
+ class: I([
3008
2885
  "wm-art__fieldValue",
3009
2886
  { "wm-art__fieldValue--multi": a.multiline }
3010
2887
  ])
3011
2888
  }, v(a.value), 3)
3012
- ]))), 128)) : w("", !0)
3013
- ])) : w("", !0)
2889
+ ]))), 128)) : b("", !0)
2890
+ ])) : b("", !0)
3014
2891
  ]);
3015
2892
  }
3016
- const Ws = /* @__PURE__ */ R(Ns, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
3017
- function Gs(e, t, n) {
2893
+ const Ds = /* @__PURE__ */ R(xs, [["render", Fs], ["__scopeId", "data-v-7eae0e4a"]]);
2894
+ function Hs(e, t, n) {
3018
2895
  if (!e) return "";
3019
2896
  const i = new Date(e);
3020
2897
  if (Number.isNaN(i.getTime())) return e;
@@ -3028,12 +2905,12 @@ function Gs(e, t, n) {
3028
2905
  });
3029
2906
  return `${r}${n}${s}`;
3030
2907
  }
3031
- const Ys = {
2908
+ const zs = {
3032
2909
  name: "WmArtifactTicket",
3033
2910
  inject: {
3034
2911
  // Translator + resolved-language getter shared by the Messenger
3035
2912
  // shell. Fall back to French wording when used standalone.
3036
- t: { default: () => F() },
2913
+ t: { default: () => D() },
3037
2914
  wmLocale: { default: () => () => "fr" }
3038
2915
  },
3039
2916
  props: {
@@ -3046,9 +2923,9 @@ const Ys = {
3046
2923
  },
3047
2924
  formattedDate() {
3048
2925
  var e;
3049
- return Gs(
2926
+ return Hs(
3050
2927
  (e = this.data) == null ? void 0 : e.created_at,
3051
- ne(this.wmLocale()),
2928
+ ae(this.wmLocale()),
3052
2929
  this.t("ticket.dateAt")
3053
2930
  );
3054
2931
  }
@@ -3074,13 +2951,13 @@ const Ys = {
3074
2951
  return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
3075
2952
  }
3076
2953
  }
3077
- }, Xs = { class: "wm-art wm-art--ticket" }, Js = { class: "wm-art__head wm-tk__head" }, Qs = { class: "wm-art__title wm-tk__title" }, Zs = { class: "wm-tk__sub" }, er = { class: "wm-tk__ref" }, tr = {
2954
+ }, $s = { class: "wm-art wm-art--ticket" }, qs = { class: "wm-art__head wm-tk__head" }, Vs = { class: "wm-art__title wm-tk__title" }, Ks = { class: "wm-tk__sub" }, Ws = { class: "wm-tk__ref" }, Gs = {
3078
2955
  key: 0,
3079
2956
  class: "wm-tk__text"
3080
- }, nr = {
2957
+ }, Ys = {
3081
2958
  key: 0,
3082
2959
  class: "wm-art__body"
3083
- }, sr = { class: "wm-art__fieldLabel" }, rr = ["data-level"], ir = {
2960
+ }, Xs = { class: "wm-art__fieldLabel" }, Js = ["data-level"], Qs = {
3084
2961
  key: 1,
3085
2962
  class: "wm-tk__date",
3086
2963
  width: "12",
@@ -3092,16 +2969,16 @@ const Ys = {
3092
2969
  "stroke-linecap": "round",
3093
2970
  "stroke-linejoin": "round",
3094
2971
  "aria-hidden": "true"
3095
- }, ar = {
2972
+ }, Zs = {
3096
2973
  key: 1,
3097
2974
  class: "wm-art__footer wm-tk__footer"
3098
2975
  };
3099
- function or(e, t, n, i, r, s) {
3100
- return c(), d("div", Xs, [
3101
- o("div", Js, [
3102
- o("div", Qs, v(n.data.title), 1),
3103
- o("div", Zs, [
3104
- o("div", er, [
2976
+ function er(e, t, n, i, r, s) {
2977
+ return c(), d("div", $s, [
2978
+ o("div", qs, [
2979
+ o("div", Vs, v(n.data.title), 1),
2980
+ o("div", Ks, [
2981
+ o("div", Ws, [
3105
2982
  t[0] || (t[0] = o("svg", {
3106
2983
  width: "11",
3107
2984
  height: "11",
@@ -3119,7 +2996,7 @@ function or(e, t, n, i, r, s) {
3119
2996
  o("span", null, v(n.data.reference), 1)
3120
2997
  ]),
3121
2998
  o("span", {
3122
- class: L([
2999
+ class: I([
3123
3000
  "wm-art__badge",
3124
3001
  "wm-tk__badge",
3125
3002
  `wm-art__badge--${n.data.status.tone || "neutral"}`
@@ -3129,19 +3006,19 @@ function or(e, t, n, i, r, s) {
3129
3006
  class: "wm-tk__dot",
3130
3007
  "aria-hidden": "true"
3131
3008
  }, null, -1)),
3132
- Ce(" " + v(n.data.status.label), 1)
3009
+ be(" " + v(n.data.status.label), 1)
3133
3010
  ], 2)
3134
3011
  ]),
3135
- n.data.body ? (c(), d("div", tr, v(n.data.body), 1)) : w("", !0)
3012
+ n.data.body ? (c(), d("div", Gs, v(n.data.body), 1)) : b("", !0)
3136
3013
  ]),
3137
- s.fields.length ? (c(), d("div", nr, [
3138
- (c(!0), d(I, null, j(s.fields, (a, l) => (c(), d("div", {
3014
+ s.fields.length ? (c(), d("div", Ys, [
3015
+ (c(!0), d(E, null, F(s.fields, (a, l) => (c(), d("div", {
3139
3016
  key: l,
3140
3017
  class: "wm-art__field"
3141
3018
  }, [
3142
- o("div", sr, v(a.label), 1),
3019
+ o("div", Xs, v(a.label), 1),
3143
3020
  o("div", {
3144
- class: L([
3021
+ class: I([
3145
3022
  "wm-art__fieldValue",
3146
3023
  { "wm-art__fieldValue--multi": a.multiline }
3147
3024
  ])
@@ -3176,7 +3053,7 @@ function or(e, t, n, i, r, s) {
3176
3053
  height: "9",
3177
3054
  rx: "0.5"
3178
3055
  }, null, -1)
3179
- ])], 8, rr)) : s.isDate(a.label) ? (c(), d("svg", ir, [...t[3] || (t[3] = [
3056
+ ])], 8, Js)) : s.isDate(a.label) ? (c(), d("svg", Qs, [...t[3] || (t[3] = [
3180
3057
  o("rect", {
3181
3058
  x: "3",
3182
3059
  y: "4",
@@ -3185,12 +3062,12 @@ function or(e, t, n, i, r, s) {
3185
3062
  rx: "2"
3186
3063
  }, null, -1),
3187
3064
  o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3188
- ])])) : w("", !0),
3065
+ ])])) : b("", !0),
3189
3066
  o("span", null, v(a.value), 1)
3190
3067
  ], 2)
3191
3068
  ]))), 128))
3192
- ])) : w("", !0),
3193
- n.data.created_at ? (c(), d("div", ar, [
3069
+ ])) : b("", !0),
3070
+ n.data.created_at ? (c(), d("div", Zs, [
3194
3071
  t[4] || (t[4] = o("svg", {
3195
3072
  width: "11",
3196
3073
  height: "11",
@@ -3212,14 +3089,14 @@ function or(e, t, n, i, r, s) {
3212
3089
  o("path", { d: "M16 2v4M8 2v4M3 10h18" })
3213
3090
  ], -1)),
3214
3091
  o("span", null, v(s.formattedDate), 1)
3215
- ])) : w("", !0)
3092
+ ])) : b("", !0)
3216
3093
  ]);
3217
3094
  }
3218
- const lr = /* @__PURE__ */ R(Ys, [["render", or], ["__scopeId", "data-v-5f30c914"]]), cr = {
3219
- form_response: Rs,
3220
- info_card: Ws,
3221
- ticket: lr
3222
- }, dr = {
3095
+ const tr = /* @__PURE__ */ R(zs, [["render", er], ["__scopeId", "data-v-5f30c914"]]), nr = {
3096
+ form_response: Ts,
3097
+ info_card: Ds,
3098
+ ticket: tr
3099
+ }, sr = {
3223
3100
  name: "WmArtifactRenderer",
3224
3101
  props: {
3225
3102
  // Forme : { kind: string, data: any } (le `data` est validé
@@ -3230,23 +3107,23 @@ const lr = /* @__PURE__ */ R(Ys, [["render", or], ["__scopeId", "data-v-5f30c914
3230
3107
  component() {
3231
3108
  var t;
3232
3109
  const e = (t = this.artifact) == null ? void 0 : t.kind;
3233
- return e && cr[e] || null;
3110
+ return e && nr[e] || null;
3234
3111
  }
3235
3112
  }
3236
3113
  };
3237
- function ur(e, t, n, i, r, s) {
3238
- return s.component ? (c(), N(ke(s.component), {
3114
+ function rr(e, t, n, i, r, s) {
3115
+ return s.component ? (c(), N(Ue(s.component), {
3239
3116
  key: 0,
3240
3117
  data: n.artifact.data
3241
- }, null, 8, ["data"])) : w("", !0);
3118
+ }, null, 8, ["data"])) : b("", !0);
3242
3119
  }
3243
- const hr = /* @__PURE__ */ R(dr, [["render", ur]]), mr = {
3120
+ const ir = /* @__PURE__ */ R(sr, [["render", rr]]), ar = {
3244
3121
  name: "WmAttachmentPreview",
3245
3122
  inject: {
3246
3123
  signAttachmentFn: { default: null },
3247
3124
  // Translator shared by the Messenger shell; French fallback when
3248
3125
  // the component is used standalone.
3249
- t: { default: () => F() }
3126
+ t: { default: () => D() }
3250
3127
  },
3251
3128
  props: {
3252
3129
  attachment: { type: Object, required: !0 }
@@ -3308,17 +3185,17 @@ const hr = /* @__PURE__ */ R(dr, [["render", ur]]), mr = {
3308
3185
  this.safeHref === "#" && e.preventDefault();
3309
3186
  }
3310
3187
  }
3311
- }, fr = ["href"], gr = ["src", "alt"], _r = ["src"], pr = ["src"], vr = ["href", "download"], yr = { class: "wm-att__main" }, wr = { class: "wm-att__name" }, br = {
3188
+ }, or = ["href"], lr = ["src", "alt"], cr = ["src"], dr = ["src"], ur = ["href", "download"], hr = { class: "wm-att__main" }, mr = { class: "wm-att__name" }, fr = {
3312
3189
  key: 0,
3313
3190
  class: "wm-att__meta"
3314
- }, kr = {
3191
+ }, gr = {
3315
3192
  key: 0,
3316
3193
  class: "wm-att__spin",
3317
3194
  "aria-hidden": "true"
3318
3195
  };
3319
- function Cr(e, t, n, i, r, s) {
3196
+ function _r(e, t, n, i, r, s) {
3320
3197
  return c(), d("div", {
3321
- class: L(["wm-att", ["wm-att--" + (s.kind || "file")]])
3198
+ class: I(["wm-att", ["wm-att--" + (s.kind || "file")]])
3322
3199
  }, [
3323
3200
  s.kind === "image" && r.url ? (c(), d("a", {
3324
3201
  key: 0,
@@ -3331,18 +3208,18 @@ function Cr(e, t, n, i, r, s) {
3331
3208
  src: r.url,
3332
3209
  alt: s.displayName,
3333
3210
  loading: "lazy"
3334
- }, null, 8, gr)
3335
- ], 8, fr)) : s.kind === "audio" && r.url ? (c(), d("audio", {
3211
+ }, null, 8, lr)
3212
+ ], 8, or)) : s.kind === "audio" && r.url ? (c(), d("audio", {
3336
3213
  key: 1,
3337
3214
  src: r.url,
3338
3215
  controls: "",
3339
3216
  preload: "metadata"
3340
- }, null, 8, _r)) : s.kind === "video" && r.url ? (c(), d("video", {
3217
+ }, null, 8, cr)) : s.kind === "video" && r.url ? (c(), d("video", {
3341
3218
  key: 2,
3342
3219
  src: r.url,
3343
3220
  controls: "",
3344
3221
  preload: "metadata"
3345
- }, null, 8, pr)) : (c(), d("a", {
3222
+ }, null, 8, dr)) : (c(), d("a", {
3346
3223
  key: 3,
3347
3224
  class: "wm-att__file",
3348
3225
  href: s.safeHref,
@@ -3367,15 +3244,15 @@ function Cr(e, t, n, i, r, s) {
3367
3244
  o("path", { d: "M14 2v6h6" })
3368
3245
  ])
3369
3246
  ], -1)),
3370
- o("span", yr, [
3371
- o("span", wr, v(s.displayName), 1),
3372
- s.sizeLabel ? (c(), d("span", br, v(s.sizeLabel), 1)) : w("", !0)
3247
+ o("span", hr, [
3248
+ o("span", mr, v(s.displayName), 1),
3249
+ s.sizeLabel ? (c(), d("span", fr, v(s.sizeLabel), 1)) : b("", !0)
3373
3250
  ]),
3374
- r.loading ? (c(), d("span", kr)) : w("", !0)
3375
- ], 8, vr))
3251
+ r.loading ? (c(), d("span", gr)) : b("", !0)
3252
+ ], 8, ur))
3376
3253
  ], 2);
3377
3254
  }
3378
- const Ar = /* @__PURE__ */ R(mr, [["render", Cr], ["__scopeId", "data-v-0c877a62"]]), Sr = {
3255
+ const pr = /* @__PURE__ */ R(ar, [["render", _r], ["__scopeId", "data-v-0c877a62"]]), vr = {
3379
3256
  name: "WmBubble",
3380
3257
  props: {
3381
3258
  role: { type: String, default: "ai" },
@@ -3387,50 +3264,50 @@ const Ar = /* @__PURE__ */ R(mr, [["render", Cr], ["__scopeId", "data-v-0c877a62
3387
3264
  return ht(this.text);
3388
3265
  }
3389
3266
  }
3390
- }, Mr = ["innerHTML"];
3391
- function Tr(e, t, n, i, r, s) {
3267
+ }, yr = ["innerHTML"];
3268
+ function wr(e, t, n, i, r, s) {
3392
3269
  return c(), d("div", {
3393
- class: L(["wm-bubble", "wm-bubble--" + n.role])
3270
+ class: I(["wm-bubble", "wm-bubble--" + n.role])
3394
3271
  }, [
3395
3272
  $e(e.$slots, "default", {}, () => [
3396
- o("span", { innerHTML: s.rendered }, null, 8, Mr)
3273
+ o("span", { innerHTML: s.rendered }, null, 8, yr)
3397
3274
  ], !0)
3398
3275
  ], 2);
3399
3276
  }
3400
- const xr = /* @__PURE__ */ R(Sr, [["render", Tr], ["__scopeId", "data-v-7ab13147"]]), Or = { name: "WmTyping" }, Lr = { class: "wm-typing" };
3401
- function Ir(e, t, n, i, r, s) {
3402
- return c(), d("div", Lr, [...t[0] || (t[0] = [
3277
+ const br = /* @__PURE__ */ R(vr, [["render", wr], ["__scopeId", "data-v-7ab13147"]]), kr = { name: "WmTyping" }, Cr = { class: "wm-typing" };
3278
+ function Ar(e, t, n, i, r, s) {
3279
+ return c(), d("div", Cr, [...t[0] || (t[0] = [
3403
3280
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
3404
3281
  o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
3405
3282
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
3406
3283
  ])]);
3407
3284
  }
3408
- const Er = /* @__PURE__ */ R(Or, [["render", Ir], ["__scopeId", "data-v-df2447fd"]]);
3285
+ const Sr = /* @__PURE__ */ R(kr, [["render", Ar], ["__scopeId", "data-v-df2447fd"]]);
3409
3286
  function ee(e) {
3410
3287
  return e ? e.client_msg_id || e.id : "";
3411
3288
  }
3412
- const Br = {
3289
+ const Mr = {
3413
3290
  transferred_to_human: "system.transferredToHuman",
3414
3291
  assigned: "system.assigned",
3415
3292
  unassigned: "system.unassigned",
3416
3293
  resolved: "system.resolved",
3417
3294
  reopened: "system.reopened",
3418
3295
  idle: "system.idle"
3419
- }, Rr = 80, Nr = 200, Pr = {
3296
+ }, Tr = 80, xr = 200, Or = {
3420
3297
  name: "WmMessageList",
3421
3298
  components: {
3422
3299
  AIAvatar: oe,
3423
- HumanAvatar: _e,
3424
- Bubble: xr,
3425
- Typing: Er,
3426
- ActionResult: Ss,
3427
- AttachmentPreview: Ar,
3428
- ArtifactRenderer: hr
3300
+ HumanAvatar: Se,
3301
+ Bubble: br,
3302
+ Typing: Sr,
3303
+ ActionResult: vs,
3304
+ AttachmentPreview: pr,
3305
+ ArtifactRenderer: ir
3429
3306
  },
3430
3307
  inject: {
3431
3308
  // Translator + resolved-language getter shared by the Messenger
3432
3309
  // shell. Fall back to French wording when used standalone.
3433
- t: { default: () => F() },
3310
+ t: { default: () => D() },
3434
3311
  wmLocale: { default: () => () => "fr" }
3435
3312
  },
3436
3313
  props: {
@@ -3500,8 +3377,8 @@ const Br = {
3500
3377
  const l = this.roleOf(a);
3501
3378
  if (l === "system") {
3502
3379
  if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3503
- const b = e[e.length - 1];
3504
- b && b.role === "ai" ? b.messages.push(a) : e.push({
3380
+ const w = e[e.length - 1];
3381
+ w && w.role === "ai" ? w.messages.push(a) : e.push({
3505
3382
  key: `g-${ee(a)}`,
3506
3383
  role: "ai",
3507
3384
  agentName: "",
@@ -3615,11 +3492,11 @@ const Br = {
3615
3492
  return `g-${n}`;
3616
3493
  },
3617
3494
  isAtBottom(e) {
3618
- return e.scrollHeight - e.scrollTop - e.clientHeight <= Rr;
3495
+ return e.scrollHeight - e.scrollTop - e.clientHeight <= Tr;
3619
3496
  },
3620
3497
  onScroll() {
3621
3498
  const e = this.$refs.scrollEl;
3622
- e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Nr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3499
+ e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= xr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
3623
3500
  },
3624
3501
  // Capture pre-patch scroll state and restore it on the next tick.
3625
3502
  //
@@ -3819,10 +3696,10 @@ const Br = {
3819
3696
  // adjacent à une `bubble`) : mon coin déborde le voisin et
3820
3697
  // doit garder son arrondi.
3821
3698
  cornersFor(e, t) {
3822
- var Q, se, re;
3823
- const n = e.items, i = (Q = n[t]) == null ? void 0 : Q.kind, r = (se = n[t - 1]) == null ? void 0 : se.kind, s = (re = n[t + 1]) == null ? void 0 : re.kind, a = e.role === "user", l = 14, _ = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = (W, ie, J) => W != null && x != null ? W + q >= x : ie === J || ie === "card" && J === "bubble";
3824
- let U = l, D = l, P = l, K = l;
3825
- return a ? (k && (D = _), (b || !s) && (P = _), k && M(E, k, i == null ? void 0 : i.top) && (U = _), b && M(A, b, i == null ? void 0 : i.bottom) && (K = _)) : (k && (U = _), (b || !s) && (K = _), k && M(E, k, i == null ? void 0 : i.top) && (D = _), b && M(A, b, i == null ? void 0 : i.bottom) && (P = _)), { tl: U, tr: D, br: P, bl: K };
3699
+ var Q, ne, se;
3700
+ const n = e.items, i = (Q = n[t]) == null ? void 0 : Q.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (se = n[t + 1]) == null ? void 0 : se.kind, a = e.role === "user", l = 14, _ = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, x = this.widthByKey[this.rowKeyOf(e, t)], L = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], $ = 0.5, M = (W, re, J) => W != null && x != null ? W + $ >= x : re === J || re === "card" && J === "bubble";
3701
+ let U = l, j = l, P = l, K = l;
3702
+ return a ? (k && (j = _), (w || !s) && (P = _), k && M(L, k, i == null ? void 0 : i.top) && (U = _), w && M(A, w, i == null ? void 0 : i.bottom) && (K = _)) : (k && (U = _), (w || !s) && (K = _), k && M(L, k, i == null ? void 0 : i.top) && (j = _), w && M(A, w, i == null ? void 0 : i.bottom) && (P = _)), { tl: U, tr: j, br: P, bl: K };
3826
3703
  },
3827
3704
  // Inline style emitting the four corner CSS variables. Set on
3828
3705
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -3898,9 +3775,9 @@ const Br = {
3898
3775
  timeOf(e) {
3899
3776
  if (!(e != null && e.created_at)) return "";
3900
3777
  try {
3901
- return be(
3778
+ return we(
3902
3779
  new Date(e.created_at),
3903
- ne(this.wmLocale())
3780
+ ae(this.wmLocale())
3904
3781
  );
3905
3782
  } catch {
3906
3783
  return "";
@@ -3910,9 +3787,9 @@ const Br = {
3910
3787
  const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
3911
3788
  if (!(n != null && n.created_at)) return "";
3912
3789
  try {
3913
- return be(
3790
+ return we(
3914
3791
  new Date(n.created_at),
3915
- ne(this.wmLocale())
3792
+ ae(this.wmLocale())
3916
3793
  );
3917
3794
  } catch {
3918
3795
  return "";
@@ -3957,7 +3834,7 @@ const Br = {
3957
3834
  },
3958
3835
  systemLabel(e) {
3959
3836
  var r, s, a;
3960
- const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = Br[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
3837
+ const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = Mr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
3961
3838
  return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
3962
3839
  },
3963
3840
  scrollToBottom() {
@@ -3972,82 +3849,82 @@ const Br = {
3972
3849
  e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
3973
3850
  }
3974
3851
  }
3975
- }, Ur = { class: "wm-list__wrap" }, Dr = {
3852
+ }, Ir = { class: "wm-list__wrap" }, Er = {
3976
3853
  key: 0,
3977
3854
  class: "wm-list__loadMore",
3978
3855
  role: "status",
3979
3856
  "aria-live": "polite"
3980
- }, jr = { class: "wm-list__loadMore-lbl" }, Fr = {
3857
+ }, Lr = { class: "wm-list__loadMore-lbl" }, Br = {
3981
3858
  key: 1,
3982
3859
  class: "wm-list__historyEnd"
3983
- }, Hr = {
3860
+ }, Rr = {
3984
3861
  key: 2,
3985
3862
  class: "wm-list__sep"
3986
- }, zr = { class: "wm-list__sep-label" }, qr = {
3863
+ }, Nr = { class: "wm-list__sep-label" }, Pr = {
3987
3864
  key: 0,
3988
3865
  class: "wm-list__sep wm-list__sep--unread"
3989
- }, Vr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, $r = {
3866
+ }, Ur = { class: "wm-list__sep-label wm-list__sep-label--unread" }, jr = {
3990
3867
  key: 0,
3991
3868
  class: "wm-list__sysep"
3992
- }, Kr = { class: "wm-list__sysep-label" }, Wr = ["data-row-key", "onPointerdown"], Gr = {
3869
+ }, Fr = { class: "wm-list__sysep-label" }, Dr = ["data-row-key", "onPointerdown"], Hr = {
3993
3870
  key: 0,
3994
3871
  class: "wm-list__avatarSlot"
3995
- }, Yr = {
3872
+ }, zr = {
3996
3873
  key: 5,
3997
3874
  class: "wm-list__body"
3998
- }, Xr = { key: 0 }, Jr = {
3875
+ }, $r = { key: 0 }, qr = {
3999
3876
  key: 1,
4000
3877
  "aria-hidden": "true"
4001
- }, Qr = { key: 2 }, Zr = { key: 0 }, ei = {
3878
+ }, Vr = { key: 2 }, Kr = { key: 0 }, Wr = {
4002
3879
  key: 1,
4003
3880
  "aria-hidden": "true"
4004
- }, ti = { key: 2 }, ni = {
3881
+ }, Gr = { key: 2 }, Yr = {
4005
3882
  key: 3,
4006
3883
  class: "wm-list__row wm-list__row--ai fade-up"
4007
- }, si = { class: "wm-list__avatarSlot" }, ri = ["aria-label", "title"];
4008
- function ii(e, t, n, i, r, s) {
4009
- const a = B("AIAvatar"), l = B("HumanAvatar"), _ = B("ActionResult"), k = B("ArtifactRenderer"), b = B("Bubble"), x = B("AttachmentPreview"), E = B("Typing");
4010
- return c(), d("div", Ur, [
3884
+ }, Xr = { class: "wm-list__avatarSlot" }, Jr = ["aria-label", "title"];
3885
+ function Qr(e, t, n, i, r, s) {
3886
+ const a = B("AIAvatar"), l = B("HumanAvatar"), _ = B("ActionResult"), k = B("ArtifactRenderer"), w = B("Bubble"), x = B("AttachmentPreview"), L = B("Typing");
3887
+ return c(), d("div", Ir, [
4011
3888
  o("div", {
4012
3889
  ref: "scrollEl",
4013
- class: L(["wm-list", { "wm-list--silent": r.silentFades }]),
3890
+ class: I(["wm-list", { "wm-list--silent": r.silentFades }]),
4014
3891
  onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
4015
3892
  }, [
4016
- n.loadingMore ? (c(), d("div", Dr, [
3893
+ n.loadingMore ? (c(), d("div", Er, [
4017
3894
  t[6] || (t[6] = o("span", {
4018
3895
  class: "wm-list__loadMore-spinner",
4019
3896
  "aria-hidden": "true"
4020
3897
  }, null, -1)),
4021
- o("span", jr, v(s.t("messageList.loadingHistory")), 1)
4022
- ])) : s.historyExhausted ? (c(), d("div", Fr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
4023
- n.dateLabel ? (c(), d("div", Hr, [
3898
+ o("span", Lr, v(s.t("messageList.loadingHistory")), 1)
3899
+ ])) : s.historyExhausted ? (c(), d("div", Br, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
3900
+ n.dateLabel ? (c(), d("div", Rr, [
4024
3901
  t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
4025
- o("span", zr, v(n.dateLabel), 1),
3902
+ o("span", Nr, v(n.dateLabel), 1),
4026
3903
  t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
4027
- ])) : w("", !0),
4028
- (c(!0), d(I, null, j(s.groups, (A, q) => (c(), d(I, {
3904
+ ])) : b("", !0),
3905
+ (c(!0), d(E, null, F(s.groups, (A, $) => (c(), d(E, {
4029
3906
  key: A.key
4030
3907
  }, [
4031
- A.key === s.unreadGroupKey ? (c(), d("div", qr, [
3908
+ A.key === s.unreadGroupKey ? (c(), d("div", Pr, [
4032
3909
  t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4033
- o("span", Vr, v(s.t("messageList.unread")), 1),
3910
+ o("span", Ur, v(s.t("messageList.unread")), 1),
4034
3911
  t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4035
- ])) : w("", !0),
3912
+ ])) : b("", !0),
4036
3913
  A.role === "system" || A.items.length ? (c(), d("div", {
4037
3914
  key: 1,
4038
- class: L(["wm-list__group", "wm-list__group--" + A.role])
3915
+ class: I(["wm-list__group", "wm-list__group--" + A.role])
4039
3916
  }, [
4040
- A.role === "system" ? (c(), d("div", $r, [
3917
+ A.role === "system" ? (c(), d("div", jr, [
4041
3918
  t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4042
- o("span", Kr, v(A.systemLabel), 1),
3919
+ o("span", Fr, v(A.systemLabel), 1),
4043
3920
  t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4044
- ])) : (c(), d(I, { key: 1 }, [
4045
- (c(!0), d(I, null, j(A.items, (M, U) => (c(), d(I, {
3921
+ ])) : (c(), d(E, { key: 1 }, [
3922
+ (c(!0), d(E, null, F(A.items, (M, U) => (c(), d(E, {
4046
3923
  key: `${s.messageKey(M.message)}-${M.partKey}`
4047
3924
  }, [
4048
3925
  o("div", {
4049
3926
  "data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
4050
- class: L(["wm-list__row fade-up", [
3927
+ class: I(["wm-list__row fade-up", [
4051
3928
  "wm-list__row--" + A.role,
4052
3929
  {
4053
3930
  "is-pending": M.message._pending,
@@ -4055,15 +3932,15 @@ function ii(e, t, n, i, r, s) {
4055
3932
  }
4056
3933
  ]]),
4057
3934
  style: z(s.cornersStyle(A, U)),
4058
- onPointerdown: (D) => s.onPressStart(`${s.messageKey(M.message)}-${M.partKey}`),
4059
- onPointerup: t[0] || (t[0] = (D) => s.onPressEnd()),
4060
- onPointercancel: t[1] || (t[1] = (D) => s.onPressEnd()),
4061
- onPointerleave: t[2] || (t[2] = (D) => s.onPressEnd()),
3935
+ onPointerdown: (j) => s.onPressStart(`${s.messageKey(M.message)}-${M.partKey}`),
3936
+ onPointerup: t[0] || (t[0] = (j) => s.onPressEnd()),
3937
+ onPointercancel: t[1] || (t[1] = (j) => s.onPressEnd()),
3938
+ onPointerleave: t[2] || (t[2] = (j) => s.onPressEnd()),
4062
3939
  onContextmenu: t[3] || (t[3] = X(() => {
4063
3940
  }, ["prevent"]))
4064
3941
  }, [
4065
- A.role !== "user" ? (c(), d("div", Gr, [
4066
- U === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
3942
+ A.role !== "user" ? (c(), d("div", Hr, [
3943
+ U === A.items.length - 1 ? (c(), d(E, { key: 0 }, [
4067
3944
  A.role === "ai" ? (c(), N(a, {
4068
3945
  key: 0,
4069
3946
  size: 26,
@@ -4077,8 +3954,8 @@ function ii(e, t, n, i, r, s) {
4077
3954
  size: 26,
4078
3955
  tail: !0
4079
3956
  }, null, 8, ["name", "avatar-url"]))
4080
- ], 64)) : w("", !0)
4081
- ])) : w("", !0),
3957
+ ], 64)) : b("", !0)
3958
+ ])) : b("", !0),
4082
3959
  M.renderAs === "action" ? (c(), N(_, {
4083
3960
  key: 1,
4084
3961
  state: M.message.payload.state,
@@ -4095,61 +3972,61 @@ function ii(e, t, n, i, r, s) {
4095
3972
  }, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), N(k, {
4096
3973
  key: 4,
4097
3974
  artifact: s.artifactOf(M.message)
4098
- }, null, 8, ["artifact"])) : (c(), d("div", Yr, [
4099
- M.message.text_md ? (c(), N(b, {
3975
+ }, null, 8, ["artifact"])) : (c(), d("div", zr, [
3976
+ M.message.text_md ? (c(), N(w, {
4100
3977
  key: 0,
4101
3978
  role: A.role,
4102
3979
  text: M.message.text_md
4103
- }, null, 8, ["role", "text"])) : w("", !0),
3980
+ }, null, 8, ["role", "text"])) : b("", !0),
4104
3981
  s.attachmentsOf(M.message).length ? (c(), d("div", {
4105
3982
  key: 1,
4106
- class: L(["wm-list__atts", {
3983
+ class: I(["wm-list__atts", {
4107
3984
  "wm-list__atts--align-end": A.role === "user"
4108
3985
  }])
4109
3986
  }, [
4110
- (c(!0), d(I, null, j(s.attachmentsOf(
3987
+ (c(!0), d(E, null, F(s.attachmentsOf(
4111
3988
  M.message
4112
- ), (D, P) => (c(), N(x, {
3989
+ ), (j, P) => (c(), N(x, {
4113
3990
  key: `${s.messageKey(M.message)}-att-${P}`,
4114
- attachment: D
3991
+ attachment: j
4115
3992
  }, null, 8, ["attachment"]))), 128))
4116
- ], 2)) : w("", !0)
3993
+ ], 2)) : b("", !0)
4117
3994
  ]))
4118
- ], 46, Wr),
3995
+ ], 46, Dr),
4119
3996
  U < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || s.timeOf(M.message)) ? (c(), d("div", {
4120
3997
  key: 0,
4121
- class: L(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
3998
+ class: I(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
4122
3999
  }, [
4123
- A.role !== "user" ? (c(), d("span", Xr, v(s.roleLabel(A)), 1)) : w("", !0),
4124
- A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", Jr, "•")) : w("", !0),
4125
- s.timeOf(M.message) ? (c(), d("span", Qr, v(s.timeOf(M.message)), 1)) : w("", !0)
4126
- ], 2)) : w("", !0)
4000
+ A.role !== "user" ? (c(), d("span", $r, v(s.roleLabel(A)), 1)) : b("", !0),
4001
+ A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", qr, "•")) : b("", !0),
4002
+ s.timeOf(M.message) ? (c(), d("span", Vr, v(s.timeOf(M.message)), 1)) : b("", !0)
4003
+ ], 2)) : b("", !0)
4127
4004
  ], 64))), 128)),
4128
4005
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), d("div", {
4129
4006
  key: 0,
4130
- class: L(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4007
+ class: I(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4131
4008
  }, [
4132
- A.role !== "user" ? (c(), d("span", Zr, v(s.roleLabel(A)), 1)) : w("", !0),
4133
- A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", ei, "•")) : w("", !0),
4134
- s.lastTimeOf(A) ? (c(), d("span", ti, v(s.lastTimeOf(A)), 1)) : w("", !0)
4135
- ], 2)) : w("", !0)
4009
+ A.role !== "user" ? (c(), d("span", Kr, v(s.roleLabel(A)), 1)) : b("", !0),
4010
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", Wr, "•")) : b("", !0),
4011
+ s.lastTimeOf(A) ? (c(), d("span", Gr, v(s.lastTimeOf(A)), 1)) : b("", !0)
4012
+ ], 2)) : b("", !0)
4136
4013
  ], 64))
4137
- ], 2)) : w("", !0)
4014
+ ], 2)) : b("", !0)
4138
4015
  ], 64))), 128)),
4139
- n.streamingActive ? (c(), d("div", ni, [
4140
- o("div", si, [
4141
- $(a, {
4016
+ n.streamingActive ? (c(), d("div", Yr, [
4017
+ o("div", Xr, [
4018
+ V(a, {
4142
4019
  size: 26,
4143
4020
  tail: !0,
4144
4021
  name: n.aiAgentName,
4145
4022
  "image-url": n.aiAgentAvatarUrl
4146
4023
  }, null, 8, ["name", "image-url"])
4147
4024
  ]),
4148
- $(E)
4149
- ])) : w("", !0)
4025
+ V(L)
4026
+ ])) : b("", !0)
4150
4027
  ], 34),
4151
- $(Pe, { name: "wm-scrollDown" }, {
4152
- default: Ue(() => [
4028
+ V(Ne, { name: "wm-scrollDown" }, {
4029
+ default: Pe(() => [
4153
4030
  r.showScrollDown ? (c(), d("button", {
4154
4031
  key: 0,
4155
4032
  type: "button",
@@ -4171,15 +4048,15 @@ function ii(e, t, n, i, r, s) {
4171
4048
  }, [
4172
4049
  o("path", { d: "M6 9l6 6 6-6" })
4173
4050
  ], -1)
4174
- ])], 8, ri)) : w("", !0)
4051
+ ])], 8, Jr)) : b("", !0)
4175
4052
  ]),
4176
4053
  _: 1
4177
4054
  })
4178
4055
  ]);
4179
4056
  }
4180
- const ai = /* @__PURE__ */ R(Pr, [["render", ii], ["__scopeId", "data-v-cf20685c"]]), ge = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Te = typeof window < "u" && typeof window.MediaRecorder < "u";
4181
- function oi() {
4182
- return Te && [
4057
+ const Zr = /* @__PURE__ */ R(Or, [["render", Qr], ["__scopeId", "data-v-cf20685c"]]), ge = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Me = typeof window < "u" && typeof window.MediaRecorder < "u";
4058
+ function ei() {
4059
+ return Me && [
4183
4060
  "video/webm;codecs=vp9,opus",
4184
4061
  "video/webm;codecs=vp8,opus",
4185
4062
  "video/webm",
@@ -4189,7 +4066,7 @@ function oi() {
4189
4066
  return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
4190
4067
  }) || "";
4191
4068
  }
4192
- function qe({ audio: e }) {
4069
+ function De({ audio: e }) {
4193
4070
  return {
4194
4071
  video: !0,
4195
4072
  audio: !!e,
@@ -4198,21 +4075,21 @@ function qe({ audio: e }) {
4198
4075
  systemAudio: e ? "include" : "exclude"
4199
4076
  };
4200
4077
  }
4201
- function _o(e) {
4078
+ function lo(e) {
4202
4079
  return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
4203
4080
  }
4204
- async function li() {
4081
+ async function ti() {
4205
4082
  if (!ge) return null;
4206
4083
  let e;
4207
4084
  try {
4208
4085
  e = await navigator.mediaDevices.getDisplayMedia(
4209
- qe({ audio: !1 })
4086
+ De({ audio: !1 })
4210
4087
  );
4211
4088
  } catch (t) {
4212
4089
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
4213
4090
  }
4214
4091
  try {
4215
- return await ci(e);
4092
+ return await ni(e);
4216
4093
  } catch (t) {
4217
4094
  return console.error("[media] screenshot capture", t), null;
4218
4095
  } finally {
@@ -4221,7 +4098,7 @@ async function li() {
4221
4098
  });
4222
4099
  }
4223
4100
  }
4224
- async function ci(e) {
4101
+ async function ni(e) {
4225
4102
  const t = document.createElement("video");
4226
4103
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4227
4104
  const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
@@ -4234,64 +4111,64 @@ async function ci(e) {
4234
4111
  }), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
4235
4112
  return new File([s], `capture-${a}.png`, { type: "image/png" });
4236
4113
  }
4237
- async function di(e = {}) {
4114
+ async function si(e = {}) {
4238
4115
  var k;
4239
- if (!ge || !Te) return null;
4116
+ if (!ge || !Me) return null;
4240
4117
  let t;
4241
4118
  try {
4242
4119
  t = await navigator.mediaDevices.getDisplayMedia(
4243
- qe({ audio: !0 })
4120
+ De({ audio: !0 })
4244
4121
  );
4245
- } catch (b) {
4246
- return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
4122
+ } catch (w) {
4123
+ return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
4247
4124
  }
4248
- const n = oi();
4125
+ const n = ei();
4249
4126
  let i;
4250
4127
  try {
4251
4128
  i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
4252
- } catch (b) {
4253
- return console.error("[media] recorder init", b), t.getTracks().forEach((x) => {
4129
+ } catch (w) {
4130
+ return console.error("[media] recorder init", w), t.getTracks().forEach((x) => {
4254
4131
  x.stop();
4255
4132
  }), null;
4256
4133
  }
4257
4134
  const r = [];
4258
4135
  let s = null, a = !1;
4259
- i.addEventListener("dataavailable", (b) => {
4260
- b.data && b.data.size > 0 && r.push(b.data);
4136
+ i.addEventListener("dataavailable", (w) => {
4137
+ w.data && w.data.size > 0 && r.push(w.data);
4261
4138
  }), i.addEventListener("stop", () => {
4262
- var b, x;
4263
- if (s && clearInterval(s), t.getTracks().forEach((E) => {
4264
- E.stop();
4139
+ var w, x;
4140
+ if (s && clearInterval(s), t.getTracks().forEach((L) => {
4141
+ L.stop();
4265
4142
  }), r.length) {
4266
- const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${M}.${q}`, {
4267
- type: E
4143
+ const L = i.mimeType || n || "video/webm", A = new Blob(r, { type: L }), $ = /mp4/.test(L) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${M}.${$}`, {
4144
+ type: L
4268
4145
  });
4269
- (b = e.onfinalize) == null || b.call(e, U);
4146
+ (w = e.onfinalize) == null || w.call(e, U);
4270
4147
  } else
4271
4148
  (x = e.oncancel) == null || x.call(e);
4272
- }), t.getVideoTracks().forEach((b) => {
4273
- b.addEventListener("ended", () => l(), { once: !0 });
4149
+ }), t.getVideoTracks().forEach((w) => {
4150
+ w.addEventListener("ended", () => l(), { once: !0 });
4274
4151
  });
4275
4152
  function l() {
4276
4153
  if (!a && (a = !0, i.state !== "inactive"))
4277
4154
  try {
4278
4155
  i.stop();
4279
- } catch (b) {
4280
- console.error("[media] recorder stop", b);
4156
+ } catch (w) {
4157
+ console.error("[media] recorder stop", w);
4281
4158
  }
4282
4159
  }
4283
4160
  try {
4284
4161
  i.start(1e3);
4285
- } catch (b) {
4286
- return console.error("[media] recorder start", b), t.getTracks().forEach((x) => {
4162
+ } catch (w) {
4163
+ return console.error("[media] recorder start", w), t.getTracks().forEach((x) => {
4287
4164
  x.stop();
4288
4165
  }), null;
4289
4166
  }
4290
4167
  (k = e.onstart) == null || k.call(e);
4291
4168
  const _ = Date.now();
4292
4169
  return s = setInterval(() => {
4293
- var b;
4294
- (b = e.ontick) == null || b.call(e, Date.now() - _);
4170
+ var w;
4171
+ (w = e.ontick) == null || w.call(e, Date.now() - _);
4295
4172
  }, 500), {
4296
4173
  stop: l,
4297
4174
  get state() {
@@ -4299,7 +4176,7 @@ async function di(e = {}) {
4299
4176
  }
4300
4177
  };
4301
4178
  }
4302
- const ui = [
4179
+ const ri = [
4303
4180
  {
4304
4181
  action: "file",
4305
4182
  labelKey: "composer.attachFile",
@@ -4315,12 +4192,12 @@ const ui = [
4315
4192
  labelKey: "composer.recordScreen",
4316
4193
  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"
4317
4194
  }
4318
- ], hi = {
4195
+ ], ii = {
4319
4196
  name: "WmComposer",
4320
4197
  inject: {
4321
4198
  // Translator shared by the Messenger shell; French fallback when
4322
4199
  // the component is used standalone.
4323
- t: { default: () => F() }
4200
+ t: { default: () => D() }
4324
4201
  },
4325
4202
  props: {
4326
4203
  modelValue: { type: String, default: "" },
@@ -4349,10 +4226,10 @@ const ui = [
4349
4226
  return !this.disabled && !!this.local.trim();
4350
4227
  },
4351
4228
  attachItems() {
4352
- return ui.map((e) => ({
4229
+ return ri.map((e) => ({
4353
4230
  ...e,
4354
4231
  label: this.t(e.labelKey),
4355
- disabled: e.action === "screenshot" && !ge || e.action === "record" && (!ge || !Te)
4232
+ disabled: e.action === "screenshot" && !ge || e.action === "record" && (!ge || !Me)
4356
4233
  }));
4357
4234
  },
4358
4235
  recordingElapsedLabel() {
@@ -4423,13 +4300,13 @@ const ui = [
4423
4300
  },
4424
4301
  async captureScreenshot() {
4425
4302
  if (this.disabled) return;
4426
- const e = await li();
4303
+ const e = await ti();
4427
4304
  e && this.$emit("attach", e);
4428
4305
  },
4429
4306
  async startRecording() {
4430
4307
  if (this.recording || this.disabled) return;
4431
4308
  this.recordingElapsed = 0;
4432
- const e = await di({
4309
+ const e = await si({
4433
4310
  onstart: () => {
4434
4311
  this.recording = !0;
4435
4312
  },
@@ -4471,38 +4348,38 @@ const ui = [
4471
4348
  !e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
4472
4349
  }
4473
4350
  }
4474
- }, mi = {
4351
+ }, ai = {
4475
4352
  key: 0,
4476
4353
  class: "wm-rec"
4477
- }, fi = { class: "wm-rec__lbl" }, gi = {
4354
+ }, oi = { class: "wm-rec__lbl" }, li = {
4478
4355
  key: 1,
4479
4356
  class: "wm-compose__menu",
4480
4357
  role: "menu"
4481
- }, _i = ["disabled", "onClick"], pi = { class: "wm-compose__menuIcon" }, vi = {
4358
+ }, ci = ["disabled", "onClick"], di = { class: "wm-compose__menuIcon" }, ui = {
4482
4359
  viewBox: "0 0 24 24",
4483
4360
  width: "14",
4484
4361
  height: "14",
4485
4362
  "aria-hidden": "true"
4486
- }, yi = ["d"], wi = ["placeholder", "disabled"], bi = { class: "wm-compose__actions" }, ki = ["title", "aria-label", "disabled"], Ci = ["disabled", "aria-label"];
4487
- function Ai(e, t, n, i, r, s) {
4363
+ }, hi = ["d"], mi = ["placeholder", "disabled"], fi = { class: "wm-compose__actions" }, gi = ["title", "aria-label", "disabled"], _i = ["disabled", "aria-label"];
4364
+ function pi(e, t, n, i, r, s) {
4488
4365
  return c(), d("div", {
4489
- class: L(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4366
+ class: I(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
4490
4367
  style: z(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
4491
4368
  }, [
4492
- r.recording ? (c(), d("div", mi, [
4369
+ r.recording ? (c(), d("div", ai, [
4493
4370
  t[8] || (t[8] = o("span", {
4494
4371
  class: "wm-rec__dot",
4495
4372
  "aria-hidden": "true"
4496
4373
  }, null, -1)),
4497
- o("span", fi, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4374
+ o("span", oi, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
4498
4375
  o("button", {
4499
4376
  type: "button",
4500
4377
  class: "wm-rec__stop",
4501
4378
  onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
4502
4379
  }, v(s.t("composer.stop")), 1)
4503
- ])) : w("", !0),
4380
+ ])) : b("", !0),
4504
4381
  o("form", {
4505
- class: L(["wm-compose", { "has-attach": r.attachOpen }]),
4382
+ class: I(["wm-compose", { "has-attach": r.attachOpen }]),
4506
4383
  onSubmit: t[7] || (t[7] = X((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
4507
4384
  }, [
4508
4385
  o("input", {
@@ -4516,17 +4393,17 @@ function Ai(e, t, n, i, r, s) {
4516
4393
  key: 0,
4517
4394
  class: "wm-compose__overlay",
4518
4395
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
4519
- })) : w("", !0),
4520
- r.attachOpen ? (c(), d("div", gi, [
4521
- (c(!0), d(I, null, j(s.attachItems, (a) => (c(), d("button", {
4396
+ })) : b("", !0),
4397
+ r.attachOpen ? (c(), d("div", li, [
4398
+ (c(!0), d(E, null, F(s.attachItems, (a) => (c(), d("button", {
4522
4399
  key: a.action,
4523
4400
  type: "button",
4524
4401
  class: "wm-compose__menuItem",
4525
4402
  disabled: a.disabled,
4526
4403
  onClick: (l) => s.onAttachAction(a.action)
4527
4404
  }, [
4528
- o("span", pi, [
4529
- (c(), d("svg", vi, [
4405
+ o("span", di, [
4406
+ (c(), d("svg", ui, [
4530
4407
  o("path", {
4531
4408
  d: a.path,
4532
4409
  stroke: "currentColor",
@@ -4534,12 +4411,12 @@ function Ai(e, t, n, i, r, s) {
4534
4411
  "stroke-linecap": "round",
4535
4412
  "stroke-linejoin": "round",
4536
4413
  fill: "none"
4537
- }, null, 8, yi)
4414
+ }, null, 8, hi)
4538
4415
  ]))
4539
4416
  ]),
4540
4417
  o("span", null, v(a.label), 1)
4541
- ], 8, _i))), 128))
4542
- ])) : w("", !0),
4418
+ ], 8, ci))), 128))
4419
+ ])) : b("", !0),
4543
4420
  G(o("textarea", {
4544
4421
  ref: "inputEl",
4545
4422
  "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
@@ -4549,13 +4426,13 @@ function Ai(e, t, n, i, r, s) {
4549
4426
  disabled: n.disabled,
4550
4427
  onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
4551
4428
  onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
4552
- }, null, 40, wi), [
4429
+ }, null, 40, mi), [
4553
4430
  [te, r.local]
4554
4431
  ]),
4555
- o("div", bi, [
4432
+ o("div", fi, [
4556
4433
  o("button", {
4557
4434
  type: "button",
4558
- class: L(["wm-compose__icon", { "is-open": r.attachOpen }]),
4435
+ class: I(["wm-compose__icon", { "is-open": r.attachOpen }]),
4559
4436
  title: n.attachLabel,
4560
4437
  "aria-label": n.attachLabel,
4561
4438
  disabled: r.recording,
@@ -4574,10 +4451,10 @@ function Ai(e, t, n, i, r, s) {
4574
4451
  }, [
4575
4452
  o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
4576
4453
  ], -1)
4577
- ])], 10, ki),
4454
+ ])], 10, gi),
4578
4455
  o("button", {
4579
4456
  type: "submit",
4580
- class: L(["wm-compose__send", { "is-empty": !s.canSend }]),
4457
+ class: I(["wm-compose__send", { "is-empty": !s.canSend }]),
4581
4458
  disabled: !s.canSend,
4582
4459
  "aria-label": s.t("composer.send")
4583
4460
  }, [...t[10] || (t[10] = [
@@ -4594,12 +4471,12 @@ function Ai(e, t, n, i, r, s) {
4594
4471
  }, [
4595
4472
  o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
4596
4473
  ], -1)
4597
- ])], 10, Ci)
4474
+ ])], 10, _i)
4598
4475
  ])
4599
4476
  ], 34)
4600
4477
  ], 6);
4601
4478
  }
4602
- const Si = /* @__PURE__ */ R(hi, [["render", Ai], ["__scopeId", "data-v-01e81a27"]]), Mi = {
4479
+ const vi = /* @__PURE__ */ R(ii, [["render", pi], ["__scopeId", "data-v-01e81a27"]]), yi = {
4603
4480
  name: "WmSuggestionChips",
4604
4481
  props: {
4605
4482
  items: { type: Array, default: () => [] },
@@ -4616,28 +4493,28 @@ const Si = /* @__PURE__ */ R(hi, [["render", Ai], ["__scopeId", "data-v-01e81a27
4616
4493
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
4617
4494
  }
4618
4495
  }
4619
- }, Ti = ["onClick"];
4620
- function xi(e, t, n, i, r, s) {
4496
+ }, wi = ["onClick"];
4497
+ function bi(e, t, n, i, r, s) {
4621
4498
  return n.items.length ? (c(), d("div", {
4622
4499
  key: s.batchKey,
4623
4500
  class: "wm-chips"
4624
4501
  }, [
4625
- (c(!0), d(I, null, j(n.items, (a, l) => (c(), d("button", {
4502
+ (c(!0), d(E, null, F(n.items, (a, l) => (c(), d("button", {
4626
4503
  key: l,
4627
4504
  type: "button",
4628
4505
  class: "wm-chip",
4629
4506
  style: z({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4630
4507
  onClick: (_) => e.$emit("select", a)
4631
- }, v(a.label), 13, Ti))), 128))
4632
- ])) : w("", !0);
4508
+ }, v(a.label), 13, wi))), 128))
4509
+ ])) : b("", !0);
4633
4510
  }
4634
- const Oi = /* @__PURE__ */ R(Mi, [["render", xi], ["__scopeId", "data-v-47ad8085"]]), Li = {
4511
+ const ki = /* @__PURE__ */ R(yi, [["render", bi], ["__scopeId", "data-v-47ad8085"]]), Ci = {
4635
4512
  name: "WmApprovalCard",
4636
4513
  components: { AIAvatar: oe },
4637
4514
  inject: {
4638
4515
  // Translator shared by the Messenger shell; French fallback when
4639
4516
  // the component is used standalone.
4640
- t: { default: () => F() }
4517
+ t: { default: () => D() }
4641
4518
  },
4642
4519
  props: {
4643
4520
  action: { type: String, required: !0 },
@@ -4675,45 +4552,45 @@ const Oi = /* @__PURE__ */ R(Mi, [["render", xi], ["__scopeId", "data-v-47ad8085
4675
4552
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
4676
4553
  }
4677
4554
  }
4678
- }, Ii = { class: "wm-approval" }, Ei = { class: "wm-approval__head" }, Bi = { class: "wm-approval__icon" }, Ri = { class: "wm-approval__main" }, Ni = { class: "wm-approval__title" }, Pi = {
4555
+ }, Ai = { class: "wm-approval" }, Si = { class: "wm-approval__head" }, Mi = { class: "wm-approval__icon" }, Ti = { class: "wm-approval__main" }, xi = { class: "wm-approval__title" }, Oi = {
4679
4556
  key: 0,
4680
4557
  class: "wm-approval__detail"
4681
- }, Ui = { class: "wm-approval__actions" };
4682
- function Di(e, t, n, i, r, s) {
4558
+ }, Ii = { class: "wm-approval__actions" };
4559
+ function Ei(e, t, n, i, r, s) {
4683
4560
  const a = B("AIAvatar");
4684
- return c(), d("div", Ii, [
4685
- o("div", Ei, [
4686
- o("div", Bi, [
4687
- $(a, {
4561
+ return c(), d("div", Ai, [
4562
+ o("div", Si, [
4563
+ o("div", Mi, [
4564
+ V(a, {
4688
4565
  size: 24,
4689
4566
  name: n.agentName,
4690
4567
  "image-url": n.agentAvatarUrl
4691
4568
  }, null, 8, ["name", "image-url"])
4692
4569
  ]),
4693
- o("div", Ri, [
4694
- o("div", Ni, v(n.action), 1),
4695
- n.detail ? (c(), d("div", Pi, v(n.detail), 1)) : w("", !0)
4570
+ o("div", Ti, [
4571
+ o("div", xi, v(n.action), 1),
4572
+ n.detail ? (c(), d("div", Oi, v(n.detail), 1)) : b("", !0)
4696
4573
  ])
4697
4574
  ]),
4698
- o("div", Ui, [
4575
+ o("div", Ii, [
4699
4576
  s.rejectId ? (c(), d("button", {
4700
4577
  key: 0,
4701
4578
  type: "button",
4702
4579
  class: "wm-approval__btn wm-approval__btn--neutral",
4703
4580
  onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
4704
- }, v(s.rejectLabel), 1)) : w("", !0),
4581
+ }, v(s.rejectLabel), 1)) : b("", !0),
4705
4582
  s.approveId ? (c(), d("button", {
4706
4583
  key: 1,
4707
4584
  type: "button",
4708
4585
  class: "wm-approval__btn wm-approval__btn--primary",
4709
4586
  onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
4710
- }, v(s.approveLabel), 1)) : w("", !0)
4587
+ }, v(s.approveLabel), 1)) : b("", !0)
4711
4588
  ])
4712
4589
  ]);
4713
4590
  }
4714
- const ji = /* @__PURE__ */ R(Li, [["render", Di], ["__scopeId", "data-v-a2bed37e"]]);
4715
- let Re = 0;
4716
- const Fi = /* @__PURE__ */ new Set([
4591
+ const Li = /* @__PURE__ */ R(Ci, [["render", Ei], ["__scopeId", "data-v-a2bed37e"]]);
4592
+ let Be = 0;
4593
+ const Bi = /* @__PURE__ */ new Set([
4717
4594
  "text",
4718
4595
  "textarea",
4719
4596
  "number",
@@ -4721,13 +4598,13 @@ const Fi = /* @__PURE__ */ new Set([
4721
4598
  "select",
4722
4599
  "multiselect",
4723
4600
  "date"
4724
- ]), Hi = {
4601
+ ]), Ri = {
4725
4602
  name: "WmFormCard",
4726
4603
  components: { AIAvatar: oe },
4727
4604
  inject: {
4728
4605
  // Translator shared by the Messenger shell; French fallback when
4729
4606
  // the component is used standalone.
4730
- t: { default: () => F() }
4607
+ t: { default: () => D() }
4731
4608
  },
4732
4609
  props: {
4733
4610
  form: { type: Object, required: !0 },
@@ -4738,8 +4615,8 @@ const Fi = /* @__PURE__ */ new Set([
4738
4615
  },
4739
4616
  emits: ["submit"],
4740
4617
  data() {
4741
- return Re += 1, {
4742
- _uid: Re,
4618
+ return Be += 1, {
4619
+ _uid: Be,
4743
4620
  values: {},
4744
4621
  busy: !1,
4745
4622
  error: ""
@@ -4751,7 +4628,7 @@ const Fi = /* @__PURE__ */ new Set([
4751
4628
  // douteux.
4752
4629
  normalizedFields() {
4753
4630
  var t;
4754
- return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !Fi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4631
+ return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !Bi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
4755
4632
  }
4756
4633
  },
4757
4634
  created() {
@@ -4804,54 +4681,54 @@ const Fi = /* @__PURE__ */ new Set([
4804
4681
  }
4805
4682
  }
4806
4683
  }
4807
- }, zi = { class: "wm-form" }, qi = { class: "wm-form__head" }, Vi = { class: "wm-form__icon" }, $i = { class: "wm-form__main" }, Ki = { class: "wm-form__title" }, Wi = {
4684
+ }, Ni = { class: "wm-form" }, Pi = { class: "wm-form__head" }, Ui = { class: "wm-form__icon" }, ji = { class: "wm-form__main" }, Fi = { class: "wm-form__title" }, Di = {
4808
4685
  key: 0,
4809
4686
  class: "wm-form__detail"
4810
- }, Gi = ["for"], Yi = {
4687
+ }, Hi = ["for"], zi = {
4811
4688
  key: 0,
4812
4689
  class: "wm-form__req",
4813
4690
  "aria-hidden": "true"
4814
- }, Xi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Qi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Zi = ["id", "onUpdate:modelValue", "required", "disabled"], ea = {
4691
+ }, $i = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], qi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Vi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ki = ["id", "onUpdate:modelValue", "required", "disabled"], Wi = {
4815
4692
  key: 4,
4816
4693
  class: "wm-form__bool"
4817
- }, ta = ["id", "onUpdate:modelValue", "disabled"], na = ["id", "onUpdate:modelValue", "required", "disabled"], sa = {
4694
+ }, Gi = ["id", "onUpdate:modelValue", "disabled"], Yi = ["id", "onUpdate:modelValue", "required", "disabled"], Xi = {
4818
4695
  value: "",
4819
4696
  disabled: ""
4820
- }, ra = ["value"], ia = {
4697
+ }, Ji = ["value"], Qi = {
4821
4698
  key: 6,
4822
4699
  class: "wm-form__multi"
4823
- }, aa = ["value", "checked", "disabled", "onChange"], oa = {
4700
+ }, Zi = ["value", "checked", "disabled", "onChange"], ea = {
4824
4701
  key: 0,
4825
4702
  class: "wm-form__err"
4826
- }, la = ["disabled"], ca = {
4703
+ }, ta = ["disabled"], na = {
4827
4704
  key: 0,
4828
4705
  class: "wm-form__spinner",
4829
4706
  "aria-hidden": "true"
4830
- }, da = {
4707
+ }, sa = {
4831
4708
  key: 2,
4832
4709
  class: "wm-form__doneLbl"
4833
4710
  };
4834
- function ua(e, t, n, i, r, s) {
4711
+ function ra(e, t, n, i, r, s) {
4835
4712
  const a = B("AIAvatar");
4836
- return c(), d("div", zi, [
4837
- o("div", qi, [
4838
- o("div", Vi, [
4839
- $(a, {
4713
+ return c(), d("div", Ni, [
4714
+ o("div", Pi, [
4715
+ o("div", Ui, [
4716
+ V(a, {
4840
4717
  size: 24,
4841
4718
  name: n.agentName,
4842
4719
  "image-url": n.agentAvatarUrl
4843
4720
  }, null, 8, ["name", "image-url"])
4844
4721
  ]),
4845
- o("div", $i, [
4846
- o("div", Ki, v(n.form.title || s.t("form.title")), 1),
4847
- n.form.description ? (c(), d("div", Wi, v(n.form.description), 1)) : w("", !0)
4722
+ o("div", ji, [
4723
+ o("div", Fi, v(n.form.title || s.t("form.title")), 1),
4724
+ n.form.description ? (c(), d("div", Di, v(n.form.description), 1)) : b("", !0)
4848
4725
  ])
4849
4726
  ]),
4850
4727
  o("form", {
4851
4728
  class: "wm-form__body",
4852
4729
  onSubmit: t[0] || (t[0] = X((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
4853
4730
  }, [
4854
- (c(!0), d(I, null, j(s.normalizedFields, (l) => (c(), d("div", {
4731
+ (c(!0), d(E, null, F(s.normalizedFields, (l) => (c(), d("div", {
4855
4732
  key: l.key,
4856
4733
  class: "wm-form__field"
4857
4734
  }, [
@@ -4859,9 +4736,9 @@ function ua(e, t, n, i, r, s) {
4859
4736
  for: `wm-f-${r._uid}-${l.key}`,
4860
4737
  class: "wm-form__label"
4861
4738
  }, [
4862
- Ce(v(l.label), 1),
4863
- l.required ? (c(), d("span", Yi, "*")) : w("", !0)
4864
- ], 8, Gi),
4739
+ be(v(l.label), 1),
4740
+ l.required ? (c(), d("span", zi, "*")) : b("", !0)
4741
+ ], 8, Hi),
4865
4742
  l.type === "text" ? G((c(), d("input", {
4866
4743
  key: 0,
4867
4744
  id: `wm-f-${r._uid}-${l.key}`,
@@ -4871,7 +4748,7 @@ function ua(e, t, n, i, r, s) {
4871
4748
  placeholder: l.placeholder || "",
4872
4749
  required: l.required,
4873
4750
  disabled: n.readOnly || r.busy
4874
- }, null, 8, Xi)), [
4751
+ }, null, 8, $i)), [
4875
4752
  [te, r.values[l.key]]
4876
4753
  ]) : l.type === "textarea" ? G((c(), d("textarea", {
4877
4754
  key: 1,
@@ -4882,7 +4759,7 @@ function ua(e, t, n, i, r, s) {
4882
4759
  placeholder: l.placeholder || "",
4883
4760
  required: l.required,
4884
4761
  disabled: n.readOnly || r.busy
4885
- }, null, 8, Ji)), [
4762
+ }, null, 8, qi)), [
4886
4763
  [te, r.values[l.key]]
4887
4764
  ]) : l.type === "number" ? G((c(), d("input", {
4888
4765
  key: 2,
@@ -4893,7 +4770,7 @@ function ua(e, t, n, i, r, s) {
4893
4770
  placeholder: l.placeholder || "",
4894
4771
  required: l.required,
4895
4772
  disabled: n.readOnly || r.busy
4896
- }, null, 8, Qi)), [
4773
+ }, null, 8, Vi)), [
4897
4774
  [
4898
4775
  te,
4899
4776
  r.values[l.key],
@@ -4908,16 +4785,16 @@ function ua(e, t, n, i, r, s) {
4908
4785
  class: "wm-form__input",
4909
4786
  required: l.required,
4910
4787
  disabled: n.readOnly || r.busy
4911
- }, null, 8, Zi)), [
4788
+ }, null, 8, Ki)), [
4912
4789
  [te, r.values[l.key]]
4913
- ]) : l.type === "boolean" ? (c(), d("label", ea, [
4790
+ ]) : l.type === "boolean" ? (c(), d("label", Wi, [
4914
4791
  G(o("input", {
4915
4792
  id: `wm-f-${r._uid}-${l.key}`,
4916
4793
  "onUpdate:modelValue": (_) => r.values[l.key] = _,
4917
4794
  type: "checkbox",
4918
4795
  disabled: n.readOnly || r.busy
4919
- }, null, 8, ta), [
4920
- [Ke, r.values[l.key]]
4796
+ }, null, 8, Gi), [
4797
+ [qe, r.values[l.key]]
4921
4798
  ]),
4922
4799
  o("span", null, v(l.placeholder || s.t("common.yes")), 1)
4923
4800
  ])) : l.type === "select" ? G((c(), d("select", {
@@ -4928,15 +4805,15 @@ function ua(e, t, n, i, r, s) {
4928
4805
  required: l.required,
4929
4806
  disabled: n.readOnly || r.busy
4930
4807
  }, [
4931
- o("option", sa, v(l.placeholder || s.t("form.choose")), 1),
4932
- (c(!0), d(I, null, j(l.options, (_) => (c(), d("option", {
4808
+ o("option", Xi, v(l.placeholder || s.t("form.choose")), 1),
4809
+ (c(!0), d(E, null, F(l.options, (_) => (c(), d("option", {
4933
4810
  key: _.value,
4934
4811
  value: _.value
4935
- }, v(_.label), 9, ra))), 128))
4936
- ], 8, na)), [
4937
- [We, r.values[l.key]]
4938
- ]) : l.type === "multiselect" ? (c(), d("div", ia, [
4939
- (c(!0), d(I, null, j(l.options, (_) => (c(), d("label", {
4812
+ }, v(_.label), 9, Ji))), 128))
4813
+ ], 8, Yi)), [
4814
+ [Ve, r.values[l.key]]
4815
+ ]) : l.type === "multiselect" ? (c(), d("div", Qi, [
4816
+ (c(!0), d(E, null, F(l.options, (_) => (c(), d("label", {
4940
4817
  key: _.value,
4941
4818
  class: "wm-form__multiItem"
4942
4819
  }, [
@@ -4950,30 +4827,30 @@ function ua(e, t, n, i, r, s) {
4950
4827
  _.value,
4951
4828
  k.target.checked
4952
4829
  )
4953
- }, null, 40, aa),
4830
+ }, null, 40, Zi),
4954
4831
  o("span", null, v(_.label), 1)
4955
4832
  ]))), 128))
4956
- ])) : w("", !0)
4833
+ ])) : b("", !0)
4957
4834
  ]))), 128)),
4958
- r.error ? (c(), d("div", oa, v(r.error), 1)) : w("", !0),
4959
- n.readOnly ? (c(), d("div", da, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
4835
+ r.error ? (c(), d("div", ea, v(r.error), 1)) : b("", !0),
4836
+ n.readOnly ? (c(), d("div", sa, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
4960
4837
  key: 1,
4961
4838
  type: "submit",
4962
4839
  class: "wm-form__submit",
4963
4840
  disabled: r.busy
4964
4841
  }, [
4965
- r.busy ? (c(), d("span", ca)) : w("", !0),
4842
+ r.busy ? (c(), d("span", na)) : b("", !0),
4966
4843
  o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4967
- ], 8, la))
4844
+ ], 8, ta))
4968
4845
  ], 32)
4969
4846
  ]);
4970
4847
  }
4971
- const ha = /* @__PURE__ */ R(Hi, [["render", ua], ["__scopeId", "data-v-fe65cc56"]]), ma = {
4848
+ const ia = /* @__PURE__ */ R(Ri, [["render", ra], ["__scopeId", "data-v-fe65cc56"]]), aa = {
4972
4849
  name: "WmFeedback",
4973
4850
  inject: {
4974
4851
  // Translator shared by the Messenger shell; French fallback when
4975
4852
  // the component is used standalone.
4976
- t: { default: () => F() }
4853
+ t: { default: () => D() }
4977
4854
  },
4978
4855
  props: {
4979
4856
  busy: { type: Boolean, default: !1 },
@@ -5002,13 +4879,13 @@ const ha = /* @__PURE__ */ R(Hi, [["render", ua], ["__scopeId", "data-v-fe65cc56
5002
4879
  !this.sel || this.busy || this.$emit("submit", { rating: this.sel });
5003
4880
  }
5004
4881
  }
5005
- }, fa = { class: "wm-fb" }, ga = { class: "wm-fb__title" }, _a = { class: "wm-fb__sub" }, pa = { class: "wm-fb__row" }, va = ["onClick"], ya = { class: "wm-fb__emoji" }, wa = { class: "wm-fb__label" }, ba = ["disabled"], ka = {
4882
+ }, oa = { class: "wm-fb" }, la = { class: "wm-fb__title" }, ca = { class: "wm-fb__sub" }, da = { class: "wm-fb__row" }, ua = ["onClick"], ha = { class: "wm-fb__emoji" }, ma = { class: "wm-fb__label" }, fa = ["disabled"], ga = {
5006
4883
  key: 1,
5007
4884
  class: "wm-fb__done"
5008
- }, Ca = { class: "wm-fb__doneTitle" }, Aa = { class: "wm-fb__doneSub" };
5009
- function Sa(e, t, n, i, r, s) {
5010
- return c(), d("div", fa, [
5011
- n.done ? (c(), d("div", ka, [
4885
+ }, _a = { class: "wm-fb__doneTitle" }, pa = { class: "wm-fb__doneSub" };
4886
+ function va(e, t, n, i, r, s) {
4887
+ return c(), d("div", oa, [
4888
+ n.done ? (c(), d("div", ga, [
5012
4889
  t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
5013
4890
  o("svg", {
5014
4891
  width: "16",
@@ -5024,37 +4901,37 @@ function Sa(e, t, n, i, r, s) {
5024
4901
  o("path", { d: "M20 6L9 17l-5-5" })
5025
4902
  ])
5026
4903
  ], -1)),
5027
- o("div", Ca, v(s.t("feedback.doneTitle")), 1),
5028
- o("div", Aa, v(s.t("feedback.doneSubtitle")), 1)
5029
- ])) : (c(), d(I, { key: 0 }, [
5030
- o("div", ga, v(s.t("feedback.question")), 1),
5031
- o("div", _a, v(s.t("feedback.subtitle")), 1),
5032
- o("div", pa, [
5033
- (c(!0), d(I, null, j(s.options, (a) => (c(), d("button", {
4904
+ o("div", _a, v(s.t("feedback.doneTitle")), 1),
4905
+ o("div", pa, v(s.t("feedback.doneSubtitle")), 1)
4906
+ ])) : (c(), d(E, { key: 0 }, [
4907
+ o("div", la, v(s.t("feedback.question")), 1),
4908
+ o("div", ca, v(s.t("feedback.subtitle")), 1),
4909
+ o("div", da, [
4910
+ (c(!0), d(E, null, F(s.options, (a) => (c(), d("button", {
5034
4911
  key: a.v,
5035
4912
  type: "button",
5036
- class: L(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
4913
+ class: I(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
5037
4914
  onClick: (l) => r.sel = a.v
5038
4915
  }, [
5039
- o("span", ya, v(a.e), 1),
5040
- o("span", wa, v(a.l), 1)
5041
- ], 10, va))), 128))
4916
+ o("span", ha, v(a.e), 1),
4917
+ o("span", ma, v(a.l), 1)
4918
+ ], 10, ua))), 128))
5042
4919
  ]),
5043
4920
  o("button", {
5044
4921
  type: "button",
5045
4922
  class: "wm-fb__send",
5046
4923
  disabled: !r.sel || n.busy,
5047
4924
  onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
5048
- }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, ba)
4925
+ }, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, fa)
5049
4926
  ], 64))
5050
4927
  ]);
5051
4928
  }
5052
- const Ma = /* @__PURE__ */ R(ma, [["render", Sa], ["__scopeId", "data-v-9b630564"]]), Ta = {
4929
+ const ya = /* @__PURE__ */ R(aa, [["render", va], ["__scopeId", "data-v-9b630564"]]), wa = {
5053
4930
  name: "WmMoreMenu",
5054
4931
  inject: {
5055
4932
  // Translator shared by the Messenger shell; French fallback when
5056
4933
  // the component is used standalone.
5057
- t: { default: () => F() }
4934
+ t: { default: () => D() }
5058
4935
  },
5059
4936
  props: {
5060
4937
  canRename: { type: Boolean, default: !0 },
@@ -5092,24 +4969,24 @@ const Ma = /* @__PURE__ */ R(ma, [["render", Sa], ["__scopeId", "data-v-9b630564
5092
4969
  this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
5093
4970
  }
5094
4971
  }
5095
- }, xa = { class: "wm-mm" }, Oa = {
4972
+ }, ba = { class: "wm-mm" }, ka = {
5096
4973
  class: "wm-mm__pop",
5097
4974
  role: "menu"
5098
- }, La = {
4975
+ }, Ca = {
5099
4976
  key: 0,
5100
4977
  class: "wm-mm__section"
5101
- }, Ia = { class: "wm-mm__label" }, Ea = { class: "wm-mm__label" }, Ba = {
4978
+ }, Aa = { class: "wm-mm__label" }, Sa = { class: "wm-mm__label" }, Ma = {
5102
4979
  key: 1,
5103
4980
  class: "wm-mm__sep"
5104
- }, Ra = { class: "wm-mm__section" }, Na = { class: "wm-mm__label" }, Pa = { class: "wm-mm__label" }, Ua = { class: "wm-mm__section" }, Da = { class: "wm-mm__label" }, ja = { class: "wm-mm__label" };
5105
- function Fa(e, t, n, i, r, s) {
5106
- return c(), d("div", xa, [
4981
+ }, Ta = { class: "wm-mm__section" }, xa = { class: "wm-mm__label" }, Oa = { class: "wm-mm__label" }, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, La = { class: "wm-mm__label" };
4982
+ function Ba(e, t, n, i, r, s) {
4983
+ return c(), d("div", ba, [
5107
4984
  o("div", {
5108
4985
  class: "wm-mm__scrim",
5109
4986
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5110
4987
  }),
5111
- o("div", Oa, [
5112
- n.canRename || n.canExport ? (c(), d("div", La, [
4988
+ o("div", ka, [
4989
+ n.canRename || n.canExport ? (c(), d("div", Ca, [
5113
4990
  n.canRename ? (c(), d("button", {
5114
4991
  key: 0,
5115
4992
  type: "button",
@@ -5132,8 +5009,8 @@ function Fa(e, t, n, i, r, s) {
5132
5009
  o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
5133
5010
  ])
5134
5011
  ], -1)),
5135
- o("span", Ia, v(s.t("moreMenu.editTitle")), 1)
5136
- ])) : w("", !0),
5012
+ o("span", Aa, v(s.t("moreMenu.editTitle")), 1)
5013
+ ])) : b("", !0),
5137
5014
  n.canExport ? (c(), d("button", {
5138
5015
  key: 1,
5139
5016
  type: "button",
@@ -5155,12 +5032,12 @@ function Fa(e, t, n, i, r, s) {
5155
5032
  o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
5156
5033
  ])
5157
5034
  ], -1)),
5158
- o("span", Ea, v(s.t("moreMenu.exportTranscript")), 1),
5035
+ o("span", Sa, v(s.t("moreMenu.exportTranscript")), 1),
5159
5036
  t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
5160
- ])) : w("", !0)
5161
- ])) : w("", !0),
5162
- n.canRename || n.canExport ? (c(), d("div", Ba)) : w("", !0),
5163
- o("div", Ra, [
5037
+ ])) : b("", !0)
5038
+ ])) : b("", !0),
5039
+ n.canRename || n.canExport ? (c(), d("div", Ma)) : b("", !0),
5040
+ o("div", Ta, [
5164
5041
  o("button", {
5165
5042
  type: "button",
5166
5043
  class: "wm-mm__item",
@@ -5182,9 +5059,9 @@ function Fa(e, t, n, i, r, s) {
5182
5059
  o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
5183
5060
  ])
5184
5061
  ], -1)),
5185
- o("span", Na, v(s.t("moreMenu.sound")), 1),
5062
+ o("span", xa, v(s.t("moreMenu.sound")), 1),
5186
5063
  o("span", {
5187
- class: L(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
5064
+ class: I(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
5188
5065
  }, [...t[10] || (t[10] = [
5189
5066
  o("span", { class: "wm-mm__knob" }, null, -1)
5190
5067
  ])], 2)
@@ -5209,16 +5086,16 @@ function Fa(e, t, n, i, r, s) {
5209
5086
  o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
5210
5087
  ])
5211
5088
  ], -1)),
5212
- o("span", Pa, v(s.t("moreMenu.browserNotifications")), 1),
5089
+ o("span", Oa, v(s.t("moreMenu.browserNotifications")), 1),
5213
5090
  o("span", {
5214
- class: L(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
5091
+ class: I(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
5215
5092
  }, [...t[12] || (t[12] = [
5216
5093
  o("span", { class: "wm-mm__knob" }, null, -1)
5217
5094
  ])], 2)
5218
5095
  ])
5219
5096
  ]),
5220
5097
  t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
5221
- o("div", Ua, [
5098
+ o("div", Ia, [
5222
5099
  n.statusUrl ? (c(), d("button", {
5223
5100
  key: 0,
5224
5101
  type: "button",
@@ -5240,8 +5117,8 @@ function Fa(e, t, n, i, r, s) {
5240
5117
  o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
5241
5118
  ])
5242
5119
  ], -1)),
5243
- o("span", Da, v(s.t("moreMenu.serviceStatus")), 1)
5244
- ])) : w("", !0),
5120
+ o("span", Ea, v(s.t("moreMenu.serviceStatus")), 1)
5121
+ ])) : b("", !0),
5245
5122
  n.helpUrl ? (c(), d("button", {
5246
5123
  key: 1,
5247
5124
  type: "button",
@@ -5263,18 +5140,18 @@ function Fa(e, t, n, i, r, s) {
5263
5140
  o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
5264
5141
  ])
5265
5142
  ], -1)),
5266
- o("span", ja, v(s.t("moreMenu.helpCenter")), 1)
5267
- ])) : w("", !0)
5143
+ o("span", La, v(s.t("moreMenu.helpCenter")), 1)
5144
+ ])) : b("", !0)
5268
5145
  ])
5269
5146
  ])
5270
5147
  ]);
5271
5148
  }
5272
- const Ha = /* @__PURE__ */ R(Ta, [["render", Fa], ["__scopeId", "data-v-76281e95"]]), za = {
5149
+ const Ra = /* @__PURE__ */ R(wa, [["render", Ba], ["__scopeId", "data-v-76281e95"]]), Na = {
5273
5150
  name: "WmRenameDialog",
5274
5151
  inject: {
5275
5152
  // Translator shared by the Messenger shell; French fallback when
5276
5153
  // the component is used standalone.
5277
- t: { default: () => F() }
5154
+ t: { default: () => D() }
5278
5155
  },
5279
5156
  props: {
5280
5157
  // Empty defaults: the resolved fallback comes from the translator
@@ -5311,20 +5188,20 @@ const Ha = /* @__PURE__ */ R(Ta, [["render", Fa], ["__scopeId", "data-v-76281e95
5311
5188
  this.canSubmit && this.$emit("submit", this.value.trim());
5312
5189
  }
5313
5190
  }
5314
- }, qa = { class: "wm-dialog" }, Va = {
5191
+ }, Pa = { class: "wm-dialog" }, Ua = {
5315
5192
  class: "wm-dialog__card",
5316
5193
  role: "dialog",
5317
5194
  "aria-modal": "true"
5318
- }, $a = { class: "wm-dialog__head" }, Ka = { class: "wm-dialog__title" }, Wa = ["aria-label"], Ga = { class: "wm-dialog__body" }, Ya = ["placeholder"], Xa = { class: "wm-dialog__actions" }, Ja = ["disabled"];
5319
- function Qa(e, t, n, i, r, s) {
5320
- return c(), d("div", qa, [
5195
+ }, ja = { class: "wm-dialog__head" }, Fa = { class: "wm-dialog__title" }, Da = ["aria-label"], Ha = { class: "wm-dialog__body" }, za = ["placeholder"], $a = { class: "wm-dialog__actions" }, qa = ["disabled"];
5196
+ function Va(e, t, n, i, r, s) {
5197
+ return c(), d("div", Pa, [
5321
5198
  o("div", {
5322
5199
  class: "wm-dialog__scrim",
5323
5200
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
5324
5201
  }),
5325
- o("div", Va, [
5326
- o("div", $a, [
5327
- o("div", Ka, v(n.title || s.t("rename.title")), 1),
5202
+ o("div", Ua, [
5203
+ o("div", ja, [
5204
+ o("div", Fa, v(n.title || s.t("rename.title")), 1),
5328
5205
  o("button", {
5329
5206
  type: "button",
5330
5207
  class: "wm-dialog__close",
@@ -5344,9 +5221,9 @@ function Qa(e, t, n, i, r, s) {
5344
5221
  }, [
5345
5222
  o("path", { d: "M18 6L6 18M6 6l12 12" })
5346
5223
  ], -1)
5347
- ])], 8, Wa)
5224
+ ])], 8, Da)
5348
5225
  ]),
5349
- o("div", Ga, [
5226
+ o("div", Ha, [
5350
5227
  G(o("input", {
5351
5228
  ref: "input",
5352
5229
  "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
@@ -5358,11 +5235,11 @@ function Qa(e, t, n, i, r, s) {
5358
5235
  t[3] || (t[3] = fe(X((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
5359
5236
  t[4] || (t[4] = fe(X((a) => e.$emit("close"), ["prevent"]), ["esc"]))
5360
5237
  ]
5361
- }, null, 40, Ya), [
5238
+ }, null, 40, za), [
5362
5239
  [te, r.value]
5363
5240
  ])
5364
5241
  ]),
5365
- o("div", Xa, [
5242
+ o("div", $a, [
5366
5243
  o("button", {
5367
5244
  type: "button",
5368
5245
  class: "wm-dialog__btn",
@@ -5373,26 +5250,26 @@ function Qa(e, t, n, i, r, s) {
5373
5250
  class: "wm-dialog__btn wm-dialog__btn--primary",
5374
5251
  disabled: !s.canSubmit,
5375
5252
  onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
5376
- }, v(s.t("common.save")), 9, Ja)
5253
+ }, v(s.t("common.save")), 9, qa)
5377
5254
  ])
5378
5255
  ])
5379
5256
  ]);
5380
5257
  }
5381
- const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8"]]), Ne = "ww-messenger-tokens", eo = {
5258
+ const Ka = /* @__PURE__ */ R(Na, [["render", Va], ["__scopeId", "data-v-6d5f94a8"]]), Re = "ww-messenger-tokens", Wa = {
5382
5259
  name: "Messenger",
5383
5260
  components: {
5384
5261
  Launcher: Kt,
5385
5262
  Header: vn,
5386
- Onboarding: Jn,
5387
- History: ms,
5388
- MessageList: ai,
5389
- Composer: Si,
5390
- SuggestionChips: Oi,
5391
- ApprovalCard: ji,
5392
- FormCard: ha,
5393
- Feedback: Ma,
5394
- MoreMenu: Ha,
5395
- RenameDialog: Za
5263
+ Onboarding: qn,
5264
+ History: as,
5265
+ MessageList: Zr,
5266
+ Composer: vi,
5267
+ SuggestionChips: ki,
5268
+ ApprovalCard: Li,
5269
+ FormCard: ia,
5270
+ Feedback: ya,
5271
+ MoreMenu: Ra,
5272
+ RenameDialog: Ka
5396
5273
  },
5397
5274
  mixins: [
5398
5275
  pt,
@@ -5420,7 +5297,7 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
5420
5297
  },
5421
5298
  props: {
5422
5299
  // Hardcoded server default (overridable for staging/dev).
5423
- baseUrl: { type: String, default: rt },
5300
+ baseUrl: { type: String, default: nt },
5424
5301
  widgetId: { type: String, default: "" },
5425
5302
  // En mode iframe (modèle par défaut), `origin` et `token` ne sont
5426
5303
  // PAS des props : ils sont reçus via `postMessage` du parent
@@ -5543,7 +5420,7 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
5543
5420
  // 4. French.
5544
5421
  locale() {
5545
5422
  var e;
5546
- return Me(
5423
+ return Ae(
5547
5424
  this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
5548
5425
  );
5549
5426
  },
@@ -5551,7 +5428,7 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
5551
5428
  // `locale` changes. `t()` below (and the provided closure) delegate
5552
5429
  // to it so every string resolves against the current language.
5553
5430
  translator() {
5554
- return F(this.locale);
5431
+ return D(this.locale);
5555
5432
  },
5556
5433
  error() {
5557
5434
  var e;
@@ -5585,22 +5462,22 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
5585
5462
  var k;
5586
5463
  const r = e[i.id] || [], s = Y(i.last_read_message_id);
5587
5464
  let a = 0, l = null;
5588
- for (let b = r.length - 1; b >= 0; b--) {
5589
- const x = r[b];
5465
+ for (let w = r.length - 1; w >= 0; w--) {
5466
+ const x = r[w];
5590
5467
  if (!x) continue;
5591
5468
  if (((k = x.author) == null ? void 0 : k.type) === "user") break;
5592
- const E = Y(x.id);
5593
- if (E != null) {
5594
- if (s != null && E <= s) break;
5469
+ const L = Y(x.id);
5470
+ if (L != null) {
5471
+ if (s != null && L <= s) break;
5595
5472
  t[x.id] !== 0 && (!l && x.author && (l = x.author), a++);
5596
5473
  }
5597
5474
  }
5598
5475
  if (!r.length) {
5599
- const b = Y(i.last_message_id);
5600
- b != null && (s == null || b > s) && (a = 1, l = i.last_message_author || null);
5476
+ const w = Y(i.last_message_id);
5477
+ w != null && (s == null || w > s) && (a = 1, l = i.last_message_author || null);
5601
5478
  }
5602
5479
  const _ = r.filter(
5603
- (b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
5480
+ (w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
5604
5481
  );
5605
5482
  return {
5606
5483
  ...i,
@@ -5712,7 +5589,7 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
5712
5589
  rootStyle() {
5713
5590
  var t;
5714
5591
  const e = (t = this.widget) == null ? void 0 : t.primary_color;
5715
- return e && je(e) ? { "--wm-primary": e } : null;
5592
+ return e && at(e) ? { "--wm-primary": e } : null;
5716
5593
  },
5717
5594
  widgetWelcomeMessage() {
5718
5595
  var e;
@@ -5841,7 +5718,7 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
5841
5718
  const t = (_ = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : _.prepared_params;
5842
5719
  if (!t || typeof t != "object") return "";
5843
5720
  const n = Object.entries(t);
5844
- return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
5721
+ return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
5845
5722
  },
5846
5723
  actionInFlight() {
5847
5724
  var e, t;
@@ -5884,7 +5761,7 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
5884
5761
  }
5885
5762
  }
5886
5763
  return this.t("messageList.today", {
5887
- time: be(t, ne(this.locale))
5764
+ time: we(t, ae(this.locale))
5888
5765
  });
5889
5766
  },
5890
5767
  // Pagination state for the active conversation. Drives the
@@ -5989,9 +5866,9 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
5989
5866
  }
5990
5867
  },
5991
5868
  async mounted() {
5992
- if (typeof document < "u" && !document.getElementById(Ne)) {
5869
+ if (typeof document < "u" && !document.getElementById(Re)) {
5993
5870
  const e = document.createElement("style");
5994
- e.id = Ne, e.textContent = st, document.head.appendChild(e);
5871
+ e.id = Re, e.textContent = tt, document.head.appendChild(e);
5995
5872
  }
5996
5873
  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());
5997
5874
  },
@@ -6057,12 +5934,12 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
6057
5934
  return;
6058
5935
  }
6059
5936
  try {
6060
- await this.waitForParentInit(), this.transport = xe(
6061
- Qe({
5937
+ await this.waitForParentInit(), this.transport = Te(
5938
+ Xe({
6062
5939
  baseUrl: this.baseUrl,
6063
5940
  widgetId: this.widgetId
6064
5941
  })
6065
- ), this.store = xe(nt(this.transport)), this.hydrateNotifPref();
5942
+ ), this.store = Te(et(this.transport)), this.hydrateNotifPref();
6066
5943
  const e = this.parentVariables || this.context || null;
6067
5944
  if (await this.store.start({
6068
5945
  origin: this.parentOrigin,
@@ -6157,21 +6034,21 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
6157
6034
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6158
6035
  },
6159
6036
  sendCurrentLauncherSize() {
6160
- var b, x, E, A, q, M, U;
6037
+ var w, x, L, A, $, M, U;
6161
6038
  if (this.isOpen) return;
6162
- const e = (x = (b = this.$el) == null ? void 0 : b.querySelector) == null ? void 0 : x.call(b, ".wm-launcherWrap");
6039
+ const e = (x = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : x.call(w, ".wm-launcherWrap");
6163
6040
  if (!e) return;
6164
6041
  const t = e.getBoundingClientRect();
6165
6042
  if (!t.width || !t.height) return;
6166
- const n = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (U = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : U.call(M, ".wm-peek"), _ = l && l.length ? l[l.length - 1] : null;
6043
+ const n = (((L = this.launcherPeeks) == null ? void 0 : L.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = ($ = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : $.call(A, ".wm-launcher"), l = (U = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : U.call(M, ".wm-peek"), _ = l && l.length ? l[l.length - 1] : null;
6167
6044
  let k = null;
6168
6045
  if (_) {
6169
- const D = _.getBoundingClientRect();
6046
+ const j = _.getBoundingClientRect();
6170
6047
  k = {
6171
- width: Math.ceil(D.width),
6172
- height: Math.ceil(D.height),
6173
- rightOffset: Math.max(0, Math.ceil(t.right - D.right)),
6174
- bottomOffset: Math.max(0, Math.ceil(t.bottom - D.bottom))
6048
+ width: Math.ceil(j.width),
6049
+ height: Math.ceil(j.height),
6050
+ rightOffset: Math.max(0, Math.ceil(t.right - j.right)),
6051
+ bottomOffset: Math.max(0, Math.ceil(t.bottom - j.bottom))
6175
6052
  };
6176
6053
  }
6177
6054
  this.notifyParentResize("closed", {
@@ -6338,12 +6215,12 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
6338
6215
  async onFormSubmit({ values: e }) {
6339
6216
  const t = this.pendingForm;
6340
6217
  if (!(t != null && t.form)) return;
6341
- const n = dt(t.form, e, this.translator);
6218
+ const n = ct(t.form, e, this.translator);
6342
6219
  if (!n) return;
6343
6220
  let i = this.currentConv;
6344
6221
  i && (i._draft && (i = await this.ensureRealConv(), !i) || await this.store.send(i.id, n, {
6345
6222
  metadata: {
6346
- artifact: ut(
6223
+ artifact: dt(
6347
6224
  t.form,
6348
6225
  e,
6349
6226
  this.translator
@@ -6426,31 +6303,31 @@ const Za = /* @__PURE__ */ R(za, [["render", Qa], ["__scopeId", "data-v-6d5f94a8
6426
6303
  }
6427
6304
  }
6428
6305
  }
6429
- }, to = {
6306
+ }, Ga = {
6430
6307
  key: 0,
6431
6308
  class: "wm-loading",
6432
6309
  "aria-busy": "true",
6433
6310
  "aria-live": "polite"
6434
- }, no = ["aria-label"], so = {
6311
+ }, Ya = ["aria-label"], Xa = {
6435
6312
  key: 0,
6436
6313
  class: "wm-state"
6437
- }, ro = { class: "wm-state__err" }, io = { class: "wm-state__errTitle" }, ao = { class: "wm-state__errSub" }, oo = { class: "wm-bottom" }, lo = {
6314
+ }, Ja = { class: "wm-state__err" }, Qa = { class: "wm-state__errTitle" }, Za = { class: "wm-state__errSub" }, eo = { class: "wm-bottom" }, to = {
6438
6315
  key: 0,
6439
6316
  ref: "floatEl",
6440
6317
  class: "wm-float"
6441
- }, co = {
6318
+ }, no = {
6442
6319
  key: 1,
6443
6320
  class: "wm-actionWait",
6444
6321
  role: "status",
6445
6322
  "aria-live": "polite"
6446
- }, uo = { class: "wm-actionWait__lbl" }, ho = {
6323
+ }, so = { class: "wm-actionWait__lbl" }, ro = {
6447
6324
  key: 2,
6448
6325
  class: "wm-attached"
6449
- }, mo = ["aria-label", "onClick"];
6450
- function fo(e, t, n, i, r, s) {
6451
- const a = B("Launcher"), l = B("Header"), _ = B("History"), k = B("Onboarding"), b = B("MessageList"), x = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), M = B("Composer"), U = B("MoreMenu"), D = B("RenameDialog");
6326
+ }, io = ["aria-label", "onClick"];
6327
+ function ao(e, t, n, i, r, s) {
6328
+ const a = B("Launcher"), l = B("Header"), _ = B("History"), k = B("Onboarding"), w = B("MessageList"), x = B("ApprovalCard"), L = B("FormCard"), A = B("Feedback"), $ = B("SuggestionChips"), M = B("Composer"), U = B("MoreMenu"), j = B("RenameDialog");
6452
6329
  return c(), d("div", {
6453
- class: L(["wm-root", `wm-root--${n.displayMode}`]),
6330
+ class: I(["wm-root", `wm-root--${n.displayMode}`]),
6454
6331
  style: z(s.rootStyle)
6455
6332
  }, [
6456
6333
  !r.isOpen && !s.isEmbedded ? (c(), N(a, {
@@ -6460,10 +6337,10 @@ function fo(e, t, n, i, r, s) {
6460
6337
  onOpen: s.openFromPeek,
6461
6338
  onDismiss: s.dismissPeek,
6462
6339
  onHover: s.onLauncherHover
6463
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : w("", !0),
6340
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6464
6341
  r.isOpen || s.isEmbedded ? (c(), d("section", {
6465
6342
  key: 1,
6466
- class: L([
6343
+ class: I([
6467
6344
  "wm-panel",
6468
6345
  `wm-panel--${n.displayMode}`,
6469
6346
  { "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
@@ -6473,8 +6350,8 @@ function fo(e, t, n, i, r, s) {
6473
6350
  "aria-label": "Messenger",
6474
6351
  onClick: t[6] || (t[6] = (...P) => s.onPanelClick && s.onPanelClick(...P))
6475
6352
  }, [
6476
- !s.ready && !s.error ? (c(), d("div", to, [
6477
- s.isEmbedded ? w("", !0) : (c(), d("button", {
6353
+ !s.ready && !s.error ? (c(), d("div", Ga, [
6354
+ s.isEmbedded ? b("", !0) : (c(), d("button", {
6478
6355
  key: 0,
6479
6356
  type: "button",
6480
6357
  class: "wm-loading__close",
@@ -6494,13 +6371,13 @@ function fo(e, t, n, i, r, s) {
6494
6371
  }, [
6495
6372
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6496
6373
  ], -1)
6497
- ])], 8, no)),
6374
+ ])], 8, Ya)),
6498
6375
  t[8] || (t[8] = o("div", {
6499
6376
  class: "wm-loading__spinner",
6500
6377
  "aria-hidden": "true"
6501
6378
  }, null, -1))
6502
- ])) : (c(), d(I, { key: 1 }, [
6503
- $(l, {
6379
+ ])) : (c(), d(E, { key: 1 }, [
6380
+ V(l, {
6504
6381
  title: s.headerTitle,
6505
6382
  "team-members": s.teamMembers,
6506
6383
  "response-label": s.responseLabel,
@@ -6514,8 +6391,8 @@ function fo(e, t, n, i, r, s) {
6514
6391
  onMore: s.toggleMore,
6515
6392
  onClose: s.close
6516
6393
  }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
6517
- s.error ? (c(), d("div", so, [
6518
- o("div", ro, [
6394
+ s.error ? (c(), d("div", Xa, [
6395
+ o("div", Ja, [
6519
6396
  t[9] || (t[9] = o("div", { class: "wm-state__errIcon" }, [
6520
6397
  o("svg", {
6521
6398
  width: "14",
@@ -6532,16 +6409,16 @@ function fo(e, t, n, i, r, s) {
6532
6409
  ])
6533
6410
  ], -1)),
6534
6411
  o("div", null, [
6535
- o("div", io, v(s.t("error.connectionFailed")), 1),
6536
- o("div", ao, v(s.error), 1)
6412
+ o("div", Qa, v(s.t("error.connectionFailed")), 1),
6413
+ o("div", Za, v(s.error), 1)
6537
6414
  ])
6538
6415
  ])
6539
6416
  ])) : !s.currentConv && r.showHistory ? (c(), N(_, {
6540
6417
  key: 1,
6541
6418
  threads: s.openThreads,
6542
6419
  onResume: s.onDrawerPick
6543
- }, null, 8, ["threads", "onResume"])) : s.currentConv ? (c(), d(I, { key: 3 }, [
6544
- $(b, {
6420
+ }, null, 8, ["threads", "onResume"])) : s.currentConv ? (c(), d(E, { key: 3 }, [
6421
+ V(w, {
6545
6422
  ref: "messageList",
6546
6423
  messages: s.displayedMessages,
6547
6424
  "streaming-active": s.streamingActive,
@@ -6555,8 +6432,8 @@ function fo(e, t, n, i, r, s) {
6555
6432
  "ai-agent-avatar-url": s.agentAvatarUrl,
6556
6433
  onLoadMore: s.onLoadMore
6557
6434
  }, 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"]),
6558
- o("div", oo, [
6559
- s.floatVisible ? (c(), d("div", lo, [
6435
+ o("div", eo, [
6436
+ s.floatVisible ? (c(), d("div", to, [
6560
6437
  s.approvalReady ? (c(), N(x, {
6561
6438
  key: 0,
6562
6439
  action: s.approvalTitle,
@@ -6565,7 +6442,7 @@ function fo(e, t, n, i, r, s) {
6565
6442
  "agent-name": s.agentName,
6566
6443
  "agent-avatar-url": s.agentAvatarUrl,
6567
6444
  onCallback: s.onApprovalCallback
6568
- }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), N(E, {
6445
+ }, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), N(L, {
6569
6446
  key: s.pendingForm.message && s.pendingForm.message.id,
6570
6447
  form: s.pendingForm.form,
6571
6448
  "agent-name": s.agentName,
@@ -6576,18 +6453,18 @@ function fo(e, t, n, i, r, s) {
6576
6453
  busy: r.feedbackBusy,
6577
6454
  done: r.feedbackDone,
6578
6455
  onSubmit: s.onFeedback
6579
- }, null, 8, ["busy", "done", "onSubmit"])) : (c(), N(q, {
6456
+ }, null, 8, ["busy", "done", "onSubmit"])) : (c(), N($, {
6580
6457
  key: 3,
6581
6458
  items: s.suggestions,
6582
6459
  onSelect: s.onSuggestion
6583
6460
  }, null, 8, ["items", "onSelect"]))
6584
- ], 512)) : w("", !0),
6585
- s.actionInFlight ? (c(), d("div", co, [
6461
+ ], 512)) : b("", !0),
6462
+ s.actionInFlight ? (c(), d("div", no, [
6586
6463
  t[10] || (t[10] = o("span", {
6587
6464
  class: "wm-actionWait__spinner",
6588
6465
  "aria-hidden": "true"
6589
6466
  }, null, -1)),
6590
- o("span", uo, v(s.t("action.inProgress", {
6467
+ o("span", so, v(s.t("action.inProgress", {
6591
6468
  name: s.actionInFlightName
6592
6469
  })), 1)
6593
6470
  ])) : (c(), N(M, {
@@ -6615,16 +6492,16 @@ function fo(e, t, n, i, r, s) {
6615
6492
  onSoundToggle: e.onSoundToggle,
6616
6493
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6617
6494
  onAction: s.onMoreAction
6618
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0),
6619
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), N(D, {
6495
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0),
6496
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), N(j, {
6620
6497
  key: 1,
6621
6498
  "initial-value": s.currentConv.name || "",
6622
6499
  title: s.t("rename.dialogTitle"),
6623
6500
  onClose: t[4] || (t[4] = (P) => r.renameDialogOpen = !1),
6624
6501
  onSubmit: s.onRenameSubmit
6625
- }, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0),
6626
- r.pendingAttachments.length ? (c(), d("div", ho, [
6627
- (c(!0), d(I, null, j(r.pendingAttachments, (P, K) => (c(), d("div", {
6502
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
6503
+ r.pendingAttachments.length ? (c(), d("div", ro, [
6504
+ (c(!0), d(E, null, F(r.pendingAttachments, (P, K) => (c(), d("div", {
6628
6505
  key: K,
6629
6506
  class: "wm-attached__chip"
6630
6507
  }, [
@@ -6660,9 +6537,9 @@ function fo(e, t, n, i, r, s) {
6660
6537
  }, [
6661
6538
  o("path", { d: "M18 6L6 18M6 6l12 12" })
6662
6539
  ], -1)
6663
- ])], 8, mo)
6540
+ ])], 8, io)
6664
6541
  ]))), 128))
6665
- ])) : w("", !0)
6542
+ ])) : b("", !0)
6666
6543
  ], 64)) : (c(), N(k, {
6667
6544
  key: 2,
6668
6545
  "welcome-message": s.widgetWelcomeMessage,
@@ -6689,59 +6566,59 @@ function fo(e, t, n, i, r, s) {
6689
6566
  onSoundToggle: e.onSoundToggle,
6690
6567
  onBrowserNotifToggle: e.onBrowserNotifToggle,
6691
6568
  onAction: s.onMoreAction
6692
- }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0)
6569
+ }, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : b("", !0)
6693
6570
  ], 64))
6694
- ], 6)) : w("", !0)
6571
+ ], 6)) : b("", !0)
6695
6572
  ], 6);
6696
6573
  }
6697
- const po = /* @__PURE__ */ R(eo, [["render", fo], ["__scopeId", "data-v-543e7817"]]), vo = "0.5.47";
6574
+ const co = /* @__PURE__ */ R(Wa, [["render", ao], ["__scopeId", "data-v-543e7817"]]), uo = "0.5.49";
6698
6575
  export {
6699
6576
  oe as AIAvatar,
6700
- ye as AVATAR_COLORS,
6701
- Ss as ActionResult,
6702
- ji as ApprovalCard,
6703
- Rs as ArtifactFormResponse,
6704
- Ws as ArtifactInfoCard,
6705
- hr as ArtifactRenderer,
6706
- lr as ArtifactTicket,
6707
- Ar as AttachmentPreview,
6708
- xr as Bubble,
6709
- Si as Composer,
6710
- rt as DEFAULT_BASE_URL,
6577
+ ve as AVATAR_COLORS,
6578
+ vs as ActionResult,
6579
+ Li as ApprovalCard,
6580
+ Ts as ArtifactFormResponse,
6581
+ Ds as ArtifactInfoCard,
6582
+ ir as ArtifactRenderer,
6583
+ tr as ArtifactTicket,
6584
+ pr as AttachmentPreview,
6585
+ br as Bubble,
6586
+ vi as Composer,
6587
+ nt as DEFAULT_BASE_URL,
6711
6588
  ce as DEFAULT_LANGUAGE,
6712
- Ma as Feedback,
6713
- ha as FormCard,
6589
+ ya as Feedback,
6590
+ ia as FormCard,
6714
6591
  vn as Header,
6715
- _e as HumanAvatar,
6592
+ Se as HumanAvatar,
6716
6593
  Kt as Launcher,
6717
- Te as MEDIA_RECORDER_SUPPORTED,
6718
- ai as MessageList,
6719
- po as Messenger,
6720
- Ha as MoreMenu,
6721
- Jn as Onboarding,
6594
+ Me as MEDIA_RECORDER_SUPPORTED,
6595
+ Zr as MessageList,
6596
+ co as Messenger,
6597
+ Ra as MoreMenu,
6598
+ qn as Onboarding,
6722
6599
  ge as SCREEN_CAPTURE_SUPPORTED,
6723
- ct as SUPPORTED_LANGUAGES,
6724
- Oi as SuggestionChips,
6600
+ lt as SUPPORTED_LANGUAGES,
6601
+ ki as SuggestionChips,
6725
6602
  rn as TeamAvatars,
6726
- Er as Typing,
6727
- vo as VERSION,
6728
- Ae as avatarColor,
6729
- Se as avatarInitials,
6730
- li as captureScreenshotFile,
6603
+ Sr as Typing,
6604
+ uo as VERSION,
6605
+ ke as avatarColor,
6606
+ Ce as avatarInitials,
6607
+ ti as captureScreenshotFile,
6731
6608
  H as colors,
6732
- nt as createStore,
6733
- F as createTranslator,
6734
- Qe as createTransport,
6735
- ne as dateLocale,
6736
- po as default,
6737
- be as formatTime,
6738
- _o as guessAttachmentKind,
6739
- oi as pickRecorderMime,
6740
- ze as renderInlineMarkdown,
6609
+ et as createStore,
6610
+ D as createTranslator,
6611
+ Xe as createTransport,
6612
+ ae as dateLocale,
6613
+ co as default,
6614
+ we as formatTime,
6615
+ lo as guessAttachmentKind,
6616
+ ei as pickRecorderMime,
6617
+ ut as renderInlineMarkdown,
6741
6618
  ht as renderMarkdown,
6742
- Me as resolveLanguage,
6743
- di as startScreenRecording,
6744
- st as tokensCss,
6745
- tt as uuid,
6746
- tt as v4
6619
+ Ae as resolveLanguage,
6620
+ si as startScreenRecording,
6621
+ tt as tokensCss,
6622
+ Ze as uuid,
6623
+ Ze as v4
6747
6624
  };