@_solaris/messenger-widget 0.5.76 → 0.5.77
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 +25 -25
- package/dist/messenger.cjs +10 -10
- package/dist/messenger.js +1251 -1202
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/core/i18n.d.ts +6 -0
- package/dist/types/core/types.d.ts +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as
|
|
1
|
+
import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass as R, toDisplayString as v, resolveComponent as B, createVNode as K, Transition as De, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as l, createCommentVNode as k, createBlock as P, resolveDynamicComponent as Ae, mergeProps as Fe, withDirectives as G, vModelText as te, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
|
|
2
2
|
const Ye = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -38,7 +38,7 @@ function Ze(e) {
|
|
|
38
38
|
function s(u, g) {
|
|
39
39
|
return t.listeners.has(u) || t.listeners.set(u, /* @__PURE__ */ new Set()), t.listeners.get(u).add(g), () => t.listeners.get(u).delete(g);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function r(u, g) {
|
|
42
42
|
const p = t.listeners.get(u);
|
|
43
43
|
p && p.forEach((S) => {
|
|
44
44
|
try {
|
|
@@ -48,8 +48,8 @@ function Ze(e) {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
t.connection !== u && (t.connection = u,
|
|
51
|
+
function i(u) {
|
|
52
|
+
t.connection !== u && (t.connection = u, r("connection", u));
|
|
53
53
|
}
|
|
54
54
|
function n() {
|
|
55
55
|
return {
|
|
@@ -64,7 +64,7 @@ function Ze(e) {
|
|
|
64
64
|
...t.origin ? { "X-Parent-Origin": t.origin } : {}
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
async function
|
|
67
|
+
async function a(u, g, p) {
|
|
68
68
|
const S = await fetch(`${t.baseUrl}${we}${g}`, {
|
|
69
69
|
method: u,
|
|
70
70
|
credentials: "include",
|
|
@@ -72,14 +72,14 @@ function Ze(e) {
|
|
|
72
72
|
body: p !== void 0 ? JSON.stringify(p) : void 0
|
|
73
73
|
});
|
|
74
74
|
if (!S.ok) {
|
|
75
|
-
const O = await
|
|
75
|
+
const O = await o(S), x = new Error(
|
|
76
76
|
`HTTP ${S.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || S.statusText}`
|
|
77
77
|
);
|
|
78
78
|
throw x.status = S.status, x.body = O, x;
|
|
79
79
|
}
|
|
80
80
|
return S.status === 204 ? null : S.json();
|
|
81
81
|
}
|
|
82
|
-
async function
|
|
82
|
+
async function o(u) {
|
|
83
83
|
try {
|
|
84
84
|
return await u.json();
|
|
85
85
|
} catch {
|
|
@@ -112,7 +112,7 @@ function Ze(e) {
|
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
if (!g.ok) {
|
|
115
|
-
const V = await
|
|
115
|
+
const V = await o(g), Z = new Error(
|
|
116
116
|
`Session bootstrap failed: HTTP ${g.status} :: ${(V == null ? void 0 : V.error) || g.statusText}`
|
|
117
117
|
);
|
|
118
118
|
throw Z.status = g.status, Z.body = V, Z;
|
|
@@ -125,21 +125,21 @@ function Ze(e) {
|
|
|
125
125
|
{ credentials: "include" }
|
|
126
126
|
).then(async (V) => {
|
|
127
127
|
if (!V.ok) {
|
|
128
|
-
const Z = await
|
|
128
|
+
const Z = await o(V);
|
|
129
129
|
throw new Error(
|
|
130
130
|
`HTTP ${V.status} GET /widgets/:id/config :: ${(Z == null ? void 0 : Z.error) || V.statusText}`
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
133
|
return V.json();
|
|
134
134
|
}),
|
|
135
|
-
|
|
135
|
+
a("GET", "/customers/me")
|
|
136
136
|
]), x = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
|
|
137
|
-
return t.lastBootstrap = x, await
|
|
137
|
+
return t.lastBootstrap = x, await b(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
138
138
|
"visibilitychange",
|
|
139
139
|
t.visibilityHandler
|
|
140
140
|
)), fe(), x;
|
|
141
141
|
}
|
|
142
|
-
async function
|
|
142
|
+
async function b() {
|
|
143
143
|
try {
|
|
144
144
|
const u = await E();
|
|
145
145
|
t.lastActivityAt = u.reduce((g, p) => {
|
|
@@ -151,45 +151,45 @@ function Ze(e) {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
async function y() {
|
|
154
|
-
const u = await
|
|
154
|
+
const u = await a("GET", "/customers/me");
|
|
155
155
|
return (u == null ? void 0 : u.customer) ?? null;
|
|
156
156
|
}
|
|
157
|
-
async function
|
|
158
|
-
const g = await
|
|
157
|
+
async function M(u) {
|
|
158
|
+
const g = await a("PATCH", "/customers/me", u);
|
|
159
159
|
return (g == null ? void 0 : g.customer) ?? null;
|
|
160
160
|
}
|
|
161
161
|
async function E() {
|
|
162
|
-
const u = await
|
|
162
|
+
const u = await a("GET", "/conversations");
|
|
163
163
|
return (u == null ? void 0 : u.conversations) ?? [];
|
|
164
164
|
}
|
|
165
165
|
async function A(u = {}) {
|
|
166
|
-
return (await
|
|
166
|
+
return (await a("POST", "/conversations", u)).conversation;
|
|
167
167
|
}
|
|
168
168
|
async function q(u) {
|
|
169
|
-
return (await
|
|
169
|
+
return (await a(
|
|
170
170
|
"GET",
|
|
171
171
|
`/conversations/${encodeURIComponent(u)}`
|
|
172
172
|
)).conversation;
|
|
173
173
|
}
|
|
174
|
-
async function
|
|
175
|
-
return (await
|
|
174
|
+
async function T(u, g) {
|
|
175
|
+
return (await a(
|
|
176
176
|
"PATCH",
|
|
177
177
|
`/conversations/${encodeURIComponent(u)}`,
|
|
178
178
|
g
|
|
179
179
|
)).conversation;
|
|
180
180
|
}
|
|
181
181
|
async function U(u, g) {
|
|
182
|
-
return
|
|
182
|
+
return a(
|
|
183
183
|
"PATCH",
|
|
184
184
|
`/conversations/${encodeURIComponent(u)}/read`,
|
|
185
185
|
{ message_id: g }
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function D(u, g = {}) {
|
|
189
189
|
const p = new URLSearchParams();
|
|
190
190
|
g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
|
|
191
191
|
const S = p.toString() ? `?${p.toString()}` : "";
|
|
192
|
-
return
|
|
192
|
+
return a(
|
|
193
193
|
"GET",
|
|
194
194
|
`/conversations/${encodeURIComponent(u)}/messages${S}`
|
|
195
195
|
);
|
|
@@ -203,21 +203,21 @@ function Ze(e) {
|
|
|
203
203
|
author: { id: t.userId, type: "user" },
|
|
204
204
|
created_at: g.created_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
205
205
|
};
|
|
206
|
-
return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext),
|
|
206
|
+
return Array.isArray(g.attachments) && g.attachments.length && (p.payload = { type: "content", attachments: g.attachments }), g.metadata && typeof g.metadata == "object" && (p.metadata = g.metadata), t.currentContext && Object.keys(t.currentContext).length > 0 && (p.context = t.currentContext), a(
|
|
207
207
|
"POST",
|
|
208
208
|
`/conversations/${encodeURIComponent(u)}/messages`,
|
|
209
209
|
p
|
|
210
210
|
);
|
|
211
211
|
}
|
|
212
|
-
async function
|
|
213
|
-
return ae(),
|
|
212
|
+
async function W(u, g, p) {
|
|
213
|
+
return ae(), a(
|
|
214
214
|
"POST",
|
|
215
215
|
`/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
|
|
216
216
|
p ? { inputs: p } : {}
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
219
|
async function Q(u) {
|
|
220
|
-
const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await
|
|
220
|
+
const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await a("POST", "/attachments", {
|
|
221
221
|
mime_type: p,
|
|
222
222
|
size_bytes: S,
|
|
223
223
|
name: g
|
|
@@ -236,7 +236,7 @@ function Ze(e) {
|
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
async function se(u) {
|
|
239
|
-
return
|
|
239
|
+
return a(
|
|
240
240
|
"GET",
|
|
241
241
|
`/attachments/sign?path=${encodeURIComponent(u)}`
|
|
242
242
|
);
|
|
@@ -245,7 +245,7 @@ function Ze(e) {
|
|
|
245
245
|
const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
|
|
246
246
|
return `${t.baseUrl}${we}/stream?${u}`;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function $() {
|
|
249
249
|
if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
|
|
250
250
|
try {
|
|
251
251
|
const u = new EventSource(re(), { withCredentials: !0 });
|
|
@@ -253,30 +253,30 @@ function Ze(e) {
|
|
|
253
253
|
u.addEventListener(g, (p) => ie(g, p.data));
|
|
254
254
|
u.addEventListener(
|
|
255
255
|
"error",
|
|
256
|
-
() =>
|
|
257
|
-
), t.eventSource = u,
|
|
256
|
+
() => r("error", new Error("SSE error"))
|
|
257
|
+
), t.eventSource = u, i("open");
|
|
258
258
|
} catch (u) {
|
|
259
|
-
console.error("[transport] SSE open failed", u),
|
|
259
|
+
console.error("[transport] SSE open failed", u), r("error", u);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
function ie(u, g) {
|
|
263
263
|
try {
|
|
264
264
|
const p = JSON.parse(g), S = p && typeof p == "object" && "data" in p ? p.data : p;
|
|
265
|
-
|
|
265
|
+
r(u, S);
|
|
266
266
|
} catch (p) {
|
|
267
267
|
console.error("[transport] bad SSE payload", u, p);
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
function X() {
|
|
271
|
-
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" &&
|
|
271
|
+
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && i("idle");
|
|
272
272
|
}
|
|
273
273
|
function ae() {
|
|
274
|
-
clearTimeout(t.burstTimer),
|
|
274
|
+
clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
275
275
|
t.panelOpen || X();
|
|
276
276
|
}, Xe));
|
|
277
277
|
}
|
|
278
278
|
function me(u) {
|
|
279
|
-
t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer),
|
|
279
|
+
t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), $()) : ae();
|
|
280
280
|
}
|
|
281
281
|
async function ye() {
|
|
282
282
|
try {
|
|
@@ -284,7 +284,7 @@ function Ze(e) {
|
|
|
284
284
|
const x = O == null ? void 0 : O.last_message_at;
|
|
285
285
|
return x && (!S || x > S) ? x : S;
|
|
286
286
|
}, null);
|
|
287
|
-
g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g,
|
|
287
|
+
g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ae());
|
|
288
288
|
} catch (u) {
|
|
289
289
|
console.error("[transport] poll failed", u);
|
|
290
290
|
}
|
|
@@ -298,14 +298,14 @@ function Ze(e) {
|
|
|
298
298
|
function m() {
|
|
299
299
|
if (document.hidden)
|
|
300
300
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
301
|
-
t.hiddenGraceTimer = null, document.hidden && (h(), X(),
|
|
301
|
+
t.hiddenGraceTimer = null, document.hidden && (h(), X(), i("paused"));
|
|
302
302
|
}, Qe);
|
|
303
303
|
else {
|
|
304
304
|
if (t.hiddenGraceTimer) {
|
|
305
305
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
306
306
|
return;
|
|
307
307
|
}
|
|
308
|
-
|
|
308
|
+
i("idle"), fe(), t.panelOpen && $();
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
function _() {
|
|
@@ -315,7 +315,7 @@ function Ze(e) {
|
|
|
315
315
|
), t.visibilityHandler = null), t.started = !1;
|
|
316
316
|
}
|
|
317
317
|
async function w(u) {
|
|
318
|
-
return !u || typeof u != "object" ? null :
|
|
318
|
+
return !u || typeof u != "object" ? null : a("POST", "/update", u);
|
|
319
319
|
}
|
|
320
320
|
function C(u) {
|
|
321
321
|
if (!(!u || typeof u != "object"))
|
|
@@ -336,15 +336,15 @@ function Ze(e) {
|
|
|
336
336
|
context: C,
|
|
337
337
|
// REST
|
|
338
338
|
getCustomer: y,
|
|
339
|
-
patchCustomer:
|
|
339
|
+
patchCustomer: M,
|
|
340
340
|
listConversations: E,
|
|
341
341
|
createConversation: A,
|
|
342
342
|
getConversation: q,
|
|
343
|
-
patchConversation:
|
|
343
|
+
patchConversation: T,
|
|
344
344
|
markConversationRead: U,
|
|
345
|
-
listMessages:
|
|
345
|
+
listMessages: D,
|
|
346
346
|
postMessage: L,
|
|
347
|
-
postCallback:
|
|
347
|
+
postCallback: W,
|
|
348
348
|
uploadAttachment: Q,
|
|
349
349
|
signAttachment: se,
|
|
350
350
|
// Read-only state
|
|
@@ -372,7 +372,7 @@ function nt() {
|
|
|
372
372
|
return t.slice(0, 4).join("") + "-" + t.slice(4, 6).join("") + "-" + t.slice(6, 8).join("") + "-" + t.slice(8, 10).join("") + "-" + t.slice(10, 16).join("");
|
|
373
373
|
}
|
|
374
374
|
function st(e) {
|
|
375
|
-
const t =
|
|
375
|
+
const t = Ke({
|
|
376
376
|
ready: !1,
|
|
377
377
|
error: null,
|
|
378
378
|
config: null,
|
|
@@ -410,7 +410,7 @@ function st(e) {
|
|
|
410
410
|
), s.push(
|
|
411
411
|
e.on("message", (h) => {
|
|
412
412
|
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
|
|
413
|
-
!m || !(_ != null && _.id) || (
|
|
413
|
+
!m || !(_ != null && _.id) || ($(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], ae(m, _.created_at));
|
|
414
414
|
})
|
|
415
415
|
), s.push(
|
|
416
416
|
e.on("message_stream", (h) => {
|
|
@@ -443,7 +443,7 @@ function st(e) {
|
|
|
443
443
|
Array.isArray(h == null ? void 0 : h.conversations) && (t.conversations = h.conversations);
|
|
444
444
|
})
|
|
445
445
|
);
|
|
446
|
-
async function
|
|
446
|
+
async function r(h) {
|
|
447
447
|
try {
|
|
448
448
|
const m = new Promise(
|
|
449
449
|
(w, C) => setTimeout(
|
|
@@ -466,7 +466,7 @@ function st(e) {
|
|
|
466
466
|
console.error("[store] start failed", m), t.error = (m == null ? void 0 : m.message) || String(m);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function i() {
|
|
470
470
|
for (const h of s)
|
|
471
471
|
try {
|
|
472
472
|
h();
|
|
@@ -485,18 +485,18 @@ function st(e) {
|
|
|
485
485
|
}
|
|
486
486
|
return t.customer;
|
|
487
487
|
}
|
|
488
|
-
async function
|
|
488
|
+
async function a(h = {}) {
|
|
489
489
|
const m = await e.createConversation(h), _ = t.conversations.findIndex((w) => w.id === m.id);
|
|
490
490
|
return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
|
|
491
491
|
}
|
|
492
|
-
const
|
|
492
|
+
const o = 50;
|
|
493
493
|
async function f(h) {
|
|
494
494
|
const m = t.paginationByConv[h];
|
|
495
495
|
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
496
496
|
y(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
497
497
|
try {
|
|
498
498
|
const _ = await e.listMessages(h, {
|
|
499
|
-
limit:
|
|
499
|
+
limit: o
|
|
500
500
|
}), w = (_ == null ? void 0 : _.messages) ?? [], C = t.messagesByConv[h] || [], u = /* @__PURE__ */ new Set();
|
|
501
501
|
for (const p of w)
|
|
502
502
|
(p == null ? void 0 : p.id) != null && u.add(`id:${String(p.id)}`), p != null && p.client_msg_id && u.add(`c:${p.client_msg_id}`);
|
|
@@ -517,7 +517,7 @@ function st(e) {
|
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
async function
|
|
520
|
+
async function b(h) {
|
|
521
521
|
var C;
|
|
522
522
|
const m = t.paginationByConv[h];
|
|
523
523
|
if (!m || m.loading || !m.nextCursor) return;
|
|
@@ -527,7 +527,7 @@ function st(e) {
|
|
|
527
527
|
try {
|
|
528
528
|
const u = await e.listMessages(h, {
|
|
529
529
|
before: w,
|
|
530
|
-
limit:
|
|
530
|
+
limit: o
|
|
531
531
|
}), g = (u == null ? void 0 : u.messages) ?? [], p = t.messagesByConv[h] || [], S = /* @__PURE__ */ new Set();
|
|
532
532
|
for (const x of p)
|
|
533
533
|
(x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
|
|
@@ -545,7 +545,7 @@ function st(e) {
|
|
|
545
545
|
function y(h, m) {
|
|
546
546
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
547
547
|
}
|
|
548
|
-
async function
|
|
548
|
+
async function M(h, m) {
|
|
549
549
|
const _ = await e.patchConversation(h, m), w = t.conversations.findIndex((C) => C.id === h);
|
|
550
550
|
w !== -1 && (t.conversations[w] = _);
|
|
551
551
|
}
|
|
@@ -567,7 +567,7 @@ function st(e) {
|
|
|
567
567
|
const p = [];
|
|
568
568
|
for (const S of C) {
|
|
569
569
|
const O = (S == null ? void 0 : S.id) != null && u.has(String(S.id)) || (S == null ? void 0 : S.client_msg_id) && g.has(S.client_msg_id);
|
|
570
|
-
|
|
570
|
+
$(h, S), O || p.push(S);
|
|
571
571
|
}
|
|
572
572
|
return p;
|
|
573
573
|
} catch (w) {
|
|
@@ -606,7 +606,7 @@ function st(e) {
|
|
|
606
606
|
...u ? { payload: { type: "content", attachments: _ } } : {},
|
|
607
607
|
...w && typeof w == "object" ? { metadata: w } : {}
|
|
608
608
|
};
|
|
609
|
-
|
|
609
|
+
$(h, S);
|
|
610
610
|
try {
|
|
611
611
|
await e.postMessage(h, {
|
|
612
612
|
client_msg_id: g,
|
|
@@ -622,7 +622,7 @@ function st(e) {
|
|
|
622
622
|
});
|
|
623
623
|
}
|
|
624
624
|
}
|
|
625
|
-
async function
|
|
625
|
+
async function T(h, m, _) {
|
|
626
626
|
h != null && (t.awaitingCallback[h] = !0);
|
|
627
627
|
try {
|
|
628
628
|
await e.postCallback(h, m, _);
|
|
@@ -631,7 +631,7 @@ function st(e) {
|
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
633
|
const U = /* @__PURE__ */ new Map();
|
|
634
|
-
async function
|
|
634
|
+
async function D(h) {
|
|
635
635
|
if (!h) return null;
|
|
636
636
|
const m = U.get(h);
|
|
637
637
|
if (m != null && m.url) {
|
|
@@ -659,9 +659,9 @@ function st(e) {
|
|
|
659
659
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
660
660
|
}
|
|
661
661
|
};
|
|
662
|
-
await
|
|
662
|
+
await M(h, { metadata: u });
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function W(h) {
|
|
665
665
|
var _, w;
|
|
666
666
|
const m = t.messagesByConv[h] || [];
|
|
667
667
|
for (let C = m.length - 1; C >= 0; C--) {
|
|
@@ -718,7 +718,7 @@ function st(e) {
|
|
|
718
718
|
}
|
|
719
719
|
return [];
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function $(h, m) {
|
|
722
722
|
var u;
|
|
723
723
|
const _ = t.messagesByConv[h] || [];
|
|
724
724
|
let w = -1;
|
|
@@ -775,20 +775,20 @@ function st(e) {
|
|
|
775
775
|
}
|
|
776
776
|
return {
|
|
777
777
|
state: t,
|
|
778
|
-
start:
|
|
779
|
-
destroy:
|
|
778
|
+
start: r,
|
|
779
|
+
destroy: i,
|
|
780
780
|
applyCustomer: n,
|
|
781
|
-
createConversation:
|
|
781
|
+
createConversation: a,
|
|
782
782
|
openConversation: f,
|
|
783
|
-
loadMore:
|
|
783
|
+
loadMore: b,
|
|
784
784
|
fetchSinceLast: E,
|
|
785
|
-
patchConversation:
|
|
785
|
+
patchConversation: M,
|
|
786
786
|
markConversationRead: A,
|
|
787
787
|
send: q,
|
|
788
|
-
clickCallback:
|
|
789
|
-
signAttachment:
|
|
788
|
+
clickCallback: T,
|
|
789
|
+
signAttachment: D,
|
|
790
790
|
submitFeedback: L,
|
|
791
|
-
getPendingApproval:
|
|
791
|
+
getPendingApproval: W,
|
|
792
792
|
getActionInFlight: se,
|
|
793
793
|
getLatestSuggestions: re,
|
|
794
794
|
getLatestForm: Q,
|
|
@@ -952,6 +952,8 @@ Je réponds en quelques secondes.`,
|
|
|
952
952
|
"composer.recordScreen": "Enregistrer l'écran",
|
|
953
953
|
"composer.recording": "Enregistrement · {time}",
|
|
954
954
|
"composer.stop": "Arrêter",
|
|
955
|
+
"composer.conversationEnded": "Cette conversation est terminée.",
|
|
956
|
+
"composer.newConversation": "Nouvelle conversation",
|
|
955
957
|
// ── Message list ─────────────────────────────────────────────────
|
|
956
958
|
"messageList.loadingHistory": "Chargement de l'historique…",
|
|
957
959
|
"messageList.conversationStart": "Début de la conversation",
|
|
@@ -966,6 +968,7 @@ Je réponds en quelques secondes.`,
|
|
|
966
968
|
"system.assigned": "{name} a rejoint la conversation",
|
|
967
969
|
"system.unassigned": "L'agent a quitté la conversation",
|
|
968
970
|
"system.resolved": "Conversation résolue",
|
|
971
|
+
"system.closed": "Conversation fermée",
|
|
969
972
|
"system.reopened": "Conversation rouverte",
|
|
970
973
|
"system.idle": "Conversation en pause",
|
|
971
974
|
// ── Action / approval ────────────────────────────────────────────
|
|
@@ -1078,6 +1081,8 @@ I reply within seconds.`,
|
|
|
1078
1081
|
"composer.recordScreen": "Record screen",
|
|
1079
1082
|
"composer.recording": "Recording · {time}",
|
|
1080
1083
|
"composer.stop": "Stop",
|
|
1084
|
+
"composer.conversationEnded": "This conversation has ended.",
|
|
1085
|
+
"composer.newConversation": "New conversation",
|
|
1081
1086
|
// ── Message list ─────────────────────────────────────────────────
|
|
1082
1087
|
"messageList.loadingHistory": "Loading history…",
|
|
1083
1088
|
"messageList.conversationStart": "Start of the conversation",
|
|
@@ -1092,6 +1097,7 @@ I reply within seconds.`,
|
|
|
1092
1097
|
"system.assigned": "{name} joined the conversation",
|
|
1093
1098
|
"system.unassigned": "The agent left the conversation",
|
|
1094
1099
|
"system.resolved": "Conversation resolved",
|
|
1100
|
+
"system.closed": "Conversation closed",
|
|
1095
1101
|
"system.reopened": "Conversation reopened",
|
|
1096
1102
|
"system.idle": "Conversation paused",
|
|
1097
1103
|
// ── Action / approval ────────────────────────────────────────────
|
|
@@ -1153,55 +1159,55 @@ function ne(e) {
|
|
|
1153
1159
|
return Le[xe(e)] || Le[ue];
|
|
1154
1160
|
}
|
|
1155
1161
|
function F(e) {
|
|
1156
|
-
const t = xe(e), s = ke[t] || ke[ue],
|
|
1157
|
-
return function(n,
|
|
1158
|
-
let
|
|
1159
|
-
return
|
|
1162
|
+
const t = xe(e), s = ke[t] || ke[ue], r = ke[ue];
|
|
1163
|
+
return function(n, a) {
|
|
1164
|
+
let o = s[n];
|
|
1165
|
+
return o == null && (o = r[n]), o == null ? n : (a && (o = o.replace(
|
|
1160
1166
|
/\{(\w+)\}/g,
|
|
1161
|
-
(f,
|
|
1162
|
-
)),
|
|
1167
|
+
(f, b) => a[b] != null ? String(a[b]) : f
|
|
1168
|
+
)), o);
|
|
1163
1169
|
};
|
|
1164
1170
|
}
|
|
1165
1171
|
function Ie(e, t) {
|
|
1166
1172
|
if (!Array.isArray(e == null ? void 0 : e.options)) return t;
|
|
1167
|
-
const s = e.options.find((
|
|
1173
|
+
const s = e.options.find((r) => (r == null ? void 0 : r.value) === t);
|
|
1168
1174
|
return (s == null ? void 0 : s.label) || t;
|
|
1169
1175
|
}
|
|
1170
1176
|
function He(e, t, s) {
|
|
1171
|
-
return Array.isArray(t) ? t.map((
|
|
1177
|
+
return Array.isArray(t) ? t.map((r) => Ie(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
|
|
1172
1178
|
}
|
|
1173
1179
|
function ht(e, t, s = F()) {
|
|
1174
1180
|
if (!e || !t) return "";
|
|
1175
|
-
const
|
|
1176
|
-
for (const n of
|
|
1181
|
+
const r = Array.isArray(e.fields) ? e.fields : [], i = [];
|
|
1182
|
+
for (const n of r) {
|
|
1177
1183
|
if (!(n != null && n.key) || !(n != null && n.label)) continue;
|
|
1178
|
-
const
|
|
1179
|
-
if (
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1182
|
-
${
|
|
1184
|
+
const a = t[n.key];
|
|
1185
|
+
if (a == null || a === "") continue;
|
|
1186
|
+
const o = He(n, a, s);
|
|
1187
|
+
o && i.push(`${n.label} :
|
|
1188
|
+
${o}`);
|
|
1183
1189
|
}
|
|
1184
|
-
return
|
|
1190
|
+
return i.join(`
|
|
1185
1191
|
|
|
1186
1192
|
`);
|
|
1187
1193
|
}
|
|
1188
1194
|
function mt(e, t, s = F()) {
|
|
1189
|
-
const
|
|
1190
|
-
for (const n of
|
|
1195
|
+
const r = [], i = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1196
|
+
for (const n of i) {
|
|
1191
1197
|
if (!(n != null && n.key) || !(n != null && n.label)) continue;
|
|
1192
|
-
const
|
|
1193
|
-
if (
|
|
1194
|
-
const
|
|
1195
|
-
if (!
|
|
1196
|
-
const f = n.type === "textarea" || typeof
|
|
1198
|
+
const a = t == null ? void 0 : t[n.key];
|
|
1199
|
+
if (a == null || a === "") continue;
|
|
1200
|
+
const o = He(n, a, s);
|
|
1201
|
+
if (!o) continue;
|
|
1202
|
+
const f = n.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
|
|
1197
1203
|
`));
|
|
1198
|
-
|
|
1204
|
+
r.push({ label: n.label, value: o, multiline: f });
|
|
1199
1205
|
}
|
|
1200
1206
|
return {
|
|
1201
1207
|
kind: "form_response",
|
|
1202
1208
|
data: {
|
|
1203
1209
|
title: (e == null ? void 0 : e.title) || s("form.title"),
|
|
1204
|
-
fields:
|
|
1210
|
+
fields: r
|
|
1205
1211
|
}
|
|
1206
1212
|
};
|
|
1207
1213
|
}
|
|
@@ -1215,10 +1221,10 @@ const Ee = "";
|
|
|
1215
1221
|
function de(e) {
|
|
1216
1222
|
let t = e;
|
|
1217
1223
|
const s = [];
|
|
1218
|
-
return t = t.replace(/`([^`\n]+)`/g, (
|
|
1224
|
+
return t = t.replace(/`([^`\n]+)`/g, (r, i) => {
|
|
1219
1225
|
const n = s.length;
|
|
1220
|
-
return s.push(
|
|
1221
|
-
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (
|
|
1226
|
+
return s.push(i), `${Ee}CODE${n}${Ee}`;
|
|
1227
|
+
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${i}</a>` : i), 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, (r, i) => `<code class="wm-md-code">${s[+i]}</code>`), t;
|
|
1222
1228
|
}
|
|
1223
1229
|
function qe(e) {
|
|
1224
1230
|
if (!e) return "";
|
|
@@ -1229,70 +1235,70 @@ function ft(e) {
|
|
|
1229
1235
|
if (!e) return "";
|
|
1230
1236
|
const t = ze(e).split(`
|
|
1231
1237
|
`), s = [];
|
|
1232
|
-
let
|
|
1233
|
-
for (;
|
|
1234
|
-
const n = t[
|
|
1238
|
+
let r = 0;
|
|
1239
|
+
for (; r < t.length; ) {
|
|
1240
|
+
const n = t[r];
|
|
1235
1241
|
if (/^\s*```([\w-]*)\s*$/.exec(n)) {
|
|
1236
|
-
|
|
1237
|
-
const
|
|
1238
|
-
for (;
|
|
1239
|
-
|
|
1240
|
-
|
|
1242
|
+
r++;
|
|
1243
|
+
const b = [];
|
|
1244
|
+
for (; r < t.length && !/^\s*```\s*$/.test(t[r]); )
|
|
1245
|
+
b.push(t[r]), r++;
|
|
1246
|
+
r < t.length && r++, s.push({
|
|
1241
1247
|
type: "block",
|
|
1242
|
-
html: `<pre class="wm-md-pre"><code>${
|
|
1248
|
+
html: `<pre class="wm-md-pre"><code>${b.join(`
|
|
1243
1249
|
`)}</code></pre>`
|
|
1244
1250
|
});
|
|
1245
1251
|
continue;
|
|
1246
1252
|
}
|
|
1247
1253
|
if (/^\s*[-*]\s+/.test(n)) {
|
|
1248
|
-
const
|
|
1249
|
-
for (;
|
|
1250
|
-
const
|
|
1251
|
-
if (!
|
|
1252
|
-
|
|
1254
|
+
const b = [];
|
|
1255
|
+
for (; r < t.length; ) {
|
|
1256
|
+
const M = /^\s*[-*]\s+(.*)$/.exec(t[r]);
|
|
1257
|
+
if (!M) break;
|
|
1258
|
+
b.push(M[1]), r++;
|
|
1253
1259
|
}
|
|
1254
|
-
const y =
|
|
1260
|
+
const y = b.map((M) => `<li>${de(M)}</li>`).join("");
|
|
1255
1261
|
s.push({
|
|
1256
1262
|
type: "block",
|
|
1257
1263
|
html: `<ul class="wm-md-ul">${y}</ul>`
|
|
1258
1264
|
});
|
|
1259
1265
|
continue;
|
|
1260
1266
|
}
|
|
1261
|
-
const
|
|
1262
|
-
if (
|
|
1263
|
-
const
|
|
1264
|
-
for (
|
|
1265
|
-
const A = /^\s*\d+\.\s+(.*)$/.exec(t[
|
|
1267
|
+
const o = /^\s*(\d+)\.\s+(.*)$/.exec(n);
|
|
1268
|
+
if (o) {
|
|
1269
|
+
const b = parseInt(o[1], 10), y = [o[2]];
|
|
1270
|
+
for (r++; r < t.length; ) {
|
|
1271
|
+
const A = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
|
|
1266
1272
|
if (!A) break;
|
|
1267
|
-
y.push(A[1]),
|
|
1273
|
+
y.push(A[1]), r++;
|
|
1268
1274
|
}
|
|
1269
|
-
const
|
|
1275
|
+
const M = y.map((A) => `<li>${de(A)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
|
|
1270
1276
|
s.push({
|
|
1271
1277
|
type: "block",
|
|
1272
|
-
html: `<ol class="wm-md-ol"${E}>${
|
|
1278
|
+
html: `<ol class="wm-md-ol"${E}>${M}</ol>`
|
|
1273
1279
|
});
|
|
1274
1280
|
continue;
|
|
1275
1281
|
}
|
|
1276
1282
|
const f = /^(#{1,6})\s+(.*)$/.exec(n);
|
|
1277
1283
|
if (f) {
|
|
1278
|
-
const
|
|
1284
|
+
const b = f[1].length;
|
|
1279
1285
|
s.push({
|
|
1280
1286
|
type: "block",
|
|
1281
|
-
html: `<h${
|
|
1282
|
-
}),
|
|
1287
|
+
html: `<h${b} class="wm-md-h wm-md-h${b}">${de(f[2])}</h${b}>`
|
|
1288
|
+
}), r++;
|
|
1283
1289
|
continue;
|
|
1284
1290
|
}
|
|
1285
|
-
s.push({ type: "text", html: de(n) }),
|
|
1291
|
+
s.push({ type: "text", html: de(n) }), r++;
|
|
1286
1292
|
}
|
|
1287
|
-
let
|
|
1293
|
+
let i = "";
|
|
1288
1294
|
for (let n = 0; n < s.length; n++) {
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1291
|
-
const
|
|
1292
|
-
|
|
1295
|
+
const a = s[n];
|
|
1296
|
+
i += a.html;
|
|
1297
|
+
const o = s[n + 1];
|
|
1298
|
+
o && a.type !== "block" && o.type !== "block" && (i += `
|
|
1293
1299
|
`);
|
|
1294
1300
|
}
|
|
1295
|
-
return
|
|
1301
|
+
return i;
|
|
1296
1302
|
}
|
|
1297
1303
|
function he(e) {
|
|
1298
1304
|
var s;
|
|
@@ -1306,52 +1312,52 @@ function Y(e) {
|
|
|
1306
1312
|
}
|
|
1307
1313
|
function Be(e, t) {
|
|
1308
1314
|
let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
|
|
1309
|
-
for (const
|
|
1310
|
-
|
|
1315
|
+
for (const r of t)
|
|
1316
|
+
r != null && r.created_at && r.created_at > s && (s = r.created_at);
|
|
1311
1317
|
return s;
|
|
1312
1318
|
}
|
|
1313
1319
|
function _t(e, t) {
|
|
1314
|
-
var s,
|
|
1320
|
+
var s, r, i;
|
|
1315
1321
|
for (let n = t.length - 1; n >= 0; n--) {
|
|
1316
|
-
const
|
|
1317
|
-
if (!
|
|
1318
|
-
const
|
|
1319
|
-
if (
|
|
1320
|
-
return (((s =
|
|
1321
|
-
const f = (
|
|
1322
|
+
const a = t[n];
|
|
1323
|
+
if (!a) continue;
|
|
1324
|
+
const o = typeof a.text_md == "string" ? a.text_md.trim() : "";
|
|
1325
|
+
if (o)
|
|
1326
|
+
return (((s = a.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + o.replace(/\s+/g, " ");
|
|
1327
|
+
const f = (r = a.payload) == null ? void 0 : r.attachments;
|
|
1322
1328
|
if (Array.isArray(f) && f.length) return "📎 Pièce jointe";
|
|
1323
1329
|
}
|
|
1324
|
-
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((
|
|
1330
|
+
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((i = e == null ? void 0 : e.metadata) == null ? void 0 : i.last_preview) || "";
|
|
1325
1331
|
}
|
|
1326
1332
|
function gt(e, t) {
|
|
1327
1333
|
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"));
|
|
1328
1334
|
}
|
|
1329
|
-
function pt(e, t, s,
|
|
1330
|
-
const
|
|
1335
|
+
function pt(e, t, s, r) {
|
|
1336
|
+
const i = [
|
|
1331
1337
|
`# ${e.name || s("common.conversation")}`,
|
|
1332
1338
|
e.created_at ? s("export.createdOn", {
|
|
1333
|
-
date: new Date(e.created_at).toLocaleString(
|
|
1339
|
+
date: new Date(e.created_at).toLocaleString(r)
|
|
1334
1340
|
}) : "",
|
|
1335
1341
|
""
|
|
1336
1342
|
];
|
|
1337
1343
|
for (const n of t) {
|
|
1338
1344
|
if (!n) continue;
|
|
1339
|
-
const
|
|
1340
|
-
if (!
|
|
1341
|
-
const
|
|
1342
|
-
|
|
1345
|
+
const a = (n.text_md || "").trim();
|
|
1346
|
+
if (!a) continue;
|
|
1347
|
+
const o = gt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
|
|
1348
|
+
i.push(`[${f}] ${o} :`), i.push(a), i.push("");
|
|
1343
1349
|
}
|
|
1344
|
-
return
|
|
1350
|
+
return i.join(`
|
|
1345
1351
|
`);
|
|
1346
1352
|
}
|
|
1347
|
-
function vt(e, t, s = F(),
|
|
1353
|
+
function vt(e, t, s = F(), r) {
|
|
1348
1354
|
if (!e) return;
|
|
1349
|
-
const
|
|
1355
|
+
const i = pt(e, t || [], s, ne(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
|
|
1350
1356
|
try {
|
|
1351
|
-
const
|
|
1352
|
-
|
|
1353
|
-
} catch (
|
|
1354
|
-
console.error("[ww-messenger] export failed",
|
|
1357
|
+
const a = URL.createObjectURL(n), o = document.createElement("a");
|
|
1358
|
+
o.href = a, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(a), 1e3);
|
|
1359
|
+
} catch (a) {
|
|
1360
|
+
console.error("[ww-messenger] export failed", a);
|
|
1355
1361
|
}
|
|
1356
1362
|
}
|
|
1357
1363
|
const yt = {
|
|
@@ -1464,10 +1470,10 @@ const yt = {
|
|
|
1464
1470
|
// at message-arrival time because the user may have closed the
|
|
1465
1471
|
// panel or switched threads during the typing dwell.
|
|
1466
1472
|
onMessageRevealed(e, t) {
|
|
1467
|
-
var
|
|
1473
|
+
var i;
|
|
1468
1474
|
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !he(e)) return;
|
|
1469
1475
|
const s = typeof document < "u" && document.hidden;
|
|
1470
|
-
this.isOpen && !s && ((
|
|
1476
|
+
this.isOpen && !s && ((i = this.currentConv) == null ? void 0 : i.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
|
|
1471
1477
|
},
|
|
1472
1478
|
playNotificationSound() {
|
|
1473
1479
|
if (typeof window > "u") return;
|
|
@@ -1481,17 +1487,17 @@ const yt = {
|
|
|
1481
1487
|
t.resume();
|
|
1482
1488
|
} catch {
|
|
1483
1489
|
}
|
|
1484
|
-
const s = t.currentTime,
|
|
1485
|
-
|
|
1490
|
+
const s = t.currentTime, r = t.createOscillator(), i = t.createGain();
|
|
1491
|
+
r.connect(i), i.connect(t.destination), r.type = "sine", r.frequency.setValueAtTime(880, s), r.frequency.exponentialRampToValueAtTime(1320, s + 0.08), i.gain.setValueAtTime(0, s), i.gain.linearRampToValueAtTime(0.12, s + 0.02), i.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), r.start(s), r.stop(s + 0.32);
|
|
1486
1492
|
} catch {
|
|
1487
1493
|
}
|
|
1488
1494
|
},
|
|
1489
1495
|
showBrowserNotification(e, t) {
|
|
1490
1496
|
if (typeof Notification > "u" || Notification.permission !== "granted") return;
|
|
1491
|
-
const s = t == null ? void 0 : t.author,
|
|
1497
|
+
const s = t == null ? void 0 : t.author, r = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (r ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), a = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", o = a ? a.slice(0, 140) : this.t("notification.youHaveNewMessage");
|
|
1492
1498
|
try {
|
|
1493
1499
|
const f = new Notification(n, {
|
|
1494
|
-
body:
|
|
1500
|
+
body: o,
|
|
1495
1501
|
tag: `wm-${e}`,
|
|
1496
1502
|
renotify: !1,
|
|
1497
1503
|
silent: !0
|
|
@@ -1590,26 +1596,26 @@ const yt = {
|
|
|
1590
1596
|
// the activity isn't replayed via SSE, so we fetch it explicitly and
|
|
1591
1597
|
// run it through pacing.
|
|
1592
1598
|
setupLiveReveal() {
|
|
1593
|
-
var s,
|
|
1599
|
+
var s, r;
|
|
1594
1600
|
if (!this.transport) return;
|
|
1595
1601
|
this.teardownLiveReveal();
|
|
1596
|
-
const e = this.transport.on("message", (
|
|
1597
|
-
const n =
|
|
1598
|
-
n &&
|
|
1602
|
+
const e = this.transport.on("message", (i) => {
|
|
1603
|
+
const n = i == null ? void 0 : i.conversation_id, a = i == null ? void 0 : i.message;
|
|
1604
|
+
n && a && this.paceLiveMessage(a, n);
|
|
1599
1605
|
});
|
|
1600
1606
|
this._liveRevealConvSnapshot = new Map(
|
|
1601
|
-
(((s = this.s) == null ? void 0 : s.conversations) || []).map((
|
|
1602
|
-
|
|
1603
|
-
(
|
|
1607
|
+
(((s = this.s) == null ? void 0 : s.conversations) || []).map((i) => [
|
|
1608
|
+
i.id,
|
|
1609
|
+
(i == null ? void 0 : i.last_message_at) || ""
|
|
1604
1610
|
])
|
|
1605
1611
|
), this._liveHwm = Object.fromEntries(
|
|
1606
|
-
(((
|
|
1607
|
-
|
|
1608
|
-
(
|
|
1612
|
+
(((r = this.s) == null ? void 0 : r.conversations) || []).map((i) => [
|
|
1613
|
+
i.id,
|
|
1614
|
+
(i == null ? void 0 : i.last_message_at) || ""
|
|
1609
1615
|
])
|
|
1610
1616
|
);
|
|
1611
|
-
const t = this.transport.on("activity", (
|
|
1612
|
-
this.handleLiveActivity(
|
|
1617
|
+
const t = this.transport.on("activity", (i) => {
|
|
1618
|
+
this.handleLiveActivity(i);
|
|
1613
1619
|
});
|
|
1614
1620
|
this._liveRevealOff = () => {
|
|
1615
1621
|
try {
|
|
@@ -1639,29 +1645,29 @@ const yt = {
|
|
|
1639
1645
|
// on background convs when SSE wasn't open at the moment they
|
|
1640
1646
|
// arrived.
|
|
1641
1647
|
async handleLiveActivity(e) {
|
|
1642
|
-
var
|
|
1648
|
+
var i, n;
|
|
1643
1649
|
const t = e == null ? void 0 : e.conversations;
|
|
1644
1650
|
if (!Array.isArray(t) || !this.store) return;
|
|
1645
|
-
const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(),
|
|
1646
|
-
for (const
|
|
1647
|
-
if (!(
|
|
1648
|
-
const
|
|
1649
|
-
if (!
|
|
1650
|
-
const f = s.get(
|
|
1651
|
-
|
|
1651
|
+
const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), r = [];
|
|
1652
|
+
for (const a of t) {
|
|
1653
|
+
if (!(a != null && a.id)) continue;
|
|
1654
|
+
const o = a.last_message_at || "";
|
|
1655
|
+
if (!o) continue;
|
|
1656
|
+
const f = s.get(a.id) || "";
|
|
1657
|
+
o > f && r.push(a.id);
|
|
1652
1658
|
}
|
|
1653
1659
|
this._liveRevealConvSnapshot = new Map(
|
|
1654
|
-
t.map((
|
|
1660
|
+
t.map((a) => [a.id, (a == null ? void 0 : a.last_message_at) || ""])
|
|
1655
1661
|
);
|
|
1656
|
-
for (const
|
|
1662
|
+
for (const a of r)
|
|
1657
1663
|
try {
|
|
1658
|
-
const
|
|
1659
|
-
if (!Array.isArray(
|
|
1660
|
-
for (const f of
|
|
1661
|
-
} catch (
|
|
1664
|
+
const o = await ((n = (i = this.store).fetchSinceLast) == null ? void 0 : n.call(i, a));
|
|
1665
|
+
if (!Array.isArray(o)) continue;
|
|
1666
|
+
for (const f of o) this.paceLiveMessage(f, a);
|
|
1667
|
+
} catch (o) {
|
|
1662
1668
|
console.error(
|
|
1663
1669
|
"[ww-messenger] activity delta fetch failed",
|
|
1664
|
-
|
|
1670
|
+
o
|
|
1665
1671
|
);
|
|
1666
1672
|
}
|
|
1667
1673
|
},
|
|
@@ -1671,16 +1677,16 @@ const yt = {
|
|
|
1671
1677
|
// - inter-bubble gap scales with message length (reading time),
|
|
1672
1678
|
// bounded by MIN/MAX_TYPING_MS.
|
|
1673
1679
|
scheduleReveal(e, t) {
|
|
1674
|
-
const s = this.revealPacing,
|
|
1680
|
+
const s = this.revealPacing, r = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
|
|
1675
1681
|
s.maxTypingMs,
|
|
1676
|
-
Math.max(s.minTypingMs,
|
|
1677
|
-
),
|
|
1678
|
-
|
|
1682
|
+
Math.max(s.minTypingMs, i * s.msPerChar)
|
|
1683
|
+
), o = Math.max(
|
|
1684
|
+
r + s.firstRevealDelayMs,
|
|
1679
1685
|
this.nextRevealAt + s.pauseBetweenMs
|
|
1680
1686
|
) + n;
|
|
1681
|
-
this.nextRevealAt =
|
|
1682
|
-
const f = Math.max(0,
|
|
1683
|
-
this.revealedAt = { ...this.revealedAt, [
|
|
1687
|
+
this.nextRevealAt = o;
|
|
1688
|
+
const f = Math.max(0, o - r), b = e.id, y = setTimeout(() => {
|
|
1689
|
+
this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1684
1690
|
}, f);
|
|
1685
1691
|
this.revealTimers.push(y);
|
|
1686
1692
|
},
|
|
@@ -1690,28 +1696,28 @@ const yt = {
|
|
|
1690
1696
|
// history (instant) and any live message that the transport
|
|
1691
1697
|
// subscription already paced (idempotent on msg.id).
|
|
1692
1698
|
paceMessages(e, t) {
|
|
1693
|
-
var
|
|
1699
|
+
var i;
|
|
1694
1700
|
if (!Array.isArray(e) || !e.length) return;
|
|
1695
|
-
const s = Date.now(),
|
|
1701
|
+
const s = Date.now(), r = { ...this.revealedAt };
|
|
1696
1702
|
for (const n of e) {
|
|
1697
|
-
if ((n == null ? void 0 : n.id) == null ||
|
|
1703
|
+
if ((n == null ? void 0 : n.id) == null || r[n.id] !== void 0) continue;
|
|
1698
1704
|
if (!he(n)) {
|
|
1699
|
-
|
|
1705
|
+
r[n.id] = s;
|
|
1700
1706
|
continue;
|
|
1701
1707
|
}
|
|
1702
|
-
const
|
|
1703
|
-
if (!Number.isFinite(
|
|
1704
|
-
|
|
1708
|
+
const a = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
|
|
1709
|
+
if (!Number.isFinite(a) || a < this.convOpenedAt) {
|
|
1710
|
+
r[n.id] = s;
|
|
1705
1711
|
continue;
|
|
1706
1712
|
}
|
|
1707
|
-
const
|
|
1708
|
-
if (!
|
|
1709
|
-
|
|
1713
|
+
const o = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((i = n == null ? void 0 : n.payload) == null ? void 0 : i.attachments) && n.payload.attachments.length > 0;
|
|
1714
|
+
if (!o && !f) {
|
|
1715
|
+
r[n.id] = s;
|
|
1710
1716
|
continue;
|
|
1711
1717
|
}
|
|
1712
|
-
|
|
1718
|
+
r[n.id] = 0, this.scheduleReveal(n, t);
|
|
1713
1719
|
}
|
|
1714
|
-
this.revealedAt =
|
|
1720
|
+
this.revealedAt = r;
|
|
1715
1721
|
},
|
|
1716
1722
|
// Pace a single live message from any conversation. Called from the
|
|
1717
1723
|
// transport 'message' subscription (live SSE arrival) and from the
|
|
@@ -1729,19 +1735,19 @@ const yt = {
|
|
|
1729
1735
|
// silently. Both sides of the comparison are server timestamps, so
|
|
1730
1736
|
// this is immune to client clock skew.
|
|
1731
1737
|
paceLiveMessage(e, t) {
|
|
1732
|
-
var
|
|
1738
|
+
var o;
|
|
1733
1739
|
if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
|
|
1734
1740
|
if (!he(e)) {
|
|
1735
1741
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1736
1742
|
return;
|
|
1737
1743
|
}
|
|
1738
|
-
const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0,
|
|
1739
|
-
if (!s && !
|
|
1744
|
+
const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0, r = Array.isArray((o = e == null ? void 0 : e.payload) == null ? void 0 : o.attachments) && e.payload.attachments.length > 0;
|
|
1745
|
+
if (!s && !r) {
|
|
1740
1746
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1741
1747
|
return;
|
|
1742
1748
|
}
|
|
1743
|
-
const
|
|
1744
|
-
if (n && (
|
|
1749
|
+
const i = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
|
|
1750
|
+
if (n && (i === void 0 || n > i) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(i !== void 0 && n && n > i)) {
|
|
1745
1751
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1746
1752
|
return;
|
|
1747
1753
|
}
|
|
@@ -1807,16 +1813,16 @@ const yt = {
|
|
|
1807
1813
|
// messages, or when the pointer is already at/ahead of the
|
|
1808
1814
|
// candidate id.
|
|
1809
1815
|
markConvRead(e) {
|
|
1810
|
-
var n,
|
|
1816
|
+
var n, a;
|
|
1811
1817
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1812
|
-
const t = ((
|
|
1818
|
+
const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s = At(t);
|
|
1813
1819
|
if (s == null) return;
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
const
|
|
1817
|
-
this._readMarkerPending = null, this._readMarkerTimer = null,
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
+
const r = Y(e.last_read_message_id), i = Y(s);
|
|
1821
|
+
i != null && (r != null && i <= r || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
1822
|
+
const o = this._readMarkerPending;
|
|
1823
|
+
this._readMarkerPending = null, this._readMarkerTimer = null, o && this.store && this.store.markConversationRead(
|
|
1824
|
+
o.convId,
|
|
1825
|
+
o.messageId
|
|
1820
1826
|
);
|
|
1821
1827
|
}, kt))));
|
|
1822
1828
|
}
|
|
@@ -1830,10 +1836,10 @@ function At(e) {
|
|
|
1830
1836
|
}
|
|
1831
1837
|
return null;
|
|
1832
1838
|
}
|
|
1833
|
-
const
|
|
1839
|
+
const N = (e, t) => {
|
|
1834
1840
|
const s = e.__vccOpts || e;
|
|
1835
|
-
for (const [
|
|
1836
|
-
s[
|
|
1841
|
+
for (const [r, i] of t)
|
|
1842
|
+
s[r] = i;
|
|
1837
1843
|
return s;
|
|
1838
1844
|
}, St = {
|
|
1839
1845
|
name: "WmHumanAvatar",
|
|
@@ -1856,7 +1862,7 @@ const P = (e, t) => {
|
|
|
1856
1862
|
}
|
|
1857
1863
|
}
|
|
1858
1864
|
}, Mt = ["src", "alt"];
|
|
1859
|
-
function Tt(e, t, s,
|
|
1865
|
+
function Tt(e, t, s, r, i, n) {
|
|
1860
1866
|
return c(), d("div", {
|
|
1861
1867
|
class: R(["wm-huav", { "wm-huav--tail": s.tail }]),
|
|
1862
1868
|
style: z({
|
|
@@ -1876,7 +1882,7 @@ function Tt(e, t, s, i, a, n) {
|
|
|
1876
1882
|
}, v(n.initials), 5))
|
|
1877
1883
|
], 6);
|
|
1878
1884
|
}
|
|
1879
|
-
const ve = /* @__PURE__ */
|
|
1885
|
+
const ve = /* @__PURE__ */ N(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
|
|
1880
1886
|
name: "WmLauncher",
|
|
1881
1887
|
components: { HumanAvatar: ve },
|
|
1882
1888
|
inject: {
|
|
@@ -1902,24 +1908,24 @@ const ve = /* @__PURE__ */ P(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d
|
|
|
1902
1908
|
return this.peeks.slice(0, xt).reverse();
|
|
1903
1909
|
}
|
|
1904
1910
|
}
|
|
1905
|
-
}, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" },
|
|
1906
|
-
function zt(e, t, s,
|
|
1907
|
-
const
|
|
1911
|
+
}, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], It = { class: "wm-peek__avatar" }, Et = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Nt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Dt = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
|
|
1912
|
+
function zt(e, t, s, r, i, n) {
|
|
1913
|
+
const a = B("HumanAvatar");
|
|
1908
1914
|
return c(), d("div", {
|
|
1909
1915
|
class: "wm-launcherWrap",
|
|
1910
|
-
onMouseenter: t[1] || (t[1] = (
|
|
1911
|
-
onMouseleave: t[2] || (t[2] = (
|
|
1912
|
-
onFocusin: t[3] || (t[3] = (
|
|
1913
|
-
onFocusout: t[4] || (t[4] = (
|
|
1916
|
+
onMouseenter: t[1] || (t[1] = (o) => e.$emit("hover", !0)),
|
|
1917
|
+
onMouseleave: t[2] || (t[2] = (o) => e.$emit("hover", !1)),
|
|
1918
|
+
onFocusin: t[3] || (t[3] = (o) => e.$emit("hover", !0)),
|
|
1919
|
+
onFocusout: t[4] || (t[4] = (o) => e.$emit("hover", !1))
|
|
1914
1920
|
}, [
|
|
1915
|
-
|
|
1921
|
+
K(De, { name: "wm-peek" }, {
|
|
1916
1922
|
default: je(() => [
|
|
1917
1923
|
n.visiblePeeks.length ? (c(), d("div", {
|
|
1918
1924
|
key: 0,
|
|
1919
1925
|
class: R(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
|
|
1920
1926
|
}, [
|
|
1921
|
-
(c(!0), d(I, null, j(n.visiblePeeks, (
|
|
1922
|
-
key:
|
|
1927
|
+
(c(!0), d(I, null, j(n.visiblePeeks, (o, f) => (c(), d("div", {
|
|
1928
|
+
key: o.convId,
|
|
1923
1929
|
class: "wm-peek",
|
|
1924
1930
|
style: z({
|
|
1925
1931
|
"--depth": n.visiblePeeks.length - 1 - f,
|
|
@@ -1928,21 +1934,21 @@ function zt(e, t, s, i, a, n) {
|
|
|
1928
1934
|
role: "button",
|
|
1929
1935
|
tabindex: "0",
|
|
1930
1936
|
"aria-label": n.t("launcher.openConversationWith", {
|
|
1931
|
-
name:
|
|
1937
|
+
name: o.senderName || n.t("launcher.theAgent")
|
|
1932
1938
|
}),
|
|
1933
|
-
onClick: (
|
|
1939
|
+
onClick: (b) => e.$emit("open", o.convId),
|
|
1934
1940
|
onKeydown: [
|
|
1935
|
-
ge(J((
|
|
1936
|
-
ge(J((
|
|
1941
|
+
ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
|
|
1942
|
+
ge(J((b) => e.$emit("open", o.convId), ["prevent"]), ["space"])
|
|
1937
1943
|
]
|
|
1938
1944
|
}, [
|
|
1939
|
-
|
|
1945
|
+
l("button", {
|
|
1940
1946
|
type: "button",
|
|
1941
1947
|
class: "wm-peek__close",
|
|
1942
1948
|
"aria-label": n.t("launcher.dismiss"),
|
|
1943
|
-
onClick: J((
|
|
1949
|
+
onClick: J((b) => e.$emit("dismiss", o.convId), ["stop"])
|
|
1944
1950
|
}, [...t[5] || (t[5] = [
|
|
1945
|
-
|
|
1951
|
+
l("svg", {
|
|
1946
1952
|
width: "9",
|
|
1947
1953
|
height: "9",
|
|
1948
1954
|
viewBox: "0 0 24 24",
|
|
@@ -1953,45 +1959,45 @@ function zt(e, t, s, i, a, n) {
|
|
|
1953
1959
|
"stroke-linejoin": "round",
|
|
1954
1960
|
"aria-hidden": "true"
|
|
1955
1961
|
}, [
|
|
1956
|
-
|
|
1962
|
+
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1957
1963
|
], -1)
|
|
1958
1964
|
])], 8, Lt),
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
name:
|
|
1962
|
-
"avatar-url":
|
|
1965
|
+
l("div", It, [
|
|
1966
|
+
K(a, {
|
|
1967
|
+
name: o.senderName,
|
|
1968
|
+
"avatar-url": o.senderAvatarUrl,
|
|
1963
1969
|
size: 34
|
|
1964
1970
|
}, null, 8, ["name", "avatar-url"]),
|
|
1965
|
-
|
|
1971
|
+
o.count > 1 ? (c(), d("span", {
|
|
1966
1972
|
key: 0,
|
|
1967
1973
|
class: "wm-peek__avatarBadge",
|
|
1968
|
-
"aria-label": n.t("launcher.unreadMessages", { count:
|
|
1969
|
-
}, v(
|
|
1974
|
+
"aria-label": n.t("launcher.unreadMessages", { count: o.count })
|
|
1975
|
+
}, v(o.count > 9 ? "9+" : o.count), 9, Et)) : k("", !0)
|
|
1970
1976
|
]),
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1977
|
+
l("div", Bt, [
|
|
1978
|
+
l("div", Pt, [
|
|
1979
|
+
l("span", Nt, v(o.senderName || n.t("common.agent")), 1),
|
|
1980
|
+
l("span", Ut, v(n.t("launcher.repliedToYou")), 1)
|
|
1975
1981
|
]),
|
|
1976
|
-
|
|
1982
|
+
l("p", Dt, v(o.preview), 1)
|
|
1977
1983
|
]),
|
|
1978
|
-
|
|
1984
|
+
l("button", {
|
|
1979
1985
|
type: "button",
|
|
1980
1986
|
class: "wm-peek__open",
|
|
1981
|
-
onClick: J((
|
|
1987
|
+
onClick: J((b) => e.$emit("open", o.convId), ["stop"])
|
|
1982
1988
|
}, v(n.t("common.open")), 9, jt)
|
|
1983
1989
|
], 44, Rt))), 128))
|
|
1984
|
-
], 2)) :
|
|
1990
|
+
], 2)) : k("", !0)
|
|
1985
1991
|
]),
|
|
1986
1992
|
_: 1
|
|
1987
1993
|
}),
|
|
1988
|
-
|
|
1994
|
+
l("button", {
|
|
1989
1995
|
type: "button",
|
|
1990
1996
|
class: "wm-launcher",
|
|
1991
1997
|
"aria-label": n.t("launcher.open"),
|
|
1992
|
-
onClick: t[0] || (t[0] = (
|
|
1998
|
+
onClick: t[0] || (t[0] = (o) => e.$emit("open"))
|
|
1993
1999
|
}, [
|
|
1994
|
-
t[6] || (t[6] =
|
|
2000
|
+
t[6] || (t[6] = l("svg", {
|
|
1995
2001
|
width: "20",
|
|
1996
2002
|
height: "20",
|
|
1997
2003
|
viewBox: "0 0 24 24",
|
|
@@ -2002,7 +2008,7 @@ function zt(e, t, s, i, a, n) {
|
|
|
2002
2008
|
"stroke-linejoin": "round",
|
|
2003
2009
|
"aria-hidden": "true"
|
|
2004
2010
|
}, [
|
|
2005
|
-
|
|
2011
|
+
l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
2006
2012
|
], -1)),
|
|
2007
2013
|
s.unreadCount > 0 ? (c(), d("span", {
|
|
2008
2014
|
key: 0,
|
|
@@ -2012,11 +2018,11 @@ function zt(e, t, s, i, a, n) {
|
|
|
2012
2018
|
}) : n.t("launcher.unreadConversationsOne", {
|
|
2013
2019
|
count: s.unreadCount
|
|
2014
2020
|
})
|
|
2015
|
-
}, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) :
|
|
2021
|
+
}, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) : k("", !0)
|
|
2016
2022
|
], 8, Ft)
|
|
2017
2023
|
], 32);
|
|
2018
2024
|
}
|
|
2019
|
-
const qt = /* @__PURE__ */
|
|
2025
|
+
const qt = /* @__PURE__ */ N(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
|
|
2020
2026
|
name: "WmAIAvatar",
|
|
2021
2027
|
props: {
|
|
2022
2028
|
size: { type: Number, default: 26 },
|
|
@@ -2045,11 +2051,11 @@ const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
|
|
|
2045
2051
|
return Me(this.name);
|
|
2046
2052
|
}
|
|
2047
2053
|
}
|
|
2048
|
-
},
|
|
2054
|
+
}, Kt = {
|
|
2049
2055
|
key: 0,
|
|
2050
2056
|
class: "wm-aiav__pulse"
|
|
2051
|
-
},
|
|
2052
|
-
function Gt(e, t, s,
|
|
2057
|
+
}, Wt = ["src", "alt"], $t = ["width", "height"];
|
|
2058
|
+
function Gt(e, t, s, r, i, n) {
|
|
2053
2059
|
return c(), d("div", {
|
|
2054
2060
|
class: R(["wm-aiav", { "wm-aiav--tail": s.tail }]),
|
|
2055
2061
|
style: z({
|
|
@@ -2058,8 +2064,8 @@ function Gt(e, t, s, i, a, n) {
|
|
|
2058
2064
|
"--wm-avr": s.size * 0.32 + "px"
|
|
2059
2065
|
})
|
|
2060
2066
|
}, [
|
|
2061
|
-
s.pulse ? (c(), d("div",
|
|
2062
|
-
|
|
2067
|
+
s.pulse ? (c(), d("div", Kt)) : k("", !0),
|
|
2068
|
+
l("div", {
|
|
2063
2069
|
class: R(["wm-aiav__inner", {
|
|
2064
2070
|
"wm-aiav__inner--glow": s.pulse,
|
|
2065
2071
|
"wm-aiav__inner--img": !!s.imageUrl,
|
|
@@ -2073,7 +2079,7 @@ function Gt(e, t, s, i, a, n) {
|
|
|
2073
2079
|
key: 0,
|
|
2074
2080
|
src: s.imageUrl,
|
|
2075
2081
|
alt: s.name || ""
|
|
2076
|
-
}, null, 8,
|
|
2082
|
+
}, null, 8, Wt)) : n.initials ? (c(), d("span", {
|
|
2077
2083
|
key: 1,
|
|
2078
2084
|
style: z({ fontSize: s.size * 0.36 + "px" })
|
|
2079
2085
|
}, v(n.initials), 5)) : (c(), d("svg", {
|
|
@@ -2084,30 +2090,30 @@ function Gt(e, t, s, i, a, n) {
|
|
|
2084
2090
|
fill: "none",
|
|
2085
2091
|
"aria-hidden": "true"
|
|
2086
2092
|
}, [...t[0] || (t[0] = [
|
|
2087
|
-
|
|
2093
|
+
l("path", {
|
|
2088
2094
|
d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
|
|
2089
2095
|
fill: "white",
|
|
2090
2096
|
opacity: "0.92"
|
|
2091
2097
|
}, null, -1),
|
|
2092
|
-
|
|
2098
|
+
l("circle", {
|
|
2093
2099
|
cx: "19",
|
|
2094
2100
|
cy: "5",
|
|
2095
2101
|
r: "1.5",
|
|
2096
2102
|
fill: "white",
|
|
2097
2103
|
opacity: "0.55"
|
|
2098
2104
|
}, null, -1),
|
|
2099
|
-
|
|
2105
|
+
l("circle", {
|
|
2100
2106
|
cx: "5",
|
|
2101
2107
|
cy: "18",
|
|
2102
2108
|
r: "1",
|
|
2103
2109
|
fill: "white",
|
|
2104
2110
|
opacity: "0.38"
|
|
2105
2111
|
}, null, -1)
|
|
2106
|
-
])], 8,
|
|
2112
|
+
])], 8, $t))
|
|
2107
2113
|
], 6)
|
|
2108
2114
|
], 6);
|
|
2109
2115
|
}
|
|
2110
|
-
const oe = /* @__PURE__ */
|
|
2116
|
+
const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
|
|
2111
2117
|
name: "WmTeamAvatars",
|
|
2112
2118
|
props: {
|
|
2113
2119
|
members: { type: Array, default: () => [] },
|
|
@@ -2136,32 +2142,32 @@ const oe = /* @__PURE__ */ P(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
|
|
|
2136
2142
|
key: 0,
|
|
2137
2143
|
class: "wm-team__label"
|
|
2138
2144
|
};
|
|
2139
|
-
function en(e, t, s,
|
|
2145
|
+
function en(e, t, s, r, i, n) {
|
|
2140
2146
|
return n.visible ? (c(), d("div", Jt, [
|
|
2141
|
-
|
|
2147
|
+
l("div", {
|
|
2142
2148
|
class: "wm-team__stack",
|
|
2143
2149
|
style: z({ width: n.stackWidth + "px" })
|
|
2144
2150
|
}, [
|
|
2145
|
-
(c(!0), d(I, null, j(s.members.slice(0, 3), (
|
|
2146
|
-
key:
|
|
2151
|
+
(c(!0), d(I, null, j(s.members.slice(0, 3), (a, o) => (c(), d("div", {
|
|
2152
|
+
key: o,
|
|
2147
2153
|
class: "wm-team__pill",
|
|
2148
2154
|
style: z({
|
|
2149
|
-
left:
|
|
2150
|
-
zIndex: 3 -
|
|
2151
|
-
background: n.colorFor(
|
|
2155
|
+
left: o * 13 + "px",
|
|
2156
|
+
zIndex: 3 - o,
|
|
2157
|
+
background: n.colorFor(a)
|
|
2152
2158
|
})
|
|
2153
2159
|
}, [
|
|
2154
|
-
|
|
2160
|
+
a.avatar_url ? (c(), d("img", {
|
|
2155
2161
|
key: 0,
|
|
2156
|
-
src:
|
|
2157
|
-
alt:
|
|
2158
|
-
}, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(
|
|
2162
|
+
src: a.avatar_url,
|
|
2163
|
+
alt: a.name || ""
|
|
2164
|
+
}, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(a)), 1))
|
|
2159
2165
|
], 4))), 128))
|
|
2160
2166
|
], 4),
|
|
2161
|
-
s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) :
|
|
2162
|
-
])) :
|
|
2167
|
+
s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : k("", !0)
|
|
2168
|
+
])) : k("", !0);
|
|
2163
2169
|
}
|
|
2164
|
-
const tn = /* @__PURE__ */
|
|
2170
|
+
const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
|
|
2165
2171
|
name: "WmHeader",
|
|
2166
2172
|
components: { AIAvatar: oe, TeamAvatars: tn },
|
|
2167
2173
|
inject: {
|
|
@@ -2195,8 +2201,8 @@ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
|
|
|
2195
2201
|
const e = Array.isArray(this.teamMembers) ? this.teamMembers : [];
|
|
2196
2202
|
if (e.length <= 3) return e;
|
|
2197
2203
|
const t = (/* @__PURE__ */ new Date()).getHours() % e.length, s = [];
|
|
2198
|
-
for (let
|
|
2199
|
-
s.push(e[(t +
|
|
2204
|
+
for (let r = 0; r < 3; r++)
|
|
2205
|
+
s.push(e[(t + r) % e.length]);
|
|
2200
2206
|
return s;
|
|
2201
2207
|
}
|
|
2202
2208
|
}
|
|
@@ -2207,8 +2213,8 @@ const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
|
|
|
2207
2213
|
key: 3,
|
|
2208
2214
|
class: "wm-header__fill"
|
|
2209
2215
|
}, un = { class: "wm-header__actions" }, hn = ["aria-label", "title"], mn = ["aria-label", "title"];
|
|
2210
|
-
function fn(e, t, s,
|
|
2211
|
-
const
|
|
2216
|
+
function fn(e, t, s, r, i, n) {
|
|
2217
|
+
const a = B("AIAvatar"), o = B("TeamAvatars");
|
|
2212
2218
|
return c(), d("div", sn, [
|
|
2213
2219
|
s.showBack ? (c(), d("button", {
|
|
2214
2220
|
key: 0,
|
|
@@ -2217,7 +2223,7 @@ function fn(e, t, s, i, a, n) {
|
|
|
2217
2223
|
"aria-label": n.t("header.backToHome"),
|
|
2218
2224
|
onClick: t[0] || (t[0] = (f) => e.$emit("back"))
|
|
2219
2225
|
}, [...t[3] || (t[3] = [
|
|
2220
|
-
|
|
2226
|
+
l("svg", {
|
|
2221
2227
|
width: "13",
|
|
2222
2228
|
height: "13",
|
|
2223
2229
|
viewBox: "0 0 24 24",
|
|
@@ -2228,27 +2234,27 @@ function fn(e, t, s, i, a, n) {
|
|
|
2228
2234
|
"stroke-linejoin": "round",
|
|
2229
2235
|
"aria-hidden": "true"
|
|
2230
2236
|
}, [
|
|
2231
|
-
|
|
2237
|
+
l("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2232
2238
|
], -1)
|
|
2233
2239
|
])], 8, rn)) : (c(), d("div", an)),
|
|
2234
2240
|
s.showIdentity ? (c(), d(I, { key: 2 }, [
|
|
2235
|
-
|
|
2236
|
-
|
|
2241
|
+
l("div", on, [
|
|
2242
|
+
K(a, {
|
|
2237
2243
|
size: 30,
|
|
2238
2244
|
name: s.agentName,
|
|
2239
2245
|
"image-url": s.agentAvatarUrl
|
|
2240
2246
|
}, null, 8, ["name", "image-url"])
|
|
2241
2247
|
]),
|
|
2242
|
-
|
|
2243
|
-
|
|
2248
|
+
l("div", ln, [
|
|
2249
|
+
l("div", cn, v(s.title), 1)
|
|
2244
2250
|
]),
|
|
2245
|
-
n.hasTeam ? (c(),
|
|
2251
|
+
n.hasTeam ? (c(), P(o, {
|
|
2246
2252
|
key: 0,
|
|
2247
2253
|
members: n.displayedTeamMembers,
|
|
2248
2254
|
"response-label": ""
|
|
2249
|
-
}, null, 8, ["members"])) :
|
|
2255
|
+
}, null, 8, ["members"])) : k("", !0)
|
|
2250
2256
|
], 64)) : (c(), d("div", dn)),
|
|
2251
|
-
|
|
2257
|
+
l("div", un, [
|
|
2252
2258
|
s.showMore ? (c(), d("button", {
|
|
2253
2259
|
key: 0,
|
|
2254
2260
|
type: "button",
|
|
@@ -2257,30 +2263,30 @@ function fn(e, t, s, i, a, n) {
|
|
|
2257
2263
|
title: n.t("header.moreOptions"),
|
|
2258
2264
|
onClick: t[1] || (t[1] = (f) => e.$emit("more"))
|
|
2259
2265
|
}, [...t[4] || (t[4] = [
|
|
2260
|
-
|
|
2266
|
+
l("svg", {
|
|
2261
2267
|
width: "13",
|
|
2262
2268
|
height: "13",
|
|
2263
2269
|
viewBox: "0 0 24 24",
|
|
2264
2270
|
fill: "currentColor",
|
|
2265
2271
|
"aria-hidden": "true"
|
|
2266
2272
|
}, [
|
|
2267
|
-
|
|
2273
|
+
l("circle", {
|
|
2268
2274
|
cx: "12",
|
|
2269
2275
|
cy: "5",
|
|
2270
2276
|
r: "1.6"
|
|
2271
2277
|
}),
|
|
2272
|
-
|
|
2278
|
+
l("circle", {
|
|
2273
2279
|
cx: "12",
|
|
2274
2280
|
cy: "12",
|
|
2275
2281
|
r: "1.6"
|
|
2276
2282
|
}),
|
|
2277
|
-
|
|
2283
|
+
l("circle", {
|
|
2278
2284
|
cx: "12",
|
|
2279
2285
|
cy: "19",
|
|
2280
2286
|
r: "1.6"
|
|
2281
2287
|
})
|
|
2282
2288
|
], -1)
|
|
2283
|
-
])], 10, hn)) :
|
|
2289
|
+
])], 10, hn)) : k("", !0),
|
|
2284
2290
|
s.showClose ? (c(), d("button", {
|
|
2285
2291
|
key: 1,
|
|
2286
2292
|
type: "button",
|
|
@@ -2289,7 +2295,7 @@ function fn(e, t, s, i, a, n) {
|
|
|
2289
2295
|
title: n.t("header.closeWidget"),
|
|
2290
2296
|
onClick: t[2] || (t[2] = (f) => e.$emit("close"))
|
|
2291
2297
|
}, [...t[5] || (t[5] = [
|
|
2292
|
-
|
|
2298
|
+
l("svg", {
|
|
2293
2299
|
width: "13",
|
|
2294
2300
|
height: "13",
|
|
2295
2301
|
viewBox: "0 0 24 24",
|
|
@@ -2300,13 +2306,13 @@ function fn(e, t, s, i, a, n) {
|
|
|
2300
2306
|
"stroke-linejoin": "round",
|
|
2301
2307
|
"aria-hidden": "true"
|
|
2302
2308
|
}, [
|
|
2303
|
-
|
|
2309
|
+
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2304
2310
|
], -1)
|
|
2305
|
-
])], 8, mn)) :
|
|
2311
|
+
])], 8, mn)) : k("", !0)
|
|
2306
2312
|
])
|
|
2307
2313
|
]);
|
|
2308
2314
|
}
|
|
2309
|
-
const _n = /* @__PURE__ */
|
|
2315
|
+
const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
|
|
2310
2316
|
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",
|
|
2311
2317
|
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",
|
|
2312
2318
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
@@ -2412,15 +2418,15 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2412
2418
|
if (!e) return "";
|
|
2413
2419
|
const t = new Date(e);
|
|
2414
2420
|
if (Number.isNaN(t.getTime())) return "";
|
|
2415
|
-
const s = ne(this.wmLocale()),
|
|
2416
|
-
if (t.toDateString() ===
|
|
2421
|
+
const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
|
|
2422
|
+
if (t.toDateString() === r.toDateString())
|
|
2417
2423
|
return t.toLocaleTimeString(s, {
|
|
2418
2424
|
hour: "2-digit",
|
|
2419
2425
|
minute: "2-digit"
|
|
2420
2426
|
});
|
|
2421
|
-
if (
|
|
2422
|
-
const
|
|
2423
|
-
return
|
|
2427
|
+
if (r.getTime() - t.getTime() < 7 * 864e5) {
|
|
2428
|
+
const a = t.toLocaleDateString(s, { weekday: "short" });
|
|
2429
|
+
return a.charAt(0).toUpperCase() + a.slice(1);
|
|
2424
2430
|
}
|
|
2425
2431
|
return t.toLocaleDateString(s, {
|
|
2426
2432
|
day: "2-digit",
|
|
@@ -2440,7 +2446,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2440
2446
|
}, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
|
|
2441
2447
|
key: 0,
|
|
2442
2448
|
class: "wm-onb__alert-time"
|
|
2443
|
-
}, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"],
|
|
2449
|
+
}, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Nn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Dn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
|
|
2444
2450
|
key: 1,
|
|
2445
2451
|
width: "18",
|
|
2446
2452
|
height: "18",
|
|
@@ -2463,7 +2469,7 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2463
2469
|
"stroke-linecap": "round",
|
|
2464
2470
|
"stroke-linejoin": "round",
|
|
2465
2471
|
"aria-hidden": "true"
|
|
2466
|
-
}, Vn = { class: "wm-onb__btn-icon" },
|
|
2472
|
+
}, Vn = { class: "wm-onb__btn-icon" }, Kn = {
|
|
2467
2473
|
width: "18",
|
|
2468
2474
|
height: "18",
|
|
2469
2475
|
viewBox: "0 0 24 24",
|
|
@@ -2473,12 +2479,12 @@ const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2473
2479
|
"stroke-linecap": "round",
|
|
2474
2480
|
"stroke-linejoin": "round",
|
|
2475
2481
|
"aria-hidden": "true"
|
|
2476
|
-
},
|
|
2477
|
-
function Yn(e, t, s,
|
|
2478
|
-
const
|
|
2482
|
+
}, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
|
|
2483
|
+
function Yn(e, t, s, r, i, n) {
|
|
2484
|
+
const a = B("AIAvatar");
|
|
2479
2485
|
return c(), d("div", pn, [
|
|
2480
|
-
|
|
2481
|
-
t[2] || (t[2] =
|
|
2486
|
+
l("div", vn, [
|
|
2487
|
+
t[2] || (t[2] = l("svg", {
|
|
2482
2488
|
class: "wm-onb__hero-deco",
|
|
2483
2489
|
width: "180",
|
|
2484
2490
|
height: "180",
|
|
@@ -2486,7 +2492,7 @@ function Yn(e, t, s, i, a, n) {
|
|
|
2486
2492
|
fill: "none",
|
|
2487
2493
|
"aria-hidden": "true"
|
|
2488
2494
|
}, [
|
|
2489
|
-
|
|
2495
|
+
l("circle", {
|
|
2490
2496
|
cx: "170",
|
|
2491
2497
|
cy: "10",
|
|
2492
2498
|
r: "105",
|
|
@@ -2495,7 +2501,7 @@ function Yn(e, t, s, i, a, n) {
|
|
|
2495
2501
|
"stroke-dasharray": "1 5",
|
|
2496
2502
|
opacity: "0.35"
|
|
2497
2503
|
}),
|
|
2498
|
-
|
|
2504
|
+
l("circle", {
|
|
2499
2505
|
cx: "170",
|
|
2500
2506
|
cy: "10",
|
|
2501
2507
|
r: "72",
|
|
@@ -2504,7 +2510,7 @@ function Yn(e, t, s, i, a, n) {
|
|
|
2504
2510
|
"stroke-dasharray": "1 5",
|
|
2505
2511
|
opacity: "0.5"
|
|
2506
2512
|
}),
|
|
2507
|
-
|
|
2513
|
+
l("circle", {
|
|
2508
2514
|
cx: "152",
|
|
2509
2515
|
cy: "34",
|
|
2510
2516
|
r: "2.5",
|
|
@@ -2512,27 +2518,27 @@ function Yn(e, t, s, i, a, n) {
|
|
|
2512
2518
|
opacity: "0.65"
|
|
2513
2519
|
})
|
|
2514
2520
|
], -1)),
|
|
2515
|
-
|
|
2521
|
+
K(a, {
|
|
2516
2522
|
size: 52,
|
|
2517
2523
|
"image-url": s.defaultIconUrl
|
|
2518
2524
|
}, null, 8, ["image-url"]),
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2525
|
+
l("div", yn, [
|
|
2526
|
+
l("div", wn, v(n.heroTitle), 1),
|
|
2527
|
+
l("div", bn, v(n.heroSub), 1)
|
|
2522
2528
|
])
|
|
2523
2529
|
]),
|
|
2524
2530
|
n.unreadThreads.length ? (c(), d("div", kn, [
|
|
2525
|
-
(c(!0), d(I, null, j(n.unreadThreads, (
|
|
2526
|
-
key:
|
|
2531
|
+
(c(!0), d(I, null, j(n.unreadThreads, (o) => (c(), d("button", {
|
|
2532
|
+
key: o.id,
|
|
2527
2533
|
type: "button",
|
|
2528
2534
|
class: "wm-onb__alert",
|
|
2529
|
-
onClick: (f) => e.$emit("resume",
|
|
2535
|
+
onClick: (f) => e.$emit("resume", o)
|
|
2530
2536
|
}, [
|
|
2531
|
-
|
|
2532
|
-
class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(
|
|
2537
|
+
l("span", {
|
|
2538
|
+
class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
|
|
2533
2539
|
}, [
|
|
2534
|
-
n.isDefaultAvatar(
|
|
2535
|
-
|
|
2540
|
+
n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[3] || (t[3] = [
|
|
2541
|
+
l("svg", {
|
|
2536
2542
|
width: "20",
|
|
2537
2543
|
height: "20",
|
|
2538
2544
|
viewBox: "0 0 24 24",
|
|
@@ -2543,41 +2549,41 @@ function Yn(e, t, s, i, a, n) {
|
|
|
2543
2549
|
"stroke-linejoin": "round",
|
|
2544
2550
|
"aria-hidden": "true"
|
|
2545
2551
|
}, [
|
|
2546
|
-
|
|
2552
|
+
l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
2547
2553
|
], -1)
|
|
2548
|
-
])])) : (c(),
|
|
2554
|
+
])])) : (c(), P(Ae(n.avatarComponent(o)), Fe({
|
|
2549
2555
|
key: 1,
|
|
2550
2556
|
ref_for: !0
|
|
2551
|
-
}, n.avatarProps(
|
|
2552
|
-
|
|
2557
|
+
}, n.avatarProps(o)), null, 16)),
|
|
2558
|
+
l("span", {
|
|
2553
2559
|
class: "wm-onb__alert-dot",
|
|
2554
2560
|
"aria-label": n.t("onboarding.unread")
|
|
2555
2561
|
}, null, 8, Sn)
|
|
2556
2562
|
], 2),
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
n.senderLabel(
|
|
2561
|
-
|
|
2562
|
-
innerHTML: n.renderPreview(
|
|
2563
|
+
l("span", Mn, [
|
|
2564
|
+
l("span", Tn, v(o.title), 1),
|
|
2565
|
+
l("span", xn, [
|
|
2566
|
+
n.senderLabel(o) ? (c(), d("span", On, v(n.senderLabel(o)) + " · ", 1)) : k("", !0),
|
|
2567
|
+
l("span", {
|
|
2568
|
+
innerHTML: n.renderPreview(o.preview)
|
|
2563
2569
|
}, null, 8, Rn)
|
|
2564
2570
|
])
|
|
2565
2571
|
]),
|
|
2566
|
-
|
|
2567
|
-
n.formatTs(
|
|
2568
|
-
|
|
2572
|
+
l("span", Ln, [
|
|
2573
|
+
n.formatTs(o._ts) ? (c(), d("span", In, v(n.formatTs(o._ts)), 1)) : k("", !0),
|
|
2574
|
+
l("span", En, v(n.t("onboarding.resume")), 1)
|
|
2569
2575
|
])
|
|
2570
2576
|
], 8, Cn))), 128))
|
|
2571
|
-
])) :
|
|
2572
|
-
|
|
2573
|
-
|
|
2577
|
+
])) : k("", !0),
|
|
2578
|
+
l("div", Bn, [
|
|
2579
|
+
l("button", {
|
|
2574
2580
|
type: "button",
|
|
2575
2581
|
class: "wm-onb__btn wm-onb__btn--start",
|
|
2576
2582
|
disabled: s.busy,
|
|
2577
|
-
onClick: t[0] || (t[0] = (
|
|
2583
|
+
onClick: t[0] || (t[0] = (o) => e.$emit("start"))
|
|
2578
2584
|
}, [
|
|
2579
|
-
t[4] || (t[4] =
|
|
2580
|
-
|
|
2585
|
+
t[4] || (t[4] = l("span", { class: "wm-onb__btn-icon" }, [
|
|
2586
|
+
l("svg", {
|
|
2581
2587
|
width: "18",
|
|
2582
2588
|
height: "18",
|
|
2583
2589
|
viewBox: "0 0 24 24",
|
|
@@ -2588,51 +2594,51 @@ function Yn(e, t, s, i, a, n) {
|
|
|
2588
2594
|
"stroke-linejoin": "round",
|
|
2589
2595
|
"aria-hidden": "true"
|
|
2590
2596
|
}, [
|
|
2591
|
-
|
|
2597
|
+
l("path", { d: "M12 5v14M5 12h14" })
|
|
2592
2598
|
])
|
|
2593
2599
|
], -1)),
|
|
2594
|
-
|
|
2600
|
+
l("span", Nn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
|
|
2595
2601
|
], 8, Pn),
|
|
2596
|
-
(c(!0), d(I, null, j(s.quickLinks, (
|
|
2602
|
+
(c(!0), d(I, null, j(s.quickLinks, (o, f) => (c(), d("button", {
|
|
2597
2603
|
key: "ql-" + f,
|
|
2598
2604
|
type: "button",
|
|
2599
2605
|
class: "wm-onb__btn",
|
|
2600
|
-
onClick: (
|
|
2606
|
+
onClick: (b) => e.$emit("select", o)
|
|
2601
2607
|
}, [
|
|
2602
|
-
|
|
2603
|
-
n.safeIconUrl(
|
|
2608
|
+
l("span", Dn, [
|
|
2609
|
+
n.safeIconUrl(o) ? (c(), d("span", {
|
|
2604
2610
|
key: 0,
|
|
2605
2611
|
class: "wm-onb__btn-iconImg",
|
|
2606
|
-
style: z(n.iconUrlStyle(
|
|
2612
|
+
style: z(n.iconUrlStyle(o)),
|
|
2607
2613
|
role: "img",
|
|
2608
|
-
"aria-label":
|
|
2614
|
+
"aria-label": o.label || ""
|
|
2609
2615
|
}, null, 12, jn)) : (c(), d("svg", Fn, [
|
|
2610
|
-
|
|
2611
|
-
d: n.iconPath(
|
|
2616
|
+
l("path", {
|
|
2617
|
+
d: n.iconPath(o.icon)
|
|
2612
2618
|
}, null, 8, Hn)
|
|
2613
2619
|
]))
|
|
2614
2620
|
]),
|
|
2615
|
-
|
|
2616
|
-
n.isExternalLink(
|
|
2617
|
-
|
|
2618
|
-
])])) :
|
|
2621
|
+
l("span", zn, v(o.label), 1),
|
|
2622
|
+
n.isExternalLink(o) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
|
|
2623
|
+
l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
|
|
2624
|
+
])])) : k("", !0)
|
|
2619
2625
|
], 8, Un))), 128)),
|
|
2620
2626
|
s.openThreads.length ? (c(), d("button", {
|
|
2621
2627
|
key: 0,
|
|
2622
2628
|
type: "button",
|
|
2623
2629
|
class: "wm-onb__btn",
|
|
2624
|
-
onClick: t[1] || (t[1] = (
|
|
2630
|
+
onClick: t[1] || (t[1] = (o) => e.$emit("view-history"))
|
|
2625
2631
|
}, [
|
|
2626
|
-
|
|
2627
|
-
(c(), d("svg",
|
|
2628
|
-
|
|
2632
|
+
l("span", Vn, [
|
|
2633
|
+
(c(), d("svg", Kn, [
|
|
2634
|
+
l("path", {
|
|
2629
2635
|
d: n.iconPath("chat")
|
|
2630
|
-
}, null, 8,
|
|
2636
|
+
}, null, 8, Wn)
|
|
2631
2637
|
]))
|
|
2632
2638
|
]),
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
t[6] || (t[6] =
|
|
2639
|
+
l("span", $n, v(n.t("onboarding.allConversations")), 1),
|
|
2640
|
+
l("span", Gn, v(s.openThreads.length), 1),
|
|
2641
|
+
t[6] || (t[6] = l("svg", {
|
|
2636
2642
|
class: "wm-onb__btn-trail",
|
|
2637
2643
|
width: "13",
|
|
2638
2644
|
height: "13",
|
|
@@ -2644,13 +2650,13 @@ function Yn(e, t, s, i, a, n) {
|
|
|
2644
2650
|
"stroke-linejoin": "round",
|
|
2645
2651
|
"aria-hidden": "true"
|
|
2646
2652
|
}, [
|
|
2647
|
-
|
|
2653
|
+
l("path", { d: "M9 18l6-6-6-6" })
|
|
2648
2654
|
], -1))
|
|
2649
|
-
])) :
|
|
2655
|
+
])) : k("", !0)
|
|
2650
2656
|
])
|
|
2651
2657
|
]);
|
|
2652
2658
|
}
|
|
2653
|
-
const Jn = /* @__PURE__ */
|
|
2659
|
+
const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
|
|
2654
2660
|
name: "WmHistory",
|
|
2655
2661
|
components: { AIAvatar: oe, HumanAvatar: ve },
|
|
2656
2662
|
inject: {
|
|
@@ -2703,15 +2709,15 @@ const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
|
|
|
2703
2709
|
if (!e) return "";
|
|
2704
2710
|
const t = new Date(e);
|
|
2705
2711
|
if (Number.isNaN(t.getTime())) return "";
|
|
2706
|
-
const s = ne(this.wmLocale()),
|
|
2707
|
-
if (t.toDateString() ===
|
|
2712
|
+
const s = ne(this.wmLocale()), r = /* @__PURE__ */ new Date();
|
|
2713
|
+
if (t.toDateString() === r.toDateString())
|
|
2708
2714
|
return t.toLocaleTimeString(s, {
|
|
2709
2715
|
hour: "2-digit",
|
|
2710
2716
|
minute: "2-digit"
|
|
2711
2717
|
});
|
|
2712
|
-
if (
|
|
2713
|
-
const
|
|
2714
|
-
return
|
|
2718
|
+
if (r.getTime() - t.getTime() < 7 * 864e5) {
|
|
2719
|
+
const a = t.toLocaleDateString(s, { weekday: "short" });
|
|
2720
|
+
return a.charAt(0).toUpperCase() + a.slice(1);
|
|
2715
2721
|
}
|
|
2716
2722
|
return t.toLocaleDateString(s, {
|
|
2717
2723
|
day: "2-digit",
|
|
@@ -2729,11 +2735,11 @@ const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
|
|
|
2729
2735
|
key: 0,
|
|
2730
2736
|
class: "wm-hist__empty"
|
|
2731
2737
|
};
|
|
2732
|
-
function us(e, t, s,
|
|
2738
|
+
function us(e, t, s, r, i, n) {
|
|
2733
2739
|
return c(), d("div", Qn, [
|
|
2734
|
-
|
|
2735
|
-
t[1] || (t[1] =
|
|
2736
|
-
|
|
2740
|
+
l("div", Zn, [
|
|
2741
|
+
t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
|
|
2742
|
+
l("svg", {
|
|
2737
2743
|
width: "13",
|
|
2738
2744
|
height: "13",
|
|
2739
2745
|
viewBox: "0 0 24 24",
|
|
@@ -2744,30 +2750,30 @@ function us(e, t, s, i, a, n) {
|
|
|
2744
2750
|
"stroke-linejoin": "round",
|
|
2745
2751
|
"aria-hidden": "true"
|
|
2746
2752
|
}, [
|
|
2747
|
-
|
|
2753
|
+
l("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
2748
2754
|
])
|
|
2749
2755
|
], -1)),
|
|
2750
|
-
G(
|
|
2751
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
2756
|
+
G(l("input", {
|
|
2757
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => i.query = a),
|
|
2752
2758
|
type: "text",
|
|
2753
2759
|
placeholder: n.t("onboarding.search"),
|
|
2754
2760
|
"aria-label": n.t("onboarding.search")
|
|
2755
2761
|
}, null, 8, es), [
|
|
2756
|
-
[te,
|
|
2762
|
+
[te, i.query]
|
|
2757
2763
|
])
|
|
2758
2764
|
]),
|
|
2759
|
-
|
|
2760
|
-
(c(!0), d(I, null, j(n.filteredThreads, (
|
|
2761
|
-
key:
|
|
2765
|
+
l("div", ts, [
|
|
2766
|
+
(c(!0), d(I, null, j(n.filteredThreads, (a) => (c(), d("button", {
|
|
2767
|
+
key: a.id,
|
|
2762
2768
|
type: "button",
|
|
2763
|
-
class: R(["wm-hist__thread", { "wm-hist__thread--unread":
|
|
2764
|
-
onClick: (
|
|
2769
|
+
class: R(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
|
|
2770
|
+
onClick: (o) => e.$emit("resume", a)
|
|
2765
2771
|
}, [
|
|
2766
|
-
|
|
2767
|
-
class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(
|
|
2772
|
+
l("span", {
|
|
2773
|
+
class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
|
|
2768
2774
|
}, [
|
|
2769
|
-
n.isDefaultAvatar(
|
|
2770
|
-
|
|
2775
|
+
n.isDefaultAvatar(a) ? (c(), d("span", ss, [...t[2] || (t[2] = [
|
|
2776
|
+
l("svg", {
|
|
2771
2777
|
width: "18",
|
|
2772
2778
|
height: "18",
|
|
2773
2779
|
viewBox: "0 0 24 24",
|
|
@@ -2778,28 +2784,28 @@ function us(e, t, s, i, a, n) {
|
|
|
2778
2784
|
"stroke-linejoin": "round",
|
|
2779
2785
|
"aria-hidden": "true"
|
|
2780
2786
|
}, [
|
|
2781
|
-
|
|
2787
|
+
l("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
|
|
2782
2788
|
], -1)
|
|
2783
|
-
])])) : (c(),
|
|
2789
|
+
])])) : (c(), P(Ae(n.avatarComponent(a)), Fe({
|
|
2784
2790
|
key: 1,
|
|
2785
2791
|
ref_for: !0
|
|
2786
|
-
}, n.avatarProps(
|
|
2787
|
-
|
|
2792
|
+
}, n.avatarProps(a)), null, 16)),
|
|
2793
|
+
a.unread ? (c(), d("span", {
|
|
2788
2794
|
key: 2,
|
|
2789
2795
|
class: "wm-hist__thread-dot",
|
|
2790
2796
|
"aria-label": n.t("onboarding.unread")
|
|
2791
|
-
}, null, 8, rs)) :
|
|
2797
|
+
}, null, 8, rs)) : k("", !0)
|
|
2792
2798
|
], 2),
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2799
|
+
l("span", is, [
|
|
2800
|
+
l("span", as, v(a.title), 1),
|
|
2801
|
+
l("span", {
|
|
2796
2802
|
class: "wm-hist__thread-preview",
|
|
2797
|
-
innerHTML: n.renderPreview(
|
|
2803
|
+
innerHTML: n.renderPreview(a.preview)
|
|
2798
2804
|
}, null, 8, os)
|
|
2799
2805
|
]),
|
|
2800
|
-
|
|
2801
|
-
n.formatTs(
|
|
2802
|
-
t[3] || (t[3] =
|
|
2806
|
+
l("span", ls, [
|
|
2807
|
+
n.formatTs(a._ts) ? (c(), d("span", cs, v(n.formatTs(a._ts)), 1)) : k("", !0),
|
|
2808
|
+
t[3] || (t[3] = l("svg", {
|
|
2803
2809
|
width: "14",
|
|
2804
2810
|
height: "14",
|
|
2805
2811
|
viewBox: "0 0 24 24",
|
|
@@ -2811,15 +2817,15 @@ function us(e, t, s, i, a, n) {
|
|
|
2811
2817
|
class: "wm-hist__thread-chev",
|
|
2812
2818
|
"aria-hidden": "true"
|
|
2813
2819
|
}, [
|
|
2814
|
-
|
|
2820
|
+
l("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2815
2821
|
], -1))
|
|
2816
2822
|
])
|
|
2817
2823
|
], 10, ns))), 128)),
|
|
2818
|
-
n.filteredThreads.length ?
|
|
2824
|
+
n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, v(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
|
|
2819
2825
|
])
|
|
2820
2826
|
]);
|
|
2821
2827
|
}
|
|
2822
|
-
const hs = /* @__PURE__ */
|
|
2828
|
+
const hs = /* @__PURE__ */ N(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
|
|
2823
2829
|
function ms(e) {
|
|
2824
2830
|
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();
|
|
2825
2831
|
}
|
|
@@ -2880,31 +2886,31 @@ const fs = {
|
|
|
2880
2886
|
"stroke-linecap": "round",
|
|
2881
2887
|
"stroke-linejoin": "round"
|
|
2882
2888
|
}, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
|
|
2883
|
-
function Cs(e, t, s,
|
|
2889
|
+
function Cs(e, t, s, r, i, n) {
|
|
2884
2890
|
return c(), d("div", {
|
|
2885
2891
|
class: R(["wm-result", `wm-result--${s.state}`])
|
|
2886
2892
|
}, [
|
|
2887
|
-
|
|
2893
|
+
l("span", _s, [
|
|
2888
2894
|
s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
|
|
2889
|
-
|
|
2895
|
+
l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2890
2896
|
])])) : s.state === "rejected" ? (c(), d("svg", ps, [...t[1] || (t[1] = [
|
|
2891
|
-
|
|
2897
|
+
l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2892
2898
|
])])) : s.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
|
|
2893
|
-
|
|
2899
|
+
l("circle", {
|
|
2894
2900
|
cx: "12",
|
|
2895
2901
|
cy: "12",
|
|
2896
2902
|
r: "10"
|
|
2897
2903
|
}, null, -1),
|
|
2898
|
-
|
|
2904
|
+
l("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2899
2905
|
])])) : (c(), d("svg", ys, [...t[3] || (t[3] = [
|
|
2900
|
-
|
|
2901
|
-
|
|
2906
|
+
l("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),
|
|
2907
|
+
l("line", {
|
|
2902
2908
|
x1: "12",
|
|
2903
2909
|
y1: "9",
|
|
2904
2910
|
x2: "12",
|
|
2905
2911
|
y2: "13"
|
|
2906
2912
|
}, null, -1),
|
|
2907
|
-
|
|
2913
|
+
l("line", {
|
|
2908
2914
|
x1: "12",
|
|
2909
2915
|
y1: "17",
|
|
2910
2916
|
x2: "12.01",
|
|
@@ -2912,19 +2918,19 @@ function Cs(e, t, s, i, a, n) {
|
|
|
2912
2918
|
}, null, -1)
|
|
2913
2919
|
])]))
|
|
2914
2920
|
]),
|
|
2915
|
-
|
|
2916
|
-
|
|
2921
|
+
l("span", ws, [
|
|
2922
|
+
l("span", bs, v(s.label), 1),
|
|
2917
2923
|
n.detailText ? (c(), d(I, { key: 0 }, [
|
|
2918
|
-
t[4] || (t[4] =
|
|
2924
|
+
t[4] || (t[4] = l("span", {
|
|
2919
2925
|
class: "wm-result__sep",
|
|
2920
2926
|
"aria-hidden": "true"
|
|
2921
2927
|
}, " · ", -1)),
|
|
2922
|
-
|
|
2923
|
-
], 64)) :
|
|
2928
|
+
l("span", ks, v(n.detailText), 1)
|
|
2929
|
+
], 64)) : k("", !0)
|
|
2924
2930
|
])
|
|
2925
2931
|
], 2);
|
|
2926
2932
|
}
|
|
2927
|
-
const As = /* @__PURE__ */
|
|
2933
|
+
const As = /* @__PURE__ */ N(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
|
|
2928
2934
|
name: "WmArtifactFormResponse",
|
|
2929
2935
|
inject: {
|
|
2930
2936
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -2941,12 +2947,12 @@ const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
|
|
|
2941
2947
|
}
|
|
2942
2948
|
}
|
|
2943
2949
|
}, Ms = { class: "wm-art wm-art--formResponse" }, Ts = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
|
|
2944
|
-
function Is(e, t, s,
|
|
2950
|
+
function Is(e, t, s, r, i, n) {
|
|
2945
2951
|
return c(), d("div", Ms, [
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
t[0] || (t[0] =
|
|
2952
|
+
l("div", Ts, [
|
|
2953
|
+
l("div", xs, v(s.data.title || n.t("form.title")), 1),
|
|
2954
|
+
l("span", Os, [
|
|
2955
|
+
t[0] || (t[0] = l("svg", {
|
|
2950
2956
|
width: "11",
|
|
2951
2957
|
height: "11",
|
|
2952
2958
|
viewBox: "0 0 24 24",
|
|
@@ -2957,28 +2963,28 @@ function Is(e, t, s, i, a, n) {
|
|
|
2957
2963
|
"stroke-linejoin": "round",
|
|
2958
2964
|
"aria-hidden": "true"
|
|
2959
2965
|
}, [
|
|
2960
|
-
|
|
2966
|
+
l("polyline", { points: "20 6 9 17 4 12" })
|
|
2961
2967
|
], -1)),
|
|
2962
2968
|
Se(" " + v(n.t("form.sent")), 1)
|
|
2963
2969
|
])
|
|
2964
2970
|
]),
|
|
2965
|
-
|
|
2966
|
-
(c(!0), d(I, null, j(n.fields, (
|
|
2967
|
-
key:
|
|
2971
|
+
l("div", Rs, [
|
|
2972
|
+
(c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
|
|
2973
|
+
key: o,
|
|
2968
2974
|
class: "wm-art__field"
|
|
2969
2975
|
}, [
|
|
2970
|
-
|
|
2971
|
-
|
|
2976
|
+
l("div", Ls, v(a.label), 1),
|
|
2977
|
+
l("div", {
|
|
2972
2978
|
class: R([
|
|
2973
2979
|
"wm-art__fieldValue",
|
|
2974
|
-
{ "wm-art__fieldValue--multi":
|
|
2980
|
+
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2975
2981
|
])
|
|
2976
|
-
}, v(
|
|
2982
|
+
}, v(a.value), 3)
|
|
2977
2983
|
]))), 128))
|
|
2978
2984
|
])
|
|
2979
2985
|
]);
|
|
2980
2986
|
}
|
|
2981
|
-
const Es = /* @__PURE__ */
|
|
2987
|
+
const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
|
|
2982
2988
|
name: "WmArtifactInfoCard",
|
|
2983
2989
|
props: {
|
|
2984
2990
|
data: { type: Object, required: !0 }
|
|
@@ -2993,10 +2999,10 @@ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
|
|
|
2993
2999
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
2994
3000
|
}
|
|
2995
3001
|
}
|
|
2996
|
-
}, Ps = { class: "wm-art wm-art--infoCard" },
|
|
3002
|
+
}, Ps = { class: "wm-art wm-art--infoCard" }, Ns = {
|
|
2997
3003
|
key: 0,
|
|
2998
3004
|
class: "wm-art__image"
|
|
2999
|
-
}, Us = ["src", "alt"],
|
|
3005
|
+
}, Us = ["src", "alt"], Ds = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
|
|
3000
3006
|
key: 0,
|
|
3001
3007
|
class: "wm-art__subtitle"
|
|
3002
3008
|
}, zs = {
|
|
@@ -3006,19 +3012,19 @@ const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
|
|
|
3006
3012
|
key: 0,
|
|
3007
3013
|
class: "wm-art__text"
|
|
3008
3014
|
}, Vs = { class: "wm-art__fieldLabel" };
|
|
3009
|
-
function
|
|
3015
|
+
function Ks(e, t, s, r, i, n) {
|
|
3010
3016
|
return c(), d("div", Ps, [
|
|
3011
|
-
s.data.image_url ? (c(), d("figure",
|
|
3012
|
-
|
|
3017
|
+
s.data.image_url ? (c(), d("figure", Ns, [
|
|
3018
|
+
l("img", {
|
|
3013
3019
|
src: s.data.image_url,
|
|
3014
3020
|
alt: s.data.title || "",
|
|
3015
3021
|
loading: "lazy"
|
|
3016
3022
|
}, null, 8, Us)
|
|
3017
|
-
])) :
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) :
|
|
3023
|
+
])) : k("", !0),
|
|
3024
|
+
l("div", Ds, [
|
|
3025
|
+
l("div", js, [
|
|
3026
|
+
l("div", Fs, v(s.data.title), 1),
|
|
3027
|
+
s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) : k("", !0)
|
|
3022
3028
|
]),
|
|
3023
3029
|
s.data.badge && s.data.badge.label ? (c(), d("span", {
|
|
3024
3030
|
key: 0,
|
|
@@ -3026,39 +3032,39 @@ function $s(e, t, s, i, a, n) {
|
|
|
3026
3032
|
"wm-art__badge",
|
|
3027
3033
|
`wm-art__badge--${s.data.badge.tone || "neutral"}`
|
|
3028
3034
|
])
|
|
3029
|
-
}, v(s.data.badge.label), 3)) :
|
|
3035
|
+
}, v(s.data.badge.label), 3)) : k("", !0)
|
|
3030
3036
|
]),
|
|
3031
3037
|
n.hasBody ? (c(), d("div", zs, [
|
|
3032
|
-
s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) :
|
|
3033
|
-
n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (
|
|
3034
|
-
key:
|
|
3038
|
+
s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) : k("", !0),
|
|
3039
|
+
n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (a, o) => (c(), d("div", {
|
|
3040
|
+
key: o,
|
|
3035
3041
|
class: "wm-art__field"
|
|
3036
3042
|
}, [
|
|
3037
|
-
|
|
3038
|
-
|
|
3043
|
+
l("div", Vs, v(a.label), 1),
|
|
3044
|
+
l("div", {
|
|
3039
3045
|
class: R([
|
|
3040
3046
|
"wm-art__fieldValue",
|
|
3041
|
-
{ "wm-art__fieldValue--multi":
|
|
3047
|
+
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3042
3048
|
])
|
|
3043
|
-
}, v(
|
|
3044
|
-
]))), 128)) :
|
|
3045
|
-
])) :
|
|
3049
|
+
}, v(a.value), 3)
|
|
3050
|
+
]))), 128)) : k("", !0)
|
|
3051
|
+
])) : k("", !0)
|
|
3046
3052
|
]);
|
|
3047
3053
|
}
|
|
3048
|
-
const
|
|
3049
|
-
function
|
|
3054
|
+
const Ws = /* @__PURE__ */ N(Bs, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
3055
|
+
function $s(e, t, s) {
|
|
3050
3056
|
if (!e) return "";
|
|
3051
|
-
const
|
|
3052
|
-
if (Number.isNaN(
|
|
3053
|
-
const
|
|
3057
|
+
const r = new Date(e);
|
|
3058
|
+
if (Number.isNaN(r.getTime())) return e;
|
|
3059
|
+
const i = r.toLocaleDateString(t, {
|
|
3054
3060
|
day: "numeric",
|
|
3055
3061
|
month: "long",
|
|
3056
3062
|
year: "numeric"
|
|
3057
|
-
}), n =
|
|
3063
|
+
}), n = r.toLocaleTimeString(t, {
|
|
3058
3064
|
hour: "2-digit",
|
|
3059
3065
|
minute: "2-digit"
|
|
3060
3066
|
});
|
|
3061
|
-
return `${
|
|
3067
|
+
return `${i}${s}${n}`;
|
|
3062
3068
|
}
|
|
3063
3069
|
const Gs = {
|
|
3064
3070
|
name: "WmArtifactTicket",
|
|
@@ -3078,7 +3084,7 @@ const Gs = {
|
|
|
3078
3084
|
},
|
|
3079
3085
|
formattedDate() {
|
|
3080
3086
|
var e;
|
|
3081
|
-
return
|
|
3087
|
+
return $s(
|
|
3082
3088
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
3083
3089
|
ne(this.wmLocale()),
|
|
3084
3090
|
this.t("ticket.dateAt")
|
|
@@ -3128,13 +3134,13 @@ const Gs = {
|
|
|
3128
3134
|
key: 1,
|
|
3129
3135
|
class: "wm-art__footer wm-tk__footer"
|
|
3130
3136
|
};
|
|
3131
|
-
function ar(e, t, s,
|
|
3137
|
+
function ar(e, t, s, r, i, n) {
|
|
3132
3138
|
return c(), d("div", Ys, [
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
t[0] || (t[0] =
|
|
3139
|
+
l("div", Js, [
|
|
3140
|
+
l("div", Xs, v(s.data.title), 1),
|
|
3141
|
+
l("div", Qs, [
|
|
3142
|
+
l("div", Zs, [
|
|
3143
|
+
t[0] || (t[0] = l("svg", {
|
|
3138
3144
|
width: "11",
|
|
3139
3145
|
height: "11",
|
|
3140
3146
|
viewBox: "0 0 24 24",
|
|
@@ -3145,85 +3151,85 @@ function ar(e, t, s, i, a, n) {
|
|
|
3145
3151
|
"stroke-linejoin": "round",
|
|
3146
3152
|
"aria-hidden": "true"
|
|
3147
3153
|
}, [
|
|
3148
|
-
|
|
3149
|
-
|
|
3154
|
+
l("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" }),
|
|
3155
|
+
l("path", { d: "M13 5v2M13 17v2M13 11v2" })
|
|
3150
3156
|
], -1)),
|
|
3151
|
-
|
|
3157
|
+
l("span", null, v(s.data.reference), 1)
|
|
3152
3158
|
]),
|
|
3153
|
-
|
|
3159
|
+
l("span", {
|
|
3154
3160
|
class: R([
|
|
3155
3161
|
"wm-art__badge",
|
|
3156
3162
|
"wm-tk__badge",
|
|
3157
3163
|
`wm-art__badge--${s.data.status.tone || "neutral"}`
|
|
3158
3164
|
])
|
|
3159
3165
|
}, [
|
|
3160
|
-
t[1] || (t[1] =
|
|
3166
|
+
t[1] || (t[1] = l("span", {
|
|
3161
3167
|
class: "wm-tk__dot",
|
|
3162
3168
|
"aria-hidden": "true"
|
|
3163
3169
|
}, null, -1)),
|
|
3164
3170
|
Se(" " + v(s.data.status.label), 1)
|
|
3165
3171
|
], 2)
|
|
3166
3172
|
]),
|
|
3167
|
-
s.data.body ? (c(), d("div", er, v(s.data.body), 1)) :
|
|
3173
|
+
s.data.body ? (c(), d("div", er, v(s.data.body), 1)) : k("", !0)
|
|
3168
3174
|
]),
|
|
3169
3175
|
n.fields.length ? (c(), d("div", tr, [
|
|
3170
|
-
(c(!0), d(I, null, j(n.fields, (
|
|
3171
|
-
key:
|
|
3176
|
+
(c(!0), d(I, null, j(n.fields, (a, o) => (c(), d("div", {
|
|
3177
|
+
key: o,
|
|
3172
3178
|
class: "wm-art__field"
|
|
3173
3179
|
}, [
|
|
3174
|
-
|
|
3175
|
-
|
|
3180
|
+
l("div", nr, v(a.label), 1),
|
|
3181
|
+
l("div", {
|
|
3176
3182
|
class: R([
|
|
3177
3183
|
"wm-art__fieldValue",
|
|
3178
|
-
{ "wm-art__fieldValue--multi":
|
|
3184
|
+
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3179
3185
|
])
|
|
3180
3186
|
}, [
|
|
3181
|
-
n.isPriority(
|
|
3187
|
+
n.isPriority(a.label) ? (c(), d("svg", {
|
|
3182
3188
|
key: 0,
|
|
3183
3189
|
class: "wm-tk__prio",
|
|
3184
|
-
"data-level": n.priorityLevel(
|
|
3190
|
+
"data-level": n.priorityLevel(a.value),
|
|
3185
3191
|
width: "12",
|
|
3186
3192
|
height: "12",
|
|
3187
3193
|
viewBox: "0 0 12 12",
|
|
3188
3194
|
"aria-hidden": "true"
|
|
3189
3195
|
}, [...t[2] || (t[2] = [
|
|
3190
|
-
|
|
3196
|
+
l("rect", {
|
|
3191
3197
|
x: "1",
|
|
3192
3198
|
y: "8",
|
|
3193
3199
|
width: "2",
|
|
3194
3200
|
height: "3",
|
|
3195
3201
|
rx: "0.5"
|
|
3196
3202
|
}, null, -1),
|
|
3197
|
-
|
|
3203
|
+
l("rect", {
|
|
3198
3204
|
x: "5",
|
|
3199
3205
|
y: "5",
|
|
3200
3206
|
width: "2",
|
|
3201
3207
|
height: "6",
|
|
3202
3208
|
rx: "0.5"
|
|
3203
3209
|
}, null, -1),
|
|
3204
|
-
|
|
3210
|
+
l("rect", {
|
|
3205
3211
|
x: "9",
|
|
3206
3212
|
y: "2",
|
|
3207
3213
|
width: "2",
|
|
3208
3214
|
height: "9",
|
|
3209
3215
|
rx: "0.5"
|
|
3210
3216
|
}, null, -1)
|
|
3211
|
-
])], 8, sr)) : n.isDate(
|
|
3212
|
-
|
|
3217
|
+
])], 8, sr)) : n.isDate(a.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
|
|
3218
|
+
l("rect", {
|
|
3213
3219
|
x: "3",
|
|
3214
3220
|
y: "4",
|
|
3215
3221
|
width: "18",
|
|
3216
3222
|
height: "18",
|
|
3217
3223
|
rx: "2"
|
|
3218
3224
|
}, null, -1),
|
|
3219
|
-
|
|
3220
|
-
])])) :
|
|
3221
|
-
|
|
3225
|
+
l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
3226
|
+
])])) : k("", !0),
|
|
3227
|
+
l("span", null, v(a.value), 1)
|
|
3222
3228
|
], 2)
|
|
3223
3229
|
]))), 128))
|
|
3224
|
-
])) :
|
|
3230
|
+
])) : k("", !0),
|
|
3225
3231
|
s.data.created_at ? (c(), d("div", ir, [
|
|
3226
|
-
t[4] || (t[4] =
|
|
3232
|
+
t[4] || (t[4] = l("svg", {
|
|
3227
3233
|
width: "11",
|
|
3228
3234
|
height: "11",
|
|
3229
3235
|
viewBox: "0 0 24 24",
|
|
@@ -3234,22 +3240,22 @@ function ar(e, t, s, i, a, n) {
|
|
|
3234
3240
|
"stroke-linejoin": "round",
|
|
3235
3241
|
"aria-hidden": "true"
|
|
3236
3242
|
}, [
|
|
3237
|
-
|
|
3243
|
+
l("rect", {
|
|
3238
3244
|
x: "3",
|
|
3239
3245
|
y: "4",
|
|
3240
3246
|
width: "18",
|
|
3241
3247
|
height: "18",
|
|
3242
3248
|
rx: "2"
|
|
3243
3249
|
}),
|
|
3244
|
-
|
|
3250
|
+
l("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
3245
3251
|
], -1)),
|
|
3246
|
-
|
|
3247
|
-
])) :
|
|
3252
|
+
l("span", null, v(n.formattedDate), 1)
|
|
3253
|
+
])) : k("", !0)
|
|
3248
3254
|
]);
|
|
3249
3255
|
}
|
|
3250
|
-
const or = /* @__PURE__ */
|
|
3256
|
+
const or = /* @__PURE__ */ N(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
|
|
3251
3257
|
form_response: Es,
|
|
3252
|
-
info_card:
|
|
3258
|
+
info_card: Ws,
|
|
3253
3259
|
ticket: or
|
|
3254
3260
|
}, cr = {
|
|
3255
3261
|
name: "WmArtifactRenderer",
|
|
@@ -3266,13 +3272,13 @@ const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914
|
|
|
3266
3272
|
}
|
|
3267
3273
|
}
|
|
3268
3274
|
};
|
|
3269
|
-
function dr(e, t, s,
|
|
3270
|
-
return n.component ? (c(),
|
|
3275
|
+
function dr(e, t, s, r, i, n) {
|
|
3276
|
+
return n.component ? (c(), P(Ae(n.component), {
|
|
3271
3277
|
key: 0,
|
|
3272
3278
|
data: s.artifact.data
|
|
3273
|
-
}, null, 8, ["data"])) :
|
|
3279
|
+
}, null, 8, ["data"])) : k("", !0);
|
|
3274
3280
|
}
|
|
3275
|
-
const ur = /* @__PURE__ */
|
|
3281
|
+
const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
|
|
3276
3282
|
name: "WmAttachmentPreview",
|
|
3277
3283
|
inject: {
|
|
3278
3284
|
signAttachmentFn: { default: null },
|
|
@@ -3288,10 +3294,10 @@ const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
|
|
|
3288
3294
|
},
|
|
3289
3295
|
computed: {
|
|
3290
3296
|
kind() {
|
|
3291
|
-
var s,
|
|
3297
|
+
var s, r;
|
|
3292
3298
|
const e = (s = this.attachment) == null ? void 0 : s.type;
|
|
3293
3299
|
if (e) return e;
|
|
3294
|
-
const t = (((
|
|
3300
|
+
const t = (((r = this.attachment) == null ? void 0 : r.mime_type) || "").toLowerCase();
|
|
3295
3301
|
return t.startsWith("image/") ? "image" : t.startsWith("audio/") ? "audio" : t.startsWith("video/") ? "video" : "file";
|
|
3296
3302
|
},
|
|
3297
3303
|
displayName() {
|
|
@@ -3348,30 +3354,30 @@ const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
|
|
|
3348
3354
|
class: "wm-att__spin",
|
|
3349
3355
|
"aria-hidden": "true"
|
|
3350
3356
|
};
|
|
3351
|
-
function kr(e, t, s,
|
|
3357
|
+
function kr(e, t, s, r, i, n) {
|
|
3352
3358
|
return c(), d("div", {
|
|
3353
3359
|
class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
|
|
3354
3360
|
}, [
|
|
3355
|
-
n.kind === "image" &&
|
|
3361
|
+
n.kind === "image" && i.url ? (c(), d("a", {
|
|
3356
3362
|
key: 0,
|
|
3357
3363
|
href: n.safeHref,
|
|
3358
3364
|
target: "_blank",
|
|
3359
3365
|
rel: "noopener",
|
|
3360
3366
|
class: "wm-att__imgWrap"
|
|
3361
3367
|
}, [
|
|
3362
|
-
|
|
3363
|
-
src:
|
|
3368
|
+
l("img", {
|
|
3369
|
+
src: i.url,
|
|
3364
3370
|
alt: n.displayName,
|
|
3365
3371
|
loading: "lazy"
|
|
3366
3372
|
}, null, 8, fr)
|
|
3367
|
-
], 8, mr)) : n.kind === "audio" &&
|
|
3373
|
+
], 8, mr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
|
|
3368
3374
|
key: 1,
|
|
3369
|
-
src:
|
|
3375
|
+
src: i.url,
|
|
3370
3376
|
controls: "",
|
|
3371
3377
|
preload: "metadata"
|
|
3372
|
-
}, null, 8, _r)) : n.kind === "video" &&
|
|
3378
|
+
}, null, 8, _r)) : n.kind === "video" && i.url ? (c(), d("video", {
|
|
3373
3379
|
key: 2,
|
|
3374
|
-
src:
|
|
3380
|
+
src: i.url,
|
|
3375
3381
|
controls: "",
|
|
3376
3382
|
playsinline: "",
|
|
3377
3383
|
preload: "auto"
|
|
@@ -3382,10 +3388,10 @@ function kr(e, t, s, i, a, n) {
|
|
|
3382
3388
|
download: n.displayName,
|
|
3383
3389
|
target: "_blank",
|
|
3384
3390
|
rel: "noopener",
|
|
3385
|
-
onClick: t[0] || (t[0] = (...
|
|
3391
|
+
onClick: t[0] || (t[0] = (...a) => n.onFileClick && n.onFileClick(...a))
|
|
3386
3392
|
}, [
|
|
3387
|
-
t[1] || (t[1] =
|
|
3388
|
-
|
|
3393
|
+
t[1] || (t[1] = l("span", { class: "wm-att__icon" }, [
|
|
3394
|
+
l("svg", {
|
|
3389
3395
|
width: "14",
|
|
3390
3396
|
height: "14",
|
|
3391
3397
|
viewBox: "0 0 24 24",
|
|
@@ -3396,19 +3402,19 @@ function kr(e, t, s, i, a, n) {
|
|
|
3396
3402
|
"stroke-linejoin": "round",
|
|
3397
3403
|
"aria-hidden": "true"
|
|
3398
3404
|
}, [
|
|
3399
|
-
|
|
3400
|
-
|
|
3405
|
+
l("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
|
|
3406
|
+
l("path", { d: "M14 2v6h6" })
|
|
3401
3407
|
])
|
|
3402
3408
|
], -1)),
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) :
|
|
3409
|
+
l("span", vr, [
|
|
3410
|
+
l("span", yr, v(n.displayName), 1),
|
|
3411
|
+
n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) : k("", !0)
|
|
3406
3412
|
]),
|
|
3407
|
-
|
|
3413
|
+
i.loading ? (c(), d("span", br)) : k("", !0)
|
|
3408
3414
|
], 8, pr))
|
|
3409
3415
|
], 2);
|
|
3410
3416
|
}
|
|
3411
|
-
const Cr = /* @__PURE__ */
|
|
3417
|
+
const Cr = /* @__PURE__ */ N(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
|
|
3412
3418
|
name: "WmBubble",
|
|
3413
3419
|
props: {
|
|
3414
3420
|
role: { type: String, default: "ai" },
|
|
@@ -3421,24 +3427,24 @@ const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd
|
|
|
3421
3427
|
}
|
|
3422
3428
|
}
|
|
3423
3429
|
}, Sr = ["innerHTML"];
|
|
3424
|
-
function Mr(e, t, s,
|
|
3430
|
+
function Mr(e, t, s, r, i, n) {
|
|
3425
3431
|
return c(), d("div", {
|
|
3426
3432
|
class: R(["wm-bubble", "wm-bubble--" + s.role])
|
|
3427
3433
|
}, [
|
|
3428
|
-
|
|
3429
|
-
|
|
3434
|
+
We(e.$slots, "default", {}, () => [
|
|
3435
|
+
l("span", { innerHTML: n.rendered }, null, 8, Sr)
|
|
3430
3436
|
], !0)
|
|
3431
3437
|
], 2);
|
|
3432
3438
|
}
|
|
3433
|
-
const Tr = /* @__PURE__ */
|
|
3434
|
-
function Rr(e, t, s,
|
|
3439
|
+
const Tr = /* @__PURE__ */ N(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
|
|
3440
|
+
function Rr(e, t, s, r, i, n) {
|
|
3435
3441
|
return c(), d("div", Or, [...t[0] || (t[0] = [
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3442
|
+
l("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3443
|
+
l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3444
|
+
l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3439
3445
|
])]);
|
|
3440
3446
|
}
|
|
3441
|
-
const Lr = /* @__PURE__ */
|
|
3447
|
+
const Lr = /* @__PURE__ */ N(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
|
|
3442
3448
|
function ee(e) {
|
|
3443
3449
|
return e ? e.client_msg_id || e.id : "";
|
|
3444
3450
|
}
|
|
@@ -3447,6 +3453,7 @@ const Ir = {
|
|
|
3447
3453
|
assigned: "system.assigned",
|
|
3448
3454
|
unassigned: "system.unassigned",
|
|
3449
3455
|
resolved: "system.resolved",
|
|
3456
|
+
closed: "system.closed",
|
|
3450
3457
|
reopened: "system.reopened",
|
|
3451
3458
|
idle: "system.idle"
|
|
3452
3459
|
}, Er = 80, Br = 200, Pr = {
|
|
@@ -3527,61 +3534,62 @@ const Ir = {
|
|
|
3527
3534
|
return !this.hasMore && !this.loadingMore && this.messages.length >= 20;
|
|
3528
3535
|
},
|
|
3529
3536
|
groups() {
|
|
3530
|
-
var s, i,
|
|
3537
|
+
var s, r, i, n, a;
|
|
3531
3538
|
const e = [];
|
|
3532
|
-
for (const
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
+
for (const o of this.messages) {
|
|
3540
|
+
if ((s = o == null ? void 0 : o.metadata) != null && s.resolution_request) continue;
|
|
3541
|
+
const f = this.roleOf(o);
|
|
3542
|
+
if (f === "system") {
|
|
3543
|
+
if (((r = o == null ? void 0 : o.payload) == null ? void 0 : r.event) === "action_admin_pending") {
|
|
3544
|
+
const M = e[e.length - 1];
|
|
3545
|
+
M && M.role === "ai" ? M.messages.push(o) : e.push({
|
|
3546
|
+
key: `g-${ee(o)}`,
|
|
3539
3547
|
role: "ai",
|
|
3540
3548
|
agentName: "",
|
|
3541
3549
|
agentAvatarUrl: null,
|
|
3542
|
-
messages: [
|
|
3550
|
+
messages: [o],
|
|
3543
3551
|
items: []
|
|
3544
3552
|
});
|
|
3545
3553
|
continue;
|
|
3546
3554
|
}
|
|
3547
3555
|
e.push({
|
|
3548
|
-
key: `sys-${ee(
|
|
3549
|
-
role:
|
|
3550
|
-
messages: [
|
|
3556
|
+
key: `sys-${ee(o)}`,
|
|
3557
|
+
role: f,
|
|
3558
|
+
messages: [o],
|
|
3551
3559
|
items: [],
|
|
3552
|
-
systemLabel: this.systemLabel(
|
|
3560
|
+
systemLabel: this.systemLabel(o)
|
|
3553
3561
|
});
|
|
3554
3562
|
continue;
|
|
3555
3563
|
}
|
|
3556
|
-
const
|
|
3557
|
-
|
|
3558
|
-
key: `g-${ee(
|
|
3559
|
-
role:
|
|
3560
|
-
agentName: ((
|
|
3561
|
-
agentAvatarUrl: ((
|
|
3562
|
-
messages: [
|
|
3564
|
+
const b = e[e.length - 1];
|
|
3565
|
+
b && b.role === f && (f === "ai" || b.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? b.messages.push(o) : e.push({
|
|
3566
|
+
key: `g-${ee(o)}`,
|
|
3567
|
+
role: f,
|
|
3568
|
+
agentName: ((n = o == null ? void 0 : o.author) == null ? void 0 : n.name) || "",
|
|
3569
|
+
agentAvatarUrl: ((a = o == null ? void 0 : o.author) == null ? void 0 : a.avatar_url) || null,
|
|
3570
|
+
messages: [o],
|
|
3563
3571
|
items: []
|
|
3564
3572
|
});
|
|
3565
3573
|
}
|
|
3566
|
-
for (const
|
|
3567
|
-
if (
|
|
3568
|
-
const
|
|
3569
|
-
for (const
|
|
3570
|
-
for (const
|
|
3571
|
-
|
|
3574
|
+
for (const o of e) {
|
|
3575
|
+
if (o.role === "system") continue;
|
|
3576
|
+
const f = [];
|
|
3577
|
+
for (const b of o.messages)
|
|
3578
|
+
for (const y of this.itemsOf(b)) f.push(y);
|
|
3579
|
+
o.items = f;
|
|
3572
3580
|
}
|
|
3573
3581
|
const t = [];
|
|
3574
|
-
for (const
|
|
3575
|
-
if (
|
|
3576
|
-
const
|
|
3577
|
-
if (
|
|
3578
|
-
|
|
3582
|
+
for (const o of e) {
|
|
3583
|
+
if (o.role !== "system" && !o.items.length) continue;
|
|
3584
|
+
const f = t[t.length - 1];
|
|
3585
|
+
if (f && f.role !== "system" && f.role === o.role && (o.role === "ai" || f.agentName === o.agentName)) {
|
|
3586
|
+
f.messages.push(...o.messages), f.items.push(...o.items);
|
|
3579
3587
|
continue;
|
|
3580
3588
|
}
|
|
3581
|
-
t.push(
|
|
3589
|
+
t.push(o);
|
|
3582
3590
|
}
|
|
3583
|
-
for (const
|
|
3584
|
-
|
|
3591
|
+
for (const o of t)
|
|
3592
|
+
o.role !== "system" && (o.key = this.stableGroupKey(o.messages));
|
|
3585
3593
|
return t;
|
|
3586
3594
|
},
|
|
3587
3595
|
// Key of the first non-user group that starts after the unread
|
|
@@ -3592,10 +3600,10 @@ const Ir = {
|
|
|
3592
3600
|
const e = this.unreadAnchorId, t = this.unreadBoundaryTs;
|
|
3593
3601
|
for (const s of this.groups) {
|
|
3594
3602
|
if (s.role === "user" || s.role === "system" || !s.items.length) continue;
|
|
3595
|
-
const
|
|
3596
|
-
if (!
|
|
3597
|
-
const
|
|
3598
|
-
if (
|
|
3603
|
+
const r = s.messages[0];
|
|
3604
|
+
if (!r) continue;
|
|
3605
|
+
const i = Y(r.id);
|
|
3606
|
+
if (i != null && !(i <= e) && !(t && r.created_at && r.created_at > t))
|
|
3599
3607
|
return s.key;
|
|
3600
3608
|
}
|
|
3601
3609
|
return null;
|
|
@@ -3633,17 +3641,17 @@ const Ir = {
|
|
|
3633
3641
|
this._groupIdByMsgKey || (this._groupIdByMsgKey = /* @__PURE__ */ new Map(), this._groupIdCounter = 0);
|
|
3634
3642
|
const t = this._groupIdByMsgKey;
|
|
3635
3643
|
let s = null;
|
|
3636
|
-
for (const
|
|
3637
|
-
const
|
|
3638
|
-
if (
|
|
3639
|
-
s = t.get(
|
|
3644
|
+
for (const r of e) {
|
|
3645
|
+
const i = ee(r);
|
|
3646
|
+
if (i && t.has(i)) {
|
|
3647
|
+
s = t.get(i);
|
|
3640
3648
|
break;
|
|
3641
3649
|
}
|
|
3642
3650
|
}
|
|
3643
3651
|
s == null && (s = ++this._groupIdCounter);
|
|
3644
|
-
for (const
|
|
3645
|
-
const
|
|
3646
|
-
|
|
3652
|
+
for (const r of e) {
|
|
3653
|
+
const i = ee(r);
|
|
3654
|
+
i && t.set(i, s);
|
|
3647
3655
|
}
|
|
3648
3656
|
return `g-${s}`;
|
|
3649
3657
|
},
|
|
@@ -3681,32 +3689,32 @@ const Ir = {
|
|
|
3681
3689
|
const t = this._lastSeenConvId !== this.conversationId;
|
|
3682
3690
|
this._lastSeenConvId = this.conversationId;
|
|
3683
3691
|
const s = this.isAtBottom(e);
|
|
3684
|
-
let
|
|
3692
|
+
let r = null;
|
|
3685
3693
|
if (!t && !s) {
|
|
3686
3694
|
const n = this.pickAnchor(e);
|
|
3687
3695
|
if (n != null && n.rowKey) {
|
|
3688
|
-
const
|
|
3689
|
-
if (
|
|
3690
|
-
const
|
|
3691
|
-
|
|
3696
|
+
const a = this.findRowByKey(e, n.rowKey);
|
|
3697
|
+
if (a) {
|
|
3698
|
+
const o = e.getBoundingClientRect().top;
|
|
3699
|
+
r = {
|
|
3692
3700
|
rowKey: n.rowKey,
|
|
3693
|
-
relY:
|
|
3701
|
+
relY: a.getBoundingClientRect().top - o
|
|
3694
3702
|
};
|
|
3695
3703
|
}
|
|
3696
3704
|
}
|
|
3697
3705
|
}
|
|
3698
|
-
const
|
|
3699
|
-
this._scrollSnap =
|
|
3700
|
-
if (this._scrollSnap = null,
|
|
3706
|
+
const i = { forceBottom: t, wasPinned: s, anchor: r };
|
|
3707
|
+
this._scrollSnap = i, this.$nextTick(() => {
|
|
3708
|
+
if (this._scrollSnap = null, i.forceBottom || i.wasPinned) {
|
|
3701
3709
|
e.scrollTop = e.scrollHeight;
|
|
3702
3710
|
return;
|
|
3703
3711
|
}
|
|
3704
|
-
if (!
|
|
3712
|
+
if (!i.anchor) return;
|
|
3705
3713
|
const n = () => {
|
|
3706
|
-
const
|
|
3707
|
-
if (!
|
|
3708
|
-
const
|
|
3709
|
-
Math.abs(
|
|
3714
|
+
const a = i.anchor, o = this.findRowByKey(e, a.rowKey);
|
|
3715
|
+
if (!o) return;
|
|
3716
|
+
const b = o.getBoundingClientRect().top - e.getBoundingClientRect().top - a.relY;
|
|
3717
|
+
Math.abs(b) > 0.5 && (e.scrollTop += b);
|
|
3710
3718
|
};
|
|
3711
3719
|
n(), requestAnimationFrame(() => {
|
|
3712
3720
|
n(), requestAnimationFrame(n);
|
|
@@ -3737,11 +3745,11 @@ const Ir = {
|
|
|
3737
3745
|
// very-top-of-scroll edge case the same way the old logic did.
|
|
3738
3746
|
pickAnchor(e) {
|
|
3739
3747
|
const t = e.getBoundingClientRect().top, s = e.querySelectorAll(".wm-list__row[data-row-key]");
|
|
3740
|
-
let
|
|
3741
|
-
for (const
|
|
3742
|
-
if (
|
|
3743
|
-
return { rowKey:
|
|
3744
|
-
return
|
|
3748
|
+
let r = null;
|
|
3749
|
+
for (const i of s)
|
|
3750
|
+
if (r || (r = i), i.getBoundingClientRect().bottom >= t)
|
|
3751
|
+
return { rowKey: i.dataset.rowKey };
|
|
3752
|
+
return r ? { rowKey: r.dataset.rowKey } : null;
|
|
3745
3753
|
},
|
|
3746
3754
|
findRowByKey(e, t) {
|
|
3747
3755
|
if (!t) return null;
|
|
@@ -3751,10 +3759,10 @@ const Ir = {
|
|
|
3751
3759
|
);
|
|
3752
3760
|
},
|
|
3753
3761
|
roleOf(e) {
|
|
3754
|
-
var s,
|
|
3762
|
+
var s, r;
|
|
3755
3763
|
if ((e == null ? void 0 : e.type) === "system" || ((s = e == null ? void 0 : e.payload) == null ? void 0 : s.type) === "system")
|
|
3756
3764
|
return "system";
|
|
3757
|
-
const t = (
|
|
3765
|
+
const t = (r = e == null ? void 0 : e.author) == null ? void 0 : r.type;
|
|
3758
3766
|
return t === "user" ? "user" : t === "agent_human" ? "human" : "ai";
|
|
3759
3767
|
},
|
|
3760
3768
|
roleLabel(e) {
|
|
@@ -3853,9 +3861,9 @@ const Ir = {
|
|
|
3853
3861
|
// doit garder son arrondi.
|
|
3854
3862
|
cornersFor(e, t) {
|
|
3855
3863
|
var Q, se, re;
|
|
3856
|
-
const s = e.items,
|
|
3857
|
-
let U =
|
|
3858
|
-
return
|
|
3864
|
+
const s = e.items, r = (Q = s[t]) == null ? void 0 : Q.kind, i = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], q = 0.5, T = ($, ie, X) => $ != null && M != null ? $ + q >= M : ie === X || ie === "card" && X === "bubble";
|
|
3865
|
+
let U = o, D = o, L = o, W = o;
|
|
3866
|
+
return a ? (b && (D = f), (y || !n) && (L = f), b && T(E, b, r == null ? void 0 : r.top) && (U = f), y && T(A, y, r == null ? void 0 : r.bottom) && (W = f)) : (b && (U = f), (y || !n) && (W = f), b && T(E, b, r == null ? void 0 : r.top) && (D = f), y && T(A, y, r == null ? void 0 : r.bottom) && (L = f)), { tl: U, tr: D, br: L, bl: W };
|
|
3859
3867
|
},
|
|
3860
3868
|
// Inline column-count for the mosaic grid, capped at 4. Single
|
|
3861
3869
|
// attachment falls back to the vertical-list layout (null). Two
|
|
@@ -3878,8 +3886,8 @@ const Ir = {
|
|
|
3878
3886
|
// corners of every top-row cell flatten too.
|
|
3879
3887
|
mosaicCornerStyle(e, t, s) {
|
|
3880
3888
|
if (!t || t < 2) return null;
|
|
3881
|
-
const
|
|
3882
|
-
return (
|
|
3889
|
+
const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, y = "4px", M = {};
|
|
3890
|
+
return (a || f) && (M["--wm-r-tl"] = y), (o || f) && (M["--wm-r-tr"] = y), (a || b) && (M["--wm-r-bl"] = y), (o || b) && (M["--wm-r-br"] = y), s && (M["--wm-r-tl"] = y, M["--wm-r-tr"] = y), Object.keys(M).length ? M : null;
|
|
3883
3891
|
},
|
|
3884
3892
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3885
3893
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3898,8 +3906,8 @@ const Ir = {
|
|
|
3898
3906
|
// Clé unique par item de cluster, alignée avec `:key` /
|
|
3899
3907
|
// `data-row-key` du template. Sert d'index dans `widthByKey`.
|
|
3900
3908
|
rowKeyOf(e, t) {
|
|
3901
|
-
var
|
|
3902
|
-
const s = (
|
|
3909
|
+
var r;
|
|
3910
|
+
const s = (r = e == null ? void 0 : e.items) == null ? void 0 : r[t];
|
|
3903
3911
|
return s ? `${ee(s.message)}-${s.partKey}` : "";
|
|
3904
3912
|
},
|
|
3905
3913
|
// rAF-debouncé : `updated()` peut être appelé en rafale (stream,
|
|
@@ -3920,20 +3928,20 @@ const Ir = {
|
|
|
3920
3928
|
for (const n of e.querySelectorAll(
|
|
3921
3929
|
".wm-list__row[data-row-key]"
|
|
3922
3930
|
)) {
|
|
3923
|
-
const
|
|
3924
|
-
if (!
|
|
3925
|
-
const
|
|
3931
|
+
const a = n.dataset.rowKey;
|
|
3932
|
+
if (!a) continue;
|
|
3933
|
+
const o = n.querySelector(
|
|
3926
3934
|
".wm-bubble, .wm-result, .wm-art, .wm-list__body"
|
|
3927
3935
|
);
|
|
3928
|
-
if (!
|
|
3929
|
-
const f =
|
|
3930
|
-
f > 0 && (t[
|
|
3936
|
+
if (!o) continue;
|
|
3937
|
+
const f = o.getBoundingClientRect().width;
|
|
3938
|
+
f > 0 && (t[a] = f);
|
|
3931
3939
|
}
|
|
3932
|
-
const s = this.widthByKey,
|
|
3933
|
-
if (
|
|
3940
|
+
const s = this.widthByKey, r = Object.keys(s), i = Object.keys(t);
|
|
3941
|
+
if (r.length === i.length) {
|
|
3934
3942
|
let n = !0;
|
|
3935
|
-
for (const
|
|
3936
|
-
if (Math.abs((s[
|
|
3943
|
+
for (const a of i)
|
|
3944
|
+
if (Math.abs((s[a] ?? 0) - t[a]) > 0.5) {
|
|
3937
3945
|
n = !1;
|
|
3938
3946
|
break;
|
|
3939
3947
|
}
|
|
@@ -4003,27 +4011,27 @@ const Ir = {
|
|
|
4003
4011
|
return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
|
|
4004
4012
|
},
|
|
4005
4013
|
actionDetail(e) {
|
|
4006
|
-
var s,
|
|
4014
|
+
var s, r, i, n, a, o, f, b;
|
|
4007
4015
|
const t = e == null ? void 0 : e.payload;
|
|
4008
4016
|
if (!t) return "";
|
|
4009
4017
|
if (t.state === "success")
|
|
4010
|
-
return ((s = t.success) == null ? void 0 : s.summary) || ((
|
|
4018
|
+
return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
|
|
4011
4019
|
if (t.state === "rejected") {
|
|
4012
4020
|
if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
|
|
4013
|
-
const y = (
|
|
4014
|
-
return this.t(
|
|
4021
|
+
const y = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, M = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
|
|
4022
|
+
return this.t(M);
|
|
4015
4023
|
}
|
|
4016
|
-
return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((
|
|
4024
|
+
return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
|
|
4017
4025
|
},
|
|
4018
4026
|
actionArtifact(e) {
|
|
4019
|
-
var s,
|
|
4020
|
-
const t = (
|
|
4027
|
+
var s, r;
|
|
4028
|
+
const t = (r = (s = e == null ? void 0 : e.payload) == null ? void 0 : s.success) == null ? void 0 : r.artifact;
|
|
4021
4029
|
return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
|
|
4022
4030
|
},
|
|
4023
4031
|
systemLabel(e) {
|
|
4024
|
-
var
|
|
4025
|
-
const t = (
|
|
4026
|
-
return s ? this.t(s, { name:
|
|
4032
|
+
var i, n, a;
|
|
4033
|
+
const t = (i = e == null ? void 0 : e.payload) == null ? void 0 : i.event, s = Ir[t], r = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((a = e == null ? void 0 : e.author) == null ? void 0 : a.name) || this.t("messageList.anAgent");
|
|
4034
|
+
return s ? this.t(s, { name: r }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
4027
4035
|
},
|
|
4028
4036
|
scrollToBottom() {
|
|
4029
4037
|
const e = this.$refs.scrollEl;
|
|
@@ -4037,12 +4045,12 @@ const Ir = {
|
|
|
4037
4045
|
e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
|
|
4038
4046
|
}
|
|
4039
4047
|
}
|
|
4040
|
-
},
|
|
4048
|
+
}, Nr = { class: "wm-list__wrap" }, Ur = {
|
|
4041
4049
|
key: 0,
|
|
4042
4050
|
class: "wm-list__loadMore",
|
|
4043
4051
|
role: "status",
|
|
4044
4052
|
"aria-live": "polite"
|
|
4045
|
-
},
|
|
4053
|
+
}, Dr = { class: "wm-list__loadMore-lbl" }, jr = {
|
|
4046
4054
|
key: 1,
|
|
4047
4055
|
class: "wm-list__historyEnd"
|
|
4048
4056
|
}, Fr = {
|
|
@@ -4054,7 +4062,7 @@ const Ir = {
|
|
|
4054
4062
|
}, qr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Vr = {
|
|
4055
4063
|
key: 0,
|
|
4056
4064
|
class: "wm-list__sysep"
|
|
4057
|
-
},
|
|
4065
|
+
}, Kr = { class: "wm-list__sysep-label" }, Wr = ["data-row-key", "onPointerdown"], $r = {
|
|
4058
4066
|
key: 0,
|
|
4059
4067
|
class: "wm-list__avatarSlot"
|
|
4060
4068
|
}, Gr = { key: 0 }, Yr = {
|
|
@@ -4067,170 +4075,170 @@ const Ir = {
|
|
|
4067
4075
|
key: 3,
|
|
4068
4076
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
4069
4077
|
}, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
|
|
4070
|
-
function si(e, t, s,
|
|
4071
|
-
const
|
|
4072
|
-
return c(), d("div",
|
|
4073
|
-
|
|
4078
|
+
function si(e, t, s, r, i, n) {
|
|
4079
|
+
const a = B("AIAvatar"), o = B("HumanAvatar"), f = B("ActionResult"), b = B("ArtifactRenderer"), y = B("Bubble"), M = B("AttachmentPreview"), E = B("Typing");
|
|
4080
|
+
return c(), d("div", Nr, [
|
|
4081
|
+
l("div", {
|
|
4074
4082
|
ref: "scrollEl",
|
|
4075
|
-
class: R(["wm-list", { "wm-list--silent":
|
|
4083
|
+
class: R(["wm-list", { "wm-list--silent": i.silentFades }]),
|
|
4076
4084
|
onScrollPassive: t[4] || (t[4] = (...A) => n.onScroll && n.onScroll(...A))
|
|
4077
4085
|
}, [
|
|
4078
4086
|
s.loadingMore ? (c(), d("div", Ur, [
|
|
4079
|
-
t[6] || (t[6] =
|
|
4087
|
+
t[6] || (t[6] = l("span", {
|
|
4080
4088
|
class: "wm-list__loadMore-spinner",
|
|
4081
4089
|
"aria-hidden": "true"
|
|
4082
4090
|
}, null, -1)),
|
|
4083
|
-
|
|
4084
|
-
])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) :
|
|
4091
|
+
l("span", Dr, v(n.t("messageList.loadingHistory")), 1)
|
|
4092
|
+
])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : k("", !0),
|
|
4085
4093
|
s.dateLabel ? (c(), d("div", Fr, [
|
|
4086
|
-
t[7] || (t[7] =
|
|
4087
|
-
|
|
4088
|
-
t[8] || (t[8] =
|
|
4089
|
-
])) :
|
|
4094
|
+
t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
|
|
4095
|
+
l("span", Hr, v(s.dateLabel), 1),
|
|
4096
|
+
t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
|
|
4097
|
+
])) : k("", !0),
|
|
4090
4098
|
(c(!0), d(I, null, j(n.groups, (A, q) => (c(), d(I, {
|
|
4091
4099
|
key: A.key
|
|
4092
4100
|
}, [
|
|
4093
4101
|
A.key === n.unreadGroupKey ? (c(), d("div", zr, [
|
|
4094
|
-
t[9] || (t[9] =
|
|
4095
|
-
|
|
4096
|
-
t[10] || (t[10] =
|
|
4097
|
-
])) :
|
|
4102
|
+
t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
4103
|
+
l("span", qr, v(n.t("messageList.unread")), 1),
|
|
4104
|
+
t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
4105
|
+
])) : k("", !0),
|
|
4098
4106
|
A.role === "system" || A.items.length ? (c(), d("div", {
|
|
4099
4107
|
key: 1,
|
|
4100
4108
|
class: R(["wm-list__group", "wm-list__group--" + A.role])
|
|
4101
4109
|
}, [
|
|
4102
4110
|
A.role === "system" ? (c(), d("div", Vr, [
|
|
4103
|
-
t[11] || (t[11] =
|
|
4104
|
-
|
|
4105
|
-
t[12] || (t[12] =
|
|
4111
|
+
t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
4112
|
+
l("span", Kr, v(A.systemLabel), 1),
|
|
4113
|
+
t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
4106
4114
|
])) : (c(), d(I, { key: 1 }, [
|
|
4107
|
-
(c(!0), d(I, null, j(A.items, (
|
|
4108
|
-
key: `${n.messageKey(
|
|
4115
|
+
(c(!0), d(I, null, j(A.items, (T, U) => (c(), d(I, {
|
|
4116
|
+
key: `${n.messageKey(T.message)}-${T.partKey}`
|
|
4109
4117
|
}, [
|
|
4110
|
-
|
|
4111
|
-
"data-row-key": `${n.messageKey(
|
|
4118
|
+
l("div", {
|
|
4119
|
+
"data-row-key": `${n.messageKey(T.message)}-${T.partKey}`,
|
|
4112
4120
|
class: R(["wm-list__row fade-up", [
|
|
4113
4121
|
"wm-list__row--" + A.role,
|
|
4114
4122
|
{
|
|
4115
|
-
"is-pending":
|
|
4116
|
-
"is-failed":
|
|
4123
|
+
"is-pending": T.message._pending,
|
|
4124
|
+
"is-failed": T.message._failed
|
|
4117
4125
|
}
|
|
4118
4126
|
]]),
|
|
4119
4127
|
style: z(n.cornersStyle(A, U)),
|
|
4120
|
-
onPointerdown: (
|
|
4121
|
-
onPointerup: t[0] || (t[0] = (
|
|
4122
|
-
onPointercancel: t[1] || (t[1] = (
|
|
4123
|
-
onPointerleave: t[2] || (t[2] = (
|
|
4128
|
+
onPointerdown: (D) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
|
|
4129
|
+
onPointerup: t[0] || (t[0] = (D) => n.onPressEnd()),
|
|
4130
|
+
onPointercancel: t[1] || (t[1] = (D) => n.onPressEnd()),
|
|
4131
|
+
onPointerleave: t[2] || (t[2] = (D) => n.onPressEnd()),
|
|
4124
4132
|
onContextmenu: t[3] || (t[3] = J(() => {
|
|
4125
4133
|
}, ["prevent"]))
|
|
4126
4134
|
}, [
|
|
4127
|
-
A.role !== "user" ? (c(), d("div",
|
|
4135
|
+
A.role !== "user" ? (c(), d("div", $r, [
|
|
4128
4136
|
U === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
|
|
4129
|
-
A.role === "ai" ? (c(),
|
|
4137
|
+
A.role === "ai" ? (c(), P(a, {
|
|
4130
4138
|
key: 0,
|
|
4131
4139
|
size: 26,
|
|
4132
4140
|
tail: !0,
|
|
4133
4141
|
name: s.aiAgentName,
|
|
4134
4142
|
"image-url": s.aiAgentAvatarUrl
|
|
4135
|
-
}, null, 8, ["name", "image-url"])) : (c(),
|
|
4143
|
+
}, null, 8, ["name", "image-url"])) : (c(), P(o, {
|
|
4136
4144
|
key: 1,
|
|
4137
4145
|
name: A.agentName,
|
|
4138
4146
|
"avatar-url": A.agentAvatarUrl,
|
|
4139
4147
|
size: 26,
|
|
4140
4148
|
tail: !0
|
|
4141
4149
|
}, null, 8, ["name", "avatar-url"]))
|
|
4142
|
-
], 64)) :
|
|
4143
|
-
])) :
|
|
4144
|
-
|
|
4150
|
+
], 64)) : k("", !0)
|
|
4151
|
+
])) : k("", !0),
|
|
4152
|
+
T.renderAs === "action" ? (c(), P(f, {
|
|
4145
4153
|
key: 1,
|
|
4146
|
-
state:
|
|
4147
|
-
label: n.actionLabel(
|
|
4148
|
-
detail: n.actionDetail(
|
|
4149
|
-
}, null, 8, ["state", "label", "detail"])) :
|
|
4154
|
+
state: T.message.payload.state,
|
|
4155
|
+
label: n.actionLabel(T.message),
|
|
4156
|
+
detail: n.actionDetail(T.message)
|
|
4157
|
+
}, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), P(f, {
|
|
4150
4158
|
key: 2,
|
|
4151
4159
|
state: "awaiting",
|
|
4152
4160
|
label: n.t("messageList.approvalRequestSent"),
|
|
4153
|
-
detail:
|
|
4154
|
-
}, null, 8, ["label", "detail"])) :
|
|
4161
|
+
detail: T.message.text_md || ""
|
|
4162
|
+
}, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), P(b, {
|
|
4155
4163
|
key: 3,
|
|
4156
|
-
artifact: n.actionArtifact(
|
|
4157
|
-
}, null, 8, ["artifact"])) :
|
|
4164
|
+
artifact: n.actionArtifact(T.message)
|
|
4165
|
+
}, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), P(b, {
|
|
4158
4166
|
key: 4,
|
|
4159
|
-
artifact: n.artifactOf(
|
|
4167
|
+
artifact: n.artifactOf(T.message)
|
|
4160
4168
|
}, null, 8, ["artifact"])) : (c(), d("div", {
|
|
4161
4169
|
key: 5,
|
|
4162
4170
|
class: R(["wm-list__body", {
|
|
4163
|
-
"wm-list__body--mixed": !!
|
|
4171
|
+
"wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
|
|
4164
4172
|
}])
|
|
4165
4173
|
}, [
|
|
4166
|
-
|
|
4174
|
+
T.message.text_md ? (c(), P(y, {
|
|
4167
4175
|
key: 0,
|
|
4168
4176
|
role: A.role,
|
|
4169
|
-
text:
|
|
4170
|
-
}, null, 8, ["role", "text"])) :
|
|
4171
|
-
n.attachmentsOf(
|
|
4177
|
+
text: T.message.text_md
|
|
4178
|
+
}, null, 8, ["role", "text"])) : k("", !0),
|
|
4179
|
+
n.attachmentsOf(T.message).length ? (c(), d("div", {
|
|
4172
4180
|
key: 1,
|
|
4173
4181
|
class: R(["wm-list__atts", {
|
|
4174
4182
|
"wm-list__atts--align-end": A.role === "user",
|
|
4175
|
-
"wm-list__atts--mosaic": n.attachmentsOf(
|
|
4183
|
+
"wm-list__atts--mosaic": n.attachmentsOf(T.message).length >= 2
|
|
4176
4184
|
}]),
|
|
4177
4185
|
style: z(
|
|
4178
4186
|
n.mosaicGridStyle(
|
|
4179
|
-
n.attachmentsOf(
|
|
4187
|
+
n.attachmentsOf(T.message).length
|
|
4180
4188
|
)
|
|
4181
4189
|
)
|
|
4182
4190
|
}, [
|
|
4183
4191
|
(c(!0), d(I, null, j(n.attachmentsOf(
|
|
4184
|
-
|
|
4185
|
-
), (
|
|
4186
|
-
key: `${n.messageKey(
|
|
4187
|
-
attachment:
|
|
4192
|
+
T.message
|
|
4193
|
+
), (D, L) => (c(), P(M, {
|
|
4194
|
+
key: `${n.messageKey(T.message)}-att-${L}`,
|
|
4195
|
+
attachment: D,
|
|
4188
4196
|
style: z(
|
|
4189
4197
|
n.mosaicCornerStyle(
|
|
4190
4198
|
L,
|
|
4191
|
-
n.attachmentsOf(
|
|
4192
|
-
!!
|
|
4199
|
+
n.attachmentsOf(T.message).length,
|
|
4200
|
+
!!T.message.text_md
|
|
4193
4201
|
)
|
|
4194
4202
|
)
|
|
4195
4203
|
}, null, 8, ["attachment", "style"]))), 128))
|
|
4196
|
-
], 6)) :
|
|
4204
|
+
], 6)) : k("", !0)
|
|
4197
4205
|
], 2))
|
|
4198
|
-
], 46,
|
|
4199
|
-
U < A.items.length - 1 &&
|
|
4206
|
+
], 46, Wr),
|
|
4207
|
+
U < A.items.length - 1 && i.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (A.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
|
|
4200
4208
|
key: 0,
|
|
4201
4209
|
class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
4202
4210
|
}, [
|
|
4203
|
-
A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) :
|
|
4204
|
-
A.role !== "user" && n.timeOf(
|
|
4205
|
-
n.timeOf(
|
|
4206
|
-
], 2)) :
|
|
4211
|
+
A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : k("", !0),
|
|
4212
|
+
A.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : k("", !0),
|
|
4213
|
+
n.timeOf(T.message) ? (c(), d("span", Jr, v(n.timeOf(T.message)), 1)) : k("", !0)
|
|
4214
|
+
], 2)) : k("", !0)
|
|
4207
4215
|
], 64))), 128)),
|
|
4208
4216
|
(A.role !== "user" || n.lastTimeOf(A)) && !n.hasTrailingOverlay(A) ? (c(), d("div", {
|
|
4209
4217
|
key: 0,
|
|
4210
4218
|
class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
4211
4219
|
}, [
|
|
4212
|
-
A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) :
|
|
4213
|
-
A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) :
|
|
4214
|
-
n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) :
|
|
4215
|
-
], 2)) :
|
|
4220
|
+
A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : k("", !0),
|
|
4221
|
+
A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : k("", !0),
|
|
4222
|
+
n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : k("", !0)
|
|
4223
|
+
], 2)) : k("", !0)
|
|
4216
4224
|
], 64))
|
|
4217
|
-
], 2)) :
|
|
4225
|
+
], 2)) : k("", !0)
|
|
4218
4226
|
], 64))), 128)),
|
|
4219
4227
|
s.streamingActive ? (c(), d("div", ei, [
|
|
4220
|
-
|
|
4221
|
-
|
|
4228
|
+
l("div", ti, [
|
|
4229
|
+
K(a, {
|
|
4222
4230
|
size: 26,
|
|
4223
4231
|
tail: !0,
|
|
4224
4232
|
name: s.aiAgentName,
|
|
4225
4233
|
"image-url": s.aiAgentAvatarUrl
|
|
4226
4234
|
}, null, 8, ["name", "image-url"])
|
|
4227
4235
|
]),
|
|
4228
|
-
|
|
4229
|
-
])) :
|
|
4236
|
+
K(E)
|
|
4237
|
+
])) : k("", !0)
|
|
4230
4238
|
], 34),
|
|
4231
|
-
|
|
4239
|
+
K(De, { name: "wm-scrollDown" }, {
|
|
4232
4240
|
default: je(() => [
|
|
4233
|
-
|
|
4241
|
+
i.showScrollDown ? (c(), d("button", {
|
|
4234
4242
|
key: 0,
|
|
4235
4243
|
type: "button",
|
|
4236
4244
|
class: "wm-list__scrollDown",
|
|
@@ -4238,7 +4246,7 @@ function si(e, t, s, i, a, n) {
|
|
|
4238
4246
|
title: n.t("messageList.scrollToBottom"),
|
|
4239
4247
|
onClick: t[5] || (t[5] = (...A) => n.scrollToBottomSmooth && n.scrollToBottomSmooth(...A))
|
|
4240
4248
|
}, [...t[13] || (t[13] = [
|
|
4241
|
-
|
|
4249
|
+
l("svg", {
|
|
4242
4250
|
width: "14",
|
|
4243
4251
|
height: "14",
|
|
4244
4252
|
viewBox: "0 0 24 24",
|
|
@@ -4249,15 +4257,15 @@ function si(e, t, s, i, a, n) {
|
|
|
4249
4257
|
"stroke-linejoin": "round",
|
|
4250
4258
|
"aria-hidden": "true"
|
|
4251
4259
|
}, [
|
|
4252
|
-
|
|
4260
|
+
l("path", { d: "M6 9l6 6 6-6" })
|
|
4253
4261
|
], -1)
|
|
4254
|
-
])], 8, ni)) :
|
|
4262
|
+
])], 8, ni)) : k("", !0)
|
|
4255
4263
|
]),
|
|
4256
4264
|
_: 1
|
|
4257
4265
|
})
|
|
4258
4266
|
]);
|
|
4259
4267
|
}
|
|
4260
|
-
const ri = /* @__PURE__ */
|
|
4268
|
+
const ri = /* @__PURE__ */ N(Pr, [["render", si], ["__scopeId", "data-v-fd42a48c"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
4261
4269
|
function ii() {
|
|
4262
4270
|
return Oe && [
|
|
4263
4271
|
"video/webm;codecs=vp9,opus",
|
|
@@ -4265,8 +4273,8 @@ function ii() {
|
|
|
4265
4273
|
"video/webm",
|
|
4266
4274
|
"video/mp4"
|
|
4267
4275
|
].find((t) => {
|
|
4268
|
-
var s,
|
|
4269
|
-
return (
|
|
4276
|
+
var s, r;
|
|
4277
|
+
return (r = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : r.call(s, t);
|
|
4270
4278
|
}) || "";
|
|
4271
4279
|
}
|
|
4272
4280
|
function Ve({ audio: e }) {
|
|
@@ -4278,7 +4286,7 @@ function Ve({ audio: e }) {
|
|
|
4278
4286
|
systemAudio: e ? "include" : "exclude"
|
|
4279
4287
|
};
|
|
4280
4288
|
}
|
|
4281
|
-
function
|
|
4289
|
+
function wo(e) {
|
|
4282
4290
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
4283
4291
|
}
|
|
4284
4292
|
async function ai() {
|
|
@@ -4303,19 +4311,19 @@ async function ai() {
|
|
|
4303
4311
|
}
|
|
4304
4312
|
async function oi(e) {
|
|
4305
4313
|
const t = document.createElement("video");
|
|
4306
|
-
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((
|
|
4307
|
-
const s = t.videoWidth || 1280,
|
|
4308
|
-
|
|
4309
|
-
const n = await new Promise((
|
|
4310
|
-
|
|
4311
|
-
(
|
|
4314
|
+
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
|
|
4315
|
+
const s = t.videoWidth || 1280, r = t.videoHeight || 720, i = document.createElement("canvas");
|
|
4316
|
+
i.width = s, i.height = r, i.getContext("2d").drawImage(t, 0, 0, s, r);
|
|
4317
|
+
const n = await new Promise((o, f) => {
|
|
4318
|
+
i.toBlob(
|
|
4319
|
+
(b) => b ? o(b) : f(new Error("toBlob failed")),
|
|
4312
4320
|
"image/png"
|
|
4313
4321
|
);
|
|
4314
|
-
}),
|
|
4315
|
-
return new File([n], `capture-${
|
|
4322
|
+
}), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
4323
|
+
return new File([n], `capture-${a}.png`, { type: "image/png" });
|
|
4316
4324
|
}
|
|
4317
4325
|
async function li(e = {}) {
|
|
4318
|
-
var
|
|
4326
|
+
var b;
|
|
4319
4327
|
if (!pe || !Oe) return null;
|
|
4320
4328
|
let t;
|
|
4321
4329
|
try {
|
|
@@ -4326,56 +4334,56 @@ async function li(e = {}) {
|
|
|
4326
4334
|
return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
|
|
4327
4335
|
}
|
|
4328
4336
|
const s = ii();
|
|
4329
|
-
let
|
|
4337
|
+
let r;
|
|
4330
4338
|
try {
|
|
4331
|
-
|
|
4339
|
+
r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
|
|
4332
4340
|
} catch (y) {
|
|
4333
|
-
return console.error("[media] recorder init", y), t.getTracks().forEach((
|
|
4334
|
-
|
|
4341
|
+
return console.error("[media] recorder init", y), t.getTracks().forEach((M) => {
|
|
4342
|
+
M.stop();
|
|
4335
4343
|
}), null;
|
|
4336
4344
|
}
|
|
4337
|
-
const
|
|
4338
|
-
let n = null,
|
|
4339
|
-
|
|
4340
|
-
y.data && y.data.size > 0 &&
|
|
4341
|
-
}),
|
|
4342
|
-
var y,
|
|
4345
|
+
const i = [];
|
|
4346
|
+
let n = null, a = !1;
|
|
4347
|
+
r.addEventListener("dataavailable", (y) => {
|
|
4348
|
+
y.data && y.data.size > 0 && i.push(y.data);
|
|
4349
|
+
}), r.addEventListener("stop", () => {
|
|
4350
|
+
var y, M;
|
|
4343
4351
|
if (n && clearInterval(n), t.getTracks().forEach((E) => {
|
|
4344
4352
|
E.stop();
|
|
4345
|
-
}),
|
|
4346
|
-
const E =
|
|
4353
|
+
}), i.length) {
|
|
4354
|
+
const E = r.mimeType || s || "video/webm", A = new Blob(i, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([A], `ecran-${T}.${q}`, {
|
|
4347
4355
|
type: E
|
|
4348
4356
|
});
|
|
4349
4357
|
(y = e.onfinalize) == null || y.call(e, U);
|
|
4350
4358
|
} else
|
|
4351
|
-
(
|
|
4359
|
+
(M = e.oncancel) == null || M.call(e);
|
|
4352
4360
|
}), t.getVideoTracks().forEach((y) => {
|
|
4353
|
-
y.addEventListener("ended", () =>
|
|
4361
|
+
y.addEventListener("ended", () => o(), { once: !0 });
|
|
4354
4362
|
});
|
|
4355
|
-
function
|
|
4356
|
-
if (!
|
|
4363
|
+
function o() {
|
|
4364
|
+
if (!a && (a = !0, r.state !== "inactive"))
|
|
4357
4365
|
try {
|
|
4358
|
-
|
|
4366
|
+
r.stop();
|
|
4359
4367
|
} catch (y) {
|
|
4360
4368
|
console.error("[media] recorder stop", y);
|
|
4361
4369
|
}
|
|
4362
4370
|
}
|
|
4363
4371
|
try {
|
|
4364
|
-
|
|
4372
|
+
r.start(1e3);
|
|
4365
4373
|
} catch (y) {
|
|
4366
|
-
return console.error("[media] recorder start", y), t.getTracks().forEach((
|
|
4367
|
-
|
|
4374
|
+
return console.error("[media] recorder start", y), t.getTracks().forEach((M) => {
|
|
4375
|
+
M.stop();
|
|
4368
4376
|
}), null;
|
|
4369
4377
|
}
|
|
4370
|
-
(
|
|
4378
|
+
(b = e.onstart) == null || b.call(e);
|
|
4371
4379
|
const f = Date.now();
|
|
4372
4380
|
return n = setInterval(() => {
|
|
4373
4381
|
var y;
|
|
4374
4382
|
(y = e.ontick) == null || y.call(e, Date.now() - f);
|
|
4375
4383
|
}, 500), {
|
|
4376
|
-
stop:
|
|
4384
|
+
stop: o,
|
|
4377
4385
|
get state() {
|
|
4378
|
-
return
|
|
4386
|
+
return r.state;
|
|
4379
4387
|
}
|
|
4380
4388
|
};
|
|
4381
4389
|
}
|
|
@@ -4564,51 +4572,51 @@ const ci = [
|
|
|
4564
4572
|
height: "14",
|
|
4565
4573
|
"aria-hidden": "true"
|
|
4566
4574
|
}, pi = ["d"], vi = ["placeholder", "disabled"], yi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
|
|
4567
|
-
function ki(e, t, s,
|
|
4575
|
+
function ki(e, t, s, r, i, n) {
|
|
4568
4576
|
return c(), d("div", {
|
|
4569
4577
|
class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
|
|
4570
|
-
style: z(
|
|
4578
|
+
style: z(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
|
|
4571
4579
|
}, [
|
|
4572
|
-
|
|
4573
|
-
t[8] || (t[8] =
|
|
4580
|
+
i.recording ? (c(), d("div", ui, [
|
|
4581
|
+
t[8] || (t[8] = l("span", {
|
|
4574
4582
|
class: "wm-rec__dot",
|
|
4575
4583
|
"aria-hidden": "true"
|
|
4576
4584
|
}, null, -1)),
|
|
4577
|
-
|
|
4578
|
-
|
|
4585
|
+
l("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
|
|
4586
|
+
l("button", {
|
|
4579
4587
|
type: "button",
|
|
4580
4588
|
class: "wm-rec__stop",
|
|
4581
|
-
onClick: t[0] || (t[0] = (...
|
|
4589
|
+
onClick: t[0] || (t[0] = (...a) => n.stopRecording && n.stopRecording(...a))
|
|
4582
4590
|
}, v(n.t("composer.stop")), 1)
|
|
4583
|
-
])) :
|
|
4584
|
-
|
|
4585
|
-
class: R(["wm-compose", { "has-attach":
|
|
4586
|
-
onSubmit: t[7] || (t[7] = J((...
|
|
4591
|
+
])) : k("", !0),
|
|
4592
|
+
l("form", {
|
|
4593
|
+
class: R(["wm-compose", { "has-attach": i.attachOpen }]),
|
|
4594
|
+
onSubmit: t[7] || (t[7] = J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
|
|
4587
4595
|
}, [
|
|
4588
|
-
|
|
4596
|
+
l("input", {
|
|
4589
4597
|
ref: "fileEl",
|
|
4590
4598
|
type: "file",
|
|
4591
4599
|
hidden: "",
|
|
4592
4600
|
multiple: "",
|
|
4593
|
-
onChange: t[1] || (t[1] = (...
|
|
4601
|
+
onChange: t[1] || (t[1] = (...a) => n.onFile && n.onFile(...a))
|
|
4594
4602
|
}, null, 544),
|
|
4595
|
-
|
|
4603
|
+
i.attachOpen ? (c(), d("div", {
|
|
4596
4604
|
key: 0,
|
|
4597
4605
|
class: "wm-compose__overlay",
|
|
4598
|
-
onClick: t[2] || (t[2] = (
|
|
4599
|
-
})) :
|
|
4600
|
-
|
|
4601
|
-
(c(!0), d(I, null, j(n.attachItems, (
|
|
4602
|
-
key:
|
|
4606
|
+
onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
|
|
4607
|
+
})) : k("", !0),
|
|
4608
|
+
i.attachOpen ? (c(), d("div", mi, [
|
|
4609
|
+
(c(!0), d(I, null, j(n.attachItems, (a) => (c(), d("button", {
|
|
4610
|
+
key: a.action,
|
|
4603
4611
|
type: "button",
|
|
4604
4612
|
class: "wm-compose__menuItem",
|
|
4605
|
-
disabled:
|
|
4606
|
-
onClick: (
|
|
4613
|
+
disabled: a.disabled,
|
|
4614
|
+
onClick: (o) => n.onAttachAction(a.action)
|
|
4607
4615
|
}, [
|
|
4608
|
-
|
|
4616
|
+
l("span", _i, [
|
|
4609
4617
|
(c(), d("svg", gi, [
|
|
4610
|
-
|
|
4611
|
-
d:
|
|
4618
|
+
l("path", {
|
|
4619
|
+
d: a.path,
|
|
4612
4620
|
stroke: "currentColor",
|
|
4613
4621
|
"stroke-width": "1.8",
|
|
4614
4622
|
"stroke-linecap": "round",
|
|
@@ -4617,31 +4625,31 @@ function ki(e, t, s, i, a, n) {
|
|
|
4617
4625
|
}, null, 8, pi)
|
|
4618
4626
|
]))
|
|
4619
4627
|
]),
|
|
4620
|
-
|
|
4628
|
+
l("span", null, v(a.label), 1)
|
|
4621
4629
|
], 8, fi))), 128))
|
|
4622
|
-
])) :
|
|
4623
|
-
G(
|
|
4630
|
+
])) : k("", !0),
|
|
4631
|
+
G(l("textarea", {
|
|
4624
4632
|
ref: "inputEl",
|
|
4625
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
4633
|
+
"onUpdate:modelValue": t[3] || (t[3] = (a) => i.local = a),
|
|
4626
4634
|
class: "wm-compose__input",
|
|
4627
4635
|
rows: "3",
|
|
4628
4636
|
placeholder: s.placeholder,
|
|
4629
4637
|
disabled: s.disabled,
|
|
4630
|
-
onKeydown: t[4] || (t[4] = (...
|
|
4631
|
-
onInput: t[5] || (t[5] = (...
|
|
4638
|
+
onKeydown: t[4] || (t[4] = (...a) => n.onKeydown && n.onKeydown(...a)),
|
|
4639
|
+
onInput: t[5] || (t[5] = (...a) => n.autosize && n.autosize(...a))
|
|
4632
4640
|
}, null, 40, vi), [
|
|
4633
|
-
[te,
|
|
4641
|
+
[te, i.local]
|
|
4634
4642
|
]),
|
|
4635
|
-
|
|
4636
|
-
|
|
4643
|
+
l("div", yi, [
|
|
4644
|
+
l("button", {
|
|
4637
4645
|
type: "button",
|
|
4638
|
-
class: R(["wm-compose__icon", { "is-open":
|
|
4646
|
+
class: R(["wm-compose__icon", { "is-open": i.attachOpen }]),
|
|
4639
4647
|
title: s.attachLabel,
|
|
4640
4648
|
"aria-label": s.attachLabel,
|
|
4641
|
-
disabled:
|
|
4642
|
-
onClick: t[6] || (t[6] = (
|
|
4649
|
+
disabled: i.recording,
|
|
4650
|
+
onClick: t[6] || (t[6] = (a) => i.attachOpen = !i.attachOpen)
|
|
4643
4651
|
}, [...t[9] || (t[9] = [
|
|
4644
|
-
|
|
4652
|
+
l("svg", {
|
|
4645
4653
|
width: "13",
|
|
4646
4654
|
height: "13",
|
|
4647
4655
|
viewBox: "0 0 24 24",
|
|
@@ -4652,16 +4660,16 @@ function ki(e, t, s, i, a, n) {
|
|
|
4652
4660
|
"stroke-linejoin": "round",
|
|
4653
4661
|
"aria-hidden": "true"
|
|
4654
4662
|
}, [
|
|
4655
|
-
|
|
4663
|
+
l("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" })
|
|
4656
4664
|
], -1)
|
|
4657
4665
|
])], 10, wi),
|
|
4658
|
-
|
|
4666
|
+
l("button", {
|
|
4659
4667
|
type: "submit",
|
|
4660
4668
|
class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
|
|
4661
4669
|
disabled: !n.canSend,
|
|
4662
4670
|
"aria-label": n.t("composer.send")
|
|
4663
4671
|
}, [...t[10] || (t[10] = [
|
|
4664
|
-
|
|
4672
|
+
l("svg", {
|
|
4665
4673
|
width: "13",
|
|
4666
4674
|
height: "13",
|
|
4667
4675
|
viewBox: "0 0 24 24",
|
|
@@ -4672,14 +4680,14 @@ function ki(e, t, s, i, a, n) {
|
|
|
4672
4680
|
"stroke-linejoin": "round",
|
|
4673
4681
|
"aria-hidden": "true"
|
|
4674
4682
|
}, [
|
|
4675
|
-
|
|
4683
|
+
l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4676
4684
|
], -1)
|
|
4677
4685
|
])], 10, bi)
|
|
4678
4686
|
])
|
|
4679
4687
|
], 34)
|
|
4680
4688
|
], 6);
|
|
4681
4689
|
}
|
|
4682
|
-
const Ci = /* @__PURE__ */
|
|
4690
|
+
const Ci = /* @__PURE__ */ N(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
|
|
4683
4691
|
name: "WmSuggestionChips",
|
|
4684
4692
|
props: {
|
|
4685
4693
|
items: { type: Array, default: () => [] },
|
|
@@ -4697,21 +4705,21 @@ const Ci = /* @__PURE__ */ P(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
|
|
|
4697
4705
|
}
|
|
4698
4706
|
}
|
|
4699
4707
|
}, Si = ["onClick"];
|
|
4700
|
-
function Mi(e, t, s,
|
|
4708
|
+
function Mi(e, t, s, r, i, n) {
|
|
4701
4709
|
return s.items.length ? (c(), d("div", {
|
|
4702
4710
|
key: n.batchKey,
|
|
4703
4711
|
class: "wm-chips"
|
|
4704
4712
|
}, [
|
|
4705
|
-
(c(!0), d(I, null, j(s.items, (
|
|
4706
|
-
key:
|
|
4713
|
+
(c(!0), d(I, null, j(s.items, (a, o) => (c(), d("button", {
|
|
4714
|
+
key: o,
|
|
4707
4715
|
type: "button",
|
|
4708
4716
|
class: "wm-chip",
|
|
4709
|
-
style: z({ animationDelay: s.baseDelay +
|
|
4710
|
-
onClick: (f) => e.$emit("select",
|
|
4711
|
-
}, v(
|
|
4712
|
-
])) :
|
|
4717
|
+
style: z({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
|
|
4718
|
+
onClick: (f) => e.$emit("select", a)
|
|
4719
|
+
}, v(a.label), 13, Si))), 128))
|
|
4720
|
+
])) : k("", !0);
|
|
4713
4721
|
}
|
|
4714
|
-
const Ti = /* @__PURE__ */
|
|
4722
|
+
const Ti = /* @__PURE__ */ N(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085"]]), xi = {
|
|
4715
4723
|
name: "WmApprovalCard",
|
|
4716
4724
|
components: { AIAvatar: oe },
|
|
4717
4725
|
inject: {
|
|
@@ -4759,41 +4767,41 @@ const Ti = /* @__PURE__ */ P(Ai, [["render", Mi], ["__scopeId", "data-v-47ad8085
|
|
|
4759
4767
|
key: 0,
|
|
4760
4768
|
class: "wm-approval__detail"
|
|
4761
4769
|
}, Pi = { class: "wm-approval__actions" };
|
|
4762
|
-
function
|
|
4763
|
-
const
|
|
4770
|
+
function Ni(e, t, s, r, i, n) {
|
|
4771
|
+
const a = B("AIAvatar");
|
|
4764
4772
|
return c(), d("div", Oi, [
|
|
4765
|
-
|
|
4766
|
-
|
|
4767
|
-
|
|
4773
|
+
l("div", Ri, [
|
|
4774
|
+
l("div", Li, [
|
|
4775
|
+
K(a, {
|
|
4768
4776
|
size: 24,
|
|
4769
4777
|
name: s.agentName,
|
|
4770
4778
|
"image-url": s.agentAvatarUrl
|
|
4771
4779
|
}, null, 8, ["name", "image-url"])
|
|
4772
4780
|
]),
|
|
4773
|
-
|
|
4774
|
-
|
|
4775
|
-
s.detail ? (c(), d("div", Bi, v(s.detail), 1)) :
|
|
4781
|
+
l("div", Ii, [
|
|
4782
|
+
l("div", Ei, v(s.action), 1),
|
|
4783
|
+
s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : k("", !0)
|
|
4776
4784
|
])
|
|
4777
4785
|
]),
|
|
4778
|
-
|
|
4786
|
+
l("div", Pi, [
|
|
4779
4787
|
n.rejectId ? (c(), d("button", {
|
|
4780
4788
|
key: 0,
|
|
4781
4789
|
type: "button",
|
|
4782
4790
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
4783
|
-
onClick: t[0] || (t[0] = (
|
|
4784
|
-
}, v(n.rejectLabel), 1)) :
|
|
4791
|
+
onClick: t[0] || (t[0] = (o) => e.$emit("callback", n.rejectId))
|
|
4792
|
+
}, v(n.rejectLabel), 1)) : k("", !0),
|
|
4785
4793
|
n.approveId ? (c(), d("button", {
|
|
4786
4794
|
key: 1,
|
|
4787
4795
|
type: "button",
|
|
4788
4796
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
4789
|
-
onClick: t[1] || (t[1] = (
|
|
4790
|
-
}, v(n.approveLabel), 1)) :
|
|
4797
|
+
onClick: t[1] || (t[1] = (o) => e.$emit("callback", n.approveId))
|
|
4798
|
+
}, v(n.approveLabel), 1)) : k("", !0)
|
|
4791
4799
|
])
|
|
4792
4800
|
]);
|
|
4793
4801
|
}
|
|
4794
|
-
const Ui = /* @__PURE__ */
|
|
4795
|
-
let
|
|
4796
|
-
const
|
|
4802
|
+
const Ui = /* @__PURE__ */ N(xi, [["render", Ni], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4803
|
+
let Ne = 0;
|
|
4804
|
+
const Di = /* @__PURE__ */ new Set([
|
|
4797
4805
|
"text",
|
|
4798
4806
|
"textarea",
|
|
4799
4807
|
"number",
|
|
@@ -4818,8 +4826,8 @@ const Ni = /* @__PURE__ */ new Set([
|
|
|
4818
4826
|
},
|
|
4819
4827
|
emits: ["submit"],
|
|
4820
4828
|
data() {
|
|
4821
|
-
return
|
|
4822
|
-
_uid:
|
|
4829
|
+
return Ne += 1, {
|
|
4830
|
+
_uid: Ne,
|
|
4823
4831
|
values: {},
|
|
4824
4832
|
busy: !1,
|
|
4825
4833
|
error: ""
|
|
@@ -4831,7 +4839,7 @@ const Ni = /* @__PURE__ */ new Set([
|
|
|
4831
4839
|
// douteux.
|
|
4832
4840
|
normalizedFields() {
|
|
4833
4841
|
var t;
|
|
4834
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !
|
|
4842
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Di.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
|
|
4835
4843
|
}
|
|
4836
4844
|
},
|
|
4837
4845
|
created() {
|
|
@@ -4850,8 +4858,8 @@ const Ni = /* @__PURE__ */ new Set([
|
|
|
4850
4858
|
this.values = t, this.error = "";
|
|
4851
4859
|
},
|
|
4852
4860
|
toggleMulti(e, t, s) {
|
|
4853
|
-
const
|
|
4854
|
-
s &&
|
|
4861
|
+
const r = Array.isArray(this.values[e]) ? this.values[e].slice() : [], i = r.indexOf(t);
|
|
4862
|
+
s && i === -1 ? r.push(t) : !s && i !== -1 && r.splice(i, 1), this.values = { ...this.values, [e]: r };
|
|
4855
4863
|
},
|
|
4856
4864
|
validate() {
|
|
4857
4865
|
for (const e of this.normalizedFields) {
|
|
@@ -4884,10 +4892,10 @@ const Ni = /* @__PURE__ */ new Set([
|
|
|
4884
4892
|
}
|
|
4885
4893
|
}
|
|
4886
4894
|
}
|
|
4887
|
-
}, Fi = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, Vi = { class: "wm-form__title" },
|
|
4895
|
+
}, Fi = { class: "wm-form" }, Hi = { class: "wm-form__head" }, zi = { class: "wm-form__icon" }, qi = { class: "wm-form__main" }, Vi = { class: "wm-form__title" }, Ki = {
|
|
4888
4896
|
key: 0,
|
|
4889
4897
|
class: "wm-form__detail"
|
|
4890
|
-
},
|
|
4898
|
+
}, Wi = ["for"], $i = {
|
|
4891
4899
|
key: 0,
|
|
4892
4900
|
class: "wm-form__req",
|
|
4893
4901
|
"aria-hidden": "true"
|
|
@@ -4911,144 +4919,144 @@ const Ni = /* @__PURE__ */ new Set([
|
|
|
4911
4919
|
key: 2,
|
|
4912
4920
|
class: "wm-form__doneLbl"
|
|
4913
4921
|
};
|
|
4914
|
-
function ca(e, t, s,
|
|
4915
|
-
const
|
|
4922
|
+
function ca(e, t, s, r, i, n) {
|
|
4923
|
+
const a = B("AIAvatar");
|
|
4916
4924
|
return c(), d("div", Fi, [
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4925
|
+
l("div", Hi, [
|
|
4926
|
+
l("div", zi, [
|
|
4927
|
+
K(a, {
|
|
4920
4928
|
size: 24,
|
|
4921
4929
|
name: s.agentName,
|
|
4922
4930
|
"image-url": s.agentAvatarUrl
|
|
4923
4931
|
}, null, 8, ["name", "image-url"])
|
|
4924
4932
|
]),
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
s.form.description ? (c(), d("div",
|
|
4933
|
+
l("div", qi, [
|
|
4934
|
+
l("div", Vi, v(s.form.title || n.t("form.title")), 1),
|
|
4935
|
+
s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) : k("", !0)
|
|
4928
4936
|
])
|
|
4929
4937
|
]),
|
|
4930
|
-
|
|
4938
|
+
l("form", {
|
|
4931
4939
|
class: "wm-form__body",
|
|
4932
|
-
onSubmit: t[0] || (t[0] = J((...
|
|
4940
|
+
onSubmit: t[0] || (t[0] = J((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
|
|
4933
4941
|
}, [
|
|
4934
|
-
(c(!0), d(I, null, j(n.normalizedFields, (
|
|
4935
|
-
key:
|
|
4942
|
+
(c(!0), d(I, null, j(n.normalizedFields, (o) => (c(), d("div", {
|
|
4943
|
+
key: o.key,
|
|
4936
4944
|
class: "wm-form__field"
|
|
4937
4945
|
}, [
|
|
4938
|
-
|
|
4939
|
-
for: `wm-f-${
|
|
4946
|
+
l("label", {
|
|
4947
|
+
for: `wm-f-${i._uid}-${o.key}`,
|
|
4940
4948
|
class: "wm-form__label"
|
|
4941
4949
|
}, [
|
|
4942
|
-
Se(v(
|
|
4943
|
-
|
|
4944
|
-
], 8,
|
|
4945
|
-
|
|
4950
|
+
Se(v(o.label), 1),
|
|
4951
|
+
o.required ? (c(), d("span", $i, "*")) : k("", !0)
|
|
4952
|
+
], 8, Wi),
|
|
4953
|
+
o.type === "text" ? G((c(), d("input", {
|
|
4946
4954
|
key: 0,
|
|
4947
|
-
id: `wm-f-${
|
|
4948
|
-
"onUpdate:modelValue": (f) =>
|
|
4955
|
+
id: `wm-f-${i._uid}-${o.key}`,
|
|
4956
|
+
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
4949
4957
|
type: "text",
|
|
4950
4958
|
class: "wm-form__input",
|
|
4951
|
-
placeholder:
|
|
4952
|
-
required:
|
|
4953
|
-
disabled: s.readOnly ||
|
|
4959
|
+
placeholder: o.placeholder || "",
|
|
4960
|
+
required: o.required,
|
|
4961
|
+
disabled: s.readOnly || i.busy
|
|
4954
4962
|
}, null, 8, Gi)), [
|
|
4955
|
-
[te,
|
|
4956
|
-
]) :
|
|
4963
|
+
[te, i.values[o.key]]
|
|
4964
|
+
]) : o.type === "textarea" ? G((c(), d("textarea", {
|
|
4957
4965
|
key: 1,
|
|
4958
|
-
id: `wm-f-${
|
|
4959
|
-
"onUpdate:modelValue": (f) =>
|
|
4966
|
+
id: `wm-f-${i._uid}-${o.key}`,
|
|
4967
|
+
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
4960
4968
|
class: "wm-form__textarea",
|
|
4961
4969
|
rows: "3",
|
|
4962
|
-
placeholder:
|
|
4963
|
-
required:
|
|
4964
|
-
disabled: s.readOnly ||
|
|
4970
|
+
placeholder: o.placeholder || "",
|
|
4971
|
+
required: o.required,
|
|
4972
|
+
disabled: s.readOnly || i.busy
|
|
4965
4973
|
}, null, 8, Yi)), [
|
|
4966
|
-
[te,
|
|
4967
|
-
]) :
|
|
4974
|
+
[te, i.values[o.key]]
|
|
4975
|
+
]) : o.type === "number" ? G((c(), d("input", {
|
|
4968
4976
|
key: 2,
|
|
4969
|
-
id: `wm-f-${
|
|
4970
|
-
"onUpdate:modelValue": (f) =>
|
|
4977
|
+
id: `wm-f-${i._uid}-${o.key}`,
|
|
4978
|
+
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
4971
4979
|
type: "number",
|
|
4972
4980
|
class: "wm-form__input",
|
|
4973
|
-
placeholder:
|
|
4974
|
-
required:
|
|
4975
|
-
disabled: s.readOnly ||
|
|
4981
|
+
placeholder: o.placeholder || "",
|
|
4982
|
+
required: o.required,
|
|
4983
|
+
disabled: s.readOnly || i.busy
|
|
4976
4984
|
}, null, 8, Ji)), [
|
|
4977
4985
|
[
|
|
4978
4986
|
te,
|
|
4979
|
-
|
|
4987
|
+
i.values[o.key],
|
|
4980
4988
|
void 0,
|
|
4981
4989
|
{ number: !0 }
|
|
4982
4990
|
]
|
|
4983
|
-
]) :
|
|
4991
|
+
]) : o.type === "date" ? G((c(), d("input", {
|
|
4984
4992
|
key: 3,
|
|
4985
|
-
id: `wm-f-${
|
|
4986
|
-
"onUpdate:modelValue": (f) =>
|
|
4993
|
+
id: `wm-f-${i._uid}-${o.key}`,
|
|
4994
|
+
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
4987
4995
|
type: "date",
|
|
4988
4996
|
class: "wm-form__input",
|
|
4989
|
-
required:
|
|
4990
|
-
disabled: s.readOnly ||
|
|
4997
|
+
required: o.required,
|
|
4998
|
+
disabled: s.readOnly || i.busy
|
|
4991
4999
|
}, null, 8, Xi)), [
|
|
4992
|
-
[te,
|
|
4993
|
-
]) :
|
|
4994
|
-
G(
|
|
4995
|
-
id: `wm-f-${
|
|
4996
|
-
"onUpdate:modelValue": (f) =>
|
|
5000
|
+
[te, i.values[o.key]]
|
|
5001
|
+
]) : o.type === "boolean" ? (c(), d("label", Qi, [
|
|
5002
|
+
G(l("input", {
|
|
5003
|
+
id: `wm-f-${i._uid}-${o.key}`,
|
|
5004
|
+
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
4997
5005
|
type: "checkbox",
|
|
4998
|
-
disabled: s.readOnly ||
|
|
5006
|
+
disabled: s.readOnly || i.busy
|
|
4999
5007
|
}, null, 8, Zi), [
|
|
5000
|
-
[
|
|
5008
|
+
[$e, i.values[o.key]]
|
|
5001
5009
|
]),
|
|
5002
|
-
|
|
5003
|
-
])) :
|
|
5010
|
+
l("span", null, v(o.placeholder || n.t("common.yes")), 1)
|
|
5011
|
+
])) : o.type === "select" ? G((c(), d("select", {
|
|
5004
5012
|
key: 5,
|
|
5005
|
-
id: `wm-f-${
|
|
5006
|
-
"onUpdate:modelValue": (f) =>
|
|
5013
|
+
id: `wm-f-${i._uid}-${o.key}`,
|
|
5014
|
+
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
5007
5015
|
class: "wm-form__select",
|
|
5008
|
-
required:
|
|
5009
|
-
disabled: s.readOnly ||
|
|
5016
|
+
required: o.required,
|
|
5017
|
+
disabled: s.readOnly || i.busy
|
|
5010
5018
|
}, [
|
|
5011
|
-
|
|
5012
|
-
(c(!0), d(I, null, j(
|
|
5019
|
+
l("option", ta, v(o.placeholder || n.t("form.choose")), 1),
|
|
5020
|
+
(c(!0), d(I, null, j(o.options, (f) => (c(), d("option", {
|
|
5013
5021
|
key: f.value,
|
|
5014
5022
|
value: f.value
|
|
5015
5023
|
}, v(f.label), 9, na))), 128))
|
|
5016
5024
|
], 8, ea)), [
|
|
5017
|
-
[Ge,
|
|
5018
|
-
]) :
|
|
5019
|
-
(c(!0), d(I, null, j(
|
|
5025
|
+
[Ge, i.values[o.key]]
|
|
5026
|
+
]) : o.type === "multiselect" ? (c(), d("div", sa, [
|
|
5027
|
+
(c(!0), d(I, null, j(o.options, (f) => (c(), d("label", {
|
|
5020
5028
|
key: f.value,
|
|
5021
5029
|
class: "wm-form__multiItem"
|
|
5022
5030
|
}, [
|
|
5023
|
-
|
|
5031
|
+
l("input", {
|
|
5024
5032
|
type: "checkbox",
|
|
5025
5033
|
value: f.value,
|
|
5026
|
-
checked: Array.isArray(
|
|
5027
|
-
disabled: s.readOnly ||
|
|
5028
|
-
onChange: (
|
|
5029
|
-
|
|
5034
|
+
checked: Array.isArray(i.values[o.key]) && i.values[o.key].includes(f.value),
|
|
5035
|
+
disabled: s.readOnly || i.busy,
|
|
5036
|
+
onChange: (b) => n.toggleMulti(
|
|
5037
|
+
o.key,
|
|
5030
5038
|
f.value,
|
|
5031
|
-
|
|
5039
|
+
b.target.checked
|
|
5032
5040
|
)
|
|
5033
5041
|
}, null, 40, ra),
|
|
5034
|
-
|
|
5042
|
+
l("span", null, v(f.label), 1)
|
|
5035
5043
|
]))), 128))
|
|
5036
|
-
])) :
|
|
5044
|
+
])) : k("", !0)
|
|
5037
5045
|
]))), 128)),
|
|
5038
|
-
|
|
5046
|
+
i.error ? (c(), d("div", ia, v(i.error), 1)) : k("", !0),
|
|
5039
5047
|
s.readOnly ? (c(), d("div", la, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
|
|
5040
5048
|
key: 1,
|
|
5041
5049
|
type: "submit",
|
|
5042
5050
|
class: "wm-form__submit",
|
|
5043
|
-
disabled:
|
|
5051
|
+
disabled: i.busy
|
|
5044
5052
|
}, [
|
|
5045
|
-
|
|
5046
|
-
|
|
5053
|
+
i.busy ? (c(), d("span", oa)) : k("", !0),
|
|
5054
|
+
l("span", null, v(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
|
|
5047
5055
|
], 8, aa))
|
|
5048
5056
|
], 32)
|
|
5049
5057
|
]);
|
|
5050
5058
|
}
|
|
5051
|
-
const da = /* @__PURE__ */
|
|
5059
|
+
const da = /* @__PURE__ */ N(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
|
|
5052
5060
|
name: "WmFeedback",
|
|
5053
5061
|
inject: {
|
|
5054
5062
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5086,11 +5094,11 @@ const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56
|
|
|
5086
5094
|
key: 1,
|
|
5087
5095
|
class: "wm-fb__done"
|
|
5088
5096
|
}, ba = { class: "wm-fb__doneTitle" }, ka = { class: "wm-fb__doneSub" };
|
|
5089
|
-
function Ca(e, t, s,
|
|
5097
|
+
function Ca(e, t, s, r, i, n) {
|
|
5090
5098
|
return c(), d("div", ha, [
|
|
5091
5099
|
s.done ? (c(), d("div", wa, [
|
|
5092
|
-
t[1] || (t[1] =
|
|
5093
|
-
|
|
5100
|
+
t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
|
|
5101
|
+
l("svg", {
|
|
5094
5102
|
width: "16",
|
|
5095
5103
|
height: "16",
|
|
5096
5104
|
viewBox: "0 0 24 24",
|
|
@@ -5101,35 +5109,35 @@ function Ca(e, t, s, i, a, n) {
|
|
|
5101
5109
|
"stroke-linejoin": "round",
|
|
5102
5110
|
"aria-hidden": "true"
|
|
5103
5111
|
}, [
|
|
5104
|
-
|
|
5112
|
+
l("path", { d: "M20 6L9 17l-5-5" })
|
|
5105
5113
|
])
|
|
5106
5114
|
], -1)),
|
|
5107
|
-
|
|
5108
|
-
|
|
5115
|
+
l("div", ba, v(n.t("feedback.doneTitle")), 1),
|
|
5116
|
+
l("div", ka, v(n.t("feedback.doneSubtitle")), 1)
|
|
5109
5117
|
])) : (c(), d(I, { key: 0 }, [
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
(c(!0), d(I, null, j(n.options, (
|
|
5114
|
-
key:
|
|
5118
|
+
l("div", ma, v(n.t("feedback.question")), 1),
|
|
5119
|
+
l("div", fa, v(n.t("feedback.subtitle")), 1),
|
|
5120
|
+
l("div", _a, [
|
|
5121
|
+
(c(!0), d(I, null, j(n.options, (a) => (c(), d("button", {
|
|
5122
|
+
key: a.v,
|
|
5115
5123
|
type: "button",
|
|
5116
|
-
class: R(["wm-fb__opt", { "is-selected":
|
|
5117
|
-
onClick: (
|
|
5124
|
+
class: R(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
|
|
5125
|
+
onClick: (o) => i.sel = a.v
|
|
5118
5126
|
}, [
|
|
5119
|
-
|
|
5120
|
-
|
|
5127
|
+
l("span", pa, v(a.e), 1),
|
|
5128
|
+
l("span", va, v(a.l), 1)
|
|
5121
5129
|
], 10, ga))), 128))
|
|
5122
5130
|
]),
|
|
5123
|
-
|
|
5131
|
+
l("button", {
|
|
5124
5132
|
type: "button",
|
|
5125
5133
|
class: "wm-fb__send",
|
|
5126
|
-
disabled: !
|
|
5127
|
-
onClick: t[0] || (t[0] = (...
|
|
5134
|
+
disabled: !i.sel || s.busy,
|
|
5135
|
+
onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
|
|
5128
5136
|
}, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ya)
|
|
5129
5137
|
], 64))
|
|
5130
5138
|
]);
|
|
5131
5139
|
}
|
|
5132
|
-
const Aa = /* @__PURE__ */
|
|
5140
|
+
const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
|
|
5133
5141
|
name: "WmMoreMenu",
|
|
5134
5142
|
inject: {
|
|
5135
5143
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5173,23 +5181,23 @@ const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
|
|
|
5173
5181
|
}, Oa = { class: "wm-mm__label" }, Ra = { class: "wm-mm__label" }, La = {
|
|
5174
5182
|
key: 1,
|
|
5175
5183
|
class: "wm-mm__sep"
|
|
5176
|
-
}, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" },
|
|
5177
|
-
function Ua(e, t, s,
|
|
5184
|
+
}, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Na = { class: "wm-mm__label" };
|
|
5185
|
+
function Ua(e, t, s, r, i, n) {
|
|
5178
5186
|
return c(), d("div", Ma, [
|
|
5179
|
-
|
|
5187
|
+
l("div", {
|
|
5180
5188
|
class: "wm-mm__scrim",
|
|
5181
|
-
onClick: t[0] || (t[0] = (
|
|
5189
|
+
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
5182
5190
|
}),
|
|
5183
|
-
|
|
5191
|
+
l("div", Ta, [
|
|
5184
5192
|
s.canRename || s.canExport ? (c(), d("div", xa, [
|
|
5185
5193
|
s.canRename ? (c(), d("button", {
|
|
5186
5194
|
key: 0,
|
|
5187
5195
|
type: "button",
|
|
5188
5196
|
class: "wm-mm__item",
|
|
5189
|
-
onClick: t[1] || (t[1] = (
|
|
5197
|
+
onClick: t[1] || (t[1] = (a) => n.emit("rename"))
|
|
5190
5198
|
}, [
|
|
5191
|
-
t[6] || (t[6] =
|
|
5192
|
-
|
|
5199
|
+
t[6] || (t[6] = l("span", { class: "wm-mm__icon" }, [
|
|
5200
|
+
l("svg", {
|
|
5193
5201
|
width: "12",
|
|
5194
5202
|
height: "12",
|
|
5195
5203
|
viewBox: "0 0 24 24",
|
|
@@ -5200,20 +5208,20 @@ function Ua(e, t, s, i, a, n) {
|
|
|
5200
5208
|
"stroke-linejoin": "round",
|
|
5201
5209
|
"aria-hidden": "true"
|
|
5202
5210
|
}, [
|
|
5203
|
-
|
|
5204
|
-
|
|
5211
|
+
l("path", { d: "M12 20h9" }),
|
|
5212
|
+
l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
5205
5213
|
])
|
|
5206
5214
|
], -1)),
|
|
5207
|
-
|
|
5208
|
-
])) :
|
|
5215
|
+
l("span", Oa, v(n.t("moreMenu.editTitle")), 1)
|
|
5216
|
+
])) : k("", !0),
|
|
5209
5217
|
s.canExport ? (c(), d("button", {
|
|
5210
5218
|
key: 1,
|
|
5211
5219
|
type: "button",
|
|
5212
5220
|
class: "wm-mm__item",
|
|
5213
|
-
onClick: t[2] || (t[2] = (
|
|
5221
|
+
onClick: t[2] || (t[2] = (a) => n.emit("export"))
|
|
5214
5222
|
}, [
|
|
5215
|
-
t[7] || (t[7] =
|
|
5216
|
-
|
|
5223
|
+
t[7] || (t[7] = l("span", { class: "wm-mm__icon" }, [
|
|
5224
|
+
l("svg", {
|
|
5217
5225
|
width: "12",
|
|
5218
5226
|
height: "12",
|
|
5219
5227
|
viewBox: "0 0 24 24",
|
|
@@ -5224,22 +5232,22 @@ function Ua(e, t, s, i, a, n) {
|
|
|
5224
5232
|
"stroke-linejoin": "round",
|
|
5225
5233
|
"aria-hidden": "true"
|
|
5226
5234
|
}, [
|
|
5227
|
-
|
|
5235
|
+
l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
5228
5236
|
])
|
|
5229
5237
|
], -1)),
|
|
5230
|
-
|
|
5231
|
-
t[8] || (t[8] =
|
|
5232
|
-
])) :
|
|
5233
|
-
])) :
|
|
5234
|
-
s.canRename || s.canExport ? (c(), d("div", La)) :
|
|
5235
|
-
|
|
5236
|
-
|
|
5238
|
+
l("span", Ra, v(n.t("moreMenu.exportTranscript")), 1),
|
|
5239
|
+
t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
5240
|
+
])) : k("", !0)
|
|
5241
|
+
])) : k("", !0),
|
|
5242
|
+
s.canRename || s.canExport ? (c(), d("div", La)) : k("", !0),
|
|
5243
|
+
l("div", Ia, [
|
|
5244
|
+
l("button", {
|
|
5237
5245
|
type: "button",
|
|
5238
5246
|
class: "wm-mm__item",
|
|
5239
|
-
onClick: t[3] || (t[3] = (...
|
|
5247
|
+
onClick: t[3] || (t[3] = (...a) => n.toggleSound && n.toggleSound(...a))
|
|
5240
5248
|
}, [
|
|
5241
|
-
t[10] || (t[10] =
|
|
5242
|
-
|
|
5249
|
+
t[10] || (t[10] = l("span", { class: "wm-mm__icon" }, [
|
|
5250
|
+
l("svg", {
|
|
5243
5251
|
width: "12",
|
|
5244
5252
|
height: "12",
|
|
5245
5253
|
viewBox: "0 0 24 24",
|
|
@@ -5250,28 +5258,28 @@ function Ua(e, t, s, i, a, n) {
|
|
|
5250
5258
|
"stroke-linejoin": "round",
|
|
5251
5259
|
"aria-hidden": "true"
|
|
5252
5260
|
}, [
|
|
5253
|
-
|
|
5254
|
-
|
|
5261
|
+
l("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
|
|
5262
|
+
l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
5255
5263
|
])
|
|
5256
5264
|
], -1)),
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
class: R(["wm-mm__toggle", { "wm-mm__toggle--on":
|
|
5265
|
+
l("span", Ea, v(n.t("moreMenu.sound")), 1),
|
|
5266
|
+
l("span", {
|
|
5267
|
+
class: R(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
|
|
5260
5268
|
}, [...t[9] || (t[9] = [
|
|
5261
|
-
|
|
5269
|
+
l("span", { class: "wm-mm__knob" }, null, -1)
|
|
5262
5270
|
])], 2)
|
|
5263
5271
|
])
|
|
5264
5272
|
]),
|
|
5265
|
-
t[13] || (t[13] =
|
|
5266
|
-
|
|
5273
|
+
t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
|
|
5274
|
+
l("div", Ba, [
|
|
5267
5275
|
s.statusUrl ? (c(), d("button", {
|
|
5268
5276
|
key: 0,
|
|
5269
5277
|
type: "button",
|
|
5270
5278
|
class: "wm-mm__item",
|
|
5271
|
-
onClick: t[4] || (t[4] = (
|
|
5279
|
+
onClick: t[4] || (t[4] = (a) => n.emit("status"))
|
|
5272
5280
|
}, [
|
|
5273
|
-
t[11] || (t[11] =
|
|
5274
|
-
|
|
5281
|
+
t[11] || (t[11] = l("span", { class: "wm-mm__icon" }, [
|
|
5282
|
+
l("svg", {
|
|
5275
5283
|
width: "12",
|
|
5276
5284
|
height: "12",
|
|
5277
5285
|
viewBox: "0 0 24 24",
|
|
@@ -5282,19 +5290,19 @@ function Ua(e, t, s, i, a, n) {
|
|
|
5282
5290
|
"stroke-linejoin": "round",
|
|
5283
5291
|
"aria-hidden": "true"
|
|
5284
5292
|
}, [
|
|
5285
|
-
|
|
5293
|
+
l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
5286
5294
|
])
|
|
5287
5295
|
], -1)),
|
|
5288
|
-
|
|
5289
|
-
])) :
|
|
5296
|
+
l("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
|
|
5297
|
+
])) : k("", !0),
|
|
5290
5298
|
s.helpUrl ? (c(), d("button", {
|
|
5291
5299
|
key: 1,
|
|
5292
5300
|
type: "button",
|
|
5293
5301
|
class: "wm-mm__item",
|
|
5294
|
-
onClick: t[5] || (t[5] = (
|
|
5302
|
+
onClick: t[5] || (t[5] = (a) => n.emit("help"))
|
|
5295
5303
|
}, [
|
|
5296
|
-
t[12] || (t[12] =
|
|
5297
|
-
|
|
5304
|
+
t[12] || (t[12] = l("span", { class: "wm-mm__icon" }, [
|
|
5305
|
+
l("svg", {
|
|
5298
5306
|
width: "12",
|
|
5299
5307
|
height: "12",
|
|
5300
5308
|
viewBox: "0 0 24 24",
|
|
@@ -5305,16 +5313,16 @@ function Ua(e, t, s, i, a, n) {
|
|
|
5305
5313
|
"stroke-linejoin": "round",
|
|
5306
5314
|
"aria-hidden": "true"
|
|
5307
5315
|
}, [
|
|
5308
|
-
|
|
5316
|
+
l("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" })
|
|
5309
5317
|
])
|
|
5310
5318
|
], -1)),
|
|
5311
|
-
|
|
5312
|
-
])) :
|
|
5319
|
+
l("span", Na, v(n.t("moreMenu.helpCenter")), 1)
|
|
5320
|
+
])) : k("", !0)
|
|
5313
5321
|
])
|
|
5314
5322
|
])
|
|
5315
5323
|
]);
|
|
5316
5324
|
}
|
|
5317
|
-
const
|
|
5325
|
+
const Da = /* @__PURE__ */ N(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578"]]), ja = {
|
|
5318
5326
|
name: "WmRenameDialog",
|
|
5319
5327
|
inject: {
|
|
5320
5328
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5360,23 +5368,23 @@ const Na = /* @__PURE__ */ P(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578
|
|
|
5360
5368
|
class: "wm-dialog__card",
|
|
5361
5369
|
role: "dialog",
|
|
5362
5370
|
"aria-modal": "true"
|
|
5363
|
-
}, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"],
|
|
5364
|
-
function Ya(e, t, s,
|
|
5371
|
+
}, za = { class: "wm-dialog__head" }, qa = { class: "wm-dialog__title" }, Va = ["aria-label"], Ka = { class: "wm-dialog__body" }, Wa = ["placeholder"], $a = { class: "wm-dialog__actions" }, Ga = ["disabled"];
|
|
5372
|
+
function Ya(e, t, s, r, i, n) {
|
|
5365
5373
|
return c(), d("div", Fa, [
|
|
5366
|
-
|
|
5374
|
+
l("div", {
|
|
5367
5375
|
class: "wm-dialog__scrim",
|
|
5368
|
-
onClick: t[0] || (t[0] = (
|
|
5376
|
+
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
5369
5377
|
}),
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5378
|
+
l("div", Ha, [
|
|
5379
|
+
l("div", za, [
|
|
5380
|
+
l("div", qa, v(s.title || n.t("rename.title")), 1),
|
|
5381
|
+
l("button", {
|
|
5374
5382
|
type: "button",
|
|
5375
5383
|
class: "wm-dialog__close",
|
|
5376
5384
|
"aria-label": n.t("common.close"),
|
|
5377
|
-
onClick: t[1] || (t[1] = (
|
|
5385
|
+
onClick: t[1] || (t[1] = (a) => e.$emit("close"))
|
|
5378
5386
|
}, [...t[7] || (t[7] = [
|
|
5379
|
-
|
|
5387
|
+
l("svg", {
|
|
5380
5388
|
width: "12",
|
|
5381
5389
|
height: "12",
|
|
5382
5390
|
viewBox: "0 0 24 24",
|
|
@@ -5387,43 +5395,43 @@ function Ya(e, t, s, i, a, n) {
|
|
|
5387
5395
|
"stroke-linejoin": "round",
|
|
5388
5396
|
"aria-hidden": "true"
|
|
5389
5397
|
}, [
|
|
5390
|
-
|
|
5398
|
+
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5391
5399
|
], -1)
|
|
5392
5400
|
])], 8, Va)
|
|
5393
5401
|
]),
|
|
5394
|
-
|
|
5395
|
-
G(
|
|
5402
|
+
l("div", Ka, [
|
|
5403
|
+
G(l("input", {
|
|
5396
5404
|
ref: "input",
|
|
5397
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
5405
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => i.value = a),
|
|
5398
5406
|
type: "text",
|
|
5399
5407
|
class: "wm-dialog__input",
|
|
5400
5408
|
placeholder: s.placeholder || n.t("rename.placeholder"),
|
|
5401
5409
|
maxlength: 120,
|
|
5402
5410
|
onKeydown: [
|
|
5403
|
-
t[3] || (t[3] = ge(J((...
|
|
5404
|
-
t[4] || (t[4] = ge(J((
|
|
5411
|
+
t[3] || (t[3] = ge(J((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
5412
|
+
t[4] || (t[4] = ge(J((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5405
5413
|
]
|
|
5406
|
-
}, null, 40,
|
|
5407
|
-
[te,
|
|
5414
|
+
}, null, 40, Wa), [
|
|
5415
|
+
[te, i.value]
|
|
5408
5416
|
])
|
|
5409
5417
|
]),
|
|
5410
|
-
|
|
5411
|
-
|
|
5418
|
+
l("div", $a, [
|
|
5419
|
+
l("button", {
|
|
5412
5420
|
type: "button",
|
|
5413
5421
|
class: "wm-dialog__btn",
|
|
5414
|
-
onClick: t[5] || (t[5] = (
|
|
5422
|
+
onClick: t[5] || (t[5] = (a) => e.$emit("close"))
|
|
5415
5423
|
}, v(n.t("common.cancel")), 1),
|
|
5416
|
-
|
|
5424
|
+
l("button", {
|
|
5417
5425
|
type: "button",
|
|
5418
5426
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5419
5427
|
disabled: !n.canSubmit,
|
|
5420
|
-
onClick: t[6] || (t[6] = (...
|
|
5428
|
+
onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
|
|
5421
5429
|
}, v(n.t("common.save")), 9, Ga)
|
|
5422
5430
|
])
|
|
5423
5431
|
])
|
|
5424
5432
|
]);
|
|
5425
5433
|
}
|
|
5426
|
-
const Ja = /* @__PURE__ */
|
|
5434
|
+
const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", Xa = {
|
|
5427
5435
|
name: "Messenger",
|
|
5428
5436
|
components: {
|
|
5429
5437
|
Launcher: qt,
|
|
@@ -5436,7 +5444,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5436
5444
|
ApprovalCard: Ui,
|
|
5437
5445
|
FormCard: da,
|
|
5438
5446
|
Feedback: Aa,
|
|
5439
|
-
MoreMenu:
|
|
5447
|
+
MoreMenu: Da,
|
|
5440
5448
|
RenameDialog: Ja
|
|
5441
5449
|
},
|
|
5442
5450
|
mixins: [
|
|
@@ -5595,9 +5603,9 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5595
5603
|
// so the choice applies immediately, before the boot round-trip
|
|
5596
5604
|
// that materializes `state.customer` has completed.
|
|
5597
5605
|
customerLanguage() {
|
|
5598
|
-
var s,
|
|
5599
|
-
const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((
|
|
5600
|
-
return t || ((n = (
|
|
5606
|
+
var s, r, i, n;
|
|
5607
|
+
const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((r = e.values) == null ? void 0 : r.language));
|
|
5608
|
+
return t || ((n = (i = this.context) == null ? void 0 : i.customer) == null ? void 0 : n.language) || "";
|
|
5601
5609
|
},
|
|
5602
5610
|
// Resolved UI language, by priority:
|
|
5603
5611
|
// 1. explicit `language` prop (consumer override)
|
|
@@ -5644,33 +5652,33 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5644
5652
|
drawerConversations() {
|
|
5645
5653
|
var s;
|
|
5646
5654
|
const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
|
|
5647
|
-
return this.allConversations.map((
|
|
5648
|
-
var
|
|
5649
|
-
const
|
|
5650
|
-
let
|
|
5651
|
-
for (let y =
|
|
5652
|
-
const
|
|
5653
|
-
if (!
|
|
5654
|
-
if (((
|
|
5655
|
-
const E = Y(
|
|
5655
|
+
return this.allConversations.map((r) => {
|
|
5656
|
+
var b;
|
|
5657
|
+
const i = e[r.id] || [], n = Y(r.last_read_message_id);
|
|
5658
|
+
let a = 0, o = null;
|
|
5659
|
+
for (let y = i.length - 1; y >= 0; y--) {
|
|
5660
|
+
const M = i[y];
|
|
5661
|
+
if (!M) continue;
|
|
5662
|
+
if (((b = M.author) == null ? void 0 : b.type) === "user") break;
|
|
5663
|
+
const E = Y(M.id);
|
|
5656
5664
|
if (E != null) {
|
|
5657
5665
|
if (n != null && E <= n) break;
|
|
5658
|
-
t[
|
|
5666
|
+
t[M.id] !== 0 && (!o && M.author && (o = M.author), a++);
|
|
5659
5667
|
}
|
|
5660
5668
|
}
|
|
5661
|
-
if (!
|
|
5662
|
-
const y = Y(
|
|
5663
|
-
y != null && (n == null || y > n) && (
|
|
5669
|
+
if (!i.length) {
|
|
5670
|
+
const y = Y(r.last_message_id);
|
|
5671
|
+
y != null && (n == null || y > n) && (a = 1, o = r.last_message_author || null);
|
|
5664
5672
|
}
|
|
5665
|
-
const f =
|
|
5673
|
+
const f = i.filter(
|
|
5666
5674
|
(y) => !((y == null ? void 0 : y.id) != null && t[y.id] === 0)
|
|
5667
5675
|
);
|
|
5668
5676
|
return {
|
|
5669
|
-
...
|
|
5670
|
-
_preview: _t(
|
|
5671
|
-
_unread:
|
|
5672
|
-
_unreadCount:
|
|
5673
|
-
_lastAuthor:
|
|
5677
|
+
...r,
|
|
5678
|
+
_preview: _t(r, f),
|
|
5679
|
+
_unread: a > 0,
|
|
5680
|
+
_unreadCount: a,
|
|
5681
|
+
_lastAuthor: o
|
|
5674
5682
|
};
|
|
5675
5683
|
});
|
|
5676
5684
|
},
|
|
@@ -5685,14 +5693,14 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5685
5693
|
openThreads() {
|
|
5686
5694
|
var t;
|
|
5687
5695
|
const e = ((t = this.s) == null ? void 0 : t.messagesByConv) || {};
|
|
5688
|
-
return this.drawerConversations.filter((s) => s.status !== "resolved").map((s) => ({
|
|
5696
|
+
return this.drawerConversations.filter((s) => s.status !== "resolved" && s.status !== "closed").map((s) => ({
|
|
5689
5697
|
id: s.id,
|
|
5690
5698
|
title: s.name || this.t("common.newConversation"),
|
|
5691
5699
|
preview: s._preview || this.t("onboarding.newMessage"),
|
|
5692
5700
|
unread: !!s._unread,
|
|
5693
5701
|
author: s._lastAuthor || null,
|
|
5694
5702
|
_ts: Be(s, e[s.id] || [])
|
|
5695
|
-
})).sort((s,
|
|
5703
|
+
})).sort((s, r) => s._ts < r._ts ? 1 : s._ts > r._ts ? -1 : 0);
|
|
5696
5704
|
},
|
|
5697
5705
|
// Unread threads (one entry per conv with unseen agent/human
|
|
5698
5706
|
// activity), freshest first. Each entry carries everything the
|
|
@@ -5701,19 +5709,19 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5701
5709
|
latestUnreads() {
|
|
5702
5710
|
var s;
|
|
5703
5711
|
const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
|
|
5704
|
-
for (const
|
|
5705
|
-
if (!
|
|
5706
|
-
const
|
|
5712
|
+
for (const r of this.drawerConversations) {
|
|
5713
|
+
if (!r._unread) continue;
|
|
5714
|
+
const i = Be(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
|
|
5707
5715
|
t.push({
|
|
5708
|
-
convId:
|
|
5709
|
-
preview:
|
|
5710
|
-
ts:
|
|
5711
|
-
count:
|
|
5712
|
-
senderName:
|
|
5716
|
+
convId: r.id,
|
|
5717
|
+
preview: r._preview || this.t("notification.youHaveNewMessage"),
|
|
5718
|
+
ts: i,
|
|
5719
|
+
count: r._unreadCount || 1,
|
|
5720
|
+
senderName: o,
|
|
5713
5721
|
senderAvatarUrl: f
|
|
5714
5722
|
});
|
|
5715
5723
|
}
|
|
5716
|
-
return t.sort((
|
|
5724
|
+
return t.sort((r, i) => r.ts < i.ts ? 1 : r.ts > i.ts ? -1 : 0), t;
|
|
5717
5725
|
},
|
|
5718
5726
|
// Notification cards shown in the closed-launcher stack: the unread
|
|
5719
5727
|
// threads above, minus any the user has dismissed (×) for their
|
|
@@ -5749,7 +5757,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5749
5757
|
var s;
|
|
5750
5758
|
const e = (s = this.widget) == null ? void 0 : s.quick_links;
|
|
5751
5759
|
if (!Array.isArray(e)) return "";
|
|
5752
|
-
const t = e.find((
|
|
5760
|
+
const t = e.find((r) => r.icon === "status" && r.url);
|
|
5753
5761
|
return (t == null ? void 0 : t.url) || "";
|
|
5754
5762
|
},
|
|
5755
5763
|
helpUrl() {
|
|
@@ -5757,7 +5765,7 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5757
5765
|
const e = (s = this.widget) == null ? void 0 : s.quick_links;
|
|
5758
5766
|
if (!Array.isArray(e)) return "";
|
|
5759
5767
|
const t = e.find(
|
|
5760
|
-
(
|
|
5768
|
+
(r) => (r.icon === "chat" || r.icon === "help") && r.url
|
|
5761
5769
|
);
|
|
5762
5770
|
return (t == null ? void 0 : t.url) || "";
|
|
5763
5771
|
},
|
|
@@ -5824,12 +5832,12 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5824
5832
|
// Last message from a human agent in the current conversation —
|
|
5825
5833
|
// used to surface the human agent's name + avatar in the header.
|
|
5826
5834
|
humanMessageAuthor() {
|
|
5827
|
-
var t, s,
|
|
5835
|
+
var t, s, r;
|
|
5828
5836
|
if (!this.currentConv) return null;
|
|
5829
5837
|
const e = ((t = this.s.messagesByConv) == null ? void 0 : t[this.currentConv.id]) || [];
|
|
5830
|
-
for (let
|
|
5831
|
-
if (((
|
|
5832
|
-
return e[
|
|
5838
|
+
for (let i = e.length - 1; i >= 0; i--)
|
|
5839
|
+
if (((r = (s = e[i]) == null ? void 0 : s.author) == null ? void 0 : r.type) === "agent_human")
|
|
5840
|
+
return e[i].author;
|
|
5833
5841
|
return null;
|
|
5834
5842
|
},
|
|
5835
5843
|
humanAgentName() {
|
|
@@ -5847,9 +5855,13 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5847
5855
|
return !!this.humanMessageAuthor;
|
|
5848
5856
|
},
|
|
5849
5857
|
isWaitingHuman() {
|
|
5858
|
+
var e;
|
|
5859
|
+
return ((e = this.currentConv) == null ? void 0 : e.status) === "waiting_human_response";
|
|
5860
|
+
},
|
|
5861
|
+
isTerminal() {
|
|
5850
5862
|
var t;
|
|
5851
5863
|
const e = (t = this.currentConv) == null ? void 0 : t.status;
|
|
5852
|
-
return e === "
|
|
5864
|
+
return e === "resolved" || e === "closed";
|
|
5853
5865
|
},
|
|
5854
5866
|
headerTitle() {
|
|
5855
5867
|
var e, t;
|
|
@@ -5861,41 +5873,55 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5861
5873
|
}) : this.isWaitingHuman ? this.t("composer.agentTakingOver") : this.t("composer.placeholder");
|
|
5862
5874
|
},
|
|
5863
5875
|
displayedMessages() {
|
|
5864
|
-
var
|
|
5876
|
+
var i, n;
|
|
5865
5877
|
const e = this.currentConv;
|
|
5866
5878
|
if (!e) return [];
|
|
5867
5879
|
const t = this.welcomeRevealedAt[e.id] > 0 ? this.buildWelcomePrefix(e) : [];
|
|
5868
5880
|
if (!e._draft) {
|
|
5869
|
-
const
|
|
5870
|
-
if (!(
|
|
5881
|
+
const a = (n = (i = this.s) == null ? void 0 : i.paginationByConv) == null ? void 0 : n[e.id];
|
|
5882
|
+
if (!(a != null && a.loaded)) return t;
|
|
5871
5883
|
}
|
|
5872
|
-
const s = this.revealedAt,
|
|
5873
|
-
var
|
|
5874
|
-
return (
|
|
5884
|
+
const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
|
|
5885
|
+
var o, f, b, y, M;
|
|
5886
|
+
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (M = a == null ? void 0 : a.metadata) != null && M.form ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
|
|
5875
5887
|
});
|
|
5876
|
-
return t.length ? [...t, ...
|
|
5888
|
+
return t.length ? [...t, ...r] : r;
|
|
5877
5889
|
},
|
|
5878
5890
|
// True whenever we should show the "typing" indicator at the bottom
|
|
5879
5891
|
// of the list: either the LLM is actively streaming tokens, or one
|
|
5880
5892
|
// or more agent messages are queued and waiting for their reveal
|
|
5881
5893
|
// slot to fire.
|
|
5882
5894
|
streamingActive() {
|
|
5883
|
-
var s,
|
|
5895
|
+
var s, r, i;
|
|
5884
5896
|
const e = this.currentConv;
|
|
5885
|
-
return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((
|
|
5897
|
+
return e ? Object.keys(((s = this.s) == null ? void 0 : s.streamingByMsgId) || {}).length > 0 ? !0 : this.actionInFlight ? !1 : this.widgetWelcomeMessage && this.welcomeRevealedAt[e.id] === 0 ? !0 : (((i = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : i[e.id]) || []).some(
|
|
5886
5898
|
(n) => he(n) && !(this.revealedAt[n.id] > 0)
|
|
5887
5899
|
) : !1;
|
|
5888
5900
|
},
|
|
5889
5901
|
// Internal: the raw persisted list for the current conversation. We
|
|
5890
5902
|
// watch this to detect new agent messages that need to be paced.
|
|
5891
5903
|
currentConvMessages() {
|
|
5892
|
-
var t, s,
|
|
5904
|
+
var t, s, r;
|
|
5893
5905
|
const e = (t = this.currentConv) == null ? void 0 : t.id;
|
|
5894
|
-
return e ? ((
|
|
5906
|
+
return e ? ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e]) || [] : [];
|
|
5895
5907
|
},
|
|
5896
5908
|
pendingApproval() {
|
|
5897
5909
|
return !this.currentConv || !this.store || this.actionInFlight ? null : this.store.getPendingApproval(this.currentConv.id);
|
|
5898
5910
|
},
|
|
5911
|
+
// Carte de résolution (propose_resolution) : dernier message porteur de
|
|
5912
|
+
// `metadata.resolution_request` dont les callbacks ne sont pas encore
|
|
5913
|
+
// consommés (le serveur les clear au clic) et sans clic optimiste en vol.
|
|
5914
|
+
pendingResolution() {
|
|
5915
|
+
var t, s, r, i, n;
|
|
5916
|
+
if (!this.currentConv || !this.store || this.actionInFlight || this.pendingApproval) return null;
|
|
5917
|
+
const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
|
|
5918
|
+
for (let a = e.length - 1; a >= 0; a--) {
|
|
5919
|
+
const o = e[a];
|
|
5920
|
+
if ((r = o == null ? void 0 : o.metadata) != null && r.resolution_request)
|
|
5921
|
+
return !Array.isArray(o.callbacks) || !o.callbacks.length || (n = (i = this.s) == null ? void 0 : i.awaitingCallback) != null && n[o.id] ? null : o;
|
|
5922
|
+
}
|
|
5923
|
+
return null;
|
|
5924
|
+
},
|
|
5899
5925
|
// The approval card sits on top of the chat as an overlay. It must
|
|
5900
5926
|
// appear only once the conversation has visibly settled, never
|
|
5901
5927
|
// alongside typing dots or before the explaining bubble. See
|
|
@@ -5908,14 +5934,14 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5908
5934
|
return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((s = this.pendingApproval) == null ? void 0 : s.text_md) || this.t("action.title");
|
|
5909
5935
|
},
|
|
5910
5936
|
approvalDetail() {
|
|
5911
|
-
var
|
|
5912
|
-
const e = (n = (
|
|
5937
|
+
var r, i, n, a, o, f;
|
|
5938
|
+
const e = (n = (i = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : i.pending) == null ? void 0 : n.user_explanation;
|
|
5913
5939
|
if (typeof e == "string" && e.trim())
|
|
5914
5940
|
return e.trim();
|
|
5915
|
-
const t = (f = (
|
|
5941
|
+
const t = (f = (o = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : o.pending) == null ? void 0 : f.prepared_params;
|
|
5916
5942
|
if (!t || typeof t != "object") return "";
|
|
5917
5943
|
const s = Object.entries(t);
|
|
5918
|
-
return s.length ? s.slice(0, 2).map(([
|
|
5944
|
+
return s.length ? s.slice(0, 2).map(([b, y]) => `${b}: ${y}`).join(" · ") : "";
|
|
5919
5945
|
},
|
|
5920
5946
|
actionInFlight() {
|
|
5921
5947
|
var e, t;
|
|
@@ -5935,9 +5961,9 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5935
5961
|
// welcome bubble is client-side only and intentionally not
|
|
5936
5962
|
// counted here.
|
|
5937
5963
|
conversationIsEmpty() {
|
|
5938
|
-
var s,
|
|
5964
|
+
var s, r;
|
|
5939
5965
|
const e = this.currentConv;
|
|
5940
|
-
return e ? e._draft ? !0 : (((
|
|
5966
|
+
return e ? e._draft ? !0 : (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).length === 0 : !1;
|
|
5941
5967
|
},
|
|
5942
5968
|
// Maps `widget.starter_prompts` ({ title, message }) into the
|
|
5943
5969
|
// SuggestionChips shape so they render alongside / in place of
|
|
@@ -5950,14 +5976,14 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5950
5976
|
const e = (s = this.widget) == null ? void 0 : s.starter_prompts;
|
|
5951
5977
|
if (!Array.isArray(e)) return [];
|
|
5952
5978
|
const t = [];
|
|
5953
|
-
for (const
|
|
5954
|
-
if (!
|
|
5955
|
-
const
|
|
5956
|
-
if (!
|
|
5957
|
-
const n = typeof
|
|
5979
|
+
for (const r of e) {
|
|
5980
|
+
if (!r || typeof r != "object") continue;
|
|
5981
|
+
const i = typeof r.title == "string" ? r.title.trim() : "";
|
|
5982
|
+
if (!i) continue;
|
|
5983
|
+
const n = typeof r.message == "string" ? r.message.trim() : "";
|
|
5958
5984
|
t.push({
|
|
5959
|
-
label:
|
|
5960
|
-
text: n ||
|
|
5985
|
+
label: i,
|
|
5986
|
+
text: n || i,
|
|
5961
5987
|
kind: "starter"
|
|
5962
5988
|
});
|
|
5963
5989
|
}
|
|
@@ -5978,17 +6004,17 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5978
6004
|
return e ? this.feedbackDone ? !0 : e.status !== "resolved" ? !1 : !((t = e.metadata) != null && t.feedback) : !1;
|
|
5979
6005
|
},
|
|
5980
6006
|
floatVisible() {
|
|
5981
|
-
return this.approvalReady || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
|
|
6007
|
+
return this.approvalReady || !!this.pendingResolution || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
|
|
5982
6008
|
},
|
|
5983
6009
|
dateLabel() {
|
|
5984
|
-
var s,
|
|
6010
|
+
var s, r, i;
|
|
5985
6011
|
const e = this.currentConv;
|
|
5986
6012
|
let t = /* @__PURE__ */ new Date();
|
|
5987
6013
|
if (e) {
|
|
5988
|
-
const
|
|
5989
|
-
if (
|
|
5990
|
-
const
|
|
5991
|
-
Number.isNaN(
|
|
6014
|
+
const a = ((i = (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).find((o) => o == null ? void 0 : o.created_at)) == null ? void 0 : i.created_at) || e.created_at;
|
|
6015
|
+
if (a) {
|
|
6016
|
+
const o = new Date(a);
|
|
6017
|
+
Number.isNaN(o.getTime()) || (t = o);
|
|
5992
6018
|
}
|
|
5993
6019
|
}
|
|
5994
6020
|
return this.t("messageList.today", {
|
|
@@ -6000,8 +6026,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6000
6026
|
// history available, nothing loading) so the loader stays inert
|
|
6001
6027
|
// until `openConversation` has populated the entry.
|
|
6002
6028
|
paginationState() {
|
|
6003
|
-
var s,
|
|
6004
|
-
const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (
|
|
6029
|
+
var s, r, i;
|
|
6030
|
+
const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (i = (r = this.s) == null ? void 0 : r.paginationByConv) == null ? void 0 : i[e] : null;
|
|
6005
6031
|
return {
|
|
6006
6032
|
loading: !!(t != null && t.loading),
|
|
6007
6033
|
hasMore: !!(t != null && t.nextCursor)
|
|
@@ -6016,13 +6042,13 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6016
6042
|
// ts comparison in `launcherPeeks`.
|
|
6017
6043
|
latestUnreads: {
|
|
6018
6044
|
handler(e) {
|
|
6019
|
-
const t = new Set(e.map((
|
|
6020
|
-
if (!
|
|
6021
|
-
const
|
|
6045
|
+
const t = new Set(e.map((a) => a.convId)), s = this.dismissedPeeks || {}, r = Object.keys(s);
|
|
6046
|
+
if (!r.length) return;
|
|
6047
|
+
const i = {};
|
|
6022
6048
|
let n = !1;
|
|
6023
|
-
for (const
|
|
6024
|
-
t.has(
|
|
6025
|
-
n && (this.dismissedPeeks =
|
|
6049
|
+
for (const a of r)
|
|
6050
|
+
t.has(a) ? i[a] = s[a] : n = !0;
|
|
6051
|
+
n && (this.dismissedPeeks = i);
|
|
6026
6052
|
},
|
|
6027
6053
|
deep: !0
|
|
6028
6054
|
},
|
|
@@ -6135,8 +6161,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6135
6161
|
const t = e == null ? void 0 : e.data;
|
|
6136
6162
|
if (!(!t || typeof t != "object")) {
|
|
6137
6163
|
if (t.type === "UPDATE") {
|
|
6138
|
-
this.transport && t.payload && this.transport.update(t.payload).catch((
|
|
6139
|
-
console.warn("[messenger] update failed",
|
|
6164
|
+
this.transport && t.payload && this.transport.update(t.payload).catch((r) => {
|
|
6165
|
+
console.warn("[messenger] update failed", r);
|
|
6140
6166
|
});
|
|
6141
6167
|
return;
|
|
6142
6168
|
}
|
|
@@ -6144,8 +6170,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6144
6170
|
this.transport && t.payload && this.transport.context(t.payload);
|
|
6145
6171
|
return;
|
|
6146
6172
|
}
|
|
6147
|
-
t.type === "INIT" && (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentVariables = t.variables && typeof t.variables == "object" ? t.variables : t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (s = this.parentInitDeferred) != null && s._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((
|
|
6148
|
-
console.warn("[messenger] eager boot failed",
|
|
6173
|
+
t.type === "INIT" && (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentVariables = t.variables && typeof t.variables == "object" ? t.variables : t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (s = this.parentInitDeferred) != null && s._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.parentToken && this.hasValidSessionMarker() && this.boot().catch((r) => {
|
|
6174
|
+
console.warn("[messenger] eager boot failed", r);
|
|
6149
6175
|
}));
|
|
6150
6176
|
}
|
|
6151
6177
|
},
|
|
@@ -6179,8 +6205,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6179
6205
|
variables: e && typeof e == "object" ? e : void 0
|
|
6180
6206
|
}), e && typeof e == "object") {
|
|
6181
6207
|
const t = {};
|
|
6182
|
-
for (const [s,
|
|
6183
|
-
s !== "customer" &&
|
|
6208
|
+
for (const [s, r] of Object.entries(e))
|
|
6209
|
+
s !== "customer" && r && typeof r == "object" && !Array.isArray(r) && (t[s] = r);
|
|
6184
6210
|
Object.keys(t).length > 0 && this.transport.context(t);
|
|
6185
6211
|
}
|
|
6186
6212
|
this.setupLiveReveal();
|
|
@@ -6206,12 +6232,12 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6206
6232
|
return;
|
|
6207
6233
|
}
|
|
6208
6234
|
this.floatRO = new ResizeObserver((s) => {
|
|
6209
|
-
const
|
|
6210
|
-
if (!
|
|
6211
|
-
const
|
|
6212
|
-
|
|
6213
|
-
var n,
|
|
6214
|
-
(
|
|
6235
|
+
const r = s[0];
|
|
6236
|
+
if (!r) return;
|
|
6237
|
+
const i = Math.ceil(r.contentRect.height + 8);
|
|
6238
|
+
i !== this.floatHeight && (this.floatHeight = i, this.$nextTick(() => {
|
|
6239
|
+
var n, a;
|
|
6240
|
+
(a = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || a.call(n);
|
|
6215
6241
|
}));
|
|
6216
6242
|
}), this.floatRO.observe(t);
|
|
6217
6243
|
}
|
|
@@ -6265,37 +6291,37 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6265
6291
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
6266
6292
|
},
|
|
6267
6293
|
sendCurrentLauncherSize() {
|
|
6268
|
-
var y,
|
|
6294
|
+
var y, M, E, A, q, T, U;
|
|
6269
6295
|
if (this.isOpen) return;
|
|
6270
|
-
const e = (
|
|
6296
|
+
const e = (M = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : M.call(y, ".wm-launcherWrap");
|
|
6271
6297
|
if (!e) return;
|
|
6272
6298
|
const t = e.getBoundingClientRect();
|
|
6273
6299
|
if (!t.width || !t.height) return;
|
|
6274
|
-
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0,
|
|
6275
|
-
let
|
|
6300
|
+
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), o = (U = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : U.call(T, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
|
|
6301
|
+
let b = null;
|
|
6276
6302
|
if (f) {
|
|
6277
|
-
const
|
|
6278
|
-
|
|
6279
|
-
width: Math.ceil(
|
|
6280
|
-
height: Math.ceil(
|
|
6281
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
6282
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
6303
|
+
const D = f.getBoundingClientRect();
|
|
6304
|
+
b = {
|
|
6305
|
+
width: Math.ceil(D.width),
|
|
6306
|
+
height: Math.ceil(D.height),
|
|
6307
|
+
rightOffset: Math.max(0, Math.ceil(t.right - D.right)),
|
|
6308
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - D.bottom))
|
|
6283
6309
|
};
|
|
6284
6310
|
}
|
|
6285
6311
|
this.notifyParentResize("closed", {
|
|
6286
|
-
width:
|
|
6287
|
-
height: n +
|
|
6288
|
-
launcherWidth: (
|
|
6289
|
-
launcherHeight: (
|
|
6312
|
+
width: i + r,
|
|
6313
|
+
height: n + r,
|
|
6314
|
+
launcherWidth: (a == null ? void 0 : a.offsetWidth) || null,
|
|
6315
|
+
launcherHeight: (a == null ? void 0 : a.offsetHeight) || null,
|
|
6290
6316
|
launcherHovered: this.launcherHovered,
|
|
6291
|
-
peek:
|
|
6317
|
+
peek: b,
|
|
6292
6318
|
peekHovered: this.launcherHovered && s
|
|
6293
6319
|
});
|
|
6294
6320
|
},
|
|
6295
6321
|
observeLauncherSize() {
|
|
6296
|
-
var s,
|
|
6322
|
+
var s, r;
|
|
6297
6323
|
if (typeof ResizeObserver > "u") return;
|
|
6298
|
-
const e = (
|
|
6324
|
+
const e = (r = (s = this.$el) == null ? void 0 : s.querySelector) == null ? void 0 : r.call(s, ".wm-launcherWrap");
|
|
6299
6325
|
if (!e) return;
|
|
6300
6326
|
this._launcherRo && this._launcherRo.disconnect();
|
|
6301
6327
|
const t = new ResizeObserver(() => {
|
|
@@ -6306,9 +6332,9 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6306
6332
|
// Opening straight from a notification card: land on that card's
|
|
6307
6333
|
// thread rather than whatever was last active.
|
|
6308
6334
|
async openFromPeek(e) {
|
|
6309
|
-
var s,
|
|
6335
|
+
var s, r;
|
|
6310
6336
|
const t = e || ((s = this.latestUnreads[0]) == null ? void 0 : s.convId);
|
|
6311
|
-
t && t !== ((
|
|
6337
|
+
t && t !== ((r = this.currentConv) == null ? void 0 : r.id) && (this.draftConv = null, this.activeConvId = t, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1), await this.open();
|
|
6312
6338
|
},
|
|
6313
6339
|
// Stamp the dismissed batch ts for a single conv so its card
|
|
6314
6340
|
// disappears from the stack until a fresher message arrives.
|
|
@@ -6408,17 +6434,17 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6408
6434
|
...this.welcomeRevealedAt,
|
|
6409
6435
|
[e]: 0
|
|
6410
6436
|
};
|
|
6411
|
-
const
|
|
6412
|
-
|
|
6413
|
-
Math.max(
|
|
6414
|
-
),
|
|
6437
|
+
const i = this.revealPacing, n = t.trim().length, a = Math.min(
|
|
6438
|
+
i.maxTypingMs,
|
|
6439
|
+
Math.max(i.minTypingMs, n * i.msPerChar)
|
|
6440
|
+
), o = i.firstRevealDelayMs + a, f = setTimeout(() => {
|
|
6415
6441
|
this.welcomeRevealedAt = {
|
|
6416
6442
|
...this.welcomeRevealedAt,
|
|
6417
6443
|
[e]: Date.now()
|
|
6418
6444
|
};
|
|
6419
|
-
const
|
|
6420
|
-
delete
|
|
6421
|
-
},
|
|
6445
|
+
const b = { ...this.welcomeRevealTimers };
|
|
6446
|
+
delete b[e], this.welcomeRevealTimers = b;
|
|
6447
|
+
}, o);
|
|
6422
6448
|
this.welcomeRevealTimers = {
|
|
6423
6449
|
...this.welcomeRevealTimers,
|
|
6424
6450
|
[e]: f
|
|
@@ -6448,10 +6474,10 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6448
6474
|
this.draftConv = null, this.activeConvId = e.id, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = t;
|
|
6449
6475
|
try {
|
|
6450
6476
|
await this.store.openConversation(e.id);
|
|
6451
|
-
} catch (
|
|
6452
|
-
console.error("[ww-messenger] open conv failed",
|
|
6477
|
+
} catch (r) {
|
|
6478
|
+
console.error("[ww-messenger] open conv failed", r);
|
|
6453
6479
|
}
|
|
6454
|
-
const s = this.allConversations.find((
|
|
6480
|
+
const s = this.allConversations.find((r) => r.id === e.id);
|
|
6455
6481
|
s && this.markConvRead(s);
|
|
6456
6482
|
},
|
|
6457
6483
|
async onMoreAction(e) {
|
|
@@ -6495,8 +6521,8 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6495
6521
|
if (!(!s || s === t.name))
|
|
6496
6522
|
try {
|
|
6497
6523
|
await this.store.patchConversation(t.id, { name: s });
|
|
6498
|
-
} catch (
|
|
6499
|
-
console.error("[ww-messenger] rename failed",
|
|
6524
|
+
} catch (r) {
|
|
6525
|
+
console.error("[ww-messenger] rename failed", r);
|
|
6500
6526
|
}
|
|
6501
6527
|
},
|
|
6502
6528
|
// ── Send / suggestion / form / attach / feedback ────────────────
|
|
@@ -6504,14 +6530,14 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6504
6530
|
let t = this.currentConv;
|
|
6505
6531
|
if (!t && (this.startConv(), t = this.currentConv, !t) || t._draft && (t = await this.ensureRealConv(), !t))
|
|
6506
6532
|
return;
|
|
6507
|
-
const s = t.id,
|
|
6533
|
+
const s = t.id, r = this.pendingAttachments.slice();
|
|
6508
6534
|
this.pendingAttachments = [], this.unreadAnchorId = null, this.unreadBoundaryTs = "";
|
|
6509
|
-
const
|
|
6510
|
-
const { previewUrl:
|
|
6511
|
-
return
|
|
6535
|
+
const i = r.map((n) => {
|
|
6536
|
+
const { previewUrl: a, ...o } = n;
|
|
6537
|
+
return o;
|
|
6512
6538
|
});
|
|
6513
6539
|
await this.store.send(s, e, {
|
|
6514
|
-
attachments:
|
|
6540
|
+
attachments: i.length ? i : void 0
|
|
6515
6541
|
});
|
|
6516
6542
|
},
|
|
6517
6543
|
async onSuggestion(e) {
|
|
@@ -6527,13 +6553,17 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6527
6553
|
const t = this.pendingApproval;
|
|
6528
6554
|
t && await this.store.clickCallback(t.id, e);
|
|
6529
6555
|
},
|
|
6556
|
+
async onResolutionCallback(e) {
|
|
6557
|
+
const t = this.pendingResolution;
|
|
6558
|
+
t && await this.store.clickCallback(t.id, e);
|
|
6559
|
+
},
|
|
6530
6560
|
async onFormSubmit({ values: e }) {
|
|
6531
6561
|
const t = this.pendingForm;
|
|
6532
6562
|
if (!(t != null && t.form)) return;
|
|
6533
6563
|
const s = ht(t.form, e, this.translator);
|
|
6534
6564
|
if (!s) return;
|
|
6535
|
-
let
|
|
6536
|
-
|
|
6565
|
+
let r = this.currentConv;
|
|
6566
|
+
r && (r._draft && (r = await this.ensureRealConv(), !r) || await this.store.send(r.id, s, {
|
|
6537
6567
|
metadata: {
|
|
6538
6568
|
artifact: mt(
|
|
6539
6569
|
t.form,
|
|
@@ -6561,23 +6591,23 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6561
6591
|
var t, s;
|
|
6562
6592
|
if (!(!e || !this.transport))
|
|
6563
6593
|
try {
|
|
6564
|
-
const
|
|
6594
|
+
const r = await this.transport.uploadAttachment(e), i = (r == null ? void 0 : r.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((r == null ? void 0 : r.mime_type) || "").toLowerCase().startsWith("image/");
|
|
6565
6595
|
let n = null;
|
|
6566
|
-
if (
|
|
6596
|
+
if (i)
|
|
6567
6597
|
try {
|
|
6568
|
-
n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t,
|
|
6598
|
+
n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, r.path)) || null;
|
|
6569
6599
|
} catch {
|
|
6570
6600
|
}
|
|
6571
6601
|
this.pendingAttachments.push({
|
|
6572
|
-
type:
|
|
6573
|
-
path:
|
|
6602
|
+
type: r.type || "file",
|
|
6603
|
+
path: r.path,
|
|
6574
6604
|
name: e.name || this.t("attachment.fileFallbackName"),
|
|
6575
6605
|
mime_type: e.type,
|
|
6576
6606
|
size_bytes: e.size,
|
|
6577
6607
|
previewUrl: n
|
|
6578
6608
|
});
|
|
6579
|
-
} catch (
|
|
6580
|
-
console.error("[ww-messenger] attachment upload failed",
|
|
6609
|
+
} catch (r) {
|
|
6610
|
+
console.error("[ww-messenger] attachment upload failed", r);
|
|
6581
6611
|
}
|
|
6582
6612
|
},
|
|
6583
6613
|
// Délégation des clics sur les liens `<a href="#...">` rendus dans le
|
|
@@ -6666,42 +6696,47 @@ const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6666
6696
|
}, ho = { class: "wm-attached__fileMeta" }, mo = { class: "wm-attached__fileName" }, fo = {
|
|
6667
6697
|
key: 0,
|
|
6668
6698
|
class: "wm-attached__fileSize"
|
|
6669
|
-
}, _o = ["aria-label", "onClick"]
|
|
6670
|
-
|
|
6671
|
-
|
|
6699
|
+
}, _o = ["aria-label", "onClick"], go = {
|
|
6700
|
+
key: 3,
|
|
6701
|
+
class: "wm-ended",
|
|
6702
|
+
role: "status",
|
|
6703
|
+
"aria-live": "polite"
|
|
6704
|
+
}, po = { class: "wm-ended__lbl" };
|
|
6705
|
+
function vo(e, t, s, r, i, n) {
|
|
6706
|
+
const a = B("Launcher"), o = B("Header"), f = B("History"), b = B("Onboarding"), y = B("MessageList"), M = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), T = B("Composer"), U = B("MoreMenu"), D = B("RenameDialog");
|
|
6672
6707
|
return c(), d("div", {
|
|
6673
6708
|
class: R(["wm-root", `wm-root--${s.displayMode}`]),
|
|
6674
6709
|
style: z(n.rootStyle)
|
|
6675
6710
|
}, [
|
|
6676
|
-
!
|
|
6711
|
+
!i.isOpen && !n.isEmbedded ? (c(), P(a, {
|
|
6677
6712
|
key: 0,
|
|
6678
6713
|
"unread-count": n.unreadCount,
|
|
6679
6714
|
peeks: n.launcherPeeks,
|
|
6680
6715
|
onOpen: n.openFromPeek,
|
|
6681
6716
|
onDismiss: n.dismissPeek,
|
|
6682
6717
|
onHover: n.onLauncherHover
|
|
6683
|
-
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) :
|
|
6684
|
-
|
|
6718
|
+
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
|
|
6719
|
+
i.isOpen || n.isEmbedded ? (c(), d("section", {
|
|
6685
6720
|
key: 1,
|
|
6686
6721
|
class: R([
|
|
6687
6722
|
"wm-panel",
|
|
6688
6723
|
`wm-panel--${s.displayMode}`,
|
|
6689
6724
|
{ "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
|
|
6690
6725
|
]),
|
|
6691
|
-
style: z(
|
|
6726
|
+
style: z(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
|
|
6692
6727
|
role: "dialog",
|
|
6693
6728
|
"aria-label": "Messenger",
|
|
6694
|
-
onClick: t[
|
|
6729
|
+
onClick: t[7] || (t[7] = (...L) => n.onPanelClick && n.onPanelClick(...L))
|
|
6695
6730
|
}, [
|
|
6696
6731
|
!n.ready && !n.error ? (c(), d("div", Qa, [
|
|
6697
|
-
n.isEmbedded ?
|
|
6732
|
+
n.isEmbedded ? k("", !0) : (c(), d("button", {
|
|
6698
6733
|
key: 0,
|
|
6699
6734
|
type: "button",
|
|
6700
6735
|
class: "wm-loading__close",
|
|
6701
6736
|
"aria-label": n.t("loading.minimize"),
|
|
6702
6737
|
onClick: t[0] || (t[0] = (...L) => n.close && n.close(...L))
|
|
6703
|
-
}, [...t[
|
|
6704
|
-
|
|
6738
|
+
}, [...t[8] || (t[8] = [
|
|
6739
|
+
l("svg", {
|
|
6705
6740
|
width: "13",
|
|
6706
6741
|
height: "13",
|
|
6707
6742
|
viewBox: "0 0 24 24",
|
|
@@ -6712,22 +6747,22 @@ function go(e, t, s, i, a, n) {
|
|
|
6712
6747
|
"stroke-linejoin": "round",
|
|
6713
6748
|
"aria-hidden": "true"
|
|
6714
6749
|
}, [
|
|
6715
|
-
|
|
6750
|
+
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6716
6751
|
], -1)
|
|
6717
6752
|
])], 8, Za)),
|
|
6718
|
-
t[
|
|
6753
|
+
t[9] || (t[9] = l("div", {
|
|
6719
6754
|
class: "wm-loading__spinner",
|
|
6720
6755
|
"aria-hidden": "true"
|
|
6721
6756
|
}, null, -1))
|
|
6722
6757
|
])) : (c(), d(I, { key: 1 }, [
|
|
6723
|
-
|
|
6758
|
+
K(o, {
|
|
6724
6759
|
title: n.headerTitle,
|
|
6725
6760
|
"team-members": n.teamMembers,
|
|
6726
6761
|
"response-label": n.responseLabel,
|
|
6727
6762
|
"show-identity": !!n.currentConv,
|
|
6728
6763
|
"show-back": n.canBack,
|
|
6729
6764
|
"show-close": !n.isEmbedded,
|
|
6730
|
-
"more-active":
|
|
6765
|
+
"more-active": i.moreOpen,
|
|
6731
6766
|
"agent-name": n.agentName,
|
|
6732
6767
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6733
6768
|
onBack: n.goHome,
|
|
@@ -6735,9 +6770,9 @@ function go(e, t, s, i, a, n) {
|
|
|
6735
6770
|
onClose: n.close
|
|
6736
6771
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6737
6772
|
n.error ? (c(), d("div", eo, [
|
|
6738
|
-
|
|
6739
|
-
t[
|
|
6740
|
-
|
|
6773
|
+
l("div", to, [
|
|
6774
|
+
t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
|
|
6775
|
+
l("svg", {
|
|
6741
6776
|
width: "14",
|
|
6742
6777
|
height: "14",
|
|
6743
6778
|
viewBox: "0 0 24 24",
|
|
@@ -6748,20 +6783,20 @@ function go(e, t, s, i, a, n) {
|
|
|
6748
6783
|
"stroke-linejoin": "round",
|
|
6749
6784
|
"aria-hidden": "true"
|
|
6750
6785
|
}, [
|
|
6751
|
-
|
|
6786
|
+
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6752
6787
|
])
|
|
6753
6788
|
], -1)),
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6789
|
+
l("div", null, [
|
|
6790
|
+
l("div", no, v(n.t("error.connectionFailed")), 1),
|
|
6791
|
+
l("div", so, v(n.error), 1)
|
|
6757
6792
|
])
|
|
6758
6793
|
])
|
|
6759
|
-
])) : !n.currentConv &&
|
|
6794
|
+
])) : !n.currentConv && i.showHistory ? (c(), P(f, {
|
|
6760
6795
|
key: 1,
|
|
6761
6796
|
threads: n.openThreads,
|
|
6762
6797
|
onResume: n.onDrawerPick
|
|
6763
6798
|
}, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d(I, { key: 3 }, [
|
|
6764
|
-
|
|
6799
|
+
K(y, {
|
|
6765
6800
|
ref: "messageList",
|
|
6766
6801
|
messages: n.displayedMessages,
|
|
6767
6802
|
"streaming-active": n.streamingActive,
|
|
@@ -6775,9 +6810,9 @@ function go(e, t, s, i, a, n) {
|
|
|
6775
6810
|
"ai-agent-avatar-url": n.agentAvatarUrl,
|
|
6776
6811
|
onLoadMore: n.onLoadMore
|
|
6777
6812
|
}, 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"]),
|
|
6778
|
-
|
|
6813
|
+
l("div", ro, [
|
|
6779
6814
|
n.floatVisible ? (c(), d("div", io, [
|
|
6780
|
-
n.approvalReady ? (c(),
|
|
6815
|
+
n.approvalReady ? (c(), P(M, {
|
|
6781
6816
|
key: 0,
|
|
6782
6817
|
action: n.approvalTitle,
|
|
6783
6818
|
detail: n.approvalDetail,
|
|
@@ -6785,35 +6820,42 @@ function go(e, t, s, i, a, n) {
|
|
|
6785
6820
|
"agent-name": n.agentName,
|
|
6786
6821
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6787
6822
|
onCallback: n.onApprovalCallback
|
|
6788
|
-
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.
|
|
6823
|
+
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingResolution ? (c(), P(M, {
|
|
6824
|
+
key: 1,
|
|
6825
|
+
action: n.pendingResolution.text_md,
|
|
6826
|
+
callbacks: n.pendingResolution.callbacks,
|
|
6827
|
+
"agent-name": n.agentName,
|
|
6828
|
+
"agent-avatar-url": n.agentAvatarUrl,
|
|
6829
|
+
onCallback: n.onResolutionCallback
|
|
6830
|
+
}, null, 8, ["action", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), P(E, {
|
|
6789
6831
|
key: n.pendingForm.message && n.pendingForm.message.id,
|
|
6790
6832
|
form: n.pendingForm.form,
|
|
6791
6833
|
"agent-name": n.agentName,
|
|
6792
6834
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6793
6835
|
onSubmit: n.onFormSubmit
|
|
6794
|
-
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(),
|
|
6795
|
-
key: 2,
|
|
6796
|
-
busy: a.feedbackBusy,
|
|
6797
|
-
done: a.feedbackDone,
|
|
6798
|
-
onSubmit: n.onFeedback
|
|
6799
|
-
}, null, 8, ["busy", "done", "onSubmit"])) : (c(), D(q, {
|
|
6836
|
+
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), P(A, {
|
|
6800
6837
|
key: 3,
|
|
6838
|
+
busy: i.feedbackBusy,
|
|
6839
|
+
done: i.feedbackDone,
|
|
6840
|
+
onSubmit: n.onFeedback
|
|
6841
|
+
}, null, 8, ["busy", "done", "onSubmit"])) : (c(), P(q, {
|
|
6842
|
+
key: 4,
|
|
6801
6843
|
items: n.suggestions,
|
|
6802
6844
|
onSelect: n.onSuggestion
|
|
6803
6845
|
}, null, 8, ["items", "onSelect"]))
|
|
6804
|
-
], 512)) :
|
|
6846
|
+
], 512)) : k("", !0),
|
|
6805
6847
|
n.actionInFlight ? (c(), d("div", ao, [
|
|
6806
|
-
t[
|
|
6848
|
+
t[11] || (t[11] = l("span", {
|
|
6807
6849
|
class: "wm-actionWait__spinner",
|
|
6808
6850
|
"aria-hidden": "true"
|
|
6809
6851
|
}, null, -1)),
|
|
6810
|
-
|
|
6852
|
+
l("span", oo, v(n.t("action.inProgress", {
|
|
6811
6853
|
name: n.actionInFlightName
|
|
6812
6854
|
})), 1)
|
|
6813
|
-
])) :
|
|
6814
|
-
|
|
6815
|
-
(c(!0), d(I, null, j(
|
|
6816
|
-
key: L.path ||
|
|
6855
|
+
])) : k("", !0),
|
|
6856
|
+
i.pendingAttachments.length ? (c(), d("div", lo, [
|
|
6857
|
+
(c(!0), d(I, null, j(i.pendingAttachments, (L, W) => (c(), d("div", {
|
|
6858
|
+
key: L.path || W,
|
|
6817
6859
|
class: "wm-attached__item"
|
|
6818
6860
|
}, [
|
|
6819
6861
|
L.previewUrl ? (c(), d("img", {
|
|
@@ -6822,8 +6864,8 @@ function go(e, t, s, i, a, n) {
|
|
|
6822
6864
|
src: L.previewUrl,
|
|
6823
6865
|
alt: L.name
|
|
6824
6866
|
}, null, 8, co)) : (c(), d("div", uo, [
|
|
6825
|
-
t[
|
|
6826
|
-
|
|
6867
|
+
t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
|
|
6868
|
+
l("svg", {
|
|
6827
6869
|
width: "16",
|
|
6828
6870
|
height: "16",
|
|
6829
6871
|
viewBox: "0 0 24 24",
|
|
@@ -6834,24 +6876,24 @@ function go(e, t, s, i, a, n) {
|
|
|
6834
6876
|
"stroke-linejoin": "round",
|
|
6835
6877
|
"aria-hidden": "true"
|
|
6836
6878
|
}, [
|
|
6837
|
-
|
|
6838
|
-
|
|
6879
|
+
l("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
|
|
6880
|
+
l("path", { d: "M14 2v6h6" })
|
|
6839
6881
|
])
|
|
6840
6882
|
], -1)),
|
|
6841
|
-
|
|
6842
|
-
|
|
6883
|
+
l("span", ho, [
|
|
6884
|
+
l("span", mo, v(L.name), 1),
|
|
6843
6885
|
n.formatAttachmentSize(L.size_bytes) ? (c(), d("span", fo, v(n.formatAttachmentSize(
|
|
6844
6886
|
L.size_bytes
|
|
6845
|
-
)), 1)) :
|
|
6887
|
+
)), 1)) : k("", !0)
|
|
6846
6888
|
])
|
|
6847
6889
|
])),
|
|
6848
|
-
|
|
6890
|
+
l("button", {
|
|
6849
6891
|
type: "button",
|
|
6850
6892
|
class: "wm-attached__remove",
|
|
6851
6893
|
"aria-label": n.t("attachment.remove"),
|
|
6852
|
-
onClick: (Q) => n.removePendingAttachment(
|
|
6853
|
-
}, [...t[
|
|
6854
|
-
|
|
6894
|
+
onClick: (Q) => n.removePendingAttachment(W)
|
|
6895
|
+
}, [...t[13] || (t[13] = [
|
|
6896
|
+
l("svg", {
|
|
6855
6897
|
width: "10",
|
|
6856
6898
|
height: "10",
|
|
6857
6899
|
viewBox: "0 0 24 24",
|
|
@@ -6862,16 +6904,23 @@ function go(e, t, s, i, a, n) {
|
|
|
6862
6904
|
"stroke-linejoin": "round",
|
|
6863
6905
|
"aria-hidden": "true"
|
|
6864
6906
|
}, [
|
|
6865
|
-
|
|
6907
|
+
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6866
6908
|
], -1)
|
|
6867
6909
|
])], 8, _o)
|
|
6868
6910
|
]))), 128))
|
|
6869
|
-
])) :
|
|
6870
|
-
n.
|
|
6871
|
-
|
|
6911
|
+
])) : k("", !0),
|
|
6912
|
+
n.isTerminal ? (c(), d("div", go, [
|
|
6913
|
+
l("span", po, v(n.t("composer.conversationEnded")), 1),
|
|
6914
|
+
l("button", {
|
|
6915
|
+
type: "button",
|
|
6916
|
+
class: "wm-ended__btn",
|
|
6917
|
+
onClick: t[2] || (t[2] = (...L) => n.startConv && n.startConv(...L))
|
|
6918
|
+
}, v(n.t("composer.newConversation")), 1)
|
|
6919
|
+
])) : n.actionInFlight ? k("", !0) : (c(), P(T, {
|
|
6920
|
+
key: 4,
|
|
6872
6921
|
ref: "composer",
|
|
6873
|
-
modelValue:
|
|
6874
|
-
"onUpdate:modelValue": t[
|
|
6922
|
+
modelValue: i.draft,
|
|
6923
|
+
"onUpdate:modelValue": t[3] || (t[3] = (L) => i.draft = L),
|
|
6875
6924
|
placeholder: n.composerPlaceholder,
|
|
6876
6925
|
disabled: !!n.pendingApproval,
|
|
6877
6926
|
"attach-label": n.t("composer.attachFile"),
|
|
@@ -6880,25 +6929,25 @@ function go(e, t, s, i, a, n) {
|
|
|
6880
6929
|
onAttach: n.onAttach
|
|
6881
6930
|
}, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
|
|
6882
6931
|
]),
|
|
6883
|
-
|
|
6932
|
+
i.moreOpen ? (c(), P(U, {
|
|
6884
6933
|
key: 0,
|
|
6885
6934
|
"can-rename": !!n.currentConv && !n.currentConv._draft,
|
|
6886
6935
|
"can-export": !!n.currentConv && !n.currentConv._draft,
|
|
6887
6936
|
"sound-enabled": e.soundEnabled,
|
|
6888
6937
|
"status-url": n.statusUrl,
|
|
6889
6938
|
"help-url": n.helpUrl,
|
|
6890
|
-
onClose: t[
|
|
6939
|
+
onClose: t[4] || (t[4] = (L) => i.moreOpen = !1),
|
|
6891
6940
|
onSoundToggle: e.onSoundToggle,
|
|
6892
6941
|
onAction: n.onMoreAction
|
|
6893
|
-
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) :
|
|
6894
|
-
|
|
6942
|
+
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0),
|
|
6943
|
+
i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), P(D, {
|
|
6895
6944
|
key: 1,
|
|
6896
6945
|
"initial-value": n.currentConv.name || "",
|
|
6897
6946
|
title: n.t("rename.dialogTitle"),
|
|
6898
|
-
onClose: t[
|
|
6947
|
+
onClose: t[5] || (t[5] = (L) => i.renameDialogOpen = !1),
|
|
6899
6948
|
onSubmit: n.onRenameSubmit
|
|
6900
|
-
}, null, 8, ["initial-value", "title", "onSubmit"])) :
|
|
6901
|
-
], 64)) : (c(),
|
|
6949
|
+
}, null, 8, ["initial-value", "title", "onSubmit"])) : k("", !0)
|
|
6950
|
+
], 64)) : (c(), P(b, {
|
|
6902
6951
|
key: 2,
|
|
6903
6952
|
title: n.widgetTitle,
|
|
6904
6953
|
subtitle: n.widgetSubtitle,
|
|
@@ -6906,35 +6955,35 @@ function go(e, t, s, i, a, n) {
|
|
|
6906
6955
|
"default-icon-url": n.defaultIconUrl,
|
|
6907
6956
|
"quick-links": n.quickLinks,
|
|
6908
6957
|
"open-threads": n.openThreads,
|
|
6909
|
-
busy:
|
|
6958
|
+
busy: i.busy,
|
|
6910
6959
|
onStart: n.startConv,
|
|
6911
6960
|
onSelect: n.onQuickLink,
|
|
6912
6961
|
onResume: n.onDrawerPick,
|
|
6913
|
-
onViewHistory: t[1] || (t[1] = (L) =>
|
|
6962
|
+
onViewHistory: t[1] || (t[1] = (L) => i.showHistory = !0)
|
|
6914
6963
|
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
6915
|
-
|
|
6964
|
+
i.moreOpen && !n.currentConv ? (c(), P(U, {
|
|
6916
6965
|
key: 4,
|
|
6917
6966
|
"can-rename": !1,
|
|
6918
6967
|
"can-export": !1,
|
|
6919
6968
|
"sound-enabled": e.soundEnabled,
|
|
6920
6969
|
"status-url": n.statusUrl,
|
|
6921
6970
|
"help-url": n.helpUrl,
|
|
6922
|
-
onClose: t[
|
|
6971
|
+
onClose: t[6] || (t[6] = (L) => i.moreOpen = !1),
|
|
6923
6972
|
onSoundToggle: e.onSoundToggle,
|
|
6924
6973
|
onAction: n.onMoreAction
|
|
6925
|
-
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) :
|
|
6974
|
+
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0)
|
|
6926
6975
|
], 64))
|
|
6927
|
-
], 6)) :
|
|
6976
|
+
], 6)) : k("", !0)
|
|
6928
6977
|
], 6);
|
|
6929
6978
|
}
|
|
6930
|
-
const
|
|
6979
|
+
const bo = /* @__PURE__ */ N(Xa, [["render", vo], ["__scopeId", "data-v-b2c24313"]]), ko = "0.5.77";
|
|
6931
6980
|
export {
|
|
6932
6981
|
oe as AIAvatar,
|
|
6933
6982
|
be as AVATAR_COLORS,
|
|
6934
6983
|
As as ActionResult,
|
|
6935
6984
|
Ui as ApprovalCard,
|
|
6936
6985
|
Es as ArtifactFormResponse,
|
|
6937
|
-
|
|
6986
|
+
Ws as ArtifactInfoCard,
|
|
6938
6987
|
ur as ArtifactRenderer,
|
|
6939
6988
|
or as ArtifactTicket,
|
|
6940
6989
|
Cr as AttachmentPreview,
|
|
@@ -6949,15 +6998,15 @@ export {
|
|
|
6949
6998
|
qt as Launcher,
|
|
6950
6999
|
Oe as MEDIA_RECORDER_SUPPORTED,
|
|
6951
7000
|
ri as MessageList,
|
|
6952
|
-
|
|
6953
|
-
|
|
7001
|
+
bo as Messenger,
|
|
7002
|
+
Da as MoreMenu,
|
|
6954
7003
|
Jn as Onboarding,
|
|
6955
7004
|
pe as SCREEN_CAPTURE_SUPPORTED,
|
|
6956
7005
|
ut as SUPPORTED_LANGUAGES,
|
|
6957
7006
|
Ti as SuggestionChips,
|
|
6958
7007
|
tn as TeamAvatars,
|
|
6959
7008
|
Lr as Typing,
|
|
6960
|
-
|
|
7009
|
+
ko as VERSION,
|
|
6961
7010
|
Me as avatarColor,
|
|
6962
7011
|
Te as avatarInitials,
|
|
6963
7012
|
ai as captureScreenshotFile,
|
|
@@ -6966,9 +7015,9 @@ export {
|
|
|
6966
7015
|
F as createTranslator,
|
|
6967
7016
|
Ze as createTransport,
|
|
6968
7017
|
ne as dateLocale,
|
|
6969
|
-
|
|
7018
|
+
bo as default,
|
|
6970
7019
|
Ce as formatTime,
|
|
6971
|
-
|
|
7020
|
+
wo as guessAttachmentKind,
|
|
6972
7021
|
ii as pickRecorderMime,
|
|
6973
7022
|
qe as renderInlineMarkdown,
|
|
6974
7023
|
ft as renderMarkdown,
|