@_solaris/messenger-widget 0.5.78 → 0.5.79
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 +6 -6
- package/dist/messenger.cjs +9 -9
- package/dist/messenger.js +1235 -1243
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as z, normalizeClass 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 Ue, withCtx as je, Fragment as I, renderList as j, withKeys as ge, withModifiers as J, createElementVNode as o, createCommentVNode as b, createBlock as D, 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,18 +38,18 @@ 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 i(u, g) {
|
|
42
42
|
const p = t.listeners.get(u);
|
|
43
43
|
p && p.forEach((S) => {
|
|
44
44
|
try {
|
|
45
45
|
S(g);
|
|
46
|
-
} catch (
|
|
47
|
-
console.error("[transport] listener", u,
|
|
46
|
+
} catch (O) {
|
|
47
|
+
console.error("[transport] listener", u, O);
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
t.connection !== u && (t.connection = u,
|
|
51
|
+
function a(u) {
|
|
52
|
+
t.connection !== u && (t.connection = u, i("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 r(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
|
|
76
|
-
`HTTP ${S.status} ${u} ${g} :: ${(
|
|
75
|
+
const O = await l(S), x = new Error(
|
|
76
|
+
`HTTP ${S.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || S.statusText}`
|
|
77
77
|
);
|
|
78
|
-
throw x.status = S.status, x.body =
|
|
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 l(u) {
|
|
83
83
|
try {
|
|
84
84
|
return await u.json();
|
|
85
85
|
} catch {
|
|
@@ -112,34 +112,34 @@ function Ze(e) {
|
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
if (!g.ok) {
|
|
115
|
-
const V = await
|
|
115
|
+
const V = await l(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;
|
|
119
119
|
}
|
|
120
120
|
const p = await g.json();
|
|
121
121
|
t.userId = p.external_id;
|
|
122
|
-
const [S,
|
|
122
|
+
const [S, O] = await Promise.all([
|
|
123
123
|
fetch(
|
|
124
124
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
125
125
|
{ credentials: "include" }
|
|
126
126
|
).then(async (V) => {
|
|
127
127
|
if (!V.ok) {
|
|
128
|
-
const Z = await
|
|
128
|
+
const Z = await l(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
|
-
|
|
136
|
-
]), x = { config: S, customer: (
|
|
137
|
-
return t.lastBootstrap = x, await
|
|
135
|
+
r("GET", "/customers/me")
|
|
136
|
+
]), x = { config: S, customer: (O == null ? void 0 : O.customer) ?? null };
|
|
137
|
+
return t.lastBootstrap = x, await k(), 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 k() {
|
|
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 r("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 r("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 r("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 r("POST", "/conversations", u)).conversation;
|
|
167
167
|
}
|
|
168
168
|
async function q(u) {
|
|
169
|
-
return (await
|
|
169
|
+
return (await r(
|
|
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 r(
|
|
176
176
|
"PATCH",
|
|
177
177
|
`/conversations/${encodeURIComponent(u)}`,
|
|
178
178
|
g
|
|
179
179
|
)).conversation;
|
|
180
180
|
}
|
|
181
|
-
async function
|
|
182
|
-
return
|
|
181
|
+
async function N(u, g) {
|
|
182
|
+
return r(
|
|
183
183
|
"PATCH",
|
|
184
184
|
`/conversations/${encodeURIComponent(u)}/read`,
|
|
185
185
|
{ message_id: g }
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function U(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 r(
|
|
193
193
|
"GET",
|
|
194
194
|
`/conversations/${encodeURIComponent(u)}/messages${S}`
|
|
195
195
|
);
|
|
@@ -203,25 +203,25 @@ 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), r(
|
|
207
207
|
"POST",
|
|
208
208
|
`/conversations/${encodeURIComponent(u)}/messages`,
|
|
209
209
|
p
|
|
210
210
|
);
|
|
211
211
|
}
|
|
212
212
|
async function W(u, g, p) {
|
|
213
|
-
return ae(),
|
|
213
|
+
return ae(), r(
|
|
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,
|
|
220
|
+
const g = u.name || "attachment", p = u.type || "application/octet-stream", S = u.size || 0, O = await r("POST", "/attachments", {
|
|
221
221
|
mime_type: p,
|
|
222
222
|
size_bytes: S,
|
|
223
223
|
name: g
|
|
224
|
-
}), x = await fetch(
|
|
224
|
+
}), x = await fetch(O.upload_url, {
|
|
225
225
|
method: "PUT",
|
|
226
226
|
headers: { "Content-Type": p },
|
|
227
227
|
body: u
|
|
@@ -230,13 +230,13 @@ function Ze(e) {
|
|
|
230
230
|
throw new Error(`HTTP ${x.status} PUT signed upload`);
|
|
231
231
|
return {
|
|
232
232
|
type: tt(p),
|
|
233
|
-
path:
|
|
233
|
+
path: O.path,
|
|
234
234
|
mime_type: p,
|
|
235
235
|
size_bytes: S
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
238
|
async function se(u) {
|
|
239
|
-
return
|
|
239
|
+
return r(
|
|
240
240
|
"GET",
|
|
241
241
|
`/attachments/sign?path=${encodeURIComponent(u)}`
|
|
242
242
|
);
|
|
@@ -253,22 +253,22 @@ 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
|
+
() => i("error", new Error("SSE error"))
|
|
257
|
+
), t.eventSource = u, a("open");
|
|
258
258
|
} catch (u) {
|
|
259
|
-
console.error("[transport] SSE open failed", u),
|
|
259
|
+
console.error("[transport] SSE open failed", u), i("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
|
+
i(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" && a("idle");
|
|
272
272
|
}
|
|
273
273
|
function ae() {
|
|
274
274
|
clearTimeout(t.burstTimer), $(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
@@ -280,11 +280,11 @@ function Ze(e) {
|
|
|
280
280
|
}
|
|
281
281
|
async function ye() {
|
|
282
282
|
try {
|
|
283
|
-
const u = await E(), g = u.reduce((S,
|
|
284
|
-
const x =
|
|
283
|
+
const u = await E(), g = u.reduce((S, O) => {
|
|
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, i("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(), a("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
|
+
a("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 : r("POST", "/update", u);
|
|
319
319
|
}
|
|
320
320
|
function C(u) {
|
|
321
321
|
if (!(!u || typeof u != "object"))
|
|
@@ -336,13 +336,13 @@ 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:
|
|
344
|
-
markConversationRead:
|
|
345
|
-
listMessages:
|
|
343
|
+
patchConversation: T,
|
|
344
|
+
markConversationRead: N,
|
|
345
|
+
listMessages: U,
|
|
346
346
|
postMessage: L,
|
|
347
347
|
postCallback: W,
|
|
348
348
|
uploadAttachment: Q,
|
|
@@ -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 i(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 a() {
|
|
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 r(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 l = 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: l
|
|
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 k(h) {
|
|
521
521
|
var C;
|
|
522
522
|
const m = t.paginationByConv[h];
|
|
523
523
|
if (!m || m.loading || !m.nextCursor) return;
|
|
@@ -527,12 +527,12 @@ function st(e) {
|
|
|
527
527
|
try {
|
|
528
528
|
const u = await e.listMessages(h, {
|
|
529
529
|
before: w,
|
|
530
|
-
limit:
|
|
530
|
+
limit: l
|
|
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}`);
|
|
534
|
-
const
|
|
535
|
-
t.messagesByConv[h] = [...
|
|
534
|
+
const O = g.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
|
|
535
|
+
t.messagesByConv[h] = [...O, ...p], y(h, {
|
|
536
536
|
nextCursor: (u == null ? void 0 : u.next_cursor) ?? null,
|
|
537
537
|
loading: !1,
|
|
538
538
|
loaded: !0
|
|
@@ -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
|
}
|
|
@@ -566,8 +566,8 @@ function st(e) {
|
|
|
566
566
|
(S == null ? void 0 : S.id) != null && u.add(String(S.id)), S != null && S.client_msg_id && g.add(S.client_msg_id);
|
|
567
567
|
const p = [];
|
|
568
568
|
for (const S of C) {
|
|
569
|
-
const
|
|
570
|
-
$(h, S),
|
|
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
|
+
$(h, S), O || p.push(S);
|
|
571
571
|
}
|
|
572
572
|
return p;
|
|
573
573
|
} catch (w) {
|
|
@@ -587,7 +587,7 @@ function st(e) {
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
async function q(h, m, { attachments: _, metadata: w } = {}) {
|
|
590
|
-
var
|
|
590
|
+
var O;
|
|
591
591
|
const C = (m || "").trim(), u = Array.isArray(_) && _.length > 0;
|
|
592
592
|
if (!h || !C && !u) return;
|
|
593
593
|
const g = nt(), p = fe(h), S = {
|
|
@@ -598,7 +598,7 @@ function st(e) {
|
|
|
598
598
|
text_md: C,
|
|
599
599
|
author: {
|
|
600
600
|
type: "user",
|
|
601
|
-
id: ((
|
|
601
|
+
id: ((O = t.customer) == null ? void 0 : O.external_id) || null
|
|
602
602
|
},
|
|
603
603
|
created_at: p,
|
|
604
604
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
@@ -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, _);
|
|
@@ -630,10 +630,10 @@ function st(e) {
|
|
|
630
630
|
console.error("[store] callback failed", w), h != null && delete t.awaitingCallback[h];
|
|
631
631
|
}
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
async function
|
|
633
|
+
const N = /* @__PURE__ */ new Map();
|
|
634
|
+
async function U(h) {
|
|
635
635
|
if (!h) return null;
|
|
636
|
-
const m =
|
|
636
|
+
const m = N.get(h);
|
|
637
637
|
if (m != null && m.url) {
|
|
638
638
|
const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
639
639
|
if (!_ || _ - Date.now() > 6e4) return m.url;
|
|
@@ -641,7 +641,7 @@ function st(e) {
|
|
|
641
641
|
try {
|
|
642
642
|
const _ = await e.signAttachment(h);
|
|
643
643
|
if (_ != null && _.signed_url)
|
|
644
|
-
return
|
|
644
|
+
return N.set(h, {
|
|
645
645
|
url: _.signed_url,
|
|
646
646
|
expires_at: _.expires_at
|
|
647
647
|
}), _.signed_url;
|
|
@@ -659,7 +659,7 @@ 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
664
|
function W(h) {
|
|
665
665
|
var _, w;
|
|
@@ -702,15 +702,15 @@ function st(e) {
|
|
|
702
702
|
return [];
|
|
703
703
|
if (((C = p == null ? void 0 : p.author) == null ? void 0 : C.type) !== "agent_ia") continue;
|
|
704
704
|
const S = (u = p == null ? void 0 : p.metadata) == null ? void 0 : u.suggested_replies;
|
|
705
|
-
return Array.isArray(S) && S.length ? S.map((
|
|
706
|
-
if (typeof
|
|
707
|
-
const x =
|
|
705
|
+
return Array.isArray(S) && S.length ? S.map((O) => {
|
|
706
|
+
if (typeof O == "string") {
|
|
707
|
+
const x = O.trim();
|
|
708
708
|
return x ? { label: x, kind: null } : null;
|
|
709
709
|
}
|
|
710
|
-
if (
|
|
711
|
-
const x =
|
|
710
|
+
if (O && typeof O == "object" && typeof O.label == "string") {
|
|
711
|
+
const x = O.label.trim();
|
|
712
712
|
if (!x) return null;
|
|
713
|
-
const V =
|
|
713
|
+
const V = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
|
|
714
714
|
return { label: x, kind: V };
|
|
715
715
|
}
|
|
716
716
|
return null;
|
|
@@ -775,18 +775,18 @@ function st(e) {
|
|
|
775
775
|
}
|
|
776
776
|
return {
|
|
777
777
|
state: t,
|
|
778
|
-
start:
|
|
779
|
-
destroy:
|
|
778
|
+
start: i,
|
|
779
|
+
destroy: a,
|
|
780
780
|
applyCustomer: n,
|
|
781
|
-
createConversation:
|
|
781
|
+
createConversation: r,
|
|
782
782
|
openConversation: f,
|
|
783
|
-
loadMore:
|
|
783
|
+
loadMore: k,
|
|
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: U,
|
|
790
790
|
submitFeedback: L,
|
|
791
791
|
getPendingApproval: W,
|
|
792
792
|
getActionInFlight: se,
|
|
@@ -1161,55 +1161,55 @@ function ne(e) {
|
|
|
1161
1161
|
return Le[xe(e)] || Le[ue];
|
|
1162
1162
|
}
|
|
1163
1163
|
function F(e) {
|
|
1164
|
-
const t = xe(e), s = ke[t] || ke[ue],
|
|
1165
|
-
return function(n,
|
|
1166
|
-
let
|
|
1167
|
-
return
|
|
1164
|
+
const t = xe(e), s = ke[t] || ke[ue], i = ke[ue];
|
|
1165
|
+
return function(n, r) {
|
|
1166
|
+
let l = s[n];
|
|
1167
|
+
return l == null && (l = i[n]), l == null ? n : (r && (l = l.replace(
|
|
1168
1168
|
/\{(\w+)\}/g,
|
|
1169
|
-
(f,
|
|
1170
|
-
)),
|
|
1169
|
+
(f, k) => r[k] != null ? String(r[k]) : f
|
|
1170
|
+
)), l);
|
|
1171
1171
|
};
|
|
1172
1172
|
}
|
|
1173
1173
|
function Ie(e, t) {
|
|
1174
1174
|
if (!Array.isArray(e == null ? void 0 : e.options)) return t;
|
|
1175
|
-
const s = e.options.find((
|
|
1175
|
+
const s = e.options.find((i) => (i == null ? void 0 : i.value) === t);
|
|
1176
1176
|
return (s == null ? void 0 : s.label) || t;
|
|
1177
1177
|
}
|
|
1178
1178
|
function He(e, t, s) {
|
|
1179
|
-
return Array.isArray(t) ? t.map((
|
|
1179
|
+
return Array.isArray(t) ? t.map((i) => Ie(e, String(i))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ie(e, String(t));
|
|
1180
1180
|
}
|
|
1181
1181
|
function ht(e, t, s = F()) {
|
|
1182
1182
|
if (!e || !t) return "";
|
|
1183
|
-
const
|
|
1184
|
-
for (const n of
|
|
1183
|
+
const i = Array.isArray(e.fields) ? e.fields : [], a = [];
|
|
1184
|
+
for (const n of i) {
|
|
1185
1185
|
if (!(n != null && n.key) || !(n != null && n.label)) continue;
|
|
1186
|
-
const
|
|
1187
|
-
if (
|
|
1188
|
-
const
|
|
1189
|
-
|
|
1190
|
-
${
|
|
1186
|
+
const r = t[n.key];
|
|
1187
|
+
if (r == null || r === "") continue;
|
|
1188
|
+
const l = He(n, r, s);
|
|
1189
|
+
l && a.push(`${n.label} :
|
|
1190
|
+
${l}`);
|
|
1191
1191
|
}
|
|
1192
|
-
return
|
|
1192
|
+
return a.join(`
|
|
1193
1193
|
|
|
1194
1194
|
`);
|
|
1195
1195
|
}
|
|
1196
1196
|
function mt(e, t, s = F()) {
|
|
1197
|
-
const
|
|
1198
|
-
for (const n of
|
|
1197
|
+
const i = [], a = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1198
|
+
for (const n of a) {
|
|
1199
1199
|
if (!(n != null && n.key) || !(n != null && n.label)) continue;
|
|
1200
|
-
const
|
|
1201
|
-
if (
|
|
1202
|
-
const
|
|
1203
|
-
if (!
|
|
1204
|
-
const f = n.type === "textarea" || typeof
|
|
1200
|
+
const r = t == null ? void 0 : t[n.key];
|
|
1201
|
+
if (r == null || r === "") continue;
|
|
1202
|
+
const l = He(n, r, s);
|
|
1203
|
+
if (!l) continue;
|
|
1204
|
+
const f = n.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
|
|
1205
1205
|
`));
|
|
1206
|
-
|
|
1206
|
+
i.push({ label: n.label, value: l, multiline: f });
|
|
1207
1207
|
}
|
|
1208
1208
|
return {
|
|
1209
1209
|
kind: "form_response",
|
|
1210
1210
|
data: {
|
|
1211
1211
|
title: (e == null ? void 0 : e.title) || s("form.title"),
|
|
1212
|
-
fields:
|
|
1212
|
+
fields: i
|
|
1213
1213
|
}
|
|
1214
1214
|
};
|
|
1215
1215
|
}
|
|
@@ -1223,10 +1223,10 @@ const Ee = "";
|
|
|
1223
1223
|
function de(e) {
|
|
1224
1224
|
let t = e;
|
|
1225
1225
|
const s = [];
|
|
1226
|
-
return t = t.replace(/`([^`\n]+)`/g, (
|
|
1226
|
+
return t = t.replace(/`([^`\n]+)`/g, (i, a) => {
|
|
1227
1227
|
const n = s.length;
|
|
1228
|
-
return s.push(
|
|
1229
|
-
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (
|
|
1228
|
+
return s.push(a), `${Ee}CODE${n}${Ee}`;
|
|
1229
|
+
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (i, a, n) => _e(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${a}</a>` : a), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (i, a) => `<code class="wm-md-code">${s[+a]}</code>`), t;
|
|
1230
1230
|
}
|
|
1231
1231
|
function qe(e) {
|
|
1232
1232
|
if (!e) return "";
|
|
@@ -1237,70 +1237,70 @@ function ft(e) {
|
|
|
1237
1237
|
if (!e) return "";
|
|
1238
1238
|
const t = ze(e).split(`
|
|
1239
1239
|
`), s = [];
|
|
1240
|
-
let
|
|
1241
|
-
for (;
|
|
1242
|
-
const n = t[
|
|
1240
|
+
let i = 0;
|
|
1241
|
+
for (; i < t.length; ) {
|
|
1242
|
+
const n = t[i];
|
|
1243
1243
|
if (/^\s*```([\w-]*)\s*$/.exec(n)) {
|
|
1244
|
-
|
|
1245
|
-
const
|
|
1246
|
-
for (;
|
|
1247
|
-
|
|
1248
|
-
|
|
1244
|
+
i++;
|
|
1245
|
+
const k = [];
|
|
1246
|
+
for (; i < t.length && !/^\s*```\s*$/.test(t[i]); )
|
|
1247
|
+
k.push(t[i]), i++;
|
|
1248
|
+
i < t.length && i++, s.push({
|
|
1249
1249
|
type: "block",
|
|
1250
|
-
html: `<pre class="wm-md-pre"><code>${
|
|
1250
|
+
html: `<pre class="wm-md-pre"><code>${k.join(`
|
|
1251
1251
|
`)}</code></pre>`
|
|
1252
1252
|
});
|
|
1253
1253
|
continue;
|
|
1254
1254
|
}
|
|
1255
1255
|
if (/^\s*[-*]\s+/.test(n)) {
|
|
1256
|
-
const
|
|
1257
|
-
for (;
|
|
1258
|
-
const
|
|
1259
|
-
if (!
|
|
1260
|
-
|
|
1256
|
+
const k = [];
|
|
1257
|
+
for (; i < t.length; ) {
|
|
1258
|
+
const M = /^\s*[-*]\s+(.*)$/.exec(t[i]);
|
|
1259
|
+
if (!M) break;
|
|
1260
|
+
k.push(M[1]), i++;
|
|
1261
1261
|
}
|
|
1262
|
-
const y =
|
|
1262
|
+
const y = k.map((M) => `<li>${de(M)}</li>`).join("");
|
|
1263
1263
|
s.push({
|
|
1264
1264
|
type: "block",
|
|
1265
1265
|
html: `<ul class="wm-md-ul">${y}</ul>`
|
|
1266
1266
|
});
|
|
1267
1267
|
continue;
|
|
1268
1268
|
}
|
|
1269
|
-
const
|
|
1270
|
-
if (
|
|
1271
|
-
const
|
|
1272
|
-
for (
|
|
1273
|
-
const A = /^\s*\d+\.\s+(.*)$/.exec(t[
|
|
1269
|
+
const l = /^\s*(\d+)\.\s+(.*)$/.exec(n);
|
|
1270
|
+
if (l) {
|
|
1271
|
+
const k = parseInt(l[1], 10), y = [l[2]];
|
|
1272
|
+
for (i++; i < t.length; ) {
|
|
1273
|
+
const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
|
|
1274
1274
|
if (!A) break;
|
|
1275
|
-
y.push(A[1]),
|
|
1275
|
+
y.push(A[1]), i++;
|
|
1276
1276
|
}
|
|
1277
|
-
const
|
|
1277
|
+
const M = y.map((A) => `<li>${de(A)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
|
|
1278
1278
|
s.push({
|
|
1279
1279
|
type: "block",
|
|
1280
|
-
html: `<ol class="wm-md-ol"${E}>${
|
|
1280
|
+
html: `<ol class="wm-md-ol"${E}>${M}</ol>`
|
|
1281
1281
|
});
|
|
1282
1282
|
continue;
|
|
1283
1283
|
}
|
|
1284
1284
|
const f = /^(#{1,6})\s+(.*)$/.exec(n);
|
|
1285
1285
|
if (f) {
|
|
1286
|
-
const
|
|
1286
|
+
const k = f[1].length;
|
|
1287
1287
|
s.push({
|
|
1288
1288
|
type: "block",
|
|
1289
|
-
html: `<h${
|
|
1290
|
-
}),
|
|
1289
|
+
html: `<h${k} class="wm-md-h wm-md-h${k}">${de(f[2])}</h${k}>`
|
|
1290
|
+
}), i++;
|
|
1291
1291
|
continue;
|
|
1292
1292
|
}
|
|
1293
|
-
s.push({ type: "text", html: de(n) }),
|
|
1293
|
+
s.push({ type: "text", html: de(n) }), i++;
|
|
1294
1294
|
}
|
|
1295
|
-
let
|
|
1295
|
+
let a = "";
|
|
1296
1296
|
for (let n = 0; n < s.length; n++) {
|
|
1297
|
-
const
|
|
1298
|
-
|
|
1299
|
-
const
|
|
1300
|
-
|
|
1297
|
+
const r = s[n];
|
|
1298
|
+
a += r.html;
|
|
1299
|
+
const l = s[n + 1];
|
|
1300
|
+
l && r.type !== "block" && l.type !== "block" && (a += `
|
|
1301
1301
|
`);
|
|
1302
1302
|
}
|
|
1303
|
-
return
|
|
1303
|
+
return a;
|
|
1304
1304
|
}
|
|
1305
1305
|
function he(e) {
|
|
1306
1306
|
var s;
|
|
@@ -1314,52 +1314,52 @@ function Y(e) {
|
|
|
1314
1314
|
}
|
|
1315
1315
|
function Be(e, t) {
|
|
1316
1316
|
let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
|
|
1317
|
-
for (const
|
|
1318
|
-
|
|
1317
|
+
for (const i of t)
|
|
1318
|
+
i != null && i.created_at && i.created_at > s && (s = i.created_at);
|
|
1319
1319
|
return s;
|
|
1320
1320
|
}
|
|
1321
1321
|
function _t(e, t) {
|
|
1322
|
-
var s,
|
|
1322
|
+
var s, i, a;
|
|
1323
1323
|
for (let n = t.length - 1; n >= 0; n--) {
|
|
1324
|
-
const
|
|
1325
|
-
if (!
|
|
1326
|
-
const
|
|
1327
|
-
if (
|
|
1328
|
-
return (((s =
|
|
1329
|
-
const f = (
|
|
1324
|
+
const r = t[n];
|
|
1325
|
+
if (!r) continue;
|
|
1326
|
+
const l = typeof r.text_md == "string" ? r.text_md.trim() : "";
|
|
1327
|
+
if (l)
|
|
1328
|
+
return (((s = r.author) == null ? void 0 : s.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
|
|
1329
|
+
const f = (i = r.payload) == null ? void 0 : i.attachments;
|
|
1330
1330
|
if (Array.isArray(f) && f.length) return "📎 Pièce jointe";
|
|
1331
1331
|
}
|
|
1332
|
-
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((
|
|
1332
|
+
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((a = e == null ? void 0 : e.metadata) == null ? void 0 : a.last_preview) || "";
|
|
1333
1333
|
}
|
|
1334
1334
|
function gt(e, t) {
|
|
1335
1335
|
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"));
|
|
1336
1336
|
}
|
|
1337
|
-
function pt(e, t, s,
|
|
1338
|
-
const
|
|
1337
|
+
function pt(e, t, s, i) {
|
|
1338
|
+
const a = [
|
|
1339
1339
|
`# ${e.name || s("common.conversation")}`,
|
|
1340
1340
|
e.created_at ? s("export.createdOn", {
|
|
1341
|
-
date: new Date(e.created_at).toLocaleString(
|
|
1341
|
+
date: new Date(e.created_at).toLocaleString(i)
|
|
1342
1342
|
}) : "",
|
|
1343
1343
|
""
|
|
1344
1344
|
];
|
|
1345
1345
|
for (const n of t) {
|
|
1346
1346
|
if (!n) continue;
|
|
1347
|
-
const
|
|
1348
|
-
if (!
|
|
1349
|
-
const
|
|
1350
|
-
|
|
1347
|
+
const r = (n.text_md || "").trim();
|
|
1348
|
+
if (!r) continue;
|
|
1349
|
+
const l = gt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(i) : "";
|
|
1350
|
+
a.push(`[${f}] ${l} :`), a.push(r), a.push("");
|
|
1351
1351
|
}
|
|
1352
|
-
return
|
|
1352
|
+
return a.join(`
|
|
1353
1353
|
`);
|
|
1354
1354
|
}
|
|
1355
|
-
function vt(e, t, s = F(),
|
|
1355
|
+
function vt(e, t, s = F(), i) {
|
|
1356
1356
|
if (!e) return;
|
|
1357
|
-
const
|
|
1357
|
+
const a = pt(e, t || [], s, ne(i)), n = new Blob([a], { type: "text/plain;charset=utf-8" });
|
|
1358
1358
|
try {
|
|
1359
|
-
const
|
|
1360
|
-
|
|
1361
|
-
} catch (
|
|
1362
|
-
console.error("[ww-messenger] export failed",
|
|
1359
|
+
const r = URL.createObjectURL(n), l = document.createElement("a");
|
|
1360
|
+
l.href = r, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(r), 1e3);
|
|
1361
|
+
} catch (r) {
|
|
1362
|
+
console.error("[ww-messenger] export failed", r);
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
1365
|
const yt = {
|
|
@@ -1472,10 +1472,10 @@ const yt = {
|
|
|
1472
1472
|
// at message-arrival time because the user may have closed the
|
|
1473
1473
|
// panel or switched threads during the typing dwell.
|
|
1474
1474
|
onMessageRevealed(e, t) {
|
|
1475
|
-
var
|
|
1475
|
+
var a;
|
|
1476
1476
|
if (!this.soundEnabled && !this.browserNotifEnabled || !t || !e || !he(e)) return;
|
|
1477
1477
|
const s = typeof document < "u" && document.hidden;
|
|
1478
|
-
this.isOpen && !s && ((
|
|
1478
|
+
this.isOpen && !s && ((a = this.currentConv) == null ? void 0 : a.id) === t || (this.soundEnabled && this.playNotificationSound(), this.browserNotifEnabled && this.showBrowserNotification(t, e));
|
|
1479
1479
|
},
|
|
1480
1480
|
playNotificationSound() {
|
|
1481
1481
|
if (typeof window > "u") return;
|
|
@@ -1489,17 +1489,17 @@ const yt = {
|
|
|
1489
1489
|
t.resume();
|
|
1490
1490
|
} catch {
|
|
1491
1491
|
}
|
|
1492
|
-
const s = t.currentTime,
|
|
1493
|
-
|
|
1492
|
+
const s = t.currentTime, i = t.createOscillator(), a = t.createGain();
|
|
1493
|
+
i.connect(a), a.connect(t.destination), i.type = "sine", i.frequency.setValueAtTime(880, s), i.frequency.exponentialRampToValueAtTime(1320, s + 0.08), a.gain.setValueAtTime(0, s), a.gain.linearRampToValueAtTime(0.12, s + 0.02), a.gain.exponentialRampToValueAtTime(1e-4, s + 0.28), i.start(s), i.stop(s + 0.32);
|
|
1494
1494
|
} catch {
|
|
1495
1495
|
}
|
|
1496
1496
|
},
|
|
1497
1497
|
showBrowserNotification(e, t) {
|
|
1498
1498
|
if (typeof Notification > "u" || Notification.permission !== "granted") return;
|
|
1499
|
-
const s = t == null ? void 0 : t.author,
|
|
1499
|
+
const s = t == null ? void 0 : t.author, i = !s || s.type === "agent_ia", n = ((s == null ? void 0 : s.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), r = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = r ? r.slice(0, 140) : this.t("notification.youHaveNewMessage");
|
|
1500
1500
|
try {
|
|
1501
1501
|
const f = new Notification(n, {
|
|
1502
|
-
body:
|
|
1502
|
+
body: l,
|
|
1503
1503
|
tag: `wm-${e}`,
|
|
1504
1504
|
renotify: !1,
|
|
1505
1505
|
silent: !0
|
|
@@ -1598,26 +1598,26 @@ const yt = {
|
|
|
1598
1598
|
// the activity isn't replayed via SSE, so we fetch it explicitly and
|
|
1599
1599
|
// run it through pacing.
|
|
1600
1600
|
setupLiveReveal() {
|
|
1601
|
-
var s,
|
|
1601
|
+
var s, i;
|
|
1602
1602
|
if (!this.transport) return;
|
|
1603
1603
|
this.teardownLiveReveal();
|
|
1604
|
-
const e = this.transport.on("message", (
|
|
1605
|
-
const n =
|
|
1606
|
-
n &&
|
|
1604
|
+
const e = this.transport.on("message", (a) => {
|
|
1605
|
+
const n = a == null ? void 0 : a.conversation_id, r = a == null ? void 0 : a.message;
|
|
1606
|
+
n && r && this.paceLiveMessage(r, n);
|
|
1607
1607
|
});
|
|
1608
1608
|
this._liveRevealConvSnapshot = new Map(
|
|
1609
|
-
(((s = this.s) == null ? void 0 : s.conversations) || []).map((
|
|
1610
|
-
|
|
1611
|
-
(
|
|
1609
|
+
(((s = this.s) == null ? void 0 : s.conversations) || []).map((a) => [
|
|
1610
|
+
a.id,
|
|
1611
|
+
(a == null ? void 0 : a.last_message_at) || ""
|
|
1612
1612
|
])
|
|
1613
1613
|
), this._liveHwm = Object.fromEntries(
|
|
1614
|
-
(((
|
|
1615
|
-
|
|
1616
|
-
(
|
|
1614
|
+
(((i = this.s) == null ? void 0 : i.conversations) || []).map((a) => [
|
|
1615
|
+
a.id,
|
|
1616
|
+
(a == null ? void 0 : a.last_message_at) || ""
|
|
1617
1617
|
])
|
|
1618
1618
|
);
|
|
1619
|
-
const t = this.transport.on("activity", (
|
|
1620
|
-
this.handleLiveActivity(
|
|
1619
|
+
const t = this.transport.on("activity", (a) => {
|
|
1620
|
+
this.handleLiveActivity(a);
|
|
1621
1621
|
});
|
|
1622
1622
|
this._liveRevealOff = () => {
|
|
1623
1623
|
try {
|
|
@@ -1647,29 +1647,29 @@ const yt = {
|
|
|
1647
1647
|
// on background convs when SSE wasn't open at the moment they
|
|
1648
1648
|
// arrived.
|
|
1649
1649
|
async handleLiveActivity(e) {
|
|
1650
|
-
var
|
|
1650
|
+
var a, n;
|
|
1651
1651
|
const t = e == null ? void 0 : e.conversations;
|
|
1652
1652
|
if (!Array.isArray(t) || !this.store) return;
|
|
1653
|
-
const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(),
|
|
1654
|
-
for (const
|
|
1655
|
-
if (!(
|
|
1656
|
-
const
|
|
1657
|
-
if (!
|
|
1658
|
-
const f = s.get(
|
|
1659
|
-
|
|
1653
|
+
const s = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
|
|
1654
|
+
for (const r of t) {
|
|
1655
|
+
if (!(r != null && r.id)) continue;
|
|
1656
|
+
const l = r.last_message_at || "";
|
|
1657
|
+
if (!l) continue;
|
|
1658
|
+
const f = s.get(r.id) || "";
|
|
1659
|
+
l > f && i.push(r.id);
|
|
1660
1660
|
}
|
|
1661
1661
|
this._liveRevealConvSnapshot = new Map(
|
|
1662
|
-
t.map((
|
|
1662
|
+
t.map((r) => [r.id, (r == null ? void 0 : r.last_message_at) || ""])
|
|
1663
1663
|
);
|
|
1664
|
-
for (const
|
|
1664
|
+
for (const r of i)
|
|
1665
1665
|
try {
|
|
1666
|
-
const
|
|
1667
|
-
if (!Array.isArray(
|
|
1668
|
-
for (const f of
|
|
1669
|
-
} catch (
|
|
1666
|
+
const l = await ((n = (a = this.store).fetchSinceLast) == null ? void 0 : n.call(a, r));
|
|
1667
|
+
if (!Array.isArray(l)) continue;
|
|
1668
|
+
for (const f of l) this.paceLiveMessage(f, r);
|
|
1669
|
+
} catch (l) {
|
|
1670
1670
|
console.error(
|
|
1671
1671
|
"[ww-messenger] activity delta fetch failed",
|
|
1672
|
-
|
|
1672
|
+
l
|
|
1673
1673
|
);
|
|
1674
1674
|
}
|
|
1675
1675
|
},
|
|
@@ -1679,16 +1679,16 @@ const yt = {
|
|
|
1679
1679
|
// - inter-bubble gap scales with message length (reading time),
|
|
1680
1680
|
// bounded by MIN/MAX_TYPING_MS.
|
|
1681
1681
|
scheduleReveal(e, t) {
|
|
1682
|
-
const s = this.revealPacing,
|
|
1682
|
+
const s = this.revealPacing, i = Date.now(), a = ((e == null ? void 0 : e.text_md) || "").length, n = Math.min(
|
|
1683
1683
|
s.maxTypingMs,
|
|
1684
|
-
Math.max(s.minTypingMs,
|
|
1685
|
-
),
|
|
1686
|
-
|
|
1684
|
+
Math.max(s.minTypingMs, a * s.msPerChar)
|
|
1685
|
+
), l = Math.max(
|
|
1686
|
+
i + s.firstRevealDelayMs,
|
|
1687
1687
|
this.nextRevealAt + s.pauseBetweenMs
|
|
1688
1688
|
) + n;
|
|
1689
|
-
this.nextRevealAt =
|
|
1690
|
-
const f = Math.max(0,
|
|
1691
|
-
this.revealedAt = { ...this.revealedAt, [
|
|
1689
|
+
this.nextRevealAt = l;
|
|
1690
|
+
const f = Math.max(0, l - i), k = e.id, y = setTimeout(() => {
|
|
1691
|
+
this.revealedAt = { ...this.revealedAt, [k]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== y), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1692
1692
|
}, f);
|
|
1693
1693
|
this.revealTimers.push(y);
|
|
1694
1694
|
},
|
|
@@ -1698,28 +1698,28 @@ const yt = {
|
|
|
1698
1698
|
// history (instant) and any live message that the transport
|
|
1699
1699
|
// subscription already paced (idempotent on msg.id).
|
|
1700
1700
|
paceMessages(e, t) {
|
|
1701
|
-
var
|
|
1701
|
+
var a;
|
|
1702
1702
|
if (!Array.isArray(e) || !e.length) return;
|
|
1703
|
-
const s = Date.now(),
|
|
1703
|
+
const s = Date.now(), i = { ...this.revealedAt };
|
|
1704
1704
|
for (const n of e) {
|
|
1705
|
-
if ((n == null ? void 0 : n.id) == null ||
|
|
1705
|
+
if ((n == null ? void 0 : n.id) == null || i[n.id] !== void 0) continue;
|
|
1706
1706
|
if (!he(n)) {
|
|
1707
|
-
|
|
1707
|
+
i[n.id] = s;
|
|
1708
1708
|
continue;
|
|
1709
1709
|
}
|
|
1710
|
-
const
|
|
1711
|
-
if (!Number.isFinite(
|
|
1712
|
-
|
|
1710
|
+
const r = n != null && n.created_at ? Date.parse(n.created_at) : NaN;
|
|
1711
|
+
if (!Number.isFinite(r) || r < this.convOpenedAt) {
|
|
1712
|
+
i[n.id] = s;
|
|
1713
1713
|
continue;
|
|
1714
1714
|
}
|
|
1715
|
-
const
|
|
1716
|
-
if (!
|
|
1717
|
-
|
|
1715
|
+
const l = typeof (n == null ? void 0 : n.text_md) == "string" && n.text_md.trim().length > 0, f = Array.isArray((a = n == null ? void 0 : n.payload) == null ? void 0 : a.attachments) && n.payload.attachments.length > 0;
|
|
1716
|
+
if (!l && !f) {
|
|
1717
|
+
i[n.id] = s;
|
|
1718
1718
|
continue;
|
|
1719
1719
|
}
|
|
1720
|
-
|
|
1720
|
+
i[n.id] = 0, this.scheduleReveal(n, t);
|
|
1721
1721
|
}
|
|
1722
|
-
this.revealedAt =
|
|
1722
|
+
this.revealedAt = i;
|
|
1723
1723
|
},
|
|
1724
1724
|
// Pace a single live message from any conversation. Called from the
|
|
1725
1725
|
// transport 'message' subscription (live SSE arrival) and from the
|
|
@@ -1737,19 +1737,19 @@ const yt = {
|
|
|
1737
1737
|
// silently. Both sides of the comparison are server timestamps, so
|
|
1738
1738
|
// this is immune to client clock skew.
|
|
1739
1739
|
paceLiveMessage(e, t) {
|
|
1740
|
-
var
|
|
1740
|
+
var l;
|
|
1741
1741
|
if (!(e != null && e.id) || this.revealedAt[e.id] !== void 0) return;
|
|
1742
1742
|
if (!he(e)) {
|
|
1743
1743
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1744
1744
|
return;
|
|
1745
1745
|
}
|
|
1746
|
-
const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0,
|
|
1747
|
-
if (!s && !
|
|
1746
|
+
const s = typeof (e == null ? void 0 : e.text_md) == "string" && e.text_md.trim().length > 0, i = Array.isArray((l = e == null ? void 0 : e.payload) == null ? void 0 : l.attachments) && e.payload.attachments.length > 0;
|
|
1747
|
+
if (!s && !i) {
|
|
1748
1748
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1749
1749
|
return;
|
|
1750
1750
|
}
|
|
1751
|
-
const
|
|
1752
|
-
if (n && (
|
|
1751
|
+
const a = this._liveHwm[t], n = (e == null ? void 0 : e.created_at) || "";
|
|
1752
|
+
if (n && (a === void 0 || n > a) && (this._liveHwm = { ...this._liveHwm, [t]: n }), !(a !== void 0 && n && n > a)) {
|
|
1753
1753
|
this.revealedAt = { ...this.revealedAt, [e.id]: Date.now() };
|
|
1754
1754
|
return;
|
|
1755
1755
|
}
|
|
@@ -1815,16 +1815,16 @@ const yt = {
|
|
|
1815
1815
|
// messages, or when the pointer is already at/ahead of the
|
|
1816
1816
|
// candidate id.
|
|
1817
1817
|
markConvRead(e) {
|
|
1818
|
-
var n,
|
|
1818
|
+
var n, r;
|
|
1819
1819
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1820
|
-
const t = ((
|
|
1820
|
+
const t = ((r = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : r[e.id]) || [], s = At(t);
|
|
1821
1821
|
if (s == null) return;
|
|
1822
|
-
const
|
|
1823
|
-
|
|
1824
|
-
const
|
|
1825
|
-
this._readMarkerPending = null, this._readMarkerTimer = null,
|
|
1826
|
-
|
|
1827
|
-
|
|
1822
|
+
const i = Y(e.last_read_message_id), a = Y(s);
|
|
1823
|
+
a != null && (i != null && a <= i || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
1824
|
+
const l = this._readMarkerPending;
|
|
1825
|
+
this._readMarkerPending = null, this._readMarkerTimer = null, l && this.store && this.store.markConversationRead(
|
|
1826
|
+
l.convId,
|
|
1827
|
+
l.messageId
|
|
1828
1828
|
);
|
|
1829
1829
|
}, kt))));
|
|
1830
1830
|
}
|
|
@@ -1838,10 +1838,10 @@ function At(e) {
|
|
|
1838
1838
|
}
|
|
1839
1839
|
return null;
|
|
1840
1840
|
}
|
|
1841
|
-
const
|
|
1841
|
+
const P = (e, t) => {
|
|
1842
1842
|
const s = e.__vccOpts || e;
|
|
1843
|
-
for (const [
|
|
1844
|
-
s[
|
|
1843
|
+
for (const [i, a] of t)
|
|
1844
|
+
s[i] = a;
|
|
1845
1845
|
return s;
|
|
1846
1846
|
}, St = {
|
|
1847
1847
|
name: "WmHumanAvatar",
|
|
@@ -1864,9 +1864,9 @@ const N = (e, t) => {
|
|
|
1864
1864
|
}
|
|
1865
1865
|
}
|
|
1866
1866
|
}, Tt = ["src", "alt"];
|
|
1867
|
-
function Mt(e, t, s,
|
|
1867
|
+
function Mt(e, t, s, i, a, n) {
|
|
1868
1868
|
return c(), d("div", {
|
|
1869
|
-
class:
|
|
1869
|
+
class: R(["wm-huav", { "wm-huav--tail": s.tail }]),
|
|
1870
1870
|
style: z({
|
|
1871
1871
|
width: s.size + "px",
|
|
1872
1872
|
height: s.size + "px",
|
|
@@ -1884,7 +1884,7 @@ function Mt(e, t, s, r, i, n) {
|
|
|
1884
1884
|
}, v(n.initials), 5))
|
|
1885
1885
|
], 6);
|
|
1886
1886
|
}
|
|
1887
|
-
const ve = /* @__PURE__ */
|
|
1887
|
+
const ve = /* @__PURE__ */ P(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
|
|
1888
1888
|
name: "WmLauncher",
|
|
1889
1889
|
components: { HumanAvatar: ve },
|
|
1890
1890
|
inject: {
|
|
@@ -1910,24 +1910,24 @@ const ve = /* @__PURE__ */ N(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d
|
|
|
1910
1910
|
return this.peeks.slice(0, xt).reverse();
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
|
-
},
|
|
1914
|
-
function zt(e, t, s,
|
|
1915
|
-
const
|
|
1913
|
+
}, 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" }, Dt = { class: "wm-peek__name" }, Nt = { class: "wm-peek__action" }, Ut = { class: "wm-peek__text" }, jt = ["onClick"], Ft = ["aria-label"], Ht = ["aria-label"];
|
|
1914
|
+
function zt(e, t, s, i, a, n) {
|
|
1915
|
+
const r = B("HumanAvatar");
|
|
1916
1916
|
return c(), d("div", {
|
|
1917
1917
|
class: "wm-launcherWrap",
|
|
1918
|
-
onMouseenter: t[1] || (t[1] = (
|
|
1919
|
-
onMouseleave: t[2] || (t[2] = (
|
|
1920
|
-
onFocusin: t[3] || (t[3] = (
|
|
1921
|
-
onFocusout: t[4] || (t[4] = (
|
|
1918
|
+
onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
|
|
1919
|
+
onMouseleave: t[2] || (t[2] = (l) => e.$emit("hover", !1)),
|
|
1920
|
+
onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
|
|
1921
|
+
onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
|
|
1922
1922
|
}, [
|
|
1923
|
-
K(
|
|
1923
|
+
K(Ue, { name: "wm-peek" }, {
|
|
1924
1924
|
default: je(() => [
|
|
1925
1925
|
n.visiblePeeks.length ? (c(), d("div", {
|
|
1926
1926
|
key: 0,
|
|
1927
|
-
class:
|
|
1927
|
+
class: R(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
|
|
1928
1928
|
}, [
|
|
1929
|
-
(c(!0), d(I, null, j(n.visiblePeeks, (
|
|
1930
|
-
key:
|
|
1929
|
+
(c(!0), d(I, null, j(n.visiblePeeks, (l, f) => (c(), d("div", {
|
|
1930
|
+
key: l.convId,
|
|
1931
1931
|
class: "wm-peek",
|
|
1932
1932
|
style: z({
|
|
1933
1933
|
"--depth": n.visiblePeeks.length - 1 - f,
|
|
@@ -1936,21 +1936,21 @@ function zt(e, t, s, r, i, n) {
|
|
|
1936
1936
|
role: "button",
|
|
1937
1937
|
tabindex: "0",
|
|
1938
1938
|
"aria-label": n.t("launcher.openConversationWith", {
|
|
1939
|
-
name:
|
|
1939
|
+
name: l.senderName || n.t("launcher.theAgent")
|
|
1940
1940
|
}),
|
|
1941
|
-
onClick: (
|
|
1941
|
+
onClick: (k) => e.$emit("open", l.convId),
|
|
1942
1942
|
onKeydown: [
|
|
1943
|
-
ge(J((
|
|
1944
|
-
ge(J((
|
|
1943
|
+
ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["enter"]),
|
|
1944
|
+
ge(J((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
|
|
1945
1945
|
]
|
|
1946
1946
|
}, [
|
|
1947
|
-
|
|
1947
|
+
o("button", {
|
|
1948
1948
|
type: "button",
|
|
1949
1949
|
class: "wm-peek__close",
|
|
1950
1950
|
"aria-label": n.t("launcher.dismiss"),
|
|
1951
|
-
onClick: J((
|
|
1951
|
+
onClick: J((k) => e.$emit("dismiss", l.convId), ["stop"])
|
|
1952
1952
|
}, [...t[5] || (t[5] = [
|
|
1953
|
-
|
|
1953
|
+
o("svg", {
|
|
1954
1954
|
width: "9",
|
|
1955
1955
|
height: "9",
|
|
1956
1956
|
viewBox: "0 0 24 24",
|
|
@@ -1961,45 +1961,45 @@ function zt(e, t, s, r, i, n) {
|
|
|
1961
1961
|
"stroke-linejoin": "round",
|
|
1962
1962
|
"aria-hidden": "true"
|
|
1963
1963
|
}, [
|
|
1964
|
-
|
|
1964
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1965
1965
|
], -1)
|
|
1966
1966
|
])], 8, Lt),
|
|
1967
|
-
|
|
1968
|
-
K(
|
|
1969
|
-
name:
|
|
1970
|
-
"avatar-url":
|
|
1967
|
+
o("div", It, [
|
|
1968
|
+
K(r, {
|
|
1969
|
+
name: l.senderName,
|
|
1970
|
+
"avatar-url": l.senderAvatarUrl,
|
|
1971
1971
|
size: 34
|
|
1972
1972
|
}, null, 8, ["name", "avatar-url"]),
|
|
1973
|
-
|
|
1973
|
+
l.count > 1 ? (c(), d("span", {
|
|
1974
1974
|
key: 0,
|
|
1975
1975
|
class: "wm-peek__avatarBadge",
|
|
1976
|
-
"aria-label": n.t("launcher.unreadMessages", { count:
|
|
1977
|
-
}, v(
|
|
1976
|
+
"aria-label": n.t("launcher.unreadMessages", { count: l.count })
|
|
1977
|
+
}, v(l.count > 9 ? "9+" : l.count), 9, Et)) : b("", !0)
|
|
1978
1978
|
]),
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1979
|
+
o("div", Bt, [
|
|
1980
|
+
o("div", Pt, [
|
|
1981
|
+
o("span", Dt, v(l.senderName || n.t("common.agent")), 1),
|
|
1982
|
+
o("span", Nt, v(n.t("launcher.repliedToYou")), 1)
|
|
1983
1983
|
]),
|
|
1984
|
-
|
|
1984
|
+
o("p", Ut, v(l.preview), 1)
|
|
1985
1985
|
]),
|
|
1986
|
-
|
|
1986
|
+
o("button", {
|
|
1987
1987
|
type: "button",
|
|
1988
1988
|
class: "wm-peek__open",
|
|
1989
|
-
onClick: J((
|
|
1989
|
+
onClick: J((k) => e.$emit("open", l.convId), ["stop"])
|
|
1990
1990
|
}, v(n.t("common.open")), 9, jt)
|
|
1991
|
-
], 44,
|
|
1992
|
-
], 2)) :
|
|
1991
|
+
], 44, Rt))), 128))
|
|
1992
|
+
], 2)) : b("", !0)
|
|
1993
1993
|
]),
|
|
1994
1994
|
_: 1
|
|
1995
1995
|
}),
|
|
1996
|
-
|
|
1996
|
+
o("button", {
|
|
1997
1997
|
type: "button",
|
|
1998
1998
|
class: "wm-launcher",
|
|
1999
1999
|
"aria-label": n.t("launcher.open"),
|
|
2000
|
-
onClick: t[0] || (t[0] = (
|
|
2000
|
+
onClick: t[0] || (t[0] = (l) => e.$emit("open"))
|
|
2001
2001
|
}, [
|
|
2002
|
-
t[6] || (t[6] =
|
|
2002
|
+
t[6] || (t[6] = o("svg", {
|
|
2003
2003
|
width: "20",
|
|
2004
2004
|
height: "20",
|
|
2005
2005
|
viewBox: "0 0 24 24",
|
|
@@ -2010,7 +2010,7 @@ function zt(e, t, s, r, i, n) {
|
|
|
2010
2010
|
"stroke-linejoin": "round",
|
|
2011
2011
|
"aria-hidden": "true"
|
|
2012
2012
|
}, [
|
|
2013
|
-
|
|
2013
|
+
o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
2014
2014
|
], -1)),
|
|
2015
2015
|
s.unreadCount > 0 ? (c(), d("span", {
|
|
2016
2016
|
key: 0,
|
|
@@ -2020,11 +2020,11 @@ function zt(e, t, s, r, i, n) {
|
|
|
2020
2020
|
}) : n.t("launcher.unreadConversationsOne", {
|
|
2021
2021
|
count: s.unreadCount
|
|
2022
2022
|
})
|
|
2023
|
-
}, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) :
|
|
2023
|
+
}, v(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, Ht)) : b("", !0)
|
|
2024
2024
|
], 8, Ft)
|
|
2025
2025
|
], 32);
|
|
2026
2026
|
}
|
|
2027
|
-
const qt = /* @__PURE__ */
|
|
2027
|
+
const qt = /* @__PURE__ */ P(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
|
|
2028
2028
|
name: "WmAIAvatar",
|
|
2029
2029
|
props: {
|
|
2030
2030
|
size: { type: Number, default: 26 },
|
|
@@ -2057,18 +2057,18 @@ const qt = /* @__PURE__ */ N(Rt, [["render", zt], ["__scopeId", "data-v-d81459bc
|
|
|
2057
2057
|
key: 0,
|
|
2058
2058
|
class: "wm-aiav__pulse"
|
|
2059
2059
|
}, Wt = ["src", "alt"], $t = ["width", "height"];
|
|
2060
|
-
function Gt(e, t, s,
|
|
2060
|
+
function Gt(e, t, s, i, a, n) {
|
|
2061
2061
|
return c(), d("div", {
|
|
2062
|
-
class:
|
|
2062
|
+
class: R(["wm-aiav", { "wm-aiav--tail": s.tail }]),
|
|
2063
2063
|
style: z({
|
|
2064
2064
|
width: s.size + "px",
|
|
2065
2065
|
height: s.size + "px",
|
|
2066
2066
|
"--wm-avr": s.size * 0.32 + "px"
|
|
2067
2067
|
})
|
|
2068
2068
|
}, [
|
|
2069
|
-
s.pulse ? (c(), d("div", Kt)) :
|
|
2070
|
-
|
|
2071
|
-
class:
|
|
2069
|
+
s.pulse ? (c(), d("div", Kt)) : b("", !0),
|
|
2070
|
+
o("div", {
|
|
2071
|
+
class: R(["wm-aiav__inner", {
|
|
2072
2072
|
"wm-aiav__inner--glow": s.pulse,
|
|
2073
2073
|
"wm-aiav__inner--img": !!s.imageUrl,
|
|
2074
2074
|
"wm-aiav__inner--initials": !s.imageUrl && !!n.initials
|
|
@@ -2092,19 +2092,19 @@ function Gt(e, t, s, r, i, n) {
|
|
|
2092
2092
|
fill: "none",
|
|
2093
2093
|
"aria-hidden": "true"
|
|
2094
2094
|
}, [...t[0] || (t[0] = [
|
|
2095
|
-
|
|
2095
|
+
o("path", {
|
|
2096
2096
|
d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
|
|
2097
2097
|
fill: "white",
|
|
2098
2098
|
opacity: "0.92"
|
|
2099
2099
|
}, null, -1),
|
|
2100
|
-
|
|
2100
|
+
o("circle", {
|
|
2101
2101
|
cx: "19",
|
|
2102
2102
|
cy: "5",
|
|
2103
2103
|
r: "1.5",
|
|
2104
2104
|
fill: "white",
|
|
2105
2105
|
opacity: "0.55"
|
|
2106
2106
|
}, null, -1),
|
|
2107
|
-
|
|
2107
|
+
o("circle", {
|
|
2108
2108
|
cx: "5",
|
|
2109
2109
|
cy: "18",
|
|
2110
2110
|
r: "1",
|
|
@@ -2115,7 +2115,7 @@ function Gt(e, t, s, r, i, n) {
|
|
|
2115
2115
|
], 6)
|
|
2116
2116
|
], 6);
|
|
2117
2117
|
}
|
|
2118
|
-
const oe = /* @__PURE__ */
|
|
2118
|
+
const oe = /* @__PURE__ */ P(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
|
|
2119
2119
|
name: "WmTeamAvatars",
|
|
2120
2120
|
props: {
|
|
2121
2121
|
members: { type: Array, default: () => [] },
|
|
@@ -2144,32 +2144,32 @@ const oe = /* @__PURE__ */ N(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d
|
|
|
2144
2144
|
key: 0,
|
|
2145
2145
|
class: "wm-team__label"
|
|
2146
2146
|
};
|
|
2147
|
-
function en(e, t, s,
|
|
2147
|
+
function en(e, t, s, i, a, n) {
|
|
2148
2148
|
return n.visible ? (c(), d("div", Jt, [
|
|
2149
|
-
|
|
2149
|
+
o("div", {
|
|
2150
2150
|
class: "wm-team__stack",
|
|
2151
2151
|
style: z({ width: n.stackWidth + "px" })
|
|
2152
2152
|
}, [
|
|
2153
|
-
(c(!0), d(I, null, j(s.members.slice(0, 3), (
|
|
2154
|
-
key:
|
|
2153
|
+
(c(!0), d(I, null, j(s.members.slice(0, 3), (r, l) => (c(), d("div", {
|
|
2154
|
+
key: l,
|
|
2155
2155
|
class: "wm-team__pill",
|
|
2156
2156
|
style: z({
|
|
2157
|
-
left:
|
|
2158
|
-
zIndex: 3 -
|
|
2159
|
-
background: n.colorFor(
|
|
2157
|
+
left: l * 13 + "px",
|
|
2158
|
+
zIndex: 3 - l,
|
|
2159
|
+
background: n.colorFor(r)
|
|
2160
2160
|
})
|
|
2161
2161
|
}, [
|
|
2162
|
-
|
|
2162
|
+
r.avatar_url ? (c(), d("img", {
|
|
2163
2163
|
key: 0,
|
|
2164
|
-
src:
|
|
2165
|
-
alt:
|
|
2166
|
-
}, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(
|
|
2164
|
+
src: r.avatar_url,
|
|
2165
|
+
alt: r.name || ""
|
|
2166
|
+
}, null, 8, Xt)) : (c(), d("span", Qt, v(n.initialsFor(r)), 1))
|
|
2167
2167
|
], 4))), 128))
|
|
2168
2168
|
], 4),
|
|
2169
|
-
s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) :
|
|
2170
|
-
])) :
|
|
2169
|
+
s.responseLabel ? (c(), d("span", Zt, v(s.responseLabel), 1)) : b("", !0)
|
|
2170
|
+
])) : b("", !0);
|
|
2171
2171
|
}
|
|
2172
|
-
const tn = /* @__PURE__ */
|
|
2172
|
+
const tn = /* @__PURE__ */ P(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
|
|
2173
2173
|
name: "WmHeader",
|
|
2174
2174
|
components: { AIAvatar: oe, TeamAvatars: tn },
|
|
2175
2175
|
inject: {
|
|
@@ -2203,8 +2203,8 @@ const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
|
|
|
2203
2203
|
const e = Array.isArray(this.teamMembers) ? this.teamMembers : [];
|
|
2204
2204
|
if (e.length <= 3) return e;
|
|
2205
2205
|
const t = (/* @__PURE__ */ new Date()).getHours() % e.length, s = [];
|
|
2206
|
-
for (let
|
|
2207
|
-
s.push(e[(t +
|
|
2206
|
+
for (let i = 0; i < 3; i++)
|
|
2207
|
+
s.push(e[(t + i) % e.length]);
|
|
2208
2208
|
return s;
|
|
2209
2209
|
}
|
|
2210
2210
|
}
|
|
@@ -2215,8 +2215,8 @@ const tn = /* @__PURE__ */ N(Yt, [["render", en], ["__scopeId", "data-v-e49a9063
|
|
|
2215
2215
|
key: 3,
|
|
2216
2216
|
class: "wm-header__fill"
|
|
2217
2217
|
}, un = { class: "wm-header__actions" }, hn = ["aria-label", "title"], mn = ["aria-label", "title"];
|
|
2218
|
-
function fn(e, t, s,
|
|
2219
|
-
const
|
|
2218
|
+
function fn(e, t, s, i, a, n) {
|
|
2219
|
+
const r = B("AIAvatar"), l = B("TeamAvatars");
|
|
2220
2220
|
return c(), d("div", sn, [
|
|
2221
2221
|
s.showBack ? (c(), d("button", {
|
|
2222
2222
|
key: 0,
|
|
@@ -2225,7 +2225,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2225
2225
|
"aria-label": n.t("header.backToHome"),
|
|
2226
2226
|
onClick: t[0] || (t[0] = (f) => e.$emit("back"))
|
|
2227
2227
|
}, [...t[3] || (t[3] = [
|
|
2228
|
-
|
|
2228
|
+
o("svg", {
|
|
2229
2229
|
width: "13",
|
|
2230
2230
|
height: "13",
|
|
2231
2231
|
viewBox: "0 0 24 24",
|
|
@@ -2236,59 +2236,59 @@ function fn(e, t, s, r, i, n) {
|
|
|
2236
2236
|
"stroke-linejoin": "round",
|
|
2237
2237
|
"aria-hidden": "true"
|
|
2238
2238
|
}, [
|
|
2239
|
-
|
|
2239
|
+
o("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2240
2240
|
], -1)
|
|
2241
2241
|
])], 8, rn)) : (c(), d("div", an)),
|
|
2242
2242
|
s.showIdentity ? (c(), d(I, { key: 2 }, [
|
|
2243
|
-
|
|
2244
|
-
K(
|
|
2243
|
+
o("div", on, [
|
|
2244
|
+
K(r, {
|
|
2245
2245
|
size: 30,
|
|
2246
2246
|
name: s.agentName,
|
|
2247
2247
|
"image-url": s.agentAvatarUrl
|
|
2248
2248
|
}, null, 8, ["name", "image-url"])
|
|
2249
2249
|
]),
|
|
2250
|
-
|
|
2251
|
-
|
|
2250
|
+
o("div", ln, [
|
|
2251
|
+
o("div", cn, v(s.title), 1)
|
|
2252
2252
|
]),
|
|
2253
|
-
n.hasTeam ? (c(),
|
|
2253
|
+
n.hasTeam ? (c(), D(l, {
|
|
2254
2254
|
key: 0,
|
|
2255
2255
|
members: n.displayedTeamMembers,
|
|
2256
2256
|
"response-label": ""
|
|
2257
|
-
}, null, 8, ["members"])) :
|
|
2257
|
+
}, null, 8, ["members"])) : b("", !0)
|
|
2258
2258
|
], 64)) : (c(), d("div", dn)),
|
|
2259
|
-
|
|
2259
|
+
o("div", un, [
|
|
2260
2260
|
s.showMore ? (c(), d("button", {
|
|
2261
2261
|
key: 0,
|
|
2262
2262
|
type: "button",
|
|
2263
|
-
class:
|
|
2263
|
+
class: R(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
|
|
2264
2264
|
"aria-label": n.t("header.moreOptions"),
|
|
2265
2265
|
title: n.t("header.moreOptions"),
|
|
2266
2266
|
onClick: t[1] || (t[1] = (f) => e.$emit("more"))
|
|
2267
2267
|
}, [...t[4] || (t[4] = [
|
|
2268
|
-
|
|
2268
|
+
o("svg", {
|
|
2269
2269
|
width: "13",
|
|
2270
2270
|
height: "13",
|
|
2271
2271
|
viewBox: "0 0 24 24",
|
|
2272
2272
|
fill: "currentColor",
|
|
2273
2273
|
"aria-hidden": "true"
|
|
2274
2274
|
}, [
|
|
2275
|
-
|
|
2275
|
+
o("circle", {
|
|
2276
2276
|
cx: "12",
|
|
2277
2277
|
cy: "5",
|
|
2278
2278
|
r: "1.6"
|
|
2279
2279
|
}),
|
|
2280
|
-
|
|
2280
|
+
o("circle", {
|
|
2281
2281
|
cx: "12",
|
|
2282
2282
|
cy: "12",
|
|
2283
2283
|
r: "1.6"
|
|
2284
2284
|
}),
|
|
2285
|
-
|
|
2285
|
+
o("circle", {
|
|
2286
2286
|
cx: "12",
|
|
2287
2287
|
cy: "19",
|
|
2288
2288
|
r: "1.6"
|
|
2289
2289
|
})
|
|
2290
2290
|
], -1)
|
|
2291
|
-
])], 10, hn)) :
|
|
2291
|
+
])], 10, hn)) : b("", !0),
|
|
2292
2292
|
s.showClose ? (c(), d("button", {
|
|
2293
2293
|
key: 1,
|
|
2294
2294
|
type: "button",
|
|
@@ -2297,7 +2297,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2297
2297
|
title: n.t("header.closeWidget"),
|
|
2298
2298
|
onClick: t[2] || (t[2] = (f) => e.$emit("close"))
|
|
2299
2299
|
}, [...t[5] || (t[5] = [
|
|
2300
|
-
|
|
2300
|
+
o("svg", {
|
|
2301
2301
|
width: "13",
|
|
2302
2302
|
height: "13",
|
|
2303
2303
|
viewBox: "0 0 24 24",
|
|
@@ -2308,13 +2308,13 @@ function fn(e, t, s, r, i, n) {
|
|
|
2308
2308
|
"stroke-linejoin": "round",
|
|
2309
2309
|
"aria-hidden": "true"
|
|
2310
2310
|
}, [
|
|
2311
|
-
|
|
2311
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2312
2312
|
], -1)
|
|
2313
|
-
])], 8, mn)) :
|
|
2313
|
+
])], 8, mn)) : b("", !0)
|
|
2314
2314
|
])
|
|
2315
2315
|
]);
|
|
2316
2316
|
}
|
|
2317
|
-
const _n = /* @__PURE__ */
|
|
2317
|
+
const _n = /* @__PURE__ */ P(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
|
|
2318
2318
|
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",
|
|
2319
2319
|
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",
|
|
2320
2320
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
@@ -2420,15 +2420,15 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2420
2420
|
if (!e) return "";
|
|
2421
2421
|
const t = new Date(e);
|
|
2422
2422
|
if (Number.isNaN(t.getTime())) return "";
|
|
2423
|
-
const s = ne(this.wmLocale()),
|
|
2424
|
-
if (t.toDateString() ===
|
|
2423
|
+
const s = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
|
|
2424
|
+
if (t.toDateString() === i.toDateString())
|
|
2425
2425
|
return t.toLocaleTimeString(s, {
|
|
2426
2426
|
hour: "2-digit",
|
|
2427
2427
|
minute: "2-digit"
|
|
2428
2428
|
});
|
|
2429
|
-
if (
|
|
2430
|
-
const
|
|
2431
|
-
return
|
|
2429
|
+
if (i.getTime() - t.getTime() < 7 * 864e5) {
|
|
2430
|
+
const r = t.toLocaleDateString(s, { weekday: "short" });
|
|
2431
|
+
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
2432
2432
|
}
|
|
2433
2433
|
return t.toLocaleDateString(s, {
|
|
2434
2434
|
day: "2-digit",
|
|
@@ -2442,13 +2442,13 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2442
2442
|
}, Cn = ["onClick"], An = {
|
|
2443
2443
|
key: 0,
|
|
2444
2444
|
class: "wm-onb__defaultAvatar"
|
|
2445
|
-
}, Sn = ["aria-label"], Tn = { class: "wm-onb__alert-body" }, Mn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" },
|
|
2445
|
+
}, Sn = ["aria-label"], Tn = { class: "wm-onb__alert-body" }, Mn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
|
|
2446
2446
|
key: 0,
|
|
2447
2447
|
class: "wm-onb__alert-sender"
|
|
2448
|
-
},
|
|
2448
|
+
}, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, In = {
|
|
2449
2449
|
key: 0,
|
|
2450
2450
|
class: "wm-onb__alert-time"
|
|
2451
|
-
}, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"],
|
|
2451
|
+
}, En = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Nn = ["onClick"], Un = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], Fn = {
|
|
2452
2452
|
key: 1,
|
|
2453
2453
|
width: "18",
|
|
2454
2454
|
height: "18",
|
|
@@ -2482,11 +2482,11 @@ const _n = /* @__PURE__ */ N(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2482
2482
|
"stroke-linejoin": "round",
|
|
2483
2483
|
"aria-hidden": "true"
|
|
2484
2484
|
}, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
|
|
2485
|
-
function Yn(e, t, s,
|
|
2486
|
-
const
|
|
2485
|
+
function Yn(e, t, s, i, a, n) {
|
|
2486
|
+
const r = B("AIAvatar");
|
|
2487
2487
|
return c(), d("div", pn, [
|
|
2488
|
-
|
|
2489
|
-
t[2] || (t[2] =
|
|
2488
|
+
o("div", vn, [
|
|
2489
|
+
t[2] || (t[2] = o("svg", {
|
|
2490
2490
|
class: "wm-onb__hero-deco",
|
|
2491
2491
|
width: "180",
|
|
2492
2492
|
height: "180",
|
|
@@ -2494,7 +2494,7 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2494
2494
|
fill: "none",
|
|
2495
2495
|
"aria-hidden": "true"
|
|
2496
2496
|
}, [
|
|
2497
|
-
|
|
2497
|
+
o("circle", {
|
|
2498
2498
|
cx: "170",
|
|
2499
2499
|
cy: "10",
|
|
2500
2500
|
r: "105",
|
|
@@ -2503,7 +2503,7 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2503
2503
|
"stroke-dasharray": "1 5",
|
|
2504
2504
|
opacity: "0.35"
|
|
2505
2505
|
}),
|
|
2506
|
-
|
|
2506
|
+
o("circle", {
|
|
2507
2507
|
cx: "170",
|
|
2508
2508
|
cy: "10",
|
|
2509
2509
|
r: "72",
|
|
@@ -2512,7 +2512,7 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2512
2512
|
"stroke-dasharray": "1 5",
|
|
2513
2513
|
opacity: "0.5"
|
|
2514
2514
|
}),
|
|
2515
|
-
|
|
2515
|
+
o("circle", {
|
|
2516
2516
|
cx: "152",
|
|
2517
2517
|
cy: "34",
|
|
2518
2518
|
r: "2.5",
|
|
@@ -2520,27 +2520,27 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2520
2520
|
opacity: "0.65"
|
|
2521
2521
|
})
|
|
2522
2522
|
], -1)),
|
|
2523
|
-
K(
|
|
2523
|
+
K(r, {
|
|
2524
2524
|
size: 52,
|
|
2525
2525
|
"image-url": s.defaultIconUrl
|
|
2526
2526
|
}, null, 8, ["image-url"]),
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2527
|
+
o("div", yn, [
|
|
2528
|
+
o("div", wn, v(n.heroTitle), 1),
|
|
2529
|
+
o("div", bn, v(n.heroSub), 1)
|
|
2530
2530
|
])
|
|
2531
2531
|
]),
|
|
2532
2532
|
n.unreadThreads.length ? (c(), d("div", kn, [
|
|
2533
|
-
(c(!0), d(I, null, j(n.unreadThreads, (
|
|
2534
|
-
key:
|
|
2533
|
+
(c(!0), d(I, null, j(n.unreadThreads, (l) => (c(), d("button", {
|
|
2534
|
+
key: l.id,
|
|
2535
2535
|
type: "button",
|
|
2536
2536
|
class: "wm-onb__alert",
|
|
2537
|
-
onClick: (f) => e.$emit("resume",
|
|
2537
|
+
onClick: (f) => e.$emit("resume", l)
|
|
2538
2538
|
}, [
|
|
2539
|
-
|
|
2540
|
-
class:
|
|
2539
|
+
o("span", {
|
|
2540
|
+
class: R(["wm-onb__alert-avatar", n.avatarWrapperClass(l)])
|
|
2541
2541
|
}, [
|
|
2542
|
-
n.isDefaultAvatar(
|
|
2543
|
-
|
|
2542
|
+
n.isDefaultAvatar(l) ? (c(), d("span", An, [...t[3] || (t[3] = [
|
|
2543
|
+
o("svg", {
|
|
2544
2544
|
width: "20",
|
|
2545
2545
|
height: "20",
|
|
2546
2546
|
viewBox: "0 0 24 24",
|
|
@@ -2551,41 +2551,41 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2551
2551
|
"stroke-linejoin": "round",
|
|
2552
2552
|
"aria-hidden": "true"
|
|
2553
2553
|
}, [
|
|
2554
|
-
|
|
2554
|
+
o("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
2555
2555
|
], -1)
|
|
2556
|
-
])])) : (c(),
|
|
2556
|
+
])])) : (c(), D(Ae(n.avatarComponent(l)), Fe({
|
|
2557
2557
|
key: 1,
|
|
2558
2558
|
ref_for: !0
|
|
2559
|
-
}, n.avatarProps(
|
|
2560
|
-
|
|
2559
|
+
}, n.avatarProps(l)), null, 16)),
|
|
2560
|
+
o("span", {
|
|
2561
2561
|
class: "wm-onb__alert-dot",
|
|
2562
2562
|
"aria-label": n.t("onboarding.unread")
|
|
2563
2563
|
}, null, 8, Sn)
|
|
2564
2564
|
], 2),
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
n.senderLabel(
|
|
2569
|
-
|
|
2570
|
-
innerHTML: n.renderPreview(
|
|
2571
|
-
}, null, 8,
|
|
2565
|
+
o("span", Tn, [
|
|
2566
|
+
o("span", Mn, v(l.title), 1),
|
|
2567
|
+
o("span", xn, [
|
|
2568
|
+
n.senderLabel(l) ? (c(), d("span", On, v(n.senderLabel(l)) + " · ", 1)) : b("", !0),
|
|
2569
|
+
o("span", {
|
|
2570
|
+
innerHTML: n.renderPreview(l.preview)
|
|
2571
|
+
}, null, 8, Rn)
|
|
2572
2572
|
])
|
|
2573
2573
|
]),
|
|
2574
|
-
|
|
2575
|
-
n.formatTs(
|
|
2576
|
-
|
|
2574
|
+
o("span", Ln, [
|
|
2575
|
+
n.formatTs(l._ts) ? (c(), d("span", In, v(n.formatTs(l._ts)), 1)) : b("", !0),
|
|
2576
|
+
o("span", En, v(n.t("onboarding.resume")), 1)
|
|
2577
2577
|
])
|
|
2578
2578
|
], 8, Cn))), 128))
|
|
2579
|
-
])) :
|
|
2580
|
-
|
|
2581
|
-
|
|
2579
|
+
])) : b("", !0),
|
|
2580
|
+
o("div", Bn, [
|
|
2581
|
+
o("button", {
|
|
2582
2582
|
type: "button",
|
|
2583
2583
|
class: "wm-onb__btn wm-onb__btn--start",
|
|
2584
2584
|
disabled: s.busy,
|
|
2585
|
-
onClick: t[0] || (t[0] = (
|
|
2585
|
+
onClick: t[0] || (t[0] = (l) => e.$emit("start"))
|
|
2586
2586
|
}, [
|
|
2587
|
-
t[4] || (t[4] =
|
|
2588
|
-
|
|
2587
|
+
t[4] || (t[4] = o("span", { class: "wm-onb__btn-icon" }, [
|
|
2588
|
+
o("svg", {
|
|
2589
2589
|
width: "18",
|
|
2590
2590
|
height: "18",
|
|
2591
2591
|
viewBox: "0 0 24 24",
|
|
@@ -2596,51 +2596,51 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2596
2596
|
"stroke-linejoin": "round",
|
|
2597
2597
|
"aria-hidden": "true"
|
|
2598
2598
|
}, [
|
|
2599
|
-
|
|
2599
|
+
o("path", { d: "M12 5v14M5 12h14" })
|
|
2600
2600
|
])
|
|
2601
2601
|
], -1)),
|
|
2602
|
-
|
|
2602
|
+
o("span", Dn, v(s.busy ? "…" : n.t("onboarding.start")), 1)
|
|
2603
2603
|
], 8, Pn),
|
|
2604
|
-
(c(!0), d(I, null, j(s.quickLinks, (
|
|
2604
|
+
(c(!0), d(I, null, j(s.quickLinks, (l, f) => (c(), d("button", {
|
|
2605
2605
|
key: "ql-" + f,
|
|
2606
2606
|
type: "button",
|
|
2607
2607
|
class: "wm-onb__btn",
|
|
2608
|
-
onClick: (
|
|
2608
|
+
onClick: (k) => e.$emit("select", l)
|
|
2609
2609
|
}, [
|
|
2610
|
-
|
|
2611
|
-
n.safeIconUrl(
|
|
2610
|
+
o("span", Un, [
|
|
2611
|
+
n.safeIconUrl(l) ? (c(), d("span", {
|
|
2612
2612
|
key: 0,
|
|
2613
2613
|
class: "wm-onb__btn-iconImg",
|
|
2614
|
-
style: z(n.iconUrlStyle(
|
|
2614
|
+
style: z(n.iconUrlStyle(l)),
|
|
2615
2615
|
role: "img",
|
|
2616
|
-
"aria-label":
|
|
2616
|
+
"aria-label": l.label || ""
|
|
2617
2617
|
}, null, 12, jn)) : (c(), d("svg", Fn, [
|
|
2618
|
-
|
|
2619
|
-
d: n.iconPath(
|
|
2618
|
+
o("path", {
|
|
2619
|
+
d: n.iconPath(l.icon)
|
|
2620
2620
|
}, null, 8, Hn)
|
|
2621
2621
|
]))
|
|
2622
2622
|
]),
|
|
2623
|
-
|
|
2624
|
-
n.isExternalLink(
|
|
2625
|
-
|
|
2626
|
-
])])) :
|
|
2627
|
-
], 8,
|
|
2623
|
+
o("span", zn, v(l.label), 1),
|
|
2624
|
+
n.isExternalLink(l) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
|
|
2625
|
+
o("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
|
|
2626
|
+
])])) : b("", !0)
|
|
2627
|
+
], 8, Nn))), 128)),
|
|
2628
2628
|
s.openThreads.length ? (c(), d("button", {
|
|
2629
2629
|
key: 0,
|
|
2630
2630
|
type: "button",
|
|
2631
2631
|
class: "wm-onb__btn",
|
|
2632
|
-
onClick: t[1] || (t[1] = (
|
|
2632
|
+
onClick: t[1] || (t[1] = (l) => e.$emit("view-history"))
|
|
2633
2633
|
}, [
|
|
2634
|
-
|
|
2634
|
+
o("span", Vn, [
|
|
2635
2635
|
(c(), d("svg", Kn, [
|
|
2636
|
-
|
|
2636
|
+
o("path", {
|
|
2637
2637
|
d: n.iconPath("chat")
|
|
2638
2638
|
}, null, 8, Wn)
|
|
2639
2639
|
]))
|
|
2640
2640
|
]),
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
t[6] || (t[6] =
|
|
2641
|
+
o("span", $n, v(n.t("onboarding.allConversations")), 1),
|
|
2642
|
+
o("span", Gn, v(s.openThreads.length), 1),
|
|
2643
|
+
t[6] || (t[6] = o("svg", {
|
|
2644
2644
|
class: "wm-onb__btn-trail",
|
|
2645
2645
|
width: "13",
|
|
2646
2646
|
height: "13",
|
|
@@ -2652,13 +2652,13 @@ function Yn(e, t, s, r, i, n) {
|
|
|
2652
2652
|
"stroke-linejoin": "round",
|
|
2653
2653
|
"aria-hidden": "true"
|
|
2654
2654
|
}, [
|
|
2655
|
-
|
|
2655
|
+
o("path", { d: "M9 18l6-6-6-6" })
|
|
2656
2656
|
], -1))
|
|
2657
|
-
])) :
|
|
2657
|
+
])) : b("", !0)
|
|
2658
2658
|
])
|
|
2659
2659
|
]);
|
|
2660
2660
|
}
|
|
2661
|
-
const Jn = /* @__PURE__ */
|
|
2661
|
+
const Jn = /* @__PURE__ */ P(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
|
|
2662
2662
|
name: "WmHistory",
|
|
2663
2663
|
components: { AIAvatar: oe, HumanAvatar: ve },
|
|
2664
2664
|
inject: {
|
|
@@ -2711,15 +2711,15 @@ const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
|
|
|
2711
2711
|
if (!e) return "";
|
|
2712
2712
|
const t = new Date(e);
|
|
2713
2713
|
if (Number.isNaN(t.getTime())) return "";
|
|
2714
|
-
const s = ne(this.wmLocale()),
|
|
2715
|
-
if (t.toDateString() ===
|
|
2714
|
+
const s = ne(this.wmLocale()), i = /* @__PURE__ */ new Date();
|
|
2715
|
+
if (t.toDateString() === i.toDateString())
|
|
2716
2716
|
return t.toLocaleTimeString(s, {
|
|
2717
2717
|
hour: "2-digit",
|
|
2718
2718
|
minute: "2-digit"
|
|
2719
2719
|
});
|
|
2720
|
-
if (
|
|
2721
|
-
const
|
|
2722
|
-
return
|
|
2720
|
+
if (i.getTime() - t.getTime() < 7 * 864e5) {
|
|
2721
|
+
const r = t.toLocaleDateString(s, { weekday: "short" });
|
|
2722
|
+
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
2723
2723
|
}
|
|
2724
2724
|
return t.toLocaleDateString(s, {
|
|
2725
2725
|
day: "2-digit",
|
|
@@ -2737,11 +2737,11 @@ const Jn = /* @__PURE__ */ N(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe
|
|
|
2737
2737
|
key: 0,
|
|
2738
2738
|
class: "wm-hist__empty"
|
|
2739
2739
|
};
|
|
2740
|
-
function us(e, t, s,
|
|
2740
|
+
function us(e, t, s, i, a, n) {
|
|
2741
2741
|
return c(), d("div", Qn, [
|
|
2742
|
-
|
|
2743
|
-
t[1] || (t[1] =
|
|
2744
|
-
|
|
2742
|
+
o("div", Zn, [
|
|
2743
|
+
t[1] || (t[1] = o("span", { class: "wm-hist__searchIcon" }, [
|
|
2744
|
+
o("svg", {
|
|
2745
2745
|
width: "13",
|
|
2746
2746
|
height: "13",
|
|
2747
2747
|
viewBox: "0 0 24 24",
|
|
@@ -2752,30 +2752,30 @@ function us(e, t, s, r, i, n) {
|
|
|
2752
2752
|
"stroke-linejoin": "round",
|
|
2753
2753
|
"aria-hidden": "true"
|
|
2754
2754
|
}, [
|
|
2755
|
-
|
|
2755
|
+
o("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
2756
2756
|
])
|
|
2757
2757
|
], -1)),
|
|
2758
|
-
G(
|
|
2759
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
2758
|
+
G(o("input", {
|
|
2759
|
+
"onUpdate:modelValue": t[0] || (t[0] = (r) => a.query = r),
|
|
2760
2760
|
type: "text",
|
|
2761
2761
|
placeholder: n.t("onboarding.search"),
|
|
2762
2762
|
"aria-label": n.t("onboarding.search")
|
|
2763
2763
|
}, null, 8, es), [
|
|
2764
|
-
[te,
|
|
2764
|
+
[te, a.query]
|
|
2765
2765
|
])
|
|
2766
2766
|
]),
|
|
2767
|
-
|
|
2768
|
-
(c(!0), d(I, null, j(n.filteredThreads, (
|
|
2769
|
-
key:
|
|
2767
|
+
o("div", ts, [
|
|
2768
|
+
(c(!0), d(I, null, j(n.filteredThreads, (r) => (c(), d("button", {
|
|
2769
|
+
key: r.id,
|
|
2770
2770
|
type: "button",
|
|
2771
|
-
class:
|
|
2772
|
-
onClick: (
|
|
2771
|
+
class: R(["wm-hist__thread", { "wm-hist__thread--unread": r.unread }]),
|
|
2772
|
+
onClick: (l) => e.$emit("resume", r)
|
|
2773
2773
|
}, [
|
|
2774
|
-
|
|
2775
|
-
class:
|
|
2774
|
+
o("span", {
|
|
2775
|
+
class: R(["wm-hist__thread-avatar", n.avatarWrapperClass(r)])
|
|
2776
2776
|
}, [
|
|
2777
|
-
n.isDefaultAvatar(
|
|
2778
|
-
|
|
2777
|
+
n.isDefaultAvatar(r) ? (c(), d("span", ss, [...t[2] || (t[2] = [
|
|
2778
|
+
o("svg", {
|
|
2779
2779
|
width: "18",
|
|
2780
2780
|
height: "18",
|
|
2781
2781
|
viewBox: "0 0 24 24",
|
|
@@ -2786,28 +2786,28 @@ function us(e, t, s, r, i, n) {
|
|
|
2786
2786
|
"stroke-linejoin": "round",
|
|
2787
2787
|
"aria-hidden": "true"
|
|
2788
2788
|
}, [
|
|
2789
|
-
|
|
2789
|
+
o("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" })
|
|
2790
2790
|
], -1)
|
|
2791
|
-
])])) : (c(),
|
|
2791
|
+
])])) : (c(), D(Ae(n.avatarComponent(r)), Fe({
|
|
2792
2792
|
key: 1,
|
|
2793
2793
|
ref_for: !0
|
|
2794
|
-
}, n.avatarProps(
|
|
2795
|
-
|
|
2794
|
+
}, n.avatarProps(r)), null, 16)),
|
|
2795
|
+
r.unread ? (c(), d("span", {
|
|
2796
2796
|
key: 2,
|
|
2797
2797
|
class: "wm-hist__thread-dot",
|
|
2798
2798
|
"aria-label": n.t("onboarding.unread")
|
|
2799
|
-
}, null, 8, rs)) :
|
|
2799
|
+
}, null, 8, rs)) : b("", !0)
|
|
2800
2800
|
], 2),
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2801
|
+
o("span", is, [
|
|
2802
|
+
o("span", as, v(r.title), 1),
|
|
2803
|
+
o("span", {
|
|
2804
2804
|
class: "wm-hist__thread-preview",
|
|
2805
|
-
innerHTML: n.renderPreview(
|
|
2805
|
+
innerHTML: n.renderPreview(r.preview)
|
|
2806
2806
|
}, null, 8, os)
|
|
2807
2807
|
]),
|
|
2808
|
-
|
|
2809
|
-
n.formatTs(
|
|
2810
|
-
t[3] || (t[3] =
|
|
2808
|
+
o("span", ls, [
|
|
2809
|
+
n.formatTs(r._ts) ? (c(), d("span", cs, v(n.formatTs(r._ts)), 1)) : b("", !0),
|
|
2810
|
+
t[3] || (t[3] = o("svg", {
|
|
2811
2811
|
width: "14",
|
|
2812
2812
|
height: "14",
|
|
2813
2813
|
viewBox: "0 0 24 24",
|
|
@@ -2819,15 +2819,15 @@ function us(e, t, s, r, i, n) {
|
|
|
2819
2819
|
class: "wm-hist__thread-chev",
|
|
2820
2820
|
"aria-hidden": "true"
|
|
2821
2821
|
}, [
|
|
2822
|
-
|
|
2822
|
+
o("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2823
2823
|
], -1))
|
|
2824
2824
|
])
|
|
2825
2825
|
], 10, ns))), 128)),
|
|
2826
|
-
n.filteredThreads.length ?
|
|
2826
|
+
n.filteredThreads.length ? b("", !0) : (c(), d("div", ds, v(a.query ? n.t("onboarding.noResults", { query: a.query }) : n.t("onboarding.noConversations")), 1))
|
|
2827
2827
|
])
|
|
2828
2828
|
]);
|
|
2829
2829
|
}
|
|
2830
|
-
const hs = /* @__PURE__ */
|
|
2830
|
+
const hs = /* @__PURE__ */ P(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
|
|
2831
2831
|
function ms(e) {
|
|
2832
2832
|
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();
|
|
2833
2833
|
}
|
|
@@ -2888,31 +2888,31 @@ const fs = {
|
|
|
2888
2888
|
"stroke-linecap": "round",
|
|
2889
2889
|
"stroke-linejoin": "round"
|
|
2890
2890
|
}, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
|
|
2891
|
-
function Cs(e, t, s,
|
|
2891
|
+
function Cs(e, t, s, i, a, n) {
|
|
2892
2892
|
return c(), d("div", {
|
|
2893
|
-
class:
|
|
2893
|
+
class: R(["wm-result", `wm-result--${s.state}`])
|
|
2894
2894
|
}, [
|
|
2895
|
-
|
|
2895
|
+
o("span", _s, [
|
|
2896
2896
|
s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
|
|
2897
|
-
|
|
2897
|
+
o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2898
2898
|
])])) : s.state === "rejected" ? (c(), d("svg", ps, [...t[1] || (t[1] = [
|
|
2899
|
-
|
|
2899
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2900
2900
|
])])) : s.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
|
|
2901
|
-
|
|
2901
|
+
o("circle", {
|
|
2902
2902
|
cx: "12",
|
|
2903
2903
|
cy: "12",
|
|
2904
2904
|
r: "10"
|
|
2905
2905
|
}, null, -1),
|
|
2906
|
-
|
|
2906
|
+
o("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2907
2907
|
])])) : (c(), d("svg", ys, [...t[3] || (t[3] = [
|
|
2908
|
-
|
|
2909
|
-
|
|
2908
|
+
o("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
|
|
2909
|
+
o("line", {
|
|
2910
2910
|
x1: "12",
|
|
2911
2911
|
y1: "9",
|
|
2912
2912
|
x2: "12",
|
|
2913
2913
|
y2: "13"
|
|
2914
2914
|
}, null, -1),
|
|
2915
|
-
|
|
2915
|
+
o("line", {
|
|
2916
2916
|
x1: "12",
|
|
2917
2917
|
y1: "17",
|
|
2918
2918
|
x2: "12.01",
|
|
@@ -2920,19 +2920,19 @@ function Cs(e, t, s, r, i, n) {
|
|
|
2920
2920
|
}, null, -1)
|
|
2921
2921
|
])]))
|
|
2922
2922
|
]),
|
|
2923
|
-
|
|
2924
|
-
|
|
2923
|
+
o("span", ws, [
|
|
2924
|
+
o("span", bs, v(s.label), 1),
|
|
2925
2925
|
n.detailText ? (c(), d(I, { key: 0 }, [
|
|
2926
|
-
t[4] || (t[4] =
|
|
2926
|
+
t[4] || (t[4] = o("span", {
|
|
2927
2927
|
class: "wm-result__sep",
|
|
2928
2928
|
"aria-hidden": "true"
|
|
2929
2929
|
}, " · ", -1)),
|
|
2930
|
-
|
|
2931
|
-
], 64)) :
|
|
2930
|
+
o("span", ks, v(n.detailText), 1)
|
|
2931
|
+
], 64)) : b("", !0)
|
|
2932
2932
|
])
|
|
2933
2933
|
], 2);
|
|
2934
2934
|
}
|
|
2935
|
-
const As = /* @__PURE__ */
|
|
2935
|
+
const As = /* @__PURE__ */ P(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
|
|
2936
2936
|
name: "WmArtifactFormResponse",
|
|
2937
2937
|
inject: {
|
|
2938
2938
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -2948,13 +2948,13 @@ const As = /* @__PURE__ */ N(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0
|
|
|
2948
2948
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2949
2949
|
}
|
|
2950
2950
|
}
|
|
2951
|
-
}, Ts = { class: "wm-art wm-art--formResponse" }, Ms = { class: "wm-art__head" }, xs = { class: "wm-art__title" },
|
|
2952
|
-
function Is(e, t, s,
|
|
2951
|
+
}, Ts = { class: "wm-art wm-art--formResponse" }, Ms = { 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" };
|
|
2952
|
+
function Is(e, t, s, i, a, n) {
|
|
2953
2953
|
return c(), d("div", Ts, [
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
t[0] || (t[0] =
|
|
2954
|
+
o("div", Ms, [
|
|
2955
|
+
o("div", xs, v(s.data.title || n.t("form.title")), 1),
|
|
2956
|
+
o("span", Os, [
|
|
2957
|
+
t[0] || (t[0] = o("svg", {
|
|
2958
2958
|
width: "11",
|
|
2959
2959
|
height: "11",
|
|
2960
2960
|
viewBox: "0 0 24 24",
|
|
@@ -2965,28 +2965,28 @@ function Is(e, t, s, r, i, n) {
|
|
|
2965
2965
|
"stroke-linejoin": "round",
|
|
2966
2966
|
"aria-hidden": "true"
|
|
2967
2967
|
}, [
|
|
2968
|
-
|
|
2968
|
+
o("polyline", { points: "20 6 9 17 4 12" })
|
|
2969
2969
|
], -1)),
|
|
2970
2970
|
Se(" " + v(n.t("form.sent")), 1)
|
|
2971
2971
|
])
|
|
2972
2972
|
]),
|
|
2973
|
-
|
|
2974
|
-
(c(!0), d(I, null, j(n.fields, (
|
|
2975
|
-
key:
|
|
2973
|
+
o("div", Rs, [
|
|
2974
|
+
(c(!0), d(I, null, j(n.fields, (r, l) => (c(), d("div", {
|
|
2975
|
+
key: l,
|
|
2976
2976
|
class: "wm-art__field"
|
|
2977
2977
|
}, [
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
class:
|
|
2978
|
+
o("div", Ls, v(r.label), 1),
|
|
2979
|
+
o("div", {
|
|
2980
|
+
class: R([
|
|
2981
2981
|
"wm-art__fieldValue",
|
|
2982
|
-
{ "wm-art__fieldValue--multi":
|
|
2982
|
+
{ "wm-art__fieldValue--multi": r.multiline }
|
|
2983
2983
|
])
|
|
2984
|
-
}, v(
|
|
2984
|
+
}, v(r.value), 3)
|
|
2985
2985
|
]))), 128))
|
|
2986
2986
|
])
|
|
2987
2987
|
]);
|
|
2988
2988
|
}
|
|
2989
|
-
const Es = /* @__PURE__ */
|
|
2989
|
+
const Es = /* @__PURE__ */ P(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1"]]), Bs = {
|
|
2990
2990
|
name: "WmArtifactInfoCard",
|
|
2991
2991
|
props: {
|
|
2992
2992
|
data: { type: Object, required: !0 }
|
|
@@ -3001,10 +3001,10 @@ const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
|
|
|
3001
3001
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
3002
3002
|
}
|
|
3003
3003
|
}
|
|
3004
|
-
}, Ps = { class: "wm-art wm-art--infoCard" },
|
|
3004
|
+
}, Ps = { class: "wm-art wm-art--infoCard" }, Ds = {
|
|
3005
3005
|
key: 0,
|
|
3006
3006
|
class: "wm-art__image"
|
|
3007
|
-
},
|
|
3007
|
+
}, Ns = ["src", "alt"], Us = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, Fs = { class: "wm-art__title" }, Hs = {
|
|
3008
3008
|
key: 0,
|
|
3009
3009
|
class: "wm-art__subtitle"
|
|
3010
3010
|
}, zs = {
|
|
@@ -3014,59 +3014,59 @@ const Es = /* @__PURE__ */ N(Ss, [["render", Is], ["__scopeId", "data-v-713aecf1
|
|
|
3014
3014
|
key: 0,
|
|
3015
3015
|
class: "wm-art__text"
|
|
3016
3016
|
}, Vs = { class: "wm-art__fieldLabel" };
|
|
3017
|
-
function Ks(e, t, s,
|
|
3017
|
+
function Ks(e, t, s, i, a, n) {
|
|
3018
3018
|
return c(), d("div", Ps, [
|
|
3019
|
-
s.data.image_url ? (c(), d("figure",
|
|
3020
|
-
|
|
3019
|
+
s.data.image_url ? (c(), d("figure", Ds, [
|
|
3020
|
+
o("img", {
|
|
3021
3021
|
src: s.data.image_url,
|
|
3022
3022
|
alt: s.data.title || "",
|
|
3023
3023
|
loading: "lazy"
|
|
3024
|
-
}, null, 8,
|
|
3025
|
-
])) :
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) :
|
|
3024
|
+
}, null, 8, Ns)
|
|
3025
|
+
])) : b("", !0),
|
|
3026
|
+
o("div", Us, [
|
|
3027
|
+
o("div", js, [
|
|
3028
|
+
o("div", Fs, v(s.data.title), 1),
|
|
3029
|
+
s.data.subtitle ? (c(), d("div", Hs, v(s.data.subtitle), 1)) : b("", !0)
|
|
3030
3030
|
]),
|
|
3031
3031
|
s.data.badge && s.data.badge.label ? (c(), d("span", {
|
|
3032
3032
|
key: 0,
|
|
3033
|
-
class:
|
|
3033
|
+
class: R([
|
|
3034
3034
|
"wm-art__badge",
|
|
3035
3035
|
`wm-art__badge--${s.data.badge.tone || "neutral"}`
|
|
3036
3036
|
])
|
|
3037
|
-
}, v(s.data.badge.label), 3)) :
|
|
3037
|
+
}, v(s.data.badge.label), 3)) : b("", !0)
|
|
3038
3038
|
]),
|
|
3039
3039
|
n.hasBody ? (c(), d("div", zs, [
|
|
3040
|
-
s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) :
|
|
3041
|
-
n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (
|
|
3042
|
-
key:
|
|
3040
|
+
s.data.body ? (c(), d("div", qs, v(s.data.body), 1)) : b("", !0),
|
|
3041
|
+
n.fields.length ? (c(!0), d(I, { key: 1 }, j(n.fields, (r, l) => (c(), d("div", {
|
|
3042
|
+
key: l,
|
|
3043
3043
|
class: "wm-art__field"
|
|
3044
3044
|
}, [
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
class:
|
|
3045
|
+
o("div", Vs, v(r.label), 1),
|
|
3046
|
+
o("div", {
|
|
3047
|
+
class: R([
|
|
3048
3048
|
"wm-art__fieldValue",
|
|
3049
|
-
{ "wm-art__fieldValue--multi":
|
|
3049
|
+
{ "wm-art__fieldValue--multi": r.multiline }
|
|
3050
3050
|
])
|
|
3051
|
-
}, v(
|
|
3052
|
-
]))), 128)) :
|
|
3053
|
-
])) :
|
|
3051
|
+
}, v(r.value), 3)
|
|
3052
|
+
]))), 128)) : b("", !0)
|
|
3053
|
+
])) : b("", !0)
|
|
3054
3054
|
]);
|
|
3055
3055
|
}
|
|
3056
|
-
const Ws = /* @__PURE__ */
|
|
3056
|
+
const Ws = /* @__PURE__ */ P(Bs, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
3057
3057
|
function $s(e, t, s) {
|
|
3058
3058
|
if (!e) return "";
|
|
3059
|
-
const
|
|
3060
|
-
if (Number.isNaN(
|
|
3061
|
-
const
|
|
3059
|
+
const i = new Date(e);
|
|
3060
|
+
if (Number.isNaN(i.getTime())) return e;
|
|
3061
|
+
const a = i.toLocaleDateString(t, {
|
|
3062
3062
|
day: "numeric",
|
|
3063
3063
|
month: "long",
|
|
3064
3064
|
year: "numeric"
|
|
3065
|
-
}), n =
|
|
3065
|
+
}), n = i.toLocaleTimeString(t, {
|
|
3066
3066
|
hour: "2-digit",
|
|
3067
3067
|
minute: "2-digit"
|
|
3068
3068
|
});
|
|
3069
|
-
return `${
|
|
3069
|
+
return `${a}${s}${n}`;
|
|
3070
3070
|
}
|
|
3071
3071
|
const Gs = {
|
|
3072
3072
|
name: "WmArtifactTicket",
|
|
@@ -3136,13 +3136,13 @@ const Gs = {
|
|
|
3136
3136
|
key: 1,
|
|
3137
3137
|
class: "wm-art__footer wm-tk__footer"
|
|
3138
3138
|
};
|
|
3139
|
-
function ar(e, t, s,
|
|
3139
|
+
function ar(e, t, s, i, a, n) {
|
|
3140
3140
|
return c(), d("div", Ys, [
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
t[0] || (t[0] =
|
|
3141
|
+
o("div", Js, [
|
|
3142
|
+
o("div", Xs, v(s.data.title), 1),
|
|
3143
|
+
o("div", Qs, [
|
|
3144
|
+
o("div", Zs, [
|
|
3145
|
+
t[0] || (t[0] = o("svg", {
|
|
3146
3146
|
width: "11",
|
|
3147
3147
|
height: "11",
|
|
3148
3148
|
viewBox: "0 0 24 24",
|
|
@@ -3153,85 +3153,85 @@ function ar(e, t, s, r, i, n) {
|
|
|
3153
3153
|
"stroke-linejoin": "round",
|
|
3154
3154
|
"aria-hidden": "true"
|
|
3155
3155
|
}, [
|
|
3156
|
-
|
|
3157
|
-
|
|
3156
|
+
o("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
|
|
3157
|
+
o("path", { d: "M13 5v2M13 17v2M13 11v2" })
|
|
3158
3158
|
], -1)),
|
|
3159
|
-
|
|
3159
|
+
o("span", null, v(s.data.reference), 1)
|
|
3160
3160
|
]),
|
|
3161
|
-
|
|
3162
|
-
class:
|
|
3161
|
+
o("span", {
|
|
3162
|
+
class: R([
|
|
3163
3163
|
"wm-art__badge",
|
|
3164
3164
|
"wm-tk__badge",
|
|
3165
3165
|
`wm-art__badge--${s.data.status.tone || "neutral"}`
|
|
3166
3166
|
])
|
|
3167
3167
|
}, [
|
|
3168
|
-
t[1] || (t[1] =
|
|
3168
|
+
t[1] || (t[1] = o("span", {
|
|
3169
3169
|
class: "wm-tk__dot",
|
|
3170
3170
|
"aria-hidden": "true"
|
|
3171
3171
|
}, null, -1)),
|
|
3172
3172
|
Se(" " + v(s.data.status.label), 1)
|
|
3173
3173
|
], 2)
|
|
3174
3174
|
]),
|
|
3175
|
-
s.data.body ? (c(), d("div", er, v(s.data.body), 1)) :
|
|
3175
|
+
s.data.body ? (c(), d("div", er, v(s.data.body), 1)) : b("", !0)
|
|
3176
3176
|
]),
|
|
3177
3177
|
n.fields.length ? (c(), d("div", tr, [
|
|
3178
|
-
(c(!0), d(I, null, j(n.fields, (
|
|
3179
|
-
key:
|
|
3178
|
+
(c(!0), d(I, null, j(n.fields, (r, l) => (c(), d("div", {
|
|
3179
|
+
key: l,
|
|
3180
3180
|
class: "wm-art__field"
|
|
3181
3181
|
}, [
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
class:
|
|
3182
|
+
o("div", nr, v(r.label), 1),
|
|
3183
|
+
o("div", {
|
|
3184
|
+
class: R([
|
|
3185
3185
|
"wm-art__fieldValue",
|
|
3186
|
-
{ "wm-art__fieldValue--multi":
|
|
3186
|
+
{ "wm-art__fieldValue--multi": r.multiline }
|
|
3187
3187
|
])
|
|
3188
3188
|
}, [
|
|
3189
|
-
n.isPriority(
|
|
3189
|
+
n.isPriority(r.label) ? (c(), d("svg", {
|
|
3190
3190
|
key: 0,
|
|
3191
3191
|
class: "wm-tk__prio",
|
|
3192
|
-
"data-level": n.priorityLevel(
|
|
3192
|
+
"data-level": n.priorityLevel(r.value),
|
|
3193
3193
|
width: "12",
|
|
3194
3194
|
height: "12",
|
|
3195
3195
|
viewBox: "0 0 12 12",
|
|
3196
3196
|
"aria-hidden": "true"
|
|
3197
3197
|
}, [...t[2] || (t[2] = [
|
|
3198
|
-
|
|
3198
|
+
o("rect", {
|
|
3199
3199
|
x: "1",
|
|
3200
3200
|
y: "8",
|
|
3201
3201
|
width: "2",
|
|
3202
3202
|
height: "3",
|
|
3203
3203
|
rx: "0.5"
|
|
3204
3204
|
}, null, -1),
|
|
3205
|
-
|
|
3205
|
+
o("rect", {
|
|
3206
3206
|
x: "5",
|
|
3207
3207
|
y: "5",
|
|
3208
3208
|
width: "2",
|
|
3209
3209
|
height: "6",
|
|
3210
3210
|
rx: "0.5"
|
|
3211
3211
|
}, null, -1),
|
|
3212
|
-
|
|
3212
|
+
o("rect", {
|
|
3213
3213
|
x: "9",
|
|
3214
3214
|
y: "2",
|
|
3215
3215
|
width: "2",
|
|
3216
3216
|
height: "9",
|
|
3217
3217
|
rx: "0.5"
|
|
3218
3218
|
}, null, -1)
|
|
3219
|
-
])], 8, sr)) : n.isDate(
|
|
3220
|
-
|
|
3219
|
+
])], 8, sr)) : n.isDate(r.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
|
|
3220
|
+
o("rect", {
|
|
3221
3221
|
x: "3",
|
|
3222
3222
|
y: "4",
|
|
3223
3223
|
width: "18",
|
|
3224
3224
|
height: "18",
|
|
3225
3225
|
rx: "2"
|
|
3226
3226
|
}, null, -1),
|
|
3227
|
-
|
|
3228
|
-
])])) :
|
|
3229
|
-
|
|
3227
|
+
o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
3228
|
+
])])) : b("", !0),
|
|
3229
|
+
o("span", null, v(r.value), 1)
|
|
3230
3230
|
], 2)
|
|
3231
3231
|
]))), 128))
|
|
3232
|
-
])) :
|
|
3232
|
+
])) : b("", !0),
|
|
3233
3233
|
s.data.created_at ? (c(), d("div", ir, [
|
|
3234
|
-
t[4] || (t[4] =
|
|
3234
|
+
t[4] || (t[4] = o("svg", {
|
|
3235
3235
|
width: "11",
|
|
3236
3236
|
height: "11",
|
|
3237
3237
|
viewBox: "0 0 24 24",
|
|
@@ -3242,20 +3242,20 @@ function ar(e, t, s, r, i, n) {
|
|
|
3242
3242
|
"stroke-linejoin": "round",
|
|
3243
3243
|
"aria-hidden": "true"
|
|
3244
3244
|
}, [
|
|
3245
|
-
|
|
3245
|
+
o("rect", {
|
|
3246
3246
|
x: "3",
|
|
3247
3247
|
y: "4",
|
|
3248
3248
|
width: "18",
|
|
3249
3249
|
height: "18",
|
|
3250
3250
|
rx: "2"
|
|
3251
3251
|
}),
|
|
3252
|
-
|
|
3252
|
+
o("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
3253
3253
|
], -1)),
|
|
3254
|
-
|
|
3255
|
-
])) :
|
|
3254
|
+
o("span", null, v(n.formattedDate), 1)
|
|
3255
|
+
])) : b("", !0)
|
|
3256
3256
|
]);
|
|
3257
3257
|
}
|
|
3258
|
-
const or = /* @__PURE__ */
|
|
3258
|
+
const or = /* @__PURE__ */ P(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
|
|
3259
3259
|
form_response: Es,
|
|
3260
3260
|
info_card: Ws,
|
|
3261
3261
|
ticket: or
|
|
@@ -3274,13 +3274,13 @@ const or = /* @__PURE__ */ N(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914
|
|
|
3274
3274
|
}
|
|
3275
3275
|
}
|
|
3276
3276
|
};
|
|
3277
|
-
function dr(e, t, s,
|
|
3278
|
-
return n.component ? (c(),
|
|
3277
|
+
function dr(e, t, s, i, a, n) {
|
|
3278
|
+
return n.component ? (c(), D(Ae(n.component), {
|
|
3279
3279
|
key: 0,
|
|
3280
3280
|
data: s.artifact.data
|
|
3281
|
-
}, null, 8, ["data"])) :
|
|
3281
|
+
}, null, 8, ["data"])) : b("", !0);
|
|
3282
3282
|
}
|
|
3283
|
-
const ur = /* @__PURE__ */
|
|
3283
|
+
const ur = /* @__PURE__ */ P(cr, [["render", dr]]), hr = {
|
|
3284
3284
|
name: "WmAttachmentPreview",
|
|
3285
3285
|
inject: {
|
|
3286
3286
|
signAttachmentFn: { default: null },
|
|
@@ -3296,10 +3296,10 @@ const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
|
|
|
3296
3296
|
},
|
|
3297
3297
|
computed: {
|
|
3298
3298
|
kind() {
|
|
3299
|
-
var s,
|
|
3299
|
+
var s, i;
|
|
3300
3300
|
const e = (s = this.attachment) == null ? void 0 : s.type;
|
|
3301
3301
|
if (e) return e;
|
|
3302
|
-
const t = (((
|
|
3302
|
+
const t = (((i = this.attachment) == null ? void 0 : i.mime_type) || "").toLowerCase();
|
|
3303
3303
|
return t.startsWith("image/") ? "image" : t.startsWith("audio/") ? "audio" : t.startsWith("video/") ? "video" : "file";
|
|
3304
3304
|
},
|
|
3305
3305
|
displayName() {
|
|
@@ -3356,30 +3356,30 @@ const ur = /* @__PURE__ */ N(cr, [["render", dr]]), hr = {
|
|
|
3356
3356
|
class: "wm-att__spin",
|
|
3357
3357
|
"aria-hidden": "true"
|
|
3358
3358
|
};
|
|
3359
|
-
function kr(e, t, s,
|
|
3359
|
+
function kr(e, t, s, i, a, n) {
|
|
3360
3360
|
return c(), d("div", {
|
|
3361
|
-
class:
|
|
3361
|
+
class: R(["wm-att", ["wm-att--" + (n.kind || "file")]])
|
|
3362
3362
|
}, [
|
|
3363
|
-
n.kind === "image" &&
|
|
3363
|
+
n.kind === "image" && a.url ? (c(), d("a", {
|
|
3364
3364
|
key: 0,
|
|
3365
3365
|
href: n.safeHref,
|
|
3366
3366
|
target: "_blank",
|
|
3367
3367
|
rel: "noopener",
|
|
3368
3368
|
class: "wm-att__imgWrap"
|
|
3369
3369
|
}, [
|
|
3370
|
-
|
|
3371
|
-
src:
|
|
3370
|
+
o("img", {
|
|
3371
|
+
src: a.url,
|
|
3372
3372
|
alt: n.displayName,
|
|
3373
3373
|
loading: "lazy"
|
|
3374
3374
|
}, null, 8, fr)
|
|
3375
|
-
], 8, mr)) : n.kind === "audio" &&
|
|
3375
|
+
], 8, mr)) : n.kind === "audio" && a.url ? (c(), d("audio", {
|
|
3376
3376
|
key: 1,
|
|
3377
|
-
src:
|
|
3377
|
+
src: a.url,
|
|
3378
3378
|
controls: "",
|
|
3379
3379
|
preload: "metadata"
|
|
3380
|
-
}, null, 8, _r)) : n.kind === "video" &&
|
|
3380
|
+
}, null, 8, _r)) : n.kind === "video" && a.url ? (c(), d("video", {
|
|
3381
3381
|
key: 2,
|
|
3382
|
-
src:
|
|
3382
|
+
src: a.url,
|
|
3383
3383
|
controls: "",
|
|
3384
3384
|
playsinline: "",
|
|
3385
3385
|
preload: "auto"
|
|
@@ -3390,10 +3390,10 @@ function kr(e, t, s, r, i, n) {
|
|
|
3390
3390
|
download: n.displayName,
|
|
3391
3391
|
target: "_blank",
|
|
3392
3392
|
rel: "noopener",
|
|
3393
|
-
onClick: t[0] || (t[0] = (...
|
|
3393
|
+
onClick: t[0] || (t[0] = (...r) => n.onFileClick && n.onFileClick(...r))
|
|
3394
3394
|
}, [
|
|
3395
|
-
t[1] || (t[1] =
|
|
3396
|
-
|
|
3395
|
+
t[1] || (t[1] = o("span", { class: "wm-att__icon" }, [
|
|
3396
|
+
o("svg", {
|
|
3397
3397
|
width: "14",
|
|
3398
3398
|
height: "14",
|
|
3399
3399
|
viewBox: "0 0 24 24",
|
|
@@ -3404,19 +3404,19 @@ function kr(e, t, s, r, i, n) {
|
|
|
3404
3404
|
"stroke-linejoin": "round",
|
|
3405
3405
|
"aria-hidden": "true"
|
|
3406
3406
|
}, [
|
|
3407
|
-
|
|
3408
|
-
|
|
3407
|
+
o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
|
|
3408
|
+
o("path", { d: "M14 2v6h6" })
|
|
3409
3409
|
])
|
|
3410
3410
|
], -1)),
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) :
|
|
3411
|
+
o("span", vr, [
|
|
3412
|
+
o("span", yr, v(n.displayName), 1),
|
|
3413
|
+
n.sizeLabel ? (c(), d("span", wr, v(n.sizeLabel), 1)) : b("", !0)
|
|
3414
3414
|
]),
|
|
3415
|
-
|
|
3415
|
+
a.loading ? (c(), d("span", br)) : b("", !0)
|
|
3416
3416
|
], 8, pr))
|
|
3417
3417
|
], 2);
|
|
3418
3418
|
}
|
|
3419
|
-
const Cr = /* @__PURE__ */
|
|
3419
|
+
const Cr = /* @__PURE__ */ P(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
|
|
3420
3420
|
name: "WmBubble",
|
|
3421
3421
|
props: {
|
|
3422
3422
|
role: { type: String, default: "ai" },
|
|
@@ -3429,24 +3429,24 @@ const Cr = /* @__PURE__ */ N(hr, [["render", kr], ["__scopeId", "data-v-b207a8bd
|
|
|
3429
3429
|
}
|
|
3430
3430
|
}
|
|
3431
3431
|
}, Sr = ["innerHTML"];
|
|
3432
|
-
function Tr(e, t, s,
|
|
3432
|
+
function Tr(e, t, s, i, a, n) {
|
|
3433
3433
|
return c(), d("div", {
|
|
3434
|
-
class:
|
|
3434
|
+
class: R(["wm-bubble", "wm-bubble--" + s.role])
|
|
3435
3435
|
}, [
|
|
3436
3436
|
We(e.$slots, "default", {}, () => [
|
|
3437
|
-
|
|
3437
|
+
o("span", { innerHTML: n.rendered }, null, 8, Sr)
|
|
3438
3438
|
], !0)
|
|
3439
3439
|
], 2);
|
|
3440
3440
|
}
|
|
3441
|
-
const Mr = /* @__PURE__ */
|
|
3442
|
-
function
|
|
3443
|
-
return c(), d("div",
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3441
|
+
const Mr = /* @__PURE__ */ P(Ar, [["render", Tr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
|
|
3442
|
+
function Rr(e, t, s, i, a, n) {
|
|
3443
|
+
return c(), d("div", Or, [...t[0] || (t[0] = [
|
|
3444
|
+
o("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3445
|
+
o("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3446
|
+
o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3447
3447
|
])]);
|
|
3448
3448
|
}
|
|
3449
|
-
const Lr = /* @__PURE__ */
|
|
3449
|
+
const Lr = /* @__PURE__ */ P(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
|
|
3450
3450
|
function ee(e) {
|
|
3451
3451
|
return e ? e.client_msg_id || e.id : "";
|
|
3452
3452
|
}
|
|
@@ -3536,62 +3536,61 @@ const Ir = {
|
|
|
3536
3536
|
return !this.hasMore && !this.loadingMore && this.messages.length >= 20;
|
|
3537
3537
|
},
|
|
3538
3538
|
groups() {
|
|
3539
|
-
var s,
|
|
3539
|
+
var s, i, a, n;
|
|
3540
3540
|
const e = [];
|
|
3541
|
-
for (const
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
key: `g-${ee(o)}`,
|
|
3541
|
+
for (const r of this.messages) {
|
|
3542
|
+
const l = this.roleOf(r);
|
|
3543
|
+
if (l === "system") {
|
|
3544
|
+
if (((s = r == null ? void 0 : r.payload) == null ? void 0 : s.event) === "action_admin_pending") {
|
|
3545
|
+
const y = e[e.length - 1];
|
|
3546
|
+
y && y.role === "ai" ? y.messages.push(r) : e.push({
|
|
3547
|
+
key: `g-${ee(r)}`,
|
|
3549
3548
|
role: "ai",
|
|
3550
3549
|
agentName: "",
|
|
3551
3550
|
agentAvatarUrl: null,
|
|
3552
|
-
messages: [
|
|
3551
|
+
messages: [r],
|
|
3553
3552
|
items: []
|
|
3554
3553
|
});
|
|
3555
3554
|
continue;
|
|
3556
3555
|
}
|
|
3557
3556
|
e.push({
|
|
3558
|
-
key: `sys-${ee(
|
|
3559
|
-
role:
|
|
3560
|
-
messages: [
|
|
3557
|
+
key: `sys-${ee(r)}`,
|
|
3558
|
+
role: l,
|
|
3559
|
+
messages: [r],
|
|
3561
3560
|
items: [],
|
|
3562
|
-
systemLabel: this.systemLabel(
|
|
3561
|
+
systemLabel: this.systemLabel(r)
|
|
3563
3562
|
});
|
|
3564
3563
|
continue;
|
|
3565
3564
|
}
|
|
3566
|
-
const
|
|
3567
|
-
|
|
3568
|
-
key: `g-${ee(
|
|
3569
|
-
role:
|
|
3570
|
-
agentName: ((
|
|
3571
|
-
agentAvatarUrl: ((
|
|
3572
|
-
messages: [
|
|
3565
|
+
const f = e[e.length - 1];
|
|
3566
|
+
f && f.role === l && (l === "ai" || f.agentName === (((i = r == null ? void 0 : r.author) == null ? void 0 : i.name) || "")) ? f.messages.push(r) : e.push({
|
|
3567
|
+
key: `g-${ee(r)}`,
|
|
3568
|
+
role: l,
|
|
3569
|
+
agentName: ((a = r == null ? void 0 : r.author) == null ? void 0 : a.name) || "",
|
|
3570
|
+
agentAvatarUrl: ((n = r == null ? void 0 : r.author) == null ? void 0 : n.avatar_url) || null,
|
|
3571
|
+
messages: [r],
|
|
3573
3572
|
items: []
|
|
3574
3573
|
});
|
|
3575
3574
|
}
|
|
3576
|
-
for (const
|
|
3577
|
-
if (
|
|
3578
|
-
const
|
|
3579
|
-
for (const
|
|
3580
|
-
for (const
|
|
3581
|
-
|
|
3575
|
+
for (const r of e) {
|
|
3576
|
+
if (r.role === "system") continue;
|
|
3577
|
+
const l = [];
|
|
3578
|
+
for (const f of r.messages)
|
|
3579
|
+
for (const k of this.itemsOf(f)) l.push(k);
|
|
3580
|
+
r.items = l;
|
|
3582
3581
|
}
|
|
3583
3582
|
const t = [];
|
|
3584
|
-
for (const
|
|
3585
|
-
if (
|
|
3586
|
-
const
|
|
3587
|
-
if (
|
|
3588
|
-
|
|
3583
|
+
for (const r of e) {
|
|
3584
|
+
if (r.role !== "system" && !r.items.length) continue;
|
|
3585
|
+
const l = t[t.length - 1];
|
|
3586
|
+
if (l && l.role !== "system" && l.role === r.role && (r.role === "ai" || l.agentName === r.agentName)) {
|
|
3587
|
+
l.messages.push(...r.messages), l.items.push(...r.items);
|
|
3589
3588
|
continue;
|
|
3590
3589
|
}
|
|
3591
|
-
t.push(
|
|
3590
|
+
t.push(r);
|
|
3592
3591
|
}
|
|
3593
|
-
for (const
|
|
3594
|
-
|
|
3592
|
+
for (const r of t)
|
|
3593
|
+
r.role !== "system" && (r.key = this.stableGroupKey(r.messages));
|
|
3595
3594
|
return t;
|
|
3596
3595
|
},
|
|
3597
3596
|
// Key of the first non-user group that starts after the unread
|
|
@@ -3602,10 +3601,10 @@ const Ir = {
|
|
|
3602
3601
|
const e = this.unreadAnchorId, t = this.unreadBoundaryTs;
|
|
3603
3602
|
for (const s of this.groups) {
|
|
3604
3603
|
if (s.role === "user" || s.role === "system" || !s.items.length) continue;
|
|
3605
|
-
const
|
|
3606
|
-
if (!
|
|
3607
|
-
const
|
|
3608
|
-
if (
|
|
3604
|
+
const i = s.messages[0];
|
|
3605
|
+
if (!i) continue;
|
|
3606
|
+
const a = Y(i.id);
|
|
3607
|
+
if (a != null && !(a <= e) && !(t && i.created_at && i.created_at > t))
|
|
3609
3608
|
return s.key;
|
|
3610
3609
|
}
|
|
3611
3610
|
return null;
|
|
@@ -3643,17 +3642,17 @@ const Ir = {
|
|
|
3643
3642
|
this._groupIdByMsgKey || (this._groupIdByMsgKey = /* @__PURE__ */ new Map(), this._groupIdCounter = 0);
|
|
3644
3643
|
const t = this._groupIdByMsgKey;
|
|
3645
3644
|
let s = null;
|
|
3646
|
-
for (const
|
|
3647
|
-
const
|
|
3648
|
-
if (
|
|
3649
|
-
s = t.get(
|
|
3645
|
+
for (const i of e) {
|
|
3646
|
+
const a = ee(i);
|
|
3647
|
+
if (a && t.has(a)) {
|
|
3648
|
+
s = t.get(a);
|
|
3650
3649
|
break;
|
|
3651
3650
|
}
|
|
3652
3651
|
}
|
|
3653
3652
|
s == null && (s = ++this._groupIdCounter);
|
|
3654
|
-
for (const
|
|
3655
|
-
const
|
|
3656
|
-
|
|
3653
|
+
for (const i of e) {
|
|
3654
|
+
const a = ee(i);
|
|
3655
|
+
a && t.set(a, s);
|
|
3657
3656
|
}
|
|
3658
3657
|
return `g-${s}`;
|
|
3659
3658
|
},
|
|
@@ -3691,32 +3690,32 @@ const Ir = {
|
|
|
3691
3690
|
const t = this._lastSeenConvId !== this.conversationId;
|
|
3692
3691
|
this._lastSeenConvId = this.conversationId;
|
|
3693
3692
|
const s = this.isAtBottom(e);
|
|
3694
|
-
let
|
|
3693
|
+
let i = null;
|
|
3695
3694
|
if (!t && !s) {
|
|
3696
3695
|
const n = this.pickAnchor(e);
|
|
3697
3696
|
if (n != null && n.rowKey) {
|
|
3698
|
-
const
|
|
3699
|
-
if (
|
|
3700
|
-
const
|
|
3701
|
-
|
|
3697
|
+
const r = this.findRowByKey(e, n.rowKey);
|
|
3698
|
+
if (r) {
|
|
3699
|
+
const l = e.getBoundingClientRect().top;
|
|
3700
|
+
i = {
|
|
3702
3701
|
rowKey: n.rowKey,
|
|
3703
|
-
relY:
|
|
3702
|
+
relY: r.getBoundingClientRect().top - l
|
|
3704
3703
|
};
|
|
3705
3704
|
}
|
|
3706
3705
|
}
|
|
3707
3706
|
}
|
|
3708
|
-
const
|
|
3709
|
-
this._scrollSnap =
|
|
3710
|
-
if (this._scrollSnap = null,
|
|
3707
|
+
const a = { forceBottom: t, wasPinned: s, anchor: i };
|
|
3708
|
+
this._scrollSnap = a, this.$nextTick(() => {
|
|
3709
|
+
if (this._scrollSnap = null, a.forceBottom || a.wasPinned) {
|
|
3711
3710
|
e.scrollTop = e.scrollHeight;
|
|
3712
3711
|
return;
|
|
3713
3712
|
}
|
|
3714
|
-
if (!
|
|
3713
|
+
if (!a.anchor) return;
|
|
3715
3714
|
const n = () => {
|
|
3716
|
-
const
|
|
3717
|
-
if (!
|
|
3718
|
-
const
|
|
3719
|
-
Math.abs(
|
|
3715
|
+
const r = a.anchor, l = this.findRowByKey(e, r.rowKey);
|
|
3716
|
+
if (!l) return;
|
|
3717
|
+
const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - r.relY;
|
|
3718
|
+
Math.abs(k) > 0.5 && (e.scrollTop += k);
|
|
3720
3719
|
};
|
|
3721
3720
|
n(), requestAnimationFrame(() => {
|
|
3722
3721
|
n(), requestAnimationFrame(n);
|
|
@@ -3747,11 +3746,11 @@ const Ir = {
|
|
|
3747
3746
|
// very-top-of-scroll edge case the same way the old logic did.
|
|
3748
3747
|
pickAnchor(e) {
|
|
3749
3748
|
const t = e.getBoundingClientRect().top, s = e.querySelectorAll(".wm-list__row[data-row-key]");
|
|
3750
|
-
let
|
|
3751
|
-
for (const
|
|
3752
|
-
if (
|
|
3753
|
-
return { rowKey:
|
|
3754
|
-
return
|
|
3749
|
+
let i = null;
|
|
3750
|
+
for (const a of s)
|
|
3751
|
+
if (i || (i = a), a.getBoundingClientRect().bottom >= t)
|
|
3752
|
+
return { rowKey: a.dataset.rowKey };
|
|
3753
|
+
return i ? { rowKey: i.dataset.rowKey } : null;
|
|
3755
3754
|
},
|
|
3756
3755
|
findRowByKey(e, t) {
|
|
3757
3756
|
if (!t) return null;
|
|
@@ -3761,10 +3760,10 @@ const Ir = {
|
|
|
3761
3760
|
);
|
|
3762
3761
|
},
|
|
3763
3762
|
roleOf(e) {
|
|
3764
|
-
var s,
|
|
3763
|
+
var s, i;
|
|
3765
3764
|
if ((e == null ? void 0 : e.type) === "system" || ((s = e == null ? void 0 : e.payload) == null ? void 0 : s.type) === "system")
|
|
3766
3765
|
return "system";
|
|
3767
|
-
const t = (
|
|
3766
|
+
const t = (i = e == null ? void 0 : e.author) == null ? void 0 : i.type;
|
|
3768
3767
|
return t === "user" ? "user" : t === "agent_human" ? "human" : "ai";
|
|
3769
3768
|
},
|
|
3770
3769
|
roleLabel(e) {
|
|
@@ -3863,9 +3862,9 @@ const Ir = {
|
|
|
3863
3862
|
// doit garder son arrondi.
|
|
3864
3863
|
cornersFor(e, t) {
|
|
3865
3864
|
var Q, se, re;
|
|
3866
|
-
const s = e.items,
|
|
3867
|
-
let
|
|
3868
|
-
return
|
|
3865
|
+
const s = e.items, i = (Q = s[t]) == null ? void 0 : Q.kind, a = (se = s[t - 1]) == null ? void 0 : se.kind, n = (re = s[t + 1]) == null ? void 0 : re.kind, r = e.role === "user", l = 14, f = 4, k = a == null ? void 0 : a.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";
|
|
3866
|
+
let N = l, U = l, L = l, W = l;
|
|
3867
|
+
return r ? (k && (U = f), (y || !n) && (L = f), k && T(E, k, i == null ? void 0 : i.top) && (N = f), y && T(A, y, i == null ? void 0 : i.bottom) && (W = f)) : (k && (N = f), (y || !n) && (W = f), k && T(E, k, i == null ? void 0 : i.top) && (U = f), y && T(A, y, i == null ? void 0 : i.bottom) && (L = f)), { tl: N, tr: U, br: L, bl: W };
|
|
3869
3868
|
},
|
|
3870
3869
|
// Inline column-count for the mosaic grid, capped at 4. Single
|
|
3871
3870
|
// attachment falls back to the vertical-list layout (null). Two
|
|
@@ -3888,8 +3887,8 @@ const Ir = {
|
|
|
3888
3887
|
// corners of every top-row cell flatten too.
|
|
3889
3888
|
mosaicCornerStyle(e, t, s) {
|
|
3890
3889
|
if (!t || t < 2) return null;
|
|
3891
|
-
const
|
|
3892
|
-
return (
|
|
3890
|
+
const i = Math.min(t, 4), a = Math.floor(e / i), n = e % i, r = n > 0, l = n < i - 1 && e + 1 < t, f = a > 0, k = e + i < t, y = "4px", M = {};
|
|
3891
|
+
return (r || f) && (M["--wm-r-tl"] = y), (l || f) && (M["--wm-r-tr"] = y), (r || k) && (M["--wm-r-bl"] = y), (l || k) && (M["--wm-r-br"] = y), s && (M["--wm-r-tl"] = y, M["--wm-r-tr"] = y), Object.keys(M).length ? M : null;
|
|
3893
3892
|
},
|
|
3894
3893
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3895
3894
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3908,8 +3907,8 @@ const Ir = {
|
|
|
3908
3907
|
// Clé unique par item de cluster, alignée avec `:key` /
|
|
3909
3908
|
// `data-row-key` du template. Sert d'index dans `widthByKey`.
|
|
3910
3909
|
rowKeyOf(e, t) {
|
|
3911
|
-
var
|
|
3912
|
-
const s = (
|
|
3910
|
+
var i;
|
|
3911
|
+
const s = (i = e == null ? void 0 : e.items) == null ? void 0 : i[t];
|
|
3913
3912
|
return s ? `${ee(s.message)}-${s.partKey}` : "";
|
|
3914
3913
|
},
|
|
3915
3914
|
// rAF-debouncé : `updated()` peut être appelé en rafale (stream,
|
|
@@ -3930,20 +3929,20 @@ const Ir = {
|
|
|
3930
3929
|
for (const n of e.querySelectorAll(
|
|
3931
3930
|
".wm-list__row[data-row-key]"
|
|
3932
3931
|
)) {
|
|
3933
|
-
const
|
|
3934
|
-
if (!
|
|
3935
|
-
const
|
|
3932
|
+
const r = n.dataset.rowKey;
|
|
3933
|
+
if (!r) continue;
|
|
3934
|
+
const l = n.querySelector(
|
|
3936
3935
|
".wm-bubble, .wm-result, .wm-art, .wm-list__body"
|
|
3937
3936
|
);
|
|
3938
|
-
if (!
|
|
3939
|
-
const f =
|
|
3940
|
-
f > 0 && (t[
|
|
3937
|
+
if (!l) continue;
|
|
3938
|
+
const f = l.getBoundingClientRect().width;
|
|
3939
|
+
f > 0 && (t[r] = f);
|
|
3941
3940
|
}
|
|
3942
|
-
const s = this.widthByKey,
|
|
3943
|
-
if (
|
|
3941
|
+
const s = this.widthByKey, i = Object.keys(s), a = Object.keys(t);
|
|
3942
|
+
if (i.length === a.length) {
|
|
3944
3943
|
let n = !0;
|
|
3945
|
-
for (const
|
|
3946
|
-
if (Math.abs((s[
|
|
3944
|
+
for (const r of a)
|
|
3945
|
+
if (Math.abs((s[r] ?? 0) - t[r]) > 0.5) {
|
|
3947
3946
|
n = !1;
|
|
3948
3947
|
break;
|
|
3949
3948
|
}
|
|
@@ -4013,27 +4012,27 @@ const Ir = {
|
|
|
4013
4012
|
return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
|
|
4014
4013
|
},
|
|
4015
4014
|
actionDetail(e) {
|
|
4016
|
-
var s,
|
|
4015
|
+
var s, i, a, n, r, l, f, k;
|
|
4017
4016
|
const t = e == null ? void 0 : e.payload;
|
|
4018
4017
|
if (!t) return "";
|
|
4019
4018
|
if (t.state === "success")
|
|
4020
|
-
return ((s = t.success) == null ? void 0 : s.summary) || ((
|
|
4019
|
+
return ((s = t.success) == null ? void 0 : s.summary) || ((a = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : a.description) || "";
|
|
4021
4020
|
if (t.state === "rejected") {
|
|
4022
4021
|
if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
|
|
4023
|
-
const y = (
|
|
4024
|
-
return this.t(
|
|
4022
|
+
const y = (l = (r = t.rejected) == null ? void 0 : r.metadata) == null ? void 0 : l.resolution, M = typeof y == "string" && y.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
|
|
4023
|
+
return this.t(M);
|
|
4025
4024
|
}
|
|
4026
|
-
return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((
|
|
4025
|
+
return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((k = t.failure) == null ? void 0 : k.error)) || "";
|
|
4027
4026
|
},
|
|
4028
4027
|
actionArtifact(e) {
|
|
4029
|
-
var s,
|
|
4030
|
-
const t = (
|
|
4028
|
+
var s, i;
|
|
4029
|
+
const t = (i = (s = e == null ? void 0 : e.payload) == null ? void 0 : s.success) == null ? void 0 : i.artifact;
|
|
4031
4030
|
return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
|
|
4032
4031
|
},
|
|
4033
4032
|
systemLabel(e) {
|
|
4034
|
-
var
|
|
4035
|
-
const t = (
|
|
4036
|
-
return s ? this.t(s, { name:
|
|
4033
|
+
var a, n, r;
|
|
4034
|
+
const t = (a = e == null ? void 0 : e.payload) == null ? void 0 : a.event, s = Ir[t], i = ((n = e == null ? void 0 : e.metadata) == null ? void 0 : n.agent_name) || ((r = e == null ? void 0 : e.author) == null ? void 0 : r.name) || this.t("messageList.anAgent");
|
|
4035
|
+
return s ? this.t(s, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
4037
4036
|
},
|
|
4038
4037
|
scrollToBottom() {
|
|
4039
4038
|
const e = this.$refs.scrollEl;
|
|
@@ -4047,12 +4046,12 @@ const Ir = {
|
|
|
4047
4046
|
e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
|
|
4048
4047
|
}
|
|
4049
4048
|
}
|
|
4050
|
-
},
|
|
4049
|
+
}, Dr = { class: "wm-list__wrap" }, Nr = {
|
|
4051
4050
|
key: 0,
|
|
4052
4051
|
class: "wm-list__loadMore",
|
|
4053
4052
|
role: "status",
|
|
4054
4053
|
"aria-live": "polite"
|
|
4055
|
-
},
|
|
4054
|
+
}, Ur = { class: "wm-list__loadMore-lbl" }, jr = {
|
|
4056
4055
|
key: 1,
|
|
4057
4056
|
class: "wm-list__historyEnd"
|
|
4058
4057
|
}, Fr = {
|
|
@@ -4077,158 +4076,158 @@ const Ir = {
|
|
|
4077
4076
|
key: 3,
|
|
4078
4077
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
4079
4078
|
}, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
|
|
4080
|
-
function si(e, t, s,
|
|
4081
|
-
const
|
|
4082
|
-
return c(), d("div",
|
|
4083
|
-
|
|
4079
|
+
function si(e, t, s, i, a, n) {
|
|
4080
|
+
const r = B("AIAvatar"), l = B("HumanAvatar"), f = B("ActionResult"), k = B("ArtifactRenderer"), y = B("Bubble"), M = B("AttachmentPreview"), E = B("Typing");
|
|
4081
|
+
return c(), d("div", Dr, [
|
|
4082
|
+
o("div", {
|
|
4084
4083
|
ref: "scrollEl",
|
|
4085
|
-
class:
|
|
4084
|
+
class: R(["wm-list", { "wm-list--silent": a.silentFades }]),
|
|
4086
4085
|
onScrollPassive: t[4] || (t[4] = (...A) => n.onScroll && n.onScroll(...A))
|
|
4087
4086
|
}, [
|
|
4088
|
-
s.loadingMore ? (c(), d("div",
|
|
4089
|
-
t[6] || (t[6] =
|
|
4087
|
+
s.loadingMore ? (c(), d("div", Nr, [
|
|
4088
|
+
t[6] || (t[6] = o("span", {
|
|
4090
4089
|
class: "wm-list__loadMore-spinner",
|
|
4091
4090
|
"aria-hidden": "true"
|
|
4092
4091
|
}, null, -1)),
|
|
4093
|
-
|
|
4094
|
-
])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) :
|
|
4092
|
+
o("span", Ur, v(n.t("messageList.loadingHistory")), 1)
|
|
4093
|
+
])) : n.historyExhausted ? (c(), d("div", jr, v(n.t("messageList.conversationStart")), 1)) : b("", !0),
|
|
4095
4094
|
s.dateLabel ? (c(), d("div", Fr, [
|
|
4096
|
-
t[7] || (t[7] =
|
|
4097
|
-
|
|
4098
|
-
t[8] || (t[8] =
|
|
4099
|
-
])) :
|
|
4095
|
+
t[7] || (t[7] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
4096
|
+
o("span", Hr, v(s.dateLabel), 1),
|
|
4097
|
+
t[8] || (t[8] = o("div", { class: "wm-list__line" }, null, -1))
|
|
4098
|
+
])) : b("", !0),
|
|
4100
4099
|
(c(!0), d(I, null, j(n.groups, (A, q) => (c(), d(I, {
|
|
4101
4100
|
key: A.key
|
|
4102
4101
|
}, [
|
|
4103
4102
|
A.key === n.unreadGroupKey ? (c(), d("div", zr, [
|
|
4104
|
-
t[9] || (t[9] =
|
|
4105
|
-
|
|
4106
|
-
t[10] || (t[10] =
|
|
4107
|
-
])) :
|
|
4103
|
+
t[9] || (t[9] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
4104
|
+
o("span", qr, v(n.t("messageList.unread")), 1),
|
|
4105
|
+
t[10] || (t[10] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
4106
|
+
])) : b("", !0),
|
|
4108
4107
|
A.role === "system" || A.items.length ? (c(), d("div", {
|
|
4109
4108
|
key: 1,
|
|
4110
|
-
class:
|
|
4109
|
+
class: R(["wm-list__group", "wm-list__group--" + A.role])
|
|
4111
4110
|
}, [
|
|
4112
4111
|
A.role === "system" ? (c(), d("div", Vr, [
|
|
4113
|
-
t[11] || (t[11] =
|
|
4114
|
-
|
|
4115
|
-
t[12] || (t[12] =
|
|
4112
|
+
t[11] || (t[11] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
4113
|
+
o("span", Kr, v(A.systemLabel), 1),
|
|
4114
|
+
t[12] || (t[12] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
4116
4115
|
])) : (c(), d(I, { key: 1 }, [
|
|
4117
|
-
(c(!0), d(I, null, j(A.items, (
|
|
4118
|
-
key: `${n.messageKey(
|
|
4116
|
+
(c(!0), d(I, null, j(A.items, (T, N) => (c(), d(I, {
|
|
4117
|
+
key: `${n.messageKey(T.message)}-${T.partKey}`
|
|
4119
4118
|
}, [
|
|
4120
|
-
|
|
4121
|
-
"data-row-key": `${n.messageKey(
|
|
4122
|
-
class:
|
|
4119
|
+
o("div", {
|
|
4120
|
+
"data-row-key": `${n.messageKey(T.message)}-${T.partKey}`,
|
|
4121
|
+
class: R(["wm-list__row fade-up", [
|
|
4123
4122
|
"wm-list__row--" + A.role,
|
|
4124
4123
|
{
|
|
4125
|
-
"is-pending":
|
|
4126
|
-
"is-failed":
|
|
4124
|
+
"is-pending": T.message._pending,
|
|
4125
|
+
"is-failed": T.message._failed
|
|
4127
4126
|
}
|
|
4128
4127
|
]]),
|
|
4129
|
-
style: z(n.cornersStyle(A,
|
|
4130
|
-
onPointerdown: (
|
|
4131
|
-
onPointerup: t[0] || (t[0] = (
|
|
4132
|
-
onPointercancel: t[1] || (t[1] = (
|
|
4133
|
-
onPointerleave: t[2] || (t[2] = (
|
|
4128
|
+
style: z(n.cornersStyle(A, N)),
|
|
4129
|
+
onPointerdown: (U) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
|
|
4130
|
+
onPointerup: t[0] || (t[0] = (U) => n.onPressEnd()),
|
|
4131
|
+
onPointercancel: t[1] || (t[1] = (U) => n.onPressEnd()),
|
|
4132
|
+
onPointerleave: t[2] || (t[2] = (U) => n.onPressEnd()),
|
|
4134
4133
|
onContextmenu: t[3] || (t[3] = J(() => {
|
|
4135
4134
|
}, ["prevent"]))
|
|
4136
4135
|
}, [
|
|
4137
4136
|
A.role !== "user" ? (c(), d("div", $r, [
|
|
4138
|
-
|
|
4139
|
-
A.role === "ai" ? (c(),
|
|
4137
|
+
N === A.items.length - 1 ? (c(), d(I, { key: 0 }, [
|
|
4138
|
+
A.role === "ai" ? (c(), D(r, {
|
|
4140
4139
|
key: 0,
|
|
4141
4140
|
size: 26,
|
|
4142
4141
|
tail: !0,
|
|
4143
4142
|
name: s.aiAgentName,
|
|
4144
4143
|
"image-url": s.aiAgentAvatarUrl
|
|
4145
|
-
}, null, 8, ["name", "image-url"])) : (c(),
|
|
4144
|
+
}, null, 8, ["name", "image-url"])) : (c(), D(l, {
|
|
4146
4145
|
key: 1,
|
|
4147
4146
|
name: A.agentName,
|
|
4148
4147
|
"avatar-url": A.agentAvatarUrl,
|
|
4149
4148
|
size: 26,
|
|
4150
4149
|
tail: !0
|
|
4151
4150
|
}, null, 8, ["name", "avatar-url"]))
|
|
4152
|
-
], 64)) :
|
|
4153
|
-
])) :
|
|
4154
|
-
|
|
4151
|
+
], 64)) : b("", !0)
|
|
4152
|
+
])) : b("", !0),
|
|
4153
|
+
T.renderAs === "action" ? (c(), D(f, {
|
|
4155
4154
|
key: 1,
|
|
4156
|
-
state:
|
|
4157
|
-
label: n.actionLabel(
|
|
4158
|
-
detail: n.actionDetail(
|
|
4159
|
-
}, null, 8, ["state", "label", "detail"])) :
|
|
4155
|
+
state: T.message.payload.state,
|
|
4156
|
+
label: n.actionLabel(T.message),
|
|
4157
|
+
detail: n.actionDetail(T.message)
|
|
4158
|
+
}, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), D(f, {
|
|
4160
4159
|
key: 2,
|
|
4161
4160
|
state: "awaiting",
|
|
4162
4161
|
label: n.t("messageList.approvalRequestSent"),
|
|
4163
|
-
detail:
|
|
4164
|
-
}, null, 8, ["label", "detail"])) :
|
|
4162
|
+
detail: T.message.text_md || ""
|
|
4163
|
+
}, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), D(k, {
|
|
4165
4164
|
key: 3,
|
|
4166
|
-
artifact: n.actionArtifact(
|
|
4167
|
-
}, null, 8, ["artifact"])) :
|
|
4165
|
+
artifact: n.actionArtifact(T.message)
|
|
4166
|
+
}, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), D(k, {
|
|
4168
4167
|
key: 4,
|
|
4169
|
-
artifact: n.artifactOf(
|
|
4168
|
+
artifact: n.artifactOf(T.message)
|
|
4170
4169
|
}, null, 8, ["artifact"])) : (c(), d("div", {
|
|
4171
4170
|
key: 5,
|
|
4172
|
-
class:
|
|
4173
|
-
"wm-list__body--mixed": !!
|
|
4171
|
+
class: R(["wm-list__body", {
|
|
4172
|
+
"wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
|
|
4174
4173
|
}])
|
|
4175
4174
|
}, [
|
|
4176
|
-
|
|
4175
|
+
T.message.text_md ? (c(), D(y, {
|
|
4177
4176
|
key: 0,
|
|
4178
4177
|
role: A.role,
|
|
4179
|
-
text:
|
|
4180
|
-
}, null, 8, ["role", "text"])) :
|
|
4181
|
-
n.attachmentsOf(
|
|
4178
|
+
text: T.message.text_md
|
|
4179
|
+
}, null, 8, ["role", "text"])) : b("", !0),
|
|
4180
|
+
n.attachmentsOf(T.message).length ? (c(), d("div", {
|
|
4182
4181
|
key: 1,
|
|
4183
|
-
class:
|
|
4182
|
+
class: R(["wm-list__atts", {
|
|
4184
4183
|
"wm-list__atts--align-end": A.role === "user",
|
|
4185
|
-
"wm-list__atts--mosaic": n.attachmentsOf(
|
|
4184
|
+
"wm-list__atts--mosaic": n.attachmentsOf(T.message).length >= 2
|
|
4186
4185
|
}]),
|
|
4187
4186
|
style: z(
|
|
4188
4187
|
n.mosaicGridStyle(
|
|
4189
|
-
n.attachmentsOf(
|
|
4188
|
+
n.attachmentsOf(T.message).length
|
|
4190
4189
|
)
|
|
4191
4190
|
)
|
|
4192
4191
|
}, [
|
|
4193
4192
|
(c(!0), d(I, null, j(n.attachmentsOf(
|
|
4194
|
-
|
|
4195
|
-
), (
|
|
4196
|
-
key: `${n.messageKey(
|
|
4197
|
-
attachment:
|
|
4193
|
+
T.message
|
|
4194
|
+
), (U, L) => (c(), D(M, {
|
|
4195
|
+
key: `${n.messageKey(T.message)}-att-${L}`,
|
|
4196
|
+
attachment: U,
|
|
4198
4197
|
style: z(
|
|
4199
4198
|
n.mosaicCornerStyle(
|
|
4200
4199
|
L,
|
|
4201
|
-
n.attachmentsOf(
|
|
4202
|
-
!!
|
|
4200
|
+
n.attachmentsOf(T.message).length,
|
|
4201
|
+
!!T.message.text_md
|
|
4203
4202
|
)
|
|
4204
4203
|
)
|
|
4205
4204
|
}, null, 8, ["attachment", "style"]))), 128))
|
|
4206
|
-
], 6)) :
|
|
4205
|
+
], 6)) : b("", !0)
|
|
4207
4206
|
], 2))
|
|
4208
4207
|
], 46, Wr),
|
|
4209
|
-
|
|
4208
|
+
N < A.items.length - 1 && a.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (A.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
|
|
4210
4209
|
key: 0,
|
|
4211
|
-
class:
|
|
4210
|
+
class: R(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
4212
4211
|
}, [
|
|
4213
|
-
A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) :
|
|
4214
|
-
A.role !== "user" && n.timeOf(
|
|
4215
|
-
n.timeOf(
|
|
4216
|
-
], 2)) :
|
|
4212
|
+
A.role !== "user" ? (c(), d("span", Gr, v(n.roleLabel(A)), 1)) : b("", !0),
|
|
4213
|
+
A.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : b("", !0),
|
|
4214
|
+
n.timeOf(T.message) ? (c(), d("span", Jr, v(n.timeOf(T.message)), 1)) : b("", !0)
|
|
4215
|
+
], 2)) : b("", !0)
|
|
4217
4216
|
], 64))), 128)),
|
|
4218
4217
|
(A.role !== "user" || n.lastTimeOf(A)) && !n.hasTrailingOverlay(A) ? (c(), d("div", {
|
|
4219
4218
|
key: 0,
|
|
4220
|
-
class:
|
|
4219
|
+
class: R(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
4221
4220
|
}, [
|
|
4222
|
-
A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) :
|
|
4223
|
-
A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) :
|
|
4224
|
-
n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) :
|
|
4225
|
-
], 2)) :
|
|
4221
|
+
A.role !== "user" ? (c(), d("span", Xr, v(n.roleLabel(A)), 1)) : b("", !0),
|
|
4222
|
+
A.role !== "user" && n.lastTimeOf(A) ? (c(), d("span", Qr, "•")) : b("", !0),
|
|
4223
|
+
n.lastTimeOf(A) ? (c(), d("span", Zr, v(n.lastTimeOf(A)), 1)) : b("", !0)
|
|
4224
|
+
], 2)) : b("", !0)
|
|
4226
4225
|
], 64))
|
|
4227
|
-
], 2)) :
|
|
4226
|
+
], 2)) : b("", !0)
|
|
4228
4227
|
], 64))), 128)),
|
|
4229
4228
|
s.streamingActive ? (c(), d("div", ei, [
|
|
4230
|
-
|
|
4231
|
-
K(
|
|
4229
|
+
o("div", ti, [
|
|
4230
|
+
K(r, {
|
|
4232
4231
|
size: 26,
|
|
4233
4232
|
tail: !0,
|
|
4234
4233
|
name: s.aiAgentName,
|
|
@@ -4236,11 +4235,11 @@ function si(e, t, s, r, i, n) {
|
|
|
4236
4235
|
}, null, 8, ["name", "image-url"])
|
|
4237
4236
|
]),
|
|
4238
4237
|
K(E)
|
|
4239
|
-
])) :
|
|
4238
|
+
])) : b("", !0)
|
|
4240
4239
|
], 34),
|
|
4241
|
-
K(
|
|
4240
|
+
K(Ue, { name: "wm-scrollDown" }, {
|
|
4242
4241
|
default: je(() => [
|
|
4243
|
-
|
|
4242
|
+
a.showScrollDown ? (c(), d("button", {
|
|
4244
4243
|
key: 0,
|
|
4245
4244
|
type: "button",
|
|
4246
4245
|
class: "wm-list__scrollDown",
|
|
@@ -4248,7 +4247,7 @@ function si(e, t, s, r, i, n) {
|
|
|
4248
4247
|
title: n.t("messageList.scrollToBottom"),
|
|
4249
4248
|
onClick: t[5] || (t[5] = (...A) => n.scrollToBottomSmooth && n.scrollToBottomSmooth(...A))
|
|
4250
4249
|
}, [...t[13] || (t[13] = [
|
|
4251
|
-
|
|
4250
|
+
o("svg", {
|
|
4252
4251
|
width: "14",
|
|
4253
4252
|
height: "14",
|
|
4254
4253
|
viewBox: "0 0 24 24",
|
|
@@ -4259,24 +4258,24 @@ function si(e, t, s, r, i, n) {
|
|
|
4259
4258
|
"stroke-linejoin": "round",
|
|
4260
4259
|
"aria-hidden": "true"
|
|
4261
4260
|
}, [
|
|
4262
|
-
|
|
4261
|
+
o("path", { d: "M6 9l6 6 6-6" })
|
|
4263
4262
|
], -1)
|
|
4264
|
-
])], 8, ni)) :
|
|
4263
|
+
])], 8, ni)) : b("", !0)
|
|
4265
4264
|
]),
|
|
4266
4265
|
_: 1
|
|
4267
4266
|
})
|
|
4268
4267
|
]);
|
|
4269
4268
|
}
|
|
4270
|
-
const ri = /* @__PURE__ */
|
|
4269
|
+
const ri = /* @__PURE__ */ P(Pr, [["render", si], ["__scopeId", "data-v-cc2c18ec"]]), pe = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
4271
4270
|
function ii() {
|
|
4272
|
-
return
|
|
4271
|
+
return Oe && [
|
|
4273
4272
|
"video/webm;codecs=vp9,opus",
|
|
4274
4273
|
"video/webm;codecs=vp8,opus",
|
|
4275
4274
|
"video/webm",
|
|
4276
4275
|
"video/mp4"
|
|
4277
4276
|
].find((t) => {
|
|
4278
|
-
var s,
|
|
4279
|
-
return (
|
|
4277
|
+
var s, i;
|
|
4278
|
+
return (i = (s = window.MediaRecorder).isTypeSupported) == null ? void 0 : i.call(s, t);
|
|
4280
4279
|
}) || "";
|
|
4281
4280
|
}
|
|
4282
4281
|
function Ve({ audio: e }) {
|
|
@@ -4313,20 +4312,20 @@ async function ai() {
|
|
|
4313
4312
|
}
|
|
4314
4313
|
async function oi(e) {
|
|
4315
4314
|
const t = document.createElement("video");
|
|
4316
|
-
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((
|
|
4317
|
-
const s = t.videoWidth || 1280,
|
|
4318
|
-
|
|
4319
|
-
const n = await new Promise((
|
|
4320
|
-
|
|
4321
|
-
(
|
|
4315
|
+
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
4316
|
+
const s = t.videoWidth || 1280, i = t.videoHeight || 720, a = document.createElement("canvas");
|
|
4317
|
+
a.width = s, a.height = i, a.getContext("2d").drawImage(t, 0, 0, s, i);
|
|
4318
|
+
const n = await new Promise((l, f) => {
|
|
4319
|
+
a.toBlob(
|
|
4320
|
+
(k) => k ? l(k) : f(new Error("toBlob failed")),
|
|
4322
4321
|
"image/png"
|
|
4323
4322
|
);
|
|
4324
|
-
}),
|
|
4325
|
-
return new File([n], `capture-${
|
|
4323
|
+
}), r = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
4324
|
+
return new File([n], `capture-${r}.png`, { type: "image/png" });
|
|
4326
4325
|
}
|
|
4327
4326
|
async function li(e = {}) {
|
|
4328
|
-
var
|
|
4329
|
-
if (!pe || !
|
|
4327
|
+
var k;
|
|
4328
|
+
if (!pe || !Oe) return null;
|
|
4330
4329
|
let t;
|
|
4331
4330
|
try {
|
|
4332
4331
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
@@ -4336,56 +4335,56 @@ async function li(e = {}) {
|
|
|
4336
4335
|
return (y == null ? void 0 : y.name) !== "NotAllowedError" && console.error("[media] record picker", y), null;
|
|
4337
4336
|
}
|
|
4338
4337
|
const s = ii();
|
|
4339
|
-
let
|
|
4338
|
+
let i;
|
|
4340
4339
|
try {
|
|
4341
|
-
|
|
4340
|
+
i = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
|
|
4342
4341
|
} catch (y) {
|
|
4343
|
-
return console.error("[media] recorder init", y), t.getTracks().forEach((
|
|
4344
|
-
|
|
4342
|
+
return console.error("[media] recorder init", y), t.getTracks().forEach((M) => {
|
|
4343
|
+
M.stop();
|
|
4345
4344
|
}), null;
|
|
4346
4345
|
}
|
|
4347
|
-
const
|
|
4348
|
-
let n = null,
|
|
4349
|
-
|
|
4350
|
-
y.data && y.data.size > 0 &&
|
|
4351
|
-
}),
|
|
4352
|
-
var y,
|
|
4346
|
+
const a = [];
|
|
4347
|
+
let n = null, r = !1;
|
|
4348
|
+
i.addEventListener("dataavailable", (y) => {
|
|
4349
|
+
y.data && y.data.size > 0 && a.push(y.data);
|
|
4350
|
+
}), i.addEventListener("stop", () => {
|
|
4351
|
+
var y, M;
|
|
4353
4352
|
if (n && clearInterval(n), t.getTracks().forEach((E) => {
|
|
4354
4353
|
E.stop();
|
|
4355
|
-
}),
|
|
4356
|
-
const E =
|
|
4354
|
+
}), a.length) {
|
|
4355
|
+
const E = i.mimeType || s || "video/webm", A = new Blob(a, { type: E }), q = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), N = new File([A], `ecran-${T}.${q}`, {
|
|
4357
4356
|
type: E
|
|
4358
4357
|
});
|
|
4359
|
-
(y = e.onfinalize) == null || y.call(e,
|
|
4358
|
+
(y = e.onfinalize) == null || y.call(e, N);
|
|
4360
4359
|
} else
|
|
4361
|
-
(
|
|
4360
|
+
(M = e.oncancel) == null || M.call(e);
|
|
4362
4361
|
}), t.getVideoTracks().forEach((y) => {
|
|
4363
|
-
y.addEventListener("ended", () =>
|
|
4362
|
+
y.addEventListener("ended", () => l(), { once: !0 });
|
|
4364
4363
|
});
|
|
4365
|
-
function
|
|
4366
|
-
if (!
|
|
4364
|
+
function l() {
|
|
4365
|
+
if (!r && (r = !0, i.state !== "inactive"))
|
|
4367
4366
|
try {
|
|
4368
|
-
|
|
4367
|
+
i.stop();
|
|
4369
4368
|
} catch (y) {
|
|
4370
4369
|
console.error("[media] recorder stop", y);
|
|
4371
4370
|
}
|
|
4372
4371
|
}
|
|
4373
4372
|
try {
|
|
4374
|
-
|
|
4373
|
+
i.start(1e3);
|
|
4375
4374
|
} catch (y) {
|
|
4376
|
-
return console.error("[media] recorder start", y), t.getTracks().forEach((
|
|
4377
|
-
|
|
4375
|
+
return console.error("[media] recorder start", y), t.getTracks().forEach((M) => {
|
|
4376
|
+
M.stop();
|
|
4378
4377
|
}), null;
|
|
4379
4378
|
}
|
|
4380
|
-
(
|
|
4379
|
+
(k = e.onstart) == null || k.call(e);
|
|
4381
4380
|
const f = Date.now();
|
|
4382
4381
|
return n = setInterval(() => {
|
|
4383
4382
|
var y;
|
|
4384
4383
|
(y = e.ontick) == null || y.call(e, Date.now() - f);
|
|
4385
4384
|
}, 500), {
|
|
4386
|
-
stop:
|
|
4385
|
+
stop: l,
|
|
4387
4386
|
get state() {
|
|
4388
|
-
return
|
|
4387
|
+
return i.state;
|
|
4389
4388
|
}
|
|
4390
4389
|
};
|
|
4391
4390
|
}
|
|
@@ -4442,7 +4441,7 @@ const ci = [
|
|
|
4442
4441
|
return ci.map((e) => ({
|
|
4443
4442
|
...e,
|
|
4444
4443
|
label: this.t(e.labelKey),
|
|
4445
|
-
disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !
|
|
4444
|
+
disabled: e.action === "screenshot" && !pe || e.action === "record" && (!pe || !Oe)
|
|
4446
4445
|
}));
|
|
4447
4446
|
},
|
|
4448
4447
|
recordingElapsedLabel() {
|
|
@@ -4574,51 +4573,51 @@ const ci = [
|
|
|
4574
4573
|
height: "14",
|
|
4575
4574
|
"aria-hidden": "true"
|
|
4576
4575
|
}, pi = ["d"], vi = ["placeholder", "disabled"], yi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
|
|
4577
|
-
function ki(e, t, s,
|
|
4576
|
+
function ki(e, t, s, i, a, n) {
|
|
4578
4577
|
return c(), d("div", {
|
|
4579
|
-
class:
|
|
4580
|
-
style: z(
|
|
4578
|
+
class: R(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
|
|
4579
|
+
style: z(a.kbOffset ? { transform: `translateY(-${a.kbOffset}px)` } : null)
|
|
4581
4580
|
}, [
|
|
4582
|
-
|
|
4583
|
-
t[8] || (t[8] =
|
|
4581
|
+
a.recording ? (c(), d("div", ui, [
|
|
4582
|
+
t[8] || (t[8] = o("span", {
|
|
4584
4583
|
class: "wm-rec__dot",
|
|
4585
4584
|
"aria-hidden": "true"
|
|
4586
4585
|
}, null, -1)),
|
|
4587
|
-
|
|
4588
|
-
|
|
4586
|
+
o("span", hi, v(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
|
|
4587
|
+
o("button", {
|
|
4589
4588
|
type: "button",
|
|
4590
4589
|
class: "wm-rec__stop",
|
|
4591
|
-
onClick: t[0] || (t[0] = (...
|
|
4590
|
+
onClick: t[0] || (t[0] = (...r) => n.stopRecording && n.stopRecording(...r))
|
|
4592
4591
|
}, v(n.t("composer.stop")), 1)
|
|
4593
|
-
])) :
|
|
4594
|
-
|
|
4595
|
-
class:
|
|
4596
|
-
onSubmit: t[7] || (t[7] = J((...
|
|
4592
|
+
])) : b("", !0),
|
|
4593
|
+
o("form", {
|
|
4594
|
+
class: R(["wm-compose", { "has-attach": a.attachOpen }]),
|
|
4595
|
+
onSubmit: t[7] || (t[7] = J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]))
|
|
4597
4596
|
}, [
|
|
4598
|
-
|
|
4597
|
+
o("input", {
|
|
4599
4598
|
ref: "fileEl",
|
|
4600
4599
|
type: "file",
|
|
4601
4600
|
hidden: "",
|
|
4602
4601
|
multiple: "",
|
|
4603
|
-
onChange: t[1] || (t[1] = (...
|
|
4602
|
+
onChange: t[1] || (t[1] = (...r) => n.onFile && n.onFile(...r))
|
|
4604
4603
|
}, null, 544),
|
|
4605
|
-
|
|
4604
|
+
a.attachOpen ? (c(), d("div", {
|
|
4606
4605
|
key: 0,
|
|
4607
4606
|
class: "wm-compose__overlay",
|
|
4608
|
-
onClick: t[2] || (t[2] = (
|
|
4609
|
-
})) :
|
|
4610
|
-
|
|
4611
|
-
(c(!0), d(I, null, j(n.attachItems, (
|
|
4612
|
-
key:
|
|
4607
|
+
onClick: t[2] || (t[2] = (r) => a.attachOpen = !1)
|
|
4608
|
+
})) : b("", !0),
|
|
4609
|
+
a.attachOpen ? (c(), d("div", mi, [
|
|
4610
|
+
(c(!0), d(I, null, j(n.attachItems, (r) => (c(), d("button", {
|
|
4611
|
+
key: r.action,
|
|
4613
4612
|
type: "button",
|
|
4614
4613
|
class: "wm-compose__menuItem",
|
|
4615
|
-
disabled:
|
|
4616
|
-
onClick: (
|
|
4614
|
+
disabled: r.disabled,
|
|
4615
|
+
onClick: (l) => n.onAttachAction(r.action)
|
|
4617
4616
|
}, [
|
|
4618
|
-
|
|
4617
|
+
o("span", _i, [
|
|
4619
4618
|
(c(), d("svg", gi, [
|
|
4620
|
-
|
|
4621
|
-
d:
|
|
4619
|
+
o("path", {
|
|
4620
|
+
d: r.path,
|
|
4622
4621
|
stroke: "currentColor",
|
|
4623
4622
|
"stroke-width": "1.8",
|
|
4624
4623
|
"stroke-linecap": "round",
|
|
@@ -4627,31 +4626,31 @@ function ki(e, t, s, r, i, n) {
|
|
|
4627
4626
|
}, null, 8, pi)
|
|
4628
4627
|
]))
|
|
4629
4628
|
]),
|
|
4630
|
-
|
|
4629
|
+
o("span", null, v(r.label), 1)
|
|
4631
4630
|
], 8, fi))), 128))
|
|
4632
|
-
])) :
|
|
4633
|
-
G(
|
|
4631
|
+
])) : b("", !0),
|
|
4632
|
+
G(o("textarea", {
|
|
4634
4633
|
ref: "inputEl",
|
|
4635
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
4634
|
+
"onUpdate:modelValue": t[3] || (t[3] = (r) => a.local = r),
|
|
4636
4635
|
class: "wm-compose__input",
|
|
4637
4636
|
rows: "3",
|
|
4638
4637
|
placeholder: s.placeholder,
|
|
4639
4638
|
disabled: s.disabled,
|
|
4640
|
-
onKeydown: t[4] || (t[4] = (...
|
|
4641
|
-
onInput: t[5] || (t[5] = (...
|
|
4639
|
+
onKeydown: t[4] || (t[4] = (...r) => n.onKeydown && n.onKeydown(...r)),
|
|
4640
|
+
onInput: t[5] || (t[5] = (...r) => n.autosize && n.autosize(...r))
|
|
4642
4641
|
}, null, 40, vi), [
|
|
4643
|
-
[te,
|
|
4642
|
+
[te, a.local]
|
|
4644
4643
|
]),
|
|
4645
|
-
|
|
4646
|
-
|
|
4644
|
+
o("div", yi, [
|
|
4645
|
+
o("button", {
|
|
4647
4646
|
type: "button",
|
|
4648
|
-
class:
|
|
4647
|
+
class: R(["wm-compose__icon", { "is-open": a.attachOpen }]),
|
|
4649
4648
|
title: s.attachLabel,
|
|
4650
4649
|
"aria-label": s.attachLabel,
|
|
4651
|
-
disabled:
|
|
4652
|
-
onClick: t[6] || (t[6] = (
|
|
4650
|
+
disabled: a.recording,
|
|
4651
|
+
onClick: t[6] || (t[6] = (r) => a.attachOpen = !a.attachOpen)
|
|
4653
4652
|
}, [...t[9] || (t[9] = [
|
|
4654
|
-
|
|
4653
|
+
o("svg", {
|
|
4655
4654
|
width: "13",
|
|
4656
4655
|
height: "13",
|
|
4657
4656
|
viewBox: "0 0 24 24",
|
|
@@ -4662,16 +4661,16 @@ function ki(e, t, s, r, i, n) {
|
|
|
4662
4661
|
"stroke-linejoin": "round",
|
|
4663
4662
|
"aria-hidden": "true"
|
|
4664
4663
|
}, [
|
|
4665
|
-
|
|
4664
|
+
o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
|
|
4666
4665
|
], -1)
|
|
4667
4666
|
])], 10, wi),
|
|
4668
|
-
|
|
4667
|
+
o("button", {
|
|
4669
4668
|
type: "submit",
|
|
4670
|
-
class:
|
|
4669
|
+
class: R(["wm-compose__send", { "is-empty": !n.canSend }]),
|
|
4671
4670
|
disabled: !n.canSend,
|
|
4672
4671
|
"aria-label": n.t("composer.send")
|
|
4673
4672
|
}, [...t[10] || (t[10] = [
|
|
4674
|
-
|
|
4673
|
+
o("svg", {
|
|
4675
4674
|
width: "13",
|
|
4676
4675
|
height: "13",
|
|
4677
4676
|
viewBox: "0 0 24 24",
|
|
@@ -4682,14 +4681,14 @@ function ki(e, t, s, r, i, n) {
|
|
|
4682
4681
|
"stroke-linejoin": "round",
|
|
4683
4682
|
"aria-hidden": "true"
|
|
4684
4683
|
}, [
|
|
4685
|
-
|
|
4684
|
+
o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4686
4685
|
], -1)
|
|
4687
4686
|
])], 10, bi)
|
|
4688
4687
|
])
|
|
4689
4688
|
], 34)
|
|
4690
4689
|
], 6);
|
|
4691
4690
|
}
|
|
4692
|
-
const Ci = /* @__PURE__ */
|
|
4691
|
+
const Ci = /* @__PURE__ */ P(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
|
|
4693
4692
|
name: "WmSuggestionChips",
|
|
4694
4693
|
props: {
|
|
4695
4694
|
items: { type: Array, default: () => [] },
|
|
@@ -4707,21 +4706,21 @@ const Ci = /* @__PURE__ */ N(di, [["render", ki], ["__scopeId", "data-v-bba29b9c
|
|
|
4707
4706
|
}
|
|
4708
4707
|
}
|
|
4709
4708
|
}, Si = ["onClick"];
|
|
4710
|
-
function Ti(e, t, s,
|
|
4709
|
+
function Ti(e, t, s, i, a, n) {
|
|
4711
4710
|
return s.items.length ? (c(), d("div", {
|
|
4712
4711
|
key: n.batchKey,
|
|
4713
4712
|
class: "wm-chips"
|
|
4714
4713
|
}, [
|
|
4715
|
-
(c(!0), d(I, null, j(s.items, (
|
|
4716
|
-
key:
|
|
4714
|
+
(c(!0), d(I, null, j(s.items, (r, l) => (c(), d("button", {
|
|
4715
|
+
key: l,
|
|
4717
4716
|
type: "button",
|
|
4718
4717
|
class: "wm-chip",
|
|
4719
|
-
style: z({ animationDelay: s.baseDelay +
|
|
4720
|
-
onClick: (f) => e.$emit("select",
|
|
4721
|
-
}, v(
|
|
4722
|
-
])) :
|
|
4718
|
+
style: z({ animationDelay: s.baseDelay + l * s.stepDelay + "ms" }),
|
|
4719
|
+
onClick: (f) => e.$emit("select", r)
|
|
4720
|
+
}, v(r.label), 13, Si))), 128))
|
|
4721
|
+
])) : b("", !0);
|
|
4723
4722
|
}
|
|
4724
|
-
const Mi = /* @__PURE__ */
|
|
4723
|
+
const Mi = /* @__PURE__ */ P(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085"]]), xi = {
|
|
4725
4724
|
name: "WmApprovalCard",
|
|
4726
4725
|
components: { AIAvatar: oe },
|
|
4727
4726
|
inject: {
|
|
@@ -4765,45 +4764,45 @@ const Mi = /* @__PURE__ */ N(Ai, [["render", Ti], ["__scopeId", "data-v-47ad8085
|
|
|
4765
4764
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4766
4765
|
}
|
|
4767
4766
|
}
|
|
4768
|
-
},
|
|
4767
|
+
}, Oi = { class: "wm-approval" }, Ri = { class: "wm-approval__head" }, Li = { class: "wm-approval__icon" }, Ii = { class: "wm-approval__main" }, Ei = { class: "wm-approval__title" }, Bi = {
|
|
4769
4768
|
key: 0,
|
|
4770
4769
|
class: "wm-approval__detail"
|
|
4771
4770
|
}, Pi = { class: "wm-approval__actions" };
|
|
4772
|
-
function
|
|
4773
|
-
const
|
|
4774
|
-
return c(), d("div",
|
|
4775
|
-
|
|
4776
|
-
|
|
4777
|
-
K(
|
|
4771
|
+
function Di(e, t, s, i, a, n) {
|
|
4772
|
+
const r = B("AIAvatar");
|
|
4773
|
+
return c(), d("div", Oi, [
|
|
4774
|
+
o("div", Ri, [
|
|
4775
|
+
o("div", Li, [
|
|
4776
|
+
K(r, {
|
|
4778
4777
|
size: 24,
|
|
4779
4778
|
name: s.agentName,
|
|
4780
4779
|
"image-url": s.agentAvatarUrl
|
|
4781
4780
|
}, null, 8, ["name", "image-url"])
|
|
4782
4781
|
]),
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
s.detail ? (c(), d("div", Bi, v(s.detail), 1)) :
|
|
4782
|
+
o("div", Ii, [
|
|
4783
|
+
o("div", Ei, v(s.action), 1),
|
|
4784
|
+
s.detail ? (c(), d("div", Bi, v(s.detail), 1)) : b("", !0)
|
|
4786
4785
|
])
|
|
4787
4786
|
]),
|
|
4788
|
-
|
|
4787
|
+
o("div", Pi, [
|
|
4789
4788
|
n.rejectId ? (c(), d("button", {
|
|
4790
4789
|
key: 0,
|
|
4791
4790
|
type: "button",
|
|
4792
4791
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
4793
|
-
onClick: t[0] || (t[0] = (
|
|
4794
|
-
}, v(n.rejectLabel), 1)) :
|
|
4792
|
+
onClick: t[0] || (t[0] = (l) => e.$emit("callback", n.rejectId))
|
|
4793
|
+
}, v(n.rejectLabel), 1)) : b("", !0),
|
|
4795
4794
|
n.approveId ? (c(), d("button", {
|
|
4796
4795
|
key: 1,
|
|
4797
4796
|
type: "button",
|
|
4798
4797
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
4799
|
-
onClick: t[1] || (t[1] = (
|
|
4800
|
-
}, v(n.approveLabel), 1)) :
|
|
4798
|
+
onClick: t[1] || (t[1] = (l) => e.$emit("callback", n.approveId))
|
|
4799
|
+
}, v(n.approveLabel), 1)) : b("", !0)
|
|
4801
4800
|
])
|
|
4802
4801
|
]);
|
|
4803
4802
|
}
|
|
4804
|
-
const
|
|
4805
|
-
let
|
|
4806
|
-
const
|
|
4803
|
+
const Ni = /* @__PURE__ */ P(xi, [["render", Di], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4804
|
+
let De = 0;
|
|
4805
|
+
const Ui = /* @__PURE__ */ new Set([
|
|
4807
4806
|
"text",
|
|
4808
4807
|
"textarea",
|
|
4809
4808
|
"number",
|
|
@@ -4828,8 +4827,8 @@ const Di = /* @__PURE__ */ new Set([
|
|
|
4828
4827
|
},
|
|
4829
4828
|
emits: ["submit"],
|
|
4830
4829
|
data() {
|
|
4831
|
-
return
|
|
4832
|
-
_uid:
|
|
4830
|
+
return De += 1, {
|
|
4831
|
+
_uid: De,
|
|
4833
4832
|
values: {},
|
|
4834
4833
|
busy: !1,
|
|
4835
4834
|
error: ""
|
|
@@ -4841,7 +4840,7 @@ const Di = /* @__PURE__ */ new Set([
|
|
|
4841
4840
|
// douteux.
|
|
4842
4841
|
normalizedFields() {
|
|
4843
4842
|
var t;
|
|
4844
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !
|
|
4843
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Ui.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
|
|
4845
4844
|
}
|
|
4846
4845
|
},
|
|
4847
4846
|
created() {
|
|
@@ -4860,8 +4859,8 @@ const Di = /* @__PURE__ */ new Set([
|
|
|
4860
4859
|
this.values = t, this.error = "";
|
|
4861
4860
|
},
|
|
4862
4861
|
toggleMulti(e, t, s) {
|
|
4863
|
-
const
|
|
4864
|
-
s &&
|
|
4862
|
+
const i = Array.isArray(this.values[e]) ? this.values[e].slice() : [], a = i.indexOf(t);
|
|
4863
|
+
s && a === -1 ? i.push(t) : !s && a !== -1 && i.splice(a, 1), this.values = { ...this.values, [e]: i };
|
|
4865
4864
|
},
|
|
4866
4865
|
validate() {
|
|
4867
4866
|
for (const e of this.normalizedFields) {
|
|
@@ -4921,144 +4920,144 @@ const Di = /* @__PURE__ */ new Set([
|
|
|
4921
4920
|
key: 2,
|
|
4922
4921
|
class: "wm-form__doneLbl"
|
|
4923
4922
|
};
|
|
4924
|
-
function ca(e, t, s,
|
|
4925
|
-
const
|
|
4923
|
+
function ca(e, t, s, i, a, n) {
|
|
4924
|
+
const r = B("AIAvatar");
|
|
4926
4925
|
return c(), d("div", Fi, [
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
K(
|
|
4926
|
+
o("div", Hi, [
|
|
4927
|
+
o("div", zi, [
|
|
4928
|
+
K(r, {
|
|
4930
4929
|
size: 24,
|
|
4931
4930
|
name: s.agentName,
|
|
4932
4931
|
"image-url": s.agentAvatarUrl
|
|
4933
4932
|
}, null, 8, ["name", "image-url"])
|
|
4934
4933
|
]),
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) :
|
|
4934
|
+
o("div", qi, [
|
|
4935
|
+
o("div", Vi, v(s.form.title || n.t("form.title")), 1),
|
|
4936
|
+
s.form.description ? (c(), d("div", Ki, v(s.form.description), 1)) : b("", !0)
|
|
4938
4937
|
])
|
|
4939
4938
|
]),
|
|
4940
|
-
|
|
4939
|
+
o("form", {
|
|
4941
4940
|
class: "wm-form__body",
|
|
4942
|
-
onSubmit: t[0] || (t[0] = J((...
|
|
4941
|
+
onSubmit: t[0] || (t[0] = J((...l) => n.onSubmit && n.onSubmit(...l), ["prevent"]))
|
|
4943
4942
|
}, [
|
|
4944
|
-
(c(!0), d(I, null, j(n.normalizedFields, (
|
|
4945
|
-
key:
|
|
4943
|
+
(c(!0), d(I, null, j(n.normalizedFields, (l) => (c(), d("div", {
|
|
4944
|
+
key: l.key,
|
|
4946
4945
|
class: "wm-form__field"
|
|
4947
4946
|
}, [
|
|
4948
|
-
|
|
4949
|
-
for: `wm-f-${
|
|
4947
|
+
o("label", {
|
|
4948
|
+
for: `wm-f-${a._uid}-${l.key}`,
|
|
4950
4949
|
class: "wm-form__label"
|
|
4951
4950
|
}, [
|
|
4952
|
-
Se(v(
|
|
4953
|
-
|
|
4951
|
+
Se(v(l.label), 1),
|
|
4952
|
+
l.required ? (c(), d("span", $i, "*")) : b("", !0)
|
|
4954
4953
|
], 8, Wi),
|
|
4955
|
-
|
|
4954
|
+
l.type === "text" ? G((c(), d("input", {
|
|
4956
4955
|
key: 0,
|
|
4957
|
-
id: `wm-f-${
|
|
4958
|
-
"onUpdate:modelValue": (f) =>
|
|
4956
|
+
id: `wm-f-${a._uid}-${l.key}`,
|
|
4957
|
+
"onUpdate:modelValue": (f) => a.values[l.key] = f,
|
|
4959
4958
|
type: "text",
|
|
4960
4959
|
class: "wm-form__input",
|
|
4961
|
-
placeholder:
|
|
4962
|
-
required:
|
|
4963
|
-
disabled: s.readOnly ||
|
|
4960
|
+
placeholder: l.placeholder || "",
|
|
4961
|
+
required: l.required,
|
|
4962
|
+
disabled: s.readOnly || a.busy
|
|
4964
4963
|
}, null, 8, Gi)), [
|
|
4965
|
-
[te,
|
|
4966
|
-
]) :
|
|
4964
|
+
[te, a.values[l.key]]
|
|
4965
|
+
]) : l.type === "textarea" ? G((c(), d("textarea", {
|
|
4967
4966
|
key: 1,
|
|
4968
|
-
id: `wm-f-${
|
|
4969
|
-
"onUpdate:modelValue": (f) =>
|
|
4967
|
+
id: `wm-f-${a._uid}-${l.key}`,
|
|
4968
|
+
"onUpdate:modelValue": (f) => a.values[l.key] = f,
|
|
4970
4969
|
class: "wm-form__textarea",
|
|
4971
4970
|
rows: "3",
|
|
4972
|
-
placeholder:
|
|
4973
|
-
required:
|
|
4974
|
-
disabled: s.readOnly ||
|
|
4971
|
+
placeholder: l.placeholder || "",
|
|
4972
|
+
required: l.required,
|
|
4973
|
+
disabled: s.readOnly || a.busy
|
|
4975
4974
|
}, null, 8, Yi)), [
|
|
4976
|
-
[te,
|
|
4977
|
-
]) :
|
|
4975
|
+
[te, a.values[l.key]]
|
|
4976
|
+
]) : l.type === "number" ? G((c(), d("input", {
|
|
4978
4977
|
key: 2,
|
|
4979
|
-
id: `wm-f-${
|
|
4980
|
-
"onUpdate:modelValue": (f) =>
|
|
4978
|
+
id: `wm-f-${a._uid}-${l.key}`,
|
|
4979
|
+
"onUpdate:modelValue": (f) => a.values[l.key] = f,
|
|
4981
4980
|
type: "number",
|
|
4982
4981
|
class: "wm-form__input",
|
|
4983
|
-
placeholder:
|
|
4984
|
-
required:
|
|
4985
|
-
disabled: s.readOnly ||
|
|
4982
|
+
placeholder: l.placeholder || "",
|
|
4983
|
+
required: l.required,
|
|
4984
|
+
disabled: s.readOnly || a.busy
|
|
4986
4985
|
}, null, 8, Ji)), [
|
|
4987
4986
|
[
|
|
4988
4987
|
te,
|
|
4989
|
-
|
|
4988
|
+
a.values[l.key],
|
|
4990
4989
|
void 0,
|
|
4991
4990
|
{ number: !0 }
|
|
4992
4991
|
]
|
|
4993
|
-
]) :
|
|
4992
|
+
]) : l.type === "date" ? G((c(), d("input", {
|
|
4994
4993
|
key: 3,
|
|
4995
|
-
id: `wm-f-${
|
|
4996
|
-
"onUpdate:modelValue": (f) =>
|
|
4994
|
+
id: `wm-f-${a._uid}-${l.key}`,
|
|
4995
|
+
"onUpdate:modelValue": (f) => a.values[l.key] = f,
|
|
4997
4996
|
type: "date",
|
|
4998
4997
|
class: "wm-form__input",
|
|
4999
|
-
required:
|
|
5000
|
-
disabled: s.readOnly ||
|
|
4998
|
+
required: l.required,
|
|
4999
|
+
disabled: s.readOnly || a.busy
|
|
5001
5000
|
}, null, 8, Xi)), [
|
|
5002
|
-
[te,
|
|
5003
|
-
]) :
|
|
5004
|
-
G(
|
|
5005
|
-
id: `wm-f-${
|
|
5006
|
-
"onUpdate:modelValue": (f) =>
|
|
5001
|
+
[te, a.values[l.key]]
|
|
5002
|
+
]) : l.type === "boolean" ? (c(), d("label", Qi, [
|
|
5003
|
+
G(o("input", {
|
|
5004
|
+
id: `wm-f-${a._uid}-${l.key}`,
|
|
5005
|
+
"onUpdate:modelValue": (f) => a.values[l.key] = f,
|
|
5007
5006
|
type: "checkbox",
|
|
5008
|
-
disabled: s.readOnly ||
|
|
5007
|
+
disabled: s.readOnly || a.busy
|
|
5009
5008
|
}, null, 8, Zi), [
|
|
5010
|
-
[$e,
|
|
5009
|
+
[$e, a.values[l.key]]
|
|
5011
5010
|
]),
|
|
5012
|
-
|
|
5013
|
-
])) :
|
|
5011
|
+
o("span", null, v(l.placeholder || n.t("common.yes")), 1)
|
|
5012
|
+
])) : l.type === "select" ? G((c(), d("select", {
|
|
5014
5013
|
key: 5,
|
|
5015
|
-
id: `wm-f-${
|
|
5016
|
-
"onUpdate:modelValue": (f) =>
|
|
5014
|
+
id: `wm-f-${a._uid}-${l.key}`,
|
|
5015
|
+
"onUpdate:modelValue": (f) => a.values[l.key] = f,
|
|
5017
5016
|
class: "wm-form__select",
|
|
5018
|
-
required:
|
|
5019
|
-
disabled: s.readOnly ||
|
|
5017
|
+
required: l.required,
|
|
5018
|
+
disabled: s.readOnly || a.busy
|
|
5020
5019
|
}, [
|
|
5021
|
-
|
|
5022
|
-
(c(!0), d(I, null, j(
|
|
5020
|
+
o("option", ta, v(l.placeholder || n.t("form.choose")), 1),
|
|
5021
|
+
(c(!0), d(I, null, j(l.options, (f) => (c(), d("option", {
|
|
5023
5022
|
key: f.value,
|
|
5024
5023
|
value: f.value
|
|
5025
5024
|
}, v(f.label), 9, na))), 128))
|
|
5026
5025
|
], 8, ea)), [
|
|
5027
|
-
[Ge,
|
|
5028
|
-
]) :
|
|
5029
|
-
(c(!0), d(I, null, j(
|
|
5026
|
+
[Ge, a.values[l.key]]
|
|
5027
|
+
]) : l.type === "multiselect" ? (c(), d("div", sa, [
|
|
5028
|
+
(c(!0), d(I, null, j(l.options, (f) => (c(), d("label", {
|
|
5030
5029
|
key: f.value,
|
|
5031
5030
|
class: "wm-form__multiItem"
|
|
5032
5031
|
}, [
|
|
5033
|
-
|
|
5032
|
+
o("input", {
|
|
5034
5033
|
type: "checkbox",
|
|
5035
5034
|
value: f.value,
|
|
5036
|
-
checked: Array.isArray(
|
|
5037
|
-
disabled: s.readOnly ||
|
|
5038
|
-
onChange: (
|
|
5039
|
-
|
|
5035
|
+
checked: Array.isArray(a.values[l.key]) && a.values[l.key].includes(f.value),
|
|
5036
|
+
disabled: s.readOnly || a.busy,
|
|
5037
|
+
onChange: (k) => n.toggleMulti(
|
|
5038
|
+
l.key,
|
|
5040
5039
|
f.value,
|
|
5041
|
-
|
|
5040
|
+
k.target.checked
|
|
5042
5041
|
)
|
|
5043
5042
|
}, null, 40, ra),
|
|
5044
|
-
|
|
5043
|
+
o("span", null, v(f.label), 1)
|
|
5045
5044
|
]))), 128))
|
|
5046
|
-
])) :
|
|
5045
|
+
])) : b("", !0)
|
|
5047
5046
|
]))), 128)),
|
|
5048
|
-
|
|
5047
|
+
a.error ? (c(), d("div", ia, v(a.error), 1)) : b("", !0),
|
|
5049
5048
|
s.readOnly ? (c(), d("div", la, v(n.t("form.responseSent")), 1)) : (c(), d("button", {
|
|
5050
5049
|
key: 1,
|
|
5051
5050
|
type: "submit",
|
|
5052
5051
|
class: "wm-form__submit",
|
|
5053
|
-
disabled:
|
|
5052
|
+
disabled: a.busy
|
|
5054
5053
|
}, [
|
|
5055
|
-
|
|
5056
|
-
|
|
5054
|
+
a.busy ? (c(), d("span", oa)) : b("", !0),
|
|
5055
|
+
o("span", null, v(a.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
|
|
5057
5056
|
], 8, aa))
|
|
5058
5057
|
], 32)
|
|
5059
5058
|
]);
|
|
5060
5059
|
}
|
|
5061
|
-
const da = /* @__PURE__ */
|
|
5060
|
+
const da = /* @__PURE__ */ P(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56"]]), ua = {
|
|
5062
5061
|
name: "WmFeedback",
|
|
5063
5062
|
inject: {
|
|
5064
5063
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5096,11 +5095,11 @@ const da = /* @__PURE__ */ N(ji, [["render", ca], ["__scopeId", "data-v-fe65cc56
|
|
|
5096
5095
|
key: 1,
|
|
5097
5096
|
class: "wm-fb__done"
|
|
5098
5097
|
}, ba = { class: "wm-fb__doneTitle" }, ka = { class: "wm-fb__doneSub" };
|
|
5099
|
-
function Ca(e, t, s,
|
|
5098
|
+
function Ca(e, t, s, i, a, n) {
|
|
5100
5099
|
return c(), d("div", ha, [
|
|
5101
5100
|
s.done ? (c(), d("div", wa, [
|
|
5102
|
-
t[1] || (t[1] =
|
|
5103
|
-
|
|
5101
|
+
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
5102
|
+
o("svg", {
|
|
5104
5103
|
width: "16",
|
|
5105
5104
|
height: "16",
|
|
5106
5105
|
viewBox: "0 0 24 24",
|
|
@@ -5111,35 +5110,35 @@ function Ca(e, t, s, r, i, n) {
|
|
|
5111
5110
|
"stroke-linejoin": "round",
|
|
5112
5111
|
"aria-hidden": "true"
|
|
5113
5112
|
}, [
|
|
5114
|
-
|
|
5113
|
+
o("path", { d: "M20 6L9 17l-5-5" })
|
|
5115
5114
|
])
|
|
5116
5115
|
], -1)),
|
|
5117
|
-
|
|
5118
|
-
|
|
5116
|
+
o("div", ba, v(n.t("feedback.doneTitle")), 1),
|
|
5117
|
+
o("div", ka, v(n.t("feedback.doneSubtitle")), 1)
|
|
5119
5118
|
])) : (c(), d(I, { key: 0 }, [
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
(c(!0), d(I, null, j(n.options, (
|
|
5124
|
-
key:
|
|
5119
|
+
o("div", ma, v(n.t("feedback.question")), 1),
|
|
5120
|
+
o("div", fa, v(n.t("feedback.subtitle")), 1),
|
|
5121
|
+
o("div", _a, [
|
|
5122
|
+
(c(!0), d(I, null, j(n.options, (r) => (c(), d("button", {
|
|
5123
|
+
key: r.v,
|
|
5125
5124
|
type: "button",
|
|
5126
|
-
class:
|
|
5127
|
-
onClick: (
|
|
5125
|
+
class: R(["wm-fb__opt", { "is-selected": a.sel === r.v }]),
|
|
5126
|
+
onClick: (l) => a.sel = r.v
|
|
5128
5127
|
}, [
|
|
5129
|
-
|
|
5130
|
-
|
|
5128
|
+
o("span", pa, v(r.e), 1),
|
|
5129
|
+
o("span", va, v(r.l), 1)
|
|
5131
5130
|
], 10, ga))), 128))
|
|
5132
5131
|
]),
|
|
5133
|
-
|
|
5132
|
+
o("button", {
|
|
5134
5133
|
type: "button",
|
|
5135
5134
|
class: "wm-fb__send",
|
|
5136
|
-
disabled: !
|
|
5137
|
-
onClick: t[0] || (t[0] = (...
|
|
5135
|
+
disabled: !a.sel || s.busy,
|
|
5136
|
+
onClick: t[0] || (t[0] = (...r) => n.onSend && n.onSend(...r))
|
|
5138
5137
|
}, v(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ya)
|
|
5139
5138
|
], 64))
|
|
5140
5139
|
]);
|
|
5141
5140
|
}
|
|
5142
|
-
const Aa = /* @__PURE__ */
|
|
5141
|
+
const Aa = /* @__PURE__ */ P(ua, [["render", Ca], ["__scopeId", "data-v-9b630564"]]), Sa = {
|
|
5143
5142
|
name: "WmMoreMenu",
|
|
5144
5143
|
inject: {
|
|
5145
5144
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5180,26 +5179,26 @@ const Aa = /* @__PURE__ */ N(ua, [["render", Ca], ["__scopeId", "data-v-9b630564
|
|
|
5180
5179
|
}, xa = {
|
|
5181
5180
|
key: 0,
|
|
5182
5181
|
class: "wm-mm__section"
|
|
5183
|
-
},
|
|
5182
|
+
}, Oa = { class: "wm-mm__label" }, Ra = { class: "wm-mm__label" }, La = {
|
|
5184
5183
|
key: 1,
|
|
5185
5184
|
class: "wm-mm__sep"
|
|
5186
|
-
}, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" },
|
|
5187
|
-
function
|
|
5185
|
+
}, Ia = { class: "wm-mm__section" }, Ea = { class: "wm-mm__label" }, Ba = { class: "wm-mm__section" }, Pa = { class: "wm-mm__label" }, Da = { class: "wm-mm__label" };
|
|
5186
|
+
function Na(e, t, s, i, a, n) {
|
|
5188
5187
|
return c(), d("div", Ta, [
|
|
5189
|
-
|
|
5188
|
+
o("div", {
|
|
5190
5189
|
class: "wm-mm__scrim",
|
|
5191
|
-
onClick: t[0] || (t[0] = (
|
|
5190
|
+
onClick: t[0] || (t[0] = (r) => e.$emit("close"))
|
|
5192
5191
|
}),
|
|
5193
|
-
|
|
5192
|
+
o("div", Ma, [
|
|
5194
5193
|
s.canRename || s.canExport ? (c(), d("div", xa, [
|
|
5195
5194
|
s.canRename ? (c(), d("button", {
|
|
5196
5195
|
key: 0,
|
|
5197
5196
|
type: "button",
|
|
5198
5197
|
class: "wm-mm__item",
|
|
5199
|
-
onClick: t[1] || (t[1] = (
|
|
5198
|
+
onClick: t[1] || (t[1] = (r) => n.emit("rename"))
|
|
5200
5199
|
}, [
|
|
5201
|
-
t[6] || (t[6] =
|
|
5202
|
-
|
|
5200
|
+
t[6] || (t[6] = o("span", { class: "wm-mm__icon" }, [
|
|
5201
|
+
o("svg", {
|
|
5203
5202
|
width: "12",
|
|
5204
5203
|
height: "12",
|
|
5205
5204
|
viewBox: "0 0 24 24",
|
|
@@ -5210,20 +5209,20 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5210
5209
|
"stroke-linejoin": "round",
|
|
5211
5210
|
"aria-hidden": "true"
|
|
5212
5211
|
}, [
|
|
5213
|
-
|
|
5214
|
-
|
|
5212
|
+
o("path", { d: "M12 20h9" }),
|
|
5213
|
+
o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
5215
5214
|
])
|
|
5216
5215
|
], -1)),
|
|
5217
|
-
|
|
5218
|
-
])) :
|
|
5216
|
+
o("span", Oa, v(n.t("moreMenu.editTitle")), 1)
|
|
5217
|
+
])) : b("", !0),
|
|
5219
5218
|
s.canExport ? (c(), d("button", {
|
|
5220
5219
|
key: 1,
|
|
5221
5220
|
type: "button",
|
|
5222
5221
|
class: "wm-mm__item",
|
|
5223
|
-
onClick: t[2] || (t[2] = (
|
|
5222
|
+
onClick: t[2] || (t[2] = (r) => n.emit("export"))
|
|
5224
5223
|
}, [
|
|
5225
|
-
t[7] || (t[7] =
|
|
5226
|
-
|
|
5224
|
+
t[7] || (t[7] = o("span", { class: "wm-mm__icon" }, [
|
|
5225
|
+
o("svg", {
|
|
5227
5226
|
width: "12",
|
|
5228
5227
|
height: "12",
|
|
5229
5228
|
viewBox: "0 0 24 24",
|
|
@@ -5234,22 +5233,22 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5234
5233
|
"stroke-linejoin": "round",
|
|
5235
5234
|
"aria-hidden": "true"
|
|
5236
5235
|
}, [
|
|
5237
|
-
|
|
5236
|
+
o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
5238
5237
|
])
|
|
5239
5238
|
], -1)),
|
|
5240
|
-
|
|
5241
|
-
t[8] || (t[8] =
|
|
5242
|
-
])) :
|
|
5243
|
-
])) :
|
|
5244
|
-
s.canRename || s.canExport ? (c(), d("div", La)) :
|
|
5245
|
-
|
|
5246
|
-
|
|
5239
|
+
o("span", Ra, v(n.t("moreMenu.exportTranscript")), 1),
|
|
5240
|
+
t[8] || (t[8] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
5241
|
+
])) : b("", !0)
|
|
5242
|
+
])) : b("", !0),
|
|
5243
|
+
s.canRename || s.canExport ? (c(), d("div", La)) : b("", !0),
|
|
5244
|
+
o("div", Ia, [
|
|
5245
|
+
o("button", {
|
|
5247
5246
|
type: "button",
|
|
5248
5247
|
class: "wm-mm__item",
|
|
5249
|
-
onClick: t[3] || (t[3] = (...
|
|
5248
|
+
onClick: t[3] || (t[3] = (...r) => n.toggleSound && n.toggleSound(...r))
|
|
5250
5249
|
}, [
|
|
5251
|
-
t[10] || (t[10] =
|
|
5252
|
-
|
|
5250
|
+
t[10] || (t[10] = o("span", { class: "wm-mm__icon" }, [
|
|
5251
|
+
o("svg", {
|
|
5253
5252
|
width: "12",
|
|
5254
5253
|
height: "12",
|
|
5255
5254
|
viewBox: "0 0 24 24",
|
|
@@ -5260,28 +5259,28 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5260
5259
|
"stroke-linejoin": "round",
|
|
5261
5260
|
"aria-hidden": "true"
|
|
5262
5261
|
}, [
|
|
5263
|
-
|
|
5264
|
-
|
|
5262
|
+
o("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
|
|
5263
|
+
o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
5265
5264
|
])
|
|
5266
5265
|
], -1)),
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
class:
|
|
5266
|
+
o("span", Ea, v(n.t("moreMenu.sound")), 1),
|
|
5267
|
+
o("span", {
|
|
5268
|
+
class: R(["wm-mm__toggle", { "wm-mm__toggle--on": a.soundOn }])
|
|
5270
5269
|
}, [...t[9] || (t[9] = [
|
|
5271
|
-
|
|
5270
|
+
o("span", { class: "wm-mm__knob" }, null, -1)
|
|
5272
5271
|
])], 2)
|
|
5273
5272
|
])
|
|
5274
5273
|
]),
|
|
5275
|
-
t[13] || (t[13] =
|
|
5276
|
-
|
|
5274
|
+
t[13] || (t[13] = o("div", { class: "wm-mm__sep" }, null, -1)),
|
|
5275
|
+
o("div", Ba, [
|
|
5277
5276
|
s.statusUrl ? (c(), d("button", {
|
|
5278
5277
|
key: 0,
|
|
5279
5278
|
type: "button",
|
|
5280
5279
|
class: "wm-mm__item",
|
|
5281
|
-
onClick: t[4] || (t[4] = (
|
|
5280
|
+
onClick: t[4] || (t[4] = (r) => n.emit("status"))
|
|
5282
5281
|
}, [
|
|
5283
|
-
t[11] || (t[11] =
|
|
5284
|
-
|
|
5282
|
+
t[11] || (t[11] = o("span", { class: "wm-mm__icon" }, [
|
|
5283
|
+
o("svg", {
|
|
5285
5284
|
width: "12",
|
|
5286
5285
|
height: "12",
|
|
5287
5286
|
viewBox: "0 0 24 24",
|
|
@@ -5292,19 +5291,19 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5292
5291
|
"stroke-linejoin": "round",
|
|
5293
5292
|
"aria-hidden": "true"
|
|
5294
5293
|
}, [
|
|
5295
|
-
|
|
5294
|
+
o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
5296
5295
|
])
|
|
5297
5296
|
], -1)),
|
|
5298
|
-
|
|
5299
|
-
])) :
|
|
5297
|
+
o("span", Pa, v(n.t("moreMenu.serviceStatus")), 1)
|
|
5298
|
+
])) : b("", !0),
|
|
5300
5299
|
s.helpUrl ? (c(), d("button", {
|
|
5301
5300
|
key: 1,
|
|
5302
5301
|
type: "button",
|
|
5303
5302
|
class: "wm-mm__item",
|
|
5304
|
-
onClick: t[5] || (t[5] = (
|
|
5303
|
+
onClick: t[5] || (t[5] = (r) => n.emit("help"))
|
|
5305
5304
|
}, [
|
|
5306
|
-
t[12] || (t[12] =
|
|
5307
|
-
|
|
5305
|
+
t[12] || (t[12] = o("span", { class: "wm-mm__icon" }, [
|
|
5306
|
+
o("svg", {
|
|
5308
5307
|
width: "12",
|
|
5309
5308
|
height: "12",
|
|
5310
5309
|
viewBox: "0 0 24 24",
|
|
@@ -5315,16 +5314,16 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5315
5314
|
"stroke-linejoin": "round",
|
|
5316
5315
|
"aria-hidden": "true"
|
|
5317
5316
|
}, [
|
|
5318
|
-
|
|
5317
|
+
o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
|
|
5319
5318
|
])
|
|
5320
5319
|
], -1)),
|
|
5321
|
-
|
|
5322
|
-
])) :
|
|
5320
|
+
o("span", Da, v(n.t("moreMenu.helpCenter")), 1)
|
|
5321
|
+
])) : b("", !0)
|
|
5323
5322
|
])
|
|
5324
5323
|
])
|
|
5325
5324
|
]);
|
|
5326
5325
|
}
|
|
5327
|
-
const
|
|
5326
|
+
const Ua = /* @__PURE__ */ P(Sa, [["render", Na], ["__scopeId", "data-v-4cf6d578"]]), ja = {
|
|
5328
5327
|
name: "WmRenameDialog",
|
|
5329
5328
|
inject: {
|
|
5330
5329
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5371,22 +5370,22 @@ const Da = /* @__PURE__ */ N(Sa, [["render", Ua], ["__scopeId", "data-v-4cf6d578
|
|
|
5371
5370
|
role: "dialog",
|
|
5372
5371
|
"aria-modal": "true"
|
|
5373
5372
|
}, 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"];
|
|
5374
|
-
function Ya(e, t, s,
|
|
5373
|
+
function Ya(e, t, s, i, a, n) {
|
|
5375
5374
|
return c(), d("div", Fa, [
|
|
5376
|
-
|
|
5375
|
+
o("div", {
|
|
5377
5376
|
class: "wm-dialog__scrim",
|
|
5378
|
-
onClick: t[0] || (t[0] = (
|
|
5377
|
+
onClick: t[0] || (t[0] = (r) => e.$emit("close"))
|
|
5379
5378
|
}),
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5379
|
+
o("div", Ha, [
|
|
5380
|
+
o("div", za, [
|
|
5381
|
+
o("div", qa, v(s.title || n.t("rename.title")), 1),
|
|
5382
|
+
o("button", {
|
|
5384
5383
|
type: "button",
|
|
5385
5384
|
class: "wm-dialog__close",
|
|
5386
5385
|
"aria-label": n.t("common.close"),
|
|
5387
|
-
onClick: t[1] || (t[1] = (
|
|
5386
|
+
onClick: t[1] || (t[1] = (r) => e.$emit("close"))
|
|
5388
5387
|
}, [...t[7] || (t[7] = [
|
|
5389
|
-
|
|
5388
|
+
o("svg", {
|
|
5390
5389
|
width: "12",
|
|
5391
5390
|
height: "12",
|
|
5392
5391
|
viewBox: "0 0 24 24",
|
|
@@ -5397,43 +5396,43 @@ function Ya(e, t, s, r, i, n) {
|
|
|
5397
5396
|
"stroke-linejoin": "round",
|
|
5398
5397
|
"aria-hidden": "true"
|
|
5399
5398
|
}, [
|
|
5400
|
-
|
|
5399
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5401
5400
|
], -1)
|
|
5402
5401
|
])], 8, Va)
|
|
5403
5402
|
]),
|
|
5404
|
-
|
|
5405
|
-
G(
|
|
5403
|
+
o("div", Ka, [
|
|
5404
|
+
G(o("input", {
|
|
5406
5405
|
ref: "input",
|
|
5407
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
5406
|
+
"onUpdate:modelValue": t[2] || (t[2] = (r) => a.value = r),
|
|
5408
5407
|
type: "text",
|
|
5409
5408
|
class: "wm-dialog__input",
|
|
5410
5409
|
placeholder: s.placeholder || n.t("rename.placeholder"),
|
|
5411
5410
|
maxlength: 120,
|
|
5412
5411
|
onKeydown: [
|
|
5413
|
-
t[3] || (t[3] = ge(J((...
|
|
5414
|
-
t[4] || (t[4] = ge(J((
|
|
5412
|
+
t[3] || (t[3] = ge(J((...r) => n.onSubmit && n.onSubmit(...r), ["prevent"]), ["enter"])),
|
|
5413
|
+
t[4] || (t[4] = ge(J((r) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5415
5414
|
]
|
|
5416
5415
|
}, null, 40, Wa), [
|
|
5417
|
-
[te,
|
|
5416
|
+
[te, a.value]
|
|
5418
5417
|
])
|
|
5419
5418
|
]),
|
|
5420
|
-
|
|
5421
|
-
|
|
5419
|
+
o("div", $a, [
|
|
5420
|
+
o("button", {
|
|
5422
5421
|
type: "button",
|
|
5423
5422
|
class: "wm-dialog__btn",
|
|
5424
|
-
onClick: t[5] || (t[5] = (
|
|
5423
|
+
onClick: t[5] || (t[5] = (r) => e.$emit("close"))
|
|
5425
5424
|
}, v(n.t("common.cancel")), 1),
|
|
5426
|
-
|
|
5425
|
+
o("button", {
|
|
5427
5426
|
type: "button",
|
|
5428
5427
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5429
5428
|
disabled: !n.canSubmit,
|
|
5430
|
-
onClick: t[6] || (t[6] = (...
|
|
5429
|
+
onClick: t[6] || (t[6] = (...r) => n.onSubmit && n.onSubmit(...r))
|
|
5431
5430
|
}, v(n.t("common.save")), 9, Ga)
|
|
5432
5431
|
])
|
|
5433
5432
|
])
|
|
5434
5433
|
]);
|
|
5435
5434
|
}
|
|
5436
|
-
const Ja = /* @__PURE__ */
|
|
5435
|
+
const Ja = /* @__PURE__ */ P(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8"]]), Ne = "ww-messenger-tokens", Xa = {
|
|
5437
5436
|
name: "Messenger",
|
|
5438
5437
|
components: {
|
|
5439
5438
|
Launcher: qt,
|
|
@@ -5443,10 +5442,10 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5443
5442
|
MessageList: ri,
|
|
5444
5443
|
Composer: Ci,
|
|
5445
5444
|
SuggestionChips: Mi,
|
|
5446
|
-
ApprovalCard:
|
|
5445
|
+
ApprovalCard: Ni,
|
|
5447
5446
|
FormCard: da,
|
|
5448
5447
|
Feedback: Aa,
|
|
5449
|
-
MoreMenu:
|
|
5448
|
+
MoreMenu: Ua,
|
|
5450
5449
|
RenameDialog: Ja
|
|
5451
5450
|
},
|
|
5452
5451
|
mixins: [
|
|
@@ -5609,9 +5608,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5609
5608
|
// so the choice applies immediately, before the boot round-trip
|
|
5610
5609
|
// that materializes `state.customer` has completed.
|
|
5611
5610
|
customerLanguage() {
|
|
5612
|
-
var s,
|
|
5613
|
-
const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((
|
|
5614
|
-
return t || ((n = (
|
|
5611
|
+
var s, i, a, n;
|
|
5612
|
+
const e = (s = this.s) == null ? void 0 : s.customer, t = e && (e.language || ((i = e.values) == null ? void 0 : i.language));
|
|
5613
|
+
return t || ((n = (a = this.context) == null ? void 0 : a.customer) == null ? void 0 : n.language) || "";
|
|
5615
5614
|
},
|
|
5616
5615
|
// Resolved UI language, by priority:
|
|
5617
5616
|
// 1. explicit `language` prop (consumer override)
|
|
@@ -5658,33 +5657,33 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5658
5657
|
drawerConversations() {
|
|
5659
5658
|
var s;
|
|
5660
5659
|
const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
|
|
5661
|
-
return this.allConversations.map((
|
|
5662
|
-
var
|
|
5663
|
-
const
|
|
5664
|
-
let
|
|
5665
|
-
for (let y =
|
|
5666
|
-
const
|
|
5667
|
-
if (!
|
|
5668
|
-
if (((
|
|
5669
|
-
const E = Y(
|
|
5660
|
+
return this.allConversations.map((i) => {
|
|
5661
|
+
var k;
|
|
5662
|
+
const a = e[i.id] || [], n = Y(i.last_read_message_id);
|
|
5663
|
+
let r = 0, l = null;
|
|
5664
|
+
for (let y = a.length - 1; y >= 0; y--) {
|
|
5665
|
+
const M = a[y];
|
|
5666
|
+
if (!M) continue;
|
|
5667
|
+
if (((k = M.author) == null ? void 0 : k.type) === "user") break;
|
|
5668
|
+
const E = Y(M.id);
|
|
5670
5669
|
if (E != null) {
|
|
5671
5670
|
if (n != null && E <= n) break;
|
|
5672
|
-
t[
|
|
5671
|
+
t[M.id] !== 0 && (!l && M.author && (l = M.author), r++);
|
|
5673
5672
|
}
|
|
5674
5673
|
}
|
|
5675
|
-
if (!
|
|
5676
|
-
const y = Y(
|
|
5677
|
-
y != null && (n == null || y > n) && (
|
|
5674
|
+
if (!a.length) {
|
|
5675
|
+
const y = Y(i.last_message_id);
|
|
5676
|
+
y != null && (n == null || y > n) && (r = 1, l = i.last_message_author || null);
|
|
5678
5677
|
}
|
|
5679
|
-
const f =
|
|
5678
|
+
const f = a.filter(
|
|
5680
5679
|
(y) => !((y == null ? void 0 : y.id) != null && t[y.id] === 0)
|
|
5681
5680
|
);
|
|
5682
5681
|
return {
|
|
5683
|
-
...
|
|
5684
|
-
_preview: _t(
|
|
5685
|
-
_unread:
|
|
5686
|
-
_unreadCount:
|
|
5687
|
-
_lastAuthor:
|
|
5682
|
+
...i,
|
|
5683
|
+
_preview: _t(i, f),
|
|
5684
|
+
_unread: r > 0,
|
|
5685
|
+
_unreadCount: r,
|
|
5686
|
+
_lastAuthor: l
|
|
5688
5687
|
};
|
|
5689
5688
|
});
|
|
5690
5689
|
},
|
|
@@ -5706,7 +5705,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5706
5705
|
unread: !!s._unread,
|
|
5707
5706
|
author: s._lastAuthor || null,
|
|
5708
5707
|
_ts: Be(s, e[s.id] || [])
|
|
5709
|
-
})).sort((s,
|
|
5708
|
+
})).sort((s, i) => s._ts < i._ts ? 1 : s._ts > i._ts ? -1 : 0);
|
|
5710
5709
|
},
|
|
5711
5710
|
// Unread threads (one entry per conv with unseen agent/human
|
|
5712
5711
|
// activity), freshest first. Each entry carries everything the
|
|
@@ -5715,19 +5714,19 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5715
5714
|
latestUnreads() {
|
|
5716
5715
|
var s;
|
|
5717
5716
|
const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
|
|
5718
|
-
for (const
|
|
5719
|
-
if (!
|
|
5720
|
-
const
|
|
5717
|
+
for (const i of this.drawerConversations) {
|
|
5718
|
+
if (!i._unread) continue;
|
|
5719
|
+
const a = Be(i, e[i.id] || []), n = i._lastAuthor, r = !n || n.type === "agent_ia", l = (n == null ? void 0 : n.name) || (r ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (r ? this.agentAvatarUrl : null);
|
|
5721
5720
|
t.push({
|
|
5722
|
-
convId:
|
|
5723
|
-
preview:
|
|
5724
|
-
ts:
|
|
5725
|
-
count:
|
|
5726
|
-
senderName:
|
|
5721
|
+
convId: i.id,
|
|
5722
|
+
preview: i._preview || this.t("notification.youHaveNewMessage"),
|
|
5723
|
+
ts: a,
|
|
5724
|
+
count: i._unreadCount || 1,
|
|
5725
|
+
senderName: l,
|
|
5727
5726
|
senderAvatarUrl: f
|
|
5728
5727
|
});
|
|
5729
5728
|
}
|
|
5730
|
-
return t.sort((
|
|
5729
|
+
return t.sort((i, a) => i.ts < a.ts ? 1 : i.ts > a.ts ? -1 : 0), t;
|
|
5731
5730
|
},
|
|
5732
5731
|
// Notification cards shown in the closed-launcher stack: the unread
|
|
5733
5732
|
// threads above, minus any the user has dismissed (×) for their
|
|
@@ -5763,7 +5762,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5763
5762
|
var s;
|
|
5764
5763
|
const e = (s = this.widget) == null ? void 0 : s.quick_links;
|
|
5765
5764
|
if (!Array.isArray(e)) return "";
|
|
5766
|
-
const t = e.find((
|
|
5765
|
+
const t = e.find((i) => i.icon === "status" && i.url);
|
|
5767
5766
|
return (t == null ? void 0 : t.url) || "";
|
|
5768
5767
|
},
|
|
5769
5768
|
helpUrl() {
|
|
@@ -5771,7 +5770,7 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5771
5770
|
const e = (s = this.widget) == null ? void 0 : s.quick_links;
|
|
5772
5771
|
if (!Array.isArray(e)) return "";
|
|
5773
5772
|
const t = e.find(
|
|
5774
|
-
(
|
|
5773
|
+
(i) => (i.icon === "chat" || i.icon === "help") && i.url
|
|
5775
5774
|
);
|
|
5776
5775
|
return (t == null ? void 0 : t.url) || "";
|
|
5777
5776
|
},
|
|
@@ -5838,12 +5837,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5838
5837
|
// Last message from a human agent in the current conversation —
|
|
5839
5838
|
// used to surface the human agent's name + avatar in the header.
|
|
5840
5839
|
humanMessageAuthor() {
|
|
5841
|
-
var t, s,
|
|
5840
|
+
var t, s, i;
|
|
5842
5841
|
if (!this.currentConv) return null;
|
|
5843
5842
|
const e = ((t = this.s.messagesByConv) == null ? void 0 : t[this.currentConv.id]) || [];
|
|
5844
|
-
for (let
|
|
5845
|
-
if (((
|
|
5846
|
-
return e[
|
|
5843
|
+
for (let a = e.length - 1; a >= 0; a--)
|
|
5844
|
+
if (((i = (s = e[a]) == null ? void 0 : s.author) == null ? void 0 : i.type) === "agent_human")
|
|
5845
|
+
return e[a].author;
|
|
5847
5846
|
return null;
|
|
5848
5847
|
},
|
|
5849
5848
|
humanAgentName() {
|
|
@@ -5891,37 +5890,37 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5891
5890
|
}) : this.isWaitingHuman ? this.t("composer.agentTakingOver") : this.t("composer.placeholder");
|
|
5892
5891
|
},
|
|
5893
5892
|
displayedMessages() {
|
|
5894
|
-
var
|
|
5893
|
+
var a, n;
|
|
5895
5894
|
const e = this.currentConv;
|
|
5896
5895
|
if (!e) return [];
|
|
5897
5896
|
const t = this.welcomeRevealedAt[e.id] > 0 ? this.buildWelcomePrefix(e) : [];
|
|
5898
5897
|
if (!e._draft) {
|
|
5899
|
-
const
|
|
5900
|
-
if (!(
|
|
5898
|
+
const r = (n = (a = this.s) == null ? void 0 : a.paginationByConv) == null ? void 0 : n[e.id];
|
|
5899
|
+
if (!(r != null && r.loaded)) return t;
|
|
5901
5900
|
}
|
|
5902
|
-
const s = this.revealedAt,
|
|
5903
|
-
var
|
|
5904
|
-
return (
|
|
5901
|
+
const s = this.revealedAt, i = (this.s.messagesByConv[e.id] || []).filter((r) => {
|
|
5902
|
+
var l, f, k, y, M;
|
|
5903
|
+
return (r == null ? void 0 : r.type) === "action" && ((l = r == null ? void 0 : r.payload) == null ? void 0 : l.state) === "pending" || he(r) && !(s[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((f = r == null ? void 0 : r.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = r == null ? void 0 : r.payload) == null ? void 0 : k.attachments) && r.payload.attachments.length || (y = r == null ? void 0 : r.metadata) != null && y.artifact || (M = r == null ? void 0 : r.metadata) != null && M.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
5905
5904
|
});
|
|
5906
|
-
return t.length ? [...t, ...
|
|
5905
|
+
return t.length ? [...t, ...i] : i;
|
|
5907
5906
|
},
|
|
5908
5907
|
// True whenever we should show the "typing" indicator at the bottom
|
|
5909
5908
|
// of the list: either the LLM is actively streaming tokens, or one
|
|
5910
5909
|
// or more agent messages are queued and waiting for their reveal
|
|
5911
5910
|
// slot to fire.
|
|
5912
5911
|
streamingActive() {
|
|
5913
|
-
var s,
|
|
5912
|
+
var s, i, a;
|
|
5914
5913
|
const e = this.currentConv;
|
|
5915
|
-
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 : (((
|
|
5914
|
+
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 : (((a = (i = this.s) == null ? void 0 : i.messagesByConv) == null ? void 0 : a[e.id]) || []).some(
|
|
5916
5915
|
(n) => he(n) && !(this.revealedAt[n.id] > 0)
|
|
5917
5916
|
) : !1;
|
|
5918
5917
|
},
|
|
5919
5918
|
// Internal: the raw persisted list for the current conversation. We
|
|
5920
5919
|
// watch this to detect new agent messages that need to be paced.
|
|
5921
5920
|
currentConvMessages() {
|
|
5922
|
-
var t, s,
|
|
5921
|
+
var t, s, i;
|
|
5923
5922
|
const e = (t = this.currentConv) == null ? void 0 : t.id;
|
|
5924
|
-
return e ? ((
|
|
5923
|
+
return e ? ((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e]) || [] : [];
|
|
5925
5924
|
},
|
|
5926
5925
|
pendingApproval() {
|
|
5927
5926
|
return !this.currentConv || !this.store || this.actionInFlight ? null : this.store.getPendingApproval(this.currentConv.id);
|
|
@@ -5930,13 +5929,13 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5930
5929
|
// `metadata.resolution_request` dont les callbacks ne sont pas encore
|
|
5931
5930
|
// consommés (le serveur les clear au clic) et sans clic optimiste en vol.
|
|
5932
5931
|
pendingResolution() {
|
|
5933
|
-
var t, s,
|
|
5932
|
+
var t, s, i, a, n;
|
|
5934
5933
|
if (!this.currentConv || !this.store || this.actionInFlight || this.pendingApproval) return null;
|
|
5935
5934
|
const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
|
|
5936
|
-
for (let
|
|
5937
|
-
const
|
|
5938
|
-
if ((
|
|
5939
|
-
return !Array.isArray(
|
|
5935
|
+
for (let r = e.length - 1; r >= 0; r--) {
|
|
5936
|
+
const l = e[r];
|
|
5937
|
+
if ((i = l == null ? void 0 : l.metadata) != null && i.resolution_request)
|
|
5938
|
+
return !Array.isArray(l.callbacks) || !l.callbacks.length || (n = (a = this.s) == null ? void 0 : a.awaitingCallback) != null && n[l.id] ? null : l;
|
|
5940
5939
|
}
|
|
5941
5940
|
return null;
|
|
5942
5941
|
},
|
|
@@ -5952,14 +5951,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5952
5951
|
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");
|
|
5953
5952
|
},
|
|
5954
5953
|
approvalDetail() {
|
|
5955
|
-
var
|
|
5956
|
-
const e = (n = (
|
|
5954
|
+
var i, a, n, r, l, f;
|
|
5955
|
+
const e = (n = (a = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : a.pending) == null ? void 0 : n.user_explanation;
|
|
5957
5956
|
if (typeof e == "string" && e.trim())
|
|
5958
5957
|
return e.trim();
|
|
5959
|
-
const t = (f = (
|
|
5958
|
+
const t = (f = (l = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : l.pending) == null ? void 0 : f.prepared_params;
|
|
5960
5959
|
if (!t || typeof t != "object") return "";
|
|
5961
5960
|
const s = Object.entries(t);
|
|
5962
|
-
return s.length ? s.slice(0, 2).map(([
|
|
5961
|
+
return s.length ? s.slice(0, 2).map(([k, y]) => `${k}: ${y}`).join(" · ") : "";
|
|
5963
5962
|
},
|
|
5964
5963
|
actionInFlight() {
|
|
5965
5964
|
var e, t;
|
|
@@ -5979,9 +5978,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5979
5978
|
// welcome bubble is client-side only and intentionally not
|
|
5980
5979
|
// counted here.
|
|
5981
5980
|
conversationIsEmpty() {
|
|
5982
|
-
var s,
|
|
5981
|
+
var s, i;
|
|
5983
5982
|
const e = this.currentConv;
|
|
5984
|
-
return e ? e._draft ? !0 : (((
|
|
5983
|
+
return e ? e._draft ? !0 : (((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || []).length === 0 : !1;
|
|
5985
5984
|
},
|
|
5986
5985
|
// Maps `widget.starter_prompts` ({ title, message }) into the
|
|
5987
5986
|
// SuggestionChips shape so they render alongside / in place of
|
|
@@ -5994,14 +5993,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
5994
5993
|
const e = (s = this.widget) == null ? void 0 : s.starter_prompts;
|
|
5995
5994
|
if (!Array.isArray(e)) return [];
|
|
5996
5995
|
const t = [];
|
|
5997
|
-
for (const
|
|
5998
|
-
if (!
|
|
5999
|
-
const
|
|
6000
|
-
if (!
|
|
6001
|
-
const n = typeof
|
|
5996
|
+
for (const i of e) {
|
|
5997
|
+
if (!i || typeof i != "object") continue;
|
|
5998
|
+
const a = typeof i.title == "string" ? i.title.trim() : "";
|
|
5999
|
+
if (!a) continue;
|
|
6000
|
+
const n = typeof i.message == "string" ? i.message.trim() : "";
|
|
6002
6001
|
t.push({
|
|
6003
|
-
label:
|
|
6004
|
-
text: n ||
|
|
6002
|
+
label: a,
|
|
6003
|
+
text: n || a,
|
|
6005
6004
|
kind: "starter"
|
|
6006
6005
|
});
|
|
6007
6006
|
}
|
|
@@ -6022,17 +6021,17 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6022
6021
|
return e ? this.feedbackDone ? !0 : e.status !== "resolved" ? !1 : !((t = e.metadata) != null && t.feedback) : !1;
|
|
6023
6022
|
},
|
|
6024
6023
|
floatVisible() {
|
|
6025
|
-
return this.approvalReady || !!this.
|
|
6024
|
+
return this.approvalReady || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
|
|
6026
6025
|
},
|
|
6027
6026
|
dateLabel() {
|
|
6028
|
-
var s,
|
|
6027
|
+
var s, i, a;
|
|
6029
6028
|
const e = this.currentConv;
|
|
6030
6029
|
let t = /* @__PURE__ */ new Date();
|
|
6031
6030
|
if (e) {
|
|
6032
|
-
const
|
|
6033
|
-
if (
|
|
6034
|
-
const
|
|
6035
|
-
Number.isNaN(
|
|
6031
|
+
const r = ((a = (((i = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : a.created_at) || e.created_at;
|
|
6032
|
+
if (r) {
|
|
6033
|
+
const l = new Date(r);
|
|
6034
|
+
Number.isNaN(l.getTime()) || (t = l);
|
|
6036
6035
|
}
|
|
6037
6036
|
}
|
|
6038
6037
|
return this.t("messageList.today", {
|
|
@@ -6044,8 +6043,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6044
6043
|
// history available, nothing loading) so the loader stays inert
|
|
6045
6044
|
// until `openConversation` has populated the entry.
|
|
6046
6045
|
paginationState() {
|
|
6047
|
-
var s,
|
|
6048
|
-
const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (
|
|
6046
|
+
var s, i, a;
|
|
6047
|
+
const e = (s = this.currentConv) == null ? void 0 : s.id, t = e ? (a = (i = this.s) == null ? void 0 : i.paginationByConv) == null ? void 0 : a[e] : null;
|
|
6049
6048
|
return {
|
|
6050
6049
|
loading: !!(t != null && t.loading),
|
|
6051
6050
|
hasMore: !!(t != null && t.nextCursor)
|
|
@@ -6060,13 +6059,13 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6060
6059
|
// ts comparison in `launcherPeeks`.
|
|
6061
6060
|
latestUnreads: {
|
|
6062
6061
|
handler(e) {
|
|
6063
|
-
const t = new Set(e.map((
|
|
6064
|
-
if (!
|
|
6065
|
-
const
|
|
6062
|
+
const t = new Set(e.map((r) => r.convId)), s = this.dismissedPeeks || {}, i = Object.keys(s);
|
|
6063
|
+
if (!i.length) return;
|
|
6064
|
+
const a = {};
|
|
6066
6065
|
let n = !1;
|
|
6067
|
-
for (const
|
|
6068
|
-
t.has(
|
|
6069
|
-
n && (this.dismissedPeeks =
|
|
6066
|
+
for (const r of i)
|
|
6067
|
+
t.has(r) ? a[r] = s[r] : n = !0;
|
|
6068
|
+
n && (this.dismissedPeeks = a);
|
|
6070
6069
|
},
|
|
6071
6070
|
deep: !0
|
|
6072
6071
|
},
|
|
@@ -6141,9 +6140,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6141
6140
|
}
|
|
6142
6141
|
},
|
|
6143
6142
|
async mounted() {
|
|
6144
|
-
if (typeof document < "u" && !document.getElementById(
|
|
6143
|
+
if (typeof document < "u" && !document.getElementById(Ne)) {
|
|
6145
6144
|
const e = document.createElement("style");
|
|
6146
|
-
e.id =
|
|
6145
|
+
e.id = Ne, e.textContent = rt, document.head.appendChild(e);
|
|
6147
6146
|
}
|
|
6148
6147
|
this._parentMessageHandler = this.onParentMessage.bind(this), window.addEventListener("message", this._parentMessageHandler), window.parent && window.parent !== window && window.parent.postMessage({ type: "READY" }, "*"), this.isEmbedded ? (await this.boot(), this.store && await this.open()) : (await this.$nextTick(), this.sendCurrentLauncherSize(), this.observeLauncherSize());
|
|
6149
6148
|
},
|
|
@@ -6179,8 +6178,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6179
6178
|
const t = e == null ? void 0 : e.data;
|
|
6180
6179
|
if (!(!t || typeof t != "object")) {
|
|
6181
6180
|
if (t.type === "UPDATE") {
|
|
6182
|
-
this.transport && t.payload && this.transport.update(t.payload).catch((
|
|
6183
|
-
console.warn("[messenger] update failed",
|
|
6181
|
+
this.transport && t.payload && this.transport.update(t.payload).catch((i) => {
|
|
6182
|
+
console.warn("[messenger] update failed", i);
|
|
6184
6183
|
});
|
|
6185
6184
|
return;
|
|
6186
6185
|
}
|
|
@@ -6188,8 +6187,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6188
6187
|
this.transport && t.payload && this.transport.context(t.payload);
|
|
6189
6188
|
return;
|
|
6190
6189
|
}
|
|
6191
|
-
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((
|
|
6192
|
-
console.warn("[messenger] eager boot failed",
|
|
6190
|
+
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((i) => {
|
|
6191
|
+
console.warn("[messenger] eager boot failed", i);
|
|
6193
6192
|
}));
|
|
6194
6193
|
}
|
|
6195
6194
|
},
|
|
@@ -6209,12 +6208,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6209
6208
|
return;
|
|
6210
6209
|
}
|
|
6211
6210
|
try {
|
|
6212
|
-
await this.waitForParentInit(), this.transport =
|
|
6211
|
+
await this.waitForParentInit(), this.transport = Re(
|
|
6213
6212
|
Ze({
|
|
6214
6213
|
baseUrl: this.baseUrl,
|
|
6215
6214
|
widgetId: this.widgetId
|
|
6216
6215
|
})
|
|
6217
|
-
), this.store =
|
|
6216
|
+
), this.store = Re(st(this.transport)), this.hydrateNotifPref();
|
|
6218
6217
|
const e = this.parentVariables || this.context || null;
|
|
6219
6218
|
if (await this.store.start({
|
|
6220
6219
|
origin: this.parentOrigin,
|
|
@@ -6223,8 +6222,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6223
6222
|
variables: e && typeof e == "object" ? e : void 0
|
|
6224
6223
|
}), e && typeof e == "object") {
|
|
6225
6224
|
const t = {};
|
|
6226
|
-
for (const [s,
|
|
6227
|
-
s !== "customer" &&
|
|
6225
|
+
for (const [s, i] of Object.entries(e))
|
|
6226
|
+
s !== "customer" && i && typeof i == "object" && !Array.isArray(i) && (t[s] = i);
|
|
6228
6227
|
Object.keys(t).length > 0 && this.transport.context(t);
|
|
6229
6228
|
}
|
|
6230
6229
|
this.setupLiveReveal();
|
|
@@ -6250,12 +6249,12 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6250
6249
|
return;
|
|
6251
6250
|
}
|
|
6252
6251
|
this.floatRO = new ResizeObserver((s) => {
|
|
6253
|
-
const
|
|
6254
|
-
if (!
|
|
6255
|
-
const
|
|
6256
|
-
|
|
6257
|
-
var n,
|
|
6258
|
-
(
|
|
6252
|
+
const i = s[0];
|
|
6253
|
+
if (!i) return;
|
|
6254
|
+
const a = Math.ceil(i.contentRect.height + 8);
|
|
6255
|
+
a !== this.floatHeight && (this.floatHeight = a, this.$nextTick(() => {
|
|
6256
|
+
var n, r;
|
|
6257
|
+
(r = (n = this.$refs.messageList) == null ? void 0 : n.scrollToBottom) == null || r.call(n);
|
|
6259
6258
|
}));
|
|
6260
6259
|
}), this.floatRO.observe(t);
|
|
6261
6260
|
}
|
|
@@ -6309,37 +6308,37 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6309
6308
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
6310
6309
|
},
|
|
6311
6310
|
sendCurrentLauncherSize() {
|
|
6312
|
-
var y,
|
|
6311
|
+
var y, M, E, A, q, T, N;
|
|
6313
6312
|
if (this.isOpen) return;
|
|
6314
|
-
const e = (
|
|
6313
|
+
const e = (M = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : M.call(y, ".wm-launcherWrap");
|
|
6315
6314
|
if (!e) return;
|
|
6316
6315
|
const t = e.getBoundingClientRect();
|
|
6317
6316
|
if (!t.width || !t.height) return;
|
|
6318
|
-
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0,
|
|
6319
|
-
let
|
|
6317
|
+
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, i = 16, a = Math.ceil(t.width), n = Math.ceil(t.height), r = (q = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : q.call(A, ".wm-launcher"), l = (N = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : N.call(T, ".wm-peek"), f = l && l.length ? l[l.length - 1] : null;
|
|
6318
|
+
let k = null;
|
|
6320
6319
|
if (f) {
|
|
6321
|
-
const
|
|
6322
|
-
|
|
6323
|
-
width: Math.ceil(
|
|
6324
|
-
height: Math.ceil(
|
|
6325
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
6326
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
6320
|
+
const U = f.getBoundingClientRect();
|
|
6321
|
+
k = {
|
|
6322
|
+
width: Math.ceil(U.width),
|
|
6323
|
+
height: Math.ceil(U.height),
|
|
6324
|
+
rightOffset: Math.max(0, Math.ceil(t.right - U.right)),
|
|
6325
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - U.bottom))
|
|
6327
6326
|
};
|
|
6328
6327
|
}
|
|
6329
6328
|
this.notifyParentResize("closed", {
|
|
6330
|
-
width:
|
|
6331
|
-
height: n +
|
|
6332
|
-
launcherWidth: (
|
|
6333
|
-
launcherHeight: (
|
|
6329
|
+
width: a + i,
|
|
6330
|
+
height: n + i,
|
|
6331
|
+
launcherWidth: (r == null ? void 0 : r.offsetWidth) || null,
|
|
6332
|
+
launcherHeight: (r == null ? void 0 : r.offsetHeight) || null,
|
|
6334
6333
|
launcherHovered: this.launcherHovered,
|
|
6335
|
-
peek:
|
|
6334
|
+
peek: k,
|
|
6336
6335
|
peekHovered: this.launcherHovered && s
|
|
6337
6336
|
});
|
|
6338
6337
|
},
|
|
6339
6338
|
observeLauncherSize() {
|
|
6340
|
-
var s,
|
|
6339
|
+
var s, i;
|
|
6341
6340
|
if (typeof ResizeObserver > "u") return;
|
|
6342
|
-
const e = (
|
|
6341
|
+
const e = (i = (s = this.$el) == null ? void 0 : s.querySelector) == null ? void 0 : i.call(s, ".wm-launcherWrap");
|
|
6343
6342
|
if (!e) return;
|
|
6344
6343
|
this._launcherRo && this._launcherRo.disconnect();
|
|
6345
6344
|
const t = new ResizeObserver(() => {
|
|
@@ -6350,9 +6349,9 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6350
6349
|
// Opening straight from a notification card: land on that card's
|
|
6351
6350
|
// thread rather than whatever was last active.
|
|
6352
6351
|
async openFromPeek(e) {
|
|
6353
|
-
var s,
|
|
6352
|
+
var s, i;
|
|
6354
6353
|
const t = e || ((s = this.latestUnreads[0]) == null ? void 0 : s.convId);
|
|
6355
|
-
t && t !== ((
|
|
6354
|
+
t && t !== ((i = this.currentConv) == null ? void 0 : i.id) && (this.draftConv = null, this.activeConvId = t, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = !1), await this.open();
|
|
6356
6355
|
},
|
|
6357
6356
|
// Stamp the dismissed batch ts for a single conv so its card
|
|
6358
6357
|
// disappears from the stack until a fresher message arrives.
|
|
@@ -6460,17 +6459,17 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6460
6459
|
...this.welcomeRevealedAt,
|
|
6461
6460
|
[e]: 0
|
|
6462
6461
|
};
|
|
6463
|
-
const
|
|
6464
|
-
|
|
6465
|
-
Math.max(
|
|
6466
|
-
),
|
|
6462
|
+
const a = this.revealPacing, n = t.trim().length, r = Math.min(
|
|
6463
|
+
a.maxTypingMs,
|
|
6464
|
+
Math.max(a.minTypingMs, n * a.msPerChar)
|
|
6465
|
+
), l = a.firstRevealDelayMs + r, f = setTimeout(() => {
|
|
6467
6466
|
this.welcomeRevealedAt = {
|
|
6468
6467
|
...this.welcomeRevealedAt,
|
|
6469
6468
|
[e]: Date.now()
|
|
6470
6469
|
};
|
|
6471
|
-
const
|
|
6472
|
-
delete
|
|
6473
|
-
},
|
|
6470
|
+
const k = { ...this.welcomeRevealTimers };
|
|
6471
|
+
delete k[e], this.welcomeRevealTimers = k;
|
|
6472
|
+
}, l);
|
|
6474
6473
|
this.welcomeRevealTimers = {
|
|
6475
6474
|
...this.welcomeRevealTimers,
|
|
6476
6475
|
[e]: f
|
|
@@ -6500,10 +6499,10 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6500
6499
|
this.draftConv = null, this.activeConvId = e.id, this.showOnboarding = !1, this.showHistory = !1, this.backToHistory = t;
|
|
6501
6500
|
try {
|
|
6502
6501
|
await this.store.openConversation(e.id);
|
|
6503
|
-
} catch (
|
|
6504
|
-
console.error("[ww-messenger] open conv failed",
|
|
6502
|
+
} catch (i) {
|
|
6503
|
+
console.error("[ww-messenger] open conv failed", i);
|
|
6505
6504
|
}
|
|
6506
|
-
const s = this.allConversations.find((
|
|
6505
|
+
const s = this.allConversations.find((i) => i.id === e.id);
|
|
6507
6506
|
s && this.markConvRead(s);
|
|
6508
6507
|
},
|
|
6509
6508
|
async onMoreAction(e) {
|
|
@@ -6547,8 +6546,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6547
6546
|
if (!(!s || s === t.name))
|
|
6548
6547
|
try {
|
|
6549
6548
|
await this.store.patchConversation(t.id, { name: s });
|
|
6550
|
-
} catch (
|
|
6551
|
-
console.error("[ww-messenger] rename failed",
|
|
6549
|
+
} catch (i) {
|
|
6550
|
+
console.error("[ww-messenger] rename failed", i);
|
|
6552
6551
|
}
|
|
6553
6552
|
},
|
|
6554
6553
|
// ── Send / suggestion / form / attach / feedback ────────────────
|
|
@@ -6556,14 +6555,14 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6556
6555
|
let t = this.currentConv;
|
|
6557
6556
|
if (!t && (this.startConv(), t = this.currentConv, !t) || t._draft && (t = await this.ensureRealConv(), !t))
|
|
6558
6557
|
return;
|
|
6559
|
-
const s = t.id,
|
|
6558
|
+
const s = t.id, i = this.pendingAttachments.slice();
|
|
6560
6559
|
this.pendingAttachments = [], this.unreadAnchorId = null, this.unreadBoundaryTs = "";
|
|
6561
|
-
const
|
|
6562
|
-
const { previewUrl:
|
|
6563
|
-
return
|
|
6560
|
+
const a = i.map((n) => {
|
|
6561
|
+
const { previewUrl: r, ...l } = n;
|
|
6562
|
+
return l;
|
|
6564
6563
|
});
|
|
6565
6564
|
await this.store.send(s, e, {
|
|
6566
|
-
attachments:
|
|
6565
|
+
attachments: a.length ? a : void 0
|
|
6567
6566
|
});
|
|
6568
6567
|
},
|
|
6569
6568
|
async onSuggestion(e) {
|
|
@@ -6588,8 +6587,8 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6588
6587
|
if (!(t != null && t.form)) return;
|
|
6589
6588
|
const s = ht(t.form, e, this.translator);
|
|
6590
6589
|
if (!s) return;
|
|
6591
|
-
let
|
|
6592
|
-
|
|
6590
|
+
let i = this.currentConv;
|
|
6591
|
+
i && (i._draft && (i = await this.ensureRealConv(), !i) || await this.store.send(i.id, s, {
|
|
6593
6592
|
metadata: {
|
|
6594
6593
|
artifact: mt(
|
|
6595
6594
|
t.form,
|
|
@@ -6617,23 +6616,23 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6617
6616
|
var t, s;
|
|
6618
6617
|
if (!(!e || !this.transport))
|
|
6619
6618
|
try {
|
|
6620
|
-
const
|
|
6619
|
+
const i = await this.transport.uploadAttachment(e), a = (i == null ? void 0 : i.type) === "image" || (e.type || "").toLowerCase().startsWith("image/") || ((i == null ? void 0 : i.mime_type) || "").toLowerCase().startsWith("image/");
|
|
6621
6620
|
let n = null;
|
|
6622
|
-
if (
|
|
6621
|
+
if (a)
|
|
6623
6622
|
try {
|
|
6624
|
-
n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t,
|
|
6623
|
+
n = await ((s = (t = this.store) == null ? void 0 : t.signAttachment) == null ? void 0 : s.call(t, i.path)) || null;
|
|
6625
6624
|
} catch {
|
|
6626
6625
|
}
|
|
6627
6626
|
this.pendingAttachments.push({
|
|
6628
|
-
type:
|
|
6629
|
-
path:
|
|
6627
|
+
type: i.type || "file",
|
|
6628
|
+
path: i.path,
|
|
6630
6629
|
name: e.name || this.t("attachment.fileFallbackName"),
|
|
6631
6630
|
mime_type: e.type,
|
|
6632
6631
|
size_bytes: e.size,
|
|
6633
6632
|
previewUrl: n
|
|
6634
6633
|
});
|
|
6635
|
-
} catch (
|
|
6636
|
-
console.error("[ww-messenger] attachment upload failed",
|
|
6634
|
+
} catch (i) {
|
|
6635
|
+
console.error("[ww-messenger] attachment upload failed", i);
|
|
6637
6636
|
}
|
|
6638
6637
|
},
|
|
6639
6638
|
// Délégation des clics sur les liens `<a href="#...">` rendus dans le
|
|
@@ -6728,41 +6727,41 @@ const Ja = /* @__PURE__ */ N(ja, [["render", Ya], ["__scopeId", "data-v-6d5f94a8
|
|
|
6728
6727
|
role: "status",
|
|
6729
6728
|
"aria-live": "polite"
|
|
6730
6729
|
}, po = { class: "wm-ended__lbl" };
|
|
6731
|
-
function vo(e, t, s,
|
|
6732
|
-
const
|
|
6730
|
+
function vo(e, t, s, i, a, n) {
|
|
6731
|
+
const r = B("Launcher"), l = B("Header"), f = B("History"), k = B("Onboarding"), y = B("MessageList"), M = B("ApprovalCard"), E = B("FormCard"), A = B("Feedback"), q = B("SuggestionChips"), T = B("Composer"), N = B("MoreMenu"), U = B("RenameDialog");
|
|
6733
6732
|
return c(), d("div", {
|
|
6734
|
-
class:
|
|
6733
|
+
class: R(["wm-root", `wm-root--${s.displayMode}`]),
|
|
6735
6734
|
style: z(n.rootStyle)
|
|
6736
6735
|
}, [
|
|
6737
|
-
!
|
|
6736
|
+
!a.isOpen && !n.isEmbedded ? (c(), D(r, {
|
|
6738
6737
|
key: 0,
|
|
6739
6738
|
"unread-count": n.unreadCount,
|
|
6740
6739
|
peeks: n.launcherPeeks,
|
|
6741
6740
|
onOpen: n.openFromPeek,
|
|
6742
6741
|
onDismiss: n.dismissPeek,
|
|
6743
6742
|
onHover: n.onLauncherHover
|
|
6744
|
-
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) :
|
|
6745
|
-
|
|
6743
|
+
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : b("", !0),
|
|
6744
|
+
a.isOpen || n.isEmbedded ? (c(), d("section", {
|
|
6746
6745
|
key: 1,
|
|
6747
|
-
class:
|
|
6746
|
+
class: R([
|
|
6748
6747
|
"wm-panel",
|
|
6749
6748
|
`wm-panel--${s.displayMode}`,
|
|
6750
6749
|
{ "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
|
|
6751
6750
|
]),
|
|
6752
|
-
style: z(
|
|
6751
|
+
style: z(a.floatHeight ? { "--wm-float-h": a.floatHeight + "px" } : null),
|
|
6753
6752
|
role: "dialog",
|
|
6754
6753
|
"aria-label": "Messenger",
|
|
6755
6754
|
onClick: t[7] || (t[7] = (...L) => n.onPanelClick && n.onPanelClick(...L))
|
|
6756
6755
|
}, [
|
|
6757
6756
|
!n.ready && !n.error ? (c(), d("div", Qa, [
|
|
6758
|
-
n.isEmbedded ?
|
|
6757
|
+
n.isEmbedded ? b("", !0) : (c(), d("button", {
|
|
6759
6758
|
key: 0,
|
|
6760
6759
|
type: "button",
|
|
6761
6760
|
class: "wm-loading__close",
|
|
6762
6761
|
"aria-label": n.t("loading.minimize"),
|
|
6763
6762
|
onClick: t[0] || (t[0] = (...L) => n.close && n.close(...L))
|
|
6764
6763
|
}, [...t[8] || (t[8] = [
|
|
6765
|
-
|
|
6764
|
+
o("svg", {
|
|
6766
6765
|
width: "13",
|
|
6767
6766
|
height: "13",
|
|
6768
6767
|
viewBox: "0 0 24 24",
|
|
@@ -6773,22 +6772,22 @@ function vo(e, t, s, r, i, n) {
|
|
|
6773
6772
|
"stroke-linejoin": "round",
|
|
6774
6773
|
"aria-hidden": "true"
|
|
6775
6774
|
}, [
|
|
6776
|
-
|
|
6775
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6777
6776
|
], -1)
|
|
6778
6777
|
])], 8, Za)),
|
|
6779
|
-
t[9] || (t[9] =
|
|
6778
|
+
t[9] || (t[9] = o("div", {
|
|
6780
6779
|
class: "wm-loading__spinner",
|
|
6781
6780
|
"aria-hidden": "true"
|
|
6782
6781
|
}, null, -1))
|
|
6783
6782
|
])) : (c(), d(I, { key: 1 }, [
|
|
6784
|
-
K(
|
|
6783
|
+
K(l, {
|
|
6785
6784
|
title: n.headerTitle,
|
|
6786
6785
|
"team-members": n.teamMembers,
|
|
6787
6786
|
"response-label": n.responseLabel,
|
|
6788
6787
|
"show-identity": !!n.currentConv,
|
|
6789
6788
|
"show-back": n.canBack,
|
|
6790
6789
|
"show-close": !n.isEmbedded,
|
|
6791
|
-
"more-active":
|
|
6790
|
+
"more-active": a.moreOpen,
|
|
6792
6791
|
"agent-name": n.agentName,
|
|
6793
6792
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6794
6793
|
onBack: n.goHome,
|
|
@@ -6796,9 +6795,9 @@ function vo(e, t, s, r, i, n) {
|
|
|
6796
6795
|
onClose: n.close
|
|
6797
6796
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6798
6797
|
n.error ? (c(), d("div", eo, [
|
|
6799
|
-
|
|
6800
|
-
t[10] || (t[10] =
|
|
6801
|
-
|
|
6798
|
+
o("div", to, [
|
|
6799
|
+
t[10] || (t[10] = o("div", { class: "wm-state__errIcon" }, [
|
|
6800
|
+
o("svg", {
|
|
6802
6801
|
width: "14",
|
|
6803
6802
|
height: "14",
|
|
6804
6803
|
viewBox: "0 0 24 24",
|
|
@@ -6809,15 +6808,15 @@ function vo(e, t, s, r, i, n) {
|
|
|
6809
6808
|
"stroke-linejoin": "round",
|
|
6810
6809
|
"aria-hidden": "true"
|
|
6811
6810
|
}, [
|
|
6812
|
-
|
|
6811
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6813
6812
|
])
|
|
6814
6813
|
], -1)),
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6814
|
+
o("div", null, [
|
|
6815
|
+
o("div", no, v(n.t("error.connectionFailed")), 1),
|
|
6816
|
+
o("div", so, v(n.error), 1)
|
|
6818
6817
|
])
|
|
6819
6818
|
])
|
|
6820
|
-
])) : !n.currentConv &&
|
|
6819
|
+
])) : !n.currentConv && a.showHistory ? (c(), D(f, {
|
|
6821
6820
|
key: 1,
|
|
6822
6821
|
threads: n.openThreads,
|
|
6823
6822
|
onResume: n.onDrawerPick
|
|
@@ -6836,9 +6835,9 @@ function vo(e, t, s, r, i, n) {
|
|
|
6836
6835
|
"ai-agent-avatar-url": n.agentAvatarUrl,
|
|
6837
6836
|
onLoadMore: n.onLoadMore
|
|
6838
6837
|
}, 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"]),
|
|
6839
|
-
|
|
6838
|
+
o("div", ro, [
|
|
6840
6839
|
n.floatVisible ? (c(), d("div", io, [
|
|
6841
|
-
n.approvalReady ? (c(),
|
|
6840
|
+
n.approvalReady ? (c(), D(M, {
|
|
6842
6841
|
key: 0,
|
|
6843
6842
|
action: n.approvalTitle,
|
|
6844
6843
|
detail: n.approvalDetail,
|
|
@@ -6846,41 +6845,34 @@ function vo(e, t, s, r, i, n) {
|
|
|
6846
6845
|
"agent-name": n.agentName,
|
|
6847
6846
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6848
6847
|
onCallback: n.onApprovalCallback
|
|
6849
|
-
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.
|
|
6850
|
-
key: 1,
|
|
6851
|
-
action: n.pendingResolution.text_md,
|
|
6852
|
-
callbacks: n.pendingResolution.callbacks,
|
|
6853
|
-
"agent-name": n.agentName,
|
|
6854
|
-
"agent-avatar-url": n.agentAvatarUrl,
|
|
6855
|
-
onCallback: n.onResolutionCallback
|
|
6856
|
-
}, null, 8, ["action", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), P(E, {
|
|
6848
|
+
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), D(E, {
|
|
6857
6849
|
key: n.pendingForm.message && n.pendingForm.message.id,
|
|
6858
6850
|
form: n.pendingForm.form,
|
|
6859
6851
|
"agent-name": n.agentName,
|
|
6860
6852
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6861
6853
|
onSubmit: n.onFormSubmit
|
|
6862
|
-
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(),
|
|
6863
|
-
key:
|
|
6864
|
-
busy:
|
|
6865
|
-
done:
|
|
6854
|
+
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), D(A, {
|
|
6855
|
+
key: 2,
|
|
6856
|
+
busy: a.feedbackBusy,
|
|
6857
|
+
done: a.feedbackDone,
|
|
6866
6858
|
onSubmit: n.onFeedback
|
|
6867
|
-
}, null, 8, ["busy", "done", "onSubmit"])) : (c(),
|
|
6868
|
-
key:
|
|
6859
|
+
}, null, 8, ["busy", "done", "onSubmit"])) : (c(), D(q, {
|
|
6860
|
+
key: 3,
|
|
6869
6861
|
items: n.suggestions,
|
|
6870
6862
|
onSelect: n.onSuggestion
|
|
6871
6863
|
}, null, 8, ["items", "onSelect"]))
|
|
6872
|
-
], 512)) :
|
|
6864
|
+
], 512)) : b("", !0),
|
|
6873
6865
|
n.actionInFlight ? (c(), d("div", ao, [
|
|
6874
|
-
t[11] || (t[11] =
|
|
6866
|
+
t[11] || (t[11] = o("span", {
|
|
6875
6867
|
class: "wm-actionWait__spinner",
|
|
6876
6868
|
"aria-hidden": "true"
|
|
6877
6869
|
}, null, -1)),
|
|
6878
|
-
|
|
6870
|
+
o("span", oo, v(n.t("action.inProgress", {
|
|
6879
6871
|
name: n.actionInFlightName
|
|
6880
6872
|
})), 1)
|
|
6881
|
-
])) :
|
|
6882
|
-
|
|
6883
|
-
(c(!0), d(I, null, j(
|
|
6873
|
+
])) : b("", !0),
|
|
6874
|
+
a.pendingAttachments.length ? (c(), d("div", lo, [
|
|
6875
|
+
(c(!0), d(I, null, j(a.pendingAttachments, (L, W) => (c(), d("div", {
|
|
6884
6876
|
key: L.path || W,
|
|
6885
6877
|
class: "wm-attached__item"
|
|
6886
6878
|
}, [
|
|
@@ -6890,8 +6882,8 @@ function vo(e, t, s, r, i, n) {
|
|
|
6890
6882
|
src: L.previewUrl,
|
|
6891
6883
|
alt: L.name
|
|
6892
6884
|
}, null, 8, co)) : (c(), d("div", uo, [
|
|
6893
|
-
t[12] || (t[12] =
|
|
6894
|
-
|
|
6885
|
+
t[12] || (t[12] = o("span", { class: "wm-attached__fileIcon" }, [
|
|
6886
|
+
o("svg", {
|
|
6895
6887
|
width: "16",
|
|
6896
6888
|
height: "16",
|
|
6897
6889
|
viewBox: "0 0 24 24",
|
|
@@ -6902,24 +6894,24 @@ function vo(e, t, s, r, i, n) {
|
|
|
6902
6894
|
"stroke-linejoin": "round",
|
|
6903
6895
|
"aria-hidden": "true"
|
|
6904
6896
|
}, [
|
|
6905
|
-
|
|
6906
|
-
|
|
6897
|
+
o("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
|
|
6898
|
+
o("path", { d: "M14 2v6h6" })
|
|
6907
6899
|
])
|
|
6908
6900
|
], -1)),
|
|
6909
|
-
|
|
6910
|
-
|
|
6901
|
+
o("span", ho, [
|
|
6902
|
+
o("span", mo, v(L.name), 1),
|
|
6911
6903
|
n.formatAttachmentSize(L.size_bytes) ? (c(), d("span", fo, v(n.formatAttachmentSize(
|
|
6912
6904
|
L.size_bytes
|
|
6913
|
-
)), 1)) :
|
|
6905
|
+
)), 1)) : b("", !0)
|
|
6914
6906
|
])
|
|
6915
6907
|
])),
|
|
6916
|
-
|
|
6908
|
+
o("button", {
|
|
6917
6909
|
type: "button",
|
|
6918
6910
|
class: "wm-attached__remove",
|
|
6919
6911
|
"aria-label": n.t("attachment.remove"),
|
|
6920
6912
|
onClick: (Q) => n.removePendingAttachment(W)
|
|
6921
6913
|
}, [...t[13] || (t[13] = [
|
|
6922
|
-
|
|
6914
|
+
o("svg", {
|
|
6923
6915
|
width: "10",
|
|
6924
6916
|
height: "10",
|
|
6925
6917
|
viewBox: "0 0 24 24",
|
|
@@ -6930,23 +6922,23 @@ function vo(e, t, s, r, i, n) {
|
|
|
6930
6922
|
"stroke-linejoin": "round",
|
|
6931
6923
|
"aria-hidden": "true"
|
|
6932
6924
|
}, [
|
|
6933
|
-
|
|
6925
|
+
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6934
6926
|
], -1)
|
|
6935
6927
|
])], 8, _o)
|
|
6936
6928
|
]))), 128))
|
|
6937
|
-
])) :
|
|
6929
|
+
])) : b("", !0),
|
|
6938
6930
|
n.endedBlockVisible ? (c(), d("div", go, [
|
|
6939
|
-
|
|
6940
|
-
|
|
6931
|
+
o("span", po, v(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
|
|
6932
|
+
o("button", {
|
|
6941
6933
|
type: "button",
|
|
6942
6934
|
class: "wm-ended__btn",
|
|
6943
6935
|
onClick: t[2] || (t[2] = (L) => n.isClosed ? n.onReopen() : n.startConv())
|
|
6944
6936
|
}, v(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
|
|
6945
|
-
])) : n.actionInFlight ?
|
|
6937
|
+
])) : n.actionInFlight ? b("", !0) : (c(), D(T, {
|
|
6946
6938
|
key: 4,
|
|
6947
6939
|
ref: "composer",
|
|
6948
|
-
modelValue:
|
|
6949
|
-
"onUpdate:modelValue": t[3] || (t[3] = (L) =>
|
|
6940
|
+
modelValue: a.draft,
|
|
6941
|
+
"onUpdate:modelValue": t[3] || (t[3] = (L) => a.draft = L),
|
|
6950
6942
|
placeholder: n.composerPlaceholder,
|
|
6951
6943
|
disabled: !!n.pendingApproval,
|
|
6952
6944
|
"attach-label": n.t("composer.attachFile"),
|
|
@@ -6955,25 +6947,25 @@ function vo(e, t, s, r, i, n) {
|
|
|
6955
6947
|
onAttach: n.onAttach
|
|
6956
6948
|
}, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "display-mode", "onSend", "onAttach"]))
|
|
6957
6949
|
]),
|
|
6958
|
-
|
|
6950
|
+
a.moreOpen ? (c(), D(N, {
|
|
6959
6951
|
key: 0,
|
|
6960
6952
|
"can-rename": !!n.currentConv && !n.currentConv._draft,
|
|
6961
6953
|
"can-export": !!n.currentConv && !n.currentConv._draft,
|
|
6962
6954
|
"sound-enabled": e.soundEnabled,
|
|
6963
6955
|
"status-url": n.statusUrl,
|
|
6964
6956
|
"help-url": n.helpUrl,
|
|
6965
|
-
onClose: t[4] || (t[4] = (L) =>
|
|
6957
|
+
onClose: t[4] || (t[4] = (L) => a.moreOpen = !1),
|
|
6966
6958
|
onSoundToggle: e.onSoundToggle,
|
|
6967
6959
|
onAction: n.onMoreAction
|
|
6968
|
-
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) :
|
|
6969
|
-
|
|
6960
|
+
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0),
|
|
6961
|
+
a.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), D(U, {
|
|
6970
6962
|
key: 1,
|
|
6971
6963
|
"initial-value": n.currentConv.name || "",
|
|
6972
6964
|
title: n.t("rename.dialogTitle"),
|
|
6973
|
-
onClose: t[5] || (t[5] = (L) =>
|
|
6965
|
+
onClose: t[5] || (t[5] = (L) => a.renameDialogOpen = !1),
|
|
6974
6966
|
onSubmit: n.onRenameSubmit
|
|
6975
|
-
}, null, 8, ["initial-value", "title", "onSubmit"])) :
|
|
6976
|
-
], 64)) : (c(),
|
|
6967
|
+
}, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0)
|
|
6968
|
+
], 64)) : (c(), D(k, {
|
|
6977
6969
|
key: 2,
|
|
6978
6970
|
title: n.widgetTitle,
|
|
6979
6971
|
subtitle: n.widgetSubtitle,
|
|
@@ -6981,33 +6973,33 @@ function vo(e, t, s, r, i, n) {
|
|
|
6981
6973
|
"default-icon-url": n.defaultIconUrl,
|
|
6982
6974
|
"quick-links": n.quickLinks,
|
|
6983
6975
|
"open-threads": n.openThreads,
|
|
6984
|
-
busy:
|
|
6976
|
+
busy: a.busy,
|
|
6985
6977
|
onStart: n.startConv,
|
|
6986
6978
|
onSelect: n.onQuickLink,
|
|
6987
6979
|
onResume: n.onDrawerPick,
|
|
6988
|
-
onViewHistory: t[1] || (t[1] = (L) =>
|
|
6980
|
+
onViewHistory: t[1] || (t[1] = (L) => a.showHistory = !0)
|
|
6989
6981
|
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
6990
|
-
|
|
6982
|
+
a.moreOpen && !n.currentConv ? (c(), D(N, {
|
|
6991
6983
|
key: 4,
|
|
6992
6984
|
"can-rename": !1,
|
|
6993
6985
|
"can-export": !1,
|
|
6994
6986
|
"sound-enabled": e.soundEnabled,
|
|
6995
6987
|
"status-url": n.statusUrl,
|
|
6996
6988
|
"help-url": n.helpUrl,
|
|
6997
|
-
onClose: t[6] || (t[6] = (L) =>
|
|
6989
|
+
onClose: t[6] || (t[6] = (L) => a.moreOpen = !1),
|
|
6998
6990
|
onSoundToggle: e.onSoundToggle,
|
|
6999
6991
|
onAction: n.onMoreAction
|
|
7000
|
-
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) :
|
|
6992
|
+
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : b("", !0)
|
|
7001
6993
|
], 64))
|
|
7002
|
-
], 6)) :
|
|
6994
|
+
], 6)) : b("", !0)
|
|
7003
6995
|
], 6);
|
|
7004
6996
|
}
|
|
7005
|
-
const bo = /* @__PURE__ */
|
|
6997
|
+
const bo = /* @__PURE__ */ P(Xa, [["render", vo], ["__scopeId", "data-v-87556b84"]]), ko = "0.5.79";
|
|
7006
6998
|
export {
|
|
7007
6999
|
oe as AIAvatar,
|
|
7008
7000
|
be as AVATAR_COLORS,
|
|
7009
7001
|
As as ActionResult,
|
|
7010
|
-
|
|
7002
|
+
Ni as ApprovalCard,
|
|
7011
7003
|
Es as ArtifactFormResponse,
|
|
7012
7004
|
Ws as ArtifactInfoCard,
|
|
7013
7005
|
ur as ArtifactRenderer,
|
|
@@ -7022,10 +7014,10 @@ export {
|
|
|
7022
7014
|
_n as Header,
|
|
7023
7015
|
ve as HumanAvatar,
|
|
7024
7016
|
qt as Launcher,
|
|
7025
|
-
|
|
7017
|
+
Oe as MEDIA_RECORDER_SUPPORTED,
|
|
7026
7018
|
ri as MessageList,
|
|
7027
7019
|
bo as Messenger,
|
|
7028
|
-
|
|
7020
|
+
Ua as MoreMenu,
|
|
7029
7021
|
Jn as Onboarding,
|
|
7030
7022
|
pe as SCREEN_CAPTURE_SUPPORTED,
|
|
7031
7023
|
ut as SUPPORTED_LANGUAGES,
|