@_solaris/messenger-widget 0.5.83 → 0.6.1
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/README.md +1 -1
- package/dist/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +27 -27
- package/dist/messenger.cjs +26 -26
- package/dist/messenger.js +1144 -1283
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/core/store.d.ts +7 -3
- package/dist/types/core/types.d.ts +50 -3
- package/dist/types/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/types/mixins/approvalPacing.d.ts +0 -12
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as
|
|
1
|
+
import { reactive as Ke, openBlock as c, createElementBlock as d, normalizeStyle as j, normalizeClass as L, toDisplayString as y, resolveComponent as P, createVNode as W, Transition as Ne, withCtx as Fe, Fragment as B, renderList as N, withKeys as _e, withModifiers as Y, createElementVNode as l, createCommentVNode as k, createBlock as I, resolveDynamicComponent as Ae, mergeProps as He, withDirectives as $, vModelText as se, createTextVNode as Se, renderSlot as We, vModelCheckbox as $e, vModelSelect as Ge, markRaw as Re } from "vue";
|
|
2
2
|
const Ye = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -40,9 +40,9 @@ function et(e) {
|
|
|
40
40
|
}
|
|
41
41
|
function r(u, g) {
|
|
42
42
|
const p = t.listeners.get(u);
|
|
43
|
-
p && p.forEach((
|
|
43
|
+
p && p.forEach((R) => {
|
|
44
44
|
try {
|
|
45
|
-
|
|
45
|
+
R(g);
|
|
46
46
|
} catch (O) {
|
|
47
47
|
console.error("[transport] listener", u, O);
|
|
48
48
|
}
|
|
@@ -65,19 +65,19 @@ function et(e) {
|
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
67
|
async function a(u, g, p) {
|
|
68
|
-
const
|
|
68
|
+
const R = await fetch(`${t.baseUrl}${we}${g}`, {
|
|
69
69
|
method: u,
|
|
70
70
|
credentials: "include",
|
|
71
71
|
headers: n(),
|
|
72
72
|
body: p !== void 0 ? JSON.stringify(p) : void 0
|
|
73
73
|
});
|
|
74
|
-
if (!
|
|
75
|
-
const O = await o(
|
|
76
|
-
`HTTP ${
|
|
74
|
+
if (!R.ok) {
|
|
75
|
+
const O = await o(R), V = new Error(
|
|
76
|
+
`HTTP ${R.status} ${u} ${g} :: ${(O == null ? void 0 : O.error) || R.statusText}`
|
|
77
77
|
);
|
|
78
|
-
throw
|
|
78
|
+
throw V.status = R.status, V.body = O, V;
|
|
79
79
|
}
|
|
80
|
-
return
|
|
80
|
+
return R.status === 204 ? null : R.json();
|
|
81
81
|
}
|
|
82
82
|
async function o(u) {
|
|
83
83
|
try {
|
|
@@ -112,49 +112,49 @@ function et(e) {
|
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
if (!g.ok) {
|
|
115
|
-
const
|
|
116
|
-
`Session bootstrap failed: HTTP ${g.status} :: ${(
|
|
115
|
+
const K = await o(g), te = new Error(
|
|
116
|
+
`Session bootstrap failed: HTTP ${g.status} :: ${(K == null ? void 0 : K.error) || g.statusText}`
|
|
117
117
|
);
|
|
118
|
-
throw
|
|
118
|
+
throw te.status = g.status, te.body = K, te;
|
|
119
119
|
}
|
|
120
120
|
const p = await g.json();
|
|
121
121
|
t.userId = p.external_id;
|
|
122
|
-
const [
|
|
122
|
+
const [R, O] = await Promise.all([
|
|
123
123
|
fetch(
|
|
124
124
|
`${t.baseUrl}/widgets/${encodeURIComponent(t.widgetId)}/config`,
|
|
125
125
|
{ credentials: "include" }
|
|
126
|
-
).then(async (
|
|
127
|
-
if (!
|
|
128
|
-
const
|
|
126
|
+
).then(async (K) => {
|
|
127
|
+
if (!K.ok) {
|
|
128
|
+
const te = await o(K);
|
|
129
129
|
throw new Error(
|
|
130
|
-
`HTTP ${
|
|
130
|
+
`HTTP ${K.status} GET /widgets/:id/config :: ${(te == null ? void 0 : te.error) || K.statusText}`
|
|
131
131
|
);
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return K.json();
|
|
134
134
|
}),
|
|
135
135
|
a("GET", "/customers/me")
|
|
136
|
-
]),
|
|
137
|
-
return t.lastBootstrap =
|
|
136
|
+
]), V = { config: R, customer: (O == null ? void 0 : O.customer) ?? null };
|
|
137
|
+
return t.lastBootstrap = V, await b(), typeof document < "u" && (t.visibilityHandler = _, document.addEventListener(
|
|
138
138
|
"visibilitychange",
|
|
139
139
|
t.visibilityHandler
|
|
140
|
-
)),
|
|
140
|
+
)), m(), V;
|
|
141
141
|
}
|
|
142
142
|
async function b() {
|
|
143
143
|
try {
|
|
144
144
|
const u = await E();
|
|
145
145
|
t.lastActivityAt = u.reduce((g, p) => {
|
|
146
|
-
const
|
|
147
|
-
return
|
|
146
|
+
const R = p == null ? void 0 : p.last_message_at;
|
|
147
|
+
return R && (!g || R > g) ? R : g;
|
|
148
148
|
}, null);
|
|
149
149
|
} catch (u) {
|
|
150
150
|
console.error("[transport] initial /conversations failed", u);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
async function
|
|
153
|
+
async function v() {
|
|
154
154
|
const u = await a("GET", "/customers/me");
|
|
155
155
|
return (u == null ? void 0 : u.customer) ?? null;
|
|
156
156
|
}
|
|
157
|
-
async function
|
|
157
|
+
async function M(u) {
|
|
158
158
|
const g = await a("PATCH", "/customers/me", u);
|
|
159
159
|
return (g == null ? void 0 : g.customer) ?? null;
|
|
160
160
|
}
|
|
@@ -162,40 +162,40 @@ function et(e) {
|
|
|
162
162
|
const u = await a("GET", "/conversations");
|
|
163
163
|
return (u == null ? void 0 : u.conversations) ?? [];
|
|
164
164
|
}
|
|
165
|
-
async function
|
|
165
|
+
async function S(u = {}) {
|
|
166
166
|
return (await a("POST", "/conversations", u)).conversation;
|
|
167
167
|
}
|
|
168
|
-
async function
|
|
168
|
+
async function z(u) {
|
|
169
169
|
return (await a(
|
|
170
170
|
"GET",
|
|
171
171
|
`/conversations/${encodeURIComponent(u)}`
|
|
172
172
|
)).conversation;
|
|
173
173
|
}
|
|
174
|
-
async function
|
|
174
|
+
async function T(u, g) {
|
|
175
175
|
return (await a(
|
|
176
176
|
"PATCH",
|
|
177
177
|
`/conversations/${encodeURIComponent(u)}`,
|
|
178
178
|
g
|
|
179
179
|
)).conversation;
|
|
180
180
|
}
|
|
181
|
-
async function
|
|
181
|
+
async function U(u, g) {
|
|
182
182
|
return a(
|
|
183
183
|
"PATCH",
|
|
184
184
|
`/conversations/${encodeURIComponent(u)}/read`,
|
|
185
185
|
{ message_id: g }
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
async function
|
|
188
|
+
async function x(u, g = {}) {
|
|
189
189
|
const p = new URLSearchParams();
|
|
190
190
|
g.before && p.set("before", g.before), g.since && p.set("since", g.since), g.limit && p.set("limit", String(g.limit));
|
|
191
|
-
const
|
|
191
|
+
const R = p.toString() ? `?${p.toString()}` : "";
|
|
192
192
|
return a(
|
|
193
193
|
"GET",
|
|
194
|
-
`/conversations/${encodeURIComponent(u)}/messages${
|
|
194
|
+
`/conversations/${encodeURIComponent(u)}/messages${R}`
|
|
195
195
|
);
|
|
196
196
|
}
|
|
197
|
-
async function
|
|
198
|
-
|
|
197
|
+
async function q(u, g) {
|
|
198
|
+
ee();
|
|
199
199
|
const p = {
|
|
200
200
|
client_msg_id: g.client_msg_id,
|
|
201
201
|
type: "content",
|
|
@@ -209,48 +209,48 @@ function et(e) {
|
|
|
209
209
|
p
|
|
210
210
|
);
|
|
211
211
|
}
|
|
212
|
-
async function
|
|
213
|
-
return
|
|
212
|
+
async function J(u, g, p) {
|
|
213
|
+
return ee(), a(
|
|
214
214
|
"POST",
|
|
215
215
|
`/messages/${encodeURIComponent(u)}/callbacks/${encodeURIComponent(g)}`,
|
|
216
216
|
p ? { inputs: p } : {}
|
|
217
217
|
);
|
|
218
218
|
}
|
|
219
|
-
async function
|
|
220
|
-
const g = u.name || "attachment", p = u.type || "application/octet-stream",
|
|
219
|
+
async function ie(u) {
|
|
220
|
+
const g = u.name || "attachment", p = u.type || "application/octet-stream", R = u.size || 0, O = await a("POST", "/attachments", {
|
|
221
221
|
mime_type: p,
|
|
222
|
-
size_bytes:
|
|
222
|
+
size_bytes: R,
|
|
223
223
|
name: g
|
|
224
|
-
}),
|
|
224
|
+
}), V = await fetch(O.upload_url, {
|
|
225
225
|
method: "PUT",
|
|
226
226
|
headers: { "Content-Type": p },
|
|
227
227
|
body: u
|
|
228
228
|
});
|
|
229
|
-
if (!
|
|
230
|
-
throw new Error(`HTTP ${
|
|
229
|
+
if (!V.ok)
|
|
230
|
+
throw new Error(`HTTP ${V.status} PUT signed upload`);
|
|
231
231
|
return {
|
|
232
232
|
type: nt(p),
|
|
233
233
|
path: O.path,
|
|
234
234
|
mime_type: p,
|
|
235
|
-
size_bytes:
|
|
235
|
+
size_bytes: R
|
|
236
236
|
};
|
|
237
237
|
}
|
|
238
|
-
async function
|
|
238
|
+
async function ae(u) {
|
|
239
239
|
return a(
|
|
240
240
|
"GET",
|
|
241
241
|
`/attachments/sign?path=${encodeURIComponent(u)}`
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function X() {
|
|
245
245
|
const u = new URLSearchParams({ widgetId: t.widgetId }).toString();
|
|
246
246
|
return `${t.baseUrl}${we}/stream?${u}`;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function Q() {
|
|
249
249
|
if (!t.eventSource && !(typeof document < "u" && document.hidden) && t.started)
|
|
250
250
|
try {
|
|
251
|
-
const u = new EventSource(
|
|
251
|
+
const u = new EventSource(X(), { withCredentials: !0 });
|
|
252
252
|
for (const g of Ye)
|
|
253
|
-
u.addEventListener(g, (p) =>
|
|
253
|
+
u.addEventListener(g, (p) => oe(g, p.data));
|
|
254
254
|
u.addEventListener(
|
|
255
255
|
"error",
|
|
256
256
|
() => r("error", new Error("SSE error"))
|
|
@@ -259,65 +259,65 @@ function et(e) {
|
|
|
259
259
|
console.error("[transport] SSE open failed", u), r("error", u);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function oe(u, g) {
|
|
263
263
|
try {
|
|
264
|
-
const p = JSON.parse(g),
|
|
265
|
-
r(u,
|
|
264
|
+
const p = JSON.parse(g), R = p && typeof p == "object" && "data" in p ? p.data : p;
|
|
265
|
+
r(u, R);
|
|
266
266
|
} catch (p) {
|
|
267
267
|
console.error("[transport] bad SSE payload", u, p);
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Z() {
|
|
271
271
|
t.eventSource && (t.eventSource.close(), t.eventSource = null), t.connection !== "paused" && i("idle");
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
clearTimeout(t.burstTimer),
|
|
275
|
-
t.panelOpen ||
|
|
273
|
+
function ee() {
|
|
274
|
+
clearTimeout(t.burstTimer), Q(), t.panelOpen || (t.burstTimer = setTimeout(() => {
|
|
275
|
+
t.panelOpen || Z();
|
|
276
276
|
}, Qe));
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function ve(u) {
|
|
279
279
|
const g = t.panelOpen;
|
|
280
|
-
t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer),
|
|
280
|
+
t.panelOpen = !!u, t.panelOpen ? (clearTimeout(t.burstTimer), Q()) : ee(), g !== t.panelOpen && m();
|
|
281
281
|
}
|
|
282
|
-
async function
|
|
282
|
+
async function pe() {
|
|
283
283
|
try {
|
|
284
|
-
const u = await E(), g = u.reduce((
|
|
285
|
-
const
|
|
286
|
-
return
|
|
284
|
+
const u = await E(), g = u.reduce((R, O) => {
|
|
285
|
+
const V = O == null ? void 0 : O.last_message_at;
|
|
286
|
+
return V && (!R || V > R) ? V : R;
|
|
287
287
|
}, null);
|
|
288
|
-
g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }),
|
|
288
|
+
g && (!t.lastActivityAt || g > t.lastActivityAt) && (t.lastActivityAt = g, r("activity", { conversations: u, latestAt: g }), ee());
|
|
289
289
|
} catch (u) {
|
|
290
290
|
console.error("[transport] poll failed", u);
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function m() {
|
|
294
294
|
if (h(), typeof document < "u" && document.hidden) return;
|
|
295
295
|
const u = t.panelOpen ? Xe : Je;
|
|
296
|
-
t.pollTimer = setInterval(
|
|
296
|
+
t.pollTimer = setInterval(pe, u);
|
|
297
297
|
}
|
|
298
298
|
function h() {
|
|
299
299
|
t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function _() {
|
|
302
302
|
if (document.hidden)
|
|
303
303
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
304
|
-
t.hiddenGraceTimer = null, document.hidden && (h(),
|
|
304
|
+
t.hiddenGraceTimer = null, document.hidden && (h(), Z(), i("paused"));
|
|
305
305
|
}, Ze);
|
|
306
306
|
else {
|
|
307
307
|
if (t.hiddenGraceTimer) {
|
|
308
308
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
|
-
i("idle"),
|
|
311
|
+
i("idle"), m(), t.panelOpen && Q();
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
|
-
function
|
|
315
|
-
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null,
|
|
314
|
+
function w() {
|
|
315
|
+
h(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Z(), t.visibilityHandler && (document.removeEventListener(
|
|
316
316
|
"visibilitychange",
|
|
317
317
|
t.visibilityHandler
|
|
318
318
|
), t.visibilityHandler = null), t.started = !1;
|
|
319
319
|
}
|
|
320
|
-
async function
|
|
320
|
+
async function A(u) {
|
|
321
321
|
return !u || typeof u != "object" ? null : a("POST", "/update", u);
|
|
322
322
|
}
|
|
323
323
|
function C(u) {
|
|
@@ -333,23 +333,23 @@ function et(e) {
|
|
|
333
333
|
return {
|
|
334
334
|
on: s,
|
|
335
335
|
start: f,
|
|
336
|
-
stop:
|
|
337
|
-
setPanelOpen:
|
|
338
|
-
update:
|
|
336
|
+
stop: w,
|
|
337
|
+
setPanelOpen: ve,
|
|
338
|
+
update: A,
|
|
339
339
|
context: C,
|
|
340
340
|
// REST
|
|
341
|
-
getCustomer:
|
|
342
|
-
patchCustomer:
|
|
341
|
+
getCustomer: v,
|
|
342
|
+
patchCustomer: M,
|
|
343
343
|
listConversations: E,
|
|
344
|
-
createConversation:
|
|
345
|
-
getConversation:
|
|
346
|
-
patchConversation:
|
|
347
|
-
markConversationRead:
|
|
348
|
-
listMessages:
|
|
349
|
-
postMessage:
|
|
350
|
-
postCallback:
|
|
351
|
-
uploadAttachment:
|
|
352
|
-
signAttachment:
|
|
344
|
+
createConversation: S,
|
|
345
|
+
getConversation: z,
|
|
346
|
+
patchConversation: T,
|
|
347
|
+
markConversationRead: U,
|
|
348
|
+
listMessages: x,
|
|
349
|
+
postMessage: q,
|
|
350
|
+
postCallback: J,
|
|
351
|
+
uploadAttachment: ie,
|
|
352
|
+
signAttachment: ae,
|
|
353
353
|
// Read-only state
|
|
354
354
|
get connection() {
|
|
355
355
|
return t.connection;
|
|
@@ -407,50 +407,50 @@ function rt(e) {
|
|
|
407
407
|
connection: "idle"
|
|
408
408
|
}), s = [];
|
|
409
409
|
s.push(
|
|
410
|
-
e.on("connection", (
|
|
411
|
-
t.connection =
|
|
410
|
+
e.on("connection", (m) => {
|
|
411
|
+
t.connection = m;
|
|
412
412
|
})
|
|
413
413
|
), s.push(
|
|
414
|
-
e.on("message", (
|
|
415
|
-
const
|
|
416
|
-
!
|
|
414
|
+
e.on("message", (m) => {
|
|
415
|
+
const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.message;
|
|
416
|
+
!h || !(_ != null && _.id) || (X(h, _), _.client_msg_id && delete t.streamingByMsgId[_.client_msg_id], Z(h, _.created_at));
|
|
417
417
|
})
|
|
418
418
|
), s.push(
|
|
419
|
-
e.on("message_stream", (
|
|
420
|
-
const
|
|
421
|
-
!
|
|
419
|
+
e.on("message_stream", (m) => {
|
|
420
|
+
const h = m == null ? void 0 : m.message_id, _ = m == null ? void 0 : m.token;
|
|
421
|
+
!h || typeof _ != "string" || (t.streamingByMsgId[h] = (t.streamingByMsgId[h] || "") + _);
|
|
422
422
|
})
|
|
423
423
|
), s.push(
|
|
424
|
-
e.on("conversation_updated", (
|
|
425
|
-
const
|
|
426
|
-
if (!
|
|
427
|
-
const w = t.conversations.findIndex((
|
|
424
|
+
e.on("conversation_updated", (m) => {
|
|
425
|
+
const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.changes;
|
|
426
|
+
if (!h || !_) return;
|
|
427
|
+
const w = t.conversations.findIndex((A) => A.id === h);
|
|
428
428
|
w !== -1 && (t.conversations[w] = {
|
|
429
429
|
...t.conversations[w],
|
|
430
430
|
..._
|
|
431
431
|
});
|
|
432
432
|
})
|
|
433
433
|
), s.push(
|
|
434
|
-
e.on("config_updated", (
|
|
435
|
-
|
|
434
|
+
e.on("config_updated", (m) => {
|
|
435
|
+
m != null && m.config && (t.config = m.config);
|
|
436
436
|
})
|
|
437
437
|
), s.push(
|
|
438
|
-
e.on("action_status", (
|
|
439
|
-
const
|
|
440
|
-
if (!
|
|
441
|
-
const
|
|
442
|
-
|
|
438
|
+
e.on("action_status", (m) => {
|
|
439
|
+
const h = m == null ? void 0 : m.conversation_id, _ = m == null ? void 0 : m.action_id, w = m == null ? void 0 : m.action_name;
|
|
440
|
+
if (!h || !_) return;
|
|
441
|
+
const A = t.runningActionsByConv[h] || {};
|
|
442
|
+
m.state === "running" ? (A[_] = w || _, t.runningActionsByConv[h] = { ...A }) : m.state === "done" && (delete A[_], t.runningActionsByConv[h] = { ...A });
|
|
443
443
|
})
|
|
444
444
|
), s.push(
|
|
445
|
-
e.on("activity", (
|
|
446
|
-
Array.isArray(
|
|
445
|
+
e.on("activity", (m) => {
|
|
446
|
+
Array.isArray(m == null ? void 0 : m.conversations) && (t.conversations = m.conversations);
|
|
447
447
|
})
|
|
448
448
|
);
|
|
449
|
-
async function r(
|
|
449
|
+
async function r(m) {
|
|
450
450
|
try {
|
|
451
|
-
const
|
|
452
|
-
(w,
|
|
453
|
-
() =>
|
|
451
|
+
const h = new Promise(
|
|
452
|
+
(w, A) => setTimeout(
|
|
453
|
+
() => A(
|
|
454
454
|
new Error(
|
|
455
455
|
"bootstrap timeout (15s) — check baseUrl, CORS, and network"
|
|
456
456
|
)
|
|
@@ -458,61 +458,61 @@ function rt(e) {
|
|
|
458
458
|
15e3
|
|
459
459
|
)
|
|
460
460
|
), _ = await Promise.race([
|
|
461
|
-
e.start(
|
|
462
|
-
|
|
461
|
+
e.start(m),
|
|
462
|
+
h
|
|
463
463
|
]);
|
|
464
464
|
t.config = _.config, t.customer = _.customer, t.conversations = await Promise.race([
|
|
465
465
|
e.listConversations(),
|
|
466
|
-
|
|
466
|
+
h
|
|
467
467
|
]), t.ready = !0;
|
|
468
|
-
} catch (
|
|
469
|
-
console.error("[store] start failed",
|
|
468
|
+
} catch (h) {
|
|
469
|
+
console.error("[store] start failed", h), t.error = (h == null ? void 0 : h.message) || String(h);
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
function i() {
|
|
473
|
-
for (const
|
|
473
|
+
for (const m of s)
|
|
474
474
|
try {
|
|
475
|
-
|
|
475
|
+
m();
|
|
476
476
|
} catch {
|
|
477
477
|
}
|
|
478
478
|
e.stop();
|
|
479
479
|
}
|
|
480
|
-
async function n(
|
|
481
|
-
const
|
|
482
|
-
if (!
|
|
480
|
+
async function n(m) {
|
|
481
|
+
const h = ve(m);
|
|
482
|
+
if (!h) return t.customer;
|
|
483
483
|
try {
|
|
484
|
-
const _ = await e.patchCustomer(
|
|
484
|
+
const _ = await e.patchCustomer(h);
|
|
485
485
|
_ && (t.customer = _);
|
|
486
486
|
} catch (_) {
|
|
487
487
|
console.error("[store] applyCustomer failed", _);
|
|
488
488
|
}
|
|
489
489
|
return t.customer;
|
|
490
490
|
}
|
|
491
|
-
async function a(
|
|
492
|
-
const
|
|
493
|
-
return _ === -1 ? t.conversations = [
|
|
491
|
+
async function a(m = {}) {
|
|
492
|
+
const h = await e.createConversation(m), _ = t.conversations.findIndex((w) => w.id === h.id);
|
|
493
|
+
return _ === -1 ? t.conversations = [h, ...t.conversations] : t.conversations[_] = h, h;
|
|
494
494
|
}
|
|
495
495
|
const o = 50;
|
|
496
|
-
async function f(
|
|
497
|
-
const
|
|
498
|
-
if (!(
|
|
499
|
-
|
|
496
|
+
async function f(m) {
|
|
497
|
+
const h = t.paginationByConv[m];
|
|
498
|
+
if (!(h != null && h.loaded || h != null && h.loading)) {
|
|
499
|
+
v(m, { nextCursor: null, loading: !0, loaded: !1 });
|
|
500
500
|
try {
|
|
501
|
-
const _ = await e.listMessages(
|
|
501
|
+
const _ = await e.listMessages(m, {
|
|
502
502
|
limit: o
|
|
503
|
-
}), w = (_ == null ? void 0 : _.messages) ?? [],
|
|
504
|
-
for (const
|
|
505
|
-
(
|
|
506
|
-
const
|
|
507
|
-
t.messagesByConv[
|
|
508
|
-
|
|
509
|
-
),
|
|
503
|
+
}), w = (_ == null ? void 0 : _.messages) ?? [], A = t.messagesByConv[m] || [], C = /* @__PURE__ */ new Set();
|
|
504
|
+
for (const g of w)
|
|
505
|
+
(g == null ? void 0 : g.id) != null && C.add(`id:${String(g.id)}`), g != null && g.client_msg_id && C.add(`c:${g.client_msg_id}`);
|
|
506
|
+
const u = A.filter((g) => !((g == null ? void 0 : g.id) != null && C.has(`id:${String(g.id)}`) || g != null && g.client_msg_id && C.has(`c:${g.client_msg_id}`)));
|
|
507
|
+
t.messagesByConv[m] = [...w, ...u].sort(
|
|
508
|
+
ee
|
|
509
|
+
), v(m, {
|
|
510
510
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
511
511
|
loading: !1,
|
|
512
512
|
loaded: !0
|
|
513
513
|
});
|
|
514
514
|
} catch (_) {
|
|
515
|
-
console.error("[store] openConversation failed", _),
|
|
515
|
+
console.error("[store] openConversation failed", _), v(m, {
|
|
516
516
|
nextCursor: null,
|
|
517
517
|
loading: !1,
|
|
518
518
|
loaded: !1
|
|
@@ -520,131 +520,131 @@ function rt(e) {
|
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
async function b(
|
|
524
|
-
var
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
const w = (
|
|
523
|
+
async function b(m) {
|
|
524
|
+
var A;
|
|
525
|
+
const h = t.paginationByConv[m];
|
|
526
|
+
if (!h || h.loading || !h.nextCursor) return;
|
|
527
|
+
const w = (A = (t.messagesByConv[m] || []).find((C) => C == null ? void 0 : C.created_at)) == null ? void 0 : A.created_at;
|
|
528
528
|
if (w) {
|
|
529
|
-
|
|
529
|
+
v(m, { ...h, loading: !0 });
|
|
530
530
|
try {
|
|
531
|
-
const
|
|
531
|
+
const C = await e.listMessages(m, {
|
|
532
532
|
before: w,
|
|
533
533
|
limit: o
|
|
534
|
-
}),
|
|
535
|
-
for (const
|
|
536
|
-
(
|
|
537
|
-
const
|
|
538
|
-
t.messagesByConv[
|
|
539
|
-
nextCursor: (
|
|
534
|
+
}), u = (C == null ? void 0 : C.messages) ?? [], g = t.messagesByConv[m] || [], p = /* @__PURE__ */ new Set();
|
|
535
|
+
for (const O of g)
|
|
536
|
+
(O == null ? void 0 : O.id) != null && p.add(`id:${String(O.id)}`), O != null && O.client_msg_id && p.add(`c:${O.client_msg_id}`);
|
|
537
|
+
const R = u.filter((O) => !((O == null ? void 0 : O.id) != null && p.has(`id:${String(O.id)}`) || O != null && O.client_msg_id && p.has(`c:${O.client_msg_id}`)));
|
|
538
|
+
t.messagesByConv[m] = [...R, ...g], v(m, {
|
|
539
|
+
nextCursor: (C == null ? void 0 : C.next_cursor) ?? null,
|
|
540
540
|
loading: !1,
|
|
541
541
|
loaded: !0
|
|
542
542
|
});
|
|
543
|
-
} catch (
|
|
544
|
-
console.error("[store] loadMore failed",
|
|
543
|
+
} catch (C) {
|
|
544
|
+
console.error("[store] loadMore failed", C), v(m, { ...h, loading: !1 });
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
t.paginationByConv = { ...t.paginationByConv, [
|
|
548
|
+
function v(m, h) {
|
|
549
|
+
t.paginationByConv = { ...t.paginationByConv, [m]: h };
|
|
550
550
|
}
|
|
551
|
-
async function
|
|
552
|
-
const _ = await e.patchConversation(
|
|
551
|
+
async function M(m, h) {
|
|
552
|
+
const _ = await e.patchConversation(m, h), w = t.conversations.findIndex((A) => A.id === m);
|
|
553
553
|
w !== -1 && (t.conversations[w] = _);
|
|
554
554
|
}
|
|
555
|
-
async function E(
|
|
556
|
-
if (!
|
|
557
|
-
const
|
|
555
|
+
async function E(m) {
|
|
556
|
+
if (!m) return [];
|
|
557
|
+
const h = t.messagesByConv[m] || [];
|
|
558
558
|
let _ = "";
|
|
559
|
-
for (const w of
|
|
559
|
+
for (const w of h)
|
|
560
560
|
w != null && w.created_at && w.created_at > _ && (_ = w.created_at);
|
|
561
561
|
try {
|
|
562
562
|
const w = await e.listMessages(
|
|
563
|
-
|
|
563
|
+
m,
|
|
564
564
|
_ ? { since: _ } : {}
|
|
565
|
-
),
|
|
566
|
-
if (!
|
|
567
|
-
const
|
|
568
|
-
for (const
|
|
569
|
-
(
|
|
570
|
-
const
|
|
571
|
-
for (const
|
|
572
|
-
const
|
|
573
|
-
|
|
565
|
+
), A = (w == null ? void 0 : w.messages) || [];
|
|
566
|
+
if (!A.length) return [];
|
|
567
|
+
const C = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
568
|
+
for (const p of h)
|
|
569
|
+
(p == null ? void 0 : p.id) != null && C.add(String(p.id)), p != null && p.client_msg_id && u.add(p.client_msg_id);
|
|
570
|
+
const g = [];
|
|
571
|
+
for (const p of A) {
|
|
572
|
+
const R = (p == null ? void 0 : p.id) != null && C.has(String(p.id)) || (p == null ? void 0 : p.client_msg_id) && u.has(p.client_msg_id);
|
|
573
|
+
X(m, p), R || g.push(p);
|
|
574
574
|
}
|
|
575
|
-
return
|
|
575
|
+
return g;
|
|
576
576
|
} catch (w) {
|
|
577
577
|
return console.error("[store] fetchSinceLast failed", w), [];
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
|
-
async function
|
|
581
|
-
if (!(!
|
|
580
|
+
async function S(m, h) {
|
|
581
|
+
if (!(!m || h == null))
|
|
582
582
|
try {
|
|
583
|
-
const _ = await e.markConversationRead(
|
|
584
|
-
|
|
585
|
-
...t.conversations[
|
|
583
|
+
const _ = await e.markConversationRead(m, h), w = (_ == null ? void 0 : _.last_read_message_id) ?? h, A = t.conversations.findIndex((C) => (C == null ? void 0 : C.id) === m);
|
|
584
|
+
A !== -1 && (t.conversations[A] = {
|
|
585
|
+
...t.conversations[A],
|
|
586
586
|
last_read_message_id: w
|
|
587
587
|
});
|
|
588
588
|
} catch (_) {
|
|
589
589
|
console.error("[store] markConversationRead failed", _);
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
async function
|
|
593
|
-
var
|
|
594
|
-
const
|
|
595
|
-
if (!
|
|
596
|
-
const
|
|
597
|
-
id:
|
|
598
|
-
client_msg_id:
|
|
599
|
-
conversation_id:
|
|
592
|
+
async function z(m, h, { attachments: _, metadata: w } = {}) {
|
|
593
|
+
var R;
|
|
594
|
+
const A = (h || "").trim(), C = Array.isArray(_) && _.length > 0;
|
|
595
|
+
if (!m || !A && !C) return;
|
|
596
|
+
const u = st(), g = pe(m), p = {
|
|
597
|
+
id: u,
|
|
598
|
+
client_msg_id: u,
|
|
599
|
+
conversation_id: m,
|
|
600
600
|
type: "content",
|
|
601
|
-
text_md:
|
|
601
|
+
text_md: A,
|
|
602
602
|
author: {
|
|
603
603
|
type: "user",
|
|
604
|
-
id: ((
|
|
604
|
+
id: ((R = t.customer) == null ? void 0 : R.external_id) || null
|
|
605
605
|
},
|
|
606
|
-
created_at:
|
|
606
|
+
created_at: g,
|
|
607
607
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
608
608
|
_pending: !0,
|
|
609
|
-
...
|
|
609
|
+
...C ? { payload: { type: "content", attachments: _ } } : {},
|
|
610
610
|
...w && typeof w == "object" ? { metadata: w } : {}
|
|
611
611
|
};
|
|
612
|
-
|
|
612
|
+
X(m, p);
|
|
613
613
|
try {
|
|
614
|
-
await e.postMessage(
|
|
615
|
-
client_msg_id:
|
|
616
|
-
text_md:
|
|
617
|
-
created_at:
|
|
618
|
-
...
|
|
614
|
+
await e.postMessage(m, {
|
|
615
|
+
client_msg_id: u,
|
|
616
|
+
text_md: A,
|
|
617
|
+
created_at: g,
|
|
618
|
+
...C ? { attachments: _ } : {},
|
|
619
619
|
...w && typeof w == "object" ? { metadata: w } : {}
|
|
620
620
|
});
|
|
621
|
-
} catch (
|
|
622
|
-
console.error("[store] send failed",
|
|
621
|
+
} catch (O) {
|
|
622
|
+
console.error("[store] send failed", O), oe(m, u, {
|
|
623
623
|
_failed: !0,
|
|
624
624
|
_pending: !1
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
-
async function
|
|
629
|
-
|
|
628
|
+
async function T(m, h, _) {
|
|
629
|
+
m != null && (t.awaitingCallback[m] = !0);
|
|
630
630
|
try {
|
|
631
|
-
await e.postCallback(
|
|
631
|
+
await e.postCallback(m, h, _);
|
|
632
632
|
} catch (w) {
|
|
633
|
-
console.error("[store] callback failed", w),
|
|
633
|
+
console.error("[store] callback failed", w), m != null && delete t.awaitingCallback[m];
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
const
|
|
637
|
-
async function
|
|
638
|
-
if (!
|
|
639
|
-
const
|
|
640
|
-
if (
|
|
641
|
-
const _ =
|
|
642
|
-
if (!_ || _ - Date.now() > 6e4) return
|
|
636
|
+
const U = /* @__PURE__ */ new Map();
|
|
637
|
+
async function x(m) {
|
|
638
|
+
if (!m) return null;
|
|
639
|
+
const h = U.get(m);
|
|
640
|
+
if (h != null && h.url) {
|
|
641
|
+
const _ = h.expires_at ? Date.parse(h.expires_at) : 0;
|
|
642
|
+
if (!_ || _ - Date.now() > 6e4) return h.url;
|
|
643
643
|
}
|
|
644
644
|
try {
|
|
645
|
-
const _ = await e.signAttachment(
|
|
645
|
+
const _ = await e.signAttachment(m);
|
|
646
646
|
if (_ != null && _.signed_url)
|
|
647
|
-
return
|
|
647
|
+
return U.set(m, {
|
|
648
648
|
url: _.signed_url,
|
|
649
649
|
expires_at: _.expires_at
|
|
650
650
|
}), _.signed_url;
|
|
@@ -653,126 +653,116 @@ function rt(e) {
|
|
|
653
653
|
}
|
|
654
654
|
return null;
|
|
655
655
|
}
|
|
656
|
-
async function
|
|
657
|
-
const w = t.conversations.find((
|
|
656
|
+
async function q(m, { rating: h, comment: _ } = {}) {
|
|
657
|
+
const w = t.conversations.find((u) => u.id === m), C = {
|
|
658
658
|
...(w == null ? void 0 : w.metadata) || {},
|
|
659
659
|
feedback: {
|
|
660
|
-
rating:
|
|
660
|
+
rating: h,
|
|
661
661
|
comment: _ || null,
|
|
662
662
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
663
663
|
}
|
|
664
664
|
};
|
|
665
|
-
await
|
|
665
|
+
await M(m, { metadata: C });
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function J(m) {
|
|
668
668
|
var _, w;
|
|
669
|
-
const
|
|
670
|
-
for (let
|
|
671
|
-
const
|
|
672
|
-
if ((
|
|
673
|
-
return u;
|
|
674
|
-
}
|
|
675
|
-
return null;
|
|
676
|
-
}
|
|
677
|
-
function Q(h) {
|
|
678
|
-
var _, w, C;
|
|
679
|
-
const m = t.messagesByConv[h] || [];
|
|
680
|
-
for (let u = m.length - 1; u >= 0; u--) {
|
|
681
|
-
const g = m[u];
|
|
682
|
-
if (((_ = g == null ? void 0 : g.author) == null ? void 0 : _.type) === "user" || (g == null ? void 0 : g.type) === "action" && ((w = g == null ? void 0 : g.payload) == null ? void 0 : w.state) === "pending")
|
|
669
|
+
const h = t.messagesByConv[m] || [];
|
|
670
|
+
for (let A = h.length - 1; A >= 0; A--) {
|
|
671
|
+
const C = h[A];
|
|
672
|
+
if (((_ = C == null ? void 0 : C.author) == null ? void 0 : _.type) === "user" || (C == null ? void 0 : C.type) === "action" && ((w = C == null ? void 0 : C.payload) == null ? void 0 : w.state) === "pending")
|
|
683
673
|
return null;
|
|
684
|
-
const
|
|
685
|
-
if (
|
|
686
|
-
return {
|
|
674
|
+
const u = Array.isArray(C == null ? void 0 : C.callbacks) ? C.callbacks.find((g) => (g == null ? void 0 : g.intent) === "submit_form") : null;
|
|
675
|
+
if (u && Array.isArray(u.inputs) && u.inputs.length > 0)
|
|
676
|
+
return {
|
|
677
|
+
message: C,
|
|
678
|
+
form: {
|
|
679
|
+
title: u.title || "",
|
|
680
|
+
description: u.description || null,
|
|
681
|
+
submit_label: u.label || null,
|
|
682
|
+
fields: u.inputs
|
|
683
|
+
}
|
|
684
|
+
};
|
|
687
685
|
}
|
|
688
686
|
return null;
|
|
689
687
|
}
|
|
690
|
-
function
|
|
691
|
-
const
|
|
692
|
-
if (!
|
|
693
|
-
const _ = Object.keys(
|
|
688
|
+
function ie(m) {
|
|
689
|
+
const h = t.runningActionsByConv[m];
|
|
690
|
+
if (!h) return null;
|
|
691
|
+
const _ = Object.keys(h);
|
|
694
692
|
if (_.length === 0) return null;
|
|
695
693
|
const w = _[0];
|
|
696
|
-
return { id: w, payload: { name:
|
|
694
|
+
return { id: w, payload: { name: h[w] } };
|
|
697
695
|
}
|
|
698
|
-
function
|
|
699
|
-
var _, w,
|
|
700
|
-
const
|
|
701
|
-
for (let
|
|
702
|
-
const
|
|
703
|
-
if (((_ =
|
|
704
|
-
if ((
|
|
696
|
+
function ae(m) {
|
|
697
|
+
var _, w, A;
|
|
698
|
+
const h = t.messagesByConv[m] || [];
|
|
699
|
+
for (let C = h.length - 1; C >= 0; C--) {
|
|
700
|
+
const u = h[C];
|
|
701
|
+
if (((_ = u == null ? void 0 : u.author) == null ? void 0 : _.type) === "user") return [];
|
|
702
|
+
if ((u == null ? void 0 : u.type) === "action" && ((w = u == null ? void 0 : u.payload) == null ? void 0 : w.state) === "pending")
|
|
705
703
|
return [];
|
|
706
|
-
if (((
|
|
707
|
-
const
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
if (O && typeof O == "object" && typeof O.label == "string") {
|
|
714
|
-
const x = O.label.trim();
|
|
715
|
-
if (!x) return null;
|
|
716
|
-
const V = O.kind === "cta" || O.kind === "choice" || O.kind === "followup" ? O.kind : null;
|
|
717
|
-
return { label: x, kind: V };
|
|
718
|
-
}
|
|
719
|
-
return null;
|
|
720
|
-
}).filter(Boolean).slice(0, 4) : [];
|
|
704
|
+
if (((A = u == null ? void 0 : u.author) == null ? void 0 : A.type) !== "agent_ia") continue;
|
|
705
|
+
const g = Array.isArray(u == null ? void 0 : u.callbacks) ? u.callbacks.filter(
|
|
706
|
+
(p) => (p == null ? void 0 : p.intent) === "send_message" && (p.render ?? "inline") === "inline"
|
|
707
|
+
) : [];
|
|
708
|
+
return g.length ? g.map(
|
|
709
|
+
(p) => typeof p.label == "string" && p.label.trim() ? { label: p.label.trim(), kind: null } : null
|
|
710
|
+
).filter(Boolean).slice(0, 4) : [];
|
|
721
711
|
}
|
|
722
712
|
return [];
|
|
723
713
|
}
|
|
724
|
-
function
|
|
725
|
-
var
|
|
726
|
-
const _ = t.messagesByConv[
|
|
714
|
+
function X(m, h) {
|
|
715
|
+
var C;
|
|
716
|
+
const _ = t.messagesByConv[m] || [];
|
|
727
717
|
let w = -1;
|
|
728
|
-
|
|
729
|
-
(
|
|
730
|
-
)), w === -1 && (
|
|
731
|
-
let
|
|
732
|
-
w === -1 ?
|
|
718
|
+
h != null && h.client_msg_id && (w = _.findIndex(
|
|
719
|
+
(u) => (u == null ? void 0 : u.client_msg_id) && u.client_msg_id === h.client_msg_id
|
|
720
|
+
)), w === -1 && (h == null ? void 0 : h.id) !== void 0 && (h == null ? void 0 : h.id) !== null && (w = _.findIndex((u) => Q(u == null ? void 0 : u.id, h.id)));
|
|
721
|
+
let A;
|
|
722
|
+
w === -1 ? A = [..._, h].sort(ee) : (A = _.slice(), A[w] = {
|
|
733
723
|
..._[w],
|
|
734
|
-
...
|
|
724
|
+
...h,
|
|
735
725
|
_pending: !1,
|
|
736
726
|
_failed: !1
|
|
737
|
-
}), t.messagesByConv[
|
|
727
|
+
}), t.messagesByConv[m] = A, (h == null ? void 0 : h.type) === "action" && ((C = h == null ? void 0 : h.payload) != null && C.state) && h.payload.state !== "pending" && (h == null ? void 0 : h.id) != null && t.awaitingCallback[h.id] && delete t.awaitingCallback[h.id];
|
|
738
728
|
}
|
|
739
|
-
function
|
|
740
|
-
return
|
|
729
|
+
function Q(m, h) {
|
|
730
|
+
return m === h ? !0 : m == null || h == null ? !1 : String(m) === String(h);
|
|
741
731
|
}
|
|
742
|
-
function
|
|
743
|
-
const w = t.messagesByConv[
|
|
732
|
+
function oe(m, h, _) {
|
|
733
|
+
const w = t.messagesByConv[m];
|
|
744
734
|
if (!w) return;
|
|
745
|
-
const
|
|
746
|
-
if (
|
|
747
|
-
const
|
|
748
|
-
|
|
735
|
+
const A = w.findIndex((u) => u.id === h);
|
|
736
|
+
if (A === -1) return;
|
|
737
|
+
const C = w.slice();
|
|
738
|
+
C[A] = { ...w[A], ..._ }, t.messagesByConv[m] = C;
|
|
749
739
|
}
|
|
750
|
-
function
|
|
751
|
-
const _ = t.conversations.findIndex((
|
|
740
|
+
function Z(m, h) {
|
|
741
|
+
const _ = t.conversations.findIndex((A) => A.id === m);
|
|
752
742
|
if (_ === -1) return;
|
|
753
743
|
const w = t.conversations[_];
|
|
754
|
-
if (
|
|
755
|
-
const
|
|
756
|
-
|
|
757
|
-
(
|
|
758
|
-
), t.conversations =
|
|
744
|
+
if (h && (!w.last_message_at || h > w.last_message_at)) {
|
|
745
|
+
const A = t.conversations.slice();
|
|
746
|
+
A[_] = { ...w, last_message_at: h }, A.sort(
|
|
747
|
+
(C, u) => (u.last_message_at || "").localeCompare(C.last_message_at || "")
|
|
748
|
+
), t.conversations = A;
|
|
759
749
|
}
|
|
760
750
|
}
|
|
761
|
-
function
|
|
762
|
-
return (
|
|
751
|
+
function ee(m, h) {
|
|
752
|
+
return (m.created_at || "").localeCompare(h.created_at || "");
|
|
763
753
|
}
|
|
764
|
-
function
|
|
765
|
-
if (!
|
|
766
|
-
const
|
|
767
|
-
for (const [w,
|
|
768
|
-
|
|
769
|
-
return Object.keys(_).length && (
|
|
754
|
+
function ve(m) {
|
|
755
|
+
if (!m || typeof m != "object") return null;
|
|
756
|
+
const h = {}, _ = {};
|
|
757
|
+
for (const [w, A] of Object.entries(m))
|
|
758
|
+
A !== void 0 && (w === "name" || w === "email" || w === "language" ? A != null && String(A).trim() !== "" && (h[w] = A) : (w === "values" || w === "metadata") && A && typeof A == "object" ? Object.assign(_, A) : _[w] = A);
|
|
759
|
+
return Object.keys(_).length && (h.values = _), Object.keys(h).length ? h : null;
|
|
770
760
|
}
|
|
771
|
-
function
|
|
772
|
-
const
|
|
761
|
+
function pe(m) {
|
|
762
|
+
const h = t.messagesByConv[m] || [];
|
|
773
763
|
let _ = "";
|
|
774
|
-
for (const
|
|
775
|
-
|
|
764
|
+
for (const C of h)
|
|
765
|
+
C != null && C.created_at && C.created_at > _ && (_ = C.created_at);
|
|
776
766
|
const w = (/* @__PURE__ */ new Date()).toISOString();
|
|
777
767
|
return !_ || w > _ ? w : new Date(Date.parse(_) + 1).toISOString();
|
|
778
768
|
}
|
|
@@ -785,16 +775,15 @@ function rt(e) {
|
|
|
785
775
|
openConversation: f,
|
|
786
776
|
loadMore: b,
|
|
787
777
|
fetchSinceLast: E,
|
|
788
|
-
patchConversation:
|
|
789
|
-
markConversationRead:
|
|
790
|
-
send:
|
|
791
|
-
clickCallback:
|
|
792
|
-
signAttachment:
|
|
793
|
-
submitFeedback:
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
getLatestForm: Q,
|
|
778
|
+
patchConversation: M,
|
|
779
|
+
markConversationRead: S,
|
|
780
|
+
send: z,
|
|
781
|
+
clickCallback: T,
|
|
782
|
+
signAttachment: x,
|
|
783
|
+
submitFeedback: q,
|
|
784
|
+
getActionInFlight: ie,
|
|
785
|
+
getLatestSuggestions: ae,
|
|
786
|
+
getLatestForm: J,
|
|
798
787
|
// Pass-through for panel open/close (controls SSE burst).
|
|
799
788
|
setPanelOpen: e.setPanelOpen
|
|
800
789
|
};
|
|
@@ -823,10 +812,10 @@ const H = {
|
|
|
823
812
|
"#D97706",
|
|
824
813
|
"#059669"
|
|
825
814
|
];
|
|
826
|
-
function
|
|
815
|
+
function Me(e = "") {
|
|
827
816
|
return e ? be[e.charCodeAt(0) % be.length] : be[0];
|
|
828
817
|
}
|
|
829
|
-
function
|
|
818
|
+
function Te(e = "") {
|
|
830
819
|
return e.split(" ").map((t) => t[0] || "").join("").toUpperCase().slice(0, 2);
|
|
831
820
|
}
|
|
832
821
|
function Ce(e = /* @__PURE__ */ new Date(), t = "fr-FR") {
|
|
@@ -893,7 +882,7 @@ function ut(e) {
|
|
|
893
882
|
}
|
|
894
883
|
return t.protocol === "https:" || t.protocol === "http:" || t.protocol === "data:" && /^data:image\//i.test(e) ? e : null;
|
|
895
884
|
}
|
|
896
|
-
const
|
|
885
|
+
const ue = "fr", mt = ["fr", "en"], Le = { fr: "fr-FR", en: "en-US" }, ke = {
|
|
897
886
|
fr: {
|
|
898
887
|
// ── Common ───────────────────────────────────────────────────────
|
|
899
888
|
"common.newConversation": "Nouvelle conversation",
|
|
@@ -1166,15 +1155,15 @@ I reply within seconds.`,
|
|
|
1166
1155
|
}
|
|
1167
1156
|
};
|
|
1168
1157
|
function xe(e) {
|
|
1169
|
-
if (typeof e != "string") return
|
|
1158
|
+
if (typeof e != "string") return ue;
|
|
1170
1159
|
const t = e.trim().toLowerCase().slice(0, 2);
|
|
1171
|
-
return
|
|
1160
|
+
return mt.includes(t) ? t : ue;
|
|
1172
1161
|
}
|
|
1173
|
-
function
|
|
1174
|
-
return Le[xe(e)] || Le[
|
|
1162
|
+
function re(e) {
|
|
1163
|
+
return Le[xe(e)] || Le[ue];
|
|
1175
1164
|
}
|
|
1176
1165
|
function F(e) {
|
|
1177
|
-
const t = xe(e), s = ke[t] || ke[
|
|
1166
|
+
const t = xe(e), s = ke[t] || ke[ue], r = ke[ue];
|
|
1178
1167
|
return function(n, a) {
|
|
1179
1168
|
let o = s[n];
|
|
1180
1169
|
return o == null && (o = r[n]), o == null ? n : (a && (o = o.replace(
|
|
@@ -1183,22 +1172,22 @@ function F(e) {
|
|
|
1183
1172
|
)), o);
|
|
1184
1173
|
};
|
|
1185
1174
|
}
|
|
1186
|
-
function
|
|
1175
|
+
function Ee(e, t) {
|
|
1187
1176
|
if (!Array.isArray(e == null ? void 0 : e.options)) return t;
|
|
1188
1177
|
const s = e.options.find((r) => (r == null ? void 0 : r.value) === t);
|
|
1189
1178
|
return (s == null ? void 0 : s.label) || t;
|
|
1190
1179
|
}
|
|
1191
|
-
function
|
|
1192
|
-
return Array.isArray(t) ? t.map((r) =>
|
|
1180
|
+
function je(e, t, s) {
|
|
1181
|
+
return Array.isArray(t) ? t.map((r) => Ee(e, String(r))).join(", ") : typeof t == "boolean" ? s(t ? "common.yes" : "common.no") : Ee(e, String(t));
|
|
1193
1182
|
}
|
|
1194
|
-
function
|
|
1183
|
+
function ht(e, t, s = F()) {
|
|
1195
1184
|
if (!e || !t) return "";
|
|
1196
1185
|
const r = Array.isArray(e.fields) ? e.fields : [], i = [];
|
|
1197
1186
|
for (const n of r) {
|
|
1198
1187
|
if (!(n != null && n.key) || !(n != null && n.label)) continue;
|
|
1199
1188
|
const a = t[n.key];
|
|
1200
1189
|
if (a == null || a === "") continue;
|
|
1201
|
-
const o =
|
|
1190
|
+
const o = je(n, a, s);
|
|
1202
1191
|
o && i.push(`${n.label} :
|
|
1203
1192
|
${o}`);
|
|
1204
1193
|
}
|
|
@@ -1212,7 +1201,7 @@ function ft(e, t, s = F()) {
|
|
|
1212
1201
|
if (!(n != null && n.key) || !(n != null && n.label)) continue;
|
|
1213
1202
|
const a = t == null ? void 0 : t[n.key];
|
|
1214
1203
|
if (a == null || a === "") continue;
|
|
1215
|
-
const o =
|
|
1204
|
+
const o = je(n, a, s);
|
|
1216
1205
|
if (!o) continue;
|
|
1217
1206
|
const f = n.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
|
|
1218
1207
|
`));
|
|
@@ -1229,22 +1218,22 @@ function ft(e, t, s = F()) {
|
|
|
1229
1218
|
function ze(e) {
|
|
1230
1219
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1231
1220
|
}
|
|
1232
|
-
function
|
|
1221
|
+
function fe(e) {
|
|
1233
1222
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(e).trim());
|
|
1234
1223
|
}
|
|
1235
|
-
const
|
|
1236
|
-
function
|
|
1224
|
+
const Be = "";
|
|
1225
|
+
function de(e) {
|
|
1237
1226
|
let t = e;
|
|
1238
1227
|
const s = [];
|
|
1239
1228
|
return t = t.replace(/`([^`\n]+)`/g, (r, i) => {
|
|
1240
1229
|
const n = s.length;
|
|
1241
|
-
return s.push(i), `${
|
|
1242
|
-
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) =>
|
|
1230
|
+
return s.push(i), `${Be}CODE${n}${Be}`;
|
|
1231
|
+
}), t = t.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (r, i, n) => fe(n) ? `<a href="${n}" target="_blank" rel="noopener noreferrer">${i}</a>` : i), t = t.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), t = t.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), t = t.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), t = t.replace(/CODE(\d+)/g, (r, i) => `<code class="wm-md-code">${s[+i]}</code>`), t;
|
|
1243
1232
|
}
|
|
1244
1233
|
function qe(e) {
|
|
1245
1234
|
if (!e) return "";
|
|
1246
1235
|
const t = String(e).replace(/\[([^\]\n]+)\]\([^)\s]+\)/g, "$1");
|
|
1247
|
-
return
|
|
1236
|
+
return de(ze(t));
|
|
1248
1237
|
}
|
|
1249
1238
|
function _t(e) {
|
|
1250
1239
|
if (!e) return "";
|
|
@@ -1268,29 +1257,29 @@ function _t(e) {
|
|
|
1268
1257
|
if (/^\s*[-*]\s+/.test(n)) {
|
|
1269
1258
|
const b = [];
|
|
1270
1259
|
for (; r < t.length; ) {
|
|
1271
|
-
const
|
|
1272
|
-
if (!
|
|
1273
|
-
b.push(
|
|
1260
|
+
const M = /^\s*[-*]\s+(.*)$/.exec(t[r]);
|
|
1261
|
+
if (!M) break;
|
|
1262
|
+
b.push(M[1]), r++;
|
|
1274
1263
|
}
|
|
1275
|
-
const
|
|
1264
|
+
const v = b.map((M) => `<li>${de(M)}</li>`).join("");
|
|
1276
1265
|
s.push({
|
|
1277
1266
|
type: "block",
|
|
1278
|
-
html: `<ul class="wm-md-ul">${
|
|
1267
|
+
html: `<ul class="wm-md-ul">${v}</ul>`
|
|
1279
1268
|
});
|
|
1280
1269
|
continue;
|
|
1281
1270
|
}
|
|
1282
1271
|
const o = /^\s*(\d+)\.\s+(.*)$/.exec(n);
|
|
1283
1272
|
if (o) {
|
|
1284
|
-
const b = parseInt(o[1], 10),
|
|
1273
|
+
const b = parseInt(o[1], 10), v = [o[2]];
|
|
1285
1274
|
for (r++; r < t.length; ) {
|
|
1286
|
-
const
|
|
1287
|
-
if (!
|
|
1288
|
-
|
|
1275
|
+
const S = /^\s*\d+\.\s+(.*)$/.exec(t[r]);
|
|
1276
|
+
if (!S) break;
|
|
1277
|
+
v.push(S[1]), r++;
|
|
1289
1278
|
}
|
|
1290
|
-
const
|
|
1279
|
+
const M = v.map((S) => `<li>${de(S)}</li>`).join(""), E = b !== 1 ? ` start="${b}"` : "";
|
|
1291
1280
|
s.push({
|
|
1292
1281
|
type: "block",
|
|
1293
|
-
html: `<ol class="wm-md-ol"${E}>${
|
|
1282
|
+
html: `<ol class="wm-md-ol"${E}>${M}</ol>`
|
|
1294
1283
|
});
|
|
1295
1284
|
continue;
|
|
1296
1285
|
}
|
|
@@ -1299,11 +1288,11 @@ function _t(e) {
|
|
|
1299
1288
|
const b = f[1].length;
|
|
1300
1289
|
s.push({
|
|
1301
1290
|
type: "block",
|
|
1302
|
-
html: `<h${b} class="wm-md-h wm-md-h${b}">${
|
|
1291
|
+
html: `<h${b} class="wm-md-h wm-md-h${b}">${de(f[2])}</h${b}>`
|
|
1303
1292
|
}), r++;
|
|
1304
1293
|
continue;
|
|
1305
1294
|
}
|
|
1306
|
-
s.push({ type: "text", html:
|
|
1295
|
+
s.push({ type: "text", html: de(n) }), r++;
|
|
1307
1296
|
}
|
|
1308
1297
|
let i = "";
|
|
1309
1298
|
for (let n = 0; n < s.length; n++) {
|
|
@@ -1320,12 +1309,12 @@ function me(e) {
|
|
|
1320
1309
|
const t = (s = e == null ? void 0 : e.author) == null ? void 0 : s.type;
|
|
1321
1310
|
return t === "agent_ia" || t === "agent_human";
|
|
1322
1311
|
}
|
|
1323
|
-
function
|
|
1312
|
+
function G(e) {
|
|
1324
1313
|
if (e == null) return null;
|
|
1325
1314
|
const t = typeof e == "number" ? e : Number(e);
|
|
1326
1315
|
return Number.isFinite(t) ? t : null;
|
|
1327
1316
|
}
|
|
1328
|
-
function
|
|
1317
|
+
function Ie(e, t) {
|
|
1329
1318
|
let s = (e == null ? void 0 : e.last_message_at) || (e == null ? void 0 : e.updated_at) || (e == null ? void 0 : e.created_at) || "";
|
|
1330
1319
|
for (const r of t)
|
|
1331
1320
|
r != null && r.created_at && r.created_at > s && (s = r.created_at);
|
|
@@ -1344,7 +1333,7 @@ function gt(e, t) {
|
|
|
1344
1333
|
}
|
|
1345
1334
|
return (e == null ? void 0 : e.last_message_preview) || (e == null ? void 0 : e.preview) || ((i = e == null ? void 0 : e.metadata) == null ? void 0 : i.last_preview) || "";
|
|
1346
1335
|
}
|
|
1347
|
-
function
|
|
1336
|
+
function yt(e, t) {
|
|
1348
1337
|
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"));
|
|
1349
1338
|
}
|
|
1350
1339
|
function vt(e, t, s, r) {
|
|
@@ -1359,15 +1348,15 @@ function vt(e, t, s, r) {
|
|
|
1359
1348
|
if (!n) continue;
|
|
1360
1349
|
const a = (n.text_md || "").trim();
|
|
1361
1350
|
if (!a) continue;
|
|
1362
|
-
const o =
|
|
1351
|
+
const o = yt(n.author, s), f = n.created_at ? new Date(n.created_at).toLocaleString(r) : "";
|
|
1363
1352
|
i.push(`[${f}] ${o} :`), i.push(a), i.push("");
|
|
1364
1353
|
}
|
|
1365
1354
|
return i.join(`
|
|
1366
1355
|
`);
|
|
1367
1356
|
}
|
|
1368
|
-
function
|
|
1357
|
+
function pt(e, t, s = F(), r) {
|
|
1369
1358
|
if (!e) return;
|
|
1370
|
-
const i = vt(e, t || [], s,
|
|
1359
|
+
const i = vt(e, t || [], s, re(r)), n = new Blob([i], { type: "text/plain;charset=utf-8" });
|
|
1371
1360
|
try {
|
|
1372
1361
|
const a = URL.createObjectURL(n), o = document.createElement("a");
|
|
1373
1362
|
o.href = a, o.download = `${(e.name || "conversation").replace(/[^a-z0-9-_]+/gi, "_")}.txt`, document.body.appendChild(o), o.click(), document.body.removeChild(o), setTimeout(() => URL.revokeObjectURL(a), 1e3);
|
|
@@ -1533,13 +1522,13 @@ const wt = {
|
|
|
1533
1522
|
}
|
|
1534
1523
|
}
|
|
1535
1524
|
}
|
|
1536
|
-
},
|
|
1525
|
+
}, le = Object.freeze({
|
|
1537
1526
|
firstRevealDelayMs: 450,
|
|
1538
1527
|
msPerChar: 50,
|
|
1539
1528
|
minTypingMs: 900,
|
|
1540
1529
|
maxTypingMs: 12e3,
|
|
1541
1530
|
pauseBetweenMs: 300
|
|
1542
|
-
}),
|
|
1531
|
+
}), ce = (e, t) => Number.isFinite(e) ? e : t, bt = {
|
|
1543
1532
|
computed: {
|
|
1544
1533
|
// Resolved pacing values for the current widget. Reads each key
|
|
1545
1534
|
// from `widget.reveal_pacing` (server-side single source of truth)
|
|
@@ -1552,22 +1541,22 @@ const wt = {
|
|
|
1552
1541
|
var t;
|
|
1553
1542
|
const e = ((t = this.widget) == null ? void 0 : t.reveal_pacing) || {};
|
|
1554
1543
|
return {
|
|
1555
|
-
firstRevealDelayMs:
|
|
1544
|
+
firstRevealDelayMs: ce(
|
|
1556
1545
|
e.first_reveal_delay_ms,
|
|
1557
|
-
|
|
1546
|
+
le.firstRevealDelayMs
|
|
1558
1547
|
),
|
|
1559
|
-
msPerChar:
|
|
1560
|
-
minTypingMs:
|
|
1548
|
+
msPerChar: ce(e.ms_per_char, le.msPerChar),
|
|
1549
|
+
minTypingMs: ce(
|
|
1561
1550
|
e.min_typing_ms,
|
|
1562
|
-
|
|
1551
|
+
le.minTypingMs
|
|
1563
1552
|
),
|
|
1564
|
-
maxTypingMs:
|
|
1553
|
+
maxTypingMs: ce(
|
|
1565
1554
|
e.max_typing_ms,
|
|
1566
|
-
|
|
1555
|
+
le.maxTypingMs
|
|
1567
1556
|
),
|
|
1568
|
-
pauseBetweenMs:
|
|
1557
|
+
pauseBetweenMs: ce(
|
|
1569
1558
|
e.pause_between_ms,
|
|
1570
|
-
|
|
1559
|
+
le.pauseBetweenMs
|
|
1571
1560
|
)
|
|
1572
1561
|
};
|
|
1573
1562
|
}
|
|
@@ -1700,10 +1689,10 @@ const wt = {
|
|
|
1700
1689
|
this.nextRevealAt + s.pauseBetweenMs
|
|
1701
1690
|
) + n;
|
|
1702
1691
|
this.nextRevealAt = o;
|
|
1703
|
-
const f = Math.max(0, o - r), b = e.id,
|
|
1704
|
-
this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((
|
|
1692
|
+
const f = Math.max(0, o - r), b = e.id, v = setTimeout(() => {
|
|
1693
|
+
this.revealedAt = { ...this.revealedAt, [b]: Date.now() }, this.revealTimers = this.revealTimers.filter((M) => M !== v), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1705
1694
|
}, f);
|
|
1706
|
-
this.revealTimers.push(
|
|
1695
|
+
this.revealTimers.push(v);
|
|
1707
1696
|
},
|
|
1708
1697
|
// Walk the message list and queue / instantly-reveal every new
|
|
1709
1698
|
// entry according to its origin. Used by the `currentConvMessages`
|
|
@@ -1769,37 +1758,7 @@ const wt = {
|
|
|
1769
1758
|
this.revealedAt = { ...this.revealedAt, [e.id]: 0 }, this.scheduleReveal(e, t);
|
|
1770
1759
|
}
|
|
1771
1760
|
}
|
|
1772
|
-
}, kt = {
|
|
1773
|
-
data() {
|
|
1774
|
-
return {
|
|
1775
|
-
approvalSettled: !0,
|
|
1776
|
-
approvalSettleTimer: null,
|
|
1777
|
-
// message id of the pending action the card is currently locked
|
|
1778
|
-
// open for. Cleared whenever the approval clears / conv switches.
|
|
1779
|
-
approvalLatchId: null
|
|
1780
|
-
};
|
|
1781
|
-
},
|
|
1782
|
-
methods: {
|
|
1783
|
-
// Clears any in-flight settle timer and returns the approval pacing
|
|
1784
|
-
// to its idle state (settled = true so an already-pending historical
|
|
1785
|
-
// approval can render immediately on mount/restore). Called on conv
|
|
1786
|
-
// switch, on `pendingApproval` cleared (approve/reject/expire), and
|
|
1787
|
-
// on unmount.
|
|
1788
|
-
resetApprovalPacing() {
|
|
1789
|
-
this.approvalSettleTimer && (clearTimeout(this.approvalSettleTimer), this.approvalSettleTimer = null), this.approvalSettled = !0, this.approvalLatchId = null;
|
|
1790
|
-
},
|
|
1791
|
-
// Pause the approval card for one settle period. A follow-on bubble
|
|
1792
|
-
// from the same SSE burst should land (and start streaming, which
|
|
1793
|
-
// re-bumps us) before it expires. `ms` defaults to a short beat for
|
|
1794
|
-
// streaming-driven re-bumps; the fresh-approval path passes a longer
|
|
1795
|
-
// grace to bridge the gap until the explaining bubble's SSE arrives.
|
|
1796
|
-
bumpApprovalSettle(e = 800) {
|
|
1797
|
-
this.approvalSettled = !1, this.approvalSettleTimer && clearTimeout(this.approvalSettleTimer), this.approvalSettleTimer = setTimeout(() => {
|
|
1798
|
-
this.approvalSettled = !0, this.approvalSettleTimer = null;
|
|
1799
|
-
}, e);
|
|
1800
|
-
}
|
|
1801
|
-
}
|
|
1802
|
-
}, Ct = 300, At = {
|
|
1761
|
+
}, kt = 300, Ct = {
|
|
1803
1762
|
data() {
|
|
1804
1763
|
return {
|
|
1805
1764
|
// Numeric message id snapshot frozen the moment the user
|
|
@@ -1830,33 +1789,33 @@ const wt = {
|
|
|
1830
1789
|
markConvRead(e) {
|
|
1831
1790
|
var n, a;
|
|
1832
1791
|
if (!(e != null && e.id) || e._draft || !this.store) return;
|
|
1833
|
-
const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s =
|
|
1792
|
+
const t = ((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[e.id]) || [], s = At(t);
|
|
1834
1793
|
if (s == null) return;
|
|
1835
|
-
const r =
|
|
1794
|
+
const r = G(e.last_read_message_id), i = G(s);
|
|
1836
1795
|
i != null && (r != null && i <= r || (this._readMarkerPending = { convId: e.id, messageId: s }, !this._readMarkerTimer && (this._readMarkerTimer = setTimeout(() => {
|
|
1837
1796
|
const o = this._readMarkerPending;
|
|
1838
1797
|
this._readMarkerPending = null, this._readMarkerTimer = null, o && this.store && this.store.markConversationRead(
|
|
1839
1798
|
o.convId,
|
|
1840
1799
|
o.messageId
|
|
1841
1800
|
);
|
|
1842
|
-
},
|
|
1801
|
+
}, kt))));
|
|
1843
1802
|
}
|
|
1844
1803
|
}
|
|
1845
1804
|
};
|
|
1846
|
-
function
|
|
1805
|
+
function At(e) {
|
|
1847
1806
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
1848
1807
|
const s = e[t];
|
|
1849
|
-
if (!(!s || s._pending) &&
|
|
1808
|
+
if (!(!s || s._pending) && G(s.id) != null)
|
|
1850
1809
|
return s.id;
|
|
1851
1810
|
}
|
|
1852
1811
|
return null;
|
|
1853
1812
|
}
|
|
1854
|
-
const
|
|
1813
|
+
const D = (e, t) => {
|
|
1855
1814
|
const s = e.__vccOpts || e;
|
|
1856
1815
|
for (const [r, i] of t)
|
|
1857
1816
|
s[r] = i;
|
|
1858
1817
|
return s;
|
|
1859
|
-
},
|
|
1818
|
+
}, St = {
|
|
1860
1819
|
name: "WmHumanAvatar",
|
|
1861
1820
|
props: {
|
|
1862
1821
|
name: { type: String, default: "" },
|
|
@@ -1870,17 +1829,17 @@ const N = (e, t) => {
|
|
|
1870
1829
|
},
|
|
1871
1830
|
computed: {
|
|
1872
1831
|
bg() {
|
|
1873
|
-
return this.avatarUrl ? "transparent" :
|
|
1832
|
+
return this.avatarUrl ? "transparent" : Me(this.name);
|
|
1874
1833
|
},
|
|
1875
1834
|
initials() {
|
|
1876
|
-
return
|
|
1835
|
+
return Te(this.name);
|
|
1877
1836
|
}
|
|
1878
1837
|
}
|
|
1879
1838
|
}, Mt = ["src", "alt"];
|
|
1880
|
-
function
|
|
1839
|
+
function Tt(e, t, s, r, i, n) {
|
|
1881
1840
|
return c(), d("div", {
|
|
1882
|
-
class:
|
|
1883
|
-
style:
|
|
1841
|
+
class: L(["wm-huav", { "wm-huav--tail": s.tail }]),
|
|
1842
|
+
style: j({
|
|
1884
1843
|
width: s.size + "px",
|
|
1885
1844
|
height: s.size + "px",
|
|
1886
1845
|
"--wm-avr": Math.round(s.size * 0.32) + "px",
|
|
@@ -1893,13 +1852,13 @@ function xt(e, t, s, r, i, n) {
|
|
|
1893
1852
|
alt: s.name || ""
|
|
1894
1853
|
}, null, 8, Mt)) : (c(), d("span", {
|
|
1895
1854
|
key: 1,
|
|
1896
|
-
style:
|
|
1897
|
-
},
|
|
1855
|
+
style: j({ fontSize: s.size * 0.36 + "px" })
|
|
1856
|
+
}, y(n.initials), 5))
|
|
1898
1857
|
], 6);
|
|
1899
1858
|
}
|
|
1900
|
-
const
|
|
1859
|
+
const ye = /* @__PURE__ */ D(St, [["render", Tt], ["__scopeId", "data-v-14e10c0d"]]), xt = 3, Ot = {
|
|
1901
1860
|
name: "WmLauncher",
|
|
1902
|
-
components: { HumanAvatar:
|
|
1861
|
+
components: { HumanAvatar: ye },
|
|
1903
1862
|
inject: {
|
|
1904
1863
|
// Translator shared by the Messenger shell; French fallback when
|
|
1905
1864
|
// the component is used standalone.
|
|
@@ -1920,12 +1879,12 @@ const ve = /* @__PURE__ */ N(Tt, [["render", xt], ["__scopeId", "data-v-14e10c0d
|
|
|
1920
1879
|
// élément en ordre DOM avec un flex column normal). Les plus
|
|
1921
1880
|
// anciens remontent dans la pile.
|
|
1922
1881
|
visiblePeeks() {
|
|
1923
|
-
return this.peeks.slice(0,
|
|
1882
|
+
return this.peeks.slice(0, xt).reverse();
|
|
1924
1883
|
}
|
|
1925
1884
|
}
|
|
1926
|
-
},
|
|
1927
|
-
function
|
|
1928
|
-
const a =
|
|
1885
|
+
}, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], Et = { class: "wm-peek__avatar" }, Bt = ["aria-label"], It = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Dt = { class: "wm-peek__name" }, Ut = { class: "wm-peek__action" }, Nt = { class: "wm-peek__text" }, Ft = ["onClick"], Ht = ["aria-label"], jt = ["aria-label"];
|
|
1886
|
+
function zt(e, t, s, r, i, n) {
|
|
1887
|
+
const a = P("HumanAvatar");
|
|
1929
1888
|
return c(), d("div", {
|
|
1930
1889
|
class: "wm-launcherWrap",
|
|
1931
1890
|
onMouseenter: t[1] || (t[1] = (o) => e.$emit("hover", !0)),
|
|
@@ -1933,16 +1892,16 @@ function qt(e, t, s, r, i, n) {
|
|
|
1933
1892
|
onFocusin: t[3] || (t[3] = (o) => e.$emit("hover", !0)),
|
|
1934
1893
|
onFocusout: t[4] || (t[4] = (o) => e.$emit("hover", !1))
|
|
1935
1894
|
}, [
|
|
1936
|
-
|
|
1937
|
-
default:
|
|
1895
|
+
W(Ne, { name: "wm-peek" }, {
|
|
1896
|
+
default: Fe(() => [
|
|
1938
1897
|
n.visiblePeeks.length ? (c(), d("div", {
|
|
1939
1898
|
key: 0,
|
|
1940
|
-
class:
|
|
1899
|
+
class: L(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
|
|
1941
1900
|
}, [
|
|
1942
|
-
(c(!0), d(
|
|
1901
|
+
(c(!0), d(B, null, N(n.visiblePeeks, (o, f) => (c(), d("div", {
|
|
1943
1902
|
key: o.convId,
|
|
1944
1903
|
class: "wm-peek",
|
|
1945
|
-
style:
|
|
1904
|
+
style: j({
|
|
1946
1905
|
"--depth": n.visiblePeeks.length - 1 - f,
|
|
1947
1906
|
zIndex: f + 1
|
|
1948
1907
|
}),
|
|
@@ -1953,15 +1912,15 @@ function qt(e, t, s, r, i, n) {
|
|
|
1953
1912
|
}),
|
|
1954
1913
|
onClick: (b) => e.$emit("open", o.convId),
|
|
1955
1914
|
onKeydown: [
|
|
1956
|
-
|
|
1957
|
-
|
|
1915
|
+
_e(Y((b) => e.$emit("open", o.convId), ["prevent"]), ["enter"]),
|
|
1916
|
+
_e(Y((b) => e.$emit("open", o.convId), ["prevent"]), ["space"])
|
|
1958
1917
|
]
|
|
1959
1918
|
}, [
|
|
1960
1919
|
l("button", {
|
|
1961
1920
|
type: "button",
|
|
1962
1921
|
class: "wm-peek__close",
|
|
1963
1922
|
"aria-label": n.t("launcher.dismiss"),
|
|
1964
|
-
onClick:
|
|
1923
|
+
onClick: Y((b) => e.$emit("dismiss", o.convId), ["stop"])
|
|
1965
1924
|
}, [...t[5] || (t[5] = [
|
|
1966
1925
|
l("svg", {
|
|
1967
1926
|
width: "9",
|
|
@@ -1976,9 +1935,9 @@ function qt(e, t, s, r, i, n) {
|
|
|
1976
1935
|
}, [
|
|
1977
1936
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1978
1937
|
], -1)
|
|
1979
|
-
])], 8,
|
|
1938
|
+
])], 8, Lt),
|
|
1980
1939
|
l("div", Et, [
|
|
1981
|
-
|
|
1940
|
+
W(a, {
|
|
1982
1941
|
name: o.senderName,
|
|
1983
1942
|
"avatar-url": o.senderAvatarUrl,
|
|
1984
1943
|
size: 34
|
|
@@ -1987,21 +1946,21 @@ function qt(e, t, s, r, i, n) {
|
|
|
1987
1946
|
key: 0,
|
|
1988
1947
|
class: "wm-peek__avatarBadge",
|
|
1989
1948
|
"aria-label": n.t("launcher.unreadMessages", { count: o.count })
|
|
1990
|
-
},
|
|
1949
|
+
}, y(o.count > 9 ? "9+" : o.count), 9, Bt)) : k("", !0)
|
|
1991
1950
|
]),
|
|
1992
|
-
l("div",
|
|
1993
|
-
l("div",
|
|
1994
|
-
l("span", Dt,
|
|
1995
|
-
l("span", Ut,
|
|
1951
|
+
l("div", It, [
|
|
1952
|
+
l("div", Pt, [
|
|
1953
|
+
l("span", Dt, y(o.senderName || n.t("common.agent")), 1),
|
|
1954
|
+
l("span", Ut, y(n.t("launcher.repliedToYou")), 1)
|
|
1996
1955
|
]),
|
|
1997
|
-
l("p",
|
|
1956
|
+
l("p", Nt, y(o.preview), 1)
|
|
1998
1957
|
]),
|
|
1999
1958
|
l("button", {
|
|
2000
1959
|
type: "button",
|
|
2001
1960
|
class: "wm-peek__open",
|
|
2002
|
-
onClick:
|
|
2003
|
-
},
|
|
2004
|
-
], 44,
|
|
1961
|
+
onClick: Y((b) => e.$emit("open", o.convId), ["stop"])
|
|
1962
|
+
}, y(n.t("common.open")), 9, Ft)
|
|
1963
|
+
], 44, Rt))), 128))
|
|
2005
1964
|
], 2)) : k("", !0)
|
|
2006
1965
|
]),
|
|
2007
1966
|
_: 1
|
|
@@ -2033,11 +1992,11 @@ function qt(e, t, s, r, i, n) {
|
|
|
2033
1992
|
}) : n.t("launcher.unreadConversationsOne", {
|
|
2034
1993
|
count: s.unreadCount
|
|
2035
1994
|
})
|
|
2036
|
-
},
|
|
1995
|
+
}, y(s.unreadCount > 9 ? "9+" : s.unreadCount), 9, jt)) : k("", !0)
|
|
2037
1996
|
], 8, Ht)
|
|
2038
1997
|
], 32);
|
|
2039
1998
|
}
|
|
2040
|
-
const
|
|
1999
|
+
const qt = /* @__PURE__ */ D(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc"]]), Vt = {
|
|
2041
2000
|
name: "WmAIAvatar",
|
|
2042
2001
|
props: {
|
|
2043
2002
|
size: { type: Number, default: 26 },
|
|
@@ -2060,33 +2019,33 @@ const Vt = /* @__PURE__ */ N(Rt, [["render", qt], ["__scopeId", "data-v-d81459bc
|
|
|
2060
2019
|
},
|
|
2061
2020
|
computed: {
|
|
2062
2021
|
initials() {
|
|
2063
|
-
return
|
|
2022
|
+
return Te(this.name);
|
|
2064
2023
|
},
|
|
2065
2024
|
bgColor() {
|
|
2066
|
-
return
|
|
2025
|
+
return Me(this.name);
|
|
2067
2026
|
}
|
|
2068
2027
|
}
|
|
2069
|
-
},
|
|
2028
|
+
}, Kt = {
|
|
2070
2029
|
key: 0,
|
|
2071
2030
|
class: "wm-aiav__pulse"
|
|
2072
|
-
},
|
|
2073
|
-
function
|
|
2031
|
+
}, Wt = ["src", "alt"], $t = ["width", "height"];
|
|
2032
|
+
function Gt(e, t, s, r, i, n) {
|
|
2074
2033
|
return c(), d("div", {
|
|
2075
|
-
class:
|
|
2076
|
-
style:
|
|
2034
|
+
class: L(["wm-aiav", { "wm-aiav--tail": s.tail }]),
|
|
2035
|
+
style: j({
|
|
2077
2036
|
width: s.size + "px",
|
|
2078
2037
|
height: s.size + "px",
|
|
2079
2038
|
"--wm-avr": s.size * 0.32 + "px"
|
|
2080
2039
|
})
|
|
2081
2040
|
}, [
|
|
2082
|
-
s.pulse ? (c(), d("div",
|
|
2041
|
+
s.pulse ? (c(), d("div", Kt)) : k("", !0),
|
|
2083
2042
|
l("div", {
|
|
2084
|
-
class:
|
|
2043
|
+
class: L(["wm-aiav__inner", {
|
|
2085
2044
|
"wm-aiav__inner--glow": s.pulse,
|
|
2086
2045
|
"wm-aiav__inner--img": !!s.imageUrl,
|
|
2087
2046
|
"wm-aiav__inner--initials": !s.imageUrl && !!n.initials
|
|
2088
2047
|
}]),
|
|
2089
|
-
style:
|
|
2048
|
+
style: j(
|
|
2090
2049
|
!s.imageUrl && n.initials ? { background: n.bgColor } : null
|
|
2091
2050
|
)
|
|
2092
2051
|
}, [
|
|
@@ -2094,10 +2053,10 @@ function Yt(e, t, s, r, i, n) {
|
|
|
2094
2053
|
key: 0,
|
|
2095
2054
|
src: s.imageUrl,
|
|
2096
2055
|
alt: s.name || ""
|
|
2097
|
-
}, null, 8,
|
|
2056
|
+
}, null, 8, Wt)) : n.initials ? (c(), d("span", {
|
|
2098
2057
|
key: 1,
|
|
2099
|
-
style:
|
|
2100
|
-
},
|
|
2058
|
+
style: j({ fontSize: s.size * 0.36 + "px" })
|
|
2059
|
+
}, y(n.initials), 5)) : (c(), d("svg", {
|
|
2101
2060
|
key: 2,
|
|
2102
2061
|
width: s.size * 0.5,
|
|
2103
2062
|
height: s.size * 0.5,
|
|
@@ -2124,11 +2083,11 @@ function Yt(e, t, s, r, i, n) {
|
|
|
2124
2083
|
fill: "white",
|
|
2125
2084
|
opacity: "0.38"
|
|
2126
2085
|
}, null, -1)
|
|
2127
|
-
])], 8,
|
|
2086
|
+
])], 8, $t))
|
|
2128
2087
|
], 6)
|
|
2129
2088
|
], 6);
|
|
2130
2089
|
}
|
|
2131
|
-
const
|
|
2090
|
+
const he = /* @__PURE__ */ D(Vt, [["render", Gt], ["__scopeId", "data-v-6f7f685d"]]), Yt = {
|
|
2132
2091
|
name: "WmTeamAvatars",
|
|
2133
2092
|
props: {
|
|
2134
2093
|
members: { type: Array, default: () => [] },
|
|
@@ -2144,29 +2103,29 @@ const oe = /* @__PURE__ */ N(Kt, [["render", Yt], ["__scopeId", "data-v-6f7f685d
|
|
|
2144
2103
|
},
|
|
2145
2104
|
methods: {
|
|
2146
2105
|
colorFor(e) {
|
|
2147
|
-
return e.avatar_url ? "transparent" :
|
|
2106
|
+
return e.avatar_url ? "transparent" : Me(e.name || "");
|
|
2148
2107
|
},
|
|
2149
2108
|
initialsFor(e) {
|
|
2150
|
-
return
|
|
2109
|
+
return Te(e.name || "");
|
|
2151
2110
|
}
|
|
2152
2111
|
}
|
|
2153
|
-
},
|
|
2112
|
+
}, Jt = {
|
|
2154
2113
|
key: 0,
|
|
2155
2114
|
class: "wm-team"
|
|
2156
|
-
},
|
|
2115
|
+
}, Xt = ["src", "alt"], Qt = { key: 1 }, Zt = {
|
|
2157
2116
|
key: 0,
|
|
2158
2117
|
class: "wm-team__label"
|
|
2159
2118
|
};
|
|
2160
|
-
function
|
|
2161
|
-
return n.visible ? (c(), d("div",
|
|
2119
|
+
function en(e, t, s, r, i, n) {
|
|
2120
|
+
return n.visible ? (c(), d("div", Jt, [
|
|
2162
2121
|
l("div", {
|
|
2163
2122
|
class: "wm-team__stack",
|
|
2164
|
-
style:
|
|
2123
|
+
style: j({ width: n.stackWidth + "px" })
|
|
2165
2124
|
}, [
|
|
2166
|
-
(c(!0), d(
|
|
2125
|
+
(c(!0), d(B, null, N(s.members.slice(0, 3), (a, o) => (c(), d("div", {
|
|
2167
2126
|
key: o,
|
|
2168
2127
|
class: "wm-team__pill",
|
|
2169
|
-
style:
|
|
2128
|
+
style: j({
|
|
2170
2129
|
left: o * 13 + "px",
|
|
2171
2130
|
zIndex: 3 - o,
|
|
2172
2131
|
background: n.colorFor(a)
|
|
@@ -2176,15 +2135,15 @@ function tn(e, t, s, r, i, n) {
|
|
|
2176
2135
|
key: 0,
|
|
2177
2136
|
src: a.avatar_url,
|
|
2178
2137
|
alt: a.name || ""
|
|
2179
|
-
}, null, 8,
|
|
2138
|
+
}, null, 8, Xt)) : (c(), d("span", Qt, y(n.initialsFor(a)), 1))
|
|
2180
2139
|
], 4))), 128))
|
|
2181
2140
|
], 4),
|
|
2182
|
-
s.responseLabel ? (c(), d("span",
|
|
2141
|
+
s.responseLabel ? (c(), d("span", Zt, y(s.responseLabel), 1)) : k("", !0)
|
|
2183
2142
|
])) : k("", !0);
|
|
2184
2143
|
}
|
|
2185
|
-
const
|
|
2144
|
+
const tn = /* @__PURE__ */ D(Yt, [["render", en], ["__scopeId", "data-v-e49a9063"]]), nn = {
|
|
2186
2145
|
name: "WmHeader",
|
|
2187
|
-
components: { AIAvatar:
|
|
2146
|
+
components: { AIAvatar: he, TeamAvatars: tn },
|
|
2188
2147
|
inject: {
|
|
2189
2148
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
2190
2149
|
// translator when the component is used standalone (no provider).
|
|
@@ -2221,16 +2180,16 @@ const nn = /* @__PURE__ */ N(Jt, [["render", tn], ["__scopeId", "data-v-e49a9063
|
|
|
2221
2180
|
return s;
|
|
2222
2181
|
}
|
|
2223
2182
|
}
|
|
2224
|
-
},
|
|
2183
|
+
}, sn = { class: "wm-header" }, rn = ["aria-label"], an = {
|
|
2225
2184
|
key: 1,
|
|
2226
2185
|
style: { width: "30px", height: "30px", "flex-shrink": "0" }
|
|
2227
|
-
},
|
|
2186
|
+
}, on = { class: "wm-header__avatar" }, ln = { class: "wm-header__main" }, cn = { class: "wm-header__title" }, dn = {
|
|
2228
2187
|
key: 3,
|
|
2229
2188
|
class: "wm-header__fill"
|
|
2230
|
-
},
|
|
2231
|
-
function
|
|
2232
|
-
const a =
|
|
2233
|
-
return c(), d("div",
|
|
2189
|
+
}, un = { class: "wm-header__actions" }, mn = ["aria-label", "title"], hn = ["aria-label", "title"];
|
|
2190
|
+
function fn(e, t, s, r, i, n) {
|
|
2191
|
+
const a = P("AIAvatar"), o = P("TeamAvatars");
|
|
2192
|
+
return c(), d("div", sn, [
|
|
2234
2193
|
s.showBack ? (c(), d("button", {
|
|
2235
2194
|
key: 0,
|
|
2236
2195
|
type: "button",
|
|
@@ -2251,29 +2210,29 @@ function _n(e, t, s, r, i, n) {
|
|
|
2251
2210
|
}, [
|
|
2252
2211
|
l("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2253
2212
|
], -1)
|
|
2254
|
-
])], 8,
|
|
2255
|
-
s.showIdentity ? (c(), d(
|
|
2256
|
-
l("div",
|
|
2257
|
-
|
|
2213
|
+
])], 8, rn)) : (c(), d("div", an)),
|
|
2214
|
+
s.showIdentity ? (c(), d(B, { key: 2 }, [
|
|
2215
|
+
l("div", on, [
|
|
2216
|
+
W(a, {
|
|
2258
2217
|
size: 30,
|
|
2259
2218
|
name: s.agentName,
|
|
2260
2219
|
"image-url": s.agentAvatarUrl
|
|
2261
2220
|
}, null, 8, ["name", "image-url"])
|
|
2262
2221
|
]),
|
|
2263
|
-
l("div",
|
|
2264
|
-
l("div",
|
|
2222
|
+
l("div", ln, [
|
|
2223
|
+
l("div", cn, y(s.title), 1)
|
|
2265
2224
|
]),
|
|
2266
|
-
n.hasTeam ? (c(),
|
|
2225
|
+
n.hasTeam ? (c(), I(o, {
|
|
2267
2226
|
key: 0,
|
|
2268
2227
|
members: n.displayedTeamMembers,
|
|
2269
2228
|
"response-label": ""
|
|
2270
2229
|
}, null, 8, ["members"])) : k("", !0)
|
|
2271
|
-
], 64)) : (c(), d("div",
|
|
2272
|
-
l("div",
|
|
2230
|
+
], 64)) : (c(), d("div", dn)),
|
|
2231
|
+
l("div", un, [
|
|
2273
2232
|
s.showMore ? (c(), d("button", {
|
|
2274
2233
|
key: 0,
|
|
2275
2234
|
type: "button",
|
|
2276
|
-
class:
|
|
2235
|
+
class: L(["wm-header__icon", { "wm-header__icon--active": s.moreActive }]),
|
|
2277
2236
|
"aria-label": n.t("header.moreOptions"),
|
|
2278
2237
|
title: n.t("header.moreOptions"),
|
|
2279
2238
|
onClick: t[1] || (t[1] = (f) => e.$emit("more"))
|
|
@@ -2323,19 +2282,19 @@ function _n(e, t, s, r, i, n) {
|
|
|
2323
2282
|
}, [
|
|
2324
2283
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2325
2284
|
], -1)
|
|
2326
|
-
])], 8,
|
|
2285
|
+
])], 8, hn)) : k("", !0)
|
|
2327
2286
|
])
|
|
2328
2287
|
]);
|
|
2329
2288
|
}
|
|
2330
|
-
const
|
|
2289
|
+
const _n = /* @__PURE__ */ D(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Pe = {
|
|
2331
2290
|
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",
|
|
2332
2291
|
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",
|
|
2333
2292
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
2334
2293
|
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",
|
|
2335
2294
|
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"
|
|
2336
|
-
},
|
|
2295
|
+
}, gn = {
|
|
2337
2296
|
name: "WmOnboarding",
|
|
2338
|
-
components: { AIAvatar:
|
|
2297
|
+
components: { AIAvatar: he, HumanAvatar: ye },
|
|
2339
2298
|
inject: {
|
|
2340
2299
|
// Translator + resolved-language getter shared by the Messenger
|
|
2341
2300
|
// shell. The language getter feeds `formatTs` (relative date
|
|
@@ -2433,7 +2392,7 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
|
|
|
2433
2392
|
if (!e) return "";
|
|
2434
2393
|
const t = new Date(e);
|
|
2435
2394
|
if (Number.isNaN(t.getTime())) return "";
|
|
2436
|
-
const s =
|
|
2395
|
+
const s = re(this.wmLocale()), r = /* @__PURE__ */ new Date();
|
|
2437
2396
|
if (t.toDateString() === r.toDateString())
|
|
2438
2397
|
return t.toLocaleTimeString(s, {
|
|
2439
2398
|
hour: "2-digit",
|
|
@@ -2449,19 +2408,19 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
|
|
|
2449
2408
|
});
|
|
2450
2409
|
}
|
|
2451
2410
|
}
|
|
2452
|
-
},
|
|
2411
|
+
}, yn = { class: "wm-onb" }, vn = { class: "wm-onb__hero" }, pn = { class: "wm-onb__hero-text" }, wn = { class: "wm-onb__title" }, bn = { class: "wm-onb__sub" }, kn = {
|
|
2453
2412
|
key: 0,
|
|
2454
2413
|
class: "wm-onb__alertList"
|
|
2455
|
-
},
|
|
2414
|
+
}, Cn = ["onClick"], An = {
|
|
2456
2415
|
key: 0,
|
|
2457
2416
|
class: "wm-onb__defaultAvatar"
|
|
2458
|
-
},
|
|
2417
|
+
}, Sn = ["aria-label"], Mn = { class: "wm-onb__alert-body" }, Tn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
|
|
2459
2418
|
key: 0,
|
|
2460
2419
|
class: "wm-onb__alert-sender"
|
|
2461
|
-
},
|
|
2420
|
+
}, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, En = {
|
|
2462
2421
|
key: 0,
|
|
2463
2422
|
class: "wm-onb__alert-time"
|
|
2464
|
-
}, Bn = { class: "wm-onb__alert-resume" },
|
|
2423
|
+
}, Bn = { class: "wm-onb__alert-resume" }, In = { class: "wm-onb__actions" }, Pn = ["disabled"], Dn = { class: "wm-onb__btn-label" }, Un = ["onClick"], Nn = { class: "wm-onb__btn-icon" }, Fn = ["aria-label"], Hn = {
|
|
2465
2424
|
key: 1,
|
|
2466
2425
|
width: "18",
|
|
2467
2426
|
height: "18",
|
|
@@ -2472,7 +2431,7 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
|
|
|
2472
2431
|
"stroke-linecap": "round",
|
|
2473
2432
|
"stroke-linejoin": "round",
|
|
2474
2433
|
"aria-hidden": "true"
|
|
2475
|
-
},
|
|
2434
|
+
}, jn = ["d"], zn = { class: "wm-onb__btn-label" }, qn = {
|
|
2476
2435
|
key: 0,
|
|
2477
2436
|
class: "wm-onb__btn-trail",
|
|
2478
2437
|
width: "13",
|
|
@@ -2484,7 +2443,7 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
|
|
|
2484
2443
|
"stroke-linecap": "round",
|
|
2485
2444
|
"stroke-linejoin": "round",
|
|
2486
2445
|
"aria-hidden": "true"
|
|
2487
|
-
},
|
|
2446
|
+
}, Vn = { class: "wm-onb__btn-icon" }, Kn = {
|
|
2488
2447
|
width: "18",
|
|
2489
2448
|
height: "18",
|
|
2490
2449
|
viewBox: "0 0 24 24",
|
|
@@ -2494,11 +2453,11 @@ const gn = /* @__PURE__ */ N(sn, [["render", _n], ["__scopeId", "data-v-7af4c118
|
|
|
2494
2453
|
"stroke-linecap": "round",
|
|
2495
2454
|
"stroke-linejoin": "round",
|
|
2496
2455
|
"aria-hidden": "true"
|
|
2497
|
-
},
|
|
2498
|
-
function
|
|
2499
|
-
const a =
|
|
2500
|
-
return c(), d("div",
|
|
2501
|
-
l("div",
|
|
2456
|
+
}, Wn = ["d"], $n = { class: "wm-onb__btn-label" }, Gn = { class: "wm-onb__btn-count" };
|
|
2457
|
+
function Yn(e, t, s, r, i, n) {
|
|
2458
|
+
const a = P("AIAvatar");
|
|
2459
|
+
return c(), d("div", yn, [
|
|
2460
|
+
l("div", vn, [
|
|
2502
2461
|
t[2] || (t[2] = l("svg", {
|
|
2503
2462
|
class: "wm-onb__hero-deco",
|
|
2504
2463
|
width: "180",
|
|
@@ -2533,26 +2492,26 @@ function Jn(e, t, s, r, i, n) {
|
|
|
2533
2492
|
opacity: "0.65"
|
|
2534
2493
|
})
|
|
2535
2494
|
], -1)),
|
|
2536
|
-
|
|
2495
|
+
W(a, {
|
|
2537
2496
|
size: 52,
|
|
2538
2497
|
"image-url": s.defaultIconUrl
|
|
2539
2498
|
}, null, 8, ["image-url"]),
|
|
2540
|
-
l("div",
|
|
2541
|
-
l("div",
|
|
2542
|
-
l("div",
|
|
2499
|
+
l("div", pn, [
|
|
2500
|
+
l("div", wn, y(n.heroTitle), 1),
|
|
2501
|
+
l("div", bn, y(n.heroSub), 1)
|
|
2543
2502
|
])
|
|
2544
2503
|
]),
|
|
2545
|
-
n.unreadThreads.length ? (c(), d("div",
|
|
2546
|
-
(c(!0), d(
|
|
2504
|
+
n.unreadThreads.length ? (c(), d("div", kn, [
|
|
2505
|
+
(c(!0), d(B, null, N(n.unreadThreads, (o) => (c(), d("button", {
|
|
2547
2506
|
key: o.id,
|
|
2548
2507
|
type: "button",
|
|
2549
2508
|
class: "wm-onb__alert",
|
|
2550
2509
|
onClick: (f) => e.$emit("resume", o)
|
|
2551
2510
|
}, [
|
|
2552
2511
|
l("span", {
|
|
2553
|
-
class:
|
|
2512
|
+
class: L(["wm-onb__alert-avatar", n.avatarWrapperClass(o)])
|
|
2554
2513
|
}, [
|
|
2555
|
-
n.isDefaultAvatar(o) ? (c(), d("span",
|
|
2514
|
+
n.isDefaultAvatar(o) ? (c(), d("span", An, [...t[3] || (t[3] = [
|
|
2556
2515
|
l("svg", {
|
|
2557
2516
|
width: "20",
|
|
2558
2517
|
height: "20",
|
|
@@ -2566,31 +2525,31 @@ function Jn(e, t, s, r, i, n) {
|
|
|
2566
2525
|
}, [
|
|
2567
2526
|
l("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
2568
2527
|
], -1)
|
|
2569
|
-
])])) : (c(),
|
|
2528
|
+
])])) : (c(), I(Ae(n.avatarComponent(o)), He({
|
|
2570
2529
|
key: 1,
|
|
2571
2530
|
ref_for: !0
|
|
2572
2531
|
}, n.avatarProps(o)), null, 16)),
|
|
2573
2532
|
l("span", {
|
|
2574
2533
|
class: "wm-onb__alert-dot",
|
|
2575
2534
|
"aria-label": n.t("onboarding.unread")
|
|
2576
|
-
}, null, 8,
|
|
2535
|
+
}, null, 8, Sn)
|
|
2577
2536
|
], 2),
|
|
2578
2537
|
l("span", Mn, [
|
|
2579
|
-
l("span",
|
|
2580
|
-
l("span",
|
|
2581
|
-
n.senderLabel(o) ? (c(), d("span",
|
|
2538
|
+
l("span", Tn, y(o.title), 1),
|
|
2539
|
+
l("span", xn, [
|
|
2540
|
+
n.senderLabel(o) ? (c(), d("span", On, y(n.senderLabel(o)) + " · ", 1)) : k("", !0),
|
|
2582
2541
|
l("span", {
|
|
2583
2542
|
innerHTML: n.renderPreview(o.preview)
|
|
2584
|
-
}, null, 8,
|
|
2543
|
+
}, null, 8, Rn)
|
|
2585
2544
|
])
|
|
2586
2545
|
]),
|
|
2587
|
-
l("span",
|
|
2588
|
-
n.formatTs(o._ts) ? (c(), d("span", En,
|
|
2589
|
-
l("span", Bn,
|
|
2546
|
+
l("span", Ln, [
|
|
2547
|
+
n.formatTs(o._ts) ? (c(), d("span", En, y(n.formatTs(o._ts)), 1)) : k("", !0),
|
|
2548
|
+
l("span", Bn, y(n.t("onboarding.resume")), 1)
|
|
2590
2549
|
])
|
|
2591
|
-
], 8,
|
|
2550
|
+
], 8, Cn))), 128))
|
|
2592
2551
|
])) : k("", !0),
|
|
2593
|
-
l("div",
|
|
2552
|
+
l("div", In, [
|
|
2594
2553
|
l("button", {
|
|
2595
2554
|
type: "button",
|
|
2596
2555
|
class: "wm-onb__btn wm-onb__btn--start",
|
|
@@ -2612,29 +2571,29 @@ function Jn(e, t, s, r, i, n) {
|
|
|
2612
2571
|
l("path", { d: "M12 5v14M5 12h14" })
|
|
2613
2572
|
])
|
|
2614
2573
|
], -1)),
|
|
2615
|
-
l("span", Dn,
|
|
2616
|
-
], 8,
|
|
2617
|
-
(c(!0), d(
|
|
2574
|
+
l("span", Dn, y(s.busy ? "…" : n.t("onboarding.start")), 1)
|
|
2575
|
+
], 8, Pn),
|
|
2576
|
+
(c(!0), d(B, null, N(s.quickLinks, (o, f) => (c(), d("button", {
|
|
2618
2577
|
key: "ql-" + f,
|
|
2619
2578
|
type: "button",
|
|
2620
2579
|
class: "wm-onb__btn",
|
|
2621
2580
|
onClick: (b) => e.$emit("select", o)
|
|
2622
2581
|
}, [
|
|
2623
|
-
l("span",
|
|
2582
|
+
l("span", Nn, [
|
|
2624
2583
|
n.safeIconUrl(o) ? (c(), d("span", {
|
|
2625
2584
|
key: 0,
|
|
2626
2585
|
class: "wm-onb__btn-iconImg",
|
|
2627
|
-
style:
|
|
2586
|
+
style: j(n.iconUrlStyle(o)),
|
|
2628
2587
|
role: "img",
|
|
2629
2588
|
"aria-label": o.label || ""
|
|
2630
2589
|
}, null, 12, Fn)) : (c(), d("svg", Hn, [
|
|
2631
2590
|
l("path", {
|
|
2632
2591
|
d: n.iconPath(o.icon)
|
|
2633
|
-
}, null, 8,
|
|
2592
|
+
}, null, 8, jn)
|
|
2634
2593
|
]))
|
|
2635
2594
|
]),
|
|
2636
|
-
l("span",
|
|
2637
|
-
n.isExternalLink(o) ? (c(), d("svg",
|
|
2595
|
+
l("span", zn, y(o.label), 1),
|
|
2596
|
+
n.isExternalLink(o) ? (c(), d("svg", qn, [...t[5] || (t[5] = [
|
|
2638
2597
|
l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
|
|
2639
2598
|
])])) : k("", !0)
|
|
2640
2599
|
], 8, Un))), 128)),
|
|
@@ -2644,15 +2603,15 @@ function Jn(e, t, s, r, i, n) {
|
|
|
2644
2603
|
class: "wm-onb__btn",
|
|
2645
2604
|
onClick: t[1] || (t[1] = (o) => e.$emit("view-history"))
|
|
2646
2605
|
}, [
|
|
2647
|
-
l("span",
|
|
2648
|
-
(c(), d("svg",
|
|
2606
|
+
l("span", Vn, [
|
|
2607
|
+
(c(), d("svg", Kn, [
|
|
2649
2608
|
l("path", {
|
|
2650
2609
|
d: n.iconPath("chat")
|
|
2651
|
-
}, null, 8,
|
|
2610
|
+
}, null, 8, Wn)
|
|
2652
2611
|
]))
|
|
2653
2612
|
]),
|
|
2654
|
-
l("span",
|
|
2655
|
-
l("span",
|
|
2613
|
+
l("span", $n, y(n.t("onboarding.allConversations")), 1),
|
|
2614
|
+
l("span", Gn, y(s.openThreads.length), 1),
|
|
2656
2615
|
t[6] || (t[6] = l("svg", {
|
|
2657
2616
|
class: "wm-onb__btn-trail",
|
|
2658
2617
|
width: "13",
|
|
@@ -2671,9 +2630,9 @@ function Jn(e, t, s, r, i, n) {
|
|
|
2671
2630
|
])
|
|
2672
2631
|
]);
|
|
2673
2632
|
}
|
|
2674
|
-
const
|
|
2633
|
+
const Jn = /* @__PURE__ */ D(gn, [["render", Yn], ["__scopeId", "data-v-136c3afe"]]), Xn = {
|
|
2675
2634
|
name: "WmHistory",
|
|
2676
|
-
components: { AIAvatar:
|
|
2635
|
+
components: { AIAvatar: he, HumanAvatar: ye },
|
|
2677
2636
|
inject: {
|
|
2678
2637
|
t: { default: () => F() },
|
|
2679
2638
|
wmLocale: { default: () => () => "fr" }
|
|
@@ -2724,7 +2683,7 @@ const Xn = /* @__PURE__ */ N(pn, [["render", Jn], ["__scopeId", "data-v-136c3afe
|
|
|
2724
2683
|
if (!e) return "";
|
|
2725
2684
|
const t = new Date(e);
|
|
2726
2685
|
if (Number.isNaN(t.getTime())) return "";
|
|
2727
|
-
const s =
|
|
2686
|
+
const s = re(this.wmLocale()), r = /* @__PURE__ */ new Date();
|
|
2728
2687
|
if (t.toDateString() === r.toDateString())
|
|
2729
2688
|
return t.toLocaleTimeString(s, {
|
|
2730
2689
|
hour: "2-digit",
|
|
@@ -2740,19 +2699,19 @@ const Xn = /* @__PURE__ */ N(pn, [["render", Jn], ["__scopeId", "data-v-136c3afe
|
|
|
2740
2699
|
});
|
|
2741
2700
|
}
|
|
2742
2701
|
}
|
|
2743
|
-
},
|
|
2702
|
+
}, Qn = { class: "wm-hist" }, Zn = { class: "wm-hist__search" }, es = ["placeholder", "aria-label"], ts = { class: "wm-hist__list" }, ns = ["onClick"], ss = {
|
|
2744
2703
|
key: 0,
|
|
2745
2704
|
class: "wm-hist__defaultAvatar"
|
|
2746
|
-
},
|
|
2705
|
+
}, rs = ["aria-label"], is = { class: "wm-hist__thread-body" }, as = { class: "wm-hist__thread-title" }, os = ["innerHTML"], ls = { class: "wm-hist__thread-meta" }, cs = {
|
|
2747
2706
|
key: 0,
|
|
2748
2707
|
class: "wm-hist__thread-time"
|
|
2749
|
-
},
|
|
2708
|
+
}, ds = {
|
|
2750
2709
|
key: 0,
|
|
2751
2710
|
class: "wm-hist__empty"
|
|
2752
2711
|
};
|
|
2753
|
-
function
|
|
2754
|
-
return c(), d("div",
|
|
2755
|
-
l("div",
|
|
2712
|
+
function us(e, t, s, r, i, n) {
|
|
2713
|
+
return c(), d("div", Qn, [
|
|
2714
|
+
l("div", Zn, [
|
|
2756
2715
|
t[1] || (t[1] = l("span", { class: "wm-hist__searchIcon" }, [
|
|
2757
2716
|
l("svg", {
|
|
2758
2717
|
width: "13",
|
|
@@ -2768,26 +2727,26 @@ function hs(e, t, s, r, i, n) {
|
|
|
2768
2727
|
l("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
2769
2728
|
])
|
|
2770
2729
|
], -1)),
|
|
2771
|
-
|
|
2730
|
+
$(l("input", {
|
|
2772
2731
|
"onUpdate:modelValue": t[0] || (t[0] = (a) => i.query = a),
|
|
2773
2732
|
type: "text",
|
|
2774
2733
|
placeholder: n.t("onboarding.search"),
|
|
2775
2734
|
"aria-label": n.t("onboarding.search")
|
|
2776
|
-
}, null, 8,
|
|
2777
|
-
[
|
|
2735
|
+
}, null, 8, es), [
|
|
2736
|
+
[se, i.query]
|
|
2778
2737
|
])
|
|
2779
2738
|
]),
|
|
2780
|
-
l("div",
|
|
2781
|
-
(c(!0), d(
|
|
2739
|
+
l("div", ts, [
|
|
2740
|
+
(c(!0), d(B, null, N(n.filteredThreads, (a) => (c(), d("button", {
|
|
2782
2741
|
key: a.id,
|
|
2783
2742
|
type: "button",
|
|
2784
|
-
class:
|
|
2743
|
+
class: L(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
|
|
2785
2744
|
onClick: (o) => e.$emit("resume", a)
|
|
2786
2745
|
}, [
|
|
2787
2746
|
l("span", {
|
|
2788
|
-
class:
|
|
2747
|
+
class: L(["wm-hist__thread-avatar", n.avatarWrapperClass(a)])
|
|
2789
2748
|
}, [
|
|
2790
|
-
n.isDefaultAvatar(a) ? (c(), d("span",
|
|
2749
|
+
n.isDefaultAvatar(a) ? (c(), d("span", ss, [...t[2] || (t[2] = [
|
|
2791
2750
|
l("svg", {
|
|
2792
2751
|
width: "18",
|
|
2793
2752
|
height: "18",
|
|
@@ -2801,7 +2760,7 @@ function hs(e, t, s, r, i, n) {
|
|
|
2801
2760
|
}, [
|
|
2802
2761
|
l("path", { d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z" })
|
|
2803
2762
|
], -1)
|
|
2804
|
-
])])) : (c(),
|
|
2763
|
+
])])) : (c(), I(Ae(n.avatarComponent(a)), He({
|
|
2805
2764
|
key: 1,
|
|
2806
2765
|
ref_for: !0
|
|
2807
2766
|
}, n.avatarProps(a)), null, 16)),
|
|
@@ -2809,17 +2768,17 @@ function hs(e, t, s, r, i, n) {
|
|
|
2809
2768
|
key: 2,
|
|
2810
2769
|
class: "wm-hist__thread-dot",
|
|
2811
2770
|
"aria-label": n.t("onboarding.unread")
|
|
2812
|
-
}, null, 8,
|
|
2771
|
+
}, null, 8, rs)) : k("", !0)
|
|
2813
2772
|
], 2),
|
|
2814
|
-
l("span",
|
|
2815
|
-
l("span",
|
|
2773
|
+
l("span", is, [
|
|
2774
|
+
l("span", as, y(a.title), 1),
|
|
2816
2775
|
l("span", {
|
|
2817
2776
|
class: "wm-hist__thread-preview",
|
|
2818
2777
|
innerHTML: n.renderPreview(a.preview)
|
|
2819
|
-
}, null, 8,
|
|
2778
|
+
}, null, 8, os)
|
|
2820
2779
|
]),
|
|
2821
|
-
l("span",
|
|
2822
|
-
n.formatTs(a._ts) ? (c(), d("span",
|
|
2780
|
+
l("span", ls, [
|
|
2781
|
+
n.formatTs(a._ts) ? (c(), d("span", cs, y(n.formatTs(a._ts)), 1)) : k("", !0),
|
|
2823
2782
|
t[3] || (t[3] = l("svg", {
|
|
2824
2783
|
width: "14",
|
|
2825
2784
|
height: "14",
|
|
@@ -2835,16 +2794,16 @@ function hs(e, t, s, r, i, n) {
|
|
|
2835
2794
|
l("path", { d: "M5 12h14M13 5l7 7-7 7" })
|
|
2836
2795
|
], -1))
|
|
2837
2796
|
])
|
|
2838
|
-
], 10,
|
|
2839
|
-
n.filteredThreads.length ? k("", !0) : (c(), d("div",
|
|
2797
|
+
], 10, ns))), 128)),
|
|
2798
|
+
n.filteredThreads.length ? k("", !0) : (c(), d("div", ds, y(i.query ? n.t("onboarding.noResults", { query: i.query }) : n.t("onboarding.noConversations")), 1))
|
|
2840
2799
|
])
|
|
2841
2800
|
]);
|
|
2842
2801
|
}
|
|
2843
|
-
const ms = /* @__PURE__ */
|
|
2844
|
-
function
|
|
2802
|
+
const ms = /* @__PURE__ */ D(Xn, [["render", us], ["__scopeId", "data-v-6bf35ef1"]]);
|
|
2803
|
+
function hs(e) {
|
|
2845
2804
|
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();
|
|
2846
2805
|
}
|
|
2847
|
-
const
|
|
2806
|
+
const fs = {
|
|
2848
2807
|
name: "WmActionResult",
|
|
2849
2808
|
props: {
|
|
2850
2809
|
state: { type: String, default: "success" },
|
|
@@ -2854,13 +2813,13 @@ const _s = {
|
|
|
2854
2813
|
},
|
|
2855
2814
|
computed: {
|
|
2856
2815
|
detailText() {
|
|
2857
|
-
return
|
|
2816
|
+
return hs(this.detail);
|
|
2858
2817
|
}
|
|
2859
2818
|
}
|
|
2860
|
-
},
|
|
2819
|
+
}, _s = {
|
|
2861
2820
|
class: "wm-result__icon",
|
|
2862
2821
|
"aria-hidden": "true"
|
|
2863
|
-
},
|
|
2822
|
+
}, gs = {
|
|
2864
2823
|
key: 0,
|
|
2865
2824
|
width: "11",
|
|
2866
2825
|
height: "11",
|
|
@@ -2870,7 +2829,7 @@ const _s = {
|
|
|
2870
2829
|
"stroke-width": "2.8",
|
|
2871
2830
|
"stroke-linecap": "round",
|
|
2872
2831
|
"stroke-linejoin": "round"
|
|
2873
|
-
},
|
|
2832
|
+
}, ys = {
|
|
2874
2833
|
key: 1,
|
|
2875
2834
|
width: "11",
|
|
2876
2835
|
height: "11",
|
|
@@ -2880,7 +2839,7 @@ const _s = {
|
|
|
2880
2839
|
"stroke-width": "2.6",
|
|
2881
2840
|
"stroke-linecap": "round",
|
|
2882
2841
|
"stroke-linejoin": "round"
|
|
2883
|
-
},
|
|
2842
|
+
}, vs = {
|
|
2884
2843
|
key: 2,
|
|
2885
2844
|
width: "11",
|
|
2886
2845
|
height: "11",
|
|
@@ -2890,7 +2849,7 @@ const _s = {
|
|
|
2890
2849
|
"stroke-width": "2.4",
|
|
2891
2850
|
"stroke-linecap": "round",
|
|
2892
2851
|
"stroke-linejoin": "round"
|
|
2893
|
-
},
|
|
2852
|
+
}, ps = {
|
|
2894
2853
|
key: 3,
|
|
2895
2854
|
width: "12",
|
|
2896
2855
|
height: "12",
|
|
@@ -2900,24 +2859,24 @@ const _s = {
|
|
|
2900
2859
|
"stroke-width": "2.2",
|
|
2901
2860
|
"stroke-linecap": "round",
|
|
2902
2861
|
"stroke-linejoin": "round"
|
|
2903
|
-
},
|
|
2904
|
-
function
|
|
2862
|
+
}, ws = { class: "wm-result__body" }, bs = { class: "wm-result__label" }, ks = { class: "wm-result__detail" };
|
|
2863
|
+
function Cs(e, t, s, r, i, n) {
|
|
2905
2864
|
return c(), d("div", {
|
|
2906
|
-
class:
|
|
2865
|
+
class: L(["wm-result", `wm-result--${s.state}`])
|
|
2907
2866
|
}, [
|
|
2908
|
-
l("span",
|
|
2909
|
-
s.state === "success" ? (c(), d("svg",
|
|
2867
|
+
l("span", _s, [
|
|
2868
|
+
s.state === "success" ? (c(), d("svg", gs, [...t[0] || (t[0] = [
|
|
2910
2869
|
l("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2911
|
-
])])) : s.state === "rejected" ? (c(), d("svg",
|
|
2870
|
+
])])) : s.state === "rejected" ? (c(), d("svg", ys, [...t[1] || (t[1] = [
|
|
2912
2871
|
l("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2913
|
-
])])) : s.state === "awaiting" ? (c(), d("svg",
|
|
2872
|
+
])])) : s.state === "awaiting" ? (c(), d("svg", vs, [...t[2] || (t[2] = [
|
|
2914
2873
|
l("circle", {
|
|
2915
2874
|
cx: "12",
|
|
2916
2875
|
cy: "12",
|
|
2917
2876
|
r: "10"
|
|
2918
2877
|
}, null, -1),
|
|
2919
2878
|
l("polyline", { points: "12 7 12 12 15 14" }, null, -1)
|
|
2920
|
-
])])) : (c(), d("svg",
|
|
2879
|
+
])])) : (c(), d("svg", ps, [...t[3] || (t[3] = [
|
|
2921
2880
|
l("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" }, null, -1),
|
|
2922
2881
|
l("line", {
|
|
2923
2882
|
x1: "12",
|
|
@@ -2933,19 +2892,19 @@ function As(e, t, s, r, i, n) {
|
|
|
2933
2892
|
}, null, -1)
|
|
2934
2893
|
])]))
|
|
2935
2894
|
]),
|
|
2936
|
-
l("span",
|
|
2937
|
-
l("span",
|
|
2938
|
-
n.detailText ? (c(), d(
|
|
2895
|
+
l("span", ws, [
|
|
2896
|
+
l("span", bs, y(s.label), 1),
|
|
2897
|
+
n.detailText ? (c(), d(B, { key: 0 }, [
|
|
2939
2898
|
t[4] || (t[4] = l("span", {
|
|
2940
2899
|
class: "wm-result__sep",
|
|
2941
2900
|
"aria-hidden": "true"
|
|
2942
2901
|
}, " · ", -1)),
|
|
2943
|
-
l("span",
|
|
2902
|
+
l("span", ks, y(n.detailText), 1)
|
|
2944
2903
|
], 64)) : k("", !0)
|
|
2945
2904
|
])
|
|
2946
2905
|
], 2);
|
|
2947
2906
|
}
|
|
2948
|
-
const
|
|
2907
|
+
const As = /* @__PURE__ */ D(fs, [["render", Cs], ["__scopeId", "data-v-7284acd0"]]), Ss = {
|
|
2949
2908
|
name: "WmArtifactFormResponse",
|
|
2950
2909
|
inject: {
|
|
2951
2910
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -2961,12 +2920,12 @@ const Ss = /* @__PURE__ */ N(_s, [["render", As], ["__scopeId", "data-v-7284acd0
|
|
|
2961
2920
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
2962
2921
|
}
|
|
2963
2922
|
}
|
|
2964
|
-
}, Ms = { class: "wm-art wm-art--formResponse" },
|
|
2923
|
+
}, Ms = { class: "wm-art wm-art--formResponse" }, Ts = { class: "wm-art__head" }, xs = { class: "wm-art__title" }, Os = { class: "wm-art__badge wm-art__badge--success" }, Rs = { class: "wm-art__body" }, Ls = { class: "wm-art__fieldLabel" };
|
|
2965
2924
|
function Es(e, t, s, r, i, n) {
|
|
2966
2925
|
return c(), d("div", Ms, [
|
|
2967
|
-
l("div",
|
|
2968
|
-
l("div",
|
|
2969
|
-
l("span",
|
|
2926
|
+
l("div", Ts, [
|
|
2927
|
+
l("div", xs, y(s.data.title || n.t("form.title")), 1),
|
|
2928
|
+
l("span", Os, [
|
|
2970
2929
|
t[0] || (t[0] = l("svg", {
|
|
2971
2930
|
width: "11",
|
|
2972
2931
|
height: "11",
|
|
@@ -2980,26 +2939,26 @@ function Es(e, t, s, r, i, n) {
|
|
|
2980
2939
|
}, [
|
|
2981
2940
|
l("polyline", { points: "20 6 9 17 4 12" })
|
|
2982
2941
|
], -1)),
|
|
2983
|
-
Se(" " +
|
|
2942
|
+
Se(" " + y(n.t("form.sent")), 1)
|
|
2984
2943
|
])
|
|
2985
2944
|
]),
|
|
2986
|
-
l("div",
|
|
2987
|
-
(c(!0), d(
|
|
2945
|
+
l("div", Rs, [
|
|
2946
|
+
(c(!0), d(B, null, N(n.fields, (a, o) => (c(), d("div", {
|
|
2988
2947
|
key: o,
|
|
2989
2948
|
class: "wm-art__field"
|
|
2990
2949
|
}, [
|
|
2991
|
-
l("div",
|
|
2950
|
+
l("div", Ls, y(a.label), 1),
|
|
2992
2951
|
l("div", {
|
|
2993
|
-
class:
|
|
2952
|
+
class: L([
|
|
2994
2953
|
"wm-art__fieldValue",
|
|
2995
2954
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2996
2955
|
])
|
|
2997
|
-
},
|
|
2956
|
+
}, y(a.value), 3)
|
|
2998
2957
|
]))), 128))
|
|
2999
2958
|
])
|
|
3000
2959
|
]);
|
|
3001
2960
|
}
|
|
3002
|
-
const Bs = /* @__PURE__ */
|
|
2961
|
+
const Bs = /* @__PURE__ */ D(Ss, [["render", Es], ["__scopeId", "data-v-713aecf1"]]), Is = {
|
|
3003
2962
|
name: "WmArtifactInfoCard",
|
|
3004
2963
|
props: {
|
|
3005
2964
|
data: { type: Object, required: !0 }
|
|
@@ -3014,21 +2973,21 @@ const Bs = /* @__PURE__ */ N(Ts, [["render", Es], ["__scopeId", "data-v-713aecf1
|
|
|
3014
2973
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
3015
2974
|
}
|
|
3016
2975
|
}
|
|
3017
|
-
},
|
|
2976
|
+
}, Ps = { class: "wm-art wm-art--infoCard" }, Ds = {
|
|
3018
2977
|
key: 0,
|
|
3019
2978
|
class: "wm-art__image"
|
|
3020
|
-
}, Us = ["src", "alt"],
|
|
2979
|
+
}, Us = ["src", "alt"], Ns = { class: "wm-art__head" }, Fs = { class: "wm-art__headMain" }, Hs = { class: "wm-art__title" }, js = {
|
|
3021
2980
|
key: 0,
|
|
3022
2981
|
class: "wm-art__subtitle"
|
|
3023
|
-
},
|
|
2982
|
+
}, zs = {
|
|
3024
2983
|
key: 1,
|
|
3025
2984
|
class: "wm-art__body"
|
|
3026
|
-
},
|
|
2985
|
+
}, qs = {
|
|
3027
2986
|
key: 0,
|
|
3028
2987
|
class: "wm-art__text"
|
|
3029
|
-
},
|
|
3030
|
-
function
|
|
3031
|
-
return c(), d("div",
|
|
2988
|
+
}, Vs = { class: "wm-art__fieldLabel" };
|
|
2989
|
+
function Ks(e, t, s, r, i, n) {
|
|
2990
|
+
return c(), d("div", Ps, [
|
|
3032
2991
|
s.data.image_url ? (c(), d("figure", Ds, [
|
|
3033
2992
|
l("img", {
|
|
3034
2993
|
src: s.data.image_url,
|
|
@@ -3036,38 +2995,38 @@ function Ws(e, t, s, r, i, n) {
|
|
|
3036
2995
|
loading: "lazy"
|
|
3037
2996
|
}, null, 8, Us)
|
|
3038
2997
|
])) : k("", !0),
|
|
3039
|
-
l("div",
|
|
2998
|
+
l("div", Ns, [
|
|
3040
2999
|
l("div", Fs, [
|
|
3041
|
-
l("div", Hs,
|
|
3042
|
-
s.data.subtitle ? (c(), d("div",
|
|
3000
|
+
l("div", Hs, y(s.data.title), 1),
|
|
3001
|
+
s.data.subtitle ? (c(), d("div", js, y(s.data.subtitle), 1)) : k("", !0)
|
|
3043
3002
|
]),
|
|
3044
3003
|
s.data.badge && s.data.badge.label ? (c(), d("span", {
|
|
3045
3004
|
key: 0,
|
|
3046
|
-
class:
|
|
3005
|
+
class: L([
|
|
3047
3006
|
"wm-art__badge",
|
|
3048
3007
|
`wm-art__badge--${s.data.badge.tone || "neutral"}`
|
|
3049
3008
|
])
|
|
3050
|
-
},
|
|
3009
|
+
}, y(s.data.badge.label), 3)) : k("", !0)
|
|
3051
3010
|
]),
|
|
3052
|
-
n.hasBody ? (c(), d("div",
|
|
3053
|
-
s.data.body ? (c(), d("div",
|
|
3054
|
-
n.fields.length ? (c(!0), d(
|
|
3011
|
+
n.hasBody ? (c(), d("div", zs, [
|
|
3012
|
+
s.data.body ? (c(), d("div", qs, y(s.data.body), 1)) : k("", !0),
|
|
3013
|
+
n.fields.length ? (c(!0), d(B, { key: 1 }, N(n.fields, (a, o) => (c(), d("div", {
|
|
3055
3014
|
key: o,
|
|
3056
3015
|
class: "wm-art__field"
|
|
3057
3016
|
}, [
|
|
3058
|
-
l("div",
|
|
3017
|
+
l("div", Vs, y(a.label), 1),
|
|
3059
3018
|
l("div", {
|
|
3060
|
-
class:
|
|
3019
|
+
class: L([
|
|
3061
3020
|
"wm-art__fieldValue",
|
|
3062
3021
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3063
3022
|
])
|
|
3064
|
-
},
|
|
3023
|
+
}, y(a.value), 3)
|
|
3065
3024
|
]))), 128)) : k("", !0)
|
|
3066
3025
|
])) : k("", !0)
|
|
3067
3026
|
]);
|
|
3068
3027
|
}
|
|
3069
|
-
const
|
|
3070
|
-
function
|
|
3028
|
+
const Ws = /* @__PURE__ */ D(Is, [["render", Ks], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
3029
|
+
function $s(e, t, s) {
|
|
3071
3030
|
if (!e) return "";
|
|
3072
3031
|
const r = new Date(e);
|
|
3073
3032
|
if (Number.isNaN(r.getTime())) return e;
|
|
@@ -3081,7 +3040,7 @@ function Gs(e, t, s) {
|
|
|
3081
3040
|
});
|
|
3082
3041
|
return `${i}${s}${n}`;
|
|
3083
3042
|
}
|
|
3084
|
-
const
|
|
3043
|
+
const Gs = {
|
|
3085
3044
|
name: "WmArtifactTicket",
|
|
3086
3045
|
inject: {
|
|
3087
3046
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -3099,9 +3058,9 @@ const Ys = {
|
|
|
3099
3058
|
},
|
|
3100
3059
|
formattedDate() {
|
|
3101
3060
|
var e;
|
|
3102
|
-
return
|
|
3061
|
+
return $s(
|
|
3103
3062
|
(e = this.data) == null ? void 0 : e.created_at,
|
|
3104
|
-
|
|
3063
|
+
re(this.wmLocale()),
|
|
3105
3064
|
this.t("ticket.dateAt")
|
|
3106
3065
|
);
|
|
3107
3066
|
}
|
|
@@ -3127,13 +3086,13 @@ const Ys = {
|
|
|
3127
3086
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(t) ? 3 : /low|basse|faible|minor/.test(t) ? 1 : 2;
|
|
3128
3087
|
}
|
|
3129
3088
|
}
|
|
3130
|
-
},
|
|
3089
|
+
}, Ys = { class: "wm-art wm-art--ticket" }, Js = { class: "wm-art__head wm-tk__head" }, Xs = { class: "wm-art__title wm-tk__title" }, Qs = { class: "wm-tk__sub" }, Zs = { class: "wm-tk__ref" }, er = {
|
|
3131
3090
|
key: 0,
|
|
3132
3091
|
class: "wm-tk__text"
|
|
3133
|
-
},
|
|
3092
|
+
}, tr = {
|
|
3134
3093
|
key: 0,
|
|
3135
3094
|
class: "wm-art__body"
|
|
3136
|
-
},
|
|
3095
|
+
}, nr = { class: "wm-art__fieldLabel" }, sr = ["data-level"], rr = {
|
|
3137
3096
|
key: 1,
|
|
3138
3097
|
class: "wm-tk__date",
|
|
3139
3098
|
width: "12",
|
|
@@ -3145,16 +3104,16 @@ const Ys = {
|
|
|
3145
3104
|
"stroke-linecap": "round",
|
|
3146
3105
|
"stroke-linejoin": "round",
|
|
3147
3106
|
"aria-hidden": "true"
|
|
3148
|
-
},
|
|
3107
|
+
}, ir = {
|
|
3149
3108
|
key: 1,
|
|
3150
3109
|
class: "wm-art__footer wm-tk__footer"
|
|
3151
3110
|
};
|
|
3152
|
-
function
|
|
3153
|
-
return c(), d("div",
|
|
3154
|
-
l("div",
|
|
3155
|
-
l("div",
|
|
3156
|
-
l("div",
|
|
3157
|
-
l("div",
|
|
3111
|
+
function ar(e, t, s, r, i, n) {
|
|
3112
|
+
return c(), d("div", Ys, [
|
|
3113
|
+
l("div", Js, [
|
|
3114
|
+
l("div", Xs, y(s.data.title), 1),
|
|
3115
|
+
l("div", Qs, [
|
|
3116
|
+
l("div", Zs, [
|
|
3158
3117
|
t[0] || (t[0] = l("svg", {
|
|
3159
3118
|
width: "11",
|
|
3160
3119
|
height: "11",
|
|
@@ -3169,10 +3128,10 @@ function or(e, t, s, r, i, n) {
|
|
|
3169
3128
|
l("path", { d: "M20 12a2 2 0 0 1 2-2V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v4a2 2 0 0 1 0 4v4a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-4a2 2 0 0 1-2-2z" }),
|
|
3170
3129
|
l("path", { d: "M13 5v2M13 17v2M13 11v2" })
|
|
3171
3130
|
], -1)),
|
|
3172
|
-
l("span", null,
|
|
3131
|
+
l("span", null, y(s.data.reference), 1)
|
|
3173
3132
|
]),
|
|
3174
3133
|
l("span", {
|
|
3175
|
-
class:
|
|
3134
|
+
class: L([
|
|
3176
3135
|
"wm-art__badge",
|
|
3177
3136
|
"wm-tk__badge",
|
|
3178
3137
|
`wm-art__badge--${s.data.status.tone || "neutral"}`
|
|
@@ -3182,19 +3141,19 @@ function or(e, t, s, r, i, n) {
|
|
|
3182
3141
|
class: "wm-tk__dot",
|
|
3183
3142
|
"aria-hidden": "true"
|
|
3184
3143
|
}, null, -1)),
|
|
3185
|
-
Se(" " +
|
|
3144
|
+
Se(" " + y(s.data.status.label), 1)
|
|
3186
3145
|
], 2)
|
|
3187
3146
|
]),
|
|
3188
|
-
s.data.body ? (c(), d("div",
|
|
3147
|
+
s.data.body ? (c(), d("div", er, y(s.data.body), 1)) : k("", !0)
|
|
3189
3148
|
]),
|
|
3190
|
-
n.fields.length ? (c(), d("div",
|
|
3191
|
-
(c(!0), d(
|
|
3149
|
+
n.fields.length ? (c(), d("div", tr, [
|
|
3150
|
+
(c(!0), d(B, null, N(n.fields, (a, o) => (c(), d("div", {
|
|
3192
3151
|
key: o,
|
|
3193
3152
|
class: "wm-art__field"
|
|
3194
3153
|
}, [
|
|
3195
|
-
l("div",
|
|
3154
|
+
l("div", nr, y(a.label), 1),
|
|
3196
3155
|
l("div", {
|
|
3197
|
-
class:
|
|
3156
|
+
class: L([
|
|
3198
3157
|
"wm-art__fieldValue",
|
|
3199
3158
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
3200
3159
|
])
|
|
@@ -3229,7 +3188,7 @@ function or(e, t, s, r, i, n) {
|
|
|
3229
3188
|
height: "9",
|
|
3230
3189
|
rx: "0.5"
|
|
3231
3190
|
}, null, -1)
|
|
3232
|
-
])], 8,
|
|
3191
|
+
])], 8, sr)) : n.isDate(a.label) ? (c(), d("svg", rr, [...t[3] || (t[3] = [
|
|
3233
3192
|
l("rect", {
|
|
3234
3193
|
x: "3",
|
|
3235
3194
|
y: "4",
|
|
@@ -3239,11 +3198,11 @@ function or(e, t, s, r, i, n) {
|
|
|
3239
3198
|
}, null, -1),
|
|
3240
3199
|
l("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
3241
3200
|
])])) : k("", !0),
|
|
3242
|
-
l("span", null,
|
|
3201
|
+
l("span", null, y(a.value), 1)
|
|
3243
3202
|
], 2)
|
|
3244
3203
|
]))), 128))
|
|
3245
3204
|
])) : k("", !0),
|
|
3246
|
-
s.data.created_at ? (c(), d("div",
|
|
3205
|
+
s.data.created_at ? (c(), d("div", ir, [
|
|
3247
3206
|
t[4] || (t[4] = l("svg", {
|
|
3248
3207
|
width: "11",
|
|
3249
3208
|
height: "11",
|
|
@@ -3264,15 +3223,15 @@ function or(e, t, s, r, i, n) {
|
|
|
3264
3223
|
}),
|
|
3265
3224
|
l("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
3266
3225
|
], -1)),
|
|
3267
|
-
l("span", null,
|
|
3226
|
+
l("span", null, y(n.formattedDate), 1)
|
|
3268
3227
|
])) : k("", !0)
|
|
3269
3228
|
]);
|
|
3270
3229
|
}
|
|
3271
|
-
const
|
|
3230
|
+
const or = /* @__PURE__ */ D(Gs, [["render", ar], ["__scopeId", "data-v-5f30c914"]]), lr = {
|
|
3272
3231
|
form_response: Bs,
|
|
3273
|
-
info_card:
|
|
3274
|
-
ticket:
|
|
3275
|
-
},
|
|
3232
|
+
info_card: Ws,
|
|
3233
|
+
ticket: or
|
|
3234
|
+
}, cr = {
|
|
3276
3235
|
name: "WmArtifactRenderer",
|
|
3277
3236
|
props: {
|
|
3278
3237
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -3283,17 +3242,17 @@ const lr = /* @__PURE__ */ N(Ys, [["render", or], ["__scopeId", "data-v-5f30c914
|
|
|
3283
3242
|
component() {
|
|
3284
3243
|
var t;
|
|
3285
3244
|
const e = (t = this.artifact) == null ? void 0 : t.kind;
|
|
3286
|
-
return e &&
|
|
3245
|
+
return e && lr[e] || null;
|
|
3287
3246
|
}
|
|
3288
3247
|
}
|
|
3289
3248
|
};
|
|
3290
|
-
function
|
|
3291
|
-
return n.component ? (c(),
|
|
3249
|
+
function dr(e, t, s, r, i, n) {
|
|
3250
|
+
return n.component ? (c(), I(Ae(n.component), {
|
|
3292
3251
|
key: 0,
|
|
3293
3252
|
data: s.artifact.data
|
|
3294
3253
|
}, null, 8, ["data"])) : k("", !0);
|
|
3295
3254
|
}
|
|
3296
|
-
const
|
|
3255
|
+
const ur = /* @__PURE__ */ D(cr, [["render", dr]]), mr = {
|
|
3297
3256
|
name: "WmAttachmentPreview",
|
|
3298
3257
|
inject: {
|
|
3299
3258
|
signAttachmentFn: { default: null },
|
|
@@ -3361,17 +3320,17 @@ const hr = /* @__PURE__ */ N(dr, [["render", ur]]), mr = {
|
|
|
3361
3320
|
this.safeHref === "#" && e.preventDefault();
|
|
3362
3321
|
}
|
|
3363
3322
|
}
|
|
3364
|
-
},
|
|
3323
|
+
}, hr = ["href"], fr = ["src", "alt"], _r = ["src"], gr = ["src"], yr = ["href", "download"], vr = { class: "wm-att__main" }, pr = { class: "wm-att__name" }, wr = {
|
|
3365
3324
|
key: 0,
|
|
3366
3325
|
class: "wm-att__meta"
|
|
3367
|
-
},
|
|
3326
|
+
}, br = {
|
|
3368
3327
|
key: 0,
|
|
3369
3328
|
class: "wm-att__spin",
|
|
3370
3329
|
"aria-hidden": "true"
|
|
3371
3330
|
};
|
|
3372
|
-
function
|
|
3331
|
+
function kr(e, t, s, r, i, n) {
|
|
3373
3332
|
return c(), d("div", {
|
|
3374
|
-
class:
|
|
3333
|
+
class: L(["wm-att", ["wm-att--" + (n.kind || "file")]])
|
|
3375
3334
|
}, [
|
|
3376
3335
|
n.kind === "image" && i.url ? (c(), d("a", {
|
|
3377
3336
|
key: 0,
|
|
@@ -3384,19 +3343,19 @@ function Cr(e, t, s, r, i, n) {
|
|
|
3384
3343
|
src: i.url,
|
|
3385
3344
|
alt: n.displayName,
|
|
3386
3345
|
loading: "lazy"
|
|
3387
|
-
}, null, 8,
|
|
3388
|
-
], 8,
|
|
3346
|
+
}, null, 8, fr)
|
|
3347
|
+
], 8, hr)) : n.kind === "audio" && i.url ? (c(), d("audio", {
|
|
3389
3348
|
key: 1,
|
|
3390
3349
|
src: i.url,
|
|
3391
3350
|
controls: "",
|
|
3392
3351
|
preload: "metadata"
|
|
3393
|
-
}, null, 8,
|
|
3352
|
+
}, null, 8, _r)) : n.kind === "video" && i.url ? (c(), d("video", {
|
|
3394
3353
|
key: 2,
|
|
3395
3354
|
src: i.url,
|
|
3396
3355
|
controls: "",
|
|
3397
3356
|
playsinline: "",
|
|
3398
3357
|
preload: "auto"
|
|
3399
|
-
}, null, 8,
|
|
3358
|
+
}, null, 8, gr)) : (c(), d("a", {
|
|
3400
3359
|
key: 3,
|
|
3401
3360
|
class: "wm-att__file",
|
|
3402
3361
|
href: n.safeHref,
|
|
@@ -3421,15 +3380,15 @@ function Cr(e, t, s, r, i, n) {
|
|
|
3421
3380
|
l("path", { d: "M14 2v6h6" })
|
|
3422
3381
|
])
|
|
3423
3382
|
], -1)),
|
|
3424
|
-
l("span",
|
|
3425
|
-
l("span",
|
|
3426
|
-
n.sizeLabel ? (c(), d("span",
|
|
3383
|
+
l("span", vr, [
|
|
3384
|
+
l("span", pr, y(n.displayName), 1),
|
|
3385
|
+
n.sizeLabel ? (c(), d("span", wr, y(n.sizeLabel), 1)) : k("", !0)
|
|
3427
3386
|
]),
|
|
3428
|
-
i.loading ? (c(), d("span",
|
|
3429
|
-
], 8,
|
|
3387
|
+
i.loading ? (c(), d("span", br)) : k("", !0)
|
|
3388
|
+
], 8, yr))
|
|
3430
3389
|
], 2);
|
|
3431
3390
|
}
|
|
3432
|
-
const
|
|
3391
|
+
const Cr = /* @__PURE__ */ D(mr, [["render", kr], ["__scopeId", "data-v-b207a8bd"]]), Ar = {
|
|
3433
3392
|
name: "WmBubble",
|
|
3434
3393
|
props: {
|
|
3435
3394
|
role: { type: String, default: "ai" },
|
|
@@ -3441,26 +3400,26 @@ const Ar = /* @__PURE__ */ N(mr, [["render", Cr], ["__scopeId", "data-v-b207a8bd
|
|
|
3441
3400
|
return _t(this.text);
|
|
3442
3401
|
}
|
|
3443
3402
|
}
|
|
3444
|
-
},
|
|
3403
|
+
}, Sr = ["innerHTML"];
|
|
3445
3404
|
function Mr(e, t, s, r, i, n) {
|
|
3446
3405
|
return c(), d("div", {
|
|
3447
|
-
class:
|
|
3406
|
+
class: L(["wm-bubble", "wm-bubble--" + s.role])
|
|
3448
3407
|
}, [
|
|
3449
3408
|
We(e.$slots, "default", {}, () => [
|
|
3450
|
-
l("span", { innerHTML: n.rendered }, null, 8,
|
|
3409
|
+
l("span", { innerHTML: n.rendered }, null, 8, Sr)
|
|
3451
3410
|
], !0)
|
|
3452
3411
|
], 2);
|
|
3453
3412
|
}
|
|
3454
|
-
const
|
|
3455
|
-
function
|
|
3456
|
-
return c(), d("div",
|
|
3413
|
+
const Tr = /* @__PURE__ */ D(Ar, [["render", Mr], ["__scopeId", "data-v-7ab13147"]]), xr = { name: "WmTyping" }, Or = { class: "wm-typing" };
|
|
3414
|
+
function Rr(e, t, s, r, i, n) {
|
|
3415
|
+
return c(), d("div", Or, [...t[0] || (t[0] = [
|
|
3457
3416
|
l("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3458
3417
|
l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3459
3418
|
l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3460
3419
|
])]);
|
|
3461
3420
|
}
|
|
3462
|
-
const
|
|
3463
|
-
function
|
|
3421
|
+
const Lr = /* @__PURE__ */ D(xr, [["render", Rr], ["__scopeId", "data-v-df2447fd"]]);
|
|
3422
|
+
function ne(e) {
|
|
3464
3423
|
return e ? e.client_msg_id || e.id : "";
|
|
3465
3424
|
}
|
|
3466
3425
|
const Er = {
|
|
@@ -3471,16 +3430,16 @@ const Er = {
|
|
|
3471
3430
|
closed: "system.closed",
|
|
3472
3431
|
reopened: "system.reopened",
|
|
3473
3432
|
idle: "system.idle"
|
|
3474
|
-
}, Br = 80,
|
|
3433
|
+
}, Br = 80, Ir = 200, Pr = {
|
|
3475
3434
|
name: "WmMessageList",
|
|
3476
3435
|
components: {
|
|
3477
|
-
AIAvatar:
|
|
3478
|
-
HumanAvatar:
|
|
3479
|
-
Bubble:
|
|
3480
|
-
Typing:
|
|
3481
|
-
ActionResult:
|
|
3482
|
-
AttachmentPreview:
|
|
3483
|
-
ArtifactRenderer:
|
|
3436
|
+
AIAvatar: he,
|
|
3437
|
+
HumanAvatar: ye,
|
|
3438
|
+
Bubble: Tr,
|
|
3439
|
+
Typing: Lr,
|
|
3440
|
+
ActionResult: As,
|
|
3441
|
+
AttachmentPreview: Cr,
|
|
3442
|
+
ArtifactRenderer: ur
|
|
3484
3443
|
},
|
|
3485
3444
|
inject: {
|
|
3486
3445
|
// Translator + resolved-language getter shared by the Messenger
|
|
@@ -3556,9 +3515,9 @@ const Er = {
|
|
|
3556
3515
|
const f = this.roleOf(o);
|
|
3557
3516
|
if (f === "system") {
|
|
3558
3517
|
if (((r = o == null ? void 0 : o.payload) == null ? void 0 : r.event) === "action_admin_pending") {
|
|
3559
|
-
const
|
|
3560
|
-
|
|
3561
|
-
key: `g-${
|
|
3518
|
+
const M = e[e.length - 1];
|
|
3519
|
+
M && M.role === "ai" ? M.messages.push(o) : e.push({
|
|
3520
|
+
key: `g-${ne(o)}`,
|
|
3562
3521
|
role: "ai",
|
|
3563
3522
|
agentName: "",
|
|
3564
3523
|
agentAvatarUrl: null,
|
|
@@ -3568,7 +3527,7 @@ const Er = {
|
|
|
3568
3527
|
continue;
|
|
3569
3528
|
}
|
|
3570
3529
|
e.push({
|
|
3571
|
-
key: `sys-${
|
|
3530
|
+
key: `sys-${ne(o)}`,
|
|
3572
3531
|
role: f,
|
|
3573
3532
|
messages: [o],
|
|
3574
3533
|
items: [],
|
|
@@ -3578,7 +3537,7 @@ const Er = {
|
|
|
3578
3537
|
}
|
|
3579
3538
|
const b = e[e.length - 1];
|
|
3580
3539
|
b && b.role === f && (f === "ai" || b.agentName === (((i = o == null ? void 0 : o.author) == null ? void 0 : i.name) || "")) ? b.messages.push(o) : e.push({
|
|
3581
|
-
key: `g-${
|
|
3540
|
+
key: `g-${ne(o)}`,
|
|
3582
3541
|
role: f,
|
|
3583
3542
|
agentName: ((n = o == null ? void 0 : o.author) == null ? void 0 : n.name) || "",
|
|
3584
3543
|
agentAvatarUrl: ((a = o == null ? void 0 : o.author) == null ? void 0 : a.avatar_url) || null,
|
|
@@ -3590,7 +3549,7 @@ const Er = {
|
|
|
3590
3549
|
if (o.role === "system") continue;
|
|
3591
3550
|
const f = [];
|
|
3592
3551
|
for (const b of o.messages)
|
|
3593
|
-
for (const
|
|
3552
|
+
for (const v of this.itemsOf(b)) f.push(v);
|
|
3594
3553
|
o.items = f;
|
|
3595
3554
|
}
|
|
3596
3555
|
const t = [];
|
|
@@ -3617,7 +3576,7 @@ const Er = {
|
|
|
3617
3576
|
if (s.role === "user" || s.role === "system" || !s.items.length) continue;
|
|
3618
3577
|
const r = s.messages[0];
|
|
3619
3578
|
if (!r) continue;
|
|
3620
|
-
const i =
|
|
3579
|
+
const i = G(r.id);
|
|
3621
3580
|
if (i != null && !(i <= e) && !(t && r.created_at && r.created_at > t))
|
|
3622
3581
|
return s.key;
|
|
3623
3582
|
}
|
|
@@ -3645,7 +3604,7 @@ const Er = {
|
|
|
3645
3604
|
this.scheduleMeasure();
|
|
3646
3605
|
},
|
|
3647
3606
|
methods: {
|
|
3648
|
-
messageKey:
|
|
3607
|
+
messageKey: ne,
|
|
3649
3608
|
// Resolve a stable Vue :key for a non-system group by checking if
|
|
3650
3609
|
// any of its messages were previously part of a group we'd already
|
|
3651
3610
|
// assigned an id to; if so, reuse that id, otherwise mint a new
|
|
@@ -3657,7 +3616,7 @@ const Er = {
|
|
|
3657
3616
|
const t = this._groupIdByMsgKey;
|
|
3658
3617
|
let s = null;
|
|
3659
3618
|
for (const r of e) {
|
|
3660
|
-
const i =
|
|
3619
|
+
const i = ne(r);
|
|
3661
3620
|
if (i && t.has(i)) {
|
|
3662
3621
|
s = t.get(i);
|
|
3663
3622
|
break;
|
|
@@ -3665,7 +3624,7 @@ const Er = {
|
|
|
3665
3624
|
}
|
|
3666
3625
|
s == null && (s = ++this._groupIdCounter);
|
|
3667
3626
|
for (const r of e) {
|
|
3668
|
-
const i =
|
|
3627
|
+
const i = ne(r);
|
|
3669
3628
|
i && t.set(i, s);
|
|
3670
3629
|
}
|
|
3671
3630
|
return `g-${s}`;
|
|
@@ -3675,7 +3634,7 @@ const Er = {
|
|
|
3675
3634
|
},
|
|
3676
3635
|
onScroll() {
|
|
3677
3636
|
const e = this.$refs.scrollEl;
|
|
3678
|
-
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <=
|
|
3637
|
+
e && (this.showScrollDown = !this.isAtBottom(e), !(this.loadingMore || !this.hasMore) && (this._pendingLoadMore || e.scrollTop <= Ir && (this._pendingLoadMore = !0, this.$emit("load-more"))));
|
|
3679
3638
|
},
|
|
3680
3639
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
3681
3640
|
//
|
|
@@ -3875,10 +3834,10 @@ const Er = {
|
|
|
3875
3834
|
// adjacent à une `bubble`) : mon coin déborde le voisin et
|
|
3876
3835
|
// doit garder son arrondi.
|
|
3877
3836
|
cornersFor(e, t) {
|
|
3878
|
-
var
|
|
3879
|
-
const s = e.items, r = (
|
|
3880
|
-
let
|
|
3881
|
-
return a ? (b && (
|
|
3837
|
+
var ie, ae, X;
|
|
3838
|
+
const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, b = i == null ? void 0 : i.bottom, v = n == null ? void 0 : n.top, M = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, T = (Q, oe, Z) => Q != null && M != null ? Q + z >= M : oe === Z || oe === "card" && Z === "bubble";
|
|
3839
|
+
let U = o, x = o, q = o, J = o;
|
|
3840
|
+
return a ? (b && (x = f), (v || !n) && (q = f), b && T(E, b, r == null ? void 0 : r.top) && (U = f), v && T(S, v, r == null ? void 0 : r.bottom) && (J = f)) : (b && (U = f), (v || !n) && (J = f), b && T(E, b, r == null ? void 0 : r.top) && (x = f), v && T(S, v, r == null ? void 0 : r.bottom) && (q = f)), { tl: U, tr: x, br: q, bl: J };
|
|
3882
3841
|
},
|
|
3883
3842
|
// Inline column-count for the mosaic grid, capped at 4. Single
|
|
3884
3843
|
// attachment falls back to the vertical-list layout (null). Two
|
|
@@ -3901,8 +3860,8 @@ const Er = {
|
|
|
3901
3860
|
// corners of every top-row cell flatten too.
|
|
3902
3861
|
mosaicCornerStyle(e, t, s) {
|
|
3903
3862
|
if (!t || t < 2) return null;
|
|
3904
|
-
const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t,
|
|
3905
|
-
return (a || f) && (
|
|
3863
|
+
const r = Math.min(t, 4), i = Math.floor(e / r), n = e % r, a = n > 0, o = n < r - 1 && e + 1 < t, f = i > 0, b = e + r < t, v = "4px", M = {};
|
|
3864
|
+
return (a || f) && (M["--wm-r-tl"] = v), (o || f) && (M["--wm-r-tr"] = v), (a || b) && (M["--wm-r-bl"] = v), (o || b) && (M["--wm-r-br"] = v), s && (M["--wm-r-tl"] = v, M["--wm-r-tr"] = v), Object.keys(M).length ? M : null;
|
|
3906
3865
|
},
|
|
3907
3866
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3908
3867
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3923,7 +3882,7 @@ const Er = {
|
|
|
3923
3882
|
rowKeyOf(e, t) {
|
|
3924
3883
|
var r;
|
|
3925
3884
|
const s = (r = e == null ? void 0 : e.items) == null ? void 0 : r[t];
|
|
3926
|
-
return s ? `${
|
|
3885
|
+
return s ? `${ne(s.message)}-${s.partKey}` : "";
|
|
3927
3886
|
},
|
|
3928
3887
|
// rAF-debouncé : `updated()` peut être appelé en rafale (stream,
|
|
3929
3888
|
// typing, scroll), un seul flush layout par frame suffit.
|
|
@@ -3980,7 +3939,7 @@ const Er = {
|
|
|
3980
3939
|
try {
|
|
3981
3940
|
return Ce(
|
|
3982
3941
|
new Date(e.created_at),
|
|
3983
|
-
|
|
3942
|
+
re(this.wmLocale())
|
|
3984
3943
|
);
|
|
3985
3944
|
} catch {
|
|
3986
3945
|
return "";
|
|
@@ -3992,7 +3951,7 @@ const Er = {
|
|
|
3992
3951
|
try {
|
|
3993
3952
|
return Ce(
|
|
3994
3953
|
new Date(s.created_at),
|
|
3995
|
-
|
|
3954
|
+
re(this.wmLocale())
|
|
3996
3955
|
);
|
|
3997
3956
|
} catch {
|
|
3998
3957
|
return "";
|
|
@@ -4033,8 +3992,8 @@ const Er = {
|
|
|
4033
3992
|
return ((s = t.success) == null ? void 0 : s.summary) || ((i = (r = t.success) == null ? void 0 : r.metadata) == null ? void 0 : i.description) || "";
|
|
4034
3993
|
if (t.state === "rejected") {
|
|
4035
3994
|
if ((n = t.rejected) != null && n.reason) return t.rejected.reason;
|
|
4036
|
-
const
|
|
4037
|
-
return this.t(
|
|
3995
|
+
const v = (o = (a = t.rejected) == null ? void 0 : a.metadata) == null ? void 0 : o.resolution, M = typeof v == "string" && v.startsWith("admin") ? "action.rejectedByAdmin" : "action.rejectedByUser";
|
|
3996
|
+
return this.t(M);
|
|
4038
3997
|
}
|
|
4039
3998
|
return t.state === "failure" && (((f = t.failure) == null ? void 0 : f.summary) || ((b = t.failure) == null ? void 0 : b.error)) || "";
|
|
4040
3999
|
},
|
|
@@ -4065,201 +4024,201 @@ const Er = {
|
|
|
4065
4024
|
class: "wm-list__loadMore",
|
|
4066
4025
|
role: "status",
|
|
4067
4026
|
"aria-live": "polite"
|
|
4068
|
-
},
|
|
4027
|
+
}, Nr = { class: "wm-list__loadMore-lbl" }, Fr = {
|
|
4069
4028
|
key: 1,
|
|
4070
4029
|
class: "wm-list__historyEnd"
|
|
4071
4030
|
}, Hr = {
|
|
4072
4031
|
key: 2,
|
|
4073
4032
|
class: "wm-list__sep"
|
|
4074
|
-
},
|
|
4033
|
+
}, jr = { class: "wm-list__sep-label" }, zr = {
|
|
4075
4034
|
key: 0,
|
|
4076
4035
|
class: "wm-list__sep wm-list__sep--unread"
|
|
4077
|
-
},
|
|
4036
|
+
}, qr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, Vr = {
|
|
4078
4037
|
key: 0,
|
|
4079
4038
|
class: "wm-list__sysep"
|
|
4080
|
-
},
|
|
4039
|
+
}, Kr = { class: "wm-list__sysep-label" }, Wr = ["data-row-key", "onPointerdown"], $r = {
|
|
4081
4040
|
key: 0,
|
|
4082
4041
|
class: "wm-list__avatarSlot"
|
|
4083
|
-
},
|
|
4042
|
+
}, Gr = { key: 0 }, Yr = {
|
|
4084
4043
|
key: 1,
|
|
4085
4044
|
"aria-hidden": "true"
|
|
4086
|
-
},
|
|
4045
|
+
}, Jr = { key: 2 }, Xr = { key: 0 }, Qr = {
|
|
4087
4046
|
key: 1,
|
|
4088
4047
|
"aria-hidden": "true"
|
|
4089
|
-
},
|
|
4048
|
+
}, Zr = { key: 2 }, ei = {
|
|
4090
4049
|
key: 3,
|
|
4091
4050
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
4092
|
-
},
|
|
4093
|
-
function
|
|
4094
|
-
const a =
|
|
4051
|
+
}, ti = { class: "wm-list__avatarSlot" }, ni = ["aria-label", "title"];
|
|
4052
|
+
function si(e, t, s, r, i, n) {
|
|
4053
|
+
const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), b = P("ArtifactRenderer"), v = P("Bubble"), M = P("AttachmentPreview"), E = P("Typing");
|
|
4095
4054
|
return c(), d("div", Dr, [
|
|
4096
4055
|
l("div", {
|
|
4097
4056
|
ref: "scrollEl",
|
|
4098
|
-
class:
|
|
4099
|
-
onScrollPassive: t[4] || (t[4] = (...
|
|
4057
|
+
class: L(["wm-list", { "wm-list--silent": i.silentFades }]),
|
|
4058
|
+
onScrollPassive: t[4] || (t[4] = (...S) => n.onScroll && n.onScroll(...S))
|
|
4100
4059
|
}, [
|
|
4101
4060
|
s.loadingMore ? (c(), d("div", Ur, [
|
|
4102
4061
|
t[6] || (t[6] = l("span", {
|
|
4103
4062
|
class: "wm-list__loadMore-spinner",
|
|
4104
4063
|
"aria-hidden": "true"
|
|
4105
4064
|
}, null, -1)),
|
|
4106
|
-
l("span",
|
|
4107
|
-
])) : n.historyExhausted ? (c(), d("div", Fr,
|
|
4065
|
+
l("span", Nr, y(n.t("messageList.loadingHistory")), 1)
|
|
4066
|
+
])) : n.historyExhausted ? (c(), d("div", Fr, y(n.t("messageList.conversationStart")), 1)) : k("", !0),
|
|
4108
4067
|
s.dateLabel ? (c(), d("div", Hr, [
|
|
4109
4068
|
t[7] || (t[7] = l("div", { class: "wm-list__line" }, null, -1)),
|
|
4110
|
-
l("span",
|
|
4069
|
+
l("span", jr, y(s.dateLabel), 1),
|
|
4111
4070
|
t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
|
|
4112
4071
|
])) : k("", !0),
|
|
4113
|
-
(c(!0), d(
|
|
4114
|
-
key:
|
|
4072
|
+
(c(!0), d(B, null, N(n.groups, (S, z) => (c(), d(B, {
|
|
4073
|
+
key: S.key
|
|
4115
4074
|
}, [
|
|
4116
|
-
|
|
4075
|
+
S.key === n.unreadGroupKey ? (c(), d("div", zr, [
|
|
4117
4076
|
t[9] || (t[9] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
4118
|
-
l("span",
|
|
4077
|
+
l("span", qr, y(n.t("messageList.unread")), 1),
|
|
4119
4078
|
t[10] || (t[10] = l("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
4120
4079
|
])) : k("", !0),
|
|
4121
|
-
|
|
4080
|
+
S.role === "system" || S.items.length ? (c(), d("div", {
|
|
4122
4081
|
key: 1,
|
|
4123
|
-
class:
|
|
4082
|
+
class: L(["wm-list__group", "wm-list__group--" + S.role])
|
|
4124
4083
|
}, [
|
|
4125
|
-
|
|
4084
|
+
S.role === "system" ? (c(), d("div", Vr, [
|
|
4126
4085
|
t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
4127
|
-
l("span",
|
|
4086
|
+
l("span", Kr, y(S.systemLabel), 1),
|
|
4128
4087
|
t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
4129
|
-
])) : (c(), d(
|
|
4130
|
-
(c(!0), d(
|
|
4131
|
-
key: `${n.messageKey(
|
|
4088
|
+
])) : (c(), d(B, { key: 1 }, [
|
|
4089
|
+
(c(!0), d(B, null, N(S.items, (T, U) => (c(), d(B, {
|
|
4090
|
+
key: `${n.messageKey(T.message)}-${T.partKey}`
|
|
4132
4091
|
}, [
|
|
4133
4092
|
l("div", {
|
|
4134
|
-
"data-row-key": `${n.messageKey(
|
|
4135
|
-
class:
|
|
4136
|
-
"wm-list__row--" +
|
|
4093
|
+
"data-row-key": `${n.messageKey(T.message)}-${T.partKey}`,
|
|
4094
|
+
class: L(["wm-list__row fade-up", [
|
|
4095
|
+
"wm-list__row--" + S.role,
|
|
4137
4096
|
{
|
|
4138
|
-
"is-pending":
|
|
4139
|
-
"is-failed":
|
|
4097
|
+
"is-pending": T.message._pending,
|
|
4098
|
+
"is-failed": T.message._failed
|
|
4140
4099
|
}
|
|
4141
4100
|
]]),
|
|
4142
|
-
style:
|
|
4143
|
-
onPointerdown: (
|
|
4144
|
-
onPointerup: t[0] || (t[0] = (
|
|
4145
|
-
onPointercancel: t[1] || (t[1] = (
|
|
4146
|
-
onPointerleave: t[2] || (t[2] = (
|
|
4147
|
-
onContextmenu: t[3] || (t[3] =
|
|
4101
|
+
style: j(n.cornersStyle(S, U)),
|
|
4102
|
+
onPointerdown: (x) => n.onPressStart(`${n.messageKey(T.message)}-${T.partKey}`),
|
|
4103
|
+
onPointerup: t[0] || (t[0] = (x) => n.onPressEnd()),
|
|
4104
|
+
onPointercancel: t[1] || (t[1] = (x) => n.onPressEnd()),
|
|
4105
|
+
onPointerleave: t[2] || (t[2] = (x) => n.onPressEnd()),
|
|
4106
|
+
onContextmenu: t[3] || (t[3] = Y(() => {
|
|
4148
4107
|
}, ["prevent"]))
|
|
4149
4108
|
}, [
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4109
|
+
S.role !== "user" ? (c(), d("div", $r, [
|
|
4110
|
+
U === S.items.length - 1 ? (c(), d(B, { key: 0 }, [
|
|
4111
|
+
S.role === "ai" ? (c(), I(a, {
|
|
4153
4112
|
key: 0,
|
|
4154
4113
|
size: 26,
|
|
4155
4114
|
tail: !0,
|
|
4156
4115
|
name: s.aiAgentName,
|
|
4157
4116
|
"image-url": s.aiAgentAvatarUrl
|
|
4158
|
-
}, null, 8, ["name", "image-url"])) : (c(),
|
|
4117
|
+
}, null, 8, ["name", "image-url"])) : (c(), I(o, {
|
|
4159
4118
|
key: 1,
|
|
4160
|
-
name:
|
|
4161
|
-
"avatar-url":
|
|
4119
|
+
name: S.agentName,
|
|
4120
|
+
"avatar-url": S.agentAvatarUrl,
|
|
4162
4121
|
size: 26,
|
|
4163
4122
|
tail: !0
|
|
4164
4123
|
}, null, 8, ["name", "avatar-url"]))
|
|
4165
4124
|
], 64)) : k("", !0)
|
|
4166
4125
|
])) : k("", !0),
|
|
4167
|
-
|
|
4126
|
+
T.renderAs === "action" ? (c(), I(f, {
|
|
4168
4127
|
key: 1,
|
|
4169
|
-
state:
|
|
4170
|
-
label: n.actionLabel(
|
|
4171
|
-
detail: n.actionDetail(
|
|
4172
|
-
}, null, 8, ["state", "label", "detail"])) :
|
|
4128
|
+
state: T.message.payload.state,
|
|
4129
|
+
label: n.actionLabel(T.message),
|
|
4130
|
+
detail: n.actionDetail(T.message)
|
|
4131
|
+
}, null, 8, ["state", "label", "detail"])) : T.renderAs === "admin-pending" ? (c(), I(f, {
|
|
4173
4132
|
key: 2,
|
|
4174
4133
|
state: "awaiting",
|
|
4175
4134
|
label: n.t("messageList.approvalRequestSent"),
|
|
4176
|
-
detail:
|
|
4177
|
-
}, null, 8, ["label", "detail"])) :
|
|
4135
|
+
detail: T.message.text_md || ""
|
|
4136
|
+
}, null, 8, ["label", "detail"])) : T.renderAs === "artifact-of-action" ? (c(), I(b, {
|
|
4178
4137
|
key: 3,
|
|
4179
|
-
artifact: n.actionArtifact(
|
|
4180
|
-
}, null, 8, ["artifact"])) :
|
|
4138
|
+
artifact: n.actionArtifact(T.message)
|
|
4139
|
+
}, null, 8, ["artifact"])) : T.renderAs === "artifact" ? (c(), I(b, {
|
|
4181
4140
|
key: 4,
|
|
4182
|
-
artifact: n.artifactOf(
|
|
4141
|
+
artifact: n.artifactOf(T.message)
|
|
4183
4142
|
}, null, 8, ["artifact"])) : (c(), d("div", {
|
|
4184
4143
|
key: 5,
|
|
4185
|
-
class:
|
|
4186
|
-
"wm-list__body--mixed": !!
|
|
4144
|
+
class: L(["wm-list__body", {
|
|
4145
|
+
"wm-list__body--mixed": !!T.message.text_md && n.attachmentsOf(T.message).length > 0
|
|
4187
4146
|
}])
|
|
4188
4147
|
}, [
|
|
4189
|
-
|
|
4148
|
+
T.message.text_md ? (c(), I(v, {
|
|
4190
4149
|
key: 0,
|
|
4191
|
-
role:
|
|
4192
|
-
text:
|
|
4150
|
+
role: S.role,
|
|
4151
|
+
text: T.message.text_md
|
|
4193
4152
|
}, null, 8, ["role", "text"])) : k("", !0),
|
|
4194
|
-
n.attachmentsOf(
|
|
4153
|
+
n.attachmentsOf(T.message).length ? (c(), d("div", {
|
|
4195
4154
|
key: 1,
|
|
4196
|
-
class:
|
|
4197
|
-
"wm-list__atts--align-end":
|
|
4198
|
-
"wm-list__atts--mosaic": n.attachmentsOf(
|
|
4155
|
+
class: L(["wm-list__atts", {
|
|
4156
|
+
"wm-list__atts--align-end": S.role === "user",
|
|
4157
|
+
"wm-list__atts--mosaic": n.attachmentsOf(T.message).length >= 2
|
|
4199
4158
|
}]),
|
|
4200
|
-
style:
|
|
4159
|
+
style: j(
|
|
4201
4160
|
n.mosaicGridStyle(
|
|
4202
|
-
n.attachmentsOf(
|
|
4161
|
+
n.attachmentsOf(T.message).length
|
|
4203
4162
|
)
|
|
4204
4163
|
)
|
|
4205
4164
|
}, [
|
|
4206
|
-
(c(!0), d(
|
|
4207
|
-
|
|
4208
|
-
), (
|
|
4209
|
-
key: `${n.messageKey(
|
|
4210
|
-
attachment:
|
|
4211
|
-
style:
|
|
4165
|
+
(c(!0), d(B, null, N(n.attachmentsOf(
|
|
4166
|
+
T.message
|
|
4167
|
+
), (x, q) => (c(), I(M, {
|
|
4168
|
+
key: `${n.messageKey(T.message)}-att-${q}`,
|
|
4169
|
+
attachment: x,
|
|
4170
|
+
style: j(
|
|
4212
4171
|
n.mosaicCornerStyle(
|
|
4213
|
-
|
|
4214
|
-
n.attachmentsOf(
|
|
4215
|
-
!!
|
|
4172
|
+
q,
|
|
4173
|
+
n.attachmentsOf(T.message).length,
|
|
4174
|
+
!!T.message.text_md
|
|
4216
4175
|
)
|
|
4217
4176
|
)
|
|
4218
4177
|
}, null, 8, ["attachment", "style"]))), 128))
|
|
4219
4178
|
], 6)) : k("", !0)
|
|
4220
4179
|
], 2))
|
|
4221
|
-
], 46,
|
|
4222
|
-
|
|
4180
|
+
], 46, Wr),
|
|
4181
|
+
U < S.items.length - 1 && i.pressedItemKey === `${n.messageKey(T.message)}-${T.partKey}` && (S.role !== "user" || n.timeOf(T.message)) ? (c(), d("div", {
|
|
4223
4182
|
key: 0,
|
|
4224
|
-
class:
|
|
4183
|
+
class: L(["wm-list__meta wm-list__meta--press", { "wm-list__meta--right": S.role === "user" }])
|
|
4225
4184
|
}, [
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
n.timeOf(
|
|
4185
|
+
S.role !== "user" ? (c(), d("span", Gr, y(n.roleLabel(S)), 1)) : k("", !0),
|
|
4186
|
+
S.role !== "user" && n.timeOf(T.message) ? (c(), d("span", Yr, "•")) : k("", !0),
|
|
4187
|
+
n.timeOf(T.message) ? (c(), d("span", Jr, y(n.timeOf(T.message)), 1)) : k("", !0)
|
|
4229
4188
|
], 2)) : k("", !0)
|
|
4230
4189
|
], 64))), 128)),
|
|
4231
|
-
(
|
|
4190
|
+
(S.role !== "user" || n.lastTimeOf(S)) && !n.hasTrailingOverlay(S) ? (c(), d("div", {
|
|
4232
4191
|
key: 0,
|
|
4233
|
-
class:
|
|
4192
|
+
class: L(["wm-list__meta", { "wm-list__meta--right": S.role === "user" }])
|
|
4234
4193
|
}, [
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
n.lastTimeOf(
|
|
4194
|
+
S.role !== "user" ? (c(), d("span", Xr, y(n.roleLabel(S)), 1)) : k("", !0),
|
|
4195
|
+
S.role !== "user" && n.lastTimeOf(S) ? (c(), d("span", Qr, "•")) : k("", !0),
|
|
4196
|
+
n.lastTimeOf(S) ? (c(), d("span", Zr, y(n.lastTimeOf(S)), 1)) : k("", !0)
|
|
4238
4197
|
], 2)) : k("", !0)
|
|
4239
4198
|
], 64))
|
|
4240
4199
|
], 2)) : k("", !0)
|
|
4241
4200
|
], 64))), 128)),
|
|
4242
|
-
s.streamingActive ? (c(), d("div",
|
|
4243
|
-
l("div",
|
|
4244
|
-
|
|
4201
|
+
s.streamingActive ? (c(), d("div", ei, [
|
|
4202
|
+
l("div", ti, [
|
|
4203
|
+
W(a, {
|
|
4245
4204
|
size: 26,
|
|
4246
4205
|
tail: !0,
|
|
4247
4206
|
name: s.aiAgentName,
|
|
4248
4207
|
"image-url": s.aiAgentAvatarUrl
|
|
4249
4208
|
}, null, 8, ["name", "image-url"])
|
|
4250
4209
|
]),
|
|
4251
|
-
|
|
4210
|
+
W(E)
|
|
4252
4211
|
])) : k("", !0)
|
|
4253
4212
|
], 34),
|
|
4254
|
-
|
|
4255
|
-
default:
|
|
4213
|
+
W(Ne, { name: "wm-scrollDown" }, {
|
|
4214
|
+
default: Fe(() => [
|
|
4256
4215
|
i.showScrollDown ? (c(), d("button", {
|
|
4257
4216
|
key: 0,
|
|
4258
4217
|
type: "button",
|
|
4259
4218
|
class: "wm-list__scrollDown",
|
|
4260
4219
|
"aria-label": n.t("messageList.scrollToBottom"),
|
|
4261
4220
|
title: n.t("messageList.scrollToBottom"),
|
|
4262
|
-
onClick: t[5] || (t[5] = (...
|
|
4221
|
+
onClick: t[5] || (t[5] = (...S) => n.scrollToBottomSmooth && n.scrollToBottomSmooth(...S))
|
|
4263
4222
|
}, [...t[13] || (t[13] = [
|
|
4264
4223
|
l("svg", {
|
|
4265
4224
|
width: "14",
|
|
@@ -4274,14 +4233,14 @@ function ri(e, t, s, r, i, n) {
|
|
|
4274
4233
|
}, [
|
|
4275
4234
|
l("path", { d: "M6 9l6 6 6-6" })
|
|
4276
4235
|
], -1)
|
|
4277
|
-
])], 8,
|
|
4236
|
+
])], 8, ni)) : k("", !0)
|
|
4278
4237
|
]),
|
|
4279
4238
|
_: 1
|
|
4280
4239
|
})
|
|
4281
4240
|
]);
|
|
4282
4241
|
}
|
|
4283
|
-
const
|
|
4284
|
-
function
|
|
4242
|
+
const ri = /* @__PURE__ */ D(Pr, [["render", si], ["__scopeId", "data-v-79b30a8f"]]), ge = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Oe = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
4243
|
+
function ii() {
|
|
4285
4244
|
return Oe && [
|
|
4286
4245
|
"video/webm;codecs=vp9,opus",
|
|
4287
4246
|
"video/webm;codecs=vp8,opus",
|
|
@@ -4301,11 +4260,11 @@ function Ve({ audio: e }) {
|
|
|
4301
4260
|
systemAudio: e ? "include" : "exclude"
|
|
4302
4261
|
};
|
|
4303
4262
|
}
|
|
4304
|
-
function
|
|
4263
|
+
function co(e) {
|
|
4305
4264
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
4306
4265
|
}
|
|
4307
|
-
async function
|
|
4308
|
-
if (!
|
|
4266
|
+
async function ai() {
|
|
4267
|
+
if (!ge) return null;
|
|
4309
4268
|
let e;
|
|
4310
4269
|
try {
|
|
4311
4270
|
e = await navigator.mediaDevices.getDisplayMedia(
|
|
@@ -4315,7 +4274,7 @@ async function oi() {
|
|
|
4315
4274
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
4316
4275
|
}
|
|
4317
4276
|
try {
|
|
4318
|
-
return await
|
|
4277
|
+
return await oi(e);
|
|
4319
4278
|
} catch (t) {
|
|
4320
4279
|
return console.error("[media] screenshot capture", t), null;
|
|
4321
4280
|
} finally {
|
|
@@ -4324,7 +4283,7 @@ async function oi() {
|
|
|
4324
4283
|
});
|
|
4325
4284
|
}
|
|
4326
4285
|
}
|
|
4327
|
-
async function
|
|
4286
|
+
async function oi(e) {
|
|
4328
4287
|
const t = document.createElement("video");
|
|
4329
4288
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((o) => requestAnimationFrame(o));
|
|
4330
4289
|
const s = t.videoWidth || 1280, r = t.videoHeight || 720, i = document.createElement("canvas");
|
|
@@ -4337,64 +4296,64 @@ async function li(e) {
|
|
|
4337
4296
|
}), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
4338
4297
|
return new File([n], `capture-${a}.png`, { type: "image/png" });
|
|
4339
4298
|
}
|
|
4340
|
-
async function
|
|
4299
|
+
async function li(e = {}) {
|
|
4341
4300
|
var b;
|
|
4342
|
-
if (!
|
|
4301
|
+
if (!ge || !Oe) return null;
|
|
4343
4302
|
let t;
|
|
4344
4303
|
try {
|
|
4345
4304
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
4346
4305
|
Ve({ audio: !0 })
|
|
4347
4306
|
);
|
|
4348
|
-
} catch (
|
|
4349
|
-
return (
|
|
4307
|
+
} catch (v) {
|
|
4308
|
+
return (v == null ? void 0 : v.name) !== "NotAllowedError" && console.error("[media] record picker", v), null;
|
|
4350
4309
|
}
|
|
4351
|
-
const s =
|
|
4310
|
+
const s = ii();
|
|
4352
4311
|
let r;
|
|
4353
4312
|
try {
|
|
4354
4313
|
r = s ? new window.MediaRecorder(t, { mimeType: s }) : new window.MediaRecorder(t);
|
|
4355
|
-
} catch (
|
|
4356
|
-
return console.error("[media] recorder init",
|
|
4357
|
-
|
|
4314
|
+
} catch (v) {
|
|
4315
|
+
return console.error("[media] recorder init", v), t.getTracks().forEach((M) => {
|
|
4316
|
+
M.stop();
|
|
4358
4317
|
}), null;
|
|
4359
4318
|
}
|
|
4360
4319
|
const i = [];
|
|
4361
4320
|
let n = null, a = !1;
|
|
4362
|
-
r.addEventListener("dataavailable", (
|
|
4363
|
-
|
|
4321
|
+
r.addEventListener("dataavailable", (v) => {
|
|
4322
|
+
v.data && v.data.size > 0 && i.push(v.data);
|
|
4364
4323
|
}), r.addEventListener("stop", () => {
|
|
4365
|
-
var
|
|
4324
|
+
var v, M;
|
|
4366
4325
|
if (n && clearInterval(n), t.getTracks().forEach((E) => {
|
|
4367
4326
|
E.stop();
|
|
4368
4327
|
}), i.length) {
|
|
4369
|
-
const E = r.mimeType || s || "video/webm",
|
|
4328
|
+
const E = r.mimeType || s || "video/webm", S = new Blob(i, { type: E }), z = /mp4/.test(E) ? "mp4" : "webm", T = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), U = new File([S], `ecran-${T}.${z}`, {
|
|
4370
4329
|
type: E
|
|
4371
4330
|
});
|
|
4372
|
-
(
|
|
4331
|
+
(v = e.onfinalize) == null || v.call(e, U);
|
|
4373
4332
|
} else
|
|
4374
|
-
(
|
|
4375
|
-
}), t.getVideoTracks().forEach((
|
|
4376
|
-
|
|
4333
|
+
(M = e.oncancel) == null || M.call(e);
|
|
4334
|
+
}), t.getVideoTracks().forEach((v) => {
|
|
4335
|
+
v.addEventListener("ended", () => o(), { once: !0 });
|
|
4377
4336
|
});
|
|
4378
4337
|
function o() {
|
|
4379
4338
|
if (!a && (a = !0, r.state !== "inactive"))
|
|
4380
4339
|
try {
|
|
4381
4340
|
r.stop();
|
|
4382
|
-
} catch (
|
|
4383
|
-
console.error("[media] recorder stop",
|
|
4341
|
+
} catch (v) {
|
|
4342
|
+
console.error("[media] recorder stop", v);
|
|
4384
4343
|
}
|
|
4385
4344
|
}
|
|
4386
4345
|
try {
|
|
4387
4346
|
r.start(1e3);
|
|
4388
|
-
} catch (
|
|
4389
|
-
return console.error("[media] recorder start",
|
|
4390
|
-
|
|
4347
|
+
} catch (v) {
|
|
4348
|
+
return console.error("[media] recorder start", v), t.getTracks().forEach((M) => {
|
|
4349
|
+
M.stop();
|
|
4391
4350
|
}), null;
|
|
4392
4351
|
}
|
|
4393
4352
|
(b = e.onstart) == null || b.call(e);
|
|
4394
4353
|
const f = Date.now();
|
|
4395
4354
|
return n = setInterval(() => {
|
|
4396
|
-
var
|
|
4397
|
-
(
|
|
4355
|
+
var v;
|
|
4356
|
+
(v = e.ontick) == null || v.call(e, Date.now() - f);
|
|
4398
4357
|
}, 500), {
|
|
4399
4358
|
stop: o,
|
|
4400
4359
|
get state() {
|
|
@@ -4402,7 +4361,7 @@ async function ci(e = {}) {
|
|
|
4402
4361
|
}
|
|
4403
4362
|
};
|
|
4404
4363
|
}
|
|
4405
|
-
const
|
|
4364
|
+
const ci = [
|
|
4406
4365
|
{
|
|
4407
4366
|
action: "file",
|
|
4408
4367
|
labelKey: "composer.attachFile",
|
|
@@ -4418,7 +4377,7 @@ const di = [
|
|
|
4418
4377
|
labelKey: "composer.recordScreen",
|
|
4419
4378
|
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"
|
|
4420
4379
|
}
|
|
4421
|
-
],
|
|
4380
|
+
], di = {
|
|
4422
4381
|
name: "WmComposer",
|
|
4423
4382
|
inject: {
|
|
4424
4383
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4452,10 +4411,10 @@ const di = [
|
|
|
4452
4411
|
return !this.disabled && !!this.local.trim();
|
|
4453
4412
|
},
|
|
4454
4413
|
attachItems() {
|
|
4455
|
-
return
|
|
4414
|
+
return ci.map((e) => ({
|
|
4456
4415
|
...e,
|
|
4457
4416
|
label: this.t(e.labelKey),
|
|
4458
|
-
disabled: e.action === "screenshot" && !
|
|
4417
|
+
disabled: e.action === "screenshot" && !ge || e.action === "record" && (!ge || !Oe)
|
|
4459
4418
|
}));
|
|
4460
4419
|
},
|
|
4461
4420
|
recordingElapsedLabel() {
|
|
@@ -4526,13 +4485,13 @@ const di = [
|
|
|
4526
4485
|
},
|
|
4527
4486
|
async captureScreenshot() {
|
|
4528
4487
|
if (this.disabled) return;
|
|
4529
|
-
const e = await
|
|
4488
|
+
const e = await ai();
|
|
4530
4489
|
e && this.$emit("attach", e);
|
|
4531
4490
|
},
|
|
4532
4491
|
async startRecording() {
|
|
4533
4492
|
if (this.recording || this.disabled) return;
|
|
4534
4493
|
this.recordingElapsed = 0;
|
|
4535
|
-
const e = await
|
|
4494
|
+
const e = await li({
|
|
4536
4495
|
onstart: () => {
|
|
4537
4496
|
this.recording = !0;
|
|
4538
4497
|
},
|
|
@@ -4574,39 +4533,39 @@ const di = [
|
|
|
4574
4533
|
!e || !this._vvHandler || (e.removeEventListener("resize", this._vvHandler), e.removeEventListener("scroll", this._vvHandler), this._vvHandler = null);
|
|
4575
4534
|
}
|
|
4576
4535
|
}
|
|
4577
|
-
},
|
|
4536
|
+
}, ui = {
|
|
4578
4537
|
key: 0,
|
|
4579
4538
|
class: "wm-rec"
|
|
4580
|
-
}, mi = { class: "wm-rec__lbl" },
|
|
4539
|
+
}, mi = { class: "wm-rec__lbl" }, hi = {
|
|
4581
4540
|
key: 1,
|
|
4582
4541
|
class: "wm-compose__menu",
|
|
4583
4542
|
role: "menu"
|
|
4584
|
-
},
|
|
4543
|
+
}, fi = ["disabled", "onClick"], _i = { class: "wm-compose__menuIcon" }, gi = {
|
|
4585
4544
|
viewBox: "0 0 24 24",
|
|
4586
4545
|
width: "14",
|
|
4587
4546
|
height: "14",
|
|
4588
4547
|
"aria-hidden": "true"
|
|
4589
|
-
},
|
|
4590
|
-
function
|
|
4548
|
+
}, yi = ["d"], vi = ["placeholder", "disabled"], pi = { class: "wm-compose__actions" }, wi = ["title", "aria-label", "disabled"], bi = ["disabled", "aria-label"];
|
|
4549
|
+
function ki(e, t, s, r, i, n) {
|
|
4591
4550
|
return c(), d("div", {
|
|
4592
|
-
class:
|
|
4593
|
-
style:
|
|
4551
|
+
class: L(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
|
|
4552
|
+
style: j(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
|
|
4594
4553
|
}, [
|
|
4595
|
-
i.recording ? (c(), d("div",
|
|
4554
|
+
i.recording ? (c(), d("div", ui, [
|
|
4596
4555
|
t[8] || (t[8] = l("span", {
|
|
4597
4556
|
class: "wm-rec__dot",
|
|
4598
4557
|
"aria-hidden": "true"
|
|
4599
4558
|
}, null, -1)),
|
|
4600
|
-
l("span", mi,
|
|
4559
|
+
l("span", mi, y(n.t("composer.recording", { time: n.recordingElapsedLabel })), 1),
|
|
4601
4560
|
l("button", {
|
|
4602
4561
|
type: "button",
|
|
4603
4562
|
class: "wm-rec__stop",
|
|
4604
4563
|
onClick: t[0] || (t[0] = (...a) => n.stopRecording && n.stopRecording(...a))
|
|
4605
|
-
},
|
|
4564
|
+
}, y(n.t("composer.stop")), 1)
|
|
4606
4565
|
])) : k("", !0),
|
|
4607
4566
|
l("form", {
|
|
4608
|
-
class:
|
|
4609
|
-
onSubmit: t[7] || (t[7] =
|
|
4567
|
+
class: L(["wm-compose", { "has-attach": i.attachOpen }]),
|
|
4568
|
+
onSubmit: t[7] || (t[7] = Y((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]))
|
|
4610
4569
|
}, [
|
|
4611
4570
|
l("input", {
|
|
4612
4571
|
ref: "fileEl",
|
|
@@ -4620,16 +4579,16 @@ function Ci(e, t, s, r, i, n) {
|
|
|
4620
4579
|
class: "wm-compose__overlay",
|
|
4621
4580
|
onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
|
|
4622
4581
|
})) : k("", !0),
|
|
4623
|
-
i.attachOpen ? (c(), d("div",
|
|
4624
|
-
(c(!0), d(
|
|
4582
|
+
i.attachOpen ? (c(), d("div", hi, [
|
|
4583
|
+
(c(!0), d(B, null, N(n.attachItems, (a) => (c(), d("button", {
|
|
4625
4584
|
key: a.action,
|
|
4626
4585
|
type: "button",
|
|
4627
4586
|
class: "wm-compose__menuItem",
|
|
4628
4587
|
disabled: a.disabled,
|
|
4629
4588
|
onClick: (o) => n.onAttachAction(a.action)
|
|
4630
4589
|
}, [
|
|
4631
|
-
l("span",
|
|
4632
|
-
(c(), d("svg",
|
|
4590
|
+
l("span", _i, [
|
|
4591
|
+
(c(), d("svg", gi, [
|
|
4633
4592
|
l("path", {
|
|
4634
4593
|
d: a.path,
|
|
4635
4594
|
stroke: "currentColor",
|
|
@@ -4637,13 +4596,13 @@ function Ci(e, t, s, r, i, n) {
|
|
|
4637
4596
|
"stroke-linecap": "round",
|
|
4638
4597
|
"stroke-linejoin": "round",
|
|
4639
4598
|
fill: "none"
|
|
4640
|
-
}, null, 8,
|
|
4599
|
+
}, null, 8, yi)
|
|
4641
4600
|
]))
|
|
4642
4601
|
]),
|
|
4643
|
-
l("span", null,
|
|
4644
|
-
], 8,
|
|
4602
|
+
l("span", null, y(a.label), 1)
|
|
4603
|
+
], 8, fi))), 128))
|
|
4645
4604
|
])) : k("", !0),
|
|
4646
|
-
|
|
4605
|
+
$(l("textarea", {
|
|
4647
4606
|
ref: "inputEl",
|
|
4648
4607
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => i.local = a),
|
|
4649
4608
|
class: "wm-compose__input",
|
|
@@ -4652,13 +4611,13 @@ function Ci(e, t, s, r, i, n) {
|
|
|
4652
4611
|
disabled: s.disabled,
|
|
4653
4612
|
onKeydown: t[4] || (t[4] = (...a) => n.onKeydown && n.onKeydown(...a)),
|
|
4654
4613
|
onInput: t[5] || (t[5] = (...a) => n.autosize && n.autosize(...a))
|
|
4655
|
-
}, null, 40,
|
|
4656
|
-
[
|
|
4614
|
+
}, null, 40, vi), [
|
|
4615
|
+
[se, i.local]
|
|
4657
4616
|
]),
|
|
4658
|
-
l("div",
|
|
4617
|
+
l("div", pi, [
|
|
4659
4618
|
l("button", {
|
|
4660
4619
|
type: "button",
|
|
4661
|
-
class:
|
|
4620
|
+
class: L(["wm-compose__icon", { "is-open": i.attachOpen }]),
|
|
4662
4621
|
title: s.attachLabel,
|
|
4663
4622
|
"aria-label": s.attachLabel,
|
|
4664
4623
|
disabled: i.recording,
|
|
@@ -4677,10 +4636,10 @@ function Ci(e, t, s, r, i, n) {
|
|
|
4677
4636
|
}, [
|
|
4678
4637
|
l("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
|
|
4679
4638
|
], -1)
|
|
4680
|
-
])], 10,
|
|
4639
|
+
])], 10, wi),
|
|
4681
4640
|
l("button", {
|
|
4682
4641
|
type: "submit",
|
|
4683
|
-
class:
|
|
4642
|
+
class: L(["wm-compose__send", { "is-empty": !n.canSend }]),
|
|
4684
4643
|
disabled: !n.canSend,
|
|
4685
4644
|
"aria-label": n.t("composer.send")
|
|
4686
4645
|
}, [...t[10] || (t[10] = [
|
|
@@ -4697,126 +4656,60 @@ function Ci(e, t, s, r, i, n) {
|
|
|
4697
4656
|
}, [
|
|
4698
4657
|
l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4699
4658
|
], -1)
|
|
4700
|
-
])], 10,
|
|
4659
|
+
])], 10, bi)
|
|
4701
4660
|
])
|
|
4702
4661
|
], 34)
|
|
4703
4662
|
], 6);
|
|
4704
4663
|
}
|
|
4705
|
-
const
|
|
4706
|
-
name: "
|
|
4664
|
+
const Ci = /* @__PURE__ */ D(di, [["render", ki], ["__scopeId", "data-v-bba29b9c"]]), Ai = {
|
|
4665
|
+
name: "WmInlineCallbacks",
|
|
4707
4666
|
props: {
|
|
4667
|
+
// Array d'items `{ id?, label, style?, ... }`. Pour les suggestions,
|
|
4668
|
+
// l'item peut aussi porter `text`/`kind` (interprétés côté parent).
|
|
4708
4669
|
items: { type: Array, default: () => [] },
|
|
4709
|
-
|
|
4710
|
-
|
|
4670
|
+
variant: {
|
|
4671
|
+
type: String,
|
|
4672
|
+
default: "chips",
|
|
4673
|
+
validator: (e) => e === "chips" || e === "buttons"
|
|
4674
|
+
},
|
|
4675
|
+
// Laisse les chips attendre l'atterrissage du dernier message avant
|
|
4676
|
+
// de pop-in. Bumpé par le parent à chaque nouveau jeu de suggestions.
|
|
4711
4677
|
baseDelay: { type: Number, default: 360 },
|
|
4712
4678
|
stepDelay: { type: Number, default: 90 }
|
|
4713
4679
|
},
|
|
4714
4680
|
emits: ["select"],
|
|
4715
4681
|
computed: {
|
|
4716
|
-
// Re-key
|
|
4717
|
-
//
|
|
4682
|
+
// Re-key toute la rangée sur changement de contenu pour que Vue
|
|
4683
|
+
// détruise/recrée les boutons et rejoue l'animation d'entrée.
|
|
4718
4684
|
batchKey() {
|
|
4719
4685
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4720
4686
|
}
|
|
4687
|
+
},
|
|
4688
|
+
methods: {
|
|
4689
|
+
btnClass(e) {
|
|
4690
|
+
return this.variant === "chips" ? "wm-icb__btn--chip" : ["wm-icb__btn--action", `wm-icb__btn--${(e == null ? void 0 : e.style) || "neutral"}`];
|
|
4691
|
+
}
|
|
4721
4692
|
}
|
|
4722
|
-
},
|
|
4693
|
+
}, Si = ["onClick"];
|
|
4723
4694
|
function Mi(e, t, s, r, i, n) {
|
|
4724
4695
|
return s.items.length ? (c(), d("div", {
|
|
4725
4696
|
key: n.batchKey,
|
|
4726
|
-
class: "wm-
|
|
4697
|
+
class: L(["wm-icb", `wm-icb--${s.variant}`])
|
|
4727
4698
|
}, [
|
|
4728
|
-
(c(!0), d(
|
|
4729
|
-
key: o,
|
|
4699
|
+
(c(!0), d(B, null, N(s.items, (a, o) => (c(), d("button", {
|
|
4700
|
+
key: a.id != null ? a.id : o,
|
|
4730
4701
|
type: "button",
|
|
4731
|
-
class: "wm-
|
|
4732
|
-
style:
|
|
4702
|
+
class: L(["wm-icb__btn", n.btnClass(a)]),
|
|
4703
|
+
style: j(
|
|
4704
|
+
s.variant === "chips" ? { animationDelay: s.baseDelay + o * s.stepDelay + "ms" } : null
|
|
4705
|
+
),
|
|
4733
4706
|
onClick: (f) => e.$emit("select", a)
|
|
4734
|
-
},
|
|
4735
|
-
])) : k("", !0);
|
|
4736
|
-
}
|
|
4737
|
-
const xi = /* @__PURE__ */ N(Si, [["render", Mi], ["__scopeId", "data-v-47ad8085"]]), Oi = {
|
|
4738
|
-
name: "WmApprovalCard",
|
|
4739
|
-
components: { AIAvatar: oe },
|
|
4740
|
-
inject: {
|
|
4741
|
-
// Translator shared by the Messenger shell; French fallback when
|
|
4742
|
-
// the component is used standalone.
|
|
4743
|
-
t: { default: () => F() }
|
|
4744
|
-
},
|
|
4745
|
-
props: {
|
|
4746
|
-
action: { type: String, required: !0 },
|
|
4747
|
-
detail: { type: String, default: "" },
|
|
4748
|
-
callbacks: { type: Array, default: () => [] },
|
|
4749
|
-
agentName: { type: String, default: "" },
|
|
4750
|
-
agentAvatarUrl: { type: String, default: null }
|
|
4751
|
-
},
|
|
4752
|
-
emits: ["callback"],
|
|
4753
|
-
computed: {
|
|
4754
|
-
approveCallback() {
|
|
4755
|
-
return this.callbacks.find(
|
|
4756
|
-
(e) => e.id === "approve" || e.style === "primary"
|
|
4757
|
-
) || this.callbacks[0];
|
|
4758
|
-
},
|
|
4759
|
-
rejectCallback() {
|
|
4760
|
-
return this.callbacks.find(
|
|
4761
|
-
(e) => e.id === "reject" || e.style === "danger" || e.style === "neutral"
|
|
4762
|
-
) || (this.callbacks.length > 1 ? this.callbacks[1] : null);
|
|
4763
|
-
},
|
|
4764
|
-
approveId() {
|
|
4765
|
-
var e;
|
|
4766
|
-
return (e = this.approveCallback) == null ? void 0 : e.id;
|
|
4767
|
-
},
|
|
4768
|
-
rejectId() {
|
|
4769
|
-
var e;
|
|
4770
|
-
return (e = this.rejectCallback) == null ? void 0 : e.id;
|
|
4771
|
-
},
|
|
4772
|
-
approveLabel() {
|
|
4773
|
-
var e;
|
|
4774
|
-
return ((e = this.approveCallback) == null ? void 0 : e.label) || this.t("approval.approve");
|
|
4775
|
-
},
|
|
4776
|
-
rejectLabel() {
|
|
4777
|
-
var e;
|
|
4778
|
-
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4779
|
-
}
|
|
4780
|
-
}
|
|
4781
|
-
}, Ri = { class: "wm-approval" }, Li = { class: "wm-approval__head" }, Ii = { class: "wm-approval__icon" }, Ei = { class: "wm-approval__main" }, Bi = { class: "wm-approval__title" }, Pi = {
|
|
4782
|
-
key: 0,
|
|
4783
|
-
class: "wm-approval__detail"
|
|
4784
|
-
}, Ni = { class: "wm-approval__actions" };
|
|
4785
|
-
function Di(e, t, s, r, i, n) {
|
|
4786
|
-
const a = B("AIAvatar");
|
|
4787
|
-
return c(), d("div", Ri, [
|
|
4788
|
-
l("div", Li, [
|
|
4789
|
-
l("div", Ii, [
|
|
4790
|
-
K(a, {
|
|
4791
|
-
size: 24,
|
|
4792
|
-
name: s.agentName,
|
|
4793
|
-
"image-url": s.agentAvatarUrl
|
|
4794
|
-
}, null, 8, ["name", "image-url"])
|
|
4795
|
-
]),
|
|
4796
|
-
l("div", Ei, [
|
|
4797
|
-
l("div", Bi, v(s.action), 1),
|
|
4798
|
-
s.detail ? (c(), d("div", Pi, v(s.detail), 1)) : k("", !0)
|
|
4799
|
-
])
|
|
4800
|
-
]),
|
|
4801
|
-
l("div", Ni, [
|
|
4802
|
-
n.rejectId ? (c(), d("button", {
|
|
4803
|
-
key: 0,
|
|
4804
|
-
type: "button",
|
|
4805
|
-
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
4806
|
-
onClick: t[0] || (t[0] = (o) => e.$emit("callback", n.rejectId))
|
|
4807
|
-
}, v(n.rejectLabel), 1)) : k("", !0),
|
|
4808
|
-
n.approveId ? (c(), d("button", {
|
|
4809
|
-
key: 1,
|
|
4810
|
-
type: "button",
|
|
4811
|
-
class: "wm-approval__btn wm-approval__btn--primary",
|
|
4812
|
-
onClick: t[1] || (t[1] = (o) => e.$emit("callback", n.approveId))
|
|
4813
|
-
}, v(n.approveLabel), 1)) : k("", !0)
|
|
4814
|
-
])
|
|
4815
|
-
]);
|
|
4707
|
+
}, y(a.label), 15, Si))), 128))
|
|
4708
|
+
], 2)) : k("", !0);
|
|
4816
4709
|
}
|
|
4817
|
-
const
|
|
4818
|
-
let
|
|
4819
|
-
const
|
|
4710
|
+
const Ti = /* @__PURE__ */ D(Ai, [["render", Mi], ["__scopeId", "data-v-9a4ce94e"]]);
|
|
4711
|
+
let De = 0;
|
|
4712
|
+
const xi = /* @__PURE__ */ new Set([
|
|
4820
4713
|
"text",
|
|
4821
4714
|
"textarea",
|
|
4822
4715
|
"number",
|
|
@@ -4824,9 +4717,9 @@ const ji = /* @__PURE__ */ new Set([
|
|
|
4824
4717
|
"select",
|
|
4825
4718
|
"multiselect",
|
|
4826
4719
|
"date"
|
|
4827
|
-
]),
|
|
4720
|
+
]), Oi = {
|
|
4828
4721
|
name: "WmFormCard",
|
|
4829
|
-
components: { AIAvatar:
|
|
4722
|
+
components: { AIAvatar: he },
|
|
4830
4723
|
inject: {
|
|
4831
4724
|
// Translator shared by the Messenger shell; French fallback when
|
|
4832
4725
|
// the component is used standalone.
|
|
@@ -4841,8 +4734,8 @@ const ji = /* @__PURE__ */ new Set([
|
|
|
4841
4734
|
},
|
|
4842
4735
|
emits: ["submit"],
|
|
4843
4736
|
data() {
|
|
4844
|
-
return
|
|
4845
|
-
_uid:
|
|
4737
|
+
return De += 1, {
|
|
4738
|
+
_uid: De,
|
|
4846
4739
|
values: {},
|
|
4847
4740
|
busy: !1,
|
|
4848
4741
|
error: ""
|
|
@@ -4854,7 +4747,7 @@ const ji = /* @__PURE__ */ new Set([
|
|
|
4854
4747
|
// douteux.
|
|
4855
4748
|
normalizedFields() {
|
|
4856
4749
|
var t;
|
|
4857
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !
|
|
4750
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !xi.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
|
|
4858
4751
|
}
|
|
4859
4752
|
},
|
|
4860
4753
|
created() {
|
|
@@ -4907,54 +4800,54 @@ const ji = /* @__PURE__ */ new Set([
|
|
|
4907
4800
|
}
|
|
4908
4801
|
}
|
|
4909
4802
|
}
|
|
4910
|
-
},
|
|
4803
|
+
}, Ri = { class: "wm-form" }, Li = { class: "wm-form__head" }, Ei = { class: "wm-form__icon" }, Bi = { class: "wm-form__main" }, Ii = { class: "wm-form__title" }, Pi = {
|
|
4911
4804
|
key: 0,
|
|
4912
4805
|
class: "wm-form__detail"
|
|
4913
|
-
},
|
|
4806
|
+
}, Di = ["for"], Ui = {
|
|
4914
4807
|
key: 0,
|
|
4915
4808
|
class: "wm-form__req",
|
|
4916
4809
|
"aria-hidden": "true"
|
|
4917
|
-
},
|
|
4810
|
+
}, Ni = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Fi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Hi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ji = ["id", "onUpdate:modelValue", "required", "disabled"], zi = {
|
|
4918
4811
|
key: 4,
|
|
4919
4812
|
class: "wm-form__bool"
|
|
4920
|
-
},
|
|
4813
|
+
}, qi = ["id", "onUpdate:modelValue", "disabled"], Vi = ["id", "onUpdate:modelValue", "required", "disabled"], Ki = {
|
|
4921
4814
|
value: "",
|
|
4922
4815
|
disabled: ""
|
|
4923
|
-
},
|
|
4816
|
+
}, Wi = ["value"], $i = {
|
|
4924
4817
|
key: 6,
|
|
4925
4818
|
class: "wm-form__multi"
|
|
4926
|
-
},
|
|
4819
|
+
}, Gi = ["value", "checked", "disabled", "onChange"], Yi = {
|
|
4927
4820
|
key: 0,
|
|
4928
4821
|
class: "wm-form__err"
|
|
4929
|
-
},
|
|
4822
|
+
}, Ji = ["disabled"], Xi = {
|
|
4930
4823
|
key: 0,
|
|
4931
4824
|
class: "wm-form__spinner",
|
|
4932
4825
|
"aria-hidden": "true"
|
|
4933
|
-
},
|
|
4826
|
+
}, Qi = {
|
|
4934
4827
|
key: 2,
|
|
4935
4828
|
class: "wm-form__doneLbl"
|
|
4936
4829
|
};
|
|
4937
|
-
function
|
|
4938
|
-
const a =
|
|
4939
|
-
return c(), d("div",
|
|
4940
|
-
l("div",
|
|
4941
|
-
l("div",
|
|
4942
|
-
|
|
4830
|
+
function Zi(e, t, s, r, i, n) {
|
|
4831
|
+
const a = P("AIAvatar");
|
|
4832
|
+
return c(), d("div", Ri, [
|
|
4833
|
+
l("div", Li, [
|
|
4834
|
+
l("div", Ei, [
|
|
4835
|
+
W(a, {
|
|
4943
4836
|
size: 24,
|
|
4944
4837
|
name: s.agentName,
|
|
4945
4838
|
"image-url": s.agentAvatarUrl
|
|
4946
4839
|
}, null, 8, ["name", "image-url"])
|
|
4947
4840
|
]),
|
|
4948
|
-
l("div",
|
|
4949
|
-
l("div",
|
|
4950
|
-
s.form.description ? (c(), d("div",
|
|
4841
|
+
l("div", Bi, [
|
|
4842
|
+
l("div", Ii, y(s.form.title || n.t("form.title")), 1),
|
|
4843
|
+
s.form.description ? (c(), d("div", Pi, y(s.form.description), 1)) : k("", !0)
|
|
4951
4844
|
])
|
|
4952
4845
|
]),
|
|
4953
4846
|
l("form", {
|
|
4954
4847
|
class: "wm-form__body",
|
|
4955
|
-
onSubmit: t[0] || (t[0] =
|
|
4848
|
+
onSubmit: t[0] || (t[0] = Y((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
|
|
4956
4849
|
}, [
|
|
4957
|
-
(c(!0), d(
|
|
4850
|
+
(c(!0), d(B, null, N(n.normalizedFields, (o) => (c(), d("div", {
|
|
4958
4851
|
key: o.key,
|
|
4959
4852
|
class: "wm-form__field"
|
|
4960
4853
|
}, [
|
|
@@ -4962,10 +4855,10 @@ function da(e, t, s, r, i, n) {
|
|
|
4962
4855
|
for: `wm-f-${i._uid}-${o.key}`,
|
|
4963
4856
|
class: "wm-form__label"
|
|
4964
4857
|
}, [
|
|
4965
|
-
Se(
|
|
4966
|
-
o.required ? (c(), d("span",
|
|
4967
|
-
], 8,
|
|
4968
|
-
o.type === "text" ?
|
|
4858
|
+
Se(y(o.label), 1),
|
|
4859
|
+
o.required ? (c(), d("span", Ui, "*")) : k("", !0)
|
|
4860
|
+
], 8, Di),
|
|
4861
|
+
o.type === "text" ? $((c(), d("input", {
|
|
4969
4862
|
key: 0,
|
|
4970
4863
|
id: `wm-f-${i._uid}-${o.key}`,
|
|
4971
4864
|
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
@@ -4974,9 +4867,9 @@ function da(e, t, s, r, i, n) {
|
|
|
4974
4867
|
placeholder: o.placeholder || "",
|
|
4975
4868
|
required: o.required,
|
|
4976
4869
|
disabled: s.readOnly || i.busy
|
|
4977
|
-
}, null, 8,
|
|
4978
|
-
[
|
|
4979
|
-
]) : o.type === "textarea" ?
|
|
4870
|
+
}, null, 8, Ni)), [
|
|
4871
|
+
[se, i.values[o.key]]
|
|
4872
|
+
]) : o.type === "textarea" ? $((c(), d("textarea", {
|
|
4980
4873
|
key: 1,
|
|
4981
4874
|
id: `wm-f-${i._uid}-${o.key}`,
|
|
4982
4875
|
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
@@ -4985,9 +4878,9 @@ function da(e, t, s, r, i, n) {
|
|
|
4985
4878
|
placeholder: o.placeholder || "",
|
|
4986
4879
|
required: o.required,
|
|
4987
4880
|
disabled: s.readOnly || i.busy
|
|
4988
|
-
}, null, 8,
|
|
4989
|
-
[
|
|
4990
|
-
]) : o.type === "number" ?
|
|
4881
|
+
}, null, 8, Fi)), [
|
|
4882
|
+
[se, i.values[o.key]]
|
|
4883
|
+
]) : o.type === "number" ? $((c(), d("input", {
|
|
4991
4884
|
key: 2,
|
|
4992
4885
|
id: `wm-f-${i._uid}-${o.key}`,
|
|
4993
4886
|
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
@@ -4996,14 +4889,14 @@ function da(e, t, s, r, i, n) {
|
|
|
4996
4889
|
placeholder: o.placeholder || "",
|
|
4997
4890
|
required: o.required,
|
|
4998
4891
|
disabled: s.readOnly || i.busy
|
|
4999
|
-
}, null, 8,
|
|
4892
|
+
}, null, 8, Hi)), [
|
|
5000
4893
|
[
|
|
5001
|
-
|
|
4894
|
+
se,
|
|
5002
4895
|
i.values[o.key],
|
|
5003
4896
|
void 0,
|
|
5004
4897
|
{ number: !0 }
|
|
5005
4898
|
]
|
|
5006
|
-
]) : o.type === "date" ?
|
|
4899
|
+
]) : o.type === "date" ? $((c(), d("input", {
|
|
5007
4900
|
key: 3,
|
|
5008
4901
|
id: `wm-f-${i._uid}-${o.key}`,
|
|
5009
4902
|
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
@@ -5011,19 +4904,19 @@ function da(e, t, s, r, i, n) {
|
|
|
5011
4904
|
class: "wm-form__input",
|
|
5012
4905
|
required: o.required,
|
|
5013
4906
|
disabled: s.readOnly || i.busy
|
|
5014
|
-
}, null, 8,
|
|
5015
|
-
[
|
|
5016
|
-
]) : o.type === "boolean" ? (c(), d("label",
|
|
5017
|
-
|
|
4907
|
+
}, null, 8, ji)), [
|
|
4908
|
+
[se, i.values[o.key]]
|
|
4909
|
+
]) : o.type === "boolean" ? (c(), d("label", zi, [
|
|
4910
|
+
$(l("input", {
|
|
5018
4911
|
id: `wm-f-${i._uid}-${o.key}`,
|
|
5019
4912
|
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
5020
4913
|
type: "checkbox",
|
|
5021
4914
|
disabled: s.readOnly || i.busy
|
|
5022
|
-
}, null, 8,
|
|
4915
|
+
}, null, 8, qi), [
|
|
5023
4916
|
[$e, i.values[o.key]]
|
|
5024
4917
|
]),
|
|
5025
|
-
l("span", null,
|
|
5026
|
-
])) : o.type === "select" ?
|
|
4918
|
+
l("span", null, y(o.placeholder || n.t("common.yes")), 1)
|
|
4919
|
+
])) : o.type === "select" ? $((c(), d("select", {
|
|
5027
4920
|
key: 5,
|
|
5028
4921
|
id: `wm-f-${i._uid}-${o.key}`,
|
|
5029
4922
|
"onUpdate:modelValue": (f) => i.values[o.key] = f,
|
|
@@ -5031,15 +4924,15 @@ function da(e, t, s, r, i, n) {
|
|
|
5031
4924
|
required: o.required,
|
|
5032
4925
|
disabled: s.readOnly || i.busy
|
|
5033
4926
|
}, [
|
|
5034
|
-
l("option",
|
|
5035
|
-
(c(!0), d(
|
|
4927
|
+
l("option", Ki, y(o.placeholder || n.t("form.choose")), 1),
|
|
4928
|
+
(c(!0), d(B, null, N(o.options, (f) => (c(), d("option", {
|
|
5036
4929
|
key: f.value,
|
|
5037
4930
|
value: f.value
|
|
5038
|
-
},
|
|
5039
|
-
], 8,
|
|
4931
|
+
}, y(f.label), 9, Wi))), 128))
|
|
4932
|
+
], 8, Vi)), [
|
|
5040
4933
|
[Ge, i.values[o.key]]
|
|
5041
|
-
]) : o.type === "multiselect" ? (c(), d("div",
|
|
5042
|
-
(c(!0), d(
|
|
4934
|
+
]) : o.type === "multiselect" ? (c(), d("div", $i, [
|
|
4935
|
+
(c(!0), d(B, null, N(o.options, (f) => (c(), d("label", {
|
|
5043
4936
|
key: f.value,
|
|
5044
4937
|
class: "wm-form__multiItem"
|
|
5045
4938
|
}, [
|
|
@@ -5053,25 +4946,25 @@ function da(e, t, s, r, i, n) {
|
|
|
5053
4946
|
f.value,
|
|
5054
4947
|
b.target.checked
|
|
5055
4948
|
)
|
|
5056
|
-
}, null, 40,
|
|
5057
|
-
l("span", null,
|
|
4949
|
+
}, null, 40, Gi),
|
|
4950
|
+
l("span", null, y(f.label), 1)
|
|
5058
4951
|
]))), 128))
|
|
5059
4952
|
])) : k("", !0)
|
|
5060
4953
|
]))), 128)),
|
|
5061
|
-
i.error ? (c(), d("div",
|
|
5062
|
-
s.readOnly ? (c(), d("div",
|
|
4954
|
+
i.error ? (c(), d("div", Yi, y(i.error), 1)) : k("", !0),
|
|
4955
|
+
s.readOnly ? (c(), d("div", Qi, y(n.t("form.responseSent")), 1)) : (c(), d("button", {
|
|
5063
4956
|
key: 1,
|
|
5064
4957
|
type: "submit",
|
|
5065
4958
|
class: "wm-form__submit",
|
|
5066
4959
|
disabled: i.busy
|
|
5067
4960
|
}, [
|
|
5068
|
-
i.busy ? (c(), d("span",
|
|
5069
|
-
l("span", null,
|
|
5070
|
-
], 8,
|
|
4961
|
+
i.busy ? (c(), d("span", Xi)) : k("", !0),
|
|
4962
|
+
l("span", null, y(i.busy ? n.t("common.sending") : s.form.submit_label || n.t("common.send")), 1)
|
|
4963
|
+
], 8, Ji))
|
|
5071
4964
|
], 32)
|
|
5072
4965
|
]);
|
|
5073
4966
|
}
|
|
5074
|
-
const
|
|
4967
|
+
const ea = /* @__PURE__ */ D(Oi, [["render", Zi], ["__scopeId", "data-v-fe65cc56"]]), ta = {
|
|
5075
4968
|
name: "WmFeedback",
|
|
5076
4969
|
inject: {
|
|
5077
4970
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5105,13 +4998,13 @@ const ua = /* @__PURE__ */ N(Fi, [["render", da], ["__scopeId", "data-v-fe65cc56
|
|
|
5105
4998
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
5106
4999
|
}
|
|
5107
5000
|
}
|
|
5108
|
-
},
|
|
5001
|
+
}, na = { class: "wm-fb" }, sa = { class: "wm-fb__title" }, ra = { class: "wm-fb__sub" }, ia = { class: "wm-fb__row" }, aa = ["onClick"], oa = { class: "wm-fb__emoji" }, la = { class: "wm-fb__label" }, ca = ["disabled"], da = {
|
|
5109
5002
|
key: 1,
|
|
5110
5003
|
class: "wm-fb__done"
|
|
5111
|
-
},
|
|
5112
|
-
function
|
|
5113
|
-
return c(), d("div",
|
|
5114
|
-
s.done ? (c(), d("div",
|
|
5004
|
+
}, ua = { class: "wm-fb__doneTitle" }, ma = { class: "wm-fb__doneSub" };
|
|
5005
|
+
function ha(e, t, s, r, i, n) {
|
|
5006
|
+
return c(), d("div", na, [
|
|
5007
|
+
s.done ? (c(), d("div", da, [
|
|
5115
5008
|
t[1] || (t[1] = l("div", { class: "wm-fb__check" }, [
|
|
5116
5009
|
l("svg", {
|
|
5117
5010
|
width: "16",
|
|
@@ -5127,32 +5020,32 @@ function Aa(e, t, s, r, i, n) {
|
|
|
5127
5020
|
l("path", { d: "M20 6L9 17l-5-5" })
|
|
5128
5021
|
])
|
|
5129
5022
|
], -1)),
|
|
5130
|
-
l("div",
|
|
5131
|
-
l("div",
|
|
5132
|
-
])) : (c(), d(
|
|
5133
|
-
l("div",
|
|
5134
|
-
l("div",
|
|
5135
|
-
l("div",
|
|
5136
|
-
(c(!0), d(
|
|
5023
|
+
l("div", ua, y(n.t("feedback.doneTitle")), 1),
|
|
5024
|
+
l("div", ma, y(n.t("feedback.doneSubtitle")), 1)
|
|
5025
|
+
])) : (c(), d(B, { key: 0 }, [
|
|
5026
|
+
l("div", sa, y(n.t("feedback.question")), 1),
|
|
5027
|
+
l("div", ra, y(n.t("feedback.subtitle")), 1),
|
|
5028
|
+
l("div", ia, [
|
|
5029
|
+
(c(!0), d(B, null, N(n.options, (a) => (c(), d("button", {
|
|
5137
5030
|
key: a.v,
|
|
5138
5031
|
type: "button",
|
|
5139
|
-
class:
|
|
5032
|
+
class: L(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
|
|
5140
5033
|
onClick: (o) => i.sel = a.v
|
|
5141
5034
|
}, [
|
|
5142
|
-
l("span",
|
|
5143
|
-
l("span",
|
|
5144
|
-
], 10,
|
|
5035
|
+
l("span", oa, y(a.e), 1),
|
|
5036
|
+
l("span", la, y(a.l), 1)
|
|
5037
|
+
], 10, aa))), 128))
|
|
5145
5038
|
]),
|
|
5146
5039
|
l("button", {
|
|
5147
5040
|
type: "button",
|
|
5148
5041
|
class: "wm-fb__send",
|
|
5149
5042
|
disabled: !i.sel || s.busy,
|
|
5150
5043
|
onClick: t[0] || (t[0] = (...a) => n.onSend && n.onSend(...a))
|
|
5151
|
-
},
|
|
5044
|
+
}, y(s.busy ? n.t("common.sending") : n.t("feedback.submit")), 9, ca)
|
|
5152
5045
|
], 64))
|
|
5153
5046
|
]);
|
|
5154
5047
|
}
|
|
5155
|
-
const
|
|
5048
|
+
const fa = /* @__PURE__ */ D(ta, [["render", ha], ["__scopeId", "data-v-9b630564"]]), _a = {
|
|
5156
5049
|
name: "WmMoreMenu",
|
|
5157
5050
|
inject: {
|
|
5158
5051
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5187,24 +5080,24 @@ const Sa = /* @__PURE__ */ N(ha, [["render", Aa], ["__scopeId", "data-v-9b630564
|
|
|
5187
5080
|
this.soundOn = !this.soundOn, this.$emit("sound-toggle", this.soundOn);
|
|
5188
5081
|
}
|
|
5189
5082
|
}
|
|
5190
|
-
},
|
|
5083
|
+
}, ga = { class: "wm-mm" }, ya = {
|
|
5191
5084
|
class: "wm-mm__pop",
|
|
5192
5085
|
role: "menu"
|
|
5193
|
-
},
|
|
5086
|
+
}, va = {
|
|
5194
5087
|
key: 0,
|
|
5195
5088
|
class: "wm-mm__section"
|
|
5196
|
-
},
|
|
5089
|
+
}, pa = { class: "wm-mm__label" }, wa = { class: "wm-mm__label" }, ba = {
|
|
5197
5090
|
key: 1,
|
|
5198
5091
|
class: "wm-mm__sep"
|
|
5199
|
-
},
|
|
5200
|
-
function
|
|
5201
|
-
return c(), d("div",
|
|
5092
|
+
}, ka = { class: "wm-mm__section" }, Ca = { class: "wm-mm__label" }, Aa = { class: "wm-mm__section" }, Sa = { class: "wm-mm__label" }, Ma = { class: "wm-mm__label" };
|
|
5093
|
+
function Ta(e, t, s, r, i, n) {
|
|
5094
|
+
return c(), d("div", ga, [
|
|
5202
5095
|
l("div", {
|
|
5203
5096
|
class: "wm-mm__scrim",
|
|
5204
5097
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
5205
5098
|
}),
|
|
5206
|
-
l("div",
|
|
5207
|
-
s.canRename || s.canExport ? (c(), d("div",
|
|
5099
|
+
l("div", ya, [
|
|
5100
|
+
s.canRename || s.canExport ? (c(), d("div", va, [
|
|
5208
5101
|
s.canRename ? (c(), d("button", {
|
|
5209
5102
|
key: 0,
|
|
5210
5103
|
type: "button",
|
|
@@ -5227,7 +5120,7 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5227
5120
|
l("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
5228
5121
|
])
|
|
5229
5122
|
], -1)),
|
|
5230
|
-
l("span",
|
|
5123
|
+
l("span", pa, y(n.t("moreMenu.editTitle")), 1)
|
|
5231
5124
|
])) : k("", !0),
|
|
5232
5125
|
s.canExport ? (c(), d("button", {
|
|
5233
5126
|
key: 1,
|
|
@@ -5250,12 +5143,12 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5250
5143
|
l("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
5251
5144
|
])
|
|
5252
5145
|
], -1)),
|
|
5253
|
-
l("span",
|
|
5146
|
+
l("span", wa, y(n.t("moreMenu.exportTranscript")), 1),
|
|
5254
5147
|
t[8] || (t[8] = l("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
5255
5148
|
])) : k("", !0)
|
|
5256
5149
|
])) : k("", !0),
|
|
5257
|
-
s.canRename || s.canExport ? (c(), d("div",
|
|
5258
|
-
l("div",
|
|
5150
|
+
s.canRename || s.canExport ? (c(), d("div", ba)) : k("", !0),
|
|
5151
|
+
l("div", ka, [
|
|
5259
5152
|
l("button", {
|
|
5260
5153
|
type: "button",
|
|
5261
5154
|
class: "wm-mm__item",
|
|
@@ -5277,16 +5170,16 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5277
5170
|
l("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
5278
5171
|
])
|
|
5279
5172
|
], -1)),
|
|
5280
|
-
l("span",
|
|
5173
|
+
l("span", Ca, y(n.t("moreMenu.sound")), 1),
|
|
5281
5174
|
l("span", {
|
|
5282
|
-
class:
|
|
5175
|
+
class: L(["wm-mm__toggle", { "wm-mm__toggle--on": i.soundOn }])
|
|
5283
5176
|
}, [...t[9] || (t[9] = [
|
|
5284
5177
|
l("span", { class: "wm-mm__knob" }, null, -1)
|
|
5285
5178
|
])], 2)
|
|
5286
5179
|
])
|
|
5287
5180
|
]),
|
|
5288
5181
|
t[13] || (t[13] = l("div", { class: "wm-mm__sep" }, null, -1)),
|
|
5289
|
-
l("div",
|
|
5182
|
+
l("div", Aa, [
|
|
5290
5183
|
s.statusUrl ? (c(), d("button", {
|
|
5291
5184
|
key: 0,
|
|
5292
5185
|
type: "button",
|
|
@@ -5308,7 +5201,7 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5308
5201
|
l("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
5309
5202
|
])
|
|
5310
5203
|
], -1)),
|
|
5311
|
-
l("span",
|
|
5204
|
+
l("span", Sa, y(n.t("moreMenu.serviceStatus")), 1)
|
|
5312
5205
|
])) : k("", !0),
|
|
5313
5206
|
s.helpUrl ? (c(), d("button", {
|
|
5314
5207
|
key: 1,
|
|
@@ -5331,13 +5224,13 @@ function Ua(e, t, s, r, i, n) {
|
|
|
5331
5224
|
l("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
|
|
5332
5225
|
])
|
|
5333
5226
|
], -1)),
|
|
5334
|
-
l("span",
|
|
5227
|
+
l("span", Ma, y(n.t("moreMenu.helpCenter")), 1)
|
|
5335
5228
|
])) : k("", !0)
|
|
5336
5229
|
])
|
|
5337
5230
|
])
|
|
5338
5231
|
]);
|
|
5339
5232
|
}
|
|
5340
|
-
const
|
|
5233
|
+
const xa = /* @__PURE__ */ D(_a, [["render", Ta], ["__scopeId", "data-v-4cf6d578"]]), Oa = {
|
|
5341
5234
|
name: "WmRenameDialog",
|
|
5342
5235
|
inject: {
|
|
5343
5236
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5379,20 +5272,20 @@ const ja = /* @__PURE__ */ N(Ta, [["render", Ua], ["__scopeId", "data-v-4cf6d578
|
|
|
5379
5272
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
5380
5273
|
}
|
|
5381
5274
|
}
|
|
5382
|
-
},
|
|
5275
|
+
}, Ra = { class: "wm-dialog" }, La = {
|
|
5383
5276
|
class: "wm-dialog__card",
|
|
5384
5277
|
role: "dialog",
|
|
5385
5278
|
"aria-modal": "true"
|
|
5386
|
-
},
|
|
5387
|
-
function
|
|
5388
|
-
return c(), d("div",
|
|
5279
|
+
}, Ea = { class: "wm-dialog__head" }, Ba = { class: "wm-dialog__title" }, Ia = ["aria-label"], Pa = { class: "wm-dialog__body" }, Da = ["placeholder"], Ua = { class: "wm-dialog__actions" }, Na = ["disabled"];
|
|
5280
|
+
function Fa(e, t, s, r, i, n) {
|
|
5281
|
+
return c(), d("div", Ra, [
|
|
5389
5282
|
l("div", {
|
|
5390
5283
|
class: "wm-dialog__scrim",
|
|
5391
5284
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
5392
5285
|
}),
|
|
5393
|
-
l("div",
|
|
5394
|
-
l("div",
|
|
5395
|
-
l("div",
|
|
5286
|
+
l("div", La, [
|
|
5287
|
+
l("div", Ea, [
|
|
5288
|
+
l("div", Ba, y(s.title || n.t("rename.title")), 1),
|
|
5396
5289
|
l("button", {
|
|
5397
5290
|
type: "button",
|
|
5398
5291
|
class: "wm-dialog__close",
|
|
@@ -5412,10 +5305,10 @@ function Ja(e, t, s, r, i, n) {
|
|
|
5412
5305
|
}, [
|
|
5413
5306
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5414
5307
|
], -1)
|
|
5415
|
-
])], 8,
|
|
5308
|
+
])], 8, Ia)
|
|
5416
5309
|
]),
|
|
5417
|
-
l("div",
|
|
5418
|
-
|
|
5310
|
+
l("div", Pa, [
|
|
5311
|
+
$(l("input", {
|
|
5419
5312
|
ref: "input",
|
|
5420
5313
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => i.value = a),
|
|
5421
5314
|
type: "text",
|
|
@@ -5423,50 +5316,48 @@ function Ja(e, t, s, r, i, n) {
|
|
|
5423
5316
|
placeholder: s.placeholder || n.t("rename.placeholder"),
|
|
5424
5317
|
maxlength: 120,
|
|
5425
5318
|
onKeydown: [
|
|
5426
|
-
t[3] || (t[3] =
|
|
5427
|
-
t[4] || (t[4] =
|
|
5319
|
+
t[3] || (t[3] = _e(Y((...a) => n.onSubmit && n.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
5320
|
+
t[4] || (t[4] = _e(Y((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
5428
5321
|
]
|
|
5429
|
-
}, null, 40,
|
|
5430
|
-
[
|
|
5322
|
+
}, null, 40, Da), [
|
|
5323
|
+
[se, i.value]
|
|
5431
5324
|
])
|
|
5432
5325
|
]),
|
|
5433
|
-
l("div",
|
|
5326
|
+
l("div", Ua, [
|
|
5434
5327
|
l("button", {
|
|
5435
5328
|
type: "button",
|
|
5436
5329
|
class: "wm-dialog__btn",
|
|
5437
5330
|
onClick: t[5] || (t[5] = (a) => e.$emit("close"))
|
|
5438
|
-
},
|
|
5331
|
+
}, y(n.t("common.cancel")), 1),
|
|
5439
5332
|
l("button", {
|
|
5440
5333
|
type: "button",
|
|
5441
5334
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
5442
5335
|
disabled: !n.canSubmit,
|
|
5443
5336
|
onClick: t[6] || (t[6] = (...a) => n.onSubmit && n.onSubmit(...a))
|
|
5444
|
-
},
|
|
5337
|
+
}, y(n.t("common.save")), 9, Na)
|
|
5445
5338
|
])
|
|
5446
5339
|
])
|
|
5447
5340
|
]);
|
|
5448
5341
|
}
|
|
5449
|
-
const
|
|
5342
|
+
const Ha = /* @__PURE__ */ D(Oa, [["render", Fa], ["__scopeId", "data-v-6d5f94a8"]]), Ue = "ww-messenger-tokens", ja = {
|
|
5450
5343
|
name: "Messenger",
|
|
5451
5344
|
components: {
|
|
5452
|
-
Launcher:
|
|
5453
|
-
Header:
|
|
5454
|
-
Onboarding:
|
|
5345
|
+
Launcher: qt,
|
|
5346
|
+
Header: _n,
|
|
5347
|
+
Onboarding: Jn,
|
|
5455
5348
|
History: ms,
|
|
5456
|
-
MessageList:
|
|
5457
|
-
Composer:
|
|
5458
|
-
|
|
5459
|
-
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
RenameDialog: Xa
|
|
5349
|
+
MessageList: ri,
|
|
5350
|
+
Composer: Ci,
|
|
5351
|
+
InlineCallbacks: Ti,
|
|
5352
|
+
FormCard: ea,
|
|
5353
|
+
Feedback: fa,
|
|
5354
|
+
MoreMenu: xa,
|
|
5355
|
+
RenameDialog: Ha
|
|
5464
5356
|
},
|
|
5465
5357
|
mixins: [
|
|
5466
5358
|
wt,
|
|
5467
5359
|
bt,
|
|
5468
|
-
|
|
5469
|
-
At
|
|
5360
|
+
Ct
|
|
5470
5361
|
],
|
|
5471
5362
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
5472
5363
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -5674,24 +5565,24 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
5674
5565
|
const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = this.revealedAt;
|
|
5675
5566
|
return this.allConversations.map((r) => {
|
|
5676
5567
|
var b;
|
|
5677
|
-
const i = e[r.id] || [], n =
|
|
5568
|
+
const i = e[r.id] || [], n = G(r.last_read_message_id);
|
|
5678
5569
|
let a = 0, o = null;
|
|
5679
|
-
for (let
|
|
5680
|
-
const
|
|
5681
|
-
if (!
|
|
5682
|
-
if (((b =
|
|
5683
|
-
const E =
|
|
5570
|
+
for (let v = i.length - 1; v >= 0; v--) {
|
|
5571
|
+
const M = i[v];
|
|
5572
|
+
if (!M) continue;
|
|
5573
|
+
if (((b = M.author) == null ? void 0 : b.type) === "user") break;
|
|
5574
|
+
const E = G(M.id);
|
|
5684
5575
|
if (E != null) {
|
|
5685
5576
|
if (n != null && E <= n) break;
|
|
5686
|
-
t[
|
|
5577
|
+
t[M.id] !== 0 && (!o && M.author && (o = M.author), a++);
|
|
5687
5578
|
}
|
|
5688
5579
|
}
|
|
5689
5580
|
if (!i.length) {
|
|
5690
|
-
const
|
|
5691
|
-
|
|
5581
|
+
const v = G(r.last_message_id);
|
|
5582
|
+
v != null && (n == null || v > n) && (a = 1, o = r.last_message_author || null);
|
|
5692
5583
|
}
|
|
5693
5584
|
const f = i.filter(
|
|
5694
|
-
(
|
|
5585
|
+
(v) => !((v == null ? void 0 : v.id) != null && t[v.id] === 0)
|
|
5695
5586
|
);
|
|
5696
5587
|
return {
|
|
5697
5588
|
...r,
|
|
@@ -5722,7 +5613,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
5722
5613
|
preview: s._preview || this.t("onboarding.newMessage"),
|
|
5723
5614
|
unread: !!s._unread,
|
|
5724
5615
|
author: s._lastAuthor || null,
|
|
5725
|
-
_ts:
|
|
5616
|
+
_ts: Ie(s, e[s.id] || [])
|
|
5726
5617
|
})).sort((s, r) => s._ts < r._ts ? 1 : s._ts > r._ts ? -1 : 0);
|
|
5727
5618
|
},
|
|
5728
5619
|
// Unread threads (one entry per conv with unseen agent/human
|
|
@@ -5734,7 +5625,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
5734
5625
|
const e = ((s = this.s) == null ? void 0 : s.messagesByConv) || {}, t = [];
|
|
5735
5626
|
for (const r of this.drawerConversations) {
|
|
5736
5627
|
if (!r._unread) continue;
|
|
5737
|
-
const i =
|
|
5628
|
+
const i = Ie(r, e[r.id] || []), n = r._lastAuthor, a = !n || n.type === "agent_ia", o = (n == null ? void 0 : n.name) || (a ? this.agentName : "") || "", f = (n == null ? void 0 : n.avatar_url) || (a ? this.agentAvatarUrl : null);
|
|
5738
5629
|
t.push({
|
|
5739
5630
|
convId: r.id,
|
|
5740
5631
|
preview: r._preview || this.t("notification.youHaveNewMessage"),
|
|
@@ -5913,8 +5804,8 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
5913
5804
|
if (!(a != null && a.loaded)) return t;
|
|
5914
5805
|
}
|
|
5915
5806
|
const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
|
|
5916
|
-
var o, f, b,
|
|
5917
|
-
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || me(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (
|
|
5807
|
+
var o, f, b, v, M;
|
|
5808
|
+
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || me(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((b = a == null ? void 0 : a.payload) == null ? void 0 : b.attachments) && a.payload.attachments.length || (v = a == null ? void 0 : a.metadata) != null && v.artifact || (M = a == null ? void 0 : a.metadata) != null && M.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((E) => (E == null ? void 0 : E.intent) === "submit_form") ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
|
|
5918
5809
|
});
|
|
5919
5810
|
return t.length ? [...t, ...r] : r;
|
|
5920
5811
|
},
|
|
@@ -5936,14 +5827,10 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
5936
5827
|
const e = (t = this.currentConv) == null ? void 0 : t.id;
|
|
5937
5828
|
return e ? ((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e]) || [] : [];
|
|
5938
5829
|
},
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
//
|
|
5943
|
-
// flottante (popover) au-dessus du composer, comme l'ApprovalCard. =
|
|
5944
|
-
// dernier message porteur de `metadata.resolution_request` dont les
|
|
5945
|
-
// callbacks ne sont pas encore consommés (le serveur les clear au clic)
|
|
5946
|
-
// et sans clic optimiste en vol.
|
|
5830
|
+
// Proposition de résolution (propose_resolution) : rendue en boutons
|
|
5831
|
+
// inline flottants au-dessus du composer. = dernier message porteur de
|
|
5832
|
+
// `metadata.resolution_request` dont les callbacks ne sont pas encore
|
|
5833
|
+
// consommés (le serveur les clear au clic) et sans clic optimiste en vol.
|
|
5947
5834
|
pendingResolution() {
|
|
5948
5835
|
var t, s, r, i, n;
|
|
5949
5836
|
if (!this.currentConv) return null;
|
|
@@ -5970,6 +5857,32 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
5970
5857
|
label: t[s.id] || s.label
|
|
5971
5858
|
}));
|
|
5972
5859
|
},
|
|
5860
|
+
// Dernière validation client de procédure en attente (step
|
|
5861
|
+
// `customerValidation` côté serveur → message agent public portant des
|
|
5862
|
+
// callbacks intent approve/reject, audience customer). Pilote une carte
|
|
5863
|
+
// de boutons. Détection par callbacks (pas de flag metadata dédié) ;
|
|
5864
|
+
// après le clic le serveur efface les callbacks → la carte disparaît.
|
|
5865
|
+
pendingApproval() {
|
|
5866
|
+
var t, s, r, i;
|
|
5867
|
+
if (!this.currentConv) return null;
|
|
5868
|
+
const e = ((s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id]) || [];
|
|
5869
|
+
for (let n = e.length - 1; n >= 0; n--) {
|
|
5870
|
+
const a = e[n];
|
|
5871
|
+
if (!(!Array.isArray(a == null ? void 0 : a.callbacks) || !a.callbacks.length || !a.callbacks.some(
|
|
5872
|
+
(f) => (f == null ? void 0 : f.intent) === "approve" && (f.audience ?? "customer") === "customer"
|
|
5873
|
+
)))
|
|
5874
|
+
return (i = (r = this.s) == null ? void 0 : r.awaitingCallback) != null && i[a.id] ? null : a;
|
|
5875
|
+
}
|
|
5876
|
+
return null;
|
|
5877
|
+
},
|
|
5878
|
+
// Boutons de la carte de validation : les callbacks approve/reject du
|
|
5879
|
+
// message (labels + styles posés par le serveur).
|
|
5880
|
+
approvalCallbacks() {
|
|
5881
|
+
const e = this.pendingApproval;
|
|
5882
|
+
return !e || !Array.isArray(e.callbacks) ? [] : e.callbacks.filter(
|
|
5883
|
+
(t) => (t == null ? void 0 : t.intent) === "approve" || (t == null ? void 0 : t.intent) === "reject"
|
|
5884
|
+
);
|
|
5885
|
+
},
|
|
5973
5886
|
// Statut courant de la conversation ouverte. Source FIABLE = le
|
|
5974
5887
|
// `conversation_status` estampillé sur le dernier message reçu (canal
|
|
5975
5888
|
// messages, robuste, aligné avec l'archi serveur). Le champ
|
|
@@ -5977,27 +5890,6 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
5977
5890
|
currentStatus() {
|
|
5978
5891
|
return this.convStatus(this.currentConv);
|
|
5979
5892
|
},
|
|
5980
|
-
// The approval card sits on top of the chat as an overlay. It must
|
|
5981
|
-
// appear only once the conversation has visibly settled, never
|
|
5982
|
-
// alongside typing dots or before the explaining bubble. See
|
|
5983
|
-
// `approvalPacing` mixin for the settle / latch semantics.
|
|
5984
|
-
approvalReady() {
|
|
5985
|
-
return this.pendingApproval ? this.pendingApproval.id === this.approvalLatchId ? !0 : !(this.streamingActive || !this.approvalSettled) : !1;
|
|
5986
|
-
},
|
|
5987
|
-
approvalTitle() {
|
|
5988
|
-
var e, t, s;
|
|
5989
|
-
return ((t = (e = this.pendingApproval) == null ? void 0 : e.payload) == null ? void 0 : t.name) || ((s = this.pendingApproval) == null ? void 0 : s.text_md) || this.t("action.title");
|
|
5990
|
-
},
|
|
5991
|
-
approvalDetail() {
|
|
5992
|
-
var r, i, n, a, o, f;
|
|
5993
|
-
const e = (n = (i = (r = this.pendingApproval) == null ? void 0 : r.payload) == null ? void 0 : i.pending) == null ? void 0 : n.user_explanation;
|
|
5994
|
-
if (typeof e == "string" && e.trim())
|
|
5995
|
-
return e.trim();
|
|
5996
|
-
const t = (f = (o = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : o.pending) == null ? void 0 : f.prepared_params;
|
|
5997
|
-
if (!t || typeof t != "object") return "";
|
|
5998
|
-
const s = Object.entries(t);
|
|
5999
|
-
return s.length ? s.slice(0, 2).map(([b, y]) => `${b}: ${y}`).join(" · ") : "";
|
|
6000
|
-
},
|
|
6001
5893
|
actionInFlight() {
|
|
6002
5894
|
var e, t;
|
|
6003
5895
|
return !this.currentConv || !this.store ? null : ((t = (e = this.store).getActionInFlight) == null ? void 0 : t.call(e, this.currentConv.id)) || null;
|
|
@@ -6021,8 +5913,8 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6021
5913
|
return e ? e._draft ? !0 : (((r = (s = this.s) == null ? void 0 : s.messagesByConv) == null ? void 0 : r[e.id]) || []).length === 0 : !1;
|
|
6022
5914
|
},
|
|
6023
5915
|
// Maps `widget.starter_prompts` ({ title, message }) into the
|
|
6024
|
-
//
|
|
6025
|
-
// the server-issued
|
|
5916
|
+
// InlineCallbacks item shape so they render alongside / in place of
|
|
5917
|
+
// the server-issued inline suggestions. `text` carries the
|
|
6026
5918
|
// payload sent on click (the prompt's `message` field), with
|
|
6027
5919
|
// the user-visible `title` used as a defensive fallback when
|
|
6028
5920
|
// a malformed entry is missing `message`.
|
|
@@ -6045,13 +5937,12 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6045
5937
|
return t;
|
|
6046
5938
|
},
|
|
6047
5939
|
// Dernier formulaire `request_form` actif sur la conv. Pilote la
|
|
6048
|
-
// FormCard.
|
|
6049
|
-
// `
|
|
6050
|
-
//
|
|
6051
|
-
// d'une bulle en cours d'écriture.
|
|
5940
|
+
// FormCard. Priorité gérée dans `floatVisible`. Gating sur
|
|
5941
|
+
// `streamingActive` pour ne pas surgir au-dessus d'une bulle en
|
|
5942
|
+
// cours d'écriture.
|
|
6052
5943
|
pendingForm() {
|
|
6053
5944
|
var e, t;
|
|
6054
|
-
return !this.currentConv || !this.store || this.
|
|
5945
|
+
return !this.currentConv || !this.store || this.actionInFlight || this.streamingActive ? null : ((t = (e = this.store).getLatestForm) == null ? void 0 : t.call(e, this.currentConv.id)) || null;
|
|
6055
5946
|
},
|
|
6056
5947
|
showFeedback() {
|
|
6057
5948
|
var t;
|
|
@@ -6059,7 +5950,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6059
5950
|
return !e || this.currentStatus !== "resolved" ? !1 : this.feedbackDone[e.id] ? !0 : !((t = e.metadata) != null && t.feedback);
|
|
6060
5951
|
},
|
|
6061
5952
|
floatVisible() {
|
|
6062
|
-
return this.
|
|
5953
|
+
return !!this.pendingApproval || !!this.pendingResolution || !!this.pendingForm || this.showFeedback || this.suggestions.length > 0;
|
|
6063
5954
|
},
|
|
6064
5955
|
dateLabel() {
|
|
6065
5956
|
var s, r, i;
|
|
@@ -6073,7 +5964,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6073
5964
|
}
|
|
6074
5965
|
}
|
|
6075
5966
|
return this.t("messageList.today", {
|
|
6076
|
-
time: Ce(t,
|
|
5967
|
+
time: Ce(t, re(this.locale))
|
|
6077
5968
|
});
|
|
6078
5969
|
},
|
|
6079
5970
|
// Pagination state for the active conversation. Drives the
|
|
@@ -6113,7 +6004,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6113
6004
|
"currentConv.id": {
|
|
6114
6005
|
handler(e) {
|
|
6115
6006
|
var t;
|
|
6116
|
-
this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.
|
|
6007
|
+
this.resetRevealQueue(), this.convOpenedAt = Date.now(), this.moreOpen = !1, this.renameDialogOpen = !1, this.isViewingThread && (this.unreadAnchorId = G(
|
|
6117
6008
|
(t = this.currentConv) == null ? void 0 : t.last_read_message_id
|
|
6118
6009
|
), this.unreadBoundaryTs = e ? (/* @__PURE__ */ new Date()).toISOString() : ""), e && this.scheduleWelcomeReveal(e);
|
|
6119
6010
|
},
|
|
@@ -6125,40 +6016,10 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6125
6016
|
// render.
|
|
6126
6017
|
isViewingThread(e, t) {
|
|
6127
6018
|
var s;
|
|
6128
|
-
e && !t ? (this.unreadAnchorId =
|
|
6019
|
+
e && !t ? (this.unreadAnchorId = G(
|
|
6129
6020
|
(s = this.currentConv) == null ? void 0 : s.last_read_message_id
|
|
6130
6021
|
), this.unreadBoundaryTs = (/* @__PURE__ */ new Date()).toISOString()) : e || (this.unreadAnchorId = null, this.unreadBoundaryTs = "");
|
|
6131
6022
|
},
|
|
6132
|
-
// Fresh `pendingApproval` arrival : kick off the settle debounce so
|
|
6133
|
-
// the card waits for the conversation to go quiet. Historical
|
|
6134
|
-
// approvals (page reload, conv switch on a thread that already had
|
|
6135
|
-
// a pending action) bypass the wait — there's nothing to pace, the
|
|
6136
|
-
// user expects to see it on landing.
|
|
6137
|
-
pendingApproval: {
|
|
6138
|
-
handler(e, t) {
|
|
6139
|
-
if (e && !t) {
|
|
6140
|
-
const s = e != null && e.created_at ? Date.parse(e.created_at) : NaN;
|
|
6141
|
-
if (!(Number.isFinite(s) && s >= this.convOpenedAt)) {
|
|
6142
|
-
this.resetApprovalPacing();
|
|
6143
|
-
return;
|
|
6144
|
-
}
|
|
6145
|
-
this.bumpApprovalSettle(2600);
|
|
6146
|
-
} else !e && t && this.resetApprovalPacing();
|
|
6147
|
-
},
|
|
6148
|
-
immediate: !1
|
|
6149
|
-
},
|
|
6150
|
-
// Every flip of streamingActive while an approval is pending resets
|
|
6151
|
-
// the settle clock. This is what makes the card wait through the
|
|
6152
|
-
// entire burst : action queue → typing → bubble → maybe another
|
|
6153
|
-
// bubble → finally quiet → settle fires → card reveals.
|
|
6154
|
-
streamingActive(e, t) {
|
|
6155
|
-
e !== t && this.pendingApproval && this.pendingApproval.id !== this.approvalLatchId && this.bumpApprovalSettle();
|
|
6156
|
-
},
|
|
6157
|
-
// Once the card is cleared to show, latch it to that action id so a
|
|
6158
|
-
// late bubble in the same burst can't toggle it back off.
|
|
6159
|
-
approvalReady(e) {
|
|
6160
|
-
e && this.pendingApproval && (this.approvalLatchId = this.pendingApproval.id);
|
|
6161
|
-
},
|
|
6162
6023
|
// Track the floating overlay (chips / approval / feedback) so we can
|
|
6163
6024
|
// reserve matching bottom space in the MessageList — otherwise the
|
|
6164
6025
|
// last message lands behind the overlay.
|
|
@@ -6178,14 +6039,14 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6178
6039
|
}
|
|
6179
6040
|
},
|
|
6180
6041
|
async mounted() {
|
|
6181
|
-
if (typeof document < "u" && !document.getElementById(
|
|
6042
|
+
if (typeof document < "u" && !document.getElementById(Ue)) {
|
|
6182
6043
|
const e = document.createElement("style");
|
|
6183
|
-
e.id =
|
|
6044
|
+
e.id = Ue, e.textContent = it, document.head.appendChild(e);
|
|
6184
6045
|
}
|
|
6185
6046
|
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());
|
|
6186
6047
|
},
|
|
6187
6048
|
beforeUnmount() {
|
|
6188
|
-
this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.cancelWelcomeTimers(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.
|
|
6049
|
+
this._parentMessageHandler && (window.removeEventListener("message", this._parentMessageHandler), this._parentMessageHandler = null), this._launcherRo && (this._launcherRo.disconnect(), this._launcherRo = null), this.cancelReveals(), this.cancelWelcomeTimers(), this.teardownLiveReveal(), this.disconnectFloatRO(), this.teardownNotifications(), this.store && this.store.destroy();
|
|
6189
6050
|
},
|
|
6190
6051
|
methods: {
|
|
6191
6052
|
// Statut effectif d'une conversation : le `conversation_status`
|
|
@@ -6360,21 +6221,21 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6360
6221
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
6361
6222
|
},
|
|
6362
6223
|
sendCurrentLauncherSize() {
|
|
6363
|
-
var
|
|
6224
|
+
var v, M, E, S, z, T, U;
|
|
6364
6225
|
if (this.isOpen) return;
|
|
6365
|
-
const e = (
|
|
6226
|
+
const e = (M = (v = this.$el) == null ? void 0 : v.querySelector) == null ? void 0 : M.call(v, ".wm-launcherWrap");
|
|
6366
6227
|
if (!e) return;
|
|
6367
6228
|
const t = e.getBoundingClientRect();
|
|
6368
6229
|
if (!t.width || !t.height) return;
|
|
6369
|
-
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (
|
|
6230
|
+
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (z = (S = this.$el) == null ? void 0 : S.querySelector) == null ? void 0 : z.call(S, ".wm-launcher"), o = (U = (T = this.$el) == null ? void 0 : T.querySelectorAll) == null ? void 0 : U.call(T, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
|
|
6370
6231
|
let b = null;
|
|
6371
6232
|
if (f) {
|
|
6372
|
-
const
|
|
6233
|
+
const x = f.getBoundingClientRect();
|
|
6373
6234
|
b = {
|
|
6374
|
-
width: Math.ceil(
|
|
6375
|
-
height: Math.ceil(
|
|
6376
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
6377
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
6235
|
+
width: Math.ceil(x.width),
|
|
6236
|
+
height: Math.ceil(x.height),
|
|
6237
|
+
rightOffset: Math.max(0, Math.ceil(t.right - x.right)),
|
|
6238
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - x.bottom))
|
|
6378
6239
|
};
|
|
6379
6240
|
}
|
|
6380
6241
|
this.notifyParentResize("closed", {
|
|
@@ -6564,7 +6425,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6564
6425
|
this.openRenameDialog();
|
|
6565
6426
|
break;
|
|
6566
6427
|
case "export":
|
|
6567
|
-
|
|
6428
|
+
pt(
|
|
6568
6429
|
this.currentConv,
|
|
6569
6430
|
this.currentConv ? (s = (t = this.s) == null ? void 0 : t.messagesByConv) == null ? void 0 : s[this.currentConv.id] : [],
|
|
6570
6431
|
this.translator,
|
|
@@ -6572,14 +6433,14 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6572
6433
|
);
|
|
6573
6434
|
break;
|
|
6574
6435
|
case "status":
|
|
6575
|
-
if (
|
|
6436
|
+
if (fe(this.statusUrl))
|
|
6576
6437
|
try {
|
|
6577
6438
|
window.open(this.statusUrl, "_blank", "noopener");
|
|
6578
6439
|
} catch {
|
|
6579
6440
|
}
|
|
6580
6441
|
break;
|
|
6581
6442
|
case "help":
|
|
6582
|
-
if (
|
|
6443
|
+
if (fe(this.helpUrl))
|
|
6583
6444
|
try {
|
|
6584
6445
|
window.open(this.helpUrl, "_blank", "noopener");
|
|
6585
6446
|
} catch {
|
|
@@ -6626,18 +6487,25 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6626
6487
|
const e = (t = this.currentConv) == null ? void 0 : t.id;
|
|
6627
6488
|
!e || !this.store || await this.store.loadMore(e);
|
|
6628
6489
|
},
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
async
|
|
6490
|
+
// Clic sur un bouton de résolution (Oui / Pas encore). `cb` est
|
|
6491
|
+
// l'objet callback émis par InlineCallbacks → round-trip par `cb.id`.
|
|
6492
|
+
// Le serveur dispatche par `intent` (resolve = clôture déterministe ;
|
|
6493
|
+
// send_message = relance un tour) et consomme les callbacks.
|
|
6494
|
+
async onResolutionSelect(e) {
|
|
6634
6495
|
const t = this.pendingResolution;
|
|
6635
|
-
t && await this.store.clickCallback(t.id, e);
|
|
6496
|
+
!t || !(e != null && e.id) || await this.store.clickCallback(t.id, e.id);
|
|
6497
|
+
},
|
|
6498
|
+
// Clic sur un bouton de validation client (Confirmer / Annuler). `cb`
|
|
6499
|
+
// est le callback émis par InlineCallbacks → round-trip par `cb.id` ;
|
|
6500
|
+
// le serveur dispatche par intent approve/reject (reprise de procédure).
|
|
6501
|
+
async onApprovalSelect(e) {
|
|
6502
|
+
const t = this.pendingApproval;
|
|
6503
|
+
!t || !(e != null && e.id) || await this.store.clickCallback(t.id, e.id);
|
|
6636
6504
|
},
|
|
6637
6505
|
async onFormSubmit({ values: e }) {
|
|
6638
6506
|
const t = this.pendingForm;
|
|
6639
6507
|
if (!(t != null && t.form)) return;
|
|
6640
|
-
const s =
|
|
6508
|
+
const s = ht(t.form, e, this.translator);
|
|
6641
6509
|
if (!s) return;
|
|
6642
6510
|
let r = this.currentConv;
|
|
6643
6511
|
r && (r._draft && (r = await this.ensureRealConv(), !r) || await this.store.send(r.id, s, {
|
|
@@ -6715,7 +6583,7 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6715
6583
|
if (e) {
|
|
6716
6584
|
if (e.url) {
|
|
6717
6585
|
if (await this.openInternalUrl(e.url)) return;
|
|
6718
|
-
if (!
|
|
6586
|
+
if (!fe(e.url)) {
|
|
6719
6587
|
console.warn(
|
|
6720
6588
|
"[messenger] refusing unsafe quick-link url",
|
|
6721
6589
|
e.url
|
|
@@ -6750,45 +6618,45 @@ const Xa = /* @__PURE__ */ N(Fa, [["render", Ja], ["__scopeId", "data-v-6d5f94a8
|
|
|
6750
6618
|
}
|
|
6751
6619
|
}
|
|
6752
6620
|
}
|
|
6753
|
-
},
|
|
6621
|
+
}, za = {
|
|
6754
6622
|
key: 0,
|
|
6755
6623
|
class: "wm-loading",
|
|
6756
6624
|
"aria-busy": "true",
|
|
6757
6625
|
"aria-live": "polite"
|
|
6758
|
-
},
|
|
6626
|
+
}, qa = ["aria-label"], Va = {
|
|
6759
6627
|
key: 0,
|
|
6760
6628
|
class: "wm-state"
|
|
6761
|
-
},
|
|
6629
|
+
}, Ka = { class: "wm-state__err" }, Wa = { class: "wm-state__errTitle" }, $a = { class: "wm-state__errSub" }, Ga = { class: "wm-bottom" }, Ya = {
|
|
6762
6630
|
key: 0,
|
|
6763
6631
|
ref: "floatEl",
|
|
6764
6632
|
class: "wm-float"
|
|
6765
|
-
},
|
|
6633
|
+
}, Ja = {
|
|
6766
6634
|
key: 1,
|
|
6767
6635
|
class: "wm-actionWait",
|
|
6768
6636
|
role: "status",
|
|
6769
6637
|
"aria-live": "polite"
|
|
6770
|
-
},
|
|
6638
|
+
}, Xa = { class: "wm-actionWait__lbl" }, Qa = {
|
|
6771
6639
|
key: 2,
|
|
6772
6640
|
class: "wm-attached"
|
|
6773
|
-
},
|
|
6641
|
+
}, Za = ["src", "alt"], eo = {
|
|
6774
6642
|
key: 1,
|
|
6775
6643
|
class: "wm-attached__file"
|
|
6776
|
-
},
|
|
6644
|
+
}, to = { class: "wm-attached__fileMeta" }, no = { class: "wm-attached__fileName" }, so = {
|
|
6777
6645
|
key: 0,
|
|
6778
6646
|
class: "wm-attached__fileSize"
|
|
6779
|
-
},
|
|
6647
|
+
}, ro = ["aria-label", "onClick"], io = {
|
|
6780
6648
|
key: 3,
|
|
6781
6649
|
class: "wm-ended",
|
|
6782
6650
|
role: "status",
|
|
6783
6651
|
"aria-live": "polite"
|
|
6784
|
-
},
|
|
6785
|
-
function
|
|
6786
|
-
const a =
|
|
6652
|
+
}, ao = { class: "wm-ended__lbl" };
|
|
6653
|
+
function oo(e, t, s, r, i, n) {
|
|
6654
|
+
const a = P("Launcher"), o = P("Header"), f = P("History"), b = P("Onboarding"), v = P("MessageList"), M = P("InlineCallbacks"), E = P("FormCard"), S = P("Feedback"), z = P("Composer"), T = P("MoreMenu"), U = P("RenameDialog");
|
|
6787
6655
|
return c(), d("div", {
|
|
6788
|
-
class:
|
|
6789
|
-
style:
|
|
6656
|
+
class: L(["wm-root", `wm-root--${s.displayMode}`]),
|
|
6657
|
+
style: j(n.rootStyle)
|
|
6790
6658
|
}, [
|
|
6791
|
-
!i.isOpen && !n.isEmbedded ? (c(),
|
|
6659
|
+
!i.isOpen && !n.isEmbedded ? (c(), I(a, {
|
|
6792
6660
|
key: 0,
|
|
6793
6661
|
"unread-count": n.unreadCount,
|
|
6794
6662
|
peeks: n.launcherPeeks,
|
|
@@ -6798,23 +6666,23 @@ function yo(e, t, s, r, i, n) {
|
|
|
6798
6666
|
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : k("", !0),
|
|
6799
6667
|
i.isOpen || n.isEmbedded ? (c(), d("section", {
|
|
6800
6668
|
key: 1,
|
|
6801
|
-
class:
|
|
6669
|
+
class: L([
|
|
6802
6670
|
"wm-panel",
|
|
6803
6671
|
`wm-panel--${s.displayMode}`,
|
|
6804
6672
|
{ "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
|
|
6805
6673
|
]),
|
|
6806
|
-
style:
|
|
6674
|
+
style: j(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
|
|
6807
6675
|
role: "dialog",
|
|
6808
6676
|
"aria-label": "Messenger",
|
|
6809
|
-
onClick: t[7] || (t[7] = (...
|
|
6677
|
+
onClick: t[7] || (t[7] = (...x) => n.onPanelClick && n.onPanelClick(...x))
|
|
6810
6678
|
}, [
|
|
6811
|
-
!n.ready && !n.error ? (c(), d("div",
|
|
6679
|
+
!n.ready && !n.error ? (c(), d("div", za, [
|
|
6812
6680
|
n.isEmbedded ? k("", !0) : (c(), d("button", {
|
|
6813
6681
|
key: 0,
|
|
6814
6682
|
type: "button",
|
|
6815
6683
|
class: "wm-loading__close",
|
|
6816
6684
|
"aria-label": n.t("loading.minimize"),
|
|
6817
|
-
onClick: t[0] || (t[0] = (...
|
|
6685
|
+
onClick: t[0] || (t[0] = (...x) => n.close && n.close(...x))
|
|
6818
6686
|
}, [...t[8] || (t[8] = [
|
|
6819
6687
|
l("svg", {
|
|
6820
6688
|
width: "13",
|
|
@@ -6829,13 +6697,13 @@ function yo(e, t, s, r, i, n) {
|
|
|
6829
6697
|
}, [
|
|
6830
6698
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6831
6699
|
], -1)
|
|
6832
|
-
])], 8,
|
|
6700
|
+
])], 8, qa)),
|
|
6833
6701
|
t[9] || (t[9] = l("div", {
|
|
6834
6702
|
class: "wm-loading__spinner",
|
|
6835
6703
|
"aria-hidden": "true"
|
|
6836
6704
|
}, null, -1))
|
|
6837
|
-
])) : (c(), d(
|
|
6838
|
-
|
|
6705
|
+
])) : (c(), d(B, { key: 1 }, [
|
|
6706
|
+
W(o, {
|
|
6839
6707
|
title: n.headerTitle,
|
|
6840
6708
|
"team-members": n.teamMembers,
|
|
6841
6709
|
"response-label": n.responseLabel,
|
|
@@ -6849,8 +6717,8 @@ function yo(e, t, s, r, i, n) {
|
|
|
6849
6717
|
onMore: n.toggleMore,
|
|
6850
6718
|
onClose: n.close
|
|
6851
6719
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "agent-name", "agent-avatar-url", "onBack", "onMore", "onClose"]),
|
|
6852
|
-
n.error ? (c(), d("div",
|
|
6853
|
-
l("div",
|
|
6720
|
+
n.error ? (c(), d("div", Va, [
|
|
6721
|
+
l("div", Ka, [
|
|
6854
6722
|
t[10] || (t[10] = l("div", { class: "wm-state__errIcon" }, [
|
|
6855
6723
|
l("svg", {
|
|
6856
6724
|
width: "14",
|
|
@@ -6867,16 +6735,16 @@ function yo(e, t, s, r, i, n) {
|
|
|
6867
6735
|
])
|
|
6868
6736
|
], -1)),
|
|
6869
6737
|
l("div", null, [
|
|
6870
|
-
l("div",
|
|
6871
|
-
l("div",
|
|
6738
|
+
l("div", Wa, y(n.t("error.connectionFailed")), 1),
|
|
6739
|
+
l("div", $a, y(n.error), 1)
|
|
6872
6740
|
])
|
|
6873
6741
|
])
|
|
6874
|
-
])) : !n.currentConv && i.showHistory ? (c(),
|
|
6742
|
+
])) : !n.currentConv && i.showHistory ? (c(), I(f, {
|
|
6875
6743
|
key: 1,
|
|
6876
6744
|
threads: n.openThreads,
|
|
6877
6745
|
onResume: n.onDrawerPick
|
|
6878
|
-
}, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d(
|
|
6879
|
-
|
|
6746
|
+
}, null, 8, ["threads", "onResume"])) : n.currentConv ? (c(), d(B, { key: 3 }, [
|
|
6747
|
+
W(v, {
|
|
6880
6748
|
ref: "messageList",
|
|
6881
6749
|
messages: n.displayedMessages,
|
|
6882
6750
|
"streaming-active": n.streamingActive,
|
|
@@ -6890,60 +6758,55 @@ function yo(e, t, s, r, i, n) {
|
|
|
6890
6758
|
"ai-agent-avatar-url": n.agentAvatarUrl,
|
|
6891
6759
|
onLoadMore: n.onLoadMore
|
|
6892
6760
|
}, 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"]),
|
|
6893
|
-
l("div",
|
|
6894
|
-
n.floatVisible ? (c(), d("div",
|
|
6895
|
-
n.
|
|
6896
|
-
key:
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
callbacks: n.resolutionCallbacks,
|
|
6907
|
-
"agent-name": n.agentName,
|
|
6908
|
-
"agent-avatar-url": n.agentAvatarUrl,
|
|
6909
|
-
onCallback: n.onResolutionCardCallback
|
|
6910
|
-
}, null, 8, ["action", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : n.pendingForm ? (c(), P(E, {
|
|
6761
|
+
l("div", Ga, [
|
|
6762
|
+
n.floatVisible ? (c(), d("div", Ya, [
|
|
6763
|
+
n.pendingApproval ? (c(), I(M, {
|
|
6764
|
+
key: `appr-${n.pendingApproval.id}`,
|
|
6765
|
+
variant: "buttons",
|
|
6766
|
+
items: n.approvalCallbacks,
|
|
6767
|
+
onSelect: n.onApprovalSelect
|
|
6768
|
+
}, null, 8, ["items", "onSelect"])) : n.pendingResolution ? (c(), I(M, {
|
|
6769
|
+
key: `res-${n.pendingResolution.id}`,
|
|
6770
|
+
variant: "buttons",
|
|
6771
|
+
items: n.resolutionCallbacks,
|
|
6772
|
+
onSelect: n.onResolutionSelect
|
|
6773
|
+
}, null, 8, ["items", "onSelect"])) : n.pendingForm ? (c(), I(E, {
|
|
6911
6774
|
key: n.pendingForm.message && n.pendingForm.message.id,
|
|
6912
6775
|
form: n.pendingForm.form,
|
|
6913
6776
|
"agent-name": n.agentName,
|
|
6914
6777
|
"agent-avatar-url": n.agentAvatarUrl,
|
|
6915
6778
|
onSubmit: n.onFormSubmit
|
|
6916
|
-
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(),
|
|
6779
|
+
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : n.showFeedback ? (c(), I(S, {
|
|
6917
6780
|
key: 3,
|
|
6918
6781
|
busy: i.feedbackBusy,
|
|
6919
6782
|
done: !!(n.currentConv && i.feedbackDone[n.currentConv.id]),
|
|
6920
6783
|
onSubmit: n.onFeedback
|
|
6921
|
-
}, null, 8, ["busy", "done", "onSubmit"])) : (c(),
|
|
6784
|
+
}, null, 8, ["busy", "done", "onSubmit"])) : (c(), I(M, {
|
|
6922
6785
|
key: 4,
|
|
6923
6786
|
items: n.suggestions,
|
|
6924
6787
|
onSelect: n.onSuggestion
|
|
6925
6788
|
}, null, 8, ["items", "onSelect"]))
|
|
6926
6789
|
], 512)) : k("", !0),
|
|
6927
|
-
n.actionInFlight ? (c(), d("div",
|
|
6790
|
+
n.actionInFlight ? (c(), d("div", Ja, [
|
|
6928
6791
|
t[11] || (t[11] = l("span", {
|
|
6929
6792
|
class: "wm-actionWait__spinner",
|
|
6930
6793
|
"aria-hidden": "true"
|
|
6931
6794
|
}, null, -1)),
|
|
6932
|
-
l("span",
|
|
6795
|
+
l("span", Xa, y(n.t("action.inProgress", {
|
|
6933
6796
|
name: n.actionInFlightName
|
|
6934
6797
|
})), 1)
|
|
6935
6798
|
])) : k("", !0),
|
|
6936
|
-
i.pendingAttachments.length ? (c(), d("div",
|
|
6937
|
-
(c(!0), d(
|
|
6938
|
-
key:
|
|
6799
|
+
i.pendingAttachments.length ? (c(), d("div", Qa, [
|
|
6800
|
+
(c(!0), d(B, null, N(i.pendingAttachments, (x, q) => (c(), d("div", {
|
|
6801
|
+
key: x.path || q,
|
|
6939
6802
|
class: "wm-attached__item"
|
|
6940
6803
|
}, [
|
|
6941
|
-
|
|
6804
|
+
x.previewUrl ? (c(), d("img", {
|
|
6942
6805
|
key: 0,
|
|
6943
6806
|
class: "wm-attached__thumb",
|
|
6944
|
-
src:
|
|
6945
|
-
alt:
|
|
6946
|
-
}, null, 8,
|
|
6807
|
+
src: x.previewUrl,
|
|
6808
|
+
alt: x.name
|
|
6809
|
+
}, null, 8, Za)) : (c(), d("div", eo, [
|
|
6947
6810
|
t[12] || (t[12] = l("span", { class: "wm-attached__fileIcon" }, [
|
|
6948
6811
|
l("svg", {
|
|
6949
6812
|
width: "16",
|
|
@@ -6960,10 +6823,10 @@ function yo(e, t, s, r, i, n) {
|
|
|
6960
6823
|
l("path", { d: "M14 2v6h6" })
|
|
6961
6824
|
])
|
|
6962
6825
|
], -1)),
|
|
6963
|
-
l("span",
|
|
6964
|
-
l("span",
|
|
6965
|
-
n.formatAttachmentSize(
|
|
6966
|
-
|
|
6826
|
+
l("span", to, [
|
|
6827
|
+
l("span", no, y(x.name), 1),
|
|
6828
|
+
n.formatAttachmentSize(x.size_bytes) ? (c(), d("span", so, y(n.formatAttachmentSize(
|
|
6829
|
+
x.size_bytes
|
|
6967
6830
|
)), 1)) : k("", !0)
|
|
6968
6831
|
])
|
|
6969
6832
|
])),
|
|
@@ -6971,7 +6834,7 @@ function yo(e, t, s, r, i, n) {
|
|
|
6971
6834
|
type: "button",
|
|
6972
6835
|
class: "wm-attached__remove",
|
|
6973
6836
|
"aria-label": n.t("attachment.remove"),
|
|
6974
|
-
onClick: (
|
|
6837
|
+
onClick: (J) => n.removePendingAttachment(q)
|
|
6975
6838
|
}, [...t[13] || (t[13] = [
|
|
6976
6839
|
l("svg", {
|
|
6977
6840
|
width: "10",
|
|
@@ -6986,48 +6849,47 @@ function yo(e, t, s, r, i, n) {
|
|
|
6986
6849
|
}, [
|
|
6987
6850
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6988
6851
|
], -1)
|
|
6989
|
-
])], 8,
|
|
6852
|
+
])], 8, ro)
|
|
6990
6853
|
]))), 128))
|
|
6991
6854
|
])) : k("", !0),
|
|
6992
|
-
n.endedBlockVisible ? (c(), d("div",
|
|
6993
|
-
l("span",
|
|
6855
|
+
n.endedBlockVisible ? (c(), d("div", io, [
|
|
6856
|
+
l("span", ao, y(n.isClosed ? n.t("composer.conversationClosed") : n.t("composer.conversationEnded")), 1),
|
|
6994
6857
|
l("button", {
|
|
6995
6858
|
type: "button",
|
|
6996
6859
|
class: "wm-ended__btn",
|
|
6997
|
-
onClick: t[2] || (t[2] = (
|
|
6998
|
-
},
|
|
6999
|
-
])) : n.actionInFlight ? k("", !0) : (c(),
|
|
6860
|
+
onClick: t[2] || (t[2] = (x) => n.isClosed ? n.onReopen() : n.startConv())
|
|
6861
|
+
}, y(n.isClosed ? n.t("composer.reopen") : n.t("composer.newConversation")), 1)
|
|
6862
|
+
])) : n.actionInFlight ? k("", !0) : (c(), I(z, {
|
|
7000
6863
|
key: 4,
|
|
7001
6864
|
ref: "composer",
|
|
7002
6865
|
modelValue: i.draft,
|
|
7003
|
-
"onUpdate:modelValue": t[3] || (t[3] = (
|
|
6866
|
+
"onUpdate:modelValue": t[3] || (t[3] = (x) => i.draft = x),
|
|
7004
6867
|
placeholder: n.composerPlaceholder,
|
|
7005
|
-
disabled: !!n.pendingApproval,
|
|
7006
6868
|
"attach-label": n.t("composer.attachFile"),
|
|
7007
6869
|
"display-mode": s.displayMode,
|
|
7008
6870
|
onSend: n.onSend,
|
|
7009
6871
|
onAttach: n.onAttach
|
|
7010
|
-
}, null, 8, ["modelValue", "placeholder", "
|
|
6872
|
+
}, null, 8, ["modelValue", "placeholder", "attach-label", "display-mode", "onSend", "onAttach"]))
|
|
7011
6873
|
]),
|
|
7012
|
-
i.moreOpen ? (c(),
|
|
6874
|
+
i.moreOpen ? (c(), I(T, {
|
|
7013
6875
|
key: 0,
|
|
7014
6876
|
"can-rename": !!n.currentConv && !n.currentConv._draft,
|
|
7015
6877
|
"can-export": !!n.currentConv && !n.currentConv._draft,
|
|
7016
6878
|
"sound-enabled": e.soundEnabled,
|
|
7017
6879
|
"status-url": n.statusUrl,
|
|
7018
6880
|
"help-url": n.helpUrl,
|
|
7019
|
-
onClose: t[4] || (t[4] = (
|
|
6881
|
+
onClose: t[4] || (t[4] = (x) => i.moreOpen = !1),
|
|
7020
6882
|
onSoundToggle: e.onSoundToggle,
|
|
7021
6883
|
onAction: n.onMoreAction
|
|
7022
6884
|
}, null, 8, ["can-rename", "can-export", "sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0),
|
|
7023
|
-
i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(),
|
|
6885
|
+
i.renameDialogOpen && n.currentConv && !n.currentConv._draft ? (c(), I(U, {
|
|
7024
6886
|
key: 1,
|
|
7025
6887
|
"initial-value": n.currentConv.name || "",
|
|
7026
6888
|
title: n.t("rename.dialogTitle"),
|
|
7027
|
-
onClose: t[5] || (t[5] = (
|
|
6889
|
+
onClose: t[5] || (t[5] = (x) => i.renameDialogOpen = !1),
|
|
7028
6890
|
onSubmit: n.onRenameSubmit
|
|
7029
6891
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : k("", !0)
|
|
7030
|
-
], 64)) : (c(),
|
|
6892
|
+
], 64)) : (c(), I(b, {
|
|
7031
6893
|
key: 2,
|
|
7032
6894
|
title: n.widgetTitle,
|
|
7033
6895
|
subtitle: n.widgetSubtitle,
|
|
@@ -7039,16 +6901,16 @@ function yo(e, t, s, r, i, n) {
|
|
|
7039
6901
|
onStart: n.startConv,
|
|
7040
6902
|
onSelect: n.onQuickLink,
|
|
7041
6903
|
onResume: n.onDrawerPick,
|
|
7042
|
-
onViewHistory: t[1] || (t[1] = (
|
|
6904
|
+
onViewHistory: t[1] || (t[1] = (x) => i.showHistory = !0)
|
|
7043
6905
|
}, null, 8, ["title", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
7044
|
-
i.moreOpen && !n.currentConv ? (c(),
|
|
6906
|
+
i.moreOpen && !n.currentConv ? (c(), I(T, {
|
|
7045
6907
|
key: 4,
|
|
7046
6908
|
"can-rename": !1,
|
|
7047
6909
|
"can-export": !1,
|
|
7048
6910
|
"sound-enabled": e.soundEnabled,
|
|
7049
6911
|
"status-url": n.statusUrl,
|
|
7050
6912
|
"help-url": n.helpUrl,
|
|
7051
|
-
onClose: t[6] || (t[6] = (
|
|
6913
|
+
onClose: t[6] || (t[6] = (x) => i.moreOpen = !1),
|
|
7052
6914
|
onSoundToggle: e.onSoundToggle,
|
|
7053
6915
|
onAction: n.onMoreAction
|
|
7054
6916
|
}, null, 8, ["sound-enabled", "status-url", "help-url", "onSoundToggle", "onAction"])) : k("", !0)
|
|
@@ -7056,53 +6918,52 @@ function yo(e, t, s, r, i, n) {
|
|
|
7056
6918
|
], 6)) : k("", !0)
|
|
7057
6919
|
], 6);
|
|
7058
6920
|
}
|
|
7059
|
-
const
|
|
6921
|
+
const uo = /* @__PURE__ */ D(ja, [["render", oo], ["__scopeId", "data-v-caa7f955"]]), mo = "0.6.1";
|
|
7060
6922
|
export {
|
|
7061
|
-
|
|
6923
|
+
he as AIAvatar,
|
|
7062
6924
|
be as AVATAR_COLORS,
|
|
7063
|
-
|
|
7064
|
-
Ui as ApprovalCard,
|
|
6925
|
+
As as ActionResult,
|
|
7065
6926
|
Bs as ArtifactFormResponse,
|
|
7066
|
-
|
|
7067
|
-
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
6927
|
+
Ws as ArtifactInfoCard,
|
|
6928
|
+
ur as ArtifactRenderer,
|
|
6929
|
+
or as ArtifactTicket,
|
|
6930
|
+
Cr as AttachmentPreview,
|
|
6931
|
+
Tr as Bubble,
|
|
6932
|
+
Ci as Composer,
|
|
7072
6933
|
at as DEFAULT_BASE_URL,
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
6934
|
+
ue as DEFAULT_LANGUAGE,
|
|
6935
|
+
fa as Feedback,
|
|
6936
|
+
ea as FormCard,
|
|
6937
|
+
_n as Header,
|
|
6938
|
+
ye as HumanAvatar,
|
|
6939
|
+
Ti as InlineCallbacks,
|
|
6940
|
+
qt as Launcher,
|
|
7079
6941
|
Oe as MEDIA_RECORDER_SUPPORTED,
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
Te as
|
|
7091
|
-
|
|
7092
|
-
oi as captureScreenshotFile,
|
|
6942
|
+
ri as MessageList,
|
|
6943
|
+
uo as Messenger,
|
|
6944
|
+
xa as MoreMenu,
|
|
6945
|
+
Jn as Onboarding,
|
|
6946
|
+
ge as SCREEN_CAPTURE_SUPPORTED,
|
|
6947
|
+
mt as SUPPORTED_LANGUAGES,
|
|
6948
|
+
tn as TeamAvatars,
|
|
6949
|
+
Lr as Typing,
|
|
6950
|
+
mo as VERSION,
|
|
6951
|
+
Me as avatarColor,
|
|
6952
|
+
Te as avatarInitials,
|
|
6953
|
+
ai as captureScreenshotFile,
|
|
7093
6954
|
H as colors,
|
|
7094
6955
|
rt as createStore,
|
|
7095
6956
|
F as createTranslator,
|
|
7096
6957
|
et as createTransport,
|
|
7097
|
-
|
|
7098
|
-
|
|
6958
|
+
re as dateLocale,
|
|
6959
|
+
uo as default,
|
|
7099
6960
|
Ce as formatTime,
|
|
7100
|
-
|
|
7101
|
-
|
|
6961
|
+
co as guessAttachmentKind,
|
|
6962
|
+
ii as pickRecorderMime,
|
|
7102
6963
|
qe as renderInlineMarkdown,
|
|
7103
6964
|
_t as renderMarkdown,
|
|
7104
6965
|
xe as resolveLanguage,
|
|
7105
|
-
|
|
6966
|
+
li as startScreenRecording,
|
|
7106
6967
|
it as tokensCss,
|
|
7107
6968
|
st as uuid,
|
|
7108
6969
|
st as v4
|