@_solaris/messenger-widget 0.2.4 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/messenger.cjs +23 -23
- package/dist/messenger.embed.js +13 -13
- package/dist/messenger.js +967 -918
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
const
|
|
1
|
+
import { reactive as Ae, openBlock as l, createElementBlock as d, createVNode as z, Transition as Se, withCtx as xe, withKeys as me, withModifiers as X, createElementVNode as i, toDisplayString as b, createCommentVNode as y, normalizeStyle as V, normalizeClass as E, Fragment as M, renderList as j, resolveComponent as O, createBlock as $, createTextVNode as re, resolveDynamicComponent as Me, renderSlot as Te, withDirectives as H, vModelText as K, vModelCheckbox as Ie, vModelSelect as Oe, createStaticVNode as ue, markRaw as fe } from "vue";
|
|
2
|
+
const Ee = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
5
5
|
"message_stream",
|
|
6
6
|
"conversation_updated",
|
|
7
7
|
"config_updated",
|
|
8
8
|
"action_status"
|
|
9
|
-
],
|
|
10
|
-
function
|
|
9
|
+
], Be = 5 * 60 * 1e3, Le = 10 * 60 * 1e3, Re = 5 * 60 * 1e3;
|
|
10
|
+
function $e(t) {
|
|
11
11
|
const e = {
|
|
12
|
-
baseUrl:
|
|
12
|
+
baseUrl: Fe(t.baseUrl || ""),
|
|
13
13
|
widgetId: t.widgetId || "",
|
|
14
14
|
userId: t.userId || "",
|
|
15
15
|
userHash: t.userHash || "",
|
|
@@ -35,12 +35,12 @@ function Fe(t) {
|
|
|
35
35
|
return e.listeners.has(h) || e.listeners.set(h, /* @__PURE__ */ new Set()), e.listeners.get(h).add(f), () => e.listeners.get(h).delete(f);
|
|
36
36
|
}
|
|
37
37
|
function a(h, f) {
|
|
38
|
-
const
|
|
39
|
-
|
|
38
|
+
const _ = e.listeners.get(h);
|
|
39
|
+
_ && _.forEach((k) => {
|
|
40
40
|
try {
|
|
41
41
|
k(f);
|
|
42
|
-
} catch (
|
|
43
|
-
console.error("[transport] listener", h,
|
|
42
|
+
} catch (I) {
|
|
43
|
+
console.error("[transport] listener", h, I);
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
}
|
|
@@ -54,21 +54,21 @@ function Fe(t) {
|
|
|
54
54
|
"X-Widget-Id": e.widgetId
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
async function o(h, f,
|
|
57
|
+
async function o(h, f, _) {
|
|
58
58
|
const k = await fetch(`${e.baseUrl}${f}`, {
|
|
59
59
|
method: h,
|
|
60
60
|
headers: { "Content-Type": "application/json", ...s() },
|
|
61
|
-
body:
|
|
61
|
+
body: _ !== void 0 ? JSON.stringify(_) : void 0
|
|
62
62
|
});
|
|
63
63
|
if (!k.ok) {
|
|
64
|
-
const
|
|
65
|
-
`HTTP ${k.status} ${h} ${f} :: ${(
|
|
64
|
+
const I = await c(k), T = new Error(
|
|
65
|
+
`HTTP ${k.status} ${h} ${f} :: ${(I == null ? void 0 : I.error) || k.statusText}`
|
|
66
66
|
);
|
|
67
|
-
throw T.status = k.status, T.body =
|
|
67
|
+
throw T.status = k.status, T.body = I, T;
|
|
68
68
|
}
|
|
69
69
|
return k.status === 204 ? null : k.json();
|
|
70
70
|
}
|
|
71
|
-
async function
|
|
71
|
+
async function c(h) {
|
|
72
72
|
try {
|
|
73
73
|
return await h.json();
|
|
74
74
|
} catch {
|
|
@@ -78,12 +78,12 @@ function Fe(t) {
|
|
|
78
78
|
async function v() {
|
|
79
79
|
const [h, f] = await Promise.all([
|
|
80
80
|
// Public — no HMAC required.
|
|
81
|
-
fetch(`${e.baseUrl}/widgets/${encodeURIComponent(e.widgetId)}/config`).then(async (
|
|
82
|
-
if (!
|
|
83
|
-
const k = await
|
|
84
|
-
throw new Error(`HTTP ${
|
|
81
|
+
fetch(`${e.baseUrl}/widgets/${encodeURIComponent(e.widgetId)}/config`).then(async (_) => {
|
|
82
|
+
if (!_.ok) {
|
|
83
|
+
const k = await c(_);
|
|
84
|
+
throw new Error(`HTTP ${_.status} GET /widgets/:id/config :: ${(k == null ? void 0 : k.error) || _.statusText}`);
|
|
85
85
|
}
|
|
86
|
-
return
|
|
86
|
+
return _.json();
|
|
87
87
|
}),
|
|
88
88
|
// HMAC-protected.
|
|
89
89
|
o("GET", "/customers/me")
|
|
@@ -108,7 +108,7 @@ function Fe(t) {
|
|
|
108
108
|
const h = await o("GET", "/conversations");
|
|
109
109
|
return (h == null ? void 0 : h.conversations) ?? [];
|
|
110
110
|
}
|
|
111
|
-
async function
|
|
111
|
+
async function R(h = {}) {
|
|
112
112
|
return (await o("POST", "/conversations", h)).conversation;
|
|
113
113
|
}
|
|
114
114
|
async function A(h) {
|
|
@@ -118,68 +118,68 @@ function Fe(t) {
|
|
|
118
118
|
return (await o("PATCH", `/conversations/${encodeURIComponent(h)}`, f)).conversation;
|
|
119
119
|
}
|
|
120
120
|
async function x(h, f = {}) {
|
|
121
|
-
const
|
|
122
|
-
f.before &&
|
|
123
|
-
const k =
|
|
121
|
+
const _ = new URLSearchParams();
|
|
122
|
+
f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
|
|
123
|
+
const k = _.toString() ? `?${_.toString()}` : "";
|
|
124
124
|
return o(
|
|
125
125
|
"GET",
|
|
126
126
|
`/conversations/${encodeURIComponent(h)}/messages${k}`
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
129
|
async function N(h, f) {
|
|
130
|
-
|
|
131
|
-
const
|
|
130
|
+
G();
|
|
131
|
+
const _ = {
|
|
132
132
|
client_msg_id: f.client_msg_id,
|
|
133
133
|
type: "content",
|
|
134
134
|
text_md: f.text_md,
|
|
135
135
|
author: { id: e.userId, type: "user" },
|
|
136
136
|
created_at: f.created_at || (/* @__PURE__ */ new Date()).toISOString()
|
|
137
137
|
};
|
|
138
|
-
return Array.isArray(f.attachments) && f.attachments.length && (
|
|
138
|
+
return Array.isArray(f.attachments) && f.attachments.length && (_.payload = { type: "content", attachments: f.attachments }), f.metadata && typeof f.metadata == "object" && (_.metadata = f.metadata), o(
|
|
139
139
|
"POST",
|
|
140
140
|
`/conversations/${encodeURIComponent(h)}/messages`,
|
|
141
|
-
|
|
141
|
+
_
|
|
142
142
|
);
|
|
143
143
|
}
|
|
144
|
-
async function
|
|
145
|
-
return
|
|
144
|
+
async function F(h, f, _) {
|
|
145
|
+
return G(), o(
|
|
146
146
|
"POST",
|
|
147
147
|
`/messages/${encodeURIComponent(h)}/callbacks/${encodeURIComponent(f)}`,
|
|
148
|
-
|
|
148
|
+
_ ? { inputs: _ } : {}
|
|
149
149
|
);
|
|
150
150
|
}
|
|
151
|
-
async function
|
|
151
|
+
async function P(h) {
|
|
152
152
|
const f = (
|
|
153
153
|
/** @type {File} */
|
|
154
154
|
h.name || "attachment"
|
|
155
|
-
),
|
|
155
|
+
), _ = h.type || "application/octet-stream", k = h.size || 0, I = (
|
|
156
156
|
/** @type {import('./types.js').AttachmentUploadTicket} */
|
|
157
157
|
await o("POST", "/attachments", {
|
|
158
|
-
mime_type:
|
|
158
|
+
mime_type: _,
|
|
159
159
|
size_bytes: k,
|
|
160
160
|
name: f
|
|
161
161
|
})
|
|
162
|
-
), T = await fetch(
|
|
162
|
+
), T = await fetch(I.upload_url, {
|
|
163
163
|
method: "PUT",
|
|
164
|
-
headers: { "Content-Type":
|
|
164
|
+
headers: { "Content-Type": _ },
|
|
165
165
|
body: h
|
|
166
166
|
});
|
|
167
167
|
if (!T.ok)
|
|
168
168
|
throw new Error(`HTTP ${T.status} PUT signed upload`);
|
|
169
169
|
return {
|
|
170
|
-
type:
|
|
171
|
-
path:
|
|
172
|
-
mime_type:
|
|
170
|
+
type: je(_),
|
|
171
|
+
path: I.path,
|
|
172
|
+
mime_type: _,
|
|
173
173
|
size_bytes: k
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
async function
|
|
176
|
+
async function q(h) {
|
|
177
177
|
return o(
|
|
178
178
|
"GET",
|
|
179
179
|
`/attachments/sign?path=${encodeURIComponent(h)}`
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function Y() {
|
|
183
183
|
const h = new URLSearchParams({
|
|
184
184
|
userId: e.userId,
|
|
185
185
|
userHash: e.userHash,
|
|
@@ -187,12 +187,12 @@ function Fe(t) {
|
|
|
187
187
|
}).toString();
|
|
188
188
|
return `${e.baseUrl}/stream?${h}`;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function W() {
|
|
191
191
|
if (!e.eventSource && !(typeof document < "u" && document.hidden))
|
|
192
192
|
try {
|
|
193
|
-
const h = new EventSource(
|
|
194
|
-
for (const f of
|
|
195
|
-
h.addEventListener(f, (
|
|
193
|
+
const h = new EventSource(Y());
|
|
194
|
+
for (const f of Ee)
|
|
195
|
+
h.addEventListener(f, (_) => ie(f, _.data));
|
|
196
196
|
h.addEventListener("error", () => a("error", new Error("SSE error"))), e.eventSource = h, r("open");
|
|
197
197
|
} catch (h) {
|
|
198
198
|
console.error("[transport] SSE open failed", h), a("error", h);
|
|
@@ -200,36 +200,36 @@ function Fe(t) {
|
|
|
200
200
|
}
|
|
201
201
|
function ie(h, f) {
|
|
202
202
|
try {
|
|
203
|
-
const
|
|
203
|
+
const _ = JSON.parse(f), k = _ && typeof _ == "object" && "data" in _ ? _.data : _;
|
|
204
204
|
a(h, k);
|
|
205
|
-
} catch (
|
|
206
|
-
console.error("[transport] bad SSE payload", h,
|
|
205
|
+
} catch (_) {
|
|
206
|
+
console.error("[transport] bad SSE payload", h, _);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function J() {
|
|
210
210
|
e.eventSource && (e.eventSource.close(), e.eventSource = null), e.connection !== "paused" && r("idle");
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
clearTimeout(e.burstTimer),
|
|
214
|
-
e.panelOpen ||
|
|
215
|
-
},
|
|
212
|
+
function G() {
|
|
213
|
+
clearTimeout(e.burstTimer), W(), e.panelOpen || (e.burstTimer = setTimeout(() => {
|
|
214
|
+
e.panelOpen || J();
|
|
215
|
+
}, Le));
|
|
216
216
|
}
|
|
217
217
|
function ae(h) {
|
|
218
|
-
e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer),
|
|
218
|
+
e.panelOpen = !!h, e.panelOpen ? (clearTimeout(e.burstTimer), W()) : G();
|
|
219
219
|
}
|
|
220
220
|
async function oe() {
|
|
221
221
|
try {
|
|
222
|
-
const h = await S(), f = h.reduce((k,
|
|
223
|
-
const T =
|
|
222
|
+
const h = await S(), f = h.reduce((k, I) => {
|
|
223
|
+
const T = I == null ? void 0 : I.last_message_at;
|
|
224
224
|
return T && (!k || T > k) ? T : k;
|
|
225
225
|
}, null);
|
|
226
|
-
f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }),
|
|
226
|
+
f && (!e.lastActivityAt || f > e.lastActivityAt) && (e.lastActivityAt = f, a("activity", { conversations: h, latestAt: f }), G());
|
|
227
227
|
} catch (h) {
|
|
228
228
|
console.error("[transport] poll failed", h);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
function
|
|
232
|
-
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(oe,
|
|
231
|
+
function Z() {
|
|
232
|
+
u(), !(typeof document < "u" && document.hidden) && (e.pollTimer = setInterval(oe, Be));
|
|
233
233
|
}
|
|
234
234
|
function u() {
|
|
235
235
|
e.pollTimer && (clearInterval(e.pollTimer), e.pollTimer = null);
|
|
@@ -237,38 +237,38 @@ function Fe(t) {
|
|
|
237
237
|
function m() {
|
|
238
238
|
if (document.hidden)
|
|
239
239
|
clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = setTimeout(() => {
|
|
240
|
-
e.hiddenGraceTimer = null, document.hidden && (u(),
|
|
241
|
-
},
|
|
240
|
+
e.hiddenGraceTimer = null, document.hidden && (u(), J(), r("paused"));
|
|
241
|
+
}, Re);
|
|
242
242
|
else {
|
|
243
243
|
if (e.hiddenGraceTimer) {
|
|
244
244
|
clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null;
|
|
245
245
|
return;
|
|
246
246
|
}
|
|
247
|
-
r("idle"),
|
|
247
|
+
r("idle"), Z(), e.panelOpen && W();
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
|
-
async function
|
|
250
|
+
async function p() {
|
|
251
251
|
if (e.started) return e.lastBootstrap;
|
|
252
252
|
e.started = !0;
|
|
253
253
|
const h = await v();
|
|
254
254
|
e.lastBootstrap = h;
|
|
255
255
|
try {
|
|
256
256
|
const f = await S();
|
|
257
|
-
e.lastActivityAt = f.reduce((
|
|
258
|
-
const
|
|
259
|
-
return
|
|
257
|
+
e.lastActivityAt = f.reduce((_, k) => {
|
|
258
|
+
const I = k == null ? void 0 : k.last_message_at;
|
|
259
|
+
return I && (!_ || I > _) ? I : _;
|
|
260
260
|
}, null);
|
|
261
261
|
} catch (f) {
|
|
262
262
|
console.error("[transport] initial /conversations failed", f);
|
|
263
263
|
}
|
|
264
|
-
return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)),
|
|
264
|
+
return typeof document < "u" && (e.visibilityHandler = m, document.addEventListener("visibilitychange", e.visibilityHandler)), Z(), h;
|
|
265
265
|
}
|
|
266
266
|
function g() {
|
|
267
|
-
u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null,
|
|
267
|
+
u(), clearTimeout(e.burstTimer), clearTimeout(e.hiddenGraceTimer), e.hiddenGraceTimer = null, J(), e.visibilityHandler && (document.removeEventListener("visibilitychange", e.visibilityHandler), e.visibilityHandler = null), e.started = !1;
|
|
268
268
|
}
|
|
269
269
|
return {
|
|
270
270
|
on: n,
|
|
271
|
-
start:
|
|
271
|
+
start: p,
|
|
272
272
|
stop: g,
|
|
273
273
|
setPanelOpen: ae,
|
|
274
274
|
// REST
|
|
@@ -276,27 +276,27 @@ function Fe(t) {
|
|
|
276
276
|
getCustomer: C,
|
|
277
277
|
patchCustomer: w,
|
|
278
278
|
listConversations: S,
|
|
279
|
-
createConversation:
|
|
279
|
+
createConversation: R,
|
|
280
280
|
getConversation: A,
|
|
281
281
|
patchConversation: D,
|
|
282
282
|
listMessages: x,
|
|
283
283
|
postMessage: N,
|
|
284
|
-
postCallback:
|
|
285
|
-
uploadAttachment:
|
|
286
|
-
signAttachment:
|
|
284
|
+
postCallback: F,
|
|
285
|
+
uploadAttachment: P,
|
|
286
|
+
signAttachment: q,
|
|
287
287
|
// Read-only state
|
|
288
288
|
get connection() {
|
|
289
289
|
return e.connection;
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Fe(t) {
|
|
294
294
|
return t.endsWith("/") ? t.slice(0, -1) : t;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function je(t) {
|
|
297
297
|
return t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : t.startsWith("audio/") ? "audio" : "file";
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function Ue() {
|
|
300
300
|
if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
|
|
301
301
|
return crypto.randomUUID();
|
|
302
302
|
const t = new Uint8Array(16);
|
|
@@ -308,8 +308,8 @@ function De() {
|
|
|
308
308
|
const e = [...t].map((n) => n.toString(16).padStart(2, "0"));
|
|
309
309
|
return e.slice(0, 4).join("") + "-" + e.slice(4, 6).join("") + "-" + e.slice(6, 8).join("") + "-" + e.slice(8, 10).join("") + "-" + e.slice(10, 16).join("");
|
|
310
310
|
}
|
|
311
|
-
function
|
|
312
|
-
const e =
|
|
311
|
+
function De(t) {
|
|
312
|
+
const e = Ae({
|
|
313
313
|
ready: !1,
|
|
314
314
|
error: null,
|
|
315
315
|
config: null,
|
|
@@ -343,30 +343,30 @@ function Ne(t) {
|
|
|
343
343
|
n.push(t.on("connection", (u) => {
|
|
344
344
|
e.connection = u;
|
|
345
345
|
})), n.push(t.on("message", (u) => {
|
|
346
|
-
const m = u == null ? void 0 : u.conversation_id,
|
|
347
|
-
!m || !(
|
|
346
|
+
const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.message;
|
|
347
|
+
!m || !(p != null && p.id) || (W(m, p), p.client_msg_id && delete e.streamingByMsgId[p.client_msg_id], G(m, p.created_at));
|
|
348
348
|
})), n.push(t.on("message_stream", (u) => {
|
|
349
|
-
const m = u == null ? void 0 : u.message_id,
|
|
350
|
-
!m || typeof
|
|
349
|
+
const m = u == null ? void 0 : u.message_id, p = u == null ? void 0 : u.token;
|
|
350
|
+
!m || typeof p != "string" || (e.streamingByMsgId[m] = (e.streamingByMsgId[m] || "") + p);
|
|
351
351
|
})), n.push(t.on("conversation_updated", (u) => {
|
|
352
|
-
const m = u == null ? void 0 : u.conversation_id,
|
|
353
|
-
if (!m || !
|
|
352
|
+
const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.changes;
|
|
353
|
+
if (!m || !p) return;
|
|
354
354
|
const g = e.conversations.findIndex((h) => h.id === m);
|
|
355
|
-
g !== -1 && (e.conversations[g] = { ...e.conversations[g], ...
|
|
355
|
+
g !== -1 && (e.conversations[g] = { ...e.conversations[g], ...p });
|
|
356
356
|
})), n.push(t.on("config_updated", (u) => {
|
|
357
357
|
u != null && u.config && (e.config = u.config);
|
|
358
358
|
})), n.push(t.on("action_status", (u) => {
|
|
359
|
-
const m = u == null ? void 0 : u.conversation_id,
|
|
360
|
-
if (!m || !
|
|
359
|
+
const m = u == null ? void 0 : u.conversation_id, p = u == null ? void 0 : u.action_id, g = u == null ? void 0 : u.action_name;
|
|
360
|
+
if (!m || !p) return;
|
|
361
361
|
const h = e.runningActionsByConv[m] || {};
|
|
362
|
-
u.state === "running" ? (h[
|
|
362
|
+
u.state === "running" ? (h[p] = g || p, e.runningActionsByConv[m] = { ...h }) : u.state === "done" && (delete h[p], e.runningActionsByConv[m] = { ...h });
|
|
363
363
|
})), n.push(t.on("activity", (u) => {
|
|
364
364
|
Array.isArray(u == null ? void 0 : u.conversations) && (e.conversations = u.conversations);
|
|
365
365
|
}));
|
|
366
366
|
async function a() {
|
|
367
367
|
try {
|
|
368
368
|
const u = new Promise(
|
|
369
|
-
(
|
|
369
|
+
(p, g) => setTimeout(() => g(new Error("bootstrap timeout (15s) — check baseUrl, CORS, and network")), 15e3)
|
|
370
370
|
), m = await Promise.race([t.start(), u]);
|
|
371
371
|
e.config = m.config, e.customer = m.customer, e.conversations = await Promise.race([t.listConversations(), u]), e.ready = !0;
|
|
372
372
|
} catch (u) {
|
|
@@ -385,21 +385,21 @@ function Ne(t) {
|
|
|
385
385
|
const m = oe(u);
|
|
386
386
|
if (!m) return e.customer;
|
|
387
387
|
try {
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
} catch (
|
|
391
|
-
console.error("[store] applyCustomer failed",
|
|
388
|
+
const p = await t.patchCustomer(m);
|
|
389
|
+
p && (e.customer = p);
|
|
390
|
+
} catch (p) {
|
|
391
|
+
console.error("[store] applyCustomer failed", p);
|
|
392
392
|
}
|
|
393
393
|
return e.customer;
|
|
394
394
|
}
|
|
395
395
|
async function o(u = {}) {
|
|
396
|
-
const m = await t.createConversation(u),
|
|
397
|
-
return
|
|
396
|
+
const m = await t.createConversation(u), p = e.conversations.findIndex((g) => g.id === m.id);
|
|
397
|
+
return p === -1 ? e.conversations = [m, ...e.conversations] : e.conversations[p] = m, m;
|
|
398
398
|
}
|
|
399
|
-
const
|
|
399
|
+
const c = 50;
|
|
400
400
|
async function v(u) {
|
|
401
401
|
if (e.messagesByConv[u]) return;
|
|
402
|
-
const m = await t.listMessages(u, { limit:
|
|
402
|
+
const m = await t.listMessages(u, { limit: c });
|
|
403
403
|
e.messagesByConv[u] = (m == null ? void 0 : m.messages) ?? [], w(u, {
|
|
404
404
|
nextCursor: (m == null ? void 0 : m.next_cursor) ?? null,
|
|
405
405
|
loading: !1,
|
|
@@ -411,22 +411,22 @@ function Ne(t) {
|
|
|
411
411
|
if (!(!m || m.loading || !m.nextCursor)) {
|
|
412
412
|
w(u, { ...m, loading: !0 });
|
|
413
413
|
try {
|
|
414
|
-
let h = m.nextCursor, f = [],
|
|
415
|
-
for (;
|
|
416
|
-
const
|
|
414
|
+
let h = m.nextCursor, f = [], _ = 0;
|
|
415
|
+
for (; _ < 6 && h; _++) {
|
|
416
|
+
const L = await t.listMessages(u, {
|
|
417
417
|
before: h,
|
|
418
|
-
limit:
|
|
419
|
-
}),
|
|
420
|
-
if (f = [...
|
|
418
|
+
limit: c
|
|
419
|
+
}), ee = (L == null ? void 0 : L.messages) ?? [];
|
|
420
|
+
if (f = [...ee, ...f], h = (L == null ? void 0 : L.next_cursor) ?? null, !ee.length || f.length >= 60) break;
|
|
421
421
|
}
|
|
422
|
-
const k = e.messagesByConv[u] || [],
|
|
422
|
+
const k = e.messagesByConv[u] || [], I = new Set(k.map((L) => String(L == null ? void 0 : L.id))), T = [...f.filter((L) => !I.has(String(L == null ? void 0 : L.id))), ...k];
|
|
423
423
|
e.messagesByConv[u] = T, w(u, {
|
|
424
424
|
nextCursor: h,
|
|
425
425
|
loading: !1,
|
|
426
426
|
loaded: !0
|
|
427
427
|
});
|
|
428
|
-
} catch (
|
|
429
|
-
console.error("[store] loadMore failed",
|
|
428
|
+
} catch (p) {
|
|
429
|
+
console.error("[store] loadMore failed", p), w(u, { ...m, loading: !1 });
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
}
|
|
@@ -434,16 +434,16 @@ function Ne(t) {
|
|
|
434
434
|
e.paginationByConv = { ...e.paginationByConv, [u]: m };
|
|
435
435
|
}
|
|
436
436
|
async function S(u, m) {
|
|
437
|
-
const
|
|
438
|
-
g !== -1 && (e.conversations[g] =
|
|
437
|
+
const p = await t.patchConversation(u, m), g = e.conversations.findIndex((h) => h.id === u);
|
|
438
|
+
g !== -1 && (e.conversations[g] = p);
|
|
439
439
|
}
|
|
440
|
-
async function
|
|
440
|
+
async function R(u, m, { attachments: p, metadata: g } = {}) {
|
|
441
441
|
var T;
|
|
442
|
-
const h = (m || "").trim(), f = Array.isArray(
|
|
442
|
+
const h = (m || "").trim(), f = Array.isArray(p) && p.length > 0;
|
|
443
443
|
if (!u || !h && !f) return;
|
|
444
|
-
const
|
|
445
|
-
id:
|
|
446
|
-
client_msg_id:
|
|
444
|
+
const _ = Ue(), k = Z(u), I = {
|
|
445
|
+
id: _,
|
|
446
|
+
client_msg_id: _,
|
|
447
447
|
conversation_id: u,
|
|
448
448
|
type: "content",
|
|
449
449
|
text_md: h,
|
|
@@ -454,26 +454,26 @@ function Ne(t) {
|
|
|
454
454
|
created_at: k,
|
|
455
455
|
// Local-only flag — UI may render dimmed until the SSE echo lands.
|
|
456
456
|
_pending: !0,
|
|
457
|
-
...f ? { payload: { type: "content", attachments:
|
|
457
|
+
...f ? { payload: { type: "content", attachments: p } } : {},
|
|
458
458
|
...g && typeof g == "object" ? { metadata: g } : {}
|
|
459
459
|
};
|
|
460
|
-
|
|
460
|
+
W(u, I);
|
|
461
461
|
try {
|
|
462
462
|
await t.postMessage(u, {
|
|
463
|
-
client_msg_id:
|
|
463
|
+
client_msg_id: _,
|
|
464
464
|
text_md: h,
|
|
465
465
|
created_at: k,
|
|
466
|
-
...f ? { attachments:
|
|
466
|
+
...f ? { attachments: p } : {},
|
|
467
467
|
...g && typeof g == "object" ? { metadata: g } : {}
|
|
468
468
|
});
|
|
469
|
-
} catch (
|
|
470
|
-
console.error("[store] send failed",
|
|
469
|
+
} catch (L) {
|
|
470
|
+
console.error("[store] send failed", L), J(u, _, { _failed: !0, _pending: !1 });
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
async function A(u, m,
|
|
473
|
+
async function A(u, m, p) {
|
|
474
474
|
u != null && (e.awaitingCallback[u] = !0);
|
|
475
475
|
try {
|
|
476
|
-
await t.postCallback(u, m,
|
|
476
|
+
await t.postCallback(u, m, p);
|
|
477
477
|
} catch (g) {
|
|
478
478
|
console.error("[store] callback failed", g), u != null && delete e.awaitingCallback[u];
|
|
479
479
|
}
|
|
@@ -483,113 +483,113 @@ function Ne(t) {
|
|
|
483
483
|
if (!u) return null;
|
|
484
484
|
const m = D.get(u);
|
|
485
485
|
if (m != null && m.url) {
|
|
486
|
-
const
|
|
487
|
-
if (!
|
|
486
|
+
const p = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
487
|
+
if (!p || p - Date.now() > 6e4) return m.url;
|
|
488
488
|
}
|
|
489
489
|
try {
|
|
490
|
-
const
|
|
491
|
-
if (
|
|
492
|
-
return D.set(u, { url:
|
|
493
|
-
} catch (
|
|
494
|
-
console.error("[store] sign attachment failed",
|
|
490
|
+
const p = await t.signAttachment(u);
|
|
491
|
+
if (p != null && p.signed_url)
|
|
492
|
+
return D.set(u, { url: p.signed_url, expires_at: p.expires_at }), p.signed_url;
|
|
493
|
+
} catch (p) {
|
|
494
|
+
console.error("[store] sign attachment failed", p);
|
|
495
495
|
}
|
|
496
496
|
return null;
|
|
497
497
|
}
|
|
498
|
-
async function N(u, { rating: m, comment:
|
|
499
|
-
const g = e.conversations.find((
|
|
498
|
+
async function N(u, { rating: m, comment: p } = {}) {
|
|
499
|
+
const g = e.conversations.find((_) => _.id === u), f = {
|
|
500
500
|
...(g == null ? void 0 : g.metadata) || {},
|
|
501
501
|
feedback: {
|
|
502
502
|
rating: m,
|
|
503
|
-
comment:
|
|
503
|
+
comment: p || null,
|
|
504
504
|
submitted_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
505
505
|
}
|
|
506
506
|
};
|
|
507
507
|
await S(u, { metadata: f });
|
|
508
508
|
}
|
|
509
|
-
function
|
|
510
|
-
var
|
|
509
|
+
function F(u) {
|
|
510
|
+
var p, g;
|
|
511
511
|
const m = e.messagesByConv[u] || [];
|
|
512
512
|
for (let h = m.length - 1; h >= 0; h--) {
|
|
513
513
|
const f = m[h];
|
|
514
|
-
if ((f == null ? void 0 : f.type) === "action" && ((
|
|
514
|
+
if ((f == null ? void 0 : f.type) === "action" && ((p = f == null ? void 0 : f.payload) == null ? void 0 : p.type) === "action" && ((g = f == null ? void 0 : f.payload) == null ? void 0 : g.state) === "pending" && Array.isArray(f == null ? void 0 : f.callbacks) && f.callbacks.length > 0 && !e.awaitingCallback[f.id])
|
|
515
515
|
return f;
|
|
516
516
|
}
|
|
517
517
|
return null;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
var
|
|
519
|
+
function P(u) {
|
|
520
|
+
var p, g, h;
|
|
521
521
|
const m = e.messagesByConv[u] || [];
|
|
522
522
|
for (let f = m.length - 1; f >= 0; f--) {
|
|
523
|
-
const
|
|
524
|
-
if (((
|
|
525
|
-
const k = (h =
|
|
523
|
+
const _ = m[f];
|
|
524
|
+
if (((p = _ == null ? void 0 : _.author) == null ? void 0 : p.type) === "user" || (_ == null ? void 0 : _.type) === "action" && ((g = _ == null ? void 0 : _.payload) == null ? void 0 : g.state) === "pending") return null;
|
|
525
|
+
const k = (h = _ == null ? void 0 : _.metadata) == null ? void 0 : h.form;
|
|
526
526
|
if (k && Array.isArray(k.fields) && k.fields.length > 0)
|
|
527
|
-
return { message:
|
|
527
|
+
return { message: _, form: k };
|
|
528
528
|
}
|
|
529
529
|
return null;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function q(u) {
|
|
532
532
|
const m = e.runningActionsByConv[u];
|
|
533
533
|
if (!m) return null;
|
|
534
|
-
const
|
|
535
|
-
if (
|
|
536
|
-
const g =
|
|
534
|
+
const p = Object.keys(m);
|
|
535
|
+
if (p.length === 0) return null;
|
|
536
|
+
const g = p[0];
|
|
537
537
|
return { id: g, payload: { name: m[g] } };
|
|
538
538
|
}
|
|
539
|
-
function
|
|
540
|
-
var
|
|
539
|
+
function Y(u) {
|
|
540
|
+
var p, g, h, f;
|
|
541
541
|
const m = e.messagesByConv[u] || [];
|
|
542
|
-
for (let
|
|
543
|
-
const k = m[
|
|
544
|
-
if (((
|
|
542
|
+
for (let _ = m.length - 1; _ >= 0; _--) {
|
|
543
|
+
const k = m[_];
|
|
544
|
+
if (((p = k == null ? void 0 : k.author) == null ? void 0 : p.type) === "user") return [];
|
|
545
545
|
if ((k == null ? void 0 : k.type) === "action" && ((g = k == null ? void 0 : k.payload) == null ? void 0 : g.state) === "pending") return [];
|
|
546
546
|
if (((h = k == null ? void 0 : k.author) == null ? void 0 : h.type) !== "agent_ia") continue;
|
|
547
|
-
const
|
|
548
|
-
return Array.isArray(
|
|
547
|
+
const I = (f = k == null ? void 0 : k.metadata) == null ? void 0 : f.suggested_replies;
|
|
548
|
+
return Array.isArray(I) && I.length ? I.map((T) => {
|
|
549
549
|
if (typeof T == "string") {
|
|
550
|
-
const
|
|
551
|
-
return
|
|
550
|
+
const L = T.trim();
|
|
551
|
+
return L ? { label: L, kind: null } : null;
|
|
552
552
|
}
|
|
553
553
|
if (T && typeof T == "object" && typeof T.label == "string") {
|
|
554
|
-
const
|
|
555
|
-
if (!
|
|
556
|
-
const
|
|
557
|
-
return { label:
|
|
554
|
+
const L = T.label.trim();
|
|
555
|
+
if (!L) return null;
|
|
556
|
+
const ee = T.kind === "cta" || T.kind === "choice" || T.kind === "followup" ? T.kind : null;
|
|
557
|
+
return { label: L, kind: ee };
|
|
558
558
|
}
|
|
559
559
|
return null;
|
|
560
560
|
}).filter(Boolean).slice(0, 4) : [];
|
|
561
561
|
}
|
|
562
562
|
return [];
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function W(u, m) {
|
|
565
565
|
var f;
|
|
566
|
-
const
|
|
566
|
+
const p = e.messagesByConv[u] || [];
|
|
567
567
|
let g = -1;
|
|
568
|
-
m != null && m.client_msg_id && (g =
|
|
569
|
-
(
|
|
570
|
-
)), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g =
|
|
568
|
+
m != null && m.client_msg_id && (g = p.findIndex(
|
|
569
|
+
(_) => (_ == null ? void 0 : _.client_msg_id) && _.client_msg_id === m.client_msg_id
|
|
570
|
+
)), g === -1 && (m == null ? void 0 : m.id) !== void 0 && (m == null ? void 0 : m.id) !== null && (g = p.findIndex((_) => ie(_ == null ? void 0 : _.id, m.id)));
|
|
571
571
|
let h;
|
|
572
|
-
g === -1 ? h = [...
|
|
572
|
+
g === -1 ? h = [...p, m].sort(ae) : (h = p.slice(), h[g] = { ...p[g], ...m, _pending: !1, _failed: !1 }), e.messagesByConv[u] = h, (m == null ? void 0 : m.type) === "action" && ((f = m == null ? void 0 : m.payload) != null && f.state) && m.payload.state !== "pending" && (m == null ? void 0 : m.id) != null && e.awaitingCallback[m.id] && delete e.awaitingCallback[m.id];
|
|
573
573
|
}
|
|
574
574
|
function ie(u, m) {
|
|
575
575
|
return u === m ? !0 : u == null || m == null ? !1 : String(u) === String(m);
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function J(u, m, p) {
|
|
578
578
|
const g = e.messagesByConv[u];
|
|
579
579
|
if (!g) return;
|
|
580
|
-
const h = g.findIndex((
|
|
580
|
+
const h = g.findIndex((_) => _.id === m);
|
|
581
581
|
if (h === -1) return;
|
|
582
582
|
const f = g.slice();
|
|
583
|
-
f[h] = { ...g[h], ...
|
|
583
|
+
f[h] = { ...g[h], ...p }, e.messagesByConv[u] = f;
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
const
|
|
587
|
-
if (
|
|
588
|
-
const g = e.conversations[
|
|
585
|
+
function G(u, m) {
|
|
586
|
+
const p = e.conversations.findIndex((h) => h.id === u);
|
|
587
|
+
if (p === -1) return;
|
|
588
|
+
const g = e.conversations[p];
|
|
589
589
|
if (m && (!g.last_message_at || m > g.last_message_at)) {
|
|
590
590
|
const h = e.conversations.slice();
|
|
591
|
-
h[
|
|
592
|
-
(f,
|
|
591
|
+
h[p] = { ...g, last_message_at: m }, h.sort(
|
|
592
|
+
(f, _) => (_.last_message_at || "").localeCompare(f.last_message_at || "")
|
|
593
593
|
), e.conversations = h;
|
|
594
594
|
}
|
|
595
595
|
}
|
|
@@ -598,18 +598,18 @@ function Ne(t) {
|
|
|
598
598
|
}
|
|
599
599
|
function oe(u) {
|
|
600
600
|
if (!u || typeof u != "object") return null;
|
|
601
|
-
const m = {},
|
|
601
|
+
const m = {}, p = {};
|
|
602
602
|
for (const [g, h] of Object.entries(u))
|
|
603
|
-
h !== void 0 && (g === "name" || g === "email" ? h != null && String(h).trim() !== "" && (m[g] = h) : (g === "values" || g === "metadata") && h && typeof h == "object" ? Object.assign(
|
|
604
|
-
return Object.keys(
|
|
603
|
+
h !== void 0 && (g === "name" || g === "email" ? h != null && String(h).trim() !== "" && (m[g] = h) : (g === "values" || g === "metadata") && h && typeof h == "object" ? Object.assign(p, h) : p[g] = h);
|
|
604
|
+
return Object.keys(p).length && (m.values = p), Object.keys(m).length ? m : null;
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function Z(u) {
|
|
607
607
|
const m = e.messagesByConv[u] || [];
|
|
608
|
-
let
|
|
608
|
+
let p = "";
|
|
609
609
|
for (const f of m)
|
|
610
|
-
f != null && f.created_at && f.created_at >
|
|
610
|
+
f != null && f.created_at && f.created_at > p && (p = f.created_at);
|
|
611
611
|
const g = (/* @__PURE__ */ new Date()).toISOString();
|
|
612
|
-
return !
|
|
612
|
+
return !p || g > p ? g : new Date(Date.parse(p) + 1).toISOString();
|
|
613
613
|
}
|
|
614
614
|
return {
|
|
615
615
|
state: e,
|
|
@@ -620,14 +620,14 @@ function Ne(t) {
|
|
|
620
620
|
openConversation: v,
|
|
621
621
|
loadMore: C,
|
|
622
622
|
patchConversation: S,
|
|
623
|
-
send:
|
|
623
|
+
send: R,
|
|
624
624
|
clickCallback: A,
|
|
625
625
|
signAttachment: x,
|
|
626
626
|
submitFeedback: N,
|
|
627
|
-
getPendingApproval:
|
|
628
|
-
getActionInFlight:
|
|
629
|
-
getLatestSuggestions:
|
|
630
|
-
getLatestForm:
|
|
627
|
+
getPendingApproval: F,
|
|
628
|
+
getActionInFlight: q,
|
|
629
|
+
getLatestSuggestions: Y,
|
|
630
|
+
getLatestForm: P,
|
|
631
631
|
// Pass-through for panel open/close (controls SSE burst).
|
|
632
632
|
setPanelOpen: t.setPanelOpen
|
|
633
633
|
};
|
|
@@ -658,7 +658,7 @@ function we(t = "") {
|
|
|
658
658
|
function be(t = /* @__PURE__ */ new Date()) {
|
|
659
659
|
return t.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
|
660
660
|
}
|
|
661
|
-
const
|
|
661
|
+
const Ne = `
|
|
662
662
|
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');
|
|
663
663
|
|
|
664
664
|
.wm-root {
|
|
@@ -704,12 +704,12 @@ const Pe = `
|
|
|
704
704
|
0% { transform: translateX(110%); opacity: 0; }
|
|
705
705
|
100% { transform: translateX(0); opacity: 1; }
|
|
706
706
|
}
|
|
707
|
-
`,
|
|
707
|
+
`, Pe = "https://api.messenger.victorc.fr", B = (t, e) => {
|
|
708
708
|
const n = t.__vccOpts || t;
|
|
709
709
|
for (const [a, r] of e)
|
|
710
710
|
n[a] = r;
|
|
711
711
|
return n;
|
|
712
|
-
},
|
|
712
|
+
}, He = {
|
|
713
713
|
name: "WmLauncher",
|
|
714
714
|
props: {
|
|
715
715
|
// Nombre de conversations non lues — pilote la pastille.
|
|
@@ -719,12 +719,12 @@ const Pe = `
|
|
|
719
719
|
peek: { type: String, default: "" }
|
|
720
720
|
},
|
|
721
721
|
emits: ["open", "dismiss"]
|
|
722
|
-
},
|
|
723
|
-
function
|
|
724
|
-
return l(),
|
|
725
|
-
|
|
726
|
-
default:
|
|
727
|
-
n.peek ? (l(),
|
|
722
|
+
}, ze = { class: "wm-launcherWrap" }, Ve = { class: "wm-peek__text" }, qe = ["aria-label"];
|
|
723
|
+
function We(t, e, n, a, r, s) {
|
|
724
|
+
return l(), d("div", ze, [
|
|
725
|
+
z(Se, { name: "wm-peek" }, {
|
|
726
|
+
default: xe(() => [
|
|
727
|
+
n.peek ? (l(), d("div", {
|
|
728
728
|
key: 0,
|
|
729
729
|
class: "wm-peek",
|
|
730
730
|
role: "button",
|
|
@@ -732,16 +732,16 @@ function Ge(t, e, n, a, r, s) {
|
|
|
732
732
|
"aria-label": "Ouvrir le messenger sur le dernier message",
|
|
733
733
|
onClick: e[1] || (e[1] = (o) => t.$emit("open")),
|
|
734
734
|
onKeydown: [
|
|
735
|
-
e[2] || (e[2] = me(
|
|
736
|
-
e[3] || (e[3] = me(
|
|
735
|
+
e[2] || (e[2] = me(X((o) => t.$emit("open"), ["prevent"]), ["enter"])),
|
|
736
|
+
e[3] || (e[3] = me(X((o) => t.$emit("open"), ["prevent"]), ["space"]))
|
|
737
737
|
]
|
|
738
738
|
}, [
|
|
739
|
-
i("p",
|
|
739
|
+
i("p", Ve, b(n.peek), 1),
|
|
740
740
|
i("button", {
|
|
741
741
|
type: "button",
|
|
742
742
|
class: "wm-peek__close",
|
|
743
743
|
"aria-label": "Ignorer",
|
|
744
|
-
onClick: e[0] || (e[0] =
|
|
744
|
+
onClick: e[0] || (e[0] = X((o) => t.$emit("dismiss"), ["stop"]))
|
|
745
745
|
}, [...e[5] || (e[5] = [
|
|
746
746
|
i("svg", {
|
|
747
747
|
width: "11",
|
|
@@ -780,34 +780,40 @@ function Ge(t, e, n, a, r, s) {
|
|
|
780
780
|
}, [
|
|
781
781
|
i("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
782
782
|
], -1)),
|
|
783
|
-
n.unreadCount > 0 ? (l(),
|
|
783
|
+
n.unreadCount > 0 ? (l(), d("span", {
|
|
784
784
|
key: 0,
|
|
785
785
|
class: "wm-launcher__badge",
|
|
786
786
|
"aria-label": `${n.unreadCount} conversation${n.unreadCount > 1 ? "s" : ""} non lue${n.unreadCount > 1 ? "s" : ""}`
|
|
787
|
-
}, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9,
|
|
787
|
+
}, b(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, qe)) : y("", !0)
|
|
788
788
|
])
|
|
789
789
|
]);
|
|
790
790
|
}
|
|
791
|
-
const
|
|
791
|
+
const Ge = /* @__PURE__ */ B(He, [["render", We], ["__scopeId", "data-v-fabef371"]]), Ke = {
|
|
792
792
|
name: "WmAIAvatar",
|
|
793
793
|
props: {
|
|
794
794
|
size: { type: Number, default: 26 },
|
|
795
|
-
pulse: { type: Boolean, default: !1 }
|
|
795
|
+
pulse: { type: Boolean, default: !1 },
|
|
796
|
+
// `tail` : applique la petite queue (4px) en bas-droite qui mirror
|
|
797
|
+
// le tail des bulles AI adjacentes. À activer uniquement quand
|
|
798
|
+
// l'avatar est posé à côté de messages dans le fil. Ailleurs
|
|
799
|
+
// (Header, Onboarding, ApprovalCard, FormCard…) → laissé à false
|
|
800
|
+
// pour garder l'avatar pleinement arrondi.
|
|
801
|
+
tail: { type: Boolean, default: !1 }
|
|
796
802
|
}
|
|
797
|
-
},
|
|
803
|
+
}, Ye = {
|
|
798
804
|
key: 0,
|
|
799
805
|
class: "wm-aiav__pulse"
|
|
800
|
-
},
|
|
801
|
-
function
|
|
802
|
-
return l(),
|
|
803
|
-
class: "wm-aiav",
|
|
806
|
+
}, Je = ["width", "height"];
|
|
807
|
+
function Xe(t, e, n, a, r, s) {
|
|
808
|
+
return l(), d("div", {
|
|
809
|
+
class: E(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
804
810
|
style: V({ width: n.size + "px", height: n.size + "px", "--wm-avr": n.size * 0.32 + "px" })
|
|
805
811
|
}, [
|
|
806
|
-
n.pulse ? (l(),
|
|
812
|
+
n.pulse ? (l(), d("div", Ye)) : y("", !0),
|
|
807
813
|
i("div", {
|
|
808
814
|
class: E(["wm-aiav__inner", { "wm-aiav__inner--glow": n.pulse }])
|
|
809
815
|
}, [
|
|
810
|
-
(l(),
|
|
816
|
+
(l(), d("svg", {
|
|
811
817
|
width: n.size * 0.5,
|
|
812
818
|
height: n.size * 0.5,
|
|
813
819
|
viewBox: "0 0 24 24",
|
|
@@ -833,11 +839,11 @@ function Qe(t, e, n, a, r, s) {
|
|
|
833
839
|
fill: "white",
|
|
834
840
|
opacity: "0.38"
|
|
835
841
|
}, null, -1)
|
|
836
|
-
])], 8,
|
|
842
|
+
])], 8, Je))
|
|
837
843
|
], 2)
|
|
838
|
-
],
|
|
844
|
+
], 6);
|
|
839
845
|
}
|
|
840
|
-
const
|
|
846
|
+
const Q = /* @__PURE__ */ B(Ke, [["render", Xe], ["__scopeId", "data-v-8c924688"]]), Qe = {
|
|
841
847
|
name: "WmHumanAvatar",
|
|
842
848
|
props: {
|
|
843
849
|
name: { type: String, default: "" },
|
|
@@ -852,9 +858,9 @@ const J = /* @__PURE__ */ B(Ye, [["render", Qe], ["__scopeId", "data-v-5ce9c382"
|
|
|
852
858
|
return we(this.name);
|
|
853
859
|
}
|
|
854
860
|
}
|
|
855
|
-
},
|
|
856
|
-
function
|
|
857
|
-
return l(),
|
|
861
|
+
}, Ze = ["src", "alt"];
|
|
862
|
+
function et(t, e, n, a, r, s) {
|
|
863
|
+
return l(), d("div", {
|
|
858
864
|
class: "wm-huav",
|
|
859
865
|
style: V({
|
|
860
866
|
width: n.size + "px",
|
|
@@ -863,17 +869,17 @@ function tt(t, e, n, a, r, s) {
|
|
|
863
869
|
background: s.bg
|
|
864
870
|
})
|
|
865
871
|
}, [
|
|
866
|
-
n.avatarUrl ? (l(),
|
|
872
|
+
n.avatarUrl ? (l(), d("img", {
|
|
867
873
|
key: 0,
|
|
868
874
|
src: n.avatarUrl,
|
|
869
875
|
alt: n.name || ""
|
|
870
|
-
}, null, 8,
|
|
876
|
+
}, null, 8, Ze)) : (l(), d("span", {
|
|
871
877
|
key: 1,
|
|
872
878
|
style: V({ fontSize: n.size * 0.36 + "px" })
|
|
873
879
|
}, b(s.initials), 5))
|
|
874
880
|
], 4);
|
|
875
881
|
}
|
|
876
|
-
const ke = /* @__PURE__ */ B(
|
|
882
|
+
const ke = /* @__PURE__ */ B(Qe, [["render", et], ["__scopeId", "data-v-a772b179"]]), tt = {
|
|
877
883
|
name: "WmTeamAvatars",
|
|
878
884
|
props: {
|
|
879
885
|
members: { type: Array, default: () => [] },
|
|
@@ -895,37 +901,37 @@ const ke = /* @__PURE__ */ B(Ze, [["render", tt], ["__scopeId", "data-v-a772b179
|
|
|
895
901
|
return we(t.name || "");
|
|
896
902
|
}
|
|
897
903
|
}
|
|
898
|
-
},
|
|
904
|
+
}, nt = {
|
|
899
905
|
key: 0,
|
|
900
906
|
class: "wm-team"
|
|
901
|
-
},
|
|
907
|
+
}, st = ["src", "alt"], rt = { key: 1 }, it = {
|
|
902
908
|
key: 0,
|
|
903
909
|
class: "wm-team__label"
|
|
904
910
|
};
|
|
905
|
-
function
|
|
906
|
-
return s.visible ? (l(),
|
|
911
|
+
function at(t, e, n, a, r, s) {
|
|
912
|
+
return s.visible ? (l(), d("div", nt, [
|
|
907
913
|
i("div", {
|
|
908
914
|
class: "wm-team__stack",
|
|
909
915
|
style: V({ width: s.stackWidth + "px" })
|
|
910
916
|
}, [
|
|
911
|
-
(l(!0),
|
|
912
|
-
key:
|
|
917
|
+
(l(!0), d(M, null, j(n.members.slice(0, 3), (o, c) => (l(), d("div", {
|
|
918
|
+
key: c,
|
|
913
919
|
class: "wm-team__pill",
|
|
914
|
-
style: V({ left:
|
|
920
|
+
style: V({ left: c * 13 + "px", zIndex: 3 - c, background: s.colorFor(o) })
|
|
915
921
|
}, [
|
|
916
|
-
o.avatar_url ? (l(),
|
|
922
|
+
o.avatar_url ? (l(), d("img", {
|
|
917
923
|
key: 0,
|
|
918
924
|
src: o.avatar_url,
|
|
919
925
|
alt: o.name || ""
|
|
920
|
-
}, null, 8,
|
|
926
|
+
}, null, 8, st)) : (l(), d("span", rt, b(s.initialsFor(o)), 1))
|
|
921
927
|
], 4))), 128))
|
|
922
928
|
], 4),
|
|
923
|
-
n.responseLabel ? (l(),
|
|
929
|
+
n.responseLabel ? (l(), d("span", it, b(n.responseLabel), 1)) : y("", !0)
|
|
924
930
|
])) : y("", !0);
|
|
925
931
|
}
|
|
926
|
-
const
|
|
932
|
+
const ot = /* @__PURE__ */ B(tt, [["render", at], ["__scopeId", "data-v-3659b9c1"]]), lt = {
|
|
927
933
|
name: "WmHeader",
|
|
928
|
-
components: { AIAvatar:
|
|
934
|
+
components: { AIAvatar: Q, HumanAvatar: ke, TeamAvatars: ot },
|
|
929
935
|
props: {
|
|
930
936
|
title: { type: String, default: "Nouvelle conversation" },
|
|
931
937
|
escalated: { type: Boolean, default: !1 },
|
|
@@ -956,20 +962,20 @@ const lt = /* @__PURE__ */ B(nt, [["render", ot], ["__scopeId", "data-v-3659b9c1
|
|
|
956
962
|
return this.escalated && this.agentName ? this.agentName : "En ligne";
|
|
957
963
|
}
|
|
958
964
|
}
|
|
959
|
-
},
|
|
965
|
+
}, ct = { class: "wm-header" }, dt = {
|
|
960
966
|
key: 1,
|
|
961
967
|
style: { width: "30px", height: "30px", "flex-shrink": "0" }
|
|
962
|
-
},
|
|
968
|
+
}, ut = { class: "wm-header__avatar" }, ht = { class: "wm-header__main" }, mt = { class: "wm-header__title" }, ft = {
|
|
963
969
|
key: 0,
|
|
964
970
|
class: "wm-header__sub"
|
|
965
|
-
}, pt = { class: "wm-header__status" },
|
|
971
|
+
}, pt = { class: "wm-header__status" }, _t = {
|
|
966
972
|
key: 3,
|
|
967
973
|
class: "wm-header__fill"
|
|
968
|
-
},
|
|
969
|
-
function
|
|
970
|
-
const o =
|
|
971
|
-
return l(),
|
|
972
|
-
n.showBack ? (l(),
|
|
974
|
+
}, vt = { class: "wm-header__actions" };
|
|
975
|
+
function gt(t, e, n, a, r, s) {
|
|
976
|
+
const o = O("HumanAvatar"), c = O("AIAvatar"), v = O("TeamAvatars");
|
|
977
|
+
return l(), d("div", ct, [
|
|
978
|
+
n.showBack ? (l(), d("button", {
|
|
973
979
|
key: 0,
|
|
974
980
|
type: "button",
|
|
975
981
|
class: "wm-header__icon",
|
|
@@ -989,22 +995,22 @@ function yt(t, e, n, a, r, s) {
|
|
|
989
995
|
}, [
|
|
990
996
|
i("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
991
997
|
], -1)
|
|
992
|
-
])])) : (l(),
|
|
993
|
-
n.showIdentity ? (l(),
|
|
994
|
-
i("div",
|
|
998
|
+
])])) : (l(), d("div", dt)),
|
|
999
|
+
n.showIdentity ? (l(), d(M, { key: 2 }, [
|
|
1000
|
+
i("div", ut, [
|
|
995
1001
|
n.escalated ? (l(), $(o, {
|
|
996
1002
|
key: 0,
|
|
997
1003
|
name: n.agentName,
|
|
998
1004
|
"avatar-url": n.agentAvatarUrl,
|
|
999
1005
|
size: 34
|
|
1000
|
-
}, null, 8, ["name", "avatar-url"])) : (l(), $(
|
|
1006
|
+
}, null, 8, ["name", "avatar-url"])) : (l(), $(c, {
|
|
1001
1007
|
key: 1,
|
|
1002
1008
|
size: 34
|
|
1003
1009
|
}))
|
|
1004
1010
|
]),
|
|
1005
|
-
i("div",
|
|
1006
|
-
i("div",
|
|
1007
|
-
s.showPresence ? (l(),
|
|
1011
|
+
i("div", ht, [
|
|
1012
|
+
i("div", mt, b(n.title), 1),
|
|
1013
|
+
s.showPresence ? (l(), d("div", ft, [
|
|
1008
1014
|
s.hasTeam ? (l(), $(v, {
|
|
1009
1015
|
key: 0,
|
|
1010
1016
|
members: n.teamMembers,
|
|
@@ -1012,13 +1018,13 @@ function yt(t, e, n, a, r, s) {
|
|
|
1012
1018
|
}, null, 8, ["members", "response-label"])) : y("", !0),
|
|
1013
1019
|
i("span", pt, [
|
|
1014
1020
|
e[4] || (e[4] = i("span", { class: "wm-header__dot" }, null, -1)),
|
|
1015
|
-
|
|
1021
|
+
re(" " + b(s.statusText), 1)
|
|
1016
1022
|
])
|
|
1017
1023
|
])) : y("", !0)
|
|
1018
1024
|
])
|
|
1019
|
-
], 64)) : (l(),
|
|
1020
|
-
i("div",
|
|
1021
|
-
n.showMore ? (l(),
|
|
1025
|
+
], 64)) : (l(), d("div", _t)),
|
|
1026
|
+
i("div", vt, [
|
|
1027
|
+
n.showMore ? (l(), d("button", {
|
|
1022
1028
|
key: 0,
|
|
1023
1029
|
type: "button",
|
|
1024
1030
|
class: E(["wm-header__icon", { "wm-header__icon--active": n.moreActive }]),
|
|
@@ -1050,7 +1056,7 @@ function yt(t, e, n, a, r, s) {
|
|
|
1050
1056
|
})
|
|
1051
1057
|
], -1)
|
|
1052
1058
|
])], 2)) : y("", !0),
|
|
1053
|
-
n.showClose ? (l(),
|
|
1059
|
+
n.showClose ? (l(), d("button", {
|
|
1054
1060
|
key: 1,
|
|
1055
1061
|
type: "button",
|
|
1056
1062
|
class: "wm-header__icon",
|
|
@@ -1075,15 +1081,15 @@ function yt(t, e, n, a, r, s) {
|
|
|
1075
1081
|
])
|
|
1076
1082
|
]);
|
|
1077
1083
|
}
|
|
1078
|
-
const
|
|
1084
|
+
const yt = /* @__PURE__ */ B(lt, [["render", gt], ["__scopeId", "data-v-b5f5f6a9"]]), pe = {
|
|
1079
1085
|
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",
|
|
1080
1086
|
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",
|
|
1081
1087
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
1082
1088
|
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",
|
|
1083
1089
|
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"
|
|
1084
|
-
},
|
|
1090
|
+
}, wt = {
|
|
1085
1091
|
name: "WmOnboarding",
|
|
1086
|
-
components: { AIAvatar:
|
|
1092
|
+
components: { AIAvatar: Q },
|
|
1087
1093
|
props: {
|
|
1088
1094
|
welcomeMessage: { type: String, default: "" },
|
|
1089
1095
|
agentName: { type: String, default: "" },
|
|
@@ -1103,16 +1109,16 @@ Je réponds en quelques secondes.`;
|
|
|
1103
1109
|
},
|
|
1104
1110
|
methods: {
|
|
1105
1111
|
iconPath(t) {
|
|
1106
|
-
return
|
|
1112
|
+
return pe[t] || pe.link;
|
|
1107
1113
|
}
|
|
1108
1114
|
}
|
|
1109
|
-
},
|
|
1115
|
+
}, bt = { class: "wm-onb" }, kt = { class: "wm-onb__hero" }, Ct = { class: "wm-onb__title" }, At = { class: "wm-onb__sub" }, St = {
|
|
1110
1116
|
key: 0,
|
|
1111
1117
|
class: "wm-onb__section"
|
|
1112
|
-
},
|
|
1118
|
+
}, xt = { class: "wm-onb__links" }, Mt = ["onClick"], Tt = { class: "wm-onb__resume-body" }, It = { class: "wm-onb__resume-title" }, Ot = { class: "wm-onb__resume-preview" }, Et = {
|
|
1113
1119
|
key: 1,
|
|
1114
1120
|
class: "wm-onb__section"
|
|
1115
|
-
},
|
|
1121
|
+
}, Bt = { class: "wm-onb__links" }, Lt = ["onClick"], Rt = { class: "wm-onb__link-icon" }, $t = {
|
|
1116
1122
|
width: "14",
|
|
1117
1123
|
height: "14",
|
|
1118
1124
|
viewBox: "0 0 24 24",
|
|
@@ -1122,26 +1128,26 @@ Je réponds en quelques secondes.`;
|
|
|
1122
1128
|
"stroke-linecap": "round",
|
|
1123
1129
|
"stroke-linejoin": "round",
|
|
1124
1130
|
"aria-hidden": "true"
|
|
1125
|
-
},
|
|
1126
|
-
function
|
|
1127
|
-
const o =
|
|
1128
|
-
return l(),
|
|
1129
|
-
i("div",
|
|
1130
|
-
|
|
1131
|
+
}, Ft = ["d"], jt = { class: "wm-onb__link-label" }, Ut = { class: "wm-onb__cta" }, Dt = ["disabled"];
|
|
1132
|
+
function Nt(t, e, n, a, r, s) {
|
|
1133
|
+
const o = O("AIAvatar");
|
|
1134
|
+
return l(), d("div", bt, [
|
|
1135
|
+
i("div", kt, [
|
|
1136
|
+
z(o, {
|
|
1131
1137
|
size: 56,
|
|
1132
1138
|
pulse: !0
|
|
1133
1139
|
}),
|
|
1134
|
-
i("div",
|
|
1135
|
-
i("div",
|
|
1140
|
+
i("div", Ct, b(s.heroTitle), 1),
|
|
1141
|
+
i("div", At, b(s.heroSub), 1)
|
|
1136
1142
|
]),
|
|
1137
|
-
n.unreadThreads.length ? (l(),
|
|
1143
|
+
n.unreadThreads.length ? (l(), d("div", St, [
|
|
1138
1144
|
e[3] || (e[3] = i("div", { class: "wm-onb__section-title" }, "Messages non lus", -1)),
|
|
1139
|
-
i("div",
|
|
1140
|
-
(l(!0),
|
|
1141
|
-
key:
|
|
1145
|
+
i("div", xt, [
|
|
1146
|
+
(l(!0), d(M, null, j(n.unreadThreads, (c) => (l(), d("button", {
|
|
1147
|
+
key: c.id,
|
|
1142
1148
|
type: "button",
|
|
1143
1149
|
class: "wm-onb__link wm-onb__resume",
|
|
1144
|
-
onClick: (v) => t.$emit("resume",
|
|
1150
|
+
onClick: (v) => t.$emit("resume", c)
|
|
1145
1151
|
}, [
|
|
1146
1152
|
e[1] || (e[1] = i("span", { class: "wm-onb__link-icon wm-onb__resume-icon" }, [
|
|
1147
1153
|
i("svg", {
|
|
@@ -1162,9 +1168,9 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1162
1168
|
"aria-label": "Non lu"
|
|
1163
1169
|
})
|
|
1164
1170
|
], -1)),
|
|
1165
|
-
i("span",
|
|
1166
|
-
i("span", It, b(
|
|
1167
|
-
i("span",
|
|
1171
|
+
i("span", Tt, [
|
|
1172
|
+
i("span", It, b(c.title), 1),
|
|
1173
|
+
i("span", Ot, b(c.preview), 1)
|
|
1168
1174
|
]),
|
|
1169
1175
|
e[2] || (e[2] = i("svg", {
|
|
1170
1176
|
width: "13",
|
|
@@ -1180,26 +1186,26 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1180
1186
|
}, [
|
|
1181
1187
|
i("path", { d: "M9 18l6-6-6-6" })
|
|
1182
1188
|
], -1))
|
|
1183
|
-
], 8,
|
|
1189
|
+
], 8, Mt))), 128))
|
|
1184
1190
|
])
|
|
1185
1191
|
])) : y("", !0),
|
|
1186
|
-
n.quickLinks.length ? (l(),
|
|
1192
|
+
n.quickLinks.length ? (l(), d("div", Et, [
|
|
1187
1193
|
e[5] || (e[5] = i("div", { class: "wm-onb__section-title" }, "Accès rapide", -1)),
|
|
1188
|
-
i("div",
|
|
1189
|
-
(l(!0),
|
|
1194
|
+
i("div", Bt, [
|
|
1195
|
+
(l(!0), d(M, null, j(n.quickLinks, (c, v) => (l(), d("button", {
|
|
1190
1196
|
key: v,
|
|
1191
1197
|
type: "button",
|
|
1192
1198
|
class: "wm-onb__link",
|
|
1193
|
-
onClick: (C) => t.$emit("select",
|
|
1199
|
+
onClick: (C) => t.$emit("select", c)
|
|
1194
1200
|
}, [
|
|
1195
|
-
i("span",
|
|
1196
|
-
(l(),
|
|
1201
|
+
i("span", Rt, [
|
|
1202
|
+
(l(), d("svg", $t, [
|
|
1197
1203
|
i("path", {
|
|
1198
|
-
d: s.iconPath(
|
|
1199
|
-
}, null, 8,
|
|
1204
|
+
d: s.iconPath(c.icon)
|
|
1205
|
+
}, null, 8, Ft)
|
|
1200
1206
|
]))
|
|
1201
1207
|
]),
|
|
1202
|
-
i("span",
|
|
1208
|
+
i("span", jt, b(c.label), 1),
|
|
1203
1209
|
e[4] || (e[4] = i("svg", {
|
|
1204
1210
|
width: "13",
|
|
1205
1211
|
height: "13",
|
|
@@ -1214,20 +1220,106 @@ function Pt(t, e, n, a, r, s) {
|
|
|
1214
1220
|
}, [
|
|
1215
1221
|
i("path", { d: "M9 18l6-6-6-6" })
|
|
1216
1222
|
], -1))
|
|
1217
|
-
], 8,
|
|
1223
|
+
], 8, Lt))), 128))
|
|
1218
1224
|
])
|
|
1219
1225
|
])) : y("", !0),
|
|
1220
|
-
i("div",
|
|
1226
|
+
i("div", Ut, [
|
|
1221
1227
|
i("button", {
|
|
1222
1228
|
type: "button",
|
|
1223
1229
|
class: "wm-onb__startBtn",
|
|
1224
1230
|
disabled: n.busy,
|
|
1225
|
-
onClick: e[0] || (e[0] = (
|
|
1226
|
-
}, b(n.busy ? "…" : "Commencer une conversation"), 9,
|
|
1231
|
+
onClick: e[0] || (e[0] = (c) => t.$emit("start"))
|
|
1232
|
+
}, b(n.busy ? "…" : "Commencer une conversation"), 9, Dt)
|
|
1227
1233
|
])
|
|
1228
1234
|
]);
|
|
1229
1235
|
}
|
|
1230
|
-
const
|
|
1236
|
+
const Pt = /* @__PURE__ */ B(wt, [["render", Nt], ["__scopeId", "data-v-bd89bc8f"]]);
|
|
1237
|
+
function Ht(t) {
|
|
1238
|
+
return typeof t != "string" ? "" : t.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
|
|
1239
|
+
}
|
|
1240
|
+
const zt = {
|
|
1241
|
+
name: "WmActionResult",
|
|
1242
|
+
props: {
|
|
1243
|
+
state: { type: String, default: "success" },
|
|
1244
|
+
// 'success' | 'failure' | 'rejected'
|
|
1245
|
+
label: { type: String, required: !0 },
|
|
1246
|
+
detail: { type: String, default: "" }
|
|
1247
|
+
},
|
|
1248
|
+
computed: {
|
|
1249
|
+
detailText() {
|
|
1250
|
+
return Ht(this.detail);
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
}, Vt = {
|
|
1254
|
+
class: "wm-result__icon",
|
|
1255
|
+
"aria-hidden": "true"
|
|
1256
|
+
}, qt = {
|
|
1257
|
+
key: 0,
|
|
1258
|
+
width: "11",
|
|
1259
|
+
height: "11",
|
|
1260
|
+
viewBox: "0 0 24 24",
|
|
1261
|
+
fill: "none",
|
|
1262
|
+
stroke: "currentColor",
|
|
1263
|
+
"stroke-width": "2.8",
|
|
1264
|
+
"stroke-linecap": "round",
|
|
1265
|
+
"stroke-linejoin": "round"
|
|
1266
|
+
}, Wt = {
|
|
1267
|
+
key: 1,
|
|
1268
|
+
width: "11",
|
|
1269
|
+
height: "11",
|
|
1270
|
+
viewBox: "0 0 24 24",
|
|
1271
|
+
fill: "none",
|
|
1272
|
+
stroke: "currentColor",
|
|
1273
|
+
"stroke-width": "2.6",
|
|
1274
|
+
"stroke-linecap": "round",
|
|
1275
|
+
"stroke-linejoin": "round"
|
|
1276
|
+
}, Gt = {
|
|
1277
|
+
key: 2,
|
|
1278
|
+
width: "12",
|
|
1279
|
+
height: "12",
|
|
1280
|
+
viewBox: "0 0 24 24",
|
|
1281
|
+
fill: "none",
|
|
1282
|
+
stroke: "currentColor",
|
|
1283
|
+
"stroke-width": "2.2",
|
|
1284
|
+
"stroke-linecap": "round",
|
|
1285
|
+
"stroke-linejoin": "round"
|
|
1286
|
+
}, Kt = { class: "wm-result__label" }, Yt = { class: "wm-result__detail" };
|
|
1287
|
+
function Jt(t, e, n, a, r, s) {
|
|
1288
|
+
return l(), d("div", {
|
|
1289
|
+
class: E(["wm-result", `wm-result--${n.state}`])
|
|
1290
|
+
}, [
|
|
1291
|
+
i("span", Vt, [
|
|
1292
|
+
n.state === "success" ? (l(), d("svg", qt, [...e[0] || (e[0] = [
|
|
1293
|
+
i("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
1294
|
+
])])) : n.state === "rejected" ? (l(), d("svg", Wt, [...e[1] || (e[1] = [
|
|
1295
|
+
i("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
1296
|
+
])])) : (l(), d("svg", Gt, [...e[2] || (e[2] = [
|
|
1297
|
+
i("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),
|
|
1298
|
+
i("line", {
|
|
1299
|
+
x1: "12",
|
|
1300
|
+
y1: "9",
|
|
1301
|
+
x2: "12",
|
|
1302
|
+
y2: "13"
|
|
1303
|
+
}, null, -1),
|
|
1304
|
+
i("line", {
|
|
1305
|
+
x1: "12",
|
|
1306
|
+
y1: "17",
|
|
1307
|
+
x2: "12.01",
|
|
1308
|
+
y2: "17"
|
|
1309
|
+
}, null, -1)
|
|
1310
|
+
])]))
|
|
1311
|
+
]),
|
|
1312
|
+
i("span", Kt, b(n.label), 1),
|
|
1313
|
+
s.detailText ? (l(), d(M, { key: 0 }, [
|
|
1314
|
+
e[3] || (e[3] = i("span", {
|
|
1315
|
+
class: "wm-result__sep",
|
|
1316
|
+
"aria-hidden": "true"
|
|
1317
|
+
}, "·", -1)),
|
|
1318
|
+
i("span", Yt, b(s.detailText), 1)
|
|
1319
|
+
], 64)) : y("", !0)
|
|
1320
|
+
], 2);
|
|
1321
|
+
}
|
|
1322
|
+
const Xt = /* @__PURE__ */ B(zt, [["render", Jt], ["__scopeId", "data-v-c922734d"]]), Qt = {
|
|
1231
1323
|
name: "WmArtifactFormResponse",
|
|
1232
1324
|
props: {
|
|
1233
1325
|
data: { type: Object, required: !0 }
|
|
@@ -1238,11 +1330,11 @@ const Ht = /* @__PURE__ */ B(bt, [["render", Pt], ["__scopeId", "data-v-bd89bc8f
|
|
|
1238
1330
|
return Array.isArray((t = this.data) == null ? void 0 : t.fields) ? this.data.fields : [];
|
|
1239
1331
|
}
|
|
1240
1332
|
}
|
|
1241
|
-
},
|
|
1242
|
-
function
|
|
1243
|
-
return l(),
|
|
1244
|
-
i("div",
|
|
1245
|
-
i("div",
|
|
1333
|
+
}, Zt = { class: "wm-art wm-art--formResponse" }, en = { class: "wm-art__head" }, tn = { class: "wm-art__title" }, nn = { class: "wm-art__body" }, sn = { class: "wm-art__fieldLabel" };
|
|
1334
|
+
function rn(t, e, n, a, r, s) {
|
|
1335
|
+
return l(), d("div", Zt, [
|
|
1336
|
+
i("div", en, [
|
|
1337
|
+
i("div", tn, b(n.data.title || "Formulaire"), 1),
|
|
1246
1338
|
e[0] || (e[0] = i("span", { class: "wm-art__badge wm-art__badge--success" }, [
|
|
1247
1339
|
i("svg", {
|
|
1248
1340
|
width: "11",
|
|
@@ -1257,15 +1349,15 @@ function Yt(t, e, n, a, r, s) {
|
|
|
1257
1349
|
}, [
|
|
1258
1350
|
i("polyline", { points: "20 6 9 17 4 12" })
|
|
1259
1351
|
]),
|
|
1260
|
-
|
|
1352
|
+
re(" Envoyé ")
|
|
1261
1353
|
], -1))
|
|
1262
1354
|
]),
|
|
1263
|
-
i("div",
|
|
1264
|
-
(l(!0),
|
|
1265
|
-
key:
|
|
1355
|
+
i("div", nn, [
|
|
1356
|
+
(l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
|
|
1357
|
+
key: c,
|
|
1266
1358
|
class: "wm-art__field"
|
|
1267
1359
|
}, [
|
|
1268
|
-
i("div",
|
|
1360
|
+
i("div", sn, b(o.label), 1),
|
|
1269
1361
|
i("div", {
|
|
1270
1362
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1271
1363
|
}, b(o.value), 3)
|
|
@@ -1273,7 +1365,7 @@ function Yt(t, e, n, a, r, s) {
|
|
|
1273
1365
|
])
|
|
1274
1366
|
]);
|
|
1275
1367
|
}
|
|
1276
|
-
const
|
|
1368
|
+
const an = /* @__PURE__ */ B(Qt, [["render", rn], ["__scopeId", "data-v-812bda8b"]]), on = {
|
|
1277
1369
|
name: "WmArtifactInfoCard",
|
|
1278
1370
|
props: {
|
|
1279
1371
|
data: { type: Object, required: !0 }
|
|
@@ -1288,45 +1380,45 @@ const Jt = /* @__PURE__ */ B(zt, [["render", Yt], ["__scopeId", "data-v-812bda8b
|
|
|
1288
1380
|
return !!((t = this.data) != null && t.body) || this.fields.length > 0;
|
|
1289
1381
|
}
|
|
1290
1382
|
}
|
|
1291
|
-
},
|
|
1383
|
+
}, ln = { class: "wm-art wm-art--infoCard" }, cn = {
|
|
1292
1384
|
key: 0,
|
|
1293
1385
|
class: "wm-art__image"
|
|
1294
|
-
},
|
|
1386
|
+
}, dn = ["src", "alt"], un = { class: "wm-art__head" }, hn = { class: "wm-art__headMain" }, mn = { class: "wm-art__title" }, fn = {
|
|
1295
1387
|
key: 0,
|
|
1296
1388
|
class: "wm-art__subtitle"
|
|
1297
|
-
},
|
|
1389
|
+
}, pn = {
|
|
1298
1390
|
key: 1,
|
|
1299
1391
|
class: "wm-art__body"
|
|
1300
|
-
},
|
|
1392
|
+
}, _n = {
|
|
1301
1393
|
key: 0,
|
|
1302
1394
|
class: "wm-art__text"
|
|
1303
|
-
},
|
|
1304
|
-
function
|
|
1305
|
-
return l(),
|
|
1306
|
-
n.data.image_url ? (l(),
|
|
1395
|
+
}, vn = { class: "wm-art__fieldLabel" };
|
|
1396
|
+
function gn(t, e, n, a, r, s) {
|
|
1397
|
+
return l(), d("div", ln, [
|
|
1398
|
+
n.data.image_url ? (l(), d("figure", cn, [
|
|
1307
1399
|
i("img", {
|
|
1308
1400
|
src: n.data.image_url,
|
|
1309
1401
|
alt: n.data.title || "",
|
|
1310
1402
|
loading: "lazy"
|
|
1311
|
-
}, null, 8,
|
|
1403
|
+
}, null, 8, dn)
|
|
1312
1404
|
])) : y("", !0),
|
|
1313
|
-
i("div",
|
|
1314
|
-
i("div",
|
|
1315
|
-
i("div",
|
|
1316
|
-
n.data.subtitle ? (l(),
|
|
1405
|
+
i("div", un, [
|
|
1406
|
+
i("div", hn, [
|
|
1407
|
+
i("div", mn, b(n.data.title), 1),
|
|
1408
|
+
n.data.subtitle ? (l(), d("div", fn, b(n.data.subtitle), 1)) : y("", !0)
|
|
1317
1409
|
]),
|
|
1318
|
-
n.data.badge && n.data.badge.label ? (l(),
|
|
1410
|
+
n.data.badge && n.data.badge.label ? (l(), d("span", {
|
|
1319
1411
|
key: 0,
|
|
1320
1412
|
class: E(["wm-art__badge", `wm-art__badge--${n.data.badge.tone || "neutral"}`])
|
|
1321
1413
|
}, b(n.data.badge.label), 3)) : y("", !0)
|
|
1322
1414
|
]),
|
|
1323
|
-
s.hasBody ? (l(),
|
|
1324
|
-
n.data.body ? (l(),
|
|
1325
|
-
s.fields.length ? (l(!0),
|
|
1326
|
-
key:
|
|
1415
|
+
s.hasBody ? (l(), d("div", pn, [
|
|
1416
|
+
n.data.body ? (l(), d("div", _n, b(n.data.body), 1)) : y("", !0),
|
|
1417
|
+
s.fields.length ? (l(!0), d(M, { key: 1 }, j(s.fields, (o, c) => (l(), d("div", {
|
|
1418
|
+
key: c,
|
|
1327
1419
|
class: "wm-art__field"
|
|
1328
1420
|
}, [
|
|
1329
|
-
i("div",
|
|
1421
|
+
i("div", vn, b(o.label), 1),
|
|
1330
1422
|
i("div", {
|
|
1331
1423
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1332
1424
|
}, b(o.value), 3)
|
|
@@ -1334,15 +1426,15 @@ function cn(t, e, n, a, r, s) {
|
|
|
1334
1426
|
])) : y("", !0)
|
|
1335
1427
|
]);
|
|
1336
1428
|
}
|
|
1337
|
-
const
|
|
1338
|
-
function
|
|
1429
|
+
const yn = /* @__PURE__ */ B(on, [["render", gn], ["__scopeId", "data-v-d7369333"]]);
|
|
1430
|
+
function wn(t) {
|
|
1339
1431
|
if (!t) return "";
|
|
1340
1432
|
const e = new Date(t);
|
|
1341
1433
|
if (Number.isNaN(e.getTime())) return t;
|
|
1342
1434
|
const n = e.toLocaleDateString("fr-FR", { day: "numeric", month: "long", year: "numeric" }), a = e.toLocaleTimeString("fr-FR", { hour: "2-digit", minute: "2-digit" });
|
|
1343
1435
|
return `${n} à ${a}`;
|
|
1344
1436
|
}
|
|
1345
|
-
const
|
|
1437
|
+
const bn = {
|
|
1346
1438
|
name: "WmArtifactTicket",
|
|
1347
1439
|
props: {
|
|
1348
1440
|
data: { type: Object, required: !0 }
|
|
@@ -1354,7 +1446,7 @@ const hn = {
|
|
|
1354
1446
|
},
|
|
1355
1447
|
formattedDate() {
|
|
1356
1448
|
var t;
|
|
1357
|
-
return
|
|
1449
|
+
return wn((t = this.data) == null ? void 0 : t.created_at);
|
|
1358
1450
|
}
|
|
1359
1451
|
},
|
|
1360
1452
|
methods: {
|
|
@@ -1371,22 +1463,22 @@ const hn = {
|
|
|
1371
1463
|
return /high|haute|élev|elev|critic|critiq|urgent/.test(e) ? 3 : /low|basse|faible|minor/.test(e) ? 1 : 2;
|
|
1372
1464
|
}
|
|
1373
1465
|
}
|
|
1374
|
-
},
|
|
1466
|
+
}, kn = { class: "wm-art wm-art--ticket" }, Cn = { class: "wm-art__head wm-tk__head" }, An = { class: "wm-art__title wm-tk__title" }, Sn = { class: "wm-tk__sub" }, xn = { class: "wm-tk__ref" }, Mn = {
|
|
1375
1467
|
key: 0,
|
|
1376
1468
|
class: "wm-tk__text"
|
|
1377
|
-
},
|
|
1469
|
+
}, Tn = {
|
|
1378
1470
|
key: 0,
|
|
1379
1471
|
class: "wm-art__body"
|
|
1380
|
-
},
|
|
1472
|
+
}, In = { class: "wm-art__fieldLabel" }, On = ["data-level"], En = {
|
|
1381
1473
|
key: 1,
|
|
1382
1474
|
class: "wm-art__footer wm-tk__footer"
|
|
1383
1475
|
};
|
|
1384
|
-
function
|
|
1385
|
-
return l(),
|
|
1386
|
-
i("div",
|
|
1387
|
-
i("div",
|
|
1388
|
-
i("div",
|
|
1389
|
-
i("div",
|
|
1476
|
+
function Bn(t, e, n, a, r, s) {
|
|
1477
|
+
return l(), d("div", kn, [
|
|
1478
|
+
i("div", Cn, [
|
|
1479
|
+
i("div", An, b(n.data.title), 1),
|
|
1480
|
+
i("div", Sn, [
|
|
1481
|
+
i("div", xn, [
|
|
1390
1482
|
e[0] || (e[0] = i("svg", {
|
|
1391
1483
|
width: "11",
|
|
1392
1484
|
height: "11",
|
|
@@ -1410,21 +1502,21 @@ function Cn(t, e, n, a, r, s) {
|
|
|
1410
1502
|
class: "wm-tk__dot",
|
|
1411
1503
|
"aria-hidden": "true"
|
|
1412
1504
|
}, null, -1)),
|
|
1413
|
-
|
|
1505
|
+
re(" " + b(n.data.status.label), 1)
|
|
1414
1506
|
], 2)
|
|
1415
1507
|
]),
|
|
1416
|
-
n.data.body ? (l(),
|
|
1508
|
+
n.data.body ? (l(), d("div", Mn, b(n.data.body), 1)) : y("", !0)
|
|
1417
1509
|
]),
|
|
1418
|
-
s.fields.length ? (l(),
|
|
1419
|
-
(l(!0),
|
|
1420
|
-
key:
|
|
1510
|
+
s.fields.length ? (l(), d("div", Tn, [
|
|
1511
|
+
(l(!0), d(M, null, j(s.fields, (o, c) => (l(), d("div", {
|
|
1512
|
+
key: c,
|
|
1421
1513
|
class: "wm-art__field"
|
|
1422
1514
|
}, [
|
|
1423
|
-
i("div",
|
|
1515
|
+
i("div", In, b(o.label), 1),
|
|
1424
1516
|
i("div", {
|
|
1425
1517
|
class: E(["wm-art__fieldValue", { "wm-art__fieldValue--multi": o.multiline }])
|
|
1426
1518
|
}, [
|
|
1427
|
-
s.isPriority(o.label) ? (l(),
|
|
1519
|
+
s.isPriority(o.label) ? (l(), d("svg", {
|
|
1428
1520
|
key: 0,
|
|
1429
1521
|
class: "wm-tk__prio",
|
|
1430
1522
|
"data-level": s.priorityLevel(o.value),
|
|
@@ -1454,12 +1546,12 @@ function Cn(t, e, n, a, r, s) {
|
|
|
1454
1546
|
height: "9",
|
|
1455
1547
|
rx: "0.5"
|
|
1456
1548
|
}, null, -1)
|
|
1457
|
-
])], 8,
|
|
1549
|
+
])], 8, On)) : y("", !0),
|
|
1458
1550
|
i("span", null, b(o.value), 1)
|
|
1459
1551
|
], 2)
|
|
1460
1552
|
]))), 128))
|
|
1461
1553
|
])) : y("", !0),
|
|
1462
|
-
n.data.created_at ? (l(),
|
|
1554
|
+
n.data.created_at ? (l(), d("div", En, [
|
|
1463
1555
|
e[3] || (e[3] = i("svg", {
|
|
1464
1556
|
width: "11",
|
|
1465
1557
|
height: "11",
|
|
@@ -1484,11 +1576,11 @@ function Cn(t, e, n, a, r, s) {
|
|
|
1484
1576
|
])) : y("", !0)
|
|
1485
1577
|
]);
|
|
1486
1578
|
}
|
|
1487
|
-
const
|
|
1488
|
-
form_response:
|
|
1489
|
-
info_card:
|
|
1490
|
-
ticket:
|
|
1491
|
-
},
|
|
1579
|
+
const Ln = /* @__PURE__ */ B(bn, [["render", Bn], ["__scopeId", "data-v-e0935e32"]]), Rn = {
|
|
1580
|
+
form_response: an,
|
|
1581
|
+
info_card: yn,
|
|
1582
|
+
ticket: Ln
|
|
1583
|
+
}, $n = {
|
|
1492
1584
|
name: "WmArtifactRenderer",
|
|
1493
1585
|
props: {
|
|
1494
1586
|
// Forme : { kind: string, data: any } (le `data` est validé
|
|
@@ -1499,114 +1591,17 @@ const An = /* @__PURE__ */ B(hn, [["render", Cn], ["__scopeId", "data-v-e0935e32
|
|
|
1499
1591
|
component() {
|
|
1500
1592
|
var e;
|
|
1501
1593
|
const t = (e = this.artifact) == null ? void 0 : e.kind;
|
|
1502
|
-
return t &&
|
|
1594
|
+
return t && Rn[t] || null;
|
|
1503
1595
|
}
|
|
1504
1596
|
}
|
|
1505
1597
|
};
|
|
1506
|
-
function
|
|
1507
|
-
return s.component ? (l(), $(
|
|
1598
|
+
function Fn(t, e, n, a, r, s) {
|
|
1599
|
+
return s.component ? (l(), $(Me(s.component), {
|
|
1508
1600
|
key: 0,
|
|
1509
1601
|
data: n.artifact.data
|
|
1510
1602
|
}, null, 8, ["data"])) : y("", !0);
|
|
1511
1603
|
}
|
|
1512
|
-
const
|
|
1513
|
-
function Tn(t) {
|
|
1514
|
-
return typeof t != "string" ? "" : t.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
|
|
1515
|
-
}
|
|
1516
|
-
const On = {
|
|
1517
|
-
name: "WmActionResult",
|
|
1518
|
-
components: { ArtifactRenderer: Ce },
|
|
1519
|
-
props: {
|
|
1520
|
-
state: { type: String, default: "success" },
|
|
1521
|
-
// 'success' | 'failure' | 'rejected'
|
|
1522
|
-
label: { type: String, required: !0 },
|
|
1523
|
-
detail: { type: String, default: "" },
|
|
1524
|
-
artifact: { type: Object, default: null }
|
|
1525
|
-
},
|
|
1526
|
-
computed: {
|
|
1527
|
-
detailText() {
|
|
1528
|
-
return Tn(this.detail);
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
}, In = { class: "wm-result-wrap" }, En = {
|
|
1532
|
-
class: "wm-result__icon",
|
|
1533
|
-
"aria-hidden": "true"
|
|
1534
|
-
}, Bn = {
|
|
1535
|
-
key: 0,
|
|
1536
|
-
width: "11",
|
|
1537
|
-
height: "11",
|
|
1538
|
-
viewBox: "0 0 24 24",
|
|
1539
|
-
fill: "none",
|
|
1540
|
-
stroke: "currentColor",
|
|
1541
|
-
"stroke-width": "2.8",
|
|
1542
|
-
"stroke-linecap": "round",
|
|
1543
|
-
"stroke-linejoin": "round"
|
|
1544
|
-
}, Ln = {
|
|
1545
|
-
key: 1,
|
|
1546
|
-
width: "11",
|
|
1547
|
-
height: "11",
|
|
1548
|
-
viewBox: "0 0 24 24",
|
|
1549
|
-
fill: "none",
|
|
1550
|
-
stroke: "currentColor",
|
|
1551
|
-
"stroke-width": "2.6",
|
|
1552
|
-
"stroke-linecap": "round",
|
|
1553
|
-
"stroke-linejoin": "round"
|
|
1554
|
-
}, Rn = {
|
|
1555
|
-
key: 2,
|
|
1556
|
-
width: "12",
|
|
1557
|
-
height: "12",
|
|
1558
|
-
viewBox: "0 0 24 24",
|
|
1559
|
-
fill: "none",
|
|
1560
|
-
stroke: "currentColor",
|
|
1561
|
-
"stroke-width": "2.2",
|
|
1562
|
-
"stroke-linecap": "round",
|
|
1563
|
-
"stroke-linejoin": "round"
|
|
1564
|
-
}, $n = { class: "wm-result__label" }, Fn = { class: "wm-result__detail" }, jn = {
|
|
1565
|
-
key: 0,
|
|
1566
|
-
class: "wm-result-art"
|
|
1567
|
-
};
|
|
1568
|
-
function Un(t, e, n, a, r, s) {
|
|
1569
|
-
const o = I("ArtifactRenderer");
|
|
1570
|
-
return l(), c("div", In, [
|
|
1571
|
-
i("div", {
|
|
1572
|
-
class: E(["wm-result", `wm-result--${n.state}`])
|
|
1573
|
-
}, [
|
|
1574
|
-
i("span", En, [
|
|
1575
|
-
n.state === "success" ? (l(), c("svg", Bn, [...e[0] || (e[0] = [
|
|
1576
|
-
i("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
1577
|
-
])])) : n.state === "rejected" ? (l(), c("svg", Ln, [...e[1] || (e[1] = [
|
|
1578
|
-
i("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
1579
|
-
])])) : (l(), c("svg", Rn, [...e[2] || (e[2] = [
|
|
1580
|
-
i("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),
|
|
1581
|
-
i("line", {
|
|
1582
|
-
x1: "12",
|
|
1583
|
-
y1: "9",
|
|
1584
|
-
x2: "12",
|
|
1585
|
-
y2: "13"
|
|
1586
|
-
}, null, -1),
|
|
1587
|
-
i("line", {
|
|
1588
|
-
x1: "12",
|
|
1589
|
-
y1: "17",
|
|
1590
|
-
x2: "12.01",
|
|
1591
|
-
y2: "17"
|
|
1592
|
-
}, null, -1)
|
|
1593
|
-
])]))
|
|
1594
|
-
]),
|
|
1595
|
-
i("span", $n, b(n.label), 1),
|
|
1596
|
-
s.detailText ? (l(), c(M, { key: 0 }, [
|
|
1597
|
-
e[3] || (e[3] = i("span", {
|
|
1598
|
-
class: "wm-result__sep",
|
|
1599
|
-
"aria-hidden": "true"
|
|
1600
|
-
}, "·", -1)),
|
|
1601
|
-
i("span", Fn, b(s.detailText), 1)
|
|
1602
|
-
], 64)) : y("", !0)
|
|
1603
|
-
], 2),
|
|
1604
|
-
n.artifact ? (l(), c("div", jn, [
|
|
1605
|
-
P(o, { artifact: n.artifact }, null, 8, ["artifact"])
|
|
1606
|
-
])) : y("", !0)
|
|
1607
|
-
]);
|
|
1608
|
-
}
|
|
1609
|
-
const Dn = /* @__PURE__ */ B(On, [["render", Un], ["__scopeId", "data-v-3269d042"]]), Nn = {
|
|
1604
|
+
const jn = /* @__PURE__ */ B($n, [["render", Fn]]), Un = {
|
|
1610
1605
|
name: "WmAttachmentPreview",
|
|
1611
1606
|
inject: {
|
|
1612
1607
|
signAttachmentFn: { default: null }
|
|
@@ -1660,19 +1655,19 @@ const Dn = /* @__PURE__ */ B(On, [["render", Un], ["__scopeId", "data-v-3269d042
|
|
|
1660
1655
|
this.url || t.preventDefault();
|
|
1661
1656
|
}
|
|
1662
1657
|
}
|
|
1663
|
-
},
|
|
1658
|
+
}, Dn = ["href"], Nn = ["src", "alt"], Pn = ["src"], Hn = ["src"], zn = ["href", "download"], Vn = { class: "wm-att__main" }, qn = { class: "wm-att__name" }, Wn = {
|
|
1664
1659
|
key: 0,
|
|
1665
1660
|
class: "wm-att__meta"
|
|
1666
|
-
},
|
|
1661
|
+
}, Gn = {
|
|
1667
1662
|
key: 0,
|
|
1668
1663
|
class: "wm-att__spin",
|
|
1669
1664
|
"aria-hidden": "true"
|
|
1670
1665
|
};
|
|
1671
|
-
function
|
|
1672
|
-
return l(),
|
|
1666
|
+
function Kn(t, e, n, a, r, s) {
|
|
1667
|
+
return l(), d("div", {
|
|
1673
1668
|
class: E(["wm-att", ["wm-att--" + (s.kind || "file")]])
|
|
1674
1669
|
}, [
|
|
1675
|
-
s.kind === "image" && r.url ? (l(),
|
|
1670
|
+
s.kind === "image" && r.url ? (l(), d("a", {
|
|
1676
1671
|
key: 0,
|
|
1677
1672
|
href: r.url,
|
|
1678
1673
|
target: "_blank",
|
|
@@ -1683,18 +1678,18 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1683
1678
|
src: r.url,
|
|
1684
1679
|
alt: s.displayName,
|
|
1685
1680
|
loading: "lazy"
|
|
1686
|
-
}, null, 8,
|
|
1687
|
-
], 8,
|
|
1681
|
+
}, null, 8, Nn)
|
|
1682
|
+
], 8, Dn)) : s.kind === "audio" && r.url ? (l(), d("audio", {
|
|
1688
1683
|
key: 1,
|
|
1689
1684
|
src: r.url,
|
|
1690
1685
|
controls: "",
|
|
1691
1686
|
preload: "metadata"
|
|
1692
|
-
}, null, 8,
|
|
1687
|
+
}, null, 8, Pn)) : s.kind === "video" && r.url ? (l(), d("video", {
|
|
1693
1688
|
key: 2,
|
|
1694
1689
|
src: r.url,
|
|
1695
1690
|
controls: "",
|
|
1696
1691
|
preload: "metadata"
|
|
1697
|
-
}, null, 8,
|
|
1692
|
+
}, null, 8, Hn)) : (l(), d("a", {
|
|
1698
1693
|
key: 3,
|
|
1699
1694
|
class: "wm-att__file",
|
|
1700
1695
|
href: r.url || "#",
|
|
@@ -1719,33 +1714,33 @@ function Jn(t, e, n, a, r, s) {
|
|
|
1719
1714
|
i("path", { d: "M14 2v6h6" })
|
|
1720
1715
|
])
|
|
1721
1716
|
], -1)),
|
|
1722
|
-
i("span",
|
|
1723
|
-
i("span",
|
|
1724
|
-
s.sizeLabel ? (l(),
|
|
1717
|
+
i("span", Vn, [
|
|
1718
|
+
i("span", qn, b(s.displayName), 1),
|
|
1719
|
+
s.sizeLabel ? (l(), d("span", Wn, b(s.sizeLabel), 1)) : y("", !0)
|
|
1725
1720
|
]),
|
|
1726
|
-
r.loading ? (l(),
|
|
1727
|
-
], 8,
|
|
1721
|
+
r.loading ? (l(), d("span", Gn)) : y("", !0)
|
|
1722
|
+
], 8, zn))
|
|
1728
1723
|
], 2);
|
|
1729
1724
|
}
|
|
1730
|
-
const
|
|
1731
|
-
function
|
|
1725
|
+
const Yn = /* @__PURE__ */ B(Un, [["render", Kn], ["__scopeId", "data-v-1cd1267b"]]);
|
|
1726
|
+
function Jn(t) {
|
|
1732
1727
|
return String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
1733
1728
|
}
|
|
1734
|
-
function
|
|
1729
|
+
function Xn(t) {
|
|
1735
1730
|
return /^(https?:\/\/|mailto:|tel:)/i.test(String(t).trim());
|
|
1736
1731
|
}
|
|
1737
|
-
const
|
|
1738
|
-
function
|
|
1732
|
+
const _e = "";
|
|
1733
|
+
function te(t) {
|
|
1739
1734
|
let e = t;
|
|
1740
1735
|
const n = [];
|
|
1741
1736
|
return e = e.replace(/`([^`\n]+)`/g, (a, r) => {
|
|
1742
1737
|
const s = n.length;
|
|
1743
|
-
return n.push(r), `${
|
|
1744
|
-
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) =>
|
|
1738
|
+
return n.push(r), `${_e}CODE${s}${_e}`;
|
|
1739
|
+
}), e = e.replace(/\[([^\]\n]+)\]\(([^)\s]+)\)/g, (a, r, s) => Xn(s) ? `<a href="${s}" target="_blank" rel="noopener noreferrer">${r}</a>` : r), e = e.replace(/\*\*([^\n*][^\n]*?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/__([^\n_][^\n]*?)__/g, "<u>$1</u>"), e = e.replace(/~~([^\n~][^\n]*?)~~/g, "<s>$1</s>"), e = e.replace(/(^|[^\w*])\*([^\n*]+?)\*(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/(^|[^\w_])_([^\n_]+?)_(?!\w)/g, "$1<em>$2</em>"), e = e.replace(/CODE(\d+)/g, (a, r) => `<code class="wm-md-code">${n[+r]}</code>`), e;
|
|
1745
1740
|
}
|
|
1746
|
-
function
|
|
1741
|
+
function Qn(t) {
|
|
1747
1742
|
if (!t) return "";
|
|
1748
|
-
const e =
|
|
1743
|
+
const e = Jn(t).split(`
|
|
1749
1744
|
`), n = [];
|
|
1750
1745
|
let a = 0;
|
|
1751
1746
|
for (; a < e.length; ) {
|
|
@@ -1769,20 +1764,20 @@ function es(t) {
|
|
|
1769
1764
|
if (!S) break;
|
|
1770
1765
|
C.push(S[1]), a++;
|
|
1771
1766
|
}
|
|
1772
|
-
const w = C.map((S) => `<li>${
|
|
1767
|
+
const w = C.map((S) => `<li>${te(S)}</li>`).join("");
|
|
1773
1768
|
n.push({ type: "block", html: `<ul class="wm-md-ul">${w}</ul>` });
|
|
1774
1769
|
continue;
|
|
1775
1770
|
}
|
|
1776
|
-
const
|
|
1777
|
-
if (
|
|
1778
|
-
const C = parseInt(
|
|
1771
|
+
const c = /^\s*(\d+)\.\s+(.*)$/.exec(s);
|
|
1772
|
+
if (c) {
|
|
1773
|
+
const C = parseInt(c[1], 10), w = [c[2]];
|
|
1779
1774
|
for (a++; a < e.length; ) {
|
|
1780
1775
|
const A = /^\s*\d+\.\s+(.*)$/.exec(e[a]);
|
|
1781
1776
|
if (!A) break;
|
|
1782
1777
|
w.push(A[1]), a++;
|
|
1783
1778
|
}
|
|
1784
|
-
const S = w.map((A) => `<li>${
|
|
1785
|
-
n.push({ type: "block", html: `<ol class="wm-md-ol"${
|
|
1779
|
+
const S = w.map((A) => `<li>${te(A)}</li>`).join(""), R = C !== 1 ? ` start="${C}"` : "";
|
|
1780
|
+
n.push({ type: "block", html: `<ol class="wm-md-ol"${R}>${S}</ol>` });
|
|
1786
1781
|
continue;
|
|
1787
1782
|
}
|
|
1788
1783
|
const v = /^(#{1,6})\s+(.*)$/.exec(s);
|
|
@@ -1790,23 +1785,23 @@ function es(t) {
|
|
|
1790
1785
|
const C = v[1].length;
|
|
1791
1786
|
n.push({
|
|
1792
1787
|
type: "block",
|
|
1793
|
-
html: `<h${C} class="wm-md-h wm-md-h${C}">${
|
|
1788
|
+
html: `<h${C} class="wm-md-h wm-md-h${C}">${te(v[2])}</h${C}>`
|
|
1794
1789
|
}), a++;
|
|
1795
1790
|
continue;
|
|
1796
1791
|
}
|
|
1797
|
-
n.push({ type: "text", html:
|
|
1792
|
+
n.push({ type: "text", html: te(s) }), a++;
|
|
1798
1793
|
}
|
|
1799
1794
|
let r = "";
|
|
1800
1795
|
for (let s = 0; s < n.length; s++) {
|
|
1801
1796
|
const o = n[s];
|
|
1802
1797
|
r += o.html;
|
|
1803
|
-
const
|
|
1804
|
-
|
|
1798
|
+
const c = n[s + 1];
|
|
1799
|
+
c && o.type !== "block" && c.type !== "block" && (r += `
|
|
1805
1800
|
`);
|
|
1806
1801
|
}
|
|
1807
1802
|
return r;
|
|
1808
1803
|
}
|
|
1809
|
-
const
|
|
1804
|
+
const Zn = {
|
|
1810
1805
|
name: "WmBubble",
|
|
1811
1806
|
props: {
|
|
1812
1807
|
role: { type: String, default: "ai" },
|
|
@@ -1815,41 +1810,41 @@ const ts = {
|
|
|
1815
1810
|
},
|
|
1816
1811
|
computed: {
|
|
1817
1812
|
rendered() {
|
|
1818
|
-
return
|
|
1813
|
+
return Qn(this.text);
|
|
1819
1814
|
}
|
|
1820
1815
|
}
|
|
1821
|
-
},
|
|
1822
|
-
function
|
|
1823
|
-
return l(),
|
|
1816
|
+
}, es = ["innerHTML"];
|
|
1817
|
+
function ts(t, e, n, a, r, s) {
|
|
1818
|
+
return l(), d("div", {
|
|
1824
1819
|
class: E(["wm-bubble", "wm-bubble--" + n.role])
|
|
1825
1820
|
}, [
|
|
1826
|
-
|
|
1827
|
-
i("span", { innerHTML: s.rendered }, null, 8,
|
|
1821
|
+
Te(t.$slots, "default", {}, () => [
|
|
1822
|
+
i("span", { innerHTML: s.rendered }, null, 8, es)
|
|
1828
1823
|
], !0)
|
|
1829
1824
|
], 2);
|
|
1830
1825
|
}
|
|
1831
|
-
const
|
|
1832
|
-
function
|
|
1833
|
-
return l(),
|
|
1826
|
+
const ns = /* @__PURE__ */ B(Zn, [["render", ts], ["__scopeId", "data-v-5c9e9f2b"]]), ss = { name: "WmTyping" }, rs = { class: "wm-typing" };
|
|
1827
|
+
function is(t, e, n, a, r, s) {
|
|
1828
|
+
return l(), d("div", rs, [...e[0] || (e[0] = [
|
|
1834
1829
|
i("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
1835
1830
|
i("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
1836
1831
|
i("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
1837
1832
|
])]);
|
|
1838
1833
|
}
|
|
1839
|
-
const
|
|
1834
|
+
const as = /* @__PURE__ */ B(ss, [["render", is], ["__scopeId", "data-v-df2447fd"]]);
|
|
1840
1835
|
function ce(t) {
|
|
1841
1836
|
return t ? t.client_msg_id || t.id : "";
|
|
1842
1837
|
}
|
|
1843
|
-
const
|
|
1838
|
+
const os = {
|
|
1844
1839
|
transferred_to_human: "Conversation transférée à un humain",
|
|
1845
1840
|
assigned: "{name} a rejoint la conversation",
|
|
1846
1841
|
unassigned: "L'agent a quitté la conversation",
|
|
1847
1842
|
resolved: "Conversation résolue",
|
|
1848
1843
|
reopened: "Conversation rouverte",
|
|
1849
1844
|
idle: "Conversation en pause"
|
|
1850
|
-
},
|
|
1845
|
+
}, ls = 80, cs = 200, ds = {
|
|
1851
1846
|
name: "WmMessageList",
|
|
1852
|
-
components: { AIAvatar:
|
|
1847
|
+
components: { AIAvatar: Q, HumanAvatar: ke, Bubble: ns, Typing: as, ActionResult: Xt, AttachmentPreview: Yn, ArtifactRenderer: jn },
|
|
1853
1848
|
props: {
|
|
1854
1849
|
messages: { type: Array, default: () => [] },
|
|
1855
1850
|
streamingActive: { type: Boolean, default: !1 },
|
|
@@ -1891,6 +1886,7 @@ const cs = {
|
|
|
1891
1886
|
key: `sys-${ce(r)}`,
|
|
1892
1887
|
role: s,
|
|
1893
1888
|
messages: [r],
|
|
1889
|
+
items: [],
|
|
1894
1890
|
systemLabel: this.systemLabel(r)
|
|
1895
1891
|
});
|
|
1896
1892
|
continue;
|
|
@@ -1901,9 +1897,17 @@ const cs = {
|
|
|
1901
1897
|
role: s,
|
|
1902
1898
|
agentName: ((n = r == null ? void 0 : r.author) == null ? void 0 : n.name) || "",
|
|
1903
1899
|
agentAvatarUrl: ((a = r == null ? void 0 : r.author) == null ? void 0 : a.avatar_url) || null,
|
|
1904
|
-
messages: [r]
|
|
1900
|
+
messages: [r],
|
|
1901
|
+
items: []
|
|
1905
1902
|
});
|
|
1906
1903
|
}
|
|
1904
|
+
for (const r of t) {
|
|
1905
|
+
if (r.role === "system") continue;
|
|
1906
|
+
const s = [];
|
|
1907
|
+
for (const o of r.messages)
|
|
1908
|
+
for (const c of this.itemsOf(o)) s.push(c);
|
|
1909
|
+
r.items = s;
|
|
1910
|
+
}
|
|
1907
1911
|
return t;
|
|
1908
1912
|
},
|
|
1909
1913
|
// Key of the first non-user group that starts after the unread anchor.
|
|
@@ -1935,11 +1939,11 @@ const cs = {
|
|
|
1935
1939
|
methods: {
|
|
1936
1940
|
messageKey: ce,
|
|
1937
1941
|
isAtBottom(t) {
|
|
1938
|
-
return t.scrollHeight - t.scrollTop - t.clientHeight <=
|
|
1942
|
+
return t.scrollHeight - t.scrollTop - t.clientHeight <= ls;
|
|
1939
1943
|
},
|
|
1940
1944
|
onScroll() {
|
|
1941
1945
|
const t = this.$refs.scrollEl;
|
|
1942
|
-
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <=
|
|
1946
|
+
t && (this.loadingMore || !this.hasMore || this._pendingLoadMore || t.scrollTop <= cs && (this._pendingLoadMore = !0, this.$emit("load-more")));
|
|
1943
1947
|
},
|
|
1944
1948
|
// Capture pre-patch scroll state and restore it on the next tick.
|
|
1945
1949
|
//
|
|
@@ -2033,43 +2037,82 @@ const cs = {
|
|
|
2033
2037
|
roleLabel(t) {
|
|
2034
2038
|
return t.role === "human" ? t.agentName || "Agent" : "Assistant IA";
|
|
2035
2039
|
},
|
|
2036
|
-
//
|
|
2037
|
-
//
|
|
2038
|
-
//
|
|
2039
|
-
|
|
2040
|
-
|
|
2040
|
+
// Expand a message into atomic visual items, each one a row in
|
|
2041
|
+
// the smart-corner cluster. Most messages = 1 item. An
|
|
2042
|
+
// `action+artifact` message produces 2 items (pill + artifact)
|
|
2043
|
+
// so the cluster geometry handles their joint naturally —
|
|
2044
|
+
// neighbours below see the artifact (card), neighbours above
|
|
2045
|
+
// see the pill (bubble), and the pill ↔ artifact joint itself
|
|
2046
|
+
// follows the same rules as any two adjacent cluster items.
|
|
2047
|
+
//
|
|
2048
|
+
// Each item carries :
|
|
2049
|
+
// - `message` : the source message
|
|
2050
|
+
// - `partKey` : disambiguator when one message produces
|
|
2051
|
+
// several items ('main' | 'artifact')
|
|
2052
|
+
// - `renderAs` : which renderer the template should pick
|
|
2053
|
+
// - `kind` : `{ top, bottom }` for the smart-corner
|
|
2054
|
+
// logic — 'bubble' (narrow) | 'card' (wide)
|
|
2055
|
+
itemsOf(t) {
|
|
2056
|
+
if (!t) return [];
|
|
2057
|
+
if (t.type === "action" && t.payload && t.payload.state !== "pending") {
|
|
2058
|
+
const e = [{
|
|
2059
|
+
message: t,
|
|
2060
|
+
partKey: "main",
|
|
2061
|
+
renderAs: "action",
|
|
2062
|
+
kind: { top: "bubble", bottom: "bubble" }
|
|
2063
|
+
}];
|
|
2064
|
+
return this.actionArtifact(t) && e.push({
|
|
2065
|
+
message: t,
|
|
2066
|
+
partKey: "artifact",
|
|
2067
|
+
renderAs: "artifact-of-action",
|
|
2068
|
+
kind: { top: "card", bottom: "card" }
|
|
2069
|
+
}), e;
|
|
2070
|
+
}
|
|
2071
|
+
return this.artifactOf(t) ? [{
|
|
2072
|
+
message: t,
|
|
2073
|
+
partKey: "main",
|
|
2074
|
+
renderAs: "artifact",
|
|
2075
|
+
kind: { top: "card", bottom: "card" }
|
|
2076
|
+
}] : t.text_md || this.attachmentsOf(t).length ? [{
|
|
2077
|
+
message: t,
|
|
2078
|
+
partKey: "main",
|
|
2079
|
+
renderAs: "bubble",
|
|
2080
|
+
kind: { top: "bubble", bottom: "bubble" }
|
|
2081
|
+
}] : [];
|
|
2041
2082
|
},
|
|
2042
2083
|
// Per-corner border radius for an item inside a multi-item
|
|
2043
|
-
// cluster. Geometric model:
|
|
2084
|
+
// cluster. Geometric model :
|
|
2044
2085
|
// - The two corners on the *shared* edge (left for ai/human,
|
|
2045
2086
|
// right for user) become small whenever a neighbour exists
|
|
2046
2087
|
// on that side — the items are flush along that edge.
|
|
2047
|
-
// - The two corners on the *opposite* edge stay rounded
|
|
2048
|
-
//
|
|
2049
|
-
// bubble)
|
|
2050
|
-
//
|
|
2051
|
-
//
|
|
2052
|
-
//
|
|
2088
|
+
// - The two corners on the *opposite* edge stay rounded unless
|
|
2089
|
+
// the touching half of the neighbour is strictly wider than
|
|
2090
|
+
// our touching half (card vs bubble) and physically covers
|
|
2091
|
+
// them.
|
|
2092
|
+
// We compare *halves* : my top corners vs `prev.bottom` (what
|
|
2093
|
+
// touches me from above), my bottom corners vs `next.top` (what
|
|
2094
|
+
// touches me from below).
|
|
2095
|
+
// Bubbles get a small "tail" on their bottom lateral corner when
|
|
2096
|
+
// they're the last item of the cluster — BL for ai/human, BR for
|
|
2097
|
+
// user.
|
|
2053
2098
|
cornersFor(t, e) {
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2099
|
+
var N, F, P;
|
|
2100
|
+
const n = t.items, a = (N = n[e]) == null ? void 0 : N.kind, r = (F = n[e - 1]) == null ? void 0 : F.kind, s = (P = n[e + 1]) == null ? void 0 : P.kind, o = t.role === "user", c = 14, v = 4, C = (q, Y) => q === "card" && Y === "bubble", w = r ? r.bottom : null, S = s ? s.top : null;
|
|
2101
|
+
let R = c, A = c, D = c, x = c;
|
|
2102
|
+
return o ? (w && (A = v, C(w, a.top) && (R = v)), S && (D = v, C(S, a.bottom) && (x = v)), !S && a.bottom === "bubble" && (D = v)) : (w && (R = v, C(w, a.top) && (A = v)), S && (x = v, C(S, a.bottom) && (D = v)), !S && a.bottom === "bubble" && (x = v)), { tl: R, tr: A, br: D, bl: x };
|
|
2057
2103
|
},
|
|
2058
2104
|
// Inline style emitting the four corner CSS variables. Set on
|
|
2059
2105
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
2060
2106
|
// ArtifactRenderer. Returns null for single-item clusters so
|
|
2061
2107
|
// those components fall back to their native border-radius.
|
|
2062
2108
|
cornersStyle(t, e) {
|
|
2063
|
-
if (t.
|
|
2064
|
-
|
|
2065
|
-
0
|
|
2066
|
-
) < 2) return null;
|
|
2067
|
-
const a = this.cornersFor(t, e);
|
|
2109
|
+
if (t.items.length < 2) return null;
|
|
2110
|
+
const n = this.cornersFor(t, e);
|
|
2068
2111
|
return {
|
|
2069
|
-
"--wm-r-tl": `${
|
|
2070
|
-
"--wm-r-tr": `${
|
|
2071
|
-
"--wm-r-br": `${
|
|
2072
|
-
"--wm-r-bl": `${
|
|
2112
|
+
"--wm-r-tl": `${n.tl}px`,
|
|
2113
|
+
"--wm-r-tr": `${n.tr}px`,
|
|
2114
|
+
"--wm-r-br": `${n.br}px`,
|
|
2115
|
+
"--wm-r-bl": `${n.bl}px`
|
|
2073
2116
|
};
|
|
2074
2117
|
},
|
|
2075
2118
|
lastTimeOf(t) {
|
|
@@ -2100,9 +2143,9 @@ const cs = {
|
|
|
2100
2143
|
return ((e = t == null ? void 0 : t.payload) == null ? void 0 : e.name) || (t == null ? void 0 : t.text_md) || "Action";
|
|
2101
2144
|
},
|
|
2102
2145
|
actionDetail(t) {
|
|
2103
|
-
var n, a, r, s, o,
|
|
2146
|
+
var n, a, r, s, o, c;
|
|
2104
2147
|
const e = t == null ? void 0 : t.payload;
|
|
2105
|
-
return e ? e.state === "success" ? ((n = e.success) == null ? void 0 : n.summary) || ((r = (a = e.success) == null ? void 0 : a.metadata) == null ? void 0 : r.description) || "" : e.state === "rejected" ? ((s = e.rejected) == null ? void 0 : s.reason) || "Action annulée par l'utilisateur." : e.state === "failure" && (((o = e.failure) == null ? void 0 : o.summary) || ((
|
|
2148
|
+
return e ? e.state === "success" ? ((n = e.success) == null ? void 0 : n.summary) || ((r = (a = e.success) == null ? void 0 : a.metadata) == null ? void 0 : r.description) || "" : e.state === "rejected" ? ((s = e.rejected) == null ? void 0 : s.reason) || "Action annulée par l'utilisateur." : e.state === "failure" && (((o = e.failure) == null ? void 0 : o.summary) || ((c = e.failure) == null ? void 0 : c.error)) || "" : "";
|
|
2106
2149
|
},
|
|
2107
2150
|
actionArtifact(t) {
|
|
2108
2151
|
var n, a;
|
|
@@ -2111,7 +2154,7 @@ const cs = {
|
|
|
2111
2154
|
},
|
|
2112
2155
|
systemLabel(t) {
|
|
2113
2156
|
var r, s, o;
|
|
2114
|
-
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n =
|
|
2157
|
+
const e = (r = t == null ? void 0 : t.payload) == null ? void 0 : r.event, n = os[e] || (t == null ? void 0 : t.text_md) || "Mise à jour de la conversation", a = ((s = t == null ? void 0 : t.metadata) == null ? void 0 : s.agent_name) || ((o = t == null ? void 0 : t.author) == null ? void 0 : o.name) || "";
|
|
2115
2158
|
return n.replace("{name}", a || "Un agent");
|
|
2116
2159
|
},
|
|
2117
2160
|
scrollToBottom() {
|
|
@@ -2119,59 +2162,59 @@ const cs = {
|
|
|
2119
2162
|
t && (t.scrollTop = t.scrollHeight);
|
|
2120
2163
|
}
|
|
2121
2164
|
}
|
|
2122
|
-
},
|
|
2165
|
+
}, us = {
|
|
2123
2166
|
key: 0,
|
|
2124
2167
|
class: "wm-list__loadMore",
|
|
2125
2168
|
role: "status",
|
|
2126
2169
|
"aria-live": "polite"
|
|
2127
|
-
},
|
|
2170
|
+
}, hs = {
|
|
2128
2171
|
key: 1,
|
|
2129
2172
|
class: "wm-list__historyEnd"
|
|
2130
|
-
},
|
|
2173
|
+
}, ms = {
|
|
2131
2174
|
key: 2,
|
|
2132
2175
|
class: "wm-list__sep"
|
|
2133
|
-
},
|
|
2176
|
+
}, fs = { class: "wm-list__sep-label" }, ps = {
|
|
2134
2177
|
key: 0,
|
|
2135
2178
|
class: "wm-list__sep wm-list__sep--unread"
|
|
2136
|
-
},
|
|
2179
|
+
}, _s = {
|
|
2137
2180
|
key: 0,
|
|
2138
2181
|
class: "wm-list__sysep"
|
|
2139
|
-
},
|
|
2182
|
+
}, vs = { class: "wm-list__sysep-label" }, gs = {
|
|
2140
2183
|
key: 0,
|
|
2141
2184
|
class: "wm-list__avatarSlot"
|
|
2142
|
-
},
|
|
2143
|
-
key:
|
|
2185
|
+
}, ys = {
|
|
2186
|
+
key: 4,
|
|
2144
2187
|
class: "wm-list__body"
|
|
2145
|
-
},
|
|
2188
|
+
}, ws = { key: 0 }, bs = {
|
|
2146
2189
|
key: 1,
|
|
2147
2190
|
"aria-hidden": "true"
|
|
2148
|
-
},
|
|
2191
|
+
}, ks = { key: 2 }, Cs = {
|
|
2149
2192
|
key: 3,
|
|
2150
2193
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
2151
|
-
},
|
|
2152
|
-
function
|
|
2153
|
-
const o =
|
|
2154
|
-
return l(),
|
|
2194
|
+
}, As = { class: "wm-list__avatarSlot" };
|
|
2195
|
+
function Ss(t, e, n, a, r, s) {
|
|
2196
|
+
const o = O("AIAvatar"), c = O("HumanAvatar"), v = O("ActionResult"), C = O("ArtifactRenderer"), w = O("Bubble"), S = O("AttachmentPreview"), R = O("Typing");
|
|
2197
|
+
return l(), d("div", {
|
|
2155
2198
|
ref: "scrollEl",
|
|
2156
2199
|
class: E(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
2157
2200
|
onScrollPassive: e[0] || (e[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
2158
2201
|
}, [
|
|
2159
|
-
n.loadingMore ? (l(),
|
|
2202
|
+
n.loadingMore ? (l(), d("div", us, [...e[1] || (e[1] = [
|
|
2160
2203
|
i("span", {
|
|
2161
2204
|
class: "wm-list__loadMore-spinner",
|
|
2162
2205
|
"aria-hidden": "true"
|
|
2163
2206
|
}, null, -1),
|
|
2164
2207
|
i("span", { class: "wm-list__loadMore-lbl" }, "Chargement de l'historique…", -1)
|
|
2165
|
-
])])) : s.historyExhausted ? (l(),
|
|
2166
|
-
n.dateLabel ? (l(),
|
|
2208
|
+
])])) : s.historyExhausted ? (l(), d("div", hs, "Début de la conversation")) : y("", !0),
|
|
2209
|
+
n.dateLabel ? (l(), d("div", ms, [
|
|
2167
2210
|
e[2] || (e[2] = i("div", { class: "wm-list__line" }, null, -1)),
|
|
2168
|
-
i("span",
|
|
2211
|
+
i("span", fs, b(n.dateLabel), 1),
|
|
2169
2212
|
e[3] || (e[3] = i("div", { class: "wm-list__line" }, null, -1))
|
|
2170
2213
|
])) : y("", !0),
|
|
2171
|
-
(l(!0),
|
|
2214
|
+
(l(!0), d(M, null, j(s.groups, (A, D) => (l(), d(M, {
|
|
2172
2215
|
key: A.key
|
|
2173
2216
|
}, [
|
|
2174
|
-
A.key === s.unreadGroupKey ? (l(),
|
|
2217
|
+
A.key === s.unreadGroupKey ? (l(), d("div", ps, [...e[4] || (e[4] = [
|
|
2175
2218
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1),
|
|
2176
2219
|
i("span", { class: "wm-list__sep-label wm-list__sep-label--unread" }, "Non lus", -1),
|
|
2177
2220
|
i("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)
|
|
@@ -2179,22 +2222,23 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2179
2222
|
i("div", {
|
|
2180
2223
|
class: E(["wm-list__group", "wm-list__group--" + A.role])
|
|
2181
2224
|
}, [
|
|
2182
|
-
A.role === "system" ? (l(),
|
|
2225
|
+
A.role === "system" ? (l(), d("div", _s, [
|
|
2183
2226
|
e[5] || (e[5] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
2184
|
-
i("span",
|
|
2227
|
+
i("span", vs, b(A.systemLabel), 1),
|
|
2185
2228
|
e[6] || (e[6] = i("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
2186
|
-
])) : (l(),
|
|
2187
|
-
(l(!0),
|
|
2188
|
-
key: s.messageKey(x)
|
|
2189
|
-
class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x._pending, "is-failed": x._failed }]]),
|
|
2229
|
+
])) : (l(), d(M, { key: 1 }, [
|
|
2230
|
+
(l(!0), d(M, null, j(A.items, (x, N) => (l(), d("div", {
|
|
2231
|
+
key: `${s.messageKey(x.message)}-${x.partKey}`,
|
|
2232
|
+
class: E(["wm-list__row fade-up", ["wm-list__row--" + A.role, { "is-pending": x.message._pending, "is-failed": x.message._failed }]]),
|
|
2190
2233
|
style: V(s.cornersStyle(A, N))
|
|
2191
2234
|
}, [
|
|
2192
|
-
A.role !== "user" ? (l(),
|
|
2193
|
-
N === A.
|
|
2235
|
+
A.role !== "user" ? (l(), d("div", gs, [
|
|
2236
|
+
N === A.items.length - 1 ? (l(), d(M, { key: 0 }, [
|
|
2194
2237
|
A.role === "ai" ? (l(), $(o, {
|
|
2195
2238
|
key: 0,
|
|
2196
|
-
size: 26
|
|
2197
|
-
|
|
2239
|
+
size: 26,
|
|
2240
|
+
tail: !0
|
|
2241
|
+
})) : (l(), $(c, {
|
|
2198
2242
|
key: 1,
|
|
2199
2243
|
name: A.agentName,
|
|
2200
2244
|
"avatar-url": A.agentAvatarUrl,
|
|
@@ -2202,53 +2246,58 @@ function Ms(t, e, n, a, r, s) {
|
|
|
2202
2246
|
}, null, 8, ["name", "avatar-url"]))
|
|
2203
2247
|
], 64)) : y("", !0)
|
|
2204
2248
|
])) : y("", !0),
|
|
2205
|
-
x.
|
|
2249
|
+
x.renderAs === "action" ? (l(), $(v, {
|
|
2206
2250
|
key: 1,
|
|
2207
|
-
state: x.payload.state,
|
|
2208
|
-
label: s.actionLabel(x),
|
|
2209
|
-
detail: s.actionDetail(x)
|
|
2210
|
-
|
|
2211
|
-
}, null, 8, ["state", "label", "detail", "artifact"])) : s.artifactOf(x) ? (l(), $(C, {
|
|
2251
|
+
state: x.message.payload.state,
|
|
2252
|
+
label: s.actionLabel(x.message),
|
|
2253
|
+
detail: s.actionDetail(x.message)
|
|
2254
|
+
}, null, 8, ["state", "label", "detail"])) : x.renderAs === "artifact-of-action" ? (l(), $(C, {
|
|
2212
2255
|
key: 2,
|
|
2213
|
-
artifact: s.
|
|
2214
|
-
}, null, 8, ["artifact"])) : (l(),
|
|
2215
|
-
|
|
2256
|
+
artifact: s.actionArtifact(x.message)
|
|
2257
|
+
}, null, 8, ["artifact"])) : x.renderAs === "artifact" ? (l(), $(C, {
|
|
2258
|
+
key: 3,
|
|
2259
|
+
artifact: s.artifactOf(x.message)
|
|
2260
|
+
}, null, 8, ["artifact"])) : (l(), d("div", ys, [
|
|
2261
|
+
x.message.text_md ? (l(), $(w, {
|
|
2216
2262
|
key: 0,
|
|
2217
2263
|
role: A.role,
|
|
2218
|
-
text: x.text_md
|
|
2264
|
+
text: x.message.text_md
|
|
2219
2265
|
}, null, 8, ["role", "text"])) : y("", !0),
|
|
2220
|
-
s.attachmentsOf(x).length ? (l(),
|
|
2266
|
+
s.attachmentsOf(x.message).length ? (l(), d("div", {
|
|
2221
2267
|
key: 1,
|
|
2222
2268
|
class: E(["wm-list__atts", { "wm-list__atts--align-end": A.role === "user" }])
|
|
2223
2269
|
}, [
|
|
2224
|
-
(l(!0),
|
|
2225
|
-
key: `${s.messageKey(x)}-att-${
|
|
2226
|
-
attachment:
|
|
2270
|
+
(l(!0), d(M, null, j(s.attachmentsOf(x.message), (F, P) => (l(), $(S, {
|
|
2271
|
+
key: `${s.messageKey(x.message)}-att-${P}`,
|
|
2272
|
+
attachment: F
|
|
2227
2273
|
}, null, 8, ["attachment"]))), 128))
|
|
2228
2274
|
], 2)) : y("", !0)
|
|
2229
2275
|
]))
|
|
2230
2276
|
], 6))), 128)),
|
|
2231
|
-
A.role !== "user" || s.lastTimeOf(A) ? (l(),
|
|
2277
|
+
A.role !== "user" || s.lastTimeOf(A) ? (l(), d("div", {
|
|
2232
2278
|
key: 0,
|
|
2233
2279
|
class: E(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
2234
2280
|
}, [
|
|
2235
|
-
A.role !== "user" ? (l(),
|
|
2236
|
-
A.role !== "user" && s.lastTimeOf(A) ? (l(),
|
|
2237
|
-
s.lastTimeOf(A) ? (l(),
|
|
2281
|
+
A.role !== "user" ? (l(), d("span", ws, b(s.roleLabel(A)), 1)) : y("", !0),
|
|
2282
|
+
A.role !== "user" && s.lastTimeOf(A) ? (l(), d("span", bs, "·")) : y("", !0),
|
|
2283
|
+
s.lastTimeOf(A) ? (l(), d("span", ks, b(s.lastTimeOf(A)), 1)) : y("", !0)
|
|
2238
2284
|
], 2)) : y("", !0)
|
|
2239
2285
|
], 64))
|
|
2240
2286
|
], 2)
|
|
2241
2287
|
], 64))), 128)),
|
|
2242
|
-
n.streamingActive ? (l(),
|
|
2243
|
-
i("div",
|
|
2244
|
-
|
|
2288
|
+
n.streamingActive ? (l(), d("div", Cs, [
|
|
2289
|
+
i("div", As, [
|
|
2290
|
+
z(o, {
|
|
2291
|
+
size: 26,
|
|
2292
|
+
tail: !0
|
|
2293
|
+
})
|
|
2245
2294
|
]),
|
|
2246
|
-
|
|
2295
|
+
z(R)
|
|
2247
2296
|
])) : y("", !0)
|
|
2248
2297
|
], 34);
|
|
2249
2298
|
}
|
|
2250
|
-
const
|
|
2251
|
-
function
|
|
2299
|
+
const xs = /* @__PURE__ */ B(ds, [["render", Ss], ["__scopeId", "data-v-fa41ec02"]]), ne = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", he = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
2300
|
+
function Ms() {
|
|
2252
2301
|
return he && [
|
|
2253
2302
|
"video/webm;codecs=vp9,opus",
|
|
2254
2303
|
"video/webm;codecs=vp8,opus",
|
|
@@ -2259,7 +2308,7 @@ function Os() {
|
|
|
2259
2308
|
return (a = (n = window.MediaRecorder).isTypeSupported) == null ? void 0 : a.call(n, e);
|
|
2260
2309
|
}) || "";
|
|
2261
2310
|
}
|
|
2262
|
-
function
|
|
2311
|
+
function Ce({ audio: t }) {
|
|
2263
2312
|
return {
|
|
2264
2313
|
video: !0,
|
|
2265
2314
|
audio: !!t,
|
|
@@ -2268,19 +2317,19 @@ function Ae({ audio: t }) {
|
|
|
2268
2317
|
systemAudio: t ? "include" : "exclude"
|
|
2269
2318
|
};
|
|
2270
2319
|
}
|
|
2271
|
-
function
|
|
2320
|
+
function Di(t) {
|
|
2272
2321
|
return t ? t.startsWith("image/") ? "image" : t.startsWith("video/") ? "video" : "file" : "file";
|
|
2273
2322
|
}
|
|
2274
|
-
async function
|
|
2275
|
-
if (!
|
|
2323
|
+
async function Ts() {
|
|
2324
|
+
if (!ne) return null;
|
|
2276
2325
|
let t;
|
|
2277
2326
|
try {
|
|
2278
|
-
t = await navigator.mediaDevices.getDisplayMedia(
|
|
2327
|
+
t = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !1 }));
|
|
2279
2328
|
} catch (e) {
|
|
2280
2329
|
return (e == null ? void 0 : e.name) !== "NotAllowedError" && console.error("[media] screenshot picker", e), null;
|
|
2281
2330
|
}
|
|
2282
2331
|
try {
|
|
2283
|
-
return await
|
|
2332
|
+
return await Is(t);
|
|
2284
2333
|
} catch (e) {
|
|
2285
2334
|
return console.error("[media] screenshot capture", e), null;
|
|
2286
2335
|
} finally {
|
|
@@ -2289,26 +2338,26 @@ async function Is() {
|
|
|
2289
2338
|
});
|
|
2290
2339
|
}
|
|
2291
2340
|
}
|
|
2292
|
-
async function
|
|
2341
|
+
async function Is(t) {
|
|
2293
2342
|
const e = document.createElement("video");
|
|
2294
|
-
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((
|
|
2343
|
+
e.muted = !0, e.playsInline = !0, e.srcObject = t, await e.play(), await new Promise((c) => requestAnimationFrame(c));
|
|
2295
2344
|
const n = e.videoWidth || 1280, a = e.videoHeight || 720, r = document.createElement("canvas");
|
|
2296
2345
|
r.width = n, r.height = a, r.getContext("2d").drawImage(e, 0, 0, n, a);
|
|
2297
|
-
const s = await new Promise((
|
|
2298
|
-
r.toBlob((C) => C ?
|
|
2346
|
+
const s = await new Promise((c, v) => {
|
|
2347
|
+
r.toBlob((C) => C ? c(C) : v(new Error("toBlob failed")), "image/png");
|
|
2299
2348
|
}), o = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
2300
2349
|
return new File([s], `capture-${o}.png`, { type: "image/png" });
|
|
2301
2350
|
}
|
|
2302
|
-
async function
|
|
2351
|
+
async function Os(t = {}) {
|
|
2303
2352
|
var C;
|
|
2304
|
-
if (!
|
|
2353
|
+
if (!ne || !he) return null;
|
|
2305
2354
|
let e;
|
|
2306
2355
|
try {
|
|
2307
|
-
e = await navigator.mediaDevices.getDisplayMedia(
|
|
2356
|
+
e = await navigator.mediaDevices.getDisplayMedia(Ce({ audio: !0 }));
|
|
2308
2357
|
} catch (w) {
|
|
2309
2358
|
return (w == null ? void 0 : w.name) !== "NotAllowedError" && console.error("[media] record picker", w), null;
|
|
2310
2359
|
}
|
|
2311
|
-
const n =
|
|
2360
|
+
const n = Ms();
|
|
2312
2361
|
let a;
|
|
2313
2362
|
try {
|
|
2314
2363
|
a = n ? new window.MediaRecorder(e, { mimeType: n }) : new window.MediaRecorder(e);
|
|
@@ -2323,17 +2372,17 @@ async function Bs(t = {}) {
|
|
|
2323
2372
|
w.data && w.data.size > 0 && r.push(w.data);
|
|
2324
2373
|
}), a.addEventListener("stop", () => {
|
|
2325
2374
|
var w, S;
|
|
2326
|
-
if (s && clearInterval(s), e.getTracks().forEach((
|
|
2327
|
-
|
|
2375
|
+
if (s && clearInterval(s), e.getTracks().forEach((R) => {
|
|
2376
|
+
R.stop();
|
|
2328
2377
|
}), r.length) {
|
|
2329
|
-
const
|
|
2378
|
+
const R = a.mimeType || n || "video/webm", A = new Blob(r, { type: R }), D = /mp4/.test(R) ? "mp4" : "webm", x = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), N = new File([A], `ecran-${x}.${D}`, { type: R });
|
|
2330
2379
|
(w = t.onfinalize) == null || w.call(t, N);
|
|
2331
2380
|
} else
|
|
2332
2381
|
(S = t.oncancel) == null || S.call(t);
|
|
2333
2382
|
}), e.getVideoTracks().forEach((w) => {
|
|
2334
|
-
w.addEventListener("ended", () =>
|
|
2383
|
+
w.addEventListener("ended", () => c(), { once: !0 });
|
|
2335
2384
|
});
|
|
2336
|
-
function
|
|
2385
|
+
function c() {
|
|
2337
2386
|
if (!o && (o = !0, a.state !== "inactive"))
|
|
2338
2387
|
try {
|
|
2339
2388
|
a.stop();
|
|
@@ -2354,13 +2403,13 @@ async function Bs(t = {}) {
|
|
|
2354
2403
|
var w;
|
|
2355
2404
|
(w = t.ontick) == null || w.call(t, Date.now() - v);
|
|
2356
2405
|
}, 500), {
|
|
2357
|
-
stop:
|
|
2406
|
+
stop: c,
|
|
2358
2407
|
get state() {
|
|
2359
2408
|
return a.state;
|
|
2360
2409
|
}
|
|
2361
2410
|
};
|
|
2362
2411
|
}
|
|
2363
|
-
const
|
|
2412
|
+
const Es = [
|
|
2364
2413
|
{
|
|
2365
2414
|
action: "file",
|
|
2366
2415
|
label: "Joindre un fichier",
|
|
@@ -2376,7 +2425,7 @@ const Ls = [
|
|
|
2376
2425
|
label: "Enregistrer l'écran",
|
|
2377
2426
|
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"
|
|
2378
2427
|
}
|
|
2379
|
-
],
|
|
2428
|
+
], Bs = {
|
|
2380
2429
|
name: "WmComposer",
|
|
2381
2430
|
props: {
|
|
2382
2431
|
modelValue: { type: String, default: "" },
|
|
@@ -2399,9 +2448,9 @@ const Ls = [
|
|
|
2399
2448
|
return !this.disabled && !!this.local.trim();
|
|
2400
2449
|
},
|
|
2401
2450
|
attachItems() {
|
|
2402
|
-
return
|
|
2451
|
+
return Es.map((t) => ({
|
|
2403
2452
|
...t,
|
|
2404
|
-
disabled: t.action === "screenshot" && !
|
|
2453
|
+
disabled: t.action === "screenshot" && !ne || t.action === "record" && (!ne || !he)
|
|
2405
2454
|
}));
|
|
2406
2455
|
},
|
|
2407
2456
|
recordingElapsedLabel() {
|
|
@@ -2471,13 +2520,13 @@ const Ls = [
|
|
|
2471
2520
|
},
|
|
2472
2521
|
async captureScreenshot() {
|
|
2473
2522
|
if (this.disabled) return;
|
|
2474
|
-
const t = await
|
|
2523
|
+
const t = await Ts();
|
|
2475
2524
|
t && this.$emit("attach", t);
|
|
2476
2525
|
},
|
|
2477
2526
|
async startRecording() {
|
|
2478
2527
|
if (this.recording || this.disabled) return;
|
|
2479
2528
|
this.recordingElapsed = 0;
|
|
2480
|
-
const t = await
|
|
2529
|
+
const t = await Os({
|
|
2481
2530
|
onstart: () => {
|
|
2482
2531
|
this.recording = !0;
|
|
2483
2532
|
},
|
|
@@ -2502,27 +2551,27 @@ const Ls = [
|
|
|
2502
2551
|
}
|
|
2503
2552
|
}
|
|
2504
2553
|
}
|
|
2505
|
-
},
|
|
2554
|
+
}, Ls = { class: "wm-compose-wrap" }, Rs = {
|
|
2506
2555
|
key: 0,
|
|
2507
2556
|
class: "wm-rec"
|
|
2508
|
-
},
|
|
2557
|
+
}, $s = { class: "wm-rec__lbl" }, Fs = {
|
|
2509
2558
|
key: 1,
|
|
2510
2559
|
class: "wm-compose__menu",
|
|
2511
2560
|
role: "menu"
|
|
2512
|
-
},
|
|
2561
|
+
}, js = ["disabled", "onClick"], Us = { class: "wm-compose__menuIcon" }, Ds = {
|
|
2513
2562
|
viewBox: "0 0 24 24",
|
|
2514
2563
|
width: "14",
|
|
2515
2564
|
height: "14",
|
|
2516
2565
|
"aria-hidden": "true"
|
|
2517
|
-
},
|
|
2518
|
-
function
|
|
2519
|
-
return l(),
|
|
2520
|
-
r.recording ? (l(),
|
|
2566
|
+
}, Ns = ["d"], Ps = ["placeholder", "disabled"], Hs = { class: "wm-compose__actions" }, zs = ["title", "aria-label", "disabled"], Vs = ["disabled"];
|
|
2567
|
+
function qs(t, e, n, a, r, s) {
|
|
2568
|
+
return l(), d("div", Ls, [
|
|
2569
|
+
r.recording ? (l(), d("div", Rs, [
|
|
2521
2570
|
e[8] || (e[8] = i("span", {
|
|
2522
2571
|
class: "wm-rec__dot",
|
|
2523
2572
|
"aria-hidden": "true"
|
|
2524
2573
|
}, null, -1)),
|
|
2525
|
-
i("span",
|
|
2574
|
+
i("span", $s, "Enregistrement · " + b(s.recordingElapsedLabel), 1),
|
|
2526
2575
|
i("button", {
|
|
2527
2576
|
type: "button",
|
|
2528
2577
|
class: "wm-rec__stop",
|
|
@@ -2531,7 +2580,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2531
2580
|
])) : y("", !0),
|
|
2532
2581
|
i("form", {
|
|
2533
2582
|
class: E(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
2534
|
-
onSubmit: e[7] || (e[7] =
|
|
2583
|
+
onSubmit: e[7] || (e[7] = X((...o) => s.onSubmit && s.onSubmit(...o), ["prevent"]))
|
|
2535
2584
|
}, [
|
|
2536
2585
|
i("input", {
|
|
2537
2586
|
ref: "fileEl",
|
|
@@ -2540,21 +2589,21 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2540
2589
|
multiple: "",
|
|
2541
2590
|
onChange: e[1] || (e[1] = (...o) => s.onFile && s.onFile(...o))
|
|
2542
2591
|
}, null, 544),
|
|
2543
|
-
r.attachOpen ? (l(),
|
|
2592
|
+
r.attachOpen ? (l(), d("div", {
|
|
2544
2593
|
key: 0,
|
|
2545
2594
|
class: "wm-compose__overlay",
|
|
2546
2595
|
onClick: e[2] || (e[2] = (o) => r.attachOpen = !1)
|
|
2547
2596
|
})) : y("", !0),
|
|
2548
|
-
r.attachOpen ? (l(),
|
|
2549
|
-
(l(!0),
|
|
2597
|
+
r.attachOpen ? (l(), d("div", Fs, [
|
|
2598
|
+
(l(!0), d(M, null, j(s.attachItems, (o) => (l(), d("button", {
|
|
2550
2599
|
key: o.action,
|
|
2551
2600
|
type: "button",
|
|
2552
2601
|
class: "wm-compose__menuItem",
|
|
2553
2602
|
disabled: o.disabled,
|
|
2554
|
-
onClick: (
|
|
2603
|
+
onClick: (c) => s.onAttachAction(o.action)
|
|
2555
2604
|
}, [
|
|
2556
|
-
i("span",
|
|
2557
|
-
(l(),
|
|
2605
|
+
i("span", Us, [
|
|
2606
|
+
(l(), d("svg", Ds, [
|
|
2558
2607
|
i("path", {
|
|
2559
2608
|
d: o.path,
|
|
2560
2609
|
stroke: "currentColor",
|
|
@@ -2562,13 +2611,13 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2562
2611
|
"stroke-linecap": "round",
|
|
2563
2612
|
"stroke-linejoin": "round",
|
|
2564
2613
|
fill: "none"
|
|
2565
|
-
}, null, 8,
|
|
2614
|
+
}, null, 8, Ns)
|
|
2566
2615
|
]))
|
|
2567
2616
|
]),
|
|
2568
2617
|
i("span", null, b(o.label), 1)
|
|
2569
|
-
], 8,
|
|
2618
|
+
], 8, js))), 128))
|
|
2570
2619
|
])) : y("", !0),
|
|
2571
|
-
|
|
2620
|
+
H(i("textarea", {
|
|
2572
2621
|
ref: "inputEl",
|
|
2573
2622
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => r.local = o),
|
|
2574
2623
|
class: "wm-compose__input",
|
|
@@ -2577,10 +2626,10 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2577
2626
|
disabled: n.disabled,
|
|
2578
2627
|
onKeydown: e[4] || (e[4] = (...o) => s.onKeydown && s.onKeydown(...o)),
|
|
2579
2628
|
onInput: e[5] || (e[5] = (...o) => s.autosize && s.autosize(...o))
|
|
2580
|
-
}, null, 40,
|
|
2581
|
-
[
|
|
2629
|
+
}, null, 40, Ps), [
|
|
2630
|
+
[K, r.local]
|
|
2582
2631
|
]),
|
|
2583
|
-
i("div",
|
|
2632
|
+
i("div", Hs, [
|
|
2584
2633
|
i("button", {
|
|
2585
2634
|
type: "button",
|
|
2586
2635
|
class: E(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -2602,7 +2651,7 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2602
2651
|
}, [
|
|
2603
2652
|
i("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" })
|
|
2604
2653
|
], -1)
|
|
2605
|
-
])], 10,
|
|
2654
|
+
])], 10, zs),
|
|
2606
2655
|
i("button", {
|
|
2607
2656
|
type: "submit",
|
|
2608
2657
|
class: E(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -2622,12 +2671,12 @@ function Gs(t, e, n, a, r, s) {
|
|
|
2622
2671
|
}, [
|
|
2623
2672
|
i("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
2624
2673
|
], -1)
|
|
2625
|
-
])], 10,
|
|
2674
|
+
])], 10, Vs)
|
|
2626
2675
|
])
|
|
2627
2676
|
], 34)
|
|
2628
2677
|
]);
|
|
2629
2678
|
}
|
|
2630
|
-
const
|
|
2679
|
+
const Ws = /* @__PURE__ */ B(Bs, [["render", qs], ["__scopeId", "data-v-14fa9ec0"]]), Gs = {
|
|
2631
2680
|
name: "WmSuggestionChips",
|
|
2632
2681
|
props: {
|
|
2633
2682
|
items: { type: Array, default: () => [] },
|
|
@@ -2644,24 +2693,24 @@ const Ks = /* @__PURE__ */ B(Rs, [["render", Gs], ["__scopeId", "data-v-14fa9ec0
|
|
|
2644
2693
|
return this.items.map((t) => (t == null ? void 0 : t.label) || (t == null ? void 0 : t.text) || "").join("§");
|
|
2645
2694
|
}
|
|
2646
2695
|
}
|
|
2647
|
-
},
|
|
2648
|
-
function
|
|
2649
|
-
return n.items.length ? (l(),
|
|
2696
|
+
}, Ks = ["onClick"];
|
|
2697
|
+
function Ys(t, e, n, a, r, s) {
|
|
2698
|
+
return n.items.length ? (l(), d("div", {
|
|
2650
2699
|
key: s.batchKey,
|
|
2651
2700
|
class: "wm-chips"
|
|
2652
2701
|
}, [
|
|
2653
|
-
(l(!0),
|
|
2654
|
-
key:
|
|
2702
|
+
(l(!0), d(M, null, j(n.items, (o, c) => (l(), d("button", {
|
|
2703
|
+
key: c,
|
|
2655
2704
|
type: "button",
|
|
2656
2705
|
class: "wm-chip",
|
|
2657
|
-
style: V({ animationDelay: n.baseDelay +
|
|
2706
|
+
style: V({ animationDelay: n.baseDelay + c * n.stepDelay + "ms" }),
|
|
2658
2707
|
onClick: (v) => t.$emit("select", o)
|
|
2659
|
-
}, b(o.label), 13,
|
|
2708
|
+
}, b(o.label), 13, Ks))), 128))
|
|
2660
2709
|
])) : y("", !0);
|
|
2661
2710
|
}
|
|
2662
|
-
const
|
|
2711
|
+
const Js = /* @__PURE__ */ B(Gs, [["render", Ys], ["__scopeId", "data-v-55aa529d"]]), Xs = {
|
|
2663
2712
|
name: "WmApprovalCard",
|
|
2664
|
-
components: { AIAvatar:
|
|
2713
|
+
components: { AIAvatar: Q },
|
|
2665
2714
|
props: {
|
|
2666
2715
|
action: { type: String, required: !0 },
|
|
2667
2716
|
detail: { type: String, default: "" },
|
|
@@ -2692,41 +2741,41 @@ const Qs = /* @__PURE__ */ B(Ys, [["render", Xs], ["__scopeId", "data-v-55aa529d
|
|
|
2692
2741
|
return ((t = this.rejectCallback) == null ? void 0 : t.label) || "Refuser";
|
|
2693
2742
|
}
|
|
2694
2743
|
}
|
|
2695
|
-
},
|
|
2744
|
+
}, Qs = { class: "wm-approval" }, Zs = { class: "wm-approval__head" }, er = { class: "wm-approval__icon" }, tr = { class: "wm-approval__main" }, nr = { class: "wm-approval__title" }, sr = {
|
|
2696
2745
|
key: 0,
|
|
2697
2746
|
class: "wm-approval__detail"
|
|
2698
|
-
},
|
|
2699
|
-
function
|
|
2700
|
-
const o =
|
|
2701
|
-
return l(),
|
|
2702
|
-
i("div",
|
|
2703
|
-
i("div",
|
|
2704
|
-
|
|
2747
|
+
}, rr = { class: "wm-approval__actions" };
|
|
2748
|
+
function ir(t, e, n, a, r, s) {
|
|
2749
|
+
const o = O("AIAvatar");
|
|
2750
|
+
return l(), d("div", Qs, [
|
|
2751
|
+
i("div", Zs, [
|
|
2752
|
+
i("div", er, [
|
|
2753
|
+
z(o, { size: 24 })
|
|
2705
2754
|
]),
|
|
2706
|
-
i("div",
|
|
2707
|
-
i("div",
|
|
2708
|
-
n.detail ? (l(),
|
|
2755
|
+
i("div", tr, [
|
|
2756
|
+
i("div", nr, b(n.action), 1),
|
|
2757
|
+
n.detail ? (l(), d("div", sr, b(n.detail), 1)) : y("", !0)
|
|
2709
2758
|
])
|
|
2710
2759
|
]),
|
|
2711
|
-
i("div",
|
|
2712
|
-
s.rejectId ? (l(),
|
|
2760
|
+
i("div", rr, [
|
|
2761
|
+
s.rejectId ? (l(), d("button", {
|
|
2713
2762
|
key: 0,
|
|
2714
2763
|
type: "button",
|
|
2715
2764
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
2716
|
-
onClick: e[0] || (e[0] = (
|
|
2765
|
+
onClick: e[0] || (e[0] = (c) => t.$emit("callback", s.rejectId))
|
|
2717
2766
|
}, b(s.rejectLabel), 1)) : y("", !0),
|
|
2718
|
-
s.approveId ? (l(),
|
|
2767
|
+
s.approveId ? (l(), d("button", {
|
|
2719
2768
|
key: 1,
|
|
2720
2769
|
type: "button",
|
|
2721
2770
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
2722
|
-
onClick: e[1] || (e[1] = (
|
|
2771
|
+
onClick: e[1] || (e[1] = (c) => t.$emit("callback", s.approveId))
|
|
2723
2772
|
}, b(s.approveLabel), 1)) : y("", !0)
|
|
2724
2773
|
])
|
|
2725
2774
|
]);
|
|
2726
2775
|
}
|
|
2727
|
-
const
|
|
2776
|
+
const ar = /* @__PURE__ */ B(Xs, [["render", ir], ["__scopeId", "data-v-b1be139c"]]);
|
|
2728
2777
|
let ve = 0;
|
|
2729
|
-
const
|
|
2778
|
+
const or = /* @__PURE__ */ new Set([
|
|
2730
2779
|
"text",
|
|
2731
2780
|
"textarea",
|
|
2732
2781
|
"number",
|
|
@@ -2734,9 +2783,9 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2734
2783
|
"select",
|
|
2735
2784
|
"multiselect",
|
|
2736
2785
|
"date"
|
|
2737
|
-
]),
|
|
2786
|
+
]), lr = {
|
|
2738
2787
|
name: "WmFormCard",
|
|
2739
|
-
components: { AIAvatar:
|
|
2788
|
+
components: { AIAvatar: Q },
|
|
2740
2789
|
props: {
|
|
2741
2790
|
form: { type: Object, required: !0 },
|
|
2742
2791
|
readOnly: { type: Boolean, default: !1 },
|
|
@@ -2757,7 +2806,7 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2757
2806
|
// douteux.
|
|
2758
2807
|
normalizedFields() {
|
|
2759
2808
|
var e;
|
|
2760
|
-
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
2809
|
+
return (Array.isArray((e = this.form) == null ? void 0 : e.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !or.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
2761
2810
|
}
|
|
2762
2811
|
},
|
|
2763
2812
|
created() {
|
|
@@ -2808,163 +2857,163 @@ const cr = /* @__PURE__ */ new Set([
|
|
|
2808
2857
|
}
|
|
2809
2858
|
}
|
|
2810
2859
|
}
|
|
2811
|
-
},
|
|
2860
|
+
}, cr = { class: "wm-form" }, dr = { class: "wm-form__head" }, ur = { class: "wm-form__icon" }, hr = { class: "wm-form__main" }, mr = { class: "wm-form__title" }, fr = {
|
|
2812
2861
|
key: 0,
|
|
2813
2862
|
class: "wm-form__detail"
|
|
2814
|
-
},
|
|
2863
|
+
}, pr = ["for"], _r = {
|
|
2815
2864
|
key: 0,
|
|
2816
2865
|
class: "wm-form__req",
|
|
2817
2866
|
"aria-hidden": "true"
|
|
2818
|
-
},
|
|
2867
|
+
}, vr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], gr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], yr = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], wr = ["id", "onUpdate:modelValue", "required", "disabled"], br = {
|
|
2819
2868
|
key: 4,
|
|
2820
2869
|
class: "wm-form__bool"
|
|
2821
|
-
},
|
|
2870
|
+
}, kr = ["id", "onUpdate:modelValue", "disabled"], Cr = ["id", "onUpdate:modelValue", "required", "disabled"], Ar = {
|
|
2822
2871
|
value: "",
|
|
2823
2872
|
disabled: ""
|
|
2824
|
-
},
|
|
2873
|
+
}, Sr = ["value"], xr = {
|
|
2825
2874
|
key: 6,
|
|
2826
2875
|
class: "wm-form__multi"
|
|
2827
|
-
},
|
|
2876
|
+
}, Mr = ["value", "checked", "disabled", "onChange"], Tr = {
|
|
2828
2877
|
key: 0,
|
|
2829
2878
|
class: "wm-form__err"
|
|
2830
|
-
},
|
|
2879
|
+
}, Ir = ["disabled"], Or = {
|
|
2831
2880
|
key: 0,
|
|
2832
2881
|
class: "wm-form__spinner",
|
|
2833
2882
|
"aria-hidden": "true"
|
|
2834
|
-
},
|
|
2883
|
+
}, Er = {
|
|
2835
2884
|
key: 2,
|
|
2836
2885
|
class: "wm-form__doneLbl"
|
|
2837
2886
|
};
|
|
2838
|
-
function
|
|
2839
|
-
const o =
|
|
2840
|
-
return l(),
|
|
2841
|
-
i("div",
|
|
2842
|
-
i("div",
|
|
2843
|
-
|
|
2887
|
+
function Br(t, e, n, a, r, s) {
|
|
2888
|
+
const o = O("AIAvatar");
|
|
2889
|
+
return l(), d("div", cr, [
|
|
2890
|
+
i("div", dr, [
|
|
2891
|
+
i("div", ur, [
|
|
2892
|
+
z(o, { size: 24 })
|
|
2844
2893
|
]),
|
|
2845
|
-
i("div",
|
|
2846
|
-
i("div",
|
|
2847
|
-
n.form.description ? (l(),
|
|
2894
|
+
i("div", hr, [
|
|
2895
|
+
i("div", mr, b(n.form.title || "Formulaire"), 1),
|
|
2896
|
+
n.form.description ? (l(), d("div", fr, b(n.form.description), 1)) : y("", !0)
|
|
2848
2897
|
])
|
|
2849
2898
|
]),
|
|
2850
2899
|
i("form", {
|
|
2851
2900
|
class: "wm-form__body",
|
|
2852
|
-
onSubmit: e[0] || (e[0] =
|
|
2901
|
+
onSubmit: e[0] || (e[0] = X((...c) => s.onSubmit && s.onSubmit(...c), ["prevent"]))
|
|
2853
2902
|
}, [
|
|
2854
|
-
(l(!0),
|
|
2855
|
-
key:
|
|
2903
|
+
(l(!0), d(M, null, j(s.normalizedFields, (c) => (l(), d("div", {
|
|
2904
|
+
key: c.key,
|
|
2856
2905
|
class: "wm-form__field"
|
|
2857
2906
|
}, [
|
|
2858
2907
|
i("label", {
|
|
2859
|
-
for: `wm-f-${r._uid}-${
|
|
2908
|
+
for: `wm-f-${r._uid}-${c.key}`,
|
|
2860
2909
|
class: "wm-form__label"
|
|
2861
2910
|
}, [
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
], 8,
|
|
2865
|
-
|
|
2911
|
+
re(b(c.label), 1),
|
|
2912
|
+
c.required ? (l(), d("span", _r, "*")) : y("", !0)
|
|
2913
|
+
], 8, pr),
|
|
2914
|
+
c.type === "text" ? H((l(), d("input", {
|
|
2866
2915
|
key: 0,
|
|
2867
|
-
id: `wm-f-${r._uid}-${
|
|
2868
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2916
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2917
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2869
2918
|
type: "text",
|
|
2870
2919
|
class: "wm-form__input",
|
|
2871
|
-
placeholder:
|
|
2872
|
-
required:
|
|
2920
|
+
placeholder: c.placeholder || "",
|
|
2921
|
+
required: c.required,
|
|
2873
2922
|
disabled: n.readOnly || r.busy
|
|
2874
|
-
}, null, 8,
|
|
2875
|
-
[
|
|
2876
|
-
]) :
|
|
2923
|
+
}, null, 8, vr)), [
|
|
2924
|
+
[K, r.values[c.key]]
|
|
2925
|
+
]) : c.type === "textarea" ? H((l(), d("textarea", {
|
|
2877
2926
|
key: 1,
|
|
2878
|
-
id: `wm-f-${r._uid}-${
|
|
2879
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2927
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2928
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2880
2929
|
class: "wm-form__textarea",
|
|
2881
2930
|
rows: "3",
|
|
2882
|
-
placeholder:
|
|
2883
|
-
required:
|
|
2931
|
+
placeholder: c.placeholder || "",
|
|
2932
|
+
required: c.required,
|
|
2884
2933
|
disabled: n.readOnly || r.busy
|
|
2885
|
-
}, null, 8,
|
|
2886
|
-
[
|
|
2887
|
-
]) :
|
|
2934
|
+
}, null, 8, gr)), [
|
|
2935
|
+
[K, r.values[c.key]]
|
|
2936
|
+
]) : c.type === "number" ? H((l(), d("input", {
|
|
2888
2937
|
key: 2,
|
|
2889
|
-
id: `wm-f-${r._uid}-${
|
|
2890
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2938
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2939
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2891
2940
|
type: "number",
|
|
2892
2941
|
class: "wm-form__input",
|
|
2893
|
-
placeholder:
|
|
2894
|
-
required:
|
|
2942
|
+
placeholder: c.placeholder || "",
|
|
2943
|
+
required: c.required,
|
|
2895
2944
|
disabled: n.readOnly || r.busy
|
|
2896
|
-
}, null, 8,
|
|
2945
|
+
}, null, 8, yr)), [
|
|
2897
2946
|
[
|
|
2898
|
-
|
|
2899
|
-
r.values[
|
|
2947
|
+
K,
|
|
2948
|
+
r.values[c.key],
|
|
2900
2949
|
void 0,
|
|
2901
2950
|
{ number: !0 }
|
|
2902
2951
|
]
|
|
2903
|
-
]) :
|
|
2952
|
+
]) : c.type === "date" ? H((l(), d("input", {
|
|
2904
2953
|
key: 3,
|
|
2905
|
-
id: `wm-f-${r._uid}-${
|
|
2906
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2954
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2955
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2907
2956
|
type: "date",
|
|
2908
2957
|
class: "wm-form__input",
|
|
2909
|
-
required:
|
|
2958
|
+
required: c.required,
|
|
2910
2959
|
disabled: n.readOnly || r.busy
|
|
2911
|
-
}, null, 8,
|
|
2912
|
-
[
|
|
2913
|
-
]) :
|
|
2914
|
-
|
|
2915
|
-
id: `wm-f-${r._uid}-${
|
|
2916
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2960
|
+
}, null, 8, wr)), [
|
|
2961
|
+
[K, r.values[c.key]]
|
|
2962
|
+
]) : c.type === "boolean" ? (l(), d("label", br, [
|
|
2963
|
+
H(i("input", {
|
|
2964
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2965
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2917
2966
|
type: "checkbox",
|
|
2918
2967
|
disabled: n.readOnly || r.busy
|
|
2919
|
-
}, null, 8,
|
|
2920
|
-
[Ie, r.values[
|
|
2968
|
+
}, null, 8, kr), [
|
|
2969
|
+
[Ie, r.values[c.key]]
|
|
2921
2970
|
]),
|
|
2922
|
-
i("span", null, b(
|
|
2923
|
-
])) :
|
|
2971
|
+
i("span", null, b(c.placeholder || "Oui"), 1)
|
|
2972
|
+
])) : c.type === "select" ? H((l(), d("select", {
|
|
2924
2973
|
key: 5,
|
|
2925
|
-
id: `wm-f-${r._uid}-${
|
|
2926
|
-
"onUpdate:modelValue": (v) => r.values[
|
|
2974
|
+
id: `wm-f-${r._uid}-${c.key}`,
|
|
2975
|
+
"onUpdate:modelValue": (v) => r.values[c.key] = v,
|
|
2927
2976
|
class: "wm-form__select",
|
|
2928
|
-
required:
|
|
2977
|
+
required: c.required,
|
|
2929
2978
|
disabled: n.readOnly || r.busy
|
|
2930
2979
|
}, [
|
|
2931
|
-
i("option",
|
|
2932
|
-
(l(!0),
|
|
2980
|
+
i("option", Ar, b(c.placeholder || "Choisir…"), 1),
|
|
2981
|
+
(l(!0), d(M, null, j(c.options, (v) => (l(), d("option", {
|
|
2933
2982
|
key: v.value,
|
|
2934
2983
|
value: v.value
|
|
2935
|
-
}, b(v.label), 9,
|
|
2936
|
-
], 8,
|
|
2937
|
-
[
|
|
2938
|
-
]) :
|
|
2939
|
-
(l(!0),
|
|
2984
|
+
}, b(v.label), 9, Sr))), 128))
|
|
2985
|
+
], 8, Cr)), [
|
|
2986
|
+
[Oe, r.values[c.key]]
|
|
2987
|
+
]) : c.type === "multiselect" ? (l(), d("div", xr, [
|
|
2988
|
+
(l(!0), d(M, null, j(c.options, (v) => (l(), d("label", {
|
|
2940
2989
|
key: v.value,
|
|
2941
2990
|
class: "wm-form__multiItem"
|
|
2942
2991
|
}, [
|
|
2943
2992
|
i("input", {
|
|
2944
2993
|
type: "checkbox",
|
|
2945
2994
|
value: v.value,
|
|
2946
|
-
checked: Array.isArray(r.values[
|
|
2995
|
+
checked: Array.isArray(r.values[c.key]) && r.values[c.key].includes(v.value),
|
|
2947
2996
|
disabled: n.readOnly || r.busy,
|
|
2948
|
-
onChange: (C) => s.toggleMulti(
|
|
2949
|
-
}, null, 40,
|
|
2997
|
+
onChange: (C) => s.toggleMulti(c.key, v.value, C.target.checked)
|
|
2998
|
+
}, null, 40, Mr),
|
|
2950
2999
|
i("span", null, b(v.label), 1)
|
|
2951
3000
|
]))), 128))
|
|
2952
3001
|
])) : y("", !0)
|
|
2953
3002
|
]))), 128)),
|
|
2954
|
-
r.error ? (l(),
|
|
2955
|
-
n.readOnly ? (l(),
|
|
3003
|
+
r.error ? (l(), d("div", Tr, b(r.error), 1)) : y("", !0),
|
|
3004
|
+
n.readOnly ? (l(), d("div", Er, "Réponse envoyée")) : (l(), d("button", {
|
|
2956
3005
|
key: 1,
|
|
2957
3006
|
type: "submit",
|
|
2958
3007
|
class: "wm-form__submit",
|
|
2959
3008
|
disabled: r.busy
|
|
2960
3009
|
}, [
|
|
2961
|
-
r.busy ? (l(),
|
|
3010
|
+
r.busy ? (l(), d("span", Or)) : y("", !0),
|
|
2962
3011
|
i("span", null, b(r.busy ? "Envoi…" : n.form.submit_label || "Envoyer"), 1)
|
|
2963
|
-
], 8,
|
|
3012
|
+
], 8, Ir))
|
|
2964
3013
|
], 32)
|
|
2965
3014
|
]);
|
|
2966
3015
|
}
|
|
2967
|
-
const
|
|
3016
|
+
const Lr = /* @__PURE__ */ B(lr, [["render", Br], ["__scopeId", "data-v-64b40f76"]]), Rr = {
|
|
2968
3017
|
name: "WmFeedback",
|
|
2969
3018
|
props: {
|
|
2970
3019
|
busy: { type: Boolean, default: !1 },
|
|
@@ -2988,43 +3037,43 @@ const $r = /* @__PURE__ */ B(dr, [["render", Rr], ["__scopeId", "data-v-64b40f76
|
|
|
2988
3037
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
2989
3038
|
}
|
|
2990
3039
|
}
|
|
2991
|
-
},
|
|
3040
|
+
}, $r = { class: "wm-fb" }, Fr = { class: "wm-fb__row" }, jr = ["onClick"], Ur = { class: "wm-fb__emoji" }, Dr = { class: "wm-fb__label" }, Nr = ["disabled"], Pr = {
|
|
2992
3041
|
key: 1,
|
|
2993
3042
|
class: "wm-fb__done"
|
|
2994
3043
|
};
|
|
2995
|
-
function
|
|
2996
|
-
return l(),
|
|
2997
|
-
n.done ? (l(),
|
|
3044
|
+
function Hr(t, e, n, a, r, s) {
|
|
3045
|
+
return l(), d("div", $r, [
|
|
3046
|
+
n.done ? (l(), d("div", Pr, [...e[3] || (e[3] = [
|
|
2998
3047
|
ue('<div class="wm-fb__check" data-v-6f45ff3b><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#fff" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-6f45ff3b><path d="M20 6L9 17l-5-5" data-v-6f45ff3b></path></svg></div><div class="wm-fb__doneTitle" data-v-6f45ff3b>Merci pour votre retour !</div><div class="wm-fb__doneSub" data-v-6f45ff3b>Votre avis a bien été pris en compte.</div>', 3)
|
|
2999
|
-
])])) : (l(),
|
|
3048
|
+
])])) : (l(), d(M, { key: 0 }, [
|
|
3000
3049
|
e[1] || (e[1] = i("div", { class: "wm-fb__title" }, "Comment s'est passée cette conversation ?", -1)),
|
|
3001
3050
|
e[2] || (e[2] = i("div", { class: "wm-fb__sub" }, "Votre avis nous aide à améliorer l'assistant.", -1)),
|
|
3002
|
-
i("div",
|
|
3003
|
-
(l(!0),
|
|
3051
|
+
i("div", Fr, [
|
|
3052
|
+
(l(!0), d(M, null, j(r.options, (o) => (l(), d("button", {
|
|
3004
3053
|
key: o.v,
|
|
3005
3054
|
type: "button",
|
|
3006
3055
|
class: E(["wm-fb__opt", { "is-selected": r.sel === o.v }]),
|
|
3007
|
-
onClick: (
|
|
3056
|
+
onClick: (c) => r.sel = o.v
|
|
3008
3057
|
}, [
|
|
3009
|
-
i("span",
|
|
3010
|
-
i("span",
|
|
3011
|
-
], 10,
|
|
3058
|
+
i("span", Ur, b(o.e), 1),
|
|
3059
|
+
i("span", Dr, b(o.l), 1)
|
|
3060
|
+
], 10, jr))), 128))
|
|
3012
3061
|
]),
|
|
3013
3062
|
i("button", {
|
|
3014
3063
|
type: "button",
|
|
3015
3064
|
class: "wm-fb__send",
|
|
3016
3065
|
disabled: !r.sel || n.busy,
|
|
3017
3066
|
onClick: e[0] || (e[0] = (...o) => s.onSend && s.onSend(...o))
|
|
3018
|
-
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9,
|
|
3067
|
+
}, b(n.busy ? "Envoi…" : "Envoyer mon avis"), 9, Nr)
|
|
3019
3068
|
], 64))
|
|
3020
3069
|
]);
|
|
3021
3070
|
}
|
|
3022
|
-
const
|
|
3023
|
-
function
|
|
3071
|
+
const zr = /* @__PURE__ */ B(Rr, [["render", Hr], ["__scopeId", "data-v-6f45ff3b"]]);
|
|
3072
|
+
function Vr(t) {
|
|
3024
3073
|
const e = new Date(t);
|
|
3025
3074
|
return e.setHours(0, 0, 0, 0), e;
|
|
3026
3075
|
}
|
|
3027
|
-
const
|
|
3076
|
+
const qr = {
|
|
3028
3077
|
name: "WmHistoryDrawer",
|
|
3029
3078
|
props: {
|
|
3030
3079
|
conversations: { type: Array, default: () => [] },
|
|
@@ -3058,7 +3107,7 @@ const Gr = {
|
|
|
3058
3107
|
) : this.normalized;
|
|
3059
3108
|
},
|
|
3060
3109
|
groups() {
|
|
3061
|
-
const e =
|
|
3110
|
+
const e = Vr(/* @__PURE__ */ new Date()).getTime(), n = e - 6 * 864e5, a = [], r = [], s = [];
|
|
3062
3111
|
for (const o of this.filtered) {
|
|
3063
3112
|
if (!o.stamp) {
|
|
3064
3113
|
s.push(o);
|
|
@@ -3076,29 +3125,29 @@ const Gr = {
|
|
|
3076
3125
|
return this.filtered.length > 0;
|
|
3077
3126
|
}
|
|
3078
3127
|
}
|
|
3079
|
-
},
|
|
3128
|
+
}, Wr = { class: "wm-hd" }, Gr = {
|
|
3080
3129
|
class: "wm-hd__panel",
|
|
3081
3130
|
role: "dialog",
|
|
3082
3131
|
"aria-label": "Vos discussions"
|
|
3083
|
-
},
|
|
3132
|
+
}, Kr = { class: "wm-hd__head" }, Yr = { class: "wm-hd__top" }, Jr = { class: "wm-hd__search" }, Xr = { class: "wm-hd__list" }, Qr = {
|
|
3084
3133
|
key: 0,
|
|
3085
3134
|
class: "wm-hd__group"
|
|
3086
|
-
},
|
|
3135
|
+
}, Zr = { class: "wm-hd__groupLabel" }, ei = { class: "wm-hd__rows" }, ti = ["onClick"], ni = { class: "wm-hd__rowIcon" }, si = {
|
|
3087
3136
|
key: 0,
|
|
3088
3137
|
class: "wm-hd__rowDot",
|
|
3089
3138
|
"aria-label": "Message non lu"
|
|
3090
|
-
},
|
|
3139
|
+
}, ri = { class: "wm-hd__rowBody" }, ii = { class: "wm-hd__rowTop" }, ai = { class: "wm-hd__rowTitle" }, oi = { class: "wm-hd__rowPreview" }, li = {
|
|
3091
3140
|
key: 0,
|
|
3092
3141
|
class: "wm-hd__empty"
|
|
3093
3142
|
};
|
|
3094
|
-
function
|
|
3095
|
-
return l(),
|
|
3143
|
+
function ci(t, e, n, a, r, s) {
|
|
3144
|
+
return l(), d("div", Wr, [
|
|
3096
3145
|
i("div", {
|
|
3097
3146
|
class: "wm-hd__scrim",
|
|
3098
3147
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3099
3148
|
}),
|
|
3100
|
-
i("aside",
|
|
3101
|
-
i("div",
|
|
3149
|
+
i("aside", Gr, [
|
|
3150
|
+
i("div", Kr, [
|
|
3102
3151
|
e[5] || (e[5] = i("div", { class: "wm-hd__heading" }, [
|
|
3103
3152
|
i("div", { class: "wm-hd__title" }, "Vos discussions"),
|
|
3104
3153
|
i("div", { class: "wm-hd__sub" }, "Reprenez là où vous en étiez.")
|
|
@@ -3124,7 +3173,7 @@ function ui(t, e, n, a, r, s) {
|
|
|
3124
3173
|
], -1)
|
|
3125
3174
|
])])
|
|
3126
3175
|
]),
|
|
3127
|
-
i("div",
|
|
3176
|
+
i("div", Yr, [
|
|
3128
3177
|
i("button", {
|
|
3129
3178
|
type: "button",
|
|
3130
3179
|
class: "wm-hd__new",
|
|
@@ -3147,7 +3196,7 @@ function ui(t, e, n, a, r, s) {
|
|
|
3147
3196
|
], -1),
|
|
3148
3197
|
i("span", null, "Démarrer un nouveau fil", -1)
|
|
3149
3198
|
])]),
|
|
3150
|
-
i("div",
|
|
3199
|
+
i("div", Jr, [
|
|
3151
3200
|
e[7] || (e[7] = i("span", { class: "wm-hd__searchIcon" }, [
|
|
3152
3201
|
i("svg", {
|
|
3153
3202
|
width: "12",
|
|
@@ -3163,33 +3212,33 @@ function ui(t, e, n, a, r, s) {
|
|
|
3163
3212
|
i("path", { d: "M21 21l-4.35-4.35M11 17a6 6 0 100-12 6 6 0 000 12z" })
|
|
3164
3213
|
])
|
|
3165
3214
|
], -1)),
|
|
3166
|
-
|
|
3215
|
+
H(i("input", {
|
|
3167
3216
|
"onUpdate:modelValue": e[3] || (e[3] = (o) => r.query = o),
|
|
3168
3217
|
type: "text",
|
|
3169
3218
|
placeholder: "Rechercher dans vos messages",
|
|
3170
3219
|
"aria-label": "Rechercher dans vos messages"
|
|
3171
3220
|
}, null, 512), [
|
|
3172
|
-
[
|
|
3221
|
+
[K, r.query]
|
|
3173
3222
|
])
|
|
3174
3223
|
])
|
|
3175
3224
|
]),
|
|
3176
|
-
i("div",
|
|
3177
|
-
(l(!0),
|
|
3225
|
+
i("div", Xr, [
|
|
3226
|
+
(l(!0), d(M, null, j(s.groups, (o) => (l(), d(M, {
|
|
3178
3227
|
key: o.key
|
|
3179
3228
|
}, [
|
|
3180
|
-
o.items.length ? (l(),
|
|
3181
|
-
i("div",
|
|
3182
|
-
i("div",
|
|
3183
|
-
(l(!0),
|
|
3184
|
-
key:
|
|
3229
|
+
o.items.length ? (l(), d("div", Qr, [
|
|
3230
|
+
i("div", Zr, b(o.label), 1),
|
|
3231
|
+
i("div", ei, [
|
|
3232
|
+
(l(!0), d(M, null, j(o.items, (c) => (l(), d("button", {
|
|
3233
|
+
key: c.id,
|
|
3185
3234
|
type: "button",
|
|
3186
3235
|
class: E(["wm-hd__row", {
|
|
3187
|
-
"wm-hd__row--active":
|
|
3188
|
-
"wm-hd__row--unread":
|
|
3236
|
+
"wm-hd__row--active": c.id === n.activeId,
|
|
3237
|
+
"wm-hd__row--unread": c.unread
|
|
3189
3238
|
}]),
|
|
3190
|
-
onClick: (v) => t.$emit("pick",
|
|
3239
|
+
onClick: (v) => t.$emit("pick", c)
|
|
3191
3240
|
}, [
|
|
3192
|
-
i("div",
|
|
3241
|
+
i("div", ni, [
|
|
3193
3242
|
e[8] || (e[8] = i("svg", {
|
|
3194
3243
|
width: "11",
|
|
3195
3244
|
height: "11",
|
|
@@ -3203,24 +3252,24 @@ function ui(t, e, n, a, r, s) {
|
|
|
3203
3252
|
opacity: "0.92"
|
|
3204
3253
|
})
|
|
3205
3254
|
], -1)),
|
|
3206
|
-
|
|
3255
|
+
c.unread ? (l(), d("span", si)) : y("", !0)
|
|
3207
3256
|
]),
|
|
3208
|
-
i("div",
|
|
3209
|
-
i("div",
|
|
3210
|
-
i("span",
|
|
3257
|
+
i("div", ri, [
|
|
3258
|
+
i("div", ii, [
|
|
3259
|
+
i("span", ai, b(c.title), 1)
|
|
3211
3260
|
]),
|
|
3212
|
-
i("div",
|
|
3261
|
+
i("div", oi, b(c.preview || "Aucun message"), 1)
|
|
3213
3262
|
])
|
|
3214
|
-
], 10,
|
|
3263
|
+
], 10, ti))), 128))
|
|
3215
3264
|
])
|
|
3216
3265
|
])) : y("", !0)
|
|
3217
3266
|
], 64))), 128)),
|
|
3218
|
-
s.hasAny ? y("", !0) : (l(),
|
|
3267
|
+
s.hasAny ? y("", !0) : (l(), d("div", li, " Aucun fil pour le moment. "))
|
|
3219
3268
|
])
|
|
3220
3269
|
])
|
|
3221
3270
|
]);
|
|
3222
3271
|
}
|
|
3223
|
-
const
|
|
3272
|
+
const di = /* @__PURE__ */ B(qr, [["render", ci], ["__scopeId", "data-v-1259e822"]]), ui = {
|
|
3224
3273
|
name: "WmMoreMenu",
|
|
3225
3274
|
props: {
|
|
3226
3275
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -3247,18 +3296,18 @@ const hi = /* @__PURE__ */ B(Gr, [["render", ui], ["__scopeId", "data-v-1259e822
|
|
|
3247
3296
|
this.notifOn = !this.notifOn, this.$emit("notif-toggle", this.notifOn);
|
|
3248
3297
|
}
|
|
3249
3298
|
}
|
|
3250
|
-
},
|
|
3299
|
+
}, hi = { class: "wm-mm" }, mi = {
|
|
3251
3300
|
class: "wm-mm__pop",
|
|
3252
3301
|
role: "menu"
|
|
3253
|
-
},
|
|
3254
|
-
function
|
|
3255
|
-
return l(),
|
|
3302
|
+
}, fi = { class: "wm-mm__section" }, pi = { class: "wm-mm__section" }, _i = { class: "wm-mm__section" };
|
|
3303
|
+
function vi(t, e, n, a, r, s) {
|
|
3304
|
+
return l(), d("div", hi, [
|
|
3256
3305
|
i("div", {
|
|
3257
3306
|
class: "wm-mm__scrim",
|
|
3258
3307
|
onClick: e[0] || (e[0] = (o) => t.$emit("close"))
|
|
3259
3308
|
}),
|
|
3260
|
-
i("div",
|
|
3261
|
-
i("div",
|
|
3309
|
+
i("div", mi, [
|
|
3310
|
+
i("div", fi, [
|
|
3262
3311
|
i("button", {
|
|
3263
3312
|
type: "button",
|
|
3264
3313
|
class: "wm-mm__item",
|
|
@@ -3281,7 +3330,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3281
3330
|
], -1),
|
|
3282
3331
|
i("span", { class: "wm-mm__label" }, "Historique des discussions", -1)
|
|
3283
3332
|
])]),
|
|
3284
|
-
n.canRename ? (l(),
|
|
3333
|
+
n.canRename ? (l(), d("button", {
|
|
3285
3334
|
key: 0,
|
|
3286
3335
|
type: "button",
|
|
3287
3336
|
class: "wm-mm__item",
|
|
@@ -3289,7 +3338,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3289
3338
|
}, [...e[9] || (e[9] = [
|
|
3290
3339
|
ue('<span class="wm-mm__icon" data-v-c1bb81d2><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-v-c1bb81d2><path d="M12 20h9" data-v-c1bb81d2></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" data-v-c1bb81d2></path></svg></span><span class="wm-mm__label" data-v-c1bb81d2>Renommer le fil</span>', 2)
|
|
3291
3340
|
])])) : y("", !0),
|
|
3292
|
-
n.canClear ? (l(),
|
|
3341
|
+
n.canClear ? (l(), d("button", {
|
|
3293
3342
|
key: 1,
|
|
3294
3343
|
type: "button",
|
|
3295
3344
|
class: "wm-mm__item",
|
|
@@ -3312,7 +3361,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3312
3361
|
], -1),
|
|
3313
3362
|
i("span", { class: "wm-mm__label" }, "Effacer ce fil", -1)
|
|
3314
3363
|
])])) : y("", !0),
|
|
3315
|
-
n.canExport ? (l(),
|
|
3364
|
+
n.canExport ? (l(), d("button", {
|
|
3316
3365
|
key: 2,
|
|
3317
3366
|
type: "button",
|
|
3318
3367
|
class: "wm-mm__item",
|
|
@@ -3322,7 +3371,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3322
3371
|
])])) : y("", !0)
|
|
3323
3372
|
]),
|
|
3324
3373
|
e[17] || (e[17] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3325
|
-
i("div",
|
|
3374
|
+
i("div", pi, [
|
|
3326
3375
|
i("button", {
|
|
3327
3376
|
type: "button",
|
|
3328
3377
|
class: "wm-mm__item",
|
|
@@ -3352,8 +3401,8 @@ function yi(t, e, n, a, r, s) {
|
|
|
3352
3401
|
])
|
|
3353
3402
|
]),
|
|
3354
3403
|
e[18] || (e[18] = i("div", { class: "wm-mm__sep" }, null, -1)),
|
|
3355
|
-
i("div",
|
|
3356
|
-
n.statusUrl ? (l(),
|
|
3404
|
+
i("div", _i, [
|
|
3405
|
+
n.statusUrl ? (l(), d("button", {
|
|
3357
3406
|
key: 0,
|
|
3358
3407
|
type: "button",
|
|
3359
3408
|
class: "wm-mm__item",
|
|
@@ -3376,7 +3425,7 @@ function yi(t, e, n, a, r, s) {
|
|
|
3376
3425
|
], -1),
|
|
3377
3426
|
i("span", { class: "wm-mm__label" }, "Statut des services", -1)
|
|
3378
3427
|
])])) : y("", !0),
|
|
3379
|
-
n.helpUrl ? (l(),
|
|
3428
|
+
n.helpUrl ? (l(), d("button", {
|
|
3380
3429
|
key: 1,
|
|
3381
3430
|
type: "button",
|
|
3382
3431
|
class: "wm-mm__item",
|
|
@@ -3403,13 +3452,13 @@ function yi(t, e, n, a, r, s) {
|
|
|
3403
3452
|
])
|
|
3404
3453
|
]);
|
|
3405
3454
|
}
|
|
3406
|
-
const
|
|
3455
|
+
const gi = /* @__PURE__ */ B(ui, [["render", vi], ["__scopeId", "data-v-c1bb81d2"]]), ge = "ww-messenger-tokens";
|
|
3407
3456
|
function de(t) {
|
|
3408
3457
|
var n;
|
|
3409
3458
|
const e = (n = t == null ? void 0 : t.author) == null ? void 0 : n.type;
|
|
3410
3459
|
return e === "agent_ia" || e === "agent_human";
|
|
3411
3460
|
}
|
|
3412
|
-
function
|
|
3461
|
+
function yi(t, e) {
|
|
3413
3462
|
if (!t || !e) return "";
|
|
3414
3463
|
const n = Array.isArray(t.fields) ? t.fields : [], a = [];
|
|
3415
3464
|
for (const r of n) {
|
|
@@ -3418,8 +3467,8 @@ function bi(t, e) {
|
|
|
3418
3467
|
if (s == null || s === "") continue;
|
|
3419
3468
|
let o;
|
|
3420
3469
|
if (Array.isArray(s)) {
|
|
3421
|
-
if (o = s.map((
|
|
3422
|
-
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o =
|
|
3470
|
+
if (o = s.map((c) => se(r, String(c))).join(", "), !o) continue;
|
|
3471
|
+
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
|
|
3423
3472
|
a.push(`${r.label} :
|
|
3424
3473
|
${o}`);
|
|
3425
3474
|
}
|
|
@@ -3427,12 +3476,12 @@ ${o}`);
|
|
|
3427
3476
|
|
|
3428
3477
|
`);
|
|
3429
3478
|
}
|
|
3430
|
-
function
|
|
3479
|
+
function se(t, e) {
|
|
3431
3480
|
if (!Array.isArray(t == null ? void 0 : t.options)) return e;
|
|
3432
3481
|
const n = t.options.find((a) => (a == null ? void 0 : a.value) === e);
|
|
3433
3482
|
return (n == null ? void 0 : n.label) || e;
|
|
3434
3483
|
}
|
|
3435
|
-
function
|
|
3484
|
+
function wi(t, e) {
|
|
3436
3485
|
const n = [], a = Array.isArray(t == null ? void 0 : t.fields) ? t.fields : [];
|
|
3437
3486
|
for (const r of a) {
|
|
3438
3487
|
if (!(r != null && r.key) || !(r != null && r.label)) continue;
|
|
@@ -3440,11 +3489,11 @@ function ki(t, e) {
|
|
|
3440
3489
|
if (s == null || s === "") continue;
|
|
3441
3490
|
let o;
|
|
3442
3491
|
if (Array.isArray(s)) {
|
|
3443
|
-
if (o = s.map((v) =>
|
|
3444
|
-
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o =
|
|
3445
|
-
const
|
|
3492
|
+
if (o = s.map((v) => se(r, String(v))).join(", "), !o) continue;
|
|
3493
|
+
} else typeof s == "boolean" ? o = s ? "Oui" : "Non" : o = se(r, String(s));
|
|
3494
|
+
const c = r.type === "textarea" || typeof o == "string" && (o.length > 60 || o.includes(`
|
|
3446
3495
|
`));
|
|
3447
|
-
n.push({ label: r.label, value: o, multiline:
|
|
3496
|
+
n.push({ label: r.label, value: o, multiline: c });
|
|
3448
3497
|
}
|
|
3449
3498
|
return {
|
|
3450
3499
|
kind: "form_response",
|
|
@@ -3454,20 +3503,20 @@ function ki(t, e) {
|
|
|
3454
3503
|
}
|
|
3455
3504
|
};
|
|
3456
3505
|
}
|
|
3457
|
-
const
|
|
3506
|
+
const bi = 450, ki = 50, Ci = 900, Ai = 12e3, Si = 300, xi = {
|
|
3458
3507
|
name: "Messenger",
|
|
3459
3508
|
components: {
|
|
3460
|
-
Launcher:
|
|
3461
|
-
Header:
|
|
3462
|
-
Onboarding:
|
|
3463
|
-
MessageList:
|
|
3464
|
-
Composer:
|
|
3465
|
-
SuggestionChips:
|
|
3466
|
-
ApprovalCard:
|
|
3467
|
-
FormCard:
|
|
3468
|
-
Feedback:
|
|
3469
|
-
HistoryDrawer:
|
|
3470
|
-
MoreMenu:
|
|
3509
|
+
Launcher: Ge,
|
|
3510
|
+
Header: yt,
|
|
3511
|
+
Onboarding: Pt,
|
|
3512
|
+
MessageList: xs,
|
|
3513
|
+
Composer: Ws,
|
|
3514
|
+
SuggestionChips: Js,
|
|
3515
|
+
ApprovalCard: ar,
|
|
3516
|
+
FormCard: Lr,
|
|
3517
|
+
Feedback: zr,
|
|
3518
|
+
HistoryDrawer: di,
|
|
3519
|
+
MoreMenu: gi
|
|
3471
3520
|
},
|
|
3472
3521
|
// Make signAttachment available to deep children (AttachmentPreview)
|
|
3473
3522
|
// without prop drilling. The store may not exist yet at provide-time
|
|
@@ -3483,7 +3532,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3483
3532
|
},
|
|
3484
3533
|
props: {
|
|
3485
3534
|
// Hardcoded server default (overridable for staging/dev).
|
|
3486
|
-
baseUrl: { type: String, default:
|
|
3535
|
+
baseUrl: { type: String, default: Pe },
|
|
3487
3536
|
widgetId: { type: String, default: "" },
|
|
3488
3537
|
userId: { type: String, default: "" },
|
|
3489
3538
|
userHash: { type: String, default: "" },
|
|
@@ -3622,7 +3671,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3622
3671
|
var n;
|
|
3623
3672
|
const t = this.readState, e = ((n = this.s) == null ? void 0 : n.messagesByConv) || {};
|
|
3624
3673
|
return this.allConversations.map((a) => {
|
|
3625
|
-
const r = e[a.id] || [], s = this.convLastActivity(a, r), o = t[a.id] || "",
|
|
3674
|
+
const r = e[a.id] || [], s = this.convLastActivity(a, r), o = t[a.id] || "", c = this.lastMessageAuthorType(r), v = !!s && c !== "user" && (!o || s > o);
|
|
3626
3675
|
return { ...a, _preview: this.convPreview(a, r), _unread: v };
|
|
3627
3676
|
});
|
|
3628
3677
|
},
|
|
@@ -3766,8 +3815,8 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3766
3815
|
const t = this.currentConv;
|
|
3767
3816
|
if (!t) return [];
|
|
3768
3817
|
const e = (r) => {
|
|
3769
|
-
var s, o;
|
|
3770
|
-
return (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.type) === "system" || Array.isArray((o = r == null ? void 0 : r.payload) == null ? void 0 : o.attachments) && r.payload.attachments.length ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
3818
|
+
var s, o, c, v;
|
|
3819
|
+
return (r == null ? void 0 : r.type) === "action" || (r == null ? void 0 : r.type) === "system" || ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.type) === "system" || Array.isArray((o = r == null ? void 0 : r.payload) == null ? void 0 : o.attachments) && r.payload.attachments.length || (c = r == null ? void 0 : r.metadata) != null && c.artifact || (v = r == null ? void 0 : r.metadata) != null && v.form ? !0 : typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0;
|
|
3771
3820
|
}, n = (r) => {
|
|
3772
3821
|
var s;
|
|
3773
3822
|
return (r == null ? void 0 : r.type) === "action" && ((s = r == null ? void 0 : r.payload) == null ? void 0 : s.state) === "pending";
|
|
@@ -3813,11 +3862,11 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3813
3862
|
return ((e = (t = this.pendingApproval) == null ? void 0 : t.payload) == null ? void 0 : e.name) || ((n = this.pendingApproval) == null ? void 0 : n.text_md) || "Confirmer l'action";
|
|
3814
3863
|
},
|
|
3815
3864
|
approvalDetail() {
|
|
3816
|
-
var a, r, s, o,
|
|
3865
|
+
var a, r, s, o, c, v;
|
|
3817
3866
|
const t = (s = (r = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : r.pending) == null ? void 0 : s.user_explanation;
|
|
3818
3867
|
if (typeof t == "string" && t.trim())
|
|
3819
3868
|
return t.trim();
|
|
3820
|
-
const e = (v = (
|
|
3869
|
+
const e = (v = (c = (o = this.pendingApproval) == null ? void 0 : o.payload) == null ? void 0 : c.pending) == null ? void 0 : v.prepared_params;
|
|
3821
3870
|
if (!e || typeof e != "object") return "";
|
|
3822
3871
|
const n = Object.entries(e);
|
|
3823
3872
|
return n.length ? n.slice(0, 2).map(([C, w]) => `${C}: ${w}`).join(" · ") : "";
|
|
@@ -3856,10 +3905,10 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3856
3905
|
const t = this.currentConv;
|
|
3857
3906
|
let e = /* @__PURE__ */ new Date();
|
|
3858
3907
|
if (t) {
|
|
3859
|
-
const o = ((r = (((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[t.id]) || []).find((
|
|
3908
|
+
const o = ((r = (((a = (n = this.s) == null ? void 0 : n.messagesByConv) == null ? void 0 : a[t.id]) || []).find((c) => c == null ? void 0 : c.created_at)) == null ? void 0 : r.created_at) || t.created_at;
|
|
3860
3909
|
if (o) {
|
|
3861
|
-
const
|
|
3862
|
-
Number.isNaN(
|
|
3910
|
+
const c = new Date(o);
|
|
3911
|
+
Number.isNaN(c.getTime()) || (e = c);
|
|
3863
3912
|
}
|
|
3864
3913
|
}
|
|
3865
3914
|
return `Aujourd'hui · ${be(e)}`;
|
|
@@ -3972,8 +4021,8 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3972
4021
|
n[r.id] = e;
|
|
3973
4022
|
continue;
|
|
3974
4023
|
}
|
|
3975
|
-
const o = typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0,
|
|
3976
|
-
if (!o && !
|
|
4024
|
+
const o = typeof (r == null ? void 0 : r.text_md) == "string" && r.text_md.trim().length > 0, c = Array.isArray((a = r == null ? void 0 : r.payload) == null ? void 0 : a.attachments) && r.payload.attachments.length > 0;
|
|
4025
|
+
if (!o && !c) {
|
|
3977
4026
|
n[r.id] = e;
|
|
3978
4027
|
continue;
|
|
3979
4028
|
}
|
|
@@ -3992,7 +4041,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
3992
4041
|
hasUserHash: !!this.userHash
|
|
3993
4042
|
}), typeof document < "u" && !document.getElementById(ge)) {
|
|
3994
4043
|
const t = document.createElement("style");
|
|
3995
|
-
t.id = ge, t.textContent =
|
|
4044
|
+
t.id = ge, t.textContent = Ne, document.head.appendChild(t);
|
|
3996
4045
|
}
|
|
3997
4046
|
this.hydrateReadState(), await this.boot(), this.isEmbedded && this.store && await this.open();
|
|
3998
4047
|
},
|
|
@@ -4058,9 +4107,9 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4058
4107
|
for (let s = e.length - 1; s >= 0; s--) {
|
|
4059
4108
|
const o = e[s];
|
|
4060
4109
|
if (!o) continue;
|
|
4061
|
-
const
|
|
4062
|
-
if (
|
|
4063
|
-
return (((n = o.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") +
|
|
4110
|
+
const c = typeof o.text_md == "string" ? o.text_md.trim() : "";
|
|
4111
|
+
if (c)
|
|
4112
|
+
return (((n = o.author) == null ? void 0 : n.type) === "user" ? "Vous : " : "") + c.replace(/\s+/g, " ");
|
|
4064
4113
|
const v = (a = o.payload) == null ? void 0 : a.attachments;
|
|
4065
4114
|
if (Array.isArray(v) && v.length) return "📎 Pièce jointe";
|
|
4066
4115
|
}
|
|
@@ -4143,19 +4192,19 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4143
4192
|
// bounded by MIN/MAX_BETWEEN_MS.
|
|
4144
4193
|
scheduleReveal(t) {
|
|
4145
4194
|
const e = Date.now(), n = ((t == null ? void 0 : t.text_md) || "").length, a = Math.min(
|
|
4146
|
-
|
|
4147
|
-
Math.max(
|
|
4195
|
+
Ai,
|
|
4196
|
+
Math.max(Ci, n * ki)
|
|
4148
4197
|
), s = Math.max(
|
|
4149
|
-
e +
|
|
4150
|
-
this.nextRevealAt +
|
|
4198
|
+
e + bi,
|
|
4199
|
+
this.nextRevealAt + Si
|
|
4151
4200
|
) + a;
|
|
4152
4201
|
this.nextRevealAt = s;
|
|
4153
|
-
const o = Math.max(0, s - e),
|
|
4154
|
-
this.revealedAt = { ...this.revealedAt, [
|
|
4202
|
+
const o = Math.max(0, s - e), c = t.id, v = setTimeout(() => {
|
|
4203
|
+
this.revealedAt = { ...this.revealedAt, [c]: Date.now() }, this.revealTimers = this.revealTimers.filter((w) => w !== v);
|
|
4155
4204
|
}, o);
|
|
4156
4205
|
this.revealTimers.push(v);
|
|
4157
4206
|
const C = setTimeout(() => {
|
|
4158
|
-
this.revealedAt[
|
|
4207
|
+
this.revealedAt[c] > 0 || (this.revealedAt = { ...this.revealedAt, [c]: Date.now() }), this.revealTimers = this.revealTimers.filter((w) => w !== C);
|
|
4159
4208
|
}, o + 4e3);
|
|
4160
4209
|
this.revealTimers.push(C);
|
|
4161
4210
|
},
|
|
@@ -4174,12 +4223,12 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4174
4223
|
baseUrl: this.baseUrl,
|
|
4175
4224
|
widgetId: this.widgetId,
|
|
4176
4225
|
userId: this.userId
|
|
4177
|
-
}), this.transport = fe(
|
|
4226
|
+
}), this.transport = fe($e({
|
|
4178
4227
|
baseUrl: this.baseUrl,
|
|
4179
4228
|
widgetId: this.widgetId,
|
|
4180
4229
|
userId: this.userId,
|
|
4181
4230
|
userHash: this.userHash
|
|
4182
|
-
})), this.store = fe(
|
|
4231
|
+
})), this.store = fe(De(this.transport)), await this.store.start(), this.customer && typeof this.customer == "object" && await this.store.applyCustomer(this.customer), console.log("[ww-messenger] boot done", {
|
|
4183
4232
|
ready: this.store.state.ready,
|
|
4184
4233
|
error: this.store.state.error
|
|
4185
4234
|
});
|
|
@@ -4310,7 +4359,7 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4310
4359
|
!t || !this.store || !(!(typeof window < "u" && typeof window.confirm == "function") || window.confirm("Effacer ce fil de votre côté ? Cette action ne supprime pas les messages côté agent.")) || ((n = this.s) != null && n.messagesByConv && (this.s.messagesByConv[t.id] = []), this.activeConvId = null, this.showOnboarding = !0);
|
|
4311
4360
|
},
|
|
4312
4361
|
exportCurrentConv() {
|
|
4313
|
-
var r, s, o,
|
|
4362
|
+
var r, s, o, c, v, C;
|
|
4314
4363
|
const t = this.currentConv;
|
|
4315
4364
|
if (!t) return;
|
|
4316
4365
|
const e = (((s = (r = this.s) == null ? void 0 : r.messagesByConv) == null ? void 0 : s[t.id]) || []).slice(), n = [
|
|
@@ -4320,8 +4369,8 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4320
4369
|
];
|
|
4321
4370
|
for (const w of e) {
|
|
4322
4371
|
if (!w) continue;
|
|
4323
|
-
const S = ((o = w.author) == null ? void 0 : o.name) || (((
|
|
4324
|
-
A && (n.push(`[${
|
|
4372
|
+
const S = ((o = w.author) == null ? void 0 : o.name) || (((c = w.author) == null ? void 0 : c.type) === "user" ? "Vous" : ((v = w.author) == null ? void 0 : v.type) === "agent_human" ? "Agent" : ((C = w.author) == null ? void 0 : C.type) === "agent_ia" ? "Assistant IA" : "Système"), R = w.created_at ? new Date(w.created_at).toLocaleString("fr-FR") : "", A = (w.text_md || "").trim();
|
|
4373
|
+
A && (n.push(`[${R}] ${S} :`), n.push(A), n.push(""));
|
|
4325
4374
|
}
|
|
4326
4375
|
const a = new Blob([n.join(`
|
|
4327
4376
|
`)], { type: "text/plain;charset=utf-8" });
|
|
@@ -4355,12 +4404,12 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4355
4404
|
async onFormSubmit({ values: t }) {
|
|
4356
4405
|
const e = this.pendingForm;
|
|
4357
4406
|
if (!(e != null && e.form)) return;
|
|
4358
|
-
const n =
|
|
4407
|
+
const n = yi(e.form, t);
|
|
4359
4408
|
if (!n) return;
|
|
4360
4409
|
const a = this.currentConv;
|
|
4361
4410
|
a && await this.store.send(a.id, n, {
|
|
4362
4411
|
metadata: {
|
|
4363
|
-
artifact:
|
|
4412
|
+
artifact: wi(e.form, t)
|
|
4364
4413
|
}
|
|
4365
4414
|
});
|
|
4366
4415
|
},
|
|
@@ -4404,30 +4453,30 @@ const Ci = 450, Ai = 50, Si = 900, xi = 12e3, Mi = 300, Ti = {
|
|
|
4404
4453
|
}
|
|
4405
4454
|
}
|
|
4406
4455
|
}
|
|
4407
|
-
},
|
|
4456
|
+
}, Mi = {
|
|
4408
4457
|
key: 0,
|
|
4409
4458
|
class: "wm-loading",
|
|
4410
4459
|
"aria-busy": "true",
|
|
4411
4460
|
"aria-live": "polite"
|
|
4412
|
-
},
|
|
4461
|
+
}, Ti = {
|
|
4413
4462
|
key: 0,
|
|
4414
4463
|
class: "wm-state"
|
|
4415
|
-
},
|
|
4464
|
+
}, Ii = { class: "wm-state__err" }, Oi = { class: "wm-state__errSub" }, Ei = { class: "wm-bottom" }, Bi = {
|
|
4416
4465
|
key: 0,
|
|
4417
4466
|
ref: "floatEl",
|
|
4418
4467
|
class: "wm-float"
|
|
4419
|
-
},
|
|
4468
|
+
}, Li = {
|
|
4420
4469
|
key: 1,
|
|
4421
4470
|
class: "wm-actionWait",
|
|
4422
4471
|
role: "status",
|
|
4423
4472
|
"aria-live": "polite"
|
|
4424
|
-
},
|
|
4473
|
+
}, Ri = { class: "wm-actionWait__lbl" }, $i = {
|
|
4425
4474
|
key: 1,
|
|
4426
4475
|
class: "wm-attached"
|
|
4427
|
-
},
|
|
4428
|
-
function
|
|
4429
|
-
const o =
|
|
4430
|
-
return l(),
|
|
4476
|
+
}, Fi = ["onClick"];
|
|
4477
|
+
function ji(t, e, n, a, r, s) {
|
|
4478
|
+
const o = O("Launcher"), c = O("Header"), v = O("Onboarding"), C = O("MessageList"), w = O("ApprovalCard"), S = O("FormCard"), R = O("Feedback"), A = O("SuggestionChips"), D = O("Composer"), x = O("MoreMenu"), N = O("HistoryDrawer");
|
|
4479
|
+
return l(), d("div", {
|
|
4431
4480
|
class: E(["wm-root", `wm-root--${n.displayMode}`])
|
|
4432
4481
|
}, [
|
|
4433
4482
|
!r.isOpen && !s.isEmbedded ? (l(), $(o, {
|
|
@@ -4435,22 +4484,22 @@ function Di(t, e, n, a, r, s) {
|
|
|
4435
4484
|
"unread-count": s.unreadCount,
|
|
4436
4485
|
peek: s.launcherPeek,
|
|
4437
4486
|
onOpen: s.openFromPeek,
|
|
4438
|
-
onDismiss: e[0] || (e[0] = (
|
|
4487
|
+
onDismiss: e[0] || (e[0] = (F) => r.labelDismissed = !0)
|
|
4439
4488
|
}, null, 8, ["unread-count", "peek", "onOpen"])) : y("", !0),
|
|
4440
|
-
r.isOpen || s.isEmbedded ? (l(),
|
|
4489
|
+
r.isOpen || s.isEmbedded ? (l(), d("section", {
|
|
4441
4490
|
key: 1,
|
|
4442
4491
|
class: E(["wm-panel", `wm-panel--${n.displayMode}`]),
|
|
4443
4492
|
style: V(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
4444
4493
|
role: "dialog",
|
|
4445
4494
|
"aria-label": "Messenger"
|
|
4446
4495
|
}, [
|
|
4447
|
-
!s.ready && !s.error ? (l(),
|
|
4448
|
-
s.isEmbedded ? y("", !0) : (l(),
|
|
4496
|
+
!s.ready && !s.error ? (l(), d("div", Mi, [
|
|
4497
|
+
s.isEmbedded ? y("", !0) : (l(), d("button", {
|
|
4449
4498
|
key: 0,
|
|
4450
4499
|
type: "button",
|
|
4451
4500
|
class: "wm-loading__close",
|
|
4452
4501
|
"aria-label": "Réduire",
|
|
4453
|
-
onClick: e[1] || (e[1] = (...
|
|
4502
|
+
onClick: e[1] || (e[1] = (...F) => s.close && s.close(...F))
|
|
4454
4503
|
}, [...e[6] || (e[6] = [
|
|
4455
4504
|
i("svg", {
|
|
4456
4505
|
width: "13",
|
|
@@ -4470,8 +4519,8 @@ function Di(t, e, n, a, r, s) {
|
|
|
4470
4519
|
class: "wm-loading__spinner",
|
|
4471
4520
|
"aria-hidden": "true"
|
|
4472
4521
|
}, null, -1))
|
|
4473
|
-
])) : (l(),
|
|
4474
|
-
|
|
4522
|
+
])) : (l(), d(M, { key: 1 }, [
|
|
4523
|
+
z(c, {
|
|
4475
4524
|
title: s.headerTitle,
|
|
4476
4525
|
escalated: s.isEscalated,
|
|
4477
4526
|
"agent-name": s.humanAgentName,
|
|
@@ -4486,8 +4535,8 @@ function Di(t, e, n, a, r, s) {
|
|
|
4486
4535
|
onMore: s.toggleMore,
|
|
4487
4536
|
onClose: s.close
|
|
4488
4537
|
}, null, 8, ["title", "escalated", "agent-name", "agent-avatar-url", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
|
|
4489
|
-
s.error ? (l(),
|
|
4490
|
-
i("div",
|
|
4538
|
+
s.error ? (l(), d("div", Ti, [
|
|
4539
|
+
i("div", Ii, [
|
|
4491
4540
|
e[9] || (e[9] = i("div", { class: "wm-state__errIcon" }, [
|
|
4492
4541
|
i("svg", {
|
|
4493
4542
|
width: "14",
|
|
@@ -4505,11 +4554,11 @@ function Di(t, e, n, a, r, s) {
|
|
|
4505
4554
|
], -1)),
|
|
4506
4555
|
i("div", null, [
|
|
4507
4556
|
e[8] || (e[8] = i("div", { class: "wm-state__errTitle" }, "Connexion impossible", -1)),
|
|
4508
|
-
i("div",
|
|
4557
|
+
i("div", Oi, b(s.error), 1)
|
|
4509
4558
|
])
|
|
4510
4559
|
])
|
|
4511
|
-
])) : s.currentConv ? (l(),
|
|
4512
|
-
|
|
4560
|
+
])) : s.currentConv ? (l(), d(M, { key: 2 }, [
|
|
4561
|
+
z(C, {
|
|
4513
4562
|
ref: "messageList",
|
|
4514
4563
|
messages: s.displayedMessages,
|
|
4515
4564
|
"streaming-active": s.streamingActive,
|
|
@@ -4520,8 +4569,8 @@ function Di(t, e, n, a, r, s) {
|
|
|
4520
4569
|
"unread-anchor-ts": r.unreadAnchorTs,
|
|
4521
4570
|
onLoadMore: s.onLoadMore
|
|
4522
4571
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-ts", "onLoadMore"]),
|
|
4523
|
-
i("div",
|
|
4524
|
-
s.floatVisible ? (l(),
|
|
4572
|
+
i("div", Ei, [
|
|
4573
|
+
s.floatVisible ? (l(), d("div", Bi, [
|
|
4525
4574
|
s.approvalReady ? (l(), $(w, {
|
|
4526
4575
|
key: 0,
|
|
4527
4576
|
action: s.approvalTitle,
|
|
@@ -4532,7 +4581,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4532
4581
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
4533
4582
|
form: s.pendingForm.form,
|
|
4534
4583
|
onSubmit: s.onFormSubmit
|
|
4535
|
-
}, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), $(
|
|
4584
|
+
}, null, 8, ["form", "onSubmit"])) : s.showFeedback ? (l(), $(R, {
|
|
4536
4585
|
key: 2,
|
|
4537
4586
|
busy: r.feedbackBusy,
|
|
4538
4587
|
done: r.feedbackDone,
|
|
@@ -4543,17 +4592,17 @@ function Di(t, e, n, a, r, s) {
|
|
|
4543
4592
|
onSelect: s.onSuggestion
|
|
4544
4593
|
}, null, 8, ["items", "onSelect"]))
|
|
4545
4594
|
], 512)) : y("", !0),
|
|
4546
|
-
s.actionInFlight ? (l(),
|
|
4595
|
+
s.actionInFlight ? (l(), d("div", Li, [
|
|
4547
4596
|
e[10] || (e[10] = i("span", {
|
|
4548
4597
|
class: "wm-actionWait__spinner",
|
|
4549
4598
|
"aria-hidden": "true"
|
|
4550
4599
|
}, null, -1)),
|
|
4551
|
-
i("span",
|
|
4600
|
+
i("span", Ri, b(s.actionInFlightName) + " en cours, veuillez patienter…", 1)
|
|
4552
4601
|
])) : (l(), $(D, {
|
|
4553
4602
|
key: 2,
|
|
4554
4603
|
ref: "composer",
|
|
4555
4604
|
modelValue: r.draft,
|
|
4556
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
4605
|
+
"onUpdate:modelValue": e[2] || (e[2] = (F) => r.draft = F),
|
|
4557
4606
|
placeholder: s.composerPlaceholder,
|
|
4558
4607
|
disabled: !!s.pendingApproval,
|
|
4559
4608
|
"attach-label": "Joindre un fichier",
|
|
@@ -4569,13 +4618,13 @@ function Di(t, e, n, a, r, s) {
|
|
|
4569
4618
|
"notif-enabled": r.notifEnabled,
|
|
4570
4619
|
"status-url": s.statusUrl,
|
|
4571
4620
|
"help-url": s.helpUrl,
|
|
4572
|
-
onClose: e[3] || (e[3] = (
|
|
4621
|
+
onClose: e[3] || (e[3] = (F) => r.moreOpen = !1),
|
|
4573
4622
|
onNotifToggle: s.onNotifToggle,
|
|
4574
4623
|
onAction: s.onMoreAction
|
|
4575
4624
|
}, null, 8, ["can-rename", "can-clear", "can-export", "notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0),
|
|
4576
|
-
r.pendingAttachments.length ? (l(),
|
|
4577
|
-
(l(!0),
|
|
4578
|
-
key:
|
|
4625
|
+
r.pendingAttachments.length ? (l(), d("div", $i, [
|
|
4626
|
+
(l(!0), d(M, null, j(r.pendingAttachments, (F, P) => (l(), d("div", {
|
|
4627
|
+
key: P,
|
|
4579
4628
|
class: "wm-attached__chip"
|
|
4580
4629
|
}, [
|
|
4581
4630
|
e[12] || (e[12] = i("svg", {
|
|
@@ -4591,11 +4640,11 @@ function Di(t, e, n, a, r, s) {
|
|
|
4591
4640
|
}, [
|
|
4592
4641
|
i("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" })
|
|
4593
4642
|
], -1)),
|
|
4594
|
-
i("span", null, b(
|
|
4643
|
+
i("span", null, b(F.name), 1),
|
|
4595
4644
|
i("button", {
|
|
4596
4645
|
type: "button",
|
|
4597
4646
|
"aria-label": "Retirer",
|
|
4598
|
-
onClick: (
|
|
4647
|
+
onClick: (q) => r.pendingAttachments.splice(P, 1)
|
|
4599
4648
|
}, [...e[11] || (e[11] = [
|
|
4600
4649
|
i("svg", {
|
|
4601
4650
|
width: "10",
|
|
@@ -4610,7 +4659,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4610
4659
|
}, [
|
|
4611
4660
|
i("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4612
4661
|
], -1)
|
|
4613
|
-
])], 8,
|
|
4662
|
+
])], 8, Fi)
|
|
4614
4663
|
]))), 128))
|
|
4615
4664
|
])) : y("", !0)
|
|
4616
4665
|
], 64)) : (l(), $(v, {
|
|
@@ -4628,7 +4677,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4628
4677
|
key: 3,
|
|
4629
4678
|
conversations: s.drawerConversations,
|
|
4630
4679
|
"active-id": s.currentConv ? s.currentConv.id : null,
|
|
4631
|
-
onClose: e[4] || (e[4] = (
|
|
4680
|
+
onClose: e[4] || (e[4] = (F) => r.historyOpen = !1),
|
|
4632
4681
|
onNew: s.onDrawerNew,
|
|
4633
4682
|
onPick: s.onDrawerPick
|
|
4634
4683
|
}, null, 8, ["conversations", "active-id", "onNew", "onPick"])) : y("", !0),
|
|
@@ -4640,7 +4689,7 @@ function Di(t, e, n, a, r, s) {
|
|
|
4640
4689
|
"notif-enabled": r.notifEnabled,
|
|
4641
4690
|
"status-url": s.statusUrl,
|
|
4642
4691
|
"help-url": s.helpUrl,
|
|
4643
|
-
onClose: e[5] || (e[5] = (
|
|
4692
|
+
onClose: e[5] || (e[5] = (F) => r.moreOpen = !1),
|
|
4644
4693
|
onNotifToggle: s.onNotifToggle,
|
|
4645
4694
|
onAction: s.onMoreAction
|
|
4646
4695
|
}, null, 8, ["notif-enabled", "status-url", "help-url", "onNotifToggle", "onAction"])) : y("", !0)
|
|
@@ -4648,49 +4697,49 @@ function Di(t, e, n, a, r, s) {
|
|
|
4648
4697
|
], 6)) : y("", !0)
|
|
4649
4698
|
], 2);
|
|
4650
4699
|
}
|
|
4651
|
-
const
|
|
4700
|
+
const Ni = /* @__PURE__ */ B(xi, [["render", ji], ["__scopeId", "data-v-8264e504"]]), Pi = "0.2.6";
|
|
4652
4701
|
export {
|
|
4653
|
-
|
|
4702
|
+
Q as AIAvatar,
|
|
4654
4703
|
le as AVATAR_COLORS,
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4704
|
+
Xt as ActionResult,
|
|
4705
|
+
ar as ApprovalCard,
|
|
4706
|
+
an as ArtifactFormResponse,
|
|
4707
|
+
yn as ArtifactInfoCard,
|
|
4708
|
+
jn as ArtifactRenderer,
|
|
4709
|
+
Ln as ArtifactTicket,
|
|
4710
|
+
Yn as AttachmentPreview,
|
|
4711
|
+
ns as Bubble,
|
|
4712
|
+
Ws as Composer,
|
|
4713
|
+
Pe as DEFAULT_BASE_URL,
|
|
4714
|
+
zr as Feedback,
|
|
4715
|
+
Lr as FormCard,
|
|
4716
|
+
yt as Header,
|
|
4717
|
+
di as HistoryDrawer,
|
|
4669
4718
|
ke as HumanAvatar,
|
|
4670
|
-
|
|
4719
|
+
Ge as Launcher,
|
|
4671
4720
|
he as MEDIA_RECORDER_SUPPORTED,
|
|
4672
|
-
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4721
|
+
xs as MessageList,
|
|
4722
|
+
Ni as Messenger,
|
|
4723
|
+
gi as MoreMenu,
|
|
4724
|
+
Pt as Onboarding,
|
|
4725
|
+
ne as SCREEN_CAPTURE_SUPPORTED,
|
|
4726
|
+
Js as SuggestionChips,
|
|
4727
|
+
ot as TeamAvatars,
|
|
4728
|
+
as as Typing,
|
|
4729
|
+
Pi as VERSION,
|
|
4681
4730
|
ye as avatarColor,
|
|
4682
4731
|
we as avatarInitials,
|
|
4683
|
-
|
|
4732
|
+
Ts as captureScreenshotFile,
|
|
4684
4733
|
U as colors,
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4734
|
+
De as createStore,
|
|
4735
|
+
$e as createTransport,
|
|
4736
|
+
Ni as default,
|
|
4688
4737
|
be as formatTime,
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4738
|
+
Di as guessAttachmentKind,
|
|
4739
|
+
Ms as pickRecorderMime,
|
|
4740
|
+
Qn as renderMarkdown,
|
|
4741
|
+
Os as startScreenRecording,
|
|
4742
|
+
Ne as tokensCss,
|
|
4743
|
+
Ue as uuid,
|
|
4744
|
+
Ue as v4
|
|
4696
4745
|
};
|