flowdit-chatbot-library 1.3.8 → 1.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  var js = Object.defineProperty;
2
- var ys = (r, t, n) => t in r ? js(r, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[t] = n;
3
- var F = (r, t, n) => ys(r, typeof t != "symbol" ? t + "" : t, n);
4
- import S from "react";
5
- var ye = { exports: {} }, ee = {};
2
+ var ys = (n, t, r) => t in n ? js(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
3
+ var F = (n, t, r) => ys(n, typeof t != "symbol" ? t + "" : t, r);
4
+ import R from "react";
5
+ var ke = { exports: {} }, ee = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.min.js
@@ -12,11 +12,11 @@ var ye = { exports: {} }, ee = {};
12
12
  * This source code is licensed under the MIT license found in the
13
13
  * LICENSE file in the root directory of this source tree.
14
14
  */
15
- var We;
15
+ var Fe;
16
16
  function ws() {
17
- if (We) return ee;
18
- We = 1;
19
- var r = S, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, i = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
17
+ if (Fe) return ee;
18
+ Fe = 1;
19
+ var n = R, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, i = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
20
20
  function f(x, m, j) {
21
21
  var g, y = {}, v = null, l = null;
22
22
  j !== void 0 && (v = "" + j), m.key !== void 0 && (v = "" + m.key), m.ref !== void 0 && (l = m.ref);
@@ -24,7 +24,7 @@ function ws() {
24
24
  if (x && x.defaultProps) for (g in m = x.defaultProps, m) y[g] === void 0 && (y[g] = m[g]);
25
25
  return { $$typeof: t, type: x, key: v, ref: l, props: y, _owner: i.current };
26
26
  }
27
- return ee.Fragment = n, ee.jsx = f, ee.jsxs = f, ee;
27
+ return ee.Fragment = r, ee.jsx = f, ee.jsxs = f, ee;
28
28
  }
29
29
  var se = {};
30
30
  /**
@@ -36,25 +36,25 @@ var se = {};
36
36
  * This source code is licensed under the MIT license found in the
37
37
  * LICENSE file in the root directory of this source tree.
38
38
  */
39
- var De;
39
+ var Le;
40
40
  function ks() {
41
- return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
42
- var r = S, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), x = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), u = Symbol.iterator, N = "@@iterator";
41
+ return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() {
42
+ var n = R, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), x = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), g = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), v = Symbol.for("react.lazy"), l = Symbol.for("react.offscreen"), u = Symbol.iterator, N = "@@iterator";
43
43
  function h(s) {
44
44
  if (s === null || typeof s != "object")
45
45
  return null;
46
46
  var a = u && s[u] || s[N];
47
47
  return typeof a == "function" ? a : null;
48
48
  }
49
- var b = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
49
+ var b = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
50
50
  function C(s) {
51
51
  {
52
52
  for (var a = arguments.length, c = new Array(a > 1 ? a - 1 : 0), p = 1; p < a; p++)
53
53
  c[p - 1] = arguments[p];
54
- R("error", s, c);
54
+ _("error", s, c);
55
55
  }
56
56
  }
