@_solaris/messenger-widget 0.5.36 → 0.5.38
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 +26 -26
- package/dist/messenger.cjs +7 -7
- package/dist/messenger.js +1166 -1143
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as je, openBlock as c, createElementBlock as u, normalizeStyle as z, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as K, Transition as Re, withCtx as Ne, Fragment as E, renderList as F, withKeys as ue, withModifiers as G, createElementVNode as o, createCommentVNode as y, createBlock as P, resolveDynamicComponent as pe, mergeProps as Se, withDirectives as $, vModelText as X, createTextVNode as ye, renderSlot as He, vModelCheckbox as ze, vModelSelect as qe, markRaw as Me } from "vue";
|
|
2
|
+
const Ke = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
5
5
|
"message_stream",
|
|
6
6
|
"conversation_updated",
|
|
7
7
|
"config_updated",
|
|
8
8
|
"action_status"
|
|
9
|
-
], fe = "/client",
|
|
10
|
-
function
|
|
9
|
+
], fe = "/client", Ve = 5 * 60 * 1e3, $e = 10 * 60 * 1e3, We = 5 * 60 * 1e3;
|
|
10
|
+
function Ge(e) {
|
|
11
11
|
const t = {
|
|
12
|
-
baseUrl:
|
|
12
|
+
baseUrl: Ye(e.baseUrl || ""),
|
|
13
13
|
widgetId: e.widgetId || "",
|
|
14
14
|
// Posé après `start()` à partir de la response /session.
|
|
15
15
|
userId: "",
|
|
@@ -60,7 +60,7 @@ function We(e) {
|
|
|
60
60
|
...t.origin ? { "X-Parent-Origin": t.origin } : {}
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
async function
|
|
63
|
+
async function a(d, f, g) {
|
|
64
64
|
const b = await fetch(`${t.baseUrl}${fe}${f}`, {
|
|
65
65
|
method: d,
|
|
66
66
|
credentials: "include",
|
|
@@ -109,10 +109,10 @@ function We(e) {
|
|
|
109
109
|
}
|
|
110
110
|
);
|
|
111
111
|
if (!f.ok) {
|
|
112
|
-
const
|
|
113
|
-
`Session bootstrap failed: HTTP ${f.status} :: ${(
|
|
112
|
+
const L = await l(f), x = new Error(
|
|
113
|
+
`Session bootstrap failed: HTTP ${f.status} :: ${(L == null ? void 0 : L.error) || f.statusText}`
|
|
114
114
|
);
|
|
115
|
-
throw x.status = f.status, x.body =
|
|
115
|
+
throw x.status = f.status, x.body = L, x;
|
|
116
116
|
}
|
|
117
117
|
const g = await f.json();
|
|
118
118
|
t.userId = g.external_id;
|
|
@@ -120,18 +120,18 @@ function We(e) {
|
|
|
120
120
|
fetch(
|
|
121
121
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
122
122
|
{ credentials: "include" }
|
|
123
|
-
).then(async (
|
|
124
|
-
if (!
|
|
125
|
-
const x = await l(
|
|
123
|
+
).then(async (L) => {
|
|
124
|
+
if (!L.ok) {
|
|
125
|
+
const x = await l(L);
|
|
126
126
|
throw new Error(
|
|
127
|
-
`HTTP ${
|
|
127
|
+
`HTTP ${L.status} GET /widgets/:id/config :: ${(x == null ? void 0 : x.error) || L.statusText}`
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
|
-
return
|
|
130
|
+
return L.json();
|
|
131
131
|
}),
|
|
132
|
-
|
|
132
|
+
a("GET", "/customers/me")
|
|
133
133
|
]), M = { config: b, customer: (C == null ? void 0 : C.customer) ?? null };
|
|
134
|
-
return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler =
|
|
134
|
+
return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = h, document.addEventListener(
|
|
135
135
|
"visibilitychange",
|
|
136
136
|
t.visibilityHandler
|
|
137
137
|
)), de(), M;
|
|
@@ -148,50 +148,50 @@ function We(e) {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
async function w() {
|
|
151
|
-
const d = await
|
|
151
|
+
const d = await a("GET", "/customers/me");
|
|
152
152
|
return (d == null ? void 0 : d.customer) ?? null;
|
|
153
153
|
}
|
|
154
154
|
async function T(d) {
|
|
155
|
-
const f = await
|
|
155
|
+
const f = await a("PATCH", "/customers/me", d);
|
|
156
156
|
return (f == null ? void 0 : f.customer) ?? null;
|
|
157
157
|
}
|
|
158
158
|
async function B() {
|
|
159
|
-
const d = await
|
|
159
|
+
const d = await a("GET", "/conversations");
|
|
160
160
|
return (d == null ? void 0 : d.conversations) ?? [];
|
|
161
161
|
}
|
|
162
162
|
async function A(d = {}) {
|
|
163
|
-
return (await
|
|
163
|
+
return (await a("POST", "/conversations", d)).conversation;
|
|
164
164
|
}
|
|
165
165
|
async function H(d) {
|
|
166
|
-
return (await
|
|
166
|
+
return (await a(
|
|
167
167
|
"GET",
|
|
168
168
|
`/conversations/${encodeURIComponent(d)}`
|
|
169
169
|
)).conversation;
|
|
170
170
|
}
|
|
171
171
|
async function S(d, f) {
|
|
172
|
-
return (await
|
|
172
|
+
return (await a(
|
|
173
173
|
"PATCH",
|
|
174
174
|
`/conversations/${encodeURIComponent(d)}`,
|
|
175
175
|
f
|
|
176
176
|
)).conversation;
|
|
177
177
|
}
|
|
178
|
-
async function
|
|
179
|
-
return
|
|
178
|
+
async function U(d, f) {
|
|
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 g = new URLSearchParams();
|
|
187
187
|
f.before && g.set("before", f.before), f.since && g.set("since", f.since), f.limit && g.set("limit", String(f.limit));
|
|
188
188
|
const b = g.toString() ? `?${g.toString()}` : "";
|
|
189
|
-
return
|
|
189
|
+
return a(
|
|
190
190
|
"GET",
|
|
191
191
|
`/conversations/${encodeURIComponent(d)}/messages${b}`
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
|
-
async function
|
|
194
|
+
async function q(d, f) {
|
|
195
195
|
se();
|
|
196
196
|
const g = {
|
|
197
197
|
client_msg_id: f.client_msg_id,
|
|
@@ -200,21 +200,21 @@ function We(e) {
|
|
|
200
200
|
author: { id: t.userId, type: "user" },
|
|
201
201
|
created_at: f.created_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
202
202
|
};
|
|
203
|
-
return Array.isArray(f.attachments) && f.attachments.length && (g.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (g.metadata = f.metadata),
|
|
203
|
+
return Array.isArray(f.attachments) && f.attachments.length && (g.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (g.metadata = f.metadata), a(
|
|
204
204
|
"POST",
|
|
205
205
|
`/conversations/${encodeURIComponent(d)}/messages`,
|
|
206
206
|
g
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
async function Y(d, f, g) {
|
|
210
|
-
return se(),
|
|
210
|
+
return se(), a(
|
|
211
211
|
"POST",
|
|
212
212
|
`/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
|
|
213
213
|
g ? { inputs: g } : {}
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
async function Z(d) {
|
|
217
|
-
const f = d.name || "attachment", g = d.type || "application/octet-stream", b = d.size || 0, C = await
|
|
217
|
+
const f = d.name || "attachment", g = d.type || "application/octet-stream", b = d.size || 0, C = await a("POST", "/attachments", {
|
|
218
218
|
mime_type: g,
|
|
219
219
|
size_bytes: b,
|
|
220
220
|
name: f
|
|
@@ -226,14 +226,14 @@ function We(e) {
|
|
|
226
226
|
if (!M.ok)
|
|
227
227
|
throw new Error(`HTTP ${M.status} PUT signed upload`);
|
|
228
228
|
return {
|
|
229
|
-
type:
|
|
229
|
+
type: Je(g),
|
|
230
230
|
path: C.path,
|
|
231
231
|
mime_type: g,
|
|
232
232
|
size_bytes: b
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
235
|
async function ee(d) {
|
|
236
|
-
return
|
|
236
|
+
return a(
|
|
237
237
|
"GET",
|
|
238
238
|
`/attachments/sign?path=${encodeURIComponent(d)}`
|
|
239
239
|
);
|
|
@@ -246,7 +246,7 @@ function We(e) {
|
|
|
246
246
|
if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
|
|
247
247
|
try {
|
|
248
248
|
const d = new EventSource(te(), { withCredentials: !0 });
|
|
249
|
-
for (const f of
|
|
249
|
+
for (const f of Ke)
|
|
250
250
|
d.addEventListener(f, (g) => ne(f, g.data));
|
|
251
251
|
d.addEventListener(
|
|
252
252
|
"error",
|
|
@@ -270,12 +270,12 @@ function We(e) {
|
|
|
270
270
|
function se() {
|
|
271
271
|
clearTimeout(t.burstTimer), V(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
272
272
|
t.panelOpen || J();
|
|
273
|
-
},
|
|
273
|
+
}, $e));
|
|
274
274
|
}
|
|
275
275
|
function ce(d) {
|
|
276
276
|
t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), V()) : se();
|
|
277
277
|
}
|
|
278
|
-
async function
|
|
278
|
+
async function he() {
|
|
279
279
|
try {
|
|
280
280
|
const d = await B(), f = d.reduce((b, C) => {
|
|
281
281
|
const M = C == null ? void 0 : C.last_message_at;
|
|
@@ -287,16 +287,16 @@ function We(e) {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
function de() {
|
|
290
|
-
|
|
290
|
+
m(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(he, Ve));
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function m() {
|
|
293
293
|
t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function h() {
|
|
296
296
|
if (document.hidden)
|
|
297
297
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
298
|
-
t.hiddenGraceTimer = null, document.hidden && (
|
|
299
|
-
},
|
|
298
|
+
t.hiddenGraceTimer = null, document.hidden && (m(), J(), r("paused"));
|
|
299
|
+
}, We);
|
|
300
300
|
else {
|
|
301
301
|
if (t.hiddenGraceTimer) {
|
|
302
302
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
@@ -306,7 +306,7 @@ function We(e) {
|
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
function _() {
|
|
309
|
-
|
|
309
|
+
m(), 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;
|
|
@@ -323,9 +323,9 @@ function We(e) {
|
|
|
323
323
|
createConversation: A,
|
|
324
324
|
getConversation: H,
|
|
325
325
|
patchConversation: S,
|
|
326
|
-
markConversationRead:
|
|
327
|
-
listMessages:
|
|
328
|
-
postMessage:
|
|
326
|
+
markConversationRead: U,
|
|
327
|
+
listMessages: I,
|
|
328
|
+
postMessage: q,
|
|
329
329
|
postCallback: Y,
|
|
330
330
|
uploadAttachment: Z,
|
|
331
331
|
signAttachment: ee,
|
|
@@ -335,13 +335,13 @@ function We(e) {
|
|
|
335
335
|
}
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Ye(e) {
|
|
339
339
|
return e.endsWith("/") ? e.slice(0, -1) : e;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Je(e) {
|
|
342
342
|
return e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : "file";
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Qe() {
|
|
345
345
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
346
346
|
return crypto.randomUUID();
|
|
347
347
|
const e = new Uint8Array(16);
|
|
@@ -353,8 +353,8 @@ function Je() {
|
|
|
353
353
|
const t = [...e].map((n) => n.toString(16).padStart(2, "0"));
|
|
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
|
-
function
|
|
357
|
-
const t =
|
|
356
|
+
function Xe(e) {
|
|
357
|
+
const t = je({
|
|
358
358
|
ready: !1,
|
|
359
359
|
error: null,
|
|
360
360
|
config: null,
|
|
@@ -386,48 +386,48 @@ function Qe(e) {
|
|
|
386
386
|
connection: "idle"
|
|
387
387
|
}), n = [];
|
|
388
388
|
n.push(
|
|
389
|
-
e.on("connection", (
|
|
390
|
-
t.connection =
|
|
389
|
+
e.on("connection", (m) => {
|
|
390
|
+
t.connection = m;
|
|
391
391
|
})
|
|
392
392
|
), n.push(
|
|
393
|
-
e.on("message", (
|
|
394
|
-
const
|
|
395
|
-
!
|
|
393
|
+
e.on("message", (m) => {
|
|
394
|
+
const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.message;
|
|
395
|
+
!h || !(_ != null && _.id) || (V(h, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(h, _.created_at));
|
|
396
396
|
})
|
|
397
397
|
), n.push(
|
|
398
|
-
e.on("message_stream", (
|
|
399
|
-
const
|
|
400
|
-
!
|
|
398
|
+
e.on("message_stream", (m) => {
|
|
399
|
+
const h = m == null ? void 0 : m.message_id, _ = m == null ? void 0 : m.token;
|
|
400
|
+
!h || typeof _ != "string" || (t.streamingByMsgId[h] = (t.streamingByMsgId[h] || "") + _);
|
|
401
401
|
})
|
|
402
402
|
), n.push(
|
|
403
|
-
e.on("conversation_updated", (
|
|
404
|
-
const
|
|
405
|
-
if (!
|
|
406
|
-
const d = t.conversations.findIndex((f) => f.id ===
|
|
403
|
+
e.on("conversation_updated", (m) => {
|
|
404
|
+
const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.changes;
|
|
405
|
+
if (!h || !_) return;
|
|
406
|
+
const d = t.conversations.findIndex((f) => f.id === h);
|
|
407
407
|
d !== -1 && (t.conversations[d] = {
|
|
408
408
|
...t.conversations[d],
|
|
409
409
|
..._
|
|
410
410
|
});
|
|
411
411
|
})
|
|
412
412
|
), n.push(
|
|
413
|
-
e.on("config_updated", (
|
|
414
|
-
|
|
413
|
+
e.on("config_updated", (m) => {
|
|
414
|
+
m != null && m.config && (t.config = m.config);
|
|
415
415
|
})
|
|
416
416
|
), n.push(
|
|
417
|
-
e.on("action_status", (
|
|
418
|
-
const
|
|
419
|
-
if (!
|
|
420
|
-
const f = t.runningActionsByConv[
|
|
421
|
-
|
|
417
|
+
e.on("action_status", (m) => {
|
|
418
|
+
const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.action_id, d = m == null ? void 0 : m.action_name;
|
|
419
|
+
if (!h || !_) return;
|
|
420
|
+
const f = t.runningActionsByConv[h] || {};
|
|
421
|
+
m.state === "running" ? (f[_] = d || _, t.runningActionsByConv[h] = { ...f }) : m.state === "done" && (delete f[_], t.runningActionsByConv[h] = { ...f });
|
|
422
422
|
})
|
|
423
423
|
), n.push(
|
|
424
|
-
e.on("activity", (
|
|
425
|
-
Array.isArray(
|
|
424
|
+
e.on("activity", (m) => {
|
|
425
|
+
Array.isArray(m == null ? void 0 : m.conversations) && (t.conversations = m.conversations);
|
|
426
426
|
})
|
|
427
427
|
);
|
|
428
|
-
async function i(
|
|
428
|
+
async function i(m) {
|
|
429
429
|
try {
|
|
430
|
-
const
|
|
430
|
+
const h = new Promise(
|
|
431
431
|
(d, f) => setTimeout(
|
|
432
432
|
() => f(
|
|
433
433
|
new Error(
|
|
@@ -437,61 +437,61 @@ function Qe(e) {
|
|
|
437
437
|
15e3
|
|
438
438
|
)
|
|
439
439
|
), _ = await Promise.race([
|
|
440
|
-
e.start(
|
|
441
|
-
|
|
440
|
+
e.start(m),
|
|
441
|
+
h
|
|
442
442
|
]);
|
|
443
443
|
t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
|
|
444
444
|
e.listConversations(),
|
|
445
|
-
|
|
445
|
+
h
|
|
446
446
|
]), t.ready = !0;
|
|
447
|
-
} catch (
|
|
448
|
-
console.error("[store] start failed",
|
|
447
|
+
} catch (h) {
|
|
448
|
+
console.error("[store] start failed", h), t.error = (h == null ? void 0 : h.message) || String(h);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
function r() {
|
|
452
|
-
for (const
|
|
452
|
+
for (const m of n)
|
|
453
453
|
try {
|
|
454
|
-
|
|
454
|
+
m();
|
|
455
455
|
} catch {
|
|
456
456
|
}
|
|
457
457
|
e.stop();
|
|
458
458
|
}
|
|
459
|
-
async function s(
|
|
460
|
-
const
|
|
461
|
-
if (!
|
|
459
|
+
async function s(m) {
|
|
460
|
+
const h = he(m);
|
|
461
|
+
if (!h) return t.customer;
|
|
462
462
|
try {
|
|
463
|
-
const _ = await e.patchCustomer(
|
|
463
|
+
const _ = await e.patchCustomer(h);
|
|
464
464
|
_ && (t.customer = _);
|
|
465
465
|
} catch (_) {
|
|
466
466
|
console.error("[store] applyCustomer failed", _);
|
|
467
467
|
}
|
|
468
468
|
return t.customer;
|
|
469
469
|
}
|
|
470
|
-
async function
|
|
471
|
-
const
|
|
472
|
-
return _ === -1 ? t.conversations = [
|
|
470
|
+
async function a(m = {}) {
|
|
471
|
+
const h = await e.createConversation(m), _ = t.conversations.findIndex((d) => d.id === h.id);
|
|
472
|
+
return _ === -1 ? t.conversations = [h, ...t.conversations] : t.conversations[_] = h, h;
|
|
473
473
|
}
|
|
474
474
|
const l = 50;
|
|
475
|
-
async function p(
|
|
476
|
-
const
|
|
477
|
-
if (!(
|
|
478
|
-
w(
|
|
475
|
+
async function p(m) {
|
|
476
|
+
const h = t.paginationByConv[m];
|
|
477
|
+
if (!(h != null && h.loaded || h != null && h.loading)) {
|
|
478
|
+
w(m, { nextCursor: null, loading: !0, loaded: !1 });
|
|
479
479
|
try {
|
|
480
|
-
const _ = await e.listMessages(
|
|
480
|
+
const _ = await e.listMessages(m, {
|
|
481
481
|
limit: l
|
|
482
|
-
}), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[
|
|
482
|
+
}), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[m] || [], g = /* @__PURE__ */ new Set();
|
|
483
483
|
for (const C of d)
|
|
484
484
|
(C == null ? void 0 : C.id) != null && g.add(`id:${String(C.id)}`), C != null && C.client_msg_id && g.add(`c:${C.client_msg_id}`);
|
|
485
485
|
const b = f.filter((C) => !((C == null ? void 0 : C.id) != null && g.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && g.has(`c:${C.client_msg_id}`)));
|
|
486
|
-
t.messagesByConv[
|
|
486
|
+
t.messagesByConv[m] = [...d, ...b].sort(
|
|
487
487
|
ce
|
|
488
|
-
), w(
|
|
488
|
+
), w(m, {
|
|
489
489
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
490
490
|
loading: !1,
|
|
491
491
|
loaded: !0
|
|
492
492
|
});
|
|
493
493
|
} catch (_) {
|
|
494
|
-
console.error("[store] openConversation failed", _), w(
|
|
494
|
+
console.error("[store] openConversation failed", _), w(m, {
|
|
495
495
|
nextCursor: null,
|
|
496
496
|
loading: !1,
|
|
497
497
|
loaded: !1
|
|
@@ -499,67 +499,67 @@ function Qe(e) {
|
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
async function k(
|
|
502
|
+
async function k(m) {
|
|
503
503
|
var f;
|
|
504
|
-
const
|
|
505
|
-
if (!
|
|
506
|
-
const d = (f = (t.messagesByConv[
|
|
504
|
+
const h = t.paginationByConv[m];
|
|
505
|
+
if (!h || h.loading || !h.nextCursor) return;
|
|
506
|
+
const d = (f = (t.messagesByConv[m] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
|
|
507
507
|
if (d) {
|
|
508
|
-
w(
|
|
508
|
+
w(m, { ...h, loading: !0 });
|
|
509
509
|
try {
|
|
510
|
-
const g = await e.listMessages(
|
|
510
|
+
const g = await e.listMessages(m, {
|
|
511
511
|
before: d,
|
|
512
512
|
limit: l
|
|
513
|
-
}), b = (g == null ? void 0 : g.messages) ?? [], C = t.messagesByConv[
|
|
513
|
+
}), b = (g == null ? void 0 : g.messages) ?? [], C = t.messagesByConv[m] || [], M = /* @__PURE__ */ new Set();
|
|
514
514
|
for (const x of C)
|
|
515
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
|
|
517
|
-
t.messagesByConv[
|
|
516
|
+
const L = b.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[m] = [...L, ...C], w(m, {
|
|
518
518
|
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
519
519
|
loading: !1,
|
|
520
520
|
loaded: !0
|
|
521
521
|
});
|
|
522
522
|
} catch (g) {
|
|
523
|
-
console.error("[store] loadMore failed", g), w(
|
|
523
|
+
console.error("[store] loadMore failed", g), w(m, { ...h, loading: !1 });
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
-
function w(
|
|
528
|
-
t.paginationByConv = { ...t.paginationByConv, [
|
|
527
|
+
function w(m, h) {
|
|
528
|
+
t.paginationByConv = { ...t.paginationByConv, [m]: h };
|
|
529
529
|
}
|
|
530
|
-
async function T(
|
|
531
|
-
const _ = await e.patchConversation(
|
|
530
|
+
async function T(m, h) {
|
|
531
|
+
const _ = await e.patchConversation(m, h), d = t.conversations.findIndex((f) => f.id === m);
|
|
532
532
|
d !== -1 && (t.conversations[d] = _);
|
|
533
533
|
}
|
|
534
|
-
async function B(
|
|
535
|
-
if (!
|
|
536
|
-
const
|
|
534
|
+
async function B(m) {
|
|
535
|
+
if (!m) return [];
|
|
536
|
+
const h = t.messagesByConv[m] || [];
|
|
537
537
|
let _ = "";
|
|
538
|
-
for (const d of
|
|
538
|
+
for (const d of h)
|
|
539
539
|
d != null && d.created_at && d.created_at > _ && (_ = d.created_at);
|
|
540
540
|
try {
|
|
541
541
|
const d = await e.listMessages(
|
|
542
|
-
|
|
542
|
+
m,
|
|
543
543
|
_ ? { since: _ } : {}
|
|
544
544
|
), f = (d == null ? void 0 : d.messages) || [];
|
|
545
545
|
if (!f.length) return [];
|
|
546
546
|
const g = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
|
|
547
|
-
for (const M of
|
|
547
|
+
for (const M of h)
|
|
548
548
|
(M == null ? void 0 : M.id) != null && g.add(String(M.id)), M != null && M.client_msg_id && b.add(M.client_msg_id);
|
|
549
549
|
const C = [];
|
|
550
550
|
for (const M of f) {
|
|
551
|
-
const
|
|
552
|
-
V(
|
|
551
|
+
const L = (M == null ? void 0 : M.id) != null && g.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && b.has(M.client_msg_id);
|
|
552
|
+
V(m, M), L || C.push(M);
|
|
553
553
|
}
|
|
554
554
|
return C;
|
|
555
555
|
} catch (d) {
|
|
556
556
|
return console.error("[store] fetchSinceLast failed", d), [];
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
async function A(
|
|
560
|
-
if (!(!
|
|
559
|
+
async function A(m, h) {
|
|
560
|
+
if (!(!m || h == null))
|
|
561
561
|
try {
|
|
562
|
-
const _ = await e.markConversationRead(
|
|
562
|
+
const _ = await e.markConversationRead(m, h), d = (_ == null ? void 0 : _.last_read_message_id) ?? h, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === m);
|
|
563
563
|
f !== -1 && (t.conversations[f] = {
|
|
564
564
|
...t.conversations[f],
|
|
565
565
|
last_read_message_id: d
|
|
@@ -568,19 +568,19 @@ function Qe(e) {
|
|
|
568
568
|
console.error("[store] markConversationRead failed", _);
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
async function H(
|
|
572
|
-
var
|
|
573
|
-
const f = (
|
|
574
|
-
if (!
|
|
575
|
-
const b =
|
|
571
|
+
async function H(m, h, { attachments: _, metadata: d } = {}) {
|
|
572
|
+
var L;
|
|
573
|
+
const f = (h || "").trim(), g = Array.isArray(_) && _.length > 0;
|
|
574
|
+
if (!m || !f && !g) return;
|
|
575
|
+
const b = Qe(), C = de(m), M = {
|
|
576
576
|
id: b,
|
|
577
577
|
client_msg_id: b,
|
|
578
|
-
conversation_id:
|
|
578
|
+
conversation_id: m,
|
|
579
579
|
type: "content",
|
|
580
580
|
text_md: f,
|
|
581
581
|
author: {
|
|
582
582
|
type: "user",
|
|
583
|
-
id: ((
|
|
583
|
+
id: ((L = t.customer) == null ? void 0 : L.external_id) || null
|
|
584
584
|
},
|
|
585
585
|
created_at: C,
|
|
586
586
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
@@ -588,9 +588,9 @@ function Qe(e) {
|
|
|
588
588
|
...g ? { payload: { type: "content", attachments: _ } } : {},
|
|
589
589
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
590
590
|
};
|
|
591
|
-
V(
|
|
591
|
+
V(m, M);
|
|
592
592
|
try {
|
|
593
|
-
await e.postMessage(
|
|
593
|
+
await e.postMessage(m, {
|
|
594
594
|
client_msg_id: b,
|
|
595
595
|
text_md: f,
|
|
596
596
|
created_at: C,
|
|
@@ -598,32 +598,32 @@ function Qe(e) {
|
|
|
598
598
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
599
599
|
});
|
|
600
600
|
} catch (x) {
|
|
601
|
-
console.error("[store] send failed", x), J(
|
|
601
|
+
console.error("[store] send failed", x), J(m, b, {
|
|
602
602
|
_failed: !0,
|
|
603
603
|
_pending: !1
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
async function S(
|
|
608
|
-
|
|
607
|
+
async function S(m, h, _) {
|
|
608
|
+
m != null && (t.awaitingCallback[m] = !0);
|
|
609
609
|
try {
|
|
610
|
-
await e.postCallback(
|
|
610
|
+
await e.postCallback(m, h, _);
|
|
611
611
|
} catch (d) {
|
|
612
|
-
console.error("[store] callback failed", d),
|
|
612
|
+
console.error("[store] callback failed", d), m != null && delete t.awaitingCallback[m];
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
const
|
|
616
|
-
async function
|
|
617
|
-
if (!
|
|
618
|
-
const
|
|
619
|
-
if (
|
|
620
|
-
const _ =
|
|
621
|
-
if (!_ || _ - Date.now() > 6e4) return
|
|
615
|
+
const U = /* @__PURE__ */ new Map();
|
|
616
|
+
async function I(m) {
|
|
617
|
+
if (!m) return null;
|
|
618
|
+
const h = U.get(m);
|
|
619
|
+
if (h != null && h.url) {
|
|
620
|
+
const _ = h.expires_at ? Date.parse(h.expires_at) : 0;
|
|
621
|
+
if (!_ || _ - Date.now() > 6e4) return h.url;
|
|
622
622
|
}
|
|
623
623
|
try {
|
|
624
|
-
const _ = await e.signAttachment(
|
|
624
|
+
const _ = await e.signAttachment(m);
|
|
625
625
|
if (_ != null && _.signed_url)
|
|
626
|
-
return
|
|
626
|
+
return U.set(m, {
|
|
627
627
|
url: _.signed_url,
|
|
628
628
|
expires_at: _.expires_at
|
|
629
629
|
}), _.signed_url;
|
|
@@ -632,32 +632,32 @@ function Qe(e) {
|
|
|
632
632
|
}
|
|
633
633
|
return null;
|
|
634
634
|
}
|
|
635
|
-
async function
|
|
636
|
-
const d = t.conversations.find((b) => b.id ===
|
|
635
|
+
async function q(m, { rating: h, comment: _ } = {}) {
|
|
636
|
+
const d = t.conversations.find((b) => b.id === m), g = {
|
|
637
637
|
...(d == null ? void 0 : d.metadata) || {},
|
|
638
638
|
feedback: {
|
|
639
|
-
rating:
|
|
639
|
+
rating: h,
|
|
640
640
|
comment: _ || null,
|
|
641
641
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
|
-
await T(
|
|
644
|
+
await T(m, { metadata: g });
|
|
645
645
|
}
|
|
646
|
-
function Y(
|
|
646
|
+
function Y(m) {
|
|
647
647
|
var _, d;
|
|
648
|
-
const
|
|
649
|
-
for (let f =
|
|
650
|
-
const g =
|
|
648
|
+
const h = t.messagesByConv[m] || [];
|
|
649
|
+
for (let f = h.length - 1; f >= 0; f--) {
|
|
650
|
+
const g = h[f];
|
|
651
651
|
if ((g == null ? void 0 : g.type) === "action" && ((_ = g == null ? void 0 : g.payload) == null ? void 0 : _.type) === "action" && ((d = g == null ? void 0 : g.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(g == null ? void 0 : g.callbacks) && g.callbacks.length > 0 && !t.awaitingCallback[g.id])
|
|
652
652
|
return g;
|
|
653
653
|
}
|
|
654
654
|
return null;
|
|
655
655
|
}
|
|
656
|
-
function Z(
|
|
656
|
+
function Z(m) {
|
|
657
657
|
var _, d, f;
|
|
658
|
-
const
|
|
659
|
-
for (let g =
|
|
660
|
-
const b =
|
|
658
|
+
const h = t.messagesByConv[m] || [];
|
|
659
|
+
for (let g = h.length - 1; g >= 0; g--) {
|
|
660
|
+
const b = h[g];
|
|
661
661
|
if (((_ = b == null ? void 0 : b.author) == null ? void 0 : _.type) === "user" || (b == null ? void 0 : b.type) === "action" && ((d = b == null ? void 0 : b.payload) == null ? void 0 : d.state) === "pending")
|
|
662
662
|
return null;
|
|
663
663
|
const C = (f = b == null ? void 0 : b.metadata) == null ? void 0 : f.form;
|
|
@@ -666,91 +666,91 @@ function Qe(e) {
|
|
|
666
666
|
}
|
|
667
667
|
return null;
|
|
668
668
|
}
|
|
669
|
-
function ee(
|
|
670
|
-
const
|
|
671
|
-
if (!
|
|
672
|
-
const _ = Object.keys(
|
|
669
|
+
function ee(m) {
|
|
670
|
+
const h = t.runningActionsByConv[m];
|
|
671
|
+
if (!h) return null;
|
|
672
|
+
const _ = Object.keys(h);
|
|
673
673
|
if (_.length === 0) return null;
|
|
674
674
|
const d = _[0];
|
|
675
|
-
return { id: d, payload: { name:
|
|
675
|
+
return { id: d, payload: { name: h[d] } };
|
|
676
676
|
}
|
|
677
|
-
function te(
|
|
677
|
+
function te(m) {
|
|
678
678
|
var _, d, f, g;
|
|
679
|
-
const
|
|
680
|
-
for (let b =
|
|
681
|
-
const C =
|
|
679
|
+
const h = t.messagesByConv[m] || [];
|
|
680
|
+
for (let b = h.length - 1; b >= 0; b--) {
|
|
681
|
+
const C = h[b];
|
|
682
682
|
if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.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
686
|
const M = (g = C == null ? void 0 : C.metadata) == null ? void 0 : g.suggested_replies;
|
|
687
|
-
return Array.isArray(M) && M.length ? M.map((
|
|
688
|
-
if (typeof
|
|
689
|
-
const x =
|
|
687
|
+
return Array.isArray(M) && M.length ? M.map((L) => {
|
|
688
|
+
if (typeof L == "string") {
|
|
689
|
+
const x = L.trim();
|
|
690
690
|
return x ? { label: x, kind: null } : null;
|
|
691
691
|
}
|
|
692
|
-
if (
|
|
693
|
-
const x =
|
|
692
|
+
if (L && typeof L == "object" && typeof L.label == "string") {
|
|
693
|
+
const x = L.label.trim();
|
|
694
694
|
if (!x) return null;
|
|
695
|
-
const
|
|
696
|
-
return { label: x, kind:
|
|
695
|
+
const De = L.kind === "cta" || L.kind === "choice" || L.kind === "followup" ? L.kind : null;
|
|
696
|
+
return { label: x, kind: De };
|
|
697
697
|
}
|
|
698
698
|
return null;
|
|
699
699
|
}).filter(Boolean).slice(0, 4) : [];
|
|
700
700
|
}
|
|
701
701
|
return [];
|
|
702
702
|
}
|
|
703
|
-
function V(
|
|
703
|
+
function V(m, h) {
|
|
704
704
|
var g;
|
|
705
|
-
const _ = t.messagesByConv[
|
|
705
|
+
const _ = t.messagesByConv[m] || [];
|
|
706
706
|
let d = -1;
|
|
707
|
-
|
|
708
|
-
(b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id ===
|
|
709
|
-
)), d === -1 && (
|
|
707
|
+
h != null && h.client_msg_id && (d = _.findIndex(
|
|
708
|
+
(b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id === h.client_msg_id
|
|
709
|
+
)), d === -1 && (h == null ? void 0 : h.id) !== void 0 && (h == null ? void 0 : h.id) !== null && (d = _.findIndex((b) => ne(b == null ? void 0 : b.id, h.id)));
|
|
710
710
|
let f;
|
|
711
|
-
d === -1 ? f = [..._,
|
|
711
|
+
d === -1 ? f = [..._, h].sort(ce) : (f = _.slice(), f[d] = {
|
|
712
712
|
..._[d],
|
|
713
|
-
...
|
|
713
|
+
...h,
|
|
714
714
|
_pending: !1,
|
|
715
715
|
_failed: !1
|
|
716
|
-
}), t.messagesByConv[
|
|
716
|
+
}), t.messagesByConv[m] = f, (h == null ? void 0 : h.type) === "action" && ((g = h == null ? void 0 : h.payload) != null && g.state) && h.payload.state !== "pending" && (h == null ? void 0 : h.id) != null && t.awaitingCallback[h.id] && delete t.awaitingCallback[h.id];
|
|
717
717
|
}
|
|
718
|
-
function ne(
|
|
719
|
-
return
|
|
718
|
+
function ne(m, h) {
|
|
719
|
+
return m === h ? !0 : m == null || h == null ? !1 : String(m) === String(h);
|
|
720
720
|
}
|
|
721
|
-
function J(
|
|
722
|
-
const d = t.messagesByConv[
|
|
721
|
+
function J(m, h, _) {
|
|
722
|
+
const d = t.messagesByConv[m];
|
|
723
723
|
if (!d) return;
|
|
724
|
-
const f = d.findIndex((b) => b.id ===
|
|
724
|
+
const f = d.findIndex((b) => b.id === h);
|
|
725
725
|
if (f === -1) return;
|
|
726
726
|
const g = d.slice();
|
|
727
|
-
g[f] = { ...d[f], ..._ }, t.messagesByConv[
|
|
727
|
+
g[f] = { ...d[f], ..._ }, t.messagesByConv[m] = g;
|
|
728
728
|
}
|
|
729
|
-
function se(
|
|
730
|
-
const _ = t.conversations.findIndex((f) => f.id ===
|
|
729
|
+
function se(m, h) {
|
|
730
|
+
const _ = t.conversations.findIndex((f) => f.id === m);
|
|
731
731
|
if (_ === -1) return;
|
|
732
732
|
const d = t.conversations[_];
|
|
733
|
-
if (
|
|
733
|
+
if (h && (!d.last_message_at || h > d.last_message_at)) {
|
|
734
734
|
const f = t.conversations.slice();
|
|
735
|
-
f[_] = { ...d, last_message_at:
|
|
735
|
+
f[_] = { ...d, last_message_at: h }, f.sort(
|
|
736
736
|
(g, b) => (b.last_message_at || "").localeCompare(g.last_message_at || "")
|
|
737
737
|
), t.conversations = f;
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
function ce(
|
|
741
|
-
return (
|
|
740
|
+
function ce(m, h) {
|
|
741
|
+
return (m.created_at || "").localeCompare(h.created_at || "");
|
|
742
742
|
}
|
|
743
|
-
function
|
|
744
|
-
if (!
|
|
745
|
-
const
|
|
746
|
-
for (const [d, f] of Object.entries(
|
|
747
|
-
f !== void 0 && (d === "name" || d === "email" || d === "language" ? f != null && String(f).trim() !== "" && (
|
|
748
|
-
return Object.keys(_).length && (
|
|
743
|
+
function he(m) {
|
|
744
|
+
if (!m || typeof m != "object") return null;
|
|
745
|
+
const h = {}, _ = {};
|
|
746
|
+
for (const [d, f] of Object.entries(m))
|
|
747
|
+
f !== void 0 && (d === "name" || d === "email" || d === "language" ? f != null && String(f).trim() !== "" && (h[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[d] = f);
|
|
748
|
+
return Object.keys(_).length && (h.values = _), Object.keys(h).length ? h : null;
|
|
749
749
|
}
|
|
750
|
-
function de(
|
|
751
|
-
const
|
|
750
|
+
function de(m) {
|
|
751
|
+
const h = t.messagesByConv[m] || [];
|
|
752
752
|
let _ = "";
|
|
753
|
-
for (const g of
|
|
753
|
+
for (const g of h)
|
|
754
754
|
g != null && g.created_at && g.created_at > _ && (_ = g.created_at);
|
|
755
755
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
756
756
|
return !_ || d > _ ? d : new Date(Date.parse(_) + 1).toISOString();
|
|
@@ -760,7 +760,7 @@ function Qe(e) {
|
|
|
760
760
|
start: i,
|
|
761
761
|
destroy: r,
|
|
762
762
|
applyCustomer: s,
|
|
763
|
-
createConversation:
|
|
763
|
+
createConversation: a,
|
|
764
764
|
openConversation: p,
|
|
765
765
|
loadMore: k,
|
|
766
766
|
fetchSinceLast: B,
|
|
@@ -768,8 +768,8 @@ function Qe(e) {
|
|
|
768
768
|
markConversationRead: A,
|
|
769
769
|
send: H,
|
|
770
770
|
clickCallback: S,
|
|
771
|
-
signAttachment:
|
|
772
|
-
submitFeedback:
|
|
771
|
+
signAttachment: I,
|
|
772
|
+
submitFeedback: q,
|
|
773
773
|
getPendingApproval: Y,
|
|
774
774
|
getActionInFlight: ee,
|
|
775
775
|
getLatestSuggestions: te,
|
|
@@ -802,16 +802,16 @@ const j = {
|
|
|
802
802
|
"#D97706",
|
|
803
803
|
"#059669"
|
|
804
804
|
];
|
|
805
|
-
function
|
|
805
|
+
function we(e = "") {
|
|
806
806
|
return e ? _e[e.charCodeAt(0) % _e.length] : _e[0];
|
|
807
807
|
}
|
|
808
|
-
function
|
|
808
|
+
function be(e = "") {
|
|
809
809
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function ve(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
|
|
812
812
|
return e.toLocaleTimeString(t, { hour: "2-digit", minute: "2-digit" });
|
|
813
813
|
}
|
|
814
|
-
const
|
|
814
|
+
const Ze = `
|
|
815
815
|
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
|
|
816
816
|
|
|
817
817
|
.wm-root {
|
|
@@ -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
|
-
`,
|
|
860
|
+
`, et = "https://api.messenger.victorc.fr", ae = "fr", tt = ["fr", "en"], Te = { fr: "fr-FR", en: "en-US" }, ge = {
|
|
861
861
|
fr: {
|
|
862
862
|
// ── Common ───────────────────────────────────────────────────────
|
|
863
863
|
"common.newConversation": "Nouvelle conversation",
|
|
@@ -1107,40 +1107,40 @@ I reply within seconds.`,
|
|
|
1107
1107
|
"export.createdOn": "Created on: {date}"
|
|
1108
1108
|
}
|
|
1109
1109
|
};
|
|
1110
|
-
function
|
|
1110
|
+
function ke(e) {
|
|
1111
1111
|
if (typeof e != "string") return ae;
|
|
1112
1112
|
const t = e.trim().toLowerCase().slice(0, 2);
|
|
1113
|
-
return
|
|
1113
|
+
return tt.includes(t) ? t : ae;
|
|
1114
1114
|
}
|
|
1115
1115
|
function re(e) {
|
|
1116
|
-
return
|
|
1116
|
+
return Te[ke(e)] || Te[ae];
|
|
1117
1117
|
}
|
|
1118
1118
|
function D(e) {
|
|
1119
|
-
const t =
|
|
1120
|
-
return function(s,
|
|
1119
|
+
const t = ke(e), n = ge[t] || ge[ae], i = ge[ae];
|
|
1120
|
+
return function(s, a) {
|
|
1121
1121
|
let l = n[s];
|
|
1122
|
-
return l == null && (l = i[s]), l == null ? s : (
|
|
1122
|
+
return l == null && (l = i[s]), l == null ? s : (a && (l = l.replace(
|
|
1123
1123
|
/\{(\w+)\}/g,
|
|
1124
|
-
(p, k) =>
|
|
1124
|
+
(p, k) => a[k] != null ? String(a[k]) : p
|
|
1125
1125
|
)), l);
|
|
1126
1126
|
};
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function xe(e, t) {
|
|
1129
1129
|
if (!Array.isArray(e == null ? void 0 : e.options)) return t;
|
|
1130
1130
|
const n = e.options.find((i) => (i == null ? void 0 : i.value) === t);
|
|
1131
1131
|
return (n == null ? void 0 : n.label) || t;
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1134
|
-
return Array.isArray(t) ? t.map((i) =>
|
|
1133
|
+
function Pe(e, t, n) {
|
|
1134
|
+
return Array.isArray(t) ? t.map((i) => xe(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : xe(e, String(t));
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1136
|
+
function nt(e, t, n = D()) {
|
|
1137
1137
|
if (!e || !t) return "";
|
|
1138
1138
|
const i = Array.isArray(e.fields) ? e.fields : [], r = [];
|
|
1139
1139
|
for (const s of i) {
|
|
1140
1140
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1141
|
-
const
|
|
1142
|
-
if (
|
|
1143
|
-
const l =
|
|
1141
|
+
const a = t[s.key];
|
|
1142
|
+
if (a == null || a === "") continue;
|
|
1143
|
+
const l = Pe(s, a, n);
|
|
1144
1144
|
l && r.push(`${s.label} :
|
|
1145
1145
|
${l}`);
|
|
1146
1146
|
}
|
|
@@ -1148,13 +1148,13 @@ ${l}`);
|
|
|
1148
1148
|
|
|
1149
1149
|
`);
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function st(e, t, n = D()) {
|
|
1152
1152
|
const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1153
1153
|
for (const s of r) {
|
|
1154
1154
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1155
|
-
const
|
|
1156
|
-
if (
|
|
1157
|
-
const l =
|
|
1155
|
+
const a = t == null ? void 0 : t[s.key];
|
|
1156
|
+
if (a == null || a === "") continue;
|
|
1157
|
+
const l = Pe(s, a, n);
|
|
1158
1158
|
if (!l) continue;
|
|
1159
1159
|
const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
|
|
1160
1160
|
`));
|
|
@@ -1178,29 +1178,29 @@ function W(e) {
|
|
|
1178
1178
|
const t = typeof e == "number" ? e : Number(e);
|
|
1179
1179
|
return Number.isFinite(t) ? t : null;
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function Oe(e, t) {
|
|
1182
1182
|
let n = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
|
|
1183
1183
|
for (const i of t)
|
|
1184
1184
|
i != null && i.created_at && i.created_at > n && (n = i.created_at);
|
|
1185
1185
|
return n;
|
|
1186
1186
|
}
|
|
1187
|
-
function
|
|
1187
|
+
function rt(e, t) {
|
|
1188
1188
|
var n, i, r;
|
|
1189
1189
|
for (let s = t.length - 1; s >= 0; s--) {
|
|
1190
|
-
const
|
|
1191
|
-
if (!
|
|
1192
|
-
const l = typeof
|
|
1190
|
+
const a = t[s];
|
|
1191
|
+
if (!a) continue;
|
|
1192
|
+
const l = typeof a.text_md == "string" ? a.text_md.trim() : "";
|
|
1193
1193
|
if (l)
|
|
1194
|
-
return (((n =
|
|
1195
|
-
const p = (i =
|
|
1194
|
+
return (((n = a.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
|
|
1195
|
+
const p = (i = a.payload) == null ? void 0 : i.attachments;
|
|
1196
1196
|
if (Array.isArray(p) && p.length) return "📎 Pièce jointe";
|
|
1197
1197
|
}
|
|
1198
1198
|
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((r = e == null ? void 0 : e.metadata) == null ? void 0 : r.last_preview) || "";
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function it(e, t) {
|
|
1201
1201
|
return (e == null ? void 0 : e.name) || ((e == null ? void 0 : e.type) === "user" ? t("common.you") : (e == null ? void 0 : e.type) === "agent_human" ? t("common.agent") : (e == null ? void 0 : e.type) === "agent_ia" ? t("common.aiAssistant") : t("common.system"));
|
|
1202
1202
|
}
|
|
1203
|
-
function
|
|
1203
|
+
function at(e, t, n, i) {
|
|
1204
1204
|
const r = [
|
|
1205
1205
|
`# ${e.name || n("common.conversation")}`,
|
|
1206
1206
|
e.created_at ? n("export.createdOn", {
|
|
@@ -1210,25 +1210,25 @@ function it(e, t, n, i) {
|
|
|
1210
1210
|
];
|
|
1211
1211
|
for (const s of t) {
|
|
1212
1212
|
if (!s) continue;
|
|
1213
|
-
const
|
|
1214
|
-
if (!
|
|
1215
|
-
const l =
|
|
1216
|
-
r.push(`[${p}] ${l} :`), r.push(
|
|
1213
|
+
const a = (s.text_md || "").trim();
|
|
1214
|
+
if (!a) continue;
|
|
1215
|
+
const l = it(s.author, n), p = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
|
|
1216
|
+
r.push(`[${p}] ${l} :`), r.push(a), r.push("");
|
|
1217
1217
|
}
|
|
1218
1218
|
return r.join(`
|
|
1219
1219
|
`);
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1221
|
+
function ot(e, t, n = D(), i) {
|
|
1222
1222
|
if (!e) return;
|
|
1223
|
-
const r =
|
|
1223
|
+
const r = at(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
|
|
1224
1224
|
try {
|
|
1225
|
-
const
|
|
1226
|
-
l.href =
|
|
1227
|
-
} catch (
|
|
1228
|
-
console.error("[ww-messenger] export failed",
|
|
1225
|
+
const a = URL.createObjectURL(s), l = document.createElement("a");
|
|
1226
|
+
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);
|
|
1227
|
+
} catch (a) {
|
|
1228
|
+
console.error("[ww-messenger] export failed", a);
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
|
-
const
|
|
1231
|
+
const lt = {
|
|
1232
1232
|
data() {
|
|
1233
1233
|
const e = typeof Notification < "u";
|
|
1234
1234
|
return {
|
|
@@ -1362,7 +1362,7 @@ const ot = {
|
|
|
1362
1362
|
},
|
|
1363
1363
|
showBrowserNotification(e, t) {
|
|
1364
1364
|
if (typeof Notification > "u" || Notification.permission !== "granted") return;
|
|
1365
|
-
const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"),
|
|
1365
|
+
const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), a = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = a ? a.slice(0, 140) : this.t("notification.youHaveNewMessage");
|
|
1366
1366
|
try {
|
|
1367
1367
|
const p = new Notification(s, {
|
|
1368
1368
|
body: l,
|
|
@@ -1386,7 +1386,7 @@ const ot = {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
|
-
},
|
|
1389
|
+
}, ct = 450, dt = 50, ut = 900, mt = 12e3, ht = 300, ft = {
|
|
1390
1390
|
data() {
|
|
1391
1391
|
return {
|
|
1392
1392
|
// Map: messageId → ms timestamp once shown.
|
|
@@ -1466,21 +1466,21 @@ const ot = {
|
|
|
1466
1466
|
const t = e == null ? void 0 : e.conversations;
|
|
1467
1467
|
if (!Array.isArray(t) || !this.store) return;
|
|
1468
1468
|
const n = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
|
|
1469
|
-
for (const
|
|
1470
|
-
if (!(
|
|
1471
|
-
const l =
|
|
1469
|
+
for (const a of t) {
|
|
1470
|
+
if (!(a != null && a.id)) continue;
|
|
1471
|
+
const l = a.last_message_at || "";
|
|
1472
1472
|
if (!l) continue;
|
|
1473
|
-
const p = n.get(
|
|
1474
|
-
l > p && i.push(
|
|
1473
|
+
const p = n.get(a.id) || "";
|
|
1474
|
+
l > p && i.push(a.id);
|
|
1475
1475
|
}
|
|
1476
1476
|
this._liveRevealConvSnapshot = new Map(
|
|
1477
|
-
t.map((
|
|
1477
|
+
t.map((a) => [a.id, (a == null ? void 0 : a.last_message_at) || ""])
|
|
1478
1478
|
);
|
|
1479
|
-
for (const
|
|
1479
|
+
for (const a of i)
|
|
1480
1480
|
try {
|
|
1481
|
-
const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r,
|
|
1481
|
+
const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r, a));
|
|
1482
1482
|
if (!Array.isArray(l)) continue;
|
|
1483
|
-
for (const p of l) this.paceLiveMessage(p,
|
|
1483
|
+
for (const p of l) this.paceLiveMessage(p, a);
|
|
1484
1484
|
} catch (l) {
|
|
1485
1485
|
console.error(
|
|
1486
1486
|
"[ww-messenger] activity delta fetch failed",
|
|
@@ -1495,14 +1495,14 @@ const ot = {
|
|
|
1495
1495
|
// bounded by MIN/MAX_TYPING_MS.
|
|
1496
1496
|
scheduleReveal(e, t) {
|
|
1497
1497
|
const n = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, r = Math.min(
|
|
1498
|
-
|
|
1499
|
-
Math.max(
|
|
1500
|
-
),
|
|
1501
|
-
n +
|
|
1498
|
+
mt,
|
|
1499
|
+
Math.max(ut, i * dt)
|
|
1500
|
+
), a = Math.max(
|
|
1501
|
+
n + ct,
|
|
1502
1502
|
this.nextRevealAt + ht
|
|
1503
1503
|
) + r;
|
|
1504
|
-
this.nextRevealAt =
|
|
1505
|
-
const l = Math.max(0,
|
|
1504
|
+
this.nextRevealAt = a;
|
|
1505
|
+
const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
|
|
1506
1506
|
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1507
1507
|
}, l);
|
|
1508
1508
|
this.revealTimers.push(k);
|
|
@@ -1522,8 +1522,8 @@ const ot = {
|
|
|
1522
1522
|
i[s.id] = n;
|
|
1523
1523
|
continue;
|
|
1524
1524
|
}
|
|
1525
|
-
const
|
|
1526
|
-
if (!Number.isFinite(
|
|
1525
|
+
const a = s != null && s.created_at ? Date.parse(s.created_at) : NaN;
|
|
1526
|
+
if (!Number.isFinite(a) || a < this.convOpenedAt) {
|
|
1527
1527
|
i[s.id] = n;
|
|
1528
1528
|
continue;
|
|
1529
1529
|
}
|
|
@@ -1561,7 +1561,7 @@ const ot = {
|
|
|
1561
1561
|
this.revealedAt = { ...this.revealedAt, [e.id]: 0 }, this.scheduleReveal(e, t);
|
|
1562
1562
|
}
|
|
1563
1563
|
}
|
|
1564
|
-
},
|
|
1564
|
+
}, _t = {
|
|
1565
1565
|
data() {
|
|
1566
1566
|
return {
|
|
1567
1567
|
approvalSettled: !0,
|
|
@@ -1591,7 +1591,7 @@ const ot = {
|
|
|
1591
1591
|
}, e);
|
|
1592
1592
|
}
|
|
1593
1593
|
}
|
|
1594
|
-
},
|
|
1594
|
+
}, gt = 300, pt = {
|
|
1595
1595
|
data() {
|
|
1596
1596
|
return {
|
|
1597
1597
|
// Numeric message id snapshot frozen the moment the user
|
|
@@ -1620,9 +1620,9 @@ const ot = {
|
|
|
1620
1620
|
// messages, or when the pointer is already at/ahead of the
|
|
1621
1621
|
// candidate id.
|
|
1622
1622
|
markConvRead(e) {
|
|
1623
|
-
var s,
|
|
1623
|
+
var s, a;
|
|
1624
1624
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1625
|
-
const t = ((
|
|
1625
|
+
const t = ((a = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : a[e.id]) || [], n = vt(t);
|
|
1626
1626
|
if (n == null) return;
|
|
1627
1627
|
const i = W(e.last_read_message_id), r = W(n);
|
|
1628
1628
|
r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
@@ -1631,11 +1631,11 @@ const ot = {
|
|
|
1631
1631
|
l.convId,
|
|
1632
1632
|
l.messageId
|
|
1633
1633
|
);
|
|
1634
|
-
},
|
|
1634
|
+
}, gt))));
|
|
1635
1635
|
}
|
|
1636
1636
|
}
|
|
1637
1637
|
};
|
|
1638
|
-
function
|
|
1638
|
+
function vt(e) {
|
|
1639
1639
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
1640
1640
|
const n = e[t];
|
|
1641
1641
|
if (!(!n || n._pending) && W(n.id) != null)
|
|
@@ -1648,7 +1648,7 @@ const N = (e, t) => {
|
|
|
1648
1648
|
for (const [i, r] of t)
|
|
1649
1649
|
n[i] = r;
|
|
1650
1650
|
return n;
|
|
1651
|
-
},
|
|
1651
|
+
}, yt = {
|
|
1652
1652
|
name: "WmHumanAvatar",
|
|
1653
1653
|
props: {
|
|
1654
1654
|
name: { type: String, default: "" },
|
|
@@ -1662,17 +1662,17 @@ const N = (e, t) => {
|
|
|
1662
1662
|
},
|
|
1663
1663
|
computed: {
|
|
1664
1664
|
bg() {
|
|
1665
|
-
return this.avatarUrl ? "transparent" :
|
|
1665
|
+
return this.avatarUrl ? "transparent" : we(this.name);
|
|
1666
1666
|
},
|
|
1667
1667
|
initials() {
|
|
1668
|
-
return
|
|
1668
|
+
return be(this.name);
|
|
1669
1669
|
}
|
|
1670
1670
|
}
|
|
1671
|
-
},
|
|
1672
|
-
function
|
|
1671
|
+
}, wt = ["src", "alt"];
|
|
1672
|
+
function bt(e, t, n, i, r, s) {
|
|
1673
1673
|
return c(), u("div", {
|
|
1674
1674
|
class: O(["wm-huav", { "wm-huav--tail": n.tail }]),
|
|
1675
|
-
style:
|
|
1675
|
+
style: z({
|
|
1676
1676
|
width: n.size + "px",
|
|
1677
1677
|
height: n.size + "px",
|
|
1678
1678
|
"--wm-avr": Math.round(n.size * 0.32) + "px",
|
|
@@ -1683,15 +1683,15 @@ function wt(e, t, n, i, r, s) {
|
|
|
1683
1683
|
key: 0,
|
|
1684
1684
|
src: n.avatarUrl,
|
|
1685
1685
|
alt: n.name || ""
|
|
1686
|
-
}, null, 8,
|
|
1686
|
+
}, null, 8, wt)) : (c(), u("span", {
|
|
1687
1687
|
key: 1,
|
|
1688
|
-
style:
|
|
1688
|
+
style: z({ fontSize: n.size * 0.36 + "px" })
|
|
1689
1689
|
}, v(s.initials), 5))
|
|
1690
1690
|
], 6);
|
|
1691
1691
|
}
|
|
1692
|
-
const
|
|
1692
|
+
const Ce = /* @__PURE__ */ N(yt, [["render", bt], ["__scopeId", "data-v-14e10c0d"]]), kt = 3, Ct = {
|
|
1693
1693
|
name: "WmLauncher",
|
|
1694
|
-
components: { HumanAvatar:
|
|
1694
|
+
components: { HumanAvatar: Ce },
|
|
1695
1695
|
inject: {
|
|
1696
1696
|
// Translator shared by the Messenger shell; French fallback when
|
|
1697
1697
|
// the component is used standalone.
|
|
@@ -1712,12 +1712,12 @@ const Re = /* @__PURE__ */ N(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
|
|
|
1712
1712
|
// élément en ordre DOM avec un flex column normal). Les plus
|
|
1713
1713
|
// anciens remontent dans la pile.
|
|
1714
1714
|
visiblePeeks() {
|
|
1715
|
-
return this.peeks.slice(0,
|
|
1715
|
+
return this.peeks.slice(0, kt).reverse();
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
},
|
|
1719
|
-
function
|
|
1720
|
-
const
|
|
1718
|
+
}, At = ["aria-label", "onClick", "onKeydown"], St = ["aria-label", "onClick"], Mt = { class: "wm-peek__avatar" }, Tt = ["aria-label"], xt = { class: "wm-peek__body" }, Ot = { class: "wm-peek__head" }, It = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, Et = { class: "wm-peek__text" }, Bt = ["onClick"], Rt = ["aria-label"], Nt = ["aria-label"];
|
|
1719
|
+
function Pt(e, t, n, i, r, s) {
|
|
1720
|
+
const a = R("HumanAvatar");
|
|
1721
1721
|
return c(), u("div", {
|
|
1722
1722
|
class: "wm-launcherWrap",
|
|
1723
1723
|
onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
|
|
@@ -1725,16 +1725,16 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1725
1725
|
onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
|
|
1726
1726
|
onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
|
|
1727
1727
|
}, [
|
|
1728
|
-
K(
|
|
1729
|
-
default:
|
|
1728
|
+
K(Re, { name: "wm-peek" }, {
|
|
1729
|
+
default: Ne(() => [
|
|
1730
1730
|
s.visiblePeeks.length ? (c(), u("div", {
|
|
1731
1731
|
key: 0,
|
|
1732
1732
|
class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1733
1733
|
}, [
|
|
1734
|
-
(c(!0), u(E, null,
|
|
1734
|
+
(c(!0), u(E, null, F(s.visiblePeeks, (l, p) => (c(), u("div", {
|
|
1735
1735
|
key: l.convId,
|
|
1736
1736
|
class: "wm-peek",
|
|
1737
|
-
style:
|
|
1737
|
+
style: z({
|
|
1738
1738
|
"--depth": s.visiblePeeks.length - 1 - p,
|
|
1739
1739
|
zIndex: p + 1
|
|
1740
1740
|
}),
|
|
@@ -1749,13 +1749,13 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1749
1749
|
ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
|
|
1750
1750
|
]
|
|
1751
1751
|
}, [
|
|
1752
|
-
|
|
1752
|
+
o("button", {
|
|
1753
1753
|
type: "button",
|
|
1754
1754
|
class: "wm-peek__close",
|
|
1755
1755
|
"aria-label": s.t("launcher.dismiss"),
|
|
1756
1756
|
onClick: G((k) => e.$emit("dismiss", l.convId), ["stop"])
|
|
1757
1757
|
}, [...t[5] || (t[5] = [
|
|
1758
|
-
|
|
1758
|
+
o("svg", {
|
|
1759
1759
|
width: "9",
|
|
1760
1760
|
height: "9",
|
|
1761
1761
|
viewBox: "0 0 24 24",
|
|
@@ -1766,11 +1766,11 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1766
1766
|
"stroke-linejoin": "round",
|
|
1767
1767
|
"aria-hidden": "true"
|
|
1768
1768
|
}, [
|
|
1769
|
-
|
|
1769
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1770
1770
|
], -1)
|
|
1771
|
-
])], 8,
|
|
1772
|
-
|
|
1773
|
-
K(
|
|
1771
|
+
])], 8, St),
|
|
1772
|
+
o("div", Mt, [
|
|
1773
|
+
K(a, {
|
|
1774
1774
|
name: l.senderName,
|
|
1775
1775
|
"avatar-url": l.senderAvatarUrl,
|
|
1776
1776
|
size: 34
|
|
@@ -1779,32 +1779,32 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1779
1779
|
key: 0,
|
|
1780
1780
|
class: "wm-peek__avatarBadge",
|
|
1781
1781
|
"aria-label": s.t("launcher.unreadMessages", { count: l.count })
|
|
1782
|
-
}, v(l.count > 9 ? "9+" : l.count), 9,
|
|
1782
|
+
}, v(l.count > 9 ? "9+" : l.count), 9, Tt)) : y("", !0)
|
|
1783
1783
|
]),
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1784
|
+
o("div", xt, [
|
|
1785
|
+
o("div", Ot, [
|
|
1786
|
+
o("span", It, v(l.senderName || s.t("common.agent")), 1),
|
|
1787
|
+
o("span", Lt, v(s.t("launcher.repliedToYou")), 1)
|
|
1788
1788
|
]),
|
|
1789
|
-
|
|
1789
|
+
o("p", Et, v(l.preview), 1)
|
|
1790
1790
|
]),
|
|
1791
|
-
|
|
1791
|
+
o("button", {
|
|
1792
1792
|
type: "button",
|
|
1793
1793
|
class: "wm-peek__open",
|
|
1794
1794
|
onClick: G((k) => e.$emit("open", l.convId), ["stop"])
|
|
1795
|
-
}, v(s.t("common.open")), 9,
|
|
1796
|
-
], 44,
|
|
1795
|
+
}, v(s.t("common.open")), 9, Bt)
|
|
1796
|
+
], 44, At))), 128))
|
|
1797
1797
|
], 2)) : y("", !0)
|
|
1798
1798
|
]),
|
|
1799
1799
|
_: 1
|
|
1800
1800
|
}),
|
|
1801
|
-
|
|
1801
|
+
o("button", {
|
|
1802
1802
|
type: "button",
|
|
1803
1803
|
class: "wm-launcher",
|
|
1804
1804
|
"aria-label": s.t("launcher.open"),
|
|
1805
1805
|
onClick: t[0] || (t[0] = (l) => e.$emit("open"))
|
|
1806
1806
|
}, [
|
|
1807
|
-
t[6] || (t[6] =
|
|
1807
|
+
t[6] || (t[6] = o("svg", {
|
|
1808
1808
|
width: "20",
|
|
1809
1809
|
height: "20",
|
|
1810
1810
|
viewBox: "0 0 24 24",
|
|
@@ -1815,7 +1815,7 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1815
1815
|
"stroke-linejoin": "round",
|
|
1816
1816
|
"aria-hidden": "true"
|
|
1817
1817
|
}, [
|
|
1818
|
-
|
|
1818
|
+
o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
1819
1819
|
], -1)),
|
|
1820
1820
|
n.unreadCount > 0 ? (c(), u("span", {
|
|
1821
1821
|
key: 0,
|
|
@@ -1825,11 +1825,11 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1825
1825
|
}) : s.t("launcher.unreadConversationsOne", {
|
|
1826
1826
|
count: n.unreadCount
|
|
1827
1827
|
})
|
|
1828
|
-
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9,
|
|
1829
|
-
], 8,
|
|
1828
|
+
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Nt)) : y("", !0)
|
|
1829
|
+
], 8, Rt)
|
|
1830
1830
|
], 32);
|
|
1831
1831
|
}
|
|
1832
|
-
const
|
|
1832
|
+
const Ut = /* @__PURE__ */ N(Ct, [["render", Pt], ["__scopeId", "data-v-44ddf1a1"]]), Ft = {
|
|
1833
1833
|
name: "WmAIAvatar",
|
|
1834
1834
|
props: {
|
|
1835
1835
|
size: { type: Number, default: 26 },
|
|
@@ -1852,33 +1852,33 @@ const Pt = /* @__PURE__ */ N(kt, [["render", Nt], ["__scopeId", "data-v-44ddf1a1
|
|
|
1852
1852
|
},
|
|
1853
1853
|
computed: {
|
|
1854
1854
|
initials() {
|
|
1855
|
-
return
|
|
1855
|
+
return be(this.name);
|
|
1856
1856
|
},
|
|
1857
1857
|
bgColor() {
|
|
1858
|
-
return
|
|
1858
|
+
return we(this.name);
|
|
1859
1859
|
}
|
|
1860
1860
|
}
|
|
1861
|
-
},
|
|
1861
|
+
}, Dt = {
|
|
1862
1862
|
key: 0,
|
|
1863
1863
|
class: "wm-aiav__pulse"
|
|
1864
|
-
},
|
|
1865
|
-
function
|
|
1864
|
+
}, jt = ["src", "alt"], Ht = ["width", "height"];
|
|
1865
|
+
function zt(e, t, n, i, r, s) {
|
|
1866
1866
|
return c(), u("div", {
|
|
1867
1867
|
class: O(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
1868
|
-
style:
|
|
1868
|
+
style: z({
|
|
1869
1869
|
width: n.size + "px",
|
|
1870
1870
|
height: n.size + "px",
|
|
1871
1871
|
"--wm-avr": n.size * 0.32 + "px"
|
|
1872
1872
|
})
|
|
1873
1873
|
}, [
|
|
1874
|
-
n.pulse ? (c(), u("div",
|
|
1875
|
-
|
|
1874
|
+
n.pulse ? (c(), u("div", Dt)) : y("", !0),
|
|
1875
|
+
o("div", {
|
|
1876
1876
|
class: O(["wm-aiav__inner", {
|
|
1877
1877
|
"wm-aiav__inner--glow": n.pulse,
|
|
1878
1878
|
"wm-aiav__inner--img": !!n.imageUrl,
|
|
1879
1879
|
"wm-aiav__inner--initials": !n.imageUrl && !!s.initials
|
|
1880
1880
|
}]),
|
|
1881
|
-
style:
|
|
1881
|
+
style: z(
|
|
1882
1882
|
!n.imageUrl && s.initials ? { background: s.bgColor } : null
|
|
1883
1883
|
)
|
|
1884
1884
|
}, [
|
|
@@ -1886,9 +1886,9 @@ function Ht(e, t, n, i, r, s) {
|
|
|
1886
1886
|
key: 0,
|
|
1887
1887
|
src: n.imageUrl,
|
|
1888
1888
|
alt: n.name || ""
|
|
1889
|
-
}, null, 8,
|
|
1889
|
+
}, null, 8, jt)) : s.initials ? (c(), u("span", {
|
|
1890
1890
|
key: 1,
|
|
1891
|
-
style:
|
|
1891
|
+
style: z({ fontSize: n.size * 0.36 + "px" })
|
|
1892
1892
|
}, v(s.initials), 5)) : (c(), u("svg", {
|
|
1893
1893
|
key: 2,
|
|
1894
1894
|
width: n.size * 0.5,
|
|
@@ -1897,30 +1897,30 @@ function Ht(e, t, n, i, r, s) {
|
|
|
1897
1897
|
fill: "none",
|
|
1898
1898
|
"aria-hidden": "true"
|
|
1899
1899
|
}, [...t[0] || (t[0] = [
|
|
1900
|
-
|
|
1900
|
+
o("path", {
|
|
1901
1901
|
d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
|
|
1902
1902
|
fill: "white",
|
|
1903
1903
|
opacity: "0.92"
|
|
1904
1904
|
}, null, -1),
|
|
1905
|
-
|
|
1905
|
+
o("circle", {
|
|
1906
1906
|
cx: "19",
|
|
1907
1907
|
cy: "5",
|
|
1908
1908
|
r: "1.5",
|
|
1909
1909
|
fill: "white",
|
|
1910
1910
|
opacity: "0.55"
|
|
1911
1911
|
}, null, -1),
|
|
1912
|
-
|
|
1912
|
+
o("circle", {
|
|
1913
1913
|
cx: "5",
|
|
1914
1914
|
cy: "18",
|
|
1915
1915
|
r: "1",
|
|
1916
1916
|
fill: "white",
|
|
1917
1917
|
opacity: "0.38"
|
|
1918
1918
|
}, null, -1)
|
|
1919
|
-
])], 8,
|
|
1919
|
+
])], 8, Ht))
|
|
1920
1920
|
], 6)
|
|
1921
1921
|
], 6);
|
|
1922
1922
|
}
|
|
1923
|
-
const le = /* @__PURE__ */ N(Ft, [["render",
|
|
1923
|
+
const le = /* @__PURE__ */ N(Ft, [["render", zt], ["__scopeId", "data-v-6f7f685d"]]), qt = {
|
|
1924
1924
|
name: "WmTeamAvatars",
|
|
1925
1925
|
props: {
|
|
1926
1926
|
members: { type: Array, default: () => [] },
|
|
@@ -1936,47 +1936,47 @@ const le = /* @__PURE__ */ N(Ft, [["render", Ht], ["__scopeId", "data-v-6f7f685d
|
|
|
1936
1936
|
},
|
|
1937
1937
|
methods: {
|
|
1938
1938
|
colorFor(e) {
|
|
1939
|
-
return e.avatar_url ? "transparent" :
|
|
1939
|
+
return e.avatar_url ? "transparent" : we(e.name || "");
|
|
1940
1940
|
},
|
|
1941
1941
|
initialsFor(e) {
|
|
1942
|
-
return
|
|
1942
|
+
return be(e.name || "");
|
|
1943
1943
|
}
|
|
1944
1944
|
}
|
|
1945
|
-
},
|
|
1945
|
+
}, Kt = {
|
|
1946
1946
|
key: 0,
|
|
1947
1947
|
class: "wm-team"
|
|
1948
|
-
},
|
|
1948
|
+
}, Vt = ["src", "alt"], $t = { key: 1 }, Wt = {
|
|
1949
1949
|
key: 0,
|
|
1950
1950
|
class: "wm-team__label"
|
|
1951
1951
|
};
|
|
1952
|
-
function
|
|
1953
|
-
return s.visible ? (c(), u("div",
|
|
1954
|
-
|
|
1952
|
+
function Gt(e, t, n, i, r, s) {
|
|
1953
|
+
return s.visible ? (c(), u("div", Kt, [
|
|
1954
|
+
o("div", {
|
|
1955
1955
|
class: "wm-team__stack",
|
|
1956
|
-
style:
|
|
1956
|
+
style: z({ width: s.stackWidth + "px" })
|
|
1957
1957
|
}, [
|
|
1958
|
-
(c(!0), u(E, null,
|
|
1958
|
+
(c(!0), u(E, null, F(n.members.slice(0, 3), (a, l) => (c(), u("div", {
|
|
1959
1959
|
key: l,
|
|
1960
1960
|
class: "wm-team__pill",
|
|
1961
|
-
style:
|
|
1961
|
+
style: z({
|
|
1962
1962
|
left: l * 13 + "px",
|
|
1963
1963
|
zIndex: 3 - l,
|
|
1964
|
-
background: s.colorFor(
|
|
1964
|
+
background: s.colorFor(a)
|
|
1965
1965
|
})
|
|
1966
1966
|
}, [
|
|
1967
|
-
|
|
1967
|
+
a.avatar_url ? (c(), u("img", {
|
|
1968
1968
|
key: 0,
|
|
1969
|
-
src:
|
|
1970
|
-
alt:
|
|
1971
|
-
}, null, 8,
|
|
1969
|
+
src: a.avatar_url,
|
|
1970
|
+
alt: a.name || ""
|
|
1971
|
+
}, null, 8, Vt)) : (c(), u("span", $t, v(s.initialsFor(a)), 1))
|
|
1972
1972
|
], 4))), 128))
|
|
1973
1973
|
], 4),
|
|
1974
|
-
n.responseLabel ? (c(), u("span",
|
|
1974
|
+
n.responseLabel ? (c(), u("span", Wt, v(n.responseLabel), 1)) : y("", !0)
|
|
1975
1975
|
])) : y("", !0);
|
|
1976
1976
|
}
|
|
1977
|
-
const
|
|
1977
|
+
const Yt = /* @__PURE__ */ N(qt, [["render", Gt], ["__scopeId", "data-v-e49a9063"]]), Jt = {
|
|
1978
1978
|
name: "WmHeader",
|
|
1979
|
-
components: { AIAvatar: le, TeamAvatars:
|
|
1979
|
+
components: { AIAvatar: le, TeamAvatars: Yt },
|
|
1980
1980
|
inject: {
|
|
1981
1981
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
1982
1982
|
// translator when the component is used standalone (no provider).
|
|
@@ -2013,16 +2013,16 @@ const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
|
|
|
2013
2013
|
return n;
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
|
-
},
|
|
2016
|
+
}, Qt = { class: "wm-header" }, Xt = ["aria-label"], Zt = {
|
|
2017
2017
|
key: 1,
|
|
2018
2018
|
style: { width: "30px", height: "30px", "flex-shrink": "0" }
|
|
2019
|
-
},
|
|
2019
|
+
}, en = { class: "wm-header__avatar" }, tn = { class: "wm-header__main" }, nn = { class: "wm-header__title" }, sn = {
|
|
2020
2020
|
key: 3,
|
|
2021
2021
|
class: "wm-header__fill"
|
|
2022
|
-
},
|
|
2023
|
-
function
|
|
2024
|
-
const
|
|
2025
|
-
return c(), u("div",
|
|
2022
|
+
}, rn = { class: "wm-header__actions" }, an = ["aria-label", "title"], on = ["aria-label", "title"];
|
|
2023
|
+
function ln(e, t, n, i, r, s) {
|
|
2024
|
+
const a = R("AIAvatar"), l = R("TeamAvatars");
|
|
2025
|
+
return c(), u("div", Qt, [
|
|
2026
2026
|
n.showBack ? (c(), u("button", {
|
|
2027
2027
|
key: 0,
|
|
2028
2028
|
type: "button",
|
|
@@ -2030,7 +2030,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2030
2030
|
"aria-label": s.t("header.backToHome"),
|
|
2031
2031
|
onClick: t[0] || (t[0] = (p) => e.$emit("back"))
|
|
2032
2032
|
}, [...t[3] || (t[3] = [
|
|
2033
|
-
|
|
2033
|
+
o("svg", {
|
|
2034
2034
|
width: "13",
|
|
2035
2035
|
height: "13",
|
|
2036
2036
|
viewBox: "0 0 24 24",
|
|
@@ -2041,27 +2041,27 @@ function on(e, t, n, i, r, s) {
|
|
|
2041
2041
|
"stroke-linejoin": "round",
|
|
2042
2042
|
"aria-hidden": "true"
|
|
2043
2043
|
}, [
|
|
2044
|
-
|
|
2044
|
+
o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2045
2045
|
], -1)
|
|
2046
|
-
])], 8,
|
|
2046
|
+
])], 8, Xt)) : (c(), u("div", Zt)),
|
|
2047
2047
|
n.showIdentity ? (c(), u(E, { key: 2 }, [
|
|
2048
|
-
|
|
2049
|
-
K(
|
|
2048
|
+
o("div", en, [
|
|
2049
|
+
K(a, {
|
|
2050
2050
|
size: 30,
|
|
2051
2051
|
name: n.agentName,
|
|
2052
2052
|
"image-url": n.agentAvatarUrl
|
|
2053
2053
|
}, null, 8, ["name", "image-url"])
|
|
2054
2054
|
]),
|
|
2055
|
-
|
|
2056
|
-
|
|
2055
|
+
o("div", tn, [
|
|
2056
|
+
o("div", nn, v(n.title), 1)
|
|
2057
2057
|
]),
|
|
2058
2058
|
s.hasTeam ? (c(), P(l, {
|
|
2059
2059
|
key: 0,
|
|
2060
2060
|
members: s.displayedTeamMembers,
|
|
2061
2061
|
"response-label": ""
|
|
2062
2062
|
}, null, 8, ["members"])) : y("", !0)
|
|
2063
|
-
], 64)) : (c(), u("div",
|
|
2064
|
-
|
|
2063
|
+
], 64)) : (c(), u("div", sn)),
|
|
2064
|
+
o("div", rn, [
|
|
2065
2065
|
n.showMore ? (c(), u("button", {
|
|
2066
2066
|
key: 0,
|
|
2067
2067
|
type: "button",
|
|
@@ -2070,30 +2070,30 @@ function on(e, t, n, i, r, s) {
|
|
|
2070
2070
|
title: s.t("header.moreOptions"),
|
|
2071
2071
|
onClick: t[1] || (t[1] = (p) => e.$emit("more"))
|
|
2072
2072
|
}, [...t[4] || (t[4] = [
|
|
2073
|
-
|
|
2073
|
+
o("svg", {
|
|
2074
2074
|
width: "13",
|
|
2075
2075
|
height: "13",
|
|
2076
2076
|
viewBox: "0 0 24 24",
|
|
2077
2077
|
fill: "currentColor",
|
|
2078
2078
|
"aria-hidden": "true"
|
|
2079
2079
|
}, [
|
|
2080
|
-
|
|
2080
|
+
o("circle", {
|
|
2081
2081
|
cx: "12",
|
|
2082
2082
|
cy: "5",
|
|
2083
2083
|
r: "1.6"
|
|
2084
2084
|
}),
|
|
2085
|
-
|
|
2085
|
+
o("circle", {
|
|
2086
2086
|
cx: "12",
|
|
2087
2087
|
cy: "12",
|
|
2088
2088
|
r: "1.6"
|
|
2089
2089
|
}),
|
|
2090
|
-
|
|
2090
|
+
o("circle", {
|
|
2091
2091
|
cx: "12",
|
|
2092
2092
|
cy: "19",
|
|
2093
2093
|
r: "1.6"
|
|
2094
2094
|
})
|
|
2095
2095
|
], -1)
|
|
2096
|
-
])], 10,
|
|
2096
|
+
])], 10, an)) : y("", !0),
|
|
2097
2097
|
n.showClose ? (c(), u("button", {
|
|
2098
2098
|
key: 1,
|
|
2099
2099
|
type: "button",
|
|
@@ -2102,7 +2102,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2102
2102
|
title: s.t("header.closeWidget"),
|
|
2103
2103
|
onClick: t[2] || (t[2] = (p) => e.$emit("close"))
|
|
2104
2104
|
}, [...t[5] || (t[5] = [
|
|
2105
|
-
|
|
2105
|
+
o("svg", {
|
|
2106
2106
|
width: "13",
|
|
2107
2107
|
height: "13",
|
|
2108
2108
|
viewBox: "0 0 24 24",
|
|
@@ -2113,36 +2113,36 @@ function on(e, t, n, i, r, s) {
|
|
|
2113
2113
|
"stroke-linejoin": "round",
|
|
2114
2114
|
"aria-hidden": "true"
|
|
2115
2115
|
}, [
|
|
2116
|
-
|
|
2116
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2117
2117
|
], -1)
|
|
2118
|
-
])], 8,
|
|
2118
|
+
])], 8, on)) : y("", !0)
|
|
2119
2119
|
])
|
|
2120
2120
|
]);
|
|
2121
2121
|
}
|
|
2122
|
-
const
|
|
2123
|
-
function
|
|
2122
|
+
const cn = /* @__PURE__ */ N(Jt, [["render", ln], ["__scopeId", "data-v-0da6fbcd"]]);
|
|
2123
|
+
function Ue(e) {
|
|
2124
2124
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2125
2125
|
}
|
|
2126
|
-
function
|
|
2126
|
+
function dn(e) {
|
|
2127
2127
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
|
|
2128
2128
|
}
|
|
2129
|
-
const
|
|
2129
|
+
const Ie = "";
|
|
2130
2130
|
function ie(e) {
|
|
2131
2131
|
let t = e;
|
|
2132
2132
|
const n = [];
|
|
2133
2133
|
return t = t.replace(/`([^`\n]+)`/g, (i, r) => {
|
|
2134
2134
|
const s = n.length;
|
|
2135
|
-
return n.push(r), `${
|
|
2136
|
-
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) =>
|
|
2135
|
+
return n.push(r), `${Ie}CODE${s}${Ie}`;
|
|
2136
|
+
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, r, s) => dn(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;
|
|
2137
2137
|
}
|
|
2138
|
-
function
|
|
2138
|
+
function un(e) {
|
|
2139
2139
|
if (!e) return "";
|
|
2140
2140
|
const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
|
|
2141
|
-
return ie(
|
|
2141
|
+
return ie(Ue(t));
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function mn(e) {
|
|
2144
2144
|
if (!e) return "";
|
|
2145
|
-
const t =
|
|
2145
|
+
const t = Ue(e).split(`
|
|
2146
2146
|
`), n = [];
|
|
2147
2147
|
let i = 0;
|
|
2148
2148
|
for (; i < t.length; ) {
|
|
@@ -2201,15 +2201,15 @@ function un(e) {
|
|
|
2201
2201
|
}
|
|
2202
2202
|
let r = "";
|
|
2203
2203
|
for (let s = 0; s < n.length; s++) {
|
|
2204
|
-
const
|
|
2205
|
-
r +=
|
|
2204
|
+
const a = n[s];
|
|
2205
|
+
r += a.html;
|
|
2206
2206
|
const l = n[s + 1];
|
|
2207
|
-
l &&
|
|
2207
|
+
l && a.type !== "block" && l.type !== "block" && (r += `
|
|
2208
2208
|
`);
|
|
2209
2209
|
}
|
|
2210
2210
|
return r;
|
|
2211
2211
|
}
|
|
2212
|
-
const
|
|
2212
|
+
const Le = {
|
|
2213
2213
|
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",
|
|
2214
2214
|
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",
|
|
2215
2215
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
@@ -2217,7 +2217,7 @@ const xe = {
|
|
|
2217
2217
|
link: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"
|
|
2218
2218
|
}, hn = {
|
|
2219
2219
|
name: "WmOnboarding",
|
|
2220
|
-
components: { AIAvatar: le },
|
|
2220
|
+
components: { AIAvatar: le, HumanAvatar: Ce },
|
|
2221
2221
|
inject: {
|
|
2222
2222
|
// Translator + resolved-language getter shared by the Messenger
|
|
2223
2223
|
// shell. Fall back to French wording when used standalone.
|
|
@@ -2262,10 +2262,48 @@ const xe = {
|
|
|
2262
2262
|
},
|
|
2263
2263
|
methods: {
|
|
2264
2264
|
iconPath(e) {
|
|
2265
|
-
return
|
|
2265
|
+
return Le[e] || Le.link;
|
|
2266
2266
|
},
|
|
2267
2267
|
renderPreview(e) {
|
|
2268
|
-
return
|
|
2268
|
+
return un(e);
|
|
2269
|
+
},
|
|
2270
|
+
// Avatar resolution for a thread row, in priority order :
|
|
2271
|
+
// 1. last sender's `avatar_url` (image)
|
|
2272
|
+
// 2. last sender's `name` (initials on a deterministic colour)
|
|
2273
|
+
// 3. widget's `default_icon_url`, with a muted treatment when the
|
|
2274
|
+
// thread has no unread activity (cf. avatarWrapperClass).
|
|
2275
|
+
avatarComponent(e) {
|
|
2276
|
+
var t;
|
|
2277
|
+
return ((t = e == null ? void 0 : e.author) == null ? void 0 : t.type) === "agent_human" ? "HumanAvatar" : "AIAvatar";
|
|
2278
|
+
},
|
|
2279
|
+
avatarProps(e) {
|
|
2280
|
+
const t = e == null ? void 0 : e.author;
|
|
2281
|
+
return (t == null ? void 0 : t.type) === "agent_human" ? {
|
|
2282
|
+
size: 40,
|
|
2283
|
+
name: t.name || "",
|
|
2284
|
+
avatarUrl: t.avatar_url || null
|
|
2285
|
+
} : t != null && t.avatar_url || t != null && t.name ? {
|
|
2286
|
+
size: 40,
|
|
2287
|
+
name: t.name || "",
|
|
2288
|
+
imageUrl: t.avatar_url || null
|
|
2289
|
+
} : {
|
|
2290
|
+
size: 40,
|
|
2291
|
+
name: "",
|
|
2292
|
+
imageUrl: this.defaultIconUrl
|
|
2293
|
+
};
|
|
2294
|
+
},
|
|
2295
|
+
// True when neither avatar_url nor name is known for the last
|
|
2296
|
+
// sender — we'll display the widget's default icon. Drives the
|
|
2297
|
+
// muted/inverted wrapper class so read default-icon rows recede.
|
|
2298
|
+
isDefaultAvatar(e) {
|
|
2299
|
+
const t = e == null ? void 0 : e.author;
|
|
2300
|
+
return !(t != null && t.avatar_url || t != null && t.name);
|
|
2301
|
+
},
|
|
2302
|
+
// CSS class applied to the avatar wrapper. The default-icon
|
|
2303
|
+
// fallback gets muted when the thread has no unread message, so
|
|
2304
|
+
// caught-up rows visually recede next to the active ones.
|
|
2305
|
+
avatarWrapperClass(e) {
|
|
2306
|
+
return this.isDefaultAvatar(e) && !(e != null && e.unread) ? "wm-onb__avatar--muted" : null;
|
|
2269
2307
|
},
|
|
2270
2308
|
formatTs(e) {
|
|
2271
2309
|
if (!e) return "";
|
|
@@ -2278,8 +2316,8 @@ const xe = {
|
|
|
2278
2316
|
minute: "2-digit"
|
|
2279
2317
|
});
|
|
2280
2318
|
if (i.getTime() - t.getTime() < 7 * 864e5) {
|
|
2281
|
-
const
|
|
2282
|
-
return
|
|
2319
|
+
const a = t.toLocaleDateString(n, { weekday: "short" });
|
|
2320
|
+
return a.charAt(0).toUpperCase() + a.slice(1);
|
|
2283
2321
|
}
|
|
2284
2322
|
return t.toLocaleDateString(n, {
|
|
2285
2323
|
day: "2-digit",
|
|
@@ -2287,10 +2325,10 @@ const xe = {
|
|
|
2287
2325
|
});
|
|
2288
2326
|
}
|
|
2289
2327
|
}
|
|
2290
|
-
},
|
|
2328
|
+
}, fn = { class: "wm-onb" }, _n = { class: "wm-onb__hero" }, gn = { class: "wm-onb__hero-text" }, pn = { class: "wm-onb__title" }, vn = { class: "wm-onb__sub" }, yn = { class: "wm-onb__cta" }, wn = ["disabled"], bn = {
|
|
2291
2329
|
key: 0,
|
|
2292
2330
|
class: "wm-onb__section wm-onb__section--card"
|
|
2293
|
-
},
|
|
2331
|
+
}, kn = { class: "wm-onb__section-title" }, Cn = ["onClick"], An = { class: "wm-onb__card-icon" }, Sn = {
|
|
2294
2332
|
width: "16",
|
|
2295
2333
|
height: "16",
|
|
2296
2334
|
viewBox: "0 0 24 24",
|
|
@@ -2300,33 +2338,30 @@ const xe = {
|
|
|
2300
2338
|
"stroke-linecap": "round",
|
|
2301
2339
|
"stroke-linejoin": "round",
|
|
2302
2340
|
"aria-hidden": "true"
|
|
2303
|
-
},
|
|
2341
|
+
}, Mn = ["d"], Tn = { class: "wm-onb__card-body" }, xn = { class: "wm-onb__card-title" }, On = {
|
|
2304
2342
|
key: 0,
|
|
2305
2343
|
class: "wm-onb__card-sub"
|
|
2306
|
-
},
|
|
2344
|
+
}, In = {
|
|
2307
2345
|
key: 1,
|
|
2308
2346
|
class: "wm-onb__section wm-onb__section--card"
|
|
2309
|
-
}, Ln = { class: "wm-onb__section-title" },
|
|
2347
|
+
}, Ln = { class: "wm-onb__section-title" }, En = { class: "wm-onb__alertList" }, Bn = ["onClick"], Rn = ["aria-label"], Nn = { class: "wm-onb__alert-body" }, Pn = { class: "wm-onb__alert-title" }, Un = ["innerHTML"], Fn = { class: "wm-onb__alert-meta" }, Dn = {
|
|
2310
2348
|
key: 0,
|
|
2311
|
-
class: "wm-onb__alert-statusSep"
|
|
2312
|
-
}, Pn = {
|
|
2313
|
-
key: 1,
|
|
2314
2349
|
class: "wm-onb__alert-time"
|
|
2315
|
-
},
|
|
2350
|
+
}, jn = { class: "wm-onb__alert-resume" }, Hn = {
|
|
2316
2351
|
key: 2,
|
|
2317
2352
|
class: "wm-onb__section wm-onb__section--card"
|
|
2318
|
-
},
|
|
2353
|
+
}, zn = { class: "wm-onb__section-title" }, qn = { class: "wm-onb__search" }, Kn = ["placeholder", "aria-label"], Vn = { class: "wm-onb__list" }, $n = ["onClick"], Wn = ["aria-label"], Gn = { class: "wm-onb__thread-body" }, Yn = { class: "wm-onb__thread-title" }, Jn = ["innerHTML"], Qn = { class: "wm-onb__thread-meta" }, Xn = {
|
|
2319
2354
|
key: 0,
|
|
2320
2355
|
class: "wm-onb__thread-time"
|
|
2321
|
-
},
|
|
2356
|
+
}, Zn = {
|
|
2322
2357
|
key: 0,
|
|
2323
2358
|
class: "wm-onb__empty"
|
|
2324
2359
|
};
|
|
2325
|
-
function
|
|
2326
|
-
const
|
|
2327
|
-
return c(), u("div",
|
|
2328
|
-
|
|
2329
|
-
t[2] || (t[2] =
|
|
2360
|
+
function es(e, t, n, i, r, s) {
|
|
2361
|
+
const a = R("AIAvatar");
|
|
2362
|
+
return c(), u("div", fn, [
|
|
2363
|
+
o("div", _n, [
|
|
2364
|
+
t[2] || (t[2] = o("svg", {
|
|
2330
2365
|
class: "wm-onb__hero-deco",
|
|
2331
2366
|
width: "180",
|
|
2332
2367
|
height: "180",
|
|
@@ -2334,7 +2369,7 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2334
2369
|
fill: "none",
|
|
2335
2370
|
"aria-hidden": "true"
|
|
2336
2371
|
}, [
|
|
2337
|
-
|
|
2372
|
+
o("circle", {
|
|
2338
2373
|
cx: "170",
|
|
2339
2374
|
cy: "10",
|
|
2340
2375
|
r: "105",
|
|
@@ -2343,7 +2378,7 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2343
2378
|
"stroke-dasharray": "1 5",
|
|
2344
2379
|
opacity: "0.35"
|
|
2345
2380
|
}),
|
|
2346
|
-
|
|
2381
|
+
o("circle", {
|
|
2347
2382
|
cx: "170",
|
|
2348
2383
|
cy: "10",
|
|
2349
2384
|
r: "72",
|
|
@@ -2352,7 +2387,7 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2352
2387
|
"stroke-dasharray": "1 5",
|
|
2353
2388
|
opacity: "0.5"
|
|
2354
2389
|
}),
|
|
2355
|
-
|
|
2390
|
+
o("circle", {
|
|
2356
2391
|
cx: "152",
|
|
2357
2392
|
cy: "34",
|
|
2358
2393
|
r: "2.5",
|
|
@@ -2360,24 +2395,24 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2360
2395
|
opacity: "0.65"
|
|
2361
2396
|
})
|
|
2362
2397
|
], -1)),
|
|
2363
|
-
K(
|
|
2398
|
+
K(a, {
|
|
2364
2399
|
size: 52,
|
|
2365
2400
|
"image-url": n.defaultIconUrl
|
|
2366
2401
|
}, null, 8, ["image-url"]),
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2402
|
+
o("div", gn, [
|
|
2403
|
+
o("div", pn, v(s.heroTitle), 1),
|
|
2404
|
+
o("div", vn, v(s.heroSub), 1)
|
|
2370
2405
|
])
|
|
2371
2406
|
]),
|
|
2372
|
-
|
|
2373
|
-
|
|
2407
|
+
o("div", yn, [
|
|
2408
|
+
o("button", {
|
|
2374
2409
|
type: "button",
|
|
2375
2410
|
class: "wm-onb__startBtn",
|
|
2376
2411
|
disabled: n.busy,
|
|
2377
2412
|
onClick: t[0] || (t[0] = (l) => e.$emit("start"))
|
|
2378
2413
|
}, [
|
|
2379
|
-
t[3] || (t[3] =
|
|
2380
|
-
|
|
2414
|
+
t[3] || (t[3] = o("span", { class: "wm-onb__startIcon" }, [
|
|
2415
|
+
o("svg", {
|
|
2381
2416
|
width: "12",
|
|
2382
2417
|
height: "12",
|
|
2383
2418
|
viewBox: "0 0 24 24",
|
|
@@ -2388,84 +2423,74 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2388
2423
|
"stroke-linejoin": "round",
|
|
2389
2424
|
"aria-hidden": "true"
|
|
2390
2425
|
}, [
|
|
2391
|
-
|
|
2426
|
+
o("path", { d: "M12 5v14M5 12h14" })
|
|
2392
2427
|
])
|
|
2393
2428
|
], -1)),
|
|
2394
|
-
|
|
2395
|
-
], 8,
|
|
2429
|
+
o("span", null, v(n.busy ? "…" : s.t("onboarding.start")), 1)
|
|
2430
|
+
], 8, wn)
|
|
2396
2431
|
]),
|
|
2397
|
-
n.quickLinks.length ? (c(), u("div",
|
|
2398
|
-
|
|
2399
|
-
|
|
2432
|
+
n.quickLinks.length ? (c(), u("div", bn, [
|
|
2433
|
+
o("div", kn, v(s.t("onboarding.quickAccess")), 1),
|
|
2434
|
+
o("div", {
|
|
2400
2435
|
class: O(s.quickLinksLayout)
|
|
2401
2436
|
}, [
|
|
2402
|
-
(c(!0), u(E, null,
|
|
2437
|
+
(c(!0), u(E, null, F(n.quickLinks, (l, p) => (c(), u("button", {
|
|
2403
2438
|
key: p,
|
|
2404
2439
|
type: "button",
|
|
2405
2440
|
class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
|
|
2406
2441
|
onClick: (k) => e.$emit("select", l)
|
|
2407
2442
|
}, [
|
|
2408
|
-
|
|
2409
|
-
(c(), u("svg",
|
|
2410
|
-
|
|
2443
|
+
o("span", An, [
|
|
2444
|
+
(c(), u("svg", Sn, [
|
|
2445
|
+
o("path", {
|
|
2411
2446
|
d: s.iconPath(l.icon)
|
|
2412
|
-
}, null, 8,
|
|
2447
|
+
}, null, 8, Mn)
|
|
2413
2448
|
]))
|
|
2414
2449
|
]),
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
l.description ? (c(), u("span",
|
|
2450
|
+
o("span", Tn, [
|
|
2451
|
+
o("span", xn, v(l.label), 1),
|
|
2452
|
+
l.description ? (c(), u("span", On, v(l.description), 1)) : y("", !0)
|
|
2418
2453
|
])
|
|
2419
|
-
], 10,
|
|
2454
|
+
], 10, Cn))), 128))
|
|
2420
2455
|
], 2)
|
|
2421
2456
|
])) : y("", !0),
|
|
2422
|
-
s.unreadThreads.length ? (c(), u("div",
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
(c(!0), u(E, null,
|
|
2457
|
+
s.unreadThreads.length ? (c(), u("div", In, [
|
|
2458
|
+
o("div", Ln, v(s.t("onboarding.unreadConversations")), 1),
|
|
2459
|
+
o("div", En, [
|
|
2460
|
+
(c(!0), u(E, null, F(s.unreadThreads, (l) => (c(), u("button", {
|
|
2426
2461
|
key: l.id,
|
|
2427
|
-
|
|
2462
|
+
type: "button",
|
|
2463
|
+
class: "wm-onb__alert",
|
|
2464
|
+
onClick: (p) => e.$emit("resume", l)
|
|
2428
2465
|
}, [
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
"aria-
|
|
2436
|
-
},
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
})
|
|
2442
|
-
])
|
|
2443
|
-
], -1)),
|
|
2444
|
-
a("span", En, [
|
|
2445
|
-
a("span", Bn, [
|
|
2446
|
-
a("span", Rn, v(s.t("onboarding.statusInProgress")), 1),
|
|
2447
|
-
s.formatTs(l._ts) ? (c(), u("span", Nn, "·")) : y("", !0),
|
|
2448
|
-
s.formatTs(l._ts) ? (c(), u("span", Pn, v(s.formatTs(l._ts)), 1)) : y("", !0)
|
|
2449
|
-
]),
|
|
2450
|
-
a("span", Fn, v(l.title), 1),
|
|
2451
|
-
a("span", {
|
|
2466
|
+
o("span", {
|
|
2467
|
+
class: O(["wm-onb__alert-avatar", s.avatarWrapperClass(l)])
|
|
2468
|
+
}, [
|
|
2469
|
+
(c(), P(pe(s.avatarComponent(l)), Se({ ref_for: !0 }, s.avatarProps(l)), null, 16)),
|
|
2470
|
+
o("span", {
|
|
2471
|
+
class: "wm-onb__alert-dot",
|
|
2472
|
+
"aria-label": s.t("onboarding.unread")
|
|
2473
|
+
}, null, 8, Rn)
|
|
2474
|
+
], 2),
|
|
2475
|
+
o("span", Nn, [
|
|
2476
|
+
o("span", Pn, v(l.title), 1),
|
|
2477
|
+
o("span", {
|
|
2452
2478
|
class: "wm-onb__alert-preview",
|
|
2453
2479
|
innerHTML: s.renderPreview(l.preview)
|
|
2454
2480
|
}, null, 8, Un)
|
|
2455
2481
|
]),
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
]))), 128))
|
|
2482
|
+
o("span", Fn, [
|
|
2483
|
+
s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : y("", !0),
|
|
2484
|
+
o("span", jn, v(s.t("onboarding.resume")), 1)
|
|
2485
|
+
])
|
|
2486
|
+
], 8, Bn))), 128))
|
|
2462
2487
|
])
|
|
2463
2488
|
])) : y("", !0),
|
|
2464
|
-
n.openThreads.length ? (c(), u("div",
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
t[
|
|
2468
|
-
|
|
2489
|
+
n.openThreads.length ? (c(), u("div", Hn, [
|
|
2490
|
+
o("div", zn, v(s.t("onboarding.recentConversations")), 1),
|
|
2491
|
+
o("div", qn, [
|
|
2492
|
+
t[4] || (t[4] = o("span", { class: "wm-onb__searchIcon" }, [
|
|
2493
|
+
o("svg", {
|
|
2469
2494
|
width: "12",
|
|
2470
2495
|
height: "12",
|
|
2471
2496
|
viewBox: "0 0 24 24",
|
|
@@ -2476,57 +2501,45 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2476
2501
|
"stroke-linejoin": "round",
|
|
2477
2502
|
"aria-hidden": "true"
|
|
2478
2503
|
}, [
|
|
2479
|
-
|
|
2504
|
+
o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
2480
2505
|
])
|
|
2481
2506
|
], -1)),
|
|
2482
|
-
$(
|
|
2507
|
+
$(o("input", {
|
|
2483
2508
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
|
|
2484
2509
|
type: "text",
|
|
2485
2510
|
placeholder: s.t("onboarding.search"),
|
|
2486
2511
|
"aria-label": s.t("onboarding.search")
|
|
2487
|
-
}, null, 8,
|
|
2512
|
+
}, null, 8, Kn), [
|
|
2488
2513
|
[X, r.query]
|
|
2489
2514
|
])
|
|
2490
2515
|
]),
|
|
2491
|
-
|
|
2492
|
-
(c(!0), u(E, null,
|
|
2516
|
+
o("div", Vn, [
|
|
2517
|
+
(c(!0), u(E, null, F(s.filteredThreads, (l) => (c(), u("button", {
|
|
2493
2518
|
key: l.id,
|
|
2494
2519
|
type: "button",
|
|
2495
2520
|
class: "wm-onb__thread",
|
|
2496
2521
|
onClick: (p) => e.$emit("resume", l)
|
|
2497
2522
|
}, [
|
|
2498
|
-
|
|
2499
|
-
class: O(["wm-onb__thread-
|
|
2523
|
+
o("span", {
|
|
2524
|
+
class: O(["wm-onb__thread-avatar", s.avatarWrapperClass(l)])
|
|
2500
2525
|
}, [
|
|
2501
|
-
|
|
2502
|
-
width: "18",
|
|
2503
|
-
height: "18",
|
|
2504
|
-
viewBox: "0 0 24 24",
|
|
2505
|
-
fill: "none",
|
|
2506
|
-
"aria-hidden": "true"
|
|
2507
|
-
}, [
|
|
2508
|
-
a("path", {
|
|
2509
|
-
d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
|
|
2510
|
-
fill: "currentColor",
|
|
2511
|
-
opacity: "0.92"
|
|
2512
|
-
})
|
|
2513
|
-
], -1)),
|
|
2526
|
+
(c(), P(pe(s.avatarComponent(l)), Se({ ref_for: !0 }, s.avatarProps(l)), null, 16)),
|
|
2514
2527
|
l.unread ? (c(), u("span", {
|
|
2515
2528
|
key: 0,
|
|
2516
2529
|
class: "wm-onb__thread-dot",
|
|
2517
2530
|
"aria-label": s.t("onboarding.unread")
|
|
2518
|
-
}, null, 8,
|
|
2531
|
+
}, null, 8, Wn)) : y("", !0)
|
|
2519
2532
|
], 2),
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2533
|
+
o("span", Gn, [
|
|
2534
|
+
o("span", Yn, v(l.title), 1),
|
|
2535
|
+
o("span", {
|
|
2523
2536
|
class: "wm-onb__thread-preview",
|
|
2524
2537
|
innerHTML: s.renderPreview(l.preview)
|
|
2525
|
-
}, null, 8,
|
|
2538
|
+
}, null, 8, Jn)
|
|
2526
2539
|
]),
|
|
2527
|
-
|
|
2528
|
-
s.formatTs(l._ts) ? (c(), u("span",
|
|
2529
|
-
t[
|
|
2540
|
+
o("span", Qn, [
|
|
2541
|
+
s.formatTs(l._ts) ? (c(), u("span", Xn, v(s.formatTs(l._ts)), 1)) : y("", !0),
|
|
2542
|
+
t[5] || (t[5] = o("svg", {
|
|
2530
2543
|
width: "14",
|
|
2531
2544
|
height: "14",
|
|
2532
2545
|
viewBox: "0 0 24 24",
|
|
@@ -2538,20 +2551,20 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2538
2551
|
class: "wm-onb__thread-chev",
|
|
2539
2552
|
"aria-hidden": "true"
|
|
2540
2553
|
}, [
|
|
2541
|
-
|
|
2554
|
+
o("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2542
2555
|
], -1))
|
|
2543
2556
|
])
|
|
2544
|
-
], 8,
|
|
2545
|
-
s.filteredThreads.length ? y("", !0) : (c(), u("div",
|
|
2557
|
+
], 8, $n))), 128)),
|
|
2558
|
+
s.filteredThreads.length ? y("", !0) : (c(), u("div", Zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2546
2559
|
])
|
|
2547
2560
|
])) : y("", !0)
|
|
2548
2561
|
]);
|
|
2549
2562
|
}
|
|
2550
|
-
const
|
|
2551
|
-
function
|
|
2563
|
+
const ts = /* @__PURE__ */ N(hn, [["render", es], ["__scopeId", "data-v-198aa077"]]);
|
|
2564
|
+
function ns(e) {
|
|
2552
2565
|
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();
|
|
2553
2566
|
}
|
|
2554
|
-
const
|
|
2567
|
+
const ss = {
|
|
2555
2568
|
name: "WmActionResult",
|
|
2556
2569
|
props: {
|
|
2557
2570
|
state: { type: String, default: "success" },
|
|
@@ -2561,13 +2574,13 @@ const ns = {
|
|
|
2561
2574
|
},
|
|
2562
2575
|
computed: {
|
|
2563
2576
|
detailText() {
|
|
2564
|
-
return
|
|
2577
|
+
return ns(this.detail);
|
|
2565
2578
|
}
|
|
2566
2579
|
}
|
|
2567
|
-
},
|
|
2580
|
+
}, rs = {
|
|
2568
2581
|
class: "wm-result__icon",
|
|
2569
2582
|
"aria-hidden": "true"
|
|
2570
|
-
},
|
|
2583
|
+
}, is = {
|
|
2571
2584
|
key: 0,
|
|
2572
2585
|
width: "11",
|
|
2573
2586
|
height: "11",
|
|
@@ -2577,7 +2590,7 @@ const ns = {
|
|
|
2577
2590
|
"stroke-width": "2.8",
|
|
2578
2591
|
"stroke-linecap": "round",
|
|
2579
2592
|
"stroke-linejoin": "round"
|
|
2580
|
-
},
|
|
2593
|
+
}, as = {
|
|
2581
2594
|
key: 1,
|
|
2582
2595
|
width: "11",
|
|
2583
2596
|
height: "11",
|
|
@@ -2587,7 +2600,7 @@ const ns = {
|
|
|
2587
2600
|
"stroke-width": "2.6",
|
|
2588
2601
|
"stroke-linecap": "round",
|
|
2589
2602
|
"stroke-linejoin": "round"
|
|
2590
|
-
},
|
|
2603
|
+
}, os = {
|
|
2591
2604
|
key: 2,
|
|
2592
2605
|
width: "11",
|
|
2593
2606
|
height: "11",
|
|
@@ -2597,7 +2610,7 @@ const ns = {
|
|
|
2597
2610
|
"stroke-width": "2.4",
|
|
2598
2611
|
"stroke-linecap": "round",
|
|
2599
2612
|
"stroke-linejoin": "round"
|
|
2600
|
-
},
|
|
2613
|
+
}, ls = {
|
|
2601
2614
|
key: 3,
|
|
2602
2615
|
width: "12",
|
|
2603
2616
|
height: "12",
|
|
@@ -2607,32 +2620,32 @@ const ns = {
|
|
|
2607
2620
|
"stroke-width": "2.2",
|
|
2608
2621
|
"stroke-linecap": "round",
|
|
2609
2622
|
"stroke-linejoin": "round"
|
|
2610
|
-
},
|
|
2611
|
-
function
|
|
2623
|
+
}, cs = { class: "wm-result__body" }, ds = { class: "wm-result__label" }, us = { class: "wm-result__detail" };
|
|
2624
|
+
function ms(e, t, n, i, r, s) {
|
|
2612
2625
|
return c(), u("div", {
|
|
2613
2626
|
class: O(["wm-result", `wm-result--${n.state}`])
|
|
2614
2627
|
}, [
|
|
2615
|
-
|
|
2616
|
-
n.state === "success" ? (c(), u("svg",
|
|
2617
|
-
|
|
2618
|
-
])])) : n.state === "rejected" ? (c(), u("svg",
|
|
2619
|
-
|
|
2620
|
-
])])) : n.state === "awaiting" ? (c(), u("svg",
|
|
2621
|
-
|
|
2628
|
+
o("span", rs, [
|
|
2629
|
+
n.state === "success" ? (c(), u("svg", is, [...t[0] || (t[0] = [
|
|
2630
|
+
o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2631
|
+
])])) : n.state === "rejected" ? (c(), u("svg", as, [...t[1] || (t[1] = [
|
|
2632
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2633
|
+
])])) : n.state === "awaiting" ? (c(), u("svg", os, [...t[2] || (t[2] = [
|
|
2634
|
+
o("circle", {
|
|
2622
2635
|
cx: "12",
|
|
2623
2636
|
cy: "12",
|
|
2624
2637
|
r: "10"
|
|
2625
2638
|
}, null, -1),
|
|
2626
|
-
|
|
2627
|
-
])])) : (c(), u("svg",
|
|
2628
|
-
|
|
2629
|
-
|
|
2639
|
+
o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2640
|
+
])])) : (c(), u("svg", ls, [...t[3] || (t[3] = [
|
|
2641
|
+
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),
|
|
2642
|
+
o("line", {
|
|
2630
2643
|
x1: "12",
|
|
2631
2644
|
y1: "9",
|
|
2632
2645
|
x2: "12",
|
|
2633
2646
|
y2: "13"
|
|
2634
2647
|
}, null, -1),
|
|
2635
|
-
|
|
2648
|
+
o("line", {
|
|
2636
2649
|
x1: "12",
|
|
2637
2650
|
y1: "17",
|
|
2638
2651
|
x2: "12.01",
|
|
@@ -2640,19 +2653,19 @@ function us(e, t, n, i, r, s) {
|
|
|
2640
2653
|
}, null, -1)
|
|
2641
2654
|
])]))
|
|
2642
2655
|
]),
|
|
2643
|
-
|
|
2644
|
-
|
|
2656
|
+
o("span", cs, [
|
|
2657
|
+
o("span", ds, v(n.label), 1),
|
|
2645
2658
|
s.detailText ? (c(), u(E, { key: 0 }, [
|
|
2646
|
-
t[4] || (t[4] =
|
|
2659
|
+
t[4] || (t[4] = o("span", {
|
|
2647
2660
|
class: "wm-result__sep",
|
|
2648
2661
|
"aria-hidden": "true"
|
|
2649
2662
|
}, " · ", -1)),
|
|
2650
|
-
|
|
2663
|
+
o("span", us, v(s.detailText), 1)
|
|
2651
2664
|
], 64)) : y("", !0)
|
|
2652
2665
|
])
|
|
2653
2666
|
], 2);
|
|
2654
2667
|
}
|
|
2655
|
-
const hs = /* @__PURE__ */ N(
|
|
2668
|
+
const hs = /* @__PURE__ */ N(ss, [["render", ms], ["__scopeId", "data-v-7284acd0"]]), fs = {
|
|
2656
2669
|
name: "WmArtifactFormResponse",
|
|
2657
2670
|
inject: {
|
|
2658
2671
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -2668,13 +2681,13 @@ const hs = /* @__PURE__ */ N(ns, [["render", us], ["__scopeId", "data-v-7284acd0
|
|
|
2668
2681
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2669
2682
|
}
|
|
2670
2683
|
}
|
|
2671
|
-
},
|
|
2672
|
-
function
|
|
2673
|
-
return c(), u("div",
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
t[0] || (t[0] =
|
|
2684
|
+
}, _s = { class: "wm-art wm-art--formResponse" }, gs = { class: "wm-art__head" }, ps = { class: "wm-art__title" }, vs = { class: "wm-art__badge wm-art__badge--success" }, ys = { class: "wm-art__body" }, ws = { class: "wm-art__fieldLabel" };
|
|
2685
|
+
function bs(e, t, n, i, r, s) {
|
|
2686
|
+
return c(), u("div", _s, [
|
|
2687
|
+
o("div", gs, [
|
|
2688
|
+
o("div", ps, v(n.data.title || s.t("form.title")), 1),
|
|
2689
|
+
o("span", vs, [
|
|
2690
|
+
t[0] || (t[0] = o("svg", {
|
|
2678
2691
|
width: "11",
|
|
2679
2692
|
height: "11",
|
|
2680
2693
|
viewBox: "0 0 24 24",
|
|
@@ -2685,28 +2698,28 @@ function ws(e, t, n, i, r, s) {
|
|
|
2685
2698
|
"stroke-linejoin": "round",
|
|
2686
2699
|
"aria-hidden": "true"
|
|
2687
2700
|
}, [
|
|
2688
|
-
|
|
2701
|
+
o("polyline", { points: "20 6 9 17 4 12" })
|
|
2689
2702
|
], -1)),
|
|
2690
|
-
|
|
2703
|
+
ye(" " + v(s.t("form.sent")), 1)
|
|
2691
2704
|
])
|
|
2692
2705
|
]),
|
|
2693
|
-
|
|
2694
|
-
(c(!0), u(E, null,
|
|
2706
|
+
o("div", ys, [
|
|
2707
|
+
(c(!0), u(E, null, F(s.fields, (a, l) => (c(), u("div", {
|
|
2695
2708
|
key: l,
|
|
2696
2709
|
class: "wm-art__field"
|
|
2697
2710
|
}, [
|
|
2698
|
-
|
|
2699
|
-
|
|
2711
|
+
o("div", ws, v(a.label), 1),
|
|
2712
|
+
o("div", {
|
|
2700
2713
|
class: O([
|
|
2701
2714
|
"wm-art__fieldValue",
|
|
2702
|
-
{ "wm-art__fieldValue--multi":
|
|
2715
|
+
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2703
2716
|
])
|
|
2704
|
-
}, v(
|
|
2717
|
+
}, v(a.value), 3)
|
|
2705
2718
|
]))), 128))
|
|
2706
2719
|
])
|
|
2707
2720
|
]);
|
|
2708
2721
|
}
|
|
2709
|
-
const
|
|
2722
|
+
const ks = /* @__PURE__ */ N(fs, [["render", bs], ["__scopeId", "data-v-713aecf1"]]), Cs = {
|
|
2710
2723
|
name: "WmArtifactInfoCard",
|
|
2711
2724
|
props: {
|
|
2712
2725
|
data: { type: Object, required: !0 }
|
|
@@ -2721,32 +2734,32 @@ const bs = /* @__PURE__ */ N(ms, [["render", ws], ["__scopeId", "data-v-713aecf1
|
|
|
2721
2734
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
2722
2735
|
}
|
|
2723
2736
|
}
|
|
2724
|
-
},
|
|
2737
|
+
}, As = { class: "wm-art wm-art--infoCard" }, Ss = {
|
|
2725
2738
|
key: 0,
|
|
2726
2739
|
class: "wm-art__image"
|
|
2727
|
-
},
|
|
2740
|
+
}, Ms = ["src", "alt"], Ts = { class: "wm-art__head" }, xs = { class: "wm-art__headMain" }, Os = { class: "wm-art__title" }, Is = {
|
|
2728
2741
|
key: 0,
|
|
2729
2742
|
class: "wm-art__subtitle"
|
|
2730
2743
|
}, Ls = {
|
|
2731
2744
|
key: 1,
|
|
2732
2745
|
class: "wm-art__body"
|
|
2733
|
-
},
|
|
2746
|
+
}, Es = {
|
|
2734
2747
|
key: 0,
|
|
2735
2748
|
class: "wm-art__text"
|
|
2736
|
-
},
|
|
2737
|
-
function
|
|
2738
|
-
return c(), u("div",
|
|
2739
|
-
n.data.image_url ? (c(), u("figure",
|
|
2740
|
-
|
|
2749
|
+
}, Bs = { class: "wm-art__fieldLabel" };
|
|
2750
|
+
function Rs(e, t, n, i, r, s) {
|
|
2751
|
+
return c(), u("div", As, [
|
|
2752
|
+
n.data.image_url ? (c(), u("figure", Ss, [
|
|
2753
|
+
o("img", {
|
|
2741
2754
|
src: n.data.image_url,
|
|
2742
2755
|
alt: n.data.title || "",
|
|
2743
2756
|
loading: "lazy"
|
|
2744
|
-
}, null, 8,
|
|
2757
|
+
}, null, 8, Ms)
|
|
2745
2758
|
])) : y("", !0),
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
n.data.subtitle ? (c(), u("div",
|
|
2759
|
+
o("div", Ts, [
|
|
2760
|
+
o("div", xs, [
|
|
2761
|
+
o("div", Os, v(n.data.title), 1),
|
|
2762
|
+
n.data.subtitle ? (c(), u("div", Is, v(n.data.subtitle), 1)) : y("", !0)
|
|
2750
2763
|
]),
|
|
2751
2764
|
n.data.badge && n.data.badge.label ? (c(), u("span", {
|
|
2752
2765
|
key: 0,
|
|
@@ -2757,24 +2770,24 @@ function Bs(e, t, n, i, r, s) {
|
|
|
2757
2770
|
}, v(n.data.badge.label), 3)) : y("", !0)
|
|
2758
2771
|
]),
|
|
2759
2772
|
s.hasBody ? (c(), u("div", Ls, [
|
|
2760
|
-
n.data.body ? (c(), u("div",
|
|
2761
|
-
s.fields.length ? (c(!0), u(E, { key: 1 },
|
|
2773
|
+
n.data.body ? (c(), u("div", Es, v(n.data.body), 1)) : y("", !0),
|
|
2774
|
+
s.fields.length ? (c(!0), u(E, { key: 1 }, F(s.fields, (a, l) => (c(), u("div", {
|
|
2762
2775
|
key: l,
|
|
2763
2776
|
class: "wm-art__field"
|
|
2764
2777
|
}, [
|
|
2765
|
-
|
|
2766
|
-
|
|
2778
|
+
o("div", Bs, v(a.label), 1),
|
|
2779
|
+
o("div", {
|
|
2767
2780
|
class: O([
|
|
2768
2781
|
"wm-art__fieldValue",
|
|
2769
|
-
{ "wm-art__fieldValue--multi":
|
|
2782
|
+
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2770
2783
|
])
|
|
2771
|
-
}, v(
|
|
2784
|
+
}, v(a.value), 3)
|
|
2772
2785
|
]))), 128)) : y("", !0)
|
|
2773
2786
|
])) : y("", !0)
|
|
2774
2787
|
]);
|
|
2775
2788
|
}
|
|
2776
|
-
const
|
|
2777
|
-
function
|
|
2789
|
+
const Ns = /* @__PURE__ */ N(Cs, [["render", Rs], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
2790
|
+
function Ps(e, t, n) {
|
|
2778
2791
|
if (!e) return "";
|
|
2779
2792
|
const i = new Date(e);
|
|
2780
2793
|
if (Number.isNaN(i.getTime())) return e;
|
|
@@ -2788,7 +2801,7 @@ function Ns(e, t, n) {
|
|
|
2788
2801
|
});
|
|
2789
2802
|
return `${r}${n}${s}`;
|
|
2790
2803
|
}
|
|
2791
|
-
const
|
|
2804
|
+
const Us = {
|
|
2792
2805
|
name: "WmArtifactTicket",
|
|
2793
2806
|
inject: {
|
|
2794
2807
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -2806,7 +2819,7 @@ const Ps = {
|
|
|
2806
2819
|
},
|
|
2807
2820
|
formattedDate() {
|
|
2808
2821
|
var e;
|
|
2809
|
-
return
|
|
2822
|
+
return Ps(
|
|
2810
2823
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
2811
2824
|
re(this.wmLocale()),
|
|
2812
2825
|
this.t("ticket.dateAt")
|
|
@@ -2834,13 +2847,13 @@ const Ps = {
|
|
|
2834
2847
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
2835
2848
|
}
|
|
2836
2849
|
}
|
|
2837
|
-
}, Fs = { class: "wm-art wm-art--ticket" },
|
|
2850
|
+
}, Fs = { class: "wm-art wm-art--ticket" }, Ds = { class: "wm-art__head wm-tk__head" }, js = { class: "wm-art__title wm-tk__title" }, Hs = { class: "wm-tk__sub" }, zs = { class: "wm-tk__ref" }, qs = {
|
|
2838
2851
|
key: 0,
|
|
2839
2852
|
class: "wm-tk__text"
|
|
2840
|
-
},
|
|
2853
|
+
}, Ks = {
|
|
2841
2854
|
key: 0,
|
|
2842
2855
|
class: "wm-art__body"
|
|
2843
|
-
},
|
|
2856
|
+
}, Vs = { class: "wm-art__fieldLabel" }, $s = ["data-level"], Ws = {
|
|
2844
2857
|
key: 1,
|
|
2845
2858
|
class: "wm-tk__date",
|
|
2846
2859
|
width: "12",
|
|
@@ -2852,17 +2865,17 @@ const Ps = {
|
|
|
2852
2865
|
"stroke-linecap": "round",
|
|
2853
2866
|
"stroke-linejoin": "round",
|
|
2854
2867
|
"aria-hidden": "true"
|
|
2855
|
-
},
|
|
2868
|
+
}, Gs = {
|
|
2856
2869
|
key: 1,
|
|
2857
2870
|
class: "wm-art__footer wm-tk__footer"
|
|
2858
2871
|
};
|
|
2859
|
-
function
|
|
2872
|
+
function Ys(e, t, n, i, r, s) {
|
|
2860
2873
|
return c(), u("div", Fs, [
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
t[0] || (t[0] =
|
|
2874
|
+
o("div", Ds, [
|
|
2875
|
+
o("div", js, v(n.data.title), 1),
|
|
2876
|
+
o("div", Hs, [
|
|
2877
|
+
o("div", zs, [
|
|
2878
|
+
t[0] || (t[0] = o("svg", {
|
|
2866
2879
|
width: "11",
|
|
2867
2880
|
height: "11",
|
|
2868
2881
|
viewBox: "0 0 24 24",
|
|
@@ -2873,85 +2886,85 @@ function Gs(e, t, n, i, r, s) {
|
|
|
2873
2886
|
"stroke-linejoin": "round",
|
|
2874
2887
|
"aria-hidden": "true"
|
|
2875
2888
|
}, [
|
|
2876
|
-
|
|
2877
|
-
|
|
2889
|
+
o("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
|
|
2890
|
+
o("path", { d: "M13 5v2M13 17v2M13 11v2" })
|
|
2878
2891
|
], -1)),
|
|
2879
|
-
|
|
2892
|
+
o("span", null, v(n.data.reference), 1)
|
|
2880
2893
|
]),
|
|
2881
|
-
|
|
2894
|
+
o("span", {
|
|
2882
2895
|
class: O([
|
|
2883
2896
|
"wm-art__badge",
|
|
2884
2897
|
"wm-tk__badge",
|
|
2885
2898
|
`wm-art__badge--${n.data.status.tone || "neutral"}`
|
|
2886
2899
|
])
|
|
2887
2900
|
}, [
|
|
2888
|
-
t[1] || (t[1] =
|
|
2901
|
+
t[1] || (t[1] = o("span", {
|
|
2889
2902
|
class: "wm-tk__dot",
|
|
2890
2903
|
"aria-hidden": "true"
|
|
2891
2904
|
}, null, -1)),
|
|
2892
|
-
|
|
2905
|
+
ye(" " + v(n.data.status.label), 1)
|
|
2893
2906
|
], 2)
|
|
2894
2907
|
]),
|
|
2895
|
-
n.data.body ? (c(), u("div",
|
|
2908
|
+
n.data.body ? (c(), u("div", qs, v(n.data.body), 1)) : y("", !0)
|
|
2896
2909
|
]),
|
|
2897
|
-
s.fields.length ? (c(), u("div",
|
|
2898
|
-
(c(!0), u(E, null,
|
|
2910
|
+
s.fields.length ? (c(), u("div", Ks, [
|
|
2911
|
+
(c(!0), u(E, null, F(s.fields, (a, l) => (c(), u("div", {
|
|
2899
2912
|
key: l,
|
|
2900
2913
|
class: "wm-art__field"
|
|
2901
2914
|
}, [
|
|
2902
|
-
|
|
2903
|
-
|
|
2915
|
+
o("div", Vs, v(a.label), 1),
|
|
2916
|
+
o("div", {
|
|
2904
2917
|
class: O([
|
|
2905
2918
|
"wm-art__fieldValue",
|
|
2906
|
-
{ "wm-art__fieldValue--multi":
|
|
2919
|
+
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2907
2920
|
])
|
|
2908
2921
|
}, [
|
|
2909
|
-
s.isPriority(
|
|
2922
|
+
s.isPriority(a.label) ? (c(), u("svg", {
|
|
2910
2923
|
key: 0,
|
|
2911
2924
|
class: "wm-tk__prio",
|
|
2912
|
-
"data-level": s.priorityLevel(
|
|
2925
|
+
"data-level": s.priorityLevel(a.value),
|
|
2913
2926
|
width: "12",
|
|
2914
2927
|
height: "12",
|
|
2915
2928
|
viewBox: "0 0 12 12",
|
|
2916
2929
|
"aria-hidden": "true"
|
|
2917
2930
|
}, [...t[2] || (t[2] = [
|
|
2918
|
-
|
|
2931
|
+
o("rect", {
|
|
2919
2932
|
x: "1",
|
|
2920
2933
|
y: "8",
|
|
2921
2934
|
width: "2",
|
|
2922
2935
|
height: "3",
|
|
2923
2936
|
rx: "0.5"
|
|
2924
2937
|
}, null, -1),
|
|
2925
|
-
|
|
2938
|
+
o("rect", {
|
|
2926
2939
|
x: "5",
|
|
2927
2940
|
y: "5",
|
|
2928
2941
|
width: "2",
|
|
2929
2942
|
height: "6",
|
|
2930
2943
|
rx: "0.5"
|
|
2931
2944
|
}, null, -1),
|
|
2932
|
-
|
|
2945
|
+
o("rect", {
|
|
2933
2946
|
x: "9",
|
|
2934
2947
|
y: "2",
|
|
2935
2948
|
width: "2",
|
|
2936
2949
|
height: "9",
|
|
2937
2950
|
rx: "0.5"
|
|
2938
2951
|
}, null, -1)
|
|
2939
|
-
])], 8,
|
|
2940
|
-
|
|
2952
|
+
])], 8, $s)) : s.isDate(a.label) ? (c(), u("svg", Ws, [...t[3] || (t[3] = [
|
|
2953
|
+
o("rect", {
|
|
2941
2954
|
x: "3",
|
|
2942
2955
|
y: "4",
|
|
2943
2956
|
width: "18",
|
|
2944
2957
|
height: "18",
|
|
2945
2958
|
rx: "2"
|
|
2946
2959
|
}, null, -1),
|
|
2947
|
-
|
|
2960
|
+
o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
2948
2961
|
])])) : y("", !0),
|
|
2949
|
-
|
|
2962
|
+
o("span", null, v(a.value), 1)
|
|
2950
2963
|
], 2)
|
|
2951
2964
|
]))), 128))
|
|
2952
2965
|
])) : y("", !0),
|
|
2953
|
-
n.data.created_at ? (c(), u("div",
|
|
2954
|
-
t[4] || (t[4] =
|
|
2966
|
+
n.data.created_at ? (c(), u("div", Gs, [
|
|
2967
|
+
t[4] || (t[4] = o("svg", {
|
|
2955
2968
|
width: "11",
|
|
2956
2969
|
height: "11",
|
|
2957
2970
|
viewBox: "0 0 24 24",
|
|
@@ -2962,24 +2975,24 @@ function Gs(e, t, n, i, r, s) {
|
|
|
2962
2975
|
"stroke-linejoin": "round",
|
|
2963
2976
|
"aria-hidden": "true"
|
|
2964
2977
|
}, [
|
|
2965
|
-
|
|
2978
|
+
o("rect", {
|
|
2966
2979
|
x: "3",
|
|
2967
2980
|
y: "4",
|
|
2968
2981
|
width: "18",
|
|
2969
2982
|
height: "18",
|
|
2970
2983
|
rx: "2"
|
|
2971
2984
|
}),
|
|
2972
|
-
|
|
2985
|
+
o("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
2973
2986
|
], -1)),
|
|
2974
|
-
|
|
2987
|
+
o("span", null, v(s.formattedDate), 1)
|
|
2975
2988
|
])) : y("", !0)
|
|
2976
2989
|
]);
|
|
2977
2990
|
}
|
|
2978
|
-
const
|
|
2979
|
-
form_response:
|
|
2980
|
-
info_card:
|
|
2981
|
-
ticket:
|
|
2982
|
-
},
|
|
2991
|
+
const Js = /* @__PURE__ */ N(Us, [["render", Ys], ["__scopeId", "data-v-5f30c914"]]), Qs = {
|
|
2992
|
+
form_response: ks,
|
|
2993
|
+
info_card: Ns,
|
|
2994
|
+
ticket: Js
|
|
2995
|
+
}, Xs = {
|
|
2983
2996
|
name: "WmArtifactRenderer",
|
|
2984
2997
|
props: {
|
|
2985
2998
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -2990,17 +3003,17 @@ const Ys = /* @__PURE__ */ N(Ps, [["render", Gs], ["__scopeId", "data-v-5f30c914
|
|
|
2990
3003
|
component() {
|
|
2991
3004
|
var t;
|
|
2992
3005
|
const e = (t = this.artifact) == null ? void 0 : t.kind;
|
|
2993
|
-
return e &&
|
|
3006
|
+
return e && Qs[e] || null;
|
|
2994
3007
|
}
|
|
2995
3008
|
}
|
|
2996
3009
|
};
|
|
2997
|
-
function
|
|
2998
|
-
return s.component ? (c(), P(
|
|
3010
|
+
function Zs(e, t, n, i, r, s) {
|
|
3011
|
+
return s.component ? (c(), P(pe(s.component), {
|
|
2999
3012
|
key: 0,
|
|
3000
3013
|
data: n.artifact.data
|
|
3001
3014
|
}, null, 8, ["data"])) : y("", !0);
|
|
3002
3015
|
}
|
|
3003
|
-
const
|
|
3016
|
+
const er = /* @__PURE__ */ N(Xs, [["render", Zs]]), tr = {
|
|
3004
3017
|
name: "WmAttachmentPreview",
|
|
3005
3018
|
inject: {
|
|
3006
3019
|
signAttachmentFn: { default: null },
|
|
@@ -3068,15 +3081,15 @@ const Zs = /* @__PURE__ */ N(Qs, [["render", Xs]]), er = {
|
|
|
3068
3081
|
this.safeHref === "#" && e.preventDefault();
|
|
3069
3082
|
}
|
|
3070
3083
|
}
|
|
3071
|
-
},
|
|
3084
|
+
}, nr = ["href"], sr = ["src", "alt"], rr = ["src"], ir = ["src"], ar = ["href", "download"], or = { class: "wm-att__main" }, lr = { class: "wm-att__name" }, cr = {
|
|
3072
3085
|
key: 0,
|
|
3073
3086
|
class: "wm-att__meta"
|
|
3074
|
-
},
|
|
3087
|
+
}, dr = {
|
|
3075
3088
|
key: 0,
|
|
3076
3089
|
class: "wm-att__spin",
|
|
3077
3090
|
"aria-hidden": "true"
|
|
3078
3091
|
};
|
|
3079
|
-
function
|
|
3092
|
+
function ur(e, t, n, i, r, s) {
|
|
3080
3093
|
return c(), u("div", {
|
|
3081
3094
|
class: O(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
3082
3095
|
}, [
|
|
@@ -3087,32 +3100,32 @@ function dr(e, t, n, i, r, s) {
|
|
|
3087
3100
|
rel: "noopener",
|
|
3088
3101
|
class: "wm-att__imgWrap"
|
|
3089
3102
|
}, [
|
|
3090
|
-
|
|
3103
|
+
o("img", {
|
|
3091
3104
|
src: r.url,
|
|
3092
3105
|
alt: s.displayName,
|
|
3093
3106
|
loading: "lazy"
|
|
3094
|
-
}, null, 8,
|
|
3095
|
-
], 8,
|
|
3107
|
+
}, null, 8, sr)
|
|
3108
|
+
], 8, nr)) : s.kind === "audio" && r.url ? (c(), u("audio", {
|
|
3096
3109
|
key: 1,
|
|
3097
3110
|
src: r.url,
|
|
3098
3111
|
controls: "",
|
|
3099
3112
|
preload: "metadata"
|
|
3100
|
-
}, null, 8,
|
|
3113
|
+
}, null, 8, rr)) : s.kind === "video" && r.url ? (c(), u("video", {
|
|
3101
3114
|
key: 2,
|
|
3102
3115
|
src: r.url,
|
|
3103
3116
|
controls: "",
|
|
3104
3117
|
preload: "metadata"
|
|
3105
|
-
}, null, 8,
|
|
3118
|
+
}, null, 8, ir)) : (c(), u("a", {
|
|
3106
3119
|
key: 3,
|
|
3107
3120
|
class: "wm-att__file",
|
|
3108
3121
|
href: s.safeHref,
|
|
3109
3122
|
download: s.displayName,
|
|
3110
3123
|
target: "_blank",
|
|
3111
3124
|
rel: "noopener",
|
|
3112
|
-
onClick: t[0] || (t[0] = (...
|
|
3125
|
+
onClick: t[0] || (t[0] = (...a) => s.onFileClick && s.onFileClick(...a))
|
|
3113
3126
|
}, [
|
|
3114
|
-
t[1] || (t[1] =
|
|
3115
|
-
|
|
3127
|
+
t[1] || (t[1] = o("span", { class: "wm-att__icon" }, [
|
|
3128
|
+
o("svg", {
|
|
3116
3129
|
width: "14",
|
|
3117
3130
|
height: "14",
|
|
3118
3131
|
viewBox: "0 0 24 24",
|
|
@@ -3123,19 +3136,19 @@ function dr(e, t, n, i, r, s) {
|
|
|
3123
3136
|
"stroke-linejoin": "round",
|
|
3124
3137
|
"aria-hidden": "true"
|
|
3125
3138
|
}, [
|
|
3126
|
-
|
|
3127
|
-
|
|
3139
|
+
o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
|
|
3140
|
+
o("path", { d: "M14 2v6h6" })
|
|
3128
3141
|
])
|
|
3129
3142
|
], -1)),
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
s.sizeLabel ? (c(), u("span",
|
|
3143
|
+
o("span", or, [
|
|
3144
|
+
o("span", lr, v(s.displayName), 1),
|
|
3145
|
+
s.sizeLabel ? (c(), u("span", cr, v(s.sizeLabel), 1)) : y("", !0)
|
|
3133
3146
|
]),
|
|
3134
|
-
r.loading ? (c(), u("span",
|
|
3135
|
-
], 8,
|
|
3147
|
+
r.loading ? (c(), u("span", dr)) : y("", !0)
|
|
3148
|
+
], 8, ar))
|
|
3136
3149
|
], 2);
|
|
3137
3150
|
}
|
|
3138
|
-
const
|
|
3151
|
+
const mr = /* @__PURE__ */ N(tr, [["render", ur], ["__scopeId", "data-v-0c877a62"]]), hr = {
|
|
3139
3152
|
name: "WmBubble",
|
|
3140
3153
|
props: {
|
|
3141
3154
|
role: { type: String, default: "ai" },
|
|
@@ -3144,48 +3157,48 @@ const ur = /* @__PURE__ */ N(er, [["render", dr], ["__scopeId", "data-v-0c877a62
|
|
|
3144
3157
|
},
|
|
3145
3158
|
computed: {
|
|
3146
3159
|
rendered() {
|
|
3147
|
-
return
|
|
3160
|
+
return mn(this.text);
|
|
3148
3161
|
}
|
|
3149
3162
|
}
|
|
3150
|
-
},
|
|
3151
|
-
function
|
|
3163
|
+
}, fr = ["innerHTML"];
|
|
3164
|
+
function _r(e, t, n, i, r, s) {
|
|
3152
3165
|
return c(), u("div", {
|
|
3153
3166
|
class: O(["wm-bubble", "wm-bubble--" + n.role])
|
|
3154
3167
|
}, [
|
|
3155
|
-
|
|
3156
|
-
|
|
3168
|
+
He(e.$slots, "default", {}, () => [
|
|
3169
|
+
o("span", { innerHTML: s.rendered }, null, 8, fr)
|
|
3157
3170
|
], !0)
|
|
3158
3171
|
], 2);
|
|
3159
3172
|
}
|
|
3160
|
-
const
|
|
3161
|
-
function
|
|
3162
|
-
return c(), u("div",
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3173
|
+
const gr = /* @__PURE__ */ N(hr, [["render", _r], ["__scopeId", "data-v-7ab13147"]]), pr = { name: "WmTyping" }, vr = { class: "wm-typing" };
|
|
3174
|
+
function yr(e, t, n, i, r, s) {
|
|
3175
|
+
return c(), u("div", vr, [...t[0] || (t[0] = [
|
|
3176
|
+
o("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3177
|
+
o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3178
|
+
o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3166
3179
|
])]);
|
|
3167
3180
|
}
|
|
3168
|
-
const
|
|
3181
|
+
const wr = /* @__PURE__ */ N(pr, [["render", yr], ["__scopeId", "data-v-df2447fd"]]);
|
|
3169
3182
|
function Q(e) {
|
|
3170
3183
|
return e ? e.client_msg_id || e.id : "";
|
|
3171
3184
|
}
|
|
3172
|
-
const
|
|
3185
|
+
const br = {
|
|
3173
3186
|
transferred_to_human: "system.transferredToHuman",
|
|
3174
3187
|
assigned: "system.assigned",
|
|
3175
3188
|
unassigned: "system.unassigned",
|
|
3176
3189
|
resolved: "system.resolved",
|
|
3177
3190
|
reopened: "system.reopened",
|
|
3178
3191
|
idle: "system.idle"
|
|
3179
|
-
},
|
|
3192
|
+
}, kr = 80, Cr = 200, Ar = {
|
|
3180
3193
|
name: "WmMessageList",
|
|
3181
3194
|
components: {
|
|
3182
3195
|
AIAvatar: le,
|
|
3183
|
-
HumanAvatar:
|
|
3184
|
-
Bubble:
|
|
3185
|
-
Typing:
|
|
3196
|
+
HumanAvatar: Ce,
|
|
3197
|
+
Bubble: gr,
|
|
3198
|
+
Typing: wr,
|
|
3186
3199
|
ActionResult: hs,
|
|
3187
|
-
AttachmentPreview:
|
|
3188
|
-
ArtifactRenderer:
|
|
3200
|
+
AttachmentPreview: mr,
|
|
3201
|
+
ArtifactRenderer: er
|
|
3189
3202
|
},
|
|
3190
3203
|
inject: {
|
|
3191
3204
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -3256,59 +3269,59 @@ const wr = {
|
|
|
3256
3269
|
groups() {
|
|
3257
3270
|
var n, i, r, s;
|
|
3258
3271
|
const e = [];
|
|
3259
|
-
for (const
|
|
3260
|
-
const l = this.roleOf(
|
|
3272
|
+
for (const a of this.messages) {
|
|
3273
|
+
const l = this.roleOf(a);
|
|
3261
3274
|
if (l === "system") {
|
|
3262
|
-
if (((n =
|
|
3275
|
+
if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
|
|
3263
3276
|
const w = e[e.length - 1];
|
|
3264
|
-
w && w.role === "ai" ? w.messages.push(
|
|
3265
|
-
key: `g-${Q(
|
|
3277
|
+
w && w.role === "ai" ? w.messages.push(a) : e.push({
|
|
3278
|
+
key: `g-${Q(a)}`,
|
|
3266
3279
|
role: "ai",
|
|
3267
3280
|
agentName: "",
|
|
3268
3281
|
agentAvatarUrl: null,
|
|
3269
|
-
messages: [
|
|
3282
|
+
messages: [a],
|
|
3270
3283
|
items: []
|
|
3271
3284
|
});
|
|
3272
3285
|
continue;
|
|
3273
3286
|
}
|
|
3274
3287
|
e.push({
|
|
3275
|
-
key: `sys-${Q(
|
|
3288
|
+
key: `sys-${Q(a)}`,
|
|
3276
3289
|
role: l,
|
|
3277
|
-
messages: [
|
|
3290
|
+
messages: [a],
|
|
3278
3291
|
items: [],
|
|
3279
|
-
systemLabel: this.systemLabel(
|
|
3292
|
+
systemLabel: this.systemLabel(a)
|
|
3280
3293
|
});
|
|
3281
3294
|
continue;
|
|
3282
3295
|
}
|
|
3283
3296
|
const p = e[e.length - 1];
|
|
3284
|
-
p && p.role === l && (l === "ai" || p.agentName === (((i =
|
|
3285
|
-
key: `g-${Q(
|
|
3297
|
+
p && p.role === l && (l === "ai" || p.agentName === (((i = a == null ? void 0 : a.author) == null ? void 0 : i.name) || "")) ? p.messages.push(a) : e.push({
|
|
3298
|
+
key: `g-${Q(a)}`,
|
|
3286
3299
|
role: l,
|
|
3287
|
-
agentName: ((r =
|
|
3288
|
-
agentAvatarUrl: ((s =
|
|
3289
|
-
messages: [
|
|
3300
|
+
agentName: ((r = a == null ? void 0 : a.author) == null ? void 0 : r.name) || "",
|
|
3301
|
+
agentAvatarUrl: ((s = a == null ? void 0 : a.author) == null ? void 0 : s.avatar_url) || null,
|
|
3302
|
+
messages: [a],
|
|
3290
3303
|
items: []
|
|
3291
3304
|
});
|
|
3292
3305
|
}
|
|
3293
|
-
for (const
|
|
3294
|
-
if (
|
|
3306
|
+
for (const a of e) {
|
|
3307
|
+
if (a.role === "system") continue;
|
|
3295
3308
|
const l = [];
|
|
3296
|
-
for (const p of
|
|
3309
|
+
for (const p of a.messages)
|
|
3297
3310
|
for (const k of this.itemsOf(p)) l.push(k);
|
|
3298
|
-
|
|
3311
|
+
a.items = l;
|
|
3299
3312
|
}
|
|
3300
3313
|
const t = [];
|
|
3301
|
-
for (const
|
|
3302
|
-
if (
|
|
3314
|
+
for (const a of e) {
|
|
3315
|
+
if (a.role !== "system" && !a.items.length) continue;
|
|
3303
3316
|
const l = t[t.length - 1];
|
|
3304
|
-
if (l && l.role !== "system" && l.role ===
|
|
3305
|
-
l.messages.push(...
|
|
3317
|
+
if (l && l.role !== "system" && l.role === a.role && (a.role === "ai" || l.agentName === a.agentName)) {
|
|
3318
|
+
l.messages.push(...a.messages), l.items.push(...a.items);
|
|
3306
3319
|
continue;
|
|
3307
3320
|
}
|
|
3308
|
-
t.push(
|
|
3321
|
+
t.push(a);
|
|
3309
3322
|
}
|
|
3310
|
-
for (const
|
|
3311
|
-
|
|
3323
|
+
for (const a of t)
|
|
3324
|
+
a.role !== "system" && (a.key = this.stableGroupKey(a.messages));
|
|
3312
3325
|
return t;
|
|
3313
3326
|
},
|
|
3314
3327
|
// Key of the first non-user group that starts after the unread
|
|
@@ -3375,11 +3388,11 @@ const wr = {
|
|
|
3375
3388
|
return `g-${n}`;
|
|
3376
3389
|
},
|
|
3377
3390
|
isAtBottom(e) {
|
|
3378
|
-
return e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
3391
|
+
return e.scrollHeight - e.scrollTop - e.clientHeight <= kr;
|
|
3379
3392
|
},
|
|
3380
3393
|
onScroll() {
|
|
3381
3394
|
const e = this.$refs.scrollEl;
|
|
3382
|
-
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <=
|
|
3395
|
+
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Cr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
|
|
3383
3396
|
},
|
|
3384
3397
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3385
3398
|
//
|
|
@@ -3412,12 +3425,12 @@ const wr = {
|
|
|
3412
3425
|
if (!t && !n) {
|
|
3413
3426
|
const s = this.pickAnchor(e);
|
|
3414
3427
|
if (s != null && s.rowKey) {
|
|
3415
|
-
const
|
|
3416
|
-
if (
|
|
3428
|
+
const a = this.findRowByKey(e, s.rowKey);
|
|
3429
|
+
if (a) {
|
|
3417
3430
|
const l = e.getBoundingClientRect().top;
|
|
3418
3431
|
i = {
|
|
3419
3432
|
rowKey: s.rowKey,
|
|
3420
|
-
relY:
|
|
3433
|
+
relY: a.getBoundingClientRect().top - l
|
|
3421
3434
|
};
|
|
3422
3435
|
}
|
|
3423
3436
|
}
|
|
@@ -3430,9 +3443,9 @@ const wr = {
|
|
|
3430
3443
|
}
|
|
3431
3444
|
if (!r.anchor) return;
|
|
3432
3445
|
const s = () => {
|
|
3433
|
-
const
|
|
3446
|
+
const a = r.anchor, l = this.findRowByKey(e, a.rowKey);
|
|
3434
3447
|
if (!l) return;
|
|
3435
|
-
const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top -
|
|
3448
|
+
const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
|
|
3436
3449
|
Math.abs(k) > 0.5 && (e.scrollTop += k);
|
|
3437
3450
|
};
|
|
3438
3451
|
s(), requestAnimationFrame(() => {
|
|
@@ -3580,9 +3593,9 @@ const wr = {
|
|
|
3580
3593
|
// doit garder son arrondi.
|
|
3581
3594
|
cornersFor(e, t) {
|
|
3582
3595
|
var Z, ee, te;
|
|
3583
|
-
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,
|
|
3584
|
-
let
|
|
3585
|
-
return
|
|
3596
|
+
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, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, S = (V, ne, J) => V != null && T != null ? V + H >= T : ne === J || ne === "card" && J === "bubble";
|
|
3597
|
+
let U = l, I = l, q = l, Y = l;
|
|
3598
|
+
return a ? (k && (I = p), (w || !s) && (q = p), k && S(B, k, i == null ? void 0 : i.top) && (U = p), w && S(A, w, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (U = p), (w || !s) && (Y = p), k && S(B, k, i == null ? void 0 : i.top) && (I = p), w && S(A, w, i == null ? void 0 : i.bottom) && (q = p)), { tl: U, tr: I, br: q, bl: Y };
|
|
3586
3599
|
},
|
|
3587
3600
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3588
3601
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3623,20 +3636,20 @@ const wr = {
|
|
|
3623
3636
|
for (const s of e.querySelectorAll(
|
|
3624
3637
|
".wm-list__row[data-row-key]"
|
|
3625
3638
|
)) {
|
|
3626
|
-
const
|
|
3627
|
-
if (!
|
|
3639
|
+
const a = s.dataset.rowKey;
|
|
3640
|
+
if (!a) continue;
|
|
3628
3641
|
const l = s.querySelector(
|
|
3629
3642
|
".wm-bubble, .wm-result, .wm-art, .wm-list__body"
|
|
3630
3643
|
);
|
|
3631
3644
|
if (!l) continue;
|
|
3632
3645
|
const p = l.getBoundingClientRect().width;
|
|
3633
|
-
p > 0 && (t[
|
|
3646
|
+
p > 0 && (t[a] = p);
|
|
3634
3647
|
}
|
|
3635
3648
|
const n = this.widthByKey, i = Object.keys(n), r = Object.keys(t);
|
|
3636
3649
|
if (i.length === r.length) {
|
|
3637
3650
|
let s = !0;
|
|
3638
|
-
for (const
|
|
3639
|
-
if (Math.abs((n[
|
|
3651
|
+
for (const a of r)
|
|
3652
|
+
if (Math.abs((n[a] ?? 0) - t[a]) > 0.5) {
|
|
3640
3653
|
s = !1;
|
|
3641
3654
|
break;
|
|
3642
3655
|
}
|
|
@@ -3658,7 +3671,7 @@ const wr = {
|
|
|
3658
3671
|
timeOf(e) {
|
|
3659
3672
|
if (!(e != null && e.created_at)) return "";
|
|
3660
3673
|
try {
|
|
3661
|
-
return
|
|
3674
|
+
return ve(
|
|
3662
3675
|
new Date(e.created_at),
|
|
3663
3676
|
re(this.wmLocale())
|
|
3664
3677
|
);
|
|
@@ -3670,7 +3683,7 @@ const wr = {
|
|
|
3670
3683
|
const t = e.items[e.items.length - 1], n = (t == null ? void 0 : t.message) || e.messages[e.messages.length - 1];
|
|
3671
3684
|
if (!(n != null && n.created_at)) return "";
|
|
3672
3685
|
try {
|
|
3673
|
-
return
|
|
3686
|
+
return ve(
|
|
3674
3687
|
new Date(n.created_at),
|
|
3675
3688
|
re(this.wmLocale())
|
|
3676
3689
|
);
|
|
@@ -3706,9 +3719,9 @@ const wr = {
|
|
|
3706
3719
|
return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
|
|
3707
3720
|
},
|
|
3708
3721
|
actionDetail(e) {
|
|
3709
|
-
var n, i, r, s,
|
|
3722
|
+
var n, i, r, s, a, l;
|
|
3710
3723
|
const t = e == null ? void 0 : e.payload;
|
|
3711
|
-
return t ? t.state === "success" ? ((n = t.success) == null ? void 0 : n.summary) || ((r = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : r.description) || "" : t.state === "rejected" ? ((s = t.rejected) == null ? void 0 : s.reason) || this.t("action.rejectedByUser") : t.state === "failure" && (((
|
|
3724
|
+
return t ? t.state === "success" ? ((n = t.success) == null ? void 0 : n.summary) || ((r = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : r.description) || "" : t.state === "rejected" ? ((s = t.rejected) == null ? void 0 : s.reason) || this.t("action.rejectedByUser") : t.state === "failure" && (((a = t.failure) == null ? void 0 : a.summary) || ((l = t.failure) == null ? void 0 : l.error)) || "" : "";
|
|
3712
3725
|
},
|
|
3713
3726
|
actionArtifact(e) {
|
|
3714
3727
|
var n, i;
|
|
@@ -3716,8 +3729,8 @@ const wr = {
|
|
|
3716
3729
|
return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
|
|
3717
3730
|
},
|
|
3718
3731
|
systemLabel(e) {
|
|
3719
|
-
var r, s,
|
|
3720
|
-
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n =
|
|
3732
|
+
var r, s, a;
|
|
3733
|
+
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = br[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
|
|
3721
3734
|
return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
3722
3735
|
},
|
|
3723
3736
|
scrollToBottom() {
|
|
@@ -3732,80 +3745,80 @@ const wr = {
|
|
|
3732
3745
|
e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
|
|
3733
3746
|
}
|
|
3734
3747
|
}
|
|
3735
|
-
},
|
|
3748
|
+
}, Sr = { class: "wm-list__wrap" }, Mr = {
|
|
3736
3749
|
key: 0,
|
|
3737
3750
|
class: "wm-list__loadMore",
|
|
3738
3751
|
role: "status",
|
|
3739
3752
|
"aria-live": "polite"
|
|
3740
|
-
},
|
|
3753
|
+
}, Tr = { class: "wm-list__loadMore-lbl" }, xr = {
|
|
3741
3754
|
key: 1,
|
|
3742
3755
|
class: "wm-list__historyEnd"
|
|
3743
|
-
},
|
|
3756
|
+
}, Or = {
|
|
3744
3757
|
key: 2,
|
|
3745
3758
|
class: "wm-list__sep"
|
|
3746
|
-
},
|
|
3759
|
+
}, Ir = { class: "wm-list__sep-label" }, Lr = {
|
|
3747
3760
|
key: 0,
|
|
3748
3761
|
class: "wm-list__sep wm-list__sep--unread"
|
|
3749
|
-
},
|
|
3762
|
+
}, Er = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Br = {
|
|
3750
3763
|
key: 0,
|
|
3751
3764
|
class: "wm-list__sysep"
|
|
3752
|
-
},
|
|
3765
|
+
}, Rr = { class: "wm-list__sysep-label" }, Nr = ["data-row-key", "onPointerdown"], Pr = {
|
|
3753
3766
|
key: 0,
|
|
3754
3767
|
class: "wm-list__avatarSlot"
|
|
3755
|
-
},
|
|
3768
|
+
}, Ur = {
|
|
3756
3769
|
key: 5,
|
|
3757
3770
|
class: "wm-list__body"
|
|
3758
|
-
}, Fr = { key: 0 },
|
|
3771
|
+
}, Fr = { key: 0 }, Dr = {
|
|
3759
3772
|
key: 1,
|
|
3760
3773
|
"aria-hidden": "true"
|
|
3761
|
-
},
|
|
3774
|
+
}, jr = { key: 2 }, Hr = { key: 0 }, zr = {
|
|
3762
3775
|
key: 1,
|
|
3763
3776
|
"aria-hidden": "true"
|
|
3764
|
-
},
|
|
3777
|
+
}, qr = { key: 2 }, Kr = {
|
|
3765
3778
|
key: 3,
|
|
3766
3779
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3767
|
-
},
|
|
3768
|
-
function
|
|
3769
|
-
const
|
|
3770
|
-
return c(), u("div",
|
|
3771
|
-
|
|
3780
|
+
}, Vr = { class: "wm-list__avatarSlot" }, $r = ["aria-label", "title"];
|
|
3781
|
+
function Wr(e, t, n, i, r, s) {
|
|
3782
|
+
const a = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), B = R("Typing");
|
|
3783
|
+
return c(), u("div", Sr, [
|
|
3784
|
+
o("div", {
|
|
3772
3785
|
ref: "scrollEl",
|
|
3773
3786
|
class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
3774
3787
|
onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
|
|
3775
3788
|
}, [
|
|
3776
|
-
n.loadingMore ? (c(), u("div",
|
|
3777
|
-
t[6] || (t[6] =
|
|
3789
|
+
n.loadingMore ? (c(), u("div", Mr, [
|
|
3790
|
+
t[6] || (t[6] = o("span", {
|
|
3778
3791
|
class: "wm-list__loadMore-spinner",
|
|
3779
3792
|
"aria-hidden": "true"
|
|
3780
3793
|
}, null, -1)),
|
|
3781
|
-
|
|
3782
|
-
])) : s.historyExhausted ? (c(), u("div",
|
|
3783
|
-
n.dateLabel ? (c(), u("div",
|
|
3784
|
-
t[7] || (t[7] =
|
|
3785
|
-
|
|
3786
|
-
t[8] || (t[8] =
|
|
3794
|
+
o("span", Tr, v(s.t("messageList.loadingHistory")), 1)
|
|
3795
|
+
])) : s.historyExhausted ? (c(), u("div", xr, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
|
|
3796
|
+
n.dateLabel ? (c(), u("div", Or, [
|
|
3797
|
+
t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
3798
|
+
o("span", Ir, v(n.dateLabel), 1),
|
|
3799
|
+
t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3787
3800
|
])) : y("", !0),
|
|
3788
|
-
(c(!0), u(E, null,
|
|
3801
|
+
(c(!0), u(E, null, F(s.groups, (A, H) => (c(), u(E, {
|
|
3789
3802
|
key: A.key
|
|
3790
3803
|
}, [
|
|
3791
3804
|
A.key === s.unreadGroupKey ? (c(), u("div", Lr, [
|
|
3792
|
-
t[9] || (t[9] =
|
|
3793
|
-
|
|
3794
|
-
t[10] || (t[10] =
|
|
3805
|
+
t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
3806
|
+
o("span", Er, v(s.t("messageList.unread")), 1),
|
|
3807
|
+
t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
3795
3808
|
])) : y("", !0),
|
|
3796
3809
|
A.role === "system" || A.items.length ? (c(), u("div", {
|
|
3797
3810
|
key: 1,
|
|
3798
3811
|
class: O(["wm-list__group", "wm-list__group--" + A.role])
|
|
3799
3812
|
}, [
|
|
3800
|
-
A.role === "system" ? (c(), u("div",
|
|
3801
|
-
t[11] || (t[11] =
|
|
3802
|
-
|
|
3803
|
-
t[12] || (t[12] =
|
|
3813
|
+
A.role === "system" ? (c(), u("div", Br, [
|
|
3814
|
+
t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
3815
|
+
o("span", Rr, v(A.systemLabel), 1),
|
|
3816
|
+
t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3804
3817
|
])) : (c(), u(E, { key: 1 }, [
|
|
3805
|
-
(c(!0), u(E, null,
|
|
3818
|
+
(c(!0), u(E, null, F(A.items, (S, U) => (c(), u(E, {
|
|
3806
3819
|
key: `${s.messageKey(S.message)}-${S.partKey}`
|
|
3807
3820
|
}, [
|
|
3808
|
-
|
|
3821
|
+
o("div", {
|
|
3809
3822
|
"data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
|
|
3810
3823
|
class: O(["wm-list__row fade-up", [
|
|
3811
3824
|
"wm-list__row--" + A.role,
|
|
@@ -3814,17 +3827,17 @@ function $r(e, t, n, i, r, s) {
|
|
|
3814
3827
|
"is-failed": S.message._failed
|
|
3815
3828
|
}
|
|
3816
3829
|
]]),
|
|
3817
|
-
style:
|
|
3818
|
-
onPointerdown: (
|
|
3819
|
-
onPointerup: t[0] || (t[0] = (
|
|
3820
|
-
onPointercancel: t[1] || (t[1] = (
|
|
3821
|
-
onPointerleave: t[2] || (t[2] = (
|
|
3830
|
+
style: z(s.cornersStyle(A, U)),
|
|
3831
|
+
onPointerdown: (I) => s.onPressStart(`${s.messageKey(S.message)}-${S.partKey}`),
|
|
3832
|
+
onPointerup: t[0] || (t[0] = (I) => s.onPressEnd()),
|
|
3833
|
+
onPointercancel: t[1] || (t[1] = (I) => s.onPressEnd()),
|
|
3834
|
+
onPointerleave: t[2] || (t[2] = (I) => s.onPressEnd()),
|
|
3822
3835
|
onContextmenu: t[3] || (t[3] = G(() => {
|
|
3823
3836
|
}, ["prevent"]))
|
|
3824
3837
|
}, [
|
|
3825
|
-
A.role !== "user" ? (c(), u("div",
|
|
3826
|
-
|
|
3827
|
-
A.role === "ai" ? (c(), P(
|
|
3838
|
+
A.role !== "user" ? (c(), u("div", Pr, [
|
|
3839
|
+
U === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
|
|
3840
|
+
A.role === "ai" ? (c(), P(a, {
|
|
3828
3841
|
key: 0,
|
|
3829
3842
|
size: 26,
|
|
3830
3843
|
tail: !0,
|
|
@@ -3855,7 +3868,7 @@ function $r(e, t, n, i, r, s) {
|
|
|
3855
3868
|
}, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), P(k, {
|
|
3856
3869
|
key: 4,
|
|
3857
3870
|
artifact: s.artifactOf(S.message)
|
|
3858
|
-
}, null, 8, ["artifact"])) : (c(), u("div",
|
|
3871
|
+
}, null, 8, ["artifact"])) : (c(), u("div", Ur, [
|
|
3859
3872
|
S.message.text_md ? (c(), P(w, {
|
|
3860
3873
|
key: 0,
|
|
3861
3874
|
role: A.role,
|
|
@@ -3867,38 +3880,38 @@ function $r(e, t, n, i, r, s) {
|
|
|
3867
3880
|
"wm-list__atts--align-end": A.role === "user"
|
|
3868
3881
|
}])
|
|
3869
3882
|
}, [
|
|
3870
|
-
(c(!0), u(E, null,
|
|
3883
|
+
(c(!0), u(E, null, F(s.attachmentsOf(
|
|
3871
3884
|
S.message
|
|
3872
|
-
), (
|
|
3873
|
-
key: `${s.messageKey(S.message)}-att-${
|
|
3874
|
-
attachment:
|
|
3885
|
+
), (I, q) => (c(), P(T, {
|
|
3886
|
+
key: `${s.messageKey(S.message)}-att-${q}`,
|
|
3887
|
+
attachment: I
|
|
3875
3888
|
}, null, 8, ["attachment"]))), 128))
|
|
3876
3889
|
], 2)) : y("", !0)
|
|
3877
3890
|
]))
|
|
3878
|
-
], 46,
|
|
3879
|
-
|
|
3891
|
+
], 46, Nr),
|
|
3892
|
+
U < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
|
|
3880
3893
|
key: 0,
|
|
3881
3894
|
class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
3882
3895
|
}, [
|
|
3883
3896
|
A.role !== "user" ? (c(), u("span", Fr, v(s.roleLabel(A)), 1)) : y("", !0),
|
|
3884
|
-
A.role !== "user" && s.timeOf(S.message) ? (c(), u("span",
|
|
3885
|
-
s.timeOf(S.message) ? (c(), u("span",
|
|
3897
|
+
A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", Dr, "·")) : y("", !0),
|
|
3898
|
+
s.timeOf(S.message) ? (c(), u("span", jr, v(s.timeOf(S.message)), 1)) : y("", !0)
|
|
3886
3899
|
], 2)) : y("", !0)
|
|
3887
3900
|
], 64))), 128)),
|
|
3888
3901
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
|
|
3889
3902
|
key: 0,
|
|
3890
3903
|
class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
3891
3904
|
}, [
|
|
3892
|
-
A.role !== "user" ? (c(), u("span",
|
|
3893
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span",
|
|
3894
|
-
s.lastTimeOf(A) ? (c(), u("span",
|
|
3905
|
+
A.role !== "user" ? (c(), u("span", Hr, v(s.roleLabel(A)), 1)) : y("", !0),
|
|
3906
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", zr, "·")) : y("", !0),
|
|
3907
|
+
s.lastTimeOf(A) ? (c(), u("span", qr, v(s.lastTimeOf(A)), 1)) : y("", !0)
|
|
3895
3908
|
], 2)) : y("", !0)
|
|
3896
3909
|
], 64))
|
|
3897
3910
|
], 2)) : y("", !0)
|
|
3898
3911
|
], 64))), 128)),
|
|
3899
|
-
n.streamingActive ? (c(), u("div",
|
|
3900
|
-
|
|
3901
|
-
K(
|
|
3912
|
+
n.streamingActive ? (c(), u("div", Kr, [
|
|
3913
|
+
o("div", Vr, [
|
|
3914
|
+
K(a, {
|
|
3902
3915
|
size: 26,
|
|
3903
3916
|
tail: !0,
|
|
3904
3917
|
name: n.aiAgentName,
|
|
@@ -3908,8 +3921,8 @@ function $r(e, t, n, i, r, s) {
|
|
|
3908
3921
|
K(B)
|
|
3909
3922
|
])) : y("", !0)
|
|
3910
3923
|
], 34),
|
|
3911
|
-
K(
|
|
3912
|
-
default:
|
|
3924
|
+
K(Re, { name: "wm-scrollDown" }, {
|
|
3925
|
+
default: Ne(() => [
|
|
3913
3926
|
r.showScrollDown ? (c(), u("button", {
|
|
3914
3927
|
key: 0,
|
|
3915
3928
|
type: "button",
|
|
@@ -3918,7 +3931,7 @@ function $r(e, t, n, i, r, s) {
|
|
|
3918
3931
|
title: s.t("messageList.scrollToBottom"),
|
|
3919
3932
|
onClick: t[5] || (t[5] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
|
|
3920
3933
|
}, [...t[13] || (t[13] = [
|
|
3921
|
-
|
|
3934
|
+
o("svg", {
|
|
3922
3935
|
width: "14",
|
|
3923
3936
|
height: "14",
|
|
3924
3937
|
viewBox: "0 0 24 24",
|
|
@@ -3929,17 +3942,17 @@ function $r(e, t, n, i, r, s) {
|
|
|
3929
3942
|
"stroke-linejoin": "round",
|
|
3930
3943
|
"aria-hidden": "true"
|
|
3931
3944
|
}, [
|
|
3932
|
-
|
|
3945
|
+
o("path", { d: "M6 9l6 6 6-6" })
|
|
3933
3946
|
], -1)
|
|
3934
|
-
])], 8,
|
|
3947
|
+
])], 8, $r)) : y("", !0)
|
|
3935
3948
|
]),
|
|
3936
3949
|
_: 1
|
|
3937
3950
|
})
|
|
3938
3951
|
]);
|
|
3939
3952
|
}
|
|
3940
|
-
const
|
|
3941
|
-
function
|
|
3942
|
-
return
|
|
3953
|
+
const Gr = /* @__PURE__ */ N(Ar, [["render", Wr], ["__scopeId", "data-v-9ddbd0e3"]]), me = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Ae = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
3954
|
+
function Yr() {
|
|
3955
|
+
return Ae && [
|
|
3943
3956
|
"video/webm;codecs=vp9,opus",
|
|
3944
3957
|
"video/webm;codecs=vp8,opus",
|
|
3945
3958
|
"video/webm",
|
|
@@ -3949,7 +3962,7 @@ function Gr() {
|
|
|
3949
3962
|
return (i = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(n, t);
|
|
3950
3963
|
}) || "";
|
|
3951
3964
|
}
|
|
3952
|
-
function
|
|
3965
|
+
function Fe({ audio: e }) {
|
|
3953
3966
|
return {
|
|
3954
3967
|
video: !0,
|
|
3955
3968
|
audio: !!e,
|
|
@@ -3958,21 +3971,21 @@ function Pe({ audio: e }) {
|
|
|
3958
3971
|
systemAudio: e ? "include" : "exclude"
|
|
3959
3972
|
};
|
|
3960
3973
|
}
|
|
3961
|
-
function
|
|
3974
|
+
function so(e) {
|
|
3962
3975
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
3963
3976
|
}
|
|
3964
|
-
async function
|
|
3965
|
-
if (!
|
|
3977
|
+
async function Jr() {
|
|
3978
|
+
if (!me) return null;
|
|
3966
3979
|
let e;
|
|
3967
3980
|
try {
|
|
3968
3981
|
e = await navigator.mediaDevices.getDisplayMedia(
|
|
3969
|
-
|
|
3982
|
+
Fe({ audio: !1 })
|
|
3970
3983
|
);
|
|
3971
3984
|
} catch (t) {
|
|
3972
3985
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
3973
3986
|
}
|
|
3974
3987
|
try {
|
|
3975
|
-
return await
|
|
3988
|
+
return await Qr(e);
|
|
3976
3989
|
} catch (t) {
|
|
3977
3990
|
return console.error("[media] screenshot capture", t), null;
|
|
3978
3991
|
} finally {
|
|
@@ -3981,7 +3994,7 @@ async function Yr() {
|
|
|
3981
3994
|
});
|
|
3982
3995
|
}
|
|
3983
3996
|
}
|
|
3984
|
-
async function
|
|
3997
|
+
async function Qr(e) {
|
|
3985
3998
|
const t = document.createElement("video");
|
|
3986
3999
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
3987
4000
|
const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -3991,21 +4004,21 @@ async function Jr(e) {
|
|
|
3991
4004
|
(k) => k ? l(k) : p(new Error("toBlob failed")),
|
|
3992
4005
|
"image/png"
|
|
3993
4006
|
);
|
|
3994
|
-
}),
|
|
3995
|
-
return new File([s], `capture-${
|
|
4007
|
+
}), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
4008
|
+
return new File([s], `capture-${a}.png`, { type: "image/png" });
|
|
3996
4009
|
}
|
|
3997
|
-
async function
|
|
4010
|
+
async function Xr(e = {}) {
|
|
3998
4011
|
var k;
|
|
3999
|
-
if (!
|
|
4012
|
+
if (!me || !Ae) return null;
|
|
4000
4013
|
let t;
|
|
4001
4014
|
try {
|
|
4002
4015
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
4003
|
-
|
|
4016
|
+
Fe({ audio: !0 })
|
|
4004
4017
|
);
|
|
4005
4018
|
} catch (w) {
|
|
4006
4019
|
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
4007
4020
|
}
|
|
4008
|
-
const n =
|
|
4021
|
+
const n = Yr();
|
|
4009
4022
|
let i;
|
|
4010
4023
|
try {
|
|
4011
4024
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
@@ -4015,7 +4028,7 @@ async function Qr(e = {}) {
|
|
|
4015
4028
|
}), null;
|
|
4016
4029
|
}
|
|
4017
4030
|
const r = [];
|
|
4018
|
-
let s = null,
|
|
4031
|
+
let s = null, a = !1;
|
|
4019
4032
|
i.addEventListener("dataavailable", (w) => {
|
|
4020
4033
|
w.data && w.data.size > 0 && r.push(w.data);
|
|
4021
4034
|
}), i.addEventListener("stop", () => {
|
|
@@ -4023,17 +4036,17 @@ async function Qr(e = {}) {
|
|
|
4023
4036
|
if (s && clearInterval(s), t.getTracks().forEach((B) => {
|
|
4024
4037
|
B.stop();
|
|
4025
4038
|
}), r.length) {
|
|
4026
|
-
const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19),
|
|
4039
|
+
const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${S}.${H}`, {
|
|
4027
4040
|
type: B
|
|
4028
4041
|
});
|
|
4029
|
-
(w = e.onfinalize) == null || w.call(e,
|
|
4042
|
+
(w = e.onfinalize) == null || w.call(e, U);
|
|
4030
4043
|
} else
|
|
4031
4044
|
(T = e.oncancel) == null || T.call(e);
|
|
4032
4045
|
}), t.getVideoTracks().forEach((w) => {
|
|
4033
4046
|
w.addEventListener("ended", () => l(), { once: !0 });
|
|
4034
4047
|
});
|
|
4035
4048
|
function l() {
|
|
4036
|
-
if (!
|
|
4049
|
+
if (!a && (a = !0, i.state !== "inactive"))
|
|
4037
4050
|
try {
|
|
4038
4051
|
i.stop();
|
|
4039
4052
|
} catch (w) {
|
|
@@ -4059,7 +4072,7 @@ async function Qr(e = {}) {
|
|
|
4059
4072
|
}
|
|
4060
4073
|
};
|
|
4061
4074
|
}
|
|
4062
|
-
const
|
|
4075
|
+
const Zr = [
|
|
4063
4076
|
{
|
|
4064
4077
|
action: "file",
|
|
4065
4078
|
labelKey: "composer.attachFile",
|
|
@@ -4075,7 +4088,7 @@ const Xr = [
|
|
|
4075
4088
|
labelKey: "composer.recordScreen",
|
|
4076
4089
|
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"
|
|
4077
4090
|
}
|
|
4078
|
-
],
|
|
4091
|
+
], ei = {
|
|
4079
4092
|
name: "WmComposer",
|
|
4080
4093
|
inject: {
|
|
4081
4094
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4109,10 +4122,10 @@ const Xr = [
|
|
|
4109
4122
|
return !this.disabled && !!this.local.trim();
|
|
4110
4123
|
},
|
|
4111
4124
|
attachItems() {
|
|
4112
|
-
return
|
|
4125
|
+
return Zr.map((e) => ({
|
|
4113
4126
|
...e,
|
|
4114
4127
|
label: this.t(e.labelKey),
|
|
4115
|
-
disabled: e.action === "screenshot" && !
|
|
4128
|
+
disabled: e.action === "screenshot" && !me || e.action === "record" && (!me || !Ae)
|
|
4116
4129
|
}));
|
|
4117
4130
|
},
|
|
4118
4131
|
recordingElapsedLabel() {
|
|
@@ -4183,13 +4196,13 @@ const Xr = [
|
|
|
4183
4196
|
},
|
|
4184
4197
|
async captureScreenshot() {
|
|
4185
4198
|
if (this.disabled) return;
|
|
4186
|
-
const e = await
|
|
4199
|
+
const e = await Jr();
|
|
4187
4200
|
e && this.$emit("attach", e);
|
|
4188
4201
|
},
|
|
4189
4202
|
async startRecording() {
|
|
4190
4203
|
if (this.recording || this.disabled) return;
|
|
4191
4204
|
this.recordingElapsed = 0;
|
|
4192
|
-
const e = await
|
|
4205
|
+
const e = await Xr({
|
|
4193
4206
|
onstart: () => {
|
|
4194
4207
|
this.recording = !0;
|
|
4195
4208
|
},
|
|
@@ -4231,97 +4244,97 @@ const Xr = [
|
|
|
4231
4244
|
!e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
|
|
4232
4245
|
}
|
|
4233
4246
|
}
|
|
4234
|
-
},
|
|
4247
|
+
}, ti = {
|
|
4235
4248
|
key: 0,
|
|
4236
4249
|
class: "wm-rec"
|
|
4237
|
-
},
|
|
4250
|
+
}, ni = { class: "wm-rec__lbl" }, si = {
|
|
4238
4251
|
key: 1,
|
|
4239
4252
|
class: "wm-compose__menu",
|
|
4240
4253
|
role: "menu"
|
|
4241
|
-
},
|
|
4254
|
+
}, ri = ["disabled", "onClick"], ii = { class: "wm-compose__menuIcon" }, ai = {
|
|
4242
4255
|
viewBox: "0 0 24 24",
|
|
4243
4256
|
width: "14",
|
|
4244
4257
|
height: "14",
|
|
4245
4258
|
"aria-hidden": "true"
|
|
4246
|
-
},
|
|
4247
|
-
function
|
|
4259
|
+
}, oi = ["d"], li = ["placeholder", "disabled"], ci = { class: "wm-compose__actions" }, di = ["title", "aria-label", "disabled"], ui = ["disabled", "aria-label"];
|
|
4260
|
+
function mi(e, t, n, i, r, s) {
|
|
4248
4261
|
return c(), u("div", {
|
|
4249
4262
|
class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
|
|
4250
|
-
style:
|
|
4263
|
+
style: z(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
|
|
4251
4264
|
}, [
|
|
4252
|
-
r.recording ? (c(), u("div",
|
|
4253
|
-
t[8] || (t[8] =
|
|
4265
|
+
r.recording ? (c(), u("div", ti, [
|
|
4266
|
+
t[8] || (t[8] = o("span", {
|
|
4254
4267
|
class: "wm-rec__dot",
|
|
4255
4268
|
"aria-hidden": "true"
|
|
4256
4269
|
}, null, -1)),
|
|
4257
|
-
|
|
4258
|
-
|
|
4270
|
+
o("span", ni, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
|
|
4271
|
+
o("button", {
|
|
4259
4272
|
type: "button",
|
|
4260
4273
|
class: "wm-rec__stop",
|
|
4261
|
-
onClick: t[0] || (t[0] = (...
|
|
4274
|
+
onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
|
|
4262
4275
|
}, v(s.t("composer.stop")), 1)
|
|
4263
4276
|
])) : y("", !0),
|
|
4264
|
-
|
|
4277
|
+
o("form", {
|
|
4265
4278
|
class: O(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
4266
|
-
onSubmit: t[7] || (t[7] = G((...
|
|
4279
|
+
onSubmit: t[7] || (t[7] = G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
|
|
4267
4280
|
}, [
|
|
4268
|
-
|
|
4281
|
+
o("input", {
|
|
4269
4282
|
ref: "fileEl",
|
|
4270
4283
|
type: "file",
|
|
4271
4284
|
hidden: "",
|
|
4272
4285
|
multiple: "",
|
|
4273
|
-
onChange: t[1] || (t[1] = (...
|
|
4286
|
+
onChange: t[1] || (t[1] = (...a) => s.onFile && s.onFile(...a))
|
|
4274
4287
|
}, null, 544),
|
|
4275
4288
|
r.attachOpen ? (c(), u("div", {
|
|
4276
4289
|
key: 0,
|
|
4277
4290
|
class: "wm-compose__overlay",
|
|
4278
|
-
onClick: t[2] || (t[2] = (
|
|
4291
|
+
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
4279
4292
|
})) : y("", !0),
|
|
4280
|
-
r.attachOpen ? (c(), u("div",
|
|
4281
|
-
(c(!0), u(E, null,
|
|
4282
|
-
key:
|
|
4293
|
+
r.attachOpen ? (c(), u("div", si, [
|
|
4294
|
+
(c(!0), u(E, null, F(s.attachItems, (a) => (c(), u("button", {
|
|
4295
|
+
key: a.action,
|
|
4283
4296
|
type: "button",
|
|
4284
4297
|
class: "wm-compose__menuItem",
|
|
4285
|
-
disabled:
|
|
4286
|
-
onClick: (l) => s.onAttachAction(
|
|
4298
|
+
disabled: a.disabled,
|
|
4299
|
+
onClick: (l) => s.onAttachAction(a.action)
|
|
4287
4300
|
}, [
|
|
4288
|
-
|
|
4289
|
-
(c(), u("svg",
|
|
4290
|
-
|
|
4291
|
-
d:
|
|
4301
|
+
o("span", ii, [
|
|
4302
|
+
(c(), u("svg", ai, [
|
|
4303
|
+
o("path", {
|
|
4304
|
+
d: a.path,
|
|
4292
4305
|
stroke: "currentColor",
|
|
4293
4306
|
"stroke-width": "1.8",
|
|
4294
4307
|
"stroke-linecap": "round",
|
|
4295
4308
|
"stroke-linejoin": "round",
|
|
4296
4309
|
fill: "none"
|
|
4297
|
-
}, null, 8,
|
|
4310
|
+
}, null, 8, oi)
|
|
4298
4311
|
]))
|
|
4299
4312
|
]),
|
|
4300
|
-
|
|
4301
|
-
], 8,
|
|
4313
|
+
o("span", null, v(a.label), 1)
|
|
4314
|
+
], 8, ri))), 128))
|
|
4302
4315
|
])) : y("", !0),
|
|
4303
|
-
$(
|
|
4316
|
+
$(o("textarea", {
|
|
4304
4317
|
ref: "inputEl",
|
|
4305
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
4318
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
|
|
4306
4319
|
class: "wm-compose__input",
|
|
4307
4320
|
rows: "3",
|
|
4308
4321
|
placeholder: n.placeholder,
|
|
4309
4322
|
disabled: n.disabled,
|
|
4310
|
-
onKeydown: t[4] || (t[4] = (...
|
|
4311
|
-
onInput: t[5] || (t[5] = (...
|
|
4312
|
-
}, null, 40,
|
|
4323
|
+
onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
|
|
4324
|
+
onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
|
|
4325
|
+
}, null, 40, li), [
|
|
4313
4326
|
[X, r.local]
|
|
4314
4327
|
]),
|
|
4315
|
-
|
|
4316
|
-
|
|
4328
|
+
o("div", ci, [
|
|
4329
|
+
o("button", {
|
|
4317
4330
|
type: "button",
|
|
4318
4331
|
class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
4319
4332
|
title: n.attachLabel,
|
|
4320
4333
|
"aria-label": n.attachLabel,
|
|
4321
4334
|
disabled: r.recording,
|
|
4322
|
-
onClick: t[6] || (t[6] = (
|
|
4335
|
+
onClick: t[6] || (t[6] = (a) => r.attachOpen = !r.attachOpen)
|
|
4323
4336
|
}, [...t[9] || (t[9] = [
|
|
4324
|
-
|
|
4337
|
+
o("svg", {
|
|
4325
4338
|
width: "13",
|
|
4326
4339
|
height: "13",
|
|
4327
4340
|
viewBox: "0 0 24 24",
|
|
@@ -4332,16 +4345,16 @@ function ui(e, t, n, i, r, s) {
|
|
|
4332
4345
|
"stroke-linejoin": "round",
|
|
4333
4346
|
"aria-hidden": "true"
|
|
4334
4347
|
}, [
|
|
4335
|
-
|
|
4348
|
+
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" })
|
|
4336
4349
|
], -1)
|
|
4337
|
-
])], 10,
|
|
4338
|
-
|
|
4350
|
+
])], 10, di),
|
|
4351
|
+
o("button", {
|
|
4339
4352
|
type: "submit",
|
|
4340
4353
|
class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
4341
4354
|
disabled: !s.canSend,
|
|
4342
4355
|
"aria-label": s.t("composer.send")
|
|
4343
4356
|
}, [...t[10] || (t[10] = [
|
|
4344
|
-
|
|
4357
|
+
o("svg", {
|
|
4345
4358
|
width: "13",
|
|
4346
4359
|
height: "13",
|
|
4347
4360
|
viewBox: "0 0 24 24",
|
|
@@ -4352,14 +4365,14 @@ function ui(e, t, n, i, r, s) {
|
|
|
4352
4365
|
"stroke-linejoin": "round",
|
|
4353
4366
|
"aria-hidden": "true"
|
|
4354
4367
|
}, [
|
|
4355
|
-
|
|
4368
|
+
o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4356
4369
|
], -1)
|
|
4357
|
-
])], 10,
|
|
4370
|
+
])], 10, ui)
|
|
4358
4371
|
])
|
|
4359
4372
|
], 34)
|
|
4360
4373
|
], 6);
|
|
4361
4374
|
}
|
|
4362
|
-
const hi = /* @__PURE__ */ N(
|
|
4375
|
+
const hi = /* @__PURE__ */ N(ei, [["render", mi], ["__scopeId", "data-v-01e81a27"]]), fi = {
|
|
4363
4376
|
name: "WmSuggestionChips",
|
|
4364
4377
|
props: {
|
|
4365
4378
|
items: { type: Array, default: () => [] },
|
|
@@ -4376,22 +4389,22 @@ const hi = /* @__PURE__ */ N(Zr, [["render", ui], ["__scopeId", "data-v-01e81a27
|
|
|
4376
4389
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4377
4390
|
}
|
|
4378
4391
|
}
|
|
4379
|
-
},
|
|
4380
|
-
function
|
|
4392
|
+
}, _i = ["onClick"];
|
|
4393
|
+
function gi(e, t, n, i, r, s) {
|
|
4381
4394
|
return n.items.length ? (c(), u("div", {
|
|
4382
4395
|
key: s.batchKey,
|
|
4383
4396
|
class: "wm-chips"
|
|
4384
4397
|
}, [
|
|
4385
|
-
(c(!0), u(E, null,
|
|
4398
|
+
(c(!0), u(E, null, F(n.items, (a, l) => (c(), u("button", {
|
|
4386
4399
|
key: l,
|
|
4387
4400
|
type: "button",
|
|
4388
4401
|
class: "wm-chip",
|
|
4389
|
-
style:
|
|
4390
|
-
onClick: (p) => e.$emit("select",
|
|
4391
|
-
}, v(
|
|
4402
|
+
style: z({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4403
|
+
onClick: (p) => e.$emit("select", a)
|
|
4404
|
+
}, v(a.label), 13, _i))), 128))
|
|
4392
4405
|
])) : y("", !0);
|
|
4393
4406
|
}
|
|
4394
|
-
const
|
|
4407
|
+
const pi = /* @__PURE__ */ N(fi, [["render", gi], ["__scopeId", "data-v-47ad8085"]]), vi = {
|
|
4395
4408
|
name: "WmApprovalCard",
|
|
4396
4409
|
components: { AIAvatar: le },
|
|
4397
4410
|
inject: {
|
|
@@ -4435,27 +4448,27 @@ const gi = /* @__PURE__ */ N(mi, [["render", _i], ["__scopeId", "data-v-47ad8085
|
|
|
4435
4448
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4436
4449
|
}
|
|
4437
4450
|
}
|
|
4438
|
-
},
|
|
4451
|
+
}, yi = { class: "wm-approval" }, wi = { class: "wm-approval__head" }, bi = { class: "wm-approval__icon" }, ki = { class: "wm-approval__main" }, Ci = { class: "wm-approval__title" }, Ai = {
|
|
4439
4452
|
key: 0,
|
|
4440
4453
|
class: "wm-approval__detail"
|
|
4441
|
-
},
|
|
4442
|
-
function
|
|
4443
|
-
const
|
|
4444
|
-
return c(), u("div",
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
K(
|
|
4454
|
+
}, Si = { class: "wm-approval__actions" };
|
|
4455
|
+
function Mi(e, t, n, i, r, s) {
|
|
4456
|
+
const a = R("AIAvatar");
|
|
4457
|
+
return c(), u("div", yi, [
|
|
4458
|
+
o("div", wi, [
|
|
4459
|
+
o("div", bi, [
|
|
4460
|
+
K(a, {
|
|
4448
4461
|
size: 24,
|
|
4449
4462
|
name: n.agentName,
|
|
4450
4463
|
"image-url": n.agentAvatarUrl
|
|
4451
4464
|
}, null, 8, ["name", "image-url"])
|
|
4452
4465
|
]),
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
n.detail ? (c(), u("div",
|
|
4466
|
+
o("div", ki, [
|
|
4467
|
+
o("div", Ci, v(n.action), 1),
|
|
4468
|
+
n.detail ? (c(), u("div", Ai, v(n.detail), 1)) : y("", !0)
|
|
4456
4469
|
])
|
|
4457
4470
|
]),
|
|
4458
|
-
|
|
4471
|
+
o("div", Si, [
|
|
4459
4472
|
s.rejectId ? (c(), u("button", {
|
|
4460
4473
|
key: 0,
|
|
4461
4474
|
type: "button",
|
|
@@ -4471,9 +4484,9 @@ function Si(e, t, n, i, r, s) {
|
|
|
4471
4484
|
])
|
|
4472
4485
|
]);
|
|
4473
4486
|
}
|
|
4474
|
-
const
|
|
4475
|
-
let
|
|
4476
|
-
const
|
|
4487
|
+
const Ti = /* @__PURE__ */ N(vi, [["render", Mi], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4488
|
+
let Ee = 0;
|
|
4489
|
+
const xi = /* @__PURE__ */ new Set([
|
|
4477
4490
|
"text",
|
|
4478
4491
|
"textarea",
|
|
4479
4492
|
"number",
|
|
@@ -4481,7 +4494,7 @@ const Ti = /* @__PURE__ */ new Set([
|
|
|
4481
4494
|
"select",
|
|
4482
4495
|
"multiselect",
|
|
4483
4496
|
"date"
|
|
4484
|
-
]),
|
|
4497
|
+
]), Oi = {
|
|
4485
4498
|
name: "WmFormCard",
|
|
4486
4499
|
components: { AIAvatar: le },
|
|
4487
4500
|
inject: {
|
|
@@ -4498,8 +4511,8 @@ const Ti = /* @__PURE__ */ new Set([
|
|
|
4498
4511
|
},
|
|
4499
4512
|
emits: ["submit"],
|
|
4500
4513
|
data() {
|
|
4501
|
-
return
|
|
4502
|
-
_uid:
|
|
4514
|
+
return Ee += 1, {
|
|
4515
|
+
_uid: Ee,
|
|
4503
4516
|
values: {},
|
|
4504
4517
|
busy: !1,
|
|
4505
4518
|
error: ""
|
|
@@ -4511,7 +4524,7 @@ const Ti = /* @__PURE__ */ new Set([
|
|
|
4511
4524
|
// douteux.
|
|
4512
4525
|
normalizedFields() {
|
|
4513
4526
|
var t;
|
|
4514
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
4527
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !xi.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
4515
4528
|
}
|
|
4516
4529
|
},
|
|
4517
4530
|
created() {
|
|
@@ -4564,64 +4577,64 @@ const Ti = /* @__PURE__ */ new Set([
|
|
|
4564
4577
|
}
|
|
4565
4578
|
}
|
|
4566
4579
|
}
|
|
4567
|
-
},
|
|
4580
|
+
}, Ii = { class: "wm-form" }, Li = { class: "wm-form__head" }, Ei = { class: "wm-form__icon" }, Bi = { class: "wm-form__main" }, Ri = { class: "wm-form__title" }, Ni = {
|
|
4568
4581
|
key: 0,
|
|
4569
4582
|
class: "wm-form__detail"
|
|
4570
|
-
},
|
|
4583
|
+
}, Pi = ["for"], Ui = {
|
|
4571
4584
|
key: 0,
|
|
4572
4585
|
class: "wm-form__req",
|
|
4573
4586
|
"aria-hidden": "true"
|
|
4574
|
-
}, Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"],
|
|
4587
|
+
}, Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Di = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ji = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Hi = ["id", "onUpdate:modelValue", "required", "disabled"], zi = {
|
|
4575
4588
|
key: 4,
|
|
4576
4589
|
class: "wm-form__bool"
|
|
4577
|
-
},
|
|
4590
|
+
}, qi = ["id", "onUpdate:modelValue", "disabled"], Ki = ["id", "onUpdate:modelValue", "required", "disabled"], Vi = {
|
|
4578
4591
|
value: "",
|
|
4579
4592
|
disabled: ""
|
|
4580
|
-
},
|
|
4593
|
+
}, $i = ["value"], Wi = {
|
|
4581
4594
|
key: 6,
|
|
4582
4595
|
class: "wm-form__multi"
|
|
4583
|
-
},
|
|
4596
|
+
}, Gi = ["value", "checked", "disabled", "onChange"], Yi = {
|
|
4584
4597
|
key: 0,
|
|
4585
4598
|
class: "wm-form__err"
|
|
4586
|
-
},
|
|
4599
|
+
}, Ji = ["disabled"], Qi = {
|
|
4587
4600
|
key: 0,
|
|
4588
4601
|
class: "wm-form__spinner",
|
|
4589
4602
|
"aria-hidden": "true"
|
|
4590
|
-
},
|
|
4603
|
+
}, Xi = {
|
|
4591
4604
|
key: 2,
|
|
4592
4605
|
class: "wm-form__doneLbl"
|
|
4593
4606
|
};
|
|
4594
|
-
function
|
|
4595
|
-
const
|
|
4596
|
-
return c(), u("div",
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
K(
|
|
4607
|
+
function Zi(e, t, n, i, r, s) {
|
|
4608
|
+
const a = R("AIAvatar");
|
|
4609
|
+
return c(), u("div", Ii, [
|
|
4610
|
+
o("div", Li, [
|
|
4611
|
+
o("div", Ei, [
|
|
4612
|
+
K(a, {
|
|
4600
4613
|
size: 24,
|
|
4601
4614
|
name: n.agentName,
|
|
4602
4615
|
"image-url": n.agentAvatarUrl
|
|
4603
4616
|
}, null, 8, ["name", "image-url"])
|
|
4604
4617
|
]),
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
n.form.description ? (c(), u("div",
|
|
4618
|
+
o("div", Bi, [
|
|
4619
|
+
o("div", Ri, v(n.form.title || s.t("form.title")), 1),
|
|
4620
|
+
n.form.description ? (c(), u("div", Ni, v(n.form.description), 1)) : y("", !0)
|
|
4608
4621
|
])
|
|
4609
4622
|
]),
|
|
4610
|
-
|
|
4623
|
+
o("form", {
|
|
4611
4624
|
class: "wm-form__body",
|
|
4612
4625
|
onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4613
4626
|
}, [
|
|
4614
|
-
(c(!0), u(E, null,
|
|
4627
|
+
(c(!0), u(E, null, F(s.normalizedFields, (l) => (c(), u("div", {
|
|
4615
4628
|
key: l.key,
|
|
4616
4629
|
class: "wm-form__field"
|
|
4617
4630
|
}, [
|
|
4618
|
-
|
|
4631
|
+
o("label", {
|
|
4619
4632
|
for: `wm-f-${r._uid}-${l.key}`,
|
|
4620
4633
|
class: "wm-form__label"
|
|
4621
4634
|
}, [
|
|
4622
|
-
|
|
4623
|
-
l.required ? (c(), u("span",
|
|
4624
|
-
], 8,
|
|
4635
|
+
ye(v(l.label), 1),
|
|
4636
|
+
l.required ? (c(), u("span", Ui, "*")) : y("", !0)
|
|
4637
|
+
], 8, Pi),
|
|
4625
4638
|
l.type === "text" ? $((c(), u("input", {
|
|
4626
4639
|
key: 0,
|
|
4627
4640
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4642,7 +4655,7 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4642
4655
|
placeholder: l.placeholder || "",
|
|
4643
4656
|
required: l.required,
|
|
4644
4657
|
disabled: n.readOnly || r.busy
|
|
4645
|
-
}, null, 8,
|
|
4658
|
+
}, null, 8, Di)), [
|
|
4646
4659
|
[X, r.values[l.key]]
|
|
4647
4660
|
]) : l.type === "number" ? $((c(), u("input", {
|
|
4648
4661
|
key: 2,
|
|
@@ -4653,7 +4666,7 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4653
4666
|
placeholder: l.placeholder || "",
|
|
4654
4667
|
required: l.required,
|
|
4655
4668
|
disabled: n.readOnly || r.busy
|
|
4656
|
-
}, null, 8,
|
|
4669
|
+
}, null, 8, ji)), [
|
|
4657
4670
|
[
|
|
4658
4671
|
X,
|
|
4659
4672
|
r.values[l.key],
|
|
@@ -4668,18 +4681,18 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4668
4681
|
class: "wm-form__input",
|
|
4669
4682
|
required: l.required,
|
|
4670
4683
|
disabled: n.readOnly || r.busy
|
|
4671
|
-
}, null, 8,
|
|
4684
|
+
}, null, 8, Hi)), [
|
|
4672
4685
|
[X, r.values[l.key]]
|
|
4673
|
-
]) : l.type === "boolean" ? (c(), u("label",
|
|
4674
|
-
$(
|
|
4686
|
+
]) : l.type === "boolean" ? (c(), u("label", zi, [
|
|
4687
|
+
$(o("input", {
|
|
4675
4688
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4676
4689
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4677
4690
|
type: "checkbox",
|
|
4678
4691
|
disabled: n.readOnly || r.busy
|
|
4679
|
-
}, null, 8,
|
|
4680
|
-
[
|
|
4692
|
+
}, null, 8, qi), [
|
|
4693
|
+
[ze, r.values[l.key]]
|
|
4681
4694
|
]),
|
|
4682
|
-
|
|
4695
|
+
o("span", null, v(l.placeholder || s.t("common.yes")), 1)
|
|
4683
4696
|
])) : l.type === "select" ? $((c(), u("select", {
|
|
4684
4697
|
key: 5,
|
|
4685
4698
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4688,19 +4701,19 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4688
4701
|
required: l.required,
|
|
4689
4702
|
disabled: n.readOnly || r.busy
|
|
4690
4703
|
}, [
|
|
4691
|
-
|
|
4692
|
-
(c(!0), u(E, null,
|
|
4704
|
+
o("option", Vi, v(l.placeholder || s.t("form.choose")), 1),
|
|
4705
|
+
(c(!0), u(E, null, F(l.options, (p) => (c(), u("option", {
|
|
4693
4706
|
key: p.value,
|
|
4694
4707
|
value: p.value
|
|
4695
|
-
}, v(p.label), 9,
|
|
4696
|
-
], 8,
|
|
4697
|
-
[
|
|
4698
|
-
]) : l.type === "multiselect" ? (c(), u("div",
|
|
4699
|
-
(c(!0), u(E, null,
|
|
4708
|
+
}, v(p.label), 9, $i))), 128))
|
|
4709
|
+
], 8, Ki)), [
|
|
4710
|
+
[qe, r.values[l.key]]
|
|
4711
|
+
]) : l.type === "multiselect" ? (c(), u("div", Wi, [
|
|
4712
|
+
(c(!0), u(E, null, F(l.options, (p) => (c(), u("label", {
|
|
4700
4713
|
key: p.value,
|
|
4701
4714
|
class: "wm-form__multiItem"
|
|
4702
4715
|
}, [
|
|
4703
|
-
|
|
4716
|
+
o("input", {
|
|
4704
4717
|
type: "checkbox",
|
|
4705
4718
|
value: p.value,
|
|
4706
4719
|
checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(p.value),
|
|
@@ -4710,25 +4723,25 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4710
4723
|
p.value,
|
|
4711
4724
|
k.target.checked
|
|
4712
4725
|
)
|
|
4713
|
-
}, null, 40,
|
|
4714
|
-
|
|
4726
|
+
}, null, 40, Gi),
|
|
4727
|
+
o("span", null, v(p.label), 1)
|
|
4715
4728
|
]))), 128))
|
|
4716
4729
|
])) : y("", !0)
|
|
4717
4730
|
]))), 128)),
|
|
4718
|
-
r.error ? (c(), u("div",
|
|
4719
|
-
n.readOnly ? (c(), u("div",
|
|
4731
|
+
r.error ? (c(), u("div", Yi, v(r.error), 1)) : y("", !0),
|
|
4732
|
+
n.readOnly ? (c(), u("div", Xi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4720
4733
|
key: 1,
|
|
4721
4734
|
type: "submit",
|
|
4722
4735
|
class: "wm-form__submit",
|
|
4723
4736
|
disabled: r.busy
|
|
4724
4737
|
}, [
|
|
4725
|
-
r.busy ? (c(), u("span",
|
|
4726
|
-
|
|
4727
|
-
], 8,
|
|
4738
|
+
r.busy ? (c(), u("span", Qi)) : y("", !0),
|
|
4739
|
+
o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4740
|
+
], 8, Ji))
|
|
4728
4741
|
], 32)
|
|
4729
4742
|
]);
|
|
4730
4743
|
}
|
|
4731
|
-
const
|
|
4744
|
+
const ea = /* @__PURE__ */ N(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56"]]), ta = {
|
|
4732
4745
|
name: "WmFeedback",
|
|
4733
4746
|
inject: {
|
|
4734
4747
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4762,15 +4775,15 @@ const Zi = /* @__PURE__ */ N(xi, [["render", Xi], ["__scopeId", "data-v-fe65cc56
|
|
|
4762
4775
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4763
4776
|
}
|
|
4764
4777
|
}
|
|
4765
|
-
},
|
|
4778
|
+
}, na = { class: "wm-fb" }, sa = { class: "wm-fb__title" }, ra = { class: "wm-fb__sub" }, ia = { class: "wm-fb__row" }, aa = ["onClick"], oa = { class: "wm-fb__emoji" }, la = { class: "wm-fb__label" }, ca = ["disabled"], da = {
|
|
4766
4779
|
key: 1,
|
|
4767
4780
|
class: "wm-fb__done"
|
|
4768
|
-
},
|
|
4781
|
+
}, ua = { class: "wm-fb__doneTitle" }, ma = { class: "wm-fb__doneSub" };
|
|
4769
4782
|
function ha(e, t, n, i, r, s) {
|
|
4770
|
-
return c(), u("div",
|
|
4771
|
-
n.done ? (c(), u("div",
|
|
4772
|
-
t[1] || (t[1] =
|
|
4773
|
-
|
|
4783
|
+
return c(), u("div", na, [
|
|
4784
|
+
n.done ? (c(), u("div", da, [
|
|
4785
|
+
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
4786
|
+
o("svg", {
|
|
4774
4787
|
width: "16",
|
|
4775
4788
|
height: "16",
|
|
4776
4789
|
viewBox: "0 0 24 24",
|
|
@@ -4781,35 +4794,35 @@ function ha(e, t, n, i, r, s) {
|
|
|
4781
4794
|
"stroke-linejoin": "round",
|
|
4782
4795
|
"aria-hidden": "true"
|
|
4783
4796
|
}, [
|
|
4784
|
-
|
|
4797
|
+
o("path", { d: "M20 6L9 17l-5-5" })
|
|
4785
4798
|
])
|
|
4786
4799
|
], -1)),
|
|
4787
|
-
|
|
4788
|
-
|
|
4800
|
+
o("div", ua, v(s.t("feedback.doneTitle")), 1),
|
|
4801
|
+
o("div", ma, v(s.t("feedback.doneSubtitle")), 1)
|
|
4789
4802
|
])) : (c(), u(E, { key: 0 }, [
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
(c(!0), u(E, null,
|
|
4794
|
-
key:
|
|
4803
|
+
o("div", sa, v(s.t("feedback.question")), 1),
|
|
4804
|
+
o("div", ra, v(s.t("feedback.subtitle")), 1),
|
|
4805
|
+
o("div", ia, [
|
|
4806
|
+
(c(!0), u(E, null, F(s.options, (a) => (c(), u("button", {
|
|
4807
|
+
key: a.v,
|
|
4795
4808
|
type: "button",
|
|
4796
|
-
class: O(["wm-fb__opt", { "is-selected": r.sel ===
|
|
4797
|
-
onClick: (l) => r.sel =
|
|
4809
|
+
class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
|
|
4810
|
+
onClick: (l) => r.sel = a.v
|
|
4798
4811
|
}, [
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
], 10,
|
|
4812
|
+
o("span", oa, v(a.e), 1),
|
|
4813
|
+
o("span", la, v(a.l), 1)
|
|
4814
|
+
], 10, aa))), 128))
|
|
4802
4815
|
]),
|
|
4803
|
-
|
|
4816
|
+
o("button", {
|
|
4804
4817
|
type: "button",
|
|
4805
4818
|
class: "wm-fb__send",
|
|
4806
4819
|
disabled: !r.sel || n.busy,
|
|
4807
|
-
onClick: t[0] || (t[0] = (...
|
|
4808
|
-
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9,
|
|
4820
|
+
onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
|
|
4821
|
+
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, ca)
|
|
4809
4822
|
], 64))
|
|
4810
4823
|
]);
|
|
4811
4824
|
}
|
|
4812
|
-
const
|
|
4825
|
+
const fa = /* @__PURE__ */ N(ta, [["render", ha], ["__scopeId", "data-v-9b630564"]]), _a = {
|
|
4813
4826
|
name: "WmMoreMenu",
|
|
4814
4827
|
inject: {
|
|
4815
4828
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4852,32 +4865,32 @@ const ma = /* @__PURE__ */ N(ea, [["render", ha], ["__scopeId", "data-v-9b630564
|
|
|
4852
4865
|
this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
|
|
4853
4866
|
}
|
|
4854
4867
|
}
|
|
4855
|
-
},
|
|
4868
|
+
}, ga = { class: "wm-mm" }, pa = {
|
|
4856
4869
|
class: "wm-mm__pop",
|
|
4857
4870
|
role: "menu"
|
|
4858
|
-
},
|
|
4871
|
+
}, va = {
|
|
4859
4872
|
key: 0,
|
|
4860
4873
|
class: "wm-mm__section"
|
|
4861
|
-
},
|
|
4874
|
+
}, ya = { class: "wm-mm__label" }, wa = { class: "wm-mm__label" }, ba = {
|
|
4862
4875
|
key: 1,
|
|
4863
4876
|
class: "wm-mm__sep"
|
|
4864
|
-
},
|
|
4865
|
-
function
|
|
4866
|
-
return c(), u("div",
|
|
4867
|
-
|
|
4877
|
+
}, ka = { class: "wm-mm__section" }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__label" }, Sa = { class: "wm-mm__section" }, Ma = { class: "wm-mm__label" }, Ta = { class: "wm-mm__label" };
|
|
4878
|
+
function xa(e, t, n, i, r, s) {
|
|
4879
|
+
return c(), u("div", ga, [
|
|
4880
|
+
o("div", {
|
|
4868
4881
|
class: "wm-mm__scrim",
|
|
4869
|
-
onClick: t[0] || (t[0] = (
|
|
4882
|
+
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4870
4883
|
}),
|
|
4871
|
-
|
|
4872
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4884
|
+
o("div", pa, [
|
|
4885
|
+
n.canRename || n.canExport ? (c(), u("div", va, [
|
|
4873
4886
|
n.canRename ? (c(), u("button", {
|
|
4874
4887
|
key: 0,
|
|
4875
4888
|
type: "button",
|
|
4876
4889
|
class: "wm-mm__item",
|
|
4877
|
-
onClick: t[1] || (t[1] = (
|
|
4890
|
+
onClick: t[1] || (t[1] = (a) => s.emit("rename"))
|
|
4878
4891
|
}, [
|
|
4879
|
-
t[7] || (t[7] =
|
|
4880
|
-
|
|
4892
|
+
t[7] || (t[7] = o("span", { class: "wm-mm__icon" }, [
|
|
4893
|
+
o("svg", {
|
|
4881
4894
|
width: "12",
|
|
4882
4895
|
height: "12",
|
|
4883
4896
|
viewBox: "0 0 24 24",
|
|
@@ -4888,20 +4901,20 @@ function Ta(e, t, n, i, r, s) {
|
|
|
4888
4901
|
"stroke-linejoin": "round",
|
|
4889
4902
|
"aria-hidden": "true"
|
|
4890
4903
|
}, [
|
|
4891
|
-
|
|
4892
|
-
|
|
4904
|
+
o("path", { d: "M12 20h9" }),
|
|
4905
|
+
o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
4893
4906
|
])
|
|
4894
4907
|
], -1)),
|
|
4895
|
-
|
|
4908
|
+
o("span", ya, v(s.t("moreMenu.editTitle")), 1)
|
|
4896
4909
|
])) : y("", !0),
|
|
4897
4910
|
n.canExport ? (c(), u("button", {
|
|
4898
4911
|
key: 1,
|
|
4899
4912
|
type: "button",
|
|
4900
4913
|
class: "wm-mm__item",
|
|
4901
|
-
onClick: t[2] || (t[2] = (
|
|
4914
|
+
onClick: t[2] || (t[2] = (a) => s.emit("export"))
|
|
4902
4915
|
}, [
|
|
4903
|
-
t[8] || (t[8] =
|
|
4904
|
-
|
|
4916
|
+
t[8] || (t[8] = o("span", { class: "wm-mm__icon" }, [
|
|
4917
|
+
o("svg", {
|
|
4905
4918
|
width: "12",
|
|
4906
4919
|
height: "12",
|
|
4907
4920
|
viewBox: "0 0 24 24",
|
|
@@ -4912,22 +4925,22 @@ function Ta(e, t, n, i, r, s) {
|
|
|
4912
4925
|
"stroke-linejoin": "round",
|
|
4913
4926
|
"aria-hidden": "true"
|
|
4914
4927
|
}, [
|
|
4915
|
-
|
|
4928
|
+
o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
4916
4929
|
])
|
|
4917
4930
|
], -1)),
|
|
4918
|
-
|
|
4919
|
-
t[9] || (t[9] =
|
|
4931
|
+
o("span", wa, v(s.t("moreMenu.exportTranscript")), 1),
|
|
4932
|
+
t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
4920
4933
|
])) : y("", !0)
|
|
4921
4934
|
])) : y("", !0),
|
|
4922
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4923
|
-
|
|
4924
|
-
|
|
4935
|
+
n.canRename || n.canExport ? (c(), u("div", ba)) : y("", !0),
|
|
4936
|
+
o("div", ka, [
|
|
4937
|
+
o("button", {
|
|
4925
4938
|
type: "button",
|
|
4926
4939
|
class: "wm-mm__item",
|
|
4927
|
-
onClick: t[3] || (t[3] = (...
|
|
4940
|
+
onClick: t[3] || (t[3] = (...a) => s.toggleSound && s.toggleSound(...a))
|
|
4928
4941
|
}, [
|
|
4929
|
-
t[11] || (t[11] =
|
|
4930
|
-
|
|
4942
|
+
t[11] || (t[11] = o("span", { class: "wm-mm__icon" }, [
|
|
4943
|
+
o("svg", {
|
|
4931
4944
|
width: "12",
|
|
4932
4945
|
height: "12",
|
|
4933
4946
|
viewBox: "0 0 24 24",
|
|
@@ -4938,24 +4951,24 @@ function Ta(e, t, n, i, r, s) {
|
|
|
4938
4951
|
"stroke-linejoin": "round",
|
|
4939
4952
|
"aria-hidden": "true"
|
|
4940
4953
|
}, [
|
|
4941
|
-
|
|
4942
|
-
|
|
4954
|
+
o("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
|
|
4955
|
+
o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
4943
4956
|
])
|
|
4944
4957
|
], -1)),
|
|
4945
|
-
|
|
4946
|
-
|
|
4958
|
+
o("span", Ca, v(s.t("moreMenu.sound")), 1),
|
|
4959
|
+
o("span", {
|
|
4947
4960
|
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
|
|
4948
4961
|
}, [...t[10] || (t[10] = [
|
|
4949
|
-
|
|
4962
|
+
o("span", { class: "wm-mm__knob" }, null, -1)
|
|
4950
4963
|
])], 2)
|
|
4951
4964
|
]),
|
|
4952
|
-
|
|
4965
|
+
o("button", {
|
|
4953
4966
|
type: "button",
|
|
4954
4967
|
class: "wm-mm__item",
|
|
4955
|
-
onClick: t[4] || (t[4] = (...
|
|
4968
|
+
onClick: t[4] || (t[4] = (...a) => s.toggleBrowserNotif && s.toggleBrowserNotif(...a))
|
|
4956
4969
|
}, [
|
|
4957
|
-
t[13] || (t[13] =
|
|
4958
|
-
|
|
4970
|
+
t[13] || (t[13] = o("span", { class: "wm-mm__icon" }, [
|
|
4971
|
+
o("svg", {
|
|
4959
4972
|
width: "12",
|
|
4960
4973
|
height: "12",
|
|
4961
4974
|
viewBox: "0 0 24 24",
|
|
@@ -4966,27 +4979,27 @@ function Ta(e, t, n, i, r, s) {
|
|
|
4966
4979
|
"stroke-linejoin": "round",
|
|
4967
4980
|
"aria-hidden": "true"
|
|
4968
4981
|
}, [
|
|
4969
|
-
|
|
4982
|
+
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" })
|
|
4970
4983
|
])
|
|
4971
4984
|
], -1)),
|
|
4972
|
-
|
|
4973
|
-
|
|
4985
|
+
o("span", Aa, v(s.t("moreMenu.browserNotifications")), 1),
|
|
4986
|
+
o("span", {
|
|
4974
4987
|
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
|
|
4975
4988
|
}, [...t[12] || (t[12] = [
|
|
4976
|
-
|
|
4989
|
+
o("span", { class: "wm-mm__knob" }, null, -1)
|
|
4977
4990
|
])], 2)
|
|
4978
4991
|
])
|
|
4979
4992
|
]),
|
|
4980
|
-
t[16] || (t[16] =
|
|
4981
|
-
|
|
4993
|
+
t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
|
|
4994
|
+
o("div", Sa, [
|
|
4982
4995
|
n.statusUrl ? (c(), u("button", {
|
|
4983
4996
|
key: 0,
|
|
4984
4997
|
type: "button",
|
|
4985
4998
|
class: "wm-mm__item",
|
|
4986
|
-
onClick: t[5] || (t[5] = (
|
|
4999
|
+
onClick: t[5] || (t[5] = (a) => s.emit("status"))
|
|
4987
5000
|
}, [
|
|
4988
|
-
t[14] || (t[14] =
|
|
4989
|
-
|
|
5001
|
+
t[14] || (t[14] = o("span", { class: "wm-mm__icon" }, [
|
|
5002
|
+
o("svg", {
|
|
4990
5003
|
width: "12",
|
|
4991
5004
|
height: "12",
|
|
4992
5005
|
viewBox: "0 0 24 24",
|
|
@@ -4997,19 +5010,19 @@ function Ta(e, t, n, i, r, s) {
|
|
|
4997
5010
|
"stroke-linejoin": "round",
|
|
4998
5011
|
"aria-hidden": "true"
|
|
4999
5012
|
}, [
|
|
5000
|
-
|
|
5013
|
+
o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
5001
5014
|
])
|
|
5002
5015
|
], -1)),
|
|
5003
|
-
|
|
5016
|
+
o("span", Ma, v(s.t("moreMenu.serviceStatus")), 1)
|
|
5004
5017
|
])) : y("", !0),
|
|
5005
5018
|
n.helpUrl ? (c(), u("button", {
|
|
5006
5019
|
key: 1,
|
|
5007
5020
|
type: "button",
|
|
5008
5021
|
class: "wm-mm__item",
|
|
5009
|
-
onClick: t[6] || (t[6] = (
|
|
5022
|
+
onClick: t[6] || (t[6] = (a) => s.emit("help"))
|
|
5010
5023
|
}, [
|
|
5011
|
-
t[15] || (t[15] =
|
|
5012
|
-
|
|
5024
|
+
t[15] || (t[15] = o("span", { class: "wm-mm__icon" }, [
|
|
5025
|
+
o("svg", {
|
|
5013
5026
|
width: "12",
|
|
5014
5027
|
height: "12",
|
|
5015
5028
|
viewBox: "0 0 24 24",
|
|
@@ -5020,16 +5033,16 @@ function Ta(e, t, n, i, r, s) {
|
|
|
5020
5033
|
"stroke-linejoin": "round",
|
|
5021
5034
|
"aria-hidden": "true"
|
|
5022
5035
|
}, [
|
|
5023
|
-
|
|
5036
|
+
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" })
|
|
5024
5037
|
])
|
|
5025
5038
|
], -1)),
|
|
5026
|
-
|
|
5039
|
+
o("span", Ta, v(s.t("moreMenu.helpCenter")), 1)
|
|
5027
5040
|
])) : y("", !0)
|
|
5028
5041
|
])
|
|
5029
5042
|
])
|
|
5030
5043
|
]);
|
|
5031
5044
|
}
|
|
5032
|
-
const
|
|
5045
|
+
const Oa = /* @__PURE__ */ N(_a, [["render", xa], ["__scopeId", "data-v-76281e95"]]), Ia = {
|
|
5033
5046
|
name: "WmRenameDialog",
|
|
5034
5047
|
inject: {
|
|
5035
5048
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5071,27 +5084,27 @@ const xa = /* @__PURE__ */ N(fa, [["render", Ta], ["__scopeId", "data-v-76281e95
|
|
|
5071
5084
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
5072
5085
|
}
|
|
5073
5086
|
}
|
|
5074
|
-
}, La = { class: "wm-dialog" },
|
|
5087
|
+
}, La = { class: "wm-dialog" }, Ea = {
|
|
5075
5088
|
class: "wm-dialog__card",
|
|
5076
5089
|
role: "dialog",
|
|
5077
5090
|
"aria-modal": "true"
|
|
5078
|
-
},
|
|
5079
|
-
function
|
|
5091
|
+
}, Ba = { class: "wm-dialog__head" }, Ra = { class: "wm-dialog__title" }, Na = ["aria-label"], Pa = { class: "wm-dialog__body" }, Ua = ["placeholder"], Fa = { class: "wm-dialog__actions" }, Da = ["disabled"];
|
|
5092
|
+
function ja(e, t, n, i, r, s) {
|
|
5080
5093
|
return c(), u("div", La, [
|
|
5081
|
-
|
|
5094
|
+
o("div", {
|
|
5082
5095
|
class: "wm-dialog__scrim",
|
|
5083
|
-
onClick: t[0] || (t[0] = (
|
|
5096
|
+
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
5084
5097
|
}),
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5098
|
+
o("div", Ea, [
|
|
5099
|
+
o("div", Ba, [
|
|
5100
|
+
o("div", Ra, v(n.title || s.t("rename.title")), 1),
|
|
5101
|
+
o("button", {
|
|
5089
5102
|
type: "button",
|
|
5090
5103
|
class: "wm-dialog__close",
|
|
5091
5104
|
"aria-label": s.t("common.close"),
|
|
5092
|
-
onClick: t[1] || (t[1] = (
|
|
5105
|
+
onClick: t[1] || (t[1] = (a) => e.$emit("close"))
|
|
5093
5106
|
}, [...t[7] || (t[7] = [
|
|
5094
|
-
|
|
5107
|
+
o("svg", {
|
|
5095
5108
|
width: "12",
|
|
5096
5109
|
height: "12",
|
|
5097
5110
|
viewBox: "0 0 24 24",
|
|
@@ -5102,62 +5115,62 @@ function Da(e, t, n, i, r, s) {
|
|
|
5102
5115
|
"stroke-linejoin": "round",
|
|
5103
5116
|
"aria-hidden": "true"
|
|
5104
5117
|
}, [
|
|
5105
|
-
|
|
5118
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5106
5119
|
], -1)
|
|
5107
|
-
])], 8,
|
|
5120
|
+
])], 8, Na)
|
|
5108
5121
|
]),
|
|
5109
|
-
|
|
5110
|
-
$(
|
|
5122
|
+
o("div", Pa, [
|
|
5123
|
+
$(o("input", {
|
|
5111
5124
|
ref: "input",
|
|
5112
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
5125
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
|
|
5113
5126
|
type: "text",
|
|
5114
5127
|
class: "wm-dialog__input",
|
|
5115
5128
|
placeholder: n.placeholder || s.t("rename.placeholder"),
|
|
5116
5129
|
maxlength: 120,
|
|
5117
5130
|
onKeydown: [
|
|
5118
|
-
t[3] || (t[3] = ue(G((...
|
|
5119
|
-
t[4] || (t[4] = ue(G((
|
|
5131
|
+
t[3] || (t[3] = ue(G((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
5132
|
+
t[4] || (t[4] = ue(G((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5120
5133
|
]
|
|
5121
|
-
}, null, 40,
|
|
5134
|
+
}, null, 40, Ua), [
|
|
5122
5135
|
[X, r.value]
|
|
5123
5136
|
])
|
|
5124
5137
|
]),
|
|
5125
|
-
|
|
5126
|
-
|
|
5138
|
+
o("div", Fa, [
|
|
5139
|
+
o("button", {
|
|
5127
5140
|
type: "button",
|
|
5128
5141
|
class: "wm-dialog__btn",
|
|
5129
|
-
onClick: t[5] || (t[5] = (
|
|
5142
|
+
onClick: t[5] || (t[5] = (a) => e.$emit("close"))
|
|
5130
5143
|
}, v(s.t("common.cancel")), 1),
|
|
5131
|
-
|
|
5144
|
+
o("button", {
|
|
5132
5145
|
type: "button",
|
|
5133
5146
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5134
5147
|
disabled: !s.canSubmit,
|
|
5135
|
-
onClick: t[6] || (t[6] = (...
|
|
5136
|
-
}, v(s.t("common.save")), 9,
|
|
5148
|
+
onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
|
|
5149
|
+
}, v(s.t("common.save")), 9, Da)
|
|
5137
5150
|
])
|
|
5138
5151
|
])
|
|
5139
5152
|
]);
|
|
5140
5153
|
}
|
|
5141
|
-
const
|
|
5154
|
+
const Ha = /* @__PURE__ */ N(Ia, [["render", ja], ["__scopeId", "data-v-6d5f94a8"]]), Be = "ww-messenger-tokens", za = {
|
|
5142
5155
|
name: "Messenger",
|
|
5143
5156
|
components: {
|
|
5144
|
-
Launcher:
|
|
5145
|
-
Header:
|
|
5146
|
-
Onboarding:
|
|
5147
|
-
MessageList:
|
|
5157
|
+
Launcher: Ut,
|
|
5158
|
+
Header: cn,
|
|
5159
|
+
Onboarding: ts,
|
|
5160
|
+
MessageList: Gr,
|
|
5148
5161
|
Composer: hi,
|
|
5149
|
-
SuggestionChips:
|
|
5150
|
-
ApprovalCard:
|
|
5151
|
-
FormCard:
|
|
5152
|
-
Feedback:
|
|
5153
|
-
MoreMenu:
|
|
5154
|
-
RenameDialog:
|
|
5162
|
+
SuggestionChips: pi,
|
|
5163
|
+
ApprovalCard: Ti,
|
|
5164
|
+
FormCard: ea,
|
|
5165
|
+
Feedback: fa,
|
|
5166
|
+
MoreMenu: Oa,
|
|
5167
|
+
RenameDialog: Ha
|
|
5155
5168
|
},
|
|
5156
5169
|
mixins: [
|
|
5157
|
-
|
|
5158
|
-
mt,
|
|
5170
|
+
lt,
|
|
5159
5171
|
ft,
|
|
5160
|
-
|
|
5172
|
+
_t,
|
|
5173
|
+
pt
|
|
5161
5174
|
],
|
|
5162
5175
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
5163
5176
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -5179,7 +5192,7 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5179
5192
|
},
|
|
5180
5193
|
props: {
|
|
5181
5194
|
// Hardcoded server default (overridable for staging/dev).
|
|
5182
|
-
baseUrl: { type: String, default:
|
|
5195
|
+
baseUrl: { type: String, default: et },
|
|
5183
5196
|
widgetId: { type: String, default: "" },
|
|
5184
5197
|
// En mode iframe (modèle par défaut), `origin` et `token` ne sont
|
|
5185
5198
|
// PAS des props : ils sont reçus via `postMessage` du parent
|
|
@@ -5294,7 +5307,7 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5294
5307
|
// 4. French.
|
|
5295
5308
|
locale() {
|
|
5296
5309
|
var e;
|
|
5297
|
-
return
|
|
5310
|
+
return ke(
|
|
5298
5311
|
this.language || this.customerLanguage || ((e = this.widget) == null ? void 0 : e.default_language) || ""
|
|
5299
5312
|
);
|
|
5300
5313
|
},
|
|
@@ -5335,7 +5348,7 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5335
5348
|
return this.allConversations.map((i) => {
|
|
5336
5349
|
var k;
|
|
5337
5350
|
const r = e[i.id] || [], s = W(i.last_read_message_id);
|
|
5338
|
-
let
|
|
5351
|
+
let a = 0, l = null;
|
|
5339
5352
|
for (let w = r.length - 1; w >= 0; w--) {
|
|
5340
5353
|
const T = r[w];
|
|
5341
5354
|
if (!T) continue;
|
|
@@ -5343,21 +5356,21 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5343
5356
|
const B = W(T.id);
|
|
5344
5357
|
if (B != null) {
|
|
5345
5358
|
if (s != null && B <= s) break;
|
|
5346
|
-
t[T.id] !== 0 && (!l && T.author && (l = T.author),
|
|
5359
|
+
t[T.id] !== 0 && (!l && T.author && (l = T.author), a++);
|
|
5347
5360
|
}
|
|
5348
5361
|
}
|
|
5349
5362
|
if (!r.length) {
|
|
5350
5363
|
const w = W(i.last_message_id);
|
|
5351
|
-
w != null && (s == null || w > s) && (
|
|
5364
|
+
w != null && (s == null || w > s) && (a = 1, l = i.last_message_author || null);
|
|
5352
5365
|
}
|
|
5353
5366
|
const p = r.filter(
|
|
5354
5367
|
(w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
|
|
5355
5368
|
);
|
|
5356
5369
|
return {
|
|
5357
5370
|
...i,
|
|
5358
|
-
_preview:
|
|
5359
|
-
_unread:
|
|
5360
|
-
_unreadCount:
|
|
5371
|
+
_preview: rt(i, p),
|
|
5372
|
+
_unread: a > 0,
|
|
5373
|
+
_unreadCount: a,
|
|
5361
5374
|
_lastAuthor: l
|
|
5362
5375
|
};
|
|
5363
5376
|
});
|
|
@@ -5378,7 +5391,8 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5378
5391
|
title: n.name || this.t("common.newConversation"),
|
|
5379
5392
|
preview: n._preview || this.t("onboarding.newMessage"),
|
|
5380
5393
|
unread: !!n._unread,
|
|
5381
|
-
|
|
5394
|
+
author: n._lastAuthor || null,
|
|
5395
|
+
_ts: Oe(n, e[n.id] || [])
|
|
5382
5396
|
})).sort((n, i) => n._ts < i._ts ? 1 : n._ts > i._ts ? -1 : 0);
|
|
5383
5397
|
},
|
|
5384
5398
|
// Unread threads (one entry per conv with unseen agent/human
|
|
@@ -5390,7 +5404,7 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5390
5404
|
const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
|
|
5391
5405
|
for (const i of this.drawerConversations) {
|
|
5392
5406
|
if (!i._unread) continue;
|
|
5393
|
-
const r =
|
|
5407
|
+
const r = Oe(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);
|
|
5394
5408
|
t.push({
|
|
5395
5409
|
convId: i.id,
|
|
5396
5410
|
preview: i._preview || this.t("notification.youHaveNewMessage"),
|
|
@@ -5452,6 +5466,14 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5452
5466
|
var e, t;
|
|
5453
5467
|
return ((t = (e = this.s) == null ? void 0 : e.config) == null ? void 0 : t.widget) || null;
|
|
5454
5468
|
},
|
|
5469
|
+
// Lets the merchant override the brand colour from the widget
|
|
5470
|
+
// config. Falls through to the default `--wm-a` from tokens.css
|
|
5471
|
+
// when unset, so existing widgets render unchanged.
|
|
5472
|
+
rootStyle() {
|
|
5473
|
+
var t;
|
|
5474
|
+
const e = (t = this.widget) == null ? void 0 : t.primary_color;
|
|
5475
|
+
return e ? { "--wm-a": e } : null;
|
|
5476
|
+
},
|
|
5455
5477
|
widgetWelcomeMessage() {
|
|
5456
5478
|
var e;
|
|
5457
5479
|
return ((e = this.widget) == null ? void 0 : e.welcome_message) || "";
|
|
@@ -5535,8 +5557,8 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5535
5557
|
}
|
|
5536
5558
|
const t = this.revealedAt;
|
|
5537
5559
|
return (this.s.messagesByConv[e.id] || []).filter((r) => {
|
|
5538
|
-
var s,
|
|
5539
|
-
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" || ((
|
|
5560
|
+
var s, a, l, p, k;
|
|
5561
|
+
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;
|
|
5540
5562
|
});
|
|
5541
5563
|
},
|
|
5542
5564
|
// True whenever we should show the "typing" indicator at the bottom
|
|
@@ -5572,11 +5594,11 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5572
5594
|
return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || this.t("action.title");
|
|
5573
5595
|
},
|
|
5574
5596
|
approvalDetail() {
|
|
5575
|
-
var i, r, s,
|
|
5597
|
+
var i, r, s, a, l, p;
|
|
5576
5598
|
const e = (s = (r = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : r.pending) == null ? void 0 : s.user_explanation;
|
|
5577
5599
|
if (typeof e == "string" && e.trim())
|
|
5578
5600
|
return e.trim();
|
|
5579
|
-
const t = (p = (l = (
|
|
5601
|
+
const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
|
|
5580
5602
|
if (!t || typeof t != "object") return "";
|
|
5581
5603
|
const n = Object.entries(t);
|
|
5582
5604
|
return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
|
|
@@ -5615,14 +5637,14 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5615
5637
|
const e = this.currentConv;
|
|
5616
5638
|
let t = /* @__PURE__ */ new Date();
|
|
5617
5639
|
if (e) {
|
|
5618
|
-
const
|
|
5619
|
-
if (
|
|
5620
|
-
const l = new Date(
|
|
5640
|
+
const a = ((r = (((i = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : r.created_at) || e.created_at;
|
|
5641
|
+
if (a) {
|
|
5642
|
+
const l = new Date(a);
|
|
5621
5643
|
Number.isNaN(l.getTime()) || (t = l);
|
|
5622
5644
|
}
|
|
5623
5645
|
}
|
|
5624
5646
|
return this.t("messageList.today", {
|
|
5625
|
-
time:
|
|
5647
|
+
time: ve(t, re(this.locale))
|
|
5626
5648
|
});
|
|
5627
5649
|
},
|
|
5628
5650
|
// Pagination state for the active conversation. Drives the
|
|
@@ -5646,12 +5668,12 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5646
5668
|
// ts comparison in `launcherPeeks`.
|
|
5647
5669
|
latestUnreads: {
|
|
5648
5670
|
handler(e) {
|
|
5649
|
-
const t = new Set(e.map((
|
|
5671
|
+
const t = new Set(e.map((a) => a.convId)), n = this.dismissedPeeks || {}, i = Object.keys(n);
|
|
5650
5672
|
if (!i.length) return;
|
|
5651
5673
|
const r = {};
|
|
5652
5674
|
let s = !1;
|
|
5653
|
-
for (const
|
|
5654
|
-
t.has(
|
|
5675
|
+
for (const a of i)
|
|
5676
|
+
t.has(a) ? r[a] = n[a] : s = !0;
|
|
5655
5677
|
s && (this.dismissedPeeks = r);
|
|
5656
5678
|
},
|
|
5657
5679
|
deep: !0
|
|
@@ -5727,9 +5749,9 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5727
5749
|
}
|
|
5728
5750
|
},
|
|
5729
5751
|
async mounted() {
|
|
5730
|
-
if (typeof document < "u" && !document.getElementById(
|
|
5752
|
+
if (typeof document < "u" && !document.getElementById(Be)) {
|
|
5731
5753
|
const e = document.createElement("style");
|
|
5732
|
-
e.id =
|
|
5754
|
+
e.id = Be, e.textContent = Ze, document.head.appendChild(e);
|
|
5733
5755
|
}
|
|
5734
5756
|
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());
|
|
5735
5757
|
},
|
|
@@ -5784,12 +5806,12 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5784
5806
|
return;
|
|
5785
5807
|
}
|
|
5786
5808
|
try {
|
|
5787
|
-
await this.waitForParentInit(), this.transport =
|
|
5788
|
-
|
|
5809
|
+
await this.waitForParentInit(), this.transport = Me(
|
|
5810
|
+
Ge({
|
|
5789
5811
|
baseUrl: this.baseUrl,
|
|
5790
5812
|
widgetId: this.widgetId
|
|
5791
5813
|
})
|
|
5792
|
-
), this.store =
|
|
5814
|
+
), this.store = Me(Xe(this.transport)), this.hydrateNotifPref();
|
|
5793
5815
|
const n = ((e = this.parentContext) == null ? void 0 : e.customer) || ((t = this.context) == null ? void 0 : t.customer);
|
|
5794
5816
|
await this.store.start({
|
|
5795
5817
|
origin: this.parentOrigin,
|
|
@@ -5823,8 +5845,8 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5823
5845
|
if (!i) return;
|
|
5824
5846
|
const r = Math.ceil(i.contentRect.height + 8);
|
|
5825
5847
|
r !== this.floatHeight && (this.floatHeight = r, this.$nextTick(() => {
|
|
5826
|
-
var s,
|
|
5827
|
-
(
|
|
5848
|
+
var s, a;
|
|
5849
|
+
(a = (s = this.$refs.messageList) == null ? void 0 : s.scrollToBottom) == null || a.call(s);
|
|
5828
5850
|
}));
|
|
5829
5851
|
}), this.floatRO.observe(t);
|
|
5830
5852
|
}
|
|
@@ -5878,28 +5900,28 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5878
5900
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
5879
5901
|
},
|
|
5880
5902
|
sendCurrentLauncherSize() {
|
|
5881
|
-
var w, T, B, A, H, S,
|
|
5903
|
+
var w, T, B, A, H, S, U;
|
|
5882
5904
|
if (this.isOpen) return;
|
|
5883
5905
|
const e = (T = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : T.call(w, ".wm-launcherWrap");
|
|
5884
5906
|
if (!e) return;
|
|
5885
5907
|
const t = e.getBoundingClientRect();
|
|
5886
5908
|
if (!t.width || !t.height) return;
|
|
5887
|
-
const n = (((B = this.launcherPeeks) == null ? void 0 : B.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height),
|
|
5909
|
+
const n = (((B = this.launcherPeeks) == null ? void 0 : B.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (H = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : H.call(A, ".wm-launcher"), l = (U = (S = this.$el) == null ? void 0 : S.querySelectorAll) == null ? void 0 : U.call(S, ".wm-peek"), p = l && l.length ? l[l.length - 1] : null;
|
|
5888
5910
|
let k = null;
|
|
5889
5911
|
if (p) {
|
|
5890
|
-
const
|
|
5912
|
+
const I = p.getBoundingClientRect();
|
|
5891
5913
|
k = {
|
|
5892
|
-
width: Math.ceil(
|
|
5893
|
-
height: Math.ceil(
|
|
5894
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
5895
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
5914
|
+
width: Math.ceil(I.width),
|
|
5915
|
+
height: Math.ceil(I.height),
|
|
5916
|
+
rightOffset: Math.max(0, Math.ceil(t.right - I.right)),
|
|
5917
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - I.bottom))
|
|
5896
5918
|
};
|
|
5897
5919
|
}
|
|
5898
5920
|
this.notifyParentResize("closed", {
|
|
5899
5921
|
width: r + i,
|
|
5900
5922
|
height: s + i,
|
|
5901
|
-
launcherWidth: (
|
|
5902
|
-
launcherHeight: (
|
|
5923
|
+
launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
|
|
5924
|
+
launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
|
|
5903
5925
|
launcherHovered: this.launcherHovered,
|
|
5904
5926
|
peek: k,
|
|
5905
5927
|
peekHovered: this.launcherHovered && n
|
|
@@ -5995,7 +6017,7 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
5995
6017
|
this.openRenameDialog();
|
|
5996
6018
|
break;
|
|
5997
6019
|
case "export":
|
|
5998
|
-
|
|
6020
|
+
ot(
|
|
5999
6021
|
this.currentConv,
|
|
6000
6022
|
this.currentConv ? (n = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : n[this.currentConv.id] : [],
|
|
6001
6023
|
this.translator,
|
|
@@ -6059,12 +6081,12 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
6059
6081
|
async onFormSubmit({ values: e }) {
|
|
6060
6082
|
const t = this.pendingForm;
|
|
6061
6083
|
if (!(t != null && t.form)) return;
|
|
6062
|
-
const n =
|
|
6084
|
+
const n = nt(t.form, e, this.translator);
|
|
6063
6085
|
if (!n) return;
|
|
6064
6086
|
let i = this.currentConv;
|
|
6065
6087
|
i && (i._draft && (i = await this.ensureRealConv(), !i) || await this.store.send(i.id, n, {
|
|
6066
6088
|
metadata: {
|
|
6067
|
-
artifact:
|
|
6089
|
+
artifact: st(
|
|
6068
6090
|
t.form,
|
|
6069
6091
|
e,
|
|
6070
6092
|
this.translator
|
|
@@ -6140,33 +6162,34 @@ const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8
|
|
|
6140
6162
|
}
|
|
6141
6163
|
}
|
|
6142
6164
|
}
|
|
6143
|
-
},
|
|
6165
|
+
}, qa = {
|
|
6144
6166
|
key: 0,
|
|
6145
6167
|
class: "wm-loading",
|
|
6146
6168
|
"aria-busy": "true",
|
|
6147
6169
|
"aria-live": "polite"
|
|
6148
|
-
},
|
|
6170
|
+
}, Ka = ["aria-label"], Va = {
|
|
6149
6171
|
key: 0,
|
|
6150
6172
|
class: "wm-state"
|
|
6151
|
-
},
|
|
6173
|
+
}, $a = { class: "wm-state__err" }, Wa = { class: "wm-state__errTitle" }, Ga = { class: "wm-state__errSub" }, Ya = { class: "wm-bottom" }, Ja = {
|
|
6152
6174
|
key: 0,
|
|
6153
6175
|
ref: "floatEl",
|
|
6154
6176
|
class: "wm-float"
|
|
6155
|
-
},
|
|
6177
|
+
}, Qa = {
|
|
6156
6178
|
key: 1,
|
|
6157
6179
|
class: "wm-actionWait",
|
|
6158
6180
|
role: "status",
|
|
6159
6181
|
"aria-live": "polite"
|
|
6160
|
-
},
|
|
6182
|
+
}, Xa = { class: "wm-actionWait__lbl" }, Za = {
|
|
6161
6183
|
key: 2,
|
|
6162
6184
|
class: "wm-attached"
|
|
6163
|
-
},
|
|
6164
|
-
function
|
|
6165
|
-
const
|
|
6185
|
+
}, eo = ["aria-label", "onClick"];
|
|
6186
|
+
function to(e, t, n, i, r, s) {
|
|
6187
|
+
const a = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), w = R("ApprovalCard"), T = R("FormCard"), B = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), U = R("RenameDialog");
|
|
6166
6188
|
return c(), u("div", {
|
|
6167
|
-
class: O(["wm-root", `wm-root--${n.displayMode}`])
|
|
6189
|
+
class: O(["wm-root", `wm-root--${n.displayMode}`]),
|
|
6190
|
+
style: z(s.rootStyle)
|
|
6168
6191
|
}, [
|
|
6169
|
-
!r.isOpen && !s.isEmbedded ? (c(), P(
|
|
6192
|
+
!r.isOpen && !s.isEmbedded ? (c(), P(a, {
|
|
6170
6193
|
key: 0,
|
|
6171
6194
|
"unread-count": s.unreadCount,
|
|
6172
6195
|
peeks: s.launcherPeeks,
|
|
@@ -6181,20 +6204,20 @@ function eo(e, t, n, i, r, s) {
|
|
|
6181
6204
|
`wm-panel--${n.displayMode}`,
|
|
6182
6205
|
{ "wm-panel--welcome": s.ready && !s.error && !s.currentConv }
|
|
6183
6206
|
]),
|
|
6184
|
-
style:
|
|
6207
|
+
style: z(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
6185
6208
|
role: "dialog",
|
|
6186
6209
|
"aria-label": "Messenger",
|
|
6187
|
-
onClick: t[5] || (t[5] = (...
|
|
6210
|
+
onClick: t[5] || (t[5] = (...I) => s.onPanelClick && s.onPanelClick(...I))
|
|
6188
6211
|
}, [
|
|
6189
|
-
!s.ready && !s.error ? (c(), u("div",
|
|
6212
|
+
!s.ready && !s.error ? (c(), u("div", qa, [
|
|
6190
6213
|
s.isEmbedded ? y("", !0) : (c(), u("button", {
|
|
6191
6214
|
key: 0,
|
|
6192
6215
|
type: "button",
|
|
6193
6216
|
class: "wm-loading__close",
|
|
6194
6217
|
"aria-label": s.t("loading.minimize"),
|
|
6195
|
-
onClick: t[0] || (t[0] = (...
|
|
6218
|
+
onClick: t[0] || (t[0] = (...I) => s.close && s.close(...I))
|
|
6196
6219
|
}, [...t[6] || (t[6] = [
|
|
6197
|
-
|
|
6220
|
+
o("svg", {
|
|
6198
6221
|
width: "13",
|
|
6199
6222
|
height: "13",
|
|
6200
6223
|
viewBox: "0 0 24 24",
|
|
@@ -6205,10 +6228,10 @@ function eo(e, t, n, i, r, s) {
|
|
|
6205
6228
|
"stroke-linejoin": "round",
|
|
6206
6229
|
"aria-hidden": "true"
|
|
6207
6230
|
}, [
|
|
6208
|
-
|
|
6231
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6209
6232
|
], -1)
|
|
6210
|
-
])], 8,
|
|
6211
|
-
t[7] || (t[7] =
|
|
6233
|
+
])], 8, Ka)),
|
|
6234
|
+
t[7] || (t[7] = o("div", {
|
|
6212
6235
|
class: "wm-loading__spinner",
|
|
6213
6236
|
"aria-hidden": "true"
|
|
6214
6237
|
}, null, -1))
|
|
@@ -6227,10 +6250,10 @@ function eo(e, t, n, i, r, s) {
|
|
|
6227
6250
|
onMore: s.toggleMore,
|
|
6228
6251
|
onClose: s.close
|
|
6229
6252
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6230
|
-
s.error ? (c(), u("div",
|
|
6231
|
-
|
|
6232
|
-
t[8] || (t[8] =
|
|
6233
|
-
|
|
6253
|
+
s.error ? (c(), u("div", Va, [
|
|
6254
|
+
o("div", $a, [
|
|
6255
|
+
t[8] || (t[8] = o("div", { class: "wm-state__errIcon" }, [
|
|
6256
|
+
o("svg", {
|
|
6234
6257
|
width: "14",
|
|
6235
6258
|
height: "14",
|
|
6236
6259
|
viewBox: "0 0 24 24",
|
|
@@ -6241,12 +6264,12 @@ function eo(e, t, n, i, r, s) {
|
|
|
6241
6264
|
"stroke-linejoin": "round",
|
|
6242
6265
|
"aria-hidden": "true"
|
|
6243
6266
|
}, [
|
|
6244
|
-
|
|
6267
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6245
6268
|
])
|
|
6246
6269
|
], -1)),
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6270
|
+
o("div", null, [
|
|
6271
|
+
o("div", Wa, v(s.t("error.connectionFailed")), 1),
|
|
6272
|
+
o("div", Ga, v(s.error), 1)
|
|
6250
6273
|
])
|
|
6251
6274
|
])
|
|
6252
6275
|
])) : s.currentConv ? (c(), u(E, { key: 2 }, [
|
|
@@ -6264,8 +6287,8 @@ function eo(e, t, n, i, r, s) {
|
|
|
6264
6287
|
"ai-agent-avatar-url": s.agentAvatarUrl,
|
|
6265
6288
|
onLoadMore: s.onLoadMore
|
|
6266
6289
|
}, 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"]),
|
|
6267
|
-
|
|
6268
|
-
s.floatVisible ? (c(), u("div",
|
|
6290
|
+
o("div", Ya, [
|
|
6291
|
+
s.floatVisible ? (c(), u("div", Ja, [
|
|
6269
6292
|
s.approvalReady ? (c(), P(w, {
|
|
6270
6293
|
key: 0,
|
|
6271
6294
|
action: s.approvalTitle,
|
|
@@ -6291,19 +6314,19 @@ function eo(e, t, n, i, r, s) {
|
|
|
6291
6314
|
onSelect: s.onSuggestion
|
|
6292
6315
|
}, null, 8, ["items", "onSelect"]))
|
|
6293
6316
|
], 512)) : y("", !0),
|
|
6294
|
-
s.actionInFlight ? (c(), u("div",
|
|
6295
|
-
t[9] || (t[9] =
|
|
6317
|
+
s.actionInFlight ? (c(), u("div", Qa, [
|
|
6318
|
+
t[9] || (t[9] = o("span", {
|
|
6296
6319
|
class: "wm-actionWait__spinner",
|
|
6297
6320
|
"aria-hidden": "true"
|
|
6298
6321
|
}, null, -1)),
|
|
6299
|
-
|
|
6322
|
+
o("span", Xa, v(s.t("action.inProgress", {
|
|
6300
6323
|
name: s.actionInFlightName
|
|
6301
6324
|
})), 1)
|
|
6302
6325
|
])) : (c(), P(H, {
|
|
6303
6326
|
key: 2,
|
|
6304
6327
|
ref: "composer",
|
|
6305
6328
|
modelValue: r.draft,
|
|
6306
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
6329
|
+
"onUpdate:modelValue": t[1] || (t[1] = (I) => r.draft = I),
|
|
6307
6330
|
placeholder: s.composerPlaceholder,
|
|
6308
6331
|
disabled: !!s.pendingApproval,
|
|
6309
6332
|
"attach-label": s.t("composer.attachFile"),
|
|
@@ -6320,24 +6343,24 @@ function eo(e, t, n, i, r, s) {
|
|
|
6320
6343
|
"browser-notif-enabled": e.browserNotifEnabled,
|
|
6321
6344
|
"status-url": s.statusUrl,
|
|
6322
6345
|
"help-url": s.helpUrl,
|
|
6323
|
-
onClose: t[2] || (t[2] = (
|
|
6346
|
+
onClose: t[2] || (t[2] = (I) => r.moreOpen = !1),
|
|
6324
6347
|
onSoundToggle: e.onSoundToggle,
|
|
6325
6348
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6326
6349
|
onAction: s.onMoreAction
|
|
6327
6350
|
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0),
|
|
6328
|
-
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), P(
|
|
6351
|
+
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), P(U, {
|
|
6329
6352
|
key: 1,
|
|
6330
6353
|
"initial-value": s.currentConv.name || "",
|
|
6331
6354
|
title: s.t("rename.dialogTitle"),
|
|
6332
|
-
onClose: t[3] || (t[3] = (
|
|
6355
|
+
onClose: t[3] || (t[3] = (I) => r.renameDialogOpen = !1),
|
|
6333
6356
|
onSubmit: s.onRenameSubmit
|
|
6334
6357
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
|
|
6335
|
-
r.pendingAttachments.length ? (c(), u("div",
|
|
6336
|
-
(c(!0), u(E, null,
|
|
6337
|
-
key:
|
|
6358
|
+
r.pendingAttachments.length ? (c(), u("div", Za, [
|
|
6359
|
+
(c(!0), u(E, null, F(r.pendingAttachments, (I, q) => (c(), u("div", {
|
|
6360
|
+
key: q,
|
|
6338
6361
|
class: "wm-attached__chip"
|
|
6339
6362
|
}, [
|
|
6340
|
-
t[11] || (t[11] =
|
|
6363
|
+
t[11] || (t[11] = o("svg", {
|
|
6341
6364
|
width: "11",
|
|
6342
6365
|
height: "11",
|
|
6343
6366
|
viewBox: "0 0 24 24",
|
|
@@ -6348,15 +6371,15 @@ function eo(e, t, n, i, r, s) {
|
|
|
6348
6371
|
"stroke-linejoin": "round",
|
|
6349
6372
|
"aria-hidden": "true"
|
|
6350
6373
|
}, [
|
|
6351
|
-
|
|
6374
|
+
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" })
|
|
6352
6375
|
], -1)),
|
|
6353
|
-
|
|
6354
|
-
|
|
6376
|
+
o("span", null, v(I.name), 1),
|
|
6377
|
+
o("button", {
|
|
6355
6378
|
type: "button",
|
|
6356
6379
|
"aria-label": s.t("attachment.remove"),
|
|
6357
|
-
onClick: (Y) => r.pendingAttachments.splice(
|
|
6380
|
+
onClick: (Y) => r.pendingAttachments.splice(q, 1)
|
|
6358
6381
|
}, [...t[10] || (t[10] = [
|
|
6359
|
-
|
|
6382
|
+
o("svg", {
|
|
6360
6383
|
width: "10",
|
|
6361
6384
|
height: "10",
|
|
6362
6385
|
viewBox: "0 0 24 24",
|
|
@@ -6367,9 +6390,9 @@ function eo(e, t, n, i, r, s) {
|
|
|
6367
6390
|
"stroke-linejoin": "round",
|
|
6368
6391
|
"aria-hidden": "true"
|
|
6369
6392
|
}, [
|
|
6370
|
-
|
|
6393
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6371
6394
|
], -1)
|
|
6372
|
-
])], 8,
|
|
6395
|
+
])], 8, eo)
|
|
6373
6396
|
]))), 128))
|
|
6374
6397
|
])) : y("", !0)
|
|
6375
6398
|
], 64)) : (c(), P(p, {
|
|
@@ -6393,63 +6416,63 @@ function eo(e, t, n, i, r, s) {
|
|
|
6393
6416
|
"browser-notif-enabled": e.browserNotifEnabled,
|
|
6394
6417
|
"status-url": s.statusUrl,
|
|
6395
6418
|
"help-url": s.helpUrl,
|
|
6396
|
-
onClose: t[4] || (t[4] = (
|
|
6419
|
+
onClose: t[4] || (t[4] = (I) => r.moreOpen = !1),
|
|
6397
6420
|
onSoundToggle: e.onSoundToggle,
|
|
6398
6421
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6399
6422
|
onAction: s.onMoreAction
|
|
6400
6423
|
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : y("", !0)
|
|
6401
6424
|
], 64))
|
|
6402
6425
|
], 6)) : y("", !0)
|
|
6403
|
-
],
|
|
6426
|
+
], 6);
|
|
6404
6427
|
}
|
|
6405
|
-
const
|
|
6428
|
+
const ro = /* @__PURE__ */ N(za, [["render", to], ["__scopeId", "data-v-f715675c"]]), io = "0.5.38";
|
|
6406
6429
|
export {
|
|
6407
6430
|
le as AIAvatar,
|
|
6408
6431
|
_e as AVATAR_COLORS,
|
|
6409
6432
|
hs as ActionResult,
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6433
|
+
Ti as ApprovalCard,
|
|
6434
|
+
ks as ArtifactFormResponse,
|
|
6435
|
+
Ns as ArtifactInfoCard,
|
|
6436
|
+
er as ArtifactRenderer,
|
|
6437
|
+
Js as ArtifactTicket,
|
|
6438
|
+
mr as AttachmentPreview,
|
|
6439
|
+
gr as Bubble,
|
|
6417
6440
|
hi as Composer,
|
|
6418
|
-
|
|
6441
|
+
et as DEFAULT_BASE_URL,
|
|
6419
6442
|
ae as DEFAULT_LANGUAGE,
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6443
|
+
fa as Feedback,
|
|
6444
|
+
ea as FormCard,
|
|
6445
|
+
cn as Header,
|
|
6446
|
+
Ce as HumanAvatar,
|
|
6447
|
+
Ut as Launcher,
|
|
6448
|
+
Ae as MEDIA_RECORDER_SUPPORTED,
|
|
6449
|
+
Gr as MessageList,
|
|
6450
|
+
ro as Messenger,
|
|
6451
|
+
Oa as MoreMenu,
|
|
6452
|
+
ts as Onboarding,
|
|
6453
|
+
me as SCREEN_CAPTURE_SUPPORTED,
|
|
6454
|
+
tt as SUPPORTED_LANGUAGES,
|
|
6455
|
+
pi as SuggestionChips,
|
|
6456
|
+
Yt as TeamAvatars,
|
|
6457
|
+
wr as Typing,
|
|
6458
|
+
io as VERSION,
|
|
6459
|
+
we as avatarColor,
|
|
6460
|
+
be as avatarInitials,
|
|
6461
|
+
Jr as captureScreenshotFile,
|
|
6439
6462
|
j as colors,
|
|
6440
|
-
|
|
6463
|
+
Xe as createStore,
|
|
6441
6464
|
D as createTranslator,
|
|
6442
|
-
|
|
6465
|
+
Ge as createTransport,
|
|
6443
6466
|
re as dateLocale,
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6467
|
+
ro as default,
|
|
6468
|
+
ve as formatTime,
|
|
6469
|
+
so as guessAttachmentKind,
|
|
6470
|
+
Yr as pickRecorderMime,
|
|
6471
|
+
un as renderInlineMarkdown,
|
|
6472
|
+
mn as renderMarkdown,
|
|
6473
|
+
ke as resolveLanguage,
|
|
6474
|
+
Xr as startScreenRecording,
|
|
6475
|
+
Ze as tokensCss,
|
|
6476
|
+
Qe as uuid,
|
|
6477
|
+
Qe as v4
|
|
6455
6478
|
};
|