flowdit-chatbot-library 1.3.5 → 1.3.6

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.
Files changed (2) hide show
  1. package/dist/index.mjs +321 -321
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- var ks = Object.defineProperty;
2
- var Ns = (r, t, n) => t in r ? ks(r, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[t] = n;
3
- var D = (r, t, n) => Ns(r, typeof t != "symbol" ? t + "" : t, n);
4
- import J, { useState as q, useRef as Fe, useEffect as we } from "react";
5
- var ke = { exports: {} }, se = {};
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 O from "react";
5
+ var ye = { exports: {} }, ee = {};
6
6
  /**
7
7
  * @license React
8
8
  * react-jsx-runtime.production.min.js
@@ -12,11 +12,11 @@ var ke = { exports: {} }, se = {};
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 Le;
16
- function Cs() {
17
- if (Le) return se;
18
- Le = 1;
19
- var r = J, 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 };
15
+ var We;
16
+ function ws() {
17
+ if (We) return ee;
18
+ We = 1;
19
+ var r = O, 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 };
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,9 +24,9 @@ function Cs() {
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 se.Fragment = n, se.jsx = f, se.jsxs = f, se;
27
+ return ee.Fragment = n, ee.jsx = f, ee.jsxs = f, ee;
28
28
  }
29
- var te = {};
29
+ var se = {};
30
30
  /**
31
31
  * @license React
32
32
  * react-jsx-runtime.development.js
@@ -36,10 +36,10 @@ var te = {};
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 Je;
40
- function Ts() {
41
- return Je || (Je = 1, process.env.NODE_ENV !== "production" && function() {
42
- var r = J, 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";
39
+ var De;
40
+ function ks() {
41
+ return De || (De = 1, process.env.NODE_ENV !== "production" && function() {
42
+ var r = O, 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";
43
43
  function h(s) {
44
44
  if (s === null || typeof s != "object")
45
45
  return null;
@@ -64,16 +64,16 @@ function Ts() {
64
64
  E.unshift("Warning: " + a), Function.prototype.apply.call(console[s], console, E);
65
65
  }
66
66
  }
67
- var $ = !1, W = !1, z = !1, X = !1, V = !1, K;
68
- K = Symbol.for("react.module.reference");
69
- function A(s) {
70
- return !!(typeof s == "string" || typeof s == "function" || s === o || s === d || V || s === i || s === j || s === g || X || s === l || $ || W || z || 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, D = !1, z = !1, G = !1, V = !1, q;
68
+ q = Symbol.for("react.module.reference");
69
+ function P(s) {
70
+ return !!(typeof s == "string" || typeof s == "function" || s === o || s === d || V || s === i || s === j || s === g || G || s === l || A || D || z || 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 === q || s.getModuleId !== void 0));
75
75
  }
76
- function Z(s, a, c) {
76
+ function X(s, a, c) {
77
77
  var p = s.displayName;
78
78
  if (p)
79
79
  return p;
@@ -83,7 +83,7 @@ function Ts() {
83
83
  function U(s) {
84
84
  return s.displayName || "Context";
85
85
  }
86
- function I(s) {
86
+ function B(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")
@@ -113,14 +113,14 @@ function Ts() {
113
113
  var c = s;
114
114
  return U(c._context) + ".Provider";
115
115
  case m:
116
- return Z(s, s.render, "ForwardRef");
116
+ return X(s, s.render, "ForwardRef");
117
117
  case y:
118
118
  var p = s.displayName || null;
119
- return p !== null ? p : I(s.type) || "Memo";
119
+ return p !== null ? p : B(s.type) || "Memo";
120
120
  case v: {
121
121
  var T = s, E = T._payload, k = T._init;
122
122
  try {
123
- return I(k(E));
123
+ return B(k(E));
124
124
  } catch {
125
125
  return null;
126
126
  }
@@ -128,18 +128,18 @@ function Ts() {
128
128
  }
129
129
  return null;
130
130
  }
131
- var F = Object.assign, H = 0, ne, re, ie, ae, oe, le, O;
132
- function L() {
131
+ var L = Object.assign, H = 0, te, ne, re, ie, ae, oe, $;
132
+ function J() {
133
133
  }
134
- L.__reactDisabledLog = !0;
135
- function Qe() {
134
+ J.__reactDisabledLog = !0;
135
+ function Ye() {
136
136
  {
137
137
  if (H === 0) {
138
- ne = console.log, re = console.info, ie = console.warn, ae = console.error, oe = console.group, le = console.groupCollapsed, O = console.groupEnd;
138
+ te = console.log, ne = console.info, re = console.warn, ie = console.error, ae = console.group, oe = console.groupCollapsed, $ = console.groupEnd;
139
139
  var s = {
140
140
  configurable: !0,
141
141
  enumerable: !0,
142
- value: L,
142
+ value: J,
143
143
  writable: !0
144
144
  };
145
145
  Object.defineProperties(console, {
@@ -155,7 +155,7 @@ function Ts() {
155
155
  H++;
156
156
  }
157
157
  }
158
- function Ge() {
158
+ function qe() {
159
159
  {
160
160
  if (H--, H === 0) {
161
161
  var s = {
@@ -164,65 +164,65 @@ function Ts() {
164
164
  writable: !0
165
165
  };
166
166
  Object.defineProperties(console, {
167
- log: F({}, s, {
167
+ log: L({}, s, {
168
+ value: te
169
+ }),
170
+ info: L({}, s, {
168
171
  value: ne
169
172
  }),
170
- info: F({}, s, {
173
+ warn: L({}, s, {
171
174
  value: re
172
175
  }),
173
- warn: F({}, s, {
176
+ error: L({}, s, {
174
177
  value: ie
175
178
  }),
176
- error: F({}, s, {
179
+ group: L({}, s, {
177
180
  value: ae
178
181
  }),
179
- group: F({}, s, {
182
+ groupCollapsed: L({}, s, {
180
183
  value: oe
181
184
  }),
182
- groupCollapsed: F({}, s, {
183
- value: le
184
- }),
185
- groupEnd: F({}, s, {
186
- value: O
185
+ groupEnd: L({}, s, {
186
+ value: $
187
187
  })
188
188
  });
189
189
  }
190
190
  H < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
191
191
  }
192
192
  }
193
- var xe = b.ReactCurrentDispatcher, me;
194
- function ce(s, a, c) {
193
+ var fe = b.ReactCurrentDispatcher, xe;
194
+ function le(s, a, c) {
195
195
  {
196
- if (me === void 0)
196
+ if (xe === void 0)
197
197
  try {
198
198
  throw Error();
199
199
  } catch (T) {
200
200
  var p = T.stack.trim().match(/\n( *(at )?)/);
201
- me = p && p[1] || "";
201
+ xe = p && p[1] || "";
202
202
  }
203
203
  return `
204
- ` + me + s;
204
+ ` + xe + s;
205
205
  }
206
206
  }
207
- var ge = !1, de;
207
+ var me = !1, ce;
208
208
  {
209
- var Xe = typeof WeakMap == "function" ? WeakMap : Map;
210
- de = new Xe();
209
+ var Ke = typeof WeakMap == "function" ? WeakMap : Map;
210
+ ce = new Ke();
211
211
  }
212
- function Ce(s, a) {
213
- if (!s || ge)
212
+ function ke(s, a) {
213
+ if (!s || me)
214
214
  return "";
215
215
  {
216
- var c = de.get(s);
216
+ var c = ce.get(s);
217
217
  if (c !== void 0)
218
218
  return c;
219
219
  }
220
220
  var p;
221
- ge = !0;
221
+ me = !0;
222
222
  var T = Error.prepareStackTrace;
223
223
  Error.prepareStackTrace = void 0;
224
224
  var E;
225
- E = xe.current, xe.current = null, Qe();
225
+ E = fe.current, fe.current = null, Ye();
226
226
  try {
227
227
  if (a) {
228
228
  var k = function() {
@@ -235,167 +235,167 @@ function Ts() {
235
235
  }), typeof Reflect == "object" && Reflect.construct) {
236
236
  try {
237
237
  Reflect.construct(k, []);
238
- } catch (M) {
239
- p = M;
238
+ } catch (I) {
239
+ p = I;
240
240
  }
241
241
  Reflect.construct(s, [], k);
242
242
  } else {
243
243
  try {
244
244
  k.call();
245
- } catch (M) {
246
- p = M;
245
+ } catch (I) {
246
+ p = I;
247
247
  }
248
248
  s.call(k.prototype);
249
249
  }
250
250
  } else {
251
251
  try {
252
252
  throw Error();
253
- } catch (M) {
254
- p = M;
253
+ } catch (I) {
254
+ p = I;
255
255
  }
256
256
  s();
257
257
  }
258
- } catch (M) {
259
- if (M && p && typeof M.stack == "string") {
260
- for (var w = M.stack.split(`
261
- `), P = p.stack.split(`
262
- `), _ = w.length - 1, S = P.length - 1; _ >= 1 && S >= 0 && w[_] !== P[S]; )
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, S = M.length - 1; _ >= 1 && S >= 0 && w[_] !== M[S]; )
263
263
  S--;
264
264
  for (; _ >= 1 && S >= 0; _--, S--)
265
- if (w[_] !== P[S]) {
265
+ if (w[_] !== M[S]) {
266
266
  if (_ !== 1 || S !== 1)
267
267
  do
268
- if (_--, S--, S < 0 || w[_] !== P[S]) {
269
- var B = `
268
+ if (_--, S--, S < 0 || w[_] !== M[S]) {
269
+ var W = `
270
270
  ` + w[_].replace(" at new ", " at ");
271
- return s.displayName && B.includes("<anonymous>") && (B = B.replace("<anonymous>", s.displayName)), typeof s == "function" && de.set(s, B), B;
271
+ return s.displayName && W.includes("<anonymous>") && (W = W.replace("<anonymous>", s.displayName)), typeof s == "function" && ce.set(s, W), W;
272
272
  }
273
273
  while (_ >= 1 && S >= 0);
274
274
  break;
275
275
  }
276
276
  }
277
277
  } finally {
278
- ge = !1, xe.current = E, Ge(), Error.prepareStackTrace = T;
278
+ me = !1, fe.current = E, qe(), Error.prepareStackTrace = T;
279
279
  }
280
- var G = s ? s.displayName || s.name : "", Y = G ? ce(G) : "";
281
- return typeof s == "function" && de.set(s, Y), Y;
280
+ var Q = s ? s.displayName || s.name : "", Y = Q ? le(Q) : "";
281
+ return typeof s == "function" && ce.set(s, Y), Y;
282
282
  }
283
- function Ze(s, a, c) {
284
- return Ce(s, !1);
283
+ function Qe(s, a, c) {
284
+ return ke(s, !1);
285
285
  }
286
- function es(s) {
286
+ function Ge(s) {
287
287
  var a = s.prototype;
288
288
  return !!(a && a.isReactComponent);
289
289
  }
290
- function ue(s, a, c) {
290
+ function de(s, a, c) {
291
291
  if (s == null)
292
292
  return "";
293
293
  if (typeof s == "function")
294
- return Ce(s, es(s));
294
+ return ke(s, Ge(s));
295
295
  if (typeof s == "string")
296
- return ce(s);
296
+ return le(s);
297
297
  switch (s) {
298
298
  case j:
299
- return ce("Suspense");
299
+ return le("Suspense");
300
300
  case g:
301
- return ce("SuspenseList");
301
+ return le("SuspenseList");
302
302
  }
303
303
  if (typeof s == "object")
304
304
  switch (s.$$typeof) {
305
305
  case m:
306
- return Ze(s.render);
306
+ return Qe(s.render);
307
307
  case y:
308
- return ue(s.type, a, c);
308
+ return de(s.type, a, c);
309
309
  case v: {
310
310
  var p = s, T = p._payload, E = p._init;
311
311
  try {
312
- return ue(E(T), a, c);
312
+ return de(E(T), a, c);
313
313
  } catch {
314
314
  }
315
315
  }
316
316
  }
317
317
  return "";
318
318
  }
319
- var ee = Object.prototype.hasOwnProperty, Te = {}, Ee = b.ReactDebugCurrentFrame;
320
- function he(s) {
319
+ var Z = Object.prototype.hasOwnProperty, Ne = {}, Ce = b.ReactDebugCurrentFrame;
320
+ function ue(s) {
321
321
  if (s) {
322
- var a = s._owner, c = ue(s.type, s._source, a ? a.type : null);
323
- Ee.setExtraStackFrame(c);
322
+ var a = s._owner, c = de(s.type, s._source, a ? a.type : null);
323
+ Ce.setExtraStackFrame(c);
324
324
  } else
325
- Ee.setExtraStackFrame(null);
325
+ Ce.setExtraStackFrame(null);
326
326
  }
327
- function ss(s, a, c, p, T) {
327
+ function Xe(s, a, c, p, T) {
328
328
  {
329
- var E = Function.call.bind(ee);
329
+ var E = Function.call.bind(Z);
330
330
  for (var k in s)
331
331
  if (E(s, k)) {
332
332
  var w = void 0;
333
333
  try {
334
334
  if (typeof s[k] != "function") {
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;
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;
337
337
  }
338
338
  w = s[k](a, k, p, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
339
339
  } catch (_) {
340
340
  w = _;
341
341
  }
342
- w && !(w instanceof Error) && (he(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), he(null)), w instanceof Error && !(w.message in Te) && (Te[w.message] = !0, he(T), C("Failed %s type: %s", c, w.message), he(null));
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));
343
343
  }
344
344
  }
345
345
  }
346
- var ts = Array.isArray;
347
- function ve(s) {
348
- return ts(s);
346
+ var Ze = Array.isArray;
347
+ function ge(s) {
348
+ return Ze(s);
349
349
  }
350
- function ns(s) {
350
+ function es(s) {
351
351
  {
352
352
  var a = typeof Symbol == "function" && Symbol.toStringTag, c = a && s[Symbol.toStringTag] || s.constructor.name || "Object";
353
353
  return c;
354
354
  }
355
355
  }
356
- function rs(s) {
356
+ function ss(s) {
357
357
  try {
358
- return Re(s), !1;
358
+ return Te(s), !1;
359
359
  } catch {
360
360
  return !0;
361
361
  }
362
362
  }
363
- function Re(s) {
363
+ function Te(s) {
364
364
  return "" + s;
365
365
  }
366
- function _e(s) {
367
- if (rs(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.", ns(s)), Re(s);
366
+ function Ee(s) {
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);
369
369
  }
370
- var Se = b.ReactCurrentOwner, is = {
370
+ var Re = b.ReactCurrentOwner, ts = {
371
371
  key: !0,
372
372
  ref: !0,
373
373
  __self: !0,
374
374
  __source: !0
375
- }, Oe, $e;
376
- function as(s) {
377
- if (ee.call(s, "ref")) {
375
+ }, _e, Se;
376
+ function ns(s) {
377
+ if (Z.call(s, "ref")) {
378
378
  var a = Object.getOwnPropertyDescriptor(s, "ref").get;
379
379
  if (a && a.isReactWarning)
380
380
  return !1;
381
381
  }
382
382
  return s.ref !== void 0;
383
383
  }
384
- function os(s) {
385
- if (ee.call(s, "key")) {
384
+ function rs(s) {
385
+ if (Z.call(s, "key")) {
386
386
  var a = Object.getOwnPropertyDescriptor(s, "key").get;
387
387
  if (a && a.isReactWarning)
388
388
  return !1;
389
389
  }
390
390
  return s.key !== void 0;
391
391
  }
392
- function ls(s, a) {
393
- typeof s.ref == "string" && Se.current;
392
+ function is(s, a) {
393
+ typeof s.ref == "string" && Re.current;
394
394
  }
395
- function cs(s, a) {
395
+ function as(s, a) {
396
396
  {
397
397
  var c = function() {
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));
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));
399
399
  };
400
400
  c.isReactWarning = !0, Object.defineProperty(s, "key", {
401
401
  get: c,
@@ -403,10 +403,10 @@ function Ts() {
403
403
  });
404
404
  }
405
405
  }
406
- function ds(s, a) {
406
+ function os(s, a) {
407
407
  {
408
408
  var c = function() {
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));
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));
410
410
  };
411
411
  c.isReactWarning = !0, Object.defineProperty(s, "ref", {
412
412
  get: c,
@@ -414,7 +414,7 @@ function Ts() {
414
414
  });
415
415
  }
416
416
  }
417
- var us = function(s, a, c, p, T, E, k) {
417
+ var ls = function(s, a, c, p, T, E, k) {
418
418
  var w = {
419
419
  // This tag allows us to uniquely identify this as a React Element
420
420
  $$typeof: t,
@@ -443,41 +443,41 @@ function Ts() {
443
443
  value: T
444
444
  }), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
445
445
  };
446
- function hs(s, a, c, p, T) {
446
+ function cs(s, a, c, p, T) {
447
447
  {
448
- var E, k = {}, w = null, P = null;
449
- c !== void 0 && (_e(c), w = "" + c), os(a) && (_e(a.key), w = "" + a.key), as(a) && (P = a.ref, ls(a, T));
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));
450
450
  for (E in a)
451
- ee.call(a, E) && !is.hasOwnProperty(E) && (k[E] = a[E]);
451
+ Z.call(a, E) && !ts.hasOwnProperty(E) && (k[E] = a[E]);
452
452
  if (s && s.defaultProps) {
453
453
  var _ = s.defaultProps;
454
454
  for (E in _)
455
455
  k[E] === void 0 && (k[E] = _[E]);
456
456
  }
457
- if (w || P) {
457
+ if (w || M) {
458
458
  var S = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
459
- w && cs(k, S), P && ds(k, S);
459
+ w && as(k, S), M && os(k, S);
460
460
  }
461
- return us(s, w, P, T, p, Se.current, k);
461
+ return ls(s, w, M, T, p, Re.current, k);
462
462
  }
463
463
  }
464
- var pe = b.ReactCurrentOwner, Ae = b.ReactDebugCurrentFrame;
465
- function Q(s) {
464
+ var ve = b.ReactCurrentOwner, Oe = b.ReactDebugCurrentFrame;
465
+ function K(s) {
466
466
  if (s) {
467
- var a = s._owner, c = ue(s.type, s._source, a ? a.type : null);
468
- Ae.setExtraStackFrame(c);
467
+ var a = s._owner, c = de(s.type, s._source, a ? a.type : null);
468
+ Oe.setExtraStackFrame(c);
469
469
  } else
470
- Ae.setExtraStackFrame(null);
470
+ Oe.setExtraStackFrame(null);
471
471
  }
472
- var be;
473
- be = !1;
474
- function je(s) {
472
+ var pe;
473
+ pe = !1;
474
+ function be(s) {
475
475
  return typeof s == "object" && s !== null && s.$$typeof === t;
476
476
  }
477
- function Pe() {
477
+ function $e() {
478
478
  {
479
- if (pe.current) {
480
- var s = I(pe.current.type);
479
+ if (ve.current) {
480
+ var s = B(ve.current.type);
481
481
  if (s)
482
482
  return `
483
483
 
@@ -486,13 +486,13 @@ Check the render method of \`` + s + "`.";
486
486
  return "";
487
487
  }
488
488
  }
489
- function fs(s) {
489
+ function ds(s) {
490
490
  return "";
491
491
  }
492
- var Me = {};
493
- function xs(s) {
492
+ var Ae = {};
493
+ function us(s) {
494
494
  {
495
- var a = Pe();
495
+ var a = $e();
496
496
  if (!a) {
497
497
  var c = typeof s == "string" ? s : s.displayName || s.name;
498
498
  c && (a = `
@@ -502,39 +502,39 @@ Check the top-level render call using <` + c + ">.");
502
502
  return a;
503
503
  }
504
504
  }
505
- function Ie(s, a) {
505
+ function Pe(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
- var c = xs(a);
511
- if (Me[c])
510
+ var c = us(a);
511
+ if (Ae[c])
512
512
  return;
513
- Me[c] = !0;
513
+ Ae[c] = !0;
514
514
  var p = "";
515
- s && s._owner && s._owner !== pe.current && (p = " It was passed a child from " + I(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 !== ve.current && (p = " It was passed a child from " + B(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 Be(s, a) {
518
+ function Me(s, a) {
519
519
  {
520
520
  if (typeof s != "object")
521
521
  return;
522
- if (ve(s))
522
+ if (ge(s))
523
523
  for (var c = 0; c < s.length; c++) {
524
524
  var p = s[c];
525
- je(p) && Ie(p, a);
525
+ be(p) && Pe(p, a);
526
526
  }
527
- else if (je(s))
527
+ else if (be(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
- je(k.value) && Ie(k.value, a);
533
+ be(k.value) && Pe(k.value, a);
534
534
  }
535
535
  }
536
536
  }
537
- function ms(s) {
537
+ function hs(s) {
538
538
  {
539
539
  var a = s.type;
540
540
  if (a == null || typeof a == "string")
@@ -549,86 +549,86 @@ Check the top-level render call using <` + c + ">.");
549
549
  else
550
550
  return;
551
551
  if (c) {
552
- var p = I(a);
553
- ss(c, s.props, "prop", p, s);
554
- } else if (a.PropTypes !== void 0 && !be) {
555
- be = !0;
556
- var T = I(a);
552
+ var p = B(a);
553
+ Xe(c, s.props, "prop", p, s);
554
+ } else if (a.PropTypes !== void 0 && !pe) {
555
+ pe = !0;
556
+ var T = B(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.");
560
560
  }
561
561
  }
562
- function gs(s) {
562
+ function fs(s) {
563
563
  {
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 We = {};
575
- function De(s, a, c, p, T, E) {
574
+ var Ie = {};
575
+ function Be(s, a, c, p, T, E) {
576
576
  {
577
- var k = A(s);
577
+ var k = P(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 P = fs();
582
- P ? w += P : w += Pe();
581
+ var M = ds();
582
+ M ? w += M : w += $e();
583
583
  var _;
584
- s === null ? _ = "null" : ve(s) ? _ = "array" : s !== void 0 && s.$$typeof === t ? (_ = "<" + (I(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);
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);
585
585
  }
586
- var S = hs(s, a, c, T, E);
586
+ var S = cs(s, a, c, T, E);
587
587
  if (S == null)
588
588
  return S;
589
589
  if (k) {
590
- var B = a.children;
591
- if (B !== void 0)
590
+ var W = a.children;
591
+ if (W !== void 0)
592
592
  if (p)
593
- if (ve(B)) {
594
- for (var G = 0; G < B.length; G++)
595
- Be(B[G], s);
596
- Object.freeze && Object.freeze(B);
593
+ if (ge(W)) {
594
+ for (var Q = 0; Q < W.length; Q++)
595
+ Me(W[Q], s);
596
+ Object.freeze && Object.freeze(W);
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
- Be(B, s);
600
+ Me(W, s);
601
601
  }
602
- if (ee.call(a, "key")) {
603
- var Y = I(s), M = Object.keys(a).filter(function(ws) {
604
- return ws !== "key";
605
- }), ye = M.length > 0 ? "{key: someKey, " + M.join(": ..., ") + ": ...}" : "{key: someKey}";
606
- if (!We[Y + ye]) {
607
- var ys = M.length > 0 ? "{" + M.join(": ..., ") + ": ...}" : "{}";
602
+ if (Z.call(a, "key")) {
603
+ var Y = B(s), I = Object.keys(a).filter(function(bs) {
604
+ return bs !== "key";
605
+ }), je = I.length > 0 ? "{key: someKey, " + I.join(": ..., ") + ": ...}" : "{key: someKey}";
606
+ if (!Ie[Y + je]) {
607
+ var ps = I.length > 0 ? "{" + I.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} />`, ye, Y, ys, Y), We[Y + ye] = !0;
613
+ <%s key={someKey} {...props} />`, je, Y, ps, Y), Ie[Y + je] = !0;
614
614
  }
615
615
  }
616
- return s === o ? gs(S) : ms(S), S;
616
+ return s === o ? fs(S) : hs(S), S;
617
617
  }
618
618
  }
619
- function vs(s, a, c) {
620
- return De(s, a, c, !0);
619
+ function xs(s, a, c) {
620
+ return Be(s, a, c, !0);
621
621
  }
622
- function ps(s, a, c) {
623
- return De(s, a, c, !1);
622
+ function ms(s, a, c) {
623
+ return Be(s, a, c, !1);
624
624
  }
625
- var bs = ps, js = vs;
626
- te.Fragment = o, te.jsx = bs, te.jsxs = js;
627
- }()), te;
625
+ var gs = ms, vs = xs;
626
+ se.Fragment = o, se.jsx = gs, se.jsxs = vs;
627
+ }()), se;
628
628
  }
629
- process.env.NODE_ENV === "production" ? ke.exports = Cs() : ke.exports = Ts();
630
- var e = ke.exports;
631
- const Es = ({ 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: fe, useEffect: Rs, useRef: ze, useLayoutEffect: Ve } = J, _s = ({
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 } = O, Ts = ({
632
632
  mode: r = "floating",
633
633
  isOpen: t = !0,
634
634
  embedded: n = !1,
@@ -641,37 +641,37 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
641
641
  onDrawerOpenChange: j,
642
642
  headerActions: g
643
643
  }) => {
644
- const [y, v] = fe(!1), [l, u] = fe(!1), N = m !== void 0 ? m : l, h = (A) => {
645
- u(A), j == null || j(A);
646
- }, [b, C] = fe(!1), R = ze(null), [$, W] = fe(!0);
647
- Rs(() => {
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);
647
+ Cs(() => {
648
648
  v(!0);
649
649
  }, []);
650
650
  const z = () => {
651
651
  R.current && (R.current.scrollTop = R.current.scrollHeight);
652
- }, X = () => {
652
+ }, G = () => {
653
653
  if (!R.current) return;
654
- const { scrollTop: A, scrollHeight: Z, clientHeight: U } = R.current, I = Z - A - U;
655
- C(I > 100), W(I < 50);
656
- }, V = ze(null);
657
- if (Ve(() => {
658
- $ && z();
659
- }, [d, $]), Ve(() => {
654
+ const { scrollTop: P, scrollHeight: X, clientHeight: U } = R.current, B = X - P - U;
655
+ C(B > 100), D(B < 50);
656
+ }, V = Fe(null);
657
+ if (Le(() => {
658
+ A && z();
659
+ }, [d, A]), Le(() => {
660
660
  if (!V.current) return;
661
- const A = new ResizeObserver(() => {
662
- $ && z();
661
+ const P = new ResizeObserver(() => {
662
+ A && z();
663
663
  });
664
- return A.observe(V.current), () => A.disconnect();
665
- }, [$]), !y) return null;
664
+ return P.observe(V.current), () => P.disconnect();
665
+ }, [A]), !y) return null;
666
666
  if (!t && r === "floating" && !n)
667
- return /* @__PURE__ */ e.jsx(Es, { onClick: () => i == null ? void 0 : i() });
668
- const K = [
667
+ return /* @__PURE__ */ e.jsx(Ns, { onClick: () => i == null ? void 0 : i() });
668
+ const q = [
669
669
  "cb-chat-container",
670
670
  `cb-mode-${r}`,
671
671
  t ? "cb-open" : "cb-closed",
672
672
  n ? "cb-embedded" : null
673
673
  ].filter(Boolean).join(" ");
674
- return /* @__PURE__ */ e.jsxs("div", { className: K, children: [
674
+ return /* @__PURE__ */ e.jsxs("div", { className: q, 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: [
@@ -698,7 +698,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
698
698
  {
699
699
  className: "cb-scroll-view",
700
700
  ref: R,
701
- onScroll: X,
701
+ onScroll: G,
702
702
  children: /* @__PURE__ */ e.jsx("div", { ref: V, children: d })
703
703
  }
704
704
  ),
@@ -715,14 +715,14 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
715
715
  ] })
716
716
  ] })
717
717
  ] });
