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.
- package/dist/index.mjs +321 -321
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
var
|
|
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
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
var r =
|
|
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
|
|
27
|
+
return ee.Fragment = n, ee.jsx = f, ee.jsxs = f, ee;
|
|
28
28
|
}
|
|
29
|
-
var
|
|
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
|
|
40
|
-
function
|
|
41
|
-
return
|
|
42
|
-
var r =
|
|
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
|
|
68
|
-
|
|
69
|
-
function
|
|
70
|
-
return !!(typeof s == "string" || typeof s == "function" || s === o || s === d || V || s === i || s === j || s === g ||
|
|
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 ===
|
|
74
|
+
s.$$typeof === q || s.getModuleId !== void 0));
|
|
75
75
|
}
|
|
76
|
-
function
|
|
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
|
|
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
|
|
116
|
+
return X(s, s.render, "ForwardRef");
|
|
117
117
|
case y:
|
|
118
118
|
var p = s.displayName || null;
|
|
119
|
-
return p !== null ? p :
|
|
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
|
|
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
|
|
132
|
-
function
|
|
131
|
+
var L = Object.assign, H = 0, te, ne, re, ie, ae, oe, $;
|
|
132
|
+
function J() {
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
function
|
|
134
|
+
J.__reactDisabledLog = !0;
|
|
135
|
+
function Ye() {
|
|
136
136
|
{
|
|
137
137
|
if (H === 0) {
|
|
138
|
-
|
|
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:
|
|
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
|
|
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:
|
|
167
|
+
log: L({}, s, {
|
|
168
|
+
value: te
|
|
169
|
+
}),
|
|
170
|
+
info: L({}, s, {
|
|
168
171
|
value: ne
|
|
169
172
|
}),
|
|
170
|
-
|
|
173
|
+
warn: L({}, s, {
|
|
171
174
|
value: re
|
|
172
175
|
}),
|
|
173
|
-
|
|
176
|
+
error: L({}, s, {
|
|
174
177
|
value: ie
|
|
175
178
|
}),
|
|
176
|
-
|
|
179
|
+
group: L({}, s, {
|
|
177
180
|
value: ae
|
|
178
181
|
}),
|
|
179
|
-
|
|
182
|
+
groupCollapsed: L({}, s, {
|
|
180
183
|
value: oe
|
|
181
184
|
}),
|
|
182
|
-
|
|
183
|
-
value:
|
|
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
|
|
194
|
-
function
|
|
193
|
+
var fe = b.ReactCurrentDispatcher, xe;
|
|
194
|
+
function le(s, a, c) {
|
|
195
195
|
{
|
|
196
|
-
if (
|
|
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
|
-
|
|
201
|
+
xe = p && p[1] || "";
|
|
202
202
|
}
|
|
203
203
|
return `
|
|
204
|
-
` +
|
|
204
|
+
` + xe + s;
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
var
|
|
207
|
+
var me = !1, ce;
|
|
208
208
|
{
|
|
209
|
-
var
|
|
210
|
-
|
|
209
|
+
var Ke = typeof WeakMap == "function" ? WeakMap : Map;
|
|
210
|
+
ce = new Ke();
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
if (!s ||
|
|
212
|
+
function ke(s, a) {
|
|
213
|
+
if (!s || me)
|
|
214
214
|
return "";
|
|
215
215
|
{
|
|
216
|
-
var c =
|
|
216
|
+
var c = ce.get(s);
|
|
217
217
|
if (c !== void 0)
|
|
218
218
|
return c;
|
|
219
219
|
}
|
|
220
220
|
var p;
|
|
221
|
-
|
|
221
|
+
me = !0;
|
|
222
222
|
var T = Error.prepareStackTrace;
|
|
223
223
|
Error.prepareStackTrace = void 0;
|
|
224
224
|
var E;
|
|
225
|
-
E =
|
|
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 (
|
|
239
|
-
p =
|
|
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 (
|
|
246
|
-
p =
|
|
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 (
|
|
254
|
-
p =
|
|
253
|
+
} catch (I) {
|
|
254
|
+
p = I;
|
|
255
255
|
}
|
|
256
256
|
s();
|
|
257
257
|
}
|
|
258
|
-
} catch (
|
|
259
|
-
if (
|
|
260
|
-
for (var w =
|
|
261
|
-
`),
|
|
262
|
-
`), _ = w.length - 1, 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[_] !==
|
|
265
|
+
if (w[_] !== M[S]) {
|
|
266
266
|
if (_ !== 1 || S !== 1)
|
|
267
267
|
do
|
|
268
|
-
if (_--, S--, S < 0 || w[_] !==
|
|
269
|
-
var
|
|
268
|
+
if (_--, S--, S < 0 || w[_] !== M[S]) {
|
|
269
|
+
var W = `
|
|
270
270
|
` + w[_].replace(" at new ", " at ");
|
|
271
|
-
return s.displayName &&
|
|
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
|
-
|
|
278
|
+
me = !1, fe.current = E, qe(), Error.prepareStackTrace = T;
|
|
279
279
|
}
|
|
280
|
-
var
|
|
281
|
-
return typeof s == "function" &&
|
|
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
|
|
284
|
-
return
|
|
283
|
+
function Qe(s, a, c) {
|
|
284
|
+
return ke(s, !1);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Ge(s) {
|
|
287
287
|
var a = s.prototype;
|
|
288
288
|
return !!(a && a.isReactComponent);
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function de(s, a, c) {
|
|
291
291
|
if (s == null)
|
|
292
292
|
return "";
|
|
293
293
|
if (typeof s == "function")
|
|
294
|
-
return
|
|
294
|
+
return ke(s, Ge(s));
|
|
295
295
|
if (typeof s == "string")
|
|
296
|
-
return
|
|
296
|
+
return le(s);
|
|
297
297
|
switch (s) {
|
|
298
298
|
case j:
|
|
299
|
-
return
|
|
299
|
+
return le("Suspense");
|
|
300
300
|
case g:
|
|
301
|
-
return
|
|
301
|
+
return le("SuspenseList");
|
|
302
302
|
}
|
|
303
303
|
if (typeof s == "object")
|
|
304
304
|
switch (s.$$typeof) {
|
|
305
305
|
case m:
|
|
306
|
-
return
|
|
306
|
+
return Qe(s.render);
|
|
307
307
|
case y:
|
|
308
|
-
return
|
|
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
|
|
312
|
+
return de(E(T), a, c);
|
|
313
313
|
} catch {
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
return "";
|
|
318
318
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
319
|
+
var Z = Object.prototype.hasOwnProperty, Ne = {}, Ce = b.ReactDebugCurrentFrame;
|
|
320
|
+
function ue(s) {
|
|
321
321
|
if (s) {
|
|
322
|
-
var a = s._owner, c =
|
|
323
|
-
|
|
322
|
+
var a = s._owner, c = de(s.type, s._source, a ? a.type : null);
|
|
323
|
+
Ce.setExtraStackFrame(c);
|
|
324
324
|
} else
|
|
325
|
-
|
|
325
|
+
Ce.setExtraStackFrame(null);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function Xe(s, a, c, p, T) {
|
|
328
328
|
{
|
|
329
|
-
var E = Function.call.bind(
|
|
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
|
|
336
|
-
throw
|
|
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) && (
|
|
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
|
|
347
|
-
function
|
|
348
|
-
return
|
|
346
|
+
var Ze = Array.isArray;
|
|
347
|
+
function ge(s) {
|
|
348
|
+
return Ze(s);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
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
|
|
356
|
+
function ss(s) {
|
|
357
357
|
try {
|
|
358
|
-
return
|
|
358
|
+
return Te(s), !1;
|
|
359
359
|
} catch {
|
|
360
360
|
return !0;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Te(s) {
|
|
364
364
|
return "" + s;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
if (
|
|
368
|
-
return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
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
|
|
370
|
+
var Re = b.ReactCurrentOwner, ts = {
|
|
371
371
|
key: !0,
|
|
372
372
|
ref: !0,
|
|
373
373
|
__self: !0,
|
|
374
374
|
__source: !0
|
|
375
|
-
},
|
|
376
|
-
function
|
|
377
|
-
if (
|
|
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
|
|
385
|
-
if (
|
|
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
|
|
393
|
-
typeof s.ref == "string" &&
|
|
392
|
+
function is(s, a) {
|
|
393
|
+
typeof s.ref == "string" && Re.current;
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function as(s, a) {
|
|
396
396
|
{
|
|
397
397
|
var c = function() {
|
|
398
|
-
|
|
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
|
|
406
|
+
function os(s, a) {
|
|
407
407
|
{
|
|
408
408
|
var c = function() {
|
|
409
|
-
|
|
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
|
|
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
|
|
446
|
+
function cs(s, a, c, p, T) {
|
|
447
447
|
{
|
|
448
|
-
var E, k = {}, w = null,
|
|
449
|
-
c !== void 0 && (
|
|
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
|
-
|
|
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 ||
|
|
457
|
+
if (w || M) {
|
|
458
458
|
var S = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
|
|
459
|
-
w &&
|
|
459
|
+
w && as(k, S), M && os(k, S);
|
|
460
460
|
}
|
|
461
|
-
return
|
|
461
|
+
return ls(s, w, M, T, p, Re.current, k);
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
var
|
|
465
|
-
function
|
|
464
|
+
var ve = b.ReactCurrentOwner, Oe = b.ReactDebugCurrentFrame;
|
|
465
|
+
function K(s) {
|
|
466
466
|
if (s) {
|
|
467
|
-
var a = s._owner, c =
|
|
468
|
-
|
|
467
|
+
var a = s._owner, c = de(s.type, s._source, a ? a.type : null);
|
|
468
|
+
Oe.setExtraStackFrame(c);
|
|
469
469
|
} else
|
|
470
|
-
|
|
470
|
+
Oe.setExtraStackFrame(null);
|
|
471
471
|
}
|
|
472
|
-
var
|
|
473
|
-
|
|
474
|
-
function
|
|
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
|
|
477
|
+
function $e() {
|
|
478
478
|
{
|
|
479
|
-
if (
|
|
480
|
-
var s =
|
|
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
|
|
489
|
+
function ds(s) {
|
|
490
490
|
return "";
|
|
491
491
|
}
|
|
492
|
-
var
|
|
493
|
-
function
|
|
492
|
+
var Ae = {};
|
|
493
|
+
function us(s) {
|
|
494
494
|
{
|
|
495
|
-
var a =
|
|
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
|
|
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 =
|
|
511
|
-
if (
|
|
510
|
+
var c = us(a);
|
|
511
|
+
if (Ae[c])
|
|
512
512
|
return;
|
|
513
|
-
|
|
513
|
+
Ae[c] = !0;
|
|
514
514
|
var p = "";
|
|
515
|
-
s && s._owner && s._owner !==
|
|
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
|
|
518
|
+
function Me(s, a) {
|
|
519
519
|
{
|
|
520
520
|
if (typeof s != "object")
|
|
521
521
|
return;
|
|
522
|
-
if (
|
|
522
|
+
if (ge(s))
|
|
523
523
|
for (var c = 0; c < s.length; c++) {
|
|
524
524
|
var p = s[c];
|
|
525
|
-
|
|
525
|
+
be(p) && Pe(p, a);
|
|
526
526
|
}
|
|
527
|
-
else if (
|
|
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
|
-
|
|
533
|
+
be(k.value) && Pe(k.value, a);
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
|
-
function
|
|
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 =
|
|
553
|
-
|
|
554
|
-
} else if (a.PropTypes !== void 0 && !
|
|
555
|
-
|
|
556
|
-
var T =
|
|
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
|
|
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
|
-
|
|
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 && (
|
|
571
|
+
s.ref !== null && (K(s), C("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
|
572
572
|
}
|
|
573
573
|
}
|
|
574
|
-
var
|
|
575
|
-
function
|
|
574
|
+
var Ie = {};
|
|
575
|
+
function Be(s, a, c, p, T, E) {
|
|
576
576
|
{
|
|
577
|
-
var k =
|
|
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
|
|
582
|
-
|
|
581
|
+
var M = ds();
|
|
582
|
+
M ? w += M : w += $e();
|
|
583
583
|
var _;
|
|
584
|
-
s === null ? _ = "null" :
|
|
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 =
|
|
586
|
+
var S = cs(s, a, c, T, E);
|
|
587
587
|
if (S == null)
|
|
588
588
|
return S;
|
|
589
589
|
if (k) {
|
|
590
|
-
var
|
|
591
|
-
if (
|
|
590
|
+
var W = a.children;
|
|
591
|
+
if (W !== void 0)
|
|
592
592
|
if (p)
|
|
593
|
-
if (
|
|
594
|
-
for (var
|
|
595
|
-
|
|
596
|
-
Object.freeze && Object.freeze(
|
|
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
|
-
|
|
600
|
+
Me(W, s);
|
|
601
601
|
}
|
|
602
|
-
if (
|
|
603
|
-
var Y =
|
|
604
|
-
return
|
|
605
|
-
}),
|
|
606
|
-
if (!
|
|
607
|
-
var
|
|
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} />`,
|
|
613
|
+
<%s key={someKey} {...props} />`, je, Y, ps, Y), Ie[Y + je] = !0;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
return s === o ?
|
|
616
|
+
return s === o ? fs(S) : hs(S), S;
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
return
|
|
619
|
+
function xs(s, a, c) {
|
|
620
|
+
return Be(s, a, c, !0);
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
622
|
+
function ms(s, a, c) {
|
|
623
|
+
return Be(s, a, c, !1);
|
|
624
624
|
}
|
|
625
|
-
var
|
|
626
|
-
|
|
627
|
-
}()),
|
|
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" ?
|
|
630
|
-
var e =
|
|
631
|
-
const
|
|
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] =
|
|
645
|
-
u(
|
|
646
|
-
}, [b, C] =
|
|
647
|
-
|
|
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
|
-
},
|
|
652
|
+
}, G = () => {
|
|
653
653
|
if (!R.current) return;
|
|
654
|
-
const { scrollTop:
|
|
655
|
-
C(
|
|
656
|
-
}, V =
|
|
657
|
-
if (
|
|
658
|
-
|
|
659
|
-
}, [d,
|
|
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
|
|
662
|
-
|
|
661
|
+
const P = new ResizeObserver(() => {
|
|
662
|
+
A && z();
|
|
663
663
|
});
|
|
664
|
-
return
|
|
665
|
-
}, [
|
|
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(
|
|
668
|
-
const
|
|
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:
|
|
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:
|
|
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:
|
|
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] =
|
|
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
|
-
},
|
|
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:
|
|
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] =
|
|
858
|
-
|
|
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
|
-
|
|
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(
|
|
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:
|
|
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] =
|
|
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
|
-
},
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
1105
|
-
},
|
|
1106
|
-
const [t, n] =
|
|
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
|
-
},
|
|
1152
|
-
const [o, i] =
|
|
1153
|
-
return
|
|
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
|
-
},
|
|
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] =
|
|
1180
|
-
return
|
|
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
|
-
|
|
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
|
-
},
|
|
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
|
-
] }),
|
|
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
|
-
] }),
|
|
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:
|
|
1296
|
-
const [n, o] =
|
|
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
|
|
1329
|
+
class Ys {
|
|
1330
1330
|
constructor(t, n) {
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
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
|
|
1707
|
-
const R = x === "OL" ? `${C + 1}.` : "-",
|
|
1708
|
-
|
|
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
|
|
1717
|
-
return (
|
|
1718
|
-
}).filter((
|
|
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
|
|
1747
|
-
class
|
|
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(`${
|
|
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
|
|
1777
|
-
const [n, o] =
|
|
1778
|
-
|
|
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]),
|
|
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]),
|
|
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
|
-
},
|
|
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] =
|
|
1847
|
-
l ? l(
|
|
1848
|
-
},
|
|
1849
|
-
N ? N(
|
|
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:
|
|
1852
|
-
isThinking:
|
|
1851
|
+
messages: P,
|
|
1852
|
+
isThinking: X,
|
|
1853
1853
|
messageQueue: U,
|
|
1854
|
-
sendMessage:
|
|
1855
|
-
removeQueueItem:
|
|
1854
|
+
sendMessage: B,
|
|
1855
|
+
removeQueueItem: L,
|
|
1856
1856
|
handleAnimationComplete: H,
|
|
1857
|
-
finishedMessageIds:
|
|
1858
|
-
reset:
|
|
1859
|
-
} =
|
|
1860
|
-
var
|
|
1861
|
-
(
|
|
1862
|
-
},
|
|
1863
|
-
var
|
|
1864
|
-
(
|
|
1865
|
-
},
|
|
1866
|
-
|
|
1867
|
-
},
|
|
1868
|
-
|
|
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:
|
|
1870
|
+
onNewChat: ae,
|
|
1871
1871
|
agents: m,
|
|
1872
1872
|
chatHistory: j
|
|
1873
1873
|
}
|
|
1874
1874
|
);
|
|
1875
1875
|
return /* @__PURE__ */ e.jsx(
|
|
1876
|
-
|
|
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:
|
|
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
|
-
|
|
1889
|
+
Js,
|
|
1890
1890
|
{
|
|
1891
1891
|
queue: U,
|
|
1892
|
-
onDelete:
|
|
1892
|
+
onDelete: L
|
|
1893
1893
|
}
|
|
1894
1894
|
),
|
|
1895
1895
|
/* @__PURE__ */ e.jsx(
|
|
1896
|
-
|
|
1896
|
+
Os,
|
|
1897
1897
|
{
|
|
1898
|
-
onSend:
|
|
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:
|
|
1904
|
-
onPageContextChange:
|
|
1903
|
+
pageContextEnabled: G,
|
|
1904
|
+
onPageContextChange: q
|
|
1905
1905
|
}
|
|
1906
1906
|
)
|
|
1907
1907
|
] }),
|
|
1908
|
-
children:
|
|
1909
|
-
|
|
1910
|
-
|
|
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
|
-
|
|
1913
|
-
shouldAnimate: !
|
|
1914
|
-
onAnimationComplete: () => H(
|
|
1915
|
-
onConfirm:
|
|
1916
|
-
onReject:
|
|
1912
|
+
...$,
|
|
1913
|
+
shouldAnimate: !te.has($.id),
|
|
1914
|
+
onAnimationComplete: () => H($.id),
|
|
1915
|
+
onConfirm: re,
|
|
1916
|
+
onReject: ie
|
|
1917
1917
|
},
|
|
1918
|
-
|
|
1918
|
+
$.id
|
|
1919
1919
|
)),
|
|
1920
|
-
|
|
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
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
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
|
};
|