@evelan/jexity-widget 0.11.9 → 0.12.2
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/index.mjs +1049 -917
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +1068 -936
- package/dist/react.mjs.map +1 -1
- package/dist/types/features/chat/components/EscalationFormScreen.d.ts.map +1 -1
- package/dist/types/features/chat/composer/components/ChatInput.d.ts.map +1 -1
- package/dist/types/features/chat/composer/components/PrivacyNotice.d.ts +3 -0
- package/dist/types/features/chat/composer/components/PrivacyNotice.d.ts.map +1 -0
- package/dist/types/i18n/locales/de.d.ts.map +1 -1
- package/dist/types/i18n/locales/en.d.ts +4 -0
- package/dist/types/i18n/locales/en.d.ts.map +1 -1
- package/dist/types/lib/history-patch.d.ts +8 -0
- package/dist/types/lib/history-patch.d.ts.map +1 -0
- package/dist/types/lib/widgetBootstrap.d.ts +2 -0
- package/dist/types/lib/widgetBootstrap.d.ts.map +1 -1
- package/dist/types/module/shell/WidgetShell.d.ts +6 -2
- package/dist/types/module/shell/WidgetShell.d.ts.map +1 -1
- package/dist/types/module/shell/hooks/useBootstrap.d.ts +10 -1
- package/dist/types/module/shell/hooks/useBootstrap.d.ts.map +1 -1
- package/dist/types/module/shell/hooks/usePathGuard.d.ts +7 -0
- package/dist/types/module/shell/hooks/usePathGuard.d.ts.map +1 -0
- package/dist/types/module/shell/shell.state.d.ts +12 -0
- package/dist/types/module/shell/shell.state.d.ts.map +1 -1
- package/dist/types/types.d.ts +13 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/widget.js +20 -20
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var it, b,
|
|
1
|
+
var it, b, Qr, Dr, he, Un, Vr, Hr, Wr, bn, Kt, Zt, Jr, Ze = {}, Gr = [], go = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, ot = Array.isArray;
|
|
2
2
|
function te(t, e) {
|
|
3
3
|
for (var n in e) t[n] = e[n];
|
|
4
4
|
return t;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function yn(t) {
|
|
7
7
|
t && t.parentNode && t.parentNode.removeChild(t);
|
|
8
8
|
}
|
|
9
9
|
function V(t, e, n) {
|
|
@@ -13,58 +13,58 @@ function V(t, e, n) {
|
|
|
13
13
|
return He(t, s, r, i, null);
|
|
14
14
|
}
|
|
15
15
|
function He(t, e, n, r, i) {
|
|
16
|
-
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++
|
|
16
|
+
var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++Qr, __i: -1, __u: 0 };
|
|
17
17
|
return i == null && b.vnode != null && b.vnode(o), o;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function mo() {
|
|
20
20
|
return { current: null };
|
|
21
21
|
}
|
|
22
22
|
function F(t) {
|
|
23
23
|
return t.children;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function G(t, e) {
|
|
26
26
|
this.props = t, this.context = e;
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
if (e == null) return t.__ ?
|
|
28
|
+
function Ae(t, e) {
|
|
29
|
+
if (e == null) return t.__ ? Ae(t.__, t.__i + 1) : null;
|
|
30
30
|
for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e;
|
|
31
|
-
return typeof t.type == "function" ?
|
|
31
|
+
return typeof t.type == "function" ? Ae(t) : null;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Kr(t) {
|
|
34
34
|
var e, n;
|
|
35
35
|
if ((t = t.__) != null && t.__c != null) {
|
|
36
36
|
for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) {
|
|
37
37
|
t.__e = t.__c.base = n.__e;
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return Kr(t);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
(!t.__d && (t.__d = !0) && he.push(t) && !bt.__r++ ||
|
|
43
|
+
function Yt(t) {
|
|
44
|
+
(!t.__d && (t.__d = !0) && he.push(t) && !bt.__r++ || Un != b.debounceRendering) && ((Un = b.debounceRendering) || Vr)(bt);
|
|
45
45
|
}
|
|
46
46
|
function bt() {
|
|
47
|
-
for (var t, e, n, r, i, o, s, l = 1; he.length; ) he.length > l && he.sort(
|
|
47
|
+
for (var t, e, n, r, i, o, s, l = 1; he.length; ) he.length > l && he.sort(Hr), t = he.shift(), l = he.length, t.__d && (n = void 0, r = void 0, i = (r = (e = t).__v).__e, o = [], s = [], e.__P && ((n = te({}, r)).__v = r.__v + 1, b.vnode && b.vnode(n), vn(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [i] : null, o, i ?? Ae(r), !!(32 & r.__u), s), n.__v = r.__v, n.__.__k[n.__i] = n, Xr(o, n, s), r.__e = r.__ = null, n.__e != i && Kr(n)));
|
|
48
48
|
bt.__r = 0;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
var h, f, p, g, m, x, v, y = r && r.__k ||
|
|
52
|
-
for (a =
|
|
50
|
+
function Zr(t, e, n, r, i, o, s, l, a, u, d) {
|
|
51
|
+
var h, f, p, g, m, x, v, y = r && r.__k || Gr, I = e.length;
|
|
52
|
+
for (a = xo(n, e, y, a, I), h = 0; h < I; h++) (p = n.__k[h]) != null && (f = p.__i == -1 ? Ze : y[p.__i] || Ze, p.__i = h, x = vn(t, p, f, i, o, s, l, a, u, d), g = p.__e, p.ref && f.ref != p.ref && (f.ref && _n(f.ref, null, p), d.push(p.ref, p.__c || g, p)), m == null && g != null && (m = g), (v = !!(4 & p.__u)) || f.__k === p.__k ? a = Yr(p, a, t, v) : typeof p.type == "function" && x !== void 0 ? a = x : g && (a = g.nextSibling), p.__u &= -7);
|
|
53
53
|
return n.__e = m, a;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function xo(t, e, n, r, i) {
|
|
56
56
|
var o, s, l, a, u, d = n.length, h = d, f = 0;
|
|
57
|
-
for (t.__k = new Array(i), o = 0; o < i; o++) (s = e[o]) != null && typeof s != "boolean" && typeof s != "function" ? (a = o + f, (s = t.__k[o] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? He(null, s, null, null, null) : ot(s) ? He(F, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? He(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = t, s.__b = t.__b + 1, l = null, (u = s.__i =
|
|
58
|
-
if (h) for (o = 0; o < d; o++) (l = n[o]) != null && (2 & l.__u) == 0 && (l.__e == r && (r =
|
|
57
|
+
for (t.__k = new Array(i), o = 0; o < i; o++) (s = e[o]) != null && typeof s != "boolean" && typeof s != "function" ? (a = o + f, (s = t.__k[o] = typeof s == "string" || typeof s == "number" || typeof s == "bigint" || s.constructor == String ? He(null, s, null, null, null) : ot(s) ? He(F, { children: s }, null, null, null) : s.constructor == null && s.__b > 0 ? He(s.type, s.props, s.key, s.ref ? s.ref : null, s.__v) : s).__ = t, s.__b = t.__b + 1, l = null, (u = s.__i = bo(s, n, a, h)) != -1 && (h--, (l = n[u]) && (l.__u |= 2)), l == null || l.__v == null ? (u == -1 && (i > d ? f-- : i < d && f++), typeof s.type != "function" && (s.__u |= 4)) : u != a && (u == a - 1 ? f-- : u == a + 1 ? f++ : (u > a ? f-- : f++, s.__u |= 4))) : t.__k[o] = null;
|
|
58
|
+
if (h) for (o = 0; o < d; o++) (l = n[o]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = Ae(l)), ti(l, l));
|
|
59
59
|
return r;
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Yr(t, e, n, r) {
|
|
62
62
|
var i, o;
|
|
63
63
|
if (typeof t.type == "function") {
|
|
64
|
-
for (i = t.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = t, e =
|
|
64
|
+
for (i = t.__k, o = 0; i && o < i.length; o++) i[o] && (i[o].__ = t, e = Yr(i[o], e, n, r));
|
|
65
65
|
return e;
|
|
66
66
|
}
|
|
67
|
-
t.__e != e && (r && (e && t.type && !e.parentNode && (e =
|
|
67
|
+
t.__e != e && (r && (e && t.type && !e.parentNode && (e = Ae(t)), n.insertBefore(t.__e, e || null)), e = t.__e);
|
|
68
68
|
do
|
|
69
69
|
e = e && e.nextSibling;
|
|
70
70
|
while (e != null && e.nodeType == 8);
|
|
@@ -75,7 +75,7 @@ function ne(t, e) {
|
|
|
75
75
|
ne(n, e);
|
|
76
76
|
}) : e.push(t)), e;
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function bo(t, e, n, r) {
|
|
79
79
|
var i, o, s, l = t.key, a = t.type, u = e[n], d = u != null && (2 & u.__u) == 0;
|
|
80
80
|
if (u === null && t.key == null || d && l == u.key && a == u.type) return n;
|
|
81
81
|
if (r > (d ? 1 : 0)) {
|
|
@@ -83,17 +83,17 @@ function fo(t, e, n, r) {
|
|
|
83
83
|
}
|
|
84
84
|
return -1;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
87
|
-
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" ||
|
|
86
|
+
function Qn(t, e, n) {
|
|
87
|
+
e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || go.test(e) ? n : n + "px";
|
|
88
88
|
}
|
|
89
89
|
function ut(t, e, n, r, i) {
|
|
90
90
|
var o, s;
|
|
91
91
|
e: if (e == "style") if (typeof n == "string") t.style.cssText = n;
|
|
92
92
|
else {
|
|
93
|
-
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n ||
|
|
94
|
-
if (n) for (e in n) r && n[e] == r[e] ||
|
|
93
|
+
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || Qn(t.style, e, "");
|
|
94
|
+
if (n) for (e in n) r && n[e] == r[e] || Qn(t.style, e, n[e]);
|
|
95
95
|
}
|
|
96
|
-
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(
|
|
96
|
+
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(Wr, "$1")), s = e.toLowerCase(), e = s in t || e == "onFocusOut" || e == "onFocusIn" ? s.slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + o] = n, n ? r ? n.u = r.u : (n.u = bn, t.addEventListener(e, o ? Zt : Kt, o)) : t.removeEventListener(e, o ? Zt : Kt, o);
|
|
97
97
|
else {
|
|
98
98
|
if (i == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
|
|
99
99
|
else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try {
|
|
@@ -104,60 +104,60 @@ function ut(t, e, n, r, i) {
|
|
|
104
104
|
typeof n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n));
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function Dn(t) {
|
|
108
108
|
return function(e) {
|
|
109
109
|
if (this.l) {
|
|
110
110
|
var n = this.l[e.type + t];
|
|
111
|
-
if (e.t == null) e.t =
|
|
111
|
+
if (e.t == null) e.t = bn++;
|
|
112
112
|
else if (e.t < n.u) return;
|
|
113
113
|
return n(b.event ? b.event(e) : e);
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
var d, h, f, p, g, m, x, v, y, I,
|
|
117
|
+
function vn(t, e, n, r, i, o, s, l, a, u) {
|
|
118
|
+
var d, h, f, p, g, m, x, v, y, I, U, H, B, Fn, ct, ze, Ot, Z = e.type;
|
|
119
119
|
if (e.constructor != null) return null;
|
|
120
120
|
128 & n.__u && (a = !!(32 & n.__u), o = [l = e.__e = n.__e]), (d = b.__b) && d(e);
|
|
121
121
|
e: if (typeof Z == "function") try {
|
|
122
|
-
if (v = e.props, y = "prototype" in Z && Z.prototype.render, I = (d = Z.contextType) && r[d.__c],
|
|
122
|
+
if (v = e.props, y = "prototype" in Z && Z.prototype.render, I = (d = Z.contextType) && r[d.__c], U = d ? I ? I.props.value : d.__ : r, n.__c ? x = (h = e.__c = n.__c).__ = h.__E : (y ? e.__c = h = new Z(v, U) : (e.__c = h = new G(v, U), h.constructor = Z, h.render = vo), I && I.sub(h), h.props = v, h.state || (h.state = {}), h.context = U, h.__n = r, f = h.__d = !0, h.__h = [], h._sb = []), y && h.__s == null && (h.__s = h.state), y && Z.getDerivedStateFromProps != null && (h.__s == h.state && (h.__s = te({}, h.__s)), te(h.__s, Z.getDerivedStateFromProps(v, h.__s))), p = h.props, g = h.state, h.__v = e, f) y && Z.getDerivedStateFromProps == null && h.componentWillMount != null && h.componentWillMount(), y && h.componentDidMount != null && h.__h.push(h.componentDidMount);
|
|
123
123
|
else {
|
|
124
|
-
if (y && Z.getDerivedStateFromProps == null && v !== p && h.componentWillReceiveProps != null && h.componentWillReceiveProps(v,
|
|
124
|
+
if (y && Z.getDerivedStateFromProps == null && v !== p && h.componentWillReceiveProps != null && h.componentWillReceiveProps(v, U), !h.__e && h.shouldComponentUpdate != null && h.shouldComponentUpdate(v, h.__s, U) === !1 || e.__v == n.__v) {
|
|
125
125
|
for (e.__v != n.__v && (h.props = v, h.state = h.__s, h.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(_e) {
|
|
126
126
|
_e && (_e.__ = e);
|
|
127
127
|
}), H = 0; H < h._sb.length; H++) h.__h.push(h._sb[H]);
|
|
128
128
|
h._sb = [], h.__h.length && s.push(h);
|
|
129
129
|
break e;
|
|
130
130
|
}
|
|
131
|
-
h.componentWillUpdate != null && h.componentWillUpdate(v, h.__s,
|
|
131
|
+
h.componentWillUpdate != null && h.componentWillUpdate(v, h.__s, U), y && h.componentDidUpdate != null && h.__h.push(function() {
|
|
132
132
|
h.componentDidUpdate(p, g, m);
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
if (h.context =
|
|
135
|
+
if (h.context = U, h.props = v, h.__P = t, h.__e = !1, B = b.__r, Fn = 0, y) {
|
|
136
136
|
for (h.state = h.__s, h.__d = !1, B && B(e), d = h.render(h.props, h.state, h.context), ct = 0; ct < h._sb.length; ct++) h.__h.push(h._sb[ct]);
|
|
137
137
|
h._sb = [];
|
|
138
138
|
} else do
|
|
139
139
|
h.__d = !1, B && B(e), d = h.render(h.props, h.state, h.context), h.state = h.__s;
|
|
140
|
-
while (h.__d && ++
|
|
141
|
-
h.state = h.__s, h.getChildContext != null && (r = te(te({}, r), h.getChildContext())), y && !f && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(p, g)),
|
|
140
|
+
while (h.__d && ++Fn < 25);
|
|
141
|
+
h.state = h.__s, h.getChildContext != null && (r = te(te({}, r), h.getChildContext())), y && !f && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(p, g)), ze = d, d != null && d.type === F && d.key == null && (ze = ei(d.props.children)), l = Zr(t, ot(ze) ? ze : [ze], e, n, r, i, o, s, l, a, u), h.base = e.__e, e.__u &= -161, h.__h.length && s.push(h), x && (h.__E = h.__ = null);
|
|
142
142
|
} catch (_e) {
|
|
143
143
|
if (e.__v = null, a || o != null) if (_e.then) {
|
|
144
144
|
for (e.__u |= a ? 160 : 128; l && l.nodeType == 8 && l.nextSibling; ) l = l.nextSibling;
|
|
145
145
|
o[o.indexOf(l)] = null, e.__e = l;
|
|
146
146
|
} else {
|
|
147
|
-
for (
|
|
148
|
-
|
|
147
|
+
for (Ot = o.length; Ot--; ) yn(o[Ot]);
|
|
148
|
+
Xt(e);
|
|
149
149
|
}
|
|
150
|
-
else e.__e = n.__e, e.__k = n.__k, _e.then ||
|
|
150
|
+
else e.__e = n.__e, e.__k = n.__k, _e.then || Xt(e);
|
|
151
151
|
b.__e(_e, e, n);
|
|
152
152
|
}
|
|
153
|
-
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e =
|
|
153
|
+
else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : l = e.__e = yo(n.__e, e, n, r, i, o, s, a, u);
|
|
154
154
|
return (d = b.diffed) && d(e), 128 & e.__u ? void 0 : l;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(
|
|
156
|
+
function Xt(t) {
|
|
157
|
+
t && t.__c && (t.__c.__e = !0), t && t.__k && t.__k.forEach(Xt);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
for (var r = 0; r < n.length; r++)
|
|
159
|
+
function Xr(t, e, n) {
|
|
160
|
+
for (var r = 0; r < n.length; r++) _n(n[r], n[++r], n[++r]);
|
|
161
161
|
b.__c && b.__c(e, t), t.some(function(i) {
|
|
162
162
|
try {
|
|
163
163
|
t = i.__h, i.__h = [], t.some(function(o) {
|
|
@@ -168,10 +168,10 @@ function Jr(t, e, n) {
|
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : ot(t) ? t.map(
|
|
171
|
+
function ei(t) {
|
|
172
|
+
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : ot(t) ? t.map(ei) : te({}, t);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function yo(t, e, n, r, i, o, s, l, a) {
|
|
175
175
|
var u, d, h, f, p, g, m, x = n.props, v = e.props, y = e.type;
|
|
176
176
|
if (y == "svg" ? i = "http://www.w3.org/2000/svg" : y == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), o != null) {
|
|
177
177
|
for (u = 0; u < o.length; u++) if ((p = o[u]) && "setAttribute" in p == !!y && (y ? p.localName == y : p.nodeType == 3)) {
|
|
@@ -195,12 +195,12 @@ function po(t, e, n, r, i, o, s, l, a) {
|
|
|
195
195
|
}
|
|
196
196
|
for (u in v) p = v[u], u == "children" ? f = p : u == "dangerouslySetInnerHTML" ? d = p : u == "value" ? g = p : u == "checked" ? m = p : l && typeof p != "function" || x[u] === p || ut(t, u, p, x[u], i);
|
|
197
197
|
if (d) l || h && (d.__html == h.__html || d.__html == t.innerHTML) || (t.innerHTML = d.__html), e.__k = [];
|
|
198
|
-
else if (h && (t.innerHTML = ""),
|
|
198
|
+
else if (h && (t.innerHTML = ""), Zr(e.type == "template" ? t.content : t, ot(f) ? f : [f], e, n, r, y == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, o, s, o ? o[0] : n.__k && Ae(n, 0), l, a), o != null) for (u = o.length; u--; ) yn(o[u]);
|
|
199
199
|
l || (u = "value", y == "progress" && g == null ? t.removeAttribute("value") : g != null && (g !== t[u] || y == "progress" && !g || y == "option" && g != x[u]) && ut(t, u, g, x[u], i), u = "checked", m != null && m != t[u] && ut(t, u, m, x[u], i));
|
|
200
200
|
}
|
|
201
201
|
return t;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function _n(t, e, n) {
|
|
204
204
|
try {
|
|
205
205
|
if (typeof t == "function") {
|
|
206
206
|
var r = typeof t.__u == "function";
|
|
@@ -210,9 +210,9 @@ function bn(t, e, n) {
|
|
|
210
210
|
b.__e(i, n);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function ti(t, e, n) {
|
|
214
214
|
var r, i;
|
|
215
|
-
if (b.unmount && b.unmount(t), (r = t.ref) && (r.current && r.current != t.__e ||
|
|
215
|
+
if (b.unmount && b.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || _n(r, null, e)), (r = t.__c) != null) {
|
|
216
216
|
if (r.componentWillUnmount) try {
|
|
217
217
|
r.componentWillUnmount();
|
|
218
218
|
} catch (o) {
|
|
@@ -220,25 +220,25 @@ function Gr(t, e, n) {
|
|
|
220
220
|
}
|
|
221
221
|
r.base = r.__P = null;
|
|
222
222
|
}
|
|
223
|
-
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] &&
|
|
224
|
-
n ||
|
|
223
|
+
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && ti(r[i], e, n || typeof t.type != "function");
|
|
224
|
+
n || yn(t.__e), t.__c = t.__ = t.__e = void 0;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function vo(t, e, n) {
|
|
227
227
|
return this.constructor(t, n);
|
|
228
228
|
}
|
|
229
229
|
function ge(t, e, n) {
|
|
230
230
|
var r, i, o, s;
|
|
231
|
-
e == document && (e = document.documentElement), b.__ && b.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, o = [], s = [],
|
|
231
|
+
e == document && (e = document.documentElement), b.__ && b.__(t, e), i = (r = typeof n == "function") ? null : n && n.__k || e.__k, o = [], s = [], vn(e, t = (!r && n || e).__k = V(F, null, [t]), i || Ze, Ze, e.namespaceURI, !r && n ? [n] : i ? null : e.firstChild ? it.call(e.childNodes) : null, o, !r && n ? n : i ? i.__e : e.firstChild, r, s), Xr(o, t, s);
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
ge(t, e,
|
|
233
|
+
function ni(t, e) {
|
|
234
|
+
ge(t, e, ni);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function _o(t, e, n) {
|
|
237
237
|
var r, i, o, s, l = te({}, t.props);
|
|
238
238
|
for (o in t.type && t.type.defaultProps && (s = t.type.defaultProps), e) o == "key" ? r = e[o] : o == "ref" ? i = e[o] : l[o] = e[o] === void 0 && s != null ? s[o] : e[o];
|
|
239
239
|
return arguments.length > 2 && (l.children = arguments.length > 3 ? it.call(arguments, 2) : n), He(t.type, l, r || t.key, i || t.ref, null);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function wo(t) {
|
|
242
242
|
function e(n) {
|
|
243
243
|
var r, i;
|
|
244
244
|
return this.getChildContext || (r = /* @__PURE__ */ new Set(), (i = {})[e.__c] = this, this.getChildContext = function() {
|
|
@@ -247,7 +247,7 @@ function xo(t) {
|
|
|
247
247
|
r = null;
|
|
248
248
|
}, this.shouldComponentUpdate = function(o) {
|
|
249
249
|
this.props.value != o.value && r.forEach(function(s) {
|
|
250
|
-
s.__e = !0,
|
|
250
|
+
s.__e = !0, Yt(s);
|
|
251
251
|
});
|
|
252
252
|
}, this.sub = function(o) {
|
|
253
253
|
r.add(o);
|
|
@@ -257,48 +257,48 @@ function xo(t) {
|
|
|
257
257
|
};
|
|
258
258
|
}), n.children;
|
|
259
259
|
}
|
|
260
|
-
return e.__c = "__cC" +
|
|
260
|
+
return e.__c = "__cC" + Jr++, e.__ = t, e.Provider = e.__l = (e.Consumer = function(n, r) {
|
|
261
261
|
return n.children(r);
|
|
262
262
|
}).contextType = e, e;
|
|
263
263
|
}
|
|
264
|
-
it =
|
|
264
|
+
it = Gr.slice, b = { __e: function(t, e, n, r) {
|
|
265
265
|
for (var i, o, s; e = e.__; ) if ((i = e.__c) && !i.__) try {
|
|
266
266
|
if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(t)), s = i.__d), i.componentDidCatch != null && (i.componentDidCatch(t, r || {}), s = i.__d), s) return i.__E = i;
|
|
267
267
|
} catch (l) {
|
|
268
268
|
t = l;
|
|
269
269
|
}
|
|
270
270
|
throw t;
|
|
271
|
-
} },
|
|
271
|
+
} }, Qr = 0, Dr = function(t) {
|
|
272
272
|
return t != null && t.constructor == null;
|
|
273
|
-
},
|
|
273
|
+
}, G.prototype.setState = function(t, e) {
|
|
274
274
|
var n;
|
|
275
|
-
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = te({}, this.state), typeof t == "function" && (t = t(te({}, n), this.props)), t && te(n, t), t != null && this.__v && (e && this._sb.push(e),
|
|
276
|
-
},
|
|
277
|
-
this.__v && (this.__e = !0, t && this.__h.push(t),
|
|
278
|
-
},
|
|
275
|
+
n = this.__s != null && this.__s != this.state ? this.__s : this.__s = te({}, this.state), typeof t == "function" && (t = t(te({}, n), this.props)), t && te(n, t), t != null && this.__v && (e && this._sb.push(e), Yt(this));
|
|
276
|
+
}, G.prototype.forceUpdate = function(t) {
|
|
277
|
+
this.__v && (this.__e = !0, t && this.__h.push(t), Yt(this));
|
|
278
|
+
}, G.prototype.render = F, he = [], Vr = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Hr = function(t, e) {
|
|
279
279
|
return t.__v.__b - e.__v.__b;
|
|
280
|
-
}, bt.__r = 0,
|
|
281
|
-
var
|
|
280
|
+
}, bt.__r = 0, Wr = /(PointerCapture)$|Capture$/i, bn = 0, Kt = Dn(!1), Zt = Dn(!0), Jr = 0;
|
|
281
|
+
var ko = 0;
|
|
282
282
|
function c(t, e, n, r, i, o) {
|
|
283
283
|
e || (e = {});
|
|
284
284
|
var s, l, a = e;
|
|
285
285
|
if ("ref" in a) for (l in a = {}, e) l == "ref" ? s = e[l] : a[l] = e[l];
|
|
286
|
-
var u = { type: t, props: a, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --
|
|
286
|
+
var u = { type: t, props: a, key: n, ref: s, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --ko, __i: -1, __u: 0, __source: i, __self: o };
|
|
287
287
|
if (typeof t == "function" && (s = t.defaultProps)) for (l in s) a[l] === void 0 && (a[l] = s[l]);
|
|
288
288
|
return b.vnode && b.vnode(u), u;
|
|
289
289
|
}
|
|
290
|
-
var ce, j,
|
|
291
|
-
function
|
|
292
|
-
S.__h && S.__h(j, t,
|
|
290
|
+
var ce, j, Nt, Vn, $e = 0, ri = [], S = b, Hn = S.__b, Wn = S.__r, Jn = S.diffed, Gn = S.__c, Kn = S.unmount, Zn = S.__;
|
|
291
|
+
function Me(t, e) {
|
|
292
|
+
S.__h && S.__h(j, t, $e || e), $e = 0;
|
|
293
293
|
var n = j.__H || (j.__H = { __: [], __h: [] });
|
|
294
294
|
return t >= n.__.length && n.__.push({}), n.__[t];
|
|
295
295
|
}
|
|
296
296
|
function C(t) {
|
|
297
|
-
return
|
|
297
|
+
return $e = 1, wn(ai, t);
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
var r =
|
|
301
|
-
if (r.t = t, !r.__c && (r.__ = [n ? n(e) :
|
|
299
|
+
function wn(t, e, n) {
|
|
300
|
+
var r = Me(ce++, 2);
|
|
301
|
+
if (r.t = t, !r.__c && (r.__ = [n ? n(e) : ai(void 0, e), function(l) {
|
|
302
302
|
var a = r.__N ? r.__N[0] : r.__[0], u = r.t(a, l);
|
|
303
303
|
a !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
|
|
304
304
|
}], r.__c = j, !j.__f)) {
|
|
@@ -331,20 +331,20 @@ function yn(t, e, n) {
|
|
|
331
331
|
return r.__N || r.__;
|
|
332
332
|
}
|
|
333
333
|
function T(t, e) {
|
|
334
|
-
var n =
|
|
335
|
-
!S.__s &&
|
|
334
|
+
var n = Me(ce++, 3);
|
|
335
|
+
!S.__s && kn(n.__H, e) && (n.__ = t, n.u = e, j.__H.__h.push(n));
|
|
336
336
|
}
|
|
337
337
|
function st(t, e) {
|
|
338
|
-
var n =
|
|
339
|
-
!S.__s &&
|
|
338
|
+
var n = Me(ce++, 4);
|
|
339
|
+
!S.__s && kn(n.__H, e) && (n.__ = t, n.u = e, j.__h.push(n));
|
|
340
340
|
}
|
|
341
341
|
function ue(t) {
|
|
342
|
-
return
|
|
342
|
+
return $e = 5, K(function() {
|
|
343
343
|
return { current: t };
|
|
344
344
|
}, []);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
|
|
346
|
+
function ii(t, e, n) {
|
|
347
|
+
$e = 6, st(function() {
|
|
348
348
|
if (typeof t == "function") {
|
|
349
349
|
var r = t(e());
|
|
350
350
|
return function() {
|
|
@@ -356,24 +356,24 @@ function Xr(t, e, n) {
|
|
|
356
356
|
};
|
|
357
357
|
}, n == null ? n : n.concat(t));
|
|
358
358
|
}
|
|
359
|
-
function
|
|
360
|
-
var n =
|
|
361
|
-
return
|
|
359
|
+
function K(t, e) {
|
|
360
|
+
var n = Me(ce++, 7);
|
|
361
|
+
return kn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
return
|
|
363
|
+
function Re(t, e) {
|
|
364
|
+
return $e = 8, K(function() {
|
|
365
365
|
return t;
|
|
366
366
|
}, e);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
var e = j.context[t.__c], n =
|
|
368
|
+
function $t(t) {
|
|
369
|
+
var e = j.context[t.__c], n = Me(ce++, 9);
|
|
370
370
|
return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(j)), e.props.value) : t.__;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
372
|
+
function oi(t, e) {
|
|
373
373
|
S.useDebugValue && S.useDebugValue(e ? e(t) : t);
|
|
374
374
|
}
|
|
375
|
-
function
|
|
376
|
-
var t =
|
|
375
|
+
function si() {
|
|
376
|
+
var t = Me(ce++, 11);
|
|
377
377
|
if (!t.__) {
|
|
378
378
|
for (var e = j.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
|
|
379
379
|
var n = e.__m || (e.__m = [0, 0]);
|
|
@@ -381,43 +381,43 @@ function ti() {
|
|
|
381
381
|
}
|
|
382
382
|
return t.__;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
385
|
-
for (var t; t =
|
|
386
|
-
t.__H.__h.forEach(gt), t.__H.__h.forEach(
|
|
384
|
+
function jo() {
|
|
385
|
+
for (var t; t = ri.shift(); ) if (t.__P && t.__H) try {
|
|
386
|
+
t.__H.__h.forEach(gt), t.__H.__h.forEach(en), t.__H.__h = [];
|
|
387
387
|
} catch (e) {
|
|
388
388
|
t.__H.__h = [], S.__e(e, t.__v);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
391
391
|
S.__b = function(t) {
|
|
392
|
-
j = null,
|
|
392
|
+
j = null, Hn && Hn(t);
|
|
393
393
|
}, S.__ = function(t, e) {
|
|
394
|
-
t && e.__k && e.__k.__m && (t.__m = e.__k.__m),
|
|
394
|
+
t && e.__k && e.__k.__m && (t.__m = e.__k.__m), Zn && Zn(t, e);
|
|
395
395
|
}, S.__r = function(t) {
|
|
396
|
-
|
|
396
|
+
Wn && Wn(t), ce = 0;
|
|
397
397
|
var e = (j = t.__c).__H;
|
|
398
|
-
e && (
|
|
398
|
+
e && (Nt === j ? (e.__h = [], j.__h = [], e.__.forEach(function(n) {
|
|
399
399
|
n.__N && (n.__ = n.__N), n.u = n.__N = void 0;
|
|
400
|
-
})) : (e.__h.forEach(gt), e.__h.forEach(
|
|
400
|
+
})) : (e.__h.forEach(gt), e.__h.forEach(en), e.__h = [], ce = 0)), Nt = j;
|
|
401
401
|
}, S.diffed = function(t) {
|
|
402
|
-
|
|
402
|
+
Jn && Jn(t);
|
|
403
403
|
var e = t.__c;
|
|
404
|
-
e && e.__H && (e.__H.__h.length && (
|
|
404
|
+
e && e.__H && (e.__H.__h.length && (ri.push(e) !== 1 && Vn === S.requestAnimationFrame || ((Vn = S.requestAnimationFrame) || So)(jo)), e.__H.__.forEach(function(n) {
|
|
405
405
|
n.u && (n.__H = n.u), n.u = void 0;
|
|
406
|
-
})),
|
|
406
|
+
})), Nt = j = null;
|
|
407
407
|
}, S.__c = function(t, e) {
|
|
408
408
|
e.some(function(n) {
|
|
409
409
|
try {
|
|
410
410
|
n.__h.forEach(gt), n.__h = n.__h.filter(function(r) {
|
|
411
|
-
return !r.__ ||
|
|
411
|
+
return !r.__ || en(r);
|
|
412
412
|
});
|
|
413
413
|
} catch (r) {
|
|
414
414
|
e.some(function(i) {
|
|
415
415
|
i.__h && (i.__h = []);
|
|
416
416
|
}), e = [], S.__e(r, n.__v);
|
|
417
417
|
}
|
|
418
|
-
}),
|
|
418
|
+
}), Gn && Gn(t, e);
|
|
419
419
|
}, S.unmount = function(t) {
|
|
420
|
-
|
|
420
|
+
Kn && Kn(t);
|
|
421
421
|
var e, n = t.__c;
|
|
422
422
|
n && n.__H && (n.__H.__.forEach(function(r) {
|
|
423
423
|
try {
|
|
@@ -427,49 +427,49 @@ S.__b = function(t) {
|
|
|
427
427
|
}
|
|
428
428
|
}), n.__H = void 0, e && S.__e(e, n.__v));
|
|
429
429
|
};
|
|
430
|
-
var
|
|
431
|
-
function
|
|
430
|
+
var Yn = typeof requestAnimationFrame == "function";
|
|
431
|
+
function So(t) {
|
|
432
432
|
var e, n = function() {
|
|
433
|
-
clearTimeout(r),
|
|
433
|
+
clearTimeout(r), Yn && cancelAnimationFrame(e), setTimeout(t);
|
|
434
434
|
}, r = setTimeout(n, 35);
|
|
435
|
-
|
|
435
|
+
Yn && (e = requestAnimationFrame(n));
|
|
436
436
|
}
|
|
437
437
|
function gt(t) {
|
|
438
438
|
var e = j, n = t.__c;
|
|
439
439
|
typeof n == "function" && (t.__c = void 0, n()), j = e;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function en(t) {
|
|
442
442
|
var e = j;
|
|
443
443
|
t.__c = t.__(), j = e;
|
|
444
444
|
}
|
|
445
|
-
function
|
|
445
|
+
function kn(t, e) {
|
|
446
446
|
return !t || t.length !== e.length || e.some(function(n, r) {
|
|
447
447
|
return n !== t[r];
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function ai(t, e) {
|
|
451
451
|
return typeof e == "function" ? e(t) : e;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function li(t, e) {
|
|
454
454
|
for (var n in e) t[n] = e[n];
|
|
455
455
|
return t;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function tn(t, e) {
|
|
458
458
|
for (var n in t) if (n !== "__source" && !(n in e)) return !0;
|
|
459
459
|
for (var r in e) if (r !== "__source" && t[r] !== e[r]) return !0;
|
|
460
460
|
return !1;
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function ci(t, e) {
|
|
463
463
|
var n = e(), r = C({ t: { __: n, u: e } }), i = r[0].t, o = r[1];
|
|
464
464
|
return st(function() {
|
|
465
|
-
i.__ = n, i.u = e,
|
|
465
|
+
i.__ = n, i.u = e, zt(i) && o({ t: i });
|
|
466
466
|
}, [t, n, e]), T(function() {
|
|
467
|
-
return
|
|
468
|
-
|
|
467
|
+
return zt(i) && o({ t: i }), t(function() {
|
|
468
|
+
zt(i) && o({ t: i });
|
|
469
469
|
});
|
|
470
470
|
}, [t]), n;
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function zt(t) {
|
|
473
473
|
var e, n, r = t.u, i = t.__;
|
|
474
474
|
try {
|
|
475
475
|
var o = r();
|
|
@@ -478,80 +478,80 @@ function Nt(t) {
|
|
|
478
478
|
return !0;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function ui(t) {
|
|
482
482
|
t();
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function hi(t) {
|
|
485
485
|
return t;
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
return [!1,
|
|
487
|
+
function di() {
|
|
488
|
+
return [!1, ui];
|
|
489
489
|
}
|
|
490
|
-
var
|
|
491
|
-
function
|
|
490
|
+
var fi = st;
|
|
491
|
+
function nn(t, e) {
|
|
492
492
|
this.props = t, this.context = e;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function Co(t, e) {
|
|
495
495
|
function n(i) {
|
|
496
496
|
var o = this.props.ref, s = o == i.ref;
|
|
497
|
-
return !s && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, i) || !s :
|
|
497
|
+
return !s && o && (o.call ? o(null) : o.current = null), e ? !e(this.props, i) || !s : tn(this.props, i);
|
|
498
498
|
}
|
|
499
499
|
function r(i) {
|
|
500
500
|
return this.shouldComponentUpdate = n, V(t, i);
|
|
501
501
|
}
|
|
502
502
|
return r.displayName = "Memo(" + (t.displayName || t.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r.type = t, r;
|
|
503
503
|
}
|
|
504
|
-
(
|
|
505
|
-
return
|
|
504
|
+
(nn.prototype = new G()).isPureReactComponent = !0, nn.prototype.shouldComponentUpdate = function(t, e) {
|
|
505
|
+
return tn(this.props, t) || tn(this.state, e);
|
|
506
506
|
};
|
|
507
|
-
var
|
|
507
|
+
var Xn = b.__b;
|
|
508
508
|
b.__b = function(t) {
|
|
509
|
-
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null),
|
|
509
|
+
t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), Xn && Xn(t);
|
|
510
510
|
};
|
|
511
|
-
var
|
|
512
|
-
function
|
|
511
|
+
var To = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
512
|
+
function Ro(t) {
|
|
513
513
|
function e(n) {
|
|
514
|
-
var r =
|
|
514
|
+
var r = li({}, n);
|
|
515
515
|
return delete r.ref, t(r, n.ref || null);
|
|
516
516
|
}
|
|
517
|
-
return e.$$typeof =
|
|
517
|
+
return e.$$typeof = To, e.render = t, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
|
|
518
518
|
}
|
|
519
|
-
var
|
|
519
|
+
var er = function(t, e) {
|
|
520
520
|
return t == null ? null : ne(ne(t).map(e));
|
|
521
|
-
},
|
|
521
|
+
}, Ao = { map: er, forEach: er, count: function(t) {
|
|
522
522
|
return t ? ne(t).length : 0;
|
|
523
523
|
}, only: function(t) {
|
|
524
524
|
var e = ne(t);
|
|
525
525
|
if (e.length !== 1) throw "Children.only";
|
|
526
526
|
return e[0];
|
|
527
|
-
}, toArray: ne },
|
|
527
|
+
}, toArray: ne }, $o = b.__e;
|
|
528
528
|
b.__e = function(t, e, n, r) {
|
|
529
529
|
if (t.then) {
|
|
530
530
|
for (var i, o = e; o = o.__; ) if ((i = o.__c) && i.__c) return e.__e == null && (e.__e = n.__e, e.__k = n.__k), i.__c(t, e);
|
|
531
531
|
}
|
|
532
|
-
|
|
532
|
+
$o(t, e, n, r);
|
|
533
533
|
};
|
|
534
|
-
var
|
|
535
|
-
function
|
|
534
|
+
var tr = b.unmount;
|
|
535
|
+
function pi(t, e, n) {
|
|
536
536
|
return t && (t.__c && t.__c.__H && (t.__c.__H.__.forEach(function(r) {
|
|
537
537
|
typeof r.__c == "function" && r.__c();
|
|
538
|
-
}), t.__c.__H = null), (t =
|
|
539
|
-
return
|
|
538
|
+
}), t.__c.__H = null), (t = li({}, t)).__c != null && (t.__c.__P === n && (t.__c.__P = e), t.__c.__e = !0, t.__c = null), t.__k = t.__k && t.__k.map(function(r) {
|
|
539
|
+
return pi(r, e, n);
|
|
540
540
|
})), t;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function gi(t, e, n) {
|
|
543
543
|
return t && n && (t.__v = null, t.__k = t.__k && t.__k.map(function(r) {
|
|
544
|
-
return
|
|
544
|
+
return gi(r, e, n);
|
|
545
545
|
}), t.__c && t.__c.__P === e && (t.__e && n.appendChild(t.__e), t.__c.__e = !0, t.__c.__P = n)), t;
|
|
546
546
|
}
|
|
547
547
|
function mt() {
|
|
548
548
|
this.__u = 0, this.o = null, this.__b = null;
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function mi(t) {
|
|
551
551
|
var e = t.__.__c;
|
|
552
552
|
return e && e.__a && e.__a(t);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Eo(t) {
|
|
555
555
|
var e, n, r;
|
|
556
556
|
function i(o) {
|
|
557
557
|
if (e || (e = t()).then(function(s) {
|
|
@@ -569,11 +569,11 @@ function Qe() {
|
|
|
569
569
|
}
|
|
570
570
|
b.unmount = function(t) {
|
|
571
571
|
var e = t.__c;
|
|
572
|
-
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null),
|
|
573
|
-
}, (mt.prototype = new
|
|
572
|
+
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), tr && tr(t);
|
|
573
|
+
}, (mt.prototype = new G()).__c = function(t, e) {
|
|
574
574
|
var n = e.__c, r = this;
|
|
575
575
|
r.o == null && (r.o = []), r.o.push(n);
|
|
576
|
-
var i =
|
|
576
|
+
var i = mi(r.__v), o = !1, s = function() {
|
|
577
577
|
o || (o = !0, n.__R = null, i ? i(l) : l());
|
|
578
578
|
};
|
|
579
579
|
n.__R = s;
|
|
@@ -581,7 +581,7 @@ b.unmount = function(t) {
|
|
|
581
581
|
if (!--r.__u) {
|
|
582
582
|
if (r.state.__a) {
|
|
583
583
|
var a = r.state.__a;
|
|
584
|
-
r.__v.__k[0] =
|
|
584
|
+
r.__v.__k[0] = gi(a, a.__c.__P, a.__c.__O);
|
|
585
585
|
}
|
|
586
586
|
var u;
|
|
587
587
|
for (r.setState({ __a: r.__b = null }); u = r.o.pop(); ) u.forceUpdate();
|
|
@@ -594,26 +594,26 @@ b.unmount = function(t) {
|
|
|
594
594
|
if (this.__b) {
|
|
595
595
|
if (this.__v.__k) {
|
|
596
596
|
var n = document.createElement("div"), r = this.__v.__k[0].__c;
|
|
597
|
-
this.__v.__k[0] =
|
|
597
|
+
this.__v.__k[0] = pi(this.__b, n, r.__O = r.__P);
|
|
598
598
|
}
|
|
599
599
|
this.__b = null;
|
|
600
600
|
}
|
|
601
601
|
var i = e.__a && V(F, null, t.fallback);
|
|
602
602
|
return i && (i.__u &= -33), [V(F, null, e.__a ? null : t.children), i];
|
|
603
603
|
};
|
|
604
|
-
var
|
|
604
|
+
var nr = function(t, e, n) {
|
|
605
605
|
if (++n[1] === n[0] && t.l.delete(e), t.props.revealOrder && (t.props.revealOrder[0] !== "t" || !t.l.size)) for (n = t.i; n; ) {
|
|
606
606
|
for (; n.length > 3; ) n.pop()();
|
|
607
607
|
if (n[1] < n[0]) break;
|
|
608
608
|
t.i = n = n[2];
|
|
609
609
|
}
|
|
610
610
|
};
|
|
611
|
-
function
|
|
611
|
+
function Io(t) {
|
|
612
612
|
return this.getChildContext = function() {
|
|
613
613
|
return t.context;
|
|
614
614
|
}, t.children;
|
|
615
615
|
}
|
|
616
|
-
function
|
|
616
|
+
function Po(t) {
|
|
617
617
|
var e = this, n = t.h;
|
|
618
618
|
if (e.componentWillUnmount = function() {
|
|
619
619
|
ge(null, e.v), e.v = null, e.h = null;
|
|
@@ -627,17 +627,17 @@ function Ro(t) {
|
|
|
627
627
|
this.childNodes.splice(this.childNodes.indexOf(i) >>> 1, 1), e.h.removeChild(i);
|
|
628
628
|
} };
|
|
629
629
|
}
|
|
630
|
-
ge(V(
|
|
630
|
+
ge(V(Io, { context: e.context }, t.__v), e.v);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
var n = V(
|
|
632
|
+
function Lo(t, e) {
|
|
633
|
+
var n = V(Po, { __v: t, h: e });
|
|
634
634
|
return n.containerInfo = e, n;
|
|
635
635
|
}
|
|
636
|
-
(Qe.prototype = new
|
|
637
|
-
var e = this, n =
|
|
636
|
+
(Qe.prototype = new G()).__a = function(t) {
|
|
637
|
+
var e = this, n = mi(e.__v), r = e.l.get(t);
|
|
638
638
|
return r[0]++, function(i) {
|
|
639
639
|
var o = function() {
|
|
640
|
-
e.props.revealOrder ? (r.push(i),
|
|
640
|
+
e.props.revealOrder ? (r.push(i), nr(e, t, r)) : i();
|
|
641
641
|
};
|
|
642
642
|
n ? n(o) : o();
|
|
643
643
|
};
|
|
@@ -650,101 +650,101 @@ function Ao(t, e) {
|
|
|
650
650
|
}, Qe.prototype.componentDidUpdate = Qe.prototype.componentDidMount = function() {
|
|
651
651
|
var t = this;
|
|
652
652
|
this.l.forEach(function(e, n) {
|
|
653
|
-
|
|
653
|
+
nr(t, n, e);
|
|
654
654
|
});
|
|
655
655
|
};
|
|
656
|
-
var
|
|
656
|
+
var xi = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, Mo = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, qo = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Oo = /[A-Z0-9]/g, No = typeof document < "u", zo = function(t) {
|
|
657
657
|
return (typeof Symbol < "u" && typeof /* @__PURE__ */ Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(t);
|
|
658
658
|
};
|
|
659
|
-
function
|
|
659
|
+
function Bo(t, e, n) {
|
|
660
660
|
return e.__k == null && (e.textContent = ""), ge(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
return
|
|
662
|
+
function Fo(t, e, n) {
|
|
663
|
+
return ni(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
664
664
|
}
|
|
665
|
-
|
|
666
|
-
Object.defineProperty(
|
|
665
|
+
G.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
|
|
666
|
+
Object.defineProperty(G.prototype, t, { configurable: !0, get: function() {
|
|
667
667
|
return this["UNSAFE_" + t];
|
|
668
668
|
}, set: function(e) {
|
|
669
669
|
Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
|
|
670
670
|
} });
|
|
671
671
|
});
|
|
672
|
-
var
|
|
673
|
-
function
|
|
672
|
+
var rr = b.event;
|
|
673
|
+
function Uo() {
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Qo() {
|
|
676
676
|
return this.cancelBubble;
|
|
677
677
|
}
|
|
678
|
-
function
|
|
678
|
+
function Do() {
|
|
679
679
|
return this.defaultPrevented;
|
|
680
680
|
}
|
|
681
681
|
b.event = function(t) {
|
|
682
|
-
return
|
|
682
|
+
return rr && (t = rr(t)), t.persist = Uo, t.isPropagationStopped = Qo, t.isDefaultPrevented = Do, t.nativeEvent = t;
|
|
683
683
|
};
|
|
684
|
-
var
|
|
684
|
+
var jn, Vo = { enumerable: !1, configurable: !0, get: function() {
|
|
685
685
|
return this.class;
|
|
686
|
-
} },
|
|
686
|
+
} }, ir = b.vnode;
|
|
687
687
|
b.vnode = function(t) {
|
|
688
688
|
typeof t.type == "string" && (function(e) {
|
|
689
689
|
var n = e.props, r = e.type, i = {}, o = r.indexOf("-") === -1;
|
|
690
690
|
for (var s in n) {
|
|
691
691
|
var l = n[s];
|
|
692
|
-
if (!(s === "value" && "defaultValue" in n && l == null ||
|
|
692
|
+
if (!(s === "value" && "defaultValue" in n && l == null || No && s === "children" && r === "noscript" || s === "class" || s === "className")) {
|
|
693
693
|
var a = s.toLowerCase();
|
|
694
|
-
s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && l === !0 ? l = "" : a === "translate" && l === "no" ? l = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? s = "ondblclick" : a !== "onchange" || r !== "input" && r !== "textarea" ||
|
|
694
|
+
s === "defaultValue" && "value" in n && n.value == null ? s = "value" : s === "download" && l === !0 ? l = "" : a === "translate" && l === "no" ? l = !1 : a[0] === "o" && a[1] === "n" ? a === "ondoubleclick" ? s = "ondblclick" : a !== "onchange" || r !== "input" && r !== "textarea" || zo(n.type) ? a === "onfocus" ? s = "onfocusin" : a === "onblur" ? s = "onfocusout" : qo.test(s) && (s = a) : a = s = "oninput" : o && Mo.test(s) ? s = s.replace(Oo, "-$&").toLowerCase() : l === null && (l = void 0), a === "oninput" && i[s = a] && (s = "oninputCapture"), i[s] = l;
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
r == "select" && i.multiple && Array.isArray(i.value) && (i.value = ne(n.children).forEach(function(u) {
|
|
698
698
|
u.props.selected = i.value.indexOf(u.props.value) != -1;
|
|
699
699
|
})), r == "select" && i.defaultValue != null && (i.value = ne(n.children).forEach(function(u) {
|
|
700
700
|
u.props.selected = i.multiple ? i.defaultValue.indexOf(u.props.value) != -1 : i.defaultValue == u.props.value;
|
|
701
|
-
})), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className",
|
|
702
|
-
})(t), t.$$typeof =
|
|
701
|
+
})), n.class && !n.className ? (i.class = n.class, Object.defineProperty(i, "className", Vo)) : (n.className && !n.class || n.class && n.className) && (i.class = i.className = n.className), e.props = i;
|
|
702
|
+
})(t), t.$$typeof = xi, ir && ir(t);
|
|
703
703
|
};
|
|
704
|
-
var
|
|
704
|
+
var or = b.__r;
|
|
705
705
|
b.__r = function(t) {
|
|
706
|
-
|
|
706
|
+
or && or(t), jn = t.__c;
|
|
707
707
|
};
|
|
708
|
-
var
|
|
708
|
+
var sr = b.diffed;
|
|
709
709
|
b.diffed = function(t) {
|
|
710
|
-
|
|
710
|
+
sr && sr(t);
|
|
711
711
|
var e = t.props, n = t.__e;
|
|
712
|
-
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value),
|
|
712
|
+
n != null && t.type === "textarea" && "value" in e && e.value !== n.value && (n.value = e.value == null ? "" : e.value), jn = null;
|
|
713
713
|
};
|
|
714
|
-
var
|
|
715
|
-
return
|
|
716
|
-
}, useCallback:
|
|
717
|
-
function
|
|
714
|
+
var Ho = { ReactCurrentDispatcher: { current: { readContext: function(t) {
|
|
715
|
+
return jn.__n[t.__c].props.value;
|
|
716
|
+
}, useCallback: Re, useContext: $t, useDebugValue: oi, useDeferredValue: hi, useEffect: T, useId: si, useImperativeHandle: ii, useInsertionEffect: fi, useLayoutEffect: st, useMemo: K, useReducer: wn, useRef: ue, useState: C, useSyncExternalStore: ci, useTransition: di } } };
|
|
717
|
+
function Wo(t) {
|
|
718
718
|
return V.bind(null, t);
|
|
719
719
|
}
|
|
720
|
-
function
|
|
721
|
-
return !!t && t.$$typeof ===
|
|
720
|
+
function Et(t) {
|
|
721
|
+
return !!t && t.$$typeof === xi;
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
return
|
|
723
|
+
function Jo(t) {
|
|
724
|
+
return Et(t) && t.type === F;
|
|
725
725
|
}
|
|
726
|
-
function
|
|
726
|
+
function Go(t) {
|
|
727
727
|
return !!t && !!t.displayName && (typeof t.displayName == "string" || t.displayName instanceof String) && t.displayName.startsWith("Memo(");
|
|
728
728
|
}
|
|
729
|
-
function
|
|
730
|
-
return
|
|
729
|
+
function Ko(t) {
|
|
730
|
+
return Et(t) ? _o.apply(null, arguments) : t;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function Zo(t) {
|
|
733
733
|
return !!t.__k && (ge(null, t), !0);
|
|
734
734
|
}
|
|
735
|
-
function
|
|
735
|
+
function Yo(t) {
|
|
736
736
|
return t && (t.base || t.nodeType === 1 && t) || null;
|
|
737
737
|
}
|
|
738
|
-
var
|
|
738
|
+
var Xo = function(t, e) {
|
|
739
739
|
return t(e);
|
|
740
|
-
},
|
|
740
|
+
}, es = function(t, e) {
|
|
741
741
|
return t(e);
|
|
742
|
-
},
|
|
743
|
-
for (var we = 0,
|
|
744
|
-
ee[we] =
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
function
|
|
742
|
+
}, ts = F, ns = Et, Sn = { useState: C, useId: si, useReducer: wn, useEffect: T, useLayoutEffect: st, useInsertionEffect: fi, useTransition: di, useDeferredValue: hi, useSyncExternalStore: ci, startTransition: ui, useRef: ue, useImperativeHandle: ii, useMemo: K, useCallback: Re, useContext: $t, useDebugValue: oi, version: "18.3.1", Children: Ao, render: Bo, hydrate: Fo, unmountComponentAtNode: Zo, createPortal: Lo, createElement: V, createContext: wo, createFactory: Wo, cloneElement: Ko, createRef: mo, Fragment: F, isValidElement: Et, isElement: ns, isFragment: Jo, isMemo: Go, findDOMNode: Yo, Component: G, PureComponent: nn, memo: Co, forwardRef: Ro, flushSync: es, unstable_batchedUpdates: Xo, StrictMode: ts, Suspense: mt, SuspenseList: Qe, lazy: Eo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Ho }, ee = [], D = [], rs = Uint8Array, Bt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
743
|
+
for (var we = 0, is = Bt.length; we < is; ++we)
|
|
744
|
+
ee[we] = Bt[we], D[Bt.charCodeAt(we)] = we;
|
|
745
|
+
D[45] = 62;
|
|
746
|
+
D[95] = 63;
|
|
747
|
+
function os(t) {
|
|
748
748
|
var e = t.length;
|
|
749
749
|
if (e % 4 > 0)
|
|
750
750
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -753,27 +753,27 @@ function es(t) {
|
|
|
753
753
|
var r = n === e ? 0 : 4 - n % 4;
|
|
754
754
|
return [n, r];
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function ss(t, e, n) {
|
|
757
757
|
return (e + n) * 3 / 4 - n;
|
|
758
758
|
}
|
|
759
759
|
function Ye(t) {
|
|
760
|
-
var e, n =
|
|
760
|
+
var e, n = os(t), r = n[0], i = n[1], o = new rs(ss(t, r, i)), s = 0, l = i > 0 ? r - 4 : r, a;
|
|
761
761
|
for (a = 0; a < l; a += 4)
|
|
762
|
-
e =
|
|
763
|
-
return i === 2 && (e =
|
|
762
|
+
e = D[t.charCodeAt(a)] << 18 | D[t.charCodeAt(a + 1)] << 12 | D[t.charCodeAt(a + 2)] << 6 | D[t.charCodeAt(a + 3)], o[s++] = e >> 16 & 255, o[s++] = e >> 8 & 255, o[s++] = e & 255;
|
|
763
|
+
return i === 2 && (e = D[t.charCodeAt(a)] << 2 | D[t.charCodeAt(a + 1)] >> 4, o[s++] = e & 255), i === 1 && (e = D[t.charCodeAt(a)] << 10 | D[t.charCodeAt(a + 1)] << 4 | D[t.charCodeAt(a + 2)] >> 2, o[s++] = e >> 8 & 255, o[s++] = e & 255), o;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function as(t) {
|
|
766
766
|
return ee[t >> 18 & 63] + ee[t >> 12 & 63] + ee[t >> 6 & 63] + ee[t & 63];
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function ls(t, e, n) {
|
|
769
769
|
for (var r, i = [], o = e; o < n; o += 3)
|
|
770
|
-
r = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (t[o + 2] & 255), i.push(
|
|
770
|
+
r = (t[o] << 16 & 16711680) + (t[o + 1] << 8 & 65280) + (t[o + 2] & 255), i.push(as(r));
|
|
771
771
|
return i.join("");
|
|
772
772
|
}
|
|
773
773
|
function Xe(t) {
|
|
774
774
|
for (var e, n = t.length, r = n % 3, i = [], o = 16383, s = 0, l = n - r; s < l; s += o)
|
|
775
775
|
i.push(
|
|
776
|
-
|
|
776
|
+
ls(
|
|
777
777
|
t,
|
|
778
778
|
s,
|
|
779
779
|
s + o > l ? l : s + o
|
|
@@ -786,13 +786,13 @@ function Xe(t) {
|
|
|
786
786
|
function oe(t) {
|
|
787
787
|
if (t === void 0)
|
|
788
788
|
return {};
|
|
789
|
-
if (!
|
|
789
|
+
if (!bi(t))
|
|
790
790
|
throw new Error(
|
|
791
791
|
`The arguments to a Convex function must be an object. Received: ${t}`
|
|
792
792
|
);
|
|
793
793
|
return t;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
795
|
+
function cs(t) {
|
|
796
796
|
if (typeof t > "u")
|
|
797
797
|
throw new Error(
|
|
798
798
|
"Client created with undefined deployment address. If you used an environment variable, check that it's set."
|
|
@@ -817,46 +817,46 @@ function is(t) {
|
|
|
817
817
|
`Invalid deployment address: "${t}" ends with .convex.site, which is used for HTTP Actions. Convex deployment URLs typically end with .convex.cloud? If you believe this URL is correct, use the \`skipConvexDeploymentUrlCheck\` option to bypass this.`
|
|
818
818
|
);
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function bi(t) {
|
|
821
821
|
const e = typeof t == "object", n = Object.getPrototypeOf(t), r = n === null || n === Object.prototype || // Objects generated from other contexts (e.g. across Node.js `vm` modules) will not satisfy the previous
|
|
822
822
|
// conditions but are still simple objects.
|
|
823
823
|
n?.constructor?.name === "Object";
|
|
824
824
|
return e && r;
|
|
825
825
|
}
|
|
826
|
-
const
|
|
827
|
-
function
|
|
826
|
+
const yi = !0, Ee = BigInt("-9223372036854775808"), Cn = BigInt("9223372036854775807"), rn = BigInt("0"), us = BigInt("8"), hs = BigInt("256");
|
|
827
|
+
function vi(t) {
|
|
828
828
|
return Number.isNaN(t) || !Number.isFinite(t) || Object.is(t, -0);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
831
|
-
t <
|
|
830
|
+
function ds(t) {
|
|
831
|
+
t < rn && (t -= Ee + Ee);
|
|
832
832
|
let e = t.toString(16);
|
|
833
833
|
e.length % 2 === 1 && (e = "0" + e);
|
|
834
834
|
const n = new Uint8Array(new ArrayBuffer(8));
|
|
835
835
|
let r = 0;
|
|
836
836
|
for (const i of e.match(/.{2}/g).reverse())
|
|
837
|
-
n.set([parseInt(i, 16)], r++), t >>=
|
|
837
|
+
n.set([parseInt(i, 16)], r++), t >>= us;
|
|
838
838
|
return Xe(n);
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function fs(t) {
|
|
841
841
|
const e = Ye(t);
|
|
842
842
|
if (e.byteLength !== 8)
|
|
843
843
|
throw new Error(
|
|
844
844
|
`Received ${e.byteLength} bytes, expected 8 for $integer`
|
|
845
845
|
);
|
|
846
|
-
let n =
|
|
846
|
+
let n = rn, r = rn;
|
|
847
847
|
for (const i of e)
|
|
848
|
-
n += BigInt(i) *
|
|
849
|
-
return n >
|
|
848
|
+
n += BigInt(i) * hs ** r, r++;
|
|
849
|
+
return n > Cn && (n += Ee + Ee), n;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
if (t <
|
|
851
|
+
function ps(t) {
|
|
852
|
+
if (t < Ee || Cn < t)
|
|
853
853
|
throw new Error(
|
|
854
854
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
855
855
|
);
|
|
856
856
|
const e = new ArrayBuffer(8);
|
|
857
857
|
return new DataView(e).setBigInt64(0, t, !0), Xe(new Uint8Array(e));
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function gs(t) {
|
|
860
860
|
const e = Ye(t);
|
|
861
861
|
if (e.byteLength !== 8)
|
|
862
862
|
throw new Error(
|
|
@@ -864,11 +864,11 @@ function us(t) {
|
|
|
864
864
|
);
|
|
865
865
|
return new DataView(e.buffer).getBigInt64(0, !0);
|
|
866
866
|
}
|
|
867
|
-
const
|
|
868
|
-
function
|
|
869
|
-
if (t.length >
|
|
867
|
+
const ms = DataView.prototype.setBigInt64 ? ps : ds, xs = DataView.prototype.getBigInt64 ? gs : fs, ar = 1024;
|
|
868
|
+
function _i(t) {
|
|
869
|
+
if (t.length > ar)
|
|
870
870
|
throw new Error(
|
|
871
|
-
`Field name ${t} exceeds maximum field name length ${
|
|
871
|
+
`Field name ${t} exceeds maximum field name length ${ar}.`
|
|
872
872
|
);
|
|
873
873
|
if (t.startsWith("$"))
|
|
874
874
|
throw new Error(`Field name ${t} starts with a '$', which is reserved.`);
|
|
@@ -880,11 +880,11 @@ function mi(t) {
|
|
|
880
880
|
);
|
|
881
881
|
}
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function Ie(t) {
|
|
884
884
|
if (t === null || typeof t == "boolean" || typeof t == "number" || typeof t == "string")
|
|
885
885
|
return t;
|
|
886
886
|
if (Array.isArray(t))
|
|
887
|
-
return t.map((r) =>
|
|
887
|
+
return t.map((r) => Ie(r));
|
|
888
888
|
if (typeof t != "object")
|
|
889
889
|
throw new Error(`Unexpected type of ${t}`);
|
|
890
890
|
const e = Object.entries(t);
|
|
@@ -898,7 +898,7 @@ function Ee(t) {
|
|
|
898
898
|
if (r === "$integer") {
|
|
899
899
|
if (typeof t.$integer != "string")
|
|
900
900
|
throw new Error(`Malformed $integer field on ${t}`);
|
|
901
|
-
return
|
|
901
|
+
return xs(t.$integer);
|
|
902
902
|
}
|
|
903
903
|
if (r === "$float") {
|
|
904
904
|
if (typeof t.$float != "string")
|
|
@@ -908,8 +908,8 @@ function Ee(t) {
|
|
|
908
908
|
throw new Error(
|
|
909
909
|
`Received ${i.byteLength} bytes, expected 8 for $float`
|
|
910
910
|
);
|
|
911
|
-
const s = new DataView(i.buffer).getFloat64(0,
|
|
912
|
-
if (!
|
|
911
|
+
const s = new DataView(i.buffer).getFloat64(0, yi);
|
|
912
|
+
if (!vi(s))
|
|
913
913
|
throw new Error(`Float ${s} should be encoded as a number`);
|
|
914
914
|
return s;
|
|
915
915
|
}
|
|
@@ -924,21 +924,21 @@ function Ee(t) {
|
|
|
924
924
|
}
|
|
925
925
|
const n = {};
|
|
926
926
|
for (const [r, i] of Object.entries(t))
|
|
927
|
-
|
|
927
|
+
_i(r), n[r] = Ie(i);
|
|
928
928
|
return n;
|
|
929
929
|
}
|
|
930
|
-
const
|
|
930
|
+
const lr = 16384;
|
|
931
931
|
function We(t) {
|
|
932
932
|
const e = JSON.stringify(t, (n, r) => r === void 0 ? "undefined" : typeof r == "bigint" ? `${r.toString()}n` : r);
|
|
933
|
-
if (e.length >
|
|
933
|
+
if (e.length > lr) {
|
|
934
934
|
const n = "[...truncated]";
|
|
935
|
-
let r =
|
|
935
|
+
let r = lr - n.length;
|
|
936
936
|
const i = e.codePointAt(r - 1);
|
|
937
937
|
return i !== void 0 && i > 65535 && (r -= 1), e.substring(0, r) + n;
|
|
938
938
|
}
|
|
939
939
|
return e;
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function on(t, e, n, r) {
|
|
942
942
|
if (t === void 0) {
|
|
943
943
|
const s = n && ` (present at path ${n} in original object ${We(
|
|
944
944
|
e
|
|
@@ -950,16 +950,16 @@ function rn(t, e, n, r) {
|
|
|
950
950
|
if (t === null)
|
|
951
951
|
return t;
|
|
952
952
|
if (typeof t == "bigint") {
|
|
953
|
-
if (t <
|
|
953
|
+
if (t < Ee || Cn < t)
|
|
954
954
|
throw new Error(
|
|
955
955
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
956
956
|
);
|
|
957
|
-
return { $integer:
|
|
957
|
+
return { $integer: ms(t) };
|
|
958
958
|
}
|
|
959
959
|
if (typeof t == "number")
|
|
960
|
-
if (
|
|
960
|
+
if (vi(t)) {
|
|
961
961
|
const s = new ArrayBuffer(8);
|
|
962
|
-
return new DataView(s).setFloat64(0, t,
|
|
962
|
+
return new DataView(s).setFloat64(0, t, yi), { $float: Xe(new Uint8Array(s)) };
|
|
963
963
|
} else
|
|
964
964
|
return t;
|
|
965
965
|
if (typeof t == "boolean" || typeof t == "string")
|
|
@@ -968,29 +968,29 @@ function rn(t, e, n, r) {
|
|
|
968
968
|
return { $bytes: Xe(new Uint8Array(t)) };
|
|
969
969
|
if (Array.isArray(t))
|
|
970
970
|
return t.map(
|
|
971
|
-
(s, l) =>
|
|
971
|
+
(s, l) => on(s, e, n + `[${l}]`)
|
|
972
972
|
);
|
|
973
973
|
if (t instanceof Set)
|
|
974
974
|
throw new Error(
|
|
975
|
-
|
|
975
|
+
Ft(n, "Set", [...t], e)
|
|
976
976
|
);
|
|
977
977
|
if (t instanceof Map)
|
|
978
978
|
throw new Error(
|
|
979
|
-
|
|
979
|
+
Ft(n, "Map", [...t], e)
|
|
980
980
|
);
|
|
981
|
-
if (!
|
|
981
|
+
if (!bi(t)) {
|
|
982
982
|
const s = t?.constructor?.name, l = s ? `${s} ` : "";
|
|
983
983
|
throw new Error(
|
|
984
|
-
|
|
984
|
+
Ft(n, l, t, e)
|
|
985
985
|
);
|
|
986
986
|
}
|
|
987
987
|
const i = {}, o = Object.entries(t);
|
|
988
988
|
o.sort(([s, l], [a, u]) => s === a ? 0 : s < a ? -1 : 1);
|
|
989
989
|
for (const [s, l] of o)
|
|
990
|
-
l !== void 0 && (
|
|
990
|
+
l !== void 0 && (_i(s), i[s] = on(l, e, n + `.${s}`));
|
|
991
991
|
return i;
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function Ft(t, e, n, r) {
|
|
994
994
|
return t ? `${e}${We(
|
|
995
995
|
n
|
|
996
996
|
)} is not a supported Convex type (present at path ${t} in original object ${We(
|
|
@@ -1000,22 +1000,22 @@ function Bt(t, e, n, r) {
|
|
|
1000
1000
|
)} is not a supported Convex type.`;
|
|
1001
1001
|
}
|
|
1002
1002
|
function re(t) {
|
|
1003
|
-
return
|
|
1003
|
+
return on(t, t, "");
|
|
1004
1004
|
}
|
|
1005
|
-
var
|
|
1006
|
-
const
|
|
1007
|
-
class yt extends (
|
|
1005
|
+
var bs = Object.defineProperty, ys = (t, e, n) => e in t ? bs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ut = (t, e, n) => ys(t, typeof e != "symbol" ? e + "" : e, n), cr, ur;
|
|
1006
|
+
const vs = /* @__PURE__ */ Symbol.for("ConvexError");
|
|
1007
|
+
class yt extends (ur = Error, cr = vs, ur) {
|
|
1008
1008
|
constructor(e) {
|
|
1009
|
-
super(typeof e == "string" ? e : We(e)),
|
|
1009
|
+
super(typeof e == "string" ? e : We(e)), Ut(this, "name", "ConvexError"), Ut(this, "data"), Ut(this, cr, !0), this.data = e;
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
const
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
const
|
|
1016
|
-
var
|
|
1017
|
-
const
|
|
1018
|
-
function
|
|
1012
|
+
const wi = () => Array.from({ length: 4 }, () => 0);
|
|
1013
|
+
wi();
|
|
1014
|
+
wi();
|
|
1015
|
+
const hr = "1.39.1";
|
|
1016
|
+
var _s = Object.defineProperty, ws = (t, e, n) => e in t ? _s(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, dr = (t, e, n) => ws(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1017
|
+
const ks = "color:rgb(0, 145, 255)";
|
|
1018
|
+
function ki(t) {
|
|
1019
1019
|
switch (t) {
|
|
1020
1020
|
case "query":
|
|
1021
1021
|
return "Q";
|
|
@@ -1027,9 +1027,9 @@ function bi(t) {
|
|
|
1027
1027
|
return "?";
|
|
1028
1028
|
}
|
|
1029
1029
|
}
|
|
1030
|
-
class
|
|
1030
|
+
class ji {
|
|
1031
1031
|
constructor(e) {
|
|
1032
|
-
|
|
1032
|
+
dr(this, "_onLogLineFuncs"), dr(this, "_verbose"), this._onLogLineFuncs = {}, this._verbose = e.verbose;
|
|
1033
1033
|
}
|
|
1034
1034
|
addLogLineListener(e) {
|
|
1035
1035
|
let n = Math.random().toString(36).substring(2, 15);
|
|
@@ -1057,8 +1057,8 @@ class yi {
|
|
|
1057
1057
|
n("error", ...e);
|
|
1058
1058
|
}
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
const e = new
|
|
1060
|
+
function Si(t) {
|
|
1061
|
+
const e = new ji(t);
|
|
1062
1062
|
return e.addLogLineListener((n, ...r) => {
|
|
1063
1063
|
switch (n) {
|
|
1064
1064
|
case "debug":
|
|
@@ -1078,11 +1078,11 @@ function vi(t) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
}), e;
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1082
|
-
return new
|
|
1081
|
+
function Ci(t) {
|
|
1082
|
+
return new ji(t);
|
|
1083
1083
|
}
|
|
1084
1084
|
function vt(t, e, n, r, i) {
|
|
1085
|
-
const o =
|
|
1085
|
+
const o = ki(n);
|
|
1086
1086
|
if (typeof i == "object" && (i = `ConvexError ${JSON.stringify(i.errorData, null, 2)}`), e === "info") {
|
|
1087
1087
|
const s = i.match(/^\[.*?\] /);
|
|
1088
1088
|
if (s === null) {
|
|
@@ -1092,19 +1092,19 @@ function vt(t, e, n, r, i) {
|
|
|
1092
1092
|
return;
|
|
1093
1093
|
}
|
|
1094
1094
|
const l = i.slice(1, s[0].length - 2), a = i.slice(s[0].length);
|
|
1095
|
-
t.log(`%c[CONVEX ${o}(${r})] [${l}]`,
|
|
1095
|
+
t.log(`%c[CONVEX ${o}(${r})] [${l}]`, ks, a);
|
|
1096
1096
|
} else
|
|
1097
1097
|
t.error(`[CONVEX ${o}(${r})] ${i}`);
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function js(t, e) {
|
|
1100
1100
|
const n = `[CONVEX FATAL ERROR] ${e}`;
|
|
1101
1101
|
return t.error(n), new Error(n);
|
|
1102
1102
|
}
|
|
1103
1103
|
function Ce(t, e, n) {
|
|
1104
|
-
return `[CONVEX ${
|
|
1104
|
+
return `[CONVEX ${ki(t)}(${e})] ${n.errorMessage}
|
|
1105
1105
|
Called by client`;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function sn(t, e) {
|
|
1108
1108
|
return e.data = t.errorData, e;
|
|
1109
1109
|
}
|
|
1110
1110
|
function me(t) {
|
|
@@ -1118,7 +1118,7 @@ function fe(t, e) {
|
|
|
1118
1118
|
args: re(e)
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function fr(t, e, n) {
|
|
1122
1122
|
const { initialNumItems: r, id: i } = n;
|
|
1123
1123
|
return JSON.stringify({
|
|
1124
1124
|
type: "paginated",
|
|
@@ -1127,8 +1127,8 @@ function ur(t, e, n) {
|
|
|
1127
1127
|
options: re({ initialNumItems: r, id: i })
|
|
1128
1128
|
});
|
|
1129
1129
|
}
|
|
1130
|
-
var
|
|
1131
|
-
class
|
|
1130
|
+
var Ss = Object.defineProperty, Cs = (t, e, n) => e in t ? Ss(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Y = (t, e, n) => Cs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1131
|
+
class Ts {
|
|
1132
1132
|
constructor() {
|
|
1133
1133
|
Y(this, "nextQueryId"), Y(this, "querySetVersion"), Y(this, "querySet"), Y(this, "queryIdToToken"), Y(this, "identityVersion"), Y(this, "auth"), Y(this, "outstandingQueriesOlderThanRestart"), Y(this, "outstandingAuthOlderThanRestart"), Y(this, "paused"), Y(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
|
|
1134
1134
|
}
|
|
@@ -1333,8 +1333,8 @@ class ws {
|
|
|
1333
1333
|
}
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
|
-
var
|
|
1337
|
-
class
|
|
1336
|
+
var Rs = Object.defineProperty, As = (t, e, n) => e in t ? Rs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ht = (t, e, n) => As(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1337
|
+
class $s {
|
|
1338
1338
|
constructor(e, n) {
|
|
1339
1339
|
this.logger = e, this.markConnectionStateDirty = n, ht(this, "inflightRequests"), ht(this, "requestsOlderThanRestart"), ht(this, "inflightMutationsCount", 0), ht(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
|
|
1340
1340
|
}
|
|
@@ -1367,14 +1367,14 @@ class Ss {
|
|
|
1367
1367
|
s = {
|
|
1368
1368
|
success: !0,
|
|
1369
1369
|
logLines: e.logLines,
|
|
1370
|
-
value:
|
|
1370
|
+
value: Ie(e.result)
|
|
1371
1371
|
}, l = () => o.onResult(s);
|
|
1372
1372
|
else {
|
|
1373
1373
|
const a = e.result, { errorData: u } = e;
|
|
1374
1374
|
vt(this.logger, "error", r, i, a), s = {
|
|
1375
1375
|
success: !1,
|
|
1376
1376
|
errorMessage: a,
|
|
1377
|
-
errorData: u !== void 0 ?
|
|
1377
|
+
errorData: u !== void 0 ? Ie(u) : void 0,
|
|
1378
1378
|
logLines: e.logLines
|
|
1379
1379
|
}, l = () => o.onResult(s);
|
|
1380
1380
|
}
|
|
@@ -1470,21 +1470,21 @@ class Ss {
|
|
|
1470
1470
|
return this.inflightActionsCount;
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
|
-
const et = /* @__PURE__ */ Symbol.for("functionName"),
|
|
1474
|
-
function
|
|
1475
|
-
return t[
|
|
1473
|
+
const et = /* @__PURE__ */ Symbol.for("functionName"), Es = /* @__PURE__ */ Symbol.for("toReferencePath");
|
|
1474
|
+
function Is(t) {
|
|
1475
|
+
return t[Es] ?? null;
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function Ps(t) {
|
|
1478
1478
|
return t.startsWith("function://");
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function Ls(t) {
|
|
1481
1481
|
let e;
|
|
1482
1482
|
if (typeof t == "string")
|
|
1483
|
-
|
|
1483
|
+
Ps(t) ? e = { functionHandle: t } : e = { name: t };
|
|
1484
1484
|
else if (t[et])
|
|
1485
1485
|
e = { name: t[et] };
|
|
1486
1486
|
else {
|
|
1487
|
-
const n =
|
|
1487
|
+
const n = Is(t);
|
|
1488
1488
|
if (!n)
|
|
1489
1489
|
throw new Error(`${t} is not a functionReference`);
|
|
1490
1490
|
e = { reference: n };
|
|
@@ -1492,7 +1492,7 @@ function Rs(t) {
|
|
|
1492
1492
|
return e;
|
|
1493
1493
|
}
|
|
1494
1494
|
function O(t) {
|
|
1495
|
-
const e =
|
|
1495
|
+
const e = Ls(t);
|
|
1496
1496
|
if (e.name === void 0)
|
|
1497
1497
|
throw e.functionHandle !== void 0 ? new Error(
|
|
1498
1498
|
`Expected function reference like "api.file.func" or "internal.file.func", but received function handle ${e.functionHandle}`
|
|
@@ -1507,15 +1507,15 @@ function O(t) {
|
|
|
1507
1507
|
throw new Error(`${t} is not a functionReference`);
|
|
1508
1508
|
return n;
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function Ti(t) {
|
|
1511
1511
|
return { [et]: t };
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function Ri(t = []) {
|
|
1514
1514
|
const e = {
|
|
1515
1515
|
get(n, r) {
|
|
1516
1516
|
if (typeof r == "string") {
|
|
1517
1517
|
const i = [...t, r];
|
|
1518
|
-
return
|
|
1518
|
+
return Ri(i);
|
|
1519
1519
|
} else if (r === et) {
|
|
1520
1520
|
if (t.length < 2) {
|
|
1521
1521
|
const s = ["api", ...t].join(".");
|
|
@@ -1530,8 +1530,8 @@ function ji(t = []) {
|
|
|
1530
1530
|
};
|
|
1531
1531
|
return new Proxy({}, e);
|
|
1532
1532
|
}
|
|
1533
|
-
|
|
1534
|
-
var
|
|
1533
|
+
Ri();
|
|
1534
|
+
var Ms = Object.defineProperty, qs = (t, e, n) => e in t ? Ms(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e, n) => qs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1535
1535
|
class tt {
|
|
1536
1536
|
constructor(e) {
|
|
1537
1537
|
_t(this, "queryResults"), _t(this, "modifiedQueries"), this.queryResults = e, this.modifiedQueries = [];
|
|
@@ -1573,7 +1573,7 @@ class tt {
|
|
|
1573
1573
|
return e.success ? e.value : void 0;
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
|
-
class
|
|
1576
|
+
class Os {
|
|
1577
1577
|
constructor() {
|
|
1578
1578
|
_t(this, "queryResults"), _t(this, "optimisticUpdates"), this.queryResults = /* @__PURE__ */ new Map(), this.optimisticUpdates = [];
|
|
1579
1579
|
}
|
|
@@ -1621,7 +1621,7 @@ class Is {
|
|
|
1621
1621
|
if (r !== void 0) {
|
|
1622
1622
|
if (r.success)
|
|
1623
1623
|
return r.value;
|
|
1624
|
-
throw r.errorData !== void 0 ?
|
|
1624
|
+
throw r.errorData !== void 0 ? sn(
|
|
1625
1625
|
r,
|
|
1626
1626
|
new yt(
|
|
1627
1627
|
Ce("query", n.udfPath, r)
|
|
@@ -1641,8 +1641,8 @@ class Is {
|
|
|
1641
1641
|
return this.queryResults.get(e)?.result?.logLines;
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
|
-
var
|
|
1645
|
-
class
|
|
1644
|
+
var Ns = Object.defineProperty, zs = (t, e, n) => e in t ? Ns(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Qt = (t, e, n) => zs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1645
|
+
class q {
|
|
1646
1646
|
constructor(e, n) {
|
|
1647
1647
|
Qt(this, "low"), Qt(this, "high"), Qt(this, "__isUnsignedLong__"), this.low = e | 0, this.high = n | 0, this.__isUnsignedLong__ = !0;
|
|
1648
1648
|
}
|
|
@@ -1651,7 +1651,7 @@ class L {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
// prettier-ignore
|
|
1653
1653
|
static fromBytesLE(e) {
|
|
1654
|
-
return new
|
|
1654
|
+
return new q(
|
|
1655
1655
|
e[0] | e[1] << 8 | e[2] << 16 | e[3] << 24,
|
|
1656
1656
|
e[4] | e[5] << 8 | e[6] << 16 | e[7] << 24
|
|
1657
1657
|
);
|
|
@@ -1671,19 +1671,19 @@ class L {
|
|
|
1671
1671
|
];
|
|
1672
1672
|
}
|
|
1673
1673
|
static fromNumber(e) {
|
|
1674
|
-
return isNaN(e) || e < 0 ?
|
|
1674
|
+
return isNaN(e) || e < 0 ? pr : e >= Bs ? Fs : new q(e % Je | 0, e / Je | 0);
|
|
1675
1675
|
}
|
|
1676
1676
|
toString() {
|
|
1677
1677
|
return (BigInt(this.high) * BigInt(Je) + BigInt(this.low)).toString();
|
|
1678
1678
|
}
|
|
1679
1679
|
equals(e) {
|
|
1680
|
-
return
|
|
1680
|
+
return q.isLong(e) || (e = q.fromValue(e)), this.high >>> 31 === 1 && e.high >>> 31 === 1 ? !1 : this.high === e.high && this.low === e.low;
|
|
1681
1681
|
}
|
|
1682
1682
|
notEquals(e) {
|
|
1683
1683
|
return !this.equals(e);
|
|
1684
1684
|
}
|
|
1685
1685
|
comp(e) {
|
|
1686
|
-
return
|
|
1686
|
+
return q.isLong(e) || (e = q.fromValue(e)), this.equals(e) ? 0 : e.high >>> 0 > this.high >>> 0 || e.high === this.high && e.low >>> 0 > this.low >>> 0 ? -1 : 1;
|
|
1687
1687
|
}
|
|
1688
1688
|
lessThanOrEqual(e) {
|
|
1689
1689
|
return this.comp(
|
|
@@ -1692,14 +1692,14 @@ class L {
|
|
|
1692
1692
|
) <= 0;
|
|
1693
1693
|
}
|
|
1694
1694
|
static fromValue(e) {
|
|
1695
|
-
return typeof e == "number" ?
|
|
1695
|
+
return typeof e == "number" ? q.fromNumber(e) : new q(e.low, e.high);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
|
-
const
|
|
1699
|
-
var
|
|
1700
|
-
class
|
|
1698
|
+
const pr = new q(0, 0), gr = 65536, Je = gr * gr, Bs = Je * Je, Fs = new q(-1, -1);
|
|
1699
|
+
var Us = Object.defineProperty, Qs = (t, e, n) => e in t ? Us(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, dt = (t, e, n) => Qs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1700
|
+
class mr {
|
|
1701
1701
|
constructor(e, n) {
|
|
1702
|
-
dt(this, "version"), dt(this, "remoteQuerySet"), dt(this, "queryPath"), dt(this, "logger"), this.version = { querySet: 0, ts:
|
|
1702
|
+
dt(this, "version"), dt(this, "remoteQuerySet"), dt(this, "queryPath"), dt(this, "logger"), this.version = { querySet: 0, ts: q.fromNumber(0), identity: 0 }, this.remoteQuerySet = /* @__PURE__ */ new Map(), this.queryPath = e, this.logger = n;
|
|
1703
1703
|
}
|
|
1704
1704
|
transition(e) {
|
|
1705
1705
|
const n = e.startVersion;
|
|
@@ -1714,7 +1714,7 @@ class fr {
|
|
|
1714
1714
|
if (i)
|
|
1715
1715
|
for (const s of r.logLines)
|
|
1716
1716
|
vt(this.logger, "info", "query", i, s);
|
|
1717
|
-
const o =
|
|
1717
|
+
const o = Ie(r.value ?? null);
|
|
1718
1718
|
this.remoteQuerySet.set(r.queryId, {
|
|
1719
1719
|
success: !0,
|
|
1720
1720
|
value: o,
|
|
@@ -1731,7 +1731,7 @@ class fr {
|
|
|
1731
1731
|
this.remoteQuerySet.set(r.queryId, {
|
|
1732
1732
|
success: !1,
|
|
1733
1733
|
errorMessage: r.errorMessage,
|
|
1734
|
-
errorData: o !== void 0 ?
|
|
1734
|
+
errorData: o !== void 0 ? Ie(o) : void 0,
|
|
1735
1735
|
logLines: r.logLines
|
|
1736
1736
|
});
|
|
1737
1737
|
break;
|
|
@@ -1754,13 +1754,13 @@ class fr {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
function Dt(t) {
|
|
1756
1756
|
const e = Ye(t);
|
|
1757
|
-
return
|
|
1757
|
+
return q.fromBytesLE(Array.from(e));
|
|
1758
1758
|
}
|
|
1759
|
-
function
|
|
1759
|
+
function Ds(t) {
|
|
1760
1760
|
const e = new Uint8Array(t.toBytesLE());
|
|
1761
1761
|
return Xe(e);
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function xr(t) {
|
|
1764
1764
|
switch (t.type) {
|
|
1765
1765
|
case "FatalError":
|
|
1766
1766
|
case "AuthError":
|
|
@@ -1784,7 +1784,7 @@ function pr(t) {
|
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
1786
|
}
|
|
1787
|
-
function
|
|
1787
|
+
function Vs(t) {
|
|
1788
1788
|
switch (t.type) {
|
|
1789
1789
|
case "Authenticate":
|
|
1790
1790
|
case "ModifyQuerySet":
|
|
@@ -1795,20 +1795,20 @@ function Bs(t) {
|
|
|
1795
1795
|
case "Connect":
|
|
1796
1796
|
return t.maxObservedTimestamp !== void 0 ? {
|
|
1797
1797
|
...t,
|
|
1798
|
-
maxObservedTimestamp:
|
|
1798
|
+
maxObservedTimestamp: Ds(t.maxObservedTimestamp)
|
|
1799
1799
|
} : { ...t, maxObservedTimestamp: void 0 };
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
var
|
|
1803
|
-
const
|
|
1802
|
+
var Hs = Object.defineProperty, Ws = (t, e, n) => e in t ? Hs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, $ = (t, e, n) => Ws(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1803
|
+
const Js = 1e3, Gs = 1001, Ks = 1005, Zs = 4040;
|
|
1804
1804
|
let xt;
|
|
1805
1805
|
function je() {
|
|
1806
1806
|
return xt === void 0 && (xt = Date.now()), typeof performance > "u" || !performance.now ? Date.now() : Math.round(xt + performance.now());
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function br() {
|
|
1809
1809
|
return `t=${Math.round((je() - xt) / 100) / 10}s`;
|
|
1810
1810
|
}
|
|
1811
|
-
const
|
|
1811
|
+
const Ai = {
|
|
1812
1812
|
// A known error, e.g. during a restart or push
|
|
1813
1813
|
InternalServerError: { timeout: 1e3 },
|
|
1814
1814
|
// ErrorMetadata::overloaded() messages that we realy should back off
|
|
@@ -1828,18 +1828,18 @@ const Si = {
|
|
|
1828
1828
|
SearchIndexTooLarge: { timeout: 3e3 },
|
|
1829
1829
|
TooManyWritesInTimePeriod: { timeout: 3e3 }
|
|
1830
1830
|
};
|
|
1831
|
-
function
|
|
1831
|
+
function Ys(t) {
|
|
1832
1832
|
if (t === void 0) return "Unknown";
|
|
1833
1833
|
for (const e of Object.keys(
|
|
1834
|
-
|
|
1834
|
+
Ai
|
|
1835
1835
|
))
|
|
1836
1836
|
if (t.startsWith(e))
|
|
1837
1837
|
return e;
|
|
1838
1838
|
return "Unknown";
|
|
1839
1839
|
}
|
|
1840
|
-
class
|
|
1840
|
+
class Xs {
|
|
1841
1841
|
constructor(e, n, r, i, o, s) {
|
|
1842
|
-
this.markConnectionStateDirty = o, this.debug = s,
|
|
1842
|
+
this.markConnectionStateDirty = o, this.debug = s, $(this, "socket"), $(this, "connectionCount"), $(this, "_hasEverConnected", !1), $(this, "lastCloseReason"), $(this, "transitionChunkBuffer", null), $(this, "defaultInitialBackoff"), $(this, "maxBackoff"), $(this, "retries"), $(this, "serverInactivityThreshold"), $(this, "reconnectDueToServerInactivityTimeout"), $(this, "scheduledReconnect", null), $(this, "networkOnlineHandler", null), $(this, "pendingNetworkRecoveryInfo", null), $(this, "uri"), $(this, "onOpen"), $(this, "onResume"), $(this, "onMessage"), $(this, "webSocketConstructor"), $(this, "logger"), $(this, "onServerDisconnectError"), this.webSocketConstructor = r, this.socket = { state: "disconnected" }, this.connectionCount = 0, this.lastCloseReason = "InitialConnect", this.defaultInitialBackoff = 1e3, this.maxBackoff = 16e3, this.retries = 0, this.serverInactivityThreshold = 6e4, this.reconnectDueToServerInactivityTimeout = null, this.uri = e, this.onOpen = n.onOpen, this.onResume = n.onResume, this.onMessage = n.onMessage, this.onServerDisconnectError = n.onServerDisconnectError, this.logger = i, this.setupNetworkListener(), this.connect();
|
|
1843
1843
|
}
|
|
1844
1844
|
setSocketState(e) {
|
|
1845
1845
|
this.socket = e, this._logVerbose(
|
|
@@ -1870,7 +1870,7 @@ class Js {
|
|
|
1870
1870
|
if (this.transitionChunkBuffer.chunks.push(e.chunk), this.transitionChunkBuffer.chunks.length === e.totalParts) {
|
|
1871
1871
|
const n = this.transitionChunkBuffer.chunks.join("");
|
|
1872
1872
|
this.transitionChunkBuffer = null;
|
|
1873
|
-
const r =
|
|
1873
|
+
const r = xr(JSON.parse(n));
|
|
1874
1874
|
if (r.type !== "Transition")
|
|
1875
1875
|
throw new Error(
|
|
1876
1876
|
`Expected Transition, got ${r.type} after assembling chunks`
|
|
@@ -1904,10 +1904,10 @@ class Js {
|
|
|
1904
1904
|
clientTs: je()
|
|
1905
1905
|
})), this.lastCloseReason !== "InitialConnect" && (this.lastCloseReason ? this.logger.log(
|
|
1906
1906
|
"WebSocket reconnected at",
|
|
1907
|
-
|
|
1907
|
+
br(),
|
|
1908
1908
|
"after disconnect due to",
|
|
1909
1909
|
this.lastCloseReason
|
|
1910
|
-
) : this.logger.log("WebSocket reconnected at",
|
|
1910
|
+
) : this.logger.log("WebSocket reconnected at", br())), this.connectionCount += 1, this.lastCloseReason = null, this.pendingNetworkRecoveryInfo !== null) {
|
|
1911
1911
|
const { timeSavedMs: n } = this.pendingNetworkRecoveryInfo;
|
|
1912
1912
|
this.pendingNetworkRecoveryInfo = null, this.sendMessage({
|
|
1913
1913
|
type: "Event",
|
|
@@ -1924,7 +1924,7 @@ class Js {
|
|
|
1924
1924
|
}, e.onmessage = (n) => {
|
|
1925
1925
|
this.resetServerInactivityTimeout();
|
|
1926
1926
|
const r = n.data.length;
|
|
1927
|
-
let i =
|
|
1927
|
+
let i = xr(JSON.parse(n.data));
|
|
1928
1928
|
if (this._logVerbose(`received ws message with type ${i.type}`), i.type === "Ping")
|
|
1929
1929
|
return;
|
|
1930
1930
|
if (i.type === "TransitionChunk") {
|
|
@@ -1942,12 +1942,12 @@ class Js {
|
|
|
1942
1942
|
transition: i
|
|
1943
1943
|
}), this.onMessage(i).hasSyncedPastLastReconnect && (this.retries = 0, this.markConnectionStateDirty());
|
|
1944
1944
|
}, e.onclose = (n) => {
|
|
1945
|
-
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !==
|
|
1946
|
-
n.code !==
|
|
1945
|
+
if (this._logVerbose("begin ws.onclose"), this.transitionChunkBuffer = null, this.lastCloseReason === null && (this.lastCloseReason = n.reason || `closed with code ${n.code}`), n.code !== Js && n.code !== Gs && // This commonly gets fired on mobile apps when the app is backgrounded
|
|
1946
|
+
n.code !== Ks && n.code !== Zs) {
|
|
1947
1947
|
let i = `WebSocket closed with code ${n.code}`;
|
|
1948
1948
|
n.reason && (i += `: ${n.reason}`), this.logger.log(i), this.onServerDisconnectError && n.reason && this.onServerDisconnectError(i);
|
|
1949
1949
|
}
|
|
1950
|
-
const r =
|
|
1950
|
+
const r = Ys(n.reason);
|
|
1951
1951
|
this.scheduleReconnect(r);
|
|
1952
1952
|
};
|
|
1953
1953
|
}
|
|
@@ -1969,7 +1969,7 @@ class Js {
|
|
|
1969
1969
|
} : {}
|
|
1970
1970
|
};
|
|
1971
1971
|
if (this.socket.state === "ready" && this.socket.paused === "no") {
|
|
1972
|
-
const r =
|
|
1972
|
+
const r = Vs(e), i = JSON.stringify(r);
|
|
1973
1973
|
let o = !1;
|
|
1974
1974
|
try {
|
|
1975
1975
|
this.socket.ws.send(i), o = !0;
|
|
@@ -2199,7 +2199,7 @@ class Js {
|
|
|
2199
2199
|
this.logger.logVerbose(e);
|
|
2200
2200
|
}
|
|
2201
2201
|
nextBackoff(e) {
|
|
2202
|
-
const r = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff :
|
|
2202
|
+
const r = (e === "client" ? 100 : e === "Unknown" ? this.defaultInitialBackoff : Ai[e].timeout) * Math.pow(2, this.retries);
|
|
2203
2203
|
this.retries += 1;
|
|
2204
2204
|
const i = Math.min(r, this.maxBackoff), o = i * (Math.random() - 0.5);
|
|
2205
2205
|
return i + o;
|
|
@@ -2228,10 +2228,10 @@ class Js {
|
|
|
2228
2228
|
});
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2232
|
-
return
|
|
2231
|
+
function ea() {
|
|
2232
|
+
return ta();
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2234
|
+
function ta() {
|
|
2235
2235
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
2236
2236
|
const e = Math.random() * 16 | 0;
|
|
2237
2237
|
return (t === "x" ? e : e & 3 | 8).toString(16);
|
|
@@ -2240,7 +2240,7 @@ function Gs() {
|
|
|
2240
2240
|
class De extends Error {
|
|
2241
2241
|
}
|
|
2242
2242
|
De.prototype.name = "InvalidTokenError";
|
|
2243
|
-
function
|
|
2243
|
+
function na(t) {
|
|
2244
2244
|
return decodeURIComponent(
|
|
2245
2245
|
atob(t).replace(/(.)/g, (e, n) => {
|
|
2246
2246
|
let r = n.charCodeAt(0).toString(16).toUpperCase();
|
|
@@ -2248,7 +2248,7 @@ function Zs(t) {
|
|
|
2248
2248
|
})
|
|
2249
2249
|
);
|
|
2250
2250
|
}
|
|
2251
|
-
function
|
|
2251
|
+
function ra(t) {
|
|
2252
2252
|
let e = t.replace(/-/g, "+").replace(/_/g, "/");
|
|
2253
2253
|
switch (e.length % 4) {
|
|
2254
2254
|
case 0:
|
|
@@ -2263,12 +2263,12 @@ function Ys(t) {
|
|
|
2263
2263
|
throw new Error("base64 string is not of the correct length");
|
|
2264
2264
|
}
|
|
2265
2265
|
try {
|
|
2266
|
-
return
|
|
2266
|
+
return na(e);
|
|
2267
2267
|
} catch {
|
|
2268
2268
|
return atob(e);
|
|
2269
2269
|
}
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2271
|
+
function $i(t, e) {
|
|
2272
2272
|
if (typeof t != "string")
|
|
2273
2273
|
throw new De("Invalid token specified: must be a string");
|
|
2274
2274
|
e || (e = {});
|
|
@@ -2279,7 +2279,7 @@ function Ci(t, e) {
|
|
|
2279
2279
|
);
|
|
2280
2280
|
let i;
|
|
2281
2281
|
try {
|
|
2282
|
-
i =
|
|
2282
|
+
i = ra(r);
|
|
2283
2283
|
} catch (o) {
|
|
2284
2284
|
throw new De(
|
|
2285
2285
|
`Invalid token specified: invalid base64 for part #${n + 1} (${o.message})`
|
|
@@ -2293,11 +2293,11 @@ function Ci(t, e) {
|
|
|
2293
2293
|
);
|
|
2294
2294
|
}
|
|
2295
2295
|
}
|
|
2296
|
-
var
|
|
2297
|
-
const
|
|
2298
|
-
class
|
|
2296
|
+
var ia = Object.defineProperty, oa = (t, e, n) => e in t ? ia(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Q = (t, e, n) => oa(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2297
|
+
const sa = 480 * 60 * 60 * 1e3, yr = 2;
|
|
2298
|
+
class aa {
|
|
2299
2299
|
constructor(e, n, r) {
|
|
2300
|
-
|
|
2300
|
+
Q(this, "authState", { state: "noAuth" }), Q(this, "configVersion", 0), Q(this, "syncState"), Q(this, "authenticate"), Q(this, "stopSocket"), Q(this, "tryRestartSocket"), Q(this, "pauseSocket"), Q(this, "resumeSocket"), Q(this, "clearAuth"), Q(this, "logger"), Q(this, "refreshTokenLeewaySeconds"), Q(this, "tokenConfirmationAttempts", 0), this.syncState = e, this.authenticate = n.authenticate, this.stopSocket = n.stopSocket, this.tryRestartSocket = n.tryRestartSocket, this.pauseSocket = n.pauseSocket, this.resumeSocket = n.resumeSocket, this.clearAuth = n.clearAuth, this.logger = r.logger, this.refreshTokenLeewaySeconds = r.refreshTokenLeewaySeconds;
|
|
2301
2301
|
}
|
|
2302
2302
|
async setConfig(e, n) {
|
|
2303
2303
|
this.resetAuthState(), this._logVerbose("pausing WS for auth token fetch"), this.pauseSocket();
|
|
@@ -2346,14 +2346,14 @@ class na {
|
|
|
2346
2346
|
if (this._logVerbose(`attempting to reauthenticate: ${e.error}`), // No way to fetch another token, kaboom
|
|
2347
2347
|
this.authState.state === "noAuth" || // We failed on a fresh token. After a small number of retries, we give up
|
|
2348
2348
|
// and clear the auth state to avoid infinite retries.
|
|
2349
|
-
this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >=
|
|
2349
|
+
this.authState.state === "waitingForServerConfirmationOfFreshToken" && this.tokenConfirmationAttempts >= yr) {
|
|
2350
2350
|
this.logger.error(
|
|
2351
2351
|
`Failed to authenticate: "${e.error}", check your server auth config`
|
|
2352
2352
|
), this.syncState.hasAuth() && this.syncState.clearAuth(), this.authState.state !== "noAuth" && this.setAndReportAuthFailed(this.authState.config.onAuthChange);
|
|
2353
2353
|
return;
|
|
2354
2354
|
}
|
|
2355
2355
|
this.authState.state === "waitingForServerConfirmationOfFreshToken" && (this.tokenConfirmationAttempts++, this._logVerbose(
|
|
2356
|
-
`retrying reauthentication, ${
|
|
2356
|
+
`retrying reauthentication, ${yr - this.tokenConfirmationAttempts} attempts remaining`
|
|
2357
2357
|
)), await this.stopSocket();
|
|
2358
2358
|
const n = await this.fetchTokenAndGuardAgainstRace(
|
|
2359
2359
|
this.authState.config.fetchToken,
|
|
@@ -2418,7 +2418,7 @@ class na {
|
|
|
2418
2418
|
return;
|
|
2419
2419
|
}
|
|
2420
2420
|
let s = Math.min(
|
|
2421
|
-
|
|
2421
|
+
sa,
|
|
2422
2422
|
(o - this.refreshTokenLeewaySeconds) * 1e3
|
|
2423
2423
|
);
|
|
2424
2424
|
s <= 0 && (this.logger.warn(
|
|
@@ -2475,7 +2475,7 @@ class na {
|
|
|
2475
2475
|
}
|
|
2476
2476
|
decodeToken(e) {
|
|
2477
2477
|
try {
|
|
2478
|
-
return
|
|
2478
|
+
return $i(e);
|
|
2479
2479
|
} catch (n) {
|
|
2480
2480
|
return this._logVerbose(
|
|
2481
2481
|
`Error decoding token: ${n instanceof Error ? n.message : "Unknown error"}`
|
|
@@ -2486,34 +2486,34 @@ class na {
|
|
|
2486
2486
|
this.logger.logVerbose(`${e} [v${this.configVersion}]`);
|
|
2487
2487
|
}
|
|
2488
2488
|
}
|
|
2489
|
-
const
|
|
2489
|
+
const la = [
|
|
2490
2490
|
"convexClientConstructed",
|
|
2491
2491
|
"convexWebSocketOpen",
|
|
2492
2492
|
"convexFirstMessageReceived"
|
|
2493
2493
|
];
|
|
2494
|
-
function
|
|
2494
|
+
function ca(t, e) {
|
|
2495
2495
|
const n = { sessionId: e };
|
|
2496
2496
|
typeof performance > "u" || !performance.mark || performance.mark(t, { detail: n });
|
|
2497
2497
|
}
|
|
2498
|
-
function
|
|
2498
|
+
function ua(t) {
|
|
2499
2499
|
let e = t.name.slice(6);
|
|
2500
2500
|
return e = e.charAt(0).toLowerCase() + e.slice(1), {
|
|
2501
2501
|
name: e,
|
|
2502
2502
|
startTime: t.startTime
|
|
2503
2503
|
};
|
|
2504
2504
|
}
|
|
2505
|
-
function
|
|
2505
|
+
function ha(t) {
|
|
2506
2506
|
if (typeof performance > "u" || !performance.getEntriesByName)
|
|
2507
2507
|
return [];
|
|
2508
2508
|
const e = [];
|
|
2509
|
-
for (const n of
|
|
2509
|
+
for (const n of la) {
|
|
2510
2510
|
const r = performance.getEntriesByName(n).filter((i) => i.entryType === "mark").filter((i) => i.detail.sessionId === t);
|
|
2511
2511
|
e.push(...r);
|
|
2512
2512
|
}
|
|
2513
|
-
return e.map(
|
|
2513
|
+
return e.map(ua);
|
|
2514
2514
|
}
|
|
2515
|
-
var
|
|
2516
|
-
class
|
|
2515
|
+
var da = Object.defineProperty, fa = (t, e, n) => e in t ? da(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, E = (t, e, n) => fa(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2516
|
+
class pa {
|
|
2517
2517
|
/**
|
|
2518
2518
|
* @param address - The url of your Convex deployment, often provided
|
|
2519
2519
|
* by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
|
|
@@ -2523,7 +2523,7 @@ class ca {
|
|
|
2523
2523
|
* @param options - See {@link BaseConvexClientOptions} for a full description.
|
|
2524
2524
|
*/
|
|
2525
2525
|
constructor(e, n, r) {
|
|
2526
|
-
if (
|
|
2526
|
+
if (E(this, "address"), E(this, "state"), E(this, "requestManager"), E(this, "webSocketManager"), E(this, "authenticationManager"), E(this, "remoteQuerySet"), E(this, "optimisticQueryResults"), E(this, "_transitionHandlerCounter", 0), E(this, "_nextRequestId"), E(this, "_onTransitionFns", /* @__PURE__ */ new Map()), E(this, "_sessionId"), E(this, "firstMessageReceived", !1), E(this, "debug"), E(this, "logger"), E(this, "maxObservedTimestamp"), E(this, "connectionStateSubscribers", /* @__PURE__ */ new Map()), E(this, "nextConnectionStateSubscriberId", 0), E(this, "_lastPublishedConnectionState"), E(this, "markConnectionStateDirty", () => {
|
|
2527
2527
|
Promise.resolve().then(() => {
|
|
2528
2528
|
const p = this.connectionState();
|
|
2529
2529
|
if (JSON.stringify(p) !== JSON.stringify(this._lastPublishedConnectionState)) {
|
|
@@ -2532,20 +2532,20 @@ class ca {
|
|
|
2532
2532
|
g(p);
|
|
2533
2533
|
}
|
|
2534
2534
|
});
|
|
2535
|
-
}),
|
|
2536
|
-
this.debug &&
|
|
2535
|
+
}), E(this, "mark", (p) => {
|
|
2536
|
+
this.debug && ca(p, this.sessionId);
|
|
2537
2537
|
}), typeof e == "object")
|
|
2538
2538
|
throw new Error(
|
|
2539
2539
|
"Passing a ClientConfig object is no longer supported. Pass the URL of the Convex deployment as a string directly."
|
|
2540
2540
|
);
|
|
2541
|
-
r?.skipConvexDeploymentUrlCheck !== !0 &&
|
|
2541
|
+
r?.skipConvexDeploymentUrlCheck !== !0 && cs(e), r = { ...r };
|
|
2542
2542
|
const i = r.authRefreshTokenLeewaySeconds ?? 10;
|
|
2543
2543
|
let o = r.webSocketConstructor;
|
|
2544
2544
|
if (!o && typeof WebSocket > "u")
|
|
2545
2545
|
throw new Error(
|
|
2546
2546
|
"No WebSocket global variable defined! To use Convex in an environment without WebSocket try the HTTP client: https://docs.convex.dev/api/classes/browser.ConvexHttpClient"
|
|
2547
2547
|
);
|
|
2548
|
-
o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ?
|
|
2548
|
+
o = o || WebSocket, this.debug = r.reportDebugInfoToConvex ?? !1, this.address = e, this.logger = r.logger === !1 ? Ci({ verbose: r.verbose ?? !1 }) : r.logger !== !0 && r.logger ? r.logger : Si({ verbose: r.verbose ?? !1 });
|
|
2549
2549
|
const s = e.search("://");
|
|
2550
2550
|
if (s === -1)
|
|
2551
2551
|
throw new Error("Provided address was not an absolute URL.");
|
|
@@ -2557,18 +2557,18 @@ class ca {
|
|
|
2557
2557
|
u = "wss";
|
|
2558
2558
|
else
|
|
2559
2559
|
throw new Error(`Unknown parent protocol ${a}`);
|
|
2560
|
-
const d = `${u}://${l}/api/${
|
|
2561
|
-
this.state = new
|
|
2560
|
+
const d = `${u}://${l}/api/${hr}/sync`;
|
|
2561
|
+
this.state = new Ts(), this.remoteQuerySet = new mr(
|
|
2562
2562
|
(p) => this.state.queryPath(p),
|
|
2563
2563
|
this.logger
|
|
2564
|
-
), this.requestManager = new
|
|
2564
|
+
), this.requestManager = new $s(
|
|
2565
2565
|
this.logger,
|
|
2566
2566
|
this.markConnectionStateDirty
|
|
2567
2567
|
);
|
|
2568
2568
|
const h = () => {
|
|
2569
2569
|
this.webSocketManager.pause(), this.state.pause();
|
|
2570
2570
|
};
|
|
2571
|
-
this.authenticationManager = new
|
|
2571
|
+
this.authenticationManager = new aa(
|
|
2572
2572
|
this.state,
|
|
2573
2573
|
{
|
|
2574
2574
|
authenticate: (p) => {
|
|
@@ -2587,9 +2587,9 @@ class ca {
|
|
|
2587
2587
|
logger: this.logger,
|
|
2588
2588
|
refreshTokenLeewaySeconds: i
|
|
2589
2589
|
}
|
|
2590
|
-
), this.optimisticQueryResults = new
|
|
2590
|
+
), this.optimisticQueryResults = new Os(), this.addOnTransitionHandler((p) => {
|
|
2591
2591
|
n(p.queries.map((g) => g.token));
|
|
2592
|
-
}), this._nextRequestId = 0, this._sessionId =
|
|
2592
|
+
}), this._nextRequestId = 0, this._sessionId = ea();
|
|
2593
2593
|
const { unsavedChangesWarning: f } = r;
|
|
2594
2594
|
if (typeof window > "u" || typeof window.addEventListener > "u") {
|
|
2595
2595
|
if (f === !0)
|
|
@@ -2603,7 +2603,7 @@ class ca {
|
|
|
2603
2603
|
return (p || window.event).returnValue = g, g;
|
|
2604
2604
|
}
|
|
2605
2605
|
});
|
|
2606
|
-
this.webSocketManager = new
|
|
2606
|
+
this.webSocketManager = new Xs(
|
|
2607
2607
|
d,
|
|
2608
2608
|
{
|
|
2609
2609
|
onOpen: (p) => {
|
|
@@ -2612,7 +2612,7 @@ class ca {
|
|
|
2612
2612
|
type: "Connect",
|
|
2613
2613
|
sessionId: this._sessionId,
|
|
2614
2614
|
maxObservedTimestamp: this.maxObservedTimestamp
|
|
2615
|
-
}), this.remoteQuerySet = new
|
|
2615
|
+
}), this.remoteQuerySet = new mr(
|
|
2616
2616
|
(x) => this.state.queryPath(x),
|
|
2617
2617
|
this.logger
|
|
2618
2618
|
);
|
|
@@ -2659,7 +2659,7 @@ class ca {
|
|
|
2659
2659
|
break;
|
|
2660
2660
|
}
|
|
2661
2661
|
case "FatalError": {
|
|
2662
|
-
const g =
|
|
2662
|
+
const g = js(this.logger, p.error);
|
|
2663
2663
|
throw this.webSocketManager.terminate(), g;
|
|
2664
2664
|
}
|
|
2665
2665
|
}
|
|
@@ -2759,7 +2759,7 @@ class ca {
|
|
|
2759
2759
|
let n = {};
|
|
2760
2760
|
if (e && e.tokenType === "User")
|
|
2761
2761
|
try {
|
|
2762
|
-
n = e ?
|
|
2762
|
+
n = e ? $i(e.value) : {};
|
|
2763
2763
|
} catch {
|
|
2764
2764
|
n = {};
|
|
2765
2765
|
}
|
|
@@ -2918,7 +2918,7 @@ class ca {
|
|
|
2918
2918
|
async mutation(e, n, r) {
|
|
2919
2919
|
const i = await this.mutationInternal(e, n, r);
|
|
2920
2920
|
if (!i.success)
|
|
2921
|
-
throw i.errorData !== void 0 ?
|
|
2921
|
+
throw i.errorData !== void 0 ? sn(
|
|
2922
2922
|
i,
|
|
2923
2923
|
new yt(
|
|
2924
2924
|
Ce("mutation", e, i)
|
|
@@ -3002,7 +3002,7 @@ class ca {
|
|
|
3002
3002
|
async action(e, n) {
|
|
3003
3003
|
const r = await this.actionInternal(e, n);
|
|
3004
3004
|
if (!r.success)
|
|
3005
|
-
throw r.errorData !== void 0 ?
|
|
3005
|
+
throw r.errorData !== void 0 ? sn(
|
|
3006
3006
|
r,
|
|
3007
3007
|
new yt(Ce("action", e, r))
|
|
3008
3008
|
) : new Error(Ce("action", e, r));
|
|
@@ -3061,7 +3061,7 @@ class ca {
|
|
|
3061
3061
|
*/
|
|
3062
3062
|
reportMarks() {
|
|
3063
3063
|
if (this.debug) {
|
|
3064
|
-
const e =
|
|
3064
|
+
const e = ha(this.sessionId);
|
|
3065
3065
|
this.webSocketManager.sendMessage({
|
|
3066
3066
|
type: "Event",
|
|
3067
3067
|
eventType: "ClientConnect",
|
|
@@ -3080,7 +3080,7 @@ class ca {
|
|
|
3080
3080
|
method: "POST",
|
|
3081
3081
|
headers: {
|
|
3082
3082
|
"Content-Type": "application/json",
|
|
3083
|
-
"Convex-Client": `npm-${
|
|
3083
|
+
"Convex-Client": `npm-${hr}`
|
|
3084
3084
|
},
|
|
3085
3085
|
body: JSON.stringify({ event: "LongWebsocketDisconnect" })
|
|
3086
3086
|
}).then((r) => {
|
|
@@ -3093,15 +3093,15 @@ class ca {
|
|
|
3093
3093
|
});
|
|
3094
3094
|
}
|
|
3095
3095
|
}
|
|
3096
|
-
function
|
|
3096
|
+
function Vt(t) {
|
|
3097
3097
|
if (typeof t != "object" || t === null || !Array.isArray(t.page) || typeof t.isDone != "boolean" || typeof t.continueCursor != "string")
|
|
3098
3098
|
throw new Error(`Not a valid paginated query result: ${t?.toString()}`);
|
|
3099
3099
|
return t;
|
|
3100
3100
|
}
|
|
3101
|
-
var
|
|
3102
|
-
class
|
|
3101
|
+
var ga = Object.defineProperty, ma = (t, e, n) => e in t ? ga(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, vr = (t, e, n) => ma(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3102
|
+
class xa {
|
|
3103
3103
|
constructor(e, n) {
|
|
3104
|
-
this.client = e, this.onTransition = n,
|
|
3104
|
+
this.client = e, this.onTransition = n, vr(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), vr(this, "lastTransitionTs"), this.lastTransitionTs = q.fromNumber(0), this.client.addOnTransitionHandler(
|
|
3105
3105
|
(r) => this.onBaseTransition(r)
|
|
3106
3106
|
);
|
|
3107
3107
|
}
|
|
@@ -3114,7 +3114,7 @@ class da {
|
|
|
3114
3114
|
* @returns Object with paginatedQueryToken and unsubscribe function
|
|
3115
3115
|
*/
|
|
3116
3116
|
subscribe(e, n, r) {
|
|
3117
|
-
const i = me(e), o =
|
|
3117
|
+
const i = me(e), o = fr(
|
|
3118
3118
|
i,
|
|
3119
3119
|
n,
|
|
3120
3120
|
r
|
|
@@ -3145,7 +3145,7 @@ class da {
|
|
|
3145
3145
|
* Throws an error when one of the pages has errored.
|
|
3146
3146
|
*/
|
|
3147
3147
|
localQueryResult(e, n, r) {
|
|
3148
|
-
const i = me(e), o =
|
|
3148
|
+
const i = me(e), o = fr(
|
|
3149
3149
|
i,
|
|
3150
3150
|
n,
|
|
3151
3151
|
r
|
|
@@ -3173,7 +3173,7 @@ class da {
|
|
|
3173
3173
|
o = !0, s = !1;
|
|
3174
3174
|
continue;
|
|
3175
3175
|
}
|
|
3176
|
-
const d =
|
|
3176
|
+
const d = Vt(u);
|
|
3177
3177
|
i = i.concat(d.page), s = !!d.isDone;
|
|
3178
3178
|
}
|
|
3179
3179
|
let l;
|
|
@@ -3218,7 +3218,7 @@ class da {
|
|
|
3218
3218
|
const r = this.queryTokenForLastPageOfPaginatedQuery(e), i = this.client.localQueryResultByToken(r);
|
|
3219
3219
|
if (!i)
|
|
3220
3220
|
return !1;
|
|
3221
|
-
const o =
|
|
3221
|
+
const o = Vt(i);
|
|
3222
3222
|
if (o.isDone)
|
|
3223
3223
|
return !1;
|
|
3224
3224
|
this.addPageToPaginatedQuery(
|
|
@@ -3276,7 +3276,7 @@ class da {
|
|
|
3276
3276
|
const u = s.get(a).queryToken, d = n(u);
|
|
3277
3277
|
if (!d)
|
|
3278
3278
|
continue;
|
|
3279
|
-
const h =
|
|
3279
|
+
const h = Vt(d);
|
|
3280
3280
|
h.splitCursor && (h.pageStatus === "SplitRecommended" || h.pageStatus === "SplitRequired" || // This client-driven page splitting condition will change in the future.
|
|
3281
3281
|
h.page.length > i.options.initialNumItems * 2) && this.splitPaginatedQueryPage(
|
|
3282
3282
|
i,
|
|
@@ -3374,7 +3374,7 @@ class da {
|
|
|
3374
3374
|
return n;
|
|
3375
3375
|
}
|
|
3376
3376
|
}
|
|
3377
|
-
function
|
|
3377
|
+
function ba({
|
|
3378
3378
|
// (Synchronously) returns the current value of our subscription.
|
|
3379
3379
|
getCurrentValue: t,
|
|
3380
3380
|
// This function is passed an event handler to attach to the subscription.
|
|
@@ -3406,13 +3406,13 @@ function fa({
|
|
|
3406
3406
|
};
|
|
3407
3407
|
}, [t, e]), i;
|
|
3408
3408
|
}
|
|
3409
|
-
var
|
|
3410
|
-
const
|
|
3411
|
-
if (typeof
|
|
3409
|
+
var ya = Object.defineProperty, va = (t, e, n) => e in t ? ya(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ie = (t, e, n) => va(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3410
|
+
const _a = 5e3;
|
|
3411
|
+
if (typeof Sn > "u")
|
|
3412
3412
|
throw new Error("Required dependency 'react' not found");
|
|
3413
|
-
function
|
|
3413
|
+
function Ei(t, e, n) {
|
|
3414
3414
|
function r(i) {
|
|
3415
|
-
return
|
|
3415
|
+
return Sa(i), e.mutation(t, i, {
|
|
3416
3416
|
optimisticUpdate: n
|
|
3417
3417
|
});
|
|
3418
3418
|
}
|
|
@@ -3423,10 +3423,10 @@ function Ti(t, e, n) {
|
|
|
3423
3423
|
t
|
|
3424
3424
|
)}`
|
|
3425
3425
|
);
|
|
3426
|
-
return
|
|
3426
|
+
return Ei(t, e, o);
|
|
3427
3427
|
}, r;
|
|
3428
3428
|
}
|
|
3429
|
-
class
|
|
3429
|
+
class wa {
|
|
3430
3430
|
/**
|
|
3431
3431
|
* @param address - The url of your Convex deployment, often provided
|
|
3432
3432
|
* by an environment variable. E.g. `https://small-mouse-123.convex.cloud`.
|
|
@@ -3443,7 +3443,7 @@ class xa {
|
|
|
3443
3443
|
);
|
|
3444
3444
|
if (!e.includes("://"))
|
|
3445
3445
|
throw new Error("Provided address was not an absolute URL.");
|
|
3446
|
-
this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ?
|
|
3446
|
+
this.address = e, this.listeners = /* @__PURE__ */ new Map(), this._logger = n?.logger === !1 ? Ci({ verbose: n?.verbose ?? !1 }) : n?.logger !== !0 && n?.logger ? n.logger : Si({ verbose: n?.verbose ?? !1 }), this.options = { ...n, logger: this._logger };
|
|
3447
3447
|
}
|
|
3448
3448
|
/**
|
|
3449
3449
|
* Return the address for this client, useful for creating a new client.
|
|
@@ -3463,13 +3463,13 @@ class xa {
|
|
|
3463
3463
|
get sync() {
|
|
3464
3464
|
if (this.closed)
|
|
3465
3465
|
throw new Error("ConvexReactClient has already been closed.");
|
|
3466
|
-
return this.cachedSync ? this.cachedSync : (this.cachedSync = new
|
|
3466
|
+
return this.cachedSync ? this.cachedSync : (this.cachedSync = new pa(
|
|
3467
3467
|
this.address,
|
|
3468
3468
|
() => {
|
|
3469
3469
|
},
|
|
3470
3470
|
// Use the PaginatedQueryClient's transition instead.
|
|
3471
3471
|
this.options
|
|
3472
|
-
), this.adminAuth && this.cachedSync.setAdminAuth(this.adminAuth, this.fakeUserIdentity), this.cachedPaginatedQueryClient = new
|
|
3472
|
+
), this.adminAuth && this.cachedSync.setAdminAuth(this.adminAuth, this.fakeUserIdentity), this.cachedPaginatedQueryClient = new xa(
|
|
3473
3473
|
this.cachedSync,
|
|
3474
3474
|
(e) => this.handleTransition(e)
|
|
3475
3475
|
), this.cachedSync);
|
|
@@ -3579,7 +3579,7 @@ class xa {
|
|
|
3579
3579
|
* an optional extendSubscriptionFor for how long to subscribe to the query.
|
|
3580
3580
|
*/
|
|
3581
3581
|
prewarmQuery(e) {
|
|
3582
|
-
const n = e.extendSubscriptionFor ??
|
|
3582
|
+
const n = e.extendSubscriptionFor ?? _a, i = this.watchQuery(e.query, e.args || {}).onUpdate(() => {
|
|
3583
3583
|
});
|
|
3584
3584
|
setTimeout(i, n);
|
|
3585
3585
|
}
|
|
@@ -3730,52 +3730,52 @@ class xa {
|
|
|
3730
3730
|
}
|
|
3731
3731
|
}
|
|
3732
3732
|
}
|
|
3733
|
-
const
|
|
3733
|
+
const Tn = Sn.createContext(
|
|
3734
3734
|
void 0
|
|
3735
3735
|
// in the future this will be a mocked client for testing
|
|
3736
3736
|
);
|
|
3737
|
-
function
|
|
3738
|
-
return
|
|
3737
|
+
function ka() {
|
|
3738
|
+
return $t(Tn);
|
|
3739
3739
|
}
|
|
3740
|
-
const
|
|
3741
|
-
|
|
3740
|
+
const ja = ({ client: t, children: e }) => Sn.createElement(
|
|
3741
|
+
Tn.Provider,
|
|
3742
3742
|
{ value: t },
|
|
3743
3743
|
e
|
|
3744
3744
|
);
|
|
3745
|
-
function
|
|
3746
|
-
const n = e[0] === "skip", r = e[0] === "skip" ? {} : oe(e[0]), i = typeof t == "string" ?
|
|
3745
|
+
function _r(t, ...e) {
|
|
3746
|
+
const n = e[0] === "skip", r = e[0] === "skip" ? {} : oe(e[0]), i = typeof t == "string" ? Ti(t) : t, o = O(i), s = K(
|
|
3747
3747
|
() => n ? {} : { query: { query: i, args: r } },
|
|
3748
3748
|
// Stringify args so args that are semantically the same don't trigger a
|
|
3749
3749
|
// rerender. Saves developers from adding `useMemo` on every args usage.
|
|
3750
3750
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3751
3751
|
[JSON.stringify(re(r)), o, n]
|
|
3752
|
-
), a =
|
|
3752
|
+
), a = Aa(s).query;
|
|
3753
3753
|
if (a instanceof Error)
|
|
3754
3754
|
throw a;
|
|
3755
3755
|
return a;
|
|
3756
3756
|
}
|
|
3757
|
-
function
|
|
3758
|
-
const e = typeof t == "string" ?
|
|
3757
|
+
function It(t) {
|
|
3758
|
+
const e = typeof t == "string" ? Ti(t) : t, n = $t(Tn);
|
|
3759
3759
|
if (n === void 0)
|
|
3760
3760
|
throw new Error(
|
|
3761
3761
|
"Could not find Convex client! `useMutation` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app"
|
|
3762
3762
|
);
|
|
3763
|
-
return
|
|
3764
|
-
() =>
|
|
3763
|
+
return K(
|
|
3764
|
+
() => Ei(e, n),
|
|
3765
3765
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3766
3766
|
[n, O(e)]
|
|
3767
3767
|
);
|
|
3768
3768
|
}
|
|
3769
|
-
function
|
|
3769
|
+
function Sa(t) {
|
|
3770
3770
|
if (typeof t == "object" && t !== null && "bubbles" in t && "persist" in t && "isDefaultPrevented" in t)
|
|
3771
3771
|
throw new Error(
|
|
3772
3772
|
"Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler."
|
|
3773
3773
|
);
|
|
3774
3774
|
}
|
|
3775
|
-
var
|
|
3776
|
-
class
|
|
3775
|
+
var Ca = Object.defineProperty, Ta = (t, e, n) => e in t ? Ca(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Ht = (t, e, n) => Ta(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3776
|
+
class Ra {
|
|
3777
3777
|
constructor(e) {
|
|
3778
|
-
|
|
3778
|
+
Ht(this, "createWatch"), Ht(this, "queries"), Ht(this, "listeners"), this.createWatch = e, this.queries = {}, this.listeners = /* @__PURE__ */ new Set();
|
|
3779
3779
|
}
|
|
3780
3780
|
setQueries(e) {
|
|
3781
3781
|
for (const n of Object.keys(e)) {
|
|
@@ -3874,40 +3874,40 @@ class ka {
|
|
|
3874
3874
|
e();
|
|
3875
3875
|
}
|
|
3876
3876
|
}
|
|
3877
|
-
function
|
|
3878
|
-
const e =
|
|
3877
|
+
function Aa(t) {
|
|
3878
|
+
const e = ka();
|
|
3879
3879
|
if (e === void 0)
|
|
3880
3880
|
throw new Error(
|
|
3881
3881
|
"Could not find Convex client! `useQuery` must be used in the React component tree under `ConvexProvider`. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-app"
|
|
3882
3882
|
);
|
|
3883
|
-
const n =
|
|
3883
|
+
const n = K(() => (r, i, {
|
|
3884
3884
|
journal: o,
|
|
3885
3885
|
paginationOptions: s
|
|
3886
3886
|
}) => s ? e.watchPaginatedQuery(r, i, s) : e.watchQuery(r, i, o ? { journal: o } : {}), [e]);
|
|
3887
|
-
return
|
|
3887
|
+
return $a(t, n);
|
|
3888
3888
|
}
|
|
3889
|
-
function
|
|
3890
|
-
const [n] = C(() => new
|
|
3889
|
+
function $a(t, e) {
|
|
3890
|
+
const [n] = C(() => new Ra(e));
|
|
3891
3891
|
n.createWatch !== e && n.setCreateWatch(e), T(() => () => n.destroy(), [n]);
|
|
3892
|
-
const r =
|
|
3892
|
+
const r = K(
|
|
3893
3893
|
() => ({
|
|
3894
3894
|
getCurrentValue: () => n.getLocalResults(t),
|
|
3895
3895
|
subscribe: (i) => (n.setQueries(t), n.subscribe(i))
|
|
3896
3896
|
}),
|
|
3897
3897
|
[n, t]
|
|
3898
3898
|
);
|
|
3899
|
-
return
|
|
3899
|
+
return ba(r);
|
|
3900
3900
|
}
|
|
3901
|
-
var
|
|
3902
|
-
function
|
|
3901
|
+
var Ea = /* @__PURE__ */ Symbol.for("preact-signals");
|
|
3902
|
+
function Pt() {
|
|
3903
3903
|
if (ae > 1)
|
|
3904
3904
|
ae--;
|
|
3905
3905
|
else {
|
|
3906
|
-
for (var t, e = !1;
|
|
3907
|
-
var n =
|
|
3908
|
-
for (
|
|
3906
|
+
for (var t, e = !1; Ge !== void 0; ) {
|
|
3907
|
+
var n = Ge;
|
|
3908
|
+
for (Ge = void 0, an++; n !== void 0; ) {
|
|
3909
3909
|
var r = n.o;
|
|
3910
|
-
if (n.o = void 0, n.f &= -3, !(8 & n.f) &&
|
|
3910
|
+
if (n.o = void 0, n.f &= -3, !(8 & n.f) && Li(n)) try {
|
|
3911
3911
|
n.c();
|
|
3912
3912
|
} catch (i) {
|
|
3913
3913
|
e || (t = i, e = !0);
|
|
@@ -3915,20 +3915,20 @@ function It() {
|
|
|
3915
3915
|
n = r;
|
|
3916
3916
|
}
|
|
3917
3917
|
}
|
|
3918
|
-
if (
|
|
3918
|
+
if (an = 0, ae--, e) throw t;
|
|
3919
3919
|
}
|
|
3920
3920
|
}
|
|
3921
|
-
function
|
|
3921
|
+
function Ia(t) {
|
|
3922
3922
|
if (ae > 0) return t();
|
|
3923
3923
|
ae++;
|
|
3924
3924
|
try {
|
|
3925
3925
|
return t();
|
|
3926
3926
|
} finally {
|
|
3927
|
-
|
|
3927
|
+
Pt();
|
|
3928
3928
|
}
|
|
3929
3929
|
}
|
|
3930
3930
|
var w = void 0;
|
|
3931
|
-
function
|
|
3931
|
+
function Ii(t) {
|
|
3932
3932
|
var e = w;
|
|
3933
3933
|
w = void 0;
|
|
3934
3934
|
try {
|
|
@@ -3937,8 +3937,8 @@ function Ri(t) {
|
|
|
3937
3937
|
w = e;
|
|
3938
3938
|
}
|
|
3939
3939
|
}
|
|
3940
|
-
var
|
|
3941
|
-
function
|
|
3940
|
+
var Ge = void 0, ae = 0, an = 0, wt = 0;
|
|
3941
|
+
function Pi(t) {
|
|
3942
3942
|
if (w !== void 0) {
|
|
3943
3943
|
var e = t.n;
|
|
3944
3944
|
if (e === void 0 || e.t !== w)
|
|
@@ -3947,31 +3947,31 @@ function Ai(t) {
|
|
|
3947
3947
|
return e.i = 0, e.n !== void 0 && (e.n.p = e.p, e.p !== void 0 && (e.p.n = e.n), e.p = w.s, e.n = void 0, w.s.n = e, w.s = e), e;
|
|
3948
3948
|
}
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3950
|
+
function L(t, e) {
|
|
3951
3951
|
this.v = t, this.i = 0, this.n = void 0, this.t = void 0, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
|
|
3952
3952
|
}
|
|
3953
|
-
|
|
3954
|
-
|
|
3953
|
+
L.prototype.brand = Ea;
|
|
3954
|
+
L.prototype.h = function() {
|
|
3955
3955
|
return !0;
|
|
3956
3956
|
};
|
|
3957
|
-
|
|
3957
|
+
L.prototype.S = function(t) {
|
|
3958
3958
|
var e = this, n = this.t;
|
|
3959
|
-
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t :
|
|
3959
|
+
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : Ii(function() {
|
|
3960
3960
|
var r;
|
|
3961
3961
|
(r = e.W) == null || r.call(e);
|
|
3962
3962
|
}));
|
|
3963
3963
|
};
|
|
3964
|
-
|
|
3964
|
+
L.prototype.U = function(t) {
|
|
3965
3965
|
var e = this;
|
|
3966
3966
|
if (this.t !== void 0) {
|
|
3967
3967
|
var n = t.e, r = t.x;
|
|
3968
|
-
n !== void 0 && (n.x = r, t.e = void 0), r !== void 0 && (r.e = n, t.x = void 0), t === this.t && (this.t = r, r === void 0 &&
|
|
3968
|
+
n !== void 0 && (n.x = r, t.e = void 0), r !== void 0 && (r.e = n, t.x = void 0), t === this.t && (this.t = r, r === void 0 && Ii(function() {
|
|
3969
3969
|
var i;
|
|
3970
3970
|
(i = e.Z) == null || i.call(e);
|
|
3971
3971
|
}));
|
|
3972
3972
|
}
|
|
3973
3973
|
};
|
|
3974
|
-
|
|
3974
|
+
L.prototype.subscribe = function(t) {
|
|
3975
3975
|
var e = this;
|
|
3976
3976
|
return at(function() {
|
|
3977
3977
|
var n = e.value, r = w;
|
|
@@ -3983,16 +3983,16 @@ q.prototype.subscribe = function(t) {
|
|
|
3983
3983
|
}
|
|
3984
3984
|
}, { name: "sub" });
|
|
3985
3985
|
};
|
|
3986
|
-
|
|
3986
|
+
L.prototype.valueOf = function() {
|
|
3987
3987
|
return this.value;
|
|
3988
3988
|
};
|
|
3989
|
-
|
|
3989
|
+
L.prototype.toString = function() {
|
|
3990
3990
|
return this.value + "";
|
|
3991
3991
|
};
|
|
3992
|
-
|
|
3992
|
+
L.prototype.toJSON = function() {
|
|
3993
3993
|
return this.value;
|
|
3994
3994
|
};
|
|
3995
|
-
|
|
3995
|
+
L.prototype.peek = function() {
|
|
3996
3996
|
var t = w;
|
|
3997
3997
|
w = void 0;
|
|
3998
3998
|
try {
|
|
@@ -4001,28 +4001,28 @@ q.prototype.peek = function() {
|
|
|
4001
4001
|
w = t;
|
|
4002
4002
|
}
|
|
4003
4003
|
};
|
|
4004
|
-
Object.defineProperty(
|
|
4005
|
-
var t =
|
|
4004
|
+
Object.defineProperty(L.prototype, "value", { get: function() {
|
|
4005
|
+
var t = Pi(this);
|
|
4006
4006
|
return t !== void 0 && (t.i = this.i), this.v;
|
|
4007
4007
|
}, set: function(t) {
|
|
4008
4008
|
if (t !== this.v) {
|
|
4009
|
-
if (
|
|
4009
|
+
if (an > 100) throw new Error("Cycle detected");
|
|
4010
4010
|
this.v = t, this.i++, wt++, ae++;
|
|
4011
4011
|
try {
|
|
4012
4012
|
for (var e = this.t; e !== void 0; e = e.x) e.t.N();
|
|
4013
4013
|
} finally {
|
|
4014
|
-
|
|
4014
|
+
Pt();
|
|
4015
4015
|
}
|
|
4016
4016
|
}
|
|
4017
4017
|
} });
|
|
4018
|
-
function
|
|
4019
|
-
return new
|
|
4018
|
+
function A(t, e) {
|
|
4019
|
+
return new L(t, e);
|
|
4020
4020
|
}
|
|
4021
|
-
function
|
|
4021
|
+
function Li(t) {
|
|
4022
4022
|
for (var e = t.s; e !== void 0; e = e.n) if (e.S.i !== e.i || !e.S.h() || e.S.i !== e.i) return !0;
|
|
4023
4023
|
return !1;
|
|
4024
4024
|
}
|
|
4025
|
-
function
|
|
4025
|
+
function Mi(t) {
|
|
4026
4026
|
for (var e = t.s; e !== void 0; e = e.n) {
|
|
4027
4027
|
var n = e.S.n;
|
|
4028
4028
|
if (n !== void 0 && (e.r = n), e.S.n = e, e.i = -1, e.n === void 0) {
|
|
@@ -4031,7 +4031,7 @@ function Ei(t) {
|
|
|
4031
4031
|
}
|
|
4032
4032
|
}
|
|
4033
4033
|
}
|
|
4034
|
-
function
|
|
4034
|
+
function qi(t) {
|
|
4035
4035
|
for (var e = t.s, n = void 0; e !== void 0; ) {
|
|
4036
4036
|
var r = e.p;
|
|
4037
4037
|
e.i === -1 ? (e.S.U(e), r !== void 0 && (r.n = e.n), e.n !== void 0 && (e.n.p = r)) : n = e, e.S.n = e.r, e.r !== void 0 && (e.r = void 0), e = r;
|
|
@@ -4039,33 +4039,33 @@ function Ii(t) {
|
|
|
4039
4039
|
t.s = n;
|
|
4040
4040
|
}
|
|
4041
4041
|
function ye(t, e) {
|
|
4042
|
-
|
|
4042
|
+
L.call(this, void 0), this.x = t, this.s = void 0, this.g = wt - 1, this.f = 4, this.W = e?.watched, this.Z = e?.unwatched, this.name = e?.name;
|
|
4043
4043
|
}
|
|
4044
|
-
ye.prototype = new
|
|
4044
|
+
ye.prototype = new L();
|
|
4045
4045
|
ye.prototype.h = function() {
|
|
4046
4046
|
if (this.f &= -3, 1 & this.f) return !1;
|
|
4047
4047
|
if ((36 & this.f) == 32 || (this.f &= -5, this.g === wt)) return !0;
|
|
4048
|
-
if (this.g = wt, this.f |= 1, this.i > 0 &&
|
|
4048
|
+
if (this.g = wt, this.f |= 1, this.i > 0 && !Li(this))
|
|
4049
4049
|
return this.f &= -2, !0;
|
|
4050
4050
|
var t = w;
|
|
4051
4051
|
try {
|
|
4052
|
-
|
|
4052
|
+
Mi(this), w = this;
|
|
4053
4053
|
var e = this.x();
|
|
4054
4054
|
(16 & this.f || this.v !== e || this.i === 0) && (this.v = e, this.f &= -17, this.i++);
|
|
4055
4055
|
} catch (n) {
|
|
4056
4056
|
this.v = n, this.f |= 16, this.i++;
|
|
4057
4057
|
}
|
|
4058
|
-
return w = t,
|
|
4058
|
+
return w = t, qi(this), this.f &= -2, !0;
|
|
4059
4059
|
};
|
|
4060
4060
|
ye.prototype.S = function(t) {
|
|
4061
4061
|
if (this.t === void 0) {
|
|
4062
4062
|
this.f |= 36;
|
|
4063
4063
|
for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
|
|
4064
4064
|
}
|
|
4065
|
-
|
|
4065
|
+
L.prototype.S.call(this, t);
|
|
4066
4066
|
};
|
|
4067
4067
|
ye.prototype.U = function(t) {
|
|
4068
|
-
if (this.t !== void 0 && (
|
|
4068
|
+
if (this.t !== void 0 && (L.prototype.U.call(this, t), this.t === void 0)) {
|
|
4069
4069
|
this.f &= -33;
|
|
4070
4070
|
for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
|
|
4071
4071
|
}
|
|
@@ -4078,14 +4078,14 @@ ye.prototype.N = function() {
|
|
|
4078
4078
|
};
|
|
4079
4079
|
Object.defineProperty(ye.prototype, "value", { get: function() {
|
|
4080
4080
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4081
|
-
var t =
|
|
4081
|
+
var t = Pi(this);
|
|
4082
4082
|
if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
|
|
4083
4083
|
return this.v;
|
|
4084
4084
|
} });
|
|
4085
|
-
function
|
|
4085
|
+
function ln(t, e) {
|
|
4086
4086
|
return new ye(t, e);
|
|
4087
4087
|
}
|
|
4088
|
-
function
|
|
4088
|
+
function Oi(t) {
|
|
4089
4089
|
var e = t.u;
|
|
4090
4090
|
if (t.u = void 0, typeof e == "function") {
|
|
4091
4091
|
ae++;
|
|
@@ -4094,24 +4094,24 @@ function Mi(t) {
|
|
|
4094
4094
|
try {
|
|
4095
4095
|
e();
|
|
4096
4096
|
} catch (r) {
|
|
4097
|
-
throw t.f &= -2, t.f |= 8,
|
|
4097
|
+
throw t.f &= -2, t.f |= 8, Rn(t), r;
|
|
4098
4098
|
} finally {
|
|
4099
|
-
w = n,
|
|
4099
|
+
w = n, Pt();
|
|
4100
4100
|
}
|
|
4101
4101
|
}
|
|
4102
4102
|
}
|
|
4103
|
-
function
|
|
4103
|
+
function Rn(t) {
|
|
4104
4104
|
for (var e = t.s; e !== void 0; e = e.n) e.S.U(e);
|
|
4105
|
-
t.x = void 0, t.s = void 0,
|
|
4105
|
+
t.x = void 0, t.s = void 0, Oi(t);
|
|
4106
4106
|
}
|
|
4107
|
-
function
|
|
4107
|
+
function Pa(t) {
|
|
4108
4108
|
if (w !== this) throw new Error("Out-of-order effect");
|
|
4109
|
-
|
|
4109
|
+
qi(this), w = t, this.f &= -2, 8 & this.f && Rn(this), Pt();
|
|
4110
4110
|
}
|
|
4111
|
-
function
|
|
4111
|
+
function qe(t, e) {
|
|
4112
4112
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
|
|
4113
4113
|
}
|
|
4114
|
-
|
|
4114
|
+
qe.prototype.c = function() {
|
|
4115
4115
|
var t = this.S();
|
|
4116
4116
|
try {
|
|
4117
4117
|
if (8 & this.f || this.x === void 0) return;
|
|
@@ -4121,23 +4121,23 @@ Pe.prototype.c = function() {
|
|
|
4121
4121
|
t();
|
|
4122
4122
|
}
|
|
4123
4123
|
};
|
|
4124
|
-
|
|
4124
|
+
qe.prototype.S = function() {
|
|
4125
4125
|
if (1 & this.f) throw new Error("Cycle detected");
|
|
4126
|
-
this.f |= 1, this.f &= -9,
|
|
4126
|
+
this.f |= 1, this.f &= -9, Oi(this), Mi(this), ae++;
|
|
4127
4127
|
var t = w;
|
|
4128
|
-
return w = this,
|
|
4128
|
+
return w = this, Pa.bind(this, t);
|
|
4129
4129
|
};
|
|
4130
|
-
|
|
4131
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
4130
|
+
qe.prototype.N = function() {
|
|
4131
|
+
2 & this.f || (this.f |= 2, this.o = Ge, Ge = this);
|
|
4132
4132
|
};
|
|
4133
|
-
|
|
4134
|
-
this.f |= 8, 1 & this.f ||
|
|
4133
|
+
qe.prototype.d = function() {
|
|
4134
|
+
this.f |= 8, 1 & this.f || Rn(this);
|
|
4135
4135
|
};
|
|
4136
|
-
|
|
4136
|
+
qe.prototype.dispose = function() {
|
|
4137
4137
|
this.d();
|
|
4138
4138
|
};
|
|
4139
4139
|
function at(t, e) {
|
|
4140
|
-
var n = new
|
|
4140
|
+
var n = new qe(t, e);
|
|
4141
4141
|
try {
|
|
4142
4142
|
n.c();
|
|
4143
4143
|
} catch (i) {
|
|
@@ -4146,11 +4146,11 @@ function at(t, e) {
|
|
|
4146
4146
|
var r = n.d.bind(n);
|
|
4147
4147
|
return r[Symbol.dispose] = r, r;
|
|
4148
4148
|
}
|
|
4149
|
-
var
|
|
4149
|
+
var Ni, ft, La = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, zi = [];
|
|
4150
4150
|
at(function() {
|
|
4151
|
-
|
|
4151
|
+
Ni = this.N;
|
|
4152
4152
|
})();
|
|
4153
|
-
function
|
|
4153
|
+
function Oe(t, e) {
|
|
4154
4154
|
b[t] = e.bind(null, b[t] || function() {
|
|
4155
4155
|
});
|
|
4156
4156
|
}
|
|
@@ -4161,21 +4161,21 @@ function kt(t) {
|
|
|
4161
4161
|
}
|
|
4162
4162
|
ft = t && t.S();
|
|
4163
4163
|
}
|
|
4164
|
-
function
|
|
4165
|
-
var e = this, n = t.data, r =
|
|
4164
|
+
function Bi(t) {
|
|
4165
|
+
var e = this, n = t.data, r = Te(n);
|
|
4166
4166
|
r.value = n;
|
|
4167
|
-
var i =
|
|
4167
|
+
var i = K(function() {
|
|
4168
4168
|
for (var l = e, a = e.__v; a = a.__; ) if (a.__c) {
|
|
4169
4169
|
a.__c.__$f |= 4;
|
|
4170
4170
|
break;
|
|
4171
4171
|
}
|
|
4172
|
-
var u =
|
|
4172
|
+
var u = ln(function() {
|
|
4173
4173
|
var p = r.value.value;
|
|
4174
4174
|
return p === 0 ? 0 : p === !0 ? "" : p || "";
|
|
4175
|
-
}), d =
|
|
4176
|
-
return !Array.isArray(u.value) && !
|
|
4175
|
+
}), d = ln(function() {
|
|
4176
|
+
return !Array.isArray(u.value) && !Dr(u.value);
|
|
4177
4177
|
}), h = at(function() {
|
|
4178
|
-
if (this.N =
|
|
4178
|
+
if (this.N = Fi, d.value) {
|
|
4179
4179
|
var p = u.value;
|
|
4180
4180
|
l.__v && l.__v.__e && l.__v.__e.nodeType === 3 && (l.__v.__e.data = p);
|
|
4181
4181
|
}
|
|
@@ -4186,21 +4186,21 @@ function Li(t) {
|
|
|
4186
4186
|
}, []), o = i[0], s = i[1];
|
|
4187
4187
|
return o.value ? s.peek() : s.value;
|
|
4188
4188
|
}
|
|
4189
|
-
|
|
4190
|
-
Object.defineProperties(
|
|
4189
|
+
Bi.displayName = "ReactiveTextNode";
|
|
4190
|
+
Object.defineProperties(L.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Bi }, props: { configurable: !0, get: function() {
|
|
4191
4191
|
return { data: this };
|
|
4192
4192
|
} }, __b: { configurable: !0, value: 1 } });
|
|
4193
|
-
|
|
4193
|
+
Oe("__b", function(t, e) {
|
|
4194
4194
|
if (typeof e.type == "string") {
|
|
4195
4195
|
var n, r = e.props;
|
|
4196
4196
|
for (var i in r) if (i !== "children") {
|
|
4197
4197
|
var o = r[i];
|
|
4198
|
-
o instanceof
|
|
4198
|
+
o instanceof L && (n || (e.__np = n = {}), n[i] = o, r[i] = o.peek());
|
|
4199
4199
|
}
|
|
4200
4200
|
}
|
|
4201
4201
|
t(e);
|
|
4202
4202
|
});
|
|
4203
|
-
|
|
4203
|
+
Oe("__r", function(t, e) {
|
|
4204
4204
|
if (t(e), e.type !== F) {
|
|
4205
4205
|
kt();
|
|
4206
4206
|
var n, r = e.__c;
|
|
@@ -4211,14 +4211,14 @@ Le("__r", function(t, e) {
|
|
|
4211
4211
|
}, { name: o }), s.c = i, s;
|
|
4212
4212
|
})(function() {
|
|
4213
4213
|
var i;
|
|
4214
|
-
|
|
4214
|
+
La && ((i = n.y) == null || i.call(n)), r.__$f |= 1, r.setState({});
|
|
4215
4215
|
}, typeof e.type == "function" ? e.type.displayName || e.type.name : ""))), kt(n);
|
|
4216
4216
|
}
|
|
4217
4217
|
});
|
|
4218
|
-
|
|
4218
|
+
Oe("__e", function(t, e, n, r) {
|
|
4219
4219
|
kt(), t(e, n, r);
|
|
4220
4220
|
});
|
|
4221
|
-
|
|
4221
|
+
Oe("diffed", function(t, e) {
|
|
4222
4222
|
kt();
|
|
4223
4223
|
var n;
|
|
4224
4224
|
if (typeof e.type == "string" && (n = e.__e)) {
|
|
@@ -4233,23 +4233,23 @@ Le("diffed", function(t, e) {
|
|
|
4233
4233
|
o = {}, n.U = o;
|
|
4234
4234
|
for (var a in r) {
|
|
4235
4235
|
var u = o[a], d = r[a];
|
|
4236
|
-
u === void 0 ? (u =
|
|
4236
|
+
u === void 0 ? (u = Ma(n, a, d, i), o[a] = u) : u.o(d, i);
|
|
4237
4237
|
}
|
|
4238
4238
|
}
|
|
4239
4239
|
}
|
|
4240
4240
|
t(e);
|
|
4241
4241
|
});
|
|
4242
|
-
function
|
|
4243
|
-
var i = e in t && t.ownerSVGElement === void 0, o =
|
|
4242
|
+
function Ma(t, e, n, r) {
|
|
4243
|
+
var i = e in t && t.ownerSVGElement === void 0, o = A(n);
|
|
4244
4244
|
return { o: function(s, l) {
|
|
4245
4245
|
o.value = s, r = l;
|
|
4246
4246
|
}, d: at(function() {
|
|
4247
|
-
this.N =
|
|
4247
|
+
this.N = Fi;
|
|
4248
4248
|
var s = o.value.value;
|
|
4249
4249
|
r[e] !== s && (r[e] = s, i ? t[e] = s : s != null && (s !== !1 || e[4] === "-") ? t.setAttribute(e, s) : t.removeAttribute(e));
|
|
4250
4250
|
}) };
|
|
4251
4251
|
}
|
|
4252
|
-
|
|
4252
|
+
Oe("unmount", function(t, e) {
|
|
4253
4253
|
if (typeof e.type == "string") {
|
|
4254
4254
|
var n = e.__e;
|
|
4255
4255
|
if (n) {
|
|
@@ -4271,10 +4271,10 @@ Le("unmount", function(t, e) {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
t(e);
|
|
4273
4273
|
});
|
|
4274
|
-
|
|
4274
|
+
Oe("__h", function(t, e, n, r) {
|
|
4275
4275
|
(r < 3 || r === 9) && (e.__$f |= 2), t(e, n, r);
|
|
4276
4276
|
});
|
|
4277
|
-
|
|
4277
|
+
G.prototype.shouldComponentUpdate = function(t, e) {
|
|
4278
4278
|
if (this.__R) return !0;
|
|
4279
4279
|
var n = this.__$u, r = n && n.s !== void 0;
|
|
4280
4280
|
for (var i in e) return !0;
|
|
@@ -4286,32 +4286,32 @@ K.prototype.shouldComponentUpdate = function(t, e) {
|
|
|
4286
4286
|
for (var l in this.props) if (!(l in t)) return !0;
|
|
4287
4287
|
return !1;
|
|
4288
4288
|
};
|
|
4289
|
-
function
|
|
4290
|
-
return
|
|
4291
|
-
return
|
|
4289
|
+
function Te(t, e) {
|
|
4290
|
+
return K(function() {
|
|
4291
|
+
return A(t, e);
|
|
4292
4292
|
}, []);
|
|
4293
4293
|
}
|
|
4294
|
-
var
|
|
4294
|
+
var qa = function(t) {
|
|
4295
4295
|
queueMicrotask(function() {
|
|
4296
4296
|
queueMicrotask(t);
|
|
4297
4297
|
});
|
|
4298
4298
|
};
|
|
4299
|
-
function
|
|
4300
|
-
|
|
4301
|
-
for (var t; t =
|
|
4299
|
+
function Oa() {
|
|
4300
|
+
Ia(function() {
|
|
4301
|
+
for (var t; t = zi.shift(); ) Ni.call(t);
|
|
4302
4302
|
});
|
|
4303
4303
|
}
|
|
4304
|
-
function
|
|
4305
|
-
|
|
4304
|
+
function Fi() {
|
|
4305
|
+
zi.push(this) === 1 && (b.requestAnimationFrame || qa)(Oa);
|
|
4306
4306
|
}
|
|
4307
|
-
const
|
|
4308
|
-
function
|
|
4307
|
+
const P = A(!1), jt = A(void 0), le = A(void 0), cn = A([]), un = A([]), Ui = A(null);
|
|
4308
|
+
function Na(t) {
|
|
4309
4309
|
return t.replace(/\.convex\.site\b/, ".convex.cloud");
|
|
4310
4310
|
}
|
|
4311
|
-
function
|
|
4311
|
+
function Qi(t) {
|
|
4312
4312
|
return t.replace(/\.convex\.cloud\b/, ".convex.site");
|
|
4313
4313
|
}
|
|
4314
|
-
function
|
|
4314
|
+
function za(t, e) {
|
|
4315
4315
|
const n = t.title ?? e?.title ?? "Assistant";
|
|
4316
4316
|
return {
|
|
4317
4317
|
title: n,
|
|
@@ -4333,23 +4333,23 @@ function qa(t, e) {
|
|
|
4333
4333
|
windowHeight: t.windowHeight ?? e?.windowHeight
|
|
4334
4334
|
};
|
|
4335
4335
|
}
|
|
4336
|
-
async function
|
|
4336
|
+
async function Ba(t, e, n, r) {
|
|
4337
4337
|
const i = new URL(`${t}/widget/config`);
|
|
4338
4338
|
i.searchParams.set("orgSlug", e), r && i.searchParams.set("projSlug", r);
|
|
4339
4339
|
const o = await fetch(i.toString(), { signal: n });
|
|
4340
4340
|
return o.ok ? o.json() : null;
|
|
4341
4341
|
}
|
|
4342
|
-
function
|
|
4342
|
+
function Fa(t, e, n) {
|
|
4343
4343
|
const [r, i] = C(null);
|
|
4344
4344
|
return T(() => {
|
|
4345
4345
|
i(null);
|
|
4346
|
-
const o = n ?? "https://festive-mouse-978.eu-west-1.convex.cloud", s = o ?
|
|
4346
|
+
const o = n ?? "https://festive-mouse-978.eu-west-1.convex.cloud", s = o ? Qi(o) : void 0;
|
|
4347
4347
|
if (!s || !t)
|
|
4348
4348
|
return;
|
|
4349
4349
|
const l = new AbortController();
|
|
4350
4350
|
async function a(u) {
|
|
4351
4351
|
try {
|
|
4352
|
-
const d = await
|
|
4352
|
+
const d = await Ba(u, t, l.signal, e);
|
|
4353
4353
|
d && i(d);
|
|
4354
4354
|
} catch (d) {
|
|
4355
4355
|
if (d instanceof Error && d.name === "AbortError")
|
|
@@ -4361,7 +4361,7 @@ function La(t, e, n) {
|
|
|
4361
4361
|
};
|
|
4362
4362
|
}, [t, e, n]), r;
|
|
4363
4363
|
}
|
|
4364
|
-
async function
|
|
4364
|
+
async function Di(t, e, n) {
|
|
4365
4365
|
try {
|
|
4366
4366
|
const r = await fetch(`${e}/widget/bootstrap`, {
|
|
4367
4367
|
method: "POST",
|
|
@@ -4370,39 +4370,99 @@ async function Bi(t, e, n) {
|
|
|
4370
4370
|
credentials: "omit"
|
|
4371
4371
|
});
|
|
4372
4372
|
if (r.ok) {
|
|
4373
|
-
const i = await r.json();
|
|
4374
|
-
return { ok: !0, token: i.token, excludePaths: i.excludePaths };
|
|
4373
|
+
const i = await r.json(), o = i.allowedUrls ?? (i.allowedUrl ? [i.allowedUrl] : []);
|
|
4374
|
+
return { ok: !0, token: i.token, excludePaths: i.excludePaths, allowedUrls: o };
|
|
4375
4375
|
}
|
|
4376
4376
|
return r.status === 403 ? { ok: !1, error: "unauthorized" } : r.status === 404 ? { ok: !1, error: "not_found" } : r.status === 429 ? { ok: !1, error: "rate_limited", retryAfterSec: Number(r.headers.get("Retry-After")) || 60 } : { ok: !1, error: "network" };
|
|
4377
4377
|
} catch {
|
|
4378
4378
|
return { ok: !1, error: "network" };
|
|
4379
4379
|
}
|
|
4380
4380
|
}
|
|
4381
|
-
function
|
|
4381
|
+
function Ua(t, e) {
|
|
4382
|
+
return e.some((n) => n === "/" ? t === "/" : t === n || t.startsWith(n + "/"));
|
|
4383
|
+
}
|
|
4384
|
+
function wr(t, e) {
|
|
4385
|
+
try {
|
|
4386
|
+
const n = new URL(t), r = new URL(e);
|
|
4387
|
+
if (n.origin !== r.origin)
|
|
4388
|
+
return !1;
|
|
4389
|
+
const i = r.pathname.replace(/\/$/, "");
|
|
4390
|
+
if (!i)
|
|
4391
|
+
return !0;
|
|
4392
|
+
const o = n.pathname.replace(/\/$/, "");
|
|
4393
|
+
return o === i || o.startsWith(i + "/");
|
|
4394
|
+
} catch {
|
|
4395
|
+
return !1;
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4398
|
+
function Qa({
|
|
4399
|
+
orgSlug: t,
|
|
4400
|
+
projSlug: e,
|
|
4401
|
+
preToken: n,
|
|
4402
|
+
convexUrl: r,
|
|
4403
|
+
preAllowedUrls: i,
|
|
4404
|
+
preExcludedPaths: o
|
|
4405
|
+
}) {
|
|
4382
4406
|
T(() => {
|
|
4383
|
-
const
|
|
4384
|
-
if (!
|
|
4407
|
+
const s = r ?? "https://festive-mouse-978.eu-west-1.convex.cloud", l = s ? Qi(s) : void 0;
|
|
4408
|
+
if (!l || !t)
|
|
4385
4409
|
return;
|
|
4386
|
-
|
|
4410
|
+
if (Ui.value = { orgSlug: t, projSlug: e, siteUrl: l }, n) {
|
|
4411
|
+
cn.value = i ?? [], un.value = o ?? [];
|
|
4412
|
+
return;
|
|
4413
|
+
}
|
|
4414
|
+
let a = !1;
|
|
4387
4415
|
return (async () => {
|
|
4388
|
-
const
|
|
4389
|
-
if (!
|
|
4390
|
-
if (
|
|
4391
|
-
le.value =
|
|
4416
|
+
const u = await Di(t, l, e);
|
|
4417
|
+
if (!a)
|
|
4418
|
+
if (u.ok)
|
|
4419
|
+
le.value = u.token, cn.value = u.allowedUrls, un.value = u.excludePaths;
|
|
4392
4420
|
else {
|
|
4393
|
-
const
|
|
4394
|
-
|
|
4395
|
-
`[JexityChat]
|
|
4396
|
-
) :
|
|
4397
|
-
`[JexityChat] Bootstrap rate-limited for ${
|
|
4398
|
-
) : console.error(`[JexityChat] Bootstrap failed: ${
|
|
4421
|
+
const d = e ? `project '${t}/${e}'` : `org '${t}'`;
|
|
4422
|
+
u.error === "unauthorized" ? console.warn(
|
|
4423
|
+
`[JexityChat] Domain not authorized for ${d}. Check the widget's domain rules.`
|
|
4424
|
+
) : u.error === "not_found" ? console.error(`[JexityChat] No active widget config found for ${d}.`) : u.error === "rate_limited" ? console.error(
|
|
4425
|
+
`[JexityChat] Bootstrap rate-limited for ${d}. Retry after ${u.retryAfterSec ?? 60}s.`
|
|
4426
|
+
) : console.error(`[JexityChat] Bootstrap failed: ${u.error}`);
|
|
4399
4427
|
}
|
|
4400
4428
|
})(), () => {
|
|
4401
|
-
|
|
4429
|
+
a = !0;
|
|
4402
4430
|
};
|
|
4403
4431
|
}, [t, e, n, r]);
|
|
4404
4432
|
}
|
|
4405
|
-
const
|
|
4433
|
+
const St = /* @__PURE__ */ new Set();
|
|
4434
|
+
let kr = !1;
|
|
4435
|
+
function Da() {
|
|
4436
|
+
if (kr)
|
|
4437
|
+
return;
|
|
4438
|
+
kr = !0;
|
|
4439
|
+
const t = history.pushState.bind(history), e = history.replaceState.bind(history);
|
|
4440
|
+
history.pushState = function(...n) {
|
|
4441
|
+
t(...n), St.forEach((r) => r());
|
|
4442
|
+
}, history.replaceState = function(...n) {
|
|
4443
|
+
e(...n), St.forEach((r) => r());
|
|
4444
|
+
};
|
|
4445
|
+
}
|
|
4446
|
+
function Va(t) {
|
|
4447
|
+
return St.add(t), window.addEventListener("popstate", t), Da(), () => {
|
|
4448
|
+
St.delete(t), window.removeEventListener("popstate", t);
|
|
4449
|
+
};
|
|
4450
|
+
}
|
|
4451
|
+
function Ha() {
|
|
4452
|
+
const t = Te(window.location.href);
|
|
4453
|
+
T(() => Va(() => {
|
|
4454
|
+
t.value = window.location.href;
|
|
4455
|
+
}), []);
|
|
4456
|
+
const e = cn.value, n = un.value, r = new URL(t.value).pathname, i = Ua(r, n);
|
|
4457
|
+
return T(() => {
|
|
4458
|
+
i ? console.warn(
|
|
4459
|
+
`[JexityChat] Widget hidden — current path is in the exclude list: ${r}`
|
|
4460
|
+
) : e.length > 0 && !e.some((o) => wr(t.value, o)) && console.warn(
|
|
4461
|
+
`[JexityChat] Widget hidden — current page does not match path rule. Allowed: ${e.join(", ")}`
|
|
4462
|
+
);
|
|
4463
|
+
}, [t.value, e, n]), i ? !1 : e.length === 0 ? !0 : e.some((o) => wr(t.value, o));
|
|
4464
|
+
}
|
|
4465
|
+
const Vi = {
|
|
4406
4466
|
title: "Assistant",
|
|
4407
4467
|
statusOnline: "Online · Responds in seconds",
|
|
4408
4468
|
inputPlaceholder: "Type a message…",
|
|
@@ -4449,7 +4509,8 @@ const Fi = {
|
|
|
4449
4509
|
escalationSubmit: "Send to team",
|
|
4450
4510
|
escalationSubmitting: "Sending…",
|
|
4451
4511
|
escalationSubmitted: "Request submitted",
|
|
4452
|
-
escalationConsent: "
|
|
4512
|
+
escalationConsent: "By submitting, you agree to our",
|
|
4513
|
+
escalationPrivacyLinkText: "Privacy Policy",
|
|
4453
4514
|
escalationSkip: "Skip, I’ll wait here",
|
|
4454
4515
|
escalationPromptTitle: "Talk to our team",
|
|
4455
4516
|
escalationPromptSubtitle: "We can notify you by email when our team replies.",
|
|
@@ -4485,8 +4546,10 @@ Use it to resume this conversation from any device.`,
|
|
|
4485
4546
|
noticeAgentHandling: "Your conversation is with a human agent who will respond shortly.",
|
|
4486
4547
|
replyTo: "Reply to {name}",
|
|
4487
4548
|
sourcesCountOne: "{count} source",
|
|
4488
|
-
sourcesCountOther: "{count} sources"
|
|
4489
|
-
|
|
4549
|
+
sourcesCountOther: "{count} sources",
|
|
4550
|
+
privacyNoticePre: "By chatting, you agree to our",
|
|
4551
|
+
privacyPolicyLinkText: "Privacy Policy"
|
|
4552
|
+
}, Wa = {
|
|
4490
4553
|
title: "Assistent",
|
|
4491
4554
|
statusOnline: "Online · Antwortet in Sekunden",
|
|
4492
4555
|
inputPlaceholder: "Nachricht eingeben…",
|
|
@@ -4533,7 +4596,8 @@ Use it to resume this conversation from any device.`,
|
|
|
4533
4596
|
escalationSubmit: "An Team senden",
|
|
4534
4597
|
escalationSubmitting: "Wird gesendet…",
|
|
4535
4598
|
escalationSubmitted: "Anfrage gesendet",
|
|
4536
|
-
escalationConsent: "
|
|
4599
|
+
escalationConsent: "Mit dem Absenden stimmen Sie unserer",
|
|
4600
|
+
escalationPrivacyLinkText: "Datenschutzerklärung",
|
|
4537
4601
|
escalationSkip: "Überspringen, ich warte hier",
|
|
4538
4602
|
escalationPromptTitle: "Sprechen Sie mit unserem Team",
|
|
4539
4603
|
escalationPromptSubtitle: "Wir benachrichtigen Sie per E-Mail, wenn wir antworten.",
|
|
@@ -4569,135 +4633,137 @@ Verwenden Sie sie, um diese Unterhaltung auf jedem Gerät fortzusetzen.`,
|
|
|
4569
4633
|
noticeAgentHandling: "Ihre Unterhaltung wird von einem menschlichen Mitarbeiter betreut, der in Kürze antwortet.",
|
|
4570
4634
|
replyTo: "Antworten an {name}",
|
|
4571
4635
|
sourcesCountOne: "{count} Quelle",
|
|
4572
|
-
sourcesCountOther: "{count} Quellen"
|
|
4573
|
-
|
|
4636
|
+
sourcesCountOther: "{count} Quellen",
|
|
4637
|
+
privacyNoticePre: "Mit dem Chatten stimmst du unserer",
|
|
4638
|
+
privacyPolicyLinkText: "Datenschutzerklärung"
|
|
4639
|
+
}, Ja = [
|
|
4574
4640
|
{ value: "de", label: "Deutsch", flag: "🇩🇪" },
|
|
4575
4641
|
{ value: "en", label: "English", flag: "🇬🇧" }
|
|
4576
|
-
],
|
|
4642
|
+
], Ga = "de", Ka = "jex-locale", An = A("de"), Za = { en: Vi, de: Wa };
|
|
4577
4643
|
function R() {
|
|
4578
|
-
return
|
|
4644
|
+
return Za[An.value] ?? Vi;
|
|
4579
4645
|
}
|
|
4580
|
-
function
|
|
4646
|
+
function Wt(t) {
|
|
4581
4647
|
if (!t)
|
|
4582
4648
|
return null;
|
|
4583
4649
|
const e = (t.split("-")[0] ?? "").toLowerCase();
|
|
4584
|
-
return
|
|
4650
|
+
return Ja.some((r) => r.value === e) ? e : null;
|
|
4585
4651
|
}
|
|
4586
|
-
function
|
|
4587
|
-
const e =
|
|
4652
|
+
function Hi(t) {
|
|
4653
|
+
const e = Wt(t);
|
|
4588
4654
|
if (e)
|
|
4589
4655
|
return e;
|
|
4590
4656
|
try {
|
|
4591
|
-
const n =
|
|
4657
|
+
const n = Wt(localStorage.getItem(Ka));
|
|
4592
4658
|
if (n)
|
|
4593
4659
|
return n;
|
|
4594
4660
|
} catch {
|
|
4595
4661
|
}
|
|
4596
4662
|
if (typeof navigator < "u") {
|
|
4597
|
-
const n =
|
|
4663
|
+
const n = Wt(navigator.language);
|
|
4598
4664
|
if (n)
|
|
4599
4665
|
return n;
|
|
4600
4666
|
}
|
|
4601
|
-
return
|
|
4667
|
+
return Ga;
|
|
4602
4668
|
}
|
|
4603
|
-
function
|
|
4669
|
+
function Ya(t) {
|
|
4604
4670
|
T(() => {
|
|
4605
4671
|
function e(n) {
|
|
4606
4672
|
const r = t ?? window.location.origin;
|
|
4607
4673
|
if (n.origin !== r || n.data?.type !== "jexity:config")
|
|
4608
4674
|
return;
|
|
4609
4675
|
const { locale: i } = n.data.payload;
|
|
4610
|
-
i && (
|
|
4676
|
+
i && (An.value = Hi(i));
|
|
4611
4677
|
}
|
|
4612
4678
|
return window.addEventListener("message", e), () => {
|
|
4613
4679
|
window.removeEventListener("message", e);
|
|
4614
4680
|
};
|
|
4615
4681
|
}, [t]);
|
|
4616
4682
|
}
|
|
4617
|
-
const
|
|
4618
|
-
function
|
|
4683
|
+
const Wi = "jex-session-history", Ji = Wi, Gi = 3600 * 1e3, N = A([]), xe = A(null), Ki = ln(() => N.value.length > 0), Ke = A(null);
|
|
4684
|
+
function Xa() {
|
|
4619
4685
|
return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
4620
4686
|
}
|
|
4621
|
-
function
|
|
4687
|
+
function el(t) {
|
|
4622
4688
|
try {
|
|
4623
|
-
const e = sessionStorage.getItem(
|
|
4689
|
+
const e = sessionStorage.getItem(Ji);
|
|
4624
4690
|
if (!e)
|
|
4625
4691
|
return [];
|
|
4626
4692
|
const n = JSON.parse(e);
|
|
4627
|
-
return n.v !== 1 || !Array.isArray(n.entries) ? [] : n.entries.filter((r) => t - r.lastActivityAt <=
|
|
4693
|
+
return n.v !== 1 || !Array.isArray(n.entries) ? [] : n.entries.filter((r) => t - r.lastActivityAt <= Gi);
|
|
4628
4694
|
} catch {
|
|
4629
4695
|
return [];
|
|
4630
4696
|
}
|
|
4631
4697
|
}
|
|
4632
|
-
function
|
|
4698
|
+
function Lt(t) {
|
|
4633
4699
|
try {
|
|
4634
4700
|
const e = { v: 1, entries: t };
|
|
4635
|
-
sessionStorage.setItem(
|
|
4701
|
+
sessionStorage.setItem(Ji, JSON.stringify(e));
|
|
4636
4702
|
} catch {
|
|
4637
4703
|
}
|
|
4638
4704
|
}
|
|
4639
|
-
function
|
|
4640
|
-
const t = Date.now(), e =
|
|
4641
|
-
N.value = e,
|
|
4705
|
+
function tl() {
|
|
4706
|
+
const t = Date.now(), e = el(t);
|
|
4707
|
+
N.value = e, Lt(e), xe.value = e[e.length - 1]?.ref ?? null;
|
|
4642
4708
|
}
|
|
4643
|
-
function
|
|
4644
|
-
const t =
|
|
4645
|
-
return N.value = n, xe.value = t,
|
|
4709
|
+
function jr() {
|
|
4710
|
+
const t = Xa(), e = Date.now(), n = [...N.value, { ref: t, startedAt: e, lastActivityAt: e }];
|
|
4711
|
+
return N.value = n, xe.value = t, Lt(n), t;
|
|
4646
4712
|
}
|
|
4647
|
-
function
|
|
4713
|
+
function Sr(t) {
|
|
4648
4714
|
const e = Date.now(), n = N.value.map(
|
|
4649
4715
|
(r) => r.ref === t ? { ...r, lastActivityAt: e } : r
|
|
4650
4716
|
);
|
|
4651
|
-
N.value = n, xe.value = t,
|
|
4717
|
+
N.value = n, xe.value = t, Lt(n);
|
|
4652
4718
|
}
|
|
4653
|
-
function
|
|
4719
|
+
function $n(t) {
|
|
4654
4720
|
if (!t)
|
|
4655
4721
|
return;
|
|
4656
4722
|
const e = Date.now(), n = N.value.map(
|
|
4657
4723
|
(r) => r.ref === t ? { ...r, lastActivityAt: e } : r
|
|
4658
4724
|
);
|
|
4659
|
-
N.value = n,
|
|
4725
|
+
N.value = n, Lt(n);
|
|
4660
4726
|
}
|
|
4661
|
-
const z =
|
|
4662
|
-
function
|
|
4663
|
-
return
|
|
4727
|
+
const z = A(Zi());
|
|
4728
|
+
function Zi() {
|
|
4729
|
+
return Ki.value ? [{ id: "home" }] : [{ id: "chat" }];
|
|
4664
4730
|
}
|
|
4665
|
-
function
|
|
4666
|
-
z.value =
|
|
4731
|
+
function nl() {
|
|
4732
|
+
z.value = Zi();
|
|
4667
4733
|
}
|
|
4668
|
-
const
|
|
4734
|
+
const rl = A("screen");
|
|
4669
4735
|
function pe(t) {
|
|
4670
4736
|
z.value = [...z.value, t];
|
|
4671
4737
|
}
|
|
4672
|
-
function
|
|
4738
|
+
function Ct() {
|
|
4673
4739
|
z.value.length > 1 && (z.value = z.value.slice(0, -1));
|
|
4674
4740
|
}
|
|
4675
|
-
function
|
|
4741
|
+
function hn(t) {
|
|
4676
4742
|
z.value = [...z.value.slice(0, -1), t];
|
|
4677
4743
|
}
|
|
4678
|
-
const
|
|
4679
|
-
function
|
|
4680
|
-
return
|
|
4681
|
-
|
|
4744
|
+
const il = 6e4, nt = A(!1), dn = A(!1), fn = /* @__PURE__ */ new Set();
|
|
4745
|
+
function ol(t) {
|
|
4746
|
+
return fn.add(t), () => {
|
|
4747
|
+
fn.delete(t);
|
|
4682
4748
|
};
|
|
4683
4749
|
}
|
|
4684
|
-
function
|
|
4750
|
+
function sl() {
|
|
4685
4751
|
const t = xe.value;
|
|
4686
4752
|
return t ? N.value.find((n) => n.ref === t)?.lastActivityAt ?? null : null;
|
|
4687
4753
|
}
|
|
4688
|
-
function
|
|
4689
|
-
const e =
|
|
4754
|
+
function al(t) {
|
|
4755
|
+
const e = sl();
|
|
4690
4756
|
return e === null ? !1 : Date.now() - e > t;
|
|
4691
4757
|
}
|
|
4692
|
-
function
|
|
4758
|
+
function Cr() {
|
|
4693
4759
|
if (!(nt.value && N.value.length === 0)) {
|
|
4694
4760
|
N.value = [], xe.value = null;
|
|
4695
4761
|
try {
|
|
4696
|
-
sessionStorage.removeItem(
|
|
4762
|
+
sessionStorage.removeItem(Wi);
|
|
4697
4763
|
} catch (t) {
|
|
4698
4764
|
console.warn("[JexityChat] Idle-lock storage clear failed:", t);
|
|
4699
4765
|
}
|
|
4700
|
-
for (const t of
|
|
4766
|
+
for (const t of fn)
|
|
4701
4767
|
try {
|
|
4702
4768
|
t();
|
|
4703
4769
|
} catch (e) {
|
|
@@ -4706,27 +4772,27 @@ function _r() {
|
|
|
4706
4772
|
z.value = [{ id: "home" }], nt.value = !0;
|
|
4707
4773
|
}
|
|
4708
4774
|
}
|
|
4709
|
-
function
|
|
4775
|
+
function Jt() {
|
|
4710
4776
|
nt.value && (nt.value = !1);
|
|
4711
4777
|
}
|
|
4712
|
-
function
|
|
4778
|
+
function ll(t = Gi) {
|
|
4713
4779
|
let e = null;
|
|
4714
4780
|
const n = () => {
|
|
4715
4781
|
if (document.visibilityState === "hidden") {
|
|
4716
4782
|
e = Date.now();
|
|
4717
4783
|
return;
|
|
4718
4784
|
}
|
|
4719
|
-
e !== null && Date.now() - e > t &&
|
|
4785
|
+
e !== null && Date.now() - e > t && Cr(), e = null;
|
|
4720
4786
|
};
|
|
4721
4787
|
document.addEventListener("visibilitychange", n);
|
|
4722
4788
|
const r = setInterval(() => {
|
|
4723
|
-
|
|
4724
|
-
},
|
|
4789
|
+
dn.value || al(t) && Cr();
|
|
4790
|
+
}, il);
|
|
4725
4791
|
return () => {
|
|
4726
4792
|
document.removeEventListener("visibilitychange", n), clearInterval(r), e = null;
|
|
4727
4793
|
};
|
|
4728
4794
|
}
|
|
4729
|
-
function
|
|
4795
|
+
function cl(t) {
|
|
4730
4796
|
const e = {}, { primaryColor: n, theme: r } = t;
|
|
4731
4797
|
if (n && (e["--jex-primary"] = n, e["--jex-bg-trigger"] = n, e["--jex-bg-header"] = n, e["--jex-bg-msg-user"] = n, e["--jex-bg-send-btn"] = n), t.accentColor && (e["--jex-accent"] = t.accentColor), r?.bg) {
|
|
4732
4798
|
const i = r.bg;
|
|
@@ -4742,7 +4808,7 @@ function el(t) {
|
|
|
4742
4808
|
}
|
|
4743
4809
|
return t.fontFamily && (e["--jex-font-family"] = t.fontFamily), t.fontSize && (e["--jex-font-size"] = `${t.fontSize}px`), t.borderRadius && (e["--jex-radius"] = t.borderRadius), t.windowWidth && (e["--jex-window-width"] = `${t.windowWidth}px`), t.windowHeight && (e["--jex-window-height"] = `${t.windowHeight}px`), Object.keys(e).length > 0 ? e : void 0;
|
|
4744
4810
|
}
|
|
4745
|
-
function
|
|
4811
|
+
function En({ size: t = 24 }) {
|
|
4746
4812
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
4747
4813
|
/* @__PURE__ */ c("path", { d: "M12 8V4H8" }),
|
|
4748
4814
|
/* @__PURE__ */ c("rect", { width: "16", height: "12", x: "4", y: "8", rx: "2" }),
|
|
@@ -4752,32 +4818,32 @@ function Rn({ size: t = 24 }) {
|
|
|
4752
4818
|
/* @__PURE__ */ c("path", { d: "M9 13v2" })
|
|
4753
4819
|
] });
|
|
4754
4820
|
}
|
|
4755
|
-
function
|
|
4821
|
+
function ul() {
|
|
4756
4822
|
const t = R();
|
|
4757
4823
|
return z.value.length > 1 ? /* @__PURE__ */ c(
|
|
4758
4824
|
"button",
|
|
4759
4825
|
{
|
|
4760
4826
|
class: "jex-header-back",
|
|
4761
|
-
onClick:
|
|
4827
|
+
onClick: Ct,
|
|
4762
4828
|
"aria-label": t.back || "Go back",
|
|
4763
4829
|
children: /* @__PURE__ */ c("svg", { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ c("path", { d: "m15 18-6-6 6-6" }) })
|
|
4764
4830
|
}
|
|
4765
|
-
) : /* @__PURE__ */ c(
|
|
4831
|
+
) : /* @__PURE__ */ c(En, { size: 24 });
|
|
4766
4832
|
}
|
|
4767
|
-
function
|
|
4833
|
+
function hl({ title: t }) {
|
|
4768
4834
|
const e = R();
|
|
4769
4835
|
return /* @__PURE__ */ c("div", { class: "jex-header-info", children: [
|
|
4770
4836
|
/* @__PURE__ */ c("h3", { children: t }),
|
|
4771
4837
|
/* @__PURE__ */ c("p", { children: e.statusOnline })
|
|
4772
4838
|
] });
|
|
4773
4839
|
}
|
|
4774
|
-
function
|
|
4840
|
+
function Yi({ size: t = 28 }) {
|
|
4775
4841
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
4776
4842
|
/* @__PURE__ */ c("path", { d: "M18 6 6 18" }),
|
|
4777
4843
|
/* @__PURE__ */ c("path", { d: "m6 6 12 12" })
|
|
4778
4844
|
] });
|
|
4779
4845
|
}
|
|
4780
|
-
function
|
|
4846
|
+
function dl() {
|
|
4781
4847
|
const t = R();
|
|
4782
4848
|
return /* @__PURE__ */ c(
|
|
4783
4849
|
"button",
|
|
@@ -4785,31 +4851,31 @@ function rl() {
|
|
|
4785
4851
|
class: "jex-header-close",
|
|
4786
4852
|
type: "button",
|
|
4787
4853
|
onClick: () => {
|
|
4788
|
-
|
|
4854
|
+
P.value = !1;
|
|
4789
4855
|
},
|
|
4790
4856
|
"aria-label": t.closeChatAriaLabel,
|
|
4791
4857
|
title: t.closeChatAriaLabel,
|
|
4792
|
-
children: /* @__PURE__ */ c(
|
|
4858
|
+
children: /* @__PURE__ */ c(Yi, { size: 18 })
|
|
4793
4859
|
}
|
|
4794
4860
|
);
|
|
4795
4861
|
}
|
|
4796
|
-
function
|
|
4862
|
+
function fl({ action: t, showClose: e = !0 }) {
|
|
4797
4863
|
return !t && !e ? null : /* @__PURE__ */ c("div", { class: "jex-header-right", children: [
|
|
4798
4864
|
t,
|
|
4799
|
-
e && /* @__PURE__ */ c(
|
|
4865
|
+
e && /* @__PURE__ */ c(dl, {})
|
|
4800
4866
|
] });
|
|
4801
4867
|
}
|
|
4802
|
-
function
|
|
4868
|
+
function Tr({ title: t, rightAction: e, showClose: n = !0 }) {
|
|
4803
4869
|
return /* @__PURE__ */ c("header", { class: "jex-chat-header", children: [
|
|
4804
|
-
/* @__PURE__ */ c(
|
|
4805
|
-
/* @__PURE__ */ c(
|
|
4806
|
-
/* @__PURE__ */ c(
|
|
4870
|
+
/* @__PURE__ */ c(ul, {}),
|
|
4871
|
+
/* @__PURE__ */ c(hl, { title: t }),
|
|
4872
|
+
/* @__PURE__ */ c(fl, { action: e, showClose: n })
|
|
4807
4873
|
] });
|
|
4808
4874
|
}
|
|
4809
|
-
function
|
|
4875
|
+
function pl({ size: t = 14 }) {
|
|
4810
4876
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ c("path", { d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" }) });
|
|
4811
4877
|
}
|
|
4812
|
-
function
|
|
4878
|
+
function Rr() {
|
|
4813
4879
|
return /* @__PURE__ */ c("div", { class: "jex-widget-footer", children: /* @__PURE__ */ c(
|
|
4814
4880
|
"a",
|
|
4815
4881
|
{
|
|
@@ -4818,7 +4884,7 @@ function kr() {
|
|
|
4818
4884
|
rel: "noopener noreferrer",
|
|
4819
4885
|
class: "jex-branding",
|
|
4820
4886
|
children: [
|
|
4821
|
-
/* @__PURE__ */ c(
|
|
4887
|
+
/* @__PURE__ */ c(pl, { size: 14 }),
|
|
4822
4888
|
/* @__PURE__ */ c("span", { children: [
|
|
4823
4889
|
"Powered by ",
|
|
4824
4890
|
/* @__PURE__ */ c("strong", { children: "Jexity" })
|
|
@@ -4827,10 +4893,10 @@ function kr() {
|
|
|
4827
4893
|
}
|
|
4828
4894
|
) });
|
|
4829
4895
|
}
|
|
4830
|
-
function
|
|
4896
|
+
function Xi({ size: t = 28 }) {
|
|
4831
4897
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: /* @__PURE__ */ c("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) });
|
|
4832
4898
|
}
|
|
4833
|
-
function
|
|
4899
|
+
function gl({ size: t = 24, ...e }) {
|
|
4834
4900
|
return /* @__PURE__ */ c(
|
|
4835
4901
|
"svg",
|
|
4836
4902
|
{
|
|
@@ -4847,53 +4913,53 @@ function sl({ size: t = 24, ...e }) {
|
|
|
4847
4913
|
}
|
|
4848
4914
|
);
|
|
4849
4915
|
}
|
|
4850
|
-
const
|
|
4851
|
-
chat: /* @__PURE__ */ c(
|
|
4852
|
-
bot: /* @__PURE__ */ c(
|
|
4853
|
-
sparkles: /* @__PURE__ */ c(
|
|
4854
|
-
},
|
|
4916
|
+
const ml = {
|
|
4917
|
+
chat: /* @__PURE__ */ c(Xi, { size: 28 }),
|
|
4918
|
+
bot: /* @__PURE__ */ c(En, { size: 28 }),
|
|
4919
|
+
sparkles: /* @__PURE__ */ c(gl, { size: 28 })
|
|
4920
|
+
}, xl = {
|
|
4855
4921
|
none: "0px",
|
|
4856
4922
|
sm: "0.5rem",
|
|
4857
4923
|
md: "0.75rem",
|
|
4858
4924
|
lg: "1.25rem",
|
|
4859
4925
|
full: "9999px"
|
|
4860
4926
|
};
|
|
4861
|
-
function
|
|
4927
|
+
function bl({ radius: t = "full", iconOption: e = "chat", label: n }) {
|
|
4862
4928
|
const r = R(), i = n ?? r.fabLabel, o = i !== "";
|
|
4863
4929
|
return /* @__PURE__ */ c(
|
|
4864
4930
|
"button",
|
|
4865
4931
|
{
|
|
4866
|
-
class: `jex-floating-button ${!
|
|
4867
|
-
style: { borderRadius:
|
|
4932
|
+
class: `jex-floating-button ${!P.value && o ? "jex-has-label" : ""}`,
|
|
4933
|
+
style: { borderRadius: xl[t] ?? "9999px" },
|
|
4868
4934
|
onClick: () => {
|
|
4869
|
-
|
|
4935
|
+
P.value = !P.value;
|
|
4870
4936
|
},
|
|
4871
|
-
"aria-label":
|
|
4872
|
-
children:
|
|
4873
|
-
|
|
4937
|
+
"aria-label": P.value ? r.closeChatAriaLabel : r.openChatAriaLabel,
|
|
4938
|
+
children: P.value ? /* @__PURE__ */ c(Yi, { size: 28 }) : /* @__PURE__ */ c("div", { class: "jex-fab-inner", children: [
|
|
4939
|
+
ml[e],
|
|
4874
4940
|
o && /* @__PURE__ */ c("span", { class: "jex-fab-label", children: i })
|
|
4875
4941
|
] })
|
|
4876
4942
|
}
|
|
4877
4943
|
);
|
|
4878
4944
|
}
|
|
4879
|
-
function
|
|
4945
|
+
function yl({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
4880
4946
|
const r = R(), [i, o] = C("");
|
|
4881
4947
|
function s() {
|
|
4882
|
-
|
|
4948
|
+
Jt(), Ke.value = "fresh", n(), e(), pe({ id: "chat" });
|
|
4883
4949
|
}
|
|
4884
4950
|
function l(u) {
|
|
4885
|
-
|
|
4951
|
+
Jt(), Ke.value = "resume", n(), Sr(u), pe({ id: "chat" });
|
|
4886
4952
|
}
|
|
4887
4953
|
function a(u) {
|
|
4888
4954
|
u.preventDefault();
|
|
4889
4955
|
const d = i.trim().toUpperCase();
|
|
4890
|
-
d && (
|
|
4956
|
+
d && (Jt(), Ke.value = "resume", n(), Sr(d), pe({ id: "chat" }));
|
|
4891
4957
|
}
|
|
4892
4958
|
return /* @__PURE__ */ c("div", { class: "jex-home", children: [
|
|
4893
4959
|
nt.value && /* @__PURE__ */ c("div", { class: "jex-session-prompt", role: "status", children: /* @__PURE__ */ c("div", { class: "jex-session-prompt-text", children: r.sessionLocked }) }),
|
|
4894
4960
|
/* @__PURE__ */ c("div", { class: "jex-home-hero", children: [
|
|
4895
4961
|
/* @__PURE__ */ c("div", { class: "jex-home-avatar", children: [
|
|
4896
|
-
/* @__PURE__ */ c(
|
|
4962
|
+
/* @__PURE__ */ c(Xi, { size: 24 }),
|
|
4897
4963
|
/* @__PURE__ */ c("span", { class: "jex-home-status-dot" })
|
|
4898
4964
|
] }),
|
|
4899
4965
|
/* @__PURE__ */ c("div", { class: "jex-home-hero-text", children: [
|
|
@@ -4947,7 +5013,7 @@ function ul({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
|
4947
5013
|
] })
|
|
4948
5014
|
] });
|
|
4949
5015
|
}
|
|
4950
|
-
function
|
|
5016
|
+
function vl({ title: t }) {
|
|
4951
5017
|
const e = R();
|
|
4952
5018
|
return /* @__PURE__ */ c("div", { class: "jex-selection", children: [
|
|
4953
5019
|
/* @__PURE__ */ c("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
|
|
@@ -4979,17 +5045,17 @@ function hl({ title: t }) {
|
|
|
4979
5045
|
] })
|
|
4980
5046
|
] });
|
|
4981
5047
|
}
|
|
4982
|
-
const
|
|
4983
|
-
const
|
|
4984
|
-
const
|
|
5048
|
+
const _l = (...t) => t.filter((e, n, r) => !!e && e.trim() !== "" && r.indexOf(e) === n).join(" ").trim();
|
|
5049
|
+
const Ar = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
5050
|
+
const wl = (t) => t.replace(
|
|
4985
5051
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
4986
5052
|
(e, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
4987
5053
|
);
|
|
4988
|
-
const
|
|
4989
|
-
const e =
|
|
5054
|
+
const $r = (t) => {
|
|
5055
|
+
const e = wl(t);
|
|
4990
5056
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
4991
5057
|
};
|
|
4992
|
-
var
|
|
5058
|
+
var kl = {
|
|
4993
5059
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4994
5060
|
width: 24,
|
|
4995
5061
|
height: 24,
|
|
@@ -5000,13 +5066,13 @@ var pl = {
|
|
|
5000
5066
|
"stroke-linecap": "round",
|
|
5001
5067
|
"stroke-linejoin": "round"
|
|
5002
5068
|
};
|
|
5003
|
-
const
|
|
5069
|
+
const jl = (t) => {
|
|
5004
5070
|
for (const e in t)
|
|
5005
5071
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
5006
5072
|
return !0;
|
|
5007
5073
|
return !1;
|
|
5008
5074
|
};
|
|
5009
|
-
const
|
|
5075
|
+
const Sl = ({
|
|
5010
5076
|
color: t = "currentColor",
|
|
5011
5077
|
size: e = 24,
|
|
5012
5078
|
strokeWidth: n = 2,
|
|
@@ -5018,87 +5084,87 @@ const ml = ({
|
|
|
5018
5084
|
}) => V(
|
|
5019
5085
|
"svg",
|
|
5020
5086
|
{
|
|
5021
|
-
...
|
|
5087
|
+
...kl,
|
|
5022
5088
|
width: String(e),
|
|
5023
5089
|
height: e,
|
|
5024
5090
|
stroke: t,
|
|
5025
5091
|
"stroke-width": r ? Number(n) * 24 / Number(e) : n,
|
|
5026
5092
|
class: ["lucide", s].join(" "),
|
|
5027
|
-
...!i && !
|
|
5093
|
+
...!i && !jl(l) && { "aria-hidden": "true" },
|
|
5028
5094
|
...l
|
|
5029
5095
|
},
|
|
5030
5096
|
[...o.map(([a, u]) => V(a, u)), ...ne(i)]
|
|
5031
5097
|
);
|
|
5032
|
-
const
|
|
5098
|
+
const Cl = (t, e) => {
|
|
5033
5099
|
const n = ({ class: r = "", className: i = "", children: o, ...s }) => V(
|
|
5034
|
-
|
|
5100
|
+
Sl,
|
|
5035
5101
|
{
|
|
5036
5102
|
...s,
|
|
5037
5103
|
iconNode: e,
|
|
5038
|
-
class:
|
|
5039
|
-
`lucide-${
|
|
5040
|
-
`lucide-${
|
|
5104
|
+
class: _l(
|
|
5105
|
+
`lucide-${Ar($r(t))}`,
|
|
5106
|
+
`lucide-${Ar(t)}`,
|
|
5041
5107
|
r,
|
|
5042
5108
|
i
|
|
5043
5109
|
)
|
|
5044
5110
|
},
|
|
5045
5111
|
o
|
|
5046
5112
|
);
|
|
5047
|
-
return n.displayName =
|
|
5113
|
+
return n.displayName = $r(t), n;
|
|
5048
5114
|
};
|
|
5049
|
-
const
|
|
5115
|
+
const Tl = Cl("corner-up-left", [
|
|
5050
5116
|
["path", { d: "M20 20v-7a4 4 0 0 0-4-4H4", key: "1nkjon" }],
|
|
5051
5117
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }]
|
|
5052
5118
|
]);
|
|
5053
|
-
function
|
|
5119
|
+
function In() {
|
|
5054
5120
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
5055
5121
|
}
|
|
5056
|
-
var ve =
|
|
5057
|
-
function
|
|
5122
|
+
var ve = In();
|
|
5123
|
+
function eo(t) {
|
|
5058
5124
|
ve = t;
|
|
5059
5125
|
}
|
|
5060
5126
|
var de = { exec: () => null };
|
|
5061
5127
|
function _(t, e = "") {
|
|
5062
5128
|
let n = typeof t == "string" ? t : t.source, r = { replace: (i, o) => {
|
|
5063
5129
|
let s = typeof o == "string" ? o : o.source;
|
|
5064
|
-
return s = s.replace(
|
|
5130
|
+
return s = s.replace(M.caret, "$1"), n = n.replace(i, s), r;
|
|
5065
5131
|
}, getRegex: () => new RegExp(n, e) };
|
|
5066
5132
|
return r;
|
|
5067
5133
|
}
|
|
5068
|
-
var
|
|
5134
|
+
var Rl = (() => {
|
|
5069
5135
|
try {
|
|
5070
5136
|
return !!new RegExp("(?<=1)(?<!1)");
|
|
5071
5137
|
} catch {
|
|
5072
5138
|
return !1;
|
|
5073
5139
|
}
|
|
5074
|
-
})(),
|
|
5075
|
-
]`).replace("lheading",
|
|
5140
|
+
})(), M = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) }, Al = /^(?:[ \t]*(?:\n|$))+/, $l = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, El = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, lt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Il = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Pn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, to = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, no = _(to).replace(/bull/g, Pn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Pl = _(to).replace(/bull/g, Pn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Ln = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ll = /^[^\n]+/, Mn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Ml = _(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Mn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), ql = _(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Pn).getRegex(), Mt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", qn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ol = _("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", qn).replace("tag", Mt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), ro = _(Ln).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex(), Nl = _(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", ro).getRegex(), On = { blockquote: Nl, code: $l, def: Ml, fences: El, heading: Il, hr: lt, html: Ol, lheading: no, list: ql, newline: Al, paragraph: ro, table: de, text: Ll }, Er = _("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex(), zl = { ...On, lheading: Pl, table: Er, paragraph: _(Ln).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex() }, Bl = { ...On, html: _(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", qn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: de, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: _(Ln).replace("hr", lt).replace("heading", ` *#{1,6} *[^
|
|
5141
|
+
]`).replace("lheading", no).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Fl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ul = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, io = /^( {2,}|\\)\n(?!\s*$)/, Ql = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ne = /[\p{P}\p{S}]/u, qt = /[\s\p{P}\p{S}]/u, Nn = /[^\s\p{P}\p{S}]/u, Dl = _(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, qt).getRegex(), oo = /(?!~)[\p{P}\p{S}]/u, Vl = /(?!~)[\s\p{P}\p{S}]/u, Hl = /(?:[^\s\p{P}\p{S}]|~)/u, Wl = _(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Rl ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), so = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Jl = _(so, "u").replace(/punct/g, Ne).getRegex(), Gl = _(so, "u").replace(/punct/g, oo).getRegex(), ao = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Kl = _(ao, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), Zl = _(ao, "gu").replace(/notPunctSpace/g, Hl).replace(/punctSpace/g, Vl).replace(/punct/g, oo).getRegex(), Yl = _("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), Xl = _(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ne).getRegex(), ec = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", tc = _(ec, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, qt).replace(/punct/g, Ne).getRegex(), nc = _(/\\(punct)/, "gu").replace(/punct/g, Ne).getRegex(), rc = _(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), ic = _(qn).replace("(?:-->|$)", "-->").getRegex(), oc = _("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", ic).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Tt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, sc = _(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Tt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), lo = _(/^!?\[(label)\]\[(ref)\]/).replace("label", Tt).replace("ref", Mn).getRegex(), co = _(/^!?\[(ref)\](?:\[\])?/).replace("ref", Mn).getRegex(), ac = _("reflink|nolink(?!\\()", "g").replace("reflink", lo).replace("nolink", co).getRegex(), Ir = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, zn = { _backpedal: de, anyPunctuation: nc, autolink: rc, blockSkip: Wl, br: io, code: Ul, del: de, delLDelim: de, delRDelim: de, emStrongLDelim: Jl, emStrongRDelimAst: Kl, emStrongRDelimUnd: Yl, escape: Fl, link: sc, nolink: co, punctuation: Dl, reflink: lo, reflinkSearch: ac, tag: oc, text: Ql, url: de }, lc = { ...zn, link: _(/^!?\[(label)\]\((.*?)\)/).replace("label", Tt).getRegex(), reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Tt).getRegex() }, pn = { ...zn, emStrongRDelimAst: Zl, emStrongLDelim: Gl, delLDelim: Xl, delRDelim: tc, url: _(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ir).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: _(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ir).getRegex() }, cc = { ...pn, br: _(io).replace("{2,}", "*").getRegex(), text: _(pn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, pt = { normal: On, gfm: zl, pedantic: Bl }, Be = { normal: zn, gfm: pn, breaks: cc, pedantic: lc }, uc = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Pr = (t) => uc[t];
|
|
5076
5142
|
function X(t, e) {
|
|
5077
5143
|
if (e) {
|
|
5078
|
-
if (
|
|
5079
|
-
} else if (
|
|
5144
|
+
if (M.escapeTest.test(t)) return t.replace(M.escapeReplace, Pr);
|
|
5145
|
+
} else if (M.escapeTestNoEncode.test(t)) return t.replace(M.escapeReplaceNoEncode, Pr);
|
|
5080
5146
|
return t;
|
|
5081
5147
|
}
|
|
5082
|
-
function
|
|
5148
|
+
function Lr(t) {
|
|
5083
5149
|
try {
|
|
5084
|
-
t = encodeURI(t).replace(
|
|
5150
|
+
t = encodeURI(t).replace(M.percentDecode, "%");
|
|
5085
5151
|
} catch {
|
|
5086
5152
|
return null;
|
|
5087
5153
|
}
|
|
5088
5154
|
return t;
|
|
5089
5155
|
}
|
|
5090
|
-
function
|
|
5091
|
-
let n = t.replace(
|
|
5156
|
+
function Mr(t, e) {
|
|
5157
|
+
let n = t.replace(M.findPipe, (o, s, l) => {
|
|
5092
5158
|
let a = !1, u = s;
|
|
5093
5159
|
for (; --u >= 0 && l[u] === "\\"; ) a = !a;
|
|
5094
5160
|
return a ? "|" : " |";
|
|
5095
|
-
}), r = n.split(
|
|
5161
|
+
}), r = n.split(M.splitPipe), i = 0;
|
|
5096
5162
|
if (r[0].trim() || r.shift(), r.length > 0 && !r.at(-1)?.trim() && r.pop(), e) if (r.length > e) r.splice(e);
|
|
5097
5163
|
else for (; r.length < e; ) r.push("");
|
|
5098
|
-
for (; i < r.length; i++) r[i] = r[i].trim().replace(
|
|
5164
|
+
for (; i < r.length; i++) r[i] = r[i].trim().replace(M.slashPipe, "|");
|
|
5099
5165
|
return r;
|
|
5100
5166
|
}
|
|
5101
|
-
function
|
|
5167
|
+
function Fe(t, e, n) {
|
|
5102
5168
|
let r = t.length;
|
|
5103
5169
|
if (r === 0) return "";
|
|
5104
5170
|
let i = 0;
|
|
@@ -5106,7 +5172,7 @@ function Be(t, e, n) {
|
|
|
5106
5172
|
i++;
|
|
5107
5173
|
return t.slice(0, r - i);
|
|
5108
5174
|
}
|
|
5109
|
-
function
|
|
5175
|
+
function hc(t, e) {
|
|
5110
5176
|
if (t.indexOf(e[1]) === -1) return -1;
|
|
5111
5177
|
let n = 0;
|
|
5112
5178
|
for (let r = 0; r < t.length; r++) if (t[r] === "\\") r++;
|
|
@@ -5114,7 +5180,7 @@ function nc(t, e) {
|
|
|
5114
5180
|
else if (t[r] === e[1] && (n--, n < 0)) return r;
|
|
5115
5181
|
return n > 0 ? -2 : -1;
|
|
5116
5182
|
}
|
|
5117
|
-
function
|
|
5183
|
+
function dc(t, e = 0) {
|
|
5118
5184
|
let n = e, r = "";
|
|
5119
5185
|
for (let i of t) if (i === " ") {
|
|
5120
5186
|
let o = 4 - n % 4;
|
|
@@ -5122,13 +5188,13 @@ function rc(t, e = 0) {
|
|
|
5122
5188
|
} else r += i, n++;
|
|
5123
5189
|
return r;
|
|
5124
5190
|
}
|
|
5125
|
-
function
|
|
5191
|
+
function qr(t, e, n, r, i) {
|
|
5126
5192
|
let o = e.href, s = e.title || null, l = t[1].replace(i.other.outputLinkReplace, "$1");
|
|
5127
5193
|
r.state.inLink = !0;
|
|
5128
5194
|
let a = { type: t[0].charAt(0) === "!" ? "image" : "link", raw: n, href: o, title: s, text: l, tokens: r.inlineTokens(l) };
|
|
5129
5195
|
return r.state.inLink = !1, a;
|
|
5130
5196
|
}
|
|
5131
|
-
function
|
|
5197
|
+
function fc(t, e, n) {
|
|
5132
5198
|
let r = t.match(n.other.indentCodeCompensation);
|
|
5133
5199
|
if (r === null) return e;
|
|
5134
5200
|
let i = r[1];
|
|
@@ -5141,7 +5207,7 @@ function ic(t, e, n) {
|
|
|
5141
5207
|
}).join(`
|
|
5142
5208
|
`);
|
|
5143
5209
|
}
|
|
5144
|
-
var
|
|
5210
|
+
var Rt = class {
|
|
5145
5211
|
options;
|
|
5146
5212
|
rules;
|
|
5147
5213
|
lexer;
|
|
@@ -5156,14 +5222,14 @@ var Tt = class {
|
|
|
5156
5222
|
let e = this.rules.block.code.exec(t);
|
|
5157
5223
|
if (e) {
|
|
5158
5224
|
let n = e[0].replace(this.rules.other.codeRemoveIndent, "");
|
|
5159
|
-
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n :
|
|
5225
|
+
return { type: "code", raw: e[0], codeBlockStyle: "indented", text: this.options.pedantic ? n : Fe(n, `
|
|
5160
5226
|
`) };
|
|
5161
5227
|
}
|
|
5162
5228
|
}
|
|
5163
5229
|
fences(t) {
|
|
5164
5230
|
let e = this.rules.block.fences.exec(t);
|
|
5165
5231
|
if (e) {
|
|
5166
|
-
let n = e[0], r =
|
|
5232
|
+
let n = e[0], r = fc(n, e[3] || "", this.rules);
|
|
5167
5233
|
return { type: "code", raw: n, lang: e[2] ? e[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : e[2], text: r };
|
|
5168
5234
|
}
|
|
5169
5235
|
}
|
|
@@ -5172,7 +5238,7 @@ var Tt = class {
|
|
|
5172
5238
|
if (e) {
|
|
5173
5239
|
let n = e[2].trim();
|
|
5174
5240
|
if (this.rules.other.endingHash.test(n)) {
|
|
5175
|
-
let r =
|
|
5241
|
+
let r = Fe(n, "#");
|
|
5176
5242
|
(this.options.pedantic || !r || this.rules.other.endingSpaceChar.test(r)) && (n = r.trim());
|
|
5177
5243
|
}
|
|
5178
5244
|
return { type: "heading", raw: e[0], depth: e[1].length, text: n, tokens: this.lexer.inline(n) };
|
|
@@ -5180,13 +5246,13 @@ var Tt = class {
|
|
|
5180
5246
|
}
|
|
5181
5247
|
hr(t) {
|
|
5182
5248
|
let e = this.rules.block.hr.exec(t);
|
|
5183
|
-
if (e) return { type: "hr", raw:
|
|
5249
|
+
if (e) return { type: "hr", raw: Fe(e[0], `
|
|
5184
5250
|
`) };
|
|
5185
5251
|
}
|
|
5186
5252
|
blockquote(t) {
|
|
5187
5253
|
let e = this.rules.block.blockquote.exec(t);
|
|
5188
5254
|
if (e) {
|
|
5189
|
-
let n =
|
|
5255
|
+
let n = Fe(e[0], `
|
|
5190
5256
|
`).split(`
|
|
5191
5257
|
`), r = "", i = "", o = [];
|
|
5192
5258
|
for (; n.length > 0; ) {
|
|
@@ -5233,16 +5299,16 @@ ${d}` : d;
|
|
|
5233
5299
|
let a = !1, u = "", d = "";
|
|
5234
5300
|
if (!(e = o.exec(t)) || this.rules.block.hr.test(t)) break;
|
|
5235
5301
|
u = e[0], t = t.substring(u.length);
|
|
5236
|
-
let h =
|
|
5302
|
+
let h = dc(e[2].split(`
|
|
5237
5303
|
`, 1)[0], e[1].length), f = t.split(`
|
|
5238
5304
|
`, 1)[0], p = !h.trim(), g = 0;
|
|
5239
5305
|
if (this.options.pedantic ? (g = 2, d = h.trimStart()) : p ? g = e[1].length + 1 : (g = h.search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, d = h.slice(g), g += e[1].length), p && this.rules.other.blankLine.test(f) && (u += f + `
|
|
5240
5306
|
`, t = t.substring(f.length + 1), a = !0), !a) {
|
|
5241
|
-
let m = this.rules.other.nextBulletRegex(g), x = this.rules.other.hrRegex(g), v = this.rules.other.fencesBeginRegex(g), y = this.rules.other.headingBeginRegex(g), I = this.rules.other.htmlBeginRegex(g),
|
|
5307
|
+
let m = this.rules.other.nextBulletRegex(g), x = this.rules.other.hrRegex(g), v = this.rules.other.fencesBeginRegex(g), y = this.rules.other.headingBeginRegex(g), I = this.rules.other.htmlBeginRegex(g), U = this.rules.other.blockquoteBeginRegex(g);
|
|
5242
5308
|
for (; t; ) {
|
|
5243
5309
|
let H = t.split(`
|
|
5244
5310
|
`, 1)[0], B;
|
|
5245
|
-
if (f = H, this.options.pedantic ? (f = f.replace(this.rules.other.listReplaceNesting, " "), B = f) : B = f.replace(this.rules.other.tabCharGlobal, " "), v.test(f) || y.test(f) || I.test(f) ||
|
|
5311
|
+
if (f = H, this.options.pedantic ? (f = f.replace(this.rules.other.listReplaceNesting, " "), B = f) : B = f.replace(this.rules.other.tabCharGlobal, " "), v.test(f) || y.test(f) || I.test(f) || U.test(f) || m.test(f) || x.test(f)) break;
|
|
5246
5312
|
if (B.search(this.rules.other.nonSpaceChar) >= g || !f.trim()) d += `
|
|
5247
5313
|
` + B.slice(g);
|
|
5248
5314
|
else {
|
|
@@ -5301,12 +5367,12 @@ ${d}` : d;
|
|
|
5301
5367
|
table(t) {
|
|
5302
5368
|
let e = this.rules.block.table.exec(t);
|
|
5303
5369
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
5304
|
-
let n =
|
|
5370
|
+
let n = Mr(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
5305
5371
|
`) : [], o = { type: "table", raw: e[0], header: [], align: [], rows: [] };
|
|
5306
5372
|
if (n.length === r.length) {
|
|
5307
5373
|
for (let s of r) this.rules.other.tableAlignRight.test(s) ? o.align.push("right") : this.rules.other.tableAlignCenter.test(s) ? o.align.push("center") : this.rules.other.tableAlignLeft.test(s) ? o.align.push("left") : o.align.push(null);
|
|
5308
5374
|
for (let s = 0; s < n.length; s++) o.header.push({ text: n[s], tokens: this.lexer.inline(n[s]), header: !0, align: o.align[s] });
|
|
5309
|
-
for (let s of i) o.rows.push(
|
|
5375
|
+
for (let s of i) o.rows.push(Mr(s, o.header.length).map((l, a) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: o.align[a] })));
|
|
5310
5376
|
return o;
|
|
5311
5377
|
}
|
|
5312
5378
|
}
|
|
@@ -5343,10 +5409,10 @@ ${d}` : d;
|
|
|
5343
5409
|
let n = e[2].trim();
|
|
5344
5410
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n)) {
|
|
5345
5411
|
if (!this.rules.other.endAngleBracket.test(n)) return;
|
|
5346
|
-
let o =
|
|
5412
|
+
let o = Fe(n.slice(0, -1), "\\");
|
|
5347
5413
|
if ((n.length - o.length) % 2 === 0) return;
|
|
5348
5414
|
} else {
|
|
5349
|
-
let o =
|
|
5415
|
+
let o = hc(e[2], "()");
|
|
5350
5416
|
if (o === -2) return;
|
|
5351
5417
|
if (o > -1) {
|
|
5352
5418
|
let s = (e[0].indexOf("!") === 0 ? 5 : 4) + e[1].length + o;
|
|
@@ -5358,7 +5424,7 @@ ${d}` : d;
|
|
|
5358
5424
|
let o = this.rules.other.pedanticHrefTitle.exec(r);
|
|
5359
5425
|
o && (r = o[1], i = o[3]);
|
|
5360
5426
|
} else i = e[3] ? e[3].slice(1, -1) : "";
|
|
5361
|
-
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)),
|
|
5427
|
+
return r = r.trim(), this.rules.other.startAngleBracket.test(r) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n) ? r = r.slice(1) : r = r.slice(1, -1)), qr(e, { href: r && r.replace(this.rules.inline.anyPunctuation, "$1"), title: i && i.replace(this.rules.inline.anyPunctuation, "$1") }, e[0], this.lexer, this.rules);
|
|
5362
5428
|
}
|
|
5363
5429
|
}
|
|
5364
5430
|
reflink(t, e) {
|
|
@@ -5369,7 +5435,7 @@ ${d}` : d;
|
|
|
5369
5435
|
let o = n[0].charAt(0);
|
|
5370
5436
|
return { type: "text", raw: o, text: o };
|
|
5371
5437
|
}
|
|
5372
|
-
return
|
|
5438
|
+
return qr(n, i, n[0], this.lexer, this.rules);
|
|
5373
5439
|
}
|
|
5374
5440
|
}
|
|
5375
5441
|
emStrong(t, e, n = "") {
|
|
@@ -5454,28 +5520,28 @@ ${d}` : d;
|
|
|
5454
5520
|
return { type: "text", raw: e[0], text: e[0], escaped: n };
|
|
5455
5521
|
}
|
|
5456
5522
|
}
|
|
5457
|
-
}, W = class
|
|
5523
|
+
}, W = class gn {
|
|
5458
5524
|
tokens;
|
|
5459
5525
|
options;
|
|
5460
5526
|
state;
|
|
5461
5527
|
inlineQueue;
|
|
5462
5528
|
tokenizer;
|
|
5463
5529
|
constructor(e) {
|
|
5464
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ve, this.options.tokenizer = this.options.tokenizer || new
|
|
5465
|
-
let n = { other:
|
|
5466
|
-
this.options.pedantic ? (n.block = pt.pedantic, n.inline =
|
|
5530
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ve, this.options.tokenizer = this.options.tokenizer || new Rt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
5531
|
+
let n = { other: M, block: pt.normal, inline: Be.normal };
|
|
5532
|
+
this.options.pedantic ? (n.block = pt.pedantic, n.inline = Be.pedantic) : this.options.gfm && (n.block = pt.gfm, this.options.breaks ? n.inline = Be.breaks : n.inline = Be.gfm), this.tokenizer.rules = n;
|
|
5467
5533
|
}
|
|
5468
5534
|
static get rules() {
|
|
5469
|
-
return { block: pt, inline:
|
|
5535
|
+
return { block: pt, inline: Be };
|
|
5470
5536
|
}
|
|
5471
5537
|
static lex(e, n) {
|
|
5472
|
-
return new
|
|
5538
|
+
return new gn(n).lex(e);
|
|
5473
5539
|
}
|
|
5474
5540
|
static lexInline(e, n) {
|
|
5475
|
-
return new
|
|
5541
|
+
return new gn(n).inlineTokens(e);
|
|
5476
5542
|
}
|
|
5477
5543
|
lex(e) {
|
|
5478
|
-
e = e.replace(
|
|
5544
|
+
e = e.replace(M.carriageReturn, `
|
|
5479
5545
|
`), this.blockTokens(e, this.tokens);
|
|
5480
5546
|
for (let n = 0; n < this.inlineQueue.length; n++) {
|
|
5481
5547
|
let r = this.inlineQueue[n];
|
|
@@ -5484,7 +5550,7 @@ ${d}` : d;
|
|
|
5484
5550
|
return this.inlineQueue = [], this.tokens;
|
|
5485
5551
|
}
|
|
5486
5552
|
blockTokens(e, n = [], r = !1) {
|
|
5487
|
-
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
5553
|
+
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(M.tabCharGlobal, " ").replace(M.spaceLine, "")); e; ) {
|
|
5488
5554
|
let i;
|
|
5489
5555
|
if (this.options.extensions?.block?.some((s) => (i = s.call({ lexer: this }, e, n)) ? (e = e.substring(i.raw.length), n.push(i), !0) : !1)) continue;
|
|
5490
5556
|
if (i = this.tokenizer.space(e)) {
|
|
@@ -5662,7 +5728,7 @@ ${d}` : d;
|
|
|
5662
5728
|
}
|
|
5663
5729
|
return n;
|
|
5664
5730
|
}
|
|
5665
|
-
},
|
|
5731
|
+
}, At = class {
|
|
5666
5732
|
options;
|
|
5667
5733
|
parser;
|
|
5668
5734
|
constructor(t) {
|
|
@@ -5672,7 +5738,7 @@ ${d}` : d;
|
|
|
5672
5738
|
return "";
|
|
5673
5739
|
}
|
|
5674
5740
|
code({ text: t, lang: e, escaped: n }) {
|
|
5675
|
-
let r = (e || "").match(
|
|
5741
|
+
let r = (e || "").match(M.notSpaceStart)?.[0], i = t.replace(M.endingNewline, "") + `
|
|
5676
5742
|
`;
|
|
5677
5743
|
return r ? '<pre><code class="language-' + X(r) + '">' + (n ? i : X(i, !0)) + `</code></pre>
|
|
5678
5744
|
` : "<pre><code>" + (n ? i : X(i, !0)) + `</code></pre>
|
|
@@ -5762,7 +5828,7 @@ ${t}</tr>
|
|
|
5762
5828
|
return `<del>${this.parser.parseInline(t)}</del>`;
|
|
5763
5829
|
}
|
|
5764
5830
|
link({ href: t, title: e, tokens: n }) {
|
|
5765
|
-
let r = this.parser.parseInline(n), i =
|
|
5831
|
+
let r = this.parser.parseInline(n), i = Lr(t);
|
|
5766
5832
|
if (i === null) return r;
|
|
5767
5833
|
t = i;
|
|
5768
5834
|
let o = '<a href="' + t + '"';
|
|
@@ -5770,7 +5836,7 @@ ${t}</tr>
|
|
|
5770
5836
|
}
|
|
5771
5837
|
image({ href: t, title: e, text: n, tokens: r }) {
|
|
5772
5838
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
5773
|
-
let i =
|
|
5839
|
+
let i = Lr(t);
|
|
5774
5840
|
if (i === null) return X(n);
|
|
5775
5841
|
t = i;
|
|
5776
5842
|
let o = `<img src="${t}" alt="${X(n)}"`;
|
|
@@ -5779,7 +5845,7 @@ ${t}</tr>
|
|
|
5779
5845
|
text(t) {
|
|
5780
5846
|
return "tokens" in t && t.tokens ? this.parser.parseInline(t.tokens) : "escaped" in t && t.escaped ? t.text : X(t.text);
|
|
5781
5847
|
}
|
|
5782
|
-
},
|
|
5848
|
+
}, Bn = class {
|
|
5783
5849
|
strong({ text: t }) {
|
|
5784
5850
|
return t;
|
|
5785
5851
|
}
|
|
@@ -5810,18 +5876,18 @@ ${t}</tr>
|
|
|
5810
5876
|
checkbox({ raw: t }) {
|
|
5811
5877
|
return t;
|
|
5812
5878
|
}
|
|
5813
|
-
}, J = class
|
|
5879
|
+
}, J = class mn {
|
|
5814
5880
|
options;
|
|
5815
5881
|
renderer;
|
|
5816
5882
|
textRenderer;
|
|
5817
5883
|
constructor(e) {
|
|
5818
|
-
this.options = e || ve, this.options.renderer = this.options.renderer || new
|
|
5884
|
+
this.options = e || ve, this.options.renderer = this.options.renderer || new At(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Bn();
|
|
5819
5885
|
}
|
|
5820
5886
|
static parse(e, n) {
|
|
5821
|
-
return new
|
|
5887
|
+
return new mn(n).parse(e);
|
|
5822
5888
|
}
|
|
5823
5889
|
static parseInline(e, n) {
|
|
5824
|
-
return new
|
|
5890
|
+
return new mn(n).parseInline(e);
|
|
5825
5891
|
}
|
|
5826
5892
|
parse(e) {
|
|
5827
5893
|
this.renderer.parser = this;
|
|
@@ -5987,16 +6053,16 @@ ${t}</tr>
|
|
|
5987
6053
|
provideParser() {
|
|
5988
6054
|
return this.block ? J.parse : J.parseInline;
|
|
5989
6055
|
}
|
|
5990
|
-
},
|
|
5991
|
-
defaults =
|
|
6056
|
+
}, pc = class {
|
|
6057
|
+
defaults = In();
|
|
5992
6058
|
options = this.setOptions;
|
|
5993
6059
|
parse = this.parseMarkdown(!0);
|
|
5994
6060
|
parseInline = this.parseMarkdown(!1);
|
|
5995
6061
|
Parser = J;
|
|
5996
|
-
Renderer =
|
|
5997
|
-
TextRenderer =
|
|
6062
|
+
Renderer = At;
|
|
6063
|
+
TextRenderer = Bn;
|
|
5998
6064
|
Lexer = W;
|
|
5999
|
-
Tokenizer =
|
|
6065
|
+
Tokenizer = Rt;
|
|
6000
6066
|
Hooks = Ve;
|
|
6001
6067
|
constructor(...t) {
|
|
6002
6068
|
this.use(...t);
|
|
@@ -6045,7 +6111,7 @@ ${t}</tr>
|
|
|
6045
6111
|
}
|
|
6046
6112
|
"childTokens" in i && i.childTokens && (e.childTokens[i.name] = i.childTokens);
|
|
6047
6113
|
}), r.extensions = e), n.renderer) {
|
|
6048
|
-
let i = this.defaults.renderer || new
|
|
6114
|
+
let i = this.defaults.renderer || new At(this.defaults);
|
|
6049
6115
|
for (let o in n.renderer) {
|
|
6050
6116
|
if (!(o in i)) throw new Error(`renderer '${o}' does not exist`);
|
|
6051
6117
|
if (["options", "parser"].includes(o)) continue;
|
|
@@ -6058,7 +6124,7 @@ ${t}</tr>
|
|
|
6058
6124
|
r.renderer = i;
|
|
6059
6125
|
}
|
|
6060
6126
|
if (n.tokenizer) {
|
|
6061
|
-
let i = this.defaults.tokenizer || new
|
|
6127
|
+
let i = this.defaults.tokenizer || new Rt(this.defaults);
|
|
6062
6128
|
for (let o in n.tokenizer) {
|
|
6063
6129
|
if (!(o in i)) throw new Error(`tokenizer '${o}' does not exist`);
|
|
6064
6130
|
if (["options", "rules", "lexer"].includes(o)) continue;
|
|
@@ -6147,17 +6213,17 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
6147
6213
|
throw n;
|
|
6148
6214
|
};
|
|
6149
6215
|
}
|
|
6150
|
-
}, be = new
|
|
6216
|
+
}, be = new pc();
|
|
6151
6217
|
function k(t, e) {
|
|
6152
6218
|
return be.parse(t, e);
|
|
6153
6219
|
}
|
|
6154
6220
|
k.options = k.setOptions = function(t) {
|
|
6155
|
-
return be.setOptions(t), k.defaults = be.defaults,
|
|
6221
|
+
return be.setOptions(t), k.defaults = be.defaults, eo(k.defaults), k;
|
|
6156
6222
|
};
|
|
6157
|
-
k.getDefaults =
|
|
6223
|
+
k.getDefaults = In;
|
|
6158
6224
|
k.defaults = ve;
|
|
6159
6225
|
k.use = function(...t) {
|
|
6160
|
-
return be.use(...t), k.defaults = be.defaults,
|
|
6226
|
+
return be.use(...t), k.defaults = be.defaults, eo(k.defaults), k;
|
|
6161
6227
|
};
|
|
6162
6228
|
k.walkTokens = function(t, e) {
|
|
6163
6229
|
return be.walkTokens(t, e);
|
|
@@ -6165,11 +6231,11 @@ k.walkTokens = function(t, e) {
|
|
|
6165
6231
|
k.parseInline = be.parseInline;
|
|
6166
6232
|
k.Parser = J;
|
|
6167
6233
|
k.parser = J.parse;
|
|
6168
|
-
k.Renderer =
|
|
6169
|
-
k.TextRenderer =
|
|
6234
|
+
k.Renderer = At;
|
|
6235
|
+
k.TextRenderer = Bn;
|
|
6170
6236
|
k.Lexer = W;
|
|
6171
6237
|
k.lexer = W.lex;
|
|
6172
|
-
k.Tokenizer =
|
|
6238
|
+
k.Tokenizer = Rt;
|
|
6173
6239
|
k.Hooks = Ve;
|
|
6174
6240
|
k.parse = k;
|
|
6175
6241
|
k.options;
|
|
@@ -6183,8 +6249,8 @@ k.setOptions({
|
|
|
6183
6249
|
breaks: !0,
|
|
6184
6250
|
gfm: !0
|
|
6185
6251
|
});
|
|
6186
|
-
function
|
|
6187
|
-
const e =
|
|
6252
|
+
function gc({ text: t }) {
|
|
6253
|
+
const e = K(() => {
|
|
6188
6254
|
if (!t)
|
|
6189
6255
|
return "";
|
|
6190
6256
|
const n = k.parse(t);
|
|
@@ -6192,51 +6258,78 @@ function sc({ text: t }) {
|
|
|
6192
6258
|
}, [t]);
|
|
6193
6259
|
return /* @__PURE__ */ c("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
|
|
6194
6260
|
}
|
|
6195
|
-
const
|
|
6196
|
-
function
|
|
6261
|
+
const Pe = A("");
|
|
6262
|
+
function mc(t) {
|
|
6197
6263
|
if (!t)
|
|
6198
6264
|
return;
|
|
6199
6265
|
const e = t.trim().split(/\s+/)[0];
|
|
6200
6266
|
if (!e)
|
|
6201
6267
|
return;
|
|
6202
|
-
const n = `@${e} `, r =
|
|
6203
|
-
r.includes(n) || r.includes(`@${e}`) || (
|
|
6268
|
+
const n = `@${e} `, r = Pe.value;
|
|
6269
|
+
r.includes(n) || r.includes(`@${e}`) || (Pe.value = r.trimStart() ? `${n}${r.trimStart()}` : n);
|
|
6204
6270
|
}
|
|
6205
|
-
const rt =
|
|
6206
|
-
function
|
|
6271
|
+
const rt = A(null), Or = A(Date.now()), se = A([]), xc = 4, bc = 8 * 1024 * 1024;
|
|
6272
|
+
function yc() {
|
|
6207
6273
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;
|
|
6208
6274
|
}
|
|
6209
|
-
function
|
|
6210
|
-
const e = Array.from(t).filter((i) => i.type.startsWith("image/") && i.size <=
|
|
6275
|
+
function vc(t) {
|
|
6276
|
+
const e = Array.from(t).filter((i) => i.type.startsWith("image/") && i.size <= bc);
|
|
6211
6277
|
if (e.length === 0)
|
|
6212
6278
|
return;
|
|
6213
|
-
const n =
|
|
6279
|
+
const n = xc - se.value.length;
|
|
6214
6280
|
if (n <= 0)
|
|
6215
6281
|
return;
|
|
6216
6282
|
const r = e.slice(0, n).map((i) => ({
|
|
6217
6283
|
// Falls back to a non-crypto id when host page is HTTP — see genAttachmentId.
|
|
6218
|
-
id:
|
|
6284
|
+
id: yc(),
|
|
6219
6285
|
file: i,
|
|
6220
6286
|
previewUrl: URL.createObjectURL(i)
|
|
6221
6287
|
}));
|
|
6222
6288
|
se.value = [...se.value, ...r];
|
|
6223
6289
|
}
|
|
6224
|
-
function
|
|
6290
|
+
function _c(t) {
|
|
6225
6291
|
const e = se.value.find((n) => n.id === t);
|
|
6226
6292
|
e && URL.revokeObjectURL(e.previewUrl), se.value = se.value.filter((n) => n.id !== t);
|
|
6227
6293
|
}
|
|
6228
|
-
function
|
|
6294
|
+
function wc() {
|
|
6229
6295
|
for (const t of se.value)
|
|
6230
6296
|
URL.revokeObjectURL(t.previewUrl);
|
|
6231
6297
|
se.value = [];
|
|
6232
6298
|
}
|
|
6233
|
-
|
|
6299
|
+
BigInt("-9223372036854775808");
|
|
6300
|
+
BigInt("9223372036854775807");
|
|
6301
|
+
BigInt("0");
|
|
6302
|
+
BigInt("8");
|
|
6303
|
+
BigInt("256");
|
|
6304
|
+
const kc = /* @__PURE__ */ Symbol.for("functionName"), jc = /* @__PURE__ */ Symbol.for("toReferencePath");
|
|
6305
|
+
function uo(t = []) {
|
|
6306
|
+
const e = {
|
|
6307
|
+
get(n, r) {
|
|
6308
|
+
if (typeof r == "string") {
|
|
6309
|
+
const i = [...t, r];
|
|
6310
|
+
return uo(i);
|
|
6311
|
+
} else if (r === kc) {
|
|
6312
|
+
if (t.length < 2) {
|
|
6313
|
+
const s = ["api", ...t].join(".");
|
|
6314
|
+
throw new Error(
|
|
6315
|
+
`API path is expected to be of the form \`api.moduleName.functionName\`. Found: \`${s}\``
|
|
6316
|
+
);
|
|
6317
|
+
}
|
|
6318
|
+
const i = t.slice(0, -1).join("/"), o = t[t.length - 1];
|
|
6319
|
+
return o === "default" ? i : i + ":" + o;
|
|
6320
|
+
} else return r === Symbol.toStringTag ? "FunctionReference" : void 0;
|
|
6321
|
+
}
|
|
6322
|
+
};
|
|
6323
|
+
return new Proxy({}, e);
|
|
6324
|
+
}
|
|
6325
|
+
const Sc = uo();
|
|
6326
|
+
function ho(t, e) {
|
|
6234
6327
|
const n = {
|
|
6235
6328
|
get(r, i) {
|
|
6236
6329
|
if (typeof i == "string") {
|
|
6237
6330
|
const o = [...e, i];
|
|
6238
|
-
return
|
|
6239
|
-
} else if (i ===
|
|
6331
|
+
return ho(t, o);
|
|
6332
|
+
} else if (i === jc) {
|
|
6240
6333
|
if (e.length < 1) {
|
|
6241
6334
|
const o = [t, ...e].join(".");
|
|
6242
6335
|
throw new Error(
|
|
@@ -6250,34 +6343,34 @@ function so(t, e) {
|
|
|
6250
6343
|
};
|
|
6251
6344
|
return new Proxy({}, n);
|
|
6252
6345
|
}
|
|
6253
|
-
const
|
|
6254
|
-
|
|
6255
|
-
function
|
|
6256
|
-
const r =
|
|
6346
|
+
const Cc = () => ho("components", []), Le = Sc;
|
|
6347
|
+
Cc();
|
|
6348
|
+
function Tc({ sessionId: t, visitorId: e, ensureSession: n }) {
|
|
6349
|
+
const r = It(Le.functions.chat.public.conversations.send);
|
|
6257
6350
|
return async function(o) {
|
|
6258
6351
|
const s = t && e ? { sessionId: t, visitorId: e } : await n();
|
|
6259
6352
|
if (s) {
|
|
6260
|
-
|
|
6353
|
+
Pe.value = "", wc();
|
|
6261
6354
|
try {
|
|
6262
6355
|
const l = await r({
|
|
6263
6356
|
sessionId: s.sessionId,
|
|
6264
6357
|
visitorId: s.visitorId,
|
|
6265
6358
|
content: o
|
|
6266
6359
|
});
|
|
6267
|
-
l.ok ?
|
|
6360
|
+
l.ok ? $n(s.visitorId) : l.reason === "rate_limited" && (rt.value = Date.now() + l.retryAfterMs);
|
|
6268
6361
|
} catch (l) {
|
|
6269
6362
|
console.error("[jexity] Failed to send message:", l);
|
|
6270
6363
|
}
|
|
6271
6364
|
}
|
|
6272
6365
|
};
|
|
6273
6366
|
}
|
|
6274
|
-
function
|
|
6275
|
-
const t = rt.value, e =
|
|
6367
|
+
function Rc() {
|
|
6368
|
+
const t = rt.value, e = Or.value;
|
|
6276
6369
|
T(() => {
|
|
6277
6370
|
if (t === null)
|
|
6278
6371
|
return;
|
|
6279
6372
|
const i = setInterval(() => {
|
|
6280
|
-
|
|
6373
|
+
Or.value = Date.now();
|
|
6281
6374
|
}, 1e3), o = setTimeout(() => {
|
|
6282
6375
|
rt.value = null;
|
|
6283
6376
|
}, Math.max(0, t - Date.now()));
|
|
@@ -6288,35 +6381,35 @@ function mc() {
|
|
|
6288
6381
|
const n = t !== null, r = n ? Math.max(0, Math.ceil((t - e) / 1e3)) : 0;
|
|
6289
6382
|
return { isActive: n, remainingSeconds: r };
|
|
6290
6383
|
}
|
|
6291
|
-
function
|
|
6292
|
-
const t = R(), { isActive: e, remainingSeconds: n } =
|
|
6384
|
+
function Ac() {
|
|
6385
|
+
const t = R(), { isActive: e, remainingSeconds: n } = Rc();
|
|
6293
6386
|
return e ? /* @__PURE__ */ c("div", { class: "jex-rate-limit-notice", role: "status", "aria-live": "polite", children: t.errorRateLimited.replace("{seconds}", String(n)) }) : null;
|
|
6294
6387
|
}
|
|
6295
|
-
const Se =
|
|
6296
|
-
function
|
|
6388
|
+
const Se = A(null);
|
|
6389
|
+
function $c() {
|
|
6297
6390
|
const t = R(), e = Se.value;
|
|
6298
6391
|
if (e === null)
|
|
6299
6392
|
return null;
|
|
6300
6393
|
const n = e === "no-token" ? t.errorSessionNoToken : e === "unauthorized" ? t.errorSessionUnauthorized : e === "network" ? t.errorNetwork : t.somethingWentWrong;
|
|
6301
6394
|
return /* @__PURE__ */ c("div", { class: "jex-session-error-notice", role: "alert", "aria-live": "assertive", children: n });
|
|
6302
6395
|
}
|
|
6303
|
-
function
|
|
6396
|
+
function Ec({ size: t = 18 }) {
|
|
6304
6397
|
return /* @__PURE__ */ c("svg", { width: t, height: t, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
6305
6398
|
/* @__PURE__ */ c("path", { d: "M22 2 11 13" }),
|
|
6306
6399
|
/* @__PURE__ */ c("path", { d: "M22 2 15 22 11 13 2 9l20-7z" })
|
|
6307
6400
|
] });
|
|
6308
6401
|
}
|
|
6309
|
-
const
|
|
6310
|
-
function
|
|
6402
|
+
const Nr = 132;
|
|
6403
|
+
function Ic({ onSend: t }) {
|
|
6311
6404
|
const e = ue(null), n = ue(null);
|
|
6312
6405
|
T(() => {
|
|
6313
6406
|
const l = e.current;
|
|
6314
6407
|
if (!l)
|
|
6315
6408
|
return;
|
|
6316
6409
|
l.style.height = "0";
|
|
6317
|
-
const a = Math.min(l.scrollHeight,
|
|
6318
|
-
l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight >
|
|
6319
|
-
}, [
|
|
6410
|
+
const a = Math.min(l.scrollHeight, Nr);
|
|
6411
|
+
l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight > Nr ? "auto" : "hidden";
|
|
6412
|
+
}, [Pe.value]);
|
|
6320
6413
|
function r(l) {
|
|
6321
6414
|
l.key === "Enter" && !l.shiftKey && (l.preventDefault(), t());
|
|
6322
6415
|
}
|
|
@@ -6325,7 +6418,7 @@ function vc({ onSend: t }) {
|
|
|
6325
6418
|
}
|
|
6326
6419
|
function o(l) {
|
|
6327
6420
|
const a = l.currentTarget;
|
|
6328
|
-
a.files && a.files.length > 0 &&
|
|
6421
|
+
a.files && a.files.length > 0 && vc(a.files), a.value = "";
|
|
6329
6422
|
}
|
|
6330
6423
|
function s(l) {
|
|
6331
6424
|
const a = l.target;
|
|
@@ -6333,8 +6426,8 @@ function vc({ onSend: t }) {
|
|
|
6333
6426
|
}
|
|
6334
6427
|
return { textareaRef: e, fileInputRef: n, onKeyDown: r, onAttachClick: i, onFilesPicked: o, onCardClick: s };
|
|
6335
6428
|
}
|
|
6336
|
-
function
|
|
6337
|
-
const i = R(), o =
|
|
6429
|
+
function Pc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
6430
|
+
const i = R(), o = Pe, s = se, { textareaRef: l, fileInputRef: a, onKeyDown: u, onAttachClick: d, onFilesPicked: h, onCardClick: f } = Ic({ onSend: r }), p = o.value.trim().length > 0, g = s.value.length > 0, m = (p || g) && !e;
|
|
6338
6431
|
return /* @__PURE__ */ c("div", { class: "jex-composer-card", onClick: f, children: [
|
|
6339
6432
|
g && /* @__PURE__ */ c("div", { class: "jex-composer-attachments", role: "list", children: s.value.map((x) => /* @__PURE__ */ c("div", { class: "jex-attachment-chip", role: "listitem", children: [
|
|
6340
6433
|
/* @__PURE__ */ c("img", { src: x.previewUrl, alt: x.file.name, class: "jex-attachment-thumb" }),
|
|
@@ -6345,7 +6438,7 @@ function _c({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
|
6345
6438
|
class: "jex-attachment-remove",
|
|
6346
6439
|
"aria-label": i.removeAttachmentAriaLabel,
|
|
6347
6440
|
onClick: () => {
|
|
6348
|
-
|
|
6441
|
+
_c(x.id);
|
|
6349
6442
|
},
|
|
6350
6443
|
children: /* @__PURE__ */ c("svg", { width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true", children: [
|
|
6351
6444
|
/* @__PURE__ */ c("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
@@ -6406,14 +6499,33 @@ function _c({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
|
6406
6499
|
onClick: r,
|
|
6407
6500
|
"aria-label": i.sendAriaLabel,
|
|
6408
6501
|
disabled: e || !p && !g,
|
|
6409
|
-
children: /* @__PURE__ */ c(
|
|
6502
|
+
children: /* @__PURE__ */ c(Ec, { size: 16 })
|
|
6410
6503
|
}
|
|
6411
6504
|
)
|
|
6412
6505
|
] })
|
|
6413
6506
|
] });
|
|
6414
6507
|
}
|
|
6415
|
-
|
|
6416
|
-
|
|
6508
|
+
const Lc = "https://jexitychat.de/privacy";
|
|
6509
|
+
function Mc() {
|
|
6510
|
+
const t = R();
|
|
6511
|
+
return /* @__PURE__ */ c("p", { class: "jex-privacy-notice", children: [
|
|
6512
|
+
t.privacyNoticePre,
|
|
6513
|
+
" ",
|
|
6514
|
+
/* @__PURE__ */ c(
|
|
6515
|
+
"a",
|
|
6516
|
+
{
|
|
6517
|
+
href: Lc,
|
|
6518
|
+
target: "_blank",
|
|
6519
|
+
rel: "noopener noreferrer",
|
|
6520
|
+
class: "jex-privacy-notice-link",
|
|
6521
|
+
children: t.privacyPolicyLinkText
|
|
6522
|
+
}
|
|
6523
|
+
),
|
|
6524
|
+
"."
|
|
6525
|
+
] });
|
|
6526
|
+
}
|
|
6527
|
+
function qc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: o, onStartFresh: s }) {
|
|
6528
|
+
const l = R(), a = Pe, u = Tc({ sessionId: t, visitorId: e, ensureSession: o }), d = rt.value !== null && rt.value > Date.now(), h = n || r || d;
|
|
6417
6529
|
if (i === "resolved")
|
|
6418
6530
|
return /* @__PURE__ */ c("div", { class: "jex-chat-input-resolved", children: [
|
|
6419
6531
|
/* @__PURE__ */ c("div", { class: "jex-resolved-notice", children: l.sessionResolved }),
|
|
@@ -6434,33 +6546,34 @@ function wc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
|
|
|
6434
6546
|
!p || h || await u(p);
|
|
6435
6547
|
}
|
|
6436
6548
|
return /* @__PURE__ */ c("div", { class: "jex-chat-input", children: [
|
|
6437
|
-
/* @__PURE__ */ c(
|
|
6438
|
-
/* @__PURE__ */ c(
|
|
6549
|
+
/* @__PURE__ */ c(Ac, {}),
|
|
6550
|
+
/* @__PURE__ */ c($c, {}),
|
|
6439
6551
|
/* @__PURE__ */ c(
|
|
6440
|
-
|
|
6552
|
+
Pc,
|
|
6441
6553
|
{
|
|
6442
6554
|
isStreaming: r,
|
|
6443
6555
|
disabled: h,
|
|
6444
6556
|
inputDisabled: n || r,
|
|
6445
6557
|
onSend: f
|
|
6446
6558
|
}
|
|
6447
|
-
)
|
|
6559
|
+
),
|
|
6560
|
+
/* @__PURE__ */ c(Mc, {})
|
|
6448
6561
|
] });
|
|
6449
6562
|
}
|
|
6450
|
-
function
|
|
6563
|
+
function Oc(t) {
|
|
6451
6564
|
const e = t.trim().split(/\s+/).filter(Boolean);
|
|
6452
6565
|
return e.length === 0 ? "?" : e.map((n) => n[0]).join("").slice(0, 2).toUpperCase();
|
|
6453
6566
|
}
|
|
6454
6567
|
function ke({ text: t, streaming: e, error: n, authorId: r, authorName: i, authorImage: o, botAvatarUrl: s }) {
|
|
6455
|
-
const l = R(), a = !!r, [u, d] = C(!1), h =
|
|
6568
|
+
const l = R(), a = !!r, [u, d] = C(!1), h = Re(() => d(!0), []), f = l.replyTo.replace("{name}", i ?? ""), p = [
|
|
6456
6569
|
"jex-message bot",
|
|
6457
6570
|
n ? "jex-message-error" : ""
|
|
6458
6571
|
].filter(Boolean).join(" ");
|
|
6459
6572
|
return /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: [
|
|
6460
|
-
/* @__PURE__ */ c("div", { class: `jex-avatar ${a ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: a && o && !u ? /* @__PURE__ */ c("img", { src: o, alt: i ?? "", class: "jex-avatar-img", onError: h }) : a ? /* @__PURE__ */ c("span", { class: "jex-avatar-initials", children:
|
|
6573
|
+
/* @__PURE__ */ c("div", { class: `jex-avatar ${a ? "jex-avatar-agent" : "jex-avatar-bot"}`, children: a && o && !u ? /* @__PURE__ */ c("img", { src: o, alt: i ?? "", class: "jex-avatar-img", onError: h }) : a ? /* @__PURE__ */ c("span", { class: "jex-avatar-initials", children: Oc(i ?? "") }) : s && !u ? /* @__PURE__ */ c("img", { src: s, alt: "", class: "jex-avatar-img", onError: h }) : /* @__PURE__ */ c(En, { size: 14 }) }),
|
|
6461
6574
|
/* @__PURE__ */ c("div", { class: "jex-message-content", children: [
|
|
6462
6575
|
/* @__PURE__ */ c("div", { class: p, children: [
|
|
6463
|
-
/* @__PURE__ */ c(
|
|
6576
|
+
/* @__PURE__ */ c(gc, { text: t }),
|
|
6464
6577
|
e && /* @__PURE__ */ c("span", { class: "jex-streaming-cursor" })
|
|
6465
6578
|
] }),
|
|
6466
6579
|
a && i && /* @__PURE__ */ c("div", { class: "jex-message-author-row", children: [
|
|
@@ -6473,22 +6586,22 @@ function ke({ text: t, streaming: e, error: n, authorId: r, authorName: i, autho
|
|
|
6473
6586
|
"aria-label": f,
|
|
6474
6587
|
title: f,
|
|
6475
6588
|
onClick: () => {
|
|
6476
|
-
|
|
6589
|
+
mc(i);
|
|
6477
6590
|
},
|
|
6478
|
-
children: /* @__PURE__ */ c(
|
|
6591
|
+
children: /* @__PURE__ */ c(Tl, { size: 12 })
|
|
6479
6592
|
}
|
|
6480
6593
|
)
|
|
6481
6594
|
] })
|
|
6482
6595
|
] })
|
|
6483
6596
|
] });
|
|
6484
6597
|
}
|
|
6485
|
-
function
|
|
6598
|
+
function Nc({ text: t }) {
|
|
6486
6599
|
return /* @__PURE__ */ c("div", { class: "jex-message user", children: t });
|
|
6487
6600
|
}
|
|
6488
|
-
function
|
|
6489
|
-
return
|
|
6601
|
+
function fo() {
|
|
6602
|
+
return It(Le.functions.chat.public.helpdesk.submitEscalation);
|
|
6490
6603
|
}
|
|
6491
|
-
function
|
|
6604
|
+
function zc({ message: t, sessionId: e, visitorId: n }) {
|
|
6492
6605
|
const r = R();
|
|
6493
6606
|
return t.formData ? /* @__PURE__ */ c("div", { class: "jex-inline-form-submitted", children: [
|
|
6494
6607
|
/* @__PURE__ */ c("span", { class: "jex-inline-form-check", children: "✓" }),
|
|
@@ -6501,7 +6614,7 @@ function Sc({ message: t, sessionId: e, visitorId: n }) {
|
|
|
6501
6614
|
] })
|
|
6502
6615
|
] })
|
|
6503
6616
|
] }) : /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: /* @__PURE__ */ c(
|
|
6504
|
-
|
|
6617
|
+
Bc,
|
|
6505
6618
|
{
|
|
6506
6619
|
messageId: t._id,
|
|
6507
6620
|
sessionId: e,
|
|
@@ -6509,8 +6622,8 @@ function Sc({ message: t, sessionId: e, visitorId: n }) {
|
|
|
6509
6622
|
}
|
|
6510
6623
|
) });
|
|
6511
6624
|
}
|
|
6512
|
-
function
|
|
6513
|
-
const r = R(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d =
|
|
6625
|
+
function Bc({ messageId: t, sessionId: e, visitorId: n }) {
|
|
6626
|
+
const r = R(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d = fo();
|
|
6514
6627
|
async function h(f) {
|
|
6515
6628
|
if (f.preventDefault(), !a) {
|
|
6516
6629
|
u(!0);
|
|
@@ -6562,16 +6675,21 @@ function Cc({ messageId: t, sessionId: e, visitorId: n }) {
|
|
|
6562
6675
|
),
|
|
6563
6676
|
/* @__PURE__ */ c("button", { class: "jex-form-submit", type: "submit", disabled: a, children: a ? r.escalationSubmitting : r.escalationSubmit })
|
|
6564
6677
|
] }),
|
|
6565
|
-
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children:
|
|
6678
|
+
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children: [
|
|
6679
|
+
r.escalationConsent,
|
|
6680
|
+
" ",
|
|
6681
|
+
/* @__PURE__ */ c("a", { href: "https://jexitychat.de/privacy", target: "_blank", rel: "noopener noreferrer", class: "jex-privacy-notice-link", children: r.escalationPrivacyLinkText }),
|
|
6682
|
+
"."
|
|
6683
|
+
] })
|
|
6566
6684
|
] });
|
|
6567
6685
|
}
|
|
6568
|
-
const
|
|
6686
|
+
const Fc = {
|
|
6569
6687
|
crawl: "🌐",
|
|
6570
6688
|
file: "📄",
|
|
6571
6689
|
snippet: "💡",
|
|
6572
6690
|
qa: "❓"
|
|
6573
6691
|
};
|
|
6574
|
-
function
|
|
6692
|
+
function Uc({ sources: t }) {
|
|
6575
6693
|
const e = R(), [n, r] = C(!1);
|
|
6576
6694
|
return t.length === 0 ? null : /* @__PURE__ */ c("div", { class: "jex-sources-row", children: [
|
|
6577
6695
|
/* @__PURE__ */ c(
|
|
@@ -6594,10 +6712,10 @@ function Rc({ sources: t }) {
|
|
|
6594
6712
|
}
|
|
6595
6713
|
),
|
|
6596
6714
|
n ? /* @__PURE__ */ c("div", { class: "jex-sources-pills", children: t.map((i, o) => {
|
|
6597
|
-
const s = i.sourceType === "crawl", l =
|
|
6715
|
+
const s = i.sourceType === "crawl", l = Qc(i), a = s && i.url ? `${i.title}
|
|
6598
6716
|
${i.url}` : i.title, u = /* @__PURE__ */ c(F, { children: [
|
|
6599
6717
|
typeof i.id == "number" ? /* @__PURE__ */ c("span", { class: "jex-source-id", children: i.id }) : null,
|
|
6600
|
-
/* @__PURE__ */ c("span", { class: "jex-source-type", children:
|
|
6718
|
+
/* @__PURE__ */ c("span", { class: "jex-source-type", children: Fc[i.sourceType] }),
|
|
6601
6719
|
/* @__PURE__ */ c("span", { class: "jex-source-label", children: l }),
|
|
6602
6720
|
/* @__PURE__ */ c("span", { class: "jex-source-score", children: [
|
|
6603
6721
|
"· ",
|
|
@@ -6619,7 +6737,7 @@ ${i.url}` : i.title, u = /* @__PURE__ */ c(F, { children: [
|
|
|
6619
6737
|
}) }) : null
|
|
6620
6738
|
] });
|
|
6621
6739
|
}
|
|
6622
|
-
function
|
|
6740
|
+
function Qc(t) {
|
|
6623
6741
|
if (t.sourceType === "crawl" && t.url)
|
|
6624
6742
|
try {
|
|
6625
6743
|
const e = new URL(t.url);
|
|
@@ -6628,24 +6746,24 @@ function Ac(t) {
|
|
|
6628
6746
|
}
|
|
6629
6747
|
return t.title;
|
|
6630
6748
|
}
|
|
6631
|
-
function
|
|
6749
|
+
function Dc() {
|
|
6632
6750
|
return /* @__PURE__ */ c("div", { class: "jex-typing", children: [
|
|
6633
6751
|
/* @__PURE__ */ c("span", {}),
|
|
6634
6752
|
/* @__PURE__ */ c("span", {}),
|
|
6635
6753
|
/* @__PURE__ */ c("span", {})
|
|
6636
6754
|
] });
|
|
6637
6755
|
}
|
|
6638
|
-
const
|
|
6639
|
-
function
|
|
6640
|
-
return t.replace(
|
|
6756
|
+
const Vc = /\s?\[\d+\]/g;
|
|
6757
|
+
function zr(t) {
|
|
6758
|
+
return t.replace(Vc, "");
|
|
6641
6759
|
}
|
|
6642
|
-
function
|
|
6760
|
+
function Hc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: o, visitorId: s }) {
|
|
6643
6761
|
const l = R(), a = ue(null), [u, d] = C(null), h = ue(null);
|
|
6644
6762
|
return T(() => {
|
|
6645
6763
|
if (!s || !t || t.length === 0)
|
|
6646
6764
|
return;
|
|
6647
6765
|
const f = t[t.length - 1];
|
|
6648
|
-
f.role === "assistant" && f.status !== "streaming" && f._id !== h.current && (h.current = f._id,
|
|
6766
|
+
f.role === "assistant" && f.status !== "streaming" && f._id !== h.current && (h.current = f._id, $n(s));
|
|
6649
6767
|
}, [t, s]), T(() => {
|
|
6650
6768
|
a.current?.scrollIntoView({ behavior: "smooth" });
|
|
6651
6769
|
}, [t?.length, t?.at(-1)?.content]), /* @__PURE__ */ c("div", { class: "jex-chat-messages", children: [
|
|
@@ -6670,7 +6788,7 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6670
6788
|
return /* @__PURE__ */ c(ke, { text: g }, f._id);
|
|
6671
6789
|
}
|
|
6672
6790
|
if (f.contentType === "escalation-form" && o && s)
|
|
6673
|
-
return
|
|
6791
|
+
return rl.value === "screen" && !f.formData ? u === f._id ? null : /* @__PURE__ */ c("div", { class: "jex-inline-form jex-inline-form-card", children: [
|
|
6674
6792
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-title", children: l.escalationPromptTitle }),
|
|
6675
6793
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-subtitle", children: l.escalationPromptSubtitle }),
|
|
6676
6794
|
/* @__PURE__ */ c(
|
|
@@ -6695,19 +6813,19 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6695
6813
|
children: l.escalationSkip
|
|
6696
6814
|
}
|
|
6697
6815
|
)
|
|
6698
|
-
] }, f._id) : /* @__PURE__ */ c(
|
|
6816
|
+
] }, f._id) : /* @__PURE__ */ c(zc, { message: f, sessionId: o, visitorId: s }, f._id);
|
|
6699
6817
|
if (f.contentType === "escalation-confirm") {
|
|
6700
6818
|
const g = f.noticeKind === "escalation-confirmed" ? l.noticeEscalationConfirmed.replace("{name}", f.noticeData?.visitorName ?? "").replace("{email}", f.noticeData?.visitorEmail ?? "").replace("{ref}", f.noticeData?.visitorId ?? "") : f.content;
|
|
6701
6819
|
return /* @__PURE__ */ c(ke, { text: g }, f._id);
|
|
6702
6820
|
}
|
|
6703
6821
|
if (f.role === "user")
|
|
6704
|
-
return /* @__PURE__ */ c(
|
|
6822
|
+
return /* @__PURE__ */ c(Nc, { text: f.content }, f._id);
|
|
6705
6823
|
const p = {
|
|
6706
6824
|
authorId: f.authorId,
|
|
6707
6825
|
authorName: f.authorName,
|
|
6708
6826
|
authorImage: f.authorImage
|
|
6709
6827
|
};
|
|
6710
|
-
return f.status === "streaming" && f.content === "" ? /* @__PURE__ */ c(
|
|
6828
|
+
return f.status === "streaming" && f.content === "" ? /* @__PURE__ */ c(Dc, {}, f._id) : f.status === "streaming" ? /* @__PURE__ */ c(ke, { text: zr(f.content), streaming: !0, ...p }, f._id) : f.status === "error" ? /* @__PURE__ */ c(
|
|
6711
6829
|
ke,
|
|
6712
6830
|
{
|
|
6713
6831
|
text: f.errorMessage ?? `${l.somethingWentWrong}. ${l.tryAgain}.`,
|
|
@@ -6716,14 +6834,14 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6716
6834
|
},
|
|
6717
6835
|
f._id
|
|
6718
6836
|
) : /* @__PURE__ */ c("div", { children: [
|
|
6719
|
-
/* @__PURE__ */ c(ke, { text:
|
|
6720
|
-
f.sources && f.sources.length > 0 ? /* @__PURE__ */ c(
|
|
6837
|
+
/* @__PURE__ */ c(ke, { text: zr(f.content), ...p }),
|
|
6838
|
+
f.sources && f.sources.length > 0 ? /* @__PURE__ */ c(Uc, { sources: f.sources }) : null
|
|
6721
6839
|
] }, f._id);
|
|
6722
6840
|
}),
|
|
6723
6841
|
/* @__PURE__ */ c("div", { ref: a })
|
|
6724
6842
|
] });
|
|
6725
6843
|
}
|
|
6726
|
-
function
|
|
6844
|
+
function xn({ message: t }) {
|
|
6727
6845
|
const [e, n] = C(!1);
|
|
6728
6846
|
return T(() => {
|
|
6729
6847
|
const r = setTimeout(() => {
|
|
@@ -6737,12 +6855,12 @@ function pn({ message: t }) {
|
|
|
6737
6855
|
t && /* @__PURE__ */ c("p", { class: "jex-loading-message", children: t })
|
|
6738
6856
|
] }) : null;
|
|
6739
6857
|
}
|
|
6740
|
-
function
|
|
6741
|
-
const n =
|
|
6742
|
-
|
|
6858
|
+
function Wc({ sessionId: t, visitorId: e }) {
|
|
6859
|
+
const n = _r(
|
|
6860
|
+
Le.functions.chat.public.conversations.listBySession,
|
|
6743
6861
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
6744
|
-
), r =
|
|
6745
|
-
|
|
6862
|
+
), r = _r(
|
|
6863
|
+
Le.functions.chat.public.sessions.getSessionStatus,
|
|
6746
6864
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
6747
6865
|
), i = t !== null && n === void 0, o = n?.some((s) => s.status === "streaming") ?? !1;
|
|
6748
6866
|
return {
|
|
@@ -6752,25 +6870,25 @@ function Mc({ sessionId: t, visitorId: e }) {
|
|
|
6752
6870
|
isStreaming: o
|
|
6753
6871
|
};
|
|
6754
6872
|
}
|
|
6755
|
-
function
|
|
6756
|
-
const h = R(), { conversations: f, sessionStatus: p, isLoading: g, isStreaming: m } =
|
|
6873
|
+
function Jc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: o, sessionNotFound: s, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d }) {
|
|
6874
|
+
const h = R(), { conversations: f, sessionStatus: p, isLoading: g, isStreaming: m } = Wc({ sessionId: r, visitorId: i }), x = ue(
|
|
6757
6875
|
(() => {
|
|
6758
|
-
const I =
|
|
6759
|
-
return I !== null ? I :
|
|
6876
|
+
const I = Ke.peek();
|
|
6877
|
+
return I !== null ? I : Ki.peek() ? "resume" : "fresh";
|
|
6760
6878
|
})()
|
|
6761
6879
|
).current;
|
|
6762
6880
|
if (T(() => {
|
|
6763
|
-
|
|
6881
|
+
Ke.value = null;
|
|
6764
6882
|
}, []), T(() => {
|
|
6765
6883
|
u();
|
|
6766
6884
|
}, [u]), T(() => {
|
|
6767
|
-
i &&
|
|
6885
|
+
i && $n(i);
|
|
6768
6886
|
}, [i]), a)
|
|
6769
6887
|
return /* @__PURE__ */ c("div", { class: "jex-chat-messages", children: /* @__PURE__ */ c("div", { class: "jex-session-notice", children: h.chatNoLongerAvailable }) });
|
|
6770
6888
|
const v = x === "fresh" && !r, y = x === "resume" && (!r || g);
|
|
6771
|
-
return v ? /* @__PURE__ */ c(
|
|
6889
|
+
return v ? /* @__PURE__ */ c(xn, { message: h.startingConversation }) : y ? /* @__PURE__ */ c(xn, { message: h.resumeConversation }) : /* @__PURE__ */ c(F, { children: [
|
|
6772
6890
|
/* @__PURE__ */ c(
|
|
6773
|
-
|
|
6891
|
+
Hc,
|
|
6774
6892
|
{
|
|
6775
6893
|
conversations: f,
|
|
6776
6894
|
greeting: t,
|
|
@@ -6782,7 +6900,7 @@ function qc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
|
|
|
6782
6900
|
}
|
|
6783
6901
|
),
|
|
6784
6902
|
/* @__PURE__ */ c(
|
|
6785
|
-
|
|
6903
|
+
qc,
|
|
6786
6904
|
{
|
|
6787
6905
|
sessionId: r,
|
|
6788
6906
|
visitorId: i,
|
|
@@ -6795,8 +6913,8 @@ function qc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
|
|
|
6795
6913
|
)
|
|
6796
6914
|
] });
|
|
6797
6915
|
}
|
|
6798
|
-
function
|
|
6799
|
-
const r = R(), [i, o] = C(""), [s, l] = C(""), a =
|
|
6916
|
+
function Gc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
6917
|
+
const r = R(), [i, o] = C(""), [s, l] = C(""), a = fo(), [u, d] = C(!1), [h, f] = C(null);
|
|
6800
6918
|
async function p(g) {
|
|
6801
6919
|
g.preventDefault(), d(!0), f(null);
|
|
6802
6920
|
try {
|
|
@@ -6806,7 +6924,7 @@ function Pc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6806
6924
|
formMessageId: t,
|
|
6807
6925
|
visitorName: i.trim(),
|
|
6808
6926
|
visitorEmail: s.trim()
|
|
6809
|
-
}),
|
|
6927
|
+
}), Ct();
|
|
6810
6928
|
} catch (m) {
|
|
6811
6929
|
console.error("[EscalationFormScreen] Submit failed:", m), f(r.escalationSubmitFailed);
|
|
6812
6930
|
} finally {
|
|
@@ -6848,17 +6966,22 @@ function Pc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6848
6966
|
),
|
|
6849
6967
|
/* @__PURE__ */ c("button", { class: "jex-form-submit", type: "submit", disabled: u, children: r.escalationSubmit })
|
|
6850
6968
|
] }),
|
|
6851
|
-
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children:
|
|
6969
|
+
/* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: [
|
|
6970
|
+
r.escalationConsent,
|
|
6971
|
+
" ",
|
|
6972
|
+
/* @__PURE__ */ c("a", { href: "https://jexitychat.de/privacy", target: "_blank", rel: "noopener noreferrer", class: "jex-privacy-notice-link", children: r.escalationPrivacyLinkText }),
|
|
6973
|
+
"."
|
|
6974
|
+
] }),
|
|
6852
6975
|
/* @__PURE__ */ c("button", { class: "jex-escalation-skip", type: "button", onClick: () => {
|
|
6853
|
-
|
|
6976
|
+
Ct();
|
|
6854
6977
|
}, children: r.escalationSkip })
|
|
6855
6978
|
] });
|
|
6856
6979
|
}
|
|
6857
|
-
function
|
|
6858
|
-
return
|
|
6980
|
+
function Kc() {
|
|
6981
|
+
return It(Le.functions.chat.public.helpdesk.createEscalationRequest);
|
|
6859
6982
|
}
|
|
6860
|
-
function
|
|
6861
|
-
const n = R(), [r, i] = C(!1), [o, s] = C(null), l =
|
|
6983
|
+
function Br({ sessionId: t, visitorId: e }) {
|
|
6984
|
+
const n = R(), [r, i] = C(!1), [o, s] = C(null), l = Kc();
|
|
6862
6985
|
async function a() {
|
|
6863
6986
|
if (!t || !e)
|
|
6864
6987
|
return;
|
|
@@ -6901,23 +7024,23 @@ function Pr({ sessionId: t, visitorId: e }) {
|
|
|
6901
7024
|
o && /* @__PURE__ */ c("div", { class: "jex-handoff-error", role: "alert", children: o })
|
|
6902
7025
|
] });
|
|
6903
7026
|
}
|
|
6904
|
-
async function
|
|
6905
|
-
const t =
|
|
7027
|
+
async function Zc() {
|
|
7028
|
+
const t = Ui.value;
|
|
6906
7029
|
if (!t)
|
|
6907
7030
|
return console.warn("[JexityChat] Bootstrap refresh skipped — inputs missing"), { ok: !1, reason: "no-inputs" };
|
|
6908
|
-
const e = await
|
|
7031
|
+
const e = await Di(t.orgSlug, t.siteUrl, t.projSlug);
|
|
6909
7032
|
if (!e.ok)
|
|
6910
7033
|
return console.warn("[JexityChat] Bootstrap refresh failed:", e.error), { ok: !1, reason: e.error };
|
|
6911
7034
|
const n = e.token;
|
|
6912
7035
|
return le.value = n, { ok: !0, token: n };
|
|
6913
7036
|
}
|
|
6914
|
-
function
|
|
6915
|
-
return
|
|
7037
|
+
function Fr(t) {
|
|
7038
|
+
return po(t) ? "unauthorized" : t instanceof Error && /network|fetch|failed to fetch/i.test(t.message) ? "network" : "unknown";
|
|
6916
7039
|
}
|
|
6917
|
-
function
|
|
7040
|
+
function po(t) {
|
|
6918
7041
|
return t instanceof yt ? t.data?.code === "UNAUTHORIZED_ORIGIN" : !1;
|
|
6919
7042
|
}
|
|
6920
|
-
function
|
|
7043
|
+
function Yc(t = 1e4) {
|
|
6921
7044
|
return le.value ? Promise.resolve(le.value) : new Promise((e) => {
|
|
6922
7045
|
let n = !1;
|
|
6923
7046
|
const r = (s) => {
|
|
@@ -6929,9 +7052,9 @@ function Nc(t = 1e4) {
|
|
|
6929
7052
|
});
|
|
6930
7053
|
});
|
|
6931
7054
|
}
|
|
6932
|
-
function
|
|
6933
|
-
const n = ue(null), r =
|
|
6934
|
-
const g = await
|
|
7055
|
+
function Xc(t, e) {
|
|
7056
|
+
const n = ue(null), r = Te(!1), i = Te(!1), o = Te(!1), s = Te(null), l = It(Le.functions.chat.public.sessions.createOrResume), a = async (p) => {
|
|
7057
|
+
const g = await Yc();
|
|
6935
7058
|
if (!g)
|
|
6936
7059
|
return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), Se.value = "no-token", null;
|
|
6937
7060
|
const m = (y) => ({
|
|
@@ -6941,52 +7064,52 @@ function zc(t, e) {
|
|
|
6941
7064
|
bootstrapToken: y,
|
|
6942
7065
|
...jt.value ? { source: jt.value } : {}
|
|
6943
7066
|
});
|
|
6944
|
-
|
|
7067
|
+
dn.value = !0;
|
|
6945
7068
|
let x;
|
|
6946
7069
|
try {
|
|
6947
7070
|
try {
|
|
6948
7071
|
x = await l(m(g));
|
|
6949
7072
|
} catch (y) {
|
|
6950
|
-
if (!
|
|
7073
|
+
if (!po(y))
|
|
6951
7074
|
throw y;
|
|
6952
|
-
const I = await
|
|
7075
|
+
const I = await Zc();
|
|
6953
7076
|
if (!I.ok)
|
|
6954
7077
|
return Se.value = I.reason === "rate_limited" ? "network" : "unauthorized", null;
|
|
6955
7078
|
x = await l(m(I.token));
|
|
6956
7079
|
}
|
|
6957
7080
|
} finally {
|
|
6958
|
-
|
|
7081
|
+
dn.value = !1;
|
|
6959
7082
|
}
|
|
6960
7083
|
Se.value = null, s.value = x.status;
|
|
6961
7084
|
const v = { sessionId: x.sessionId, visitorId: p };
|
|
6962
7085
|
return n.current = v, { session: v, result: x };
|
|
6963
|
-
}, u =
|
|
7086
|
+
}, u = Re(async () => {
|
|
6964
7087
|
if (n.current)
|
|
6965
7088
|
return n.current;
|
|
6966
7089
|
if (o.value)
|
|
6967
7090
|
return null;
|
|
6968
7091
|
r.value = !0;
|
|
6969
|
-
const p = xe.value !== null, g = xe.value ??
|
|
7092
|
+
const p = xe.value !== null, g = xe.value ?? jr();
|
|
6970
7093
|
try {
|
|
6971
7094
|
const m = await a(g);
|
|
6972
7095
|
return m ? (p && m.result.isNew && (i.value = !0, o.value = !0), m.session) : null;
|
|
6973
7096
|
} catch (m) {
|
|
6974
|
-
return console.error("[JexityChat] Failed to create session:", m), Se.value =
|
|
7097
|
+
return console.error("[JexityChat] Failed to create session:", m), Se.value = Fr(m), null;
|
|
6975
7098
|
} finally {
|
|
6976
7099
|
r.value = !1;
|
|
6977
7100
|
}
|
|
6978
|
-
}, [t, e, l, r, i, o]), d =
|
|
7101
|
+
}, [t, e, l, r, i, o]), d = Re(() => {
|
|
6979
7102
|
n.current = null, i.value = !1, o.value = !1;
|
|
6980
7103
|
}, [i, o]);
|
|
6981
|
-
T(() =>
|
|
6982
|
-
const h =
|
|
7104
|
+
T(() => ol(d), [d]);
|
|
7105
|
+
const h = Re(async () => {
|
|
6983
7106
|
n.current = null, o.value = !1, i.value = !1;
|
|
6984
|
-
const p =
|
|
7107
|
+
const p = jr();
|
|
6985
7108
|
r.value = !0;
|
|
6986
7109
|
try {
|
|
6987
7110
|
return (await a(p))?.session ?? null;
|
|
6988
7111
|
} catch (g) {
|
|
6989
|
-
return console.error("[JexityChat] Failed to create fresh session:", g), Se.value =
|
|
7112
|
+
return console.error("[JexityChat] Failed to create fresh session:", g), Se.value = Fr(g), null;
|
|
6990
7113
|
} finally {
|
|
6991
7114
|
r.value = !1;
|
|
6992
7115
|
}
|
|
@@ -7004,14 +7127,14 @@ function zc(t, e) {
|
|
|
7004
7127
|
resetSession: d
|
|
7005
7128
|
};
|
|
7006
7129
|
}
|
|
7007
|
-
function
|
|
7130
|
+
function eu() {
|
|
7008
7131
|
const t = R(), [e, n] = C(""), [r, i] = C(""), [o, s] = C("");
|
|
7009
7132
|
async function l(a) {
|
|
7010
|
-
a.preventDefault(),
|
|
7133
|
+
a.preventDefault(), hn({ id: "loading", message: t.submittingTicket }), await new Promise((d) => {
|
|
7011
7134
|
setTimeout(d, 1200);
|
|
7012
7135
|
});
|
|
7013
7136
|
const u = "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
7014
|
-
|
|
7137
|
+
hn({ id: "confirmation", ref: u });
|
|
7015
7138
|
}
|
|
7016
7139
|
return /* @__PURE__ */ c("div", { class: "jex-form-screen", children: [
|
|
7017
7140
|
/* @__PURE__ */ c("h2", { class: "jex-form-title", children: t.submitTicket }),
|
|
@@ -7060,7 +7183,7 @@ function Bc() {
|
|
|
7060
7183
|
] })
|
|
7061
7184
|
] });
|
|
7062
7185
|
}
|
|
7063
|
-
function
|
|
7186
|
+
function tu({ ticketRef: t }) {
|
|
7064
7187
|
const e = R();
|
|
7065
7188
|
return /* @__PURE__ */ c("div", { class: "jex-confirmation", children: [
|
|
7066
7189
|
/* @__PURE__ */ c("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
|
|
@@ -7073,14 +7196,14 @@ function Fc({ ticketRef: t }) {
|
|
|
7073
7196
|
{
|
|
7074
7197
|
class: "jex-confirmation-done",
|
|
7075
7198
|
onClick: () => {
|
|
7076
|
-
|
|
7199
|
+
P.value = !1;
|
|
7077
7200
|
},
|
|
7078
7201
|
children: e.done
|
|
7079
7202
|
}
|
|
7080
7203
|
)
|
|
7081
7204
|
] });
|
|
7082
7205
|
}
|
|
7083
|
-
function
|
|
7206
|
+
function nu({ message: t, onRetry: e, onBack: n }) {
|
|
7084
7207
|
const r = R();
|
|
7085
7208
|
return /* @__PURE__ */ c("div", { class: "jex-overlay jex-error", children: [
|
|
7086
7209
|
/* @__PURE__ */ c("p", { class: "jex-error-message", children: t }),
|
|
@@ -7090,25 +7213,25 @@ function Qc({ message: t, onRetry: e, onBack: n }) {
|
|
|
7090
7213
|
] })
|
|
7091
7214
|
] });
|
|
7092
7215
|
}
|
|
7093
|
-
function
|
|
7216
|
+
function Ur({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visitorId: o, isLoading: s, sessionNotFound: l, resumeFailed: a, isOrgDeleted: u, ensureSession: d, startFresh: h, resetSession: f }) {
|
|
7094
7217
|
const p = z.value, g = p[p.length - 1], m = [...p].reverse().find(
|
|
7095
7218
|
(x) => x.id === "confirmation"
|
|
7096
7219
|
);
|
|
7097
7220
|
return /* @__PURE__ */ c("div", { class: "jex-screen-container", children: [
|
|
7098
|
-
g.id === "home" && /* @__PURE__ */ c(
|
|
7099
|
-
g.id === "selection" && /* @__PURE__ */ c(
|
|
7100
|
-
g.id === "form" && /* @__PURE__ */ c(
|
|
7221
|
+
g.id === "home" && /* @__PURE__ */ c(yl, { greeting: t, title: e, onStartFresh: h, onResetSession: f }),
|
|
7222
|
+
g.id === "selection" && /* @__PURE__ */ c(vl, { title: e }),
|
|
7223
|
+
g.id === "form" && /* @__PURE__ */ c(eu, {}),
|
|
7101
7224
|
g.id === "escalation-form" && /* @__PURE__ */ c(
|
|
7102
|
-
|
|
7225
|
+
Gc,
|
|
7103
7226
|
{
|
|
7104
7227
|
formMessageId: g.formMessageId,
|
|
7105
7228
|
sessionId: g.sessionId,
|
|
7106
7229
|
visitorId: g.visitorId
|
|
7107
7230
|
}
|
|
7108
7231
|
),
|
|
7109
|
-
g.id === "confirmation" && m && /* @__PURE__ */ c(
|
|
7232
|
+
g.id === "confirmation" && m && /* @__PURE__ */ c(tu, { ticketRef: m.ref }),
|
|
7110
7233
|
g.id === "chat" && /* @__PURE__ */ c(
|
|
7111
|
-
|
|
7234
|
+
Jc,
|
|
7112
7235
|
{
|
|
7113
7236
|
greeting: t,
|
|
7114
7237
|
orgSlug: n,
|
|
@@ -7123,43 +7246,52 @@ function Or({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
|
|
|
7123
7246
|
startFresh: h
|
|
7124
7247
|
}
|
|
7125
7248
|
),
|
|
7126
|
-
g.id === "loading" && /* @__PURE__ */ c(
|
|
7249
|
+
g.id === "loading" && /* @__PURE__ */ c(xn, { message: g.message }),
|
|
7127
7250
|
g.id === "error" && /* @__PURE__ */ c(
|
|
7128
|
-
|
|
7251
|
+
nu,
|
|
7129
7252
|
{
|
|
7130
7253
|
message: g.message,
|
|
7131
|
-
onRetry: () =>
|
|
7132
|
-
onBack:
|
|
7254
|
+
onRetry: () => hn({ id: "loading" }),
|
|
7255
|
+
onBack: Ct
|
|
7133
7256
|
}
|
|
7134
7257
|
)
|
|
7135
7258
|
] });
|
|
7136
7259
|
}
|
|
7137
|
-
function
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7260
|
+
function ru({ options: t }) {
|
|
7261
|
+
return Qa({
|
|
7262
|
+
orgSlug: t.orgSlug,
|
|
7263
|
+
projSlug: t.projSlug,
|
|
7264
|
+
preToken: t.bootstrapToken,
|
|
7265
|
+
convexUrl: t.convexUrl,
|
|
7266
|
+
preAllowedUrls: t.allowedUrls ?? [],
|
|
7267
|
+
preExcludedPaths: t.excludePaths
|
|
7268
|
+
}), Ha() ? /* @__PURE__ */ c(iu, { options: t }) : null;
|
|
7269
|
+
}
|
|
7270
|
+
function iu({ options: t }) {
|
|
7271
|
+
const e = Fa(t.orgSlug, t.projSlug, t.convexUrl);
|
|
7272
|
+
Ya(t.parentOrigin), T(() => {
|
|
7273
|
+
tl(), nl();
|
|
7142
7274
|
}, []);
|
|
7143
|
-
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } =
|
|
7275
|
+
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = Xc(t.orgSlug, t.projSlug), h = za(t, e);
|
|
7144
7276
|
T(() => {
|
|
7145
|
-
|
|
7277
|
+
An.value = Hi(h.locale);
|
|
7146
7278
|
}, [h.locale]), T(() => {
|
|
7147
|
-
if (!
|
|
7279
|
+
if (!P.value || h.mode === "embedded" || !window.matchMedia("(max-width: 480px), (pointer: coarse) and (max-width: 768px)").matches)
|
|
7148
7280
|
return;
|
|
7149
7281
|
const B = document.documentElement.style.overflow;
|
|
7150
7282
|
return document.documentElement.style.overflow = "hidden", () => {
|
|
7151
7283
|
document.documentElement.style.overflow = B;
|
|
7152
7284
|
};
|
|
7153
|
-
}, [
|
|
7285
|
+
}, [P.value, h.mode]), T(() => {
|
|
7154
7286
|
if (h.mode !== "embedded")
|
|
7155
7287
|
try {
|
|
7156
|
-
return
|
|
7288
|
+
return ll();
|
|
7157
7289
|
} catch (H) {
|
|
7158
7290
|
console.warn("[JexityChat] Idle-lock watcher failed to start:", H);
|
|
7159
7291
|
return;
|
|
7160
7292
|
}
|
|
7161
7293
|
}, [h.mode]);
|
|
7162
|
-
const f = h.position === "bottom-left", p = h.colorScheme === "dark" || h.colorScheme === "light" ? h.colorScheme : "", g =
|
|
7294
|
+
const f = h.position === "bottom-left", p = h.colorScheme === "dark" || h.colorScheme === "light" ? h.colorScheme : "", g = cl({
|
|
7163
7295
|
...t,
|
|
7164
7296
|
primaryColor: h.primaryColor,
|
|
7165
7297
|
accentColor: h.accentColor,
|
|
@@ -7168,23 +7300,23 @@ function Dc({ options: t }) {
|
|
|
7168
7300
|
borderRadius: h.borderRadius,
|
|
7169
7301
|
windowWidth: h.windowWidth,
|
|
7170
7302
|
windowHeight: h.windowHeight
|
|
7171
|
-
}), m = h.mode === "embedded", x = z.value, y = x[x.length - 1]?.id === "chat",
|
|
7303
|
+
}), m = h.mode === "embedded", x = z.value, y = x[x.length - 1]?.id === "chat", U = e !== null || m || !!t.parentOrigin ? g : { ...g, visibility: "hidden" };
|
|
7172
7304
|
return /* @__PURE__ */ c(
|
|
7173
7305
|
"div",
|
|
7174
7306
|
{
|
|
7175
7307
|
class: `jex-widget ${p}`.trim(),
|
|
7176
|
-
style:
|
|
7308
|
+
style: U,
|
|
7177
7309
|
children: m ? /* @__PURE__ */ c("div", { class: "jex-embedded", children: [
|
|
7178
7310
|
/* @__PURE__ */ c(
|
|
7179
|
-
|
|
7311
|
+
Tr,
|
|
7180
7312
|
{
|
|
7181
7313
|
title: h.title,
|
|
7182
|
-
rightAction: y ? /* @__PURE__ */ c(
|
|
7314
|
+
rightAction: y ? /* @__PURE__ */ c(Br, { sessionId: n, visitorId: r }) : null,
|
|
7183
7315
|
showClose: !m
|
|
7184
7316
|
}
|
|
7185
7317
|
),
|
|
7186
7318
|
/* @__PURE__ */ c(
|
|
7187
|
-
|
|
7319
|
+
Ur,
|
|
7188
7320
|
{
|
|
7189
7321
|
greeting: h.greeting,
|
|
7190
7322
|
title: h.title,
|
|
@@ -7201,18 +7333,18 @@ function Dc({ options: t }) {
|
|
|
7201
7333
|
resetSession: d
|
|
7202
7334
|
}
|
|
7203
7335
|
),
|
|
7204
|
-
!h.hideBranding && /* @__PURE__ */ c(
|
|
7336
|
+
!h.hideBranding && /* @__PURE__ */ c(Rr, {})
|
|
7205
7337
|
] }) : /* @__PURE__ */ c("div", { class: `jex-container${f ? " jex-pos-left" : ""}`, children: [
|
|
7206
|
-
|
|
7338
|
+
P.value && /* @__PURE__ */ c("div", { class: "jex-chat-window", children: [
|
|
7207
7339
|
/* @__PURE__ */ c(
|
|
7208
|
-
|
|
7340
|
+
Tr,
|
|
7209
7341
|
{
|
|
7210
7342
|
title: h.title,
|
|
7211
|
-
rightAction: y ? /* @__PURE__ */ c(
|
|
7343
|
+
rightAction: y ? /* @__PURE__ */ c(Br, { sessionId: n, visitorId: r }) : null
|
|
7212
7344
|
}
|
|
7213
7345
|
),
|
|
7214
7346
|
/* @__PURE__ */ c(
|
|
7215
|
-
|
|
7347
|
+
Ur,
|
|
7216
7348
|
{
|
|
7217
7349
|
greeting: h.greeting,
|
|
7218
7350
|
title: h.title,
|
|
@@ -7229,10 +7361,10 @@ function Dc({ options: t }) {
|
|
|
7229
7361
|
resetSession: d
|
|
7230
7362
|
}
|
|
7231
7363
|
),
|
|
7232
|
-
!h.hideBranding && /* @__PURE__ */ c(
|
|
7364
|
+
!h.hideBranding && /* @__PURE__ */ c(Rr, {})
|
|
7233
7365
|
] }),
|
|
7234
7366
|
/* @__PURE__ */ c(
|
|
7235
|
-
|
|
7367
|
+
bl,
|
|
7236
7368
|
{
|
|
7237
7369
|
iconOption: h.triggerIcon,
|
|
7238
7370
|
radius: h.triggerRadius,
|
|
@@ -7243,34 +7375,34 @@ function Dc({ options: t }) {
|
|
|
7243
7375
|
}
|
|
7244
7376
|
);
|
|
7245
7377
|
}
|
|
7246
|
-
const Uc = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
|
|
7247
|
-
function
|
|
7378
|
+
const ou = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-privacy-notice{margin:0;text-align:center;font-size:10px;line-height:1.5;color:var(--jex-text-muted)}.jex-privacy-notice-link{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px;text-decoration-color:color-mix(in srgb,var(--jex-primary) 50%,transparent);transition:text-decoration-color .15s}.jex-privacy-notice-link:hover{text-decoration-color:var(--jex-primary)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
|
|
7379
|
+
function su(t) {
|
|
7248
7380
|
const e = document.createElement("style");
|
|
7249
|
-
e.textContent =
|
|
7381
|
+
e.textContent = ou, t.appendChild(e);
|
|
7250
7382
|
}
|
|
7251
|
-
const
|
|
7252
|
-
let
|
|
7253
|
-
function
|
|
7254
|
-
const e = t ??
|
|
7383
|
+
const au = "https://festive-mouse-978.eu-west-1.convex.cloud";
|
|
7384
|
+
let Gt = null;
|
|
7385
|
+
function lu(t) {
|
|
7386
|
+
const e = t ?? au;
|
|
7255
7387
|
if (!e)
|
|
7256
7388
|
throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
|
|
7257
|
-
return
|
|
7389
|
+
return Gt || (Gt = new wa(Na(e))), Gt;
|
|
7258
7390
|
}
|
|
7259
|
-
function
|
|
7391
|
+
function cu(t, e) {
|
|
7260
7392
|
const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
|
|
7261
7393
|
for (; n.firstChild; )
|
|
7262
7394
|
n.removeChild(n.firstChild);
|
|
7263
|
-
|
|
7395
|
+
su(n), jt.value = e.source, le.value = e.bootstrapToken, z.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), P.value = !0);
|
|
7264
7396
|
const r = document.createElement("div");
|
|
7265
7397
|
return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r), ge(
|
|
7266
|
-
/* @__PURE__ */ c(
|
|
7398
|
+
/* @__PURE__ */ c(ja, { client: lu(e.convexUrl), children: /* @__PURE__ */ c(ru, { options: e }) }),
|
|
7267
7399
|
r
|
|
7268
7400
|
), function() {
|
|
7269
|
-
ge(null, r),
|
|
7401
|
+
ge(null, r), P.value = !1, jt.value = void 0, le.value = void 0, z.value = [{ id: "home" }];
|
|
7270
7402
|
};
|
|
7271
7403
|
}
|
|
7272
|
-
function
|
|
7273
|
-
const r =
|
|
7404
|
+
function uu(t, e, n) {
|
|
7405
|
+
const r = cu(t, e), i = /* @__PURE__ */ new Set(), o = P.subscribe((l) => {
|
|
7274
7406
|
for (const a of i)
|
|
7275
7407
|
a(l);
|
|
7276
7408
|
});
|
|
@@ -7279,16 +7411,16 @@ function Kc(t, e, n) {
|
|
|
7279
7411
|
o(), i.clear(), r(), n && n();
|
|
7280
7412
|
},
|
|
7281
7413
|
open() {
|
|
7282
|
-
|
|
7414
|
+
P.value = !0;
|
|
7283
7415
|
},
|
|
7284
7416
|
close() {
|
|
7285
|
-
|
|
7417
|
+
P.value = !1;
|
|
7286
7418
|
},
|
|
7287
7419
|
toggle() {
|
|
7288
|
-
|
|
7420
|
+
P.value = !P.value;
|
|
7289
7421
|
},
|
|
7290
7422
|
get isOpen() {
|
|
7291
|
-
return
|
|
7423
|
+
return P.value;
|
|
7292
7424
|
},
|
|
7293
7425
|
subscribe(l) {
|
|
7294
7426
|
return i.add(l), () => {
|
|
@@ -7297,17 +7429,17 @@ function Kc(t, e, n) {
|
|
|
7297
7429
|
}
|
|
7298
7430
|
};
|
|
7299
7431
|
}
|
|
7300
|
-
let
|
|
7301
|
-
function
|
|
7302
|
-
|
|
7432
|
+
let Ue = null;
|
|
7433
|
+
function hu(t) {
|
|
7434
|
+
Ue && Ue.shutdown();
|
|
7303
7435
|
let e;
|
|
7304
7436
|
t.container ? e = typeof t.container == "string" ? document.querySelector(t.container) : t.container : (e = document.createElement("div"), e.id = "jexity-chat-widget", document.body.appendChild(e));
|
|
7305
|
-
const n =
|
|
7306
|
-
t.container || e.remove(),
|
|
7437
|
+
const n = uu(e, t, () => {
|
|
7438
|
+
t.container || e.remove(), Ue === n && (Ue = null);
|
|
7307
7439
|
});
|
|
7308
|
-
return
|
|
7440
|
+
return Ue = n, n;
|
|
7309
7441
|
}
|
|
7310
7442
|
export {
|
|
7311
|
-
|
|
7443
|
+
hu as JexityChat
|
|
7312
7444
|
};
|
|
7313
7445
|
//# sourceMappingURL=index.mjs.map
|