718
- }, { useState: Ue } = J, Ss = ({
718
+ }, { useState: Je } = O, Es = ({
719
719
  onClose: r,
720
720
  webSearchEnabled: t = !1,
721
721
  onWebSearchChange: n,
722
722
  pageContextEnabled: o = !1,
723
723
  onPageContextChange: i
724
724
  }) => {
725
- const [d, f] = Ue("rovo"), [x, m] = Ue({
725
+ const [d, f] = Je("rovo"), [x, m] = Je({
726
726
  knowledge: !0,
727
727
  autoApply: !0
728
728
  }), j = (v) => {
@@ -814,7 +814,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
814
814
  ] })
815
815
  ] })
816
816
  ] }) });
817
- }, Os = ({ 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: 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: [
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,7 +845,7 @@ const Es = ({ 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: He, useRef: $s, useEffect: As } = J, Ps = ({
848
+ ] }) }) }), { useState: ze, useRef: _s, useEffect: Ss } = O, Os = ({
849
849
  onSend: r,
850
850
  disabled: t = !1,
851
851
  placeholder: n = "Ask, @mention, or / for actions",
@@ -854,8 +854,8 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
854
854
  pageContextEnabled: d = !1,
855
855
  onPageContextChange: f
856
856
  }) => {
857
- const [x, m] = He(""), [j, g] = He(null), y = $s(null);
858
- As(() => {
857
+ const [x, m] = ze(""), [j, g] = ze(null), y = _s(null);
858
+ Ss(() => {
859
859
  const u = (N) => {
860
860
  y.current && !y.current.contains(N.target) && g(null);
861
861
  };
@@ -868,7 +868,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
868
868
  };
869
869
  return /* @__PURE__ */ e.jsxs("div", { className: "cb-composer", ref: y, children: [
870
870
  j === "reasoning" && /* @__PURE__ */ e.jsx(
871
- Ss,
871
+ Es,
872
872
  {
873
873
  onClose: () => g(null),
874
874
  webSearchEnabled: o,
@@ -877,7 +877,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
877
877
  onPageContextChange: f
878
878
  }
879
879
  ),
880
- j === "plus" && /* @__PURE__ */ e.jsx(Os, { onClose: () => g(null) }),
880
+ j === "plus" && /* @__PURE__ */ e.jsx(Rs, { onClose: () => g(null) }),
881
881
  /* @__PURE__ */ e.jsxs("div", { className: "cb-composer-input-wrapper", children: [
882
882
  /* @__PURE__ */ e.jsx(
883
883
  "textarea",
@@ -947,13 +947,13 @@ const Es = ({ 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: Ms } = J, Ye = ({
950
+ }, { useState: $s } = O, Ve = ({
951
951
  toolName: r,
952
952
  status: t,
953
953
  args: n,
954
954
  result: o
955
955
  }) => {
956
- const [i, d] = Ms(!1), f = r === "web_search" || r === "search_web";
956
+ const [i, d] = $s(!1), f = r === "web_search" || r === "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" }) }) }),
@@ -987,7 +987,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
987
987
  ] })
988
988
  ] }) })
