@_solaris/messenger-widget 0.6.10 → 0.6.11
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 +5 -5
- package/dist/messenger.cjs +3 -3
- package/dist/messenger.js +142 -125
- 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 We, openBlock as c, createElementBlock as d, normalizeStyle as
|
|
1
|
+
import { reactive as We, openBlock as c, createElementBlock as d, normalizeStyle as N, normalizeClass as x, toDisplayString as v, resolveComponent as P, createVNode as K, Transition as Ae, withCtx as Se, Fragment as I, renderList as F, withKeys as _e, withModifiers as G, createElementVNode as l, createCommentVNode as b, createBlock as B, resolveDynamicComponent as Te, mergeProps as je, withDirectives as $, vModelText as ee, createTextVNode as Me, renderSlot as $e, vModelCheckbox as Ge, vModelSelect as Ye, markRaw as Ee } from "vue";
|
|
2
2
|
const Je = [
|
|
3
3
|
"connected",
|
|
4
4
|
"message",
|
|
@@ -141,7 +141,7 @@ function tt(e) {
|
|
|
141
141
|
}
|
|
142
142
|
async function k() {
|
|
143
143
|
try {
|
|
144
|
-
const u = await
|
|
144
|
+
const u = await E();
|
|
145
145
|
t.lastActivityAt = u.reduce((g, p) => {
|
|
146
146
|
const L = p == null ? void 0 : p.last_message_at;
|
|
147
147
|
return L && (!g || L > g) ? L : g;
|
|
@@ -158,7 +158,7 @@ function tt(e) {
|
|
|
158
158
|
const g = await a("PATCH", "/customers/me", u);
|
|
159
159
|
return (g == null ? void 0 : g.customer) ?? null;
|
|
160
160
|
}
|
|
161
|
-
async function
|
|
161
|
+
async function E() {
|
|
162
162
|
const u = await a("GET", "/conversations");
|
|
163
163
|
return (u == null ? void 0 : u.conversations) ?? [];
|
|
164
164
|
}
|
|
@@ -281,7 +281,7 @@ function tt(e) {
|
|
|
281
281
|
}
|
|
282
282
|
async function pe() {
|
|
283
283
|
try {
|
|
284
|
-
const u = await
|
|
284
|
+
const u = await E(), g = u.reduce((L, R) => {
|
|
285
285
|
const V = R == null ? void 0 : R.last_message_at;
|
|
286
286
|
return V && (!L || V > L) ? V : L;
|
|
287
287
|
}, null);
|
|
@@ -340,7 +340,7 @@ function tt(e) {
|
|
|
340
340
|
// REST
|
|
341
341
|
getCustomer: y,
|
|
342
342
|
patchCustomer: T,
|
|
343
|
-
listConversations:
|
|
343
|
+
listConversations: E,
|
|
344
344
|
createConversation: S,
|
|
345
345
|
getConversation: z,
|
|
346
346
|
patchConversation: M,
|
|
@@ -552,7 +552,7 @@ function it(e) {
|
|
|
552
552
|
const _ = await e.patchConversation(h, m), w = t.conversations.findIndex((A) => A.id === h);
|
|
553
553
|
w !== -1 && (t.conversations[w] = _);
|
|
554
554
|
}
|
|
555
|
-
async function
|
|
555
|
+
async function E(h) {
|
|
556
556
|
if (!h) return [];
|
|
557
557
|
const m = t.messagesByConv[h] || [];
|
|
558
558
|
let _ = "";
|
|
@@ -774,7 +774,7 @@ function it(e) {
|
|
|
774
774
|
createConversation: a,
|
|
775
775
|
openConversation: f,
|
|
776
776
|
loadMore: k,
|
|
777
|
-
fetchSinceLast:
|
|
777
|
+
fetchSinceLast: E,
|
|
778
778
|
patchConversation: T,
|
|
779
779
|
markConversationRead: S,
|
|
780
780
|
send: z,
|
|
@@ -872,7 +872,7 @@ const at = `
|
|
|
872
872
|
function ut(e) {
|
|
873
873
|
return typeof e != "string" || !e || e.length > 64 ? !1 : ct.test(e) || dt.test(e) || lt.test(e);
|
|
874
874
|
}
|
|
875
|
-
function
|
|
875
|
+
function Ie(e) {
|
|
876
876
|
if (typeof e != "string" || !e || e.length > 2048 || /["'()\\;\s<>]/.test(e)) return null;
|
|
877
877
|
let t;
|
|
878
878
|
try {
|
|
@@ -1278,10 +1278,10 @@ function _t(e) {
|
|
|
1278
1278
|
if (!S) break;
|
|
1279
1279
|
y.push(S[1]), r++;
|
|
1280
1280
|
}
|
|
1281
|
-
const T = y.map((S) => `<li>${de(S)}</li>`).join(""),
|
|
1281
|
+
const T = y.map((S) => `<li>${de(S)}</li>`).join(""), E = k !== 1 ? ` start="${k}"` : "";
|
|
1282
1282
|
s.push({
|
|
1283
1283
|
type: "block",
|
|
1284
|
-
html: `<ol class="wm-md-ol"${
|
|
1284
|
+
html: `<ol class="wm-md-ol"${E}>${T}</ol>`
|
|
1285
1285
|
});
|
|
1286
1286
|
continue;
|
|
1287
1287
|
}
|
|
@@ -1841,7 +1841,7 @@ const U = (e, t) => {
|
|
|
1841
1841
|
function Mt(e, t, s, r, i, n) {
|
|
1842
1842
|
return c(), d("div", {
|
|
1843
1843
|
class: x(["wm-huav", { "wm-huav--tail": s.tail }]),
|
|
1844
|
-
style:
|
|
1844
|
+
style: N({
|
|
1845
1845
|
width: s.size + "px",
|
|
1846
1846
|
height: s.size + "px",
|
|
1847
1847
|
"--wm-avr": Math.round(s.size * 0.32) + "px",
|
|
@@ -1854,7 +1854,7 @@ function Mt(e, t, s, r, i, n) {
|
|
|
1854
1854
|
alt: s.name || ""
|
|
1855
1855
|
}, null, 8, Tt)) : (c(), d("span", {
|
|
1856
1856
|
key: 1,
|
|
1857
|
-
style:
|
|
1857
|
+
style: N({ fontSize: s.size * 0.36 + "px" })
|
|
1858
1858
|
}, v(n.initials), 5))
|
|
1859
1859
|
], 6);
|
|
1860
1860
|
}
|
|
@@ -1884,7 +1884,7 @@ const ve = /* @__PURE__ */ U(St, [["render", Mt], ["__scopeId", "data-v-14e10c0d
|
|
|
1884
1884
|
return this.peeks.slice(0, xt).reverse();
|
|
1885
1885
|
}
|
|
1886
1886
|
}
|
|
1887
|
-
}, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"],
|
|
1887
|
+
}, Rt = ["aria-label", "onClick", "onKeydown"], Lt = ["aria-label", "onClick"], Et = { class: "wm-peek__avatar" }, It = ["aria-label"], Bt = { class: "wm-peek__body" }, Pt = { class: "wm-peek__head" }, Ut = { class: "wm-peek__name" }, Dt = { class: "wm-peek__action" }, Ft = { class: "wm-peek__text" }, Nt = ["onClick"], Ht = ["aria-label"], jt = ["aria-label"];
|
|
1888
1888
|
function zt(e, t, s, r, i, n) {
|
|
1889
1889
|
const a = P("HumanAvatar");
|
|
1890
1890
|
return c(), d("div", {
|
|
@@ -1900,10 +1900,10 @@ function zt(e, t, s, r, i, n) {
|
|
|
1900
1900
|
key: 0,
|
|
1901
1901
|
class: x(["wm-peekStack", { "wm-peekStack--multi": n.visiblePeeks.length > 1 }])
|
|
1902
1902
|
}, [
|
|
1903
|
-
(c(!0), d(
|
|
1903
|
+
(c(!0), d(I, null, F(n.visiblePeeks, (o, f) => (c(), d("div", {
|
|
1904
1904
|
key: o.convId,
|
|
1905
1905
|
class: "wm-peek",
|
|
1906
|
-
style:
|
|
1906
|
+
style: N({
|
|
1907
1907
|
"--depth": n.visiblePeeks.length - 1 - f,
|
|
1908
1908
|
zIndex: f + 1
|
|
1909
1909
|
}),
|
|
@@ -1938,7 +1938,7 @@ function zt(e, t, s, r, i, n) {
|
|
|
1938
1938
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
1939
1939
|
], -1)
|
|
1940
1940
|
])], 8, Lt),
|
|
1941
|
-
l("div",
|
|
1941
|
+
l("div", Et, [
|
|
1942
1942
|
K(a, {
|
|
1943
1943
|
name: o.senderName,
|
|
1944
1944
|
"avatar-url": o.senderAvatarUrl,
|
|
@@ -1948,20 +1948,20 @@ function zt(e, t, s, r, i, n) {
|
|
|
1948
1948
|
key: 0,
|
|
1949
1949
|
class: "wm-peek__avatarBadge",
|
|
1950
1950
|
"aria-label": n.t("launcher.unreadMessages", { count: o.count })
|
|
1951
|
-
}, v(o.count > 9 ? "9+" : o.count), 9,
|
|
1951
|
+
}, v(o.count > 9 ? "9+" : o.count), 9, It)) : b("", !0)
|
|
1952
1952
|
]),
|
|
1953
1953
|
l("div", Bt, [
|
|
1954
1954
|
l("div", Pt, [
|
|
1955
1955
|
l("span", Ut, v(o.senderName || n.t("common.agent")), 1),
|
|
1956
1956
|
l("span", Dt, v(n.t("launcher.repliedToYou")), 1)
|
|
1957
1957
|
]),
|
|
1958
|
-
l("p",
|
|
1958
|
+
l("p", Ft, v(o.preview), 1)
|
|
1959
1959
|
]),
|
|
1960
1960
|
l("button", {
|
|
1961
1961
|
type: "button",
|
|
1962
1962
|
class: "wm-peek__open",
|
|
1963
1963
|
onClick: G((k) => e.$emit("open", o.convId), ["stop"])
|
|
1964
|
-
}, v(n.t("common.open")), 9,
|
|
1964
|
+
}, v(n.t("common.open")), 9, Nt)
|
|
1965
1965
|
], 44, Rt))), 128))
|
|
1966
1966
|
], 2)) : b("", !0)
|
|
1967
1967
|
]),
|
|
@@ -2034,7 +2034,7 @@ const qt = /* @__PURE__ */ U(Ot, [["render", zt], ["__scopeId", "data-v-d81459bc
|
|
|
2034
2034
|
function Gt(e, t, s, r, i, n) {
|
|
2035
2035
|
return c(), d("div", {
|
|
2036
2036
|
class: x(["wm-aiav", { "wm-aiav--tail": s.tail }]),
|
|
2037
|
-
style:
|
|
2037
|
+
style: N({
|
|
2038
2038
|
width: s.size + "px",
|
|
2039
2039
|
height: s.size + "px",
|
|
2040
2040
|
"--wm-avr": s.size * 0.32 + "px"
|
|
@@ -2047,7 +2047,7 @@ function Gt(e, t, s, r, i, n) {
|
|
|
2047
2047
|
"wm-aiav__inner--img": !!s.imageUrl,
|
|
2048
2048
|
"wm-aiav__inner--initials": !s.imageUrl && !!n.initials
|
|
2049
2049
|
}]),
|
|
2050
|
-
style:
|
|
2050
|
+
style: N(
|
|
2051
2051
|
!s.imageUrl && n.initials ? { background: n.bgColor } : null
|
|
2052
2052
|
)
|
|
2053
2053
|
}, [
|
|
@@ -2057,7 +2057,7 @@ function Gt(e, t, s, r, i, n) {
|
|
|
2057
2057
|
alt: s.name || ""
|
|
2058
2058
|
}, null, 8, Wt)) : n.initials ? (c(), d("span", {
|
|
2059
2059
|
key: 1,
|
|
2060
|
-
style:
|
|
2060
|
+
style: N({ fontSize: s.size * 0.36 + "px" })
|
|
2061
2061
|
}, v(n.initials), 5)) : (c(), d("svg", {
|
|
2062
2062
|
key: 2,
|
|
2063
2063
|
width: s.size * 0.5,
|
|
@@ -2122,12 +2122,12 @@ function en(e, t, s, r, i, n) {
|
|
|
2122
2122
|
return n.visible ? (c(), d("div", Jt, [
|
|
2123
2123
|
l("div", {
|
|
2124
2124
|
class: "wm-team__stack",
|
|
2125
|
-
style:
|
|
2125
|
+
style: N({ width: n.stackWidth + "px" })
|
|
2126
2126
|
}, [
|
|
2127
|
-
(c(!0), d(
|
|
2127
|
+
(c(!0), d(I, null, F(s.members.slice(0, 3), (a, o) => (c(), d("div", {
|
|
2128
2128
|
key: o,
|
|
2129
2129
|
class: "wm-team__pill",
|
|
2130
|
-
style:
|
|
2130
|
+
style: N({
|
|
2131
2131
|
left: o * 13 + "px",
|
|
2132
2132
|
zIndex: 3 - o,
|
|
2133
2133
|
background: n.colorFor(a)
|
|
@@ -2213,7 +2213,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2213
2213
|
l("path", { d: "M19 12H5M12 5l-7 7 7 7" })
|
|
2214
2214
|
], -1)
|
|
2215
2215
|
])], 8, rn)) : (c(), d("div", an)),
|
|
2216
|
-
s.showIdentity ? (c(), d(
|
|
2216
|
+
s.showIdentity ? (c(), d(I, { key: 2 }, [
|
|
2217
2217
|
l("div", on, [
|
|
2218
2218
|
K(a, {
|
|
2219
2219
|
size: 30,
|
|
@@ -2288,7 +2288,7 @@ function fn(e, t, s, r, i, n) {
|
|
|
2288
2288
|
])
|
|
2289
2289
|
]);
|
|
2290
2290
|
}
|
|
2291
|
-
const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]),
|
|
2291
|
+
const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118"]]), Fe = {
|
|
2292
2292
|
book: "M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253",
|
|
2293
2293
|
changelog: "M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",
|
|
2294
2294
|
status: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",
|
|
@@ -2358,7 +2358,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2358
2358
|
// safety check as the quick-link icons (cf. safeIconUrl) so a
|
|
2359
2359
|
// malformed config can't inject CSS into the background declaration.
|
|
2360
2360
|
safeCoverUrl() {
|
|
2361
|
-
return
|
|
2361
|
+
return Ie(this.coverImageUrl);
|
|
2362
2362
|
},
|
|
2363
2363
|
hasCover() {
|
|
2364
2364
|
return !!this.safeCoverUrl;
|
|
@@ -2409,7 +2409,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2409
2409
|
return new Promise((t) => window.setTimeout(t, e));
|
|
2410
2410
|
},
|
|
2411
2411
|
iconPath(e) {
|
|
2412
|
-
return
|
|
2412
|
+
return Fe[e] || Fe.link;
|
|
2413
2413
|
},
|
|
2414
2414
|
// True when activating the link opens an external destination
|
|
2415
2415
|
// (full URL or relative path) — anchor links (`#…`, which route
|
|
@@ -2423,7 +2423,7 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2423
2423
|
// on the masked-glyph span and as the source of `--icon-url`
|
|
2424
2424
|
// (cf. iconUrlStyle).
|
|
2425
2425
|
safeIconUrl(e) {
|
|
2426
|
-
return
|
|
2426
|
+
return Ie(e == null ? void 0 : e.icon_url);
|
|
2427
2427
|
},
|
|
2428
2428
|
// Inline style exposing the link's icon_url as a CSS custom
|
|
2429
2429
|
// property — only when the URL passes the safety gate, so a
|
|
@@ -2508,10 +2508,10 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2508
2508
|
}, Sn = ["aria-label"], Tn = { class: "wm-onb__alert-body" }, Mn = { class: "wm-onb__alert-title" }, xn = { class: "wm-onb__alert-preview" }, On = {
|
|
2509
2509
|
key: 0,
|
|
2510
2510
|
class: "wm-onb__alert-sender"
|
|
2511
|
-
}, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" },
|
|
2511
|
+
}, Rn = ["innerHTML"], Ln = { class: "wm-onb__alert-meta" }, En = {
|
|
2512
2512
|
key: 0,
|
|
2513
2513
|
class: "wm-onb__alert-time"
|
|
2514
|
-
},
|
|
2514
|
+
}, In = { class: "wm-onb__alert-resume" }, Bn = { class: "wm-onb__actions" }, Pn = ["placeholder", "disabled", "aria-label"], Un = ["disabled", "aria-label"], Dn = {
|
|
2515
2515
|
key: 0,
|
|
2516
2516
|
width: "16",
|
|
2517
2517
|
height: "16",
|
|
@@ -2522,11 +2522,11 @@ const _n = /* @__PURE__ */ U(nn, [["render", fn], ["__scopeId", "data-v-7af4c118
|
|
|
2522
2522
|
"stroke-linecap": "round",
|
|
2523
2523
|
"stroke-linejoin": "round",
|
|
2524
2524
|
"aria-hidden": "true"
|
|
2525
|
-
},
|
|
2525
|
+
}, Fn = {
|
|
2526
2526
|
key: 1,
|
|
2527
2527
|
class: "wm-onb__starter-spinner",
|
|
2528
2528
|
"aria-hidden": "true"
|
|
2529
|
-
},
|
|
2529
|
+
}, Nn = ["onClick"], Hn = { class: "wm-onb__btn-icon" }, jn = ["aria-label"], zn = {
|
|
2530
2530
|
key: 1,
|
|
2531
2531
|
width: "18",
|
|
2532
2532
|
height: "18",
|
|
@@ -2574,7 +2574,7 @@ function Xn(e, t, s, r, i, n) {
|
|
|
2574
2574
|
n.hasCover ? (c(), d("div", {
|
|
2575
2575
|
key: 0,
|
|
2576
2576
|
class: "wm-onb__cover",
|
|
2577
|
-
style:
|
|
2577
|
+
style: N(n.coverStyle),
|
|
2578
2578
|
role: "img",
|
|
2579
2579
|
"aria-label": n.heroTitle
|
|
2580
2580
|
}, null, 12, vn)) : b("", !0),
|
|
@@ -2615,7 +2615,7 @@ function Xn(e, t, s, r, i, n) {
|
|
|
2615
2615
|
])
|
|
2616
2616
|
], 2),
|
|
2617
2617
|
n.unreadThreads.length ? (c(), d("div", kn, [
|
|
2618
|
-
(c(!0), d(
|
|
2618
|
+
(c(!0), d(I, null, F(n.unreadThreads, (o) => (c(), d("button", {
|
|
2619
2619
|
key: o.id,
|
|
2620
2620
|
type: "button",
|
|
2621
2621
|
class: "wm-onb__alert",
|
|
@@ -2657,8 +2657,8 @@ function Xn(e, t, s, r, i, n) {
|
|
|
2657
2657
|
])
|
|
2658
2658
|
]),
|
|
2659
2659
|
l("span", Ln, [
|
|
2660
|
-
n.formatTs(o._ts) ? (c(), d("span",
|
|
2661
|
-
l("span",
|
|
2660
|
+
n.formatTs(o._ts) ? (c(), d("span", En, v(n.formatTs(o._ts)), 1)) : b("", !0),
|
|
2661
|
+
l("span", In, v(n.t("onboarding.resume")), 1)
|
|
2662
2662
|
])
|
|
2663
2663
|
], 8, Cn))), 128))
|
|
2664
2664
|
])) : b("", !0),
|
|
@@ -2689,12 +2689,12 @@ function Xn(e, t, s, r, i, n) {
|
|
|
2689
2689
|
disabled: s.busy || !n.canStart,
|
|
2690
2690
|
"aria-label": n.t("composer.send")
|
|
2691
2691
|
}, [
|
|
2692
|
-
s.busy ? (c(), d("span",
|
|
2692
|
+
s.busy ? (c(), d("span", Fn)) : (c(), d("svg", Dn, [...t[5] || (t[5] = [
|
|
2693
2693
|
l("path", { d: "M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" }, null, -1)
|
|
2694
2694
|
])]))
|
|
2695
2695
|
], 10, Un)
|
|
2696
2696
|
], 34),
|
|
2697
|
-
(c(!0), d(
|
|
2697
|
+
(c(!0), d(I, null, F(s.quickLinks, (o, f) => (c(), d("button", {
|
|
2698
2698
|
key: "ql-" + f,
|
|
2699
2699
|
type: "button",
|
|
2700
2700
|
class: "wm-onb__btn",
|
|
@@ -2704,7 +2704,7 @@ function Xn(e, t, s, r, i, n) {
|
|
|
2704
2704
|
n.safeIconUrl(o) ? (c(), d("span", {
|
|
2705
2705
|
key: 0,
|
|
2706
2706
|
class: "wm-onb__btn-iconImg",
|
|
2707
|
-
style:
|
|
2707
|
+
style: N(n.iconUrlStyle(o)),
|
|
2708
2708
|
role: "img",
|
|
2709
2709
|
"aria-label": o.label || ""
|
|
2710
2710
|
}, null, 12, jn)) : (c(), d("svg", zn, [
|
|
@@ -2717,7 +2717,7 @@ function Xn(e, t, s, r, i, n) {
|
|
|
2717
2717
|
n.isExternalLink(o) ? (c(), d("svg", Kn, [...t[6] || (t[6] = [
|
|
2718
2718
|
l("path", { d: "M7 17L17 7M9 7h8v8" }, null, -1)
|
|
2719
2719
|
])])) : b("", !0)
|
|
2720
|
-
], 8,
|
|
2720
|
+
], 8, Nn))), 128)),
|
|
2721
2721
|
s.openThreads.length ? (c(), d("button", {
|
|
2722
2722
|
key: 0,
|
|
2723
2723
|
type: "button",
|
|
@@ -2858,7 +2858,7 @@ function ms(e, t, s, r, i, n) {
|
|
|
2858
2858
|
])
|
|
2859
2859
|
]),
|
|
2860
2860
|
l("div", ss, [
|
|
2861
|
-
(c(!0), d(
|
|
2861
|
+
(c(!0), d(I, null, F(n.filteredThreads, (a) => (c(), d("button", {
|
|
2862
2862
|
key: a.id,
|
|
2863
2863
|
type: "button",
|
|
2864
2864
|
class: x(["wm-hist__thread", { "wm-hist__thread--unread": a.unread }]),
|
|
@@ -3015,7 +3015,7 @@ function Ss(e, t, s, r, i, n) {
|
|
|
3015
3015
|
]),
|
|
3016
3016
|
l("span", ks, [
|
|
3017
3017
|
l("span", Cs, v(s.label), 1),
|
|
3018
|
-
n.detailText ? (c(), d(
|
|
3018
|
+
n.detailText ? (c(), d(I, { key: 0 }, [
|
|
3019
3019
|
t[4] || (t[4] = l("span", {
|
|
3020
3020
|
class: "wm-result__sep",
|
|
3021
3021
|
"aria-hidden": "true"
|
|
@@ -3041,7 +3041,7 @@ const Ts = /* @__PURE__ */ U(gs, [["render", Ss], ["__scopeId", "data-v-7284acd0
|
|
|
3041
3041
|
return Array.isArray((e = this.data) == null ? void 0 : e.fields) ? this.data.fields : [];
|
|
3042
3042
|
}
|
|
3043
3043
|
}
|
|
3044
|
-
}, xs = { class: "wm-art wm-art--formResponse" }, Os = { class: "wm-art__head" }, Rs = { class: "wm-art__title" }, Ls = { class: "wm-art__badge wm-art__badge--success" },
|
|
3044
|
+
}, xs = { class: "wm-art wm-art--formResponse" }, Os = { class: "wm-art__head" }, Rs = { class: "wm-art__title" }, Ls = { class: "wm-art__badge wm-art__badge--success" }, Es = { class: "wm-art__body" }, Is = { class: "wm-art__fieldLabel" };
|
|
3045
3045
|
function Bs(e, t, s, r, i, n) {
|
|
3046
3046
|
return c(), d("div", xs, [
|
|
3047
3047
|
l("div", Os, [
|
|
@@ -3063,12 +3063,12 @@ function Bs(e, t, s, r, i, n) {
|
|
|
3063
3063
|
Me(" " + v(n.t("form.sent")), 1)
|
|
3064
3064
|
])
|
|
3065
3065
|
]),
|
|
3066
|
-
l("div",
|
|
3067
|
-
(c(!0), d(
|
|
3066
|
+
l("div", Es, [
|
|
3067
|
+
(c(!0), d(I, null, F(n.fields, (a, o) => (c(), d("div", {
|
|
3068
3068
|
key: o,
|
|
3069
3069
|
class: "wm-art__field"
|
|
3070
3070
|
}, [
|
|
3071
|
-
l("div",
|
|
3071
|
+
l("div", Is, v(a.label), 1),
|
|
3072
3072
|
l("div", {
|
|
3073
3073
|
class: x([
|
|
3074
3074
|
"wm-art__fieldValue",
|
|
@@ -3094,10 +3094,10 @@ const Ps = /* @__PURE__ */ U(Ms, [["render", Bs], ["__scopeId", "data-v-713aecf1
|
|
|
3094
3094
|
return !!((e = this.data) != null && e.body) || this.fields.length > 0;
|
|
3095
3095
|
}
|
|
3096
3096
|
}
|
|
3097
|
-
}, Ds = { class: "wm-art wm-art--infoCard" },
|
|
3097
|
+
}, Ds = { class: "wm-art wm-art--infoCard" }, Fs = {
|
|
3098
3098
|
key: 0,
|
|
3099
3099
|
class: "wm-art__image"
|
|
3100
|
-
},
|
|
3100
|
+
}, Ns = ["src", "alt"], Hs = { class: "wm-art__head" }, js = { class: "wm-art__headMain" }, zs = { class: "wm-art__title" }, qs = {
|
|
3101
3101
|
key: 0,
|
|
3102
3102
|
class: "wm-art__subtitle"
|
|
3103
3103
|
}, Vs = {
|
|
@@ -3109,12 +3109,12 @@ const Ps = /* @__PURE__ */ U(Ms, [["render", Bs], ["__scopeId", "data-v-713aecf1
|
|
|
3109
3109
|
}, Ws = { class: "wm-art__fieldLabel" };
|
|
3110
3110
|
function $s(e, t, s, r, i, n) {
|
|
3111
3111
|
return c(), d("div", Ds, [
|
|
3112
|
-
s.data.image_url ? (c(), d("figure",
|
|
3112
|
+
s.data.image_url ? (c(), d("figure", Fs, [
|
|
3113
3113
|
l("img", {
|
|
3114
3114
|
src: s.data.image_url,
|
|
3115
3115
|
alt: s.data.title || "",
|
|
3116
3116
|
loading: "lazy"
|
|
3117
|
-
}, null, 8,
|
|
3117
|
+
}, null, 8, Ns)
|
|
3118
3118
|
])) : b("", !0),
|
|
3119
3119
|
l("div", Hs, [
|
|
3120
3120
|
l("div", js, [
|
|
@@ -3131,7 +3131,7 @@ function $s(e, t, s, r, i, n) {
|
|
|
3131
3131
|
]),
|
|
3132
3132
|
n.hasBody ? (c(), d("div", Vs, [
|
|
3133
3133
|
s.data.body ? (c(), d("div", Ks, v(s.data.body), 1)) : b("", !0),
|
|
3134
|
-
n.fields.length ? (c(!0), d(
|
|
3134
|
+
n.fields.length ? (c(!0), d(I, { key: 1 }, F(n.fields, (a, o) => (c(), d("div", {
|
|
3135
3135
|
key: o,
|
|
3136
3136
|
class: "wm-art__field"
|
|
3137
3137
|
}, [
|
|
@@ -3268,7 +3268,7 @@ function lr(e, t, s, r, i, n) {
|
|
|
3268
3268
|
s.data.body ? (c(), d("div", nr, v(s.data.body), 1)) : b("", !0)
|
|
3269
3269
|
]),
|
|
3270
3270
|
n.fields.length ? (c(), d("div", sr, [
|
|
3271
|
-
(c(!0), d(
|
|
3271
|
+
(c(!0), d(I, null, F(n.fields, (a, o) => (c(), d("div", {
|
|
3272
3272
|
key: o,
|
|
3273
3273
|
class: "wm-art__field"
|
|
3274
3274
|
}, [
|
|
@@ -3532,14 +3532,14 @@ function xr(e, t, s, r, i, n) {
|
|
|
3532
3532
|
], 2);
|
|
3533
3533
|
}
|
|
3534
3534
|
const Or = /* @__PURE__ */ U(Tr, [["render", xr], ["__scopeId", "data-v-7ab13147"]]), Rr = { name: "WmTyping" }, Lr = { class: "wm-typing" };
|
|
3535
|
-
function
|
|
3535
|
+
function Er(e, t, s, r, i, n) {
|
|
3536
3536
|
return c(), d("div", Lr, [...t[0] || (t[0] = [
|
|
3537
3537
|
l("span", { style: { "animation-delay": "0s" } }, null, -1),
|
|
3538
3538
|
l("span", { style: { "animation-delay": "0.2s" } }, null, -1),
|
|
3539
3539
|
l("span", { style: { "animation-delay": "0.4s" } }, null, -1)
|
|
3540
3540
|
])]);
|
|
3541
3541
|
}
|
|
3542
|
-
const
|
|
3542
|
+
const Ir = /* @__PURE__ */ U(Rr, [["render", Er], ["__scopeId", "data-v-df2447fd"]]);
|
|
3543
3543
|
function se(e) {
|
|
3544
3544
|
return e ? e.client_msg_id || e.id : "";
|
|
3545
3545
|
}
|
|
@@ -3557,7 +3557,7 @@ const Br = {
|
|
|
3557
3557
|
AIAvatar: me,
|
|
3558
3558
|
HumanAvatar: ve,
|
|
3559
3559
|
Bubble: Or,
|
|
3560
|
-
Typing:
|
|
3560
|
+
Typing: Ir,
|
|
3561
3561
|
ActionResult: Ts,
|
|
3562
3562
|
AttachmentPreview: Sr,
|
|
3563
3563
|
ArtifactRenderer: mr
|
|
@@ -3719,7 +3719,7 @@ const Br = {
|
|
|
3719
3719
|
},
|
|
3720
3720
|
beforeUnmount() {
|
|
3721
3721
|
var e;
|
|
3722
|
-
(e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame), this._pressTimer && clearTimeout(this._pressTimer);
|
|
3722
|
+
(e = this._ro) == null || e.disconnect(), this._measureFrame && cancelAnimationFrame(this._measureFrame), this._pinFrame && cancelAnimationFrame(this._pinFrame), this._pressTimer && clearTimeout(this._pressTimer);
|
|
3723
3723
|
},
|
|
3724
3724
|
updated() {
|
|
3725
3725
|
this.scheduleMeasure();
|
|
@@ -3956,9 +3956,9 @@ const Br = {
|
|
|
3956
3956
|
// doit garder son arrondi.
|
|
3957
3957
|
cornersFor(e, t) {
|
|
3958
3958
|
var ie, ae, X;
|
|
3959
|
-
const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, k = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)],
|
|
3959
|
+
const s = e.items, r = (ie = s[t]) == null ? void 0 : ie.kind, i = (ae = s[t - 1]) == null ? void 0 : ae.kind, n = (X = s[t + 1]) == null ? void 0 : X.kind, a = e.role === "user", o = 14, f = 4, k = i == null ? void 0 : i.bottom, y = n == null ? void 0 : n.top, T = this.widthByKey[this.rowKeyOf(e, t)], E = this.widthByKey[this.rowKeyOf(e, t - 1)], S = this.widthByKey[this.rowKeyOf(e, t + 1)], z = 0.5, M = (Q, oe, Z) => Q != null && T != null ? Q + z >= T : oe === Z || oe === "card" && Z === "bubble";
|
|
3960
3960
|
let D = o, O = o, q = o, J = o;
|
|
3961
|
-
return a ? (k && (O = f), (y || !n) && (q = f), k && M(
|
|
3961
|
+
return a ? (k && (O = f), (y || !n) && (q = f), k && M(E, k, r == null ? void 0 : r.top) && (D = f), y && M(S, y, r == null ? void 0 : r.bottom) && (J = f)) : (k && (D = f), (y || !n) && (J = f), k && M(E, k, r == null ? void 0 : r.top) && (O = f), y && M(S, y, r == null ? void 0 : r.bottom) && (q = f)), { tl: D, tr: O, br: q, bl: J };
|
|
3962
3962
|
},
|
|
3963
3963
|
// Inline column-count for the mosaic grid, capped at 4. Single
|
|
3964
3964
|
// attachment falls back to the vertical-list layout (null). Two
|
|
@@ -4132,6 +4132,23 @@ const Br = {
|
|
|
4132
4132
|
const e = this.$refs.scrollEl;
|
|
4133
4133
|
e && (e.scrollTop = e.scrollHeight), this.showScrollDown = !1;
|
|
4134
4134
|
},
|
|
4135
|
+
// Colle la liste au bas pendant `duration` ms via rAF. Utilisé quand
|
|
4136
|
+
// un overlay flottant (carte de validation, suggestions…) apparaît ou
|
|
4137
|
+
// disparaît : le `padding-bottom` de `.wm-list` grandit/réduit en
|
|
4138
|
+
// douceur (transition CSS sur `--wm-float-h`) et, en repinçant
|
|
4139
|
+
// `scrollTop = scrollHeight` à chaque frame, les messages remontent
|
|
4140
|
+
// exactement au même rythme — un glissement parfaitement synchrone
|
|
4141
|
+
// avec l'entrée de la carte au lieu d'un saut sec.
|
|
4142
|
+
keepPinnedToBottom(e = 320) {
|
|
4143
|
+
const t = this.$refs.scrollEl;
|
|
4144
|
+
if (!t) return;
|
|
4145
|
+
this._pinFrame && cancelAnimationFrame(this._pinFrame);
|
|
4146
|
+
let s = null;
|
|
4147
|
+
const r = (i) => {
|
|
4148
|
+
s === null && (s = i), t.scrollTop = t.scrollHeight, i - s < e ? this._pinFrame = requestAnimationFrame(r) : this._pinFrame = null;
|
|
4149
|
+
};
|
|
4150
|
+
this._pinFrame = requestAnimationFrame(r), this.showScrollDown = !1;
|
|
4151
|
+
},
|
|
4135
4152
|
// Variante "user-initiated" du bouton flottant : scroll fluide pour
|
|
4136
4153
|
// que le geste se voit, contrairement aux restores automatiques qui
|
|
4137
4154
|
// doivent être instantanés.
|
|
@@ -4140,7 +4157,7 @@ const Br = {
|
|
|
4140
4157
|
e && (typeof e.scrollTo == "function" ? e.scrollTo({ top: e.scrollHeight, behavior: "smooth" }) : e.scrollTop = e.scrollHeight, this.showScrollDown = !1);
|
|
4141
4158
|
}
|
|
4142
4159
|
}
|
|
4143
|
-
},
|
|
4160
|
+
}, Fr = { class: "wm-list__wrap" }, Nr = {
|
|
4144
4161
|
key: 0,
|
|
4145
4162
|
class: "wm-list__loadMore",
|
|
4146
4163
|
role: "status",
|
|
@@ -4171,14 +4188,14 @@ const Br = {
|
|
|
4171
4188
|
class: "wm-list__row wm-list__row--ai fade-up"
|
|
4172
4189
|
}, si = { class: "wm-list__avatarSlot" }, ri = ["aria-label", "title"];
|
|
4173
4190
|
function ii(e, t, s, r, i, n) {
|
|
4174
|
-
const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), k = P("ArtifactRenderer"), y = P("Bubble"), T = P("AttachmentPreview"),
|
|
4175
|
-
return c(), d("div",
|
|
4191
|
+
const a = P("AIAvatar"), o = P("HumanAvatar"), f = P("ActionResult"), k = P("ArtifactRenderer"), y = P("Bubble"), T = P("AttachmentPreview"), E = P("Typing");
|
|
4192
|
+
return c(), d("div", Fr, [
|
|
4176
4193
|
l("div", {
|
|
4177
4194
|
ref: "scrollEl",
|
|
4178
4195
|
class: x(["wm-list", { "wm-list--silent": i.silentFades }]),
|
|
4179
4196
|
onScrollPassive: t[4] || (t[4] = (...S) => n.onScroll && n.onScroll(...S))
|
|
4180
4197
|
}, [
|
|
4181
|
-
s.loadingMore ? (c(), d("div",
|
|
4198
|
+
s.loadingMore ? (c(), d("div", Nr, [
|
|
4182
4199
|
t[6] || (t[6] = l("span", {
|
|
4183
4200
|
class: "wm-list__loadMore-spinner",
|
|
4184
4201
|
"aria-hidden": "true"
|
|
@@ -4190,7 +4207,7 @@ function ii(e, t, s, r, i, n) {
|
|
|
4190
4207
|
l("span", qr, v(s.dateLabel), 1),
|
|
4191
4208
|
t[8] || (t[8] = l("div", { class: "wm-list__line" }, null, -1))
|
|
4192
4209
|
])) : b("", !0),
|
|
4193
|
-
(c(!0), d(
|
|
4210
|
+
(c(!0), d(I, null, F(n.groups, (S, z) => (c(), d(I, {
|
|
4194
4211
|
key: S.key
|
|
4195
4212
|
}, [
|
|
4196
4213
|
S.key === n.unreadGroupKey ? (c(), d("div", Vr, [
|
|
@@ -4206,8 +4223,8 @@ function ii(e, t, s, r, i, n) {
|
|
|
4206
4223
|
t[11] || (t[11] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1)),
|
|
4207
4224
|
l("span", $r, v(S.systemLabel), 1),
|
|
4208
4225
|
t[12] || (t[12] = l("div", { class: "wm-list__line wm-list__line--strong" }, null, -1))
|
|
4209
|
-
])) : (c(), d(
|
|
4210
|
-
(c(!0), d(
|
|
4226
|
+
])) : (c(), d(I, { key: 1 }, [
|
|
4227
|
+
(c(!0), d(I, null, F(S.items, (M, D) => (c(), d(I, {
|
|
4211
4228
|
key: `${n.messageKey(M.message)}-${M.partKey}`
|
|
4212
4229
|
}, [
|
|
4213
4230
|
l("div", {
|
|
@@ -4219,7 +4236,7 @@ function ii(e, t, s, r, i, n) {
|
|
|
4219
4236
|
"is-failed": M.message._failed
|
|
4220
4237
|
}
|
|
4221
4238
|
]]),
|
|
4222
|
-
style:
|
|
4239
|
+
style: N(n.cornersStyle(S, D)),
|
|
4223
4240
|
onPointerdown: (O) => n.onPressStart(`${n.messageKey(M.message)}-${M.partKey}`),
|
|
4224
4241
|
onPointerup: t[0] || (t[0] = (O) => n.onPressEnd()),
|
|
4225
4242
|
onPointercancel: t[1] || (t[1] = (O) => n.onPressEnd()),
|
|
@@ -4228,7 +4245,7 @@ function ii(e, t, s, r, i, n) {
|
|
|
4228
4245
|
}, ["prevent"]))
|
|
4229
4246
|
}, [
|
|
4230
4247
|
S.role !== "user" ? (c(), d("div", Yr, [
|
|
4231
|
-
D === S.items.length - 1 ? (c(), d(
|
|
4248
|
+
D === S.items.length - 1 ? (c(), d(I, { key: 0 }, [
|
|
4232
4249
|
S.role === "ai" ? (c(), B(a, {
|
|
4233
4250
|
key: 0,
|
|
4234
4251
|
size: 26,
|
|
@@ -4277,18 +4294,18 @@ function ii(e, t, s, r, i, n) {
|
|
|
4277
4294
|
"wm-list__atts--align-end": S.role === "user",
|
|
4278
4295
|
"wm-list__atts--mosaic": n.attachmentsOf(M.message).length >= 2
|
|
4279
4296
|
}]),
|
|
4280
|
-
style:
|
|
4297
|
+
style: N(
|
|
4281
4298
|
n.mosaicGridStyle(
|
|
4282
4299
|
n.attachmentsOf(M.message).length
|
|
4283
4300
|
)
|
|
4284
4301
|
)
|
|
4285
4302
|
}, [
|
|
4286
|
-
(c(!0), d(
|
|
4303
|
+
(c(!0), d(I, null, F(n.attachmentsOf(
|
|
4287
4304
|
M.message
|
|
4288
4305
|
), (O, q) => (c(), B(T, {
|
|
4289
4306
|
key: `${n.messageKey(M.message)}-att-${q}`,
|
|
4290
4307
|
attachment: O,
|
|
4291
|
-
style:
|
|
4308
|
+
style: N(
|
|
4292
4309
|
n.mosaicCornerStyle(
|
|
4293
4310
|
q,
|
|
4294
4311
|
n.attachmentsOf(M.message).length,
|
|
@@ -4328,7 +4345,7 @@ function ii(e, t, s, r, i, n) {
|
|
|
4328
4345
|
"image-url": s.aiAgentAvatarUrl
|
|
4329
4346
|
}, null, 8, ["name", "image-url"])
|
|
4330
4347
|
]),
|
|
4331
|
-
K(
|
|
4348
|
+
K(E)
|
|
4332
4349
|
])) : b("", !0)
|
|
4333
4350
|
], 34),
|
|
4334
4351
|
K(Ae, { name: "wm-scrollDown" }, {
|
|
@@ -4360,7 +4377,7 @@ function ii(e, t, s, r, i, n) {
|
|
|
4360
4377
|
})
|
|
4361
4378
|
]);
|
|
4362
4379
|
}
|
|
4363
|
-
const ai = /* @__PURE__ */ U(Dr, [["render", ii], ["__scopeId", "data-v-
|
|
4380
|
+
const ai = /* @__PURE__ */ U(Dr, [["render", ii], ["__scopeId", "data-v-94a2b136"]]), ge = typeof navigator < "u" && !!navigator.mediaDevices && typeof navigator.mediaDevices.getDisplayMedia == "function", Le = typeof window < "u" && typeof window.MediaRecorder < "u";
|
|
4364
4381
|
function oi() {
|
|
4365
4382
|
return Le && [
|
|
4366
4383
|
"video/webm;codecs=vp9,opus",
|
|
@@ -4443,11 +4460,11 @@ async function di(e = {}) {
|
|
|
4443
4460
|
y.data && y.data.size > 0 && i.push(y.data);
|
|
4444
4461
|
}), r.addEventListener("stop", () => {
|
|
4445
4462
|
var y, T;
|
|
4446
|
-
if (n && clearInterval(n), t.getTracks().forEach((
|
|
4447
|
-
|
|
4463
|
+
if (n && clearInterval(n), t.getTracks().forEach((E) => {
|
|
4464
|
+
E.stop();
|
|
4448
4465
|
}), i.length) {
|
|
4449
|
-
const
|
|
4450
|
-
type:
|
|
4466
|
+
const E = r.mimeType || s || "video/webm", S = new Blob(i, { type: E }), z = /mp4/.test(E) ? "mp4" : "webm", M = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, 19), D = new File([S], `ecran-${M}.${z}`, {
|
|
4467
|
+
type: E
|
|
4451
4468
|
});
|
|
4452
4469
|
(y = e.onfinalize) == null || y.call(e, D);
|
|
4453
4470
|
} else
|
|
@@ -4670,7 +4687,7 @@ const ui = [
|
|
|
4670
4687
|
function Ai(e, t, s, r, i, n) {
|
|
4671
4688
|
return c(), d("div", {
|
|
4672
4689
|
class: x(["wm-compose-wrap", { "wm-compose-wrap--sheet": s.displayMode === "sheet" }]),
|
|
4673
|
-
style:
|
|
4690
|
+
style: N(i.kbOffset ? { transform: `translateY(-${i.kbOffset}px)` } : null)
|
|
4674
4691
|
}, [
|
|
4675
4692
|
i.recording ? (c(), d("div", mi, [
|
|
4676
4693
|
t[8] || (t[8] = l("span", {
|
|
@@ -4701,7 +4718,7 @@ function Ai(e, t, s, r, i, n) {
|
|
|
4701
4718
|
onClick: t[2] || (t[2] = (a) => i.attachOpen = !1)
|
|
4702
4719
|
})) : b("", !0),
|
|
4703
4720
|
i.attachOpen ? (c(), d("div", _i, [
|
|
4704
|
-
(c(!0), d(
|
|
4721
|
+
(c(!0), d(I, null, F(n.attachItems, (a) => (c(), d("button", {
|
|
4705
4722
|
key: a.action,
|
|
4706
4723
|
type: "button",
|
|
4707
4724
|
class: "wm-compose__menuItem",
|
|
@@ -4782,7 +4799,7 @@ function Ai(e, t, s, r, i, n) {
|
|
|
4782
4799
|
], 34)
|
|
4783
4800
|
], 6);
|
|
4784
4801
|
}
|
|
4785
|
-
const Si = /* @__PURE__ */ U(hi, [["render", Ai], ["__scopeId", "data-v-
|
|
4802
|
+
const Si = /* @__PURE__ */ U(hi, [["render", Ai], ["__scopeId", "data-v-a7f822e9"]]), Ti = {
|
|
4786
4803
|
name: "WmInlineCallbacks",
|
|
4787
4804
|
props: {
|
|
4788
4805
|
// Array d'items `{ id?, label, style?, ... }`. Pour les suggestions,
|
|
@@ -4829,16 +4846,16 @@ function Li(e, t, s, r, i, n) {
|
|
|
4829
4846
|
key: n.batchKey,
|
|
4830
4847
|
class: x(["wm-icb", `wm-icb--${s.variant}`])
|
|
4831
4848
|
}, [
|
|
4832
|
-
s.variant === "chips" ? (c(!0), d(
|
|
4849
|
+
s.variant === "chips" ? (c(!0), d(I, { key: 0 }, F(s.items, (a, o) => (c(), d("button", {
|
|
4833
4850
|
key: a.id != null ? a.id : o,
|
|
4834
4851
|
type: "button",
|
|
4835
4852
|
class: "wm-icb__btn wm-icb__btn--chip",
|
|
4836
|
-
style:
|
|
4853
|
+
style: N({ animationDelay: s.baseDelay + o * s.stepDelay + "ms" }),
|
|
4837
4854
|
onClick: (f) => e.$emit("select", a)
|
|
4838
|
-
}, v(a.label), 13, Mi))), 128)) : (c(), d(
|
|
4855
|
+
}, v(a.label), 13, Mi))), 128)) : (c(), d(I, { key: 1 }, [
|
|
4839
4856
|
n.headerTitle ? (c(), d("div", xi, v(n.headerTitle), 1)) : b("", !0),
|
|
4840
4857
|
l("div", Oi, [
|
|
4841
|
-
(c(!0), d(
|
|
4858
|
+
(c(!0), d(I, null, F(s.items, (a, o) => (c(), d("button", {
|
|
4842
4859
|
key: a.id != null ? a.id : o,
|
|
4843
4860
|
type: "button",
|
|
4844
4861
|
class: x(["wm-icb__btn", n.btnClass(a)]),
|
|
@@ -4848,9 +4865,9 @@ function Li(e, t, s, r, i, n) {
|
|
|
4848
4865
|
], 64))
|
|
4849
4866
|
], 2)) : b("", !0);
|
|
4850
4867
|
}
|
|
4851
|
-
const
|
|
4852
|
-
let
|
|
4853
|
-
const
|
|
4868
|
+
const Ei = /* @__PURE__ */ U(Ti, [["render", Li], ["__scopeId", "data-v-c8cc8cbf"]]);
|
|
4869
|
+
let Ne = 0;
|
|
4870
|
+
const Ii = /* @__PURE__ */ new Set([
|
|
4854
4871
|
"text",
|
|
4855
4872
|
"textarea",
|
|
4856
4873
|
"number",
|
|
@@ -4875,8 +4892,8 @@ const Ei = /* @__PURE__ */ new Set([
|
|
|
4875
4892
|
},
|
|
4876
4893
|
emits: ["submit"],
|
|
4877
4894
|
data() {
|
|
4878
|
-
return
|
|
4879
|
-
_uid:
|
|
4895
|
+
return Ne += 1, {
|
|
4896
|
+
_uid: Ne,
|
|
4880
4897
|
values: {},
|
|
4881
4898
|
busy: !1,
|
|
4882
4899
|
error: ""
|
|
@@ -4888,7 +4905,7 @@ const Ei = /* @__PURE__ */ new Set([
|
|
|
4888
4905
|
// douteux.
|
|
4889
4906
|
normalizedFields() {
|
|
4890
4907
|
var t;
|
|
4891
|
-
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !
|
|
4908
|
+
return (Array.isArray((t = this.form) == null ? void 0 : t.fields) ? this.form.fields : []).filter((s) => !(!(s != null && s.key) || !(s != null && s.label) || !Ii.has(s == null ? void 0 : s.type) || (s.type === "select" || s.type === "multiselect") && (!Array.isArray(s.options) || s.options.length === 0)));
|
|
4892
4909
|
}
|
|
4893
4910
|
},
|
|
4894
4911
|
created() {
|
|
@@ -4941,7 +4958,7 @@ const Ei = /* @__PURE__ */ new Set([
|
|
|
4941
4958
|
}
|
|
4942
4959
|
}
|
|
4943
4960
|
}
|
|
4944
|
-
}, Pi = { class: "wm-form" }, Ui = { class: "wm-form__head" }, Di = { class: "wm-form__icon" },
|
|
4961
|
+
}, Pi = { class: "wm-form" }, Ui = { class: "wm-form__head" }, Di = { class: "wm-form__icon" }, Fi = { class: "wm-form__main" }, Ni = { class: "wm-form__title" }, Hi = {
|
|
4945
4962
|
key: 0,
|
|
4946
4963
|
class: "wm-form__detail"
|
|
4947
4964
|
}, ji = ["for"], zi = {
|
|
@@ -4979,8 +4996,8 @@ function ra(e, t, s, r, i, n) {
|
|
|
4979
4996
|
"image-url": s.agentAvatarUrl
|
|
4980
4997
|
}, null, 8, ["name", "image-url"])
|
|
4981
4998
|
]),
|
|
4982
|
-
l("div",
|
|
4983
|
-
l("div",
|
|
4999
|
+
l("div", Fi, [
|
|
5000
|
+
l("div", Ni, v(s.form.title || n.t("form.title")), 1),
|
|
4984
5001
|
s.form.description ? (c(), d("div", Hi, v(s.form.description), 1)) : b("", !0)
|
|
4985
5002
|
])
|
|
4986
5003
|
]),
|
|
@@ -4988,7 +5005,7 @@ function ra(e, t, s, r, i, n) {
|
|
|
4988
5005
|
class: "wm-form__body",
|
|
4989
5006
|
onSubmit: t[0] || (t[0] = G((...o) => n.onSubmit && n.onSubmit(...o), ["prevent"]))
|
|
4990
5007
|
}, [
|
|
4991
|
-
(c(!0), d(
|
|
5008
|
+
(c(!0), d(I, null, F(n.normalizedFields, (o) => (c(), d("div", {
|
|
4992
5009
|
key: o.key,
|
|
4993
5010
|
class: "wm-form__field"
|
|
4994
5011
|
}, [
|
|
@@ -5066,14 +5083,14 @@ function ra(e, t, s, r, i, n) {
|
|
|
5066
5083
|
disabled: s.readOnly || i.busy
|
|
5067
5084
|
}, [
|
|
5068
5085
|
l("option", Ji, v(o.placeholder || n.t("form.choose")), 1),
|
|
5069
|
-
(c(!0), d(
|
|
5086
|
+
(c(!0), d(I, null, F(o.options, (f) => (c(), d("option", {
|
|
5070
5087
|
key: f.value,
|
|
5071
5088
|
value: f.value
|
|
5072
5089
|
}, v(f.label), 9, Xi))), 128))
|
|
5073
5090
|
], 8, Yi)), [
|
|
5074
5091
|
[Ye, i.values[o.key]]
|
|
5075
5092
|
]) : o.type === "multiselect" ? (c(), d("div", Qi, [
|
|
5076
|
-
(c(!0), d(
|
|
5093
|
+
(c(!0), d(I, null, F(o.options, (f) => (c(), d("label", {
|
|
5077
5094
|
key: f.value,
|
|
5078
5095
|
class: "wm-form__multiItem"
|
|
5079
5096
|
}, [
|
|
@@ -5163,11 +5180,11 @@ function ya(e, t, s, r, i, n) {
|
|
|
5163
5180
|
], -1)),
|
|
5164
5181
|
l("div", ga, v(n.t("feedback.doneTitle")), 1),
|
|
5165
5182
|
l("div", va, v(n.t("feedback.doneSubtitle")), 1)
|
|
5166
|
-
])) : (c(), d(
|
|
5183
|
+
])) : (c(), d(I, { key: 0 }, [
|
|
5167
5184
|
l("div", la, v(n.t("feedback.question")), 1),
|
|
5168
5185
|
l("div", ca, v(n.t("feedback.subtitle")), 1),
|
|
5169
5186
|
l("div", da, [
|
|
5170
|
-
(c(!0), d(
|
|
5187
|
+
(c(!0), d(I, null, F(n.options, (a) => (c(), d("button", {
|
|
5171
5188
|
key: a.v,
|
|
5172
5189
|
type: "button",
|
|
5173
5190
|
class: x(["wm-fb__opt", { "is-selected": i.sel === a.v }]),
|
|
@@ -5231,7 +5248,7 @@ const pa = /* @__PURE__ */ U(aa, [["render", ya], ["__scopeId", "data-v-9b630564
|
|
|
5231
5248
|
key: 1,
|
|
5232
5249
|
class: "wm-mm__sep"
|
|
5233
5250
|
}, Ma = { class: "wm-mm__section" }, xa = { class: "wm-mm__label" }, Oa = { class: "wm-mm__section" }, Ra = { class: "wm-mm__label" }, La = { class: "wm-mm__label" };
|
|
5234
|
-
function
|
|
5251
|
+
function Ea(e, t, s, r, i, n) {
|
|
5235
5252
|
return c(), d("div", ba, [
|
|
5236
5253
|
l("div", {
|
|
5237
5254
|
class: "wm-mm__scrim",
|
|
@@ -5371,7 +5388,7 @@ function Ia(e, t, s, r, i, n) {
|
|
|
5371
5388
|
])
|
|
5372
5389
|
]);
|
|
5373
5390
|
}
|
|
5374
|
-
const
|
|
5391
|
+
const Ia = /* @__PURE__ */ U(wa, [["render", Ea], ["__scopeId", "data-v-4cf6d578"]]), Ba = {
|
|
5375
5392
|
name: "WmRenameDialog",
|
|
5376
5393
|
inject: {
|
|
5377
5394
|
// Translator shared by the Messenger shell; French fallback when
|
|
@@ -5417,7 +5434,7 @@ const Ea = /* @__PURE__ */ U(wa, [["render", Ia], ["__scopeId", "data-v-4cf6d578
|
|
|
5417
5434
|
class: "wm-dialog__card",
|
|
5418
5435
|
role: "dialog",
|
|
5419
5436
|
"aria-modal": "true"
|
|
5420
|
-
}, Da = { class: "wm-dialog__head" },
|
|
5437
|
+
}, Da = { class: "wm-dialog__head" }, Fa = { class: "wm-dialog__title" }, Na = ["aria-label"], Ha = { class: "wm-dialog__body" }, ja = ["placeholder"], za = { class: "wm-dialog__actions" }, qa = ["disabled"];
|
|
5421
5438
|
function Va(e, t, s, r, i, n) {
|
|
5422
5439
|
return c(), d("div", Pa, [
|
|
5423
5440
|
l("div", {
|
|
@@ -5426,7 +5443,7 @@ function Va(e, t, s, r, i, n) {
|
|
|
5426
5443
|
}),
|
|
5427
5444
|
l("div", Ua, [
|
|
5428
5445
|
l("div", Da, [
|
|
5429
|
-
l("div",
|
|
5446
|
+
l("div", Fa, v(s.title || n.t("rename.title")), 1),
|
|
5430
5447
|
l("button", {
|
|
5431
5448
|
type: "button",
|
|
5432
5449
|
class: "wm-dialog__close",
|
|
@@ -5446,7 +5463,7 @@ function Va(e, t, s, r, i, n) {
|
|
|
5446
5463
|
}, [
|
|
5447
5464
|
l("path", { d: "M18 6L6 18M6 6l12 12" })
|
|
5448
5465
|
], -1)
|
|
5449
|
-
])], 8,
|
|
5466
|
+
])], 8, Na)
|
|
5450
5467
|
]),
|
|
5451
5468
|
l("div", Ha, [
|
|
5452
5469
|
$(l("input", {
|
|
@@ -5489,10 +5506,10 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
|
|
|
5489
5506
|
History: fs,
|
|
5490
5507
|
MessageList: ai,
|
|
5491
5508
|
Composer: Si,
|
|
5492
|
-
InlineCallbacks:
|
|
5509
|
+
InlineCallbacks: Ei,
|
|
5493
5510
|
FormCard: ia,
|
|
5494
5511
|
Feedback: pa,
|
|
5495
|
-
MoreMenu:
|
|
5512
|
+
MoreMenu: Ia,
|
|
5496
5513
|
RenameDialog: Ka
|
|
5497
5514
|
},
|
|
5498
5515
|
mixins: [
|
|
@@ -5723,9 +5740,9 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
|
|
|
5723
5740
|
const T = i[y];
|
|
5724
5741
|
if (!T) continue;
|
|
5725
5742
|
if (((k = T.author) == null ? void 0 : k.type) === "user") break;
|
|
5726
|
-
const
|
|
5727
|
-
if (
|
|
5728
|
-
if (n != null &&
|
|
5743
|
+
const E = Y(T.id);
|
|
5744
|
+
if (E != null) {
|
|
5745
|
+
if (n != null && E <= n) break;
|
|
5729
5746
|
t[T.id] !== 0 && (!o && T.author && (o = T.author), a++);
|
|
5730
5747
|
}
|
|
5731
5748
|
}
|
|
@@ -5961,7 +5978,7 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
|
|
|
5961
5978
|
}
|
|
5962
5979
|
const s = this.revealedAt, r = (this.s.messagesByConv[e.id] || []).filter((a) => {
|
|
5963
5980
|
var o, f, k, y, T;
|
|
5964
|
-
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = a == null ? void 0 : a.payload) == null ? void 0 : k.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((
|
|
5981
|
+
return (a == null ? void 0 : a.type) === "action" && ((o = a == null ? void 0 : a.payload) == null ? void 0 : o.state) === "pending" || he(a) && !(s[a.id] > 0) ? !1 : (a == null ? void 0 : a.type) === "action" || (a == null ? void 0 : a.type) === "system" || ((f = a == null ? void 0 : a.payload) == null ? void 0 : f.type) === "system" || Array.isArray((k = a == null ? void 0 : a.payload) == null ? void 0 : k.attachments) && a.payload.attachments.length || (y = a == null ? void 0 : a.metadata) != null && y.artifact || (T = a == null ? void 0 : a.metadata) != null && T.form || Array.isArray(a == null ? void 0 : a.callbacks) && a.callbacks.some((E) => (E == null ? void 0 : E.intent) === "submit_form") ? !0 : typeof (a == null ? void 0 : a.text_md) == "string" && a.text_md.trim().length > 0;
|
|
5965
5982
|
});
|
|
5966
5983
|
return t.length ? [...t, ...r] : r;
|
|
5967
5984
|
},
|
|
@@ -6277,12 +6294,12 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
|
|
|
6277
6294
|
return;
|
|
6278
6295
|
}
|
|
6279
6296
|
try {
|
|
6280
|
-
await this.waitForParentInit(), this.transport =
|
|
6297
|
+
await this.waitForParentInit(), this.transport = Ee(
|
|
6281
6298
|
tt({
|
|
6282
6299
|
baseUrl: this.baseUrl,
|
|
6283
6300
|
widgetId: this.widgetId
|
|
6284
6301
|
})
|
|
6285
|
-
), this.store =
|
|
6302
|
+
), this.store = Ee(it(this.transport)), this.hydrateNotifPref();
|
|
6286
6303
|
const e = this.parentVariables || this.context || null;
|
|
6287
6304
|
if (await this.store.start({
|
|
6288
6305
|
origin: this.parentOrigin,
|
|
@@ -6323,7 +6340,7 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
|
|
|
6323
6340
|
const i = Math.ceil(r.contentRect.height + 8);
|
|
6324
6341
|
i !== this.floatHeight && (this.floatHeight = i, this.$nextTick(() => {
|
|
6325
6342
|
var n, a;
|
|
6326
|
-
(a = (n = this.$refs.messageList) == null ? void 0 : n.
|
|
6343
|
+
(a = (n = this.$refs.messageList) == null ? void 0 : n.keepPinnedToBottom) == null || a.call(n);
|
|
6327
6344
|
}));
|
|
6328
6345
|
}), this.floatRO.observe(t);
|
|
6329
6346
|
}
|
|
@@ -6377,13 +6394,13 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
|
|
|
6377
6394
|
this.launcherHovered = e, this.sendCurrentLauncherSize();
|
|
6378
6395
|
},
|
|
6379
6396
|
sendCurrentLauncherSize() {
|
|
6380
|
-
var y, T,
|
|
6397
|
+
var y, T, E, S, z, M, D;
|
|
6381
6398
|
if (this.isOpen) return;
|
|
6382
6399
|
const e = (T = (y = this.$el) == null ? void 0 : y.querySelector) == null ? void 0 : T.call(y, ".wm-launcherWrap");
|
|
6383
6400
|
if (!e) return;
|
|
6384
6401
|
const t = e.getBoundingClientRect();
|
|
6385
6402
|
if (!t.width || !t.height) return;
|
|
6386
|
-
const s = (((
|
|
6403
|
+
const s = (((E = this.launcherPeeks) == null ? void 0 : E.length) ?? 0) > 0, r = 16, i = Math.ceil(t.width), n = Math.ceil(t.height), a = (z = (S = this.$el) == null ? void 0 : S.querySelector) == null ? void 0 : z.call(S, ".wm-launcher"), o = (D = (M = this.$el) == null ? void 0 : M.querySelectorAll) == null ? void 0 : D.call(M, ".wm-peek"), f = o && o.length ? o[o.length - 1] : null;
|
|
6387
6404
|
let k = null;
|
|
6388
6405
|
if (f) {
|
|
6389
6406
|
const O = f.getBoundingClientRect();
|
|
@@ -6828,10 +6845,10 @@ const Ka = /* @__PURE__ */ U(Ba, [["render", Va], ["__scopeId", "data-v-6d5f94a8
|
|
|
6828
6845
|
"aria-live": "polite"
|
|
6829
6846
|
}, mo = { class: "wm-ended__lbl" };
|
|
6830
6847
|
function fo(e, t, s, r, i, n) {
|
|
6831
|
-
const a = P("Launcher"), o = P("Header"), f = P("History"), k = P("Onboarding"), y = P("MessageList"), T = P("InlineCallbacks"),
|
|
6848
|
+
const a = P("Launcher"), o = P("Header"), f = P("History"), k = P("Onboarding"), y = P("MessageList"), T = P("InlineCallbacks"), E = P("FormCard"), S = P("Feedback"), z = P("Composer"), M = P("MoreMenu"), D = P("RenameDialog");
|
|
6832
6849
|
return c(), d("div", {
|
|
6833
6850
|
class: x(["wm-root", `wm-root--${s.displayMode}`]),
|
|
6834
|
-
style:
|
|
6851
|
+
style: N(n.rootStyle)
|
|
6835
6852
|
}, [
|
|
6836
6853
|
!i.isOpen && !n.isEmbedded ? (c(), B(a, {
|
|
6837
6854
|
key: 0,
|
|
@@ -6848,7 +6865,7 @@ function fo(e, t, s, r, i, n) {
|
|
|
6848
6865
|
`wm-panel--${s.displayMode}`,
|
|
6849
6866
|
{ "wm-panel--welcome": n.ready && !n.error && !n.currentConv }
|
|
6850
6867
|
]),
|
|
6851
|
-
style:
|
|
6868
|
+
style: N(i.floatHeight ? { "--wm-float-h": i.floatHeight + "px" } : null),
|
|
6852
6869
|
role: "dialog",
|
|
6853
6870
|
"aria-label": "Messenger",
|
|
6854
6871
|
onClick: t[7] || (t[7] = (...O) => n.onPanelClick && n.onPanelClick(...O))
|
|
@@ -6879,7 +6896,7 @@ function fo(e, t, s, r, i, n) {
|
|
|
6879
6896
|
class: "wm-loading__spinner",
|
|
6880
6897
|
"aria-hidden": "true"
|
|
6881
6898
|
}, null, -1))
|
|
6882
|
-
])) : (c(), d(
|
|
6899
|
+
])) : (c(), d(I, { key: 1 }, [
|
|
6883
6900
|
K(o, {
|
|
6884
6901
|
title: n.headerTitle,
|
|
6885
6902
|
"team-members": n.teamMembers,
|
|
@@ -6954,7 +6971,7 @@ function fo(e, t, s, r, i, n) {
|
|
|
6954
6971
|
variant: "buttons",
|
|
6955
6972
|
items: n.resolutionCallbacks,
|
|
6956
6973
|
onSelect: n.onResolutionSelect
|
|
6957
|
-
}, null, 8, ["items", "onSelect"])) : n.pendingForm ? (c(), B(
|
|
6974
|
+
}, null, 8, ["items", "onSelect"])) : n.pendingForm ? (c(), B(E, {
|
|
6958
6975
|
key: n.pendingForm.message && n.pendingForm.message.id,
|
|
6959
6976
|
form: n.pendingForm.form,
|
|
6960
6977
|
"agent-name": n.agentName,
|
|
@@ -6981,7 +6998,7 @@ function fo(e, t, s, r, i, n) {
|
|
|
6981
6998
|
})), 1)
|
|
6982
6999
|
])) : b("", !0),
|
|
6983
7000
|
i.pendingAttachments.length ? (c(), d("div", ro, [
|
|
6984
|
-
(c(!0), d(
|
|
7001
|
+
(c(!0), d(I, null, F(i.pendingAttachments, (O, q) => (c(), d("div", {
|
|
6985
7002
|
key: O.path || q,
|
|
6986
7003
|
class: "wm-attached__item"
|
|
6987
7004
|
}, [
|
|
@@ -7110,7 +7127,7 @@ function fo(e, t, s, r, i, n) {
|
|
|
7110
7127
|
], 6)) : b("", !0)
|
|
7111
7128
|
], 6);
|
|
7112
7129
|
}
|
|
7113
|
-
const vo = /* @__PURE__ */ U(Wa, [["render", fo], ["__scopeId", "data-v-
|
|
7130
|
+
const vo = /* @__PURE__ */ U(Wa, [["render", fo], ["__scopeId", "data-v-20b36fa2"]]), yo = "0.6.11";
|
|
7114
7131
|
export {
|
|
7115
7132
|
me as AIAvatar,
|
|
7116
7133
|
be as AVATAR_COLORS,
|
|
@@ -7128,17 +7145,17 @@ export {
|
|
|
7128
7145
|
ia as FormCard,
|
|
7129
7146
|
_n as Header,
|
|
7130
7147
|
ve as HumanAvatar,
|
|
7131
|
-
|
|
7148
|
+
Ei as InlineCallbacks,
|
|
7132
7149
|
qt as Launcher,
|
|
7133
7150
|
Le as MEDIA_RECORDER_SUPPORTED,
|
|
7134
7151
|
ai as MessageList,
|
|
7135
7152
|
vo as Messenger,
|
|
7136
|
-
|
|
7153
|
+
Ia as MoreMenu,
|
|
7137
7154
|
Qn as Onboarding,
|
|
7138
7155
|
ge as SCREEN_CAPTURE_SUPPORTED,
|
|
7139
7156
|
ht as SUPPORTED_LANGUAGES,
|
|
7140
7157
|
tn as TeamAvatars,
|
|
7141
|
-
|
|
7158
|
+
Ir as Typing,
|
|
7142
7159
|
yo as VERSION,
|
|
7143
7160
|
xe as avatarColor,
|
|
7144
7161
|
Oe as avatarInitials,
|