@_solaris/messenger-widget 0.5.35 → 0.5.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +11 -11
- package/dist/messenger.cjs +6 -6
- package/dist/messenger.js +972 -903
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/core/i18n.d.ts +2 -0
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as
|
|
1
|
+
import { reactive as Ue, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as R, createVNode as K, Transition as Ie, withCtx as Ee, Fragment as E, renderList as U, withKeys as ue, withModifiers as G, createElementVNode as a, createCommentVNode as y, createBlock as P, withDirectives as $, vModelText as X, createTextVNode as ve, resolveDynamicComponent as De, renderSlot as je, vModelCheckbox as He, vModelSelect as ze, markRaw as Ce } from "vue";
|
|
2
2
|
const qe = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -6,7 +6,7 @@ const qe = [
|
|
|
6
6
|
"conversation_updated",
|
|
7
7
|
"config_updated",
|
|
8
8
|
"action_status"
|
|
9
|
-
], fe = "/client",
|
|
9
|
+
], fe = "/client", Ke = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, $e = 5 * 60 * 1e3;
|
|
10
10
|
function We(e) {
|
|
11
11
|
const t = {
|
|
12
12
|
baseUrl: Ge(e.baseUrl || ""),
|
|
@@ -35,8 +35,8 @@ function We(e) {
|
|
|
35
35
|
return t.listeners.has(d) || t.listeners.set(d, /* @__PURE__ */ new Set()), t.listeners.get(d).add(f), () => t.listeners.get(d).delete(f);
|
|
36
36
|
}
|
|
37
37
|
function i(d, f) {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const g = t.listeners.get(d);
|
|
39
|
+
g && g.forEach((b) => {
|
|
40
40
|
try {
|
|
41
41
|
b(f);
|
|
42
42
|
} catch (C) {
|
|
@@ -60,12 +60,12 @@ function We(e) {
|
|
|
60
60
|
...t.origin ? { "X-Parent-Origin": t.origin } : {}
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
async function
|
|
63
|
+
async function o(d, f, g) {
|
|
64
64
|
const b = await fetch(`${t.baseUrl}${fe}${f}`, {
|
|
65
65
|
method: d,
|
|
66
66
|
credentials: "include",
|
|
67
67
|
headers: s(),
|
|
68
|
-
body:
|
|
68
|
+
body: g !== void 0 ? JSON.stringify(g) : void 0
|
|
69
69
|
});
|
|
70
70
|
if (!b.ok) {
|
|
71
71
|
const C = await l(b), M = new Error(
|
|
@@ -114,8 +114,8 @@ function We(e) {
|
|
|
114
114
|
);
|
|
115
115
|
throw x.status = f.status, x.body = I, x;
|
|
116
116
|
}
|
|
117
|
-
const
|
|
118
|
-
t.userId =
|
|
117
|
+
const g = await f.json();
|
|
118
|
+
t.userId = g.external_id;
|
|
119
119
|
const [b, C] = await Promise.all([
|
|
120
120
|
fetch(
|
|
121
121
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
@@ -129,7 +129,7 @@ function We(e) {
|
|
|
129
129
|
}
|
|
130
130
|
return I.json();
|
|
131
131
|
}),
|
|
132
|
-
|
|
132
|
+
o("GET", "/customers/me")
|
|
133
133
|
]), M = { config: b, customer: (C == null ? void 0 : C.customer) ?? null };
|
|
134
134
|
return t.lastBootstrap = M, await k(), typeof document < "u" && (t.visibilityHandler = m, document.addEventListener(
|
|
135
135
|
"visibilitychange",
|
|
@@ -138,9 +138,9 @@ function We(e) {
|
|
|
138
138
|
}
|
|
139
139
|
async function k() {
|
|
140
140
|
try {
|
|
141
|
-
const d = await
|
|
142
|
-
t.lastActivityAt = d.reduce((f,
|
|
143
|
-
const b =
|
|
141
|
+
const d = await B();
|
|
142
|
+
t.lastActivityAt = d.reduce((f, g) => {
|
|
143
|
+
const b = g == null ? void 0 : g.last_message_at;
|
|
144
144
|
return b && (!f || b > f) ? b : f;
|
|
145
145
|
}, null);
|
|
146
146
|
} catch (d) {
|
|
@@ -148,92 +148,92 @@ function We(e) {
|
|
|
148
148
|
}
|
|
149
149
|
}
|
|
150
150
|
async function w() {
|
|
151
|
-
const d = await
|
|
151
|
+
const d = await o("GET", "/customers/me");
|
|
152
152
|
return (d == null ? void 0 : d.customer) ?? null;
|
|
153
153
|
}
|
|
154
154
|
async function T(d) {
|
|
155
|
-
const f = await
|
|
155
|
+
const f = await o("PATCH", "/customers/me", d);
|
|
156
156
|
return (f == null ? void 0 : f.customer) ?? null;
|
|
157
157
|
}
|
|
158
|
-
async function
|
|
159
|
-
const d = await
|
|
158
|
+
async function B() {
|
|
159
|
+
const d = await o("GET", "/conversations");
|
|
160
160
|
return (d == null ? void 0 : d.conversations) ?? [];
|
|
161
161
|
}
|
|
162
162
|
async function A(d = {}) {
|
|
163
|
-
return (await
|
|
163
|
+
return (await o("POST", "/conversations", d)).conversation;
|
|
164
164
|
}
|
|
165
165
|
async function H(d) {
|
|
166
|
-
return (await
|
|
166
|
+
return (await o(
|
|
167
167
|
"GET",
|
|
168
168
|
`/conversations/${encodeURIComponent(d)}`
|
|
169
169
|
)).conversation;
|
|
170
170
|
}
|
|
171
171
|
async function S(d, f) {
|
|
172
|
-
return (await
|
|
172
|
+
return (await o(
|
|
173
173
|
"PATCH",
|
|
174
174
|
`/conversations/${encodeURIComponent(d)}`,
|
|
175
175
|
f
|
|
176
176
|
)).conversation;
|
|
177
177
|
}
|
|
178
178
|
async function F(d, f) {
|
|
179
|
-
return
|
|
179
|
+
return o(
|
|
180
180
|
"PATCH",
|
|
181
181
|
`/conversations/${encodeURIComponent(d)}/read`,
|
|
182
182
|
{ message_id: f }
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
async function L(d, f = {}) {
|
|
186
|
-
const
|
|
187
|
-
f.before &&
|
|
188
|
-
const b =
|
|
189
|
-
return
|
|
186
|
+
const g = new URLSearchParams();
|
|
187
|
+
f.before && g.set("before", f.before), f.since && g.set("since", f.since), f.limit && g.set("limit", String(f.limit));
|
|
188
|
+
const b = g.toString() ? `?${g.toString()}` : "";
|
|
189
|
+
return o(
|
|
190
190
|
"GET",
|
|
191
191
|
`/conversations/${encodeURIComponent(d)}/messages${b}`
|
|
192
192
|
);
|
|
193
193
|
}
|
|
194
194
|
async function z(d, f) {
|
|
195
195
|
se();
|
|
196
|
-
const
|
|
196
|
+
const g = {
|
|
197
197
|
client_msg_id: f.client_msg_id,
|
|
198
198
|
type: "content",
|
|
199
199
|
text_md: f.text_md,
|
|
200
200
|
author: { id: t.userId, type: "user" },
|
|
201
201
|
created_at: f.created_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
202
202
|
};
|
|
203
|
-
return Array.isArray(f.attachments) && f.attachments.length && (
|
|
203
|
+
return Array.isArray(f.attachments) && f.attachments.length && (g.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (g.metadata = f.metadata), o(
|
|
204
204
|
"POST",
|
|
205
205
|
`/conversations/${encodeURIComponent(d)}/messages`,
|
|
206
|
-
|
|
206
|
+
g
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
|
-
async function Y(d, f,
|
|
210
|
-
return se(),
|
|
209
|
+
async function Y(d, f, g) {
|
|
210
|
+
return se(), o(
|
|
211
211
|
"POST",
|
|
212
212
|
`/messages/${encodeURIComponent(d)}/callbacks/${encodeURIComponent(f)}`,
|
|
213
|
-
|
|
213
|
+
g ? { inputs: g } : {}
|
|
214
214
|
);
|
|
215
215
|
}
|
|
216
216
|
async function Z(d) {
|
|
217
|
-
const f = d.name || "attachment",
|
|
218
|
-
mime_type:
|
|
217
|
+
const f = d.name || "attachment", g = d.type || "application/octet-stream", b = d.size || 0, C = await o("POST", "/attachments", {
|
|
218
|
+
mime_type: g,
|
|
219
219
|
size_bytes: b,
|
|
220
220
|
name: f
|
|
221
221
|
}), M = await fetch(C.upload_url, {
|
|
222
222
|
method: "PUT",
|
|
223
|
-
headers: { "Content-Type":
|
|
223
|
+
headers: { "Content-Type": g },
|
|
224
224
|
body: d
|
|
225
225
|
});
|
|
226
226
|
if (!M.ok)
|
|
227
227
|
throw new Error(`HTTP ${M.status} PUT signed upload`);
|
|
228
228
|
return {
|
|
229
|
-
type: Ye(
|
|
229
|
+
type: Ye(g),
|
|
230
230
|
path: C.path,
|
|
231
|
-
mime_type:
|
|
231
|
+
mime_type: g,
|
|
232
232
|
size_bytes: b
|
|
233
233
|
};
|
|
234
234
|
}
|
|
235
235
|
async function ee(d) {
|
|
236
|
-
return
|
|
236
|
+
return o(
|
|
237
237
|
"GET",
|
|
238
238
|
`/attachments/sign?path=${encodeURIComponent(d)}`
|
|
239
239
|
);
|
|
@@ -242,12 +242,12 @@ function We(e) {
|
|
|
242
242
|
const d = new URLSearchParams({ widgetId: t.widgetId }).toString();
|
|
243
243
|
return `${t.baseUrl}${fe}/stream?${d}`;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function V() {
|
|
246
246
|
if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
|
|
247
247
|
try {
|
|
248
248
|
const d = new EventSource(te(), { withCredentials: !0 });
|
|
249
249
|
for (const f of qe)
|
|
250
|
-
d.addEventListener(f, (
|
|
250
|
+
d.addEventListener(f, (g) => ne(f, g.data));
|
|
251
251
|
d.addEventListener(
|
|
252
252
|
"error",
|
|
253
253
|
() => i("error", new Error("SSE error"))
|
|
@@ -258,26 +258,26 @@ function We(e) {
|
|
|
258
258
|
}
|
|
259
259
|
function ne(d, f) {
|
|
260
260
|
try {
|
|
261
|
-
const
|
|
261
|
+
const g = JSON.parse(f), b = g && typeof g == "object" && "data" in g ? g.data : g;
|
|
262
262
|
i(d, b);
|
|
263
|
-
} catch (
|
|
264
|
-
console.error("[transport] bad SSE payload", d,
|
|
263
|
+
} catch (g) {
|
|
264
|
+
console.error("[transport] bad SSE payload", d, g);
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
function J() {
|
|
268
268
|
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && r("idle");
|
|
269
269
|
}
|
|
270
270
|
function se() {
|
|
271
|
-
clearTimeout(t.burstTimer),
|
|
271
|
+
clearTimeout(t.burstTimer), V(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
272
272
|
t.panelOpen || J();
|
|
273
|
-
},
|
|
273
|
+
}, Ve));
|
|
274
274
|
}
|
|
275
275
|
function ce(d) {
|
|
276
|
-
t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer),
|
|
276
|
+
t.panelOpen = !!d, t.panelOpen ? (clearTimeout(t.burstTimer), V()) : se();
|
|
277
277
|
}
|
|
278
278
|
async function me() {
|
|
279
279
|
try {
|
|
280
|
-
const d = await
|
|
280
|
+
const d = await B(), f = d.reduce((b, C) => {
|
|
281
281
|
const M = C == null ? void 0 : C.last_message_at;
|
|
282
282
|
return M && (!b || M > b) ? M : b;
|
|
283
283
|
}, null);
|
|
@@ -287,7 +287,7 @@ function We(e) {
|
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
289
|
function de() {
|
|
290
|
-
h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(me,
|
|
290
|
+
h(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(me, Ke));
|
|
291
291
|
}
|
|
292
292
|
function h() {
|
|
293
293
|
t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
|
|
@@ -296,16 +296,16 @@ function We(e) {
|
|
|
296
296
|
if (document.hidden)
|
|
297
297
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
298
298
|
t.hiddenGraceTimer = null, document.hidden && (h(), J(), r("paused"));
|
|
299
|
-
},
|
|
299
|
+
}, $e);
|
|
300
300
|
else {
|
|
301
301
|
if (t.hiddenGraceTimer) {
|
|
302
302
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
305
|
-
r("idle"), de(), t.panelOpen &&
|
|
305
|
+
r("idle"), de(), t.panelOpen && V();
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function _() {
|
|
309
309
|
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, J(), t.visibilityHandler && (document.removeEventListener(
|
|
310
310
|
"visibilitychange",
|
|
311
311
|
t.visibilityHandler
|
|
@@ -314,12 +314,12 @@ function We(e) {
|
|
|
314
314
|
return {
|
|
315
315
|
on: n,
|
|
316
316
|
start: p,
|
|
317
|
-
stop:
|
|
317
|
+
stop: _,
|
|
318
318
|
setPanelOpen: ce,
|
|
319
319
|
// REST
|
|
320
320
|
getCustomer: w,
|
|
321
321
|
patchCustomer: T,
|
|
322
|
-
listConversations:
|
|
322
|
+
listConversations: B,
|
|
323
323
|
createConversation: A,
|
|
324
324
|
getConversation: H,
|
|
325
325
|
patchConversation: S,
|
|
@@ -391,22 +391,22 @@ function Qe(e) {
|
|
|
391
391
|
})
|
|
392
392
|
), n.push(
|
|
393
393
|
e.on("message", (h) => {
|
|
394
|
-
const m = h == null ? void 0 : h.conversation_id,
|
|
395
|
-
!m || !(
|
|
394
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.message;
|
|
395
|
+
!m || !(_ != null && _.id) || (V(m, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], se(m, _.created_at));
|
|
396
396
|
})
|
|
397
397
|
), n.push(
|
|
398
398
|
e.on("message_stream", (h) => {
|
|
399
|
-
const m = h == null ? void 0 : h.message_id,
|
|
400
|
-
!m || typeof
|
|
399
|
+
const m = h == null ? void 0 : h.message_id, _ = h == null ? void 0 : h.token;
|
|
400
|
+
!m || typeof _ != "string" || (t.streamingByMsgId[m] = (t.streamingByMsgId[m] || "") + _);
|
|
401
401
|
})
|
|
402
402
|
), n.push(
|
|
403
403
|
e.on("conversation_updated", (h) => {
|
|
404
|
-
const m = h == null ? void 0 : h.conversation_id,
|
|
405
|
-
if (!m || !
|
|
404
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.changes;
|
|
405
|
+
if (!m || !_) return;
|
|
406
406
|
const d = t.conversations.findIndex((f) => f.id === m);
|
|
407
407
|
d !== -1 && (t.conversations[d] = {
|
|
408
408
|
...t.conversations[d],
|
|
409
|
-
...
|
|
409
|
+
..._
|
|
410
410
|
});
|
|
411
411
|
})
|
|
412
412
|
), n.push(
|
|
@@ -415,10 +415,10 @@ function Qe(e) {
|
|
|
415
415
|
})
|
|
416
416
|
), n.push(
|
|
417
417
|
e.on("action_status", (h) => {
|
|
418
|
-
const m = h == null ? void 0 : h.conversation_id,
|
|
419
|
-
if (!m || !
|
|
418
|
+
const m = h == null ? void 0 : h.conversation_id, _ = h == null ? void 0 : h.action_id, d = h == null ? void 0 : h.action_name;
|
|
419
|
+
if (!m || !_) return;
|
|
420
420
|
const f = t.runningActionsByConv[m] || {};
|
|
421
|
-
h.state === "running" ? (f[
|
|
421
|
+
h.state === "running" ? (f[_] = d || _, t.runningActionsByConv[m] = { ...f }) : h.state === "done" && (delete f[_], t.runningActionsByConv[m] = { ...f });
|
|
422
422
|
})
|
|
423
423
|
), n.push(
|
|
424
424
|
e.on("activity", (h) => {
|
|
@@ -436,11 +436,11 @@ function Qe(e) {
|
|
|
436
436
|
),
|
|
437
437
|
15e3
|
|
438
438
|
)
|
|
439
|
-
),
|
|
439
|
+
), _ = await Promise.race([
|
|
440
440
|
e.start(h),
|
|
441
441
|
m
|
|
442
442
|
]);
|
|
443
|
-
t.config =
|
|
443
|
+
t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
|
|
444
444
|
e.listConversations(),
|
|
445
445
|
m
|
|
446
446
|
]), t.ready = !0;
|
|
@@ -460,16 +460,16 @@ function Qe(e) {
|
|
|
460
460
|
const m = me(h);
|
|
461
461
|
if (!m) return t.customer;
|
|
462
462
|
try {
|
|
463
|
-
const
|
|
464
|
-
|
|
465
|
-
} catch (
|
|
466
|
-
console.error("[store] applyCustomer failed",
|
|
463
|
+
const _ = await e.patchCustomer(m);
|
|
464
|
+
_ && (t.customer = _);
|
|
465
|
+
} catch (_) {
|
|
466
|
+
console.error("[store] applyCustomer failed", _);
|
|
467
467
|
}
|
|
468
468
|
return t.customer;
|
|
469
469
|
}
|
|
470
|
-
async function
|
|
471
|
-
const m = await e.createConversation(h),
|
|
472
|
-
return
|
|
470
|
+
async function o(h = {}) {
|
|
471
|
+
const m = await e.createConversation(h), _ = t.conversations.findIndex((d) => d.id === m.id);
|
|
472
|
+
return _ === -1 ? t.conversations = [m, ...t.conversations] : t.conversations[_] = m, m;
|
|
473
473
|
}
|
|
474
474
|
const l = 50;
|
|
475
475
|
async function p(h) {
|
|
@@ -477,21 +477,21 @@ function Qe(e) {
|
|
|
477
477
|
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
478
478
|
w(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
479
479
|
try {
|
|
480
|
-
const
|
|
480
|
+
const _ = await e.listMessages(h, {
|
|
481
481
|
limit: l
|
|
482
|
-
}), d = (
|
|
482
|
+
}), d = (_ == null ? void 0 : _.messages) ?? [], f = t.messagesByConv[h] || [], g = /* @__PURE__ */ new Set();
|
|
483
483
|
for (const C of d)
|
|
484
|
-
(C == null ? void 0 : C.id) != null &&
|
|
485
|
-
const b = f.filter((C) => !((C == null ? void 0 : C.id) != null &&
|
|
484
|
+
(C == null ? void 0 : C.id) != null && g.add(`id:${String(C.id)}`), C != null && C.client_msg_id && g.add(`c:${C.client_msg_id}`);
|
|
485
|
+
const b = f.filter((C) => !((C == null ? void 0 : C.id) != null && g.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && g.has(`c:${C.client_msg_id}`)));
|
|
486
486
|
t.messagesByConv[h] = [...d, ...b].sort(
|
|
487
487
|
ce
|
|
488
488
|
), w(h, {
|
|
489
|
-
nextCursor: (
|
|
489
|
+
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
490
490
|
loading: !1,
|
|
491
491
|
loaded: !0
|
|
492
492
|
});
|
|
493
|
-
} catch (
|
|
494
|
-
console.error("[store] openConversation failed",
|
|
493
|
+
} catch (_) {
|
|
494
|
+
console.error("[store] openConversation failed", _), w(h, {
|
|
495
495
|
nextCursor: null,
|
|
496
496
|
loading: !1,
|
|
497
497
|
loaded: !1
|
|
@@ -503,24 +503,24 @@ function Qe(e) {
|
|
|
503
503
|
var f;
|
|
504
504
|
const m = t.paginationByConv[h];
|
|
505
505
|
if (!m || m.loading || !m.nextCursor) return;
|
|
506
|
-
const d = (f = (t.messagesByConv[h] || []).find((
|
|
506
|
+
const d = (f = (t.messagesByConv[h] || []).find((g) => g == null ? void 0 : g.created_at)) == null ? void 0 : f.created_at;
|
|
507
507
|
if (d) {
|
|
508
508
|
w(h, { ...m, loading: !0 });
|
|
509
509
|
try {
|
|
510
|
-
const
|
|
510
|
+
const g = await e.listMessages(h, {
|
|
511
511
|
before: d,
|
|
512
512
|
limit: l
|
|
513
|
-
}), b = (
|
|
513
|
+
}), b = (g == null ? void 0 : g.messages) ?? [], C = t.messagesByConv[h] || [], M = /* @__PURE__ */ new Set();
|
|
514
514
|
for (const x of C)
|
|
515
515
|
(x == null ? void 0 : x.id) != null && M.add(`id:${String(x.id)}`), x != null && x.client_msg_id && M.add(`c:${x.client_msg_id}`);
|
|
516
516
|
const I = b.filter((x) => !((x == null ? void 0 : x.id) != null && M.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && M.has(`c:${x.client_msg_id}`)));
|
|
517
517
|
t.messagesByConv[h] = [...I, ...C], w(h, {
|
|
518
|
-
nextCursor: (
|
|
518
|
+
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
519
519
|
loading: !1,
|
|
520
520
|
loaded: !0
|
|
521
521
|
});
|
|
522
|
-
} catch (
|
|
523
|
-
console.error("[store] loadMore failed",
|
|
522
|
+
} catch (g) {
|
|
523
|
+
console.error("[store] loadMore failed", g), w(h, { ...m, loading: !1 });
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
}
|
|
@@ -528,28 +528,28 @@ function Qe(e) {
|
|
|
528
528
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
529
529
|
}
|
|
530
530
|
async function T(h, m) {
|
|
531
|
-
const
|
|
532
|
-
d !== -1 && (t.conversations[d] =
|
|
531
|
+
const _ = await e.patchConversation(h, m), d = t.conversations.findIndex((f) => f.id === h);
|
|
532
|
+
d !== -1 && (t.conversations[d] = _);
|
|
533
533
|
}
|
|
534
|
-
async function
|
|
534
|
+
async function B(h) {
|
|
535
535
|
if (!h) return [];
|
|
536
536
|
const m = t.messagesByConv[h] || [];
|
|
537
|
-
let
|
|
537
|
+
let _ = "";
|
|
538
538
|
for (const d of m)
|
|
539
|
-
d != null && d.created_at && d.created_at >
|
|
539
|
+
d != null && d.created_at && d.created_at > _ && (_ = d.created_at);
|
|
540
540
|
try {
|
|
541
541
|
const d = await e.listMessages(
|
|
542
542
|
h,
|
|
543
|
-
|
|
543
|
+
_ ? { since: _ } : {}
|
|
544
544
|
), f = (d == null ? void 0 : d.messages) || [];
|
|
545
545
|
if (!f.length) return [];
|
|
546
|
-
const
|
|
546
|
+
const g = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
|
|
547
547
|
for (const M of m)
|
|
548
|
-
(M == null ? void 0 : M.id) != null &&
|
|
548
|
+
(M == null ? void 0 : M.id) != null && g.add(String(M.id)), M != null && M.client_msg_id && b.add(M.client_msg_id);
|
|
549
549
|
const C = [];
|
|
550
550
|
for (const M of f) {
|
|
551
|
-
const I = (M == null ? void 0 : M.id) != null &&
|
|
552
|
-
|
|
551
|
+
const I = (M == null ? void 0 : M.id) != null && g.has(String(M.id)) || (M == null ? void 0 : M.client_msg_id) && b.has(M.client_msg_id);
|
|
552
|
+
V(h, M), I || C.push(M);
|
|
553
553
|
}
|
|
554
554
|
return C;
|
|
555
555
|
} catch (d) {
|
|
@@ -559,19 +559,19 @@ function Qe(e) {
|
|
|
559
559
|
async function A(h, m) {
|
|
560
560
|
if (!(!h || m == null))
|
|
561
561
|
try {
|
|
562
|
-
const
|
|
562
|
+
const _ = await e.markConversationRead(h, m), d = (_ == null ? void 0 : _.last_read_message_id) ?? m, f = t.conversations.findIndex((g) => (g == null ? void 0 : g.id) === h);
|
|
563
563
|
f !== -1 && (t.conversations[f] = {
|
|
564
564
|
...t.conversations[f],
|
|
565
565
|
last_read_message_id: d
|
|
566
566
|
});
|
|
567
|
-
} catch (
|
|
568
|
-
console.error("[store] markConversationRead failed",
|
|
567
|
+
} catch (_) {
|
|
568
|
+
console.error("[store] markConversationRead failed", _);
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
async function H(h, m, { attachments:
|
|
571
|
+
async function H(h, m, { attachments: _, metadata: d } = {}) {
|
|
572
572
|
var I;
|
|
573
|
-
const f = (m || "").trim(),
|
|
574
|
-
if (!h || !f && !
|
|
573
|
+
const f = (m || "").trim(), g = Array.isArray(_) && _.length > 0;
|
|
574
|
+
if (!h || !f && !g) return;
|
|
575
575
|
const b = Je(), C = de(h), M = {
|
|
576
576
|
id: b,
|
|
577
577
|
client_msg_id: b,
|
|
@@ -585,16 +585,16 @@ function Qe(e) {
|
|
|
585
585
|
created_at: C,
|
|
586
586
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
587
587
|
_pending: !0,
|
|
588
|
-
...
|
|
588
|
+
...g ? { payload: { type: "content", attachments: _ } } : {},
|
|
589
589
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
590
590
|
};
|
|
591
|
-
|
|
591
|
+
V(h, M);
|
|
592
592
|
try {
|
|
593
593
|
await e.postMessage(h, {
|
|
594
594
|
client_msg_id: b,
|
|
595
595
|
text_md: f,
|
|
596
596
|
created_at: C,
|
|
597
|
-
...
|
|
597
|
+
...g ? { attachments: _ } : {},
|
|
598
598
|
...d && typeof d == "object" ? { metadata: d } : {}
|
|
599
599
|
});
|
|
600
600
|
} catch (x) {
|
|
@@ -604,10 +604,10 @@ function Qe(e) {
|
|
|
604
604
|
});
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
|
-
async function S(h, m,
|
|
607
|
+
async function S(h, m, _) {
|
|
608
608
|
h != null && (t.awaitingCallback[h] = !0);
|
|
609
609
|
try {
|
|
610
|
-
await e.postCallback(h, m,
|
|
610
|
+
await e.postCallback(h, m, _);
|
|
611
611
|
} catch (d) {
|
|
612
612
|
console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
|
|
613
613
|
}
|
|
@@ -617,48 +617,48 @@ function Qe(e) {
|
|
|
617
617
|
if (!h) return null;
|
|
618
618
|
const m = F.get(h);
|
|
619
619
|
if (m != null && m.url) {
|
|
620
|
-
const
|
|
621
|
-
if (!
|
|
620
|
+
const _ = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
621
|
+
if (!_ || _ - Date.now() > 6e4) return m.url;
|
|
622
622
|
}
|
|
623
623
|
try {
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
624
|
+
const _ = await e.signAttachment(h);
|
|
625
|
+
if (_ != null && _.signed_url)
|
|
626
626
|
return F.set(h, {
|
|
627
|
-
url:
|
|
628
|
-
expires_at:
|
|
629
|
-
}),
|
|
630
|
-
} catch (
|
|
631
|
-
console.error("[store] sign attachment failed",
|
|
627
|
+
url: _.signed_url,
|
|
628
|
+
expires_at: _.expires_at
|
|
629
|
+
}), _.signed_url;
|
|
630
|
+
} catch (_) {
|
|
631
|
+
console.error("[store] sign attachment failed", _);
|
|
632
632
|
}
|
|
633
633
|
return null;
|
|
634
634
|
}
|
|
635
|
-
async function z(h, { rating: m, comment:
|
|
636
|
-
const d = t.conversations.find((b) => b.id === h),
|
|
635
|
+
async function z(h, { rating: m, comment: _ } = {}) {
|
|
636
|
+
const d = t.conversations.find((b) => b.id === h), g = {
|
|
637
637
|
...(d == null ? void 0 : d.metadata) || {},
|
|
638
638
|
feedback: {
|
|
639
639
|
rating: m,
|
|
640
|
-
comment:
|
|
640
|
+
comment: _ || null,
|
|
641
641
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
|
-
await T(h, { metadata:
|
|
644
|
+
await T(h, { metadata: g });
|
|
645
645
|
}
|
|
646
646
|
function Y(h) {
|
|
647
|
-
var
|
|
647
|
+
var _, d;
|
|
648
648
|
const m = t.messagesByConv[h] || [];
|
|
649
649
|
for (let f = m.length - 1; f >= 0; f--) {
|
|
650
|
-
const
|
|
651
|
-
if ((
|
|
652
|
-
return
|
|
650
|
+
const g = m[f];
|
|
651
|
+
if ((g == null ? void 0 : g.type) === "action" && ((_ = g == null ? void 0 : g.payload) == null ? void 0 : _.type) === "action" && ((d = g == null ? void 0 : g.payload) == null ? void 0 : d.state) === "pending" && Array.isArray(g == null ? void 0 : g.callbacks) && g.callbacks.length > 0 && !t.awaitingCallback[g.id])
|
|
652
|
+
return g;
|
|
653
653
|
}
|
|
654
654
|
return null;
|
|
655
655
|
}
|
|
656
656
|
function Z(h) {
|
|
657
|
-
var
|
|
657
|
+
var _, d, f;
|
|
658
658
|
const m = t.messagesByConv[h] || [];
|
|
659
|
-
for (let
|
|
660
|
-
const b = m[
|
|
661
|
-
if (((
|
|
659
|
+
for (let g = m.length - 1; g >= 0; g--) {
|
|
660
|
+
const b = m[g];
|
|
661
|
+
if (((_ = b == null ? void 0 : b.author) == null ? void 0 : _.type) === "user" || (b == null ? void 0 : b.type) === "action" && ((d = b == null ? void 0 : b.payload) == null ? void 0 : d.state) === "pending")
|
|
662
662
|
return null;
|
|
663
663
|
const C = (f = b == null ? void 0 : b.metadata) == null ? void 0 : f.form;
|
|
664
664
|
if (C && Array.isArray(C.fields) && C.fields.length > 0)
|
|
@@ -669,21 +669,21 @@ function Qe(e) {
|
|
|
669
669
|
function ee(h) {
|
|
670
670
|
const m = t.runningActionsByConv[h];
|
|
671
671
|
if (!m) return null;
|
|
672
|
-
const
|
|
673
|
-
if (
|
|
674
|
-
const d =
|
|
672
|
+
const _ = Object.keys(m);
|
|
673
|
+
if (_.length === 0) return null;
|
|
674
|
+
const d = _[0];
|
|
675
675
|
return { id: d, payload: { name: m[d] } };
|
|
676
676
|
}
|
|
677
677
|
function te(h) {
|
|
678
|
-
var
|
|
678
|
+
var _, d, f, g;
|
|
679
679
|
const m = t.messagesByConv[h] || [];
|
|
680
680
|
for (let b = m.length - 1; b >= 0; b--) {
|
|
681
681
|
const C = m[b];
|
|
682
|
-
if (((
|
|
682
|
+
if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user") return [];
|
|
683
683
|
if ((C == null ? void 0 : C.type) === "action" && ((d = C == null ? void 0 : C.payload) == null ? void 0 : d.state) === "pending")
|
|
684
684
|
return [];
|
|
685
685
|
if (((f = C == null ? void 0 : C.author) == null ? void 0 : f.type) !== "agent_ia") continue;
|
|
686
|
-
const M = (
|
|
686
|
+
const M = (g = C == null ? void 0 : C.metadata) == null ? void 0 : g.suggested_replies;
|
|
687
687
|
return Array.isArray(M) && M.length ? M.map((I) => {
|
|
688
688
|
if (typeof I == "string") {
|
|
689
689
|
const x = I.trim();
|
|
@@ -700,40 +700,40 @@ function Qe(e) {
|
|
|
700
700
|
}
|
|
701
701
|
return [];
|
|
702
702
|
}
|
|
703
|
-
function
|
|
704
|
-
var
|
|
705
|
-
const
|
|
703
|
+
function V(h, m) {
|
|
704
|
+
var g;
|
|
705
|
+
const _ = t.messagesByConv[h] || [];
|
|
706
706
|
let d = -1;
|
|
707
|
-
m != null && m.client_msg_id && (d =
|
|
707
|
+
m != null && m.client_msg_id && (d = _.findIndex(
|
|
708
708
|
(b) => (b == null ? void 0 : b.client_msg_id) && b.client_msg_id === m.client_msg_id
|
|
709
|
-
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d =
|
|
709
|
+
)), d === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (d = _.findIndex((b) => ne(b == null ? void 0 : b.id, m.id)));
|
|
710
710
|
let f;
|
|
711
|
-
d === -1 ? f = [...
|
|
712
|
-
...
|
|
711
|
+
d === -1 ? f = [..._, m].sort(ce) : (f = _.slice(), f[d] = {
|
|
712
|
+
..._[d],
|
|
713
713
|
...m,
|
|
714
714
|
_pending: !1,
|
|
715
715
|
_failed: !1
|
|
716
|
-
}), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((
|
|
716
|
+
}), t.messagesByConv[h] = f, (m == null ? void 0 : m.type) === "action" && ((g = m == null ? void 0 : m.payload) != null && g.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && t.awaitingCallback[m.id] && delete t.awaitingCallback[m.id];
|
|
717
717
|
}
|
|
718
718
|
function ne(h, m) {
|
|
719
719
|
return h === m ? !0 : h == null || m == null ? !1 : String(h) === String(m);
|
|
720
720
|
}
|
|
721
|
-
function J(h, m,
|
|
721
|
+
function J(h, m, _) {
|
|
722
722
|
const d = t.messagesByConv[h];
|
|
723
723
|
if (!d) return;
|
|
724
724
|
const f = d.findIndex((b) => b.id === m);
|
|
725
725
|
if (f === -1) return;
|
|
726
|
-
const
|
|
727
|
-
|
|
726
|
+
const g = d.slice();
|
|
727
|
+
g[f] = { ...d[f], ..._ }, t.messagesByConv[h] = g;
|
|
728
728
|
}
|
|
729
729
|
function se(h, m) {
|
|
730
|
-
const
|
|
731
|
-
if (
|
|
732
|
-
const d = t.conversations[
|
|
730
|
+
const _ = t.conversations.findIndex((f) => f.id === h);
|
|
731
|
+
if (_ === -1) return;
|
|
732
|
+
const d = t.conversations[_];
|
|
733
733
|
if (m && (!d.last_message_at || m > d.last_message_at)) {
|
|
734
734
|
const f = t.conversations.slice();
|
|
735
|
-
f[
|
|
736
|
-
(
|
|
735
|
+
f[_] = { ...d, last_message_at: m }, f.sort(
|
|
736
|
+
(g, b) => (b.last_message_at || "").localeCompare(g.last_message_at || "")
|
|
737
737
|
), t.conversations = f;
|
|
738
738
|
}
|
|
739
739
|
}
|
|
@@ -742,28 +742,28 @@ function Qe(e) {
|
|
|
742
742
|
}
|
|
743
743
|
function me(h) {
|
|
744
744
|
if (!h || typeof h != "object") return null;
|
|
745
|
-
const m = {},
|
|
745
|
+
const m = {}, _ = {};
|
|
746
746
|
for (const [d, f] of Object.entries(h))
|
|
747
|
-
f !== void 0 && (d === "name" || d === "email" || d === "language" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(
|
|
748
|
-
return Object.keys(
|
|
747
|
+
f !== void 0 && (d === "name" || d === "email" || d === "language" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(_, f) : _[d] = f);
|
|
748
|
+
return Object.keys(_).length && (m.values = _), Object.keys(m).length ? m : null;
|
|
749
749
|
}
|
|
750
750
|
function de(h) {
|
|
751
751
|
const m = t.messagesByConv[h] || [];
|
|
752
|
-
let
|
|
753
|
-
for (const
|
|
754
|
-
|
|
752
|
+
let _ = "";
|
|
753
|
+
for (const g of m)
|
|
754
|
+
g != null && g.created_at && g.created_at > _ && (_ = g.created_at);
|
|
755
755
|
const d = (/* @__PURE__ */ new Date()).toISOString();
|
|
756
|
-
return !
|
|
756
|
+
return !_ || d > _ ? d : new Date(Date.parse(_) + 1).toISOString();
|
|
757
757
|
}
|
|
758
758
|
return {
|
|
759
759
|
state: t,
|
|
760
760
|
start: i,
|
|
761
761
|
destroy: r,
|
|
762
762
|
applyCustomer: s,
|
|
763
|
-
createConversation:
|
|
763
|
+
createConversation: o,
|
|
764
764
|
openConversation: p,
|
|
765
765
|
loadMore: k,
|
|
766
|
-
fetchSinceLast:
|
|
766
|
+
fetchSinceLast: B,
|
|
767
767
|
patchConversation: T,
|
|
768
768
|
markConversationRead: A,
|
|
769
769
|
send: H,
|
|
@@ -794,7 +794,7 @@ const j = {
|
|
|
794
794
|
green: "#22C55E",
|
|
795
795
|
red: "#B91C1C",
|
|
796
796
|
redBg: "#FDECEC"
|
|
797
|
-
},
|
|
797
|
+
}, _e = [
|
|
798
798
|
"#5B5FEF",
|
|
799
799
|
"#7C3AED",
|
|
800
800
|
"#DB2777",
|
|
@@ -803,7 +803,7 @@ const j = {
|
|
|
803
803
|
"#059669"
|
|
804
804
|
];
|
|
805
805
|
function ye(e = "") {
|
|
806
|
-
return e ?
|
|
806
|
+
return e ? _e[e.charCodeAt(0) % _e.length] : _e[0];
|
|
807
807
|
}
|
|
808
808
|
function we(e = "") {
|
|
809
809
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
@@ -857,7 +857,7 @@ const Xe = `
|
|
|
857
857
|
0% { transform: translateX(110%); opacity: 0; }
|
|
858
858
|
100% { transform: translateX(0); opacity: 1; }
|
|
859
859
|
}
|
|
860
|
-
`, Ze = "https://api.messenger.victorc.fr", ae = "fr", et = ["fr", "en"], Ae = { fr: "fr-FR", en: "en-US" },
|
|
860
|
+
`, Ze = "https://api.messenger.victorc.fr", ae = "fr", et = ["fr", "en"], Ae = { fr: "fr-FR", en: "en-US" }, ge = {
|
|
861
861
|
fr: {
|
|
862
862
|
// ── Common ───────────────────────────────────────────────────────
|
|
863
863
|
"common.newConversation": "Nouvelle conversation",
|
|
@@ -905,6 +905,7 @@ Je réponds en quelques secondes.`,
|
|
|
905
905
|
"onboarding.newMessage": "Nouveau message",
|
|
906
906
|
"onboarding.statusInProgress": "En cours",
|
|
907
907
|
"onboarding.resume": "Reprendre",
|
|
908
|
+
"onboarding.unreadConversations": "Conversations non lues",
|
|
908
909
|
// ── Composer ─────────────────────────────────────────────────────
|
|
909
910
|
"composer.placeholder": "Écrivez votre message…",
|
|
910
911
|
"composer.replyTo": "Répondre à {name}…",
|
|
@@ -1028,6 +1029,7 @@ I reply within seconds.`,
|
|
|
1028
1029
|
"onboarding.newMessage": "New message",
|
|
1029
1030
|
"onboarding.statusInProgress": "In progress",
|
|
1030
1031
|
"onboarding.resume": "Resume",
|
|
1032
|
+
"onboarding.unreadConversations": "Unread conversations",
|
|
1031
1033
|
// ── Composer ─────────────────────────────────────────────────────
|
|
1032
1034
|
"composer.placeholder": "Type your message…",
|
|
1033
1035
|
"composer.replyTo": "Reply to {name}…",
|
|
@@ -1114,12 +1116,12 @@ function re(e) {
|
|
|
1114
1116
|
return Ae[be(e)] || Ae[ae];
|
|
1115
1117
|
}
|
|
1116
1118
|
function D(e) {
|
|
1117
|
-
const t = be(e), n =
|
|
1118
|
-
return function(s,
|
|
1119
|
+
const t = be(e), n = ge[t] || ge[ae], i = ge[ae];
|
|
1120
|
+
return function(s, o) {
|
|
1119
1121
|
let l = n[s];
|
|
1120
|
-
return l == null && (l = i[s]), l == null ? s : (
|
|
1122
|
+
return l == null && (l = i[s]), l == null ? s : (o && (l = l.replace(
|
|
1121
1123
|
/\{(\w+)\}/g,
|
|
1122
|
-
(p, k) =>
|
|
1124
|
+
(p, k) => o[k] != null ? String(o[k]) : p
|
|
1123
1125
|
)), l);
|
|
1124
1126
|
};
|
|
1125
1127
|
}
|
|
@@ -1136,9 +1138,9 @@ function tt(e, t, n = D()) {
|
|
|
1136
1138
|
const i = Array.isArray(e.fields) ? e.fields : [], r = [];
|
|
1137
1139
|
for (const s of i) {
|
|
1138
1140
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1139
|
-
const
|
|
1140
|
-
if (
|
|
1141
|
-
const l = Be(s,
|
|
1141
|
+
const o = t[s.key];
|
|
1142
|
+
if (o == null || o === "") continue;
|
|
1143
|
+
const l = Be(s, o, n);
|
|
1142
1144
|
l && r.push(`${s.label} :
|
|
1143
1145
|
${l}`);
|
|
1144
1146
|
}
|
|
@@ -1150,9 +1152,9 @@ function nt(e, t, n = D()) {
|
|
|
1150
1152
|
const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1151
1153
|
for (const s of r) {
|
|
1152
1154
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
1153
|
-
const
|
|
1154
|
-
if (
|
|
1155
|
-
const l = Be(s,
|
|
1155
|
+
const o = t == null ? void 0 : t[s.key];
|
|
1156
|
+
if (o == null || o === "") continue;
|
|
1157
|
+
const l = Be(s, o, n);
|
|
1156
1158
|
if (!l) continue;
|
|
1157
1159
|
const p = s.type === "textarea" || typeof l == "string" && (l.length > 60 || l.includes(`
|
|
1158
1160
|
`));
|
|
@@ -1185,12 +1187,12 @@ function Me(e, t) {
|
|
|
1185
1187
|
function st(e, t) {
|
|
1186
1188
|
var n, i, r;
|
|
1187
1189
|
for (let s = t.length - 1; s >= 0; s--) {
|
|
1188
|
-
const
|
|
1189
|
-
if (!
|
|
1190
|
-
const l = typeof
|
|
1190
|
+
const o = t[s];
|
|
1191
|
+
if (!o) continue;
|
|
1192
|
+
const l = typeof o.text_md == "string" ? o.text_md.trim() : "";
|
|
1191
1193
|
if (l)
|
|
1192
|
-
return (((n =
|
|
1193
|
-
const p = (i =
|
|
1194
|
+
return (((n = o.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + l.replace(/\s+/g, " ");
|
|
1195
|
+
const p = (i = o.payload) == null ? void 0 : i.attachments;
|
|
1194
1196
|
if (Array.isArray(p) && p.length) return "📎 Pièce jointe";
|
|
1195
1197
|
}
|
|
1196
1198
|
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((r = e == null ? void 0 : e.metadata) == null ? void 0 : r.last_preview) || "";
|
|
@@ -1208,10 +1210,10 @@ function it(e, t, n, i) {
|
|
|
1208
1210
|
];
|
|
1209
1211
|
for (const s of t) {
|
|
1210
1212
|
if (!s) continue;
|
|
1211
|
-
const
|
|
1212
|
-
if (!
|
|
1213
|
+
const o = (s.text_md || "").trim();
|
|
1214
|
+
if (!o) continue;
|
|
1213
1215
|
const l = rt(s.author, n), p = s.created_at ? new Date(s.created_at).toLocaleString(i) : "";
|
|
1214
|
-
r.push(`[${p}] ${l} :`), r.push(
|
|
1216
|
+
r.push(`[${p}] ${l} :`), r.push(o), r.push("");
|
|
1215
1217
|
}
|
|
1216
1218
|
return r.join(`
|
|
1217
1219
|
`);
|
|
@@ -1220,10 +1222,10 @@ function at(e, t, n = D(), i) {
|
|
|
1220
1222
|
if (!e) return;
|
|
1221
1223
|
const r = it(e, t || [], n, re(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
|
|
1222
1224
|
try {
|
|
1223
|
-
const
|
|
1224
|
-
l.href =
|
|
1225
|
-
} catch (
|
|
1226
|
-
console.error("[ww-messenger] export failed",
|
|
1225
|
+
const o = URL.createObjectURL(s), l = document.createElement("a");
|
|
1226
|
+
l.href = o, l.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(l), l.click(), document.body.removeChild(l), setTimeout(() => URL.revokeObjectURL(o), 1e3);
|
|
1227
|
+
} catch (o) {
|
|
1228
|
+
console.error("[ww-messenger] export failed", o);
|
|
1227
1229
|
}
|
|
1228
1230
|
}
|
|
1229
1231
|
const ot = {
|
|
@@ -1360,7 +1362,7 @@ const ot = {
|
|
|
1360
1362
|
},
|
|
1361
1363
|
showBrowserNotification(e, t) {
|
|
1362
1364
|
if (typeof Notification > "u" || Notification.permission !== "granted") return;
|
|
1363
|
-
const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"),
|
|
1365
|
+
const n = t == null ? void 0 : t.author, i = !n || n.type === "agent_ia", s = ((n == null ? void 0 : n.name) || (i ? this.agentName : "") || this.t("launcher.theAgent")) + this.t("launcher.repliedToYou"), o = typeof (t == null ? void 0 : t.text_md) == "string" ? t.text_md.trim() : "", l = o ? o.slice(0, 140) : this.t("notification.youHaveNewMessage");
|
|
1364
1366
|
try {
|
|
1365
1367
|
const p = new Notification(s, {
|
|
1366
1368
|
body: l,
|
|
@@ -1464,21 +1466,21 @@ const ot = {
|
|
|
1464
1466
|
const t = e == null ? void 0 : e.conversations;
|
|
1465
1467
|
if (!Array.isArray(t) || !this.store) return;
|
|
1466
1468
|
const n = this._liveRevealConvSnapshot || /* @__PURE__ */ new Map(), i = [];
|
|
1467
|
-
for (const
|
|
1468
|
-
if (!(
|
|
1469
|
-
const l =
|
|
1469
|
+
for (const o of t) {
|
|
1470
|
+
if (!(o != null && o.id)) continue;
|
|
1471
|
+
const l = o.last_message_at || "";
|
|
1470
1472
|
if (!l) continue;
|
|
1471
|
-
const p = n.get(
|
|
1472
|
-
l > p && i.push(
|
|
1473
|
+
const p = n.get(o.id) || "";
|
|
1474
|
+
l > p && i.push(o.id);
|
|
1473
1475
|
}
|
|
1474
1476
|
this._liveRevealConvSnapshot = new Map(
|
|
1475
|
-
t.map((
|
|
1477
|
+
t.map((o) => [o.id, (o == null ? void 0 : o.last_message_at) || ""])
|
|
1476
1478
|
);
|
|
1477
|
-
for (const
|
|
1479
|
+
for (const o of i)
|
|
1478
1480
|
try {
|
|
1479
|
-
const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r,
|
|
1481
|
+
const l = await ((s = (r = this.store).fetchSinceLast) == null ? void 0 : s.call(r, o));
|
|
1480
1482
|
if (!Array.isArray(l)) continue;
|
|
1481
|
-
for (const p of l) this.paceLiveMessage(p,
|
|
1483
|
+
for (const p of l) this.paceLiveMessage(p, o);
|
|
1482
1484
|
} catch (l) {
|
|
1483
1485
|
console.error(
|
|
1484
1486
|
"[ww-messenger] activity delta fetch failed",
|
|
@@ -1495,12 +1497,12 @@ const ot = {
|
|
|
1495
1497
|
const n = Date.now(), i = ((e == null ? void 0 : e.text_md) || "").length, r = Math.min(
|
|
1496
1498
|
ut,
|
|
1497
1499
|
Math.max(dt, i * ct)
|
|
1498
|
-
),
|
|
1500
|
+
), o = Math.max(
|
|
1499
1501
|
n + lt,
|
|
1500
1502
|
this.nextRevealAt + ht
|
|
1501
1503
|
) + r;
|
|
1502
|
-
this.nextRevealAt =
|
|
1503
|
-
const l = Math.max(0,
|
|
1504
|
+
this.nextRevealAt = o;
|
|
1505
|
+
const l = Math.max(0, o - n), p = e.id, k = setTimeout(() => {
|
|
1504
1506
|
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1505
1507
|
}, l);
|
|
1506
1508
|
this.revealTimers.push(k);
|
|
@@ -1520,8 +1522,8 @@ const ot = {
|
|
|
1520
1522
|
i[s.id] = n;
|
|
1521
1523
|
continue;
|
|
1522
1524
|
}
|
|
1523
|
-
const
|
|
1524
|
-
if (!Number.isFinite(
|
|
1525
|
+
const o = s != null && s.created_at ? Date.parse(s.created_at) : NaN;
|
|
1526
|
+
if (!Number.isFinite(o) || o < this.convOpenedAt) {
|
|
1525
1527
|
i[s.id] = n;
|
|
1526
1528
|
continue;
|
|
1527
1529
|
}
|
|
@@ -1589,7 +1591,7 @@ const ot = {
|
|
|
1589
1591
|
}, e);
|
|
1590
1592
|
}
|
|
1591
1593
|
}
|
|
1592
|
-
},
|
|
1594
|
+
}, _t = 300, gt = {
|
|
1593
1595
|
data() {
|
|
1594
1596
|
return {
|
|
1595
1597
|
// Numeric message id snapshot frozen the moment the user
|
|
@@ -1618,9 +1620,9 @@ const ot = {
|
|
|
1618
1620
|
// messages, or when the pointer is already at/ahead of the
|
|
1619
1621
|
// candidate id.
|
|
1620
1622
|
markConvRead(e) {
|
|
1621
|
-
var s,
|
|
1623
|
+
var s, o;
|
|
1622
1624
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1623
|
-
const t = ((
|
|
1625
|
+
const t = ((o = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : o[e.id]) || [], n = pt(t);
|
|
1624
1626
|
if (n == null) return;
|
|
1625
1627
|
const i = W(e.last_read_message_id), r = W(n);
|
|
1626
1628
|
r != null && (i != null && r <= i || (this._readMarkerPending = { convId: e.id, messageId: n }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
@@ -1629,7 +1631,7 @@ const ot = {
|
|
|
1629
1631
|
l.convId,
|
|
1630
1632
|
l.messageId
|
|
1631
1633
|
);
|
|
1632
|
-
},
|
|
1634
|
+
}, _t))));
|
|
1633
1635
|
}
|
|
1634
1636
|
}
|
|
1635
1637
|
};
|
|
@@ -1715,7 +1717,7 @@ const Re = /* @__PURE__ */ N(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d
|
|
|
1715
1717
|
}
|
|
1716
1718
|
}, Ct = ["aria-label", "onClick", "onKeydown"], At = ["aria-label", "onClick"], St = { class: "wm-peek__avatar" }, Mt = ["aria-label"], Tt = { class: "wm-peek__body" }, xt = { class: "wm-peek__head" }, Ot = { class: "wm-peek__name" }, Lt = { class: "wm-peek__action" }, It = { class: "wm-peek__text" }, Et = ["onClick"], Bt = ["aria-label"], Rt = ["aria-label"];
|
|
1717
1719
|
function Nt(e, t, n, i, r, s) {
|
|
1718
|
-
const
|
|
1720
|
+
const o = R("HumanAvatar");
|
|
1719
1721
|
return c(), u("div", {
|
|
1720
1722
|
class: "wm-launcherWrap",
|
|
1721
1723
|
onMouseenter: t[1] || (t[1] = (l) => e.$emit("hover", !0)),
|
|
@@ -1723,13 +1725,13 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1723
1725
|
onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
|
|
1724
1726
|
onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
|
|
1725
1727
|
}, [
|
|
1726
|
-
|
|
1728
|
+
K(Ie, { name: "wm-peek" }, {
|
|
1727
1729
|
default: Ee(() => [
|
|
1728
1730
|
s.visiblePeeks.length ? (c(), u("div", {
|
|
1729
1731
|
key: 0,
|
|
1730
1732
|
class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1731
1733
|
}, [
|
|
1732
|
-
(c(!0), u(
|
|
1734
|
+
(c(!0), u(E, null, U(s.visiblePeeks, (l, p) => (c(), u("div", {
|
|
1733
1735
|
key: l.convId,
|
|
1734
1736
|
class: "wm-peek",
|
|
1735
1737
|
style: q({
|
|
@@ -1747,13 +1749,13 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1747
1749
|
ue(G((k) => e.$emit("open", l.convId), ["prevent"]), ["space"])
|
|
1748
1750
|
]
|
|
1749
1751
|
}, [
|
|
1750
|
-
|
|
1752
|
+
a("button", {
|
|
1751
1753
|
type: "button",
|
|
1752
1754
|
class: "wm-peek__close",
|
|
1753
1755
|
"aria-label": s.t("launcher.dismiss"),
|
|
1754
1756
|
onClick: G((k) => e.$emit("dismiss", l.convId), ["stop"])
|
|
1755
1757
|
}, [...t[5] || (t[5] = [
|
|
1756
|
-
|
|
1758
|
+
a("svg", {
|
|
1757
1759
|
width: "9",
|
|
1758
1760
|
height: "9",
|
|
1759
1761
|
viewBox: "0 0 24 24",
|
|
@@ -1764,11 +1766,11 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1764
1766
|
"stroke-linejoin": "round",
|
|
1765
1767
|
"aria-hidden": "true"
|
|
1766
1768
|
}, [
|
|
1767
|
-
|
|
1769
|
+
a("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1768
1770
|
], -1)
|
|
1769
1771
|
])], 8, At),
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
+
a("div", St, [
|
|
1773
|
+
K(o, {
|
|
1772
1774
|
name: l.senderName,
|
|
1773
1775
|
"avatar-url": l.senderAvatarUrl,
|
|
1774
1776
|
size: 34
|
|
@@ -1779,14 +1781,14 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1779
1781
|
"aria-label": s.t("launcher.unreadMessages", { count: l.count })
|
|
1780
1782
|
}, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : y("", !0)
|
|
1781
1783
|
]),
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1784
|
+
a("div", Tt, [
|
|
1785
|
+
a("div", xt, [
|
|
1786
|
+
a("span", Ot, v(l.senderName || s.t("common.agent")), 1),
|
|
1787
|
+
a("span", Lt, v(s.t("launcher.repliedToYou")), 1)
|
|
1786
1788
|
]),
|
|
1787
|
-
|
|
1789
|
+
a("p", It, v(l.preview), 1)
|
|
1788
1790
|
]),
|
|
1789
|
-
|
|
1791
|
+
a("button", {
|
|
1790
1792
|
type: "button",
|
|
1791
1793
|
class: "wm-peek__open",
|
|
1792
1794
|
onClick: G((k) => e.$emit("open", l.convId), ["stop"])
|
|
@@ -1796,13 +1798,13 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1796
1798
|
]),
|
|
1797
1799
|
_: 1
|
|
1798
1800
|
}),
|
|
1799
|
-
|
|
1801
|
+
a("button", {
|
|
1800
1802
|
type: "button",
|
|
1801
1803
|
class: "wm-launcher",
|
|
1802
1804
|
"aria-label": s.t("launcher.open"),
|
|
1803
1805
|
onClick: t[0] || (t[0] = (l) => e.$emit("open"))
|
|
1804
1806
|
}, [
|
|
1805
|
-
t[6] || (t[6] =
|
|
1807
|
+
t[6] || (t[6] = a("svg", {
|
|
1806
1808
|
width: "20",
|
|
1807
1809
|
height: "20",
|
|
1808
1810
|
viewBox: "0 0 24 24",
|
|
@@ -1813,7 +1815,7 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1813
1815
|
"stroke-linejoin": "round",
|
|
1814
1816
|
"aria-hidden": "true"
|
|
1815
1817
|
}, [
|
|
1816
|
-
|
|
1818
|
+
a("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
1817
1819
|
], -1)),
|
|
1818
1820
|
n.unreadCount > 0 ? (c(), u("span", {
|
|
1819
1821
|
key: 0,
|
|
@@ -1870,7 +1872,7 @@ function Ht(e, t, n, i, r, s) {
|
|
|
1870
1872
|
})
|
|
1871
1873
|
}, [
|
|
1872
1874
|
n.pulse ? (c(), u("div", Ut)) : y("", !0),
|
|
1873
|
-
|
|
1875
|
+
a("div", {
|
|
1874
1876
|
class: O(["wm-aiav__inner", {
|
|
1875
1877
|
"wm-aiav__inner--glow": n.pulse,
|
|
1876
1878
|
"wm-aiav__inner--img": !!n.imageUrl,
|
|
@@ -1895,19 +1897,19 @@ function Ht(e, t, n, i, r, s) {
|
|
|
1895
1897
|
fill: "none",
|
|
1896
1898
|
"aria-hidden": "true"
|
|
1897
1899
|
}, [...t[0] || (t[0] = [
|
|
1898
|
-
|
|
1900
|
+
a("path", {
|
|
1899
1901
|
d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
|
|
1900
1902
|
fill: "white",
|
|
1901
1903
|
opacity: "0.92"
|
|
1902
1904
|
}, null, -1),
|
|
1903
|
-
|
|
1905
|
+
a("circle", {
|
|
1904
1906
|
cx: "19",
|
|
1905
1907
|
cy: "5",
|
|
1906
1908
|
r: "1.5",
|
|
1907
1909
|
fill: "white",
|
|
1908
1910
|
opacity: "0.55"
|
|
1909
1911
|
}, null, -1),
|
|
1910
|
-
|
|
1912
|
+
a("circle", {
|
|
1911
1913
|
cx: "5",
|
|
1912
1914
|
cy: "18",
|
|
1913
1915
|
r: "1",
|
|
@@ -1943,33 +1945,33 @@ const le = /* @__PURE__ */ N(Ft, [["render", Ht], ["__scopeId", "data-v-6f7f685d
|
|
|
1943
1945
|
}, qt = {
|
|
1944
1946
|
key: 0,
|
|
1945
1947
|
class: "wm-team"
|
|
1946
|
-
},
|
|
1948
|
+
}, Kt = ["src", "alt"], Vt = { key: 1 }, $t = {
|
|
1947
1949
|
key: 0,
|
|
1948
1950
|
class: "wm-team__label"
|
|
1949
1951
|
};
|
|
1950
1952
|
function Wt(e, t, n, i, r, s) {
|
|
1951
1953
|
return s.visible ? (c(), u("div", qt, [
|
|
1952
|
-
|
|
1954
|
+
a("div", {
|
|
1953
1955
|
class: "wm-team__stack",
|
|
1954
1956
|
style: q({ width: s.stackWidth + "px" })
|
|
1955
1957
|
}, [
|
|
1956
|
-
(c(!0), u(
|
|
1958
|
+
(c(!0), u(E, null, U(n.members.slice(0, 3), (o, l) => (c(), u("div", {
|
|
1957
1959
|
key: l,
|
|
1958
1960
|
class: "wm-team__pill",
|
|
1959
1961
|
style: q({
|
|
1960
1962
|
left: l * 13 + "px",
|
|
1961
1963
|
zIndex: 3 - l,
|
|
1962
|
-
background: s.colorFor(
|
|
1964
|
+
background: s.colorFor(o)
|
|
1963
1965
|
})
|
|
1964
1966
|
}, [
|
|
1965
|
-
|
|
1967
|
+
o.avatar_url ? (c(), u("img", {
|
|
1966
1968
|
key: 0,
|
|
1967
|
-
src:
|
|
1968
|
-
alt:
|
|
1969
|
-
}, null, 8,
|
|
1969
|
+
src: o.avatar_url,
|
|
1970
|
+
alt: o.name || ""
|
|
1971
|
+
}, null, 8, Kt)) : (c(), u("span", Vt, v(s.initialsFor(o)), 1))
|
|
1970
1972
|
], 4))), 128))
|
|
1971
1973
|
], 4),
|
|
1972
|
-
n.responseLabel ? (c(), u("span",
|
|
1974
|
+
n.responseLabel ? (c(), u("span", $t, v(n.responseLabel), 1)) : y("", !0)
|
|
1973
1975
|
])) : y("", !0);
|
|
1974
1976
|
}
|
|
1975
1977
|
const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
|
|
@@ -2019,7 +2021,7 @@ const Gt = /* @__PURE__ */ N(zt, [["render", Wt], ["__scopeId", "data-v-e49a9063
|
|
|
2019
2021
|
class: "wm-header__fill"
|
|
2020
2022
|
}, sn = { class: "wm-header__actions" }, rn = ["aria-label", "title"], an = ["aria-label", "title"];
|
|
2021
2023
|
function on(e, t, n, i, r, s) {
|
|
2022
|
-
const
|
|
2024
|
+
const o = R("AIAvatar"), l = R("TeamAvatars");
|
|
2023
2025
|
return c(), u("div", Jt, [
|
|
2024
2026
|
n.showBack ? (c(), u("button", {
|
|
2025
2027
|
key: 0,
|
|
@@ -2028,7 +2030,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2028
2030
|
"aria-label": s.t("header.backToHome"),
|
|
2029
2031
|
onClick: t[0] || (t[0] = (p) => e.$emit("back"))
|
|
2030
2032
|
}, [...t[3] || (t[3] = [
|
|
2031
|
-
|
|
2033
|
+
a("svg", {
|
|
2032
2034
|
width: "13",
|
|
2033
2035
|
height: "13",
|
|
2034
2036
|
viewBox: "0 0 24 24",
|
|
@@ -2039,19 +2041,19 @@ function on(e, t, n, i, r, s) {
|
|
|
2039
2041
|
"stroke-linejoin": "round",
|
|
2040
2042
|
"aria-hidden": "true"
|
|
2041
2043
|
}, [
|
|
2042
|
-
|
|
2044
|
+
a("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2043
2045
|
], -1)
|
|
2044
2046
|
])], 8, Qt)) : (c(), u("div", Xt)),
|
|
2045
|
-
n.showIdentity ? (c(), u(
|
|
2046
|
-
|
|
2047
|
-
|
|
2047
|
+
n.showIdentity ? (c(), u(E, { key: 2 }, [
|
|
2048
|
+
a("div", Zt, [
|
|
2049
|
+
K(o, {
|
|
2048
2050
|
size: 30,
|
|
2049
2051
|
name: n.agentName,
|
|
2050
2052
|
"image-url": n.agentAvatarUrl
|
|
2051
2053
|
}, null, 8, ["name", "image-url"])
|
|
2052
2054
|
]),
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
+
a("div", en, [
|
|
2056
|
+
a("div", tn, v(n.title), 1)
|
|
2055
2057
|
]),
|
|
2056
2058
|
s.hasTeam ? (c(), P(l, {
|
|
2057
2059
|
key: 0,
|
|
@@ -2059,7 +2061,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2059
2061
|
"response-label": ""
|
|
2060
2062
|
}, null, 8, ["members"])) : y("", !0)
|
|
2061
2063
|
], 64)) : (c(), u("div", nn)),
|
|
2062
|
-
|
|
2064
|
+
a("div", sn, [
|
|
2063
2065
|
n.showMore ? (c(), u("button", {
|
|
2064
2066
|
key: 0,
|
|
2065
2067
|
type: "button",
|
|
@@ -2068,24 +2070,24 @@ function on(e, t, n, i, r, s) {
|
|
|
2068
2070
|
title: s.t("header.moreOptions"),
|
|
2069
2071
|
onClick: t[1] || (t[1] = (p) => e.$emit("more"))
|
|
2070
2072
|
}, [...t[4] || (t[4] = [
|
|
2071
|
-
|
|
2073
|
+
a("svg", {
|
|
2072
2074
|
width: "13",
|
|
2073
2075
|
height: "13",
|
|
2074
2076
|
viewBox: "0 0 24 24",
|
|
2075
2077
|
fill: "currentColor",
|
|
2076
2078
|
"aria-hidden": "true"
|
|
2077
2079
|
}, [
|
|
2078
|
-
|
|
2080
|
+
a("circle", {
|
|
2079
2081
|
cx: "12",
|
|
2080
2082
|
cy: "5",
|
|
2081
2083
|
r: "1.6"
|
|
2082
2084
|
}),
|
|
2083
|
-
|
|
2085
|
+
a("circle", {
|
|
2084
2086
|
cx: "12",
|
|
2085
2087
|
cy: "12",
|
|
2086
2088
|
r: "1.6"
|
|
2087
2089
|
}),
|
|
2088
|
-
|
|
2090
|
+
a("circle", {
|
|
2089
2091
|
cx: "12",
|
|
2090
2092
|
cy: "19",
|
|
2091
2093
|
r: "1.6"
|
|
@@ -2100,7 +2102,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2100
2102
|
title: s.t("header.closeWidget"),
|
|
2101
2103
|
onClick: t[2] || (t[2] = (p) => e.$emit("close"))
|
|
2102
2104
|
}, [...t[5] || (t[5] = [
|
|
2103
|
-
|
|
2105
|
+
a("svg", {
|
|
2104
2106
|
width: "13",
|
|
2105
2107
|
height: "13",
|
|
2106
2108
|
viewBox: "0 0 24 24",
|
|
@@ -2111,7 +2113,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2111
2113
|
"stroke-linejoin": "round",
|
|
2112
2114
|
"aria-hidden": "true"
|
|
2113
2115
|
}, [
|
|
2114
|
-
|
|
2116
|
+
a("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2115
2117
|
], -1)
|
|
2116
2118
|
])], 8, an)) : y("", !0)
|
|
2117
2119
|
])
|
|
@@ -2179,10 +2181,10 @@ function un(e) {
|
|
|
2179
2181
|
if (!A) break;
|
|
2180
2182
|
w.push(A[1]), i++;
|
|
2181
2183
|
}
|
|
2182
|
-
const T = w.map((A) => `<li>${ie(A)}</li>`).join(""),
|
|
2184
|
+
const T = w.map((A) => `<li>${ie(A)}</li>`).join(""), B = k !== 1 ? ` start="${k}"` : "";
|
|
2183
2185
|
n.push({
|
|
2184
2186
|
type: "block",
|
|
2185
|
-
html: `<ol class="wm-md-ol"${
|
|
2187
|
+
html: `<ol class="wm-md-ol"${B}>${T}</ol>`
|
|
2186
2188
|
});
|
|
2187
2189
|
continue;
|
|
2188
2190
|
}
|
|
@@ -2199,10 +2201,10 @@ function un(e) {
|
|
|
2199
2201
|
}
|
|
2200
2202
|
let r = "";
|
|
2201
2203
|
for (let s = 0; s < n.length; s++) {
|
|
2202
|
-
const
|
|
2203
|
-
r +=
|
|
2204
|
+
const o = n[s];
|
|
2205
|
+
r += o.html;
|
|
2204
2206
|
const l = n[s + 1];
|
|
2205
|
-
l &&
|
|
2207
|
+
l && o.type !== "block" && l.type !== "block" && (r += `
|
|
2206
2208
|
`);
|
|
2207
2209
|
}
|
|
2208
2210
|
return r;
|
|
@@ -2253,6 +2255,9 @@ const xe = {
|
|
|
2253
2255
|
return e ? this.openThreads.filter(
|
|
2254
2256
|
(t) => (t.title || "").toLowerCase().includes(e) || (t.preview || "").toLowerCase().includes(e)
|
|
2255
2257
|
) : this.openThreads;
|
|
2258
|
+
},
|
|
2259
|
+
unreadThreads() {
|
|
2260
|
+
return this.openThreads.filter((e) => e.unread);
|
|
2256
2261
|
}
|
|
2257
2262
|
},
|
|
2258
2263
|
methods: {
|
|
@@ -2273,8 +2278,8 @@ const xe = {
|
|
|
2273
2278
|
minute: "2-digit"
|
|
2274
2279
|
});
|
|
2275
2280
|
if (i.getTime() - t.getTime() < 7 * 864e5) {
|
|
2276
|
-
const
|
|
2277
|
-
return
|
|
2281
|
+
const o = t.toLocaleDateString(n, { weekday: "short" });
|
|
2282
|
+
return o.charAt(0).toUpperCase() + o.slice(1);
|
|
2278
2283
|
}
|
|
2279
2284
|
return t.toLocaleDateString(n, {
|
|
2280
2285
|
day: "2-digit",
|
|
@@ -2282,7 +2287,7 @@ const xe = {
|
|
|
2282
2287
|
});
|
|
2283
2288
|
}
|
|
2284
2289
|
}
|
|
2285
|
-
}, mn = { class: "wm-onb" }, fn = { class: "wm-onb__hero" },
|
|
2290
|
+
}, mn = { class: "wm-onb" }, fn = { class: "wm-onb__hero" }, _n = { class: "wm-onb__hero-text" }, gn = { class: "wm-onb__title" }, pn = { class: "wm-onb__sub" }, vn = { class: "wm-onb__cta" }, yn = ["disabled"], wn = {
|
|
2286
2291
|
key: 0,
|
|
2287
2292
|
class: "wm-onb__section wm-onb__section--card"
|
|
2288
2293
|
}, bn = { class: "wm-onb__section-title" }, kn = ["onClick"], Cn = { class: "wm-onb__card-icon" }, An = {
|
|
@@ -2301,21 +2306,27 @@ const xe = {
|
|
|
2301
2306
|
}, On = {
|
|
2302
2307
|
key: 1,
|
|
2303
2308
|
class: "wm-onb__section wm-onb__section--card"
|
|
2304
|
-
}, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-
|
|
2309
|
+
}, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__alertList" }, En = { class: "wm-onb__alert-body" }, Bn = { class: "wm-onb__alert-status" }, Rn = { class: "wm-onb__alert-statusLabel" }, Nn = {
|
|
2305
2310
|
key: 0,
|
|
2306
|
-
class: "wm-
|
|
2307
|
-
},
|
|
2311
|
+
class: "wm-onb__alert-statusSep"
|
|
2312
|
+
}, Pn = {
|
|
2308
2313
|
key: 1,
|
|
2314
|
+
class: "wm-onb__alert-time"
|
|
2315
|
+
}, Fn = { class: "wm-onb__alert-title" }, Un = ["innerHTML"], Dn = ["onClick"], jn = {
|
|
2316
|
+
key: 2,
|
|
2317
|
+
class: "wm-onb__section wm-onb__section--card"
|
|
2318
|
+
}, Hn = { class: "wm-onb__section-title" }, zn = { class: "wm-onb__search" }, qn = ["placeholder", "aria-label"], Kn = { class: "wm-onb__list" }, Vn = ["onClick"], $n = ["aria-label"], Wn = { class: "wm-onb__thread-body" }, Gn = { class: "wm-onb__thread-title" }, Yn = ["innerHTML"], Jn = { class: "wm-onb__thread-meta" }, Qn = {
|
|
2319
|
+
key: 0,
|
|
2309
2320
|
class: "wm-onb__thread-time"
|
|
2310
|
-
},
|
|
2321
|
+
}, Xn = {
|
|
2311
2322
|
key: 0,
|
|
2312
2323
|
class: "wm-onb__empty"
|
|
2313
2324
|
};
|
|
2314
|
-
function
|
|
2315
|
-
const
|
|
2325
|
+
function Zn(e, t, n, i, r, s) {
|
|
2326
|
+
const o = R("AIAvatar");
|
|
2316
2327
|
return c(), u("div", mn, [
|
|
2317
|
-
|
|
2318
|
-
t[2] || (t[2] =
|
|
2328
|
+
a("div", fn, [
|
|
2329
|
+
t[2] || (t[2] = a("svg", {
|
|
2319
2330
|
class: "wm-onb__hero-deco",
|
|
2320
2331
|
width: "180",
|
|
2321
2332
|
height: "180",
|
|
@@ -2323,7 +2334,7 @@ function qn(e, t, n, i, r, s) {
|
|
|
2323
2334
|
fill: "none",
|
|
2324
2335
|
"aria-hidden": "true"
|
|
2325
2336
|
}, [
|
|
2326
|
-
|
|
2337
|
+
a("circle", {
|
|
2327
2338
|
cx: "170",
|
|
2328
2339
|
cy: "10",
|
|
2329
2340
|
r: "105",
|
|
@@ -2332,7 +2343,7 @@ function qn(e, t, n, i, r, s) {
|
|
|
2332
2343
|
"stroke-dasharray": "1 5",
|
|
2333
2344
|
opacity: "0.35"
|
|
2334
2345
|
}),
|
|
2335
|
-
|
|
2346
|
+
a("circle", {
|
|
2336
2347
|
cx: "170",
|
|
2337
2348
|
cy: "10",
|
|
2338
2349
|
r: "72",
|
|
@@ -2341,7 +2352,7 @@ function qn(e, t, n, i, r, s) {
|
|
|
2341
2352
|
"stroke-dasharray": "1 5",
|
|
2342
2353
|
opacity: "0.5"
|
|
2343
2354
|
}),
|
|
2344
|
-
|
|
2355
|
+
a("circle", {
|
|
2345
2356
|
cx: "152",
|
|
2346
2357
|
cy: "34",
|
|
2347
2358
|
r: "2.5",
|
|
@@ -2349,24 +2360,24 @@ function qn(e, t, n, i, r, s) {
|
|
|
2349
2360
|
opacity: "0.65"
|
|
2350
2361
|
})
|
|
2351
2362
|
], -1)),
|
|
2352
|
-
|
|
2363
|
+
K(o, {
|
|
2353
2364
|
size: 52,
|
|
2354
2365
|
"image-url": n.defaultIconUrl
|
|
2355
2366
|
}, null, 8, ["image-url"]),
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2367
|
+
a("div", _n, [
|
|
2368
|
+
a("div", gn, v(s.heroTitle), 1),
|
|
2369
|
+
a("div", pn, v(s.heroSub), 1)
|
|
2359
2370
|
])
|
|
2360
2371
|
]),
|
|
2361
|
-
|
|
2362
|
-
|
|
2372
|
+
a("div", vn, [
|
|
2373
|
+
a("button", {
|
|
2363
2374
|
type: "button",
|
|
2364
2375
|
class: "wm-onb__startBtn",
|
|
2365
2376
|
disabled: n.busy,
|
|
2366
2377
|
onClick: t[0] || (t[0] = (l) => e.$emit("start"))
|
|
2367
2378
|
}, [
|
|
2368
|
-
t[3] || (t[3] =
|
|
2369
|
-
|
|
2379
|
+
t[3] || (t[3] = a("span", { class: "wm-onb__startIcon" }, [
|
|
2380
|
+
a("svg", {
|
|
2370
2381
|
width: "12",
|
|
2371
2382
|
height: "12",
|
|
2372
2383
|
viewBox: "0 0 24 24",
|
|
@@ -2377,42 +2388,84 @@ function qn(e, t, n, i, r, s) {
|
|
|
2377
2388
|
"stroke-linejoin": "round",
|
|
2378
2389
|
"aria-hidden": "true"
|
|
2379
2390
|
}, [
|
|
2380
|
-
|
|
2391
|
+
a("path", { d: "M12 5v14M5 12h14" })
|
|
2381
2392
|
])
|
|
2382
2393
|
], -1)),
|
|
2383
|
-
|
|
2394
|
+
a("span", null, v(n.busy ? "…" : s.t("onboarding.start")), 1)
|
|
2384
2395
|
], 8, yn)
|
|
2385
2396
|
]),
|
|
2386
2397
|
n.quickLinks.length ? (c(), u("div", wn, [
|
|
2387
|
-
|
|
2388
|
-
|
|
2398
|
+
a("div", bn, v(s.t("onboarding.quickAccess")), 1),
|
|
2399
|
+
a("div", {
|
|
2389
2400
|
class: O(s.quickLinksLayout)
|
|
2390
2401
|
}, [
|
|
2391
|
-
(c(!0), u(
|
|
2402
|
+
(c(!0), u(E, null, U(n.quickLinks, (l, p) => (c(), u("button", {
|
|
2392
2403
|
key: p,
|
|
2393
2404
|
type: "button",
|
|
2394
2405
|
class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
|
|
2395
2406
|
onClick: (k) => e.$emit("select", l)
|
|
2396
2407
|
}, [
|
|
2397
|
-
|
|
2408
|
+
a("span", Cn, [
|
|
2398
2409
|
(c(), u("svg", An, [
|
|
2399
|
-
|
|
2410
|
+
a("path", {
|
|
2400
2411
|
d: s.iconPath(l.icon)
|
|
2401
2412
|
}, null, 8, Sn)
|
|
2402
2413
|
]))
|
|
2403
2414
|
]),
|
|
2404
|
-
|
|
2405
|
-
|
|
2415
|
+
a("span", Mn, [
|
|
2416
|
+
a("span", Tn, v(l.label), 1),
|
|
2406
2417
|
l.description ? (c(), u("span", xn, v(l.description), 1)) : y("", !0)
|
|
2407
2418
|
])
|
|
2408
2419
|
], 10, kn))), 128))
|
|
2409
2420
|
], 2)
|
|
2410
2421
|
])) : y("", !0),
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2422
|
+
s.unreadThreads.length ? (c(), u("div", On, [
|
|
2423
|
+
a("div", Ln, v(s.t("onboarding.unreadConversations")), 1),
|
|
2424
|
+
a("div", In, [
|
|
2425
|
+
(c(!0), u(E, null, U(s.unreadThreads, (l) => (c(), u("div", {
|
|
2426
|
+
key: l.id,
|
|
2427
|
+
class: "wm-onb__alert"
|
|
2428
|
+
}, [
|
|
2429
|
+
t[4] || (t[4] = a("span", { class: "wm-onb__alert-icon" }, [
|
|
2430
|
+
a("svg", {
|
|
2431
|
+
width: "18",
|
|
2432
|
+
height: "18",
|
|
2433
|
+
viewBox: "0 0 24 24",
|
|
2434
|
+
fill: "none",
|
|
2435
|
+
"aria-hidden": "true"
|
|
2436
|
+
}, [
|
|
2437
|
+
a("path", {
|
|
2438
|
+
d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
|
|
2439
|
+
fill: "currentColor",
|
|
2440
|
+
opacity: "0.92"
|
|
2441
|
+
})
|
|
2442
|
+
])
|
|
2443
|
+
], -1)),
|
|
2444
|
+
a("span", En, [
|
|
2445
|
+
a("span", Bn, [
|
|
2446
|
+
a("span", Rn, v(s.t("onboarding.statusInProgress")), 1),
|
|
2447
|
+
s.formatTs(l._ts) ? (c(), u("span", Nn, "·")) : y("", !0),
|
|
2448
|
+
s.formatTs(l._ts) ? (c(), u("span", Pn, v(s.formatTs(l._ts)), 1)) : y("", !0)
|
|
2449
|
+
]),
|
|
2450
|
+
a("span", Fn, v(l.title), 1),
|
|
2451
|
+
a("span", {
|
|
2452
|
+
class: "wm-onb__alert-preview",
|
|
2453
|
+
innerHTML: s.renderPreview(l.preview)
|
|
2454
|
+
}, null, 8, Un)
|
|
2455
|
+
]),
|
|
2456
|
+
a("button", {
|
|
2457
|
+
type: "button",
|
|
2458
|
+
class: "wm-onb__alert-resume",
|
|
2459
|
+
onClick: (p) => e.$emit("resume", l)
|
|
2460
|
+
}, v(s.t("onboarding.resume")), 9, Dn)
|
|
2461
|
+
]))), 128))
|
|
2462
|
+
])
|
|
2463
|
+
])) : y("", !0),
|
|
2464
|
+
n.openThreads.length ? (c(), u("div", jn, [
|
|
2465
|
+
a("div", Hn, v(s.t("onboarding.recentConversations")), 1),
|
|
2466
|
+
a("div", zn, [
|
|
2467
|
+
t[5] || (t[5] = a("span", { class: "wm-onb__searchIcon" }, [
|
|
2468
|
+
a("svg", {
|
|
2416
2469
|
width: "12",
|
|
2417
2470
|
height: "12",
|
|
2418
2471
|
viewBox: "0 0 24 24",
|
|
@@ -2423,66 +2476,82 @@ function qn(e, t, n, i, r, s) {
|
|
|
2423
2476
|
"stroke-linejoin": "round",
|
|
2424
2477
|
"aria-hidden": "true"
|
|
2425
2478
|
}, [
|
|
2426
|
-
|
|
2479
|
+
a("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
2427
2480
|
])
|
|
2428
2481
|
], -1)),
|
|
2429
|
-
|
|
2482
|
+
$(a("input", {
|
|
2430
2483
|
"onUpdate:modelValue": t[1] || (t[1] = (l) => r.query = l),
|
|
2431
2484
|
type: "text",
|
|
2432
2485
|
placeholder: s.t("onboarding.search"),
|
|
2433
2486
|
"aria-label": s.t("onboarding.search")
|
|
2434
|
-
}, null, 8,
|
|
2487
|
+
}, null, 8, qn), [
|
|
2435
2488
|
[X, r.query]
|
|
2436
2489
|
])
|
|
2437
2490
|
]),
|
|
2438
|
-
|
|
2439
|
-
(c(!0), u(
|
|
2491
|
+
a("div", Kn, [
|
|
2492
|
+
(c(!0), u(E, null, U(s.filteredThreads, (l) => (c(), u("button", {
|
|
2440
2493
|
key: l.id,
|
|
2441
|
-
|
|
2494
|
+
type: "button",
|
|
2495
|
+
class: "wm-onb__thread",
|
|
2496
|
+
onClick: (p) => e.$emit("resume", l)
|
|
2442
2497
|
}, [
|
|
2443
|
-
|
|
2444
|
-
|
|
2498
|
+
a("span", {
|
|
2499
|
+
class: O(["wm-onb__thread-icon", { "wm-onb__thread-icon--inverted": !l.unread }])
|
|
2500
|
+
}, [
|
|
2501
|
+
t[6] || (t[6] = a("svg", {
|
|
2445
2502
|
width: "18",
|
|
2446
2503
|
height: "18",
|
|
2447
2504
|
viewBox: "0 0 24 24",
|
|
2448
2505
|
fill: "none",
|
|
2449
2506
|
"aria-hidden": "true"
|
|
2450
2507
|
}, [
|
|
2451
|
-
|
|
2508
|
+
a("path", {
|
|
2452
2509
|
d: "M12 2 L13.5 9 L20 10.5 L13.5 12 L12 19 L10.5 12 L4 10.5 L10.5 9 Z",
|
|
2453
2510
|
fill: "currentColor",
|
|
2454
2511
|
opacity: "0.92"
|
|
2455
2512
|
})
|
|
2456
|
-
])
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2513
|
+
], -1)),
|
|
2514
|
+
l.unread ? (c(), u("span", {
|
|
2515
|
+
key: 0,
|
|
2516
|
+
class: "wm-onb__thread-dot",
|
|
2517
|
+
"aria-label": s.t("onboarding.unread")
|
|
2518
|
+
}, null, 8, $n)) : y("", !0)
|
|
2519
|
+
], 2),
|
|
2520
|
+
a("span", Wn, [
|
|
2521
|
+
a("span", Gn, v(l.title), 1),
|
|
2522
|
+
a("span", {
|
|
2466
2523
|
class: "wm-onb__thread-preview",
|
|
2467
2524
|
innerHTML: s.renderPreview(l.preview)
|
|
2468
|
-
}, null, 8,
|
|
2525
|
+
}, null, 8, Yn)
|
|
2469
2526
|
]),
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2527
|
+
a("span", Jn, [
|
|
2528
|
+
s.formatTs(l._ts) ? (c(), u("span", Qn, v(s.formatTs(l._ts)), 1)) : y("", !0),
|
|
2529
|
+
t[7] || (t[7] = a("svg", {
|
|
2530
|
+
width: "14",
|
|
2531
|
+
height: "14",
|
|
2532
|
+
viewBox: "0 0 24 24",
|
|
2533
|
+
fill: "none",
|
|
2534
|
+
stroke: "currentColor",
|
|
2535
|
+
"stroke-width": "1.8",
|
|
2536
|
+
"stroke-linecap": "round",
|
|
2537
|
+
"stroke-linejoin": "round",
|
|
2538
|
+
class: "wm-onb__thread-chev",
|
|
2539
|
+
"aria-hidden": "true"
|
|
2540
|
+
}, [
|
|
2541
|
+
a("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2542
|
+
], -1))
|
|
2543
|
+
])
|
|
2544
|
+
], 8, Vn))), 128)),
|
|
2545
|
+
s.filteredThreads.length ? y("", !0) : (c(), u("div", Xn, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2477
2546
|
])
|
|
2478
2547
|
])) : y("", !0)
|
|
2479
2548
|
]);
|
|
2480
2549
|
}
|
|
2481
|
-
const
|
|
2482
|
-
function
|
|
2550
|
+
const es = /* @__PURE__ */ N(hn, [["render", Zn], ["__scopeId", "data-v-667f38cc"]]);
|
|
2551
|
+
function ts(e) {
|
|
2483
2552
|
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();
|
|
2484
2553
|
}
|
|
2485
|
-
const
|
|
2554
|
+
const ns = {
|
|
2486
2555
|
name: "WmActionResult",
|
|
2487
2556
|
props: {
|
|
2488
2557
|
state: { type: String, default: "success" },
|
|
@@ -2492,13 +2561,13 @@ const Vn = {
|
|
|
2492
2561
|
},
|
|
2493
2562
|
computed: {
|
|
2494
2563
|
detailText() {
|
|
2495
|
-
return
|
|
2564
|
+
return ts(this.detail);
|
|
2496
2565
|
}
|
|
2497
2566
|
}
|
|
2498
|
-
},
|
|
2567
|
+
}, ss = {
|
|
2499
2568
|
class: "wm-result__icon",
|
|
2500
2569
|
"aria-hidden": "true"
|
|
2501
|
-
},
|
|
2570
|
+
}, rs = {
|
|
2502
2571
|
key: 0,
|
|
2503
2572
|
width: "11",
|
|
2504
2573
|
height: "11",
|
|
@@ -2508,7 +2577,7 @@ const Vn = {
|
|
|
2508
2577
|
"stroke-width": "2.8",
|
|
2509
2578
|
"stroke-linecap": "round",
|
|
2510
2579
|
"stroke-linejoin": "round"
|
|
2511
|
-
},
|
|
2580
|
+
}, is = {
|
|
2512
2581
|
key: 1,
|
|
2513
2582
|
width: "11",
|
|
2514
2583
|
height: "11",
|
|
@@ -2518,7 +2587,7 @@ const Vn = {
|
|
|
2518
2587
|
"stroke-width": "2.6",
|
|
2519
2588
|
"stroke-linecap": "round",
|
|
2520
2589
|
"stroke-linejoin": "round"
|
|
2521
|
-
},
|
|
2590
|
+
}, as = {
|
|
2522
2591
|
key: 2,
|
|
2523
2592
|
width: "11",
|
|
2524
2593
|
height: "11",
|
|
@@ -2528,7 +2597,7 @@ const Vn = {
|
|
|
2528
2597
|
"stroke-width": "2.4",
|
|
2529
2598
|
"stroke-linecap": "round",
|
|
2530
2599
|
"stroke-linejoin": "round"
|
|
2531
|
-
},
|
|
2600
|
+
}, os = {
|
|
2532
2601
|
key: 3,
|
|
2533
2602
|
width: "12",
|
|
2534
2603
|
height: "12",
|
|
@@ -2538,32 +2607,32 @@ const Vn = {
|
|
|
2538
2607
|
"stroke-width": "2.2",
|
|
2539
2608
|
"stroke-linecap": "round",
|
|
2540
2609
|
"stroke-linejoin": "round"
|
|
2541
|
-
},
|
|
2542
|
-
function
|
|
2610
|
+
}, ls = { class: "wm-result__body" }, cs = { class: "wm-result__label" }, ds = { class: "wm-result__detail" };
|
|
2611
|
+
function us(e, t, n, i, r, s) {
|
|
2543
2612
|
return c(), u("div", {
|
|
2544
2613
|
class: O(["wm-result", `wm-result--${n.state}`])
|
|
2545
2614
|
}, [
|
|
2546
|
-
|
|
2547
|
-
n.state === "success" ? (c(), u("svg",
|
|
2548
|
-
|
|
2549
|
-
])])) : n.state === "rejected" ? (c(), u("svg",
|
|
2550
|
-
|
|
2551
|
-
])])) : n.state === "awaiting" ? (c(), u("svg",
|
|
2552
|
-
|
|
2615
|
+
a("span", ss, [
|
|
2616
|
+
n.state === "success" ? (c(), u("svg", rs, [...t[0] || (t[0] = [
|
|
2617
|
+
a("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2618
|
+
])])) : n.state === "rejected" ? (c(), u("svg", is, [...t[1] || (t[1] = [
|
|
2619
|
+
a("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2620
|
+
])])) : n.state === "awaiting" ? (c(), u("svg", as, [...t[2] || (t[2] = [
|
|
2621
|
+
a("circle", {
|
|
2553
2622
|
cx: "12",
|
|
2554
2623
|
cy: "12",
|
|
2555
2624
|
r: "10"
|
|
2556
2625
|
}, null, -1),
|
|
2557
|
-
|
|
2558
|
-
])])) : (c(), u("svg",
|
|
2559
|
-
|
|
2560
|
-
|
|
2626
|
+
a("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2627
|
+
])])) : (c(), u("svg", os, [...t[3] || (t[3] = [
|
|
2628
|
+
a("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),
|
|
2629
|
+
a("line", {
|
|
2561
2630
|
x1: "12",
|
|
2562
2631
|
y1: "9",
|
|
2563
2632
|
x2: "12",
|
|
2564
2633
|
y2: "13"
|
|
2565
2634
|
}, null, -1),
|
|
2566
|
-
|
|
2635
|
+
a("line", {
|
|
2567
2636
|
x1: "12",
|
|
2568
2637
|
y1: "17",
|
|
2569
2638
|
x2: "12.01",
|
|
@@ -2571,19 +2640,19 @@ function ts(e, t, n, i, r, s) {
|
|
|
2571
2640
|
}, null, -1)
|
|
2572
2641
|
])]))
|
|
2573
2642
|
]),
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
s.detailText ? (c(), u(
|
|
2577
|
-
t[4] || (t[4] =
|
|
2643
|
+
a("span", ls, [
|
|
2644
|
+
a("span", cs, v(n.label), 1),
|
|
2645
|
+
s.detailText ? (c(), u(E, { key: 0 }, [
|
|
2646
|
+
t[4] || (t[4] = a("span", {
|
|
2578
2647
|
class: "wm-result__sep",
|
|
2579
2648
|
"aria-hidden": "true"
|
|
2580
2649
|
}, " · ", -1)),
|
|
2581
|
-
|
|
2650
|
+
a("span", ds, v(s.detailText), 1)
|
|
2582
2651
|
], 64)) : y("", !0)
|
|
2583
2652
|
])
|
|
2584
2653
|
], 2);
|
|
2585
2654
|
}
|
|
2586
|
-
const
|
|
2655
|
+
const hs = /* @__PURE__ */ N(ns, [["render", us], ["__scopeId", "data-v-7284acd0"]]), ms = {
|
|
2587
2656
|
name: "WmArtifactFormResponse",
|
|
2588
2657
|
inject: {
|
|
2589
2658
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -2599,13 +2668,13 @@ const ns = /* @__PURE__ */ N(Vn, [["render", ts], ["__scopeId", "data-v-7284acd0
|
|
|
2599
2668
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2600
2669
|
}
|
|
2601
2670
|
}
|
|
2602
|
-
},
|
|
2603
|
-
function
|
|
2604
|
-
return c(), u("div",
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
t[0] || (t[0] =
|
|
2671
|
+
}, fs = { class: "wm-art wm-art--formResponse" }, _s = { class: "wm-art__head" }, gs = { class: "wm-art__title" }, ps = { class: "wm-art__badge wm-art__badge--success" }, vs = { class: "wm-art__body" }, ys = { class: "wm-art__fieldLabel" };
|
|
2672
|
+
function ws(e, t, n, i, r, s) {
|
|
2673
|
+
return c(), u("div", fs, [
|
|
2674
|
+
a("div", _s, [
|
|
2675
|
+
a("div", gs, v(n.data.title || s.t("form.title")), 1),
|
|
2676
|
+
a("span", ps, [
|
|
2677
|
+
t[0] || (t[0] = a("svg", {
|
|
2609
2678
|
width: "11",
|
|
2610
2679
|
height: "11",
|
|
2611
2680
|
viewBox: "0 0 24 24",
|
|
@@ -2616,28 +2685,28 @@ function ds(e, t, n, i, r, s) {
|
|
|
2616
2685
|
"stroke-linejoin": "round",
|
|
2617
2686
|
"aria-hidden": "true"
|
|
2618
2687
|
}, [
|
|
2619
|
-
|
|
2688
|
+
a("polyline", { points: "20 6 9 17 4 12" })
|
|
2620
2689
|
], -1)),
|
|
2621
2690
|
ve(" " + v(s.t("form.sent")), 1)
|
|
2622
2691
|
])
|
|
2623
2692
|
]),
|
|
2624
|
-
|
|
2625
|
-
(c(!0), u(
|
|
2693
|
+
a("div", vs, [
|
|
2694
|
+
(c(!0), u(E, null, U(s.fields, (o, l) => (c(), u("div", {
|
|
2626
2695
|
key: l,
|
|
2627
2696
|
class: "wm-art__field"
|
|
2628
2697
|
}, [
|
|
2629
|
-
|
|
2630
|
-
|
|
2698
|
+
a("div", ys, v(o.label), 1),
|
|
2699
|
+
a("div", {
|
|
2631
2700
|
class: O([
|
|
2632
2701
|
"wm-art__fieldValue",
|
|
2633
|
-
{ "wm-art__fieldValue--multi":
|
|
2702
|
+
{ "wm-art__fieldValue--multi": o.multiline }
|
|
2634
2703
|
])
|
|
2635
|
-
}, v(
|
|
2704
|
+
}, v(o.value), 3)
|
|
2636
2705
|
]))), 128))
|
|
2637
2706
|
])
|
|
2638
2707
|
]);
|
|
2639
2708
|
}
|
|
2640
|
-
const
|
|
2709
|
+
const bs = /* @__PURE__ */ N(ms, [["render", ws], ["__scopeId", "data-v-713aecf1"]]), ks = {
|
|
2641
2710
|
name: "WmArtifactInfoCard",
|
|
2642
2711
|
props: {
|
|
2643
2712
|
data: { type: Object, required: !0 }
|
|
@@ -2652,32 +2721,32 @@ const us = /* @__PURE__ */ N(ss, [["render", ds], ["__scopeId", "data-v-713aecf1
|
|
|
2652
2721
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
2653
2722
|
}
|
|
2654
2723
|
}
|
|
2655
|
-
},
|
|
2724
|
+
}, Cs = { class: "wm-art wm-art--infoCard" }, As = {
|
|
2656
2725
|
key: 0,
|
|
2657
2726
|
class: "wm-art__image"
|
|
2658
|
-
},
|
|
2727
|
+
}, Ss = ["src", "alt"], Ms = { class: "wm-art__head" }, Ts = { class: "wm-art__headMain" }, xs = { class: "wm-art__title" }, Os = {
|
|
2659
2728
|
key: 0,
|
|
2660
2729
|
class: "wm-art__subtitle"
|
|
2661
|
-
},
|
|
2730
|
+
}, Ls = {
|
|
2662
2731
|
key: 1,
|
|
2663
2732
|
class: "wm-art__body"
|
|
2664
|
-
},
|
|
2733
|
+
}, Is = {
|
|
2665
2734
|
key: 0,
|
|
2666
2735
|
class: "wm-art__text"
|
|
2667
|
-
},
|
|
2668
|
-
function
|
|
2669
|
-
return c(), u("div",
|
|
2670
|
-
n.data.image_url ? (c(), u("figure",
|
|
2671
|
-
|
|
2736
|
+
}, Es = { class: "wm-art__fieldLabel" };
|
|
2737
|
+
function Bs(e, t, n, i, r, s) {
|
|
2738
|
+
return c(), u("div", Cs, [
|
|
2739
|
+
n.data.image_url ? (c(), u("figure", As, [
|
|
2740
|
+
a("img", {
|
|
2672
2741
|
src: n.data.image_url,
|
|
2673
2742
|
alt: n.data.title || "",
|
|
2674
2743
|
loading: "lazy"
|
|
2675
|
-
}, null, 8,
|
|
2744
|
+
}, null, 8, Ss)
|
|
2676
2745
|
])) : y("", !0),
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
n.data.subtitle ? (c(), u("div",
|
|
2746
|
+
a("div", Ms, [
|
|
2747
|
+
a("div", Ts, [
|
|
2748
|
+
a("div", xs, v(n.data.title), 1),
|
|
2749
|
+
n.data.subtitle ? (c(), u("div", Os, v(n.data.subtitle), 1)) : y("", !0)
|
|
2681
2750
|
]),
|
|
2682
2751
|
n.data.badge && n.data.badge.label ? (c(), u("span", {
|
|
2683
2752
|
key: 0,
|
|
@@ -2687,25 +2756,25 @@ function Cs(e, t, n, i, r, s) {
|
|
|
2687
2756
|
])
|
|
2688
2757
|
}, v(n.data.badge.label), 3)) : y("", !0)
|
|
2689
2758
|
]),
|
|
2690
|
-
s.hasBody ? (c(), u("div",
|
|
2691
|
-
n.data.body ? (c(), u("div",
|
|
2692
|
-
s.fields.length ? (c(!0), u(
|
|
2759
|
+
s.hasBody ? (c(), u("div", Ls, [
|
|
2760
|
+
n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : y("", !0),
|
|
2761
|
+
s.fields.length ? (c(!0), u(E, { key: 1 }, U(s.fields, (o, l) => (c(), u("div", {
|
|
2693
2762
|
key: l,
|
|
2694
2763
|
class: "wm-art__field"
|
|
2695
2764
|
}, [
|
|
2696
|
-
|
|
2697
|
-
|
|
2765
|
+
a("div", Es, v(o.label), 1),
|
|
2766
|
+
a("div", {
|
|
2698
2767
|
class: O([
|
|
2699
2768
|
"wm-art__fieldValue",
|
|
2700
|
-
{ "wm-art__fieldValue--multi":
|
|
2769
|
+
{ "wm-art__fieldValue--multi": o.multiline }
|
|
2701
2770
|
])
|
|
2702
|
-
}, v(
|
|
2771
|
+
}, v(o.value), 3)
|
|
2703
2772
|
]))), 128)) : y("", !0)
|
|
2704
2773
|
])) : y("", !0)
|
|
2705
2774
|
]);
|
|
2706
2775
|
}
|
|
2707
|
-
const
|
|
2708
|
-
function
|
|
2776
|
+
const Rs = /* @__PURE__ */ N(ks, [["render", Bs], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
2777
|
+
function Ns(e, t, n) {
|
|
2709
2778
|
if (!e) return "";
|
|
2710
2779
|
const i = new Date(e);
|
|
2711
2780
|
if (Number.isNaN(i.getTime())) return e;
|
|
@@ -2719,7 +2788,7 @@ function Ss(e, t, n) {
|
|
|
2719
2788
|
});
|
|
2720
2789
|
return `${r}${n}${s}`;
|
|
2721
2790
|
}
|
|
2722
|
-
const
|
|
2791
|
+
const Ps = {
|
|
2723
2792
|
name: "WmArtifactTicket",
|
|
2724
2793
|
inject: {
|
|
2725
2794
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -2737,7 +2806,7 @@ const Ms = {
|
|
|
2737
2806
|
},
|
|
2738
2807
|
formattedDate() {
|
|
2739
2808
|
var e;
|
|
2740
|
-
return
|
|
2809
|
+
return Ns(
|
|
2741
2810
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
2742
2811
|
re(this.wmLocale()),
|
|
2743
2812
|
this.t("ticket.dateAt")
|
|
@@ -2765,13 +2834,13 @@ const Ms = {
|
|
|
2765
2834
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
2766
2835
|
}
|
|
2767
2836
|
}
|
|
2768
|
-
},
|
|
2837
|
+
}, Fs = { class: "wm-art wm-art--ticket" }, Us = { class: "wm-art__head wm-tk__head" }, Ds = { class: "wm-art__title wm-tk__title" }, js = { class: "wm-tk__sub" }, Hs = { class: "wm-tk__ref" }, zs = {
|
|
2769
2838
|
key: 0,
|
|
2770
2839
|
class: "wm-tk__text"
|
|
2771
|
-
},
|
|
2840
|
+
}, qs = {
|
|
2772
2841
|
key: 0,
|
|
2773
2842
|
class: "wm-art__body"
|
|
2774
|
-
},
|
|
2843
|
+
}, Ks = { class: "wm-art__fieldLabel" }, Vs = ["data-level"], $s = {
|
|
2775
2844
|
key: 1,
|
|
2776
2845
|
class: "wm-tk__date",
|
|
2777
2846
|
width: "12",
|
|
@@ -2783,17 +2852,17 @@ const Ms = {
|
|
|
2783
2852
|
"stroke-linecap": "round",
|
|
2784
2853
|
"stroke-linejoin": "round",
|
|
2785
2854
|
"aria-hidden": "true"
|
|
2786
|
-
},
|
|
2855
|
+
}, Ws = {
|
|
2787
2856
|
key: 1,
|
|
2788
2857
|
class: "wm-art__footer wm-tk__footer"
|
|
2789
2858
|
};
|
|
2790
|
-
function
|
|
2791
|
-
return c(), u("div",
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
t[0] || (t[0] =
|
|
2859
|
+
function Gs(e, t, n, i, r, s) {
|
|
2860
|
+
return c(), u("div", Fs, [
|
|
2861
|
+
a("div", Us, [
|
|
2862
|
+
a("div", Ds, v(n.data.title), 1),
|
|
2863
|
+
a("div", js, [
|
|
2864
|
+
a("div", Hs, [
|
|
2865
|
+
t[0] || (t[0] = a("svg", {
|
|
2797
2866
|
width: "11",
|
|
2798
2867
|
height: "11",
|
|
2799
2868
|
viewBox: "0 0 24 24",
|
|
@@ -2804,85 +2873,85 @@ function Us(e, t, n, i, r, s) {
|
|
|
2804
2873
|
"stroke-linejoin": "round",
|
|
2805
2874
|
"aria-hidden": "true"
|
|
2806
2875
|
}, [
|
|
2807
|
-
|
|
2808
|
-
|
|
2876
|
+
a("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" }),
|
|
2877
|
+
a("path", { d: "M13 5v2M13 17v2M13 11v2" })
|
|
2809
2878
|
], -1)),
|
|
2810
|
-
|
|
2879
|
+
a("span", null, v(n.data.reference), 1)
|
|
2811
2880
|
]),
|
|
2812
|
-
|
|
2881
|
+
a("span", {
|
|
2813
2882
|
class: O([
|
|
2814
2883
|
"wm-art__badge",
|
|
2815
2884
|
"wm-tk__badge",
|
|
2816
2885
|
`wm-art__badge--${n.data.status.tone || "neutral"}`
|
|
2817
2886
|
])
|
|
2818
2887
|
}, [
|
|
2819
|
-
t[1] || (t[1] =
|
|
2888
|
+
t[1] || (t[1] = a("span", {
|
|
2820
2889
|
class: "wm-tk__dot",
|
|
2821
2890
|
"aria-hidden": "true"
|
|
2822
2891
|
}, null, -1)),
|
|
2823
2892
|
ve(" " + v(n.data.status.label), 1)
|
|
2824
2893
|
], 2)
|
|
2825
2894
|
]),
|
|
2826
|
-
n.data.body ? (c(), u("div",
|
|
2895
|
+
n.data.body ? (c(), u("div", zs, v(n.data.body), 1)) : y("", !0)
|
|
2827
2896
|
]),
|
|
2828
|
-
s.fields.length ? (c(), u("div",
|
|
2829
|
-
(c(!0), u(
|
|
2897
|
+
s.fields.length ? (c(), u("div", qs, [
|
|
2898
|
+
(c(!0), u(E, null, U(s.fields, (o, l) => (c(), u("div", {
|
|
2830
2899
|
key: l,
|
|
2831
2900
|
class: "wm-art__field"
|
|
2832
2901
|
}, [
|
|
2833
|
-
|
|
2834
|
-
|
|
2902
|
+
a("div", Ks, v(o.label), 1),
|
|
2903
|
+
a("div", {
|
|
2835
2904
|
class: O([
|
|
2836
2905
|
"wm-art__fieldValue",
|
|
2837
|
-
{ "wm-art__fieldValue--multi":
|
|
2906
|
+
{ "wm-art__fieldValue--multi": o.multiline }
|
|
2838
2907
|
])
|
|
2839
2908
|
}, [
|
|
2840
|
-
s.isPriority(
|
|
2909
|
+
s.isPriority(o.label) ? (c(), u("svg", {
|
|
2841
2910
|
key: 0,
|
|
2842
2911
|
class: "wm-tk__prio",
|
|
2843
|
-
"data-level": s.priorityLevel(
|
|
2912
|
+
"data-level": s.priorityLevel(o.value),
|
|
2844
2913
|
width: "12",
|
|
2845
2914
|
height: "12",
|
|
2846
2915
|
viewBox: "0 0 12 12",
|
|
2847
2916
|
"aria-hidden": "true"
|
|
2848
2917
|
}, [...t[2] || (t[2] = [
|
|
2849
|
-
|
|
2918
|
+
a("rect", {
|
|
2850
2919
|
x: "1",
|
|
2851
2920
|
y: "8",
|
|
2852
2921
|
width: "2",
|
|
2853
2922
|
height: "3",
|
|
2854
2923
|
rx: "0.5"
|
|
2855
2924
|
}, null, -1),
|
|
2856
|
-
|
|
2925
|
+
a("rect", {
|
|
2857
2926
|
x: "5",
|
|
2858
2927
|
y: "5",
|
|
2859
2928
|
width: "2",
|
|
2860
2929
|
height: "6",
|
|
2861
2930
|
rx: "0.5"
|
|
2862
2931
|
}, null, -1),
|
|
2863
|
-
|
|
2932
|
+
a("rect", {
|
|
2864
2933
|
x: "9",
|
|
2865
2934
|
y: "2",
|
|
2866
2935
|
width: "2",
|
|
2867
2936
|
height: "9",
|
|
2868
2937
|
rx: "0.5"
|
|
2869
2938
|
}, null, -1)
|
|
2870
|
-
])], 8,
|
|
2871
|
-
|
|
2939
|
+
])], 8, Vs)) : s.isDate(o.label) ? (c(), u("svg", $s, [...t[3] || (t[3] = [
|
|
2940
|
+
a("rect", {
|
|
2872
2941
|
x: "3",
|
|
2873
2942
|
y: "4",
|
|
2874
2943
|
width: "18",
|
|
2875
2944
|
height: "18",
|
|
2876
2945
|
rx: "2"
|
|
2877
2946
|
}, null, -1),
|
|
2878
|
-
|
|
2947
|
+
a("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
2879
2948
|
])])) : y("", !0),
|
|
2880
|
-
|
|
2949
|
+
a("span", null, v(o.value), 1)
|
|
2881
2950
|
], 2)
|
|
2882
2951
|
]))), 128))
|
|
2883
2952
|
])) : y("", !0),
|
|
2884
|
-
n.data.created_at ? (c(), u("div",
|
|
2885
|
-
t[4] || (t[4] =
|
|
2953
|
+
n.data.created_at ? (c(), u("div", Ws, [
|
|
2954
|
+
t[4] || (t[4] = a("svg", {
|
|
2886
2955
|
width: "11",
|
|
2887
2956
|
height: "11",
|
|
2888
2957
|
viewBox: "0 0 24 24",
|
|
@@ -2893,24 +2962,24 @@ function Us(e, t, n, i, r, s) {
|
|
|
2893
2962
|
"stroke-linejoin": "round",
|
|
2894
2963
|
"aria-hidden": "true"
|
|
2895
2964
|
}, [
|
|
2896
|
-
|
|
2965
|
+
a("rect", {
|
|
2897
2966
|
x: "3",
|
|
2898
2967
|
y: "4",
|
|
2899
2968
|
width: "18",
|
|
2900
2969
|
height: "18",
|
|
2901
2970
|
rx: "2"
|
|
2902
2971
|
}),
|
|
2903
|
-
|
|
2972
|
+
a("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
2904
2973
|
], -1)),
|
|
2905
|
-
|
|
2974
|
+
a("span", null, v(s.formattedDate), 1)
|
|
2906
2975
|
])) : y("", !0)
|
|
2907
2976
|
]);
|
|
2908
2977
|
}
|
|
2909
|
-
const
|
|
2910
|
-
form_response:
|
|
2911
|
-
info_card:
|
|
2912
|
-
ticket:
|
|
2913
|
-
},
|
|
2978
|
+
const Ys = /* @__PURE__ */ N(Ps, [["render", Gs], ["__scopeId", "data-v-5f30c914"]]), Js = {
|
|
2979
|
+
form_response: bs,
|
|
2980
|
+
info_card: Rs,
|
|
2981
|
+
ticket: Ys
|
|
2982
|
+
}, Qs = {
|
|
2914
2983
|
name: "WmArtifactRenderer",
|
|
2915
2984
|
props: {
|
|
2916
2985
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -2921,17 +2990,17 @@ const Ds = /* @__PURE__ */ N(Ms, [["render", Us], ["__scopeId", "data-v-5f30c914
|
|
|
2921
2990
|
component() {
|
|
2922
2991
|
var t;
|
|
2923
2992
|
const e = (t = this.artifact) == null ? void 0 : t.kind;
|
|
2924
|
-
return e &&
|
|
2993
|
+
return e && Js[e] || null;
|
|
2925
2994
|
}
|
|
2926
2995
|
}
|
|
2927
2996
|
};
|
|
2928
|
-
function
|
|
2997
|
+
function Xs(e, t, n, i, r, s) {
|
|
2929
2998
|
return s.component ? (c(), P(De(s.component), {
|
|
2930
2999
|
key: 0,
|
|
2931
3000
|
data: n.artifact.data
|
|
2932
3001
|
}, null, 8, ["data"])) : y("", !0);
|
|
2933
3002
|
}
|
|
2934
|
-
const
|
|
3003
|
+
const Zs = /* @__PURE__ */ N(Qs, [["render", Xs]]), er = {
|
|
2935
3004
|
name: "WmAttachmentPreview",
|
|
2936
3005
|
inject: {
|
|
2937
3006
|
signAttachmentFn: { default: null },
|
|
@@ -2999,15 +3068,15 @@ const qs = /* @__PURE__ */ N(Hs, [["render", zs]]), $s = {
|
|
|
2999
3068
|
this.safeHref === "#" && e.preventDefault();
|
|
3000
3069
|
}
|
|
3001
3070
|
}
|
|
3002
|
-
},
|
|
3071
|
+
}, tr = ["href"], nr = ["src", "alt"], sr = ["src"], rr = ["src"], ir = ["href", "download"], ar = { class: "wm-att__main" }, or = { class: "wm-att__name" }, lr = {
|
|
3003
3072
|
key: 0,
|
|
3004
3073
|
class: "wm-att__meta"
|
|
3005
|
-
},
|
|
3074
|
+
}, cr = {
|
|
3006
3075
|
key: 0,
|
|
3007
3076
|
class: "wm-att__spin",
|
|
3008
3077
|
"aria-hidden": "true"
|
|
3009
3078
|
};
|
|
3010
|
-
function
|
|
3079
|
+
function dr(e, t, n, i, r, s) {
|
|
3011
3080
|
return c(), u("div", {
|
|
3012
3081
|
class: O(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
3013
3082
|
}, [
|
|
@@ -3018,32 +3087,32 @@ function er(e, t, n, i, r, s) {
|
|
|
3018
3087
|
rel: "noopener",
|
|
3019
3088
|
class: "wm-att__imgWrap"
|
|
3020
3089
|
}, [
|
|
3021
|
-
|
|
3090
|
+
a("img", {
|
|
3022
3091
|
src: r.url,
|
|
3023
3092
|
alt: s.displayName,
|
|
3024
3093
|
loading: "lazy"
|
|
3025
|
-
}, null, 8,
|
|
3026
|
-
], 8,
|
|
3094
|
+
}, null, 8, nr)
|
|
3095
|
+
], 8, tr)) : s.kind === "audio" && r.url ? (c(), u("audio", {
|
|
3027
3096
|
key: 1,
|
|
3028
3097
|
src: r.url,
|
|
3029
3098
|
controls: "",
|
|
3030
3099
|
preload: "metadata"
|
|
3031
|
-
}, null, 8,
|
|
3100
|
+
}, null, 8, sr)) : s.kind === "video" && r.url ? (c(), u("video", {
|
|
3032
3101
|
key: 2,
|
|
3033
3102
|
src: r.url,
|
|
3034
3103
|
controls: "",
|
|
3035
3104
|
preload: "metadata"
|
|
3036
|
-
}, null, 8,
|
|
3105
|
+
}, null, 8, rr)) : (c(), u("a", {
|
|
3037
3106
|
key: 3,
|
|
3038
3107
|
class: "wm-att__file",
|
|
3039
3108
|
href: s.safeHref,
|
|
3040
3109
|
download: s.displayName,
|
|
3041
3110
|
target: "_blank",
|
|
3042
3111
|
rel: "noopener",
|
|
3043
|
-
onClick: t[0] || (t[0] = (...
|
|
3112
|
+
onClick: t[0] || (t[0] = (...o) => s.onFileClick && s.onFileClick(...o))
|
|
3044
3113
|
}, [
|
|
3045
|
-
t[1] || (t[1] =
|
|
3046
|
-
|
|
3114
|
+
t[1] || (t[1] = a("span", { class: "wm-att__icon" }, [
|
|
3115
|
+
a("svg", {
|
|
3047
3116
|
width: "14",
|
|
3048
3117
|
height: "14",
|
|
3049
3118
|
viewBox: "0 0 24 24",
|
|
@@ -3054,19 +3123,19 @@ function er(e, t, n, i, r, s) {
|
|
|
3054
3123
|
"stroke-linejoin": "round",
|
|
3055
3124
|
"aria-hidden": "true"
|
|
3056
3125
|
}, [
|
|
3057
|
-
|
|
3058
|
-
|
|
3126
|
+
a("path", { d: "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" }),
|
|
3127
|
+
a("path", { d: "M14 2v6h6" })
|
|
3059
3128
|
])
|
|
3060
3129
|
], -1)),
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
s.sizeLabel ? (c(), u("span",
|
|
3130
|
+
a("span", ar, [
|
|
3131
|
+
a("span", or, v(s.displayName), 1),
|
|
3132
|
+
s.sizeLabel ? (c(), u("span", lr, v(s.sizeLabel), 1)) : y("", !0)
|
|
3064
3133
|
]),
|
|
3065
|
-
r.loading ? (c(), u("span",
|
|
3066
|
-
], 8,
|
|
3134
|
+
r.loading ? (c(), u("span", cr)) : y("", !0)
|
|
3135
|
+
], 8, ir))
|
|
3067
3136
|
], 2);
|
|
3068
3137
|
}
|
|
3069
|
-
const
|
|
3138
|
+
const ur = /* @__PURE__ */ N(er, [["render", dr], ["__scopeId", "data-v-0c877a62"]]), hr = {
|
|
3070
3139
|
name: "WmBubble",
|
|
3071
3140
|
props: {
|
|
3072
3141
|
role: { type: String, default: "ai" },
|
|
@@ -3078,45 +3147,45 @@ const tr = /* @__PURE__ */ N($s, [["render", er], ["__scopeId", "data-v-0c877a62
|
|
|
3078
3147
|
return un(this.text);
|
|
3079
3148
|
}
|
|
3080
3149
|
}
|
|
3081
|
-
},
|
|
3082
|
-
function
|
|
3150
|
+
}, mr = ["innerHTML"];
|
|
3151
|
+
function fr(e, t, n, i, r, s) {
|
|
3083
3152
|
return c(), u("div", {
|
|
3084
3153
|
class: O(["wm-bubble", "wm-bubble--" + n.role])
|
|
3085
3154
|
}, [
|
|
3086
3155
|
je(e.$slots, "default", {}, () => [
|
|
3087
|
-
|
|
3156
|
+
a("span", { innerHTML: s.rendered }, null, 8, mr)
|
|
3088
3157
|
], !0)
|
|
3089
3158
|
], 2);
|
|
3090
3159
|
}
|
|
3091
|
-
const
|
|
3092
|
-
function
|
|
3093
|
-
return c(), u("div",
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3160
|
+
const _r = /* @__PURE__ */ N(hr, [["render", fr], ["__scopeId", "data-v-7ab13147"]]), gr = { name: "WmTyping" }, pr = { class: "wm-typing" };
|
|
3161
|
+
function vr(e, t, n, i, r, s) {
|
|
3162
|
+
return c(), u("div", pr, [...t[0] || (t[0] = [
|
|
3163
|
+
a("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3164
|
+
a("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3165
|
+
a("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3097
3166
|
])]);
|
|
3098
3167
|
}
|
|
3099
|
-
const
|
|
3168
|
+
const yr = /* @__PURE__ */ N(gr, [["render", vr], ["__scopeId", "data-v-df2447fd"]]);
|
|
3100
3169
|
function Q(e) {
|
|
3101
3170
|
return e ? e.client_msg_id || e.id : "";
|
|
3102
3171
|
}
|
|
3103
|
-
const
|
|
3172
|
+
const wr = {
|
|
3104
3173
|
transferred_to_human: "system.transferredToHuman",
|
|
3105
3174
|
assigned: "system.assigned",
|
|
3106
3175
|
unassigned: "system.unassigned",
|
|
3107
3176
|
resolved: "system.resolved",
|
|
3108
3177
|
reopened: "system.reopened",
|
|
3109
3178
|
idle: "system.idle"
|
|
3110
|
-
},
|
|
3179
|
+
}, br = 80, kr = 200, Cr = {
|
|
3111
3180
|
name: "WmMessageList",
|
|
3112
3181
|
components: {
|
|
3113
3182
|
AIAvatar: le,
|
|
3114
3183
|
HumanAvatar: Re,
|
|
3115
|
-
Bubble:
|
|
3116
|
-
Typing:
|
|
3117
|
-
ActionResult:
|
|
3118
|
-
AttachmentPreview:
|
|
3119
|
-
ArtifactRenderer:
|
|
3184
|
+
Bubble: _r,
|
|
3185
|
+
Typing: yr,
|
|
3186
|
+
ActionResult: hs,
|
|
3187
|
+
AttachmentPreview: ur,
|
|
3188
|
+
ArtifactRenderer: Zs
|
|
3120
3189
|
},
|
|
3121
3190
|
inject: {
|
|
3122
3191
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -3187,59 +3256,59 @@ const dr = {
|
|
|
3187
3256
|
groups() {
|
|
3188
3257
|
var n, i, r, s;
|
|
3189
3258
|
const e = [];
|
|
3190
|
-
for (const
|
|
3191
|
-
const l = this.roleOf(
|
|
3259
|
+
for (const o of this.messages) {
|
|
3260
|
+
const l = this.roleOf(o);
|
|
3192
3261
|
if (l === "system") {
|
|
3193
|
-
if (((n =
|
|
3262
|
+
if (((n = o == null ? void 0 : o.payload) == null ? void 0 : n.event) === "action_admin_pending") {
|
|
3194
3263
|
const w = e[e.length - 1];
|
|
3195
|
-
w && w.role === "ai" ? w.messages.push(
|
|
3196
|
-
key: `g-${Q(
|
|
3264
|
+
w && w.role === "ai" ? w.messages.push(o) : e.push({
|
|
3265
|
+
key: `g-${Q(o)}`,
|
|
3197
3266
|
role: "ai",
|
|
3198
3267
|
agentName: "",
|
|
3199
3268
|
agentAvatarUrl: null,
|
|
3200
|
-
messages: [
|
|
3269
|
+
messages: [o],
|
|
3201
3270
|
items: []
|
|
3202
3271
|
});
|
|
3203
3272
|
continue;
|
|
3204
3273
|
}
|
|
3205
3274
|
e.push({
|
|
3206
|
-
key: `sys-${Q(
|
|
3275
|
+
key: `sys-${Q(o)}`,
|
|
3207
3276
|
role: l,
|
|
3208
|
-
messages: [
|
|
3277
|
+
messages: [o],
|
|
3209
3278
|
items: [],
|
|
3210
|
-
systemLabel: this.systemLabel(
|
|
3279
|
+
systemLabel: this.systemLabel(o)
|
|
3211
3280
|
});
|
|
3212
3281
|
continue;
|
|
3213
3282
|
}
|
|
3214
3283
|
const p = e[e.length - 1];
|
|
3215
|
-
p && p.role === l && (l === "ai" || p.agentName === (((i =
|
|
3216
|
-
key: `g-${Q(
|
|
3284
|
+
p && p.role === l && (l === "ai" || p.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? p.messages.push(o) : e.push({
|
|
3285
|
+
key: `g-${Q(o)}`,
|
|
3217
3286
|
role: l,
|
|
3218
|
-
agentName: ((r =
|
|
3219
|
-
agentAvatarUrl: ((s =
|
|
3220
|
-
messages: [
|
|
3287
|
+
agentName: ((r = o == null ? void 0 : o.author) == null ? void 0 : r.name) || "",
|
|
3288
|
+
agentAvatarUrl: ((s = o == null ? void 0 : o.author) == null ? void 0 : s.avatar_url) || null,
|
|
3289
|
+
messages: [o],
|
|
3221
3290
|
items: []
|
|
3222
3291
|
});
|
|
3223
3292
|
}
|
|
3224
|
-
for (const
|
|
3225
|
-
if (
|
|
3293
|
+
for (const o of e) {
|
|
3294
|
+
if (o.role === "system") continue;
|
|
3226
3295
|
const l = [];
|
|
3227
|
-
for (const p of
|
|
3296
|
+
for (const p of o.messages)
|
|
3228
3297
|
for (const k of this.itemsOf(p)) l.push(k);
|
|
3229
|
-
|
|
3298
|
+
o.items = l;
|
|
3230
3299
|
}
|
|
3231
3300
|
const t = [];
|
|
3232
|
-
for (const
|
|
3233
|
-
if (
|
|
3301
|
+
for (const o of e) {
|
|
3302
|
+
if (o.role !== "system" && !o.items.length) continue;
|
|
3234
3303
|
const l = t[t.length - 1];
|
|
3235
|
-
if (l && l.role !== "system" && l.role ===
|
|
3236
|
-
l.messages.push(...
|
|
3304
|
+
if (l && l.role !== "system" && l.role === o.role && (o.role === "ai" || l.agentName === o.agentName)) {
|
|
3305
|
+
l.messages.push(...o.messages), l.items.push(...o.items);
|
|
3237
3306
|
continue;
|
|
3238
3307
|
}
|
|
3239
|
-
t.push(
|
|
3308
|
+
t.push(o);
|
|
3240
3309
|
}
|
|
3241
|
-
for (const
|
|
3242
|
-
|
|
3310
|
+
for (const o of t)
|
|
3311
|
+
o.role !== "system" && (o.key = this.stableGroupKey(o.messages));
|
|
3243
3312
|
return t;
|
|
3244
3313
|
},
|
|
3245
3314
|
// Key of the first non-user group that starts after the unread
|
|
@@ -3306,11 +3375,11 @@ const dr = {
|
|
|
3306
3375
|
return `g-${n}`;
|
|
3307
3376
|
},
|
|
3308
3377
|
isAtBottom(e) {
|
|
3309
|
-
return e.scrollHeight - e.scrollTop - e.clientHeight <=
|
|
3378
|
+
return e.scrollHeight - e.scrollTop - e.clientHeight <= br;
|
|
3310
3379
|
},
|
|
3311
3380
|
onScroll() {
|
|
3312
3381
|
const e = this.$refs.scrollEl;
|
|
3313
|
-
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <=
|
|
3382
|
+
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= kr && (this._pendingLoadMore = !0, this.$emit("load-more"))));
|
|
3314
3383
|
},
|
|
3315
3384
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3316
3385
|
//
|
|
@@ -3343,12 +3412,12 @@ const dr = {
|
|
|
3343
3412
|
if (!t && !n) {
|
|
3344
3413
|
const s = this.pickAnchor(e);
|
|
3345
3414
|
if (s != null && s.rowKey) {
|
|
3346
|
-
const
|
|
3347
|
-
if (
|
|
3415
|
+
const o = this.findRowByKey(e, s.rowKey);
|
|
3416
|
+
if (o) {
|
|
3348
3417
|
const l = e.getBoundingClientRect().top;
|
|
3349
3418
|
i = {
|
|
3350
3419
|
rowKey: s.rowKey,
|
|
3351
|
-
relY:
|
|
3420
|
+
relY: o.getBoundingClientRect().top - l
|
|
3352
3421
|
};
|
|
3353
3422
|
}
|
|
3354
3423
|
}
|
|
@@ -3361,9 +3430,9 @@ const dr = {
|
|
|
3361
3430
|
}
|
|
3362
3431
|
if (!r.anchor) return;
|
|
3363
3432
|
const s = () => {
|
|
3364
|
-
const
|
|
3433
|
+
const o = r.anchor, l = this.findRowByKey(e, o.rowKey);
|
|
3365
3434
|
if (!l) return;
|
|
3366
|
-
const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top -
|
|
3435
|
+
const k = l.getBoundingClientRect().top - e.getBoundingClientRect().top - o.relY;
|
|
3367
3436
|
Math.abs(k) > 0.5 && (e.scrollTop += k);
|
|
3368
3437
|
};
|
|
3369
3438
|
s(), requestAnimationFrame(() => {
|
|
@@ -3511,9 +3580,9 @@ const dr = {
|
|
|
3511
3580
|
// doit garder son arrondi.
|
|
3512
3581
|
cornersFor(e, t) {
|
|
3513
3582
|
var Z, ee, te;
|
|
3514
|
-
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind,
|
|
3583
|
+
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, o = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, w = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, S = (V, ne, J) => V != null && T != null ? V + H >= T : ne === J || ne === "card" && J === "bubble";
|
|
3515
3584
|
let F = l, L = l, z = l, Y = l;
|
|
3516
|
-
return
|
|
3585
|
+
return o ? (k && (L = p), (w || !s) && (z = p), k && S(B, k, i == null ? void 0 : i.top) && (F = p), w && S(A, w, i == null ? void 0 : i.bottom) && (Y = p)) : (k && (F = p), (w || !s) && (Y = p), k && S(B, k, i == null ? void 0 : i.top) && (L = p), w && S(A, w, i == null ? void 0 : i.bottom) && (z = p)), { tl: F, tr: L, br: z, bl: Y };
|
|
3517
3586
|
},
|
|
3518
3587
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3519
3588
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3554,20 +3623,20 @@ const dr = {
|
|
|
3554
3623
|
for (const s of e.querySelectorAll(
|
|
3555
3624
|
".wm-list__row[data-row-key]"
|
|
3556
3625
|
)) {
|
|
3557
|
-
const
|
|
3558
|
-
if (!
|
|
3626
|
+
const o = s.dataset.rowKey;
|
|
3627
|
+
if (!o) continue;
|
|
3559
3628
|
const l = s.querySelector(
|
|
3560
3629
|
".wm-bubble, .wm-result, .wm-art, .wm-list__body"
|
|
3561
3630
|
);
|
|
3562
3631
|
if (!l) continue;
|
|
3563
3632
|
const p = l.getBoundingClientRect().width;
|
|
3564
|
-
p > 0 && (t[
|
|
3633
|
+
p > 0 && (t[o] = p);
|
|
3565
3634
|
}
|
|
3566
3635
|
const n = this.widthByKey, i = Object.keys(n), r = Object.keys(t);
|
|
3567
3636
|
if (i.length === r.length) {
|
|
3568
3637
|
let s = !0;
|
|
3569
|
-
for (const
|
|
3570
|
-
if (Math.abs((n[
|
|
3638
|
+
for (const o of r)
|
|
3639
|
+
if (Math.abs((n[o] ?? 0) - t[o]) > 0.5) {
|
|
3571
3640
|
s = !1;
|
|
3572
3641
|
break;
|
|
3573
3642
|
}
|
|
@@ -3637,9 +3706,9 @@ const dr = {
|
|
|
3637
3706
|
return ((t = e == null ? void 0 : e.payload) == null ? void 0 : t.name) || (e == null ? void 0 : e.text_md) || this.t("common.action");
|
|
3638
3707
|
},
|
|
3639
3708
|
actionDetail(e) {
|
|
3640
|
-
var n, i, r, s,
|
|
3709
|
+
var n, i, r, s, o, l;
|
|
3641
3710
|
const t = e == null ? void 0 : e.payload;
|
|
3642
|
-
return t ? t.state === "success" ? ((n = t.success) == null ? void 0 : n.summary) || ((r = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : r.description) || "" : t.state === "rejected" ? ((s = t.rejected) == null ? void 0 : s.reason) || this.t("action.rejectedByUser") : t.state === "failure" && (((
|
|
3711
|
+
return t ? t.state === "success" ? ((n = t.success) == null ? void 0 : n.summary) || ((r = (i = t.success) == null ? void 0 : i.metadata) == null ? void 0 : r.description) || "" : t.state === "rejected" ? ((s = t.rejected) == null ? void 0 : s.reason) || this.t("action.rejectedByUser") : t.state === "failure" && (((o = t.failure) == null ? void 0 : o.summary) || ((l = t.failure) == null ? void 0 : l.error)) || "" : "";
|
|
3643
3712
|
},
|
|
3644
3713
|
actionArtifact(e) {
|
|
3645
3714
|
var n, i;
|
|
@@ -3647,8 +3716,8 @@ const dr = {
|
|
|
3647
3716
|
return !t || typeof t != "object" || typeof t.kind != "string" ? null : t;
|
|
3648
3717
|
},
|
|
3649
3718
|
systemLabel(e) {
|
|
3650
|
-
var r, s,
|
|
3651
|
-
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n =
|
|
3719
|
+
var r, s, o;
|
|
3720
|
+
const t = (r = e == null ? void 0 : e.payload) == null ? void 0 : r.event, n = wr[t], i = ((s = e == null ? void 0 : e.metadata) == null ? void 0 : s.agent_name) || ((o = e == null ? void 0 : e.author) == null ? void 0 : o.name) || this.t("messageList.anAgent");
|
|
3652
3721
|
return n ? this.t(n, { name: i }) : (e == null ? void 0 : e.text_md) || this.t("messageList.conversationUpdate");
|
|
3653
3722
|
},
|
|
3654
3723
|
scrollToBottom() {
|
|
@@ -3663,80 +3732,80 @@ const dr = {
|
|
|
3663
3732
|
e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
|
|
3664
3733
|
}
|
|
3665
3734
|
}
|
|
3666
|
-
},
|
|
3735
|
+
}, Ar = { class: "wm-list__wrap" }, Sr = {
|
|
3667
3736
|
key: 0,
|
|
3668
3737
|
class: "wm-list__loadMore",
|
|
3669
3738
|
role: "status",
|
|
3670
3739
|
"aria-live": "polite"
|
|
3671
|
-
},
|
|
3740
|
+
}, Mr = { class: "wm-list__loadMore-lbl" }, Tr = {
|
|
3672
3741
|
key: 1,
|
|
3673
3742
|
class: "wm-list__historyEnd"
|
|
3674
|
-
},
|
|
3743
|
+
}, xr = {
|
|
3675
3744
|
key: 2,
|
|
3676
3745
|
class: "wm-list__sep"
|
|
3677
|
-
},
|
|
3746
|
+
}, Or = { class: "wm-list__sep-label" }, Lr = {
|
|
3678
3747
|
key: 0,
|
|
3679
3748
|
class: "wm-list__sep wm-list__sep--unread"
|
|
3680
|
-
},
|
|
3749
|
+
}, Ir = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Er = {
|
|
3681
3750
|
key: 0,
|
|
3682
3751
|
class: "wm-list__sysep"
|
|
3683
|
-
},
|
|
3752
|
+
}, Br = { class: "wm-list__sysep-label" }, Rr = ["data-row-key", "onPointerdown"], Nr = {
|
|
3684
3753
|
key: 0,
|
|
3685
3754
|
class: "wm-list__avatarSlot"
|
|
3686
|
-
},
|
|
3755
|
+
}, Pr = {
|
|
3687
3756
|
key: 5,
|
|
3688
3757
|
class: "wm-list__body"
|
|
3689
|
-
},
|
|
3758
|
+
}, Fr = { key: 0 }, Ur = {
|
|
3690
3759
|
key: 1,
|
|
3691
3760
|
"aria-hidden": "true"
|
|
3692
|
-
},
|
|
3761
|
+
}, Dr = { key: 2 }, jr = { key: 0 }, Hr = {
|
|
3693
3762
|
key: 1,
|
|
3694
3763
|
"aria-hidden": "true"
|
|
3695
|
-
},
|
|
3764
|
+
}, zr = { key: 2 }, qr = {
|
|
3696
3765
|
key: 3,
|
|
3697
3766
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3698
|
-
},
|
|
3699
|
-
function
|
|
3700
|
-
const
|
|
3701
|
-
return c(), u("div",
|
|
3702
|
-
|
|
3767
|
+
}, Kr = { class: "wm-list__avatarSlot" }, Vr = ["aria-label", "title"];
|
|
3768
|
+
function $r(e, t, n, i, r, s) {
|
|
3769
|
+
const o = R("AIAvatar"), l = R("HumanAvatar"), p = R("ActionResult"), k = R("ArtifactRenderer"), w = R("Bubble"), T = R("AttachmentPreview"), B = R("Typing");
|
|
3770
|
+
return c(), u("div", Ar, [
|
|
3771
|
+
a("div", {
|
|
3703
3772
|
ref: "scrollEl",
|
|
3704
3773
|
class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
3705
3774
|
onScrollPassive: t[4] || (t[4] = (...A) => s.onScroll && s.onScroll(...A))
|
|
3706
3775
|
}, [
|
|
3707
|
-
n.loadingMore ? (c(), u("div",
|
|
3708
|
-
t[6] || (t[6] =
|
|
3776
|
+
n.loadingMore ? (c(), u("div", Sr, [
|
|
3777
|
+
t[6] || (t[6] = a("span", {
|
|
3709
3778
|
class: "wm-list__loadMore-spinner",
|
|
3710
3779
|
"aria-hidden": "true"
|
|
3711
3780
|
}, null, -1)),
|
|
3712
|
-
|
|
3713
|
-
])) : s.historyExhausted ? (c(), u("div",
|
|
3714
|
-
n.dateLabel ? (c(), u("div",
|
|
3715
|
-
t[7] || (t[7] =
|
|
3716
|
-
|
|
3717
|
-
t[8] || (t[8] =
|
|
3781
|
+
a("span", Mr, v(s.t("messageList.loadingHistory")), 1)
|
|
3782
|
+
])) : s.historyExhausted ? (c(), u("div", Tr, v(s.t("messageList.conversationStart")), 1)) : y("", !0),
|
|
3783
|
+
n.dateLabel ? (c(), u("div", xr, [
|
|
3784
|
+
t[7] || (t[7] = a("div", { class: "wm-list__line" }, null, -1)),
|
|
3785
|
+
a("span", Or, v(n.dateLabel), 1),
|
|
3786
|
+
t[8] || (t[8] = a("div", { class: "wm-list__line" }, null, -1))
|
|
3718
3787
|
])) : y("", !0),
|
|
3719
|
-
(c(!0), u(
|
|
3788
|
+
(c(!0), u(E, null, U(s.groups, (A, H) => (c(), u(E, {
|
|
3720
3789
|
key: A.key
|
|
3721
3790
|
}, [
|
|
3722
|
-
A.key === s.unreadGroupKey ? (c(), u("div",
|
|
3723
|
-
t[9] || (t[9] =
|
|
3724
|
-
|
|
3725
|
-
t[10] || (t[10] =
|
|
3791
|
+
A.key === s.unreadGroupKey ? (c(), u("div", Lr, [
|
|
3792
|
+
t[9] || (t[9] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
3793
|
+
a("span", Ir, v(s.t("messageList.unread")), 1),
|
|
3794
|
+
t[10] || (t[10] = a("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
3726
3795
|
])) : y("", !0),
|
|
3727
3796
|
A.role === "system" || A.items.length ? (c(), u("div", {
|
|
3728
3797
|
key: 1,
|
|
3729
3798
|
class: O(["wm-list__group", "wm-list__group--" + A.role])
|
|
3730
3799
|
}, [
|
|
3731
|
-
A.role === "system" ? (c(), u("div",
|
|
3732
|
-
t[11] || (t[11] =
|
|
3733
|
-
|
|
3734
|
-
t[12] || (t[12] =
|
|
3735
|
-
])) : (c(), u(
|
|
3736
|
-
(c(!0), u(
|
|
3800
|
+
A.role === "system" ? (c(), u("div", Er, [
|
|
3801
|
+
t[11] || (t[11] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
3802
|
+
a("span", Br, v(A.systemLabel), 1),
|
|
3803
|
+
t[12] || (t[12] = a("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3804
|
+
])) : (c(), u(E, { key: 1 }, [
|
|
3805
|
+
(c(!0), u(E, null, U(A.items, (S, F) => (c(), u(E, {
|
|
3737
3806
|
key: `${s.messageKey(S.message)}-${S.partKey}`
|
|
3738
3807
|
}, [
|
|
3739
|
-
|
|
3808
|
+
a("div", {
|
|
3740
3809
|
"data-row-key": `${s.messageKey(S.message)}-${S.partKey}`,
|
|
3741
3810
|
class: O(["wm-list__row fade-up", [
|
|
3742
3811
|
"wm-list__row--" + A.role,
|
|
@@ -3753,9 +3822,9 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3753
3822
|
onContextmenu: t[3] || (t[3] = G(() => {
|
|
3754
3823
|
}, ["prevent"]))
|
|
3755
3824
|
}, [
|
|
3756
|
-
A.role !== "user" ? (c(), u("div",
|
|
3757
|
-
F === A.items.length - 1 ? (c(), u(
|
|
3758
|
-
A.role === "ai" ? (c(), P(
|
|
3825
|
+
A.role !== "user" ? (c(), u("div", Nr, [
|
|
3826
|
+
F === A.items.length - 1 ? (c(), u(E, { key: 0 }, [
|
|
3827
|
+
A.role === "ai" ? (c(), P(o, {
|
|
3759
3828
|
key: 0,
|
|
3760
3829
|
size: 26,
|
|
3761
3830
|
tail: !0,
|
|
@@ -3786,7 +3855,7 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3786
3855
|
}, null, 8, ["artifact"])) : S.renderAs === "artifact" ? (c(), P(k, {
|
|
3787
3856
|
key: 4,
|
|
3788
3857
|
artifact: s.artifactOf(S.message)
|
|
3789
|
-
}, null, 8, ["artifact"])) : (c(), u("div",
|
|
3858
|
+
}, null, 8, ["artifact"])) : (c(), u("div", Pr, [
|
|
3790
3859
|
S.message.text_md ? (c(), P(w, {
|
|
3791
3860
|
key: 0,
|
|
3792
3861
|
role: A.role,
|
|
@@ -3798,7 +3867,7 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3798
3867
|
"wm-list__atts--align-end": A.role === "user"
|
|
3799
3868
|
}])
|
|
3800
3869
|
}, [
|
|
3801
|
-
(c(!0), u(
|
|
3870
|
+
(c(!0), u(E, null, U(s.attachmentsOf(
|
|
3802
3871
|
S.message
|
|
3803
3872
|
), (L, z) => (c(), P(T, {
|
|
3804
3873
|
key: `${s.messageKey(S.message)}-att-${z}`,
|
|
@@ -3806,40 +3875,40 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3806
3875
|
}, null, 8, ["attachment"]))), 128))
|
|
3807
3876
|
], 2)) : y("", !0)
|
|
3808
3877
|
]))
|
|
3809
|
-
], 46,
|
|
3878
|
+
], 46, Rr),
|
|
3810
3879
|
F < A.items.length - 1 && r.pressedItemKey === `${s.messageKey(S.message)}-${S.partKey}` && (A.role !== "user" || s.timeOf(S.message)) ? (c(), u("div", {
|
|
3811
3880
|
key: 0,
|
|
3812
3881
|
class: O(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": A.role === "user" }])
|
|
3813
3882
|
}, [
|
|
3814
|
-
A.role !== "user" ? (c(), u("span",
|
|
3815
|
-
A.role !== "user" && s.timeOf(S.message) ? (c(), u("span",
|
|
3816
|
-
s.timeOf(S.message) ? (c(), u("span",
|
|
3883
|
+
A.role !== "user" ? (c(), u("span", Fr, v(s.roleLabel(A)), 1)) : y("", !0),
|
|
3884
|
+
A.role !== "user" && s.timeOf(S.message) ? (c(), u("span", Ur, "·")) : y("", !0),
|
|
3885
|
+
s.timeOf(S.message) ? (c(), u("span", Dr, v(s.timeOf(S.message)), 1)) : y("", !0)
|
|
3817
3886
|
], 2)) : y("", !0)
|
|
3818
3887
|
], 64))), 128)),
|
|
3819
3888
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
|
|
3820
3889
|
key: 0,
|
|
3821
3890
|
class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
3822
3891
|
}, [
|
|
3823
|
-
A.role !== "user" ? (c(), u("span",
|
|
3824
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span",
|
|
3825
|
-
s.lastTimeOf(A) ? (c(), u("span",
|
|
3892
|
+
A.role !== "user" ? (c(), u("span", jr, v(s.roleLabel(A)), 1)) : y("", !0),
|
|
3893
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Hr, "·")) : y("", !0),
|
|
3894
|
+
s.lastTimeOf(A) ? (c(), u("span", zr, v(s.lastTimeOf(A)), 1)) : y("", !0)
|
|
3826
3895
|
], 2)) : y("", !0)
|
|
3827
3896
|
], 64))
|
|
3828
3897
|
], 2)) : y("", !0)
|
|
3829
3898
|
], 64))), 128)),
|
|
3830
|
-
n.streamingActive ? (c(), u("div",
|
|
3831
|
-
|
|
3832
|
-
|
|
3899
|
+
n.streamingActive ? (c(), u("div", qr, [
|
|
3900
|
+
a("div", Kr, [
|
|
3901
|
+
K(o, {
|
|
3833
3902
|
size: 26,
|
|
3834
3903
|
tail: !0,
|
|
3835
3904
|
name: n.aiAgentName,
|
|
3836
3905
|
"image-url": n.aiAgentAvatarUrl
|
|
3837
3906
|
}, null, 8, ["name", "image-url"])
|
|
3838
3907
|
]),
|
|
3839
|
-
|
|
3908
|
+
K(B)
|
|
3840
3909
|
])) : y("", !0)
|
|
3841
3910
|
], 34),
|
|
3842
|
-
|
|
3911
|
+
K(Ie, { name: "wm-scrollDown" }, {
|
|
3843
3912
|
default: Ee(() => [
|
|
3844
3913
|
r.showScrollDown ? (c(), u("button", {
|
|
3845
3914
|
key: 0,
|
|
@@ -3849,7 +3918,7 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3849
3918
|
title: s.t("messageList.scrollToBottom"),
|
|
3850
3919
|
onClick: t[5] || (t[5] = (...A) => s.scrollToBottomSmooth && s.scrollToBottomSmooth(...A))
|
|
3851
3920
|
}, [...t[13] || (t[13] = [
|
|
3852
|
-
|
|
3921
|
+
a("svg", {
|
|
3853
3922
|
width: "14",
|
|
3854
3923
|
height: "14",
|
|
3855
3924
|
viewBox: "0 0 24 24",
|
|
@@ -3860,16 +3929,16 @@ function Pr(e, t, n, i, r, s) {
|
|
|
3860
3929
|
"stroke-linejoin": "round",
|
|
3861
3930
|
"aria-hidden": "true"
|
|
3862
3931
|
}, [
|
|
3863
|
-
|
|
3932
|
+
a("path", { d: "M6 9l6 6 6-6" })
|
|
3864
3933
|
], -1)
|
|
3865
|
-
])], 8,
|
|
3934
|
+
])], 8, Vr)) : y("", !0)
|
|
3866
3935
|
]),
|
|
3867
3936
|
_: 1
|
|
3868
3937
|
})
|
|
3869
3938
|
]);
|
|
3870
3939
|
}
|
|
3871
|
-
const
|
|
3872
|
-
function
|
|
3940
|
+
const Wr = /* @__PURE__ */ N(Cr, [["render", $r], ["__scopeId", "data-v-9ddbd0e3"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ke = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
3941
|
+
function Gr() {
|
|
3873
3942
|
return ke && [
|
|
3874
3943
|
"video/webm;codecs=vp9,opus",
|
|
3875
3944
|
"video/webm;codecs=vp8,opus",
|
|
@@ -3889,10 +3958,10 @@ function Pe({ audio: e }) {
|
|
|
3889
3958
|
systemAudio: e ? "include" : "exclude"
|
|
3890
3959
|
};
|
|
3891
3960
|
}
|
|
3892
|
-
function
|
|
3961
|
+
function no(e) {
|
|
3893
3962
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
3894
3963
|
}
|
|
3895
|
-
async function
|
|
3964
|
+
async function Yr() {
|
|
3896
3965
|
if (!he) return null;
|
|
3897
3966
|
let e;
|
|
3898
3967
|
try {
|
|
@@ -3903,7 +3972,7 @@ async function Dr() {
|
|
|
3903
3972
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
3904
3973
|
}
|
|
3905
3974
|
try {
|
|
3906
|
-
return await
|
|
3975
|
+
return await Jr(e);
|
|
3907
3976
|
} catch (t) {
|
|
3908
3977
|
return console.error("[media] screenshot capture", t), null;
|
|
3909
3978
|
} finally {
|
|
@@ -3912,7 +3981,7 @@ async function Dr() {
|
|
|
3912
3981
|
});
|
|
3913
3982
|
}
|
|
3914
3983
|
}
|
|
3915
|
-
async function
|
|
3984
|
+
async function Jr(e) {
|
|
3916
3985
|
const t = document.createElement("video");
|
|
3917
3986
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
3918
3987
|
const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -3922,10 +3991,10 @@ async function jr(e) {
|
|
|
3922
3991
|
(k) => k ? l(k) : p(new Error("toBlob failed")),
|
|
3923
3992
|
"image/png"
|
|
3924
3993
|
);
|
|
3925
|
-
}),
|
|
3926
|
-
return new File([s], `capture-${
|
|
3994
|
+
}), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
3995
|
+
return new File([s], `capture-${o}.png`, { type: "image/png" });
|
|
3927
3996
|
}
|
|
3928
|
-
async function
|
|
3997
|
+
async function Qr(e = {}) {
|
|
3929
3998
|
var k;
|
|
3930
3999
|
if (!he || !ke) return null;
|
|
3931
4000
|
let t;
|
|
@@ -3936,7 +4005,7 @@ async function Hr(e = {}) {
|
|
|
3936
4005
|
} catch (w) {
|
|
3937
4006
|
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
3938
4007
|
}
|
|
3939
|
-
const n =
|
|
4008
|
+
const n = Gr();
|
|
3940
4009
|
let i;
|
|
3941
4010
|
try {
|
|
3942
4011
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
@@ -3946,16 +4015,16 @@ async function Hr(e = {}) {
|
|
|
3946
4015
|
}), null;
|
|
3947
4016
|
}
|
|
3948
4017
|
const r = [];
|
|
3949
|
-
let s = null,
|
|
4018
|
+
let s = null, o = !1;
|
|
3950
4019
|
i.addEventListener("dataavailable", (w) => {
|
|
3951
4020
|
w.data && w.data.size > 0 && r.push(w.data);
|
|
3952
4021
|
}), i.addEventListener("stop", () => {
|
|
3953
4022
|
var w, T;
|
|
3954
|
-
if (s && clearInterval(s), t.getTracks().forEach((
|
|
3955
|
-
|
|
4023
|
+
if (s && clearInterval(s), t.getTracks().forEach((B) => {
|
|
4024
|
+
B.stop();
|
|
3956
4025
|
}), r.length) {
|
|
3957
|
-
const
|
|
3958
|
-
type:
|
|
4026
|
+
const B = i.mimeType || n || "video/webm", A = new Blob(r, { type: B }), H = /mp4/.test(B) ? "mp4" : "webm", S = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${S}.${H}`, {
|
|
4027
|
+
type: B
|
|
3959
4028
|
});
|
|
3960
4029
|
(w = e.onfinalize) == null || w.call(e, F);
|
|
3961
4030
|
} else
|
|
@@ -3964,7 +4033,7 @@ async function Hr(e = {}) {
|
|
|
3964
4033
|
w.addEventListener("ended", () => l(), { once: !0 });
|
|
3965
4034
|
});
|
|
3966
4035
|
function l() {
|
|
3967
|
-
if (!
|
|
4036
|
+
if (!o && (o = !0, i.state !== "inactive"))
|
|
3968
4037
|
try {
|
|
3969
4038
|
i.stop();
|
|
3970
4039
|
} catch (w) {
|
|
@@ -3990,7 +4059,7 @@ async function Hr(e = {}) {
|
|
|
3990
4059
|
}
|
|
3991
4060
|
};
|
|
3992
4061
|
}
|
|
3993
|
-
const
|
|
4062
|
+
const Xr = [
|
|
3994
4063
|
{
|
|
3995
4064
|
action: "file",
|
|
3996
4065
|
labelKey: "composer.attachFile",
|
|
@@ -4006,7 +4075,7 @@ const zr = [
|
|
|
4006
4075
|
labelKey: "composer.recordScreen",
|
|
4007
4076
|
path: "M23 7l-7 5 7 5V7z M1 5a2 2 0 012-2h12a2 2 0 012 2v14a2 2 0 01-2 2H3a2 2 0 01-2-2V5z"
|
|
4008
4077
|
}
|
|
4009
|
-
],
|
|
4078
|
+
], Zr = {
|
|
4010
4079
|
name: "WmComposer",
|
|
4011
4080
|
inject: {
|
|
4012
4081
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4040,7 +4109,7 @@ const zr = [
|
|
|
4040
4109
|
return !this.disabled && !!this.local.trim();
|
|
4041
4110
|
},
|
|
4042
4111
|
attachItems() {
|
|
4043
|
-
return
|
|
4112
|
+
return Xr.map((e) => ({
|
|
4044
4113
|
...e,
|
|
4045
4114
|
label: this.t(e.labelKey),
|
|
4046
4115
|
disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !ke)
|
|
@@ -4114,13 +4183,13 @@ const zr = [
|
|
|
4114
4183
|
},
|
|
4115
4184
|
async captureScreenshot() {
|
|
4116
4185
|
if (this.disabled) return;
|
|
4117
|
-
const e = await
|
|
4186
|
+
const e = await Yr();
|
|
4118
4187
|
e && this.$emit("attach", e);
|
|
4119
4188
|
},
|
|
4120
4189
|
async startRecording() {
|
|
4121
4190
|
if (this.recording || this.disabled) return;
|
|
4122
4191
|
this.recordingElapsed = 0;
|
|
4123
|
-
const e = await
|
|
4192
|
+
const e = await Qr({
|
|
4124
4193
|
onstart: () => {
|
|
4125
4194
|
this.recording = !0;
|
|
4126
4195
|
},
|
|
@@ -4162,97 +4231,97 @@ const zr = [
|
|
|
4162
4231
|
!e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
|
|
4163
4232
|
}
|
|
4164
4233
|
}
|
|
4165
|
-
},
|
|
4234
|
+
}, ei = {
|
|
4166
4235
|
key: 0,
|
|
4167
4236
|
class: "wm-rec"
|
|
4168
|
-
},
|
|
4237
|
+
}, ti = { class: "wm-rec__lbl" }, ni = {
|
|
4169
4238
|
key: 1,
|
|
4170
4239
|
class: "wm-compose__menu",
|
|
4171
4240
|
role: "menu"
|
|
4172
|
-
},
|
|
4241
|
+
}, si = ["disabled", "onClick"], ri = { class: "wm-compose__menuIcon" }, ii = {
|
|
4173
4242
|
viewBox: "0 0 24 24",
|
|
4174
4243
|
width: "14",
|
|
4175
4244
|
height: "14",
|
|
4176
4245
|
"aria-hidden": "true"
|
|
4177
|
-
},
|
|
4178
|
-
function
|
|
4246
|
+
}, ai = ["d"], oi = ["placeholder", "disabled"], li = { class: "wm-compose__actions" }, ci = ["title", "aria-label", "disabled"], di = ["disabled", "aria-label"];
|
|
4247
|
+
function ui(e, t, n, i, r, s) {
|
|
4179
4248
|
return c(), u("div", {
|
|
4180
4249
|
class: O(["wm-compose-wrap", { "wm-compose-wrap--sheet": n.displayMode === "sheet" }]),
|
|
4181
4250
|
style: q(r.kbOffset ? { transform: `translateY(-${r.kbOffset}px)` } : null)
|
|
4182
4251
|
}, [
|
|
4183
|
-
r.recording ? (c(), u("div",
|
|
4184
|
-
t[8] || (t[8] =
|
|
4252
|
+
r.recording ? (c(), u("div", ei, [
|
|
4253
|
+
t[8] || (t[8] = a("span", {
|
|
4185
4254
|
class: "wm-rec__dot",
|
|
4186
4255
|
"aria-hidden": "true"
|
|
4187
4256
|
}, null, -1)),
|
|
4188
|
-
|
|
4189
|
-
|
|
4257
|
+
a("span", ti, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
|
|
4258
|
+
a("button", {
|
|
4190
4259
|
type: "button",
|
|
4191
4260
|
class: "wm-rec__stop",
|
|
4192
|
-
onClick: t[0] || (t[0] = (...
|
|
4261
|
+
onClick: t[0] || (t[0] = (...o) => s.stopRecording && s.stopRecording(...o))
|
|
4193
4262
|
}, v(s.t("composer.stop")), 1)
|
|
4194
4263
|
])) : y("", !0),
|
|
4195
|
-
|
|
4264
|
+
a("form", {
|
|
4196
4265
|
class: O(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
4197
|
-
onSubmit: t[7] || (t[7] = G((...
|
|
4266
|
+
onSubmit: t[7] || (t[7] = G((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
|
|
4198
4267
|
}, [
|
|
4199
|
-
|
|
4268
|
+
a("input", {
|
|
4200
4269
|
ref: "fileEl",
|
|
4201
4270
|
type: "file",
|
|
4202
4271
|
hidden: "",
|
|
4203
4272
|
multiple: "",
|
|
4204
|
-
onChange: t[1] || (t[1] = (...
|
|
4273
|
+
onChange: t[1] || (t[1] = (...o) => s.onFile && s.onFile(...o))
|
|
4205
4274
|
}, null, 544),
|
|
4206
4275
|
r.attachOpen ? (c(), u("div", {
|
|
4207
4276
|
key: 0,
|
|
4208
4277
|
class: "wm-compose__overlay",
|
|
4209
|
-
onClick: t[2] || (t[2] = (
|
|
4278
|
+
onClick: t[2] || (t[2] = (o) => r.attachOpen = !1)
|
|
4210
4279
|
})) : y("", !0),
|
|
4211
|
-
r.attachOpen ? (c(), u("div",
|
|
4212
|
-
(c(!0), u(
|
|
4213
|
-
key:
|
|
4280
|
+
r.attachOpen ? (c(), u("div", ni, [
|
|
4281
|
+
(c(!0), u(E, null, U(s.attachItems, (o) => (c(), u("button", {
|
|
4282
|
+
key: o.action,
|
|
4214
4283
|
type: "button",
|
|
4215
4284
|
class: "wm-compose__menuItem",
|
|
4216
|
-
disabled:
|
|
4217
|
-
onClick: (l) => s.onAttachAction(
|
|
4285
|
+
disabled: o.disabled,
|
|
4286
|
+
onClick: (l) => s.onAttachAction(o.action)
|
|
4218
4287
|
}, [
|
|
4219
|
-
|
|
4220
|
-
(c(), u("svg",
|
|
4221
|
-
|
|
4222
|
-
d:
|
|
4288
|
+
a("span", ri, [
|
|
4289
|
+
(c(), u("svg", ii, [
|
|
4290
|
+
a("path", {
|
|
4291
|
+
d: o.path,
|
|
4223
4292
|
stroke: "currentColor",
|
|
4224
4293
|
"stroke-width": "1.8",
|
|
4225
4294
|
"stroke-linecap": "round",
|
|
4226
4295
|
"stroke-linejoin": "round",
|
|
4227
4296
|
fill: "none"
|
|
4228
|
-
}, null, 8,
|
|
4297
|
+
}, null, 8, ai)
|
|
4229
4298
|
]))
|
|
4230
4299
|
]),
|
|
4231
|
-
|
|
4232
|
-
], 8,
|
|
4300
|
+
a("span", null, v(o.label), 1)
|
|
4301
|
+
], 8, si))), 128))
|
|
4233
4302
|
])) : y("", !0),
|
|
4234
|
-
|
|
4303
|
+
$(a("textarea", {
|
|
4235
4304
|
ref: "inputEl",
|
|
4236
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
4305
|
+
"onUpdate:modelValue": t[3] || (t[3] = (o) => r.local = o),
|
|
4237
4306
|
class: "wm-compose__input",
|
|
4238
4307
|
rows: "3",
|
|
4239
4308
|
placeholder: n.placeholder,
|
|
4240
4309
|
disabled: n.disabled,
|
|
4241
|
-
onKeydown: t[4] || (t[4] = (...
|
|
4242
|
-
onInput: t[5] || (t[5] = (...
|
|
4243
|
-
}, null, 40,
|
|
4310
|
+
onKeydown: t[4] || (t[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
|
|
4311
|
+
onInput: t[5] || (t[5] = (...o) => s.autosize && s.autosize(...o))
|
|
4312
|
+
}, null, 40, oi), [
|
|
4244
4313
|
[X, r.local]
|
|
4245
4314
|
]),
|
|
4246
|
-
|
|
4247
|
-
|
|
4315
|
+
a("div", li, [
|
|
4316
|
+
a("button", {
|
|
4248
4317
|
type: "button",
|
|
4249
4318
|
class: O(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
4250
4319
|
title: n.attachLabel,
|
|
4251
4320
|
"aria-label": n.attachLabel,
|
|
4252
4321
|
disabled: r.recording,
|
|
4253
|
-
onClick: t[6] || (t[6] = (
|
|
4322
|
+
onClick: t[6] || (t[6] = (o) => r.attachOpen = !r.attachOpen)
|
|
4254
4323
|
}, [...t[9] || (t[9] = [
|
|
4255
|
-
|
|
4324
|
+
a("svg", {
|
|
4256
4325
|
width: "13",
|
|
4257
4326
|
height: "13",
|
|
4258
4327
|
viewBox: "0 0 24 24",
|
|
@@ -4263,16 +4332,16 @@ function ti(e, t, n, i, r, s) {
|
|
|
4263
4332
|
"stroke-linejoin": "round",
|
|
4264
4333
|
"aria-hidden": "true"
|
|
4265
4334
|
}, [
|
|
4266
|
-
|
|
4335
|
+
a("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" })
|
|
4267
4336
|
], -1)
|
|
4268
|
-
])], 10,
|
|
4269
|
-
|
|
4337
|
+
])], 10, ci),
|
|
4338
|
+
a("button", {
|
|
4270
4339
|
type: "submit",
|
|
4271
4340
|
class: O(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
4272
4341
|
disabled: !s.canSend,
|
|
4273
4342
|
"aria-label": s.t("composer.send")
|
|
4274
4343
|
}, [...t[10] || (t[10] = [
|
|
4275
|
-
|
|
4344
|
+
a("svg", {
|
|
4276
4345
|
width: "13",
|
|
4277
4346
|
height: "13",
|
|
4278
4347
|
viewBox: "0 0 24 24",
|
|
@@ -4283,14 +4352,14 @@ function ti(e, t, n, i, r, s) {
|
|
|
4283
4352
|
"stroke-linejoin": "round",
|
|
4284
4353
|
"aria-hidden": "true"
|
|
4285
4354
|
}, [
|
|
4286
|
-
|
|
4355
|
+
a("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4287
4356
|
], -1)
|
|
4288
|
-
])], 10,
|
|
4357
|
+
])], 10, di)
|
|
4289
4358
|
])
|
|
4290
4359
|
], 34)
|
|
4291
4360
|
], 6);
|
|
4292
4361
|
}
|
|
4293
|
-
const
|
|
4362
|
+
const hi = /* @__PURE__ */ N(Zr, [["render", ui], ["__scopeId", "data-v-01e81a27"]]), mi = {
|
|
4294
4363
|
name: "WmSuggestionChips",
|
|
4295
4364
|
props: {
|
|
4296
4365
|
items: { type: Array, default: () => [] },
|
|
@@ -4307,22 +4376,22 @@ const ni = /* @__PURE__ */ N(qr, [["render", ti], ["__scopeId", "data-v-01e81a27
|
|
|
4307
4376
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4308
4377
|
}
|
|
4309
4378
|
}
|
|
4310
|
-
},
|
|
4311
|
-
function
|
|
4379
|
+
}, fi = ["onClick"];
|
|
4380
|
+
function _i(e, t, n, i, r, s) {
|
|
4312
4381
|
return n.items.length ? (c(), u("div", {
|
|
4313
4382
|
key: s.batchKey,
|
|
4314
4383
|
class: "wm-chips"
|
|
4315
4384
|
}, [
|
|
4316
|
-
(c(!0), u(
|
|
4385
|
+
(c(!0), u(E, null, U(n.items, (o, l) => (c(), u("button", {
|
|
4317
4386
|
key: l,
|
|
4318
4387
|
type: "button",
|
|
4319
4388
|
class: "wm-chip",
|
|
4320
4389
|
style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4321
|
-
onClick: (p) => e.$emit("select",
|
|
4322
|
-
}, v(
|
|
4390
|
+
onClick: (p) => e.$emit("select", o)
|
|
4391
|
+
}, v(o.label), 13, fi))), 128))
|
|
4323
4392
|
])) : y("", !0);
|
|
4324
4393
|
}
|
|
4325
|
-
const
|
|
4394
|
+
const gi = /* @__PURE__ */ N(mi, [["render", _i], ["__scopeId", "data-v-47ad8085"]]), pi = {
|
|
4326
4395
|
name: "WmApprovalCard",
|
|
4327
4396
|
components: { AIAvatar: le },
|
|
4328
4397
|
inject: {
|
|
@@ -4366,27 +4435,27 @@ const ai = /* @__PURE__ */ N(si, [["render", ii], ["__scopeId", "data-v-47ad8085
|
|
|
4366
4435
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4367
4436
|
}
|
|
4368
4437
|
}
|
|
4369
|
-
},
|
|
4438
|
+
}, vi = { class: "wm-approval" }, yi = { class: "wm-approval__head" }, wi = { class: "wm-approval__icon" }, bi = { class: "wm-approval__main" }, ki = { class: "wm-approval__title" }, Ci = {
|
|
4370
4439
|
key: 0,
|
|
4371
4440
|
class: "wm-approval__detail"
|
|
4372
|
-
},
|
|
4373
|
-
function
|
|
4374
|
-
const
|
|
4375
|
-
return c(), u("div",
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4441
|
+
}, Ai = { class: "wm-approval__actions" };
|
|
4442
|
+
function Si(e, t, n, i, r, s) {
|
|
4443
|
+
const o = R("AIAvatar");
|
|
4444
|
+
return c(), u("div", vi, [
|
|
4445
|
+
a("div", yi, [
|
|
4446
|
+
a("div", wi, [
|
|
4447
|
+
K(o, {
|
|
4379
4448
|
size: 24,
|
|
4380
4449
|
name: n.agentName,
|
|
4381
4450
|
"image-url": n.agentAvatarUrl
|
|
4382
4451
|
}, null, 8, ["name", "image-url"])
|
|
4383
4452
|
]),
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
n.detail ? (c(), u("div",
|
|
4453
|
+
a("div", bi, [
|
|
4454
|
+
a("div", ki, v(n.action), 1),
|
|
4455
|
+
n.detail ? (c(), u("div", Ci, v(n.detail), 1)) : y("", !0)
|
|
4387
4456
|
])
|
|
4388
4457
|
]),
|
|
4389
|
-
|
|
4458
|
+
a("div", Ai, [
|
|
4390
4459
|
s.rejectId ? (c(), u("button", {
|
|
4391
4460
|
key: 0,
|
|
4392
4461
|
type: "button",
|
|
@@ -4402,9 +4471,9 @@ function gi(e, t, n, i, r, s) {
|
|
|
4402
4471
|
])
|
|
4403
4472
|
]);
|
|
4404
4473
|
}
|
|
4405
|
-
const
|
|
4474
|
+
const Mi = /* @__PURE__ */ N(pi, [["render", Si], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4406
4475
|
let Oe = 0;
|
|
4407
|
-
const
|
|
4476
|
+
const Ti = /* @__PURE__ */ new Set([
|
|
4408
4477
|
"text",
|
|
4409
4478
|
"textarea",
|
|
4410
4479
|
"number",
|
|
@@ -4412,7 +4481,7 @@ const pi = /* @__PURE__ */ new Set([
|
|
|
4412
4481
|
"select",
|
|
4413
4482
|
"multiselect",
|
|
4414
4483
|
"date"
|
|
4415
|
-
]),
|
|
4484
|
+
]), xi = {
|
|
4416
4485
|
name: "WmFormCard",
|
|
4417
4486
|
components: { AIAvatar: le },
|
|
4418
4487
|
inject: {
|
|
@@ -4442,7 +4511,7 @@ const pi = /* @__PURE__ */ new Set([
|
|
|
4442
4511
|
// douteux.
|
|
4443
4512
|
normalizedFields() {
|
|
4444
4513
|
var t;
|
|
4445
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
4514
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !Ti.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
4446
4515
|
}
|
|
4447
4516
|
},
|
|
4448
4517
|
created() {
|
|
@@ -4495,65 +4564,65 @@ const pi = /* @__PURE__ */ new Set([
|
|
|
4495
4564
|
}
|
|
4496
4565
|
}
|
|
4497
4566
|
}
|
|
4498
|
-
},
|
|
4567
|
+
}, Oi = { class: "wm-form" }, Li = { class: "wm-form__head" }, Ii = { class: "wm-form__icon" }, Ei = { class: "wm-form__main" }, Bi = { class: "wm-form__title" }, Ri = {
|
|
4499
4568
|
key: 0,
|
|
4500
4569
|
class: "wm-form__detail"
|
|
4501
|
-
},
|
|
4570
|
+
}, Ni = ["for"], Pi = {
|
|
4502
4571
|
key: 0,
|
|
4503
4572
|
class: "wm-form__req",
|
|
4504
4573
|
"aria-hidden": "true"
|
|
4505
|
-
},
|
|
4574
|
+
}, Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ui = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Di = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ji = ["id", "onUpdate:modelValue", "required", "disabled"], Hi = {
|
|
4506
4575
|
key: 4,
|
|
4507
4576
|
class: "wm-form__bool"
|
|
4508
|
-
},
|
|
4577
|
+
}, zi = ["id", "onUpdate:modelValue", "disabled"], qi = ["id", "onUpdate:modelValue", "required", "disabled"], Ki = {
|
|
4509
4578
|
value: "",
|
|
4510
4579
|
disabled: ""
|
|
4511
|
-
},
|
|
4580
|
+
}, Vi = ["value"], $i = {
|
|
4512
4581
|
key: 6,
|
|
4513
4582
|
class: "wm-form__multi"
|
|
4514
|
-
},
|
|
4583
|
+
}, Wi = ["value", "checked", "disabled", "onChange"], Gi = {
|
|
4515
4584
|
key: 0,
|
|
4516
4585
|
class: "wm-form__err"
|
|
4517
|
-
},
|
|
4586
|
+
}, Yi = ["disabled"], Ji = {
|
|
4518
4587
|
key: 0,
|
|
4519
4588
|
class: "wm-form__spinner",
|
|
4520
4589
|
"aria-hidden": "true"
|
|
4521
|
-
},
|
|
4590
|
+
}, Qi = {
|
|
4522
4591
|
key: 2,
|
|
4523
4592
|
class: "wm-form__doneLbl"
|
|
4524
4593
|
};
|
|
4525
|
-
function
|
|
4526
|
-
const
|
|
4527
|
-
return c(), u("div",
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
|
|
4594
|
+
function Xi(e, t, n, i, r, s) {
|
|
4595
|
+
const o = R("AIAvatar");
|
|
4596
|
+
return c(), u("div", Oi, [
|
|
4597
|
+
a("div", Li, [
|
|
4598
|
+
a("div", Ii, [
|
|
4599
|
+
K(o, {
|
|
4531
4600
|
size: 24,
|
|
4532
4601
|
name: n.agentName,
|
|
4533
4602
|
"image-url": n.agentAvatarUrl
|
|
4534
4603
|
}, null, 8, ["name", "image-url"])
|
|
4535
4604
|
]),
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
n.form.description ? (c(), u("div",
|
|
4605
|
+
a("div", Ei, [
|
|
4606
|
+
a("div", Bi, v(n.form.title || s.t("form.title")), 1),
|
|
4607
|
+
n.form.description ? (c(), u("div", Ri, v(n.form.description), 1)) : y("", !0)
|
|
4539
4608
|
])
|
|
4540
4609
|
]),
|
|
4541
|
-
|
|
4610
|
+
a("form", {
|
|
4542
4611
|
class: "wm-form__body",
|
|
4543
4612
|
onSubmit: t[0] || (t[0] = G((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4544
4613
|
}, [
|
|
4545
|
-
(c(!0), u(
|
|
4614
|
+
(c(!0), u(E, null, U(s.normalizedFields, (l) => (c(), u("div", {
|
|
4546
4615
|
key: l.key,
|
|
4547
4616
|
class: "wm-form__field"
|
|
4548
4617
|
}, [
|
|
4549
|
-
|
|
4618
|
+
a("label", {
|
|
4550
4619
|
for: `wm-f-${r._uid}-${l.key}`,
|
|
4551
4620
|
class: "wm-form__label"
|
|
4552
4621
|
}, [
|
|
4553
4622
|
ve(v(l.label), 1),
|
|
4554
|
-
l.required ? (c(), u("span",
|
|
4555
|
-
], 8,
|
|
4556
|
-
l.type === "text" ?
|
|
4623
|
+
l.required ? (c(), u("span", Pi, "*")) : y("", !0)
|
|
4624
|
+
], 8, Ni),
|
|
4625
|
+
l.type === "text" ? $((c(), u("input", {
|
|
4557
4626
|
key: 0,
|
|
4558
4627
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4559
4628
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4562,9 +4631,9 @@ function zi(e, t, n, i, r, s) {
|
|
|
4562
4631
|
placeholder: l.placeholder || "",
|
|
4563
4632
|
required: l.required,
|
|
4564
4633
|
disabled: n.readOnly || r.busy
|
|
4565
|
-
}, null, 8,
|
|
4634
|
+
}, null, 8, Fi)), [
|
|
4566
4635
|
[X, r.values[l.key]]
|
|
4567
|
-
]) : l.type === "textarea" ?
|
|
4636
|
+
]) : l.type === "textarea" ? $((c(), u("textarea", {
|
|
4568
4637
|
key: 1,
|
|
4569
4638
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4570
4639
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4573,9 +4642,9 @@ function zi(e, t, n, i, r, s) {
|
|
|
4573
4642
|
placeholder: l.placeholder || "",
|
|
4574
4643
|
required: l.required,
|
|
4575
4644
|
disabled: n.readOnly || r.busy
|
|
4576
|
-
}, null, 8,
|
|
4645
|
+
}, null, 8, Ui)), [
|
|
4577
4646
|
[X, r.values[l.key]]
|
|
4578
|
-
]) : l.type === "number" ?
|
|
4647
|
+
]) : l.type === "number" ? $((c(), u("input", {
|
|
4579
4648
|
key: 2,
|
|
4580
4649
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4581
4650
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4584,14 +4653,14 @@ function zi(e, t, n, i, r, s) {
|
|
|
4584
4653
|
placeholder: l.placeholder || "",
|
|
4585
4654
|
required: l.required,
|
|
4586
4655
|
disabled: n.readOnly || r.busy
|
|
4587
|
-
}, null, 8,
|
|
4656
|
+
}, null, 8, Di)), [
|
|
4588
4657
|
[
|
|
4589
4658
|
X,
|
|
4590
4659
|
r.values[l.key],
|
|
4591
4660
|
void 0,
|
|
4592
4661
|
{ number: !0 }
|
|
4593
4662
|
]
|
|
4594
|
-
]) : l.type === "date" ?
|
|
4663
|
+
]) : l.type === "date" ? $((c(), u("input", {
|
|
4595
4664
|
key: 3,
|
|
4596
4665
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4597
4666
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4599,19 +4668,19 @@ function zi(e, t, n, i, r, s) {
|
|
|
4599
4668
|
class: "wm-form__input",
|
|
4600
4669
|
required: l.required,
|
|
4601
4670
|
disabled: n.readOnly || r.busy
|
|
4602
|
-
}, null, 8,
|
|
4671
|
+
}, null, 8, ji)), [
|
|
4603
4672
|
[X, r.values[l.key]]
|
|
4604
|
-
]) : l.type === "boolean" ? (c(), u("label",
|
|
4605
|
-
|
|
4673
|
+
]) : l.type === "boolean" ? (c(), u("label", Hi, [
|
|
4674
|
+
$(a("input", {
|
|
4606
4675
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4607
4676
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
4608
4677
|
type: "checkbox",
|
|
4609
4678
|
disabled: n.readOnly || r.busy
|
|
4610
|
-
}, null, 8,
|
|
4679
|
+
}, null, 8, zi), [
|
|
4611
4680
|
[He, r.values[l.key]]
|
|
4612
4681
|
]),
|
|
4613
|
-
|
|
4614
|
-
])) : l.type === "select" ?
|
|
4682
|
+
a("span", null, v(l.placeholder || s.t("common.yes")), 1)
|
|
4683
|
+
])) : l.type === "select" ? $((c(), u("select", {
|
|
4615
4684
|
key: 5,
|
|
4616
4685
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4617
4686
|
"onUpdate:modelValue": (p) => r.values[l.key] = p,
|
|
@@ -4619,19 +4688,19 @@ function zi(e, t, n, i, r, s) {
|
|
|
4619
4688
|
required: l.required,
|
|
4620
4689
|
disabled: n.readOnly || r.busy
|
|
4621
4690
|
}, [
|
|
4622
|
-
|
|
4623
|
-
(c(!0), u(
|
|
4691
|
+
a("option", Ki, v(l.placeholder || s.t("form.choose")), 1),
|
|
4692
|
+
(c(!0), u(E, null, U(l.options, (p) => (c(), u("option", {
|
|
4624
4693
|
key: p.value,
|
|
4625
4694
|
value: p.value
|
|
4626
|
-
}, v(p.label), 9,
|
|
4627
|
-
], 8,
|
|
4695
|
+
}, v(p.label), 9, Vi))), 128))
|
|
4696
|
+
], 8, qi)), [
|
|
4628
4697
|
[ze, r.values[l.key]]
|
|
4629
|
-
]) : l.type === "multiselect" ? (c(), u("div",
|
|
4630
|
-
(c(!0), u(
|
|
4698
|
+
]) : l.type === "multiselect" ? (c(), u("div", $i, [
|
|
4699
|
+
(c(!0), u(E, null, U(l.options, (p) => (c(), u("label", {
|
|
4631
4700
|
key: p.value,
|
|
4632
4701
|
class: "wm-form__multiItem"
|
|
4633
4702
|
}, [
|
|
4634
|
-
|
|
4703
|
+
a("input", {
|
|
4635
4704
|
type: "checkbox",
|
|
4636
4705
|
value: p.value,
|
|
4637
4706
|
checked: Array.isArray(r.values[l.key]) && r.values[l.key].includes(p.value),
|
|
@@ -4641,25 +4710,25 @@ function zi(e, t, n, i, r, s) {
|
|
|
4641
4710
|
p.value,
|
|
4642
4711
|
k.target.checked
|
|
4643
4712
|
)
|
|
4644
|
-
}, null, 40,
|
|
4645
|
-
|
|
4713
|
+
}, null, 40, Wi),
|
|
4714
|
+
a("span", null, v(p.label), 1)
|
|
4646
4715
|
]))), 128))
|
|
4647
4716
|
])) : y("", !0)
|
|
4648
4717
|
]))), 128)),
|
|
4649
|
-
r.error ? (c(), u("div",
|
|
4650
|
-
n.readOnly ? (c(), u("div",
|
|
4718
|
+
r.error ? (c(), u("div", Gi, v(r.error), 1)) : y("", !0),
|
|
4719
|
+
n.readOnly ? (c(), u("div", Qi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4651
4720
|
key: 1,
|
|
4652
4721
|
type: "submit",
|
|
4653
4722
|
class: "wm-form__submit",
|
|
4654
4723
|
disabled: r.busy
|
|
4655
4724
|
}, [
|
|
4656
|
-
r.busy ? (c(), u("span",
|
|
4657
|
-
|
|
4658
|
-
], 8,
|
|
4725
|
+
r.busy ? (c(), u("span", Ji)) : y("", !0),
|
|
4726
|
+
a("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4727
|
+
], 8, Yi))
|
|
4659
4728
|
], 32)
|
|
4660
4729
|
]);
|
|
4661
4730
|
}
|
|
4662
|
-
const
|
|
4731
|
+
const Zi = /* @__PURE__ */ N(xi, [["render", Xi], ["__scopeId", "data-v-fe65cc56"]]), ea = {
|
|
4663
4732
|
name: "WmFeedback",
|
|
4664
4733
|
inject: {
|
|
4665
4734
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4693,15 +4762,15 @@ const qi = /* @__PURE__ */ N(vi, [["render", zi], ["__scopeId", "data-v-fe65cc56
|
|
|
4693
4762
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4694
4763
|
}
|
|
4695
4764
|
}
|
|
4696
|
-
},
|
|
4765
|
+
}, ta = { class: "wm-fb" }, na = { class: "wm-fb__title" }, sa = { class: "wm-fb__sub" }, ra = { class: "wm-fb__row" }, ia = ["onClick"], aa = { class: "wm-fb__emoji" }, oa = { class: "wm-fb__label" }, la = ["disabled"], ca = {
|
|
4697
4766
|
key: 1,
|
|
4698
4767
|
class: "wm-fb__done"
|
|
4699
|
-
},
|
|
4700
|
-
function
|
|
4701
|
-
return c(), u("div",
|
|
4702
|
-
n.done ? (c(), u("div",
|
|
4703
|
-
t[1] || (t[1] =
|
|
4704
|
-
|
|
4768
|
+
}, da = { class: "wm-fb__doneTitle" }, ua = { class: "wm-fb__doneSub" };
|
|
4769
|
+
function ha(e, t, n, i, r, s) {
|
|
4770
|
+
return c(), u("div", ta, [
|
|
4771
|
+
n.done ? (c(), u("div", ca, [
|
|
4772
|
+
t[1] || (t[1] = a("div", { class: "wm-fb__check" }, [
|
|
4773
|
+
a("svg", {
|
|
4705
4774
|
width: "16",
|
|
4706
4775
|
height: "16",
|
|
4707
4776
|
viewBox: "0 0 24 24",
|
|
@@ -4712,35 +4781,35 @@ function na(e, t, n, i, r, s) {
|
|
|
4712
4781
|
"stroke-linejoin": "round",
|
|
4713
4782
|
"aria-hidden": "true"
|
|
4714
4783
|
}, [
|
|
4715
|
-
|
|
4784
|
+
a("path", { d: "M20 6L9 17l-5-5" })
|
|
4716
4785
|
])
|
|
4717
4786
|
], -1)),
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
])) : (c(), u(
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
(c(!0), u(
|
|
4725
|
-
key:
|
|
4787
|
+
a("div", da, v(s.t("feedback.doneTitle")), 1),
|
|
4788
|
+
a("div", ua, v(s.t("feedback.doneSubtitle")), 1)
|
|
4789
|
+
])) : (c(), u(E, { key: 0 }, [
|
|
4790
|
+
a("div", na, v(s.t("feedback.question")), 1),
|
|
4791
|
+
a("div", sa, v(s.t("feedback.subtitle")), 1),
|
|
4792
|
+
a("div", ra, [
|
|
4793
|
+
(c(!0), u(E, null, U(s.options, (o) => (c(), u("button", {
|
|
4794
|
+
key: o.v,
|
|
4726
4795
|
type: "button",
|
|
4727
|
-
class: O(["wm-fb__opt", { "is-selected": r.sel ===
|
|
4728
|
-
onClick: (l) => r.sel =
|
|
4796
|
+
class: O(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
4797
|
+
onClick: (l) => r.sel = o.v
|
|
4729
4798
|
}, [
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
], 10,
|
|
4799
|
+
a("span", aa, v(o.e), 1),
|
|
4800
|
+
a("span", oa, v(o.l), 1)
|
|
4801
|
+
], 10, ia))), 128))
|
|
4733
4802
|
]),
|
|
4734
|
-
|
|
4803
|
+
a("button", {
|
|
4735
4804
|
type: "button",
|
|
4736
4805
|
class: "wm-fb__send",
|
|
4737
4806
|
disabled: !r.sel || n.busy,
|
|
4738
|
-
onClick: t[0] || (t[0] = (...
|
|
4739
|
-
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9,
|
|
4807
|
+
onClick: t[0] || (t[0] = (...o) => s.onSend && s.onSend(...o))
|
|
4808
|
+
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, la)
|
|
4740
4809
|
], 64))
|
|
4741
4810
|
]);
|
|
4742
4811
|
}
|
|
4743
|
-
const
|
|
4812
|
+
const ma = /* @__PURE__ */ N(ea, [["render", ha], ["__scopeId", "data-v-9b630564"]]), fa = {
|
|
4744
4813
|
name: "WmMoreMenu",
|
|
4745
4814
|
inject: {
|
|
4746
4815
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4783,32 +4852,32 @@ const sa = /* @__PURE__ */ N($i, [["render", na], ["__scopeId", "data-v-9b630564
|
|
|
4783
4852
|
this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
|
|
4784
4853
|
}
|
|
4785
4854
|
}
|
|
4786
|
-
},
|
|
4855
|
+
}, _a = { class: "wm-mm" }, ga = {
|
|
4787
4856
|
class: "wm-mm__pop",
|
|
4788
4857
|
role: "menu"
|
|
4789
|
-
},
|
|
4858
|
+
}, pa = {
|
|
4790
4859
|
key: 0,
|
|
4791
4860
|
class: "wm-mm__section"
|
|
4792
|
-
},
|
|
4861
|
+
}, va = { class: "wm-mm__label" }, ya = { class: "wm-mm__label" }, wa = {
|
|
4793
4862
|
key: 1,
|
|
4794
4863
|
class: "wm-mm__sep"
|
|
4795
|
-
},
|
|
4796
|
-
function
|
|
4797
|
-
return c(), u("div",
|
|
4798
|
-
|
|
4864
|
+
}, ba = { class: "wm-mm__section" }, ka = { class: "wm-mm__label" }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__section" }, Sa = { class: "wm-mm__label" }, Ma = { class: "wm-mm__label" };
|
|
4865
|
+
function Ta(e, t, n, i, r, s) {
|
|
4866
|
+
return c(), u("div", _a, [
|
|
4867
|
+
a("div", {
|
|
4799
4868
|
class: "wm-mm__scrim",
|
|
4800
|
-
onClick: t[0] || (t[0] = (
|
|
4869
|
+
onClick: t[0] || (t[0] = (o) => e.$emit("close"))
|
|
4801
4870
|
}),
|
|
4802
|
-
|
|
4803
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4871
|
+
a("div", ga, [
|
|
4872
|
+
n.canRename || n.canExport ? (c(), u("div", pa, [
|
|
4804
4873
|
n.canRename ? (c(), u("button", {
|
|
4805
4874
|
key: 0,
|
|
4806
4875
|
type: "button",
|
|
4807
4876
|
class: "wm-mm__item",
|
|
4808
|
-
onClick: t[1] || (t[1] = (
|
|
4877
|
+
onClick: t[1] || (t[1] = (o) => s.emit("rename"))
|
|
4809
4878
|
}, [
|
|
4810
|
-
t[7] || (t[7] =
|
|
4811
|
-
|
|
4879
|
+
t[7] || (t[7] = a("span", { class: "wm-mm__icon" }, [
|
|
4880
|
+
a("svg", {
|
|
4812
4881
|
width: "12",
|
|
4813
4882
|
height: "12",
|
|
4814
4883
|
viewBox: "0 0 24 24",
|
|
@@ -4819,20 +4888,20 @@ function pa(e, t, n, i, r, s) {
|
|
|
4819
4888
|
"stroke-linejoin": "round",
|
|
4820
4889
|
"aria-hidden": "true"
|
|
4821
4890
|
}, [
|
|
4822
|
-
|
|
4823
|
-
|
|
4891
|
+
a("path", { d: "M12 20h9" }),
|
|
4892
|
+
a("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
4824
4893
|
])
|
|
4825
4894
|
], -1)),
|
|
4826
|
-
|
|
4895
|
+
a("span", va, v(s.t("moreMenu.editTitle")), 1)
|
|
4827
4896
|
])) : y("", !0),
|
|
4828
4897
|
n.canExport ? (c(), u("button", {
|
|
4829
4898
|
key: 1,
|
|
4830
4899
|
type: "button",
|
|
4831
4900
|
class: "wm-mm__item",
|
|
4832
|
-
onClick: t[2] || (t[2] = (
|
|
4901
|
+
onClick: t[2] || (t[2] = (o) => s.emit("export"))
|
|
4833
4902
|
}, [
|
|
4834
|
-
t[8] || (t[8] =
|
|
4835
|
-
|
|
4903
|
+
t[8] || (t[8] = a("span", { class: "wm-mm__icon" }, [
|
|
4904
|
+
a("svg", {
|
|
4836
4905
|
width: "12",
|
|
4837
4906
|
height: "12",
|
|
4838
4907
|
viewBox: "0 0 24 24",
|
|
@@ -4843,22 +4912,22 @@ function pa(e, t, n, i, r, s) {
|
|
|
4843
4912
|
"stroke-linejoin": "round",
|
|
4844
4913
|
"aria-hidden": "true"
|
|
4845
4914
|
}, [
|
|
4846
|
-
|
|
4915
|
+
a("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
4847
4916
|
])
|
|
4848
4917
|
], -1)),
|
|
4849
|
-
|
|
4850
|
-
t[9] || (t[9] =
|
|
4918
|
+
a("span", ya, v(s.t("moreMenu.exportTranscript")), 1),
|
|
4919
|
+
t[9] || (t[9] = a("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
4851
4920
|
])) : y("", !0)
|
|
4852
4921
|
])) : y("", !0),
|
|
4853
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4854
|
-
|
|
4855
|
-
|
|
4922
|
+
n.canRename || n.canExport ? (c(), u("div", wa)) : y("", !0),
|
|
4923
|
+
a("div", ba, [
|
|
4924
|
+
a("button", {
|
|
4856
4925
|
type: "button",
|
|
4857
4926
|
class: "wm-mm__item",
|
|
4858
|
-
onClick: t[3] || (t[3] = (...
|
|
4927
|
+
onClick: t[3] || (t[3] = (...o) => s.toggleSound && s.toggleSound(...o))
|
|
4859
4928
|
}, [
|
|
4860
|
-
t[11] || (t[11] =
|
|
4861
|
-
|
|
4929
|
+
t[11] || (t[11] = a("span", { class: "wm-mm__icon" }, [
|
|
4930
|
+
a("svg", {
|
|
4862
4931
|
width: "12",
|
|
4863
4932
|
height: "12",
|
|
4864
4933
|
viewBox: "0 0 24 24",
|
|
@@ -4869,24 +4938,24 @@ function pa(e, t, n, i, r, s) {
|
|
|
4869
4938
|
"stroke-linejoin": "round",
|
|
4870
4939
|
"aria-hidden": "true"
|
|
4871
4940
|
}, [
|
|
4872
|
-
|
|
4873
|
-
|
|
4941
|
+
a("path", { d: "M11 5L6 9H2v6h4l5 4V5z" }),
|
|
4942
|
+
a("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
4874
4943
|
])
|
|
4875
4944
|
], -1)),
|
|
4876
|
-
|
|
4877
|
-
|
|
4945
|
+
a("span", ka, v(s.t("moreMenu.sound")), 1),
|
|
4946
|
+
a("span", {
|
|
4878
4947
|
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
|
|
4879
4948
|
}, [...t[10] || (t[10] = [
|
|
4880
|
-
|
|
4949
|
+
a("span", { class: "wm-mm__knob" }, null, -1)
|
|
4881
4950
|
])], 2)
|
|
4882
4951
|
]),
|
|
4883
|
-
|
|
4952
|
+
a("button", {
|
|
4884
4953
|
type: "button",
|
|
4885
4954
|
class: "wm-mm__item",
|
|
4886
|
-
onClick: t[4] || (t[4] = (...
|
|
4955
|
+
onClick: t[4] || (t[4] = (...o) => s.toggleBrowserNotif && s.toggleBrowserNotif(...o))
|
|
4887
4956
|
}, [
|
|
4888
|
-
t[13] || (t[13] =
|
|
4889
|
-
|
|
4957
|
+
t[13] || (t[13] = a("span", { class: "wm-mm__icon" }, [
|
|
4958
|
+
a("svg", {
|
|
4890
4959
|
width: "12",
|
|
4891
4960
|
height: "12",
|
|
4892
4961
|
viewBox: "0 0 24 24",
|
|
@@ -4897,27 +4966,27 @@ function pa(e, t, n, i, r, s) {
|
|
|
4897
4966
|
"stroke-linejoin": "round",
|
|
4898
4967
|
"aria-hidden": "true"
|
|
4899
4968
|
}, [
|
|
4900
|
-
|
|
4969
|
+
a("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
|
|
4901
4970
|
])
|
|
4902
4971
|
], -1)),
|
|
4903
|
-
|
|
4904
|
-
|
|
4972
|
+
a("span", Ca, v(s.t("moreMenu.browserNotifications")), 1),
|
|
4973
|
+
a("span", {
|
|
4905
4974
|
class: O(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
|
|
4906
4975
|
}, [...t[12] || (t[12] = [
|
|
4907
|
-
|
|
4976
|
+
a("span", { class: "wm-mm__knob" }, null, -1)
|
|
4908
4977
|
])], 2)
|
|
4909
4978
|
])
|
|
4910
4979
|
]),
|
|
4911
|
-
t[16] || (t[16] =
|
|
4912
|
-
|
|
4980
|
+
t[16] || (t[16] = a("div", { class: "wm-mm__sep" }, null, -1)),
|
|
4981
|
+
a("div", Aa, [
|
|
4913
4982
|
n.statusUrl ? (c(), u("button", {
|
|
4914
4983
|
key: 0,
|
|
4915
4984
|
type: "button",
|
|
4916
4985
|
class: "wm-mm__item",
|
|
4917
|
-
onClick: t[5] || (t[5] = (
|
|
4986
|
+
onClick: t[5] || (t[5] = (o) => s.emit("status"))
|
|
4918
4987
|
}, [
|
|
4919
|
-
t[14] || (t[14] =
|
|
4920
|
-
|
|
4988
|
+
t[14] || (t[14] = a("span", { class: "wm-mm__icon" }, [
|
|
4989
|
+
a("svg", {
|
|
4921
4990
|
width: "12",
|
|
4922
4991
|
height: "12",
|
|
4923
4992
|
viewBox: "0 0 24 24",
|
|
@@ -4928,19 +4997,19 @@ function pa(e, t, n, i, r, s) {
|
|
|
4928
4997
|
"stroke-linejoin": "round",
|
|
4929
4998
|
"aria-hidden": "true"
|
|
4930
4999
|
}, [
|
|
4931
|
-
|
|
5000
|
+
a("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
4932
5001
|
])
|
|
4933
5002
|
], -1)),
|
|
4934
|
-
|
|
5003
|
+
a("span", Sa, v(s.t("moreMenu.serviceStatus")), 1)
|
|
4935
5004
|
])) : y("", !0),
|
|
4936
5005
|
n.helpUrl ? (c(), u("button", {
|
|
4937
5006
|
key: 1,
|
|
4938
5007
|
type: "button",
|
|
4939
5008
|
class: "wm-mm__item",
|
|
4940
|
-
onClick: t[6] || (t[6] = (
|
|
5009
|
+
onClick: t[6] || (t[6] = (o) => s.emit("help"))
|
|
4941
5010
|
}, [
|
|
4942
|
-
t[15] || (t[15] =
|
|
4943
|
-
|
|
5011
|
+
t[15] || (t[15] = a("span", { class: "wm-mm__icon" }, [
|
|
5012
|
+
a("svg", {
|
|
4944
5013
|
width: "12",
|
|
4945
5014
|
height: "12",
|
|
4946
5015
|
viewBox: "0 0 24 24",
|
|
@@ -4951,16 +5020,16 @@ function pa(e, t, n, i, r, s) {
|
|
|
4951
5020
|
"stroke-linejoin": "round",
|
|
4952
5021
|
"aria-hidden": "true"
|
|
4953
5022
|
}, [
|
|
4954
|
-
|
|
5023
|
+
a("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" })
|
|
4955
5024
|
])
|
|
4956
5025
|
], -1)),
|
|
4957
|
-
|
|
5026
|
+
a("span", Ma, v(s.t("moreMenu.helpCenter")), 1)
|
|
4958
5027
|
])) : y("", !0)
|
|
4959
5028
|
])
|
|
4960
5029
|
])
|
|
4961
5030
|
]);
|
|
4962
5031
|
}
|
|
4963
|
-
const
|
|
5032
|
+
const xa = /* @__PURE__ */ N(fa, [["render", Ta], ["__scopeId", "data-v-76281e95"]]), Oa = {
|
|
4964
5033
|
name: "WmRenameDialog",
|
|
4965
5034
|
inject: {
|
|
4966
5035
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5002,27 +5071,27 @@ const va = /* @__PURE__ */ N(ra, [["render", pa], ["__scopeId", "data-v-76281e95
|
|
|
5002
5071
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
5003
5072
|
}
|
|
5004
5073
|
}
|
|
5005
|
-
},
|
|
5074
|
+
}, La = { class: "wm-dialog" }, Ia = {
|
|
5006
5075
|
class: "wm-dialog__card",
|
|
5007
5076
|
role: "dialog",
|
|
5008
5077
|
"aria-modal": "true"
|
|
5009
|
-
},
|
|
5010
|
-
function
|
|
5011
|
-
return c(), u("div",
|
|
5012
|
-
|
|
5078
|
+
}, Ea = { class: "wm-dialog__head" }, Ba = { class: "wm-dialog__title" }, Ra = ["aria-label"], Na = { class: "wm-dialog__body" }, Pa = ["placeholder"], Fa = { class: "wm-dialog__actions" }, Ua = ["disabled"];
|
|
5079
|
+
function Da(e, t, n, i, r, s) {
|
|
5080
|
+
return c(), u("div", La, [
|
|
5081
|
+
a("div", {
|
|
5013
5082
|
class: "wm-dialog__scrim",
|
|
5014
|
-
onClick: t[0] || (t[0] = (
|
|
5083
|
+
onClick: t[0] || (t[0] = (o) => e.$emit("close"))
|
|
5015
5084
|
}),
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5085
|
+
a("div", Ia, [
|
|
5086
|
+
a("div", Ea, [
|
|
5087
|
+
a("div", Ba, v(n.title || s.t("rename.title")), 1),
|
|
5088
|
+
a("button", {
|
|
5020
5089
|
type: "button",
|
|
5021
5090
|
class: "wm-dialog__close",
|
|
5022
5091
|
"aria-label": s.t("common.close"),
|
|
5023
|
-
onClick: t[1] || (t[1] = (
|
|
5092
|
+
onClick: t[1] || (t[1] = (o) => e.$emit("close"))
|
|
5024
5093
|
}, [...t[7] || (t[7] = [
|
|
5025
|
-
|
|
5094
|
+
a("svg", {
|
|
5026
5095
|
width: "12",
|
|
5027
5096
|
height: "12",
|
|
5028
5097
|
viewBox: "0 0 24 24",
|
|
@@ -5033,62 +5102,62 @@ function Oa(e, t, n, i, r, s) {
|
|
|
5033
5102
|
"stroke-linejoin": "round",
|
|
5034
5103
|
"aria-hidden": "true"
|
|
5035
5104
|
}, [
|
|
5036
|
-
|
|
5105
|
+
a("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5037
5106
|
], -1)
|
|
5038
|
-
])], 8,
|
|
5107
|
+
])], 8, Ra)
|
|
5039
5108
|
]),
|
|
5040
|
-
|
|
5041
|
-
|
|
5109
|
+
a("div", Na, [
|
|
5110
|
+
$(a("input", {
|
|
5042
5111
|
ref: "input",
|
|
5043
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
5112
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => r.value = o),
|
|
5044
5113
|
type: "text",
|
|
5045
5114
|
class: "wm-dialog__input",
|
|
5046
5115
|
placeholder: n.placeholder || s.t("rename.placeholder"),
|
|
5047
5116
|
maxlength: 120,
|
|
5048
5117
|
onKeydown: [
|
|
5049
|
-
t[3] || (t[3] = ue(G((...
|
|
5050
|
-
t[4] || (t[4] = ue(G((
|
|
5118
|
+
t[3] || (t[3] = ue(G((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]), ["enter"])),
|
|
5119
|
+
t[4] || (t[4] = ue(G((o) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5051
5120
|
]
|
|
5052
|
-
}, null, 40,
|
|
5121
|
+
}, null, 40, Pa), [
|
|
5053
5122
|
[X, r.value]
|
|
5054
5123
|
])
|
|
5055
5124
|
]),
|
|
5056
|
-
|
|
5057
|
-
|
|
5125
|
+
a("div", Fa, [
|
|
5126
|
+
a("button", {
|
|
5058
5127
|
type: "button",
|
|
5059
5128
|
class: "wm-dialog__btn",
|
|
5060
|
-
onClick: t[5] || (t[5] = (
|
|
5129
|
+
onClick: t[5] || (t[5] = (o) => e.$emit("close"))
|
|
5061
5130
|
}, v(s.t("common.cancel")), 1),
|
|
5062
|
-
|
|
5131
|
+
a("button", {
|
|
5063
5132
|
type: "button",
|
|
5064
5133
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5065
5134
|
disabled: !s.canSubmit,
|
|
5066
|
-
onClick: t[6] || (t[6] = (...
|
|
5067
|
-
}, v(s.t("common.save")), 9,
|
|
5135
|
+
onClick: t[6] || (t[6] = (...o) => s.onSubmit && s.onSubmit(...o))
|
|
5136
|
+
}, v(s.t("common.save")), 9, Ua)
|
|
5068
5137
|
])
|
|
5069
5138
|
])
|
|
5070
5139
|
]);
|
|
5071
5140
|
}
|
|
5072
|
-
const
|
|
5141
|
+
const ja = /* @__PURE__ */ N(Oa, [["render", Da], ["__scopeId", "data-v-6d5f94a8"]]), Le = "ww-messenger-tokens", Ha = {
|
|
5073
5142
|
name: "Messenger",
|
|
5074
5143
|
components: {
|
|
5075
5144
|
Launcher: Pt,
|
|
5076
5145
|
Header: ln,
|
|
5077
|
-
Onboarding:
|
|
5078
|
-
MessageList:
|
|
5079
|
-
Composer:
|
|
5080
|
-
SuggestionChips:
|
|
5081
|
-
ApprovalCard:
|
|
5082
|
-
FormCard:
|
|
5083
|
-
Feedback:
|
|
5084
|
-
MoreMenu:
|
|
5085
|
-
RenameDialog:
|
|
5146
|
+
Onboarding: es,
|
|
5147
|
+
MessageList: Wr,
|
|
5148
|
+
Composer: hi,
|
|
5149
|
+
SuggestionChips: gi,
|
|
5150
|
+
ApprovalCard: Mi,
|
|
5151
|
+
FormCard: Zi,
|
|
5152
|
+
Feedback: ma,
|
|
5153
|
+
MoreMenu: xa,
|
|
5154
|
+
RenameDialog: ja
|
|
5086
5155
|
},
|
|
5087
5156
|
mixins: [
|
|
5088
5157
|
ot,
|
|
5089
5158
|
mt,
|
|
5090
5159
|
ft,
|
|
5091
|
-
|
|
5160
|
+
gt
|
|
5092
5161
|
],
|
|
5093
5162
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
5094
5163
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -5266,20 +5335,20 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5266
5335
|
return this.allConversations.map((i) => {
|
|
5267
5336
|
var k;
|
|
5268
5337
|
const r = e[i.id] || [], s = W(i.last_read_message_id);
|
|
5269
|
-
let
|
|
5338
|
+
let o = 0, l = null;
|
|
5270
5339
|
for (let w = r.length - 1; w >= 0; w--) {
|
|
5271
5340
|
const T = r[w];
|
|
5272
5341
|
if (!T) continue;
|
|
5273
5342
|
if (((k = T.author) == null ? void 0 : k.type) === "user") break;
|
|
5274
|
-
const
|
|
5275
|
-
if (
|
|
5276
|
-
if (s != null &&
|
|
5277
|
-
t[T.id] !== 0 && (!l && T.author && (l = T.author),
|
|
5343
|
+
const B = W(T.id);
|
|
5344
|
+
if (B != null) {
|
|
5345
|
+
if (s != null && B <= s) break;
|
|
5346
|
+
t[T.id] !== 0 && (!l && T.author && (l = T.author), o++);
|
|
5278
5347
|
}
|
|
5279
5348
|
}
|
|
5280
5349
|
if (!r.length) {
|
|
5281
5350
|
const w = W(i.last_message_id);
|
|
5282
|
-
w != null && (s == null || w > s) && (
|
|
5351
|
+
w != null && (s == null || w > s) && (o = 1, l = i.last_message_author || null);
|
|
5283
5352
|
}
|
|
5284
5353
|
const p = r.filter(
|
|
5285
5354
|
(w) => !((w == null ? void 0 : w.id) != null && t[w.id] === 0)
|
|
@@ -5287,8 +5356,8 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5287
5356
|
return {
|
|
5288
5357
|
...i,
|
|
5289
5358
|
_preview: st(i, p),
|
|
5290
|
-
_unread:
|
|
5291
|
-
_unreadCount:
|
|
5359
|
+
_unread: o > 0,
|
|
5360
|
+
_unreadCount: o,
|
|
5292
5361
|
_lastAuthor: l
|
|
5293
5362
|
};
|
|
5294
5363
|
});
|
|
@@ -5321,7 +5390,7 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5321
5390
|
const e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {}, t = [];
|
|
5322
5391
|
for (const i of this.drawerConversations) {
|
|
5323
5392
|
if (!i._unread) continue;
|
|
5324
|
-
const r = Me(i, e[i.id] || []), s = i._lastAuthor,
|
|
5393
|
+
const r = Me(i, e[i.id] || []), s = i._lastAuthor, o = !s || s.type === "agent_ia", l = (s == null ? void 0 : s.name) || (o ? this.agentName : "") || "", p = (s == null ? void 0 : s.avatar_url) || (o ? this.agentAvatarUrl : null);
|
|
5325
5394
|
t.push({
|
|
5326
5395
|
convId: i.id,
|
|
5327
5396
|
preview: i._preview || this.t("notification.youHaveNewMessage"),
|
|
@@ -5466,8 +5535,8 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5466
5535
|
}
|
|
5467
5536
|
const t = this.revealedAt;
|
|
5468
5537
|
return (this.s.messagesByConv[e.id] || []).filter((r) => {
|
|
5469
|
-
var s,
|
|
5470
|
-
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((
|
|
5538
|
+
var s, o, l, p, k;
|
|
5539
|
+
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending" || oe(r) && !(t[r.id] > 0) ? !1 : (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((o = r == null ? void 0 : r.payload) == null ? void 0 : o.type) === "system" || Array.isArray((l = r == null ? void 0 : r.payload) == null ? void 0 : l.attachments) && r.payload.attachments.length || (p = r == null ? void 0 : r.metadata) != null && p.artifact || (k = r == null ? void 0 : r.metadata) != null && k.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
5471
5540
|
});
|
|
5472
5541
|
},
|
|
5473
5542
|
// True whenever we should show the "typing" indicator at the bottom
|
|
@@ -5503,11 +5572,11 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5503
5572
|
return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || this.t("action.title");
|
|
5504
5573
|
},
|
|
5505
5574
|
approvalDetail() {
|
|
5506
|
-
var i, r, s,
|
|
5575
|
+
var i, r, s, o, l, p;
|
|
5507
5576
|
const e = (s = (r = (i = this.pendingApproval) == null ? void 0 : i.payload) == null ? void 0 : r.pending) == null ? void 0 : s.user_explanation;
|
|
5508
5577
|
if (typeof e == "string" && e.trim())
|
|
5509
5578
|
return e.trim();
|
|
5510
|
-
const t = (p = (l = (
|
|
5579
|
+
const t = (p = (l = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
|
|
5511
5580
|
if (!t || typeof t != "object") return "";
|
|
5512
5581
|
const n = Object.entries(t);
|
|
5513
5582
|
return n.length ? n.slice(0, 2).map(([k, w]) => `${k}: ${w}`).join(" · ") : "";
|
|
@@ -5546,9 +5615,9 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5546
5615
|
const e = this.currentConv;
|
|
5547
5616
|
let t = /* @__PURE__ */ new Date();
|
|
5548
5617
|
if (e) {
|
|
5549
|
-
const
|
|
5550
|
-
if (
|
|
5551
|
-
const l = new Date(
|
|
5618
|
+
const o = ((r = (((i = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : i[e.id]) || []).find((l) => l == null ? void 0 : l.created_at)) == null ? void 0 : r.created_at) || e.created_at;
|
|
5619
|
+
if (o) {
|
|
5620
|
+
const l = new Date(o);
|
|
5552
5621
|
Number.isNaN(l.getTime()) || (t = l);
|
|
5553
5622
|
}
|
|
5554
5623
|
}
|
|
@@ -5577,12 +5646,12 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5577
5646
|
// ts comparison in `launcherPeeks`.
|
|
5578
5647
|
latestUnreads: {
|
|
5579
5648
|
handler(e) {
|
|
5580
|
-
const t = new Set(e.map((
|
|
5649
|
+
const t = new Set(e.map((o) => o.convId)), n = this.dismissedPeeks || {}, i = Object.keys(n);
|
|
5581
5650
|
if (!i.length) return;
|
|
5582
5651
|
const r = {};
|
|
5583
5652
|
let s = !1;
|
|
5584
|
-
for (const
|
|
5585
|
-
t.has(
|
|
5653
|
+
for (const o of i)
|
|
5654
|
+
t.has(o) ? r[o] = n[o] : s = !0;
|
|
5586
5655
|
s && (this.dismissedPeeks = r);
|
|
5587
5656
|
},
|
|
5588
5657
|
deep: !0
|
|
@@ -5754,8 +5823,8 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5754
5823
|
if (!i) return;
|
|
5755
5824
|
const r = Math.ceil(i.contentRect.height + 8);
|
|
5756
5825
|
r !== this.floatHeight && (this.floatHeight = r, this.$nextTick(() => {
|
|
5757
|
-
var s,
|
|
5758
|
-
(
|
|
5826
|
+
var s, o;
|
|
5827
|
+
(o = (s = this.$refs.messageList) == null ? void 0 : s.scrollToBottom) == null || o.call(s);
|
|
5759
5828
|
}));
|
|
5760
5829
|
}), this.floatRO.observe(t);
|
|
5761
5830
|
}
|
|
@@ -5809,13 +5878,13 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5809
5878
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
5810
5879
|
},
|
|
5811
5880
|
sendCurrentLauncherSize() {
|
|
5812
|
-
var w, T,
|
|
5881
|
+
var w, T, B, A, H, S, F;
|
|
5813
5882
|
if (this.isOpen) return;
|
|
5814
5883
|
const e = (T = (w = this.$el) == null ? void 0 : w.querySelector) == null ? void 0 : T.call(w, ".wm-launcherWrap");
|
|
5815
5884
|
if (!e) return;
|
|
5816
5885
|
const t = e.getBoundingClientRect();
|
|
5817
5886
|
if (!t.width || !t.height) return;
|
|
5818
|
-
const n = (((
|
|
5887
|
+
const n = (((B = this.launcherPeeks) == null ? void 0 : B.length) ?? 0) > 0, i = 16, r = Math.ceil(t.width), s = Math.ceil(t.height), o = (H = (A = this.$el) == null ? void 0 : A.querySelector) == null ? void 0 : H.call(A, ".wm-launcher"), l = (F = (S = this.$el) == null ? void 0 : S.querySelectorAll) == null ? void 0 : F.call(S, ".wm-peek"), p = l && l.length ? l[l.length - 1] : null;
|
|
5819
5888
|
let k = null;
|
|
5820
5889
|
if (p) {
|
|
5821
5890
|
const L = p.getBoundingClientRect();
|
|
@@ -5829,8 +5898,8 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5829
5898
|
this.notifyParentResize("closed", {
|
|
5830
5899
|
width: r + i,
|
|
5831
5900
|
height: s + i,
|
|
5832
|
-
launcherWidth: (
|
|
5833
|
-
launcherHeight: (
|
|
5901
|
+
launcherWidth: (o == null ? void 0 : o.offsetWidth) || null,
|
|
5902
|
+
launcherHeight: (o == null ? void 0 : o.offsetHeight) || null,
|
|
5834
5903
|
launcherHovered: this.launcherHovered,
|
|
5835
5904
|
peek: k,
|
|
5836
5905
|
peekHovered: this.launcherHovered && n
|
|
@@ -6071,33 +6140,33 @@ const La = /* @__PURE__ */ N(ya, [["render", Oa], ["__scopeId", "data-v-6d5f94a8
|
|
|
6071
6140
|
}
|
|
6072
6141
|
}
|
|
6073
6142
|
}
|
|
6074
|
-
},
|
|
6143
|
+
}, za = {
|
|
6075
6144
|
key: 0,
|
|
6076
6145
|
class: "wm-loading",
|
|
6077
6146
|
"aria-busy": "true",
|
|
6078
6147
|
"aria-live": "polite"
|
|
6079
|
-
},
|
|
6148
|
+
}, qa = ["aria-label"], Ka = {
|
|
6080
6149
|
key: 0,
|
|
6081
6150
|
class: "wm-state"
|
|
6082
|
-
},
|
|
6151
|
+
}, Va = { class: "wm-state__err" }, $a = { class: "wm-state__errTitle" }, Wa = { class: "wm-state__errSub" }, Ga = { class: "wm-bottom" }, Ya = {
|
|
6083
6152
|
key: 0,
|
|
6084
6153
|
ref: "floatEl",
|
|
6085
6154
|
class: "wm-float"
|
|
6086
|
-
},
|
|
6155
|
+
}, Ja = {
|
|
6087
6156
|
key: 1,
|
|
6088
6157
|
class: "wm-actionWait",
|
|
6089
6158
|
role: "status",
|
|
6090
6159
|
"aria-live": "polite"
|
|
6091
|
-
},
|
|
6160
|
+
}, Qa = { class: "wm-actionWait__lbl" }, Xa = {
|
|
6092
6161
|
key: 2,
|
|
6093
6162
|
class: "wm-attached"
|
|
6094
|
-
},
|
|
6095
|
-
function
|
|
6096
|
-
const
|
|
6163
|
+
}, Za = ["aria-label", "onClick"];
|
|
6164
|
+
function eo(e, t, n, i, r, s) {
|
|
6165
|
+
const o = R("Launcher"), l = R("Header"), p = R("Onboarding"), k = R("MessageList"), w = R("ApprovalCard"), T = R("FormCard"), B = R("Feedback"), A = R("SuggestionChips"), H = R("Composer"), S = R("MoreMenu"), F = R("RenameDialog");
|
|
6097
6166
|
return c(), u("div", {
|
|
6098
6167
|
class: O(["wm-root", `wm-root--${n.displayMode}`])
|
|
6099
6168
|
}, [
|
|
6100
|
-
!r.isOpen && !s.isEmbedded ? (c(), P(
|
|
6169
|
+
!r.isOpen && !s.isEmbedded ? (c(), P(o, {
|
|
6101
6170
|
key: 0,
|
|
6102
6171
|
"unread-count": s.unreadCount,
|
|
6103
6172
|
peeks: s.launcherPeeks,
|
|
@@ -6117,7 +6186,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6117
6186
|
"aria-label": "Messenger",
|
|
6118
6187
|
onClick: t[5] || (t[5] = (...L) => s.onPanelClick && s.onPanelClick(...L))
|
|
6119
6188
|
}, [
|
|
6120
|
-
!s.ready && !s.error ? (c(), u("div",
|
|
6189
|
+
!s.ready && !s.error ? (c(), u("div", za, [
|
|
6121
6190
|
s.isEmbedded ? y("", !0) : (c(), u("button", {
|
|
6122
6191
|
key: 0,
|
|
6123
6192
|
type: "button",
|
|
@@ -6125,7 +6194,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6125
6194
|
"aria-label": s.t("loading.minimize"),
|
|
6126
6195
|
onClick: t[0] || (t[0] = (...L) => s.close && s.close(...L))
|
|
6127
6196
|
}, [...t[6] || (t[6] = [
|
|
6128
|
-
|
|
6197
|
+
a("svg", {
|
|
6129
6198
|
width: "13",
|
|
6130
6199
|
height: "13",
|
|
6131
6200
|
viewBox: "0 0 24 24",
|
|
@@ -6136,15 +6205,15 @@ function $a(e, t, n, i, r, s) {
|
|
|
6136
6205
|
"stroke-linejoin": "round",
|
|
6137
6206
|
"aria-hidden": "true"
|
|
6138
6207
|
}, [
|
|
6139
|
-
|
|
6208
|
+
a("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6140
6209
|
], -1)
|
|
6141
|
-
])], 8,
|
|
6142
|
-
t[7] || (t[7] =
|
|
6210
|
+
])], 8, qa)),
|
|
6211
|
+
t[7] || (t[7] = a("div", {
|
|
6143
6212
|
class: "wm-loading__spinner",
|
|
6144
6213
|
"aria-hidden": "true"
|
|
6145
6214
|
}, null, -1))
|
|
6146
|
-
])) : (c(), u(
|
|
6147
|
-
|
|
6215
|
+
])) : (c(), u(E, { key: 1 }, [
|
|
6216
|
+
K(l, {
|
|
6148
6217
|
title: s.headerTitle,
|
|
6149
6218
|
"team-members": s.teamMembers,
|
|
6150
6219
|
"response-label": s.responseLabel,
|
|
@@ -6158,10 +6227,10 @@ function $a(e, t, n, i, r, s) {
|
|
|
6158
6227
|
onMore: s.toggleMore,
|
|
6159
6228
|
onClose: s.close
|
|
6160
6229
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6161
|
-
s.error ? (c(), u("div",
|
|
6162
|
-
|
|
6163
|
-
t[8] || (t[8] =
|
|
6164
|
-
|
|
6230
|
+
s.error ? (c(), u("div", Ka, [
|
|
6231
|
+
a("div", Va, [
|
|
6232
|
+
t[8] || (t[8] = a("div", { class: "wm-state__errIcon" }, [
|
|
6233
|
+
a("svg", {
|
|
6165
6234
|
width: "14",
|
|
6166
6235
|
height: "14",
|
|
6167
6236
|
viewBox: "0 0 24 24",
|
|
@@ -6172,16 +6241,16 @@ function $a(e, t, n, i, r, s) {
|
|
|
6172
6241
|
"stroke-linejoin": "round",
|
|
6173
6242
|
"aria-hidden": "true"
|
|
6174
6243
|
}, [
|
|
6175
|
-
|
|
6244
|
+
a("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6176
6245
|
])
|
|
6177
6246
|
], -1)),
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6247
|
+
a("div", null, [
|
|
6248
|
+
a("div", $a, v(s.t("error.connectionFailed")), 1),
|
|
6249
|
+
a("div", Wa, v(s.error), 1)
|
|
6181
6250
|
])
|
|
6182
6251
|
])
|
|
6183
|
-
])) : s.currentConv ? (c(), u(
|
|
6184
|
-
|
|
6252
|
+
])) : s.currentConv ? (c(), u(E, { key: 2 }, [
|
|
6253
|
+
K(k, {
|
|
6185
6254
|
ref: "messageList",
|
|
6186
6255
|
messages: s.displayedMessages,
|
|
6187
6256
|
"streaming-active": s.streamingActive,
|
|
@@ -6195,8 +6264,8 @@ function $a(e, t, n, i, r, s) {
|
|
|
6195
6264
|
"ai-agent-avatar-url": s.agentAvatarUrl,
|
|
6196
6265
|
onLoadMore: s.onLoadMore
|
|
6197
6266
|
}, 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"]),
|
|
6198
|
-
|
|
6199
|
-
s.floatVisible ? (c(), u("div",
|
|
6267
|
+
a("div", Ga, [
|
|
6268
|
+
s.floatVisible ? (c(), u("div", Ya, [
|
|
6200
6269
|
s.approvalReady ? (c(), P(w, {
|
|
6201
6270
|
key: 0,
|
|
6202
6271
|
action: s.approvalTitle,
|
|
@@ -6211,7 +6280,7 @@ function $a(e, t, n, i, r, s) {
|
|
|
6211
6280
|
"agent-name": s.agentName,
|
|
6212
6281
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6213
6282
|
onSubmit: s.onFormSubmit
|
|
6214
|
-
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), P(
|
|
6283
|
+
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), P(B, {
|
|
6215
6284
|
key: 2,
|
|
6216
6285
|
busy: r.feedbackBusy,
|
|
6217
6286
|
done: r.feedbackDone,
|
|
@@ -6222,12 +6291,12 @@ function $a(e, t, n, i, r, s) {
|
|
|
6222
6291
|
onSelect: s.onSuggestion
|
|
6223
6292
|
}, null, 8, ["items", "onSelect"]))
|
|
6224
6293
|
], 512)) : y("", !0),
|
|
6225
|
-
s.actionInFlight ? (c(), u("div",
|
|
6226
|
-
t[9] || (t[9] =
|
|
6294
|
+
s.actionInFlight ? (c(), u("div", Ja, [
|
|
6295
|
+
t[9] || (t[9] = a("span", {
|
|
6227
6296
|
class: "wm-actionWait__spinner",
|
|
6228
6297
|
"aria-hidden": "true"
|
|
6229
6298
|
}, null, -1)),
|
|
6230
|
-
|
|
6299
|
+
a("span", Qa, v(s.t("action.inProgress", {
|
|
6231
6300
|
name: s.actionInFlightName
|
|
6232
6301
|
})), 1)
|
|
6233
6302
|
])) : (c(), P(H, {
|
|
@@ -6263,12 +6332,12 @@ function $a(e, t, n, i, r, s) {
|
|
|
6263
6332
|
onClose: t[3] || (t[3] = (L) => r.renameDialogOpen = !1),
|
|
6264
6333
|
onSubmit: s.onRenameSubmit
|
|
6265
6334
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : y("", !0),
|
|
6266
|
-
r.pendingAttachments.length ? (c(), u("div",
|
|
6267
|
-
(c(!0), u(
|
|
6335
|
+
r.pendingAttachments.length ? (c(), u("div", Xa, [
|
|
6336
|
+
(c(!0), u(E, null, U(r.pendingAttachments, (L, z) => (c(), u("div", {
|
|
6268
6337
|
key: z,
|
|
6269
6338
|
class: "wm-attached__chip"
|
|
6270
6339
|
}, [
|
|
6271
|
-
t[11] || (t[11] =
|
|
6340
|
+
t[11] || (t[11] = a("svg", {
|
|
6272
6341
|
width: "11",
|
|
6273
6342
|
height: "11",
|
|
6274
6343
|
viewBox: "0 0 24 24",
|
|
@@ -6279,15 +6348,15 @@ function $a(e, t, n, i, r, s) {
|
|
|
6279
6348
|
"stroke-linejoin": "round",
|
|
6280
6349
|
"aria-hidden": "true"
|
|
6281
6350
|
}, [
|
|
6282
|
-
|
|
6351
|
+
a("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" })
|
|
6283
6352
|
], -1)),
|
|
6284
|
-
|
|
6285
|
-
|
|
6353
|
+
a("span", null, v(L.name), 1),
|
|
6354
|
+
a("button", {
|
|
6286
6355
|
type: "button",
|
|
6287
6356
|
"aria-label": s.t("attachment.remove"),
|
|
6288
6357
|
onClick: (Y) => r.pendingAttachments.splice(z, 1)
|
|
6289
6358
|
}, [...t[10] || (t[10] = [
|
|
6290
|
-
|
|
6359
|
+
a("svg", {
|
|
6291
6360
|
width: "10",
|
|
6292
6361
|
height: "10",
|
|
6293
6362
|
viewBox: "0 0 24 24",
|
|
@@ -6298,9 +6367,9 @@ function $a(e, t, n, i, r, s) {
|
|
|
6298
6367
|
"stroke-linejoin": "round",
|
|
6299
6368
|
"aria-hidden": "true"
|
|
6300
6369
|
}, [
|
|
6301
|
-
|
|
6370
|
+
a("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6302
6371
|
], -1)
|
|
6303
|
-
])], 8,
|
|
6372
|
+
])], 8, Za)
|
|
6304
6373
|
]))), 128))
|
|
6305
6374
|
])) : y("", !0)
|
|
6306
6375
|
], 64)) : (c(), P(p, {
|
|
@@ -6333,53 +6402,53 @@ function $a(e, t, n, i, r, s) {
|
|
|
6333
6402
|
], 6)) : y("", !0)
|
|
6334
6403
|
], 2);
|
|
6335
6404
|
}
|
|
6336
|
-
const
|
|
6405
|
+
const so = /* @__PURE__ */ N(Ha, [["render", eo], ["__scopeId", "data-v-3c8435c2"]]), ro = "0.5.36";
|
|
6337
6406
|
export {
|
|
6338
6407
|
le as AIAvatar,
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6408
|
+
_e as AVATAR_COLORS,
|
|
6409
|
+
hs as ActionResult,
|
|
6410
|
+
Mi as ApprovalCard,
|
|
6411
|
+
bs as ArtifactFormResponse,
|
|
6412
|
+
Rs as ArtifactInfoCard,
|
|
6413
|
+
Zs as ArtifactRenderer,
|
|
6414
|
+
Ys as ArtifactTicket,
|
|
6415
|
+
ur as AttachmentPreview,
|
|
6416
|
+
_r as Bubble,
|
|
6417
|
+
hi as Composer,
|
|
6349
6418
|
Ze as DEFAULT_BASE_URL,
|
|
6350
6419
|
ae as DEFAULT_LANGUAGE,
|
|
6351
|
-
|
|
6352
|
-
|
|
6420
|
+
ma as Feedback,
|
|
6421
|
+
Zi as FormCard,
|
|
6353
6422
|
ln as Header,
|
|
6354
6423
|
Re as HumanAvatar,
|
|
6355
6424
|
Pt as Launcher,
|
|
6356
6425
|
ke as MEDIA_RECORDER_SUPPORTED,
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6426
|
+
Wr as MessageList,
|
|
6427
|
+
so as Messenger,
|
|
6428
|
+
xa as MoreMenu,
|
|
6429
|
+
es as Onboarding,
|
|
6361
6430
|
he as SCREEN_CAPTURE_SUPPORTED,
|
|
6362
6431
|
et as SUPPORTED_LANGUAGES,
|
|
6363
|
-
|
|
6432
|
+
gi as SuggestionChips,
|
|
6364
6433
|
Gt as TeamAvatars,
|
|
6365
|
-
|
|
6366
|
-
|
|
6434
|
+
yr as Typing,
|
|
6435
|
+
ro as VERSION,
|
|
6367
6436
|
ye as avatarColor,
|
|
6368
6437
|
we as avatarInitials,
|
|
6369
|
-
|
|
6438
|
+
Yr as captureScreenshotFile,
|
|
6370
6439
|
j as colors,
|
|
6371
6440
|
Qe as createStore,
|
|
6372
6441
|
D as createTranslator,
|
|
6373
6442
|
We as createTransport,
|
|
6374
6443
|
re as dateLocale,
|
|
6375
|
-
|
|
6444
|
+
so as default,
|
|
6376
6445
|
pe as formatTime,
|
|
6377
|
-
|
|
6378
|
-
|
|
6446
|
+
no as guessAttachmentKind,
|
|
6447
|
+
Gr as pickRecorderMime,
|
|
6379
6448
|
dn as renderInlineMarkdown,
|
|
6380
6449
|
un as renderMarkdown,
|
|
6381
6450
|
be as resolveLanguage,
|
|
6382
|
-
|
|
6451
|
+
Qr as startScreenRecording,
|
|
6383
6452
|
Xe as tokensCss,
|
|
6384
6453
|
Je as uuid,
|
|
6385
6454
|
Je as v4
|