@evelan/jexity-widget 0.12.1 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { createContext as xo, useState as bo, useRef as zt, useEffect as vo, createElement as Dn, useContext as yo } from "react";
2
2
  const Br = xo(null);
3
- function vu(t) {
3
+ function ku(t) {
4
4
  const { children: e, ...n } = t, [r, i] = bo(!1), o = zt(null), s = zt(null), l = zt(null), a = n.mode === "embedded";
5
5
  vo(() => {
6
6
  let d = !1;
7
- return Promise.resolve().then(() => xu).then(
7
+ return Promise.resolve().then(() => vu).then(
8
8
  (h) => {
9
9
  if (d)
10
10
  return;
@@ -40,7 +40,7 @@ function vu(t) {
40
40
  }) : e
41
41
  );
42
42
  }
43
- function yu() {
43
+ function wu() {
44
44
  const t = yo(Br);
45
45
  if (!t)
46
46
  throw new Error("useJexityChat must be used within a <JexityChatProvider>");
@@ -96,8 +96,8 @@ function bt() {
96
96
  bt.__r = 0;
97
97
  }
98
98
  function Xr(t, e, n, r, i, o, s, l, a, u, d) {
99
- var h, p, f, g, m, x, y, v = r && r.__k || Gr, T = e.length;
100
- for (a = _o(n, e, v, a, T), h = 0; h < T; h++) (f = n.__k[h]) != null && (p = f.__i == -1 ? Ge : v[f.__i] || Ge, f.__i = h, x = kn(t, f, p, i, o, s, l, a, u, d), g = f.__e, f.ref && p.ref != f.ref && (p.ref && wn(p.ref, null, f), d.push(f.ref, f.__c || g, f)), m == null && g != null && (m = g), (y = !!(4 & f.__u)) || p.__k === f.__k ? a = ei(f, a, t, y) : typeof f.type == "function" && x !== void 0 ? a = x : g && (a = g.nextSibling), f.__u &= -7);
99
+ var h, p, f, g, m, x, y, v = r && r.__k || Gr, A = e.length;
100
+ for (a = _o(n, e, v, a, A), h = 0; h < A; h++) (f = n.__k[h]) != null && (p = f.__i == -1 ? Ge : v[f.__i] || Ge, f.__i = h, x = kn(t, f, p, i, o, s, l, a, u, d), g = f.__e, f.ref && p.ref != f.ref && (p.ref && wn(p.ref, null, f), d.push(f.ref, f.__c || g, f)), m == null && g != null && (m = g), (y = !!(4 & f.__u)) || p.__k === f.__k ? a = ei(f, a, t, y) : typeof f.type == "function" && x !== void 0 ? a = x : g && (a = g.nextSibling), f.__u &= -7);
101
101
  return n.__e = m, a;
102
102
  }
103
103
  function _o(t, e, n, r, i) {
@@ -163,11 +163,11 @@ function Hn(t) {
163
163
  };
164
164
  }
165
165
  function kn(t, e, n, r, i, o, s, l, a, u) {
166
- var d, h, p, f, g, m, x, y, v, T, K, se, B, Fn, ct, Ne, Ot, Z = e.type;
166
+ var d, h, p, f, g, m, x, y, v, A, K, se, B, Fn, ct, Ne, Ot, Z = e.type;
167
167
  if (e.constructor != null) return null;
168
168
  128 & n.__u && (a = !!(32 & n.__u), o = [l = e.__e = n.__e]), (d = b.__b) && d(e);
169
169
  e: if (typeof Z == "function") try {
170
- if (y = e.props, v = "prototype" in Z && Z.prototype.render, T = (d = Z.contextType) && r[d.__c], K = d ? T ? T.props.value : d.__ : r, n.__c ? x = (h = e.__c = n.__c).__ = h.__E : (v ? e.__c = h = new Z(y, K) : (e.__c = h = new W(y, K), h.constructor = Z, h.render = Co), T && T.sub(h), h.props = y, h.state || (h.state = {}), h.context = K, h.__n = r, p = h.__d = !0, h.__h = [], h._sb = []), v && h.__s == null && (h.__s = h.state), v && Z.getDerivedStateFromProps != null && (h.__s == h.state && (h.__s = ee({}, h.__s)), ee(h.__s, Z.getDerivedStateFromProps(y, h.__s))), f = h.props, g = h.state, h.__v = e, p) v && Z.getDerivedStateFromProps == null && h.componentWillMount != null && h.componentWillMount(), v && h.componentDidMount != null && h.__h.push(h.componentDidMount);
170
+ if (y = e.props, v = "prototype" in Z && Z.prototype.render, A = (d = Z.contextType) && r[d.__c], K = d ? A ? A.props.value : d.__ : r, n.__c ? x = (h = e.__c = n.__c).__ = h.__E : (v ? e.__c = h = new Z(y, K) : (e.__c = h = new W(y, K), h.constructor = Z, h.render = Co), A && A.sub(h), h.props = y, h.state || (h.state = {}), h.context = K, h.__n = r, p = h.__d = !0, h.__h = [], h._sb = []), v && h.__s == null && (h.__s = h.state), v && Z.getDerivedStateFromProps != null && (h.__s == h.state && (h.__s = ee({}, h.__s)), ee(h.__s, Z.getDerivedStateFromProps(y, h.__s))), f = h.props, g = h.state, h.__v = e, p) v && Z.getDerivedStateFromProps == null && h.componentWillMount != null && h.componentWillMount(), v && h.componentDidMount != null && h.__h.push(h.componentDidMount);
171
171
  else {
172
172
  if (v && Z.getDerivedStateFromProps == null && y !== f && h.componentWillReceiveProps != null && h.componentWillReceiveProps(y, K), !h.__e && h.shouldComponentUpdate != null && h.shouldComponentUpdate(y, h.__s, K) === !1 || e.__v == n.__v) {
173
173
  for (e.__v != n.__v && (h.props = y, h.state = h.__s, h.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(ke) {
@@ -336,7 +336,7 @@ function c(t, e, n, r, i, o) {
336
336
  return b.vnode && b.vnode(u), u;
337
337
  }
338
338
  var ce, j, Nt, Wn, Ie = 0, oi = [], S = b, Jn = S.__b, Kn = S.__r, Zn = S.diffed, Gn = S.__c, Yn = S.unmount, Xn = S.__;
339
- function Pe(t, e) {
339
+ function Me(t, e) {
340
340
  S.__h && S.__h(j, t, Ie || e), Ie = 0;
341
341
  var n = j.__H || (j.__H = { __: [], __h: [] });
342
342
  return t >= n.__.length && n.__.push({}), n.__[t];
@@ -345,7 +345,7 @@ function C(t) {
345
345
  return Ie = 1, _n(ci, t);
346
346
  }
347
347
  function _n(t, e, n) {
348
- var r = Pe(ce++, 2);
348
+ var r = Me(ce++, 2);
349
349
  if (r.t = t, !r.__c && (r.__ = [n ? n(e) : ci(void 0, e), function(l) {
350
350
  var a = r.__N ? r.__N[0] : r.__[0], u = r.t(a, l);
351
351
  a !== u && (r.__N = [u, r.__[1]], r.__c.setState({}));
@@ -379,11 +379,11 @@ function _n(t, e, n) {
379
379
  return r.__N || r.__;
380
380
  }
381
381
  function R(t, e) {
382
- var n = Pe(ce++, 3);
382
+ var n = Me(ce++, 3);
383
383
  !S.__s && jn(n.__H, e) && (n.__ = t, n.u = e, j.__H.__h.push(n));
384
384
  }
385
385
  function st(t, e) {
386
- var n = Pe(ce++, 4);
386
+ var n = Me(ce++, 4);
387
387
  !S.__s && jn(n.__H, e) && (n.__ = t, n.u = e, j.__h.push(n));
388
388
  }
389
389
  function ue(t) {
@@ -405,7 +405,7 @@ function si(t, e, n) {
405
405
  }, n == null ? n : n.concat(t));
406
406
  }
407
407
  function J(t, e) {
408
- var n = Pe(ce++, 7);
408
+ var n = Me(ce++, 7);
409
409
  return jn(n.__H, e) && (n.__ = t(), n.__H = e, n.__h = t), n.__;
410
410
  }
411
411
  function Te(t, e) {
@@ -414,14 +414,14 @@ function Te(t, e) {
414
414
  }, e);
415
415
  }
416
416
  function It(t) {
417
- var e = j.context[t.__c], n = Pe(ce++, 9);
417
+ var e = j.context[t.__c], n = Me(ce++, 9);
418
418
  return n.c = t, e ? (n.__ == null && (n.__ = !0, e.sub(j)), e.props.value) : t.__;
419
419
  }
420
420
  function ai(t, e) {
421
421
  S.useDebugValue && S.useDebugValue(e ? e(t) : t);
422
422
  }
423
423
  function li() {
424
- var t = Pe(ce++, 11);
424
+ var t = Me(ce++, 11);
425
425
  if (!t.__) {
426
426
  for (var e = j.__v; e !== null && !e.__m && e.__ !== null; ) e = e.__;
427
427
  var n = e.__m || (e.__m = [0, 0]);
@@ -556,17 +556,17 @@ var tr = b.__b;
556
556
  b.__b = function(t) {
557
557
  t.type && t.type.__f && t.ref && (t.props.ref = t.ref, t.ref = null), tr && tr(t);
558
558
  };
559
- var qo = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
560
- function Mo(t) {
559
+ var Po = typeof Symbol < "u" && Symbol.for && /* @__PURE__ */ Symbol.for("react.forward_ref") || 3911;
560
+ function qo(t) {
561
561
  function e(n) {
562
562
  var r = ui({}, n);
563
563
  return delete r.ref, t(r, n.ref || null);
564
564
  }
565
- return e.$$typeof = qo, e.render = t, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
565
+ return e.$$typeof = Po, e.render = t, e.prototype.isReactComponent = e.__f = !0, e.displayName = "ForwardRef(" + (t.displayName || t.name) + ")", e;
566
566
  }
567
567
  var nr = function(t, e) {
568
568
  return t == null ? null : te(te(t).map(e));
569
- }, Po = { map: nr, forEach: nr, count: function(t) {
569
+ }, Mo = { map: nr, forEach: nr, count: function(t) {
570
570
  return t ? te(t).length : 0;
571
571
  }, only: function(t) {
572
572
  var e = te(t);
@@ -787,7 +787,7 @@ var os = function(t, e) {
787
787
  return t(e);
788
788
  }, ss = function(t, e) {
789
789
  return t(e);
790
- }, as = Q, ls = $t, Cn = { useState: C, useId: li, useReducer: _n, useEffect: R, useLayoutEffect: st, useInsertionEffect: gi, useTransition: fi, useDeferredValue: pi, useSyncExternalStore: hi, startTransition: di, useRef: ue, useImperativeHandle: si, useMemo: J, useCallback: Te, useContext: It, useDebugValue: ai, version: "18.3.1", Children: Po, render: Ho, hydrate: Wo, unmountComponentAtNode: rs, createPortal: Qo, createElement: D, createContext: To, createFactory: Xo, cloneElement: ns, createRef: wo, Fragment: Q, isValidElement: $t, isElement: ls, isFragment: es, isMemo: ts, findDOMNode: is, Component: W, PureComponent: rn, memo: Eo, forwardRef: Mo, flushSync: ss, unstable_batchedUpdates: os, StrictMode: as, Suspense: mt, SuspenseList: De, lazy: Oo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Yo }, X = [], F = [], cs = Uint8Array, Ut = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
790
+ }, as = Q, ls = $t, Cn = { useState: C, useId: li, useReducer: _n, useEffect: R, useLayoutEffect: st, useInsertionEffect: gi, useTransition: fi, useDeferredValue: pi, useSyncExternalStore: hi, startTransition: di, useRef: ue, useImperativeHandle: si, useMemo: J, useCallback: Te, useContext: It, useDebugValue: ai, version: "18.3.1", Children: Mo, render: Ho, hydrate: Wo, unmountComponentAtNode: rs, createPortal: Qo, createElement: D, createContext: To, createFactory: Xo, cloneElement: ns, createRef: wo, Fragment: Q, isValidElement: $t, isElement: ls, isFragment: es, isMemo: ts, findDOMNode: is, Component: W, PureComponent: rn, memo: Eo, forwardRef: qo, flushSync: ss, unstable_batchedUpdates: os, StrictMode: as, Suspense: mt, SuspenseList: De, lazy: Oo, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Yo }, X = [], F = [], cs = Uint8Array, Ut = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
791
791
  for (var we = 0, us = Ut.length; we < us; ++we)
792
792
  X[we] = Ut[we], F[Ut.charCodeAt(we)] = we;
793
793
  F[45] = 62;
@@ -1176,7 +1176,7 @@ function gr(t, e, n) {
1176
1176
  });
1177
1177
  }
1178
1178
  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, G = (t, e, n) => Es(t, typeof e != "symbol" ? e + "" : e, n);
1179
- class qs {
1179
+ class Ps {
1180
1180
  constructor() {
1181
1181
  G(this, "nextQueryId"), G(this, "querySetVersion"), G(this, "querySet"), G(this, "queryIdToToken"), G(this, "identityVersion"), G(this, "auth"), G(this, "outstandingQueriesOlderThanRestart"), G(this, "outstandingAuthOlderThanRestart"), G(this, "paused"), G(this, "pendingQuerySetModifications"), this.nextQueryId = 0, this.querySetVersion = 0, this.identityVersion = 0, this.querySet = /* @__PURE__ */ new Map(), this.queryIdToToken = /* @__PURE__ */ new Map(), this.outstandingQueriesOlderThanRestart = /* @__PURE__ */ new Set(), this.outstandingAuthOlderThanRestart = !1, this.paused = !1, this.pendingQuerySetModifications = /* @__PURE__ */ new Map();
1182
1182
  }
@@ -1381,7 +1381,7 @@ class qs {
1381
1381
  }
1382
1382
  }
1383
1383
  }
1384
- var Ms = Object.defineProperty, Ps = (t, e, n) => e in t ? Ms(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ht = (t, e, n) => Ps(t, typeof e != "symbol" ? e + "" : e, n);
1384
+ var qs = Object.defineProperty, Ms = (t, e, n) => e in t ? qs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, ht = (t, e, n) => Ms(t, typeof e != "symbol" ? e + "" : e, n);
1385
1385
  class Ls {
1386
1386
  constructor(e, n) {
1387
1387
  this.logger = e, this.markConnectionStateDirty = n, ht(this, "inflightRequests"), ht(this, "requestsOlderThanRestart"), ht(this, "inflightMutationsCount", 0), ht(this, "inflightActionsCount", 0), this.inflightRequests = /* @__PURE__ */ new Map(), this.requestsOlderThanRestart = /* @__PURE__ */ new Set();
@@ -2606,7 +2606,7 @@ class ka {
2606
2606
  else
2607
2607
  throw new Error(`Unknown parent protocol ${a}`);
2608
2608
  const d = `${u}://${l}/api/${pr}/sync`;
2609
- this.state = new qs(), this.remoteQuerySet = new xr(
2609
+ this.state = new Ps(), this.remoteQuerySet = new xr(
2610
2610
  (f) => this.state.queryPath(f),
2611
2611
  this.logger
2612
2612
  ), this.requestManager = new Ls(
@@ -3458,7 +3458,7 @@ var Ca = Object.defineProperty, Ra = (t, e, n) => e in t ? Ca(t, e, { enumerable
3458
3458
  const Ta = 5e3;
3459
3459
  if (typeof Cn > "u")
3460
3460
  throw new Error("Required dependency 'react' not found");
3461
- function qi(t, e, n) {
3461
+ function Pi(t, e, n) {
3462
3462
  function r(i) {
3463
3463
  return Ea(i), e.mutation(t, i, {
3464
3464
  optimisticUpdate: n
@@ -3471,7 +3471,7 @@ function qi(t, e, n) {
3471
3471
  t
3472
3472
  )}`
3473
3473
  );
3474
- return qi(t, e, i);
3474
+ return Pi(t, e, i);
3475
3475
  }, r;
3476
3476
  }
3477
3477
  class Aa {
@@ -3809,7 +3809,7 @@ function Et(t) {
3809
3809
  "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"
3810
3810
  );
3811
3811
  return J(
3812
- () => qi(e, n),
3812
+ () => Pi(e, n),
3813
3813
  // eslint-disable-next-line react-hooks/exhaustive-deps
3814
3814
  [n, O(e)]
3815
3815
  );
@@ -3820,8 +3820,8 @@ function Ea(t) {
3820
3820
  "Convex function called with SyntheticEvent object. Did you use a Convex function as an event handler directly? Event handlers like onClick receive an event object as their first argument. These SyntheticEvent objects are not valid Convex values. Try wrapping the function like `const handler = () => myMutation();` and using `handler` in the event handler."
3821
3821
  );
3822
3822
  }
3823
- var qa = Object.defineProperty, Ma = (t, e, n) => e in t ? qa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Wt = (t, e, n) => Ma(t, typeof e != "symbol" ? e + "" : e, n);
3824
- class Pa {
3823
+ var Pa = Object.defineProperty, qa = (t, e, n) => e in t ? Pa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Wt = (t, e, n) => qa(t, typeof e != "symbol" ? e + "" : e, n);
3824
+ class Ma {
3825
3825
  constructor(e) {
3826
3826
  Wt(this, "createWatch"), Wt(this, "queries"), Wt(this, "listeners"), this.createWatch = e, this.queries = {}, this.listeners = /* @__PURE__ */ new Set();
3827
3827
  }
@@ -3935,7 +3935,7 @@ function La(t) {
3935
3935
  return Oa(t, n);
3936
3936
  }
3937
3937
  function Oa(t, e) {
3938
- const [n] = C(() => new Pa(e));
3938
+ const [n] = C(() => new Ma(e));
3939
3939
  n.createWatch !== e && n.setCreateWatch(e), R(() => () => n.destroy(), [n]);
3940
3940
  const r = J(
3941
3941
  () => ({
@@ -3947,7 +3947,7 @@ function Oa(t, e) {
3947
3947
  return Sa(r);
3948
3948
  }
3949
3949
  var za = /* @__PURE__ */ Symbol.for("preact-signals");
3950
- function qt() {
3950
+ function Pt() {
3951
3951
  if (ae > 1)
3952
3952
  ae--;
3953
3953
  else {
@@ -3972,11 +3972,11 @@ function Na(t) {
3972
3972
  try {
3973
3973
  return t();
3974
3974
  } finally {
3975
- qt();
3975
+ Pt();
3976
3976
  }
3977
3977
  }
3978
3978
  var w = void 0;
3979
- function Mi(t) {
3979
+ function qi(t) {
3980
3980
  var e = w;
3981
3981
  w = void 0;
3982
3982
  try {
@@ -3986,7 +3986,7 @@ function Mi(t) {
3986
3986
  }
3987
3987
  }
3988
3988
  var Ke = void 0, ae = 0, ln = 0, wt = 0;
3989
- function Pi(t) {
3989
+ function Mi(t) {
3990
3990
  if (w !== void 0) {
3991
3991
  var e = t.n;
3992
3992
  if (e === void 0 || e.t !== w)
@@ -3995,31 +3995,31 @@ function Pi(t) {
3995
3995
  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;
3996
3996
  }
3997
3997
  }
3998
- function M(t, e) {
3998
+ function q(t, e) {
3999
3999
  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;
4000
4000
  }
4001
- M.prototype.brand = za;
4002
- M.prototype.h = function() {
4001
+ q.prototype.brand = za;
4002
+ q.prototype.h = function() {
4003
4003
  return !0;
4004
4004
  };
4005
- M.prototype.S = function(t) {
4005
+ q.prototype.S = function(t) {
4006
4006
  var e = this, n = this.t;
4007
- n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : Mi(function() {
4007
+ n !== t && t.e === void 0 && (t.x = n, this.t = t, n !== void 0 ? n.e = t : qi(function() {
4008
4008
  var r;
4009
4009
  (r = e.W) == null || r.call(e);
4010
4010
  }));
4011
4011
  };
4012
- M.prototype.U = function(t) {
4012
+ q.prototype.U = function(t) {
4013
4013
  var e = this;
4014
4014
  if (this.t !== void 0) {
4015
4015
  var n = t.e, r = t.x;
4016
- n !== void 0 && (n.x = r, t.e = void 0), r !== void 0 && (r.e = n, t.x = void 0), t === this.t && (this.t = r, r === void 0 && Mi(function() {
4016
+ n !== void 0 && (n.x = r, t.e = void 0), r !== void 0 && (r.e = n, t.x = void 0), t === this.t && (this.t = r, r === void 0 && qi(function() {
4017
4017
  var i;
4018
4018
  (i = e.Z) == null || i.call(e);
4019
4019
  }));
4020
4020
  }
4021
4021
  };
4022
- M.prototype.subscribe = function(t) {
4022
+ q.prototype.subscribe = function(t) {
4023
4023
  var e = this;
4024
4024
  return at(function() {
4025
4025
  var n = e.value, r = w;
@@ -4031,16 +4031,16 @@ M.prototype.subscribe = function(t) {
4031
4031
  }
4032
4032
  }, { name: "sub" });
4033
4033
  };
4034
- M.prototype.valueOf = function() {
4034
+ q.prototype.valueOf = function() {
4035
4035
  return this.value;
4036
4036
  };
4037
- M.prototype.toString = function() {
4037
+ q.prototype.toString = function() {
4038
4038
  return this.value + "";
4039
4039
  };
4040
- M.prototype.toJSON = function() {
4040
+ q.prototype.toJSON = function() {
4041
4041
  return this.value;
4042
4042
  };
4043
- M.prototype.peek = function() {
4043
+ q.prototype.peek = function() {
4044
4044
  var t = w;
4045
4045
  w = void 0;
4046
4046
  try {
@@ -4049,8 +4049,8 @@ M.prototype.peek = function() {
4049
4049
  w = t;
4050
4050
  }
4051
4051
  };
4052
- Object.defineProperty(M.prototype, "value", { get: function() {
4053
- var t = Pi(this);
4052
+ Object.defineProperty(q.prototype, "value", { get: function() {
4053
+ var t = Mi(this);
4054
4054
  return t !== void 0 && (t.i = this.i), this.v;
4055
4055
  }, set: function(t) {
4056
4056
  if (t !== this.v) {
@@ -4059,12 +4059,12 @@ Object.defineProperty(M.prototype, "value", { get: function() {
4059
4059
  try {
4060
4060
  for (var e = this.t; e !== void 0; e = e.x) e.t.N();
4061
4061
  } finally {
4062
- qt();
4062
+ Pt();
4063
4063
  }
4064
4064
  }
4065
4065
  } });
4066
- function A(t, e) {
4067
- return new M(t, e);
4066
+ function I(t, e) {
4067
+ return new q(t, e);
4068
4068
  }
4069
4069
  function Li(t) {
4070
4070
  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;
@@ -4087,9 +4087,9 @@ function zi(t) {
4087
4087
  t.s = n;
4088
4088
  }
4089
4089
  function ve(t, e) {
4090
- M.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;
4090
+ 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;
4091
4091
  }
4092
- ve.prototype = new M();
4092
+ ve.prototype = new q();
4093
4093
  ve.prototype.h = function() {
4094
4094
  if (this.f &= -3, 1 & this.f) return !1;
4095
4095
  if ((36 & this.f) == 32 || (this.f &= -5, this.g === wt)) return !0;
@@ -4110,10 +4110,10 @@ ve.prototype.S = function(t) {
4110
4110
  this.f |= 36;
4111
4111
  for (var e = this.s; e !== void 0; e = e.n) e.S.S(e);
4112
4112
  }
4113
- M.prototype.S.call(this, t);
4113
+ q.prototype.S.call(this, t);
4114
4114
  };
4115
4115
  ve.prototype.U = function(t) {
4116
- if (this.t !== void 0 && (M.prototype.U.call(this, t), this.t === void 0)) {
4116
+ if (this.t !== void 0 && (q.prototype.U.call(this, t), this.t === void 0)) {
4117
4117
  this.f &= -33;
4118
4118
  for (var e = this.s; e !== void 0; e = e.n) e.S.U(e);
4119
4119
  }
@@ -4126,7 +4126,7 @@ ve.prototype.N = function() {
4126
4126
  };
4127
4127
  Object.defineProperty(ve.prototype, "value", { get: function() {
4128
4128
  if (1 & this.f) throw new Error("Cycle detected");
4129
- var t = Pi(this);
4129
+ var t = Mi(this);
4130
4130
  if (this.h(), t !== void 0 && (t.i = this.i), 16 & this.f) throw this.v;
4131
4131
  return this.v;
4132
4132
  } });
@@ -4144,7 +4144,7 @@ function Ni(t) {
4144
4144
  } catch (r) {
4145
4145
  throw t.f &= -2, t.f |= 8, An(t), r;
4146
4146
  } finally {
4147
- w = n, qt();
4147
+ w = n, Pt();
4148
4148
  }
4149
4149
  }
4150
4150
  }
@@ -4154,7 +4154,7 @@ function An(t) {
4154
4154
  }
4155
4155
  function Qa(t) {
4156
4156
  if (w !== this) throw new Error("Out-of-order effect");
4157
- zi(this), w = t, this.f &= -2, 8 & this.f && An(this), qt();
4157
+ zi(this), w = t, this.f &= -2, 8 & this.f && An(this), Pt();
4158
4158
  }
4159
4159
  function Le(t, e) {
4160
4160
  this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32, this.name = e?.name;
@@ -4235,7 +4235,7 @@ function Fi(t) {
4235
4235
  return o.value ? s.peek() : s.value;
4236
4236
  }
4237
4237
  Fi.displayName = "ReactiveTextNode";
4238
- Object.defineProperties(M.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Fi }, props: { configurable: !0, get: function() {
4238
+ Object.defineProperties(q.prototype, { constructor: { configurable: !0, value: void 0 }, type: { configurable: !0, value: Fi }, props: { configurable: !0, get: function() {
4239
4239
  return { data: this };
4240
4240
  } }, __b: { configurable: !0, value: 1 } });
4241
4241
  Oe("__b", function(t, e) {
@@ -4243,7 +4243,7 @@ Oe("__b", function(t, e) {
4243
4243
  var n, r = e.props;
4244
4244
  for (var i in r) if (i !== "children") {
4245
4245
  var o = r[i];
4246
- o instanceof M && (n || (e.__np = n = {}), n[i] = o, r[i] = o.peek());
4246
+ o instanceof q && (n || (e.__np = n = {}), n[i] = o, r[i] = o.peek());
4247
4247
  }
4248
4248
  }
4249
4249
  t(e);
@@ -4288,7 +4288,7 @@ Oe("diffed", function(t, e) {
4288
4288
  t(e);
4289
4289
  });
4290
4290
  function Fa(t, e, n, r) {
4291
- var i = e in t && t.ownerSVGElement === void 0, o = A(n);
4291
+ var i = e in t && t.ownerSVGElement === void 0, o = I(n);
4292
4292
  return { o: function(s, l) {
4293
4293
  o.value = s, r = l;
4294
4294
  }, d: at(function() {
@@ -4336,7 +4336,7 @@ W.prototype.shouldComponentUpdate = function(t, e) {
4336
4336
  };
4337
4337
  function Re(t, e) {
4338
4338
  return J(function() {
4339
- return A(t, e);
4339
+ return I(t, e);
4340
4340
  }, []);
4341
4341
  }
4342
4342
  var Da = function(t) {
@@ -4352,7 +4352,7 @@ function Ba() {
4352
4352
  function Di() {
4353
4353
  Ui.push(this) === 1 && (b.requestAnimationFrame || Da)(Ba);
4354
4354
  }
4355
- const q = A(!1), jt = A(void 0), le = A(void 0), un = A([]), hn = A([]), Bi = A(null);
4355
+ const P = I(!1), jt = I(void 0), le = I(void 0), un = I([]), hn = I([]), Bi = I(null);
4356
4356
  function Va(t) {
4357
4357
  return t.replace(/\.convex\.site\b/, ".convex.cloud");
4358
4358
  }
@@ -4557,7 +4557,8 @@ const Wi = {
4557
4557
  escalationSubmit: "Send to team",
4558
4558
  escalationSubmitting: "Sending…",
4559
4559
  escalationSubmitted: "Request submitted",
4560
- escalationConsent: "We’ll only use your email to respond to this conversation.",
4560
+ escalationConsent: "By submitting, you agree to our",
4561
+ escalationPrivacyLinkText: "Privacy Policy",
4561
4562
  escalationSkip: "Skip, I’ll wait here",
4562
4563
  escalationPromptTitle: "Talk to our team",
4563
4564
  escalationPromptSubtitle: "We can notify you by email when our team replies.",
@@ -4593,7 +4594,9 @@ Use it to resume this conversation from any device.`,
4593
4594
  noticeAgentHandling: "Your conversation is with a human agent who will respond shortly.",
4594
4595
  replyTo: "Reply to {name}",
4595
4596
  sourcesCountOne: "{count} source",
4596
- sourcesCountOther: "{count} sources"
4597
+ sourcesCountOther: "{count} sources",
4598
+ privacyNoticePre: "By chatting, you agree to our",
4599
+ privacyPolicyLinkText: "Privacy Policy"
4597
4600
  }, el = {
4598
4601
  title: "Assistent",
4599
4602
  statusOnline: "Online · Antwortet in Sekunden",
@@ -4641,7 +4644,8 @@ Use it to resume this conversation from any device.`,
4641
4644
  escalationSubmit: "An Team senden",
4642
4645
  escalationSubmitting: "Wird gesendet…",
4643
4646
  escalationSubmitted: "Anfrage gesendet",
4644
- escalationConsent: "Wir verwenden Ihre E-Mail nur, um auf diese Unterhaltung zu antworten.",
4647
+ escalationConsent: "Mit dem Absenden stimmen Sie unserer",
4648
+ escalationPrivacyLinkText: "Datenschutzerklärung",
4645
4649
  escalationSkip: "Überspringen, ich warte hier",
4646
4650
  escalationPromptTitle: "Sprechen Sie mit unserem Team",
4647
4651
  escalationPromptSubtitle: "Wir benachrichtigen Sie per E-Mail, wenn wir antworten.",
@@ -4677,12 +4681,14 @@ Verwenden Sie sie, um diese Unterhaltung auf jedem Gerät fortzusetzen.`,
4677
4681
  noticeAgentHandling: "Ihre Unterhaltung wird von einem menschlichen Mitarbeiter betreut, der in Kürze antwortet.",
4678
4682
  replyTo: "Antworten an {name}",
4679
4683
  sourcesCountOne: "{count} Quelle",
4680
- sourcesCountOther: "{count} Quellen"
4684
+ sourcesCountOther: "{count} Quellen",
4685
+ privacyNoticePre: "Mit dem Chatten stimmst du unserer",
4686
+ privacyPolicyLinkText: "Datenschutzerklärung"
4681
4687
  }, tl = [
4682
4688
  { value: "de", label: "Deutsch", flag: "🇩🇪" },
4683
4689
  { value: "en", label: "English", flag: "🇬🇧" }
4684
- ], nl = "de", rl = "jex-locale", In = A("de"), il = { en: Wi, de: el };
4685
- function I() {
4690
+ ], nl = "de", rl = "jex-locale", In = I("de"), il = { en: Wi, de: el };
4691
+ function T() {
4686
4692
  return il[In.value] ?? Wi;
4687
4693
  }
4688
4694
  function Jt(t) {
@@ -4722,7 +4728,7 @@ function ol(t) {
4722
4728
  };
4723
4729
  }, [t]);
4724
4730
  }
4725
- const Ki = "jex-session-history", Zi = Ki, Gi = 900 * 1e3, z = A([]), xe = A(null), Yi = cn(() => z.value.length > 0), Ze = A(null);
4731
+ const Ki = "jex-session-history", Zi = Ki, Gi = 3600 * 1e3, z = I([]), xe = I(null), Yi = cn(() => z.value.length > 0), Ze = I(null);
4726
4732
  function sl() {
4727
4733
  return "JEX-" + Math.random().toString(36).slice(2, 8).toUpperCase();
4728
4734
  }
@@ -4737,7 +4743,7 @@ function al(t) {
4737
4743
  return [];
4738
4744
  }
4739
4745
  }
4740
- function Mt(t) {
4746
+ function qt(t) {
4741
4747
  try {
4742
4748
  const e = { v: 1, entries: t };
4743
4749
  sessionStorage.setItem(Zi, JSON.stringify(e));
@@ -4746,17 +4752,17 @@ function Mt(t) {
4746
4752
  }
4747
4753
  function ll() {
4748
4754
  const t = Date.now(), e = al(t);
4749
- z.value = e, Mt(e), xe.value = e.length > 0 ? e[e.length - 1].ref : null;
4755
+ z.value = e, qt(e), xe.value = e[e.length - 1]?.ref ?? null;
4750
4756
  }
4751
4757
  function Sr() {
4752
4758
  const t = sl(), e = Date.now(), n = [...z.value, { ref: t, startedAt: e, lastActivityAt: e }];
4753
- return z.value = n, xe.value = t, Mt(n), t;
4759
+ return z.value = n, xe.value = t, qt(n), t;
4754
4760
  }
4755
4761
  function Cr(t) {
4756
4762
  const e = Date.now(), n = z.value.map(
4757
4763
  (r) => r.ref === t ? { ...r, lastActivityAt: e } : r
4758
4764
  );
4759
- z.value = n, xe.value = t, Mt(n);
4765
+ z.value = n, xe.value = t, qt(n);
4760
4766
  }
4761
4767
  function $n(t) {
4762
4768
  if (!t)
@@ -4764,16 +4770,16 @@ function $n(t) {
4764
4770
  const e = Date.now(), n = z.value.map(
4765
4771
  (r) => r.ref === t ? { ...r, lastActivityAt: e } : r
4766
4772
  );
4767
- z.value = n, Mt(n);
4773
+ z.value = n, qt(n);
4768
4774
  }
4769
- const N = A(Xi());
4775
+ const N = I(Xi());
4770
4776
  function Xi() {
4771
4777
  return Yi.value ? [{ id: "home" }] : [{ id: "chat" }];
4772
4778
  }
4773
4779
  function cl() {
4774
4780
  N.value = Xi();
4775
4781
  }
4776
- const ul = A("screen");
4782
+ const ul = I("screen");
4777
4783
  function fe(t) {
4778
4784
  N.value = [...N.value, t];
4779
4785
  }
@@ -4783,7 +4789,7 @@ function Ct() {
4783
4789
  function dn(t) {
4784
4790
  N.value = [...N.value.slice(0, -1), t];
4785
4791
  }
4786
- const hl = 6e4, nt = A(!1), pn = A(!1), fn = /* @__PURE__ */ new Set();
4792
+ const hl = 6e4, nt = I(!1), pn = I(!1), fn = /* @__PURE__ */ new Set();
4787
4793
  function dl(t) {
4788
4794
  return fn.add(t), () => {
4789
4795
  fn.delete(t);
@@ -4861,7 +4867,7 @@ function En({ size: t = 24 }) {
4861
4867
  ] });
4862
4868
  }
4863
4869
  function xl() {
4864
- const t = I();
4870
+ const t = T();
4865
4871
  return N.value.length > 1 ? /* @__PURE__ */ c(
4866
4872
  "button",
4867
4873
  {
@@ -4873,7 +4879,7 @@ function xl() {
4873
4879
  ) : /* @__PURE__ */ c(En, { size: 24 });
4874
4880
  }
4875
4881
  function bl({ title: t }) {
4876
- const e = I();
4882
+ const e = T();
4877
4883
  return /* @__PURE__ */ c("div", { class: "jex-header-info", children: [
4878
4884
  /* @__PURE__ */ c("h3", { children: t }),
4879
4885
  /* @__PURE__ */ c("p", { children: e.statusOnline })
@@ -4886,14 +4892,14 @@ function eo({ size: t = 28 }) {
4886
4892
  ] });
4887
4893
  }
4888
4894
  function vl() {
4889
- const t = I();
4895
+ const t = T();
4890
4896
  return /* @__PURE__ */ c(
4891
4897
  "button",
4892
4898
  {
4893
4899
  class: "jex-header-close",
4894
4900
  type: "button",
4895
4901
  onClick: () => {
4896
- q.value = !1;
4902
+ P.value = !1;
4897
4903
  },
4898
4904
  "aria-label": t.closeChatAriaLabel,
4899
4905
  title: t.closeChatAriaLabel,
@@ -4967,17 +4973,17 @@ const _l = {
4967
4973
  full: "9999px"
4968
4974
  };
4969
4975
  function Sl({ radius: t = "full", iconOption: e = "chat", label: n }) {
4970
- const r = I(), i = n ?? r.fabLabel, o = i !== "";
4976
+ const r = T(), i = n ?? r.fabLabel, o = i !== "";
4971
4977
  return /* @__PURE__ */ c(
4972
4978
  "button",
4973
4979
  {
4974
- class: `jex-floating-button ${!q.value && o ? "jex-has-label" : ""}`,
4980
+ class: `jex-floating-button ${!P.value && o ? "jex-has-label" : ""}`,
4975
4981
  style: { borderRadius: jl[t] ?? "9999px" },
4976
4982
  onClick: () => {
4977
- q.value = !q.value;
4983
+ P.value = !P.value;
4978
4984
  },
4979
- "aria-label": q.value ? r.closeChatAriaLabel : r.openChatAriaLabel,
4980
- children: q.value ? /* @__PURE__ */ c(eo, { size: 28 }) : /* @__PURE__ */ c("div", { class: "jex-fab-inner", children: [
4985
+ "aria-label": P.value ? r.closeChatAriaLabel : r.openChatAriaLabel,
4986
+ children: P.value ? /* @__PURE__ */ c(eo, { size: 28 }) : /* @__PURE__ */ c("div", { class: "jex-fab-inner", children: [
4981
4987
  _l[e],
4982
4988
  o && /* @__PURE__ */ c("span", { class: "jex-fab-label", children: i })
4983
4989
  ] })
@@ -4985,7 +4991,7 @@ function Sl({ radius: t = "full", iconOption: e = "chat", label: n }) {
4985
4991
  );
4986
4992
  }
4987
4993
  function Cl({ title: t, onStartFresh: e, onResetSession: n }) {
4988
- const r = I(), [i, o] = C("");
4994
+ const r = T(), [i, o] = C("");
4989
4995
  function s() {
4990
4996
  Kt(), Ze.value = "fresh", n(), e(), fe({ id: "chat" });
4991
4997
  }
@@ -5056,7 +5062,7 @@ function Cl({ title: t, onStartFresh: e, onResetSession: n }) {
5056
5062
  ] });
5057
5063
  }
5058
5064
  function Rl({ title: t }) {
5059
- const e = I();
5065
+ const e = T();
5060
5066
  return /* @__PURE__ */ c("div", { class: "jex-selection", children: [
5061
5067
  /* @__PURE__ */ c("h2", { class: "jex-selection-title", children: e.howCanWeHelp }),
5062
5068
  /* @__PURE__ */ c("div", { class: "jex-selection-options", children: [
@@ -5132,7 +5138,7 @@ const $l = (t) => {
5132
5138
  ...l
5133
5139
  },
5134
5140
  [...o.map(([a, u]) => D(a, u)), ...te(i)]
5135
- ), ql = (t, e) => {
5141
+ ), Pl = (t, e) => {
5136
5142
  const n = ({ class: r = "", className: i = "", children: o, ...s }) => D(
5137
5143
  El,
5138
5144
  {
@@ -5148,14 +5154,14 @@ const $l = (t) => {
5148
5154
  o
5149
5155
  );
5150
5156
  return n.displayName = $r(t), n;
5151
- }, Ml = ql("corner-up-left", [
5157
+ }, ql = Pl("corner-up-left", [
5152
5158
  ["path", { d: "M20 20v-7a4 4 0 0 0-4-4H4", key: "1nkjon" }],
5153
5159
  ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }]
5154
5160
  ]);
5155
- function qn() {
5161
+ function Pn() {
5156
5162
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
5157
5163
  }
5158
- var ye = qn();
5164
+ var ye = Pn();
5159
5165
  function no(t) {
5160
5166
  ye = t;
5161
5167
  }
@@ -5163,41 +5169,41 @@ var de = { exec: () => null };
5163
5169
  function k(t, e = "") {
5164
5170
  let n = typeof t == "string" ? t : t.source, r = { replace: (i, o) => {
5165
5171
  let s = typeof o == "string" ? o : o.source;
5166
- return s = s.replace(P.caret, "$1"), n = n.replace(i, s), r;
5172
+ return s = s.replace(M.caret, "$1"), n = n.replace(i, s), r;
5167
5173
  }, getRegex: () => new RegExp(n, e) };
5168
5174
  return r;
5169
5175
  }
5170
- var Pl = (() => {
5176
+ var Ml = (() => {
5171
5177
  try {
5172
5178
  return !!new RegExp("(?<=1)(?<!1)");
5173
5179
  } catch {
5174
5180
  return !1;
5175
5181
  }
5176
- })(), 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)}}>`) }, Ll = /^(?:[ \t]*(?:\n|$))+/, Ol = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, zl = /^ {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+|$)/, Nl = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Mn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ro = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, io = k(ro).replace(/bull/g, Mn).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(), Ql = k(ro).replace(/bull/g, Mn).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(), Pn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ul = /^[^\n]+/, Ln = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Fl = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ln).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Dl = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Mn).getRegex(), Pt = "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", On = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Bl = k("^ {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", On).replace("tag", Pt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oo = k(Pn).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", Pt).getRegex(), Vl = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oo).getRegex(), zn = { blockquote: Vl, code: Ol, def: Fl, fences: zl, heading: Nl, hr: lt, html: Bl, lheading: io, list: Dl, newline: Ll, paragraph: oo, table: de, text: Ul }, Er = k("^ *([^\\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", Pt).getRegex(), Hl = { ...zn, lheading: Ql, table: Er, paragraph: k(Pn).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Pt).getRegex() }, Wl = { ...zn, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", On).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: k(Pn).replace("hr", lt).replace("heading", ` *#{1,6} *[^
5177
- ]`).replace("lheading", io).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Jl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Kl = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, so = /^( {2,}|\\)\n(?!\s*$)/, Zl = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, ze = /[\p{P}\p{S}]/u, Lt = /[\s\p{P}\p{S}]/u, Nn = /[^\s\p{P}\p{S}]/u, Gl = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Lt).getRegex(), ao = /(?!~)[\p{P}\p{S}]/u, Yl = /(?!~)[\s\p{P}\p{S}]/u, Xl = /(?:[^\s\p{P}\p{S}]|~)/u, ec = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Pl ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), lo = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, tc = k(lo, "u").replace(/punct/g, ze).getRegex(), nc = k(lo, "u").replace(/punct/g, ao).getRegex(), co = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", rc = k(co, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), ic = k(co, "gu").replace(/notPunctSpace/g, Xl).replace(/punctSpace/g, Yl).replace(/punct/g, ao).getRegex(), oc = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), sc = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ze).getRegex(), ac = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", lc = k(ac, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), cc = k(/\\(punct)/, "gu").replace(/punct/g, ze).getRegex(), uc = k(/^<(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(), hc = k(On).replace("(?:-->|$)", "-->").getRegex(), dc = k("^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", hc).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Rt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, pc = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Rt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), uo = k(/^!?\[(label)\]\[(ref)\]/).replace("label", Rt).replace("ref", Ln).getRegex(), ho = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ln).getRegex(), fc = k("reflink|nolink(?!\\()", "g").replace("reflink", uo).replace("nolink", ho).getRegex(), qr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Qn = { _backpedal: de, anyPunctuation: cc, autolink: uc, blockSkip: ec, br: so, code: Kl, del: de, delLDelim: de, delRDelim: de, emStrongLDelim: tc, emStrongRDelimAst: rc, emStrongRDelimUnd: oc, escape: Jl, link: pc, nolink: ho, punctuation: Gl, reflink: uo, reflinkSearch: fc, tag: dc, text: Zl, url: de }, gc = { ...Qn, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", Rt).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Rt).getRegex() }, gn = { ...Qn, emStrongRDelimAst: ic, emStrongLDelim: nc, delLDelim: sc, delRDelim: lc, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", qr).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: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", qr).getRegex() }, mc = { ...gn, br: k(so).replace("{2,}", "*").getRegex(), text: k(gn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: zn, gfm: Hl, pedantic: Wl }, Qe = { normal: Qn, gfm: gn, breaks: mc, pedantic: gc }, xc = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Mr = (t) => xc[t];
5182
+ })(), M = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (t) => new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`), htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i"), blockquoteBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}>`) }, Ll = /^(?:[ \t]*(?:\n|$))+/, Ol = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, zl = /^ {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+|$)/, Nl = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, qn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ro = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, io = k(ro).replace(/bull/g, qn).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(), Ql = k(ro).replace(/bull/g, qn).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(), Mn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ul = /^[^\n]+/, Ln = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Fl = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ln).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Dl = k(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, qn).getRegex(), Mt = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", On = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Bl = k("^ {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", On).replace("tag", Mt).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), oo = k(Mn).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex(), Vl = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", oo).getRegex(), zn = { blockquote: Vl, code: Ol, def: Fl, fences: zl, heading: Nl, hr: lt, html: Bl, lheading: io, list: Dl, newline: Ll, paragraph: oo, table: de, text: Ul }, Er = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex(), Hl = { ...zn, lheading: Ql, table: Er, paragraph: k(Mn).replace("hr", lt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Er).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Mt).getRegex() }, Wl = { ...zn, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", On).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: k(Mn).replace("hr", lt).replace("heading", ` *#{1,6} *[^
5183
+ ]`).replace("lheading", io).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Jl = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Kl = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, so = /^( {2,}|\\)\n(?!\s*$)/, Zl = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, ze = /[\p{P}\p{S}]/u, Lt = /[\s\p{P}\p{S}]/u, Nn = /[^\s\p{P}\p{S}]/u, Gl = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Lt).getRegex(), ao = /(?!~)[\p{P}\p{S}]/u, Yl = /(?!~)[\s\p{P}\p{S}]/u, Xl = /(?:[^\s\p{P}\p{S}]|~)/u, ec = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Ml ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), lo = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, tc = k(lo, "u").replace(/punct/g, ze).getRegex(), nc = k(lo, "u").replace(/punct/g, ao).getRegex(), co = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", rc = k(co, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), ic = k(co, "gu").replace(/notPunctSpace/g, Xl).replace(/punctSpace/g, Yl).replace(/punct/g, ao).getRegex(), oc = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), sc = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ze).getRegex(), ac = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", lc = k(ac, "gu").replace(/notPunctSpace/g, Nn).replace(/punctSpace/g, Lt).replace(/punct/g, ze).getRegex(), cc = k(/\\(punct)/, "gu").replace(/punct/g, ze).getRegex(), uc = k(/^<(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(), hc = k(On).replace("(?:-->|$)", "-->").getRegex(), dc = k("^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", hc).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Rt = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, pc = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Rt).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), uo = k(/^!?\[(label)\]\[(ref)\]/).replace("label", Rt).replace("ref", Ln).getRegex(), ho = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ln).getRegex(), fc = k("reflink|nolink(?!\\()", "g").replace("reflink", uo).replace("nolink", ho).getRegex(), Pr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Qn = { _backpedal: de, anyPunctuation: cc, autolink: uc, blockSkip: ec, br: so, code: Kl, del: de, delLDelim: de, delRDelim: de, emStrongLDelim: tc, emStrongRDelimAst: rc, emStrongRDelimUnd: oc, escape: Jl, link: pc, nolink: ho, punctuation: Gl, reflink: uo, reflinkSearch: fc, tag: dc, text: Zl, url: de }, gc = { ...Qn, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", Rt).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Rt).getRegex() }, gn = { ...Qn, emStrongRDelimAst: ic, emStrongLDelim: nc, delLDelim: sc, delRDelim: lc, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Pr).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: k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Pr).getRegex() }, mc = { ...gn, br: k(so).replace("{2,}", "*").getRegex(), text: k(gn.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ft = { normal: zn, gfm: Hl, pedantic: Wl }, Qe = { normal: Qn, gfm: gn, breaks: mc, pedantic: gc }, xc = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, qr = (t) => xc[t];
5178
5184
  function Y(t, e) {
5179
5185
  if (e) {
5180
- if (P.escapeTest.test(t)) return t.replace(P.escapeReplace, Mr);
5181
- } else if (P.escapeTestNoEncode.test(t)) return t.replace(P.escapeReplaceNoEncode, Mr);
5186
+ if (M.escapeTest.test(t)) return t.replace(M.escapeReplace, qr);
5187
+ } else if (M.escapeTestNoEncode.test(t)) return t.replace(M.escapeReplaceNoEncode, qr);
5182
5188
  return t;
5183
5189
  }
5184
- function Pr(t) {
5190
+ function Mr(t) {
5185
5191
  try {
5186
- t = encodeURI(t).replace(P.percentDecode, "%");
5192
+ t = encodeURI(t).replace(M.percentDecode, "%");
5187
5193
  } catch {
5188
5194
  return null;
5189
5195
  }
5190
5196
  return t;
5191
5197
  }
5192
5198
  function Lr(t, e) {
5193
- let n = t.replace(P.findPipe, (o, s, l) => {
5199
+ let n = t.replace(M.findPipe, (o, s, l) => {
5194
5200
  let a = !1, u = s;
5195
5201
  for (; --u >= 0 && l[u] === "\\"; ) a = !a;
5196
5202
  return a ? "|" : " |";
5197
- }), r = n.split(P.splitPipe), i = 0;
5203
+ }), r = n.split(M.splitPipe), i = 0;
5198
5204
  if (r[0].trim() || r.shift(), r.length > 0 && !r.at(-1)?.trim() && r.pop(), e) if (r.length > e) r.splice(e);
5199
5205
  else for (; r.length < e; ) r.push("");
5200
- for (; i < r.length; i++) r[i] = r[i].trim().replace(P.slashPipe, "|");
5206
+ for (; i < r.length; i++) r[i] = r[i].trim().replace(M.slashPipe, "|");
5201
5207
  return r;
5202
5208
  }
5203
5209
  function Ue(t, e, n) {
@@ -5340,11 +5346,11 @@ ${d}` : d;
5340
5346
  `, 1)[0], f = !h.trim(), g = 0;
5341
5347
  if (this.options.pedantic ? (g = 2, d = h.trimStart()) : f ? g = e[1].length + 1 : (g = h.search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, d = h.slice(g), g += e[1].length), f && this.rules.other.blankLine.test(p) && (u += p + `
5342
5348
  `, t = t.substring(p.length + 1), a = !0), !a) {
5343
- let m = this.rules.other.nextBulletRegex(g), x = this.rules.other.hrRegex(g), y = this.rules.other.fencesBeginRegex(g), v = this.rules.other.headingBeginRegex(g), T = this.rules.other.htmlBeginRegex(g), K = this.rules.other.blockquoteBeginRegex(g);
5349
+ let m = this.rules.other.nextBulletRegex(g), x = this.rules.other.hrRegex(g), y = this.rules.other.fencesBeginRegex(g), v = this.rules.other.headingBeginRegex(g), A = this.rules.other.htmlBeginRegex(g), K = this.rules.other.blockquoteBeginRegex(g);
5344
5350
  for (; t; ) {
5345
5351
  let se = t.split(`
5346
5352
  `, 1)[0], B;
5347
- if (p = se, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), B = p) : B = p.replace(this.rules.other.tabCharGlobal, " "), y.test(p) || v.test(p) || T.test(p) || K.test(p) || m.test(p) || x.test(p)) break;
5353
+ if (p = se, this.options.pedantic ? (p = p.replace(this.rules.other.listReplaceNesting, " "), B = p) : B = p.replace(this.rules.other.tabCharGlobal, " "), y.test(p) || v.test(p) || A.test(p) || K.test(p) || m.test(p) || x.test(p)) break;
5348
5354
  if (B.search(this.rules.other.nonSpaceChar) >= g || !p.trim()) d += `
5349
5355
  ` + B.slice(g);
5350
5356
  else {
@@ -5564,7 +5570,7 @@ ${d}` : d;
5564
5570
  tokenizer;
5565
5571
  constructor(e) {
5566
5572
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ye, 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 };
5567
- let n = { other: P, block: ft.normal, inline: Qe.normal };
5573
+ let n = { other: M, block: ft.normal, inline: Qe.normal };
5568
5574
  this.options.pedantic ? (n.block = ft.pedantic, n.inline = Qe.pedantic) : this.options.gfm && (n.block = ft.gfm, this.options.breaks ? n.inline = Qe.breaks : n.inline = Qe.gfm), this.tokenizer.rules = n;
5569
5575
  }
5570
5576
  static get rules() {
@@ -5577,7 +5583,7 @@ ${d}` : d;
5577
5583
  return new mn(n).inlineTokens(e);
5578
5584
  }
5579
5585
  lex(e) {
5580
- e = e.replace(P.carriageReturn, `
5586
+ e = e.replace(M.carriageReturn, `
5581
5587
  `), this.blockTokens(e, this.tokens);
5582
5588
  for (let n = 0; n < this.inlineQueue.length; n++) {
5583
5589
  let r = this.inlineQueue[n];
@@ -5586,7 +5592,7 @@ ${d}` : d;
5586
5592
  return this.inlineQueue = [], this.tokens;
5587
5593
  }
5588
5594
  blockTokens(e, n = [], r = !1) {
5589
- for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(P.tabCharGlobal, " ").replace(P.spaceLine, "")); e; ) {
5595
+ for (this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(M.tabCharGlobal, " ").replace(M.spaceLine, "")); e; ) {
5590
5596
  let i;
5591
5597
  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;
5592
5598
  if (i = this.tokenizer.space(e)) {
@@ -5774,7 +5780,7 @@ ${d}` : d;
5774
5780
  return "";
5775
5781
  }
5776
5782
  code({ text: t, lang: e, escaped: n }) {
5777
- let r = (e || "").match(P.notSpaceStart)?.[0], i = t.replace(P.endingNewline, "") + `
5783
+ let r = (e || "").match(M.notSpaceStart)?.[0], i = t.replace(M.endingNewline, "") + `
5778
5784
  `;
5779
5785
  return r ? '<pre><code class="language-' + Y(r) + '">' + (n ? i : Y(i, !0)) + `</code></pre>
5780
5786
  ` : "<pre><code>" + (n ? i : Y(i, !0)) + `</code></pre>
@@ -5864,7 +5870,7 @@ ${t}</tr>
5864
5870
  return `<del>${this.parser.parseInline(t)}</del>`;
5865
5871
  }
5866
5872
  link({ href: t, title: e, tokens: n }) {
5867
- let r = this.parser.parseInline(n), i = Pr(t);
5873
+ let r = this.parser.parseInline(n), i = Mr(t);
5868
5874
  if (i === null) return r;
5869
5875
  t = i;
5870
5876
  let o = '<a href="' + t + '"';
@@ -5872,7 +5878,7 @@ ${t}</tr>
5872
5878
  }
5873
5879
  image({ href: t, title: e, text: n, tokens: r }) {
5874
5880
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
5875
- let i = Pr(t);
5881
+ let i = Mr(t);
5876
5882
  if (i === null) return Y(n);
5877
5883
  t = i;
5878
5884
  let o = `<img src="${t}" alt="${Y(n)}"`;
@@ -6090,7 +6096,7 @@ ${t}</tr>
6090
6096
  return this.block ? H.parse : H.parseInline;
6091
6097
  }
6092
6098
  }, kc = class {
6093
- defaults = qn();
6099
+ defaults = Pn();
6094
6100
  options = this.setOptions;
6095
6101
  parse = this.parseMarkdown(!0);
6096
6102
  parseInline = this.parseMarkdown(!1);
@@ -6256,7 +6262,7 @@ function _(t, e) {
6256
6262
  _.options = _.setOptions = function(t) {
6257
6263
  return be.setOptions(t), _.defaults = be.defaults, no(_.defaults), _;
6258
6264
  };
6259
- _.getDefaults = qn;
6265
+ _.getDefaults = Pn;
6260
6266
  _.defaults = ye;
6261
6267
  _.use = function(...t) {
6262
6268
  return be.use(...t), _.defaults = be.defaults, no(_.defaults), _;
@@ -6294,17 +6300,17 @@ function wc({ text: t }) {
6294
6300
  }, [t]);
6295
6301
  return /* @__PURE__ */ c("div", { class: "jex-md", dangerouslySetInnerHTML: { __html: e } });
6296
6302
  }
6297
- const qe = A("");
6303
+ const Pe = I("");
6298
6304
  function _c(t) {
6299
6305
  if (!t)
6300
6306
  return;
6301
6307
  const e = t.trim().split(/\s+/)[0];
6302
6308
  if (!e)
6303
6309
  return;
6304
- const n = `@${e} `, r = qe.value;
6305
- r.includes(n) || r.includes(`@${e}`) || (qe.value = r.trimStart() ? `${n}${r.trimStart()}` : n);
6310
+ const n = `@${e} `, r = Pe.value;
6311
+ r.includes(n) || r.includes(`@${e}`) || (Pe.value = r.trimStart() ? `${n}${r.trimStart()}` : n);
6306
6312
  }
6307
- const rt = A(null), zr = A(Date.now()), oe = A([]), jc = 4, Sc = 8 * 1024 * 1024;
6313
+ const rt = I(null), zr = I(Date.now()), oe = I([]), jc = 4, Sc = 8 * 1024 * 1024;
6308
6314
  function Cc() {
6309
6315
  return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? crypto.randomUUID() : `att-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 11)}`;
6310
6316
  }
@@ -6379,14 +6385,14 @@ function fo(t, e) {
6379
6385
  };
6380
6386
  return new Proxy({}, n);
6381
6387
  }
6382
- const qc = () => fo("components", []), Me = Ec;
6383
- qc();
6384
- function Mc({ sessionId: t, visitorId: e, ensureSession: n }) {
6385
- const r = Et(Me.functions.chat.public.conversations.send);
6388
+ const Pc = () => fo("components", []), qe = Ec;
6389
+ Pc();
6390
+ function qc({ sessionId: t, visitorId: e, ensureSession: n }) {
6391
+ const r = Et(qe.functions.chat.public.conversations.send);
6386
6392
  return async function(i) {
6387
6393
  const o = t && e ? { sessionId: t, visitorId: e } : await n();
6388
6394
  if (o) {
6389
- qe.value = "", Ac();
6395
+ Pe.value = "", Ac();
6390
6396
  try {
6391
6397
  const s = await r({
6392
6398
  sessionId: o.sessionId,
@@ -6400,7 +6406,7 @@ function Mc({ sessionId: t, visitorId: e, ensureSession: n }) {
6400
6406
  }
6401
6407
  };
6402
6408
  }
6403
- function Pc() {
6409
+ function Mc() {
6404
6410
  const t = rt.value, e = zr.value;
6405
6411
  R(() => {
6406
6412
  if (t === null)
@@ -6418,12 +6424,12 @@ function Pc() {
6418
6424
  return { isActive: n, remainingSeconds: r };
6419
6425
  }
6420
6426
  function Lc() {
6421
- const t = I(), { isActive: e, remainingSeconds: n } = Pc();
6427
+ const t = T(), { isActive: e, remainingSeconds: n } = Mc();
6422
6428
  return e ? /* @__PURE__ */ c("div", { class: "jex-rate-limit-notice", role: "status", "aria-live": "polite", children: t.errorRateLimited.replace("{seconds}", String(n)) }) : null;
6423
6429
  }
6424
- const Se = A(null);
6430
+ const Se = I(null);
6425
6431
  function Oc() {
6426
- const t = I(), e = Se.value;
6432
+ const t = T(), e = Se.value;
6427
6433
  if (e === null)
6428
6434
  return null;
6429
6435
  const n = e === "no-token" ? t.errorSessionNoToken : e === "unauthorized" ? t.errorSessionUnauthorized : e === "network" ? t.errorNetwork : t.somethingWentWrong;
@@ -6445,7 +6451,7 @@ function Nc({ onSend: t }) {
6445
6451
  l.style.height = "0";
6446
6452
  const a = Math.min(l.scrollHeight, Nr);
6447
6453
  l.style.height = `${a}px`, l.style.overflowY = l.scrollHeight > Nr ? "auto" : "hidden";
6448
- }, [qe.value]);
6454
+ }, [Pe.value]);
6449
6455
  function r(l) {
6450
6456
  l.key === "Enter" && !l.shiftKey && (l.preventDefault(), t());
6451
6457
  }
@@ -6463,7 +6469,7 @@ function Nc({ onSend: t }) {
6463
6469
  return { textareaRef: e, fileInputRef: n, onKeyDown: r, onAttachClick: i, onFilesPicked: o, onCardClick: s };
6464
6470
  }
6465
6471
  function Qc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
6466
- const i = I(), o = qe, s = oe, { textareaRef: l, fileInputRef: a, onKeyDown: u, onAttachClick: d, onFilesPicked: h, onCardClick: p } = Nc({ onSend: r }), f = o.value.trim().length > 0, g = s.value.length > 0, m = (f || g) && !e;
6472
+ const i = T(), o = Pe, s = oe, { textareaRef: l, fileInputRef: a, onKeyDown: u, onAttachClick: d, onFilesPicked: h, onCardClick: p } = Nc({ onSend: r }), f = o.value.trim().length > 0, g = s.value.length > 0, m = (f || g) && !e;
6467
6473
  return /* @__PURE__ */ c("div", { class: "jex-composer-card", onClick: p, children: [
6468
6474
  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: [
6469
6475
  /* @__PURE__ */ c("img", { src: x.previewUrl, alt: x.file.name, class: "jex-attachment-thumb" }),
@@ -6541,8 +6547,27 @@ function Qc({ isStreaming: t, disabled: e, inputDisabled: n, onSend: r }) {
6541
6547
  ] })
6542
6548
  ] });
6543
6549
  }
6544
- function Uc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: o, onStartFresh: s }) {
6545
- const l = I(), a = qe, u = Mc({ sessionId: t, visitorId: e, ensureSession: o }), d = rt.value !== null && rt.value > Date.now(), h = n || r || d;
6550
+ const Uc = "https://jexitychat.de/privacy";
6551
+ function Fc() {
6552
+ const t = T();
6553
+ return /* @__PURE__ */ c("p", { class: "jex-privacy-notice", children: [
6554
+ t.privacyNoticePre,
6555
+ " ",
6556
+ /* @__PURE__ */ c(
6557
+ "a",
6558
+ {
6559
+ href: Uc,
6560
+ target: "_blank",
6561
+ rel: "noopener noreferrer",
6562
+ class: "jex-privacy-notice-link",
6563
+ children: t.privacyPolicyLinkText
6564
+ }
6565
+ ),
6566
+ "."
6567
+ ] });
6568
+ }
6569
+ function Dc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionStatus: i, ensureSession: o, onStartFresh: s }) {
6570
+ const l = T(), a = Pe, u = qc({ sessionId: t, visitorId: e, ensureSession: o }), d = rt.value !== null && rt.value > Date.now(), h = n || r || d;
6546
6571
  if (i === "resolved")
6547
6572
  return /* @__PURE__ */ c("div", { class: "jex-chat-input-resolved", children: [
6548
6573
  /* @__PURE__ */ c("div", { class: "jex-resolved-notice", children: l.sessionResolved }),
@@ -6573,20 +6598,21 @@ function Uc({ sessionId: t, visitorId: e, isLoading: n, isStreaming: r, sessionS
6573
6598
  inputDisabled: n || r,
6574
6599
  onSend: p
6575
6600
  }
6576
- )
6601
+ ),
6602
+ /* @__PURE__ */ c(Fc, {})
6577
6603
  ] });
6578
6604
  }
6579
- function Fc(t) {
6605
+ function Bc(t) {
6580
6606
  const e = t.trim().split(/\s+/).filter(Boolean);
6581
6607
  return e.length === 0 ? "?" : e.map((n) => n[0]).join("").slice(0, 2).toUpperCase();
6582
6608
  }
6583
6609
  function _e({ text: t, streaming: e, error: n, authorId: r, authorName: i, authorImage: o, botAvatarUrl: s }) {
6584
- const l = I(), a = !!r, [u, d] = C(!1), h = Te(() => d(!0), []), p = l.replyTo.replace("{name}", i ?? ""), f = [
6610
+ const l = T(), a = !!r, [u, d] = C(!1), h = Te(() => d(!0), []), p = l.replyTo.replace("{name}", i ?? ""), f = [
6585
6611
  "jex-message bot",
6586
6612
  n ? "jex-message-error" : ""
6587
6613
  ].filter(Boolean).join(" ");
6588
6614
  return /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: [
6589
- /* @__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: Fc(i ?? "") }) : s && !u ? /* @__PURE__ */ c("img", { src: s, alt: "", class: "jex-avatar-img", onError: h }) : /* @__PURE__ */ c(En, { size: 14 }) }),
6615
+ /* @__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: Bc(i ?? "") }) : s && !u ? /* @__PURE__ */ c("img", { src: s, alt: "", class: "jex-avatar-img", onError: h }) : /* @__PURE__ */ c(En, { size: 14 }) }),
6590
6616
  /* @__PURE__ */ c("div", { class: "jex-message-content", children: [
6591
6617
  /* @__PURE__ */ c("div", { class: f, children: [
6592
6618
  /* @__PURE__ */ c(wc, { text: t }),
@@ -6604,21 +6630,21 @@ function _e({ text: t, streaming: e, error: n, authorId: r, authorName: i, autho
6604
6630
  onClick: () => {
6605
6631
  _c(i);
6606
6632
  },
6607
- children: /* @__PURE__ */ c(Ml, { size: 12 })
6633
+ children: /* @__PURE__ */ c(ql, { size: 12 })
6608
6634
  }
6609
6635
  )
6610
6636
  ] })
6611
6637
  ] })
6612
6638
  ] });
6613
6639
  }
6614
- function Dc({ text: t }) {
6640
+ function Vc({ text: t }) {
6615
6641
  return /* @__PURE__ */ c("div", { class: "jex-message user", children: t });
6616
6642
  }
6617
6643
  function go() {
6618
- return Et(Me.functions.chat.public.helpdesk.submitEscalation);
6644
+ return Et(qe.functions.chat.public.helpdesk.submitEscalation);
6619
6645
  }
6620
- function Bc({ message: t, sessionId: e, visitorId: n }) {
6621
- const r = I();
6646
+ function Hc({ message: t, sessionId: e, visitorId: n }) {
6647
+ const r = T();
6622
6648
  return t.formData ? /* @__PURE__ */ c("div", { class: "jex-inline-form-submitted", children: [
6623
6649
  /* @__PURE__ */ c("span", { class: "jex-inline-form-check", children: "✓" }),
6624
6650
  /* @__PURE__ */ c("div", { children: [
@@ -6630,7 +6656,7 @@ function Bc({ message: t, sessionId: e, visitorId: n }) {
6630
6656
  ] })
6631
6657
  ] })
6632
6658
  ] }) : /* @__PURE__ */ c("div", { class: "jex-message-row bot", children: /* @__PURE__ */ c(
6633
- Vc,
6659
+ Wc,
6634
6660
  {
6635
6661
  messageId: t._id,
6636
6662
  sessionId: e,
@@ -6638,8 +6664,8 @@ function Bc({ message: t, sessionId: e, visitorId: n }) {
6638
6664
  }
6639
6665
  ) });
6640
6666
  }
6641
- function Vc({ messageId: t, sessionId: e, visitorId: n }) {
6642
- const r = I(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d = go();
6667
+ function Wc({ messageId: t, sessionId: e, visitorId: n }) {
6668
+ const r = T(), [i, o] = C(""), [s, l] = C(""), [a, u] = C(!1), d = go();
6643
6669
  async function h(p) {
6644
6670
  if (p.preventDefault(), !a) {
6645
6671
  u(!0);
@@ -6691,17 +6717,22 @@ function Vc({ messageId: t, sessionId: e, visitorId: n }) {
6691
6717
  ),
6692
6718
  /* @__PURE__ */ c("button", { class: "jex-form-submit", type: "submit", disabled: a, children: a ? r.escalationSubmitting : r.escalationSubmit })
6693
6719
  ] }),
6694
- /* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children: r.escalationConsent })
6720
+ /* @__PURE__ */ c("div", { class: "jex-inline-form-consent", children: [
6721
+ r.escalationConsent,
6722
+ " ",
6723
+ /* @__PURE__ */ c("a", { href: "https://jexitychat.de/privacy", target: "_blank", rel: "noopener noreferrer", class: "jex-privacy-notice-link", children: r.escalationPrivacyLinkText }),
6724
+ "."
6725
+ ] })
6695
6726
  ] });
6696
6727
  }
6697
- const Hc = {
6728
+ const Jc = {
6698
6729
  crawl: "🌐",
6699
6730
  file: "📄",
6700
6731
  snippet: "💡",
6701
6732
  qa: "❓"
6702
6733
  };
6703
- function Wc({ sources: t }) {
6704
- const e = I(), [n, r] = C(!1);
6734
+ function Kc({ sources: t }) {
6735
+ const e = T(), [n, r] = C(!1);
6705
6736
  return t.length === 0 ? null : /* @__PURE__ */ c("div", { class: "jex-sources-row", children: [
6706
6737
  /* @__PURE__ */ c(
6707
6738
  "button",
@@ -6723,10 +6754,10 @@ function Wc({ sources: t }) {
6723
6754
  }
6724
6755
  ),
6725
6756
  n ? /* @__PURE__ */ c("div", { class: "jex-sources-pills", children: t.map((i, o) => {
6726
- const s = i.sourceType === "crawl", l = Jc(i), a = s && i.url ? `${i.title}
6757
+ const s = i.sourceType === "crawl", l = Zc(i), a = s && i.url ? `${i.title}
6727
6758
  ${i.url}` : i.title, u = /* @__PURE__ */ c(Q, { children: [
6728
6759
  typeof i.id == "number" ? /* @__PURE__ */ c("span", { class: "jex-source-id", children: i.id }) : null,
6729
- /* @__PURE__ */ c("span", { class: "jex-source-type", children: Hc[i.sourceType] }),
6760
+ /* @__PURE__ */ c("span", { class: "jex-source-type", children: Jc[i.sourceType] }),
6730
6761
  /* @__PURE__ */ c("span", { class: "jex-source-label", children: l }),
6731
6762
  /* @__PURE__ */ c("span", { class: "jex-source-score", children: [
6732
6763
  "· ",
@@ -6748,7 +6779,7 @@ ${i.url}` : i.title, u = /* @__PURE__ */ c(Q, { children: [
6748
6779
  }) }) : null
6749
6780
  ] });
6750
6781
  }
6751
- function Jc(t) {
6782
+ function Zc(t) {
6752
6783
  if (t.sourceType === "crawl" && t.url)
6753
6784
  try {
6754
6785
  const e = new URL(t.url);
@@ -6757,19 +6788,19 @@ function Jc(t) {
6757
6788
  }
6758
6789
  return t.title;
6759
6790
  }
6760
- function Kc() {
6791
+ function Gc() {
6761
6792
  return /* @__PURE__ */ c("div", { class: "jex-typing", children: [
6762
6793
  /* @__PURE__ */ c("span", {}),
6763
6794
  /* @__PURE__ */ c("span", {}),
6764
6795
  /* @__PURE__ */ c("span", {})
6765
6796
  ] });
6766
6797
  }
6767
- const Zc = /\s?\[\d+\]/g;
6798
+ const Yc = /\s?\[\d+\]/g;
6768
6799
  function Qr(t) {
6769
- return t.replace(Zc, "");
6800
+ return t.replace(Yc, "");
6770
6801
  }
6771
- function Gc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: o, visitorId: s }) {
6772
- const l = I(), a = ue(null), [u, d] = C(null), h = ue(null);
6802
+ function Xc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r, onStartFresh: i, sessionId: o, visitorId: s }) {
6803
+ const l = T(), a = ue(null), [u, d] = C(null), h = ue(null);
6773
6804
  return R(() => {
6774
6805
  if (!s || !t || t.length === 0)
6775
6806
  return;
@@ -6824,19 +6855,19 @@ function Gc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
6824
6855
  children: l.escalationSkip
6825
6856
  }
6826
6857
  )
6827
- ] }, p._id) : /* @__PURE__ */ c(Bc, { message: p, sessionId: o, visitorId: s }, p._id);
6858
+ ] }, p._id) : /* @__PURE__ */ c(Hc, { message: p, sessionId: o, visitorId: s }, p._id);
6828
6859
  if (p.contentType === "escalation-confirm") {
6829
6860
  const g = p.noticeKind === "escalation-confirmed" ? l.noticeEscalationConfirmed.replace("{name}", p.noticeData?.visitorName ?? "").replace("{email}", p.noticeData?.visitorEmail ?? "").replace("{ref}", p.noticeData?.visitorId ?? "") : p.content;
6830
6861
  return /* @__PURE__ */ c(_e, { text: g }, p._id);
6831
6862
  }
6832
6863
  if (p.role === "user")
6833
- return /* @__PURE__ */ c(Dc, { text: p.content }, p._id);
6864
+ return /* @__PURE__ */ c(Vc, { text: p.content }, p._id);
6834
6865
  const f = {
6835
6866
  authorId: p.authorId,
6836
6867
  authorName: p.authorName,
6837
6868
  authorImage: p.authorImage
6838
6869
  };
6839
- return p.status === "streaming" && p.content === "" ? /* @__PURE__ */ c(Kc, {}, p._id) : p.status === "streaming" ? /* @__PURE__ */ c(_e, { text: Qr(p.content), streaming: !0, ...f }, p._id) : p.status === "error" ? /* @__PURE__ */ c(
6870
+ return p.status === "streaming" && p.content === "" ? /* @__PURE__ */ c(Gc, {}, p._id) : p.status === "streaming" ? /* @__PURE__ */ c(_e, { text: Qr(p.content), streaming: !0, ...f }, p._id) : p.status === "error" ? /* @__PURE__ */ c(
6840
6871
  _e,
6841
6872
  {
6842
6873
  text: p.errorMessage ?? `${l.somethingWentWrong}. ${l.tryAgain}.`,
@@ -6846,7 +6877,7 @@ function Gc({ conversations: t, greeting: e, sessionNotFound: n, resumeFailed: r
6846
6877
  p._id
6847
6878
  ) : /* @__PURE__ */ c("div", { children: [
6848
6879
  /* @__PURE__ */ c(_e, { text: Qr(p.content), ...f }),
6849
- p.sources && p.sources.length > 0 ? /* @__PURE__ */ c(Wc, { sources: p.sources }) : null
6880
+ p.sources && p.sources.length > 0 ? /* @__PURE__ */ c(Kc, { sources: p.sources }) : null
6850
6881
  ] }, p._id);
6851
6882
  }),
6852
6883
  /* @__PURE__ */ c("div", { ref: a })
@@ -6866,12 +6897,12 @@ function bn({ message: t }) {
6866
6897
  t && /* @__PURE__ */ c("p", { class: "jex-loading-message", children: t })
6867
6898
  ] }) : null;
6868
6899
  }
6869
- function Yc({ sessionId: t, visitorId: e }) {
6900
+ function eu({ sessionId: t, visitorId: e }) {
6870
6901
  const n = wr(
6871
- Me.functions.chat.public.conversations.listBySession,
6902
+ qe.functions.chat.public.conversations.listBySession,
6872
6903
  t && e ? { sessionId: t, visitorId: e } : "skip"
6873
6904
  ), r = wr(
6874
- Me.functions.chat.public.sessions.getSessionStatus,
6905
+ qe.functions.chat.public.sessions.getSessionStatus,
6875
6906
  t && e ? { sessionId: t, visitorId: e } : "skip"
6876
6907
  ), i = t !== null && n === void 0, o = n?.some((s) => s.status === "streaming") ?? !1;
6877
6908
  return {
@@ -6881,11 +6912,11 @@ function Yc({ sessionId: t, visitorId: e }) {
6881
6912
  isStreaming: o
6882
6913
  };
6883
6914
  }
6884
- function Xc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: o, sessionNotFound: s, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d }) {
6885
- const h = I(), { conversations: p, sessionStatus: f, isLoading: g, isStreaming: m } = Yc({ sessionId: r, visitorId: i }), x = ue(
6915
+ function tu({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i, isLoading: o, sessionNotFound: s, resumeFailed: l, isOrgDeleted: a, ensureSession: u, startFresh: d }) {
6916
+ const h = T(), { conversations: p, sessionStatus: f, isLoading: g, isStreaming: m } = eu({ sessionId: r, visitorId: i }), x = ue(
6886
6917
  (() => {
6887
- const T = Ze.peek();
6888
- return T !== null ? T : Yi.peek() ? "resume" : "fresh";
6918
+ const A = Ze.peek();
6919
+ return A !== null ? A : Yi.peek() ? "resume" : "fresh";
6889
6920
  })()
6890
6921
  ).current;
6891
6922
  return R(() => {
@@ -6896,7 +6927,7 @@ function Xc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
6896
6927
  i && $n(i);
6897
6928
  }, [i]), a ? /* @__PURE__ */ c("div", { class: "jex-chat-messages", children: /* @__PURE__ */ c("div", { class: "jex-session-notice", children: h.chatNoLongerAvailable }) }) : x === "fresh" && !r ? /* @__PURE__ */ c(bn, { message: h.startingConversation }) : x === "resume" && (!r || g) ? /* @__PURE__ */ c(bn, { message: h.resumeConversation }) : /* @__PURE__ */ c(Q, { children: [
6898
6929
  /* @__PURE__ */ c(
6899
- Gc,
6930
+ Xc,
6900
6931
  {
6901
6932
  conversations: p,
6902
6933
  greeting: t,
@@ -6908,7 +6939,7 @@ function Xc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
6908
6939
  }
6909
6940
  ),
6910
6941
  /* @__PURE__ */ c(
6911
- Uc,
6942
+ Dc,
6912
6943
  {
6913
6944
  sessionId: r,
6914
6945
  visitorId: i,
@@ -6921,8 +6952,8 @@ function Xc({ greeting: t, orgSlug: e, projSlug: n, sessionId: r, visitorId: i,
6921
6952
  )
6922
6953
  ] });
6923
6954
  }
6924
- function eu({ formMessageId: t, sessionId: e, visitorId: n }) {
6925
- const r = I(), [i, o] = C(""), [s, l] = C(""), a = go(), [u, d] = C(!1), [h, p] = C(null);
6955
+ function nu({ formMessageId: t, sessionId: e, visitorId: n }) {
6956
+ const r = T(), [i, o] = C(""), [s, l] = C(""), a = go(), [u, d] = C(!1), [h, p] = C(null);
6926
6957
  async function f(g) {
6927
6958
  g.preventDefault(), d(!0), p(null);
6928
6959
  try {
@@ -6974,17 +7005,22 @@ function eu({ formMessageId: t, sessionId: e, visitorId: n }) {
6974
7005
  ),
6975
7006
  /* @__PURE__ */ c("button", { class: "jex-form-submit", type: "submit", disabled: u, children: r.escalationSubmit })
6976
7007
  ] }),
6977
- /* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: r.escalationConsent }),
7008
+ /* @__PURE__ */ c("div", { class: "jex-inline-form-consent", style: { textAlign: "center", margin: "16px 0 8px 0" }, children: [
7009
+ r.escalationConsent,
7010
+ " ",
7011
+ /* @__PURE__ */ c("a", { href: "https://jexitychat.de/privacy", target: "_blank", rel: "noopener noreferrer", class: "jex-privacy-notice-link", children: r.escalationPrivacyLinkText }),
7012
+ "."
7013
+ ] }),
6978
7014
  /* @__PURE__ */ c("button", { class: "jex-escalation-skip", type: "button", onClick: () => {
6979
7015
  Ct();
6980
7016
  }, children: r.escalationSkip })
6981
7017
  ] });
6982
7018
  }
6983
- function tu() {
6984
- return Et(Me.functions.chat.public.helpdesk.createEscalationRequest);
7019
+ function ru() {
7020
+ return Et(qe.functions.chat.public.helpdesk.createEscalationRequest);
6985
7021
  }
6986
7022
  function Ur({ sessionId: t, visitorId: e }) {
6987
- const n = I(), [r, i] = C(!1), [o, s] = C(null), l = tu();
7023
+ const n = T(), [r, i] = C(!1), [o, s] = C(null), l = ru();
6988
7024
  async function a() {
6989
7025
  if (!t || !e)
6990
7026
  return;
@@ -7027,7 +7063,7 @@ function Ur({ sessionId: t, visitorId: e }) {
7027
7063
  o && /* @__PURE__ */ c("div", { class: "jex-handoff-error", role: "alert", children: o })
7028
7064
  ] });
7029
7065
  }
7030
- async function nu() {
7066
+ async function iu() {
7031
7067
  const t = Bi.value;
7032
7068
  if (!t)
7033
7069
  return console.warn("[JexityChat] Bootstrap refresh skipped — inputs missing"), { ok: !1, reason: "no-inputs" };
@@ -7043,7 +7079,7 @@ function Fr(t) {
7043
7079
  function mo(t) {
7044
7080
  return t instanceof vt ? t.data?.code === "UNAUTHORIZED_ORIGIN" : !1;
7045
7081
  }
7046
- function ru(t = 1e4) {
7082
+ function ou(t = 1e4) {
7047
7083
  return le.value ? Promise.resolve(le.value) : new Promise((e) => {
7048
7084
  let n = !1;
7049
7085
  const r = (s) => {
@@ -7055,9 +7091,9 @@ function ru(t = 1e4) {
7055
7091
  });
7056
7092
  });
7057
7093
  }
7058
- function iu(t, e) {
7059
- const n = ue(null), r = Re(!1), i = Re(!1), o = Re(!1), s = Re(null), l = Et(Me.functions.chat.public.sessions.createOrResume), a = async (f) => {
7060
- const g = await ru();
7094
+ function su(t, e) {
7095
+ const n = ue(null), r = Re(!1), i = Re(!1), o = Re(!1), s = Re(null), l = Et(qe.functions.chat.public.sessions.createOrResume), a = async (f) => {
7096
+ const g = await ou();
7061
7097
  if (!g)
7062
7098
  return console.warn("[JexityChat] No bootstrap token after 10s — session creation blocked."), Se.value = "no-token", null;
7063
7099
  const m = (v) => ({
@@ -7075,10 +7111,10 @@ function iu(t, e) {
7075
7111
  } catch (v) {
7076
7112
  if (!mo(v))
7077
7113
  throw v;
7078
- const T = await nu();
7079
- if (!T.ok)
7080
- return Se.value = T.reason === "rate_limited" ? "network" : "unauthorized", null;
7081
- x = await l(m(T.token));
7114
+ const A = await iu();
7115
+ if (!A.ok)
7116
+ return Se.value = A.reason === "rate_limited" ? "network" : "unauthorized", null;
7117
+ x = await l(m(A.token));
7082
7118
  }
7083
7119
  } finally {
7084
7120
  pn.value = !1;
@@ -7130,8 +7166,8 @@ function iu(t, e) {
7130
7166
  resetSession: d
7131
7167
  };
7132
7168
  }
7133
- function ou() {
7134
- const t = I(), [e, n] = C(""), [r, i] = C(""), [o, s] = C("");
7169
+ function au() {
7170
+ const t = T(), [e, n] = C(""), [r, i] = C(""), [o, s] = C("");
7135
7171
  async function l(a) {
7136
7172
  a.preventDefault(), dn({ id: "loading", message: t.submittingTicket }), await new Promise((d) => {
7137
7173
  setTimeout(d, 1200);
@@ -7186,8 +7222,8 @@ function ou() {
7186
7222
  ] })
7187
7223
  ] });
7188
7224
  }
7189
- function su({ ticketRef: t }) {
7190
- const e = I();
7225
+ function lu({ ticketRef: t }) {
7226
+ const e = T();
7191
7227
  return /* @__PURE__ */ c("div", { class: "jex-confirmation", children: [
7192
7228
  /* @__PURE__ */ c("div", { class: "jex-confirmation-icon", "aria-hidden": "true", children: "✓" }),
7193
7229
  /* @__PURE__ */ c("h2", { class: "jex-confirmation-title", children: e.ticketSubmitted }),
@@ -7199,15 +7235,15 @@ function su({ ticketRef: t }) {
7199
7235
  {
7200
7236
  class: "jex-confirmation-done",
7201
7237
  onClick: () => {
7202
- q.value = !1;
7238
+ P.value = !1;
7203
7239
  },
7204
7240
  children: e.done
7205
7241
  }
7206
7242
  )
7207
7243
  ] });
7208
7244
  }
7209
- function au({ message: t, onRetry: e, onBack: n }) {
7210
- const r = I();
7245
+ function cu({ message: t, onRetry: e, onBack: n }) {
7246
+ const r = T();
7211
7247
  return /* @__PURE__ */ c("div", { class: "jex-overlay jex-error", children: [
7212
7248
  /* @__PURE__ */ c("p", { class: "jex-error-message", children: t }),
7213
7249
  /* @__PURE__ */ c("div", { class: "jex-error-actions", children: [
@@ -7223,18 +7259,18 @@ function Dr({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
7223
7259
  return /* @__PURE__ */ c("div", { class: "jex-screen-container", children: [
7224
7260
  g.id === "home" && /* @__PURE__ */ c(Cl, { greeting: t, title: e, onStartFresh: h, onResetSession: p }),
7225
7261
  g.id === "selection" && /* @__PURE__ */ c(Rl, { title: e }),
7226
- g.id === "form" && /* @__PURE__ */ c(ou, {}),
7262
+ g.id === "form" && /* @__PURE__ */ c(au, {}),
7227
7263
  g.id === "escalation-form" && /* @__PURE__ */ c(
7228
- eu,
7264
+ nu,
7229
7265
  {
7230
7266
  formMessageId: g.formMessageId,
7231
7267
  sessionId: g.sessionId,
7232
7268
  visitorId: g.visitorId
7233
7269
  }
7234
7270
  ),
7235
- g.id === "confirmation" && m && /* @__PURE__ */ c(su, { ticketRef: m.ref }),
7271
+ g.id === "confirmation" && m && /* @__PURE__ */ c(lu, { ticketRef: m.ref }),
7236
7272
  g.id === "chat" && /* @__PURE__ */ c(
7237
- Xc,
7273
+ tu,
7238
7274
  {
7239
7275
  greeting: t,
7240
7276
  orgSlug: n,
@@ -7251,7 +7287,7 @@ function Dr({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
7251
7287
  ),
7252
7288
  g.id === "loading" && /* @__PURE__ */ c(bn, { message: g.message }),
7253
7289
  g.id === "error" && /* @__PURE__ */ c(
7254
- au,
7290
+ cu,
7255
7291
  {
7256
7292
  message: g.message,
7257
7293
  onRetry: () => dn({ id: "loading" }),
@@ -7260,7 +7296,7 @@ function Dr({ greeting: t, title: e, orgSlug: n, projSlug: r, sessionId: i, visi
7260
7296
  )
7261
7297
  ] });
7262
7298
  }
7263
- function lu({ options: t }) {
7299
+ function uu({ options: t }) {
7264
7300
  return Za({
7265
7301
  orgSlug: t.orgSlug,
7266
7302
  projSlug: t.projSlug,
@@ -7268,29 +7304,29 @@ function lu({ options: t }) {
7268
7304
  convexUrl: t.convexUrl,
7269
7305
  preAllowedUrls: t.allowedUrls ?? [],
7270
7306
  preExcludedPaths: t.excludePaths
7271
- }), Xa() ? /* @__PURE__ */ c(cu, { options: t }) : null;
7307
+ }), Xa() ? /* @__PURE__ */ c(hu, { options: t }) : null;
7272
7308
  }
7273
- function cu({ options: t }) {
7309
+ function hu({ options: t }) {
7274
7310
  const e = Ja(t.orgSlug, t.projSlug, t.convexUrl);
7275
7311
  ol(t.parentOrigin), R(() => {
7276
7312
  ll(), cl();
7277
7313
  }, []);
7278
- const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = iu(t.orgSlug, t.projSlug), h = Ha(t, e);
7314
+ const { sessionId: n, visitorId: r, isLoading: i, sessionNotFound: o, resumeFailed: s, isOrgDeleted: l, ensureSession: a, startFresh: u, resetSession: d } = su(t.orgSlug, t.projSlug), h = Ha(t, e);
7279
7315
  R(() => {
7280
7316
  In.value = Ji(h.locale);
7281
7317
  }, [h.locale]), R(() => {
7282
- if (!q.value || h.mode === "embedded" || !window.matchMedia("(max-width: 480px), (pointer: coarse) and (max-width: 768px)").matches)
7318
+ if (!P.value || h.mode === "embedded" || !window.matchMedia("(max-width: 480px), (pointer: coarse) and (max-width: 768px)").matches)
7283
7319
  return;
7284
- const T = document.documentElement.style.overflow;
7320
+ const A = document.documentElement.style.overflow;
7285
7321
  return document.documentElement.style.overflow = "hidden", () => {
7286
- document.documentElement.style.overflow = T;
7322
+ document.documentElement.style.overflow = A;
7287
7323
  };
7288
- }, [q.value, h.mode]), R(() => {
7324
+ }, [P.value, h.mode]), R(() => {
7289
7325
  if (h.mode !== "embedded")
7290
7326
  try {
7291
7327
  return gl();
7292
- } catch (T) {
7293
- console.warn("[JexityChat] Idle-lock watcher failed to start:", T);
7328
+ } catch (A) {
7329
+ console.warn("[JexityChat] Idle-lock watcher failed to start:", A);
7294
7330
  return;
7295
7331
  }
7296
7332
  }, [h.mode]);
@@ -7338,7 +7374,7 @@ function cu({ options: t }) {
7338
7374
  ),
7339
7375
  !h.hideBranding && /* @__PURE__ */ c(Ar, {})
7340
7376
  ] }) : /* @__PURE__ */ c("div", { class: `jex-container${p ? " jex-pos-left" : ""}`, children: [
7341
- q.value && /* @__PURE__ */ c("div", { class: "jex-chat-window", children: [
7377
+ P.value && /* @__PURE__ */ c("div", { class: "jex-chat-window", children: [
7342
7378
  /* @__PURE__ */ c(
7343
7379
  Tr,
7344
7380
  {
@@ -7378,34 +7414,34 @@ function cu({ options: t }) {
7378
7414
  }
7379
7415
  );
7380
7416
  }
7381
- const uu = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
7382
- function hu(t) {
7417
+ const du = '.jex-widget{--jex-primary: #115A62;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-radius: .75rem;--jex-font-family: "Inter", system-ui, -apple-system, sans-serif;--jex-font-size: 14px;--jex-window-width: 380px;--jex-window-height: 600px;--jex-shadow: 0 16px 48px -12px rgba(13, 127, 138, .25), 0 4px 16px rgba(0, 0, 0, .08);pointer-events:auto;--jex-bg-trigger: var(--jex-primary);--jex-bg-header: var(--jex-primary);--jex-bg-msg-user: var(--jex-primary);--jex-bg-send-btn: var(--jex-primary);--jex-bg-window: rgba(255, 255, 255, .95);--jex-bg-msg-bot: #f1f5f9;--jex-bg-input: rgba(247, 253, 253, .6);--jex-text-header: #ffffff;--jex-text-msg-user: #ffffff;--jex-text-msg-bot: #0f172a;--jex-text-main: #0f172a;--jex-text-muted: #64748b;--jex-bg-avatar-agent: #d1fae5;--jex-text-avatar-agent: #065f46;--jex-border-window: rgba(226, 232, 240, .8);--jex-border-input: rgba(203, 213, 225, .8);--jex-bg-glass: var(--jex-bg-window);--jex-border-glass: var(--jex-border-window);font-family:var(--jex-font-family);-webkit-font-smoothing:antialiased}.dark .jex-widget,.jex-widget.dark{--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-avatar-agent: #064e3b;--jex-text-avatar-agent: #6ee7b7;--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light){--jex-primary: #1cb0bf;--jex-primary-hover: var(--jex-accent, color-mix(in srgb, var(--jex-primary) 85%, #000));--jex-bg-window: rgba(10, 15, 26, .95);--jex-bg-msg-bot: #233146;--jex-bg-input: rgba(10, 15, 26, .6);--jex-text-msg-bot: #f8fafc;--jex-text-main: #f8fafc;--jex-text-muted: #94a3b8;--jex-border-window: rgba(30, 41, 59, .8);--jex-border-input: rgba(51, 65, 85, .9);--jex-bg-error: #3b1318;--jex-border-error: #5c1d24;--jex-text-error: #fca5a5}}.jex-widget *{box-sizing:border-box;margin:0;padding:0}.jex-container{position:fixed;bottom:24px;right:24px;display:flex;flex-direction:column;align-items:flex-end;gap:16px;z-index:9999}.jex-container.jex-pos-left{right:auto;left:24px;align-items:flex-start}:host(.jex-mode-embedded){display:block;width:100%;height:100%}:host(.jex-mode-embedded) .jex-widget{width:100%;height:100%}.jex-embedded{display:flex;flex-direction:column;width:100%;height:100%;background:var(--jex-bg-window);border:1px solid var(--jex-border-window);overflow:hidden}.jex-embedded .jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-floating-button{height:56px;min-width:56px;padding:0;background:var(--jex-bg-trigger);color:var(--jex-text-header);border:none;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:var(--jex-shadow);transition:transform .3s cubic-bezier(.175,.885,.32,1.275),background .2s,width .3s ease,border-radius .3s ease}.jex-floating-button.jex-has-label{min-width:110px;padding:0 20px}.jex-fab-inner{display:flex;align-items:center;gap:12px}.jex-fab-label{font-size:15px;font-weight:600;white-space:nowrap}.jex-floating-button:hover{transform:scale(1.1);background:var(--jex-primary-hover)}.jex-floating-button:active{transform:scale(.95)}.jex-chat-window{width:var(--jex-window-width);height:var(--jex-window-height);max-height:calc(100vh - 120px);background:var(--jex-bg-window);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px);border:1px solid var(--jex-border-window);border-radius:calc(var(--jex-radius) * 2);box-shadow:var(--jex-shadow);display:flex;flex-direction:column;overflow:hidden;animation:jexSlideUp .4s cubic-bezier(.16,1,.3,1);transform-origin:bottom right;touch-action:manipulation}@keyframes jexSlideUp{0%{opacity:0;transform:scale(.8) translateY(20px)}to{opacity:1;transform:scale(1) translateY(0)}}@media(max-width:480px),(pointer:coarse)and (max-width:768px){.jex-chat-window{position:fixed;inset:0;width:100vw;height:100vh;height:100dvh;max-height:none;border:none;border-radius:0;animation:jexSlideUpMobile .3s cubic-bezier(.16,1,.3,1);transform-origin:bottom center}.jex-container:has(.jex-chat-window) .jex-floating-button{display:none}}@keyframes jexSlideUpMobile{0%{opacity:0;transform:translateY(100%)}to{opacity:1;transform:translateY(0)}}.jex-chat-header{padding:20px;background:var(--jex-bg-header);color:var(--jex-text-header);display:flex;align-items:center;gap:12px;flex-shrink:0}.jex-header-info h3{font-size:16px;font-weight:600;color:var(--jex-text-header);margin:0}.jex-header-info p{font-size:12px;opacity:.8;color:var(--jex-text-header);margin:0}.jex-header-right{margin-left:auto;display:flex;align-items:center;gap:4px}.jex-header-handoff{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid color-mix(in srgb,currentColor 50%,transparent);border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.jex-header-handoff:hover:not(:disabled){background:color-mix(in srgb,currentColor 12%,transparent);border-color:currentColor}.jex-header-handoff:disabled{opacity:.5;cursor:not-allowed}.jex-header-close{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:none;border-radius:999px;padding:0;color:inherit;cursor:pointer;transition:background .15s ease}.jex-header-close:hover{background:color-mix(in srgb,currentColor 14%,transparent)}.jex-handoff-error{position:absolute;top:100%;right:8px;background:#fee;color:#b00;padding:4px 8px;font-size:12px;border-radius:4px}.jex-header-back{background:none;border:none;color:var(--jex-text-header);cursor:pointer;padding:4px;display:flex;align-items:center;opacity:.8;transition:opacity .2s;flex-shrink:0}.jex-header-back:hover{opacity:1}.jex-screen-container{flex:1;overflow:hidden;display:flex;flex-direction:column}.jex-home{flex:1;display:flex;flex-direction:column;padding:24px;gap:20px;overflow-y:auto}.jex-home-hero{display:flex;align-items:center;gap:14px;animation:jexFadeIn .4s ease both}.jex-home-avatar{position:relative;width:48px;height:48px;border-radius:14px;background:var(--jex-primary);color:var(--jex-text-header);display:flex;align-items:center;justify-content:center;flex-shrink:0;box-shadow:0 4px 12px color-mix(in srgb,var(--jex-primary) 30%,transparent)}.jex-home-status-dot{position:absolute;bottom:-2px;right:-2px;width:14px;height:14px;border-radius:50%;background:#22c55e;border:2.5px solid var(--jex-bg-window);animation:jexPulse 2s ease-in-out infinite}@keyframes jexPulse{0%,to{box-shadow:0 0 #22c55e66}50%{box-shadow:0 0 0 6px #22c55e00}}.jex-home-hero-text{display:flex;flex-direction:column;gap:2px;min-width:0}.jex-home-title{font-size:17px;font-weight:700;color:var(--jex-text-main);margin:0;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jex-home-status{font-size:12px;font-weight:500;color:#22c55e;letter-spacing:.02em}.jex-home-greeting{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:4px 16px 16px;padding:16px 18px;font-size:14px;line-height:1.55;color:var(--jex-text-main);animation:jexFadeIn .4s .1s ease both}.jex-home-greeting p{margin:0}@keyframes jexFadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}.jex-home-actions{display:flex;flex-direction:column;gap:10px;animation:jexFadeIn .4s .2s ease both}.jex-home-start-btn{background:var(--jex-bg-send-btn);color:var(--jex-text-header);border:none;border-radius:12px;padding:14px 20px;font-size:15px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,transform .15s,box-shadow .2s;width:100%;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 25%,transparent)}.jex-home-start-btn:hover{background:var(--jex-primary-hover);transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 35%,transparent)}.jex-home-start-btn:active{transform:translateY(0);box-shadow:0 1px 4px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card{display:flex;flex-direction:column;gap:8px;width:100%;text-align:left;padding:16px 18px;border-radius:14px;border:1.5px solid var(--jex-primary);background:color-mix(in srgb,var(--jex-primary) 6%,var(--jex-bg-window));cursor:pointer;font-family:inherit;transition:background .2s,border-color .2s,transform .15s,box-shadow .2s;box-shadow:0 2px 8px color-mix(in srgb,var(--jex-primary) 12%,transparent)}.jex-home-resume-card:hover{background:color-mix(in srgb,var(--jex-primary) 10%,var(--jex-bg-window));transform:translateY(-1px);box-shadow:0 4px 16px color-mix(in srgb,var(--jex-primary) 20%,transparent)}.jex-home-resume-card:active{transform:translateY(0)}.jex-home-resume-top{display:flex;align-items:center;justify-content:space-between}.jex-home-resume-label{font-size:14px;font-weight:600;color:var(--jex-primary)}.jex-home-resume-arrow{color:var(--jex-primary);opacity:.6;transition:opacity .2s,transform .2s}.jex-home-resume-card:hover .jex-home-resume-arrow{opacity:1;transform:translate(2px)}.jex-home-resume-ref{font-family:ui-monospace,Cascadia Code,Fira Code,monospace;font-size:13px;font-weight:600;letter-spacing:.06em;color:var(--jex-text-muted)}.jex-home-history{display:flex;flex-direction:column;gap:8px}.jex-home-resume-meta{font-size:11px;opacity:.7;margin-top:4px}.jex-home-new-btn{background:transparent;color:var(--jex-text-muted);border:1px solid var(--jex-border-input);border-radius:12px;padding:12px 20px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit;transition:color .2s,border-color .2s,background .2s;width:100%}.jex-home-new-btn:hover{color:var(--jex-text-main);border-color:var(--jex-text-muted);background:color-mix(in srgb,var(--jex-primary) 3%,transparent)}.jex-session-ref{display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);border-radius:8px;font-size:12px}.jex-session-ref-label{color:var(--jex-text-muted);font-weight:500}.jex-session-ref-code{color:var(--jex-primary);font-weight:700;font-family:ui-monospace,Cascadia Code,monospace;letter-spacing:.05em}.jex-chat-messages{flex:1;padding:20px;overflow-y:auto;display:flex;flex-direction:column;gap:12px}.jex-message-row{display:flex;align-items:flex-end;gap:8px;max-width:85%}.jex-message-row.bot{align-self:flex-start}.jex-message-content{flex:1;min-width:0}.jex-avatar{width:24px;height:24px;border-radius:50%;flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:12px;margin-bottom:2px}.jex-avatar-bot{background:var(--jex-bg-msg-bot);color:var(--jex-primary)}.jex-avatar-agent{background:var(--jex-bg-avatar-agent)}.jex-avatar-img{width:100%;height:100%;border-radius:50%;object-fit:cover}.jex-avatar-initials{font-size:9px;font-weight:700;color:var(--jex-text-avatar-agent)}.jex-message-author-row{display:flex;align-items:center;gap:6px;margin-top:2px;padding-left:4px}.jex-message-author{font-size:10px;color:var(--jex-text-muted)}.jex-reply-tag-btn{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--jex-text-muted, #6b7280);cursor:pointer;transition:background .15s,color .15s}.jex-reply-tag-btn:hover{background:#0000000f;color:var(--jex-primary, #115A62)}.jex-reply-tag-btn:focus-visible{outline:2px solid var(--jex-primary, #115A62);outline-offset:1px}.jex-message{padding:12px 16px;border-radius:18px;font-size:14px;line-height:1.4}.jex-message.bot{background:var(--jex-bg-msg-bot);border:1px solid var(--jex-border-window);color:var(--jex-text-msg-bot);border-bottom-left-radius:4px}.jex-message.user{align-self:flex-end;max-width:80%;background:var(--jex-bg-msg-user);color:var(--jex-text-msg-user);border-bottom-right-radius:4px}.jex-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px}.jex-typing span{width:8px;height:8px;border-radius:50%;background:var(--jex-text-muted);animation:jexTypingDot 1.2s infinite ease-in-out}.jex-typing span:nth-child(2){animation-delay:.2s}.jex-typing span:nth-child(3){animation-delay:.4s}@keyframes jexTypingDot{0%,80%,to{transform:scale(.8);opacity:.4}40%{transform:scale(1);opacity:1}}.jex-md{word-break:break-word;overflow-wrap:anywhere}.jex-md p{margin:0 0 8px}.jex-md p:last-child{margin-bottom:0}.jex-md strong{font-weight:600}.jex-md em{font-style:italic}.jex-md ul,.jex-md ol{margin:0 0 8px;padding-left:20px}.jex-md ul:last-child,.jex-md ol:last-child{margin-bottom:0}.jex-md ul{list-style-type:disc}.jex-md ol{list-style-type:decimal}.jex-md li{margin-bottom:2px}.jex-md li:last-child{margin-bottom:0}.jex-md a{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px}.jex-md a:hover{opacity:.8}.jex-md code{background:#00000014;padding:1px 5px;border-radius:4px;font-size:.9em;font-family:ui-monospace,Cascadia Code,Fira Code,monospace}.jex-md pre{background:#0000000f;border-radius:8px;padding:10px 12px;margin:0 0 8px;overflow-x:auto;font-size:.85em}.jex-md pre:last-child{margin-bottom:0}.jex-md pre code{background:none;padding:0;border-radius:0;font-size:inherit}.jex-md h1,.jex-md h2,.jex-md h3,.jex-md h4{font-weight:600;margin:8px 0 4px}.jex-md h1:first-child,.jex-md h2:first-child,.jex-md h3:first-child,.jex-md h4:first-child{margin-top:0}.jex-md h3{font-size:1em}.jex-md h4{font-size:.95em}.jex-md hr{border:none;border-top:1px solid var(--jex-border-window);margin:8px 0}.jex-md blockquote{border-left:3px solid var(--jex-primary);margin:0 0 8px;padding:4px 12px;color:var(--jex-text-muted)}.jex-md blockquote:last-child{margin-bottom:0}.dark .jex-md code,.jex-widget.dark .jex-md code{background:#ffffff1a}.dark .jex-md pre,.jex-widget.dark .jex-md pre{background:#ffffff14}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-md code{background:#ffffff1a}:host:not(.light) .jex-widget:not(.light) .jex-md pre{background:#ffffff14}}.jex-streaming-cursor:after{content:"◊";margin-left:2px;animation:jexBlinkCursor .8s ease-in-out infinite}@keyframes jexBlinkCursor{0%,to{opacity:1}50%{opacity:0}}.jex-session-notice{align-self:center;text-align:center;padding:8px 16px;margin:8px 0;font-size:12px;color:var(--jex-text-muted);background:var(--jex-bg-input, #f1f5f9);border-radius:8px;line-height:1.4}.jex-message-error{background:var(--jex-bg-error, #fef2f2)!important;border-color:var(--jex-border-error, #fecaca)!important;color:var(--jex-text-error, #991b1b)!important}.jex-chat-input{padding:12px 16px;border-top:1px solid var(--jex-border-window);display:flex;flex-direction:column;gap:8px;flex-shrink:0}.jex-composer-card{display:flex;flex-direction:column;gap:6px;padding:10px 12px 8px;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:16px;cursor:text;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.jex-composer-card:focus-within{border-color:var(--jex-primary);background:var(--jex-bg-window);box-shadow:0 0 0 3px color-mix(in srgb,var(--jex-primary, #115A62) 14%,transparent)}.jex-composer-attachments{display:flex;flex-wrap:wrap;gap:6px;padding:2px 2px 4px}.jex-attachment-chip{position:relative;width:44px;height:44px;border-radius:8px;overflow:hidden;background:var(--jex-bg-msg-bot, #f1f5f9);flex-shrink:0;box-shadow:0 1px 2px #0000000f}.jex-attachment-thumb{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}.jex-attachment-remove{position:absolute;top:2px;right:2px;width:16px;height:16px;padding:0;border:none;border-radius:50%;background:#0f172ac7;color:#fff;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;opacity:0;transition:opacity .12s ease,transform .12s ease}.jex-attachment-chip:hover .jex-attachment-remove,.jex-attachment-chip:focus-within .jex-attachment-remove{opacity:1}.jex-attachment-remove:hover{transform:scale(1.08)}.jex-composer-textarea{width:100%;min-height:22px;background:transparent;border:none;outline:none;resize:none;padding:2px 4px;color:var(--jex-text-main);font-family:inherit;font-size:16px;line-height:1.45;overflow-y:hidden}.jex-composer-textarea::placeholder{color:var(--jex-text-muted);opacity:.85}.jex-composer-textarea:disabled{cursor:not-allowed;opacity:.7}.jex-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:8px}.jex-composer-actions-left{display:inline-flex;align-items:center;gap:4px}.jex-attach-btn{width:30px;height:30px;padding:0;border:none;border-radius:50%;background:transparent;color:var(--jex-text-muted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}.jex-attach-btn:hover:not(:disabled){background:color-mix(in srgb,var(--jex-text-muted, #64748b) 12%,transparent);color:var(--jex-text-main)}.jex-attach-btn:active:not(:disabled){transform:scale(.92)}.jex-attach-btn:disabled{opacity:.4;cursor:not-allowed}.jex-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.jex-rate-limit-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-muted, #64748b);font-size:12px;line-height:1.4;text-align:center}.jex-session-error-notice{flex:1 0 100%;order:-1;margin-bottom:8px;padding:8px 12px;border-radius:10px;background:var(--jex-bg-error, #fef2f2);border:1px solid var(--jex-border-error, #fecaca);color:var(--jex-text-error, #991b1b);font-size:12px;line-height:1.4;text-align:center}.jex-chat-input input{flex:1;background:var(--jex-bg-input);border:1px solid var(--jex-border-input);border-radius:12px;padding:10px 14px;color:var(--jex-text-main);outline:none;font-family:inherit;font-size:14px}.jex-chat-input input:focus{border-color:var(--jex-primary)}.jex-send-btn{background:color-mix(in srgb,var(--jex-text-muted, #64748b) 18%,transparent);color:var(--jex-text-muted);border:none;border-radius:999px;width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s ease,color .15s ease,opacity .15s ease,transform .15s ease;flex-shrink:0}.jex-send-btn-active{background:var(--jex-bg-send-btn, var(--jex-primary));color:var(--jex-text-header, #fff)}.jex-send-btn-active:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-send-btn:active:not(:disabled){transform:scale(.9)}.jex-send-btn:disabled{opacity:.45;cursor:default}.jex-widget-footer{display:flex;align-items:center;justify-content:center;padding:8px 16px;border-top:1px solid var(--jex-border-glass);background:#00000005;flex-shrink:0}.jex-widget.dark .jex-widget-footer{background:#ffffff05}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-widget-footer{background:#ffffff05}}.jex-branding{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--jex-text-muted);font-size:11px;font-weight:500;transition:color .2s}.jex-branding:hover{color:var(--jex-text-main)}.jex-branding-icon{color:var(--jex-primary)}.jex-branding span strong{font-weight:700;color:var(--jex-text-main)}.jex-privacy-notice{margin:0;text-align:center;font-size:10px;line-height:1.5;color:var(--jex-text-muted)}.jex-privacy-notice-link{color:var(--jex-primary);text-decoration:underline;text-underline-offset:2px;text-decoration-color:color-mix(in srgb,var(--jex-primary) 50%,transparent);transition:text-decoration-color .15s}.jex-privacy-notice-link:hover{text-decoration-color:var(--jex-primary)}.jex-locale-select-wrapper{position:relative;display:flex;align-items:center}.jex-locale-select{appearance:none;-webkit-appearance:none;background:transparent;border:1px solid transparent;padding:4px 20px 4px 6px;border-radius:6px;font-family:inherit;font-size:11px;font-weight:600;color:var(--jex-text-muted);background-color:transparent;cursor:pointer;outline:none;transition:all .2s ease}.jex-locale-select option{background-color:#fff;color:#0f172a}.jex-locale-select:hover,.jex-locale-select:focus-visible{color:var(--jex-text-main);background:#0000000a}.jex-widget.dark .jex-locale-select:hover,.jex-widget.dark .jex-locale-select:focus-visible{background:#ffffff0d}.jex-widget.dark .jex-locale-select option{background-color:#0f172a;color:#f8fafc}@media(prefers-color-scheme:dark){:host:not(.light) .jex-widget:not(.light) .jex-locale-select:hover,:host:not(.light) .jex-widget:not(.light) .jex-locale-select:focus-visible{background:#ffffff0d}:host:not(.light) .jex-widget:not(.light) .jex-locale-select option{background-color:#0f172a;color:#f8fafc}}.jex-locale-select:focus-visible{border-color:var(--jex-primary)}.jex-locale-chevron{position:absolute;right:4px;pointer-events:none;color:var(--jex-text-muted);transition:color .2s ease}.jex-locale-select-wrapper:hover .jex-locale-chevron{color:var(--jex-text-main)}.jex-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:var(--jex-bg-window, #fff);z-index:10;padding:24px;text-align:center}.jex-loading-spinner{width:32px;height:32px;border:3px solid var(--jex-border-input, #e2e8f0);border-top-color:var(--jex-primary, #115A62);border-radius:50%;animation:jex-spin .7s linear infinite}@keyframes jex-spin{to{transform:rotate(360deg)}}.jex-loading-message{font-size:14px;color:var(--jex-text-muted, #64748b)}.jex-error-message{font-size:14px;color:var(--jex-text-main, #334155)}.jex-error-actions{display:flex;gap:8px}.jex-error-retry,.jex-error-back{padding:8px 16px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;border:none}.jex-error-retry{background:var(--jex-primary, #115A62);color:#fff}.jex-error-back{background:transparent;color:var(--jex-text-muted, #64748b);border:1px solid var(--jex-border-input, #e2e8f0)}.jex-selection{display:flex;flex-direction:column;gap:12px;padding:24px 16px;height:100%}.jex-selection-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 8px}.jex-selection-options{display:flex;flex-direction:column;gap:10px}.jex-selection-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:16px;border-radius:12px;border:1px solid var(--jex-border-window, #e2e8f0);background:transparent;cursor:pointer;text-align:left;transition:border-color .15s ease,background .15s ease}.jex-selection-option:hover{border-color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 5%,transparent)}.jex-selection-icon{font-size:20px}.jex-selection-label{font-size:14px;font-weight:600;color:var(--jex-text-main, #0f172a)}.jex-selection-sub{font-size:12px;color:var(--jex-text-muted, #64748b)}.jex-form-screen{display:flex;flex-direction:column;padding:20px 16px;height:100%;overflow-y:auto}.jex-form-title{font-size:16px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0 0 16px}.jex-form{display:flex;flex-direction:column;gap:10px}.jex-form-input,.jex-form-textarea{padding:10px 12px;border-radius:8px;border:1px solid var(--jex-border-input, #e2e8f0);font-size:14px;background:transparent;color:var(--jex-text-main, #0f172a);outline:none}@media(pointer:coarse){.jex-form-input,.jex-form-textarea{font-size:16px}}.jex-form-input:focus,.jex-form-textarea:focus{border-color:var(--jex-primary, #115A62)}.jex-form-textarea{min-height:80px;resize:vertical}.jex-form-submit{padding:10px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer;margin-top:4px}.jex-inline-form{display:flex;flex-direction:column;gap:8px;padding:12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-title{font-weight:600;font-size:15px;color:var(--jex-text-main, #0f172a);margin:0}.jex-inline-form-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.4;margin:0 0 4px}.jex-inline-form-consent{font-size:11px;color:var(--jex-text-muted, #64748b);line-height:1.3;margin-top:4px;text-align:center}.jex-inline-form .jex-form-submit:disabled{opacity:.7;cursor:not-allowed}.jex-escalation-subtitle{font-size:13px;color:var(--jex-text-muted, #64748b);line-height:1.45;margin:0 0 8px}.jex-escalation-skip{padding:8px 12px;border:none;background:transparent;color:var(--jex-text-muted, #64748b);font-size:13px;cursor:pointer;text-decoration:underline;text-underline-offset:2px;text-align:center}.jex-escalation-skip:hover{color:var(--jex-text-main, #0f172a)}.jex-inline-form-card{position:relative;padding:14px;gap:8px}.jex-inline-form-dismiss{position:absolute;top:10px;right:10px;width:24px;height:24px;border-radius:50%;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-window, #fff);color:var(--jex-text-muted, #64748b);font-size:12px;cursor:pointer;display:flex;align-items:center;justify-content:center;line-height:1}.jex-inline-form-dismiss:hover{background:var(--jex-bg-msg-bot, #f1f5f9);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--jex-bg-msg-bot, #f1f5f9);border:1px solid var(--jex-border-input, #e2e8f0);border-radius:var(--jex-radius, .75rem);width:100%}.jex-inline-form-check{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary) 15%,transparent);color:var(--jex-primary, #115A62);font-size:14px;font-weight:700;flex-shrink:0}.jex-inline-form-submitted-title{font-weight:600;font-size:var(--jex-font-size, 14px);color:var(--jex-text-main, #0f172a)}.jex-inline-form-submitted-detail{font-size:12px;color:var(--jex-text-muted, #64748b);margin-top:2px}.jex-escalation-confirm{border-left:3px solid var(--jex-primary, #115A62);padding-left:8px}.jex-session-prompt{display:flex;flex-direction:column;align-items:center;gap:8px;padding:12px 16px;margin:8px 0;text-align:center}.jex-session-prompt-text{font-size:13px;color:var(--jex-text-muted, #64748b)}.jex-session-prompt-btn{padding:8px 16px;border-radius:8px;border:1px solid var(--jex-primary, #115A62);background:transparent;color:var(--jex-primary, #115A62);font-size:13px;font-weight:600;cursor:pointer}.jex-session-prompt-btn:hover{background:color-mix(in srgb,var(--jex-primary) 10%,transparent)}.jex-chat-input-resolved{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 16px;border-top:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-msg-bot, #f1f5f9);text-align:center}.jex-resolved-notice{font-size:13px;font-weight:500;color:var(--jex-text-muted, #64748b)}.jex-resolved-new-btn{padding:10px 20px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;width:100%}.jex-resolved-new-btn:hover{opacity:.9}.jex-confirmation{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:32px 24px;height:100%;text-align:center}.jex-confirmation-icon{width:48px;height:48px;border-radius:50%;background:color-mix(in srgb,var(--jex-primary, #115A62) 15%,transparent);color:var(--jex-primary, #115A62);font-size:22px;display:flex;align-items:center;justify-content:center}.jex-confirmation-title{font-size:18px;font-weight:700;color:var(--jex-text-main, #0f172a);margin:0}.jex-confirmation-body{font-size:13px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-ref{font-size:20px;font-weight:700;letter-spacing:.05em;color:var(--jex-primary, #115A62);background:color-mix(in srgb,var(--jex-primary, #115A62) 10%,transparent);padding:10px 20px;border-radius:10px}.jex-confirmation-hint{font-size:12px;color:var(--jex-text-muted, #64748b);margin:0}.jex-confirmation-done{margin-top:8px;padding:10px 28px;border-radius:8px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:14px;font-weight:600;cursor:pointer}.jex-home-lookup-link{background:none;border:none;font-size:12px;color:var(--jex-text-muted, #64748b);cursor:pointer;text-decoration:underline;padding:0;align-self:center}.jex-home-lookup{display:flex;gap:8px;width:100%;animation:jexFadeIn .4s .1s ease both}.jex-home-lookup-input{flex:1;padding:10px 14px;border-radius:10px;border:1px solid var(--jex-border-input, #e2e8f0);background:var(--jex-bg-input);color:var(--jex-text-main);font-size:14px;font-family:ui-monospace,Cascadia Code,Fira Code,monospace;letter-spacing:.04em;outline:none;transition:border-color .2s}@media(pointer:coarse){.jex-home-lookup-input{font-size:16px}}.jex-home-lookup-input::placeholder{font-family:inherit;letter-spacing:.04em;color:var(--jex-text-muted);opacity:.7}.jex-home-lookup-input:focus{border-color:var(--jex-primary, #115A62)}.jex-home-lookup-submit{padding:10px 16px;border-radius:10px;border:none;background:var(--jex-primary, #115A62);color:#fff;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;transition:background .2s,opacity .2s;flex-shrink:0}.jex-home-lookup-submit:hover:not(:disabled){background:var(--jex-primary-hover)}.jex-home-lookup-submit:disabled{opacity:.4;cursor:default}.jex-sources-row{margin-top:6px;margin-left:32px;display:flex;flex-direction:column;gap:6px}.jex-sources-toggle{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;background:transparent;border:none;border-radius:6px;cursor:pointer;font-size:11px;color:var(--jex-text-muted, #6b7280);font-family:inherit;align-self:flex-start;transition:background .15s,color .15s}.jex-sources-toggle:hover{background:#0000000a;color:inherit}.jex-sources-icon{font-size:12px;line-height:1}.jex-sources-chevron{display:inline-block;font-size:10px;transition:transform .15s}.jex-sources-chevron--open{transform:rotate(180deg)}.jex-sources-pills{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.jex-source-pill{display:inline-flex;align-items:center;gap:6px;max-width:240px;padding:2px 8px;border-radius:999px;border:1px solid rgba(0,0,0,.1);background:#0000000a;color:var(--jex-text-muted, #6b7280);font-size:11px;text-decoration:none;cursor:pointer;transition:background .15s,color .15s}.jex-source-pill:hover{background:#00000014;color:inherit}.jex-source-id{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:4px;background:var(--jex-primary, #115A62);color:#fff;font-size:10px;font-weight:600;line-height:1;flex-shrink:0;font-variant-numeric:tabular-nums}.jex-source-type{font-size:10px;flex-shrink:0}.jex-source-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.jex-source-score{opacity:.6;flex-shrink:0;font-variant-numeric:tabular-nums}';
7418
+ function pu(t) {
7383
7419
  const e = document.createElement("style");
7384
- e.textContent = uu, t.appendChild(e);
7420
+ e.textContent = du, t.appendChild(e);
7385
7421
  }
7386
- const du = "https://festive-mouse-978.eu-west-1.convex.cloud";
7422
+ const fu = "https://festive-mouse-978.eu-west-1.convex.cloud";
7387
7423
  let Zt = null;
7388
- function pu(t) {
7389
- const e = t ?? du;
7424
+ function gu(t) {
7425
+ const e = t ?? fu;
7390
7426
  if (!e)
7391
7427
  throw new Error("[jexity] No Convex URL — set VITE_CONVEX_URL at build time or data-convex-url on the script tag");
7392
7428
  return Zt || (Zt = new Aa(Va(e))), Zt;
7393
7429
  }
7394
- function fu(t, e) {
7430
+ function mu(t, e) {
7395
7431
  const n = t.shadowRoot ?? t.attachShadow({ mode: "open" });
7396
7432
  for (; n.firstChild; )
7397
7433
  n.removeChild(n.firstChild);
7398
- hu(n), jt.value = e.source, le.value = e.bootstrapToken, N.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), q.value = !0);
7434
+ pu(n), jt.value = e.source, le.value = e.bootstrapToken, N.value = [{ id: "home" }], e.mode === "embedded" && (t.classList.add("jex-mode-embedded"), P.value = !0);
7399
7435
  const r = document.createElement("div");
7400
7436
  return e.mode === "embedded" && (r.style.cssText = "width:100%;height:100%"), n.appendChild(r), ge(
7401
- /* @__PURE__ */ c($a, { client: pu(e.convexUrl), children: /* @__PURE__ */ c(lu, { options: e }) }),
7437
+ /* @__PURE__ */ c($a, { client: gu(e.convexUrl), children: /* @__PURE__ */ c(uu, { options: e }) }),
7402
7438
  r
7403
7439
  ), function() {
7404
- ge(null, r), q.value = !1, jt.value = void 0, le.value = void 0, N.value = [{ id: "home" }];
7440
+ ge(null, r), P.value = !1, jt.value = void 0, le.value = void 0, N.value = [{ id: "home" }];
7405
7441
  };
7406
7442
  }
7407
- function gu(t, e, n) {
7408
- const r = fu(t, e), i = /* @__PURE__ */ new Set(), o = q.subscribe((s) => {
7443
+ function xu(t, e, n) {
7444
+ const r = mu(t, e), i = /* @__PURE__ */ new Set(), o = P.subscribe((s) => {
7409
7445
  for (const l of i)
7410
7446
  l(s);
7411
7447
  });
@@ -7414,16 +7450,16 @@ function gu(t, e, n) {
7414
7450
  o(), i.clear(), r(), n && n();
7415
7451
  },
7416
7452
  open() {
7417
- q.value = !0;
7453
+ P.value = !0;
7418
7454
  },
7419
7455
  close() {
7420
- q.value = !1;
7456
+ P.value = !1;
7421
7457
  },
7422
7458
  toggle() {
7423
- q.value = !q.value;
7459
+ P.value = !P.value;
7424
7460
  },
7425
7461
  get isOpen() {
7426
- return q.value;
7462
+ return P.value;
7427
7463
  },
7428
7464
  subscribe(s) {
7429
7465
  return i.add(s), () => {
@@ -7433,21 +7469,21 @@ function gu(t, e, n) {
7433
7469
  };
7434
7470
  }
7435
7471
  let Fe = null;
7436
- function mu(t) {
7472
+ function bu(t) {
7437
7473
  Fe && Fe.shutdown();
7438
7474
  let e;
7439
7475
  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));
7440
- const n = gu(e, t, () => {
7476
+ const n = xu(e, t, () => {
7441
7477
  t.container || e.remove(), Fe === n && (Fe = null);
7442
7478
  });
7443
7479
  return Fe = n, n;
7444
7480
  }
7445
- const xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7481
+ const vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7446
7482
  __proto__: null,
7447
- JexityChat: mu
7483
+ JexityChat: bu
7448
7484
  }, Symbol.toStringTag, { value: "Module" }));
7449
7485
  export {
7450
- vu as JexityChatProvider,
7451
- yu as useJexityChat
7486
+ ku as JexityChatProvider,
7487
+ wu as useJexityChat
7452
7488
  };
7453
7489
  //# sourceMappingURL=react.mjs.map