@arbor-education/ask-arbor-chat-panel 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -30
- package/dist/index.cjs +21 -21
- package/dist/index.d.ts +13 -2
- package/dist/index.js +593 -558
- package/dist/style.css +1 -1
- package/dist-iife/ask-arbor-slideover.js +975 -0
- package/dist-iife/ask-arbor-widget.js +975 -0
- package/package.json +7 -5
package/dist/index.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
var Sr = Object.defineProperty;
|
|
2
|
+
var wr = (e, t, r) => t in e ? Sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var Ln = (e, t, r) => wr(e, typeof t != "symbol" ? t + "" : t, r);
|
|
1
4
|
import { jsxs as S, jsx as i, Fragment as we } from "react/jsx-runtime";
|
|
2
|
-
import { Icon as vt, Tag as
|
|
3
|
-
import { useRef as x, useMemo as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
function
|
|
5
|
+
import { Icon as vt, Tag as Nr, Tabs as nn, Table as kr, Slideover as Rr } from "@arbor-education/design-system.components";
|
|
6
|
+
import { useRef as x, useMemo as tr, useEffect as V, useState as M, useContext as Ir, createContext as Cr, forwardRef as Tn, createElement as pn, useImperativeHandle as vr, useLayoutEffect as nr, useCallback as Wt } from "react";
|
|
7
|
+
import { createPortal as rr } from "react-dom";
|
|
8
|
+
function Or(e) {
|
|
6
9
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
10
|
}
|
|
8
|
-
var
|
|
11
|
+
var or = { exports: {} };
|
|
9
12
|
/*!
|
|
10
13
|
Copyright (c) 2018 Jed Watson.
|
|
11
14
|
Licensed under the MIT License (MIT), see
|
|
@@ -13,7 +16,7 @@ var tr = { exports: {} };
|
|
|
13
16
|
*/
|
|
14
17
|
(function(e) {
|
|
15
18
|
(function() {
|
|
16
|
-
var
|
|
19
|
+
var t = {}.hasOwnProperty;
|
|
17
20
|
function r() {
|
|
18
21
|
for (var s = "", u = 0; u < arguments.length; u++) {
|
|
19
22
|
var m = arguments[u];
|
|
@@ -32,7 +35,7 @@ var tr = { exports: {} };
|
|
|
32
35
|
return s.toString();
|
|
33
36
|
var u = "";
|
|
34
37
|
for (var m in s)
|
|
35
|
-
|
|
38
|
+
t.call(s, m) && s[m] && (u = l(u, m));
|
|
36
39
|
return u;
|
|
37
40
|
}
|
|
38
41
|
function l(s, u) {
|
|
@@ -40,16 +43,16 @@ var tr = { exports: {} };
|
|
|
40
43
|
}
|
|
41
44
|
e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
|
|
42
45
|
})();
|
|
43
|
-
})(
|
|
44
|
-
var
|
|
45
|
-
const _e = /* @__PURE__ */
|
|
46
|
-
function
|
|
46
|
+
})(or);
|
|
47
|
+
var Lr = or.exports;
|
|
48
|
+
const _e = /* @__PURE__ */ Or(Lr);
|
|
49
|
+
function Dr(e, t, r, a) {
|
|
47
50
|
var l = this, s = x(null), u = x(0), m = x(0), h = x(null), p = x([]), T = x(), A = x(), _ = x(e), E = x(!0), k = x(), O = x();
|
|
48
51
|
_.current = e;
|
|
49
|
-
var w = typeof window < "u", N = !
|
|
52
|
+
var w = typeof window < "u", N = !t && t !== 0 && w;
|
|
50
53
|
if (typeof e != "function") throw new TypeError("Expected a function");
|
|
51
|
-
|
|
52
|
-
var H = !!(r = r || {}).leading, pe = !("trailing" in r) || !!r.trailing, z = !!r.flushOnExit && pe, K = "maxWait" in r, U = "debounceOnServer" in r && !!r.debounceOnServer, q = K ? Math.max(+r.maxWait || 0,
|
|
54
|
+
t = +t || 0;
|
|
55
|
+
var H = !!(r = r || {}).leading, pe = !("trailing" in r) || !!r.trailing, z = !!r.flushOnExit && pe, K = "maxWait" in r, U = "debounceOnServer" in r && !!r.debounceOnServer, q = K ? Math.max(+r.maxWait || 0, t) : null, me = tr(function() {
|
|
53
56
|
var J = function(D) {
|
|
54
57
|
var W = p.current, he = T.current;
|
|
55
58
|
return p.current = T.current = null, u.current = D, m.current = m.current || D, A.current = _.current.apply(he, W);
|
|
@@ -58,14 +61,14 @@ function Ir(e, n, r, a) {
|
|
|
58
61
|
}, de = function(D) {
|
|
59
62
|
if (!E.current) return !1;
|
|
60
63
|
var W = D - s.current;
|
|
61
|
-
return !s.current || W >=
|
|
64
|
+
return !s.current || W >= t || W < 0 || K && D - u.current >= q;
|
|
62
65
|
}, b = function(D) {
|
|
63
66
|
return h.current = null, pe && p.current ? J(D) : (p.current = T.current = null, A.current);
|
|
64
67
|
}, L = function D() {
|
|
65
68
|
var W = Date.now();
|
|
66
69
|
if (H && m.current === u.current && B(), de(W)) return b(W);
|
|
67
70
|
if (E.current) {
|
|
68
|
-
var he =
|
|
71
|
+
var he = t - (W - s.current), Le = K ? Math.min(he, q - (W - u.current)) : he;
|
|
69
72
|
G(D, Le);
|
|
70
73
|
}
|
|
71
74
|
}, B = function() {
|
|
@@ -76,10 +79,10 @@ function Ir(e, n, r, a) {
|
|
|
76
79
|
var Le;
|
|
77
80
|
((Le = globalThis.document) == null ? void 0 : Le.visibilityState) === "hidden" && O.current.flush();
|
|
78
81
|
}, (D = globalThis.document) == null || D.addEventListener == null || D.addEventListener("visibilitychange", k.current)), he) {
|
|
79
|
-
if (!h.current && E.current) return u.current = s.current, G(L,
|
|
80
|
-
if (K) return G(L,
|
|
82
|
+
if (!h.current && E.current) return u.current = s.current, G(L, t), H ? J(s.current) : A.current;
|
|
83
|
+
if (K) return G(L, t), J(s.current);
|
|
81
84
|
}
|
|
82
|
-
return h.current || G(L,
|
|
85
|
+
return h.current || G(L, t), A.current;
|
|
83
86
|
}
|
|
84
87
|
};
|
|
85
88
|
return re.cancel = function() {
|
|
@@ -90,7 +93,7 @@ function Ir(e, n, r, a) {
|
|
|
90
93
|
}, re.flush = function() {
|
|
91
94
|
return h.current ? b(Date.now()) : A.current;
|
|
92
95
|
}, re;
|
|
93
|
-
}, [H, K,
|
|
96
|
+
}, [H, K, t, q, pe, z, N, w, U, a]);
|
|
94
97
|
return O.current = me, V(function() {
|
|
95
98
|
return E.current = !0, function() {
|
|
96
99
|
var J;
|
|
@@ -98,7 +101,7 @@ function Ir(e, n, r, a) {
|
|
|
98
101
|
};
|
|
99
102
|
}, [z]), me;
|
|
100
103
|
}
|
|
101
|
-
const
|
|
104
|
+
const Mr = () => /* @__PURE__ */ S(
|
|
102
105
|
"svg",
|
|
103
106
|
{
|
|
104
107
|
width: "32",
|
|
@@ -131,13 +134,13 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
131
134
|
)
|
|
132
135
|
]
|
|
133
136
|
}
|
|
134
|
-
),
|
|
137
|
+
), xr = "Enter", Pr = " ", Dn = ({
|
|
135
138
|
category: e,
|
|
136
|
-
isExpanded:
|
|
139
|
+
isExpanded: t,
|
|
137
140
|
onHeaderClick: r
|
|
138
141
|
}) => {
|
|
139
142
|
const a = `ask-arbor-prompt-library__body-${e.id}`, l = (s) => {
|
|
140
|
-
(s.key ===
|
|
143
|
+
(s.key === xr || s.key === Pr) && (s.preventDefault(), r(e.id));
|
|
141
144
|
};
|
|
142
145
|
return /* @__PURE__ */ i(
|
|
143
146
|
"div",
|
|
@@ -146,7 +149,7 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
146
149
|
"ask-arbor-prompt-library__category",
|
|
147
150
|
`ask-arbor-prompt-library__category--${e.theme}`,
|
|
148
151
|
{
|
|
149
|
-
"ask-arbor-prompt-library__category--expanded":
|
|
152
|
+
"ask-arbor-prompt-library__category--expanded": t
|
|
150
153
|
}
|
|
151
154
|
),
|
|
152
155
|
children: /* @__PURE__ */ S(
|
|
@@ -157,9 +160,9 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
157
160
|
onKeyDown: l,
|
|
158
161
|
role: "button",
|
|
159
162
|
tabIndex: 0,
|
|
160
|
-
"aria-expanded":
|
|
163
|
+
"aria-expanded": t,
|
|
161
164
|
"aria-controls": a,
|
|
162
|
-
"aria-label": `${e.title}, ${
|
|
165
|
+
"aria-label": `${e.title}, ${t ? "collapse" : "expand"} to ${t ? "hide" : "show"} prompts`,
|
|
163
166
|
children: [
|
|
164
167
|
/* @__PURE__ */ i("div", { className: "ask-arbor-prompt-library__icon-circle", children: /* @__PURE__ */ i(
|
|
165
168
|
vt,
|
|
@@ -173,9 +176,9 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
173
176
|
/* @__PURE__ */ i(
|
|
174
177
|
vt,
|
|
175
178
|
{
|
|
176
|
-
name:
|
|
179
|
+
name: t ? "chevron-up" : "chevron-down",
|
|
177
180
|
size: 16,
|
|
178
|
-
screenReaderText:
|
|
181
|
+
screenReaderText: t ? "Collapse section" : "Expand section",
|
|
179
182
|
className: "ask-arbor-prompt-library__chevron"
|
|
180
183
|
}
|
|
181
184
|
),
|
|
@@ -185,9 +188,9 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
185
188
|
)
|
|
186
189
|
}
|
|
187
190
|
);
|
|
188
|
-
},
|
|
191
|
+
}, Ur = ({
|
|
189
192
|
onSelectPrompt: e,
|
|
190
|
-
onPromptHover:
|
|
193
|
+
onPromptHover: t,
|
|
191
194
|
categories: r
|
|
192
195
|
}) => {
|
|
193
196
|
const [a, l] = M(
|
|
@@ -204,7 +207,7 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
204
207
|
className: "ask-arbor-prompt-library__grid-item ask-arbor-prompt-library__grid-item--full-width",
|
|
205
208
|
children: /* @__PURE__ */ S("div", { className: "ask-arbor-prompt-library__expanded-block", children: [
|
|
206
209
|
/* @__PURE__ */ i(
|
|
207
|
-
|
|
210
|
+
Dn,
|
|
208
211
|
{
|
|
209
212
|
category: _,
|
|
210
213
|
isExpanded: !0,
|
|
@@ -223,15 +226,15 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
223
226
|
{
|
|
224
227
|
className: "ask-arbor-prompt-library__prompt-group",
|
|
225
228
|
children: [
|
|
226
|
-
/* @__PURE__ */ i(
|
|
229
|
+
/* @__PURE__ */ i(Nr, { color: _.theme, children: E.tag }),
|
|
227
230
|
/* @__PURE__ */ i("div", { className: "ask-arbor-prompt-library__prompts", children: E.prompts.map((k, O) => /* @__PURE__ */ S(
|
|
228
231
|
"button",
|
|
229
232
|
{
|
|
230
233
|
type: "button",
|
|
231
234
|
className: "ask-arbor-prompt-library__prompt-row",
|
|
232
235
|
onClick: (w) => u(w, k),
|
|
233
|
-
onMouseEnter: () =>
|
|
234
|
-
onMouseLeave: () =>
|
|
236
|
+
onMouseEnter: () => t == null ? void 0 : t(k),
|
|
237
|
+
onMouseLeave: () => t == null ? void 0 : t(null),
|
|
235
238
|
children: [
|
|
236
239
|
/* @__PURE__ */ i("span", { className: "ask-arbor-prompt-library__prompt-text", children: k }),
|
|
237
240
|
/* @__PURE__ */ i(
|
|
@@ -256,7 +259,7 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
256
259
|
},
|
|
257
260
|
_.id
|
|
258
261
|
), T = (_) => /* @__PURE__ */ i("div", { className: "ask-arbor-prompt-library__grid-item", children: /* @__PURE__ */ i(
|
|
259
|
-
|
|
262
|
+
Dn,
|
|
260
263
|
{
|
|
261
264
|
category: _,
|
|
262
265
|
isExpanded: !1,
|
|
@@ -282,23 +285,23 @@ const Cr = () => /* @__PURE__ */ S(
|
|
|
282
285
|
* This source code is licensed under the ISC license.
|
|
283
286
|
* See the LICENSE file in the root directory of this source tree.
|
|
284
287
|
*/
|
|
285
|
-
const
|
|
288
|
+
const ar = (...e) => e.filter((t, r, a) => !!t && t.trim() !== "" && a.indexOf(t) === r).join(" ").trim();
|
|
286
289
|
/**
|
|
287
290
|
* @license lucide-react v1.21.0 - ISC
|
|
288
291
|
*
|
|
289
292
|
* This source code is licensed under the ISC license.
|
|
290
293
|
* See the LICENSE file in the root directory of this source tree.
|
|
291
294
|
*/
|
|
292
|
-
const
|
|
295
|
+
const Fr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
293
296
|
/**
|
|
294
297
|
* @license lucide-react v1.21.0 - ISC
|
|
295
298
|
*
|
|
296
299
|
* This source code is licensed under the ISC license.
|
|
297
300
|
* See the LICENSE file in the root directory of this source tree.
|
|
298
301
|
*/
|
|
299
|
-
const
|
|
302
|
+
const Hr = (e) => e.replace(
|
|
300
303
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
301
|
-
(
|
|
304
|
+
(t, r, a) => a ? a.toUpperCase() : r.toLowerCase()
|
|
302
305
|
);
|
|
303
306
|
/**
|
|
304
307
|
* @license lucide-react v1.21.0 - ISC
|
|
@@ -306,9 +309,9 @@ const Mr = (e) => e.replace(
|
|
|
306
309
|
* This source code is licensed under the ISC license.
|
|
307
310
|
* See the LICENSE file in the root directory of this source tree.
|
|
308
311
|
*/
|
|
309
|
-
const
|
|
310
|
-
const
|
|
311
|
-
return
|
|
312
|
+
const Mn = (e) => {
|
|
313
|
+
const t = Hr(e);
|
|
314
|
+
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
312
315
|
};
|
|
313
316
|
/**
|
|
314
317
|
* @license lucide-react v1.21.0 - ISC
|
|
@@ -333,31 +336,31 @@ var rn = {
|
|
|
333
336
|
* This source code is licensed under the ISC license.
|
|
334
337
|
* See the LICENSE file in the root directory of this source tree.
|
|
335
338
|
*/
|
|
336
|
-
const
|
|
337
|
-
for (const
|
|
338
|
-
if (
|
|
339
|
+
const zr = (e) => {
|
|
340
|
+
for (const t in e)
|
|
341
|
+
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
339
342
|
return !0;
|
|
340
343
|
return !1;
|
|
341
|
-
},
|
|
342
|
-
({ color: e, size:
|
|
344
|
+
}, Gr = Cr({}), Br = () => Ir(Gr), Wr = Tn(
|
|
345
|
+
({ color: e, size: t, strokeWidth: r, absoluteStrokeWidth: a, className: l = "", children: s, iconNode: u, ...m }, h) => {
|
|
343
346
|
const {
|
|
344
347
|
size: p = 24,
|
|
345
348
|
strokeWidth: T = 2,
|
|
346
349
|
absoluteStrokeWidth: A = !1,
|
|
347
350
|
color: _ = "currentColor",
|
|
348
351
|
className: E = ""
|
|
349
|
-
} =
|
|
352
|
+
} = Br() ?? {}, k = a ?? A ? Number(r ?? T) * 24 / Number(t ?? p) : r ?? T;
|
|
350
353
|
return pn(
|
|
351
354
|
"svg",
|
|
352
355
|
{
|
|
353
356
|
ref: h,
|
|
354
357
|
...rn,
|
|
355
|
-
width:
|
|
356
|
-
height:
|
|
358
|
+
width: t ?? p ?? rn.width,
|
|
359
|
+
height: t ?? p ?? rn.height,
|
|
357
360
|
stroke: e ?? _,
|
|
358
361
|
strokeWidth: k,
|
|
359
|
-
className:
|
|
360
|
-
...!s && !
|
|
362
|
+
className: ar("lucide", E, l),
|
|
363
|
+
...!s && !zr(m) && { "aria-hidden": "true" },
|
|
361
364
|
...m
|
|
362
365
|
},
|
|
363
366
|
[
|
|
@@ -373,20 +376,20 @@ const xr = (e) => {
|
|
|
373
376
|
* This source code is licensed under the ISC license.
|
|
374
377
|
* See the LICENSE file in the root directory of this source tree.
|
|
375
378
|
*/
|
|
376
|
-
const Oe = (e,
|
|
379
|
+
const Oe = (e, t) => {
|
|
377
380
|
const r = Tn(
|
|
378
|
-
({ className: a, ...l }, s) => pn(
|
|
381
|
+
({ className: a, ...l }, s) => pn(Wr, {
|
|
379
382
|
ref: s,
|
|
380
|
-
iconNode:
|
|
381
|
-
className:
|
|
382
|
-
`lucide-${
|
|
383
|
+
iconNode: t,
|
|
384
|
+
className: ar(
|
|
385
|
+
`lucide-${Fr(Mn(e))}`,
|
|
383
386
|
`lucide-${e}`,
|
|
384
387
|
a
|
|
385
388
|
),
|
|
386
389
|
...l
|
|
387
390
|
})
|
|
388
391
|
);
|
|
389
|
-
return r.displayName =
|
|
392
|
+
return r.displayName = Mn(e), r;
|
|
390
393
|
};
|
|
391
394
|
/**
|
|
392
395
|
* @license lucide-react v1.21.0 - ISC
|
|
@@ -394,76 +397,76 @@ const Oe = (e, n) => {
|
|
|
394
397
|
* This source code is licensed under the ISC license.
|
|
395
398
|
* See the LICENSE file in the root directory of this source tree.
|
|
396
399
|
*/
|
|
397
|
-
const
|
|
400
|
+
const $r = [
|
|
398
401
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
399
402
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
400
|
-
],
|
|
403
|
+
], Yr = Oe("arrow-right", $r);
|
|
401
404
|
/**
|
|
402
405
|
* @license lucide-react v1.21.0 - ISC
|
|
403
406
|
*
|
|
404
407
|
* This source code is licensed under the ISC license.
|
|
405
408
|
* See the LICENSE file in the root directory of this source tree.
|
|
406
409
|
*/
|
|
407
|
-
const
|
|
410
|
+
const jr = [
|
|
408
411
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
409
412
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
410
413
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
411
|
-
],
|
|
414
|
+
], Kr = Oe("circle-alert", jr);
|
|
412
415
|
/**
|
|
413
416
|
* @license lucide-react v1.21.0 - ISC
|
|
414
417
|
*
|
|
415
418
|
* This source code is licensed under the ISC license.
|
|
416
419
|
* See the LICENSE file in the root directory of this source tree.
|
|
417
420
|
*/
|
|
418
|
-
const
|
|
421
|
+
const Vr = [
|
|
419
422
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
420
423
|
["path", { d: "M16 16s-1.5-2-4-2-4 2-4 2", key: "epbg0q" }],
|
|
421
424
|
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
422
425
|
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
423
|
-
],
|
|
426
|
+
], qr = Oe("frown", Vr);
|
|
424
427
|
/**
|
|
425
428
|
* @license lucide-react v1.21.0 - ISC
|
|
426
429
|
*
|
|
427
430
|
* This source code is licensed under the ISC license.
|
|
428
431
|
* See the LICENSE file in the root directory of this source tree.
|
|
429
432
|
*/
|
|
430
|
-
const
|
|
433
|
+
const Xr = [
|
|
431
434
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
432
435
|
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
433
436
|
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
434
|
-
],
|
|
437
|
+
], Zr = Oe("info", Xr);
|
|
435
438
|
/**
|
|
436
439
|
* @license lucide-react v1.21.0 - ISC
|
|
437
440
|
*
|
|
438
441
|
* This source code is licensed under the ISC license.
|
|
439
442
|
* See the LICENSE file in the root directory of this source tree.
|
|
440
443
|
*/
|
|
441
|
-
const
|
|
444
|
+
const Jr = [
|
|
442
445
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
443
446
|
["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
|
|
444
447
|
["path", { d: "M16.95 16.95A7 7 0 0 1 5 12v-2", key: "cqa7eg" }],
|
|
445
448
|
["path", { d: "M18.89 13.23A7 7 0 0 0 19 12v-2", key: "16hl24" }],
|
|
446
449
|
["path", { d: "m2 2 20 20", key: "1ooewy" }],
|
|
447
450
|
["path", { d: "M9 9v3a3 3 0 0 0 5.12 2.12", key: "r2i35w" }]
|
|
448
|
-
],
|
|
451
|
+
], Qr = Oe("mic-off", Jr);
|
|
449
452
|
/**
|
|
450
453
|
* @license lucide-react v1.21.0 - ISC
|
|
451
454
|
*
|
|
452
455
|
* This source code is licensed under the ISC license.
|
|
453
456
|
* See the LICENSE file in the root directory of this source tree.
|
|
454
457
|
*/
|
|
455
|
-
const
|
|
458
|
+
const eo = [
|
|
456
459
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
457
460
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
|
|
458
461
|
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
|
|
459
|
-
],
|
|
462
|
+
], to = Oe("mic", eo);
|
|
460
463
|
/**
|
|
461
464
|
* @license lucide-react v1.21.0 - ISC
|
|
462
465
|
*
|
|
463
466
|
* This source code is licensed under the ISC license.
|
|
464
467
|
* See the LICENSE file in the root directory of this source tree.
|
|
465
468
|
*/
|
|
466
|
-
const
|
|
469
|
+
const no = [
|
|
467
470
|
[
|
|
468
471
|
"path",
|
|
469
472
|
{
|
|
@@ -472,26 +475,26 @@ const Zr = [
|
|
|
472
475
|
}
|
|
473
476
|
],
|
|
474
477
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
475
|
-
],
|
|
478
|
+
], ro = Oe("settings", no);
|
|
476
479
|
/**
|
|
477
480
|
* @license lucide-react v1.21.0 - ISC
|
|
478
481
|
*
|
|
479
482
|
* This source code is licensed under the ISC license.
|
|
480
483
|
* See the LICENSE file in the root directory of this source tree.
|
|
481
484
|
*/
|
|
482
|
-
const
|
|
485
|
+
const oo = [
|
|
483
486
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
484
487
|
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
|
|
485
488
|
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
486
489
|
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
487
|
-
],
|
|
490
|
+
], ao = Oe("smile", oo);
|
|
488
491
|
/**
|
|
489
492
|
* @license lucide-react v1.21.0 - ISC
|
|
490
493
|
*
|
|
491
494
|
* This source code is licensed under the ISC license.
|
|
492
495
|
* See the LICENSE file in the root directory of this source tree.
|
|
493
496
|
*/
|
|
494
|
-
const
|
|
497
|
+
const so = [
|
|
495
498
|
[
|
|
496
499
|
"path",
|
|
497
500
|
{
|
|
@@ -501,27 +504,27 @@ const to = [
|
|
|
501
504
|
],
|
|
502
505
|
["path", { d: "M12 9v4", key: "juzpu7" }],
|
|
503
506
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
504
|
-
],
|
|
507
|
+
], io = Oe("triangle-alert", so);
|
|
505
508
|
/**
|
|
506
509
|
* @license lucide-react v1.21.0 - ISC
|
|
507
510
|
*
|
|
508
511
|
* This source code is licensed under the ISC license.
|
|
509
512
|
* See the LICENSE file in the root directory of this source tree.
|
|
510
513
|
*/
|
|
511
|
-
const
|
|
514
|
+
const co = [
|
|
512
515
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
513
516
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
514
|
-
],
|
|
515
|
-
function
|
|
516
|
-
if (
|
|
517
|
-
|
|
517
|
+
], lo = Oe("x", co);
|
|
518
|
+
function uo(e, t) {
|
|
519
|
+
if (t) {
|
|
520
|
+
t(e);
|
|
518
521
|
return;
|
|
519
522
|
}
|
|
520
523
|
/^https?:\/\//.test(e) ? window.open(e, "_blank", "noopener,noreferrer") : window.location.href = e;
|
|
521
524
|
}
|
|
522
|
-
const
|
|
525
|
+
const sr = ({
|
|
523
526
|
isOpen: e,
|
|
524
|
-
onClose:
|
|
527
|
+
onClose: t,
|
|
525
528
|
anchorRef: r,
|
|
526
529
|
items: a,
|
|
527
530
|
onNavigate: l,
|
|
@@ -531,14 +534,14 @@ const rr = ({
|
|
|
531
534
|
return V(() => {
|
|
532
535
|
if (!e) return;
|
|
533
536
|
const m = (p) => {
|
|
534
|
-
u.current && !u.current.contains(p.target) && r.current && !r.current.contains(p.target) &&
|
|
537
|
+
u.current && !u.current.contains(p.target) && r.current && !r.current.contains(p.target) && t();
|
|
535
538
|
}, h = (p) => {
|
|
536
|
-
p.key === "Escape" &&
|
|
539
|
+
p.key === "Escape" && t();
|
|
537
540
|
};
|
|
538
541
|
return document.addEventListener("mousedown", m), document.addEventListener("keydown", h), () => {
|
|
539
542
|
document.removeEventListener("mousedown", m), document.removeEventListener("keydown", h);
|
|
540
543
|
};
|
|
541
|
-
}, [e,
|
|
544
|
+
}, [e, t, r]), e ? /* @__PURE__ */ i(
|
|
542
545
|
"div",
|
|
543
546
|
{
|
|
544
547
|
ref: u,
|
|
@@ -552,7 +555,7 @@ const rr = ({
|
|
|
552
555
|
className: "ask-arbor-settings__item",
|
|
553
556
|
role: "menuitem",
|
|
554
557
|
onClick: (p) => {
|
|
555
|
-
p.preventDefault(),
|
|
558
|
+
p.preventDefault(), t(), uo(m.url, l);
|
|
556
559
|
},
|
|
557
560
|
children: [
|
|
558
561
|
m.icon,
|
|
@@ -564,15 +567,15 @@ const rr = ({
|
|
|
564
567
|
}
|
|
565
568
|
) : null;
|
|
566
569
|
};
|
|
567
|
-
|
|
568
|
-
function
|
|
569
|
-
const
|
|
570
|
-
return `${
|
|
570
|
+
sr.displayName = "AskArborSettings";
|
|
571
|
+
function fo(e) {
|
|
572
|
+
const t = Math.floor(e / 60), r = e % 60;
|
|
573
|
+
return `${t}:${r.toString().padStart(2, "0")}`;
|
|
571
574
|
}
|
|
572
|
-
const
|
|
575
|
+
const ir = Tn(
|
|
573
576
|
({
|
|
574
577
|
value: e,
|
|
575
|
-
onChange:
|
|
578
|
+
onChange: t,
|
|
576
579
|
onKeyDown: r,
|
|
577
580
|
placeholder: a = "Explain what you need in your own words...",
|
|
578
581
|
onSubmit: l,
|
|
@@ -599,8 +602,8 @@ const or = Tn(
|
|
|
599
602
|
z((de) => de + 1);
|
|
600
603
|
}, 1e3);
|
|
601
604
|
return () => clearInterval(G);
|
|
602
|
-
}, [A]),
|
|
603
|
-
const q = !T && !A && e.trim().length > 0, me = A, J =
|
|
605
|
+
}, [A]), vr(w, () => N.current);
|
|
606
|
+
const q = !T && !A && e.trim().length > 0, me = A, J = tr(
|
|
604
607
|
() => (h ?? []).map((G) => ({
|
|
605
608
|
label: G.label,
|
|
606
609
|
icon: /* @__PURE__ */ i(
|
|
@@ -622,7 +625,7 @@ const or = Tn(
|
|
|
622
625
|
ref: N,
|
|
623
626
|
className: "ask-arbor-input__textarea",
|
|
624
627
|
value: e,
|
|
625
|
-
onChange: (G) =>
|
|
628
|
+
onChange: (G) => t(G.target.value),
|
|
626
629
|
onKeyDown: r,
|
|
627
630
|
placeholder: A ? "" : a,
|
|
628
631
|
"aria-label": E,
|
|
@@ -633,7 +636,7 @@ const or = Tn(
|
|
|
633
636
|
}
|
|
634
637
|
) }),
|
|
635
638
|
/* @__PURE__ */ i("div", { className: "ask-arbor-input__bottom-actions", children: /* @__PURE__ */ S("div", { className: "ask-arbor-input__actions-right", children: [
|
|
636
|
-
A && /* @__PURE__ */ i("span", { className: "ask-arbor-input__timer", children:
|
|
639
|
+
A && /* @__PURE__ */ i("span", { className: "ask-arbor-input__timer", children: fo(pe) }),
|
|
637
640
|
J.length > 0 && /* @__PURE__ */ S("div", { className: "ask-arbor-input__settings-wrap", children: [
|
|
638
641
|
/* @__PURE__ */ i(
|
|
639
642
|
"button",
|
|
@@ -656,7 +659,7 @@ const or = Tn(
|
|
|
656
659
|
"aria-expanded": K,
|
|
657
660
|
"aria-haspopup": "menu",
|
|
658
661
|
children: /* @__PURE__ */ i(
|
|
659
|
-
|
|
662
|
+
ro,
|
|
660
663
|
{
|
|
661
664
|
size: 12,
|
|
662
665
|
stroke: "#000000"
|
|
@@ -665,7 +668,7 @@ const or = Tn(
|
|
|
665
668
|
}
|
|
666
669
|
),
|
|
667
670
|
/* @__PURE__ */ i(
|
|
668
|
-
|
|
671
|
+
sr,
|
|
669
672
|
{
|
|
670
673
|
isOpen: K,
|
|
671
674
|
onClose: () => U(!1),
|
|
@@ -686,7 +689,7 @@ const or = Tn(
|
|
|
686
689
|
onClick: u,
|
|
687
690
|
"aria-label": "speak with agent",
|
|
688
691
|
disabled: A || T,
|
|
689
|
-
children: /* @__PURE__ */ i(
|
|
692
|
+
children: /* @__PURE__ */ i(to, { size: 12, stroke: "#3C3735" })
|
|
690
693
|
}
|
|
691
694
|
),
|
|
692
695
|
me && m ? /* @__PURE__ */ S(
|
|
@@ -697,7 +700,7 @@ const or = Tn(
|
|
|
697
700
|
onClick: m,
|
|
698
701
|
"aria-label": "Stop",
|
|
699
702
|
children: [
|
|
700
|
-
/* @__PURE__ */ i(
|
|
703
|
+
/* @__PURE__ */ i(Qr, { size: 12, stroke: "#FFFFFF" }),
|
|
701
704
|
"Stop"
|
|
702
705
|
]
|
|
703
706
|
}
|
|
@@ -710,7 +713,7 @@ const or = Tn(
|
|
|
710
713
|
disabled: !q,
|
|
711
714
|
"aria-label": "submit message",
|
|
712
715
|
children: /* @__PURE__ */ i(
|
|
713
|
-
|
|
716
|
+
Yr,
|
|
714
717
|
{
|
|
715
718
|
size: 12,
|
|
716
719
|
stroke: "#FFFFFF",
|
|
@@ -725,10 +728,10 @@ const or = Tn(
|
|
|
725
728
|
] });
|
|
726
729
|
}
|
|
727
730
|
);
|
|
728
|
-
|
|
729
|
-
const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on = "up",
|
|
731
|
+
ir.displayName = "AskArborInput";
|
|
732
|
+
const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on = "up", xn = "down", Pn = 10, po = ({
|
|
730
733
|
message: e,
|
|
731
|
-
onRate:
|
|
734
|
+
onRate: t,
|
|
732
735
|
upRatingPopupUrl: r,
|
|
733
736
|
downRatingPopupUrl: a,
|
|
734
737
|
onRatingPopupOpen: l
|
|
@@ -737,7 +740,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
737
740
|
const T = p === on ? r : a;
|
|
738
741
|
T != null && T.trim() && (l ? l(T.trim()) : window.open(T.trim(), "_blank", "noopener,noreferrer"));
|
|
739
742
|
}, h = (p) => {
|
|
740
|
-
u(p),
|
|
743
|
+
u(p), t(p), m(p);
|
|
741
744
|
};
|
|
742
745
|
return /* @__PURE__ */ S("div", { className: "chat-message__feedback", children: [
|
|
743
746
|
/* @__PURE__ */ i("span", { className: "chat-message__feedback-question", children: "How did Ask Arbor do?" }),
|
|
@@ -758,9 +761,9 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
758
761
|
onClick: () => h(on),
|
|
759
762
|
children: [
|
|
760
763
|
/* @__PURE__ */ i(
|
|
761
|
-
|
|
764
|
+
ao,
|
|
762
765
|
{
|
|
763
|
-
size:
|
|
766
|
+
size: Pn,
|
|
764
767
|
strokeWidth: 1.5,
|
|
765
768
|
className: "chat-message__feedback-button-icon",
|
|
766
769
|
"aria-hidden": !0
|
|
@@ -780,15 +783,15 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
780
783
|
"chat-message__feedback-button",
|
|
781
784
|
"chat-message__feedback-button--down",
|
|
782
785
|
{
|
|
783
|
-
"chat-message__feedback-button--selected": s ===
|
|
786
|
+
"chat-message__feedback-button--selected": s === xn
|
|
784
787
|
}
|
|
785
788
|
),
|
|
786
|
-
onClick: () => h(
|
|
789
|
+
onClick: () => h(xn),
|
|
787
790
|
children: [
|
|
788
791
|
/* @__PURE__ */ i(
|
|
789
|
-
|
|
792
|
+
qr,
|
|
790
793
|
{
|
|
791
|
-
size:
|
|
794
|
+
size: Pn,
|
|
792
795
|
strokeWidth: 1.5,
|
|
793
796
|
className: "chat-message__feedback-button-icon",
|
|
794
797
|
"aria-hidden": !0
|
|
@@ -800,9 +803,9 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
800
803
|
)
|
|
801
804
|
] })
|
|
802
805
|
] });
|
|
803
|
-
},
|
|
806
|
+
}, mo = ({
|
|
804
807
|
id: e,
|
|
805
|
-
text:
|
|
808
|
+
text: t,
|
|
806
809
|
type: r,
|
|
807
810
|
onRate: a,
|
|
808
811
|
ratingPopupUrls: l = {},
|
|
@@ -828,7 +831,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
828
831
|
}),
|
|
829
832
|
children: [
|
|
830
833
|
r === mn && /* @__PURE__ */ i(
|
|
831
|
-
|
|
834
|
+
Zr,
|
|
832
835
|
{
|
|
833
836
|
className: "chat-message__icon",
|
|
834
837
|
"aria-label": "Information",
|
|
@@ -836,7 +839,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
836
839
|
}
|
|
837
840
|
),
|
|
838
841
|
r === Kt && /* @__PURE__ */ i(
|
|
839
|
-
|
|
842
|
+
io,
|
|
840
843
|
{
|
|
841
844
|
className: "chat-message__icon",
|
|
842
845
|
"aria-label": "Warning",
|
|
@@ -844,7 +847,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
844
847
|
}
|
|
845
848
|
),
|
|
846
849
|
r === ve && /* @__PURE__ */ i(
|
|
847
|
-
|
|
850
|
+
Kr,
|
|
848
851
|
{
|
|
849
852
|
className: "chat-message__icon",
|
|
850
853
|
"aria-label": "Error",
|
|
@@ -855,7 +858,7 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
855
858
|
"span",
|
|
856
859
|
{
|
|
857
860
|
dangerouslySetInnerHTML: {
|
|
858
|
-
__html: p(
|
|
861
|
+
__html: p(t)
|
|
859
862
|
}
|
|
860
863
|
}
|
|
861
864
|
)
|
|
@@ -864,11 +867,11 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
864
867
|
),
|
|
865
868
|
E && /* @__PURE__ */ S("div", { className: "chat-message__footer-actions", children: [
|
|
866
869
|
/* @__PURE__ */ i("div", { className: "chat-message__footer-icons", children: u && a && s && /* @__PURE__ */ i(
|
|
867
|
-
|
|
870
|
+
po,
|
|
868
871
|
{
|
|
869
872
|
upRatingPopupUrl: l.up,
|
|
870
873
|
downRatingPopupUrl: l.down,
|
|
871
|
-
message: { id: e, type: r, text:
|
|
874
|
+
message: { id: e, type: r, text: t },
|
|
872
875
|
onRate: (O) => a(O, e),
|
|
873
876
|
onRatingPopupOpen: A
|
|
874
877
|
}
|
|
@@ -904,19 +907,19 @@ const jt = "AGENT", ht = "USER", mn = "INFO", Kt = "WARNING", ve = "ERROR", on =
|
|
|
904
907
|
children: E ? /* @__PURE__ */ i("div", { className: "chat-message-container__content", children: k }) : k
|
|
905
908
|
}
|
|
906
909
|
);
|
|
907
|
-
},
|
|
908
|
-
function
|
|
909
|
-
let e = document.getElementById(
|
|
910
|
-
return e || (e = document.createElement("div"), e.id =
|
|
910
|
+
}, ho = "Not authorised. Your session could have expired or is invalid. Please refresh the page and try again.", _o = "You do not have permission to use this feature. Please contact your administrator if you need access.", go = "The chat service could not be found. Please check your configuration and try again.", bo = "It looks like this request took too long to complete. Please try again.", yo = "Whoops! Too many requests. Please wait a moment and try again.", To = "The chat service is temporarily unavailable. Please try again later.", Eo = "Unable to reach the chat service. Please check your connection and try again.", cr = "Something went wrong. Please try again later.", Ao = "Something went wrong while trying to get a new agent message. Please try again later.", Un = "keyboard-shortcut-menu-portal";
|
|
911
|
+
function So() {
|
|
912
|
+
let e = document.getElementById(Un);
|
|
913
|
+
return e || (e = document.createElement("div"), e.id = Un, e.style.cssText = "position:fixed;left:0;top:0;z-index:19950;pointer-events:none;", document.body.appendChild(e)), e;
|
|
911
914
|
}
|
|
912
915
|
const Vt = 200;
|
|
913
|
-
function
|
|
914
|
-
const
|
|
916
|
+
function wo(e) {
|
|
917
|
+
const t = window.innerHeight, r = e.top + e.height > t - Vt, a = e.top < Vt;
|
|
915
918
|
return r ? "above" : a ? "below" : "above";
|
|
916
919
|
}
|
|
917
|
-
function
|
|
918
|
-
const
|
|
919
|
-
return
|
|
920
|
+
function No(e) {
|
|
921
|
+
const t = wo(e), r = 8;
|
|
922
|
+
return t === "below" ? {
|
|
920
923
|
left: e.left,
|
|
921
924
|
width: e.width,
|
|
922
925
|
top: e.bottom + r,
|
|
@@ -928,26 +931,26 @@ function To(e) {
|
|
|
928
931
|
placement: "above"
|
|
929
932
|
};
|
|
930
933
|
}
|
|
931
|
-
function
|
|
932
|
-
if (
|
|
933
|
-
|
|
934
|
+
function Fn(e, t) {
|
|
935
|
+
if (t) {
|
|
936
|
+
t(e);
|
|
934
937
|
return;
|
|
935
938
|
}
|
|
936
939
|
/^https?:\/\//.test(e) ? window.open(e, "_blank", "noopener,noreferrer") : window.location.href = e;
|
|
937
940
|
}
|
|
938
|
-
const
|
|
941
|
+
const ko = ({
|
|
939
942
|
anchorRef: e,
|
|
940
|
-
...
|
|
943
|
+
...t
|
|
941
944
|
}) => {
|
|
942
945
|
const [r, a] = M(
|
|
943
946
|
null
|
|
944
947
|
);
|
|
945
|
-
if (
|
|
948
|
+
if (nr(() => {
|
|
946
949
|
const s = () => {
|
|
947
950
|
const p = e.current;
|
|
948
951
|
if (!p) return;
|
|
949
952
|
const T = p.getBoundingClientRect();
|
|
950
|
-
a(
|
|
953
|
+
a(No(T));
|
|
951
954
|
};
|
|
952
955
|
s();
|
|
953
956
|
const u = requestAnimationFrame(() => s()), m = () => s(), h = () => s();
|
|
@@ -961,20 +964,20 @@ const Eo = ({
|
|
|
961
964
|
width: r.width,
|
|
962
965
|
pointerEvents: "auto"
|
|
963
966
|
};
|
|
964
|
-
return r.placement === "below" ? l.top = r.top : l.bottom = r.bottom,
|
|
965
|
-
/* @__PURE__ */ i(
|
|
966
|
-
|
|
967
|
+
return r.placement === "below" ? l.top = r.top : l.bottom = r.bottom, rr(
|
|
968
|
+
/* @__PURE__ */ i(lr, { ...t, portalStyle: l }),
|
|
969
|
+
So()
|
|
967
970
|
);
|
|
968
|
-
},
|
|
971
|
+
}, lr = (e) => {
|
|
969
972
|
const {
|
|
970
|
-
menuItems:
|
|
973
|
+
menuItems: t = [],
|
|
971
974
|
onSelectItem: r,
|
|
972
975
|
onClose: a,
|
|
973
976
|
hideReferenceFromList: l = !1,
|
|
974
977
|
anchorRef: s,
|
|
975
978
|
portalStyle: u,
|
|
976
979
|
onNavigate: m
|
|
977
|
-
} = e, [h, p] = M(0), [T, A] = M(""), [_, E] = M(
|
|
980
|
+
} = e, [h, p] = M(0), [T, A] = M(""), [_, E] = M(t), k = x(null), O = x(null), w = x(null), [N, H] = M(!1), [pe, z] = M(!1), K = u ? u.top != null : N, U = u ? !0 : pe;
|
|
978
981
|
V(() => {
|
|
979
982
|
p(0), A("");
|
|
980
983
|
}, []), V(() => {
|
|
@@ -1003,11 +1006,11 @@ const Eo = ({
|
|
|
1003
1006
|
}
|
|
1004
1007
|
}, [h]), V(() => {
|
|
1005
1008
|
E(
|
|
1006
|
-
T ?
|
|
1009
|
+
T ? t.filter(
|
|
1007
1010
|
(b) => b.reference.toLowerCase().includes(T.toLowerCase()) || b.description.toLowerCase().includes(T.toLowerCase())
|
|
1008
|
-
) :
|
|
1011
|
+
) : t
|
|
1009
1012
|
);
|
|
1010
|
-
}, [T,
|
|
1013
|
+
}, [T, t]);
|
|
1011
1014
|
const q = (b) => {
|
|
1012
1015
|
var L;
|
|
1013
1016
|
r && _[b] && !_[b].link && r(_[b]), a && !((L = _[b]) != null && L.link) && a();
|
|
@@ -1033,7 +1036,7 @@ const Eo = ({
|
|
|
1033
1036
|
b.preventDefault(), p((L) => L > 0 ? L - 1 : 0);
|
|
1034
1037
|
break;
|
|
1035
1038
|
case "Enter":
|
|
1036
|
-
b.preventDefault(), _[h] && (_[h].link ?
|
|
1039
|
+
b.preventDefault(), _[h] && (_[h].link ? Fn(
|
|
1037
1040
|
_[h].link.replace(
|
|
1038
1041
|
/\/\?/g,
|
|
1039
1042
|
""
|
|
@@ -1076,7 +1079,7 @@ const Eo = ({
|
|
|
1076
1079
|
}
|
|
1077
1080
|
),
|
|
1078
1081
|
onClick: (W) => {
|
|
1079
|
-
W.preventDefault(),
|
|
1082
|
+
W.preventDefault(), Fn(D, m), a == null || a();
|
|
1080
1083
|
},
|
|
1081
1084
|
children: re
|
|
1082
1085
|
}
|
|
@@ -1131,7 +1134,7 @@ const Eo = ({
|
|
|
1131
1134
|
onClick: a,
|
|
1132
1135
|
"aria-label": "Close menu",
|
|
1133
1136
|
children: /* @__PURE__ */ i(
|
|
1134
|
-
|
|
1137
|
+
lo,
|
|
1135
1138
|
{
|
|
1136
1139
|
size: 12,
|
|
1137
1140
|
className: "keyboard-shortcut-menu__close-icon"
|
|
@@ -1162,10 +1165,10 @@ const Eo = ({
|
|
|
1162
1165
|
}
|
|
1163
1166
|
);
|
|
1164
1167
|
return s && !u ? /* @__PURE__ */ i(
|
|
1165
|
-
|
|
1168
|
+
ko,
|
|
1166
1169
|
{
|
|
1167
1170
|
anchorRef: s,
|
|
1168
|
-
menuItems:
|
|
1171
|
+
menuItems: t,
|
|
1169
1172
|
onSelectItem: r,
|
|
1170
1173
|
onClose: a,
|
|
1171
1174
|
hideReferenceFromList: e.hideReferenceFromList,
|
|
@@ -1173,7 +1176,7 @@ const Eo = ({
|
|
|
1173
1176
|
onNavigate: m
|
|
1174
1177
|
}
|
|
1175
1178
|
) : u ? /* @__PURE__ */ i("div", { style: u, children: de }) : de;
|
|
1176
|
-
},
|
|
1179
|
+
}, Hn = ({ className: e }) => /* @__PURE__ */ i(
|
|
1177
1180
|
"div",
|
|
1178
1181
|
{
|
|
1179
1182
|
className: _e("loading-spinner", e),
|
|
@@ -1210,7 +1213,7 @@ const Eo = ({
|
|
|
1210
1213
|
)
|
|
1211
1214
|
] })
|
|
1212
1215
|
}
|
|
1213
|
-
),
|
|
1216
|
+
), Ro = 4e3, Io = 500, Co = 8e3, an = [
|
|
1214
1217
|
"I'm working on it…",
|
|
1215
1218
|
"Generating insights…",
|
|
1216
1219
|
"Piecing things together…",
|
|
@@ -1258,9 +1261,9 @@ const Eo = ({
|
|
|
1258
1261
|
"Analysing your query…",
|
|
1259
1262
|
"Analysing results…",
|
|
1260
1263
|
"Working through the details…"
|
|
1261
|
-
],
|
|
1264
|
+
], vo = ({
|
|
1262
1265
|
loadingPhrase: e,
|
|
1263
|
-
showSpinnerAsIcon:
|
|
1266
|
+
showSpinnerAsIcon: t = !0,
|
|
1264
1267
|
showNotifyLaterButton: r = !1,
|
|
1265
1268
|
onNotifyLater: a,
|
|
1266
1269
|
onNotificationRegisteredGotIt: l
|
|
@@ -1275,7 +1278,7 @@ const Eo = ({
|
|
|
1275
1278
|
return;
|
|
1276
1279
|
const N = setTimeout(() => {
|
|
1277
1280
|
_(!0);
|
|
1278
|
-
},
|
|
1281
|
+
}, Co);
|
|
1279
1282
|
return () => {
|
|
1280
1283
|
clearTimeout(N);
|
|
1281
1284
|
};
|
|
@@ -1296,8 +1299,8 @@ const Eo = ({
|
|
|
1296
1299
|
H = s();
|
|
1297
1300
|
while (H === u.current);
|
|
1298
1301
|
u.current = H, h(an[H]), T("fade-in");
|
|
1299
|
-
},
|
|
1300
|
-
},
|
|
1302
|
+
}, Io);
|
|
1303
|
+
}, Ro), () => {
|
|
1301
1304
|
N && clearInterval(N);
|
|
1302
1305
|
};
|
|
1303
1306
|
}, [e]), /* @__PURE__ */ S(
|
|
@@ -1308,7 +1311,7 @@ const Eo = ({
|
|
|
1308
1311
|
"data-testid": "loading-widget",
|
|
1309
1312
|
children: [
|
|
1310
1313
|
/* @__PURE__ */ S("div", { className: "chat-panel__loading-content", children: [
|
|
1311
|
-
|
|
1314
|
+
t ? /* @__PURE__ */ i(Hn, { className: "chat-panel__loading-spinner" }) : /* @__PURE__ */ i("span", { className: "chat-panel__loading-spinner-container", children: /* @__PURE__ */ i(Hn, { className: "chat-panel__loading-spinner" }) }),
|
|
1312
1315
|
/* @__PURE__ */ i("span", { className: `chat-panel__loading-phrase ${p}`, children: m })
|
|
1313
1316
|
] }),
|
|
1314
1317
|
r && a && A && /* @__PURE__ */ i("div", { className: "chat-panel__notify-later", children: E ? /* @__PURE__ */ S(we, { children: [
|
|
@@ -1340,45 +1343,45 @@ const Eo = ({
|
|
|
1340
1343
|
}
|
|
1341
1344
|
);
|
|
1342
1345
|
};
|
|
1343
|
-
function
|
|
1346
|
+
function Oo(e) {
|
|
1344
1347
|
V(e, []);
|
|
1345
1348
|
}
|
|
1346
|
-
function
|
|
1349
|
+
function Lo() {
|
|
1347
1350
|
const e = x(!1);
|
|
1348
1351
|
return V(() => (e.current = !0, () => {
|
|
1349
1352
|
e.current = !1;
|
|
1350
1353
|
}), []), e;
|
|
1351
1354
|
}
|
|
1352
|
-
function
|
|
1355
|
+
function Do() {
|
|
1353
1356
|
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).substring(2) + Date.now().toString(36);
|
|
1354
1357
|
}
|
|
1355
|
-
function
|
|
1358
|
+
function Mo(e, t = 0) {
|
|
1356
1359
|
if (typeof e == "number" && e > 0) return e;
|
|
1357
1360
|
if (typeof e == "string") {
|
|
1358
1361
|
const r = parseInt(e, 10);
|
|
1359
1362
|
if (!isNaN(r) && r > 0) return r;
|
|
1360
1363
|
}
|
|
1361
|
-
return
|
|
1364
|
+
return t;
|
|
1362
1365
|
}
|
|
1363
|
-
const
|
|
1364
|
-
function
|
|
1365
|
-
return e.replace(
|
|
1366
|
+
const xo = /\*\*(.+?)\*\*/g;
|
|
1367
|
+
function Po(e) {
|
|
1368
|
+
return e.replace(xo, "<strong>$1</strong>");
|
|
1366
1369
|
}
|
|
1367
1370
|
/*! @license DOMPurify 3.4.11 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.11/LICENSE */
|
|
1368
|
-
function
|
|
1369
|
-
(
|
|
1370
|
-
for (var r = 0, a = Array(
|
|
1371
|
+
function zn(e, t) {
|
|
1372
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1373
|
+
for (var r = 0, a = Array(t); r < t; r++) a[r] = e[r];
|
|
1371
1374
|
return a;
|
|
1372
1375
|
}
|
|
1373
|
-
function
|
|
1376
|
+
function Uo(e) {
|
|
1374
1377
|
if (Array.isArray(e)) return e;
|
|
1375
1378
|
}
|
|
1376
|
-
function
|
|
1379
|
+
function Fo(e, t) {
|
|
1377
1380
|
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1378
1381
|
if (r != null) {
|
|
1379
1382
|
var a, l, s, u, m = [], h = !0, p = !1;
|
|
1380
1383
|
try {
|
|
1381
|
-
if (s = (r = r.call(e)).next,
|
|
1384
|
+
if (s = (r = r.call(e)).next, t !== 0) for (; !(h = (a = s.call(r)).done) && (m.push(a.value), m.length !== t); h = !0) ;
|
|
1382
1385
|
} catch (T) {
|
|
1383
1386
|
p = !0, l = T;
|
|
1384
1387
|
} finally {
|
|
@@ -1391,104 +1394,104 @@ function Do(e, n) {
|
|
|
1391
1394
|
return m;
|
|
1392
1395
|
}
|
|
1393
1396
|
}
|
|
1394
|
-
function
|
|
1397
|
+
function Ho() {
|
|
1395
1398
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1396
1399
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1397
1400
|
}
|
|
1398
|
-
function
|
|
1399
|
-
return
|
|
1401
|
+
function zo(e, t) {
|
|
1402
|
+
return Uo(e) || Fo(e, t) || Go(e, t) || Ho();
|
|
1400
1403
|
}
|
|
1401
|
-
function
|
|
1404
|
+
function Go(e, t) {
|
|
1402
1405
|
if (e) {
|
|
1403
|
-
if (typeof e == "string") return
|
|
1406
|
+
if (typeof e == "string") return zn(e, t);
|
|
1404
1407
|
var r = {}.toString.call(e).slice(8, -1);
|
|
1405
|
-
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ?
|
|
1408
|
+
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? zn(e, t) : void 0;
|
|
1406
1409
|
}
|
|
1407
1410
|
}
|
|
1408
|
-
const
|
|
1409
|
-
let se = Object.freeze, ie = Object.seal, mt = Object.create,
|
|
1410
|
-
se || (se = function(
|
|
1411
|
-
return
|
|
1411
|
+
const ur = Object.entries, Gn = Object.setPrototypeOf, Bo = Object.isFrozen, Wo = Object.getPrototypeOf, $o = Object.getOwnPropertyDescriptor;
|
|
1412
|
+
let se = Object.freeze, ie = Object.seal, mt = Object.create, dr = typeof Reflect < "u" && Reflect, hn = dr.apply, _n = dr.construct;
|
|
1413
|
+
se || (se = function(t) {
|
|
1414
|
+
return t;
|
|
1412
1415
|
});
|
|
1413
|
-
ie || (ie = function(
|
|
1414
|
-
return
|
|
1416
|
+
ie || (ie = function(t) {
|
|
1417
|
+
return t;
|
|
1415
1418
|
});
|
|
1416
|
-
hn || (hn = function(
|
|
1419
|
+
hn || (hn = function(t, r) {
|
|
1417
1420
|
for (var a = arguments.length, l = new Array(a > 2 ? a - 2 : 0), s = 2; s < a; s++)
|
|
1418
1421
|
l[s - 2] = arguments[s];
|
|
1419
|
-
return
|
|
1422
|
+
return t.apply(r, l);
|
|
1420
1423
|
});
|
|
1421
|
-
_n || (_n = function(
|
|
1424
|
+
_n || (_n = function(t) {
|
|
1422
1425
|
for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
|
|
1423
1426
|
a[l - 1] = arguments[l];
|
|
1424
|
-
return new
|
|
1427
|
+
return new t(...a);
|
|
1425
1428
|
});
|
|
1426
|
-
const Nt = Z(Array.prototype.forEach),
|
|
1429
|
+
const Nt = Z(Array.prototype.forEach), Yo = Z(Array.prototype.lastIndexOf), Bn = Z(Array.prototype.pop), pt = Z(Array.prototype.push), jo = Z(Array.prototype.splice), Be = Array.isArray, Ct = Z(String.prototype.toLowerCase), sn = Z(String.prototype.toString), Wn = Z(String.prototype.match), kt = Z(String.prototype.replace), $n = Z(String.prototype.indexOf), Ko = Z(String.prototype.trim), Vo = Z(Number.prototype.toString), qo = Z(Boolean.prototype.toString), Yn = typeof BigInt > "u" ? null : Z(BigInt.prototype.toString), jn = typeof Symbol > "u" ? null : Z(Symbol.prototype.toString), ne = Z(Object.prototype.hasOwnProperty), Rt = Z(Object.prototype.toString), ae = Z(RegExp.prototype.test), Qe = Xo(TypeError);
|
|
1427
1430
|
function Z(e) {
|
|
1428
|
-
return function(
|
|
1429
|
-
|
|
1431
|
+
return function(t) {
|
|
1432
|
+
t instanceof RegExp && (t.lastIndex = 0);
|
|
1430
1433
|
for (var r = arguments.length, a = new Array(r > 1 ? r - 1 : 0), l = 1; l < r; l++)
|
|
1431
1434
|
a[l - 1] = arguments[l];
|
|
1432
|
-
return hn(e,
|
|
1435
|
+
return hn(e, t, a);
|
|
1433
1436
|
};
|
|
1434
1437
|
}
|
|
1435
|
-
function
|
|
1438
|
+
function Xo(e) {
|
|
1436
1439
|
return function() {
|
|
1437
|
-
for (var
|
|
1440
|
+
for (var t = arguments.length, r = new Array(t), a = 0; a < t; a++)
|
|
1438
1441
|
r[a] = arguments[a];
|
|
1439
1442
|
return _n(e, r);
|
|
1440
1443
|
};
|
|
1441
1444
|
}
|
|
1442
|
-
function C(e,
|
|
1445
|
+
function C(e, t) {
|
|
1443
1446
|
let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ct;
|
|
1444
|
-
if (
|
|
1447
|
+
if (Gn && Gn(e, null), !Be(t))
|
|
1445
1448
|
return e;
|
|
1446
|
-
let a =
|
|
1449
|
+
let a = t.length;
|
|
1447
1450
|
for (; a--; ) {
|
|
1448
|
-
let l =
|
|
1451
|
+
let l = t[a];
|
|
1449
1452
|
if (typeof l == "string") {
|
|
1450
1453
|
const s = r(l);
|
|
1451
|
-
s !== l && (
|
|
1454
|
+
s !== l && (Bo(t) || (t[a] = s), l = s);
|
|
1452
1455
|
}
|
|
1453
1456
|
e[l] = !0;
|
|
1454
1457
|
}
|
|
1455
1458
|
return e;
|
|
1456
1459
|
}
|
|
1457
|
-
function
|
|
1458
|
-
for (let
|
|
1459
|
-
ne(e,
|
|
1460
|
+
function Zo(e) {
|
|
1461
|
+
for (let t = 0; t < e.length; t++)
|
|
1462
|
+
ne(e, t) || (e[t] = null);
|
|
1460
1463
|
return e;
|
|
1461
1464
|
}
|
|
1462
1465
|
function ue(e) {
|
|
1463
|
-
const
|
|
1464
|
-
for (const a of
|
|
1465
|
-
var r =
|
|
1466
|
+
const t = mt(null);
|
|
1467
|
+
for (const a of ur(e)) {
|
|
1468
|
+
var r = zo(a, 2);
|
|
1466
1469
|
const l = r[0], s = r[1];
|
|
1467
|
-
ne(e, l) && (Be(s) ?
|
|
1470
|
+
ne(e, l) && (Be(s) ? t[l] = Zo(s) : s && typeof s == "object" && s.constructor === Object ? t[l] = ue(s) : t[l] = s);
|
|
1468
1471
|
}
|
|
1469
|
-
return
|
|
1472
|
+
return t;
|
|
1470
1473
|
}
|
|
1471
|
-
function
|
|
1474
|
+
function Jo(e) {
|
|
1472
1475
|
switch (typeof e) {
|
|
1473
1476
|
case "string":
|
|
1474
1477
|
return e;
|
|
1475
1478
|
case "number":
|
|
1476
|
-
return
|
|
1479
|
+
return Vo(e);
|
|
1477
1480
|
case "boolean":
|
|
1478
|
-
return
|
|
1481
|
+
return qo(e);
|
|
1479
1482
|
case "bigint":
|
|
1480
|
-
return
|
|
1483
|
+
return Yn ? Yn(e) : "0";
|
|
1481
1484
|
case "symbol":
|
|
1482
|
-
return
|
|
1485
|
+
return jn ? jn(e) : "Symbol()";
|
|
1483
1486
|
case "undefined":
|
|
1484
1487
|
return Rt(e);
|
|
1485
1488
|
case "function":
|
|
1486
1489
|
case "object": {
|
|
1487
1490
|
if (e === null)
|
|
1488
1491
|
return Rt(e);
|
|
1489
|
-
const
|
|
1492
|
+
const t = e, r = Ce(t, "toString");
|
|
1490
1493
|
if (typeof r == "function") {
|
|
1491
|
-
const a = r(
|
|
1494
|
+
const a = r(t);
|
|
1492
1495
|
return typeof a == "string" ? a : Rt(a);
|
|
1493
1496
|
}
|
|
1494
1497
|
return Rt(e);
|
|
@@ -1497,36 +1500,36 @@ function Ko(e) {
|
|
|
1497
1500
|
return Rt(e);
|
|
1498
1501
|
}
|
|
1499
1502
|
}
|
|
1500
|
-
function Ce(e,
|
|
1503
|
+
function Ce(e, t) {
|
|
1501
1504
|
for (; e !== null; ) {
|
|
1502
|
-
const a =
|
|
1505
|
+
const a = $o(e, t);
|
|
1503
1506
|
if (a) {
|
|
1504
1507
|
if (a.get)
|
|
1505
1508
|
return Z(a.get);
|
|
1506
1509
|
if (typeof a.value == "function")
|
|
1507
1510
|
return Z(a.value);
|
|
1508
1511
|
}
|
|
1509
|
-
e =
|
|
1512
|
+
e = Wo(e);
|
|
1510
1513
|
}
|
|
1511
1514
|
function r() {
|
|
1512
1515
|
return null;
|
|
1513
1516
|
}
|
|
1514
1517
|
return r;
|
|
1515
1518
|
}
|
|
1516
|
-
function
|
|
1519
|
+
function Qo(e) {
|
|
1517
1520
|
try {
|
|
1518
1521
|
return ae(e, ""), !0;
|
|
1519
1522
|
} catch {
|
|
1520
1523
|
return !1;
|
|
1521
1524
|
}
|
|
1522
1525
|
}
|
|
1523
|
-
const
|
|
1526
|
+
const Kn = se(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), cn = se(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), ln = se(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), ea = se(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), un = se(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), ta = se(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Vn = se(["#text"]), qn = se(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "command", "commandfor", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), dn = se(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Xn = se(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), $t = se(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), na = ie(/{{[\w\W]*|^[\w\W]*}}/g), ra = ie(/<%[\w\W]*|^[\w\W]*%>/g), oa = ie(/\${[\w\W]*/g), aa = ie(/^data-[\-\w.\u00B7-\uFFFF]+$/), sa = ie(/^aria-[\-\w]+$/), Zn = ie(
|
|
1524
1527
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
1525
1528
|
// eslint-disable-line no-useless-escape
|
|
1526
|
-
),
|
|
1529
|
+
), ia = ie(/^(?:\w+script|data):/i), ca = ie(
|
|
1527
1530
|
/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
|
|
1528
1531
|
// eslint-disable-line no-control-regex
|
|
1529
|
-
),
|
|
1532
|
+
), la = ie(/^html$/i), ua = ie(/^[a-z][.\w]*(-[.\w]+)+$/i), Jn = ie(/<[/\w!]/g), da = ie(/<[/\w]/g), fa = ie(/<\/no(script|embed|frames)/i), pa = ie(/\/>/i), Ie = {
|
|
1530
1533
|
element: 1,
|
|
1531
1534
|
attribute: 2,
|
|
1532
1535
|
text: 3,
|
|
@@ -1542,17 +1545,17 @@ const jn = se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
1542
1545
|
documentFragment: 11,
|
|
1543
1546
|
notation: 12
|
|
1544
1547
|
// Deprecated
|
|
1545
|
-
},
|
|
1548
|
+
}, ma = function() {
|
|
1546
1549
|
return typeof window > "u" ? null : window;
|
|
1547
|
-
},
|
|
1548
|
-
if (typeof
|
|
1550
|
+
}, ha = function(t, r) {
|
|
1551
|
+
if (typeof t != "object" || typeof t.createPolicy != "function")
|
|
1549
1552
|
return null;
|
|
1550
1553
|
let a = null;
|
|
1551
1554
|
const l = "data-tt-policy-suffix";
|
|
1552
1555
|
r && r.hasAttribute(l) && (a = r.getAttribute(l));
|
|
1553
1556
|
const s = "dompurify" + (a ? "#" + a : "");
|
|
1554
1557
|
try {
|
|
1555
|
-
return
|
|
1558
|
+
return t.createPolicy(s, {
|
|
1556
1559
|
createHTML(u) {
|
|
1557
1560
|
return u;
|
|
1558
1561
|
},
|
|
@@ -1563,7 +1566,7 @@ const jn = se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
1563
1566
|
} catch {
|
|
1564
1567
|
return console.warn("TrustedTypes policy " + s + " could not be created."), null;
|
|
1565
1568
|
}
|
|
1566
|
-
},
|
|
1569
|
+
}, Qn = function() {
|
|
1567
1570
|
return {
|
|
1568
1571
|
afterSanitizeAttributes: [],
|
|
1569
1572
|
afterSanitizeElements: [],
|
|
@@ -1575,14 +1578,14 @@ const jn = se(["a", "abbr", "acronym", "address", "area", "article", "aside", "a
|
|
|
1575
1578
|
uponSanitizeElement: [],
|
|
1576
1579
|
uponSanitizeShadowNode: []
|
|
1577
1580
|
};
|
|
1578
|
-
}, Ge = function(
|
|
1579
|
-
return ne(
|
|
1581
|
+
}, Ge = function(t, r, a, l) {
|
|
1582
|
+
return ne(t, r) && Be(t[r]) ? C(l.base ? ue(l.base) : {}, t[r], l.transform) : a;
|
|
1580
1583
|
};
|
|
1581
|
-
function
|
|
1582
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
1583
|
-
const
|
|
1584
|
-
if (
|
|
1585
|
-
return
|
|
1584
|
+
function fr() {
|
|
1585
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ma();
|
|
1586
|
+
const t = (f) => fr(f);
|
|
1587
|
+
if (t.version = "3.4.11", t.removed = [], !e || !e.document || e.document.nodeType !== Ie.document || !e.Element)
|
|
1588
|
+
return t.isSupported = !1, t;
|
|
1586
1589
|
let r = e.document;
|
|
1587
1590
|
const a = r, l = a.currentScript;
|
|
1588
1591
|
e.DocumentFragment;
|
|
@@ -1597,30 +1600,30 @@ function lr() {
|
|
|
1597
1600
|
const de = function() {
|
|
1598
1601
|
if (G > 0)
|
|
1599
1602
|
throw Qe('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
|
|
1600
|
-
}, b = function(
|
|
1603
|
+
}, b = function(n) {
|
|
1601
1604
|
de(), G++;
|
|
1602
1605
|
try {
|
|
1603
|
-
return U.createHTML(
|
|
1606
|
+
return U.createHTML(n);
|
|
1604
1607
|
} finally {
|
|
1605
1608
|
G--;
|
|
1606
1609
|
}
|
|
1607
|
-
}, L = function(
|
|
1610
|
+
}, L = function(n) {
|
|
1608
1611
|
de(), G++;
|
|
1609
1612
|
try {
|
|
1610
|
-
return U.createScriptURL(
|
|
1613
|
+
return U.createScriptURL(n);
|
|
1611
1614
|
} finally {
|
|
1612
1615
|
G--;
|
|
1613
1616
|
}
|
|
1614
1617
|
}, B = function() {
|
|
1615
|
-
return J || (me =
|
|
1618
|
+
return J || (me = ha(A, l), J = !0), me;
|
|
1616
1619
|
}, re = r, D = re.implementation, W = re.createNodeIterator, he = re.createDocumentFragment, Le = re.getElementsByTagName, xe = a.importNode;
|
|
1617
|
-
let F =
|
|
1618
|
-
|
|
1619
|
-
const oe =
|
|
1620
|
-
let Pe =
|
|
1621
|
-
const tt = C({}, [...
|
|
1620
|
+
let F = Qn();
|
|
1621
|
+
t.isSupported = typeof ur == "function" && typeof N == "function" && D && D.createHTMLDocument !== void 0;
|
|
1622
|
+
const oe = na, _t = ra, Q = oa, gt = aa, qt = sa, Ot = ia, et = ca, We = ua;
|
|
1623
|
+
let Pe = Zn, P = null;
|
|
1624
|
+
const tt = C({}, [...Kn, ...cn, ...ln, ...un, ...Vn]);
|
|
1622
1625
|
let Y = null;
|
|
1623
|
-
const nt = C({}, [...
|
|
1626
|
+
const nt = C({}, [...qn, ...dn, ...Xn, ...$t]);
|
|
1624
1627
|
let $ = Object.seal(mt(null, {
|
|
1625
1628
|
tagNameCheck: {
|
|
1626
1629
|
writable: !0,
|
|
@@ -1708,73 +1711,73 @@ function lr() {
|
|
|
1708
1711
|
let Ze = null;
|
|
1709
1712
|
const Jt = ["application/xhtml+xml", "text/html"], Ut = "text/html";
|
|
1710
1713
|
let j = null, c = null;
|
|
1711
|
-
const y = r.createElement("form"), I = function(
|
|
1712
|
-
return
|
|
1714
|
+
const y = r.createElement("form"), I = function(n) {
|
|
1715
|
+
return n instanceof RegExp || n instanceof Function;
|
|
1713
1716
|
}, ce = function() {
|
|
1714
|
-
let
|
|
1715
|
-
if (c && c ===
|
|
1717
|
+
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
1718
|
+
if (c && c === n)
|
|
1716
1719
|
return;
|
|
1717
|
-
(!
|
|
1718
|
-
Jt.indexOf(
|
|
1720
|
+
(!n || typeof n != "object") && (n = {}), n = ue(n), Ze = // eslint-disable-next-line unicorn/prefer-includes
|
|
1721
|
+
Jt.indexOf(n.PARSER_MEDIA_TYPE) === -1 ? Ut : n.PARSER_MEDIA_TYPE, j = Ze === "application/xhtml+xml" ? sn : Ct, P = Ge(n, "ALLOWED_TAGS", tt, {
|
|
1719
1722
|
transform: j
|
|
1720
|
-
}), Y = Ge(
|
|
1723
|
+
}), Y = Ge(n, "ALLOWED_ATTR", nt, {
|
|
1721
1724
|
transform: j
|
|
1722
|
-
}), dt = Ge(
|
|
1725
|
+
}), dt = Ge(n, "ALLOWED_NAMESPACES", Xt, {
|
|
1723
1726
|
transform: sn
|
|
1724
|
-
}), Et = Ge(
|
|
1727
|
+
}), Et = Ge(n, "ADD_URI_SAFE_ATTR", Mt, {
|
|
1725
1728
|
transform: j,
|
|
1726
1729
|
base: Mt
|
|
1727
|
-
}), Dt = Ge(
|
|
1730
|
+
}), Dt = Ge(n, "ADD_DATA_URI_TAGS", Xe, {
|
|
1728
1731
|
transform: j,
|
|
1729
1732
|
base: Xe
|
|
1730
|
-
}), ge = Ge(
|
|
1733
|
+
}), ge = Ge(n, "FORBID_CONTENTS", qe, {
|
|
1731
1734
|
transform: j
|
|
1732
|
-
}), Ne = Ge(
|
|
1735
|
+
}), Ne = Ge(n, "FORBID_TAGS", ue({}), {
|
|
1733
1736
|
transform: j
|
|
1734
|
-
}), bt = Ge(
|
|
1737
|
+
}), bt = Ge(n, "FORBID_ATTR", ue({}), {
|
|
1735
1738
|
transform: j
|
|
1736
|
-
}), He = ne(
|
|
1737
|
-
const o = ne(
|
|
1738
|
-
if ($ = mt(null), ne(o, "tagNameCheck") && I(o.tagNameCheck) && ($.tagNameCheck = o.tagNameCheck), ne(o, "attributeNameCheck") && I(o.attributeNameCheck) && ($.attributeNameCheck = o.attributeNameCheck), ne(o, "allowCustomizedBuiltInElements") && typeof o.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = o.allowCustomizedBuiltInElements), ie($), Ae && ($e = !1), Ke && (De = !0), He && (P = C({},
|
|
1739
|
-
if (typeof
|
|
1739
|
+
}), He = ne(n, "USE_PROFILES") ? n.USE_PROFILES && typeof n.USE_PROFILES == "object" ? ue(n.USE_PROFILES) : n.USE_PROFILES : !1, Lt = n.ALLOW_ARIA_ATTR !== !1, $e = n.ALLOW_DATA_ATTR !== !1, rt = n.ALLOW_UNKNOWN_PROTOCOLS || !1, Ue = n.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ae = n.SAFE_FOR_TEMPLATES || !1, Ye = n.SAFE_FOR_XML !== !1, ke = n.WHOLE_DOCUMENT || !1, De = n.RETURN_DOM || !1, Ke = n.RETURN_DOM_FRAGMENT || !1, st = n.RETURN_TRUSTED_TYPE || !1, at = n.FORCE_BODY || !1, yt = n.SANITIZE_DOM !== !1, Ve = n.SANITIZE_NAMED_PROPS || !1, Tt = n.KEEP_CONTENT !== !1, ct = n.IN_PLACE || !1, Pe = Qo(n.ALLOWED_URI_REGEXP) ? n.ALLOWED_URI_REGEXP : Zn, be = typeof n.NAMESPACE == "string" ? n.NAMESPACE : ee, At = ne(n, "MATHML_TEXT_INTEGRATION_POINTS") && n.MATHML_TEXT_INTEGRATION_POINTS && typeof n.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ue(n.MATHML_TEXT_INTEGRATION_POINTS) : C({}, xt), St = ne(n, "HTML_INTEGRATION_POINTS") && n.HTML_INTEGRATION_POINTS && typeof n.HTML_INTEGRATION_POINTS == "object" ? ue(n.HTML_INTEGRATION_POINTS) : C({}, Pt);
|
|
1740
|
+
const o = ne(n, "CUSTOM_ELEMENT_HANDLING") && n.CUSTOM_ELEMENT_HANDLING && typeof n.CUSTOM_ELEMENT_HANDLING == "object" ? ue(n.CUSTOM_ELEMENT_HANDLING) : mt(null);
|
|
1741
|
+
if ($ = mt(null), ne(o, "tagNameCheck") && I(o.tagNameCheck) && ($.tagNameCheck = o.tagNameCheck), ne(o, "attributeNameCheck") && I(o.attributeNameCheck) && ($.attributeNameCheck = o.attributeNameCheck), ne(o, "allowCustomizedBuiltInElements") && typeof o.allowCustomizedBuiltInElements == "boolean" && ($.allowCustomizedBuiltInElements = o.allowCustomizedBuiltInElements), ie($), Ae && ($e = !1), Ke && (De = !0), He && (P = C({}, Vn), Y = mt(null), He.html === !0 && (C(P, Kn), C(Y, qn)), He.svg === !0 && (C(P, cn), C(Y, dn), C(Y, $t)), He.svgFilters === !0 && (C(P, ln), C(Y, dn), C(Y, $t)), He.mathMl === !0 && (C(P, un), C(Y, Xn), C(Y, $t))), Ee.tagCheck = null, Ee.attributeCheck = null, ne(n, "ADD_TAGS") && (typeof n.ADD_TAGS == "function" ? Ee.tagCheck = n.ADD_TAGS : Be(n.ADD_TAGS) && (P === tt && (P = ue(P)), C(P, n.ADD_TAGS, j))), ne(n, "ADD_ATTR") && (typeof n.ADD_ATTR == "function" ? Ee.attributeCheck = n.ADD_ATTR : Be(n.ADD_ATTR) && (Y === nt && (Y = ue(Y)), C(Y, n.ADD_ATTR, j))), ne(n, "ADD_URI_SAFE_ATTR") && Be(n.ADD_URI_SAFE_ATTR) && C(Et, n.ADD_URI_SAFE_ATTR, j), ne(n, "FORBID_CONTENTS") && Be(n.FORBID_CONTENTS) && (ge === qe && (ge = ue(ge)), C(ge, n.FORBID_CONTENTS, j)), ne(n, "ADD_FORBID_CONTENTS") && Be(n.ADD_FORBID_CONTENTS) && (ge === qe && (ge = ue(ge)), C(ge, n.ADD_FORBID_CONTENTS, j)), Tt && (P["#text"] = !0), ke && C(P, ["html", "head", "body"]), P.table && (C(P, ["tbody"]), delete Ne.tbody), n.TRUSTED_TYPES_POLICY) {
|
|
1742
|
+
if (typeof n.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
1740
1743
|
throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
1741
|
-
if (typeof
|
|
1744
|
+
if (typeof n.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
1742
1745
|
throw Qe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
1743
1746
|
const d = U;
|
|
1744
|
-
U =
|
|
1747
|
+
U = n.TRUSTED_TYPES_POLICY;
|
|
1745
1748
|
try {
|
|
1746
1749
|
q = b("");
|
|
1747
1750
|
} catch (g) {
|
|
1748
1751
|
throw U = d, g;
|
|
1749
1752
|
}
|
|
1750
|
-
} else
|
|
1751
|
-
se && se(
|
|
1752
|
-
}, ye = C({}, [...cn, ...ln, ...
|
|
1753
|
-
return o.namespaceURI === ee ?
|
|
1754
|
-
}, Sn = function(
|
|
1755
|
-
return o.namespaceURI === ee ?
|
|
1756
|
-
}, wn = function(
|
|
1757
|
-
return o.namespaceURI === lt && !St[d] || o.namespaceURI === Re && !At[d] ? !1 : !fe[
|
|
1758
|
-
}, Ht = function(
|
|
1759
|
-
let o = N(
|
|
1753
|
+
} else n.TRUSTED_TYPES_POLICY === null ? (U = void 0, q = "") : (U === void 0 && (U = B()), U && typeof q == "string" && (q = b("")));
|
|
1754
|
+
se && se(n), c = n;
|
|
1755
|
+
}, ye = C({}, [...cn, ...ln, ...ea]), fe = C({}, [...un, ...ta]), Ft = function(n, o, d) {
|
|
1756
|
+
return o.namespaceURI === ee ? n === "svg" : o.namespaceURI === Re ? n === "svg" && (d === "annotation-xml" || At[d]) : !!ye[n];
|
|
1757
|
+
}, Sn = function(n, o, d) {
|
|
1758
|
+
return o.namespaceURI === ee ? n === "math" : o.namespaceURI === lt ? n === "math" && St[d] : !!fe[n];
|
|
1759
|
+
}, wn = function(n, o, d) {
|
|
1760
|
+
return o.namespaceURI === lt && !St[d] || o.namespaceURI === Re && !At[d] ? !1 : !fe[n] && (Zt[n] || !ye[n]);
|
|
1761
|
+
}, Ht = function(n) {
|
|
1762
|
+
let o = N(n);
|
|
1760
1763
|
(!o || !o.tagName) && (o = {
|
|
1761
1764
|
namespaceURI: be,
|
|
1762
1765
|
tagName: "template"
|
|
1763
1766
|
});
|
|
1764
|
-
const d = Ct(
|
|
1765
|
-
return dt[
|
|
1766
|
-
}, ze = function(
|
|
1767
|
-
pt(
|
|
1768
|
-
element:
|
|
1767
|
+
const d = Ct(n.tagName), g = Ct(o.tagName);
|
|
1768
|
+
return dt[n.namespaceURI] ? n.namespaceURI === lt ? Ft(d, o, g) : n.namespaceURI === Re ? Sn(d, o, g) : n.namespaceURI === ee ? wn(d, o, g) : !!(Ze === "application/xhtml+xml" && dt[n.namespaceURI]) : !1;
|
|
1769
|
+
}, ze = function(n) {
|
|
1770
|
+
pt(t.removed, {
|
|
1771
|
+
element: n
|
|
1769
1772
|
});
|
|
1770
1773
|
try {
|
|
1771
|
-
N(
|
|
1774
|
+
N(n).removeChild(n);
|
|
1772
1775
|
} catch {
|
|
1773
|
-
if (k(
|
|
1776
|
+
if (k(n), !N(n))
|
|
1774
1777
|
throw Qe("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
1775
1778
|
}
|
|
1776
|
-
}, Nn = function(
|
|
1777
|
-
const o = w(
|
|
1779
|
+
}, Nn = function(n) {
|
|
1780
|
+
const o = w(n);
|
|
1778
1781
|
if (o) {
|
|
1779
1782
|
const g = [];
|
|
1780
1783
|
Nt(o, (R) => {
|
|
@@ -1786,29 +1789,29 @@ function lr() {
|
|
|
1786
1789
|
}
|
|
1787
1790
|
});
|
|
1788
1791
|
}
|
|
1789
|
-
const d = pe(
|
|
1792
|
+
const d = pe(n);
|
|
1790
1793
|
if (d)
|
|
1791
1794
|
for (let g = d.length - 1; g >= 0; --g) {
|
|
1792
1795
|
const R = d[g], v = R && R.name;
|
|
1793
1796
|
if (typeof v == "string")
|
|
1794
1797
|
try {
|
|
1795
|
-
|
|
1798
|
+
n.removeAttribute(v);
|
|
1796
1799
|
} catch {
|
|
1797
1800
|
}
|
|
1798
1801
|
}
|
|
1799
|
-
}, Je = function(
|
|
1802
|
+
}, Je = function(n, o) {
|
|
1800
1803
|
try {
|
|
1801
|
-
pt(
|
|
1802
|
-
attribute: o.getAttributeNode(
|
|
1804
|
+
pt(t.removed, {
|
|
1805
|
+
attribute: o.getAttributeNode(n),
|
|
1803
1806
|
from: o
|
|
1804
1807
|
});
|
|
1805
1808
|
} catch {
|
|
1806
|
-
pt(
|
|
1809
|
+
pt(t.removed, {
|
|
1807
1810
|
attribute: null,
|
|
1808
1811
|
from: o
|
|
1809
1812
|
});
|
|
1810
1813
|
}
|
|
1811
|
-
if (o.removeAttribute(
|
|
1814
|
+
if (o.removeAttribute(n), n === "is")
|
|
1812
1815
|
if (De || Ke)
|
|
1813
1816
|
try {
|
|
1814
1817
|
ze(o);
|
|
@@ -1816,40 +1819,40 @@ function lr() {
|
|
|
1816
1819
|
}
|
|
1817
1820
|
else
|
|
1818
1821
|
try {
|
|
1819
|
-
o.setAttribute(
|
|
1822
|
+
o.setAttribute(n, "");
|
|
1820
1823
|
} catch {
|
|
1821
1824
|
}
|
|
1822
|
-
},
|
|
1823
|
-
const o = pe(
|
|
1825
|
+
}, _r = function(n) {
|
|
1826
|
+
const o = pe(n);
|
|
1824
1827
|
if (o)
|
|
1825
1828
|
for (let d = o.length - 1; d >= 0; --d) {
|
|
1826
1829
|
const g = o[d], R = g && g.name;
|
|
1827
1830
|
if (!(typeof R != "string" || Y[j(R)]))
|
|
1828
1831
|
try {
|
|
1829
|
-
|
|
1832
|
+
n.removeAttribute(R);
|
|
1830
1833
|
} catch {
|
|
1831
1834
|
}
|
|
1832
1835
|
}
|
|
1833
|
-
},
|
|
1834
|
-
const o = [
|
|
1836
|
+
}, gr = function(n) {
|
|
1837
|
+
const o = [n];
|
|
1835
1838
|
for (; o.length > 0; ) {
|
|
1836
1839
|
const d = o.pop();
|
|
1837
|
-
(z ? z(d) : d.nodeType) === Ie.element &&
|
|
1840
|
+
(z ? z(d) : d.nodeType) === Ie.element && _r(d);
|
|
1838
1841
|
const R = w(d);
|
|
1839
1842
|
if (R)
|
|
1840
1843
|
for (let v = R.length - 1; v >= 0; --v)
|
|
1841
1844
|
o.push(R[v]);
|
|
1842
1845
|
}
|
|
1843
|
-
}, kn = function(
|
|
1846
|
+
}, kn = function(n) {
|
|
1844
1847
|
let o = null, d = null;
|
|
1845
1848
|
if (at)
|
|
1846
|
-
|
|
1849
|
+
n = "<remove></remove>" + n;
|
|
1847
1850
|
else {
|
|
1848
|
-
const v =
|
|
1851
|
+
const v = Wn(n, /^[\r\n\t ]+/);
|
|
1849
1852
|
d = v && v[0];
|
|
1850
1853
|
}
|
|
1851
|
-
Ze === "application/xhtml+xml" && be === ee && (
|
|
1852
|
-
const g = U ? b(
|
|
1854
|
+
Ze === "application/xhtml+xml" && be === ee && (n = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + n + "</body></html>");
|
|
1855
|
+
const g = U ? b(n) : n;
|
|
1853
1856
|
if (be === ee)
|
|
1854
1857
|
try {
|
|
1855
1858
|
o = new T().parseFromString(g, Ze);
|
|
@@ -1863,23 +1866,23 @@ function lr() {
|
|
|
1863
1866
|
}
|
|
1864
1867
|
}
|
|
1865
1868
|
const R = o.body || o.documentElement;
|
|
1866
|
-
return
|
|
1867
|
-
}, Rn = function(
|
|
1869
|
+
return n && d && R.insertBefore(r.createTextNode(d), R.childNodes[0] || null), be === ee ? Le.call(o, ke ? "html" : "body")[0] : ke ? o.documentElement : R;
|
|
1870
|
+
}, Rn = function(n) {
|
|
1868
1871
|
return W.call(
|
|
1869
|
-
|
|
1870
|
-
|
|
1872
|
+
n.ownerDocument || n,
|
|
1873
|
+
n,
|
|
1871
1874
|
// eslint-disable-next-line no-bitwise
|
|
1872
1875
|
h.SHOW_ELEMENT | h.SHOW_COMMENT | h.SHOW_TEXT | h.SHOW_PROCESSING_INSTRUCTION | h.SHOW_CDATA_SECTION,
|
|
1873
1876
|
null
|
|
1874
1877
|
);
|
|
1875
|
-
}, zt = function(
|
|
1876
|
-
return
|
|
1877
|
-
}, Qt = function(
|
|
1878
|
+
}, zt = function(n) {
|
|
1879
|
+
return n = kt(n, oe, " "), n = kt(n, _t, " "), n = kt(n, Q, " "), n;
|
|
1880
|
+
}, Qt = function(n) {
|
|
1878
1881
|
var o;
|
|
1879
|
-
|
|
1882
|
+
n.normalize();
|
|
1880
1883
|
const d = W.call(
|
|
1881
|
-
|
|
1882
|
-
|
|
1884
|
+
n.ownerDocument || n,
|
|
1885
|
+
n,
|
|
1883
1886
|
// eslint-disable-next-line no-bitwise
|
|
1884
1887
|
h.SHOW_TEXT | h.SHOW_COMMENT | h.SHOW_CDATA_SECTION | h.SHOW_PROCESSING_INSTRUCTION,
|
|
1885
1888
|
null
|
|
@@ -1887,25 +1890,25 @@ function lr() {
|
|
|
1887
1890
|
let g = d.nextNode();
|
|
1888
1891
|
for (; g; )
|
|
1889
1892
|
g.data = zt(g.data), g = d.nextNode();
|
|
1890
|
-
const R = (o =
|
|
1893
|
+
const R = (o = n.querySelectorAll) === null || o === void 0 ? void 0 : o.call(n, "template");
|
|
1891
1894
|
R && Nt(R, (v) => {
|
|
1892
1895
|
ft(v.content) && Qt(v.content);
|
|
1893
1896
|
});
|
|
1894
|
-
}, Gt = function(
|
|
1895
|
-
const o = K ? K(
|
|
1896
|
-
return typeof o != "string" || j(o) !== "form" ? !1 : typeof
|
|
1897
|
+
}, Gt = function(n) {
|
|
1898
|
+
const o = K ? K(n) : null;
|
|
1899
|
+
return typeof o != "string" || j(o) !== "form" ? !1 : typeof n.nodeName != "string" || typeof n.textContent != "string" || typeof n.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
|
|
1897
1900
|
// prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
|
|
1898
1901
|
// makes the direct read diverge from the cached read; a clean form
|
|
1899
1902
|
// (same-realm OR foreign-realm) has both reads pointing at the same
|
|
1900
1903
|
// canonical NamedNodeMap.
|
|
1901
|
-
|
|
1904
|
+
n.attributes !== pe(n) || typeof n.removeAttribute != "function" || typeof n.setAttribute != "function" || typeof n.namespaceURI != "string" || typeof n.insertBefore != "function" || typeof n.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
|
|
1902
1905
|
// returns the integer 1 for any Element regardless of realm; direct
|
|
1903
1906
|
// read on a clobbered form (e.g. <input name="nodeType">) returns
|
|
1904
1907
|
// the named child element. Cheap addition — nodeType is read from
|
|
1905
1908
|
// an internal slot, no serialization cost — and removes a residual
|
|
1906
1909
|
// clobbering surface used by several mXSS / PI / comment branches
|
|
1907
1910
|
// in _sanitizeElements that compare currentNode.nodeType directly.
|
|
1908
|
-
|
|
1911
|
+
n.nodeType !== z(n) || // HTMLFormElement has [LegacyOverrideBuiltIns]: a descendant named
|
|
1909
1912
|
// "childNodes" shadows the prototype getter. Direct reads of
|
|
1910
1913
|
// form.childNodes from a clobbered form return the named child
|
|
1911
1914
|
// instead of the real NodeList, so any walk that reads it directly
|
|
@@ -1916,75 +1919,75 @@ function lr() {
|
|
|
1916
1919
|
// select, etc.) regardless of whether the named child happens to
|
|
1917
1920
|
// carry a numeric .length, which a typeof-based probe would miss
|
|
1918
1921
|
// (e.g. HTMLSelectElement.length is a defined unsigned-long).
|
|
1919
|
-
|
|
1920
|
-
}, ft = function(
|
|
1921
|
-
if (!z || typeof
|
|
1922
|
+
n.childNodes !== w(n);
|
|
1923
|
+
}, ft = function(n) {
|
|
1924
|
+
if (!z || typeof n != "object" || n === null)
|
|
1922
1925
|
return !1;
|
|
1923
1926
|
try {
|
|
1924
|
-
return z(
|
|
1927
|
+
return z(n) === Ie.documentFragment;
|
|
1925
1928
|
} catch {
|
|
1926
1929
|
return !1;
|
|
1927
1930
|
}
|
|
1928
|
-
}, wt = function(
|
|
1929
|
-
if (!z || typeof
|
|
1931
|
+
}, wt = function(n) {
|
|
1932
|
+
if (!z || typeof n != "object" || n === null)
|
|
1930
1933
|
return !1;
|
|
1931
1934
|
try {
|
|
1932
|
-
return typeof z(
|
|
1935
|
+
return typeof z(n) == "number";
|
|
1933
1936
|
} catch {
|
|
1934
1937
|
return !1;
|
|
1935
1938
|
}
|
|
1936
1939
|
};
|
|
1937
|
-
function Me(f,
|
|
1940
|
+
function Me(f, n, o) {
|
|
1938
1941
|
f.length !== 0 && Nt(f, (d) => {
|
|
1939
|
-
d.call(
|
|
1942
|
+
d.call(t, n, o, c);
|
|
1940
1943
|
});
|
|
1941
1944
|
}
|
|
1942
|
-
const
|
|
1943
|
-
return !!(Ye &&
|
|
1944
|
-
},
|
|
1945
|
+
const br = function(n, o) {
|
|
1946
|
+
return !!(Ye && n.hasChildNodes() && !wt(n.firstElementChild) && ae(Jn, n.textContent) && ae(Jn, n.innerHTML) || Ye && n.namespaceURI === ee && o === "style" && wt(n.firstElementChild) || n.nodeType === Ie.processingInstruction || Ye && n.nodeType === Ie.comment && ae(da, n.data));
|
|
1947
|
+
}, yr = function(n, o) {
|
|
1945
1948
|
if (!Ne[o] && vn(o) && ($.tagNameCheck instanceof RegExp && ae($.tagNameCheck, o) || $.tagNameCheck instanceof Function && $.tagNameCheck(o)))
|
|
1946
1949
|
return !1;
|
|
1947
1950
|
if (Tt && !ge[o]) {
|
|
1948
|
-
const d = N(
|
|
1951
|
+
const d = N(n), g = w(n);
|
|
1949
1952
|
if (g && d) {
|
|
1950
1953
|
const R = g.length;
|
|
1951
1954
|
for (let v = R - 1; v >= 0; --v) {
|
|
1952
1955
|
const te = ct ? g[v] : E(g[v], !0);
|
|
1953
|
-
d.insertBefore(te, O(
|
|
1956
|
+
d.insertBefore(te, O(n));
|
|
1954
1957
|
}
|
|
1955
1958
|
}
|
|
1956
1959
|
}
|
|
1957
|
-
return ze(
|
|
1958
|
-
}, In = function(
|
|
1959
|
-
if (Me(F.beforeSanitizeElements,
|
|
1960
|
-
return ze(
|
|
1961
|
-
const o = j(K ? K(
|
|
1962
|
-
if (Me(F.uponSanitizeElement,
|
|
1960
|
+
return ze(n), !0;
|
|
1961
|
+
}, In = function(n) {
|
|
1962
|
+
if (Me(F.beforeSanitizeElements, n, null), Gt(n))
|
|
1963
|
+
return ze(n), !0;
|
|
1964
|
+
const o = j(K ? K(n) : n.nodeName);
|
|
1965
|
+
if (Me(F.uponSanitizeElement, n, {
|
|
1963
1966
|
tagName: o,
|
|
1964
1967
|
allowedTags: P
|
|
1965
|
-
}),
|
|
1966
|
-
return ze(
|
|
1968
|
+
}), br(n, o))
|
|
1969
|
+
return ze(n), !0;
|
|
1967
1970
|
if (Ne[o] || !(Ee.tagCheck instanceof Function && Ee.tagCheck(o)) && !P[o])
|
|
1968
|
-
return
|
|
1969
|
-
if ((z ? z(
|
|
1970
|
-
return ze(
|
|
1971
|
-
if (Ae &&
|
|
1972
|
-
const g = zt(
|
|
1973
|
-
|
|
1974
|
-
element:
|
|
1975
|
-
}),
|
|
1971
|
+
return yr(n, o);
|
|
1972
|
+
if ((z ? z(n) : n.nodeType) === Ie.element && !Ht(n) || (o === "noscript" || o === "noembed" || o === "noframes") && ae(fa, n.innerHTML))
|
|
1973
|
+
return ze(n), !0;
|
|
1974
|
+
if (Ae && n.nodeType === Ie.text) {
|
|
1975
|
+
const g = zt(n.textContent);
|
|
1976
|
+
n.textContent !== g && (pt(t.removed, {
|
|
1977
|
+
element: n.cloneNode()
|
|
1978
|
+
}), n.textContent = g);
|
|
1976
1979
|
}
|
|
1977
|
-
return Me(F.afterSanitizeElements,
|
|
1978
|
-
}, Cn = function(
|
|
1980
|
+
return Me(F.afterSanitizeElements, n, null), !1;
|
|
1981
|
+
}, Cn = function(n, o, d) {
|
|
1979
1982
|
if (bt[o] || yt && (o === "id" || o === "name") && (d in r || d in y))
|
|
1980
1983
|
return !1;
|
|
1981
|
-
const g = Y[o] || Ee.attributeCheck instanceof Function && Ee.attributeCheck(o,
|
|
1984
|
+
const g = Y[o] || Ee.attributeCheck instanceof Function && Ee.attributeCheck(o, n);
|
|
1982
1985
|
if (!($e && ae(gt, o))) {
|
|
1983
1986
|
if (!(Lt && ae(qt, o))) {
|
|
1984
1987
|
if (g) {
|
|
1985
1988
|
if (!Et[o]) {
|
|
1986
1989
|
if (!ae(Pe, kt(d, et, ""))) {
|
|
1987
|
-
if (!((o === "src" || o === "xlink:href" || o === "href") &&
|
|
1990
|
+
if (!((o === "src" || o === "xlink:href" || o === "href") && n !== "script" && $n(d, "data:") === 0 && Dt[n])) {
|
|
1988
1991
|
if (!(rt && !ae(Ot, kt(d, et, "")))) {
|
|
1989
1992
|
if (d)
|
|
1990
1993
|
return !1;
|
|
@@ -1996,34 +1999,34 @@ function lr() {
|
|
|
1996
1999
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
1997
2000
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1998
2001
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
1999
|
-
!(vn(
|
|
2002
|
+
!(vn(n) && ($.tagNameCheck instanceof RegExp && ae($.tagNameCheck, n) || $.tagNameCheck instanceof Function && $.tagNameCheck(n)) && ($.attributeNameCheck instanceof RegExp && ae($.attributeNameCheck, o) || $.attributeNameCheck instanceof Function && $.attributeNameCheck(o, n)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
2000
2003
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
2001
2004
|
o === "is" && $.allowCustomizedBuiltInElements && ($.tagNameCheck instanceof RegExp && ae($.tagNameCheck, d) || $.tagNameCheck instanceof Function && $.tagNameCheck(d)))
|
|
2002
2005
|
) return !1;
|
|
2003
2006
|
}
|
|
2004
2007
|
}
|
|
2005
2008
|
return !0;
|
|
2006
|
-
},
|
|
2007
|
-
return !
|
|
2008
|
-
},
|
|
2009
|
+
}, Tr = C({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), vn = function(n) {
|
|
2010
|
+
return !Tr[Ct(n)] && ae(We, n);
|
|
2011
|
+
}, Er = function(n, o, d, g) {
|
|
2009
2012
|
if (U && typeof A == "object" && typeof A.getAttributeType == "function" && !d)
|
|
2010
|
-
switch (A.getAttributeType(
|
|
2013
|
+
switch (A.getAttributeType(n, o)) {
|
|
2011
2014
|
case "TrustedHTML":
|
|
2012
2015
|
return b(g);
|
|
2013
2016
|
case "TrustedScriptURL":
|
|
2014
2017
|
return L(g);
|
|
2015
2018
|
}
|
|
2016
2019
|
return g;
|
|
2017
|
-
},
|
|
2020
|
+
}, Ar = function(n, o, d, g) {
|
|
2018
2021
|
try {
|
|
2019
|
-
d ?
|
|
2022
|
+
d ? n.setAttributeNS(d, o, g) : n.setAttribute(o, g), Gt(n) ? ze(n) : Bn(t.removed);
|
|
2020
2023
|
} catch {
|
|
2021
|
-
Je(o,
|
|
2024
|
+
Je(o, n);
|
|
2022
2025
|
}
|
|
2023
|
-
}, On = function(
|
|
2024
|
-
Me(F.beforeSanitizeAttributes,
|
|
2025
|
-
const o =
|
|
2026
|
-
if (!o || Gt(
|
|
2026
|
+
}, On = function(n) {
|
|
2027
|
+
Me(F.beforeSanitizeAttributes, n, null);
|
|
2028
|
+
const o = n.attributes;
|
|
2029
|
+
if (!o || Gt(n))
|
|
2027
2030
|
return;
|
|
2028
2031
|
const d = {
|
|
2029
2032
|
attrName: "",
|
|
@@ -2033,47 +2036,47 @@ function lr() {
|
|
|
2033
2036
|
forceKeepAttr: void 0
|
|
2034
2037
|
};
|
|
2035
2038
|
let g = o.length;
|
|
2036
|
-
const R = j(
|
|
2039
|
+
const R = j(n.nodeName);
|
|
2037
2040
|
for (; g--; ) {
|
|
2038
2041
|
const v = o[g], te = v.name, X = v.namespaceURI, Te = v.value, Se = j(te), tn = Te;
|
|
2039
|
-
let le = te === "value" ? tn :
|
|
2040
|
-
if (d.attrName = Se, d.attrValue = le, d.keepAttr = !0, d.forceKeepAttr = void 0, Me(F.uponSanitizeAttribute,
|
|
2041
|
-
Je(te,
|
|
2042
|
+
let le = te === "value" ? tn : Ko(tn);
|
|
2043
|
+
if (d.attrName = Se, d.attrValue = le, d.keepAttr = !0, d.forceKeepAttr = void 0, Me(F.uponSanitizeAttribute, n, d), le = d.attrValue, Ve && (Se === "id" || Se === "name") && $n(le, it) !== 0 && (Je(te, n), le = it + le), Ye && ae(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, le)) {
|
|
2044
|
+
Je(te, n);
|
|
2042
2045
|
continue;
|
|
2043
2046
|
}
|
|
2044
|
-
if (Se === "attributename" &&
|
|
2045
|
-
Je(te,
|
|
2047
|
+
if (Se === "attributename" && Wn(le, "href")) {
|
|
2048
|
+
Je(te, n);
|
|
2046
2049
|
continue;
|
|
2047
2050
|
}
|
|
2048
2051
|
if (!d.forceKeepAttr) {
|
|
2049
2052
|
if (!d.keepAttr) {
|
|
2050
|
-
Je(te,
|
|
2053
|
+
Je(te, n);
|
|
2051
2054
|
continue;
|
|
2052
2055
|
}
|
|
2053
|
-
if (!Ue && ae(
|
|
2054
|
-
Je(te,
|
|
2056
|
+
if (!Ue && ae(pa, le)) {
|
|
2057
|
+
Je(te, n);
|
|
2055
2058
|
continue;
|
|
2056
2059
|
}
|
|
2057
2060
|
if (Ae && (le = zt(le)), !Cn(R, Se, le)) {
|
|
2058
|
-
Je(te,
|
|
2061
|
+
Je(te, n);
|
|
2059
2062
|
continue;
|
|
2060
2063
|
}
|
|
2061
|
-
le =
|
|
2064
|
+
le = Er(R, Se, X, le), le !== tn && Ar(n, te, X, le);
|
|
2062
2065
|
}
|
|
2063
2066
|
}
|
|
2064
|
-
Me(F.afterSanitizeAttributes,
|
|
2065
|
-
}, Bt = function(
|
|
2067
|
+
Me(F.afterSanitizeAttributes, n, null);
|
|
2068
|
+
}, Bt = function(n) {
|
|
2066
2069
|
let o = null;
|
|
2067
|
-
const d = Rn(
|
|
2068
|
-
for (Me(F.beforeSanitizeShadowDOM,
|
|
2070
|
+
const d = Rn(n);
|
|
2071
|
+
for (Me(F.beforeSanitizeShadowDOM, n, null); o = d.nextNode(); )
|
|
2069
2072
|
if (Me(F.uponSanitizeShadowNode, o, null), In(o), On(o), ft(o.content) && Bt(o.content), (z ? z(o) : o.nodeType) === Ie.element) {
|
|
2070
2073
|
const R = H(o);
|
|
2071
2074
|
ft(R) && (en(R), Bt(R));
|
|
2072
2075
|
}
|
|
2073
|
-
Me(F.afterSanitizeShadowDOM,
|
|
2074
|
-
}, en = function(
|
|
2076
|
+
Me(F.afterSanitizeShadowDOM, n, null);
|
|
2077
|
+
}, en = function(n) {
|
|
2075
2078
|
const o = [{
|
|
2076
|
-
node:
|
|
2079
|
+
node: n,
|
|
2077
2080
|
shadow: null
|
|
2078
2081
|
}];
|
|
2079
2082
|
for (; o.length > 0; ) {
|
|
@@ -2111,13 +2114,13 @@ function lr() {
|
|
|
2111
2114
|
}
|
|
2112
2115
|
}
|
|
2113
2116
|
};
|
|
2114
|
-
return
|
|
2115
|
-
let
|
|
2116
|
-
if (ut = !f, ut && (f = "<!-->"), typeof f != "string" && !wt(f) && (f =
|
|
2117
|
+
return t.sanitize = function(f) {
|
|
2118
|
+
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = null, d = null, g = null, R = null;
|
|
2119
|
+
if (ut = !f, ut && (f = "<!-->"), typeof f != "string" && !wt(f) && (f = Jo(f), typeof f != "string"))
|
|
2117
2120
|
throw Qe("dirty is not a string, aborting");
|
|
2118
|
-
if (!
|
|
2121
|
+
if (!t.isSupported)
|
|
2119
2122
|
return f;
|
|
2120
|
-
ot ? (P = je, Y = Fe) : ce(
|
|
2123
|
+
ot ? (P = je, Y = Fe) : ce(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (P = ue(P)), F.uponSanitizeAttribute.length > 0 && (Y = ue(Y)), t.removed = [];
|
|
2121
2124
|
const v = ct && typeof f != "string" && wt(f);
|
|
2122
2125
|
if (v) {
|
|
2123
2126
|
const Te = K ? K(f) : f.nodeName;
|
|
@@ -2151,8 +2154,8 @@ function lr() {
|
|
|
2151
2154
|
throw v && Nn(f), Te;
|
|
2152
2155
|
}
|
|
2153
2156
|
if (v)
|
|
2154
|
-
return Nt(
|
|
2155
|
-
Te.element &&
|
|
2157
|
+
return Nt(t.removed, (Te) => {
|
|
2158
|
+
Te.element && gr(Te.element);
|
|
2156
2159
|
}), Ae && Qt(f), f;
|
|
2157
2160
|
if (De) {
|
|
2158
2161
|
if (Ae && Qt(o), Ke)
|
|
@@ -2163,35 +2166,35 @@ function lr() {
|
|
|
2163
2166
|
return (Y.shadowroot || Y.shadowrootmode) && (R = xe.call(a, R, !0)), R;
|
|
2164
2167
|
}
|
|
2165
2168
|
let X = ke ? o.outerHTML : o.innerHTML;
|
|
2166
|
-
return ke && P["!doctype"] && o.ownerDocument && o.ownerDocument.doctype && o.ownerDocument.doctype.name && ae(
|
|
2169
|
+
return ke && P["!doctype"] && o.ownerDocument && o.ownerDocument.doctype && o.ownerDocument.doctype.name && ae(la, o.ownerDocument.doctype.name) && (X = "<!DOCTYPE " + o.ownerDocument.doctype.name + `>
|
|
2167
2170
|
` + X), Ae && (X = zt(X)), U && st ? b(X) : X;
|
|
2168
|
-
},
|
|
2171
|
+
}, t.setConfig = function() {
|
|
2169
2172
|
let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2170
2173
|
ce(f), ot = !0, je = P, Fe = Y;
|
|
2171
|
-
},
|
|
2174
|
+
}, t.clearConfig = function() {
|
|
2172
2175
|
c = null, ot = !1, je = null, Fe = null, U = me, q = "";
|
|
2173
|
-
},
|
|
2176
|
+
}, t.isValidAttribute = function(f, n, o) {
|
|
2174
2177
|
c || ce({});
|
|
2175
|
-
const d = j(f), g = j(
|
|
2178
|
+
const d = j(f), g = j(n);
|
|
2176
2179
|
return Cn(d, g, o);
|
|
2177
|
-
},
|
|
2178
|
-
typeof
|
|
2179
|
-
},
|
|
2180
|
+
}, t.addHook = function(f, n) {
|
|
2181
|
+
typeof n == "function" && ne(F, f) && pt(F[f], n);
|
|
2182
|
+
}, t.removeHook = function(f, n) {
|
|
2180
2183
|
if (ne(F, f)) {
|
|
2181
|
-
if (
|
|
2182
|
-
const o =
|
|
2183
|
-
return o === -1 ? void 0 :
|
|
2184
|
+
if (n !== void 0) {
|
|
2185
|
+
const o = Yo(F[f], n);
|
|
2186
|
+
return o === -1 ? void 0 : jo(F[f], o, 1)[0];
|
|
2184
2187
|
}
|
|
2185
|
-
return
|
|
2188
|
+
return Bn(F[f]);
|
|
2186
2189
|
}
|
|
2187
|
-
},
|
|
2190
|
+
}, t.removeHooks = function(f) {
|
|
2188
2191
|
ne(F, f) && (F[f] = []);
|
|
2189
|
-
},
|
|
2190
|
-
F =
|
|
2191
|
-
},
|
|
2192
|
+
}, t.removeAllHooks = function() {
|
|
2193
|
+
F = Qn();
|
|
2194
|
+
}, t;
|
|
2192
2195
|
}
|
|
2193
|
-
var Yt =
|
|
2194
|
-
const
|
|
2196
|
+
var Yt = fr();
|
|
2197
|
+
const _a = [
|
|
2195
2198
|
"a",
|
|
2196
2199
|
"b",
|
|
2197
2200
|
"br",
|
|
@@ -2207,26 +2210,26 @@ const da = [
|
|
|
2207
2210
|
"u",
|
|
2208
2211
|
"ul"
|
|
2209
2212
|
];
|
|
2210
|
-
function
|
|
2213
|
+
function ga(e) {
|
|
2211
2214
|
e.hasAttribute("href") && (e.setAttribute("target", "_blank"), e.setAttribute("rel", "noopener noreferrer"));
|
|
2212
2215
|
}
|
|
2213
|
-
function
|
|
2214
|
-
Yt.addHook("afterSanitizeAttributes",
|
|
2215
|
-
const
|
|
2216
|
-
ALLOWED_TAGS: [...
|
|
2216
|
+
function ba(e) {
|
|
2217
|
+
Yt.addHook("afterSanitizeAttributes", ga);
|
|
2218
|
+
const t = Yt.sanitize(e, {
|
|
2219
|
+
ALLOWED_TAGS: [..._a]
|
|
2217
2220
|
});
|
|
2218
|
-
return Yt.removeHook("afterSanitizeAttributes"),
|
|
2221
|
+
return Yt.removeHook("afterSanitizeAttributes"), t;
|
|
2219
2222
|
}
|
|
2220
|
-
function
|
|
2223
|
+
function ya(e) {
|
|
2221
2224
|
return Yt.sanitize(e, { ALLOWED_TAGS: [] });
|
|
2222
2225
|
}
|
|
2223
2226
|
class En extends Error {
|
|
2224
|
-
constructor(
|
|
2225
|
-
super(`HTTP ${
|
|
2227
|
+
constructor(t, r) {
|
|
2228
|
+
super(`HTTP ${t}: ${r}`), this.name = "HttpError", this.status = t, this.statusText = r;
|
|
2226
2229
|
}
|
|
2227
2230
|
}
|
|
2228
|
-
async function
|
|
2229
|
-
const { authorizationToken: l, headers: s, ...u } = a, m = await fetch(
|
|
2231
|
+
async function pr(e, t, r, a = {}) {
|
|
2232
|
+
const { authorizationToken: l, headers: s, ...u } = a, m = await fetch(t, {
|
|
2230
2233
|
method: e,
|
|
2231
2234
|
headers: {
|
|
2232
2235
|
"Content-Type": "application/json",
|
|
@@ -2240,20 +2243,20 @@ async function ur(e, n, r, a = {}) {
|
|
|
2240
2243
|
throw new En(m.status, m.statusText);
|
|
2241
2244
|
return m.json();
|
|
2242
2245
|
}
|
|
2243
|
-
const
|
|
2246
|
+
const mr = (e, t, r, a) => pr("GET", e, void 0, { signal: r, authorizationToken: a }), An = (e, t, r = {}) => pr("POST", e, t, r);
|
|
2244
2247
|
function gn(e) {
|
|
2245
2248
|
if (e === "") return "";
|
|
2246
2249
|
try {
|
|
2247
|
-
const
|
|
2248
|
-
return typeof
|
|
2250
|
+
const t = JSON.parse(e);
|
|
2251
|
+
return typeof t == "string" ? t : String(t ?? "");
|
|
2249
2252
|
} catch {
|
|
2250
2253
|
return e;
|
|
2251
2254
|
}
|
|
2252
2255
|
}
|
|
2253
|
-
function
|
|
2256
|
+
function Ta(e) {
|
|
2254
2257
|
return e.includes("/chat/agent-completions");
|
|
2255
2258
|
}
|
|
2256
|
-
function
|
|
2259
|
+
function hr(e) {
|
|
2257
2260
|
return /\/conversations(?:\/|$)/.test(e.replace(/\?.*$/, ""));
|
|
2258
2261
|
}
|
|
2259
2262
|
const It = {
|
|
@@ -2268,18 +2271,18 @@ const It = {
|
|
|
2268
2271
|
{ server: "statsapi", tools: ["*"] },
|
|
2269
2272
|
{ server: "arbormis", tools: ["create_pdf", "academic_date_range_finder"] }
|
|
2270
2273
|
]
|
|
2271
|
-
}, bn = "user",
|
|
2272
|
-
function
|
|
2274
|
+
}, bn = "user", Ea = "assistant", Aa = "system";
|
|
2275
|
+
function Sa({
|
|
2273
2276
|
chatId: e,
|
|
2274
|
-
userMessage:
|
|
2277
|
+
userMessage: t,
|
|
2275
2278
|
chatHistory: r = [],
|
|
2276
2279
|
config: a = {}
|
|
2277
2280
|
}) {
|
|
2278
2281
|
const l = a.model ?? It.model, s = a.agentName ?? It.agentName, u = a.systemPrompt ?? It.systemPrompt, m = a.modelKwargs ?? It.modelKwargs, h = a.mcps ?? [...It.mcps], p = !e && r.length === 0, A = {
|
|
2279
2282
|
messages: p ? [
|
|
2280
|
-
{ role:
|
|
2281
|
-
{ role: bn, content:
|
|
2282
|
-
] : [{ role: bn, content:
|
|
2283
|
+
{ role: Aa, content: u },
|
|
2284
|
+
{ role: bn, content: t }
|
|
2285
|
+
] : [{ role: bn, content: t }],
|
|
2283
2286
|
model: l,
|
|
2284
2287
|
model_kwargs: m,
|
|
2285
2288
|
mcps: h,
|
|
@@ -2291,10 +2294,10 @@ function ba({
|
|
|
2291
2294
|
};
|
|
2292
2295
|
return e && (A.chat_id = e), p && (A.auto_title = !1), A;
|
|
2293
2296
|
}
|
|
2294
|
-
function
|
|
2295
|
-
const
|
|
2296
|
-
if (!
|
|
2297
|
-
const r =
|
|
2297
|
+
function wa(e) {
|
|
2298
|
+
const t = e.trim();
|
|
2299
|
+
if (!t.startsWith("data:")) return null;
|
|
2300
|
+
const r = t.slice(5).trim();
|
|
2298
2301
|
if (!r) return null;
|
|
2299
2302
|
try {
|
|
2300
2303
|
return JSON.parse(r);
|
|
@@ -2302,7 +2305,7 @@ function ya(e) {
|
|
|
2302
2305
|
return null;
|
|
2303
2306
|
}
|
|
2304
2307
|
}
|
|
2305
|
-
async function
|
|
2308
|
+
async function Na(e) {
|
|
2306
2309
|
var p, T, A;
|
|
2307
2310
|
if ((e.headers.get("content-type") ?? "").includes("application/json")) {
|
|
2308
2311
|
const E = (p = (await e.json()).items) == null ? void 0 : p[0];
|
|
@@ -2329,7 +2332,7 @@ async function Ta(e) {
|
|
|
2329
2332
|
h = !0;
|
|
2330
2333
|
continue;
|
|
2331
2334
|
}
|
|
2332
|
-
const N =
|
|
2335
|
+
const N = wa(w);
|
|
2333
2336
|
if (!N) continue;
|
|
2334
2337
|
if (N.error || h)
|
|
2335
2338
|
throw new Error(
|
|
@@ -2342,16 +2345,16 @@ async function Ta(e) {
|
|
|
2342
2345
|
}
|
|
2343
2346
|
return s ? { text: s, chatId: u, messageId: m } : null;
|
|
2344
2347
|
}
|
|
2345
|
-
async function
|
|
2348
|
+
async function ka({
|
|
2346
2349
|
chatUrl: e,
|
|
2347
|
-
chatId:
|
|
2350
|
+
chatId: t,
|
|
2348
2351
|
userMessage: r,
|
|
2349
2352
|
chatHistory: a,
|
|
2350
2353
|
authorizationToken: l,
|
|
2351
2354
|
config: s
|
|
2352
2355
|
}) {
|
|
2353
|
-
const u =
|
|
2354
|
-
chatId:
|
|
2356
|
+
const u = Sa({
|
|
2357
|
+
chatId: t,
|
|
2355
2358
|
userMessage: r,
|
|
2356
2359
|
chatHistory: a,
|
|
2357
2360
|
config: s
|
|
@@ -2367,58 +2370,58 @@ async function Ea({
|
|
|
2367
2370
|
});
|
|
2368
2371
|
if (!m.ok)
|
|
2369
2372
|
throw new En(m.status, m.statusText);
|
|
2370
|
-
return
|
|
2373
|
+
return Na(m);
|
|
2371
2374
|
}
|
|
2372
|
-
function
|
|
2375
|
+
function Ra(e) {
|
|
2373
2376
|
switch (e) {
|
|
2374
2377
|
case 401:
|
|
2375
2378
|
return {
|
|
2376
|
-
text:
|
|
2379
|
+
text: ho,
|
|
2377
2380
|
type: ve
|
|
2378
2381
|
};
|
|
2379
2382
|
case 403:
|
|
2380
2383
|
return {
|
|
2381
|
-
text:
|
|
2384
|
+
text: _o,
|
|
2382
2385
|
type: ve
|
|
2383
2386
|
};
|
|
2384
2387
|
case 404:
|
|
2385
2388
|
return {
|
|
2386
|
-
text:
|
|
2389
|
+
text: go,
|
|
2387
2390
|
type: ve
|
|
2388
2391
|
};
|
|
2389
2392
|
case 408:
|
|
2390
2393
|
case 504:
|
|
2391
2394
|
return {
|
|
2392
|
-
text:
|
|
2395
|
+
text: bo,
|
|
2393
2396
|
type: Kt
|
|
2394
2397
|
};
|
|
2395
2398
|
case 429:
|
|
2396
2399
|
return {
|
|
2397
|
-
text:
|
|
2400
|
+
text: yo,
|
|
2398
2401
|
type: Kt
|
|
2399
2402
|
};
|
|
2400
2403
|
default:
|
|
2401
2404
|
return e >= 500 ? {
|
|
2402
|
-
text:
|
|
2405
|
+
text: To,
|
|
2403
2406
|
type: ve
|
|
2404
2407
|
} : {
|
|
2405
|
-
text:
|
|
2408
|
+
text: cr,
|
|
2406
2409
|
type: ve
|
|
2407
2410
|
};
|
|
2408
2411
|
}
|
|
2409
2412
|
}
|
|
2410
|
-
function
|
|
2411
|
-
return e instanceof En ?
|
|
2412
|
-
text:
|
|
2413
|
+
function Ia(e) {
|
|
2414
|
+
return e instanceof En ? Ra(e.status) : e instanceof TypeError ? {
|
|
2415
|
+
text: Eo,
|
|
2413
2416
|
type: ve
|
|
2414
2417
|
} : {
|
|
2415
|
-
text:
|
|
2418
|
+
text: cr,
|
|
2416
2419
|
type: ve
|
|
2417
2420
|
};
|
|
2418
2421
|
}
|
|
2419
|
-
const
|
|
2422
|
+
const Ca = 55e3, yn = "fallback", va = async ({
|
|
2420
2423
|
chatId: e = void 0,
|
|
2421
|
-
chatUrl:
|
|
2424
|
+
chatUrl: t,
|
|
2422
2425
|
userMessage: r,
|
|
2423
2426
|
userInputDeviceLastUsed: a,
|
|
2424
2427
|
chatHistory: l,
|
|
@@ -2428,9 +2431,9 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2428
2431
|
}) => {
|
|
2429
2432
|
let h;
|
|
2430
2433
|
try {
|
|
2431
|
-
if (
|
|
2432
|
-
const w = await
|
|
2433
|
-
chatUrl:
|
|
2434
|
+
if (Ta(t)) {
|
|
2435
|
+
const w = await ka({
|
|
2436
|
+
chatUrl: t,
|
|
2434
2437
|
chatId: e,
|
|
2435
2438
|
userMessage: r,
|
|
2436
2439
|
chatHistory: l,
|
|
@@ -2451,7 +2454,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2451
2454
|
chatHistory: l,
|
|
2452
2455
|
canvasHistory: s
|
|
2453
2456
|
}, E = new AbortController(), k = An(
|
|
2454
|
-
|
|
2457
|
+
t,
|
|
2455
2458
|
_,
|
|
2456
2459
|
{ authorizationToken: u, signal: E.signal }
|
|
2457
2460
|
), O = new Promise(
|
|
@@ -2465,12 +2468,12 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2465
2468
|
}
|
|
2466
2469
|
]
|
|
2467
2470
|
});
|
|
2468
|
-
},
|
|
2471
|
+
}, Ca)
|
|
2469
2472
|
);
|
|
2470
2473
|
h = await Promise.race([k, O]);
|
|
2471
2474
|
} catch (_) {
|
|
2472
2475
|
console.error("Error in getNewAgentMessage", _);
|
|
2473
|
-
const { text: E, type: k } =
|
|
2476
|
+
const { text: E, type: k } = Ia(_);
|
|
2474
2477
|
return {
|
|
2475
2478
|
text: E,
|
|
2476
2479
|
type: k,
|
|
@@ -2492,11 +2495,11 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2492
2495
|
type: p.type,
|
|
2493
2496
|
...p.element != null && { element: p.element }
|
|
2494
2497
|
};
|
|
2495
|
-
},
|
|
2498
|
+
}, Oa = (e) => new Date(e).toLocaleDateString("en-GB", {
|
|
2496
2499
|
day: "numeric",
|
|
2497
2500
|
month: "short",
|
|
2498
2501
|
year: "numeric"
|
|
2499
|
-
}),
|
|
2502
|
+
}), La = [
|
|
2500
2503
|
{
|
|
2501
2504
|
field: "title",
|
|
2502
2505
|
headerName: "Conversation",
|
|
@@ -2506,28 +2509,28 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2506
2509
|
field: "updatedAt",
|
|
2507
2510
|
headerName: "Last Conversation",
|
|
2508
2511
|
width: 140,
|
|
2509
|
-
valueFormatter: ({ value: e }) =>
|
|
2512
|
+
valueFormatter: ({ value: e }) => Oa(e)
|
|
2510
2513
|
}
|
|
2511
|
-
],
|
|
2514
|
+
], Da = {
|
|
2512
2515
|
sortable: !1,
|
|
2513
2516
|
filter: !1,
|
|
2514
2517
|
resizable: !1,
|
|
2515
2518
|
editable: !1,
|
|
2516
2519
|
suppressHeaderMenuButton: !0
|
|
2517
|
-
}, fn = "NONE",
|
|
2518
|
-
if (
|
|
2520
|
+
}, fn = "NONE", Ma = "KEYBOARD", xa = "VOICE", Pa = "MIXED", Ua = 2e4, Fa = 15, Ha = (e, t) => new Promise((r) => {
|
|
2521
|
+
if (t != null && t.aborted) {
|
|
2519
2522
|
r(!1);
|
|
2520
2523
|
return;
|
|
2521
2524
|
}
|
|
2522
2525
|
const a = setTimeout(() => {
|
|
2523
|
-
|
|
2526
|
+
t == null || t.removeEventListener("abort", l), r(!0);
|
|
2524
2527
|
}, e), l = () => {
|
|
2525
2528
|
clearTimeout(a), r(!1);
|
|
2526
2529
|
};
|
|
2527
|
-
|
|
2528
|
-
}),
|
|
2530
|
+
t == null || t.addEventListener("abort", l);
|
|
2531
|
+
}), za = ({
|
|
2529
2532
|
title: e,
|
|
2530
|
-
connector:
|
|
2533
|
+
connector: t,
|
|
2531
2534
|
newChatUrl: r,
|
|
2532
2535
|
lockConversation: a = !1,
|
|
2533
2536
|
messageLimit: l,
|
|
@@ -2564,12 +2567,12 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2564
2567
|
}
|
|
2565
2568
|
})(), de = x(!1), b = (c) => {
|
|
2566
2569
|
de.current = c;
|
|
2567
|
-
}, L =
|
|
2570
|
+
}, L = Lo(), B = x(null), re = x(null), D = x(null), W = x(null), he = x(null), Le = x(null), [xe, F] = M(
|
|
2568
2571
|
() => s ? "" : _ ?? ""
|
|
2569
2572
|
), [oe, _t] = M(s), [Q, gt] = M([]), [qt, Ot] = M([]), et = (c) => {
|
|
2570
2573
|
(!de.current || c.id === "DEEP_THINKING_MESSAGE") && gt((y) => [...y, c]);
|
|
2571
|
-
}, [We, Pe] = M(!1), [P, tt] = M(!1), [Y, nt] = M(!1), $ = x(!1), Ne = x(null), bt = x(!1), [Ee, Lt] = M(!1), [$e, rt] = M(fn), [Ue, Ae] = M(!1), [Ye, ke] = M(!0), [ot, je] = M(!1), [Fe, at] = M("getting-started"), [De, Ke] = M([]), [st, yt] = M(!1), Ve =
|
|
2572
|
-
|
|
2574
|
+
}, [We, Pe] = M(!1), [P, tt] = M(!1), [Y, nt] = M(!1), $ = x(!1), Ne = x(null), bt = x(!1), [Ee, Lt] = M(!1), [$e, rt] = M(fn), [Ue, Ae] = M(!1), [Ye, ke] = M(!0), [ot, je] = M(!1), [Fe, at] = M("getting-started"), [De, Ke] = M([]), [st, yt] = M(!1), Ve = Mo(l, 0), it = Ve > 0 && Q.length >= Ve, Tt = We || P;
|
|
2575
|
+
Oo(() => {
|
|
2573
2576
|
if (!!(_ != null && _.trim()) && !s || J == null && !_) return;
|
|
2574
2577
|
const y = setTimeout(() => {
|
|
2575
2578
|
var I;
|
|
@@ -2598,9 +2601,9 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2598
2601
|
p && p.length > 0 && gt(p);
|
|
2599
2602
|
}, [p]);
|
|
2600
2603
|
const Xe = async (c = oe) => {
|
|
2601
|
-
if (!
|
|
2604
|
+
if (!t.canLoadHistory || !c) return;
|
|
2602
2605
|
tt(!0);
|
|
2603
|
-
const y = await
|
|
2606
|
+
const y = await t.loadHistory(c);
|
|
2604
2607
|
if (L.current) {
|
|
2605
2608
|
if (JSON.stringify(y) === JSON.stringify(Q) || !y) {
|
|
2606
2609
|
tt(!1);
|
|
@@ -2612,15 +2615,15 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2612
2615
|
V(() => {
|
|
2613
2616
|
A && !de.current && Xe();
|
|
2614
2617
|
}, [A]), V(() => {
|
|
2615
|
-
L.current &&
|
|
2616
|
-
}, [s,
|
|
2618
|
+
L.current && t.canLoadHistory && s && (Ee || Xe(s));
|
|
2619
|
+
}, [s, t.canLoadHistory, Ee]), nr(() => {
|
|
2617
2620
|
D.current && D.current.scrollTo({
|
|
2618
2621
|
top: D.current.scrollHeight,
|
|
2619
2622
|
behavior: "smooth"
|
|
2620
2623
|
});
|
|
2621
2624
|
}, [Q]);
|
|
2622
2625
|
const Et = (c) => {
|
|
2623
|
-
const y =
|
|
2626
|
+
const y = Po(c), I = /\['Canvas_Element_ID'\s*:\s*'([^']+)',\s*'Title'\s*:\s*'([^']+)'\]/g;
|
|
2624
2627
|
return y.replace(
|
|
2625
2628
|
I,
|
|
2626
2629
|
(ce, ye, fe) => `<span class="chat-panel__message-tag">@${fe}</span>`
|
|
@@ -2633,7 +2636,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2633
2636
|
const ce = new Set(Q.map(({ id: Ft }) => Ft));
|
|
2634
2637
|
let ye = 0, fe;
|
|
2635
2638
|
for (; ye < c; ) {
|
|
2636
|
-
if (I != null && I.aborted || !await
|
|
2639
|
+
if (I != null && I.aborted || !await Ha(Ua, I) || (fe = await Xe(y), I != null && I.aborted)) return;
|
|
2637
2640
|
if (((fe == null ? void 0 : fe.chatItems) || []).some(
|
|
2638
2641
|
(Ht) => Ht.type !== ht && !ce.has(Ht.id)
|
|
2639
2642
|
)) break;
|
|
@@ -2641,7 +2644,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2641
2644
|
}
|
|
2642
2645
|
if (Number.isFinite(c) && ye >= c) {
|
|
2643
2646
|
et({
|
|
2644
|
-
text:
|
|
2647
|
+
text: Ao,
|
|
2645
2648
|
id: yn,
|
|
2646
2649
|
type: ve
|
|
2647
2650
|
});
|
|
@@ -2655,7 +2658,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2655
2658
|
}, 0);
|
|
2656
2659
|
}, lt = async (c) => {
|
|
2657
2660
|
Ot(null), Pe(!0);
|
|
2658
|
-
const y = await
|
|
2661
|
+
const y = await t.sendMessage({
|
|
2659
2662
|
chatId: oe,
|
|
2660
2663
|
userMessage: c,
|
|
2661
2664
|
userInputDeviceLastUsed: $e,
|
|
@@ -2672,7 +2675,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2672
2675
|
Ne.current = new AbortController();
|
|
2673
2676
|
try {
|
|
2674
2677
|
await Mt({
|
|
2675
|
-
maxAttempts:
|
|
2678
|
+
maxAttempts: Fa,
|
|
2676
2679
|
chatIdToFetch: I,
|
|
2677
2680
|
signal: Ne.current.signal
|
|
2678
2681
|
});
|
|
@@ -2683,11 +2686,11 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2683
2686
|
return;
|
|
2684
2687
|
}
|
|
2685
2688
|
if (y.hardStopped === !0) {
|
|
2686
|
-
!$.current &&
|
|
2689
|
+
!$.current && t.canSendNotification && oe && await t.sendNotification({ chatId: oe }) && ($.current = !0), L.current && (nt(!0), Pe(!1), Re());
|
|
2687
2690
|
return;
|
|
2688
2691
|
}
|
|
2689
2692
|
et({
|
|
2690
|
-
text:
|
|
2693
|
+
text: ba(y.text),
|
|
2691
2694
|
type: y.type,
|
|
2692
2695
|
id: y.id,
|
|
2693
2696
|
...y.element != null && { element: y.element }
|
|
@@ -2698,7 +2701,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2698
2701
|
} = {}) => {
|
|
2699
2702
|
var ye;
|
|
2700
2703
|
let I = null;
|
|
2701
|
-
if (c != null && c.trim() !== "" && (I = c.trim()), I === null && (I =
|
|
2704
|
+
if (c != null && c.trim() !== "" && (I = c.trim()), I === null && (I = ya(xe).trim()), !I || We || P) return;
|
|
2702
2705
|
const ce = Q.slice().reverse().find((fe) => fe.type === ht);
|
|
2703
2706
|
if (!y && ce && ce.text === I) {
|
|
2704
2707
|
console.warn("Duplicate message detected, not adding:", I);
|
|
@@ -2707,7 +2710,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2707
2710
|
(ye = Le.current) == null || ye.cancel(), be(), nt(!1), $.current = !1, et({
|
|
2708
2711
|
type: ht,
|
|
2709
2712
|
text: I,
|
|
2710
|
-
id:
|
|
2713
|
+
id: Do()
|
|
2711
2714
|
}), F(""), Re(), b(!1), await lt(I), rt(fn);
|
|
2712
2715
|
};
|
|
2713
2716
|
V(() => {
|
|
@@ -2720,7 +2723,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2720
2723
|
}, []);
|
|
2721
2724
|
const be = () => {
|
|
2722
2725
|
he.current && (he.current.stop(), he.current = null), Ae(!1), W.current && (clearTimeout(W.current), W.current = null);
|
|
2723
|
-
}, ut =
|
|
2726
|
+
}, ut = Dr((c) => {
|
|
2724
2727
|
be(), c.trim().length > 0 && Ye && ee();
|
|
2725
2728
|
}, h);
|
|
2726
2729
|
Le.current = ut;
|
|
@@ -2730,12 +2733,12 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2730
2733
|
return;
|
|
2731
2734
|
}
|
|
2732
2735
|
if ($e !== c) {
|
|
2733
|
-
rt(
|
|
2736
|
+
rt(Pa);
|
|
2734
2737
|
return;
|
|
2735
2738
|
}
|
|
2736
2739
|
}, Xt = () => {
|
|
2737
2740
|
if (We || P) return;
|
|
2738
|
-
dt(
|
|
2741
|
+
dt(xa), ke(!0);
|
|
2739
2742
|
const c = new window.webkitSpeechRecognition();
|
|
2740
2743
|
he.current = c, c.continuous = !0, c.interimResults = !0, c.lang = m, c.start(), c.onstart = () => {
|
|
2741
2744
|
Ae(!0);
|
|
@@ -2755,9 +2758,9 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2755
2758
|
},
|
|
2756
2759
|
[]
|
|
2757
2760
|
), V(() => {
|
|
2758
|
-
if (!
|
|
2761
|
+
if (!t.canListInteractions) return;
|
|
2759
2762
|
let c = !1;
|
|
2760
|
-
return yt(!0),
|
|
2763
|
+
return yt(!0), t.listInteractions().then((y) => {
|
|
2761
2764
|
c || Ke(y ?? []);
|
|
2762
2765
|
}).catch(() => {
|
|
2763
2766
|
c || Ke([]);
|
|
@@ -2766,7 +2769,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2766
2769
|
}), () => {
|
|
2767
2770
|
c = !0;
|
|
2768
2771
|
};
|
|
2769
|
-
}, [
|
|
2772
|
+
}, [t]);
|
|
2770
2773
|
const Pt = () => E != null && E.length ? E.map((c) => {
|
|
2771
2774
|
let y = c.url;
|
|
2772
2775
|
return oe && y.includes("/chat-id/") && (y.match(/\/chat-id\/[^/]+$/) || (y = `${y}${oe}`)), {
|
|
@@ -2776,7 +2779,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2776
2779
|
icon: c.icon
|
|
2777
2780
|
};
|
|
2778
2781
|
}) : [], St = (c) => {
|
|
2779
|
-
c.key !== "Enter" && (dt(
|
|
2782
|
+
c.key !== "Enter" && (dt(Ma), Ue && ke(!1), c.key === "/" && xe.length === 0 && (E != null && E.length) && (je(!0), c.preventDefault())), c.key === "Enter" && !c.shiftKey && (c.preventDefault(), At && ee({ allowDoubleMessage: !0 })), c.key === "Escape" && ot && je(!1);
|
|
2780
2783
|
}, Zt = () => {
|
|
2781
2784
|
je(!1), setTimeout(() => {
|
|
2782
2785
|
var c;
|
|
@@ -2786,13 +2789,13 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2786
2789
|
F(c), setTimeout(() => {
|
|
2787
2790
|
B.current && (B.current.focus(), B.current.selectionStart = B.current.value.length, B.current.selectionEnd = B.current.value.length);
|
|
2788
2791
|
}, 0);
|
|
2789
|
-
}, []), Jt = Wt(async () => !
|
|
2792
|
+
}, []), Jt = Wt(async () => !t.canSendNotification || !oe ? !1 : t.sendNotification({ chatId: oe }), [oe, t]), Ut = Wt(() => {
|
|
2790
2793
|
nt(!1), U == null || U();
|
|
2791
2794
|
}, [U]), j = Wt(
|
|
2792
2795
|
(c, y) => {
|
|
2793
|
-
oe &&
|
|
2796
|
+
oe && t.rateMessage({ rating: c, messageId: y, chatId: oe });
|
|
2794
2797
|
},
|
|
2795
|
-
[oe,
|
|
2798
|
+
[oe, t]
|
|
2796
2799
|
);
|
|
2797
2800
|
return /* @__PURE__ */ S("section", { "aria-label": e ? `Chat Panel: ${e}` : "Chat Panel", className: "chat-panel", children: [
|
|
2798
2801
|
r && Q.length > 0 && /* @__PURE__ */ i("section", { className: "chat-panel__active-chat-header", children: /* @__PURE__ */ i(
|
|
@@ -2818,14 +2821,14 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2818
2821
|
Q.map((c, y) => {
|
|
2819
2822
|
const I = y === Q.length - 1, ce = I ? qt : void 0, ye = c.id === yn, fe = I;
|
|
2820
2823
|
return /* @__PURE__ */ i(
|
|
2821
|
-
|
|
2824
|
+
mo,
|
|
2822
2825
|
{
|
|
2823
2826
|
id: c.id,
|
|
2824
2827
|
type: c.type,
|
|
2825
2828
|
text: c.text,
|
|
2826
2829
|
chatId: oe,
|
|
2827
|
-
onRate:
|
|
2828
|
-
ratingPopupUrls:
|
|
2830
|
+
onRate: t.canRate ? j : void 0,
|
|
2831
|
+
ratingPopupUrls: t.ratingPopupUrls,
|
|
2829
2832
|
showRating: fe,
|
|
2830
2833
|
followUpPrompts: ce,
|
|
2831
2834
|
onFollowUpPromptClick: Ze,
|
|
@@ -2837,9 +2840,9 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2837
2840
|
);
|
|
2838
2841
|
}),
|
|
2839
2842
|
Tt && /* @__PURE__ */ i(
|
|
2840
|
-
|
|
2843
|
+
vo,
|
|
2841
2844
|
{
|
|
2842
|
-
showNotifyLaterButton:
|
|
2845
|
+
showNotifyLaterButton: t.canSendNotification && !!oe,
|
|
2843
2846
|
onNotifyLater: Jt,
|
|
2844
2847
|
onNotificationRegisteredGotIt: Ut
|
|
2845
2848
|
}
|
|
@@ -2875,14 +2878,14 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2875
2878
|
!a && !it && /* @__PURE__ */ S(we, { children: [
|
|
2876
2879
|
Q.length === 0 && !P && /* @__PURE__ */ S("div", { className: "chat-panel__chat-intro", children: [
|
|
2877
2880
|
/* @__PURE__ */ S("div", { className: "chat-panel__chat-intro-frame", children: [
|
|
2878
|
-
/* @__PURE__ */ i("span", { className: "chat-panel__chat-intro-icon", children: /* @__PURE__ */ i(
|
|
2881
|
+
/* @__PURE__ */ i("span", { className: "chat-panel__chat-intro-icon", children: /* @__PURE__ */ i(Mr, {}) }),
|
|
2879
2882
|
/* @__PURE__ */ i("h3", { className: "chat-panel__chat-intro-heading", children: z })
|
|
2880
2883
|
] }),
|
|
2881
2884
|
/* @__PURE__ */ i("p", { className: "chat-panel__chat-intro-body", children: K })
|
|
2882
2885
|
] }),
|
|
2883
2886
|
/* @__PURE__ */ i("div", { className: "chat-panel__input-container", children: /* @__PURE__ */ S("div", { className: "chat-panel__input-wrapper", ref: re, children: [
|
|
2884
2887
|
ot && /* @__PURE__ */ i(
|
|
2885
|
-
|
|
2888
|
+
lr,
|
|
2886
2889
|
{
|
|
2887
2890
|
anchorRef: re,
|
|
2888
2891
|
menuItems: Pt(),
|
|
@@ -2891,7 +2894,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2891
2894
|
}
|
|
2892
2895
|
),
|
|
2893
2896
|
/* @__PURE__ */ i(
|
|
2894
|
-
|
|
2897
|
+
ir,
|
|
2895
2898
|
{
|
|
2896
2899
|
ref: B,
|
|
2897
2900
|
value: xe,
|
|
@@ -2951,7 +2954,7 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
2951
2954
|
/* @__PURE__ */ S("div", { className: "chat-panel__tab-content", children: [
|
|
2952
2955
|
Fe === "getting-started" && /* @__PURE__ */ S(we, { children: [
|
|
2953
2956
|
G.length > 0 && /* @__PURE__ */ i("div", { className: "chat-panel__sample-prompt-container", children: /* @__PURE__ */ i(
|
|
2954
|
-
|
|
2957
|
+
Ur,
|
|
2955
2958
|
{
|
|
2956
2959
|
onSelectPrompt: (c) => {
|
|
2957
2960
|
ee({
|
|
@@ -3001,18 +3004,18 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
3001
3004
|
] })
|
|
3002
3005
|
] }),
|
|
3003
3006
|
Fe === "recent" && /* @__PURE__ */ i("div", { className: "chat-panel__tab-panel--recent", children: st ? /* @__PURE__ */ i("div", { className: "chat-panel__ai-interactions-loading", children: "Loading..." }) : De.length === 0 ? /* @__PURE__ */ i("div", { className: "chat-panel__ai-interactions-empty", children: "No previous chats found." }) : /* @__PURE__ */ i(
|
|
3004
|
-
|
|
3007
|
+
kr,
|
|
3005
3008
|
{
|
|
3006
3009
|
wrapperClassName: "chat-panel__ai-interactions-table",
|
|
3007
3010
|
hasSearch: !1,
|
|
3008
3011
|
tableTheme: "tidy",
|
|
3009
3012
|
domLayout: "autoHeight",
|
|
3010
3013
|
rowData: De,
|
|
3011
|
-
columnDefs:
|
|
3012
|
-
defaultColDef:
|
|
3014
|
+
columnDefs: La,
|
|
3015
|
+
defaultColDef: Da,
|
|
3013
3016
|
getRowId: ({ data: c }) => c.id,
|
|
3014
3017
|
onRowClicked: ({ data: c }) => {
|
|
3015
|
-
!c || !
|
|
3018
|
+
!c || !t.canLoadHistory || (_t(c.chatId), Xe(c.chatId));
|
|
3016
3019
|
}
|
|
3017
3020
|
}
|
|
3018
3021
|
) })
|
|
@@ -3021,33 +3024,63 @@ const wa = 55e3, yn = "fallback", Na = async ({
|
|
|
3021
3024
|
it && /* @__PURE__ */ i("div", { className: "chat-panel-footer", children: "You've reached the maximum number of messages for this conversation" })
|
|
3022
3025
|
] });
|
|
3023
3026
|
};
|
|
3024
|
-
|
|
3027
|
+
class Ga {
|
|
3028
|
+
constructor() {
|
|
3029
|
+
Ln(this, "events");
|
|
3030
|
+
this.events = {};
|
|
3031
|
+
}
|
|
3032
|
+
subscribe(t, r) {
|
|
3033
|
+
const a = crypto.randomUUID();
|
|
3034
|
+
return this.events[t] = this.events[t] ?? {}, this.events[t][a] = r, a;
|
|
3035
|
+
}
|
|
3036
|
+
unsubscribe(t, r) {
|
|
3037
|
+
typeof this.events[t] < "u" && delete this.events[t][r];
|
|
3038
|
+
}
|
|
3039
|
+
publish(t, r) {
|
|
3040
|
+
this.events[t] && Object.keys(this.events[t]).forEach((a) => {
|
|
3041
|
+
const l = this.events[t][a];
|
|
3042
|
+
l == null || l(r);
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
const er = new Ga();
|
|
3047
|
+
function es({ isOpen: e, ...t }) {
|
|
3048
|
+
const { onClose: r } = t;
|
|
3049
|
+
return V(() => {
|
|
3050
|
+
const a = er.subscribe("ds-remove-slideover", () => r == null ? void 0 : r());
|
|
3051
|
+
return () => er.unsubscribe("ds-remove-slideover", a);
|
|
3052
|
+
}, [r]), e ? rr(
|
|
3053
|
+
/* @__PURE__ */ i(Rr, { children: /* @__PURE__ */ i("div", { className: "ask-arbor-widget__panel", children: /* @__PURE__ */ i(za, { ...t, focusDelay: 200 }) }) }),
|
|
3054
|
+
document.body
|
|
3055
|
+
) : null;
|
|
3056
|
+
}
|
|
3057
|
+
function Ba(e) {
|
|
3025
3058
|
switch (e.toLowerCase()) {
|
|
3026
3059
|
case bn:
|
|
3027
3060
|
return ht;
|
|
3028
|
-
case
|
|
3061
|
+
case Ea:
|
|
3029
3062
|
return jt;
|
|
3030
3063
|
default:
|
|
3031
3064
|
return null;
|
|
3032
3065
|
}
|
|
3033
3066
|
}
|
|
3034
|
-
function
|
|
3035
|
-
const
|
|
3067
|
+
function Wa(e) {
|
|
3068
|
+
const t = [];
|
|
3036
3069
|
for (const r of e.messages ?? []) {
|
|
3037
|
-
const a =
|
|
3038
|
-
!a || !r.content ||
|
|
3070
|
+
const a = Ba(r.role);
|
|
3071
|
+
!a || !r.content || t.push({
|
|
3039
3072
|
id: r.message_id,
|
|
3040
3073
|
type: a,
|
|
3041
3074
|
text: r.content
|
|
3042
3075
|
});
|
|
3043
3076
|
}
|
|
3044
|
-
return { chatItems:
|
|
3077
|
+
return { chatItems: t, followUpPrompts: [] };
|
|
3045
3078
|
}
|
|
3046
|
-
const
|
|
3079
|
+
const $a = async (e, t) => {
|
|
3047
3080
|
try {
|
|
3048
|
-
const r = await
|
|
3049
|
-
if (
|
|
3050
|
-
return
|
|
3081
|
+
const r = await mr(e, void 0, void 0, t);
|
|
3082
|
+
if (hr(e) && Array.isArray(r == null ? void 0 : r.messages))
|
|
3083
|
+
return Wa(r);
|
|
3051
3084
|
if (!(r != null && r.items))
|
|
3052
3085
|
return console.error("Invalid response in getHistoricMessages", e, r), { chatItems: [], followUpPrompts: [] };
|
|
3053
3086
|
let a = [], l = [];
|
|
@@ -3082,43 +3115,43 @@ const Ua = async (e, n) => {
|
|
|
3082
3115
|
} catch (r) {
|
|
3083
3116
|
return console.error("Error in getHistoricMessages", r, e), { chatItems: [], followUpPrompts: [] };
|
|
3084
3117
|
}
|
|
3085
|
-
},
|
|
3118
|
+
}, Ya = async ({
|
|
3086
3119
|
rating: e,
|
|
3087
|
-
messageId:
|
|
3120
|
+
messageId: t,
|
|
3088
3121
|
chatId: r,
|
|
3089
3122
|
ratingUrl: a,
|
|
3090
3123
|
authorizationToken: l
|
|
3091
3124
|
}) => {
|
|
3092
3125
|
try {
|
|
3093
|
-
await An(a, { messageId:
|
|
3126
|
+
await An(a, { messageId: t, rating: e, chatId: r }, { authorizationToken: l });
|
|
3094
3127
|
} catch (s) {
|
|
3095
3128
|
console.error("Error rating message", s);
|
|
3096
3129
|
}
|
|
3097
|
-
},
|
|
3130
|
+
}, ja = async ({
|
|
3098
3131
|
chatId: e,
|
|
3099
|
-
notificationCallbackUrl:
|
|
3132
|
+
notificationCallbackUrl: t,
|
|
3100
3133
|
authorizationToken: r
|
|
3101
3134
|
}) => {
|
|
3102
3135
|
try {
|
|
3103
|
-
return await An(
|
|
3136
|
+
return await An(t, { chatId: e }, { authorizationToken: r }), !0;
|
|
3104
3137
|
} catch (a) {
|
|
3105
3138
|
return console.error("Error sending notification", a), !1;
|
|
3106
3139
|
}
|
|
3107
3140
|
};
|
|
3108
|
-
function
|
|
3109
|
-
return (e.conversations ?? []).map((
|
|
3141
|
+
function Ka(e) {
|
|
3142
|
+
return (e.conversations ?? []).map((t) => {
|
|
3110
3143
|
var r, a;
|
|
3111
3144
|
return {
|
|
3112
|
-
id:
|
|
3113
|
-
chatId:
|
|
3114
|
-
title: ((r =
|
|
3115
|
-
updatedAt:
|
|
3145
|
+
id: t.session_id,
|
|
3146
|
+
chatId: t.session_id,
|
|
3147
|
+
title: ((r = t.title) == null ? void 0 : r.trim()) || ((a = t.preview) == null ? void 0 : a.trim()) || "Untitled conversation",
|
|
3148
|
+
updatedAt: t.updated_at ?? t.created_at ?? ""
|
|
3116
3149
|
};
|
|
3117
3150
|
});
|
|
3118
3151
|
}
|
|
3119
|
-
class
|
|
3120
|
-
constructor(
|
|
3121
|
-
this.config =
|
|
3152
|
+
class Va {
|
|
3153
|
+
constructor(t) {
|
|
3154
|
+
this.config = t;
|
|
3122
3155
|
}
|
|
3123
3156
|
get canRate() {
|
|
3124
3157
|
return !!this.config.ratingUrl;
|
|
@@ -3138,60 +3171,60 @@ class Ga {
|
|
|
3138
3171
|
down: this.config.downRatingPopupUrl
|
|
3139
3172
|
};
|
|
3140
3173
|
}
|
|
3141
|
-
async sendMessage(
|
|
3142
|
-
return
|
|
3174
|
+
async sendMessage(t) {
|
|
3175
|
+
return va({
|
|
3143
3176
|
chatUrl: this.config.chatUrl,
|
|
3144
3177
|
authorizationToken: this.config.authorizationToken,
|
|
3145
3178
|
agentCompletionsConfig: this.config.agentCompletionsConfig,
|
|
3146
|
-
...
|
|
3179
|
+
...t
|
|
3147
3180
|
});
|
|
3148
3181
|
}
|
|
3149
|
-
async loadHistory(
|
|
3150
|
-
return this.config.historicChatUrl ?
|
|
3151
|
-
`${this.config.historicChatUrl}/${
|
|
3182
|
+
async loadHistory(t) {
|
|
3183
|
+
return this.config.historicChatUrl ? $a(
|
|
3184
|
+
`${this.config.historicChatUrl}/${t}`,
|
|
3152
3185
|
this.config.authorizationToken
|
|
3153
3186
|
) : null;
|
|
3154
3187
|
}
|
|
3155
3188
|
async listInteractions() {
|
|
3156
3189
|
if (!this.config.aiInteractionsUrl) return null;
|
|
3157
3190
|
try {
|
|
3158
|
-
const
|
|
3191
|
+
const t = await mr(
|
|
3159
3192
|
this.config.aiInteractionsUrl,
|
|
3160
3193
|
void 0,
|
|
3161
3194
|
void 0,
|
|
3162
3195
|
this.config.authorizationToken
|
|
3163
3196
|
);
|
|
3164
|
-
return
|
|
3165
|
-
|
|
3166
|
-
) : Array.isArray(
|
|
3197
|
+
return hr(this.config.aiInteractionsUrl) && Array.isArray(t.conversations) ? Ka(
|
|
3198
|
+
t
|
|
3199
|
+
) : Array.isArray(t) ? t : Array.isArray(t.items) ? t.items : [];
|
|
3167
3200
|
} catch {
|
|
3168
3201
|
return null;
|
|
3169
3202
|
}
|
|
3170
3203
|
}
|
|
3171
|
-
async rateMessage(
|
|
3172
|
-
this.config.ratingUrl && await
|
|
3204
|
+
async rateMessage(t) {
|
|
3205
|
+
this.config.ratingUrl && await Ya({
|
|
3173
3206
|
ratingUrl: this.config.ratingUrl,
|
|
3174
3207
|
authorizationToken: this.config.authorizationToken,
|
|
3175
|
-
...
|
|
3208
|
+
...t
|
|
3176
3209
|
});
|
|
3177
3210
|
}
|
|
3178
|
-
async sendNotification(
|
|
3179
|
-
return this.config.notificationCallbackUrl ?
|
|
3211
|
+
async sendNotification(t) {
|
|
3212
|
+
return this.config.notificationCallbackUrl ? ja({
|
|
3180
3213
|
notificationCallbackUrl: this.config.notificationCallbackUrl,
|
|
3181
3214
|
authorizationToken: this.config.authorizationToken,
|
|
3182
|
-
...
|
|
3215
|
+
...t
|
|
3183
3216
|
}) : !1;
|
|
3184
3217
|
}
|
|
3185
3218
|
}
|
|
3186
|
-
const
|
|
3219
|
+
const ts = {
|
|
3187
3220
|
create(e) {
|
|
3188
|
-
const
|
|
3221
|
+
const t = e.model || e.agentName || e.systemPrompt || e.mcps ? {
|
|
3189
3222
|
...e.model && { model: e.model },
|
|
3190
3223
|
...e.agentName && { agentName: e.agentName },
|
|
3191
3224
|
...e.systemPrompt && { systemPrompt: e.systemPrompt },
|
|
3192
3225
|
...e.mcps && { mcps: e.mcps }
|
|
3193
3226
|
} : void 0;
|
|
3194
|
-
return new
|
|
3227
|
+
return new Va({
|
|
3195
3228
|
chatUrl: e.chatUrl,
|
|
3196
3229
|
authorizationToken: e.authorizationToken ?? void 0,
|
|
3197
3230
|
historicChatUrl: e.historicChatUrl ?? void 0,
|
|
@@ -3200,17 +3233,19 @@ const Ka = {
|
|
|
3200
3233
|
upRatingPopupUrl: e.upRatingPopupUrl ?? void 0,
|
|
3201
3234
|
downRatingPopupUrl: e.downRatingPopupUrl ?? void 0,
|
|
3202
3235
|
notificationCallbackUrl: e.notificationCallbackUrl ?? void 0,
|
|
3203
|
-
agentCompletionsConfig:
|
|
3236
|
+
agentCompletionsConfig: t
|
|
3204
3237
|
});
|
|
3205
3238
|
}
|
|
3206
3239
|
};
|
|
3207
3240
|
export {
|
|
3208
|
-
|
|
3241
|
+
ts as AIServiceConnectorFactory,
|
|
3242
|
+
es as AskArborSlideover,
|
|
3243
|
+
za as AskArborWidget,
|
|
3209
3244
|
jt as CHAT_RESPONSE_TYPE_AGENT,
|
|
3210
3245
|
ve as CHAT_RESPONSE_TYPE_ERROR,
|
|
3211
3246
|
mn as CHAT_RESPONSE_TYPE_INFO,
|
|
3212
3247
|
ht as CHAT_RESPONSE_TYPE_USER,
|
|
3213
3248
|
Kt as CHAT_RESPONSE_TYPE_WARNING,
|
|
3214
|
-
|
|
3215
|
-
|
|
3249
|
+
za as ChatPanel,
|
|
3250
|
+
Va as HttpAIServiceConnector
|
|
3216
3251
|
};
|