989
989
  ] });
990
- }, Is = ({
990
+ }, As = ({
991
991
  toolCallId: r,
992
992
  label: t,
993
993
  description: n,
@@ -1047,7 +1047,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1047
1047
  }
1048
1048
  )
1049
1049
  ] })
1050
- ] }), { useState: Ne, useEffect: qe, useRef: Ke } = J, Bs = (r) => {
1050
+ ] }), { useState: we, useEffect: Ue, useRef: He } = O, Ps = (r) => {
1051
1051
  const {
1052
1052
  role: t,
1053
1053
  steps: n,
@@ -1065,13 +1065,13 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1065
1065
  /* @__PURE__ */ e.jsx("div", { className: "cb-steps-container", children: n.map((i, d) => {
1066
1066
  const f = d === n.length - 1;
1067
1067
  return i.type === "thinking" ? /* @__PURE__ */ e.jsx(
1068
- Ws,
1068
+ Ms,
1069
1069
  {
1070
1070
  step: i
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
- Ye,
1074
+ Ve,
1075
1075
  {
1076
1076
  toolName: i.toolName || "Tool",
1077
1077
  args: i.toolArgs,
@@ -1079,7 +1079,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1079
1079
  result: i.toolResult
1080
1080
  }
1081
1081
  ) }, i.id) : i.type === "confirm-request" ? /* @__PURE__ */ e.jsx("div", { className: "cb-step-confirm", style: { marginBottom: 8 }, children: /* @__PURE__ */ e.jsx(
1082
- Is,
1082
+ As,
1083
1083
  {
1084
1084
  toolCallId: i.toolCallId || i.id,
1085
1085
  toolName: i.toolName || "Tool",
@@ -1092,7 +1092,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
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(
1095
- Ds,
1095
+ Is,
1096
1096
  {
1097
1097
  content: i.content || "",
1098
1098
  shouldAnimate: o && f,
@@ -1101,9 +1101,9 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1101
1101
  ) }, i.id) : null;
1102
1102
  }) })
1103
1103
  ] })
1104
- ] }) : /* @__PURE__ */ e.jsx(Fs, { ...r });
1105
- }, Ws = ({ step: r }) => {
1106
- const [t, n] = Ne(!1), o = r.isFinished;
1104
+ ] }) : /* @__PURE__ */ e.jsx(Bs, { ...r });
1105
+ }, Ms = ({ step: r }) => {
1106
+ const [t, n] = we(!1), o = r.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",
@@ -1148,9 +1148,9 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1148
1148
  @keyframes spin { to { transform: rotate(360deg); } }
1149
1149
  ` })
1150
1150
  ] });
1151
- }, Ds = ({ content: r, shouldAnimate: t, onComplete: n }) => {
1152
- const [o, i] = Ne(t ? "" : r), d = Ke(!1);
1153
- return qe(() => {
1151
+ }, Is = ({ content: r, shouldAnimate: t, onComplete: n }) => {
1152
+ const [o, i] = we(t ? "" : r), d = He(!1);
1153
+ return Ue(() => {
1154
1154
  if (d.current = !1, !t || !r) {
1155
1155
  i(r), d.current || (d.current = !0, n == null || n());
1156
1156
  return;
@@ -1169,15 +1169,15 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1169
1169
  o,
1170
1170
  t && r && o.length < r.length && /* @__PURE__ */ e.jsx("span", { className: "cb-cursor", children: "|" })
1171
1171
  ] });
1172
- }, Fs = (r) => {
1172
+ }, Bs = (r) => {
1173
1173
  const {
1174
1174
  role: t,
1175
1175
  content: n,
1176
1176
  attachments: o,
1177
1177
  toolInvocation: i,
1178
1178
  shouldAnimate: d = !0
1179
- } = r, [f, x] = Ne(""), m = Ke(!1);
1180
- return qe(() => {
1179
+ } = r, [f, x] = we(""), m = He(!1);
1180
+ return Ue(() => {
1181
1181
  var N;
1182
1182
  if (m.current = !1, t !== "assistant" || !n || !d) {
1183
1183
  x(n || ""), m.current || (m.current = !0, (N = r.onAnimationComplete) == null || N.call(r));
@@ -1198,7 +1198,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1198
1198
  }, [n, 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
- Ye,
1201
+ Ve,
1202
1202
  {
1203
1203
  toolName: i.toolName,
1204
1204
  args: i.args,
@@ -1224,14 +1224,14 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1224
1224
  ] })
1225
1225
  ] })
1226
1226
  ] });
1227
- }, Ls = () => /* @__PURE__ */ e.jsxs("div", { className: "cb-thinking-container", children: [
1227
+ }, Ws = () => /* @__PURE__ */ e.jsxs("div", { className: "cb-thinking-container", children: [
1228
1228
  /* @__PURE__ */ e.jsxs("div", { className: "cb-thinking-dots", children: [
1229
1229
  /* @__PURE__ */ e.jsx("div", { className: "cb-dot" }),
1230
1230
  /* @__PURE__ */ e.jsx("div", { className: "cb-dot" }),
1231
1231
  /* @__PURE__ */ e.jsx("div", { className: "cb-dot" })
1232
1232
  ] }),
1233
1233
  /* @__PURE__ */ e.jsx("span", { className: "cb-thinking-text", children: "Thinking..." })
1234
- ] }), Js = ({
1234
+ ] }), Ds = ({
1235
1235
  userName: r = "User",
1236
1236
  actions: t = []
1237
1237
  }) => /* @__PURE__ */ e.jsxs("div", { className: "cb-welcome-container", children: [
@@ -1250,7 +1250,7 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1250
1250
  /* @__PURE__ */ e.jsx("div", { className: "cb-action-icon", children: n.icon }),
1251
1251
  /* @__PURE__ */ e.jsx("span", { className: "cb-action-label", children: n.label })
1252
1252
  ] }, n.id)) })
1253
- ] }), zs = ({
1253
+ ] }), Fs = ({
1254
1254
  onNewChat: r,
1255
1255
  agents: t,
1256
1256
  chatHistory: n
@@ -1292,8 +1292,8 @@ const Es = ({ 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: Vs } = J, Us = ({ queue: r, onDelete: t }) => {
1296
- const [n, o] = Vs(!1);
1295
+ ] }), { useState: Ls } = O, Js = ({ queue: r, onDelete: t }) => {
1296
+ const [n, o] = Ls(!1);
1297
1297
  if (r.length === 0) return null;
1298
1298
  const i = () => o(!n);
1299
1299
  return /* @__PURE__ */ e.jsxs("div", { className: `cb-pending-messages ${n ? "expanded" : "collapsed"}`, children: [
@@ -1326,18 +1326,18 @@ const Es = ({ onClick: r }) => /* @__PURE__ */ e.jsx("button", { className: "cb-
1326
1326
  ] }, f)) })
1327
1327
  ] });
1328
1328
  };
1329
- class Qs {
1329
+ class Ys {
1330
1330
  constructor(t, n) {
1331
- D(this, "accessToken", null);
1332
- D(this, "apiBaseUrl", "http://localhost:8000/api");
1333
- D(this, "messages", []);
1334
- D(this, "currentModel", null);
1335
- D(this, "currentProvider", null);
1336
- D(this, "enabledTools", []);
1337
- D(this, "currentJobId", null);
1338
- D(this, "pageReadingCallback", null);
1339
- D(this, "customHandlers", /* @__PURE__ */ new Map());
1340
- D(this, "libraryTools", /* @__PURE__ */ new Set());
1331
+ F(this, "accessToken", null);
1332
+ F(this, "apiBaseUrl", "http://localhost:8000/api");
1333
+ F(this, "messages", []);
1334
+ F(this, "currentModel", null);
1335
+ F(this, "currentProvider", null);
1336
+ F(this, "enabledTools", []);
1337
+ F(this, "currentJobId", null);
1338
+ F(this, "pageReadingCallback", null);
1339
+ F(this, "customHandlers", /* @__PURE__ */ new Map());
1340
+ F(this, "libraryTools", /* @__PURE__ */ new Set());
1341
1341
  this.accessToken = t, n && (this.apiBaseUrl = n);
1342
1342
  }
1343
1343
  setToken(t) {
@@ -1703,19 +1703,19 @@ class Qs {
1703
1703
  }
1704
1704
  if (x === "UL" || x === "OL")
1705
1705
  return t.querySelectorAll(":scope > li").forEach((b, C) => {
1706
- var W;
1707
- const R = x === "OL" ? `${C + 1}.` : "-", $ = (W = b.textContent) == null ? void 0 : W.trim();
1708
- $ && (i += `${o}${R} ${$}
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}
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(($) => {
1716
- var W;
1717
- return (W = $.textContent) == null ? void 0 : W.trim();
1718
- }).filter(($) => $).join(" | ");
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();
1718
+ }).filter((A) => A).join(" | ");
1719
1719
  R && (i += `${o} ${R}
1720
1720
  `);
