@_solaris/messenger-widget 0.5.15 → 0.5.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/iframe/iframe.css +1 -1
- package/dist/iframe/iframe.js +7 -7
- package/dist/messenger.cjs +18 -18
- package/dist/messenger.js +289 -268
- package/dist/snippet.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/messenger.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as
|
|
1
|
+
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as q, normalizeClass as O, toDisplayString as v, resolveComponent as E, createVNode as V, Transition as Ue, withCtx as Pe, Fragment as R, renderList as j, withKeys as ue, withModifiers as Y, createElementVNode as o, createCommentVNode as w, createBlock as U, withDirectives as K, vModelText as X, createTextVNode as pe, resolveDynamicComponent as je, renderSlot as De, vModelCheckbox as ze, vModelSelect as He, markRaw as ke } from "vue";
|
|
2
2
|
const qe = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -88,7 +88,10 @@ function We(e) {
|
|
|
88
88
|
headers: s(),
|
|
89
89
|
body: JSON.stringify({
|
|
90
90
|
origin: t.origin,
|
|
91
|
-
...t.token ? { token: t.token } : {}
|
|
91
|
+
...t.token ? { token: t.token } : {},
|
|
92
|
+
// Déclaration de mode du marchand (validée serveur contre
|
|
93
|
+
// widgets.allow_unauthenticated). Le serveur 400 si mismatch.
|
|
94
|
+
allowUnauthenticated: d.allowUnauthenticated === !0
|
|
92
95
|
})
|
|
93
96
|
}
|
|
94
97
|
);
|
|
@@ -131,7 +134,7 @@ function We(e) {
|
|
|
131
134
|
console.error("[transport] initial /conversations failed", d);
|
|
132
135
|
}
|
|
133
136
|
}
|
|
134
|
-
async function
|
|
137
|
+
async function b() {
|
|
135
138
|
const d = await a("GET", "/customers/me");
|
|
136
139
|
return (d == null ? void 0 : d.customer) ?? null;
|
|
137
140
|
}
|
|
@@ -159,14 +162,14 @@ function We(e) {
|
|
|
159
162
|
f
|
|
160
163
|
)).conversation;
|
|
161
164
|
}
|
|
162
|
-
async function
|
|
165
|
+
async function F(d, f) {
|
|
163
166
|
return a(
|
|
164
167
|
"PATCH",
|
|
165
168
|
`/conversations/${encodeURIComponent(d)}/read`,
|
|
166
169
|
{ message_id: f }
|
|
167
170
|
);
|
|
168
171
|
}
|
|
169
|
-
async function
|
|
172
|
+
async function N(d, f = {}) {
|
|
170
173
|
const _ = new URLSearchParams();
|
|
171
174
|
f.before && _.set("before", f.before), f.since && _.set("since", f.since), f.limit && _.set("limit", String(f.limit));
|
|
172
175
|
const y = _.toString() ? `?${_.toString()}` : "";
|
|
@@ -175,7 +178,7 @@ function We(e) {
|
|
|
175
178
|
`/conversations/${encodeURIComponent(d)}/messages${y}`
|
|
176
179
|
);
|
|
177
180
|
}
|
|
178
|
-
async function
|
|
181
|
+
async function P(d, f) {
|
|
179
182
|
se();
|
|
180
183
|
const _ = {
|
|
181
184
|
client_msg_id: f.client_msg_id,
|
|
@@ -301,15 +304,15 @@ function We(e) {
|
|
|
301
304
|
stop: g,
|
|
302
305
|
setPanelOpen: ce,
|
|
303
306
|
// REST
|
|
304
|
-
getCustomer:
|
|
307
|
+
getCustomer: b,
|
|
305
308
|
patchCustomer: T,
|
|
306
309
|
listConversations: I,
|
|
307
310
|
createConversation: A,
|
|
308
311
|
getConversation: z,
|
|
309
312
|
patchConversation: M,
|
|
310
|
-
markConversationRead:
|
|
311
|
-
listMessages:
|
|
312
|
-
postMessage:
|
|
313
|
+
markConversationRead: F,
|
|
314
|
+
listMessages: N,
|
|
315
|
+
postMessage: P,
|
|
313
316
|
postCallback: W,
|
|
314
317
|
uploadAttachment: Z,
|
|
315
318
|
signAttachment: ee,
|
|
@@ -459,7 +462,7 @@ function Qe(e) {
|
|
|
459
462
|
async function p(h) {
|
|
460
463
|
const m = t.paginationByConv[h];
|
|
461
464
|
if (!(m != null && m.loaded || m != null && m.loading)) {
|
|
462
|
-
|
|
465
|
+
b(h, { nextCursor: null, loading: !0, loaded: !1 });
|
|
463
466
|
try {
|
|
464
467
|
const g = await e.listMessages(h, {
|
|
465
468
|
limit: l
|
|
@@ -469,13 +472,13 @@ function Qe(e) {
|
|
|
469
472
|
const y = f.filter((C) => !((C == null ? void 0 : C.id) != null && _.has(`id:${String(C.id)}`) || C != null && C.client_msg_id && _.has(`c:${C.client_msg_id}`)));
|
|
470
473
|
t.messagesByConv[h] = [...d, ...y].sort(
|
|
471
474
|
ce
|
|
472
|
-
),
|
|
475
|
+
), b(h, {
|
|
473
476
|
nextCursor: (g == null ? void 0 : g.next_cursor) ?? null,
|
|
474
477
|
loading: !1,
|
|
475
478
|
loaded: !0
|
|
476
479
|
});
|
|
477
480
|
} catch (g) {
|
|
478
|
-
console.error("[store] openConversation failed", g),
|
|
481
|
+
console.error("[store] openConversation failed", g), b(h, {
|
|
479
482
|
nextCursor: null,
|
|
480
483
|
loading: !1,
|
|
481
484
|
loaded: !1
|
|
@@ -489,7 +492,7 @@ function Qe(e) {
|
|
|
489
492
|
if (!m || m.loading || !m.nextCursor) return;
|
|
490
493
|
const d = (f = (t.messagesByConv[h] || []).find((_) => _ == null ? void 0 : _.created_at)) == null ? void 0 : f.created_at;
|
|
491
494
|
if (d) {
|
|
492
|
-
|
|
495
|
+
b(h, { ...m, loading: !0 });
|
|
493
496
|
try {
|
|
494
497
|
const _ = await e.listMessages(h, {
|
|
495
498
|
before: d,
|
|
@@ -498,17 +501,17 @@ function Qe(e) {
|
|
|
498
501
|
for (const x of C)
|
|
499
502
|
(x == null ? void 0 : x.id) != null && S.add(`id:${String(x.id)}`), x != null && x.client_msg_id && S.add(`c:${x.client_msg_id}`);
|
|
500
503
|
const L = y.filter((x) => !((x == null ? void 0 : x.id) != null && S.has(`id:${String(x.id)}`) || x != null && x.client_msg_id && S.has(`c:${x.client_msg_id}`)));
|
|
501
|
-
t.messagesByConv[h] = [...L, ...C],
|
|
504
|
+
t.messagesByConv[h] = [...L, ...C], b(h, {
|
|
502
505
|
nextCursor: (_ == null ? void 0 : _.next_cursor) ?? null,
|
|
503
506
|
loading: !1,
|
|
504
507
|
loaded: !0
|
|
505
508
|
});
|
|
506
509
|
} catch (_) {
|
|
507
|
-
console.error("[store] loadMore failed", _),
|
|
510
|
+
console.error("[store] loadMore failed", _), b(h, { ...m, loading: !1 });
|
|
508
511
|
}
|
|
509
512
|
}
|
|
510
513
|
}
|
|
511
|
-
function
|
|
514
|
+
function b(h, m) {
|
|
512
515
|
t.paginationByConv = { ...t.paginationByConv, [h]: m };
|
|
513
516
|
}
|
|
514
517
|
async function T(h, m) {
|
|
@@ -596,10 +599,10 @@ function Qe(e) {
|
|
|
596
599
|
console.error("[store] callback failed", d), h != null && delete t.awaitingCallback[h];
|
|
597
600
|
}
|
|
598
601
|
}
|
|
599
|
-
const
|
|
600
|
-
async function
|
|
602
|
+
const F = /* @__PURE__ */ new Map();
|
|
603
|
+
async function N(h) {
|
|
601
604
|
if (!h) return null;
|
|
602
|
-
const m =
|
|
605
|
+
const m = F.get(h);
|
|
603
606
|
if (m != null && m.url) {
|
|
604
607
|
const g = m.expires_at ? Date.parse(m.expires_at) : 0;
|
|
605
608
|
if (!g || g - Date.now() > 6e4) return m.url;
|
|
@@ -607,7 +610,7 @@ function Qe(e) {
|
|
|
607
610
|
try {
|
|
608
611
|
const g = await e.signAttachment(h);
|
|
609
612
|
if (g != null && g.signed_url)
|
|
610
|
-
return
|
|
613
|
+
return F.set(h, {
|
|
611
614
|
url: g.signed_url,
|
|
612
615
|
expires_at: g.expires_at
|
|
613
616
|
}), g.signed_url;
|
|
@@ -616,7 +619,7 @@ function Qe(e) {
|
|
|
616
619
|
}
|
|
617
620
|
return null;
|
|
618
621
|
}
|
|
619
|
-
async function
|
|
622
|
+
async function P(h, { rating: m, comment: g } = {}) {
|
|
620
623
|
const d = t.conversations.find((y) => y.id === h), _ = {
|
|
621
624
|
...(d == null ? void 0 : d.metadata) || {},
|
|
622
625
|
feedback: {
|
|
@@ -752,8 +755,8 @@ function Qe(e) {
|
|
|
752
755
|
markConversationRead: A,
|
|
753
756
|
send: z,
|
|
754
757
|
clickCallback: M,
|
|
755
|
-
signAttachment:
|
|
756
|
-
submitFeedback:
|
|
758
|
+
signAttachment: N,
|
|
759
|
+
submitFeedback: P,
|
|
757
760
|
getPendingApproval: W,
|
|
758
761
|
getActionInFlight: ee,
|
|
759
762
|
getLatestSuggestions: te,
|
|
@@ -762,7 +765,7 @@ function Qe(e) {
|
|
|
762
765
|
setPanelOpen: e.setPanelOpen
|
|
763
766
|
};
|
|
764
767
|
}
|
|
765
|
-
const
|
|
768
|
+
const H = {
|
|
766
769
|
w: "#ffffff",
|
|
767
770
|
g50: "#F9F9F7",
|
|
768
771
|
g100: "#F2F1EE",
|
|
@@ -801,21 +804,21 @@ const Xe = `
|
|
|
801
804
|
.wm-root {
|
|
802
805
|
--wm-f: 'Geist', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
803
806
|
--wm-fm: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
804
|
-
--wm-w: ${
|
|
805
|
-
--wm-g50: ${
|
|
806
|
-
--wm-g100: ${
|
|
807
|
-
--wm-g150: ${
|
|
808
|
-
--wm-g200: ${
|
|
809
|
-
--wm-g300: ${
|
|
810
|
-
--wm-g400: ${
|
|
811
|
-
--wm-g500: ${
|
|
812
|
-
--wm-g700: ${
|
|
813
|
-
--wm-g900: ${
|
|
814
|
-
--wm-a: ${
|
|
815
|
-
--wm-al: ${
|
|
816
|
-
--wm-green: ${
|
|
817
|
-
--wm-red: ${
|
|
818
|
-
--wm-redBg: ${
|
|
807
|
+
--wm-w: ${H.w};
|
|
808
|
+
--wm-g50: ${H.g50};
|
|
809
|
+
--wm-g100: ${H.g100};
|
|
810
|
+
--wm-g150: ${H.g150};
|
|
811
|
+
--wm-g200: ${H.g200};
|
|
812
|
+
--wm-g300: ${H.g300};
|
|
813
|
+
--wm-g400: ${H.g400};
|
|
814
|
+
--wm-g500: ${H.g500};
|
|
815
|
+
--wm-g700: ${H.g700};
|
|
816
|
+
--wm-g900: ${H.g900};
|
|
817
|
+
--wm-a: ${H.accent};
|
|
818
|
+
--wm-al: ${H.accentLight};
|
|
819
|
+
--wm-green: ${H.green};
|
|
820
|
+
--wm-red: ${H.red};
|
|
821
|
+
--wm-redBg: ${H.redBg};
|
|
819
822
|
--wm-sh1: 0 1px 3px rgba(0,0,0,.06);
|
|
820
823
|
--wm-sh2: 0 4px 24px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
|
|
821
824
|
--wm-shPanel: 0 12px 40px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
|
|
@@ -1091,7 +1094,7 @@ function we(e) {
|
|
|
1091
1094
|
function oe(e) {
|
|
1092
1095
|
return Ce[we(e)] || Ce[ie];
|
|
1093
1096
|
}
|
|
1094
|
-
function
|
|
1097
|
+
function D(e) {
|
|
1095
1098
|
const t = we(e), n = _e[t] || _e[ie], i = _e[ie];
|
|
1096
1099
|
return function(s, a) {
|
|
1097
1100
|
let l = n[s];
|
|
@@ -1109,7 +1112,7 @@ function Ae(e, t) {
|
|
|
1109
1112
|
function Ie(e, t, n) {
|
|
1110
1113
|
return Array.isArray(t) ? t.map((i) => Ae(e, String(i))).join(", ") : typeof t == "boolean" ? n(t ? "common.yes" : "common.no") : Ae(e, String(t));
|
|
1111
1114
|
}
|
|
1112
|
-
function tt(e, t, n =
|
|
1115
|
+
function tt(e, t, n = D()) {
|
|
1113
1116
|
if (!e || !t) return "";
|
|
1114
1117
|
const i = Array.isArray(e.fields) ? e.fields : [], r = [];
|
|
1115
1118
|
for (const s of i) {
|
|
@@ -1124,7 +1127,7 @@ ${l}`);
|
|
|
1124
1127
|
|
|
1125
1128
|
`);
|
|
1126
1129
|
}
|
|
1127
|
-
function nt(e, t, n =
|
|
1130
|
+
function nt(e, t, n = D()) {
|
|
1128
1131
|
const i = [], r = Array.isArray(e == null ? void 0 : e.fields) ? e.fields : [];
|
|
1129
1132
|
for (const s of r) {
|
|
1130
1133
|
if (!(s != null && s.key) || !(s != null && s.label)) continue;
|
|
@@ -1194,7 +1197,7 @@ function it(e, t, n, i) {
|
|
|
1194
1197
|
return r.join(`
|
|
1195
1198
|
`);
|
|
1196
1199
|
}
|
|
1197
|
-
function at(e, t, n =
|
|
1200
|
+
function at(e, t, n = D(), i) {
|
|
1198
1201
|
if (!e) return;
|
|
1199
1202
|
const r = it(e, t || [], n, oe(i)), s = new Blob([r], { type: "text/plain;charset=utf-8" });
|
|
1200
1203
|
try {
|
|
@@ -1479,7 +1482,7 @@ const ot = {
|
|
|
1479
1482
|
) + r;
|
|
1480
1483
|
this.nextRevealAt = a;
|
|
1481
1484
|
const l = Math.max(0, a - n), p = e.id, k = setTimeout(() => {
|
|
1482
|
-
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((
|
|
1485
|
+
this.revealedAt = { ...this.revealedAt, [p]: Date.now() }, this.revealTimers = this.revealTimers.filter((b) => b !== k), typeof this.onMessageRevealed == "function" && this.onMessageRevealed(e, t);
|
|
1483
1486
|
}, l);
|
|
1484
1487
|
this.revealTimers.push(k);
|
|
1485
1488
|
},
|
|
@@ -1619,7 +1622,7 @@ function pt(e) {
|
|
|
1619
1622
|
}
|
|
1620
1623
|
return null;
|
|
1621
1624
|
}
|
|
1622
|
-
const
|
|
1625
|
+
const B = (e, t) => {
|
|
1623
1626
|
const n = e.__vccOpts || e;
|
|
1624
1627
|
for (const [i, r] of t)
|
|
1625
1628
|
n[i] = r;
|
|
@@ -1665,13 +1668,13 @@ function wt(e, t, n, i, r, s) {
|
|
|
1665
1668
|
}, v(s.initials), 5))
|
|
1666
1669
|
], 6);
|
|
1667
1670
|
}
|
|
1668
|
-
const Re = /* @__PURE__ */
|
|
1671
|
+
const Re = /* @__PURE__ */ B(vt, [["render", wt], ["__scopeId", "data-v-14e10c0d"]]), bt = 3, kt = {
|
|
1669
1672
|
name: "WmLauncher",
|
|
1670
1673
|
components: { HumanAvatar: Re },
|
|
1671
1674
|
inject: {
|
|
1672
1675
|
// Translator shared by the Messenger shell; French fallback when
|
|
1673
1676
|
// the component is used standalone.
|
|
1674
|
-
t: { default: () =>
|
|
1677
|
+
t: { default: () => D() }
|
|
1675
1678
|
},
|
|
1676
1679
|
props: {
|
|
1677
1680
|
// Nombre de conversations non lues — pilote la pastille.
|
|
@@ -1701,13 +1704,13 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1701
1704
|
onFocusin: t[3] || (t[3] = (l) => e.$emit("hover", !0)),
|
|
1702
1705
|
onFocusout: t[4] || (t[4] = (l) => e.$emit("hover", !1))
|
|
1703
1706
|
}, [
|
|
1704
|
-
V(
|
|
1705
|
-
default:
|
|
1707
|
+
V(Ue, { name: "wm-peek" }, {
|
|
1708
|
+
default: Pe(() => [
|
|
1706
1709
|
s.visiblePeeks.length ? (c(), u("div", {
|
|
1707
1710
|
key: 0,
|
|
1708
1711
|
class: O(["wm-peekStack", { "wm-peekStack--multi": s.visiblePeeks.length > 1 }])
|
|
1709
1712
|
}, [
|
|
1710
|
-
(c(!0), u(R, null,
|
|
1713
|
+
(c(!0), u(R, null, j(s.visiblePeeks, (l, p) => (c(), u("div", {
|
|
1711
1714
|
key: l.convId,
|
|
1712
1715
|
class: "wm-peek",
|
|
1713
1716
|
style: q({
|
|
@@ -1755,7 +1758,7 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1755
1758
|
key: 0,
|
|
1756
1759
|
class: "wm-peek__avatarBadge",
|
|
1757
1760
|
"aria-label": s.t("launcher.unreadMessages", { count: l.count })
|
|
1758
|
-
}, v(l.count > 9 ? "9+" : l.count), 9, Mt)) :
|
|
1761
|
+
}, v(l.count > 9 ? "9+" : l.count), 9, Mt)) : w("", !0)
|
|
1759
1762
|
]),
|
|
1760
1763
|
o("div", Tt, [
|
|
1761
1764
|
o("div", xt, [
|
|
@@ -1770,7 +1773,7 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1770
1773
|
onClick: Y((k) => e.$emit("open", l.convId), ["stop"])
|
|
1771
1774
|
}, v(s.t("common.open")), 9, Rt)
|
|
1772
1775
|
], 44, Ct))), 128))
|
|
1773
|
-
], 2)) :
|
|
1776
|
+
], 2)) : w("", !0)
|
|
1774
1777
|
]),
|
|
1775
1778
|
_: 1
|
|
1776
1779
|
}),
|
|
@@ -1801,11 +1804,11 @@ function Nt(e, t, n, i, r, s) {
|
|
|
1801
1804
|
}) : s.t("launcher.unreadConversationsOne", {
|
|
1802
1805
|
count: n.unreadCount
|
|
1803
1806
|
})
|
|
1804
|
-
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) :
|
|
1807
|
+
}, v(n.unreadCount > 9 ? "9+" : n.unreadCount), 9, Bt)) : w("", !0)
|
|
1805
1808
|
], 8, Et)
|
|
1806
1809
|
], 32);
|
|
1807
1810
|
}
|
|
1808
|
-
const Ft = /* @__PURE__ */
|
|
1811
|
+
const Ft = /* @__PURE__ */ B(kt, [["render", Nt], ["__scopeId", "data-v-9d7efc48"]]), Ut = {
|
|
1809
1812
|
name: "WmAIAvatar",
|
|
1810
1813
|
props: {
|
|
1811
1814
|
size: { type: Number, default: 26 },
|
|
@@ -1834,7 +1837,7 @@ const Ft = /* @__PURE__ */ N(kt, [["render", Nt], ["__scopeId", "data-v-9d7efc48
|
|
|
1834
1837
|
return ve(this.name);
|
|
1835
1838
|
}
|
|
1836
1839
|
}
|
|
1837
|
-
},
|
|
1840
|
+
}, Pt = {
|
|
1838
1841
|
key: 0,
|
|
1839
1842
|
class: "wm-aiav__pulse"
|
|
1840
1843
|
}, jt = ["src", "alt"], Dt = ["width", "height"];
|
|
@@ -1847,7 +1850,7 @@ function zt(e, t, n, i, r, s) {
|
|
|
1847
1850
|
"--wm-avr": n.size * 0.32 + "px"
|
|
1848
1851
|
})
|
|
1849
1852
|
}, [
|
|
1850
|
-
n.pulse ? (c(), u("div",
|
|
1853
|
+
n.pulse ? (c(), u("div", Pt)) : w("", !0),
|
|
1851
1854
|
o("div", {
|
|
1852
1855
|
class: O(["wm-aiav__inner", {
|
|
1853
1856
|
"wm-aiav__inner--glow": n.pulse,
|
|
@@ -1896,7 +1899,7 @@ function zt(e, t, n, i, r, s) {
|
|
|
1896
1899
|
], 6)
|
|
1897
1900
|
], 6);
|
|
1898
1901
|
}
|
|
1899
|
-
const le = /* @__PURE__ */
|
|
1902
|
+
const le = /* @__PURE__ */ B(Ut, [["render", zt], ["__scopeId", "data-v-6f7f685d"]]), Ht = {
|
|
1900
1903
|
name: "WmTeamAvatars",
|
|
1901
1904
|
props: {
|
|
1902
1905
|
members: { type: Array, default: () => [] },
|
|
@@ -1931,7 +1934,7 @@ function Wt(e, t, n, i, r, s) {
|
|
|
1931
1934
|
class: "wm-team__stack",
|
|
1932
1935
|
style: q({ width: s.stackWidth + "px" })
|
|
1933
1936
|
}, [
|
|
1934
|
-
(c(!0), u(R, null,
|
|
1937
|
+
(c(!0), u(R, null, j(n.members.slice(0, 3), (a, l) => (c(), u("div", {
|
|
1935
1938
|
key: l,
|
|
1936
1939
|
class: "wm-team__pill",
|
|
1937
1940
|
style: q({
|
|
@@ -1947,16 +1950,16 @@ function Wt(e, t, n, i, r, s) {
|
|
|
1947
1950
|
}, null, 8, $t)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
|
|
1948
1951
|
], 4))), 128))
|
|
1949
1952
|
], 4),
|
|
1950
|
-
n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) :
|
|
1951
|
-
])) :
|
|
1953
|
+
n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : w("", !0)
|
|
1954
|
+
])) : w("", !0);
|
|
1952
1955
|
}
|
|
1953
|
-
const Gt = /* @__PURE__ */
|
|
1956
|
+
const Gt = /* @__PURE__ */ B(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
|
|
1954
1957
|
name: "WmHeader",
|
|
1955
1958
|
components: { AIAvatar: le, TeamAvatars: Gt },
|
|
1956
1959
|
inject: {
|
|
1957
1960
|
// Translator shared by the Messenger shell. Falls back to a French
|
|
1958
1961
|
// translator when the component is used standalone (no provider).
|
|
1959
|
-
t: { default: () =>
|
|
1962
|
+
t: { default: () => D() }
|
|
1960
1963
|
},
|
|
1961
1964
|
props: {
|
|
1962
1965
|
title: { type: String, default: "Nouvelle conversation" },
|
|
@@ -2031,11 +2034,11 @@ function on(e, t, n, i, r, s) {
|
|
|
2031
2034
|
o("div", en, [
|
|
2032
2035
|
o("div", tn, v(n.title), 1)
|
|
2033
2036
|
]),
|
|
2034
|
-
s.hasTeam ? (c(),
|
|
2037
|
+
s.hasTeam ? (c(), U(l, {
|
|
2035
2038
|
key: 0,
|
|
2036
2039
|
members: s.displayedTeamMembers,
|
|
2037
2040
|
"response-label": ""
|
|
2038
|
-
}, null, 8, ["members"])) :
|
|
2041
|
+
}, null, 8, ["members"])) : w("", !0)
|
|
2039
2042
|
], 64)) : (c(), u("div", nn)),
|
|
2040
2043
|
o("div", sn, [
|
|
2041
2044
|
n.showMore ? (c(), u("button", {
|
|
@@ -2069,7 +2072,7 @@ function on(e, t, n, i, r, s) {
|
|
|
2069
2072
|
r: "1.6"
|
|
2070
2073
|
})
|
|
2071
2074
|
], -1)
|
|
2072
|
-
])], 10, rn)) :
|
|
2075
|
+
])], 10, rn)) : w("", !0),
|
|
2073
2076
|
n.showClose ? (c(), u("button", {
|
|
2074
2077
|
key: 1,
|
|
2075
2078
|
type: "button",
|
|
@@ -2091,11 +2094,11 @@ function on(e, t, n, i, r, s) {
|
|
|
2091
2094
|
}, [
|
|
2092
2095
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
2093
2096
|
], -1)
|
|
2094
|
-
])], 8, an)) :
|
|
2097
|
+
])], 8, an)) : w("", !0)
|
|
2095
2098
|
])
|
|
2096
2099
|
]);
|
|
2097
2100
|
}
|
|
2098
|
-
const ln = /* @__PURE__ */
|
|
2101
|
+
const ln = /* @__PURE__ */ B(Yt, [["render", on], ["__scopeId", "data-v-925c9e94"]]);
|
|
2099
2102
|
function Ee(e) {
|
|
2100
2103
|
return String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
2101
2104
|
}
|
|
@@ -2142,22 +2145,22 @@ function un(e) {
|
|
|
2142
2145
|
if (!T) break;
|
|
2143
2146
|
k.push(T[1]), i++;
|
|
2144
2147
|
}
|
|
2145
|
-
const
|
|
2148
|
+
const b = k.map((T) => `<li>${re(T)}</li>`).join("");
|
|
2146
2149
|
n.push({
|
|
2147
2150
|
type: "block",
|
|
2148
|
-
html: `<ul class="wm-md-ul">${
|
|
2151
|
+
html: `<ul class="wm-md-ul">${b}</ul>`
|
|
2149
2152
|
});
|
|
2150
2153
|
continue;
|
|
2151
2154
|
}
|
|
2152
2155
|
const l = /^\s*(\d+)\.\s+(.*)$/.exec(s);
|
|
2153
2156
|
if (l) {
|
|
2154
|
-
const k = parseInt(l[1], 10),
|
|
2157
|
+
const k = parseInt(l[1], 10), b = [l[2]];
|
|
2155
2158
|
for (i++; i < t.length; ) {
|
|
2156
2159
|
const A = /^\s*\d+\.\s+(.*)$/.exec(t[i]);
|
|
2157
2160
|
if (!A) break;
|
|
2158
|
-
|
|
2161
|
+
b.push(A[1]), i++;
|
|
2159
2162
|
}
|
|
2160
|
-
const T =
|
|
2163
|
+
const T = b.map((A) => `<li>${re(A)}</li>`).join(""), I = k !== 1 ? ` start="${k}"` : "";
|
|
2161
2164
|
n.push({
|
|
2162
2165
|
type: "block",
|
|
2163
2166
|
html: `<ol class="wm-md-ol"${I}>${T}</ol>`
|
|
@@ -2197,7 +2200,7 @@ const Te = {
|
|
|
2197
2200
|
inject: {
|
|
2198
2201
|
// Translator + resolved-language getter shared by the Messenger
|
|
2199
2202
|
// shell. Fall back to French wording when used standalone.
|
|
2200
|
-
t: { default: () =>
|
|
2203
|
+
t: { default: () => D() },
|
|
2201
2204
|
wmLocale: { default: () => () => "fr" }
|
|
2202
2205
|
},
|
|
2203
2206
|
props: {
|
|
@@ -2279,7 +2282,7 @@ const Te = {
|
|
|
2279
2282
|
}, On = {
|
|
2280
2283
|
key: 1,
|
|
2281
2284
|
class: "wm-onb__section"
|
|
2282
|
-
}, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, Rn = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Bn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" },
|
|
2285
|
+
}, Ln = { class: "wm-onb__section-title" }, In = { class: "wm-onb__search" }, Rn = ["placeholder", "aria-label"], En = { class: "wm-onb__list" }, Bn = ["onClick"], Nn = ["aria-label"], Fn = { class: "wm-onb__thread-body" }, Un = { class: "wm-onb__thread-title" }, Pn = ["innerHTML"], jn = { class: "wm-onb__thread-meta" }, Dn = {
|
|
2283
2286
|
key: 0,
|
|
2284
2287
|
class: "wm-onb__thread-time"
|
|
2285
2288
|
}, zn = {
|
|
@@ -2363,7 +2366,7 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2363
2366
|
o("div", {
|
|
2364
2367
|
class: O(s.quickLinksLayout)
|
|
2365
2368
|
}, [
|
|
2366
|
-
(c(!0), u(R, null,
|
|
2369
|
+
(c(!0), u(R, null, j(n.quickLinks, (l, p) => (c(), u("button", {
|
|
2367
2370
|
key: p,
|
|
2368
2371
|
type: "button",
|
|
2369
2372
|
class: O(["wm-onb__card", { "wm-onb__card--row": s.isOddQuickLinks }]),
|
|
@@ -2378,11 +2381,11 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2378
2381
|
]),
|
|
2379
2382
|
o("span", Mn, [
|
|
2380
2383
|
o("span", Tn, v(l.label), 1),
|
|
2381
|
-
l.description ? (c(), u("span", xn, v(l.description), 1)) :
|
|
2384
|
+
l.description ? (c(), u("span", xn, v(l.description), 1)) : w("", !0)
|
|
2382
2385
|
])
|
|
2383
2386
|
], 10, kn))), 128))
|
|
2384
2387
|
], 2)
|
|
2385
|
-
])) :
|
|
2388
|
+
])) : w("", !0),
|
|
2386
2389
|
n.openThreads.length ? (c(), u("div", On, [
|
|
2387
2390
|
o("div", Ln, v(s.t("onboarding.recentConversations")), 1),
|
|
2388
2391
|
o("div", In, [
|
|
@@ -2411,7 +2414,7 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2411
2414
|
])
|
|
2412
2415
|
]),
|
|
2413
2416
|
o("div", En, [
|
|
2414
|
-
(c(!0), u(R, null,
|
|
2417
|
+
(c(!0), u(R, null, j(s.filteredThreads, (l) => (c(), u("button", {
|
|
2415
2418
|
key: l.id,
|
|
2416
2419
|
type: "button",
|
|
2417
2420
|
class: "wm-onb__thread",
|
|
@@ -2437,17 +2440,17 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2437
2440
|
key: 0,
|
|
2438
2441
|
class: "wm-onb__thread-dot",
|
|
2439
2442
|
"aria-label": s.t("onboarding.unread")
|
|
2440
|
-
}, null, 8, Nn)) :
|
|
2443
|
+
}, null, 8, Nn)) : w("", !0)
|
|
2441
2444
|
], 2),
|
|
2442
2445
|
o("span", Fn, [
|
|
2443
|
-
o("span",
|
|
2446
|
+
o("span", Un, v(l.title), 1),
|
|
2444
2447
|
o("span", {
|
|
2445
2448
|
class: "wm-onb__thread-preview",
|
|
2446
2449
|
innerHTML: s.renderPreview(l.preview)
|
|
2447
|
-
}, null, 8,
|
|
2450
|
+
}, null, 8, Pn)
|
|
2448
2451
|
]),
|
|
2449
2452
|
o("span", jn, [
|
|
2450
|
-
s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) :
|
|
2453
|
+
s.formatTs(l._ts) ? (c(), u("span", Dn, v(s.formatTs(l._ts)), 1)) : w("", !0),
|
|
2451
2454
|
t[6] || (t[6] = o("svg", {
|
|
2452
2455
|
width: "14",
|
|
2453
2456
|
height: "14",
|
|
@@ -2464,12 +2467,12 @@ function Hn(e, t, n, i, r, s) {
|
|
|
2464
2467
|
], -1))
|
|
2465
2468
|
])
|
|
2466
2469
|
], 8, Bn))), 128)),
|
|
2467
|
-
s.filteredThreads.length ?
|
|
2470
|
+
s.filteredThreads.length ? w("", !0) : (c(), u("div", zn, v(s.t("onboarding.noResults", { query: r.query })), 1))
|
|
2468
2471
|
])
|
|
2469
|
-
])) :
|
|
2472
|
+
])) : w("", !0)
|
|
2470
2473
|
]);
|
|
2471
2474
|
}
|
|
2472
|
-
const qn = /* @__PURE__ */
|
|
2475
|
+
const qn = /* @__PURE__ */ B(hn, [["render", Hn], ["__scopeId", "data-v-28c0780b"]]);
|
|
2473
2476
|
function $n(e) {
|
|
2474
2477
|
return typeof e != "string" ? "" : e.replace(/`([^`]+)`/g, "$1").replace(/\*\*([^*]+)\*\*/g, "$1").replace(new RegExp("(?<!\\*)\\*([^*]+)\\*(?!\\*)", "g"), "$1").replace(/__([^_]+)__/g, "$1").replace(/\[([^\]]+)\]\([^)]+\)/g, "$1").replace(/\s+/g, " ").trim();
|
|
2475
2478
|
}
|
|
@@ -2570,16 +2573,16 @@ function es(e, t, n, i, r, s) {
|
|
|
2570
2573
|
"aria-hidden": "true"
|
|
2571
2574
|
}, " · ", -1)),
|
|
2572
2575
|
o("span", Zn, v(s.detailText), 1)
|
|
2573
|
-
], 64)) :
|
|
2576
|
+
], 64)) : w("", !0)
|
|
2574
2577
|
])
|
|
2575
2578
|
], 2);
|
|
2576
2579
|
}
|
|
2577
|
-
const ts = /* @__PURE__ */
|
|
2580
|
+
const ts = /* @__PURE__ */ B(Vn, [["render", es], ["__scopeId", "data-v-7284acd0"]]), ns = {
|
|
2578
2581
|
name: "WmArtifactFormResponse",
|
|
2579
2582
|
inject: {
|
|
2580
2583
|
// Translator shared by the Messenger shell; French fallback when
|
|
2581
2584
|
// the component is used standalone.
|
|
2582
|
-
t: { default: () =>
|
|
2585
|
+
t: { default: () => D() }
|
|
2583
2586
|
},
|
|
2584
2587
|
props: {
|
|
2585
2588
|
data: { type: Object, required: !0 }
|
|
@@ -2613,7 +2616,7 @@ function cs(e, t, n, i, r, s) {
|
|
|
2613
2616
|
])
|
|
2614
2617
|
]),
|
|
2615
2618
|
o("div", os, [
|
|
2616
|
-
(c(!0), u(R, null,
|
|
2619
|
+
(c(!0), u(R, null, j(s.fields, (a, l) => (c(), u("div", {
|
|
2617
2620
|
key: l,
|
|
2618
2621
|
class: "wm-art__field"
|
|
2619
2622
|
}, [
|
|
@@ -2628,7 +2631,7 @@ function cs(e, t, n, i, r, s) {
|
|
|
2628
2631
|
])
|
|
2629
2632
|
]);
|
|
2630
2633
|
}
|
|
2631
|
-
const ds = /* @__PURE__ */
|
|
2634
|
+
const ds = /* @__PURE__ */ B(ns, [["render", cs], ["__scopeId", "data-v-713aecf1"]]), us = {
|
|
2632
2635
|
name: "WmArtifactInfoCard",
|
|
2633
2636
|
props: {
|
|
2634
2637
|
data: { type: Object, required: !0 }
|
|
@@ -2664,11 +2667,11 @@ function ks(e, t, n, i, r, s) {
|
|
|
2664
2667
|
alt: n.data.title || "",
|
|
2665
2668
|
loading: "lazy"
|
|
2666
2669
|
}, null, 8, fs)
|
|
2667
|
-
])) :
|
|
2670
|
+
])) : w("", !0),
|
|
2668
2671
|
o("div", gs, [
|
|
2669
2672
|
o("div", _s, [
|
|
2670
2673
|
o("div", ps, v(n.data.title), 1),
|
|
2671
|
-
n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) :
|
|
2674
|
+
n.data.subtitle ? (c(), u("div", vs, v(n.data.subtitle), 1)) : w("", !0)
|
|
2672
2675
|
]),
|
|
2673
2676
|
n.data.badge && n.data.badge.label ? (c(), u("span", {
|
|
2674
2677
|
key: 0,
|
|
@@ -2676,11 +2679,11 @@ function ks(e, t, n, i, r, s) {
|
|
|
2676
2679
|
"wm-art__badge",
|
|
2677
2680
|
`wm-art__badge--${n.data.badge.tone || "neutral"}`
|
|
2678
2681
|
])
|
|
2679
|
-
}, v(n.data.badge.label), 3)) :
|
|
2682
|
+
}, v(n.data.badge.label), 3)) : w("", !0)
|
|
2680
2683
|
]),
|
|
2681
2684
|
s.hasBody ? (c(), u("div", ys, [
|
|
2682
|
-
n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) :
|
|
2683
|
-
s.fields.length ? (c(!0), u(R, { key: 1 },
|
|
2685
|
+
n.data.body ? (c(), u("div", ws, v(n.data.body), 1)) : w("", !0),
|
|
2686
|
+
s.fields.length ? (c(!0), u(R, { key: 1 }, j(s.fields, (a, l) => (c(), u("div", {
|
|
2684
2687
|
key: l,
|
|
2685
2688
|
class: "wm-art__field"
|
|
2686
2689
|
}, [
|
|
@@ -2691,11 +2694,11 @@ function ks(e, t, n, i, r, s) {
|
|
|
2691
2694
|
{ "wm-art__fieldValue--multi": a.multiline }
|
|
2692
2695
|
])
|
|
2693
2696
|
}, v(a.value), 3)
|
|
2694
|
-
]))), 128)) :
|
|
2695
|
-
])) :
|
|
2697
|
+
]))), 128)) : w("", !0)
|
|
2698
|
+
])) : w("", !0)
|
|
2696
2699
|
]);
|
|
2697
2700
|
}
|
|
2698
|
-
const Cs = /* @__PURE__ */
|
|
2701
|
+
const Cs = /* @__PURE__ */ B(us, [["render", ks], ["__scopeId", "data-v-7eae0e4a"]]);
|
|
2699
2702
|
function As(e, t, n) {
|
|
2700
2703
|
if (!e) return "";
|
|
2701
2704
|
const i = new Date(e);
|
|
@@ -2715,7 +2718,7 @@ const Ss = {
|
|
|
2715
2718
|
inject: {
|
|
2716
2719
|
// Translator + resolved-language getter shared by the Messenger
|
|
2717
2720
|
// shell. Fall back to French wording when used standalone.
|
|
2718
|
-
t: { default: () =>
|
|
2721
|
+
t: { default: () => D() },
|
|
2719
2722
|
wmLocale: { default: () => () => "fr" }
|
|
2720
2723
|
},
|
|
2721
2724
|
props: {
|
|
@@ -2778,7 +2781,7 @@ const Ss = {
|
|
|
2778
2781
|
key: 1,
|
|
2779
2782
|
class: "wm-art__footer wm-tk__footer"
|
|
2780
2783
|
};
|
|
2781
|
-
function
|
|
2784
|
+
function Us(e, t, n, i, r, s) {
|
|
2782
2785
|
return c(), u("div", Ms, [
|
|
2783
2786
|
o("div", Ts, [
|
|
2784
2787
|
o("div", xs, v(n.data.title), 1),
|
|
@@ -2814,10 +2817,10 @@ function Ps(e, t, n, i, r, s) {
|
|
|
2814
2817
|
pe(" " + v(n.data.status.label), 1)
|
|
2815
2818
|
], 2)
|
|
2816
2819
|
]),
|
|
2817
|
-
n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) :
|
|
2820
|
+
n.data.body ? (c(), u("div", Is, v(n.data.body), 1)) : w("", !0)
|
|
2818
2821
|
]),
|
|
2819
2822
|
s.fields.length ? (c(), u("div", Rs, [
|
|
2820
|
-
(c(!0), u(R, null,
|
|
2823
|
+
(c(!0), u(R, null, j(s.fields, (a, l) => (c(), u("div", {
|
|
2821
2824
|
key: l,
|
|
2822
2825
|
class: "wm-art__field"
|
|
2823
2826
|
}, [
|
|
@@ -2867,11 +2870,11 @@ function Ps(e, t, n, i, r, s) {
|
|
|
2867
2870
|
rx: "2"
|
|
2868
2871
|
}, null, -1),
|
|
2869
2872
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" }, null, -1)
|
|
2870
|
-
])])) :
|
|
2873
|
+
])])) : w("", !0),
|
|
2871
2874
|
o("span", null, v(a.value), 1)
|
|
2872
2875
|
], 2)
|
|
2873
2876
|
]))), 128))
|
|
2874
|
-
])) :
|
|
2877
|
+
])) : w("", !0),
|
|
2875
2878
|
n.data.created_at ? (c(), u("div", Fs, [
|
|
2876
2879
|
t[4] || (t[4] = o("svg", {
|
|
2877
2880
|
width: "11",
|
|
@@ -2894,13 +2897,13 @@ function Ps(e, t, n, i, r, s) {
|
|
|
2894
2897
|
o("path", { d: "M16 2v4M8 2v4M3 10h18" })
|
|
2895
2898
|
], -1)),
|
|
2896
2899
|
o("span", null, v(s.formattedDate), 1)
|
|
2897
|
-
])) :
|
|
2900
|
+
])) : w("", !0)
|
|
2898
2901
|
]);
|
|
2899
2902
|
}
|
|
2900
|
-
const
|
|
2903
|
+
const Ps = /* @__PURE__ */ B(Ss, [["render", Us], ["__scopeId", "data-v-5f30c914"]]), js = {
|
|
2901
2904
|
form_response: ds,
|
|
2902
2905
|
info_card: Cs,
|
|
2903
|
-
ticket:
|
|
2906
|
+
ticket: Ps
|
|
2904
2907
|
}, Ds = {
|
|
2905
2908
|
name: "WmArtifactRenderer",
|
|
2906
2909
|
props: {
|
|
@@ -2917,18 +2920,18 @@ const Us = /* @__PURE__ */ N(Ss, [["render", Ps], ["__scopeId", "data-v-5f30c914
|
|
|
2917
2920
|
}
|
|
2918
2921
|
};
|
|
2919
2922
|
function zs(e, t, n, i, r, s) {
|
|
2920
|
-
return s.component ? (c(),
|
|
2923
|
+
return s.component ? (c(), U(je(s.component), {
|
|
2921
2924
|
key: 0,
|
|
2922
2925
|
data: n.artifact.data
|
|
2923
|
-
}, null, 8, ["data"])) :
|
|
2926
|
+
}, null, 8, ["data"])) : w("", !0);
|
|
2924
2927
|
}
|
|
2925
|
-
const Hs = /* @__PURE__ */
|
|
2928
|
+
const Hs = /* @__PURE__ */ B(Ds, [["render", zs]]), qs = {
|
|
2926
2929
|
name: "WmAttachmentPreview",
|
|
2927
2930
|
inject: {
|
|
2928
2931
|
signAttachmentFn: { default: null },
|
|
2929
2932
|
// Translator shared by the Messenger shell; French fallback when
|
|
2930
2933
|
// the component is used standalone.
|
|
2931
|
-
t: { default: () =>
|
|
2934
|
+
t: { default: () => D() }
|
|
2932
2935
|
},
|
|
2933
2936
|
props: {
|
|
2934
2937
|
attachment: { type: Object, required: !0 }
|
|
@@ -3051,13 +3054,13 @@ function Zs(e, t, n, i, r, s) {
|
|
|
3051
3054
|
], -1)),
|
|
3052
3055
|
o("span", Ys, [
|
|
3053
3056
|
o("span", Js, v(s.displayName), 1),
|
|
3054
|
-
s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) :
|
|
3057
|
+
s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : w("", !0)
|
|
3055
3058
|
]),
|
|
3056
|
-
r.loading ? (c(), u("span", Xs)) :
|
|
3059
|
+
r.loading ? (c(), u("span", Xs)) : w("", !0)
|
|
3057
3060
|
], 8, Gs))
|
|
3058
3061
|
], 2);
|
|
3059
3062
|
}
|
|
3060
|
-
const er = /* @__PURE__ */
|
|
3063
|
+
const er = /* @__PURE__ */ B(qs, [["render", Zs], ["__scopeId", "data-v-0c877a62"]]), tr = {
|
|
3061
3064
|
name: "WmBubble",
|
|
3062
3065
|
props: {
|
|
3063
3066
|
role: { type: String, default: "ai" },
|
|
@@ -3079,7 +3082,7 @@ function sr(e, t, n, i, r, s) {
|
|
|
3079
3082
|
], !0)
|
|
3080
3083
|
], 2);
|
|
3081
3084
|
}
|
|
3082
|
-
const rr = /* @__PURE__ */
|
|
3085
|
+
const rr = /* @__PURE__ */ B(tr, [["render", sr], ["__scopeId", "data-v-7ab13147"]]), ir = { name: "WmTyping" }, ar = { class: "wm-typing" };
|
|
3083
3086
|
function or(e, t, n, i, r, s) {
|
|
3084
3087
|
return c(), u("div", ar, [...t[0] || (t[0] = [
|
|
3085
3088
|
o("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
@@ -3087,7 +3090,7 @@ function or(e, t, n, i, r, s) {
|
|
|
3087
3090
|
o("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3088
3091
|
])]);
|
|
3089
3092
|
}
|
|
3090
|
-
const lr = /* @__PURE__ */
|
|
3093
|
+
const lr = /* @__PURE__ */ B(ir, [["render", or], ["__scopeId", "data-v-df2447fd"]]);
|
|
3091
3094
|
function Q(e) {
|
|
3092
3095
|
return e ? e.client_msg_id || e.id : "";
|
|
3093
3096
|
}
|
|
@@ -3112,7 +3115,7 @@ const cr = {
|
|
|
3112
3115
|
inject: {
|
|
3113
3116
|
// Translator + resolved-language getter shared by the Messenger
|
|
3114
3117
|
// shell. Fall back to French wording when used standalone.
|
|
3115
|
-
t: { default: () =>
|
|
3118
|
+
t: { default: () => D() },
|
|
3116
3119
|
wmLocale: { default: () => () => "fr" }
|
|
3117
3120
|
},
|
|
3118
3121
|
props: {
|
|
@@ -3172,8 +3175,8 @@ const cr = {
|
|
|
3172
3175
|
const l = this.roleOf(a);
|
|
3173
3176
|
if (l === "system") {
|
|
3174
3177
|
if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
|
|
3175
|
-
const
|
|
3176
|
-
|
|
3178
|
+
const b = e[e.length - 1];
|
|
3179
|
+
b && b.role === "ai" ? b.messages.push(a) : e.push({
|
|
3177
3180
|
key: `g-${Q(a)}`,
|
|
3178
3181
|
role: "ai",
|
|
3179
3182
|
agentName: "",
|
|
@@ -3492,9 +3495,9 @@ const cr = {
|
|
|
3492
3495
|
// doit garder son arrondi.
|
|
3493
3496
|
cornersFor(e, t) {
|
|
3494
3497
|
var Z, ee, te;
|
|
3495
|
-
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom,
|
|
3496
|
-
let
|
|
3497
|
-
return a ? (k && (
|
|
3498
|
+
const n = e.items, i = (Z = n[t]) == null ? void 0 : Z.kind, r = (ee = n[t - 1]) == null ? void 0 : ee.kind, s = (te = n[t + 1]) == null ? void 0 : te.kind, a = e.role === "user", l = 14, p = 4, k = r == null ? void 0 : r.bottom, b = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], I = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = ($, ne, G) => $ != null && T != null ? $ + z >= T : ne === G || ne === "card" && G === "bubble";
|
|
3499
|
+
let F = l, N = l, P = l, W = l;
|
|
3500
|
+
return a ? (k && (N = p), (b || !s) && (P = p), k && M(I, k, i == null ? void 0 : i.top) && (F = p), b && M(A, b, i == null ? void 0 : i.bottom) && (W = p)) : (k && (F = p), (b || !s) && (W = p), k && M(I, k, i == null ? void 0 : i.top) && (N = p), b && M(A, b, i == null ? void 0 : i.bottom) && (P = p)), { tl: F, tr: N, br: P, bl: W };
|
|
3498
3501
|
},
|
|
3499
3502
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3500
3503
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3646,7 +3649,7 @@ const cr = {
|
|
|
3646
3649
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3647
3650
|
}, Or = { class: "wm-list__avatarSlot" };
|
|
3648
3651
|
function Lr(e, t, n, i, r, s) {
|
|
3649
|
-
const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), k = E("ArtifactRenderer"),
|
|
3652
|
+
const a = E("AIAvatar"), l = E("HumanAvatar"), p = E("ActionResult"), k = E("ArtifactRenderer"), b = E("Bubble"), T = E("AttachmentPreview"), I = E("Typing");
|
|
3650
3653
|
return c(), u("div", {
|
|
3651
3654
|
ref: "scrollEl",
|
|
3652
3655
|
class: O(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
@@ -3658,20 +3661,20 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3658
3661
|
"aria-hidden": "true"
|
|
3659
3662
|
}, null, -1)),
|
|
3660
3663
|
o("span", fr, v(s.t("messageList.loadingHistory")), 1)
|
|
3661
|
-
])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) :
|
|
3664
|
+
])) : s.historyExhausted ? (c(), u("div", gr, v(s.t("messageList.conversationStart")), 1)) : w("", !0),
|
|
3662
3665
|
n.dateLabel ? (c(), u("div", _r, [
|
|
3663
3666
|
t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
3664
3667
|
o("span", pr, v(n.dateLabel), 1),
|
|
3665
3668
|
t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3666
|
-
])) :
|
|
3667
|
-
(c(!0), u(R, null,
|
|
3669
|
+
])) : w("", !0),
|
|
3670
|
+
(c(!0), u(R, null, j(s.groups, (A, z) => (c(), u(R, {
|
|
3668
3671
|
key: A.key
|
|
3669
3672
|
}, [
|
|
3670
3673
|
A.key === s.unreadGroupKey ? (c(), u("div", vr, [
|
|
3671
3674
|
t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
3672
3675
|
o("span", yr, v(s.t("messageList.unread")), 1),
|
|
3673
3676
|
t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
3674
|
-
])) :
|
|
3677
|
+
])) : w("", !0),
|
|
3675
3678
|
A.role === "system" || A.items.length ? (c(), u("div", {
|
|
3676
3679
|
key: 1,
|
|
3677
3680
|
class: O(["wm-list__group", "wm-list__group--" + A.role])
|
|
@@ -3681,7 +3684,7 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3681
3684
|
o("span", br, v(A.systemLabel), 1),
|
|
3682
3685
|
t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3683
3686
|
])) : (c(), u(R, { key: 1 }, [
|
|
3684
|
-
(c(!0), u(R, null,
|
|
3687
|
+
(c(!0), u(R, null, j(A.items, (M, F) => (c(), u("div", {
|
|
3685
3688
|
key: `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3686
3689
|
"data-row-key": `${s.messageKey(M.message)}-${M.partKey}`,
|
|
3687
3690
|
class: O(["wm-list__row fade-up", [
|
|
@@ -3691,72 +3694,72 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3691
3694
|
"is-failed": M.message._failed
|
|
3692
3695
|
}
|
|
3693
3696
|
]]),
|
|
3694
|
-
style: q(s.cornersStyle(A,
|
|
3697
|
+
style: q(s.cornersStyle(A, F))
|
|
3695
3698
|
}, [
|
|
3696
3699
|
A.role !== "user" ? (c(), u("div", Cr, [
|
|
3697
|
-
|
|
3698
|
-
A.role === "ai" ? (c(),
|
|
3700
|
+
F === A.items.length - 1 ? (c(), u(R, { key: 0 }, [
|
|
3701
|
+
A.role === "ai" ? (c(), U(a, {
|
|
3699
3702
|
key: 0,
|
|
3700
3703
|
size: 26,
|
|
3701
3704
|
tail: !0,
|
|
3702
3705
|
name: n.aiAgentName,
|
|
3703
3706
|
"image-url": n.aiAgentAvatarUrl
|
|
3704
|
-
}, null, 8, ["name", "image-url"])) : (c(),
|
|
3707
|
+
}, null, 8, ["name", "image-url"])) : (c(), U(l, {
|
|
3705
3708
|
key: 1,
|
|
3706
3709
|
name: A.agentName,
|
|
3707
3710
|
"avatar-url": A.agentAvatarUrl,
|
|
3708
3711
|
size: 26,
|
|
3709
3712
|
tail: !0
|
|
3710
3713
|
}, null, 8, ["name", "avatar-url"]))
|
|
3711
|
-
], 64)) :
|
|
3712
|
-
])) :
|
|
3713
|
-
M.renderAs === "action" ? (c(),
|
|
3714
|
+
], 64)) : w("", !0)
|
|
3715
|
+
])) : w("", !0),
|
|
3716
|
+
M.renderAs === "action" ? (c(), U(p, {
|
|
3714
3717
|
key: 1,
|
|
3715
3718
|
state: M.message.payload.state,
|
|
3716
3719
|
label: s.actionLabel(M.message),
|
|
3717
3720
|
detail: s.actionDetail(M.message)
|
|
3718
|
-
}, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(),
|
|
3721
|
+
}, null, 8, ["state", "label", "detail"])) : M.renderAs === "admin-pending" ? (c(), U(p, {
|
|
3719
3722
|
key: 2,
|
|
3720
3723
|
state: "awaiting",
|
|
3721
3724
|
label: s.t("messageList.approvalRequestSent"),
|
|
3722
3725
|
detail: M.message.text_md || ""
|
|
3723
|
-
}, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(),
|
|
3726
|
+
}, null, 8, ["label", "detail"])) : M.renderAs === "artifact-of-action" ? (c(), U(k, {
|
|
3724
3727
|
key: 3,
|
|
3725
3728
|
artifact: s.actionArtifact(M.message)
|
|
3726
|
-
}, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(),
|
|
3729
|
+
}, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), U(k, {
|
|
3727
3730
|
key: 4,
|
|
3728
3731
|
artifact: s.artifactOf(M.message)
|
|
3729
3732
|
}, null, 8, ["artifact"])) : (c(), u("div", Ar, [
|
|
3730
|
-
M.message.text_md ? (c(),
|
|
3733
|
+
M.message.text_md ? (c(), U(b, {
|
|
3731
3734
|
key: 0,
|
|
3732
3735
|
role: A.role,
|
|
3733
3736
|
text: M.message.text_md
|
|
3734
|
-
}, null, 8, ["role", "text"])) :
|
|
3737
|
+
}, null, 8, ["role", "text"])) : w("", !0),
|
|
3735
3738
|
s.attachmentsOf(M.message).length ? (c(), u("div", {
|
|
3736
3739
|
key: 1,
|
|
3737
3740
|
class: O(["wm-list__atts", {
|
|
3738
3741
|
"wm-list__atts--align-end": A.role === "user"
|
|
3739
3742
|
}])
|
|
3740
3743
|
}, [
|
|
3741
|
-
(c(!0), u(R, null,
|
|
3744
|
+
(c(!0), u(R, null, j(s.attachmentsOf(
|
|
3742
3745
|
M.message
|
|
3743
|
-
), (
|
|
3744
|
-
key: `${s.messageKey(M.message)}-att-${
|
|
3745
|
-
attachment:
|
|
3746
|
+
), (N, P) => (c(), U(T, {
|
|
3747
|
+
key: `${s.messageKey(M.message)}-att-${P}`,
|
|
3748
|
+
attachment: N
|
|
3746
3749
|
}, null, 8, ["attachment"]))), 128))
|
|
3747
|
-
], 2)) :
|
|
3750
|
+
], 2)) : w("", !0)
|
|
3748
3751
|
]))
|
|
3749
3752
|
], 14, kr))), 128)),
|
|
3750
3753
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
|
|
3751
3754
|
key: 0,
|
|
3752
3755
|
class: O(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
3753
3756
|
}, [
|
|
3754
|
-
A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) :
|
|
3755
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) :
|
|
3756
|
-
s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) :
|
|
3757
|
-
], 2)) :
|
|
3757
|
+
A.role !== "user" ? (c(), u("span", Sr, v(s.roleLabel(A)), 1)) : w("", !0),
|
|
3758
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Mr, "·")) : w("", !0),
|
|
3759
|
+
s.lastTimeOf(A) ? (c(), u("span", Tr, v(s.lastTimeOf(A)), 1)) : w("", !0)
|
|
3760
|
+
], 2)) : w("", !0)
|
|
3758
3761
|
], 64))
|
|
3759
|
-
], 2)) :
|
|
3762
|
+
], 2)) : w("", !0)
|
|
3760
3763
|
], 64))), 128)),
|
|
3761
3764
|
n.streamingActive ? (c(), u("div", xr, [
|
|
3762
3765
|
o("div", Or, [
|
|
@@ -3768,10 +3771,10 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3768
3771
|
}, null, 8, ["name", "image-url"])
|
|
3769
3772
|
]),
|
|
3770
3773
|
V(I)
|
|
3771
|
-
])) :
|
|
3774
|
+
])) : w("", !0)
|
|
3772
3775
|
], 34);
|
|
3773
3776
|
}
|
|
3774
|
-
const Ir = /* @__PURE__ */
|
|
3777
|
+
const Ir = /* @__PURE__ */ B(hr, [["render", Lr], ["__scopeId", "data-v-d769b193"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", be = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
3775
3778
|
function Rr() {
|
|
3776
3779
|
return be && [
|
|
3777
3780
|
"video/webm;codecs=vp9,opus",
|
|
@@ -3836,56 +3839,56 @@ async function Nr(e = {}) {
|
|
|
3836
3839
|
t = await navigator.mediaDevices.getDisplayMedia(
|
|
3837
3840
|
Be({ audio: !0 })
|
|
3838
3841
|
);
|
|
3839
|
-
} catch (
|
|
3840
|
-
return (
|
|
3842
|
+
} catch (b) {
|
|
3843
|
+
return (b == null ? void 0 : b.name) !== "NotAllowedError" && console.error("[media] record picker", b), null;
|
|
3841
3844
|
}
|
|
3842
3845
|
const n = Rr();
|
|
3843
3846
|
let i;
|
|
3844
3847
|
try {
|
|
3845
3848
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
3846
|
-
} catch (
|
|
3847
|
-
return console.error("[media] recorder init",
|
|
3849
|
+
} catch (b) {
|
|
3850
|
+
return console.error("[media] recorder init", b), t.getTracks().forEach((T) => {
|
|
3848
3851
|
T.stop();
|
|
3849
3852
|
}), null;
|
|
3850
3853
|
}
|
|
3851
3854
|
const r = [];
|
|
3852
3855
|
let s = null, a = !1;
|
|
3853
|
-
i.addEventListener("dataavailable", (
|
|
3854
|
-
|
|
3856
|
+
i.addEventListener("dataavailable", (b) => {
|
|
3857
|
+
b.data && b.data.size > 0 && r.push(b.data);
|
|
3855
3858
|
}), i.addEventListener("stop", () => {
|
|
3856
|
-
var
|
|
3859
|
+
var b, T;
|
|
3857
3860
|
if (s && clearInterval(s), t.getTracks().forEach((I) => {
|
|
3858
3861
|
I.stop();
|
|
3859
3862
|
}), r.length) {
|
|
3860
|
-
const I = i.mimeType || n || "video/webm", A = new Blob(r, { type: I }), z = /mp4/.test(I) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19),
|
|
3863
|
+
const I = i.mimeType || n || "video/webm", A = new Blob(r, { type: I }), z = /mp4/.test(I) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), F = new File([A], `ecran-${M}.${z}`, {
|
|
3861
3864
|
type: I
|
|
3862
3865
|
});
|
|
3863
|
-
(
|
|
3866
|
+
(b = e.onfinalize) == null || b.call(e, F);
|
|
3864
3867
|
} else
|
|
3865
3868
|
(T = e.oncancel) == null || T.call(e);
|
|
3866
|
-
}), t.getVideoTracks().forEach((
|
|
3867
|
-
|
|
3869
|
+
}), t.getVideoTracks().forEach((b) => {
|
|
3870
|
+
b.addEventListener("ended", () => l(), { once: !0 });
|
|
3868
3871
|
});
|
|
3869
3872
|
function l() {
|
|
3870
3873
|
if (!a && (a = !0, i.state !== "inactive"))
|
|
3871
3874
|
try {
|
|
3872
3875
|
i.stop();
|
|
3873
|
-
} catch (
|
|
3874
|
-
console.error("[media] recorder stop",
|
|
3876
|
+
} catch (b) {
|
|
3877
|
+
console.error("[media] recorder stop", b);
|
|
3875
3878
|
}
|
|
3876
3879
|
}
|
|
3877
3880
|
try {
|
|
3878
3881
|
i.start(1e3);
|
|
3879
|
-
} catch (
|
|
3880
|
-
return console.error("[media] recorder start",
|
|
3882
|
+
} catch (b) {
|
|
3883
|
+
return console.error("[media] recorder start", b), t.getTracks().forEach((T) => {
|
|
3881
3884
|
T.stop();
|
|
3882
3885
|
}), null;
|
|
3883
3886
|
}
|
|
3884
3887
|
(k = e.onstart) == null || k.call(e);
|
|
3885
3888
|
const p = Date.now();
|
|
3886
3889
|
return s = setInterval(() => {
|
|
3887
|
-
var
|
|
3888
|
-
(
|
|
3890
|
+
var b;
|
|
3891
|
+
(b = e.ontick) == null || b.call(e, Date.now() - p);
|
|
3889
3892
|
}, 500), {
|
|
3890
3893
|
stop: l,
|
|
3891
3894
|
get state() {
|
|
@@ -3909,12 +3912,12 @@ const Fr = [
|
|
|
3909
3912
|
labelKey: "composer.recordScreen",
|
|
3910
3913
|
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"
|
|
3911
3914
|
}
|
|
3912
|
-
],
|
|
3915
|
+
], Ur = {
|
|
3913
3916
|
name: "WmComposer",
|
|
3914
3917
|
inject: {
|
|
3915
3918
|
// Translator shared by the Messenger shell; French fallback when
|
|
3916
3919
|
// the component is used standalone.
|
|
3917
|
-
t: { default: () =>
|
|
3920
|
+
t: { default: () => D() }
|
|
3918
3921
|
},
|
|
3919
3922
|
props: {
|
|
3920
3923
|
modelValue: { type: String, default: "" },
|
|
@@ -4041,7 +4044,7 @@ const Fr = [
|
|
|
4041
4044
|
}
|
|
4042
4045
|
}
|
|
4043
4046
|
}
|
|
4044
|
-
},
|
|
4047
|
+
}, Pr = { class: "wm-compose-wrap" }, jr = {
|
|
4045
4048
|
key: 0,
|
|
4046
4049
|
class: "wm-rec"
|
|
4047
4050
|
}, Dr = { class: "wm-rec__lbl" }, zr = {
|
|
@@ -4055,7 +4058,7 @@ const Fr = [
|
|
|
4055
4058
|
"aria-hidden": "true"
|
|
4056
4059
|
}, Vr = ["d"], Kr = ["placeholder", "disabled"], Wr = { class: "wm-compose__actions" }, Gr = ["title", "aria-label", "disabled"], Yr = ["disabled", "aria-label"];
|
|
4057
4060
|
function Jr(e, t, n, i, r, s) {
|
|
4058
|
-
return c(), u("div",
|
|
4061
|
+
return c(), u("div", Pr, [
|
|
4059
4062
|
r.recording ? (c(), u("div", jr, [
|
|
4060
4063
|
t[8] || (t[8] = o("span", {
|
|
4061
4064
|
class: "wm-rec__dot",
|
|
@@ -4067,7 +4070,7 @@ function Jr(e, t, n, i, r, s) {
|
|
|
4067
4070
|
class: "wm-rec__stop",
|
|
4068
4071
|
onClick: t[0] || (t[0] = (...a) => s.stopRecording && s.stopRecording(...a))
|
|
4069
4072
|
}, v(s.t("composer.stop")), 1)
|
|
4070
|
-
])) :
|
|
4073
|
+
])) : w("", !0),
|
|
4071
4074
|
o("form", {
|
|
4072
4075
|
class: O(["wm-compose", { "has-attach": r.attachOpen }]),
|
|
4073
4076
|
onSubmit: t[7] || (t[7] = Y((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]))
|
|
@@ -4083,9 +4086,9 @@ function Jr(e, t, n, i, r, s) {
|
|
|
4083
4086
|
key: 0,
|
|
4084
4087
|
class: "wm-compose__overlay",
|
|
4085
4088
|
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
4086
|
-
})) :
|
|
4089
|
+
})) : w("", !0),
|
|
4087
4090
|
r.attachOpen ? (c(), u("div", zr, [
|
|
4088
|
-
(c(!0), u(R, null,
|
|
4091
|
+
(c(!0), u(R, null, j(s.attachItems, (a) => (c(), u("button", {
|
|
4089
4092
|
key: a.action,
|
|
4090
4093
|
type: "button",
|
|
4091
4094
|
class: "wm-compose__menuItem",
|
|
@@ -4106,7 +4109,7 @@ function Jr(e, t, n, i, r, s) {
|
|
|
4106
4109
|
]),
|
|
4107
4110
|
o("span", null, v(a.label), 1)
|
|
4108
4111
|
], 8, Hr))), 128))
|
|
4109
|
-
])) :
|
|
4112
|
+
])) : w("", !0),
|
|
4110
4113
|
K(o("textarea", {
|
|
4111
4114
|
ref: "inputEl",
|
|
4112
4115
|
"onUpdate:modelValue": t[3] || (t[3] = (a) => r.local = a),
|
|
@@ -4166,7 +4169,7 @@ function Jr(e, t, n, i, r, s) {
|
|
|
4166
4169
|
], 34)
|
|
4167
4170
|
]);
|
|
4168
4171
|
}
|
|
4169
|
-
const Qr = /* @__PURE__ */
|
|
4172
|
+
const Qr = /* @__PURE__ */ B(Ur, [["render", Jr], ["__scopeId", "data-v-aa81dbb8"]]), Xr = {
|
|
4170
4173
|
name: "WmSuggestionChips",
|
|
4171
4174
|
props: {
|
|
4172
4175
|
items: { type: Array, default: () => [] },
|
|
@@ -4189,22 +4192,22 @@ function ei(e, t, n, i, r, s) {
|
|
|
4189
4192
|
key: s.batchKey,
|
|
4190
4193
|
class: "wm-chips"
|
|
4191
4194
|
}, [
|
|
4192
|
-
(c(!0), u(R, null,
|
|
4195
|
+
(c(!0), u(R, null, j(n.items, (a, l) => (c(), u("button", {
|
|
4193
4196
|
key: l,
|
|
4194
4197
|
type: "button",
|
|
4195
4198
|
class: "wm-chip",
|
|
4196
4199
|
style: q({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4197
4200
|
onClick: (p) => e.$emit("select", a)
|
|
4198
4201
|
}, v(a.label), 13, Zr))), 128))
|
|
4199
|
-
])) :
|
|
4202
|
+
])) : w("", !0);
|
|
4200
4203
|
}
|
|
4201
|
-
const ti = /* @__PURE__ */
|
|
4204
|
+
const ti = /* @__PURE__ */ B(Xr, [["render", ei], ["__scopeId", "data-v-47ad8085"]]), ni = {
|
|
4202
4205
|
name: "WmApprovalCard",
|
|
4203
4206
|
components: { AIAvatar: le },
|
|
4204
4207
|
inject: {
|
|
4205
4208
|
// Translator shared by the Messenger shell; French fallback when
|
|
4206
4209
|
// the component is used standalone.
|
|
4207
|
-
t: { default: () =>
|
|
4210
|
+
t: { default: () => D() }
|
|
4208
4211
|
},
|
|
4209
4212
|
props: {
|
|
4210
4213
|
action: { type: String, required: !0 },
|
|
@@ -4259,7 +4262,7 @@ function di(e, t, n, i, r, s) {
|
|
|
4259
4262
|
]),
|
|
4260
4263
|
o("div", ai, [
|
|
4261
4264
|
o("div", oi, v(n.action), 1),
|
|
4262
|
-
n.detail ? (c(), u("div", li, v(n.detail), 1)) :
|
|
4265
|
+
n.detail ? (c(), u("div", li, v(n.detail), 1)) : w("", !0)
|
|
4263
4266
|
])
|
|
4264
4267
|
]),
|
|
4265
4268
|
o("div", ci, [
|
|
@@ -4268,17 +4271,17 @@ function di(e, t, n, i, r, s) {
|
|
|
4268
4271
|
type: "button",
|
|
4269
4272
|
class: "wm-approval__btn wm-approval__btn--neutral",
|
|
4270
4273
|
onClick: t[0] || (t[0] = (l) => e.$emit("callback", s.rejectId))
|
|
4271
|
-
}, v(s.rejectLabel), 1)) :
|
|
4274
|
+
}, v(s.rejectLabel), 1)) : w("", !0),
|
|
4272
4275
|
s.approveId ? (c(), u("button", {
|
|
4273
4276
|
key: 1,
|
|
4274
4277
|
type: "button",
|
|
4275
4278
|
class: "wm-approval__btn wm-approval__btn--primary",
|
|
4276
4279
|
onClick: t[1] || (t[1] = (l) => e.$emit("callback", s.approveId))
|
|
4277
|
-
}, v(s.approveLabel), 1)) :
|
|
4280
|
+
}, v(s.approveLabel), 1)) : w("", !0)
|
|
4278
4281
|
])
|
|
4279
4282
|
]);
|
|
4280
4283
|
}
|
|
4281
|
-
const ui = /* @__PURE__ */
|
|
4284
|
+
const ui = /* @__PURE__ */ B(ni, [["render", di], ["__scopeId", "data-v-a2bed37e"]]);
|
|
4282
4285
|
let xe = 0;
|
|
4283
4286
|
const hi = /* @__PURE__ */ new Set([
|
|
4284
4287
|
"text",
|
|
@@ -4294,7 +4297,7 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4294
4297
|
inject: {
|
|
4295
4298
|
// Translator shared by the Messenger shell; French fallback when
|
|
4296
4299
|
// the component is used standalone.
|
|
4297
|
-
t: { default: () =>
|
|
4300
|
+
t: { default: () => D() }
|
|
4298
4301
|
},
|
|
4299
4302
|
props: {
|
|
4300
4303
|
form: { type: Object, required: !0 },
|
|
@@ -4398,7 +4401,7 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4398
4401
|
key: 2,
|
|
4399
4402
|
class: "wm-form__doneLbl"
|
|
4400
4403
|
};
|
|
4401
|
-
function
|
|
4404
|
+
function Ui(e, t, n, i, r, s) {
|
|
4402
4405
|
const a = E("AIAvatar");
|
|
4403
4406
|
return c(), u("div", fi, [
|
|
4404
4407
|
o("div", gi, [
|
|
@@ -4411,14 +4414,14 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4411
4414
|
]),
|
|
4412
4415
|
o("div", pi, [
|
|
4413
4416
|
o("div", vi, v(n.form.title || s.t("form.title")), 1),
|
|
4414
|
-
n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) :
|
|
4417
|
+
n.form.description ? (c(), u("div", yi, v(n.form.description), 1)) : w("", !0)
|
|
4415
4418
|
])
|
|
4416
4419
|
]),
|
|
4417
4420
|
o("form", {
|
|
4418
4421
|
class: "wm-form__body",
|
|
4419
4422
|
onSubmit: t[0] || (t[0] = Y((...l) => s.onSubmit && s.onSubmit(...l), ["prevent"]))
|
|
4420
4423
|
}, [
|
|
4421
|
-
(c(!0), u(R, null,
|
|
4424
|
+
(c(!0), u(R, null, j(s.normalizedFields, (l) => (c(), u("div", {
|
|
4422
4425
|
key: l.key,
|
|
4423
4426
|
class: "wm-form__field"
|
|
4424
4427
|
}, [
|
|
@@ -4427,7 +4430,7 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4427
4430
|
class: "wm-form__label"
|
|
4428
4431
|
}, [
|
|
4429
4432
|
pe(v(l.label), 1),
|
|
4430
|
-
l.required ? (c(), u("span", bi, "*")) :
|
|
4433
|
+
l.required ? (c(), u("span", bi, "*")) : w("", !0)
|
|
4431
4434
|
], 8, wi),
|
|
4432
4435
|
l.type === "text" ? K((c(), u("input", {
|
|
4433
4436
|
key: 0,
|
|
@@ -4496,14 +4499,14 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4496
4499
|
disabled: n.readOnly || r.busy
|
|
4497
4500
|
}, [
|
|
4498
4501
|
o("option", Oi, v(l.placeholder || s.t("form.choose")), 1),
|
|
4499
|
-
(c(!0), u(R, null,
|
|
4502
|
+
(c(!0), u(R, null, j(l.options, (p) => (c(), u("option", {
|
|
4500
4503
|
key: p.value,
|
|
4501
4504
|
value: p.value
|
|
4502
4505
|
}, v(p.label), 9, Li))), 128))
|
|
4503
4506
|
], 8, xi)), [
|
|
4504
4507
|
[He, r.values[l.key]]
|
|
4505
4508
|
]) : l.type === "multiselect" ? (c(), u("div", Ii, [
|
|
4506
|
-
(c(!0), u(R, null,
|
|
4509
|
+
(c(!0), u(R, null, j(l.options, (p) => (c(), u("label", {
|
|
4507
4510
|
key: p.value,
|
|
4508
4511
|
class: "wm-form__multiItem"
|
|
4509
4512
|
}, [
|
|
@@ -4520,27 +4523,27 @@ function Pi(e, t, n, i, r, s) {
|
|
|
4520
4523
|
}, null, 40, Ri),
|
|
4521
4524
|
o("span", null, v(p.label), 1)
|
|
4522
4525
|
]))), 128))
|
|
4523
|
-
])) :
|
|
4526
|
+
])) : w("", !0)
|
|
4524
4527
|
]))), 128)),
|
|
4525
|
-
r.error ? (c(), u("div", Ei, v(r.error), 1)) :
|
|
4528
|
+
r.error ? (c(), u("div", Ei, v(r.error), 1)) : w("", !0),
|
|
4526
4529
|
n.readOnly ? (c(), u("div", Fi, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4527
4530
|
key: 1,
|
|
4528
4531
|
type: "submit",
|
|
4529
4532
|
class: "wm-form__submit",
|
|
4530
4533
|
disabled: r.busy
|
|
4531
4534
|
}, [
|
|
4532
|
-
r.busy ? (c(), u("span", Ni)) :
|
|
4535
|
+
r.busy ? (c(), u("span", Ni)) : w("", !0),
|
|
4533
4536
|
o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4534
4537
|
], 8, Bi))
|
|
4535
4538
|
], 32)
|
|
4536
4539
|
]);
|
|
4537
4540
|
}
|
|
4538
|
-
const
|
|
4541
|
+
const Pi = /* @__PURE__ */ B(mi, [["render", Ui], ["__scopeId", "data-v-fe65cc56"]]), ji = {
|
|
4539
4542
|
name: "WmFeedback",
|
|
4540
4543
|
inject: {
|
|
4541
4544
|
// Translator shared by the Messenger shell; French fallback when
|
|
4542
4545
|
// the component is used standalone.
|
|
4543
|
-
t: { default: () =>
|
|
4546
|
+
t: { default: () => D() }
|
|
4544
4547
|
},
|
|
4545
4548
|
props: {
|
|
4546
4549
|
busy: { type: Boolean, default: !1 },
|
|
@@ -4597,7 +4600,7 @@ function Qi(e, t, n, i, r, s) {
|
|
|
4597
4600
|
o("div", zi, v(s.t("feedback.question")), 1),
|
|
4598
4601
|
o("div", Hi, v(s.t("feedback.subtitle")), 1),
|
|
4599
4602
|
o("div", qi, [
|
|
4600
|
-
(c(!0), u(R, null,
|
|
4603
|
+
(c(!0), u(R, null, j(s.options, (a) => (c(), u("button", {
|
|
4601
4604
|
key: a.v,
|
|
4602
4605
|
type: "button",
|
|
4603
4606
|
class: O(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
|
|
@@ -4616,12 +4619,12 @@ function Qi(e, t, n, i, r, s) {
|
|
|
4616
4619
|
], 64))
|
|
4617
4620
|
]);
|
|
4618
4621
|
}
|
|
4619
|
-
const Xi = /* @__PURE__ */
|
|
4622
|
+
const Xi = /* @__PURE__ */ B(ji, [["render", Qi], ["__scopeId", "data-v-9b630564"]]), Zi = {
|
|
4620
4623
|
name: "WmMoreMenu",
|
|
4621
4624
|
inject: {
|
|
4622
4625
|
// Translator shared by the Messenger shell; French fallback when
|
|
4623
4626
|
// the component is used standalone.
|
|
4624
|
-
t: { default: () =>
|
|
4627
|
+
t: { default: () => D() }
|
|
4625
4628
|
},
|
|
4626
4629
|
props: {
|
|
4627
4630
|
canRename: { type: Boolean, default: !0 },
|
|
@@ -4700,7 +4703,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4700
4703
|
])
|
|
4701
4704
|
], -1)),
|
|
4702
4705
|
o("span", sa, v(s.t("moreMenu.editTitle")), 1)
|
|
4703
|
-
])) :
|
|
4706
|
+
])) : w("", !0),
|
|
4704
4707
|
n.canExport ? (c(), u("button", {
|
|
4705
4708
|
key: 1,
|
|
4706
4709
|
type: "button",
|
|
@@ -4724,9 +4727,9 @@ function ha(e, t, n, i, r, s) {
|
|
|
4724
4727
|
], -1)),
|
|
4725
4728
|
o("span", ra, v(s.t("moreMenu.exportTranscript")), 1),
|
|
4726
4729
|
t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
4727
|
-
])) :
|
|
4728
|
-
])) :
|
|
4729
|
-
n.canRename || n.canExport ? (c(), u("div", ia)) :
|
|
4730
|
+
])) : w("", !0)
|
|
4731
|
+
])) : w("", !0),
|
|
4732
|
+
n.canRename || n.canExport ? (c(), u("div", ia)) : w("", !0),
|
|
4730
4733
|
o("div", aa, [
|
|
4731
4734
|
o("button", {
|
|
4732
4735
|
type: "button",
|
|
@@ -4808,7 +4811,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4808
4811
|
])
|
|
4809
4812
|
], -1)),
|
|
4810
4813
|
o("span", da, v(s.t("moreMenu.serviceStatus")), 1)
|
|
4811
|
-
])) :
|
|
4814
|
+
])) : w("", !0),
|
|
4812
4815
|
n.helpUrl ? (c(), u("button", {
|
|
4813
4816
|
key: 1,
|
|
4814
4817
|
type: "button",
|
|
@@ -4831,17 +4834,17 @@ function ha(e, t, n, i, r, s) {
|
|
|
4831
4834
|
])
|
|
4832
4835
|
], -1)),
|
|
4833
4836
|
o("span", ua, v(s.t("moreMenu.helpCenter")), 1)
|
|
4834
|
-
])) :
|
|
4837
|
+
])) : w("", !0)
|
|
4835
4838
|
])
|
|
4836
4839
|
])
|
|
4837
4840
|
]);
|
|
4838
4841
|
}
|
|
4839
|
-
const ma = /* @__PURE__ */
|
|
4842
|
+
const ma = /* @__PURE__ */ B(Zi, [["render", ha], ["__scopeId", "data-v-76281e95"]]), fa = {
|
|
4840
4843
|
name: "WmRenameDialog",
|
|
4841
4844
|
inject: {
|
|
4842
4845
|
// Translator shared by the Messenger shell; French fallback when
|
|
4843
4846
|
// the component is used standalone.
|
|
4844
|
-
t: { default: () =>
|
|
4847
|
+
t: { default: () => D() }
|
|
4845
4848
|
},
|
|
4846
4849
|
props: {
|
|
4847
4850
|
// Empty defaults: the resolved fallback comes from the translator
|
|
@@ -4945,7 +4948,7 @@ function Aa(e, t, n, i, r, s) {
|
|
|
4945
4948
|
])
|
|
4946
4949
|
]);
|
|
4947
4950
|
}
|
|
4948
|
-
const Sa = /* @__PURE__ */
|
|
4951
|
+
const Sa = /* @__PURE__ */ B(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8"]]), Oe = "ww-messenger-tokens", Ma = {
|
|
4949
4952
|
name: "Messenger",
|
|
4950
4953
|
components: {
|
|
4951
4954
|
Launcher: Ft,
|
|
@@ -4955,7 +4958,7 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
4955
4958
|
Composer: Qr,
|
|
4956
4959
|
SuggestionChips: ti,
|
|
4957
4960
|
ApprovalCard: ui,
|
|
4958
|
-
FormCard:
|
|
4961
|
+
FormCard: Pi,
|
|
4959
4962
|
Feedback: Xi,
|
|
4960
4963
|
MoreMenu: ma,
|
|
4961
4964
|
RenameDialog: Sa
|
|
@@ -5068,6 +5071,11 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5068
5071
|
// { customer: { name?, email?, ...named variables } }. Push au
|
|
5069
5072
|
// serveur via PATCH /customers/me au boot.
|
|
5070
5073
|
parentContext: null,
|
|
5074
|
+
// Déclaration du marchand : `true` = site qui accepte des
|
|
5075
|
+
// visiteurs (lazy boot toujours), `false` = app fermée (eager
|
|
5076
|
+
// boot autorisé si marker cookie valide). Doit matcher
|
|
5077
|
+
// `widgets.allow_unauthenticated` côté serveur.
|
|
5078
|
+
parentAllowUnauthenticated: !1,
|
|
5071
5079
|
parentInitReceived: !1,
|
|
5072
5080
|
parentInitDeferred: null
|
|
5073
5081
|
};
|
|
@@ -5104,7 +5112,7 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5104
5112
|
// `locale` changes. `t()` below (and the provided closure) delegate
|
|
5105
5113
|
// to it so every string resolves against the current language.
|
|
5106
5114
|
translator() {
|
|
5107
|
-
return
|
|
5115
|
+
return D(this.locale);
|
|
5108
5116
|
},
|
|
5109
5117
|
error() {
|
|
5110
5118
|
var e;
|
|
@@ -5138,8 +5146,8 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5138
5146
|
var k;
|
|
5139
5147
|
const r = e[i.id] || [], s = J(i.last_read_message_id);
|
|
5140
5148
|
let a = 0, l = null;
|
|
5141
|
-
for (let
|
|
5142
|
-
const T = r[
|
|
5149
|
+
for (let b = r.length - 1; b >= 0; b--) {
|
|
5150
|
+
const T = r[b];
|
|
5143
5151
|
if (!T) continue;
|
|
5144
5152
|
if (((k = T.author) == null ? void 0 : k.type) === "user") break;
|
|
5145
5153
|
const I = J(T.id);
|
|
@@ -5149,7 +5157,7 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5149
5157
|
}
|
|
5150
5158
|
}
|
|
5151
5159
|
const p = r.filter(
|
|
5152
|
-
(
|
|
5160
|
+
(b) => !((b == null ? void 0 : b.id) != null && t[b.id] === 0)
|
|
5153
5161
|
);
|
|
5154
5162
|
return {
|
|
5155
5163
|
...i,
|
|
@@ -5377,7 +5385,7 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5377
5385
|
const t = (p = (l = (a = this.pendingApproval) == null ? void 0 : a.payload) == null ? void 0 : l.pending) == null ? void 0 : p.prepared_params;
|
|
5378
5386
|
if (!t || typeof t != "object") return "";
|
|
5379
5387
|
const n = Object.entries(t);
|
|
5380
|
-
return n.length ? n.slice(0, 2).map(([k,
|
|
5388
|
+
return n.length ? n.slice(0, 2).map(([k, b]) => `${k}: ${b}`).join(" · ") : "";
|
|
5381
5389
|
},
|
|
5382
5390
|
actionInFlight() {
|
|
5383
5391
|
var e, t;
|
|
@@ -5561,7 +5569,19 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5561
5569
|
onParentMessage(e) {
|
|
5562
5570
|
var n;
|
|
5563
5571
|
const t = e == null ? void 0 : e.data;
|
|
5564
|
-
!t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve())
|
|
5572
|
+
!t || typeof t != "object" || t.type !== "INIT" || (this.parentOrigin = e.origin, this.parentToken = typeof t.token == "string" ? t.token : "", this.parentContext = t.context && typeof t.context == "object" ? t.context : null, this.parentAllowUnauthenticated = t.allowUnauthenticated === !0, this.parentInitReceived = !0, (n = this.parentInitDeferred) != null && n._resolve && this.parentInitDeferred._resolve(), !this.isEmbedded && !this.isOpen && !this.parentAllowUnauthenticated && this.hasValidSessionMarker() && this.boot().catch((i) => {
|
|
5573
|
+
console.warn("[messenger] eager boot failed", i);
|
|
5574
|
+
}));
|
|
5575
|
+
},
|
|
5576
|
+
// Cherche le marker cookie `messenger_session_marker` (non-httpOnly,
|
|
5577
|
+
// posé par /session côté serveur pour les linked uniquement). Valeur
|
|
5578
|
+
// = timestamp ms epoch de l'expiration de la session.
|
|
5579
|
+
hasValidSessionMarker() {
|
|
5580
|
+
if (typeof document > "u") return !1;
|
|
5581
|
+
const t = (document.cookie || "").match(/(?:^|; )messenger_session_marker=([^;]+)/);
|
|
5582
|
+
if (!t) return !1;
|
|
5583
|
+
const n = parseInt(t[1], 10);
|
|
5584
|
+
return Number.isFinite(n) ? n > Date.now() : !1;
|
|
5565
5585
|
},
|
|
5566
5586
|
async boot() {
|
|
5567
5587
|
var e, t;
|
|
@@ -5579,7 +5599,8 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5579
5599
|
const n = ((e = this.parentContext) == null ? void 0 : e.customer) || ((t = this.context) == null ? void 0 : t.customer);
|
|
5580
5600
|
n && typeof n == "object" && await this.store.applyCustomer(n), await this.store.start({
|
|
5581
5601
|
origin: this.parentOrigin,
|
|
5582
|
-
token: this.parentToken || void 0
|
|
5602
|
+
token: this.parentToken || void 0,
|
|
5603
|
+
allowUnauthenticated: this.parentAllowUnauthenticated
|
|
5583
5604
|
}), this.setupLiveReveal();
|
|
5584
5605
|
} catch (n) {
|
|
5585
5606
|
console.error("[ww-messenger] bootstrap failed", n), this.bootError = (n == null ? void 0 : n.message) || String(n);
|
|
@@ -5662,21 +5683,21 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5662
5683
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
5663
5684
|
},
|
|
5664
5685
|
sendCurrentLauncherSize() {
|
|
5665
|
-
var
|
|
5686
|
+
var T, I, A, z, M, F, N;
|
|
5666
5687
|
if (this.isOpen) return;
|
|
5667
|
-
const e = (
|
|
5688
|
+
const e = (I = (T = this.$el) == null ? void 0 : T.querySelector) == null ? void 0 : I.call(T, ".wm-launcherWrap");
|
|
5668
5689
|
if (!e) return;
|
|
5669
5690
|
const t = e.getBoundingClientRect();
|
|
5670
5691
|
if (!t.width || !t.height) return;
|
|
5671
|
-
const n = (((
|
|
5672
|
-
let
|
|
5673
|
-
if (
|
|
5674
|
-
const
|
|
5675
|
-
|
|
5676
|
-
width: Math.ceil(
|
|
5677
|
-
height: Math.ceil(
|
|
5678
|
-
rightOffset: Math.max(0, Math.ceil(t.right -
|
|
5679
|
-
bottomOffset: Math.max(0, Math.ceil(t.bottom -
|
|
5692
|
+
const n = (((A = this.launcherPeeks) == null ? void 0 : A.length) ?? 0) > 0, i = this.launcherHovered ? 28 : 16, r = Math.ceil(t.width), s = Math.ceil(t.height), a = (M = (z = this.$el) == null ? void 0 : z.querySelector) == null ? void 0 : M.call(z, ".wm-launcher"), l = a == null ? void 0 : a.getBoundingClientRect(), p = (N = (F = this.$el) == null ? void 0 : F.querySelectorAll) == null ? void 0 : N.call(F, ".wm-peek"), k = p && p.length ? p[p.length - 1] : null;
|
|
5693
|
+
let b = null;
|
|
5694
|
+
if (k) {
|
|
5695
|
+
const P = k.getBoundingClientRect();
|
|
5696
|
+
b = {
|
|
5697
|
+
width: Math.ceil(P.width),
|
|
5698
|
+
height: Math.ceil(P.height),
|
|
5699
|
+
rightOffset: Math.max(0, Math.ceil(t.right - P.right)),
|
|
5700
|
+
bottomOffset: Math.max(0, Math.ceil(t.bottom - P.bottom))
|
|
5680
5701
|
};
|
|
5681
5702
|
}
|
|
5682
5703
|
this.notifyParentResize("closed", {
|
|
@@ -5685,7 +5706,7 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5685
5706
|
launcherWidth: l ? Math.ceil(l.width) : null,
|
|
5686
5707
|
launcherHeight: l ? Math.ceil(l.height) : null,
|
|
5687
5708
|
launcherHovered: this.launcherHovered,
|
|
5688
|
-
peek:
|
|
5709
|
+
peek: b,
|
|
5689
5710
|
peekHovered: this.launcherHovered && n
|
|
5690
5711
|
});
|
|
5691
5712
|
},
|
|
@@ -5916,23 +5937,23 @@ const Sa = /* @__PURE__ */ N(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5916
5937
|
class: "wm-actionWait",
|
|
5917
5938
|
role: "status",
|
|
5918
5939
|
"aria-live": "polite"
|
|
5919
|
-
}, Fa = { class: "wm-actionWait__lbl" },
|
|
5940
|
+
}, Fa = { class: "wm-actionWait__lbl" }, Ua = {
|
|
5920
5941
|
key: 2,
|
|
5921
5942
|
class: "wm-attached"
|
|
5922
|
-
},
|
|
5943
|
+
}, Pa = ["aria-label", "onClick"];
|
|
5923
5944
|
function ja(e, t, n, i, r, s) {
|
|
5924
|
-
const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), k = E("MessageList"),
|
|
5945
|
+
const a = E("Launcher"), l = E("Header"), p = E("Onboarding"), k = E("MessageList"), b = E("ApprovalCard"), T = E("FormCard"), I = E("Feedback"), A = E("SuggestionChips"), z = E("Composer"), M = E("MoreMenu"), F = E("RenameDialog");
|
|
5925
5946
|
return c(), u("div", {
|
|
5926
5947
|
class: O(["wm-root", `wm-root--${n.displayMode}`])
|
|
5927
5948
|
}, [
|
|
5928
|
-
!r.isOpen && !s.isEmbedded ? (c(),
|
|
5949
|
+
!r.isOpen && !s.isEmbedded ? (c(), U(a, {
|
|
5929
5950
|
key: 0,
|
|
5930
5951
|
"unread-count": s.unreadCount,
|
|
5931
5952
|
peeks: s.launcherPeeks,
|
|
5932
5953
|
onOpen: s.openFromPeek,
|
|
5933
5954
|
onDismiss: s.dismissPeek,
|
|
5934
5955
|
onHover: s.onLauncherHover
|
|
5935
|
-
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) :
|
|
5956
|
+
}, null, 8, ["unread-count", "peeks", "onOpen", "onDismiss", "onHover"])) : w("", !0),
|
|
5936
5957
|
r.isOpen || s.isEmbedded ? (c(), u("section", {
|
|
5937
5958
|
key: 1,
|
|
5938
5959
|
class: O([
|
|
@@ -5945,12 +5966,12 @@ function ja(e, t, n, i, r, s) {
|
|
|
5945
5966
|
"aria-label": "Messenger"
|
|
5946
5967
|
}, [
|
|
5947
5968
|
!s.ready && !s.error ? (c(), u("div", Ta, [
|
|
5948
|
-
s.isEmbedded ?
|
|
5969
|
+
s.isEmbedded ? w("", !0) : (c(), u("button", {
|
|
5949
5970
|
key: 0,
|
|
5950
5971
|
type: "button",
|
|
5951
5972
|
class: "wm-loading__close",
|
|
5952
5973
|
"aria-label": s.t("loading.minimize"),
|
|
5953
|
-
onClick: t[0] || (t[0] = (...
|
|
5974
|
+
onClick: t[0] || (t[0] = (...N) => s.close && s.close(...N))
|
|
5954
5975
|
}, [...t[5] || (t[5] = [
|
|
5955
5976
|
o("svg", {
|
|
5956
5977
|
width: "13",
|
|
@@ -6024,7 +6045,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6024
6045
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "ai-agent-name", "ai-agent-avatar-url", "onLoadMore"]),
|
|
6025
6046
|
o("div", Ea, [
|
|
6026
6047
|
s.floatVisible ? (c(), u("div", Ba, [
|
|
6027
|
-
s.approvalReady ? (c(),
|
|
6048
|
+
s.approvalReady ? (c(), U(b, {
|
|
6028
6049
|
key: 0,
|
|
6029
6050
|
action: s.approvalTitle,
|
|
6030
6051
|
detail: s.approvalDetail,
|
|
@@ -6032,23 +6053,23 @@ function ja(e, t, n, i, r, s) {
|
|
|
6032
6053
|
"agent-name": s.agentName,
|
|
6033
6054
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6034
6055
|
onCallback: s.onApprovalCallback
|
|
6035
|
-
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(),
|
|
6056
|
+
}, null, 8, ["action", "detail", "callbacks", "agent-name", "agent-avatar-url", "onCallback"])) : s.pendingForm ? (c(), U(T, {
|
|
6036
6057
|
key: s.pendingForm.message && s.pendingForm.message.id,
|
|
6037
6058
|
form: s.pendingForm.form,
|
|
6038
6059
|
"agent-name": s.agentName,
|
|
6039
6060
|
"agent-avatar-url": s.agentAvatarUrl,
|
|
6040
6061
|
onSubmit: s.onFormSubmit
|
|
6041
|
-
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(),
|
|
6062
|
+
}, null, 8, ["form", "agent-name", "agent-avatar-url", "onSubmit"])) : s.showFeedback ? (c(), U(I, {
|
|
6042
6063
|
key: 2,
|
|
6043
6064
|
busy: r.feedbackBusy,
|
|
6044
6065
|
done: r.feedbackDone,
|
|
6045
6066
|
onSubmit: s.onFeedback
|
|
6046
|
-
}, null, 8, ["busy", "done", "onSubmit"])) : (c(),
|
|
6067
|
+
}, null, 8, ["busy", "done", "onSubmit"])) : (c(), U(A, {
|
|
6047
6068
|
key: 3,
|
|
6048
6069
|
items: s.suggestions,
|
|
6049
6070
|
onSelect: s.onSuggestion
|
|
6050
6071
|
}, null, 8, ["items", "onSelect"]))
|
|
6051
|
-
], 512)) :
|
|
6072
|
+
], 512)) : w("", !0),
|
|
6052
6073
|
s.actionInFlight ? (c(), u("div", Na, [
|
|
6053
6074
|
t[8] || (t[8] = o("span", {
|
|
6054
6075
|
class: "wm-actionWait__spinner",
|
|
@@ -6057,11 +6078,11 @@ function ja(e, t, n, i, r, s) {
|
|
|
6057
6078
|
o("span", Fa, v(s.t("action.inProgress", {
|
|
6058
6079
|
name: s.actionInFlightName
|
|
6059
6080
|
})), 1)
|
|
6060
|
-
])) : (c(),
|
|
6081
|
+
])) : (c(), U(z, {
|
|
6061
6082
|
key: 2,
|
|
6062
6083
|
ref: "composer",
|
|
6063
6084
|
modelValue: r.draft,
|
|
6064
|
-
"onUpdate:modelValue": t[1] || (t[1] = (
|
|
6085
|
+
"onUpdate:modelValue": t[1] || (t[1] = (N) => r.draft = N),
|
|
6065
6086
|
placeholder: s.composerPlaceholder,
|
|
6066
6087
|
disabled: !!s.pendingApproval,
|
|
6067
6088
|
"attach-label": s.t("composer.attachFile"),
|
|
@@ -6069,7 +6090,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6069
6090
|
onAttach: s.onAttach
|
|
6070
6091
|
}, null, 8, ["modelValue", "placeholder", "disabled", "attach-label", "onSend", "onAttach"]))
|
|
6071
6092
|
]),
|
|
6072
|
-
r.moreOpen ? (c(),
|
|
6093
|
+
r.moreOpen ? (c(), U(M, {
|
|
6073
6094
|
key: 0,
|
|
6074
6095
|
"can-rename": !!s.currentConv && !s.currentConv._draft,
|
|
6075
6096
|
"can-export": !!s.currentConv && !s.currentConv._draft,
|
|
@@ -6077,21 +6098,21 @@ function ja(e, t, n, i, r, s) {
|
|
|
6077
6098
|
"browser-notif-enabled": e.browserNotifEnabled,
|
|
6078
6099
|
"status-url": s.statusUrl,
|
|
6079
6100
|
"help-url": s.helpUrl,
|
|
6080
|
-
onClose: t[2] || (t[2] = (
|
|
6101
|
+
onClose: t[2] || (t[2] = (N) => r.moreOpen = !1),
|
|
6081
6102
|
onSoundToggle: e.onSoundToggle,
|
|
6082
6103
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6083
6104
|
onAction: s.onMoreAction
|
|
6084
|
-
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) :
|
|
6085
|
-
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), F
|
|
6105
|
+
}, null, 8, ["can-rename", "can-export", "sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0),
|
|
6106
|
+
r.renameDialogOpen && s.currentConv && !s.currentConv._draft ? (c(), U(F, {
|
|
6086
6107
|
key: 1,
|
|
6087
6108
|
"initial-value": s.currentConv.name || "",
|
|
6088
6109
|
title: s.t("rename.dialogTitle"),
|
|
6089
|
-
onClose: t[3] || (t[3] = (
|
|
6110
|
+
onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
|
|
6090
6111
|
onSubmit: s.onRenameSubmit
|
|
6091
|
-
}, null, 8, ["initial-value", "title", "onSubmit"])) :
|
|
6092
|
-
r.pendingAttachments.length ? (c(), u("div",
|
|
6093
|
-
(c(!0), u(R, null,
|
|
6094
|
-
key:
|
|
6112
|
+
}, null, 8, ["initial-value", "title", "onSubmit"])) : w("", !0),
|
|
6113
|
+
r.pendingAttachments.length ? (c(), u("div", Ua, [
|
|
6114
|
+
(c(!0), u(R, null, j(r.pendingAttachments, (N, P) => (c(), u("div", {
|
|
6115
|
+
key: P,
|
|
6095
6116
|
class: "wm-attached__chip"
|
|
6096
6117
|
}, [
|
|
6097
6118
|
t[10] || (t[10] = o("svg", {
|
|
@@ -6107,11 +6128,11 @@ function ja(e, t, n, i, r, s) {
|
|
|
6107
6128
|
}, [
|
|
6108
6129
|
o("path", { d: "M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48" })
|
|
6109
6130
|
], -1)),
|
|
6110
|
-
o("span", null, v(
|
|
6131
|
+
o("span", null, v(N.name), 1),
|
|
6111
6132
|
o("button", {
|
|
6112
6133
|
type: "button",
|
|
6113
6134
|
"aria-label": s.t("attachment.remove"),
|
|
6114
|
-
onClick: (W) => r.pendingAttachments.splice(
|
|
6135
|
+
onClick: (W) => r.pendingAttachments.splice(P, 1)
|
|
6115
6136
|
}, [...t[9] || (t[9] = [
|
|
6116
6137
|
o("svg", {
|
|
6117
6138
|
width: "10",
|
|
@@ -6126,10 +6147,10 @@ function ja(e, t, n, i, r, s) {
|
|
|
6126
6147
|
}, [
|
|
6127
6148
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
6128
6149
|
], -1)
|
|
6129
|
-
])], 8,
|
|
6150
|
+
])], 8, Pa)
|
|
6130
6151
|
]))), 128))
|
|
6131
|
-
])) :
|
|
6132
|
-
], 64)) : (c(),
|
|
6152
|
+
])) : w("", !0)
|
|
6153
|
+
], 64)) : (c(), U(p, {
|
|
6133
6154
|
key: 1,
|
|
6134
6155
|
"welcome-message": s.widgetWelcomeMessage,
|
|
6135
6156
|
subtitle: s.widgetSubtitle,
|
|
@@ -6142,7 +6163,7 @@ function ja(e, t, n, i, r, s) {
|
|
|
6142
6163
|
onSelect: s.onQuickLink,
|
|
6143
6164
|
onResume: s.onDrawerPick
|
|
6144
6165
|
}, null, 8, ["welcome-message", "subtitle", "agent-name", "default-icon-url", "quick-links", "open-threads", "busy", "onStart", "onSelect", "onResume"])),
|
|
6145
|
-
r.moreOpen && !s.currentConv ? (c(),
|
|
6166
|
+
r.moreOpen && !s.currentConv ? (c(), U(M, {
|
|
6146
6167
|
key: 3,
|
|
6147
6168
|
"can-rename": !1,
|
|
6148
6169
|
"can-export": !1,
|
|
@@ -6150,16 +6171,16 @@ function ja(e, t, n, i, r, s) {
|
|
|
6150
6171
|
"browser-notif-enabled": e.browserNotifEnabled,
|
|
6151
6172
|
"status-url": s.statusUrl,
|
|
6152
6173
|
"help-url": s.helpUrl,
|
|
6153
|
-
onClose: t[4] || (t[4] = (
|
|
6174
|
+
onClose: t[4] || (t[4] = (N) => r.moreOpen = !1),
|
|
6154
6175
|
onSoundToggle: e.onSoundToggle,
|
|
6155
6176
|
onBrowserNotifToggle: e.onBrowserNotifToggle,
|
|
6156
6177
|
onAction: s.onMoreAction
|
|
6157
|
-
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) :
|
|
6178
|
+
}, null, 8, ["sound-enabled", "browser-notif-enabled", "status-url", "help-url", "onSoundToggle", "onBrowserNotifToggle", "onAction"])) : w("", !0)
|
|
6158
6179
|
], 64))
|
|
6159
|
-
], 6)) :
|
|
6180
|
+
], 6)) : w("", !0)
|
|
6160
6181
|
], 2);
|
|
6161
6182
|
}
|
|
6162
|
-
const Ha = /* @__PURE__ */
|
|
6183
|
+
const Ha = /* @__PURE__ */ B(Ma, [["render", ja], ["__scopeId", "data-v-015ad802"]]), qa = "0.5.17";
|
|
6163
6184
|
export {
|
|
6164
6185
|
le as AIAvatar,
|
|
6165
6186
|
ge as AVATAR_COLORS,
|
|
@@ -6168,14 +6189,14 @@ export {
|
|
|
6168
6189
|
ds as ArtifactFormResponse,
|
|
6169
6190
|
Cs as ArtifactInfoCard,
|
|
6170
6191
|
Hs as ArtifactRenderer,
|
|
6171
|
-
|
|
6192
|
+
Ps as ArtifactTicket,
|
|
6172
6193
|
er as AttachmentPreview,
|
|
6173
6194
|
rr as Bubble,
|
|
6174
6195
|
Qr as Composer,
|
|
6175
6196
|
Ze as DEFAULT_BASE_URL,
|
|
6176
6197
|
ie as DEFAULT_LANGUAGE,
|
|
6177
6198
|
Xi as Feedback,
|
|
6178
|
-
|
|
6199
|
+
Pi as FormCard,
|
|
6179
6200
|
ln as Header,
|
|
6180
6201
|
Re as HumanAvatar,
|
|
6181
6202
|
Ft as Launcher,
|
|
@@ -6193,9 +6214,9 @@ export {
|
|
|
6193
6214
|
ve as avatarColor,
|
|
6194
6215
|
ye as avatarInitials,
|
|
6195
6216
|
Er as captureScreenshotFile,
|
|
6196
|
-
|
|
6217
|
+
H as colors,
|
|
6197
6218
|
Qe as createStore,
|
|
6198
|
-
|
|
6219
|
+
D as createTranslator,
|
|
6199
6220
|
We as createTransport,
|
|
6200
6221
|
oe as dateLocale,
|
|
6201
6222
|
Ha as default,
|