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