57
- function R(s, a, c) {
57
+ function _(s, a, c) {
58
58
  {
59
59
  var p = b.ReactDebugCurrentFrame, T = p.getStackAddendum();
60
60
  T !== "" && (a += "%s", c = c.concat([T]));
@@ -64,14 +64,14 @@ function ks() {
64
64
  E.unshift("Warning: " + a), Function.prototype.apply.call(console[s], console, E);
65
65
  }
66
66
  }
67
- var A = !1, D = !1, L = !1, V = !1, U = !1, K;
68
- K = Symbol.for("react.module.reference");
69
- function P(s) {
70
- return !!(typeof s == "string" || typeof s == "function" || s === o || s === d || U || s === i || s === j || s === g || V || s === l || A || D || L || typeof s == "object" && s !== null && (s.$$typeof === v || s.$$typeof === y || s.$$typeof === f || s.$$typeof === x || s.$$typeof === m || // This needs to include all possible module reference object
67
+ var A = !1, W = !1, H = !1, G = !1, z = !1, U;
68
+ U = Symbol.for("react.module.reference");
69
+ function D(s) {
70
+ return !!(typeof s == "string" || typeof s == "function" || s === o || s === d || z || s === i || s === j || s === g || G || s === l || A || W || H || typeof s == "object" && s !== null && (s.$$typeof === v || s.$$typeof === y || s.$$typeof === f || s.$$typeof === x || s.$$typeof === m || // This needs to include all possible module reference object
71
71
  // types supported by any Flight configuration anywhere since
72
72
  // we don't know which Flight build this will end up being used
73
73
  // with.
74
- s.$$typeof === K || s.getModuleId !== void 0));
74
+ s.$$typeof === U || s.getModuleId !== void 0));
75
75
  }
76
76
  function X(s, a, c) {
77
77
  var p = s.displayName;
@@ -80,10 +80,10 @@ function ks() {
80
80
  var T = a.displayName || a.name || "";
81
81
  return T !== "" ? c + "(" + T + ")" : c;
82
82
  }
83
- function H(s) {
83
+ function L(s) {
84
84
  return s.displayName || "Context";
85
85
  }
86
- function B(s) {
86
+ function I(s) {
87
87
  if (s == null)
88
88
  return null;
89
89
  if (typeof s.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
@@ -93,7 +93,7 @@ function ks() {
93
93
  switch (s) {
94
94
  case o:
95
95
  return "Fragment";
96
- case n:
96
+ case r:
97
97
  return "Portal";
98
98
  case d:
99
99
  return "Profiler";
@@ -108,19 +108,19 @@ function ks() {
108
108
  switch (s.$$typeof) {
109
109
  case x:
110
110
  var a = s;
111
- return H(a) + ".Consumer";
111
+ return L(a) + ".Consumer";
112
112
  case f:
113
113
  var c = s;
114
- return H(c._context) + ".Provider";
114
+ return L(c._context) + ".Provider";
115
115
  case m:
116
116
  return X(s, s.render, "ForwardRef");
117
117
  case y:
118
118
  var p = s.displayName || null;
119
- return p !== null ? p : B(s.type) || "Memo";
119
+ return p !== null ? p : I(s.type) || "Memo";
120
120
  case v: {
121
121
  var T = s, E = T._payload, k = T._init;
122
122
  try {
123
- return B(k(E));
123
+ return I(k(E));
124
124
  } catch {
125
125
  return null;
126
126
  }
@@ -128,18 +128,18 @@ function ks() {
128
128
  }
129
129
  return null;
130
130
  }
131
- var J = Object.assign, Y = 0, te, ne, re, ie, ae, oe, $;
132
- function z() {
131
+ var J = Object.assign, Y = 0, te, ne, re, ie, ae, oe, le;
132
+ function ce() {
133
133
  }
134
- z.__reactDisabledLog = !0;
135
- function Ye() {
134
+ ce.__reactDisabledLog = !0;
135
+ function S() {
136
136
  {
137
137
  if (Y === 0) {
138
- te = console.log, ne = console.info, re = console.warn, ie = console.error, ae = console.group, oe = console.groupCollapsed, $ = console.groupEnd;
138
+ te = console.log, ne = console.info, re = console.warn, ie = console.error, ae = console.group, oe = console.groupCollapsed, le = console.groupEnd;
139
139
  var s = {
140
140
  configurable: !0,
141
141
  enumerable: !0,
142
- value: z,
142
+ value: ce,
143
143
  writable: !0
144
144
  };
145
145
  Object.defineProperties(console, {
@@ -155,7 +155,7 @@ function ks() {
155
155
  Y++;
156
156
  }
157
157
  }
158
- function qe() {
158
+ function V() {
159
159
  {
160
160
  if (Y--, Y === 0) {
161
161
  var s = {
@@ -183,46 +183,46 @@ function ks() {
183
183
  value: oe
184
184
  }),
185
185
  groupEnd: J({}, s, {
186
- value: $
186
+ value: le
187
187
  })
188
188
  });
189
189
  }
190
190
  Y < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
191
191
  }
192
192
  }
193
- var fe = b.ReactCurrentDispatcher, xe;
194
- function le(s, a, c) {
193
+ var me = b.ReactCurrentDispatcher, ge;
194
+ function de(s, a, c) {
195
195
  {
196
- if (xe === void 0)
196
+ if (ge === void 0)
197
197
  try {
198
198
  throw Error();
199
199
  } catch (T) {
200
200
  var p = T.stack.trim().match(/\n( *(at )?)/);
201
- xe = p && p[1] || "";
201
+ ge = p && p[1] || "";
202
202
  }
203
203
  return `
204
- ` + xe + s;
204
+ ` + ge + s;
205
205
  }
206
206
  }
207
- var me = !1, ce;
207
+ var ve = !1, ue;
208
208
  {
209
209
  var Ke = typeof WeakMap == "function" ? WeakMap : Map;
210
- ce = new Ke();
210
+ ue = new Ke();
211
211
  }
212
- function ke(s, a) {
213
- if (!s || me)
212
+ function Ce(s, a) {
213
+ if (!s || ve)
214
214
  return "";
215
215
  {
216
- var c = ce.get(s);
216
+ var c = ue.get(s);
217
217
  if (c !== void 0)
218
218
  return c;
219
219
  }
220
220
  var p;
221
- me = !0;
221
+ ve = !0;
222
222
  var T = Error.prepareStackTrace;
223
223
  Error.prepareStackTrace = void 0;
224
224
  var E;
225
- E = fe.current, fe.current = null, Ye();
225
+ E = me.current, me.current = null, S();
226
226
  try {
227
227
  if (a) {
228
228
  var k = function() {
@@ -235,94 +235,94 @@ function ks() {
235
235
  }), typeof Reflect == "object" && Reflect.construct) {
236
236
  try {
237
237
  Reflect.construct(k, []);
238
- } catch (I) {
239
- p = I;
238
+ } catch (M) {
239
+ p = M;
240
240
  }
241
241
  Reflect.construct(s, [], k);
242
242
  } else {
243
243
  try {
244
244
  k.call();
245
- } catch (I) {
246
- p = I;
245
+ } catch (M) {
246
+ p = M;
247
247
  }
248
248
  s.call(k.prototype);
249
249
  }
250
250
  } else {
251
251
  try {
252
252
  throw Error();
253
- } catch (I) {
254
- p = I;
253
+ } catch (M) {
254
+ p = M;
255
255
  }
256
256
  s();
257
257
  }
258
- } catch (I) {
259
- if (I && p && typeof I.stack == "string") {
260
- for (var w = I.stack.split(`
261
- `), M = p.stack.split(`
262
- `), _ = w.length - 1, O = M.length - 1; _ >= 1 && O >= 0 && w[_] !== M[O]; )
263
- O--;
264
- for (; _ >= 1 && O >= 0; _--, O--)
265
- if (w[_] !== M[O]) {
266
- if (_ !== 1 || O !== 1)
258
+ } catch (M) {
259
+ if (M && p && typeof M.stack == "string") {
260
+ for (var w = M.stack.split(`
261
+ `), P = p.stack.split(`
262
+ `), O = w.length - 1, $ = P.length - 1; O >= 1 && $ >= 0 && w[O] !== P[$]; )
263
+ $--;
264
+ for (; O >= 1 && $ >= 0; O--, $--)
265
+ if (w[O] !== P[$]) {
266
+ if (O !== 1 || $ !== 1)
267
267
  do
268
- if (_--, O--, O < 0 || w[_] !== M[O]) {
269
- var W = `
270
- ` + w[_].replace(" at new ", " at ");
271
- return s.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", s.displayName)), typeof s == "function" && ce.set(s, W), W;
268
+ if (O--, $--, $ < 0 || w[O] !== P[$]) {
269
+ var B = `
270
+ ` + w[O].replace(" at new ", " at ");
271
+ return s.displayName && B.includes("<anonymous>") && (B = B.replace("<anonymous>", s.displayName)), typeof s == "function" && ue.set(s, B), B;
272
272
  }
273
- while (_ >= 1 && O >= 0);
273
+ while (O >= 1 && $ >= 0);
274
274
  break;
275
275
  }
276
276
  }
277
277
  } finally {
278
- me = !1, fe.current = E, qe(), Error.prepareStackTrace = T;
278
+ ve = !1, me.current = E, V(), Error.prepareStackTrace = T;
279
279
  }
280
- var G = s ? s.displayName || s.name : "", q = G ? le(G) : "";
281
- return typeof s == "function" && ce.set(s, q), q;
280
+ var Q = s ? s.displayName || s.name : "", q = Q ? de(Q) : "";
281
+ return typeof s == "function" && ue.set(s, q), q;
282
282
  }
283
283
  function Qe(s, a, c) {
284
- return ke(s, !1);
284
+ return Ce(s, !1);
285
285
  }
286
286
  function Ge(s) {
287
287
  var a = s.prototype;
288
288
  return !!(a && a.isReactComponent);
289
289
  }
290
- function de(s, a, c) {
290
+ function he(s, a, c) {
291
291
  if (s == null)
292
292
  return "";
293
293
  if (typeof s == "function")
294
- return ke(s, Ge(s));
294
+ return Ce(s, Ge(s));
295
295
  if (typeof s == "string")
296
- return le(s);
296
+ return de(s);
297
297
  switch (s) {
298
298
  case j:
299
- return le("Suspense");
299
+ return de("Suspense");
300
300
  case g:
301
- return le("SuspenseList");
301
+ return de("SuspenseList");
302
302
  }
303
303
  if (typeof s == "object")
304
304
  switch (s.$$typeof) {
305
305
  case m:
306
306
  return Qe(s.render);
307
307
  case y:
308
- return de(s.type, a, c);
308
+ return he(s.type, a, c);
309
309
  case v: {
310
310
  var p = s, T = p._payload, E = p._init;
311
311
  try {
312
- return de(E(T), a, c);
312
+ return he(E(T), a, c);
313
313
  } catch {
314
314
  }
315
315
  }
316
316
  }
317
317
  return "";
318
318
  }
319
- var Z = Object.prototype.hasOwnProperty, Ne = {}, Ce = b.ReactDebugCurrentFrame;
320
- function ue(s) {
319
+ var Z = Object.prototype.hasOwnProperty, Te = {}, Ee = b.ReactDebugCurrentFrame;
320
+ function fe(s) {
321
321
  if (s) {
322
- var a = s._owner, c = de(s.type, s._source, a ? a.type : null);
323
- Ce.setExtraStackFrame(c);
322
+ var a = s._owner, c = he(s.type, s._source, a ? a.type : null);
323
+ Ee.setExtraStackFrame(c);
324
324
  } else
325
- Ce.setExtraStackFrame(null);
325
+ Ee.setExtraStackFrame(null);
326
326
  }
327
327
  function Xe(s, a, c, p, T) {
328
328
  {
@@ -332,19 +332,19 @@ function ks() {
332
332
  var w = void 0;
333
333
  try {
334
334
  if (typeof s[k] != "function") {
335
- var M = Error((p || "React class") + ": " + c + " type `" + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[k] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
336
- throw M.name = "Invariant Violation", M;
335
+ var P = Error((p || "React class") + ": " + c + " type `" + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[k] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
336
+ throw P.name = "Invariant Violation", P;
337
337
  }
338
338
  w = s[k](a, k, p, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
339
- } catch (_) {
340
- w = _;
339
+ } catch (O) {
340
+ w = O;
341
341
  }
342
- w && !(w instanceof Error) && (ue(T), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", c, k, typeof w), ue(null)), w instanceof Error && !(w.message in Ne) && (Ne[w.message] = !0, ue(T), C("Failed %s type: %s", c, w.message), ue(null));
342
+ w && !(w instanceof Error) && (fe(T), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", p || "React class", c, k, typeof w), fe(null)), w instanceof Error && !(w.message in Te) && (Te[w.message] = !0, fe(T), C("Failed %s type: %s", c, w.message), fe(null));
343
343
  }
344
344
  }
345
345
  }
346
346
  var Ze = Array.isArray;
347
- function ge(s) {
347
+ function pe(s) {
348
348
  return Ze(s);
349
349
  }
350
350
  function es(s) {
@@ -355,24 +355,24 @@ function ks() {
355
355
  }
356
356
  function ss(s) {
357
357
  try {
358
- return Te(s), !1;
358
+ return Re(s), !1;
359
359
  } catch {
360
360
  return !0;
361
361
  }
362
362
  }
363
- function Te(s) {
363
+ function Re(s) {
364
364
  return "" + s;
365
365
  }
366
- function Ee(s) {
366
+ function _e(s) {
367
367
  if (ss(s))
368
- return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", es(s)), Te(s);
368
+ return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", es(s)), Re(s);
369
369
  }
370
- var Re = b.ReactCurrentOwner, ts = {
370
+ var Se = b.ReactCurrentOwner, ts = {
371
371
  key: !0,
372
372
  ref: !0,
373
373
  __self: !0,
374
374
  __source: !0
375
- }, _e, Se;
375
+ }, Oe, $e;
376
376
  function ns(s) {
377
377
  if (Z.call(s, "ref")) {
378
378
  var a = Object.getOwnPropertyDescriptor(s, "ref").get;
@@ -390,12 +390,12 @@ function ks() {
390
390
  return s.key !== void 0;
391
391
  }
392
392
  function is(s, a) {
393
- typeof s.ref == "string" && Re.current;
393
+ typeof s.ref == "string" && Se.current;
394
394
  }
395
395
  function as(s, a) {
396
396
  {
397
397
  var c = function() {
398
- _e || (_e = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
398
+ Oe || (Oe = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
399
399
  };
400
400
  c.isReactWarning = !0, Object.defineProperty(s, "key", {
401
401
  get: c,
@@ -406,7 +406,7 @@ function ks() {
406
406
  function os(s, a) {
407
407
  {
408
408
  var c = function() {
409
- Se || (Se = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
409
+ $e || ($e = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", a));
410
410
  };
411
411
  c.isReactWarning = !0, Object.defineProperty(s, "ref", {
412
412
  get: c,
@@ -445,39 +445,39 @@ function ks() {
445
445
  };
446
446
  function cs(s, a, c, p, T) {
447
447
  {
448
- var E, k = {}, w = null, M = null;
449
- c !== void 0 && (Ee(c), w = "" + c), rs(a) && (Ee(a.key), w = "" + a.key), ns(a) && (M = a.ref, is(a, T));
448
+ var E, k = {}, w = null, P = null;
449
+ c !== void 0 && (_e(c), w = "" + c), rs(a) && (_e(a.key), w = "" + a.key), ns(a) && (P = a.ref, is(a, T));
450
450
  for (E in a)
451
451
  Z.call(a, E) && !ts.hasOwnProperty(E) && (k[E] = a[E]);
452
452
  if (s && s.defaultProps) {
453
- var _ = s.defaultProps;
454
- for (E in _)
455
- k[E] === void 0 && (k[E] = _[E]);
453
+ var O = s.defaultProps;
454
+ for (E in O)
455
+ k[E] === void 0 && (k[E] = O[E]);
456
456
  }
457
- if (w || M) {
458
- var O = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
459
- w && as(k, O), M && os(k, O);
457
+ if (w || P) {
458
+ var $ = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
459
+ w && as(k, $), P && os(k, $);
460
460
  }
461
- return ls(s, w, M, T, p, Re.current, k);
461
+ return ls(s, w, P, T, p, Se.current, k);
462
462
  }
463
463
  }
464
- var ve = b.ReactCurrentOwner, Oe = b.ReactDebugCurrentFrame;
465
- function Q(s) {
464
+ var be = b.ReactCurrentOwner, Ae = b.ReactDebugCurrentFrame;
465
+ function K(s) {
466
466
  if (s) {
467
- var a = s._owner, c = de(s.type, s._source, a ? a.type : null);
468
- Oe.setExtraStackFrame(c);
467
+ var a = s._owner, c = he(s.type, s._source, a ? a.type : null);
468
+ Ae.setExtraStackFrame(c);
469
469
  } else
470
- Oe.setExtraStackFrame(null);
470
+ Ae.setExtraStackFrame(null);
471
471
  }
472
- var pe;
473
- pe = !1;
474
- function be(s) {
472
+ var je;
473
+ je = !1;
474
+ function ye(s) {
475
475
  return typeof s == "object" && s !== null && s.$$typeof === t;
476
476
  }
477
- function $e() {
477
+ function Pe() {
478
478
  {
479
- if (ve.current) {
480
- var s = B(ve.current.type);
479
+ if (be.current) {
480
+ var s = I(be.current.type);
481
481
  if (s)
482
482
  return `
483
483
 
@@ -489,10 +489,10 @@ Check the render method of \`` + s + "`.";
489
489
  function ds(s) {
490
490
  return "";
491
491
  }
492
- var Ae = {};
492
+ var Me = {};
493
493
  function us(s) {
494
494
  {
495
- var a = $e();
495
+ var a = Pe();
496
496
  if (!a) {
497
497
  var c = typeof s == "string" ? s : s.displayName || s.name;
498
498
  c && (a = `
@@ -502,35 +502,35 @@ Check the top-level render call using <` + c + ">.");
502
502
  return a;
503
503
  }
504
504
  }
505
- function Pe(s, a) {
505
+ function Ie(s, a) {
506
506
  {
507
507
  if (!s._store || s._store.validated || s.key != null)
508
508
  return;
509
509
  s._store.validated = !0;
510
510
  var c = us(a);
511
- if (Ae[c])
511
+ if (Me[c])
512
512
  return;
513
- Ae[c] = !0;
513
+ Me[c] = !0;
514
514
  var p = "";
515
- s && s._owner && s._owner !== ve.current && (p = " It was passed a child from " + B(s._owner.type) + "."), Q(s), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, p), Q(null);
515
+ s && s._owner && s._owner !== be.current && (p = " It was passed a child from " + I(s._owner.type) + "."), K(s), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, p), K(null);
516
516
  }
517
517
  }
518
- function Me(s, a) {
518
+ function Be(s, a) {
519
519
  {
520
520
  if (typeof s != "object")
521
521
  return;
522
- if (ge(s))
522
+ if (pe(s))
523
523
  for (var c = 0; c < s.length; c++) {
524
524
  var p = s[c];
525
- be(p) && Pe(p, a);
525
+ ye(p) && Ie(p, a);
526
526
  }
527
- else if (be(s))
527
+ else if (ye(s))
528
528
  s._store && (s._store.validated = !0);
529
529
  else if (s) {
530
530
  var T = h(s);
531
531
  if (typeof T == "function" && T !== s.entries)
532
532
  for (var E = T.call(s), k; !(k = E.next()).done; )
533
- be(k.value) && Pe(k.value, a);
533
+ ye(k.value) && Ie(k.value, a);
534
534
  }
535
535
  }
536
536
  }
@@ -549,11 +549,11 @@ Check the top-level render call using <` + c + ">.");
549
549
  else
550
550
  return;
551
551
  if (c) {
552
- var p = B(a);
552
+ var p = I(a);
553
553
  Xe(c, s.props, "prop", p, s);
554
- } else if (a.PropTypes !== void 0 && !pe) {
555
- pe = !0;
556
- var T = B(a);
554
+ } else if (a.PropTypes !== void 0 && !je) {
555
+ je = !0;
556
+ var T = I(a);
557
557
  C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", T || "Unknown");
558
558
  }
559
559
  typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
@@ -564,74 +564,74 @@ Check the top-level render call using <` + c + ">.");
564
564
  for (var a = Object.keys(s.props), c = 0; c < a.length; c++) {
565
565
  var p = a[c];
566
566
  if (p !== "children" && p !== "key") {
567
- Q(s), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), Q(null);
567
+ K(s), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", p), K(null);
568
568
  break;
569
569
  }
570
570
  }
571
- s.ref !== null && (Q(s), C("Invalid attribute `ref` supplied to `React.Fragment`."), Q(null));
571
+ s.ref !== null && (K(s), C("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
572
572
  }
573
573
  }
574
- var Ie = {};
575
- function Be(s, a, c, p, T, E) {
574
+ var We = {};
575
+ function De(s, a, c, p, T, E) {
576
576
  {
577
- var k = P(s);
577
+ var k = D(s);
578
578
  if (!k) {
579
579
  var w = "";
580
580
  (s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
581
- var M = ds();
582
- M ? w += M : w += $e();
583
- var _;
584
- s === null ? _ = "null" : ge(s) ? _ = "array" : s !== void 0 && s.$$typeof === t ? (_ = "<" + (B(s.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : _ = typeof s, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", _, w);
581
+ var P = ds();
582
+ P ? w += P : w += Pe();
583
+ var O;
584
+ s === null ? O = "null" : pe(s) ? O = "array" : s !== void 0 && s.$$typeof === t ? (O = "<" + (I(s.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : O = typeof s, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", O, w);
585
585
  }
586
- var O = cs(s, a, c, T, E);
587
- if (O == null)
588
- return O;
586
+ var $ = cs(s, a, c, T, E);
587
+ if ($ == null)
588
+ return $;
589
589
  if (k) {
590
- var W = a.children;
591
- if (W !== void 0)
590
+ var B = a.children;
591
+ if (B !== void 0)
592
592
  if (p)
593
- if (ge(W)) {
594
- for (var G = 0; G < W.length; G++)
595
- Me(W[G], s);
596
- Object.freeze && Object.freeze(W);
593
+ if (pe(B)) {
594
+ for (var Q = 0; Q < B.length; Q++)
595
+ Be(B[Q], s);
596
+ Object.freeze && Object.freeze(B);
597
597
  } else
598
598
  C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
599
599
  else
600
- Me(W, s);
600
+ Be(B, s);
601
601
  }
602
602
  if (Z.call(a, "key")) {
603
- var q = B(s), I = Object.keys(a).filter(function(bs) {
603
+ var q = I(s), M = Object.keys(a).filter(function(bs) {
604
604
  return bs !== "key";
605
- }), je = I.length > 0 ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}";
606
- if (!Ie[q + je]) {
607
- var ps = I.length > 0 ? "{" + I.join(": ..., ") + ": ...}" : "{}";
605
+ }), we = M.length > 0 ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}";
606
+ if (!We[q + we]) {
607
+ var ps = M.length > 0 ? "{" + M.join(": ..., ") + ": ...}" : "{}";
608
608
  C(`A props object containing a "key" prop is being spread into JSX:
609
609
  let props = %s;
610
610
  <%s {...props} />
611
611
  React keys must be passed directly to JSX without using spread:
612
612
  let props = %s;
613
- <%s key={someKey} {...props} />`, je, q, ps, q), Ie[q + je] = !0;
613
+ <%s key={someKey} {...props} />`, we, q, ps, q), We[q + we] = !0;
614
614
  }
615
615
  }
616
- return s === o ? fs(O) : hs(O), O;
616
+ return s === o ? fs($) : hs($), $;
617
617
  }
618
618
  }
619
619
  function xs(s, a, c) {
620
- return Be(s, a, c, !0);
620
+ return De(s, a, c, !0);
621
621
  }
622
622
  function ms(s, a, c) {
623
- return Be(s, a, c, !1);
623
+ return De(s, a, c, !1);
624
624
  }
625
625
  var gs = ms, vs = xs;
626
626
  se.Fragment = o, se.jsx = gs, se.jsxs = vs;
627
627
  }()), se;
628
628
  }
629
- process.env.NODE_ENV === "production" ? ye.exports = ws() : ye.exports = ks();
630
- var e = ye.exports;
631
- const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-chat-launcher", onClick: r, children: /* @__PURE__ */ e.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) }) }), { useState: he, useEffect: Cs, useRef: Fe, useLayoutEffect: Le } = S, Ts = ({
632
- mode: r = "floating",
629
+ process.env.NODE_ENV === "production" ? ke.exports = ws() : ke.exports = ks();
630
+ var e = ke.exports;
631
+ const Ns = ({ onClick: n }) => /* @__PURE__ */ e.jsx("button", { className: "cb-chat-launcher", onClick: n, children: /* @__PURE__ */ e.jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) }) }), { useState: xe, useEffect: Cs, useRef: Je, useLayoutEffect: ze } = R, Ts = ({
632
+ mode: n = "floating",
633
633
  isOpen: t = !0,
634
- embedded: n = !1,
634
+ embedded: r = !1,
635
635
  onClose: o,
636
636
  onOpen: i,
637
637
  children: d,
@@ -641,37 +641,37 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
641
641
  onDrawerOpenChange: j,
642
642
  headerActions: g
643
643
  }) => {
644
- const [y, v] = he(!1), [l, u] = he(!1), N = m !== void 0 ? m : l, h = (P) => {
645
- u(P), j == null || j(P);
646
- }, [b, C] = he(!1), R = Fe(null), [A, D] = he(!0);
644
+ const [y, v] = xe(!1), [l, u] = xe(!1), N = m !== void 0 ? m : l, h = (D) => {
645
+ u(D), j == null || j(D);
646
+ }, [b, C] = xe(!1), _ = Je(null), [A, W] = xe(!0);
647
647
  Cs(() => {
648
648
  v(!0);
649
649
  }, []);
650
- const L = () => {
651
- R.current && (R.current.scrollTop = R.current.scrollHeight);
652
- }, V = () => {
653
- if (!R.current) return;
654
- const { scrollTop: P, scrollHeight: X, clientHeight: H } = R.current, B = X - P - H;
655
- C(B > 100), D(B < 50);
656
- }, U = Fe(null);
657
- if (Le(() => {
658
- A && L();
659
- }, [d, A]), Le(() => {
660
- if (!U.current) return;
661
- const P = new ResizeObserver(() => {
662
- A && L();
650
+ const H = () => {
651
+ _.current && (_.current.scrollTop = _.current.scrollHeight);
652
+ }, G = () => {
653
+ if (!_.current) return;
654
+ const { scrollTop: D, scrollHeight: X, clientHeight: L } = _.current, I = X - D - L;
655
+ C(I > 100), W(I < 50);
656
+ }, z = Je(null);
657
+ if (ze(() => {
658
+ A && H();
659
+ }, [d, A]), ze(() => {
660
+ if (!z.current) return;
661
+ const D = new ResizeObserver(() => {
662
+ A && H();
663
663
  });
664
- return P.observe(U.current), () => P.disconnect();
664
+ return D.observe(z.current), () => D.disconnect();
665
665
  }, [A]), !y) return null;
666
- if (!t && r === "floating" && !n)
666
+ if (!t && n === "floating" && !r)
667
667
  return /* @__PURE__ */ e.jsx(Ns, { onClick: () => i == null ? void 0 : i() });
668
- const K = [
668
+ const U = [
669
669
  "cb-chat-container",
670
- `cb-mode-${r}`,
670
+ `cb-mode-${n}`,
671
671
  t ? "cb-open" : "cb-closed",
672
- n ? "cb-embedded" : null
672
+ r ? "cb-embedded" : null
673
673
  ].filter(Boolean).join(" ");
674
- return /* @__PURE__ */ e.jsxs("div", { className: K, children: [
674
+ return /* @__PURE__ */ e.jsxs("div", { className: U, children: [
675
675
  /* @__PURE__ */ e.jsxs("div", { className: "cb-chat-header", children: [
676
676
  /* @__PURE__ */ e.jsxs("div", { className: "cb-header-left", children: [
677
677
  /* @__PURE__ */ e.jsx("button", { className: "cb-header-btn", onClick: () => h(!N), children: /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
@@ -697,16 +697,16 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
697
697
  "div",
698
698
  {
699
699
  className: "cb-scroll-view",
700
- ref: R,
701
- onScroll: V,
702
- children: /* @__PURE__ */ e.jsx("div", { ref: U, children: d })
700
+ ref: _,
701
+ onScroll: G,
702
+ children: /* @__PURE__ */ e.jsx("div", { ref: z, children: d })
703
703
  }
704
704
  ),
705
705
  /* @__PURE__ */ e.jsx(
706
706
  "button",
707
707
  {
708
708
  className: `cb-scroll-bottom-btn ${b ? "visible" : ""}`,
709
- onClick: L,
709
+ onClick: H,
710
710
  children: /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M12 5v14M19 12l-7 7-7-7" }) })
711
711
  }
712
712
  )
@@ -715,24 +715,24 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
715
715
  ] })
716
716
  ] })
717
717
  ] });
718
- }, { useState: Je } = S, Es = ({
719
- onClose: r,
718
+ }, { useState: Ve } = R, Es = ({
719
+ onClose: n,
720
720
  webSearchEnabled: t = !1,
721
- onWebSearchChange: n,
721
+ onWebSearchChange: r,
722
722
  pageContextEnabled: o = !1,
723
723
  onPageContextChange: i
724
724
  }) => {
725
- const [d, f] = Je("rovo"), [x, m] = Je({
725
+ const [d, f] = Ve("rovo"), [x, m] = Ve({
726
726
  knowledge: !0,
727
727
  autoApply: !0
728
728
  }), j = (v) => {
729
729
  m((l) => ({ ...l, [v]: !l[v] }));
730
730
  }, g = () => {
731
- n == null || n(!t);
731
+ r == null || r(!t);
732
732
  }, y = () => {
733
733
  i == null || i(!o);
734
734
  };
735
- return /* @__PURE__ */ e.jsx("div", { className: "cb-menu-overlay", onClick: r, children: /* @__PURE__ */ e.jsxs("div", { className: "cb-menu-content reasoning", onClick: (v) => v.stopPropagation(), children: [
735
+ return /* @__PURE__ */ e.jsx("div", { className: "cb-menu-overlay", onClick: n, children: /* @__PURE__ */ e.jsxs("div", { className: "cb-menu-content reasoning", onClick: (v) => v.stopPropagation(), children: [
736
736
  /* @__PURE__ */ e.jsx("div", { className: "cb-menu-header", children: /* @__PURE__ */ e.jsx("span", { children: "Reasoning" }) }),
737
737
  /* @__PURE__ */ e.jsxs("div", { className: "cb-menu-section", children: [
738
738
  /* @__PURE__ */ e.jsxs("div", { className: `cb-menu-item ${d === "rovo" ? "active" : ""}`, onClick: () => f("rovo"), children: [
@@ -814,7 +814,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
814
814
  ] })
815
815
  ] })
816
816
  ] }) });
817
- }, Rs = ({ onClose: r }) => /* @__PURE__ */ e.jsx("div", { className: "cb-menu-overlay", onClick: r, children: /* @__PURE__ */ e.jsx("div", { className: "cb-menu-content plus-menu", onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ e.jsxs("div", { className: "cb-menu-section compact", children: [
817
+ }, Rs = ({ onClose: n }) => /* @__PURE__ */ e.jsx("div", { className: "cb-menu-overlay", onClick: n, children: /* @__PURE__ */ e.jsx("div", { className: "cb-menu-content plus-menu", onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ e.jsxs("div", { className: "cb-menu-section compact", children: [
818
818
  /* @__PURE__ */ e.jsxs("div", { className: "cb-menu-item", children: [
819
819
  /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
820
820
  /* @__PURE__ */ e.jsx("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
@@ -845,16 +845,16 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
845
845
  ] }),
846
846
  /* @__PURE__ */ e.jsx("span", { className: "cb-menu-title", children: "More formatting" })
847
847
  ] })
848
- ] }) }) }), { useState: ze, useRef: _s, useEffect: Ss } = S, Os = ({
849
- onSend: r,
848
+ ] }) }) }), { useState: Ue, useRef: _s, useEffect: Ss } = R, Os = ({
849
+ onSend: n,
850
850
  disabled: t = !1,
851
- placeholder: n = "Ask, @mention, or / for actions",
851
+ placeholder: r = "Ask, @mention, or / for actions",
852
852
  webSearchEnabled: o = !1,
853
853
  onWebSearchChange: i,
854
854
  pageContextEnabled: d = !1,
855
855
  onPageContextChange: f
856
856
  }) => {
857
- const [x, m] = ze(""), [j, g] = ze(null), y = _s(null);
857
+ const [x, m] = Ue(""), [j, g] = Ue(null), y = _s(null);
858
858
  Ss(() => {
859
859
  const u = (N) => {
860
860
  y.current && !y.current.contains(N.target) && g(null);
@@ -862,7 +862,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
862
862
  return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
863
863
  }, []);
864
864
  const v = (u) => {
865
- u.key === "Enter" && !u.shiftKey && (u.preventDefault(), x.trim() && !t && (r == null || r(x), m("")));
865
+ u.key === "Enter" && !u.shiftKey && (u.preventDefault(), x.trim() && !t && (n == null || n(x), m("")));
866
866
  }, l = (u) => {
867
867
  g(j === u ? null : u);
868
868
  };
@@ -887,7 +887,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
887
887
  onChange: (u) => m(u.target.value),
888
888
  onKeyDown: v,
889
889
  onFocus: () => g(null),
890
- placeholder: n,
890
+ placeholder: r,
891
891
  disabled: t,
892
892
  rows: 1
893
893
  }
@@ -934,7 +934,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
934
934
  {
935
935
  className: `cb-send-btn ${x.trim() ? "active" : ""}`,
936
936
  onClick: () => {
937
- x.trim() && !t && (r == null || r(x), m(""));
937
+ x.trim() && !t && (n == null || n(x), m(""));
938
938
  },
939
939
  disabled: !x.trim() || t,
940
940
  children: /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
@@ -947,19 +947,19 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
947
947
  ] }),
948
948
  /* @__PURE__ */ e.jsx("div", { className: "cb-composer-footer", children: /* @__PURE__ */ e.jsx("span", { children: "Uses AI. Verify results." }) })
949
949
  ] });
950
- }, { useState: $s } = S, Ve = ({
951
- toolName: r,
950
+ }, { useState: $s } = R, He = ({
951
+ toolName: n,
952
952
  status: t,
953
- args: n,
953
+ args: r,
954
954
  result: o
955
955
  }) => {
956
- const [i, d] = $s(!1), f = r === "web_search" || r === "search_web";
956
+ const [i, d] = $s(!1), f = n === "web_search" || n === "search_web";
957
957
  return /* @__PURE__ */ e.jsxs("div", { className: `cb-tool-invocation ${t}`, children: [
958
958
  /* @__PURE__ */ e.jsxs("div", { className: "cb-tool-header", onClick: () => d(!i), children: [
959
959
  /* @__PURE__ */ e.jsx("div", { className: "cb-tool-icon", children: t === "running" ? /* @__PURE__ */ e.jsx("div", { className: "cb-spinner-sm" }) : /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", className: "cb-icon-check", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) }) }),
960
960
  /* @__PURE__ */ e.jsxs("span", { className: "cb-tool-name", children: [
961
961
  /* @__PURE__ */ e.jsx("span", { style: { opacity: 0.7 }, children: t === "running" ? "Calling" : "Used tool" }),
962
- /* @__PURE__ */ e.jsx("strong", { children: r })
962
+ /* @__PURE__ */ e.jsx("strong", { children: n })
963
963
  ] }),
964
964
  /* @__PURE__ */ e.jsx("span", { className: "cb-tool-chevron", children: /* @__PURE__ */ e.jsx(
965
965
  "svg",
@@ -980,7 +980,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
980
980
  /* @__PURE__ */ e.jsx("div", { className: "cb-markdown-content", style: { fontSize: "13px", lineHeight: "1.6" }, children: typeof o == "string" ? o : JSON.stringify(o, null, 2) })
981
981
  ] }) : /* @__PURE__ */ e.jsxs("div", { className: "cb-code-block", children: [
982
982
  /* @__PURE__ */ e.jsx("div", { style: { marginBottom: "4px", opacity: 0.5 }, children: "Arguments:" }),
983
- JSON.stringify(n, null, 2),
983
+ JSON.stringify(r, null, 2),
984
984
  o && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
985
985
  /* @__PURE__ */ e.jsx("div", { style: { marginTop: "8px", marginBottom: "4px", opacity: 0.5 }, children: "Result:" }),
986
986
  JSON.stringify(o, null, 2)
@@ -988,9 +988,9 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
988
988
  ] }) })
989
989
  ] });
990
990
  }, As = ({
991
- toolCallId: r,
991
+ toolCallId: n,
992
992
  label: t,
993
- description: n,
993
+ description: r,
994
994
  status: o,
995
995
  onConfirm: i,
996
996
  onReject: d
@@ -1019,13 +1019,13 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1019
1019
  /* @__PURE__ */ e.jsx("svg", { className: "cb-tool-icon", width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }) }),
1020
1020
  /* @__PURE__ */ e.jsx("span", { className: "cb-tool-label", children: t })
1021
1021
  ] }),
1022
- n && /* @__PURE__ */ e.jsx("p", { className: "cb-confirm-description", children: n }),
1022
+ r && /* @__PURE__ */ e.jsx("p", { className: "cb-confirm-description", children: r }),
1023
1023
  /* @__PURE__ */ e.jsxs("div", { className: "cb-confirm-actions", children: [
1024
1024
  /* @__PURE__ */ e.jsxs(
1025
1025
  "button",
1026
1026
  {
1027
1027
  className: "cb-btn-confirm",
1028
- onClick: () => i(r),
1028
+ onClick: () => i(n),
1029
1029
  children: [
1030
1030
  /* @__PURE__ */ e.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) }),
1031
1031
  "Confirm"
@@ -1036,7 +1036,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1036
1036
  "button",
1037
1037
  {
1038
1038
  className: "cb-btn-reject",
1039
- onClick: () => d(r),
1039
+ onClick: () => d(n),
1040
1040
  children: [
1041
1041
  /* @__PURE__ */ e.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1042
1042
  /* @__PURE__ */ e.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
@@ -1047,13 +1047,13 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1047
1047
  }
1048
1048
  )
1049
1049
  ] })
1050
- ] }), { useState: we, useEffect: Ue, useRef: He } = S, Ps = (r) => {
1050
+ ] }), { useState: Ne, useEffect: Ye, useRef: qe } = R, Ps = (n) => {
1051
1051
  const {
1052
1052
  role: t,
1053
- steps: n,
1053
+ steps: r,
1054
1054
  shouldAnimate: o = !0
1055
- } = r;
1056
- return n && n.length > 0 ? /* @__PURE__ */ e.jsxs("div", { className: `cb-message-row ${t === "user" ? "cb-row-user" : "cb-row-assistant"}`, children: [
1055
+ } = n;
1056
+ return r && r.length > 0 ? /* @__PURE__ */ e.jsxs("div", { className: `cb-message-row ${t === "user" ? "cb-row-user" : "cb-row-assistant"}`, children: [
1057
1057
  t === "assistant" && /* @__PURE__ */ e.jsx("div", { className: "cb-avatar-container", children: /* @__PURE__ */ e.jsx("div", { className: "cb-avatar-assistant", children: /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1058
1058
  /* @__PURE__ */ e.jsx("path", { d: "M12 2a10 10 0 0 1 10 10c0 5.524-4.476 10-10 10S2 17.524 2 12 6.476 2 12 2z" }),
1059
1059
  /* @__PURE__ */ e.jsx("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
@@ -1062,8 +1062,8 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1062
1062
  ] }) }) }),
1063
1063
  /* @__PURE__ */ e.jsxs("div", { className: "cb-message-content-wrapper", style: { width: "100%" }, children: [
1064
1064
  t === "user" ? null : /* @__PURE__ */ e.jsx("div", { className: "cb-sender-name", children: "Assistant" }),
1065
- /* @__PURE__ */ e.jsx("div", { className: "cb-steps-container", children: n.map((i, d) => {
1066
- const f = d === n.length - 1;
1065
+ /* @__PURE__ */ e.jsx("div", { className: "cb-steps-container", children: r.map((i, d) => {
1066
+ const f = d === r.length - 1;
1067
1067
  return i.type === "thinking" ? /* @__PURE__ */ e.jsx(
1068
1068
  Ms,
1069
1069
  {
@@ -1071,7 +1071,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1071
1071
  },
1072
1072
  i.id
1073
1073
  ) : i.type === "tool-call" ? /* @__PURE__ */ e.jsx("div", { className: "cb-step-tool", style: { marginBottom: 8 }, children: /* @__PURE__ */ e.jsx(
1074
- Ve,
1074
+ He,
1075
1075
  {
1076
1076
  toolName: i.toolName || "Tool",
1077
1077
  args: i.toolArgs,
@@ -1086,9 +1086,9 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1086
1086
  label: i.confirmLabel || i.toolName || "Confirm Action",
1087
1087
  description: i.confirmDescription,
1088
1088
  status: i.confirmStatus || "pending",
1089
- onConfirm: r.onConfirm || (() => {
1089
+ onConfirm: n.onConfirm || (() => {
1090
1090
  }),
1091
- onReject: r.onReject || (() => {
1091
+ onReject: n.onReject || (() => {
1092
1092
  })
1093
1093
  }
1094
1094
  ) }, i.id) : i.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: `cb-message-bubble ${t}`, style: { marginBottom: 8, maxWidth: "100%" }, children: /* @__PURE__ */ e.jsx(
@@ -1096,20 +1096,20 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1096
1096
  {
1097
1097
  content: i.content || "",
1098
1098
  shouldAnimate: o && f,
1099
- onComplete: f ? r.onAnimationComplete : void 0
1099
+ onComplete: f ? n.onAnimationComplete : void 0
1100
1100
  }
1101
1101
  ) }, i.id) : null;
1102
1102
  }) })
1103
1103
  ] })
1104
- ] }) : /* @__PURE__ */ e.jsx(Bs, { ...r });
1105
- }, Ms = ({ step: r }) => {
1106
- const [t, n] = we(!1), o = r.isFinished;
1104
+ ] }) : /* @__PURE__ */ e.jsx(Bs, { ...n });
1105
+ }, Ms = ({ step: n }) => {
1106
+ const [t, r] = Ne(!1), o = n.isFinished;
1107
1107
  return /* @__PURE__ */ e.jsxs("div", { className: "cb-step-thinking-block", style: { marginBottom: 8, border: "1px solid rgba(255,255,255,0.1)", borderRadius: 8, overflow: "hidden" }, children: [
1108
1108
  /* @__PURE__ */ e.jsxs(
1109
1109
  "div",
1110
1110
  {
1111
1111
  className: "cb-thinking-header",
1112
- onClick: () => n(!t),
1112
+ onClick: () => r(!t),
1113
1113
  style: {
1114
1114
  padding: "8px 12px",
1115
1115
  display: "flex",
@@ -1122,9 +1122,9 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1122
1122
  },
1123
1123
  children: [
1124
1124
  o ? /* @__PURE__ */ e.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ e.jsx("div", { className: "cb-thinking-spinner", style: { width: 14, height: 14, border: "2px solid rgba(255,255,255,0.3)", borderTopColor: "white", borderRadius: "50%", animation: "spin 1s linear infinite" } }),
1125
- /* @__PURE__ */ e.jsx("span", { style: { flex: 1 }, children: r.content || "Thinking Process" }),
1126
- r.thoughts && r.thoughts.length > 0 && /* @__PURE__ */ e.jsxs("span", { style: { fontSize: "11px", opacity: 0.5 }, children: [
1127
- r.thoughts.length,
1125
+ /* @__PURE__ */ e.jsx("span", { style: { flex: 1 }, children: n.content || "Thinking Process" }),
1126
+ n.thoughts && n.thoughts.length > 0 && /* @__PURE__ */ e.jsxs("span", { style: { fontSize: "11px", opacity: 0.5 }, children: [
1127
+ n.thoughts.length,
1128
1128
  " logs"
1129
1129
  ] }),
1130
1130
  /* @__PURE__ */ e.jsx(
@@ -1143,62 +1143,62 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1143
1143
  ]
1144
1144
  }
1145
1145
  ),
1146
- t && r.thoughts && r.thoughts.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "cb-thinking-logs", style: { padding: "8px 12px", background: "rgba(0,0,0,0.2)", borderTop: "1px solid rgba(255,255,255,0.05)" }, children: r.thoughts.map((i, d) => /* @__PURE__ */ e.jsx("div", { style: { fontSize: "12px", fontFamily: "monospace", color: "rgba(255,255,255,0.5)", marginBottom: 4 }, children: i }, d)) }),
1146
+ t && n.thoughts && n.thoughts.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "cb-thinking-logs", style: { padding: "8px 12px", background: "rgba(0,0,0,0.2)", borderTop: "1px solid rgba(255,255,255,0.05)" }, children: n.thoughts.map((i, d) => /* @__PURE__ */ e.jsx("div", { style: { fontSize: "12px", fontFamily: "monospace", color: "rgba(255,255,255,0.5)", marginBottom: 4 }, children: i }, d)) }),
1147
1147
  /* @__PURE__ */ e.jsx("style", { children: `
1148
1148
  @keyframes spin { to { transform: rotate(360deg); } }
1149
1149
  ` })
1150
1150
  ] });
1151
- }, Is = ({ content: r, shouldAnimate: t, onComplete: n }) => {
1152
- const [o, i] = we(t ? "" : r), d = He(!1);
1153
- return Ue(() => {
1154
- if (d.current = !1, !t || !r) {
1155
- i(r), d.current || (d.current = !0, n == null || n());
1151
+ }, Is = ({ content: n, shouldAnimate: t, onComplete: r }) => {
1152
+ const [o, i] = Ne(t ? "" : n), d = qe(!1);
1153
+ return Ye(() => {
1154
+ if (d.current = !1, !t || !n) {
1155
+ i(n), d.current || (d.current = !0, r == null || r());
1156
1156
  return;
1157
1157
  }
1158
1158
  let f, x;
1159
- const m = Date.now(), j = 15, g = r.length * j, y = () => {
1159
+ const m = Date.now(), j = 15, g = n.length * j, y = () => {
1160
1160
  const l = Date.now() - m, u = Math.floor(l / j);
1161
- u < r.length ? (i(r.substring(0, u + 1)), f = requestAnimationFrame(y)) : (i(r), d.current || (d.current = !0, n == null || n()));
1161
+ u < n.length ? (i(n.substring(0, u + 1)), f = requestAnimationFrame(y)) : (i(n), d.current || (d.current = !0, r == null || r()));
1162
1162
  };
1163
1163
  return f = requestAnimationFrame(y), x = setTimeout(() => {
1164
- d.current || (i(r), d.current = !0, n == null || n());
1164
+ d.current || (i(n), d.current = !0, r == null || r());
1165
1165
  }, g + 100), () => {
1166
1166
  cancelAnimationFrame(f), clearTimeout(x);
1167
1167
  };
1168
- }, [r, t]), /* @__PURE__ */ e.jsxs("div", { className: "cb-markdown-content", children: [
1168
+ }, [n, t]), /* @__PURE__ */ e.jsxs("div", { className: "cb-markdown-content", children: [
1169
1169
  o,
1170
- t && r && o.length < r.length && /* @__PURE__ */ e.jsx("span", { className: "cb-cursor", children: "|" })
1170
+ t && n && o.length < n.length && /* @__PURE__ */ e.jsx("span", { className: "cb-cursor", children: "|" })
1171
1171
  ] });
1172
- }, Bs = (r) => {
1172
+ }, Bs = (n) => {
1173
1173
  const {
1174
1174
  role: t,
1175
- content: n,
1175
+ content: r,
1176
1176
  attachments: o,
1177
1177
  toolInvocation: i,
1178
1178
  shouldAnimate: d = !0
1179
- } = r, [f, x] = we(""), m = He(!1);
1180
- return Ue(() => {
1179
+ } = n, [f, x] = Ne(""), m = qe(!1);
1180
+ return Ye(() => {
1181
1181
  var N;
1182
- if (m.current = !1, t !== "assistant" || !n || !d) {
1183
- x(n || ""), m.current || (m.current = !0, (N = r.onAnimationComplete) == null || N.call(r));
1182
+ if (m.current = !1, t !== "assistant" || !r || !d) {
1183
+ x(r || ""), m.current || (m.current = !0, (N = n.onAnimationComplete) == null || N.call(n));
1184
1184
  return;
1185
1185
  }
1186
1186
  let j, g;
1187
- const y = Date.now(), v = 15, l = n.length * v, u = () => {
1188
- var R;
1187
+ const y = Date.now(), v = 15, l = r.length * v, u = () => {
1188
+ var _;
1189
1189
  const b = Date.now() - y, C = Math.floor(b / v);
1190
- C < n.length ? (x(n.substring(0, C + 1)), j = requestAnimationFrame(u)) : (x(n), m.current || (m.current = !0, (R = r.onAnimationComplete) == null || R.call(r)));
1190
+ C < r.length ? (x(r.substring(0, C + 1)), j = requestAnimationFrame(u)) : (x(r), m.current || (m.current = !0, (_ = n.onAnimationComplete) == null || _.call(n)));
1191
1191
  };
1192
1192
  return j = requestAnimationFrame(u), g = setTimeout(() => {
1193
1193
  var h;
1194
- m.current || (x(n), m.current = !0, (h = r.onAnimationComplete) == null || h.call(r));
1194
+ m.current || (x(r), m.current = !0, (h = n.onAnimationComplete) == null || h.call(n));
1195
1195
  }, l + 100), () => {
1196
1196
  cancelAnimationFrame(j), clearTimeout(g);
1197
1197
  };
1198
- }, [n, t, d]), i ? /* @__PURE__ */ e.jsxs("div", { className: "cb-message-row cb-row-assistant", style: { marginBottom: "8px" }, children: [
1198
+ }, [r, t, d]), i ? /* @__PURE__ */ e.jsxs("div", { className: "cb-message-row cb-row-assistant", style: { marginBottom: "8px" }, children: [
1199
1199
  /* @__PURE__ */ e.jsx("div", { className: "cb-avatar-container", children: /* @__PURE__ */ e.jsx("div", { className: "cb-avatar-assistant", style: { background: "#333" }, children: /* @__PURE__ */ e.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e.jsx("path", { d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z" }) }) }) }),
1200
1200
  /* @__PURE__ */ e.jsx("div", { className: "cb-message-content-wrapper", children: /* @__PURE__ */ e.jsx(
1201
- Ve,
1201
+ He,
1202
1202
  {
1203
1203
  toolName: i.toolName,
1204
1204
  args: i.args,
@@ -1218,7 +1218,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1218
1218
  /* @__PURE__ */ e.jsxs("div", { className: `cb-message-bubble ${t}`, children: [
1219
1219
  /* @__PURE__ */ e.jsxs("div", { className: "cb-markdown-content", children: [
1220
1220
  f,
1221
- t === "assistant" && d && n && f.length < n.length && /* @__PURE__ */ e.jsx("span", { className: "cb-cursor", children: "|" })
1221
+ t === "assistant" && d && r && f.length < r.length && /* @__PURE__ */ e.jsx("span", { className: "cb-cursor", children: "|" })
1222
1222
  ] }),
1223
1223
  o && o.length > 0 && /* @__PURE__ */ e.jsx("div", { className: "cb-attachments-grid" })
1224
1224
  ] })
@@ -1232,7 +1232,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1232
1232
  ] }),
1233
1233
  /* @__PURE__ */ e.jsx("span", { className: "cb-thinking-text", children: "Thinking..." })
1234
1234
  ] }), Ds = ({
1235
- userName: r = "User",
1235
+ userName: n = "User",
1236
1236
  actions: t = []
1237
1237
  }) => /* @__PURE__ */ e.jsxs("div", { className: "cb-welcome-container", children: [
1238
1238
  /* @__PURE__ */ e.jsx("div", { className: "cb-welcome-logo", children: /* @__PURE__ */ e.jsxs("svg", { width: "48", height: "48", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
@@ -1243,19 +1243,19 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1243
1243
  ] }) }),
1244
1244
  /* @__PURE__ */ e.jsxs("h2", { className: "cb-welcome-title", children: [
1245
1245
  "How can I help, ",
1246
- r,
1246
+ n,
1247
1247
  "?"
1248
1248
  ] }),
1249
- /* @__PURE__ */ e.jsx("div", { className: "cb-quick-actions-grid", children: t.map((n) => /* @__PURE__ */ e.jsxs("button", { className: "cb-quick-action-card", onClick: n.onClick, children: [
1250
- /* @__PURE__ */ e.jsx("div", { className: "cb-action-icon", children: n.icon }),
1251
- /* @__PURE__ */ e.jsx("span", { className: "cb-action-label", children: n.label })
1252
- ] }, n.id)) })
1249
+ /* @__PURE__ */ e.jsx("div", { className: "cb-quick-actions-grid", children: t.map((r) => /* @__PURE__ */ e.jsxs("button", { className: "cb-quick-action-card", onClick: r.onClick, children: [
1250
+ /* @__PURE__ */ e.jsx("div", { className: "cb-action-icon", children: r.icon }),
1251
+ /* @__PURE__ */ e.jsx("span", { className: "cb-action-label", children: r.label })
1252
+ ] }, r.id)) })
1253
1253
  ] }), Fs = ({
1254
- onNewChat: r,
1254
+ onNewChat: n,
1255
1255
  agents: t,
1256
- chatHistory: n
1256
+ chatHistory: r
1257
1257
  }) => /* @__PURE__ */ e.jsxs("div", { className: "cb-nav-sidebar", children: [
1258
- /* @__PURE__ */ e.jsx("div", { className: "cb-nav-header", children: /* @__PURE__ */ e.jsxs("button", { className: "cb-new-chat-btn", onClick: r, children: [
1258
+ /* @__PURE__ */ e.jsx("div", { className: "cb-nav-header", children: /* @__PURE__ */ e.jsxs("button", { className: "cb-new-chat-btn", onClick: n, children: [
1259
1259
  /* @__PURE__ */ e.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1260
1260
  /* @__PURE__ */ e.jsx("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
1261
1261
  /* @__PURE__ */ e.jsx("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
@@ -1279,7 +1279,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1279
1279
  ] }),
1280
1280
  /* @__PURE__ */ e.jsxs("div", { className: "cb-nav-section", children: [
1281
1281
  /* @__PURE__ */ e.jsx("h3", { className: "cb-nav-title", children: "Chats" }),
1282
- n.map((o) => /* @__PURE__ */ e.jsxs("div", { className: `cb-nav-item ${o.active ? "active" : ""}`, onClick: o.onClick, children: [
1282
+ r.map((o) => /* @__PURE__ */ e.jsxs("div", { className: `cb-nav-item ${o.active ? "active" : ""}`, onClick: o.onClick, children: [
1283
1283
  /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", className: "cb-item-icon", children: /* @__PURE__ */ e.jsx("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" }) }),
1284
1284
  /* @__PURE__ */ e.jsx("span", { className: "cb-item-label", children: o.label })
1285
1285
  ] }, o.id)),
@@ -1292,19 +1292,19 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1292
1292
  /* @__PURE__ */ e.jsx("span", { className: "cb-item-label", children: "View all conversations" })
1293
1293
  ] })
1294
1294
  ] })
1295
- ] }), { useState: Ls } = S, Js = ({ queue: r, onDelete: t }) => {
1296
- const [n, o] = Ls(!1);
1297
- if (r.length === 0) return null;
1298
- const i = () => o(!n);
1299
- return /* @__PURE__ */ e.jsxs("div", { className: `cb-pending-messages ${n ? "expanded" : "collapsed"}`, children: [
1295
+ ] }), { useState: Ls } = R, Js = ({ queue: n, onDelete: t }) => {
1296
+ const [r, o] = Ls(!1);
1297
+ if (n.length === 0) return null;
1298
+ const i = () => o(!r);
1299
+ return /* @__PURE__ */ e.jsxs("div", { className: `cb-pending-messages ${r ? "expanded" : "collapsed"}`, children: [
1300
1300
  /* @__PURE__ */ e.jsxs("div", { className: "cb-pending-header", onClick: i, children: [
1301
1301
  /* @__PURE__ */ e.jsx("div", { className: "cb-pending-toggle-icon", children: /* @__PURE__ */ e.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e.jsx("polyline", { points: "9 18 15 12 9 6" }) }) }),
1302
1302
  /* @__PURE__ */ e.jsxs("div", { className: "cb-pending-preview", children: [
1303
- /* @__PURE__ */ e.jsx("span", { className: "cb-pending-badge", children: r.length }),
1304
- /* @__PURE__ */ e.jsx("span", { className: "cb-pending-preview-text", children: n ? "Pending Messages" : r[0] })
1303
+ /* @__PURE__ */ e.jsx("span", { className: "cb-pending-badge", children: n.length }),
1304
+ /* @__PURE__ */ e.jsx("span", { className: "cb-pending-preview-text", children: r ? "Pending Messages" : n[0] })
1305
1305
  ] })
1306
1306
  ] }),
1307
- n && /* @__PURE__ */ e.jsx("div", { className: "cb-pending-list", children: r.map((d, f) => /* @__PURE__ */ e.jsxs("div", { className: "cb-pending-item", children: [
1307
+ r && /* @__PURE__ */ e.jsx("div", { className: "cb-pending-list", children: n.map((d, f) => /* @__PURE__ */ e.jsxs("div", { className: "cb-pending-item", children: [
1308
1308
  /* @__PURE__ */ e.jsxs("div", { className: "cb-pending-content", children: [
1309
1309
  /* @__PURE__ */ e.jsx("span", { className: "cb-status-label", children: f === 0 ? "NEXT" : "WAIT" }),
1310
1310
  /* @__PURE__ */ e.jsx("span", { className: "cb-pending-text", style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: d })
@@ -1327,7 +1327,7 @@ const Ns = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1327
1327
  ] });
1328
1328
  };
1329
1329
  class Ys {
1330
- constructor(t, n) {
1330
+ constructor(t, r) {
1331
1331
  F(this, "accessToken", null);
1332
1332
  F(this, "apiBaseUrl", "http://localhost:8000/api");
1333
1333
  F(this, "messages", []);
@@ -1338,7 +1338,7 @@ class Ys {
1338
1338
  F(this, "pageReadingCallback", null);
1339
1339
  F(this, "customHandlers", /* @__PURE__ */ new Map());
1340
1340
  F(this, "libraryTools", /* @__PURE__ */ new Set());
1341
- this.accessToken = t, n && (this.apiBaseUrl = n);
1341
+ this.accessToken = t, r && (this.apiBaseUrl = r);
1342
1342
  }
1343
1343
  setToken(t) {
1344
1344
  this.accessToken = t;
@@ -1349,8 +1349,8 @@ class Ys {
1349
1349
  setEnabledTools(t) {
1350
1350
  this.enabledTools = t;
1351
1351
  }
1352
- setToolHandler(t, n) {
1353
- this.customHandlers.set(t, n);
1352
+ setToolHandler(t, r) {
1353
+ this.customHandlers.set(t, r);
1354
1354
  }
1355
1355
  enableWebSearch(t) {
1356
1356
  t ? this.libraryTools.add("web_search") : this.libraryTools.delete("web_search");
@@ -1365,7 +1365,7 @@ class Ys {
1365
1365
  setPageReadingCallback(t) {
1366
1366
  this.pageReadingCallback = t;
1367
1367
  }
1368
- async sendMessage(t, n) {
1368
+ async sendMessage(t, r) {
1369
1369
  if (!this.accessToken) {
1370
1370
  console.error("No access token available");
1371
1371
  return;
@@ -1375,7 +1375,7 @@ class Ys {
1375
1375
  role: "user",
1376
1376
  content: t
1377
1377
  };
1378
- this.messages = [...this.messages, o], n({ messages: this.messages, isThinking: !0 });
1378
+ this.messages = [...this.messages, o], r({ messages: this.messages, isThinking: !0 });
1379
1379
  try {
1380
1380
  const i = this.messages.map((v) => ({
1381
1381
  role: v.role,
@@ -1413,7 +1413,7 @@ class Ys {
1413
1413
  role: "assistant",
1414
1414
  content: ""
1415
1415
  };
1416
- this.messages = [...this.messages, j], n({ messages: this.messages, isThinking: !0 });
1416
+ this.messages = [...this.messages, j], r({ messages: this.messages, isThinking: !0 });
1417
1417
  const g = new EventSource(f);
1418
1418
  let y = "";
1419
1419
  g.addEventListener("delta", (v) => {
@@ -1436,7 +1436,7 @@ class Ys {
1436
1436
  return N;
1437
1437
  }
1438
1438
  return u;
1439
- }), n({ messages: this.messages, isThinking: !0 }));
1439
+ }), r({ messages: this.messages, isThinking: !0 }));
1440
1440
  } catch (l) {
1441
1441
  console.warn("Failed to parse delta event data", l);
1442
1442
  }
@@ -1461,7 +1461,7 @@ class Ys {
1461
1461
  return { ...u, steps: [...N, h] };
1462
1462
  }
1463
1463
  return u;
1464
- }), n({ messages: this.messages, isThinking: !0 });
1464
+ }), r({ messages: this.messages, isThinking: !0 });
1465
1465
  } catch (l) {
1466
1466
  console.warn("Failed to parse tool_call event data", l);
1467
1467
  }
@@ -1478,7 +1478,7 @@ class Ys {
1478
1478
  return { ...u, steps: N };
1479
1479
  }
1480
1480
  return u;
1481
- }), n({ messages: this.messages, isThinking: !0 });
1481
+ }), r({ messages: this.messages, isThinking: !0 });
1482
1482
  } catch (l) {
1483
1483
  console.warn("Failed to parse tool_result event data", l);
1484
1484
  }
@@ -1503,7 +1503,7 @@ class Ys {
1503
1503
  }), { ...u, steps: N };
1504
1504
  }
1505
1505
  return u;
1506
- }), n({ messages: this.messages, isThinking: !0 });
1506
+ }), r({ messages: this.messages, isThinking: !0 });
1507
1507
  } catch (l) {
1508
1508
  console.warn("Failed to parse confirm_request event data", l);
1509
1509
  }
@@ -1519,7 +1519,7 @@ class Ys {
1519
1519
  return { ...u, steps: N };
1520
1520
  }
1521
1521
  return u;
1522
- }), n({ messages: this.messages, isThinking: l.confirmed });
1522
+ }), r({ messages: this.messages, isThinking: l.confirmed });
1523
1523
  } catch (l) {
1524
1524
  console.warn("Failed to parse confirm_response event data", l);
1525
1525
  }
@@ -1542,11 +1542,11 @@ class Ys {
1542
1542
  console.warn("Failed to parse suspended event data", l);
1543
1543
  }
1544
1544
  }), g.addEventListener("complete", () => {
1545
- g.close(), n({ messages: this.messages, isThinking: !1 });
1545
+ g.close(), r({ messages: this.messages, isThinking: !1 });
1546
1546
  }), g.onerror = (v) => {
1547
1547
  console.error("EventSource failed:", v), g.close(), y.length === 0 && (this.messages = this.messages.map(
1548
1548
  (l) => l.id === m ? { ...l, content: "Error: Connection to stream failed." } : l
1549
- )), n({ messages: this.messages, isThinking: !1 });
1549
+ )), r({ messages: this.messages, isThinking: !1 });
1550
1550
  };
1551
1551
  } catch (i) {
1552
1552
  console.error("RealChatClient Error:", i);
@@ -1555,13 +1555,13 @@ class Ys {
1555
1555
  role: "assistant",
1556
1556
  content: `Error: ${i.message || "Unknown error occurred."}`
1557
1557
  };
1558
- this.messages = [...this.messages, d], n({ messages: this.messages, isThinking: !1 });
1558
+ this.messages = [...this.messages, d], r({ messages: this.messages, isThinking: !1 });
1559
1559
  }
1560
1560
  }
1561
1561
  reset(t) {
1562
1562
  this.messages = [], this.currentJobId = null, t({ messages: [], isThinking: !1 });
1563
1563
  }
1564
- async sendConfirmResponse(t, n) {
1564
+ async sendConfirmResponse(t, r) {
1565
1565
  if (!this.accessToken || !this.currentJobId) {
1566
1566
  console.error("No access token or job ID available");
1567
1567
  return;
@@ -1576,49 +1576,49 @@ class Ys {
1576
1576
  body: JSON.stringify({
1577
1577
  job_id: this.currentJobId,
1578
1578
  tool_call_id: t,
1579
- confirmed: n
1579
+ confirmed: r
1580
1580
  })
1581
1581
  });
1582
1582
  if (!o.ok)
1583
1583
  throw new Error(`Confirm response failed: ${o.status}`);
1584
- console.log("Confirm response sent:", { toolCallId: t, confirmed: n });
1584
+ console.log("Confirm response sent:", { toolCallId: t, confirmed: r });
1585
1585
  } catch (o) {
1586
1586
  console.error("Failed to send confirm response:", o);
1587
1587
  }
1588
1588
  }
1589
- async executeClientTool(t, n, o) {
1590
- console.log("Executing client tool:", n, o);
1589
+ async executeClientTool(t, r, o) {
1590
+ console.log("Executing client tool:", r, o);
1591
1591
  let i;
1592
1592
  try {
1593
- if (this.customHandlers.has(n)) {
1594
- const f = await this.customHandlers.get(n)(o);
1593
+ if (this.customHandlers.has(r)) {
1594
+ const f = await this.customHandlers.get(r)(o);
1595
1595
  i = typeof f == "string" ? f : JSON.stringify(f);
1596
1596
  } else
1597
- switch (n) {
1597
+ switch (r) {
1598
1598
  case "read_page_content":
1599
1599
  this.pageReadingCallback && this.pageReadingCallback(!0), i = await this.executeReadPageContent(o);
1600
1600
  break;
1601
1601
  default:
1602
1602
  i = JSON.stringify({
1603
1603
  error: "unknown_tool",
1604
- message: `Client-side tool '${n}' is not implemented`
1604
+ message: `Client-side tool '${r}' is not implemented`
1605
1605
  });
1606
1606
  }
1607
- await this.submitToolResult(t, n, i);
1607
+ await this.submitToolResult(t, r, i);
1608
1608
  } catch (d) {
1609
1609
  console.error("Client tool execution error:", d), await this.submitToolResult(
1610
1610
  t,
1611
- n,
1611
+ r,
1612
1612
  JSON.stringify({
1613
1613
  error: "execution_failed",
1614
1614
  message: d.message || "Unknown error"
1615
1615
  })
1616
1616
  );
1617
1617
  } finally {
1618
- n === "read_page_content" && this.pageReadingCallback && this.pageReadingCallback(!1);
1618
+ r === "read_page_content" && this.pageReadingCallback && this.pageReadingCallback(!1);
1619
1619
  }
1620
1620
  }
1621
- async submitToolResult(t, n, o) {
1621
+ async submitToolResult(t, r, o) {
1622
1622
  if (!this.accessToken || !this.currentJobId) {
1623
1623
  console.error("No access token or job ID available");
1624
1624
  return;
@@ -1634,30 +1634,30 @@ class Ys {
1634
1634
  },
1635
1635
  body: JSON.stringify({
1636
1636
  tool_call_id: t,
1637
- tool_name: n,
1637
+ tool_name: r,
1638
1638
  result: o
1639
1639
  })
1640
1640
  }
1641
1641
  );
1642
1642
  if (!i.ok)
1643
1643
  throw new Error(`Tool result submission failed: ${i.status}`);
1644
- console.log("Tool result submitted:", { toolCallId: t, toolName: n });
1644
+ console.log("Tool result submitted:", { toolCallId: t, toolName: r });
1645
1645
  } catch (i) {
1646
1646
  console.error("Failed to submit tool result:", i);
1647
1647
  }
1648
1648
  }
1649
1649
  async executeReadPageContent(t) {
1650
1650
  const {
1651
- selector: n = "body",
1651
+ selector: r = "body",
1652
1652
  include_metadata: o = !0,
1653
1653
  max_length: i = 5e4
1654
1654
  } = t;
1655
1655
  try {
1656
- const d = document.querySelector(n);
1656
+ const d = document.querySelector(r);
1657
1657
  if (!d)
1658
1658
  return JSON.stringify({
1659
1659
  error: "element_not_found",
1660
- message: `No element found for selector: ${n}`
1660
+ message: `No element found for selector: ${r}`
1661
1661
  });
1662
1662
  let f = "";
1663
1663
  return o && (f += `URL: ${window.location.href}
@@ -1681,9 +1681,9 @@ class Ys {
1681
1681
  });
1682
1682
  }
1683
1683
  }
1684
- extractElementContent(t, n) {
1684
+ extractElementContent(t, r) {
1685
1685
  var g, y, v, l, u, N;
1686
- const o = " ".repeat(n);
1686
+ const o = " ".repeat(r);
1687
1687
  let i = "";
1688
1688
  const d = window.getComputedStyle(t);
1689
1689
  if (d.display === "none" || d.visibility === "hidden" || d.opacity === "0" || ["SCRIPT", "STYLE", "NOSCRIPT", "SVG", "IFRAME"].includes(t.tagName))
@@ -1703,27 +1703,27 @@ class Ys {
1703
1703
  }
1704
1704
  if (x === "UL" || x === "OL")
1705
1705
  return t.querySelectorAll(":scope > li").forEach((b, C) => {
1706
- var D;
1707
- const R = x === "OL" ? `${C + 1}.` : "-", A = (D = b.textContent) == null ? void 0 : D.trim();
1708
- A && (i += `${o}${R} ${A}
1706
+ var W;
1707
+ const _ = x === "OL" ? `${C + 1}.` : "-", A = (W = b.textContent) == null ? void 0 : W.trim();
1708
+ A && (i += `${o}${_} ${A}
1709
1709
  `);
1710
1710
  }), i += `
1711
1711
  `, i;
1712
1712
  if (x === "TABLE")
1713
1713
  return i += `${o}[Table]
1714
1714
  `, t.querySelectorAll("tr").forEach((b) => {
1715
- const C = b.querySelectorAll("td, th"), R = Array.from(C).map((A) => {
1716
- var D;
1717
- return (D = A.textContent) == null ? void 0 : D.trim();
1715
+ const C = b.querySelectorAll("td, th"), _ = Array.from(C).map((A) => {
1716
+ var W;
1717
+ return (W = A.textContent) == null ? void 0 : W.trim();
1718
1718
  }).filter((A) => A).join(" | ");
1719
- R && (i += `${o} ${R}
1719
+ _ && (i += `${o} ${_}
1720
1720
  `);
1721
1721
  }), i += `
1722
1722
  `, i;
1723
1723
  if (["HEADER", "NAV", "MAIN", "ARTICLE", "SECTION", "ASIDE", "FOOTER"].includes(x))
1724
1724
  return i += `${o}[${x}]
1725
1725
  `, Array.from(t.children).forEach((h) => {
1726
- i += this.extractElementContent(h, n + 1);
1726
+ i += this.extractElementContent(h, r + 1);
1727
1727
  }), i += `
1728
1728
  `, i;
1729
1729
  if (x === "A") {
@@ -1739,7 +1739,7 @@ class Ys {
1739
1739
  const m = t.children.length > 0, j = m ? "" : (N = t.textContent) == null ? void 0 : N.trim();
1740
1740
  return !m && j ? (i += `${o}${j}
1741
1741
  `, i) : (m && Array.from(t.children).forEach((h) => {
1742
- i += this.extractElementContent(h, n);
1742
+ i += this.extractElementContent(h, r);
1743
1743
  }), i);
1744
1744
  }
1745
1745
  }
@@ -1773,35 +1773,35 @@ class qs {
1773
1773
  return console.log("Refreshing token via broker..."), this.getInitialToken();
1774
1774
  }
1775
1775
  }
1776
- const Vs = ({ client: r, onToolCall: t }) => {
1777
- const [n, o] = S.useState({ messages: [], isThinking: !1 }), [i, d] = S.useState([]), [f, x] = S.useState(!1), [m, j] = S.useState(!1), g = S.useRef(/* @__PURE__ */ new Set()), y = S.useRef(0);
1778
- S.useEffect(() => {
1779
- r && t && "setToolHandler" in r && Object.entries(t).forEach(([h, b]) => {
1780
- r.setToolHandler(h, b);
1776
+ const Vs = ({ client: n, onToolCall: t }) => {
1777
+ const [r, o] = R.useState({ messages: [], isThinking: !1 }), [i, d] = R.useState([]), [f, x] = R.useState(!1), [m, j] = R.useState(!1), g = R.useRef(/* @__PURE__ */ new Set()), y = R.useRef(0);
1778
+ R.useEffect(() => {
1779
+ n && t && "setToolHandler" in n && Object.entries(t).forEach(([h, b]) => {
1780
+ n.setToolHandler(h, b);
1781
1781
  });
1782
- }, [r, t]), S.useEffect(() => {
1782
+ }, [n, t]), R.useEffect(() => {
1783
1783
  (async () => {
1784
- if (!r || i.length === 0 || n.isThinking) return;
1785
- const b = n.messages[n.messages.length - 1];
1784
+ if (!n || i.length === 0 || r.isThinking) return;
1785
+ const b = r.messages[r.messages.length - 1];
1786
1786
  if ((b == null ? void 0 : b.role) === "assistant" && (b.content || b.steps && b.steps.length > 0) && !g.current.has(b.id)) {
1787
1787
  m || j(!0);
1788
1788
  return;
1789
1789
  }
1790
1790
  const C = i[0];
1791
- x(!0), d((R) => R.slice(1));
1791
+ x(!0), d((_) => _.slice(1));
1792
1792
  try {
1793
- await r.sendMessage(C, o);
1793
+ await n.sendMessage(C, o);
1794
1794
  } finally {
1795
1795
  x(!1);
1796
1796
  }
1797
1797
  })();
1798
- }, [i, f, m, n.isThinking, n.messages, r]), S.useEffect(() => {
1799
- if (n.messages.length > y.current) {
1800
- const h = n.messages[n.messages.length - 1];
1798
+ }, [i, f, m, r.isThinking, r.messages, n]), R.useEffect(() => {
1799
+ if (r.messages.length > y.current) {
1800
+ const h = r.messages[r.messages.length - 1];
1801
1801
  h.role === "assistant" && (h.content || h.steps && h.steps.length > 0) && j(!0);
1802
1802
  }
1803
- y.current = n.messages.length;
1804
- }, [n.messages]);
1803
+ y.current = r.messages.length;
1804
+ }, [r.messages]);
1805
1805
  const v = (h) => {
1806
1806
  d((b) => [...b, h]);
1807
1807
  }, l = (h) => {
@@ -1812,11 +1812,11 @@ const Vs = ({ client: r, onToolCall: t }) => {
1812
1812
  }, u = (h) => {
1813
1813
  g.current.add(h), j(!1);
1814
1814
  }, N = () => {
1815
- r && r.reset(o), d([]), x(!1), j(!1), g.current.clear(), y.current = 0;
1815
+ n && n.reset(o), d([]), x(!1), j(!1), g.current.clear(), y.current = 0;
1816
1816
  };
1817
1817
  return {
1818
- messages: n.messages,
1819
- isThinking: n.isThinking || f,
1818
+ messages: r.messages,
1819
+ isThinking: r.isThinking || f,
1820
1820
  isTyping: m,
1821
1821
  messageQueue: i,
1822
1822
  sendMessage: v,
@@ -1826,9 +1826,9 @@ const Vs = ({ client: r, onToolCall: t }) => {
1826
1826
  reset: N
1827
1827
  };
1828
1828
  }, Ks = ({
1829
- client: r,
1829
+ client: n,
1830
1830
  mode: t = "floating",
1831
- isOpen: n = !0,
1831
+ isOpen: r = !0,
1832
1832
  onClose: o,
1833
1833
  onOpen: i,
1834
1834
  embedded: d = !1,
@@ -1843,88 +1843,94 @@ const Vs = ({ client: r, onToolCall: t }) => {
1843
1843
  pageContextEnabled: u,
1844
1844
  onPageContextChange: N
1845
1845
  }) => {
1846
- const [h, b] = S.useState(!1), [C, R] = S.useState(!1), [A, D] = S.useState(!1), L = v !== void 0 ? v : C, V = u !== void 0 ? u : A;
1847
- S.useEffect(() => {
1848
- r && (r.enableWebSearch(L), r.enablePageContext(V));
1849
- }, [r, L, V]);
1850
- const U = ($) => {
1851
- l ? l($) : R($), r == null || r.enableWebSearch($);
1852
- }, K = ($) => {
1853
- N ? N($) : D($), r == null || r.enablePageContext($);
1846
+ const [h, b] = R.useState(!1), [C, _] = R.useState(!1), [A, W] = R.useState(!1), [H, G] = R.useState(!1), z = v !== void 0 ? v : A, U = u !== void 0 ? u : H;
1847
+ R.useEffect(() => {
1848
+ var S;
1849
+ n && (n.enableWebSearch(z), n.enablePageContext(U), (S = n.setPageReadingCallback) == null || S.call(n, (V) => {
1850
+ _(V);
1851
+ }));
1852
+ }, [n, z, U]);
1853
+ const D = (S) => {
1854
+ l ? l(S) : W(S), n == null || n.enableWebSearch(S);
1855
+ }, X = (S) => {
1856
+ N ? N(S) : G(S), n == null || n.enablePageContext(S);
1854
1857
  }, {
1855
- messages: P,
1856
- isThinking: X,
1857
- messageQueue: H,
1858
- sendMessage: B,
1859
- removeQueueItem: J,
1860
- handleAnimationComplete: Y,
1861
- finishedMessageIds: te,
1862
- reset: ne
1863
- } = Vs({ client: r, onToolCall: g }), re = ($) => {
1864
- var z;
1865
- (z = r == null ? void 0 : r.sendConfirmResponse) == null || z.call(r, $, !0);
1866
- }, ie = ($) => {
1867
- var z;
1868
- (z = r == null ? void 0 : r.sendConfirmResponse) == null || z.call(r, $, !1);
1869
- }, ae = () => {
1870
- ne(), b(!1);
1871
- }, oe = /* @__PURE__ */ e.jsx(
1858
+ messages: L,
1859
+ isThinking: I,
1860
+ messageQueue: J,
1861
+ sendMessage: Y,
1862
+ removeQueueItem: te,
1863
+ handleAnimationComplete: ne,
1864
+ finishedMessageIds: re,
1865
+ reset: ie
1866
+ } = Vs({ client: n, onToolCall: g }), ae = (S) => {
1867
+ var V;
1868
+ (V = n == null ? void 0 : n.sendConfirmResponse) == null || V.call(n, S, !0);
1869
+ }, oe = (S) => {
1870
+ var V;
1871
+ (V = n == null ? void 0 : n.sendConfirmResponse) == null || V.call(n, S, !1);
1872
+ }, le = () => {
1873
+ ie(), b(!1);
1874
+ }, ce = /* @__PURE__ */ e.jsx(
1872
1875
  Fs,
1873
1876
  {
1874
- onNewChat: ae,
1877
+ onNewChat: le,
1875
1878
  agents: m,
1876
1879
  chatHistory: j
1877
1880
  }
1878
1881
  );
1879
- return /* @__PURE__ */ e.jsx(
1880
- Ts,
1881
- {
1882
- mode: t,
1883
- isOpen: n,
1884
- embedded: d,
1885
- onClose: o,
1886
- onOpen: i,
1887
- isDrawerOpen: h,
1888
- onDrawerOpenChange: b,
1889
- drawerContent: oe,
1890
- headerActions: y,
1891
- footer: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", width: "100%" }, children: [
1892
- /* @__PURE__ */ e.jsx(
1893
- Js,
1894
- {
1895
- queue: H,
1896
- onDelete: J
1897
- }
1898
- ),
1899
- /* @__PURE__ */ e.jsx(
1900
- Os,
1901
- {
1902
- onSend: B,
1903
- disabled: !1,
1904
- placeholder: H.length > 0 ? "Queued..." : "Type a message...",
1905
- webSearchEnabled: L,
1906
- onWebSearchChange: U,
1907
- pageContextEnabled: V,
1908
- onPageContextChange: K
1909
- }
1910
- )
1911
- ] }),
1912
- children: P.length === 0 ? /* @__PURE__ */ e.jsx(Ds, { userName: f, actions: x }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1913
- P.map(($) => /* @__PURE__ */ e.jsx(
1914
- Ps,
1915
- {
1916
- ...$,
1917
- shouldAnimate: !te.has($.id),
1918
- onAnimationComplete: () => Y($.id),
1919
- onConfirm: re,
1920
- onReject: ie
1921
- },
1922
- $.id
1923
- )),
1924
- X && (!P.length || P[P.length - 1].role !== "assistant") && /* @__PURE__ */ e.jsx("div", { style: { paddingLeft: "16px" }, children: /* @__PURE__ */ e.jsx(Ws, {}) })
1925
- ] })
1926
- }
1927
- );
1882
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1883
+ C && /* @__PURE__ */ e.jsx("div", { className: "cb-page-reading-indicator" }),
1884
+ /* @__PURE__ */ e.jsx(
1885
+ Ts,
1886
+ {
1887
+ mode: t,
1888
+ isOpen: r,
1889
+ embedded: d,
1890
+ onClose: o,
1891
+ onOpen: i,
1892
+ isDrawerOpen: h,
1893
+ onDrawerOpenChange: b,
1894
+ drawerContent: ce,
1895
+ headerActions: y,
1896
+ footer: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", width: "100%" }, children: [
1897
+ /* @__PURE__ */ e.jsx(
1898
+ Js,
1899
+ {
1900
+ queue: J,
1901
+ onDelete: te
1902
+ }
1903
+ ),
1904
+ /* @__PURE__ */ e.jsx(
1905
+ Os,
1906
+ {
1907
+ onSend: Y,
1908
+ disabled: !1,
1909
+ placeholder: J.length > 0 ? "Queued..." : "Type a message...",
1910
+ webSearchEnabled: z,
1911
+ onWebSearchChange: D,
1912
+ pageContextEnabled: U,
1913
+ onPageContextChange: X
1914
+ }
1915
+ )
1916
+ ] }),
1917
+ children: L.length === 0 ? /* @__PURE__ */ e.jsx(Ds, { userName: f, actions: x }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1918
+ L.map((S) => /* @__PURE__ */ e.jsx(
1919
+ Ps,
1920
+ {
1921
+ ...S,
1922
+ shouldAnimate: !re.has(S.id),
1923
+ onAnimationComplete: () => ne(S.id),
1924
+ onConfirm: ae,
1925
+ onReject: oe
1926
+ },
1927
+ S.id
1928
+ )),
1929
+ I && (!L.length || L[L.length - 1].role !== "assistant") && /* @__PURE__ */ e.jsx("div", { style: { paddingLeft: "16px" }, children: /* @__PURE__ */ e.jsx(Ws, {}) })
1930
+ ] })
1931
+ }
1932
+ )
1933
+ ] });
1928
1934
  };
1929
1935
  export {
1930
1936
  qs as AuthClient,
@@ -1938,7 +1944,7 @@ export {
1938
1944
  Js as PendingMessageList,
1939
1945
  Ys as RealChatClient,
1940
1946
  Ws as ThinkingIndicator,
1941
- Ve as ToolInvocation,
1947
+ He as ToolInvocation,
1942
1948
  Ds as WelcomeScreen,
1943
1949
  Vs as useChat
1944
1950
  };