@_solaris/messenger-widget 0.4.2 → 0.4.3
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 +8 -8
- package/dist/messenger.embed.js +14 -14
- package/dist/messenger.js +296 -278
- 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
|
|
1
|
+
import { reactive as Fe, openBlock as c, createElementBlock as u, normalizeStyle as K, normalizeClass as x, toDisplayString as v, resolveComponent as I, createVNode as z, Transition as je, withCtx as Pe, Fragment as L, renderList as j, withKeys as ue, withModifiers as X, createElementVNode as o, createCommentVNode as b, createBlock as R, withDirectives as V, vModelText as ee, createTextVNode as pe, resolveDynamicComponent as De, renderSlot as Ue, vModelCheckbox as $e, vModelSelect as He, markRaw as ye } from "vue";
|
|
2
2
|
const ze = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -6,8 +6,8 @@ const ze = [
|
|
|
6
6
|
"conversation_updated",
|
|
7
7
|
"config_updated",
|
|
8
8
|
"action_status"
|
|
9
|
-
], be = "/client", qe = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3,
|
|
10
|
-
function
|
|
9
|
+
], be = "/client", qe = 5 * 60 * 1e3, Ve = 10 * 60 * 1e3, Ke = 5 * 60 * 1e3;
|
|
10
|
+
function We(e) {
|
|
11
11
|
const t = {
|
|
12
12
|
baseUrl: Ge(e.baseUrl || ""),
|
|
13
13
|
widgetId: e.widgetId || "",
|
|
@@ -166,7 +166,7 @@ function Ke(e) {
|
|
|
166
166
|
_ ? { inputs: _ } : {}
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
|
-
async function
|
|
169
|
+
async function W(d) {
|
|
170
170
|
const f = (
|
|
171
171
|
/** @type {File} */
|
|
172
172
|
d.name || "attachment"
|
|
@@ -191,13 +191,13 @@ function Ke(e) {
|
|
|
191
191
|
size_bytes: y
|
|
192
192
|
};
|
|
193
193
|
}
|
|
194
|
-
async function
|
|
194
|
+
async function te(d) {
|
|
195
195
|
return a(
|
|
196
196
|
"GET",
|
|
197
197
|
`/attachments/sign?path=${encodeURIComponent(d)}`
|
|
198
198
|
);
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function ne() {
|
|
201
201
|
const d = new URLSearchParams({
|
|
202
202
|
userId: t.userId,
|
|
203
203
|
userHash: t.userHash,
|
|
@@ -208,7 +208,7 @@ function Ke(e) {
|
|
|
208
208
|
function G() {
|
|
209
209
|
if (!t.eventSource && !(typeof document < "u" && document.hidden))
|
|
210
210
|
try {
|
|
211
|
-
const d = new EventSource(
|
|
211
|
+
const d = new EventSource(ne());
|
|
212
212
|
for (const f of ze)
|
|
213
213
|
d.addEventListener(f, (_) => Y(f, _.data));
|
|
214
214
|
d.addEventListener(
|
|
@@ -250,16 +250,16 @@ function Ke(e) {
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
function de() {
|
|
253
|
-
|
|
253
|
+
se(), !(typeof document < "u" && document.hidden) && (t.pollTimer = setInterval(ce, qe));
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function se() {
|
|
256
256
|
t.pollTimer && (clearInterval(t.pollTimer), t.pollTimer = null);
|
|
257
257
|
}
|
|
258
258
|
function h() {
|
|
259
259
|
if (document.hidden)
|
|
260
260
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = setTimeout(() => {
|
|
261
|
-
t.hiddenGraceTimer = null, document.hidden && (
|
|
262
|
-
},
|
|
261
|
+
t.hiddenGraceTimer = null, document.hidden && (se(), Q(), r("paused"));
|
|
262
|
+
}, Ke);
|
|
263
263
|
else {
|
|
264
264
|
if (t.hiddenGraceTimer) {
|
|
265
265
|
clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null;
|
|
@@ -288,7 +288,7 @@ function Ke(e) {
|
|
|
288
288
|
)), de(), d;
|
|
289
289
|
}
|
|
290
290
|
function p() {
|
|
291
|
-
|
|
291
|
+
se(), clearTimeout(t.burstTimer), clearTimeout(t.hiddenGraceTimer), t.hiddenGraceTimer = null, Q(), t.visibilityHandler && (document.removeEventListener(
|
|
292
292
|
"visibilitychange",
|
|
293
293
|
t.visibilityHandler
|
|
294
294
|
), t.visibilityHandler = null), t.started = !1;
|
|
@@ -310,8 +310,8 @@ function Ke(e) {
|
|
|
310
310
|
listMessages: D,
|
|
311
311
|
postMessage: N,
|
|
312
312
|
postCallback: $,
|
|
313
|
-
uploadAttachment:
|
|
314
|
-
signAttachment:
|
|
313
|
+
uploadAttachment: W,
|
|
314
|
+
signAttachment: te,
|
|
315
315
|
// Read-only state
|
|
316
316
|
get connection() {
|
|
317
317
|
return t.connection;
|
|
@@ -552,7 +552,7 @@ function Xe(e) {
|
|
|
552
552
|
var F;
|
|
553
553
|
const f = (m || "").trim(), _ = Array.isArray(p) && p.length > 0;
|
|
554
554
|
if (!h || !f && !_) return;
|
|
555
|
-
const y = Qe(), w =
|
|
555
|
+
const y = Qe(), w = se(h), S = {
|
|
556
556
|
id: y,
|
|
557
557
|
client_msg_id: y,
|
|
558
558
|
conversation_id: h,
|
|
@@ -623,7 +623,7 @@ function Xe(e) {
|
|
|
623
623
|
};
|
|
624
624
|
await T(h, { metadata: _ });
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function W(h) {
|
|
627
627
|
var p, d;
|
|
628
628
|
const m = t.messagesByConv[h] || [];
|
|
629
629
|
for (let f = m.length - 1; f >= 0; f--) {
|
|
@@ -633,7 +633,7 @@ function Xe(e) {
|
|
|
633
633
|
}
|
|
634
634
|
return null;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function te(h) {
|
|
637
637
|
var p, d, f;
|
|
638
638
|
const m = t.messagesByConv[h] || [];
|
|
639
639
|
for (let _ = m.length - 1; _ >= 0; _--) {
|
|
@@ -646,7 +646,7 @@ function Xe(e) {
|
|
|
646
646
|
}
|
|
647
647
|
return null;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function ne(h) {
|
|
650
650
|
const m = t.runningActionsByConv[h];
|
|
651
651
|
if (!m) return null;
|
|
652
652
|
const p = Object.keys(m);
|
|
@@ -727,7 +727,7 @@ function Xe(e) {
|
|
|
727
727
|
f !== void 0 && (d === "name" || d === "email" ? f != null && String(f).trim() !== "" && (m[d] = f) : (d === "values" || d === "metadata") && f && typeof f == "object" ? Object.assign(p, f) : p[d] = f);
|
|
728
728
|
return Object.keys(p).length && (m.values = p), Object.keys(m).length ? m : null;
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function se(h) {
|
|
731
731
|
const m = t.messagesByConv[h] || [];
|
|
732
732
|
let p = "";
|
|
733
733
|
for (const _ of m)
|
|
@@ -750,10 +750,10 @@ function Xe(e) {
|
|
|
750
750
|
clickCallback: M,
|
|
751
751
|
signAttachment: N,
|
|
752
752
|
submitFeedback: $,
|
|
753
|
-
getPendingApproval:
|
|
754
|
-
getActionInFlight:
|
|
753
|
+
getPendingApproval: W,
|
|
754
|
+
getActionInFlight: ne,
|
|
755
755
|
getLatestSuggestions: G,
|
|
756
|
-
getLatestForm:
|
|
756
|
+
getLatestForm: te,
|
|
757
757
|
// Pass-through for panel open/close (controls SSE burst).
|
|
758
758
|
setPanelOpen: e.setPanelOpen
|
|
759
759
|
};
|
|
@@ -1644,7 +1644,7 @@ const E = (e, t) => {
|
|
|
1644
1644
|
function bt(e, t, n, i, r, s) {
|
|
1645
1645
|
return c(), u("div", {
|
|
1646
1646
|
class: x(["wm-huav", { "wm-huav--tail": n.tail }]),
|
|
1647
|
-
style:
|
|
1647
|
+
style: K({
|
|
1648
1648
|
width: n.size + "px",
|
|
1649
1649
|
height: n.size + "px",
|
|
1650
1650
|
"--wm-avr": Math.round(n.size * 0.32) + "px",
|
|
@@ -1657,7 +1657,7 @@ function bt(e, t, n, i, r, s) {
|
|
|
1657
1657
|
alt: n.name || ""
|
|
1658
1658
|
}, null, 8, yt)) : (c(), u("span", {
|
|
1659
1659
|
key: 1,
|
|
1660
|
-
style:
|
|
1660
|
+
style: K({ fontSize: n.size * 0.36 + "px" })
|
|
1661
1661
|
}, v(s.initials), 5))
|
|
1662
1662
|
], 6);
|
|
1663
1663
|
}
|
|
@@ -1700,7 +1700,7 @@ function Ft(e, t, n, i, r, s) {
|
|
|
1700
1700
|
(c(!0), u(L, null, j(s.visiblePeeks, (l, g) => (c(), u("div", {
|
|
1701
1701
|
key: l.convId,
|
|
1702
1702
|
class: "wm-peek",
|
|
1703
|
-
style:
|
|
1703
|
+
style: K({
|
|
1704
1704
|
"--depth": s.visiblePeeks.length - 1 - g,
|
|
1705
1705
|
zIndex: g + 1
|
|
1706
1706
|
}),
|
|
@@ -1814,7 +1814,7 @@ const jt = /* @__PURE__ */ E(kt, [["render", Ft], ["__scopeId", "data-v-5193a529
|
|
|
1814
1814
|
function $t(e, t, n, i, r, s) {
|
|
1815
1815
|
return c(), u("div", {
|
|
1816
1816
|
class: x(["wm-aiav", { "wm-aiav--tail": n.tail }]),
|
|
1817
|
-
style:
|
|
1817
|
+
style: K({
|
|
1818
1818
|
width: n.size + "px",
|
|
1819
1819
|
height: n.size + "px",
|
|
1820
1820
|
"--wm-avr": n.size * 0.32 + "px"
|
|
@@ -1879,20 +1879,20 @@ const le = /* @__PURE__ */ E(Pt, [["render", $t], ["__scopeId", "data-v-d621a129
|
|
|
1879
1879
|
}, zt = {
|
|
1880
1880
|
key: 0,
|
|
1881
1881
|
class: "wm-team"
|
|
1882
|
-
}, qt = ["src", "alt"], Vt = { key: 1 },
|
|
1882
|
+
}, qt = ["src", "alt"], Vt = { key: 1 }, Kt = {
|
|
1883
1883
|
key: 0,
|
|
1884
1884
|
class: "wm-team__label"
|
|
1885
1885
|
};
|
|
1886
|
-
function
|
|
1886
|
+
function Wt(e, t, n, i, r, s) {
|
|
1887
1887
|
return s.visible ? (c(), u("div", zt, [
|
|
1888
1888
|
o("div", {
|
|
1889
1889
|
class: "wm-team__stack",
|
|
1890
|
-
style:
|
|
1890
|
+
style: K({ width: s.stackWidth + "px" })
|
|
1891
1891
|
}, [
|
|
1892
1892
|
(c(!0), u(L, null, j(n.members.slice(0, 3), (a, l) => (c(), u("div", {
|
|
1893
1893
|
key: l,
|
|
1894
1894
|
class: "wm-team__pill",
|
|
1895
|
-
style:
|
|
1895
|
+
style: K({
|
|
1896
1896
|
left: l * 13 + "px",
|
|
1897
1897
|
zIndex: 3 - l,
|
|
1898
1898
|
background: s.colorFor(a)
|
|
@@ -1905,10 +1905,10 @@ function Kt(e, t, n, i, r, s) {
|
|
|
1905
1905
|
}, null, 8, qt)) : (c(), u("span", Vt, v(s.initialsFor(a)), 1))
|
|
1906
1906
|
], 4))), 128))
|
|
1907
1907
|
], 4),
|
|
1908
|
-
n.responseLabel ? (c(), u("span",
|
|
1908
|
+
n.responseLabel ? (c(), u("span", Kt, v(n.responseLabel), 1)) : b("", !0)
|
|
1909
1909
|
])) : b("", !0);
|
|
1910
1910
|
}
|
|
1911
|
-
const Gt = /* @__PURE__ */ E(Ht, [["render",
|
|
1911
|
+
const Gt = /* @__PURE__ */ E(Ht, [["render", Wt], ["__scopeId", "data-v-e49a9063"]]), Yt = {
|
|
1912
1912
|
name: "WmHeader",
|
|
1913
1913
|
components: { AIAvatar: le, TeamAvatars: Gt },
|
|
1914
1914
|
inject: {
|
|
@@ -2321,7 +2321,7 @@ function $n(e, t, n, i, r, s) {
|
|
|
2321
2321
|
placeholder: s.t("onboarding.search"),
|
|
2322
2322
|
"aria-label": s.t("onboarding.search")
|
|
2323
2323
|
}, null, 8, In), [
|
|
2324
|
-
[
|
|
2324
|
+
[ee, r.query]
|
|
2325
2325
|
])
|
|
2326
2326
|
]),
|
|
2327
2327
|
o("div", En, [
|
|
@@ -2403,7 +2403,7 @@ const qn = {
|
|
|
2403
2403
|
}, Vn = {
|
|
2404
2404
|
class: "wm-result__icon",
|
|
2405
2405
|
"aria-hidden": "true"
|
|
2406
|
-
},
|
|
2406
|
+
}, Kn = {
|
|
2407
2407
|
key: 0,
|
|
2408
2408
|
width: "11",
|
|
2409
2409
|
height: "11",
|
|
@@ -2413,7 +2413,7 @@ const qn = {
|
|
|
2413
2413
|
"stroke-width": "2.8",
|
|
2414
2414
|
"stroke-linecap": "round",
|
|
2415
2415
|
"stroke-linejoin": "round"
|
|
2416
|
-
},
|
|
2416
|
+
}, Wn = {
|
|
2417
2417
|
key: 1,
|
|
2418
2418
|
width: "11",
|
|
2419
2419
|
height: "11",
|
|
@@ -2449,9 +2449,9 @@ function Zn(e, t, n, i, r, s) {
|
|
|
2449
2449
|
class: x(["wm-result", `wm-result--${n.state}`])
|
|
2450
2450
|
}, [
|
|
2451
2451
|
o("span", Vn, [
|
|
2452
|
-
n.state === "success" ? (c(), u("svg",
|
|
2452
|
+
n.state === "success" ? (c(), u("svg", Kn, [...t[0] || (t[0] = [
|
|
2453
2453
|
o("path", { d: "M20 6L9 17l-5-5" }, null, -1)
|
|
2454
|
-
])])) : n.state === "rejected" ? (c(), u("svg",
|
|
2454
|
+
])])) : n.state === "rejected" ? (c(), u("svg", Wn, [...t[1] || (t[1] = [
|
|
2455
2455
|
o("path", { d: "M18 6L6 18M6 6l12 12" }, null, -1)
|
|
2456
2456
|
])])) : n.state === "awaiting" ? (c(), u("svg", Gn, [...t[2] || (t[2] = [
|
|
2457
2457
|
o("circle", {
|
|
@@ -2900,7 +2900,7 @@ const $s = /* @__PURE__ */ E(Ds, [["render", Us]]), Hs = {
|
|
|
2900
2900
|
this.url || e.preventDefault();
|
|
2901
2901
|
}
|
|
2902
2902
|
}
|
|
2903
|
-
}, zs = ["href"], qs = ["src", "alt"], Vs = ["src"],
|
|
2903
|
+
}, zs = ["href"], qs = ["src", "alt"], Vs = ["src"], Ks = ["src"], Ws = ["href", "download"], Gs = { class: "wm-att__main" }, Ys = { class: "wm-att__name" }, Qs = {
|
|
2904
2904
|
key: 0,
|
|
2905
2905
|
class: "wm-att__meta"
|
|
2906
2906
|
}, Xs = {
|
|
@@ -2934,7 +2934,7 @@ function Js(e, t, n, i, r, s) {
|
|
|
2934
2934
|
src: r.url,
|
|
2935
2935
|
controls: "",
|
|
2936
2936
|
preload: "metadata"
|
|
2937
|
-
}, null, 8,
|
|
2937
|
+
}, null, 8, Ks)) : (c(), u("a", {
|
|
2938
2938
|
key: 3,
|
|
2939
2939
|
class: "wm-att__file",
|
|
2940
2940
|
href: r.url || "#",
|
|
@@ -2964,7 +2964,7 @@ function Js(e, t, n, i, r, s) {
|
|
|
2964
2964
|
s.sizeLabel ? (c(), u("span", Qs, v(s.sizeLabel), 1)) : b("", !0)
|
|
2965
2965
|
]),
|
|
2966
2966
|
r.loading ? (c(), u("span", Xs)) : b("", !0)
|
|
2967
|
-
], 8,
|
|
2967
|
+
], 8, Ws))
|
|
2968
2968
|
], 2);
|
|
2969
2969
|
}
|
|
2970
2970
|
const Zs = /* @__PURE__ */ E(Hs, [["render", Js], ["__scopeId", "data-v-afc7b0d3"]]), er = {
|
|
@@ -2998,7 +2998,7 @@ function ar(e, t, n, i, r, s) {
|
|
|
2998
2998
|
])]);
|
|
2999
2999
|
}
|
|
3000
3000
|
const or = /* @__PURE__ */ E(rr, [["render", ar], ["__scopeId", "data-v-df2447fd"]]);
|
|
3001
|
-
function
|
|
3001
|
+
function Z(e) {
|
|
3002
3002
|
return e ? e.client_msg_id || e.id : "";
|
|
3003
3003
|
}
|
|
3004
3004
|
const lr = {
|
|
@@ -3079,7 +3079,7 @@ const lr = {
|
|
|
3079
3079
|
if (((n = a == null ? void 0 : a.payload) == null ? void 0 : n.event) === "action_admin_pending") {
|
|
3080
3080
|
const k = e[e.length - 1];
|
|
3081
3081
|
k && k.role === "ai" ? k.messages.push(a) : e.push({
|
|
3082
|
-
key: `g-${
|
|
3082
|
+
key: `g-${Z(a)}`,
|
|
3083
3083
|
role: "ai",
|
|
3084
3084
|
agentName: "",
|
|
3085
3085
|
agentAvatarUrl: null,
|
|
@@ -3089,7 +3089,7 @@ const lr = {
|
|
|
3089
3089
|
continue;
|
|
3090
3090
|
}
|
|
3091
3091
|
e.push({
|
|
3092
|
-
key: `sys-${
|
|
3092
|
+
key: `sys-${Z(a)}`,
|
|
3093
3093
|
role: l,
|
|
3094
3094
|
messages: [a],
|
|
3095
3095
|
items: [],
|
|
@@ -3099,7 +3099,7 @@ const lr = {
|
|
|
3099
3099
|
}
|
|
3100
3100
|
const g = e[e.length - 1];
|
|
3101
3101
|
g && g.role === l && (l === "ai" || g.agentName === (((i = a == null ? void 0 : a.author) == null ? void 0 : i.name) || "")) ? g.messages.push(a) : e.push({
|
|
3102
|
-
key: `g-${
|
|
3102
|
+
key: `g-${Z(a)}`,
|
|
3103
3103
|
role: l,
|
|
3104
3104
|
agentName: ((r = a == null ? void 0 : a.author) == null ? void 0 : r.name) || "",
|
|
3105
3105
|
agentAvatarUrl: ((s = a == null ? void 0 : a.author) == null ? void 0 : s.avatar_url) || null,
|
|
@@ -3124,6 +3124,8 @@ const lr = {
|
|
|
3124
3124
|
}
|
|
3125
3125
|
t.push(a);
|
|
3126
3126
|
}
|
|
3127
|
+
for (const a of t)
|
|
3128
|
+
a.role !== "system" && (a.key = this.stableGroupKey(a.messages));
|
|
3127
3129
|
return t;
|
|
3128
3130
|
},
|
|
3129
3131
|
// Key of the first non-user group that starts after the unread
|
|
@@ -3145,6 +3147,9 @@ const lr = {
|
|
|
3145
3147
|
},
|
|
3146
3148
|
watch: {
|
|
3147
3149
|
messages: { handler: "snapshotAndRestore", deep: !0 },
|
|
3150
|
+
conversationId(e, t) {
|
|
3151
|
+
e !== t && (this._groupIdByMsgKey = null);
|
|
3152
|
+
},
|
|
3148
3153
|
loadingMore(e) {
|
|
3149
3154
|
e || (this._pendingLoadMore = !1), this.silentFades = !0, clearTimeout(this._silenceTimer), e || (this._silenceTimer = setTimeout(() => {
|
|
3150
3155
|
this.silentFades = !1;
|
|
@@ -3163,7 +3168,31 @@ const lr = {
|
|
|
3163
3168
|
this.scheduleMeasure();
|
|
3164
3169
|
},
|
|
3165
3170
|
methods: {
|
|
3166
|
-
messageKey:
|
|
3171
|
+
messageKey: Z,
|
|
3172
|
+
// Resolve a stable Vue :key for a non-system group by checking if
|
|
3173
|
+
// any of its messages were previously part of a group we'd already
|
|
3174
|
+
// assigned an id to; if so, reuse that id, otherwise mint a new
|
|
3175
|
+
// one. Keyed by `messageKey(m)` (client_msg_id || id) — stable
|
|
3176
|
+
// across the optimistic→persisted swap. Reset on conv switch by
|
|
3177
|
+
// the `conversationId` watcher.
|
|
3178
|
+
stableGroupKey(e) {
|
|
3179
|
+
this._groupIdByMsgKey || (this._groupIdByMsgKey = /* @__PURE__ */ new Map(), this._groupIdCounter = 0);
|
|
3180
|
+
const t = this._groupIdByMsgKey;
|
|
3181
|
+
let n = null;
|
|
3182
|
+
for (const i of e) {
|
|
3183
|
+
const r = Z(i);
|
|
3184
|
+
if (r && t.has(r)) {
|
|
3185
|
+
n = t.get(r);
|
|
3186
|
+
break;
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
n == null && (n = ++this._groupIdCounter);
|
|
3190
|
+
for (const i of e) {
|
|
3191
|
+
const r = Z(i);
|
|
3192
|
+
r && t.set(r, n);
|
|
3193
|
+
}
|
|
3194
|
+
return `g-${n}`;
|
|
3195
|
+
},
|
|
3167
3196
|
isAtBottom(e) {
|
|
3168
3197
|
return e.scrollHeight - e.scrollTop - e.clientHeight <= cr;
|
|
3169
3198
|
},
|
|
@@ -3353,10 +3382,10 @@ const lr = {
|
|
|
3353
3382
|
// adjacent à une `bubble`) : mon coin déborde le voisin et
|
|
3354
3383
|
// doit garder son arrondi.
|
|
3355
3384
|
cornersFor(e, t) {
|
|
3356
|
-
var
|
|
3357
|
-
const n = e.items, i = (
|
|
3358
|
-
let D = l, N = l, $ = l,
|
|
3359
|
-
return a ? (C && (N = g), (k || !s) && ($ = g), C && M(B, C, i == null ? void 0 : i.top) && (D = g), k && M(A, k, i == null ? void 0 : i.bottom) && (
|
|
3385
|
+
var te, ne, G;
|
|
3386
|
+
const n = e.items, i = (te = n[t]) == null ? void 0 : te.kind, r = (ne = n[t - 1]) == null ? void 0 : ne.kind, s = (G = n[t + 1]) == null ? void 0 : G.kind, a = e.role === "user", l = 14, g = 4, C = r == null ? void 0 : r.bottom, k = s == null ? void 0 : s.top, T = this.widthByKey[this.rowKeyOf(e, t)], B = this.widthByKey[this.rowKeyOf(e, t - 1)], A = this.widthByKey[this.rowKeyOf(e, t + 1)], H = 0.5, M = (Y, Q, q) => Y != null && T != null ? Y + H >= T : Q === q || Q === "card" && q === "bubble";
|
|
3387
|
+
let D = l, N = l, $ = l, W = l;
|
|
3388
|
+
return a ? (C && (N = g), (k || !s) && ($ = g), C && M(B, C, i == null ? void 0 : i.top) && (D = g), k && M(A, k, i == null ? void 0 : i.bottom) && (W = g)) : (C && (D = g), (k || !s) && (W = g), C && M(B, C, i == null ? void 0 : i.top) && (N = g), k && M(A, k, i == null ? void 0 : i.bottom) && ($ = g)), { tl: D, tr: N, br: $, bl: W };
|
|
3360
3389
|
},
|
|
3361
3390
|
// Inline style emitting the four corner CSS variables. Set on
|
|
3362
3391
|
// `.wm-list__row` so they cascade to Bubble/ActionResult/
|
|
@@ -3377,7 +3406,7 @@ const lr = {
|
|
|
3377
3406
|
rowKeyOf(e, t) {
|
|
3378
3407
|
var i;
|
|
3379
3408
|
const n = (i = e == null ? void 0 : e.items) == null ? void 0 : i[t];
|
|
3380
|
-
return n ? `${
|
|
3409
|
+
return n ? `${Z(n.message)}-${n.partKey}` : "";
|
|
3381
3410
|
},
|
|
3382
3411
|
// rAF-debouncé : `updated()` peut être appelé en rafale (stream,
|
|
3383
3412
|
// typing, scroll), un seul flush layout par frame suffit.
|
|
@@ -3479,80 +3508,69 @@ const lr = {
|
|
|
3479
3508
|
}
|
|
3480
3509
|
}, hr = {
|
|
3481
3510
|
key: 0,
|
|
3482
|
-
class: "wm-list__initialLoad",
|
|
3483
|
-
role: "status",
|
|
3484
|
-
"aria-live": "polite",
|
|
3485
|
-
"aria-busy": "true"
|
|
3486
|
-
}, mr = {
|
|
3487
|
-
key: 1,
|
|
3488
3511
|
class: "wm-list__loadMore",
|
|
3489
3512
|
role: "status",
|
|
3490
3513
|
"aria-live": "polite"
|
|
3491
|
-
},
|
|
3492
|
-
key:
|
|
3514
|
+
}, mr = { class: "wm-list__loadMore-lbl" }, fr = {
|
|
3515
|
+
key: 1,
|
|
3493
3516
|
class: "wm-list__historyEnd"
|
|
3494
|
-
},
|
|
3495
|
-
key:
|
|
3517
|
+
}, _r = {
|
|
3518
|
+
key: 2,
|
|
3496
3519
|
class: "wm-list__sep"
|
|
3497
|
-
},
|
|
3520
|
+
}, pr = { class: "wm-list__sep-label" }, gr = {
|
|
3498
3521
|
key: 0,
|
|
3499
3522
|
class: "wm-list__sep wm-list__sep--unread"
|
|
3500
|
-
},
|
|
3523
|
+
}, vr = { class: "wm-list__sep-label wm-list__sep-label--unread" }, yr = {
|
|
3501
3524
|
key: 0,
|
|
3502
3525
|
class: "wm-list__sysep"
|
|
3503
|
-
},
|
|
3526
|
+
}, br = { class: "wm-list__sysep-label" }, wr = ["data-row-key"], kr = {
|
|
3504
3527
|
key: 0,
|
|
3505
3528
|
class: "wm-list__avatarSlot"
|
|
3506
|
-
},
|
|
3529
|
+
}, Cr = {
|
|
3507
3530
|
key: 5,
|
|
3508
3531
|
class: "wm-list__body"
|
|
3509
|
-
},
|
|
3532
|
+
}, Ar = { key: 0 }, Sr = {
|
|
3510
3533
|
key: 1,
|
|
3511
3534
|
"aria-hidden": "true"
|
|
3512
|
-
},
|
|
3513
|
-
key:
|
|
3535
|
+
}, Mr = { key: 2 }, Tr = {
|
|
3536
|
+
key: 3,
|
|
3514
3537
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
3515
|
-
},
|
|
3516
|
-
function
|
|
3538
|
+
}, xr = { class: "wm-list__avatarSlot" };
|
|
3539
|
+
function Or(e, t, n, i, r, s) {
|
|
3517
3540
|
const a = I("AIAvatar"), l = I("HumanAvatar"), g = I("ActionResult"), C = I("ArtifactRenderer"), k = I("Bubble"), T = I("AttachmentPreview"), B = I("Typing");
|
|
3518
3541
|
return c(), u("div", {
|
|
3519
3542
|
ref: "scrollEl",
|
|
3520
3543
|
class: x(["wm-list", { "wm-list--silent": r.silentFades }]),
|
|
3521
3544
|
onScrollPassive: t[0] || (t[0] = (...A) => s.onScroll && s.onScroll(...A))
|
|
3522
3545
|
}, [
|
|
3523
|
-
n.loadingMore
|
|
3524
|
-
o("span", {
|
|
3525
|
-
class: "wm-list__loadMore-spinner",
|
|
3526
|
-
"aria-hidden": "true"
|
|
3527
|
-
}, null, -1)
|
|
3528
|
-
])])) : n.loadingMore ? (c(), u("div", mr, [
|
|
3529
|
-
t[2] || (t[2] = o("span", {
|
|
3546
|
+
n.loadingMore ? (c(), u("div", hr, [
|
|
3547
|
+
t[1] || (t[1] = o("span", {
|
|
3530
3548
|
class: "wm-list__loadMore-spinner",
|
|
3531
3549
|
"aria-hidden": "true"
|
|
3532
3550
|
}, null, -1)),
|
|
3533
|
-
o("span",
|
|
3534
|
-
])) : s.historyExhausted ? (c(), u("div",
|
|
3535
|
-
n.dateLabel ? (c(), u("div",
|
|
3536
|
-
t[
|
|
3537
|
-
o("span",
|
|
3538
|
-
t[
|
|
3551
|
+
o("span", mr, v(s.t("messageList.loadingHistory")), 1)
|
|
3552
|
+
])) : s.historyExhausted ? (c(), u("div", fr, v(s.t("messageList.conversationStart")), 1)) : b("", !0),
|
|
3553
|
+
n.dateLabel ? (c(), u("div", _r, [
|
|
3554
|
+
t[2] || (t[2] = o("div", { class: "wm-list__line" }, null, -1)),
|
|
3555
|
+
o("span", pr, v(n.dateLabel), 1),
|
|
3556
|
+
t[3] || (t[3] = o("div", { class: "wm-list__line" }, null, -1))
|
|
3539
3557
|
])) : b("", !0),
|
|
3540
3558
|
(c(!0), u(L, null, j(s.groups, (A, H) => (c(), u(L, {
|
|
3541
3559
|
key: A.key
|
|
3542
3560
|
}, [
|
|
3543
|
-
A.key === s.unreadGroupKey ? (c(), u("div",
|
|
3544
|
-
t[
|
|
3545
|
-
o("span",
|
|
3546
|
-
t[
|
|
3561
|
+
A.key === s.unreadGroupKey ? (c(), u("div", gr, [
|
|
3562
|
+
t[4] || (t[4] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1)),
|
|
3563
|
+
o("span", vr, v(s.t("messageList.unread")), 1),
|
|
3564
|
+
t[5] || (t[5] = o("div", { class: "wm-list__line wm-list__line--unread" }, null, -1))
|
|
3547
3565
|
])) : b("", !0),
|
|
3548
3566
|
A.role === "system" || A.items.length ? (c(), u("div", {
|
|
3549
3567
|
key: 1,
|
|
3550
3568
|
class: x(["wm-list__group", "wm-list__group--" + A.role])
|
|
3551
3569
|
}, [
|
|
3552
|
-
A.role === "system" ? (c(), u("div",
|
|
3553
|
-
t[
|
|
3554
|
-
o("span",
|
|
3555
|
-
t[
|
|
3570
|
+
A.role === "system" ? (c(), u("div", yr, [
|
|
3571
|
+
t[6] || (t[6] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
3572
|
+
o("span", br, v(A.systemLabel), 1),
|
|
3573
|
+
t[7] || (t[7] = o("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
3556
3574
|
])) : (c(), u(L, { key: 1 }, [
|
|
3557
3575
|
(c(!0), u(L, null, j(A.items, (M, D) => (c(), u("div", {
|
|
3558
3576
|
key: `${s.messageKey(M.message)}-${M.partKey}`,
|
|
@@ -3564,9 +3582,9 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3564
3582
|
"is-failed": M.message._failed
|
|
3565
3583
|
}
|
|
3566
3584
|
]]),
|
|
3567
|
-
style:
|
|
3585
|
+
style: K(s.cornersStyle(A, D))
|
|
3568
3586
|
}, [
|
|
3569
|
-
A.role !== "user" ? (c(), u("div",
|
|
3587
|
+
A.role !== "user" ? (c(), u("div", kr, [
|
|
3570
3588
|
D === A.items.length - 1 ? (c(), u(L, { key: 0 }, [
|
|
3571
3589
|
A.role === "ai" ? (c(), R(a, {
|
|
3572
3590
|
key: 0,
|
|
@@ -3597,7 +3615,7 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3597
3615
|
}, null, 8, ["artifact"])) : M.renderAs === "artifact" ? (c(), R(C, {
|
|
3598
3616
|
key: 4,
|
|
3599
3617
|
artifact: s.artifactOf(M.message)
|
|
3600
|
-
}, null, 8, ["artifact"])) : (c(), u("div",
|
|
3618
|
+
}, null, 8, ["artifact"])) : (c(), u("div", Cr, [
|
|
3601
3619
|
M.message.text_md ? (c(), R(k, {
|
|
3602
3620
|
key: 0,
|
|
3603
3621
|
role: A.role,
|
|
@@ -3617,20 +3635,20 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3617
3635
|
}, null, 8, ["attachment"]))), 128))
|
|
3618
3636
|
], 2)) : b("", !0)
|
|
3619
3637
|
]))
|
|
3620
|
-
], 14,
|
|
3638
|
+
], 14, wr))), 128)),
|
|
3621
3639
|
(A.role !== "user" || s.lastTimeOf(A)) && !s.hasTrailingOverlay(A) ? (c(), u("div", {
|
|
3622
3640
|
key: 0,
|
|
3623
3641
|
class: x(["wm-list__meta", { "wm-list__meta--right": A.role === "user" }])
|
|
3624
3642
|
}, [
|
|
3625
|
-
A.role !== "user" ? (c(), u("span",
|
|
3626
|
-
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span",
|
|
3627
|
-
s.lastTimeOf(A) ? (c(), u("span",
|
|
3643
|
+
A.role !== "user" ? (c(), u("span", Ar, v(s.roleLabel(A)), 1)) : b("", !0),
|
|
3644
|
+
A.role !== "user" && s.lastTimeOf(A) ? (c(), u("span", Sr, "·")) : b("", !0),
|
|
3645
|
+
s.lastTimeOf(A) ? (c(), u("span", Mr, v(s.lastTimeOf(A)), 1)) : b("", !0)
|
|
3628
3646
|
], 2)) : b("", !0)
|
|
3629
3647
|
], 64))
|
|
3630
3648
|
], 2)) : b("", !0)
|
|
3631
3649
|
], 64))), 128)),
|
|
3632
|
-
n.streamingActive ? (c(), u("div",
|
|
3633
|
-
o("div",
|
|
3650
|
+
n.streamingActive ? (c(), u("div", Tr, [
|
|
3651
|
+
o("div", xr, [
|
|
3634
3652
|
z(a, {
|
|
3635
3653
|
size: 26,
|
|
3636
3654
|
tail: !0
|
|
@@ -3640,8 +3658,8 @@ function Lr(e, t, n, i, r, s) {
|
|
|
3640
3658
|
])) : b("", !0)
|
|
3641
3659
|
], 34);
|
|
3642
3660
|
}
|
|
3643
|
-
const
|
|
3644
|
-
function
|
|
3661
|
+
const Lr = /* @__PURE__ */ E(ur, [["render", Or], ["__scopeId", "data-v-499ea569"]]), he = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", ve = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
3662
|
+
function Ir() {
|
|
3645
3663
|
return ve && [
|
|
3646
3664
|
"video/webm;codecs=vp9,opus",
|
|
3647
3665
|
"video/webm;codecs=vp8,opus",
|
|
@@ -3661,10 +3679,10 @@ function Re({ audio: e }) {
|
|
|
3661
3679
|
systemAudio: e ? "include" : "exclude"
|
|
3662
3680
|
};
|
|
3663
3681
|
}
|
|
3664
|
-
function
|
|
3682
|
+
function Ua(e) {
|
|
3665
3683
|
return e ? e.startsWith("image/") ? "image" : e.startsWith("video/") ? "video" : "file" : "file";
|
|
3666
3684
|
}
|
|
3667
|
-
async function
|
|
3685
|
+
async function Er() {
|
|
3668
3686
|
if (!he) return null;
|
|
3669
3687
|
let e;
|
|
3670
3688
|
try {
|
|
@@ -3675,7 +3693,7 @@ async function Br() {
|
|
|
3675
3693
|
return (t == null ? void 0 : t.name) !== "NotAllowedError" && console.error("[media] screenshot picker", t), null;
|
|
3676
3694
|
}
|
|
3677
3695
|
try {
|
|
3678
|
-
return await
|
|
3696
|
+
return await Br(e);
|
|
3679
3697
|
} catch (t) {
|
|
3680
3698
|
return console.error("[media] screenshot capture", t), null;
|
|
3681
3699
|
} finally {
|
|
@@ -3684,7 +3702,7 @@ async function Br() {
|
|
|
3684
3702
|
});
|
|
3685
3703
|
}
|
|
3686
3704
|
}
|
|
3687
|
-
async function
|
|
3705
|
+
async function Br(e) {
|
|
3688
3706
|
const t = document.createElement("video");
|
|
3689
3707
|
t.muted = !0, t.playsInline = !0, t.srcObject = e, await t.play(), await new Promise((l) => requestAnimationFrame(l));
|
|
3690
3708
|
const n = t.videoWidth || 1280, i = t.videoHeight || 720, r = document.createElement("canvas");
|
|
@@ -3697,7 +3715,7 @@ async function Rr(e) {
|
|
|
3697
3715
|
}), a = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19);
|
|
3698
3716
|
return new File([s], `capture-${a}.png`, { type: "image/png" });
|
|
3699
3717
|
}
|
|
3700
|
-
async function
|
|
3718
|
+
async function Rr(e = {}) {
|
|
3701
3719
|
var C;
|
|
3702
3720
|
if (!he || !ve) return null;
|
|
3703
3721
|
let t;
|
|
@@ -3708,7 +3726,7 @@ async function Nr(e = {}) {
|
|
|
3708
3726
|
} catch (k) {
|
|
3709
3727
|
return (k == null ? void 0 : k.name) !== "NotAllowedError" && console.error("[media] record picker", k), null;
|
|
3710
3728
|
}
|
|
3711
|
-
const n =
|
|
3729
|
+
const n = Ir();
|
|
3712
3730
|
let i;
|
|
3713
3731
|
try {
|
|
3714
3732
|
i = n ? new window.MediaRecorder(t, { mimeType: n }) : new window.MediaRecorder(t);
|
|
@@ -3762,7 +3780,7 @@ async function Nr(e = {}) {
|
|
|
3762
3780
|
}
|
|
3763
3781
|
};
|
|
3764
3782
|
}
|
|
3765
|
-
const
|
|
3783
|
+
const Nr = [
|
|
3766
3784
|
{
|
|
3767
3785
|
action: "file",
|
|
3768
3786
|
labelKey: "composer.attachFile",
|
|
@@ -3778,7 +3796,7 @@ const Fr = [
|
|
|
3778
3796
|
labelKey: "composer.recordScreen",
|
|
3779
3797
|
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"
|
|
3780
3798
|
}
|
|
3781
|
-
],
|
|
3799
|
+
], Fr = {
|
|
3782
3800
|
name: "WmComposer",
|
|
3783
3801
|
inject: {
|
|
3784
3802
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -3806,7 +3824,7 @@ const Fr = [
|
|
|
3806
3824
|
return !this.disabled && !!this.local.trim();
|
|
3807
3825
|
},
|
|
3808
3826
|
attachItems() {
|
|
3809
|
-
return
|
|
3827
|
+
return Nr.map((e) => ({
|
|
3810
3828
|
...e,
|
|
3811
3829
|
label: this.t(e.labelKey),
|
|
3812
3830
|
disabled: e.action === "screenshot" && !he || e.action === "record" && (!he || !ve)
|
|
@@ -3879,13 +3897,13 @@ const Fr = [
|
|
|
3879
3897
|
},
|
|
3880
3898
|
async captureScreenshot() {
|
|
3881
3899
|
if (this.disabled) return;
|
|
3882
|
-
const e = await
|
|
3900
|
+
const e = await Er();
|
|
3883
3901
|
e && this.$emit("attach", e);
|
|
3884
3902
|
},
|
|
3885
3903
|
async startRecording() {
|
|
3886
3904
|
if (this.recording || this.disabled) return;
|
|
3887
3905
|
this.recordingElapsed = 0;
|
|
3888
|
-
const e = await
|
|
3906
|
+
const e = await Rr({
|
|
3889
3907
|
onstart: () => {
|
|
3890
3908
|
this.recording = !0;
|
|
3891
3909
|
},
|
|
@@ -3910,27 +3928,27 @@ const Fr = [
|
|
|
3910
3928
|
}
|
|
3911
3929
|
}
|
|
3912
3930
|
}
|
|
3913
|
-
},
|
|
3931
|
+
}, jr = { class: "wm-compose-wrap" }, Pr = {
|
|
3914
3932
|
key: 0,
|
|
3915
3933
|
class: "wm-rec"
|
|
3916
|
-
},
|
|
3934
|
+
}, Dr = { class: "wm-rec__lbl" }, Ur = {
|
|
3917
3935
|
key: 1,
|
|
3918
3936
|
class: "wm-compose__menu",
|
|
3919
3937
|
role: "menu"
|
|
3920
|
-
},
|
|
3938
|
+
}, $r = ["disabled", "onClick"], Hr = { class: "wm-compose__menuIcon" }, zr = {
|
|
3921
3939
|
viewBox: "0 0 24 24",
|
|
3922
3940
|
width: "14",
|
|
3923
3941
|
height: "14",
|
|
3924
3942
|
"aria-hidden": "true"
|
|
3925
|
-
},
|
|
3926
|
-
function
|
|
3927
|
-
return c(), u("div",
|
|
3928
|
-
r.recording ? (c(), u("div",
|
|
3943
|
+
}, qr = ["d"], Vr = ["placeholder", "disabled"], Kr = { class: "wm-compose__actions" }, Wr = ["title", "aria-label", "disabled"], Gr = ["disabled", "aria-label"];
|
|
3944
|
+
function Yr(e, t, n, i, r, s) {
|
|
3945
|
+
return c(), u("div", jr, [
|
|
3946
|
+
r.recording ? (c(), u("div", Pr, [
|
|
3929
3947
|
t[8] || (t[8] = o("span", {
|
|
3930
3948
|
class: "wm-rec__dot",
|
|
3931
3949
|
"aria-hidden": "true"
|
|
3932
3950
|
}, null, -1)),
|
|
3933
|
-
o("span",
|
|
3951
|
+
o("span", Dr, v(s.t("composer.recording", { time: s.recordingElapsedLabel })), 1),
|
|
3934
3952
|
o("button", {
|
|
3935
3953
|
type: "button",
|
|
3936
3954
|
class: "wm-rec__stop",
|
|
@@ -3953,7 +3971,7 @@ function Qr(e, t, n, i, r, s) {
|
|
|
3953
3971
|
class: "wm-compose__overlay",
|
|
3954
3972
|
onClick: t[2] || (t[2] = (a) => r.attachOpen = !1)
|
|
3955
3973
|
})) : b("", !0),
|
|
3956
|
-
r.attachOpen ? (c(), u("div",
|
|
3974
|
+
r.attachOpen ? (c(), u("div", Ur, [
|
|
3957
3975
|
(c(!0), u(L, null, j(s.attachItems, (a) => (c(), u("button", {
|
|
3958
3976
|
key: a.action,
|
|
3959
3977
|
type: "button",
|
|
@@ -3961,8 +3979,8 @@ function Qr(e, t, n, i, r, s) {
|
|
|
3961
3979
|
disabled: a.disabled,
|
|
3962
3980
|
onClick: (l) => s.onAttachAction(a.action)
|
|
3963
3981
|
}, [
|
|
3964
|
-
o("span",
|
|
3965
|
-
(c(), u("svg",
|
|
3982
|
+
o("span", Hr, [
|
|
3983
|
+
(c(), u("svg", zr, [
|
|
3966
3984
|
o("path", {
|
|
3967
3985
|
d: a.path,
|
|
3968
3986
|
stroke: "currentColor",
|
|
@@ -3970,11 +3988,11 @@ function Qr(e, t, n, i, r, s) {
|
|
|
3970
3988
|
"stroke-linecap": "round",
|
|
3971
3989
|
"stroke-linejoin": "round",
|
|
3972
3990
|
fill: "none"
|
|
3973
|
-
}, null, 8,
|
|
3991
|
+
}, null, 8, qr)
|
|
3974
3992
|
]))
|
|
3975
3993
|
]),
|
|
3976
3994
|
o("span", null, v(a.label), 1)
|
|
3977
|
-
], 8,
|
|
3995
|
+
], 8, $r))), 128))
|
|
3978
3996
|
])) : b("", !0),
|
|
3979
3997
|
V(o("textarea", {
|
|
3980
3998
|
ref: "inputEl",
|
|
@@ -3985,8 +4003,8 @@ function Qr(e, t, n, i, r, s) {
|
|
|
3985
4003
|
disabled: n.disabled,
|
|
3986
4004
|
onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
|
|
3987
4005
|
onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
|
|
3988
|
-
}, null, 40,
|
|
3989
|
-
[
|
|
4006
|
+
}, null, 40, Vr), [
|
|
4007
|
+
[ee, r.local]
|
|
3990
4008
|
]),
|
|
3991
4009
|
o("div", Kr, [
|
|
3992
4010
|
o("button", {
|
|
@@ -4010,7 +4028,7 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4010
4028
|
}, [
|
|
4011
4029
|
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" })
|
|
4012
4030
|
], -1)
|
|
4013
|
-
])], 10,
|
|
4031
|
+
])], 10, Wr),
|
|
4014
4032
|
o("button", {
|
|
4015
4033
|
type: "submit",
|
|
4016
4034
|
class: x(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -4030,12 +4048,12 @@ function Qr(e, t, n, i, r, s) {
|
|
|
4030
4048
|
}, [
|
|
4031
4049
|
o("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" })
|
|
4032
4050
|
], -1)
|
|
4033
|
-
])], 10,
|
|
4051
|
+
])], 10, Gr)
|
|
4034
4052
|
])
|
|
4035
4053
|
], 34)
|
|
4036
4054
|
]);
|
|
4037
4055
|
}
|
|
4038
|
-
const
|
|
4056
|
+
const Qr = /* @__PURE__ */ E(Fr, [["render", Yr], ["__scopeId", "data-v-aa81dbb8"]]), Xr = {
|
|
4039
4057
|
name: "WmSuggestionChips",
|
|
4040
4058
|
props: {
|
|
4041
4059
|
items: { type: Array, default: () => [] },
|
|
@@ -4052,8 +4070,8 @@ const Xr = /* @__PURE__ */ E(jr, [["render", Qr], ["__scopeId", "data-v-aa81dbb8
|
|
|
4052
4070
|
return this.items.map((e) => (e == null ? void 0 : e.label) || (e == null ? void 0 : e.text) || "").join("§");
|
|
4053
4071
|
}
|
|
4054
4072
|
}
|
|
4055
|
-
},
|
|
4056
|
-
function
|
|
4073
|
+
}, Jr = ["onClick"];
|
|
4074
|
+
function Zr(e, t, n, i, r, s) {
|
|
4057
4075
|
return n.items.length ? (c(), u("div", {
|
|
4058
4076
|
key: s.batchKey,
|
|
4059
4077
|
class: "wm-chips"
|
|
@@ -4062,12 +4080,12 @@ function ei(e, t, n, i, r, s) {
|
|
|
4062
4080
|
key: l,
|
|
4063
4081
|
type: "button",
|
|
4064
4082
|
class: "wm-chip",
|
|
4065
|
-
style:
|
|
4083
|
+
style: K({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4066
4084
|
onClick: (g) => e.$emit("select", a)
|
|
4067
|
-
}, v(a.label), 13,
|
|
4085
|
+
}, v(a.label), 13, Jr))), 128))
|
|
4068
4086
|
])) : b("", !0);
|
|
4069
4087
|
}
|
|
4070
|
-
const
|
|
4088
|
+
const ei = /* @__PURE__ */ E(Xr, [["render", Zr], ["__scopeId", "data-v-47ad8085"]]), ti = {
|
|
4071
4089
|
name: "WmApprovalCard",
|
|
4072
4090
|
components: { AIAvatar: le },
|
|
4073
4091
|
inject: {
|
|
@@ -4109,23 +4127,23 @@ const ti = /* @__PURE__ */ E(Jr, [["render", ei], ["__scopeId", "data-v-47ad8085
|
|
|
4109
4127
|
return ((e = this.rejectCallback) == null ? void 0 : e.label) || this.t("approval.reject");
|
|
4110
4128
|
}
|
|
4111
4129
|
}
|
|
4112
|
-
},
|
|
4130
|
+
}, ni = { class: "wm-approval" }, si = { class: "wm-approval__head" }, ri = { class: "wm-approval__icon" }, ii = { class: "wm-approval__main" }, ai = { class: "wm-approval__title" }, oi = {
|
|
4113
4131
|
key: 0,
|
|
4114
4132
|
class: "wm-approval__detail"
|
|
4115
|
-
},
|
|
4116
|
-
function
|
|
4133
|
+
}, li = { class: "wm-approval__actions" };
|
|
4134
|
+
function ci(e, t, n, i, r, s) {
|
|
4117
4135
|
const a = I("AIAvatar");
|
|
4118
|
-
return c(), u("div",
|
|
4119
|
-
o("div",
|
|
4120
|
-
o("div",
|
|
4136
|
+
return c(), u("div", ni, [
|
|
4137
|
+
o("div", si, [
|
|
4138
|
+
o("div", ri, [
|
|
4121
4139
|
z(a, { size: 24 })
|
|
4122
4140
|
]),
|
|
4123
|
-
o("div",
|
|
4124
|
-
o("div",
|
|
4125
|
-
n.detail ? (c(), u("div",
|
|
4141
|
+
o("div", ii, [
|
|
4142
|
+
o("div", ai, v(n.action), 1),
|
|
4143
|
+
n.detail ? (c(), u("div", oi, v(n.detail), 1)) : b("", !0)
|
|
4126
4144
|
])
|
|
4127
4145
|
]),
|
|
4128
|
-
o("div",
|
|
4146
|
+
o("div", li, [
|
|
4129
4147
|
s.rejectId ? (c(), u("button", {
|
|
4130
4148
|
key: 0,
|
|
4131
4149
|
type: "button",
|
|
@@ -4141,9 +4159,9 @@ function di(e, t, n, i, r, s) {
|
|
|
4141
4159
|
])
|
|
4142
4160
|
]);
|
|
4143
4161
|
}
|
|
4144
|
-
const
|
|
4162
|
+
const di = /* @__PURE__ */ E(ti, [["render", ci], ["__scopeId", "data-v-53ddf2b2"]]);
|
|
4145
4163
|
let Me = 0;
|
|
4146
|
-
const
|
|
4164
|
+
const ui = /* @__PURE__ */ new Set([
|
|
4147
4165
|
"text",
|
|
4148
4166
|
"textarea",
|
|
4149
4167
|
"number",
|
|
@@ -4151,7 +4169,7 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4151
4169
|
"select",
|
|
4152
4170
|
"multiselect",
|
|
4153
4171
|
"date"
|
|
4154
|
-
]),
|
|
4172
|
+
]), hi = {
|
|
4155
4173
|
name: "WmFormCard",
|
|
4156
4174
|
components: { AIAvatar: le },
|
|
4157
4175
|
inject: {
|
|
@@ -4179,7 +4197,7 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4179
4197
|
// douteux.
|
|
4180
4198
|
normalizedFields() {
|
|
4181
4199
|
var t;
|
|
4182
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !
|
|
4200
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((n) => !(!(n != null && n.key) || !(n != null && n.label) || !ui.has(n == null ? void 0 : n.type) || (n.type === "select" || n.type === "multiselect") && (!Array.isArray(n.options) || n.options.length === 0)));
|
|
4183
4201
|
}
|
|
4184
4202
|
},
|
|
4185
4203
|
created() {
|
|
@@ -4232,43 +4250,43 @@ const hi = /* @__PURE__ */ new Set([
|
|
|
4232
4250
|
}
|
|
4233
4251
|
}
|
|
4234
4252
|
}
|
|
4235
|
-
},
|
|
4253
|
+
}, mi = { class: "wm-form" }, fi = { class: "wm-form__head" }, _i = { class: "wm-form__icon" }, pi = { class: "wm-form__main" }, gi = { class: "wm-form__title" }, vi = {
|
|
4236
4254
|
key: 0,
|
|
4237
4255
|
class: "wm-form__detail"
|
|
4238
|
-
},
|
|
4256
|
+
}, yi = ["for"], bi = {
|
|
4239
4257
|
key: 0,
|
|
4240
4258
|
class: "wm-form__req",
|
|
4241
4259
|
"aria-hidden": "true"
|
|
4242
|
-
},
|
|
4260
|
+
}, wi = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], ki = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ci = ["id", "onUpdate:modelValue", "placeholder", "required", "disabled"], Ai = ["id", "onUpdate:modelValue", "required", "disabled"], Si = {
|
|
4243
4261
|
key: 4,
|
|
4244
4262
|
class: "wm-form__bool"
|
|
4245
|
-
},
|
|
4263
|
+
}, Mi = ["id", "onUpdate:modelValue", "disabled"], Ti = ["id", "onUpdate:modelValue", "required", "disabled"], xi = {
|
|
4246
4264
|
value: "",
|
|
4247
4265
|
disabled: ""
|
|
4248
|
-
},
|
|
4266
|
+
}, Oi = ["value"], Li = {
|
|
4249
4267
|
key: 6,
|
|
4250
4268
|
class: "wm-form__multi"
|
|
4251
|
-
},
|
|
4269
|
+
}, Ii = ["value", "checked", "disabled", "onChange"], Ei = {
|
|
4252
4270
|
key: 0,
|
|
4253
4271
|
class: "wm-form__err"
|
|
4254
|
-
},
|
|
4272
|
+
}, Bi = ["disabled"], Ri = {
|
|
4255
4273
|
key: 0,
|
|
4256
4274
|
class: "wm-form__spinner",
|
|
4257
4275
|
"aria-hidden": "true"
|
|
4258
|
-
},
|
|
4276
|
+
}, Ni = {
|
|
4259
4277
|
key: 2,
|
|
4260
4278
|
class: "wm-form__doneLbl"
|
|
4261
4279
|
};
|
|
4262
|
-
function
|
|
4280
|
+
function Fi(e, t, n, i, r, s) {
|
|
4263
4281
|
const a = I("AIAvatar");
|
|
4264
|
-
return c(), u("div",
|
|
4265
|
-
o("div",
|
|
4266
|
-
o("div",
|
|
4282
|
+
return c(), u("div", mi, [
|
|
4283
|
+
o("div", fi, [
|
|
4284
|
+
o("div", _i, [
|
|
4267
4285
|
z(a, { size: 24 })
|
|
4268
4286
|
]),
|
|
4269
|
-
o("div",
|
|
4270
|
-
o("div",
|
|
4271
|
-
n.form.description ? (c(), u("div",
|
|
4287
|
+
o("div", pi, [
|
|
4288
|
+
o("div", gi, v(n.form.title || s.t("form.title")), 1),
|
|
4289
|
+
n.form.description ? (c(), u("div", vi, v(n.form.description), 1)) : b("", !0)
|
|
4272
4290
|
])
|
|
4273
4291
|
]),
|
|
4274
4292
|
o("form", {
|
|
@@ -4284,8 +4302,8 @@ function ji(e, t, n, i, r, s) {
|
|
|
4284
4302
|
class: "wm-form__label"
|
|
4285
4303
|
}, [
|
|
4286
4304
|
pe(v(l.label), 1),
|
|
4287
|
-
l.required ? (c(), u("span",
|
|
4288
|
-
], 8,
|
|
4305
|
+
l.required ? (c(), u("span", bi, "*")) : b("", !0)
|
|
4306
|
+
], 8, yi),
|
|
4289
4307
|
l.type === "text" ? V((c(), u("input", {
|
|
4290
4308
|
key: 0,
|
|
4291
4309
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4295,8 +4313,8 @@ function ji(e, t, n, i, r, s) {
|
|
|
4295
4313
|
placeholder: l.placeholder || "",
|
|
4296
4314
|
required: l.required,
|
|
4297
4315
|
disabled: n.readOnly || r.busy
|
|
4298
|
-
}, null, 8,
|
|
4299
|
-
[
|
|
4316
|
+
}, null, 8, wi)), [
|
|
4317
|
+
[ee, r.values[l.key]]
|
|
4300
4318
|
]) : l.type === "textarea" ? V((c(), u("textarea", {
|
|
4301
4319
|
key: 1,
|
|
4302
4320
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4306,8 +4324,8 @@ function ji(e, t, n, i, r, s) {
|
|
|
4306
4324
|
placeholder: l.placeholder || "",
|
|
4307
4325
|
required: l.required,
|
|
4308
4326
|
disabled: n.readOnly || r.busy
|
|
4309
|
-
}, null, 8,
|
|
4310
|
-
[
|
|
4327
|
+
}, null, 8, ki)), [
|
|
4328
|
+
[ee, r.values[l.key]]
|
|
4311
4329
|
]) : l.type === "number" ? V((c(), u("input", {
|
|
4312
4330
|
key: 2,
|
|
4313
4331
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4317,9 +4335,9 @@ function ji(e, t, n, i, r, s) {
|
|
|
4317
4335
|
placeholder: l.placeholder || "",
|
|
4318
4336
|
required: l.required,
|
|
4319
4337
|
disabled: n.readOnly || r.busy
|
|
4320
|
-
}, null, 8,
|
|
4338
|
+
}, null, 8, Ci)), [
|
|
4321
4339
|
[
|
|
4322
|
-
|
|
4340
|
+
ee,
|
|
4323
4341
|
r.values[l.key],
|
|
4324
4342
|
void 0,
|
|
4325
4343
|
{ number: !0 }
|
|
@@ -4332,15 +4350,15 @@ function ji(e, t, n, i, r, s) {
|
|
|
4332
4350
|
class: "wm-form__input",
|
|
4333
4351
|
required: l.required,
|
|
4334
4352
|
disabled: n.readOnly || r.busy
|
|
4335
|
-
}, null, 8,
|
|
4336
|
-
[
|
|
4337
|
-
]) : l.type === "boolean" ? (c(), u("label",
|
|
4353
|
+
}, null, 8, Ai)), [
|
|
4354
|
+
[ee, r.values[l.key]]
|
|
4355
|
+
]) : l.type === "boolean" ? (c(), u("label", Si, [
|
|
4338
4356
|
V(o("input", {
|
|
4339
4357
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
4340
4358
|
"onUpdate:modelValue": (g) => r.values[l.key] = g,
|
|
4341
4359
|
type: "checkbox",
|
|
4342
4360
|
disabled: n.readOnly || r.busy
|
|
4343
|
-
}, null, 8,
|
|
4361
|
+
}, null, 8, Mi), [
|
|
4344
4362
|
[$e, r.values[l.key]]
|
|
4345
4363
|
]),
|
|
4346
4364
|
o("span", null, v(l.placeholder || s.t("common.yes")), 1)
|
|
@@ -4352,14 +4370,14 @@ function ji(e, t, n, i, r, s) {
|
|
|
4352
4370
|
required: l.required,
|
|
4353
4371
|
disabled: n.readOnly || r.busy
|
|
4354
4372
|
}, [
|
|
4355
|
-
o("option",
|
|
4373
|
+
o("option", xi, v(l.placeholder || s.t("form.choose")), 1),
|
|
4356
4374
|
(c(!0), u(L, null, j(l.options, (g) => (c(), u("option", {
|
|
4357
4375
|
key: g.value,
|
|
4358
4376
|
value: g.value
|
|
4359
|
-
}, v(g.label), 9,
|
|
4360
|
-
], 8,
|
|
4377
|
+
}, v(g.label), 9, Oi))), 128))
|
|
4378
|
+
], 8, Ti)), [
|
|
4361
4379
|
[He, r.values[l.key]]
|
|
4362
|
-
]) : l.type === "multiselect" ? (c(), u("div",
|
|
4380
|
+
]) : l.type === "multiselect" ? (c(), u("div", Li, [
|
|
4363
4381
|
(c(!0), u(L, null, j(l.options, (g) => (c(), u("label", {
|
|
4364
4382
|
key: g.value,
|
|
4365
4383
|
class: "wm-form__multiItem"
|
|
@@ -4374,25 +4392,25 @@ function ji(e, t, n, i, r, s) {
|
|
|
4374
4392
|
g.value,
|
|
4375
4393
|
C.target.checked
|
|
4376
4394
|
)
|
|
4377
|
-
}, null, 40,
|
|
4395
|
+
}, null, 40, Ii),
|
|
4378
4396
|
o("span", null, v(g.label), 1)
|
|
4379
4397
|
]))), 128))
|
|
4380
4398
|
])) : b("", !0)
|
|
4381
4399
|
]))), 128)),
|
|
4382
|
-
r.error ? (c(), u("div",
|
|
4383
|
-
n.readOnly ? (c(), u("div",
|
|
4400
|
+
r.error ? (c(), u("div", Ei, v(r.error), 1)) : b("", !0),
|
|
4401
|
+
n.readOnly ? (c(), u("div", Ni, v(s.t("form.responseSent")), 1)) : (c(), u("button", {
|
|
4384
4402
|
key: 1,
|
|
4385
4403
|
type: "submit",
|
|
4386
4404
|
class: "wm-form__submit",
|
|
4387
4405
|
disabled: r.busy
|
|
4388
4406
|
}, [
|
|
4389
|
-
r.busy ? (c(), u("span",
|
|
4407
|
+
r.busy ? (c(), u("span", Ri)) : b("", !0),
|
|
4390
4408
|
o("span", null, v(r.busy ? s.t("common.sending") : n.form.submit_label || s.t("common.send")), 1)
|
|
4391
|
-
], 8,
|
|
4409
|
+
], 8, Bi))
|
|
4392
4410
|
], 32)
|
|
4393
4411
|
]);
|
|
4394
4412
|
}
|
|
4395
|
-
const
|
|
4413
|
+
const ji = /* @__PURE__ */ E(hi, [["render", Fi], ["__scopeId", "data-v-75332dad"]]), Pi = {
|
|
4396
4414
|
name: "WmFeedback",
|
|
4397
4415
|
inject: {
|
|
4398
4416
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4426,13 +4444,13 @@ const Pi = /* @__PURE__ */ E(mi, [["render", ji], ["__scopeId", "data-v-75332dad
|
|
|
4426
4444
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4427
4445
|
}
|
|
4428
4446
|
}
|
|
4429
|
-
},
|
|
4447
|
+
}, Di = { class: "wm-fb" }, Ui = { class: "wm-fb__title" }, $i = { class: "wm-fb__sub" }, Hi = { class: "wm-fb__row" }, zi = ["onClick"], qi = { class: "wm-fb__emoji" }, Vi = { class: "wm-fb__label" }, Ki = ["disabled"], Wi = {
|
|
4430
4448
|
key: 1,
|
|
4431
4449
|
class: "wm-fb__done"
|
|
4432
|
-
},
|
|
4433
|
-
function
|
|
4434
|
-
return c(), u("div",
|
|
4435
|
-
n.done ? (c(), u("div",
|
|
4450
|
+
}, Gi = { class: "wm-fb__doneTitle" }, Yi = { class: "wm-fb__doneSub" };
|
|
4451
|
+
function Qi(e, t, n, i, r, s) {
|
|
4452
|
+
return c(), u("div", Di, [
|
|
4453
|
+
n.done ? (c(), u("div", Wi, [
|
|
4436
4454
|
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
4437
4455
|
o("svg", {
|
|
4438
4456
|
width: "16",
|
|
@@ -4448,21 +4466,21 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4448
4466
|
o("path", { d: "M20 6L9 17l-5-5" })
|
|
4449
4467
|
])
|
|
4450
4468
|
], -1)),
|
|
4451
|
-
o("div",
|
|
4452
|
-
o("div",
|
|
4469
|
+
o("div", Gi, v(s.t("feedback.doneTitle")), 1),
|
|
4470
|
+
o("div", Yi, v(s.t("feedback.doneSubtitle")), 1)
|
|
4453
4471
|
])) : (c(), u(L, { key: 0 }, [
|
|
4454
|
-
o("div",
|
|
4455
|
-
o("div",
|
|
4456
|
-
o("div",
|
|
4472
|
+
o("div", Ui, v(s.t("feedback.question")), 1),
|
|
4473
|
+
o("div", $i, v(s.t("feedback.subtitle")), 1),
|
|
4474
|
+
o("div", Hi, [
|
|
4457
4475
|
(c(!0), u(L, null, j(s.options, (a) => (c(), u("button", {
|
|
4458
4476
|
key: a.v,
|
|
4459
4477
|
type: "button",
|
|
4460
4478
|
class: x(["wm-fb__opt", { "is-selected": r.sel === a.v }]),
|
|
4461
4479
|
onClick: (l) => r.sel = a.v
|
|
4462
4480
|
}, [
|
|
4463
|
-
o("span",
|
|
4464
|
-
o("span",
|
|
4465
|
-
], 10,
|
|
4481
|
+
o("span", qi, v(a.e), 1),
|
|
4482
|
+
o("span", Vi, v(a.l), 1)
|
|
4483
|
+
], 10, zi))), 128))
|
|
4466
4484
|
]),
|
|
4467
4485
|
o("button", {
|
|
4468
4486
|
type: "button",
|
|
@@ -4473,7 +4491,7 @@ function Xi(e, t, n, i, r, s) {
|
|
|
4473
4491
|
], 64))
|
|
4474
4492
|
]);
|
|
4475
4493
|
}
|
|
4476
|
-
const
|
|
4494
|
+
const Xi = /* @__PURE__ */ E(Pi, [["render", Qi], ["__scopeId", "data-v-9b630564"]]), Ji = {
|
|
4477
4495
|
name: "WmMoreMenu",
|
|
4478
4496
|
inject: {
|
|
4479
4497
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4516,24 +4534,24 @@ const Ji = /* @__PURE__ */ E(Di, [["render", Xi], ["__scopeId", "data-v-9b630564
|
|
|
4516
4534
|
this.browserNotifOn = !this.browserNotifOn, this.$emit("browser-notif-toggle", this.browserNotifOn);
|
|
4517
4535
|
}
|
|
4518
4536
|
}
|
|
4519
|
-
},
|
|
4537
|
+
}, Zi = { class: "wm-mm" }, ea = {
|
|
4520
4538
|
class: "wm-mm__pop",
|
|
4521
4539
|
role: "menu"
|
|
4522
|
-
},
|
|
4540
|
+
}, ta = {
|
|
4523
4541
|
key: 0,
|
|
4524
4542
|
class: "wm-mm__section"
|
|
4525
|
-
},
|
|
4543
|
+
}, na = { class: "wm-mm__label" }, sa = { class: "wm-mm__label" }, ra = {
|
|
4526
4544
|
key: 1,
|
|
4527
4545
|
class: "wm-mm__sep"
|
|
4528
|
-
},
|
|
4529
|
-
function
|
|
4530
|
-
return c(), u("div",
|
|
4546
|
+
}, ia = { class: "wm-mm__section" }, aa = { class: "wm-mm__label" }, oa = { class: "wm-mm__label" }, la = { class: "wm-mm__section" }, ca = { class: "wm-mm__label" }, da = { class: "wm-mm__label" };
|
|
4547
|
+
function ua(e, t, n, i, r, s) {
|
|
4548
|
+
return c(), u("div", Zi, [
|
|
4531
4549
|
o("div", {
|
|
4532
4550
|
class: "wm-mm__scrim",
|
|
4533
4551
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4534
4552
|
}),
|
|
4535
|
-
o("div",
|
|
4536
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4553
|
+
o("div", ea, [
|
|
4554
|
+
n.canRename || n.canExport ? (c(), u("div", ta, [
|
|
4537
4555
|
n.canRename ? (c(), u("button", {
|
|
4538
4556
|
key: 0,
|
|
4539
4557
|
type: "button",
|
|
@@ -4556,7 +4574,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4556
4574
|
o("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z" })
|
|
4557
4575
|
])
|
|
4558
4576
|
], -1)),
|
|
4559
|
-
o("span",
|
|
4577
|
+
o("span", na, v(s.t("moreMenu.editTitle")), 1)
|
|
4560
4578
|
])) : b("", !0),
|
|
4561
4579
|
n.canExport ? (c(), u("button", {
|
|
4562
4580
|
key: 1,
|
|
@@ -4579,12 +4597,12 @@ function ha(e, t, n, i, r, s) {
|
|
|
4579
4597
|
o("path", { d: "M4 12v8a2 2 0 002 2h12a2 2 0 002-2v-8M16 6l-4-4-4 4M12 2v13" })
|
|
4580
4598
|
])
|
|
4581
4599
|
], -1)),
|
|
4582
|
-
o("span",
|
|
4600
|
+
o("span", sa, v(s.t("moreMenu.exportTranscript")), 1),
|
|
4583
4601
|
t[9] || (t[9] = o("span", { class: "wm-mm__hint" }, ".txt", -1))
|
|
4584
4602
|
])) : b("", !0)
|
|
4585
4603
|
])) : b("", !0),
|
|
4586
|
-
n.canRename || n.canExport ? (c(), u("div",
|
|
4587
|
-
o("div",
|
|
4604
|
+
n.canRename || n.canExport ? (c(), u("div", ra)) : b("", !0),
|
|
4605
|
+
o("div", ia, [
|
|
4588
4606
|
o("button", {
|
|
4589
4607
|
type: "button",
|
|
4590
4608
|
class: "wm-mm__item",
|
|
@@ -4606,7 +4624,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4606
4624
|
o("path", { d: "M15.54 8.46a5 5 0 010 7.07M19.07 4.93a10 10 0 010 14.14" })
|
|
4607
4625
|
])
|
|
4608
4626
|
], -1)),
|
|
4609
|
-
o("span",
|
|
4627
|
+
o("span", aa, v(s.t("moreMenu.sound")), 1),
|
|
4610
4628
|
o("span", {
|
|
4611
4629
|
class: x(["wm-mm__toggle", { "wm-mm__toggle--on": r.soundOn }])
|
|
4612
4630
|
}, [...t[10] || (t[10] = [
|
|
@@ -4633,7 +4651,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4633
4651
|
o("path", { d: "M15 17h5l-1.4-1.4A2 2 0 0118 14.2V11a6 6 0 10-12 0v3.2c0 .5-.2 1-.6 1.4L4 17h5m6 0a3 3 0 11-6 0" })
|
|
4634
4652
|
])
|
|
4635
4653
|
], -1)),
|
|
4636
|
-
o("span",
|
|
4654
|
+
o("span", oa, v(s.t("moreMenu.browserNotifications")), 1),
|
|
4637
4655
|
o("span", {
|
|
4638
4656
|
class: x(["wm-mm__toggle", { "wm-mm__toggle--on": r.browserNotifOn }])
|
|
4639
4657
|
}, [...t[12] || (t[12] = [
|
|
@@ -4642,7 +4660,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4642
4660
|
])
|
|
4643
4661
|
]),
|
|
4644
4662
|
t[16] || (t[16] = o("div", { class: "wm-mm__sep" }, null, -1)),
|
|
4645
|
-
o("div",
|
|
4663
|
+
o("div", la, [
|
|
4646
4664
|
n.statusUrl ? (c(), u("button", {
|
|
4647
4665
|
key: 0,
|
|
4648
4666
|
type: "button",
|
|
@@ -4664,7 +4682,7 @@ function ha(e, t, n, i, r, s) {
|
|
|
4664
4682
|
o("path", { d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zM10 6v4l3 2" })
|
|
4665
4683
|
])
|
|
4666
4684
|
], -1)),
|
|
4667
|
-
o("span",
|
|
4685
|
+
o("span", ca, v(s.t("moreMenu.serviceStatus")), 1)
|
|
4668
4686
|
])) : b("", !0),
|
|
4669
4687
|
n.helpUrl ? (c(), u("button", {
|
|
4670
4688
|
key: 1,
|
|
@@ -4687,13 +4705,13 @@ function ha(e, t, n, i, r, s) {
|
|
|
4687
4705
|
o("path", { d: "M9 11a3 3 0 116 0c0 2-3 2-3 5M12 19h.01M12 22a10 10 0 110-20 10 10 0 010 20z" })
|
|
4688
4706
|
])
|
|
4689
4707
|
], -1)),
|
|
4690
|
-
o("span",
|
|
4708
|
+
o("span", da, v(s.t("moreMenu.helpCenter")), 1)
|
|
4691
4709
|
])) : b("", !0)
|
|
4692
4710
|
])
|
|
4693
4711
|
])
|
|
4694
4712
|
]);
|
|
4695
4713
|
}
|
|
4696
|
-
const
|
|
4714
|
+
const ha = /* @__PURE__ */ E(Ji, [["render", ua], ["__scopeId", "data-v-76281e95"]]), ma = {
|
|
4697
4715
|
name: "WmRenameDialog",
|
|
4698
4716
|
inject: {
|
|
4699
4717
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -4735,20 +4753,20 @@ const ma = /* @__PURE__ */ E(Zi, [["render", ha], ["__scopeId", "data-v-76281e95
|
|
|
4735
4753
|
this.canSubmit && this.$emit("submit", this.value.trim());
|
|
4736
4754
|
}
|
|
4737
4755
|
}
|
|
4738
|
-
},
|
|
4756
|
+
}, fa = { class: "wm-dialog" }, _a = {
|
|
4739
4757
|
class: "wm-dialog__card",
|
|
4740
4758
|
role: "dialog",
|
|
4741
4759
|
"aria-modal": "true"
|
|
4742
|
-
},
|
|
4743
|
-
function
|
|
4744
|
-
return c(), u("div",
|
|
4760
|
+
}, pa = { class: "wm-dialog__head" }, ga = { class: "wm-dialog__title" }, va = ["aria-label"], ya = { class: "wm-dialog__body" }, ba = ["placeholder"], wa = { class: "wm-dialog__actions" }, ka = ["disabled"];
|
|
4761
|
+
function Ca(e, t, n, i, r, s) {
|
|
4762
|
+
return c(), u("div", fa, [
|
|
4745
4763
|
o("div", {
|
|
4746
4764
|
class: "wm-dialog__scrim",
|
|
4747
4765
|
onClick: t[0] || (t[0] = (a) => e.$emit("close"))
|
|
4748
4766
|
}),
|
|
4749
|
-
o("div",
|
|
4750
|
-
o("div",
|
|
4751
|
-
o("div",
|
|
4767
|
+
o("div", _a, [
|
|
4768
|
+
o("div", pa, [
|
|
4769
|
+
o("div", ga, v(n.title || s.t("rename.title")), 1),
|
|
4752
4770
|
o("button", {
|
|
4753
4771
|
type: "button",
|
|
4754
4772
|
class: "wm-dialog__close",
|
|
@@ -4768,9 +4786,9 @@ function Aa(e, t, n, i, r, s) {
|
|
|
4768
4786
|
}, [
|
|
4769
4787
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
4770
4788
|
], -1)
|
|
4771
|
-
])], 8,
|
|
4789
|
+
])], 8, va)
|
|
4772
4790
|
]),
|
|
4773
|
-
o("div",
|
|
4791
|
+
o("div", ya, [
|
|
4774
4792
|
V(o("input", {
|
|
4775
4793
|
ref: "input",
|
|
4776
4794
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => r.value = a),
|
|
@@ -4782,11 +4800,11 @@ function Aa(e, t, n, i, r, s) {
|
|
|
4782
4800
|
t[3] || (t[3] = ue(X((...a) => s.onSubmit && s.onSubmit(...a), ["prevent"]), ["enter"])),
|
|
4783
4801
|
t[4] || (t[4] = ue(X((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
4784
4802
|
]
|
|
4785
|
-
}, null, 40,
|
|
4786
|
-
[
|
|
4803
|
+
}, null, 40, ba), [
|
|
4804
|
+
[ee, r.value]
|
|
4787
4805
|
])
|
|
4788
4806
|
]),
|
|
4789
|
-
o("div",
|
|
4807
|
+
o("div", wa, [
|
|
4790
4808
|
o("button", {
|
|
4791
4809
|
type: "button",
|
|
4792
4810
|
class: "wm-dialog__btn",
|
|
@@ -4797,25 +4815,25 @@ function Aa(e, t, n, i, r, s) {
|
|
|
4797
4815
|
class: "wm-dialog__btn wm-dialog__btn--primary",
|
|
4798
4816
|
disabled: !s.canSubmit,
|
|
4799
4817
|
onClick: t[6] || (t[6] = (...a) => s.onSubmit && s.onSubmit(...a))
|
|
4800
|
-
}, v(s.t("common.save")), 9,
|
|
4818
|
+
}, v(s.t("common.save")), 9, ka)
|
|
4801
4819
|
])
|
|
4802
4820
|
])
|
|
4803
4821
|
]);
|
|
4804
4822
|
}
|
|
4805
|
-
const
|
|
4823
|
+
const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8"]]), Te = "ww-messenger-tokens", Sa = {
|
|
4806
4824
|
name: "Messenger",
|
|
4807
4825
|
components: {
|
|
4808
4826
|
Launcher: jt,
|
|
4809
4827
|
Header: ln,
|
|
4810
4828
|
Onboarding: Hn,
|
|
4811
|
-
MessageList:
|
|
4812
|
-
Composer:
|
|
4813
|
-
SuggestionChips:
|
|
4814
|
-
ApprovalCard:
|
|
4815
|
-
FormCard:
|
|
4816
|
-
Feedback:
|
|
4817
|
-
MoreMenu:
|
|
4818
|
-
RenameDialog:
|
|
4829
|
+
MessageList: Lr,
|
|
4830
|
+
Composer: Qr,
|
|
4831
|
+
SuggestionChips: ei,
|
|
4832
|
+
ApprovalCard: di,
|
|
4833
|
+
FormCard: ji,
|
|
4834
|
+
Feedback: Xi,
|
|
4835
|
+
MoreMenu: ha,
|
|
4836
|
+
RenameDialog: Aa
|
|
4819
4837
|
},
|
|
4820
4838
|
mixins: [
|
|
4821
4839
|
ot,
|
|
@@ -5382,7 +5400,7 @@ const Sa = /* @__PURE__ */ E(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5382
5400
|
}
|
|
5383
5401
|
try {
|
|
5384
5402
|
this.transport = ye(
|
|
5385
|
-
|
|
5403
|
+
We({
|
|
5386
5404
|
baseUrl: this.baseUrl,
|
|
5387
5405
|
widgetId: this.widgetId,
|
|
5388
5406
|
userId: this.userId,
|
|
@@ -5648,28 +5666,28 @@ const Sa = /* @__PURE__ */ E(fa, [["render", Aa], ["__scopeId", "data-v-6d5f94a8
|
|
|
5648
5666
|
}
|
|
5649
5667
|
}
|
|
5650
5668
|
}
|
|
5651
|
-
},
|
|
5669
|
+
}, Ma = {
|
|
5652
5670
|
key: 0,
|
|
5653
5671
|
class: "wm-loading",
|
|
5654
5672
|
"aria-busy": "true",
|
|
5655
5673
|
"aria-live": "polite"
|
|
5656
|
-
},
|
|
5674
|
+
}, Ta = ["aria-label"], xa = {
|
|
5657
5675
|
key: 0,
|
|
5658
5676
|
class: "wm-state"
|
|
5659
|
-
},
|
|
5677
|
+
}, Oa = { class: "wm-state__err" }, La = { class: "wm-state__errTitle" }, Ia = { class: "wm-state__errSub" }, Ea = { class: "wm-bottom" }, Ba = {
|
|
5660
5678
|
key: 0,
|
|
5661
5679
|
ref: "floatEl",
|
|
5662
5680
|
class: "wm-float"
|
|
5663
|
-
},
|
|
5681
|
+
}, Ra = {
|
|
5664
5682
|
key: 1,
|
|
5665
5683
|
class: "wm-actionWait",
|
|
5666
5684
|
role: "status",
|
|
5667
5685
|
"aria-live": "polite"
|
|
5668
|
-
},
|
|
5686
|
+
}, Na = { class: "wm-actionWait__lbl" }, Fa = {
|
|
5669
5687
|
key: 2,
|
|
5670
5688
|
class: "wm-attached"
|
|
5671
|
-
},
|
|
5672
|
-
function
|
|
5689
|
+
}, ja = ["aria-label", "onClick"];
|
|
5690
|
+
function Pa(e, t, n, i, r, s) {
|
|
5673
5691
|
const a = I("Launcher"), l = I("Header"), g = I("Onboarding"), C = I("MessageList"), k = I("ApprovalCard"), T = I("FormCard"), B = I("Feedback"), A = I("SuggestionChips"), H = I("Composer"), M = I("MoreMenu"), D = I("RenameDialog");
|
|
5674
5692
|
return c(), u("div", {
|
|
5675
5693
|
class: x(["wm-root", `wm-root--${n.displayMode}`])
|
|
@@ -5684,11 +5702,11 @@ function Da(e, t, n, i, r, s) {
|
|
|
5684
5702
|
r.isOpen || s.isEmbedded ? (c(), u("section", {
|
|
5685
5703
|
key: 1,
|
|
5686
5704
|
class: x(["wm-panel", `wm-panel--${n.displayMode}`]),
|
|
5687
|
-
style:
|
|
5705
|
+
style: K(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
5688
5706
|
role: "dialog",
|
|
5689
5707
|
"aria-label": "Messenger"
|
|
5690
5708
|
}, [
|
|
5691
|
-
!s.ready && !s.error ? (c(), u("div",
|
|
5709
|
+
!s.ready && !s.error ? (c(), u("div", Ma, [
|
|
5692
5710
|
s.isEmbedded ? b("", !0) : (c(), u("button", {
|
|
5693
5711
|
key: 0,
|
|
5694
5712
|
type: "button",
|
|
@@ -5709,7 +5727,7 @@ function Da(e, t, n, i, r, s) {
|
|
|
5709
5727
|
}, [
|
|
5710
5728
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5711
5729
|
], -1)
|
|
5712
|
-
])], 8,
|
|
5730
|
+
])], 8, Ta)),
|
|
5713
5731
|
t[6] || (t[6] = o("div", {
|
|
5714
5732
|
class: "wm-loading__spinner",
|
|
5715
5733
|
"aria-hidden": "true"
|
|
@@ -5727,8 +5745,8 @@ function Da(e, t, n, i, r, s) {
|
|
|
5727
5745
|
onMore: s.toggleMore,
|
|
5728
5746
|
onClose: s.close
|
|
5729
5747
|
}, null, 8, ["title", "team-members", "response-label", "show-identity", "show-back", "show-close", "more-active", "onBack", "onMore", "onClose"]),
|
|
5730
|
-
s.error ? (c(), u("div",
|
|
5731
|
-
o("div",
|
|
5748
|
+
s.error ? (c(), u("div", xa, [
|
|
5749
|
+
o("div", Oa, [
|
|
5732
5750
|
t[7] || (t[7] = o("div", { class: "wm-state__errIcon" }, [
|
|
5733
5751
|
o("svg", {
|
|
5734
5752
|
width: "14",
|
|
@@ -5745,8 +5763,8 @@ function Da(e, t, n, i, r, s) {
|
|
|
5745
5763
|
])
|
|
5746
5764
|
], -1)),
|
|
5747
5765
|
o("div", null, [
|
|
5748
|
-
o("div",
|
|
5749
|
-
o("div",
|
|
5766
|
+
o("div", La, v(s.t("error.connectionFailed")), 1),
|
|
5767
|
+
o("div", Ia, v(s.error), 1)
|
|
5750
5768
|
])
|
|
5751
5769
|
])
|
|
5752
5770
|
])) : s.currentConv ? (c(), u(L, { key: 2 }, [
|
|
@@ -5762,8 +5780,8 @@ function Da(e, t, n, i, r, s) {
|
|
|
5762
5780
|
"unread-boundary-ts": e.unreadBoundaryTs,
|
|
5763
5781
|
onLoadMore: s.onLoadMore
|
|
5764
5782
|
}, null, 8, ["messages", "streaming-active", "date-label", "conversation-id", "loading-more", "has-more", "unread-anchor-id", "unread-boundary-ts", "onLoadMore"]),
|
|
5765
|
-
o("div",
|
|
5766
|
-
s.floatVisible ? (c(), u("div",
|
|
5783
|
+
o("div", Ea, [
|
|
5784
|
+
s.floatVisible ? (c(), u("div", Ba, [
|
|
5767
5785
|
s.approvalReady ? (c(), R(k, {
|
|
5768
5786
|
key: 0,
|
|
5769
5787
|
action: s.approvalTitle,
|
|
@@ -5785,12 +5803,12 @@ function Da(e, t, n, i, r, s) {
|
|
|
5785
5803
|
onSelect: s.onSuggestion
|
|
5786
5804
|
}, null, 8, ["items", "onSelect"]))
|
|
5787
5805
|
], 512)) : b("", !0),
|
|
5788
|
-
s.actionInFlight ? (c(), u("div",
|
|
5806
|
+
s.actionInFlight ? (c(), u("div", Ra, [
|
|
5789
5807
|
t[8] || (t[8] = o("span", {
|
|
5790
5808
|
class: "wm-actionWait__spinner",
|
|
5791
5809
|
"aria-hidden": "true"
|
|
5792
5810
|
}, null, -1)),
|
|
5793
|
-
o("span",
|
|
5811
|
+
o("span", Na, v(s.t("action.inProgress", {
|
|
5794
5812
|
name: s.actionInFlightName
|
|
5795
5813
|
})), 1)
|
|
5796
5814
|
])) : (c(), R(H, {
|
|
@@ -5825,7 +5843,7 @@ function Da(e, t, n, i, r, s) {
|
|
|
5825
5843
|
onClose: t[3] || (t[3] = (N) => r.renameDialogOpen = !1),
|
|
5826
5844
|
onSubmit: s.onRenameSubmit
|
|
5827
5845
|
}, null, 8, ["initial-value", "title", "onSubmit"])) : b("", !0),
|
|
5828
|
-
r.pendingAttachments.length ? (c(), u("div",
|
|
5846
|
+
r.pendingAttachments.length ? (c(), u("div", Fa, [
|
|
5829
5847
|
(c(!0), u(L, null, j(r.pendingAttachments, (N, $) => (c(), u("div", {
|
|
5830
5848
|
key: $,
|
|
5831
5849
|
class: "wm-attached__chip"
|
|
@@ -5847,7 +5865,7 @@ function Da(e, t, n, i, r, s) {
|
|
|
5847
5865
|
o("button", {
|
|
5848
5866
|
type: "button",
|
|
5849
5867
|
"aria-label": s.t("attachment.remove"),
|
|
5850
|
-
onClick: (
|
|
5868
|
+
onClick: (W) => r.pendingAttachments.splice($, 1)
|
|
5851
5869
|
}, [...t[9] || (t[9] = [
|
|
5852
5870
|
o("svg", {
|
|
5853
5871
|
width: "10",
|
|
@@ -5862,7 +5880,7 @@ function Da(e, t, n, i, r, s) {
|
|
|
5862
5880
|
}, [
|
|
5863
5881
|
o("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5864
5882
|
], -1)
|
|
5865
|
-
])], 8,
|
|
5883
|
+
])], 8, ja)
|
|
5866
5884
|
]))), 128))
|
|
5867
5885
|
])) : b("", !0)
|
|
5868
5886
|
], 64)) : (c(), R(g, {
|
|
@@ -5893,53 +5911,53 @@ function Da(e, t, n, i, r, s) {
|
|
|
5893
5911
|
], 6)) : b("", !0)
|
|
5894
5912
|
], 2);
|
|
5895
5913
|
}
|
|
5896
|
-
const
|
|
5914
|
+
const $a = /* @__PURE__ */ E(Sa, [["render", Pa], ["__scopeId", "data-v-d9dce1ad"]]), Ha = "0.4.3";
|
|
5897
5915
|
export {
|
|
5898
5916
|
le as AIAvatar,
|
|
5899
5917
|
fe as AVATAR_COLORS,
|
|
5900
5918
|
es as ActionResult,
|
|
5901
|
-
|
|
5919
|
+
di as ApprovalCard,
|
|
5902
5920
|
cs as ArtifactFormResponse,
|
|
5903
5921
|
ks as ArtifactInfoCard,
|
|
5904
5922
|
$s as ArtifactRenderer,
|
|
5905
5923
|
js as ArtifactTicket,
|
|
5906
5924
|
Zs as AttachmentPreview,
|
|
5907
5925
|
sr as Bubble,
|
|
5908
|
-
|
|
5926
|
+
Qr as Composer,
|
|
5909
5927
|
Ze as DEFAULT_BASE_URL,
|
|
5910
5928
|
ie as DEFAULT_LANGUAGE,
|
|
5911
|
-
|
|
5912
|
-
|
|
5929
|
+
Xi as Feedback,
|
|
5930
|
+
ji as FormCard,
|
|
5913
5931
|
ln as Header,
|
|
5914
5932
|
Ee as HumanAvatar,
|
|
5915
5933
|
jt as Launcher,
|
|
5916
5934
|
ve as MEDIA_RECORDER_SUPPORTED,
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5935
|
+
Lr as MessageList,
|
|
5936
|
+
$a as Messenger,
|
|
5937
|
+
ha as MoreMenu,
|
|
5920
5938
|
Hn as Onboarding,
|
|
5921
5939
|
he as SCREEN_CAPTURE_SUPPORTED,
|
|
5922
5940
|
et as SUPPORTED_LANGUAGES,
|
|
5923
|
-
|
|
5941
|
+
ei as SuggestionChips,
|
|
5924
5942
|
Gt as TeamAvatars,
|
|
5925
5943
|
or as Typing,
|
|
5926
|
-
|
|
5944
|
+
Ha as VERSION,
|
|
5927
5945
|
xe as avatarColor,
|
|
5928
5946
|
Oe as avatarInitials,
|
|
5929
|
-
|
|
5947
|
+
Er as captureScreenshotFile,
|
|
5930
5948
|
U as colors,
|
|
5931
5949
|
Xe as createStore,
|
|
5932
5950
|
P as createTranslator,
|
|
5933
|
-
|
|
5951
|
+
We as createTransport,
|
|
5934
5952
|
oe as dateLocale,
|
|
5935
|
-
|
|
5953
|
+
$a as default,
|
|
5936
5954
|
Le as formatTime,
|
|
5937
|
-
|
|
5938
|
-
|
|
5955
|
+
Ua as guessAttachmentKind,
|
|
5956
|
+
Ir as pickRecorderMime,
|
|
5939
5957
|
dn as renderInlineMarkdown,
|
|
5940
5958
|
un as renderMarkdown,
|
|
5941
5959
|
ge as resolveLanguage,
|
|
5942
|
-
|
|
5960
|
+
Rr as startScreenRecording,
|
|
5943
5961
|
Je as tokensCss,
|
|
5944
5962
|
Qe as uuid,
|
|
5945
5963
|
Qe as v4
|