@superwise.ai/superwise-chatbot-package 1.0.11 → 1.0.12

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.
@@ -1,4 +1,4 @@
1
- import Ze, { memo as Ie, useState as j, useRef as $, useEffect as M, useMemo as fe, useCallback as G } from "react";
1
+ import qe, { memo as Ie, useState as L, useRef as $, useEffect as M, useMemo as fe, useCallback as G } from "react";
2
2
  var ye = { exports: {} }, ne = {};
3
3
  /**
4
4
  * @license React
@@ -10,28 +10,28 @@ var ye = { exports: {} }, ne = {};
10
10
  * LICENSE file in the root directory of this source tree.
11
11
  */
12
12
  var _e;
13
- function Be() {
13
+ function ze() {
14
14
  if (_e) return ne;
15
15
  _e = 1;
16
- var t = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
17
- function a(i, n, f) {
18
- var w = null;
19
- if (f !== void 0 && (w = "" + f), n.key !== void 0 && (w = "" + n.key), "key" in n) {
20
- f = {};
21
- for (var p in n)
22
- p !== "key" && (f[p] = n[p]);
23
- } else f = n;
24
- return n = f.ref, {
25
- $$typeof: t,
16
+ var e = Symbol.for("react.transitional.element"), r = Symbol.for("react.fragment");
17
+ function a(i, s, d) {
18
+ var g = null;
19
+ if (d !== void 0 && (g = "" + d), s.key !== void 0 && (g = "" + s.key), "key" in s) {
20
+ d = {};
21
+ for (var m in s)
22
+ m !== "key" && (d[m] = s[m]);
23
+ } else d = s;
24
+ return s = d.ref, {
25
+ $$typeof: e,
26
26
  type: i,
27
- key: w,
28
- ref: n !== void 0 ? n : null,
29
- props: f
27
+ key: g,
28
+ ref: s !== void 0 ? s : null,
29
+ props: d
30
30
  };
31
31
  }
32
32
  return ne.Fragment = r, ne.jsx = a, ne.jsxs = a, ne;
33
33
  }
34
- var oe = {};
34
+ var se = {};
35
35
  /**
36
36
  * @license React
37
37
  * react-jsx-runtime.development.js
@@ -42,15 +42,15 @@ var oe = {};
42
42
  * LICENSE file in the root directory of this source tree.
43
43
  */
44
44
  var Re;
45
- function qe() {
45
+ function Ge() {
46
46
  return Re || (Re = 1, process.env.NODE_ENV !== "production" && function() {
47
- function t(s) {
48
- if (s == null) return null;
49
- if (typeof s == "function")
50
- return s.$$typeof === ue ? null : s.displayName || s.name || null;
51
- if (typeof s == "string") return s;
52
- switch (s) {
53
- case L:
47
+ function e(n) {
48
+ if (n == null) return null;
49
+ if (typeof n == "function")
50
+ return n.$$typeof === de ? null : n.displayName || n.name || null;
51
+ if (typeof n == "string") return n;
52
+ switch (n) {
53
+ case _:
54
54
  return "Fragment";
55
55
  case S:
56
56
  return "Profiler";
@@ -58,556 +58,588 @@ function qe() {
58
58
  return "StrictMode";
59
59
  case le:
60
60
  return "Suspense";
61
- case V:
61
+ case T:
62
62
  return "SuspenseList";
63
- case de:
63
+ case ue:
64
64
  return "Activity";
65
65
  }
66
- if (typeof s == "object")
67
- switch (typeof s.tag == "number" && console.error(
66
+ if (typeof n == "object")
67
+ switch (typeof n.tag == "number" && console.error(
68
68
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
69
- ), s.$$typeof) {
70
- case C:
69
+ ), n.$$typeof) {
70
+ case y:
71
71
  return "Portal";
72
- case te:
73
- return s.displayName || "Context";
74
- case Y:
75
- return (s._context.displayName || "Context") + ".Consumer";
72
+ case ee:
73
+ return n.displayName || "Context";
74
+ case ae:
75
+ return (n._context.displayName || "Context") + ".Consumer";
76
76
  case ie:
77
- var u = s.render;
78
- return s = s.displayName, s || (s = u.displayName || u.name || "", s = s !== "" ? "ForwardRef(" + s + ")" : "ForwardRef"), s;
77
+ var h = n.render;
78
+ return n = n.displayName, n || (n = h.displayName || h.name || "", n = n !== "" ? "ForwardRef(" + n + ")" : "ForwardRef"), n;
79
79
  case ce:
80
- return u = s.displayName || null, u !== null ? u : t(s.type) || "Memo";
81
- case J:
82
- u = s._payload, s = s._init;
80
+ return h = n.displayName || null, h !== null ? h : e(n.type) || "Memo";
81
+ case Y:
82
+ h = n._payload, n = n._init;
83
83
  try {
84
- return t(s(u));
84
+ return e(n(h));
85
85
  } catch {
86
86
  }
87
87
  }
88
88
  return null;
89
89
  }
90
- function r(s) {
91
- return "" + s;
90
+ function r(n) {
91
+ return "" + n;
92
92
  }
93
- function a(s) {
93
+ function a(n) {
94
94
  try {
95
- r(s);
96
- var u = !1;
95
+ r(n);
96
+ var h = !1;
97
97
  } catch {
98
- u = !0;
98
+ h = !0;
99
99
  }
100
- if (u) {
101
- u = console;
102
- var b = u.error, v = typeof Symbol == "function" && Symbol.toStringTag && s[Symbol.toStringTag] || s.constructor.name || "Object";
100
+ if (h) {
101
+ h = console;
102
+ var b = h.error, E = typeof Symbol == "function" && Symbol.toStringTag && n[Symbol.toStringTag] || n.constructor.name || "Object";
103
103
  return b.call(
104
- u,
104
+ h,
105
105
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
106
- v
107
- ), r(s);
106
+ E
107
+ ), r(n);
108
108
  }
109
109
  }
110
- function i(s) {
111
- if (s === L) return "<>";
112
- if (typeof s == "object" && s !== null && s.$$typeof === J)
110
+ function i(n) {
111
+ if (n === _) return "<>";
112
+ if (typeof n == "object" && n !== null && n.$$typeof === Y)
113
113
  return "<...>";
114
114
  try {
115
- var u = t(s);
116
- return u ? "<" + u + ">" : "<...>";
115
+ var h = e(n);
116
+ return h ? "<" + h + ">" : "<...>";
117
117
  } catch {
118
118
  return "<...>";
119
119
  }
120
120
  }
121
- function n() {
122
- var s = X.A;
123
- return s === null ? null : s.getOwner();
121
+ function s() {
122
+ var n = J.A;
123
+ return n === null ? null : n.getOwner();
124
124
  }
125
- function f() {
125
+ function d() {
126
126
  return Error("react-stack-top-frame");
127
127
  }
128
- function w(s) {
129
- if (I.call(s, "key")) {
130
- var u = Object.getOwnPropertyDescriptor(s, "key").get;
131
- if (u && u.isReactWarning) return !1;
128
+ function g(n) {
129
+ if (I.call(n, "key")) {
130
+ var h = Object.getOwnPropertyDescriptor(n, "key").get;
131
+ if (h && h.isReactWarning) return !1;
132
132
  }
133
- return s.key !== void 0;
133
+ return n.key !== void 0;
134
134
  }
135
- function p(s, u) {
135
+ function m(n, h) {
136
136
  function b() {
137
137
  me || (me = !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
- u
139
+ h
140
140
  ));
141
141
  }
142
- b.isReactWarning = !0, Object.defineProperty(s, "key", {
142
+ b.isReactWarning = !0, Object.defineProperty(n, "key", {
143
143
  get: b,
144
144
  configurable: !0
145
145
  });
146
146
  }
147
- function c() {
148
- var s = t(this.type);
149
- return re[s] || (re[s] = !0, console.error(
147
+ function u() {
148
+ var n = e(this.type);
149
+ return te[n] || (te[n] = !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
- )), s = this.props.ref, s !== void 0 ? s : null;
151
+ )), n = this.props.ref, n !== void 0 ? n : null;
152
152
  }
153
- function g(s, u, b, v, q, Q) {
153
+ function C(n, h, b, E, q, K) {
154
154
  var k = b.ref;
155
- return s = {
156
- $$typeof: d,
157
- type: s,
158
- key: u,
155
+ return n = {
156
+ $$typeof: f,
157
+ type: n,
158
+ key: h,
159
159
  props: b,
160
- _owner: v
161
- }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(s, "ref", {
160
+ _owner: E
161
+ }, (k !== void 0 ? k : null) !== null ? Object.defineProperty(n, "ref", {
162
162
  enumerable: !1,
163
- get: c
164
- }) : Object.defineProperty(s, "ref", { enumerable: !1, value: null }), s._store = {}, Object.defineProperty(s._store, "validated", {
163
+ get: u
164
+ }) : Object.defineProperty(n, "ref", { enumerable: !1, value: null }), n._store = {}, Object.defineProperty(n._store, "validated", {
165
165
  configurable: !1,
166
166
  enumerable: !1,
167
167
  writable: !0,
168
168
  value: 0
169
- }), Object.defineProperty(s, "_debugInfo", {
169
+ }), Object.defineProperty(n, "_debugInfo", {
170
170
  configurable: !1,
171
171
  enumerable: !1,
172
172
  writable: !0,
173
173
  value: null
174
- }), Object.defineProperty(s, "_debugStack", {
174
+ }), Object.defineProperty(n, "_debugStack", {
175
175
  configurable: !1,
176
176
  enumerable: !1,
177
177
  writable: !0,
178
178
  value: q
179
- }), Object.defineProperty(s, "_debugTask", {
179
+ }), Object.defineProperty(n, "_debugTask", {
180
180
  configurable: !1,
181
181
  enumerable: !1,
182
182
  writable: !0,
183
- value: Q
184
- }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
183
+ value: K
184
+ }), Object.freeze && (Object.freeze(n.props), Object.freeze(n)), n;
185
185
  }
186
- function l(s, u, b, v, q, Q) {
187
- var k = u.children;
186
+ function l(n, h, b, E, q, K) {
187
+ var k = h.children;
188
188
  if (k !== void 0)
189
- if (v)
190
- if (T(k)) {
191
- for (v = 0; v < k.length; v++)
192
- H(k[v]);
189
+ if (E)
190
+ if (V(k)) {
191
+ for (E = 0; E < k.length; E++)
192
+ j(k[E]);
193
193
  Object.freeze && Object.freeze(k);
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 H(k);
199
- if (I.call(u, "key")) {
200
- k = t(s);
201
- var O = Object.keys(u).filter(function(D) {
198
+ else j(k);
199
+ if (I.call(h, "key")) {
200
+ k = e(n);
201
+ var O = Object.keys(h).filter(function(D) {
202
202
  return D !== "key";
203
203
  });
204
- v = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", se[k + v] || (O = 0 < O.length ? "{" + O.join(": ..., ") + ": ...}" : "{}", console.error(
204
+ E = 0 < O.length ? "{key: someKey, " + O.join(": ..., ") + ": ...}" : "{key: someKey}", re[k + E] || (O = 0 < O.length ? "{" + O.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} />
208
208
  React keys must be passed directly to JSX without using spread:
209
209
  let props = %s;
210
210
  <%s key={someKey} {...props} />`,
211
- v,
211
+ E,
212
212
  k,
213
213
  O,
214
214
  k
215
- ), se[k + v] = !0);
215
+ ), re[k + E] = !0);
216
216
  }
217
- if (k = null, b !== void 0 && (a(b), k = "" + b), w(u) && (a(u.key), k = "" + u.key), "key" in u) {
217
+ if (k = null, b !== void 0 && (a(b), k = "" + b), g(h) && (a(h.key), k = "" + h.key), "key" in h) {
218
218
  b = {};
219
- for (var U in u)
220
- U !== "key" && (b[U] = u[U]);
221
- } else b = u;
222
- return k && p(
219
+ for (var U in h)
220
+ U !== "key" && (b[U] = h[U]);
221
+ } else b = h;
222
+ return k && m(
223
223
  b,
224
- typeof s == "function" ? s.displayName || s.name || "Unknown" : s
225
- ), g(
226
- s,
224
+ typeof n == "function" ? n.displayName || n.name || "Unknown" : n
225
+ ), C(
226
+ n,
227
227
  k,
228
228
  b,
229
- n(),
229
+ s(),
230
230
  q,
231
- Q
231
+ K
232
232
  );
233
233
  }
234
- function H(s) {
235
- h(s) ? s._store && (s._store.validated = 1) : typeof s == "object" && s !== null && s.$$typeof === J && (s._payload.status === "fulfilled" ? h(s._payload.value) && s._payload.value._store && (s._payload.value._store.validated = 1) : s._store && (s._store.validated = 1));
234
+ function j(n) {
235
+ p(n) ? n._store && (n._store.validated = 1) : typeof n == "object" && n !== null && n.$$typeof === Y && (n._payload.status === "fulfilled" ? p(n._payload.value) && n._payload.value._store && (n._payload.value._store.validated = 1) : n._store && (n._store.validated = 1));
236
236
  }
237
- function h(s) {
238
- return typeof s == "object" && s !== null && s.$$typeof === d;
237
+ function p(n) {
238
+ return typeof n == "object" && n !== null && n.$$typeof === f;
239
239
  }
240
- var m = Ze, d = Symbol.for("react.transitional.element"), C = Symbol.for("react.portal"), L = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), Y = Symbol.for("react.consumer"), te = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), le = Symbol.for("react.suspense"), V = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), J = Symbol.for("react.lazy"), de = Symbol.for("react.activity"), ue = Symbol.for("react.client.reference"), X = m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, I = Object.prototype.hasOwnProperty, T = Array.isArray, K = console.createTask ? console.createTask : function() {
240
+ var c = qe, f = Symbol.for("react.transitional.element"), y = Symbol.for("react.portal"), _ = Symbol.for("react.fragment"), R = Symbol.for("react.strict_mode"), S = Symbol.for("react.profiler"), ae = Symbol.for("react.consumer"), ee = Symbol.for("react.context"), ie = Symbol.for("react.forward_ref"), le = Symbol.for("react.suspense"), T = Symbol.for("react.suspense_list"), ce = Symbol.for("react.memo"), Y = Symbol.for("react.lazy"), ue = Symbol.for("react.activity"), de = Symbol.for("react.client.reference"), J = c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, I = Object.prototype.hasOwnProperty, V = Array.isArray, X = console.createTask ? console.createTask : function() {
241
241
  return null;
242
242
  };
243
- m = {
244
- react_stack_bottom_frame: function(s) {
245
- return s();
243
+ c = {
244
+ react_stack_bottom_frame: function(n) {
245
+ return n();
246
246
  }
247
247
  };
248
- var me, re = {}, B = m.react_stack_bottom_frame.bind(
249
- m,
250
- f
251
- )(), N = K(i(f)), se = {};
252
- oe.Fragment = L, oe.jsx = function(s, u, b) {
253
- var v = 1e4 > X.recentlyCreatedOwnerStacks++;
248
+ var me, te = {}, B = c.react_stack_bottom_frame.bind(
249
+ c,
250
+ d
251
+ )(), N = X(i(d)), re = {};
252
+ se.Fragment = _, se.jsx = function(n, h, b) {
253
+ var E = 1e4 > J.recentlyCreatedOwnerStacks++;
254
254
  return l(
255
- s,
256
- u,
255
+ n,
256
+ h,
257
257
  b,
258
258
  !1,
259
- v ? Error("react-stack-top-frame") : B,
260
- v ? K(i(s)) : N
259
+ E ? Error("react-stack-top-frame") : B,
260
+ E ? X(i(n)) : N
261
261
  );
262
- }, oe.jsxs = function(s, u, b) {
263
- var v = 1e4 > X.recentlyCreatedOwnerStacks++;
262
+ }, se.jsxs = function(n, h, b) {
263
+ var E = 1e4 > J.recentlyCreatedOwnerStacks++;
264
264
  return l(
265
- s,
266
- u,
265
+ n,
266
+ h,
267
267
  b,
268
268
  !0,
269
- v ? Error("react-stack-top-frame") : B,
270
- v ? K(i(s)) : N
269
+ E ? Error("react-stack-top-frame") : B,
270
+ E ? X(i(n)) : N
271
271
  );
272
272
  };
273
- }()), oe;
273
+ }()), se;
274
274
  }
275
- process.env.NODE_ENV === "production" ? ye.exports = Be() : ye.exports = qe();
276
- var e = ye.exports;
277
- const ze = [
275
+ process.env.NODE_ENV === "production" ? ye.exports = ze() : ye.exports = Ge();
276
+ var t = ye.exports;
277
+ const Ye = [
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
- ], ae = "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 Ge(t) {
285
- if (typeof t != "string" || t.length === 0) return t;
286
- let r = t;
287
- for (const a of ze)
283
+ ], oe = "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.", Je = "https://sage-api-ttyw-stage.superwise.ai/api/v1/", Xe = "hi";
284
+ function Pe(e = "") {
285
+ return typeof e == "string" && e.trim().length > 0 ? e.trim() : Je;
286
+ }
287
+ function $e(e = "") {
288
+ const r = Pe(e);
289
+ return r.replace(/\/+$/, "").endsWith("/chat") ? r : r.replace(/\/+$/, "") + "/chat";
290
+ }
291
+ function Ke(e) {
292
+ if (typeof e != "string" || e.length === 0) return e;
293
+ let r = e;
294
+ for (const a of Ye)
288
295
  for (; ; ) {
289
296
  const i = r.indexOf(a);
290
297
  if (i === -1) break;
291
- const n = r.indexOf("{", i);
292
- if (n === -1) break;
293
- let f = 0, w = -1;
294
- for (let g = n; g < r.length; g++) {
295
- const l = r[g];
298
+ const s = r.indexOf("{", i);
299
+ if (s === -1) break;
300
+ let d = 0, g = -1;
301
+ for (let C = s; C < r.length; C++) {
302
+ const l = r[C];
296
303
  if (l === "{")
297
- f++;
298
- else if (l === "}" && (f--, f === 0)) {
299
- w = g;
304
+ d++;
305
+ else if (l === "}" && (d--, d === 0)) {
306
+ g = C;
300
307
  break;
301
308
  }
302
309
  }
303
- if (w === -1) break;
304
- const p = r.slice(0, i).trim(), c = r.slice(w + 1).trim();
305
- r = p + (c.length > 0 ? " " + c : "");
310
+ if (g === -1) break;
311
+ const m = r.slice(0, i).trim(), u = r.slice(g + 1).trim();
312
+ r = m + (u.length > 0 ? " " + u : "");
306
313
  }
307
314
  return r.includes("Parameters:") && (r = r.split("Parameters:")[0].trim()), r;
308
315
  }
309
- function Ye(t) {
310
- if (typeof t != "string" || t.length === 0) return t;
311
- const r = t.trim();
312
- return r.startsWith("Message: ") ? r.slice(9).trim() : r.startsWith("Message : ") ? r.slice(11).trim() : t;
316
+ function Qe(e) {
317
+ if (typeof e != "string" || e.length === 0) return e;
318
+ const r = e.trim();
319
+ return r.startsWith("Message: ") ? r.slice(9).trim() : r.startsWith("Message : ") ? r.slice(11).trim() : e;
320
+ }
321
+ async function e2(e = "", r = "", a = "") {
322
+ const i = $e(a), s = {
323
+ user_input: Xe,
324
+ chat_history: [],
325
+ mql_df: [],
326
+ agent_id: e,
327
+ discovery_agent_id: r,
328
+ utm_source: "Web",
329
+ utm_medium: "chatbot",
330
+ metadata: { warmup: !0 }
331
+ };
332
+ try {
333
+ const d = await fetch(i, {
334
+ method: "POST",
335
+ headers: {
336
+ "Content-Type": "application/json",
337
+ Accept: "application/json"
338
+ },
339
+ body: JSON.stringify(s)
340
+ });
341
+ return d.ok ? !0 : (console.warn("Warmup request returned non-OK status:", d.status), !1);
342
+ } catch (d) {
343
+ return console.warn("Warmup request failed:", d), !1;
344
+ }
313
345
  }
314
- async function Je(t, r = [], a = [], i = "", n = "", f = "", w = null) {
315
- var H, h, m;
316
- const p = typeof f == "string" && f.trim().length > 0 ? f.trim() : "https://sage-api-ttyw-stage.superwise.ai/api/v1/", c = p.replace(/\/+$/, "").endsWith("/chat") ? p : p.replace(/\/+$/, "") + "/chat", g = Array.isArray(r) ? r.map((d) => ({
317
- role: d.role,
318
- message: d.content != null ? d.content : ""
319
- })) : [], l = {
320
- user_input: t,
321
- chat_history: g,
346
+ async function t2(e, r = [], a = [], i = "", s = "", d = "", g = null) {
347
+ var l, j, p;
348
+ const m = $e(d), u = Array.isArray(r) ? r.map((c) => ({
349
+ role: c.role,
350
+ message: c.content != null ? c.content : ""
351
+ })) : [], C = {
352
+ user_input: e,
353
+ chat_history: u,
322
354
  mql_df: Array.isArray(a) ? a : [],
323
355
  agent_id: i,
324
- discovery_agent_id: n,
356
+ discovery_agent_id: s,
325
357
  utm_source: "Web",
326
358
  utm_medium: "chatbot"
327
359
  };
328
- console.log("Sending payload:", l);
360
+ console.log("Sending payload:", C);
329
361
  try {
330
- const d = await fetch(c, {
362
+ const c = await fetch(m, {
331
363
  method: "POST",
332
364
  headers: {
333
365
  "Content-Type": "application/json",
334
366
  Accept: "application/json"
335
367
  },
336
- body: JSON.stringify(l),
337
- signal: w ?? void 0
368
+ body: JSON.stringify(C),
369
+ signal: g ?? void 0
338
370
  });
339
- if (console.log("Response status:", d.status), console.log("Response headers:", d.headers), !d.ok) {
340
- const Y = await d.text();
341
- return console.error("API Error Response:", Y), { reply: ae, mqlDf: [], isError: !0, status: d.status };
371
+ if (console.log("Response status:", c.status), console.log("Response headers:", c.headers), !c.ok) {
372
+ const S = await c.text();
373
+ return console.error("API Error Response:", S), { reply: oe, mqlDf: [], isError: !0, status: c.status };
342
374
  }
343
- const C = await d.json();
344
- console.log("API Response Data:", C);
345
- let L = "⚠️ No reply from server.", R = [], S = !1;
346
- return C.chat_response ? L = C.chat_response : C.success && ((H = C.data) != null && H.chat_response) ? L = C.data.chat_response : C.message && (L = C.message), C.mql_df ? R = C.mql_df : (h = C.data) != null && h.mql_df && (R = C.data.mql_df), (C.chat_history_limit_exceeded === !0 || ((m = C.data) == null ? void 0 : m.chat_history_limit_exceeded) === !0) && (S = !0), L = Ge(L), L = Ye(L), { reply: L, mqlDf: R, chatHistoryLimitExceeded: S };
347
- } catch (d) {
348
- if (console.error("API call failed:", d), d.name === "AbortError")
349
- throw d;
350
- return d.name === "TypeError" && d.message.includes("fetch") ? { reply: ae, mqlDf: [], isError: !0 } : { reply: ae, mqlDf: [], isError: !0 };
375
+ const f = await c.json();
376
+ console.log("API Response Data:", f);
377
+ let y = "⚠️ No reply from server.", _ = [], R = !1;
378
+ return f.chat_response ? y = f.chat_response : f.success && ((l = f.data) != null && l.chat_response) ? y = f.data.chat_response : f.message && (y = f.message), f.mql_df ? _ = f.mql_df : (j = f.data) != null && j.mql_df && (_ = f.data.mql_df), (f.chat_history_limit_exceeded === !0 || ((p = f.data) == null ? void 0 : p.chat_history_limit_exceeded) === !0) && (R = !0), y = Ke(y), y = Qe(y), { reply: y, mqlDf: _, chatHistoryLimitExceeded: R };
379
+ } catch (c) {
380
+ if (console.error("API call failed:", c), c.name === "AbortError")
381
+ throw c;
382
+ return c.name === "TypeError" && c.message.includes("fetch") ? { reply: oe, mqlDf: [], isError: !0 } : { reply: oe, mqlDf: [], isError: !0 };
351
383
  }
352
384
  }
353
- async function Xe(t, r = null, a = [], i = "") {
354
- const w = (typeof i == "string" && i.trim().length > 0 ? i.trim() : "https://sage-api-ttyw-stage.superwise.ai/api/v1/").replace(/\/+$/, "").replace(/\/chat\/?$/, "").replace(/\/+$/, "") + "/pdf", p = Array.isArray(t) && t.length > 0 ? t[0] : r || {
385
+ async function r2(e, r = null, a = [], i = "") {
386
+ const g = Pe(i).replace(/\/+$/, "").replace(/\/chat\/?$/, "").replace(/\/+$/, "") + "/pdf", m = Array.isArray(e) && e.length > 0 ? e[0] : r || {
355
387
  name: "User",
356
388
  email: "user@example.com",
357
389
  summary: "Chat conversation summary"
358
- }, c = Array.isArray(a) ? a.map((l) => ({
390
+ }, u = Array.isArray(a) ? a.map((l) => ({
359
391
  role: l.role,
360
392
  message: l.content != null ? l.content : ""
361
- })) : [], g = {
362
- lead_row: p,
363
- chat_history: c
393
+ })) : [], C = {
394
+ lead_row: m,
395
+ chat_history: u
364
396
  };
365
- console.log("Downloading PDF with payload:", g);
397
+ console.log("Downloading PDF with payload:", C);
366
398
  try {
367
- const l = await fetch(w, {
399
+ const l = await fetch(g, {
368
400
  method: "POST",
369
401
  headers: {
370
402
  "Content-Type": "application/json",
371
403
  Accept: "application/pdf"
372
404
  },
373
- body: JSON.stringify(g)
405
+ body: JSON.stringify(C)
374
406
  });
375
407
  if (console.log("PDF Response status:", l.status), !l.ok) {
376
- const d = await l.text();
377
- throw console.error("PDF API Error Response:", d), new Error(`PDF API Error ${l.status}: ${d}`);
408
+ const f = await l.text();
409
+ throw console.error("PDF API Error Response:", f), new Error(`PDF API Error ${l.status}: ${f}`);
378
410
  }
379
- const H = await l.blob(), h = window.URL.createObjectURL(H), m = document.createElement("a");
380
- return m.href = h, m.download = `chatbot-report-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.pdf`, document.body.appendChild(m), m.click(), document.body.removeChild(m), window.URL.revokeObjectURL(h), !0;
411
+ const j = await l.blob(), p = window.URL.createObjectURL(j), c = document.createElement("a");
412
+ return c.href = p, c.download = `chatbot-report-${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.pdf`, document.body.appendChild(c), c.click(), document.body.removeChild(c), window.URL.revokeObjectURL(p), !0;
381
413
  } catch (l) {
382
414
  throw console.error("PDF download failed:", l), l;
383
415
  }
384
416
  }
385
- const 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", Me = "superwise-chatbot-package-css", Qe = "chatbot-plugin.css";
386
- function e2() {
417
+ const n2 = "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", Me = "superwise-chatbot-package-css", s2 = "chatbot-plugin.css";
418
+ function o2() {
387
419
  if (typeof document > "u") return "";
388
- const t = document.querySelector('script[src*="chatbot-plugin"]');
389
- if (!(t != null && t.src)) return "";
420
+ const e = document.querySelector('script[src*="chatbot-plugin"]');
421
+ if (!(e != null && e.src)) return "";
390
422
  try {
391
- const r = new URL(t.src), a = r.pathname.replace(/\/[^/]*$/, "/");
392
- return r.pathname = a + Qe, r.search = "", r.hash = "", r.toString();
423
+ const r = new URL(e.src), a = r.pathname.replace(/\/[^/]*$/, "/");
424
+ return r.pathname = a + s2, r.search = "", r.hash = "", r.toString();
393
425
  } catch {
394
426
  return "";
395
427
  }
396
428
  }
397
- function t2() {
429
+ function a2() {
398
430
  if (typeof document > "u" || document.getElementById(Me)) return;
399
- const t = e2();
400
- if (!t) return;
431
+ const e = o2();
432
+ if (!e) return;
401
433
  const r = document.createElement("link");
402
- r.id = Me, r.rel = "stylesheet", r.href = t, document.head.appendChild(r);
434
+ r.id = Me, r.rel = "stylesheet", r.href = e, document.head.appendChild(r);
403
435
  }
404
- function xe(t) {
405
- if (!t || typeof t != "string") return "";
406
- const r = String(t).trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
436
+ function xe(e) {
437
+ if (!e || typeof e != "string") return "";
438
+ const r = String(e).trim().replace(/^['"]+|['"]+$/g, "").trim().toLowerCase();
407
439
  return /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(r) ? r.length === 4 ? "#" + r[1] + r[1] + r[2] + r[2] + r[3] + r[3] : r : "";
408
440
  }
409
- const r2 = [
441
+ const i2 = [
410
442
  { re: /^(#000000|#000)$/, class: "default" },
411
443
  { re: /^(#ff0000|#f00)$/i, class: "red-bright" },
412
444
  { re: /^#2563eb$/i, class: "blue" },
413
445
  { re: /^#dc2626$/i, class: "red" },
414
446
  { re: /^#16a34a$/i, class: "green" }
415
447
  ];
416
- function Pe(t) {
417
- const r = xe(t) || "#000";
418
- for (const { re: a, class: i } of r2)
448
+ function Te(e) {
449
+ const r = xe(e) || "#000";
450
+ for (const { re: a, class: i } of i2)
419
451
  if (a.test(r)) return i;
420
452
  return "default";
421
453
  }
422
- function s2(t) {
423
- return "sw-ttyw-primary-" + Pe(t);
454
+ function l2(e) {
455
+ return "sw-ttyw-primary-" + Te(e);
424
456
  }
425
- function n2(t, r) {
426
- const i = xe(t) || xe(r) || "#000";
427
- return "sw-ttyw-minimized-" + Pe(i);
457
+ function c2(e, r) {
458
+ const i = xe(e) || xe(r) || "#000";
459
+ return "sw-ttyw-minimized-" + Te(i);
428
460
  }
429
- let o2 = 0;
430
- function $e({ width: t = 20, height: r = 20 }) {
461
+ let u2 = 0;
462
+ function Ve({ width: e = 20, height: r = 20 }) {
431
463
  const a = $(null);
432
- a.current || (a.current = `clip0_avatar_${++o2}`);
464
+ a.current || (a.current = `clip0_avatar_${++u2}`);
433
465
  const i = a.current;
434
- return /* @__PURE__ */ e.jsxs("svg", { width: t, height: r, viewBox: "0 0 155 174", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
435
- /* @__PURE__ */ e.jsxs("g", { clipPath: `url(#${i})`, children: [
436
- /* @__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" }),
437
- /* @__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" }),
438
- /* @__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" })
466
+ return /* @__PURE__ */ t.jsxs("svg", { width: e, height: r, viewBox: "0 0 155 174", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
467
+ /* @__PURE__ */ t.jsxs("g", { clipPath: `url(#${i})`, children: [
468
+ /* @__PURE__ */ t.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" }),
469
+ /* @__PURE__ */ t.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" }),
470
+ /* @__PURE__ */ t.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" })
439
471
  ] }),
440
- /* @__PURE__ */ e.jsx("defs", { children: /* @__PURE__ */ e.jsx("clipPath", { id: i, children: /* @__PURE__ */ e.jsx("rect", { width: "154.17", height: "173.268", fill: "white" }) }) })
472
+ /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("clipPath", { id: i, children: /* @__PURE__ */ t.jsx("rect", { width: "154.17", height: "173.268", fill: "white" }) }) })
441
473
  ] });
442
474
  }
443
- function a2({ width: t, height: r = 20 }) {
444
- const a = t ?? 4.6875 * r;
445
- return /* @__PURE__ */ e.jsxs("svg", { width: a, height: r, viewBox: "0 0 75 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
446
- /* @__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" }),
447
- /* @__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" }),
448
- /* @__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" }),
449
- /* @__PURE__ */ e.jsx("path", { d: "M18.3783 5.31638C18.4805 5.20553 18.6013 5.12239 18.7407 5.06696C18.8801 5.01153 19.0473 4.98382 19.2331 4.98382C19.419 4.98382 19.6698 5.02077 19.8557 5.10391C20.0415 5.18706 20.1902 5.30715 20.3109 5.45495C20.376 5.53809 20.441 5.63047 20.4875 5.74133C20.5432 5.85218 20.5804 5.96303 20.599 6.08313L21.9741 5.65819C21.8719 5.29791 21.7325 4.99306 21.556 4.7344C21.3795 4.47574 21.1657 4.25403 20.9149 4.07851C20.6919 3.92147 20.441 3.81061 20.153 3.73671C19.8742 3.6628 19.5676 3.62585 19.2517 3.62585C18.9358 3.62585 18.4712 3.68128 18.1461 3.80137C17.8301 3.92147 17.5514 4.09698 17.3284 4.32793C17.0961 4.54964 16.9289 4.81754 16.8174 5.13163C16.7059 5.44571 16.6501 5.80599 16.6501 6.20322C16.6501 6.60045 16.7152 7.01615 16.8545 7.321C16.9939 7.62585 17.1983 7.88451 17.4771 8.09699C17.7558 8.30946 18.1182 8.50345 18.5735 8.6605L19.3632 8.94687C19.6513 9.05772 19.8835 9.16858 20.0415 9.28867C20.1994 9.39953 20.3109 9.52886 20.376 9.66742C20.441 9.80599 20.4689 9.98151 20.4689 10.194C20.4689 10.4065 20.4503 10.5543 20.4039 10.6928C20.3667 10.8314 20.2924 10.9515 20.2087 11.0623C20.1158 11.1824 19.995 11.2656 19.8464 11.321C19.707 11.3764 19.5398 11.4041 19.3539 11.4041C19.1681 11.4041 18.9172 11.3672 18.7407 11.2841C18.5549 11.2009 18.4062 11.0808 18.2854 10.933C18.2111 10.8499 18.1461 10.7575 18.0996 10.6374C18.0438 10.5265 18.016 10.4065 17.9881 10.2864L16.5944 10.6744C16.6873 11.0346 16.8267 11.3487 17.0032 11.6259C17.189 11.903 17.4027 12.1247 17.6629 12.3095C17.8952 12.4573 18.1461 12.5681 18.4248 12.6513C18.7035 12.7344 19.0101 12.7714 19.3261 12.7714C19.642 12.7714 20.1158 12.7067 20.4317 12.5958C20.7569 12.4757 21.0357 12.3002 21.268 12.06C21.4817 11.8291 21.6489 11.552 21.7697 11.2286C21.8905 10.9053 21.9462 10.5358 21.9462 10.1108C21.9462 9.6859 21.8812 9.28867 21.7418 8.98382C21.6024 8.67897 21.398 8.42031 21.11 8.20784C20.822 7.99537 20.4503 7.80137 19.9765 7.62585L19.196 7.33948C18.9079 7.22862 18.685 7.11777 18.5363 7.00691C18.3783 6.88682 18.2761 6.76673 18.2204 6.62816C18.1646 6.4896 18.1368 6.33255 18.1368 6.14779C18.1368 5.96304 18.1553 5.80599 18.2018 5.66742C18.239 5.52885 18.304 5.418 18.3783 5.31638Z", fill: "white" }),
450
- /* @__PURE__ */ e.jsx("path", { d: "M26.7684 10.1478C26.7684 10.4249 26.7313 10.6651 26.657 10.8499C26.5826 11.0346 26.4618 11.1732 26.2853 11.2748C26.1088 11.3764 25.8765 11.4226 25.5884 11.4226C25.3004 11.4226 25.0588 11.3764 24.8823 11.2748C24.7058 11.1732 24.585 11.0346 24.5106 10.8499C24.4363 10.6651 24.3991 10.4342 24.3991 10.1478V3.72748H22.9404V10.1016C22.9404 10.6282 23.0333 11.0901 23.2191 11.4873C23.405 11.8845 23.693 12.1986 24.0832 12.4296C24.4735 12.6605 24.9845 12.7714 25.5977 12.7714C26.211 12.7714 26.7034 12.6605 27.1029 12.4296C27.5025 12.1986 27.7905 11.8845 27.967 11.4781C28.1436 11.0716 28.2365 10.6189 28.2365 10.1016V3.72748H26.7777V10.1478H26.7684Z", fill: "white" }),
451
- /* @__PURE__ */ e.jsx("path", { d: "M33.1888 4.04157C32.8171 3.8291 32.3433 3.72748 31.7765 3.72748H29.37V12.6513H30.8288V9.5381H31.7579C32.334 9.5381 32.8078 9.43648 33.1795 9.23325C33.5511 9.03002 33.8299 8.71593 34.0157 8.29099C34.2015 7.86605 34.2945 7.31177 34.2945 6.63741C34.2945 5.96304 34.2015 5.41801 34.0157 4.99307C33.8299 4.56813 33.5511 4.25404 33.1795 4.04157H33.1888ZM32.7056 7.57043C32.622 7.79214 32.5012 7.94919 32.3433 8.0508C32.1853 8.15242 31.9809 8.19861 31.7207 8.19861H30.8195V5.09469H31.7207C31.9809 5.09469 32.1853 5.14088 32.3433 5.24249C32.5012 5.34411 32.622 5.50115 32.7056 5.72286C32.7893 5.94457 32.8264 6.24942 32.8264 6.63741C32.8264 7.0254 32.7893 7.34873 32.7056 7.57043Z", fill: "white" }),
452
- /* @__PURE__ */ e.jsx("path", { d: "M35.1214 12.6605H39.5255V11.3025H36.5801V8.78981H39.0331V7.44108H36.5801V5.09466H39.5255V3.73669H35.1214V12.6605Z", fill: "white" }),
453
- /* @__PURE__ */ e.jsx("path", { d: "M44.3199 8.92842C44.6822 8.72519 44.9703 8.42034 45.1747 8.01387C45.3791 7.6074 45.4813 7.09932 45.4813 6.48962C45.4813 5.87992 45.3884 5.32565 45.2026 4.92842C45.0167 4.52195 44.738 4.22634 44.3849 4.03235C44.0226 3.83835 43.5766 3.74597 43.047 3.74597H40.4454V12.6698H41.9041V9.24251H42.9169L44.0411 12.6698H45.6207L44.3013 8.94689C44.3013 8.94689 44.3199 8.9469 44.3292 8.93766L44.3199 8.92842ZM41.8948 5.0947H42.9819C43.1956 5.0947 43.3722 5.13165 43.5301 5.21479C43.6788 5.29793 43.7996 5.4365 43.8832 5.63974C43.9668 5.83373 44.004 6.12011 44.004 6.48038C44.004 6.84066 43.9668 7.13627 43.8832 7.3395C43.7996 7.54274 43.6881 7.68131 43.5394 7.76445C43.3907 7.84759 43.2142 7.88454 43.0005 7.88454H41.9041V5.10394L41.8948 5.0947Z", fill: "white" }),
454
- /* @__PURE__ */ e.jsx("path", { d: "M52.4219 10.4988L51.1583 3.73669H49.7553L48.501 10.4619L47.2095 3.73669H45.6485L47.7019 12.6605H49.2164L50.4615 6.68358L51.6972 12.6605H53.2117L55.2558 3.73669H53.7134L52.4219 10.4988Z", fill: "white" }),
455
- /* @__PURE__ */ e.jsx("path", { d: "M57.3928 3.73669H55.9341V12.6605H57.3928V3.73669Z", fill: "white" }),
456
- /* @__PURE__ */ e.jsx("path", { d: "M60.1988 5.31638C60.301 5.20553 60.4218 5.12239 60.5612 5.06696C60.7006 5.01153 60.8678 4.98382 61.0536 4.98382C61.2395 4.98382 61.4903 5.02077 61.6762 5.10391C61.862 5.18706 62.0107 5.30715 62.1314 5.45495C62.1965 5.53809 62.2615 5.63047 62.308 5.74133C62.3637 5.85218 62.4009 5.96303 62.4195 6.08313L63.7946 5.65819C63.6924 5.29791 63.553 4.99306 63.3765 4.7344C63.1999 4.47574 62.9862 4.25403 62.7354 4.07851C62.5124 3.92147 62.2615 3.81061 61.9735 3.73671C61.6947 3.6628 61.3881 3.62585 61.0722 3.62585C60.7563 3.62585 60.2917 3.68128 59.9665 3.80137C59.6506 3.92147 59.3719 4.09698 59.1489 4.32793C58.9166 4.54964 58.7494 4.81754 58.6379 5.13163C58.5264 5.44571 58.4706 5.80599 58.4706 6.20322C58.4706 6.60045 58.5357 7.01615 58.675 7.321C58.8144 7.62585 59.0188 7.88451 59.2976 8.09699C59.5763 8.30946 59.9387 8.50345 60.394 8.6605L61.1837 8.94687C61.4718 9.05772 61.704 9.16858 61.862 9.28867C62.0199 9.39953 62.1314 9.52886 62.1965 9.66742C62.2615 9.80599 62.2894 9.98151 62.2894 10.194C62.2894 10.4065 62.2708 10.5543 62.2244 10.6928C62.1872 10.8314 62.1129 10.9515 62.0292 11.0623C61.9363 11.1824 61.8155 11.2656 61.6669 11.321C61.5275 11.3764 61.3603 11.4041 61.1744 11.4041C60.9886 11.4041 60.7377 11.3672 60.5612 11.2841C60.3754 11.2009 60.2267 11.0808 60.1059 10.933C60.0316 10.8499 59.9665 10.7575 59.9201 10.6374C59.8643 10.5265 59.8272 10.4065 59.8086 10.2864L58.4149 10.6744C58.5078 11.0346 58.6472 11.3487 58.8237 11.6259C59.0095 11.903 59.2232 12.1247 59.4834 12.3095C59.7157 12.4573 59.9665 12.5681 60.2453 12.6513C60.524 12.7344 60.8306 12.7714 61.1466 12.7714C61.4625 12.7714 61.9363 12.7067 62.2522 12.5958C62.5774 12.4757 62.8562 12.3002 63.0885 12.06C63.3022 11.8291 63.4694 11.552 63.5902 11.2286C63.711 10.9053 63.7667 10.5358 63.7667 10.1108C63.7667 9.6859 63.7017 9.28867 63.5623 8.98382C63.4229 8.67897 63.2185 8.42031 62.9305 8.20784C62.6425 7.99537 62.2708 7.80137 61.797 7.62585L61.0165 7.33948C60.7284 7.22862 60.5054 7.11777 60.3568 7.00691C60.1988 6.88682 60.0966 6.76673 60.0409 6.62816C59.9851 6.4896 59.9573 6.33255 59.9573 6.14779C59.9573 5.96304 59.9758 5.80599 60.0223 5.66742C60.0595 5.52885 60.1245 5.418 60.1988 5.31638Z", fill: "white" }),
457
- /* @__PURE__ */ e.jsx("path", { d: "M69.23 5.09466V3.73669H64.8167V12.6605H69.23V11.3025H66.2754V8.78981H68.7283V7.44108H66.2754V5.09466H69.23Z", fill: "white" }),
458
- /* @__PURE__ */ e.jsx("path", { d: "M71.0883 4.09701V3.71826H72.7515V4.09701H72.1197V5.95383H71.7201V4.09701H71.0883Z", fill: "white" }),
459
- /* @__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" })
475
+ function d2({ width: e, height: r = 20 }) {
476
+ const a = e ?? 4.6875 * r;
477
+ return /* @__PURE__ */ t.jsxs("svg", { width: a, height: r, viewBox: "0 0 75 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
478
+ /* @__PURE__ */ t.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" }),
479
+ /* @__PURE__ */ t.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" }),
480
+ /* @__PURE__ */ t.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" }),
481
+ /* @__PURE__ */ t.jsx("path", { d: "M18.3783 5.31638C18.4805 5.20553 18.6013 5.12239 18.7407 5.06696C18.8801 5.01153 19.0473 4.98382 19.2331 4.98382C19.419 4.98382 19.6698 5.02077 19.8557 5.10391C20.0415 5.18706 20.1902 5.30715 20.3109 5.45495C20.376 5.53809 20.441 5.63047 20.4875 5.74133C20.5432 5.85218 20.5804 5.96303 20.599 6.08313L21.9741 5.65819C21.8719 5.29791 21.7325 4.99306 21.556 4.7344C21.3795 4.47574 21.1657 4.25403 20.9149 4.07851C20.6919 3.92147 20.441 3.81061 20.153 3.73671C19.8742 3.6628 19.5676 3.62585 19.2517 3.62585C18.9358 3.62585 18.4712 3.68128 18.1461 3.80137C17.8301 3.92147 17.5514 4.09698 17.3284 4.32793C17.0961 4.54964 16.9289 4.81754 16.8174 5.13163C16.7059 5.44571 16.6501 5.80599 16.6501 6.20322C16.6501 6.60045 16.7152 7.01615 16.8545 7.321C16.9939 7.62585 17.1983 7.88451 17.4771 8.09699C17.7558 8.30946 18.1182 8.50345 18.5735 8.6605L19.3632 8.94687C19.6513 9.05772 19.8835 9.16858 20.0415 9.28867C20.1994 9.39953 20.3109 9.52886 20.376 9.66742C20.441 9.80599 20.4689 9.98151 20.4689 10.194C20.4689 10.4065 20.4503 10.5543 20.4039 10.6928C20.3667 10.8314 20.2924 10.9515 20.2087 11.0623C20.1158 11.1824 19.995 11.2656 19.8464 11.321C19.707 11.3764 19.5398 11.4041 19.3539 11.4041C19.1681 11.4041 18.9172 11.3672 18.7407 11.2841C18.5549 11.2009 18.4062 11.0808 18.2854 10.933C18.2111 10.8499 18.1461 10.7575 18.0996 10.6374C18.0438 10.5265 18.016 10.4065 17.9881 10.2864L16.5944 10.6744C16.6873 11.0346 16.8267 11.3487 17.0032 11.6259C17.189 11.903 17.4027 12.1247 17.6629 12.3095C17.8952 12.4573 18.1461 12.5681 18.4248 12.6513C18.7035 12.7344 19.0101 12.7714 19.3261 12.7714C19.642 12.7714 20.1158 12.7067 20.4317 12.5958C20.7569 12.4757 21.0357 12.3002 21.268 12.06C21.4817 11.8291 21.6489 11.552 21.7697 11.2286C21.8905 10.9053 21.9462 10.5358 21.9462 10.1108C21.9462 9.6859 21.8812 9.28867 21.7418 8.98382C21.6024 8.67897 21.398 8.42031 21.11 8.20784C20.822 7.99537 20.4503 7.80137 19.9765 7.62585L19.196 7.33948C18.9079 7.22862 18.685 7.11777 18.5363 7.00691C18.3783 6.88682 18.2761 6.76673 18.2204 6.62816C18.1646 6.4896 18.1368 6.33255 18.1368 6.14779C18.1368 5.96304 18.1553 5.80599 18.2018 5.66742C18.239 5.52885 18.304 5.418 18.3783 5.31638Z", fill: "white" }),
482
+ /* @__PURE__ */ t.jsx("path", { d: "M26.7684 10.1478C26.7684 10.4249 26.7313 10.6651 26.657 10.8499C26.5826 11.0346 26.4618 11.1732 26.2853 11.2748C26.1088 11.3764 25.8765 11.4226 25.5884 11.4226C25.3004 11.4226 25.0588 11.3764 24.8823 11.2748C24.7058 11.1732 24.585 11.0346 24.5106 10.8499C24.4363 10.6651 24.3991 10.4342 24.3991 10.1478V3.72748H22.9404V10.1016C22.9404 10.6282 23.0333 11.0901 23.2191 11.4873C23.405 11.8845 23.693 12.1986 24.0832 12.4296C24.4735 12.6605 24.9845 12.7714 25.5977 12.7714C26.211 12.7714 26.7034 12.6605 27.1029 12.4296C27.5025 12.1986 27.7905 11.8845 27.967 11.4781C28.1436 11.0716 28.2365 10.6189 28.2365 10.1016V3.72748H26.7777V10.1478H26.7684Z", fill: "white" }),
483
+ /* @__PURE__ */ t.jsx("path", { d: "M33.1888 4.04157C32.8171 3.8291 32.3433 3.72748 31.7765 3.72748H29.37V12.6513H30.8288V9.5381H31.7579C32.334 9.5381 32.8078 9.43648 33.1795 9.23325C33.5511 9.03002 33.8299 8.71593 34.0157 8.29099C34.2015 7.86605 34.2945 7.31177 34.2945 6.63741C34.2945 5.96304 34.2015 5.41801 34.0157 4.99307C33.8299 4.56813 33.5511 4.25404 33.1795 4.04157H33.1888ZM32.7056 7.57043C32.622 7.79214 32.5012 7.94919 32.3433 8.0508C32.1853 8.15242 31.9809 8.19861 31.7207 8.19861H30.8195V5.09469H31.7207C31.9809 5.09469 32.1853 5.14088 32.3433 5.24249C32.5012 5.34411 32.622 5.50115 32.7056 5.72286C32.7893 5.94457 32.8264 6.24942 32.8264 6.63741C32.8264 7.0254 32.7893 7.34873 32.7056 7.57043Z", fill: "white" }),
484
+ /* @__PURE__ */ t.jsx("path", { d: "M35.1214 12.6605H39.5255V11.3025H36.5801V8.78981H39.0331V7.44108H36.5801V5.09466H39.5255V3.73669H35.1214V12.6605Z", fill: "white" }),
485
+ /* @__PURE__ */ t.jsx("path", { d: "M44.3199 8.92842C44.6822 8.72519 44.9703 8.42034 45.1747 8.01387C45.3791 7.6074 45.4813 7.09932 45.4813 6.48962C45.4813 5.87992 45.3884 5.32565 45.2026 4.92842C45.0167 4.52195 44.738 4.22634 44.3849 4.03235C44.0226 3.83835 43.5766 3.74597 43.047 3.74597H40.4454V12.6698H41.9041V9.24251H42.9169L44.0411 12.6698H45.6207L44.3013 8.94689C44.3013 8.94689 44.3199 8.9469 44.3292 8.93766L44.3199 8.92842ZM41.8948 5.0947H42.9819C43.1956 5.0947 43.3722 5.13165 43.5301 5.21479C43.6788 5.29793 43.7996 5.4365 43.8832 5.63974C43.9668 5.83373 44.004 6.12011 44.004 6.48038C44.004 6.84066 43.9668 7.13627 43.8832 7.3395C43.7996 7.54274 43.6881 7.68131 43.5394 7.76445C43.3907 7.84759 43.2142 7.88454 43.0005 7.88454H41.9041V5.10394L41.8948 5.0947Z", fill: "white" }),
486
+ /* @__PURE__ */ t.jsx("path", { d: "M52.4219 10.4988L51.1583 3.73669H49.7553L48.501 10.4619L47.2095 3.73669H45.6485L47.7019 12.6605H49.2164L50.4615 6.68358L51.6972 12.6605H53.2117L55.2558 3.73669H53.7134L52.4219 10.4988Z", fill: "white" }),
487
+ /* @__PURE__ */ t.jsx("path", { d: "M57.3928 3.73669H55.9341V12.6605H57.3928V3.73669Z", fill: "white" }),
488
+ /* @__PURE__ */ t.jsx("path", { d: "M60.1988 5.31638C60.301 5.20553 60.4218 5.12239 60.5612 5.06696C60.7006 5.01153 60.8678 4.98382 61.0536 4.98382C61.2395 4.98382 61.4903 5.02077 61.6762 5.10391C61.862 5.18706 62.0107 5.30715 62.1314 5.45495C62.1965 5.53809 62.2615 5.63047 62.308 5.74133C62.3637 5.85218 62.4009 5.96303 62.4195 6.08313L63.7946 5.65819C63.6924 5.29791 63.553 4.99306 63.3765 4.7344C63.1999 4.47574 62.9862 4.25403 62.7354 4.07851C62.5124 3.92147 62.2615 3.81061 61.9735 3.73671C61.6947 3.6628 61.3881 3.62585 61.0722 3.62585C60.7563 3.62585 60.2917 3.68128 59.9665 3.80137C59.6506 3.92147 59.3719 4.09698 59.1489 4.32793C58.9166 4.54964 58.7494 4.81754 58.6379 5.13163C58.5264 5.44571 58.4706 5.80599 58.4706 6.20322C58.4706 6.60045 58.5357 7.01615 58.675 7.321C58.8144 7.62585 59.0188 7.88451 59.2976 8.09699C59.5763 8.30946 59.9387 8.50345 60.394 8.6605L61.1837 8.94687C61.4718 9.05772 61.704 9.16858 61.862 9.28867C62.0199 9.39953 62.1314 9.52886 62.1965 9.66742C62.2615 9.80599 62.2894 9.98151 62.2894 10.194C62.2894 10.4065 62.2708 10.5543 62.2244 10.6928C62.1872 10.8314 62.1129 10.9515 62.0292 11.0623C61.9363 11.1824 61.8155 11.2656 61.6669 11.321C61.5275 11.3764 61.3603 11.4041 61.1744 11.4041C60.9886 11.4041 60.7377 11.3672 60.5612 11.2841C60.3754 11.2009 60.2267 11.0808 60.1059 10.933C60.0316 10.8499 59.9665 10.7575 59.9201 10.6374C59.8643 10.5265 59.8272 10.4065 59.8086 10.2864L58.4149 10.6744C58.5078 11.0346 58.6472 11.3487 58.8237 11.6259C59.0095 11.903 59.2232 12.1247 59.4834 12.3095C59.7157 12.4573 59.9665 12.5681 60.2453 12.6513C60.524 12.7344 60.8306 12.7714 61.1466 12.7714C61.4625 12.7714 61.9363 12.7067 62.2522 12.5958C62.5774 12.4757 62.8562 12.3002 63.0885 12.06C63.3022 11.8291 63.4694 11.552 63.5902 11.2286C63.711 10.9053 63.7667 10.5358 63.7667 10.1108C63.7667 9.6859 63.7017 9.28867 63.5623 8.98382C63.4229 8.67897 63.2185 8.42031 62.9305 8.20784C62.6425 7.99537 62.2708 7.80137 61.797 7.62585L61.0165 7.33948C60.7284 7.22862 60.5054 7.11777 60.3568 7.00691C60.1988 6.88682 60.0966 6.76673 60.0409 6.62816C59.9851 6.4896 59.9573 6.33255 59.9573 6.14779C59.9573 5.96304 59.9758 5.80599 60.0223 5.66742C60.0595 5.52885 60.1245 5.418 60.1988 5.31638Z", fill: "white" }),
489
+ /* @__PURE__ */ t.jsx("path", { d: "M69.23 5.09466V3.73669H64.8167V12.6605H69.23V11.3025H66.2754V8.78981H68.7283V7.44108H66.2754V5.09466H69.23Z", fill: "white" }),
490
+ /* @__PURE__ */ t.jsx("path", { d: "M71.0883 4.09701V3.71826H72.7515V4.09701H72.1197V5.95383H71.7201V4.09701H71.0883Z", fill: "white" }),
491
+ /* @__PURE__ */ t.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" })
460
492
  ] });
461
493
  }
462
- function be(t) {
463
- return String(t).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
494
+ function be(e) {
495
+ return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
464
496
  }
465
- function we(t) {
466
- return !t.trim() || /^\s*([*\-]|\d+\.)\s+/.test(t) ? !1 : /^\s{2,}/.test(t) && /[=(){}\[\],:]/.test(t) || /["'][^"']*["']\s*[:=]/.test(t) && t.length > 10 ? !0 : /\[text\]|\[\/text\]|\]\[text\]/i.test(t) || /\?|!/.test(t) || t.includes("—") || t.includes("–") || /^\s*(Would|Can|May|Could|Should|I |You |We |Let's|Please|Sure|Yes|No)\b/i.test(t) || /\b(your|you|we|me)\b/i.test(t) || /^\s*[A-Z][^.(]*[.?]\s*$/.test(t) || /^\s*#/.test(t) || /^\s*[-*]\s+[A-Z]/.test(t) && !/\.\w+\s*\(|=/.test(t) || /^\s*\d+\.\s+[A-Z][^.(]*$/.test(t) ? !1 : !!(/^\s*[)\]}]\s*$/.test(t) || /^\s*\.{3}\s*$/.test(t) || /^\s*(GET|POST|PUT|PATCH|DELETE|HEAD)\s+\S+/i.test(t) || /^\s*(Authorization|Content-Type|Accept)\s*:/i.test(t) || /^\s*\{\s*$/.test(t) || /^\s*[\w.]+\s*=/.test(t) || /\.\w+\s*\(|\b(print|range|open|str|int|list|dict)\s*\(/.test(t) || /^\s*(def|class|import|from|return|if|else|elif|for|while|try|except|with|async)\b/.test(t) || /^\s{2,}/.test(t) && /[=(){}\[\],:]/.test(t) || /[,(]\s*$|:\s*$/.test(t) || /["'][^"']*["']\s*[:=]/.test(t) && t.length > 10 || /\b\w+\s*\([^)]*\)\s*$/.test(t) && /[=.]\w+\s*\(|import|from\s+\w+/.test(t));
497
+ function we(e) {
498
+ return !e.trim() || /^\s*([*\-]|\d+\.)\s+/.test(e) ? !1 : /^\s{2,}/.test(e) && /[=(){}\[\],:]/.test(e) || /["'][^"']*["']\s*[:=]/.test(e) && e.length > 10 ? !0 : /\[text\]|\[\/text\]|\]\[text\]/i.test(e) || /\?|!/.test(e) || e.includes("—") || e.includes("–") || /^\s*(Would|Can|May|Could|Should|I |You |We |Let's|Please|Sure|Yes|No)\b/i.test(e) || /\b(your|you|we|me)\b/i.test(e) || /^\s*[A-Z][^.(]*[.?]\s*$/.test(e) || /^\s*#/.test(e) || /^\s*[-*]\s+[A-Z]/.test(e) && !/\.\w+\s*\(|=/.test(e) || /^\s*\d+\.\s+[A-Z][^.(]*$/.test(e) ? !1 : !!(/^\s*[)\]}]\s*$/.test(e) || /^\s*\.{3}\s*$/.test(e) || /^\s*(GET|POST|PUT|PATCH|DELETE|HEAD)\s+\S+/i.test(e) || /^\s*(Authorization|Content-Type|Accept)\s*:/i.test(e) || /^\s*\{\s*$/.test(e) || /^\s*[\w.]+\s*=/.test(e) || /\.\w+\s*\(|\b(print|range|open|str|int|list|dict)\s*\(/.test(e) || /^\s*(def|class|import|from|return|if|else|elif|for|while|try|except|with|async)\b/.test(e) || /^\s{2,}/.test(e) && /[=(){}\[\],:]/.test(e) || /[,(]\s*$|:\s*$/.test(e) || /["'][^"']*["']\s*[:=]/.test(e) && e.length > 10 || /\b\w+\s*\([^)]*\)\s*$/.test(e) && /[=.]\w+\s*\(|import|from\s+\w+/.test(e));
467
499
  }
468
- function i2(t) {
469
- const r = [], a = t.split(`
500
+ function h2(e) {
501
+ const r = [], a = e.split(`
470
502
  `), i = [];
471
- let n = 0;
472
- for (; n < a.length; ) {
473
- const f = a[n];
474
- if (!we(f)) {
475
- i.push(f), n++;
503
+ let s = 0;
504
+ for (; s < a.length; ) {
505
+ const d = a[s];
506
+ if (!we(d)) {
507
+ i.push(d), s++;
476
508
  continue;
477
509
  }
478
- const w = [];
479
- for (; n < a.length; ) {
480
- const p = we(a[n]), c = a[n].trim() === "", g = n + 1 < a.length && we(a[n + 1]);
481
- if (p || c && w.length > 0 && g)
482
- w.push(a[n]), n++;
510
+ const g = [];
511
+ for (; s < a.length; ) {
512
+ const m = we(a[s]), u = a[s].trim() === "", C = s + 1 < a.length && we(a[s + 1]);
513
+ if (m || u && g.length > 0 && C)
514
+ g.push(a[s]), s++;
483
515
  else break;
484
516
  }
485
- if (w.length >= 2) {
486
- const p = r.length, c = w.join(`
487
- `).trim(), g = be(c);
488
- r.push({ placeholder: `\0CODE_RAW_${p}\0`, html: `<pre class="sw-ttyw-code-block"><code>${g}</code></pre>` }), i.push(`\0CODE_RAW_${p}\0`);
489
- } else w.length === 1 && i.push(w[0]);
517
+ if (g.length >= 2) {
518
+ const m = r.length, u = g.join(`
519
+ `).trim(), C = be(u);
520
+ r.push({ placeholder: `\0CODE_RAW_${m}\0`, html: `<pre class="sw-ttyw-code-block"><code>${C}</code></pre>` }), i.push(`\0CODE_RAW_${m}\0`);
521
+ } else g.length === 1 && i.push(g[0]);
490
522
  }
491
523
  return { html: i.join(`
492
524
  `), codeBlocks: r };
493
525
  }
494
- function Ve(t) {
495
- return !t || !String(t).trim() ? "" : String(t).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>");
526
+ function We(e) {
527
+ return !e || !String(e).trim() ? "" : String(e).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>");
496
528
  }
497
- const Te = /^\s*([*\-]|\d+\.)\s+(.*)$/;
498
- function l2(t) {
529
+ const Ae = /^\s*([*\-]|\d+\.)\s+(.*)$/;
530
+ function p2(e) {
499
531
  const r = [];
500
- for (const c of t) {
501
- const g = c.match(Te);
502
- if (!g) continue;
503
- const l = c.match(/^(\s*)/)[1].length, H = g[1], h = g[2], m = /^\d+\.$/.test(H);
504
- r.push({ indent: l, content: h, ordered: m });
532
+ for (const u of e) {
533
+ const C = u.match(Ae);
534
+ if (!C) continue;
535
+ const l = u.match(/^(\s*)/)[1].length, j = C[1], p = C[2], c = /^\d+\.$/.test(j);
536
+ r.push({ indent: l, content: p, ordered: c });
505
537
  }
506
538
  if (r.length === 0) return "";
507
- const a = 2, i = [], n = [];
508
- let f = !1, w = !1, p = !1;
509
- for (let c = 0; c < r.length; c++) {
510
- const { indent: g, content: l, ordered: H } = r[c], h = Math.floor(g / a), m = Ve(l);
511
- if (H)
512
- w && (p && i.push("</li>"), i.push("</ul></li>"), n.pop(), w = !1, p = !1), p && n.length > 0 && n[n.length - 1].type === "ol" && i.push("</li>"), (n.length === 0 || n[n.length - 1].type !== "ol") && (i.push("<ol>"), n.push({ type: "ol", indentLevel: h })), i.push("<li>", m), p = !0, f = !0;
539
+ const a = 2, i = [], s = [];
540
+ let d = !1, g = !1, m = !1;
541
+ for (let u = 0; u < r.length; u++) {
542
+ const { indent: C, content: l, ordered: j } = r[u], p = Math.floor(C / a), c = We(l);
543
+ if (j)
544
+ g && (m && i.push("</li>"), i.push("</ul></li>"), s.pop(), g = !1, m = !1), m && s.length > 0 && s[s.length - 1].type === "ol" && i.push("</li>"), (s.length === 0 || s[s.length - 1].type !== "ol") && (i.push("<ol>"), s.push({ type: "ol", indentLevel: p })), i.push("<li>", c), m = !0, d = !0;
513
545
  else {
514
- if (f && h <= (n.length > 0 ? n[n.length - 1].indentLevel : 0))
515
- i.push("<ul>"), n.push({ type: "ul", indentLevel: h }), w = !0, p = !1;
516
- else if (w || n.length > 0 && n[n.length - 1].type === "ul") {
517
- p && i.push("</li>"), p = !0;
518
- const d = n.length > 0 ? n[n.length - 1].indentLevel : -1;
519
- for (; h > d && n.length > 0 && n[n.length - 1].type === "ul"; ) {
520
- const C = n[n.length - 1];
521
- if (h <= C.indentLevel) break;
522
- i.push("<ul>"), n.push({ type: "ul", indentLevel: h });
546
+ if (d && p <= (s.length > 0 ? s[s.length - 1].indentLevel : 0))
547
+ i.push("<ul>"), s.push({ type: "ul", indentLevel: p }), g = !0, m = !1;
548
+ else if (g || s.length > 0 && s[s.length - 1].type === "ul") {
549
+ m && i.push("</li>"), m = !0;
550
+ const f = s.length > 0 ? s[s.length - 1].indentLevel : -1;
551
+ for (; p > f && s.length > 0 && s[s.length - 1].type === "ul"; ) {
552
+ const y = s[s.length - 1];
553
+ if (p <= y.indentLevel) break;
554
+ i.push("<ul>"), s.push({ type: "ul", indentLevel: p });
523
555
  }
524
556
  } else
525
- n.length > 0 && i.push("</li>"), (n.length === 0 || n[n.length - 1].type !== "ul") && (i.push("<ul>"), n.push({ type: "ul", indentLevel: h })), p = !0;
526
- i.push("<li>", m), f = !1;
557
+ s.length > 0 && i.push("</li>"), (s.length === 0 || s[s.length - 1].type !== "ul") && (i.push("<ul>"), s.push({ type: "ul", indentLevel: p })), m = !0;
558
+ i.push("<li>", c), d = !1;
527
559
  }
528
560
  }
529
- for (p && i.push("</li>"); n.length > 0; )
530
- n.pop().type === "ul" ? (i.push("</ul>"), n.length > 0 && n[n.length - 1].type === "ol" && i.push("</li>")) : i.push("</ol>");
561
+ for (m && i.push("</li>"); s.length > 0; )
562
+ s.pop().type === "ul" ? (i.push("</ul>"), s.length > 0 && s[s.length - 1].type === "ol" && i.push("</li>")) : i.push("</ol>");
531
563
  return i.join("");
532
564
  }
533
- function We(t) {
534
- if (!t) return "";
535
- let r = String(t);
565
+ function Ne(e) {
566
+ if (!e) return "";
567
+ let r = String(e);
536
568
  const a = [];
537
- r = r.replace(/```\s*(\w*)\s*\n?([\s\S]*?)```/g, (h, m, d) => {
538
- const C = a.length, L = be(d.trim());
539
- return a.push(`<pre class="sw-ttyw-code-block"><code class="${m ? `language-${m}` : ""}">${L}</code></pre>`), `\0CODE_FENCED_${C}\0`;
540
- }), r = r.replace(/\[code\]([\s\S]*?)\[\/code\]/gi, (h, m) => {
541
- const d = a.length, C = be(m.trim());
542
- return a.push(`<pre class="sw-ttyw-code-block"><code>${C}</code></pre>`), `\0CODE_FENCED_${d}\0`;
569
+ r = r.replace(/```\s*(\w*)\s*\n?([\s\S]*?)```/g, (p, c, f) => {
570
+ const y = a.length, _ = be(f.trim());
571
+ return a.push(`<pre class="sw-ttyw-code-block"><code class="${c ? `language-${c}` : ""}">${_}</code></pre>`), `\0CODE_FENCED_${y}\0`;
572
+ }), r = r.replace(/\[code\]([\s\S]*?)\[\/code\]/gi, (p, c) => {
573
+ const f = a.length, y = be(c.trim());
574
+ return a.push(`<pre class="sw-ttyw-code-block"><code>${y}</code></pre>`), `\0CODE_FENCED_${f}\0`;
543
575
  });
544
- const { html: i, codeBlocks: n } = i2(r);
576
+ const { html: i, codeBlocks: s } = h2(r);
545
577
  r = i, r = r.replace(/\[text\]([\s\S]*?)(?:\[\/text\]|\]\[text\]|\[text\]|\](?=\s*(\n|$)))/gi, '<span class="sw-ttyw-text-block">$1</span>').replace(/\[bold\]([\s\S]*?)(?:\[\/bold\]|\]\[bold\]|\[bold\]|\](?=\s*(\n|$)))/gi, "<strong>$1</strong>").replace(/\[italic\]([\s\S]*?)(?:\[\/italic\]|\]\[italic\]|\[italic\]|\](?=\s*(\n|$)))/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>');
546
- const f = r.split(`
547
- `), w = [];
548
- let p = [], c = [];
549
- function g() {
550
- p.length && (w.push({ type: "list", lines: p }), p = []);
578
+ const d = r.split(`
579
+ `), g = [];
580
+ let m = [], u = [];
581
+ function C() {
582
+ m.length && (g.push({ type: "list", lines: m }), m = []);
551
583
  }
552
584
  function l() {
553
- c.length && (w.push({ type: "content", lines: c }), c = []);
585
+ u.length && (g.push({ type: "content", lines: u }), u = []);
554
586
  }
555
- for (let h = 0; h < f.length; h++) {
556
- const m = f[h];
557
- Te.test(m) ? (l(), p.push(m)) : (g(), c.push(m));
587
+ for (let p = 0; p < d.length; p++) {
588
+ const c = d[p];
589
+ Ae.test(c) ? (l(), m.push(c)) : (C(), u.push(c));
558
590
  }
559
- return g(), l(), r = w.map((h) => h.type === "list" ? l2(h.lines) : Ve(h.lines.join(`
560
- `))).join(""), a.forEach((h, m) => {
561
- r = r.replace(`\0CODE_FENCED_${m}\0`, h);
562
- }), n.forEach(({ placeholder: h, html: m }) => {
563
- r = r.replace(h, m);
591
+ return C(), l(), r = g.map((p) => p.type === "list" ? p2(p.lines) : We(p.lines.join(`
592
+ `))).join(""), a.forEach((p, c) => {
593
+ r = r.replace(`\0CODE_FENCED_${c}\0`, p);
594
+ }), s.forEach(({ placeholder: p, html: c }) => {
595
+ r = r.replace(p, c);
564
596
  }), r = r.replace(/(<br\s*\/?>)\s*$/i, ""), r;
565
597
  }
566
- const c2 = 30, d2 = 300, u2 = Ie(function({ text: r, speed: a = 20, onComplete: i }) {
567
- const [n, f] = j(""), [w, p] = j(!1), c = $(i);
598
+ const f2 = 30, m2 = 300, C2 = Ie(function({ text: r, speed: a = 20, onComplete: i }) {
599
+ const [s, d] = L(""), [g, m] = L(!1), u = $(i);
568
600
  M(() => {
569
- c.current = i;
601
+ u.current = i;
570
602
  }, [i]), M(() => {
571
603
  if (!r) return;
572
- f(""), p(!1);
573
- const l = r.trim().split(/\s+/), H = Math.min(c2, l.length), h = l.slice(0, H).join(" "), m = Math.min(h.length, d2, r.length);
574
- let d = 0, C = null, L = !1;
604
+ d(""), m(!1);
605
+ const l = r.trim().split(/\s+/), j = Math.min(f2, l.length), p = l.slice(0, j).join(" "), c = Math.min(p.length, m2, r.length);
606
+ let f = 0, y = null, _ = !1;
575
607
  const R = () => {
576
- L || (L = !0, C && clearInterval(C), C = null, f(r), p(!0), c.current && c.current());
608
+ _ || (_ = !0, y && clearInterval(y), y = null, d(r), m(!0), u.current && u.current());
577
609
  }, S = () => {
578
610
  typeof document < "u" && R();
579
611
  };
580
- return typeof document < "u" && document.addEventListener("visibilitychange", S), C = setInterval(() => {
581
- d < m ? (f(r.slice(0, d + 1)), d++) : R();
612
+ return typeof document < "u" && document.addEventListener("visibilitychange", S), y = setInterval(() => {
613
+ f < c ? (d(r.slice(0, f + 1)), f++) : R();
582
614
  }, a), () => {
583
- C && clearInterval(C), typeof document < "u" && document.removeEventListener("visibilitychange", S);
615
+ y && clearInterval(y), typeof document < "u" && document.removeEventListener("visibilitychange", S);
584
616
  };
585
617
  }, [r, a]);
586
- const g = (l) => l.replace(/(https?:\/\/[^\s<]+)/g, '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\[bold\]([\s\S]*?)(?:\[\/bold\]|\]\[bold\]|\[bold\]|\](?=\s*(\n|$)))/gi, "<strong>$1</strong>").replace(/\[italic\]([\s\S]*?)(?:\[\/italic\]|\]\[italic\]|\[italic\]|\](?=\s*(\n|$)))/gi, "<em>$1</em>").replace(/\[text\]([\s\S]*?)(?:\[\/text\]|\]\[text\]|\[text\]|\](?=\s*(\n|$)))/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(/\[([^[\]]+)\]/g, '<span class="sw-ttyw-bracket-label">$1</span>').replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/(?:^|\n)-\s+/g, `
618
+ const C = (l) => l.replace(/(https?:\/\/[^\s<]+)/g, '<a href="$1" target="_blank" rel="noopener noreferrer">$1</a>').replace(/\[bold\]([\s\S]*?)(?:\[\/bold\]|\]\[bold\]|\[bold\]|\](?=\s*(\n|$)))/gi, "<strong>$1</strong>").replace(/\[italic\]([\s\S]*?)(?:\[\/italic\]|\]\[italic\]|\[italic\]|\](?=\s*(\n|$)))/gi, "<em>$1</em>").replace(/\[text\]([\s\S]*?)(?:\[\/text\]|\]\[text\]|\[text\]|\](?=\s*(\n|$)))/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(/\[([^[\]]+)\]/g, '<span class="sw-ttyw-bracket-label">$1</span>').replace(/\*\*(.*?)\*\*/g, "<strong>$1</strong>").replace(/\*(.*?)\*/g, "<em>$1</em>").replace(/(?:^|\n)-\s+/g, `
587
619
  • `).replace(/\n/g, "<br/>").replace(/(\d+\.\s)/g, "<br/>$1").replace(/(\*\s)/g, "<br/>$1");
588
- return /* @__PURE__ */ e.jsx(
620
+ return /* @__PURE__ */ t.jsx(
589
621
  "div",
590
622
  {
591
623
  className: "sw-ttyw-markdown-pre-wrap",
592
624
  dangerouslySetInnerHTML: {
593
- __html: w ? We(n) : g(n) + '<span class="typing-cursor">|</span>'
625
+ __html: g ? Ne(s) : C(s) + '<span class="typing-cursor">|</span>'
594
626
  }
595
627
  }
596
628
  );
597
- }), h2 = Ie(function({ msg: r, isTyping: a = !1, onTypingComplete: i }) {
598
- const n = r.from === "human" ? "sw-ttyw-message self" : "sw-ttyw-message other";
599
- return /* @__PURE__ */ e.jsxs("div", { className: n, children: [
600
- /* @__PURE__ */ e.jsx("div", { className: "message-avatar", children: r.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: [
601
- /* @__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" }),
602
- /* @__PURE__ */ e.jsx("circle", { cx: "12", cy: "7", r: "4" })
603
- ] }) : /* @__PURE__ */ e.jsx($e, { width: 20, height: 20 }) }),
604
- /* @__PURE__ */ e.jsx("div", { className: "message-content sw-ttyw-markdown", children: r.from === "ai" && a ? /* @__PURE__ */ e.jsx(u2, { text: r.text, speed: 20, onComplete: i }) : r.from === "ai" ? /* @__PURE__ */ e.jsx(
629
+ }), g2 = Ie(function({ msg: r, isTyping: a = !1, onTypingComplete: i }) {
630
+ const s = r.from === "human" ? "sw-ttyw-message self" : "sw-ttyw-message other";
631
+ return /* @__PURE__ */ t.jsxs("div", { className: s, children: [
632
+ /* @__PURE__ */ t.jsx("div", { className: "message-avatar", children: r.from === "human" ? /* @__PURE__ */ t.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: [
633
+ /* @__PURE__ */ t.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" }),
634
+ /* @__PURE__ */ t.jsx("circle", { cx: "12", cy: "7", r: "4" })
635
+ ] }) : /* @__PURE__ */ t.jsx(Ve, { width: 20, height: 20 }) }),
636
+ /* @__PURE__ */ t.jsx("div", { className: "message-content sw-ttyw-markdown", children: r.from === "ai" && a ? /* @__PURE__ */ t.jsx(C2, { text: r.text, speed: 20, onComplete: i }) : r.from === "ai" ? /* @__PURE__ */ t.jsx(
605
637
  "div",
606
638
  {
607
639
  className: "sw-ttyw-markdown-pre-wrap",
608
- dangerouslySetInnerHTML: { __html: We(r.text) }
640
+ dangerouslySetInnerHTML: { __html: Ne(r.text) }
609
641
  }
610
- ) : /* @__PURE__ */ e.jsx(
642
+ ) : /* @__PURE__ */ t.jsx(
611
643
  "div",
612
644
  {
613
645
  className: "sw-ttyw-markdown-pre-wrap",
@@ -618,51 +650,51 @@ const c2 = 30, d2 = 300, u2 = Ie(function({ text: r, speed: a = 20, onComplete:
618
650
  }
619
651
  ) })
620
652
  ] });
621
- }), p2 = (t = "") => {
653
+ }), w2 = (e = "") => {
622
654
  const r = (/* @__PURE__ */ new Date()).getHours();
623
655
  let a = [];
624
- return r >= 5 && r < 12 ? t ? a = [
625
- `🌅 Good morning ${t}! I'm an expert on SUPERWISE. Ready to explore the platform together and uncover what's possible?`,
626
- `☀️ Morning ${t}! I'm an expert on SUPERWISE. What would you like to discover or optimize today?`,
627
- `🌞 Good morning ${t}! I'm an expert on SUPERWISE. Curious about a feature or looking to dive deeper into the platform?`,
628
- `👋 Rise and shine ${t}! I'm an expert on SUPERWISE. Let's jump into anything you want to explore.`,
629
- `👋 Morning ${t}! I'm an expert on SUPERWISE. How can I guide you through the platform today?`
656
+ return r >= 5 && r < 12 ? e ? a = [
657
+ `🌅 Good morning ${e}! I'm an expert on SUPERWISE. Ready to explore the platform together and uncover what's possible?`,
658
+ `☀️ Morning ${e}! I'm an expert on SUPERWISE. What would you like to discover or optimize today?`,
659
+ `🌞 Good morning ${e}! I'm an expert on SUPERWISE. Curious about a feature or looking to dive deeper into the platform?`,
660
+ `👋 Rise and shine ${e}! I'm an expert on SUPERWISE. Let's jump into anything you want to explore.`,
661
+ `👋 Morning ${e}! I'm an expert on SUPERWISE. How can I guide you through the platform today?`
630
662
  ] : a = [
631
663
  "🌅 Good morning! I'm an expert on SUPERWISE. Ready to explore the platform together and uncover what's possible?",
632
664
  "☀️ Morning! I'm an expert on SUPERWISE. What would you like to discover or optimize today?",
633
665
  "🌞 Good morning! I'm an expert on SUPERWISE. Curious about a feature or looking to dive deeper into the platform?",
634
666
  "👋 Rise and shine! I'm an expert on SUPERWISE. Let's jump into anything you want to explore.",
635
667
  "👋 Morning! I'm an expert on SUPERWISE. How can I guide you through the platform today?"
636
- ] : r >= 12 && r < 17 ? t ? a = [
637
- `🌞 Good afternoon ${t}! I'm an expert on SUPERWISE. Ready to explore insights, features, or workflows together?`,
638
- `☀️ Afternoon ${t}! I'm an expert on SUPERWISE. How may I help you today?`,
639
- `👋 Good afternoon ${t}! I'm an expert on SUPERWISE. Looking to learn, optimize, or explore something specific?`,
640
- `🌅 Hey there ${t}! SUPERWISE expert here. Ready to help you unlock the capabilities you're curious about.`,
641
- `🌅 Afternoon ${t}! I'm an expert on SUPERWISE. How can I support your exploration today?`
668
+ ] : r >= 12 && r < 17 ? e ? a = [
669
+ `🌞 Good afternoon ${e}! I'm an expert on SUPERWISE. Ready to explore insights, features, or workflows together?`,
670
+ `☀️ Afternoon ${e}! I'm an expert on SUPERWISE. How may I help you today?`,
671
+ `👋 Good afternoon ${e}! I'm an expert on SUPERWISE. Looking to learn, optimize, or explore something specific?`,
672
+ `🌅 Hey there ${e}! SUPERWISE expert here. Ready to help you unlock the capabilities you're curious about.`,
673
+ `🌅 Afternoon ${e}! I'm an expert on SUPERWISE. How can I support your exploration today?`
642
674
  ] : a = [
643
675
  "🌞 Good afternoon! I'm an expert on SUPERWISE. Ready to explore insights, features, or workflows together?",
644
676
  "☀️ Afternoon! I'm an expert on SUPERWISE. How may I help you today?",
645
677
  "👋 Good afternoon! I'm an expert on SUPERWISE. Looking to learn, optimize, or explore something specific?",
646
678
  "🌅 Hey there! SUPERWISE expert here. Ready to help you unlock the capabilities you're curious about.",
647
679
  "🌅 Afternoon! I'm an expert on SUPERWISE. How can I support your exploration today?"
648
- ] : r >= 17 && r < 21 ? t ? a = [
649
- `🌆 Good evening ${t}! I'm a SUPERWISE expert. Ready to explore features or clarify anything you're evaluating?`,
650
- `🌅 Evening ${t}! I'm your SUPERWISE expert. What can I help you discover or fine-tune tonight?`,
651
- `👋 Good evening ${t}! I'm an expert on SUPERWISE. Interested in exploring capabilities or reviewing how something works?`,
652
- `🌇 Hey there ${t}! SUPERWISE expert here. Want to dive into the platform together?`,
653
- `🌇 Evening ${t}! I'm an expert on SUPERWISE. How can I assist your learning or discovery today?`
680
+ ] : r >= 17 && r < 21 ? e ? a = [
681
+ `🌆 Good evening ${e}! I'm a SUPERWISE expert. Ready to explore features or clarify anything you're evaluating?`,
682
+ `🌅 Evening ${e}! I'm your SUPERWISE expert. What can I help you discover or fine-tune tonight?`,
683
+ `👋 Good evening ${e}! I'm an expert on SUPERWISE. Interested in exploring capabilities or reviewing how something works?`,
684
+ `🌇 Hey there ${e}! SUPERWISE expert here. Want to dive into the platform together?`,
685
+ `🌇 Evening ${e}! I'm an expert on SUPERWISE. How can I assist your learning or discovery today?`
654
686
  ] : a = [
655
687
  "🌆 Good evening! I'm a SUPERWISE expert. Ready to explore features or clarify anything you're evaluating?",
656
688
  "🌅 Evening! I'm your SUPERWISE expert. What can I help you discover or fine-tune tonight?",
657
689
  "👋 Good evening! I'm an expert on SUPERWISE. Interested in exploring capabilities or reviewing how something works?",
658
690
  "🌇 Hey there! SUPERWISE expert here. Want to dive into the platform together?",
659
691
  "🌇 Evening! I'm an expert on SUPERWISE. How can I assist your learning or discovery today?"
660
- ] : t ? a = [
661
- `🌙 Good evening ${t}! I'm a SUPERWISE expert. Ready to guide you through the platform anytime.`,
662
- `⭐ Evening ${t}! I'm your SUPERWISE expert. What brings you to Superwise tonight - exploration, questions, or clarity?`,
663
- `👋 Good evening ${t}! I'm a SUPERWISE expert. Looking to discover features or understand how something works?`,
664
- `🌃 Hey there ${t}! I'm a SUPERWISE expert. Want to explore what the platform offers?`,
665
- `🌃 Evening ${t}! SUPERWISE expert here. How can I help simplify or explain things for you today?`
692
+ ] : e ? a = [
693
+ `🌙 Good evening ${e}! I'm a SUPERWISE expert. Ready to guide you through the platform anytime.`,
694
+ `⭐ Evening ${e}! I'm your SUPERWISE expert. What brings you to Superwise tonight - exploration, questions, or clarity?`,
695
+ `👋 Good evening ${e}! I'm a SUPERWISE expert. Looking to discover features or understand how something works?`,
696
+ `🌃 Hey there ${e}! I'm a SUPERWISE expert. Want to explore what the platform offers?`,
697
+ `🌃 Evening ${e}! SUPERWISE expert here. How can I help simplify or explain things for you today?`
666
698
  ] : a = [
667
699
  "🌙 Good evening! I'm a SUPERWISE expert. Ready to guide you through the platform anytime.",
668
700
  "⭐ Evening! I'm your SUPERWISE expert. What brings you to Superwise tonight - exploration, questions, or clarity?",
@@ -671,11 +703,11 @@ const c2 = 30, d2 = 300, u2 = Ie(function({ text: r, speed: a = 20, onComplete:
671
703
  "🌃 Evening! SUPERWISE expert here. How can I help simplify or explain things for you today?"
672
704
  ], a[Math.floor(Math.random() * a.length)];
673
705
  };
674
- function m2({ title: t = "", agentId: r = "", discoveryAgentId: a = "", primaryColor: i = "", minimizedButtonColor: n = "", apiUrl: f = "" }) {
706
+ function x2({ title: e = "", agentId: r = "", discoveryAgentId: a = "", primaryColor: i = "", minimizedButtonColor: s = "", apiUrl: d = "" }) {
675
707
  M(() => {
676
- t2();
708
+ a2();
677
709
  }, []);
678
- const w = fe(() => s2(i), [i]), p = fe(() => n2(n, i), [n, i]), [c, g] = j(() => {
710
+ const g = fe(() => l2(i), [i]), m = fe(() => c2(s, i), [s, i]), [u, C] = L(() => {
679
711
  try {
680
712
  if (typeof window < "u" && window.localStorage) {
681
713
  const o = window.localStorage.getItem("chatbot-messages");
@@ -684,7 +716,7 @@ function m2({ title: t = "", agentId: r = "", discoveryAgentId: a = "", primaryC
684
716
  } catch {
685
717
  }
686
718
  return [];
687
- }), [l, H] = j(() => {
719
+ }), [l, j] = L(() => {
688
720
  try {
689
721
  if (typeof window < "u" && window.localStorage) {
690
722
  const o = window.localStorage.getItem("chatbot-mql_df");
@@ -693,204 +725,217 @@ function m2({ title: t = "", agentId: r = "", discoveryAgentId: a = "", primaryC
693
725
  } catch {
694
726
  }
695
727
  return [];
696
- }), [h, m] = j(""), [d, C] = j(!1), [L, R] = j(!1), [S, Y] = j(!0), [te, ie] = j(!1), [le, V] = j(/* @__PURE__ */ new Set()), [ce, J] = j(!1), [de, ue] = j(!1), [X, I] = j(!1), [T, K] = j(!1), [me, re] = j(""), [B, N] = j(""), se = 12e4, s = "https://superwise.ai/contact/", u = (o) => typeof o == "string" && o.includes("unable to respond at the moment") && o.includes("Contact Sales"), b = $(null), v = $(null), q = fe(() => {
728
+ }), [p, c] = L(""), [f, y] = L(!1), [_, R] = L(!1), [S, ae] = L(!0), [ee, ie] = L(!1), [le, T] = L(/* @__PURE__ */ new Set()), [ce, Y] = L(!1), [ue, de] = L(!1), [J, I] = L(!1), [V, X] = L(!1), [me, te] = L(""), [B, N] = L(""), re = 12e4, n = "https://superwise.ai/contact/", h = (o) => typeof o == "string" && o.includes("unable to respond at the moment") && o.includes("Contact Sales"), b = $(null), E = $(null), q = fe(() => {
697
729
  if (!l || l.length === 0) return "";
698
- const o = l.find((y) => y.name && y.email);
730
+ const o = l.find((w) => w.name && w.email);
699
731
  return o ? `${o.name} (${o.email})` : "";
700
- }, [l]), Q = $(null), k = $(null), [O, U] = j(!0), D = $(!0), ke = $(c), P = G(() => {
732
+ }, [l]), K = $(null), k = $(null), [O, U] = L(!0), D = $(!0), ke = $(u), P = G(() => {
701
733
  b.current && (clearTimeout(b.current), b.current = null);
702
- }, []), ve = G((o) => {
703
- P(), b.current = setTimeout(o, se);
704
- }, [se, P]), Ce = fe(() => c.map((o) => ({ role: o.from, content: o.text })), [c]), he = (o) => {
734
+ }, []), Ee = G((o) => {
735
+ P(), b.current = setTimeout(o, re);
736
+ }, [re, P]);
737
+ M(() => {
738
+ if (typeof window > "u" || !window.sessionStorage || !r && !a) return;
739
+ const o = `chatbot-warmup:${d || "default"}:${r}:${a}`;
740
+ try {
741
+ if (window.sessionStorage.getItem(o) === "1") return;
742
+ e2(r, a, d).then((w) => {
743
+ w && window.sessionStorage.setItem(o, "1");
744
+ }).catch(() => {
745
+ });
746
+ } catch {
747
+ }
748
+ }, [r, a, d]);
749
+ const Ce = fe(() => u.map((o) => ({ role: o.from, content: o.text })), [u]), he = (o) => {
705
750
  N(o), setTimeout(() => {
706
751
  N("");
707
752
  }, 4e3);
708
- }, Ae = (o) => {
709
- const y = o.length, E = o.trim();
710
- return re(""), N(""), !E || y === 0 ? (he("Please enter a message before sending."), !1) : new RegExp(/(<([^>]+)>)/gi).test(E) ? (he("Please avoid using HTML tags or scripts in your message."), !1) : E.length < 2 ? (he("Please enter a meaningful question (at least 2 characters)."), !1) : E.length > 1e3 ? (he("Message is too long. Please keep it under 1000 characters."), !1) : (re(""), N(""), !0);
753
+ }, Oe = (o) => {
754
+ const w = o.length, v = o.trim();
755
+ return te(""), N(""), !v || w === 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) : (te(""), N(""), !0);
711
756
  }, F = G((o = "auto") => {
712
- var E;
713
- const y = k.current;
714
- y && (y.scrollTop = y.scrollHeight), (E = Q.current) == null || E.scrollIntoView({ behavior: o }), D.current = !0, U(!0);
757
+ var v;
758
+ const w = k.current;
759
+ w && (w.scrollTop = w.scrollHeight), (v = K.current) == null || v.scrollIntoView({ behavior: o }), D.current = !0, U(!0);
715
760
  }, []);
716
761
  M(() => {
717
762
  D.current && requestAnimationFrame(() => F("auto"));
718
- }, [c, B, X, T, le, d, F]), M(() => {
763
+ }, [u, B, J, V, le, f, F]), M(() => {
719
764
  const o = k.current;
720
765
  if (!o || typeof ResizeObserver > "u") return;
721
- const y = new ResizeObserver(() => {
766
+ const w = new ResizeObserver(() => {
722
767
  D.current && F("auto");
723
768
  });
724
- return y.observe(o), () => y.disconnect();
769
+ return w.observe(o), () => w.disconnect();
725
770
  }, [F]);
726
- const ge = $(null), Ee = $(S);
771
+ const ge = $(null), ve = $(S);
727
772
  M(() => {
728
- const o = Ee.current;
729
- if (Ee.current = S, o && !S) {
730
- const y = ge.current;
731
- y != null ? (ge.current = null, requestAnimationFrame(() => {
732
- const E = k.current;
733
- if (E) {
734
- const _ = E.scrollHeight - E.clientHeight;
735
- E.scrollTop = Math.min(y, Math.max(0, _));
736
- const pe = E.scrollHeight - E.scrollTop - E.clientHeight <= 40;
773
+ const o = ve.current;
774
+ if (ve.current = S, o && !S) {
775
+ const w = ge.current;
776
+ w != null ? (ge.current = null, requestAnimationFrame(() => {
777
+ const v = k.current;
778
+ if (v) {
779
+ const H = v.scrollHeight - v.clientHeight;
780
+ v.scrollTop = Math.min(w, Math.max(0, H));
781
+ const pe = v.scrollHeight - v.scrollTop - v.clientHeight <= 40;
737
782
  D.current = pe, U(pe);
738
783
  }
739
784
  })) : requestAnimationFrame(() => F("auto"));
740
785
  }
741
786
  }, [S, F]);
742
- const Ne = G(() => {
787
+ const Ue = G(() => {
743
788
  const o = k.current;
744
789
  if (!o) return;
745
- const _ = o.scrollHeight - o.scrollTop - o.clientHeight <= 40;
746
- D.current !== _ && (D.current = _, U(_));
790
+ const H = o.scrollHeight - o.scrollTop - o.clientHeight <= 40;
791
+ D.current !== H && (D.current = H, U(H));
747
792
  }, []);
748
793
  M(() => {
749
794
  try {
750
- typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-messages", JSON.stringify(c));
795
+ typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-messages", JSON.stringify(u));
751
796
  } catch {
752
797
  }
753
- }, [c]), M(() => {
798
+ }, [u]), M(() => {
754
799
  try {
755
800
  typeof window < "u" && window.localStorage && window.localStorage.setItem("chatbot-mql_df", JSON.stringify(l));
756
801
  } catch {
757
802
  }
758
803
  }, [l]), M(() => {
759
- ke.current = c;
760
- }, [c]), M(() => {
761
- if (c.length === 0 && !ce) {
762
- const y = { from: "ai", text: p2(q) };
763
- g([y]), J(!0), V(/* @__PURE__ */ new Set([0]));
804
+ ke.current = u;
805
+ }, [u]), M(() => {
806
+ if (u.length === 0 && !ce) {
807
+ const w = { from: "ai", text: w2(q) };
808
+ C([w]), Y(!0), T(/* @__PURE__ */ new Set([0]));
764
809
  }
765
- }, [c.length, ce, q]), M(() => () => P(), [P]);
810
+ }, [u.length, ce, q]), M(() => () => P(), [P]);
766
811
  const Se = G(async () => {
767
812
  var He;
768
- if (d || T) return;
769
- const o = h.trim();
770
- if (!o || !Ae(h))
813
+ if (f || V) return;
814
+ const o = p.trim();
815
+ if (!o || !Oe(p))
771
816
  return;
772
- I(!1), P(), (He = v.current) == null || He.abort();
773
- const y = new AbortController();
774
- v.current = y;
775
- const E = y.signal, _ = { from: "human", text: o }, W = ke.current, pe = [...W, _];
776
- g(pe), m(""), C(!0);
817
+ I(!1), P(), (He = E.current) == null || He.abort();
818
+ const w = new AbortController();
819
+ E.current = w;
820
+ const v = w.signal, H = { from: "human", text: o }, W = ke.current, pe = [...W, H];
821
+ C(pe), c(""), y(!0);
777
822
  let je = o;
778
- if (l && l.length > 0 && !de) {
823
+ if (l && l.length > 0 && !ue) {
779
824
  const x = W.filter((z) => z.from === "ai").pop();
780
- x && x.text && x.text.trim() !== "" && (je = o + "." + x.text, ue(!0));
825
+ x && x.text && x.text.trim() !== "" && (je = o + "." + x.text, de(!0));
781
826
  }
782
- const De = [...Ce, { role: "human", content: o }];
783
- ve(() => {
827
+ const Ze = [...Ce, { role: "human", content: o }];
828
+ Ee(() => {
784
829
  var x;
785
- I(!0), (x = v.current) == null || x.abort(), C(!1);
830
+ I(!0), (x = E.current) == null || x.abort(), y(!1);
786
831
  });
787
832
  try {
788
- const x = await Je(je, De, l, r, a, f, E);
833
+ const x = await t2(je, Ze, l, r, a, d, v);
789
834
  if (P(), typeof x == "string") {
790
835
  const z = { from: "ai", text: x };
791
- g((Z) => {
836
+ C((Z) => {
792
837
  const A = [...Z, z];
793
- return V((ee) => /* @__PURE__ */ new Set([...ee, A.length - 1])), A;
794
- }), (x.startsWith("⚠️") || x.startsWith("❌") || u(x)) && I(!0);
838
+ return T((Q) => /* @__PURE__ */ new Set([...Q, A.length - 1])), A;
839
+ }), (x.startsWith("⚠️") || x.startsWith("❌") || h(x)) && I(!0);
795
840
  } else {
796
841
  if (x != null && x.isError) {
797
842
  I(!0);
798
- const Z = x.reply || ae;
799
- g((A) => {
800
- const ee = [...A, { from: "ai", text: Z }];
801
- return V((Fe) => /* @__PURE__ */ new Set([...Fe, ee.length - 1])), ee;
843
+ const Z = x.reply || oe;
844
+ C((A) => {
845
+ const Q = [...A, { from: "ai", text: Z }];
846
+ return T((Be) => /* @__PURE__ */ new Set([...Be, Q.length - 1])), Q;
802
847
  });
803
848
  return;
804
849
  }
805
850
  const z = { from: "ai", text: x.reply };
806
- g((Z) => {
851
+ C((Z) => {
807
852
  const A = [...Z, z];
808
- return V((ee) => /* @__PURE__ */ new Set([...ee, A.length - 1])), A;
809
- }), x.mqlDf && Array.isArray(x.mqlDf) && H(x.mqlDf), x.reply && (x.reply.startsWith("⚠️") || x.reply.startsWith("❌") || u(x.reply)) && I(!0), x.chatHistoryLimitExceeded && K(!0);
853
+ return T((Q) => /* @__PURE__ */ new Set([...Q, A.length - 1])), A;
854
+ }), x.mqlDf && Array.isArray(x.mqlDf) && j(x.mqlDf), x.reply && (x.reply.startsWith("⚠️") || x.reply.startsWith("❌") || h(x.reply)) && I(!0), x.chatHistoryLimitExceeded && X(!0);
810
855
  }
811
856
  } catch (x) {
812
857
  if (P(), x.name === "AbortError")
813
858
  return;
814
- I(!0), g((z) => {
859
+ I(!0), C((z) => {
815
860
  const Z = [
816
861
  ...z,
817
862
  {
818
863
  from: "ai",
819
- text: ae
864
+ text: oe
820
865
  }
821
866
  ];
822
- return V((A) => /* @__PURE__ */ new Set([...A, Z.length - 1])), Z;
867
+ return T((A) => /* @__PURE__ */ new Set([...A, Z.length - 1])), Z;
823
868
  });
824
869
  } finally {
825
- C(!1);
870
+ y(!1);
826
871
  }
827
- }, [h, r, a, l, de, Ce, T, P, ve]), Oe = G(() => {
872
+ }, [p, r, a, l, ue, Ce, V, P, Ee]), De = G(() => {
828
873
  var o;
829
- P(), (o = v.current) == null || o.abort(), I(!1), K(!1), g([]), V(/* @__PURE__ */ new Set()), J(!1), ue(!1);
874
+ P(), (o = E.current) == null || o.abort(), I(!1), X(!1), C([]), T(/* @__PURE__ */ new Set()), Y(!1), de(!1);
830
875
  try {
831
876
  typeof window < "u" && window.localStorage && window.localStorage.removeItem("chatbot-messages");
832
877
  } catch {
833
878
  }
834
879
  R(!1);
835
880
  }, [P]), Le = G(async () => {
836
- var o, y, E;
881
+ var o, w, v;
837
882
  if (!l || l.length === 0) {
838
883
  console.warn("No mql_df data available for PDF download");
839
884
  return;
840
885
  }
841
886
  try {
842
- C(!0), console.log("mql_df data for lead extraction:", l);
843
- const _ = {
887
+ y(!0), console.log("mql_df data for lead extraction:", l);
888
+ const H = {
844
889
  name: ((o = l.find((W) => W.name)) == null ? void 0 : o.name) || "Chat User",
845
- email: ((y = l.find((W) => W.email)) == null ? void 0 : y.email) || "user@example.com",
846
- summary: `Chat conversation with ${c.length} messages. User asked: "${((E = c.find((W) => W.from === "human")) == null ? void 0 : E.text) || "No user messages"}"`
890
+ email: ((w = l.find((W) => W.email)) == null ? void 0 : w.email) || "user@example.com",
891
+ summary: `Chat conversation with ${u.length} messages. User asked: "${((v = u.find((W) => W.from === "human")) == null ? void 0 : v.text) || "No user messages"}"`
847
892
  };
848
- console.log("Extracted lead row:", _), await Xe(l, _, Ce, f), console.log("PDF downloaded successfully");
849
- } catch (_) {
850
- console.error("Failed to download PDF:", _);
893
+ console.log("Extracted lead row:", H), await r2(l, H, Ce, d), console.log("PDF downloaded successfully");
894
+ } catch (H) {
895
+ console.error("Failed to download PDF:", H);
851
896
  } finally {
852
- C(!1);
897
+ y(!1);
853
898
  }
854
- }, [l, c]), Ue = [
899
+ }, [l, u]), Fe = [
855
900
  "sw-ttyw-chatbot",
856
- w,
857
- p,
858
- S ? "sw-ttyw-container-minimized" : te ? "sw-ttyw-container-expanded" : "sw-ttyw-container"
901
+ g,
902
+ m,
903
+ S ? "sw-ttyw-container-minimized" : ee ? "sw-ttyw-container-expanded" : "sw-ttyw-container"
859
904
  ].filter(Boolean).join(" ");
860
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
905
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs(
861
906
  "div",
862
907
  {
863
- className: Ue,
864
- onClick: S ? () => Y(!1) : void 0,
908
+ className: Fe,
909
+ onClick: S ? () => ae(!1) : void 0,
865
910
  children: [
866
- S ? /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-minimized-content", children: /* @__PURE__ */ e.jsxs("svg", { className: "sw-ttyw-chat-icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
867
- /* @__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" }),
868
- /* @__PURE__ */ e.jsx("path", { d: "M8 9H16", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
869
- /* @__PURE__ */ e.jsx("path", { d: "M8 13H12", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
870
- ] }) }) : /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-header", children: [
871
- /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-name", children: t }),
872
- /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-header-actions", children: [
873
- /* @__PURE__ */ e.jsx(
911
+ S ? /* @__PURE__ */ t.jsx("div", { className: "sw-ttyw-minimized-content", children: /* @__PURE__ */ t.jsxs("svg", { className: "sw-ttyw-chat-icon", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
912
+ /* @__PURE__ */ t.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" }),
913
+ /* @__PURE__ */ t.jsx("path", { d: "M8 9H16", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
914
+ /* @__PURE__ */ t.jsx("path", { d: "M8 13H12", stroke: "white", strokeWidth: "2", strokeLinecap: "round" })
915
+ ] }) }) : /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-chat-header", children: [
916
+ /* @__PURE__ */ t.jsx("div", { className: "sw-ttyw-name", children: e }),
917
+ /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-header-actions", children: [
918
+ /* @__PURE__ */ t.jsx(
874
919
  "button",
875
920
  {
876
921
  type: "button",
877
922
  onClick: () => ie((o) => !o),
878
923
  className: "sw-ttyw-header-button",
879
- title: te ? "Shrink chat" : "Expand chat",
880
- children: te ? /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
881
- /* @__PURE__ */ e.jsx("path", { d: "M9 4V9H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
882
- /* @__PURE__ */ e.jsx("path", { d: "M15 4V9H20", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
883
- /* @__PURE__ */ e.jsx("path", { d: "M9 20V15H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
884
- /* @__PURE__ */ e.jsx("path", { d: "M15 20V15H20", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
885
- ] }) : /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
886
- /* @__PURE__ */ e.jsx("path", { d: "M4 9V4H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
887
- /* @__PURE__ */ e.jsx("path", { d: "M20 9V4H15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
888
- /* @__PURE__ */ e.jsx("path", { d: "M4 15V20H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
889
- /* @__PURE__ */ e.jsx("path", { d: "M20 15V20H15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
924
+ title: ee ? "Shrink chat" : "Expand chat",
925
+ children: ee ? /* @__PURE__ */ t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
926
+ /* @__PURE__ */ t.jsx("path", { d: "M9 4V9H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
927
+ /* @__PURE__ */ t.jsx("path", { d: "M15 4V9H20", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
928
+ /* @__PURE__ */ t.jsx("path", { d: "M9 20V15H4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
929
+ /* @__PURE__ */ t.jsx("path", { d: "M15 20V15H20", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
930
+ ] }) : /* @__PURE__ */ t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
931
+ /* @__PURE__ */ t.jsx("path", { d: "M4 9V4H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
932
+ /* @__PURE__ */ t.jsx("path", { d: "M20 9V4H15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
933
+ /* @__PURE__ */ t.jsx("path", { d: "M4 15V20H9", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
934
+ /* @__PURE__ */ t.jsx("path", { d: "M20 15V20H15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
890
935
  ] })
891
936
  }
892
937
  ),
893
- /* @__PURE__ */ e.jsx(
938
+ /* @__PURE__ */ t.jsx(
894
939
  "button",
895
940
  {
896
941
  type: "button",
@@ -899,126 +944,126 @@ function m2({ title: t = "", agentId: r = "", discoveryAgentId: a = "", primaryC
899
944
  const o = k.current;
900
945
  o && (ge.current = o.scrollTop), ie(!1);
901
946
  }
902
- Y(!S);
947
+ ae(!S);
903
948
  },
904
949
  className: "sw-ttyw-header-button",
905
950
  title: S ? "Maximize chat" : "Minimize chat",
906
- 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" }) })
951
+ children: /* @__PURE__ */ t.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ t.jsx("path", { d: "M6 9H18", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
907
952
  }
908
953
  ),
909
- l && l.length > 0 && /* @__PURE__ */ e.jsx(
954
+ l && l.length > 0 && /* @__PURE__ */ t.jsx(
910
955
  "button",
911
956
  {
912
957
  type: "button",
913
958
  onClick: Le,
914
959
  className: "sw-ttyw-header-button",
915
960
  title: "Download PDF Report",
916
- disabled: d,
917
- children: /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
918
- /* @__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" }),
919
- /* @__PURE__ */ e.jsx("path", { d: "M7 10L12 15L17 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
920
- /* @__PURE__ */ e.jsx("path", { d: "M12 15V3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
961
+ disabled: f,
962
+ children: /* @__PURE__ */ t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
963
+ /* @__PURE__ */ t.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" }),
964
+ /* @__PURE__ */ t.jsx("path", { d: "M7 10L12 15L17 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
965
+ /* @__PURE__ */ t.jsx("path", { d: "M12 15V3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
921
966
  ] })
922
967
  }
923
968
  ),
924
- /* @__PURE__ */ e.jsx(
969
+ /* @__PURE__ */ t.jsx(
925
970
  "button",
926
971
  {
927
972
  type: "button",
928
973
  onClick: () => R(!0),
929
974
  className: "sw-ttyw-header-button",
930
975
  title: "Clear chat",
931
- children: /* @__PURE__ */ e.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
932
- /* @__PURE__ */ e.jsx("path", { d: "M3 6H5H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
933
- /* @__PURE__ */ e.jsx("path", { d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
934
- /* @__PURE__ */ e.jsx("path", { d: "M10 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
935
- /* @__PURE__ */ e.jsx("path", { d: "M14 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
976
+ children: /* @__PURE__ */ t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
977
+ /* @__PURE__ */ t.jsx("path", { d: "M3 6H5H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
978
+ /* @__PURE__ */ t.jsx("path", { d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
979
+ /* @__PURE__ */ t.jsx("path", { d: "M10 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
980
+ /* @__PURE__ */ t.jsx("path", { d: "M14 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
936
981
  ] })
937
982
  }
938
983
  )
939
984
  ] })
940
985
  ] }),
941
- !S && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-section sw-ttyw-chat-section-flex", children: [
942
- /* @__PURE__ */ e.jsxs(
986
+ !S && /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-chat-section sw-ttyw-chat-section-flex", children: [
987
+ /* @__PURE__ */ t.jsxs(
943
988
  "div",
944
989
  {
945
990
  className: "sw-ttyw-messages sw-ttyw-chat-section",
946
991
  ref: k,
947
- onScroll: Ne,
992
+ onScroll: Ue,
948
993
  children: [
949
- c.length === 0 && !d && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-empty-state", children: /* @__PURE__ */ e.jsx(
994
+ u.length === 0 && !f && /* @__PURE__ */ t.jsx("div", { className: "sw-ttyw-empty-state", children: /* @__PURE__ */ t.jsx(
950
995
  "img",
951
996
  {
952
- src: Ke,
997
+ src: n2,
953
998
  alt: "Superwise Logo",
954
999
  onError: (o) => {
955
1000
  console.log("Logo failed to load, using fallback"), o.target.classList.add("sw-ttyw-logo-hidden");
956
1001
  }
957
1002
  }
958
1003
  ) }),
959
- c.map((o, y) => /* @__PURE__ */ e.jsx(
960
- h2,
1004
+ u.map((o, w) => /* @__PURE__ */ t.jsx(
1005
+ g2,
961
1006
  {
962
1007
  msg: o,
963
- isTyping: le.has(y),
1008
+ isTyping: le.has(w),
964
1009
  onTypingComplete: () => {
965
- V((E) => {
966
- const _ = new Set(E);
967
- return _.delete(y), _;
1010
+ T((v) => {
1011
+ const H = new Set(v);
1012
+ return H.delete(w), H;
968
1013
  }), requestAnimationFrame(() => F("auto"));
969
1014
  }
970
1015
  },
971
- y
1016
+ w
972
1017
  )),
973
- B && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-validation-message", children: [
974
- /* @__PURE__ */ e.jsx("span", { className: "error-icon", children: "⚠️" }),
975
- /* @__PURE__ */ e.jsx("span", { children: B })
1018
+ B && /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-validation-message", children: [
1019
+ /* @__PURE__ */ t.jsx("span", { className: "error-icon", children: "⚠️" }),
1020
+ /* @__PURE__ */ t.jsx("span", { children: B })
976
1021
  ] }),
977
- X && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-contact-cta", children: /* @__PURE__ */ e.jsxs(
1022
+ J && /* @__PURE__ */ t.jsx("div", { className: "sw-ttyw-contact-cta", children: /* @__PURE__ */ t.jsxs(
978
1023
  "a",
979
1024
  {
980
- href: s,
1025
+ href: n,
981
1026
  target: "_blank",
982
1027
  rel: "noopener noreferrer",
983
1028
  className: "sw-ttyw-cta-button",
984
1029
  children: [
985
- /* @__PURE__ */ e.jsx("span", { className: "sw-ttyw-cta-icon", "aria-hidden": !0, children: "✉" }),
1030
+ /* @__PURE__ */ t.jsx("span", { className: "sw-ttyw-cta-icon", "aria-hidden": !0, children: "✉" }),
986
1031
  "Contact Sales"
987
1032
  ]
988
1033
  }
989
1034
  ) }),
990
- T && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-limit-exceeded", children: [
991
- /* @__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." }),
992
- /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-limit-action-buttons", children: [
993
- /* @__PURE__ */ e.jsxs(
1035
+ V && /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-limit-exceeded", children: [
1036
+ /* @__PURE__ */ t.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." }),
1037
+ /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-limit-action-buttons", children: [
1038
+ /* @__PURE__ */ t.jsxs(
994
1039
  "button",
995
1040
  {
996
1041
  type: "button",
997
1042
  className: "sw-ttyw-limit-download-pdf",
998
1043
  onClick: Le,
999
- disabled: d,
1044
+ disabled: f,
1000
1045
  children: [
1001
- /* @__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: [
1002
- /* @__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" }),
1003
- /* @__PURE__ */ e.jsx("path", { d: "M7 10L12 15L17 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
1004
- /* @__PURE__ */ e.jsx("path", { d: "M12 15V3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
1046
+ /* @__PURE__ */ t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
1047
+ /* @__PURE__ */ t.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" }),
1048
+ /* @__PURE__ */ t.jsx("path", { d: "M7 10L12 15L17 10", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
1049
+ /* @__PURE__ */ t.jsx("path", { d: "M12 15V3", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
1005
1050
  ] }),
1006
1051
  "Download Chat"
1007
1052
  ]
1008
1053
  }
1009
1054
  ),
1010
- /* @__PURE__ */ e.jsxs(
1055
+ /* @__PURE__ */ t.jsxs(
1011
1056
  "button",
1012
1057
  {
1013
1058
  type: "button",
1014
1059
  className: "sw-ttyw-limit-clear-history",
1015
1060
  onClick: () => R(!0),
1016
1061
  children: [
1017
- /* @__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: [
1018
- /* @__PURE__ */ e.jsx("path", { d: "M3 6H5H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
1019
- /* @__PURE__ */ e.jsx("path", { d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
1020
- /* @__PURE__ */ e.jsx("path", { d: "M10 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
1021
- /* @__PURE__ */ e.jsx("path", { d: "M14 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
1062
+ /* @__PURE__ */ t.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": !0, children: [
1063
+ /* @__PURE__ */ t.jsx("path", { d: "M3 6H5H21", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
1064
+ /* @__PURE__ */ t.jsx("path", { d: "M8 6V4C8 3.46957 8.21071 2.96086 8.58579 2.58579C8.96086 2.21071 9.46957 2 10 2H14C14.5304 2 15.0391 2.21071 15.4142 2.58579C15.7893 2.96086 16 3.46957 16 4V6M19 6V20C19 20.5304 18.7893 21.0391 18.4142 21.4142C18.0391 21.7893 17.5304 22 17 22H7C6.46957 22 5.96086 21.7893 5.58579 21.4142C5.21071 21.0391 5 20.5304 5 20V6H19Z", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
1065
+ /* @__PURE__ */ t.jsx("path", { d: "M10 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
1066
+ /* @__PURE__ */ t.jsx("path", { d: "M14 11V17", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
1022
1067
  ] }),
1023
1068
  "Clear History"
1024
1069
  ]
@@ -1026,15 +1071,15 @@ function m2({ title: t = "", agentId: r = "", discoveryAgentId: a = "", primaryC
1026
1071
  )
1027
1072
  ] })
1028
1073
  ] }),
1029
- d && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-message other message-loading", children: [
1030
- /* @__PURE__ */ e.jsx("div", { className: "message-avatar", children: /* @__PURE__ */ e.jsx($e, { width: 20, height: 20 }) }),
1031
- /* @__PURE__ */ e.jsxs("div", { className: "message-content", children: [
1032
- /* @__PURE__ */ e.jsx("div", { className: "typing typing-1" }),
1033
- /* @__PURE__ */ e.jsx("div", { className: "typing typing-2" }),
1034
- /* @__PURE__ */ e.jsx("div", { className: "typing typing-3" })
1074
+ f && /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-message other message-loading", children: [
1075
+ /* @__PURE__ */ t.jsx("div", { className: "message-avatar", children: /* @__PURE__ */ t.jsx(Ve, { width: 20, height: 20 }) }),
1076
+ /* @__PURE__ */ t.jsxs("div", { className: "message-content", children: [
1077
+ /* @__PURE__ */ t.jsx("div", { className: "typing typing-1" }),
1078
+ /* @__PURE__ */ t.jsx("div", { className: "typing typing-2" }),
1079
+ /* @__PURE__ */ t.jsx("div", { className: "typing typing-3" })
1035
1080
  ] })
1036
1081
  ] }),
1037
- !O && /* @__PURE__ */ e.jsx("div", { className: "sw-ttyw-jump-latest", children: /* @__PURE__ */ e.jsx(
1082
+ !O && /* @__PURE__ */ t.jsx("div", { className: "sw-ttyw-jump-latest", children: /* @__PURE__ */ t.jsx(
1038
1083
  "button",
1039
1084
  {
1040
1085
  type: "button",
@@ -1045,31 +1090,31 @@ function m2({ title: t = "", agentId: r = "", discoveryAgentId: a = "", primaryC
1045
1090
  children: "Jump to latest"
1046
1091
  }
1047
1092
  ) }),
1048
- /* @__PURE__ */ e.jsx("div", { ref: Q })
1093
+ /* @__PURE__ */ t.jsx("div", { ref: K })
1049
1094
  ]
1050
1095
  }
1051
1096
  ),
1052
- /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-section", children: [
1053
- /* @__PURE__ */ e.jsx(
1097
+ /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-chat-input-section", children: [
1098
+ /* @__PURE__ */ t.jsx(
1054
1099
  "textarea",
1055
1100
  {
1056
1101
  className: "sw-ttyw-input",
1057
- placeholder: T ? "Chat limit reached." : "Please ask question here",
1058
- value: h,
1102
+ placeholder: V ? "Chat limit reached." : "Please ask question here",
1103
+ value: p,
1059
1104
  onChange: (o) => {
1060
- m(o.target.value), B && N("");
1105
+ c(o.target.value), B && N("");
1061
1106
  },
1062
1107
  maxLength: 1e3,
1063
- disabled: d || T,
1108
+ disabled: f || V,
1064
1109
  onKeyDown: (o) => o.key === "Enter" && !o.shiftKey && (o.preventDefault(), Se())
1065
1110
  }
1066
1111
  ),
1067
- /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-input-content sw-ttyw-input-footer", children: [
1068
- /* @__PURE__ */ e.jsxs("small", { id: "sw-ttyw-chat-textbox-status", className: "sw-ttyw-character-count", children: [
1069
- /* @__PURE__ */ e.jsx("span", { children: h.length }),
1112
+ /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-chat-input-content sw-ttyw-input-footer", children: [
1113
+ /* @__PURE__ */ t.jsxs("small", { id: "sw-ttyw-chat-textbox-status", className: "sw-ttyw-character-count", children: [
1114
+ /* @__PURE__ */ t.jsx("span", { children: p.length }),
1070
1115
  "/1000"
1071
1116
  ] }),
1072
- /* @__PURE__ */ e.jsx(
1117
+ /* @__PURE__ */ t.jsx(
1073
1118
  "button",
1074
1119
  {
1075
1120
  type: "button",
@@ -1077,32 +1122,32 @@ function m2({ title: t = "", agentId: r = "", discoveryAgentId: a = "", primaryC
1077
1122
  className: "sw-ttyw-send-button",
1078
1123
  onClick: Se,
1079
1124
  "aria-label": "Send message",
1080
- disabled: d || T,
1081
- 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: [
1082
- /* @__PURE__ */ e.jsx("path", { d: "M0 0h24v24H0z", fill: "none" }),
1083
- /* @__PURE__ */ e.jsx("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })
1125
+ disabled: f || V,
1126
+ children: /* @__PURE__ */ t.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: [
1127
+ /* @__PURE__ */ t.jsx("path", { d: "M0 0h24v24H0z", fill: "none" }),
1128
+ /* @__PURE__ */ t.jsx("path", { d: "M2.01 21L23 12 2.01 3 2 10l15 2-15 2z" })
1084
1129
  ] })
1085
1130
  }
1086
1131
  )
1087
1132
  ] })
1088
1133
  ] })
1089
1134
  ] }),
1090
- L && /* @__PURE__ */ e.jsxs("div", { className: "swttyw-modal swttyw-modal-clear-history swttyw-modal-overlay", children: [
1091
- /* @__PURE__ */ e.jsx("div", { className: "swtty-modal-header" }),
1092
- /* @__PURE__ */ e.jsxs("div", { className: "swtty-modal-body", children: [
1093
- /* @__PURE__ */ e.jsx("div", { className: "swtty-content", children: "Are you sure you want to delete the chat history?" }),
1094
- /* @__PURE__ */ e.jsxs("div", { className: "swtty-action swtty-modal-actions", children: [
1095
- /* @__PURE__ */ e.jsx(
1135
+ _ && /* @__PURE__ */ t.jsxs("div", { className: "swttyw-modal swttyw-modal-clear-history swttyw-modal-overlay", children: [
1136
+ /* @__PURE__ */ t.jsx("div", { className: "swtty-modal-header" }),
1137
+ /* @__PURE__ */ t.jsxs("div", { className: "swtty-modal-body", children: [
1138
+ /* @__PURE__ */ t.jsx("div", { className: "swtty-content", children: "Are you sure you want to delete the chat history?" }),
1139
+ /* @__PURE__ */ t.jsxs("div", { className: "swtty-action swtty-modal-actions", children: [
1140
+ /* @__PURE__ */ t.jsx(
1096
1141
  "input",
1097
1142
  {
1098
1143
  type: "button",
1099
1144
  className: "swttyw-btn swttyw-btn-primary swttyw-btn-modal-yes",
1100
1145
  id: "swttyw-btn-clear-history-yes",
1101
- onClick: Oe,
1146
+ onClick: De,
1102
1147
  value: "Yes"
1103
1148
  }
1104
1149
  ),
1105
- /* @__PURE__ */ e.jsx(
1150
+ /* @__PURE__ */ t.jsx(
1106
1151
  "input",
1107
1152
  {
1108
1153
  type: "button",
@@ -1114,16 +1159,16 @@ function m2({ title: t = "", agentId: r = "", discoveryAgentId: a = "", primaryC
1114
1159
  )
1115
1160
  ] })
1116
1161
  ] }),
1117
- /* @__PURE__ */ e.jsx("div", { className: "swtty-modal-footer" })
1162
+ /* @__PURE__ */ t.jsx("div", { className: "swtty-modal-footer" })
1118
1163
  ] }),
1119
- !S && /* @__PURE__ */ e.jsxs("div", { className: "sw-ttyw-chat-footer", children: [
1164
+ !S && /* @__PURE__ */ t.jsxs("div", { className: "sw-ttyw-chat-footer", children: [
1120
1165
  "Powered by ",
1121
- /* @__PURE__ */ e.jsx("a", { href: "https://superwise.ai/", className: "ml-1", target: "_new", rel: "noopener noreferrer", "aria-label": "SUPERWISE®", children: /* @__PURE__ */ e.jsx(a2, { height: 20 }) })
1166
+ /* @__PURE__ */ t.jsx("a", { href: "https://superwise.ai/", className: "ml-1", target: "_new", rel: "noopener noreferrer", "aria-label": "SUPERWISE®", children: /* @__PURE__ */ t.jsx(d2, { height: 20 }) })
1122
1167
  ] })
1123
1168
  ]
1124
1169
  }
1125
1170
  ) });
1126
1171
  }
1127
1172
  export {
1128
- m2 as Chatbot
1173
+ x2 as Chatbot
1129
1174
  };