@elia-assistant/chatui 1.0.11 → 1.0.13
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 +1 -10
- package/dist/chat-store.js +10 -0
- package/dist/chatui.css +2 -2
- package/dist/chatui.iife.css +2 -2
- package/dist/chatui.iife.js +27 -27
- package/dist/chunks/i18n-BUYd0BSF.js +2 -0
- package/dist/chunks/{i18n-B0xhVAye.js → i18n-DyWy7n71.js} +4 -4
- package/dist/chunks/settingsStore-BRK5844w.js +130 -0
- package/dist/chunks/{translation-CsXAAc6O.js → translation-B7absJaI.js} +9 -5
- package/dist/chunks/{translation-D0S7F5mA.js → translation-D2b_upNC.js} +9 -5
- package/dist/components/InputArea.d.ts +2 -1
- package/dist/hooks/useChat.d.ts +2 -1
- package/dist/hooks/useCta.d.ts +1 -1
- package/dist/hooks/useTheme.d.ts +4 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1145 -996
- package/dist/lib/n8nClient.d.ts +2 -2
- package/dist/store/chatStore.d.ts +5 -0
- package/dist/store.js +1 -1
- package/dist/types/index.d.ts +12 -23
- package/package.json +6 -4
- package/dist/chunks/i18n-23dPrR-0.js +0 -2
- package/dist/chunks/settingsStore-CpRkCJCy.js +0 -254
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as e, i as t, n, r } from "./chunks/i18n-
|
|
2
|
-
import { n as i, r as a, t as o } from "./chunks/settingsStore-
|
|
1
|
+
import { a as e, i as t, n, r } from "./chunks/i18n-DyWy7n71.js";
|
|
2
|
+
import { n as i, r as a, t as o } from "./chunks/settingsStore-BRK5844w.js";
|
|
3
3
|
import { useChatStore as s } from "./chat-store.js";
|
|
4
4
|
import { Children as c, Fragment as l, cloneElement as u, createContext as d, createElement as f, isValidElement as p, useCallback as m, useContext as h, useEffect as g, useMemo as _, useRef as v, useState as y, useSyncExternalStore as b } from "react";
|
|
5
5
|
import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
@@ -38,8 +38,8 @@ var T = Object.create, E = Object.defineProperty, D = Object.getOwnPropertyDescr
|
|
|
38
38
|
track: !0,
|
|
39
39
|
wbr: !0
|
|
40
40
|
};
|
|
41
|
-
})))()),
|
|
42
|
-
function
|
|
41
|
+
})))()), F = /\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;
|
|
42
|
+
function I(e) {
|
|
43
43
|
var t = {
|
|
44
44
|
type: "tag",
|
|
45
45
|
name: "",
|
|
@@ -54,27 +54,27 @@ function F(e) {
|
|
|
54
54
|
comment: r === -1 ? "" : e.slice(4, r)
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
for (var i = new RegExp(
|
|
57
|
+
for (var i = new RegExp(F), a = null; (a = i.exec(e)) !== null;) if (a[0].trim()) if (a[1]) {
|
|
58
58
|
var o = a[1].trim(), s = [o, ""];
|
|
59
59
|
o.indexOf("=") > -1 && (s = o.split("=")), t.attrs[s[0]] = s[1], i.lastIndex--;
|
|
60
60
|
} else a[2] && (t.attrs[a[2]] = a[3].trim().substring(1, a[3].length - 1));
|
|
61
61
|
return t;
|
|
62
62
|
}
|
|
63
|
-
var
|
|
64
|
-
function
|
|
63
|
+
var te = /<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g, ne = /^\s*$/, re = Object.create(null);
|
|
64
|
+
function ie(e, t) {
|
|
65
65
|
switch (t.type) {
|
|
66
66
|
case "text": return e + t.content;
|
|
67
67
|
case "tag": return e += "<" + t.name + (t.attrs ? function(e) {
|
|
68
68
|
var t = [];
|
|
69
69
|
for (var n in e) t.push(n + "=\"" + e[n] + "\"");
|
|
70
70
|
return t.length ? " " + t.join(" ") : "";
|
|
71
|
-
}(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(
|
|
71
|
+
}(t.attrs) : "") + (t.voidElement ? "/>" : ">"), t.voidElement ? e : e + t.children.reduce(ie, "") + "</" + t.name + ">";
|
|
72
72
|
case "comment": return e + "<!--" + t.comment + "-->";
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
var
|
|
75
|
+
var ae = {
|
|
76
76
|
parse: function(e, t) {
|
|
77
|
-
t ||= {}, t.components ||=
|
|
77
|
+
t ||= {}, t.components ||= re;
|
|
78
78
|
var n, r = [], i = [], a = -1, o = !1;
|
|
79
79
|
if (e.indexOf("<") !== 0) {
|
|
80
80
|
var s = e.indexOf("<");
|
|
@@ -83,23 +83,23 @@ var oe = {
|
|
|
83
83
|
content: s === -1 ? e : e.substring(0, s)
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
return e.replace(
|
|
86
|
+
return e.replace(te, function(s, c) {
|
|
87
87
|
if (o) {
|
|
88
88
|
if (s !== "</" + n.name + ">") return;
|
|
89
89
|
o = !1;
|
|
90
90
|
}
|
|
91
91
|
var l, u = s.charAt(1) !== "/", d = s.startsWith("<!--"), f = c + s.length, p = e.charAt(f);
|
|
92
92
|
if (d) {
|
|
93
|
-
var m =
|
|
93
|
+
var m = I(s);
|
|
94
94
|
return a < 0 ? (r.push(m), r) : ((l = i[a]).children.push(m), r);
|
|
95
95
|
}
|
|
96
|
-
if (u && (a++, (n =
|
|
96
|
+
if (u && (a++, (n = I(s)).type === "tag" && t.components[n.name] && (n.type = "component", o = !0), n.voidElement || o || !p || p === "<" || n.children.push({
|
|
97
97
|
type: "text",
|
|
98
98
|
content: e.slice(f, e.indexOf("<", f))
|
|
99
99
|
}), a === 0 && r.push(n), (l = i[a - 1]) && l.children.push(n), i[a] = n), (!u || n.voidElement) && (a > -1 && (n.voidElement || n.name === s.slice(2, -1)) && (a--, n = a === -1 ? r : i[a]), !o && p !== "<" && p)) {
|
|
100
100
|
l = a === -1 ? r : i[a].children;
|
|
101
101
|
var h = e.indexOf("<", f), g = e.slice(f, h === -1 ? void 0 : h);
|
|
102
|
-
|
|
102
|
+
ne.test(g) && (g = " "), (h > -1 && a + l.length >= 0 || g !== " ") && l.push({
|
|
103
103
|
type: "text",
|
|
104
104
|
content: g
|
|
105
105
|
});
|
|
@@ -108,19 +108,19 @@ var oe = {
|
|
|
108
108
|
},
|
|
109
109
|
stringify: function(e) {
|
|
110
110
|
return e.reduce(function(e, t) {
|
|
111
|
-
return e +
|
|
111
|
+
return e + ie("", t);
|
|
112
112
|
}, "");
|
|
113
113
|
}
|
|
114
|
-
},
|
|
114
|
+
}, oe = (e, t, n, r) => {
|
|
115
115
|
let i = [n, {
|
|
116
116
|
code: t,
|
|
117
117
|
...r || {}
|
|
118
118
|
}];
|
|
119
119
|
if (e?.services?.logger?.forward) return e.services.logger.forward(i, "warn", "react-i18next::", !0);
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
},
|
|
120
|
+
L(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), e?.services?.logger?.warn ? e.services.logger.warn(...i) : console?.warn && console.warn(...i);
|
|
121
|
+
}, se = {}, ce = (e, t, n, r) => {
|
|
122
|
+
L(n) && se[n] || (L(n) && (se[n] = /* @__PURE__ */ new Date()), oe(e, t, n, r));
|
|
123
|
+
}, le = (e, t) => () => {
|
|
124
124
|
if (e.isInitialized) t();
|
|
125
125
|
else {
|
|
126
126
|
let n = () => {
|
|
@@ -130,46 +130,46 @@ var oe = {
|
|
|
130
130
|
};
|
|
131
131
|
e.on("initialized", n);
|
|
132
132
|
}
|
|
133
|
-
},
|
|
134
|
-
e.loadNamespaces(t,
|
|
135
|
-
},
|
|
136
|
-
if (
|
|
133
|
+
}, ue = (e, t, n) => {
|
|
134
|
+
e.loadNamespaces(t, le(e, n));
|
|
135
|
+
}, de = (e, t, n, r) => {
|
|
136
|
+
if (L(n) && (n = [n]), e.options.preload && e.options.preload.indexOf(t) > -1) return ue(e, n, r);
|
|
137
137
|
n.forEach((t) => {
|
|
138
138
|
e.options.ns.indexOf(t) < 0 && e.options.ns.push(t);
|
|
139
|
-
}), e.loadLanguages(t,
|
|
140
|
-
},
|
|
139
|
+
}), e.loadLanguages(t, le(e, r));
|
|
140
|
+
}, fe = (e, t, n = {}) => !t.languages || !t.languages.length ? (ce(t, "NO_LANGUAGES", "i18n.languages were undefined or empty", { languages: t.languages }), !0) : t.hasLoadedNamespace(e, {
|
|
141
141
|
lng: n.lng,
|
|
142
142
|
precheck: (t, r) => {
|
|
143
143
|
if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && t.services.backendConnector.backend && t.isLanguageChangingTo && !r(t.isLanguageChangingTo, e)) return !1;
|
|
144
144
|
}
|
|
145
|
-
}),
|
|
145
|
+
}), L = (e) => typeof e == "string", pe = (e) => typeof e == "object" && !!e, me = (e, t) => {
|
|
146
146
|
if (!e) return !1;
|
|
147
147
|
let n = e.props?.children ?? e.children;
|
|
148
148
|
return t ? n.length > 0 : !!n;
|
|
149
|
-
},
|
|
149
|
+
}, he = (e) => {
|
|
150
150
|
if (!e) return [];
|
|
151
151
|
let t = e.props?.children ?? e.children;
|
|
152
|
-
return e.props?.i18nIsDynamicList ?
|
|
153
|
-
},
|
|
152
|
+
return e.props?.i18nIsDynamicList ? _e(t) : t;
|
|
153
|
+
}, ge = (e) => Array.isArray(e) && e.every(p), _e = (e) => Array.isArray(e) ? e : [e], ve = (e, t) => {
|
|
154
154
|
let n = { ...t };
|
|
155
155
|
return n.props = {
|
|
156
156
|
...t.props,
|
|
157
157
|
...e.props
|
|
158
158
|
}, n;
|
|
159
|
-
},
|
|
159
|
+
}, ye = (e) => {
|
|
160
160
|
let t = {};
|
|
161
161
|
if (!e) return t;
|
|
162
162
|
let n = (e) => {
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
_e(e).forEach((e) => {
|
|
164
|
+
L(e) || (me(e) ? n(he(e)) : pe(e) && !p(e) && Object.assign(t, e));
|
|
165
165
|
});
|
|
166
166
|
};
|
|
167
167
|
return n(e), t;
|
|
168
|
-
},
|
|
168
|
+
}, be = (e, t, n, r) => {
|
|
169
169
|
if (!e) return "";
|
|
170
|
-
let i = "", a =
|
|
170
|
+
let i = "", a = _e(e), o = t?.transSupportBasicHtmlNodes ? t.transKeepBasicHtmlNodesFor ?? [] : [];
|
|
171
171
|
return a.forEach((e, a) => {
|
|
172
|
-
if (
|
|
172
|
+
if (L(e)) {
|
|
173
173
|
i += `${e}`;
|
|
174
174
|
return;
|
|
175
175
|
}
|
|
@@ -183,37 +183,37 @@ var oe = {
|
|
|
183
183
|
i += `<${a}></${a}>`;
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
if (u && l === 1 &&
|
|
186
|
+
if (u && l === 1 && L(d)) {
|
|
187
187
|
i += `<${c}>${d}</${c}>`;
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
|
-
let f =
|
|
190
|
+
let f = be(d, t, n, r);
|
|
191
191
|
i += `<${a}>${f}</${a}>`;
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
194
|
if (e === null) {
|
|
195
|
-
|
|
195
|
+
oe(n, "TRANS_NULL_VALUE", "Passed in a null value as child", { i18nKey: r });
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
if (
|
|
198
|
+
if (pe(e)) {
|
|
199
199
|
let { format: t, ...a } = e, o = Object.keys(a);
|
|
200
200
|
if (o.length === 1) {
|
|
201
201
|
let e = t ? `${o[0]}, ${t}` : o[0];
|
|
202
202
|
i += `{{${e}}}`;
|
|
203
203
|
return;
|
|
204
204
|
}
|
|
205
|
-
|
|
205
|
+
oe(n, "TRANS_INVALID_OBJ", "Invalid child - Object should only have keys {{ value, format }} (format is optional).", {
|
|
206
206
|
i18nKey: r,
|
|
207
207
|
child: e
|
|
208
208
|
});
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
|
|
211
|
+
oe(n, "TRANS_INVALID_VAR", "Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.", {
|
|
212
212
|
i18nKey: r,
|
|
213
213
|
child: e
|
|
214
214
|
});
|
|
215
215
|
}), i;
|
|
216
|
-
},
|
|
216
|
+
}, xe = (e, t = [], n = {}) => {
|
|
217
217
|
if (!e) return e;
|
|
218
218
|
let r = Object.keys(n), i = [...t, ...r], a = "", o = 0;
|
|
219
219
|
for (; o < e.length;) if (e[o] === "<") {
|
|
@@ -232,22 +232,22 @@ var oe = {
|
|
|
232
232
|
t || (a += "<", o += 1);
|
|
233
233
|
} else a += e[o], o += 1;
|
|
234
234
|
return a;
|
|
235
|
-
},
|
|
235
|
+
}, Se = (e, n, i, a, o, s, l) => {
|
|
236
236
|
if (i === "") return [];
|
|
237
237
|
let d = o.transKeepBasicHtmlNodesFor || [], m = i && new RegExp(d.map((e) => `<${e}`).join("|")).test(i);
|
|
238
238
|
if (!e && !n && !m && !l) return [i];
|
|
239
239
|
let h = n ?? {}, g = (e) => {
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
_e(e).forEach((e) => {
|
|
241
|
+
L(e) || (me(e) ? g(he(e)) : pe(e) && !p(e) && Object.assign(h, e));
|
|
242
242
|
});
|
|
243
243
|
};
|
|
244
244
|
g(e);
|
|
245
|
-
let _ =
|
|
245
|
+
let _ = xe(i, d, h), v = ae.parse(`<0>${_}</0>`), y = {
|
|
246
246
|
...h,
|
|
247
247
|
...s
|
|
248
248
|
}, b = (e, t, n) => {
|
|
249
|
-
let r =
|
|
250
|
-
return
|
|
249
|
+
let r = he(e), i = S(r, t.children, n);
|
|
250
|
+
return ge(r) && i.length === 0 || e.props?.i18nIsDynamicList ? r : i;
|
|
251
251
|
}, x = (e, t, n, r, i) => {
|
|
252
252
|
e.dummy ? (e.children = t, n.push(u(e, { key: r }, i ? void 0 : t))) : n.push(...c.map([e], (e) => {
|
|
253
253
|
let n = "data-i18n-is-dynamic-list", a = {
|
|
@@ -259,8 +259,8 @@ var oe = {
|
|
|
259
259
|
}), u(e, a, i ? null : t);
|
|
260
260
|
}));
|
|
261
261
|
}, S = (e, i, s) => {
|
|
262
|
-
let c =
|
|
263
|
-
return
|
|
262
|
+
let c = _e(e);
|
|
263
|
+
return _e(i).reduce((e, i, u) => {
|
|
264
264
|
let h = i.children?.[0]?.content && a.services.interpolator.interpolate(i.children[0].content, y, a.language);
|
|
265
265
|
if (i.type === "tag") {
|
|
266
266
|
let r = c[parseInt(i.name, 10)];
|
|
@@ -268,13 +268,13 @@ var oe = {
|
|
|
268
268
|
let g = { ...i.attrs };
|
|
269
269
|
l && Object.keys(g).forEach((e) => {
|
|
270
270
|
let n = g[e];
|
|
271
|
-
|
|
271
|
+
L(n) && (g[e] = t(n));
|
|
272
272
|
});
|
|
273
|
-
let _ = Object.keys(g).length === 0 ? r :
|
|
274
|
-
if (
|
|
273
|
+
let _ = Object.keys(g).length === 0 ? r : ve({ props: g }, r), v = p(_), C = v && me(i, !0) && !i.voidElement, w = m && pe(_) && _.dummy && !v, T = pe(n) && Object.hasOwnProperty.call(n, i.name);
|
|
274
|
+
if (L(_)) {
|
|
275
275
|
let t = a.services.interpolator.interpolate(_, y, a.language);
|
|
276
276
|
e.push(t);
|
|
277
|
-
} else if (
|
|
277
|
+
} else if (me(_) || C) x(_, b(_, i, s), e, u);
|
|
278
278
|
else if (w) x(_, S(c, i.children, s), e, u);
|
|
279
279
|
else if (Number.isNaN(parseFloat(i.name))) if (T) x(_, b(_, i, s), e, u, i.voidElement);
|
|
280
280
|
else if (o.transSupportBasicHtmlNodes && d.indexOf(i.name) > -1) if (i.voidElement) e.push(f(i.name, { key: `${i.name}-${u}` }));
|
|
@@ -287,7 +287,7 @@ var oe = {
|
|
|
287
287
|
let t = S(c, i.children, s);
|
|
288
288
|
e.push(`<${i.name}>${t}</${i.name}>`);
|
|
289
289
|
}
|
|
290
|
-
else if (
|
|
290
|
+
else if (pe(_) && !v) {
|
|
291
291
|
let t = i.children[0] ? h : null;
|
|
292
292
|
t && e.push(t);
|
|
293
293
|
} else x(_, h, e, u, i.children.length !== 1 || !h);
|
|
@@ -298,31 +298,31 @@ var oe = {
|
|
|
298
298
|
return e;
|
|
299
299
|
}, []);
|
|
300
300
|
};
|
|
301
|
-
return
|
|
301
|
+
return he(S([{
|
|
302
302
|
dummy: !0,
|
|
303
303
|
children: e || []
|
|
304
|
-
}], v,
|
|
305
|
-
},
|
|
304
|
+
}], v, _e(e || []))[0]);
|
|
305
|
+
}, Ce = (e, t, n) => {
|
|
306
306
|
let r = e.key || t, i = u(e, { key: r });
|
|
307
307
|
if (!i.props || !i.props.children || n.indexOf(`${t}/>`) < 0 && n.indexOf(`${t} />`) < 0) return i;
|
|
308
308
|
function a() {
|
|
309
309
|
return f(l, null, i);
|
|
310
310
|
}
|
|
311
311
|
return f(a, { key: r });
|
|
312
|
-
},
|
|
312
|
+
}, we = (e, t) => e.map((e, n) => Ce(e, n, t)), Te = (e, t) => {
|
|
313
313
|
let n = {};
|
|
314
314
|
return Object.keys(e).forEach((r) => {
|
|
315
|
-
Object.assign(n, { [r]:
|
|
315
|
+
Object.assign(n, { [r]: Ce(e[r], r, t) });
|
|
316
316
|
}), n;
|
|
317
|
-
},
|
|
318
|
-
function
|
|
317
|
+
}, Ee = (e, t, n, r) => e ? Array.isArray(e) ? we(e, t) : pe(e) ? Te(e, t) : (ce(n, "TRANS_INVALID_COMPONENTS", "<Trans /> \"components\" prop expects an object or array", { i18nKey: r }), null) : null, De = (e) => !pe(e) || Array.isArray(e) ? !1 : Object.keys(e).reduce((e, t) => e && Number.isNaN(Number.parseFloat(t)), !0);
|
|
318
|
+
function Oe({ children: t, count: i, parent: a, i18nKey: o, context: s, tOptions: c = {}, values: l, defaults: u, components: d, ns: p, i18n: m, t: h, shouldUnescape: g, ..._ }) {
|
|
319
319
|
let v = m || n();
|
|
320
|
-
if (!v) return
|
|
320
|
+
if (!v) return ce(v, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using i18nextReactModule", { i18nKey: o }), t;
|
|
321
321
|
let y = h || v.t.bind(v) || ((e) => e), b = {
|
|
322
322
|
...r(),
|
|
323
323
|
...v.options?.react
|
|
324
324
|
}, x = p || y.ns || v.options?.defaultNS;
|
|
325
|
-
x =
|
|
325
|
+
x = L(x) ? [x] : x || ["translation"];
|
|
326
326
|
let { transDefaultProps: S } = b, C = S?.tOptions ? {
|
|
327
327
|
...S.tOptions,
|
|
328
328
|
...c
|
|
@@ -332,12 +332,12 @@ function ke({ children: t, count: i, parent: a, i18nKey: o, context: s, tOptions
|
|
|
332
332
|
} : l, E = S?.components ? {
|
|
333
333
|
...S.components,
|
|
334
334
|
...d
|
|
335
|
-
} : d, D =
|
|
335
|
+
} : d, D = be(t, b, v, o), O = u || C?.defaultValue || D || b.transEmptyNodeValue || (typeof o == "function" ? e(o) : o), { hashTransKey: k } = b, A = o || (k ? k(D || O) : D || O);
|
|
336
336
|
l = v.options?.interpolation?.defaultVariables ? T && Object.keys(T).length > 0 ? {
|
|
337
337
|
...T,
|
|
338
338
|
...v.options.interpolation.defaultVariables
|
|
339
339
|
} : { ...v.options.interpolation.defaultVariables } : T;
|
|
340
|
-
let j =
|
|
340
|
+
let j = ye(t);
|
|
341
341
|
j && typeof j.count == "number" && i === void 0 && (i = j.count);
|
|
342
342
|
let M = l || i !== void 0 && !v.options?.interpolation?.alwaysFormat || !t ? C.interpolation : { interpolation: {
|
|
343
343
|
...C.interpolation,
|
|
@@ -353,14 +353,14 @@ function ke({ children: t, count: i, parent: a, i18nKey: o, context: s, tOptions
|
|
|
353
353
|
ns: x
|
|
354
354
|
}, P = A ? y(A, N) : O;
|
|
355
355
|
P === A && O && (P = O);
|
|
356
|
-
let ee =
|
|
357
|
-
|
|
358
|
-
let
|
|
359
|
-
return
|
|
356
|
+
let ee = Ee(E, P, v, o), F = ee || t, I = null;
|
|
357
|
+
De(ee) && (I = ee, F = t);
|
|
358
|
+
let te = Se(F, I, P, v, b, N, w), ne = a ?? b.defaultTransParent;
|
|
359
|
+
return ne ? f(ne, _, te) : te;
|
|
360
360
|
}
|
|
361
361
|
//#endregion
|
|
362
362
|
//#region node_modules/react-i18next/dist/es/context.js
|
|
363
|
-
var
|
|
363
|
+
var ke = d(), Ae = class {
|
|
364
364
|
constructor() {
|
|
365
365
|
this.usedNamespaces = {};
|
|
366
366
|
}
|
|
@@ -375,9 +375,9 @@ var Ae = d(), je = class {
|
|
|
375
375
|
};
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region node_modules/react-i18next/dist/es/Trans.js
|
|
378
|
-
function
|
|
379
|
-
let { i18n: g, defaultNS: _ } = h(
|
|
380
|
-
return
|
|
378
|
+
function je({ children: e, count: t, parent: r, i18nKey: i, context: a, tOptions: o = {}, values: s, defaults: c, components: l, ns: u, i18n: d, t: f, shouldUnescape: p, ...m }) {
|
|
379
|
+
let { i18n: g, defaultNS: _ } = h(ke) || {}, v = d || g || n(), y = f || v?.t.bind(v);
|
|
380
|
+
return Oe({
|
|
381
381
|
children: e,
|
|
382
382
|
count: t,
|
|
383
383
|
parent: r,
|
|
@@ -394,10 +394,10 @@ function Me({ children: e, count: t, parent: r, i18nKey: i, context: a, tOptions
|
|
|
394
394
|
...m
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
-
var
|
|
397
|
+
var Me = {
|
|
398
398
|
t: (e, t) => {
|
|
399
|
-
if (
|
|
400
|
-
if (
|
|
399
|
+
if (L(t)) return t;
|
|
400
|
+
if (pe(t) && L(t.defaultValue)) return t.defaultValue;
|
|
401
401
|
if (typeof e == "function") return "";
|
|
402
402
|
if (Array.isArray(e)) {
|
|
403
403
|
let t = e[e.length - 1];
|
|
@@ -406,17 +406,17 @@ var Ne = {
|
|
|
406
406
|
return e;
|
|
407
407
|
},
|
|
408
408
|
ready: !1
|
|
409
|
-
},
|
|
410
|
-
let { i18n: i } = t, { i18n: a, defaultNS: o } = h(
|
|
411
|
-
s && !s.reportNamespaces && (s.reportNamespaces = new
|
|
409
|
+
}, Ne = () => () => {}, Pe = (e, t = {}) => {
|
|
410
|
+
let { i18n: i } = t, { i18n: a, defaultNS: o } = h(ke) || {}, s = i || a || n();
|
|
411
|
+
s && !s.reportNamespaces && (s.reportNamespaces = new Ae()), s || ce(s, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
412
412
|
let c = _(() => ({
|
|
413
413
|
...r(),
|
|
414
414
|
...s?.options?.react,
|
|
415
415
|
...t
|
|
416
|
-
}), [s, t]), { useSuspense: l, keyPrefix: u } = c, d = e || o || s?.options?.defaultNS, f =
|
|
416
|
+
}), [s, t]), { useSuspense: l, keyPrefix: u } = c, d = e || o || s?.options?.defaultNS, f = L(d) ? [d] : d || ["translation"], p = _(() => f, f);
|
|
417
417
|
s?.reportNamespaces?.addUsedNamespaces?.(p);
|
|
418
418
|
let x = v(0), S = m((e) => {
|
|
419
|
-
if (!s) return
|
|
419
|
+
if (!s) return Ne;
|
|
420
420
|
let { bindI18n: t, bindI18nStore: n } = c, r = () => {
|
|
421
421
|
x.current += 1, e();
|
|
422
422
|
};
|
|
@@ -424,8 +424,8 @@ var Ne = {
|
|
|
424
424
|
t && t.split(" ").forEach((e) => s.off(e, r)), n && n.split(" ").forEach((e) => s.store.off(e, r));
|
|
425
425
|
};
|
|
426
426
|
}, [s, c]), C = v(), w = m(() => {
|
|
427
|
-
if (!s) return
|
|
428
|
-
let e = !!(s.isInitialized || s.initializedStoreOnce) && p.every((e) =>
|
|
427
|
+
if (!s) return Me;
|
|
428
|
+
let e = !!(s.isInitialized || s.initializedStoreOnce) && p.every((e) => fe(e, s, c)), n = t.lng || s.language, r = x.current, i = C.current;
|
|
429
429
|
if (i && i.ready === e && i.lng === n && i.keyPrefix === u && i.revision === r) return i;
|
|
430
430
|
let a = {
|
|
431
431
|
t: s.getFixedT(n, c.nsMode === "fallback" ? p : p[0], u),
|
|
@@ -445,7 +445,7 @@ var Ne = {
|
|
|
445
445
|
g(() => {
|
|
446
446
|
if (s && !O && !l) {
|
|
447
447
|
let e = () => E((e) => e + 1);
|
|
448
|
-
t.lng ?
|
|
448
|
+
t.lng ? de(s, t.lng, p, e) : ue(s, p, e);
|
|
449
449
|
}
|
|
450
450
|
}, [
|
|
451
451
|
s,
|
|
@@ -471,7 +471,7 @@ var Ne = {
|
|
|
471
471
|
}, N = _(() => {
|
|
472
472
|
let e = k, t = e?.language, n = e;
|
|
473
473
|
e && (A.current && A.current.__original === e && j.current === t ? n = A.current : (n = M(e), A.current = n, j.current = t));
|
|
474
|
-
let r = !O && !l ? (...e) => (
|
|
474
|
+
let r = !O && !l ? (...e) => (ce(s, "USE_T_BEFORE_READY", "useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."), D(...e)) : D, i = [
|
|
475
475
|
r,
|
|
476
476
|
n,
|
|
477
477
|
O
|
|
@@ -487,36 +487,40 @@ var Ne = {
|
|
|
487
487
|
]);
|
|
488
488
|
if (s && l && !O) throw new Promise((e) => {
|
|
489
489
|
let n = () => e();
|
|
490
|
-
t.lng ?
|
|
490
|
+
t.lng ? de(s, t.lng, p, n) : ue(s, p, n);
|
|
491
491
|
});
|
|
492
492
|
return N;
|
|
493
493
|
};
|
|
494
494
|
//#endregion
|
|
495
495
|
//#region src/hooks/useTheme.ts
|
|
496
|
-
function
|
|
497
|
-
let
|
|
496
|
+
function Fe({ elementRef: e } = {}) {
|
|
497
|
+
let t = o((e) => e.activeTheme), n = o((e) => e.setTheme), r = o((e) => e.config.cssVars);
|
|
498
498
|
return g(() => {
|
|
499
|
-
let
|
|
500
|
-
|
|
501
|
-
}, [
|
|
502
|
-
|
|
503
|
-
|
|
499
|
+
let n = i(t), a = e?.current;
|
|
500
|
+
if (a && (a.dataset.theme = n.id, r)) for (let [e, t] of Object.entries(r)) a.style.setProperty(e, t);
|
|
501
|
+
}, [
|
|
502
|
+
t,
|
|
503
|
+
e,
|
|
504
|
+
r
|
|
505
|
+
]), {
|
|
506
|
+
activeTheme: t,
|
|
507
|
+
setTheme: n
|
|
504
508
|
};
|
|
505
509
|
}
|
|
506
510
|
//#endregion
|
|
507
511
|
//#region src/hooks/useCta.ts
|
|
508
|
-
function
|
|
512
|
+
function Ie() {
|
|
509
513
|
try {
|
|
510
514
|
let e = new AudioContext(), t = e.createOscillator(), n = e.createGain();
|
|
511
515
|
t.connect(n), n.connect(e.destination), t.type = "sine", t.frequency.setValueAtTime(880, e.currentTime), t.frequency.setValueAtTime(1047, e.currentTime + .08), t.frequency.setValueAtTime(1319, e.currentTime + .16), n.gain.setValueAtTime(.15, e.currentTime), n.gain.exponentialRampToValueAtTime(.01, e.currentTime + .4), t.start(e.currentTime), t.stop(e.currentTime + .4);
|
|
512
516
|
} catch {}
|
|
513
517
|
}
|
|
514
|
-
function
|
|
518
|
+
function Le(e, t, n) {
|
|
515
519
|
let [r, i] = y(!1), a = v(!1), o = n && (e.showCta ?? !0), s = e.ctaDelay ?? 5e3, c = e.ctaSound ?? !0, l = e.i18n?.[t]?.ctaText ?? e.i18n?.en?.ctaText ?? e.ctaText ?? "Hi! How can I help you today?", u = m(() => i(!1), []);
|
|
516
520
|
return g(() => {
|
|
517
521
|
if (!o || a.current) return;
|
|
518
522
|
let e = setTimeout(() => {
|
|
519
|
-
a.current = !0, i(!0), c &&
|
|
523
|
+
a.current = !0, i(!0), c && Ie();
|
|
520
524
|
}, s);
|
|
521
525
|
return () => clearTimeout(e);
|
|
522
526
|
}, [
|
|
@@ -531,26 +535,26 @@ function Re(e, t, n) {
|
|
|
531
535
|
}
|
|
532
536
|
//#endregion
|
|
533
537
|
//#region src/hooks/useAgentStream.ts
|
|
534
|
-
function
|
|
535
|
-
let e = o((e) => e.config), t = s((e) => e.activeSessionId), n = s((e) => e.addMessage), r = s((e) => e.setAwaitingAgentReply);
|
|
538
|
+
function Re() {
|
|
539
|
+
let e = o((e) => e.config), t = s((e) => e.activeSessionId), n = s((e) => e.addMessage), r = s((e) => e.setAwaitingAgentReply), i = s((e) => e.setToken);
|
|
536
540
|
g(() => {
|
|
537
|
-
let
|
|
538
|
-
if (!
|
|
539
|
-
let
|
|
541
|
+
let a = e.agentStream;
|
|
542
|
+
if (!a || !a.apiBaseUrl || !a.tenantId || !t) return;
|
|
543
|
+
let o = !1, s = null;
|
|
540
544
|
return (async () => {
|
|
541
545
|
try {
|
|
542
|
-
let e = await fetch(`${
|
|
546
|
+
let e = await fetch(`${a.apiBaseUrl.replace(/\/$/, "")}/api/public/chat-stream/init`, {
|
|
543
547
|
method: "POST",
|
|
544
548
|
headers: { "Content-Type": "application/json" },
|
|
545
549
|
body: JSON.stringify({
|
|
546
|
-
tenantId:
|
|
550
|
+
tenantId: a.tenantId,
|
|
547
551
|
sessionId: t
|
|
548
552
|
})
|
|
549
553
|
});
|
|
550
554
|
if (!e.ok) return;
|
|
551
|
-
let
|
|
552
|
-
if (
|
|
553
|
-
|
|
555
|
+
let c = await e.json();
|
|
556
|
+
if (o) return;
|
|
557
|
+
i(t, c.token, Date.parse(c.expiresAt) || Date.now() + 36e5), s = new EventSource(c.streamUrl), s.addEventListener("agentReply", (e) => {
|
|
554
558
|
let i;
|
|
555
559
|
try {
|
|
556
560
|
i = JSON.parse(e.data);
|
|
@@ -563,10 +567,10 @@ function ze() {
|
|
|
563
567
|
content: i.body,
|
|
564
568
|
ts: Date.parse(i.createdAt) || Date.now()
|
|
565
569
|
}), r(t, !1);
|
|
566
|
-
}),
|
|
570
|
+
}), s.onerror = () => {};
|
|
567
571
|
} catch {}
|
|
568
572
|
})(), () => {
|
|
569
|
-
|
|
573
|
+
o = !0, s?.close();
|
|
570
574
|
};
|
|
571
575
|
}, [
|
|
572
576
|
e.agentStream,
|
|
@@ -577,8 +581,8 @@ function ze() {
|
|
|
577
581
|
}
|
|
578
582
|
//#endregion
|
|
579
583
|
//#region src/components/Sidebar.tsx
|
|
580
|
-
function
|
|
581
|
-
let { t } =
|
|
584
|
+
function ze({ onOpenSettings: e }) {
|
|
585
|
+
let { t } = Pe(), n = s((e) => e.sessions), r = s((e) => e.activeSessionId), i = s((e) => e.createSession), a = s((e) => e.setActiveSession), c = s((e) => e.deleteSession), l = o((e) => e.config.hideSettings ?? !1), [u, d] = y(null);
|
|
582
586
|
return /* @__PURE__ */ C("aside", {
|
|
583
587
|
className: "flex flex-col h-full w-64 flex-shrink-0 border-r",
|
|
584
588
|
style: {
|
|
@@ -684,43 +688,44 @@ function Be({ onOpenSettings: e }) {
|
|
|
684
688
|
}
|
|
685
689
|
//#endregion
|
|
686
690
|
//#region src/lib/n8nClient.ts
|
|
687
|
-
var
|
|
691
|
+
var Be = class extends Error {
|
|
688
692
|
status;
|
|
689
693
|
retryable;
|
|
690
694
|
constructor(e, t, n = !1) {
|
|
691
695
|
super(e), this.name = "N8nApiError", this.status = t, this.retryable = n;
|
|
692
696
|
}
|
|
693
|
-
},
|
|
694
|
-
async function
|
|
695
|
-
let
|
|
697
|
+
}, Ve = 2, He = [500, 1500];
|
|
698
|
+
async function Ue(e, t, n, r, i, a) {
|
|
699
|
+
let o = e.chatInputKey ?? "chatInput", s = e.chatSessionKey ?? "sessionId", c = e.webhookConfig?.method ?? "POST", l = {
|
|
696
700
|
"Content-Type": "application/json",
|
|
697
701
|
...e.webhookConfig?.headers
|
|
698
|
-
},
|
|
699
|
-
[
|
|
700
|
-
[
|
|
702
|
+
}, u = {
|
|
703
|
+
[o]: n,
|
|
704
|
+
[s]: t,
|
|
701
705
|
...r ? { language: r } : {},
|
|
706
|
+
...i && i.length > 0 ? { attachments: i } : {},
|
|
702
707
|
...e.metadata
|
|
703
|
-
},
|
|
704
|
-
|
|
705
|
-
let
|
|
706
|
-
for (let t = 0; t <=
|
|
707
|
-
t > 0 && await
|
|
708
|
+
}, d = e.streaming && a !== void 0;
|
|
709
|
+
d && (l.Accept = "text/event-stream");
|
|
710
|
+
let f;
|
|
711
|
+
for (let t = 0; t <= Ve; t++) {
|
|
712
|
+
t > 0 && await Ke((f instanceof Be && f.status === 429 ? Ge(f) : null) ?? He[t - 1] ?? 4e3);
|
|
708
713
|
try {
|
|
709
714
|
let t;
|
|
710
715
|
try {
|
|
711
716
|
t = await fetch(e.webhookUrl, {
|
|
712
|
-
method:
|
|
713
|
-
headers:
|
|
714
|
-
body:
|
|
717
|
+
method: c,
|
|
718
|
+
headers: l,
|
|
719
|
+
body: c === "GET" ? void 0 : JSON.stringify(u)
|
|
715
720
|
});
|
|
716
721
|
} catch (e) {
|
|
717
|
-
throw new
|
|
722
|
+
throw new Be(`Network error: ${e instanceof Error ? e.message : String(e)}`, void 0, !0);
|
|
718
723
|
}
|
|
719
724
|
if (!t.ok) {
|
|
720
|
-
let e =
|
|
725
|
+
let e = We(t.status), n = t.headers.get("Retry-After"), r = new Be(`Webhook returned ${t.status}`, t.status, e);
|
|
721
726
|
throw n && (r.retryAfter = n), r;
|
|
722
727
|
}
|
|
723
|
-
if (
|
|
728
|
+
if (d && t.body) return await qe(t.body, a);
|
|
724
729
|
let n = await t.text();
|
|
725
730
|
if (!n) return "";
|
|
726
731
|
try {
|
|
@@ -730,15 +735,15 @@ async function We(e, t, n, r, i) {
|
|
|
730
735
|
return "";
|
|
731
736
|
}
|
|
732
737
|
} catch (e) {
|
|
733
|
-
if (
|
|
738
|
+
if (f = e, !(e instanceof Be && e.retryable) || t === Ve) throw e;
|
|
734
739
|
}
|
|
735
740
|
}
|
|
736
|
-
throw
|
|
741
|
+
throw f;
|
|
737
742
|
}
|
|
738
|
-
function
|
|
743
|
+
function We(e) {
|
|
739
744
|
return e === 408 || e === 429 || e === 502 || e === 503 || e === 504;
|
|
740
745
|
}
|
|
741
|
-
function
|
|
746
|
+
function Ge(e) {
|
|
742
747
|
let t = e.retryAfter;
|
|
743
748
|
if (!t) return null;
|
|
744
749
|
let n = Number(t);
|
|
@@ -746,10 +751,10 @@ function Ke(e) {
|
|
|
746
751
|
let r = Date.parse(t);
|
|
747
752
|
return Number.isNaN(r) ? null : Math.max(0, Math.min(r - Date.now(), 1e4));
|
|
748
753
|
}
|
|
749
|
-
function
|
|
754
|
+
function Ke(e) {
|
|
750
755
|
return new Promise((t) => setTimeout(t, e));
|
|
751
756
|
}
|
|
752
|
-
async function
|
|
757
|
+
async function qe(e, t) {
|
|
753
758
|
let n = e.getReader(), r = new TextDecoder(), i = "", a = "";
|
|
754
759
|
for (;;) {
|
|
755
760
|
let { done: e, value: o } = await n.read();
|
|
@@ -770,23 +775,23 @@ async function Je(e, t) {
|
|
|
770
775
|
}
|
|
771
776
|
//#endregion
|
|
772
777
|
//#region src/hooks/useChat.ts
|
|
773
|
-
function
|
|
778
|
+
function Je() {
|
|
774
779
|
return Math.random().toString(36).slice(2) + Date.now().toString(36);
|
|
775
780
|
}
|
|
776
|
-
function
|
|
777
|
-
let { activeSessionId: e, addMessage: t, appendToLastBot: n, removeLastBotIfEmpty: r, setStreaming: i, setAwaitingAgentReply: a, updateMessageStatus: c, createSession: l } = s(), u = o((e) => e.config), d = o((e) => e.language), f = s((e) => e.isStreaming), p = m(async (e, o, l) => {
|
|
781
|
+
function Ye() {
|
|
782
|
+
let { activeSessionId: e, addMessage: t, appendToLastBot: n, removeLastBotIfEmpty: r, setStreaming: i, setAwaitingAgentReply: a, updateMessageStatus: c, createSession: l } = s(), u = o((e) => e.config), d = o((e) => e.language), f = s((e) => e.isStreaming), p = m(async (e, o, l, f) => {
|
|
778
783
|
c(l, o, "sending"), i(!0), t(l, {
|
|
779
|
-
id:
|
|
784
|
+
id: Je(),
|
|
780
785
|
role: "bot",
|
|
781
786
|
content: "",
|
|
782
787
|
ts: Date.now()
|
|
783
788
|
});
|
|
784
789
|
try {
|
|
785
|
-
if (u.streaming) await
|
|
790
|
+
if (u.streaming) await Ue(u, l, e, d, f, (e) => {
|
|
786
791
|
n(l, e);
|
|
787
792
|
});
|
|
788
793
|
else {
|
|
789
|
-
let t = await
|
|
794
|
+
let t = await Ue(u, l, e, d, f);
|
|
790
795
|
t && n(l, t);
|
|
791
796
|
}
|
|
792
797
|
let t = s.getState().messages[l]?.slice(-1)[0];
|
|
@@ -807,16 +812,18 @@ function Xe() {
|
|
|
807
812
|
c
|
|
808
813
|
]);
|
|
809
814
|
return {
|
|
810
|
-
send: m(async (n) => {
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
815
|
+
send: m(async (n, r) => {
|
|
816
|
+
let i = r && r.length > 0;
|
|
817
|
+
if (!u.webhookUrl || !n.trim() && !i) return;
|
|
818
|
+
let a = e ?? l(), o = n.trim(), s = {
|
|
819
|
+
id: Je(),
|
|
814
820
|
role: "user",
|
|
815
|
-
content:
|
|
821
|
+
content: o,
|
|
816
822
|
ts: Date.now(),
|
|
817
|
-
status: "sending"
|
|
823
|
+
status: "sending",
|
|
824
|
+
attachments: r
|
|
818
825
|
};
|
|
819
|
-
t(
|
|
826
|
+
t(a, s), await p(o, s.id, a, r);
|
|
820
827
|
}, [
|
|
821
828
|
u.webhookUrl,
|
|
822
829
|
e,
|
|
@@ -828,150 +835,150 @@ function Xe() {
|
|
|
828
835
|
let t = s.getState(), n = t.activeSessionId;
|
|
829
836
|
if (!n) return;
|
|
830
837
|
let r = t.messages[n]?.find((t) => t.id === e);
|
|
831
|
-
!r || r.role !== "user" || r.status !== "failed" || u.webhookUrl && await p(r.content, e, n);
|
|
838
|
+
!r || r.role !== "user" || r.status !== "failed" || u.webhookUrl && await p(r.content, e, n, r.attachments);
|
|
832
839
|
}, [u.webhookUrl, p]),
|
|
833
840
|
isStreaming: f
|
|
834
841
|
};
|
|
835
842
|
}
|
|
836
843
|
//#endregion
|
|
837
844
|
//#region node_modules/comma-separated-tokens/index.js
|
|
838
|
-
function
|
|
845
|
+
function Xe(e, t) {
|
|
839
846
|
let n = t || {};
|
|
840
847
|
return (e[e.length - 1] === "" ? [...e, ""] : e).join((n.padRight ? " " : "") + "," + (n.padLeft === !1 ? "" : " ")).trim();
|
|
841
848
|
}
|
|
842
849
|
//#endregion
|
|
843
850
|
//#region node_modules/estree-util-is-identifier-name/lib/index.js
|
|
844
|
-
var
|
|
845
|
-
function
|
|
846
|
-
return ((t ||
|
|
851
|
+
var Ze = /^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, Qe = /^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u, $e = {};
|
|
852
|
+
function et(e, t) {
|
|
853
|
+
return ((t || $e).jsx ? Qe : Ze).test(e);
|
|
847
854
|
}
|
|
848
855
|
//#endregion
|
|
849
856
|
//#region node_modules/hast-util-whitespace/lib/index.js
|
|
850
|
-
var
|
|
851
|
-
function
|
|
852
|
-
return typeof e == "object" ? e.type === "text" ?
|
|
857
|
+
var tt = /[ \t\n\f\r]/g;
|
|
858
|
+
function nt(e) {
|
|
859
|
+
return typeof e == "object" ? e.type === "text" ? rt(e.value) : !1 : rt(e);
|
|
853
860
|
}
|
|
854
|
-
function
|
|
855
|
-
return e.replace(
|
|
861
|
+
function rt(e) {
|
|
862
|
+
return e.replace(tt, "") === "";
|
|
856
863
|
}
|
|
857
864
|
//#endregion
|
|
858
865
|
//#region node_modules/property-information/lib/util/schema.js
|
|
859
|
-
var
|
|
866
|
+
var it = class {
|
|
860
867
|
constructor(e, t, n) {
|
|
861
868
|
this.normal = t, this.property = e, n && (this.space = n);
|
|
862
869
|
}
|
|
863
870
|
};
|
|
864
|
-
|
|
871
|
+
it.prototype.normal = {}, it.prototype.property = {}, it.prototype.space = void 0;
|
|
865
872
|
//#endregion
|
|
866
873
|
//#region node_modules/property-information/lib/util/merge.js
|
|
867
|
-
function
|
|
874
|
+
function at(e, t) {
|
|
868
875
|
let n = {}, r = {};
|
|
869
876
|
for (let t of e) Object.assign(n, t.property), Object.assign(r, t.normal);
|
|
870
|
-
return new
|
|
877
|
+
return new it(n, r, t);
|
|
871
878
|
}
|
|
872
879
|
//#endregion
|
|
873
880
|
//#region node_modules/property-information/lib/normalize.js
|
|
874
|
-
function
|
|
881
|
+
function ot(e) {
|
|
875
882
|
return e.toLowerCase();
|
|
876
883
|
}
|
|
877
884
|
//#endregion
|
|
878
885
|
//#region node_modules/property-information/lib/util/info.js
|
|
879
|
-
var
|
|
886
|
+
var R = class {
|
|
880
887
|
constructor(e, t) {
|
|
881
888
|
this.attribute = t, this.property = e;
|
|
882
889
|
}
|
|
883
890
|
};
|
|
884
|
-
|
|
891
|
+
R.prototype.attribute = "", R.prototype.booleanish = !1, R.prototype.boolean = !1, R.prototype.commaOrSpaceSeparated = !1, R.prototype.commaSeparated = !1, R.prototype.defined = !1, R.prototype.mustUseProperty = !1, R.prototype.number = !1, R.prototype.overloadedBoolean = !1, R.prototype.property = "", R.prototype.spaceSeparated = !1, R.prototype.space = void 0;
|
|
885
892
|
//#endregion
|
|
886
893
|
//#region node_modules/property-information/lib/util/types.js
|
|
887
|
-
var
|
|
888
|
-
boolean: () =>
|
|
889
|
-
booleanish: () =>
|
|
890
|
-
commaOrSpaceSeparated: () =>
|
|
891
|
-
commaSeparated: () =>
|
|
892
|
-
number: () =>
|
|
893
|
-
overloadedBoolean: () =>
|
|
894
|
-
spaceSeparated: () =>
|
|
895
|
-
}),
|
|
896
|
-
function
|
|
897
|
-
return 2 ** ++
|
|
894
|
+
var st = /* @__PURE__ */ M({
|
|
895
|
+
boolean: () => z,
|
|
896
|
+
booleanish: () => B,
|
|
897
|
+
commaOrSpaceSeparated: () => U,
|
|
898
|
+
commaSeparated: () => ut,
|
|
899
|
+
number: () => V,
|
|
900
|
+
overloadedBoolean: () => lt,
|
|
901
|
+
spaceSeparated: () => H
|
|
902
|
+
}), ct = 0, z = dt(), B = dt(), lt = dt(), V = dt(), H = dt(), ut = dt(), U = dt();
|
|
903
|
+
function dt() {
|
|
904
|
+
return 2 ** ++ct;
|
|
898
905
|
}
|
|
899
906
|
//#endregion
|
|
900
907
|
//#region node_modules/property-information/lib/util/defined-info.js
|
|
901
|
-
var
|
|
908
|
+
var ft = Object.keys(st), pt = class extends R {
|
|
902
909
|
constructor(e, t, n, r) {
|
|
903
910
|
let i = -1;
|
|
904
|
-
if (super(e, t),
|
|
905
|
-
let e =
|
|
906
|
-
|
|
911
|
+
if (super(e, t), mt(this, "space", r), typeof n == "number") for (; ++i < ft.length;) {
|
|
912
|
+
let e = ft[i];
|
|
913
|
+
mt(this, ft[i], (n & st[e]) === st[e]);
|
|
907
914
|
}
|
|
908
915
|
}
|
|
909
916
|
};
|
|
910
|
-
|
|
911
|
-
function
|
|
917
|
+
pt.prototype.defined = !0;
|
|
918
|
+
function mt(e, t, n) {
|
|
912
919
|
n && (e[t] = n);
|
|
913
920
|
}
|
|
914
921
|
//#endregion
|
|
915
922
|
//#region node_modules/property-information/lib/util/create.js
|
|
916
|
-
function
|
|
923
|
+
function ht(e) {
|
|
917
924
|
let t = {}, n = {};
|
|
918
925
|
for (let [r, i] of Object.entries(e.properties)) {
|
|
919
|
-
let a = new
|
|
920
|
-
e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[
|
|
926
|
+
let a = new pt(r, e.transform(e.attributes || {}, r), i, e.space);
|
|
927
|
+
e.mustUseProperty && e.mustUseProperty.includes(r) && (a.mustUseProperty = !0), t[r] = a, n[ot(r)] = r, n[ot(a.attribute)] = r;
|
|
921
928
|
}
|
|
922
|
-
return new
|
|
929
|
+
return new it(t, n, e.space);
|
|
923
930
|
}
|
|
924
931
|
//#endregion
|
|
925
932
|
//#region node_modules/property-information/lib/aria.js
|
|
926
|
-
var
|
|
933
|
+
var gt = ht({
|
|
927
934
|
properties: {
|
|
928
935
|
ariaActiveDescendant: null,
|
|
929
|
-
ariaAtomic:
|
|
936
|
+
ariaAtomic: B,
|
|
930
937
|
ariaAutoComplete: null,
|
|
931
|
-
ariaBusy:
|
|
932
|
-
ariaChecked:
|
|
933
|
-
ariaColCount:
|
|
934
|
-
ariaColIndex:
|
|
935
|
-
ariaColSpan:
|
|
936
|
-
ariaControls:
|
|
938
|
+
ariaBusy: B,
|
|
939
|
+
ariaChecked: B,
|
|
940
|
+
ariaColCount: V,
|
|
941
|
+
ariaColIndex: V,
|
|
942
|
+
ariaColSpan: V,
|
|
943
|
+
ariaControls: H,
|
|
937
944
|
ariaCurrent: null,
|
|
938
|
-
ariaDescribedBy:
|
|
945
|
+
ariaDescribedBy: H,
|
|
939
946
|
ariaDetails: null,
|
|
940
|
-
ariaDisabled:
|
|
941
|
-
ariaDropEffect:
|
|
947
|
+
ariaDisabled: B,
|
|
948
|
+
ariaDropEffect: H,
|
|
942
949
|
ariaErrorMessage: null,
|
|
943
|
-
ariaExpanded:
|
|
944
|
-
ariaFlowTo:
|
|
945
|
-
ariaGrabbed:
|
|
950
|
+
ariaExpanded: B,
|
|
951
|
+
ariaFlowTo: H,
|
|
952
|
+
ariaGrabbed: B,
|
|
946
953
|
ariaHasPopup: null,
|
|
947
|
-
ariaHidden:
|
|
954
|
+
ariaHidden: B,
|
|
948
955
|
ariaInvalid: null,
|
|
949
956
|
ariaKeyShortcuts: null,
|
|
950
957
|
ariaLabel: null,
|
|
951
|
-
ariaLabelledBy:
|
|
952
|
-
ariaLevel:
|
|
958
|
+
ariaLabelledBy: H,
|
|
959
|
+
ariaLevel: V,
|
|
953
960
|
ariaLive: null,
|
|
954
|
-
ariaModal:
|
|
955
|
-
ariaMultiLine:
|
|
956
|
-
ariaMultiSelectable:
|
|
961
|
+
ariaModal: B,
|
|
962
|
+
ariaMultiLine: B,
|
|
963
|
+
ariaMultiSelectable: B,
|
|
957
964
|
ariaOrientation: null,
|
|
958
|
-
ariaOwns:
|
|
965
|
+
ariaOwns: H,
|
|
959
966
|
ariaPlaceholder: null,
|
|
960
|
-
ariaPosInSet:
|
|
961
|
-
ariaPressed:
|
|
962
|
-
ariaReadOnly:
|
|
967
|
+
ariaPosInSet: V,
|
|
968
|
+
ariaPressed: B,
|
|
969
|
+
ariaReadOnly: B,
|
|
963
970
|
ariaRelevant: null,
|
|
964
|
-
ariaRequired:
|
|
965
|
-
ariaRoleDescription:
|
|
966
|
-
ariaRowCount:
|
|
967
|
-
ariaRowIndex:
|
|
968
|
-
ariaRowSpan:
|
|
969
|
-
ariaSelected:
|
|
970
|
-
ariaSetSize:
|
|
971
|
+
ariaRequired: B,
|
|
972
|
+
ariaRoleDescription: H,
|
|
973
|
+
ariaRowCount: V,
|
|
974
|
+
ariaRowIndex: V,
|
|
975
|
+
ariaRowSpan: V,
|
|
976
|
+
ariaSelected: B,
|
|
977
|
+
ariaSetSize: V,
|
|
971
978
|
ariaSort: null,
|
|
972
|
-
ariaValueMax:
|
|
973
|
-
ariaValueMin:
|
|
974
|
-
ariaValueNow:
|
|
979
|
+
ariaValueMax: V,
|
|
980
|
+
ariaValueMin: V,
|
|
981
|
+
ariaValueNow: V,
|
|
975
982
|
ariaValueText: null,
|
|
976
983
|
role: null
|
|
977
984
|
},
|
|
@@ -981,17 +988,17 @@ var _t = gt({
|
|
|
981
988
|
});
|
|
982
989
|
//#endregion
|
|
983
990
|
//#region node_modules/property-information/lib/util/case-sensitive-transform.js
|
|
984
|
-
function
|
|
991
|
+
function _t(e, t) {
|
|
985
992
|
return t in e ? e[t] : t;
|
|
986
993
|
}
|
|
987
994
|
//#endregion
|
|
988
995
|
//#region node_modules/property-information/lib/util/case-insensitive-transform.js
|
|
989
|
-
function
|
|
990
|
-
return
|
|
996
|
+
function vt(e, t) {
|
|
997
|
+
return _t(e, t.toLowerCase());
|
|
991
998
|
}
|
|
992
999
|
//#endregion
|
|
993
1000
|
//#region node_modules/property-information/lib/html.js
|
|
994
|
-
var
|
|
1001
|
+
var yt = ht({
|
|
995
1002
|
attributes: {
|
|
996
1003
|
acceptcharset: "accept-charset",
|
|
997
1004
|
classname: "class",
|
|
@@ -1006,45 +1013,45 @@ var bt = gt({
|
|
|
1006
1013
|
],
|
|
1007
1014
|
properties: {
|
|
1008
1015
|
abbr: null,
|
|
1009
|
-
accept:
|
|
1010
|
-
acceptCharset:
|
|
1011
|
-
accessKey:
|
|
1016
|
+
accept: ut,
|
|
1017
|
+
acceptCharset: H,
|
|
1018
|
+
accessKey: H,
|
|
1012
1019
|
action: null,
|
|
1013
1020
|
allow: null,
|
|
1014
|
-
allowFullScreen:
|
|
1015
|
-
allowPaymentRequest:
|
|
1016
|
-
allowUserMedia:
|
|
1021
|
+
allowFullScreen: z,
|
|
1022
|
+
allowPaymentRequest: z,
|
|
1023
|
+
allowUserMedia: z,
|
|
1017
1024
|
alt: null,
|
|
1018
1025
|
as: null,
|
|
1019
|
-
async:
|
|
1026
|
+
async: z,
|
|
1020
1027
|
autoCapitalize: null,
|
|
1021
|
-
autoComplete:
|
|
1022
|
-
autoFocus:
|
|
1023
|
-
autoPlay:
|
|
1024
|
-
blocking:
|
|
1028
|
+
autoComplete: H,
|
|
1029
|
+
autoFocus: z,
|
|
1030
|
+
autoPlay: z,
|
|
1031
|
+
blocking: H,
|
|
1025
1032
|
capture: null,
|
|
1026
1033
|
charSet: null,
|
|
1027
|
-
checked:
|
|
1034
|
+
checked: z,
|
|
1028
1035
|
cite: null,
|
|
1029
|
-
className:
|
|
1030
|
-
cols:
|
|
1036
|
+
className: H,
|
|
1037
|
+
cols: V,
|
|
1031
1038
|
colSpan: null,
|
|
1032
1039
|
content: null,
|
|
1033
|
-
contentEditable:
|
|
1034
|
-
controls:
|
|
1035
|
-
controlsList:
|
|
1036
|
-
coords:
|
|
1040
|
+
contentEditable: B,
|
|
1041
|
+
controls: z,
|
|
1042
|
+
controlsList: H,
|
|
1043
|
+
coords: V | ut,
|
|
1037
1044
|
crossOrigin: null,
|
|
1038
1045
|
data: null,
|
|
1039
1046
|
dateTime: null,
|
|
1040
1047
|
decoding: null,
|
|
1041
|
-
default:
|
|
1042
|
-
defer:
|
|
1048
|
+
default: z,
|
|
1049
|
+
defer: z,
|
|
1043
1050
|
dir: null,
|
|
1044
1051
|
dirName: null,
|
|
1045
|
-
disabled:
|
|
1046
|
-
download:
|
|
1047
|
-
draggable:
|
|
1052
|
+
disabled: z,
|
|
1053
|
+
download: lt,
|
|
1054
|
+
draggable: B,
|
|
1048
1055
|
encType: null,
|
|
1049
1056
|
enterKeyHint: null,
|
|
1050
1057
|
fetchPriority: null,
|
|
@@ -1052,50 +1059,50 @@ var bt = gt({
|
|
|
1052
1059
|
formAction: null,
|
|
1053
1060
|
formEncType: null,
|
|
1054
1061
|
formMethod: null,
|
|
1055
|
-
formNoValidate:
|
|
1062
|
+
formNoValidate: z,
|
|
1056
1063
|
formTarget: null,
|
|
1057
|
-
headers:
|
|
1058
|
-
height:
|
|
1059
|
-
hidden:
|
|
1060
|
-
high:
|
|
1064
|
+
headers: H,
|
|
1065
|
+
height: V,
|
|
1066
|
+
hidden: lt,
|
|
1067
|
+
high: V,
|
|
1061
1068
|
href: null,
|
|
1062
1069
|
hrefLang: null,
|
|
1063
|
-
htmlFor:
|
|
1064
|
-
httpEquiv:
|
|
1070
|
+
htmlFor: H,
|
|
1071
|
+
httpEquiv: H,
|
|
1065
1072
|
id: null,
|
|
1066
1073
|
imageSizes: null,
|
|
1067
1074
|
imageSrcSet: null,
|
|
1068
|
-
inert:
|
|
1075
|
+
inert: z,
|
|
1069
1076
|
inputMode: null,
|
|
1070
1077
|
integrity: null,
|
|
1071
1078
|
is: null,
|
|
1072
|
-
isMap:
|
|
1079
|
+
isMap: z,
|
|
1073
1080
|
itemId: null,
|
|
1074
|
-
itemProp:
|
|
1075
|
-
itemRef:
|
|
1076
|
-
itemScope:
|
|
1077
|
-
itemType:
|
|
1081
|
+
itemProp: H,
|
|
1082
|
+
itemRef: H,
|
|
1083
|
+
itemScope: z,
|
|
1084
|
+
itemType: H,
|
|
1078
1085
|
kind: null,
|
|
1079
1086
|
label: null,
|
|
1080
1087
|
lang: null,
|
|
1081
1088
|
language: null,
|
|
1082
1089
|
list: null,
|
|
1083
1090
|
loading: null,
|
|
1084
|
-
loop:
|
|
1085
|
-
low:
|
|
1091
|
+
loop: z,
|
|
1092
|
+
low: V,
|
|
1086
1093
|
manifest: null,
|
|
1087
1094
|
max: null,
|
|
1088
|
-
maxLength:
|
|
1095
|
+
maxLength: V,
|
|
1089
1096
|
media: null,
|
|
1090
1097
|
method: null,
|
|
1091
1098
|
min: null,
|
|
1092
|
-
minLength:
|
|
1093
|
-
multiple:
|
|
1094
|
-
muted:
|
|
1099
|
+
minLength: V,
|
|
1100
|
+
multiple: z,
|
|
1101
|
+
muted: z,
|
|
1095
1102
|
name: null,
|
|
1096
1103
|
nonce: null,
|
|
1097
|
-
noModule:
|
|
1098
|
-
noValidate:
|
|
1104
|
+
noModule: z,
|
|
1105
|
+
noValidate: z,
|
|
1099
1106
|
onAbort: null,
|
|
1100
1107
|
onAfterPrint: null,
|
|
1101
1108
|
onAuxClick: null,
|
|
@@ -1184,65 +1191,65 @@ var bt = gt({
|
|
|
1184
1191
|
onVolumeChange: null,
|
|
1185
1192
|
onWaiting: null,
|
|
1186
1193
|
onWheel: null,
|
|
1187
|
-
open:
|
|
1188
|
-
optimum:
|
|
1194
|
+
open: z,
|
|
1195
|
+
optimum: V,
|
|
1189
1196
|
pattern: null,
|
|
1190
|
-
ping:
|
|
1197
|
+
ping: H,
|
|
1191
1198
|
placeholder: null,
|
|
1192
|
-
playsInline:
|
|
1199
|
+
playsInline: z,
|
|
1193
1200
|
popover: null,
|
|
1194
1201
|
popoverTarget: null,
|
|
1195
1202
|
popoverTargetAction: null,
|
|
1196
1203
|
poster: null,
|
|
1197
1204
|
preload: null,
|
|
1198
|
-
readOnly:
|
|
1205
|
+
readOnly: z,
|
|
1199
1206
|
referrerPolicy: null,
|
|
1200
|
-
rel:
|
|
1201
|
-
required:
|
|
1202
|
-
reversed:
|
|
1203
|
-
rows:
|
|
1204
|
-
rowSpan:
|
|
1205
|
-
sandbox:
|
|
1207
|
+
rel: H,
|
|
1208
|
+
required: z,
|
|
1209
|
+
reversed: z,
|
|
1210
|
+
rows: V,
|
|
1211
|
+
rowSpan: V,
|
|
1212
|
+
sandbox: H,
|
|
1206
1213
|
scope: null,
|
|
1207
|
-
scoped:
|
|
1208
|
-
seamless:
|
|
1209
|
-
selected:
|
|
1210
|
-
shadowRootClonable:
|
|
1211
|
-
shadowRootDelegatesFocus:
|
|
1214
|
+
scoped: z,
|
|
1215
|
+
seamless: z,
|
|
1216
|
+
selected: z,
|
|
1217
|
+
shadowRootClonable: z,
|
|
1218
|
+
shadowRootDelegatesFocus: z,
|
|
1212
1219
|
shadowRootMode: null,
|
|
1213
1220
|
shape: null,
|
|
1214
|
-
size:
|
|
1221
|
+
size: V,
|
|
1215
1222
|
sizes: null,
|
|
1216
1223
|
slot: null,
|
|
1217
|
-
span:
|
|
1218
|
-
spellCheck:
|
|
1224
|
+
span: V,
|
|
1225
|
+
spellCheck: B,
|
|
1219
1226
|
src: null,
|
|
1220
1227
|
srcDoc: null,
|
|
1221
1228
|
srcLang: null,
|
|
1222
1229
|
srcSet: null,
|
|
1223
|
-
start:
|
|
1230
|
+
start: V,
|
|
1224
1231
|
step: null,
|
|
1225
1232
|
style: null,
|
|
1226
|
-
tabIndex:
|
|
1233
|
+
tabIndex: V,
|
|
1227
1234
|
target: null,
|
|
1228
1235
|
title: null,
|
|
1229
1236
|
translate: null,
|
|
1230
1237
|
type: null,
|
|
1231
|
-
typeMustMatch:
|
|
1238
|
+
typeMustMatch: z,
|
|
1232
1239
|
useMap: null,
|
|
1233
|
-
value:
|
|
1234
|
-
width:
|
|
1240
|
+
value: B,
|
|
1241
|
+
width: V,
|
|
1235
1242
|
wrap: null,
|
|
1236
1243
|
writingSuggestions: null,
|
|
1237
1244
|
align: null,
|
|
1238
1245
|
aLink: null,
|
|
1239
|
-
archive:
|
|
1246
|
+
archive: H,
|
|
1240
1247
|
axis: null,
|
|
1241
1248
|
background: null,
|
|
1242
1249
|
bgColor: null,
|
|
1243
|
-
border:
|
|
1250
|
+
border: V,
|
|
1244
1251
|
borderColor: null,
|
|
1245
|
-
bottomMargin:
|
|
1252
|
+
bottomMargin: V,
|
|
1246
1253
|
cellPadding: null,
|
|
1247
1254
|
cellSpacing: null,
|
|
1248
1255
|
char: null,
|
|
@@ -1253,54 +1260,54 @@ var bt = gt({
|
|
|
1253
1260
|
codeBase: null,
|
|
1254
1261
|
codeType: null,
|
|
1255
1262
|
color: null,
|
|
1256
|
-
compact:
|
|
1257
|
-
declare:
|
|
1263
|
+
compact: z,
|
|
1264
|
+
declare: z,
|
|
1258
1265
|
event: null,
|
|
1259
1266
|
face: null,
|
|
1260
1267
|
frame: null,
|
|
1261
1268
|
frameBorder: null,
|
|
1262
|
-
hSpace:
|
|
1263
|
-
leftMargin:
|
|
1269
|
+
hSpace: V,
|
|
1270
|
+
leftMargin: V,
|
|
1264
1271
|
link: null,
|
|
1265
1272
|
longDesc: null,
|
|
1266
1273
|
lowSrc: null,
|
|
1267
|
-
marginHeight:
|
|
1268
|
-
marginWidth:
|
|
1269
|
-
noResize:
|
|
1270
|
-
noHref:
|
|
1271
|
-
noShade:
|
|
1272
|
-
noWrap:
|
|
1274
|
+
marginHeight: V,
|
|
1275
|
+
marginWidth: V,
|
|
1276
|
+
noResize: z,
|
|
1277
|
+
noHref: z,
|
|
1278
|
+
noShade: z,
|
|
1279
|
+
noWrap: z,
|
|
1273
1280
|
object: null,
|
|
1274
1281
|
profile: null,
|
|
1275
1282
|
prompt: null,
|
|
1276
1283
|
rev: null,
|
|
1277
|
-
rightMargin:
|
|
1284
|
+
rightMargin: V,
|
|
1278
1285
|
rules: null,
|
|
1279
1286
|
scheme: null,
|
|
1280
|
-
scrolling:
|
|
1287
|
+
scrolling: B,
|
|
1281
1288
|
standby: null,
|
|
1282
1289
|
summary: null,
|
|
1283
1290
|
text: null,
|
|
1284
|
-
topMargin:
|
|
1291
|
+
topMargin: V,
|
|
1285
1292
|
valueType: null,
|
|
1286
1293
|
version: null,
|
|
1287
1294
|
vAlign: null,
|
|
1288
1295
|
vLink: null,
|
|
1289
|
-
vSpace:
|
|
1296
|
+
vSpace: V,
|
|
1290
1297
|
allowTransparency: null,
|
|
1291
1298
|
autoCorrect: null,
|
|
1292
1299
|
autoSave: null,
|
|
1293
|
-
disablePictureInPicture:
|
|
1294
|
-
disableRemotePlayback:
|
|
1300
|
+
disablePictureInPicture: z,
|
|
1301
|
+
disableRemotePlayback: z,
|
|
1295
1302
|
prefix: null,
|
|
1296
1303
|
property: null,
|
|
1297
|
-
results:
|
|
1304
|
+
results: V,
|
|
1298
1305
|
security: null,
|
|
1299
1306
|
unselectable: null
|
|
1300
1307
|
},
|
|
1301
1308
|
space: "html",
|
|
1302
|
-
transform:
|
|
1303
|
-
}),
|
|
1309
|
+
transform: vt
|
|
1310
|
+
}), bt = ht({
|
|
1304
1311
|
attributes: {
|
|
1305
1312
|
accentHeight: "accent-height",
|
|
1306
1313
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -1476,29 +1483,29 @@ var bt = gt({
|
|
|
1476
1483
|
timelineBegin: "timelinebegin"
|
|
1477
1484
|
},
|
|
1478
1485
|
properties: {
|
|
1479
|
-
about:
|
|
1480
|
-
accentHeight:
|
|
1486
|
+
about: U,
|
|
1487
|
+
accentHeight: V,
|
|
1481
1488
|
accumulate: null,
|
|
1482
1489
|
additive: null,
|
|
1483
1490
|
alignmentBaseline: null,
|
|
1484
|
-
alphabetic:
|
|
1485
|
-
amplitude:
|
|
1491
|
+
alphabetic: V,
|
|
1492
|
+
amplitude: V,
|
|
1486
1493
|
arabicForm: null,
|
|
1487
|
-
ascent:
|
|
1494
|
+
ascent: V,
|
|
1488
1495
|
attributeName: null,
|
|
1489
1496
|
attributeType: null,
|
|
1490
|
-
azimuth:
|
|
1497
|
+
azimuth: V,
|
|
1491
1498
|
bandwidth: null,
|
|
1492
1499
|
baselineShift: null,
|
|
1493
1500
|
baseFrequency: null,
|
|
1494
1501
|
baseProfile: null,
|
|
1495
1502
|
bbox: null,
|
|
1496
1503
|
begin: null,
|
|
1497
|
-
bias:
|
|
1504
|
+
bias: V,
|
|
1498
1505
|
by: null,
|
|
1499
1506
|
calcMode: null,
|
|
1500
|
-
capHeight:
|
|
1501
|
-
className:
|
|
1507
|
+
capHeight: V,
|
|
1508
|
+
className: H,
|
|
1502
1509
|
clip: null,
|
|
1503
1510
|
clipPath: null,
|
|
1504
1511
|
clipPathUnits: null,
|
|
@@ -1518,26 +1525,26 @@ var bt = gt({
|
|
|
1518
1525
|
d: null,
|
|
1519
1526
|
dataType: null,
|
|
1520
1527
|
defaultAction: null,
|
|
1521
|
-
descent:
|
|
1522
|
-
diffuseConstant:
|
|
1528
|
+
descent: V,
|
|
1529
|
+
diffuseConstant: V,
|
|
1523
1530
|
direction: null,
|
|
1524
1531
|
display: null,
|
|
1525
1532
|
dur: null,
|
|
1526
|
-
divisor:
|
|
1533
|
+
divisor: V,
|
|
1527
1534
|
dominantBaseline: null,
|
|
1528
|
-
download:
|
|
1535
|
+
download: z,
|
|
1529
1536
|
dx: null,
|
|
1530
1537
|
dy: null,
|
|
1531
1538
|
edgeMode: null,
|
|
1532
1539
|
editable: null,
|
|
1533
|
-
elevation:
|
|
1540
|
+
elevation: V,
|
|
1534
1541
|
enableBackground: null,
|
|
1535
1542
|
end: null,
|
|
1536
1543
|
event: null,
|
|
1537
|
-
exponent:
|
|
1544
|
+
exponent: V,
|
|
1538
1545
|
externalResourcesRequired: null,
|
|
1539
1546
|
fill: null,
|
|
1540
|
-
fillOpacity:
|
|
1547
|
+
fillOpacity: V,
|
|
1541
1548
|
fillRule: null,
|
|
1542
1549
|
filter: null,
|
|
1543
1550
|
filterRes: null,
|
|
@@ -1558,37 +1565,37 @@ var bt = gt({
|
|
|
1558
1565
|
from: null,
|
|
1559
1566
|
fx: null,
|
|
1560
1567
|
fy: null,
|
|
1561
|
-
g1:
|
|
1562
|
-
g2:
|
|
1563
|
-
glyphName:
|
|
1568
|
+
g1: ut,
|
|
1569
|
+
g2: ut,
|
|
1570
|
+
glyphName: ut,
|
|
1564
1571
|
glyphOrientationHorizontal: null,
|
|
1565
1572
|
glyphOrientationVertical: null,
|
|
1566
1573
|
glyphRef: null,
|
|
1567
1574
|
gradientTransform: null,
|
|
1568
1575
|
gradientUnits: null,
|
|
1569
1576
|
handler: null,
|
|
1570
|
-
hanging:
|
|
1577
|
+
hanging: V,
|
|
1571
1578
|
hatchContentUnits: null,
|
|
1572
1579
|
hatchUnits: null,
|
|
1573
1580
|
height: null,
|
|
1574
1581
|
href: null,
|
|
1575
1582
|
hrefLang: null,
|
|
1576
|
-
horizAdvX:
|
|
1577
|
-
horizOriginX:
|
|
1578
|
-
horizOriginY:
|
|
1583
|
+
horizAdvX: V,
|
|
1584
|
+
horizOriginX: V,
|
|
1585
|
+
horizOriginY: V,
|
|
1579
1586
|
id: null,
|
|
1580
|
-
ideographic:
|
|
1587
|
+
ideographic: V,
|
|
1581
1588
|
imageRendering: null,
|
|
1582
1589
|
initialVisibility: null,
|
|
1583
1590
|
in: null,
|
|
1584
1591
|
in2: null,
|
|
1585
|
-
intercept:
|
|
1586
|
-
k:
|
|
1587
|
-
k1:
|
|
1588
|
-
k2:
|
|
1589
|
-
k3:
|
|
1590
|
-
k4:
|
|
1591
|
-
kernelMatrix:
|
|
1592
|
+
intercept: V,
|
|
1593
|
+
k: V,
|
|
1594
|
+
k1: V,
|
|
1595
|
+
k2: V,
|
|
1596
|
+
k3: V,
|
|
1597
|
+
k4: V,
|
|
1598
|
+
kernelMatrix: U,
|
|
1592
1599
|
kernelUnitLength: null,
|
|
1593
1600
|
keyPoints: null,
|
|
1594
1601
|
keySplines: null,
|
|
@@ -1598,7 +1605,7 @@ var bt = gt({
|
|
|
1598
1605
|
lengthAdjust: null,
|
|
1599
1606
|
letterSpacing: null,
|
|
1600
1607
|
lightingColor: null,
|
|
1601
|
-
limitingConeAngle:
|
|
1608
|
+
limitingConeAngle: V,
|
|
1602
1609
|
local: null,
|
|
1603
1610
|
markerEnd: null,
|
|
1604
1611
|
markerMid: null,
|
|
@@ -1614,7 +1621,7 @@ var bt = gt({
|
|
|
1614
1621
|
media: null,
|
|
1615
1622
|
mediaCharacterEncoding: null,
|
|
1616
1623
|
mediaContentEncodings: null,
|
|
1617
|
-
mediaSize:
|
|
1624
|
+
mediaSize: V,
|
|
1618
1625
|
mediaTime: null,
|
|
1619
1626
|
method: null,
|
|
1620
1627
|
min: null,
|
|
@@ -1720,43 +1727,43 @@ var bt = gt({
|
|
|
1720
1727
|
origin: null,
|
|
1721
1728
|
overflow: null,
|
|
1722
1729
|
overlay: null,
|
|
1723
|
-
overlinePosition:
|
|
1724
|
-
overlineThickness:
|
|
1730
|
+
overlinePosition: V,
|
|
1731
|
+
overlineThickness: V,
|
|
1725
1732
|
paintOrder: null,
|
|
1726
1733
|
panose1: null,
|
|
1727
1734
|
path: null,
|
|
1728
|
-
pathLength:
|
|
1735
|
+
pathLength: V,
|
|
1729
1736
|
patternContentUnits: null,
|
|
1730
1737
|
patternTransform: null,
|
|
1731
1738
|
patternUnits: null,
|
|
1732
1739
|
phase: null,
|
|
1733
|
-
ping:
|
|
1740
|
+
ping: H,
|
|
1734
1741
|
pitch: null,
|
|
1735
1742
|
playbackOrder: null,
|
|
1736
1743
|
pointerEvents: null,
|
|
1737
1744
|
points: null,
|
|
1738
|
-
pointsAtX:
|
|
1739
|
-
pointsAtY:
|
|
1740
|
-
pointsAtZ:
|
|
1745
|
+
pointsAtX: V,
|
|
1746
|
+
pointsAtY: V,
|
|
1747
|
+
pointsAtZ: V,
|
|
1741
1748
|
preserveAlpha: null,
|
|
1742
1749
|
preserveAspectRatio: null,
|
|
1743
1750
|
primitiveUnits: null,
|
|
1744
1751
|
propagate: null,
|
|
1745
|
-
property:
|
|
1752
|
+
property: U,
|
|
1746
1753
|
r: null,
|
|
1747
1754
|
radius: null,
|
|
1748
1755
|
referrerPolicy: null,
|
|
1749
1756
|
refX: null,
|
|
1750
1757
|
refY: null,
|
|
1751
|
-
rel:
|
|
1752
|
-
rev:
|
|
1758
|
+
rel: U,
|
|
1759
|
+
rev: U,
|
|
1753
1760
|
renderingIntent: null,
|
|
1754
1761
|
repeatCount: null,
|
|
1755
1762
|
repeatDur: null,
|
|
1756
|
-
requiredExtensions:
|
|
1757
|
-
requiredFeatures:
|
|
1758
|
-
requiredFonts:
|
|
1759
|
-
requiredFormats:
|
|
1763
|
+
requiredExtensions: U,
|
|
1764
|
+
requiredFeatures: U,
|
|
1765
|
+
requiredFonts: U,
|
|
1766
|
+
requiredFormats: U,
|
|
1760
1767
|
resource: null,
|
|
1761
1768
|
restart: null,
|
|
1762
1769
|
result: null,
|
|
@@ -1769,8 +1776,8 @@ var bt = gt({
|
|
|
1769
1776
|
side: null,
|
|
1770
1777
|
slope: null,
|
|
1771
1778
|
snapshotTime: null,
|
|
1772
|
-
specularConstant:
|
|
1773
|
-
specularExponent:
|
|
1779
|
+
specularConstant: V,
|
|
1780
|
+
specularExponent: V,
|
|
1774
1781
|
spreadMethod: null,
|
|
1775
1782
|
spacing: null,
|
|
1776
1783
|
startOffset: null,
|
|
@@ -1780,30 +1787,30 @@ var bt = gt({
|
|
|
1780
1787
|
stitchTiles: null,
|
|
1781
1788
|
stopColor: null,
|
|
1782
1789
|
stopOpacity: null,
|
|
1783
|
-
strikethroughPosition:
|
|
1784
|
-
strikethroughThickness:
|
|
1790
|
+
strikethroughPosition: V,
|
|
1791
|
+
strikethroughThickness: V,
|
|
1785
1792
|
string: null,
|
|
1786
1793
|
stroke: null,
|
|
1787
|
-
strokeDashArray:
|
|
1794
|
+
strokeDashArray: U,
|
|
1788
1795
|
strokeDashOffset: null,
|
|
1789
1796
|
strokeLineCap: null,
|
|
1790
1797
|
strokeLineJoin: null,
|
|
1791
|
-
strokeMiterLimit:
|
|
1792
|
-
strokeOpacity:
|
|
1798
|
+
strokeMiterLimit: V,
|
|
1799
|
+
strokeOpacity: V,
|
|
1793
1800
|
strokeWidth: null,
|
|
1794
1801
|
style: null,
|
|
1795
|
-
surfaceScale:
|
|
1802
|
+
surfaceScale: V,
|
|
1796
1803
|
syncBehavior: null,
|
|
1797
1804
|
syncBehaviorDefault: null,
|
|
1798
1805
|
syncMaster: null,
|
|
1799
1806
|
syncTolerance: null,
|
|
1800
1807
|
syncToleranceDefault: null,
|
|
1801
|
-
systemLanguage:
|
|
1802
|
-
tabIndex:
|
|
1808
|
+
systemLanguage: U,
|
|
1809
|
+
tabIndex: V,
|
|
1803
1810
|
tableValues: null,
|
|
1804
1811
|
target: null,
|
|
1805
|
-
targetX:
|
|
1806
|
-
targetY:
|
|
1812
|
+
targetX: V,
|
|
1813
|
+
targetY: V,
|
|
1807
1814
|
textAnchor: null,
|
|
1808
1815
|
textDecoration: null,
|
|
1809
1816
|
textRendering: null,
|
|
@@ -1812,28 +1819,28 @@ var bt = gt({
|
|
|
1812
1819
|
title: null,
|
|
1813
1820
|
transformBehavior: null,
|
|
1814
1821
|
type: null,
|
|
1815
|
-
typeOf:
|
|
1822
|
+
typeOf: U,
|
|
1816
1823
|
to: null,
|
|
1817
1824
|
transform: null,
|
|
1818
1825
|
transformOrigin: null,
|
|
1819
1826
|
u1: null,
|
|
1820
1827
|
u2: null,
|
|
1821
|
-
underlinePosition:
|
|
1822
|
-
underlineThickness:
|
|
1828
|
+
underlinePosition: V,
|
|
1829
|
+
underlineThickness: V,
|
|
1823
1830
|
unicode: null,
|
|
1824
1831
|
unicodeBidi: null,
|
|
1825
1832
|
unicodeRange: null,
|
|
1826
|
-
unitsPerEm:
|
|
1833
|
+
unitsPerEm: V,
|
|
1827
1834
|
values: null,
|
|
1828
|
-
vAlphabetic:
|
|
1829
|
-
vMathematical:
|
|
1835
|
+
vAlphabetic: V,
|
|
1836
|
+
vMathematical: V,
|
|
1830
1837
|
vectorEffect: null,
|
|
1831
|
-
vHanging:
|
|
1832
|
-
vIdeographic:
|
|
1838
|
+
vHanging: V,
|
|
1839
|
+
vIdeographic: V,
|
|
1833
1840
|
version: null,
|
|
1834
|
-
vertAdvY:
|
|
1835
|
-
vertOriginX:
|
|
1836
|
-
vertOriginY:
|
|
1841
|
+
vertAdvY: V,
|
|
1842
|
+
vertOriginX: V,
|
|
1843
|
+
vertOriginY: V,
|
|
1837
1844
|
viewBox: null,
|
|
1838
1845
|
viewTarget: null,
|
|
1839
1846
|
visibility: null,
|
|
@@ -1845,7 +1852,7 @@ var bt = gt({
|
|
|
1845
1852
|
x1: null,
|
|
1846
1853
|
x2: null,
|
|
1847
1854
|
xChannelSelector: null,
|
|
1848
|
-
xHeight:
|
|
1855
|
+
xHeight: V,
|
|
1849
1856
|
y: null,
|
|
1850
1857
|
y1: null,
|
|
1851
1858
|
y2: null,
|
|
@@ -1854,8 +1861,8 @@ var bt = gt({
|
|
|
1854
1861
|
zoomAndPan: null
|
|
1855
1862
|
},
|
|
1856
1863
|
space: "svg",
|
|
1857
|
-
transform:
|
|
1858
|
-
}),
|
|
1864
|
+
transform: _t
|
|
1865
|
+
}), xt = ht({
|
|
1859
1866
|
properties: {
|
|
1860
1867
|
xLinkActuate: null,
|
|
1861
1868
|
xLinkArcRole: null,
|
|
@@ -1869,15 +1876,15 @@ var bt = gt({
|
|
|
1869
1876
|
transform(e, t) {
|
|
1870
1877
|
return "xlink:" + t.slice(5).toLowerCase();
|
|
1871
1878
|
}
|
|
1872
|
-
}),
|
|
1879
|
+
}), St = ht({
|
|
1873
1880
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
1874
1881
|
properties: {
|
|
1875
1882
|
xmlnsXLink: null,
|
|
1876
1883
|
xmlns: null
|
|
1877
1884
|
},
|
|
1878
1885
|
space: "xmlns",
|
|
1879
|
-
transform:
|
|
1880
|
-
}),
|
|
1886
|
+
transform: vt
|
|
1887
|
+
}), Ct = ht({
|
|
1881
1888
|
properties: {
|
|
1882
1889
|
xmlBase: null,
|
|
1883
1890
|
xmlLang: null,
|
|
@@ -1887,7 +1894,7 @@ var bt = gt({
|
|
|
1887
1894
|
transform(e, t) {
|
|
1888
1895
|
return "xml:" + t.slice(3).toLowerCase();
|
|
1889
1896
|
}
|
|
1890
|
-
}),
|
|
1897
|
+
}), wt = {
|
|
1891
1898
|
classId: "classID",
|
|
1892
1899
|
dataType: "datatype",
|
|
1893
1900
|
itemId: "itemID",
|
|
@@ -1905,54 +1912,54 @@ var bt = gt({
|
|
|
1905
1912
|
xLinkTitle: "xlinkTitle",
|
|
1906
1913
|
xLinkType: "xlinkType",
|
|
1907
1914
|
xmlnsXLink: "xmlnsXlink"
|
|
1908
|
-
},
|
|
1909
|
-
function
|
|
1910
|
-
let n =
|
|
1915
|
+
}, Tt = /[A-Z]/g, Et = /-[a-z]/g, Dt = /^data[-\w.:]+$/i;
|
|
1916
|
+
function Ot(e, t) {
|
|
1917
|
+
let n = ot(t), r = t, i = R;
|
|
1911
1918
|
if (n in e.normal) return e.property[e.normal[n]];
|
|
1912
|
-
if (n.length > 4 && n.slice(0, 4) === "data" &&
|
|
1919
|
+
if (n.length > 4 && n.slice(0, 4) === "data" && Dt.test(t)) {
|
|
1913
1920
|
if (t.charAt(4) === "-") {
|
|
1914
|
-
let e = t.slice(5).replace(
|
|
1921
|
+
let e = t.slice(5).replace(Et, At);
|
|
1915
1922
|
r = "data" + e.charAt(0).toUpperCase() + e.slice(1);
|
|
1916
1923
|
} else {
|
|
1917
1924
|
let e = t.slice(4);
|
|
1918
|
-
if (!
|
|
1919
|
-
let n = e.replace(
|
|
1925
|
+
if (!Et.test(e)) {
|
|
1926
|
+
let n = e.replace(Tt, kt);
|
|
1920
1927
|
n.charAt(0) !== "-" && (n = "-" + n), t = "data" + n;
|
|
1921
1928
|
}
|
|
1922
1929
|
}
|
|
1923
|
-
i =
|
|
1930
|
+
i = pt;
|
|
1924
1931
|
}
|
|
1925
1932
|
return new i(r, t);
|
|
1926
1933
|
}
|
|
1927
|
-
function
|
|
1934
|
+
function kt(e) {
|
|
1928
1935
|
return "-" + e.toLowerCase();
|
|
1929
1936
|
}
|
|
1930
|
-
function
|
|
1937
|
+
function At(e) {
|
|
1931
1938
|
return e.charAt(1).toUpperCase();
|
|
1932
1939
|
}
|
|
1933
1940
|
//#endregion
|
|
1934
1941
|
//#region node_modules/property-information/index.js
|
|
1935
|
-
var
|
|
1936
|
-
|
|
1937
|
-
|
|
1942
|
+
var jt = at([
|
|
1943
|
+
gt,
|
|
1944
|
+
yt,
|
|
1945
|
+
xt,
|
|
1938
1946
|
St,
|
|
1939
|
-
Ct
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1947
|
+
Ct
|
|
1948
|
+
], "html"), Mt = at([
|
|
1949
|
+
gt,
|
|
1950
|
+
bt,
|
|
1943
1951
|
xt,
|
|
1944
1952
|
St,
|
|
1945
|
-
Ct
|
|
1946
|
-
wt
|
|
1953
|
+
Ct
|
|
1947
1954
|
], "svg");
|
|
1948
1955
|
//#endregion
|
|
1949
1956
|
//#region node_modules/space-separated-tokens/index.js
|
|
1950
|
-
function
|
|
1957
|
+
function Nt(e) {
|
|
1951
1958
|
return e.join(" ").trim();
|
|
1952
1959
|
}
|
|
1953
1960
|
//#endregion
|
|
1954
1961
|
//#region node_modules/inline-style-parser/cjs/index.js
|
|
1955
|
-
var
|
|
1962
|
+
var Pt = /* @__PURE__ */ j(((e, t) => {
|
|
1956
1963
|
var n = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g, r = /\n/g, i = /^\s*/, a = /^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/, o = /^:\s*/, s = /^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/, c = /^[;\s]*/, l = /^\s+|\s+$/g, u = "\n", d = "/", f = "*", p = "", m = "comment", h = "declaration";
|
|
1957
1964
|
function g(e, t) {
|
|
1958
1965
|
if (typeof e != "string") throw TypeError("First argument must be a string");
|
|
@@ -2036,12 +2043,12 @@ var Ft = /* @__PURE__ */ j(((e, t) => {
|
|
|
2036
2043
|
return e ? e.replace(l, p) : p;
|
|
2037
2044
|
}
|
|
2038
2045
|
t.exports = g;
|
|
2039
|
-
})),
|
|
2046
|
+
})), Ft = /* @__PURE__ */ j(((e) => {
|
|
2040
2047
|
var t = e && e.__importDefault || function(e) {
|
|
2041
2048
|
return e && e.__esModule ? e : { default: e };
|
|
2042
2049
|
};
|
|
2043
2050
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = r;
|
|
2044
|
-
var n = t(
|
|
2051
|
+
var n = t(Pt());
|
|
2045
2052
|
function r(e, t) {
|
|
2046
2053
|
let r = null;
|
|
2047
2054
|
if (!e || typeof e != "string") return r;
|
|
@@ -2052,7 +2059,7 @@ var Ft = /* @__PURE__ */ j(((e, t) => {
|
|
|
2052
2059
|
a ? t(n, i, e) : i && (r ||= {}, r[n] = i);
|
|
2053
2060
|
}), r;
|
|
2054
2061
|
}
|
|
2055
|
-
})),
|
|
2062
|
+
})), It = /* @__PURE__ */ j(((e) => {
|
|
2056
2063
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.camelCase = void 0;
|
|
2057
2064
|
var t = /^--[a-zA-Z0-9_-]+$/, n = /-([a-z])/g, r = /^[^-]+$/, i = /^-(webkit|moz|ms|o|khtml)-/, a = /^-(ms)-/, o = function(e) {
|
|
2058
2065
|
return !e || r.test(e) || t.test(e);
|
|
@@ -2064,10 +2071,10 @@ var Ft = /* @__PURE__ */ j(((e, t) => {
|
|
|
2064
2071
|
e.camelCase = function(e, t) {
|
|
2065
2072
|
return t === void 0 && (t = {}), o(e) ? e : (e = e.toLowerCase(), e = t.reactCompat ? e.replace(a, c) : e.replace(i, c), e.replace(n, s));
|
|
2066
2073
|
};
|
|
2067
|
-
})),
|
|
2074
|
+
})), Lt = /* @__PURE__ */ j(((e, t) => {
|
|
2068
2075
|
var n = (e && e.__importDefault || function(e) {
|
|
2069
2076
|
return e && e.__esModule ? e : { default: e };
|
|
2070
|
-
})(
|
|
2077
|
+
})(Ft()), r = It();
|
|
2071
2078
|
function i(e, t) {
|
|
2072
2079
|
var i = {};
|
|
2073
2080
|
return !e || typeof e != "string" || (0, n.default)(e, function(e, n) {
|
|
@@ -2075,8 +2082,8 @@ var Ft = /* @__PURE__ */ j(((e, t) => {
|
|
|
2075
2082
|
}), i;
|
|
2076
2083
|
}
|
|
2077
2084
|
i.default = i, t.exports = i;
|
|
2078
|
-
})),
|
|
2079
|
-
function
|
|
2085
|
+
})), Rt = Bt("end"), zt = Bt("start");
|
|
2086
|
+
function Bt(e) {
|
|
2080
2087
|
return t;
|
|
2081
2088
|
function t(t) {
|
|
2082
2089
|
let n = t && t.position && t.position[e] || {};
|
|
@@ -2087,8 +2094,8 @@ function Vt(e) {
|
|
|
2087
2094
|
};
|
|
2088
2095
|
}
|
|
2089
2096
|
}
|
|
2090
|
-
function
|
|
2091
|
-
let t =
|
|
2097
|
+
function Vt(e) {
|
|
2098
|
+
let t = zt(e), n = Rt(e);
|
|
2092
2099
|
if (t && n) return {
|
|
2093
2100
|
start: t,
|
|
2094
2101
|
end: n
|
|
@@ -2096,21 +2103,21 @@ function Ht(e) {
|
|
|
2096
2103
|
}
|
|
2097
2104
|
//#endregion
|
|
2098
2105
|
//#region node_modules/unist-util-stringify-position/lib/index.js
|
|
2106
|
+
function Ht(e) {
|
|
2107
|
+
return !e || typeof e != "object" ? "" : "position" in e || "type" in e ? Wt(e.position) : "start" in e || "end" in e ? Wt(e) : "line" in e || "column" in e ? Ut(e) : "";
|
|
2108
|
+
}
|
|
2099
2109
|
function Ut(e) {
|
|
2100
|
-
return
|
|
2110
|
+
return Gt(e && e.line) + ":" + Gt(e && e.column);
|
|
2101
2111
|
}
|
|
2102
2112
|
function Wt(e) {
|
|
2103
|
-
return
|
|
2113
|
+
return Ut(e && e.start) + "-" + Ut(e && e.end);
|
|
2104
2114
|
}
|
|
2105
2115
|
function Gt(e) {
|
|
2106
|
-
return Wt(e && e.start) + "-" + Wt(e && e.end);
|
|
2107
|
-
}
|
|
2108
|
-
function Kt(e) {
|
|
2109
2116
|
return e && typeof e == "number" ? e : 1;
|
|
2110
2117
|
}
|
|
2111
2118
|
//#endregion
|
|
2112
2119
|
//#region node_modules/vfile-message/lib/index.js
|
|
2113
|
-
var
|
|
2120
|
+
var W = class extends Error {
|
|
2114
2121
|
constructor(e, t, n) {
|
|
2115
2122
|
super(), typeof t == "string" && (n = t, t = void 0);
|
|
2116
2123
|
let r = "", i = {}, a = !1;
|
|
@@ -2126,29 +2133,29 @@ var U = class extends Error {
|
|
|
2126
2133
|
e && (i.place = e.position);
|
|
2127
2134
|
}
|
|
2128
2135
|
let o = i.place && "start" in i.place ? i.place.start : i.place;
|
|
2129
|
-
this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = o ? o.column : void 0, this.fatal = void 0, this.file = "", this.message = r, this.line = o ? o.line : void 0, this.name =
|
|
2136
|
+
this.ancestors = i.ancestors || void 0, this.cause = i.cause || void 0, this.column = o ? o.column : void 0, this.fatal = void 0, this.file = "", this.message = r, this.line = o ? o.line : void 0, this.name = Ht(i.place) || "1:1", this.place = i.place || void 0, this.reason = this.message, this.ruleId = i.ruleId || void 0, this.source = i.source || void 0, this.stack = a && i.cause && typeof i.cause.stack == "string" ? i.cause.stack : "", this.actual = void 0, this.expected = void 0, this.note = void 0, this.url = void 0;
|
|
2130
2137
|
}
|
|
2131
2138
|
};
|
|
2132
|
-
|
|
2139
|
+
W.prototype.file = "", W.prototype.name = "", W.prototype.reason = "", W.prototype.message = "", W.prototype.stack = "", W.prototype.column = void 0, W.prototype.line = void 0, W.prototype.ancestors = void 0, W.prototype.cause = void 0, W.prototype.fatal = void 0, W.prototype.place = void 0, W.prototype.ruleId = void 0, W.prototype.source = void 0;
|
|
2133
2140
|
//#endregion
|
|
2134
2141
|
//#region node_modules/hast-util-to-jsx-runtime/lib/index.js
|
|
2135
|
-
var
|
|
2142
|
+
var Kt = /* @__PURE__ */ P(Lt(), 1), qt = {}.hasOwnProperty, Jt = /* @__PURE__ */ new Map(), Yt = /[A-Z]/g, Xt = new Set([
|
|
2136
2143
|
"table",
|
|
2137
2144
|
"tbody",
|
|
2138
2145
|
"thead",
|
|
2139
2146
|
"tfoot",
|
|
2140
2147
|
"tr"
|
|
2141
|
-
]),
|
|
2142
|
-
function
|
|
2148
|
+
]), Zt = new Set(["td", "th"]), Qt = "https://github.com/syntax-tree/hast-util-to-jsx-runtime";
|
|
2149
|
+
function $t(e, t) {
|
|
2143
2150
|
if (!t || t.Fragment === void 0) throw TypeError("Expected `Fragment` in options");
|
|
2144
2151
|
let n = t.filePath || void 0, r;
|
|
2145
2152
|
if (t.development) {
|
|
2146
2153
|
if (typeof t.jsxDEV != "function") throw TypeError("Expected `jsxDEV` in options when `development: true`");
|
|
2147
|
-
r =
|
|
2154
|
+
r = dn(n, t.jsxDEV);
|
|
2148
2155
|
} else {
|
|
2149
2156
|
if (typeof t.jsx != "function") throw TypeError("Expected `jsx` in production options");
|
|
2150
2157
|
if (typeof t.jsxs != "function") throw TypeError("Expected `jsxs` in production options");
|
|
2151
|
-
r =
|
|
2158
|
+
r = un(n, t.jsx, t.jsxs);
|
|
2152
2159
|
}
|
|
2153
2160
|
let i = {
|
|
2154
2161
|
Fragment: t.Fragment,
|
|
@@ -2161,72 +2168,72 @@ function en(e, t) {
|
|
|
2161
2168
|
ignoreInvalidStyle: t.ignoreInvalidStyle || !1,
|
|
2162
2169
|
passKeys: t.passKeys !== !1,
|
|
2163
2170
|
passNode: t.passNode || !1,
|
|
2164
|
-
schema: t.space === "svg" ?
|
|
2171
|
+
schema: t.space === "svg" ? Mt : jt,
|
|
2165
2172
|
stylePropertyNameCase: t.stylePropertyNameCase || "dom",
|
|
2166
2173
|
tableCellAlignToStyle: t.tableCellAlignToStyle !== !1
|
|
2167
|
-
}, a =
|
|
2174
|
+
}, a = en(i, e, void 0);
|
|
2168
2175
|
return a && typeof a != "string" ? a : i.create(e, i.Fragment, { children: a || void 0 }, void 0);
|
|
2169
2176
|
}
|
|
2177
|
+
function en(e, t, n) {
|
|
2178
|
+
if (t.type === "element") return tn(e, t, n);
|
|
2179
|
+
if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression") return nn(e, t);
|
|
2180
|
+
if (t.type === "mdxJsxFlowElement" || t.type === "mdxJsxTextElement") return an(e, t, n);
|
|
2181
|
+
if (t.type === "mdxjsEsm") return rn(e, t);
|
|
2182
|
+
if (t.type === "root") return on(e, t, n);
|
|
2183
|
+
if (t.type === "text") return sn(e, t);
|
|
2184
|
+
}
|
|
2170
2185
|
function tn(e, t, n) {
|
|
2171
|
-
if (t.type === "element") return nn(e, t, n);
|
|
2172
|
-
if (t.type === "mdxFlowExpression" || t.type === "mdxTextExpression") return rn(e, t);
|
|
2173
|
-
if (t.type === "mdxJsxFlowElement" || t.type === "mdxJsxTextElement") return on(e, t, n);
|
|
2174
|
-
if (t.type === "mdxjsEsm") return an(e, t);
|
|
2175
|
-
if (t.type === "root") return sn(e, t, n);
|
|
2176
|
-
if (t.type === "text") return cn(e, t);
|
|
2177
|
-
}
|
|
2178
|
-
function nn(e, t, n) {
|
|
2179
2186
|
let r = e.schema, i = r;
|
|
2180
|
-
t.tagName.toLowerCase() === "svg" && r.space === "html" && (i =
|
|
2181
|
-
let a =
|
|
2182
|
-
return
|
|
2183
|
-
return typeof e == "string" ? !
|
|
2184
|
-
})),
|
|
2187
|
+
t.tagName.toLowerCase() === "svg" && r.space === "html" && (i = Mt, e.schema = i), e.ancestors.push(t);
|
|
2188
|
+
let a = _n(e, t.tagName, !1), o = fn(e, t), s = mn(e, t);
|
|
2189
|
+
return Xt.has(t.tagName) && (s = s.filter(function(e) {
|
|
2190
|
+
return typeof e == "string" ? !nt(e) : !0;
|
|
2191
|
+
})), cn(e, o, a, t), ln(o, s), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
|
|
2185
2192
|
}
|
|
2186
|
-
function
|
|
2193
|
+
function nn(e, t) {
|
|
2187
2194
|
if (t.data && t.data.estree && e.evaluater) {
|
|
2188
2195
|
let n = t.data.estree.body[0];
|
|
2189
2196
|
return n.type, e.evaluater.evaluateExpression(n.expression);
|
|
2190
2197
|
}
|
|
2191
|
-
|
|
2198
|
+
vn(e, t.position);
|
|
2192
2199
|
}
|
|
2193
|
-
function
|
|
2200
|
+
function rn(e, t) {
|
|
2194
2201
|
if (t.data && t.data.estree && e.evaluater) return e.evaluater.evaluateProgram(t.data.estree);
|
|
2195
|
-
|
|
2202
|
+
vn(e, t.position);
|
|
2196
2203
|
}
|
|
2197
|
-
function
|
|
2204
|
+
function an(e, t, n) {
|
|
2198
2205
|
let r = e.schema, i = r;
|
|
2199
|
-
t.name === "svg" && r.space === "html" && (i =
|
|
2200
|
-
let a = t.name === null ? e.Fragment :
|
|
2201
|
-
return
|
|
2206
|
+
t.name === "svg" && r.space === "html" && (i = Mt, e.schema = i), e.ancestors.push(t);
|
|
2207
|
+
let a = t.name === null ? e.Fragment : _n(e, t.name, !0), o = pn(e, t), s = mn(e, t);
|
|
2208
|
+
return cn(e, o, a, t), ln(o, s), e.ancestors.pop(), e.schema = r, e.create(t, a, o, n);
|
|
2202
2209
|
}
|
|
2203
|
-
function
|
|
2210
|
+
function on(e, t, n) {
|
|
2204
2211
|
let r = {};
|
|
2205
|
-
return
|
|
2212
|
+
return ln(r, mn(e, t)), e.create(t, e.Fragment, r, n);
|
|
2206
2213
|
}
|
|
2207
|
-
function
|
|
2214
|
+
function sn(e, t) {
|
|
2208
2215
|
return t.value;
|
|
2209
2216
|
}
|
|
2210
|
-
function
|
|
2217
|
+
function cn(e, t, n, r) {
|
|
2211
2218
|
typeof n != "string" && n !== e.Fragment && e.passNode && (t.node = r);
|
|
2212
2219
|
}
|
|
2213
|
-
function
|
|
2220
|
+
function ln(e, t) {
|
|
2214
2221
|
if (t.length > 0) {
|
|
2215
2222
|
let n = t.length > 1 ? t : t[0];
|
|
2216
2223
|
n && (e.children = n);
|
|
2217
2224
|
}
|
|
2218
2225
|
}
|
|
2219
|
-
function
|
|
2226
|
+
function un(e, t, n) {
|
|
2220
2227
|
return r;
|
|
2221
2228
|
function r(e, r, i, a) {
|
|
2222
2229
|
let o = Array.isArray(i.children) ? n : t;
|
|
2223
2230
|
return a ? o(r, i, a) : o(r, i);
|
|
2224
2231
|
}
|
|
2225
2232
|
}
|
|
2226
|
-
function
|
|
2233
|
+
function dn(e, t) {
|
|
2227
2234
|
return n;
|
|
2228
2235
|
function n(n, r, i, a) {
|
|
2229
|
-
let o = Array.isArray(i.children), s =
|
|
2236
|
+
let o = Array.isArray(i.children), s = zt(n);
|
|
2230
2237
|
return t(r, i, a, o, {
|
|
2231
2238
|
columnNumber: s ? s.column - 1 : void 0,
|
|
2232
2239
|
fileName: e,
|
|
@@ -2234,13 +2241,13 @@ function fn(e, t) {
|
|
|
2234
2241
|
}, void 0);
|
|
2235
2242
|
}
|
|
2236
2243
|
}
|
|
2237
|
-
function
|
|
2244
|
+
function fn(e, t) {
|
|
2238
2245
|
let n = {}, r, i;
|
|
2239
|
-
for (i in t.properties) if (i !== "children" &&
|
|
2240
|
-
let a =
|
|
2246
|
+
for (i in t.properties) if (i !== "children" && qt.call(t.properties, i)) {
|
|
2247
|
+
let a = hn(e, i, t.properties[i]);
|
|
2241
2248
|
if (a) {
|
|
2242
2249
|
let [i, o] = a;
|
|
2243
|
-
e.tableCellAlignToStyle && i === "align" && typeof o == "string" &&
|
|
2250
|
+
e.tableCellAlignToStyle && i === "align" && typeof o == "string" && Zt.has(t.tagName) ? r = o : n[i] = o;
|
|
2244
2251
|
}
|
|
2245
2252
|
}
|
|
2246
2253
|
if (r) {
|
|
@@ -2249,7 +2256,7 @@ function pn(e, t) {
|
|
|
2249
2256
|
}
|
|
2250
2257
|
return n;
|
|
2251
2258
|
}
|
|
2252
|
-
function
|
|
2259
|
+
function pn(e, t) {
|
|
2253
2260
|
let n = {};
|
|
2254
2261
|
for (let r of t.attributes) if (r.type === "mdxJsxExpressionAttribute") if (r.data && r.data.estree && e.evaluater) {
|
|
2255
2262
|
let t = r.data.estree.body[0];
|
|
@@ -2258,20 +2265,20 @@ function mn(e, t) {
|
|
|
2258
2265
|
i.type;
|
|
2259
2266
|
let a = i.properties[0];
|
|
2260
2267
|
a.type, Object.assign(n, e.evaluater.evaluateExpression(a.argument));
|
|
2261
|
-
} else
|
|
2268
|
+
} else vn(e, t.position);
|
|
2262
2269
|
else {
|
|
2263
2270
|
let i = r.name, a;
|
|
2264
2271
|
if (r.value && typeof r.value == "object") if (r.value.data && r.value.data.estree && e.evaluater) {
|
|
2265
2272
|
let t = r.value.data.estree.body[0];
|
|
2266
2273
|
t.type, a = e.evaluater.evaluateExpression(t.expression);
|
|
2267
|
-
} else
|
|
2274
|
+
} else vn(e, t.position);
|
|
2268
2275
|
else a = r.value === null ? !0 : r.value;
|
|
2269
2276
|
n[i] = a;
|
|
2270
2277
|
}
|
|
2271
2278
|
return n;
|
|
2272
2279
|
}
|
|
2273
|
-
function
|
|
2274
|
-
let n = [], r = -1, i = e.passKeys ? /* @__PURE__ */ new Map() :
|
|
2280
|
+
function mn(e, t) {
|
|
2281
|
+
let n = [], r = -1, i = e.passKeys ? /* @__PURE__ */ new Map() : Jt;
|
|
2275
2282
|
for (; ++r < t.children.length;) {
|
|
2276
2283
|
let a = t.children[r], o;
|
|
2277
2284
|
if (e.passKeys) {
|
|
@@ -2281,36 +2288,36 @@ function hn(e, t) {
|
|
|
2281
2288
|
o = e + "-" + t, i.set(e, t + 1);
|
|
2282
2289
|
}
|
|
2283
2290
|
}
|
|
2284
|
-
let s =
|
|
2291
|
+
let s = en(e, a, o);
|
|
2285
2292
|
s !== void 0 && n.push(s);
|
|
2286
2293
|
}
|
|
2287
2294
|
return n;
|
|
2288
2295
|
}
|
|
2289
|
-
function
|
|
2290
|
-
let r =
|
|
2296
|
+
function hn(e, t, n) {
|
|
2297
|
+
let r = Ot(e.schema, t);
|
|
2291
2298
|
if (!(n == null || typeof n == "number" && Number.isNaN(n))) {
|
|
2292
|
-
if (Array.isArray(n) && (n = r.commaSeparated ?
|
|
2293
|
-
let t = typeof n == "object" ? n :
|
|
2294
|
-
return e.stylePropertyNameCase === "css" && (t =
|
|
2299
|
+
if (Array.isArray(n) && (n = r.commaSeparated ? Xe(n) : Nt(n)), r.property === "style") {
|
|
2300
|
+
let t = typeof n == "object" ? n : gn(e, String(n));
|
|
2301
|
+
return e.stylePropertyNameCase === "css" && (t = yn(t)), ["style", t];
|
|
2295
2302
|
}
|
|
2296
|
-
return [e.elementAttributeNameCase === "react" && r.space ?
|
|
2303
|
+
return [e.elementAttributeNameCase === "react" && r.space ? wt[r.property] || r.property : r.attribute, n];
|
|
2297
2304
|
}
|
|
2298
2305
|
}
|
|
2299
|
-
function
|
|
2306
|
+
function gn(e, t) {
|
|
2300
2307
|
try {
|
|
2301
|
-
return (0,
|
|
2308
|
+
return (0, Kt.default)(t, { reactCompat: !0 });
|
|
2302
2309
|
} catch (t) {
|
|
2303
2310
|
if (e.ignoreInvalidStyle) return {};
|
|
2304
|
-
let n = t, r = new
|
|
2311
|
+
let n = t, r = new W("Cannot parse `style` attribute", {
|
|
2305
2312
|
ancestors: e.ancestors,
|
|
2306
2313
|
cause: n,
|
|
2307
2314
|
ruleId: "style",
|
|
2308
2315
|
source: "hast-util-to-jsx-runtime"
|
|
2309
2316
|
});
|
|
2310
|
-
throw r.file = e.filePath || void 0, r.url =
|
|
2317
|
+
throw r.file = e.filePath || void 0, r.url = Qt + "#cannot-parse-style-attribute", r;
|
|
2311
2318
|
}
|
|
2312
2319
|
}
|
|
2313
|
-
function
|
|
2320
|
+
function _n(e, t, n) {
|
|
2314
2321
|
let r;
|
|
2315
2322
|
if (!n) r = {
|
|
2316
2323
|
type: "Literal",
|
|
@@ -2319,7 +2326,7 @@ function vn(e, t, n) {
|
|
|
2319
2326
|
else if (t.includes(".")) {
|
|
2320
2327
|
let e = t.split("."), n = -1, i;
|
|
2321
2328
|
for (; ++n < e.length;) {
|
|
2322
|
-
let t =
|
|
2329
|
+
let t = et(e[n]) ? {
|
|
2323
2330
|
type: "Identifier",
|
|
2324
2331
|
name: e[n]
|
|
2325
2332
|
} : {
|
|
@@ -2335,7 +2342,7 @@ function vn(e, t, n) {
|
|
|
2335
2342
|
} : t;
|
|
2336
2343
|
}
|
|
2337
2344
|
r = i;
|
|
2338
|
-
} else r =
|
|
2345
|
+
} else r = et(t) && !/^[a-z]/.test(t) ? {
|
|
2339
2346
|
type: "Identifier",
|
|
2340
2347
|
name: t
|
|
2341
2348
|
} : {
|
|
@@ -2344,35 +2351,35 @@ function vn(e, t, n) {
|
|
|
2344
2351
|
};
|
|
2345
2352
|
if (r.type === "Literal") {
|
|
2346
2353
|
let t = r.value;
|
|
2347
|
-
return
|
|
2354
|
+
return qt.call(e.components, t) ? e.components[t] : t;
|
|
2348
2355
|
}
|
|
2349
2356
|
if (e.evaluater) return e.evaluater.evaluateExpression(r);
|
|
2350
|
-
|
|
2357
|
+
vn(e);
|
|
2351
2358
|
}
|
|
2352
|
-
function
|
|
2353
|
-
let n = new
|
|
2359
|
+
function vn(e, t) {
|
|
2360
|
+
let n = new W("Cannot handle MDX estrees without `createEvaluater`", {
|
|
2354
2361
|
ancestors: e.ancestors,
|
|
2355
2362
|
place: t,
|
|
2356
2363
|
ruleId: "mdx-estree",
|
|
2357
2364
|
source: "hast-util-to-jsx-runtime"
|
|
2358
2365
|
});
|
|
2359
|
-
throw n.file = e.filePath || void 0, n.url =
|
|
2366
|
+
throw n.file = e.filePath || void 0, n.url = Qt + "#cannot-handle-mdx-estrees-without-createevaluater", n;
|
|
2360
2367
|
}
|
|
2361
|
-
function
|
|
2368
|
+
function yn(e) {
|
|
2362
2369
|
let t = {}, n;
|
|
2363
|
-
for (n in e)
|
|
2370
|
+
for (n in e) qt.call(e, n) && (t[bn(n)] = e[n]);
|
|
2364
2371
|
return t;
|
|
2365
2372
|
}
|
|
2366
|
-
function
|
|
2367
|
-
let t = e.replace(
|
|
2373
|
+
function bn(e) {
|
|
2374
|
+
let t = e.replace(Yt, xn);
|
|
2368
2375
|
return t.slice(0, 3) === "ms-" && (t = "-" + t), t;
|
|
2369
2376
|
}
|
|
2370
|
-
function
|
|
2377
|
+
function xn(e) {
|
|
2371
2378
|
return "-" + e.toLowerCase();
|
|
2372
2379
|
}
|
|
2373
2380
|
//#endregion
|
|
2374
2381
|
//#region node_modules/html-url-attributes/lib/index.js
|
|
2375
|
-
var
|
|
2382
|
+
var Sn = {
|
|
2376
2383
|
action: ["form"],
|
|
2377
2384
|
cite: [
|
|
2378
2385
|
"blockquote",
|
|
@@ -2404,45 +2411,45 @@ var Cn = {
|
|
|
2404
2411
|
"track",
|
|
2405
2412
|
"video"
|
|
2406
2413
|
]
|
|
2407
|
-
},
|
|
2408
|
-
function
|
|
2409
|
-
let n = t ||
|
|
2410
|
-
return
|
|
2414
|
+
}, Cn = {};
|
|
2415
|
+
function wn(e, t) {
|
|
2416
|
+
let n = t || Cn;
|
|
2417
|
+
return Tn(e, typeof n.includeImageAlt == "boolean" ? n.includeImageAlt : !0, typeof n.includeHtml == "boolean" ? n.includeHtml : !0);
|
|
2411
2418
|
}
|
|
2412
|
-
function
|
|
2413
|
-
if (
|
|
2419
|
+
function Tn(e, t, n) {
|
|
2420
|
+
if (Dn(e)) {
|
|
2414
2421
|
if ("value" in e) return e.type === "html" && !n ? "" : e.value;
|
|
2415
2422
|
if (t && "alt" in e && e.alt) return e.alt;
|
|
2416
|
-
if ("children" in e) return
|
|
2423
|
+
if ("children" in e) return En(e.children, t, n);
|
|
2417
2424
|
}
|
|
2418
|
-
return Array.isArray(e) ?
|
|
2425
|
+
return Array.isArray(e) ? En(e, t, n) : "";
|
|
2419
2426
|
}
|
|
2420
|
-
function
|
|
2427
|
+
function En(e, t, n) {
|
|
2421
2428
|
let r = [], i = -1;
|
|
2422
|
-
for (; ++i < e.length;) r[i] =
|
|
2429
|
+
for (; ++i < e.length;) r[i] = Tn(e[i], t, n);
|
|
2423
2430
|
return r.join("");
|
|
2424
2431
|
}
|
|
2425
|
-
function
|
|
2432
|
+
function Dn(e) {
|
|
2426
2433
|
return !!(e && typeof e == "object");
|
|
2427
2434
|
}
|
|
2428
2435
|
//#endregion
|
|
2429
2436
|
//#region node_modules/decode-named-character-reference/index.dom.js
|
|
2430
|
-
var
|
|
2431
|
-
function
|
|
2437
|
+
var On = document.createElement("i");
|
|
2438
|
+
function kn(e) {
|
|
2432
2439
|
let t = "&" + e + ";";
|
|
2433
|
-
|
|
2434
|
-
let n =
|
|
2440
|
+
On.innerHTML = t;
|
|
2441
|
+
let n = On.textContent;
|
|
2435
2442
|
return n.charCodeAt(n.length - 1) === 59 && e !== "semi" || n === t ? !1 : n;
|
|
2436
2443
|
}
|
|
2437
2444
|
//#endregion
|
|
2438
2445
|
//#region node_modules/micromark-util-chunked/index.js
|
|
2439
|
-
function
|
|
2446
|
+
function G(e, t, n, r) {
|
|
2440
2447
|
let i = e.length, a = 0, o;
|
|
2441
2448
|
if (t = t < 0 ? -t > i ? 0 : i + t : t > i ? i : t, n = n > 0 ? n : 0, r.length < 1e4) o = Array.from(r), o.unshift(t, n), e.splice(...o);
|
|
2442
2449
|
else for (n && e.splice(t, n); a < r.length;) o = r.slice(a, a + 1e4), o.unshift(t, 0), e.splice(...o), a += 1e4, t += 1e4;
|
|
2443
2450
|
}
|
|
2444
|
-
function
|
|
2445
|
-
return e.length > 0 ? (
|
|
2451
|
+
function An(e, t) {
|
|
2452
|
+
return e.length > 0 ? (G(e, e.length, 0, t), e) : t;
|
|
2446
2453
|
}
|
|
2447
2454
|
//#endregion
|
|
2448
2455
|
//#region node_modules/micromark-util-combine-extensions/index.js
|
|
@@ -2466,7 +2473,7 @@ function Nn(e, t) {
|
|
|
2466
2473
|
function Pn(e, t) {
|
|
2467
2474
|
let n = -1, r = [];
|
|
2468
2475
|
for (; ++n < t.length;) (t[n].add === "after" ? e : r).push(t[n]);
|
|
2469
|
-
|
|
2476
|
+
G(e, 0, 0, r);
|
|
2470
2477
|
}
|
|
2471
2478
|
//#endregion
|
|
2472
2479
|
//#region node_modules/micromark-util-decode-numeric-character-reference/index.js
|
|
@@ -2585,7 +2592,7 @@ function Xn(e) {
|
|
|
2585
2592
|
_(r);
|
|
2586
2593
|
let s = n;
|
|
2587
2594
|
for (; s < t.events.length;) t.events[s][1].end = { ...o }, s++;
|
|
2588
|
-
return
|
|
2595
|
+
return G(t.events, a + 1, 0, t.events.slice(n)), t.events.length = s, l(e);
|
|
2589
2596
|
}
|
|
2590
2597
|
return s(e);
|
|
2591
2598
|
}
|
|
@@ -2641,7 +2648,7 @@ function Xn(e) {
|
|
|
2641
2648
|
s = !0;
|
|
2642
2649
|
}
|
|
2643
2650
|
for (_(r), e = n; e < t.events.length;) t.events[e][1].end = { ...c }, e++;
|
|
2644
|
-
|
|
2651
|
+
G(t.events, a + 1, 0, t.events.slice(n)), t.events.length = e;
|
|
2645
2652
|
}
|
|
2646
2653
|
}
|
|
2647
2654
|
function _(r) {
|
|
@@ -2705,7 +2712,7 @@ function tr(e, t) {
|
|
|
2705
2712
|
type: c > 1 ? "strong" : "emphasis",
|
|
2706
2713
|
start: { ...o.start },
|
|
2707
2714
|
end: { ...s.end }
|
|
2708
|
-
}, e[r][1].end = { ...o.start }, e[n][1].start = { ...s.end }, l = [], e[r][1].end.offset - e[r][1].start.offset && (l =
|
|
2715
|
+
}, e[r][1].end = { ...o.start }, e[n][1].start = { ...s.end }, l = [], e[r][1].end.offset - e[r][1].start.offset && (l = An(l, [[
|
|
2709
2716
|
"enter",
|
|
2710
2717
|
e[r][1],
|
|
2711
2718
|
t
|
|
@@ -2713,7 +2720,7 @@ function tr(e, t) {
|
|
|
2713
2720
|
"exit",
|
|
2714
2721
|
e[r][1],
|
|
2715
2722
|
t
|
|
2716
|
-
]])), l =
|
|
2723
|
+
]])), l = An(l, [
|
|
2717
2724
|
[
|
|
2718
2725
|
"enter",
|
|
2719
2726
|
i,
|
|
@@ -2734,7 +2741,7 @@ function tr(e, t) {
|
|
|
2734
2741
|
a,
|
|
2735
2742
|
t
|
|
2736
2743
|
]
|
|
2737
|
-
]), l =
|
|
2744
|
+
]), l = An(l, $n(t.parser.constructs.insideSpan.null, e.slice(r + 1, n), t)), l = An(l, [
|
|
2738
2745
|
[
|
|
2739
2746
|
"exit",
|
|
2740
2747
|
a,
|
|
@@ -2755,7 +2762,7 @@ function tr(e, t) {
|
|
|
2755
2762
|
i,
|
|
2756
2763
|
t
|
|
2757
2764
|
]
|
|
2758
|
-
]), e[n][1].end.offset - e[n][1].start.offset ? (u = 2, l =
|
|
2765
|
+
]), e[n][1].end.offset - e[n][1].start.offset ? (u = 2, l = An(l, [[
|
|
2759
2766
|
"enter",
|
|
2760
2767
|
e[n][1],
|
|
2761
2768
|
t
|
|
@@ -2763,7 +2770,7 @@ function tr(e, t) {
|
|
|
2763
2770
|
"exit",
|
|
2764
2771
|
e[n][1],
|
|
2765
2772
|
t
|
|
2766
|
-
]])) : u = 0,
|
|
2773
|
+
]])) : u = 0, G(e, r - 1, n - r + 3, l), n = r + l.length - u - 2;
|
|
2767
2774
|
break;
|
|
2768
2775
|
}
|
|
2769
2776
|
}
|
|
@@ -2912,7 +2919,7 @@ function hr(e, t, n) {
|
|
|
2912
2919
|
function u(s) {
|
|
2913
2920
|
if (s === 59 && i) {
|
|
2914
2921
|
let i = e.exit("characterReferenceValue");
|
|
2915
|
-
return o === q && !
|
|
2922
|
+
return o === q && !kn(r.sliceSerialize(i)) ? n(s) : (e.enter("characterReferenceMarker"), e.consume(s), e.exit("characterReferenceMarker"), e.exit("characterReference"), t);
|
|
2916
2923
|
}
|
|
2917
2924
|
return o(s) && i++ < a ? (e.consume(s), u) : n(s);
|
|
2918
2925
|
}
|
|
@@ -3154,7 +3161,7 @@ function Ar(e) {
|
|
|
3154
3161
|
i && (r[1].end = { ...u.get(i)[1].start }, s = u.slice(i, n), s.unshift(r), u.splice(i, n - i + 1, s));
|
|
3155
3162
|
}
|
|
3156
3163
|
}
|
|
3157
|
-
return
|
|
3164
|
+
return G(e, 0, Infinity, u.slice(0)), !l;
|
|
3158
3165
|
}
|
|
3159
3166
|
function jr(e, t) {
|
|
3160
3167
|
let n = e.get(t)[1], r = e.get(t)[2], i = t - 1, a = [], o = n._tokenizer;
|
|
@@ -3372,7 +3379,7 @@ function Jr(e, t) {
|
|
|
3372
3379
|
start: e[r][1].start,
|
|
3373
3380
|
end: e[n][1].end,
|
|
3374
3381
|
contentType: "text"
|
|
3375
|
-
},
|
|
3382
|
+
}, G(e, r, n - r + 1, [
|
|
3376
3383
|
[
|
|
3377
3384
|
"enter",
|
|
3378
3385
|
i,
|
|
@@ -3451,13 +3458,13 @@ function ni(e, t, n) {
|
|
|
3451
3458
|
return e.enter("htmlFlow"), e.enter("htmlFlowData"), e.consume(t), d;
|
|
3452
3459
|
}
|
|
3453
3460
|
function d(s) {
|
|
3454
|
-
return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t :
|
|
3461
|
+
return s === 33 ? (e.consume(s), f) : s === 47 ? (e.consume(s), a = !0, h) : s === 63 ? (e.consume(s), i = 3, r.interrupt ? t : F) : K(s) ? (e.consume(s), o = String.fromCharCode(s), g) : n(s);
|
|
3455
3462
|
}
|
|
3456
3463
|
function f(a) {
|
|
3457
|
-
return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) : K(a) ? (e.consume(a), i = 4, r.interrupt ? t :
|
|
3464
|
+
return a === 45 ? (e.consume(a), i = 2, p) : a === 91 ? (e.consume(a), i = 5, s = 0, m) : K(a) ? (e.consume(a), i = 4, r.interrupt ? t : F) : n(a);
|
|
3458
3465
|
}
|
|
3459
3466
|
function p(i) {
|
|
3460
|
-
return i === 45 ? (e.consume(i), r.interrupt ? t :
|
|
3467
|
+
return i === 45 ? (e.consume(i), r.interrupt ? t : F) : n(i);
|
|
3461
3468
|
}
|
|
3462
3469
|
function m(i) {
|
|
3463
3470
|
return i === "CDATA[".charCodeAt(s++) ? (e.consume(i), s === 6 ? r.interrupt ? t : O : m) : n(i);
|
|
@@ -3506,10 +3513,10 @@ function ni(e, t, n) {
|
|
|
3506
3513
|
return t === null || J(t) ? O(t) : X(t) ? (e.consume(t), D) : n(t);
|
|
3507
3514
|
}
|
|
3508
3515
|
function O(t) {
|
|
3509
|
-
return t === 45 && i === 2 ? (e.consume(t), M) : t === 60 && i === 1 ? (e.consume(t), N) : t === 62 && i === 4 ? (e.consume(t),
|
|
3516
|
+
return t === 45 && i === 2 ? (e.consume(t), M) : t === 60 && i === 1 ? (e.consume(t), N) : t === 62 && i === 4 ? (e.consume(t), I) : t === 63 && i === 3 ? (e.consume(t), F) : t === 93 && i === 5 ? (e.consume(t), ee) : J(t) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check($r, te, k)(t)) : t === null || J(t) ? (e.exit("htmlFlowData"), k(t)) : (e.consume(t), O);
|
|
3510
3517
|
}
|
|
3511
3518
|
function k(t) {
|
|
3512
|
-
return e.check(ei, A,
|
|
3519
|
+
return e.check(ei, A, te)(t);
|
|
3513
3520
|
}
|
|
3514
3521
|
function A(t) {
|
|
3515
3522
|
return e.enter("lineEnding"), e.consume(t), e.exit("lineEnding"), j;
|
|
@@ -3518,7 +3525,7 @@ function ni(e, t, n) {
|
|
|
3518
3525
|
return t === null || J(t) ? k(t) : (e.enter("htmlFlowData"), O(t));
|
|
3519
3526
|
}
|
|
3520
3527
|
function M(t) {
|
|
3521
|
-
return t === 45 ? (e.consume(t),
|
|
3528
|
+
return t === 45 ? (e.consume(t), F) : O(t);
|
|
3522
3529
|
}
|
|
3523
3530
|
function N(t) {
|
|
3524
3531
|
return t === 47 ? (e.consume(t), o = "", P) : O(t);
|
|
@@ -3526,20 +3533,20 @@ function ni(e, t, n) {
|
|
|
3526
3533
|
function P(t) {
|
|
3527
3534
|
if (t === 62) {
|
|
3528
3535
|
let n = o.toLowerCase();
|
|
3529
|
-
return Zr.includes(n) ? (e.consume(t),
|
|
3536
|
+
return Zr.includes(n) ? (e.consume(t), I) : O(t);
|
|
3530
3537
|
}
|
|
3531
3538
|
return K(t) && o.length < 8 ? (e.consume(t), o += String.fromCharCode(t), P) : O(t);
|
|
3532
3539
|
}
|
|
3533
3540
|
function ee(t) {
|
|
3534
|
-
return t === 93 ? (e.consume(t),
|
|
3535
|
-
}
|
|
3536
|
-
function te(t) {
|
|
3537
|
-
return t === 62 ? (e.consume(t), F) : t === 45 && i === 2 ? (e.consume(t), te) : O(t);
|
|
3541
|
+
return t === 93 ? (e.consume(t), F) : O(t);
|
|
3538
3542
|
}
|
|
3539
3543
|
function F(t) {
|
|
3540
|
-
return t ===
|
|
3544
|
+
return t === 62 ? (e.consume(t), I) : t === 45 && i === 2 ? (e.consume(t), F) : O(t);
|
|
3545
|
+
}
|
|
3546
|
+
function I(t) {
|
|
3547
|
+
return t === null || J(t) ? (e.exit("htmlFlowData"), te(t)) : (e.consume(t), I);
|
|
3541
3548
|
}
|
|
3542
|
-
function
|
|
3549
|
+
function te(n) {
|
|
3543
3550
|
return e.exit("htmlFlow"), t(n);
|
|
3544
3551
|
}
|
|
3545
3552
|
}
|
|
@@ -3673,7 +3680,7 @@ function di(e) {
|
|
|
3673
3680
|
r.type = "data", t += e;
|
|
3674
3681
|
}
|
|
3675
3682
|
}
|
|
3676
|
-
return e.length !== n.length &&
|
|
3683
|
+
return e.length !== n.length && G(e, 0, e.length, n), e;
|
|
3677
3684
|
}
|
|
3678
3685
|
function fi(e, t) {
|
|
3679
3686
|
let n = e.length, r = 0, i, a, o, s;
|
|
@@ -3707,11 +3714,11 @@ function fi(e, t) {
|
|
|
3707
3714
|
"enter",
|
|
3708
3715
|
l,
|
|
3709
3716
|
t
|
|
3710
|
-
]], s =
|
|
3717
|
+
]], s = An(s, e.slice(a + 1, a + r + 3)), s = An(s, [[
|
|
3711
3718
|
"enter",
|
|
3712
3719
|
u,
|
|
3713
3720
|
t
|
|
3714
|
-
]]), s =
|
|
3721
|
+
]]), s = An(s, $n(t.parser.constructs.insideSpan.null, e.slice(a + r + 4, o - 3), t)), s = An(s, [
|
|
3715
3722
|
[
|
|
3716
3723
|
"exit",
|
|
3717
3724
|
u,
|
|
@@ -3724,11 +3731,11 @@ function fi(e, t) {
|
|
|
3724
3731
|
l,
|
|
3725
3732
|
t
|
|
3726
3733
|
]
|
|
3727
|
-
]), s =
|
|
3734
|
+
]), s = An(s, e.slice(o + 1)), s = An(s, [[
|
|
3728
3735
|
"exit",
|
|
3729
3736
|
c,
|
|
3730
3737
|
t
|
|
3731
|
-
]]),
|
|
3738
|
+
]]), G(e, a, e.length, s), e;
|
|
3732
3739
|
}
|
|
3733
3740
|
function pi(e, t, n) {
|
|
3734
3741
|
let r = this, i = r.events.length, a, o;
|
|
@@ -4200,7 +4207,7 @@ function $i(e, t, n) {
|
|
|
4200
4207
|
}, u = t.tokenize.call(l, c);
|
|
4201
4208
|
return t.resolveAll && a.push(t), l;
|
|
4202
4209
|
function d(e) {
|
|
4203
|
-
return o =
|
|
4210
|
+
return o = An(o, e), g(), o[o.length - 1] === null ? (w(t, 0), l.events = $n(a, l.events, l), l.events) : [];
|
|
4204
4211
|
}
|
|
4205
4212
|
function f(e, t) {
|
|
4206
4213
|
return ta(p(e), t);
|
|
@@ -4287,7 +4294,7 @@ function $i(e, t, n) {
|
|
|
4287
4294
|
}
|
|
4288
4295
|
}
|
|
4289
4296
|
function w(e, t) {
|
|
4290
|
-
e.resolveAll && !a.includes(e) && a.push(e), e.resolve &&
|
|
4297
|
+
e.resolveAll && !a.includes(e) && a.push(e), e.resolve && G(l.events, t, l.events.length - t, e.resolve(l.events.slice(t), l)), e.resolveTo && (l.events = e.resolveTo(l.events, l));
|
|
4291
4298
|
}
|
|
4292
4299
|
function T() {
|
|
4293
4300
|
let e = m(), t = l.previous, n = l.currentConstruct, i = l.events.length, a = Array.from(s);
|
|
@@ -4413,7 +4420,7 @@ function ca(e, t, n) {
|
|
|
4413
4420
|
let e = n.charCodeAt(1), t = e === 120 || e === 88;
|
|
4414
4421
|
return Fn(n.slice(t ? 2 : 1), t ? 16 : 10);
|
|
4415
4422
|
}
|
|
4416
|
-
return
|
|
4423
|
+
return kn(n) || e;
|
|
4417
4424
|
}
|
|
4418
4425
|
//#endregion
|
|
4419
4426
|
//#region node_modules/mdast-util-from-markdown/lib/index.js
|
|
@@ -4432,60 +4439,60 @@ function da(e) {
|
|
|
4432
4439
|
"strong"
|
|
4433
4440
|
],
|
|
4434
4441
|
enter: {
|
|
4435
|
-
autolink: a(
|
|
4442
|
+
autolink: a(_e),
|
|
4436
4443
|
autolinkProtocol: T,
|
|
4437
4444
|
autolinkEmail: T,
|
|
4438
|
-
atxHeading: a(
|
|
4439
|
-
blockQuote: a(
|
|
4445
|
+
atxHeading: a(pe),
|
|
4446
|
+
blockQuote: a(le),
|
|
4440
4447
|
characterEscape: T,
|
|
4441
4448
|
characterReference: T,
|
|
4442
|
-
codeFenced: a(
|
|
4449
|
+
codeFenced: a(ue),
|
|
4443
4450
|
codeFencedFenceInfo: o,
|
|
4444
4451
|
codeFencedFenceMeta: o,
|
|
4445
|
-
codeIndented: a(
|
|
4446
|
-
codeText: a(
|
|
4452
|
+
codeIndented: a(ue, o),
|
|
4453
|
+
codeText: a(de, o),
|
|
4447
4454
|
codeTextData: T,
|
|
4448
4455
|
data: T,
|
|
4449
4456
|
codeFlowValue: T,
|
|
4450
|
-
definition: a(
|
|
4457
|
+
definition: a(fe),
|
|
4451
4458
|
definitionDestinationString: o,
|
|
4452
4459
|
definitionLabelString: o,
|
|
4453
4460
|
definitionTitleString: o,
|
|
4454
|
-
emphasis: a(
|
|
4455
|
-
hardBreakEscape: a(
|
|
4456
|
-
hardBreakTrailing: a(
|
|
4457
|
-
htmlFlow: a(
|
|
4461
|
+
emphasis: a(L),
|
|
4462
|
+
hardBreakEscape: a(me),
|
|
4463
|
+
hardBreakTrailing: a(me),
|
|
4464
|
+
htmlFlow: a(he, o),
|
|
4458
4465
|
htmlFlowData: T,
|
|
4459
|
-
htmlText: a(
|
|
4466
|
+
htmlText: a(he, o),
|
|
4460
4467
|
htmlTextData: T,
|
|
4461
|
-
image: a(
|
|
4468
|
+
image: a(ge),
|
|
4462
4469
|
label: o,
|
|
4463
|
-
link: a(
|
|
4464
|
-
listItem: a(
|
|
4470
|
+
link: a(_e),
|
|
4471
|
+
listItem: a(ye),
|
|
4465
4472
|
listItemValue: f,
|
|
4466
|
-
listOrdered: a(
|
|
4467
|
-
listUnordered: a(
|
|
4468
|
-
paragraph: a(
|
|
4469
|
-
reference:
|
|
4473
|
+
listOrdered: a(ve, d),
|
|
4474
|
+
listUnordered: a(ve),
|
|
4475
|
+
paragraph: a(be),
|
|
4476
|
+
reference: ne,
|
|
4470
4477
|
referenceString: o,
|
|
4471
4478
|
resourceDestinationString: o,
|
|
4472
4479
|
resourceTitleString: o,
|
|
4473
|
-
setextHeading: a(
|
|
4474
|
-
strong: a(
|
|
4475
|
-
thematicBreak: a(
|
|
4480
|
+
setextHeading: a(pe),
|
|
4481
|
+
strong: a(xe),
|
|
4482
|
+
thematicBreak: a(Ce)
|
|
4476
4483
|
},
|
|
4477
4484
|
exit: {
|
|
4478
4485
|
atxHeading: c(),
|
|
4479
4486
|
atxHeadingSequence: x,
|
|
4480
4487
|
autolink: c(),
|
|
4481
|
-
autolinkEmail:
|
|
4482
|
-
autolinkProtocol:
|
|
4488
|
+
autolinkEmail: ce,
|
|
4489
|
+
autolinkProtocol: se,
|
|
4483
4490
|
blockQuote: c(),
|
|
4484
4491
|
characterEscapeValue: E,
|
|
4485
|
-
characterReferenceMarkerHexadecimal:
|
|
4486
|
-
characterReferenceMarkerNumeric:
|
|
4487
|
-
characterReferenceValue:
|
|
4488
|
-
characterReference:
|
|
4492
|
+
characterReferenceMarkerHexadecimal: ie,
|
|
4493
|
+
characterReferenceMarkerNumeric: ie,
|
|
4494
|
+
characterReferenceValue: ae,
|
|
4495
|
+
characterReference: oe,
|
|
4489
4496
|
codeFenced: c(g),
|
|
4490
4497
|
codeFencedFence: h,
|
|
4491
4498
|
codeFencedFenceInfo: p,
|
|
@@ -4515,10 +4522,10 @@ function da(e) {
|
|
|
4515
4522
|
listOrdered: c(),
|
|
4516
4523
|
listUnordered: c(),
|
|
4517
4524
|
paragraph: c(),
|
|
4518
|
-
referenceString:
|
|
4519
|
-
resourceDestinationString:
|
|
4520
|
-
resourceTitleString:
|
|
4521
|
-
resource:
|
|
4525
|
+
referenceString: re,
|
|
4526
|
+
resourceDestinationString: F,
|
|
4527
|
+
resourceTitleString: I,
|
|
4528
|
+
resource: te,
|
|
4522
4529
|
setextHeading: c(w),
|
|
4523
4530
|
setextHeadingLineSequence: C,
|
|
4524
4531
|
setextHeadingText: S,
|
|
@@ -4646,14 +4653,14 @@ function da(e) {
|
|
|
4646
4653
|
function l(e, t) {
|
|
4647
4654
|
let n = this.stack.pop(), r = this.tokenStack.pop();
|
|
4648
4655
|
if (r) r[0].type !== e.type && (t ? t.call(this, e, r[0]) : (r[1] || ha).call(this, e, r[0]));
|
|
4649
|
-
else throw Error("Cannot close `" + e.type + "` (" +
|
|
4656
|
+
else throw Error("Cannot close `" + e.type + "` (" + Ht({
|
|
4650
4657
|
start: e.start,
|
|
4651
4658
|
end: e.end
|
|
4652
4659
|
}) + "): it’s not open");
|
|
4653
4660
|
n.position.end = fa(e.end);
|
|
4654
4661
|
}
|
|
4655
4662
|
function u() {
|
|
4656
|
-
return
|
|
4663
|
+
return wn(this.stack.pop());
|
|
4657
4664
|
}
|
|
4658
4665
|
function d() {
|
|
4659
4666
|
this.data.expectingFirstListItemValue = !0;
|
|
@@ -4711,7 +4718,7 @@ function da(e) {
|
|
|
4711
4718
|
}
|
|
4712
4719
|
function T(e) {
|
|
4713
4720
|
let t = this.stack[this.stack.length - 1].children, n = t[t.length - 1];
|
|
4714
|
-
(!n || n.type !== "text") && (n =
|
|
4721
|
+
(!n || n.type !== "text") && (n = Se(), n.position = {
|
|
4715
4722
|
start: fa(e.start),
|
|
4716
4723
|
end: void 0
|
|
4717
4724
|
}, t.push(n)), this.stack.push(n);
|
|
@@ -4768,54 +4775,54 @@ function da(e) {
|
|
|
4768
4775
|
let e = this.stack[this.stack.length - 1], t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
4769
4776
|
this.data.inReference = !0, n.type === "link" ? n.children = e.children : n.alt = t;
|
|
4770
4777
|
}
|
|
4771
|
-
function
|
|
4778
|
+
function F() {
|
|
4772
4779
|
let e = this.resume(), t = this.stack[this.stack.length - 1];
|
|
4773
4780
|
t.url = e;
|
|
4774
4781
|
}
|
|
4775
|
-
function
|
|
4782
|
+
function I() {
|
|
4776
4783
|
let e = this.resume(), t = this.stack[this.stack.length - 1];
|
|
4777
4784
|
t.title = e;
|
|
4778
4785
|
}
|
|
4779
|
-
function
|
|
4786
|
+
function te() {
|
|
4780
4787
|
this.data.inReference = void 0;
|
|
4781
4788
|
}
|
|
4782
|
-
function
|
|
4789
|
+
function ne() {
|
|
4783
4790
|
this.data.referenceType = "collapsed";
|
|
4784
4791
|
}
|
|
4785
|
-
function
|
|
4792
|
+
function re(e) {
|
|
4786
4793
|
let t = this.resume(), n = this.stack[this.stack.length - 1];
|
|
4787
4794
|
n.label = t, n.identifier = In(this.sliceSerialize(e)).toLowerCase(), this.data.referenceType = "full";
|
|
4788
4795
|
}
|
|
4789
|
-
function
|
|
4796
|
+
function ie(e) {
|
|
4790
4797
|
this.data.characterReferenceType = e.type;
|
|
4791
4798
|
}
|
|
4792
|
-
function
|
|
4799
|
+
function ae(e) {
|
|
4793
4800
|
let t = this.sliceSerialize(e), n = this.data.characterReferenceType, r;
|
|
4794
|
-
n ? (r = Fn(t, n === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : r =
|
|
4801
|
+
n ? (r = Fn(t, n === "characterReferenceMarkerNumeric" ? 10 : 16), this.data.characterReferenceType = void 0) : r = kn(t);
|
|
4795
4802
|
let i = this.stack[this.stack.length - 1];
|
|
4796
4803
|
i.value += r;
|
|
4797
4804
|
}
|
|
4798
|
-
function
|
|
4805
|
+
function oe(e) {
|
|
4799
4806
|
let t = this.stack.pop();
|
|
4800
4807
|
t.position.end = fa(e.end);
|
|
4801
4808
|
}
|
|
4802
|
-
function
|
|
4809
|
+
function se(e) {
|
|
4803
4810
|
E.call(this, e);
|
|
4804
4811
|
let t = this.stack[this.stack.length - 1];
|
|
4805
4812
|
t.url = this.sliceSerialize(e);
|
|
4806
4813
|
}
|
|
4807
|
-
function
|
|
4814
|
+
function ce(e) {
|
|
4808
4815
|
E.call(this, e);
|
|
4809
4816
|
let t = this.stack[this.stack.length - 1];
|
|
4810
4817
|
t.url = "mailto:" + this.sliceSerialize(e);
|
|
4811
4818
|
}
|
|
4812
|
-
function
|
|
4819
|
+
function le() {
|
|
4813
4820
|
return {
|
|
4814
4821
|
type: "blockquote",
|
|
4815
4822
|
children: []
|
|
4816
4823
|
};
|
|
4817
4824
|
}
|
|
4818
|
-
function
|
|
4825
|
+
function ue() {
|
|
4819
4826
|
return {
|
|
4820
4827
|
type: "code",
|
|
4821
4828
|
lang: null,
|
|
@@ -4823,13 +4830,13 @@ function da(e) {
|
|
|
4823
4830
|
value: ""
|
|
4824
4831
|
};
|
|
4825
4832
|
}
|
|
4826
|
-
function
|
|
4833
|
+
function de() {
|
|
4827
4834
|
return {
|
|
4828
4835
|
type: "inlineCode",
|
|
4829
4836
|
value: ""
|
|
4830
4837
|
};
|
|
4831
4838
|
}
|
|
4832
|
-
function
|
|
4839
|
+
function fe() {
|
|
4833
4840
|
return {
|
|
4834
4841
|
type: "definition",
|
|
4835
4842
|
identifier: "",
|
|
@@ -4838,29 +4845,29 @@ function da(e) {
|
|
|
4838
4845
|
url: ""
|
|
4839
4846
|
};
|
|
4840
4847
|
}
|
|
4841
|
-
function
|
|
4848
|
+
function L() {
|
|
4842
4849
|
return {
|
|
4843
4850
|
type: "emphasis",
|
|
4844
4851
|
children: []
|
|
4845
4852
|
};
|
|
4846
4853
|
}
|
|
4847
|
-
function
|
|
4854
|
+
function pe() {
|
|
4848
4855
|
return {
|
|
4849
4856
|
type: "heading",
|
|
4850
4857
|
depth: 0,
|
|
4851
4858
|
children: []
|
|
4852
4859
|
};
|
|
4853
4860
|
}
|
|
4854
|
-
function
|
|
4861
|
+
function me() {
|
|
4855
4862
|
return { type: "break" };
|
|
4856
4863
|
}
|
|
4857
|
-
function
|
|
4864
|
+
function he() {
|
|
4858
4865
|
return {
|
|
4859
4866
|
type: "html",
|
|
4860
4867
|
value: ""
|
|
4861
4868
|
};
|
|
4862
4869
|
}
|
|
4863
|
-
function
|
|
4870
|
+
function ge() {
|
|
4864
4871
|
return {
|
|
4865
4872
|
type: "image",
|
|
4866
4873
|
title: null,
|
|
@@ -4868,7 +4875,7 @@ function da(e) {
|
|
|
4868
4875
|
alt: null
|
|
4869
4876
|
};
|
|
4870
4877
|
}
|
|
4871
|
-
function
|
|
4878
|
+
function _e() {
|
|
4872
4879
|
return {
|
|
4873
4880
|
type: "link",
|
|
4874
4881
|
title: null,
|
|
@@ -4876,7 +4883,7 @@ function da(e) {
|
|
|
4876
4883
|
children: []
|
|
4877
4884
|
};
|
|
4878
4885
|
}
|
|
4879
|
-
function
|
|
4886
|
+
function ve(e) {
|
|
4880
4887
|
return {
|
|
4881
4888
|
type: "list",
|
|
4882
4889
|
ordered: e.type === "listOrdered",
|
|
@@ -4885,7 +4892,7 @@ function da(e) {
|
|
|
4885
4892
|
children: []
|
|
4886
4893
|
};
|
|
4887
4894
|
}
|
|
4888
|
-
function
|
|
4895
|
+
function ye(e) {
|
|
4889
4896
|
return {
|
|
4890
4897
|
type: "listItem",
|
|
4891
4898
|
spread: e._spread,
|
|
@@ -4893,25 +4900,25 @@ function da(e) {
|
|
|
4893
4900
|
children: []
|
|
4894
4901
|
};
|
|
4895
4902
|
}
|
|
4896
|
-
function
|
|
4903
|
+
function be() {
|
|
4897
4904
|
return {
|
|
4898
4905
|
type: "paragraph",
|
|
4899
4906
|
children: []
|
|
4900
4907
|
};
|
|
4901
4908
|
}
|
|
4902
|
-
function
|
|
4909
|
+
function xe() {
|
|
4903
4910
|
return {
|
|
4904
4911
|
type: "strong",
|
|
4905
4912
|
children: []
|
|
4906
4913
|
};
|
|
4907
4914
|
}
|
|
4908
|
-
function
|
|
4915
|
+
function Se() {
|
|
4909
4916
|
return {
|
|
4910
4917
|
type: "text",
|
|
4911
4918
|
value: ""
|
|
4912
4919
|
};
|
|
4913
4920
|
}
|
|
4914
|
-
function
|
|
4921
|
+
function Ce() {
|
|
4915
4922
|
return { type: "thematicBreak" };
|
|
4916
4923
|
}
|
|
4917
4924
|
}
|
|
@@ -4951,13 +4958,13 @@ function ma(e, t) {
|
|
|
4951
4958
|
}
|
|
4952
4959
|
}
|
|
4953
4960
|
function ha(e, t) {
|
|
4954
|
-
throw Error(e ? "Cannot close `" + e.type + "` (" +
|
|
4961
|
+
throw Error(e ? "Cannot close `" + e.type + "` (" + Ht({
|
|
4955
4962
|
start: e.start,
|
|
4956
4963
|
end: e.end
|
|
4957
|
-
}) + "): a different token (`" + t.type + "`, " +
|
|
4964
|
+
}) + "): a different token (`" + t.type + "`, " + Ht({
|
|
4958
4965
|
start: t.start,
|
|
4959
4966
|
end: t.end
|
|
4960
|
-
}) + ") is open" : "Cannot close document, a token (`" + t.type + "`, " +
|
|
4967
|
+
}) + ") is open" : "Cannot close document, a token (`" + t.type + "`, " + Ht({
|
|
4961
4968
|
start: t.start,
|
|
4962
4969
|
end: t.end
|
|
4963
4970
|
}) + ") is still open");
|
|
@@ -5315,7 +5322,7 @@ function Ra(e, t) {
|
|
|
5315
5322
|
tagName: "tbody",
|
|
5316
5323
|
properties: {},
|
|
5317
5324
|
children: e.wrap(n, !0)
|
|
5318
|
-
}, a =
|
|
5325
|
+
}, a = zt(t.children[1]), o = Rt(t.children[t.children.length - 1]);
|
|
5319
5326
|
a && o && (r.position = {
|
|
5320
5327
|
start: a,
|
|
5321
5328
|
end: o
|
|
@@ -5823,7 +5830,7 @@ function wo(e, t) {
|
|
|
5823
5830
|
}
|
|
5824
5831
|
}
|
|
5825
5832
|
function To(e, t) {
|
|
5826
|
-
e.position && (t.position =
|
|
5833
|
+
e.position && (t.position = Vt(e));
|
|
5827
5834
|
}
|
|
5828
5835
|
function Eo(e, t) {
|
|
5829
5836
|
let n = t;
|
|
@@ -6200,7 +6207,7 @@ var Xo = [
|
|
|
6200
6207
|
return r.fatal = void 0, r;
|
|
6201
6208
|
}
|
|
6202
6209
|
message(e, t, n) {
|
|
6203
|
-
let r = new
|
|
6210
|
+
let r = new W(e, t, n);
|
|
6204
6211
|
return this.path && (r.name = this.path + ":" + r.name, r.file = this.path), r.fatal = !1, this.messages.push(r), r;
|
|
6205
6212
|
}
|
|
6206
6213
|
toString(e) {
|
|
@@ -6475,7 +6482,7 @@ function Ss(e, t) {
|
|
|
6475
6482
|
tagName: "div",
|
|
6476
6483
|
properties: { className: t.className },
|
|
6477
6484
|
children: e.type === "root" ? e.children : [e]
|
|
6478
|
-
}), xo(e, l),
|
|
6485
|
+
}), xo(e, l), $t(e, {
|
|
6479
6486
|
Fragment: x,
|
|
6480
6487
|
components: i,
|
|
6481
6488
|
ignoreInvalidStyle: !0,
|
|
@@ -6491,8 +6498,8 @@ function Ss(e, t) {
|
|
|
6491
6498
|
}, t;
|
|
6492
6499
|
if (e.type === "element") {
|
|
6493
6500
|
let t;
|
|
6494
|
-
for (t in
|
|
6495
|
-
let n = e.properties[t], r =
|
|
6501
|
+
for (t in Sn) if (Object.hasOwn(Sn, t) && Object.hasOwn(e.properties, t)) {
|
|
6502
|
+
let n = e.properties[t], r = Sn[t];
|
|
6496
6503
|
(r === null || r.includes(e.tagName)) && (e.properties[t] = c(String(n || ""), t, e));
|
|
6497
6504
|
}
|
|
6498
6505
|
}
|
|
@@ -7087,7 +7094,7 @@ function Pc(e, t) {
|
|
|
7087
7094
|
let n = !1;
|
|
7088
7095
|
return xo(e, function(e) {
|
|
7089
7096
|
if ("value" in e && /\r?\n|\r/.test(e.value) || e.type === "break") return n = !0, !1;
|
|
7090
|
-
}), !!((!e.depth || e.depth < 3) &&
|
|
7097
|
+
}), !!((!e.depth || e.depth < 3) && wn(e) && (t.options.setext || n));
|
|
7091
7098
|
}
|
|
7092
7099
|
//#endregion
|
|
7093
7100
|
//#region node_modules/mdast-util-to-markdown/lib/handle/heading.js
|
|
@@ -7188,7 +7195,7 @@ function Uc() {
|
|
|
7188
7195
|
//#endregion
|
|
7189
7196
|
//#region node_modules/mdast-util-to-markdown/lib/util/format-link-as-autolink.js
|
|
7190
7197
|
function Wc(e, t) {
|
|
7191
|
-
let n =
|
|
7198
|
+
let n = wn(e);
|
|
7192
7199
|
return !!(!t.options.resourceLink && e.url && !e.title && e.children && e.children.length === 1 && e.children[0].type === "text" && (n === e.url || "mailto:" + n === e.url) && /^[a-z][a-z+.-]+:/i.test(e.url) && !/[\0- <>\u007F]/.test(e.url));
|
|
7193
7200
|
}
|
|
7194
7201
|
//#endregion
|
|
@@ -8044,7 +8051,7 @@ function su(e) {
|
|
|
8044
8051
|
t
|
|
8045
8052
|
]
|
|
8046
8053
|
], s = t.parser.constructs.insideSpan.null;
|
|
8047
|
-
s &&
|
|
8054
|
+
s && G(o, o.length, 0, $n(s, e.slice(r + 1, n), t)), G(o, o.length, 0, [
|
|
8048
8055
|
[
|
|
8049
8056
|
"exit",
|
|
8050
8057
|
a,
|
|
@@ -8065,7 +8072,7 @@ function su(e) {
|
|
|
8065
8072
|
i,
|
|
8066
8073
|
t
|
|
8067
8074
|
]
|
|
8068
|
-
]),
|
|
8075
|
+
]), G(e, r - 1, n - r + 3, o), n = r + o.length - 2;
|
|
8069
8076
|
break;
|
|
8070
8077
|
}
|
|
8071
8078
|
}
|
|
@@ -8409,7 +8416,8 @@ var wu = {
|
|
|
8409
8416
|
samuel: "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2096%2096'%20width='96'%20height='96'%3e%3cdefs%3e%3cclipPath%20id='c'%3e%3ccircle%20cx='48'%20cy='48'%20r='48'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23c)'%3e%3crect%20width='96'%20height='96'%20fill='%23DCE4D1'/%3e%3ccircle%20cx='68'%20cy='24'%20r='42'%20fill='%23fff'%20opacity='0.08'/%3e%3ccircle%20cx='24'%20cy='82'%20r='36'%20fill='%23000'%20opacity='0.045'/%3e%3c/g%3e%3cg%20clip-path='url(%23c)'%3e%3cpath%20d='M38%2072%20Q38%2080%2048%2080%20Q58%2080%2058%2072%20L58%2068%20L38%2068%20Z'%20fill='%233D2413'/%3e%3cpath%20d='M8%2096%20C%208%2076,%2024%2068,%2034%2068%20L%2062%2068%20C%2072%2068,%2088%2076,%2088%2096%20Z'%20fill='%238A6A2C'/%3e%3cpath%20d='M40%2068%20L48%2074%20L56%2068%20Z'%20fill='rgba(0,0,0,0.12)'/%3e%3cpath%20d='M48%2017%20C%2032%2017,%2025%2029,%2025%2044%20C%2025%2059,%2033%2073,%2048%2073%20C%2063%2073,%2071%2059,%2071%2044%20C%2071%2029,%2064%2017,%2048%2017%20Z'%20fill='%2355341E'/%3e%3cpath%20d='M48%2017%20C%2063%2017,%2071%2029,%2071%2044%20C%2071%2059,%2063%2073,%2048%2073%20Z'%20fill='%233D2413'%20opacity='0.55'/%3e%3cellipse%20cx='26'%20cy='46'%20rx='3'%20ry='5'%20fill='%233D2413'/%3e%3cellipse%20cx='70'%20cy='46'%20rx='3'%20ry='5'%20fill='%233D2413'/%3e%3cpath%20d='M28%2040%20C%2028%2024,%2036%2016,%2048%2016%20C%2060%2016,%2068%2024,%2068%2040%20C%2066%2034,%2058%2030,%2048%2030%20C%2038%2030,%2030%2034,%2028%2040%20Z'%20fill='%236A6259'/%3e%3cpath%20d='M30%2028%20C%2040%2034,%2056%2034,%2066%2028%20C%2062%2022,%2055%2020,%2048%2020%20C%2041%2020,%2034%2022,%2030%2028%20Z'%20fill='%234F4841'%20opacity='0.45'/%3e%3cpath%20d='M36%2041%20q4%20-2%208%200'%20stroke='%234F4841'%20stroke-width='1.6'%20stroke-linecap='round'%20fill='none'/%3e%3cpath%20d='M52%2041%20q4%20-2%208%200'%20stroke='%234F4841'%20stroke-width='1.6'%20stroke-linecap='round'%20fill='none'/%3e%3cpath%20d='M37%2046%20q3%20-3%206%200%20q-3%203%20-6%200%20Z'%20fill='%232A1F18'/%3e%3cpath%20d='M53%2046%20q3%20-3%206%200%20q-3%203%20-6%200%20Z'%20fill='%232A1F18'/%3e%3ccircle%20cx='41.4'%20cy='45.4'%20r='0.6'%20fill='%23fff'/%3e%3ccircle%20cx='57.4'%20cy='45.4'%20r='0.6'%20fill='%23fff'/%3e%3cpath%20d='M46.5%2051%20q1.5%201.5%203%200'%20stroke='%233D2413'%20stroke-width='1.2'%20stroke-linecap='round'%20fill='none'%20opacity='0.8'/%3e%3cellipse%20cx='34'%20cy='54'%20rx='4'%20ry='2.2'%20fill='rgba(210,120,110,0.22)'/%3e%3cellipse%20cx='62'%20cy='54'%20rx='4'%20ry='2.2'%20fill='rgba(210,120,110,0.22)'/%3e%3cpath%20d='M44%2058%20q4%202%208%200'%20stroke='%23B56A5A'%20stroke-width='1.6'%20stroke-linecap='round'%20fill='none'/%3e%3cpath%20d='M34%2050%20q1%201%202%200'%20stroke='%233D2413'%20stroke-width='0.8'%20stroke-linecap='round'%20fill='none'%20opacity='0.8'/%3e%3cpath%20d='M60%2050%20q1%201%202%200'%20stroke='%233D2413'%20stroke-width='0.8'%20stroke-linecap='round'%20fill='none'%20opacity='0.8'/%3e%3cpath%20d='M41%2062%20q3%201%206%200'%20stroke='%233D2413'%20stroke-width='0.8'%20stroke-linecap='round'%20fill='none'%20opacity='0.5'/%3e%3c/g%3e%3c/svg%3e",
|
|
8410
8417
|
sofia: "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2096%2096'%20width='96'%20height='96'%3e%3cdefs%3e%3cclipPath%20id='c'%3e%3ccircle%20cx='48'%20cy='48'%20r='48'/%3e%3c/clipPath%3e%3c/defs%3e%3cg%20clip-path='url(%23c)'%3e%3crect%20width='96'%20height='96'%20fill='%23D4E3EC'/%3e%3ccircle%20cx='68'%20cy='24'%20r='42'%20fill='%23fff'%20opacity='0.08'/%3e%3ccircle%20cx='24'%20cy='82'%20r='36'%20fill='%23000'%20opacity='0.045'/%3e%3c/g%3e%3cg%20clip-path='url(%23c)'%3e%3cpath%20d='M38%2072%20Q38%2080%2048%2080%20Q58%2080%2058%2072%20L58%2068%20L38%2068%20Z'%20fill='%23C6976C'/%3e%3cpath%20d='M8%2096%20C%208%2076,%2024%2068,%2034%2068%20L%2062%2068%20C%2072%2068,%2088%2076,%2088%2096%20Z'%20fill='%237E3E2A'/%3e%3cpath%20d='M40%2068%20L48%2074%20L56%2068%20Z'%20fill='rgba(0,0,0,0.12)'/%3e%3cpath%20d='M24%2038%20C%2024%2022,%2034%2012,%2048%2012%20C%2062%2012,%2072%2022,%2072%2038%20L%2072%2062%20C%2068%2058,%2064%2058,%2060%2060%20L%2036%2060%20C%2032%2058,%2028%2058,%2024%2062%20Z'%20fill='%2355392A'/%3e%3cpath%20d='M48%2017%20C%2032%2017,%2025%2029,%2025%2044%20C%2025%2059,%2033%2073,%2048%2073%20C%2063%2073,%2071%2059,%2071%2044%20C%2071%2029,%2064%2017,%2048%2017%20Z'%20fill='%23DDAE85'/%3e%3cpath%20d='M48%2017%20C%2063%2017,%2071%2029,%2071%2044%20C%2071%2059,%2063%2073,%2048%2073%20Z'%20fill='%23C6976C'%20opacity='0.55'/%3e%3cellipse%20cx='26'%20cy='46'%20rx='3'%20ry='5'%20fill='%23C6976C'/%3e%3cellipse%20cx='70'%20cy='46'%20rx='3'%20ry='5'%20fill='%23C6976C'/%3e%3cpath%20d='M26%2038%20C%2030%2024,%2040%2018,%2048%2018%20C%2058%2018,%2066%2024,%2070%2038%20C%2064%2032,%2054%2030,%2048%2030%20C%2040%2030,%2032%2032,%2026%2038%20Z'%20fill='%2355392A'/%3e%3cpath%20d='M30%2024%20C%2038%2032,%2058%2032,%2066%2024%20C%2060%2018,%2054%2016,%2048%2016%20C%2040%2016,%2034%2018,%2030%2024%20Z'%20fill='%233D2718'%20opacity='0.4'/%3e%3cpath%20d='M36%2041%20q4%20-2%208%200'%20stroke='%233D2718'%20stroke-width='1.6'%20stroke-linecap='round'%20fill='none'/%3e%3cpath%20d='M52%2041%20q4%20-2%208%200'%20stroke='%233D2718'%20stroke-width='1.6'%20stroke-linecap='round'%20fill='none'/%3e%3cpath%20d='M37%2046%20q3%20-3%206%200%20q-3%203%20-6%200%20Z'%20fill='%232A1F18'/%3e%3cpath%20d='M53%2046%20q3%20-3%206%200%20q-3%203%20-6%200%20Z'%20fill='%232A1F18'/%3e%3ccircle%20cx='41.4'%20cy='45.4'%20r='0.6'%20fill='%23fff'/%3e%3ccircle%20cx='57.4'%20cy='45.4'%20r='0.6'%20fill='%23fff'/%3e%3cpath%20d='M46.5%2051%20q1.5%201.5%203%200'%20stroke='%23C6976C'%20stroke-width='1.2'%20stroke-linecap='round'%20fill='none'%20opacity='0.8'/%3e%3cellipse%20cx='34'%20cy='54'%20rx='4'%20ry='2.2'%20fill='rgba(210,120,110,0.22)'/%3e%3cellipse%20cx='62'%20cy='54'%20rx='4'%20ry='2.2'%20fill='rgba(210,120,110,0.22)'/%3e%3cpath%20d='M43%2057%20q5%204%2010%200%20q-5%201%20-10%200%20Z'%20fill='%23B56A5A'%20opacity='0.85'/%3e%3c/g%3e%3c/svg%3e",
|
|
8411
8418
|
bean: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2096%2096'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;'%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3cpath%20d='M64,30C64,24.667%2066,22%2070,22C74,22%2076,20%2076,16'%20style='fill:none;fill-rule:nonzero;stroke:rgb(58,31,16);stroke-width:3px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3ccircle%20cx='76'%20cy='14'%20r='3.5'%20style='fill:rgb(255,111,177);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3cpath%20d='M38,50C38,38%2046.667,32%2064,32C81.333,32%2090,38%2090,50L90,92C90,101.333%2081.333,106%2064,106C46.667,106%2038,101.333%2038,92L38,50Z'%20style='fill:url(%23_Linear1);fill-rule:nonzero;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3cellipse%20cx='64'%20cy='84'%20rx='20'%20ry='14'%20style='fill:rgb(255,226,194);fill-opacity:0.85;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3cellipse%20cx='54'%20cy='62'%20rx='5.525'%20ry='6.5'%20style='fill:rgb(58,31,16);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3cellipse%20cx='74'%20cy='62'%20rx='5.525'%20ry='6.5'%20style='fill:rgb(58,31,16);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3ccircle%20cx='52.375'%20cy='59.4'%20r='2.275'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3ccircle%20cx='72.375'%20cy='59.4'%20r='2.275'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3ccircle%20cx='56.6'%20cy='63.95'%20r='1.17'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3ccircle%20cx='76.6'%20cy='63.95'%20r='1.17'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3cpath%20d='M58,74C62,78%2066,78%2070,74'%20style='fill:none;fill-rule:nonzero;stroke:rgb(58,31,16);stroke-width:3px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3cellipse%20cx='50'%20cy='106'%20rx='6'%20ry='3'%20style='fill:rgb(210,106,45);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,0)'%3e%3cellipse%20cx='78'%20cy='106'%20rx='6'%20ry='3'%20style='fill:rgb(210,106,45);'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='_Linear1'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(4.53119e-15,74,-74,4.53119e-15,38,32)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(255,197,138);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(240,138,75);stop-opacity:1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",
|
|
8412
|
-
owl: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2096%2096'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;'%3e%3cg%20transform='matrix(2,0,0,2,-116.592,-107.388)'%3e%3cellipse%20cx='86'%20cy='92'%20rx='3'%20ry='1.5'%20style='fill:rgb(122,74,14);'/%3e%3c/g%3e%3cg%20transform='matrix(2,0,0,2,-132.065,-107.388)'%3e%3cellipse%20cx='86'%20cy='92'%20rx='3'%20ry='1.5'%20style='fill:rgb(122,74,14);'/%3e%3c/g%3e%3cg%20transform='matrix(1.02083,0,0,1.02083,-28.4825,-8.00437)'%3e%3cpath%20d='M90,34L96,22L80,30L90,34Z'%20style='fill:url(%23_Linear1);fill-rule:nonzero;'/%3e%3c/g%3e%3cg%20transform='matrix(-1.02083,0,0,1.02083,124.21,-8.00437)'%3e%3cpath%20d='M90,34L96,22L80,30L90,34Z'%20style='fill:url(%23_Linear2);fill-rule:nonzero;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cellipse%20cx='64'%20cy='72'%20rx='34'%20ry='38'%20style='fill:url(%23_Linear3);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cellipse%20cx='64'%20cy='86'%20rx='22'%20ry='20'%20style='fill:rgb(248,232,200);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='52'%20cy='58'%20r='11'%20style='fill:white;stroke:rgb(90,58,26);stroke-width:2px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='76'%20cy='58'%20r='11'%20style='fill:white;stroke:rgb(90,58,26);stroke-width:2px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='52'%20cy='58'%20r='5'%20style='fill:rgb(26,15,10);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='76'%20cy='58'%20r='5'%20style='fill:rgb(26,15,10);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='50'%20cy='56'%20r='2'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='74'%20cy='56'%20r='2'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cpath%20d='M60,70L64,78L68,70L60,70Z'%20style='fill:rgb(255,179,106);fill-rule:nonzero;stroke:rgb(122,74,14);stroke-width:1px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cpath%20d='M30,60C24.667,73.333%2025.333,86.667%2032,100L38,90C36.667,80.667%2036.667,72%2038,64L30,60Z'%20style='fill:url(%23_Linear4);fill-rule:nonzero;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cpath%20d='M98,60C103.333,73.333%20102.667,86.667%2096,100L90,90C91.333,80.667%2091.333,72%2090,64L98,60Z'%20style='fill:url(%23_Linear5);fill-rule:nonzero;'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='_Linear1'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(7.34788e-16,12,-12,7.34788e-16,80,22)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='_Linear2'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(7.34788e-16,12,-12,7.34788e-16,80,22)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='_Linear3'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(4.65366e-15,76,-76,4.65366e-15,30,34)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='_Linear4'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(-9.30994,-1.27833,1.27833,-9.30994,35.7544,81.2783)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='_Linear5'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(11.5556,3.71929,-3.71929,11.5556,90,74.9474)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e"
|
|
8419
|
+
owl: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2096%2096'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;'%3e%3cg%20transform='matrix(2,0,0,2,-116.592,-107.388)'%3e%3cellipse%20cx='86'%20cy='92'%20rx='3'%20ry='1.5'%20style='fill:rgb(122,74,14);'/%3e%3c/g%3e%3cg%20transform='matrix(2,0,0,2,-132.065,-107.388)'%3e%3cellipse%20cx='86'%20cy='92'%20rx='3'%20ry='1.5'%20style='fill:rgb(122,74,14);'/%3e%3c/g%3e%3cg%20transform='matrix(1.02083,0,0,1.02083,-28.4825,-8.00437)'%3e%3cpath%20d='M90,34L96,22L80,30L90,34Z'%20style='fill:url(%23_Linear1);fill-rule:nonzero;'/%3e%3c/g%3e%3cg%20transform='matrix(-1.02083,0,0,1.02083,124.21,-8.00437)'%3e%3cpath%20d='M90,34L96,22L80,30L90,34Z'%20style='fill:url(%23_Linear2);fill-rule:nonzero;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cellipse%20cx='64'%20cy='72'%20rx='34'%20ry='38'%20style='fill:url(%23_Linear3);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cellipse%20cx='64'%20cy='86'%20rx='22'%20ry='20'%20style='fill:rgb(248,232,200);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='52'%20cy='58'%20r='11'%20style='fill:white;stroke:rgb(90,58,26);stroke-width:2px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='76'%20cy='58'%20r='11'%20style='fill:white;stroke:rgb(90,58,26);stroke-width:2px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='52'%20cy='58'%20r='5'%20style='fill:rgb(26,15,10);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='76'%20cy='58'%20r='5'%20style='fill:rgb(26,15,10);'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='50'%20cy='56'%20r='2'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3ccircle%20cx='74'%20cy='56'%20r='2'%20style='fill:white;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cpath%20d='M60,70L64,78L68,70L60,70Z'%20style='fill:rgb(255,179,106);fill-rule:nonzero;stroke:rgb(122,74,14);stroke-width:1px;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cpath%20d='M30,60C24.667,73.333%2025.333,86.667%2032,100L38,90C36.667,80.667%2036.667,72%2038,64L30,60Z'%20style='fill:url(%23_Linear4);fill-rule:nonzero;'/%3e%3c/g%3e%3cg%20transform='matrix(0.75,0,0,0.75,0,-4.92105)'%3e%3cpath%20d='M98,60C103.333,73.333%20102.667,86.667%2096,100L90,90C91.333,80.667%2091.333,72%2090,64L98,60Z'%20style='fill:url(%23_Linear5);fill-rule:nonzero;'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='_Linear1'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(7.34788e-16,12,-12,7.34788e-16,80,22)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='_Linear2'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(7.34788e-16,12,-12,7.34788e-16,80,22)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='_Linear3'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(4.65366e-15,76,-76,4.65366e-15,30,34)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='_Linear4'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(-9.30994,-1.27833,1.27833,-9.30994,35.7544,81.2783)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3clinearGradient%20id='_Linear5'%20x1='0'%20y1='0'%20x2='1'%20y2='0'%20gradientUnits='userSpaceOnUse'%20gradientTransform='matrix(11.5556,3.71929,-3.71929,11.5556,90,74.9474)'%3e%3cstop%20offset='0'%20style='stop-color:rgb(232,200,168);stop-opacity:1'/%3e%3cstop%20offset='1'%20style='stop-color:rgb(168,120,74);stop-opacity:1'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",
|
|
8420
|
+
bubble: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%2096%2096'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3cg%3e%3cclipPath%20id='_clip1'%3e%3ccircle%20cx='48'%20cy='48'%20r='48'/%3e%3c/clipPath%3e%3cg%20clip-path='url(%23_clip1)'%3e%3cg%20transform='matrix(1.98284,0,0,1.98284,24.2059,24.2059)'%3e%3cpath%20d='M12,3C17.5,3%2022,6.58%2022,11C22,15.42%2017.5,19%2012,19C10.76,19%209.57,18.82%208.47,18.5C5.55,21%202,21%202,21C4.33,18.67%204.7,17.1%204.75,16.5C3.05,15.07%202,13.13%202,11C2,6.58%206.5,3%2012,3'%20style='fill:white;fill-rule:nonzero;'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e"
|
|
8413
8421
|
}, Tu = Object.keys(wu);
|
|
8414
8422
|
function Eu(e) {
|
|
8415
8423
|
if (e) return e in wu ? wu[e] : e;
|
|
@@ -8420,7 +8428,7 @@ function Du() {
|
|
|
8420
8428
|
let e = Eu(o((e) => e.config.botAvatar));
|
|
8421
8429
|
return e ? /* @__PURE__ */ S("div", {
|
|
8422
8430
|
className: "w-7 h-7 rounded-full flex-shrink-0 overflow-hidden",
|
|
8423
|
-
style: { background: "var(--t-bg
|
|
8431
|
+
style: { background: "var(--t-avatar-bg)" },
|
|
8424
8432
|
children: /* @__PURE__ */ S("img", {
|
|
8425
8433
|
src: e,
|
|
8426
8434
|
alt: "",
|
|
@@ -8442,7 +8450,7 @@ function Ou(e) {
|
|
|
8442
8450
|
}).format(new Date(e));
|
|
8443
8451
|
}
|
|
8444
8452
|
function ku({ message: e, onRetry: t }) {
|
|
8445
|
-
let { t: n } =
|
|
8453
|
+
let { t: n } = Pe(), r = e.role === "user", i = r && e.status === "failed", a = r && e.status === "sending";
|
|
8446
8454
|
return /* @__PURE__ */ C("div", {
|
|
8447
8455
|
className: `flex gap-3 ${r ? "flex-row-reverse" : "flex-row"} items-end mb-4`,
|
|
8448
8456
|
children: [r ? /* @__PURE__ */ S("div", {
|
|
@@ -8468,7 +8476,7 @@ function ku({ message: e, onRetry: t }) {
|
|
|
8468
8476
|
})
|
|
8469
8477
|
}) : /* @__PURE__ */ S(Du, {}), /* @__PURE__ */ C("div", {
|
|
8470
8478
|
className: `flex flex-col gap-1 max-w-[88%] ${r ? "items-end" : "items-start"}`,
|
|
8471
|
-
children: [/* @__PURE__ */
|
|
8479
|
+
children: [/* @__PURE__ */ C("div", {
|
|
8472
8480
|
className: "px-4 py-2.5 rounded-2xl text-sm leading-relaxed break-words",
|
|
8473
8481
|
style: r ? {
|
|
8474
8482
|
background: "var(--t-user-bubble)",
|
|
@@ -8482,7 +8490,7 @@ function ku({ message: e, onRetry: t }) {
|
|
|
8482
8490
|
border: "1px solid var(--t-bg-border)",
|
|
8483
8491
|
borderBottomLeftRadius: "4px"
|
|
8484
8492
|
},
|
|
8485
|
-
children: r ? /* @__PURE__ */ S("span", { children: e.content }) : /* @__PURE__ */ S(ys, {
|
|
8493
|
+
children: [r ? /* @__PURE__ */ S("span", { children: e.content }) : /* @__PURE__ */ S(ys, {
|
|
8486
8494
|
remarkPlugins: [Cu],
|
|
8487
8495
|
components: {
|
|
8488
8496
|
p: ({ children: e }) => /* @__PURE__ */ S("p", {
|
|
@@ -8514,7 +8522,66 @@ function ku({ message: e, onRetry: t }) {
|
|
|
8514
8522
|
})
|
|
8515
8523
|
},
|
|
8516
8524
|
children: e.content
|
|
8517
|
-
})
|
|
8525
|
+
}), e.attachments && e.attachments.length > 0 && /* @__PURE__ */ S("div", {
|
|
8526
|
+
className: "flex flex-col gap-2 mt-2 min-w-[200px]",
|
|
8527
|
+
children: e.attachments.map((e, t) => /* @__PURE__ */ C("a", {
|
|
8528
|
+
href: e.url,
|
|
8529
|
+
target: "_blank",
|
|
8530
|
+
rel: "noopener noreferrer",
|
|
8531
|
+
className: "flex items-center gap-3 p-2.5 rounded-xl border transition-all text-xs font-medium no-underline hover:opacity-90",
|
|
8532
|
+
style: r ? {
|
|
8533
|
+
background: "rgba(255, 255, 255, 0.15)",
|
|
8534
|
+
color: "var(--t-user-fg)",
|
|
8535
|
+
borderColor: "rgba(255, 255, 255, 0.25)"
|
|
8536
|
+
} : {
|
|
8537
|
+
background: "var(--t-bg-surface2, var(--t-bg-surface))",
|
|
8538
|
+
color: "var(--t-fg-primary)",
|
|
8539
|
+
borderColor: "var(--t-bg-border)"
|
|
8540
|
+
},
|
|
8541
|
+
title: `Download ${e.name}`,
|
|
8542
|
+
children: [
|
|
8543
|
+
/* @__PURE__ */ C("svg", {
|
|
8544
|
+
width: "16",
|
|
8545
|
+
height: "16",
|
|
8546
|
+
viewBox: "0 0 24 24",
|
|
8547
|
+
fill: "none",
|
|
8548
|
+
stroke: "currentColor",
|
|
8549
|
+
strokeWidth: "2",
|
|
8550
|
+
className: "flex-shrink-0",
|
|
8551
|
+
children: [/* @__PURE__ */ S("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }), /* @__PURE__ */ S("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })]
|
|
8552
|
+
}),
|
|
8553
|
+
/* @__PURE__ */ C("div", {
|
|
8554
|
+
className: "flex-1 min-w-0",
|
|
8555
|
+
children: [/* @__PURE__ */ S("div", {
|
|
8556
|
+
className: "truncate font-semibold",
|
|
8557
|
+
children: e.name
|
|
8558
|
+
}), e.size && /* @__PURE__ */ C("div", {
|
|
8559
|
+
className: "opacity-75 text-[10px]",
|
|
8560
|
+
children: [(e.size / 1024).toFixed(0), " KB"]
|
|
8561
|
+
})]
|
|
8562
|
+
}),
|
|
8563
|
+
/* @__PURE__ */ C("svg", {
|
|
8564
|
+
width: "14",
|
|
8565
|
+
height: "14",
|
|
8566
|
+
viewBox: "0 0 24 24",
|
|
8567
|
+
fill: "none",
|
|
8568
|
+
stroke: "currentColor",
|
|
8569
|
+
strokeWidth: "2.5",
|
|
8570
|
+
className: "flex-shrink-0",
|
|
8571
|
+
children: [
|
|
8572
|
+
/* @__PURE__ */ S("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
8573
|
+
/* @__PURE__ */ S("polyline", { points: "7 10 12 15 17 10" }),
|
|
8574
|
+
/* @__PURE__ */ S("line", {
|
|
8575
|
+
x1: "12",
|
|
8576
|
+
x2: "12",
|
|
8577
|
+
y1: "15",
|
|
8578
|
+
y2: "3"
|
|
8579
|
+
})
|
|
8580
|
+
]
|
|
8581
|
+
})
|
|
8582
|
+
]
|
|
8583
|
+
}, t))
|
|
8584
|
+
})]
|
|
8518
8585
|
}), /* @__PURE__ */ S("div", {
|
|
8519
8586
|
className: "flex items-center gap-2 px-1",
|
|
8520
8587
|
children: i ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("span", {
|
|
@@ -8558,18 +8625,40 @@ function Au() {
|
|
|
8558
8625
|
}
|
|
8559
8626
|
//#endregion
|
|
8560
8627
|
//#region src/components/InputArea.tsx
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8628
|
+
async function ju(e, t) {
|
|
8629
|
+
let n = e.agentStream;
|
|
8630
|
+
if (!n || !n.apiBaseUrl || !n.tenantId) return null;
|
|
8631
|
+
let r = s.getState().tokens?.[t];
|
|
8632
|
+
if (r && r.expiresAt > Date.now() + 6e4) return r.token;
|
|
8633
|
+
try {
|
|
8634
|
+
let e = await fetch(`${n.apiBaseUrl.replace(/\/$/, "")}/api/public/chat-stream/init`, {
|
|
8635
|
+
method: "POST",
|
|
8636
|
+
headers: { "Content-Type": "application/json" },
|
|
8637
|
+
body: JSON.stringify({
|
|
8638
|
+
tenantId: n.tenantId,
|
|
8639
|
+
sessionId: t
|
|
8640
|
+
})
|
|
8641
|
+
});
|
|
8642
|
+
if (!e.ok) return null;
|
|
8643
|
+
let r = await e.json();
|
|
8644
|
+
return s.getState().setToken(t, r.token, Date.parse(r.expiresAt)), r.token;
|
|
8645
|
+
} catch {
|
|
8646
|
+
return null;
|
|
8647
|
+
}
|
|
8648
|
+
}
|
|
8649
|
+
function Mu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
|
|
8650
|
+
let [i, a] = y(""), [c, l] = y([]), [u, d] = y(!1), [f, p] = y(null), h = v(null), g = o((e) => e.config), _ = s((e) => e.activeSessionId), b = m(() => {
|
|
8651
|
+
let n = i.trim(), r = c.length > 0;
|
|
8652
|
+
!n && !r || t || u || (e(n, c), a(""), l([]), p(null), h.current && (h.current.style.height = "auto"));
|
|
8566
8653
|
}, [
|
|
8567
8654
|
i,
|
|
8568
8655
|
t,
|
|
8656
|
+
u,
|
|
8657
|
+
c,
|
|
8569
8658
|
e
|
|
8570
|
-
]),
|
|
8571
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
8572
|
-
}, [
|
|
8659
|
+
]), x = m((e) => {
|
|
8660
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), b());
|
|
8661
|
+
}, [b]), w = m((e) => {
|
|
8573
8662
|
a(e.target.value);
|
|
8574
8663
|
let t = e.target;
|
|
8575
8664
|
t.style.height = "auto", t.style.height = `${Math.min(t.scrollHeight, 180)}px`;
|
|
@@ -8580,77 +8669,201 @@ function Nu({ onSend: e, disabled: t, placeholder: n, allowFileUploads: r }) {
|
|
|
8580
8669
|
borderColor: "var(--t-bg-border)",
|
|
8581
8670
|
background: "var(--t-bg-base)"
|
|
8582
8671
|
},
|
|
8583
|
-
children: [
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
className: "
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8672
|
+
children: [
|
|
8673
|
+
u && /* @__PURE__ */ C("div", {
|
|
8674
|
+
className: "flex items-center gap-2 px-3 pt-2 text-xs text-fg-secondary",
|
|
8675
|
+
children: [/* @__PURE__ */ C("svg", {
|
|
8676
|
+
className: "animate-spin h-3.5 w-3.5",
|
|
8677
|
+
viewBox: "0 0 24 24",
|
|
8678
|
+
fill: "none",
|
|
8679
|
+
stroke: "currentColor",
|
|
8680
|
+
strokeWidth: "3",
|
|
8681
|
+
children: [/* @__PURE__ */ S("circle", {
|
|
8682
|
+
className: "opacity-25",
|
|
8683
|
+
cx: "12",
|
|
8684
|
+
cy: "12",
|
|
8685
|
+
r: "10",
|
|
8595
8686
|
stroke: "currentColor",
|
|
8596
|
-
strokeWidth: "
|
|
8597
|
-
|
|
8598
|
-
|
|
8599
|
-
|
|
8600
|
-
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
className: "
|
|
8687
|
+
strokeWidth: "4"
|
|
8688
|
+
}), /* @__PURE__ */ S("path", {
|
|
8689
|
+
className: "opacity-75",
|
|
8690
|
+
fill: "currentColor",
|
|
8691
|
+
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
8692
|
+
})]
|
|
8693
|
+
}), /* @__PURE__ */ S("span", { children: "Uploading file..." })]
|
|
8694
|
+
}),
|
|
8695
|
+
f && /* @__PURE__ */ C("div", {
|
|
8696
|
+
className: "flex items-center justify-between gap-2 px-3 pt-2 text-xs text-red-500 font-medium",
|
|
8697
|
+
children: [/* @__PURE__ */ S("span", { children: f }), /* @__PURE__ */ S("button", {
|
|
8698
|
+
onClick: () => p(null),
|
|
8699
|
+
className: "opacity-80 hover:opacity-100 focus:outline-none",
|
|
8700
|
+
children: "Dismiss"
|
|
8701
|
+
})]
|
|
8702
|
+
}),
|
|
8703
|
+
c.length > 0 && /* @__PURE__ */ S("div", {
|
|
8704
|
+
className: "flex flex-wrap gap-2 px-3 pt-2 pb-1 border-b",
|
|
8705
|
+
style: { borderColor: "var(--t-bg-border)" },
|
|
8706
|
+
children: c.map((e, t) => /* @__PURE__ */ C("div", {
|
|
8707
|
+
className: "flex items-center gap-2 px-2.5 py-1.5 rounded-lg text-xs font-medium",
|
|
8609
8708
|
style: {
|
|
8610
|
-
background: "var(--t-bg-surface)",
|
|
8709
|
+
background: "var(--t-bg-surface2, var(--t-bg-surface))",
|
|
8611
8710
|
color: "var(--t-fg-primary)",
|
|
8612
|
-
border: "1px solid var(--t-bg-border)"
|
|
8613
|
-
resize: "none"
|
|
8614
|
-
}
|
|
8615
|
-
}),
|
|
8616
|
-
/* @__PURE__ */ S("button", {
|
|
8617
|
-
onClick: f,
|
|
8618
|
-
disabled: t || !i.trim(),
|
|
8619
|
-
className: "flex-shrink-0 w-[42px] h-[42px] rounded-xl flex items-center justify-center transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
8620
|
-
style: {
|
|
8621
|
-
background: "var(--t-accent)",
|
|
8622
|
-
color: "var(--t-accent-fg)"
|
|
8711
|
+
border: "1px solid var(--t-bg-border)"
|
|
8623
8712
|
},
|
|
8624
|
-
children:
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8713
|
+
children: [
|
|
8714
|
+
/* @__PURE__ */ C("svg", {
|
|
8715
|
+
width: "14",
|
|
8716
|
+
height: "14",
|
|
8717
|
+
viewBox: "0 0 24 24",
|
|
8718
|
+
fill: "none",
|
|
8719
|
+
stroke: "currentColor",
|
|
8720
|
+
strokeWidth: "2",
|
|
8721
|
+
children: [/* @__PURE__ */ S("path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" }), /* @__PURE__ */ S("path", { d: "M14 2v4a2 2 0 0 0 2 2h4" })]
|
|
8722
|
+
}),
|
|
8723
|
+
/* @__PURE__ */ S("span", {
|
|
8724
|
+
className: "truncate max-w-[120px]",
|
|
8725
|
+
children: e.name
|
|
8726
|
+
}),
|
|
8727
|
+
e.size && /* @__PURE__ */ C("span", {
|
|
8728
|
+
className: "opacity-60",
|
|
8729
|
+
children: [
|
|
8730
|
+
"(",
|
|
8731
|
+
(e.size / 1024).toFixed(0),
|
|
8732
|
+
" KB)"
|
|
8733
|
+
]
|
|
8734
|
+
}),
|
|
8735
|
+
/* @__PURE__ */ S("button", {
|
|
8736
|
+
type: "button",
|
|
8737
|
+
onClick: () => l((e) => e.filter((e, n) => n !== t)),
|
|
8738
|
+
className: "text-fg-secondary hover:text-fg-primary transition-colors focus:outline-none",
|
|
8739
|
+
title: "Remove attachment",
|
|
8740
|
+
children: /* @__PURE__ */ S("svg", {
|
|
8741
|
+
width: "14",
|
|
8742
|
+
height: "14",
|
|
8743
|
+
viewBox: "0 0 24 24",
|
|
8744
|
+
fill: "none",
|
|
8745
|
+
stroke: "currentColor",
|
|
8746
|
+
strokeWidth: "2.5",
|
|
8747
|
+
children: /* @__PURE__ */ S("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
8748
|
+
})
|
|
8749
|
+
})
|
|
8750
|
+
]
|
|
8751
|
+
}, t))
|
|
8752
|
+
}),
|
|
8753
|
+
/* @__PURE__ */ C("div", {
|
|
8754
|
+
className: "flex items-end gap-2 p-3",
|
|
8755
|
+
children: [
|
|
8756
|
+
r && /* @__PURE__ */ C("label", {
|
|
8757
|
+
className: `flex-shrink-0 w-[42px] h-[42px] rounded-xl flex items-center justify-center text-fg-secondary hover:text-fg-primary hover:bg-bg-surface transition-colors cursor-pointer ${t || u ? "opacity-40 cursor-not-allowed pointer-events-none" : ""}`,
|
|
8758
|
+
title: "Attach file",
|
|
8759
|
+
children: [/* @__PURE__ */ S("input", {
|
|
8760
|
+
type: "file",
|
|
8761
|
+
accept: g.allowedFileExtensions ?? ".pdf,.docx,.png,.jpg,.jpeg",
|
|
8762
|
+
onChange: async (e) => {
|
|
8763
|
+
let t = e.target.files?.[0];
|
|
8764
|
+
if (!t) return;
|
|
8765
|
+
if (p(null), t.size > 5 * 1024 * 1024) {
|
|
8766
|
+
p("File size exceeds the maximum limit of 5MB."), e.target.value = "";
|
|
8767
|
+
return;
|
|
8768
|
+
}
|
|
8769
|
+
let n = "." + t.name.split(".").pop()?.toLowerCase(), r = g.allowedFileExtensions ?? ".pdf,.docx,.png,.jpg,.jpeg";
|
|
8770
|
+
if (!r.split(",").map((e) => e.trim().toLowerCase()).includes(n)) {
|
|
8771
|
+
p(`File type not allowed. Allowed types: ${r}`), e.target.value = "";
|
|
8772
|
+
return;
|
|
8773
|
+
}
|
|
8774
|
+
let i = await ju(g, _ ?? s.getState().createSession());
|
|
8775
|
+
if (!i) {
|
|
8776
|
+
p("Unable to authenticate file upload."), e.target.value = "";
|
|
8777
|
+
return;
|
|
8778
|
+
}
|
|
8779
|
+
d(!0);
|
|
8780
|
+
try {
|
|
8781
|
+
let e = new FormData();
|
|
8782
|
+
e.append("file", t);
|
|
8783
|
+
let n = `${g.agentStream?.apiBaseUrl?.replace(/\/$/, "") ?? ""}/api/public/files/upload?t=${encodeURIComponent(i)}`, r = await fetch(n, {
|
|
8784
|
+
method: "POST",
|
|
8785
|
+
body: e
|
|
8786
|
+
});
|
|
8787
|
+
if (!r.ok) {
|
|
8788
|
+
let e = await r.json().catch(() => ({}));
|
|
8789
|
+
throw Error(e.error || `Upload failed with status ${r.status}`);
|
|
8790
|
+
}
|
|
8791
|
+
let a = await r.json();
|
|
8792
|
+
l((e) => [...e, a]);
|
|
8793
|
+
} catch (e) {
|
|
8794
|
+
p(e.message || "Failed to upload file.");
|
|
8795
|
+
} finally {
|
|
8796
|
+
d(!1), e.target.value = "";
|
|
8797
|
+
}
|
|
8798
|
+
},
|
|
8799
|
+
style: { display: "none" },
|
|
8800
|
+
disabled: t || u
|
|
8801
|
+
}), /* @__PURE__ */ S("svg", {
|
|
8802
|
+
width: "18",
|
|
8803
|
+
height: "18",
|
|
8804
|
+
viewBox: "0 0 24 24",
|
|
8805
|
+
fill: "none",
|
|
8806
|
+
stroke: "currentColor",
|
|
8807
|
+
strokeWidth: "2",
|
|
8808
|
+
children: /* @__PURE__ */ S("path", { d: "m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48" })
|
|
8809
|
+
})]
|
|
8810
|
+
}),
|
|
8811
|
+
/* @__PURE__ */ S("textarea", {
|
|
8812
|
+
ref: h,
|
|
8813
|
+
value: i,
|
|
8814
|
+
onChange: w,
|
|
8815
|
+
onKeyDown: x,
|
|
8816
|
+
placeholder: n ?? "Type a message… (Enter to send, Shift+Enter for newline)",
|
|
8817
|
+
disabled: t,
|
|
8818
|
+
rows: 1,
|
|
8819
|
+
className: "flex-1 rounded-xl px-4 py-2.5 text-base md:text-sm leading-relaxed focus:outline-none disabled:opacity-50 min-h-[42px]",
|
|
8820
|
+
style: {
|
|
8821
|
+
background: "var(--t-bg-surface)",
|
|
8822
|
+
color: "var(--t-fg-primary)",
|
|
8823
|
+
border: "1px solid var(--t-bg-border)",
|
|
8824
|
+
resize: "none"
|
|
8825
|
+
}
|
|
8826
|
+
}),
|
|
8827
|
+
/* @__PURE__ */ S("button", {
|
|
8828
|
+
onClick: b,
|
|
8829
|
+
disabled: t || u || !i.trim() && c.length === 0,
|
|
8830
|
+
className: "flex-shrink-0 w-[42px] h-[42px] rounded-xl flex items-center justify-center transition-colors disabled:opacity-40 disabled:cursor-not-allowed",
|
|
8831
|
+
style: {
|
|
8832
|
+
background: "var(--t-accent)",
|
|
8833
|
+
color: "var(--t-accent-fg)"
|
|
8834
|
+
},
|
|
8835
|
+
children: /* @__PURE__ */ C("svg", {
|
|
8836
|
+
width: "18",
|
|
8837
|
+
height: "18",
|
|
8838
|
+
viewBox: "0 0 24 24",
|
|
8839
|
+
fill: "none",
|
|
8840
|
+
stroke: "currentColor",
|
|
8841
|
+
strokeWidth: "2.5",
|
|
8842
|
+
children: [/* @__PURE__ */ S("path", { d: "M22 2 11 13" }), /* @__PURE__ */ S("path", { d: "m22 2-7 20-4-9-9-4 20-7z" })]
|
|
8843
|
+
})
|
|
8632
8844
|
})
|
|
8845
|
+
]
|
|
8846
|
+
}),
|
|
8847
|
+
/* @__PURE__ */ S("div", {
|
|
8848
|
+
className: "text-center text-[11px] pb-2 px-3 text-fg-muted",
|
|
8849
|
+
children: /* @__PURE__ */ S(je, {
|
|
8850
|
+
i18nKey: "footer.poweredBy",
|
|
8851
|
+
values: { label: "ELIA AI Assistant" },
|
|
8852
|
+
components: { a: /* @__PURE__ */ S("a", {
|
|
8853
|
+
href: "https://www.elia-asistent.com",
|
|
8854
|
+
target: "_blank",
|
|
8855
|
+
rel: "noopener noreferrer",
|
|
8856
|
+
className: "hover:underline",
|
|
8857
|
+
style: { color: "inherit" }
|
|
8858
|
+
}) }
|
|
8633
8859
|
})
|
|
8634
|
-
]
|
|
8635
|
-
}), !d && /* @__PURE__ */ S("div", {
|
|
8636
|
-
className: "text-center text-[11px] pb-2 px-3 text-fg-muted",
|
|
8637
|
-
children: /* @__PURE__ */ S(Me, {
|
|
8638
|
-
i18nKey: "footer.poweredBy",
|
|
8639
|
-
values: { label: l },
|
|
8640
|
-
components: { a: /* @__PURE__ */ S("a", {
|
|
8641
|
-
href: u,
|
|
8642
|
-
target: "_blank",
|
|
8643
|
-
rel: "noopener noreferrer",
|
|
8644
|
-
className: "hover:underline",
|
|
8645
|
-
style: { color: "inherit" }
|
|
8646
|
-
}) }
|
|
8647
8860
|
})
|
|
8648
|
-
|
|
8861
|
+
]
|
|
8649
8862
|
});
|
|
8650
8863
|
}
|
|
8651
8864
|
//#endregion
|
|
8652
8865
|
//#region src/components/Tabs.tsx
|
|
8653
|
-
function
|
|
8866
|
+
function Nu({ tabs: e, activeId: t, onChange: n }) {
|
|
8654
8867
|
return /* @__PURE__ */ S("div", {
|
|
8655
8868
|
className: "flex gap-1 px-3 pt-3 pb-2 flex-shrink-0 border-b",
|
|
8656
8869
|
style: {
|
|
@@ -8669,11 +8882,11 @@ function Pu({ tabs: e, activeId: t, onChange: n }) {
|
|
|
8669
8882
|
color: "var(--t-fg-secondary)",
|
|
8670
8883
|
border: "1px solid transparent"
|
|
8671
8884
|
},
|
|
8672
|
-
children: [e.icon && /* @__PURE__ */ S(
|
|
8885
|
+
children: [e.icon && /* @__PURE__ */ S(Pu, { name: e.icon }), /* @__PURE__ */ S("span", { children: e.label })]
|
|
8673
8886
|
}, e.id))
|
|
8674
8887
|
});
|
|
8675
8888
|
}
|
|
8676
|
-
function
|
|
8889
|
+
function Pu({ name: e }) {
|
|
8677
8890
|
let t = {
|
|
8678
8891
|
width: 14,
|
|
8679
8892
|
height: 14,
|
|
@@ -8701,7 +8914,7 @@ function Fu({ name: e }) {
|
|
|
8701
8914
|
}
|
|
8702
8915
|
//#endregion
|
|
8703
8916
|
//#region src/hooks/useFeedJson.ts
|
|
8704
|
-
function
|
|
8917
|
+
function Fu(e, t) {
|
|
8705
8918
|
let [n, r] = y(() => e ? {
|
|
8706
8919
|
data: [],
|
|
8707
8920
|
loading: !0,
|
|
@@ -8747,20 +8960,20 @@ function Iu(e, t) {
|
|
|
8747
8960
|
}
|
|
8748
8961
|
//#endregion
|
|
8749
8962
|
//#region src/components/NotificationsTab.tsx
|
|
8750
|
-
function
|
|
8751
|
-
let { t: n } =
|
|
8752
|
-
return i ? /* @__PURE__ */ S(
|
|
8963
|
+
function Iu({ feedUrl: e, inlineItems: t }) {
|
|
8964
|
+
let { t: n } = Pe(), { data: r, loading: i, error: a } = Fu(e, t);
|
|
8965
|
+
return i ? /* @__PURE__ */ S(Bu, {
|
|
8753
8966
|
text: n("tabs.loading"),
|
|
8754
8967
|
muted: !0
|
|
8755
|
-
}) : a ? /* @__PURE__ */ S(
|
|
8968
|
+
}) : a ? /* @__PURE__ */ S(Bu, { text: `${n("tabs.error")} (${a})` }) : r.length === 0 ? /* @__PURE__ */ S(Bu, {
|
|
8756
8969
|
text: n("tabs.empty.notifications"),
|
|
8757
8970
|
muted: !0
|
|
8758
8971
|
}) : /* @__PURE__ */ S("div", {
|
|
8759
8972
|
className: "flex-1 overflow-y-auto px-4 py-3 space-y-3",
|
|
8760
|
-
children: r.map((e, t) => /* @__PURE__ */ S(
|
|
8973
|
+
children: r.map((e, t) => /* @__PURE__ */ S(Lu, { item: e }, e.id ?? t))
|
|
8761
8974
|
});
|
|
8762
8975
|
}
|
|
8763
|
-
function
|
|
8976
|
+
function Lu({ item: e }) {
|
|
8764
8977
|
return /* @__PURE__ */ C("div", {
|
|
8765
8978
|
className: "rounded-xl px-4 py-3",
|
|
8766
8979
|
style: {
|
|
@@ -8773,7 +8986,7 @@ function Ru({ item: e }) {
|
|
|
8773
8986
|
children: [/* @__PURE__ */ S("h3", {
|
|
8774
8987
|
className: "flex-1 text-sm font-semibold text-fg-primary",
|
|
8775
8988
|
children: e.title
|
|
8776
|
-
}), e.tags?.map((e, t) => /* @__PURE__ */ S(
|
|
8989
|
+
}), e.tags?.map((e, t) => /* @__PURE__ */ S(Ru, { tag: e }, t))]
|
|
8777
8990
|
}),
|
|
8778
8991
|
/* @__PURE__ */ S("p", {
|
|
8779
8992
|
className: "text-sm text-fg-secondary leading-relaxed whitespace-pre-line",
|
|
@@ -8803,15 +9016,15 @@ function Ru({ item: e }) {
|
|
|
8803
9016
|
]
|
|
8804
9017
|
});
|
|
8805
9018
|
}
|
|
8806
|
-
function
|
|
9019
|
+
function Ru({ tag: e }) {
|
|
8807
9020
|
let t = typeof e == "string" ? e : e.label;
|
|
8808
9021
|
return /* @__PURE__ */ S("span", {
|
|
8809
9022
|
className: "inline-block px-2 py-0.5 rounded-md text-[11px] font-medium flex-shrink-0",
|
|
8810
|
-
style:
|
|
9023
|
+
style: zu(typeof e == "string" ? "neutral" : e.variant ?? "neutral"),
|
|
8811
9024
|
children: t
|
|
8812
9025
|
});
|
|
8813
9026
|
}
|
|
8814
|
-
function
|
|
9027
|
+
function zu(e) {
|
|
8815
9028
|
switch (e) {
|
|
8816
9029
|
case "success": return {
|
|
8817
9030
|
background: "rgba(34, 197, 94, 0.15)",
|
|
@@ -8831,7 +9044,7 @@ function Bu(e) {
|
|
|
8831
9044
|
};
|
|
8832
9045
|
}
|
|
8833
9046
|
}
|
|
8834
|
-
function
|
|
9047
|
+
function Bu({ text: e, muted: t }) {
|
|
8835
9048
|
return /* @__PURE__ */ S("div", {
|
|
8836
9049
|
className: "flex-1 flex items-center justify-center px-4 py-12 text-sm text-center",
|
|
8837
9050
|
style: { color: t ? "var(--t-fg-muted)" : "var(--t-fg-secondary)" },
|
|
@@ -8840,37 +9053,37 @@ function Vu({ text: e, muted: t }) {
|
|
|
8840
9053
|
}
|
|
8841
9054
|
//#endregion
|
|
8842
9055
|
//#region src/components/FaqTab.tsx
|
|
8843
|
-
function
|
|
8844
|
-
let { t: n } =
|
|
9056
|
+
function Vu({ feedUrl: e, inlineItems: t }) {
|
|
9057
|
+
let { t: n } = Pe(), { data: r, loading: i, error: a } = Fu(e, t), [o, s] = y(""), [c, l] = y(null), u = _(() => {
|
|
8845
9058
|
let e = o.trim().toLowerCase();
|
|
8846
9059
|
return e ? r.filter((t) => `${t.question} ${t.answer} ${t.category ?? ""}`.toLowerCase().includes(e)) : r;
|
|
8847
9060
|
}, [r, o]);
|
|
8848
9061
|
return i ? /* @__PURE__ */ C("div", {
|
|
8849
9062
|
className: "flex-1 flex flex-col",
|
|
8850
|
-
children: [/* @__PURE__ */ S(
|
|
9063
|
+
children: [/* @__PURE__ */ S(Hu, {
|
|
8851
9064
|
value: o,
|
|
8852
9065
|
onChange: s,
|
|
8853
9066
|
placeholder: n("tabs.faqSearch")
|
|
8854
|
-
}), /* @__PURE__ */ S(
|
|
9067
|
+
}), /* @__PURE__ */ S(Wu, {
|
|
8855
9068
|
text: n("tabs.loading"),
|
|
8856
9069
|
muted: !0
|
|
8857
9070
|
})]
|
|
8858
9071
|
}) : a ? /* @__PURE__ */ C("div", {
|
|
8859
9072
|
className: "flex-1 flex flex-col",
|
|
8860
|
-
children: [/* @__PURE__ */ S(
|
|
9073
|
+
children: [/* @__PURE__ */ S(Hu, {
|
|
8861
9074
|
value: o,
|
|
8862
9075
|
onChange: s,
|
|
8863
9076
|
placeholder: n("tabs.faqSearch")
|
|
8864
|
-
}), /* @__PURE__ */ S(
|
|
9077
|
+
}), /* @__PURE__ */ S(Wu, { text: `${n("tabs.error")} (${a})` })]
|
|
8865
9078
|
}) : /* @__PURE__ */ C("div", {
|
|
8866
9079
|
className: "flex-1 flex flex-col min-h-0",
|
|
8867
|
-
children: [/* @__PURE__ */ S(
|
|
9080
|
+
children: [/* @__PURE__ */ S(Hu, {
|
|
8868
9081
|
value: o,
|
|
8869
9082
|
onChange: s,
|
|
8870
9083
|
placeholder: n("tabs.faqSearch")
|
|
8871
9084
|
}), /* @__PURE__ */ S("div", {
|
|
8872
9085
|
className: "flex-1 overflow-y-auto px-4 py-3 space-y-2",
|
|
8873
|
-
children: u.length === 0 ? /* @__PURE__ */ S(
|
|
9086
|
+
children: u.length === 0 ? /* @__PURE__ */ S(Wu, {
|
|
8874
9087
|
text: n("tabs.empty.faq"),
|
|
8875
9088
|
muted: !0
|
|
8876
9089
|
}) : u.map((e, t) => {
|
|
@@ -8887,7 +9100,7 @@ function Hu({ feedUrl: e, inlineItems: t }) {
|
|
|
8887
9100
|
children: [/* @__PURE__ */ S("span", {
|
|
8888
9101
|
className: "flex-1 text-sm font-semibold text-fg-primary",
|
|
8889
9102
|
children: e.question
|
|
8890
|
-
}), /* @__PURE__ */ S(
|
|
9103
|
+
}), /* @__PURE__ */ S(Uu, { open: r })]
|
|
8891
9104
|
}), r && /* @__PURE__ */ C("div", {
|
|
8892
9105
|
className: "px-4 pb-3 text-sm text-fg-secondary leading-relaxed whitespace-pre-line",
|
|
8893
9106
|
style: {
|
|
@@ -8911,7 +9124,7 @@ function Hu({ feedUrl: e, inlineItems: t }) {
|
|
|
8911
9124
|
})]
|
|
8912
9125
|
});
|
|
8913
9126
|
}
|
|
8914
|
-
function
|
|
9127
|
+
function Hu({ value: e, onChange: t, placeholder: n }) {
|
|
8915
9128
|
return /* @__PURE__ */ S("div", {
|
|
8916
9129
|
className: "px-4 pt-3 pb-2 flex-shrink-0",
|
|
8917
9130
|
style: { background: "var(--t-bg-base)" },
|
|
@@ -8947,7 +9160,7 @@ function Uu({ value: e, onChange: t, placeholder: n }) {
|
|
|
8947
9160
|
})
|
|
8948
9161
|
});
|
|
8949
9162
|
}
|
|
8950
|
-
function
|
|
9163
|
+
function Uu({ open: e }) {
|
|
8951
9164
|
return /* @__PURE__ */ S("svg", {
|
|
8952
9165
|
width: "16",
|
|
8953
9166
|
height: "16",
|
|
@@ -8967,7 +9180,7 @@ function Wu({ open: e }) {
|
|
|
8967
9180
|
children: /* @__PURE__ */ S("path", { d: "m6 9 6 6 6-6" })
|
|
8968
9181
|
});
|
|
8969
9182
|
}
|
|
8970
|
-
function
|
|
9183
|
+
function Wu({ text: e, muted: t }) {
|
|
8971
9184
|
return /* @__PURE__ */ S("div", {
|
|
8972
9185
|
className: "flex-1 flex items-center justify-center px-4 py-12 text-sm text-center",
|
|
8973
9186
|
style: { color: t ? "var(--t-fg-muted)" : "var(--t-fg-secondary)" },
|
|
@@ -8976,30 +9189,31 @@ function Gu({ text: e, muted: t }) {
|
|
|
8976
9189
|
}
|
|
8977
9190
|
//#endregion
|
|
8978
9191
|
//#region src/components/ChatView.tsx
|
|
8979
|
-
function
|
|
8980
|
-
let { t: n } =
|
|
8981
|
-
|
|
9192
|
+
function Gu({ onOpenSettings: e, onClose: t }) {
|
|
9193
|
+
let { t: n } = Pe(), r = s((e) => e.activeSessionId), i = s((e) => r ? e.messages[r] ?? [] : []), a = s((e) => e.createSession), c = s((e) => e.isStreaming), l = s((e) => r ? !!e.awaitingAgentReply[r] : !1), u = o((e) => e.config), d = o((e) => e.language), f = u.hideSettings ?? !1, { send: p, retry: m } = Ye(), h = v(null), _ = v(!0), b = v(0), w = u.i18n?.[d] ?? u.i18n?.en ?? {}, T = w.initialMessages ?? u.initialMessages ?? [], E = w.botName ?? u.botName ?? n("header.assistant"), D = u.tabs, O = D?.notifications, k = D?.help, A = !!(O?.feedUrl || O?.items?.length || k?.feedUrl || k?.items?.length), j = A ? [
|
|
9194
|
+
O?.feedUrl || O?.items?.length ? {
|
|
8982
9195
|
id: "notifications",
|
|
8983
|
-
label:
|
|
9196
|
+
label: w.tabs?.notifications?.title ?? D?.notifications?.title ?? n("tabs.notifications"),
|
|
8984
9197
|
icon: "bulb"
|
|
8985
9198
|
} : null,
|
|
8986
|
-
|
|
9199
|
+
k?.feedUrl || k?.items?.length ? {
|
|
8987
9200
|
id: "help",
|
|
8988
|
-
label:
|
|
9201
|
+
label: w.tabs?.help?.title ?? D?.help?.title ?? n("tabs.help"),
|
|
8989
9202
|
icon: "book"
|
|
8990
9203
|
} : null,
|
|
8991
9204
|
{
|
|
8992
9205
|
id: "chat",
|
|
8993
|
-
label:
|
|
9206
|
+
label: w.tabs?.chat?.title ?? D?.chat?.title ?? n("tabs.chat"),
|
|
8994
9207
|
icon: "chat"
|
|
8995
9208
|
}
|
|
8996
|
-
].filter((e) => e !== null) : [], [
|
|
9209
|
+
].filter((e) => e !== null) : [], [M, N] = y("chat");
|
|
8997
9210
|
g(() => {
|
|
8998
9211
|
r || a();
|
|
8999
9212
|
}, [r, a]), g(() => {
|
|
9000
|
-
|
|
9213
|
+
let e = i.length;
|
|
9214
|
+
_.current ? (h.current?.scrollIntoView({ behavior: "auto" }), _.current = !1) : (e > b.current || c) && h.current?.scrollIntoView({ behavior: "smooth" }), b.current = e;
|
|
9001
9215
|
}, [i, c]);
|
|
9002
|
-
let
|
|
9216
|
+
let P = T.length > 0, ee = u.showWelcomeScreen && i.length === 0 && !c && !P, F = w.welcomeSubtitle ?? n("welcome.subtitle"), I = !A || M === "chat";
|
|
9003
9217
|
return /* @__PURE__ */ C("div", {
|
|
9004
9218
|
className: "flex flex-col h-full min-w-0",
|
|
9005
9219
|
children: [
|
|
@@ -9016,14 +9230,17 @@ function Ku({ onOpenSettings: e, onClose: t }) {
|
|
|
9016
9230
|
src: Eu(u.botAvatar),
|
|
9017
9231
|
alt: "",
|
|
9018
9232
|
className: "w-7 h-7 rounded-full object-cover flex-shrink-0",
|
|
9019
|
-
style: {
|
|
9233
|
+
style: {
|
|
9234
|
+
border: "1px solid var(--t-bg-border)",
|
|
9235
|
+
background: "var(--t-avatar-bg)"
|
|
9236
|
+
}
|
|
9020
9237
|
}) : /* @__PURE__ */ S("div", {
|
|
9021
9238
|
className: "w-2 h-2 rounded-full",
|
|
9022
9239
|
style: { background: "var(--t-accent)" }
|
|
9023
9240
|
}),
|
|
9024
9241
|
/* @__PURE__ */ S("span", {
|
|
9025
9242
|
className: "text-sm font-semibold text-fg-primary",
|
|
9026
|
-
children:
|
|
9243
|
+
children: E
|
|
9027
9244
|
}),
|
|
9028
9245
|
u.webhookUrl ? /* @__PURE__ */ C("span", {
|
|
9029
9246
|
className: "text-xs text-fg-muted",
|
|
@@ -9039,35 +9256,35 @@ function Ku({ onOpenSettings: e, onClose: t }) {
|
|
|
9039
9256
|
onClick: e,
|
|
9040
9257
|
className: "w-8 h-8 rounded-lg flex items-center justify-center text-fg-secondary hover:text-fg-primary hover:bg-bg-surface transition-colors",
|
|
9041
9258
|
title: n("sidebar.settings"),
|
|
9042
|
-
children: /* @__PURE__ */ S(
|
|
9259
|
+
children: /* @__PURE__ */ S(qu, {})
|
|
9043
9260
|
}), t && /* @__PURE__ */ S("button", {
|
|
9044
9261
|
onClick: t,
|
|
9045
9262
|
className: "w-8 h-8 rounded-lg flex items-center justify-center text-fg-secondary hover:text-fg-primary hover:bg-bg-surface transition-colors",
|
|
9046
9263
|
"aria-label": "Close chat",
|
|
9047
|
-
children: /* @__PURE__ */ S(
|
|
9264
|
+
children: /* @__PURE__ */ S(Ju, {})
|
|
9048
9265
|
})]
|
|
9049
9266
|
})]
|
|
9050
9267
|
}),
|
|
9051
|
-
|
|
9052
|
-
tabs:
|
|
9053
|
-
activeId:
|
|
9054
|
-
onChange: (e) =>
|
|
9268
|
+
A && /* @__PURE__ */ S(Nu, {
|
|
9269
|
+
tabs: j,
|
|
9270
|
+
activeId: M,
|
|
9271
|
+
onChange: (e) => N(e)
|
|
9055
9272
|
}),
|
|
9056
|
-
|
|
9057
|
-
feedUrl:
|
|
9058
|
-
inlineItems:
|
|
9273
|
+
A && M === "notifications" && /* @__PURE__ */ S(Iu, {
|
|
9274
|
+
feedUrl: O?.feedUrl,
|
|
9275
|
+
inlineItems: O?.items
|
|
9059
9276
|
}),
|
|
9060
|
-
|
|
9061
|
-
feedUrl:
|
|
9062
|
-
inlineItems:
|
|
9277
|
+
A && M === "help" && /* @__PURE__ */ S(Vu, {
|
|
9278
|
+
feedUrl: k?.feedUrl,
|
|
9279
|
+
inlineItems: k?.items
|
|
9063
9280
|
}),
|
|
9064
|
-
|
|
9281
|
+
I && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
|
|
9065
9282
|
className: "flex-1 overflow-y-auto px-4 py-4",
|
|
9066
|
-
children: [
|
|
9067
|
-
botName:
|
|
9068
|
-
subtitle:
|
|
9283
|
+
children: [ee ? /* @__PURE__ */ S(Ku, {
|
|
9284
|
+
botName: E,
|
|
9285
|
+
subtitle: F
|
|
9069
9286
|
}) : /* @__PURE__ */ C(x, { children: [
|
|
9070
|
-
i.length === 0 &&
|
|
9287
|
+
i.length === 0 && T.map((e, t) => /* @__PURE__ */ S(ku, { message: {
|
|
9071
9288
|
id: String(t),
|
|
9072
9289
|
role: "bot",
|
|
9073
9290
|
content: e,
|
|
@@ -9079,7 +9296,7 @@ function Ku({ onOpenSettings: e, onClose: t }) {
|
|
|
9079
9296
|
}, e.id)),
|
|
9080
9297
|
(c && i[i.length - 1]?.role === "bot" && i[i.length - 1]?.content === "" || l) && /* @__PURE__ */ S(Au, {})
|
|
9081
9298
|
] }), /* @__PURE__ */ S("div", { ref: h })]
|
|
9082
|
-
}), /* @__PURE__ */ S(
|
|
9299
|
+
}), /* @__PURE__ */ S(Mu, {
|
|
9083
9300
|
onSend: p,
|
|
9084
9301
|
disabled: c || !u.webhookUrl,
|
|
9085
9302
|
placeholder: u.webhookUrl ? n("input.placeholder") : n("input.placeholderUnconfigured"),
|
|
@@ -9088,7 +9305,7 @@ function Ku({ onOpenSettings: e, onClose: t }) {
|
|
|
9088
9305
|
]
|
|
9089
9306
|
});
|
|
9090
9307
|
}
|
|
9091
|
-
function
|
|
9308
|
+
function Ku({ botName: e, subtitle: t }) {
|
|
9092
9309
|
return /* @__PURE__ */ C("div", {
|
|
9093
9310
|
className: "flex flex-col items-center justify-center h-full gap-4 text-center px-8",
|
|
9094
9311
|
children: [/* @__PURE__ */ S("div", {
|
|
@@ -9102,12 +9319,12 @@ function qu({ botName: e, subtitle: t }) {
|
|
|
9102
9319
|
className: "text-lg font-semibold text-fg-primary mb-1",
|
|
9103
9320
|
children: e
|
|
9104
9321
|
}), /* @__PURE__ */ S("p", {
|
|
9105
|
-
className: "text-sm text-fg-secondary",
|
|
9322
|
+
className: "text-sm text-fg-secondary whitespace-pre-line",
|
|
9106
9323
|
children: t
|
|
9107
9324
|
})] })]
|
|
9108
9325
|
});
|
|
9109
9326
|
}
|
|
9110
|
-
function
|
|
9327
|
+
function qu() {
|
|
9111
9328
|
return /* @__PURE__ */ C("svg", {
|
|
9112
9329
|
width: "16",
|
|
9113
9330
|
height: "16",
|
|
@@ -9122,7 +9339,7 @@ function Ju() {
|
|
|
9122
9339
|
}), /* @__PURE__ */ S("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z" })]
|
|
9123
9340
|
});
|
|
9124
9341
|
}
|
|
9125
|
-
function
|
|
9342
|
+
function Ju() {
|
|
9126
9343
|
return /* @__PURE__ */ S("svg", {
|
|
9127
9344
|
width: "16",
|
|
9128
9345
|
height: "16",
|
|
@@ -9135,25 +9352,25 @@ function Yu() {
|
|
|
9135
9352
|
}
|
|
9136
9353
|
//#endregion
|
|
9137
9354
|
//#region src/components/ThemePicker.tsx
|
|
9138
|
-
function
|
|
9139
|
-
let { activeTheme: e, setTheme: t } =
|
|
9355
|
+
function Yu() {
|
|
9356
|
+
let { activeTheme: e, setTheme: t } = Fe();
|
|
9140
9357
|
return /* @__PURE__ */ S("div", {
|
|
9141
9358
|
className: "flex flex-wrap gap-2 p-3",
|
|
9142
9359
|
children: a.map((n) => /* @__PURE__ */ S("button", {
|
|
9143
9360
|
title: n.label,
|
|
9144
9361
|
onClick: () => t(n.id),
|
|
9145
9362
|
className: "relative w-7 h-7 rounded-full transition-transform hover:scale-110 focus:outline-none",
|
|
9146
|
-
style: { background: n.
|
|
9363
|
+
style: { background: n.accentColor },
|
|
9147
9364
|
children: e === n.id && /* @__PURE__ */ S("span", {
|
|
9148
9365
|
className: "absolute inset-0 rounded-full",
|
|
9149
|
-
style: { boxShadow: `0 0 0 2px ${n.
|
|
9366
|
+
style: { boxShadow: `0 0 0 2px ${n.baseColor}, 0 0 0 4px ${n.baseColor}` }
|
|
9150
9367
|
})
|
|
9151
9368
|
}, n.id))
|
|
9152
9369
|
});
|
|
9153
9370
|
}
|
|
9154
9371
|
//#endregion
|
|
9155
9372
|
//#region src/components/SettingsModal.tsx
|
|
9156
|
-
var
|
|
9373
|
+
var Xu = [
|
|
9157
9374
|
{
|
|
9158
9375
|
code: "en",
|
|
9159
9376
|
label: "EN - English"
|
|
@@ -9187,8 +9404,8 @@ var Zu = 500 * 1024, Qu = [
|
|
|
9187
9404
|
label: "ES - Spanish"
|
|
9188
9405
|
}
|
|
9189
9406
|
];
|
|
9190
|
-
function
|
|
9191
|
-
let { t } =
|
|
9407
|
+
function Zu({ onClose: e }) {
|
|
9408
|
+
let { t } = Pe(), { config: n, setConfig: r, language: i, setLanguage: a, activeTheme: s } = o(), [c, l] = y({ ...n }), [u, d] = y(""), [f, p] = y(() => {
|
|
9192
9409
|
try {
|
|
9193
9410
|
return JSON.stringify(c.metadata ?? {}, null, 2);
|
|
9194
9411
|
} catch {
|
|
@@ -9240,7 +9457,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9240
9457
|
[e]: {}
|
|
9241
9458
|
}
|
|
9242
9459
|
})), O(e), A(""), M(!1));
|
|
9243
|
-
}, [k, E]),
|
|
9460
|
+
}, [k, E]), F = m(() => {
|
|
9244
9461
|
let t, n = f.trim();
|
|
9245
9462
|
if (n && n !== "{}") try {
|
|
9246
9463
|
t = JSON.parse(n), d("");
|
|
@@ -9257,7 +9474,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9257
9474
|
f,
|
|
9258
9475
|
r,
|
|
9259
9476
|
e
|
|
9260
|
-
]),
|
|
9477
|
+
]), I = N(D);
|
|
9261
9478
|
return /* @__PURE__ */ C("div", {
|
|
9262
9479
|
className: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
9263
9480
|
style: { background: "rgba(0,0,0,0.6)" },
|
|
@@ -9294,15 +9511,12 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9294
9511
|
}),
|
|
9295
9512
|
h ? /* @__PURE__ */ C("div", {
|
|
9296
9513
|
className: "px-6 py-5 space-y-3 overflow-y-auto flex-1",
|
|
9297
|
-
children: [/* @__PURE__ */
|
|
9514
|
+
children: [/* @__PURE__ */ S("p", {
|
|
9298
9515
|
className: "text-xs text-fg-secondary leading-relaxed",
|
|
9299
|
-
children:
|
|
9300
|
-
"
|
|
9301
|
-
/* @__PURE__ */ S("code", {
|
|
9302
|
-
|
|
9303
|
-
/* @__PURE__ */ S("code", { children: "example.html" }),
|
|
9304
|
-
" for the full integration guide."
|
|
9305
|
-
]
|
|
9516
|
+
children: /* @__PURE__ */ S(je, {
|
|
9517
|
+
i18nKey: "settings.exportHint",
|
|
9518
|
+
components: { code: /* @__PURE__ */ S("code", {}) }
|
|
9519
|
+
})
|
|
9306
9520
|
}), /* @__PURE__ */ S("textarea", {
|
|
9307
9521
|
readOnly: !0,
|
|
9308
9522
|
value: b,
|
|
@@ -9345,7 +9559,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9345
9559
|
}),
|
|
9346
9560
|
/* @__PURE__ */ S($, {
|
|
9347
9561
|
label: t("settings.theme") ?? "Theme",
|
|
9348
|
-
children: /* @__PURE__ */ S(
|
|
9562
|
+
children: /* @__PURE__ */ S(Yu, {})
|
|
9349
9563
|
}),
|
|
9350
9564
|
/* @__PURE__ */ S("hr", { style: { borderColor: "var(--t-bg-border)" } }),
|
|
9351
9565
|
/* @__PURE__ */ S($, {
|
|
@@ -9400,7 +9614,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9400
9614
|
}),
|
|
9401
9615
|
/* @__PURE__ */ S($, {
|
|
9402
9616
|
label: t("settings.botAvatar"),
|
|
9403
|
-
children: /* @__PURE__ */ S(
|
|
9617
|
+
children: /* @__PURE__ */ S($u, {
|
|
9404
9618
|
value: c.botAvatar,
|
|
9405
9619
|
onChange: (e) => l((t) => ({
|
|
9406
9620
|
...t,
|
|
@@ -9409,6 +9623,17 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9409
9623
|
shape: "circle"
|
|
9410
9624
|
})
|
|
9411
9625
|
}),
|
|
9626
|
+
/* @__PURE__ */ S($, {
|
|
9627
|
+
label: t("settings.toggleButtonIcon"),
|
|
9628
|
+
children: /* @__PURE__ */ S($u, {
|
|
9629
|
+
value: c.toggleButtonIcon,
|
|
9630
|
+
onChange: (e) => l((t) => ({
|
|
9631
|
+
...t,
|
|
9632
|
+
toggleButtonIcon: e
|
|
9633
|
+
})),
|
|
9634
|
+
shape: "circle"
|
|
9635
|
+
})
|
|
9636
|
+
}),
|
|
9412
9637
|
/* @__PURE__ */ S($, {
|
|
9413
9638
|
label: t("settings.metadata"),
|
|
9414
9639
|
error: u,
|
|
@@ -9474,7 +9699,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9474
9699
|
/* @__PURE__ */ C("div", {
|
|
9475
9700
|
className: "space-y-2",
|
|
9476
9701
|
children: [
|
|
9477
|
-
/* @__PURE__ */ S(
|
|
9702
|
+
/* @__PURE__ */ S(Qu, {
|
|
9478
9703
|
label: t("settings.streaming"),
|
|
9479
9704
|
checked: c.streaming ?? !1,
|
|
9480
9705
|
onChange: (e) => l((t) => ({
|
|
@@ -9482,7 +9707,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9482
9707
|
streaming: e
|
|
9483
9708
|
}))
|
|
9484
9709
|
}),
|
|
9485
|
-
/* @__PURE__ */ S(
|
|
9710
|
+
/* @__PURE__ */ S(Qu, {
|
|
9486
9711
|
label: t("settings.welcomeScreen"),
|
|
9487
9712
|
checked: c.showWelcomeScreen ?? !0,
|
|
9488
9713
|
onChange: (e) => l((t) => ({
|
|
@@ -9490,21 +9715,27 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9490
9715
|
showWelcomeScreen: e
|
|
9491
9716
|
}))
|
|
9492
9717
|
}),
|
|
9493
|
-
/* @__PURE__ */ S(
|
|
9494
|
-
label: t("settings.sidebar"),
|
|
9495
|
-
checked: c.showSidebar ?? !1,
|
|
9496
|
-
onChange: (e) => l((t) => ({
|
|
9497
|
-
...t,
|
|
9498
|
-
showSidebar: e
|
|
9499
|
-
}))
|
|
9500
|
-
}),
|
|
9501
|
-
/* @__PURE__ */ S(ed, {
|
|
9718
|
+
/* @__PURE__ */ S(Qu, {
|
|
9502
9719
|
label: t("settings.fileUploads"),
|
|
9503
9720
|
checked: c.allowFileUploads ?? !1,
|
|
9504
9721
|
onChange: (e) => l((t) => ({
|
|
9505
9722
|
...t,
|
|
9506
|
-
allowFileUploads: e
|
|
9723
|
+
allowFileUploads: e,
|
|
9724
|
+
allowedFileExtensions: e ? t.allowedFileExtensions ?? ".pdf,.docx,.png,.jpg,.jpeg" : t.allowedFileExtensions
|
|
9507
9725
|
}))
|
|
9726
|
+
}),
|
|
9727
|
+
c.allowFileUploads && /* @__PURE__ */ S($, {
|
|
9728
|
+
label: t("settings.allowedFileExtensions"),
|
|
9729
|
+
children: /* @__PURE__ */ S("input", {
|
|
9730
|
+
type: "text",
|
|
9731
|
+
value: c.allowedFileExtensions ?? "",
|
|
9732
|
+
onChange: (e) => l((t) => ({
|
|
9733
|
+
...t,
|
|
9734
|
+
allowedFileExtensions: e.target.value
|
|
9735
|
+
})),
|
|
9736
|
+
placeholder: ".pdf,.docx,.png,.jpg,.jpeg",
|
|
9737
|
+
className: "input-field text-xs"
|
|
9738
|
+
})
|
|
9508
9739
|
})
|
|
9509
9740
|
]
|
|
9510
9741
|
}),
|
|
@@ -9536,7 +9767,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9536
9767
|
(c.mode === "fullscreen" || c.mode === "mixed") && /* @__PURE__ */ C("div", {
|
|
9537
9768
|
className: "space-y-3 pl-3 border-l-2",
|
|
9538
9769
|
style: { borderColor: "var(--t-accent)" },
|
|
9539
|
-
children: [/* @__PURE__ */ S(
|
|
9770
|
+
children: [/* @__PURE__ */ S(Qu, {
|
|
9540
9771
|
label: t("settings.fullscreenSheet"),
|
|
9541
9772
|
checked: c.fullscreenSheet ?? !1,
|
|
9542
9773
|
onChange: (e) => l((t) => ({
|
|
@@ -9665,7 +9896,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9665
9896
|
className: "space-y-3 pl-3 border-l-2",
|
|
9666
9897
|
style: { borderColor: "var(--t-accent)" },
|
|
9667
9898
|
children: [
|
|
9668
|
-
/* @__PURE__ */ S(
|
|
9899
|
+
/* @__PURE__ */ S(Qu, {
|
|
9669
9900
|
label: t("settings.cta"),
|
|
9670
9901
|
checked: c.showCta ?? !0,
|
|
9671
9902
|
onChange: (e) => l((t) => ({
|
|
@@ -9673,7 +9904,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9673
9904
|
showCta: e
|
|
9674
9905
|
}))
|
|
9675
9906
|
}),
|
|
9676
|
-
/* @__PURE__ */ S(
|
|
9907
|
+
/* @__PURE__ */ S(Qu, {
|
|
9677
9908
|
label: t("settings.ctaSound"),
|
|
9678
9909
|
checked: c.ctaSound ?? !0,
|
|
9679
9910
|
onChange: (e) => l((t) => ({
|
|
@@ -9694,56 +9925,10 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9694
9925
|
min: 0,
|
|
9695
9926
|
step: 500
|
|
9696
9927
|
})
|
|
9697
|
-
}),
|
|
9698
|
-
/* @__PURE__ */ S($, {
|
|
9699
|
-
label: t("settings.toggleButtonIcon"),
|
|
9700
|
-
children: /* @__PURE__ */ S(td, {
|
|
9701
|
-
value: c.toggleButtonIcon,
|
|
9702
|
-
onChange: (e) => l((t) => ({
|
|
9703
|
-
...t,
|
|
9704
|
-
toggleButtonIcon: e
|
|
9705
|
-
})),
|
|
9706
|
-
shape: "circle"
|
|
9707
|
-
})
|
|
9708
9928
|
})
|
|
9709
9929
|
]
|
|
9710
9930
|
}),
|
|
9711
9931
|
/* @__PURE__ */ S("hr", { style: { borderColor: "var(--t-bg-border)" } }),
|
|
9712
|
-
/* @__PURE__ */ S(ed, {
|
|
9713
|
-
label: t("settings.poweredByHide"),
|
|
9714
|
-
checked: c.poweredByHide ?? !1,
|
|
9715
|
-
onChange: (e) => l((t) => ({
|
|
9716
|
-
...t,
|
|
9717
|
-
poweredByHide: e
|
|
9718
|
-
}))
|
|
9719
|
-
}),
|
|
9720
|
-
!c.poweredByHide && /* @__PURE__ */ C("div", {
|
|
9721
|
-
className: "grid grid-cols-2 gap-3",
|
|
9722
|
-
children: [/* @__PURE__ */ S($, {
|
|
9723
|
-
label: t("settings.poweredByLabel"),
|
|
9724
|
-
children: /* @__PURE__ */ S("input", {
|
|
9725
|
-
value: c.poweredByLabel ?? "",
|
|
9726
|
-
onChange: (e) => l((t) => ({
|
|
9727
|
-
...t,
|
|
9728
|
-
poweredByLabel: e.target.value || void 0
|
|
9729
|
-
})),
|
|
9730
|
-
placeholder: "ELIA AI Assistant",
|
|
9731
|
-
className: "input-field"
|
|
9732
|
-
})
|
|
9733
|
-
}), /* @__PURE__ */ S($, {
|
|
9734
|
-
label: t("settings.poweredByUrl"),
|
|
9735
|
-
children: /* @__PURE__ */ S("input", {
|
|
9736
|
-
type: "url",
|
|
9737
|
-
value: c.poweredByUrl ?? "",
|
|
9738
|
-
onChange: (e) => l((t) => ({
|
|
9739
|
-
...t,
|
|
9740
|
-
poweredByUrl: e.target.value || void 0
|
|
9741
|
-
})),
|
|
9742
|
-
placeholder: "https://www.elia-asistent.com",
|
|
9743
|
-
className: "input-field"
|
|
9744
|
-
})
|
|
9745
|
-
})]
|
|
9746
|
-
}),
|
|
9747
9932
|
/* @__PURE__ */ S("hr", { style: { borderColor: "var(--t-bg-border)" } }),
|
|
9748
9933
|
/* @__PURE__ */ C("div", { children: [
|
|
9749
9934
|
/* @__PURE__ */ S("p", {
|
|
@@ -9776,7 +9961,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9776
9961
|
value: "",
|
|
9777
9962
|
children: "Pick…"
|
|
9778
9963
|
}),
|
|
9779
|
-
|
|
9964
|
+
Xu.filter((e) => !E.includes(e.code)).map((e) => /* @__PURE__ */ S("option", {
|
|
9780
9965
|
value: e.code,
|
|
9781
9966
|
children: e.label
|
|
9782
9967
|
}, e.code)),
|
|
@@ -9819,7 +10004,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9819
10004
|
/* @__PURE__ */ S($, {
|
|
9820
10005
|
label: t("settings.botNameOverride"),
|
|
9821
10006
|
children: /* @__PURE__ */ S("input", {
|
|
9822
|
-
value:
|
|
10007
|
+
value: I.botName ?? "",
|
|
9823
10008
|
onChange: (e) => P(D, { botName: e.target.value || void 0 }),
|
|
9824
10009
|
placeholder: c.botName ?? "Assistant",
|
|
9825
10010
|
className: "input-field"
|
|
@@ -9828,7 +10013,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9828
10013
|
/* @__PURE__ */ S($, {
|
|
9829
10014
|
label: t("settings.welcomeSubtitle"),
|
|
9830
10015
|
children: /* @__PURE__ */ S("input", {
|
|
9831
|
-
value:
|
|
10016
|
+
value: I.welcomeSubtitle ?? "",
|
|
9832
10017
|
onChange: (e) => P(D, { welcomeSubtitle: e.target.value || void 0 }),
|
|
9833
10018
|
placeholder: t("welcome.subtitle"),
|
|
9834
10019
|
className: "input-field"
|
|
@@ -9837,7 +10022,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9837
10022
|
/* @__PURE__ */ S($, {
|
|
9838
10023
|
label: t("settings.initialMessages"),
|
|
9839
10024
|
children: /* @__PURE__ */ S("textarea", {
|
|
9840
|
-
value: (
|
|
10025
|
+
value: (I.initialMessages ?? []).join("\n"),
|
|
9841
10026
|
onChange: (e) => P(D, { initialMessages: e.target.value ? e.target.value.split("\n").filter(Boolean) : [] }),
|
|
9842
10027
|
rows: 4,
|
|
9843
10028
|
className: "input-field resize-none text-sm",
|
|
@@ -9847,7 +10032,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9847
10032
|
c.mode === "window" && /* @__PURE__ */ S($, {
|
|
9848
10033
|
label: t("settings.ctaTextLabel"),
|
|
9849
10034
|
children: /* @__PURE__ */ S("input", {
|
|
9850
|
-
value:
|
|
10035
|
+
value: I.ctaText ?? "",
|
|
9851
10036
|
onChange: (e) => P(D, { ctaText: e.target.value || void 0 }),
|
|
9852
10037
|
placeholder: c.ctaText ?? "Hi! How can I help you today?",
|
|
9853
10038
|
className: "input-field"
|
|
@@ -9861,10 +10046,10 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9861
10046
|
/* @__PURE__ */ S("div", {
|
|
9862
10047
|
className: "flex justify-between gap-2 px-6 py-4 border-t flex-shrink-0",
|
|
9863
10048
|
style: { borderColor: "var(--t-bg-border)" },
|
|
9864
|
-
children: h ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */
|
|
10049
|
+
children: h ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("button", {
|
|
9865
10050
|
onClick: () => g(!1),
|
|
9866
10051
|
className: "px-4 py-2 rounded-lg text-sm text-fg-secondary hover:text-fg-primary hover:bg-bg-surface2 transition-colors",
|
|
9867
|
-
children: "←
|
|
10052
|
+
children: ["← ", t("settings.back")]
|
|
9868
10053
|
}), /* @__PURE__ */ S("button", {
|
|
9869
10054
|
onClick: w,
|
|
9870
10055
|
className: "px-4 py-2 rounded-lg text-sm font-medium transition-colors",
|
|
@@ -9872,11 +10057,11 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9872
10057
|
background: "var(--t-accent)",
|
|
9873
10058
|
color: "var(--t-accent-fg)"
|
|
9874
10059
|
},
|
|
9875
|
-
children: _ ?
|
|
10060
|
+
children: _ ? `✓ ${t("settings.copied")}` : t("settings.copyToClipboard")
|
|
9876
10061
|
})] }) : /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("button", {
|
|
9877
10062
|
onClick: () => g(!0),
|
|
9878
10063
|
className: "px-4 py-2 rounded-lg text-sm text-fg-secondary hover:text-fg-primary hover:bg-bg-surface2 transition-colors",
|
|
9879
|
-
children: "
|
|
10064
|
+
children: t("settings.exportConfig")
|
|
9880
10065
|
}), /* @__PURE__ */ C("div", {
|
|
9881
10066
|
className: "flex gap-2",
|
|
9882
10067
|
children: [/* @__PURE__ */ S("button", {
|
|
@@ -9884,7 +10069,7 @@ useSettingsStore.getState().setLanguage(${JSON.stringify(i)})
|
|
|
9884
10069
|
className: "px-4 py-2 rounded-lg text-sm text-fg-secondary hover:text-fg-primary hover:bg-bg-surface2 transition-colors",
|
|
9885
10070
|
children: t("settings.cancel")
|
|
9886
10071
|
}), /* @__PURE__ */ S("button", {
|
|
9887
|
-
onClick:
|
|
10072
|
+
onClick: F,
|
|
9888
10073
|
className: "px-4 py-2 rounded-lg text-sm font-medium transition-colors",
|
|
9889
10074
|
style: {
|
|
9890
10075
|
background: "var(--t-accent)",
|
|
@@ -9917,7 +10102,7 @@ function $({ label: e, required: t, error: n, children: r }) {
|
|
|
9917
10102
|
]
|
|
9918
10103
|
});
|
|
9919
10104
|
}
|
|
9920
|
-
function
|
|
10105
|
+
function Qu({ label: e, checked: t, onChange: n }) {
|
|
9921
10106
|
return /* @__PURE__ */ C("label", {
|
|
9922
10107
|
className: "flex items-center gap-3 cursor-pointer select-none",
|
|
9923
10108
|
children: [/* @__PURE__ */ S("div", {
|
|
@@ -9934,44 +10119,28 @@ function ed({ label: e, checked: t, onChange: n }) {
|
|
|
9934
10119
|
})]
|
|
9935
10120
|
});
|
|
9936
10121
|
}
|
|
9937
|
-
function
|
|
9938
|
-
let { t: r } =
|
|
9939
|
-
if (!e.type.startsWith("image/")) {
|
|
9940
|
-
o(r("settings.avatarErrorType"));
|
|
9941
|
-
return;
|
|
9942
|
-
}
|
|
9943
|
-
if (e.size > Zu) {
|
|
9944
|
-
o(r("settings.avatarErrorSize"));
|
|
9945
|
-
return;
|
|
9946
|
-
}
|
|
9947
|
-
let n = new FileReader();
|
|
9948
|
-
n.onload = (e) => {
|
|
9949
|
-
let n = e.target?.result;
|
|
9950
|
-
typeof n == "string" && (t(n), o(""));
|
|
9951
|
-
}, n.readAsDataURL(e);
|
|
9952
|
-
};
|
|
10122
|
+
function $u({ value: e, onChange: t, shape: n }) {
|
|
10123
|
+
let { t: r } = Pe(), i = Eu(e), a = n === "circle" ? "rounded-full" : "rounded-lg";
|
|
9953
10124
|
return /* @__PURE__ */ C("div", {
|
|
9954
10125
|
className: "space-y-3",
|
|
9955
10126
|
children: [
|
|
9956
10127
|
/* @__PURE__ */ C("div", {
|
|
9957
10128
|
className: "flex items-center gap-3",
|
|
9958
10129
|
children: [/* @__PURE__ */ S("div", {
|
|
9959
|
-
className: `w-14 h-14 ${
|
|
10130
|
+
className: `w-14 h-14 ${a} overflow-hidden flex items-center justify-center text-xs`,
|
|
9960
10131
|
style: {
|
|
9961
10132
|
background: "var(--t-bg-surface2)",
|
|
9962
10133
|
color: "var(--t-fg-muted)",
|
|
9963
10134
|
border: "1px solid var(--t-bg-border)"
|
|
9964
10135
|
},
|
|
9965
|
-
children:
|
|
9966
|
-
src:
|
|
10136
|
+
children: i ? /* @__PURE__ */ S("img", {
|
|
10137
|
+
src: i,
|
|
9967
10138
|
alt: "",
|
|
9968
10139
|
className: "w-full h-full object-cover"
|
|
9969
10140
|
}) : r("settings.avatarNone")
|
|
9970
10141
|
}), e && /* @__PURE__ */ S("button", {
|
|
9971
10142
|
type: "button",
|
|
9972
|
-
onClick: () =>
|
|
9973
|
-
t(void 0), o("");
|
|
9974
|
-
},
|
|
10143
|
+
onClick: () => t(void 0),
|
|
9975
10144
|
className: "px-2 py-1 rounded-lg text-xs text-fg-muted hover:text-fg-primary hover:bg-bg-surface2 transition-colors",
|
|
9976
10145
|
children: r("settings.avatarClear")
|
|
9977
10146
|
})]
|
|
@@ -9982,10 +10151,8 @@ function td({ value: e, onChange: t, shape: n }) {
|
|
|
9982
10151
|
let r = e === n;
|
|
9983
10152
|
return /* @__PURE__ */ S("button", {
|
|
9984
10153
|
type: "button",
|
|
9985
|
-
onClick: () =>
|
|
9986
|
-
|
|
9987
|
-
},
|
|
9988
|
-
className: `${c} overflow-hidden transition-transform hover:scale-105`,
|
|
10154
|
+
onClick: () => t(n),
|
|
10155
|
+
className: `${a} overflow-hidden transition-transform hover:scale-105`,
|
|
9989
10156
|
style: {
|
|
9990
10157
|
outline: r ? "2px solid var(--t-accent)" : "1px solid var(--t-bg-border)",
|
|
9991
10158
|
outlineOffset: r ? "1px" : "0"
|
|
@@ -9999,50 +10166,21 @@ function td({ value: e, onChange: t, shape: n }) {
|
|
|
9999
10166
|
}, n);
|
|
10000
10167
|
})
|
|
10001
10168
|
}),
|
|
10002
|
-
/* @__PURE__ */
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
background: "var(--t-bg-surface2)",
|
|
10011
|
-
color: "var(--t-fg-secondary)"
|
|
10012
|
-
},
|
|
10013
|
-
children: r("settings.avatarUpload")
|
|
10014
|
-
}),
|
|
10015
|
-
/* @__PURE__ */ S("input", {
|
|
10016
|
-
ref: i,
|
|
10017
|
-
type: "file",
|
|
10018
|
-
accept: "image/*",
|
|
10019
|
-
className: "hidden",
|
|
10020
|
-
onChange: (e) => {
|
|
10021
|
-
let t = e.target.files?.[0];
|
|
10022
|
-
t && l(t), e.target.value = "";
|
|
10023
|
-
}
|
|
10024
|
-
}),
|
|
10025
|
-
/* @__PURE__ */ S("input", {
|
|
10026
|
-
type: "url",
|
|
10027
|
-
placeholder: r("settings.avatarUrlPlaceholder"),
|
|
10028
|
-
value: e && !(e in wu) && !e.startsWith("data:") ? e : "",
|
|
10029
|
-
onChange: (e) => {
|
|
10030
|
-
t(e.target.value.trim() || void 0), o("");
|
|
10031
|
-
},
|
|
10032
|
-
className: "input-field flex-1 text-xs"
|
|
10033
|
-
})
|
|
10034
|
-
]
|
|
10035
|
-
}),
|
|
10036
|
-
a && /* @__PURE__ */ S("p", {
|
|
10037
|
-
className: "text-xs text-red-400",
|
|
10038
|
-
children: a
|
|
10169
|
+
/* @__PURE__ */ S("input", {
|
|
10170
|
+
type: "url",
|
|
10171
|
+
placeholder: r("settings.avatarUrlPlaceholder"),
|
|
10172
|
+
value: e && !(e in wu) && !e.startsWith("data:") ? e : "",
|
|
10173
|
+
onChange: (e) => {
|
|
10174
|
+
t(e.target.value.trim() || void 0);
|
|
10175
|
+
},
|
|
10176
|
+
className: "input-field w-full text-xs"
|
|
10039
10177
|
})
|
|
10040
10178
|
]
|
|
10041
10179
|
});
|
|
10042
10180
|
}
|
|
10043
10181
|
//#endregion
|
|
10044
10182
|
//#region src/components/CtaPopup.tsx
|
|
10045
|
-
function
|
|
10183
|
+
function ed({ text: e, onDismiss: t }) {
|
|
10046
10184
|
return /* @__PURE__ */ C("div", {
|
|
10047
10185
|
className: "absolute bottom-2 right-0 mb-2 w-64 cta-bubble rounded-2xl px-4 py-3 shadow-xl text-sm",
|
|
10048
10186
|
style: {
|
|
@@ -10052,55 +10190,56 @@ function nd({ text: e, onDismiss: t }) {
|
|
|
10052
10190
|
},
|
|
10053
10191
|
children: [/* @__PURE__ */ S("button", {
|
|
10054
10192
|
onClick: t,
|
|
10055
|
-
className: "absolute top-2 right-2 w-5 h-5 rounded-full flex items-center justify-center text-fg-muted hover:text-fg-primary transition-colors text-base leading-none",
|
|
10193
|
+
className: "absolute top-1/2 -translate-y-1/2 right-2 w-5 h-5 rounded-full flex items-center justify-center text-fg-muted hover:text-fg-primary transition-colors text-base leading-none",
|
|
10056
10194
|
"aria-label": "Dismiss",
|
|
10057
10195
|
children: "×"
|
|
10058
10196
|
}), /* @__PURE__ */ S("p", {
|
|
10059
|
-
className: "pr-5 leading-snug",
|
|
10197
|
+
className: "pr-5 leading-snug whitespace-pre-line",
|
|
10060
10198
|
children: e
|
|
10061
10199
|
})]
|
|
10062
10200
|
});
|
|
10063
10201
|
}
|
|
10064
10202
|
//#endregion
|
|
10065
10203
|
//#region src/App.tsx
|
|
10066
|
-
function
|
|
10204
|
+
function td() {
|
|
10067
10205
|
let e = "(min-width: 768px) and (min-height: 600px)", [t, n] = y(() => window.matchMedia(e).matches);
|
|
10068
10206
|
return g(() => {
|
|
10069
10207
|
let t = window.matchMedia(e), r = () => n(t.matches);
|
|
10070
10208
|
return t.addEventListener("change", r), () => t.removeEventListener("change", r);
|
|
10071
10209
|
}, []), t;
|
|
10072
10210
|
}
|
|
10073
|
-
function
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
|
|
10211
|
+
function nd() {
|
|
10212
|
+
let e = v(null);
|
|
10213
|
+
Fe({ elementRef: e }), Re();
|
|
10214
|
+
let t = o((e) => e.config), n = s((e) => e.activeSessionId), r = s((e) => e.createSession), [i, a] = y(!1), [c, l] = y(!1), u = o((e) => e.language), d = td(), f = t.mode === "window" || t.mode === "mixed" && d, [p, m] = y(!1), h = !f, _ = t.hideSettings ?? !1, { showCta: b, ctaText: w, dismiss: T } = Le(t, u, !0), E = () => {
|
|
10215
|
+
_ || a(!0);
|
|
10077
10216
|
};
|
|
10078
10217
|
g(() => {
|
|
10079
|
-
|
|
10080
|
-
}, [
|
|
10081
|
-
let
|
|
10082
|
-
|
|
10083
|
-
},
|
|
10218
|
+
n || r();
|
|
10219
|
+
}, [n, r]);
|
|
10220
|
+
let D = () => m(!1), O = () => {
|
|
10221
|
+
T(), m(!0);
|
|
10222
|
+
}, k = /* @__PURE__ */ C("div", {
|
|
10084
10223
|
className: "flex h-full w-full",
|
|
10085
10224
|
style: { background: "var(--t-bg-base)" },
|
|
10086
10225
|
children: [
|
|
10087
|
-
|
|
10226
|
+
c && h && /* @__PURE__ */ S("div", {
|
|
10088
10227
|
className: "fixed inset-0 z-30 bg-black/50 md:hidden",
|
|
10089
|
-
onClick: () =>
|
|
10228
|
+
onClick: () => l(!1)
|
|
10090
10229
|
}),
|
|
10091
10230
|
h && /* @__PURE__ */ S("div", {
|
|
10092
10231
|
className: `
|
|
10093
10232
|
fixed md:relative inset-y-0 left-0 z-40
|
|
10094
10233
|
transition-transform md:translate-x-0
|
|
10095
|
-
${
|
|
10234
|
+
${c ? "translate-x-0" : "-translate-x-full"}
|
|
10096
10235
|
`,
|
|
10097
|
-
children: /* @__PURE__ */ S(
|
|
10236
|
+
children: /* @__PURE__ */ S(ze, { onOpenSettings: E })
|
|
10098
10237
|
}),
|
|
10099
10238
|
/* @__PURE__ */ C("div", {
|
|
10100
10239
|
className: "flex-1 flex flex-col min-w-0 h-full",
|
|
10101
10240
|
children: [h && /* @__PURE__ */ S("button", {
|
|
10102
10241
|
className: "md:hidden absolute top-3 left-3 z-20 w-8 h-8 flex items-center justify-center text-fg-secondary",
|
|
10103
|
-
onClick: () =>
|
|
10242
|
+
onClick: () => l((e) => !e),
|
|
10104
10243
|
children: /* @__PURE__ */ S("svg", {
|
|
10105
10244
|
width: "20",
|
|
10106
10245
|
height: "20",
|
|
@@ -10110,81 +10249,91 @@ function id() {
|
|
|
10110
10249
|
strokeWidth: "2",
|
|
10111
10250
|
children: /* @__PURE__ */ S("path", { d: "M3 12h18M3 6h18M3 18h18" })
|
|
10112
10251
|
})
|
|
10113
|
-
}), /* @__PURE__ */ S(
|
|
10114
|
-
onOpenSettings:
|
|
10115
|
-
onClose:
|
|
10252
|
+
}), /* @__PURE__ */ S(Gu, {
|
|
10253
|
+
onOpenSettings: E,
|
|
10254
|
+
onClose: D
|
|
10116
10255
|
})]
|
|
10117
10256
|
})
|
|
10118
10257
|
]
|
|
10119
10258
|
});
|
|
10120
|
-
if (
|
|
10121
|
-
|
|
10122
|
-
|
|
10259
|
+
if (f) return /* @__PURE__ */ C("div", {
|
|
10260
|
+
className: "chat-ui",
|
|
10261
|
+
ref: e,
|
|
10262
|
+
children: [
|
|
10263
|
+
p && /* @__PURE__ */ S("div", {
|
|
10264
|
+
className: "fixed bottom-4 right-4 z-50 w-[380px] rounded-2xl shadow-2xl overflow-hidden flex flex-col",
|
|
10265
|
+
style: {
|
|
10266
|
+
border: "1px solid var(--t-bg-border)",
|
|
10267
|
+
background: "var(--t-bg-base)",
|
|
10268
|
+
height: "min(560px, calc(100vh - 32px))"
|
|
10269
|
+
},
|
|
10270
|
+
children: /* @__PURE__ */ S(Gu, {
|
|
10271
|
+
onOpenSettings: E,
|
|
10272
|
+
onClose: D
|
|
10273
|
+
})
|
|
10274
|
+
}),
|
|
10275
|
+
b && !p && /* @__PURE__ */ S("div", {
|
|
10276
|
+
className: "fixed bottom-20 right-4 z-50",
|
|
10277
|
+
children: /* @__PURE__ */ S(ed, {
|
|
10278
|
+
text: w,
|
|
10279
|
+
onDismiss: T
|
|
10280
|
+
})
|
|
10281
|
+
}),
|
|
10282
|
+
!p && /* @__PURE__ */ S(rd, {
|
|
10283
|
+
open: !1,
|
|
10284
|
+
iconSrc: Eu(t.toggleButtonIcon),
|
|
10285
|
+
onClick: O
|
|
10286
|
+
}),
|
|
10287
|
+
!_ && i && /* @__PURE__ */ S(Zu, { onClose: () => a(!1) })
|
|
10288
|
+
]
|
|
10289
|
+
});
|
|
10290
|
+
let A = t.fullscreenSheetHeight ?? "75vh", j = t.fullscreenSheet === !0;
|
|
10291
|
+
return /* @__PURE__ */ C("div", {
|
|
10292
|
+
className: "chat-ui",
|
|
10293
|
+
ref: e,
|
|
10294
|
+
children: [p ? j ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
|
|
10295
|
+
className: "fixed inset-0 z-40 pointer-events-none",
|
|
10296
|
+
style: { background: "rgba(0, 0, 0, 0.4)" }
|
|
10297
|
+
}), /* @__PURE__ */ C("div", {
|
|
10298
|
+
className: "fixed inset-x-0 bottom-0 z-50 flex flex-col overflow-hidden",
|
|
10123
10299
|
style: {
|
|
10124
|
-
|
|
10300
|
+
height: A,
|
|
10301
|
+
borderTopLeftRadius: "20px",
|
|
10302
|
+
borderTopRightRadius: "20px",
|
|
10125
10303
|
background: "var(--t-bg-base)",
|
|
10126
|
-
|
|
10304
|
+
boxShadow: "0 -8px 32px rgba(0, 0, 0, 0.18)"
|
|
10127
10305
|
},
|
|
10128
|
-
children: /* @__PURE__ */ S(
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10306
|
+
children: [/* @__PURE__ */ S("div", {
|
|
10307
|
+
className: "flex justify-center pt-2 pb-1 flex-shrink-0",
|
|
10308
|
+
children: /* @__PURE__ */ S("div", {
|
|
10309
|
+
className: "w-10 h-1 rounded-full",
|
|
10310
|
+
style: { background: "var(--t-bg-border)" }
|
|
10311
|
+
})
|
|
10312
|
+
}), /* @__PURE__ */ S("div", {
|
|
10313
|
+
className: "flex-1 min-h-0",
|
|
10314
|
+
children: k
|
|
10315
|
+
})]
|
|
10316
|
+
})] }) : /* @__PURE__ */ S("div", {
|
|
10317
|
+
className: "fixed inset-0 z-50",
|
|
10318
|
+
children: k
|
|
10319
|
+
}) : /* @__PURE__ */ C(x, { children: [b && /* @__PURE__ */ S("div", {
|
|
10134
10320
|
className: "fixed bottom-20 right-4 z-50",
|
|
10135
|
-
children: /* @__PURE__ */ S(
|
|
10136
|
-
text:
|
|
10137
|
-
onDismiss:
|
|
10321
|
+
children: /* @__PURE__ */ S(ed, {
|
|
10322
|
+
text: w,
|
|
10323
|
+
onDismiss: T
|
|
10138
10324
|
})
|
|
10139
|
-
}),
|
|
10140
|
-
!p && /* @__PURE__ */ S(ad, {
|
|
10325
|
+
}), /* @__PURE__ */ S(rd, {
|
|
10141
10326
|
open: !1,
|
|
10142
|
-
iconSrc: Eu(
|
|
10143
|
-
onClick:
|
|
10144
|
-
}),
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
className: "fixed inset-0 z-30",
|
|
10149
|
-
children: O
|
|
10150
|
-
}), !_ && r && /* @__PURE__ */ S($u, { onClose: () => i(!1) })] });
|
|
10151
|
-
let k = e.fullscreenSheetHeight ?? "75vh", A = e.fullscreenSheet === !0;
|
|
10152
|
-
return /* @__PURE__ */ C(x, { children: [p ? A ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("div", {
|
|
10153
|
-
className: "fixed inset-0 z-40 pointer-events-none",
|
|
10154
|
-
style: { background: "rgba(0, 0, 0, 0.4)" }
|
|
10155
|
-
}), /* @__PURE__ */ C("div", {
|
|
10156
|
-
className: "fixed inset-x-0 bottom-0 z-50 flex flex-col overflow-hidden",
|
|
10157
|
-
style: {
|
|
10158
|
-
height: k,
|
|
10159
|
-
borderTopLeftRadius: "20px",
|
|
10160
|
-
borderTopRightRadius: "20px",
|
|
10161
|
-
background: "var(--t-bg-base)",
|
|
10162
|
-
boxShadow: "0 -8px 32px rgba(0, 0, 0, 0.18)"
|
|
10163
|
-
},
|
|
10164
|
-
children: [/* @__PURE__ */ S("div", {
|
|
10165
|
-
className: "flex justify-center pt-2 pb-1 flex-shrink-0",
|
|
10166
|
-
children: /* @__PURE__ */ S("div", {
|
|
10167
|
-
className: "w-10 h-1 rounded-full",
|
|
10168
|
-
style: { background: "var(--t-bg-border)" }
|
|
10169
|
-
})
|
|
10170
|
-
}), /* @__PURE__ */ S("div", {
|
|
10171
|
-
className: "flex-1 min-h-0",
|
|
10172
|
-
children: O
|
|
10173
|
-
})]
|
|
10174
|
-
})] }) : /* @__PURE__ */ S("div", {
|
|
10175
|
-
className: "fixed inset-0 z-50",
|
|
10176
|
-
children: O
|
|
10177
|
-
}) : /* @__PURE__ */ S(ad, {
|
|
10178
|
-
open: !1,
|
|
10179
|
-
iconSrc: Eu(e.toggleButtonIcon),
|
|
10180
|
-
onClick: D
|
|
10181
|
-
}), !_ && r && /* @__PURE__ */ S($u, { onClose: () => i(!1) })] });
|
|
10182
|
-
}
|
|
10183
|
-
function ad({ open: e, iconSrc: t, onClick: n }) {
|
|
10327
|
+
iconSrc: Eu(t.toggleButtonIcon),
|
|
10328
|
+
onClick: O
|
|
10329
|
+
})] }), !_ && i && /* @__PURE__ */ S(Zu, { onClose: () => a(!1) })]
|
|
10330
|
+
});
|
|
10331
|
+
}
|
|
10332
|
+
function rd({ open: e, iconSrc: t, onClick: n }) {
|
|
10184
10333
|
return /* @__PURE__ */ S("button", {
|
|
10185
10334
|
className: "fixed bottom-4 right-4 z-50 w-14 h-14 rounded-full shadow-lg flex items-center justify-center transition-transform hover:scale-105 overflow-hidden",
|
|
10186
10335
|
style: {
|
|
10187
|
-
background: "var(--t-
|
|
10336
|
+
background: "var(--t-chatbutton-bg)",
|
|
10188
10337
|
color: "var(--t-accent-fg)"
|
|
10189
10338
|
},
|
|
10190
10339
|
onClick: n,
|
|
@@ -10214,17 +10363,17 @@ function ad({ open: e, iconSrc: t, onClick: n }) {
|
|
|
10214
10363
|
}
|
|
10215
10364
|
//#endregion
|
|
10216
10365
|
//#region src/createChat.ts
|
|
10217
|
-
function
|
|
10366
|
+
function id(e) {
|
|
10218
10367
|
let { target: t, language: n, ...r } = e, i = typeof t == "string" ? document.querySelector(t) : t;
|
|
10219
10368
|
if (!i) throw Error(`[chatui] createChat: target "${String(t)}" not found`);
|
|
10220
10369
|
let a = o.getState();
|
|
10221
10370
|
a.setConfig(r), r.theme && a.setTheme(r.theme), n && a.setLanguage(n);
|
|
10222
10371
|
let s = w(i);
|
|
10223
|
-
return s.render(f(
|
|
10372
|
+
return s.render(f(nd)), { unmount() {
|
|
10224
10373
|
s.unmount();
|
|
10225
10374
|
} };
|
|
10226
10375
|
}
|
|
10227
10376
|
//#endregion
|
|
10228
|
-
export {
|
|
10377
|
+
export { nd as App, id as createChat };
|
|
10229
10378
|
|
|
10230
10379
|
//# sourceMappingURL=index.js.map
|