@_solaris/messenger-widget 0.3.10 → 0.3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/messenger.js CHANGED
@@ -1,4 +1,4 @@
1
- import { reactive as Ie, openBlock as d, createElementBlock as c, normalizeStyle as q, normalizeClass as x, toDisplayString as b, resolveComponent as B, createVNode as W, Transition as Oe, withCtx as Be, Fragment as E, renderList as F, withKeys as oe, withModifiers as Y, createElementVNode as o, createCommentVNode as w, createBlock as R, withDirectives as H, vModelText as J, createTextVNode as he, resolveDynamicComponent as Ee, renderSlot as Le, vModelCheckbox as Re, vModelSelect as $e, createStaticVNode as ae, markRaw as _e } from "vue";
1
+ import { reactive as Ie, openBlock as d, createElementBlock as c, normalizeStyle as W, normalizeClass as x, toDisplayString as b, resolveComponent as E, createVNode as V, Transition as Oe, withCtx as Be, Fragment as B, renderList as F, withKeys as oe, withModifiers as Y, createElementVNode as o, createCommentVNode as w, createBlock as L, withDirectives as q, vModelText as J, createTextVNode as he, resolveDynamicComponent as Ee, renderSlot as $e, vModelCheckbox as Le, vModelSelect as Re, createStaticVNode as ae, markRaw as fe } from "vue";
2
2
  const Ne = [
3
3
  "connected",
4
4
  "message",
@@ -6,7 +6,7 @@ const Ne = [
6
6
  "conversation_updated",
7
7
  "config_updated",
8
8
  "action_status"
9
- ], pe = "/client", Fe = 5 * 60 * 1e3, De = 10 * 60 * 1e3, Pe = 5 * 60 * 1e3;
9
+ ], _e = "/client", Fe = 5 * 60 * 1e3, Pe = 10 * 60 * 1e3, De = 5 * 60 * 1e3;
10
10
  function je(e) {
11
11
  const t = {
12
12
  baseUrl: Ue(e.baseUrl || ""),
@@ -31,14 +31,14 @@ function je(e) {
31
31
  throw new Error(
32
32
  "[transport] baseUrl, widgetId, userId, userHash are all required"
33
33
  );
34
- function n(h, f) {
35
- return t.listeners.has(h) || t.listeners.set(h, /* @__PURE__ */ new Set()), t.listeners.get(h).add(f), () => t.listeners.get(h).delete(f);
34
+ function n(h, m) {
35
+ return t.listeners.has(h) || t.listeners.set(h, /* @__PURE__ */ new Set()), t.listeners.get(h).add(m), () => t.listeners.get(h).delete(m);
36
36
  }
37
- function i(h, f) {
37
+ function i(h, m) {
38
38
  const p = t.listeners.get(h);
39
39
  p && p.forEach((y) => {
40
40
  try {
41
- y(f);
41
+ y(m);
42
42
  } catch (M) {
43
43
  console.error("[transport] listener", h, M);
44
44
  }
@@ -54,15 +54,15 @@ function je(e) {
54
54
  "X-Widget-Id": t.widgetId
55
55
  };
56
56
  }
57
- async function a(h, f, p) {
58
- const y = await fetch(`${t.baseUrl}${pe}${f}`, {
57
+ async function a(h, m, p) {
58
+ const y = await fetch(`${t.baseUrl}${_e}${m}`, {
59
59
  method: h,
60
60
  headers: { "Content-Type": "application/json", ...s() },
61
61
  body: p !== void 0 ? JSON.stringify(p) : void 0
62
62
  });
63
63
  if (!y.ok) {
64
64
  const M = await l(y), I = new Error(
65
- `HTTP ${y.status} ${h} ${f} :: ${(M == null ? void 0 : M.error) || y.statusText}`
65
+ `HTTP ${y.status} ${h} ${m} :: ${(M == null ? void 0 : M.error) || y.statusText}`
66
66
  );
67
67
  throw I.status = y.status, I.body = M, I;
68
68
  }
@@ -76,7 +76,7 @@ function je(e) {
76
76
  }
77
77
  }
78
78
  async function g() {
79
- const [h, f] = await Promise.all([
79
+ const [h, m] = await Promise.all([
80
80
  // Public — no HMAC required.
81
81
  fetch(`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`).then(async (p) => {
82
82
  if (!p.ok) {
@@ -93,7 +93,7 @@ function je(e) {
93
93
  /** @type {import('./types.js').BootstrapConfig} */
94
94
  h
95
95
  ),
96
- customer: (f == null ? void 0 : f.customer) ?? null
96
+ customer: (m == null ? void 0 : m.customer) ?? null
97
97
  };
98
98
  }
99
99
  async function k() {
@@ -101,62 +101,62 @@ function je(e) {
101
101
  return (h == null ? void 0 : h.customer) ?? null;
102
102
  }
103
103
  async function C(h) {
104
- const f = await a("PATCH", "/customers/me", h);
105
- return (f == null ? void 0 : f.customer) ?? null;
104
+ const m = await a("PATCH", "/customers/me", h);
105
+ return (m == null ? void 0 : m.customer) ?? null;
106
106
  }
107
107
  async function T() {
108
108
  const h = await a("GET", "/conversations");
109
109
  return (h == null ? void 0 : h.conversations) ?? [];
110
110
  }
111
- async function $(h = {}) {
111
+ async function R(h = {}) {
112
112
  return (await a("POST", "/conversations", h)).conversation;
113
113
  }
114
114
  async function A(h) {
115
115
  return (await a("GET", `/conversations/${encodeURIComponent(h)}`)).conversation;
116
116
  }
117
- async function U(h, f) {
118
- return (await a("PATCH", `/conversations/${encodeURIComponent(h)}`, f)).conversation;
117
+ async function U(h, m) {
118
+ return (await a("PATCH", `/conversations/${encodeURIComponent(h)}`, m)).conversation;
119
119
  }
120
- async function S(h, f) {
121
- return (await a(
120
+ async function S(h, m) {
121
+ return a(
122
122
  "PATCH",
123
123
  `/conversations/${encodeURIComponent(h)}/read`,
124
- { message_id: f }
125
- )).conversation;
124
+ { message_id: m }
125
+ );
126
126
  }
127
- async function P(h, f = {}) {
127
+ async function D(h, m = {}) {
128
128
  const p = new URLSearchParams();
129
- f.before && p.set("before", f.before), f.since && p.set("since", f.since), f.limit && p.set("limit", String(f.limit));
129
+ m.before && p.set("before", m.before), m.since && p.set("since", m.since), m.limit && p.set("limit", String(m.limit));
130
130
  const y = p.toString() ? `?${p.toString()}` : "";
131
131
  return a(
132
132
  "GET",
133
133
  `/conversations/${encodeURIComponent(h)}/messages${y}`
134
134
  );
135
135
  }
136
- async function N(h, f) {
137
- V();
136
+ async function N(h, m) {
137
+ H();
138
138
  const p = {
139
- client_msg_id: f.client_msg_id,
139
+ client_msg_id: m.client_msg_id,
140
140
  type: "content",
141
- text_md: f.text_md,
141
+ text_md: m.text_md,
142
142
  author: { id: t.userId, type: "user" },
143
- created_at: f.created_at || (/* @__PURE__ */ new Date()).toISOString()
143
+ created_at: m.created_at || (/* @__PURE__ */ new Date()).toISOString()
144
144
  };
145
- return Array.isArray(f.attachments) && f.attachments.length && (p.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (p.metadata = f.metadata), a(
145
+ return Array.isArray(m.attachments) && m.attachments.length && (p.payload = { type: "content", attachments: m.attachments }), m.metadata && typeof m.metadata == "object" && (p.metadata = m.metadata), a(
146
146
  "POST",
147
147
  `/conversations/${encodeURIComponent(h)}/messages`,
148
148
  p
149
149
  );
150
150
  }
151
- async function j(h, f, p) {
152
- return V(), a(
151
+ async function j(h, m, p) {
152
+ return H(), a(
153
153
  "POST",
154
- `/messages/${encodeURIComponent(h)}/callbacks/${encodeURIComponent(f)}`,
154
+ `/messages/${encodeURIComponent(h)}/callbacks/${encodeURIComponent(m)}`,
155
155
  p ? { inputs: p } : {}
156
156
  );
157
157
  }
158
158
  async function K(h) {
159
- const f = (
159
+ const m = (
160
160
  /** @type {File} */
161
161
  h.name || "attachment"
162
162
  ), p = h.type || "application/octet-stream", y = h.size || 0, M = (
@@ -164,7 +164,7 @@ function je(e) {
164
164
  await a("POST", "/attachments", {
165
165
  mime_type: p,
166
166
  size_bytes: y,
167
- name: f
167
+ name: m
168
168
  })
169
169
  ), I = await fetch(M.upload_url, {
170
170
  method: "PUT",
@@ -174,7 +174,7 @@ function je(e) {
174
174
  if (!I.ok)
175
175
  throw new Error(`HTTP ${I.status} PUT signed upload`);
176
176
  return {
177
- type: ze(p),
177
+ type: Ve(p),
178
178
  path: M.path,
179
179
  mime_type: p,
180
180
  size_bytes: y
@@ -192,22 +192,22 @@ function je(e) {
192
192
  userHash: t.userHash,
193
193
  widgetId: t.widgetId
194
194
  }).toString();
195
- return `${t.baseUrl}${pe}/stream?${h}`;
195
+ return `${t.baseUrl}${_e}/stream?${h}`;
196
196
  }
197
197
  function z() {
198
198
  if (!t.eventSource && !(typeof document < "u" && document.hidden))
199
199
  try {
200
200
  const h = new EventSource(Z());
201
- for (const f of Ne)
202
- h.addEventListener(f, (p) => ee(f, p.data));
201
+ for (const m of Ne)
202
+ h.addEventListener(m, (p) => ee(m, p.data));
203
203
  h.addEventListener("error", () => i("error", new Error("SSE error"))), t.eventSource = h, r("open");
204
204
  } catch (h) {
205
205
  console.error("[transport] SSE open failed", h), i("error", h);
206
206
  }
207
207
  }
208
- function ee(h, f) {
208
+ function ee(h, m) {
209
209
  try {
210
- const p = JSON.parse(f), y = p && typeof p == "object" && "data" in p ? p.data : p;
210
+ const p = JSON.parse(m), y = p && typeof p == "object" && "data" in p ? p.data : p;
211
211
  i(h, y);
212
212
  } catch (p) {
213
213
  console.error("[transport] bad SSE payload", h, p);
@@ -216,21 +216,21 @@ function je(e) {
216
216
  function G() {
217
217
  t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
218
218
  }
219
- function V() {
219
+ function H() {
220
220
  clearTimeout(t.burstTimer), z(), t.panelOpen || (t.burstTimer = setTimeout(() => {
221
221
  t.panelOpen || G();
222
- }, De));
222
+ }, Pe));
223
223
  }
224
224
  function se(h) {
225
- t.panelOpen = !!h, t.panelOpen ? (clearTimeout(t.burstTimer), z()) : V();
225
+ t.panelOpen = !!h, t.panelOpen ? (clearTimeout(t.burstTimer), z()) : H();
226
226
  }
227
227
  async function ce() {
228
228
  try {
229
- const h = await T(), f = h.reduce((y, M) => {
229
+ const h = await T(), m = h.reduce((y, M) => {
230
230
  const I = M == null ? void 0 : M.last_message_at;
231
231
  return I && (!y || I > y) ? I : y;
232
232
  }, null);
233
- f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: h, latestAt: f }), V());
233
+ m && (!t.lastActivityAt || m > t.lastActivityAt) && (t.lastActivityAt = m, i("activity", { conversations: h, latestAt: m }), H());
234
234
  } catch (h) {
235
235
  console.error("[transport] poll failed", h);
236
236
  }
@@ -241,11 +241,11 @@ function je(e) {
241
241
  function u() {
242
242
  t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
243
243
  }
244
- function m() {
244
+ function f() {
245
245
  if (document.hidden)
246
246
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
247
247
  t.hiddenGraceTimer = null, document.hidden && (u(), G(), r("paused"));
248
- }, Pe);
248
+ }, De);
249
249
  else {
250
250
  if (t.hiddenGraceTimer) {
251
251
  clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
@@ -260,15 +260,15 @@ function je(e) {
260
260
  const h = await g();
261
261
  t.lastBootstrap = h;
262
262
  try {
263
- const f = await T();
264
- t.lastActivityAt = f.reduce((p, y) => {
263
+ const m = await T();
264
+ t.lastActivityAt = m.reduce((p, y) => {
265
265
  const M = y == null ? void 0 : y.last_message_at;
266
266
  return M && (!p || M > p) ? M : p;
267
267
  }, null);
268
- } catch (f) {
269
- console.error("[transport] initial /conversations failed", f);
268
+ } catch (m) {
269
+ console.error("[transport] initial /conversations failed", m);
270
270
  }
271
- return typeof document < "u" && (t.visibilityHandler = m, document.addEventListener("visibilitychange", t.visibilityHandler)), re(), h;
271
+ return typeof document < "u" && (t.visibilityHandler = f, document.addEventListener("visibilitychange", t.visibilityHandler)), re(), h;
272
272
  }
273
273
  function v() {
274
274
  u(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, G(), t.visibilityHandler && (document.removeEventListener("visibilitychange", t.visibilityHandler), t.visibilityHandler = null), t.started = !1;
@@ -283,11 +283,11 @@ function je(e) {
283
283
  getCustomer: k,
284
284
  patchCustomer: C,
285
285
  listConversations: T,
286
- createConversation: $,
286
+ createConversation: R,
287
287
  getConversation: A,
288
288
  patchConversation: U,
289
289
  markConversationRead: S,
290
- listMessages: P,
290
+ listMessages: D,
291
291
  postMessage: N,
292
292
  postCallback: j,
293
293
  uploadAttachment: K,
@@ -301,10 +301,10 @@ function je(e) {
301
301
  function Ue(e) {
302
302
  return e.endsWith("/") ? e.slice(0, -1) : e;
303
303
  }
304
- function ze(e) {
304
+ function Ve(e) {
305
305
  return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : "file";
306
306
  }
307
- function Ve() {
307
+ function ze() {
308
308
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
309
309
  return crypto.randomUUID();
310
310
  const e = new Uint8Array(16);
@@ -351,23 +351,23 @@ function He(e) {
351
351
  n.push(e.on("connection", (u) => {
352
352
  t.connection = u;
353
353
  })), n.push(e.on("message", (u) => {
354
- const m = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.message;
355
- !m || !(_ != null && _.id) || (z(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], V(m, _.created_at));
354
+ const f = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.message;
355
+ !f || !(_ != null && _.id) || (z(f, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], H(f, _.created_at));
356
356
  })), n.push(e.on("message_stream", (u) => {
357
- const m = u == null ? void 0 : u.message_id, _ = u == null ? void 0 : u.token;
358
- !m || typeof _ != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + _);
357
+ const f = u == null ? void 0 : u.message_id, _ = u == null ? void 0 : u.token;
358
+ !f || typeof _ != "string" || (t.streamingByMsgId[f] = (t.streamingByMsgId[f] || "") + _);
359
359
  })), n.push(e.on("conversation_updated", (u) => {
360
- const m = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.changes;
361
- if (!m || !_) return;
362
- const v = t.conversations.findIndex((h) => h.id === m);
360
+ const f = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.changes;
361
+ if (!f || !_) return;
362
+ const v = t.conversations.findIndex((h) => h.id === f);
363
363
  v !== -1 && (t.conversations[v] = { ...t.conversations[v], ..._ });
364
364
  })), n.push(e.on("config_updated", (u) => {
365
365
  u != null && u.config && (t.config = u.config);
366
366
  })), n.push(e.on("action_status", (u) => {
367
- const m = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.action_id, v = u == null ? void 0 : u.action_name;
368
- if (!m || !_) return;
369
- const h = t.runningActionsByConv[m] || {};
370
- u.state === "running" ? (h[_] = v || _, t.runningActionsByConv[m] = { ...h }) : u.state === "done" && (delete h[_], t.runningActionsByConv[m] = { ...h });
367
+ const f = u == null ? void 0 : u.conversation_id, _ = u == null ? void 0 : u.action_id, v = u == null ? void 0 : u.action_name;
368
+ if (!f || !_) return;
369
+ const h = t.runningActionsByConv[f] || {};
370
+ u.state === "running" ? (h[_] = v || _, t.runningActionsByConv[f] = { ...h }) : u.state === "done" && (delete h[_], t.runningActionsByConv[f] = { ...h });
371
371
  })), n.push(e.on("activity", (u) => {
372
372
  Array.isArray(u == null ? void 0 : u.conversations) && (t.conversations = u.conversations);
373
373
  }));
@@ -375,8 +375,8 @@ function He(e) {
375
375
  try {
376
376
  const u = new Promise(
377
377
  (_, v) => setTimeout(() => v(new Error("bootstrap timeout (15s) — check baseUrl, CORS, and network")), 15e3)
378
- ), m = await Promise.race([e.start(), u]);
379
- t.config = m.config, t.customer = m.customer, t.conversations = await Promise.race([e.listConversations(), u]), t.ready = !0;
378
+ ), f = await Promise.race([e.start(), u]);
379
+ t.config = f.config, t.customer = f.customer, t.conversations = await Promise.race([e.listConversations(), u]), t.ready = !0;
380
380
  } catch (u) {
381
381
  console.error("[store] start failed", u), t.error = (u == null ? void 0 : u.message) || String(u);
382
382
  }
@@ -390,10 +390,10 @@ function He(e) {
390
390
  e.stop();
391
391
  }
392
392
  async function s(u) {
393
- const m = ce(u);
394
- if (!m) return t.customer;
393
+ const f = ce(u);
394
+ if (!f) return t.customer;
395
395
  try {
396
- const _ = await e.patchCustomer(m);
396
+ const _ = await e.patchCustomer(f);
397
397
  _ && (t.customer = _);
398
398
  } catch (_) {
399
399
  console.error("[store] applyCustomer failed", _);
@@ -401,19 +401,19 @@ function He(e) {
401
401
  return t.customer;
402
402
  }
403
403
  async function a(u = {}) {
404
- const m = await e.createConversation(u), _ = t.conversations.findIndex((v) => v.id === m.id);
405
- return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
404
+ const f = await e.createConversation(u), _ = t.conversations.findIndex((v) => v.id === f.id);
405
+ return _ === -1 ? t.conversations = [f, ...t.conversations] : t.conversations[_] = f, f;
406
406
  }
407
407
  const l = 50;
408
408
  async function g(u) {
409
- const m = t.paginationByConv[u];
410
- if (!(m != null && m.loaded || m != null && m.loading)) {
409
+ const f = t.paginationByConv[u];
410
+ if (!(f != null && f.loaded || f != null && f.loading)) {
411
411
  C(u, { nextCursor: null, loading: !0, loaded: !1 });
412
412
  try {
413
- const _ = await e.listMessages(u, { limit: l }), v = (_ == null ? void 0 : _.messages) ?? [], h = t.messagesByConv[u] || [], f = /* @__PURE__ */ new Set();
413
+ const _ = await e.listMessages(u, { limit: l }), v = (_ == null ? void 0 : _.messages) ?? [], h = t.messagesByConv[u] || [], m = /* @__PURE__ */ new Set();
414
414
  for (const y of v)
415
- (y == null ? void 0 : y.id) != null && f.add(`id:${String(y.id)}`), y != null && y.client_msg_id && f.add(`c:${y.client_msg_id}`);
416
- const p = h.filter((y) => !((y == null ? void 0 : y.id) != null && f.has(`id:${String(y.id)}`) || y != null && y.client_msg_id && f.has(`c:${y.client_msg_id}`)));
415
+ (y == null ? void 0 : y.id) != null && m.add(`id:${String(y.id)}`), y != null && y.client_msg_id && m.add(`c:${y.client_msg_id}`);
416
+ const p = h.filter((y) => !((y == null ? void 0 : y.id) != null && m.has(`id:${String(y.id)}`) || y != null && y.client_msg_id && m.has(`c:${y.client_msg_id}`)));
417
417
  t.messagesByConv[u] = [...v, ...p].sort(se), C(u, {
418
418
  nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
419
419
  loading: !1,
@@ -426,50 +426,53 @@ function He(e) {
426
426
  }
427
427
  async function k(u) {
428
428
  var h;
429
- const m = t.paginationByConv[u];
430
- if (!m || m.loading || !m.nextCursor) return;
431
- const v = (h = (t.messagesByConv[u] || []).find((f) => f == null ? void 0 : f.created_at)) == null ? void 0 : h.created_at;
429
+ const f = t.paginationByConv[u];
430
+ if (!f || f.loading || !f.nextCursor) return;
431
+ const v = (h = (t.messagesByConv[u] || []).find((m) => m == null ? void 0 : m.created_at)) == null ? void 0 : h.created_at;
432
432
  if (v) {
433
- C(u, { ...m, loading: !0 });
433
+ C(u, { ...f, loading: !0 });
434
434
  try {
435
- const f = await e.listMessages(u, {
435
+ const m = await e.listMessages(u, {
436
436
  before: v,
437
437
  limit: l
438
- }), p = (f == null ? void 0 : f.messages) ?? [], y = t.messagesByConv[u] || [], M = /* @__PURE__ */ new Set();
438
+ }), p = (m == null ? void 0 : m.messages) ?? [], y = t.messagesByConv[u] || [], M = /* @__PURE__ */ new Set();
439
439
  for (const O of y)
440
440
  (O == null ? void 0 : O.id) != null && M.add(`id:${String(O.id)}`), O != null && O.client_msg_id && M.add(`c:${O.client_msg_id}`);
441
441
  const I = p.filter((O) => !((O == null ? void 0 : O.id) != null && M.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && M.has(`c:${O.client_msg_id}`)));
442
442
  t.messagesByConv[u] = [...I, ...y], C(u, {
443
- nextCursor: (f == null ? void 0 : f.next_cursor) ?? null,
443
+ nextCursor: (m == null ? void 0 : m.next_cursor) ?? null,
444
444
  loading: !1,
445
445
  loaded: !0
446
446
  });
447
- } catch (f) {
448
- console.error("[store] loadMore failed", f), C(u, { ...m, loading: !1 });
447
+ } catch (m) {
448
+ console.error("[store] loadMore failed", m), C(u, { ...f, loading: !1 });
449
449
  }
450
450
  }
451
451
  }
452
- function C(u, m) {
453
- t.paginationByConv = { ...t.paginationByConv, [u]: m };
452
+ function C(u, f) {
453
+ t.paginationByConv = { ...t.paginationByConv, [u]: f };
454
454
  }
455
- async function T(u, m) {
456
- const _ = await e.patchConversation(u, m), v = t.conversations.findIndex((h) => h.id === u);
455
+ async function T(u, f) {
456
+ const _ = await e.patchConversation(u, f), v = t.conversations.findIndex((h) => h.id === u);
457
457
  v !== -1 && (t.conversations[v] = _);
458
458
  }
459
- async function $(u, m) {
460
- if (!(!u || m == null))
459
+ async function R(u, f) {
460
+ if (!(!u || f == null))
461
461
  try {
462
- const _ = await e.markConversationRead(u, m), v = t.conversations.findIndex((h) => h.id === u);
463
- v !== -1 && (t.conversations[v] = _);
462
+ const _ = await e.markConversationRead(u, f), v = (_ == null ? void 0 : _.last_read_message_id) ?? f, h = t.conversations.findIndex((m) => (m == null ? void 0 : m.id) === u);
463
+ h !== -1 && (t.conversations[h] = {
464
+ ...t.conversations[h],
465
+ last_read_message_id: v
466
+ });
464
467
  } catch (_) {
465
468
  console.error("[store] markConversationRead failed", _);
466
469
  }
467
470
  }
468
- async function A(u, m, { attachments: _, metadata: v } = {}) {
471
+ async function A(u, f, { attachments: _, metadata: v } = {}) {
469
472
  var I;
470
- const h = (m || "").trim(), f = Array.isArray(_) && _.length > 0;
471
- if (!u || !h && !f) return;
472
- const p = Ve(), y = re(u), M = {
473
+ const h = (f || "").trim(), m = Array.isArray(_) && _.length > 0;
474
+ if (!u || !h && !m) return;
475
+ const p = ze(), y = re(u), M = {
473
476
  id: p,
474
477
  client_msg_id: p,
475
478
  conversation_id: u,
@@ -482,7 +485,7 @@ function He(e) {
482
485
  created_at: y,
483
486
  // Local-only flag — UI may render dimmed until the SSE echo lands.
484
487
  _pending: !0,
485
- ...f ? { payload: { type: "content", attachments: _ } } : {},
488
+ ...m ? { payload: { type: "content", attachments: _ } } : {},
486
489
  ...v && typeof v == "object" ? { metadata: v } : {}
487
490
  };
488
491
  z(u, M);
@@ -491,28 +494,28 @@ function He(e) {
491
494
  client_msg_id: p,
492
495
  text_md: h,
493
496
  created_at: y,
494
- ...f ? { attachments: _ } : {},
497
+ ...m ? { attachments: _ } : {},
495
498
  ...v && typeof v == "object" ? { metadata: v } : {}
496
499
  });
497
500
  } catch (O) {
498
501
  console.error("[store] send failed", O), G(u, p, { _failed: !0, _pending: !1 });
499
502
  }
500
503
  }
501
- async function U(u, m, _) {
504
+ async function U(u, f, _) {
502
505
  u != null && (t.awaitingCallback[u] = !0);
503
506
  try {
504
- await e.postCallback(u, m, _);
507
+ await e.postCallback(u, f, _);
505
508
  } catch (v) {
506
509
  console.error("[store] callback failed", v), u != null && delete t.awaitingCallback[u];
507
510
  }
508
511
  }
509
512
  const S = /* @__PURE__ */ new Map();
510
- async function P(u) {
513
+ async function D(u) {
511
514
  if (!u) return null;
512
- const m = S.get(u);
513
- if (m != null && m.url) {
514
- const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
515
- if (!_ || _ - Date.now() > 6e4) return m.url;
515
+ const f = S.get(u);
516
+ if (f != null && f.url) {
517
+ const _ = f.expires_at ? Date.parse(f.expires_at) : 0;
518
+ if (!_ || _ - Date.now() > 6e4) return f.url;
516
519
  }
517
520
  try {
518
521
  const _ = await e.signAttachment(u);
@@ -523,32 +526,32 @@ function He(e) {
523
526
  }
524
527
  return null;
525
528
  }
526
- async function N(u, { rating: m, comment: _ } = {}) {
527
- const v = t.conversations.find((p) => p.id === u), f = {
529
+ async function N(u, { rating: f, comment: _ } = {}) {
530
+ const v = t.conversations.find((p) => p.id === u), m = {
528
531
  ...(v == null ? void 0 : v.metadata) || {},
529
532
  feedback: {
530
- rating: m,
533
+ rating: f,
531
534
  comment: _ || null,
532
535
  submitted_at: (/* @__PURE__ */ new Date()).toISOString()
533
536
  }
534
537
  };
535
- await T(u, { metadata: f });
538
+ await T(u, { metadata: m });
536
539
  }
537
540
  function j(u) {
538
541
  var _, v;
539
- const m = t.messagesByConv[u] || [];
540
- for (let h = m.length - 1; h >= 0; h--) {
541
- const f = m[h];
542
- if ((f == null ? void 0 : f.type) === "action" && ((_ = f == null ? void 0 : f.payload) == null ? void 0 : _.type) === "action" && ((v = f == null ? void 0 : f.payload) == null ? void 0 : v.state) === "pending" && Array.isArray(f == null ? void 0 : f.callbacks) && f.callbacks.length > 0 && !t.awaitingCallback[f.id])
543
- return f;
542
+ const f = t.messagesByConv[u] || [];
543
+ for (let h = f.length - 1; h >= 0; h--) {
544
+ const m = f[h];
545
+ if ((m == null ? void 0 : m.type) === "action" && ((_ = m == null ? void 0 : m.payload) == null ? void 0 : _.type) === "action" && ((v = m == null ? void 0 : m.payload) == null ? void 0 : v.state) === "pending" && Array.isArray(m == null ? void 0 : m.callbacks) && m.callbacks.length > 0 && !t.awaitingCallback[m.id])
546
+ return m;
544
547
  }
545
548
  return null;
546
549
  }
547
550
  function K(u) {
548
551
  var _, v, h;
549
- const m = t.messagesByConv[u] || [];
550
- for (let f = m.length - 1; f >= 0; f--) {
551
- const p = m[f];
552
+ const f = t.messagesByConv[u] || [];
553
+ for (let m = f.length - 1; m >= 0; m--) {
554
+ const p = f[m];
552
555
  if (((_ = p == null ? void 0 : p.author) == null ? void 0 : _.type) === "user" || (p == null ? void 0 : p.type) === "action" && ((v = p == null ? void 0 : p.payload) == null ? void 0 : v.state) === "pending") return null;
553
556
  const y = (h = p == null ? void 0 : p.metadata) == null ? void 0 : h.form;
554
557
  if (y && Array.isArray(y.fields) && y.fields.length > 0)
@@ -557,22 +560,22 @@ function He(e) {
557
560
  return null;
558
561
  }
559
562
  function Q(u) {
560
- const m = t.runningActionsByConv[u];
561
- if (!m) return null;
562
- const _ = Object.keys(m);
563
+ const f = t.runningActionsByConv[u];
564
+ if (!f) return null;
565
+ const _ = Object.keys(f);
563
566
  if (_.length === 0) return null;
564
567
  const v = _[0];
565
- return { id: v, payload: { name: m[v] } };
568
+ return { id: v, payload: { name: f[v] } };
566
569
  }
567
570
  function Z(u) {
568
- var _, v, h, f;
569
- const m = t.messagesByConv[u] || [];
570
- for (let p = m.length - 1; p >= 0; p--) {
571
- const y = m[p];
571
+ var _, v, h, m;
572
+ const f = t.messagesByConv[u] || [];
573
+ for (let p = f.length - 1; p >= 0; p--) {
574
+ const y = f[p];
572
575
  if (((_ = y == null ? void 0 : y.author) == null ? void 0 : _.type) === "user") return [];
573
576
  if ((y == null ? void 0 : y.type) === "action" && ((v = y == null ? void 0 : y.payload) == null ? void 0 : v.state) === "pending") return [];
574
577
  if (((h = y == null ? void 0 : y.author) == null ? void 0 : h.type) !== "agent_ia") continue;
575
- const M = (f = y == null ? void 0 : y.metadata) == null ? void 0 : f.suggested_replies;
578
+ const M = (m = y == null ? void 0 : y.metadata) == null ? void 0 : m.suggested_replies;
576
579
  return Array.isArray(M) && M.length ? M.map((I) => {
577
580
  if (typeof I == "string") {
578
581
  const O = I.trim();
@@ -589,53 +592,53 @@ function He(e) {
589
592
  }
590
593
  return [];
591
594
  }
592
- function z(u, m) {
593
- var f;
595
+ function z(u, f) {
596
+ var m;
594
597
  const _ = t.messagesByConv[u] || [];
595
598
  let v = -1;
596
- m != null && m.client_msg_id && (v = _.findIndex(
597
- (p) => (p == null ? void 0 : p.client_msg_id) && p.client_msg_id === m.client_msg_id
598
- )), v === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (v = _.findIndex((p) => ee(p == null ? void 0 : p.id, m.id)));
599
+ f != null && f.client_msg_id && (v = _.findIndex(
600
+ (p) => (p == null ? void 0 : p.client_msg_id) && p.client_msg_id === f.client_msg_id
601
+ )), v === -1 && (f == null ? void 0 : f.id) !== void 0 && (f == null ? void 0 : f.id) !== null && (v = _.findIndex((p) => ee(p == null ? void 0 : p.id, f.id)));
599
602
  let h;
600
- v === -1 ? h = [..._, m].sort(se) : (h = _.slice(), h[v] = { ..._[v], ...m, _pending: !1, _failed: !1 }), t.messagesByConv[u] = h, (m == null ? void 0 : m.type) === "action" && ((f = m == null ? void 0 : m.payload) != null && f.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
603
+ v === -1 ? h = [..._, f].sort(se) : (h = _.slice(), h[v] = { ..._[v], ...f, _pending: !1, _failed: !1 }), t.messagesByConv[u] = h, (f == null ? void 0 : f.type) === "action" && ((m = f == null ? void 0 : f.payload) != null && m.state) && f.payload.state !== "pending" && (f == null ? void 0 : f.id) != null && t.awaitingCallback[f.id] && delete t.awaitingCallback[f.id];
601
604
  }
602
- function ee(u, m) {
603
- return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
605
+ function ee(u, f) {
606
+ return u === f ? !0 : u == null || f == null ? !1 : String(u) === String(f);
604
607
  }
605
- function G(u, m, _) {
608
+ function G(u, f, _) {
606
609
  const v = t.messagesByConv[u];
607
610
  if (!v) return;
608
- const h = v.findIndex((p) => p.id === m);
611
+ const h = v.findIndex((p) => p.id === f);
609
612
  if (h === -1) return;
610
- const f = v.slice();
611
- f[h] = { ...v[h], ..._ }, t.messagesByConv[u] = f;
613
+ const m = v.slice();
614
+ m[h] = { ...v[h], ..._ }, t.messagesByConv[u] = m;
612
615
  }
613
- function V(u, m) {
616
+ function H(u, f) {
614
617
  const _ = t.conversations.findIndex((h) => h.id === u);
615
618
  if (_ === -1) return;
616
619
  const v = t.conversations[_];
617
- if (m && (!v.last_message_at || m > v.last_message_at)) {
620
+ if (f && (!v.last_message_at || f > v.last_message_at)) {
618
621
  const h = t.conversations.slice();
619
- h[_] = { ...v, last_message_at: m }, h.sort(
620
- (f, p) => (p.last_message_at || "").localeCompare(f.last_message_at || "")
622
+ h[_] = { ...v, last_message_at: f }, h.sort(
623
+ (m, p) => (p.last_message_at || "").localeCompare(m.last_message_at || "")
621
624
  ), t.conversations = h;
622
625
  }
623
626
  }
624
- function se(u, m) {
625
- return (u.created_at || "").localeCompare(m.created_at || "");
627
+ function se(u, f) {
628
+ return (u.created_at || "").localeCompare(f.created_at || "");
626
629
  }
627
630
  function ce(u) {
628
631
  if (!u || typeof u != "object") return null;
629
- const m = {}, _ = {};
632
+ const f = {}, _ = {};
630
633
  for (const [v, h] of Object.entries(u))
631
- h !== void 0 && (v === "name" || v === "email" ? h != null && String(h).trim() !== "" && (m[v] = h) : (v === "values" || v === "metadata") && h && typeof h == "object" ? Object.assign(_, h) : _[v] = h);
632
- return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
634
+ h !== void 0 && (v === "name" || v === "email" ? h != null && String(h).trim() !== "" && (f[v] = h) : (v === "values" || v === "metadata") && h && typeof h == "object" ? Object.assign(_, h) : _[v] = h);
635
+ return Object.keys(_).length && (f.values = _), Object.keys(f).length ? f : null;
633
636
  }
634
637
  function re(u) {
635
- const m = t.messagesByConv[u] || [];
638
+ const f = t.messagesByConv[u] || [];
636
639
  let _ = "";
637
- for (const f of m)
638
- f != null && f.created_at && f.created_at > _ && (_ = f.created_at);
640
+ for (const m of f)
641
+ m != null && m.created_at && m.created_at > _ && (_ = m.created_at);
639
642
  const v = (/* @__PURE__ */ new Date()).toISOString();
640
643
  return !_ || v > _ ? v : new Date(Date.parse(_) + 1).toISOString();
641
644
  }
@@ -648,10 +651,10 @@ function He(e) {
648
651
  openConversation: g,
649
652
  loadMore: k,
650
653
  patchConversation: T,
651
- markConversationRead: $,
654
+ markConversationRead: R,
652
655
  send: A,
653
656
  clickCallback: U,
654
- signAttachment: P,
657
+ signAttachment: D,
655
658
  submitFeedback: N,
656
659
  getPendingApproval: j,
657
660
  getActionInFlight: Q,
@@ -661,7 +664,7 @@ function He(e) {
661
664
  setPanelOpen: e.setPanelOpen
662
665
  };
663
666
  }
664
- const D = {
667
+ const P = {
665
668
  w: "#ffffff",
666
669
  g50: "#F9F9F7",
667
670
  g100: "#F2F1EE",
@@ -678,13 +681,13 @@ const D = {
678
681
  red: "#B91C1C",
679
682
  redBg: "#FDECEC"
680
683
  }, ue = ["#5B5FEF", "#7C3AED", "#DB2777", "#0891B2", "#D97706", "#059669"];
681
- function Ce(e = "") {
684
+ function ke(e = "") {
682
685
  return e ? ue[e.charCodeAt(0) % ue.length] : ue[0];
683
686
  }
684
- function Ae(e = "") {
687
+ function Ce(e = "") {
685
688
  return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
686
689
  }
687
- function Se(e = /* @__PURE__ */ new Date()) {
690
+ function Ae(e = /* @__PURE__ */ new Date()) {
688
691
  return e.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
689
692
  }
690
693
  const qe = `
@@ -693,21 +696,21 @@ const qe = `
693
696
  .wm-root {
694
697
  --wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
695
698
  --wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
696
- --wm-w: ${D.w};
697
- --wm-g50: ${D.g50};
698
- --wm-g100: ${D.g100};
699
- --wm-g150: ${D.g150};
700
- --wm-g200: ${D.g200};
701
- --wm-g300: ${D.g300};
702
- --wm-g400: ${D.g400};
703
- --wm-g500: ${D.g500};
704
- --wm-g700: ${D.g700};
705
- --wm-g900: ${D.g900};
706
- --wm-a: ${D.accent};
707
- --wm-al: ${D.accentLight};
708
- --wm-green: ${D.green};
709
- --wm-red: ${D.red};
710
- --wm-redBg: ${D.redBg};
699
+ --wm-w: ${P.w};
700
+ --wm-g50: ${P.g50};
701
+ --wm-g100: ${P.g100};
702
+ --wm-g150: ${P.g150};
703
+ --wm-g200: ${P.g200};
704
+ --wm-g300: ${P.g300};
705
+ --wm-g400: ${P.g400};
706
+ --wm-g500: ${P.g500};
707
+ --wm-g700: ${P.g700};
708
+ --wm-g900: ${P.g900};
709
+ --wm-a: ${P.accent};
710
+ --wm-al: ${P.accentLight};
711
+ --wm-green: ${P.green};
712
+ --wm-red: ${P.red};
713
+ --wm-redBg: ${P.redBg};
711
714
  --wm-sh1: 0 1px 3px rgba(0,0,0,.06);
712
715
  --wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
713
716
  --wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
@@ -734,13 +737,13 @@ const qe = `
734
737
  100% { transform: translateX(0); opacity: 1; }
735
738
  }
736
739
  `, We = "https://api.messenger.victorc.fr";
737
- function ge(e, t) {
740
+ function pe(e, t) {
738
741
  if (!Array.isArray(e == null ? void 0 : e.options)) return t;
739
742
  const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
740
743
  return (n == null ? void 0 : n.label) || t;
741
744
  }
742
- function xe(e, t) {
743
- return Array.isArray(t) ? t.map((n) => ge(e, String(n))).join(", ") : typeof t == "boolean" ? t ? "Oui" : "Non" : ge(e, String(t));
745
+ function Se(e, t) {
746
+ return Array.isArray(t) ? t.map((n) => pe(e, String(n))).join(", ") : typeof t == "boolean" ? t ? "Oui" : "Non" : pe(e, String(t));
744
747
  }
745
748
  function Ke(e, t) {
746
749
  if (!e || !t) return "";
@@ -749,7 +752,7 @@ function Ke(e, t) {
749
752
  if (!(r != null && r.key) || !(r != null && r.label)) continue;
750
753
  const s = t[r.key];
751
754
  if (s == null || s === "") continue;
752
- const a = xe(r, s);
755
+ const a = Se(r, s);
753
756
  a && i.push(`${r.label} :
754
757
  ${a}`);
755
758
  }
@@ -763,7 +766,7 @@ function Ge(e, t) {
763
766
  if (!(r != null && r.key) || !(r != null && r.label)) continue;
764
767
  const s = t == null ? void 0 : t[r.key];
765
768
  if (s == null || s === "") continue;
766
- const a = xe(r, s);
769
+ const a = Se(r, s);
767
770
  if (!a) continue;
768
771
  const l = r.type === "textarea" || typeof a == "string" && (a.length > 60 || a.includes(`
769
772
  `));
@@ -787,7 +790,7 @@ function X(e) {
787
790
  const t = typeof e == "number" ? e : Number(e);
788
791
  return Number.isFinite(t) ? t : null;
789
792
  }
790
- function ve(e, t) {
793
+ function ge(e, t) {
791
794
  let n = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
792
795
  for (const i of t)
793
796
  i != null && i.created_at && i.created_at > n && (n = i.created_at);
@@ -1132,7 +1135,7 @@ function dt(e) {
1132
1135
  }
1133
1136
  return null;
1134
1137
  }
1135
- const L = (e, t) => {
1138
+ const $ = (e, t) => {
1136
1139
  const n = e.__vccOpts || e;
1137
1140
  for (const [i, r] of t)
1138
1141
  n[i] = r;
@@ -1151,17 +1154,17 @@ const L = (e, t) => {
1151
1154
  },
1152
1155
  computed: {
1153
1156
  bg() {
1154
- return this.avatarUrl ? "transparent" : Ce(this.name);
1157
+ return this.avatarUrl ? "transparent" : ke(this.name);
1155
1158
  },
1156
1159
  initials() {
1157
- return Ae(this.name);
1160
+ return Ce(this.name);
1158
1161
  }
1159
1162
  }
1160
1163
  }, ut = ["src", "alt"];
1161
1164
  function ht(e, t, n, i, r, s) {
1162
1165
  return d(), c("div", {
1163
1166
  class: x(["wm-huav", { "wm-huav--tail": n.tail }]),
1164
- style: q({
1167
+ style: W({
1165
1168
  width: n.size + "px",
1166
1169
  height: n.size + "px",
1167
1170
  "--wm-avr": Math.round(n.size * 0.32) + "px",
@@ -1174,13 +1177,13 @@ function ht(e, t, n, i, r, s) {
1174
1177
  alt: n.name || ""
1175
1178
  }, null, 8, ut)) : (d(), c("span", {
1176
1179
  key: 1,
1177
- style: q({ fontSize: n.size * 0.36 + "px" })
1180
+ style: W({ fontSize: n.size * 0.36 + "px" })
1178
1181
  }, b(s.initials), 5))
1179
1182
  ], 6);
1180
1183
  }
1181
- const me = /* @__PURE__ */ L(ct, [["render", ht], ["__scopeId", "data-v-07246775"]]), mt = 3, ft = {
1184
+ const xe = /* @__PURE__ */ $(ct, [["render", ht], ["__scopeId", "data-v-07246775"]]), mt = 3, ft = {
1182
1185
  name: "WmLauncher",
1183
- components: { HumanAvatar: me },
1186
+ components: { HumanAvatar: xe },
1184
1187
  props: {
1185
1188
  // Nombre de conversations non lues — pilote la pastille.
1186
1189
  unreadCount: { type: Number, default: 0 },
@@ -1201,18 +1204,18 @@ const me = /* @__PURE__ */ L(ct, [["render", ht], ["__scopeId", "data-v-07246775
1201
1204
  }
1202
1205
  }, _t = { class: "wm-launcherWrap" }, pt = ["aria-label", "onClick", "onKeydown"], gt = ["onClick"], vt = { class: "wm-peek__avatar" }, yt = ["aria-label"], wt = { class: "wm-peek__body" }, bt = { class: "wm-peek__head" }, kt = { class: "wm-peek__name" }, Ct = { class: "wm-peek__text" }, At = ["onClick"], St = ["aria-label"];
1203
1206
  function xt(e, t, n, i, r, s) {
1204
- const a = B("HumanAvatar");
1207
+ const a = E("HumanAvatar");
1205
1208
  return d(), c("div", _t, [
1206
- W(Oe, { name: "wm-peek" }, {
1209
+ V(Oe, { name: "wm-peek" }, {
1207
1210
  default: Be(() => [
1208
1211
  s.visiblePeeks.length ? (d(), c("div", {
1209
1212
  key: 0,
1210
1213
  class: x(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1211
1214
  }, [
1212
- (d(!0), c(E, null, F(s.visiblePeeks, (l, g) => (d(), c("div", {
1215
+ (d(!0), c(B, null, F(s.visiblePeeks, (l, g) => (d(), c("div", {
1213
1216
  key: l.convId,
1214
1217
  class: "wm-peek",
1215
- style: q({ "--depth": s.visiblePeeks.length - 1 - g, zIndex: g + 1 }),
1218
+ style: W({ "--depth": s.visiblePeeks.length - 1 - g, zIndex: g + 1 }),
1216
1219
  role: "button",
1217
1220
  tabindex: "0",
1218
1221
  "aria-label": `Ouvrir la conversation avec ${l.senderName || "l'agent"}`,
@@ -1243,7 +1246,7 @@ function xt(e, t, n, i, r, s) {
1243
1246
  ], -1)
1244
1247
  ])], 8, gt),
1245
1248
  o("div", vt, [
1246
- W(a, {
1249
+ V(a, {
1247
1250
  name: l.senderName,
1248
1251
  "avatar-url": l.senderAvatarUrl,
1249
1252
  size: 34
@@ -1298,7 +1301,7 @@ function xt(e, t, n, i, r, s) {
1298
1301
  ])
1299
1302
  ]);
1300
1303
  }
1301
- const Mt = /* @__PURE__ */ L(ft, [["render", xt], ["__scopeId", "data-v-525fd423"]]), Tt = {
1304
+ const Mt = /* @__PURE__ */ $(ft, [["render", xt], ["__scopeId", "data-v-525fd423"]]), Tt = {
1302
1305
  name: "WmAIAvatar",
1303
1306
  props: {
1304
1307
  size: { type: Number, default: 26 },
@@ -1317,7 +1320,7 @@ const Mt = /* @__PURE__ */ L(ft, [["render", xt], ["__scopeId", "data-v-525fd423
1317
1320
  function Bt(e, t, n, i, r, s) {
1318
1321
  return d(), c("div", {
1319
1322
  class: x(["wm-aiav", { "wm-aiav--tail": n.tail }]),
1320
- style: q({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
1323
+ style: W({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
1321
1324
  }, [
1322
1325
  n.pulse ? (d(), c("div", It)) : w("", !0),
1323
1326
  o("div", {
@@ -1353,7 +1356,7 @@ function Bt(e, t, n, i, r, s) {
1353
1356
  ], 2)
1354
1357
  ], 6);
1355
1358
  }
1356
- const ne = /* @__PURE__ */ L(Tt, [["render", Bt], ["__scopeId", "data-v-8c924688"]]), Et = {
1359
+ const ne = /* @__PURE__ */ $(Tt, [["render", Bt], ["__scopeId", "data-v-8c924688"]]), Et = {
1357
1360
  name: "WmTeamAvatars",
1358
1361
  props: {
1359
1362
  members: { type: Array, default: () => [] },
@@ -1369,48 +1372,45 @@ const ne = /* @__PURE__ */ L(Tt, [["render", Bt], ["__scopeId", "data-v-8c924688
1369
1372
  },
1370
1373
  methods: {
1371
1374
  colorFor(e) {
1372
- return e.avatar_url ? "transparent" : Ce(e.name || "");
1375
+ return e.avatar_url ? "transparent" : ke(e.name || "");
1373
1376
  },
1374
1377
  initialsFor(e) {
1375
- return Ae(e.name || "");
1378
+ return Ce(e.name || "");
1376
1379
  }
1377
1380
  }
1378
- }, Lt = {
1381
+ }, $t = {
1379
1382
  key: 0,
1380
1383
  class: "wm-team"
1381
- }, Rt = ["src", "alt"], $t = { key: 1 }, Nt = {
1384
+ }, Lt = ["src", "alt"], Rt = { key: 1 }, Nt = {
1382
1385
  key: 0,
1383
1386
  class: "wm-team__label"
1384
1387
  };
1385
1388
  function Ft(e, t, n, i, r, s) {
1386
- return s.visible ? (d(), c("div", Lt, [
1389
+ return s.visible ? (d(), c("div", $t, [
1387
1390
  o("div", {
1388
1391
  class: "wm-team__stack",
1389
- style: q({ width: s.stackWidth + "px" })
1392
+ style: W({ width: s.stackWidth + "px" })
1390
1393
  }, [
1391
- (d(!0), c(E, null, F(n.members.slice(0, 3), (a, l) => (d(), c("div", {
1394
+ (d(!0), c(B, null, F(n.members.slice(0, 3), (a, l) => (d(), c("div", {
1392
1395
  key: l,
1393
1396
  class: "wm-team__pill",
1394
- style: q({ left: l * 13 + "px", zIndex: 3 - l, background: s.colorFor(a) })
1397
+ style: W({ left: l * 13 + "px", zIndex: 3 - l, background: s.colorFor(a) })
1395
1398
  }, [
1396
1399
  a.avatar_url ? (d(), c("img", {
1397
1400
  key: 0,
1398
1401
  src: a.avatar_url,
1399
1402
  alt: a.name || ""
1400
- }, null, 8, Rt)) : (d(), c("span", $t, b(s.initialsFor(a)), 1))
1403
+ }, null, 8, Lt)) : (d(), c("span", Rt, b(s.initialsFor(a)), 1))
1401
1404
  ], 4))), 128))
1402
1405
  ], 4),
1403
1406
  n.responseLabel ? (d(), c("span", Nt, b(n.responseLabel), 1)) : w("", !0)
1404
1407
  ])) : w("", !0);
1405
1408
  }
1406
- const Dt = /* @__PURE__ */ L(Et, [["render", Ft], ["__scopeId", "data-v-3659b9c1"]]), Pt = {
1409
+ const Pt = /* @__PURE__ */ $(Et, [["render", Ft], ["__scopeId", "data-v-3659b9c1"]]), Dt = {
1407
1410
  name: "WmHeader",
1408
- components: { AIAvatar: ne, HumanAvatar: me, TeamAvatars: Dt },
1411
+ components: { AIAvatar: ne, TeamAvatars: Pt },
1409
1412
  props: {
1410
1413
  title: { type: String, default: "Nouvelle conversation" },
1411
- escalated: { type: Boolean, default: !1 },
1412
- agentName: { type: String, default: "" },
1413
- agentAvatarUrl: { type: String, default: null },
1414
1414
  showBack: { type: Boolean, default: !1 },
1415
1415
  teamMembers: { type: Array, default: () => [] },
1416
1416
  responseLabel: { type: String, default: "" },
@@ -1440,19 +1440,19 @@ const Dt = /* @__PURE__ */ L(Et, [["render", Ft], ["__scopeId", "data-v-3659b9c1
1440
1440
  }, jt = { class: "wm-header" }, Ut = {
1441
1441
  key: 1,
1442
1442
  style: { width: "30px", height: "30px", "flex-shrink": "0" }
1443
- }, zt = { class: "wm-header__avatar" }, Vt = { class: "wm-header__main" }, Ht = { class: "wm-header__title" }, qt = {
1443
+ }, Vt = { class: "wm-header__avatar" }, zt = { class: "wm-header__main" }, Ht = { class: "wm-header__title" }, qt = {
1444
1444
  key: 3,
1445
1445
  class: "wm-header__fill"
1446
1446
  }, Wt = { class: "wm-header__actions" };
1447
1447
  function Kt(e, t, n, i, r, s) {
1448
- const a = B("HumanAvatar"), l = B("AIAvatar"), g = B("TeamAvatars");
1448
+ const a = E("AIAvatar"), l = E("TeamAvatars");
1449
1449
  return d(), c("div", jt, [
1450
1450
  n.showBack ? (d(), c("button", {
1451
1451
  key: 0,
1452
1452
  type: "button",
1453
1453
  class: "wm-header__icon",
1454
1454
  "aria-label": "Retour à l'accueil",
1455
- onClick: t[0] || (t[0] = (k) => e.$emit("back"))
1455
+ onClick: t[0] || (t[0] = (g) => e.$emit("back"))
1456
1456
  }, [...t[3] || (t[3] = [
1457
1457
  o("svg", {
1458
1458
  width: "13",
@@ -1468,22 +1468,14 @@ function Kt(e, t, n, i, r, s) {
1468
1468
  o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
1469
1469
  ], -1)
1470
1470
  ])])) : (d(), c("div", Ut)),
1471
- n.showIdentity ? (d(), c(E, { key: 2 }, [
1472
- o("div", zt, [
1473
- n.escalated ? (d(), R(a, {
1474
- key: 0,
1475
- name: n.agentName,
1476
- "avatar-url": n.agentAvatarUrl,
1477
- size: 30
1478
- }, null, 8, ["name", "avatar-url"])) : (d(), R(l, {
1479
- key: 1,
1480
- size: 30
1481
- }))
1482
- ]),
1471
+ n.showIdentity ? (d(), c(B, { key: 2 }, [
1483
1472
  o("div", Vt, [
1473
+ V(a, { size: 30 })
1474
+ ]),
1475
+ o("div", zt, [
1484
1476
  o("div", Ht, b(n.title), 1)
1485
1477
  ]),
1486
- s.hasTeam ? (d(), R(g, {
1478
+ s.hasTeam ? (d(), L(l, {
1487
1479
  key: 0,
1488
1480
  members: s.displayedTeamMembers,
1489
1481
  "response-label": ""
@@ -1496,7 +1488,7 @@ function Kt(e, t, n, i, r, s) {
1496
1488
  class: x(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
1497
1489
  "aria-label": "Plus d'options",
1498
1490
  title: "Plus d'options",
1499
- onClick: t[1] || (t[1] = (k) => e.$emit("more"))
1491
+ onClick: t[1] || (t[1] = (g) => e.$emit("more"))
1500
1492
  }, [...t[4] || (t[4] = [
1501
1493
  o("svg", {
1502
1494
  width: "13",
@@ -1528,7 +1520,7 @@ function Kt(e, t, n, i, r, s) {
1528
1520
  class: "wm-header__icon",
1529
1521
  "aria-label": "Fermer le widget",
1530
1522
  title: "Fermer le widget",
1531
- onClick: t[2] || (t[2] = (k) => e.$emit("close"))
1523
+ onClick: t[2] || (t[2] = (g) => e.$emit("close"))
1532
1524
  }, [...t[5] || (t[5] = [
1533
1525
  o("svg", {
1534
1526
  width: "13",
@@ -1547,7 +1539,7 @@ function Kt(e, t, n, i, r, s) {
1547
1539
  ])
1548
1540
  ]);
1549
1541
  }
1550
- const Gt = /* @__PURE__ */ L(Pt, [["render", Kt], ["__scopeId", "data-v-d6406b84"]]), ye = {
1542
+ const Gt = /* @__PURE__ */ $(Dt, [["render", Kt], ["__scopeId", "data-v-ef4b443e"]]), ve = {
1551
1543
  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",
1552
1544
  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",
1553
1545
  status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
@@ -1590,7 +1582,7 @@ Je réponds en quelques secondes.`;
1590
1582
  },
1591
1583
  methods: {
1592
1584
  iconPath(e) {
1593
- return ye[e] || ye.link;
1585
+ return ve[e] || ve.link;
1594
1586
  },
1595
1587
  formatTs(e) {
1596
1588
  if (!e) return "";
@@ -1639,10 +1631,10 @@ Je réponds en quelques secondes.`;
1639
1631
  class: "wm-onb__empty"
1640
1632
  };
1641
1633
  function kn(e, t, n, i, r, s) {
1642
- const a = B("AIAvatar");
1634
+ const a = E("AIAvatar");
1643
1635
  return d(), c("div", Xt, [
1644
1636
  o("div", Jt, [
1645
- W(a, {
1637
+ V(a, {
1646
1638
  size: 56,
1647
1639
  pulse: !0
1648
1640
  }),
@@ -1679,7 +1671,7 @@ function kn(e, t, n, i, r, s) {
1679
1671
  o("div", {
1680
1672
  class: x(s.quickLinksLayout)
1681
1673
  }, [
1682
- (d(!0), c(E, null, F(n.quickLinks, (l, g) => (d(), c("button", {
1674
+ (d(!0), c(B, null, F(n.quickLinks, (l, g) => (d(), c("button", {
1683
1675
  key: g,
1684
1676
  type: "button",
1685
1677
  class: x(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
@@ -1717,7 +1709,7 @@ function kn(e, t, n, i, r, s) {
1717
1709
  o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
1718
1710
  ])
1719
1711
  ], -1)),
1720
- H(o("input", {
1712
+ q(o("input", {
1721
1713
  "onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
1722
1714
  type: "text",
1723
1715
  placeholder: "Rechercher dans vos messages",
@@ -1727,7 +1719,7 @@ function kn(e, t, n, i, r, s) {
1727
1719
  ])
1728
1720
  ]),
1729
1721
  o("div", mn, [
1730
- (d(!0), c(E, null, F(s.filteredThreads, (l) => (d(), c("button", {
1722
+ (d(!0), c(B, null, F(s.filteredThreads, (l) => (d(), c("button", {
1731
1723
  key: l.id,
1732
1724
  type: "button",
1733
1725
  class: "wm-onb__thread",
@@ -1778,7 +1770,7 @@ function kn(e, t, n, i, r, s) {
1778
1770
  ])) : w("", !0)
1779
1771
  ]);
1780
1772
  }
1781
- const Cn = /* @__PURE__ */ L(Yt, [["render", kn], ["__scopeId", "data-v-c85f6958"]]);
1773
+ const Cn = /* @__PURE__ */ $(Yt, [["render", kn], ["__scopeId", "data-v-c85f6958"]]);
1782
1774
  function An(e) {
1783
1775
  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();
1784
1776
  }
@@ -1838,8 +1830,8 @@ const Sn = {
1838
1830
  "stroke-width": "2.2",
1839
1831
  "stroke-linecap": "round",
1840
1832
  "stroke-linejoin": "round"
1841
- }, Bn = { class: "wm-result__body" }, En = { class: "wm-result__label" }, Ln = { class: "wm-result__detail" };
1842
- function Rn(e, t, n, i, r, s) {
1833
+ }, Bn = { class: "wm-result__body" }, En = { class: "wm-result__label" }, $n = { class: "wm-result__detail" };
1834
+ function Ln(e, t, n, i, r, s) {
1843
1835
  return d(), c("div", {
1844
1836
  class: x(["wm-result", `wm-result--${n.state}`])
1845
1837
  }, [
@@ -1873,17 +1865,17 @@ function Rn(e, t, n, i, r, s) {
1873
1865
  ]),
1874
1866
  o("span", Bn, [
1875
1867
  o("span", En, b(n.label), 1),
1876
- s.detailText ? (d(), c(E, { key: 0 }, [
1868
+ s.detailText ? (d(), c(B, { key: 0 }, [
1877
1869
  t[4] || (t[4] = o("span", {
1878
1870
  class: "wm-result__sep",
1879
1871
  "aria-hidden": "true"
1880
1872
  }, " · ", -1)),
1881
- o("span", Ln, b(s.detailText), 1)
1873
+ o("span", $n, b(s.detailText), 1)
1882
1874
  ], 64)) : w("", !0)
1883
1875
  ])
1884
1876
  ], 2);
1885
1877
  }
1886
- const $n = /* @__PURE__ */ L(Sn, [["render", Rn], ["__scopeId", "data-v-64a83fb8"]]), Nn = {
1878
+ const Rn = /* @__PURE__ */ $(Sn, [["render", Ln], ["__scopeId", "data-v-64a83fb8"]]), Nn = {
1887
1879
  name: "WmArtifactFormResponse",
1888
1880
  props: {
1889
1881
  data: { type: Object, required: !0 }
@@ -1894,11 +1886,11 @@ const $n = /* @__PURE__ */ L(Sn, [["render", Rn], ["__scopeId", "data-v-64a83fb8
1894
1886
  return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
1895
1887
  }
1896
1888
  }
1897
- }, Fn = { class: "wm-art wm-art--formResponse" }, Dn = { class: "wm-art__head" }, Pn = { class: "wm-art__title" }, jn = { class: "wm-art__body" }, Un = { class: "wm-art__fieldLabel" };
1898
- function zn(e, t, n, i, r, s) {
1889
+ }, Fn = { class: "wm-art wm-art--formResponse" }, Pn = { class: "wm-art__head" }, Dn = { class: "wm-art__title" }, jn = { class: "wm-art__body" }, Un = { class: "wm-art__fieldLabel" };
1890
+ function Vn(e, t, n, i, r, s) {
1899
1891
  return d(), c("div", Fn, [
1900
- o("div", Dn, [
1901
- o("div", Pn, b(n.data.title || "Formulaire"), 1),
1892
+ o("div", Pn, [
1893
+ o("div", Dn, b(n.data.title || "Formulaire"), 1),
1902
1894
  t[0] || (t[0] = o("span", { class: "wm-art__badge wm-art__badge--success" }, [
1903
1895
  o("svg", {
1904
1896
  width: "11",
@@ -1917,7 +1909,7 @@ function zn(e, t, n, i, r, s) {
1917
1909
  ], -1))
1918
1910
  ]),
1919
1911
  o("div", jn, [
1920
- (d(!0), c(E, null, F(s.fields, (a, l) => (d(), c("div", {
1912
+ (d(!0), c(B, null, F(s.fields, (a, l) => (d(), c("div", {
1921
1913
  key: l,
1922
1914
  class: "wm-art__field"
1923
1915
  }, [
@@ -1929,7 +1921,7 @@ function zn(e, t, n, i, r, s) {
1929
1921
  ])
1930
1922
  ]);
1931
1923
  }
1932
- const Vn = /* @__PURE__ */ L(Nn, [["render", zn], ["__scopeId", "data-v-ca24a9c9"]]), Hn = {
1924
+ const zn = /* @__PURE__ */ $(Nn, [["render", Vn], ["__scopeId", "data-v-ca24a9c9"]]), Hn = {
1933
1925
  name: "WmArtifactInfoCard",
1934
1926
  props: {
1935
1927
  data: { type: Object, required: !0 }
@@ -1978,7 +1970,7 @@ function ts(e, t, n, i, r, s) {
1978
1970
  ]),
1979
1971
  s.hasBody ? (d(), c("div", Qn, [
1980
1972
  n.data.body ? (d(), c("div", Zn, b(n.data.body), 1)) : w("", !0),
1981
- s.fields.length ? (d(!0), c(E, { key: 1 }, F(s.fields, (a, l) => (d(), c("div", {
1973
+ s.fields.length ? (d(!0), c(B, { key: 1 }, F(s.fields, (a, l) => (d(), c("div", {
1982
1974
  key: l,
1983
1975
  class: "wm-art__field"
1984
1976
  }, [
@@ -1990,7 +1982,7 @@ function ts(e, t, n, i, r, s) {
1990
1982
  ])) : w("", !0)
1991
1983
  ]);
1992
1984
  }
1993
- const ns = /* @__PURE__ */ L(Hn, [["render", ts], ["__scopeId", "data-v-d7369333"]]);
1985
+ const ns = /* @__PURE__ */ $(Hn, [["render", ts], ["__scopeId", "data-v-d7369333"]]);
1994
1986
  function ss(e) {
1995
1987
  if (!e) return "";
1996
1988
  const t = new Date(e);
@@ -2089,7 +2081,7 @@ function ps(e, t, n, i, r, s) {
2089
2081
  n.data.body ? (d(), c("div", cs, b(n.data.body), 1)) : w("", !0)
2090
2082
  ]),
2091
2083
  s.fields.length ? (d(), c("div", us, [
2092
- (d(!0), c(E, null, F(s.fields, (a, l) => (d(), c("div", {
2084
+ (d(!0), c(B, null, F(s.fields, (a, l) => (d(), c("div", {
2093
2085
  key: l,
2094
2086
  class: "wm-art__field"
2095
2087
  }, [
@@ -2166,8 +2158,8 @@ function ps(e, t, n, i, r, s) {
2166
2158
  ])) : w("", !0)
2167
2159
  ]);
2168
2160
  }
2169
- const gs = /* @__PURE__ */ L(rs, [["render", ps], ["__scopeId", "data-v-8b274eb7"]]), vs = {
2170
- form_response: Vn,
2161
+ const gs = /* @__PURE__ */ $(rs, [["render", ps], ["__scopeId", "data-v-8b274eb7"]]), vs = {
2162
+ form_response: zn,
2171
2163
  info_card: ns,
2172
2164
  ticket: gs
2173
2165
  }, ys = {
@@ -2186,12 +2178,12 @@ const gs = /* @__PURE__ */ L(rs, [["render", ps], ["__scopeId", "data-v-8b274eb7
2186
2178
  }
2187
2179
  };
2188
2180
  function ws(e, t, n, i, r, s) {
2189
- return s.component ? (d(), R(Ee(s.component), {
2181
+ return s.component ? (d(), L(Ee(s.component), {
2190
2182
  key: 0,
2191
2183
  data: n.artifact.data
2192
2184
  }, null, 8, ["data"])) : w("", !0);
2193
2185
  }
2194
- const bs = /* @__PURE__ */ L(ys, [["render", ws]]), ks = {
2186
+ const bs = /* @__PURE__ */ $(ys, [["render", ws]]), ks = {
2195
2187
  name: "WmAttachmentPreview",
2196
2188
  inject: {
2197
2189
  signAttachmentFn: { default: null }
@@ -2312,25 +2304,25 @@ function Es(e, t, n, i, r, s) {
2312
2304
  ], 8, Ms))
2313
2305
  ], 2);
2314
2306
  }
2315
- const Ls = /* @__PURE__ */ L(ks, [["render", Es], ["__scopeId", "data-v-1cd1267b"]]);
2316
- function Rs(e) {
2307
+ const $s = /* @__PURE__ */ $(ks, [["render", Es], ["__scopeId", "data-v-1cd1267b"]]);
2308
+ function Ls(e) {
2317
2309
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2318
2310
  }
2319
- function $s(e) {
2311
+ function Rs(e) {
2320
2312
  return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
2321
2313
  }
2322
- const we = "";
2314
+ const ye = "";
2323
2315
  function ie(e) {
2324
2316
  let t = e;
2325
2317
  const n = [];
2326
2318
  return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
2327
2319
  const s = n.length;
2328
- return n.push(r), `${we}CODE${s}${we}`;
2329
- }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => $s(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;
2320
+ return n.push(r), `${ye}CODE${s}${ye}`;
2321
+ }), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => Rs(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;
2330
2322
  }
2331
2323
  function Ns(e) {
2332
2324
  if (!e) return "";
2333
- const t = Rs(e).split(`
2325
+ const t = Ls(e).split(`
2334
2326
  `), n = [];
2335
2327
  let i = 0;
2336
2328
  for (; i < t.length; ) {
@@ -2366,8 +2358,8 @@ function Ns(e) {
2366
2358
  if (!A) break;
2367
2359
  C.push(A[1]), i++;
2368
2360
  }
2369
- const T = C.map((A) => `<li>${ie(A)}</li>`).join(""), $ = k !== 1 ? ` start="${k}"` : "";
2370
- n.push({ type: "block", html: `<ol class="wm-md-ol"${$}>${T}</ol>` });
2361
+ const T = C.map((A) => `<li>${ie(A)}</li>`).join(""), R = k !== 1 ? ` start="${k}"` : "";
2362
+ n.push({ type: "block", html: `<ol class="wm-md-ol"${R}>${T}</ol>` });
2371
2363
  continue;
2372
2364
  }
2373
2365
  const g = /^(#{1,6})\s+(.*)$/.exec(s);
@@ -2403,25 +2395,25 @@ const Fs = {
2403
2395
  return Ns(this.text);
2404
2396
  }
2405
2397
  }
2406
- }, Ds = ["innerHTML"];
2407
- function Ps(e, t, n, i, r, s) {
2398
+ }, Ps = ["innerHTML"];
2399
+ function Ds(e, t, n, i, r, s) {
2408
2400
  return d(), c("div", {
2409
2401
  class: x(["wm-bubble", "wm-bubble--" + n.role])
2410
2402
  }, [
2411
- Le(e.$slots, "default", {}, () => [
2412
- o("span", { innerHTML: s.rendered }, null, 8, Ds)
2403
+ $e(e.$slots, "default", {}, () => [
2404
+ o("span", { innerHTML: s.rendered }, null, 8, Ps)
2413
2405
  ], !0)
2414
2406
  ], 2);
2415
2407
  }
2416
- const js = /* @__PURE__ */ L(Fs, [["render", Ps], ["__scopeId", "data-v-5c9e9f2b"]]), Us = { name: "WmTyping" }, zs = { class: "wm-typing" };
2417
- function Vs(e, t, n, i, r, s) {
2418
- return d(), c("div", zs, [...t[0] || (t[0] = [
2408
+ const js = /* @__PURE__ */ $(Fs, [["render", Ds], ["__scopeId", "data-v-5c9e9f2b"]]), Us = { name: "WmTyping" }, Vs = { class: "wm-typing" };
2409
+ function zs(e, t, n, i, r, s) {
2410
+ return d(), c("div", Vs, [...t[0] || (t[0] = [
2419
2411
  o("span", { style: { "animation-delay": "0s" } }, null, -1),
2420
2412
  o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
2421
2413
  o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
2422
2414
  ])]);
2423
2415
  }
2424
- const Hs = /* @__PURE__ */ L(Us, [["render", Vs], ["__scopeId", "data-v-df2447fd"]]);
2416
+ const Hs = /* @__PURE__ */ $(Us, [["render", zs], ["__scopeId", "data-v-df2447fd"]]);
2425
2417
  function te(e) {
2426
2418
  return e ? e.client_msg_id || e.id : "";
2427
2419
  }
@@ -2434,7 +2426,7 @@ const qs = {
2434
2426
  idle: "Conversation en pause"
2435
2427
  }, Ws = 80, Ks = 200, Gs = {
2436
2428
  name: "WmMessageList",
2437
- components: { AIAvatar: ne, HumanAvatar: me, Bubble: js, Typing: Hs, ActionResult: $n, AttachmentPreview: Ls, ArtifactRenderer: bs },
2429
+ components: { AIAvatar: ne, HumanAvatar: xe, Bubble: js, Typing: Hs, ActionResult: Rn, AttachmentPreview: $s, ArtifactRenderer: bs },
2438
2430
  props: {
2439
2431
  messages: { type: Array, default: () => [] },
2440
2432
  streamingActive: { type: Boolean, default: !1 },
@@ -2755,9 +2747,9 @@ const qs = {
2755
2747
  // doit garder son arrondi.
2756
2748
  cornersFor(e, t) {
2757
2749
  var Q, Z, z;
2758
- const n = e.items, i = (Q = n[t]) == null ? void 0 : Q.kind, r = (Z = n[t - 1]) == null ? void 0 : Z.kind, s = (z = n[t + 1]) == null ? void 0 : z.kind, a = e.role === "user", l = 14, g = 4, k = r == null ? void 0 : r.bottom, C = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], $ = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], U = 0.5, S = (ee, G, V) => ee != null && T != null ? ee + U >= T : G === V || G === "card" && V === "bubble";
2759
- let P = l, N = l, j = l, K = l;
2760
- return a ? (k && (N = g), (C || !s) && (j = g), k && S($, k, i == null ? void 0 : i.top) && (P = g), C && S(A, C, i == null ? void 0 : i.bottom) && (K = g)) : (k && (P = g), (C || !s) && (K = g), k && S($, k, i == null ? void 0 : i.top) && (N = g), C && S(A, C, i == null ? void 0 : i.bottom) && (j = g)), { tl: P, tr: N, br: j, bl: K };
2750
+ const n = e.items, i = (Q = n[t]) == null ? void 0 : Q.kind, r = (Z = n[t - 1]) == null ? void 0 : Z.kind, s = (z = n[t + 1]) == null ? void 0 : z.kind, a = e.role === "user", l = 14, g = 4, k = r == null ? void 0 : r.bottom, C = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], R = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], U = 0.5, S = (ee, G, H) => ee != null && T != null ? ee + U >= T : G === H || G === "card" && H === "bubble";
2751
+ let D = l, N = l, j = l, K = l;
2752
+ return a ? (k && (N = g), (C || !s) && (j = g), k && S(R, k, i == null ? void 0 : i.top) && (D = g), C && S(A, C, i == null ? void 0 : i.bottom) && (K = g)) : (k && (D = g), (C || !s) && (K = g), k && S(R, k, i == null ? void 0 : i.top) && (N = g), C && S(A, C, i == null ? void 0 : i.bottom) && (j = g)), { tl: D, tr: N, br: j, bl: K };
2761
2753
  },
2762
2754
  // Inline style emitting the four corner CSS variables. Set on
2763
2755
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
@@ -2819,7 +2811,7 @@ const qs = {
2819
2811
  const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
2820
2812
  if (!(n != null && n.created_at)) return "";
2821
2813
  try {
2822
- return Se(new Date(n.created_at));
2814
+ return Ae(new Date(n.created_at));
2823
2815
  } catch {
2824
2816
  return "";
2825
2817
  }
@@ -2902,7 +2894,7 @@ const qs = {
2902
2894
  class: "wm-list__row wm-list__row--ai fade-up"
2903
2895
  }, dr = { class: "wm-list__avatarSlot" };
2904
2896
  function cr(e, t, n, i, r, s) {
2905
- const a = B("AIAvatar"), l = B("HumanAvatar"), g = B("ActionResult"), k = B("ArtifactRenderer"), C = B("Bubble"), T = B("AttachmentPreview"), $ = B("Typing");
2897
+ const a = E("AIAvatar"), l = E("HumanAvatar"), g = E("ActionResult"), k = E("ArtifactRenderer"), C = E("Bubble"), T = E("AttachmentPreview"), R = E("Typing");
2906
2898
  return d(), c("div", {
2907
2899
  ref: "scrollEl",
2908
2900
  class: x(["wm-list", { "wm-list--silent": r.silentFades }]),
@@ -2920,7 +2912,7 @@ function cr(e, t, n, i, r, s) {
2920
2912
  o("span", Qs, b(n.dateLabel), 1),
2921
2913
  t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
2922
2914
  ])) : w("", !0),
2923
- (d(!0), c(E, null, F(s.groups, (A, U) => (d(), c(E, {
2915
+ (d(!0), c(B, null, F(s.groups, (A, U) => (d(), c(B, {
2924
2916
  key: A.key
2925
2917
  }, [
2926
2918
  A.key === s.unreadGroupKey ? (d(), c("div", Zs, [...t[4] || (t[4] = [
@@ -2936,20 +2928,20 @@ function cr(e, t, n, i, r, s) {
2936
2928
  t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
2937
2929
  o("span", tr, b(A.systemLabel), 1),
2938
2930
  t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
2939
- ])) : (d(), c(E, { key: 1 }, [
2940
- (d(!0), c(E, null, F(A.items, (S, P) => (d(), c("div", {
2931
+ ])) : (d(), c(B, { key: 1 }, [
2932
+ (d(!0), c(B, null, F(A.items, (S, D) => (d(), c("div", {
2941
2933
  key: `${s.messageKey(S.message)}-${S.partKey}`,
2942
2934
  "data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
2943
2935
  class: x(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": S.message._pending, "is-failed": S.message._failed }]]),
2944
- style: q(s.cornersStyle(A, P))
2936
+ style: W(s.cornersStyle(A, D))
2945
2937
  }, [
2946
2938
  A.role !== "user" ? (d(), c("div", sr, [
2947
- P === A.items.length - 1 ? (d(), c(E, { key: 0 }, [
2948
- A.role === "ai" ? (d(), R(a, {
2939
+ D === A.items.length - 1 ? (d(), c(B, { key: 0 }, [
2940
+ A.role === "ai" ? (d(), L(a, {
2949
2941
  key: 0,
2950
2942
  size: 26,
2951
2943
  tail: !0
2952
- })) : (d(), R(l, {
2944
+ })) : (d(), L(l, {
2953
2945
  key: 1,
2954
2946
  name: A.agentName,
2955
2947
  "avatar-url": A.agentAvatarUrl,
@@ -2958,24 +2950,24 @@ function cr(e, t, n, i, r, s) {
2958
2950
  }, null, 8, ["name", "avatar-url"]))
2959
2951
  ], 64)) : w("", !0)
2960
2952
  ])) : w("", !0),
2961
- S.renderAs === "action" ? (d(), R(g, {
2953
+ S.renderAs === "action" ? (d(), L(g, {
2962
2954
  key: 1,
2963
2955
  state: S.message.payload.state,
2964
2956
  label: s.actionLabel(S.message),
2965
2957
  detail: s.actionDetail(S.message)
2966
- }, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (d(), R(g, {
2958
+ }, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (d(), L(g, {
2967
2959
  key: 2,
2968
2960
  state: "awaiting",
2969
2961
  label: "Demande d'approbation envoyée",
2970
2962
  detail: S.message.text_md || ""
2971
- }, null, 8, ["detail"])) : S.renderAs === "artifact-of-action" ? (d(), R(k, {
2963
+ }, null, 8, ["detail"])) : S.renderAs === "artifact-of-action" ? (d(), L(k, {
2972
2964
  key: 3,
2973
2965
  artifact: s.actionArtifact(S.message)
2974
- }, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (d(), R(k, {
2966
+ }, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (d(), L(k, {
2975
2967
  key: 4,
2976
2968
  artifact: s.artifactOf(S.message)
2977
2969
  }, null, 8, ["artifact"])) : (d(), c("div", rr, [
2978
- S.message.text_md ? (d(), R(C, {
2970
+ S.message.text_md ? (d(), L(C, {
2979
2971
  key: 0,
2980
2972
  role: A.role,
2981
2973
  text: S.message.text_md
@@ -2984,7 +2976,7 @@ function cr(e, t, n, i, r, s) {
2984
2976
  key: 1,
2985
2977
  class: x(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
2986
2978
  }, [
2987
- (d(!0), c(E, null, F(s.attachmentsOf(S.message), (N, j) => (d(), R(T, {
2979
+ (d(!0), c(B, null, F(s.attachmentsOf(S.message), (N, j) => (d(), L(T, {
2988
2980
  key: `${s.messageKey(S.message)}-att-${j}`,
2989
2981
  attachment: N
2990
2982
  }, null, 8, ["attachment"]))), 128))
@@ -3004,18 +2996,18 @@ function cr(e, t, n, i, r, s) {
3004
2996
  ], 64))), 128)),
3005
2997
  n.streamingActive ? (d(), c("div", lr, [
3006
2998
  o("div", dr, [
3007
- W(a, {
2999
+ V(a, {
3008
3000
  size: 26,
3009
3001
  tail: !0
3010
3002
  })
3011
3003
  ]),
3012
- W($)
3004
+ V(R)
3013
3005
  ])) : w("", !0)
3014
3006
  ], 34);
3015
3007
  }
3016
- const ur = /* @__PURE__ */ L(Gs, [["render", cr], ["__scopeId", "data-v-946babe3"]]), de = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", fe = typeof window < "u" && typeof window.MediaRecorder < "u";
3008
+ const ur = /* @__PURE__ */ $(Gs, [["render", cr], ["__scopeId", "data-v-946babe3"]]), de = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", me = typeof window < "u" && typeof window.MediaRecorder < "u";
3017
3009
  function hr() {
3018
- return fe && [
3010
+ return me && [
3019
3011
  "video/webm;codecs=vp9,opus",
3020
3012
  "video/webm;codecs=vp8,opus",
3021
3013
  "video/webm",
@@ -3067,7 +3059,7 @@ async function fr(e) {
3067
3059
  }
3068
3060
  async function _r(e = {}) {
3069
3061
  var k;
3070
- if (!de || !fe) return null;
3062
+ if (!de || !me) return null;
3071
3063
  let t;
3072
3064
  try {
3073
3065
  t = await navigator.mediaDevices.getDisplayMedia(Me({ audio: !0 }));
@@ -3089,11 +3081,11 @@ async function _r(e = {}) {
3089
3081
  C.data && C.data.size > 0 && r.push(C.data);
3090
3082
  }), i.addEventListener("stop", () => {
3091
3083
  var C, T;
3092
- if (s && clearInterval(s), t.getTracks().forEach(($) => {
3093
- $.stop();
3084
+ if (s && clearInterval(s), t.getTracks().forEach((R) => {
3085
+ R.stop();
3094
3086
  }), r.length) {
3095
- const $ = i.mimeType || n || "video/webm", A = new Blob(r, { type: $ }), U = /mp4/.test($) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), P = new File([A], `ecran-${S}.${U}`, { type: $ });
3096
- (C = e.onfinalize) == null || C.call(e, P);
3087
+ const R = i.mimeType || n || "video/webm", A = new Blob(r, { type: R }), U = /mp4/.test(R) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${S}.${U}`, { type: R });
3088
+ (C = e.onfinalize) == null || C.call(e, D);
3097
3089
  } else
3098
3090
  (T = e.oncancel) == null || T.call(e);
3099
3091
  }), t.getVideoTracks().forEach((C) => {
@@ -3167,7 +3159,7 @@ const pr = [
3167
3159
  attachItems() {
3168
3160
  return pr.map((e) => ({
3169
3161
  ...e,
3170
- disabled: e.action === "screenshot" && !de || e.action === "record" && (!de || !fe)
3162
+ disabled: e.action === "screenshot" && !de || e.action === "record" && (!de || !me)
3171
3163
  }));
3172
3164
  },
3173
3165
  recordingElapsedLabel() {
@@ -3312,7 +3304,7 @@ function Or(e, t, n, i, r, s) {
3312
3304
  onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
3313
3305
  })) : w("", !0),
3314
3306
  r.attachOpen ? (d(), c("div", br, [
3315
- (d(!0), c(E, null, F(s.attachItems, (a) => (d(), c("button", {
3307
+ (d(!0), c(B, null, F(s.attachItems, (a) => (d(), c("button", {
3316
3308
  key: a.action,
3317
3309
  type: "button",
3318
3310
  class: "wm-compose__menuItem",
@@ -3334,7 +3326,7 @@ function Or(e, t, n, i, r, s) {
3334
3326
  o("span", null, b(a.label), 1)
3335
3327
  ], 8, kr))), 128))
3336
3328
  ])) : w("", !0),
3337
- H(o("textarea", {
3329
+ q(o("textarea", {
3338
3330
  ref: "inputEl",
3339
3331
  "onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
3340
3332
  class: "wm-compose__input",
@@ -3393,7 +3385,7 @@ function Or(e, t, n, i, r, s) {
3393
3385
  ], 34)
3394
3386
  ]);
3395
3387
  }
3396
- const Br = /* @__PURE__ */ L(gr, [["render", Or], ["__scopeId", "data-v-14fa9ec0"]]), Er = {
3388
+ const Br = /* @__PURE__ */ $(gr, [["render", Or], ["__scopeId", "data-v-14fa9ec0"]]), Er = {
3397
3389
  name: "WmSuggestionChips",
3398
3390
  props: {
3399
3391
  items: { type: Array, default: () => [] },
@@ -3410,22 +3402,22 @@ const Br = /* @__PURE__ */ L(gr, [["render", Or], ["__scopeId", "data-v-14fa9ec0
3410
3402
  return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
3411
3403
  }
3412
3404
  }
3413
- }, Lr = ["onClick"];
3414
- function Rr(e, t, n, i, r, s) {
3405
+ }, $r = ["onClick"];
3406
+ function Lr(e, t, n, i, r, s) {
3415
3407
  return n.items.length ? (d(), c("div", {
3416
3408
  key: s.batchKey,
3417
3409
  class: "wm-chips"
3418
3410
  }, [
3419
- (d(!0), c(E, null, F(n.items, (a, l) => (d(), c("button", {
3411
+ (d(!0), c(B, null, F(n.items, (a, l) => (d(), c("button", {
3420
3412
  key: l,
3421
3413
  type: "button",
3422
3414
  class: "wm-chip",
3423
- style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
3415
+ style: W({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
3424
3416
  onClick: (g) => e.$emit("select", a)
3425
- }, b(a.label), 13, Lr))), 128))
3417
+ }, b(a.label), 13, $r))), 128))
3426
3418
  ])) : w("", !0);
3427
3419
  }
3428
- const $r = /* @__PURE__ */ L(Er, [["render", Rr], ["__scopeId", "data-v-55aa529d"]]), Nr = {
3420
+ const Rr = /* @__PURE__ */ $(Er, [["render", Lr], ["__scopeId", "data-v-55aa529d"]]), Nr = {
3429
3421
  name: "WmApprovalCard",
3430
3422
  components: { AIAvatar: ne },
3431
3423
  props: {
@@ -3458,23 +3450,23 @@ const $r = /* @__PURE__ */ L(Er, [["render", Rr], ["__scopeId", "data-v-55aa529d
3458
3450
  return ((e = this.rejectCallback) == null ? void 0 : e.label) || "Refuser";
3459
3451
  }
3460
3452
  }
3461
- }, Fr = { class: "wm-approval" }, Dr = { class: "wm-approval__head" }, Pr = { class: "wm-approval__icon" }, jr = { class: "wm-approval__main" }, Ur = { class: "wm-approval__title" }, zr = {
3453
+ }, Fr = { class: "wm-approval" }, Pr = { class: "wm-approval__head" }, Dr = { class: "wm-approval__icon" }, jr = { class: "wm-approval__main" }, Ur = { class: "wm-approval__title" }, Vr = {
3462
3454
  key: 0,
3463
3455
  class: "wm-approval__detail"
3464
- }, Vr = { class: "wm-approval__actions" };
3456
+ }, zr = { class: "wm-approval__actions" };
3465
3457
  function Hr(e, t, n, i, r, s) {
3466
- const a = B("AIAvatar");
3458
+ const a = E("AIAvatar");
3467
3459
  return d(), c("div", Fr, [
3468
- o("div", Dr, [
3469
- o("div", Pr, [
3470
- W(a, { size: 24 })
3460
+ o("div", Pr, [
3461
+ o("div", Dr, [
3462
+ V(a, { size: 24 })
3471
3463
  ]),
3472
3464
  o("div", jr, [
3473
3465
  o("div", Ur, b(n.action), 1),
3474
- n.detail ? (d(), c("div", zr, b(n.detail), 1)) : w("", !0)
3466
+ n.detail ? (d(), c("div", Vr, b(n.detail), 1)) : w("", !0)
3475
3467
  ])
3476
3468
  ]),
3477
- o("div", Vr, [
3469
+ o("div", zr, [
3478
3470
  s.rejectId ? (d(), c("button", {
3479
3471
  key: 0,
3480
3472
  type: "button",
@@ -3490,8 +3482,8 @@ function Hr(e, t, n, i, r, s) {
3490
3482
  ])
3491
3483
  ]);
3492
3484
  }
3493
- const qr = /* @__PURE__ */ L(Nr, [["render", Hr], ["__scopeId", "data-v-b1be139c"]]);
3494
- let be = 0;
3485
+ const qr = /* @__PURE__ */ $(Nr, [["render", Hr], ["__scopeId", "data-v-b1be139c"]]);
3486
+ let we = 0;
3495
3487
  const Wr = /* @__PURE__ */ new Set([
3496
3488
  "text",
3497
3489
  "textarea",
@@ -3510,8 +3502,8 @@ const Wr = /* @__PURE__ */ new Set([
3510
3502
  },
3511
3503
  emits: ["submit"],
3512
3504
  data() {
3513
- return be += 1, {
3514
- _uid: be,
3505
+ return we += 1, {
3506
+ _uid: we,
3515
3507
  values: {},
3516
3508
  busy: !1,
3517
3509
  error: ""
@@ -3602,11 +3594,11 @@ const Wr = /* @__PURE__ */ new Set([
3602
3594
  class: "wm-form__doneLbl"
3603
3595
  };
3604
3596
  function gi(e, t, n, i, r, s) {
3605
- const a = B("AIAvatar");
3597
+ const a = E("AIAvatar");
3606
3598
  return d(), c("div", Gr, [
3607
3599
  o("div", Yr, [
3608
3600
  o("div", Xr, [
3609
- W(a, { size: 24 })
3601
+ V(a, { size: 24 })
3610
3602
  ]),
3611
3603
  o("div", Jr, [
3612
3604
  o("div", Qr, b(n.form.title || "Formulaire"), 1),
@@ -3617,7 +3609,7 @@ function gi(e, t, n, i, r, s) {
3617
3609
  class: "wm-form__body",
3618
3610
  onSubmit: t[0] || (t[0] = Y((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
3619
3611
  }, [
3620
- (d(!0), c(E, null, F(s.normalizedFields, (l) => (d(), c("div", {
3612
+ (d(!0), c(B, null, F(s.normalizedFields, (l) => (d(), c("div", {
3621
3613
  key: l.key,
3622
3614
  class: "wm-form__field"
3623
3615
  }, [
@@ -3628,7 +3620,7 @@ function gi(e, t, n, i, r, s) {
3628
3620
  he(b(l.label), 1),
3629
3621
  l.required ? (d(), c("span", ti, "*")) : w("", !0)
3630
3622
  ], 8, ei),
3631
- l.type === "text" ? H((d(), c("input", {
3623
+ l.type === "text" ? q((d(), c("input", {
3632
3624
  key: 0,
3633
3625
  id: `wm-f-${r._uid}-${l.key}`,
3634
3626
  "onUpdate:modelValue": (g) => r.values[l.key] = g,
@@ -3639,7 +3631,7 @@ function gi(e, t, n, i, r, s) {
3639
3631
  disabled: n.readOnly || r.busy
3640
3632
  }, null, 8, ni)), [
3641
3633
  [J, r.values[l.key]]
3642
- ]) : l.type === "textarea" ? H((d(), c("textarea", {
3634
+ ]) : l.type === "textarea" ? q((d(), c("textarea", {
3643
3635
  key: 1,
3644
3636
  id: `wm-f-${r._uid}-${l.key}`,
3645
3637
  "onUpdate:modelValue": (g) => r.values[l.key] = g,
@@ -3650,7 +3642,7 @@ function gi(e, t, n, i, r, s) {
3650
3642
  disabled: n.readOnly || r.busy
3651
3643
  }, null, 8, si)), [
3652
3644
  [J, r.values[l.key]]
3653
- ]) : l.type === "number" ? H((d(), c("input", {
3645
+ ]) : l.type === "number" ? q((d(), c("input", {
3654
3646
  key: 2,
3655
3647
  id: `wm-f-${r._uid}-${l.key}`,
3656
3648
  "onUpdate:modelValue": (g) => r.values[l.key] = g,
@@ -3666,7 +3658,7 @@ function gi(e, t, n, i, r, s) {
3666
3658
  void 0,
3667
3659
  { number: !0 }
3668
3660
  ]
3669
- ]) : l.type === "date" ? H((d(), c("input", {
3661
+ ]) : l.type === "date" ? q((d(), c("input", {
3670
3662
  key: 3,
3671
3663
  id: `wm-f-${r._uid}-${l.key}`,
3672
3664
  "onUpdate:modelValue": (g) => r.values[l.key] = g,
@@ -3677,16 +3669,16 @@ function gi(e, t, n, i, r, s) {
3677
3669
  }, null, 8, ii)), [
3678
3670
  [J, r.values[l.key]]
3679
3671
  ]) : l.type === "boolean" ? (d(), c("label", ai, [
3680
- H(o("input", {
3672
+ q(o("input", {
3681
3673
  id: `wm-f-${r._uid}-${l.key}`,
3682
3674
  "onUpdate:modelValue": (g) => r.values[l.key] = g,
3683
3675
  type: "checkbox",
3684
3676
  disabled: n.readOnly || r.busy
3685
3677
  }, null, 8, oi), [
3686
- [Re, r.values[l.key]]
3678
+ [Le, r.values[l.key]]
3687
3679
  ]),
3688
3680
  o("span", null, b(l.placeholder || "Oui"), 1)
3689
- ])) : l.type === "select" ? H((d(), c("select", {
3681
+ ])) : l.type === "select" ? q((d(), c("select", {
3690
3682
  key: 5,
3691
3683
  id: `wm-f-${r._uid}-${l.key}`,
3692
3684
  "onUpdate:modelValue": (g) => r.values[l.key] = g,
@@ -3695,14 +3687,14 @@ function gi(e, t, n, i, r, s) {
3695
3687
  disabled: n.readOnly || r.busy
3696
3688
  }, [
3697
3689
  o("option", di, b(l.placeholder || "Choisir…"), 1),
3698
- (d(!0), c(E, null, F(l.options, (g) => (d(), c("option", {
3690
+ (d(!0), c(B, null, F(l.options, (g) => (d(), c("option", {
3699
3691
  key: g.value,
3700
3692
  value: g.value
3701
3693
  }, b(g.label), 9, ci))), 128))
3702
3694
  ], 8, li)), [
3703
- [$e, r.values[l.key]]
3695
+ [Re, r.values[l.key]]
3704
3696
  ]) : l.type === "multiselect" ? (d(), c("div", ui, [
3705
- (d(!0), c(E, null, F(l.options, (g) => (d(), c("label", {
3697
+ (d(!0), c(B, null, F(l.options, (g) => (d(), c("label", {
3706
3698
  key: g.value,
3707
3699
  class: "wm-form__multiItem"
3708
3700
  }, [
@@ -3730,7 +3722,7 @@ function gi(e, t, n, i, r, s) {
3730
3722
  ], 32)
3731
3723
  ]);
3732
3724
  }
3733
- const vi = /* @__PURE__ */ L(Kr, [["render", gi], ["__scopeId", "data-v-64b40f76"]]), yi = {
3725
+ const vi = /* @__PURE__ */ $(Kr, [["render", gi], ["__scopeId", "data-v-64b40f76"]]), yi = {
3734
3726
  name: "WmFeedback",
3735
3727
  props: {
3736
3728
  busy: { type: Boolean, default: !1 },
@@ -3762,11 +3754,11 @@ function Mi(e, t, n, i, r, s) {
3762
3754
  return d(), c("div", wi, [
3763
3755
  n.done ? (d(), c("div", xi, [...t[3] || (t[3] = [
3764
3756
  ae('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>', 3)
3765
- ])])) : (d(), c(E, { key: 0 }, [
3757
+ ])])) : (d(), c(B, { key: 0 }, [
3766
3758
  t[1] || (t[1] = o("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
3767
3759
  t[2] || (t[2] = o("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
3768
3760
  o("div", bi, [
3769
- (d(!0), c(E, null, F(r.options, (a) => (d(), c("button", {
3761
+ (d(!0), c(B, null, F(r.options, (a) => (d(), c("button", {
3770
3762
  key: a.v,
3771
3763
  type: "button",
3772
3764
  class: x(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
@@ -3785,7 +3777,7 @@ function Mi(e, t, n, i, r, s) {
3785
3777
  ], 64))
3786
3778
  ]);
3787
3779
  }
3788
- const Ti = /* @__PURE__ */ L(yi, [["render", Mi], ["__scopeId", "data-v-6f45ff3b"]]), Ii = {
3780
+ const Ti = /* @__PURE__ */ $(yi, [["render", Mi], ["__scopeId", "data-v-6f45ff3b"]]), Ii = {
3789
3781
  name: "WmMoreMenu",
3790
3782
  props: {
3791
3783
  canRename: { type: Boolean, default: !0 },
@@ -3829,10 +3821,10 @@ const Ti = /* @__PURE__ */ L(yi, [["render", Mi], ["__scopeId", "data-v-6f45ff3b
3829
3821
  }, Ei = {
3830
3822
  key: 0,
3831
3823
  class: "wm-mm__section"
3832
- }, Li = {
3824
+ }, $i = {
3833
3825
  key: 1,
3834
3826
  class: "wm-mm__sep"
3835
- }, Ri = { class: "wm-mm__section" }, $i = { class: "wm-mm__section" };
3827
+ }, Li = { class: "wm-mm__section" }, Ri = { class: "wm-mm__section" };
3836
3828
  function Ni(e, t, n, i, r, s) {
3837
3829
  return d(), c("div", Oi, [
3838
3830
  o("div", {
@@ -3858,8 +3850,8 @@ function Ni(e, t, n, i, r, s) {
3858
3850
  ae('<span class="wm-mm__icon" data-v-3a73911b><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-3a73911b><path d="M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" data-v-3a73911b></path></svg></span><span class="wm-mm__label" data-v-3a73911b>Exporter la transcription</span><span class="wm-mm__hint" data-v-3a73911b>.txt</span>', 3)
3859
3851
  ])])) : w("", !0)
3860
3852
  ])) : w("", !0),
3861
- n.canRename || n.canExport ? (d(), c("div", Li)) : w("", !0),
3862
- o("div", Ri, [
3853
+ n.canRename || n.canExport ? (d(), c("div", $i)) : w("", !0),
3854
+ o("div", Li, [
3863
3855
  o("button", {
3864
3856
  type: "button",
3865
3857
  class: "wm-mm__item",
@@ -3901,7 +3893,7 @@ function Ni(e, t, n, i, r, s) {
3901
3893
  ])
3902
3894
  ]),
3903
3895
  t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
3904
- o("div", $i, [
3896
+ o("div", Ri, [
3905
3897
  n.statusUrl ? (d(), c("button", {
3906
3898
  key: 0,
3907
3899
  type: "button",
@@ -3952,7 +3944,7 @@ function Ni(e, t, n, i, r, s) {
3952
3944
  ])
3953
3945
  ]);
3954
3946
  }
3955
- const Fi = /* @__PURE__ */ L(Ii, [["render", Ni], ["__scopeId", "data-v-3a73911b"]]), Di = {
3947
+ const Fi = /* @__PURE__ */ $(Ii, [["render", Ni], ["__scopeId", "data-v-3a73911b"]]), Pi = {
3956
3948
  name: "WmRenameDialog",
3957
3949
  props: {
3958
3950
  title: { type: String, default: "Modifier le titre" },
@@ -3986,20 +3978,20 @@ const Fi = /* @__PURE__ */ L(Ii, [["render", Ni], ["__scopeId", "data-v-3a73911b
3986
3978
  this.canSubmit && this.$emit("submit", this.value.trim());
3987
3979
  }
3988
3980
  }
3989
- }, Pi = { class: "wm-dialog" }, ji = {
3981
+ }, Di = { class: "wm-dialog" }, ji = {
3990
3982
  class: "wm-dialog__card",
3991
3983
  role: "dialog",
3992
3984
  "aria-modal": "true"
3993
- }, Ui = { class: "wm-dialog__head" }, zi = { class: "wm-dialog__title" }, Vi = { class: "wm-dialog__body" }, Hi = ["placeholder"], qi = { class: "wm-dialog__actions" }, Wi = ["disabled"];
3985
+ }, Ui = { class: "wm-dialog__head" }, Vi = { class: "wm-dialog__title" }, zi = { class: "wm-dialog__body" }, Hi = ["placeholder"], qi = { class: "wm-dialog__actions" }, Wi = ["disabled"];
3994
3986
  function Ki(e, t, n, i, r, s) {
3995
- return d(), c("div", Pi, [
3987
+ return d(), c("div", Di, [
3996
3988
  o("div", {
3997
3989
  class: "wm-dialog__scrim",
3998
3990
  onClick: t[0] || (t[0] = (a) => e.$emit("close"))
3999
3991
  }),
4000
3992
  o("div", ji, [
4001
3993
  o("div", Ui, [
4002
- o("div", zi, b(n.title), 1),
3994
+ o("div", Vi, b(n.title), 1),
4003
3995
  o("button", {
4004
3996
  type: "button",
4005
3997
  class: "wm-dialog__close",
@@ -4021,8 +4013,8 @@ function Ki(e, t, n, i, r, s) {
4021
4013
  ], -1)
4022
4014
  ])])
4023
4015
  ]),
4024
- o("div", Vi, [
4025
- H(o("input", {
4016
+ o("div", zi, [
4017
+ q(o("input", {
4026
4018
  ref: "input",
4027
4019
  "onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
4028
4020
  type: "text",
@@ -4053,7 +4045,7 @@ function Ki(e, t, n, i, r, s) {
4053
4045
  ])
4054
4046
  ]);
4055
4047
  }
4056
- const Gi = /* @__PURE__ */ L(Di, [["render", Ki], ["__scopeId", "data-v-4f4b37c9"]]), ke = "ww-messenger-tokens", Yi = {
4048
+ const Gi = /* @__PURE__ */ $(Pi, [["render", Ki], ["__scopeId", "data-v-4f4b37c9"]]), be = "ww-messenger-tokens", Yi = {
4057
4049
  name: "Messenger",
4058
4050
  components: {
4059
4051
  Launcher: Mt,
@@ -4061,7 +4053,7 @@ const Gi = /* @__PURE__ */ L(Di, [["render", Ki], ["__scopeId", "data-v-4f4b37c9
4061
4053
  Onboarding: Cn,
4062
4054
  MessageList: ur,
4063
4055
  Composer: Br,
4064
- SuggestionChips: $r,
4056
+ SuggestionChips: Rr,
4065
4057
  ApprovalCard: qr,
4066
4058
  FormCard: vi,
4067
4059
  Feedback: Ti,
@@ -4227,7 +4219,7 @@ const Gi = /* @__PURE__ */ L(Di, [["render", Ki], ["__scopeId", "data-v-4f4b37c9
4227
4219
  title: n.name || "Nouvelle conversation",
4228
4220
  preview: n._preview || "Nouveau message",
4229
4221
  unread: !!n._unread,
4230
- _ts: ve(n, e[n.id] || [])
4222
+ _ts: ge(n, e[n.id] || [])
4231
4223
  })).sort((n, i) => n._ts < i._ts ? 1 : n._ts > i._ts ? -1 : 0);
4232
4224
  },
4233
4225
  // Unread threads (one entry per conv with unseen agent/human
@@ -4239,7 +4231,7 @@ const Gi = /* @__PURE__ */ L(Di, [["render", Ki], ["__scopeId", "data-v-4f4b37c9
4239
4231
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
4240
4232
  for (const i of this.drawerConversations) {
4241
4233
  if (!i._unread) continue;
4242
- const r = ve(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", g = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
4234
+ const r = ge(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", g = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
4243
4235
  t.push({
4244
4236
  convId: i.id,
4245
4237
  preview: i._preview || "Vous avez un nouveau message",
@@ -4450,7 +4442,7 @@ const Gi = /* @__PURE__ */ L(Di, [["render", Ki], ["__scopeId", "data-v-4f4b37c9
4450
4442
  Number.isNaN(l.getTime()) || (t = l);
4451
4443
  }
4452
4444
  }
4453
- return `Aujourd'hui · ${Se(t)}`;
4445
+ return `Aujourd'hui · ${Ae(t)}`;
4454
4446
  },
4455
4447
  // Pagination state for the active conversation. Drives the
4456
4448
  // MessageList's scroll-up history loader. Defaults are safe (no
@@ -4549,9 +4541,9 @@ const Gi = /* @__PURE__ */ L(Di, [["render", Ki], ["__scopeId", "data-v-4f4b37c9
4549
4541
  }
4550
4542
  },
4551
4543
  async mounted() {
4552
- if (typeof document < "u" && !document.getElementById(ke)) {
4544
+ if (typeof document < "u" && !document.getElementById(be)) {
4553
4545
  const e = document.createElement("style");
4554
- e.id = ke, e.textContent = qe, document.head.appendChild(e);
4546
+ e.id = be, e.textContent = qe, document.head.appendChild(e);
4555
4547
  }
4556
4548
  await this.boot(), this.isEmbedded && this.store && await this.open();
4557
4549
  },
@@ -4566,12 +4558,12 @@ const Gi = /* @__PURE__ */ L(Di, [["render", Ki], ["__scopeId", "data-v-4f4b37c9
4566
4558
  return;
4567
4559
  }
4568
4560
  try {
4569
- this.transport = _e(je({
4561
+ this.transport = fe(je({
4570
4562
  baseUrl: this.baseUrl,
4571
4563
  widgetId: this.widgetId,
4572
4564
  userId: this.userId,
4573
4565
  userHash: this.userHash
4574
- })), this.store = _e(He(this.transport)), this.hydrateNotifPref(), this.setupNotifications(), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer);
4566
+ })), this.store = fe(He(this.transport)), this.hydrateNotifPref(), this.setupNotifications(), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer);
4575
4567
  } catch (e) {
4576
4568
  console.error("[ww-messenger] bootstrap failed", e), this.bootError = (e == null ? void 0 : e.message) || String(e);
4577
4569
  }
@@ -4838,11 +4830,11 @@ const Gi = /* @__PURE__ */ L(Di, [["render", Ki], ["__scopeId", "data-v-4f4b37c9
4838
4830
  class: "wm-attached"
4839
4831
  }, ia = ["onClick"];
4840
4832
  function aa(e, t, n, i, r, s) {
4841
- const a = B("Launcher"), l = B("Header"), g = B("Onboarding"), k = B("MessageList"), C = B("ApprovalCard"), T = B("FormCard"), $ = B("Feedback"), A = B("SuggestionChips"), U = B("Composer"), S = B("MoreMenu"), P = B("RenameDialog");
4833
+ const a = E("Launcher"), l = E("Header"), g = E("Onboarding"), k = E("MessageList"), C = E("ApprovalCard"), T = E("FormCard"), R = E("Feedback"), A = E("SuggestionChips"), U = E("Composer"), S = E("MoreMenu"), D = E("RenameDialog");
4842
4834
  return d(), c("div", {
4843
4835
  class: x(["wm-root", `wm-root--${n.displayMode}`])
4844
4836
  }, [
4845
- !r.isOpen && !s.isEmbedded ? (d(), R(a, {
4837
+ !r.isOpen && !s.isEmbedded ? (d(), L(a, {
4846
4838
  key: 0,
4847
4839
  "unread-count": s.unreadCount,
4848
4840
  peeks: s.launcherPeeks,
@@ -4852,7 +4844,7 @@ function aa(e, t, n, i, r, s) {
4852
4844
  r.isOpen || s.isEmbedded ? (d(), c("section", {
4853
4845
  key: 1,
4854
4846
  class: x(["wm-panel", `wm-panel--${n.displayMode}`]),
4855
- style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
4847
+ style: W(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
4856
4848
  role: "dialog",
4857
4849
  "aria-label": "Messenger"
4858
4850
  }, [
@@ -4882,12 +4874,9 @@ function aa(e, t, n, i, r, s) {
4882
4874
  class: "wm-loading__spinner",
4883
4875
  "aria-hidden": "true"
4884
4876
  }, null, -1))
4885
- ])) : (d(), c(E, { key: 1 }, [
4886
- W(l, {
4877
+ ])) : (d(), c(B, { key: 1 }, [
4878
+ V(l, {
4887
4879
  title: s.headerTitle,
4888
- escalated: s.isEscalated,
4889
- "agent-name": s.humanAgentName,
4890
- "agent-avatar-url": s.humanAgentAvatarUrl,
4891
4880
  "team-members": s.teamMembers,
4892
4881
  "response-label": s.responseLabel,
4893
4882
  "show-identity": !!s.currentConv,
@@ -4897,7 +4886,7 @@ function aa(e, t, n, i, r, s) {
4897
4886
  onBack: s.goHome,
4898
4887
  onMore: s.toggleMore,
4899
4888
  onClose: s.close
4900
- }, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
4889
+ }, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
4901
4890
  s.error ? (d(), c("div", Ji, [
4902
4891
  o("div", Qi, [
4903
4892
  t[8] || (t[8] = o("div", { class: "wm-state__errIcon" }, [
@@ -4920,8 +4909,8 @@ function aa(e, t, n, i, r, s) {
4920
4909
  o("div", Zi, b(s.error), 1)
4921
4910
  ])
4922
4911
  ])
4923
- ])) : s.currentConv ? (d(), c(E, { key: 2 }, [
4924
- W(k, {
4912
+ ])) : s.currentConv ? (d(), c(B, { key: 2 }, [
4913
+ V(k, {
4925
4914
  ref: "messageList",
4926
4915
  messages: s.displayedMessages,
4927
4916
  "streaming-active": s.streamingActive,
@@ -4935,22 +4924,22 @@ function aa(e, t, n, i, r, s) {
4935
4924
  }, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "onLoadMore"]),
4936
4925
  o("div", ea, [
4937
4926
  s.floatVisible ? (d(), c("div", ta, [
4938
- s.approvalReady ? (d(), R(C, {
4927
+ s.approvalReady ? (d(), L(C, {
4939
4928
  key: 0,
4940
4929
  action: s.approvalTitle,
4941
4930
  detail: s.approvalDetail,
4942
4931
  callbacks: s.pendingApproval.callbacks,
4943
4932
  onCallback: s.onApprovalCallback
4944
- }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (d(), R(T, {
4933
+ }, null, 8, ["action", "detail", "callbacks", "onCallback"])) : s.pendingForm ? (d(), L(T, {
4945
4934
  key: s.pendingForm.message && s.pendingForm.message.id,
4946
4935
  form: s.pendingForm.form,
4947
4936
  onSubmit: s.onFormSubmit
4948
- }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (d(), R($, {
4937
+ }, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (d(), L(R, {
4949
4938
  key: 2,
4950
4939
  busy: r.feedbackBusy,
4951
4940
  done: r.feedbackDone,
4952
4941
  onSubmit: s.onFeedback
4953
- }, null, 8, ["busy", "done", "onSubmit"])) : (d(), R(A, {
4942
+ }, null, 8, ["busy", "done", "onSubmit"])) : (d(), L(A, {
4954
4943
  key: 3,
4955
4944
  items: s.suggestions,
4956
4945
  onSelect: s.onSuggestion
@@ -4962,7 +4951,7 @@ function aa(e, t, n, i, r, s) {
4962
4951
  "aria-hidden": "true"
4963
4952
  }, null, -1)),
4964
4953
  o("span", sa, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
4965
- ])) : (d(), R(U, {
4954
+ ])) : (d(), L(U, {
4966
4955
  key: 2,
4967
4956
  ref: "composer",
4968
4957
  modelValue: r.draft,
@@ -4974,7 +4963,7 @@ function aa(e, t, n, i, r, s) {
4974
4963
  onAttach: s.onAttach
4975
4964
  }, null, 8, ["modelValue", "placeholder", "disabled", "onSend", "onAttach"]))
4976
4965
  ]),
4977
- r.moreOpen ? (d(), R(S, {
4966
+ r.moreOpen ? (d(), L(S, {
4978
4967
  key: 0,
4979
4968
  "can-rename": !!s.currentConv && !s.currentConv._draft,
4980
4969
  "can-export": !!s.currentConv && !s.currentConv._draft,
@@ -4987,7 +4976,7 @@ function aa(e, t, n, i, r, s) {
4987
4976
  onBrowserNotifToggle: e.onBrowserNotifToggle,
4988
4977
  onAction: s.onMoreAction
4989
4978
  }, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0),
4990
- r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (d(), R(P, {
4979
+ r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (d(), L(D, {
4991
4980
  key: 1,
4992
4981
  "initial-value": s.currentConv.name || "",
4993
4982
  title: "Modifier le titre de la conversation",
@@ -4995,7 +4984,7 @@ function aa(e, t, n, i, r, s) {
4995
4984
  onSubmit: s.onRenameSubmit
4996
4985
  }, null, 8, ["initial-value", "onSubmit"])) : w("", !0),
4997
4986
  r.pendingAttachments.length ? (d(), c("div", ra, [
4998
- (d(!0), c(E, null, F(r.pendingAttachments, (N, j) => (d(), c("div", {
4987
+ (d(!0), c(B, null, F(r.pendingAttachments, (N, j) => (d(), c("div", {
4999
4988
  key: j,
5000
4989
  class: "wm-attached__chip"
5001
4990
  }, [
@@ -5034,7 +5023,7 @@ function aa(e, t, n, i, r, s) {
5034
5023
  ])], 8, ia)
5035
5024
  ]))), 128))
5036
5025
  ])) : w("", !0)
5037
- ], 64)) : (d(), R(g, {
5026
+ ], 64)) : (d(), L(g, {
5038
5027
  key: 1,
5039
5028
  "welcome-message": s.widgetWelcomeMessage,
5040
5029
  "agent-name": s.agentName,
@@ -5045,7 +5034,7 @@ function aa(e, t, n, i, r, s) {
5045
5034
  onSelect: s.onQuickLink,
5046
5035
  onResume: s.onDrawerPick
5047
5036
  }, null, 8, ["welcome-message", "agent-name", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
5048
- r.moreOpen && !s.currentConv ? (d(), R(S, {
5037
+ r.moreOpen && !s.currentConv ? (d(), L(S, {
5049
5038
  key: 3,
5050
5039
  "can-rename": !1,
5051
5040
  "can-export": !1,
@@ -5062,48 +5051,48 @@ function aa(e, t, n, i, r, s) {
5062
5051
  ], 6)) : w("", !0)
5063
5052
  ], 2);
5064
5053
  }
5065
- const da = /* @__PURE__ */ L(Yi, [["render", aa], ["__scopeId", "data-v-b5eb5af4"]]), ca = "0.3.10";
5054
+ const da = /* @__PURE__ */ $(Yi, [["render", aa], ["__scopeId", "data-v-4500d0e5"]]), ca = "0.3.12";
5066
5055
  export {
5067
5056
  ne as AIAvatar,
5068
5057
  ue as AVATAR_COLORS,
5069
- $n as ActionResult,
5058
+ Rn as ActionResult,
5070
5059
  qr as ApprovalCard,
5071
- Vn as ArtifactFormResponse,
5060
+ zn as ArtifactFormResponse,
5072
5061
  ns as ArtifactInfoCard,
5073
5062
  bs as ArtifactRenderer,
5074
5063
  gs as ArtifactTicket,
5075
- Ls as AttachmentPreview,
5064
+ $s as AttachmentPreview,
5076
5065
  js as Bubble,
5077
5066
  Br as Composer,
5078
5067
  We as DEFAULT_BASE_URL,
5079
5068
  Ti as Feedback,
5080
5069
  vi as FormCard,
5081
5070
  Gt as Header,
5082
- me as HumanAvatar,
5071
+ xe as HumanAvatar,
5083
5072
  Mt as Launcher,
5084
- fe as MEDIA_RECORDER_SUPPORTED,
5073
+ me as MEDIA_RECORDER_SUPPORTED,
5085
5074
  ur as MessageList,
5086
5075
  da as Messenger,
5087
5076
  Fi as MoreMenu,
5088
5077
  Cn as Onboarding,
5089
5078
  de as SCREEN_CAPTURE_SUPPORTED,
5090
- $r as SuggestionChips,
5091
- Dt as TeamAvatars,
5079
+ Rr as SuggestionChips,
5080
+ Pt as TeamAvatars,
5092
5081
  Hs as Typing,
5093
5082
  ca as VERSION,
5094
- Ce as avatarColor,
5095
- Ae as avatarInitials,
5083
+ ke as avatarColor,
5084
+ Ce as avatarInitials,
5096
5085
  mr as captureScreenshotFile,
5097
- D as colors,
5086
+ P as colors,
5098
5087
  He as createStore,
5099
5088
  je as createTransport,
5100
5089
  da as default,
5101
- Se as formatTime,
5090
+ Ae as formatTime,
5102
5091
  la as guessAttachmentKind,
5103
5092
  hr as pickRecorderMime,
5104
5093
  Ns as renderMarkdown,
5105
5094
  _r as startScreenRecording,
5106
5095
  qe as tokensCss,
5107
- Ve as uuid,
5108
- Ve as v4
5096
+ ze as uuid,
5097
+ ze as v4
5109
5098
  };