@_solaris/messenger-widget 0.5.67 → 0.5.69

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 Ve, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as V, Transition as Ne, withCtx as Fe, Fragment as I, renderList as F, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as w, createBlock as U, resolveDynamicComponent as Ae, mergeProps as je, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
1
+ import { reactive as $e, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as $, Transition as Ne, withCtx as Fe, Fragment as I, renderList as F, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as U, resolveDynamicComponent as Ae, mergeProps as je, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as Ke, vModelCheckbox as We, vModelSelect as Ge, markRaw as Re } from "vue";
2
2
  const Ye = [
3
3
  "connected",
4
4
  "message",
@@ -35,14 +35,14 @@ function Ze(e) {
35
35
  };
36
36
  if (!t.baseUrl || !t.widgetId)
37
37
  throw new Error("[transport] baseUrl and widgetId are required");
38
- function n(u, _) {
39
- return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(_), () => t.listeners.get(u).delete(_);
38
+ function n(u, g) {
39
+ return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(g), () => t.listeners.get(u).delete(g);
40
40
  }
41
- function r(u, _) {
41
+ function r(u, g) {
42
42
  const p = t.listeners.get(u);
43
43
  p && p.forEach((S) => {
44
44
  try {
45
- S(_);
45
+ S(g);
46
46
  } catch (O) {
47
47
  console.error("[transport] listener", u, O);
48
48
  }
@@ -64,8 +64,8 @@ function Ze(e) {
64
64
  ...t.origin ? { "X-Parent-Origin": t.origin } : {}
65
65
  };
66
66
  }
67
- async function i(u, _, p) {
68
- const S = await fetch(`${t.baseUrl}${we}${_}`, {
67
+ async function i(u, g, p) {
68
+ const S = await fetch(`${t.baseUrl}${we}${g}`, {
69
69
  method: u,
70
70
  credentials: "include",
71
71
  headers: s(),
@@ -73,7 +73,7 @@ function Ze(e) {
73
73
  });
74
74
  if (!S.ok) {
75
75
  const O = await l(S), x = new Error(
76
- `HTTP ${S.status} ${u} ${_} :: ${(O == null ? void 0 : O.error) || S.statusText}`
76
+ `HTTP ${S.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || S.statusText}`
77
77
  );
78
78
  throw x.status = S.status, x.body = O, x;
79
79
  }
@@ -86,12 +86,12 @@ function Ze(e) {
86
86
  return null;
87
87
  }
88
88
  }
89
- async function g(u) {
89
+ async function _(u) {
90
90
  if (t.started) return t.lastBootstrap;
91
91
  if (!(u != null && u.origin))
92
92
  throw new Error("[transport] start requires origin");
93
93
  t.started = !0, t.origin = u.origin, t.token = u.token || "";
94
- const _ = await fetch(
94
+ const g = await fetch(
95
95
  `${t.baseUrl}${we}/session`,
96
96
  {
97
97
  method: "POST",
@@ -111,26 +111,26 @@ function Ze(e) {
111
111
  })
112
112
  }
113
113
  );
114
- if (!_.ok) {
115
- const $ = await l(_), Z = new Error(
116
- `Session bootstrap failed: HTTP ${_.status} :: ${($ == null ? void 0 : $.error) || _.statusText}`
114
+ if (!g.ok) {
115
+ const V = await l(g), Z = new Error(
116
+ `Session bootstrap failed: HTTP ${g.status} :: ${(V == null ? void 0 : V.error) || g.statusText}`
117
117
  );
118
- throw Z.status = _.status, Z.body = $, Z;
118
+ throw Z.status = g.status, Z.body = V, Z;
119
119
  }
120
- const p = await _.json();
120
+ const p = await g.json();
121
121
  t.userId = p.external_id;
122
122
  const [S, O] = await Promise.all([
123
123
  fetch(
124
124
  `${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
125
125
  { credentials: "include" }
126
- ).then(async ($) => {
127
- if (!$.ok) {
128
- const Z = await l($);
126
+ ).then(async (V) => {
127
+ if (!V.ok) {
128
+ const Z = await l(V);
129
129
  throw new Error(
130
- `HTTP ${$.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || $.statusText}`
130
+ `HTTP ${V.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || V.statusText}`
131
131
  );
132
132
  }
133
- return $.json();
133
+ return V.json();
134
134
  }),
135
135
  i("GET", "/customers/me")
136
136
  ]), x = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
@@ -142,21 +142,21 @@ function Ze(e) {
142
142
  async function k() {
143
143
  try {
144
144
  const u = await E();
145
- t.lastActivityAt = u.reduce((_, p) => {
145
+ t.lastActivityAt = u.reduce((g, p) => {
146
146
  const S = p == null ? void 0 : p.last_message_at;
147
- return S && (!_ || S > _) ? S : _;
147
+ return S && (!g || S > g) ? S : g;
148
148
  }, null);
149
149
  } catch (u) {
150
150
  console.error("[transport] initial /conversations failed", u);
151
151
  }
152
152
  }
153
- async function b() {
153
+ async function w() {
154
154
  const u = await i("GET", "/customers/me");
155
155
  return (u == null ? void 0 : u.customer) ?? null;
156
156
  }
157
157
  async function T(u) {
158
- const _ = await i("PATCH", "/customers/me", u);
159
- return (_ == null ? void 0 : _.customer) ?? null;
158
+ const g = await i("PATCH", "/customers/me", u);
159
+ return (g == null ? void 0 : g.customer) ?? null;
160
160
  }
161
161
  async function E() {
162
162
  const u = await i("GET", "/conversations");
@@ -171,56 +171,56 @@ function Ze(e) {
171
171
  `/conversations/${encodeURIComponent(u)}`
172
172
  )).conversation;
173
173
  }
174
- async function M(u, _) {
174
+ async function M(u, g) {
175
175
  return (await i(
176
176
  "PATCH",
177
177
  `/conversations/${encodeURIComponent(u)}`,
178
- _
178
+ g
179
179
  )).conversation;
180
180
  }
181
- async function D(u, _) {
181
+ async function D(u, g) {
182
182
  return i(
183
183
  "PATCH",
184
184
  `/conversations/${encodeURIComponent(u)}/read`,
185
- { message_id: _ }
185
+ { message_id: g }
186
186
  );
187
187
  }
188
- async function N(u, _ = {}) {
188
+ async function N(u, g = {}) {
189
189
  const p = new URLSearchParams();
190
- _.before && p.set("before", _.before), _.since && p.set("since", _.since), _.limit && p.set("limit", String(_.limit));
190
+ g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
191
191
  const S = p.toString() ? `?${p.toString()}` : "";
192
192
  return i(
193
193
  "GET",
194
194
  `/conversations/${encodeURIComponent(u)}/messages${S}`
195
195
  );
196
196
  }
197
- async function L(u, _) {
197
+ async function L(u, g) {
198
198
  ae();
199
199
  const p = {
200
- client_msg_id: _.client_msg_id,
200
+ client_msg_id: g.client_msg_id,
201
201
  type: "content",
202
- text_md: _.text_md,
202
+ text_md: g.text_md,
203
203
  author: { id: t.userId, type: "user" },
204
- created_at: _.created_at || (/* @__PURE__ */ new Date()).toISOString()
204
+ created_at: g.created_at || (/* @__PURE__ */ new Date()).toISOString()
205
205
  };
206
- return Array.isArray(_.attachments) && _.attachments.length && (p.payload = { type: "content", attachments: _.attachments }), _.metadata && typeof _.metadata == "object" && (p.metadata = _.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), i(
206
+ return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), i(
207
207
  "POST",
208
208
  `/conversations/${encodeURIComponent(u)}/messages`,
209
209
  p
210
210
  );
211
211
  }
212
- async function K(u, _, p) {
212
+ async function K(u, g, p) {
213
213
  return ae(), i(
214
214
  "POST",
215
- `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(_)}`,
215
+ `/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
216
216
  p ? { inputs: p } : {}
217
217
  );
218
218
  }
219
219
  async function Q(u) {
220
- const _ = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await i("POST", "/attachments", {
220
+ const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await i("POST", "/attachments", {
221
221
  mime_type: p,
222
222
  size_bytes: S,
223
- name: _
223
+ name: g
224
224
  }), x = await fetch(O.upload_url, {
225
225
  method: "PUT",
226
226
  headers: { "Content-Type": p },
@@ -249,8 +249,8 @@ function Ze(e) {
249
249
  if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
250
250
  try {
251
251
  const u = new EventSource(re(), { withCredentials: !0 });
252
- for (const _ of Ye)
253
- u.addEventListener(_, (p) => ie(_, p.data));
252
+ for (const g of Ye)
253
+ u.addEventListener(g, (p) => ie(g, p.data));
254
254
  u.addEventListener(
255
255
  "error",
256
256
  () => r("error", new Error("SSE error"))
@@ -259,9 +259,9 @@ function Ze(e) {
259
259
  console.error("[transport] SSE open failed", u), r("error", u);
260
260
  }
261
261
  }
262
- function ie(u, _) {
262
+ function ie(u, g) {
263
263
  try {
264
- const p = JSON.parse(_), S = p && typeof p == "object" && "data" in p ? p.data : p;
264
+ const p = JSON.parse(g), S = p && typeof p == "object" && "data" in p ? p.data : p;
265
265
  r(u, S);
266
266
  } catch (p) {
267
267
  console.error("[transport] bad SSE payload", u, p);
@@ -280,11 +280,11 @@ function Ze(e) {
280
280
  }
281
281
  async function ye() {
282
282
  try {
283
- const u = await E(), _ = u.reduce((S, O) => {
283
+ const u = await E(), g = u.reduce((S, O) => {
284
284
  const x = O == null ? void 0 : O.last_message_at;
285
285
  return x && (!S || x > S) ? x : S;
286
286
  }, null);
287
- _ && (!t.lastActivityAt || _ > t.lastActivityAt) && (t.lastActivityAt = _, r("activity", { conversations: u, latestAt: _ }), ae());
287
+ g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ae());
288
288
  } catch (u) {
289
289
  console.error("[transport] poll failed", u);
290
290
  }
@@ -319,23 +319,23 @@ function Ze(e) {
319
319
  }
320
320
  function C(u) {
321
321
  if (!(!u || typeof u != "object"))
322
- for (const [_, p] of Object.entries(u)) {
322
+ for (const [g, p] of Object.entries(u)) {
323
323
  if (p === null) {
324
- delete t.currentContext[_];
324
+ delete t.currentContext[g];
325
325
  continue;
326
326
  }
327
- typeof p == "object" && !Array.isArray(p) && (t.currentContext[_] = { ...p });
327
+ typeof p == "object" && !Array.isArray(p) && (t.currentContext[g] = { ...p });
328
328
  }
329
329
  }
330
330
  return {
331
331
  on: n,
332
- start: g,
332
+ start: _,
333
333
  stop: f,
334
334
  setPanelOpen: me,
335
335
  update: y,
336
336
  context: C,
337
337
  // REST
338
- getCustomer: b,
338
+ getCustomer: w,
339
339
  patchCustomer: T,
340
340
  listConversations: E,
341
341
  createConversation: A,
@@ -372,7 +372,7 @@ function nt() {
372
372
  return t.slice(0, 4).join("") + "-" + t.slice(4, 6).join("") + "-" + t.slice(6, 8).join("") + "-" + t.slice(8, 10).join("") + "-" + t.slice(10, 16).join("");
373
373
  }
374
374
  function st(e) {
375
- const t = Ve({
375
+ const t = $e({
376
376
  ready: !1,
377
377
  error: null,
378
378
  config: null,
@@ -490,26 +490,26 @@ function st(e) {
490
490
  return f === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[f] = m, m;
491
491
  }
492
492
  const l = 50;
493
- async function g(h) {
493
+ async function _(h) {
494
494
  const m = t.paginationByConv[h];
495
495
  if (!(m != null && m.loaded || m != null && m.loading)) {
496
- b(h, { nextCursor: null, loading: !0, loaded: !1 });
496
+ w(h, { nextCursor: null, loading: !0, loaded: !1 });
497
497
  try {
498
498
  const f = await e.listMessages(h, {
499
499
  limit: l
500
500
  }), y = (f == null ? void 0 : f.messages) ?? [], C = t.messagesByConv[h] || [], u = /* @__PURE__ */ new Set();
501
501
  for (const p of y)
502
502
  (p == null ? void 0 : p.id) != null && u.add(`id:${String(p.id)}`), p != null && p.client_msg_id && u.add(`c:${p.client_msg_id}`);
503
- const _ = C.filter((p) => !((p == null ? void 0 : p.id) != null && u.has(`id:${String(p.id)}`) || p != null && p.client_msg_id && u.has(`c:${p.client_msg_id}`)));
504
- t.messagesByConv[h] = [...y, ..._].sort(
503
+ const g = C.filter((p) => !((p == null ? void 0 : p.id) != null && u.has(`id:${String(p.id)}`) || p != null && p.client_msg_id && u.has(`c:${p.client_msg_id}`)));
504
+ t.messagesByConv[h] = [...y, ...g].sort(
505
505
  me
506
- ), b(h, {
506
+ ), w(h, {
507
507
  nextCursor: (f == null ? void 0 : f.next_cursor) ?? null,
508
508
  loading: !1,
509
509
  loaded: !0
510
510
  });
511
511
  } catch (f) {
512
- console.error("[store] openConversation failed", f), b(h, {
512
+ console.error("[store] openConversation failed", f), w(h, {
513
513
  nextCursor: null,
514
514
  loading: !1,
515
515
  loaded: !1
@@ -523,26 +523,26 @@ function st(e) {
523
523
  if (!m || m.loading || !m.nextCursor) return;
524
524
  const y = (C = (t.messagesByConv[h] || []).find((u) => u == null ? void 0 : u.created_at)) == null ? void 0 : C.created_at;
525
525
  if (y) {
526
- b(h, { ...m, loading: !0 });
526
+ w(h, { ...m, loading: !0 });
527
527
  try {
528
528
  const u = await e.listMessages(h, {
529
529
  before: y,
530
530
  limit: l
531
- }), _ = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
531
+ }), g = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
532
532
  for (const x of p)
533
533
  (x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
534
- const O = _.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
535
- t.messagesByConv[h] = [...O, ...p], b(h, {
534
+ const O = g.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
535
+ t.messagesByConv[h] = [...O, ...p], w(h, {
536
536
  nextCursor: (u == null ? void 0 : u.next_cursor) ?? null,
537
537
  loading: !1,
538
538
  loaded: !0
539
539
  });
540
540
  } catch (u) {
541
- console.error("[store] loadMore failed", u), b(h, { ...m, loading: !1 });
541
+ console.error("[store] loadMore failed", u), w(h, { ...m, loading: !1 });
542
542
  }
543
543
  }
544
544
  }
545
- function b(h, m) {
545
+ function w(h, m) {
546
546
  t.paginationByConv = { ...t.paginationByConv, [h]: m };
547
547
  }
548
548
  async function T(h, m) {
@@ -561,12 +561,12 @@ function st(e) {
561
561
  f ? { since: f } : {}
562
562
  ), C = (y == null ? void 0 : y.messages) || [];
563
563
  if (!C.length) return [];
564
- const u = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set();
564
+ const u = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new Set();
565
565
  for (const S of m)
566
- (S == null ? void 0 : S.id) != null && u.add(String(S.id)), S != null && S.client_msg_id && _.add(S.client_msg_id);
566
+ (S == null ? void 0 : S.id) != null && u.add(String(S.id)), S != null && S.client_msg_id && g.add(S.client_msg_id);
567
567
  const p = [];
568
568
  for (const S of C) {
569
- const O = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && _.has(S.client_msg_id);
569
+ const O = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && g.has(S.client_msg_id);
570
570
  W(h, S), O || p.push(S);
571
571
  }
572
572
  return p;
@@ -590,9 +590,9 @@ function st(e) {
590
590
  var O;
591
591
  const C = (m || "").trim(), u = Array.isArray(f) && f.length > 0;
592
592
  if (!h || !C && !u) return;
593
- const _ = nt(), p = fe(h), S = {
594
- id: _,
595
- client_msg_id: _,
593
+ const g = nt(), p = fe(h), S = {
594
+ id: g,
595
+ client_msg_id: g,
596
596
  conversation_id: h,
597
597
  type: "content",
598
598
  text_md: C,
@@ -609,14 +609,14 @@ function st(e) {
609
609
  W(h, S);
610
610
  try {
611
611
  await e.postMessage(h, {
612
- client_msg_id: _,
612
+ client_msg_id: g,
613
613
  text_md: C,
614
614
  created_at: p,
615
615
  ...u ? { attachments: f } : {},
616
616
  ...y && typeof y == "object" ? { metadata: y } : {}
617
617
  });
618
618
  } catch (x) {
619
- console.error("[store] send failed", x), X(h, _, {
619
+ console.error("[store] send failed", x), X(h, g, {
620
620
  _failed: !0,
621
621
  _pending: !1
622
622
  });
@@ -651,7 +651,7 @@ function st(e) {
651
651
  return null;
652
652
  }
653
653
  async function L(h, { rating: m, comment: f } = {}) {
654
- const y = t.conversations.find((_) => _.id === h), u = {
654
+ const y = t.conversations.find((g) => g.id === h), u = {
655
655
  ...(y == null ? void 0 : y.metadata) || {},
656
656
  feedback: {
657
657
  rating: m,
@@ -675,12 +675,12 @@ function st(e) {
675
675
  var f, y, C;
676
676
  const m = t.messagesByConv[h] || [];
677
677
  for (let u = m.length - 1; u >= 0; u--) {
678
- const _ = m[u];
679
- if (((f = _ == null ? void 0 : _.author) == null ? void 0 : f.type) === "user" || (_ == null ? void 0 : _.type) === "action" && ((y = _ == null ? void 0 : _.payload) == null ? void 0 : y.state) === "pending")
678
+ const g = m[u];
679
+ if (((f = g == null ? void 0 : g.author) == null ? void 0 : f.type) === "user" || (g == null ? void 0 : g.type) === "action" && ((y = g == null ? void 0 : g.payload) == null ? void 0 : y.state) === "pending")
680
680
  return null;
681
- const p = (C = _ == null ? void 0 : _.metadata) == null ? void 0 : C.form;
681
+ const p = (C = g == null ? void 0 : g.metadata) == null ? void 0 : C.form;
682
682
  if (p && Array.isArray(p.fields) && p.fields.length > 0)
683
- return { message: _, form: p };
683
+ return { message: g, form: p };
684
684
  }
685
685
  return null;
686
686
  }
@@ -695,8 +695,8 @@ function st(e) {
695
695
  function re(h) {
696
696
  var f, y, C, u;
697
697
  const m = t.messagesByConv[h] || [];
698
- for (let _ = m.length - 1; _ >= 0; _--) {
699
- const p = m[_];
698
+ for (let g = m.length - 1; g >= 0; g--) {
699
+ const p = m[g];
700
700
  if (((f = p == null ? void 0 : p.author) == null ? void 0 : f.type) === "user") return [];
701
701
  if ((p == null ? void 0 : p.type) === "action" && ((y = p == null ? void 0 : p.payload) == null ? void 0 : y.state) === "pending")
702
702
  return [];
@@ -710,8 +710,8 @@ function st(e) {
710
710
  if (O && typeof O == "object" && typeof O.label == "string") {
711
711
  const x = O.label.trim();
712
712
  if (!x) return null;
713
- const $ = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
714
- return { label: x, kind: $ };
713
+ const V = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
714
+ return { label: x, kind: V };
715
715
  }
716
716
  return null;
717
717
  }).filter(Boolean).slice(0, 4) : [];
@@ -723,8 +723,8 @@ function st(e) {
723
723
  const f = t.messagesByConv[h] || [];
724
724
  let y = -1;
725
725
  m != null && m.client_msg_id && (y = f.findIndex(
726
- (_) => (_ == null ? void 0 : _.client_msg_id) && _.client_msg_id === m.client_msg_id
727
- )), y === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (y = f.findIndex((_) => ie(_ == null ? void 0 : _.id, m.id)));
726
+ (g) => (g == null ? void 0 : g.client_msg_id) && g.client_msg_id === m.client_msg_id
727
+ )), y === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (y = f.findIndex((g) => ie(g == null ? void 0 : g.id, m.id)));
728
728
  let C;
729
729
  y === -1 ? C = [...f, m].sort(me) : (C = f.slice(), C[y] = {
730
730
  ...f[y],
@@ -739,7 +739,7 @@ function st(e) {
739
739
  function X(h, m, f) {
740
740
  const y = t.messagesByConv[h];
741
741
  if (!y) return;
742
- const C = y.findIndex((_) => _.id === m);
742
+ const C = y.findIndex((g) => g.id === m);
743
743
  if (C === -1) return;
744
744
  const u = y.slice();
745
745
  u[C] = { ...y[C], ...f }, t.messagesByConv[h] = u;
@@ -751,7 +751,7 @@ function st(e) {
751
751
  if (m && (!y.last_message_at || m > y.last_message_at)) {
752
752
  const C = t.conversations.slice();
753
753
  C[f] = { ...y, last_message_at: m }, C.sort(
754
- (u, _) => (_.last_message_at || "").localeCompare(u.last_message_at || "")
754
+ (u, g) => (g.last_message_at || "").localeCompare(u.last_message_at || "")
755
755
  ), t.conversations = C;
756
756
  }
757
757
  }
@@ -779,7 +779,7 @@ function st(e) {
779
779
  destroy: a,
780
780
  applyCustomer: s,
781
781
  createConversation: i,
782
- openConversation: g,
782
+ openConversation: _,
783
783
  loadMore: k,
784
784
  fetchSinceLast: E,
785
785
  patchConversation: T,
@@ -1156,7 +1156,7 @@ function j(e) {
1156
1156
  let l = n[s];
1157
1157
  return l == null && (l = r[s]), l == null ? s : (i && (l = l.replace(
1158
1158
  /\{(\w+)\}/g,
1159
- (g, k) => i[k] != null ? String(i[k]) : g
1159
+ (_, k) => i[k] != null ? String(i[k]) : _
1160
1160
  )), l);
1161
1161
  };
1162
1162
  }
@@ -1191,9 +1191,9 @@ function mt(e, t, n = j()) {
1191
1191
  if (i == null || i === "") continue;
1192
1192
  const l = He(s, i, n);
1193
1193
  if (!l) continue;
1194
- const g = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1194
+ const _ = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
1195
1195
  `));
1196
- r.push({ label: s.label, value: l, multiline: g });
1196
+ r.push({ label: s.label, value: l, multiline: _ });
1197
1197
  }
1198
1198
  return {
1199
1199
  kind: "form_response",
@@ -1249,34 +1249,34 @@ function ft(e) {
1249
1249
  if (!T) break;
1250
1250
  k.push(T[1]), r++;
1251
1251
  }
1252
- const b = k.map((T) => `<li>${de(T)}</li>`).join("");
1252
+ const w = k.map((T) => `<li>${de(T)}</li>`).join("");
1253
1253
  n.push({
1254
1254
  type: "block",
1255
- html: `<ul class="wm-md-ul">${b}</ul>`
1255
+ html: `<ul class="wm-md-ul">${w}</ul>`
1256
1256
  });
1257
1257
  continue;
1258
1258
  }
1259
1259
  const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
1260
1260
  if (l) {
1261
- const k = parseInt(l[1], 10), b = [l[2]];
1261
+ const k = parseInt(l[1], 10), w = [l[2]];
1262
1262
  for (r++; r < t.length; ) {
1263
1263
  const A = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
1264
1264
  if (!A) break;
1265
- b.push(A[1]), r++;
1265
+ w.push(A[1]), r++;
1266
1266
  }
1267
- const T = b.map((A) => `<li>${de(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1267
+ const T = w.map((A) => `<li>${de(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
1268
1268
  n.push({
1269
1269
  type: "block",
1270
1270
  html: `<ol class="wm-md-ol"${E}>${T}</ol>`
1271
1271
  });
1272
1272
  continue;
1273
1273
  }
1274
- const g = /^(#{1,6})\s+(.*)$/.exec(s);
1275
- if (g) {
1276
- const k = g[1].length;
1274
+ const _ = /^(#{1,6})\s+(.*)$/.exec(s);
1275
+ if (_) {
1276
+ const k = _[1].length;
1277
1277
  n.push({
1278
1278
  type: "block",
1279
- html: `<h${k} class="wm-md-h wm-md-h${k}">${de(g[2])}</h${k}>`
1279
+ html: `<h${k} class="wm-md-h wm-md-h${k}">${de(_[2])}</h${k}>`
1280
1280
  }), r++;
1281
1281
  continue;
1282
1282
  }
@@ -1316,8 +1316,8 @@ function _t(e, t) {
1316
1316
  const l = typeof i.text_md == "string" ? i.text_md.trim() : "";
1317
1317
  if (l)
1318
1318
  return (((n = i.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
1319
- const g = (r = i.payload) == null ? void 0 : r.attachments;
1320
- if (Array.isArray(g) && g.length) return "📎 Pièce jointe";
1319
+ const _ = (r = i.payload) == null ? void 0 : r.attachments;
1320
+ if (Array.isArray(_) && _.length) return "📎 Pièce jointe";
1321
1321
  }
1322
1322
  return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((a = e == null ? void 0 : e.metadata) == null ? void 0 : a.last_preview) || "";
1323
1323
  }
@@ -1336,8 +1336,8 @@ function pt(e, t, n, r) {
1336
1336
  if (!s) continue;
1337
1337
  const i = (s.text_md || "").trim();
1338
1338
  if (!i) continue;
1339
- const l = gt(s.author, n), g = s.created_at ? new Date(s.created_at).toLocaleString(r) : "";
1340
- a.push(`[${g}] ${l} :`), a.push(i), a.push("");
1339
+ const l = gt(s.author, n), _ = s.created_at ? new Date(s.created_at).toLocaleString(r) : "";
1340
+ a.push(`[${_}] ${l} :`), a.push(i), a.push("");
1341
1341
  }
1342
1342
  return a.join(`
1343
1343
  `);
@@ -1488,25 +1488,25 @@ const yt = {
1488
1488
  if (typeof Notification > "u" || Notification.permission !== "granted") return;
1489
1489
  const n = t == null ? void 0 : t.author, r = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (r ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), i = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = i ? i.slice(0, 140) : this.t("notification.youHaveNewMessage");
1490
1490
  try {
1491
- const g = new Notification(s, {
1491
+ const _ = new Notification(s, {
1492
1492
  body: l,
1493
1493
  tag: `wm-${e}`,
1494
1494
  renotify: !1,
1495
1495
  silent: !0
1496
1496
  });
1497
- g.onclick = () => {
1497
+ _.onclick = () => {
1498
1498
  try {
1499
1499
  window.focus();
1500
1500
  } catch {
1501
1501
  }
1502
1502
  this.draftConv = null, this.showOnboarding = !1, this.activeConvId = e, this.isOpen = !0, this.store && this.store.setPanelOpen(!0);
1503
1503
  try {
1504
- g.close();
1504
+ _.close();
1505
1505
  } catch {
1506
1506
  }
1507
1507
  };
1508
- } catch (g) {
1509
- console.warn("[ww-messenger] notification failed", g);
1508
+ } catch (_) {
1509
+ console.warn("[ww-messenger] notification failed", _);
1510
1510
  }
1511
1511
  }
1512
1512
  }
@@ -1632,8 +1632,8 @@ const yt = {
1632
1632
  if (!(i != null && i.id)) continue;
1633
1633
  const l = i.last_message_at || "";
1634
1634
  if (!l) continue;
1635
- const g = n.get(i.id) || "";
1636
- l > g && r.push(i.id);
1635
+ const _ = n.get(i.id) || "";
1636
+ l > _ && r.push(i.id);
1637
1637
  }
1638
1638
  this._liveRevealConvSnapshot = new Map(
1639
1639
  t.map((i) => [i.id, (i == null ? void 0 : i.last_message_at) || ""])
@@ -1642,7 +1642,7 @@ const yt = {
1642
1642
  try {
1643
1643
  const l = await ((s = (a = this.store).fetchSinceLast) == null ? void 0 : s.call(a, i));
1644
1644
  if (!Array.isArray(l)) continue;
1645
- for (const g of l) this.paceLiveMessage(g, i);
1645
+ for (const _ of l) this.paceLiveMessage(_, i);
1646
1646
  } catch (l) {
1647
1647
  console.error(
1648
1648
  "[ww-messenger] activity delta fetch failed",
@@ -1664,10 +1664,10 @@ const yt = {
1664
1664
  this.nextRevealAt + n.pauseBetweenMs
1665
1665
  ) + s;
1666
1666
  this.nextRevealAt = l;
1667
- const g = Math.max(0, l - r), k = e.id, b = setTimeout(() => {
1668
- this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== b), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1669
- }, g);
1670
- this.revealTimers.push(b);
1667
+ const _ = Math.max(0, l - r), k = e.id, w = setTimeout(() => {
1668
+ this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((T) => T !== w), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
1669
+ }, _);
1670
+ this.revealTimers.push(w);
1671
1671
  },
1672
1672
  // Walk the message list and queue / instantly-reveal every new
1673
1673
  // entry according to its origin. Used by the `currentConvMessages`
@@ -1689,8 +1689,8 @@ const yt = {
1689
1689
  r[s.id] = n;
1690
1690
  continue;
1691
1691
  }
1692
- const l = typeof (s == null ? void 0 : s.text_md) == "string" && s.text_md.trim().length > 0, g = Array.isArray((a = s == null ? void 0 : s.payload) == null ? void 0 : a.attachments) && s.payload.attachments.length > 0;
1693
- if (!l && !g) {
1692
+ const l = typeof (s == null ? void 0 : s.text_md) == "string" && s.text_md.trim().length > 0, _ = Array.isArray((a = s == null ? void 0 : s.payload) == null ? void 0 : a.attachments) && s.payload.attachments.length > 0;
1693
+ if (!l && !_) {
1694
1694
  r[s.id] = n;
1695
1695
  continue;
1696
1696
  }
@@ -1887,18 +1887,18 @@ function zt(e, t, n, r, a, s) {
1887
1887
  onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
1888
1888
  onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
1889
1889
  }, [
1890
- V(Ne, { name: "wm-peek" }, {
1890
+ $(Ne, { name: "wm-peek" }, {
1891
1891
  default: Fe(() => [
1892
1892
  s.visiblePeeks.length ? (c(), d("div", {
1893
1893
  key: 0,
1894
1894
  class: R(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
1895
1895
  }, [
1896
- (c(!0), d(I, null, F(s.visiblePeeks, (l, g) => (c(), d("div", {
1896
+ (c(!0), d(I, null, F(s.visiblePeeks, (l, _) => (c(), d("div", {
1897
1897
  key: l.convId,
1898
1898
  class: "wm-peek",
1899
1899
  style: z({
1900
- "--depth": s.visiblePeeks.length - 1 - g,
1901
- zIndex: g + 1
1900
+ "--depth": s.visiblePeeks.length - 1 - _,
1901
+ zIndex: _ + 1
1902
1902
  }),
1903
1903
  role: "button",
1904
1904
  tabindex: "0",
@@ -1932,7 +1932,7 @@ function zt(e, t, n, r, a, s) {
1932
1932
  ], -1)
1933
1933
  ])], 8, Lt),
1934
1934
  o("div", It, [
1935
- V(i, {
1935
+ $(i, {
1936
1936
  name: l.senderName,
1937
1937
  "avatar-url": l.senderAvatarUrl,
1938
1938
  size: 34
@@ -1941,7 +1941,7 @@ function zt(e, t, n, r, a, s) {
1941
1941
  key: 0,
1942
1942
  class: "wm-peek__avatarBadge",
1943
1943
  "aria-label": s.t("launcher.unreadMessages", { count: l.count })
1944
- }, v(l.count > 9 ? "9+" : l.count), 9, Et)) : w("", !0)
1944
+ }, v(l.count > 9 ? "9+" : l.count), 9, Et)) : b("", !0)
1945
1945
  ]),
1946
1946
  o("div", Bt, [
1947
1947
  o("div", Pt, [
@@ -1956,7 +1956,7 @@ function zt(e, t, n, r, a, s) {
1956
1956
  onClick: J((k) => e.$emit("open", l.convId), ["stop"])
1957
1957
  }, v(s.t("common.open")), 9, Ft)
1958
1958
  ], 44, Rt))), 128))
1959
- ], 2)) : w("", !0)
1959
+ ], 2)) : b("", !0)
1960
1960
  ]),
1961
1961
  _: 1
1962
1962
  }),
@@ -1987,11 +1987,11 @@ function zt(e, t, n, r, a, s) {
1987
1987
  }) : s.t("launcher.unreadConversationsOne", {
1988
1988
  count: n.unreadCount
1989
1989
  })
1990
- }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ht)) : w("", !0)
1990
+ }, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Ht)) : b("", !0)
1991
1991
  ], 8, jt)
1992
1992
  ], 32);
1993
1993
  }
1994
- const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-44ddf1a1"]]), $t = {
1994
+ const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-44ddf1a1"]]), Vt = {
1995
1995
  name: "WmAIAvatar",
1996
1996
  props: {
1997
1997
  size: { type: Number, default: 26 },
@@ -2020,7 +2020,7 @@ const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-44ddf1a1
2020
2020
  return Me(this.name);
2021
2021
  }
2022
2022
  }
2023
- }, Vt = {
2023
+ }, $t = {
2024
2024
  key: 0,
2025
2025
  class: "wm-aiav__pulse"
2026
2026
  }, Kt = ["src", "alt"], Wt = ["width", "height"];
@@ -2033,7 +2033,7 @@ function Gt(e, t, n, r, a, s) {
2033
2033
  "--wm-avr": n.size * 0.32 + "px"
2034
2034
  })
2035
2035
  }, [
2036
- n.pulse ? (c(), d("div", Vt)) : w("", !0),
2036
+ n.pulse ? (c(), d("div", $t)) : b("", !0),
2037
2037
  o("div", {
2038
2038
  class: R(["wm-aiav__inner", {
2039
2039
  "wm-aiav__inner--glow": n.pulse,
@@ -2082,7 +2082,7 @@ function Gt(e, t, n, r, a, s) {
2082
2082
  ], 6)
2083
2083
  ], 6);
2084
2084
  }
2085
- const oe = /* @__PURE__ */ P($t, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2085
+ const oe = /* @__PURE__ */ P(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
2086
2086
  name: "WmTeamAvatars",
2087
2087
  props: {
2088
2088
  members: { type: Array, default: () => [] },
@@ -2133,8 +2133,8 @@ function en(e, t, n, r, a, s) {
2133
2133
  }, null, 8, Xt)) : (c(), d("span", Qt, v(s.initialsFor(i)), 1))
2134
2134
  ], 4))), 128))
2135
2135
  ], 4),
2136
- n.responseLabel ? (c(), d("span", Zt, v(n.responseLabel), 1)) : w("", !0)
2137
- ])) : w("", !0);
2136
+ n.responseLabel ? (c(), d("span", Zt, v(n.responseLabel), 1)) : b("", !0)
2137
+ ])) : b("", !0);
2138
2138
  }
2139
2139
  const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
2140
2140
  name: "WmHeader",
@@ -2190,7 +2190,7 @@ function fn(e, t, n, r, a, s) {
2190
2190
  type: "button",
2191
2191
  class: "wm-header__icon",
2192
2192
  "aria-label": s.t("header.backToHome"),
2193
- onClick: t[0] || (t[0] = (g) => e.$emit("back"))
2193
+ onClick: t[0] || (t[0] = (_) => e.$emit("back"))
2194
2194
  }, [...t[3] || (t[3] = [
2195
2195
  o("svg", {
2196
2196
  width: "13",
@@ -2208,7 +2208,7 @@ function fn(e, t, n, r, a, s) {
2208
2208
  ])], 8, rn)) : (c(), d("div", an)),
2209
2209
  n.showIdentity ? (c(), d(I, { key: 2 }, [
2210
2210
  o("div", on, [
2211
- V(i, {
2211
+ $(i, {
2212
2212
  size: 30,
2213
2213
  name: n.agentName,
2214
2214
  "image-url": n.agentAvatarUrl
@@ -2221,7 +2221,7 @@ function fn(e, t, n, r, a, s) {
2221
2221
  key: 0,
2222
2222
  members: s.displayedTeamMembers,
2223
2223
  "response-label": ""
2224
- }, null, 8, ["members"])) : w("", !0)
2224
+ }, null, 8, ["members"])) : b("", !0)
2225
2225
  ], 64)) : (c(), d("div", dn)),
2226
2226
  o("div", un, [
2227
2227
  n.showMore ? (c(), d("button", {
@@ -2230,7 +2230,7 @@ function fn(e, t, n, r, a, s) {
2230
2230
  class: R(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
2231
2231
  "aria-label": s.t("header.moreOptions"),
2232
2232
  title: s.t("header.moreOptions"),
2233
- onClick: t[1] || (t[1] = (g) => e.$emit("more"))
2233
+ onClick: t[1] || (t[1] = (_) => e.$emit("more"))
2234
2234
  }, [...t[4] || (t[4] = [
2235
2235
  o("svg", {
2236
2236
  width: "13",
@@ -2255,14 +2255,14 @@ function fn(e, t, n, r, a, s) {
2255
2255
  r: "1.6"
2256
2256
  })
2257
2257
  ], -1)
2258
- ])], 10, hn)) : w("", !0),
2258
+ ])], 10, hn)) : b("", !0),
2259
2259
  n.showClose ? (c(), d("button", {
2260
2260
  key: 1,
2261
2261
  type: "button",
2262
2262
  class: "wm-header__icon",
2263
2263
  "aria-label": s.t("header.closeWidget"),
2264
2264
  title: s.t("header.closeWidget"),
2265
- onClick: t[2] || (t[2] = (g) => e.$emit("close"))
2265
+ onClick: t[2] || (t[2] = (_) => e.$emit("close"))
2266
2266
  }, [...t[5] || (t[5] = [
2267
2267
  o("svg", {
2268
2268
  width: "13",
@@ -2277,7 +2277,7 @@ function fn(e, t, n, r, a, s) {
2277
2277
  }, [
2278
2278
  o("path", { d: "M18 6L6 18M6 6l12 12" })
2279
2279
  ], -1)
2280
- ])], 8, mn)) : w("", !0)
2280
+ ])], 8, mn)) : b("", !0)
2281
2281
  ])
2282
2282
  ]);
2283
2283
  }
@@ -2438,7 +2438,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
2438
2438
  "stroke-linecap": "round",
2439
2439
  "stroke-linejoin": "round",
2440
2440
  "aria-hidden": "true"
2441
- }, $n = { class: "wm-onb__btn-icon" }, Vn = {
2441
+ }, Vn = { class: "wm-onb__btn-icon" }, $n = {
2442
2442
  width: "18",
2443
2443
  height: "18",
2444
2444
  viewBox: "0 0 24 24",
@@ -2487,7 +2487,7 @@ function Yn(e, t, n, r, a, s) {
2487
2487
  opacity: "0.65"
2488
2488
  })
2489
2489
  ], -1)),
2490
- V(i, {
2490
+ $(i, {
2491
2491
  size: 52,
2492
2492
  "image-url": n.defaultIconUrl
2493
2493
  }, null, 8, ["image-url"]),
@@ -2501,7 +2501,7 @@ function Yn(e, t, n, r, a, s) {
2501
2501
  key: l.id,
2502
2502
  type: "button",
2503
2503
  class: "wm-onb__alert",
2504
- onClick: (g) => e.$emit("resume", l)
2504
+ onClick: (_) => e.$emit("resume", l)
2505
2505
  }, [
2506
2506
  o("span", {
2507
2507
  class: R(["wm-onb__alert-avatar", s.avatarWrapperClass(l)])
@@ -2532,18 +2532,18 @@ function Yn(e, t, n, r, a, s) {
2532
2532
  o("span", Mn, [
2533
2533
  o("span", Tn, v(l.title), 1),
2534
2534
  o("span", xn, [
2535
- s.senderLabel(l) ? (c(), d("span", On, v(s.senderLabel(l)) + " · ", 1)) : w("", !0),
2535
+ s.senderLabel(l) ? (c(), d("span", On, v(s.senderLabel(l)) + " · ", 1)) : b("", !0),
2536
2536
  o("span", {
2537
2537
  innerHTML: s.renderPreview(l.preview)
2538
2538
  }, null, 8, Rn)
2539
2539
  ])
2540
2540
  ]),
2541
2541
  o("span", Ln, [
2542
- s.formatTs(l._ts) ? (c(), d("span", In, v(s.formatTs(l._ts)), 1)) : w("", !0),
2542
+ s.formatTs(l._ts) ? (c(), d("span", In, v(s.formatTs(l._ts)), 1)) : b("", !0),
2543
2543
  o("span", En, v(s.t("onboarding.resume")), 1)
2544
2544
  ])
2545
2545
  ], 8, Cn))), 128))
2546
- ])) : w("", !0),
2546
+ ])) : b("", !0),
2547
2547
  o("div", Bn, [
2548
2548
  o("button", {
2549
2549
  type: "button",
@@ -2568,8 +2568,8 @@ function Yn(e, t, n, r, a, s) {
2568
2568
  ], -1)),
2569
2569
  o("span", Un, v(n.busy ? "…" : s.t("onboarding.start")), 1)
2570
2570
  ], 8, Pn),
2571
- (c(!0), d(I, null, F(n.quickLinks, (l, g) => (c(), d("button", {
2572
- key: "ql-" + g,
2571
+ (c(!0), d(I, null, F(n.quickLinks, (l, _) => (c(), d("button", {
2572
+ key: "ql-" + _,
2573
2573
  type: "button",
2574
2574
  class: "wm-onb__btn",
2575
2575
  onClick: (k) => e.$emit("select", l)
@@ -2590,7 +2590,7 @@ function Yn(e, t, n, r, a, s) {
2590
2590
  o("span", zn, v(l.label), 1),
2591
2591
  s.isExternalLink(l) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
2592
2592
  o("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
2593
- ])])) : w("", !0)
2593
+ ])])) : b("", !0)
2594
2594
  ], 8, Dn))), 128)),
2595
2595
  n.openThreads.length ? (c(), d("button", {
2596
2596
  key: 0,
@@ -2598,8 +2598,8 @@ function Yn(e, t, n, r, a, s) {
2598
2598
  class: "wm-onb__btn",
2599
2599
  onClick: t[1] || (t[1] = (l) => e.$emit("view-history"))
2600
2600
  }, [
2601
- o("span", $n, [
2602
- (c(), d("svg", Vn, [
2601
+ o("span", Vn, [
2602
+ (c(), d("svg", $n, [
2603
2603
  o("path", {
2604
2604
  d: s.iconPath("chat")
2605
2605
  }, null, 8, Kn)
@@ -2621,7 +2621,7 @@ function Yn(e, t, n, r, a, s) {
2621
2621
  }, [
2622
2622
  o("path", { d: "M9 18l6-6-6-6" })
2623
2623
  ], -1))
2624
- ])) : w("", !0)
2624
+ ])) : b("", !0)
2625
2625
  ])
2626
2626
  ]);
2627
2627
  }
@@ -2763,7 +2763,7 @@ function us(e, t, n, r, a, s) {
2763
2763
  key: 2,
2764
2764
  class: "wm-hist__thread-dot",
2765
2765
  "aria-label": s.t("onboarding.unread")
2766
- }, null, 8, rs)) : w("", !0)
2766
+ }, null, 8, rs)) : b("", !0)
2767
2767
  ], 2),
2768
2768
  o("span", is, [
2769
2769
  o("span", as, v(i.title), 1),
@@ -2773,7 +2773,7 @@ function us(e, t, n, r, a, s) {
2773
2773
  }, null, 8, os)
2774
2774
  ]),
2775
2775
  o("span", ls, [
2776
- s.formatTs(i._ts) ? (c(), d("span", cs, v(s.formatTs(i._ts)), 1)) : w("", !0),
2776
+ s.formatTs(i._ts) ? (c(), d("span", cs, v(s.formatTs(i._ts)), 1)) : b("", !0),
2777
2777
  t[3] || (t[3] = o("svg", {
2778
2778
  width: "14",
2779
2779
  height: "14",
@@ -2790,7 +2790,7 @@ function us(e, t, n, r, a, s) {
2790
2790
  ], -1))
2791
2791
  ])
2792
2792
  ], 10, ns))), 128)),
2793
- s.filteredThreads.length ? w("", !0) : (c(), d("div", ds, v(a.query ? s.t("onboarding.noResults", { query: a.query }) : s.t("onboarding.noConversations")), 1))
2793
+ s.filteredThreads.length ? b("", !0) : (c(), d("div", ds, v(a.query ? s.t("onboarding.noResults", { query: a.query }) : s.t("onboarding.noConversations")), 1))
2794
2794
  ])
2795
2795
  ]);
2796
2796
  }
@@ -2895,7 +2895,7 @@ function Cs(e, t, n, r, a, s) {
2895
2895
  "aria-hidden": "true"
2896
2896
  }, " · ", -1)),
2897
2897
  o("span", ks, v(s.detailText), 1)
2898
- ], 64)) : w("", !0)
2898
+ ], 64)) : b("", !0)
2899
2899
  ])
2900
2900
  ], 2);
2901
2901
  }
@@ -2980,8 +2980,8 @@ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
2980
2980
  }, qs = {
2981
2981
  key: 0,
2982
2982
  class: "wm-art__text"
2983
- }, $s = { class: "wm-art__fieldLabel" };
2984
- function Vs(e, t, n, r, a, s) {
2983
+ }, Vs = { class: "wm-art__fieldLabel" };
2984
+ function $s(e, t, n, r, a, s) {
2985
2985
  return c(), d("div", Ps, [
2986
2986
  n.data.image_url ? (c(), d("figure", Us, [
2987
2987
  o("img", {
@@ -2989,11 +2989,11 @@ function Vs(e, t, n, r, a, s) {
2989
2989
  alt: n.data.title || "",
2990
2990
  loading: "lazy"
2991
2991
  }, null, 8, Ds)
2992
- ])) : w("", !0),
2992
+ ])) : b("", !0),
2993
2993
  o("div", Ns, [
2994
2994
  o("div", Fs, [
2995
2995
  o("div", js, v(n.data.title), 1),
2996
- n.data.subtitle ? (c(), d("div", Hs, v(n.data.subtitle), 1)) : w("", !0)
2996
+ n.data.subtitle ? (c(), d("div", Hs, v(n.data.subtitle), 1)) : b("", !0)
2997
2997
  ]),
2998
2998
  n.data.badge && n.data.badge.label ? (c(), d("span", {
2999
2999
  key: 0,
@@ -3001,26 +3001,26 @@ function Vs(e, t, n, r, a, s) {
3001
3001
  "wm-art__badge",
3002
3002
  `wm-art__badge--${n.data.badge.tone || "neutral"}`
3003
3003
  ])
3004
- }, v(n.data.badge.label), 3)) : w("", !0)
3004
+ }, v(n.data.badge.label), 3)) : b("", !0)
3005
3005
  ]),
3006
3006
  s.hasBody ? (c(), d("div", zs, [
3007
- n.data.body ? (c(), d("div", qs, v(n.data.body), 1)) : w("", !0),
3007
+ n.data.body ? (c(), d("div", qs, v(n.data.body), 1)) : b("", !0),
3008
3008
  s.fields.length ? (c(!0), d(I, { key: 1 }, F(s.fields, (i, l) => (c(), d("div", {
3009
3009
  key: l,
3010
3010
  class: "wm-art__field"
3011
3011
  }, [
3012
- o("div", $s, v(i.label), 1),
3012
+ o("div", Vs, v(i.label), 1),
3013
3013
  o("div", {
3014
3014
  class: R([
3015
3015
  "wm-art__fieldValue",
3016
3016
  { "wm-art__fieldValue--multi": i.multiline }
3017
3017
  ])
3018
3018
  }, v(i.value), 3)
3019
- ]))), 128)) : w("", !0)
3020
- ])) : w("", !0)
3019
+ ]))), 128)) : b("", !0)
3020
+ ])) : b("", !0)
3021
3021
  ]);
3022
3022
  }
3023
- const Ks = /* @__PURE__ */ P(Bs, [["render", Vs], ["__scopeId", "data-v-7eae0e4a"]]);
3023
+ const Ks = /* @__PURE__ */ P(Bs, [["render", $s], ["__scopeId", "data-v-7eae0e4a"]]);
3024
3024
  function Ws(e, t, n) {
3025
3025
  if (!e) return "";
3026
3026
  const r = new Date(e);
@@ -3139,7 +3139,7 @@ function ar(e, t, n, r, a, s) {
3139
3139
  Se(" " + v(n.data.status.label), 1)
3140
3140
  ], 2)
3141
3141
  ]),
3142
- n.data.body ? (c(), d("div", er, v(n.data.body), 1)) : w("", !0)
3142
+ n.data.body ? (c(), d("div", er, v(n.data.body), 1)) : b("", !0)
3143
3143
  ]),
3144
3144
  s.fields.length ? (c(), d("div", tr, [
3145
3145
  (c(!0), d(I, null, F(s.fields, (i, l) => (c(), d("div", {
@@ -3192,11 +3192,11 @@ function ar(e, t, n, r, a, s) {
3192
3192
  rx: "2"
3193
3193
  }, null, -1),
3194
3194
  o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
3195
- ])])) : w("", !0),
3195
+ ])])) : b("", !0),
3196
3196
  o("span", null, v(i.value), 1)
3197
3197
  ], 2)
3198
3198
  ]))), 128))
3199
- ])) : w("", !0),
3199
+ ])) : b("", !0),
3200
3200
  n.data.created_at ? (c(), d("div", ir, [
3201
3201
  t[4] || (t[4] = o("svg", {
3202
3202
  width: "11",
@@ -3219,7 +3219,7 @@ function ar(e, t, n, r, a, s) {
3219
3219
  o("path", { d: "M16 2v4M8 2v4M3 10h18" })
3220
3220
  ], -1)),
3221
3221
  o("span", null, v(s.formattedDate), 1)
3222
- ])) : w("", !0)
3222
+ ])) : b("", !0)
3223
3223
  ]);
3224
3224
  }
3225
3225
  const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
@@ -3245,7 +3245,7 @@ function dr(e, t, n, r, a, s) {
3245
3245
  return s.component ? (c(), U(Ae(s.component), {
3246
3246
  key: 0,
3247
3247
  data: n.artifact.data
3248
- }, null, 8, ["data"])) : w("", !0);
3248
+ }, null, 8, ["data"])) : b("", !0);
3249
3249
  }
3250
3250
  const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
3251
3251
  name: "WmAttachmentPreview",
@@ -3377,13 +3377,13 @@ function kr(e, t, n, r, a, s) {
3377
3377
  ], -1)),
3378
3378
  o("span", vr, [
3379
3379
  o("span", yr, v(s.displayName), 1),
3380
- s.sizeLabel ? (c(), d("span", wr, v(s.sizeLabel), 1)) : w("", !0)
3380
+ s.sizeLabel ? (c(), d("span", wr, v(s.sizeLabel), 1)) : b("", !0)
3381
3381
  ]),
3382
- a.loading ? (c(), d("span", br)) : w("", !0)
3382
+ a.loading ? (c(), d("span", br)) : b("", !0)
3383
3383
  ], 8, pr))
3384
3384
  ], 2);
3385
3385
  }
3386
- const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-0d27fca6"]]), Ar = {
3386
+ const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
3387
3387
  name: "WmBubble",
3388
3388
  props: {
3389
3389
  role: { type: String, default: "ai" },
@@ -3508,8 +3508,8 @@ const Ir = {
3508
3508
  const l = this.roleOf(i);
3509
3509
  if (l === "system") {
3510
3510
  if (((n = i == null ? void 0 : i.payload) == null ? void 0 : n.event) === "action_admin_pending") {
3511
- const b = e[e.length - 1];
3512
- b && b.role === "ai" ? b.messages.push(i) : e.push({
3511
+ const w = e[e.length - 1];
3512
+ w && w.role === "ai" ? w.messages.push(i) : e.push({
3513
3513
  key: `g-${ee(i)}`,
3514
3514
  role: "ai",
3515
3515
  agentName: "",
@@ -3528,8 +3528,8 @@ const Ir = {
3528
3528
  });
3529
3529
  continue;
3530
3530
  }
3531
- const g = e[e.length - 1];
3532
- g && g.role === l && (l === "ai" || g.agentName === (((r = i == null ? void 0 : i.author) == null ? void 0 : r.name) || "")) ? g.messages.push(i) : e.push({
3531
+ const _ = e[e.length - 1];
3532
+ _ && _.role === l && (l === "ai" || _.agentName === (((r = i == null ? void 0 : i.author) == null ? void 0 : r.name) || "")) ? _.messages.push(i) : e.push({
3533
3533
  key: `g-${ee(i)}`,
3534
3534
  role: l,
3535
3535
  agentName: ((a = i == null ? void 0 : i.author) == null ? void 0 : a.name) || "",
@@ -3541,8 +3541,8 @@ const Ir = {
3541
3541
  for (const i of e) {
3542
3542
  if (i.role === "system") continue;
3543
3543
  const l = [];
3544
- for (const g of i.messages)
3545
- for (const k of this.itemsOf(g)) l.push(k);
3544
+ for (const _ of i.messages)
3545
+ for (const k of this.itemsOf(_)) l.push(k);
3546
3546
  i.items = l;
3547
3547
  }
3548
3548
  const t = [];
@@ -3828,9 +3828,9 @@ const Ir = {
3828
3828
  // doit garder son arrondi.
3829
3829
  cornersFor(e, t) {
3830
3830
  var Q, se, re;
3831
- const n = e.items, r = (Q = n[t]) == null ? void 0 : Q.kind, a = (se = n[t - 1]) == null ? void 0 : se.kind, s = (re = n[t + 1]) == null ? void 0 : re.kind, i = e.role === "user", l = 14, g = 4, k = a == null ? void 0 : a.bottom, b = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = (W, ie, X) => W != null && T != null ? W + q >= T : ie === X || ie === "card" && X === "bubble";
3831
+ const n = e.items, r = (Q = n[t]) == null ? void 0 : Q.kind, a = (se = n[t - 1]) == null ? void 0 : se.kind, s = (re = n[t + 1]) == null ? void 0 : re.kind, i = e.role === "user", l = 14, _ = 4, k = a == null ? void 0 : a.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, M = (W, ie, X) => W != null && T != null ? W + q >= T : ie === X || ie === "card" && X === "bubble";
3832
3832
  let D = l, N = l, L = l, K = l;
3833
- return i ? (k && (N = g), (b || !s) && (L = g), k && M(E, k, r == null ? void 0 : r.top) && (D = g), b && M(A, b, r == null ? void 0 : r.bottom) && (K = g)) : (k && (D = g), (b || !s) && (K = g), k && M(E, k, r == null ? void 0 : r.top) && (N = g), b && M(A, b, r == null ? void 0 : r.bottom) && (L = g)), { tl: D, tr: N, br: L, bl: K };
3833
+ return i ? (k && (N = _), (w || !s) && (L = _), k && M(E, k, r == null ? void 0 : r.top) && (D = _), w && M(A, w, r == null ? void 0 : r.bottom) && (K = _)) : (k && (D = _), (w || !s) && (K = _), k && M(E, k, r == null ? void 0 : r.top) && (N = _), w && M(A, w, r == null ? void 0 : r.bottom) && (L = _)), { tl: D, tr: N, br: L, bl: K };
3834
3834
  },
3835
3835
  // Inline column-count for the mosaic grid, capped at 4. Single
3836
3836
  // attachment falls back to the vertical-list layout (null). Two
@@ -3840,6 +3840,22 @@ const Ir = {
3840
3840
  mosaicGridStyle(e) {
3841
3841
  return !e || e < 2 ? null : { "grid-template-columns": `repeat(${Math.min(e, 4)}, 1fr)` };
3842
3842
  },
3843
+ // Per-cell corner radius for a mosaic tile. Only the INNER
3844
+ // corners (where two tiles meet) are emitted — they flatten
3845
+ // to 0. The OUTER corners (cell sitting on the grid edge)
3846
+ // are left unset, so the cell falls through to the
3847
+ // cluster-level `--wm-r-*` vars set on `.wm-list__row` by
3848
+ // `cornersStyle`. That way a corner image on the bubble
3849
+ // boundary follows the exact same smart-corner calculation
3850
+ // as a text bubble would. `mixed` flags that a text bubble
3851
+ // sits above the mosaic — in that case the top edge of the
3852
+ // grid is connected to the bubble's flat bottom, so the top
3853
+ // corners of every top-row cell flatten too.
3854
+ mosaicCornerStyle(e, t, n) {
3855
+ if (!t || t < 2) return null;
3856
+ const r = Math.min(t, 4), a = Math.floor(e / r), s = e % r, i = s > 0, l = s < r - 1 && e + 1 < t, _ = a > 0, k = e + r < t, w = "0px", T = {};
3857
+ return (i || _) && (T["--wm-r-tl"] = w), (l || _) && (T["--wm-r-tr"] = w), (i || k) && (T["--wm-r-bl"] = w), (l || k) && (T["--wm-r-br"] = w), n && (T["--wm-r-tl"] = w, T["--wm-r-tr"] = w), Object.keys(T).length ? T : null;
3858
+ },
3843
3859
  // Inline style emitting the four corner CSS variables. Set on
3844
3860
  // `.wm-list__row` so they cascade to Bubble/ActionResult/
3845
3861
  // ArtifactRenderer. Returns null for single-item clusters so
@@ -3885,8 +3901,8 @@ const Ir = {
3885
3901
  ".wm-bubble, .wm-result, .wm-art, .wm-list__body"
3886
3902
  );
3887
3903
  if (!l) continue;
3888
- const g = l.getBoundingClientRect().width;
3889
- g > 0 && (t[i] = g);
3904
+ const _ = l.getBoundingClientRect().width;
3905
+ _ > 0 && (t[i] = _);
3890
3906
  }
3891
3907
  const n = this.widthByKey, r = Object.keys(n), a = Object.keys(t);
3892
3908
  if (r.length === a.length) {
@@ -4002,10 +4018,10 @@ const Ir = {
4002
4018
  }, Hr = { class: "wm-list__sep-label" }, zr = {
4003
4019
  key: 0,
4004
4020
  class: "wm-list__sep wm-list__sep--unread"
4005
- }, qr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, $r = {
4021
+ }, qr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Vr = {
4006
4022
  key: 0,
4007
4023
  class: "wm-list__sysep"
4008
- }, Vr = { class: "wm-list__sysep-label" }, Kr = ["data-row-key", "onPointerdown"], Wr = {
4024
+ }, $r = { class: "wm-list__sysep-label" }, Kr = ["data-row-key", "onPointerdown"], Wr = {
4009
4025
  key: 0,
4010
4026
  class: "wm-list__avatarSlot"
4011
4027
  }, Gr = { key: 0 }, Yr = {
@@ -4019,7 +4035,7 @@ const Ir = {
4019
4035
  class: "wm-list__row wm-list__row--ai fade-up"
4020
4036
  }, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
4021
4037
  function si(e, t, n, r, a, s) {
4022
- const i = B("AIAvatar"), l = B("HumanAvatar"), g = B("ActionResult"), k = B("ArtifactRenderer"), b = B("Bubble"), T = B("AttachmentPreview"), E = B("Typing");
4038
+ const i = B("AIAvatar"), l = B("HumanAvatar"), _ = B("ActionResult"), k = B("ArtifactRenderer"), w = B("Bubble"), T = B("AttachmentPreview"), E = B("Typing");
4023
4039
  return c(), d("div", Ur, [
4024
4040
  o("div", {
4025
4041
  ref: "scrollEl",
@@ -4032,12 +4048,12 @@ function si(e, t, n, r, a, s) {
4032
4048
  "aria-hidden": "true"
4033
4049
  }, null, -1)),
4034
4050
  o("span", Nr, v(s.t("messageList.loadingHistory")), 1)
4035
- ])) : s.historyExhausted ? (c(), d("div", Fr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
4051
+ ])) : s.historyExhausted ? (c(), d("div", Fr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
4036
4052
  n.dateLabel ? (c(), d("div", jr, [
4037
4053
  t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
4038
4054
  o("span", Hr, v(n.dateLabel), 1),
4039
4055
  t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
4040
- ])) : w("", !0),
4056
+ ])) : b("", !0),
4041
4057
  (c(!0), d(I, null, F(s.groups, (A, q) => (c(), d(I, {
4042
4058
  key: A.key
4043
4059
  }, [
@@ -4045,14 +4061,14 @@ function si(e, t, n, r, a, s) {
4045
4061
  t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
4046
4062
  o("span", qr, v(s.t("messageList.unread")), 1),
4047
4063
  t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
4048
- ])) : w("", !0),
4064
+ ])) : b("", !0),
4049
4065
  A.role === "system" || A.items.length ? (c(), d("div", {
4050
4066
  key: 1,
4051
4067
  class: R(["wm-list__group", "wm-list__group--" + A.role])
4052
4068
  }, [
4053
- A.role === "system" ? (c(), d("div", $r, [
4069
+ A.role === "system" ? (c(), d("div", Vr, [
4054
4070
  t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
4055
- o("span", Vr, v(A.systemLabel), 1),
4071
+ o("span", $r, v(A.systemLabel), 1),
4056
4072
  t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
4057
4073
  ])) : (c(), d(I, { key: 1 }, [
4058
4074
  (c(!0), d(I, null, F(A.items, (M, D) => (c(), d(I, {
@@ -4090,14 +4106,14 @@ function si(e, t, n, r, a, s) {
4090
4106
  size: 26,
4091
4107
  tail: !0
4092
4108
  }, null, 8, ["name", "avatar-url"]))
4093
- ], 64)) : w("", !0)
4094
- ])) : w("", !0),
4095
- M.renderAs === "action" ? (c(), U(g, {
4109
+ ], 64)) : b("", !0)
4110
+ ])) : b("", !0),
4111
+ M.renderAs === "action" ? (c(), U(_, {
4096
4112
  key: 1,
4097
4113
  state: M.message.payload.state,
4098
4114
  label: s.actionLabel(M.message),
4099
4115
  detail: s.actionDetail(M.message)
4100
- }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(g, {
4116
+ }, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(_, {
4101
4117
  key: 2,
4102
4118
  state: "awaiting",
4103
4119
  label: s.t("messageList.approvalRequestSent"),
@@ -4114,11 +4130,11 @@ function si(e, t, n, r, a, s) {
4114
4130
  "wm-list__body--mixed": !!M.message.text_md && s.attachmentsOf(M.message).length > 0
4115
4131
  }])
4116
4132
  }, [
4117
- M.message.text_md ? (c(), U(b, {
4133
+ M.message.text_md ? (c(), U(w, {
4118
4134
  key: 0,
4119
4135
  role: A.role,
4120
4136
  text: M.message.text_md
4121
- }, null, 8, ["role", "text"])) : w("", !0),
4137
+ }, null, 8, ["role", "text"])) : b("", !0),
4122
4138
  s.attachmentsOf(M.message).length ? (c(), d("div", {
4123
4139
  key: 1,
4124
4140
  class: R(["wm-list__atts", {
@@ -4135,44 +4151,51 @@ function si(e, t, n, r, a, s) {
4135
4151
  M.message
4136
4152
  ), (N, L) => (c(), U(T, {
4137
4153
  key: `${s.messageKey(M.message)}-att-${L}`,
4138
- attachment: N
4139
- }, null, 8, ["attachment"]))), 128))
4140
- ], 6)) : w("", !0)
4154
+ attachment: N,
4155
+ style: z(
4156
+ s.mosaicCornerStyle(
4157
+ L,
4158
+ s.attachmentsOf(M.message).length,
4159
+ !!M.message.text_md
4160
+ )
4161
+ )
4162
+ }, null, 8, ["attachment", "style"]))), 128))
4163
+ ], 6)) : b("", !0)
4141
4164
  ], 2))
4142
4165
  ], 46, Kr),
4143
4166
  D < A.items.length - 1 && a.pressedItemKey === `${s.messageKey(M.message)}-${M.partKey}` && (A.role !== "user" || s.timeOf(M.message)) ? (c(), d("div", {
4144
4167
  key: 0,
4145
4168
  class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
4146
4169
  }, [
4147
- A.role !== "user" ? (c(), d("span", Gr, v(s.roleLabel(A)), 1)) : w("", !0),
4148
- A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", Yr, "•")) : w("", !0),
4149
- s.timeOf(M.message) ? (c(), d("span", Jr, v(s.timeOf(M.message)), 1)) : w("", !0)
4150
- ], 2)) : w("", !0)
4170
+ A.role !== "user" ? (c(), d("span", Gr, v(s.roleLabel(A)), 1)) : b("", !0),
4171
+ A.role !== "user" && s.timeOf(M.message) ? (c(), d("span", Yr, "•")) : b("", !0),
4172
+ s.timeOf(M.message) ? (c(), d("span", Jr, v(s.timeOf(M.message)), 1)) : b("", !0)
4173
+ ], 2)) : b("", !0)
4151
4174
  ], 64))), 128)),
4152
4175
  (A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), d("div", {
4153
4176
  key: 0,
4154
4177
  class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
4155
4178
  }, [
4156
- A.role !== "user" ? (c(), d("span", Xr, v(s.roleLabel(A)), 1)) : w("", !0),
4157
- A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : w("", !0),
4158
- s.lastTimeOf(A) ? (c(), d("span", Zr, v(s.lastTimeOf(A)), 1)) : w("", !0)
4159
- ], 2)) : w("", !0)
4179
+ A.role !== "user" ? (c(), d("span", Xr, v(s.roleLabel(A)), 1)) : b("", !0),
4180
+ A.role !== "user" && s.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : b("", !0),
4181
+ s.lastTimeOf(A) ? (c(), d("span", Zr, v(s.lastTimeOf(A)), 1)) : b("", !0)
4182
+ ], 2)) : b("", !0)
4160
4183
  ], 64))
4161
- ], 2)) : w("", !0)
4184
+ ], 2)) : b("", !0)
4162
4185
  ], 64))), 128)),
4163
4186
  n.streamingActive ? (c(), d("div", ei, [
4164
4187
  o("div", ti, [
4165
- V(i, {
4188
+ $(i, {
4166
4189
  size: 26,
4167
4190
  tail: !0,
4168
4191
  name: n.aiAgentName,
4169
4192
  "image-url": n.aiAgentAvatarUrl
4170
4193
  }, null, 8, ["name", "image-url"])
4171
4194
  ]),
4172
- V(E)
4173
- ])) : w("", !0)
4195
+ $(E)
4196
+ ])) : b("", !0)
4174
4197
  ], 34),
4175
- V(Ne, { name: "wm-scrollDown" }, {
4198
+ $(Ne, { name: "wm-scrollDown" }, {
4176
4199
  default: Fe(() => [
4177
4200
  a.showScrollDown ? (c(), d("button", {
4178
4201
  key: 0,
@@ -4195,13 +4218,13 @@ function si(e, t, n, r, a, s) {
4195
4218
  }, [
4196
4219
  o("path", { d: "M6 9l6 6 6-6" })
4197
4220
  ], -1)
4198
- ])], 8, ni)) : w("", !0)
4221
+ ])], 8, ni)) : b("", !0)
4199
4222
  ]),
4200
4223
  _: 1
4201
4224
  })
4202
4225
  ]);
4203
4226
  }
4204
- const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-c4e912fd"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4227
+ const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-e131918e"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
4205
4228
  function ii() {
4206
4229
  return Oe && [
4207
4230
  "video/webm;codecs=vp9,opus",
@@ -4213,7 +4236,7 @@ function ii() {
4213
4236
  return (r = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : r.call(n, t);
4214
4237
  }) || "";
4215
4238
  }
4216
- function $e({ audio: e }) {
4239
+ function Ve({ audio: e }) {
4217
4240
  return {
4218
4241
  video: !0,
4219
4242
  audio: !!e,
@@ -4230,7 +4253,7 @@ async function ai() {
4230
4253
  let e;
4231
4254
  try {
4232
4255
  e = await navigator.mediaDevices.getDisplayMedia(
4233
- $e({ audio: !1 })
4256
+ Ve({ audio: !1 })
4234
4257
  );
4235
4258
  } catch (t) {
4236
4259
  return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
@@ -4250,9 +4273,9 @@ async function oi(e) {
4250
4273
  t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
4251
4274
  const n = t.videoWidth || 1280, r = t.videoHeight || 720, a = document.createElement("canvas");
4252
4275
  a.width = n, a.height = r, a.getContext("2d").drawImage(t, 0, 0, n, r);
4253
- const s = await new Promise((l, g) => {
4276
+ const s = await new Promise((l, _) => {
4254
4277
  a.toBlob(
4255
- (k) => k ? l(k) : g(new Error("toBlob failed")),
4278
+ (k) => k ? l(k) : _(new Error("toBlob failed")),
4256
4279
  "image/png"
4257
4280
  );
4258
4281
  }), i = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
@@ -4264,58 +4287,58 @@ async function li(e = {}) {
4264
4287
  let t;
4265
4288
  try {
4266
4289
  t = await navigator.mediaDevices.getDisplayMedia(
4267
- $e({ audio: !0 })
4290
+ Ve({ audio: !0 })
4268
4291
  );
4269
- } catch (b) {
4270
- return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
4292
+ } catch (w) {
4293
+ return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
4271
4294
  }
4272
4295
  const n = ii();
4273
4296
  let r;
4274
4297
  try {
4275
4298
  r = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
4276
- } catch (b) {
4277
- return console.error("[media] recorder init", b), t.getTracks().forEach((T) => {
4299
+ } catch (w) {
4300
+ return console.error("[media] recorder init", w), t.getTracks().forEach((T) => {
4278
4301
  T.stop();
4279
4302
  }), null;
4280
4303
  }
4281
4304
  const a = [];
4282
4305
  let s = null, i = !1;
4283
- r.addEventListener("dataavailable", (b) => {
4284
- b.data && b.data.size > 0 && a.push(b.data);
4306
+ r.addEventListener("dataavailable", (w) => {
4307
+ w.data && w.data.size > 0 && a.push(w.data);
4285
4308
  }), r.addEventListener("stop", () => {
4286
- var b, T;
4309
+ var w, T;
4287
4310
  if (s && clearInterval(s), t.getTracks().forEach((E) => {
4288
4311
  E.stop();
4289
4312
  }), a.length) {
4290
4313
  const E = r.mimeType || n || "video/webm", A = new Blob(a, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([A], `ecran-${M}.${q}`, {
4291
4314
  type: E
4292
4315
  });
4293
- (b = e.onfinalize) == null || b.call(e, D);
4316
+ (w = e.onfinalize) == null || w.call(e, D);
4294
4317
  } else
4295
4318
  (T = e.oncancel) == null || T.call(e);
4296
- }), t.getVideoTracks().forEach((b) => {
4297
- b.addEventListener("ended", () => l(), { once: !0 });
4319
+ }), t.getVideoTracks().forEach((w) => {
4320
+ w.addEventListener("ended", () => l(), { once: !0 });
4298
4321
  });
4299
4322
  function l() {
4300
4323
  if (!i && (i = !0, r.state !== "inactive"))
4301
4324
  try {
4302
4325
  r.stop();
4303
- } catch (b) {
4304
- console.error("[media] recorder stop", b);
4326
+ } catch (w) {
4327
+ console.error("[media] recorder stop", w);
4305
4328
  }
4306
4329
  }
4307
4330
  try {
4308
4331
  r.start(1e3);
4309
- } catch (b) {
4310
- return console.error("[media] recorder start", b), t.getTracks().forEach((T) => {
4332
+ } catch (w) {
4333
+ return console.error("[media] recorder start", w), t.getTracks().forEach((T) => {
4311
4334
  T.stop();
4312
4335
  }), null;
4313
4336
  }
4314
4337
  (k = e.onstart) == null || k.call(e);
4315
- const g = Date.now();
4338
+ const _ = Date.now();
4316
4339
  return s = setInterval(() => {
4317
- var b;
4318
- (b = e.ontick) == null || b.call(e, Date.now() - g);
4340
+ var w;
4341
+ (w = e.ontick) == null || w.call(e, Date.now() - _);
4319
4342
  }, 500), {
4320
4343
  stop: l,
4321
4344
  get state() {
@@ -4524,7 +4547,7 @@ function ki(e, t, n, r, a, s) {
4524
4547
  class: "wm-rec__stop",
4525
4548
  onClick: t[0] || (t[0] = (...i) => s.stopRecording && s.stopRecording(...i))
4526
4549
  }, v(s.t("composer.stop")), 1)
4527
- ])) : w("", !0),
4550
+ ])) : b("", !0),
4528
4551
  o("form", {
4529
4552
  class: R(["wm-compose", { "has-attach": a.attachOpen }]),
4530
4553
  onSubmit: t[7] || (t[7] = J((...i) => s.onSubmit && s.onSubmit(...i), ["prevent"]))
@@ -4540,7 +4563,7 @@ function ki(e, t, n, r, a, s) {
4540
4563
  key: 0,
4541
4564
  class: "wm-compose__overlay",
4542
4565
  onClick: t[2] || (t[2] = (i) => a.attachOpen = !1)
4543
- })) : w("", !0),
4566
+ })) : b("", !0),
4544
4567
  a.attachOpen ? (c(), d("div", mi, [
4545
4568
  (c(!0), d(I, null, F(s.attachItems, (i) => (c(), d("button", {
4546
4569
  key: i.action,
@@ -4563,7 +4586,7 @@ function ki(e, t, n, r, a, s) {
4563
4586
  ]),
4564
4587
  o("span", null, v(i.label), 1)
4565
4588
  ], 8, fi))), 128))
4566
- ])) : w("", !0),
4589
+ ])) : b("", !0),
4567
4590
  G(o("textarea", {
4568
4591
  ref: "inputEl",
4569
4592
  "onUpdate:modelValue": t[3] || (t[3] = (i) => a.local = i),
@@ -4651,9 +4674,9 @@ function Mi(e, t, n, r, a, s) {
4651
4674
  type: "button",
4652
4675
  class: "wm-chip",
4653
4676
  style: z({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
4654
- onClick: (g) => e.$emit("select", i)
4677
+ onClick: (_) => e.$emit("select", i)
4655
4678
  }, v(i.label), 13, Si))), 128))
4656
- ])) : w("", !0);
4679
+ ])) : b("", !0);
4657
4680
  }
4658
4681
  const Ti = /* @__PURE__ */ P(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085"]]), xi = {
4659
4682
  name: "WmApprovalCard",
@@ -4708,7 +4731,7 @@ function Ui(e, t, n, r, a, s) {
4708
4731
  return c(), d("div", Oi, [
4709
4732
  o("div", Ri, [
4710
4733
  o("div", Li, [
4711
- V(i, {
4734
+ $(i, {
4712
4735
  size: 24,
4713
4736
  name: n.agentName,
4714
4737
  "image-url": n.agentAvatarUrl
@@ -4716,7 +4739,7 @@ function Ui(e, t, n, r, a, s) {
4716
4739
  ]),
4717
4740
  o("div", Ii, [
4718
4741
  o("div", Ei, v(n.action), 1),
4719
- n.detail ? (c(), d("div", Bi, v(n.detail), 1)) : w("", !0)
4742
+ n.detail ? (c(), d("div", Bi, v(n.detail), 1)) : b("", !0)
4720
4743
  ])
4721
4744
  ]),
4722
4745
  o("div", Pi, [
@@ -4725,13 +4748,13 @@ function Ui(e, t, n, r, a, s) {
4725
4748
  type: "button",
4726
4749
  class: "wm-approval__btn wm-approval__btn--neutral",
4727
4750
  onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
4728
- }, v(s.rejectLabel), 1)) : w("", !0),
4751
+ }, v(s.rejectLabel), 1)) : b("", !0),
4729
4752
  s.approveId ? (c(), d("button", {
4730
4753
  key: 1,
4731
4754
  type: "button",
4732
4755
  class: "wm-approval__btn wm-approval__btn--primary",
4733
4756
  onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
4734
- }, v(s.approveLabel), 1)) : w("", !0)
4757
+ }, v(s.approveLabel), 1)) : b("", !0)
4735
4758
  ])
4736
4759
  ]);
4737
4760
  }
@@ -4828,7 +4851,7 @@ const Ni = /* @__PURE__ */ new Set([
4828
4851
  }
4829
4852
  }
4830
4853
  }
4831
- }, ji = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, $i = { class: "wm-form__title" }, Vi = {
4854
+ }, ji = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, Vi = { class: "wm-form__title" }, $i = {
4832
4855
  key: 0,
4833
4856
  class: "wm-form__detail"
4834
4857
  }, Ki = ["for"], Wi = {
@@ -4860,15 +4883,15 @@ function ca(e, t, n, r, a, s) {
4860
4883
  return c(), d("div", ji, [
4861
4884
  o("div", Hi, [
4862
4885
  o("div", zi, [
4863
- V(i, {
4886
+ $(i, {
4864
4887
  size: 24,
4865
4888
  name: n.agentName,
4866
4889
  "image-url": n.agentAvatarUrl
4867
4890
  }, null, 8, ["name", "image-url"])
4868
4891
  ]),
4869
4892
  o("div", qi, [
4870
- o("div", $i, v(n.form.title || s.t("form.title")), 1),
4871
- n.form.description ? (c(), d("div", Vi, v(n.form.description), 1)) : w("", !0)
4893
+ o("div", Vi, v(n.form.title || s.t("form.title")), 1),
4894
+ n.form.description ? (c(), d("div", $i, v(n.form.description), 1)) : b("", !0)
4872
4895
  ])
4873
4896
  ]),
4874
4897
  o("form", {
@@ -4884,12 +4907,12 @@ function ca(e, t, n, r, a, s) {
4884
4907
  class: "wm-form__label"
4885
4908
  }, [
4886
4909
  Se(v(l.label), 1),
4887
- l.required ? (c(), d("span", Wi, "*")) : w("", !0)
4910
+ l.required ? (c(), d("span", Wi, "*")) : b("", !0)
4888
4911
  ], 8, Ki),
4889
4912
  l.type === "text" ? G((c(), d("input", {
4890
4913
  key: 0,
4891
4914
  id: `wm-f-${a._uid}-${l.key}`,
4892
- "onUpdate:modelValue": (g) => a.values[l.key] = g,
4915
+ "onUpdate:modelValue": (_) => a.values[l.key] = _,
4893
4916
  type: "text",
4894
4917
  class: "wm-form__input",
4895
4918
  placeholder: l.placeholder || "",
@@ -4900,7 +4923,7 @@ function ca(e, t, n, r, a, s) {
4900
4923
  ]) : l.type === "textarea" ? G((c(), d("textarea", {
4901
4924
  key: 1,
4902
4925
  id: `wm-f-${a._uid}-${l.key}`,
4903
- "onUpdate:modelValue": (g) => a.values[l.key] = g,
4926
+ "onUpdate:modelValue": (_) => a.values[l.key] = _,
4904
4927
  class: "wm-form__textarea",
4905
4928
  rows: "3",
4906
4929
  placeholder: l.placeholder || "",
@@ -4911,7 +4934,7 @@ function ca(e, t, n, r, a, s) {
4911
4934
  ]) : l.type === "number" ? G((c(), d("input", {
4912
4935
  key: 2,
4913
4936
  id: `wm-f-${a._uid}-${l.key}`,
4914
- "onUpdate:modelValue": (g) => a.values[l.key] = g,
4937
+ "onUpdate:modelValue": (_) => a.values[l.key] = _,
4915
4938
  type: "number",
4916
4939
  class: "wm-form__input",
4917
4940
  placeholder: l.placeholder || "",
@@ -4927,7 +4950,7 @@ function ca(e, t, n, r, a, s) {
4927
4950
  ]) : l.type === "date" ? G((c(), d("input", {
4928
4951
  key: 3,
4929
4952
  id: `wm-f-${a._uid}-${l.key}`,
4930
- "onUpdate:modelValue": (g) => a.values[l.key] = g,
4953
+ "onUpdate:modelValue": (_) => a.values[l.key] = _,
4931
4954
  type: "date",
4932
4955
  class: "wm-form__input",
4933
4956
  required: l.required,
@@ -4937,7 +4960,7 @@ function ca(e, t, n, r, a, s) {
4937
4960
  ]) : l.type === "boolean" ? (c(), d("label", Qi, [
4938
4961
  G(o("input", {
4939
4962
  id: `wm-f-${a._uid}-${l.key}`,
4940
- "onUpdate:modelValue": (g) => a.values[l.key] = g,
4963
+ "onUpdate:modelValue": (_) => a.values[l.key] = _,
4941
4964
  type: "checkbox",
4942
4965
  disabled: n.readOnly || a.busy
4943
4966
  }, null, 8, Zi), [
@@ -4947,46 +4970,46 @@ function ca(e, t, n, r, a, s) {
4947
4970
  ])) : l.type === "select" ? G((c(), d("select", {
4948
4971
  key: 5,
4949
4972
  id: `wm-f-${a._uid}-${l.key}`,
4950
- "onUpdate:modelValue": (g) => a.values[l.key] = g,
4973
+ "onUpdate:modelValue": (_) => a.values[l.key] = _,
4951
4974
  class: "wm-form__select",
4952
4975
  required: l.required,
4953
4976
  disabled: n.readOnly || a.busy
4954
4977
  }, [
4955
4978
  o("option", ta, v(l.placeholder || s.t("form.choose")), 1),
4956
- (c(!0), d(I, null, F(l.options, (g) => (c(), d("option", {
4957
- key: g.value,
4958
- value: g.value
4959
- }, v(g.label), 9, na))), 128))
4979
+ (c(!0), d(I, null, F(l.options, (_) => (c(), d("option", {
4980
+ key: _.value,
4981
+ value: _.value
4982
+ }, v(_.label), 9, na))), 128))
4960
4983
  ], 8, ea)), [
4961
4984
  [Ge, a.values[l.key]]
4962
4985
  ]) : l.type === "multiselect" ? (c(), d("div", sa, [
4963
- (c(!0), d(I, null, F(l.options, (g) => (c(), d("label", {
4964
- key: g.value,
4986
+ (c(!0), d(I, null, F(l.options, (_) => (c(), d("label", {
4987
+ key: _.value,
4965
4988
  class: "wm-form__multiItem"
4966
4989
  }, [
4967
4990
  o("input", {
4968
4991
  type: "checkbox",
4969
- value: g.value,
4970
- checked: Array.isArray(a.values[l.key]) && a.values[l.key].includes(g.value),
4992
+ value: _.value,
4993
+ checked: Array.isArray(a.values[l.key]) && a.values[l.key].includes(_.value),
4971
4994
  disabled: n.readOnly || a.busy,
4972
4995
  onChange: (k) => s.toggleMulti(
4973
4996
  l.key,
4974
- g.value,
4997
+ _.value,
4975
4998
  k.target.checked
4976
4999
  )
4977
5000
  }, null, 40, ra),
4978
- o("span", null, v(g.label), 1)
5001
+ o("span", null, v(_.label), 1)
4979
5002
  ]))), 128))
4980
- ])) : w("", !0)
5003
+ ])) : b("", !0)
4981
5004
  ]))), 128)),
4982
- a.error ? (c(), d("div", ia, v(a.error), 1)) : w("", !0),
5005
+ a.error ? (c(), d("div", ia, v(a.error), 1)) : b("", !0),
4983
5006
  n.readOnly ? (c(), d("div", la, v(s.t("form.responseSent")), 1)) : (c(), d("button", {
4984
5007
  key: 1,
4985
5008
  type: "submit",
4986
5009
  class: "wm-form__submit",
4987
5010
  disabled: a.busy
4988
5011
  }, [
4989
- a.busy ? (c(), d("span", oa)) : w("", !0),
5012
+ a.busy ? (c(), d("span", oa)) : b("", !0),
4990
5013
  o("span", null, v(a.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
4991
5014
  ], 8, aa))
4992
5015
  ], 32)
@@ -5149,7 +5172,7 @@ function Da(e, t, n, r, a, s) {
5149
5172
  ])
5150
5173
  ], -1)),
5151
5174
  o("span", Oa, v(s.t("moreMenu.editTitle")), 1)
5152
- ])) : w("", !0),
5175
+ ])) : b("", !0),
5153
5176
  n.canExport ? (c(), d("button", {
5154
5177
  key: 1,
5155
5178
  type: "button",
@@ -5173,9 +5196,9 @@ function Da(e, t, n, r, a, s) {
5173
5196
  ], -1)),
5174
5197
  o("span", Ra, v(s.t("moreMenu.exportTranscript")), 1),
5175
5198
  t[8] || (t[8] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
5176
- ])) : w("", !0)
5177
- ])) : w("", !0),
5178
- n.canRename || n.canExport ? (c(), d("div", La)) : w("", !0),
5199
+ ])) : b("", !0)
5200
+ ])) : b("", !0),
5201
+ n.canRename || n.canExport ? (c(), d("div", La)) : b("", !0),
5179
5202
  o("div", Ia, [
5180
5203
  o("button", {
5181
5204
  type: "button",
@@ -5230,7 +5253,7 @@ function Da(e, t, n, r, a, s) {
5230
5253
  ])
5231
5254
  ], -1)),
5232
5255
  o("span", Pa, v(s.t("moreMenu.serviceStatus")), 1)
5233
- ])) : w("", !0),
5256
+ ])) : b("", !0),
5234
5257
  n.helpUrl ? (c(), d("button", {
5235
5258
  key: 1,
5236
5259
  type: "button",
@@ -5253,7 +5276,7 @@ function Da(e, t, n, r, a, s) {
5253
5276
  ])
5254
5277
  ], -1)),
5255
5278
  o("span", Ua, v(s.t("moreMenu.helpCenter")), 1)
5256
- ])) : w("", !0)
5279
+ ])) : b("", !0)
5257
5280
  ])
5258
5281
  ])
5259
5282
  ]);
@@ -5304,7 +5327,7 @@ const Na = /* @__PURE__ */ P(Sa, [["render", Da], ["__scopeId", "data-v-4cf6d578
5304
5327
  class: "wm-dialog__card",
5305
5328
  role: "dialog",
5306
5329
  "aria-modal": "true"
5307
- }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, $a = ["aria-label"], Va = { class: "wm-dialog__body" }, Ka = ["placeholder"], Wa = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5330
+ }, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"], $a = { class: "wm-dialog__body" }, Ka = ["placeholder"], Wa = { class: "wm-dialog__actions" }, Ga = ["disabled"];
5308
5331
  function Ya(e, t, n, r, a, s) {
5309
5332
  return c(), d("div", ja, [
5310
5333
  o("div", {
@@ -5333,9 +5356,9 @@ function Ya(e, t, n, r, a, s) {
5333
5356
  }, [
5334
5357
  o("path", { d: "M18 6L6 18M6 6l12 12" })
5335
5358
  ], -1)
5336
- ])], 8, $a)
5359
+ ])], 8, Va)
5337
5360
  ]),
5338
- o("div", Va, [
5361
+ o("div", $a, [
5339
5362
  G(o("input", {
5340
5363
  ref: "input",
5341
5364
  "onUpdate:modelValue": t[2] || (t[2] = (i) => a.value = i),
@@ -5592,8 +5615,8 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5592
5615
  var k;
5593
5616
  const a = e[r.id] || [], s = Y(r.last_read_message_id);
5594
5617
  let i = 0, l = null;
5595
- for (let b = a.length - 1; b >= 0; b--) {
5596
- const T = a[b];
5618
+ for (let w = a.length - 1; w >= 0; w--) {
5619
+ const T = a[w];
5597
5620
  if (!T) continue;
5598
5621
  if (((k = T.author) == null ? void 0 : k.type) === "user") break;
5599
5622
  const E = Y(T.id);
@@ -5603,15 +5626,15 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5603
5626
  }
5604
5627
  }
5605
5628
  if (!a.length) {
5606
- const b = Y(r.last_message_id);
5607
- b != null && (s == null || b > s) && (i = 1, l = r.last_message_author || null);
5629
+ const w = Y(r.last_message_id);
5630
+ w != null && (s == null || w > s) && (i = 1, l = r.last_message_author || null);
5608
5631
  }
5609
- const g = a.filter(
5610
- (b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
5632
+ const _ = a.filter(
5633
+ (w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
5611
5634
  );
5612
5635
  return {
5613
5636
  ...r,
5614
- _preview: _t(r, g),
5637
+ _preview: _t(r, _),
5615
5638
  _unread: i > 0,
5616
5639
  _unreadCount: i,
5617
5640
  _lastAuthor: l
@@ -5647,14 +5670,14 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5647
5670
  const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
5648
5671
  for (const r of this.drawerConversations) {
5649
5672
  if (!r._unread) continue;
5650
- const a = Be(r, e[r.id] || []), s = r._lastAuthor, i = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (i ? this.agentName : "") || "", g = (s == null ? void 0 : s.avatar_url) || (i ? this.agentAvatarUrl : null);
5673
+ const a = Be(r, e[r.id] || []), s = r._lastAuthor, i = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (i ? this.agentName : "") || "", _ = (s == null ? void 0 : s.avatar_url) || (i ? this.agentAvatarUrl : null);
5651
5674
  t.push({
5652
5675
  convId: r.id,
5653
5676
  preview: r._preview || this.t("notification.youHaveNewMessage"),
5654
5677
  ts: a,
5655
5678
  count: r._unreadCount || 1,
5656
5679
  senderName: l,
5657
- senderAvatarUrl: g
5680
+ senderAvatarUrl: _
5658
5681
  });
5659
5682
  }
5660
5683
  return t.sort((r, a) => r.ts < a.ts ? 1 : r.ts > a.ts ? -1 : 0), t;
@@ -5814,8 +5837,8 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5814
5837
  if (!(i != null && i.loaded)) return t;
5815
5838
  }
5816
5839
  const n = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((i) => {
5817
- var l, g, k, b, T;
5818
- return (i == null ? void 0 : i.type) === "action" && ((l = i == null ? void 0 : i.payload) == null ? void 0 : l.state) === "pending" || he(i) && !(n[i.id] > 0) ? !1 : (i == null ? void 0 : i.type) === "action" || (i == null ? void 0 : i.type) === "system" || ((g = i == null ? void 0 : i.payload) == null ? void 0 : g.type) === "system" || Array.isArray((k = i == null ? void 0 : i.payload) == null ? void 0 : k.attachments) && i.payload.attachments.length || (b = i == null ? void 0 : i.metadata) != null && b.artifact || (T = i == null ? void 0 : i.metadata) != null && T.form ? !0 : typeof (i == null ? void 0 : i.text_md) == "string" && i.text_md.trim().length > 0;
5840
+ var l, _, k, w, T;
5841
+ return (i == null ? void 0 : i.type) === "action" && ((l = i == null ? void 0 : i.payload) == null ? void 0 : l.state) === "pending" || he(i) && !(n[i.id] > 0) ? !1 : (i == null ? void 0 : i.type) === "action" || (i == null ? void 0 : i.type) === "system" || ((_ = i == null ? void 0 : i.payload) == null ? void 0 : _.type) === "system" || Array.isArray((k = i == null ? void 0 : i.payload) == null ? void 0 : k.attachments) && i.payload.attachments.length || (w = i == null ? void 0 : i.metadata) != null && w.artifact || (T = i == null ? void 0 : i.metadata) != null && T.form ? !0 : typeof (i == null ? void 0 : i.text_md) == "string" && i.text_md.trim().length > 0;
5819
5842
  });
5820
5843
  return t.length ? [...t, ...r] : r;
5821
5844
  },
@@ -5852,14 +5875,14 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
5852
5875
  return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || this.t("action.title");
5853
5876
  },
5854
5877
  approvalDetail() {
5855
- var r, a, s, i, l, g;
5878
+ var r, a, s, i, l, _;
5856
5879
  const e = (s = (a = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : a.pending) == null ? void 0 : s.user_explanation;
5857
5880
  if (typeof e == "string" && e.trim())
5858
5881
  return e.trim();
5859
- const t = (g = (l = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : l.pending) == null ? void 0 : g.prepared_params;
5882
+ const t = (_ = (l = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : l.pending) == null ? void 0 : _.prepared_params;
5860
5883
  if (!t || typeof t != "object") return "";
5861
5884
  const n = Object.entries(t);
5862
- return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
5885
+ return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
5863
5886
  },
5864
5887
  actionInFlight() {
5865
5888
  var e, t;
@@ -6209,16 +6232,16 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6209
6232
  this.launcherHovered = e, this.sendCurrentLauncherSize();
6210
6233
  },
6211
6234
  sendCurrentLauncherSize() {
6212
- var b, T, E, A, q, M, D;
6235
+ var w, T, E, A, q, M, D;
6213
6236
  if (this.isOpen) return;
6214
- const e = (T = (b = this.$el) == null ? void 0 : b.querySelector) == null ? void 0 : T.call(b, ".wm-launcherWrap");
6237
+ const e = (T = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : T.call(w, ".wm-launcherWrap");
6215
6238
  if (!e) return;
6216
6239
  const t = e.getBoundingClientRect();
6217
6240
  if (!t.width || !t.height) return;
6218
- const n = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, a = Math.ceil(t.width), s = Math.ceil(t.height), i = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (D = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : D.call(M, ".wm-peek"), g = l && l.length ? l[l.length - 1] : null;
6241
+ const n = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, a = Math.ceil(t.width), s = Math.ceil(t.height), i = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (D = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : D.call(M, ".wm-peek"), _ = l && l.length ? l[l.length - 1] : null;
6219
6242
  let k = null;
6220
- if (g) {
6221
- const N = g.getBoundingClientRect();
6243
+ if (_) {
6244
+ const N = _.getBoundingClientRect();
6222
6245
  k = {
6223
6246
  width: Math.ceil(N.width),
6224
6247
  height: Math.ceil(N.height),
@@ -6355,7 +6378,7 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6355
6378
  const a = this.revealPacing, s = t.trim().length, i = Math.min(
6356
6379
  a.maxTypingMs,
6357
6380
  Math.max(a.minTypingMs, s * a.msPerChar)
6358
- ), l = a.firstRevealDelayMs + i, g = setTimeout(() => {
6381
+ ), l = a.firstRevealDelayMs + i, _ = setTimeout(() => {
6359
6382
  this.welcomeRevealedAt = {
6360
6383
  ...this.welcomeRevealedAt,
6361
6384
  [e]: Date.now()
@@ -6365,7 +6388,7 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6365
6388
  }, l);
6366
6389
  this.welcomeRevealTimers = {
6367
6390
  ...this.welcomeRevealTimers,
6368
- [e]: g
6391
+ [e]: _
6369
6392
  };
6370
6393
  },
6371
6394
  // Clear pending welcome timers (panel unmount, refresh). Doesn't
@@ -6612,7 +6635,7 @@ const Ja = /* @__PURE__ */ P(Fa, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
6612
6635
  class: "wm-attached__fileSize"
6613
6636
  }, _o = ["aria-label", "onClick"];
6614
6637
  function go(e, t, n, r, a, s) {
6615
- const i = B("Launcher"), l = B("Header"), g = B("History"), k = B("Onboarding"), b = B("MessageList"), T = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), M = B("Composer"), D = B("MoreMenu"), N = B("RenameDialog");
6638
+ const i = B("Launcher"), l = B("Header"), _ = B("History"), k = B("Onboarding"), w = B("MessageList"), T = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), M = B("Composer"), D = B("MoreMenu"), N = B("RenameDialog");
6616
6639
  return c(), d("div", {
6617
6640
  class: R(["wm-root", `wm-root--${n.displayMode}`]),
6618
6641
  style: z(s.rootStyle)
@@ -6624,7 +6647,7 @@ function go(e, t, n, r, a, s) {
6624
6647
  onOpen: s.openFromPeek,
6625
6648
  onDismiss: s.dismissPeek,
6626
6649
  onHover: s.onLauncherHover
6627
- }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : w("", !0),
6650
+ }, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
6628
6651
  a.isOpen || s.isEmbedded ? (c(), d("section", {
6629
6652
  key: 1,
6630
6653
  class: R([
@@ -6638,7 +6661,7 @@ function go(e, t, n, r, a, s) {
6638
6661
  onClick: t[6] || (t[6] = (...L) => s.onPanelClick && s.onPanelClick(...L))
6639
6662
  }, [
6640
6663
  !s.ready && !s.error ? (c(), d("div", Qa, [
6641
- s.isEmbedded ? w("", !0) : (c(), d("button", {
6664
+ s.isEmbedded ? b("", !0) : (c(), d("button", {
6642
6665
  key: 0,
6643
6666
  type: "button",
6644
6667
  class: "wm-loading__close",
@@ -6664,7 +6687,7 @@ function go(e, t, n, r, a, s) {
6664
6687
  "aria-hidden": "true"
6665
6688
  }, null, -1))
6666
6689
  ])) : (c(), d(I, { key: 1 }, [
6667
- V(l, {
6690
+ $(l, {
6668
6691
  title: s.headerTitle,
6669
6692
  "team-members": s.teamMembers,
6670
6693
  "response-label": s.responseLabel,
@@ -6700,12 +6723,12 @@ function go(e, t, n, r, a, s) {
6700
6723
  o("div", so, v(s.error), 1)
6701
6724
  ])
6702
6725
  ])
6703
- ])) : !s.currentConv && a.showHistory ? (c(), U(g, {
6726
+ ])) : !s.currentConv && a.showHistory ? (c(), U(_, {
6704
6727
  key: 1,
6705
6728
  threads: s.openThreads,
6706
6729
  onResume: s.onDrawerPick
6707
6730
  }, null, 8, ["threads", "onResume"])) : s.currentConv ? (c(), d(I, { key: 3 }, [
6708
- V(b, {
6731
+ $(w, {
6709
6732
  ref: "messageList",
6710
6733
  messages: s.displayedMessages,
6711
6734
  "streaming-active": s.streamingActive,
@@ -6745,7 +6768,7 @@ function go(e, t, n, r, a, s) {
6745
6768
  items: s.suggestions,
6746
6769
  onSelect: s.onSuggestion
6747
6770
  }, null, 8, ["items", "onSelect"]))
6748
- ], 512)) : w("", !0),
6771
+ ], 512)) : b("", !0),
6749
6772
  s.actionInFlight ? (c(), d("div", ao, [
6750
6773
  t[10] || (t[10] = o("span", {
6751
6774
  class: "wm-actionWait__spinner",
@@ -6754,7 +6777,7 @@ function go(e, t, n, r, a, s) {
6754
6777
  o("span", oo, v(s.t("action.inProgress", {
6755
6778
  name: s.actionInFlightName
6756
6779
  })), 1)
6757
- ])) : w("", !0),
6780
+ ])) : b("", !0),
6758
6781
  a.pendingAttachments.length ? (c(), d("div", lo, [
6759
6782
  (c(!0), d(I, null, F(a.pendingAttachments, (L, K) => (c(), d("div", {
6760
6783
  key: L.path || K,
@@ -6786,7 +6809,7 @@ function go(e, t, n, r, a, s) {
6786
6809
  o("span", mo, v(L.name), 1),
6787
6810
  s.formatAttachmentSize(L.size_bytes) ? (c(), d("span", fo, v(s.formatAttachmentSize(
6788
6811
  L.size_bytes
6789
- )), 1)) : w("", !0)
6812
+ )), 1)) : b("", !0)
6790
6813
  ])
6791
6814
  ])),
6792
6815
  o("button", {
@@ -6810,8 +6833,8 @@ function go(e, t, n, r, a, s) {
6810
6833
  ], -1)
6811
6834
  ])], 8, _o)
6812
6835
  ]))), 128))
6813
- ])) : w("", !0),
6814
- s.actionInFlight ? w("", !0) : (c(), U(M, {
6836
+ ])) : b("", !0),
6837
+ s.actionInFlight ? b("", !0) : (c(), U(M, {
6815
6838
  key: 3,
6816
6839
  ref: "composer",
6817
6840
  modelValue: a.draft,
@@ -6834,14 +6857,14 @@ function go(e, t, n, r, a, s) {
6834
6857
  onClose: t[3] || (t[3] = (L) => a.moreOpen = !1),
6835
6858
  onSoundToggle: e.onSoundToggle,
6836
6859
  onAction: s.onMoreAction
6837
- }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : w("", !0),
6860
+ }, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
6838
6861
  a.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), U(N, {
6839
6862
  key: 1,
6840
6863
  "initial-value": s.currentConv.name || "",
6841
6864
  title: s.t("rename.dialogTitle"),
6842
6865
  onClose: t[4] || (t[4] = (L) => a.renameDialogOpen = !1),
6843
6866
  onSubmit: s.onRenameSubmit
6844
- }, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0)
6867
+ }, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
6845
6868
  ], 64)) : (c(), U(k, {
6846
6869
  key: 2,
6847
6870
  title: s.widgetTitle,
@@ -6866,12 +6889,12 @@ function go(e, t, n, r, a, s) {
6866
6889
  onClose: t[5] || (t[5] = (L) => a.moreOpen = !1),
6867
6890
  onSoundToggle: e.onSoundToggle,
6868
6891
  onAction: s.onMoreAction
6869
- }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : w("", !0)
6892
+ }, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
6870
6893
  ], 64))
6871
- ], 6)) : w("", !0)
6894
+ ], 6)) : b("", !0)
6872
6895
  ], 6);
6873
6896
  }
6874
- const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-a54649f6"]]), wo = "0.5.67";
6897
+ const yo = /* @__PURE__ */ P(Xa, [["render", go], ["__scopeId", "data-v-a54649f6"]]), wo = "0.5.69";
6875
6898
  export {
6876
6899
  oe as AIAvatar,
6877
6900
  be as AVATAR_COLORS,