@superwise.ai/superwise-chatbot-package 1.0.4 → 1.0.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/react-chatbot.es.js +653 -613
- package/dist/react-chatbot.umd.js +52 -24
- package/dist/superwise-chatbot-package.css +1 -1
- package/package.json +1 -1
package/dist/react-chatbot.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import Ne, { memo as Pe, useState as I, useRef as V, useEffect as W, useMemo as He, useCallback as Z } from "react";
|
|
2
|
+
var xe = { exports: {} }, se = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.js
|
|
@@ -9,29 +9,29 @@ var ye = { exports: {} }, ne = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
function a
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
20
|
-
|
|
21
|
-
for (var
|
|
22
|
-
|
|
23
|
-
} else
|
|
24
|
-
return
|
|
25
|
-
$$typeof:
|
|
26
|
-
type:
|
|
27
|
-
key:
|
|
28
|
-
ref:
|
|
29
|
-
props:
|
|
12
|
+
var Re;
|
|
13
|
+
function Ue() {
|
|
14
|
+
if (Re) return se;
|
|
15
|
+
Re = 1;
|
|
16
|
+
var r = Symbol.for("react.transitional.element"), n = Symbol.for("react.fragment");
|
|
17
|
+
function i(a, o, f) {
|
|
18
|
+
var c = null;
|
|
19
|
+
if (f !== void 0 && (c = "" + f), o.key !== void 0 && (c = "" + o.key), "key" in o) {
|
|
20
|
+
f = {};
|
|
21
|
+
for (var d in o)
|
|
22
|
+
d !== "key" && (f[d] = o[d]);
|
|
23
|
+
} else f = o;
|
|
24
|
+
return o = f.ref, {
|
|
25
|
+
$$typeof: r,
|
|
26
|
+
type: a,
|
|
27
|
+
key: c,
|
|
28
|
+
ref: o !== void 0 ? o : null,
|
|
29
|
+
props: f
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
return
|
|
32
|
+
return se.Fragment = n, se.jsx = i, se.jsxs = i, se;
|
|
33
33
|
}
|
|
34
|
-
var
|
|
34
|
+
var ae = {};
|
|
35
35
|
/**
|
|
36
36
|
* @license React
|
|
37
37
|
* react-jsx-runtime.development.js
|
|
@@ -41,167 +41,167 @@ var oe = {};
|
|
|
41
41
|
* This source code is licensed under the MIT license found in the
|
|
42
42
|
* LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
return
|
|
47
|
-
function t
|
|
48
|
-
if (
|
|
49
|
-
if (typeof
|
|
50
|
-
return
|
|
51
|
-
if (typeof
|
|
52
|
-
switch (
|
|
53
|
-
case
|
|
44
|
+
var _e;
|
|
45
|
+
function Be() {
|
|
46
|
+
return _e || (_e = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
+
function r(t) {
|
|
48
|
+
if (t == null) return null;
|
|
49
|
+
if (typeof t == "function")
|
|
50
|
+
return t.$$typeof === $ ? null : t.displayName || t.name || null;
|
|
51
|
+
if (typeof t == "string") return t;
|
|
52
|
+
switch (t) {
|
|
53
|
+
case x:
|
|
54
54
|
return "Fragment";
|
|
55
|
-
case
|
|
55
|
+
case _:
|
|
56
56
|
return "Profiler";
|
|
57
|
-
case
|
|
57
|
+
case M:
|
|
58
58
|
return "StrictMode";
|
|
59
|
-
case
|
|
59
|
+
case ce:
|
|
60
60
|
return "Suspense";
|
|
61
|
-
case
|
|
61
|
+
case de:
|
|
62
62
|
return "SuspenseList";
|
|
63
|
-
case
|
|
63
|
+
case ue:
|
|
64
64
|
return "Activity";
|
|
65
65
|
}
|
|
66
|
-
if (typeof
|
|
67
|
-
switch (typeof
|
|
66
|
+
if (typeof t == "object")
|
|
67
|
+
switch (typeof t.tag == "number" && console.error(
|
|
68
68
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
-
),
|
|
70
|
-
case
|
|
69
|
+
), t.$$typeof) {
|
|
70
|
+
case g:
|
|
71
71
|
return "Portal";
|
|
72
|
-
case
|
|
73
|
-
return
|
|
74
|
-
case
|
|
75
|
-
return (
|
|
76
|
-
case
|
|
77
|
-
var
|
|
78
|
-
return
|
|
79
|
-
case
|
|
80
|
-
return
|
|
81
|
-
case
|
|
82
|
-
|
|
72
|
+
case le:
|
|
73
|
+
return t.displayName || "Context";
|
|
74
|
+
case Y:
|
|
75
|
+
return (t._context.displayName || "Context") + ".Consumer";
|
|
76
|
+
case T:
|
|
77
|
+
var u = t.render;
|
|
78
|
+
return t = t.displayName, t || (t = u.displayName || u.name || "", t = t !== "" ? "ForwardRef(" + t + ")" : "ForwardRef"), t;
|
|
79
|
+
case pe:
|
|
80
|
+
return u = t.displayName || null, u !== null ? u : r(t.type) || "Memo";
|
|
81
|
+
case q:
|
|
82
|
+
u = t._payload, t = t._init;
|
|
83
83
|
try {
|
|
84
|
-
return t(
|
|
84
|
+
return r(t(u));
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
|
-
function n(
|
|
91
|
-
return "" +
|
|
90
|
+
function n(t) {
|
|
91
|
+
return "" + t;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function i(t) {
|
|
94
94
|
try {
|
|
95
|
-
n(
|
|
96
|
-
var
|
|
95
|
+
n(t);
|
|
96
|
+
var u = !1;
|
|
97
97
|
} catch {
|
|
98
|
-
|
|
98
|
+
u = !0;
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
var
|
|
103
|
-
return
|
|
104
|
-
|
|
100
|
+
if (u) {
|
|
101
|
+
u = console;
|
|
102
|
+
var S = u.error, E = typeof Symbol == "function" && Symbol.toStringTag && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
103
|
+
return S.call(
|
|
104
|
+
u,
|
|
105
105
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
106
|
E
|
|
107
|
-
), n(
|
|
107
|
+
), n(t);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
if (
|
|
112
|
-
if (typeof
|
|
110
|
+
function a(t) {
|
|
111
|
+
if (t === x) return "<>";
|
|
112
|
+
if (typeof t == "object" && t !== null && t.$$typeof === q)
|
|
113
113
|
return "<...>";
|
|
114
114
|
try {
|
|
115
|
-
var
|
|
116
|
-
return
|
|
115
|
+
var u = r(t);
|
|
116
|
+
return u ? "<" + u + ">" : "<...>";
|
|
117
117
|
} catch {
|
|
118
118
|
return "<...>";
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
var
|
|
123
|
-
return
|
|
121
|
+
function o() {
|
|
122
|
+
var t = P.A;
|
|
123
|
+
return t === null ? null : t.getOwner();
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function f() {
|
|
126
126
|
return Error("react-stack-top-frame");
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
if (
|
|
130
|
-
var
|
|
131
|
-
if (
|
|
128
|
+
function c(t) {
|
|
129
|
+
if (te.call(t, "key")) {
|
|
130
|
+
var u = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
131
|
+
if (u && u.isReactWarning) return !1;
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return t.key !== void 0;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
function
|
|
137
|
-
|
|
135
|
+
function d(t, u) {
|
|
136
|
+
function S() {
|
|
137
|
+
U || (U = !0, console.error(
|
|
138
138
|
"%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://react.dev/link/special-props)",
|
|
139
|
-
|
|
139
|
+
u
|
|
140
140
|
));
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
get:
|
|
142
|
+
S.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
143
|
+
get: S,
|
|
144
144
|
configurable: !0
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
148
|
-
var
|
|
149
|
-
return
|
|
147
|
+
function l() {
|
|
148
|
+
var t = r(this.type);
|
|
149
|
+
return O[t] || (O[t] = !0, console.error(
|
|
150
150
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
-
)),
|
|
151
|
+
)), t = this.props.ref, t !== void 0 ? t : null;
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
var
|
|
155
|
-
return
|
|
156
|
-
$$typeof:
|
|
157
|
-
type:
|
|
158
|
-
key:
|
|
159
|
-
props:
|
|
153
|
+
function b(t, u, S, E, J, X) {
|
|
154
|
+
var j = S.ref;
|
|
155
|
+
return t = {
|
|
156
|
+
$$typeof: w,
|
|
157
|
+
type: t,
|
|
158
|
+
key: u,
|
|
159
|
+
props: S,
|
|
160
160
|
_owner: E
|
|
161
|
-
}, (
|
|
161
|
+
}, (j !== void 0 ? j : null) !== null ? Object.defineProperty(t, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
|
-
get:
|
|
164
|
-
}) : Object.defineProperty(
|
|
163
|
+
get: l
|
|
164
|
+
}) : Object.defineProperty(t, "ref", { enumerable: !1, value: null }), t._store = {}, Object.defineProperty(t._store, "validated", {
|
|
165
165
|
configurable: !1,
|
|
166
166
|
enumerable: !1,
|
|
167
167
|
writable: !0,
|
|
168
168
|
value: 0
|
|
169
|
-
}), Object.defineProperty(
|
|
169
|
+
}), Object.defineProperty(t, "_debugInfo", {
|
|
170
170
|
configurable: !1,
|
|
171
171
|
enumerable: !1,
|
|
172
172
|
writable: !0,
|
|
173
173
|
value: null
|
|
174
|
-
}), Object.defineProperty(
|
|
174
|
+
}), Object.defineProperty(t, "_debugStack", {
|
|
175
175
|
configurable: !1,
|
|
176
176
|
enumerable: !1,
|
|
177
177
|
writable: !0,
|
|
178
|
-
value:
|
|
179
|
-
}), Object.defineProperty(
|
|
178
|
+
value: J
|
|
179
|
+
}), Object.defineProperty(t, "_debugTask", {
|
|
180
180
|
configurable: !1,
|
|
181
181
|
enumerable: !1,
|
|
182
182
|
writable: !0,
|
|
183
|
-
value:
|
|
184
|
-
}), Object.freeze && (Object.freeze(
|
|
183
|
+
value: X
|
|
184
|
+
}), Object.freeze && (Object.freeze(t.props), Object.freeze(t)), t;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
var
|
|
188
|
-
if (
|
|
186
|
+
function m(t, u, S, E, J, X) {
|
|
187
|
+
var j = u.children;
|
|
188
|
+
if (j !== void 0)
|
|
189
189
|
if (E)
|
|
190
|
-
if (
|
|
191
|
-
for (E = 0; E <
|
|
192
|
-
j
|
|
193
|
-
Object.freeze && Object.freeze(
|
|
190
|
+
if (be(j)) {
|
|
191
|
+
for (E = 0; E < j.length; E++)
|
|
192
|
+
L(j[E]);
|
|
193
|
+
Object.freeze && Object.freeze(j);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else j
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
var R = Object.keys(
|
|
202
|
-
return
|
|
198
|
+
else L(j);
|
|
199
|
+
if (te.call(u, "key")) {
|
|
200
|
+
j = r(t);
|
|
201
|
+
var R = Object.keys(u).filter(function(K) {
|
|
202
|
+
return K !== "key";
|
|
203
203
|
});
|
|
204
|
-
E = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}",
|
|
204
|
+
E = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", ne[j + E] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
@@ -209,180 +209,180 @@ React keys must be passed directly to JSX without using spread:
|
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
211
|
E,
|
|
212
|
-
|
|
212
|
+
j,
|
|
213
213
|
R,
|
|
214
|
-
|
|
215
|
-
),
|
|
214
|
+
j
|
|
215
|
+
), ne[j + E] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
218
|
-
|
|
219
|
-
for (var
|
|
220
|
-
|
|
221
|
-
} else
|
|
222
|
-
return
|
|
223
|
-
v,
|
|
224
|
-
typeof r == "function" ? r.displayName || r.name || "Unknown" : r
|
|
225
|
-
), C(
|
|
226
|
-
r,
|
|
217
|
+
if (j = null, S !== void 0 && (i(S), j = "" + S), c(u) && (i(u.key), j = "" + u.key), "key" in u) {
|
|
218
|
+
S = {};
|
|
219
|
+
for (var oe in u)
|
|
220
|
+
oe !== "key" && (S[oe] = u[oe]);
|
|
221
|
+
} else S = u;
|
|
222
|
+
return j && d(
|
|
227
223
|
S,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
224
|
+
typeof t == "function" ? t.displayName || t.name || "Unknown" : t
|
|
225
|
+
), b(
|
|
226
|
+
t,
|
|
227
|
+
j,
|
|
228
|
+
S,
|
|
229
|
+
o(),
|
|
230
|
+
J,
|
|
231
|
+
X
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
234
|
+
function L(t) {
|
|
235
|
+
p(t) ? t._store && (t._store.validated = 1) : typeof t == "object" && t !== null && t.$$typeof === q && (t._payload.status === "fulfilled" ? p(t._payload.value) && t._payload.value._store && (t._payload.value._store.validated = 1) : t._store && (t._store.validated = 1));
|
|
236
236
|
}
|
|
237
|
-
function
|
|
238
|
-
return typeof
|
|
237
|
+
function p(t) {
|
|
238
|
+
return typeof t == "object" && t !== null && t.$$typeof === w;
|
|
239
239
|
}
|
|
240
|
-
var
|
|
240
|
+
var h = Ne, w = Symbol.for("react.transitional.element"), g = Symbol.for("react.portal"), x = Symbol.for("react.fragment"), M = Symbol.for("react.strict_mode"), _ = Symbol.for("react.profiler"), Y = Symbol.for("react.consumer"), le = Symbol.for("react.context"), T = Symbol.for("react.forward_ref"), ce = Symbol.for("react.suspense"), de = Symbol.for("react.suspense_list"), pe = Symbol.for("react.memo"), q = Symbol.for("react.lazy"), ue = Symbol.for("react.activity"), $ = Symbol.for("react.client.reference"), P = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, te = Object.prototype.hasOwnProperty, be = Array.isArray, G = console.createTask ? console.createTask : function() {
|
|
241
241
|
return null;
|
|
242
242
|
};
|
|
243
|
-
|
|
244
|
-
react_stack_bottom_frame: function(
|
|
245
|
-
return
|
|
243
|
+
h = {
|
|
244
|
+
react_stack_bottom_frame: function(t) {
|
|
245
|
+
return t();
|
|
246
246
|
}
|
|
247
247
|
};
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
)(),
|
|
252
|
-
|
|
253
|
-
var E = 1e4 >
|
|
254
|
-
return
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
248
|
+
var U, O = {}, re = h.react_stack_bottom_frame.bind(
|
|
249
|
+
h,
|
|
250
|
+
f
|
|
251
|
+
)(), me = G(a(f)), ne = {};
|
|
252
|
+
ae.Fragment = x, ae.jsx = function(t, u, S) {
|
|
253
|
+
var E = 1e4 > P.recentlyCreatedOwnerStacks++;
|
|
254
|
+
return m(
|
|
255
|
+
t,
|
|
256
|
+
u,
|
|
257
|
+
S,
|
|
258
258
|
!1,
|
|
259
|
-
E ? Error("react-stack-top-frame") :
|
|
260
|
-
E ?
|
|
259
|
+
E ? Error("react-stack-top-frame") : re,
|
|
260
|
+
E ? G(a(t)) : me
|
|
261
261
|
);
|
|
262
|
-
},
|
|
263
|
-
var E = 1e4 >
|
|
264
|
-
return
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
262
|
+
}, ae.jsxs = function(t, u, S) {
|
|
263
|
+
var E = 1e4 > P.recentlyCreatedOwnerStacks++;
|
|
264
|
+
return m(
|
|
265
|
+
t,
|
|
266
|
+
u,
|
|
267
|
+
S,
|
|
268
268
|
!0,
|
|
269
|
-
E ? Error("react-stack-top-frame") :
|
|
270
|
-
E ?
|
|
269
|
+
E ? Error("react-stack-top-frame") : re,
|
|
270
|
+
E ? G(a(t)) : me
|
|
271
271
|
);
|
|
272
272
|
};
|
|
273
|
-
}()),
|
|
273
|
+
}()), ae;
|
|
274
274
|
}
|
|
275
|
-
process.env.NODE_ENV === "production" ?
|
|
276
|
-
var e =
|
|
277
|
-
const
|
|
275
|
+
process.env.NODE_ENV === "production" ? xe.exports = Ue() : xe.exports = Be();
|
|
276
|
+
var e = xe.exports;
|
|
277
|
+
const Ze = [
|
|
278
278
|
"Parameters:",
|
|
279
279
|
"additional_parameter_company_name:",
|
|
280
280
|
"additional_parameter_company_size:",
|
|
281
281
|
"additional_parameter_user_role:",
|
|
282
282
|
"additional_parameter_use_case:"
|
|
283
|
-
],
|
|
284
|
-
function
|
|
285
|
-
if (typeof
|
|
286
|
-
let n =
|
|
287
|
-
for (const
|
|
283
|
+
], ie = "Apologize, I’m unable to respond at the moment. Please try asking your question again or click Contact Sales to get in touch with our team.";
|
|
284
|
+
function Ye(r) {
|
|
285
|
+
if (typeof r != "string" || r.length === 0) return r;
|
|
286
|
+
let n = r;
|
|
287
|
+
for (const i of Ze)
|
|
288
288
|
for (; ; ) {
|
|
289
|
-
const
|
|
290
|
-
if (
|
|
291
|
-
const
|
|
292
|
-
if (
|
|
293
|
-
let
|
|
294
|
-
for (let
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
|
|
298
|
-
else if (
|
|
299
|
-
|
|
289
|
+
const a = n.indexOf(i);
|
|
290
|
+
if (a === -1) break;
|
|
291
|
+
const o = n.indexOf("{", a);
|
|
292
|
+
if (o === -1) break;
|
|
293
|
+
let f = 0, c = -1;
|
|
294
|
+
for (let b = o; b < n.length; b++) {
|
|
295
|
+
const m = n[b];
|
|
296
|
+
if (m === "{")
|
|
297
|
+
f++;
|
|
298
|
+
else if (m === "}" && (f--, f === 0)) {
|
|
299
|
+
c = b;
|
|
300
300
|
break;
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
if (
|
|
304
|
-
const
|
|
305
|
-
n =
|
|
303
|
+
if (c === -1) break;
|
|
304
|
+
const d = n.slice(0, a).trim(), l = n.slice(c + 1).trim();
|
|
305
|
+
n = d + (l.length > 0 ? " " + l : "");
|
|
306
306
|
}
|
|
307
307
|
return n.includes("Parameters:") && (n = n.split("Parameters:")[0].trim()), n;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
if (typeof
|
|
311
|
-
const n =
|
|
312
|
-
return n.startsWith("Message: ") ? n.slice(9).trim() : n.startsWith("Message : ") ? n.slice(11).trim() :
|
|
309
|
+
function qe(r) {
|
|
310
|
+
if (typeof r != "string" || r.length === 0) return r;
|
|
311
|
+
const n = r.trim();
|
|
312
|
+
return n.startsWith("Message: ") ? n.slice(9).trim() : n.startsWith("Message : ") ? n.slice(11).trim() : r;
|
|
313
313
|
}
|
|
314
|
-
async function
|
|
315
|
-
var
|
|
316
|
-
const
|
|
317
|
-
role:
|
|
318
|
-
message:
|
|
319
|
-
})) : [],
|
|
320
|
-
user_input:
|
|
321
|
-
chat_history:
|
|
322
|
-
mql_df: Array.isArray(
|
|
323
|
-
agent_id:
|
|
324
|
-
discovery_agent_id:
|
|
314
|
+
async function Ge(r, n = [], i = [], a = "", o = "", f = "", c = null) {
|
|
315
|
+
var L, p, h;
|
|
316
|
+
const d = typeof f == "string" && f.trim().length > 0 ? f.trim() : "https://sage-api-ttyw-stage.superwise.ai/api/v1/", l = d.replace(/\/+$/, "").endsWith("/chat") ? d : d.replace(/\/+$/, "") + "/chat", b = Array.isArray(n) ? n.map((w) => ({
|
|
317
|
+
role: w.role,
|
|
318
|
+
message: w.content != null ? w.content : ""
|
|
319
|
+
})) : [], m = {
|
|
320
|
+
user_input: r,
|
|
321
|
+
chat_history: b,
|
|
322
|
+
mql_df: Array.isArray(i) ? i : [],
|
|
323
|
+
agent_id: a,
|
|
324
|
+
discovery_agent_id: o,
|
|
325
325
|
utm_source: "Web",
|
|
326
326
|
utm_medium: "chatbot"
|
|
327
327
|
};
|
|
328
|
-
console.log("Sending payload:",
|
|
328
|
+
console.log("Sending payload:", m);
|
|
329
329
|
try {
|
|
330
|
-
const
|
|
330
|
+
const w = await fetch(l, {
|
|
331
331
|
method: "POST",
|
|
332
332
|
headers: {
|
|
333
333
|
"Content-Type": "application/json",
|
|
334
334
|
Accept: "application/json"
|
|
335
335
|
},
|
|
336
|
-
body: JSON.stringify(
|
|
337
|
-
signal:
|
|
336
|
+
body: JSON.stringify(m),
|
|
337
|
+
signal: c ?? void 0
|
|
338
338
|
});
|
|
339
|
-
if (console.log("Response status:",
|
|
340
|
-
const
|
|
341
|
-
return console.error("API Error Response:",
|
|
339
|
+
if (console.log("Response status:", w.status), console.log("Response headers:", w.headers), !w.ok) {
|
|
340
|
+
const Y = await w.text();
|
|
341
|
+
return console.error("API Error Response:", Y), { reply: ie, mqlDf: [], isError: !0, status: w.status };
|
|
342
342
|
}
|
|
343
|
-
const
|
|
344
|
-
console.log("API Response Data:",
|
|
345
|
-
let
|
|
346
|
-
return
|
|
347
|
-
} catch (
|
|
348
|
-
if (console.error("API call failed:",
|
|
349
|
-
throw
|
|
350
|
-
return
|
|
343
|
+
const g = await w.json();
|
|
344
|
+
console.log("API Response Data:", g);
|
|
345
|
+
let x = "⚠️ No reply from server.", M = [], _ = !1;
|
|
346
|
+
return g.chat_response ? x = g.chat_response : g.success && ((L = g.data) != null && L.chat_response) ? x = g.data.chat_response : g.message && (x = g.message), g.mql_df ? M = g.mql_df : (p = g.data) != null && p.mql_df && (M = g.data.mql_df), (g.chat_history_limit_exceeded === !0 || ((h = g.data) == null ? void 0 : h.chat_history_limit_exceeded) === !0) && (_ = !0), x = Ye(x), x = qe(x), { reply: x, mqlDf: M, chatHistoryLimitExceeded: _ };
|
|
347
|
+
} catch (w) {
|
|
348
|
+
if (console.error("API call failed:", w), w.name === "AbortError")
|
|
349
|
+
throw w;
|
|
350
|
+
return w.name === "TypeError" && w.message.includes("fetch") ? { reply: ie, mqlDf: [], isError: !0 } : { reply: ie, mqlDf: [], isError: !0 };
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
async function
|
|
354
|
-
const
|
|
353
|
+
async function Je(r, n = null, i = [], a = "") {
|
|
354
|
+
const c = (typeof a == "string" && a.trim().length > 0 ? a.trim() : "https://sage-api-ttyw-stage.superwise.ai/api/v1/").replace(/\/+$/, "").replace(/\/chat\/?$/, "").replace(/\/+$/, "") + "/pdf", d = Array.isArray(r) && r.length > 0 ? r[0] : n || {
|
|
355
355
|
name: "User",
|
|
356
356
|
email: "user@example.com",
|
|
357
357
|
summary: "Chat conversation summary"
|
|
358
|
-
},
|
|
359
|
-
role:
|
|
360
|
-
message:
|
|
361
|
-
})) : [],
|
|
362
|
-
lead_row:
|
|
363
|
-
chat_history:
|
|
358
|
+
}, l = Array.isArray(i) ? i.map((m) => ({
|
|
359
|
+
role: m.role,
|
|
360
|
+
message: m.content != null ? m.content : ""
|
|
361
|
+
})) : [], b = {
|
|
362
|
+
lead_row: d,
|
|
363
|
+
chat_history: l
|
|
364
364
|
};
|
|
365
|
-
console.log("Downloading PDF with payload:",
|
|
365
|
+
console.log("Downloading PDF with payload:", b);
|
|
366
366
|
try {
|
|
367
|
-
const
|
|
367
|
+
const m = await fetch(c, {
|
|
368
368
|
method: "POST",
|
|
369
369
|
headers: {
|
|
370
370
|
"Content-Type": "application/json",
|
|
371
371
|
Accept: "application/pdf"
|
|
372
372
|
},
|
|
373
|
-
body: JSON.stringify(
|
|
373
|
+
body: JSON.stringify(b)
|
|
374
374
|
});
|
|
375
|
-
if (console.log("PDF Response status:",
|
|
376
|
-
const
|
|
377
|
-
throw console.error("PDF API Error Response:",
|
|
375
|
+
if (console.log("PDF Response status:", m.status), !m.ok) {
|
|
376
|
+
const w = await m.text();
|
|
377
|
+
throw console.error("PDF API Error Response:", w), new Error(`PDF API Error ${m.status}: ${w}`);
|
|
378
378
|
}
|
|
379
|
-
const
|
|
380
|
-
return
|
|
381
|
-
} catch (
|
|
382
|
-
throw console.error("PDF download failed:",
|
|
379
|
+
const L = await m.blob(), p = window.URL.createObjectURL(L), h = document.createElement("a");
|
|
380
|
+
return h.href = p, h.download = `chatbot-report-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.pdf`, document.body.appendChild(h), h.click(), document.body.removeChild(h), window.URL.revokeObjectURL(p), !0;
|
|
381
|
+
} catch (m) {
|
|
382
|
+
throw console.error("PDF download failed:", m), m;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
const
|
|
385
|
+
const y = {
|
|
386
386
|
container: {
|
|
387
387
|
position: "fixed",
|
|
388
388
|
bottom: "20px",
|
|
@@ -422,17 +422,18 @@ const f = {
|
|
|
422
422
|
zIndex: 999999,
|
|
423
423
|
fontFamily: "'Inter', sans-serif",
|
|
424
424
|
width: "auto",
|
|
425
|
-
minWidth: "
|
|
426
|
-
maxWidth: "
|
|
425
|
+
minWidth: "auto",
|
|
426
|
+
maxWidth: "none",
|
|
427
427
|
height: "auto",
|
|
428
428
|
display: "flex",
|
|
429
429
|
flexDirection: "row",
|
|
430
430
|
borderRadius: "25px",
|
|
431
|
-
background: "
|
|
431
|
+
background: "var(--swttyw-minimized-button-color)",
|
|
432
432
|
boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
|
|
433
433
|
boxSizing: "border-box",
|
|
434
434
|
padding: "12px 16px",
|
|
435
435
|
alignItems: "center",
|
|
436
|
+
justifyContent: "center",
|
|
436
437
|
cursor: "pointer"
|
|
437
438
|
},
|
|
438
439
|
header: {
|
|
@@ -624,17 +625,12 @@ const f = {
|
|
|
624
625
|
width: "20px",
|
|
625
626
|
height: "20px",
|
|
626
627
|
flexShrink: 0
|
|
627
|
-
},
|
|
628
|
-
minimizedTitle: {
|
|
629
|
-
color: "white",
|
|
630
|
-
fontSize: "16px",
|
|
631
|
-
fontWeight: "500",
|
|
632
|
-
margin: 0
|
|
633
628
|
}
|
|
634
|
-
},
|
|
629
|
+
}, Xe = `@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');\r
|
|
635
630
|
\r
|
|
636
631
|
.sw-ttyw-chatbot {\r
|
|
637
632
|
--swttyw-primary-color: #000;\r
|
|
633
|
+
--swttyw-minimized-button-color: #000;\r
|
|
638
634
|
--swttyw-avatar-image: url('');\r
|
|
639
635
|
--swttyw-user-avatar-image: url('');\r
|
|
640
636
|
--swttyw-background-color: #F7F7F7;\r
|
|
@@ -643,7 +639,7 @@ const f = {
|
|
|
643
639
|
--swttyw-footer-font-size: 16px;\r
|
|
644
640
|
--swttyw-user-background-image: url('');\r
|
|
645
641
|
scrollbar-width: thin;\r
|
|
646
|
-
scrollbar-color:
|
|
642
|
+
scrollbar-color: var(--swttyw-primary-color) transparent;\r
|
|
647
643
|
}\r
|
|
648
644
|
\r
|
|
649
645
|
.sw-ttyw-chatbot ::-webkit-scrollbar {\r
|
|
@@ -667,13 +663,19 @@ const f = {
|
|
|
667
663
|
opacity: 0.9;\r
|
|
668
664
|
}\r
|
|
669
665
|
\r
|
|
670
|
-
/*
|
|
666
|
+
/* Allow overflow so the wave/bounce animation is not cut off */\r
|
|
667
|
+
.sw-ttyw-chatbot .message-loading {\r
|
|
668
|
+
overflow: visible !important;\r
|
|
669
|
+
}\r
|
|
670
|
+
\r
|
|
671
|
+
/* Loading (typing) bubble: compact so it doesn't get cut at top/bottom */\r
|
|
671
672
|
.sw-ttyw-chatbot .message-loading .message-content {\r
|
|
672
|
-
min-height: 1.
|
|
673
|
-
min-width: 4.
|
|
673
|
+
min-height: 1.5rem !important;\r
|
|
674
|
+
min-width: 4.0rem !important;\r
|
|
674
675
|
display: flex !important;\r
|
|
675
676
|
align-items: center !important;\r
|
|
676
|
-
padding: 0.
|
|
677
|
+
padding: 0.45rem 0 0.25rem 0.5rem !important;\r
|
|
678
|
+
overflow: visible !important;\r
|
|
677
679
|
} \r
|
|
678
680
|
\r
|
|
679
681
|
.typing {\r
|
|
@@ -888,9 +890,9 @@ const f = {
|
|
|
888
890
|
}\r
|
|
889
891
|
}\r
|
|
890
892
|
\r
|
|
891
|
-
/*
|
|
893
|
+
/* User messages: background uses primary color */\r
|
|
892
894
|
.sw-ttyw-message.self {\r
|
|
893
|
-
background:
|
|
895
|
+
background: var(--swttyw-primary-color) !important;\r
|
|
894
896
|
color: white !important;\r
|
|
895
897
|
margin: 1rem 1rem 1rem auto !important;\r
|
|
896
898
|
border-radius: 1.125rem 1.125rem 0 1.125rem !important;\r
|
|
@@ -898,10 +900,14 @@ const f = {
|
|
|
898
900
|
display: table;\r
|
|
899
901
|
}\r
|
|
900
902
|
\r
|
|
901
|
-
/* Avatar positioning for user messages */\r
|
|
903
|
+
/* Avatar positioning and color for user messages */\r
|
|
902
904
|
.sw-ttyw-message.self .message-avatar {\r
|
|
903
905
|
right: -28px !important;\r
|
|
904
906
|
left: auto !important;\r
|
|
907
|
+
color: var(--swttyw-primary-color);\r
|
|
908
|
+
}\r
|
|
909
|
+
.sw-ttyw-message.self .message-avatar svg {\r
|
|
910
|
+
fill: currentColor;\r
|
|
905
911
|
}\r
|
|
906
912
|
\r
|
|
907
913
|
/* Avatar positioning for AI messages */\r
|
|
@@ -980,16 +986,27 @@ const f = {
|
|
|
980
986
|
word-break: break-word;\r
|
|
981
987
|
}\r
|
|
982
988
|
\r
|
|
989
|
+
.sw-ttyw-markdown ol,\r
|
|
983
990
|
.sw-ttyw-markdown ul {\r
|
|
984
991
|
margin: 0.35em 0;\r
|
|
985
992
|
padding-left: 1.25em;\r
|
|
993
|
+
}\r
|
|
994
|
+
.sw-ttyw-markdown ol {\r
|
|
995
|
+
list-style: decimal;\r
|
|
996
|
+
}\r
|
|
997
|
+
.sw-ttyw-markdown ul {\r
|
|
986
998
|
list-style: disc;\r
|
|
987
|
-
}
|
|
999
|
+
}\r
|
|
988
1000
|
.sw-ttyw-markdown ul ul {\r
|
|
989
1001
|
margin: 0.2em 0;\r
|
|
990
1002
|
padding-left: 1.25em;\r
|
|
991
1003
|
list-style: circle;\r
|
|
992
1004
|
}\r
|
|
1005
|
+
.sw-ttyw-markdown ol ul {\r
|
|
1006
|
+
margin: 0.2em 0;\r
|
|
1007
|
+
padding-left: 1.25em;\r
|
|
1008
|
+
list-style: disc;\r
|
|
1009
|
+
}\r
|
|
993
1010
|
.sw-ttyw-markdown li {\r
|
|
994
1011
|
margin: 0.15em 0;\r
|
|
995
1012
|
line-height: 1.4;\r
|
|
@@ -1005,7 +1022,7 @@ const f = {
|
|
|
1005
1022
|
\r
|
|
1006
1023
|
/* API bracket labels e.g. [Agents], [Via the SUPERWISE dashboard] */\r
|
|
1007
1024
|
.sw-ttyw-markdown .sw-ttyw-bracket-label {\r
|
|
1008
|
-
font-
|
|
1025
|
+
font-weight: 600;\r
|
|
1009
1026
|
opacity: 0.9;\r
|
|
1010
1027
|
}\r
|
|
1011
1028
|
\r
|
|
@@ -1032,11 +1049,11 @@ const f = {
|
|
|
1032
1049
|
opacity: 0.5 !important;\r
|
|
1033
1050
|
}\r
|
|
1034
1051
|
\r
|
|
1035
|
-
/* Messages area: vertical scroll only,
|
|
1052
|
+
/* Messages area: vertical scroll only, scrollbar uses primary color */\r
|
|
1036
1053
|
.sw-ttyw-messages {\r
|
|
1037
1054
|
overflow-x: hidden;\r
|
|
1038
1055
|
scrollbar-width: thin;\r
|
|
1039
|
-
scrollbar-color:
|
|
1056
|
+
scrollbar-color: var(--swttyw-primary-color) transparent;\r
|
|
1040
1057
|
}\r
|
|
1041
1058
|
\r
|
|
1042
1059
|
/* Ensure empty state doesn't interfere with scrolling */\r
|
|
@@ -1053,6 +1070,12 @@ const f = {
|
|
|
1053
1070
|
cursor: not-allowed;\r
|
|
1054
1071
|
}\r
|
|
1055
1072
|
\r
|
|
1073
|
+
.sw-ttyw-chatbot #sw-ttyw-chat-send-message {\r
|
|
1074
|
+
color: var(--swttyw-primary-color);\r
|
|
1075
|
+
}\r
|
|
1076
|
+
.sw-ttyw-chatbot #sw-ttyw-chat-send-message svg {\r
|
|
1077
|
+
fill: currentColor;\r
|
|
1078
|
+
}\r
|
|
1056
1079
|
#sw-ttyw-chat-send-message:disabled {\r
|
|
1057
1080
|
opacity: 0.5;\r
|
|
1058
1081
|
cursor: not-allowed;\r
|
|
@@ -1084,24 +1107,24 @@ const f = {
|
|
|
1084
1107
|
\r
|
|
1085
1108
|
.sw-ttyw-jump-button:hover {\r
|
|
1086
1109
|
opacity: 0.9;\r
|
|
1087
|
-
}`, Ge = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='190'%20height='42'%20viewBox='0%200%20190%2042'%20fill='none'%3e%3cpath%20d='M17.2253%2014.2603C17.155%2014.0259%2016.9441%2013.8618%2016.7097%2013.8618H14.6472C14.3894%2013.8618%2014.1785%2014.0259%2014.1316%2014.2603L10.7801%2027.5053C10.7332%2027.6694%2010.7801%2027.8335%2010.8739%2027.9741C10.9676%2028.1148%2011.1317%2028.1851%2011.2957%2028.1851H12.9363C13.1941%2028.1851%2013.4051%2027.9976%2013.4754%2027.7631L14.0613%2025.0673H17.3191L17.905%2027.7631C17.9519%2028.021%2018.1862%2028.1851%2018.444%2028.1851H20.0846C20.2487%2028.1851%2020.4128%2028.1148%2020.5065%2027.9741C20.6003%2027.8335%2020.6471%2027.6694%2020.6003%2027.5053L17.2488%2014.2603H17.2253ZM14.5769%2022.5824L15.655%2017.636L16.7566%2022.5824H14.5769Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M23.8359%2013.8618H22.2656C21.9609%2013.8618%2021.7266%2014.0962%2021.7266%2014.401V27.6459C21.7266%2027.9507%2021.9609%2028.1851%2022.2656%2028.1851H23.8359C24.1406%2028.1851%2024.375%2027.9507%2024.375%2027.6459V14.401C24.375%2014.0962%2024.1406%2013.8618%2023.8359%2013.8618ZM22.2891%2014.0493C22.2422%2014.0493%2022.1953%2014.0493%2022.1484%2014.0728C22.1953%2014.0728%2022.2422%2014.0493%2022.2891%2014.0493Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M36.1401%2029.4041L36.0932%2012.5256C36.0932%2011.3066%2035.4369%2010.1579%2034.3588%209.5484L19.7341%201.15601C18.6794%200.546507%2017.3669%200.546507%2016.2888%201.15601L1.71091%209.61872C0.65624%2010.2282%200%2011.3769%200%2012.5959L0.046874%2029.4744C0.046874%2030.6934%200.703114%2031.8421%201.78122%2032.4516L16.406%2040.844C17.4607%2041.4535%2018.7731%2041.4535%2019.8513%2040.844L34.4291%2032.3813C35.4838%2031.7718%2036.1401%2030.6231%2036.1401%2029.4041ZM11.9998%2031.5608C6.16397%2028.1851%204.17181%2020.7539%207.54676%2014.9167C10.8983%209.07955%2018.3513%207.08694%2024.1871%2010.4626C30.023%2013.8149%2032.0151%2021.2696%2028.6402%2027.1068C25.2887%2032.9439%2017.8357%2034.9365%2011.9998%2031.5608Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M46.3593%2014.19C46.6171%2013.9087%2046.9218%2013.6977%2047.2734%2013.557C47.6249%2013.4164%2048.0468%2013.3461%2048.5155%2013.3461C48.9843%2013.3461%2049.6171%2013.4398%2050.0858%2013.6508C50.5546%2013.8618%2050.9295%2014.1665%2051.2342%2014.5416C51.3983%2014.7526%2051.5623%2014.987%2051.6795%2015.2683C51.8202%2015.5496%2051.9139%2015.8309%2051.9608%2016.1357L55.4295%2015.0574C55.1717%2014.1431%2054.8201%2013.3695%2054.3748%2012.7131C53.9295%2012.0567%2053.3904%2011.4941%2052.7576%2011.0487C52.1952%2010.6502%2051.5623%2010.3689%2050.8358%2010.1813C50.1327%209.99379%2049.3593%209.90002%2048.5624%209.90002C47.7655%209.90002%2046.5937%2010.0407%2045.7734%2010.3454C44.9765%2010.6502%2044.2734%2011.0956%2043.7109%2011.6816C43.125%2012.2443%2042.7031%2012.9241%2042.4219%2013.7211C42.1406%2014.5182%2042%2015.4324%2042%2016.4405C42%2017.4485%2042.1641%2018.5034%2042.5156%2019.277C42.8672%2020.0506%2043.3828%2020.707%2044.0859%2021.2461C44.789%2021.7853%2045.7031%2022.2776%2046.8515%2022.6761L48.8436%2023.4028C49.5702%2023.6842%2050.1561%2023.9655%2050.5546%2024.2702C50.953%2024.5515%2051.2342%2024.8797%2051.3983%2025.2314C51.5623%2025.583%2051.6327%2026.0284%2051.6327%2026.5676C51.6327%2027.1067%2051.5858%2027.4818%2051.4686%2027.8335C51.3749%2028.1851%2051.1874%2028.4899%2050.9764%2028.7712C50.742%2029.0759%2050.4374%2029.2869%2050.0624%2029.4275C49.7108%2029.5682%2049.2889%2029.6385%2048.8202%2029.6385C48.3515%2029.6385%2047.7187%2029.5448%2047.2734%2029.3338C46.8046%2029.1228%2046.4296%2028.818%2046.1249%2028.443C45.9374%2028.232%2045.7734%2027.9976%2045.6562%2027.6928C45.5156%2027.4115%2045.4453%2027.1067%2045.3749%2026.802L41.8594%2027.7866C42.0937%2028.7008%2042.4453%2029.4979%2042.8906%2030.2011C43.3594%2030.9044%2043.8984%2031.467%2044.5546%2031.9359C45.1406%2032.311%2045.7734%2032.5923%2046.4765%2032.8032C47.1796%2033.0142%2047.953%2033.108%2048.7499%2033.108C49.5468%2033.108%2050.742%2032.9439%2051.5389%2032.6626C52.3592%2032.3578%2053.0623%2031.9124%2053.6483%2031.3029C54.1873%2030.7169%2054.6092%2030.0136%2054.9139%2029.1931C55.2185%2028.3726%2055.3592%2027.4349%2055.3592%2026.3566C55.3592%2025.2782%2055.1951%2024.2702%2054.8435%2023.4966C54.492%2022.723%2053.9764%2022.0666%2053.2498%2021.5275C52.5233%2020.9883%2051.5858%2020.496%2050.3905%2020.0506L48.4218%2019.3239C47.6952%2019.0426%2047.1327%2018.7612%2046.7577%2018.4799C46.3593%2018.1752%2046.1015%2017.8704%2045.9609%2017.5188C45.8203%2017.1672%2045.7499%2016.7686%2045.7499%2016.2998C45.7499%2015.8309%2045.7968%2015.4324%2045.914%2015.0808C46.0077%2014.7292%2046.1718%2014.4478%2046.3593%2014.19Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M67.5233%2026.4504C67.5233%2027.1536%2067.4295%2027.7631%2067.242%2028.232C67.0545%2028.7008%2066.7499%2029.0525%2066.3046%2029.3103C65.8593%2029.5682%2065.2733%2029.6854%2064.5468%2029.6854C63.8202%2029.6854%2063.2109%2029.5682%2062.7656%2029.3103C62.3202%2029.0525%2062.0156%2028.7008%2061.8281%2028.232C61.6406%2027.7631%2061.5468%2027.1771%2061.5468%2026.4504V10.1579H57.8672V26.3332C57.8672%2027.6694%2058.1016%2028.8415%2058.5703%2029.8495C59.039%2030.8575%2059.7656%2031.6546%2060.75%2032.2406C61.7343%2032.8267%2063.0234%2033.108%2064.5702%2033.108C66.1171%2033.108%2067.3592%2032.8267%2068.367%2032.2406C69.3748%2031.6546%2070.1014%2030.8575%2070.5467%2029.8261C70.992%2028.7946%2071.2264%2027.6459%2071.2264%2026.3332V10.1579H67.5467V26.4504H67.5233Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M83.7186%2010.9549C82.7811%2010.4158%2081.5858%2010.1579%2080.1562%2010.1579H74.0859V32.8033H77.7656V24.9032H80.1093C81.5624%2024.9032%2082.7577%2024.6453%2083.6952%2024.1296C84.6327%2023.6138%2085.3358%2022.8168%2085.8045%2021.7385C86.2732%2020.6601%2086.5076%2019.2536%2086.5076%2017.5423C86.5076%2015.831%2086.2732%2014.4479%2085.8045%2013.3695C85.3358%2012.2912%2084.6327%2011.4941%2083.6952%2010.9549H83.7186ZM82.4999%2019.9099C82.2889%2020.4726%2081.9843%2020.8711%2081.5858%2021.1289C81.1874%2021.3868%2080.6718%2021.504%2080.0155%2021.504H77.7421V13.6274H80.0155C80.6718%2013.6274%2081.1874%2013.7446%2081.5858%2014.0025C81.9843%2014.2603%2082.2889%2014.6588%2082.4999%2015.2215C82.7108%2015.7841%2082.8046%2016.5577%2082.8046%2017.5423C82.8046%2018.5268%2082.7108%2019.3473%2082.4999%2019.9099Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M88.5938%2032.8267H99.7029V29.3807H92.2734V23.0043H98.4608V19.5817H92.2734V13.6274H99.7029V10.1813H88.5938V32.8267Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M111.797%2023.356C112.711%2022.8402%20113.437%2022.0666%20113.953%2021.0352C114.469%2020.0037%20114.726%2018.7144%20114.726%2017.1672C114.726%2015.62%20114.492%2014.2134%20114.023%2013.2054C113.555%2012.1739%20112.851%2011.4238%20111.961%2010.9315C111.047%2010.4392%20109.922%2010.2048%20108.586%2010.2048H102.023V32.8501H105.703V24.153H108.258L111.094%2032.8501H115.078L111.75%2023.4028C111.75%2023.4028%20111.797%2023.4028%20111.82%2023.3794L111.797%2023.356ZM105.68%2013.6274H108.422C108.961%2013.6274%20109.406%2013.7211%20109.805%2013.9321C110.18%2014.1431%20110.484%2014.4947%20110.695%2015.0105C110.906%2015.5028%20111%2016.2295%20111%2017.1437C111%2018.058%20110.906%2018.8081%20110.695%2019.3239C110.484%2019.8396%20110.203%2020.1912%20109.828%2020.4022C109.453%2020.6132%20109.008%2020.707%20108.469%2020.707H105.703V13.6508L105.68%2013.6274Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M132.234%2027.3412L129.047%2010.1813H125.508L122.344%2027.2474L119.086%2010.1813H115.148L120.328%2032.8267H124.148L127.289%2017.6595L130.406%2032.8267H134.226L139.382%2010.1813H135.492L132.234%2027.3412Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M144.773%2010.1813H141.094V32.8267H144.773V10.1813Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M151.851%2014.19C152.109%2013.9087%20152.414%2013.6977%20152.766%2013.557C153.117%2013.4164%20153.539%2013.3461%20154.008%2013.3461C154.476%2013.3461%20155.109%2013.4398%20155.578%2013.6508C156.047%2013.8618%20156.422%2014.1665%20156.726%2014.5416C156.89%2014.7526%20157.055%2014.987%20157.172%2015.2683C157.312%2015.5496%20157.406%2015.8309%20157.453%2016.1357L160.922%2015.0574C160.664%2014.1431%20160.312%2013.3695%20159.867%2012.7131C159.422%2012.0567%20158.883%2011.4941%20158.25%2011.0487C157.687%2010.6502%20157.055%2010.3689%20156.328%2010.1813C155.625%209.99379%20154.851%209.90002%20154.055%209.90002C153.258%209.90002%20152.086%2010.0407%20151.266%2010.3454C150.469%2010.6502%20149.766%2011.0956%20149.203%2011.6816C148.617%2012.2443%20148.195%2012.9241%20147.914%2013.7211C147.633%2014.5182%20147.492%2015.4324%20147.492%2016.4405C147.492%2017.4485%20147.656%2018.5034%20148.008%2019.277C148.359%2020.0506%20148.875%2020.707%20149.578%2021.2461C150.281%2021.7853%20151.195%2022.2776%20152.344%2022.6761L154.336%2023.4028C155.062%2023.6842%20155.648%2023.9655%20156.047%2024.2702C156.445%2024.5515%20156.726%2024.8797%20156.89%2025.2314C157.055%2025.583%20157.125%2026.0284%20157.125%2026.5676C157.125%2027.1067%20157.078%2027.4818%20156.961%2027.8335C156.867%2028.1851%20156.68%2028.4899%20156.469%2028.7712C156.234%2029.0759%20155.93%2029.2869%20155.555%2029.4275C155.203%2029.5682%20154.781%2029.6385%20154.312%2029.6385C153.844%2029.6385%20153.211%2029.5448%20152.766%2029.3338C152.297%2029.1228%20151.922%2028.818%20151.617%2028.443C151.43%2028.232%20151.266%2027.9976%20151.148%2027.6928C151.008%2027.4115%20150.914%2027.1067%20150.867%2026.802L147.352%2027.7866C147.586%2028.7008%20147.937%2029.4979%20148.383%2030.2011C148.852%2030.9044%20149.391%2031.467%20150.047%2031.9359C150.633%2032.311%20151.266%2032.5923%20151.969%2032.8032C152.672%2033.0142%20153.445%2033.108%20154.242%2033.108C155.039%2033.108%20156.234%2032.9439%20157.031%2032.6626C157.851%2032.3578%20158.555%2031.9124%20159.14%2031.3029C159.68%2030.7169%20160.101%2030.0136%20160.406%2029.1931C160.711%2028.3726%20160.851%2027.4349%20160.851%2026.3566C160.851%2025.2782%20160.687%2024.2702%20160.336%2023.4966C159.984%2022.723%20159.469%2022.0666%20158.742%2021.5275C158.015%2020.9883%20157.078%2020.496%20155.883%2020.0506L153.914%2019.3239C153.187%2019.0426%20152.625%2018.7612%20152.25%2018.4799C151.852%2018.1752%20151.594%2017.8704%20151.453%2017.5188C151.312%2017.1672%20151.242%2016.7686%20151.242%2016.2998C151.242%2015.8309%20151.289%2015.4324%20151.406%2015.0808C151.5%2014.7292%20151.664%2014.4478%20151.851%2014.19Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M174.633%2013.6274V10.1813H163.5V32.8267H174.633V29.3807H167.18V23.0043H173.367V19.5817H167.18V13.6274H174.633Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M179.316%2011.0956V10.1345H183.512V11.0956H181.918V15.8075H180.91V11.0956H179.316Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M184.168%2010.1345H185.41L186.676%2013.9321L187.941%2010.1345H189.184V15.8075H188.269V11.8223L187.098%2015.1511H186.254L185.082%2011.9161V15.831H184.168V10.1579V10.1345Z'%20fill='black'%3e%3c/path%3e%3c/svg%3e";
|
|
1088
|
-
let
|
|
1089
|
-
function
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1092
|
-
const
|
|
1093
|
-
return /* @__PURE__ */ e.jsxs("svg", { width:
|
|
1094
|
-
/* @__PURE__ */ e.jsxs("g", { clipPath: `url(#${
|
|
1110
|
+
}`, Ke = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='190'%20height='42'%20viewBox='0%200%20190%2042'%20fill='none'%3e%3cpath%20d='M17.2253%2014.2603C17.155%2014.0259%2016.9441%2013.8618%2016.7097%2013.8618H14.6472C14.3894%2013.8618%2014.1785%2014.0259%2014.1316%2014.2603L10.7801%2027.5053C10.7332%2027.6694%2010.7801%2027.8335%2010.8739%2027.9741C10.9676%2028.1148%2011.1317%2028.1851%2011.2957%2028.1851H12.9363C13.1941%2028.1851%2013.4051%2027.9976%2013.4754%2027.7631L14.0613%2025.0673H17.3191L17.905%2027.7631C17.9519%2028.021%2018.1862%2028.1851%2018.444%2028.1851H20.0846C20.2487%2028.1851%2020.4128%2028.1148%2020.5065%2027.9741C20.6003%2027.8335%2020.6471%2027.6694%2020.6003%2027.5053L17.2488%2014.2603H17.2253ZM14.5769%2022.5824L15.655%2017.636L16.7566%2022.5824H14.5769Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M23.8359%2013.8618H22.2656C21.9609%2013.8618%2021.7266%2014.0962%2021.7266%2014.401V27.6459C21.7266%2027.9507%2021.9609%2028.1851%2022.2656%2028.1851H23.8359C24.1406%2028.1851%2024.375%2027.9507%2024.375%2027.6459V14.401C24.375%2014.0962%2024.1406%2013.8618%2023.8359%2013.8618ZM22.2891%2014.0493C22.2422%2014.0493%2022.1953%2014.0493%2022.1484%2014.0728C22.1953%2014.0728%2022.2422%2014.0493%2022.2891%2014.0493Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M36.1401%2029.4041L36.0932%2012.5256C36.0932%2011.3066%2035.4369%2010.1579%2034.3588%209.5484L19.7341%201.15601C18.6794%200.546507%2017.3669%200.546507%2016.2888%201.15601L1.71091%209.61872C0.65624%2010.2282%200%2011.3769%200%2012.5959L0.046874%2029.4744C0.046874%2030.6934%200.703114%2031.8421%201.78122%2032.4516L16.406%2040.844C17.4607%2041.4535%2018.7731%2041.4535%2019.8513%2040.844L34.4291%2032.3813C35.4838%2031.7718%2036.1401%2030.6231%2036.1401%2029.4041ZM11.9998%2031.5608C6.16397%2028.1851%204.17181%2020.7539%207.54676%2014.9167C10.8983%209.07955%2018.3513%207.08694%2024.1871%2010.4626C30.023%2013.8149%2032.0151%2021.2696%2028.6402%2027.1068C25.2887%2032.9439%2017.8357%2034.9365%2011.9998%2031.5608Z'%20fill='%23FF0000'%3e%3c/path%3e%3cpath%20d='M46.3593%2014.19C46.6171%2013.9087%2046.9218%2013.6977%2047.2734%2013.557C47.6249%2013.4164%2048.0468%2013.3461%2048.5155%2013.3461C48.9843%2013.3461%2049.6171%2013.4398%2050.0858%2013.6508C50.5546%2013.8618%2050.9295%2014.1665%2051.2342%2014.5416C51.3983%2014.7526%2051.5623%2014.987%2051.6795%2015.2683C51.8202%2015.5496%2051.9139%2015.8309%2051.9608%2016.1357L55.4295%2015.0574C55.1717%2014.1431%2054.8201%2013.3695%2054.3748%2012.7131C53.9295%2012.0567%2053.3904%2011.4941%2052.7576%2011.0487C52.1952%2010.6502%2051.5623%2010.3689%2050.8358%2010.1813C50.1327%209.99379%2049.3593%209.90002%2048.5624%209.90002C47.7655%209.90002%2046.5937%2010.0407%2045.7734%2010.3454C44.9765%2010.6502%2044.2734%2011.0956%2043.7109%2011.6816C43.125%2012.2443%2042.7031%2012.9241%2042.4219%2013.7211C42.1406%2014.5182%2042%2015.4324%2042%2016.4405C42%2017.4485%2042.1641%2018.5034%2042.5156%2019.277C42.8672%2020.0506%2043.3828%2020.707%2044.0859%2021.2461C44.789%2021.7853%2045.7031%2022.2776%2046.8515%2022.6761L48.8436%2023.4028C49.5702%2023.6842%2050.1561%2023.9655%2050.5546%2024.2702C50.953%2024.5515%2051.2342%2024.8797%2051.3983%2025.2314C51.5623%2025.583%2051.6327%2026.0284%2051.6327%2026.5676C51.6327%2027.1067%2051.5858%2027.4818%2051.4686%2027.8335C51.3749%2028.1851%2051.1874%2028.4899%2050.9764%2028.7712C50.742%2029.0759%2050.4374%2029.2869%2050.0624%2029.4275C49.7108%2029.5682%2049.2889%2029.6385%2048.8202%2029.6385C48.3515%2029.6385%2047.7187%2029.5448%2047.2734%2029.3338C46.8046%2029.1228%2046.4296%2028.818%2046.1249%2028.443C45.9374%2028.232%2045.7734%2027.9976%2045.6562%2027.6928C45.5156%2027.4115%2045.4453%2027.1067%2045.3749%2026.802L41.8594%2027.7866C42.0937%2028.7008%2042.4453%2029.4979%2042.8906%2030.2011C43.3594%2030.9044%2043.8984%2031.467%2044.5546%2031.9359C45.1406%2032.311%2045.7734%2032.5923%2046.4765%2032.8032C47.1796%2033.0142%2047.953%2033.108%2048.7499%2033.108C49.5468%2033.108%2050.742%2032.9439%2051.5389%2032.6626C52.3592%2032.3578%2053.0623%2031.9124%2053.6483%2031.3029C54.1873%2030.7169%2054.6092%2030.0136%2054.9139%2029.1931C55.2185%2028.3726%2055.3592%2027.4349%2055.3592%2026.3566C55.3592%2025.2782%2055.1951%2024.2702%2054.8435%2023.4966C54.492%2022.723%2053.9764%2022.0666%2053.2498%2021.5275C52.5233%2020.9883%2051.5858%2020.496%2050.3905%2020.0506L48.4218%2019.3239C47.6952%2019.0426%2047.1327%2018.7612%2046.7577%2018.4799C46.3593%2018.1752%2046.1015%2017.8704%2045.9609%2017.5188C45.8203%2017.1672%2045.7499%2016.7686%2045.7499%2016.2998C45.7499%2015.8309%2045.7968%2015.4324%2045.914%2015.0808C46.0077%2014.7292%2046.1718%2014.4478%2046.3593%2014.19Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M67.5233%2026.4504C67.5233%2027.1536%2067.4295%2027.7631%2067.242%2028.232C67.0545%2028.7008%2066.7499%2029.0525%2066.3046%2029.3103C65.8593%2029.5682%2065.2733%2029.6854%2064.5468%2029.6854C63.8202%2029.6854%2063.2109%2029.5682%2062.7656%2029.3103C62.3202%2029.0525%2062.0156%2028.7008%2061.8281%2028.232C61.6406%2027.7631%2061.5468%2027.1771%2061.5468%2026.4504V10.1579H57.8672V26.3332C57.8672%2027.6694%2058.1016%2028.8415%2058.5703%2029.8495C59.039%2030.8575%2059.7656%2031.6546%2060.75%2032.2406C61.7343%2032.8267%2063.0234%2033.108%2064.5702%2033.108C66.1171%2033.108%2067.3592%2032.8267%2068.367%2032.2406C69.3748%2031.6546%2070.1014%2030.8575%2070.5467%2029.8261C70.992%2028.7946%2071.2264%2027.6459%2071.2264%2026.3332V10.1579H67.5467V26.4504H67.5233Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M83.7186%2010.9549C82.7811%2010.4158%2081.5858%2010.1579%2080.1562%2010.1579H74.0859V32.8033H77.7656V24.9032H80.1093C81.5624%2024.9032%2082.7577%2024.6453%2083.6952%2024.1296C84.6327%2023.6138%2085.3358%2022.8168%2085.8045%2021.7385C86.2732%2020.6601%2086.5076%2019.2536%2086.5076%2017.5423C86.5076%2015.831%2086.2732%2014.4479%2085.8045%2013.3695C85.3358%2012.2912%2084.6327%2011.4941%2083.6952%2010.9549H83.7186ZM82.4999%2019.9099C82.2889%2020.4726%2081.9843%2020.8711%2081.5858%2021.1289C81.1874%2021.3868%2080.6718%2021.504%2080.0155%2021.504H77.7421V13.6274H80.0155C80.6718%2013.6274%2081.1874%2013.7446%2081.5858%2014.0025C81.9843%2014.2603%2082.2889%2014.6588%2082.4999%2015.2215C82.7108%2015.7841%2082.8046%2016.5577%2082.8046%2017.5423C82.8046%2018.5268%2082.7108%2019.3473%2082.4999%2019.9099Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M88.5938%2032.8267H99.7029V29.3807H92.2734V23.0043H98.4608V19.5817H92.2734V13.6274H99.7029V10.1813H88.5938V32.8267Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M111.797%2023.356C112.711%2022.8402%20113.437%2022.0666%20113.953%2021.0352C114.469%2020.0037%20114.726%2018.7144%20114.726%2017.1672C114.726%2015.62%20114.492%2014.2134%20114.023%2013.2054C113.555%2012.1739%20112.851%2011.4238%20111.961%2010.9315C111.047%2010.4392%20109.922%2010.2048%20108.586%2010.2048H102.023V32.8501H105.703V24.153H108.258L111.094%2032.8501H115.078L111.75%2023.4028C111.75%2023.4028%20111.797%2023.4028%20111.82%2023.3794L111.797%2023.356ZM105.68%2013.6274H108.422C108.961%2013.6274%20109.406%2013.7211%20109.805%2013.9321C110.18%2014.1431%20110.484%2014.4947%20110.695%2015.0105C110.906%2015.5028%20111%2016.2295%20111%2017.1437C111%2018.058%20110.906%2018.8081%20110.695%2019.3239C110.484%2019.8396%20110.203%2020.1912%20109.828%2020.4022C109.453%2020.6132%20109.008%2020.707%20108.469%2020.707H105.703V13.6508L105.68%2013.6274Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M132.234%2027.3412L129.047%2010.1813H125.508L122.344%2027.2474L119.086%2010.1813H115.148L120.328%2032.8267H124.148L127.289%2017.6595L130.406%2032.8267H134.226L139.382%2010.1813H135.492L132.234%2027.3412Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M144.773%2010.1813H141.094V32.8267H144.773V10.1813Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M151.851%2014.19C152.109%2013.9087%20152.414%2013.6977%20152.766%2013.557C153.117%2013.4164%20153.539%2013.3461%20154.008%2013.3461C154.476%2013.3461%20155.109%2013.4398%20155.578%2013.6508C156.047%2013.8618%20156.422%2014.1665%20156.726%2014.5416C156.89%2014.7526%20157.055%2014.987%20157.172%2015.2683C157.312%2015.5496%20157.406%2015.8309%20157.453%2016.1357L160.922%2015.0574C160.664%2014.1431%20160.312%2013.3695%20159.867%2012.7131C159.422%2012.0567%20158.883%2011.4941%20158.25%2011.0487C157.687%2010.6502%20157.055%2010.3689%20156.328%2010.1813C155.625%209.99379%20154.851%209.90002%20154.055%209.90002C153.258%209.90002%20152.086%2010.0407%20151.266%2010.3454C150.469%2010.6502%20149.766%2011.0956%20149.203%2011.6816C148.617%2012.2443%20148.195%2012.9241%20147.914%2013.7211C147.633%2014.5182%20147.492%2015.4324%20147.492%2016.4405C147.492%2017.4485%20147.656%2018.5034%20148.008%2019.277C148.359%2020.0506%20148.875%2020.707%20149.578%2021.2461C150.281%2021.7853%20151.195%2022.2776%20152.344%2022.6761L154.336%2023.4028C155.062%2023.6842%20155.648%2023.9655%20156.047%2024.2702C156.445%2024.5515%20156.726%2024.8797%20156.89%2025.2314C157.055%2025.583%20157.125%2026.0284%20157.125%2026.5676C157.125%2027.1067%20157.078%2027.4818%20156.961%2027.8335C156.867%2028.1851%20156.68%2028.4899%20156.469%2028.7712C156.234%2029.0759%20155.93%2029.2869%20155.555%2029.4275C155.203%2029.5682%20154.781%2029.6385%20154.312%2029.6385C153.844%2029.6385%20153.211%2029.5448%20152.766%2029.3338C152.297%2029.1228%20151.922%2028.818%20151.617%2028.443C151.43%2028.232%20151.266%2027.9976%20151.148%2027.6928C151.008%2027.4115%20150.914%2027.1067%20150.867%2026.802L147.352%2027.7866C147.586%2028.7008%20147.937%2029.4979%20148.383%2030.2011C148.852%2030.9044%20149.391%2031.467%20150.047%2031.9359C150.633%2032.311%20151.266%2032.5923%20151.969%2032.8032C152.672%2033.0142%20153.445%2033.108%20154.242%2033.108C155.039%2033.108%20156.234%2032.9439%20157.031%2032.6626C157.851%2032.3578%20158.555%2031.9124%20159.14%2031.3029C159.68%2030.7169%20160.101%2030.0136%20160.406%2029.1931C160.711%2028.3726%20160.851%2027.4349%20160.851%2026.3566C160.851%2025.2782%20160.687%2024.2702%20160.336%2023.4966C159.984%2022.723%20159.469%2022.0666%20158.742%2021.5275C158.015%2020.9883%20157.078%2020.496%20155.883%2020.0506L153.914%2019.3239C153.187%2019.0426%20152.625%2018.7612%20152.25%2018.4799C151.852%2018.1752%20151.594%2017.8704%20151.453%2017.5188C151.312%2017.1672%20151.242%2016.7686%20151.242%2016.2998C151.242%2015.8309%20151.289%2015.4324%20151.406%2015.0808C151.5%2014.7292%20151.664%2014.4478%20151.851%2014.19Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M174.633%2013.6274V10.1813H163.5V32.8267H174.633V29.3807H167.18V23.0043H173.367V19.5817H167.18V13.6274H174.633Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M179.316%2011.0956V10.1345H183.512V11.0956H181.918V15.8075H180.91V11.0956H179.316Z'%20fill='black'%3e%3c/path%3e%3cpath%20d='M184.168%2010.1345H185.41L186.676%2013.9321L187.941%2010.1345H189.184V15.8075H188.269V11.8223L187.098%2015.1511H186.254L185.082%2011.9161V15.831H184.168V10.1579V10.1345Z'%20fill='black'%3e%3c/path%3e%3c/svg%3e";
|
|
1111
|
+
let Qe = 0;
|
|
1112
|
+
function Ae({ width: r = 20, height: n = 20, style: i }) {
|
|
1113
|
+
const a = V(null);
|
|
1114
|
+
a.current || (a.current = `clip0_avatar_${++Qe}`);
|
|
1115
|
+
const o = a.current;
|
|
1116
|
+
return /* @__PURE__ */ e.jsxs("svg", { width: r, height: n, viewBox: "0 0 155 174", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: i, "aria-hidden": !0, children: [
|
|
1117
|
+
/* @__PURE__ */ e.jsxs("g", { clipPath: `url(#${o})`, children: [
|
|
1095
1118
|
/* @__PURE__ */ e.jsx("path", { d: "M73.41 57.8388C73.15 56.8088 72.23 56.0988 71.17 56.0988H62.35C61.29 56.0988 60.37 56.8188 60.11 57.8488L45.8 114.299C45.62 114.999 45.78 115.719 46.22 116.289C46.66 116.859 47.33 117.179 48.05 117.179H55.05C56.13 117.179 57.08 116.419 57.31 115.359L59.83 103.889H73.76L76.29 115.359C76.52 116.409 77.47 117.179 78.55 117.179H85.54C86.26 117.179 86.92 116.849 87.37 116.289C87.81 115.719 87.96 114.999 87.79 114.299L73.44 57.8488L73.41 57.8388ZM62.12 93.3688L66.76 72.2188L71.42 93.3688H62.12Z", fill: "#FF0000" }),
|
|
1096
1119
|
/* @__PURE__ */ e.jsx("path", { d: "M101.69 56.0988H95.01C93.73 56.0988 92.7 57.1388 92.7 58.4088V114.859C92.7 116.139 93.74 117.169 95.01 117.169H101.69C102.97 117.169 104 116.129 104 114.859V58.4088C104 57.1288 102.96 56.0988 101.69 56.0988Z", fill: "#FF0000" }),
|
|
1097
1120
|
/* @__PURE__ */ e.jsx("path", { d: "M154.17 122.419L153.98 50.4588C153.97 45.2188 151.16 40.3788 146.61 37.7688L84.21 1.94879C79.66 -0.661205 74.07 -0.651206 69.54 1.98879L7.30003 38.1288C2.77003 40.7588 -0.00997311 45.6088 2.68877e-05 50.8488L0.190027 122.809C0.200027 128.049 3.01003 132.889 7.56003 135.499L69.97 171.319C74.52 173.929 80.11 173.919 84.64 171.279L146.87 135.139C151.4 132.509 154.19 127.659 154.17 122.409V122.419ZM51.11 131.639C26.26 117.289 17.74 85.5088 32.09 60.6488C46.44 35.7988 78.22 27.2788 103.08 41.6288C127.93 55.9788 136.45 87.7588 122.1 112.619C107.75 137.469 75.97 145.989 51.11 131.639Z", fill: "#FF0000" })
|
|
1098
1121
|
] }),
|
|
1099
|
-
/* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("clipPath", { id:
|
|
1122
|
+
/* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("clipPath", { id: o, children: /* @__PURE__ */ e.jsx("rect", { width: "154.17", height: "173.268", fill: "white" }) }) })
|
|
1100
1123
|
] });
|
|
1101
1124
|
}
|
|
1102
|
-
function
|
|
1103
|
-
const
|
|
1104
|
-
return /* @__PURE__ */ e.jsxs("svg", { width:
|
|
1125
|
+
function et({ width: r, height: n = 20, style: i }) {
|
|
1126
|
+
const a = r ?? 4.6875 * n;
|
|
1127
|
+
return /* @__PURE__ */ e.jsxs("svg", { width: a, height: n, viewBox: "0 0 75 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: i, "aria-hidden": !0, children: [
|
|
1105
1128
|
/* @__PURE__ */ e.jsx("path", { d: "M6.82917 5.34411C6.8013 5.25174 6.71768 5.18707 6.62476 5.18707H5.80712C5.70492 5.18707 5.62129 5.25174 5.60271 5.34411L4.27404 10.5635C4.25546 10.6282 4.27404 10.6928 4.31121 10.7483C4.34838 10.8037 4.41341 10.8314 4.47845 10.8314H5.12885C5.23106 10.8314 5.31468 10.7575 5.34255 10.6651L5.57484 9.60278H6.86634L7.09862 10.6651C7.11721 10.7667 7.21012 10.8314 7.31232 10.8314H7.96272C8.02776 10.8314 8.0928 10.8037 8.12997 10.7483C8.16713 10.6928 8.18571 10.6282 8.16713 10.5635L6.83846 5.34411H6.82917ZM5.77925 8.62356L6.20665 6.67437L6.64335 8.62356H5.77925Z", fill: "white" }),
|
|
1106
1129
|
/* @__PURE__ */ e.jsx("path", { d: "M9.44935 5.18707H8.82683C8.70604 5.18707 8.61313 5.27945 8.61313 5.39954V10.6189C8.61313 10.739 8.70604 10.8314 8.82683 10.8314H9.44935C9.57014 10.8314 9.66305 10.739 9.66305 10.6189V5.39954C9.66305 5.27945 9.57014 5.18707 9.44935 5.18707ZM8.83612 5.26097C8.81754 5.26097 8.79896 5.26098 8.78037 5.27021C8.79896 5.27021 8.81754 5.26097 8.83612 5.26097Z", fill: "white" }),
|
|
1107
1130
|
/* @__PURE__ */ e.jsx("path", { d: "M14.3273 11.3118L14.3087 4.66051C14.3087 4.18014 14.0486 3.72748 13.6212 3.4873L7.82334 0.180139C7.40523 -0.0600462 6.88491 -0.0600462 6.45751 0.180139L0.678271 3.51501C0.260159 3.7552 0 4.20785 0 4.68822L0.0185826 11.3395C0.0185826 11.8199 0.278741 12.2725 0.706145 12.5127L6.50396 15.8199C6.92208 16.06 7.44239 16.06 7.8698 15.8199L13.649 12.485C14.0671 12.2448 14.3273 11.7921 14.3273 11.3118ZM4.75719 12.1617C2.44363 10.8314 1.65386 7.903 2.99182 5.60277C4.32049 3.30254 7.27515 2.51732 9.5887 3.84758C11.9023 5.16859 12.692 8.10624 11.3541 10.4065C10.0254 12.7067 7.07074 13.4919 4.75719 12.1617Z", fill: "white" }),
|
|
@@ -1118,122 +1141,141 @@ function Xe({ width: t, height: n = 20, style: a }) {
|
|
|
1118
1141
|
/* @__PURE__ */ e.jsx("path", { d: "M73.0116 3.71826H73.5041L74.0058 5.2148L74.5075 3.71826H75V5.95383H74.6376V4.38339L74.173 5.69517H73.8386L73.374 4.42034V5.96306H73.0116V3.7275V3.71826Z", fill: "white" })
|
|
1119
1142
|
] });
|
|
1120
1143
|
}
|
|
1121
|
-
const
|
|
1122
|
-
function
|
|
1123
|
-
if (typeof document > "u" || document.getElementById(
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1144
|
+
const Me = "superwise-chatbot-package-css";
|
|
1145
|
+
function tt() {
|
|
1146
|
+
if (typeof document > "u" || document.getElementById(Me)) return;
|
|
1147
|
+
const r = document.createElement("style");
|
|
1148
|
+
r.id = Me, r.textContent = Xe, document.head.appendChild(r);
|
|
1126
1149
|
}
|
|
1127
|
-
|
|
1128
|
-
function
|
|
1129
|
-
return
|
|
1150
|
+
tt();
|
|
1151
|
+
function rt(r) {
|
|
1152
|
+
return r === "human" ? { ...y.message, ...y.messageSelf } : { ...y.message, ...y.messageOther };
|
|
1130
1153
|
}
|
|
1131
|
-
function
|
|
1132
|
-
return String(
|
|
1154
|
+
function Ce(r) {
|
|
1155
|
+
return String(r).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1133
1156
|
}
|
|
1134
|
-
function
|
|
1135
|
-
return !
|
|
1157
|
+
function ye(r) {
|
|
1158
|
+
return !r.trim() || /^\s*([*\-]|\d+\.)\s+/.test(r) || /\[text\]|\[\/text\]|\]\[text\]/i.test(r) || /\?|!/.test(r) || r.includes("—") || r.includes("–") || /^\s*(Would|Can|May|Could|Should|I |You |We |Let's|Please|Sure|Yes|No)\b/i.test(r) || /\b(your|you|we|me)\b/i.test(r) || /^\s*[A-Z][^.(]*[.?]\s*$/.test(r) || /^\s*#/.test(r) || /^\s*[-*]\s+[A-Z]/.test(r) && !/\.\w+\s*\(|=/.test(r) || /^\s*\d+\.\s+[A-Z][^.(]*$/.test(r) ? !1 : !!(/^\s*[)\]}]\s*$/.test(r) || /^\s*[\w.]+\s*=/.test(r) || /\.\w+\s*\(|\b(print|range|open|str|int|list|dict)\s*\(/.test(r) || /^\s*(def|class|import|from|return|if|else|elif|for|while|try|except|with|async)\b/.test(r) || /^\s{2,}/.test(r) && /[=(){}\[\],:]/.test(r) || /[,(]\s*$|:\s*$/.test(r) || /["'][^"']*["']\s*[:=]/.test(r) && r.length > 10 || /\b\w+\s*\([^)]*\)\s*$/.test(r) && /[=.]\w+\s*\(|import|from\s+\w+/.test(r));
|
|
1136
1159
|
}
|
|
1137
|
-
function
|
|
1138
|
-
const n = [],
|
|
1139
|
-
`),
|
|
1140
|
-
let
|
|
1141
|
-
for (;
|
|
1142
|
-
const
|
|
1143
|
-
if (!
|
|
1144
|
-
|
|
1160
|
+
function nt(r) {
|
|
1161
|
+
const n = [], i = r.split(`
|
|
1162
|
+
`), a = [];
|
|
1163
|
+
let o = 0;
|
|
1164
|
+
for (; o < i.length; ) {
|
|
1165
|
+
const f = i[o];
|
|
1166
|
+
if (!ye(f)) {
|
|
1167
|
+
a.push(f), o++;
|
|
1145
1168
|
continue;
|
|
1146
1169
|
}
|
|
1147
|
-
const
|
|
1148
|
-
for (;
|
|
1149
|
-
const
|
|
1150
|
-
if (
|
|
1151
|
-
|
|
1170
|
+
const c = [];
|
|
1171
|
+
for (; o < i.length; ) {
|
|
1172
|
+
const d = ye(i[o]), l = i[o].trim() === "", b = o + 1 < i.length && ye(i[o + 1]);
|
|
1173
|
+
if (d || l && c.length > 0 && b)
|
|
1174
|
+
c.push(i[o]), o++;
|
|
1152
1175
|
else break;
|
|
1153
1176
|
}
|
|
1154
|
-
if (
|
|
1155
|
-
const
|
|
1156
|
-
`).trim(),
|
|
1157
|
-
n.push({ placeholder: `\0CODE_RAW_${
|
|
1158
|
-
} else
|
|
1177
|
+
if (c.length >= 2) {
|
|
1178
|
+
const d = n.length, l = c.join(`
|
|
1179
|
+
`).trim(), b = Ce(l);
|
|
1180
|
+
n.push({ placeholder: `\0CODE_RAW_${d}\0`, html: `<pre class="sw-ttyw-code-block"><code>${b}</code></pre>` }), a.push(`\0CODE_RAW_${d}\0`);
|
|
1181
|
+
} else c.length === 1 && a.push(c[0]);
|
|
1159
1182
|
}
|
|
1160
|
-
return { html:
|
|
1183
|
+
return { html: a.join(`
|
|
1161
1184
|
`), codeBlocks: n };
|
|
1162
1185
|
}
|
|
1163
|
-
function
|
|
1164
|
-
return !
|
|
1186
|
+
function Ve(r) {
|
|
1187
|
+
return !r || !String(r).trim() ? "" : String(r).replace(/^### (.*$)/gim, "<h3>$1</h3>").replace(/^## (.*$)/gim, "<h2>$1</h2>").replace(/^# (.*$)/gim, "<h1>$1</h1>").replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/`([^`]+)`/g, "<code>$1</code>").replace(/\n/g, "<br>");
|
|
1165
1188
|
}
|
|
1166
|
-
const
|
|
1167
|
-
function
|
|
1189
|
+
const We = /^\s*([*\-]|\d+\.)\s+(.*)$/;
|
|
1190
|
+
function ot(r) {
|
|
1168
1191
|
const n = [];
|
|
1169
|
-
for (const
|
|
1170
|
-
const
|
|
1171
|
-
if (!
|
|
1172
|
-
const
|
|
1173
|
-
n.push({ indent:
|
|
1192
|
+
for (const l of r) {
|
|
1193
|
+
const b = l.match(We);
|
|
1194
|
+
if (!b) continue;
|
|
1195
|
+
const m = l.match(/^(\s*)/)[1].length, L = b[1], p = b[2], h = /^\d+\.$/.test(L);
|
|
1196
|
+
n.push({ indent: m, content: p, ordered: h });
|
|
1174
1197
|
}
|
|
1175
1198
|
if (n.length === 0) return "";
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1199
|
+
const i = 2, a = [], o = [];
|
|
1200
|
+
let f = !1, c = !1, d = !1;
|
|
1201
|
+
for (let l = 0; l < n.length; l++) {
|
|
1202
|
+
const { indent: b, content: m, ordered: L } = n[l], p = Math.floor(b / i), h = Ve(m);
|
|
1203
|
+
if (L)
|
|
1204
|
+
c && (d && a.push("</li>"), a.push("</ul></li>"), o.pop(), c = !1, d = !1), d && o.length > 0 && o[o.length - 1].type === "ol" && a.push("</li>"), (o.length === 0 || o[o.length - 1].type !== "ol") && (a.push("<ol>"), o.push({ type: "ol", indentLevel: p })), a.push("<li>", h), d = !0, f = !0;
|
|
1205
|
+
else {
|
|
1206
|
+
if (f && p <= (o.length > 0 ? o[o.length - 1].indentLevel : 0))
|
|
1207
|
+
a.push("<ul>"), o.push({ type: "ul", indentLevel: p }), c = !0, d = !1;
|
|
1208
|
+
else if (c || o.length > 0 && o[o.length - 1].type === "ul") {
|
|
1209
|
+
d && a.push("</li>"), d = !0;
|
|
1210
|
+
const w = o.length > 0 ? o[o.length - 1].indentLevel : -1;
|
|
1211
|
+
for (; p > w && o.length > 0 && o[o.length - 1].type === "ul"; ) {
|
|
1212
|
+
const g = o[o.length - 1];
|
|
1213
|
+
if (p <= g.indentLevel) break;
|
|
1214
|
+
a.push("<ul>"), o.push({ type: "ul", indentLevel: p });
|
|
1215
|
+
}
|
|
1216
|
+
} else
|
|
1217
|
+
o.length > 0 && a.push("</li>"), (o.length === 0 || o[o.length - 1].type !== "ul") && (a.push("<ul>"), o.push({ type: "ul", indentLevel: p })), d = !0;
|
|
1218
|
+
a.push("<li>", h), f = !1;
|
|
1219
|
+
}
|
|
1184
1220
|
}
|
|
1185
|
-
for (;
|
|
1186
|
-
|
|
1187
|
-
return
|
|
1221
|
+
for (d && a.push("</li>"); o.length > 0; )
|
|
1222
|
+
o.pop().type === "ul" ? (a.push("</ul>"), o.length > 0 && o[o.length - 1].type === "ol" && a.push("</li>")) : a.push("</ol>");
|
|
1223
|
+
return a.join("");
|
|
1188
1224
|
}
|
|
1189
|
-
function
|
|
1190
|
-
if (!
|
|
1191
|
-
let n = String(
|
|
1192
|
-
const
|
|
1193
|
-
n = n.replace(/```\s*(\w*)\s*\n?([\s\S]*?)```/g, (
|
|
1194
|
-
const
|
|
1195
|
-
return
|
|
1196
|
-
}), n = n.replace(/\[code\]([\s\S]*?)\[\/code\]/gi, (
|
|
1197
|
-
const
|
|
1198
|
-
return
|
|
1225
|
+
function Te(r) {
|
|
1226
|
+
if (!r) return "";
|
|
1227
|
+
let n = String(r);
|
|
1228
|
+
const i = [];
|
|
1229
|
+
n = n.replace(/```\s*(\w*)\s*\n?([\s\S]*?)```/g, (p, h, w) => {
|
|
1230
|
+
const g = i.length, x = Ce(w.trim());
|
|
1231
|
+
return i.push(`<pre class="sw-ttyw-code-block"><code class="${h ? `language-${h}` : ""}">${x}</code></pre>`), `\0CODE_FENCED_${g}\0`;
|
|
1232
|
+
}), n = n.replace(/\[code\]([\s\S]*?)\[\/code\]/gi, (p, h) => {
|
|
1233
|
+
const w = i.length, g = Ce(h.trim());
|
|
1234
|
+
return i.push(`<pre class="sw-ttyw-code-block"><code>${g}</code></pre>`), `\0CODE_FENCED_${w}\0`;
|
|
1199
1235
|
});
|
|
1200
|
-
const { html:
|
|
1201
|
-
n =
|
|
1202
|
-
const
|
|
1203
|
-
`),
|
|
1204
|
-
let
|
|
1205
|
-
function
|
|
1206
|
-
|
|
1236
|
+
const { html: a, codeBlocks: o } = nt(n);
|
|
1237
|
+
n = a, n = n.replace(/\[text\]([\s\S]*?)(?:\[\/text\]|\]\[text\])/gi, '<span class="sw-ttyw-text-block">$1</span>').replace(/\[bold\]([\s\S]*?)\[\/bold\]/gi, "<strong>$1</strong>").replace(/\[italic\]([\s\S]*?)\[\/italic\]/gi, "<em>$1</em>").replace(/bold([\s\S]*?)\/bold/gi, "<strong>$1</strong>").replace(/italic([\s\S]*?)\/italic/gi, "<em>$1</em>").replace(/\[([^\]]+)\]\(([^)]+)\)/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>').replace(/(https?:\/\/[^\s<]+)/g, '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\[([^[\]]+)\]/g, '<span class="sw-ttyw-bracket-label">$1</span>');
|
|
1238
|
+
const f = n.split(`
|
|
1239
|
+
`), c = [];
|
|
1240
|
+
let d = [], l = [];
|
|
1241
|
+
function b() {
|
|
1242
|
+
d.length && (c.push({ type: "list", lines: d }), d = []);
|
|
1207
1243
|
}
|
|
1208
|
-
function
|
|
1209
|
-
|
|
1244
|
+
function m() {
|
|
1245
|
+
l.length && (c.push({ type: "content", lines: l }), l = []);
|
|
1210
1246
|
}
|
|
1211
|
-
for (let
|
|
1212
|
-
const
|
|
1213
|
-
|
|
1247
|
+
for (let p = 0; p < f.length; p++) {
|
|
1248
|
+
const h = f[p];
|
|
1249
|
+
We.test(h) ? (m(), d.push(h)) : (b(), l.push(h));
|
|
1214
1250
|
}
|
|
1215
|
-
return
|
|
1216
|
-
`))).join(""),
|
|
1217
|
-
n = n.replace(`\0CODE_FENCED_${
|
|
1218
|
-
}),
|
|
1219
|
-
n = n.replace(
|
|
1251
|
+
return b(), m(), n = c.map((p) => p.type === "list" ? ot(p.lines) : Ve(p.lines.join(`
|
|
1252
|
+
`))).join(""), i.forEach((p, h) => {
|
|
1253
|
+
n = n.replace(`\0CODE_FENCED_${h}\0`, p);
|
|
1254
|
+
}), o.forEach(({ placeholder: p, html: h }) => {
|
|
1255
|
+
n = n.replace(p, h);
|
|
1220
1256
|
}), n = n.replace(/(<br\s*\/?>)\s*$/i, ""), n;
|
|
1221
1257
|
}
|
|
1222
|
-
const
|
|
1223
|
-
const [
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
}, [
|
|
1258
|
+
const st = 30, at = 300, it = Pe(function({ text: n, speed: i = 20, onComplete: a }) {
|
|
1259
|
+
const [o, f] = I(""), [c, d] = I(!1), l = V(a);
|
|
1260
|
+
W(() => {
|
|
1261
|
+
l.current = a;
|
|
1262
|
+
}, [a]), W(() => {
|
|
1227
1263
|
if (!n) return;
|
|
1228
|
-
|
|
1229
|
-
const
|
|
1230
|
-
let
|
|
1231
|
-
const
|
|
1232
|
-
|
|
1233
|
-
},
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1264
|
+
f(""), d(!1);
|
|
1265
|
+
const m = n.trim().split(/\s+/), L = Math.min(st, m.length), p = m.slice(0, L).join(" "), h = Math.min(p.length, at, n.length);
|
|
1266
|
+
let w = 0, g = null, x = !1;
|
|
1267
|
+
const M = () => {
|
|
1268
|
+
x || (x = !0, g && clearInterval(g), g = null, f(n), d(!0), l.current && l.current());
|
|
1269
|
+
}, _ = () => {
|
|
1270
|
+
typeof document < "u" && M();
|
|
1271
|
+
};
|
|
1272
|
+
return typeof document < "u" && document.addEventListener("visibilitychange", _), g = setInterval(() => {
|
|
1273
|
+
w < h ? (f(n.slice(0, w + 1)), w++) : M();
|
|
1274
|
+
}, i), () => {
|
|
1275
|
+
g && clearInterval(g), typeof document < "u" && document.removeEventListener("visibilitychange", _);
|
|
1276
|
+
};
|
|
1277
|
+
}, [n, i]);
|
|
1278
|
+
const b = (m) => m.replace(/(https?:\/\/[^\s<]+)/g, '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\[bold\]([\s\S]*?)\[\/bold\]/gi, "<strong>$1</strong>").replace(/\[italic\]([\s\S]*?)\[\/italic\]/gi, "<em>$1</em>").replace(/bold([\s\S]*?)\/bold/gi, "<strong>$1</strong>").replace(/italic([\s\S]*?)\/italic/gi, "<em>$1</em>").replace(/\[([^[\]]+)\]/g, '<span class="sw-ttyw-bracket-label">$1</span>').replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/(?:^|\n)-\s+/g, `
|
|
1237
1279
|
• `).replace(/\n/g, "<br/>").replace(/(\d+\.\s)/g, "<br/>$1").replace(/(\*\s)/g, "<br/>$1");
|
|
1238
1280
|
return /* @__PURE__ */ e.jsx(
|
|
1239
1281
|
"div",
|
|
@@ -1244,18 +1286,18 @@ const rt = 30, nt = 300, ot = Re(function({ text: n, speed: a = 20, onComplete:
|
|
|
1244
1286
|
wordBreak: "break-word"
|
|
1245
1287
|
},
|
|
1246
1288
|
dangerouslySetInnerHTML: {
|
|
1247
|
-
__html:
|
|
1289
|
+
__html: c ? Te(o) : b(o) + '<span class="typing-cursor">|</span>'
|
|
1248
1290
|
}
|
|
1249
1291
|
}
|
|
1250
1292
|
);
|
|
1251
|
-
}),
|
|
1252
|
-
const
|
|
1253
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
1254
|
-
/* @__PURE__ */ e.jsx("div", { className: "message-avatar", style:
|
|
1255
|
-
/* @__PURE__ */ e.jsx("path", { d: "M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21"
|
|
1256
|
-
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "7", r: "4"
|
|
1257
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
1258
|
-
/* @__PURE__ */ e.jsx("div", { className: "message-content sw-ttyw-markdown", style:
|
|
1293
|
+
}), lt = Pe(function({ msg: n, isTyping: i = !1, onTypingComplete: a }) {
|
|
1294
|
+
const o = n.from === "human" ? "sw-ttyw-message self" : "sw-ttyw-message other";
|
|
1295
|
+
return /* @__PURE__ */ e.jsxs("div", { className: o, style: rt(n.from), children: [
|
|
1296
|
+
/* @__PURE__ */ e.jsx("div", { className: "message-avatar", style: y.messageAvatar, children: n.from === "human" ? /* @__PURE__ */ e.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1297
|
+
/* @__PURE__ */ e.jsx("path", { d: "M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21" }),
|
|
1298
|
+
/* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "7", r: "4" })
|
|
1299
|
+
] }) : /* @__PURE__ */ e.jsx(Ae, { width: 20, height: 20 }) }),
|
|
1300
|
+
/* @__PURE__ */ e.jsx("div", { className: "message-content sw-ttyw-markdown", style: y.messageContent, children: n.from === "ai" && i ? /* @__PURE__ */ e.jsx(it, { text: n.text, speed: 20, onComplete: a }) : n.from === "ai" ? /* @__PURE__ */ e.jsx(
|
|
1259
1301
|
"div",
|
|
1260
1302
|
{
|
|
1261
1303
|
style: {
|
|
@@ -1263,7 +1305,7 @@ const rt = 30, nt = 300, ot = Re(function({ text: n, speed: a = 20, onComplete:
|
|
|
1263
1305
|
lineHeight: "1.5",
|
|
1264
1306
|
wordBreak: "break-word"
|
|
1265
1307
|
},
|
|
1266
|
-
dangerouslySetInnerHTML: { __html:
|
|
1308
|
+
dangerouslySetInnerHTML: { __html: Te(n.text) }
|
|
1267
1309
|
}
|
|
1268
1310
|
) : /* @__PURE__ */ e.jsx(
|
|
1269
1311
|
"div",
|
|
@@ -1280,254 +1322,255 @@ const rt = 30, nt = 300, ot = Re(function({ text: n, speed: a = 20, onComplete:
|
|
|
1280
1322
|
}
|
|
1281
1323
|
) })
|
|
1282
1324
|
] });
|
|
1283
|
-
}),
|
|
1325
|
+
}), ct = (r = "") => {
|
|
1284
1326
|
const n = (/* @__PURE__ */ new Date()).getHours();
|
|
1285
|
-
let
|
|
1286
|
-
return n >= 5 && n < 12 ?
|
|
1287
|
-
`🌅 Good morning ${
|
|
1288
|
-
`☀️ Morning ${
|
|
1289
|
-
`🌞 Good morning ${
|
|
1290
|
-
`👋 Rise and shine ${
|
|
1291
|
-
`👋 Morning ${
|
|
1292
|
-
] :
|
|
1327
|
+
let i = [];
|
|
1328
|
+
return n >= 5 && n < 12 ? r ? i = [
|
|
1329
|
+
`🌅 Good morning ${r}! I'm an expert on SUPERWISE. Ready to explore the platform together and uncover what's possible?`,
|
|
1330
|
+
`☀️ Morning ${r}! I'm an expert on SUPERWISE. What would you like to discover or optimize today?`,
|
|
1331
|
+
`🌞 Good morning ${r}! I'm an expert on SUPERWISE. Curious about a feature or looking to dive deeper into the platform?`,
|
|
1332
|
+
`👋 Rise and shine ${r}! I'm an expert on SUPERWISE. Let's jump into anything you want to explore.`,
|
|
1333
|
+
`👋 Morning ${r}! I'm an expert on SUPERWISE. How can I guide you through the platform today?`
|
|
1334
|
+
] : i = [
|
|
1293
1335
|
"🌅 Good morning! I'm an expert on SUPERWISE. Ready to explore the platform together and uncover what's possible?",
|
|
1294
1336
|
"☀️ Morning! I'm an expert on SUPERWISE. What would you like to discover or optimize today?",
|
|
1295
1337
|
"🌞 Good morning! I'm an expert on SUPERWISE. Curious about a feature or looking to dive deeper into the platform?",
|
|
1296
1338
|
"👋 Rise and shine! I'm an expert on SUPERWISE. Let's jump into anything you want to explore.",
|
|
1297
1339
|
"👋 Morning! I'm an expert on SUPERWISE. How can I guide you through the platform today?"
|
|
1298
|
-
] : n >= 12 && n < 17 ?
|
|
1299
|
-
`🌞 Good afternoon ${
|
|
1300
|
-
`☀️ Afternoon ${
|
|
1301
|
-
`👋 Good afternoon ${
|
|
1302
|
-
`🌅 Hey there ${
|
|
1303
|
-
`🌅 Afternoon ${
|
|
1304
|
-
] :
|
|
1340
|
+
] : n >= 12 && n < 17 ? r ? i = [
|
|
1341
|
+
`🌞 Good afternoon ${r}! I'm an expert on SUPERWISE. Ready to explore insights, features, or workflows together?`,
|
|
1342
|
+
`☀️ Afternoon ${r}! I'm an expert on SUPERWISE. How may I help you today?`,
|
|
1343
|
+
`👋 Good afternoon ${r}! I'm an expert on SUPERWISE. Looking to learn, optimize, or explore something specific?`,
|
|
1344
|
+
`🌅 Hey there ${r}! SUPERWISE expert here. Ready to help you unlock the capabilities you're curious about.`,
|
|
1345
|
+
`🌅 Afternoon ${r}! I'm an expert on SUPERWISE. How can I support your exploration today?`
|
|
1346
|
+
] : i = [
|
|
1305
1347
|
"🌞 Good afternoon! I'm an expert on SUPERWISE. Ready to explore insights, features, or workflows together?",
|
|
1306
1348
|
"☀️ Afternoon! I'm an expert on SUPERWISE. How may I help you today?",
|
|
1307
1349
|
"👋 Good afternoon! I'm an expert on SUPERWISE. Looking to learn, optimize, or explore something specific?",
|
|
1308
1350
|
"🌅 Hey there! SUPERWISE expert here. Ready to help you unlock the capabilities you're curious about.",
|
|
1309
1351
|
"🌅 Afternoon! I'm an expert on SUPERWISE. How can I support your exploration today?"
|
|
1310
|
-
] : n >= 17 && n < 21 ?
|
|
1311
|
-
`🌆 Good evening ${
|
|
1312
|
-
`🌅 Evening ${
|
|
1313
|
-
`👋 Good evening ${
|
|
1314
|
-
`🌇 Hey there ${
|
|
1315
|
-
`🌇 Evening ${
|
|
1316
|
-
] :
|
|
1352
|
+
] : n >= 17 && n < 21 ? r ? i = [
|
|
1353
|
+
`🌆 Good evening ${r}! I'm a SUPERWISE expert. Ready to explore features or clarify anything you're evaluating?`,
|
|
1354
|
+
`🌅 Evening ${r}! I'm your SUPERWISE expert. What can I help you discover or fine-tune tonight?`,
|
|
1355
|
+
`👋 Good evening ${r}! I'm an expert on SUPERWISE. Interested in exploring capabilities or reviewing how something works?`,
|
|
1356
|
+
`🌇 Hey there ${r}! SUPERWISE expert here. Want to dive into the platform together?`,
|
|
1357
|
+
`🌇 Evening ${r}! I'm an expert on SUPERWISE. How can I assist your learning or discovery today?`
|
|
1358
|
+
] : i = [
|
|
1317
1359
|
"🌆 Good evening! I'm a SUPERWISE expert. Ready to explore features or clarify anything you're evaluating?",
|
|
1318
1360
|
"🌅 Evening! I'm your SUPERWISE expert. What can I help you discover or fine-tune tonight?",
|
|
1319
1361
|
"👋 Good evening! I'm an expert on SUPERWISE. Interested in exploring capabilities or reviewing how something works?",
|
|
1320
1362
|
"🌇 Hey there! SUPERWISE expert here. Want to dive into the platform together?",
|
|
1321
1363
|
"🌇 Evening! I'm an expert on SUPERWISE. How can I assist your learning or discovery today?"
|
|
1322
|
-
] :
|
|
1323
|
-
`🌙 Good evening ${
|
|
1324
|
-
`⭐ Evening ${
|
|
1325
|
-
`👋 Good evening ${
|
|
1326
|
-
`🌃 Hey there ${
|
|
1327
|
-
`🌃 Evening ${
|
|
1328
|
-
] :
|
|
1364
|
+
] : r ? i = [
|
|
1365
|
+
`🌙 Good evening ${r}! I'm a SUPERWISE expert. Ready to guide you through the platform anytime.`,
|
|
1366
|
+
`⭐ Evening ${r}! I'm your SUPERWISE expert. What brings you to Superwise tonight - exploration, questions, or clarity?`,
|
|
1367
|
+
`👋 Good evening ${r}! I'm a SUPERWISE expert. Looking to discover features or understand how something works?`,
|
|
1368
|
+
`🌃 Hey there ${r}! I'm a SUPERWISE expert. Want to explore what the platform offers?`,
|
|
1369
|
+
`🌃 Evening ${r}! SUPERWISE expert here. How can I help simplify or explain things for you today?`
|
|
1370
|
+
] : i = [
|
|
1329
1371
|
"🌙 Good evening! I'm a SUPERWISE expert. Ready to guide you through the platform anytime.",
|
|
1330
1372
|
"⭐ Evening! I'm your SUPERWISE expert. What brings you to Superwise tonight - exploration, questions, or clarity?",
|
|
1331
1373
|
"👋 Good evening! I'm a SUPERWISE expert. Looking to discover features or understand how something works?",
|
|
1332
1374
|
"🌃 Hey there! I'm a SUPERWISE expert. Want to explore what the platform offers?",
|
|
1333
1375
|
"🌃 Evening! SUPERWISE expert here. How can I help simplify or explain things for you today?"
|
|
1334
|
-
],
|
|
1376
|
+
], i[Math.floor(Math.random() * i.length)];
|
|
1335
1377
|
};
|
|
1336
|
-
function
|
|
1337
|
-
const [
|
|
1378
|
+
function pt({ title: r = "", agentId: n = "", discoveryAgentId: i = "", primaryColor: a = "", minimizedButtonColor: o = "", apiUrl: f = "" }) {
|
|
1379
|
+
const [c, d] = I(() => {
|
|
1338
1380
|
try {
|
|
1339
1381
|
if (typeof window < "u" && window.localStorage) {
|
|
1340
|
-
const
|
|
1341
|
-
return
|
|
1382
|
+
const s = window.localStorage.getItem("chatbot-messages");
|
|
1383
|
+
return s ? JSON.parse(s) : [];
|
|
1342
1384
|
}
|
|
1343
1385
|
} catch {
|
|
1344
1386
|
}
|
|
1345
1387
|
return [];
|
|
1346
|
-
}), [l,
|
|
1388
|
+
}), [l, b] = I(() => {
|
|
1347
1389
|
try {
|
|
1348
1390
|
if (typeof window < "u" && window.localStorage) {
|
|
1349
|
-
const
|
|
1350
|
-
return
|
|
1391
|
+
const s = window.localStorage.getItem("chatbot-mql_df");
|
|
1392
|
+
return s ? JSON.parse(s) : [];
|
|
1351
1393
|
}
|
|
1352
1394
|
} catch {
|
|
1353
1395
|
}
|
|
1354
1396
|
return [];
|
|
1355
|
-
}), [
|
|
1356
|
-
if (
|
|
1397
|
+
}), [m, L] = I(""), [p, h] = I(!1), [w, g] = I(!1), [x, M] = I(!0), [_, Y] = I(!1), [le, T] = I(/* @__PURE__ */ new Set()), [ce, de] = I(!1), [pe, q] = I(!1), [ue, $] = I(!1), [P, te] = I(!1), [be, G] = I(""), [U, O] = I(""), re = 12e4, me = "https://superwise.ai/contact/", ne = "Something went wrong while processing your request at SUPERWISE API. Please try again in a moment. If the issue persists, contact support for assistance.", t = V(null), u = V(null), E = (() => {
|
|
1398
|
+
if (a) return a;
|
|
1357
1399
|
if (typeof document < "u" && typeof window < "u") {
|
|
1358
|
-
const
|
|
1359
|
-
if (
|
|
1360
|
-
return
|
|
1361
|
-
const
|
|
1362
|
-
if (
|
|
1400
|
+
const s = document.querySelector("[data-chatbot-color]");
|
|
1401
|
+
if (s)
|
|
1402
|
+
return s.getAttribute("data-chatbot-color") || "#000";
|
|
1403
|
+
const v = getComputedStyle(document.documentElement).getPropertyValue("--swttyw-primary-color").trim();
|
|
1404
|
+
if (v) return v;
|
|
1363
1405
|
}
|
|
1364
1406
|
return "#000";
|
|
1365
|
-
})(),
|
|
1407
|
+
})(), J = o || "#000000", X = He(() => {
|
|
1366
1408
|
if (!l || l.length === 0) return "";
|
|
1367
|
-
const
|
|
1368
|
-
return
|
|
1369
|
-
}, [l]),
|
|
1370
|
-
|
|
1371
|
-
}, []),
|
|
1372
|
-
|
|
1373
|
-
}, [
|
|
1374
|
-
|
|
1375
|
-
|
|
1409
|
+
const s = l.find((C) => C.name && C.email);
|
|
1410
|
+
return s ? `${s.name} (${s.email})` : "";
|
|
1411
|
+
}, [l]), j = V(null), R = V(null), [oe, K] = I(!0), Q = V(!0), ke = V(c), A = Z(() => {
|
|
1412
|
+
t.current && (clearTimeout(t.current), t.current = null);
|
|
1413
|
+
}, []), ve = Z((s) => {
|
|
1414
|
+
A(), t.current = setTimeout(s, re);
|
|
1415
|
+
}, [re, A]), we = He(() => c.map((s) => ({ role: s.from, content: s.text })), [c]), he = (s) => {
|
|
1416
|
+
O(s), setTimeout(() => {
|
|
1417
|
+
O("");
|
|
1376
1418
|
}, 4e3);
|
|
1377
|
-
},
|
|
1378
|
-
const
|
|
1379
|
-
return
|
|
1380
|
-
},
|
|
1381
|
-
var
|
|
1382
|
-
const
|
|
1383
|
-
|
|
1419
|
+
}, $e = (s) => {
|
|
1420
|
+
const C = s.length, v = s.trim();
|
|
1421
|
+
return G(""), O(""), !v || C === 0 ? (he("Please enter a message before sending."), !1) : new RegExp(/(<([^>]+)>)/gi).test(v) ? (he("Please avoid using HTML tags or scripts in your message."), !1) : v.length < 2 ? (he("Please enter a meaningful question (at least 2 characters)."), !1) : v.length > 1e3 ? (he("Message is too long. Please keep it under 1000 characters."), !1) : (G(""), O(""), !0);
|
|
1422
|
+
}, D = Z((s = "auto") => {
|
|
1423
|
+
var v;
|
|
1424
|
+
const C = R.current;
|
|
1425
|
+
C && (C.scrollTop = C.scrollHeight), (v = j.current) == null || v.scrollIntoView({ behavior: s }), Q.current = !0, K(!0);
|
|
1384
1426
|
}, []);
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
}, [
|
|
1388
|
-
const
|
|
1389
|
-
if (!
|
|
1390
|
-
const
|
|
1391
|
-
|
|
1427
|
+
W(() => {
|
|
1428
|
+
Q.current && requestAnimationFrame(() => D("auto"));
|
|
1429
|
+
}, [c, U, ue, P, le, p, D]), W(() => {
|
|
1430
|
+
const s = R.current;
|
|
1431
|
+
if (!s || typeof ResizeObserver > "u") return;
|
|
1432
|
+
const C = new ResizeObserver(() => {
|
|
1433
|
+
Q.current && D("auto");
|
|
1392
1434
|
});
|
|
1393
|
-
return
|
|
1394
|
-
}, [
|
|
1395
|
-
const
|
|
1396
|
-
|
|
1397
|
-
const
|
|
1398
|
-
if (
|
|
1399
|
-
const
|
|
1400
|
-
|
|
1401
|
-
const
|
|
1402
|
-
if (
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1435
|
+
return C.observe(s), () => C.disconnect();
|
|
1436
|
+
}, [D]);
|
|
1437
|
+
const ge = V(null), Se = V(x);
|
|
1438
|
+
W(() => {
|
|
1439
|
+
const s = Se.current;
|
|
1440
|
+
if (Se.current = x, s && !x) {
|
|
1441
|
+
const C = ge.current;
|
|
1442
|
+
C != null ? (ge.current = null, requestAnimationFrame(() => {
|
|
1443
|
+
const v = R.current;
|
|
1444
|
+
if (v) {
|
|
1445
|
+
const H = v.scrollHeight - v.clientHeight;
|
|
1446
|
+
v.scrollTop = Math.min(C, Math.max(0, H));
|
|
1447
|
+
const fe = v.scrollHeight - v.scrollTop - v.clientHeight <= 40;
|
|
1448
|
+
Q.current = fe, K(fe);
|
|
1407
1449
|
}
|
|
1408
|
-
})) : requestAnimationFrame(() =>
|
|
1450
|
+
})) : requestAnimationFrame(() => D("auto"));
|
|
1409
1451
|
}
|
|
1410
|
-
}, [
|
|
1411
|
-
const
|
|
1412
|
-
const
|
|
1413
|
-
if (!
|
|
1414
|
-
const
|
|
1415
|
-
|
|
1452
|
+
}, [x, D]);
|
|
1453
|
+
const Fe = Z(() => {
|
|
1454
|
+
const s = R.current;
|
|
1455
|
+
if (!s) return;
|
|
1456
|
+
const H = s.scrollHeight - s.scrollTop - s.clientHeight <= 40;
|
|
1457
|
+
Q.current !== H && (Q.current = H, K(H));
|
|
1416
1458
|
}, []);
|
|
1417
|
-
|
|
1459
|
+
W(() => {
|
|
1418
1460
|
try {
|
|
1419
|
-
typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-messages", JSON.stringify(
|
|
1461
|
+
typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-messages", JSON.stringify(c));
|
|
1420
1462
|
} catch {
|
|
1421
1463
|
}
|
|
1422
|
-
}, [
|
|
1464
|
+
}, [c]), W(() => {
|
|
1423
1465
|
try {
|
|
1424
1466
|
typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-mql_df", JSON.stringify(l));
|
|
1425
1467
|
} catch {
|
|
1426
1468
|
}
|
|
1427
|
-
}, [l]),
|
|
1428
|
-
|
|
1429
|
-
}, [
|
|
1430
|
-
if (
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1469
|
+
}, [l]), W(() => {
|
|
1470
|
+
ke.current = c;
|
|
1471
|
+
}, [c]), W(() => {
|
|
1472
|
+
if (c.length === 0 && !ce) {
|
|
1473
|
+
const C = { from: "ai", text: ct(X) };
|
|
1474
|
+
d([C]), de(!0), T(/* @__PURE__ */ new Set([0]));
|
|
1433
1475
|
}
|
|
1434
|
-
}, [
|
|
1435
|
-
const
|
|
1436
|
-
var
|
|
1437
|
-
if (
|
|
1438
|
-
const
|
|
1439
|
-
if (!
|
|
1476
|
+
}, [c.length, ce, X]), W(() => () => A(), [A]);
|
|
1477
|
+
const Ee = Z(async () => {
|
|
1478
|
+
var Ie;
|
|
1479
|
+
if (p || P) return;
|
|
1480
|
+
const s = m.trim();
|
|
1481
|
+
if (!s || !$e(m))
|
|
1440
1482
|
return;
|
|
1441
|
-
|
|
1442
|
-
const
|
|
1443
|
-
|
|
1444
|
-
const
|
|
1445
|
-
|
|
1446
|
-
let
|
|
1447
|
-
if (l && l.length > 0 && !
|
|
1448
|
-
const k = F.filter((
|
|
1449
|
-
k && k.text && k.text.trim() !== "" && (
|
|
1483
|
+
$(!1), A(), (Ie = u.current) == null || Ie.abort();
|
|
1484
|
+
const C = new AbortController();
|
|
1485
|
+
u.current = C;
|
|
1486
|
+
const v = C.signal, H = { from: "human", text: s }, F = ke.current, fe = [...F, H];
|
|
1487
|
+
d(fe), L(""), h(!0);
|
|
1488
|
+
let Le = s;
|
|
1489
|
+
if (l && l.length > 0 && !pe) {
|
|
1490
|
+
const k = F.filter((B) => B.from === "ai").pop();
|
|
1491
|
+
k && k.text && k.text.trim() !== "" && (Le = s + "." + k.text, q(!0));
|
|
1450
1492
|
}
|
|
1451
|
-
const
|
|
1452
|
-
|
|
1493
|
+
const Oe = [...we, { role: "human", content: s }];
|
|
1494
|
+
ve(() => {
|
|
1453
1495
|
var k;
|
|
1454
|
-
|
|
1496
|
+
$(!0), (k = u.current) == null || k.abort(), h(!1);
|
|
1455
1497
|
});
|
|
1456
1498
|
try {
|
|
1457
|
-
const k = await
|
|
1458
|
-
if (
|
|
1459
|
-
const
|
|
1460
|
-
|
|
1461
|
-
const z = [...
|
|
1462
|
-
return
|
|
1463
|
-
}), (k.startsWith("⚠️") || k.startsWith("❌")) &&
|
|
1499
|
+
const k = await Ge(Le, Oe, l, n, i, f, v);
|
|
1500
|
+
if (A(), typeof k == "string") {
|
|
1501
|
+
const B = { from: "ai", text: k };
|
|
1502
|
+
d((N) => {
|
|
1503
|
+
const z = [...N, B];
|
|
1504
|
+
return T((ee) => /* @__PURE__ */ new Set([...ee, z.length - 1])), z;
|
|
1505
|
+
}), (k.startsWith("⚠️") || k.startsWith("❌") || k.includes(ne)) && $(!0);
|
|
1464
1506
|
} else {
|
|
1465
1507
|
if (k != null && k.isError) {
|
|
1466
|
-
|
|
1467
|
-
const
|
|
1468
|
-
|
|
1469
|
-
const ee = [...z, { from: "ai", text:
|
|
1470
|
-
return
|
|
1508
|
+
$(!0);
|
|
1509
|
+
const N = k.reply || ie;
|
|
1510
|
+
d((z) => {
|
|
1511
|
+
const ee = [...z, { from: "ai", text: N }];
|
|
1512
|
+
return T((De) => /* @__PURE__ */ new Set([...De, ee.length - 1])), ee;
|
|
1471
1513
|
});
|
|
1472
1514
|
return;
|
|
1473
1515
|
}
|
|
1474
|
-
const
|
|
1475
|
-
|
|
1476
|
-
const z = [...
|
|
1477
|
-
return
|
|
1478
|
-
}), k.mqlDf && Array.isArray(k.mqlDf) &&
|
|
1516
|
+
const B = { from: "ai", text: k.reply };
|
|
1517
|
+
d((N) => {
|
|
1518
|
+
const z = [...N, B];
|
|
1519
|
+
return T((ee) => /* @__PURE__ */ new Set([...ee, z.length - 1])), z;
|
|
1520
|
+
}), k.mqlDf && Array.isArray(k.mqlDf) && b(k.mqlDf), k.reply && (k.reply.startsWith("⚠️") || k.reply.startsWith("❌") || k.reply.includes(ne)) && $(!0), k.chatHistoryLimitExceeded && te(!0);
|
|
1479
1521
|
}
|
|
1480
1522
|
} catch (k) {
|
|
1481
|
-
if (
|
|
1523
|
+
if (A(), k.name === "AbortError")
|
|
1482
1524
|
return;
|
|
1483
|
-
|
|
1484
|
-
const
|
|
1485
|
-
...
|
|
1525
|
+
$(!0), d((B) => {
|
|
1526
|
+
const N = [
|
|
1527
|
+
...B,
|
|
1486
1528
|
{
|
|
1487
1529
|
from: "ai",
|
|
1488
|
-
text:
|
|
1530
|
+
text: ie
|
|
1489
1531
|
}
|
|
1490
1532
|
];
|
|
1491
|
-
return
|
|
1533
|
+
return T((z) => /* @__PURE__ */ new Set([...z, N.length - 1])), N;
|
|
1492
1534
|
});
|
|
1493
1535
|
} finally {
|
|
1494
|
-
|
|
1536
|
+
h(!1);
|
|
1495
1537
|
}
|
|
1496
|
-
}, [
|
|
1497
|
-
var
|
|
1498
|
-
|
|
1538
|
+
}, [m, n, i, l, pe, we, P, A, ve]), ze = Z(() => {
|
|
1539
|
+
var s;
|
|
1540
|
+
A(), (s = u.current) == null || s.abort(), $(!1), te(!1), d([]), T(/* @__PURE__ */ new Set()), de(!1), q(!1);
|
|
1499
1541
|
try {
|
|
1500
1542
|
typeof window < "u" && window.localStorage && window.localStorage.removeItem("chatbot-messages");
|
|
1501
1543
|
} catch {
|
|
1502
1544
|
}
|
|
1503
|
-
|
|
1504
|
-
}, [
|
|
1505
|
-
var
|
|
1545
|
+
g(!1);
|
|
1546
|
+
}, [A]), je = Z(async () => {
|
|
1547
|
+
var s, C, v;
|
|
1506
1548
|
if (!l || l.length === 0) {
|
|
1507
1549
|
console.warn("No mql_df data available for PDF download");
|
|
1508
1550
|
return;
|
|
1509
1551
|
}
|
|
1510
1552
|
try {
|
|
1511
|
-
|
|
1512
|
-
const
|
|
1513
|
-
name: ((
|
|
1514
|
-
email: ((
|
|
1515
|
-
summary: `Chat conversation with ${
|
|
1553
|
+
h(!0), console.log("mql_df data for lead extraction:", l);
|
|
1554
|
+
const H = {
|
|
1555
|
+
name: ((s = l.find((F) => F.name)) == null ? void 0 : s.name) || "Chat User",
|
|
1556
|
+
email: ((C = l.find((F) => F.email)) == null ? void 0 : C.email) || "user@example.com",
|
|
1557
|
+
summary: `Chat conversation with ${c.length} messages. User asked: "${((v = c.find((F) => F.from === "human")) == null ? void 0 : v.text) || "No user messages"}"`
|
|
1516
1558
|
};
|
|
1517
|
-
console.log("Extracted lead row:",
|
|
1518
|
-
} catch (
|
|
1519
|
-
console.error("Failed to download PDF:",
|
|
1559
|
+
console.log("Extracted lead row:", H), await Je(l, H, we, f), console.log("PDF downloaded successfully");
|
|
1560
|
+
} catch (H) {
|
|
1561
|
+
console.error("Failed to download PDF:", H);
|
|
1520
1562
|
} finally {
|
|
1521
|
-
|
|
1563
|
+
h(!1);
|
|
1522
1564
|
}
|
|
1523
|
-
}, [l,
|
|
1565
|
+
}, [l, c]);
|
|
1524
1566
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
1525
1567
|
"div",
|
|
1526
1568
|
{
|
|
1527
1569
|
className: "sw-ttyw-chatbot",
|
|
1528
1570
|
style: {
|
|
1529
|
-
...
|
|
1530
|
-
"--swttyw-primary-color":
|
|
1571
|
+
...x ? y.containerMinimized : _ ? y.containerExpanded : y.container,
|
|
1572
|
+
"--swttyw-primary-color": E,
|
|
1573
|
+
"--swttyw-minimized-button-color": J,
|
|
1531
1574
|
"--swttyw-avatar-image": "url('')",
|
|
1532
1575
|
"--swttyw-user-avatar-image": "url('')",
|
|
1533
1576
|
"--swttyw-background-color": "#F7F7F7",
|
|
@@ -1536,30 +1579,27 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1536
1579
|
"--swttyw-footer-font-size": "16px",
|
|
1537
1580
|
"--swttyw-user-background-image": "url('')"
|
|
1538
1581
|
},
|
|
1539
|
-
onClick:
|
|
1582
|
+
onClick: x ? () => M(!1) : void 0,
|
|
1540
1583
|
children: [
|
|
1541
|
-
|
|
1542
|
-
/* Minimized State -
|
|
1543
|
-
/* @__PURE__ */ e.
|
|
1544
|
-
/* @__PURE__ */ e.
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
] }),
|
|
1549
|
-
/* @__PURE__ */ e.jsx("div", { style: f.minimizedTitle, children: t })
|
|
1550
|
-
] })
|
|
1584
|
+
x ? (
|
|
1585
|
+
/* Minimized State - Icon only (no title) */
|
|
1586
|
+
/* @__PURE__ */ e.jsx("div", { style: y.minimizedContent, children: /* @__PURE__ */ e.jsxs("svg", { style: y.chatIcon, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1587
|
+
/* @__PURE__ */ e.jsx("path", { d: "M21 15C21 15.5304 20.7893 16.0391 20.4142 16.4142C20.0391 16.7893 19.5304 17 19 17H7L3 21V5C3 4.46957 3.21071 3.96086 3.58579 3.58579C3.96086 3.21071 4.46957 3 5 3H19C19.5304 3 20.0391 3.21071 20.4142 3.58579C20.7893 3.96086 21 4.46957 21 5V15Z", stroke: "white", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1588
|
+
/* @__PURE__ */ e.jsx("path", { d: "M8 9H16", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
1589
|
+
/* @__PURE__ */ e.jsx("path", { d: "M8 13H12", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
|
|
1590
|
+
] }) })
|
|
1551
1591
|
) : (
|
|
1552
1592
|
/* Full State - Header with Controls */
|
|
1553
|
-
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-header", style:
|
|
1554
|
-
/* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-name", style:
|
|
1555
|
-
/* @__PURE__ */ e.jsxs("div", { style:
|
|
1593
|
+
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-header", style: y.header, children: [
|
|
1594
|
+
/* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-name", style: y.name, children: r }),
|
|
1595
|
+
/* @__PURE__ */ e.jsxs("div", { style: y.headerActions, children: [
|
|
1556
1596
|
/* @__PURE__ */ e.jsx(
|
|
1557
1597
|
"button",
|
|
1558
1598
|
{
|
|
1559
|
-
onClick: () =>
|
|
1560
|
-
style:
|
|
1561
|
-
title:
|
|
1562
|
-
children:
|
|
1599
|
+
onClick: () => Y((s) => !s),
|
|
1600
|
+
style: y.headerButton,
|
|
1601
|
+
title: _ ? "Shrink chat" : "Expand chat",
|
|
1602
|
+
children: _ ? /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1563
1603
|
/* @__PURE__ */ e.jsx("path", { d: "M9 4V9H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1564
1604
|
/* @__PURE__ */ e.jsx("path", { d: "M15 4V9H20", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1565
1605
|
/* @__PURE__ */ e.jsx("path", { d: "M9 20V15H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1576,24 +1616,24 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1576
1616
|
"button",
|
|
1577
1617
|
{
|
|
1578
1618
|
onClick: () => {
|
|
1579
|
-
if (!
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1619
|
+
if (!x) {
|
|
1620
|
+
const s = R.current;
|
|
1621
|
+
s && (ge.current = s.scrollTop), Y(!1);
|
|
1582
1622
|
}
|
|
1583
|
-
|
|
1623
|
+
M(!x);
|
|
1584
1624
|
},
|
|
1585
|
-
style:
|
|
1586
|
-
title:
|
|
1625
|
+
style: y.headerButton,
|
|
1626
|
+
title: x ? "Maximize chat" : "Minimize chat",
|
|
1587
1627
|
children: /* @__PURE__ */ e.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e.jsx("path", { d: "M6 9H18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
|
|
1588
1628
|
}
|
|
1589
1629
|
),
|
|
1590
1630
|
l && l.length > 0 && /* @__PURE__ */ e.jsx(
|
|
1591
1631
|
"button",
|
|
1592
1632
|
{
|
|
1593
|
-
onClick:
|
|
1594
|
-
style:
|
|
1633
|
+
onClick: je,
|
|
1634
|
+
style: y.headerButton,
|
|
1595
1635
|
title: "Download PDF Report",
|
|
1596
|
-
disabled:
|
|
1636
|
+
disabled: p,
|
|
1597
1637
|
children: /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1598
1638
|
/* @__PURE__ */ e.jsx("path", { d: "M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1599
1639
|
/* @__PURE__ */ e.jsx("path", { d: "M7 10L12 15L17 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1604,8 +1644,8 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1604
1644
|
/* @__PURE__ */ e.jsx(
|
|
1605
1645
|
"button",
|
|
1606
1646
|
{
|
|
1607
|
-
onClick: () =>
|
|
1608
|
-
style:
|
|
1647
|
+
onClick: () => g(!0),
|
|
1648
|
+
style: y.headerButton,
|
|
1609
1649
|
title: "Clear chat",
|
|
1610
1650
|
children: /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1611
1651
|
/* @__PURE__ */ e.jsx("path", { d: "M3 6H5H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1618,16 +1658,16 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1618
1658
|
] })
|
|
1619
1659
|
] })
|
|
1620
1660
|
),
|
|
1621
|
-
!
|
|
1661
|
+
!x && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-section", style: { flexGrow: 1, display: "flex", flexDirection: "column" }, children: [
|
|
1622
1662
|
/* @__PURE__ */ e.jsxs(
|
|
1623
1663
|
"div",
|
|
1624
1664
|
{
|
|
1625
1665
|
className: "sw-ttyw-messages",
|
|
1626
|
-
style:
|
|
1627
|
-
ref:
|
|
1628
|
-
onScroll:
|
|
1666
|
+
style: y.chatSection,
|
|
1667
|
+
ref: R,
|
|
1668
|
+
onScroll: Fe,
|
|
1629
1669
|
children: [
|
|
1630
|
-
|
|
1670
|
+
c.length === 0 && !p && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-empty-state", style: {
|
|
1631
1671
|
display: "flex",
|
|
1632
1672
|
flexDirection: "column",
|
|
1633
1673
|
alignItems: "center",
|
|
@@ -1637,7 +1677,7 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1637
1677
|
}, children: /* @__PURE__ */ e.jsx(
|
|
1638
1678
|
"img",
|
|
1639
1679
|
{
|
|
1640
|
-
src:
|
|
1680
|
+
src: Ke,
|
|
1641
1681
|
alt: "Superwise Logo",
|
|
1642
1682
|
style: {
|
|
1643
1683
|
width: "350px",
|
|
@@ -1645,33 +1685,33 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1645
1685
|
opacity: 0.8,
|
|
1646
1686
|
objectFit: "contain"
|
|
1647
1687
|
},
|
|
1648
|
-
onError: (
|
|
1649
|
-
console.log("Logo failed to load, using fallback"),
|
|
1688
|
+
onError: (s) => {
|
|
1689
|
+
console.log("Logo failed to load, using fallback"), s.target.style.display = "none";
|
|
1650
1690
|
}
|
|
1651
1691
|
}
|
|
1652
1692
|
) }),
|
|
1653
|
-
|
|
1654
|
-
|
|
1693
|
+
c.map((s, C) => /* @__PURE__ */ e.jsx(
|
|
1694
|
+
lt,
|
|
1655
1695
|
{
|
|
1656
|
-
msg:
|
|
1657
|
-
isTyping:
|
|
1696
|
+
msg: s,
|
|
1697
|
+
isTyping: le.has(C),
|
|
1658
1698
|
onTypingComplete: () => {
|
|
1659
|
-
|
|
1660
|
-
const
|
|
1661
|
-
return
|
|
1662
|
-
}), requestAnimationFrame(() =>
|
|
1699
|
+
T((v) => {
|
|
1700
|
+
const H = new Set(v);
|
|
1701
|
+
return H.delete(C), H;
|
|
1702
|
+
}), requestAnimationFrame(() => D("auto"));
|
|
1663
1703
|
}
|
|
1664
1704
|
},
|
|
1665
|
-
|
|
1705
|
+
C
|
|
1666
1706
|
)),
|
|
1667
|
-
|
|
1707
|
+
U && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-validation-message", children: [
|
|
1668
1708
|
/* @__PURE__ */ e.jsx("span", { className: "error-icon", children: "⚠️" }),
|
|
1669
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1709
|
+
/* @__PURE__ */ e.jsx("span", { children: U })
|
|
1670
1710
|
] }),
|
|
1671
|
-
|
|
1711
|
+
ue && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-contact-cta", children: /* @__PURE__ */ e.jsxs(
|
|
1672
1712
|
"a",
|
|
1673
1713
|
{
|
|
1674
|
-
href:
|
|
1714
|
+
href: me,
|
|
1675
1715
|
target: "_blank",
|
|
1676
1716
|
rel: "noopener noreferrer",
|
|
1677
1717
|
className: "sw-ttyw-cta-button",
|
|
@@ -1681,7 +1721,7 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1681
1721
|
]
|
|
1682
1722
|
}
|
|
1683
1723
|
) }),
|
|
1684
|
-
|
|
1724
|
+
P && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-limit-exceeded", children: [
|
|
1685
1725
|
/* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-limit-exceeded-message", children: "Chat history limit reached. Please download your conversation as PDF and clear chat history to continue." }),
|
|
1686
1726
|
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-limit-action-buttons", children: [
|
|
1687
1727
|
/* @__PURE__ */ e.jsxs(
|
|
@@ -1689,8 +1729,8 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1689
1729
|
{
|
|
1690
1730
|
type: "button",
|
|
1691
1731
|
className: "sw-ttyw-limit-download-pdf",
|
|
1692
|
-
onClick:
|
|
1693
|
-
disabled:
|
|
1732
|
+
onClick: je,
|
|
1733
|
+
disabled: p,
|
|
1694
1734
|
children: [
|
|
1695
1735
|
/* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
|
|
1696
1736
|
/* @__PURE__ */ e.jsx("path", { d: "M21 15V19C21 19.5304 20.7893 20.0391 20.4142 20.4142C20.0391 20.7893 19.5304 21 19 21H5C4.46957 21 3.96086 20.7893 3.58579 20.4142C3.21071 20.0391 3 19.5304 3 19V15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1706,7 +1746,7 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1706
1746
|
{
|
|
1707
1747
|
type: "button",
|
|
1708
1748
|
className: "sw-ttyw-limit-clear-history",
|
|
1709
|
-
onClick: () =>
|
|
1749
|
+
onClick: () => g(!0),
|
|
1710
1750
|
children: [
|
|
1711
1751
|
/* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
|
|
1712
1752
|
/* @__PURE__ */ e.jsx("path", { d: "M3 6H5H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
@@ -1720,59 +1760,59 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1720
1760
|
)
|
|
1721
1761
|
] })
|
|
1722
1762
|
] }),
|
|
1723
|
-
|
|
1724
|
-
/* @__PURE__ */ e.jsx("div", { className: "message-avatar", style:
|
|
1725
|
-
/* @__PURE__ */ e.jsxs("div", { className: "message-content", style:
|
|
1763
|
+
p && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-message other message-loading", style: { ...y.message, ...y.messageOther, minHeight: "2.5rem" }, children: [
|
|
1764
|
+
/* @__PURE__ */ e.jsx("div", { className: "message-avatar", style: y.messageAvatar, children: /* @__PURE__ */ e.jsx(Ae, { width: 20, height: 20 }) }),
|
|
1765
|
+
/* @__PURE__ */ e.jsxs("div", { className: "message-content", style: y.messageContent, children: [
|
|
1726
1766
|
/* @__PURE__ */ e.jsx("div", { className: "typing typing-1" }),
|
|
1727
1767
|
/* @__PURE__ */ e.jsx("div", { className: "typing typing-2" }),
|
|
1728
1768
|
/* @__PURE__ */ e.jsx("div", { className: "typing typing-3" })
|
|
1729
1769
|
] })
|
|
1730
1770
|
] }),
|
|
1731
|
-
!
|
|
1771
|
+
!oe && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-jump-latest", children: /* @__PURE__ */ e.jsx(
|
|
1732
1772
|
"button",
|
|
1733
1773
|
{
|
|
1734
1774
|
type: "button",
|
|
1735
1775
|
className: "sw-ttyw-jump-button",
|
|
1736
1776
|
onClick: () => {
|
|
1737
|
-
|
|
1777
|
+
D("smooth"), K(!0);
|
|
1738
1778
|
},
|
|
1739
1779
|
children: "Jump to latest"
|
|
1740
1780
|
}
|
|
1741
1781
|
) }),
|
|
1742
|
-
/* @__PURE__ */ e.jsx("div", { ref:
|
|
1782
|
+
/* @__PURE__ */ e.jsx("div", { ref: j })
|
|
1743
1783
|
]
|
|
1744
1784
|
}
|
|
1745
1785
|
),
|
|
1746
|
-
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-section", style:
|
|
1786
|
+
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-section", style: y.inputSection, children: [
|
|
1747
1787
|
/* @__PURE__ */ e.jsx(
|
|
1748
1788
|
"textarea",
|
|
1749
1789
|
{
|
|
1750
1790
|
className: "sw-ttyw-input",
|
|
1751
|
-
placeholder:
|
|
1752
|
-
value:
|
|
1753
|
-
onChange: (
|
|
1754
|
-
|
|
1791
|
+
placeholder: P ? "Chat limit reached." : "Please ask question here",
|
|
1792
|
+
value: m,
|
|
1793
|
+
onChange: (s) => {
|
|
1794
|
+
L(s.target.value), U && O("");
|
|
1755
1795
|
},
|
|
1756
1796
|
maxLength: 1e3,
|
|
1757
|
-
disabled:
|
|
1758
|
-
style:
|
|
1759
|
-
onKeyDown: (
|
|
1797
|
+
disabled: p || P,
|
|
1798
|
+
style: y.textarea,
|
|
1799
|
+
onKeyDown: (s) => s.key === "Enter" && !s.shiftKey && (s.preventDefault(), Ee())
|
|
1760
1800
|
}
|
|
1761
1801
|
),
|
|
1762
|
-
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-content", style:
|
|
1763
|
-
/* @__PURE__ */ e.jsxs("small", { id: "sw-ttyw-chat-textbox-status", style:
|
|
1764
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
1802
|
+
/* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-content", style: y.inputFooter, children: [
|
|
1803
|
+
/* @__PURE__ */ e.jsxs("small", { id: "sw-ttyw-chat-textbox-status", style: y.characterCount, children: [
|
|
1804
|
+
/* @__PURE__ */ e.jsx("span", { children: m.length }),
|
|
1765
1805
|
"/1000"
|
|
1766
1806
|
] }),
|
|
1767
1807
|
/* @__PURE__ */ e.jsx(
|
|
1768
1808
|
"button",
|
|
1769
1809
|
{
|
|
1770
1810
|
id: "sw-ttyw-chat-send-message",
|
|
1771
|
-
onClick:
|
|
1811
|
+
onClick: Ee,
|
|
1772
1812
|
"aria-label": "Send message",
|
|
1773
|
-
disabled:
|
|
1774
|
-
style:
|
|
1775
|
-
children: /* @__PURE__ */ e.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "
|
|
1813
|
+
disabled: p || P,
|
|
1814
|
+
style: { ...y.sendButton, color: E },
|
|
1815
|
+
children: /* @__PURE__ */ e.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 0 24 24", width: "24px", fill: "currentColor", className: "cwv replaced-svg", children: [
|
|
1776
1816
|
/* @__PURE__ */ e.jsx("path", { d: "M0 0h24v24H0z", fill: "none" }),
|
|
1777
1817
|
/* @__PURE__ */ e.jsx("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })
|
|
1778
1818
|
] })
|
|
@@ -1781,18 +1821,18 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1781
1821
|
] })
|
|
1782
1822
|
] })
|
|
1783
1823
|
] }),
|
|
1784
|
-
|
|
1824
|
+
w && /* @__PURE__ */ e.jsxs("div", { className: "swttyw-modal swttyw-modal-clear-history", style: y.modalOverlay, children: [
|
|
1785
1825
|
/* @__PURE__ */ e.jsx("div", { className: "swtty-modal-header" }),
|
|
1786
|
-
/* @__PURE__ */ e.jsxs("div", { className: "swtty-modal-body", style:
|
|
1826
|
+
/* @__PURE__ */ e.jsxs("div", { className: "swtty-modal-body", style: y.modalBody, children: [
|
|
1787
1827
|
/* @__PURE__ */ e.jsx("div", { className: "swtty-content", children: "Are you sure you want to delete the chat history?" }),
|
|
1788
|
-
/* @__PURE__ */ e.jsxs("div", { className: "swtty-action", style:
|
|
1828
|
+
/* @__PURE__ */ e.jsxs("div", { className: "swtty-action", style: y.modalActions, children: [
|
|
1789
1829
|
/* @__PURE__ */ e.jsx(
|
|
1790
1830
|
"input",
|
|
1791
1831
|
{
|
|
1792
1832
|
type: "button",
|
|
1793
1833
|
className: "swttyw-btn swttyw-btn-primary",
|
|
1794
1834
|
id: "swttyw-btn-clear-history-yes",
|
|
1795
|
-
onClick:
|
|
1835
|
+
onClick: ze,
|
|
1796
1836
|
value: "Yes",
|
|
1797
1837
|
style: {
|
|
1798
1838
|
background: "var(--swttyw-primary-color)",
|
|
@@ -1811,7 +1851,7 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1811
1851
|
type: "button",
|
|
1812
1852
|
className: "swttyw-btn swttyw-btn-primary-inverse",
|
|
1813
1853
|
id: "swttyw-btn-clear-history-no",
|
|
1814
|
-
onClick: () =>
|
|
1854
|
+
onClick: () => g(!1),
|
|
1815
1855
|
value: "No",
|
|
1816
1856
|
style: {
|
|
1817
1857
|
background: "transparent",
|
|
@@ -1828,14 +1868,14 @@ function lt({ title: t = "", agentId: n = "", discoveryAgentId: a = "", primaryC
|
|
|
1828
1868
|
] }),
|
|
1829
1869
|
/* @__PURE__ */ e.jsx("div", { className: "swtty-modal-footer" })
|
|
1830
1870
|
] }),
|
|
1831
|
-
!
|
|
1871
|
+
!x && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-footer", style: y.footer, children: [
|
|
1832
1872
|
"Powered by ",
|
|
1833
|
-
/* @__PURE__ */ e.jsx("a", { href: "https://superwise.ai/", className: "ml-1", target: "_new", rel: "noopener noreferrer", style: { marginLeft: "0.25rem", lineHeight: 0 }, "aria-label": "SUPERWISE®", children: /* @__PURE__ */ e.jsx(
|
|
1873
|
+
/* @__PURE__ */ e.jsx("a", { href: "https://superwise.ai/", className: "ml-1", target: "_new", rel: "noopener noreferrer", style: { marginLeft: "0.25rem", lineHeight: 0 }, "aria-label": "SUPERWISE®", children: /* @__PURE__ */ e.jsx(et, { height: 20 }) })
|
|
1834
1874
|
] })
|
|
1835
1875
|
]
|
|
1836
1876
|
}
|
|
1837
1877
|
) });
|
|
1838
1878
|
}
|
|
1839
1879
|
export {
|
|
1840
|
-
|
|
1880
|
+
pt as Chatbot
|
|
1841
1881
|
};
|