@_solaris/messenger-widget 0.4.1 → 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 +7 -7
- package/dist/messenger.embed.js +14 -14
- package/dist/messenger.js +99 -70
- 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.
|
|
@@ -3553,7 +3582,7 @@ function Or(e, t, n, i, r, s) {
|
|
|
3553
3582
|
"is-failed": M.message._failed
|
|
3554
3583
|
}
|
|
3555
3584
|
]]),
|
|
3556
|
-
style:
|
|
3585
|
+
style: K(s.cornersStyle(A, D))
|
|
3557
3586
|
}, [
|
|
3558
3587
|
A.role !== "user" ? (c(), u("div", kr, [
|
|
3559
3588
|
D === A.items.length - 1 ? (c(), u(L, { key: 0 }, [
|
|
@@ -3629,7 +3658,7 @@ function Or(e, t, n, i, r, s) {
|
|
|
3629
3658
|
])) : b("", !0)
|
|
3630
3659
|
], 34);
|
|
3631
3660
|
}
|
|
3632
|
-
const Lr = /* @__PURE__ */ E(ur, [["render", Or], ["__scopeId", "data-v-
|
|
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";
|
|
3633
3662
|
function Ir() {
|
|
3634
3663
|
return ve && [
|
|
3635
3664
|
"video/webm;codecs=vp9,opus",
|
|
@@ -3911,7 +3940,7 @@ const Nr = [
|
|
|
3911
3940
|
width: "14",
|
|
3912
3941
|
height: "14",
|
|
3913
3942
|
"aria-hidden": "true"
|
|
3914
|
-
}, qr = ["d"], Vr = ["placeholder", "disabled"],
|
|
3943
|
+
}, qr = ["d"], Vr = ["placeholder", "disabled"], Kr = { class: "wm-compose__actions" }, Wr = ["title", "aria-label", "disabled"], Gr = ["disabled", "aria-label"];
|
|
3915
3944
|
function Yr(e, t, n, i, r, s) {
|
|
3916
3945
|
return c(), u("div", jr, [
|
|
3917
3946
|
r.recording ? (c(), u("div", Pr, [
|
|
@@ -3975,9 +4004,9 @@ function Yr(e, t, n, i, r, s) {
|
|
|
3975
4004
|
onKeydown: t[4] || (t[4] = (...a) => s.onKeydown && s.onKeydown(...a)),
|
|
3976
4005
|
onInput: t[5] || (t[5] = (...a) => s.autosize && s.autosize(...a))
|
|
3977
4006
|
}, null, 40, Vr), [
|
|
3978
|
-
[
|
|
4007
|
+
[ee, r.local]
|
|
3979
4008
|
]),
|
|
3980
|
-
o("div",
|
|
4009
|
+
o("div", Kr, [
|
|
3981
4010
|
o("button", {
|
|
3982
4011
|
type: "button",
|
|
3983
4012
|
class: x(["wm-compose__icon", { "is-open": r.attachOpen }]),
|
|
@@ -3999,7 +4028,7 @@ function Yr(e, t, n, i, r, s) {
|
|
|
3999
4028
|
}, [
|
|
4000
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" })
|
|
4001
4030
|
], -1)
|
|
4002
|
-
])], 10,
|
|
4031
|
+
])], 10, Wr),
|
|
4003
4032
|
o("button", {
|
|
4004
4033
|
type: "submit",
|
|
4005
4034
|
class: x(["wm-compose__send", { "is-empty": !s.canSend }]),
|
|
@@ -4051,7 +4080,7 @@ function Zr(e, t, n, i, r, s) {
|
|
|
4051
4080
|
key: l,
|
|
4052
4081
|
type: "button",
|
|
4053
4082
|
class: "wm-chip",
|
|
4054
|
-
style:
|
|
4083
|
+
style: K({ animationDelay: n.baseDelay + l * n.stepDelay + "ms" }),
|
|
4055
4084
|
onClick: (g) => e.$emit("select", a)
|
|
4056
4085
|
}, v(a.label), 13, Jr))), 128))
|
|
4057
4086
|
])) : b("", !0);
|
|
@@ -4285,7 +4314,7 @@ function Fi(e, t, n, i, r, s) {
|
|
|
4285
4314
|
required: l.required,
|
|
4286
4315
|
disabled: n.readOnly || r.busy
|
|
4287
4316
|
}, null, 8, wi)), [
|
|
4288
|
-
[
|
|
4317
|
+
[ee, r.values[l.key]]
|
|
4289
4318
|
]) : l.type === "textarea" ? V((c(), u("textarea", {
|
|
4290
4319
|
key: 1,
|
|
4291
4320
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4296,7 +4325,7 @@ function Fi(e, t, n, i, r, s) {
|
|
|
4296
4325
|
required: l.required,
|
|
4297
4326
|
disabled: n.readOnly || r.busy
|
|
4298
4327
|
}, null, 8, ki)), [
|
|
4299
|
-
[
|
|
4328
|
+
[ee, r.values[l.key]]
|
|
4300
4329
|
]) : l.type === "number" ? V((c(), u("input", {
|
|
4301
4330
|
key: 2,
|
|
4302
4331
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4308,7 +4337,7 @@ function Fi(e, t, n, i, r, s) {
|
|
|
4308
4337
|
disabled: n.readOnly || r.busy
|
|
4309
4338
|
}, null, 8, Ci)), [
|
|
4310
4339
|
[
|
|
4311
|
-
|
|
4340
|
+
ee,
|
|
4312
4341
|
r.values[l.key],
|
|
4313
4342
|
void 0,
|
|
4314
4343
|
{ number: !0 }
|
|
@@ -4322,7 +4351,7 @@ function Fi(e, t, n, i, r, s) {
|
|
|
4322
4351
|
required: l.required,
|
|
4323
4352
|
disabled: n.readOnly || r.busy
|
|
4324
4353
|
}, null, 8, Ai)), [
|
|
4325
|
-
[
|
|
4354
|
+
[ee, r.values[l.key]]
|
|
4326
4355
|
]) : l.type === "boolean" ? (c(), u("label", Si, [
|
|
4327
4356
|
V(o("input", {
|
|
4328
4357
|
id: `wm-f-${r._uid}-${l.key}`,
|
|
@@ -4415,13 +4444,13 @@ const ji = /* @__PURE__ */ E(hi, [["render", Fi], ["__scopeId", "data-v-75332dad
|
|
|
4415
4444
|
!this.sel || this.busy || this.$emit("submit", { rating: this.sel });
|
|
4416
4445
|
}
|
|
4417
4446
|
}
|
|
4418
|
-
}, 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" },
|
|
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 = {
|
|
4419
4448
|
key: 1,
|
|
4420
4449
|
class: "wm-fb__done"
|
|
4421
4450
|
}, Gi = { class: "wm-fb__doneTitle" }, Yi = { class: "wm-fb__doneSub" };
|
|
4422
4451
|
function Qi(e, t, n, i, r, s) {
|
|
4423
4452
|
return c(), u("div", Di, [
|
|
4424
|
-
n.done ? (c(), u("div",
|
|
4453
|
+
n.done ? (c(), u("div", Wi, [
|
|
4425
4454
|
t[1] || (t[1] = o("div", { class: "wm-fb__check" }, [
|
|
4426
4455
|
o("svg", {
|
|
4427
4456
|
width: "16",
|
|
@@ -4458,7 +4487,7 @@ function Qi(e, t, n, i, r, s) {
|
|
|
4458
4487
|
class: "wm-fb__send",
|
|
4459
4488
|
disabled: !r.sel || n.busy,
|
|
4460
4489
|
onClick: t[0] || (t[0] = (...a) => s.onSend && s.onSend(...a))
|
|
4461
|
-
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9,
|
|
4490
|
+
}, v(n.busy ? s.t("common.sending") : s.t("feedback.submit")), 9, Ki)
|
|
4462
4491
|
], 64))
|
|
4463
4492
|
]);
|
|
4464
4493
|
}
|
|
@@ -4772,7 +4801,7 @@ function Ca(e, t, n, i, r, s) {
|
|
|
4772
4801
|
t[4] || (t[4] = ue(X((a) => e.$emit("close"), ["prevent"]), ["esc"]))
|
|
4773
4802
|
]
|
|
4774
4803
|
}, null, 40, ba), [
|
|
4775
|
-
[
|
|
4804
|
+
[ee, r.value]
|
|
4776
4805
|
])
|
|
4777
4806
|
]),
|
|
4778
4807
|
o("div", wa, [
|
|
@@ -5371,7 +5400,7 @@ const Aa = /* @__PURE__ */ E(ma, [["render", Ca], ["__scopeId", "data-v-6d5f94a8
|
|
|
5371
5400
|
}
|
|
5372
5401
|
try {
|
|
5373
5402
|
this.transport = ye(
|
|
5374
|
-
|
|
5403
|
+
We({
|
|
5375
5404
|
baseUrl: this.baseUrl,
|
|
5376
5405
|
widgetId: this.widgetId,
|
|
5377
5406
|
userId: this.userId,
|
|
@@ -5673,7 +5702,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5673
5702
|
r.isOpen || s.isEmbedded ? (c(), u("section", {
|
|
5674
5703
|
key: 1,
|
|
5675
5704
|
class: x(["wm-panel", `wm-panel--${n.displayMode}`]),
|
|
5676
|
-
style:
|
|
5705
|
+
style: K(r.floatHeight ? { "--wm-float-h": r.floatHeight + "px" } : null),
|
|
5677
5706
|
role: "dialog",
|
|
5678
5707
|
"aria-label": "Messenger"
|
|
5679
5708
|
}, [
|
|
@@ -5836,7 +5865,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5836
5865
|
o("button", {
|
|
5837
5866
|
type: "button",
|
|
5838
5867
|
"aria-label": s.t("attachment.remove"),
|
|
5839
|
-
onClick: (
|
|
5868
|
+
onClick: (W) => r.pendingAttachments.splice($, 1)
|
|
5840
5869
|
}, [...t[9] || (t[9] = [
|
|
5841
5870
|
o("svg", {
|
|
5842
5871
|
width: "10",
|
|
@@ -5882,7 +5911,7 @@ function Pa(e, t, n, i, r, s) {
|
|
|
5882
5911
|
], 6)) : b("", !0)
|
|
5883
5912
|
], 2);
|
|
5884
5913
|
}
|
|
5885
|
-
const $a = /* @__PURE__ */ E(Sa, [["render", Pa], ["__scopeId", "data-v-d9dce1ad"]]), Ha = "0.4.
|
|
5914
|
+
const $a = /* @__PURE__ */ E(Sa, [["render", Pa], ["__scopeId", "data-v-d9dce1ad"]]), Ha = "0.4.3";
|
|
5886
5915
|
export {
|
|
5887
5916
|
le as AIAvatar,
|
|
5888
5917
|
fe as AVATAR_COLORS,
|
|
@@ -5919,7 +5948,7 @@ export {
|
|
|
5919
5948
|
U as colors,
|
|
5920
5949
|
Xe as createStore,
|
|
5921
5950
|
P as createTranslator,
|
|
5922
|
-
|
|
5951
|
+
We as createTransport,
|
|
5923
5952
|
oe as dateLocale,
|
|
5924
5953
|
$a as default,
|
|
5925
5954
|
Le as formatTime,
|