@_solaris/messenger-widget 0.5.28 → 0.5.30
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/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +11 -11
- package/dist/messenger.cjs +6 -6
- package/dist/messenger.js +853 -789
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/core/i18n.d.ts +4 -0
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as
|
|
1
|
+
import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as $, Transition as Ie, withCtx as Ee, Fragment as B, renderList as D, withKeys as ue, withModifiers as G, createElementVNode as o, createCommentVNode as y, createBlock as F, withDirectives as V, vModelText as X, createTextVNode as ve, resolveDynamicComponent as De, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as Ce } from "vue";
|
|
2
2
|
const qe = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -6,7 +6,7 @@ const qe = [
|
|
|
6
6
|
"conversation_updated",
|
|
7
7
|
"config_updated",
|
|
8
8
|
"action_status"
|
|
9
|
-
], fe = "/client", $e = 5 * 60 * 1e3,
|
|
9
|
+
], fe = "/client", $e = 5 * 60 * 1e3, Ke = 10 * 60 * 1e3, Ve = 5 * 60 * 1e3;
|
|
10
10
|
function We(e) {
|
|
11
11
|
const t = {
|
|
12
12
|
baseUrl: Ge(e.baseUrl || ""),
|
|
@@ -36,9 +36,9 @@ function We(e) {
|
|
|
36
36
|
}
|
|
37
37
|
function i(d, f) {
|
|
38
38
|
const _ = t.listeners.get(d);
|
|
39
|
-
_ && _.forEach((
|
|
39
|
+
_ && _.forEach((w) => {
|
|
40
40
|
try {
|
|
41
|
-
|
|
41
|
+
w(f);
|
|
42
42
|
} catch (C) {
|
|
43
43
|
console.error("[transport] listener", d, C);
|
|
44
44
|
}
|
|
@@ -61,19 +61,19 @@ function We(e) {
|
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
async function a(d, f, _) {
|
|
64
|
-
const
|
|
64
|
+
const w = await fetch(`${t.baseUrl}${fe}${f}`, {
|
|
65
65
|
method: d,
|
|
66
66
|
credentials: "include",
|
|
67
67
|
headers: s(),
|
|
68
68
|
body: _ !== void 0 ? JSON.stringify(_) : void 0
|
|
69
69
|
});
|
|
70
|
-
if (!
|
|
71
|
-
const C = await l(
|
|
72
|
-
`HTTP ${
|
|
70
|
+
if (!w.ok) {
|
|
71
|
+
const C = await l(w), M = new Error(
|
|
72
|
+
`HTTP ${w.status} ${d} ${f} :: ${(C == null ? void 0 : C.error) || w.statusText}`
|
|
73
73
|
);
|
|
74
|
-
throw
|
|
74
|
+
throw M.status = w.status, M.body = C, M;
|
|
75
75
|
}
|
|
76
|
-
return
|
|
76
|
+
return w.status === 204 ? null : w.json();
|
|
77
77
|
}
|
|
78
78
|
async function l(d) {
|
|
79
79
|
try {
|
|
@@ -116,7 +116,7 @@ function We(e) {
|
|
|
116
116
|
}
|
|
117
117
|
const _ = await f.json();
|
|
118
118
|
t.userId = _.external_id;
|
|
119
|
-
const [
|
|
119
|
+
const [w, C] = await Promise.all([
|
|
120
120
|
fetch(
|
|
121
121
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
122
122
|
{ credentials: "include" }
|
|
@@ -130,24 +130,24 @@ function We(e) {
|
|
|
130
130
|
return L.json();
|
|
131
131
|
}),
|
|
132
132
|
a("GET", "/customers/me")
|
|
133
|
-
]),
|
|
134
|
-
return t.lastBootstrap =
|
|
133
|
+
]), M = { config: w, customer: (C == null ? void 0 : C.customer) ?? null };
|
|
134
|
+
return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
135
135
|
"visibilitychange",
|
|
136
136
|
t.visibilityHandler
|
|
137
|
-
)), de(),
|
|
137
|
+
)), de(), M;
|
|
138
138
|
}
|
|
139
139
|
async function k() {
|
|
140
140
|
try {
|
|
141
|
-
const d = await
|
|
141
|
+
const d = await E();
|
|
142
142
|
t.lastActivityAt = d.reduce((f, _) => {
|
|
143
|
-
const
|
|
144
|
-
return
|
|
143
|
+
const w = _ == null ? void 0 : _.last_message_at;
|
|
144
|
+
return w && (!f || w > f) ? w : f;
|
|
145
145
|
}, null);
|
|
146
146
|
} catch (d) {
|
|
147
147
|
console.error("[transport] initial /conversations failed", d);
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
|
-
async function
|
|
150
|
+
async function b() {
|
|
151
151
|
const d = await a("GET", "/customers/me");
|
|
152
152
|
return (d == null ? void 0 : d.customer) ?? null;
|
|
153
153
|
}
|
|
@@ -155,7 +155,7 @@ function We(e) {
|
|
|
155
155
|
const f = await a("PATCH", "/customers/me", d);
|
|
156
156
|
return (f == null ? void 0 : f.customer) ?? null;
|
|
157
157
|
}
|
|
158
|
-
async function
|
|
158
|
+
async function E() {
|
|
159
159
|
const d = await a("GET", "/conversations");
|
|
160
160
|
return (d == null ? void 0 : d.conversations) ?? [];
|
|
161
161
|
}
|
|
@@ -168,30 +168,30 @@ function We(e) {
|
|
|
168
168
|
`/conversations/${encodeURIComponent(d)}`
|
|
169
169
|
)).conversation;
|
|
170
170
|
}
|
|
171
|
-
async function
|
|
171
|
+
async function S(d, f) {
|
|
172
172
|
return (await a(
|
|
173
173
|
"PATCH",
|
|
174
174
|
`/conversations/${encodeURIComponent(d)}`,
|
|
175
175
|
f
|
|
176
176
|
)).conversation;
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
178
|
+
async function P(d, f) {
|
|
179
179
|
return a(
|
|
180
180
|
"PATCH",
|
|
181
181
|
`/conversations/${encodeURIComponent(d)}/read`,
|
|
182
182
|
{ message_id: f }
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
|
-
async function
|
|
185
|
+
async function I(d, f = {}) {
|
|
186
186
|
const _ = new URLSearchParams();
|
|
187
187
|
f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
|
|
188
|
-
const
|
|
188
|
+
const w = _.toString() ? `?${_.toString()}` : "";
|
|
189
189
|
return a(
|
|
190
190
|
"GET",
|
|
191
|
-
`/conversations/${encodeURIComponent(d)}/messages${
|
|
191
|
+
`/conversations/${encodeURIComponent(d)}/messages${w}`
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
|
-
async function
|
|
194
|
+
async function U(d, f) {
|
|
195
195
|
se();
|
|
196
196
|
const _ = {
|
|
197
197
|
client_msg_id: f.client_msg_id,
|
|
@@ -206,7 +206,7 @@ function We(e) {
|
|
|
206
206
|
_
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
|
-
async function
|
|
209
|
+
async function Y(d, f, _) {
|
|
210
210
|
return se(), a(
|
|
211
211
|
"POST",
|
|
212
212
|
`/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
|
|
@@ -214,22 +214,22 @@ function We(e) {
|
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
async function Z(d) {
|
|
217
|
-
const f = d.name || "attachment", _ = d.type || "application/octet-stream",
|
|
217
|
+
const f = d.name || "attachment", _ = d.type || "application/octet-stream", w = d.size || 0, C = await a("POST", "/attachments", {
|
|
218
218
|
mime_type: _,
|
|
219
|
-
size_bytes:
|
|
219
|
+
size_bytes: w,
|
|
220
220
|
name: f
|
|
221
|
-
}),
|
|
221
|
+
}), M = await fetch(C.upload_url, {
|
|
222
222
|
method: "PUT",
|
|
223
223
|
headers: { "Content-Type": _ },
|
|
224
224
|
body: d
|
|
225
225
|
});
|
|
226
|
-
if (!
|
|
227
|
-
throw new Error(`HTTP ${
|
|
226
|
+
if (!M.ok)
|
|
227
|
+
throw new Error(`HTTP ${M.status} PUT signed upload`);
|
|
228
228
|
return {
|
|
229
229
|
type: Ye(_),
|
|
230
230
|
path: C.path,
|
|
231
231
|
mime_type: _,
|
|
232
|
-
size_bytes:
|
|
232
|
+
size_bytes: w
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
235
|
async function ee(d) {
|
|
@@ -242,7 +242,7 @@ function We(e) {
|
|
|
242
242
|
const d = new URLSearchParams({ widgetId: t.widgetId }).toString();
|
|
243
243
|
return `${t.baseUrl}${fe}/stream?${d}`;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function K() {
|
|
246
246
|
if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
|
|
247
247
|
try {
|
|
248
248
|
const d = new EventSource(te(), { withCredentials: !0 });
|
|
@@ -258,28 +258,28 @@ function We(e) {
|
|
|
258
258
|
}
|
|
259
259
|
function ne(d, f) {
|
|
260
260
|
try {
|
|
261
|
-
const _ = JSON.parse(f),
|
|
262
|
-
i(d,
|
|
261
|
+
const _ = JSON.parse(f), w = _ && typeof _ == "object" && "data" in _ ? _.data : _;
|
|
262
|
+
i(d, w);
|
|
263
263
|
} catch (_) {
|
|
264
264
|
console.error("[transport] bad SSE payload", d, _);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function J() {
|
|
268
268
|
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
|
|
269
269
|
}
|
|
270
270
|
function se() {
|
|
271
|
-
clearTimeout(t.burstTimer),
|
|
272
|
-
t.panelOpen ||
|
|
273
|
-
},
|
|
271
|
+
clearTimeout(t.burstTimer), K(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
272
|
+
t.panelOpen || J();
|
|
273
|
+
}, Ke));
|
|
274
274
|
}
|
|
275
275
|
function ce(d) {
|
|
276
|
-
t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer),
|
|
276
|
+
t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), K()) : se();
|
|
277
277
|
}
|
|
278
278
|
async function me() {
|
|
279
279
|
try {
|
|
280
|
-
const d = await
|
|
281
|
-
const
|
|
282
|
-
return
|
|
280
|
+
const d = await E(), f = d.reduce((w, C) => {
|
|
281
|
+
const M = C == null ? void 0 : C.last_message_at;
|
|
282
|
+
return M && (!w || M > w) ? M : w;
|
|
283
283
|
}, null);
|
|
284
284
|
f && (!t.lastActivityAt || f > t.lastActivityAt) && (t.lastActivityAt = f, i("activity", { conversations: d, latestAt: f }), se());
|
|
285
285
|
} catch (d) {
|
|
@@ -295,18 +295,18 @@ function We(e) {
|
|
|
295
295
|
function m() {
|
|
296
296
|
if (document.hidden)
|
|
297
297
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
298
|
-
t.hiddenGraceTimer = null, document.hidden && (h(),
|
|
299
|
-
},
|
|
298
|
+
t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
|
|
299
|
+
}, Ve);
|
|
300
300
|
else {
|
|
301
301
|
if (t.hiddenGraceTimer) {
|
|
302
302
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
r("idle"), de(), t.panelOpen &&
|
|
305
|
+
r("idle"), de(), t.panelOpen && K();
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function g() {
|
|
309
|
-
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null,
|
|
309
|
+
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
|
|
310
310
|
"visibilitychange",
|
|
311
311
|
t.visibilityHandler
|
|
312
312
|
), t.visibilityHandler = null), t.started = !1;
|
|
@@ -317,16 +317,16 @@ function We(e) {
|
|
|
317
317
|
stop: g,
|
|
318
318
|
setPanelOpen: ce,
|
|
319
319
|
// REST
|
|
320
|
-
getCustomer:
|
|
320
|
+
getCustomer: b,
|
|
321
321
|
patchCustomer: T,
|
|
322
|
-
listConversations:
|
|
322
|
+
listConversations: E,
|
|
323
323
|
createConversation: A,
|
|
324
324
|
getConversation: H,
|
|
325
|
-
patchConversation:
|
|
326
|
-
markConversationRead:
|
|
327
|
-
listMessages:
|
|
328
|
-
postMessage:
|
|
329
|
-
postCallback:
|
|
325
|
+
patchConversation: S,
|
|
326
|
+
markConversationRead: P,
|
|
327
|
+
listMessages: I,
|
|
328
|
+
postMessage: U,
|
|
329
|
+
postCallback: Y,
|
|
330
330
|
uploadAttachment: Z,
|
|
331
331
|
signAttachment: ee,
|
|
332
332
|
// Read-only state
|
|
@@ -354,7 +354,7 @@ function Je() {
|
|
|
354
354
|
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("");
|
|
355
355
|
}
|
|
356
356
|
function Qe(e) {
|
|
357
|
-
const t =
|
|
357
|
+
const t = Ue({
|
|
358
358
|
ready: !1,
|
|
359
359
|
error: null,
|
|
360
360
|
config: null,
|
|
@@ -392,7 +392,7 @@ function Qe(e) {
|
|
|
392
392
|
), n.push(
|
|
393
393
|
e.on("message", (h) => {
|
|
394
394
|
const m = h == null ? void 0 : h.conversation_id, g = h == null ? void 0 : h.message;
|
|
395
|
-
!m || !(g != null && g.id) || (
|
|
395
|
+
!m || !(g != null && g.id) || (K(m, g), g.client_msg_id && delete t.streamingByMsgId[g.client_msg_id], se(m, g.created_at));
|
|
396
396
|
})
|
|
397
397
|
), n.push(
|
|
398
398
|
e.on("message_stream", (h) => {
|
|
@@ -475,23 +475,23 @@ function Qe(e) {
|
|
|
475
475
|
async function p(h) {
|
|
476
476
|
const m = t.paginationByConv[h];
|
|
477
477
|
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
478
|
-
|
|
478
|
+
b(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
479
479
|
try {
|
|
480
480
|
const g = await e.listMessages(h, {
|
|
481
481
|
limit: l
|
|
482
482
|
}), d = (g == null ? void 0 : g.messages) ?? [], f = t.messagesByConv[h] || [], _ = /* @__PURE__ */ new Set();
|
|
483
483
|
for (const C of d)
|
|
484
484
|
(C == null ? void 0 : C.id) != null && _.add(`id:${String(C.id)}`), C != null && C.client_msg_id && _.add(`c:${C.client_msg_id}`);
|
|
485
|
-
const
|
|
486
|
-
t.messagesByConv[h] = [...d, ...
|
|
485
|
+
const w = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
|
|
486
|
+
t.messagesByConv[h] = [...d, ...w].sort(
|
|
487
487
|
ce
|
|
488
|
-
),
|
|
488
|
+
), b(h, {
|
|
489
489
|
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
490
490
|
loading: !1,
|
|
491
491
|
loaded: !0
|
|
492
492
|
});
|
|
493
493
|
} catch (g) {
|
|
494
|
-
console.error("[store] openConversation failed", g),
|
|
494
|
+
console.error("[store] openConversation failed", g), b(h, {
|
|
495
495
|
nextCursor: null,
|
|
496
496
|
loading: !1,
|
|
497
497
|
loaded: !1
|
|
@@ -505,33 +505,33 @@ function Qe(e) {
|
|
|
505
505
|
if (!m || m.loading || !m.nextCursor) return;
|
|
506
506
|
const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
|
|
507
507
|
if (d) {
|
|
508
|
-
|
|
508
|
+
b(h, { ...m, loading: !0 });
|
|
509
509
|
try {
|
|
510
510
|
const _ = await e.listMessages(h, {
|
|
511
511
|
before: d,
|
|
512
512
|
limit: l
|
|
513
|
-
}),
|
|
513
|
+
}), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], M = /* @__PURE__ */ new Set();
|
|
514
514
|
for (const x of C)
|
|
515
|
-
(x == null ? void 0 : x.id) != null &&
|
|
516
|
-
const L =
|
|
517
|
-
t.messagesByConv[h] = [...L, ...C],
|
|
515
|
+
(x == null ? void 0 : x.id) != null && M.add(`id:${String(x.id)}`), x != null && x.client_msg_id && M.add(`c:${x.client_msg_id}`);
|
|
516
|
+
const L = w.filter((x) => !((x == null ? void 0 : x.id) != null && M.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && M.has(`c:${x.client_msg_id}`)));
|
|
517
|
+
t.messagesByConv[h] = [...L, ...C], b(h, {
|
|
518
518
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
519
519
|
loading: !1,
|
|
520
520
|
loaded: !0
|
|
521
521
|
});
|
|
522
522
|
} catch (_) {
|
|
523
|
-
console.error("[store] loadMore failed", _),
|
|
523
|
+
console.error("[store] loadMore failed", _), b(h, { ...m, loading: !1 });
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
function
|
|
527
|
+
function b(h, m) {
|
|
528
528
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
529
529
|
}
|
|
530
530
|
async function T(h, m) {
|
|
531
531
|
const g = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
|
|
532
532
|
d !== -1 && (t.conversations[d] = g);
|
|
533
533
|
}
|
|
534
|
-
async function
|
|
534
|
+
async function E(h) {
|
|
535
535
|
if (!h) return [];
|
|
536
536
|
const m = t.messagesByConv[h] || [];
|
|
537
537
|
let g = "";
|
|
@@ -543,13 +543,13 @@ function Qe(e) {
|
|
|
543
543
|
g ? { since: g } : {}
|
|
544
544
|
), f = (d == null ? void 0 : d.messages) || [];
|
|
545
545
|
if (!f.length) return [];
|
|
546
|
-
const _ = /* @__PURE__ */ new Set(),
|
|
547
|
-
for (const
|
|
548
|
-
(
|
|
546
|
+
const _ = /* @__PURE__ */ new Set(), w = /* @__PURE__ */ new Set();
|
|
547
|
+
for (const M of m)
|
|
548
|
+
(M == null ? void 0 : M.id) != null && _.add(String(M.id)), M != null && M.client_msg_id && w.add(M.client_msg_id);
|
|
549
549
|
const C = [];
|
|
550
|
-
for (const
|
|
551
|
-
const L = (
|
|
552
|
-
|
|
550
|
+
for (const M of f) {
|
|
551
|
+
const L = (M == null ? void 0 : M.id) != null && _.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && w.has(M.client_msg_id);
|
|
552
|
+
K(h, M), L || C.push(M);
|
|
553
553
|
}
|
|
554
554
|
return C;
|
|
555
555
|
} catch (d) {
|
|
@@ -572,9 +572,9 @@ function Qe(e) {
|
|
|
572
572
|
var L;
|
|
573
573
|
const f = (m || "").trim(), _ = Array.isArray(g) && g.length > 0;
|
|
574
574
|
if (!h || !f && !_) return;
|
|
575
|
-
const
|
|
576
|
-
id:
|
|
577
|
-
client_msg_id:
|
|
575
|
+
const w = Je(), C = de(h), M = {
|
|
576
|
+
id: w,
|
|
577
|
+
client_msg_id: w,
|
|
578
578
|
conversation_id: h,
|
|
579
579
|
type: "content",
|
|
580
580
|
text_md: f,
|
|
@@ -588,23 +588,23 @@ function Qe(e) {
|
|
|
588
588
|
..._ ? { payload: { type: "content", attachments: g } } : {},
|
|
589
589
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
590
590
|
};
|
|
591
|
-
|
|
591
|
+
K(h, M);
|
|
592
592
|
try {
|
|
593
593
|
await e.postMessage(h, {
|
|
594
|
-
client_msg_id:
|
|
594
|
+
client_msg_id: w,
|
|
595
595
|
text_md: f,
|
|
596
596
|
created_at: C,
|
|
597
597
|
..._ ? { attachments: g } : {},
|
|
598
598
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
599
599
|
});
|
|
600
600
|
} catch (x) {
|
|
601
|
-
console.error("[store] send failed", x),
|
|
601
|
+
console.error("[store] send failed", x), J(h, w, {
|
|
602
602
|
_failed: !0,
|
|
603
603
|
_pending: !1
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
async function
|
|
607
|
+
async function S(h, m, g) {
|
|
608
608
|
h != null && (t.awaitingCallback[h] = !0);
|
|
609
609
|
try {
|
|
610
610
|
await e.postCallback(h, m, g);
|
|
@@ -612,10 +612,10 @@ function Qe(e) {
|
|
|
612
612
|
console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
async function
|
|
615
|
+
const P = /* @__PURE__ */ new Map();
|
|
616
|
+
async function I(h) {
|
|
617
617
|
if (!h) return null;
|
|
618
|
-
const m =
|
|
618
|
+
const m = P.get(h);
|
|
619
619
|
if (m != null && m.url) {
|
|
620
620
|
const g = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
621
621
|
if (!g || g - Date.now() > 6e4) return m.url;
|
|
@@ -623,7 +623,7 @@ function Qe(e) {
|
|
|
623
623
|
try {
|
|
624
624
|
const g = await e.signAttachment(h);
|
|
625
625
|
if (g != null && g.signed_url)
|
|
626
|
-
return
|
|
626
|
+
return P.set(h, {
|
|
627
627
|
url: g.signed_url,
|
|
628
628
|
expires_at: g.expires_at
|
|
629
629
|
}), g.signed_url;
|
|
@@ -632,8 +632,8 @@ function Qe(e) {
|
|
|
632
632
|
}
|
|
633
633
|
return null;
|
|
634
634
|
}
|
|
635
|
-
async function
|
|
636
|
-
const d = t.conversations.find((
|
|
635
|
+
async function U(h, { rating: m, comment: g } = {}) {
|
|
636
|
+
const d = t.conversations.find((w) => w.id === h), _ = {
|
|
637
637
|
...(d == null ? void 0 : d.metadata) || {},
|
|
638
638
|
feedback: {
|
|
639
639
|
rating: m,
|
|
@@ -643,7 +643,7 @@ function Qe(e) {
|
|
|
643
643
|
};
|
|
644
644
|
await T(h, { metadata: _ });
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function Y(h) {
|
|
647
647
|
var g, d;
|
|
648
648
|
const m = t.messagesByConv[h] || [];
|
|
649
649
|
for (let f = m.length - 1; f >= 0; f--) {
|
|
@@ -657,12 +657,12 @@ function Qe(e) {
|
|
|
657
657
|
var g, d, f;
|
|
658
658
|
const m = t.messagesByConv[h] || [];
|
|
659
659
|
for (let _ = m.length - 1; _ >= 0; _--) {
|
|
660
|
-
const
|
|
661
|
-
if (((g =
|
|
660
|
+
const w = m[_];
|
|
661
|
+
if (((g = w == null ? void 0 : w.author) == null ? void 0 : g.type) === "user" || (w == null ? void 0 : w.type) === "action" && ((d = w == null ? void 0 : w.payload) == null ? void 0 : d.state) === "pending")
|
|
662
662
|
return null;
|
|
663
|
-
const C = (f =
|
|
663
|
+
const C = (f = w == null ? void 0 : w.metadata) == null ? void 0 : f.form;
|
|
664
664
|
if (C && Array.isArray(C.fields) && C.fields.length > 0)
|
|
665
|
-
return { message:
|
|
665
|
+
return { message: w, form: C };
|
|
666
666
|
}
|
|
667
667
|
return null;
|
|
668
668
|
}
|
|
@@ -677,14 +677,14 @@ function Qe(e) {
|
|
|
677
677
|
function te(h) {
|
|
678
678
|
var g, d, f, _;
|
|
679
679
|
const m = t.messagesByConv[h] || [];
|
|
680
|
-
for (let
|
|
681
|
-
const C = m[
|
|
680
|
+
for (let w = m.length - 1; w >= 0; w--) {
|
|
681
|
+
const C = m[w];
|
|
682
682
|
if (((g = C == null ? void 0 : C.author) == null ? void 0 : g.type) === "user") return [];
|
|
683
683
|
if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
|
|
684
684
|
return [];
|
|
685
685
|
if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
|
|
686
|
-
const
|
|
687
|
-
return Array.isArray(
|
|
686
|
+
const M = (_ = C == null ? void 0 : C.metadata) == null ? void 0 : _.suggested_replies;
|
|
687
|
+
return Array.isArray(M) && M.length ? M.map((L) => {
|
|
688
688
|
if (typeof L == "string") {
|
|
689
689
|
const x = L.trim();
|
|
690
690
|
return x ? { label: x, kind: null } : null;
|
|
@@ -692,21 +692,21 @@ function Qe(e) {
|
|
|
692
692
|
if (L && typeof L == "object" && typeof L.label == "string") {
|
|
693
693
|
const x = L.label.trim();
|
|
694
694
|
if (!x) return null;
|
|
695
|
-
const
|
|
696
|
-
return { label: x, kind:
|
|
695
|
+
const Fe = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
|
|
696
|
+
return { label: x, kind: Fe };
|
|
697
697
|
}
|
|
698
698
|
return null;
|
|
699
699
|
}).filter(Boolean).slice(0, 4) : [];
|
|
700
700
|
}
|
|
701
701
|
return [];
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function K(h, m) {
|
|
704
704
|
var _;
|
|
705
705
|
const g = t.messagesByConv[h] || [];
|
|
706
706
|
let d = -1;
|
|
707
707
|
m != null && m.client_msg_id && (d = g.findIndex(
|
|
708
|
-
(
|
|
709
|
-
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((
|
|
708
|
+
(w) => (w == null ? void 0 : w.client_msg_id) && w.client_msg_id === m.client_msg_id
|
|
709
|
+
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = g.findIndex((w) => ne(w == null ? void 0 : w.id, m.id)));
|
|
710
710
|
let f;
|
|
711
711
|
d === -1 ? f = [...g, m].sort(ce) : (f = g.slice(), f[d] = {
|
|
712
712
|
...g[d],
|
|
@@ -718,10 +718,10 @@ function Qe(e) {
|
|
|
718
718
|
function ne(h, m) {
|
|
719
719
|
return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function J(h, m, g) {
|
|
722
722
|
const d = t.messagesByConv[h];
|
|
723
723
|
if (!d) return;
|
|
724
|
-
const f = d.findIndex((
|
|
724
|
+
const f = d.findIndex((w) => w.id === m);
|
|
725
725
|
if (f === -1) return;
|
|
726
726
|
const _ = d.slice();
|
|
727
727
|
_[f] = { ...d[f], ...g }, t.messagesByConv[h] = _;
|
|
@@ -733,7 +733,7 @@ function Qe(e) {
|
|
|
733
733
|
if (m && (!d.last_message_at || m > d.last_message_at)) {
|
|
734
734
|
const f = t.conversations.slice();
|
|
735
735
|
f[g] = { ...d, last_message_at: m }, f.sort(
|
|
736
|
-
(_,
|
|
736
|
+
(_, w) => (w.last_message_at || "").localeCompare(_.last_message_at || "")
|
|
737
737
|
), t.conversations = f;
|
|
738
738
|
}
|
|
739
739
|
}
|
|
@@ -763,14 +763,14 @@ function Qe(e) {
|
|
|
763
763
|
createConversation: a,
|
|
764
764
|
openConversation: p,
|
|
765
765
|
loadMore: k,
|
|
766
|
-
fetchSinceLast:
|
|
766
|
+
fetchSinceLast: E,
|
|
767
767
|
patchConversation: T,
|
|
768
768
|
markConversationRead: A,
|
|
769
769
|
send: H,
|
|
770
|
-
clickCallback:
|
|
771
|
-
signAttachment:
|
|
772
|
-
submitFeedback:
|
|
773
|
-
getPendingApproval:
|
|
770
|
+
clickCallback: S,
|
|
771
|
+
signAttachment: I,
|
|
772
|
+
submitFeedback: U,
|
|
773
|
+
getPendingApproval: Y,
|
|
774
774
|
getActionInFlight: ee,
|
|
775
775
|
getLatestSuggestions: te,
|
|
776
776
|
getLatestForm: Z,
|
|
@@ -802,13 +802,13 @@ const z = {
|
|
|
802
802
|
"#D97706",
|
|
803
803
|
"#059669"
|
|
804
804
|
];
|
|
805
|
-
function
|
|
805
|
+
function ye(e = "") {
|
|
806
806
|
return e ? ge[e.charCodeAt(0) % ge.length] : ge[0];
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function we(e = "") {
|
|
809
809
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function pe(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
|
|
812
812
|
return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
|
|
813
813
|
}
|
|
814
814
|
const Xe = `
|
|
@@ -857,7 +857,7 @@ const Xe = `
|
|
|
857
857
|
0% { transform: translateX(110%); opacity: 0; }
|
|
858
858
|
100% { transform: translateX(0); opacity: 1; }
|
|
859
859
|
}
|
|
860
|
-
`, Ze = "https://api.messenger.victorc.fr",
|
|
860
|
+
`, Ze = "https://api.messenger.victorc.fr", ae = "fr", et = ["fr", "en"], Ae = { fr: "fr-FR", en: "en-US" }, _e = {
|
|
861
861
|
fr: {
|
|
862
862
|
// ── Common ───────────────────────────────────────────────────────
|
|
863
863
|
"common.newConversation": "Nouvelle conversation",
|
|
@@ -903,6 +903,8 @@ const Xe = `
|
|
|
903
903
|
"onboarding.heroSub": `Posez-moi n'importe quelle question.
|
|
904
904
|
Je réponds en quelques secondes.`,
|
|
905
905
|
"onboarding.newMessage": "Nouveau message",
|
|
906
|
+
"onboarding.statusInProgress": "En cours",
|
|
907
|
+
"onboarding.resume": "Reprendre",
|
|
906
908
|
// ── Composer ─────────────────────────────────────────────────────
|
|
907
909
|
"composer.placeholder": "Écrivez votre message…",
|
|
908
910
|
"composer.replyTo": "Répondre à {name}…",
|
|
@@ -1024,6 +1026,8 @@ Je réponds en quelques secondes.`,
|
|
|
1024
1026
|
"onboarding.heroSub": `Ask me anything.
|
|
1025
1027
|
I reply within seconds.`,
|
|
1026
1028
|
"onboarding.newMessage": "New message",
|
|
1029
|
+
"onboarding.statusInProgress": "In progress",
|
|
1030
|
+
"onboarding.resume": "Resume",
|
|
1027
1031
|
// ── Composer ─────────────────────────────────────────────────────
|
|
1028
1032
|
"composer.placeholder": "Type your message…",
|
|
1029
1033
|
"composer.replyTo": "Reply to {name}…",
|
|
@@ -1101,16 +1105,16 @@ I reply within seconds.`,
|
|
|
1101
1105
|
"export.createdOn": "Created on: {date}"
|
|
1102
1106
|
}
|
|
1103
1107
|
};
|
|
1104
|
-
function
|
|
1105
|
-
if (typeof e != "string") return
|
|
1108
|
+
function be(e) {
|
|
1109
|
+
if (typeof e != "string") return ae;
|
|
1106
1110
|
const t = e.trim().toLowerCase().slice(0, 2);
|
|
1107
|
-
return et.includes(t) ? t :
|
|
1111
|
+
return et.includes(t) ? t : ae;
|
|
1108
1112
|
}
|
|
1109
|
-
function
|
|
1110
|
-
return
|
|
1113
|
+
function re(e) {
|
|
1114
|
+
return Ae[be(e)] || Ae[ae];
|
|
1111
1115
|
}
|
|
1112
1116
|
function j(e) {
|
|
1113
|
-
const t =
|
|
1117
|
+
const t = be(e), n = _e[t] || _e[ae], i = _e[ae];
|
|
1114
1118
|
return function(s, a) {
|
|
1115
1119
|
let l = n[s];
|
|
1116
1120
|
return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
|
|
@@ -1119,13 +1123,13 @@ function j(e) {
|
|
|
1119
1123
|
)), l);
|
|
1120
1124
|
};
|
|
1121
1125
|
}
|
|
1122
|
-
function
|
|
1126
|
+
function Se(e, t) {
|
|
1123
1127
|
if (!Array.isArray(e == null ? void 0 : e.options)) return t;
|
|
1124
1128
|
const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
|
|
1125
1129
|
return (n == null ? void 0 : n.label) || t;
|
|
1126
1130
|
}
|
|
1127
|
-
function
|
|
1128
|
-
return Array.isArray(t) ? t.map((i) =>
|
|
1131
|
+
function Be(e, t, n) {
|
|
1132
|
+
return Array.isArray(t) ? t.map((i) => Se(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Se(e, String(t));
|
|
1129
1133
|
}
|
|
1130
1134
|
function tt(e, t, n = j()) {
|
|
1131
1135
|
if (!e || !t) return "";
|
|
@@ -1134,7 +1138,7 @@ function tt(e, t, n = j()) {
|
|
|
1134
1138
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1135
1139
|
const a = t[s.key];
|
|
1136
1140
|
if (a == null || a === "") continue;
|
|
1137
|
-
const l =
|
|
1141
|
+
const l = Be(s, a, n);
|
|
1138
1142
|
l && r.push(`${s.label} :
|
|
1139
1143
|
${l}`);
|
|
1140
1144
|
}
|
|
@@ -1148,7 +1152,7 @@ function nt(e, t, n = j()) {
|
|
|
1148
1152
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1149
1153
|
const a = t == null ? void 0 : t[s.key];
|
|
1150
1154
|
if (a == null || a === "") continue;
|
|
1151
|
-
const l =
|
|
1155
|
+
const l = Be(s, a, n);
|
|
1152
1156
|
if (!l) continue;
|
|
1153
1157
|
const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
|
|
1154
1158
|
`));
|
|
@@ -1162,7 +1166,7 @@ function nt(e, t, n = j()) {
|
|
|
1162
1166
|
}
|
|
1163
1167
|
};
|
|
1164
1168
|
}
|
|
1165
|
-
function
|
|
1169
|
+
function oe(e) {
|
|
1166
1170
|
var n;
|
|
1167
1171
|
const t = (n = e == null ? void 0 : e.author) == null ? void 0 : n.type;
|
|
1168
1172
|
return t === "agent_ia" || t === "agent_human";
|
|
@@ -1172,7 +1176,7 @@ function W(e) {
|
|
|
1172
1176
|
const t = typeof e == "number" ? e : Number(e);
|
|
1173
1177
|
return Number.isFinite(t) ? t : null;
|
|
1174
1178
|
}
|
|
1175
|
-
function
|
|
1179
|
+
function Me(e, t) {
|
|
1176
1180
|
let n = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
|
|
1177
1181
|
for (const i of t)
|
|
1178
1182
|
i != null && i.created_at && i.created_at > n && (n = i.created_at);
|
|
@@ -1214,7 +1218,7 @@ function it(e, t, n, i) {
|
|
|
1214
1218
|
}
|
|
1215
1219
|
function at(e, t, n = j(), i) {
|
|
1216
1220
|
if (!e) return;
|
|
1217
|
-
const r = it(e, t || [], n,
|
|
1221
|
+
const r = it(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
|
|
1218
1222
|
try {
|
|
1219
1223
|
const a = URL.createObjectURL(s), l = document.createElement("a");
|
|
1220
1224
|
l.href = a, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(a), 1e3);
|
|
@@ -1333,7 +1337,7 @@ const ot = {
|
|
|
1333
1337
|
// panel or switched threads during the typing dwell.
|
|
1334
1338
|
onMessageRevealed(e, t) {
|
|
1335
1339
|
var r;
|
|
1336
|
-
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !
|
|
1340
|
+
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !oe(e)) return;
|
|
1337
1341
|
const n = typeof document < "u" && document.hidden;
|
|
1338
1342
|
this.isOpen && !n && ((r = this.currentConv) == null ? void 0 : r.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
|
|
1339
1343
|
},
|
|
@@ -1497,7 +1501,7 @@ const ot = {
|
|
|
1497
1501
|
) + r;
|
|
1498
1502
|
this.nextRevealAt = a;
|
|
1499
1503
|
const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
|
|
1500
|
-
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((
|
|
1504
|
+
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((b) => b !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1501
1505
|
}, l);
|
|
1502
1506
|
this.revealTimers.push(k);
|
|
1503
1507
|
},
|
|
@@ -1512,7 +1516,7 @@ const ot = {
|
|
|
1512
1516
|
const n = Date.now(), i = { ...this.revealedAt };
|
|
1513
1517
|
for (const s of e) {
|
|
1514
1518
|
if ((s == null ? void 0 : s.id) == null || i[s.id] !== void 0) continue;
|
|
1515
|
-
if (!
|
|
1519
|
+
if (!oe(s)) {
|
|
1516
1520
|
i[s.id] = n;
|
|
1517
1521
|
continue;
|
|
1518
1522
|
}
|
|
@@ -1543,7 +1547,7 @@ const ot = {
|
|
|
1543
1547
|
paceLiveMessage(e, t) {
|
|
1544
1548
|
var r;
|
|
1545
1549
|
if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
|
|
1546
|
-
if (!
|
|
1550
|
+
if (!oe(e)) {
|
|
1547
1551
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1548
1552
|
return;
|
|
1549
1553
|
}
|
|
@@ -1637,7 +1641,7 @@ function pt(e) {
|
|
|
1637
1641
|
}
|
|
1638
1642
|
return null;
|
|
1639
1643
|
}
|
|
1640
|
-
const
|
|
1644
|
+
const N = (e, t) => {
|
|
1641
1645
|
const n = e.__vccOpts || e;
|
|
1642
1646
|
for (const [i, r] of t)
|
|
1643
1647
|
n[i] = r;
|
|
@@ -1656,10 +1660,10 @@ const R = (e, t) => {
|
|
|
1656
1660
|
},
|
|
1657
1661
|
computed: {
|
|
1658
1662
|
bg() {
|
|
1659
|
-
return this.avatarUrl ? "transparent" :
|
|
1663
|
+
return this.avatarUrl ? "transparent" : ye(this.name);
|
|
1660
1664
|
},
|
|
1661
1665
|
initials() {
|
|
1662
|
-
return
|
|
1666
|
+
return we(this.name);
|
|
1663
1667
|
}
|
|
1664
1668
|
}
|
|
1665
1669
|
}, yt = ["src", "alt"];
|
|
@@ -1683,7 +1687,7 @@ function wt(e, t, n, i, r, s) {
|
|
|
1683
1687
|
}, v(s.initials), 5))
|
|
1684
1688
|
], 6);
|
|
1685
1689
|
}
|
|
1686
|
-
const Re = /* @__PURE__ */
|
|
1690
|
+
const Re = /* @__PURE__ */ N(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
|
|
1687
1691
|
name: "WmLauncher",
|
|
1688
1692
|
components: { HumanAvatar: Re },
|
|
1689
1693
|
inject: {
|
|
@@ -1709,9 +1713,9 @@ const Re = /* @__PURE__ */ R(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
|
|
|
1709
1713
|
return this.peeks.slice(0, bt).reverse();
|
|
1710
1714
|
}
|
|
1711
1715
|
}
|
|
1712
|
-
}, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" },
|
|
1716
|
+
}, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, It = { class: "wm-peek__text" }, Et = ["onClick"], Bt = ["aria-label"], Rt = ["aria-label"];
|
|
1713
1717
|
function Nt(e, t, n, i, r, s) {
|
|
1714
|
-
const a =
|
|
1718
|
+
const a = R("HumanAvatar");
|
|
1715
1719
|
return c(), u("div", {
|
|
1716
1720
|
class: "wm-launcherWrap",
|
|
1717
1721
|
onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
|
|
@@ -1719,13 +1723,13 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1719
1723
|
onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
|
|
1720
1724
|
onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
|
|
1721
1725
|
}, [
|
|
1722
|
-
$(
|
|
1723
|
-
default:
|
|
1726
|
+
$(Ie, { name: "wm-peek" }, {
|
|
1727
|
+
default: Ee(() => [
|
|
1724
1728
|
s.visiblePeeks.length ? (c(), u("div", {
|
|
1725
1729
|
key: 0,
|
|
1726
1730
|
class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1727
1731
|
}, [
|
|
1728
|
-
(c(!0), u(
|
|
1732
|
+
(c(!0), u(B, null, D(s.visiblePeeks, (l, p) => (c(), u("div", {
|
|
1729
1733
|
key: l.convId,
|
|
1730
1734
|
class: "wm-peek",
|
|
1731
1735
|
style: q({
|
|
@@ -1739,15 +1743,15 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1739
1743
|
}),
|
|
1740
1744
|
onClick: (k) => e.$emit("open", l.convId),
|
|
1741
1745
|
onKeydown: [
|
|
1742
|
-
ue(
|
|
1743
|
-
ue(
|
|
1746
|
+
ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
|
|
1747
|
+
ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
|
|
1744
1748
|
]
|
|
1745
1749
|
}, [
|
|
1746
1750
|
o("button", {
|
|
1747
1751
|
type: "button",
|
|
1748
1752
|
class: "wm-peek__close",
|
|
1749
1753
|
"aria-label": s.t("launcher.dismiss"),
|
|
1750
|
-
onClick:
|
|
1754
|
+
onClick: G((k) => e.$emit("dismiss", l.convId), ["stop"])
|
|
1751
1755
|
}, [...t[5] || (t[5] = [
|
|
1752
1756
|
o("svg", {
|
|
1753
1757
|
width: "9",
|
|
@@ -1773,22 +1777,22 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1773
1777
|
key: 0,
|
|
1774
1778
|
class: "wm-peek__avatarBadge",
|
|
1775
1779
|
"aria-label": s.t("launcher.unreadMessages", { count: l.count })
|
|
1776
|
-
}, v(l.count > 9 ? "9+" : l.count), 9, Mt)) :
|
|
1780
|
+
}, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : y("", !0)
|
|
1777
1781
|
]),
|
|
1778
1782
|
o("div", Tt, [
|
|
1779
1783
|
o("div", xt, [
|
|
1780
1784
|
o("span", Ot, v(l.senderName || s.t("common.agent")), 1),
|
|
1781
1785
|
o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
|
|
1782
1786
|
]),
|
|
1783
|
-
o("p",
|
|
1787
|
+
o("p", It, v(l.preview), 1)
|
|
1784
1788
|
]),
|
|
1785
1789
|
o("button", {
|
|
1786
1790
|
type: "button",
|
|
1787
1791
|
class: "wm-peek__open",
|
|
1788
|
-
onClick:
|
|
1792
|
+
onClick: G((k) => e.$emit("open", l.convId), ["stop"])
|
|
1789
1793
|
}, v(s.t("common.open")), 9, Et)
|
|
1790
1794
|
], 44, Ct))), 128))
|
|
1791
|
-
], 2)) :
|
|
1795
|
+
], 2)) : y("", !0)
|
|
1792
1796
|
]),
|
|
1793
1797
|
_: 1
|
|
1794
1798
|
}),
|
|
@@ -1819,11 +1823,11 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1819
1823
|
}) : s.t("launcher.unreadConversationsOne", {
|
|
1820
1824
|
count: n.unreadCount
|
|
1821
1825
|
})
|
|
1822
|
-
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Rt)) :
|
|
1823
|
-
], 8,
|
|
1826
|
+
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Rt)) : y("", !0)
|
|
1827
|
+
], 8, Bt)
|
|
1824
1828
|
], 32);
|
|
1825
1829
|
}
|
|
1826
|
-
const
|
|
1830
|
+
const Pt = /* @__PURE__ */ N(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1"]]), Ft = {
|
|
1827
1831
|
name: "WmAIAvatar",
|
|
1828
1832
|
props: {
|
|
1829
1833
|
size: { type: Number, default: 26 },
|
|
@@ -1846,16 +1850,16 @@ const Ft = /* @__PURE__ */ R(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1
|
|
|
1846
1850
|
},
|
|
1847
1851
|
computed: {
|
|
1848
1852
|
initials() {
|
|
1849
|
-
return
|
|
1853
|
+
return we(this.name);
|
|
1850
1854
|
},
|
|
1851
1855
|
bgColor() {
|
|
1852
|
-
return
|
|
1856
|
+
return ye(this.name);
|
|
1853
1857
|
}
|
|
1854
1858
|
}
|
|
1855
|
-
},
|
|
1859
|
+
}, Ut = {
|
|
1856
1860
|
key: 0,
|
|
1857
1861
|
class: "wm-aiav__pulse"
|
|
1858
|
-
},
|
|
1862
|
+
}, Dt = ["src", "alt"], jt = ["width", "height"];
|
|
1859
1863
|
function Ht(e, t, n, i, r, s) {
|
|
1860
1864
|
return c(), u("div", {
|
|
1861
1865
|
class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
@@ -1865,7 +1869,7 @@ function Ht(e, t, n, i, r, s) {
|
|
|
1865
1869
|
"--wm-avr": n.size * 0.32 + "px"
|
|
1866
1870
|
})
|
|
1867
1871
|
}, [
|
|
1868
|
-
n.pulse ? (c(), u("div",
|
|
1872
|
+
n.pulse ? (c(), u("div", Ut)) : y("", !0),
|
|
1869
1873
|
o("div", {
|
|
1870
1874
|
class: O(["wm-aiav__inner", {
|
|
1871
1875
|
"wm-aiav__inner--glow": n.pulse,
|
|
@@ -1880,7 +1884,7 @@ function Ht(e, t, n, i, r, s) {
|
|
|
1880
1884
|
key: 0,
|
|
1881
1885
|
src: n.imageUrl,
|
|
1882
1886
|
alt: n.name || ""
|
|
1883
|
-
}, null, 8,
|
|
1887
|
+
}, null, 8, Dt)) : s.initials ? (c(), u("span", {
|
|
1884
1888
|
key: 1,
|
|
1885
1889
|
style: q({ fontSize: n.size * 0.36 + "px" })
|
|
1886
1890
|
}, v(s.initials), 5)) : (c(), u("svg", {
|
|
@@ -1914,7 +1918,7 @@ function Ht(e, t, n, i, r, s) {
|
|
|
1914
1918
|
], 6)
|
|
1915
1919
|
], 6);
|
|
1916
1920
|
}
|
|
1917
|
-
const le = /* @__PURE__ */
|
|
1921
|
+
const le = /* @__PURE__ */ N(Ft, [["render", Ht], ["__scopeId", "data-v-6f7f685d"]]), zt = {
|
|
1918
1922
|
name: "WmTeamAvatars",
|
|
1919
1923
|
props: {
|
|
1920
1924
|
members: { type: Array, default: () => [] },
|
|
@@ -1930,16 +1934,16 @@ const le = /* @__PURE__ */ R(Ut, [["render", Ht], ["__scopeId", "data-v-6f7f685d
|
|
|
1930
1934
|
},
|
|
1931
1935
|
methods: {
|
|
1932
1936
|
colorFor(e) {
|
|
1933
|
-
return e.avatar_url ? "transparent" :
|
|
1937
|
+
return e.avatar_url ? "transparent" : ye(e.name || "");
|
|
1934
1938
|
},
|
|
1935
1939
|
initialsFor(e) {
|
|
1936
|
-
return
|
|
1940
|
+
return we(e.name || "");
|
|
1937
1941
|
}
|
|
1938
1942
|
}
|
|
1939
1943
|
}, qt = {
|
|
1940
1944
|
key: 0,
|
|
1941
1945
|
class: "wm-team"
|
|
1942
|
-
}, $t = ["src", "alt"],
|
|
1946
|
+
}, $t = ["src", "alt"], Kt = { key: 1 }, Vt = {
|
|
1943
1947
|
key: 0,
|
|
1944
1948
|
class: "wm-team__label"
|
|
1945
1949
|
};
|
|
@@ -1949,7 +1953,7 @@ function Wt(e, t, n, i, r, s) {
|
|
|
1949
1953
|
class: "wm-team__stack",
|
|
1950
1954
|
style: q({ width: s.stackWidth + "px" })
|
|
1951
1955
|
}, [
|
|
1952
|
-
(c(!0), u(
|
|
1956
|
+
(c(!0), u(B, null, D(n.members.slice(0, 3), (a, l) => (c(), u("div", {
|
|
1953
1957
|
key: l,
|
|
1954
1958
|
class: "wm-team__pill",
|
|
1955
1959
|
style: q({
|
|
@@ -1962,13 +1966,13 @@ function Wt(e, t, n, i, r, s) {
|
|
|
1962
1966
|
key: 0,
|
|
1963
1967
|
src: a.avatar_url,
|
|
1964
1968
|
alt: a.name || ""
|
|
1965
|
-
}, null, 8, $t)) : (c(), u("span",
|
|
1969
|
+
}, null, 8, $t)) : (c(), u("span", Kt, v(s.initialsFor(a)), 1))
|
|
1966
1970
|
], 4))), 128))
|
|
1967
1971
|
], 4),
|
|
1968
|
-
n.responseLabel ? (c(), u("span",
|
|
1969
|
-
])) :
|
|
1972
|
+
n.responseLabel ? (c(), u("span", Vt, v(n.responseLabel), 1)) : y("", !0)
|
|
1973
|
+
])) : y("", !0);
|
|
1970
1974
|
}
|
|
1971
|
-
const Gt = /* @__PURE__ */
|
|
1975
|
+
const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
|
|
1972
1976
|
name: "WmHeader",
|
|
1973
1977
|
components: { AIAvatar: le, TeamAvatars: Gt },
|
|
1974
1978
|
inject: {
|
|
@@ -2015,7 +2019,7 @@ const Gt = /* @__PURE__ */ R(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
|
|
|
2015
2019
|
class: "wm-header__fill"
|
|
2016
2020
|
}, sn = { class: "wm-header__actions" }, rn = ["aria-label", "title"], an = ["aria-label", "title"];
|
|
2017
2021
|
function on(e, t, n, i, r, s) {
|
|
2018
|
-
const a =
|
|
2022
|
+
const a = R("AIAvatar"), l = R("TeamAvatars");
|
|
2019
2023
|
return c(), u("div", Jt, [
|
|
2020
2024
|
n.showBack ? (c(), u("button", {
|
|
2021
2025
|
key: 0,
|
|
@@ -2038,7 +2042,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2038
2042
|
o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2039
2043
|
], -1)
|
|
2040
2044
|
])], 8, Qt)) : (c(), u("div", Xt)),
|
|
2041
|
-
n.showIdentity ? (c(), u(
|
|
2045
|
+
n.showIdentity ? (c(), u(B, { key: 2 }, [
|
|
2042
2046
|
o("div", Zt, [
|
|
2043
2047
|
$(a, {
|
|
2044
2048
|
size: 30,
|
|
@@ -2049,11 +2053,11 @@ function on(e, t, n, i, r, s) {
|
|
|
2049
2053
|
o("div", en, [
|
|
2050
2054
|
o("div", tn, v(n.title), 1)
|
|
2051
2055
|
]),
|
|
2052
|
-
s.hasTeam ? (c(),
|
|
2056
|
+
s.hasTeam ? (c(), F(l, {
|
|
2053
2057
|
key: 0,
|
|
2054
2058
|
members: s.displayedTeamMembers,
|
|
2055
2059
|
"response-label": ""
|
|
2056
|
-
}, null, 8, ["members"])) :
|
|
2060
|
+
}, null, 8, ["members"])) : y("", !0)
|
|
2057
2061
|
], 64)) : (c(), u("div", nn)),
|
|
2058
2062
|
o("div", sn, [
|
|
2059
2063
|
n.showMore ? (c(), u("button", {
|
|
@@ -2087,7 +2091,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2087
2091
|
r: "1.6"
|
|
2088
2092
|
})
|
|
2089
2093
|
], -1)
|
|
2090
|
-
])], 10, rn)) :
|
|
2094
|
+
])], 10, rn)) : y("", !0),
|
|
2091
2095
|
n.showClose ? (c(), u("button", {
|
|
2092
2096
|
key: 1,
|
|
2093
2097
|
type: "button",
|
|
@@ -2109,30 +2113,30 @@ function on(e, t, n, i, r, s) {
|
|
|
2109
2113
|
}, [
|
|
2110
2114
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2111
2115
|
], -1)
|
|
2112
|
-
])], 8, an)) :
|
|
2116
|
+
])], 8, an)) : y("", !0)
|
|
2113
2117
|
])
|
|
2114
2118
|
]);
|
|
2115
2119
|
}
|
|
2116
|
-
const ln = /* @__PURE__ */
|
|
2120
|
+
const ln = /* @__PURE__ */ N(Yt, [["render", on], ["__scopeId", "data-v-0da6fbcd"]]);
|
|
2117
2121
|
function Ne(e) {
|
|
2118
2122
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2119
2123
|
}
|
|
2120
2124
|
function cn(e) {
|
|
2121
2125
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
|
|
2122
2126
|
}
|
|
2123
|
-
const
|
|
2124
|
-
function
|
|
2127
|
+
const Te = "";
|
|
2128
|
+
function ie(e) {
|
|
2125
2129
|
let t = e;
|
|
2126
2130
|
const n = [];
|
|
2127
2131
|
return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
|
|
2128
2132
|
const s = n.length;
|
|
2129
|
-
return n.push(r), `${
|
|
2133
|
+
return n.push(r), `${Te}CODE${s}${Te}`;
|
|
2130
2134
|
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => cn(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;
|
|
2131
2135
|
}
|
|
2132
2136
|
function dn(e) {
|
|
2133
2137
|
if (!e) return "";
|
|
2134
2138
|
const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
|
|
2135
|
-
return
|
|
2139
|
+
return ie(Ne(t));
|
|
2136
2140
|
}
|
|
2137
2141
|
function un(e) {
|
|
2138
2142
|
if (!e) return "";
|
|
@@ -2160,25 +2164,25 @@ function un(e) {
|
|
|
2160
2164
|
if (!T) break;
|
|
2161
2165
|
k.push(T[1]), i++;
|
|
2162
2166
|
}
|
|
2163
|
-
const
|
|
2167
|
+
const b = k.map((T) => `<li>${ie(T)}</li>`).join("");
|
|
2164
2168
|
n.push({
|
|
2165
2169
|
type: "block",
|
|
2166
|
-
html: `<ul class="wm-md-ul">${
|
|
2170
|
+
html: `<ul class="wm-md-ul">${b}</ul>`
|
|
2167
2171
|
});
|
|
2168
2172
|
continue;
|
|
2169
2173
|
}
|
|
2170
2174
|
const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
|
|
2171
2175
|
if (l) {
|
|
2172
|
-
const k = parseInt(l[1], 10),
|
|
2176
|
+
const k = parseInt(l[1], 10), b = [l[2]];
|
|
2173
2177
|
for (i++; i < t.length; ) {
|
|
2174
2178
|
const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
|
|
2175
2179
|
if (!A) break;
|
|
2176
|
-
|
|
2180
|
+
b.push(A[1]), i++;
|
|
2177
2181
|
}
|
|
2178
|
-
const T =
|
|
2182
|
+
const T = b.map((A) => `<li>${ie(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
|
|
2179
2183
|
n.push({
|
|
2180
2184
|
type: "block",
|
|
2181
|
-
html: `<ol class="wm-md-ol"${
|
|
2185
|
+
html: `<ol class="wm-md-ol"${E}>${T}</ol>`
|
|
2182
2186
|
});
|
|
2183
2187
|
continue;
|
|
2184
2188
|
}
|
|
@@ -2187,11 +2191,11 @@ function un(e) {
|
|
|
2187
2191
|
const k = p[1].length;
|
|
2188
2192
|
n.push({
|
|
2189
2193
|
type: "block",
|
|
2190
|
-
html: `<h${k} class="wm-md-h wm-md-h${k}">${
|
|
2194
|
+
html: `<h${k} class="wm-md-h wm-md-h${k}">${ie(p[2])}</h${k}>`
|
|
2191
2195
|
}), i++;
|
|
2192
2196
|
continue;
|
|
2193
2197
|
}
|
|
2194
|
-
n.push({ type: "text", html:
|
|
2198
|
+
n.push({ type: "text", html: ie(s) }), i++;
|
|
2195
2199
|
}
|
|
2196
2200
|
let r = "";
|
|
2197
2201
|
for (let s = 0; s < n.length; s++) {
|
|
@@ -2203,7 +2207,7 @@ function un(e) {
|
|
|
2203
2207
|
}
|
|
2204
2208
|
return r;
|
|
2205
2209
|
}
|
|
2206
|
-
const
|
|
2210
|
+
const xe = {
|
|
2207
2211
|
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",
|
|
2208
2212
|
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",
|
|
2209
2213
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
@@ -2253,7 +2257,7 @@ const Te = {
|
|
|
2253
2257
|
},
|
|
2254
2258
|
methods: {
|
|
2255
2259
|
iconPath(e) {
|
|
2256
|
-
return
|
|
2260
|
+
return xe[e] || xe.link;
|
|
2257
2261
|
},
|
|
2258
2262
|
renderPreview(e) {
|
|
2259
2263
|
return dn(e);
|
|
@@ -2262,7 +2266,7 @@ const Te = {
|
|
|
2262
2266
|
if (!e) return "";
|
|
2263
2267
|
const t = new Date(e);
|
|
2264
2268
|
if (Number.isNaN(t.getTime())) return "";
|
|
2265
|
-
const n =
|
|
2269
|
+
const n = re(this.wmLocale()), i = /* @__PURE__ */ new Date();
|
|
2266
2270
|
if (t.toDateString() === i.toDateString())
|
|
2267
2271
|
return t.toLocaleTimeString(n, {
|
|
2268
2272
|
hour: "2-digit",
|
|
@@ -2280,7 +2284,7 @@ const Te = {
|
|
|
2280
2284
|
}
|
|
2281
2285
|
}, mn = { class: "wm-onb" }, fn = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, _n = { class: "wm-onb__title" }, pn = { class: "wm-onb__sub" }, vn = { class: "wm-onb__cta" }, yn = ["disabled"], wn = {
|
|
2282
2286
|
key: 0,
|
|
2283
|
-
class: "wm-onb__section"
|
|
2287
|
+
class: "wm-onb__section wm-onb__section--card"
|
|
2284
2288
|
}, bn = { class: "wm-onb__section-title" }, kn = ["onClick"], Cn = { class: "wm-onb__card-icon" }, An = {
|
|
2285
2289
|
width: "16",
|
|
2286
2290
|
height: "16",
|
|
@@ -2296,16 +2300,19 @@ const Te = {
|
|
|
2296
2300
|
class: "wm-onb__card-sub"
|
|
2297
2301
|
}, On = {
|
|
2298
2302
|
key: 1,
|
|
2299
|
-
class: "wm-onb__section"
|
|
2300
|
-
}, Ln = { class: "wm-onb__section-title" },
|
|
2303
|
+
class: "wm-onb__section wm-onb__section--card"
|
|
2304
|
+
}, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, En = ["placeholder", "aria-label"], Bn = { class: "wm-onb__list" }, Rn = { class: "wm-onb__thread-body" }, Nn = { class: "wm-onb__thread-status" }, Pn = { class: "wm-onb__thread-statusLabel" }, Fn = {
|
|
2301
2305
|
key: 0,
|
|
2306
|
+
class: "wm-onb__thread-statusSep"
|
|
2307
|
+
}, Un = {
|
|
2308
|
+
key: 1,
|
|
2302
2309
|
class: "wm-onb__thread-time"
|
|
2303
|
-
}, Hn = {
|
|
2310
|
+
}, Dn = { class: "wm-onb__thread-title" }, jn = ["innerHTML"], Hn = ["onClick"], zn = {
|
|
2304
2311
|
key: 0,
|
|
2305
2312
|
class: "wm-onb__empty"
|
|
2306
2313
|
};
|
|
2307
|
-
function
|
|
2308
|
-
const a =
|
|
2314
|
+
function qn(e, t, n, i, r, s) {
|
|
2315
|
+
const a = R("AIAvatar");
|
|
2309
2316
|
return c(), u("div", mn, [
|
|
2310
2317
|
o("div", fn, [
|
|
2311
2318
|
t[2] || (t[2] = o("svg", {
|
|
@@ -2381,7 +2388,7 @@ function zn(e, t, n, i, r, s) {
|
|
|
2381
2388
|
o("div", {
|
|
2382
2389
|
class: O(s.quickLinksLayout)
|
|
2383
2390
|
}, [
|
|
2384
|
-
(c(!0), u(
|
|
2391
|
+
(c(!0), u(B, null, D(n.quickLinks, (l, p) => (c(), u("button", {
|
|
2385
2392
|
key: p,
|
|
2386
2393
|
type: "button",
|
|
2387
2394
|
class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
|
|
@@ -2396,14 +2403,14 @@ function zn(e, t, n, i, r, s) {
|
|
|
2396
2403
|
]),
|
|
2397
2404
|
o("span", Mn, [
|
|
2398
2405
|
o("span", Tn, v(l.label), 1),
|
|
2399
|
-
l.description ? (c(), u("span", xn, v(l.description), 1)) :
|
|
2406
|
+
l.description ? (c(), u("span", xn, v(l.description), 1)) : y("", !0)
|
|
2400
2407
|
])
|
|
2401
2408
|
], 10, kn))), 128))
|
|
2402
2409
|
], 2)
|
|
2403
|
-
])) :
|
|
2410
|
+
])) : y("", !0),
|
|
2404
2411
|
n.openThreads.length ? (c(), u("div", On, [
|
|
2405
2412
|
o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
|
|
2406
|
-
o("div",
|
|
2413
|
+
o("div", In, [
|
|
2407
2414
|
t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
|
|
2408
2415
|
o("svg", {
|
|
2409
2416
|
width: "12",
|
|
@@ -2419,7 +2426,7 @@ function zn(e, t, n, i, r, s) {
|
|
|
2419
2426
|
o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
2420
2427
|
])
|
|
2421
2428
|
], -1)),
|
|
2422
|
-
|
|
2429
|
+
V(o("input", {
|
|
2423
2430
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
|
|
2424
2431
|
type: "text",
|
|
2425
2432
|
placeholder: s.t("onboarding.search"),
|
|
@@ -2428,17 +2435,13 @@ function zn(e, t, n, i, r, s) {
|
|
|
2428
2435
|
[X, r.query]
|
|
2429
2436
|
])
|
|
2430
2437
|
]),
|
|
2431
|
-
o("div",
|
|
2432
|
-
(c(!0), u(
|
|
2438
|
+
o("div", Bn, [
|
|
2439
|
+
(c(!0), u(B, null, D(s.filteredThreads, (l) => (c(), u("div", {
|
|
2433
2440
|
key: l.id,
|
|
2434
|
-
|
|
2435
|
-
class: "wm-onb__thread",
|
|
2436
|
-
onClick: (p) => e.$emit("resume", l)
|
|
2441
|
+
class: "wm-onb__thread"
|
|
2437
2442
|
}, [
|
|
2438
|
-
o("span", {
|
|
2439
|
-
|
|
2440
|
-
}, [
|
|
2441
|
-
t[5] || (t[5] = o("svg", {
|
|
2443
|
+
t[5] || (t[5] = o("span", { class: "wm-onb__thread-icon" }, [
|
|
2444
|
+
o("svg", {
|
|
2442
2445
|
width: "18",
|
|
2443
2446
|
height: "18",
|
|
2444
2447
|
viewBox: "0 0 24 24",
|
|
@@ -2450,45 +2453,33 @@ function zn(e, t, n, i, r, s) {
|
|
|
2450
2453
|
fill: "currentColor",
|
|
2451
2454
|
opacity: "0.92"
|
|
2452
2455
|
})
|
|
2453
|
-
]
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
"
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
o("span",
|
|
2456
|
+
])
|
|
2457
|
+
], -1)),
|
|
2458
|
+
o("span", Rn, [
|
|
2459
|
+
o("span", Nn, [
|
|
2460
|
+
o("span", Pn, v(s.t("onboarding.statusInProgress")), 1),
|
|
2461
|
+
s.formatTs(l._ts) ? (c(), u("span", Fn, "·")) : y("", !0),
|
|
2462
|
+
s.formatTs(l._ts) ? (c(), u("span", Un, v(s.formatTs(l._ts)), 1)) : y("", !0)
|
|
2463
|
+
]),
|
|
2464
|
+
o("span", Dn, v(l.title), 1),
|
|
2462
2465
|
o("span", {
|
|
2463
2466
|
class: "wm-onb__thread-preview",
|
|
2464
2467
|
innerHTML: s.renderPreview(l.preview)
|
|
2465
|
-
}, null, 8,
|
|
2468
|
+
}, null, 8, jn)
|
|
2466
2469
|
]),
|
|
2467
|
-
o("
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
stroke: "currentColor",
|
|
2475
|
-
"stroke-width": "1.8",
|
|
2476
|
-
"stroke-linecap": "round",
|
|
2477
|
-
"stroke-linejoin": "round",
|
|
2478
|
-
class: "wm-onb__thread-chev",
|
|
2479
|
-
"aria-hidden": "true"
|
|
2480
|
-
}, [
|
|
2481
|
-
o("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2482
|
-
], -1))
|
|
2483
|
-
])
|
|
2484
|
-
], 8, Rn))), 128)),
|
|
2485
|
-
s.filteredThreads.length ? b("", !0) : (c(), u("div", Hn, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2470
|
+
o("button", {
|
|
2471
|
+
type: "button",
|
|
2472
|
+
class: "wm-onb__thread-resume",
|
|
2473
|
+
onClick: (p) => e.$emit("resume", l)
|
|
2474
|
+
}, v(s.t("onboarding.resume")), 9, Hn)
|
|
2475
|
+
]))), 128)),
|
|
2476
|
+
s.filteredThreads.length ? y("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2486
2477
|
])
|
|
2487
|
-
])) :
|
|
2478
|
+
])) : y("", !0)
|
|
2488
2479
|
]);
|
|
2489
2480
|
}
|
|
2490
|
-
const
|
|
2491
|
-
function
|
|
2481
|
+
const $n = /* @__PURE__ */ N(hn, [["render", qn], ["__scopeId", "data-v-a3b35a29"]]);
|
|
2482
|
+
function Kn(e) {
|
|
2492
2483
|
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();
|
|
2493
2484
|
}
|
|
2494
2485
|
const Vn = {
|
|
@@ -2501,13 +2492,13 @@ const Vn = {
|
|
|
2501
2492
|
},
|
|
2502
2493
|
computed: {
|
|
2503
2494
|
detailText() {
|
|
2504
|
-
return
|
|
2495
|
+
return Kn(this.detail);
|
|
2505
2496
|
}
|
|
2506
2497
|
}
|
|
2507
|
-
},
|
|
2498
|
+
}, Wn = {
|
|
2508
2499
|
class: "wm-result__icon",
|
|
2509
2500
|
"aria-hidden": "true"
|
|
2510
|
-
},
|
|
2501
|
+
}, Gn = {
|
|
2511
2502
|
key: 0,
|
|
2512
2503
|
width: "11",
|
|
2513
2504
|
height: "11",
|
|
@@ -2517,7 +2508,7 @@ const Vn = {
|
|
|
2517
2508
|
"stroke-width": "2.8",
|
|
2518
2509
|
"stroke-linecap": "round",
|
|
2519
2510
|
"stroke-linejoin": "round"
|
|
2520
|
-
},
|
|
2511
|
+
}, Yn = {
|
|
2521
2512
|
key: 1,
|
|
2522
2513
|
width: "11",
|
|
2523
2514
|
height: "11",
|
|
@@ -2527,7 +2518,7 @@ const Vn = {
|
|
|
2527
2518
|
"stroke-width": "2.6",
|
|
2528
2519
|
"stroke-linecap": "round",
|
|
2529
2520
|
"stroke-linejoin": "round"
|
|
2530
|
-
},
|
|
2521
|
+
}, Jn = {
|
|
2531
2522
|
key: 2,
|
|
2532
2523
|
width: "11",
|
|
2533
2524
|
height: "11",
|
|
@@ -2537,7 +2528,7 @@ const Vn = {
|
|
|
2537
2528
|
"stroke-width": "2.4",
|
|
2538
2529
|
"stroke-linecap": "round",
|
|
2539
2530
|
"stroke-linejoin": "round"
|
|
2540
|
-
},
|
|
2531
|
+
}, Qn = {
|
|
2541
2532
|
key: 3,
|
|
2542
2533
|
width: "12",
|
|
2543
2534
|
height: "12",
|
|
@@ -2547,24 +2538,24 @@ const Vn = {
|
|
|
2547
2538
|
"stroke-width": "2.2",
|
|
2548
2539
|
"stroke-linecap": "round",
|
|
2549
2540
|
"stroke-linejoin": "round"
|
|
2550
|
-
},
|
|
2551
|
-
function
|
|
2541
|
+
}, Xn = { class: "wm-result__body" }, Zn = { class: "wm-result__label" }, es = { class: "wm-result__detail" };
|
|
2542
|
+
function ts(e, t, n, i, r, s) {
|
|
2552
2543
|
return c(), u("div", {
|
|
2553
2544
|
class: O(["wm-result", `wm-result--${n.state}`])
|
|
2554
2545
|
}, [
|
|
2555
|
-
o("span",
|
|
2556
|
-
n.state === "success" ? (c(), u("svg",
|
|
2546
|
+
o("span", Wn, [
|
|
2547
|
+
n.state === "success" ? (c(), u("svg", Gn, [...t[0] || (t[0] = [
|
|
2557
2548
|
o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2558
|
-
])])) : n.state === "rejected" ? (c(), u("svg",
|
|
2549
|
+
])])) : n.state === "rejected" ? (c(), u("svg", Yn, [...t[1] || (t[1] = [
|
|
2559
2550
|
o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2560
|
-
])])) : n.state === "awaiting" ? (c(), u("svg",
|
|
2551
|
+
])])) : n.state === "awaiting" ? (c(), u("svg", Jn, [...t[2] || (t[2] = [
|
|
2561
2552
|
o("circle", {
|
|
2562
2553
|
cx: "12",
|
|
2563
2554
|
cy: "12",
|
|
2564
2555
|
r: "10"
|
|
2565
2556
|
}, null, -1),
|
|
2566
2557
|
o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2567
|
-
])])) : (c(), u("svg",
|
|
2558
|
+
])])) : (c(), u("svg", Qn, [...t[3] || (t[3] = [
|
|
2568
2559
|
o("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
|
|
2569
2560
|
o("line", {
|
|
2570
2561
|
x1: "12",
|
|
@@ -2580,19 +2571,19 @@ function es(e, t, n, i, r, s) {
|
|
|
2580
2571
|
}, null, -1)
|
|
2581
2572
|
])]))
|
|
2582
2573
|
]),
|
|
2583
|
-
o("span",
|
|
2584
|
-
o("span",
|
|
2585
|
-
s.detailText ? (c(), u(
|
|
2574
|
+
o("span", Xn, [
|
|
2575
|
+
o("span", Zn, v(n.label), 1),
|
|
2576
|
+
s.detailText ? (c(), u(B, { key: 0 }, [
|
|
2586
2577
|
t[4] || (t[4] = o("span", {
|
|
2587
2578
|
class: "wm-result__sep",
|
|
2588
2579
|
"aria-hidden": "true"
|
|
2589
2580
|
}, " · ", -1)),
|
|
2590
|
-
o("span",
|
|
2591
|
-
], 64)) :
|
|
2581
|
+
o("span", es, v(s.detailText), 1)
|
|
2582
|
+
], 64)) : y("", !0)
|
|
2592
2583
|
])
|
|
2593
2584
|
], 2);
|
|
2594
2585
|
}
|
|
2595
|
-
const
|
|
2586
|
+
const ns = /* @__PURE__ */ N(Vn, [["render", ts], ["__scopeId", "data-v-7284acd0"]]), ss = {
|
|
2596
2587
|
name: "WmArtifactFormResponse",
|
|
2597
2588
|
inject: {
|
|
2598
2589
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -2608,12 +2599,12 @@ const ts = /* @__PURE__ */ R(Vn, [["render", es], ["__scopeId", "data-v-7284acd0
|
|
|
2608
2599
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2609
2600
|
}
|
|
2610
2601
|
}
|
|
2611
|
-
},
|
|
2612
|
-
function
|
|
2613
|
-
return c(), u("div",
|
|
2614
|
-
o("div",
|
|
2615
|
-
o("div",
|
|
2616
|
-
o("span",
|
|
2602
|
+
}, rs = { class: "wm-art wm-art--formResponse" }, is = { class: "wm-art__head" }, as = { class: "wm-art__title" }, os = { class: "wm-art__badge wm-art__badge--success" }, ls = { class: "wm-art__body" }, cs = { class: "wm-art__fieldLabel" };
|
|
2603
|
+
function ds(e, t, n, i, r, s) {
|
|
2604
|
+
return c(), u("div", rs, [
|
|
2605
|
+
o("div", is, [
|
|
2606
|
+
o("div", as, v(n.data.title || s.t("form.title")), 1),
|
|
2607
|
+
o("span", os, [
|
|
2617
2608
|
t[0] || (t[0] = o("svg", {
|
|
2618
2609
|
width: "11",
|
|
2619
2610
|
height: "11",
|
|
@@ -2627,15 +2618,15 @@ function cs(e, t, n, i, r, s) {
|
|
|
2627
2618
|
}, [
|
|
2628
2619
|
o("polyline", { points: "20 6 9 17 4 12" })
|
|
2629
2620
|
], -1)),
|
|
2630
|
-
|
|
2621
|
+
ve(" " + v(s.t("form.sent")), 1)
|
|
2631
2622
|
])
|
|
2632
2623
|
]),
|
|
2633
|
-
o("div",
|
|
2634
|
-
(c(!0), u(
|
|
2624
|
+
o("div", ls, [
|
|
2625
|
+
(c(!0), u(B, null, D(s.fields, (a, l) => (c(), u("div", {
|
|
2635
2626
|
key: l,
|
|
2636
2627
|
class: "wm-art__field"
|
|
2637
2628
|
}, [
|
|
2638
|
-
o("div",
|
|
2629
|
+
o("div", cs, v(a.label), 1),
|
|
2639
2630
|
o("div", {
|
|
2640
2631
|
class: O([
|
|
2641
2632
|
"wm-art__fieldValue",
|
|
@@ -2646,7 +2637,7 @@ function cs(e, t, n, i, r, s) {
|
|
|
2646
2637
|
])
|
|
2647
2638
|
]);
|
|
2648
2639
|
}
|
|
2649
|
-
const
|
|
2640
|
+
const us = /* @__PURE__ */ N(ss, [["render", ds], ["__scopeId", "data-v-713aecf1"]]), hs = {
|
|
2650
2641
|
name: "WmArtifactInfoCard",
|
|
2651
2642
|
props: {
|
|
2652
2643
|
data: { type: Object, required: !0 }
|
|
@@ -2661,32 +2652,32 @@ const ds = /* @__PURE__ */ R(ns, [["render", cs], ["__scopeId", "data-v-713aecf1
|
|
|
2661
2652
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
2662
2653
|
}
|
|
2663
2654
|
}
|
|
2664
|
-
},
|
|
2655
|
+
}, ms = { class: "wm-art wm-art--infoCard" }, fs = {
|
|
2665
2656
|
key: 0,
|
|
2666
2657
|
class: "wm-art__image"
|
|
2667
|
-
},
|
|
2658
|
+
}, gs = ["src", "alt"], _s = { class: "wm-art__head" }, ps = { class: "wm-art__headMain" }, vs = { class: "wm-art__title" }, ys = {
|
|
2668
2659
|
key: 0,
|
|
2669
2660
|
class: "wm-art__subtitle"
|
|
2670
|
-
},
|
|
2661
|
+
}, ws = {
|
|
2671
2662
|
key: 1,
|
|
2672
2663
|
class: "wm-art__body"
|
|
2673
|
-
},
|
|
2664
|
+
}, bs = {
|
|
2674
2665
|
key: 0,
|
|
2675
2666
|
class: "wm-art__text"
|
|
2676
|
-
},
|
|
2677
|
-
function
|
|
2678
|
-
return c(), u("div",
|
|
2679
|
-
n.data.image_url ? (c(), u("figure",
|
|
2667
|
+
}, ks = { class: "wm-art__fieldLabel" };
|
|
2668
|
+
function Cs(e, t, n, i, r, s) {
|
|
2669
|
+
return c(), u("div", ms, [
|
|
2670
|
+
n.data.image_url ? (c(), u("figure", fs, [
|
|
2680
2671
|
o("img", {
|
|
2681
2672
|
src: n.data.image_url,
|
|
2682
2673
|
alt: n.data.title || "",
|
|
2683
2674
|
loading: "lazy"
|
|
2684
|
-
}, null, 8,
|
|
2685
|
-
])) :
|
|
2686
|
-
o("div",
|
|
2687
|
-
o("div",
|
|
2688
|
-
o("div",
|
|
2689
|
-
n.data.subtitle ? (c(), u("div",
|
|
2675
|
+
}, null, 8, gs)
|
|
2676
|
+
])) : y("", !0),
|
|
2677
|
+
o("div", _s, [
|
|
2678
|
+
o("div", ps, [
|
|
2679
|
+
o("div", vs, v(n.data.title), 1),
|
|
2680
|
+
n.data.subtitle ? (c(), u("div", ys, v(n.data.subtitle), 1)) : y("", !0)
|
|
2690
2681
|
]),
|
|
2691
2682
|
n.data.badge && n.data.badge.label ? (c(), u("span", {
|
|
2692
2683
|
key: 0,
|
|
@@ -2694,27 +2685,27 @@ function ks(e, t, n, i, r, s) {
|
|
|
2694
2685
|
"wm-art__badge",
|
|
2695
2686
|
`wm-art__badge--${n.data.badge.tone || "neutral"}`
|
|
2696
2687
|
])
|
|
2697
|
-
}, v(n.data.badge.label), 3)) :
|
|
2688
|
+
}, v(n.data.badge.label), 3)) : y("", !0)
|
|
2698
2689
|
]),
|
|
2699
|
-
s.hasBody ? (c(), u("div",
|
|
2700
|
-
n.data.body ? (c(), u("div",
|
|
2701
|
-
s.fields.length ? (c(!0), u(
|
|
2690
|
+
s.hasBody ? (c(), u("div", ws, [
|
|
2691
|
+
n.data.body ? (c(), u("div", bs, v(n.data.body), 1)) : y("", !0),
|
|
2692
|
+
s.fields.length ? (c(!0), u(B, { key: 1 }, D(s.fields, (a, l) => (c(), u("div", {
|
|
2702
2693
|
key: l,
|
|
2703
2694
|
class: "wm-art__field"
|
|
2704
2695
|
}, [
|
|
2705
|
-
o("div",
|
|
2696
|
+
o("div", ks, v(a.label), 1),
|
|
2706
2697
|
o("div", {
|
|
2707
2698
|
class: O([
|
|
2708
2699
|
"wm-art__fieldValue",
|
|
2709
2700
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2710
2701
|
])
|
|
2711
2702
|
}, v(a.value), 3)
|
|
2712
|
-
]))), 128)) :
|
|
2713
|
-
])) :
|
|
2703
|
+
]))), 128)) : y("", !0)
|
|
2704
|
+
])) : y("", !0)
|
|
2714
2705
|
]);
|
|
2715
2706
|
}
|
|
2716
|
-
const
|
|
2717
|
-
function
|
|
2707
|
+
const As = /* @__PURE__ */ N(hs, [["render", Cs], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
2708
|
+
function Ss(e, t, n) {
|
|
2718
2709
|
if (!e) return "";
|
|
2719
2710
|
const i = new Date(e);
|
|
2720
2711
|
if (Number.isNaN(i.getTime())) return e;
|
|
@@ -2728,7 +2719,7 @@ function As(e, t, n) {
|
|
|
2728
2719
|
});
|
|
2729
2720
|
return `${r}${n}${s}`;
|
|
2730
2721
|
}
|
|
2731
|
-
const
|
|
2722
|
+
const Ms = {
|
|
2732
2723
|
name: "WmArtifactTicket",
|
|
2733
2724
|
inject: {
|
|
2734
2725
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -2746,9 +2737,9 @@ const Ss = {
|
|
|
2746
2737
|
},
|
|
2747
2738
|
formattedDate() {
|
|
2748
2739
|
var e;
|
|
2749
|
-
return
|
|
2740
|
+
return Ss(
|
|
2750
2741
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
2751
|
-
|
|
2742
|
+
re(this.wmLocale()),
|
|
2752
2743
|
this.t("ticket.dateAt")
|
|
2753
2744
|
);
|
|
2754
2745
|
}
|
|
@@ -2774,13 +2765,13 @@ const Ss = {
|
|
|
2774
2765
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
2775
2766
|
}
|
|
2776
2767
|
}
|
|
2777
|
-
},
|
|
2768
|
+
}, Ts = { class: "wm-art wm-art--ticket" }, xs = { class: "wm-art__head wm-tk__head" }, Os = { class: "wm-art__title wm-tk__title" }, Ls = { class: "wm-tk__sub" }, Is = { class: "wm-tk__ref" }, Es = {
|
|
2778
2769
|
key: 0,
|
|
2779
2770
|
class: "wm-tk__text"
|
|
2780
|
-
},
|
|
2771
|
+
}, Bs = {
|
|
2781
2772
|
key: 0,
|
|
2782
2773
|
class: "wm-art__body"
|
|
2783
|
-
},
|
|
2774
|
+
}, Rs = { class: "wm-art__fieldLabel" }, Ns = ["data-level"], Ps = {
|
|
2784
2775
|
key: 1,
|
|
2785
2776
|
class: "wm-tk__date",
|
|
2786
2777
|
width: "12",
|
|
@@ -2797,11 +2788,11 @@ const Ss = {
|
|
|
2797
2788
|
class: "wm-art__footer wm-tk__footer"
|
|
2798
2789
|
};
|
|
2799
2790
|
function Us(e, t, n, i, r, s) {
|
|
2800
|
-
return c(), u("div",
|
|
2801
|
-
o("div",
|
|
2802
|
-
o("div",
|
|
2803
|
-
o("div",
|
|
2804
|
-
o("div",
|
|
2791
|
+
return c(), u("div", Ts, [
|
|
2792
|
+
o("div", xs, [
|
|
2793
|
+
o("div", Os, v(n.data.title), 1),
|
|
2794
|
+
o("div", Ls, [
|
|
2795
|
+
o("div", Is, [
|
|
2805
2796
|
t[0] || (t[0] = o("svg", {
|
|
2806
2797
|
width: "11",
|
|
2807
2798
|
height: "11",
|
|
@@ -2829,17 +2820,17 @@ function Us(e, t, n, i, r, s) {
|
|
|
2829
2820
|
class: "wm-tk__dot",
|
|
2830
2821
|
"aria-hidden": "true"
|
|
2831
2822
|
}, null, -1)),
|
|
2832
|
-
|
|
2823
|
+
ve(" " + v(n.data.status.label), 1)
|
|
2833
2824
|
], 2)
|
|
2834
2825
|
]),
|
|
2835
|
-
n.data.body ? (c(), u("div",
|
|
2826
|
+
n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : y("", !0)
|
|
2836
2827
|
]),
|
|
2837
|
-
s.fields.length ? (c(), u("div",
|
|
2838
|
-
(c(!0), u(
|
|
2828
|
+
s.fields.length ? (c(), u("div", Bs, [
|
|
2829
|
+
(c(!0), u(B, null, D(s.fields, (a, l) => (c(), u("div", {
|
|
2839
2830
|
key: l,
|
|
2840
2831
|
class: "wm-art__field"
|
|
2841
2832
|
}, [
|
|
2842
|
-
o("div",
|
|
2833
|
+
o("div", Rs, v(a.label), 1),
|
|
2843
2834
|
o("div", {
|
|
2844
2835
|
class: O([
|
|
2845
2836
|
"wm-art__fieldValue",
|
|
@@ -2876,7 +2867,7 @@ function Us(e, t, n, i, r, s) {
|
|
|
2876
2867
|
height: "9",
|
|
2877
2868
|
rx: "0.5"
|
|
2878
2869
|
}, null, -1)
|
|
2879
|
-
])], 8,
|
|
2870
|
+
])], 8, Ns)) : s.isDate(a.label) ? (c(), u("svg", Ps, [...t[3] || (t[3] = [
|
|
2880
2871
|
o("rect", {
|
|
2881
2872
|
x: "3",
|
|
2882
2873
|
y: "4",
|
|
@@ -2885,11 +2876,11 @@ function Us(e, t, n, i, r, s) {
|
|
|
2885
2876
|
rx: "2"
|
|
2886
2877
|
}, null, -1),
|
|
2887
2878
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
2888
|
-
])])) :
|
|
2879
|
+
])])) : y("", !0),
|
|
2889
2880
|
o("span", null, v(a.value), 1)
|
|
2890
2881
|
], 2)
|
|
2891
2882
|
]))), 128))
|
|
2892
|
-
])) :
|
|
2883
|
+
])) : y("", !0),
|
|
2893
2884
|
n.data.created_at ? (c(), u("div", Fs, [
|
|
2894
2885
|
t[4] || (t[4] = o("svg", {
|
|
2895
2886
|
width: "11",
|
|
@@ -2912,14 +2903,14 @@ function Us(e, t, n, i, r, s) {
|
|
|
2912
2903
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
2913
2904
|
], -1)),
|
|
2914
2905
|
o("span", null, v(s.formattedDate), 1)
|
|
2915
|
-
])) :
|
|
2906
|
+
])) : y("", !0)
|
|
2916
2907
|
]);
|
|
2917
2908
|
}
|
|
2918
|
-
const Ds = /* @__PURE__ */
|
|
2919
|
-
form_response:
|
|
2920
|
-
info_card:
|
|
2909
|
+
const Ds = /* @__PURE__ */ N(Ms, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), js = {
|
|
2910
|
+
form_response: us,
|
|
2911
|
+
info_card: As,
|
|
2921
2912
|
ticket: Ds
|
|
2922
|
-
},
|
|
2913
|
+
}, Hs = {
|
|
2923
2914
|
name: "WmArtifactRenderer",
|
|
2924
2915
|
props: {
|
|
2925
2916
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -2930,17 +2921,17 @@ const Ds = /* @__PURE__ */ R(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914
|
|
|
2930
2921
|
component() {
|
|
2931
2922
|
var t;
|
|
2932
2923
|
const e = (t = this.artifact) == null ? void 0 : t.kind;
|
|
2933
|
-
return e &&
|
|
2924
|
+
return e && js[e] || null;
|
|
2934
2925
|
}
|
|
2935
2926
|
}
|
|
2936
2927
|
};
|
|
2937
|
-
function
|
|
2938
|
-
return s.component ? (c(),
|
|
2928
|
+
function zs(e, t, n, i, r, s) {
|
|
2929
|
+
return s.component ? (c(), F(De(s.component), {
|
|
2939
2930
|
key: 0,
|
|
2940
2931
|
data: n.artifact.data
|
|
2941
|
-
}, null, 8, ["data"])) :
|
|
2932
|
+
}, null, 8, ["data"])) : y("", !0);
|
|
2942
2933
|
}
|
|
2943
|
-
const
|
|
2934
|
+
const qs = /* @__PURE__ */ N(Hs, [["render", zs]]), $s = {
|
|
2944
2935
|
name: "WmAttachmentPreview",
|
|
2945
2936
|
inject: {
|
|
2946
2937
|
signAttachmentFn: { default: null },
|
|
@@ -3008,15 +2999,15 @@ const zs = /* @__PURE__ */ R(js, [["render", Hs]]), qs = {
|
|
|
3008
2999
|
this.safeHref === "#" && e.preventDefault();
|
|
3009
3000
|
}
|
|
3010
3001
|
}
|
|
3011
|
-
},
|
|
3002
|
+
}, Ks = ["href"], Vs = ["src", "alt"], Ws = ["src"], Gs = ["src"], Ys = ["href", "download"], Js = { class: "wm-att__main" }, Qs = { class: "wm-att__name" }, Xs = {
|
|
3012
3003
|
key: 0,
|
|
3013
3004
|
class: "wm-att__meta"
|
|
3014
|
-
},
|
|
3005
|
+
}, Zs = {
|
|
3015
3006
|
key: 0,
|
|
3016
3007
|
class: "wm-att__spin",
|
|
3017
3008
|
"aria-hidden": "true"
|
|
3018
3009
|
};
|
|
3019
|
-
function
|
|
3010
|
+
function er(e, t, n, i, r, s) {
|
|
3020
3011
|
return c(), u("div", {
|
|
3021
3012
|
class: O(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
3022
3013
|
}, [
|
|
@@ -3032,17 +3023,17 @@ function Zs(e, t, n, i, r, s) {
|
|
|
3032
3023
|
alt: s.displayName,
|
|
3033
3024
|
loading: "lazy"
|
|
3034
3025
|
}, null, 8, Vs)
|
|
3035
|
-
], 8,
|
|
3026
|
+
], 8, Ks)) : s.kind === "audio" && r.url ? (c(), u("audio", {
|
|
3036
3027
|
key: 1,
|
|
3037
3028
|
src: r.url,
|
|
3038
3029
|
controls: "",
|
|
3039
3030
|
preload: "metadata"
|
|
3040
|
-
}, null, 8,
|
|
3031
|
+
}, null, 8, Ws)) : s.kind === "video" && r.url ? (c(), u("video", {
|
|
3041
3032
|
key: 2,
|
|
3042
3033
|
src: r.url,
|
|
3043
3034
|
controls: "",
|
|
3044
3035
|
preload: "metadata"
|
|
3045
|
-
}, null, 8,
|
|
3036
|
+
}, null, 8, Gs)) : (c(), u("a", {
|
|
3046
3037
|
key: 3,
|
|
3047
3038
|
class: "wm-att__file",
|
|
3048
3039
|
href: s.safeHref,
|
|
@@ -3067,15 +3058,15 @@ function Zs(e, t, n, i, r, s) {
|
|
|
3067
3058
|
o("path", { d: "M14 2v6h6" })
|
|
3068
3059
|
])
|
|
3069
3060
|
], -1)),
|
|
3070
|
-
o("span",
|
|
3071
|
-
o("span",
|
|
3072
|
-
s.sizeLabel ? (c(), u("span",
|
|
3061
|
+
o("span", Js, [
|
|
3062
|
+
o("span", Qs, v(s.displayName), 1),
|
|
3063
|
+
s.sizeLabel ? (c(), u("span", Xs, v(s.sizeLabel), 1)) : y("", !0)
|
|
3073
3064
|
]),
|
|
3074
|
-
r.loading ? (c(), u("span",
|
|
3075
|
-
], 8,
|
|
3065
|
+
r.loading ? (c(), u("span", Zs)) : y("", !0)
|
|
3066
|
+
], 8, Ys))
|
|
3076
3067
|
], 2);
|
|
3077
3068
|
}
|
|
3078
|
-
const
|
|
3069
|
+
const tr = /* @__PURE__ */ N($s, [["render", er], ["__scopeId", "data-v-0c877a62"]]), nr = {
|
|
3079
3070
|
name: "WmBubble",
|
|
3080
3071
|
props: {
|
|
3081
3072
|
role: { type: String, default: "ai" },
|
|
@@ -3087,45 +3078,45 @@ const er = /* @__PURE__ */ R(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62
|
|
|
3087
3078
|
return un(this.text);
|
|
3088
3079
|
}
|
|
3089
3080
|
}
|
|
3090
|
-
},
|
|
3091
|
-
function
|
|
3081
|
+
}, sr = ["innerHTML"];
|
|
3082
|
+
function rr(e, t, n, i, r, s) {
|
|
3092
3083
|
return c(), u("div", {
|
|
3093
3084
|
class: O(["wm-bubble", "wm-bubble--" + n.role])
|
|
3094
3085
|
}, [
|
|
3095
3086
|
je(e.$slots, "default", {}, () => [
|
|
3096
|
-
o("span", { innerHTML: s.rendered }, null, 8,
|
|
3087
|
+
o("span", { innerHTML: s.rendered }, null, 8, sr)
|
|
3097
3088
|
], !0)
|
|
3098
3089
|
], 2);
|
|
3099
3090
|
}
|
|
3100
|
-
const
|
|
3101
|
-
function
|
|
3102
|
-
return c(), u("div",
|
|
3091
|
+
const ir = /* @__PURE__ */ N(nr, [["render", rr], ["__scopeId", "data-v-7ab13147"]]), ar = { name: "WmTyping" }, or = { class: "wm-typing" };
|
|
3092
|
+
function lr(e, t, n, i, r, s) {
|
|
3093
|
+
return c(), u("div", or, [...t[0] || (t[0] = [
|
|
3103
3094
|
o("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3104
3095
|
o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3105
3096
|
o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3106
3097
|
])]);
|
|
3107
3098
|
}
|
|
3108
|
-
const
|
|
3099
|
+
const cr = /* @__PURE__ */ N(ar, [["render", lr], ["__scopeId", "data-v-df2447fd"]]);
|
|
3109
3100
|
function Q(e) {
|
|
3110
3101
|
return e ? e.client_msg_id || e.id : "";
|
|
3111
3102
|
}
|
|
3112
|
-
const
|
|
3103
|
+
const dr = {
|
|
3113
3104
|
transferred_to_human: "system.transferredToHuman",
|
|
3114
3105
|
assigned: "system.assigned",
|
|
3115
3106
|
unassigned: "system.unassigned",
|
|
3116
3107
|
resolved: "system.resolved",
|
|
3117
3108
|
reopened: "system.reopened",
|
|
3118
3109
|
idle: "system.idle"
|
|
3119
|
-
},
|
|
3110
|
+
}, ur = 80, hr = 200, mr = {
|
|
3120
3111
|
name: "WmMessageList",
|
|
3121
3112
|
components: {
|
|
3122
3113
|
AIAvatar: le,
|
|
3123
3114
|
HumanAvatar: Re,
|
|
3124
|
-
Bubble:
|
|
3125
|
-
Typing:
|
|
3126
|
-
ActionResult:
|
|
3127
|
-
AttachmentPreview:
|
|
3128
|
-
ArtifactRenderer:
|
|
3115
|
+
Bubble: ir,
|
|
3116
|
+
Typing: cr,
|
|
3117
|
+
ActionResult: ns,
|
|
3118
|
+
AttachmentPreview: tr,
|
|
3119
|
+
ArtifactRenderer: qs
|
|
3129
3120
|
},
|
|
3130
3121
|
inject: {
|
|
3131
3122
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -3181,7 +3172,12 @@ const cr = {
|
|
|
3181
3172
|
// seuil "pinned" — affiche un bouton flottant pour revenir en
|
|
3182
3173
|
// bas. Recalculé sur chaque `onScroll` et après chaque restore
|
|
3183
3174
|
// de position.
|
|
3184
|
-
showScrollDown: !1
|
|
3175
|
+
showScrollDown: !1,
|
|
3176
|
+
// Clé d'item actuellement long-pressé : affiche la meta-row
|
|
3177
|
+
// (rôle • heure) sous la bulle correspondante tant que la
|
|
3178
|
+
// pression est maintenue. Null hors long-press, ou pour la
|
|
3179
|
+
// dernière row du cluster (sa meta est déjà rendue en pied).
|
|
3180
|
+
pressedItemKey: null
|
|
3185
3181
|
};
|
|
3186
3182
|
},
|
|
3187
3183
|
computed: {
|
|
@@ -3195,8 +3191,8 @@ const cr = {
|
|
|
3195
3191
|
const l = this.roleOf(a);
|
|
3196
3192
|
if (l === "system") {
|
|
3197
3193
|
if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
|
|
3198
|
-
const
|
|
3199
|
-
|
|
3194
|
+
const b = e[e.length - 1];
|
|
3195
|
+
b && b.role === "ai" ? b.messages.push(a) : e.push({
|
|
3200
3196
|
key: `g-${Q(a)}`,
|
|
3201
3197
|
role: "ai",
|
|
3202
3198
|
agentName: "",
|
|
@@ -3278,7 +3274,7 @@ const cr = {
|
|
|
3278
3274
|
},
|
|
3279
3275
|
beforeUnmount() {
|
|
3280
3276
|
var e;
|
|
3281
|
-
(e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame);
|
|
3277
|
+
(e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame), this._pressTimer && clearTimeout(this._pressTimer);
|
|
3282
3278
|
},
|
|
3283
3279
|
updated() {
|
|
3284
3280
|
this.scheduleMeasure();
|
|
@@ -3310,11 +3306,11 @@ const cr = {
|
|
|
3310
3306
|
return `g-${n}`;
|
|
3311
3307
|
},
|
|
3312
3308
|
isAtBottom(e) {
|
|
3313
|
-
return e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
3309
|
+
return e.scrollHeight - e.scrollTop - e.clientHeight <= ur;
|
|
3314
3310
|
},
|
|
3315
3311
|
onScroll() {
|
|
3316
3312
|
const e = this.$refs.scrollEl;
|
|
3317
|
-
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <=
|
|
3313
|
+
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= hr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
|
|
3318
3314
|
},
|
|
3319
3315
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3320
3316
|
//
|
|
@@ -3515,9 +3511,9 @@ const cr = {
|
|
|
3515
3511
|
// doit garder son arrondi.
|
|
3516
3512
|
cornersFor(e, t) {
|
|
3517
3513
|
var Z, ee, te;
|
|
3518
|
-
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom,
|
|
3519
|
-
let
|
|
3520
|
-
return a ? (k && (
|
|
3514
|
+
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, 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)], H = 0.5, S = (K, ne, J) => K != null && T != null ? K + H >= T : ne === J || ne === "card" && J === "bubble";
|
|
3515
|
+
let P = l, I = l, U = l, Y = l;
|
|
3516
|
+
return a ? (k && (I = p), (b || !s) && (U = p), k && S(E, k, i == null ? void 0 : i.top) && (P = p), b && S(A, b, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (P = p), (b || !s) && (Y = p), k && S(E, k, i == null ? void 0 : i.top) && (I = p), b && S(A, b, i == null ? void 0 : i.bottom) && (U = p)), { tl: P, tr: I, br: U, bl: Y };
|
|
3521
3517
|
},
|
|
3522
3518
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3523
3519
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3579,13 +3575,35 @@ const cr = {
|
|
|
3579
3575
|
}
|
|
3580
3576
|
this.widthByKey = Object.freeze(t);
|
|
3581
3577
|
},
|
|
3578
|
+
// Long-press : déclenche après ~400ms la révélation de la meta-row
|
|
3579
|
+
// sous la bulle pressée. Tout relâchement / cancel / sortie annule
|
|
3580
|
+
// le timer s'il est encore en attente ou efface la meta visible.
|
|
3581
|
+
onPressStart(e) {
|
|
3582
|
+
this.onPressEnd(), this._pressTimer = setTimeout(() => {
|
|
3583
|
+
this._pressTimer = null, this.pressedItemKey = e;
|
|
3584
|
+
}, 400);
|
|
3585
|
+
},
|
|
3586
|
+
onPressEnd() {
|
|
3587
|
+
this._pressTimer && (clearTimeout(this._pressTimer), this._pressTimer = null), this.pressedItemKey !== null && (this.pressedItemKey = null);
|
|
3588
|
+
},
|
|
3589
|
+
timeOf(e) {
|
|
3590
|
+
if (!(e != null && e.created_at)) return "";
|
|
3591
|
+
try {
|
|
3592
|
+
return pe(
|
|
3593
|
+
new Date(e.created_at),
|
|
3594
|
+
re(this.wmLocale())
|
|
3595
|
+
);
|
|
3596
|
+
} catch {
|
|
3597
|
+
return "";
|
|
3598
|
+
}
|
|
3599
|
+
},
|
|
3582
3600
|
lastTimeOf(e) {
|
|
3583
3601
|
const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
|
|
3584
3602
|
if (!(n != null && n.created_at)) return "";
|
|
3585
3603
|
try {
|
|
3586
|
-
return
|
|
3604
|
+
return pe(
|
|
3587
3605
|
new Date(n.created_at),
|
|
3588
|
-
|
|
3606
|
+
re(this.wmLocale())
|
|
3589
3607
|
);
|
|
3590
3608
|
} catch {
|
|
3591
3609
|
return "";
|
|
@@ -3630,7 +3648,7 @@ const cr = {
|
|
|
3630
3648
|
},
|
|
3631
3649
|
systemLabel(e) {
|
|
3632
3650
|
var r, s, a;
|
|
3633
|
-
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n =
|
|
3651
|
+
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = dr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
|
|
3634
3652
|
return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
3635
3653
|
},
|
|
3636
3654
|
scrollToBottom() {
|
|
@@ -3645,152 +3663,172 @@ const cr = {
|
|
|
3645
3663
|
e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
|
|
3646
3664
|
}
|
|
3647
3665
|
}
|
|
3648
|
-
},
|
|
3666
|
+
}, fr = { class: "wm-list__wrap" }, gr = {
|
|
3649
3667
|
key: 0,
|
|
3650
3668
|
class: "wm-list__loadMore",
|
|
3651
3669
|
role: "status",
|
|
3652
3670
|
"aria-live": "polite"
|
|
3653
|
-
},
|
|
3671
|
+
}, _r = { class: "wm-list__loadMore-lbl" }, pr = {
|
|
3654
3672
|
key: 1,
|
|
3655
3673
|
class: "wm-list__historyEnd"
|
|
3656
|
-
},
|
|
3674
|
+
}, vr = {
|
|
3657
3675
|
key: 2,
|
|
3658
3676
|
class: "wm-list__sep"
|
|
3659
|
-
},
|
|
3677
|
+
}, yr = { class: "wm-list__sep-label" }, wr = {
|
|
3660
3678
|
key: 0,
|
|
3661
3679
|
class: "wm-list__sep wm-list__sep--unread"
|
|
3662
|
-
},
|
|
3680
|
+
}, br = { class: "wm-list__sep-label wm-list__sep-label--unread" }, kr = {
|
|
3663
3681
|
key: 0,
|
|
3664
3682
|
class: "wm-list__sysep"
|
|
3665
|
-
},
|
|
3683
|
+
}, Cr = { class: "wm-list__sysep-label" }, Ar = ["data-row-key", "onPointerdown"], Sr = {
|
|
3666
3684
|
key: 0,
|
|
3667
3685
|
class: "wm-list__avatarSlot"
|
|
3668
|
-
},
|
|
3686
|
+
}, Mr = {
|
|
3669
3687
|
key: 5,
|
|
3670
3688
|
class: "wm-list__body"
|
|
3671
|
-
},
|
|
3689
|
+
}, Tr = { key: 0 }, xr = {
|
|
3690
|
+
key: 1,
|
|
3691
|
+
"aria-hidden": "true"
|
|
3692
|
+
}, Or = { key: 2 }, Lr = { key: 0 }, Ir = {
|
|
3672
3693
|
key: 1,
|
|
3673
3694
|
"aria-hidden": "true"
|
|
3674
|
-
},
|
|
3695
|
+
}, Er = { key: 2 }, Br = {
|
|
3675
3696
|
key: 3,
|
|
3676
3697
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3677
|
-
},
|
|
3678
|
-
function
|
|
3679
|
-
const a =
|
|
3680
|
-
return c(), u("div",
|
|
3698
|
+
}, Rr = { class: "wm-list__avatarSlot" }, Nr = ["aria-label", "title"];
|
|
3699
|
+
function Pr(e, t, n, i, r, s) {
|
|
3700
|
+
const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), b = R("Bubble"), T = R("AttachmentPreview"), E = R("Typing");
|
|
3701
|
+
return c(), u("div", fr, [
|
|
3681
3702
|
o("div", {
|
|
3682
3703
|
ref: "scrollEl",
|
|
3683
3704
|
class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
3684
|
-
onScrollPassive: t[
|
|
3705
|
+
onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
|
|
3685
3706
|
}, [
|
|
3686
|
-
n.loadingMore ? (c(), u("div",
|
|
3687
|
-
t[
|
|
3707
|
+
n.loadingMore ? (c(), u("div", gr, [
|
|
3708
|
+
t[6] || (t[6] = o("span", {
|
|
3688
3709
|
class: "wm-list__loadMore-spinner",
|
|
3689
3710
|
"aria-hidden": "true"
|
|
3690
3711
|
}, null, -1)),
|
|
3691
|
-
o("span",
|
|
3692
|
-
])) : s.historyExhausted ? (c(), u("div",
|
|
3693
|
-
n.dateLabel ? (c(), u("div",
|
|
3694
|
-
t[
|
|
3695
|
-
o("span",
|
|
3696
|
-
t[
|
|
3697
|
-
])) :
|
|
3698
|
-
(c(!0), u(
|
|
3712
|
+
o("span", _r, v(s.t("messageList.loadingHistory")), 1)
|
|
3713
|
+
])) : s.historyExhausted ? (c(), u("div", pr, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
|
|
3714
|
+
n.dateLabel ? (c(), u("div", vr, [
|
|
3715
|
+
t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
3716
|
+
o("span", yr, v(n.dateLabel), 1),
|
|
3717
|
+
t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3718
|
+
])) : y("", !0),
|
|
3719
|
+
(c(!0), u(B, null, D(s.groups, (A, H) => (c(), u(B, {
|
|
3699
3720
|
key: A.key
|
|
3700
3721
|
}, [
|
|
3701
|
-
A.key === s.unreadGroupKey ? (c(), u("div",
|
|
3702
|
-
t[
|
|
3703
|
-
o("span",
|
|
3704
|
-
t[
|
|
3705
|
-
])) :
|
|
3722
|
+
A.key === s.unreadGroupKey ? (c(), u("div", wr, [
|
|
3723
|
+
t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
3724
|
+
o("span", br, v(s.t("messageList.unread")), 1),
|
|
3725
|
+
t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
3726
|
+
])) : y("", !0),
|
|
3706
3727
|
A.role === "system" || A.items.length ? (c(), u("div", {
|
|
3707
3728
|
key: 1,
|
|
3708
3729
|
class: O(["wm-list__group", "wm-list__group--" + A.role])
|
|
3709
3730
|
}, [
|
|
3710
|
-
A.role === "system" ? (c(), u("div",
|
|
3711
|
-
t[
|
|
3712
|
-
o("span",
|
|
3713
|
-
t[
|
|
3714
|
-
])) : (c(), u(
|
|
3715
|
-
(c(!0), u(
|
|
3716
|
-
key: `${s.messageKey(
|
|
3717
|
-
"data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3718
|
-
class: O(["wm-list__row fade-up", [
|
|
3719
|
-
"wm-list__row--" + A.role,
|
|
3720
|
-
{
|
|
3721
|
-
"is-pending": M.message._pending,
|
|
3722
|
-
"is-failed": M.message._failed
|
|
3723
|
-
}
|
|
3724
|
-
]]),
|
|
3725
|
-
style: q(s.cornersStyle(A, F))
|
|
3731
|
+
A.role === "system" ? (c(), u("div", kr, [
|
|
3732
|
+
t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
3733
|
+
o("span", Cr, v(A.systemLabel), 1),
|
|
3734
|
+
t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3735
|
+
])) : (c(), u(B, { key: 1 }, [
|
|
3736
|
+
(c(!0), u(B, null, D(A.items, (S, P) => (c(), u(B, {
|
|
3737
|
+
key: `${s.messageKey(S.message)}-${S.partKey}`
|
|
3726
3738
|
}, [
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3739
|
+
o("div", {
|
|
3740
|
+
"data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
|
|
3741
|
+
class: O(["wm-list__row fade-up", [
|
|
3742
|
+
"wm-list__row--" + A.role,
|
|
3743
|
+
{
|
|
3744
|
+
"is-pending": S.message._pending,
|
|
3745
|
+
"is-failed": S.message._failed
|
|
3746
|
+
}
|
|
3747
|
+
]]),
|
|
3748
|
+
style: q(s.cornersStyle(A, P)),
|
|
3749
|
+
onPointerdown: (I) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
|
|
3750
|
+
onPointerup: t[0] || (t[0] = (I) => s.onPressEnd()),
|
|
3751
|
+
onPointercancel: t[1] || (t[1] = (I) => s.onPressEnd()),
|
|
3752
|
+
onPointerleave: t[2] || (t[2] = (I) => s.onPressEnd()),
|
|
3753
|
+
onContextmenu: t[3] || (t[3] = G(() => {
|
|
3754
|
+
}, ["prevent"]))
|
|
3755
|
+
}, [
|
|
3756
|
+
A.role !== "user" ? (c(), u("div", Sr, [
|
|
3757
|
+
P === A.items.length - 1 ? (c(), u(B, { key: 0 }, [
|
|
3758
|
+
A.role === "ai" ? (c(), F(a, {
|
|
3759
|
+
key: 0,
|
|
3760
|
+
size: 26,
|
|
3761
|
+
tail: !0,
|
|
3762
|
+
name: n.aiAgentName,
|
|
3763
|
+
"image-url": n.aiAgentAvatarUrl
|
|
3764
|
+
}, null, 8, ["name", "image-url"])) : (c(), F(l, {
|
|
3765
|
+
key: 1,
|
|
3766
|
+
name: A.agentName,
|
|
3767
|
+
"avatar-url": A.agentAvatarUrl,
|
|
3768
|
+
size: 26,
|
|
3769
|
+
tail: !0
|
|
3770
|
+
}, null, 8, ["name", "avatar-url"]))
|
|
3771
|
+
], 64)) : y("", !0)
|
|
3772
|
+
])) : y("", !0),
|
|
3773
|
+
S.renderAs === "action" ? (c(), F(p, {
|
|
3774
|
+
key: 1,
|
|
3775
|
+
state: S.message.payload.state,
|
|
3776
|
+
label: s.actionLabel(S.message),
|
|
3777
|
+
detail: s.actionDetail(S.message)
|
|
3778
|
+
}, null, 8, ["state", "label", "detail"])) : S.renderAs === "admin-pending" ? (c(), F(p, {
|
|
3779
|
+
key: 2,
|
|
3780
|
+
state: "awaiting",
|
|
3781
|
+
label: s.t("messageList.approvalRequestSent"),
|
|
3782
|
+
detail: S.message.text_md || ""
|
|
3783
|
+
}, null, 8, ["label", "detail"])) : S.renderAs === "artifact-of-action" ? (c(), F(k, {
|
|
3784
|
+
key: 3,
|
|
3785
|
+
artifact: s.actionArtifact(S.message)
|
|
3786
|
+
}, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), F(k, {
|
|
3787
|
+
key: 4,
|
|
3788
|
+
artifact: s.artifactOf(S.message)
|
|
3789
|
+
}, null, 8, ["artifact"])) : (c(), u("div", Mr, [
|
|
3790
|
+
S.message.text_md ? (c(), F(b, {
|
|
3730
3791
|
key: 0,
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
}, null, 8, ["name", "image-url"])) : (c(), U(l, {
|
|
3792
|
+
role: A.role,
|
|
3793
|
+
text: S.message.text_md
|
|
3794
|
+
}, null, 8, ["role", "text"])) : y("", !0),
|
|
3795
|
+
s.attachmentsOf(S.message).length ? (c(), u("div", {
|
|
3736
3796
|
key: 1,
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
artifact: s.artifactOf(M.message)
|
|
3760
|
-
}, null, 8, ["artifact"])) : (c(), u("div", Sr, [
|
|
3761
|
-
M.message.text_md ? (c(), U(w, {
|
|
3762
|
-
key: 0,
|
|
3763
|
-
role: A.role,
|
|
3764
|
-
text: M.message.text_md
|
|
3765
|
-
}, null, 8, ["role", "text"])) : b("", !0),
|
|
3766
|
-
s.attachmentsOf(M.message).length ? (c(), u("div", {
|
|
3767
|
-
key: 1,
|
|
3768
|
-
class: O(["wm-list__atts", {
|
|
3769
|
-
"wm-list__atts--align-end": A.role === "user"
|
|
3770
|
-
}])
|
|
3771
|
-
}, [
|
|
3772
|
-
(c(!0), u(E, null, P(s.attachmentsOf(
|
|
3773
|
-
M.message
|
|
3774
|
-
), (N, D) => (c(), U(T, {
|
|
3775
|
-
key: `${s.messageKey(M.message)}-att-${D}`,
|
|
3776
|
-
attachment: N
|
|
3777
|
-
}, null, 8, ["attachment"]))), 128))
|
|
3778
|
-
], 2)) : b("", !0)
|
|
3779
|
-
]))
|
|
3780
|
-
], 14, Cr))), 128)),
|
|
3797
|
+
class: O(["wm-list__atts", {
|
|
3798
|
+
"wm-list__atts--align-end": A.role === "user"
|
|
3799
|
+
}])
|
|
3800
|
+
}, [
|
|
3801
|
+
(c(!0), u(B, null, D(s.attachmentsOf(
|
|
3802
|
+
S.message
|
|
3803
|
+
), (I, U) => (c(), F(T, {
|
|
3804
|
+
key: `${s.messageKey(S.message)}-att-${U}`,
|
|
3805
|
+
attachment: I
|
|
3806
|
+
}, null, 8, ["attachment"]))), 128))
|
|
3807
|
+
], 2)) : y("", !0)
|
|
3808
|
+
]))
|
|
3809
|
+
], 46, Ar),
|
|
3810
|
+
P < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
|
|
3811
|
+
key: 0,
|
|
3812
|
+
class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
3813
|
+
}, [
|
|
3814
|
+
A.role !== "user" ? (c(), u("span", Tr, v(s.roleLabel(A)), 1)) : y("", !0),
|
|
3815
|
+
A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", xr, "•")) : y("", !0),
|
|
3816
|
+
s.timeOf(S.message) ? (c(), u("span", Or, v(s.timeOf(S.message)), 1)) : y("", !0)
|
|
3817
|
+
], 2)) : y("", !0)
|
|
3818
|
+
], 64))), 128)),
|
|
3781
3819
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
|
|
3782
3820
|
key: 0,
|
|
3783
3821
|
class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
3784
3822
|
}, [
|
|
3785
|
-
A.role !== "user" ? (c(), u("span",
|
|
3786
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span",
|
|
3787
|
-
s.lastTimeOf(A) ? (c(), u("span",
|
|
3788
|
-
], 2)) :
|
|
3823
|
+
A.role !== "user" ? (c(), u("span", Lr, v(s.roleLabel(A)), 1)) : y("", !0),
|
|
3824
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Ir, "•")) : y("", !0),
|
|
3825
|
+
s.lastTimeOf(A) ? (c(), u("span", Er, v(s.lastTimeOf(A)), 1)) : y("", !0)
|
|
3826
|
+
], 2)) : y("", !0)
|
|
3789
3827
|
], 64))
|
|
3790
|
-
], 2)) :
|
|
3828
|
+
], 2)) : y("", !0)
|
|
3791
3829
|
], 64))), 128)),
|
|
3792
|
-
n.streamingActive ? (c(), u("div",
|
|
3793
|
-
o("div",
|
|
3830
|
+
n.streamingActive ? (c(), u("div", Br, [
|
|
3831
|
+
o("div", Rr, [
|
|
3794
3832
|
$(a, {
|
|
3795
3833
|
size: 26,
|
|
3796
3834
|
tail: !0,
|
|
@@ -3798,19 +3836,19 @@ function Er(e, t, n, i, r, s) {
|
|
|
3798
3836
|
"image-url": n.aiAgentAvatarUrl
|
|
3799
3837
|
}, null, 8, ["name", "image-url"])
|
|
3800
3838
|
]),
|
|
3801
|
-
$(
|
|
3802
|
-
])) :
|
|
3839
|
+
$(E)
|
|
3840
|
+
])) : y("", !0)
|
|
3803
3841
|
], 34),
|
|
3804
|
-
$(
|
|
3805
|
-
default:
|
|
3842
|
+
$(Ie, { name: "wm-scrollDown" }, {
|
|
3843
|
+
default: Ee(() => [
|
|
3806
3844
|
r.showScrollDown ? (c(), u("button", {
|
|
3807
3845
|
key: 0,
|
|
3808
3846
|
type: "button",
|
|
3809
3847
|
class: "wm-list__scrollDown",
|
|
3810
3848
|
"aria-label": s.t("messageList.scrollToBottom"),
|
|
3811
3849
|
title: s.t("messageList.scrollToBottom"),
|
|
3812
|
-
onClick: t[
|
|
3813
|
-
}, [...t[
|
|
3850
|
+
onClick: t[5] || (t[5] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
|
|
3851
|
+
}, [...t[13] || (t[13] = [
|
|
3814
3852
|
o("svg", {
|
|
3815
3853
|
width: "14",
|
|
3816
3854
|
height: "14",
|
|
@@ -3824,15 +3862,15 @@ function Er(e, t, n, i, r, s) {
|
|
|
3824
3862
|
}, [
|
|
3825
3863
|
o("path", { d: "M6 9l6 6 6-6" })
|
|
3826
3864
|
], -1)
|
|
3827
|
-
])], 8,
|
|
3865
|
+
])], 8, Nr)) : y("", !0)
|
|
3828
3866
|
]),
|
|
3829
3867
|
_: 1
|
|
3830
3868
|
})
|
|
3831
3869
|
]);
|
|
3832
3870
|
}
|
|
3833
|
-
const
|
|
3834
|
-
function
|
|
3835
|
-
return
|
|
3871
|
+
const Fr = /* @__PURE__ */ N(mr, [["render", Pr], ["__scopeId", "data-v-cf20685c"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ke = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
3872
|
+
function Ur() {
|
|
3873
|
+
return ke && [
|
|
3836
3874
|
"video/webm;codecs=vp9,opus",
|
|
3837
3875
|
"video/webm;codecs=vp8,opus",
|
|
3838
3876
|
"video/webm",
|
|
@@ -3842,7 +3880,7 @@ function Rr() {
|
|
|
3842
3880
|
return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
|
|
3843
3881
|
}) || "";
|
|
3844
3882
|
}
|
|
3845
|
-
function
|
|
3883
|
+
function Pe({ audio: e }) {
|
|
3846
3884
|
return {
|
|
3847
3885
|
video: !0,
|
|
3848
3886
|
audio: !!e,
|
|
@@ -3851,21 +3889,21 @@ function Fe({ audio: e }) {
|
|
|
3851
3889
|
systemAudio: e ? "include" : "exclude"
|
|
3852
3890
|
};
|
|
3853
3891
|
}
|
|
3854
|
-
function
|
|
3892
|
+
function Va(e) {
|
|
3855
3893
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
3856
3894
|
}
|
|
3857
|
-
async function
|
|
3895
|
+
async function Dr() {
|
|
3858
3896
|
if (!he) return null;
|
|
3859
3897
|
let e;
|
|
3860
3898
|
try {
|
|
3861
3899
|
e = await navigator.mediaDevices.getDisplayMedia(
|
|
3862
|
-
|
|
3900
|
+
Pe({ audio: !1 })
|
|
3863
3901
|
);
|
|
3864
3902
|
} catch (t) {
|
|
3865
3903
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
3866
3904
|
}
|
|
3867
3905
|
try {
|
|
3868
|
-
return await
|
|
3906
|
+
return await jr(e);
|
|
3869
3907
|
} catch (t) {
|
|
3870
3908
|
return console.error("[media] screenshot capture", t), null;
|
|
3871
3909
|
} finally {
|
|
@@ -3874,7 +3912,7 @@ async function Nr() {
|
|
|
3874
3912
|
});
|
|
3875
3913
|
}
|
|
3876
3914
|
}
|
|
3877
|
-
async function
|
|
3915
|
+
async function jr(e) {
|
|
3878
3916
|
const t = document.createElement("video");
|
|
3879
3917
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
3880
3918
|
const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -3887,64 +3925,64 @@ async function Fr(e) {
|
|
|
3887
3925
|
}), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
3888
3926
|
return new File([s], `capture-${a}.png`, { type: "image/png" });
|
|
3889
3927
|
}
|
|
3890
|
-
async function
|
|
3928
|
+
async function Hr(e = {}) {
|
|
3891
3929
|
var k;
|
|
3892
|
-
if (!he || !
|
|
3930
|
+
if (!he || !ke) return null;
|
|
3893
3931
|
let t;
|
|
3894
3932
|
try {
|
|
3895
3933
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
3896
|
-
|
|
3934
|
+
Pe({ audio: !0 })
|
|
3897
3935
|
);
|
|
3898
|
-
} catch (
|
|
3899
|
-
return (
|
|
3936
|
+
} catch (b) {
|
|
3937
|
+
return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
|
|
3900
3938
|
}
|
|
3901
|
-
const n =
|
|
3939
|
+
const n = Ur();
|
|
3902
3940
|
let i;
|
|
3903
3941
|
try {
|
|
3904
3942
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
3905
|
-
} catch (
|
|
3906
|
-
return console.error("[media] recorder init",
|
|
3943
|
+
} catch (b) {
|
|
3944
|
+
return console.error("[media] recorder init", b), t.getTracks().forEach((T) => {
|
|
3907
3945
|
T.stop();
|
|
3908
3946
|
}), null;
|
|
3909
3947
|
}
|
|
3910
3948
|
const r = [];
|
|
3911
3949
|
let s = null, a = !1;
|
|
3912
|
-
i.addEventListener("dataavailable", (
|
|
3913
|
-
|
|
3950
|
+
i.addEventListener("dataavailable", (b) => {
|
|
3951
|
+
b.data && b.data.size > 0 && r.push(b.data);
|
|
3914
3952
|
}), i.addEventListener("stop", () => {
|
|
3915
|
-
var
|
|
3916
|
-
if (s && clearInterval(s), t.getTracks().forEach((
|
|
3917
|
-
|
|
3953
|
+
var b, T;
|
|
3954
|
+
if (s && clearInterval(s), t.getTracks().forEach((E) => {
|
|
3955
|
+
E.stop();
|
|
3918
3956
|
}), r.length) {
|
|
3919
|
-
const
|
|
3920
|
-
type:
|
|
3957
|
+
const E = i.mimeType || n || "video/webm", A = new Blob(r, { type: E }), H = /mp4/.test(E) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), P = new File([A], `ecran-${S}.${H}`, {
|
|
3958
|
+
type: E
|
|
3921
3959
|
});
|
|
3922
|
-
(
|
|
3960
|
+
(b = e.onfinalize) == null || b.call(e, P);
|
|
3923
3961
|
} else
|
|
3924
3962
|
(T = e.oncancel) == null || T.call(e);
|
|
3925
|
-
}), t.getVideoTracks().forEach((
|
|
3926
|
-
|
|
3963
|
+
}), t.getVideoTracks().forEach((b) => {
|
|
3964
|
+
b.addEventListener("ended", () => l(), { once: !0 });
|
|
3927
3965
|
});
|
|
3928
3966
|
function l() {
|
|
3929
3967
|
if (!a && (a = !0, i.state !== "inactive"))
|
|
3930
3968
|
try {
|
|
3931
3969
|
i.stop();
|
|
3932
|
-
} catch (
|
|
3933
|
-
console.error("[media] recorder stop",
|
|
3970
|
+
} catch (b) {
|
|
3971
|
+
console.error("[media] recorder stop", b);
|
|
3934
3972
|
}
|
|
3935
3973
|
}
|
|
3936
3974
|
try {
|
|
3937
3975
|
i.start(1e3);
|
|
3938
|
-
} catch (
|
|
3939
|
-
return console.error("[media] recorder start",
|
|
3976
|
+
} catch (b) {
|
|
3977
|
+
return console.error("[media] recorder start", b), t.getTracks().forEach((T) => {
|
|
3940
3978
|
T.stop();
|
|
3941
3979
|
}), null;
|
|
3942
3980
|
}
|
|
3943
3981
|
(k = e.onstart) == null || k.call(e);
|
|
3944
3982
|
const p = Date.now();
|
|
3945
3983
|
return s = setInterval(() => {
|
|
3946
|
-
var
|
|
3947
|
-
(
|
|
3984
|
+
var b;
|
|
3985
|
+
(b = e.ontick) == null || b.call(e, Date.now() - p);
|
|
3948
3986
|
}, 500), {
|
|
3949
3987
|
stop: l,
|
|
3950
3988
|
get state() {
|
|
@@ -3952,7 +3990,7 @@ async function Ur(e = {}) {
|
|
|
3952
3990
|
}
|
|
3953
3991
|
};
|
|
3954
3992
|
}
|
|
3955
|
-
const
|
|
3993
|
+
const zr = [
|
|
3956
3994
|
{
|
|
3957
3995
|
action: "file",
|
|
3958
3996
|
labelKey: "composer.attachFile",
|
|
@@ -3968,7 +4006,7 @@ const Dr = [
|
|
|
3968
4006
|
labelKey: "composer.recordScreen",
|
|
3969
4007
|
path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
|
|
3970
4008
|
}
|
|
3971
|
-
],
|
|
4009
|
+
], qr = {
|
|
3972
4010
|
name: "WmComposer",
|
|
3973
4011
|
inject: {
|
|
3974
4012
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4002,10 +4040,10 @@ const Dr = [
|
|
|
4002
4040
|
return !this.disabled && !!this.local.trim();
|
|
4003
4041
|
},
|
|
4004
4042
|
attachItems() {
|
|
4005
|
-
return
|
|
4043
|
+
return zr.map((e) => ({
|
|
4006
4044
|
...e,
|
|
4007
4045
|
label: this.t(e.labelKey),
|
|
4008
|
-
disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !
|
|
4046
|
+
disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !ke)
|
|
4009
4047
|
}));
|
|
4010
4048
|
},
|
|
4011
4049
|
recordingElapsedLabel() {
|
|
@@ -4076,13 +4114,13 @@ const Dr = [
|
|
|
4076
4114
|
},
|
|
4077
4115
|
async captureScreenshot() {
|
|
4078
4116
|
if (this.disabled) return;
|
|
4079
|
-
const e = await
|
|
4117
|
+
const e = await Dr();
|
|
4080
4118
|
e && this.$emit("attach", e);
|
|
4081
4119
|
},
|
|
4082
4120
|
async startRecording() {
|
|
4083
4121
|
if (this.recording || this.disabled) return;
|
|
4084
4122
|
this.recordingElapsed = 0;
|
|
4085
|
-
const e = await
|
|
4123
|
+
const e = await Hr({
|
|
4086
4124
|
onstart: () => {
|
|
4087
4125
|
this.recording = !0;
|
|
4088
4126
|
},
|
|
@@ -4124,39 +4162,39 @@ const Dr = [
|
|
|
4124
4162
|
!e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
|
|
4125
4163
|
}
|
|
4126
4164
|
}
|
|
4127
|
-
},
|
|
4165
|
+
}, $r = {
|
|
4128
4166
|
key: 0,
|
|
4129
4167
|
class: "wm-rec"
|
|
4130
|
-
},
|
|
4168
|
+
}, Kr = { class: "wm-rec__lbl" }, Vr = {
|
|
4131
4169
|
key: 1,
|
|
4132
4170
|
class: "wm-compose__menu",
|
|
4133
4171
|
role: "menu"
|
|
4134
|
-
},
|
|
4172
|
+
}, Wr = ["disabled", "onClick"], Gr = { class: "wm-compose__menuIcon" }, Yr = {
|
|
4135
4173
|
viewBox: "0 0 24 24",
|
|
4136
4174
|
width: "14",
|
|
4137
4175
|
height: "14",
|
|
4138
4176
|
"aria-hidden": "true"
|
|
4139
|
-
},
|
|
4140
|
-
function
|
|
4177
|
+
}, Jr = ["d"], Qr = ["placeholder", "disabled"], Xr = { class: "wm-compose__actions" }, Zr = ["title", "aria-label", "disabled"], ei = ["disabled", "aria-label"];
|
|
4178
|
+
function ti(e, t, n, i, r, s) {
|
|
4141
4179
|
return c(), u("div", {
|
|
4142
4180
|
class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
|
|
4143
4181
|
style: q(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
|
|
4144
4182
|
}, [
|
|
4145
|
-
r.recording ? (c(), u("div",
|
|
4183
|
+
r.recording ? (c(), u("div", $r, [
|
|
4146
4184
|
t[8] || (t[8] = o("span", {
|
|
4147
4185
|
class: "wm-rec__dot",
|
|
4148
4186
|
"aria-hidden": "true"
|
|
4149
4187
|
}, null, -1)),
|
|
4150
|
-
o("span",
|
|
4188
|
+
o("span", Kr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
|
|
4151
4189
|
o("button", {
|
|
4152
4190
|
type: "button",
|
|
4153
4191
|
class: "wm-rec__stop",
|
|
4154
4192
|
onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
|
|
4155
4193
|
}, v(s.t("composer.stop")), 1)
|
|
4156
|
-
])) :
|
|
4194
|
+
])) : y("", !0),
|
|
4157
4195
|
o("form", {
|
|
4158
4196
|
class: O(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
4159
|
-
onSubmit: t[7] || (t[7] =
|
|
4197
|
+
onSubmit: t[7] || (t[7] = G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
|
|
4160
4198
|
}, [
|
|
4161
4199
|
o("input", {
|
|
4162
4200
|
ref: "fileEl",
|
|
@@ -4169,17 +4207,17 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4169
4207
|
key: 0,
|
|
4170
4208
|
class: "wm-compose__overlay",
|
|
4171
4209
|
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
4172
|
-
})) :
|
|
4173
|
-
r.attachOpen ? (c(), u("div",
|
|
4174
|
-
(c(!0), u(
|
|
4210
|
+
})) : y("", !0),
|
|
4211
|
+
r.attachOpen ? (c(), u("div", Vr, [
|
|
4212
|
+
(c(!0), u(B, null, D(s.attachItems, (a) => (c(), u("button", {
|
|
4175
4213
|
key: a.action,
|
|
4176
4214
|
type: "button",
|
|
4177
4215
|
class: "wm-compose__menuItem",
|
|
4178
4216
|
disabled: a.disabled,
|
|
4179
4217
|
onClick: (l) => s.onAttachAction(a.action)
|
|
4180
4218
|
}, [
|
|
4181
|
-
o("span",
|
|
4182
|
-
(c(), u("svg",
|
|
4219
|
+
o("span", Gr, [
|
|
4220
|
+
(c(), u("svg", Yr, [
|
|
4183
4221
|
o("path", {
|
|
4184
4222
|
d: a.path,
|
|
4185
4223
|
stroke: "currentColor",
|
|
@@ -4187,13 +4225,13 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4187
4225
|
"stroke-linecap": "round",
|
|
4188
4226
|
"stroke-linejoin": "round",
|
|
4189
4227
|
fill: "none"
|
|
4190
|
-
}, null, 8,
|
|
4228
|
+
}, null, 8, Jr)
|
|
4191
4229
|
]))
|
|
4192
4230
|
]),
|
|
4193
4231
|
o("span", null, v(a.label), 1)
|
|
4194
|
-
], 8,
|
|
4195
|
-
])) :
|
|
4196
|
-
|
|
4232
|
+
], 8, Wr))), 128))
|
|
4233
|
+
])) : y("", !0),
|
|
4234
|
+
V(o("textarea", {
|
|
4197
4235
|
ref: "inputEl",
|
|
4198
4236
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
|
|
4199
4237
|
class: "wm-compose__input",
|
|
@@ -4202,10 +4240,10 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4202
4240
|
disabled: n.disabled,
|
|
4203
4241
|
onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
|
|
4204
4242
|
onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
|
|
4205
|
-
}, null, 40,
|
|
4243
|
+
}, null, 40, Qr), [
|
|
4206
4244
|
[X, r.local]
|
|
4207
4245
|
]),
|
|
4208
|
-
o("div",
|
|
4246
|
+
o("div", Xr, [
|
|
4209
4247
|
o("button", {
|
|
4210
4248
|
type: "button",
|
|
4211
4249
|
class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -4227,7 +4265,7 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4227
4265
|
}, [
|
|
4228
4266
|
o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
|
|
4229
4267
|
], -1)
|
|
4230
|
-
])], 10,
|
|
4268
|
+
])], 10, Zr),
|
|
4231
4269
|
o("button", {
|
|
4232
4270
|
type: "submit",
|
|
4233
4271
|
class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -4247,12 +4285,12 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4247
4285
|
}, [
|
|
4248
4286
|
o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4249
4287
|
], -1)
|
|
4250
|
-
])], 10,
|
|
4288
|
+
])], 10, ei)
|
|
4251
4289
|
])
|
|
4252
4290
|
], 34)
|
|
4253
4291
|
], 6);
|
|
4254
4292
|
}
|
|
4255
|
-
const
|
|
4293
|
+
const ni = /* @__PURE__ */ N(qr, [["render", ti], ["__scopeId", "data-v-01e81a27"]]), si = {
|
|
4256
4294
|
name: "WmSuggestionChips",
|
|
4257
4295
|
props: {
|
|
4258
4296
|
items: { type: Array, default: () => [] },
|
|
@@ -4269,22 +4307,22 @@ const Xr = /* @__PURE__ */ R(Pr, [["render", Qr], ["__scopeId", "data-v-01e81a27
|
|
|
4269
4307
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4270
4308
|
}
|
|
4271
4309
|
}
|
|
4272
|
-
},
|
|
4273
|
-
function
|
|
4310
|
+
}, ri = ["onClick"];
|
|
4311
|
+
function ii(e, t, n, i, r, s) {
|
|
4274
4312
|
return n.items.length ? (c(), u("div", {
|
|
4275
4313
|
key: s.batchKey,
|
|
4276
4314
|
class: "wm-chips"
|
|
4277
4315
|
}, [
|
|
4278
|
-
(c(!0), u(
|
|
4316
|
+
(c(!0), u(B, null, D(n.items, (a, l) => (c(), u("button", {
|
|
4279
4317
|
key: l,
|
|
4280
4318
|
type: "button",
|
|
4281
4319
|
class: "wm-chip",
|
|
4282
4320
|
style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4283
4321
|
onClick: (p) => e.$emit("select", a)
|
|
4284
|
-
}, v(a.label), 13,
|
|
4285
|
-
])) :
|
|
4322
|
+
}, v(a.label), 13, ri))), 128))
|
|
4323
|
+
])) : y("", !0);
|
|
4286
4324
|
}
|
|
4287
|
-
const
|
|
4325
|
+
const ai = /* @__PURE__ */ N(si, [["render", ii], ["__scopeId", "data-v-47ad8085"]]), oi = {
|
|
4288
4326
|
name: "WmApprovalCard",
|
|
4289
4327
|
components: { AIAvatar: le },
|
|
4290
4328
|
inject: {
|
|
@@ -4328,45 +4366,45 @@ const ni = /* @__PURE__ */ R(Zr, [["render", ti], ["__scopeId", "data-v-47ad8085
|
|
|
4328
4366
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4329
4367
|
}
|
|
4330
4368
|
}
|
|
4331
|
-
},
|
|
4369
|
+
}, li = { class: "wm-approval" }, ci = { class: "wm-approval__head" }, di = { class: "wm-approval__icon" }, ui = { class: "wm-approval__main" }, hi = { class: "wm-approval__title" }, mi = {
|
|
4332
4370
|
key: 0,
|
|
4333
4371
|
class: "wm-approval__detail"
|
|
4334
|
-
},
|
|
4335
|
-
function
|
|
4336
|
-
const a =
|
|
4337
|
-
return c(), u("div",
|
|
4338
|
-
o("div",
|
|
4339
|
-
o("div",
|
|
4372
|
+
}, fi = { class: "wm-approval__actions" };
|
|
4373
|
+
function gi(e, t, n, i, r, s) {
|
|
4374
|
+
const a = R("AIAvatar");
|
|
4375
|
+
return c(), u("div", li, [
|
|
4376
|
+
o("div", ci, [
|
|
4377
|
+
o("div", di, [
|
|
4340
4378
|
$(a, {
|
|
4341
4379
|
size: 24,
|
|
4342
4380
|
name: n.agentName,
|
|
4343
4381
|
"image-url": n.agentAvatarUrl
|
|
4344
4382
|
}, null, 8, ["name", "image-url"])
|
|
4345
4383
|
]),
|
|
4346
|
-
o("div",
|
|
4347
|
-
o("div",
|
|
4348
|
-
n.detail ? (c(), u("div",
|
|
4384
|
+
o("div", ui, [
|
|
4385
|
+
o("div", hi, v(n.action), 1),
|
|
4386
|
+
n.detail ? (c(), u("div", mi, v(n.detail), 1)) : y("", !0)
|
|
4349
4387
|
])
|
|
4350
4388
|
]),
|
|
4351
|
-
o("div",
|
|
4389
|
+
o("div", fi, [
|
|
4352
4390
|
s.rejectId ? (c(), u("button", {
|
|
4353
4391
|
key: 0,
|
|
4354
4392
|
type: "button",
|
|
4355
4393
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
4356
4394
|
onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
|
|
4357
|
-
}, v(s.rejectLabel), 1)) :
|
|
4395
|
+
}, v(s.rejectLabel), 1)) : y("", !0),
|
|
4358
4396
|
s.approveId ? (c(), u("button", {
|
|
4359
4397
|
key: 1,
|
|
4360
4398
|
type: "button",
|
|
4361
4399
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
4362
4400
|
onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
|
|
4363
|
-
}, v(s.approveLabel), 1)) :
|
|
4401
|
+
}, v(s.approveLabel), 1)) : y("", !0)
|
|
4364
4402
|
])
|
|
4365
4403
|
]);
|
|
4366
4404
|
}
|
|
4367
|
-
const
|
|
4368
|
-
let
|
|
4369
|
-
const
|
|
4405
|
+
const _i = /* @__PURE__ */ N(oi, [["render", gi], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4406
|
+
let Oe = 0;
|
|
4407
|
+
const pi = /* @__PURE__ */ new Set([
|
|
4370
4408
|
"text",
|
|
4371
4409
|
"textarea",
|
|
4372
4410
|
"number",
|
|
@@ -4374,7 +4412,7 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
4374
4412
|
"select",
|
|
4375
4413
|
"multiselect",
|
|
4376
4414
|
"date"
|
|
4377
|
-
]),
|
|
4415
|
+
]), vi = {
|
|
4378
4416
|
name: "WmFormCard",
|
|
4379
4417
|
components: { AIAvatar: le },
|
|
4380
4418
|
inject: {
|
|
@@ -4391,8 +4429,8 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
4391
4429
|
},
|
|
4392
4430
|
emits: ["submit"],
|
|
4393
4431
|
data() {
|
|
4394
|
-
return
|
|
4395
|
-
_uid:
|
|
4432
|
+
return Oe += 1, {
|
|
4433
|
+
_uid: Oe,
|
|
4396
4434
|
values: {},
|
|
4397
4435
|
busy: !1,
|
|
4398
4436
|
error: ""
|
|
@@ -4404,7 +4442,7 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
4404
4442
|
// douteux.
|
|
4405
4443
|
normalizedFields() {
|
|
4406
4444
|
var t;
|
|
4407
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
4445
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !pi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
4408
4446
|
}
|
|
4409
4447
|
},
|
|
4410
4448
|
created() {
|
|
@@ -4457,54 +4495,54 @@ const mi = /* @__PURE__ */ new Set([
|
|
|
4457
4495
|
}
|
|
4458
4496
|
}
|
|
4459
4497
|
}
|
|
4460
|
-
},
|
|
4498
|
+
}, yi = { class: "wm-form" }, wi = { class: "wm-form__head" }, bi = { class: "wm-form__icon" }, ki = { class: "wm-form__main" }, Ci = { class: "wm-form__title" }, Ai = {
|
|
4461
4499
|
key: 0,
|
|
4462
4500
|
class: "wm-form__detail"
|
|
4463
|
-
},
|
|
4501
|
+
}, Si = ["for"], Mi = {
|
|
4464
4502
|
key: 0,
|
|
4465
4503
|
class: "wm-form__req",
|
|
4466
4504
|
"aria-hidden": "true"
|
|
4467
|
-
},
|
|
4505
|
+
}, Ti = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], xi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Oi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Li = ["id", "onUpdate:modelValue", "required", "disabled"], Ii = {
|
|
4468
4506
|
key: 4,
|
|
4469
4507
|
class: "wm-form__bool"
|
|
4470
|
-
},
|
|
4508
|
+
}, Ei = ["id", "onUpdate:modelValue", "disabled"], Bi = ["id", "onUpdate:modelValue", "required", "disabled"], Ri = {
|
|
4471
4509
|
value: "",
|
|
4472
4510
|
disabled: ""
|
|
4473
|
-
},
|
|
4511
|
+
}, Ni = ["value"], Pi = {
|
|
4474
4512
|
key: 6,
|
|
4475
4513
|
class: "wm-form__multi"
|
|
4476
|
-
},
|
|
4514
|
+
}, Fi = ["value", "checked", "disabled", "onChange"], Ui = {
|
|
4477
4515
|
key: 0,
|
|
4478
4516
|
class: "wm-form__err"
|
|
4479
|
-
},
|
|
4517
|
+
}, Di = ["disabled"], ji = {
|
|
4480
4518
|
key: 0,
|
|
4481
4519
|
class: "wm-form__spinner",
|
|
4482
4520
|
"aria-hidden": "true"
|
|
4483
|
-
},
|
|
4521
|
+
}, Hi = {
|
|
4484
4522
|
key: 2,
|
|
4485
4523
|
class: "wm-form__doneLbl"
|
|
4486
4524
|
};
|
|
4487
|
-
function
|
|
4488
|
-
const a =
|
|
4489
|
-
return c(), u("div",
|
|
4490
|
-
o("div",
|
|
4491
|
-
o("div",
|
|
4525
|
+
function zi(e, t, n, i, r, s) {
|
|
4526
|
+
const a = R("AIAvatar");
|
|
4527
|
+
return c(), u("div", yi, [
|
|
4528
|
+
o("div", wi, [
|
|
4529
|
+
o("div", bi, [
|
|
4492
4530
|
$(a, {
|
|
4493
4531
|
size: 24,
|
|
4494
4532
|
name: n.agentName,
|
|
4495
4533
|
"image-url": n.agentAvatarUrl
|
|
4496
4534
|
}, null, 8, ["name", "image-url"])
|
|
4497
4535
|
]),
|
|
4498
|
-
o("div",
|
|
4499
|
-
o("div",
|
|
4500
|
-
n.form.description ? (c(), u("div",
|
|
4536
|
+
o("div", ki, [
|
|
4537
|
+
o("div", Ci, v(n.form.title || s.t("form.title")), 1),
|
|
4538
|
+
n.form.description ? (c(), u("div", Ai, v(n.form.description), 1)) : y("", !0)
|
|
4501
4539
|
])
|
|
4502
4540
|
]),
|
|
4503
4541
|
o("form", {
|
|
4504
4542
|
class: "wm-form__body",
|
|
4505
|
-
onSubmit: t[0] || (t[0] =
|
|
4543
|
+
onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4506
4544
|
}, [
|
|
4507
|
-
(c(!0), u(
|
|
4545
|
+
(c(!0), u(B, null, D(s.normalizedFields, (l) => (c(), u("div", {
|
|
4508
4546
|
key: l.key,
|
|
4509
4547
|
class: "wm-form__field"
|
|
4510
4548
|
}, [
|
|
@@ -4512,10 +4550,10 @@ function Di(e, t, n, i, r, s) {
|
|
|
4512
4550
|
for: `wm-f-${r._uid}-${l.key}`,
|
|
4513
4551
|
class: "wm-form__label"
|
|
4514
4552
|
}, [
|
|
4515
|
-
|
|
4516
|
-
l.required ? (c(), u("span",
|
|
4517
|
-
], 8,
|
|
4518
|
-
l.type === "text" ?
|
|
4553
|
+
ve(v(l.label), 1),
|
|
4554
|
+
l.required ? (c(), u("span", Mi, "*")) : y("", !0)
|
|
4555
|
+
], 8, Si),
|
|
4556
|
+
l.type === "text" ? V((c(), u("input", {
|
|
4519
4557
|
key: 0,
|
|
4520
4558
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4521
4559
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4524,9 +4562,9 @@ function Di(e, t, n, i, r, s) {
|
|
|
4524
4562
|
placeholder: l.placeholder || "",
|
|
4525
4563
|
required: l.required,
|
|
4526
4564
|
disabled: n.readOnly || r.busy
|
|
4527
|
-
}, null, 8,
|
|
4565
|
+
}, null, 8, Ti)), [
|
|
4528
4566
|
[X, r.values[l.key]]
|
|
4529
|
-
]) : l.type === "textarea" ?
|
|
4567
|
+
]) : l.type === "textarea" ? V((c(), u("textarea", {
|
|
4530
4568
|
key: 1,
|
|
4531
4569
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4532
4570
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4535,9 +4573,9 @@ function Di(e, t, n, i, r, s) {
|
|
|
4535
4573
|
placeholder: l.placeholder || "",
|
|
4536
4574
|
required: l.required,
|
|
4537
4575
|
disabled: n.readOnly || r.busy
|
|
4538
|
-
}, null, 8,
|
|
4576
|
+
}, null, 8, xi)), [
|
|
4539
4577
|
[X, r.values[l.key]]
|
|
4540
|
-
]) : l.type === "number" ?
|
|
4578
|
+
]) : l.type === "number" ? V((c(), u("input", {
|
|
4541
4579
|
key: 2,
|
|
4542
4580
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4543
4581
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4546,14 +4584,14 @@ function Di(e, t, n, i, r, s) {
|
|
|
4546
4584
|
placeholder: l.placeholder || "",
|
|
4547
4585
|
required: l.required,
|
|
4548
4586
|
disabled: n.readOnly || r.busy
|
|
4549
|
-
}, null, 8,
|
|
4587
|
+
}, null, 8, Oi)), [
|
|
4550
4588
|
[
|
|
4551
4589
|
X,
|
|
4552
4590
|
r.values[l.key],
|
|
4553
4591
|
void 0,
|
|
4554
4592
|
{ number: !0 }
|
|
4555
4593
|
]
|
|
4556
|
-
]) : l.type === "date" ?
|
|
4594
|
+
]) : l.type === "date" ? V((c(), u("input", {
|
|
4557
4595
|
key: 3,
|
|
4558
4596
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4559
4597
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4561,19 +4599,19 @@ function Di(e, t, n, i, r, s) {
|
|
|
4561
4599
|
class: "wm-form__input",
|
|
4562
4600
|
required: l.required,
|
|
4563
4601
|
disabled: n.readOnly || r.busy
|
|
4564
|
-
}, null, 8,
|
|
4602
|
+
}, null, 8, Li)), [
|
|
4565
4603
|
[X, r.values[l.key]]
|
|
4566
|
-
]) : l.type === "boolean" ? (c(), u("label",
|
|
4567
|
-
|
|
4604
|
+
]) : l.type === "boolean" ? (c(), u("label", Ii, [
|
|
4605
|
+
V(o("input", {
|
|
4568
4606
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4569
4607
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4570
4608
|
type: "checkbox",
|
|
4571
4609
|
disabled: n.readOnly || r.busy
|
|
4572
|
-
}, null, 8,
|
|
4610
|
+
}, null, 8, Ei), [
|
|
4573
4611
|
[He, r.values[l.key]]
|
|
4574
4612
|
]),
|
|
4575
4613
|
o("span", null, v(l.placeholder || s.t("common.yes")), 1)
|
|
4576
|
-
])) : l.type === "select" ?
|
|
4614
|
+
])) : l.type === "select" ? V((c(), u("select", {
|
|
4577
4615
|
key: 5,
|
|
4578
4616
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4579
4617
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4581,15 +4619,15 @@ function Di(e, t, n, i, r, s) {
|
|
|
4581
4619
|
required: l.required,
|
|
4582
4620
|
disabled: n.readOnly || r.busy
|
|
4583
4621
|
}, [
|
|
4584
|
-
o("option",
|
|
4585
|
-
(c(!0), u(
|
|
4622
|
+
o("option", Ri, v(l.placeholder || s.t("form.choose")), 1),
|
|
4623
|
+
(c(!0), u(B, null, D(l.options, (p) => (c(), u("option", {
|
|
4586
4624
|
key: p.value,
|
|
4587
4625
|
value: p.value
|
|
4588
|
-
}, v(p.label), 9,
|
|
4589
|
-
], 8,
|
|
4626
|
+
}, v(p.label), 9, Ni))), 128))
|
|
4627
|
+
], 8, Bi)), [
|
|
4590
4628
|
[ze, r.values[l.key]]
|
|
4591
|
-
]) : l.type === "multiselect" ? (c(), u("div",
|
|
4592
|
-
(c(!0), u(
|
|
4629
|
+
]) : l.type === "multiselect" ? (c(), u("div", Pi, [
|
|
4630
|
+
(c(!0), u(B, null, D(l.options, (p) => (c(), u("label", {
|
|
4593
4631
|
key: p.value,
|
|
4594
4632
|
class: "wm-form__multiItem"
|
|
4595
4633
|
}, [
|
|
@@ -4603,25 +4641,25 @@ function Di(e, t, n, i, r, s) {
|
|
|
4603
4641
|
p.value,
|
|
4604
4642
|
k.target.checked
|
|
4605
4643
|
)
|
|
4606
|
-
}, null, 40,
|
|
4644
|
+
}, null, 40, Fi),
|
|
4607
4645
|
o("span", null, v(p.label), 1)
|
|
4608
4646
|
]))), 128))
|
|
4609
|
-
])) :
|
|
4647
|
+
])) : y("", !0)
|
|
4610
4648
|
]))), 128)),
|
|
4611
|
-
r.error ? (c(), u("div",
|
|
4612
|
-
n.readOnly ? (c(), u("div",
|
|
4649
|
+
r.error ? (c(), u("div", Ui, v(r.error), 1)) : y("", !0),
|
|
4650
|
+
n.readOnly ? (c(), u("div", Hi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4613
4651
|
key: 1,
|
|
4614
4652
|
type: "submit",
|
|
4615
4653
|
class: "wm-form__submit",
|
|
4616
4654
|
disabled: r.busy
|
|
4617
4655
|
}, [
|
|
4618
|
-
r.busy ? (c(), u("span",
|
|
4656
|
+
r.busy ? (c(), u("span", ji)) : y("", !0),
|
|
4619
4657
|
o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4620
|
-
], 8,
|
|
4658
|
+
], 8, Di))
|
|
4621
4659
|
], 32)
|
|
4622
4660
|
]);
|
|
4623
4661
|
}
|
|
4624
|
-
const
|
|
4662
|
+
const qi = /* @__PURE__ */ N(vi, [["render", zi], ["__scopeId", "data-v-fe65cc56"]]), $i = {
|
|
4625
4663
|
name: "WmFeedback",
|
|
4626
4664
|
inject: {
|
|
4627
4665
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4655,13 +4693,13 @@ const Pi = /* @__PURE__ */ R(fi, [["render", Di], ["__scopeId", "data-v-fe65cc56
|
|
|
4655
4693
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4656
4694
|
}
|
|
4657
4695
|
}
|
|
4658
|
-
},
|
|
4696
|
+
}, Ki = { class: "wm-fb" }, Vi = { class: "wm-fb__title" }, Wi = { class: "wm-fb__sub" }, Gi = { class: "wm-fb__row" }, Yi = ["onClick"], Ji = { class: "wm-fb__emoji" }, Qi = { class: "wm-fb__label" }, Xi = ["disabled"], Zi = {
|
|
4659
4697
|
key: 1,
|
|
4660
4698
|
class: "wm-fb__done"
|
|
4661
|
-
},
|
|
4662
|
-
function
|
|
4663
|
-
return c(), u("div",
|
|
4664
|
-
n.done ? (c(), u("div",
|
|
4699
|
+
}, ea = { class: "wm-fb__doneTitle" }, ta = { class: "wm-fb__doneSub" };
|
|
4700
|
+
function na(e, t, n, i, r, s) {
|
|
4701
|
+
return c(), u("div", Ki, [
|
|
4702
|
+
n.done ? (c(), u("div", Zi, [
|
|
4665
4703
|
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
4666
4704
|
o("svg", {
|
|
4667
4705
|
width: "16",
|
|
@@ -4677,32 +4715,32 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4677
4715
|
o("path", { d: "M20 6L9 17l-5-5" })
|
|
4678
4716
|
])
|
|
4679
4717
|
], -1)),
|
|
4680
|
-
o("div",
|
|
4681
|
-
o("div",
|
|
4682
|
-
])) : (c(), u(
|
|
4683
|
-
o("div",
|
|
4684
|
-
o("div",
|
|
4685
|
-
o("div",
|
|
4686
|
-
(c(!0), u(
|
|
4718
|
+
o("div", ea, v(s.t("feedback.doneTitle")), 1),
|
|
4719
|
+
o("div", ta, v(s.t("feedback.doneSubtitle")), 1)
|
|
4720
|
+
])) : (c(), u(B, { key: 0 }, [
|
|
4721
|
+
o("div", Vi, v(s.t("feedback.question")), 1),
|
|
4722
|
+
o("div", Wi, v(s.t("feedback.subtitle")), 1),
|
|
4723
|
+
o("div", Gi, [
|
|
4724
|
+
(c(!0), u(B, null, D(s.options, (a) => (c(), u("button", {
|
|
4687
4725
|
key: a.v,
|
|
4688
4726
|
type: "button",
|
|
4689
4727
|
class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
|
|
4690
4728
|
onClick: (l) => r.sel = a.v
|
|
4691
4729
|
}, [
|
|
4692
|
-
o("span",
|
|
4693
|
-
o("span",
|
|
4694
|
-
], 10,
|
|
4730
|
+
o("span", Ji, v(a.e), 1),
|
|
4731
|
+
o("span", Qi, v(a.l), 1)
|
|
4732
|
+
], 10, Yi))), 128))
|
|
4695
4733
|
]),
|
|
4696
4734
|
o("button", {
|
|
4697
4735
|
type: "button",
|
|
4698
4736
|
class: "wm-fb__send",
|
|
4699
4737
|
disabled: !r.sel || n.busy,
|
|
4700
4738
|
onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
|
|
4701
|
-
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9,
|
|
4739
|
+
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Xi)
|
|
4702
4740
|
], 64))
|
|
4703
4741
|
]);
|
|
4704
4742
|
}
|
|
4705
|
-
const
|
|
4743
|
+
const sa = /* @__PURE__ */ N($i, [["render", na], ["__scopeId", "data-v-9b630564"]]), ra = {
|
|
4706
4744
|
name: "WmMoreMenu",
|
|
4707
4745
|
inject: {
|
|
4708
4746
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4745,24 +4783,24 @@ const Zi = /* @__PURE__ */ R(ji, [["render", Xi], ["__scopeId", "data-v-9b630564
|
|
|
4745
4783
|
this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
|
|
4746
4784
|
}
|
|
4747
4785
|
}
|
|
4748
|
-
},
|
|
4786
|
+
}, ia = { class: "wm-mm" }, aa = {
|
|
4749
4787
|
class: "wm-mm__pop",
|
|
4750
4788
|
role: "menu"
|
|
4751
|
-
},
|
|
4789
|
+
}, oa = {
|
|
4752
4790
|
key: 0,
|
|
4753
4791
|
class: "wm-mm__section"
|
|
4754
|
-
},
|
|
4792
|
+
}, la = { class: "wm-mm__label" }, ca = { class: "wm-mm__label" }, da = {
|
|
4755
4793
|
key: 1,
|
|
4756
4794
|
class: "wm-mm__sep"
|
|
4757
|
-
},
|
|
4758
|
-
function
|
|
4759
|
-
return c(), u("div",
|
|
4795
|
+
}, ua = { class: "wm-mm__section" }, ha = { class: "wm-mm__label" }, ma = { class: "wm-mm__label" }, fa = { class: "wm-mm__section" }, ga = { class: "wm-mm__label" }, _a = { class: "wm-mm__label" };
|
|
4796
|
+
function pa(e, t, n, i, r, s) {
|
|
4797
|
+
return c(), u("div", ia, [
|
|
4760
4798
|
o("div", {
|
|
4761
4799
|
class: "wm-mm__scrim",
|
|
4762
4800
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4763
4801
|
}),
|
|
4764
|
-
o("div",
|
|
4765
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4802
|
+
o("div", aa, [
|
|
4803
|
+
n.canRename || n.canExport ? (c(), u("div", oa, [
|
|
4766
4804
|
n.canRename ? (c(), u("button", {
|
|
4767
4805
|
key: 0,
|
|
4768
4806
|
type: "button",
|
|
@@ -4785,8 +4823,8 @@ function ma(e, t, n, i, r, s) {
|
|
|
4785
4823
|
o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
4786
4824
|
])
|
|
4787
4825
|
], -1)),
|
|
4788
|
-
o("span",
|
|
4789
|
-
])) :
|
|
4826
|
+
o("span", la, v(s.t("moreMenu.editTitle")), 1)
|
|
4827
|
+
])) : y("", !0),
|
|
4790
4828
|
n.canExport ? (c(), u("button", {
|
|
4791
4829
|
key: 1,
|
|
4792
4830
|
type: "button",
|
|
@@ -4808,12 +4846,12 @@ function ma(e, t, n, i, r, s) {
|
|
|
4808
4846
|
o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
4809
4847
|
])
|
|
4810
4848
|
], -1)),
|
|
4811
|
-
o("span",
|
|
4849
|
+
o("span", ca, v(s.t("moreMenu.exportTranscript")), 1),
|
|
4812
4850
|
t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
4813
|
-
])) :
|
|
4814
|
-
])) :
|
|
4815
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4816
|
-
o("div",
|
|
4851
|
+
])) : y("", !0)
|
|
4852
|
+
])) : y("", !0),
|
|
4853
|
+
n.canRename || n.canExport ? (c(), u("div", da)) : y("", !0),
|
|
4854
|
+
o("div", ua, [
|
|
4817
4855
|
o("button", {
|
|
4818
4856
|
type: "button",
|
|
4819
4857
|
class: "wm-mm__item",
|
|
@@ -4835,7 +4873,7 @@ function ma(e, t, n, i, r, s) {
|
|
|
4835
4873
|
o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
4836
4874
|
])
|
|
4837
4875
|
], -1)),
|
|
4838
|
-
o("span",
|
|
4876
|
+
o("span", ha, v(s.t("moreMenu.sound")), 1),
|
|
4839
4877
|
o("span", {
|
|
4840
4878
|
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
|
|
4841
4879
|
}, [...t[10] || (t[10] = [
|
|
@@ -4862,7 +4900,7 @@ function ma(e, t, n, i, r, s) {
|
|
|
4862
4900
|
o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
|
|
4863
4901
|
])
|
|
4864
4902
|
], -1)),
|
|
4865
|
-
o("span",
|
|
4903
|
+
o("span", ma, v(s.t("moreMenu.browserNotifications")), 1),
|
|
4866
4904
|
o("span", {
|
|
4867
4905
|
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
|
|
4868
4906
|
}, [...t[12] || (t[12] = [
|
|
@@ -4871,7 +4909,7 @@ function ma(e, t, n, i, r, s) {
|
|
|
4871
4909
|
])
|
|
4872
4910
|
]),
|
|
4873
4911
|
t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
|
|
4874
|
-
o("div",
|
|
4912
|
+
o("div", fa, [
|
|
4875
4913
|
n.statusUrl ? (c(), u("button", {
|
|
4876
4914
|
key: 0,
|
|
4877
4915
|
type: "button",
|
|
@@ -4893,8 +4931,8 @@ function ma(e, t, n, i, r, s) {
|
|
|
4893
4931
|
o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
4894
4932
|
])
|
|
4895
4933
|
], -1)),
|
|
4896
|
-
o("span",
|
|
4897
|
-
])) :
|
|
4934
|
+
o("span", ga, v(s.t("moreMenu.serviceStatus")), 1)
|
|
4935
|
+
])) : y("", !0),
|
|
4898
4936
|
n.helpUrl ? (c(), u("button", {
|
|
4899
4937
|
key: 1,
|
|
4900
4938
|
type: "button",
|
|
@@ -4916,13 +4954,13 @@ function ma(e, t, n, i, r, s) {
|
|
|
4916
4954
|
o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
|
|
4917
4955
|
])
|
|
4918
4956
|
], -1)),
|
|
4919
|
-
o("span",
|
|
4920
|
-
])) :
|
|
4957
|
+
o("span", _a, v(s.t("moreMenu.helpCenter")), 1)
|
|
4958
|
+
])) : y("", !0)
|
|
4921
4959
|
])
|
|
4922
4960
|
])
|
|
4923
4961
|
]);
|
|
4924
4962
|
}
|
|
4925
|
-
const
|
|
4963
|
+
const va = /* @__PURE__ */ N(ra, [["render", pa], ["__scopeId", "data-v-76281e95"]]), ya = {
|
|
4926
4964
|
name: "WmRenameDialog",
|
|
4927
4965
|
inject: {
|
|
4928
4966
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4964,20 +5002,20 @@ const fa = /* @__PURE__ */ R(ea, [["render", ma], ["__scopeId", "data-v-76281e95
|
|
|
4964
5002
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
4965
5003
|
}
|
|
4966
5004
|
}
|
|
4967
|
-
},
|
|
5005
|
+
}, wa = { class: "wm-dialog" }, ba = {
|
|
4968
5006
|
class: "wm-dialog__card",
|
|
4969
5007
|
role: "dialog",
|
|
4970
5008
|
"aria-modal": "true"
|
|
4971
|
-
},
|
|
4972
|
-
function
|
|
4973
|
-
return c(), u("div",
|
|
5009
|
+
}, ka = { class: "wm-dialog__head" }, Ca = { class: "wm-dialog__title" }, Aa = ["aria-label"], Sa = { class: "wm-dialog__body" }, Ma = ["placeholder"], Ta = { class: "wm-dialog__actions" }, xa = ["disabled"];
|
|
5010
|
+
function Oa(e, t, n, i, r, s) {
|
|
5011
|
+
return c(), u("div", wa, [
|
|
4974
5012
|
o("div", {
|
|
4975
5013
|
class: "wm-dialog__scrim",
|
|
4976
5014
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4977
5015
|
}),
|
|
4978
|
-
o("div",
|
|
4979
|
-
o("div",
|
|
4980
|
-
o("div",
|
|
5016
|
+
o("div", ba, [
|
|
5017
|
+
o("div", ka, [
|
|
5018
|
+
o("div", Ca, v(n.title || s.t("rename.title")), 1),
|
|
4981
5019
|
o("button", {
|
|
4982
5020
|
type: "button",
|
|
4983
5021
|
class: "wm-dialog__close",
|
|
@@ -4997,10 +5035,10 @@ function Sa(e, t, n, i, r, s) {
|
|
|
4997
5035
|
}, [
|
|
4998
5036
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4999
5037
|
], -1)
|
|
5000
|
-
])], 8,
|
|
5038
|
+
])], 8, Aa)
|
|
5001
5039
|
]),
|
|
5002
|
-
o("div",
|
|
5003
|
-
|
|
5040
|
+
o("div", Sa, [
|
|
5041
|
+
V(o("input", {
|
|
5004
5042
|
ref: "input",
|
|
5005
5043
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
|
|
5006
5044
|
type: "text",
|
|
@@ -5008,14 +5046,14 @@ function Sa(e, t, n, i, r, s) {
|
|
|
5008
5046
|
placeholder: n.placeholder || s.t("rename.placeholder"),
|
|
5009
5047
|
maxlength: 120,
|
|
5010
5048
|
onKeydown: [
|
|
5011
|
-
t[3] || (t[3] = ue(
|
|
5012
|
-
t[4] || (t[4] = ue(
|
|
5049
|
+
t[3] || (t[3] = ue(G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
5050
|
+
t[4] || (t[4] = ue(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5013
5051
|
]
|
|
5014
|
-
}, null, 40,
|
|
5052
|
+
}, null, 40, Ma), [
|
|
5015
5053
|
[X, r.value]
|
|
5016
5054
|
])
|
|
5017
5055
|
]),
|
|
5018
|
-
o("div",
|
|
5056
|
+
o("div", Ta, [
|
|
5019
5057
|
o("button", {
|
|
5020
5058
|
type: "button",
|
|
5021
5059
|
class: "wm-dialog__btn",
|
|
@@ -5026,25 +5064,25 @@ function Sa(e, t, n, i, r, s) {
|
|
|
5026
5064
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5027
5065
|
disabled: !s.canSubmit,
|
|
5028
5066
|
onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
|
|
5029
|
-
}, v(s.t("common.save")), 9,
|
|
5067
|
+
}, v(s.t("common.save")), 9, xa)
|
|
5030
5068
|
])
|
|
5031
5069
|
])
|
|
5032
5070
|
]);
|
|
5033
5071
|
}
|
|
5034
|
-
const
|
|
5072
|
+
const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8"]]), Le = "ww-messenger-tokens", Ia = {
|
|
5035
5073
|
name: "Messenger",
|
|
5036
5074
|
components: {
|
|
5037
|
-
Launcher:
|
|
5075
|
+
Launcher: Pt,
|
|
5038
5076
|
Header: ln,
|
|
5039
|
-
Onboarding:
|
|
5040
|
-
MessageList:
|
|
5041
|
-
Composer:
|
|
5042
|
-
SuggestionChips:
|
|
5043
|
-
ApprovalCard:
|
|
5044
|
-
FormCard:
|
|
5045
|
-
Feedback:
|
|
5046
|
-
MoreMenu:
|
|
5047
|
-
RenameDialog:
|
|
5077
|
+
Onboarding: $n,
|
|
5078
|
+
MessageList: Fr,
|
|
5079
|
+
Composer: ni,
|
|
5080
|
+
SuggestionChips: ai,
|
|
5081
|
+
ApprovalCard: _i,
|
|
5082
|
+
FormCard: qi,
|
|
5083
|
+
Feedback: sa,
|
|
5084
|
+
MoreMenu: va,
|
|
5085
|
+
RenameDialog: La
|
|
5048
5086
|
},
|
|
5049
5087
|
mixins: [
|
|
5050
5088
|
ot,
|
|
@@ -5187,7 +5225,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5187
5225
|
// 4. French.
|
|
5188
5226
|
locale() {
|
|
5189
5227
|
var e;
|
|
5190
|
-
return
|
|
5228
|
+
return be(
|
|
5191
5229
|
this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
|
|
5192
5230
|
);
|
|
5193
5231
|
},
|
|
@@ -5229,22 +5267,22 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5229
5267
|
var k;
|
|
5230
5268
|
const r = e[i.id] || [], s = W(i.last_read_message_id);
|
|
5231
5269
|
let a = 0, l = null;
|
|
5232
|
-
for (let
|
|
5233
|
-
const T = r[
|
|
5270
|
+
for (let b = r.length - 1; b >= 0; b--) {
|
|
5271
|
+
const T = r[b];
|
|
5234
5272
|
if (!T) continue;
|
|
5235
5273
|
if (((k = T.author) == null ? void 0 : k.type) === "user") break;
|
|
5236
|
-
const
|
|
5237
|
-
if (
|
|
5238
|
-
if (s != null &&
|
|
5274
|
+
const E = W(T.id);
|
|
5275
|
+
if (E != null) {
|
|
5276
|
+
if (s != null && E <= s) break;
|
|
5239
5277
|
t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
|
|
5240
5278
|
}
|
|
5241
5279
|
}
|
|
5242
5280
|
if (!r.length) {
|
|
5243
|
-
const
|
|
5244
|
-
|
|
5281
|
+
const b = W(i.last_message_id);
|
|
5282
|
+
b != null && (s == null || b > s) && (a = 1, l = i.last_message_author || null);
|
|
5245
5283
|
}
|
|
5246
5284
|
const p = r.filter(
|
|
5247
|
-
(
|
|
5285
|
+
(b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
|
|
5248
5286
|
);
|
|
5249
5287
|
return {
|
|
5250
5288
|
...i,
|
|
@@ -5271,7 +5309,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5271
5309
|
title: n.name || this.t("common.newConversation"),
|
|
5272
5310
|
preview: n._preview || this.t("onboarding.newMessage"),
|
|
5273
5311
|
unread: !!n._unread,
|
|
5274
|
-
_ts:
|
|
5312
|
+
_ts: Me(n, e[n.id] || [])
|
|
5275
5313
|
})).sort((n, i) => n._ts < i._ts ? 1 : n._ts > i._ts ? -1 : 0);
|
|
5276
5314
|
},
|
|
5277
5315
|
// Unread threads (one entry per conv with unseen agent/human
|
|
@@ -5283,7 +5321,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5283
5321
|
const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
|
|
5284
5322
|
for (const i of this.drawerConversations) {
|
|
5285
5323
|
if (!i._unread) continue;
|
|
5286
|
-
const r =
|
|
5324
|
+
const r = Me(i, e[i.id] || []), s = i._lastAuthor, a = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (a ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (a ? this.agentAvatarUrl : null);
|
|
5287
5325
|
t.push({
|
|
5288
5326
|
convId: i.id,
|
|
5289
5327
|
preview: i._preview || this.t("notification.youHaveNewMessage"),
|
|
@@ -5429,7 +5467,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5429
5467
|
const t = this.revealedAt;
|
|
5430
5468
|
return (this.s.messagesByConv[e.id] || []).filter((r) => {
|
|
5431
5469
|
var s, a, l, p, k;
|
|
5432
|
-
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" ||
|
|
5470
|
+
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((a = r == null ? void 0 : r.payload) == null ? void 0 : a.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
5433
5471
|
});
|
|
5434
5472
|
},
|
|
5435
5473
|
// True whenever we should show the "typing" indicator at the bottom
|
|
@@ -5440,7 +5478,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5440
5478
|
var n, i, r;
|
|
5441
5479
|
const e = this.currentConv;
|
|
5442
5480
|
return e ? Object.keys(((n = this.s) == null ? void 0 : n.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : (((r = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : r[e.id]) || []).some(
|
|
5443
|
-
(s) =>
|
|
5481
|
+
(s) => oe(s) && !(this.revealedAt[s.id] > 0)
|
|
5444
5482
|
) : !1;
|
|
5445
5483
|
},
|
|
5446
5484
|
// Internal: the raw persisted list for the current conversation. We
|
|
@@ -5472,7 +5510,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5472
5510
|
const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
|
|
5473
5511
|
if (!t || typeof t != "object") return "";
|
|
5474
5512
|
const n = Object.entries(t);
|
|
5475
|
-
return n.length ? n.slice(0, 2).map(([k,
|
|
5513
|
+
return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
|
|
5476
5514
|
},
|
|
5477
5515
|
actionInFlight() {
|
|
5478
5516
|
var e, t;
|
|
@@ -5515,7 +5553,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5515
5553
|
}
|
|
5516
5554
|
}
|
|
5517
5555
|
return this.t("messageList.today", {
|
|
5518
|
-
time:
|
|
5556
|
+
time: pe(t, re(this.locale))
|
|
5519
5557
|
});
|
|
5520
5558
|
},
|
|
5521
5559
|
// Pagination state for the active conversation. Drives the
|
|
@@ -5620,9 +5658,9 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5620
5658
|
}
|
|
5621
5659
|
},
|
|
5622
5660
|
async mounted() {
|
|
5623
|
-
if (typeof document < "u" && !document.getElementById(
|
|
5661
|
+
if (typeof document < "u" && !document.getElementById(Le)) {
|
|
5624
5662
|
const e = document.createElement("style");
|
|
5625
|
-
e.id =
|
|
5663
|
+
e.id = Le, e.textContent = Xe, document.head.appendChild(e);
|
|
5626
5664
|
}
|
|
5627
5665
|
this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
|
|
5628
5666
|
},
|
|
@@ -5656,7 +5694,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5656
5694
|
onParentMessage(e) {
|
|
5657
5695
|
var n;
|
|
5658
5696
|
const t = e == null ? void 0 : e.data;
|
|
5659
|
-
!t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.hasValidSessionMarker() && this.boot().catch((i) => {
|
|
5697
|
+
!t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((i) => {
|
|
5660
5698
|
console.warn("[messenger] eager boot failed", i);
|
|
5661
5699
|
}));
|
|
5662
5700
|
},
|
|
@@ -5677,12 +5715,12 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5677
5715
|
return;
|
|
5678
5716
|
}
|
|
5679
5717
|
try {
|
|
5680
|
-
await this.waitForParentInit(), this.transport =
|
|
5718
|
+
await this.waitForParentInit(), this.transport = Ce(
|
|
5681
5719
|
We({
|
|
5682
5720
|
baseUrl: this.baseUrl,
|
|
5683
5721
|
widgetId: this.widgetId
|
|
5684
5722
|
})
|
|
5685
|
-
), this.store =
|
|
5723
|
+
), this.store = Ce(Qe(this.transport)), this.hydrateNotifPref();
|
|
5686
5724
|
const n = ((e = this.parentContext) == null ? void 0 : e.customer) || ((t = this.context) == null ? void 0 : t.customer);
|
|
5687
5725
|
await this.store.start({
|
|
5688
5726
|
origin: this.parentOrigin,
|
|
@@ -5771,21 +5809,21 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5771
5809
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
5772
5810
|
},
|
|
5773
5811
|
sendCurrentLauncherSize() {
|
|
5774
|
-
var T,
|
|
5812
|
+
var T, E, A, H, S, P, I;
|
|
5775
5813
|
if (this.isOpen) return;
|
|
5776
|
-
const e = (
|
|
5814
|
+
const e = (E = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : E.call(T, ".wm-launcherWrap");
|
|
5777
5815
|
if (!e) return;
|
|
5778
5816
|
const t = e.getBoundingClientRect();
|
|
5779
5817
|
if (!t.width || !t.height) return;
|
|
5780
|
-
const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (
|
|
5781
|
-
let
|
|
5818
|
+
const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (S = (H = this.$el) == null ? void 0 : H.querySelector) == null ? void 0 : S.call(H, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (I = (P = this.$el) == null ? void 0 : P.querySelectorAll) == null ? void 0 : I.call(P, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
|
|
5819
|
+
let b = null;
|
|
5782
5820
|
if (k) {
|
|
5783
|
-
const
|
|
5784
|
-
|
|
5785
|
-
width: Math.ceil(
|
|
5786
|
-
height: Math.ceil(
|
|
5787
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
5788
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
5821
|
+
const U = k.getBoundingClientRect();
|
|
5822
|
+
b = {
|
|
5823
|
+
width: Math.ceil(U.width),
|
|
5824
|
+
height: Math.ceil(U.height),
|
|
5825
|
+
rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
|
|
5826
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
|
|
5789
5827
|
};
|
|
5790
5828
|
}
|
|
5791
5829
|
this.notifyParentResize("closed", {
|
|
@@ -5794,7 +5832,7 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5794
5832
|
launcherWidth: l ? Math.ceil(l.width) : null,
|
|
5795
5833
|
launcherHeight: l ? Math.ceil(l.height) : null,
|
|
5796
5834
|
launcherHovered: this.launcherHovered,
|
|
5797
|
-
peek:
|
|
5835
|
+
peek: b,
|
|
5798
5836
|
peekHovered: this.launcherHovered && n
|
|
5799
5837
|
});
|
|
5800
5838
|
},
|
|
@@ -5980,9 +6018,34 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5980
6018
|
console.error("[ww-messenger] attachment upload failed", t);
|
|
5981
6019
|
}
|
|
5982
6020
|
},
|
|
6021
|
+
// Délégation des clics sur les liens `<a href="#...">` rendus dans le
|
|
6022
|
+
// panel (typiquement par le markdown des messages agent). On capture
|
|
6023
|
+
// au niveau du panel pour éviter d'ajouter un listener par composant.
|
|
6024
|
+
onPanelClick(e) {
|
|
6025
|
+
const t = e.target && e.target.closest ? e.target.closest('a[href^="#"]') : null;
|
|
6026
|
+
t && (e.preventDefault(), this.openInternalUrl(t.getAttribute("href")));
|
|
6027
|
+
},
|
|
6028
|
+
// Intercepte les URLs `#...` pour naviguer DANS le messenger plutôt
|
|
6029
|
+
// que d'ouvrir une page externe. Format :
|
|
6030
|
+
// - `#conversation/<convId>` : ouvre cette conv dans le panel
|
|
6031
|
+
// - `#new` : démarre un nouveau draft (composer)
|
|
6032
|
+
// Retourne `true` si le deep-link a été dispatché en interne ;
|
|
6033
|
+
// `false` si l'URL est externe et doit passer par `window.open`.
|
|
6034
|
+
async openInternalUrl(e) {
|
|
6035
|
+
if (typeof e != "string" || !e.startsWith("#")) return !1;
|
|
6036
|
+
const t = e.slice(1);
|
|
6037
|
+
if (t === "new" || t === "new-conversation")
|
|
6038
|
+
return this.isOpen || await this.open(), this.startConv(), !0;
|
|
6039
|
+
if (t.startsWith("conversation/")) {
|
|
6040
|
+
const n = t.slice(13);
|
|
6041
|
+
return n && await this.openFromPeek(n), !0;
|
|
6042
|
+
}
|
|
6043
|
+
return console.warn("[messenger] unknown internal url", e), !0;
|
|
6044
|
+
},
|
|
5983
6045
|
async onQuickLink(e) {
|
|
5984
6046
|
if (e) {
|
|
5985
6047
|
if (e.url) {
|
|
6048
|
+
if (await this.openInternalUrl(e.url)) return;
|
|
5986
6049
|
try {
|
|
5987
6050
|
window.open(e.url, "_blank", "noopener");
|
|
5988
6051
|
} catch {
|
|
@@ -6008,40 +6071,40 @@ const Ma = /* @__PURE__ */ R(ga, [["render", Sa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6008
6071
|
}
|
|
6009
6072
|
}
|
|
6010
6073
|
}
|
|
6011
|
-
},
|
|
6074
|
+
}, Ea = {
|
|
6012
6075
|
key: 0,
|
|
6013
6076
|
class: "wm-loading",
|
|
6014
6077
|
"aria-busy": "true",
|
|
6015
6078
|
"aria-live": "polite"
|
|
6016
|
-
},
|
|
6079
|
+
}, Ba = ["aria-label"], Ra = {
|
|
6017
6080
|
key: 0,
|
|
6018
6081
|
class: "wm-state"
|
|
6019
|
-
},
|
|
6082
|
+
}, Na = { class: "wm-state__err" }, Pa = { class: "wm-state__errTitle" }, Fa = { class: "wm-state__errSub" }, Ua = { class: "wm-bottom" }, Da = {
|
|
6020
6083
|
key: 0,
|
|
6021
6084
|
ref: "floatEl",
|
|
6022
6085
|
class: "wm-float"
|
|
6023
|
-
},
|
|
6086
|
+
}, ja = {
|
|
6024
6087
|
key: 1,
|
|
6025
6088
|
class: "wm-actionWait",
|
|
6026
6089
|
role: "status",
|
|
6027
6090
|
"aria-live": "polite"
|
|
6028
|
-
},
|
|
6091
|
+
}, Ha = { class: "wm-actionWait__lbl" }, za = {
|
|
6029
6092
|
key: 2,
|
|
6030
6093
|
class: "wm-attached"
|
|
6031
|
-
},
|
|
6032
|
-
function
|
|
6033
|
-
const a =
|
|
6094
|
+
}, qa = ["aria-label", "onClick"];
|
|
6095
|
+
function $a(e, t, n, i, r, s) {
|
|
6096
|
+
const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), b = R("ApprovalCard"), T = R("FormCard"), E = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), P = R("RenameDialog");
|
|
6034
6097
|
return c(), u("div", {
|
|
6035
6098
|
class: O(["wm-root", `wm-root--${n.displayMode}`])
|
|
6036
6099
|
}, [
|
|
6037
|
-
!r.isOpen && !s.isEmbedded ? (c(),
|
|
6100
|
+
!r.isOpen && !s.isEmbedded ? (c(), F(a, {
|
|
6038
6101
|
key: 0,
|
|
6039
6102
|
"unread-count": s.unreadCount,
|
|
6040
6103
|
peeks: s.launcherPeeks,
|
|
6041
6104
|
onOpen: s.openFromPeek,
|
|
6042
6105
|
onDismiss: s.dismissPeek,
|
|
6043
6106
|
onHover: s.onLauncherHover
|
|
6044
|
-
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) :
|
|
6107
|
+
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : y("", !0),
|
|
6045
6108
|
r.isOpen || s.isEmbedded ? (c(), u("section", {
|
|
6046
6109
|
key: 1,
|
|
6047
6110
|
class: O([
|
|
@@ -6051,16 +6114,17 @@ function ja(e, t, n, i, r, s) {
|
|
|
6051
6114
|
]),
|
|
6052
6115
|
style: q(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
6053
6116
|
role: "dialog",
|
|
6054
|
-
"aria-label": "Messenger"
|
|
6117
|
+
"aria-label": "Messenger",
|
|
6118
|
+
onClick: t[5] || (t[5] = (...I) => s.onPanelClick && s.onPanelClick(...I))
|
|
6055
6119
|
}, [
|
|
6056
|
-
!s.ready && !s.error ? (c(), u("div",
|
|
6057
|
-
s.isEmbedded ?
|
|
6120
|
+
!s.ready && !s.error ? (c(), u("div", Ea, [
|
|
6121
|
+
s.isEmbedded ? y("", !0) : (c(), u("button", {
|
|
6058
6122
|
key: 0,
|
|
6059
6123
|
type: "button",
|
|
6060
6124
|
class: "wm-loading__close",
|
|
6061
6125
|
"aria-label": s.t("loading.minimize"),
|
|
6062
|
-
onClick: t[0] || (t[0] = (...
|
|
6063
|
-
}, [...t[
|
|
6126
|
+
onClick: t[0] || (t[0] = (...I) => s.close && s.close(...I))
|
|
6127
|
+
}, [...t[6] || (t[6] = [
|
|
6064
6128
|
o("svg", {
|
|
6065
6129
|
width: "13",
|
|
6066
6130
|
height: "13",
|
|
@@ -6074,12 +6138,12 @@ function ja(e, t, n, i, r, s) {
|
|
|
6074
6138
|
}, [
|
|
6075
6139
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6076
6140
|
], -1)
|
|
6077
|
-
])], 8,
|
|
6078
|
-
t[
|
|
6141
|
+
])], 8, Ba)),
|
|
6142
|
+
t[7] || (t[7] = o("div", {
|
|
6079
6143
|
class: "wm-loading__spinner",
|
|
6080
6144
|
"aria-hidden": "true"
|
|
6081
6145
|
}, null, -1))
|
|
6082
|
-
])) : (c(), u(
|
|
6146
|
+
])) : (c(), u(B, { key: 1 }, [
|
|
6083
6147
|
$(l, {
|
|
6084
6148
|
title: s.headerTitle,
|
|
6085
6149
|
"team-members": s.teamMembers,
|
|
@@ -6094,9 +6158,9 @@ function ja(e, t, n, i, r, s) {
|
|
|
6094
6158
|
onMore: s.toggleMore,
|
|
6095
6159
|
onClose: s.close
|
|
6096
6160
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6097
|
-
s.error ? (c(), u("div",
|
|
6098
|
-
o("div",
|
|
6099
|
-
t[
|
|
6161
|
+
s.error ? (c(), u("div", Ra, [
|
|
6162
|
+
o("div", Na, [
|
|
6163
|
+
t[8] || (t[8] = o("div", { class: "wm-state__errIcon" }, [
|
|
6100
6164
|
o("svg", {
|
|
6101
6165
|
width: "14",
|
|
6102
6166
|
height: "14",
|
|
@@ -6112,11 +6176,11 @@ function ja(e, t, n, i, r, s) {
|
|
|
6112
6176
|
])
|
|
6113
6177
|
], -1)),
|
|
6114
6178
|
o("div", null, [
|
|
6115
|
-
o("div",
|
|
6116
|
-
o("div",
|
|
6179
|
+
o("div", Pa, v(s.t("error.connectionFailed")), 1),
|
|
6180
|
+
o("div", Fa, v(s.error), 1)
|
|
6117
6181
|
])
|
|
6118
6182
|
])
|
|
6119
|
-
])) : s.currentConv ? (c(), u(
|
|
6183
|
+
])) : s.currentConv ? (c(), u(B, { key: 2 }, [
|
|
6120
6184
|
$(k, {
|
|
6121
6185
|
ref: "messageList",
|
|
6122
6186
|
messages: s.displayedMessages,
|
|
@@ -6131,9 +6195,9 @@ function ja(e, t, n, i, r, s) {
|
|
|
6131
6195
|
"ai-agent-avatar-url": s.agentAvatarUrl,
|
|
6132
6196
|
onLoadMore: s.onLoadMore
|
|
6133
6197
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
|
|
6134
|
-
o("div",
|
|
6135
|
-
s.floatVisible ? (c(), u("div",
|
|
6136
|
-
s.approvalReady ? (c(),
|
|
6198
|
+
o("div", Ua, [
|
|
6199
|
+
s.floatVisible ? (c(), u("div", Da, [
|
|
6200
|
+
s.approvalReady ? (c(), F(b, {
|
|
6137
6201
|
key: 0,
|
|
6138
6202
|
action: s.approvalTitle,
|
|
6139
6203
|
detail: s.approvalDetail,
|
|
@@ -6141,36 +6205,36 @@ function ja(e, t, n, i, r, s) {
|
|
|
6141
6205
|
"agent-name": s.agentName,
|
|
6142
6206
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6143
6207
|
onCallback: s.onApprovalCallback
|
|
6144
|
-
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(),
|
|
6208
|
+
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), F(T, {
|
|
6145
6209
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
6146
6210
|
form: s.pendingForm.form,
|
|
6147
6211
|
"agent-name": s.agentName,
|
|
6148
6212
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6149
6213
|
onSubmit: s.onFormSubmit
|
|
6150
|
-
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(),
|
|
6214
|
+
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), F(E, {
|
|
6151
6215
|
key: 2,
|
|
6152
6216
|
busy: r.feedbackBusy,
|
|
6153
6217
|
done: r.feedbackDone,
|
|
6154
6218
|
onSubmit: s.onFeedback
|
|
6155
|
-
}, null, 8, ["busy", "done", "onSubmit"])) : (c(),
|
|
6219
|
+
}, null, 8, ["busy", "done", "onSubmit"])) : (c(), F(A, {
|
|
6156
6220
|
key: 3,
|
|
6157
6221
|
items: s.suggestions,
|
|
6158
6222
|
onSelect: s.onSuggestion
|
|
6159
6223
|
}, null, 8, ["items", "onSelect"]))
|
|
6160
|
-
], 512)) :
|
|
6161
|
-
s.actionInFlight ? (c(), u("div",
|
|
6162
|
-
t[
|
|
6224
|
+
], 512)) : y("", !0),
|
|
6225
|
+
s.actionInFlight ? (c(), u("div", ja, [
|
|
6226
|
+
t[9] || (t[9] = o("span", {
|
|
6163
6227
|
class: "wm-actionWait__spinner",
|
|
6164
6228
|
"aria-hidden": "true"
|
|
6165
6229
|
}, null, -1)),
|
|
6166
|
-
o("span",
|
|
6230
|
+
o("span", Ha, v(s.t("action.inProgress", {
|
|
6167
6231
|
name: s.actionInFlightName
|
|
6168
6232
|
})), 1)
|
|
6169
|
-
])) : (c(),
|
|
6233
|
+
])) : (c(), F(H, {
|
|
6170
6234
|
key: 2,
|
|
6171
6235
|
ref: "composer",
|
|
6172
6236
|
modelValue: r.draft,
|
|
6173
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
6237
|
+
"onUpdate:modelValue": t[1] || (t[1] = (I) => r.draft = I),
|
|
6174
6238
|
placeholder: s.composerPlaceholder,
|
|
6175
6239
|
disabled: !!s.pendingApproval,
|
|
6176
6240
|
"attach-label": s.t("composer.attachFile"),
|
|
@@ -6179,7 +6243,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6179
6243
|
onAttach: s.onAttach
|
|
6180
6244
|
}, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
|
|
6181
6245
|
]),
|
|
6182
|
-
r.moreOpen ? (c(),
|
|
6246
|
+
r.moreOpen ? (c(), F(S, {
|
|
6183
6247
|
key: 0,
|
|
6184
6248
|
"can-rename": !!s.currentConv && !s.currentConv._draft,
|
|
6185
6249
|
"can-export": !!s.currentConv && !s.currentConv._draft,
|
|
@@ -6187,24 +6251,24 @@ function ja(e, t, n, i, r, s) {
|
|
|
6187
6251
|
"browser-notif-enabled": e.browserNotifEnabled,
|
|
6188
6252
|
"status-url": s.statusUrl,
|
|
6189
6253
|
"help-url": s.helpUrl,
|
|
6190
|
-
onClose: t[2] || (t[2] = (
|
|
6254
|
+
onClose: t[2] || (t[2] = (I) => r.moreOpen = !1),
|
|
6191
6255
|
onSoundToggle: e.onSoundToggle,
|
|
6192
6256
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6193
6257
|
onAction: s.onMoreAction
|
|
6194
|
-
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) :
|
|
6195
|
-
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(),
|
|
6258
|
+
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0),
|
|
6259
|
+
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), F(P, {
|
|
6196
6260
|
key: 1,
|
|
6197
6261
|
"initial-value": s.currentConv.name || "",
|
|
6198
6262
|
title: s.t("rename.dialogTitle"),
|
|
6199
|
-
onClose: t[3] || (t[3] = (
|
|
6263
|
+
onClose: t[3] || (t[3] = (I) => r.renameDialogOpen = !1),
|
|
6200
6264
|
onSubmit: s.onRenameSubmit
|
|
6201
|
-
}, null, 8, ["initial-value", "title", "onSubmit"])) :
|
|
6202
|
-
r.pendingAttachments.length ? (c(), u("div",
|
|
6203
|
-
(c(!0), u(
|
|
6204
|
-
key:
|
|
6265
|
+
}, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
|
|
6266
|
+
r.pendingAttachments.length ? (c(), u("div", za, [
|
|
6267
|
+
(c(!0), u(B, null, D(r.pendingAttachments, (I, U) => (c(), u("div", {
|
|
6268
|
+
key: U,
|
|
6205
6269
|
class: "wm-attached__chip"
|
|
6206
6270
|
}, [
|
|
6207
|
-
t[
|
|
6271
|
+
t[11] || (t[11] = o("svg", {
|
|
6208
6272
|
width: "11",
|
|
6209
6273
|
height: "11",
|
|
6210
6274
|
viewBox: "0 0 24 24",
|
|
@@ -6217,12 +6281,12 @@ function ja(e, t, n, i, r, s) {
|
|
|
6217
6281
|
}, [
|
|
6218
6282
|
o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
|
|
6219
6283
|
], -1)),
|
|
6220
|
-
o("span", null, v(
|
|
6284
|
+
o("span", null, v(I.name), 1),
|
|
6221
6285
|
o("button", {
|
|
6222
6286
|
type: "button",
|
|
6223
6287
|
"aria-label": s.t("attachment.remove"),
|
|
6224
|
-
onClick: (
|
|
6225
|
-
}, [...t[
|
|
6288
|
+
onClick: (Y) => r.pendingAttachments.splice(U, 1)
|
|
6289
|
+
}, [...t[10] || (t[10] = [
|
|
6226
6290
|
o("svg", {
|
|
6227
6291
|
width: "10",
|
|
6228
6292
|
height: "10",
|
|
@@ -6236,10 +6300,10 @@ function ja(e, t, n, i, r, s) {
|
|
|
6236
6300
|
}, [
|
|
6237
6301
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6238
6302
|
], -1)
|
|
6239
|
-
])], 8,
|
|
6303
|
+
])], 8, qa)
|
|
6240
6304
|
]))), 128))
|
|
6241
|
-
])) :
|
|
6242
|
-
], 64)) : (c(),
|
|
6305
|
+
])) : y("", !0)
|
|
6306
|
+
], 64)) : (c(), F(p, {
|
|
6243
6307
|
key: 1,
|
|
6244
6308
|
"welcome-message": s.widgetWelcomeMessage,
|
|
6245
6309
|
subtitle: s.widgetSubtitle,
|
|
@@ -6252,7 +6316,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6252
6316
|
onSelect: s.onQuickLink,
|
|
6253
6317
|
onResume: s.onDrawerPick
|
|
6254
6318
|
}, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
6255
|
-
r.moreOpen && !s.currentConv ? (c(),
|
|
6319
|
+
r.moreOpen && !s.currentConv ? (c(), F(S, {
|
|
6256
6320
|
key: 3,
|
|
6257
6321
|
"can-rename": !1,
|
|
6258
6322
|
"can-export": !1,
|
|
@@ -6260,62 +6324,62 @@ function ja(e, t, n, i, r, s) {
|
|
|
6260
6324
|
"browser-notif-enabled": e.browserNotifEnabled,
|
|
6261
6325
|
"status-url": s.statusUrl,
|
|
6262
6326
|
"help-url": s.helpUrl,
|
|
6263
|
-
onClose: t[4] || (t[4] = (
|
|
6327
|
+
onClose: t[4] || (t[4] = (I) => r.moreOpen = !1),
|
|
6264
6328
|
onSoundToggle: e.onSoundToggle,
|
|
6265
6329
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6266
6330
|
onAction: s.onMoreAction
|
|
6267
|
-
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) :
|
|
6331
|
+
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0)
|
|
6268
6332
|
], 64))
|
|
6269
|
-
], 6)) :
|
|
6333
|
+
], 6)) : y("", !0)
|
|
6270
6334
|
], 2);
|
|
6271
6335
|
}
|
|
6272
|
-
const
|
|
6336
|
+
const Wa = /* @__PURE__ */ N(Ia, [["render", $a], ["__scopeId", "data-v-7f3d28ad"]]), Ga = "0.5.30";
|
|
6273
6337
|
export {
|
|
6274
6338
|
le as AIAvatar,
|
|
6275
6339
|
ge as AVATAR_COLORS,
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6340
|
+
ns as ActionResult,
|
|
6341
|
+
_i as ApprovalCard,
|
|
6342
|
+
us as ArtifactFormResponse,
|
|
6343
|
+
As as ArtifactInfoCard,
|
|
6344
|
+
qs as ArtifactRenderer,
|
|
6281
6345
|
Ds as ArtifactTicket,
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6346
|
+
tr as AttachmentPreview,
|
|
6347
|
+
ir as Bubble,
|
|
6348
|
+
ni as Composer,
|
|
6285
6349
|
Ze as DEFAULT_BASE_URL,
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6350
|
+
ae as DEFAULT_LANGUAGE,
|
|
6351
|
+
sa as Feedback,
|
|
6352
|
+
qi as FormCard,
|
|
6289
6353
|
ln as Header,
|
|
6290
6354
|
Re as HumanAvatar,
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6355
|
+
Pt as Launcher,
|
|
6356
|
+
ke as MEDIA_RECORDER_SUPPORTED,
|
|
6357
|
+
Fr as MessageList,
|
|
6358
|
+
Wa as Messenger,
|
|
6359
|
+
va as MoreMenu,
|
|
6360
|
+
$n as Onboarding,
|
|
6297
6361
|
he as SCREEN_CAPTURE_SUPPORTED,
|
|
6298
6362
|
et as SUPPORTED_LANGUAGES,
|
|
6299
|
-
|
|
6363
|
+
ai as SuggestionChips,
|
|
6300
6364
|
Gt as TeamAvatars,
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6365
|
+
cr as Typing,
|
|
6366
|
+
Ga as VERSION,
|
|
6367
|
+
ye as avatarColor,
|
|
6368
|
+
we as avatarInitials,
|
|
6369
|
+
Dr as captureScreenshotFile,
|
|
6306
6370
|
z as colors,
|
|
6307
6371
|
Qe as createStore,
|
|
6308
6372
|
j as createTranslator,
|
|
6309
6373
|
We as createTransport,
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6374
|
+
re as dateLocale,
|
|
6375
|
+
Wa as default,
|
|
6376
|
+
pe as formatTime,
|
|
6377
|
+
Va as guessAttachmentKind,
|
|
6378
|
+
Ur as pickRecorderMime,
|
|
6315
6379
|
dn as renderInlineMarkdown,
|
|
6316
6380
|
un as renderMarkdown,
|
|
6317
|
-
|
|
6318
|
-
|
|
6381
|
+
be as resolveLanguage,
|
|
6382
|
+
Hr as startScreenRecording,
|
|
6319
6383
|
Xe as tokensCss,
|
|
6320
6384
|
Je as uuid,
|
|
6321
6385
|
Je as v4
|