@evelan/jexity-widget 0.11.7 → 0.11.9
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 +334 -305
- package/dist/index.mjs.map +1 -1
- package/dist/react.mjs +226 -197
- package/dist/react.mjs.map +1 -1
- package/dist/types/features/chat/components/BotMessage.d.ts.map +1 -1
- package/dist/types/features/chat/components/MessageList.d.ts.map +1 -1
- package/dist/types/features/chat/components/SourcesRow.d.ts.map +1 -1
- package/dist/types/i18n/locales/de.d.ts.map +1 -1
- package/dist/types/i18n/locales/en.d.ts +14 -0
- package/dist/types/i18n/locales/en.d.ts.map +1 -1
- package/dist/widget.js +22 -14
- package/dist/widget.js.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var it, b, Nr, zr, he, zn, Br, Fr, Qr, gn,
|
|
1
|
+
var it, b, Nr, zr, he, zn, Br, Fr, Qr, gn, Kt, Gt, Dr, Ze = {}, Ur = [], co = /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;
|
|
@@ -22,7 +22,7 @@ function uo() {
|
|
|
22
22
|
function F(t) {
|
|
23
23
|
return t.children;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function K(t, e) {
|
|
26
26
|
this.props = t, this.context = e;
|
|
27
27
|
}
|
|
28
28
|
function Re(t, e) {
|
|
@@ -55,7 +55,7 @@ function Hr(t, e, n, r, i, o, s, l, a, u, d) {
|
|
|
55
55
|
function ho(t, e, n, r, i) {
|
|
56
56
|
var o, s, l, a, u, d = n.length, h = d, f = 0;
|
|
57
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 = fo(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 = Re(l)),
|
|
58
|
+
if (h) for (o = 0; o < d; o++) (l = n[o]) != null && (2 & l.__u) == 0 && (l.__e == r && (r = Re(l)), Gr(l, l));
|
|
59
59
|
return r;
|
|
60
60
|
}
|
|
61
61
|
function Wr(t, e, n, r) {
|
|
@@ -93,7 +93,7 @@ function ut(t, e, n, r, i) {
|
|
|
93
93
|
if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || Bn(t.style, e, "");
|
|
94
94
|
if (n) for (e in n) r && n[e] == r[e] || Bn(t.style, e, n[e]);
|
|
95
95
|
}
|
|
96
|
-
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(Qr, "$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 = gn, t.addEventListener(e, o ?
|
|
96
|
+
else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(Qr, "$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 = gn, t.addEventListener(e, o ? Gt : Kt, o)) : t.removeEventListener(e, o ? Gt : 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 {
|
|
@@ -115,11 +115,11 @@ function Fn(t) {
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
function xn(t, e, n, r, i, o, s, l, a, u) {
|
|
118
|
-
var d, h, f, p, g, m, x, v, y, I, Q, H, B, Nn, ct, Ne,
|
|
118
|
+
var d, h, f, p, g, m, x, v, y, I, Q, H, B, Nn, ct, Ne, Lt, 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], Q = d ? I ? I.props.value : d.__ : r, n.__c ? x = (h = e.__c = n.__c).__ = h.__E : (y ? e.__c = h = new Z(v, Q) : (e.__c = h = new
|
|
122
|
+
if (v = e.props, y = "prototype" in Z && Z.prototype.render, I = (d = Z.contextType) && r[d.__c], Q = d ? I ? I.props.value : d.__ : r, n.__c ? x = (h = e.__c = n.__c).__ = h.__E : (y ? e.__c = h = new Z(v, Q) : (e.__c = h = new K(v, Q), h.constructor = Z, h.render = go), I && I.sub(h), h.props = v, h.state || (h.state = {}), h.context = Q, 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
124
|
if (y && Z.getDerivedStateFromProps == null && v !== p && h.componentWillReceiveProps != null && h.componentWillReceiveProps(v, Q), !h.__e && h.shouldComponentUpdate != null && h.shouldComponentUpdate(v, h.__s, Q) === !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) {
|
|
@@ -138,13 +138,13 @@ function xn(t, e, n, r, i, o, s, l, a, u) {
|
|
|
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
140
|
while (h.__d && ++Nn < 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)), Ne = d, d != null && d.type === F && d.key == null && (Ne =
|
|
141
|
+
h.state = h.__s, h.getChildContext != null && (r = te(te({}, r), h.getChildContext())), y && !f && h.getSnapshotBeforeUpdate != null && (m = h.getSnapshotBeforeUpdate(p, g)), Ne = d, d != null && d.type === F && d.key == null && (Ne = Kr(d.props.children)), l = Hr(t, ot(Ne) ? Ne : [Ne], 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 (
|
|
147
|
+
for (Lt = o.length; Lt--; ) mn(o[Lt]);
|
|
148
148
|
Yt(e);
|
|
149
149
|
}
|
|
150
150
|
else e.__e = n.__e, e.__k = n.__k, _e.then || Yt(e);
|
|
@@ -168,8 +168,8 @@ 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 Kr(t) {
|
|
172
|
+
return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : ot(t) ? t.map(Kr) : te({}, t);
|
|
173
173
|
}
|
|
174
174
|
function po(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;
|
|
@@ -210,7 +210,7 @@ function bn(t, e, n) {
|
|
|
210
210
|
b.__e(i, n);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Gr(t, e, n) {
|
|
214
214
|
var r, i;
|
|
215
215
|
if (b.unmount && b.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || bn(r, null, e)), (r = t.__c) != null) {
|
|
216
216
|
if (r.componentWillUnmount) try {
|
|
@@ -220,7 +220,7 @@ function Kr(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] &&
|
|
223
|
+
if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && Gr(r[i], e, n || typeof t.type != "function");
|
|
224
224
|
n || mn(t.__e), t.__c = t.__ = t.__e = void 0;
|
|
225
225
|
}
|
|
226
226
|
function go(t, e, n) {
|
|
@@ -270,14 +270,14 @@ it = Ur.slice, b = { __e: function(t, e, n, r) {
|
|
|
270
270
|
throw t;
|
|
271
271
|
} }, Nr = 0, zr = function(t) {
|
|
272
272
|
return t != null && t.constructor == null;
|
|
273
|
-
},
|
|
273
|
+
}, K.prototype.setState = function(t, e) {
|
|
274
274
|
var n;
|
|
275
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), Zt(this));
|
|
276
|
-
},
|
|
276
|
+
}, K.prototype.forceUpdate = function(t) {
|
|
277
277
|
this.__v && (this.__e = !0, t && this.__h.push(t), Zt(this));
|
|
278
|
-
},
|
|
278
|
+
}, K.prototype.render = F, he = [], Br = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Fr = function(t, e) {
|
|
279
279
|
return t.__v.__b - e.__v.__b;
|
|
280
|
-
}, bt.__r = 0, Qr = /(PointerCapture)$|Capture$/i, gn = 0,
|
|
280
|
+
}, bt.__r = 0, Qr = /(PointerCapture)$|Capture$/i, gn = 0, Kt = Fn(!1), Gt = Fn(!0), Dr = 0;
|
|
281
281
|
var bo = 0;
|
|
282
282
|
function c(t, e, n, r, i, o) {
|
|
283
283
|
e || (e = {});
|
|
@@ -287,17 +287,17 @@ function c(t, e, n, r, i, 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, Ot, Qn,
|
|
291
|
-
function
|
|
292
|
-
S.__h && S.__h(j, t,
|
|
290
|
+
var ce, j, Ot, Qn, Ae = 0, Yr = [], S = b, Dn = S.__b, Un = S.__r, Vn = S.diffed, Hn = S.__c, Wn = S.unmount, Jn = S.__;
|
|
291
|
+
function qe(t, e) {
|
|
292
|
+
S.__h && S.__h(j, t, Ae || e), Ae = 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 Ae = 1, yn(ni, t);
|
|
298
298
|
}
|
|
299
299
|
function yn(t, e, n) {
|
|
300
|
-
var r =
|
|
300
|
+
var r = qe(ce++, 2);
|
|
301
301
|
if (r.t = t, !r.__c && (r.__ = [n ? n(e) : ni(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({}));
|
|
@@ -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 =
|
|
334
|
+
var n = qe(ce++, 3);
|
|
335
335
|
!S.__s && vn(n.__H, e) && (n.__ = t, n.u = e, j.__H.__h.push(n));
|
|
336
336
|
}
|
|
337
337
|
function st(t, e) {
|
|
338
|
-
var n =
|
|
338
|
+
var n = qe(ce++, 4);
|
|
339
339
|
!S.__s && vn(n.__H, e) && (n.__ = t, n.u = e, j.__h.push(n));
|
|
340
340
|
}
|
|
341
341
|
function ue(t) {
|
|
342
|
-
return
|
|
342
|
+
return Ae = 5, G(function() {
|
|
343
343
|
return { current: t };
|
|
344
344
|
}, []);
|
|
345
345
|
}
|
|
346
346
|
function Xr(t, e, n) {
|
|
347
|
-
|
|
347
|
+
Ae = 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 =
|
|
359
|
+
function G(t, e) {
|
|
360
|
+
var n = qe(ce++, 7);
|
|
361
361
|
return vn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
|
|
362
362
|
}
|
|
363
363
|
function Te(t, e) {
|
|
364
|
-
return
|
|
364
|
+
return Ae = 8, G(function() {
|
|
365
365
|
return t;
|
|
366
366
|
}, e);
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
var e = j.context[t.__c], n =
|
|
368
|
+
function At(t) {
|
|
369
|
+
var e = j.context[t.__c], n = qe(ce++, 9);
|
|
370
370
|
return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(j)), e.props.value) : t.__;
|
|
371
371
|
}
|
|
372
372
|
function ei(t, e) {
|
|
373
373
|
S.useDebugValue && S.useDebugValue(e ? e(t) : t);
|
|
374
374
|
}
|
|
375
375
|
function ti() {
|
|
376
|
-
var t =
|
|
376
|
+
var t = qe(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]);
|
|
@@ -427,12 +427,12 @@ S.__b = function(t) {
|
|
|
427
427
|
}
|
|
428
428
|
}), n.__H = void 0, e && S.__e(e, n.__v));
|
|
429
429
|
};
|
|
430
|
-
var
|
|
430
|
+
var Kn = typeof requestAnimationFrame == "function";
|
|
431
431
|
function vo(t) {
|
|
432
432
|
var e, n = function() {
|
|
433
|
-
clearTimeout(r),
|
|
433
|
+
clearTimeout(r), Kn && cancelAnimationFrame(e), setTimeout(t);
|
|
434
434
|
}, r = setTimeout(n, 35);
|
|
435
|
-
|
|
435
|
+
Kn && (e = requestAnimationFrame(n));
|
|
436
436
|
}
|
|
437
437
|
function gt(t) {
|
|
438
438
|
var e = j, n = t.__c;
|
|
@@ -501,12 +501,12 @@ function _o(t, e) {
|
|
|
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
|
-
(tn.prototype = new
|
|
504
|
+
(tn.prototype = new K()).isPureReactComponent = !0, tn.prototype.shouldComponentUpdate = function(t, e) {
|
|
505
505
|
return en(this.props, t) || en(this.state, e);
|
|
506
506
|
};
|
|
507
|
-
var
|
|
507
|
+
var Gn = 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), Gn && Gn(t);
|
|
510
510
|
};
|
|
511
511
|
var wo = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
|
|
512
512
|
function ko(t) {
|
|
@@ -570,7 +570,7 @@ function Qe() {
|
|
|
570
570
|
b.unmount = function(t) {
|
|
571
571
|
var e = t.__c;
|
|
572
572
|
e && e.__R && e.__R(), e && 32 & t.__u && (t.type = null), Yn && Yn(t);
|
|
573
|
-
}, (mt.prototype = new
|
|
573
|
+
}, (mt.prototype = new K()).__c = function(t, e) {
|
|
574
574
|
var n = e.__c, r = this;
|
|
575
575
|
r.o == null && (r.o = []), r.o.push(n);
|
|
576
576
|
var i = hi(r.__v), o = !1, s = function() {
|
|
@@ -629,11 +629,11 @@ function Ro(t) {
|
|
|
629
629
|
}
|
|
630
630
|
ge(V(To, { context: e.context }, t.__v), e.v);
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function Ao(t, e) {
|
|
633
633
|
var n = V(Ro, { __v: t, h: e });
|
|
634
634
|
return n.containerInfo = e, n;
|
|
635
635
|
}
|
|
636
|
-
(Qe.prototype = new
|
|
636
|
+
(Qe.prototype = new K()).__a = function(t) {
|
|
637
637
|
var e = this, n = hi(e.__v), r = e.l.get(t);
|
|
638
638
|
return r[0]++, function(i) {
|
|
639
639
|
var o = function() {
|
|
@@ -653,17 +653,17 @@ function $o(t, e) {
|
|
|
653
653
|
Xn(t, n, e);
|
|
654
654
|
});
|
|
655
655
|
};
|
|
656
|
-
var di = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103,
|
|
656
|
+
var di = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.element") || 60103, $o = /^(?: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]/, Eo = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Io = /[A-Z0-9]/g, Mo = typeof document < "u", qo = 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 Po(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
|
|
662
|
+
function Lo(t, e, n) {
|
|
663
663
|
return Zr(t, e), typeof n == "function" && n(), t ? t.__c : null;
|
|
664
664
|
}
|
|
665
|
-
|
|
666
|
-
Object.defineProperty(
|
|
665
|
+
K.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
|
|
666
|
+
Object.defineProperty(K.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 });
|
|
@@ -689,9 +689,9 @@ b.vnode = function(t) {
|
|
|
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 || Mo && 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" || qo(n.type) ? a === "onfocus" ? s = "onfocusin" : a === "onblur" ? s = "onfocusout" : Eo.test(s) && (s = a) : a = s = "oninput" : o && $o.test(s) ? s = s.replace(Io, "-$&").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) {
|
|
@@ -713,21 +713,21 @@ b.diffed = function(t) {
|
|
|
713
713
|
};
|
|
714
714
|
var Fo = { ReactCurrentDispatcher: { current: { readContext: function(t) {
|
|
715
715
|
return _n.__n[t.__c].props.value;
|
|
716
|
-
}, useCallback: Te, useContext:
|
|
716
|
+
}, useCallback: Te, useContext: At, useDebugValue: ei, useDeferredValue: si, useEffect: T, useId: ti, useImperativeHandle: Xr, useInsertionEffect: li, useLayoutEffect: st, useMemo: G, useReducer: yn, useRef: ue, useState: C, useSyncExternalStore: ii, useTransition: ai } } };
|
|
717
717
|
function Qo(t) {
|
|
718
718
|
return V.bind(null, t);
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function $t(t) {
|
|
721
721
|
return !!t && t.$$typeof === di;
|
|
722
722
|
}
|
|
723
723
|
function Do(t) {
|
|
724
|
-
return
|
|
724
|
+
return $t(t) && t.type === F;
|
|
725
725
|
}
|
|
726
726
|
function Uo(t) {
|
|
727
727
|
return !!t && !!t.displayName && (typeof t.displayName == "string" || t.displayName instanceof String) && t.displayName.startsWith("Memo(");
|
|
728
728
|
}
|
|
729
729
|
function Vo(t) {
|
|
730
|
-
return
|
|
730
|
+
return $t(t) ? mo.apply(null, arguments) : t;
|
|
731
731
|
}
|
|
732
732
|
function Ho(t) {
|
|
733
733
|
return !!t.__k && (ge(null, t), !0);
|
|
@@ -737,9 +737,9 @@ function Wo(t) {
|
|
|
737
737
|
}
|
|
738
738
|
var Jo = function(t, e) {
|
|
739
739
|
return t(e);
|
|
740
|
-
},
|
|
740
|
+
}, Ko = function(t, e) {
|
|
741
741
|
return t(e);
|
|
742
|
-
},
|
|
742
|
+
}, Go = F, Zo = $t, wn = { useState: C, useId: ti, useReducer: yn, useEffect: T, useLayoutEffect: st, useInsertionEffect: li, useTransition: ai, useDeferredValue: si, useSyncExternalStore: ii, startTransition: oi, useRef: ue, useImperativeHandle: Xr, useMemo: G, useCallback: Te, useContext: At, useDebugValue: ei, version: "18.3.1", Children: jo, render: Po, hydrate: Lo, unmountComponentAtNode: Ho, createPortal: Ao, createElement: V, createContext: xo, createFactory: Qo, cloneElement: Vo, createRef: uo, Fragment: F, isValidElement: $t, isElement: Zo, isFragment: Do, isMemo: Uo, findDOMNode: Wo, Component: K, PureComponent: tn, memo: _o, forwardRef: ko, flushSync: Ko, unstable_batchedUpdates: Jo, StrictMode: Go, Suspense: mt, SuspenseList: Qe, lazy: Co, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Fo }, ee = [], U = [], Yo = Uint8Array, zt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
743
743
|
for (var we = 0, Xo = zt.length; we < Xo; ++we)
|
|
744
744
|
ee[we] = zt[we], U[zt.charCodeAt(we)] = we;
|
|
745
745
|
U[45] = 62;
|
|
@@ -823,12 +823,12 @@ function fi(t) {
|
|
|
823
823
|
n?.constructor?.name === "Object";
|
|
824
824
|
return e && r;
|
|
825
825
|
}
|
|
826
|
-
const pi = !0,
|
|
826
|
+
const pi = !0, $e = BigInt("-9223372036854775808"), kn = BigInt("9223372036854775807"), nn = BigInt("0"), os = BigInt("8"), ss = BigInt("256");
|
|
827
827
|
function gi(t) {
|
|
828
828
|
return Number.isNaN(t) || !Number.isFinite(t) || Object.is(t, -0);
|
|
829
829
|
}
|
|
830
830
|
function as(t) {
|
|
831
|
-
t < nn && (t -=
|
|
831
|
+
t < nn && (t -= $e + $e);
|
|
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));
|
|
@@ -846,10 +846,10 @@ function ls(t) {
|
|
|
846
846
|
let n = nn, r = nn;
|
|
847
847
|
for (const i of e)
|
|
848
848
|
n += BigInt(i) * ss ** r, r++;
|
|
849
|
-
return n > kn && (n +=
|
|
849
|
+
return n > kn && (n += $e + $e), n;
|
|
850
850
|
}
|
|
851
851
|
function cs(t) {
|
|
852
|
-
if (t <
|
|
852
|
+
if (t < $e || kn < t)
|
|
853
853
|
throw new Error(
|
|
854
854
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
855
855
|
);
|
|
@@ -950,7 +950,7 @@ 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 < $e || kn < t)
|
|
954
954
|
throw new Error(
|
|
955
955
|
`BigInt ${t} does not fit into a 64-bit signed integer.`
|
|
956
956
|
);
|
|
@@ -1530,8 +1530,8 @@ function ji(t = []) {
|
|
|
1530
1530
|
};
|
|
1531
1531
|
return new Proxy({}, e);
|
|
1532
1532
|
}
|
|
1533
|
-
const
|
|
1534
|
-
var
|
|
1533
|
+
const As = ji();
|
|
1534
|
+
var $s = Object.defineProperty, Es = (t, e, n) => e in t ? $s(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, _t = (t, e, n) => Es(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 = [];
|
|
@@ -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 Ms = Object.defineProperty, qs = (t, e, n) => e in t ? Ms(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Qt = (t, e, n) => qs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1645
|
+
class L {
|
|
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 q {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
// prettier-ignore
|
|
1653
1653
|
static fromBytesLE(e) {
|
|
1654
|
-
return new
|
|
1654
|
+
return new L(
|
|
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 q {
|
|
|
1671
1671
|
];
|
|
1672
1672
|
}
|
|
1673
1673
|
static fromNumber(e) {
|
|
1674
|
-
return isNaN(e) || e < 0 ? hr : e >=
|
|
1674
|
+
return isNaN(e) || e < 0 ? hr : e >= Ps ? Ls : new L(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 L.isLong(e) || (e = L.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 L.isLong(e) || (e = L.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 q {
|
|
|
1692
1692
|
) <= 0;
|
|
1693
1693
|
}
|
|
1694
1694
|
static fromValue(e) {
|
|
1695
|
-
return typeof e == "number" ?
|
|
1695
|
+
return typeof e == "number" ? L.fromNumber(e) : new L(e.low, e.high);
|
|
1696
1696
|
}
|
|
1697
1697
|
}
|
|
1698
|
-
const hr = new
|
|
1698
|
+
const hr = new L(0, 0), dr = 65536, Je = dr * dr, Ps = Je * Je, Ls = new L(-1, -1);
|
|
1699
1699
|
var Os = Object.defineProperty, Ns = (t, e, n) => e in t ? Os(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, dt = (t, e, n) => Ns(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1700
1700
|
class fr {
|
|
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: L.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;
|
|
@@ -1754,7 +1754,7 @@ class fr {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
function Dt(t) {
|
|
1756
1756
|
const e = Ye(t);
|
|
1757
|
-
return
|
|
1757
|
+
return L.fromBytesLE(Array.from(e));
|
|
1758
1758
|
}
|
|
1759
1759
|
function zs(t) {
|
|
1760
1760
|
const e = new Uint8Array(t.toBytesLE());
|
|
@@ -1799,7 +1799,7 @@ function Bs(t) {
|
|
|
1799
1799
|
} : { ...t, maxObservedTimestamp: void 0 };
|
|
1800
1800
|
}
|
|
1801
1801
|
}
|
|
1802
|
-
var Fs = Object.defineProperty, Qs = (t, e, n) => e in t ? Fs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n,
|
|
1802
|
+
var Fs = Object.defineProperty, Qs = (t, e, n) => e in t ? Fs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, A = (t, e, n) => Qs(t, typeof e != "symbol" ? e + "" : e, n);
|
|
1803
1803
|
const Ds = 1e3, Us = 1001, Vs = 1005, Hs = 4040;
|
|
1804
1804
|
let xt;
|
|
1805
1805
|
function je() {
|
|
@@ -1839,7 +1839,7 @@ function Ws(t) {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
class Js {
|
|
1841
1841
|
constructor(e, n, r, i, o, s) {
|
|
1842
|
-
this.markConnectionStateDirty = o, this.debug = s,
|
|
1842
|
+
this.markConnectionStateDirty = o, this.debug = s, A(this, "socket"), A(this, "connectionCount"), A(this, "_hasEverConnected", !1), A(this, "lastCloseReason"), A(this, "transitionChunkBuffer", null), A(this, "defaultInitialBackoff"), A(this, "maxBackoff"), A(this, "retries"), A(this, "serverInactivityThreshold"), A(this, "reconnectDueToServerInactivityTimeout"), A(this, "scheduledReconnect", null), A(this, "networkOnlineHandler", null), A(this, "pendingNetworkRecoveryInfo", null), A(this, "uri"), A(this, "onOpen"), A(this, "onResume"), A(this, "onMessage"), A(this, "webSocketConstructor"), A(this, "logger"), A(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(
|
|
@@ -2228,10 +2228,10 @@ class Js {
|
|
|
2228
2228
|
});
|
|
2229
2229
|
}
|
|
2230
2230
|
}
|
|
2231
|
-
function Gs() {
|
|
2232
|
-
return Ks();
|
|
2233
|
-
}
|
|
2234
2231
|
function Ks() {
|
|
2232
|
+
return Gs();
|
|
2233
|
+
}
|
|
2234
|
+
function Gs() {
|
|
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);
|
|
@@ -2589,7 +2589,7 @@ class ca {
|
|
|
2589
2589
|
}
|
|
2590
2590
|
), this.optimisticQueryResults = new Is(), this.addOnTransitionHandler((p) => {
|
|
2591
2591
|
n(p.queries.map((g) => g.token));
|
|
2592
|
-
}), this._nextRequestId = 0, this._sessionId =
|
|
2592
|
+
}), this._nextRequestId = 0, this._sessionId = Ks();
|
|
2593
2593
|
const { unsavedChangesWarning: f } = r;
|
|
2594
2594
|
if (typeof window > "u" || typeof window.addEventListener > "u") {
|
|
2595
2595
|
if (f === !0)
|
|
@@ -3101,7 +3101,7 @@ function Ut(t) {
|
|
|
3101
3101
|
var ua = Object.defineProperty, ha = (t, e, n) => e in t ? ua(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, xr = (t, e, n) => ha(t, typeof e != "symbol" ? e + "" : e, n);
|
|
3102
3102
|
class da {
|
|
3103
3103
|
constructor(e, n) {
|
|
3104
|
-
this.client = e, this.onTransition = n, xr(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), xr(this, "lastTransitionTs"), this.lastTransitionTs =
|
|
3104
|
+
this.client = e, this.onTransition = n, xr(this, "paginatedQuerySet", /* @__PURE__ */ new Map()), xr(this, "lastTransitionTs"), this.lastTransitionTs = L.fromNumber(0), this.client.addOnTransitionHandler(
|
|
3105
3105
|
(r) => this.onBaseTransition(r)
|
|
3106
3106
|
);
|
|
3107
3107
|
}
|
|
@@ -3735,7 +3735,7 @@ const jn = wn.createContext(
|
|
|
3735
3735
|
// in the future this will be a mocked client for testing
|
|
3736
3736
|
);
|
|
3737
3737
|
function ba() {
|
|
3738
|
-
return
|
|
3738
|
+
return At(jn);
|
|
3739
3739
|
}
|
|
3740
3740
|
const ya = ({ client: t, children: e }) => wn.createElement(
|
|
3741
3741
|
jn.Provider,
|
|
@@ -3743,7 +3743,7 @@ const ya = ({ client: t, children: e }) => wn.createElement(
|
|
|
3743
3743
|
e
|
|
3744
3744
|
);
|
|
3745
3745
|
function br(t, ...e) {
|
|
3746
|
-
const n = e[0] === "skip", r = e[0] === "skip" ? {} : oe(e[0]), i = typeof t == "string" ? ki(t) : t, o = O(i), s =
|
|
3746
|
+
const n = e[0] === "skip", r = e[0] === "skip" ? {} : oe(e[0]), i = typeof t == "string" ? ki(t) : t, o = O(i), s = G(
|
|
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.
|
|
@@ -3755,12 +3755,12 @@ function br(t, ...e) {
|
|
|
3755
3755
|
return a;
|
|
3756
3756
|
}
|
|
3757
3757
|
function Et(t) {
|
|
3758
|
-
const e = typeof t == "string" ? ki(t) : t, n =
|
|
3758
|
+
const e = typeof t == "string" ? ki(t) : t, n = At(jn);
|
|
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
|
|
3763
|
+
return G(
|
|
3764
3764
|
() => Ti(e, n),
|
|
3765
3765
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3766
3766
|
[n, O(e)]
|
|
@@ -3880,7 +3880,7 @@ function ja(t) {
|
|
|
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 = G(() => (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]);
|
|
@@ -3889,7 +3889,7 @@ function ja(t) {
|
|
|
3889
3889
|
function Sa(t, e) {
|
|
3890
3890
|
const [n] = C(() => new ka(e));
|
|
3891
3891
|
n.createWatch !== e && n.setCreateWatch(e), T(() => () => n.destroy(), [n]);
|
|
3892
|
-
const r =
|
|
3892
|
+
const r = G(
|
|
3893
3893
|
() => ({
|
|
3894
3894
|
getCurrentValue: () => n.getLocalResults(t),
|
|
3895
3895
|
subscribe: (i) => (n.setQueries(t), n.subscribe(i))
|
|
@@ -3903,11 +3903,11 @@ function It() {
|
|
|
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; Ke !== void 0; ) {
|
|
3907
|
+
var n = Ke;
|
|
3908
|
+
for (Ke = void 0, sn++; 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) && $i(n)) try {
|
|
3911
3911
|
n.c();
|
|
3912
3912
|
} catch (i) {
|
|
3913
3913
|
e || (t = i, e = !0);
|
|
@@ -3937,8 +3937,8 @@ function Ri(t) {
|
|
|
3937
3937
|
w = e;
|
|
3938
3938
|
}
|
|
3939
3939
|
}
|
|
3940
|
-
var
|
|
3941
|
-
function
|
|
3940
|
+
var Ke = void 0, ae = 0, sn = 0, wt = 0;
|
|
3941
|
+
function Ai(t) {
|
|
3942
3942
|
if (w !== void 0) {
|
|
3943
3943
|
var e = t.n;
|
|
3944
3944
|
if (e === void 0 || e.t !== w)
|
|
@@ -3947,21 +3947,21 @@ function $i(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 q(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
|
+
q.prototype.brand = Ca;
|
|
3954
|
+
q.prototype.h = function() {
|
|
3955
3955
|
return !0;
|
|
3956
3956
|
};
|
|
3957
|
-
|
|
3957
|
+
q.prototype.S = function(t) {
|
|
3958
3958
|
var e = this, n = this.t;
|
|
3959
3959
|
n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : Ri(function() {
|
|
3960
3960
|
var r;
|
|
3961
3961
|
(r = e.W) == null || r.call(e);
|
|
3962
3962
|
}));
|
|
3963
3963
|
};
|
|
3964
|
-
|
|
3964
|
+
q.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;
|
|
@@ -3971,7 +3971,7 @@ L.prototype.U = function(t) {
|
|
|
3971
3971
|
}));
|
|
3972
3972
|
}
|
|
3973
3973
|
};
|
|
3974
|
-
|
|
3974
|
+
q.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 @@ L.prototype.subscribe = function(t) {
|
|
|
3983
3983
|
}
|
|
3984
3984
|
}, { name: "sub" });
|
|
3985
3985
|
};
|
|
3986
|
-
|
|
3986
|
+
q.prototype.valueOf = function() {
|
|
3987
3987
|
return this.value;
|
|
3988
3988
|
};
|
|
3989
|
-
|
|
3989
|
+
q.prototype.toString = function() {
|
|
3990
3990
|
return this.value + "";
|
|
3991
3991
|
};
|
|
3992
|
-
|
|
3992
|
+
q.prototype.toJSON = function() {
|
|
3993
3993
|
return this.value;
|
|
3994
3994
|
};
|
|
3995
|
-
|
|
3995
|
+
q.prototype.peek = function() {
|
|
3996
3996
|
var t = w;
|
|
3997
3997
|
w = void 0;
|
|
3998
3998
|
try {
|
|
@@ -4001,8 +4001,8 @@ L.prototype.peek = function() {
|
|
|
4001
4001
|
w = t;
|
|
4002
4002
|
}
|
|
4003
4003
|
};
|
|
4004
|
-
Object.defineProperty(
|
|
4005
|
-
var t =
|
|
4004
|
+
Object.defineProperty(q.prototype, "value", { get: function() {
|
|
4005
|
+
var t = Ai(this);
|
|
4006
4006
|
return t !== void 0 && (t.i = this.i), this.v;
|
|
4007
4007
|
}, set: function(t) {
|
|
4008
4008
|
if (t !== this.v) {
|
|
@@ -4015,10 +4015,10 @@ Object.defineProperty(L.prototype, "value", { get: function() {
|
|
|
4015
4015
|
}
|
|
4016
4016
|
}
|
|
4017
4017
|
} });
|
|
4018
|
-
function
|
|
4019
|
-
return new
|
|
4018
|
+
function E(t, e) {
|
|
4019
|
+
return new q(t, e);
|
|
4020
4020
|
}
|
|
4021
|
-
function
|
|
4021
|
+
function $i(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
|
}
|
|
@@ -4039,13 +4039,13 @@ function Ii(t) {
|
|
|
4039
4039
|
t.s = n;
|
|
4040
4040
|
}
|
|
4041
4041
|
function ye(t, e) {
|
|
4042
|
-
|
|
4042
|
+
q.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 q();
|
|
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 && !$i(this))
|
|
4049
4049
|
return this.f &= -2, !0;
|
|
4050
4050
|
var t = w;
|
|
4051
4051
|
try {
|
|
@@ -4062,10 +4062,10 @@ ye.prototype.S = function(t) {
|
|
|
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
|
+
q.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 && (q.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 = Ai(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
4085
|
function an(t, e) {
|
|
4086
4086
|
return new ye(t, e);
|
|
4087
4087
|
}
|
|
4088
|
-
function
|
|
4088
|
+
function Mi(t) {
|
|
4089
4089
|
var e = t.u;
|
|
4090
4090
|
if (t.u = void 0, typeof e == "function") {
|
|
4091
4091
|
ae++;
|
|
@@ -4102,16 +4102,16 @@ function Pi(t) {
|
|
|
4102
4102
|
}
|
|
4103
4103
|
function Sn(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, Mi(t);
|
|
4106
4106
|
}
|
|
4107
4107
|
function Ra(t) {
|
|
4108
4108
|
if (w !== this) throw new Error("Out-of-order effect");
|
|
4109
4109
|
Ii(this), w = t, this.f &= -2, 8 & this.f && Sn(this), It();
|
|
4110
4110
|
}
|
|
4111
|
-
function
|
|
4111
|
+
function Pe(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
|
+
Pe.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 @@ Me.prototype.c = function() {
|
|
|
4121
4121
|
t();
|
|
4122
4122
|
}
|
|
4123
4123
|
};
|
|
4124
|
-
|
|
4124
|
+
Pe.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, Mi(this), Ei(this), ae++;
|
|
4127
4127
|
var t = w;
|
|
4128
4128
|
return w = this, Ra.bind(this, t);
|
|
4129
4129
|
};
|
|
4130
|
-
|
|
4131
|
-
2 & this.f || (this.f |= 2, this.o =
|
|
4130
|
+
Pe.prototype.N = function() {
|
|
4131
|
+
2 & this.f || (this.f |= 2, this.o = Ke, Ke = this);
|
|
4132
4132
|
};
|
|
4133
|
-
|
|
4133
|
+
Pe.prototype.d = function() {
|
|
4134
4134
|
this.f |= 8, 1 & this.f || Sn(this);
|
|
4135
4135
|
};
|
|
4136
|
-
|
|
4136
|
+
Pe.prototype.dispose = function() {
|
|
4137
4137
|
this.d();
|
|
4138
4138
|
};
|
|
4139
4139
|
function at(t, e) {
|
|
4140
|
-
var n = new
|
|
4140
|
+
var n = new Pe(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 qi, ft, Aa = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, Pi = [];
|
|
4150
4150
|
at(function() {
|
|
4151
|
-
|
|
4151
|
+
qi = this.N;
|
|
4152
4152
|
})();
|
|
4153
|
-
function
|
|
4153
|
+
function Le(t, e) {
|
|
4154
4154
|
b[t] = e.bind(null, b[t] || function() {
|
|
4155
4155
|
});
|
|
4156
4156
|
}
|
|
@@ -4161,10 +4161,10 @@ function kt(t) {
|
|
|
4161
4161
|
}
|
|
4162
4162
|
ft = t && t.S();
|
|
4163
4163
|
}
|
|
4164
|
-
function
|
|
4164
|
+
function Li(t) {
|
|
4165
4165
|
var e = this, n = t.data, r = Ue(n);
|
|
4166
4166
|
r.value = n;
|
|
4167
|
-
var i =
|
|
4167
|
+
var i = G(function() {
|
|
4168
4168
|
for (var l = e, a = e.__v; a = a.__; ) if (a.__c) {
|
|
4169
4169
|
a.__c.__$f |= 4;
|
|
4170
4170
|
break;
|
|
@@ -4186,21 +4186,21 @@ function qi(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
|
+
Li.displayName = "ReactiveTextNode";
|
|
4190
|
+
Object.defineProperties(q.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Li }, props: { configurable: !0, get: function() {
|
|
4191
4191
|
return { data: this };
|
|
4192
4192
|
} }, __b: { configurable: !0, value: 1 } });
|
|
4193
|
-
|
|
4193
|
+
Le("__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 q && (n || (e.__np = n = {}), n[i] = o, r[i] = o.peek());
|
|
4199
4199
|
}
|
|
4200
4200
|
}
|
|
4201
4201
|
t(e);
|
|
4202
4202
|
});
|
|
4203
|
-
|
|
4203
|
+
Le("__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 @@ qe("__r", function(t, e) {
|
|
|
4211
4211
|
}, { name: o }), s.c = i, s;
|
|
4212
4212
|
})(function() {
|
|
4213
4213
|
var i;
|
|
4214
|
-
|
|
4214
|
+
Aa && ((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
|
+
Le("__e", function(t, e, n, r) {
|
|
4219
4219
|
kt(), t(e, n, r);
|
|
4220
4220
|
});
|
|
4221
|
-
|
|
4221
|
+
Le("diffed", function(t, e) {
|
|
4222
4222
|
kt();
|
|
4223
4223
|
var n;
|
|
4224
4224
|
if (typeof e.type == "string" && (n = e.__e)) {
|
|
@@ -4233,14 +4233,14 @@ qe("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 = $a(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 $a(t, e, n, r) {
|
|
4243
|
+
var i = e in t && t.ownerSVGElement === void 0, o = E(n);
|
|
4244
4244
|
return { o: function(s, l) {
|
|
4245
4245
|
o.value = s, r = l;
|
|
4246
4246
|
}, d: at(function() {
|
|
@@ -4249,7 +4249,7 @@ function Aa(t, e, n, r) {
|
|
|
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
|
+
Le("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 @@ qe("unmount", function(t, e) {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
t(e);
|
|
4273
4273
|
});
|
|
4274
|
-
|
|
4274
|
+
Le("__h", function(t, e, n, r) {
|
|
4275
4275
|
(r < 3 || r === 9) && (e.__$f |= 2), t(e, n, r);
|
|
4276
4276
|
});
|
|
4277
|
-
|
|
4277
|
+
K.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;
|
|
@@ -4287,8 +4287,8 @@ G.prototype.shouldComponentUpdate = function(t, e) {
|
|
|
4287
4287
|
return !1;
|
|
4288
4288
|
};
|
|
4289
4289
|
function Ue(t, e) {
|
|
4290
|
-
return
|
|
4291
|
-
return
|
|
4290
|
+
return G(function() {
|
|
4291
|
+
return E(t, e);
|
|
4292
4292
|
}, []);
|
|
4293
4293
|
}
|
|
4294
4294
|
var Ea = function(t) {
|
|
@@ -4298,20 +4298,20 @@ var Ea = function(t) {
|
|
|
4298
4298
|
};
|
|
4299
4299
|
function Ia() {
|
|
4300
4300
|
Ta(function() {
|
|
4301
|
-
for (var t; t =
|
|
4301
|
+
for (var t; t = Pi.shift(); ) qi.call(t);
|
|
4302
4302
|
});
|
|
4303
4303
|
}
|
|
4304
4304
|
function Oi() {
|
|
4305
|
-
|
|
4305
|
+
Pi.push(this) === 1 && (b.requestAnimationFrame || Ea)(Ia);
|
|
4306
4306
|
}
|
|
4307
|
-
const
|
|
4308
|
-
function
|
|
4307
|
+
const M = E(!1), jt = E(void 0), le = E(void 0), Ni = E(null);
|
|
4308
|
+
function Ma(t) {
|
|
4309
4309
|
return t.replace(/\.convex\.site\b/, ".convex.cloud");
|
|
4310
4310
|
}
|
|
4311
4311
|
function zi(t) {
|
|
4312
4312
|
return t.replace(/\.convex\.cloud\b/, ".convex.site");
|
|
4313
4313
|
}
|
|
4314
|
-
function
|
|
4314
|
+
function qa(t, e) {
|
|
4315
4315
|
const n = t.title ?? e?.title ?? "Assistant";
|
|
4316
4316
|
return {
|
|
4317
4317
|
title: n,
|
|
@@ -4333,13 +4333,13 @@ function La(t, e) {
|
|
|
4333
4333
|
windowHeight: t.windowHeight ?? e?.windowHeight
|
|
4334
4334
|
};
|
|
4335
4335
|
}
|
|
4336
|
-
async function
|
|
4336
|
+
async function Pa(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 La(t, e, n) {
|
|
4343
4343
|
const [r, i] = C(null);
|
|
4344
4344
|
return T(() => {
|
|
4345
4345
|
i(null);
|
|
@@ -4349,7 +4349,7 @@ function qa(t, e, n) {
|
|
|
4349
4349
|
const l = new AbortController();
|
|
4350
4350
|
async function a(u) {
|
|
4351
4351
|
try {
|
|
4352
|
-
const d = await
|
|
4352
|
+
const d = await Pa(u, t, l.signal, e);
|
|
4353
4353
|
d && i(d);
|
|
4354
4354
|
} catch (d) {
|
|
4355
4355
|
if (d instanceof Error && d.name === "AbortError")
|
|
@@ -4472,7 +4472,20 @@ const Fi = {
|
|
|
4472
4472
|
handoffFailed: "Could not request a human agent. Try again.",
|
|
4473
4473
|
handoffRateLimited: "You requested an agent recently. Please wait before trying again.",
|
|
4474
4474
|
resumeListLabel: "Continue conversation",
|
|
4475
|
-
resumeListTimestamp: "{minutes}m ago"
|
|
4475
|
+
resumeListTimestamp: "{minutes}m ago",
|
|
4476
|
+
noticeAgentJoined: "{name} has joined the conversation.",
|
|
4477
|
+
noticeHumanRequested: "You requested to speak with a human agent.",
|
|
4478
|
+
noticeHumanRequestedForm: "You requested to speak with a human agent. Please share your contact details below.",
|
|
4479
|
+
noticeEscalationConfirmed: `Thank you {name}! A human agent will be available soon.
|
|
4480
|
+
We will contact you at {email} when an agent is ready.
|
|
4481
|
+
|
|
4482
|
+
Your reference: **{ref}**
|
|
4483
|
+
Use it to resume this conversation from any device.`,
|
|
4484
|
+
noticeMessageReceived: "Your message has been received. A team member will respond shortly.",
|
|
4485
|
+
noticeAgentHandling: "Your conversation is with a human agent who will respond shortly.",
|
|
4486
|
+
replyTo: "Reply to {name}",
|
|
4487
|
+
sourcesCountOne: "{count} source",
|
|
4488
|
+
sourcesCountOther: "{count} sources"
|
|
4476
4489
|
}, Na = {
|
|
4477
4490
|
title: "Assistent",
|
|
4478
4491
|
statusOnline: "Online · Antwortet in Sekunden",
|
|
@@ -4543,12 +4556,25 @@ const Fi = {
|
|
|
4543
4556
|
handoffFailed: "Anfrage konnte nicht gesendet werden. Erneut versuchen.",
|
|
4544
4557
|
handoffRateLimited: "Sie haben kürzlich einen Mitarbeiter angefragt. Bitte warten Sie.",
|
|
4545
4558
|
resumeListLabel: "Unterhaltung fortsetzen",
|
|
4546
|
-
resumeListTimestamp: "vor {minutes} Min."
|
|
4559
|
+
resumeListTimestamp: "vor {minutes} Min.",
|
|
4560
|
+
noticeAgentJoined: "{name} ist der Unterhaltung beigetreten.",
|
|
4561
|
+
noticeHumanRequested: "Sie haben darum gebeten, mit einem Mitarbeiter zu sprechen.",
|
|
4562
|
+
noticeHumanRequestedForm: "Sie haben darum gebeten, mit einem Mitarbeiter zu sprechen. Bitte teilen Sie unten Ihre Kontaktdaten mit.",
|
|
4563
|
+
noticeEscalationConfirmed: `Vielen Dank, {name}! Ein Mitarbeiter wird in Kürze verfügbar sein.
|
|
4564
|
+
Wir kontaktieren Sie unter {email}, sobald ein Mitarbeiter bereit ist.
|
|
4565
|
+
|
|
4566
|
+
Ihre Referenz: **{ref}**
|
|
4567
|
+
Verwenden Sie sie, um diese Unterhaltung auf jedem Gerät fortzusetzen.`,
|
|
4568
|
+
noticeMessageReceived: "Ihre Nachricht ist eingegangen. Ein Mitarbeiter wird in Kürze antworten.",
|
|
4569
|
+
noticeAgentHandling: "Ihre Unterhaltung wird von einem menschlichen Mitarbeiter betreut, der in Kürze antwortet.",
|
|
4570
|
+
replyTo: "Antworten an {name}",
|
|
4571
|
+
sourcesCountOne: "{count} Quelle",
|
|
4572
|
+
sourcesCountOther: "{count} Quellen"
|
|
4547
4573
|
}, za = [
|
|
4548
4574
|
{ value: "de", label: "Deutsch", flag: "🇩🇪" },
|
|
4549
4575
|
{ value: "en", label: "English", flag: "🇬🇧" }
|
|
4550
|
-
], Ba = "de", Fa = "jex-locale", Cn =
|
|
4551
|
-
function
|
|
4576
|
+
], Ba = "de", Fa = "jex-locale", Cn = E("de"), Qa = { en: Fi, de: Na };
|
|
4577
|
+
function R() {
|
|
4552
4578
|
return Qa[Cn.value] ?? Fi;
|
|
4553
4579
|
}
|
|
4554
4580
|
function Ht(t) {
|
|
@@ -4588,7 +4614,7 @@ function Da(t) {
|
|
|
4588
4614
|
};
|
|
4589
4615
|
}, [t]);
|
|
4590
4616
|
}
|
|
4591
|
-
const Di = "jex-session-history", Ui = Di, Vi = 900 * 1e3, N =
|
|
4617
|
+
const Di = "jex-session-history", Ui = Di, Vi = 900 * 1e3, N = E([]), xe = E(null), Hi = an(() => N.value.length > 0), Ge = E(null);
|
|
4592
4618
|
function Ua() {
|
|
4593
4619
|
return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
|
|
4594
4620
|
}
|
|
@@ -4603,7 +4629,7 @@ function Va(t) {
|
|
|
4603
4629
|
return [];
|
|
4604
4630
|
}
|
|
4605
4631
|
}
|
|
4606
|
-
function
|
|
4632
|
+
function Mt(t) {
|
|
4607
4633
|
try {
|
|
4608
4634
|
const e = { v: 1, entries: t };
|
|
4609
4635
|
sessionStorage.setItem(Ui, JSON.stringify(e));
|
|
@@ -4612,17 +4638,17 @@ function Pt(t) {
|
|
|
4612
4638
|
}
|
|
4613
4639
|
function Ha() {
|
|
4614
4640
|
const t = Date.now(), e = Va(t);
|
|
4615
|
-
N.value = e,
|
|
4641
|
+
N.value = e, Mt(e), xe.value = e.length > 0 ? e[e.length - 1].ref : null;
|
|
4616
4642
|
}
|
|
4617
4643
|
function yr() {
|
|
4618
4644
|
const t = Ua(), e = Date.now(), n = [...N.value, { ref: t, startedAt: e, lastActivityAt: e }];
|
|
4619
|
-
return N.value = n, xe.value = t,
|
|
4645
|
+
return N.value = n, xe.value = t, Mt(n), t;
|
|
4620
4646
|
}
|
|
4621
4647
|
function vr(t) {
|
|
4622
4648
|
const e = Date.now(), n = N.value.map(
|
|
4623
4649
|
(r) => r.ref === t ? { ...r, lastActivityAt: e } : r
|
|
4624
4650
|
);
|
|
4625
|
-
N.value = n, xe.value = t,
|
|
4651
|
+
N.value = n, xe.value = t, Mt(n);
|
|
4626
4652
|
}
|
|
4627
4653
|
function Tn(t) {
|
|
4628
4654
|
if (!t)
|
|
@@ -4630,16 +4656,16 @@ function Tn(t) {
|
|
|
4630
4656
|
const e = Date.now(), n = N.value.map(
|
|
4631
4657
|
(r) => r.ref === t ? { ...r, lastActivityAt: e } : r
|
|
4632
4658
|
);
|
|
4633
|
-
N.value = n,
|
|
4659
|
+
N.value = n, Mt(n);
|
|
4634
4660
|
}
|
|
4635
|
-
const z =
|
|
4661
|
+
const z = E(Wi());
|
|
4636
4662
|
function Wi() {
|
|
4637
4663
|
return Hi.value ? [{ id: "home" }] : [{ id: "chat" }];
|
|
4638
4664
|
}
|
|
4639
4665
|
function Wa() {
|
|
4640
4666
|
z.value = Wi();
|
|
4641
4667
|
}
|
|
4642
|
-
const Ja =
|
|
4668
|
+
const Ja = E("screen");
|
|
4643
4669
|
function pe(t) {
|
|
4644
4670
|
z.value = [...z.value, t];
|
|
4645
4671
|
}
|
|
@@ -4649,8 +4675,8 @@ function St() {
|
|
|
4649
4675
|
function ln(t) {
|
|
4650
4676
|
z.value = [...z.value.slice(0, -1), t];
|
|
4651
4677
|
}
|
|
4652
|
-
const
|
|
4653
|
-
function
|
|
4678
|
+
const Ka = 6e4, nt = E(!1), cn = E(!1), un = /* @__PURE__ */ new Set();
|
|
4679
|
+
function Ga(t) {
|
|
4654
4680
|
return un.add(t), () => {
|
|
4655
4681
|
un.delete(t);
|
|
4656
4682
|
};
|
|
@@ -4695,7 +4721,7 @@ function Xa(t = Vi) {
|
|
|
4695
4721
|
document.addEventListener("visibilitychange", n);
|
|
4696
4722
|
const r = setInterval(() => {
|
|
4697
4723
|
cn.value || Ya(t) && _r();
|
|
4698
|
-
},
|
|
4724
|
+
}, Ka);
|
|
4699
4725
|
return () => {
|
|
4700
4726
|
document.removeEventListener("visibilitychange", n), clearInterval(r), e = null;
|
|
4701
4727
|
};
|
|
@@ -4727,7 +4753,7 @@ function Rn({ size: t = 24 }) {
|
|
|
4727
4753
|
] });
|
|
4728
4754
|
}
|
|
4729
4755
|
function tl() {
|
|
4730
|
-
const t =
|
|
4756
|
+
const t = R();
|
|
4731
4757
|
return z.value.length > 1 ? /* @__PURE__ */ c(
|
|
4732
4758
|
"button",
|
|
4733
4759
|
{
|
|
@@ -4739,7 +4765,7 @@ function tl() {
|
|
|
4739
4765
|
) : /* @__PURE__ */ c(Rn, { size: 24 });
|
|
4740
4766
|
}
|
|
4741
4767
|
function nl({ title: t }) {
|
|
4742
|
-
const e =
|
|
4768
|
+
const e = R();
|
|
4743
4769
|
return /* @__PURE__ */ c("div", { class: "jex-header-info", children: [
|
|
4744
4770
|
/* @__PURE__ */ c("h3", { children: t }),
|
|
4745
4771
|
/* @__PURE__ */ c("p", { children: e.statusOnline })
|
|
@@ -4752,14 +4778,14 @@ function Ji({ size: t = 28 }) {
|
|
|
4752
4778
|
] });
|
|
4753
4779
|
}
|
|
4754
4780
|
function rl() {
|
|
4755
|
-
const t =
|
|
4781
|
+
const t = R();
|
|
4756
4782
|
return /* @__PURE__ */ c(
|
|
4757
4783
|
"button",
|
|
4758
4784
|
{
|
|
4759
4785
|
class: "jex-header-close",
|
|
4760
4786
|
type: "button",
|
|
4761
4787
|
onClick: () => {
|
|
4762
|
-
|
|
4788
|
+
M.value = !1;
|
|
4763
4789
|
},
|
|
4764
4790
|
"aria-label": t.closeChatAriaLabel,
|
|
4765
4791
|
title: t.closeChatAriaLabel,
|
|
@@ -4801,7 +4827,7 @@ function kr() {
|
|
|
4801
4827
|
}
|
|
4802
4828
|
) });
|
|
4803
4829
|
}
|
|
4804
|
-
function
|
|
4830
|
+
function Ki({ size: t = 28 }) {
|
|
4805
4831
|
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" }) });
|
|
4806
4832
|
}
|
|
4807
4833
|
function sl({ size: t = 24, ...e }) {
|
|
@@ -4822,7 +4848,7 @@ function sl({ size: t = 24, ...e }) {
|
|
|
4822
4848
|
);
|
|
4823
4849
|
}
|
|
4824
4850
|
const al = {
|
|
4825
|
-
chat: /* @__PURE__ */ c(
|
|
4851
|
+
chat: /* @__PURE__ */ c(Ki, { size: 28 }),
|
|
4826
4852
|
bot: /* @__PURE__ */ c(Rn, { size: 28 }),
|
|
4827
4853
|
sparkles: /* @__PURE__ */ c(sl, { size: 28 })
|
|
4828
4854
|
}, ll = {
|
|
@@ -4833,17 +4859,17 @@ const al = {
|
|
|
4833
4859
|
full: "9999px"
|
|
4834
4860
|
};
|
|
4835
4861
|
function cl({ radius: t = "full", iconOption: e = "chat", label: n }) {
|
|
4836
|
-
const r =
|
|
4862
|
+
const r = R(), i = n ?? r.fabLabel, o = i !== "";
|
|
4837
4863
|
return /* @__PURE__ */ c(
|
|
4838
4864
|
"button",
|
|
4839
4865
|
{
|
|
4840
|
-
class: `jex-floating-button ${!
|
|
4866
|
+
class: `jex-floating-button ${!M.value && o ? "jex-has-label" : ""}`,
|
|
4841
4867
|
style: { borderRadius: ll[t] ?? "9999px" },
|
|
4842
4868
|
onClick: () => {
|
|
4843
|
-
|
|
4869
|
+
M.value = !M.value;
|
|
4844
4870
|
},
|
|
4845
|
-
"aria-label":
|
|
4846
|
-
children:
|
|
4871
|
+
"aria-label": M.value ? r.closeChatAriaLabel : r.openChatAriaLabel,
|
|
4872
|
+
children: M.value ? /* @__PURE__ */ c(Ji, { size: 28 }) : /* @__PURE__ */ c("div", { class: "jex-fab-inner", children: [
|
|
4847
4873
|
al[e],
|
|
4848
4874
|
o && /* @__PURE__ */ c("span", { class: "jex-fab-label", children: i })
|
|
4849
4875
|
] })
|
|
@@ -4851,23 +4877,23 @@ function cl({ radius: t = "full", iconOption: e = "chat", label: n }) {
|
|
|
4851
4877
|
);
|
|
4852
4878
|
}
|
|
4853
4879
|
function ul({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
4854
|
-
const r =
|
|
4880
|
+
const r = R(), [i, o] = C("");
|
|
4855
4881
|
function s() {
|
|
4856
|
-
Wt(),
|
|
4882
|
+
Wt(), Ge.value = "fresh", n(), e(), pe({ id: "chat" });
|
|
4857
4883
|
}
|
|
4858
4884
|
function l(u) {
|
|
4859
|
-
Wt(),
|
|
4885
|
+
Wt(), Ge.value = "resume", n(), vr(u), pe({ id: "chat" });
|
|
4860
4886
|
}
|
|
4861
4887
|
function a(u) {
|
|
4862
4888
|
u.preventDefault();
|
|
4863
4889
|
const d = i.trim().toUpperCase();
|
|
4864
|
-
d && (Wt(),
|
|
4890
|
+
d && (Wt(), Ge.value = "resume", n(), vr(d), pe({ id: "chat" }));
|
|
4865
4891
|
}
|
|
4866
4892
|
return /* @__PURE__ */ c("div", { class: "jex-home", children: [
|
|
4867
4893
|
nt.value && /* @__PURE__ */ c("div", { class: "jex-session-prompt", role: "status", children: /* @__PURE__ */ c("div", { class: "jex-session-prompt-text", children: r.sessionLocked }) }),
|
|
4868
4894
|
/* @__PURE__ */ c("div", { class: "jex-home-hero", children: [
|
|
4869
4895
|
/* @__PURE__ */ c("div", { class: "jex-home-avatar", children: [
|
|
4870
|
-
/* @__PURE__ */ c(
|
|
4896
|
+
/* @__PURE__ */ c(Ki, { size: 24 }),
|
|
4871
4897
|
/* @__PURE__ */ c("span", { class: "jex-home-status-dot" })
|
|
4872
4898
|
] }),
|
|
4873
4899
|
/* @__PURE__ */ c("div", { class: "jex-home-hero-text", children: [
|
|
@@ -4922,7 +4948,7 @@ function ul({ title: t, onStartFresh: e, onResetSession: n }) {
|
|
|
4922
4948
|
] });
|
|
4923
4949
|
}
|
|
4924
4950
|
function hl({ title: t }) {
|
|
4925
|
-
const e =
|
|
4951
|
+
const e = R();
|
|
4926
4952
|
return /* @__PURE__ */ c("div", { class: "jex-selection", children: [
|
|
4927
4953
|
/* @__PURE__ */ c("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
|
|
4928
4954
|
/* @__PURE__ */ c("div", { class: "jex-selection-options", children: [
|
|
@@ -5024,18 +5050,18 @@ const bl = xl("corner-up-left", [
|
|
|
5024
5050
|
["path", { d: "M20 20v-7a4 4 0 0 0-4-4H4", key: "1nkjon" }],
|
|
5025
5051
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }]
|
|
5026
5052
|
]);
|
|
5027
|
-
function
|
|
5053
|
+
function An() {
|
|
5028
5054
|
return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
|
|
5029
5055
|
}
|
|
5030
|
-
var ve =
|
|
5031
|
-
function
|
|
5056
|
+
var ve = An();
|
|
5057
|
+
function Gi(t) {
|
|
5032
5058
|
ve = t;
|
|
5033
5059
|
}
|
|
5034
5060
|
var de = { exec: () => null };
|
|
5035
5061
|
function _(t, e = "") {
|
|
5036
5062
|
let n = typeof t == "string" ? t : t.source, r = { replace: (i, o) => {
|
|
5037
5063
|
let s = typeof o == "string" ? o : o.source;
|
|
5038
|
-
return s = s.replace(
|
|
5064
|
+
return s = s.replace(P.caret, "$1"), n = n.replace(i, s), r;
|
|
5039
5065
|
}, getRegex: () => new RegExp(n, e) };
|
|
5040
5066
|
return r;
|
|
5041
5067
|
}
|
|
@@ -5045,31 +5071,31 @@ var yl = (() => {
|
|
|
5045
5071
|
} catch {
|
|
5046
5072
|
return !1;
|
|
5047
5073
|
}
|
|
5048
|
-
})(),
|
|
5049
|
-
]`).replace("lheading", Yi).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Il = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
|
|
5074
|
+
})(), P = { 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)}}>`) }, vl = /^(?:[ \t]*(?:\n|$))+/, _l = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wl = /^ {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+|$)/, kl = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, $n = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Zi = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Yi = _(Zi).replace(/bull/g, $n).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(), jl = _(Zi).replace(/bull/g, $n).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(), En = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Sl = /^[^\n]+/, In = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Cl = _(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", In).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Tl = _(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, $n).getRegex(), qt = "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", Mn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Rl = _("^ {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", Mn).replace("tag", qt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Xi = _(En).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", qt).getRegex(), Al = _(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Xi).getRegex(), qn = { blockquote: Al, code: _l, def: Cl, fences: wl, heading: kl, hr: lt, html: Rl, lheading: Yi, list: Tl, newline: vl, paragraph: Xi, table: de, text: Sl }, Cr = _("^ *([^\\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", qt).getRegex(), $l = { ...qn, lheading: jl, table: Cr, paragraph: _(En).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Cr).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", qt).getRegex() }, El = { ...qn, html: _(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Mn).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: _(En).replace("hr", lt).replace("heading", ` *#{1,6} *[^
|
|
5075
|
+
]`).replace("lheading", Yi).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Il = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ml = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, eo = /^( {2,}|\\)\n(?!\s*$)/, ql = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Oe = /[\p{P}\p{S}]/u, Pt = /[\s\p{P}\p{S}]/u, Pn = /[^\s\p{P}\p{S}]/u, Pl = _(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Pt).getRegex(), to = /(?!~)[\p{P}\p{S}]/u, Ll = /(?!~)[\s\p{P}\p{S}]/u, Ol = /(?:[^\s\p{P}\p{S}]|~)/u, Nl = _(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", yl ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), no = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, zl = _(no, "u").replace(/punct/g, Oe).getRegex(), Bl = _(no, "u").replace(/punct/g, to).getRegex(), ro = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Fl = _(ro, "gu").replace(/notPunctSpace/g, Pn).replace(/punctSpace/g, Pt).replace(/punct/g, Oe).getRegex(), Ql = _(ro, "gu").replace(/notPunctSpace/g, Ol).replace(/punctSpace/g, Ll).replace(/punct/g, to).getRegex(), Dl = _("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Pn).replace(/punctSpace/g, Pt).replace(/punct/g, Oe).getRegex(), Ul = _(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Oe).getRegex(), Vl = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Hl = _(Vl, "gu").replace(/notPunctSpace/g, Pn).replace(/punctSpace/g, Pt).replace(/punct/g, Oe).getRegex(), Wl = _(/\\(punct)/, "gu").replace(/punct/g, Oe).getRegex(), Jl = _(/^<(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(), Kl = _(Mn).replace("(?:-->|$)", "-->").getRegex(), Gl = _("^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", Kl).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ct = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Zl = _(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Ct).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), io = _(/^!?\[(label)\]\[(ref)\]/).replace("label", Ct).replace("ref", In).getRegex(), oo = _(/^!?\[(ref)\](?:\[\])?/).replace("ref", In).getRegex(), Yl = _("reflink|nolink(?!\\()", "g").replace("reflink", io).replace("nolink", oo).getRegex(), Tr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ln = { _backpedal: de, anyPunctuation: Wl, autolink: Jl, blockSkip: Nl, br: eo, code: Ml, del: de, delLDelim: de, delRDelim: de, emStrongLDelim: zl, emStrongRDelimAst: Fl, emStrongRDelimUnd: Dl, escape: Il, link: Zl, nolink: oo, punctuation: Pl, reflink: io, reflinkSearch: Yl, tag: Gl, text: ql, url: de }, Xl = { ...Ln, link: _(/^!?\[(label)\]\((.*?)\)/).replace("label", Ct).getRegex(), reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ct).getRegex() }, hn = { ...Ln, emStrongRDelimAst: Ql, emStrongLDelim: Bl, delLDelim: Ul, delRDelim: Hl, url: _(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Tr).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", Tr).getRegex() }, ec = { ...hn, br: _(eo).replace("{2,}", "*").getRegex(), text: _(hn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, pt = { normal: qn, gfm: $l, pedantic: El }, ze = { normal: Ln, gfm: hn, breaks: ec, pedantic: Xl }, tc = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, Rr = (t) => tc[t];
|
|
5050
5076
|
function X(t, e) {
|
|
5051
5077
|
if (e) {
|
|
5052
|
-
if (
|
|
5053
|
-
} else if (
|
|
5078
|
+
if (P.escapeTest.test(t)) return t.replace(P.escapeReplace, Rr);
|
|
5079
|
+
} else if (P.escapeTestNoEncode.test(t)) return t.replace(P.escapeReplaceNoEncode, Rr);
|
|
5054
5080
|
return t;
|
|
5055
5081
|
}
|
|
5056
|
-
function
|
|
5082
|
+
function Ar(t) {
|
|
5057
5083
|
try {
|
|
5058
|
-
t = encodeURI(t).replace(
|
|
5084
|
+
t = encodeURI(t).replace(P.percentDecode, "%");
|
|
5059
5085
|
} catch {
|
|
5060
5086
|
return null;
|
|
5061
5087
|
}
|
|
5062
5088
|
return t;
|
|
5063
5089
|
}
|
|
5064
|
-
function
|
|
5065
|
-
let n = t.replace(
|
|
5090
|
+
function $r(t, e) {
|
|
5091
|
+
let n = t.replace(P.findPipe, (o, s, l) => {
|
|
5066
5092
|
let a = !1, u = s;
|
|
5067
5093
|
for (; --u >= 0 && l[u] === "\\"; ) a = !a;
|
|
5068
5094
|
return a ? "|" : " |";
|
|
5069
|
-
}), r = n.split(
|
|
5095
|
+
}), r = n.split(P.splitPipe), i = 0;
|
|
5070
5096
|
if (r[0].trim() || r.shift(), r.length > 0 && !r.at(-1)?.trim() && r.pop(), e) if (r.length > e) r.splice(e);
|
|
5071
5097
|
else for (; r.length < e; ) r.push("");
|
|
5072
|
-
for (; i < r.length; i++) r[i] = r[i].trim().replace(
|
|
5098
|
+
for (; i < r.length; i++) r[i] = r[i].trim().replace(P.slashPipe, "|");
|
|
5073
5099
|
return r;
|
|
5074
5100
|
}
|
|
5075
5101
|
function Be(t, e, n) {
|
|
@@ -5275,12 +5301,12 @@ ${d}` : d;
|
|
|
5275
5301
|
table(t) {
|
|
5276
5302
|
let e = this.rules.block.table.exec(t);
|
|
5277
5303
|
if (!e || !this.rules.other.tableDelimiter.test(e[2])) return;
|
|
5278
|
-
let n =
|
|
5304
|
+
let n = $r(e[1]), r = e[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = e[3]?.trim() ? e[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
5279
5305
|
`) : [], o = { type: "table", raw: e[0], header: [], align: [], rows: [] };
|
|
5280
5306
|
if (n.length === r.length) {
|
|
5281
5307
|
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);
|
|
5282
5308
|
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] });
|
|
5283
|
-
for (let s of i) o.rows.push(
|
|
5309
|
+
for (let s of i) o.rows.push($r(s, o.header.length).map((l, a) => ({ text: l, tokens: this.lexer.inline(l), header: !1, align: o.align[a] })));
|
|
5284
5310
|
return o;
|
|
5285
5311
|
}
|
|
5286
5312
|
}
|
|
@@ -5436,7 +5462,7 @@ ${d}` : d;
|
|
|
5436
5462
|
tokenizer;
|
|
5437
5463
|
constructor(e) {
|
|
5438
5464
|
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ve, this.options.tokenizer = this.options.tokenizer || new Tt(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
|
|
5439
|
-
let n = { other:
|
|
5465
|
+
let n = { other: P, block: pt.normal, inline: ze.normal };
|
|
5440
5466
|
this.options.pedantic ? (n.block = pt.pedantic, n.inline = ze.pedantic) : this.options.gfm && (n.block = pt.gfm, this.options.breaks ? n.inline = ze.breaks : n.inline = ze.gfm), this.tokenizer.rules = n;
|
|
5441
5467
|
}
|
|
5442
5468
|
static get rules() {
|
|
@@ -5449,7 +5475,7 @@ ${d}` : d;
|
|
|
5449
5475
|
return new dn(n).inlineTokens(e);
|
|
5450
5476
|
}
|
|
5451
5477
|
lex(e) {
|
|
5452
|
-
e = e.replace(
|
|
5478
|
+
e = e.replace(P.carriageReturn, `
|
|
5453
5479
|
`), this.blockTokens(e, this.tokens);
|
|
5454
5480
|
for (let n = 0; n < this.inlineQueue.length; n++) {
|
|
5455
5481
|
let r = this.inlineQueue[n];
|
|
@@ -5458,7 +5484,7 @@ ${d}` : d;
|
|
|
5458
5484
|
return this.inlineQueue = [], this.tokens;
|
|
5459
5485
|
}
|
|
5460
5486
|
blockTokens(e, n = [], r = !1) {
|
|
5461
|
-
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
5487
|
+
for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(P.tabCharGlobal, " ").replace(P.spaceLine, "")); e; ) {
|
|
5462
5488
|
let i;
|
|
5463
5489
|
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;
|
|
5464
5490
|
if (i = this.tokenizer.space(e)) {
|
|
@@ -5646,7 +5672,7 @@ ${d}` : d;
|
|
|
5646
5672
|
return "";
|
|
5647
5673
|
}
|
|
5648
5674
|
code({ text: t, lang: e, escaped: n }) {
|
|
5649
|
-
let r = (e || "").match(
|
|
5675
|
+
let r = (e || "").match(P.notSpaceStart)?.[0], i = t.replace(P.endingNewline, "") + `
|
|
5650
5676
|
`;
|
|
5651
5677
|
return r ? '<pre><code class="language-' + X(r) + '">' + (n ? i : X(i, !0)) + `</code></pre>
|
|
5652
5678
|
` : "<pre><code>" + (n ? i : X(i, !0)) + `</code></pre>
|
|
@@ -5736,7 +5762,7 @@ ${t}</tr>
|
|
|
5736
5762
|
return `<del>${this.parser.parseInline(t)}</del>`;
|
|
5737
5763
|
}
|
|
5738
5764
|
link({ href: t, title: e, tokens: n }) {
|
|
5739
|
-
let r = this.parser.parseInline(n), i =
|
|
5765
|
+
let r = this.parser.parseInline(n), i = Ar(t);
|
|
5740
5766
|
if (i === null) return r;
|
|
5741
5767
|
t = i;
|
|
5742
5768
|
let o = '<a href="' + t + '"';
|
|
@@ -5744,7 +5770,7 @@ ${t}</tr>
|
|
|
5744
5770
|
}
|
|
5745
5771
|
image({ href: t, title: e, text: n, tokens: r }) {
|
|
5746
5772
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
5747
|
-
let i =
|
|
5773
|
+
let i = Ar(t);
|
|
5748
5774
|
if (i === null) return X(n);
|
|
5749
5775
|
t = i;
|
|
5750
5776
|
let o = `<img src="${t}" alt="${X(n)}"`;
|
|
@@ -5962,7 +5988,7 @@ ${t}</tr>
|
|
|
5962
5988
|
return this.block ? J.parse : J.parseInline;
|
|
5963
5989
|
}
|
|
5964
5990
|
}, oc = class {
|
|
5965
|
-
defaults =
|
|
5991
|
+
defaults = An();
|
|
5966
5992
|
options = this.setOptions;
|
|
5967
5993
|
parse = this.parseMarkdown(!0);
|
|
5968
5994
|
parseInline = this.parseMarkdown(!1);
|
|
@@ -6126,12 +6152,12 @@ function k(t, e) {
|
|
|
6126
6152
|
return be.parse(t, e);
|
|
6127
6153
|
}
|
|
6128
6154
|
k.options = k.setOptions = function(t) {
|
|
6129
|
-
return be.setOptions(t), k.defaults = be.defaults,
|
|
6155
|
+
return be.setOptions(t), k.defaults = be.defaults, Gi(k.defaults), k;
|
|
6130
6156
|
};
|
|
6131
|
-
k.getDefaults =
|
|
6157
|
+
k.getDefaults = An;
|
|
6132
6158
|
k.defaults = ve;
|
|
6133
6159
|
k.use = function(...t) {
|
|
6134
|
-
return be.use(...t), k.defaults = be.defaults,
|
|
6160
|
+
return be.use(...t), k.defaults = be.defaults, Gi(k.defaults), k;
|
|
6135
6161
|
};
|
|
6136
6162
|
k.walkTokens = function(t, e) {
|
|
6137
6163
|
return be.walkTokens(t, e);
|
|
@@ -6158,7 +6184,7 @@ k.setOptions({
|
|
|
6158
6184
|
gfm: !0
|
|
6159
6185
|
});
|
|
6160
6186
|
function sc({ text: t }) {
|
|
6161
|
-
const e =
|
|
6187
|
+
const e = G(() => {
|
|
6162
6188
|
if (!t)
|
|
6163
6189
|
return "";
|
|
6164
6190
|
const n = k.parse(t);
|
|
@@ -6166,7 +6192,7 @@ function sc({ text: t }) {
|
|
|
6166
6192
|
}, [t]);
|
|
6167
6193
|
return /* @__PURE__ */ c("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
|
|
6168
6194
|
}
|
|
6169
|
-
const Ie =
|
|
6195
|
+
const Ie = E("");
|
|
6170
6196
|
function ac(t) {
|
|
6171
6197
|
if (!t)
|
|
6172
6198
|
return;
|
|
@@ -6176,7 +6202,7 @@ function ac(t) {
|
|
|
6176
6202
|
const n = `@${e} `, r = Ie.value;
|
|
6177
6203
|
r.includes(n) || r.includes(`@${e}`) || (Ie.value = r.trimStart() ? `${n}${r.trimStart()}` : n);
|
|
6178
6204
|
}
|
|
6179
|
-
const rt =
|
|
6205
|
+
const rt = E(null), Ir = E(Date.now()), se = E([]), lc = 4, cc = 8 * 1024 * 1024;
|
|
6180
6206
|
function uc() {
|
|
6181
6207
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;
|
|
6182
6208
|
}
|
|
@@ -6224,10 +6250,10 @@ function so(t, e) {
|
|
|
6224
6250
|
};
|
|
6225
6251
|
return new Proxy({}, n);
|
|
6226
6252
|
}
|
|
6227
|
-
const pc = () => so("components", []),
|
|
6253
|
+
const pc = () => so("components", []), Me = As;
|
|
6228
6254
|
pc();
|
|
6229
6255
|
function gc({ sessionId: t, visitorId: e, ensureSession: n }) {
|
|
6230
|
-
const r = Et(
|
|
6256
|
+
const r = Et(Me.functions.chat.public.conversations.send);
|
|
6231
6257
|
return async function(o) {
|
|
6232
6258
|
const s = t && e ? { sessionId: t, visitorId: e } : await n();
|
|
6233
6259
|
if (s) {
|
|
@@ -6263,12 +6289,12 @@ function mc() {
|
|
|
6263
6289
|
return { isActive: n, remainingSeconds: r };
|
|
6264
6290
|
}
|
|
6265
6291
|
function xc() {
|
|
6266
|
-
const t =
|
|
6292
|
+
const t = R(), { isActive: e, remainingSeconds: n } = mc();
|
|
6267
6293
|
return e ? /* @__PURE__ */ c("div", { class: "jex-rate-limit-notice", role: "status", "aria-live": "polite", children: t.errorRateLimited.replace("{seconds}", String(n)) }) : null;
|
|
6268
6294
|
}
|
|
6269
|
-
const Se =
|
|
6295
|
+
const Se = E(null);
|
|
6270
6296
|
function bc() {
|
|
6271
|
-
const t =
|
|
6297
|
+
const t = R(), e = Se.value;
|
|
6272
6298
|
if (e === null)
|
|
6273
6299
|
return null;
|
|
6274
6300
|
const n = e === "no-token" ? t.errorSessionNoToken : e === "unauthorized" ? t.errorSessionUnauthorized : e === "network" ? t.errorNetwork : t.somethingWentWrong;
|
|
@@ -6280,7 +6306,7 @@ function yc({ size: t = 18 }) {
|
|
|
6280
6306
|
/* @__PURE__ */ c("path", { d: "M22 2 15 22 11 13 2 9l20-7z" })
|
|
6281
6307
|
] });
|
|
6282
6308
|
}
|
|
6283
|
-
const
|
|
6309
|
+
const Mr = 132;
|
|
6284
6310
|
function vc({ onSend: t }) {
|
|
6285
6311
|
const e = ue(null), n = ue(null);
|
|
6286
6312
|
T(() => {
|
|
@@ -6288,8 +6314,8 @@ function vc({ onSend: t }) {
|
|
|
6288
6314
|
if (!l)
|
|
6289
6315
|
return;
|
|
6290
6316
|
l.style.height = "0";
|
|
6291
|
-
const a = Math.min(l.scrollHeight,
|
|
6292
|
-
l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight >
|
|
6317
|
+
const a = Math.min(l.scrollHeight, Mr);
|
|
6318
|
+
l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight > Mr ? "auto" : "hidden";
|
|
6293
6319
|
}, [Ie.value]);
|
|
6294
6320
|
function r(l) {
|
|
6295
6321
|
l.key === "Enter" && !l.shiftKey && (l.preventDefault(), t());
|
|
@@ -6308,7 +6334,7 @@ function vc({ onSend: t }) {
|
|
|
6308
6334
|
return { textareaRef: e, fileInputRef: n, onKeyDown: r, onAttachClick: i, onFilesPicked: o, onCardClick: s };
|
|
6309
6335
|
}
|
|
6310
6336
|
function _c({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
6311
|
-
const i =
|
|
6337
|
+
const i = R(), o = Ie, s = se, { textareaRef: l, fileInputRef: a, onKeyDown: u, onAttachClick: d, onFilesPicked: h, onCardClick: f } = vc({ onSend: r }), p = o.value.trim().length > 0, g = s.value.length > 0, m = (p || g) && !e;
|
|
6312
6338
|
return /* @__PURE__ */ c("div", { class: "jex-composer-card", onClick: f, children: [
|
|
6313
6339
|
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: [
|
|
6314
6340
|
/* @__PURE__ */ c("img", { src: x.previewUrl, alt: x.file.name, class: "jex-attachment-thumb" }),
|
|
@@ -6387,7 +6413,7 @@ function _c({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
|
|
|
6387
6413
|
] });
|
|
6388
6414
|
}
|
|
6389
6415
|
function wc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: o, onStartFresh: s }) {
|
|
6390
|
-
const l =
|
|
6416
|
+
const l = R(), a = Ie, u = gc({ sessionId: t, visitorId: e, ensureSession: o }), d = rt.value !== null && rt.value > Date.now(), h = n || r || d;
|
|
6391
6417
|
if (i === "resolved")
|
|
6392
6418
|
return /* @__PURE__ */ c("div", { class: "jex-chat-input-resolved", children: [
|
|
6393
6419
|
/* @__PURE__ */ c("div", { class: "jex-resolved-notice", children: l.sessionResolved }),
|
|
@@ -6426,26 +6452,26 @@ function kc(t) {
|
|
|
6426
6452
|
return e.length === 0 ? "?" : e.map((n) => n[0]).join("").slice(0, 2).toUpperCase();
|
|
6427
6453
|
}
|
|
6428
6454
|
function ke({ text: t, streaming: e, error: n, authorId: r, authorName: i, authorImage: o, botAvatarUrl: s }) {
|
|
6429
|
-
const l = !!r, [
|
|
6455
|
+
const l = R(), a = !!r, [u, d] = C(!1), h = Te(() => d(!0), []), f = l.replyTo.replace("{name}", i ?? ""), p = [
|
|
6430
6456
|
"jex-message bot",
|
|
6431
6457
|
n ? "jex-message-error" : ""
|
|
6432
6458
|
].filter(Boolean).join(" ");
|
|
6433
6459
|
return /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: [
|
|
6434
|
-
/* @__PURE__ */ c("div", { class: `jex-avatar ${
|
|
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: kc(i ?? "") }) : s && !u ? /* @__PURE__ */ c("img", { src: s, alt: "", class: "jex-avatar-img", onError: h }) : /* @__PURE__ */ c(Rn, { size: 14 }) }),
|
|
6435
6461
|
/* @__PURE__ */ c("div", { class: "jex-message-content", children: [
|
|
6436
|
-
/* @__PURE__ */ c("div", { class:
|
|
6462
|
+
/* @__PURE__ */ c("div", { class: p, children: [
|
|
6437
6463
|
/* @__PURE__ */ c(sc, { text: t }),
|
|
6438
6464
|
e && /* @__PURE__ */ c("span", { class: "jex-streaming-cursor" })
|
|
6439
6465
|
] }),
|
|
6440
|
-
|
|
6466
|
+
a && i && /* @__PURE__ */ c("div", { class: "jex-message-author-row", children: [
|
|
6441
6467
|
/* @__PURE__ */ c("span", { class: "jex-message-author", children: i }),
|
|
6442
6468
|
/* @__PURE__ */ c(
|
|
6443
6469
|
"button",
|
|
6444
6470
|
{
|
|
6445
6471
|
type: "button",
|
|
6446
6472
|
class: "jex-reply-tag-btn",
|
|
6447
|
-
"aria-label":
|
|
6448
|
-
title:
|
|
6473
|
+
"aria-label": f,
|
|
6474
|
+
title: f,
|
|
6449
6475
|
onClick: () => {
|
|
6450
6476
|
ac(i);
|
|
6451
6477
|
},
|
|
@@ -6460,10 +6486,10 @@ function jc({ text: t }) {
|
|
|
6460
6486
|
return /* @__PURE__ */ c("div", { class: "jex-message user", children: t });
|
|
6461
6487
|
}
|
|
6462
6488
|
function ao() {
|
|
6463
|
-
return Et(
|
|
6489
|
+
return Et(Me.functions.chat.public.helpdesk.submitEscalation);
|
|
6464
6490
|
}
|
|
6465
6491
|
function Sc({ message: t, sessionId: e, visitorId: n }) {
|
|
6466
|
-
const r =
|
|
6492
|
+
const r = R();
|
|
6467
6493
|
return t.formData ? /* @__PURE__ */ c("div", { class: "jex-inline-form-submitted", children: [
|
|
6468
6494
|
/* @__PURE__ */ c("span", { class: "jex-inline-form-check", children: "✓" }),
|
|
6469
6495
|
/* @__PURE__ */ c("div", { children: [
|
|
@@ -6484,7 +6510,7 @@ function Sc({ message: t, sessionId: e, visitorId: n }) {
|
|
|
6484
6510
|
) });
|
|
6485
6511
|
}
|
|
6486
6512
|
function Cc({ messageId: t, sessionId: e, visitorId: n }) {
|
|
6487
|
-
const r =
|
|
6513
|
+
const r = R(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d = ao();
|
|
6488
6514
|
async function h(f) {
|
|
6489
6515
|
if (f.preventDefault(), !a) {
|
|
6490
6516
|
u(!0);
|
|
@@ -6546,7 +6572,7 @@ const Tc = {
|
|
|
6546
6572
|
qa: "❓"
|
|
6547
6573
|
};
|
|
6548
6574
|
function Rc({ sources: t }) {
|
|
6549
|
-
const
|
|
6575
|
+
const e = R(), [n, r] = C(!1);
|
|
6550
6576
|
return t.length === 0 ? null : /* @__PURE__ */ c("div", { class: "jex-sources-row", children: [
|
|
6551
6577
|
/* @__PURE__ */ c(
|
|
6552
6578
|
"button",
|
|
@@ -6554,47 +6580,46 @@ function Rc({ sources: t }) {
|
|
|
6554
6580
|
type: "button",
|
|
6555
6581
|
class: "jex-sources-toggle",
|
|
6556
6582
|
onClick: () => {
|
|
6557
|
-
|
|
6583
|
+
r((i) => !i);
|
|
6558
6584
|
},
|
|
6559
|
-
"aria-expanded":
|
|
6585
|
+
"aria-expanded": n,
|
|
6560
6586
|
children: [
|
|
6561
6587
|
/* @__PURE__ */ c("span", { class: "jex-sources-icon", children: "📖" }),
|
|
6562
|
-
/* @__PURE__ */ c("span", { children:
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
/* @__PURE__ */ c("span", { class: `jex-sources-chevron${e ? " jex-sources-chevron--open" : ""}`, children: "▾" })
|
|
6588
|
+
/* @__PURE__ */ c("span", { children: (t.length === 1 ? e.sourcesCountOne : e.sourcesCountOther).replace(
|
|
6589
|
+
"{count}",
|
|
6590
|
+
String(t.length)
|
|
6591
|
+
) }),
|
|
6592
|
+
/* @__PURE__ */ c("span", { class: `jex-sources-chevron${n ? " jex-sources-chevron--open" : ""}`, children: "▾" })
|
|
6568
6593
|
]
|
|
6569
6594
|
}
|
|
6570
6595
|
),
|
|
6571
|
-
|
|
6572
|
-
const
|
|
6573
|
-
${
|
|
6574
|
-
typeof
|
|
6575
|
-
/* @__PURE__ */ c("span", { class: "jex-source-type", children: Tc[
|
|
6576
|
-
/* @__PURE__ */ c("span", { class: "jex-source-label", children:
|
|
6596
|
+
n ? /* @__PURE__ */ c("div", { class: "jex-sources-pills", children: t.map((i, o) => {
|
|
6597
|
+
const s = i.sourceType === "crawl", l = Ac(i), a = s && i.url ? `${i.title}
|
|
6598
|
+
${i.url}` : i.title, u = /* @__PURE__ */ c(F, { children: [
|
|
6599
|
+
typeof i.id == "number" ? /* @__PURE__ */ c("span", { class: "jex-source-id", children: i.id }) : null,
|
|
6600
|
+
/* @__PURE__ */ c("span", { class: "jex-source-type", children: Tc[i.sourceType] }),
|
|
6601
|
+
/* @__PURE__ */ c("span", { class: "jex-source-label", children: l }),
|
|
6577
6602
|
/* @__PURE__ */ c("span", { class: "jex-source-score", children: [
|
|
6578
6603
|
"· ",
|
|
6579
|
-
|
|
6604
|
+
i.score.toFixed(2)
|
|
6580
6605
|
] })
|
|
6581
6606
|
] });
|
|
6582
|
-
return
|
|
6607
|
+
return s && i.url ? /* @__PURE__ */ c(
|
|
6583
6608
|
"a",
|
|
6584
6609
|
{
|
|
6585
6610
|
class: "jex-source-pill",
|
|
6586
|
-
href:
|
|
6611
|
+
href: i.url,
|
|
6587
6612
|
target: "_blank",
|
|
6588
6613
|
rel: "noopener noreferrer",
|
|
6589
|
-
title:
|
|
6590
|
-
children:
|
|
6614
|
+
title: a,
|
|
6615
|
+
children: u
|
|
6591
6616
|
},
|
|
6592
|
-
|
|
6593
|
-
) : /* @__PURE__ */ c("span", { class: "jex-source-pill", title:
|
|
6617
|
+
o
|
|
6618
|
+
) : /* @__PURE__ */ c("span", { class: "jex-source-pill", title: a, children: u }, o);
|
|
6594
6619
|
}) }) : null
|
|
6595
6620
|
] });
|
|
6596
6621
|
}
|
|
6597
|
-
function
|
|
6622
|
+
function Ac(t) {
|
|
6598
6623
|
if (t.sourceType === "crawl" && t.url)
|
|
6599
6624
|
try {
|
|
6600
6625
|
const e = new URL(t.url);
|
|
@@ -6603,7 +6628,7 @@ function $c(t) {
|
|
|
6603
6628
|
}
|
|
6604
6629
|
return t.title;
|
|
6605
6630
|
}
|
|
6606
|
-
function
|
|
6631
|
+
function $c() {
|
|
6607
6632
|
return /* @__PURE__ */ c("div", { class: "jex-typing", children: [
|
|
6608
6633
|
/* @__PURE__ */ c("span", {}),
|
|
6609
6634
|
/* @__PURE__ */ c("span", {}),
|
|
@@ -6611,11 +6636,11 @@ function Ac() {
|
|
|
6611
6636
|
] });
|
|
6612
6637
|
}
|
|
6613
6638
|
const Ec = /\s?\[\d+\]/g;
|
|
6614
|
-
function
|
|
6639
|
+
function qr(t) {
|
|
6615
6640
|
return t.replace(Ec, "");
|
|
6616
6641
|
}
|
|
6617
6642
|
function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: o, visitorId: s }) {
|
|
6618
|
-
const l =
|
|
6643
|
+
const l = R(), a = ue(null), [u, d] = C(null), h = ue(null);
|
|
6619
6644
|
return T(() => {
|
|
6620
6645
|
if (!s || !t || t.length === 0)
|
|
6621
6646
|
return;
|
|
@@ -6640,8 +6665,10 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6640
6665
|
)
|
|
6641
6666
|
] }) : n ? /* @__PURE__ */ c("div", { class: "jex-session-notice", children: l.sessionNotFound }) : null,
|
|
6642
6667
|
t?.map((f) => {
|
|
6643
|
-
if (f.contentType === "human-notice")
|
|
6644
|
-
|
|
6668
|
+
if (f.contentType === "human-notice") {
|
|
6669
|
+
const g = f.noticeKind === "agent-joined" ? l.noticeAgentJoined.replace("{name}", f.noticeData?.agentName ?? "") : f.noticeKind === "human-requested" ? l.noticeHumanRequested : f.noticeKind === "human-requested-form" ? l.noticeHumanRequestedForm : f.noticeKind === "message-received" ? l.noticeMessageReceived : f.noticeKind === "agent-handling" ? l.noticeAgentHandling : f.content;
|
|
6670
|
+
return /* @__PURE__ */ c(ke, { text: g }, f._id);
|
|
6671
|
+
}
|
|
6645
6672
|
if (f.contentType === "escalation-form" && o && s)
|
|
6646
6673
|
return Ja.value === "screen" && !f.formData ? u === f._id ? null : /* @__PURE__ */ c("div", { class: "jex-inline-form jex-inline-form-card", children: [
|
|
6647
6674
|
/* @__PURE__ */ c("div", { class: "jex-inline-form-title", children: l.escalationPromptTitle }),
|
|
@@ -6669,8 +6696,10 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6669
6696
|
}
|
|
6670
6697
|
)
|
|
6671
6698
|
] }, f._id) : /* @__PURE__ */ c(Sc, { message: f, sessionId: o, visitorId: s }, f._id);
|
|
6672
|
-
if (f.contentType === "escalation-confirm")
|
|
6673
|
-
|
|
6699
|
+
if (f.contentType === "escalation-confirm") {
|
|
6700
|
+
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
|
+
return /* @__PURE__ */ c(ke, { text: g }, f._id);
|
|
6702
|
+
}
|
|
6674
6703
|
if (f.role === "user")
|
|
6675
6704
|
return /* @__PURE__ */ c(jc, { text: f.content }, f._id);
|
|
6676
6705
|
const p = {
|
|
@@ -6678,7 +6707,7 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6678
6707
|
authorName: f.authorName,
|
|
6679
6708
|
authorImage: f.authorImage
|
|
6680
6709
|
};
|
|
6681
|
-
return f.status === "streaming" && f.content === "" ? /* @__PURE__ */ c(
|
|
6710
|
+
return f.status === "streaming" && f.content === "" ? /* @__PURE__ */ c($c, {}, f._id) : f.status === "streaming" ? /* @__PURE__ */ c(ke, { text: qr(f.content), streaming: !0, ...p }, f._id) : f.status === "error" ? /* @__PURE__ */ c(
|
|
6682
6711
|
ke,
|
|
6683
6712
|
{
|
|
6684
6713
|
text: f.errorMessage ?? `${l.somethingWentWrong}. ${l.tryAgain}.`,
|
|
@@ -6687,7 +6716,7 @@ function Ic({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
|
|
|
6687
6716
|
},
|
|
6688
6717
|
f._id
|
|
6689
6718
|
) : /* @__PURE__ */ c("div", { children: [
|
|
6690
|
-
/* @__PURE__ */ c(ke, { text:
|
|
6719
|
+
/* @__PURE__ */ c(ke, { text: qr(f.content), ...p }),
|
|
6691
6720
|
f.sources && f.sources.length > 0 ? /* @__PURE__ */ c(Rc, { sources: f.sources }) : null
|
|
6692
6721
|
] }, f._id);
|
|
6693
6722
|
}),
|
|
@@ -6708,12 +6737,12 @@ function pn({ message: t }) {
|
|
|
6708
6737
|
t && /* @__PURE__ */ c("p", { class: "jex-loading-message", children: t })
|
|
6709
6738
|
] }) : null;
|
|
6710
6739
|
}
|
|
6711
|
-
function
|
|
6740
|
+
function Mc({ sessionId: t, visitorId: e }) {
|
|
6712
6741
|
const n = br(
|
|
6713
|
-
|
|
6742
|
+
Me.functions.chat.public.conversations.listBySession,
|
|
6714
6743
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
6715
6744
|
), r = br(
|
|
6716
|
-
|
|
6745
|
+
Me.functions.chat.public.sessions.getSessionStatus,
|
|
6717
6746
|
t && e ? { sessionId: t, visitorId: e } : "skip"
|
|
6718
6747
|
), i = t !== null && n === void 0, o = n?.some((s) => s.status === "streaming") ?? !1;
|
|
6719
6748
|
return {
|
|
@@ -6723,15 +6752,15 @@ function Pc({ sessionId: t, visitorId: e }) {
|
|
|
6723
6752
|
isStreaming: o
|
|
6724
6753
|
};
|
|
6725
6754
|
}
|
|
6726
|
-
function
|
|
6727
|
-
const h =
|
|
6755
|
+
function qc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: o, sessionNotFound: s, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d }) {
|
|
6756
|
+
const h = R(), { conversations: f, sessionStatus: p, isLoading: g, isStreaming: m } = Mc({ sessionId: r, visitorId: i }), x = ue(
|
|
6728
6757
|
(() => {
|
|
6729
|
-
const I =
|
|
6758
|
+
const I = Ge.peek();
|
|
6730
6759
|
return I !== null ? I : Hi.peek() ? "resume" : "fresh";
|
|
6731
6760
|
})()
|
|
6732
6761
|
).current;
|
|
6733
6762
|
if (T(() => {
|
|
6734
|
-
|
|
6763
|
+
Ge.value = null;
|
|
6735
6764
|
}, []), T(() => {
|
|
6736
6765
|
u();
|
|
6737
6766
|
}, [u]), T(() => {
|
|
@@ -6766,8 +6795,8 @@ function Lc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
|
|
|
6766
6795
|
)
|
|
6767
6796
|
] });
|
|
6768
6797
|
}
|
|
6769
|
-
function
|
|
6770
|
-
const r =
|
|
6798
|
+
function Pc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
6799
|
+
const r = R(), [i, o] = C(""), [s, l] = C(""), a = ao(), [u, d] = C(!1), [h, f] = C(null);
|
|
6771
6800
|
async function p(g) {
|
|
6772
6801
|
g.preventDefault(), d(!0), f(null);
|
|
6773
6802
|
try {
|
|
@@ -6825,11 +6854,11 @@ function Mc({ formMessageId: t, sessionId: e, visitorId: n }) {
|
|
|
6825
6854
|
}, children: r.escalationSkip })
|
|
6826
6855
|
] });
|
|
6827
6856
|
}
|
|
6828
|
-
function
|
|
6829
|
-
return Et(
|
|
6857
|
+
function Lc() {
|
|
6858
|
+
return Et(Me.functions.chat.public.helpdesk.createEscalationRequest);
|
|
6830
6859
|
}
|
|
6831
|
-
function
|
|
6832
|
-
const n =
|
|
6860
|
+
function Pr({ sessionId: t, visitorId: e }) {
|
|
6861
|
+
const n = R(), [r, i] = C(!1), [o, s] = C(null), l = Lc();
|
|
6833
6862
|
async function a() {
|
|
6834
6863
|
if (!t || !e)
|
|
6835
6864
|
return;
|
|
@@ -6882,7 +6911,7 @@ async function Oc() {
|
|
|
6882
6911
|
const n = e.token;
|
|
6883
6912
|
return le.value = n, { ok: !0, token: n };
|
|
6884
6913
|
}
|
|
6885
|
-
function
|
|
6914
|
+
function Lr(t) {
|
|
6886
6915
|
return lo(t) ? "unauthorized" : t instanceof Error && /network|fetch|failed to fetch/i.test(t.message) ? "network" : "unknown";
|
|
6887
6916
|
}
|
|
6888
6917
|
function lo(t) {
|
|
@@ -6901,7 +6930,7 @@ function Nc(t = 1e4) {
|
|
|
6901
6930
|
});
|
|
6902
6931
|
}
|
|
6903
6932
|
function zc(t, e) {
|
|
6904
|
-
const n = ue(null), r = Ue(!1), i = Ue(!1), o = Ue(!1), s = Ue(null), l = Et(
|
|
6933
|
+
const n = ue(null), r = Ue(!1), i = Ue(!1), o = Ue(!1), s = Ue(null), l = Et(Me.functions.chat.public.sessions.createOrResume), a = async (p) => {
|
|
6905
6934
|
const g = await Nc();
|
|
6906
6935
|
if (!g)
|
|
6907
6936
|
return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), Se.value = "no-token", null;
|
|
@@ -6942,14 +6971,14 @@ function zc(t, e) {
|
|
|
6942
6971
|
const m = await a(g);
|
|
6943
6972
|
return m ? (p && m.result.isNew && (i.value = !0, o.value = !0), m.session) : null;
|
|
6944
6973
|
} catch (m) {
|
|
6945
|
-
return console.error("[JexityChat] Failed to create session:", m), Se.value =
|
|
6974
|
+
return console.error("[JexityChat] Failed to create session:", m), Se.value = Lr(m), null;
|
|
6946
6975
|
} finally {
|
|
6947
6976
|
r.value = !1;
|
|
6948
6977
|
}
|
|
6949
6978
|
}, [t, e, l, r, i, o]), d = Te(() => {
|
|
6950
6979
|
n.current = null, i.value = !1, o.value = !1;
|
|
6951
6980
|
}, [i, o]);
|
|
6952
|
-
T(() =>
|
|
6981
|
+
T(() => Ga(d), [d]);
|
|
6953
6982
|
const h = Te(async () => {
|
|
6954
6983
|
n.current = null, o.value = !1, i.value = !1;
|
|
6955
6984
|
const p = yr();
|
|
@@ -6957,7 +6986,7 @@ function zc(t, e) {
|
|
|
6957
6986
|
try {
|
|
6958
6987
|
return (await a(p))?.session ?? null;
|
|
6959
6988
|
} catch (g) {
|
|
6960
|
-
return console.error("[JexityChat] Failed to create fresh session:", g), Se.value =
|
|
6989
|
+
return console.error("[JexityChat] Failed to create fresh session:", g), Se.value = Lr(g), null;
|
|
6961
6990
|
} finally {
|
|
6962
6991
|
r.value = !1;
|
|
6963
6992
|
}
|
|
@@ -6976,7 +7005,7 @@ function zc(t, e) {
|
|
|
6976
7005
|
};
|
|
6977
7006
|
}
|
|
6978
7007
|
function Bc() {
|
|
6979
|
-
const t =
|
|
7008
|
+
const t = R(), [e, n] = C(""), [r, i] = C(""), [o, s] = C("");
|
|
6980
7009
|
async function l(a) {
|
|
6981
7010
|
a.preventDefault(), ln({ id: "loading", message: t.submittingTicket }), await new Promise((d) => {
|
|
6982
7011
|
setTimeout(d, 1200);
|
|
@@ -7032,7 +7061,7 @@ function Bc() {
|
|
|
7032
7061
|
] });
|
|
7033
7062
|
}
|
|
7034
7063
|
function Fc({ ticketRef: t }) {
|
|
7035
|
-
const e =
|
|
7064
|
+
const e = R();
|
|
7036
7065
|
return /* @__PURE__ */ c("div", { class: "jex-confirmation", children: [
|
|
7037
7066
|
/* @__PURE__ */ c("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
|
|
7038
7067
|
/* @__PURE__ */ c("h2", { class: "jex-confirmation-title", children: e.ticketSubmitted }),
|
|
@@ -7044,7 +7073,7 @@ function Fc({ ticketRef: t }) {
|
|
|
7044
7073
|
{
|
|
7045
7074
|
class: "jex-confirmation-done",
|
|
7046
7075
|
onClick: () => {
|
|
7047
|
-
|
|
7076
|
+
M.value = !1;
|
|
7048
7077
|
},
|
|
7049
7078
|
children: e.done
|
|
7050
7079
|
}
|
|
@@ -7052,7 +7081,7 @@ function Fc({ ticketRef: t }) {
|
|
|
7052
7081
|
] });
|
|
7053
7082
|
}
|
|
7054
7083
|
function Qc({ message: t, onRetry: e, onBack: n }) {
|
|
7055
|
-
const r =
|
|
7084
|
+
const r = R();
|
|
7056
7085
|
return /* @__PURE__ */ c("div", { class: "jex-overlay jex-error", children: [
|
|
7057
7086
|
/* @__PURE__ */ c("p", { class: "jex-error-message", children: t }),
|
|
7058
7087
|
/* @__PURE__ */ c("div", { class: "jex-error-actions", children: [
|
|
@@ -7070,7 +7099,7 @@ function Or({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
|
|
|
7070
7099
|
g.id === "selection" && /* @__PURE__ */ c(hl, { title: e }),
|
|
7071
7100
|
g.id === "form" && /* @__PURE__ */ c(Bc, {}),
|
|
7072
7101
|
g.id === "escalation-form" && /* @__PURE__ */ c(
|
|
7073
|
-
|
|
7102
|
+
Pc,
|
|
7074
7103
|
{
|
|
7075
7104
|
formMessageId: g.formMessageId,
|
|
7076
7105
|
sessionId: g.sessionId,
|
|
@@ -7079,7 +7108,7 @@ function Or({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
|
|
|
7079
7108
|
),
|
|
7080
7109
|
g.id === "confirmation" && m && /* @__PURE__ */ c(Fc, { ticketRef: m.ref }),
|
|
7081
7110
|
g.id === "chat" && /* @__PURE__ */ c(
|
|
7082
|
-
|
|
7111
|
+
qc,
|
|
7083
7112
|
{
|
|
7084
7113
|
greeting: t,
|
|
7085
7114
|
orgSlug: n,
|
|
@@ -7107,21 +7136,21 @@ function Or({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
|
|
|
7107
7136
|
}
|
|
7108
7137
|
function Dc({ options: t }) {
|
|
7109
7138
|
Oa(t.orgSlug, t.projSlug, t.bootstrapToken, t.convexUrl);
|
|
7110
|
-
const e =
|
|
7139
|
+
const e = La(t.orgSlug, t.projSlug, t.convexUrl);
|
|
7111
7140
|
Da(t.parentOrigin), T(() => {
|
|
7112
7141
|
Ha(), Wa();
|
|
7113
7142
|
}, []);
|
|
7114
|
-
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = zc(t.orgSlug, t.projSlug), h =
|
|
7143
|
+
const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = zc(t.orgSlug, t.projSlug), h = qa(t, e);
|
|
7115
7144
|
T(() => {
|
|
7116
7145
|
Cn.value = Qi(h.locale);
|
|
7117
7146
|
}, [h.locale]), T(() => {
|
|
7118
|
-
if (!
|
|
7147
|
+
if (!M.value || h.mode === "embedded" || !window.matchMedia("(max-width: 480px), (pointer: coarse) and (max-width: 768px)").matches)
|
|
7119
7148
|
return;
|
|
7120
7149
|
const B = document.documentElement.style.overflow;
|
|
7121
7150
|
return document.documentElement.style.overflow = "hidden", () => {
|
|
7122
7151
|
document.documentElement.style.overflow = B;
|
|
7123
7152
|
};
|
|
7124
|
-
}, [
|
|
7153
|
+
}, [M.value, h.mode]), T(() => {
|
|
7125
7154
|
if (h.mode !== "embedded")
|
|
7126
7155
|
try {
|
|
7127
7156
|
return Xa();
|
|
@@ -7150,7 +7179,7 @@ function Dc({ options: t }) {
|
|
|
7150
7179
|
wr,
|
|
7151
7180
|
{
|
|
7152
7181
|
title: h.title,
|
|
7153
|
-
rightAction: y ? /* @__PURE__ */ c(
|
|
7182
|
+
rightAction: y ? /* @__PURE__ */ c(Pr, { sessionId: n, visitorId: r }) : null,
|
|
7154
7183
|
showClose: !m
|
|
7155
7184
|
}
|
|
7156
7185
|
),
|
|
@@ -7174,12 +7203,12 @@ function Dc({ options: t }) {
|
|
|
7174
7203
|
),
|
|
7175
7204
|
!h.hideBranding && /* @__PURE__ */ c(kr, {})
|
|
7176
7205
|
] }) : /* @__PURE__ */ c("div", { class: `jex-container${f ? " jex-pos-left" : ""}`, children: [
|
|
7177
|
-
|
|
7206
|
+
M.value && /* @__PURE__ */ c("div", { class: "jex-chat-window", children: [
|
|
7178
7207
|
/* @__PURE__ */ c(
|
|
7179
7208
|
wr,
|
|
7180
7209
|
{
|
|
7181
7210
|
title: h.title,
|
|
7182
|
-
rightAction: y ? /* @__PURE__ */ c(
|
|
7211
|
+
rightAction: y ? /* @__PURE__ */ c(Pr, { sessionId: n, visitorId: r }) : null
|
|
7183
7212
|
}
|
|
7184
7213
|
),
|
|
7185
7214
|
/* @__PURE__ */ c(
|
|
@@ -7225,23 +7254,23 @@ function Wc(t) {
|
|
|
7225
7254
|
const e = t ?? Hc;
|
|
7226
7255
|
if (!e)
|
|
7227
7256
|
throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
|
|
7228
|
-
return Jt || (Jt = new xa(
|
|
7257
|
+
return Jt || (Jt = new xa(Ma(e))), Jt;
|
|
7229
7258
|
}
|
|
7230
7259
|
function Jc(t, e) {
|
|
7231
7260
|
const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
|
|
7232
7261
|
for (; n.firstChild; )
|
|
7233
7262
|
n.removeChild(n.firstChild);
|
|
7234
|
-
Vc(n), jt.value = e.source, le.value = e.bootstrapToken, z.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"),
|
|
7263
|
+
Vc(n), jt.value = e.source, le.value = e.bootstrapToken, z.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), M.value = !0);
|
|
7235
7264
|
const r = document.createElement("div");
|
|
7236
7265
|
return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r), ge(
|
|
7237
7266
|
/* @__PURE__ */ c(ya, { client: Wc(e.convexUrl), children: /* @__PURE__ */ c(Dc, { options: e }) }),
|
|
7238
7267
|
r
|
|
7239
7268
|
), function() {
|
|
7240
|
-
ge(null, r),
|
|
7269
|
+
ge(null, r), M.value = !1, jt.value = void 0, le.value = void 0, z.value = [{ id: "home" }];
|
|
7241
7270
|
};
|
|
7242
7271
|
}
|
|
7243
|
-
function
|
|
7244
|
-
const r = Jc(t, e), i = /* @__PURE__ */ new Set(), o =
|
|
7272
|
+
function Kc(t, e, n) {
|
|
7273
|
+
const r = Jc(t, e), i = /* @__PURE__ */ new Set(), o = M.subscribe((l) => {
|
|
7245
7274
|
for (const a of i)
|
|
7246
7275
|
a(l);
|
|
7247
7276
|
});
|
|
@@ -7250,16 +7279,16 @@ function Gc(t, e, n) {
|
|
|
7250
7279
|
o(), i.clear(), r(), n && n();
|
|
7251
7280
|
},
|
|
7252
7281
|
open() {
|
|
7253
|
-
|
|
7282
|
+
M.value = !0;
|
|
7254
7283
|
},
|
|
7255
7284
|
close() {
|
|
7256
|
-
|
|
7285
|
+
M.value = !1;
|
|
7257
7286
|
},
|
|
7258
7287
|
toggle() {
|
|
7259
|
-
|
|
7288
|
+
M.value = !M.value;
|
|
7260
7289
|
},
|
|
7261
7290
|
get isOpen() {
|
|
7262
|
-
return
|
|
7291
|
+
return M.value;
|
|
7263
7292
|
},
|
|
7264
7293
|
subscribe(l) {
|
|
7265
7294
|
return i.add(l), () => {
|
|
@@ -7269,16 +7298,16 @@ function Gc(t, e, n) {
|
|
|
7269
7298
|
};
|
|
7270
7299
|
}
|
|
7271
7300
|
let Fe = null;
|
|
7272
|
-
function
|
|
7301
|
+
function Gc(t) {
|
|
7273
7302
|
Fe && Fe.shutdown();
|
|
7274
7303
|
let e;
|
|
7275
7304
|
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));
|
|
7276
|
-
const n =
|
|
7305
|
+
const n = Kc(e, t, () => {
|
|
7277
7306
|
t.container || e.remove(), Fe === n && (Fe = null);
|
|
7278
7307
|
});
|
|
7279
7308
|
return Fe = n, n;
|
|
7280
7309
|
}
|
|
7281
7310
|
export {
|
|
7282
|
-
|
|
7311
|
+
Gc as JexityChat
|
|
7283
7312
|
};
|
|
7284
7313
|
//# sourceMappingURL=index.mjs.map
|