1721
1721
  }), i += `
@@ -1743,14 +1743,14 @@ class Qs {
1743
1743
  }), i);
1744
1744
  }
1745
1745
  }
1746
- const Hs = "http://localhost:11700";
1747
- class Gs {
1746
+ const zs = "http://localhost:11700";
1747
+ class qs {
1748
1748
  /**
1749
1749
  * Fetches a new access token from the auth broker.
1750
1750
  */
1751
1751
  static async getInitialToken() {
1752
1752
  try {
1753
- const t = await fetch(`${Hs}/request-token`, {
1753
+ const t = await fetch(`${zs}/request-token`, {
1754
1754
  method: "POST",
1755
1755
  headers: {
1756
1756
  "Content-Type": "application/json"
@@ -1773,13 +1773,13 @@ class Gs {
1773
1773
  return console.log("Refreshing token via broker..."), this.getInitialToken();
1774
1774
  }
1775
1775
  }
1776
- const Ys = ({ client: r, onToolCall: t }) => {
1777
- const [n, o] = q({ messages: [], isThinking: !1 }), [i, d] = q([]), [f, x] = q(!1), [m, j] = q(!1), g = Fe(/* @__PURE__ */ new Set()), y = Fe(0);
1778
- we(() => {
1776
+ const Vs = ({ client: r, onToolCall: t }) => {
1777
+ const [n, o] = O.useState({ messages: [], isThinking: !1 }), [i, d] = O.useState([]), [f, x] = O.useState(!1), [m, j] = O.useState(!1), g = O.useRef(/* @__PURE__ */ new Set()), y = O.useRef(0);
1778
+ O.useEffect(() => {
1779
1779
  r && t && "setToolHandler" in r && Object.entries(t).forEach(([h, b]) => {
1780
1780
  r.setToolHandler(h, b);
1781
1781
  });
1782
- }, [r, t]), we(() => {
1782
+ }, [r, t]), O.useEffect(() => {
1783
1783
  (async () => {
1784
1784
  if (!r || i.length === 0 || n.isThinking) return;
1785
1785
  const b = n.messages[n.messages.length - 1];
@@ -1795,7 +1795,7 @@ const Ys = ({ client: r, onToolCall: t }) => {
1795
1795
  x(!1);
1796
1796
  }
1797
1797
  })();
1798
- }, [i, f, m, n.isThinking, n.messages, r]), we(() => {
1798
+ }, [i, f, m, n.isThinking, n.messages, r]), O.useEffect(() => {
1799
1799
  if (n.messages.length > y.current) {
1800
1800
  const h = n.messages[n.messages.length - 1];
1801
1801
  h.role === "assistant" && (h.content || h.steps && h.steps.length > 0) && j(!0);
@@ -1825,7 +1825,7 @@ const Ys = ({ client: r, onToolCall: t }) => {
1825
1825
  finishedMessageIds: g.current,
1826
1826
  reset: N
1827
1827
  };
1828
- }, Xs = ({
1828
+ }, Ks = ({
1829
1829
  client: r,
1830
1830
  mode: t = "floating",
1831
1831
  isOpen: n = !0,
@@ -1843,37 +1843,37 @@ const Ys = ({ client: r, onToolCall: t }) => {
1843
1843
  pageContextEnabled: u,
1844
1844
  onPageContextChange: N
1845
1845
  }) => {
1846
- const [h, b] = q(!1), [C, R] = q(!1), [$, W] = q(!1), z = v !== void 0 ? v : C, X = u !== void 0 ? u : $, V = (O) => {
1847
- l ? l(O) : R(O), r == null || r.enableWebSearch(O);
1848
- }, K = (O) => {
1849
- N ? N(O) : W(O), r == null || r.enablePageContext(O);
1846
+ const [h, b] = O.useState(!1), [C, R] = O.useState(!1), [A, D] = O.useState(!1), z = v !== void 0 ? v : C, G = u !== void 0 ? u : A, V = ($) => {
1847
+ l ? l($) : R($), r == null || r.enableWebSearch($);
1848
+ }, q = ($) => {
1849
+ N ? N($) : D($), r == null || r.enablePageContext($);
1850
1850
  }, {
1851
- messages: A,
1852
- isThinking: Z,
1851
+ messages: P,
1852
+ isThinking: X,
1853
1853
  messageQueue: U,
1854
- sendMessage: I,
1855
- removeQueueItem: F,
1854
+ sendMessage: B,
1855
+ removeQueueItem: L,
1856
1856
  handleAnimationComplete: H,
1857
- finishedMessageIds: ne,
1858
- reset: re
1859
- } = Ys({ client: r, onToolCall: g }), ie = (O) => {
1860
- var L;
1861
- (L = r == null ? void 0 : r.sendConfirmResponse) == null || L.call(r, O, !0);
1862
- }, ae = (O) => {
1863
- var L;
1864
- (L = r == null ? void 0 : r.sendConfirmResponse) == null || L.call(r, O, !1);
1865
- }, oe = () => {
1866
- re(), b(!1);
1867
- }, le = /* @__PURE__ */ e.jsx(
1868
- zs,
1857
+ finishedMessageIds: te,
1858
+ reset: ne
1859
+ } = Vs({ client: r, onToolCall: g }), re = ($) => {
1860
+ var J;
1861
+ (J = r == null ? void 0 : r.sendConfirmResponse) == null || J.call(r, $, !0);
1862
+ }, ie = ($) => {
1863
+ var J;
1864
+ (J = r == null ? void 0 : r.sendConfirmResponse) == null || J.call(r, $, !1);
1865
+ }, ae = () => {
1866
+ ne(), b(!1);
1867
+ }, oe = /* @__PURE__ */ e.jsx(
1868
+ Fs,
1869
1869
  {
1870
- onNewChat: oe,
1870
+ onNewChat: ae,
1871
1871
  agents: m,
1872
1872
  chatHistory: j
1873
1873
  }
1874
1874
  );
1875
1875
  return /* @__PURE__ */ e.jsx(
1876
- _s,
1876
+ Ts,
1877
1877
  {
1878
1878
  mode: t,
1879
1879
  isOpen: n,
@@ -1882,59 +1882,59 @@ const Ys = ({ client: r, onToolCall: t }) => {
1882
1882
  onOpen: i,
1883
1883
  isDrawerOpen: h,
1884
1884
  onDrawerOpenChange: b,
1885
- drawerContent: le,
1885
+ drawerContent: oe,
1886
1886
  headerActions: y,
1887
1887
  footer: /* @__PURE__ */ e.jsxs("div", { style: { display: "flex", flexDirection: "column", width: "100%" }, children: [
1888
1888
  /* @__PURE__ */ e.jsx(
1889
- Us,
1889
+ Js,
1890
1890
  {
1891
1891
  queue: U,
1892
- onDelete: F
1892
+ onDelete: L
1893
1893
  }
1894
1894
  ),
1895
1895
  /* @__PURE__ */ e.jsx(
1896
- Ps,
1896
+ Os,
1897
1897
  {
1898
- onSend: I,
1898
+ onSend: B,
1899
1899
  disabled: !1,
1900
1900
  placeholder: U.length > 0 ? "Queued..." : "Type a message...",
1901
1901
  webSearchEnabled: z,
1902
1902
  onWebSearchChange: V,
1903
- pageContextEnabled: X,
1904
- onPageContextChange: K
1903
+ pageContextEnabled: G,
1904
+ onPageContextChange: q
1905
1905
  }
1906
1906
  )
1907
1907
  ] }),
1908
- children: A.length === 0 ? /* @__PURE__ */ e.jsx(Js, { userName: f, actions: x }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1909
- A.map((O) => /* @__PURE__ */ e.jsx(
1910
- Bs,
1908
+ children: P.length === 0 ? /* @__PURE__ */ e.jsx(Ds, { userName: f, actions: x }) : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1909
+ P.map(($) => /* @__PURE__ */ e.jsx(
1910
+ Ps,
1911
1911
  {
1912
- ...O,
1913
- shouldAnimate: !ne.has(O.id),
1914
- onAnimationComplete: () => H(O.id),
1915
- onConfirm: ie,
1916
- onReject: ae
1912
+ ...$,
1913
+ shouldAnimate: !te.has($.id),
1914
+ onAnimationComplete: () => H($.id),
1915
+ onConfirm: re,
1916
+ onReject: ie
1917
1917
  },
1918
- O.id
1918
+ $.id
1919
1919
  )),
1920
- Z && (!A.length || A[A.length - 1].role !== "assistant") && /* @__PURE__ */ e.jsx("div", { style: { paddingLeft: "16px" }, children: /* @__PURE__ */ e.jsx(Ls, {}) })
1920
+ X && (!P.length || P[P.length - 1].role !== "assistant") && /* @__PURE__ */ e.jsx("div", { style: { paddingLeft: "16px" }, children: /* @__PURE__ */ e.jsx(Ws, {}) })
1921
1921
  ] })
1922
1922
  }
1923
1923
  );
1924
1924
  };
1925
1925
  export {
1926
- Gs as AuthClient,
1927
- _s as ChatContainer,
1928
- Es as ChatLauncher,
1929
- Xs as Chatbot,
1930
- Ps as Composer,
1931
- Is as ConfirmButtons,
1932
- Bs as MessageBubble,
1933
- zs as NavigationSidebar,
1934
- Us as PendingMessageList,
1935
- Qs as RealChatClient,
1936
- Ls as ThinkingIndicator,
1937
- Ye as ToolInvocation,
1938
- Js as WelcomeScreen,
1939
- Ys as useChat
1926
+ qs as AuthClient,
1927
+ Ts as ChatContainer,
1928
+ Ns as ChatLauncher,
1929
+ Ks as Chatbot,
1930
+ Os as Composer,
1931
+ As as ConfirmButtons,
1932
+ Ps as MessageBubble,
1933
+ Fs as NavigationSidebar,
1934
+ Js as PendingMessageList,
1935
+ Ys as RealChatClient,
1936
+ Ws as ThinkingIndicator,
1937
+ Ve as ToolInvocation,
1938
+ Ds as WelcomeScreen,
1939
+ Vs as useChat
1940
1940
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowdit-chatbot-library",
3
- "version": "1.3.5",
3
+ "version": "1.3.6",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",