@mypatientspace/chatbot-widget 1.0.23 → 1.0.25

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.
@@ -44,17 +44,17 @@ var g0;
44
44
  function Uh() {
45
45
  return g0 || (g0 = 1, Zf.exports = Dh()), Zf.exports;
46
46
  }
47
- var k = Uh(), wf = { exports: {} }, Qn = {}, Vf = { exports: {} }, Kf = {};
47
+ var W = Uh(), wf = { exports: {} }, Qn = {}, Vf = { exports: {} }, Kf = {};
48
48
  var p0;
49
49
  function Rh() {
50
50
  return p0 || (p0 = 1, (function(i) {
51
51
  function f(z, j) {
52
- var $ = z.length;
52
+ var k = z.length;
53
53
  z.push(j);
54
- t: for (; 0 < $; ) {
55
- var At = $ - 1 >>> 1, Ot = z[At];
54
+ t: for (; 0 < k; ) {
55
+ var At = k - 1 >>> 1, Ot = z[At];
56
56
  if (0 < y(Ot, j))
57
- z[At] = j, z[$] = Ot, $ = At;
57
+ z[At] = j, z[k] = Ot, k = At;
58
58
  else break t;
59
59
  }
60
60
  }
@@ -63,23 +63,23 @@ function Rh() {
63
63
  }
64
64
  function r(z) {
65
65
  if (z.length === 0) return null;
66
- var j = z[0], $ = z.pop();
67
- if ($ !== j) {
68
- z[0] = $;
66
+ var j = z[0], k = z.pop();
67
+ if (k !== j) {
68
+ z[0] = k;
69
69
  t: for (var At = 0, Ot = z.length, h = Ot >>> 1; At < h; ) {
70
70
  var D = 2 * (At + 1) - 1, q = z[D], L = D + 1, et = z[L];
71
- if (0 > y(q, $))
72
- L < Ot && 0 > y(et, q) ? (z[At] = et, z[L] = $, At = L) : (z[At] = q, z[D] = $, At = D);
73
- else if (L < Ot && 0 > y(et, $))
74
- z[At] = et, z[L] = $, At = L;
71
+ if (0 > y(q, k))
72
+ L < Ot && 0 > y(et, q) ? (z[At] = et, z[L] = k, At = L) : (z[At] = q, z[D] = k, At = D);
73
+ else if (L < Ot && 0 > y(et, k))
74
+ z[At] = et, z[L] = k, At = L;
75
75
  else break t;
76
76
  }
77
77
  }
78
78
  return j;
79
79
  }
80
80
  function y(z, j) {
81
- var $ = z.sortIndex - j.sortIndex;
82
- return $ !== 0 ? $ : z.id - j.id;
81
+ var k = z.sortIndex - j.sortIndex;
82
+ return k !== 0 ? k : z.id - j.id;
83
83
  }
84
84
  if (i.unstable_now = void 0, typeof performance == "object" && typeof performance.now == "function") {
85
85
  var p = performance;
@@ -92,7 +92,7 @@ function Rh() {
92
92
  return _.now() - M;
93
93
  };
94
94
  }
95
- var A = [], g = [], R = 1, U = null, B = 3, P = !1, w = !1, H = !1, V = !1, Y = typeof setTimeout == "function" ? setTimeout : null, W = typeof clearTimeout == "function" ? clearTimeout : null, K = typeof setImmediate < "u" ? setImmediate : null;
95
+ var A = [], g = [], R = 1, U = null, Y = 3, P = !1, w = !1, H = !1, V = !1, B = typeof setTimeout == "function" ? setTimeout : null, J = typeof clearTimeout == "function" ? clearTimeout : null, K = typeof setImmediate < "u" ? setImmediate : null;
96
96
  function nt(z) {
97
97
  for (var j = o(g); j !== null; ) {
98
98
  if (j.callback === null) r(g);
@@ -122,14 +122,14 @@ function Rh() {
122
122
  var j = !0;
123
123
  try {
124
124
  t: {
125
- w = !1, H && (H = !1, W(G), G = -1), P = !0;
126
- var $ = B;
125
+ w = !1, H && (H = !1, J(G), G = -1), P = !0;
126
+ var k = Y;
127
127
  try {
128
128
  e: {
129
129
  for (nt(z), U = o(A); U !== null && !(U.expirationTime > z && Vt()); ) {
130
130
  var At = U.callback;
131
131
  if (typeof At == "function") {
132
- U.callback = null, B = U.priorityLevel;
132
+ U.callback = null, Y = U.priorityLevel;
133
133
  var Ot = At(
134
134
  U.expirationTime <= z
135
135
  );
@@ -152,7 +152,7 @@ function Rh() {
152
152
  }
153
153
  break t;
154
154
  } finally {
155
- U = null, B = $, P = !1;
155
+ U = null, Y = k, P = !1;
156
156
  }
157
157
  j = void 0;
158
158
  }
@@ -173,10 +173,10 @@ function Rh() {
173
173
  };
174
174
  } else
175
175
  Et = function() {
176
- Y(zt, 0);
176
+ B(zt, 0);
177
177
  };
178
178
  function Dt(z, j) {
179
- G = Y(function() {
179
+ G = B(function() {
180
180
  z(i.unstable_now());
181
181
  }, j);
182
182
  }
@@ -187,23 +187,23 @@ function Rh() {
187
187
  "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
188
188
  ) : Gt = 0 < z ? Math.floor(1e3 / z) : 5;
189
189
  }, i.unstable_getCurrentPriorityLevel = function() {
190
- return B;
190
+ return Y;
191
191
  }, i.unstable_next = function(z) {
192
- switch (B) {
192
+ switch (Y) {
193
193
  case 1:
194
194
  case 2:
195
195
  case 3:
196
196
  var j = 3;
197
197
  break;
198
198
  default:
199
- j = B;
199
+ j = Y;
200
200
  }
201
- var $ = B;
202
- B = j;
201
+ var k = Y;
202
+ Y = j;
203
203
  try {
204
204
  return z();
205
205
  } finally {
206
- B = $;
206
+ Y = k;
207
207
  }
208
208
  }, i.unstable_requestPaint = function() {
209
209
  V = !0;
@@ -218,16 +218,16 @@ function Rh() {
218
218
  default:
219
219
  z = 3;
220
220
  }
221
- var $ = B;
222
- B = z;
221
+ var k = Y;
222
+ Y = z;
223
223
  try {
224
224
  return j();
225
225
  } finally {
226
- B = $;
226
+ Y = k;
227
227
  }
228
- }, i.unstable_scheduleCallback = function(z, j, $) {
228
+ }, i.unstable_scheduleCallback = function(z, j, k) {
229
229
  var At = i.unstable_now();
230
- switch (typeof $ == "object" && $ !== null ? ($ = $.delay, $ = typeof $ == "number" && 0 < $ ? At + $ : At) : $ = At, z) {
230
+ switch (typeof k == "object" && k !== null ? (k = k.delay, k = typeof k == "number" && 0 < k ? At + k : At) : k = At, z) {
231
231
  case 1:
232
232
  var Ot = -1;
233
233
  break;
@@ -243,23 +243,23 @@ function Rh() {
243
243
  default:
244
244
  Ot = 5e3;
245
245
  }
246
- return Ot = $ + Ot, z = {
246
+ return Ot = k + Ot, z = {
247
247
  id: R++,
248
248
  callback: j,
249
249
  priorityLevel: z,
250
- startTime: $,
250
+ startTime: k,
251
251
  expirationTime: Ot,
252
252
  sortIndex: -1
253
- }, $ > At ? (z.sortIndex = $, f(g, z), o(A) === null && z === o(g) && (H ? (W(G), G = -1) : H = !0, Dt(N, $ - At))) : (z.sortIndex = Ot, f(A, z), w || P || (w = !0, I || (I = !0, Et()))), z;
253
+ }, k > At ? (z.sortIndex = k, f(g, z), o(A) === null && z === o(g) && (H ? (J(G), G = -1) : H = !0, Dt(N, k - At))) : (z.sortIndex = Ot, f(A, z), w || P || (w = !0, I || (I = !0, Et()))), z;
254
254
  }, i.unstable_shouldYield = Vt, i.unstable_wrapCallback = function(z) {
255
- var j = B;
255
+ var j = Y;
256
256
  return function() {
257
- var $ = B;
258
- B = j;
257
+ var k = Y;
258
+ Y = j;
259
259
  try {
260
260
  return z.apply(this, arguments);
261
261
  } finally {
262
- B = $;
262
+ Y = k;
263
263
  }
264
264
  };
265
265
  };
@@ -274,9 +274,9 @@ var S0;
274
274
  function Hh() {
275
275
  if (S0) return tt;
276
276
  S0 = 1;
277
- var i = /* @__PURE__ */ Symbol.for("react.transitional.element"), f = /* @__PURE__ */ Symbol.for("react.portal"), o = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), p = /* @__PURE__ */ Symbol.for("react.consumer"), _ = /* @__PURE__ */ Symbol.for("react.context"), M = /* @__PURE__ */ Symbol.for("react.forward_ref"), A = /* @__PURE__ */ Symbol.for("react.suspense"), g = /* @__PURE__ */ Symbol.for("react.memo"), R = /* @__PURE__ */ Symbol.for("react.lazy"), U = /* @__PURE__ */ Symbol.for("react.activity"), B = Symbol.iterator;
277
+ var i = /* @__PURE__ */ Symbol.for("react.transitional.element"), f = /* @__PURE__ */ Symbol.for("react.portal"), o = /* @__PURE__ */ Symbol.for("react.fragment"), r = /* @__PURE__ */ Symbol.for("react.strict_mode"), y = /* @__PURE__ */ Symbol.for("react.profiler"), p = /* @__PURE__ */ Symbol.for("react.consumer"), _ = /* @__PURE__ */ Symbol.for("react.context"), M = /* @__PURE__ */ Symbol.for("react.forward_ref"), A = /* @__PURE__ */ Symbol.for("react.suspense"), g = /* @__PURE__ */ Symbol.for("react.memo"), R = /* @__PURE__ */ Symbol.for("react.lazy"), U = /* @__PURE__ */ Symbol.for("react.activity"), Y = Symbol.iterator;
278
278
  function P(h) {
279
- return h === null || typeof h != "object" ? null : (h = B && h[B] || h["@@iterator"], typeof h == "function" ? h : null);
279
+ return h === null || typeof h != "object" ? null : (h = Y && h[Y] || h["@@iterator"], typeof h == "function" ? h : null);
280
280
  }
281
281
  var w = {
282
282
  isMounted: function() {
@@ -289,26 +289,26 @@ function Hh() {
289
289
  enqueueSetState: function() {
290
290
  }
291
291
  }, H = Object.assign, V = {};
292
- function Y(h, D, q) {
292
+ function B(h, D, q) {
293
293
  this.props = h, this.context = D, this.refs = V, this.updater = q || w;
294
294
  }
295
- Y.prototype.isReactComponent = {}, Y.prototype.setState = function(h, D) {
295
+ B.prototype.isReactComponent = {}, B.prototype.setState = function(h, D) {
296
296
  if (typeof h != "object" && typeof h != "function" && h != null)
297
297
  throw Error(
298
298
  "takes an object of state variables to update or a function which returns an object of state variables."
299
299
  );
300
300
  this.updater.enqueueSetState(this, h, D, "setState");
301
- }, Y.prototype.forceUpdate = function(h) {
301
+ }, B.prototype.forceUpdate = function(h) {
302
302
  this.updater.enqueueForceUpdate(this, h, "forceUpdate");
303
303
  };
304
- function W() {
304
+ function J() {
305
305
  }
306
- W.prototype = Y.prototype;
306
+ J.prototype = B.prototype;
307
307
  function K(h, D, q) {
308
308
  this.props = h, this.context = D, this.refs = V, this.updater = q || w;
309
309
  }
310
- var nt = K.prototype = new W();
311
- nt.constructor = K, H(nt, Y.prototype), nt.isPureReactComponent = !0;
310
+ var nt = K.prototype = new J();
311
+ nt.constructor = K, H(nt, B.prototype), nt.isPureReactComponent = !0;
312
312
  var N = Array.isArray;
313
313
  function I() {
314
314
  }
@@ -442,7 +442,7 @@ function Hh() {
442
442
  return D.call(q, ut, et++);
443
443
  }), L;
444
444
  }
445
- function $(h) {
445
+ function k(h) {
446
446
  if (h._status === -1) {
447
447
  var D = h._result;
448
448
  D = D(), D.then(
@@ -501,7 +501,7 @@ function Hh() {
501
501
  return h;
502
502
  }
503
503
  };
504
- return tt.Activity = U, tt.Children = Ot, tt.Component = Y, tt.Fragment = o, tt.Profiler = y, tt.PureComponent = K, tt.StrictMode = r, tt.Suspense = A, tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = G, tt.__COMPILER_RUNTIME = {
504
+ return tt.Activity = U, tt.Children = Ot, tt.Component = B, tt.Fragment = o, tt.Profiler = y, tt.PureComponent = K, tt.StrictMode = r, tt.Suspense = A, tt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = G, tt.__COMPILER_RUNTIME = {
505
505
  __proto__: null,
506
506
  c: function(h) {
507
507
  return G.H.useMemoCache(h);
@@ -565,7 +565,7 @@ function Hh() {
565
565
  return {
566
566
  $$typeof: R,
567
567
  _payload: { _status: -1, _result: h },
568
- _init: $
568
+ _init: k
569
569
  };
570
570
  }, tt.memo = function(h, D) {
571
571
  return {
@@ -701,18 +701,18 @@ function jh() {
701
701
  typeof A == "string" && r.d.D(A);
702
702
  }, ee.preinit = function(A, g) {
703
703
  if (typeof A == "string" && g && typeof g.as == "string") {
704
- var R = g.as, U = M(R, g.crossOrigin), B = typeof g.integrity == "string" ? g.integrity : void 0, P = typeof g.fetchPriority == "string" ? g.fetchPriority : void 0;
704
+ var R = g.as, U = M(R, g.crossOrigin), Y = typeof g.integrity == "string" ? g.integrity : void 0, P = typeof g.fetchPriority == "string" ? g.fetchPriority : void 0;
705
705
  R === "style" ? r.d.S(
706
706
  A,
707
707
  typeof g.precedence == "string" ? g.precedence : void 0,
708
708
  {
709
709
  crossOrigin: U,
710
- integrity: B,
710
+ integrity: Y,
711
711
  fetchPriority: P
712
712
  }
713
713
  ) : R === "script" && r.d.X(A, {
714
714
  crossOrigin: U,
715
- integrity: B,
715
+ integrity: Y,
716
716
  fetchPriority: P,
717
717
  nonce: typeof g.nonce == "string" ? g.nonce : void 0
718
718
  });
@@ -894,7 +894,7 @@ function Bh() {
894
894
  }
895
895
  return null;
896
896
  }
897
- var U = Object.assign, B = /* @__PURE__ */ Symbol.for("react.element"), P = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), H = /* @__PURE__ */ Symbol.for("react.fragment"), V = /* @__PURE__ */ Symbol.for("react.strict_mode"), Y = /* @__PURE__ */ Symbol.for("react.profiler"), W = /* @__PURE__ */ Symbol.for("react.consumer"), K = /* @__PURE__ */ Symbol.for("react.context"), nt = /* @__PURE__ */ Symbol.for("react.forward_ref"), N = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), Gt = /* @__PURE__ */ Symbol.for("react.lazy"), ue = /* @__PURE__ */ Symbol.for("react.activity"), Vt = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), zt = Symbol.iterator;
897
+ var U = Object.assign, Y = /* @__PURE__ */ Symbol.for("react.element"), P = /* @__PURE__ */ Symbol.for("react.transitional.element"), w = /* @__PURE__ */ Symbol.for("react.portal"), H = /* @__PURE__ */ Symbol.for("react.fragment"), V = /* @__PURE__ */ Symbol.for("react.strict_mode"), B = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.consumer"), K = /* @__PURE__ */ Symbol.for("react.context"), nt = /* @__PURE__ */ Symbol.for("react.forward_ref"), N = /* @__PURE__ */ Symbol.for("react.suspense"), I = /* @__PURE__ */ Symbol.for("react.suspense_list"), G = /* @__PURE__ */ Symbol.for("react.memo"), Gt = /* @__PURE__ */ Symbol.for("react.lazy"), ue = /* @__PURE__ */ Symbol.for("react.activity"), Vt = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel"), zt = Symbol.iterator;
898
898
  function Et(t) {
899
899
  return t === null || typeof t != "object" ? null : (t = zt && t[zt] || t["@@iterator"], typeof t == "function" ? t : null);
900
900
  }
@@ -907,7 +907,7 @@ function Bh() {
907
907
  switch (t) {
908
908
  case H:
909
909
  return "Fragment";
910
- case Y:
910
+ case B:
911
911
  return "Profiler";
912
912
  case V:
913
913
  return "StrictMode";
@@ -924,7 +924,7 @@ function Bh() {
924
924
  return "Portal";
925
925
  case K:
926
926
  return t.displayName || "Context";
927
- case W:
927
+ case J:
928
928
  return (t._context.displayName || "Context") + ".Consumer";
929
929
  case nt:
930
930
  var e = t.render;
@@ -940,7 +940,7 @@ function Bh() {
940
940
  }
941
941
  return null;
942
942
  }
943
- var Dt = Array.isArray, z = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, $ = {
943
+ var Dt = Array.isArray, z = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, j = o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, k = {
944
944
  pending: !1,
945
945
  data: null,
946
946
  method: null,
@@ -988,7 +988,7 @@ function Bh() {
988
988
  e !== l && (q(et, t), q(L, l));
989
989
  }
990
990
  function $n(t) {
991
- et.current === t && (D(L), D(et)), pt.current === t && (D(pt), qn._currentValue = $);
991
+ et.current === t && (D(L), D(et)), pt.current === t && (D(pt), qn._currentValue = k);
992
992
  }
993
993
  var Ai, mr;
994
994
  function Yl(t) {
@@ -2380,8 +2380,8 @@ Error generating stack: ` + a.message + `
2380
2380
  case V:
2381
2381
  c = 8, n |= 24;
2382
2382
  break;
2383
- case Y:
2384
- return t = pe(12, l, e, n | 2), t.elementType = Y, t.lanes = u, t;
2383
+ case B:
2384
+ return t = pe(12, l, e, n | 2), t.elementType = B, t.lanes = u, t;
2385
2385
  case N:
2386
2386
  return t = pe(13, l, e, n), t.elementType = N, t.lanes = u, t;
2387
2387
  case I:
@@ -2392,7 +2392,7 @@ Error generating stack: ` + a.message + `
2392
2392
  case K:
2393
2393
  c = 10;
2394
2394
  break t;
2395
- case W:
2395
+ case J:
2396
2396
  c = 9;
2397
2397
  break t;
2398
2398
  case nt:
@@ -2846,7 +2846,7 @@ Error generating stack: ` + a.message + `
2846
2846
  e = e.props.ref, t.ref = e !== void 0 ? e : null;
2847
2847
  }
2848
2848
  function zu(t, e) {
2849
- throw e.$$typeof === B ? Error(r(525)) : (t = Object.prototype.toString.call(e), Error(
2849
+ throw e.$$typeof === Y ? Error(r(525)) : (t = Object.prototype.toString.call(e), Error(
2850
2850
  r(
2851
2851
  31,
2852
2852
  t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t
@@ -2884,14 +2884,14 @@ Error generating stack: ` + a.message + `
2884
2884
  return m === null || m.tag !== 6 ? (m = uc(b, v.mode, O), m.return = v, m) : (m = n(m, b), m.return = v, m);
2885
2885
  }
2886
2886
  function d(v, m, b, O) {
2887
- var J = b.type;
2888
- return J === H ? x(
2887
+ var $ = b.type;
2888
+ return $ === H ? x(
2889
2889
  v,
2890
2890
  m,
2891
2891
  b.props.children,
2892
2892
  O,
2893
2893
  b.key
2894
- ) : m !== null && (m.elementType === J || typeof J == "object" && J !== null && J.$$typeof === Gt && Wl(J) === m.type) ? (m = n(m, b.props), yn(m, b), m.return = v, m) : (m = mu(
2894
+ ) : m !== null && (m.elementType === $ || typeof $ == "object" && $ !== null && $.$$typeof === Gt && Wl($) === m.type) ? (m = n(m, b.props), yn(m, b), m.return = v, m) : (m = mu(
2895
2895
  b.type,
2896
2896
  b.key,
2897
2897
  b.props,
@@ -2903,12 +2903,12 @@ Error generating stack: ` + a.message + `
2903
2903
  function S(v, m, b, O) {
2904
2904
  return m === null || m.tag !== 4 || m.stateNode.containerInfo !== b.containerInfo || m.stateNode.implementation !== b.implementation ? (m = ic(b, v.mode, O), m.return = v, m) : (m = n(m, b.children || []), m.return = v, m);
2905
2905
  }
2906
- function x(v, m, b, O, J) {
2906
+ function x(v, m, b, O, $) {
2907
2907
  return m === null || m.tag !== 7 ? (m = Vl(
2908
2908
  b,
2909
2909
  v.mode,
2910
2910
  O,
2911
- J
2911
+ $
2912
2912
  ), m.return = v, m) : (m = n(m, b), m.return = v, m);
2913
2913
  }
2914
2914
  function C(v, m, b) {
@@ -2958,20 +2958,20 @@ Error generating stack: ` + a.message + `
2958
2958
  return null;
2959
2959
  }
2960
2960
  function T(v, m, b, O) {
2961
- var J = m !== null ? m.key : null;
2961
+ var $ = m !== null ? m.key : null;
2962
2962
  if (typeof b == "string" && b !== "" || typeof b == "number" || typeof b == "bigint")
2963
- return J !== null ? null : s(v, m, "" + b, O);
2963
+ return $ !== null ? null : s(v, m, "" + b, O);
2964
2964
  if (typeof b == "object" && b !== null) {
2965
2965
  switch (b.$$typeof) {
2966
2966
  case P:
2967
- return b.key === J ? d(v, m, b, O) : null;
2967
+ return b.key === $ ? d(v, m, b, O) : null;
2968
2968
  case w:
2969
- return b.key === J ? S(v, m, b, O) : null;
2969
+ return b.key === $ ? S(v, m, b, O) : null;
2970
2970
  case Gt:
2971
2971
  return b = Wl(b), T(v, m, b, O);
2972
2972
  }
2973
2973
  if (Dt(b) || Et(b))
2974
- return J !== null ? null : x(v, m, b, O, null);
2974
+ return $ !== null ? null : x(v, m, b, O, null);
2975
2975
  if (typeof b.then == "function")
2976
2976
  return T(
2977
2977
  v,
@@ -2990,37 +2990,37 @@ Error generating stack: ` + a.message + `
2990
2990
  }
2991
2991
  return null;
2992
2992
  }
2993
- function E(v, m, b, O, J) {
2993
+ function E(v, m, b, O, $) {
2994
2994
  if (typeof O == "string" && O !== "" || typeof O == "number" || typeof O == "bigint")
2995
- return v = v.get(b) || null, s(m, v, "" + O, J);
2995
+ return v = v.get(b) || null, s(m, v, "" + O, $);
2996
2996
  if (typeof O == "object" && O !== null) {
2997
2997
  switch (O.$$typeof) {
2998
2998
  case P:
2999
2999
  return v = v.get(
3000
3000
  O.key === null ? b : O.key
3001
- ) || null, d(m, v, O, J);
3001
+ ) || null, d(m, v, O, $);
3002
3002
  case w:
3003
3003
  return v = v.get(
3004
3004
  O.key === null ? b : O.key
3005
- ) || null, S(m, v, O, J);
3005
+ ) || null, S(m, v, O, $);
3006
3006
  case Gt:
3007
3007
  return O = Wl(O), E(
3008
3008
  v,
3009
3009
  m,
3010
3010
  b,
3011
3011
  O,
3012
- J
3012
+ $
3013
3013
  );
3014
3014
  }
3015
3015
  if (Dt(O) || Et(O))
3016
- return v = v.get(b) || null, x(m, v, O, J, null);
3016
+ return v = v.get(b) || null, x(m, v, O, $, null);
3017
3017
  if (typeof O.then == "function")
3018
3018
  return E(
3019
3019
  v,
3020
3020
  m,
3021
3021
  b,
3022
3022
  Tu(O),
3023
- J
3023
+ $
3024
3024
  );
3025
3025
  if (O.$$typeof === K)
3026
3026
  return E(
@@ -3028,14 +3028,14 @@ Error generating stack: ` + a.message + `
3028
3028
  m,
3029
3029
  b,
3030
3030
  gu(m, O),
3031
- J
3031
+ $
3032
3032
  );
3033
3033
  zu(m, O);
3034
3034
  }
3035
3035
  return null;
3036
3036
  }
3037
3037
  function Q(v, m, b, O) {
3038
- for (var J = null, ot = null, Z = m, at = m = 0, rt = null; Z !== null && at < b.length; at++) {
3038
+ for (var $ = null, ot = null, Z = m, at = m = 0, rt = null; Z !== null && at < b.length; at++) {
3039
3039
  Z.index > at ? (rt = Z, Z = null) : rt = Z.sibling;
3040
3040
  var dt = T(
3041
3041
  v,
@@ -3047,18 +3047,18 @@ Error generating stack: ` + a.message + `
3047
3047
  Z === null && (Z = rt);
3048
3048
  break;
3049
3049
  }
3050
- t && Z && dt.alternate === null && e(v, Z), m = u(dt, m, at), ot === null ? J = dt : ot.sibling = dt, ot = dt, Z = rt;
3050
+ t && Z && dt.alternate === null && e(v, Z), m = u(dt, m, at), ot === null ? $ = dt : ot.sibling = dt, ot = dt, Z = rt;
3051
3051
  }
3052
3052
  if (at === b.length)
3053
- return l(v, Z), st && Ie(v, at), J;
3053
+ return l(v, Z), st && Ie(v, at), $;
3054
3054
  if (Z === null) {
3055
3055
  for (; at < b.length; at++)
3056
3056
  Z = C(v, b[at], O), Z !== null && (m = u(
3057
3057
  Z,
3058
3058
  m,
3059
3059
  at
3060
- ), ot === null ? J = Z : ot.sibling = Z, ot = Z);
3061
- return st && Ie(v, at), J;
3060
+ ), ot === null ? $ = Z : ot.sibling = Z, ot = Z);
3061
+ return st && Ie(v, at), $;
3062
3062
  }
3063
3063
  for (Z = a(Z); at < b.length; at++)
3064
3064
  rt = E(
@@ -3073,43 +3073,43 @@ Error generating stack: ` + a.message + `
3073
3073
  rt,
3074
3074
  m,
3075
3075
  at
3076
- ), ot === null ? J = rt : ot.sibling = rt, ot = rt);
3076
+ ), ot === null ? $ = rt : ot.sibling = rt, ot = rt);
3077
3077
  return t && Z.forEach(function(Bl) {
3078
3078
  return e(v, Bl);
3079
- }), st && Ie(v, at), J;
3079
+ }), st && Ie(v, at), $;
3080
3080
  }
3081
3081
  function F(v, m, b, O) {
3082
3082
  if (b == null) throw Error(r(151));
3083
- for (var J = null, ot = null, Z = m, at = m = 0, rt = null, dt = b.next(); Z !== null && !dt.done; at++, dt = b.next()) {
3083
+ for (var $ = null, ot = null, Z = m, at = m = 0, rt = null, dt = b.next(); Z !== null && !dt.done; at++, dt = b.next()) {
3084
3084
  Z.index > at ? (rt = Z, Z = null) : rt = Z.sibling;
3085
3085
  var Bl = T(v, Z, dt.value, O);
3086
3086
  if (Bl === null) {
3087
3087
  Z === null && (Z = rt);
3088
3088
  break;
3089
3089
  }
3090
- t && Z && Bl.alternate === null && e(v, Z), m = u(Bl, m, at), ot === null ? J = Bl : ot.sibling = Bl, ot = Bl, Z = rt;
3090
+ t && Z && Bl.alternate === null && e(v, Z), m = u(Bl, m, at), ot === null ? $ = Bl : ot.sibling = Bl, ot = Bl, Z = rt;
3091
3091
  }
3092
3092
  if (dt.done)
3093
- return l(v, Z), st && Ie(v, at), J;
3093
+ return l(v, Z), st && Ie(v, at), $;
3094
3094
  if (Z === null) {
3095
3095
  for (; !dt.done; at++, dt = b.next())
3096
- dt = C(v, dt.value, O), dt !== null && (m = u(dt, m, at), ot === null ? J = dt : ot.sibling = dt, ot = dt);
3097
- return st && Ie(v, at), J;
3096
+ dt = C(v, dt.value, O), dt !== null && (m = u(dt, m, at), ot === null ? $ = dt : ot.sibling = dt, ot = dt);
3097
+ return st && Ie(v, at), $;
3098
3098
  }
3099
3099
  for (Z = a(Z); !dt.done; at++, dt = b.next())
3100
- dt = E(Z, v, at, dt.value, O), dt !== null && (t && dt.alternate !== null && Z.delete(dt.key === null ? at : dt.key), m = u(dt, m, at), ot === null ? J = dt : ot.sibling = dt, ot = dt);
3100
+ dt = E(Z, v, at, dt.value, O), dt !== null && (t && dt.alternate !== null && Z.delete(dt.key === null ? at : dt.key), m = u(dt, m, at), ot === null ? $ = dt : ot.sibling = dt, ot = dt);
3101
3101
  return t && Z.forEach(function(Mh) {
3102
3102
  return e(v, Mh);
3103
- }), st && Ie(v, at), J;
3103
+ }), st && Ie(v, at), $;
3104
3104
  }
3105
3105
  function Mt(v, m, b, O) {
3106
3106
  if (typeof b == "object" && b !== null && b.type === H && b.key === null && (b = b.props.children), typeof b == "object" && b !== null) {
3107
3107
  switch (b.$$typeof) {
3108
3108
  case P:
3109
3109
  t: {
3110
- for (var J = b.key; m !== null; ) {
3111
- if (m.key === J) {
3112
- if (J = b.type, J === H) {
3110
+ for (var $ = b.key; m !== null; ) {
3111
+ if (m.key === $) {
3112
+ if ($ = b.type, $ === H) {
3113
3113
  if (m.tag === 7) {
3114
3114
  l(
3115
3115
  v,
@@ -3120,7 +3120,7 @@ Error generating stack: ` + a.message + `
3120
3120
  ), O.return = v, v = O;
3121
3121
  break t;
3122
3122
  }
3123
- } else if (m.elementType === J || typeof J == "object" && J !== null && J.$$typeof === Gt && Wl(J) === m.type) {
3123
+ } else if (m.elementType === $ || typeof $ == "object" && $ !== null && $.$$typeof === Gt && Wl($) === m.type) {
3124
3124
  l(
3125
3125
  v,
3126
3126
  m.sibling
@@ -3149,8 +3149,8 @@ Error generating stack: ` + a.message + `
3149
3149
  return c(v);
3150
3150
  case w:
3151
3151
  t: {
3152
- for (J = b.key; m !== null; ) {
3153
- if (m.key === J)
3152
+ for ($ = b.key; m !== null; ) {
3153
+ if (m.key === $)
3154
3154
  if (m.tag === 4 && m.stateNode.containerInfo === b.containerInfo && m.stateNode.implementation === b.implementation) {
3155
3155
  l(
3156
3156
  v,
@@ -3183,8 +3183,8 @@ Error generating stack: ` + a.message + `
3183
3183
  O
3184
3184
  );
3185
3185
  if (Et(b)) {
3186
- if (J = Et(b), typeof J != "function") throw Error(r(150));
3187
- return b = J.call(b), F(
3186
+ if ($ = Et(b), typeof $ != "function") throw Error(r(150));
3187
+ return b = $.call(b), F(
3188
3188
  v,
3189
3189
  m,
3190
3190
  b,
@@ -3212,13 +3212,13 @@ Error generating stack: ` + a.message + `
3212
3212
  return function(v, m, b, O) {
3213
3213
  try {
3214
3214
  dn = 0;
3215
- var J = Mt(
3215
+ var $ = Mt(
3216
3216
  v,
3217
3217
  m,
3218
3218
  b,
3219
3219
  O
3220
3220
  );
3221
- return Aa = null, J;
3221
+ return Aa = null, $;
3222
3222
  } catch (Z) {
3223
3223
  if (Z === Ea || Z === bu) throw Z;
3224
3224
  var ot = pe(29, Z, null, v.mode);
@@ -4025,7 +4025,7 @@ Error generating stack: ` + a.message + `
4025
4025
  t,
4026
4026
  n,
4027
4027
  e,
4028
- $,
4028
+ k,
4029
4029
  l === null ? zm : function() {
4030
4030
  return oo(t), l(a);
4031
4031
  }
@@ -4035,15 +4035,15 @@ Error generating stack: ` + a.message + `
4035
4035
  var e = t.memoizedState;
4036
4036
  if (e !== null) return e;
4037
4037
  e = {
4038
- memoizedState: $,
4039
- baseState: $,
4038
+ memoizedState: k,
4039
+ baseState: k,
4040
4040
  baseQueue: null,
4041
4041
  queue: {
4042
4042
  pending: null,
4043
4043
  lanes: 0,
4044
4044
  dispatch: null,
4045
4045
  lastRenderedReducer: ll,
4046
- lastRenderedState: $
4046
+ lastRenderedState: k
4047
4047
  },
4048
4048
  next: null
4049
4049
  };
@@ -8357,7 +8357,7 @@ Error generating stack: ` + a.message + `
8357
8357
  for (F = $m, v = E, m = Q, b = 0, O = v; O; O = F(O))
8358
8358
  b++;
8359
8359
  O = 0;
8360
- for (var J = m; J; J = F(J))
8360
+ for (var $ = m; $; $ = F($))
8361
8361
  O++;
8362
8362
  for (; 0 < b - O; )
8363
8363
  v = F(v), b--;
@@ -9934,8 +9934,8 @@ Error generating stack: ` + a.message + `
9934
9934
  $$typeof: K,
9935
9935
  Provider: null,
9936
9936
  Consumer: null,
9937
- _currentValue: $,
9938
- _currentValue2: $,
9937
+ _currentValue: k,
9938
+ _currentValue2: k,
9939
9939
  _threadCount: 0
9940
9940
  };
9941
9941
  function Sh(t, e, l, a, n, u, c, s, d) {
@@ -10598,28 +10598,28 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10598
10598
  if (!g)
10599
10599
  throw new Error("Response body is not readable");
10600
10600
  const R = new TextDecoder();
10601
- let U = "", B = "";
10601
+ let U = "", Y = "";
10602
10602
  for (; ; ) {
10603
10603
  const { done: P, value: w } = await g.read();
10604
10604
  if (P) {
10605
- if (B.trim()) {
10606
- const V = B.split(`
10605
+ if (Y.trim()) {
10606
+ const V = Y.split(`
10607
10607
  `);
10608
- for (const Y of V) {
10609
- const W = M0(Y);
10610
- W && (W.type === "content" ? (U += W.value, o.onChunk(W.value)) : W.type === "status" ? o.onStatus?.(W.value) : W.type === "session_id" ? o.onSessionId?.(W.value) : W.type === "final" && (W.value && o.onSessionId?.(W.value), o.onStatus?.("complete")));
10608
+ for (const B of V) {
10609
+ const J = M0(B);
10610
+ J && (J.type === "content" ? (U += J.value, o.onChunk(J.value)) : J.type === "status" ? o.onStatus?.(J.value) : J.type === "session_id" ? o.onSessionId?.(J.value) : J.type === "final" && (o.onStatus?.("complete"), J.value && o.onSessionId?.(J.value), J.content && (U += J.content, o.onChunk(J.content))));
10611
10611
  }
10612
10612
  }
10613
10613
  o.onComplete(U);
10614
10614
  break;
10615
10615
  }
10616
- B += R.decode(w, { stream: !0 });
10617
- const H = B.split(`
10616
+ Y += R.decode(w, { stream: !0 });
10617
+ const H = Y.split(`
10618
10618
  `);
10619
- B = H.pop() || "";
10619
+ Y = H.pop() || "";
10620
10620
  for (const V of H) {
10621
- const Y = M0(V);
10622
- Y && (Y.type === "content" ? (U += Y.value, o.onChunk(Y.value)) : Y.type === "status" ? o.onStatus?.(Y.value) : Y.type === "session_id" ? o.onSessionId?.(Y.value) : Y.type === "final" && (Y.value && o.onSessionId?.(Y.value), o.onStatus?.("complete")));
10621
+ const B = M0(V);
10622
+ B && (B.type === "content" ? (U += B.value, o.onChunk(B.value)) : B.type === "status" ? o.onStatus?.(B.value) : B.type === "session_id" ? o.onSessionId?.(B.value) : B.type === "final" && (o.onStatus?.("complete"), B.value && o.onSessionId?.(B.value), B.content && (U += B.content, o.onChunk(B.content))));
10623
10623
  }
10624
10624
  }
10625
10625
  } catch (A) {
@@ -10669,7 +10669,11 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10669
10669
  case "canvas":
10670
10670
  return null;
10671
10671
  case "final":
10672
- return { type: "final", value: r.session_id || "" };
10672
+ return {
10673
+ type: "final",
10674
+ value: r.session_id || "",
10675
+ content: r.reply || r.content || ""
10676
+ };
10673
10677
  case "close":
10674
10678
  return null;
10675
10679
  default:
@@ -10701,15 +10705,15 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10701
10705
  if (!Array.isArray(g))
10702
10706
  return { messages: [] };
10703
10707
  const R = g[0]?.sessionId;
10704
- return { messages: g.map((B) => {
10705
- const P = B.role === "assistant" ? "bot" : B.role === "user" ? "user" : B.sender || "bot";
10708
+ return { messages: g.map((Y) => {
10709
+ const P = Y.role === "assistant" ? "bot" : Y.role === "user" ? "user" : Y.sender || "bot";
10706
10710
  return {
10707
- id: B.id || "",
10708
- content: B.content,
10711
+ id: Y.id || "",
10712
+ content: Y.content,
10709
10713
  sender: P,
10710
10714
  // Map createdOn (milliseconds) to ISO timestamp string
10711
- timestamp: B.createdOn ? new Date(B.createdOn).toISOString() : B.timestamp || (/* @__PURE__ */ new Date()).toISOString(),
10712
- status: B.status
10715
+ timestamp: Y.createdOn ? new Date(Y.createdOn).toISOString() : Y.timestamp || (/* @__PURE__ */ new Date()).toISOString(),
10716
+ status: Y.status
10713
10717
  };
10714
10718
  }), sessionId: R };
10715
10719
  } catch (M) {
@@ -10737,10 +10741,10 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10737
10741
  return { assistants: [], error: M };
10738
10742
  }
10739
10743
  }, w0 = X.createContext(null), di = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`, Kh = ({ config: i, children: f }) => {
10740
- const [o, r] = X.useState([]), [y, p] = X.useState(i.embedMode ?? !1), [_, M] = X.useState(!1), [A, g] = X.useState(void 0), [R, U] = X.useState(!1), [B, P] = X.useState(!1), [w, H] = X.useState(null), [V, Y] = X.useState(null), W = Qh(i.theme), K = X.useRef(null), nt = X.useRef(!1);
10744
+ const [o, r] = X.useState([]), [y, p] = X.useState(i.embedMode ?? !1), [_, M] = X.useState(!1), [A, g] = X.useState(void 0), [R, U] = X.useState(!1), [Y, P] = X.useState(!1), [w, H] = X.useState(null), [V, B] = X.useState(null), J = Qh(i.theme), K = X.useRef(null), nt = X.useRef(!1);
10741
10745
  X.useEffect(() => {
10742
10746
  (async () => {
10743
- if (!(!y || B || i.loadHistory === !1)) {
10747
+ if (!(!y || Y || i.loadHistory === !1)) {
10744
10748
  try {
10745
10749
  const zt = await Vh(i);
10746
10750
  if (zt.error) {
@@ -10757,7 +10761,7 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10757
10761
  ...i,
10758
10762
  assistantId: Et.id
10759
10763
  }, mt = await wh(je);
10760
- if (mt.sessionId && Y(mt.sessionId), mt.messages.length > 0) {
10764
+ if (mt.sessionId && B(mt.sessionId), mt.messages.length > 0) {
10761
10765
  const Dt = mt.messages.map((z) => ({
10762
10766
  id: z.id || di(),
10763
10767
  content: z.content,
@@ -10773,8 +10777,8 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10773
10777
  P(!0);
10774
10778
  }
10775
10779
  })();
10776
- }, [y, B, i]), X.useEffect(() => {
10777
- if (y && !R && B) {
10780
+ }, [y, Y, i]), X.useEffect(() => {
10781
+ if (y && !R && Y) {
10778
10782
  const Vt = w?.chatUiConfig?.welcomeMessage || i.greeting;
10779
10783
  if (Vt) {
10780
10784
  const zt = {
@@ -10788,7 +10792,7 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10788
10792
  }
10789
10793
  U(!0);
10790
10794
  }
10791
- }, [y, R, i.greeting, B, w]);
10795
+ }, [y, R, i.greeting, Y, w]);
10792
10796
  const N = X.useCallback(() => {
10793
10797
  p(!0), i.onOpen?.();
10794
10798
  }, [i]), I = X.useCallback(() => {
@@ -10839,17 +10843,17 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10839
10843
  i.onStreamChunk?.(mt);
10840
10844
  },
10841
10845
  onStatus: (mt) => {
10842
- g(mt === "complete" ? void 0 : mt);
10846
+ mt === "complete" ? (g(void 0), M(!1)) : g(mt);
10843
10847
  },
10844
10848
  onSessionId: (mt) => {
10845
- Y(mt);
10849
+ B(mt);
10846
10850
  },
10847
10851
  onComplete: (mt) => {
10848
10852
  M(!1), g(void 0), K.current = null, nt.current && r((Dt) => {
10849
10853
  const z = Dt.map(
10850
- ($) => $.id === Et ? { ...$, content: mt, status: "sent" } : $
10854
+ (k) => k.id === Et ? { ...k, content: mt, status: "sent" } : k
10851
10855
  ), j = z.find(
10852
- ($) => $.id === Et
10856
+ (k) => k.id === Et
10853
10857
  );
10854
10858
  return j && i.onMessageReceived?.(j), z;
10855
10859
  });
@@ -10870,14 +10874,14 @@ const Xh = /* @__PURE__ */ Ch(X), _0 = /* @__PURE__ */ Oh({
10870
10874
  isTyping: _,
10871
10875
  streamingStatus: A,
10872
10876
  config: i,
10873
- theme: W,
10877
+ theme: J,
10874
10878
  assistant: w,
10875
10879
  sendMessage: Gt,
10876
10880
  open: N,
10877
10881
  close: I,
10878
10882
  toggle: G
10879
10883
  };
10880
- return /* @__PURE__ */ k.jsx(w0.Provider, { value: ue, children: f });
10884
+ return /* @__PURE__ */ W.jsx(w0.Provider, { value: ue, children: f });
10881
10885
  };
10882
10886
  function tr() {
10883
10887
  return tr = Object.assign ? Object.assign.bind() : function(i) {
@@ -11081,19 +11085,19 @@ function r1(i) {
11081
11085
  return W0(gi("", null, null, null, [""], i = k0(i), 0, [0], i));
11082
11086
  }
11083
11087
  function gi(i, f, o, r, y, p, _, M, A) {
11084
- for (var g = 0, R = 0, U = _, B = 0, P = 0, w = 0, H = 1, V = 1, Y = 1, W = 0, K = "", nt = y, N = p, I = r, G = K; V; )
11085
- switch (w = W, W = Ae()) {
11088
+ for (var g = 0, R = 0, U = _, Y = 0, P = 0, w = 0, H = 1, V = 1, B = 1, J = 0, K = "", nt = y, N = p, I = r, G = K; V; )
11089
+ switch (w = J, J = Ae()) {
11086
11090
  // (
11087
11091
  case 40:
11088
11092
  if (w != 108 && te(G, U - 1) == 58) {
11089
- er(G += gt(vi(W), "&", "&\f"), "&\f") != -1 && (Y = -1);
11093
+ er(G += gt(vi(J), "&", "&\f"), "&\f") != -1 && (B = -1);
11090
11094
  break;
11091
11095
  }
11092
11096
  // " ' [
11093
11097
  case 34:
11094
11098
  case 39:
11095
11099
  case 91:
11096
- G += vi(W);
11100
+ G += vi(J);
11097
11101
  break;
11098
11102
  // \t \n \r \s
11099
11103
  case 9:
@@ -11119,30 +11123,30 @@ function gi(i, f, o, r, y, p, _, M, A) {
11119
11123
  break;
11120
11124
  // {
11121
11125
  case 123 * H:
11122
- M[g++] = we(G) * Y;
11126
+ M[g++] = we(G) * B;
11123
11127
  // } ; \0
11124
11128
  case 125 * H:
11125
11129
  case 59:
11126
11130
  case 0:
11127
- switch (W) {
11131
+ switch (J) {
11128
11132
  // \0 }
11129
11133
  case 0:
11130
11134
  case 125:
11131
11135
  V = 0;
11132
11136
  // ;
11133
11137
  case 59 + R:
11134
- Y == -1 && (G = gt(G, /\f/g, "")), P > 0 && we(G) - U && yi(P > 32 ? C0(G + ";", r, o, U - 1) : C0(gt(G, " ", "") + ";", r, o, U - 2), A);
11138
+ B == -1 && (G = gt(G, /\f/g, "")), P > 0 && we(G) - U && yi(P > 32 ? C0(G + ";", r, o, U - 1) : C0(gt(G, " ", "") + ";", r, o, U - 2), A);
11135
11139
  break;
11136
11140
  // @ ;
11137
11141
  case 59:
11138
11142
  G += ";";
11139
11143
  // { rule/at-rule
11140
11144
  default:
11141
- if (yi(I = O0(G, f, o, g, R, y, M, K, nt = [], N = [], U), p), W === 123)
11145
+ if (yi(I = O0(G, f, o, g, R, y, M, K, nt = [], N = [], U), p), J === 123)
11142
11146
  if (R === 0)
11143
11147
  gi(G, f, I, I, nt, p, U, M, N);
11144
11148
  else
11145
- switch (B === 99 && te(G, 3) === 110 ? 100 : B) {
11149
+ switch (Y === 99 && te(G, 3) === 110 ? 100 : Y) {
11146
11150
  // d l m s
11147
11151
  case 100:
11148
11152
  case 108:
@@ -11154,30 +11158,30 @@ function gi(i, f, o, r, y, p, _, M, A) {
11154
11158
  gi(G, I, I, I, [""], N, 0, M, N);
11155
11159
  }
11156
11160
  }
11157
- g = R = P = 0, H = Y = 1, K = G = "", U = _;
11161
+ g = R = P = 0, H = B = 1, K = G = "", U = _;
11158
11162
  break;
11159
11163
  // :
11160
11164
  case 58:
11161
11165
  U = 1 + we(G), P = w;
11162
11166
  default:
11163
11167
  if (H < 1) {
11164
- if (W == 123)
11168
+ if (J == 123)
11165
11169
  --H;
11166
- else if (W == 125 && H++ == 0 && n1() == 125)
11170
+ else if (J == 125 && H++ == 0 && n1() == 125)
11167
11171
  continue;
11168
11172
  }
11169
- switch (G += Si(W), W * H) {
11173
+ switch (G += Si(J), J * H) {
11170
11174
  // &
11171
11175
  case 38:
11172
- Y = R > 0 ? 1 : (G += "\f", -1);
11176
+ B = R > 0 ? 1 : (G += "\f", -1);
11173
11177
  break;
11174
11178
  // ,
11175
11179
  case 44:
11176
- M[g++] = (we(G) - 1) * Y, Y = 1;
11180
+ M[g++] = (we(G) - 1) * B, B = 1;
11177
11181
  break;
11178
11182
  // @
11179
11183
  case 64:
11180
- Ke() === 45 && (G += vi(Ae())), B = Ke(), R = U = we(K = G += f1(hi())), W++;
11184
+ Ke() === 45 && (G += vi(Ae())), Y = Ke(), R = U = we(K = G += f1(hi())), J++;
11181
11185
  break;
11182
11186
  // -
11183
11187
  case 45:
@@ -11187,9 +11191,9 @@ function gi(i, f, o, r, y, p, _, M, A) {
11187
11191
  return p;
11188
11192
  }
11189
11193
  function O0(i, f, o, r, y, p, _, M, A, g, R) {
11190
- for (var U = y - 1, B = y === 0 ? p : [""], P = fr(B), w = 0, H = 0, V = 0; w < r; ++w)
11191
- for (var Y = 0, W = Zn(i, U + 1, U = Ih(H = _[w])), K = i; Y < P; ++Y)
11192
- (K = J0(H > 0 ? B[Y] + " " + W : gt(W, /&\f/g, B[Y]))) && (A[V++] = K);
11194
+ for (var U = y - 1, Y = y === 0 ? p : [""], P = fr(Y), w = 0, H = 0, V = 0; w < r; ++w)
11195
+ for (var B = 0, J = Zn(i, U + 1, U = Ih(H = _[w])), K = i; B < P; ++B)
11196
+ (K = J0(H > 0 ? Y[B] + " " + J : gt(J, /&\f/g, Y[B]))) && (A[V++] = K);
11193
11197
  return zi(i, f, o, y === 0 ? ir : M, A, g, R);
11194
11198
  }
11195
11199
  function s1(i, f, o) {
@@ -11474,8 +11478,8 @@ var b1 = function(f, o, r, y) {
11474
11478
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
11475
11479
  document.querySelectorAll('style[data-emotion^="' + o + ' "]'),
11476
11480
  function(H) {
11477
- for (var V = H.getAttribute("data-emotion").split(" "), Y = 1; Y < V.length; Y++)
11478
- p[V[Y]] = !0;
11481
+ for (var V = H.getAttribute("data-emotion").split(" "), B = 1; B < V.length; B++)
11482
+ p[V[B]] = !0;
11479
11483
  M.push(H);
11480
11484
  }
11481
11485
  );
@@ -11483,11 +11487,11 @@ var b1 = function(f, o, r, y) {
11483
11487
  {
11484
11488
  var R, U = [o1, y1(function(H) {
11485
11489
  R.insert(H);
11486
- })], B = d1(g.concat(y, U)), P = function(V) {
11487
- return La(r1(V), B);
11490
+ })], Y = d1(g.concat(y, U)), P = function(V) {
11491
+ return La(r1(V), Y);
11488
11492
  };
11489
- A = function(V, Y, W, K) {
11490
- R = W, P(V ? V + "{" + Y.styles + "}" : Y.styles), K && (w.inserted[Y.name] = !0);
11493
+ A = function(V, B, J, K) {
11494
+ R = J, P(V ? V + "{" + B.styles + "}" : B.styles), K && (w.inserted[B.name] = !0);
11491
11495
  };
11492
11496
  }
11493
11497
  var w = {
@@ -11511,7 +11515,7 @@ var U0;
11511
11515
  function z1() {
11512
11516
  if (U0) return bt;
11513
11517
  U0 = 1;
11514
- var i = typeof Symbol == "function" && Symbol.for, f = i ? /* @__PURE__ */ Symbol.for("react.element") : 60103, o = i ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = i ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, y = i ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, p = i ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, _ = i ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, M = i ? /* @__PURE__ */ Symbol.for("react.context") : 60110, A = i ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = i ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, R = i ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, U = i ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, B = i ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, P = i ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, w = i ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, H = i ? /* @__PURE__ */ Symbol.for("react.block") : 60121, V = i ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, Y = i ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, W = i ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
11518
+ var i = typeof Symbol == "function" && Symbol.for, f = i ? /* @__PURE__ */ Symbol.for("react.element") : 60103, o = i ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = i ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, y = i ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, p = i ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, _ = i ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, M = i ? /* @__PURE__ */ Symbol.for("react.context") : 60110, A = i ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = i ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, R = i ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, U = i ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, Y = i ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, P = i ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, w = i ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, H = i ? /* @__PURE__ */ Symbol.for("react.block") : 60121, V = i ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, B = i ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, J = i ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
11515
11519
  function K(N) {
11516
11520
  if (typeof N == "object" && N !== null) {
11517
11521
  var I = N.$$typeof;
@@ -11570,7 +11574,7 @@ function z1() {
11570
11574
  }, bt.isSuspense = function(N) {
11571
11575
  return K(N) === U;
11572
11576
  }, bt.isValidElementType = function(N) {
11573
- return typeof N == "string" || typeof N == "function" || N === r || N === g || N === p || N === y || N === U || N === B || typeof N == "object" && N !== null && (N.$$typeof === w || N.$$typeof === P || N.$$typeof === _ || N.$$typeof === M || N.$$typeof === R || N.$$typeof === V || N.$$typeof === Y || N.$$typeof === W || N.$$typeof === H);
11577
+ return typeof N == "string" || typeof N == "function" || N === r || N === g || N === p || N === y || N === U || N === Y || typeof N == "object" && N !== null && (N.$$typeof === w || N.$$typeof === P || N.$$typeof === _ || N.$$typeof === M || N.$$typeof === R || N.$$typeof === V || N.$$typeof === B || N.$$typeof === J || N.$$typeof === H);
11574
11578
  }, bt.typeOf = K, bt;
11575
11579
  }
11576
11580
  var R0;
@@ -11619,17 +11623,17 @@ function A1() {
11619
11623
  function _(w) {
11620
11624
  return i.isMemo(w) ? y : p[w.$$typeof] || f;
11621
11625
  }
11622
- var M = Object.defineProperty, A = Object.getOwnPropertyNames, g = Object.getOwnPropertySymbols, R = Object.getOwnPropertyDescriptor, U = Object.getPrototypeOf, B = Object.prototype;
11626
+ var M = Object.defineProperty, A = Object.getOwnPropertyNames, g = Object.getOwnPropertySymbols, R = Object.getOwnPropertyDescriptor, U = Object.getPrototypeOf, Y = Object.prototype;
11623
11627
  function P(w, H, V) {
11624
11628
  if (typeof H != "string") {
11625
- if (B) {
11626
- var Y = U(H);
11627
- Y && Y !== B && P(w, Y, V);
11628
- }
11629
- var W = A(H);
11630
- g && (W = W.concat(g(H)));
11631
- for (var K = _(w), nt = _(H), N = 0; N < W.length; ++N) {
11632
- var I = W[N];
11629
+ if (Y) {
11630
+ var B = U(H);
11631
+ B && B !== Y && P(w, B, V);
11632
+ }
11633
+ var J = A(H);
11634
+ g && (J = J.concat(g(H)));
11635
+ for (var K = _(w), nt = _(H), N = 0; N < J.length; ++N) {
11636
+ var I = J[N];
11633
11637
  if (!o[I] && !(V && V[I]) && !(nt && nt[I]) && !(K && K[I])) {
11634
11638
  var G = R(H, I);
11635
11639
  try {
@@ -11999,12 +12003,12 @@ var B1 = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|def
11999
12003
  if (p !== void 0 && U.push("label:" + p + ";"), R[0] == null || R[0].raw === void 0)
12000
12004
  U.push.apply(U, R);
12001
12005
  else {
12002
- var B = R[0];
12003
- U.push(B[0]);
12006
+ var Y = R[0];
12007
+ U.push(Y[0]);
12004
12008
  for (var P = R.length, w = 1; w < P; w++)
12005
- U.push(R[w], B[w]);
12009
+ U.push(R[w], Y[w]);
12006
12010
  }
12007
- var H = or(function(V, Y, W) {
12011
+ var H = or(function(V, B, J) {
12008
12012
  var K = g && V.as || y, nt = "", N = [], I = V;
12009
12013
  if (V.theme == null) {
12010
12014
  I = {};
@@ -12012,14 +12016,14 @@ var B1 = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|def
12012
12016
  I[G] = V[G];
12013
12017
  I.theme = X.useContext(dr);
12014
12018
  }
12015
- typeof V.className == "string" ? nt = P0(Y.registered, N, V.className) : V.className != null && (nt = V.className + " ");
12016
- var Gt = Ei(U.concat(N), Y.registered, I);
12017
- nt += Y.key + "-" + Gt.name, _ !== void 0 && (nt += " " + _);
12019
+ typeof V.className == "string" ? nt = P0(B.registered, N, V.className) : V.className != null && (nt = V.className + " ");
12020
+ var Gt = Ei(U.concat(N), B.registered, I);
12021
+ nt += B.key + "-" + Gt.name, _ !== void 0 && (nt += " " + _);
12018
12022
  var ue = g && M === void 0 ? G0(K) : A, Vt = {};
12019
12023
  for (var zt in V)
12020
12024
  g && zt === "as" || ue(zt) && (Vt[zt] = V[zt]);
12021
- return Vt.className = nt, W && (Vt.ref = W), /* @__PURE__ */ X.createElement(X.Fragment, null, /* @__PURE__ */ X.createElement(Q1, {
12022
- cache: Y,
12025
+ return Vt.className = nt, J && (Vt.ref = J), /* @__PURE__ */ X.createElement(X.Fragment, null, /* @__PURE__ */ X.createElement(Q1, {
12026
+ cache: B,
12023
12027
  serialized: Gt,
12024
12028
  isStringTag: typeof K == "string"
12025
12029
  }), /* @__PURE__ */ X.createElement(K, Vt));
@@ -12028,11 +12032,11 @@ var B1 = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|def
12028
12032
  value: function() {
12029
12033
  return "." + _;
12030
12034
  }
12031
- }), H.withComponent = function(V, Y) {
12032
- var W = i(V, tr({}, o, Y, {
12033
- shouldForwardProp: X0(H, Y, !0)
12035
+ }), H.withComponent = function(V, B) {
12036
+ var J = i(V, tr({}, o, B, {
12037
+ shouldForwardProp: X0(H, B, !0)
12034
12038
  }));
12035
- return W.apply(void 0, U);
12039
+ return J.apply(void 0, U);
12036
12040
  }, H;
12037
12041
  };
12038
12042
  }, Z1 = [
@@ -12385,16 +12389,16 @@ const yv = [
12385
12389
  }
12386
12390
  `, Av = () => {
12387
12391
  const { close: i, config: f, theme: o, assistant: r } = Va(), y = r?.chatUiConfig?.avatarTitle || f.headerTitle || "Chat", p = r?.chatUiConfig?.avatarImage?.iconURL || r?.chatUiConfig?.avatarImage?.thumbnailURL || f.brandingLogo;
12388
- return /* @__PURE__ */ k.jsxs(hv, { theme: o, children: [
12389
- /* @__PURE__ */ k.jsxs(vv, { children: [
12390
- p && /* @__PURE__ */ k.jsx(gv, { theme: o, hasCustomIcon: !0, children: /* @__PURE__ */ k.jsx(pv, { src: p, alt: "" }) }),
12391
- /* @__PURE__ */ k.jsxs(bv, { children: [
12392
- /* @__PURE__ */ k.jsx(Sv, { fontFamily: o.fontFamily, children: y }),
12393
- f.headerSubtitle && /* @__PURE__ */ k.jsx(Tv, { fontFamily: o.fontFamily, children: f.headerSubtitle }),
12394
- f.brandingText && /* @__PURE__ */ k.jsx(zv, { fontFamily: o.fontFamily, children: f.brandingText })
12392
+ return /* @__PURE__ */ W.jsxs(hv, { theme: o, children: [
12393
+ /* @__PURE__ */ W.jsxs(vv, { children: [
12394
+ p && /* @__PURE__ */ W.jsx(gv, { theme: o, hasCustomIcon: !0, children: /* @__PURE__ */ W.jsx(pv, { src: p, alt: "" }) }),
12395
+ /* @__PURE__ */ W.jsxs(bv, { children: [
12396
+ /* @__PURE__ */ W.jsx(Sv, { fontFamily: o.fontFamily, children: y }),
12397
+ f.headerSubtitle && /* @__PURE__ */ W.jsx(Tv, { fontFamily: o.fontFamily, children: f.headerSubtitle }),
12398
+ f.brandingText && /* @__PURE__ */ W.jsx(zv, { fontFamily: o.fontFamily, children: f.brandingText })
12395
12399
  ] })
12396
12400
  ] }),
12397
- !f.embedMode && /* @__PURE__ */ k.jsx(Ev, { theme: o, onClick: i, "aria-label": "Minimize chat", children: /* @__PURE__ */ k.jsx(I1, { size: 20 }) })
12401
+ !f.embedMode && /* @__PURE__ */ W.jsx(Ev, { theme: o, onClick: i, "aria-label": "Minimize chat", children: /* @__PURE__ */ W.jsx(I1, { size: 20 }) })
12398
12402
  ] });
12399
12403
  }, xv = yt.div`
12400
12404
  display: flex;
@@ -12456,16 +12460,16 @@ const yv = [
12456
12460
  const _ = (M) => {
12457
12461
  i && i(M), f.onQuickAction?.(M), M.message && r(M.message);
12458
12462
  };
12459
- return /* @__PURE__ */ k.jsx(xv, { theme: o, children: p.map((M) => {
12463
+ return /* @__PURE__ */ W.jsx(xv, { theme: o, children: p.map((M) => {
12460
12464
  const A = M.icon ? Mv[M.icon] : null;
12461
- return /* @__PURE__ */ k.jsxs(
12465
+ return /* @__PURE__ */ W.jsxs(
12462
12466
  _v,
12463
12467
  {
12464
12468
  theme: o,
12465
12469
  onClick: () => _(M),
12466
12470
  "aria-label": M.label,
12467
12471
  children: [
12468
- A && /* @__PURE__ */ k.jsx(A, { size: 16 }),
12472
+ A && /* @__PURE__ */ W.jsx(A, { size: 16 }),
12469
12473
  M.label
12470
12474
  ]
12471
12475
  },
@@ -12554,8 +12558,8 @@ const yv = [
12554
12558
  }};
12555
12559
  `, Hv = (i) => i.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }), jv = ({ message: i, theme: f }) => {
12556
12560
  const o = i.sender === "user";
12557
- return /* @__PURE__ */ k.jsxs(Dv, { isUser: o, children: [
12558
- /* @__PURE__ */ k.jsx(
12561
+ return /* @__PURE__ */ W.jsxs(Dv, { isUser: o, children: [
12562
+ /* @__PURE__ */ W.jsx(
12559
12563
  Uv,
12560
12564
  {
12561
12565
  isUser: o,
@@ -12563,9 +12567,9 @@ const yv = [
12563
12567
  dangerouslySetInnerHTML: { __html: i.content }
12564
12568
  }
12565
12569
  ),
12566
- /* @__PURE__ */ k.jsxs(Rv, { theme: f, children: [
12570
+ /* @__PURE__ */ W.jsxs(Rv, { theme: f, children: [
12567
12571
  Hv(i.timestamp),
12568
- o && i.status !== "sent" && /* @__PURE__ */ k.jsx(Nv, { status: i.status, theme: f, children: i.status === "sending" ? "Sending..." : "Failed" })
12572
+ o && i.status !== "sent" && /* @__PURE__ */ W.jsx(Nv, { status: i.status, theme: f, children: i.status === "sending" ? "Sending..." : "Failed" })
12569
12573
  ] })
12570
12574
  ] });
12571
12575
  }, qv = Jn`
@@ -12648,12 +12652,12 @@ const yv = [
12648
12652
  }, 30) : _(!1), () => {
12649
12653
  A.current && clearTimeout(A.current);
12650
12654
  };
12651
- }, [r, p]), /* @__PURE__ */ k.jsx(Bv, { children: /* @__PURE__ */ k.jsx(Yv, { theme: i, children: /* @__PURE__ */ k.jsxs(Gv, { theme: i, children: [
12655
+ }, [r, p]), /* @__PURE__ */ W.jsx(Bv, { children: /* @__PURE__ */ W.jsx(Yv, { theme: i, children: /* @__PURE__ */ W.jsxs(Gv, { theme: i, children: [
12652
12656
  r,
12653
- /* @__PURE__ */ k.jsxs(Xv, { children: [
12654
- /* @__PURE__ */ k.jsx(Pf, { delay: 0, theme: i }),
12655
- /* @__PURE__ */ k.jsx(Pf, { delay: 200, theme: i }),
12656
- /* @__PURE__ */ k.jsx(Pf, { delay: 400, theme: i })
12657
+ /* @__PURE__ */ W.jsxs(Xv, { children: [
12658
+ /* @__PURE__ */ W.jsx(Pf, { delay: 0, theme: i }),
12659
+ /* @__PURE__ */ W.jsx(Pf, { delay: 200, theme: i }),
12660
+ /* @__PURE__ */ W.jsx(Pf, { delay: 400, theme: i })
12657
12661
  ] })
12658
12662
  ] }) }) });
12659
12663
  }, Zv = yt.div`
@@ -12694,9 +12698,9 @@ const yv = [
12694
12698
  const { messages: i, isTyping: f, streamingStatus: o, theme: r } = Va(), y = X.useRef(null);
12695
12699
  return X.useEffect(() => {
12696
12700
  y.current && (y.current.scrollTop = y.current.scrollHeight);
12697
- }, [i, f]), /* @__PURE__ */ k.jsx(Zv, { ref: y, fontFamily: r.fontFamily, children: i.length === 0 && !f ? /* @__PURE__ */ k.jsx(wv, { color: r.colors.textLight, children: "Send a message to start the conversation" }) : /* @__PURE__ */ k.jsxs(k.Fragment, { children: [
12698
- i.map((p) => /* @__PURE__ */ k.jsx(jv, { message: p, theme: r }, p.id)),
12699
- f && /* @__PURE__ */ k.jsx(Lv, { theme: r, status: o })
12701
+ }, [i, f]), /* @__PURE__ */ W.jsx(Zv, { ref: y, fontFamily: r.fontFamily, children: i.length === 0 && !f ? /* @__PURE__ */ W.jsx(wv, { color: r.colors.textLight, children: "Send a message to start the conversation" }) : /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
12702
+ i.map((p) => /* @__PURE__ */ W.jsx(jv, { message: p, theme: r }, p.id)),
12703
+ f && /* @__PURE__ */ W.jsx(Lv, { theme: r, status: o })
12700
12704
  ] }) });
12701
12705
  }, Kv = (i = {}) => {
12702
12706
  const { onTranscript: f, onError: o, language: r = "en-US" } = i, [y, p] = X.useState(!1), [_, M] = X.useState(""), [A, g] = X.useState(!1), R = X.useRef(null);
@@ -12711,12 +12715,12 @@ const yv = [
12711
12715
  M(""), R.current.onstart = () => {
12712
12716
  p(!0);
12713
12717
  }, R.current.onresult = (H) => {
12714
- let V = "", Y = "";
12718
+ let V = "", B = "";
12715
12719
  for (let K = H.resultIndex; K < H.results.length; K++) {
12716
12720
  const nt = H.results[K];
12717
- nt.isFinal ? V += nt[0].transcript : Y += nt[0].transcript;
12721
+ nt.isFinal ? V += nt[0].transcript : B += nt[0].transcript;
12718
12722
  }
12719
- M(V || Y), V && f && f(V);
12723
+ M(V || B), V && f && f(V);
12720
12724
  }, R.current.onerror = (H) => {
12721
12725
  p(!1), o && o(H.error);
12722
12726
  }, R.current.onend = () => {
@@ -12728,11 +12732,11 @@ const yv = [
12728
12732
  o && o("Failed to start recording");
12729
12733
  }
12730
12734
  }
12731
- }, [y, f, o]), B = X.useCallback(() => {
12735
+ }, [y, f, o]), Y = X.useCallback(() => {
12732
12736
  R.current && y && (R.current.stop(), p(!1));
12733
12737
  }, [y]), P = X.useCallback(() => {
12734
- y ? B() : U();
12735
- }, [y, U, B]), w = X.useCallback(() => {
12738
+ y ? Y() : U();
12739
+ }, [y, U, Y]), w = X.useCallback(() => {
12736
12740
  M("");
12737
12741
  }, []);
12738
12742
  return {
@@ -12740,7 +12744,7 @@ const yv = [
12740
12744
  isSupported: A,
12741
12745
  transcript: _,
12742
12746
  startRecording: U,
12743
- stopRecording: B,
12747
+ stopRecording: Y,
12744
12748
  toggleRecording: P,
12745
12749
  clearTranscript: w
12746
12750
  };
@@ -12839,7 +12843,7 @@ const yv = [
12839
12843
  }, [A]);
12840
12844
  const U = X.useCallback(() => {
12841
12845
  y.trim() && !f && (i(y), p(""), R());
12842
- }, [y, f, i, R]), B = X.useCallback(
12846
+ }, [y, f, i, R]), Y = X.useCallback(
12843
12847
  (H) => {
12844
12848
  H.key === "Enter" && !H.shiftKey && (H.preventDefault(), U());
12845
12849
  },
@@ -12847,21 +12851,21 @@ const yv = [
12847
12851
  ), P = X.useCallback(() => {
12848
12852
  g();
12849
12853
  }, [g]), w = f || !y.trim();
12850
- return /* @__PURE__ */ k.jsxs(Jv, { theme: r, children: [
12851
- /* @__PURE__ */ k.jsx(
12854
+ return /* @__PURE__ */ W.jsxs(Jv, { theme: r, children: [
12855
+ /* @__PURE__ */ W.jsx(
12852
12856
  $v,
12853
12857
  {
12854
12858
  theme: r,
12855
12859
  type: "text",
12856
12860
  value: y,
12857
12861
  onChange: (H) => p(H.target.value),
12858
- onKeyDown: B,
12862
+ onKeyDown: Y,
12859
12863
  placeholder: _ ? "Listening..." : o.placeholder || "Type a message...",
12860
12864
  disabled: f,
12861
12865
  "aria-label": "Message input"
12862
12866
  }
12863
12867
  ),
12864
- M && /* @__PURE__ */ k.jsx(
12868
+ M && /* @__PURE__ */ W.jsx(
12865
12869
  Fv,
12866
12870
  {
12867
12871
  theme: r,
@@ -12869,17 +12873,17 @@ const yv = [
12869
12873
  isRecording: _,
12870
12874
  "aria-label": _ ? "Stop recording" : "Start voice recording",
12871
12875
  title: _ ? "Stop recording" : "Start voice recording",
12872
- children: /* @__PURE__ */ k.jsx(fv, { size: 18 })
12876
+ children: /* @__PURE__ */ W.jsx(fv, { size: 18 })
12873
12877
  }
12874
12878
  ),
12875
- /* @__PURE__ */ k.jsx(
12879
+ /* @__PURE__ */ W.jsx(
12876
12880
  kv,
12877
12881
  {
12878
12882
  theme: r,
12879
12883
  onClick: U,
12880
12884
  disabled: w,
12881
12885
  "aria-label": "Send message",
12882
- children: /* @__PURE__ */ k.jsx(dv, { size: 18 })
12886
+ children: /* @__PURE__ */ W.jsx(dv, { size: 18 })
12883
12887
  }
12884
12888
  )
12885
12889
  ] });
@@ -12984,16 +12988,16 @@ const yv = [
12984
12988
  }
12985
12989
  `, ig = () => {
12986
12990
  const { isOpen: i, toggle: f, config: o, theme: r } = Va(), y = o.embedMode ?? !1;
12987
- return /* @__PURE__ */ k.jsxs(k.Fragment, { children: [
12988
- /* @__PURE__ */ k.jsx(q1, { styles: ug(r) }),
12989
- /* @__PURE__ */ k.jsxs(
12991
+ return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
12992
+ /* @__PURE__ */ W.jsx(q1, { styles: ug(r) }),
12993
+ /* @__PURE__ */ W.jsxs(
12990
12994
  eg,
12991
12995
  {
12992
12996
  className: "chatbot-widget-container",
12993
12997
  position: o.position || "bottom-right",
12994
12998
  embedMode: y,
12995
12999
  children: [
12996
- !y && /* @__PURE__ */ k.jsx(
13000
+ !y && /* @__PURE__ */ W.jsx(
12997
13001
  lg,
12998
13002
  {
12999
13003
  theme: r,
@@ -13002,14 +13006,14 @@ const yv = [
13002
13006
  onClick: f,
13003
13007
  "aria-label": "Open chat",
13004
13008
  "aria-expanded": i,
13005
- children: o.fabIcon ? /* @__PURE__ */ k.jsx(ag, { src: o.fabIcon, alt: "Chat" }) : /* @__PURE__ */ k.jsx(iv, { size: 24 })
13009
+ children: o.fabIcon ? /* @__PURE__ */ W.jsx(ag, { src: o.fabIcon, alt: "Chat" }) : /* @__PURE__ */ W.jsx(iv, { size: 24 })
13006
13010
  }
13007
13011
  ),
13008
- /* @__PURE__ */ k.jsxs(ng, { theme: r, isOpen: i, isClosing: !1, embedMode: y, children: [
13009
- /* @__PURE__ */ k.jsx(Av, {}),
13010
- /* @__PURE__ */ k.jsx(Ov, {}),
13011
- /* @__PURE__ */ k.jsx(Vv, {}),
13012
- /* @__PURE__ */ k.jsx(Iv, {})
13012
+ /* @__PURE__ */ W.jsxs(ng, { theme: r, isOpen: i, isClosing: !1, embedMode: y, children: [
13013
+ /* @__PURE__ */ W.jsx(Av, {}),
13014
+ /* @__PURE__ */ W.jsx(Ov, {}),
13015
+ /* @__PURE__ */ W.jsx(Vv, {}),
13016
+ /* @__PURE__ */ W.jsx(Iv, {})
13013
13017
  ] })
13014
13018
  ]
13015
13019
  }
@@ -13044,13 +13048,13 @@ const dl = {
13044
13048
  }, fg = ({
13045
13049
  config: i,
13046
13050
  onMount: f
13047
- }) => /* @__PURE__ */ k.jsx(Kh, { config: i, children: /* @__PURE__ */ k.jsx(rg, { onMount: f }) }), rg = ({
13051
+ }) => /* @__PURE__ */ W.jsx(Kh, { config: i, children: /* @__PURE__ */ W.jsx(rg, { onMount: f }) }), rg = ({
13048
13052
  onMount: i
13049
13053
  }) => {
13050
13054
  const { open: f, close: o, toggle: r } = Va();
13051
13055
  return X.useEffect(() => {
13052
13056
  i({ open: f, close: o, toggle: r });
13053
- }, [f, o, r, i]), /* @__PURE__ */ k.jsx(ig, {});
13057
+ }, [f, o, r, i]), /* @__PURE__ */ W.jsx(ig, {});
13054
13058
  }, sg = {
13055
13059
  init: (i) => {
13056
13060
  if (Qa) {
@@ -13079,7 +13083,7 @@ const dl = {
13079
13083
  } else
13080
13084
  Ze = document.createElement("div"), Ze.id = "chatbot-widget-root", document.body.appendChild(Ze), mi = !1;
13081
13085
  Qa = Gh.createRoot(Ze), Qa.render(
13082
- /* @__PURE__ */ k.jsx(
13086
+ /* @__PURE__ */ W.jsx(
13083
13087
  fg,
13084
13088
  {
13085
13089
  config: f,