@farris/x-ui 0.3.0 → 0.3.1
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/agent-thinking/index.d.ts +1 -0
- package/agent-thinking/src/agent-thinking.component.d.ts +16 -8
- package/agent-thinking/src/agent-thinking.props.d.ts +15 -0
- package/agent-thinking/src/types.d.ts +9 -0
- package/farris.x-ui.esm.js +787 -706
- package/farris.x-ui.umd.cjs +33 -33
- package/index.css +1 -1
- package/markdown/src/markdown.component.d.ts +12 -1
- package/markdown/src/markdown.props.d.ts +4 -0
- package/package.json +1 -1
package/farris.x-ui.esm.js
CHANGED
|
@@ -292,7 +292,7 @@ function hc(e, t, n, u = {}) {
|
|
|
292
292
|
f(), r.value = {}, a.clear();
|
|
293
293
|
}, h = () => {
|
|
294
294
|
f(), r.value = {}, a.clear();
|
|
295
|
-
},
|
|
295
|
+
}, m = () => {
|
|
296
296
|
const p = e();
|
|
297
297
|
if (!p || Object.keys(p).length === 0) {
|
|
298
298
|
r.value = {};
|
|
@@ -310,13 +310,13 @@ function hc(e, t, n, u = {}) {
|
|
|
310
310
|
if (x.length === 0)
|
|
311
311
|
return;
|
|
312
312
|
let v = 0;
|
|
313
|
-
const
|
|
313
|
+
const g = () => {
|
|
314
314
|
var S;
|
|
315
315
|
if (v >= x.length)
|
|
316
316
|
return;
|
|
317
317
|
const b = x[v], y = p[b];
|
|
318
318
|
if (!y) {
|
|
319
|
-
a.add(b), v++,
|
|
319
|
+
a.add(b), v++, g();
|
|
320
320
|
return;
|
|
321
321
|
}
|
|
322
322
|
let k = ((S = r.value[b]) == null ? void 0 : S.length) || 0;
|
|
@@ -324,30 +324,30 @@ function hc(e, t, n, u = {}) {
|
|
|
324
324
|
k < y.length ? (r.value = {
|
|
325
325
|
...r.value,
|
|
326
326
|
[b]: y.slice(0, k + 1)
|
|
327
|
-
}, k++) : (clearInterval(F), o = o.filter((_) => _ !== F), a.add(b), v++,
|
|
327
|
+
}, k++) : (clearInterval(F), o = o.filter((_) => _ !== F), a.add(b), v++, g());
|
|
328
328
|
}, i);
|
|
329
329
|
o.push(F);
|
|
330
330
|
};
|
|
331
|
-
|
|
331
|
+
g();
|
|
332
332
|
};
|
|
333
333
|
return oe(
|
|
334
334
|
() => e(),
|
|
335
335
|
() => {
|
|
336
|
-
s() &&
|
|
336
|
+
s() && m();
|
|
337
337
|
},
|
|
338
338
|
{ immediate: !0 }
|
|
339
339
|
), oe(
|
|
340
340
|
n,
|
|
341
341
|
() => {
|
|
342
|
-
h(), s() &&
|
|
342
|
+
h(), s() && m();
|
|
343
343
|
}
|
|
344
344
|
), oe(
|
|
345
345
|
t,
|
|
346
346
|
(p) => {
|
|
347
|
-
p ?
|
|
347
|
+
p ? m() : l();
|
|
348
348
|
}
|
|
349
349
|
), Ie(() => {
|
|
350
|
-
s() &&
|
|
350
|
+
s() && m();
|
|
351
351
|
}), {
|
|
352
352
|
displayContent: r
|
|
353
353
|
};
|
|
@@ -380,7 +380,7 @@ function oo() {
|
|
|
380
380
|
}), t.length = 0, n.value = null;
|
|
381
381
|
}, h = (p, w) => {
|
|
382
382
|
if (e[p]) {
|
|
383
|
-
|
|
383
|
+
m(p, w);
|
|
384
384
|
return;
|
|
385
385
|
}
|
|
386
386
|
t.push(p), e[p] = {
|
|
@@ -389,7 +389,7 @@ function oo() {
|
|
|
389
389
|
isStreaming: !1,
|
|
390
390
|
displayedValue: ""
|
|
391
391
|
}, u || (!n.value || n.value === p) && f();
|
|
392
|
-
},
|
|
392
|
+
}, m = (p, w) => {
|
|
393
393
|
const x = e[p];
|
|
394
394
|
if (!x) {
|
|
395
395
|
h(p, w);
|
|
@@ -409,7 +409,7 @@ function oo() {
|
|
|
409
409
|
startStreaming: f,
|
|
410
410
|
reset: l,
|
|
411
411
|
registerProperty: h,
|
|
412
|
-
updatePropertyValue:
|
|
412
|
+
updatePropertyValue: m
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
415
|
function gs() {
|
|
@@ -589,7 +589,7 @@ function Ac() {
|
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function gn({
|
|
593
593
|
status: e,
|
|
594
594
|
variant: t = ""
|
|
595
595
|
}) {
|
|
@@ -619,18 +619,18 @@ const vs = /* @__PURE__ */ ie({
|
|
|
619
619
|
"f-chat-bubble-attachment-name": !0,
|
|
620
620
|
"name-tip": e.enableFixedWidth
|
|
621
621
|
}));
|
|
622
|
-
function f(v,
|
|
623
|
-
|
|
622
|
+
function f(v, g) {
|
|
623
|
+
g.pending || t.emit("preview", g);
|
|
624
624
|
}
|
|
625
|
-
async function l(v,
|
|
625
|
+
async function l(v, g) {
|
|
626
626
|
v.stopPropagation(), v.preventDefault();
|
|
627
|
-
const b = su(
|
|
628
|
-
b && await ro(b,
|
|
627
|
+
const b = su(g);
|
|
628
|
+
b && await ro(b, g.name);
|
|
629
629
|
}
|
|
630
630
|
function h(v) {
|
|
631
631
|
v.stopPropagation(), v.preventDefault(), t.emit("batchPreview", n.value);
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function m(v) {
|
|
634
634
|
switch (v.toLowerCase()) {
|
|
635
635
|
case "doc":
|
|
636
636
|
case "docx":
|
|
@@ -657,7 +657,7 @@ const vs = /* @__PURE__ */ ie({
|
|
|
657
657
|
}
|
|
658
658
|
function p(v) {
|
|
659
659
|
if (!v) return null;
|
|
660
|
-
const
|
|
660
|
+
const g = m(v.type);
|
|
661
661
|
return d("div", {
|
|
662
662
|
class: "file-info f-utils-fill"
|
|
663
663
|
}, [d("span", {
|
|
@@ -667,20 +667,20 @@ const vs = /* @__PURE__ */ ie({
|
|
|
667
667
|
class: "file-info-footer"
|
|
668
668
|
}, [d("span", {
|
|
669
669
|
class: `file-icon ${a(v.type)}`
|
|
670
|
-
}, null),
|
|
670
|
+
}, null), g && d(Ve, null, [d("span", {
|
|
671
671
|
class: "file-type"
|
|
672
|
-
}, [
|
|
672
|
+
}, [m(v.type)])]), v.size && d(Ve, null, [d("div", {
|
|
673
673
|
class: "file-info-divider"
|
|
674
674
|
}, null), de(" "), d("span", {
|
|
675
675
|
class: "file-size"
|
|
676
676
|
}, [r(v.size)])])])]);
|
|
677
677
|
}
|
|
678
|
-
function w(v,
|
|
678
|
+
function w(v, g) {
|
|
679
679
|
console.log("attachment" + v.pending);
|
|
680
680
|
const b = su(v);
|
|
681
681
|
return d("div", {
|
|
682
682
|
class: "f-chat-bubble-attachment-item " + a(v.type, "attachment-type-") + (v.pending ? " status-working" : ""),
|
|
683
|
-
key:
|
|
683
|
+
key: g,
|
|
684
684
|
onClick: (y) => f(y, v)
|
|
685
685
|
}, [d("div", {
|
|
686
686
|
class: "f-chat-bubble-attachment-main",
|
|
@@ -694,7 +694,7 @@ const vs = /* @__PURE__ */ ie({
|
|
|
694
694
|
title: v.name
|
|
695
695
|
}, [i(v.name)]), v.pending === !0 && d("div", {
|
|
696
696
|
class: "f-chat-bubble-attachment-status status-working"
|
|
697
|
-
}, [d(
|
|
697
|
+
}, [d(gn, {
|
|
698
698
|
status: "Working",
|
|
699
699
|
variant: "attachment"
|
|
700
700
|
}, null), de(" 生成中")]), v.timestamp ? d("span", {
|
|
@@ -710,10 +710,10 @@ const vs = /* @__PURE__ */ ie({
|
|
|
710
710
|
"aria-hidden": "true"
|
|
711
711
|
}, null)]) : null]);
|
|
712
712
|
}
|
|
713
|
-
function x(v,
|
|
713
|
+
function x(v, g) {
|
|
714
714
|
return d("div", {
|
|
715
715
|
class: "f-chat-bubble-attachment-toast",
|
|
716
|
-
key:
|
|
716
|
+
key: g
|
|
717
717
|
}, [p(v)]);
|
|
718
718
|
}
|
|
719
719
|
return () => u.value ? d("div", {
|
|
@@ -721,7 +721,7 @@ const vs = /* @__PURE__ */ ie({
|
|
|
721
721
|
"f-chat-bubble-attachments": !0,
|
|
722
722
|
"attachments-toast": e.role === "user"
|
|
723
723
|
}
|
|
724
|
-
}, [n.value.map((v,
|
|
724
|
+
}, [n.value.map((v, g) => e.role === "user" ? x(v, g) : w(v, g)), e.enableBatchPreview && d("div", {
|
|
725
725
|
class: "f-chat-bubble-attachment-preview-btn",
|
|
726
726
|
onClick: h
|
|
727
727
|
}, [d("span", {
|
|
@@ -1267,16 +1267,16 @@ yr.prototype.parse = function(e, t) {
|
|
|
1267
1267
|
c === -1 && (c = r.length), r[c - 1] === ":" && c--;
|
|
1268
1268
|
const h = r.slice(0, c);
|
|
1269
1269
|
r = r.slice(c), this.parseHost(h), this.hostname = this.hostname || "";
|
|
1270
|
-
const
|
|
1271
|
-
if (!
|
|
1270
|
+
const m = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
1271
|
+
if (!m) {
|
|
1272
1272
|
const p = this.hostname.split(/\./);
|
|
1273
1273
|
for (let w = 0, x = p.length; w < x; w++) {
|
|
1274
1274
|
const v = p[w];
|
|
1275
1275
|
if (v && !v.match(Yo)) {
|
|
1276
|
-
let
|
|
1276
|
+
let g = "";
|
|
1277
1277
|
for (let b = 0, y = v.length; b < y; b++)
|
|
1278
|
-
v.charCodeAt(b) > 127 ?
|
|
1279
|
-
if (!
|
|
1278
|
+
v.charCodeAt(b) > 127 ? g += "x" : g += v[b];
|
|
1279
|
+
if (!g.match(Yo)) {
|
|
1280
1280
|
const b = p.slice(0, w), y = p.slice(w + 1), k = v.match(n0);
|
|
1281
1281
|
k && (b.push(k[1]), y.unshift(k[2])), y.length && (r = y.join(".") + r), this.hostname = b.join(".");
|
|
1282
1282
|
break;
|
|
@@ -1284,7 +1284,7 @@ yr.prototype.parse = function(e, t) {
|
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
this.hostname.length > t0 && (this.hostname = ""),
|
|
1287
|
+
this.hostname.length > t0 && (this.hostname = ""), m && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
1288
1288
|
}
|
|
1289
1289
|
const a = r.indexOf("#");
|
|
1290
1290
|
a !== -1 && (this.hash = r.substr(a), r = r.slice(0, a));
|
|
@@ -2166,27 +2166,27 @@ function V0(e) {
|
|
|
2166
2166
|
const f = [];
|
|
2167
2167
|
let l = a.level, h = 0;
|
|
2168
2168
|
c.length > 0 && c[0].index === 0 && o > 0 && i[o - 1].type === "text_special" && (c = c.slice(1));
|
|
2169
|
-
for (let
|
|
2170
|
-
const p = c[
|
|
2169
|
+
for (let m = 0; m < c.length; m++) {
|
|
2170
|
+
const p = c[m].url, w = e.md.normalizeLink(p);
|
|
2171
2171
|
if (!e.md.validateLink(w))
|
|
2172
2172
|
continue;
|
|
2173
|
-
let x = c[
|
|
2174
|
-
c[
|
|
2175
|
-
const v = c[
|
|
2173
|
+
let x = c[m].text;
|
|
2174
|
+
c[m].schema ? c[m].schema === "mailto:" && !/^mailto:/i.test(x) ? x = e.md.normalizeLinkText("mailto:" + x).replace(/^mailto:/, "") : x = e.md.normalizeLinkText(x) : x = e.md.normalizeLinkText("http://" + x).replace(/^http:\/\//, "");
|
|
2175
|
+
const v = c[m].index;
|
|
2176
2176
|
if (v > h) {
|
|
2177
2177
|
const k = new e.Token("text", "", 0);
|
|
2178
2178
|
k.content = s.slice(h, v), k.level = l, f.push(k);
|
|
2179
2179
|
}
|
|
2180
|
-
const
|
|
2181
|
-
|
|
2180
|
+
const g = new e.Token("link_open", "a", 1);
|
|
2181
|
+
g.attrs = [["href", w]], g.level = l++, g.markup = "linkify", g.info = "auto", f.push(g);
|
|
2182
2182
|
const b = new e.Token("text", "", 0);
|
|
2183
2183
|
b.content = x, b.level = l, f.push(b);
|
|
2184
2184
|
const y = new e.Token("link_close", "a", -1);
|
|
2185
|
-
y.level = --l, y.markup = "linkify", y.info = "auto", f.push(y), h = c[
|
|
2185
|
+
y.level = --l, y.markup = "linkify", y.info = "auto", f.push(y), h = c[m].lastIndex;
|
|
2186
2186
|
}
|
|
2187
2187
|
if (h < s.length) {
|
|
2188
|
-
const
|
|
2189
|
-
|
|
2188
|
+
const m = new e.Token("text", "", 0);
|
|
2189
|
+
m.content = s.slice(h), m.level = l, f.push(m);
|
|
2190
2190
|
}
|
|
2191
2191
|
t[n].children = i = Ls(i, o, f);
|
|
2192
2192
|
}
|
|
@@ -2243,7 +2243,7 @@ function ed(e, t) {
|
|
|
2243
2243
|
break;
|
|
2244
2244
|
let l = !0, h = !0;
|
|
2245
2245
|
s = f.index + 1;
|
|
2246
|
-
const
|
|
2246
|
+
const m = f[0] === "'";
|
|
2247
2247
|
let p = 32;
|
|
2248
2248
|
if (f.index - 1 >= 0)
|
|
2249
2249
|
p = a.charCodeAt(f.index - 1);
|
|
@@ -2262,9 +2262,9 @@ function ed(e, t) {
|
|
|
2262
2262
|
w = e[n].content.charCodeAt(0);
|
|
2263
2263
|
break;
|
|
2264
2264
|
}
|
|
2265
|
-
const x = fu(p) || du(String.fromCharCode(p)), v = fu(w) || du(String.fromCharCode(w)),
|
|
2266
|
-
if (b ? l = !1 : v && (
|
|
2267
|
-
|
|
2265
|
+
const x = fu(p) || du(String.fromCharCode(p)), v = fu(w) || du(String.fromCharCode(w)), g = cu(p), b = cu(w);
|
|
2266
|
+
if (b ? l = !1 : v && (g || x || (l = !1)), g ? h = !1 : x && (b || v || (h = !1)), w === 34 && f[0] === '"' && p >= 48 && p <= 57 && (h = l = !1), l && h && (l = x, h = v), !l && !h) {
|
|
2267
|
+
m && (r.content = Lu(r.content, f.index, ea));
|
|
2268
2268
|
continue;
|
|
2269
2269
|
}
|
|
2270
2270
|
if (h)
|
|
@@ -2272,10 +2272,10 @@ function ed(e, t) {
|
|
|
2272
2272
|
let y = u[n];
|
|
2273
2273
|
if (u[n].level < o)
|
|
2274
2274
|
break;
|
|
2275
|
-
if (y.single ===
|
|
2275
|
+
if (y.single === m && u[n].level === o) {
|
|
2276
2276
|
y = u[n];
|
|
2277
2277
|
let k, F;
|
|
2278
|
-
|
|
2278
|
+
m ? (k = t.md.options.quotes[2], F = t.md.options.quotes[3]) : (k = t.md.options.quotes[0], F = t.md.options.quotes[1]), r.content = Lu(r.content, f.index, F), e[y.token].content = Lu(
|
|
2279
2279
|
e[y.token].content,
|
|
2280
2280
|
y.pos,
|
|
2281
2281
|
k
|
|
@@ -2286,9 +2286,9 @@ function ed(e, t) {
|
|
|
2286
2286
|
l ? u.push({
|
|
2287
2287
|
token: i,
|
|
2288
2288
|
pos: f.index,
|
|
2289
|
-
single:
|
|
2289
|
+
single: m,
|
|
2290
2290
|
level: o
|
|
2291
|
-
}) : h &&
|
|
2291
|
+
}) : h && m && (r.content = Lu(r.content, f.index, ea));
|
|
2292
2292
|
}
|
|
2293
2293
|
}
|
|
2294
2294
|
}
|
|
@@ -2467,7 +2467,7 @@ function rd(e, t, n, u) {
|
|
|
2467
2467
|
return !0;
|
|
2468
2468
|
const h = e.parentType;
|
|
2469
2469
|
e.parentType = "table";
|
|
2470
|
-
const
|
|
2470
|
+
const m = e.md.block.ruler.getRules("blockquote"), p = e.push("table_open", "table", 1), w = [t, 0];
|
|
2471
2471
|
p.map = w;
|
|
2472
2472
|
const x = e.push("thead_open", "thead", 1);
|
|
2473
2473
|
x.map = [t, t + 1];
|
|
@@ -2480,11 +2480,11 @@ function rd(e, t, n, u) {
|
|
|
2480
2480
|
F.content = c[y].trim(), F.children = [], e.push("th_close", "th", -1);
|
|
2481
2481
|
}
|
|
2482
2482
|
e.push("tr_close", "tr", -1), e.push("thead_close", "thead", -1);
|
|
2483
|
-
let
|
|
2483
|
+
let g, b = 0;
|
|
2484
2484
|
for (i = t + 2; i < n && !(e.sCount[i] < e.blkIndent); i++) {
|
|
2485
2485
|
let y = !1;
|
|
2486
|
-
for (let F = 0, S =
|
|
2487
|
-
if (
|
|
2486
|
+
for (let F = 0, S = m.length; F < S; F++)
|
|
2487
|
+
if (m[F](e, i, n, !0)) {
|
|
2488
2488
|
y = !0;
|
|
2489
2489
|
break;
|
|
2490
2490
|
}
|
|
@@ -2492,7 +2492,7 @@ function rd(e, t, n, u) {
|
|
|
2492
2492
|
break;
|
|
2493
2493
|
if (i === t + 2) {
|
|
2494
2494
|
const F = e.push("tbody_open", "tbody", 1);
|
|
2495
|
-
F.map =
|
|
2495
|
+
F.map = g = [t + 2, 0];
|
|
2496
2496
|
}
|
|
2497
2497
|
const k = e.push("tr_open", "tr", 1);
|
|
2498
2498
|
k.map = [i, i + 1];
|
|
@@ -2504,7 +2504,7 @@ function rd(e, t, n, u) {
|
|
|
2504
2504
|
}
|
|
2505
2505
|
e.push("tr_close", "tr", -1);
|
|
2506
2506
|
}
|
|
2507
|
-
return
|
|
2507
|
+
return g && (e.push("tbody_close", "tbody", -1), g[1] = i), e.push("table_close", "table", -1), w[1] = i, e.parentType = h, e.line = i, !0;
|
|
2508
2508
|
}
|
|
2509
2509
|
function id(e, t, n) {
|
|
2510
2510
|
if (e.sCount[t] - e.blkIndent < 4)
|
|
@@ -2550,8 +2550,8 @@ function od(e, t, n, u) {
|
|
|
2550
2550
|
break;
|
|
2551
2551
|
}
|
|
2552
2552
|
s = e.sCount[t], e.line = l + (h ? 1 : 0);
|
|
2553
|
-
const
|
|
2554
|
-
return
|
|
2553
|
+
const m = e.push("fence", "code", 0);
|
|
2554
|
+
return m.info = f, m.content = e.getLines(t + 1, l, s, !0), m.markup = c, m.map = [t, e.line], !0;
|
|
2555
2555
|
}
|
|
2556
2556
|
function ad(e, t, n, u) {
|
|
2557
2557
|
let i = e.bMarks[t] + e.tShift[t], r = e.eMarks[t];
|
|
@@ -2562,7 +2562,7 @@ function ad(e, t, n, u) {
|
|
|
2562
2562
|
return !0;
|
|
2563
2563
|
const a = [], s = [], c = [], f = [], l = e.md.block.ruler.getRules("blockquote"), h = e.parentType;
|
|
2564
2564
|
e.parentType = "blockquote";
|
|
2565
|
-
let
|
|
2565
|
+
let m = !1, p;
|
|
2566
2566
|
for (p = t; p < n; p++) {
|
|
2567
2567
|
const b = e.sCount[p] < e.blkIndent;
|
|
2568
2568
|
if (i = e.bMarks[p] + e.tShift[p], r = e.eMarks[p], i >= r)
|
|
@@ -2579,10 +2579,10 @@ function ad(e, t, n, u) {
|
|
|
2579
2579
|
break;
|
|
2580
2580
|
i++;
|
|
2581
2581
|
}
|
|
2582
|
-
|
|
2582
|
+
m = i >= r, s.push(e.bsCount[p]), e.bsCount[p] = e.sCount[p] + 1 + (F ? 1 : 0), c.push(e.sCount[p]), e.sCount[p] = _ - k, f.push(e.tShift[p]), e.tShift[p] = i - e.bMarks[p];
|
|
2583
2583
|
continue;
|
|
2584
2584
|
}
|
|
2585
|
-
if (
|
|
2585
|
+
if (m)
|
|
2586
2586
|
break;
|
|
2587
2587
|
let y = !1;
|
|
2588
2588
|
for (let k = 0, F = l.length; k < F; k++)
|
|
@@ -2602,8 +2602,8 @@ function ad(e, t, n, u) {
|
|
|
2602
2602
|
x.markup = ">";
|
|
2603
2603
|
const v = [t, 0];
|
|
2604
2604
|
x.map = v, e.md.block.tokenize(e, t, p);
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2605
|
+
const g = e.push("blockquote_close", "blockquote", -1);
|
|
2606
|
+
g.markup = ">", e.lineMax = o, e.parentType = h, v[1] = e.line;
|
|
2607
2607
|
for (let b = 0; b < f.length; b++)
|
|
2608
2608
|
e.bMarks[b + t] = a[b], e.tShift[b + t] = f[b], e.sCount[b + t] = c[b], e.bsCount[b + t] = s[b];
|
|
2609
2609
|
return e.blkIndent = w, !0;
|
|
@@ -2677,26 +2677,26 @@ function cd(e, t, n, u) {
|
|
|
2677
2677
|
return !1;
|
|
2678
2678
|
let f = !1;
|
|
2679
2679
|
u && e.parentType === "paragraph" && e.sCount[s] >= e.blkIndent && (f = !0);
|
|
2680
|
-
let l, h,
|
|
2681
|
-
if ((
|
|
2682
|
-
if (l = !0, o = e.bMarks[s] + e.tShift[s], h = Number(e.src.slice(o,
|
|
2683
|
-
} else if ((
|
|
2680
|
+
let l, h, m;
|
|
2681
|
+
if ((m = ua(e, s)) >= 0) {
|
|
2682
|
+
if (l = !0, o = e.bMarks[s] + e.tShift[s], h = Number(e.src.slice(o, m - 1)), f && h !== 1) return !1;
|
|
2683
|
+
} else if ((m = na(e, s)) >= 0)
|
|
2684
2684
|
l = !1;
|
|
2685
2685
|
else
|
|
2686
2686
|
return !1;
|
|
2687
|
-
if (f && e.skipSpaces(
|
|
2687
|
+
if (f && e.skipSpaces(m) >= e.eMarks[s])
|
|
2688
2688
|
return !1;
|
|
2689
2689
|
if (u)
|
|
2690
2690
|
return !0;
|
|
2691
|
-
const p = e.src.charCodeAt(
|
|
2691
|
+
const p = e.src.charCodeAt(m - 1), w = e.tokens.length;
|
|
2692
2692
|
l ? (a = e.push("ordered_list_open", "ol", 1), h !== 1 && (a.attrs = [["start", h]])) : a = e.push("bullet_list_open", "ul", 1);
|
|
2693
2693
|
const x = [s, 0];
|
|
2694
2694
|
a.map = x, a.markup = String.fromCharCode(p);
|
|
2695
2695
|
let v = !1;
|
|
2696
|
-
const
|
|
2696
|
+
const g = e.md.block.ruler.getRules("list"), b = e.parentType;
|
|
2697
2697
|
for (e.parentType = "list"; s < n; ) {
|
|
2698
|
-
r =
|
|
2699
|
-
const y = e.sCount[s] +
|
|
2698
|
+
r = m, i = e.eMarks[s];
|
|
2699
|
+
const y = e.sCount[s] + m - (e.bMarks[s] + e.tShift[s]);
|
|
2700
2700
|
let k = y;
|
|
2701
2701
|
for (; r < i; ) {
|
|
2702
2702
|
const q = e.src.charCodeAt(r);
|
|
@@ -2714,25 +2714,25 @@ function cd(e, t, n, u) {
|
|
|
2714
2714
|
const _ = y + S;
|
|
2715
2715
|
a = e.push("list_item_open", "li", 1), a.markup = String.fromCharCode(p);
|
|
2716
2716
|
const X = [s, 0];
|
|
2717
|
-
a.map = X, l && (a.info = e.src.slice(o,
|
|
2717
|
+
a.map = X, l && (a.info = e.src.slice(o, m - 1));
|
|
2718
2718
|
const $ = e.tight, N = e.tShift[s], U = e.sCount[s], R = e.listIndent;
|
|
2719
2719
|
if (e.listIndent = e.blkIndent, e.blkIndent = _, e.tight = !0, e.tShift[s] = F - e.bMarks[s], e.sCount[s] = k, F >= i && e.isEmpty(s + 1) ? e.line = Math.min(e.line + 2, n) : e.md.block.tokenize(e, s, n, !0), (!e.tight || v) && (c = !1), v = e.line - s > 1 && e.isEmpty(e.line - 1), e.blkIndent = e.listIndent, e.listIndent = R, e.tShift[s] = N, e.sCount[s] = U, e.tight = $, a = e.push("list_item_close", "li", -1), a.markup = String.fromCharCode(p), s = e.line, X[1] = s, s >= n || e.sCount[s] < e.blkIndent || e.sCount[s] - e.blkIndent >= 4)
|
|
2720
2720
|
break;
|
|
2721
2721
|
let G = !1;
|
|
2722
|
-
for (let q = 0, T =
|
|
2723
|
-
if (
|
|
2722
|
+
for (let q = 0, T = g.length; q < T; q++)
|
|
2723
|
+
if (g[q](e, s, n, !0)) {
|
|
2724
2724
|
G = !0;
|
|
2725
2725
|
break;
|
|
2726
2726
|
}
|
|
2727
2727
|
if (G)
|
|
2728
2728
|
break;
|
|
2729
2729
|
if (l) {
|
|
2730
|
-
if (
|
|
2730
|
+
if (m = ua(e, s), m < 0)
|
|
2731
2731
|
break;
|
|
2732
2732
|
o = e.bMarks[s] + e.tShift[s];
|
|
2733
|
-
} else if (
|
|
2733
|
+
} else if (m = na(e, s), m < 0)
|
|
2734
2734
|
break;
|
|
2735
|
-
if (p !== e.src.charCodeAt(
|
|
2735
|
+
if (p !== e.src.charCodeAt(m - 1))
|
|
2736
2736
|
break;
|
|
2737
2737
|
}
|
|
2738
2738
|
return l ? a = e.push("ordered_list_close", "ol", -1) : a = e.push("bullet_list_close", "ul", -1), a.markup = String.fromCharCode(p), x[1] = s, e.line = s, e.parentType = b, c && ld(e, w), !0;
|
|
@@ -2741,40 +2741,40 @@ function dd(e, t, n, u) {
|
|
|
2741
2741
|
let i = e.bMarks[t] + e.tShift[t], r = e.eMarks[t], o = t + 1;
|
|
2742
2742
|
if (e.sCount[t] - e.blkIndent >= 4 || e.src.charCodeAt(i) !== 91)
|
|
2743
2743
|
return !1;
|
|
2744
|
-
function a(
|
|
2744
|
+
function a(g) {
|
|
2745
2745
|
const b = e.lineMax;
|
|
2746
|
-
if (
|
|
2746
|
+
if (g >= b || e.isEmpty(g))
|
|
2747
2747
|
return null;
|
|
2748
2748
|
let y = !1;
|
|
2749
|
-
if (e.sCount[
|
|
2749
|
+
if (e.sCount[g] - e.blkIndent > 3 && (y = !0), e.sCount[g] < 0 && (y = !0), !y) {
|
|
2750
2750
|
const S = e.md.block.ruler.getRules("reference"), _ = e.parentType;
|
|
2751
2751
|
e.parentType = "reference";
|
|
2752
2752
|
let X = !1;
|
|
2753
2753
|
for (let $ = 0, N = S.length; $ < N; $++)
|
|
2754
|
-
if (S[$](e,
|
|
2754
|
+
if (S[$](e, g, b, !0)) {
|
|
2755
2755
|
X = !0;
|
|
2756
2756
|
break;
|
|
2757
2757
|
}
|
|
2758
2758
|
if (e.parentType = _, X)
|
|
2759
2759
|
return null;
|
|
2760
2760
|
}
|
|
2761
|
-
const k = e.bMarks[
|
|
2761
|
+
const k = e.bMarks[g] + e.tShift[g], F = e.eMarks[g];
|
|
2762
2762
|
return e.src.slice(k, F + 1);
|
|
2763
2763
|
}
|
|
2764
2764
|
let s = e.src.slice(i, r + 1);
|
|
2765
2765
|
r = s.length;
|
|
2766
2766
|
let c = -1;
|
|
2767
2767
|
for (i = 1; i < r; i++) {
|
|
2768
|
-
const
|
|
2769
|
-
if (
|
|
2768
|
+
const g = s.charCodeAt(i);
|
|
2769
|
+
if (g === 91)
|
|
2770
2770
|
return !1;
|
|
2771
|
-
if (
|
|
2771
|
+
if (g === 93) {
|
|
2772
2772
|
c = i;
|
|
2773
2773
|
break;
|
|
2774
|
-
} else if (
|
|
2774
|
+
} else if (g === 10) {
|
|
2775
2775
|
const b = a(o);
|
|
2776
2776
|
b !== null && (s += b, r = s.length, o++);
|
|
2777
|
-
} else if (
|
|
2777
|
+
} else if (g === 92 && (i++, i < r && s.charCodeAt(i) === 10)) {
|
|
2778
2778
|
const b = a(o);
|
|
2779
2779
|
b !== null && (s += b, r = s.length, o++);
|
|
2780
2780
|
}
|
|
@@ -2782,11 +2782,11 @@ function dd(e, t, n, u) {
|
|
|
2782
2782
|
if (c < 0 || s.charCodeAt(c + 1) !== 58)
|
|
2783
2783
|
return !1;
|
|
2784
2784
|
for (i = c + 2; i < r; i++) {
|
|
2785
|
-
const
|
|
2786
|
-
if (
|
|
2785
|
+
const g = s.charCodeAt(i);
|
|
2786
|
+
if (g === 10) {
|
|
2787
2787
|
const b = a(o);
|
|
2788
2788
|
b !== null && (s += b, r = s.length, o++);
|
|
2789
|
-
} else if (!be(
|
|
2789
|
+
} else if (!be(g)) break;
|
|
2790
2790
|
}
|
|
2791
2791
|
const f = e.md.helpers.parseLinkDestination(s, i, r);
|
|
2792
2792
|
if (!f.ok)
|
|
@@ -2795,31 +2795,31 @@ function dd(e, t, n, u) {
|
|
|
2795
2795
|
if (!e.md.validateLink(l))
|
|
2796
2796
|
return !1;
|
|
2797
2797
|
i = f.pos;
|
|
2798
|
-
const h = i,
|
|
2798
|
+
const h = i, m = o, p = i;
|
|
2799
2799
|
for (; i < r; i++) {
|
|
2800
|
-
const
|
|
2801
|
-
if (
|
|
2800
|
+
const g = s.charCodeAt(i);
|
|
2801
|
+
if (g === 10) {
|
|
2802
2802
|
const b = a(o);
|
|
2803
2803
|
b !== null && (s += b, r = s.length, o++);
|
|
2804
|
-
} else if (!be(
|
|
2804
|
+
} else if (!be(g)) break;
|
|
2805
2805
|
}
|
|
2806
2806
|
let w = e.md.helpers.parseLinkTitle(s, i, r);
|
|
2807
2807
|
for (; w.can_continue; ) {
|
|
2808
|
-
const
|
|
2809
|
-
if (
|
|
2810
|
-
s +=
|
|
2808
|
+
const g = a(o);
|
|
2809
|
+
if (g === null) break;
|
|
2810
|
+
s += g, i = r, r = s.length, o++, w = e.md.helpers.parseLinkTitle(s, i, r, w);
|
|
2811
2811
|
}
|
|
2812
2812
|
let x;
|
|
2813
|
-
for (i < r && p !== i && w.ok ? (x = w.str, i = w.pos) : (x = "", i = h, o =
|
|
2814
|
-
const
|
|
2815
|
-
if (!be(
|
|
2813
|
+
for (i < r && p !== i && w.ok ? (x = w.str, i = w.pos) : (x = "", i = h, o = m); i < r; ) {
|
|
2814
|
+
const g = s.charCodeAt(i);
|
|
2815
|
+
if (!be(g))
|
|
2816
2816
|
break;
|
|
2817
2817
|
i++;
|
|
2818
2818
|
}
|
|
2819
2819
|
if (i < r && s.charCodeAt(i) !== 10 && x)
|
|
2820
|
-
for (x = "", i = h, o =
|
|
2821
|
-
const
|
|
2822
|
-
if (!be(
|
|
2820
|
+
for (x = "", i = h, o = m; i < r; ) {
|
|
2821
|
+
const g = s.charCodeAt(i);
|
|
2822
|
+
if (!be(g))
|
|
2823
2823
|
break;
|
|
2824
2824
|
i++;
|
|
2825
2825
|
}
|
|
@@ -2891,7 +2891,7 @@ const fd = [
|
|
|
2891
2891
|
"tr",
|
|
2892
2892
|
"track",
|
|
2893
2893
|
"ul"
|
|
2894
|
-
], hd = "[a-zA-Z_:][a-zA-Z0-9:._-]*", pd = "[^\"'=<>`\\x00-\\x20]+", md = "'[^']*'", gd = '"[^"]*"', bd = "(?:" + pd + "|" + md + "|" + gd + ")", vd = "(?:\\s+" + hd + "(?:\\s*=\\s*" + bd + ")?)", Bs = "<[A-Za-z][A-Za-z0-9\\-]*" + vd + "*\\s*\\/?>", zs = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", yd = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", xd = "<[?][\\s\\S]*?[?]>", wd = "<![A-Za-z][^>]*>", Ad = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", kd = new RegExp("^(?:" + Bs + "|" + zs + "|" + yd + "|" + xd + "|" + wd + "|" + Ad + ")"), Cd = new RegExp("^(?:" + Bs + "|" + zs + ")"),
|
|
2894
|
+
], hd = "[a-zA-Z_:][a-zA-Z0-9:._-]*", pd = "[^\"'=<>`\\x00-\\x20]+", md = "'[^']*'", gd = '"[^"]*"', bd = "(?:" + pd + "|" + md + "|" + gd + ")", vd = "(?:\\s+" + hd + "(?:\\s*=\\s*" + bd + ")?)", Bs = "<[A-Za-z][A-Za-z0-9\\-]*" + vd + "*\\s*\\/?>", zs = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", yd = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", xd = "<[?][\\s\\S]*?[?]>", wd = "<![A-Za-z][^>]*>", Ad = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", kd = new RegExp("^(?:" + Bs + "|" + zs + "|" + yd + "|" + xd + "|" + wd + "|" + Ad + ")"), Cd = new RegExp("^(?:" + Bs + "|" + zs + ")"), wn = [
|
|
2895
2895
|
[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
|
|
2896
2896
|
[/^<!--/, /-->/, !0],
|
|
2897
2897
|
[/^<\?/, /\?>/, !0],
|
|
@@ -2905,16 +2905,16 @@ function _d(e, t, n, u) {
|
|
|
2905
2905
|
if (e.sCount[t] - e.blkIndent >= 4 || !e.md.options.html || e.src.charCodeAt(i) !== 60)
|
|
2906
2906
|
return !1;
|
|
2907
2907
|
let o = e.src.slice(i, r), a = 0;
|
|
2908
|
-
for (; a <
|
|
2908
|
+
for (; a < wn.length && !wn[a][0].test(o); a++)
|
|
2909
2909
|
;
|
|
2910
|
-
if (a ===
|
|
2910
|
+
if (a === wn.length)
|
|
2911
2911
|
return !1;
|
|
2912
2912
|
if (u)
|
|
2913
|
-
return
|
|
2913
|
+
return wn[a][2];
|
|
2914
2914
|
let s = t + 1;
|
|
2915
|
-
if (!
|
|
2915
|
+
if (!wn[a][1].test(o)) {
|
|
2916
2916
|
for (; s < n && !(e.sCount[s] < e.blkIndent); s++)
|
|
2917
|
-
if (i = e.bMarks[s] + e.tShift[s], r = e.eMarks[s], o = e.src.slice(i, r),
|
|
2917
|
+
if (i = e.bMarks[s] + e.tShift[s], r = e.eMarks[s], o = e.src.slice(i, r), wn[a][1].test(o)) {
|
|
2918
2918
|
o.length !== 0 && s++;
|
|
2919
2919
|
break;
|
|
2920
2920
|
}
|
|
@@ -2958,9 +2958,9 @@ function Sd(e, t, n) {
|
|
|
2958
2958
|
if (e.sCount[a] - e.blkIndent > 3)
|
|
2959
2959
|
continue;
|
|
2960
2960
|
if (e.sCount[a] >= e.blkIndent) {
|
|
2961
|
-
let
|
|
2961
|
+
let m = e.bMarks[a] + e.tShift[a];
|
|
2962
2962
|
const p = e.eMarks[a];
|
|
2963
|
-
if (
|
|
2963
|
+
if (m < p && (o = e.src.charCodeAt(m), (o === 45 || o === 61) && (m = e.skipChars(m, o), m = e.skipSpaces(m), m >= p))) {
|
|
2964
2964
|
r = o === 61 ? 1 : 2;
|
|
2965
2965
|
break;
|
|
2966
2966
|
}
|
|
@@ -2968,8 +2968,8 @@ function Sd(e, t, n) {
|
|
|
2968
2968
|
if (e.sCount[a] < 0)
|
|
2969
2969
|
continue;
|
|
2970
2970
|
let h = !1;
|
|
2971
|
-
for (let
|
|
2972
|
-
if (u[
|
|
2971
|
+
for (let m = 0, p = u.length; m < p; m++)
|
|
2972
|
+
if (u[m](e, a, n, !0)) {
|
|
2973
2973
|
h = !0;
|
|
2974
2974
|
break;
|
|
2975
2975
|
}
|
|
@@ -3074,8 +3074,8 @@ Au.prototype.scanDelims = function(e, t) {
|
|
|
3074
3074
|
let r = e;
|
|
3075
3075
|
for (; r < n && this.src.charCodeAt(r) === u; )
|
|
3076
3076
|
r++;
|
|
3077
|
-
const o = r - e, a = r < n ? this.src.charCodeAt(r) : 32, s = fu(i) || du(String.fromCharCode(i)), c = fu(a) || du(String.fromCharCode(a)), f = cu(i), l = cu(a), h = !l && (!c || f || s),
|
|
3078
|
-
return { can_open: h && (t || !
|
|
3077
|
+
const o = r - e, a = r < n ? this.src.charCodeAt(r) : 32, s = fu(i) || du(String.fromCharCode(i)), c = fu(a) || du(String.fromCharCode(a)), f = cu(i), l = cu(a), h = !l && (!c || f || s), m = !f && (!s || l || c);
|
|
3078
|
+
return { can_open: h && (t || !m || s), can_close: m && (t || !h || c), length: o };
|
|
3079
3079
|
};
|
|
3080
3080
|
Au.prototype.Token = Et;
|
|
3081
3081
|
function Fd(e) {
|
|
@@ -3326,10 +3326,10 @@ function jd(e, t) {
|
|
|
3326
3326
|
let n, u, i, r, o = "", a = "", s = e.pos, c = !0;
|
|
3327
3327
|
if (e.src.charCodeAt(e.pos) !== 91)
|
|
3328
3328
|
return !1;
|
|
3329
|
-
const f = e.pos, l = e.posMax, h = e.pos + 1,
|
|
3330
|
-
if (
|
|
3329
|
+
const f = e.pos, l = e.posMax, h = e.pos + 1, m = e.md.helpers.parseLinkLabel(e, e.pos, !0);
|
|
3330
|
+
if (m < 0)
|
|
3331
3331
|
return !1;
|
|
3332
|
-
let p =
|
|
3332
|
+
let p = m + 1;
|
|
3333
3333
|
if (p < l && e.src.charCodeAt(p) === 40) {
|
|
3334
3334
|
for (c = !1, p++; p < l && (n = e.src.charCodeAt(p), !(!be(n) && n !== 10)); p++)
|
|
3335
3335
|
;
|
|
@@ -3347,12 +3347,12 @@ function jd(e, t) {
|
|
|
3347
3347
|
if (c) {
|
|
3348
3348
|
if (typeof e.env.references > "u")
|
|
3349
3349
|
return !1;
|
|
3350
|
-
if (p < l && e.src.charCodeAt(p) === 91 ? (s = p + 1, p = e.md.helpers.parseLinkLabel(e, p), p >= 0 ? u = e.src.slice(s, p++) : p =
|
|
3350
|
+
if (p < l && e.src.charCodeAt(p) === 91 ? (s = p + 1, p = e.md.helpers.parseLinkLabel(e, p), p >= 0 ? u = e.src.slice(s, p++) : p = m + 1) : p = m + 1, u || (u = e.src.slice(h, m)), r = e.env.references[Lr(u)], !r)
|
|
3351
3351
|
return e.pos = f, !1;
|
|
3352
3352
|
o = r.href, a = r.title;
|
|
3353
3353
|
}
|
|
3354
3354
|
if (!t) {
|
|
3355
|
-
e.pos = h, e.posMax =
|
|
3355
|
+
e.pos = h, e.posMax = m;
|
|
3356
3356
|
const w = e.push("link_open", "a", 1), x = [["href", o]];
|
|
3357
3357
|
w.attrs = x, a && x.push(["title", a]), e.linkLevel++, e.md.inline.tokenize(e), e.linkLevel--, e.push("link_close", "a", -1);
|
|
3358
3358
|
}
|
|
@@ -3363,7 +3363,7 @@ function Hd(e, t) {
|
|
|
3363
3363
|
const l = e.pos, h = e.posMax;
|
|
3364
3364
|
if (e.src.charCodeAt(e.pos) !== 33 || e.src.charCodeAt(e.pos + 1) !== 91)
|
|
3365
3365
|
return !1;
|
|
3366
|
-
const
|
|
3366
|
+
const m = e.pos + 2, p = e.md.helpers.parseLinkLabel(e, e.pos + 1, !1);
|
|
3367
3367
|
if (p < 0)
|
|
3368
3368
|
return !1;
|
|
3369
3369
|
if (r = p + 1, r < h && e.src.charCodeAt(r) === 40) {
|
|
@@ -3384,12 +3384,12 @@ function Hd(e, t) {
|
|
|
3384
3384
|
} else {
|
|
3385
3385
|
if (typeof e.env.references > "u")
|
|
3386
3386
|
return !1;
|
|
3387
|
-
if (r < h && e.src.charCodeAt(r) === 91 ? (c = r + 1, r = e.md.helpers.parseLinkLabel(e, r), r >= 0 ? i = e.src.slice(c, r++) : r = p + 1) : r = p + 1, i || (i = e.src.slice(
|
|
3387
|
+
if (r < h && e.src.charCodeAt(r) === 91 ? (c = r + 1, r = e.md.helpers.parseLinkLabel(e, r), r >= 0 ? i = e.src.slice(c, r++) : r = p + 1) : r = p + 1, i || (i = e.src.slice(m, p)), o = e.env.references[Lr(i)], !o)
|
|
3388
3388
|
return e.pos = l, !1;
|
|
3389
3389
|
f = o.href, s = o.title;
|
|
3390
3390
|
}
|
|
3391
3391
|
if (!t) {
|
|
3392
|
-
u = e.src.slice(
|
|
3392
|
+
u = e.src.slice(m, p);
|
|
3393
3393
|
const w = [];
|
|
3394
3394
|
e.md.inline.parse(
|
|
3395
3395
|
u,
|
|
@@ -3517,8 +3517,8 @@ function oa(e) {
|
|
|
3517
3517
|
if (l.marker === a.marker && l.open && l.end < 0) {
|
|
3518
3518
|
let h = !1;
|
|
3519
3519
|
if ((l.close || a.open) && (l.length + a.length) % 3 === 0 && (l.length % 3 !== 0 || a.length % 3 !== 0) && (h = !0), !h) {
|
|
3520
|
-
const
|
|
3521
|
-
r[o] = o - c +
|
|
3520
|
+
const m = c > 0 && !e[c - 1].open ? r[c - 1] + 1 : 0;
|
|
3521
|
+
r[o] = o - c + m, r[c] = m, a.open = !1, l.end = o, l.close = !1, f = -1, i = -2;
|
|
3522
3522
|
break;
|
|
3523
3523
|
}
|
|
3524
3524
|
}
|
|
@@ -3811,7 +3811,7 @@ lt.prototype.normalize = function(t) {
|
|
|
3811
3811
|
};
|
|
3812
3812
|
lt.prototype.onCompile = function() {
|
|
3813
3813
|
};
|
|
3814
|
-
const
|
|
3814
|
+
const En = 2147483647, Lt = 36, go = 1, hu = 26, hf = 38, pf = 700, $s = 72, Us = 128, Ws = "-", mf = /^xn--/, gf = /[^\0-\x7F]/, bf = /[\x2E\u3002\uFF0E\uFF61]/g, vf = {
|
|
3815
3815
|
overflow: "Overflow: input needs wider integers to process",
|
|
3816
3816
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3817
3817
|
"invalid-input": "Invalid input"
|
|
@@ -3867,15 +3867,15 @@ const xf = (e) => String.fromCodePoint(...e), wf = function(e) {
|
|
|
3867
3867
|
for (let f = 1, l = Lt; ; l += Lt) {
|
|
3868
3868
|
a >= n && Qt("invalid-input");
|
|
3869
3869
|
const h = wf(e.charCodeAt(a++));
|
|
3870
|
-
h >= Lt && Qt("invalid-input"), h > Rt((
|
|
3871
|
-
const
|
|
3872
|
-
if (h <
|
|
3870
|
+
h >= Lt && Qt("invalid-input"), h > Rt((En - u) / f) && Qt("overflow"), u += h * f;
|
|
3871
|
+
const m = l <= r ? go : l >= r + hu ? hu : l - r;
|
|
3872
|
+
if (h < m)
|
|
3873
3873
|
break;
|
|
3874
|
-
const p = Lt -
|
|
3875
|
-
f > Rt(
|
|
3874
|
+
const p = Lt - m;
|
|
3875
|
+
f > Rt(En / p) && Qt("overflow"), f *= p;
|
|
3876
3876
|
}
|
|
3877
3877
|
const c = t.length + 1;
|
|
3878
|
-
r = qs(u - s, c, s == 0), Rt(u / c) >
|
|
3878
|
+
r = qs(u - s, c, s == 0), Rt(u / c) > En - i && Qt("overflow"), i += Rt(u / c), u %= c, t.splice(u++, 0, i);
|
|
3879
3879
|
}
|
|
3880
3880
|
return String.fromCodePoint(...t);
|
|
3881
3881
|
}, Zs = function(e) {
|
|
@@ -3888,21 +3888,21 @@ const xf = (e) => String.fromCodePoint(...e), wf = function(e) {
|
|
|
3888
3888
|
const o = t.length;
|
|
3889
3889
|
let a = o;
|
|
3890
3890
|
for (o && t.push(Ws); a < n; ) {
|
|
3891
|
-
let s =
|
|
3891
|
+
let s = En;
|
|
3892
3892
|
for (const f of e)
|
|
3893
3893
|
f >= u && f < s && (s = f);
|
|
3894
3894
|
const c = a + 1;
|
|
3895
|
-
s - u > Rt((
|
|
3895
|
+
s - u > Rt((En - i) / c) && Qt("overflow"), i += (s - u) * c, u = s;
|
|
3896
3896
|
for (const f of e)
|
|
3897
|
-
if (f < u && ++i >
|
|
3897
|
+
if (f < u && ++i > En && Qt("overflow"), f === u) {
|
|
3898
3898
|
let l = i;
|
|
3899
3899
|
for (let h = Lt; ; h += Lt) {
|
|
3900
|
-
const
|
|
3901
|
-
if (l <
|
|
3900
|
+
const m = h <= r ? go : h >= r + hu ? hu : h - r;
|
|
3901
|
+
if (l < m)
|
|
3902
3902
|
break;
|
|
3903
|
-
const p = l -
|
|
3903
|
+
const p = l - m, w = Lt - m;
|
|
3904
3904
|
t.push(
|
|
3905
|
-
ni(la(
|
|
3905
|
+
ni(la(m + p % w, 0))
|
|
3906
3906
|
), l = Rt(p / w);
|
|
3907
3907
|
}
|
|
3908
3908
|
t.push(ni(la(l, 0))), r = qs(i, c, a === o), i = 0, ++a;
|
|
@@ -4365,8 +4365,8 @@ function tl() {
|
|
|
4365
4365
|
NamedNodeMap: f = e.NamedNodeMap || e.MozNamedAttrMap,
|
|
4366
4366
|
HTMLFormElement: l,
|
|
4367
4367
|
DOMParser: h,
|
|
4368
|
-
trustedTypes:
|
|
4369
|
-
} = e, p = s.prototype, w = qn(p, "cloneNode"), x = qn(p, "remove"), v = qn(p, "nextSibling"),
|
|
4368
|
+
trustedTypes: m
|
|
4369
|
+
} = e, p = s.prototype, w = qn(p, "cloneNode"), x = qn(p, "remove"), v = qn(p, "nextSibling"), g = qn(p, "childNodes"), b = qn(p, "parentNode");
|
|
4370
4370
|
if (typeof o == "function") {
|
|
4371
4371
|
const ue = n.createElement("template");
|
|
4372
4372
|
ue.content && ue.content.ownerDocument && (n = ue.content.ownerDocument);
|
|
@@ -4434,39 +4434,39 @@ function tl() {
|
|
|
4434
4434
|
}));
|
|
4435
4435
|
let K = !0, ne = !0, ce = !1, Ae = !0, ke = !1, tt = !0, Be = !1, St = !1, qt = !1, jt = !1, Eu = !1, Su = !1, ko = !0, Co = !1;
|
|
4436
4436
|
const $l = "user-content-";
|
|
4437
|
-
let jr = !0, $n = !1,
|
|
4437
|
+
let jr = !0, $n = !1, bn = {}, Dt = null;
|
|
4438
4438
|
const Hr = se({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
4439
4439
|
let _o = null;
|
|
4440
4440
|
const Eo = se({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
4441
4441
|
let $r = null;
|
|
4442
4442
|
const So = se({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Du = "http://www.w3.org/1998/Math/MathML", Fu = "http://www.w3.org/2000/svg", Ht = "http://www.w3.org/1999/xhtml";
|
|
4443
|
-
let
|
|
4443
|
+
let vn = Ht, Ur = !1, Wr = null;
|
|
4444
4444
|
const Ul = se({}, [Du, Fu, Ht], ui);
|
|
4445
4445
|
let Tu = se({}, ["mi", "mo", "mn", "ms", "mtext"]), Iu = se({}, ["annotation-xml"]);
|
|
4446
4446
|
const Wl = se({}, ["title", "style", "font", "a", "script"]);
|
|
4447
4447
|
let Un = null;
|
|
4448
4448
|
const Vl = ["application/xhtml+xml", "text/html"], Gl = "text/html";
|
|
4449
|
-
let Fe = null,
|
|
4449
|
+
let Fe = null, yn = null;
|
|
4450
4450
|
const ql = n.createElement("form"), Do = function(E) {
|
|
4451
4451
|
return E instanceof RegExp || E instanceof Function;
|
|
4452
4452
|
}, Vr = function() {
|
|
4453
4453
|
let E = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4454
|
-
if (!(
|
|
4454
|
+
if (!(yn && yn === E)) {
|
|
4455
4455
|
if ((!E || typeof E != "object") && (E = {}), E = Tt(E), Un = // eslint-disable-next-line unicorn/prefer-includes
|
|
4456
|
-
Vl.indexOf(E.PARSER_MEDIA_TYPE) === -1 ? Gl : E.PARSER_MEDIA_TYPE, Fe = Un === "application/xhtml+xml" ? ui : Uu, j = nt(E, "ALLOWED_TAGS") ? se({}, E.ALLOWED_TAGS, Fe) : I, P = nt(E, "ALLOWED_ATTR") ? se({}, E.ALLOWED_ATTR, Fe) : L, Wr = nt(E, "ALLOWED_NAMESPACES") ? se({}, E.ALLOWED_NAMESPACES, ui) : Ul, $r = nt(E, "ADD_URI_SAFE_ATTR") ? se(Tt(So), E.ADD_URI_SAFE_ATTR, Fe) : So, _o = nt(E, "ADD_DATA_URI_TAGS") ? se(Tt(Eo), E.ADD_DATA_URI_TAGS, Fe) : Eo, Dt = nt(E, "FORBID_CONTENTS") ? se({}, E.FORBID_CONTENTS, Fe) : Hr, W = nt(E, "FORBID_TAGS") ? se({}, E.FORBID_TAGS, Fe) : Tt({}), ee = nt(E, "FORBID_ATTR") ? se({}, E.FORBID_ATTR, Fe) : Tt({}),
|
|
4456
|
+
Vl.indexOf(E.PARSER_MEDIA_TYPE) === -1 ? Gl : E.PARSER_MEDIA_TYPE, Fe = Un === "application/xhtml+xml" ? ui : Uu, j = nt(E, "ALLOWED_TAGS") ? se({}, E.ALLOWED_TAGS, Fe) : I, P = nt(E, "ALLOWED_ATTR") ? se({}, E.ALLOWED_ATTR, Fe) : L, Wr = nt(E, "ALLOWED_NAMESPACES") ? se({}, E.ALLOWED_NAMESPACES, ui) : Ul, $r = nt(E, "ADD_URI_SAFE_ATTR") ? se(Tt(So), E.ADD_URI_SAFE_ATTR, Fe) : So, _o = nt(E, "ADD_DATA_URI_TAGS") ? se(Tt(Eo), E.ADD_DATA_URI_TAGS, Fe) : Eo, Dt = nt(E, "FORBID_CONTENTS") ? se({}, E.FORBID_CONTENTS, Fe) : Hr, W = nt(E, "FORBID_TAGS") ? se({}, E.FORBID_TAGS, Fe) : Tt({}), ee = nt(E, "FORBID_ATTR") ? se({}, E.FORBID_ATTR, Fe) : Tt({}), bn = nt(E, "USE_PROFILES") ? E.USE_PROFILES : !1, K = E.ALLOW_ARIA_ATTR !== !1, ne = E.ALLOW_DATA_ATTR !== !1, ce = E.ALLOW_UNKNOWN_PROTOCOLS || !1, Ae = E.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ke = E.SAFE_FOR_TEMPLATES || !1, tt = E.SAFE_FOR_XML !== !1, Be = E.WHOLE_DOCUMENT || !1, jt = E.RETURN_DOM || !1, Eu = E.RETURN_DOM_FRAGMENT || !1, Su = E.RETURN_TRUSTED_TYPE || !1, qt = E.FORCE_BODY || !1, ko = E.SANITIZE_DOM !== !1, Co = E.SANITIZE_NAMED_PROPS || !1, jr = E.KEEP_CONTENT !== !1, $n = E.IN_PLACE || !1, z = E.ALLOWED_URI_REGEXP || Js, vn = E.NAMESPACE || Ht, Tu = E.MATHML_TEXT_INTEGRATION_POINTS || Tu, Iu = E.HTML_INTEGRATION_POINTS || Iu, O = E.CUSTOM_ELEMENT_HANDLING || {}, E.CUSTOM_ELEMENT_HANDLING && Do(E.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (O.tagNameCheck = E.CUSTOM_ELEMENT_HANDLING.tagNameCheck), E.CUSTOM_ELEMENT_HANDLING && Do(E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (O.attributeNameCheck = E.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), E.CUSTOM_ELEMENT_HANDLING && typeof E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (O.allowCustomizedBuiltInElements = E.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ke && (ne = !1), Eu && (jt = !0), bn && (j = se({}, ha), P = $u(null), bn.html === !0 && (se(j, fa), se(P, pa)), bn.svg === !0 && (se(j, ii), se(P, si), se(P, Mu)), bn.svgFilters === !0 && (se(j, oi), se(P, si), se(P, Mu)), bn.mathMl === !0 && (se(j, ai), se(P, ma), se(P, Mu))), nt(E, "ADD_TAGS") || (Q.tagCheck = null), nt(E, "ADD_ATTR") || (Q.attributeCheck = null), E.ADD_TAGS && (typeof E.ADD_TAGS == "function" ? Q.tagCheck = E.ADD_TAGS : (j === I && (j = Tt(j)), se(j, E.ADD_TAGS, Fe))), E.ADD_ATTR && (typeof E.ADD_ATTR == "function" ? Q.attributeCheck = E.ADD_ATTR : (P === L && (P = Tt(P)), se(P, E.ADD_ATTR, Fe))), E.ADD_URI_SAFE_ATTR && se($r, E.ADD_URI_SAFE_ATTR, Fe), E.FORBID_CONTENTS && (Dt === Hr && (Dt = Tt(Dt)), se(Dt, E.FORBID_CONTENTS, Fe)), E.ADD_FORBID_CONTENTS && (Dt === Hr && (Dt = Tt(Dt)), se(Dt, E.ADD_FORBID_CONTENTS, Fe)), jr && (j["#text"] = !0), Be && se(j, ["html", "head", "body"]), j.table && (se(j, ["tbody"]), delete W.tbody), E.TRUSTED_TYPES_POLICY) {
|
|
4457
4457
|
if (typeof E.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
4458
4458
|
throw Gn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
4459
4459
|
if (typeof E.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
4460
4460
|
throw Gn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
4461
4461
|
y = E.TRUSTED_TYPES_POLICY, k = y.createHTML("");
|
|
4462
4462
|
} else
|
|
4463
|
-
y === void 0 && (y = Jf(
|
|
4464
|
-
Ye && Ye(E),
|
|
4463
|
+
y === void 0 && (y = Jf(m, i)), y !== null && typeof k == "string" && (k = y.createHTML(""));
|
|
4464
|
+
Ye && Ye(E), yn = E;
|
|
4465
4465
|
}
|
|
4466
4466
|
}, Fo = se({}, [...ii, ...oi, ...$f]), To = se({}, [...ai, ...Uf]), Xl = function(E) {
|
|
4467
4467
|
let V = b(E);
|
|
4468
4468
|
(!V || !V.tagName) && (V = {
|
|
4469
|
-
namespaceURI:
|
|
4469
|
+
namespaceURI: vn,
|
|
4470
4470
|
tagName: "template"
|
|
4471
4471
|
});
|
|
4472
4472
|
const te = Uu(E.tagName), xe = Uu(V.tagName);
|
|
@@ -4511,22 +4511,22 @@ function tl() {
|
|
|
4511
4511
|
const Ce = ri(E, /^[\r\n\t ]+/);
|
|
4512
4512
|
te = Ce && Ce[0];
|
|
4513
4513
|
}
|
|
4514
|
-
Un === "application/xhtml+xml" &&
|
|
4514
|
+
Un === "application/xhtml+xml" && vn === Ht && (E = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + E + "</body></html>");
|
|
4515
4515
|
const xe = y ? y.createHTML(E) : E;
|
|
4516
|
-
if (
|
|
4516
|
+
if (vn === Ht)
|
|
4517
4517
|
try {
|
|
4518
4518
|
V = new h().parseFromString(xe, Un);
|
|
4519
4519
|
} catch {
|
|
4520
4520
|
}
|
|
4521
4521
|
if (!V || !V.documentElement) {
|
|
4522
|
-
V = F.createDocument(
|
|
4522
|
+
V = F.createDocument(vn, "template", null);
|
|
4523
4523
|
try {
|
|
4524
4524
|
V.documentElement.innerHTML = Ur ? k : xe;
|
|
4525
4525
|
} catch {
|
|
4526
4526
|
}
|
|
4527
4527
|
}
|
|
4528
4528
|
const He = V.body || V.documentElement;
|
|
4529
|
-
return E && te && He.insertBefore(n.createTextNode(te), He.childNodes[0] || null),
|
|
4529
|
+
return E && te && He.insertBefore(n.createTextNode(te), He.childNodes[0] || null), vn === Ht ? X.call(V, Be ? "html" : "body")[0] : Be ? V.documentElement : He;
|
|
4530
4530
|
}, Oo = function(E) {
|
|
4531
4531
|
return S.call(
|
|
4532
4532
|
E.ownerDocument || E,
|
|
@@ -4542,7 +4542,7 @@ function tl() {
|
|
|
4542
4542
|
};
|
|
4543
4543
|
function $t(ue, E, V) {
|
|
4544
4544
|
Pu(ue, (te) => {
|
|
4545
|
-
te.call(t, E, V,
|
|
4545
|
+
te.call(t, E, V, yn);
|
|
4546
4546
|
});
|
|
4547
4547
|
}
|
|
4548
4548
|
const Ro = function(E) {
|
|
@@ -4559,7 +4559,7 @@ function tl() {
|
|
|
4559
4559
|
if (!W[te] && Mo(te) && (O.tagNameCheck instanceof RegExp && Ge(O.tagNameCheck, te) || O.tagNameCheck instanceof Function && O.tagNameCheck(te)))
|
|
4560
4560
|
return !1;
|
|
4561
4561
|
if (jr && !Dt[te]) {
|
|
4562
|
-
const xe = b(E) || E.parentNode, He =
|
|
4562
|
+
const xe = b(E) || E.parentNode, He = g(E) || E.childNodes;
|
|
4563
4563
|
if (He && xe) {
|
|
4564
4564
|
const Ce = He.length;
|
|
4565
4565
|
for (let Qe = Ce - 1; Qe >= 0; --Qe) {
|
|
@@ -4626,13 +4626,13 @@ function tl() {
|
|
|
4626
4626
|
name: Ce,
|
|
4627
4627
|
namespaceURI: Qe,
|
|
4628
4628
|
value: Ut
|
|
4629
|
-
} = He,
|
|
4629
|
+
} = He, xn = Fe(Ce), qr = Ut;
|
|
4630
4630
|
let ze = Ce === "value" ? qr : Nf(qr);
|
|
4631
|
-
if (te.attrName =
|
|
4631
|
+
if (te.attrName = xn, te.attrValue = ze, te.keepAttr = !0, te.forceKeepAttr = void 0, $t(N.uponSanitizeAttribute, E, te), ze = te.attrValue, Co && (xn === "id" || xn === "name") && (ln(Ce, E), ze = $l + ze), tt && Ge(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, ze)) {
|
|
4632
4632
|
ln(Ce, E);
|
|
4633
4633
|
continue;
|
|
4634
4634
|
}
|
|
4635
|
-
if (
|
|
4635
|
+
if (xn === "attributename" && ri(ze, "href")) {
|
|
4636
4636
|
ln(Ce, E);
|
|
4637
4637
|
continue;
|
|
4638
4638
|
}
|
|
@@ -4650,12 +4650,12 @@ function tl() {
|
|
|
4650
4650
|
ze = Vn(ze, No, " ");
|
|
4651
4651
|
});
|
|
4652
4652
|
const zo = Fe(E.nodeName);
|
|
4653
|
-
if (!Po(zo,
|
|
4653
|
+
if (!Po(zo, xn, ze)) {
|
|
4654
4654
|
ln(Ce, E);
|
|
4655
4655
|
continue;
|
|
4656
4656
|
}
|
|
4657
|
-
if (y && typeof
|
|
4658
|
-
switch (
|
|
4657
|
+
if (y && typeof m == "object" && typeof m.getAttributeType == "function" && !Qe)
|
|
4658
|
+
switch (m.getAttributeType(zo, xn)) {
|
|
4659
4659
|
case "TrustedHTML": {
|
|
4660
4660
|
ze = y.createHTML(ze);
|
|
4661
4661
|
break;
|
|
@@ -4728,9 +4728,9 @@ function tl() {
|
|
|
4728
4728
|
let ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
4729
4729
|
Vr(ue), St = !0;
|
|
4730
4730
|
}, t.clearConfig = function() {
|
|
4731
|
-
|
|
4731
|
+
yn = null, St = !1;
|
|
4732
4732
|
}, t.isValidAttribute = function(ue, E, V) {
|
|
4733
|
-
|
|
4733
|
+
yn || Vr({});
|
|
4734
4734
|
const te = Fe(ue), xe = Fe(E);
|
|
4735
4735
|
return Po(te, xe, V);
|
|
4736
4736
|
}, t.addHook = function(ue, E) {
|
|
@@ -4752,6 +4752,10 @@ const th = {
|
|
|
4752
4752
|
content: {
|
|
4753
4753
|
type: Object,
|
|
4754
4754
|
required: !0
|
|
4755
|
+
},
|
|
4756
|
+
card: {
|
|
4757
|
+
type: Boolean,
|
|
4758
|
+
default: !0
|
|
4755
4759
|
}
|
|
4756
4760
|
}, nl = new ct({
|
|
4757
4761
|
html: !0,
|
|
@@ -4800,10 +4804,10 @@ const eu = /* @__PURE__ */ ie({
|
|
|
4800
4804
|
});
|
|
4801
4805
|
});
|
|
4802
4806
|
return () => {
|
|
4803
|
-
var
|
|
4804
|
-
const n = (
|
|
4807
|
+
var i;
|
|
4808
|
+
const n = (i = e.content) == null ? void 0 : i.message, u = e.card ? " f-chat-message-markdown--card" : "";
|
|
4805
4809
|
return d("div", {
|
|
4806
|
-
class:
|
|
4810
|
+
class: `f-chat-message-markdown${u}`
|
|
4807
4811
|
}, [n && d("div", {
|
|
4808
4812
|
class: "f-chat-markdown-message"
|
|
4809
4813
|
}, [n]), d("div", {
|
|
@@ -5026,17 +5030,17 @@ function Ah(e) {
|
|
|
5026
5030
|
return sl(Gu("", null, null, null, [""], e = al(e), 0, [0], e));
|
|
5027
5031
|
}
|
|
5028
5032
|
function Gu(e, t, n, u, i, r, o, a, s) {
|
|
5029
|
-
for (var c = 0, f = 0, l = o, h = 0,
|
|
5030
|
-
switch (p =
|
|
5033
|
+
for (var c = 0, f = 0, l = o, h = 0, m = 0, p = 0, w = 1, x = 1, v = 1, g = 0, b = "", y = i, k = r, F = u, S = b; x; )
|
|
5034
|
+
switch (p = g, g = st()) {
|
|
5031
5035
|
case 40:
|
|
5032
5036
|
if (p != 108 && Ne(S, l - 1) == 58) {
|
|
5033
|
-
Bi(S += he(Vu(
|
|
5037
|
+
Bi(S += he(Vu(g), "&", "&\f"), "&\f") != -1 && (v = -1);
|
|
5034
5038
|
break;
|
|
5035
5039
|
}
|
|
5036
5040
|
case 34:
|
|
5037
5041
|
case 39:
|
|
5038
5042
|
case 91:
|
|
5039
|
-
S += Vu(
|
|
5043
|
+
S += Vu(g);
|
|
5040
5044
|
break;
|
|
5041
5045
|
case 9:
|
|
5042
5046
|
case 10:
|
|
@@ -5062,17 +5066,17 @@ function Gu(e, t, n, u, i, r, o, a, s) {
|
|
|
5062
5066
|
case 125 * w:
|
|
5063
5067
|
case 59:
|
|
5064
5068
|
case 0:
|
|
5065
|
-
switch (
|
|
5069
|
+
switch (g) {
|
|
5066
5070
|
case 0:
|
|
5067
5071
|
case 125:
|
|
5068
5072
|
x = 0;
|
|
5069
5073
|
case 59 + f:
|
|
5070
|
-
v == -1 && (S = he(S, /\f/g, "")),
|
|
5074
|
+
v == -1 && (S = he(S, /\f/g, "")), m > 0 && It(S) - l && Bu(m > 32 ? ya(S + ";", u, n, l - 1) : ya(he(S, " ", "") + ";", u, n, l - 2), s);
|
|
5071
5075
|
break;
|
|
5072
5076
|
case 59:
|
|
5073
5077
|
S += ";";
|
|
5074
5078
|
default:
|
|
5075
|
-
if (Bu(F = va(S, t, n, c, f, i, a, b, y = [], k = [], l), r),
|
|
5079
|
+
if (Bu(F = va(S, t, n, c, f, i, a, b, y = [], k = [], l), r), g === 123)
|
|
5076
5080
|
if (f === 0)
|
|
5077
5081
|
Gu(S, t, F, F, y, r, l, a, k);
|
|
5078
5082
|
else
|
|
@@ -5087,18 +5091,18 @@ function Gu(e, t, n, u, i, r, o, a, s) {
|
|
|
5087
5091
|
Gu(S, F, F, F, [""], k, 0, a, k);
|
|
5088
5092
|
}
|
|
5089
5093
|
}
|
|
5090
|
-
c = f =
|
|
5094
|
+
c = f = m = 0, w = v = 1, b = S = "", l = o;
|
|
5091
5095
|
break;
|
|
5092
5096
|
case 58:
|
|
5093
|
-
l = 1 + It(S),
|
|
5097
|
+
l = 1 + It(S), m = p;
|
|
5094
5098
|
default:
|
|
5095
5099
|
if (w < 1) {
|
|
5096
|
-
if (
|
|
5100
|
+
if (g == 123)
|
|
5097
5101
|
--w;
|
|
5098
|
-
else if (
|
|
5102
|
+
else if (g == 125 && w++ == 0 && bh() == 125)
|
|
5099
5103
|
continue;
|
|
5100
5104
|
}
|
|
5101
|
-
switch (S += Mr(
|
|
5105
|
+
switch (S += Mr(g), g * w) {
|
|
5102
5106
|
case 38:
|
|
5103
5107
|
v = f > 0 ? 1 : (S += "\f", -1);
|
|
5104
5108
|
break;
|
|
@@ -5106,7 +5110,7 @@ function Gu(e, t, n, u, i, r, o, a, s) {
|
|
|
5106
5110
|
a[c++] = (It(S) - 1) * v, v = 1;
|
|
5107
5111
|
break;
|
|
5108
5112
|
case 64:
|
|
5109
|
-
Mt() === 45 && (S += Vu(st())), h = Mt(), f = l = It(b = S += wh(Wu())),
|
|
5113
|
+
Mt() === 45 && (S += Vu(st())), h = Mt(), f = l = It(b = S += wh(Wu())), g++;
|
|
5110
5114
|
break;
|
|
5111
5115
|
case 45:
|
|
5112
5116
|
p === 45 && It(S) == 2 && (w = 0);
|
|
@@ -5115,9 +5119,9 @@ function Gu(e, t, n, u, i, r, o, a, s) {
|
|
|
5115
5119
|
return r;
|
|
5116
5120
|
}
|
|
5117
5121
|
function va(e, t, n, u, i, r, o, a, s, c, f) {
|
|
5118
|
-
for (var l = i - 1, h = i === 0 ? r : [""],
|
|
5119
|
-
for (var v = 0,
|
|
5120
|
-
(b = il(w > 0 ? h[v] + " " +
|
|
5122
|
+
for (var l = i - 1, h = i === 0 ? r : [""], m = yo(h), p = 0, w = 0, x = 0; p < u; ++p)
|
|
5123
|
+
for (var v = 0, g = pu(e, l + 1, l = dh(w = o[p])), b = e; v < m; ++v)
|
|
5124
|
+
(b = il(w > 0 ? h[v] + " " + g : he(g, /&\f/g, h[v]))) && (s[x++] = b);
|
|
5121
5125
|
return zr(e, t, n, i === 0 ? bo : a, s, c, f);
|
|
5122
5126
|
}
|
|
5123
5127
|
function kh(e, t, n) {
|
|
@@ -5126,7 +5130,7 @@ function kh(e, t, n) {
|
|
|
5126
5130
|
function ya(e, t, n, u) {
|
|
5127
5131
|
return zr(e, t, n, vo, pu(e, 0, u), pu(e, u + 1, -1), u);
|
|
5128
5132
|
}
|
|
5129
|
-
function
|
|
5133
|
+
function Sn(e, t) {
|
|
5130
5134
|
for (var n = "", u = yo(e), i = 0; i < u; i++)
|
|
5131
5135
|
n += t(e[i], i, e, t) || "";
|
|
5132
5136
|
return n;
|
|
@@ -5141,11 +5145,11 @@ function Ch(e, t, n, u) {
|
|
|
5141
5145
|
case ul:
|
|
5142
5146
|
return "";
|
|
5143
5147
|
case rl:
|
|
5144
|
-
return e.return = e.value + "{" +
|
|
5148
|
+
return e.return = e.value + "{" + Sn(e.children, u) + "}";
|
|
5145
5149
|
case bo:
|
|
5146
5150
|
e.value = e.props.join(",");
|
|
5147
5151
|
}
|
|
5148
|
-
return It(n =
|
|
5152
|
+
return It(n = Sn(e.children, u)) ? e.return = e.value + "{" + n + "}" : "";
|
|
5149
5153
|
}
|
|
5150
5154
|
function _h(e) {
|
|
5151
5155
|
var t = yo(e);
|
|
@@ -5330,7 +5334,7 @@ var Lh = function(t, n, u, i) {
|
|
|
5330
5334
|
t.return = ll(t.value, t.length);
|
|
5331
5335
|
break;
|
|
5332
5336
|
case rl:
|
|
5333
|
-
return
|
|
5337
|
+
return Sn([Zn(t, {
|
|
5334
5338
|
value: he(t.value, "@", "@" + fe)
|
|
5335
5339
|
})], i);
|
|
5336
5340
|
case bo:
|
|
@@ -5338,11 +5342,11 @@ var Lh = function(t, n, u, i) {
|
|
|
5338
5342
|
switch (ph(r, /(::plac\w+|:read-\w+)/)) {
|
|
5339
5343
|
case ":read-only":
|
|
5340
5344
|
case ":read-write":
|
|
5341
|
-
return
|
|
5345
|
+
return Sn([Zn(t, {
|
|
5342
5346
|
props: [he(r, /:(read-\w+)/, ":" + Ar + "$1")]
|
|
5343
5347
|
})], i);
|
|
5344
5348
|
case "::placeholder":
|
|
5345
|
-
return
|
|
5349
|
+
return Sn([Zn(t, {
|
|
5346
5350
|
props: [he(r, /:(plac\w+)/, ":" + fe + "input-$1")]
|
|
5347
5351
|
}), Zn(t, {
|
|
5348
5352
|
props: [he(r, /:(plac\w+)/, ":" + Ar + "$1")]
|
|
@@ -5377,11 +5381,11 @@ var Lh = function(t, n, u, i) {
|
|
|
5377
5381
|
{
|
|
5378
5382
|
var f, l = [Ch, Eh(function(w) {
|
|
5379
5383
|
f.insert(w);
|
|
5380
|
-
})], h = _h(c.concat(i, l)),
|
|
5381
|
-
return
|
|
5384
|
+
})], h = _h(c.concat(i, l)), m = function(x) {
|
|
5385
|
+
return Sn(Ah(x), h);
|
|
5382
5386
|
};
|
|
5383
|
-
s = function(x, v,
|
|
5384
|
-
f =
|
|
5387
|
+
s = function(x, v, g, b) {
|
|
5388
|
+
f = g, m(x ? x + "{" + v.styles + "}" : v.styles), b && (p.inserted[v.name] = !0);
|
|
5385
5389
|
};
|
|
5386
5390
|
}
|
|
5387
5391
|
var p = {
|
|
@@ -5799,7 +5803,7 @@ var Ni = { exports: {} };
|
|
|
5799
5803
|
}
|
|
5800
5804
|
}, K = (ne) => ne.done ? O(ne.value) : Promise.resolve(ne.value).then(ee, Q);
|
|
5801
5805
|
K((L = L.apply(I, P)).next());
|
|
5802
|
-
}),
|
|
5806
|
+
}), m = ((I) => (I[I.NONE = 0] = "NONE", I[I.LOADING = 1] = "LOADING", I[I.LOADED = 2] = "LOADED", I[I.ERROR = 3] = "ERROR", I))(m || {});
|
|
5803
5807
|
class p {
|
|
5804
5808
|
constructor(P) {
|
|
5805
5809
|
this.items = {}, this.factory = P;
|
|
@@ -5823,8 +5827,8 @@ var Ni = { exports: {} };
|
|
|
5823
5827
|
const W = globalThis, ee = (L = W[w]) != null ? L : W[w] = {};
|
|
5824
5828
|
return (O = ee[I]) != null ? O : ee[I] = P();
|
|
5825
5829
|
}
|
|
5826
|
-
const v = x("cssCache", () => new p((I) => ({ url: I, status:
|
|
5827
|
-
function
|
|
5830
|
+
const v = x("cssCache", () => new p((I) => ({ url: I, status: m.NONE, el: null, error: null, reject: null })));
|
|
5831
|
+
function g(I, P, L) {
|
|
5828
5832
|
const O = { handleLoad() {
|
|
5829
5833
|
I.removeEventListener("load", O.handleLoad), I.removeEventListener("error", O.handleError), P();
|
|
5830
5834
|
}, handleError(W) {
|
|
@@ -5834,23 +5838,23 @@ var Ni = { exports: {} };
|
|
|
5834
5838
|
}
|
|
5835
5839
|
function b(I) {
|
|
5836
5840
|
const P = v.getOrCreateItemByURL(I), { status: L, error: O } = P;
|
|
5837
|
-
return L ===
|
|
5841
|
+
return L === m.LOADED ? Promise.resolve() : L === m.ERROR ? Promise.reject(O) : L === m.LOADING ? new Promise((W, ee) => {
|
|
5838
5842
|
const { el: Q } = P;
|
|
5839
|
-
|
|
5840
|
-
}) : (P.status =
|
|
5843
|
+
g(Q, () => W(), (K) => ee(K.error));
|
|
5844
|
+
}) : (P.status = m.LOADING, new Promise((W, ee) => {
|
|
5841
5845
|
const Q = document.createElement("link");
|
|
5842
|
-
Q.rel = "stylesheet", Q.href = I,
|
|
5843
|
-
P.status =
|
|
5846
|
+
Q.rel = "stylesheet", Q.href = I, g(Q, () => {
|
|
5847
|
+
P.status = m.LOADED, W();
|
|
5844
5848
|
}, (K) => {
|
|
5845
5849
|
const ne = K.error || new Error(`Load css failed. href=${I}`);
|
|
5846
|
-
P.status =
|
|
5850
|
+
P.status = m.ERROR, P.error = ne, ee(ne);
|
|
5847
5851
|
}), P.el = Q, Q.setAttribute("data-runtime-import-type", "css"), document.head.appendChild(Q);
|
|
5848
5852
|
}));
|
|
5849
5853
|
}
|
|
5850
5854
|
function y(I) {
|
|
5851
5855
|
return Promise.all(I.map((P) => b(P))).then(() => Promise.resolve()).catch((P) => Promise.reject(P));
|
|
5852
5856
|
}
|
|
5853
|
-
const k = x("jsCache", () => new p((I) => ({ url: I, status:
|
|
5857
|
+
const k = x("jsCache", () => new p((I) => ({ url: I, status: m.NONE, el: null, error: null, reject: null, exportThing: void 0 }))), F = globalThis, { define: S } = F, { keys: _ } = Object;
|
|
5854
5858
|
let X = !1;
|
|
5855
5859
|
typeof S < "u" && !S.runtime_import && (console.warn("runtime-import should NOT coexist with requiesjs or seajs or any other AMD/CMD loader."), X = !0);
|
|
5856
5860
|
const $ = x("pendingItemMap", () => ({})), N = function(...I) {
|
|
@@ -5870,7 +5874,7 @@ var Ni = { exports: {} };
|
|
|
5870
5874
|
})();
|
|
5871
5875
|
Q && (F[Q] = K), K && _(K).length === 1 && K.default && (W.exportThing = K.default, W.exportThing.default = K.default);
|
|
5872
5876
|
} catch (ee) {
|
|
5873
|
-
W.status =
|
|
5877
|
+
W.status = m.ERROR, ee instanceof Error && (W.error = ee), W.reject(ee);
|
|
5874
5878
|
}
|
|
5875
5879
|
}, U = () => {
|
|
5876
5880
|
const { currentScript: I } = document;
|
|
@@ -5895,7 +5899,7 @@ var Ni = { exports: {} };
|
|
|
5895
5899
|
}
|
|
5896
5900
|
}
|
|
5897
5901
|
function q(I, P, L) {
|
|
5898
|
-
I.status =
|
|
5902
|
+
I.status = m.LOADING, G(P);
|
|
5899
5903
|
const { umd: O, crossOrigin: W } = L;
|
|
5900
5904
|
return new Promise((ee, Q) => {
|
|
5901
5905
|
const K = document.createElement("script");
|
|
@@ -5904,22 +5908,22 @@ var Ni = { exports: {} };
|
|
|
5904
5908
|
const ne = K.src;
|
|
5905
5909
|
R(ne, I);
|
|
5906
5910
|
} else K.setAttribute("data-runtime-import-type", "javascript");
|
|
5907
|
-
|
|
5908
|
-
I.status =
|
|
5911
|
+
g(K, () => {
|
|
5912
|
+
I.status = m.LOADED, I.el = null, ee(I.exportThing);
|
|
5909
5913
|
}, (ne) => {
|
|
5910
5914
|
const ce = ne.error || new Error(`Load javascript failed. src=${P}`);
|
|
5911
|
-
I.status =
|
|
5915
|
+
I.status = m.ERROR, I.error = ce, I.el = null, Q(ce);
|
|
5912
5916
|
}), I.el = K, document.body.appendChild(K);
|
|
5913
5917
|
});
|
|
5914
5918
|
}
|
|
5915
5919
|
function T(I, P) {
|
|
5916
5920
|
const L = k.getOrCreateItemByURL(I), { status: O, exportThing: W, error: ee } = L;
|
|
5917
|
-
if (O ===
|
|
5918
|
-
if (O ===
|
|
5919
|
-
if (O ===
|
|
5921
|
+
if (O === m.LOADED) return Promise.resolve(W);
|
|
5922
|
+
if (O === m.ERROR) return Promise.reject(ee);
|
|
5923
|
+
if (O === m.LOADING) {
|
|
5920
5924
|
const { el: Q } = L;
|
|
5921
5925
|
return new Promise((K, ne) => {
|
|
5922
|
-
|
|
5926
|
+
g(Q, () => K(L.exportThing), (ce) => ne(ce.error));
|
|
5923
5927
|
});
|
|
5924
5928
|
}
|
|
5925
5929
|
return q(L, I, P);
|
|
@@ -5976,79 +5980,79 @@ const tu = /* @__PURE__ */ ie({
|
|
|
5976
5980
|
} = Jh(), {
|
|
5977
5981
|
deepEqual: u
|
|
5978
5982
|
} = Kh(), i = H(null), r = H(null), o = H(null), a = H(null), s = H(null), c = B(() => {
|
|
5979
|
-
const
|
|
5980
|
-
return fi("caf-assistant-widget-container__root",
|
|
5983
|
+
const g = di`width:100%!important`;
|
|
5984
|
+
return fi("caf-assistant-widget-container__root", g, e.className);
|
|
5981
5985
|
}), f = di`
|
|
5982
5986
|
overflow: hidden;
|
|
5983
5987
|
`, l = fi("caf-assistant-widget-container__inner", f), h = B(() => {
|
|
5984
|
-
const
|
|
5988
|
+
const g = di`
|
|
5985
5989
|
display: ${s.value ? "block" : "none"};
|
|
5986
5990
|
`;
|
|
5987
|
-
return fi("caf-assistant-widget-container__error",
|
|
5988
|
-
}),
|
|
5989
|
-
const
|
|
5990
|
-
|
|
5991
|
+
return fi("caf-assistant-widget-container__error", g);
|
|
5992
|
+
}), m = () => {
|
|
5993
|
+
const g = o.value;
|
|
5994
|
+
g && (a.value = new Yh(g));
|
|
5991
5995
|
}, p = () => {
|
|
5992
|
-
const
|
|
5993
|
-
|
|
5996
|
+
const g = a.value;
|
|
5997
|
+
g && (g.dispose(), a.value = null);
|
|
5994
5998
|
}, w = () => {
|
|
5995
|
-
const
|
|
5996
|
-
|
|
5999
|
+
const g = r.value, b = i.value;
|
|
6000
|
+
g && (g.unmount(), g.dispose()), b && b.cleanup(), r.value = null, i.value = null;
|
|
5997
6001
|
}, x = async () => {
|
|
5998
|
-
const
|
|
5999
|
-
if (!
|
|
6002
|
+
const g = await n(e.widgetAPIURL);
|
|
6003
|
+
if (!g)
|
|
6000
6004
|
throw new Error("Failed to load widget API");
|
|
6001
|
-
await
|
|
6002
|
-
const b =
|
|
6003
|
-
i.value =
|
|
6004
|
-
}, v = (
|
|
6005
|
-
console.error(
|
|
6005
|
+
await g.initialize();
|
|
6006
|
+
const b = g.createWidget();
|
|
6007
|
+
i.value = g, r.value = b;
|
|
6008
|
+
}, v = (g) => {
|
|
6009
|
+
console.error(g), s.value = g;
|
|
6006
6010
|
};
|
|
6007
6011
|
return oe(() => e.widgetAPIURL, async () => {
|
|
6008
6012
|
if (o.value)
|
|
6009
6013
|
try {
|
|
6010
6014
|
w(), await x();
|
|
6011
|
-
const
|
|
6012
|
-
b == null || b.updateOptions(e.widgetOptions), b == null || b.updateData(e.widgetData),
|
|
6013
|
-
} catch (
|
|
6014
|
-
v(
|
|
6015
|
+
const g = o.value, b = r.value;
|
|
6016
|
+
b == null || b.updateOptions(e.widgetOptions), b == null || b.updateData(e.widgetData), g && b && await b.mount(g);
|
|
6017
|
+
} catch (g) {
|
|
6018
|
+
v(g);
|
|
6015
6019
|
}
|
|
6016
|
-
}), oe(() => e.widgetOptions, (
|
|
6020
|
+
}), oe(() => e.widgetOptions, (g, b) => {
|
|
6017
6021
|
try {
|
|
6018
6022
|
const y = r.value;
|
|
6019
|
-
y && (!b || !u(b,
|
|
6023
|
+
y && (!b || !u(b, g)) && y.updateOptions(g);
|
|
6020
6024
|
} catch (y) {
|
|
6021
6025
|
v(y);
|
|
6022
6026
|
}
|
|
6023
|
-
}), oe(() => e.widgetData, (
|
|
6027
|
+
}), oe(() => e.widgetData, (g, b) => {
|
|
6024
6028
|
try {
|
|
6025
6029
|
const y = r.value;
|
|
6026
|
-
y && (!b || !u(b,
|
|
6030
|
+
y && (!b || !u(b, g)) && y.updateData(g);
|
|
6027
6031
|
} catch (y) {
|
|
6028
6032
|
v(y);
|
|
6029
6033
|
}
|
|
6030
6034
|
}), Ie(async () => {
|
|
6031
6035
|
try {
|
|
6032
|
-
const
|
|
6033
|
-
if (
|
|
6034
|
-
|
|
6036
|
+
const g = o.value;
|
|
6037
|
+
if (g) {
|
|
6038
|
+
m();
|
|
6035
6039
|
const b = a.value;
|
|
6036
6040
|
if (b) {
|
|
6037
6041
|
await x();
|
|
6038
6042
|
const y = r.value;
|
|
6039
6043
|
y && (y.updateOptions(e.widgetOptions), y.updateData(e.widgetData), y.mount(b.getElement()), De(() => {
|
|
6040
|
-
|
|
6044
|
+
g.parentElement && (g.style.width = "100%");
|
|
6041
6045
|
}));
|
|
6042
6046
|
}
|
|
6043
6047
|
}
|
|
6044
|
-
} catch (
|
|
6045
|
-
v(
|
|
6048
|
+
} catch (g) {
|
|
6049
|
+
v(g);
|
|
6046
6050
|
}
|
|
6047
6051
|
}), sn(async () => {
|
|
6048
6052
|
try {
|
|
6049
6053
|
w(), p();
|
|
6050
|
-
} catch (
|
|
6051
|
-
console.error(
|
|
6054
|
+
} catch (g) {
|
|
6055
|
+
console.error(g);
|
|
6052
6056
|
}
|
|
6053
6057
|
}), () => d("div", {
|
|
6054
6058
|
class: c.value
|
|
@@ -6099,7 +6103,7 @@ function Xu(e) {
|
|
|
6099
6103
|
const t = window;
|
|
6100
6104
|
t.__fluens_dynamic_component_bootstrap_instance_id === e && delete t.__fluens_dynamic_component_bootstrap_instance_id;
|
|
6101
6105
|
}
|
|
6102
|
-
function
|
|
6106
|
+
function X2() {
|
|
6103
6107
|
return Bt[Bt.length - 1] || void 0;
|
|
6104
6108
|
}
|
|
6105
6109
|
function Cr(e, t) {
|
|
@@ -6193,7 +6197,7 @@ function pl(e) {
|
|
|
6193
6197
|
`[DynamicComponent] assistant post id "${t}" resolved to instanceId "${i[0].config.instanceId}" (alias match)`
|
|
6194
6198
|
), i[0]) : (i.length > 1 && console.warn(`[DynamicComponent] assistant post id "${t}" is ambiguous (${i.length} active matches)`), null);
|
|
6195
6199
|
}
|
|
6196
|
-
function
|
|
6200
|
+
function Z2(e) {
|
|
6197
6201
|
const t = je(e);
|
|
6198
6202
|
if (!t) return null;
|
|
6199
6203
|
const n = Ct.get(t);
|
|
@@ -6287,7 +6291,7 @@ function a1(e) {
|
|
|
6287
6291
|
const u = document.getElementById(`fluens-dynamic-component-${e}`);
|
|
6288
6292
|
u && u.remove();
|
|
6289
6293
|
}
|
|
6290
|
-
function
|
|
6294
|
+
function Y2(e, t) {
|
|
6291
6295
|
const n = je(e);
|
|
6292
6296
|
if (!n) return !1;
|
|
6293
6297
|
const u = pl(n);
|
|
@@ -6439,14 +6443,14 @@ const l1 = /* @__PURE__ */ ie({
|
|
|
6439
6443
|
updatePropertyValue: r,
|
|
6440
6444
|
startStreaming: o
|
|
6441
6445
|
} = oo();
|
|
6442
|
-
i("title", e.title ?? ""), i("subtitle", e.subtitle ?? ""), i("text", e.text ?? ""), oe([() => e.title, () => e.subtitle, () => e.text], ([v,
|
|
6443
|
-
r("title", v ?? ""), r("subtitle",
|
|
6446
|
+
i("title", e.title ?? ""), i("subtitle", e.subtitle ?? ""), i("text", e.text ?? ""), oe([() => e.title, () => e.subtitle, () => e.text], ([v, g, b]) => {
|
|
6447
|
+
r("title", v ?? ""), r("subtitle", g ?? ""), r("text", b ?? "");
|
|
6444
6448
|
});
|
|
6445
6449
|
const a = B(() => e.textFormat === "markdown"), s = H(!1), c = B(() => {
|
|
6446
|
-
var v,
|
|
6450
|
+
var v, g, b;
|
|
6447
6451
|
return s.value ? {
|
|
6448
6452
|
title: ((v = u.title) == null ? void 0 : v.displayedValue) ?? "",
|
|
6449
|
-
subtitle: ((
|
|
6453
|
+
subtitle: ((g = u.subtitle) == null ? void 0 : g.displayedValue) ?? "",
|
|
6450
6454
|
text: ((b = u.text) == null ? void 0 : b.displayedValue) ?? ""
|
|
6451
6455
|
} : {
|
|
6452
6456
|
title: e.title,
|
|
@@ -6455,26 +6459,26 @@ const l1 = /* @__PURE__ */ ie({
|
|
|
6455
6459
|
};
|
|
6456
6460
|
}), f = B(() => Gc(c.value.text)), l = /* @__PURE__ */ new Set();
|
|
6457
6461
|
function h(v) {
|
|
6458
|
-
const
|
|
6459
|
-
!
|
|
6462
|
+
const g = String(v.instanceId ?? "").trim();
|
|
6463
|
+
!g || l.has(g) || (l.add(g), De(() => {
|
|
6460
6464
|
var b;
|
|
6461
6465
|
t.emit("dynamicComponentsDetected", [v]), (b = e.onDynamicComponentsDetected) == null || b.call(e, [v]);
|
|
6462
6466
|
}));
|
|
6463
6467
|
}
|
|
6464
|
-
function
|
|
6468
|
+
function m(v, ...g) {
|
|
6465
6469
|
var b;
|
|
6466
|
-
t.emit(v, ...
|
|
6470
|
+
t.emit(v, ...g), v === "showDynamicComponent" && ((b = e.onShowDynamicComponent) == null || b.call(e, g[0]));
|
|
6467
6471
|
}
|
|
6468
6472
|
const p = {
|
|
6469
6473
|
shouldShowMarkdown: a,
|
|
6470
|
-
emit:
|
|
6474
|
+
emit: m,
|
|
6471
6475
|
emitDynamicComponentsDetectedOnce: h,
|
|
6472
6476
|
renderFileEmbeddedContent: n
|
|
6473
6477
|
}, w = s1(), x = () => f.value.length === 0 ? null : d("div", {
|
|
6474
6478
|
class: "f-chat-bubble-text-collection"
|
|
6475
|
-
}, [f.value.map((v,
|
|
6479
|
+
}, [f.value.map((v, g) => {
|
|
6476
6480
|
var b;
|
|
6477
|
-
return (b = w[v.type]) == null ? void 0 : b.call(w, v,
|
|
6481
|
+
return (b = w[v.type]) == null ? void 0 : b.call(w, v, g, p);
|
|
6478
6482
|
})]);
|
|
6479
6483
|
return Ie(() => {
|
|
6480
6484
|
s.value && o();
|
|
@@ -6510,10 +6514,10 @@ const l1 = /* @__PURE__ */ ie({
|
|
|
6510
6514
|
start: s,
|
|
6511
6515
|
stop: c,
|
|
6512
6516
|
reset: f
|
|
6513
|
-
} = gs(), l = H(((X = e.content) == null ? void 0 : X.completed) !== !0), h = H(null),
|
|
6517
|
+
} = gs(), l = H(((X = e.content) == null ? void 0 : X.completed) !== !0), h = H(null), m = H(null), p = H(!1), w = H(!1), x = B(() => e.outputMode === "streaming"), v = B(() => {
|
|
6514
6518
|
var $;
|
|
6515
6519
|
return ($ = e.content) == null ? void 0 : $.completed;
|
|
6516
|
-
}),
|
|
6520
|
+
}), g = B(() => {
|
|
6517
6521
|
var N, U;
|
|
6518
6522
|
if (v.value) {
|
|
6519
6523
|
const R = a.value ? `(用时${o.value}秒)` : "";
|
|
@@ -6572,7 +6576,7 @@ const l1 = /* @__PURE__ */ ie({
|
|
|
6572
6576
|
});
|
|
6573
6577
|
const F = () => {
|
|
6574
6578
|
l.value = !l.value;
|
|
6575
|
-
}, S = () => v.value ? null : d(
|
|
6579
|
+
}, S = () => v.value ? null : d(gn, {
|
|
6576
6580
|
status: "Working",
|
|
6577
6581
|
variant: "thinking"
|
|
6578
6582
|
}, null), _ = () => !b.value || !l.value ? null : d("div", {
|
|
@@ -6586,7 +6590,7 @@ const l1 = /* @__PURE__ */ ie({
|
|
|
6586
6590
|
}, null), d("div", {
|
|
6587
6591
|
class: "f-chat-bubble-thinking-text-wrapper"
|
|
6588
6592
|
}, [d("div", {
|
|
6589
|
-
ref:
|
|
6593
|
+
ref: m,
|
|
6590
6594
|
class: "f-chat-bubble-thinking-content-text",
|
|
6591
6595
|
innerHTML: b.value
|
|
6592
6596
|
}, null)])])]);
|
|
@@ -6597,7 +6601,7 @@ const l1 = /* @__PURE__ */ ie({
|
|
|
6597
6601
|
onClick: F
|
|
6598
6602
|
}, [S(), d("span", {
|
|
6599
6603
|
class: "f-chat-bubble-thinking-title",
|
|
6600
|
-
innerHTML:
|
|
6604
|
+
innerHTML: g.value
|
|
6601
6605
|
}, null), b.value && d("i", {
|
|
6602
6606
|
class: "fx-icon fx-icon-foldup",
|
|
6603
6607
|
style: {
|
|
@@ -6667,14 +6671,14 @@ function p1(e) {
|
|
|
6667
6671
|
return { host: t, hostLeft: i, hostTop: n, hostWidth: r, hostHeight: o, hostBottom: u };
|
|
6668
6672
|
}
|
|
6669
6673
|
function m1(e, t, n, u) {
|
|
6670
|
-
const i = H(e.offsetX || 0), r = H(e.offsetY || 0), o = H(-1), a = H(-1), s = H(-1), c = H(-1), f = H(e.placement), l = H(0), h = H(0),
|
|
6674
|
+
const i = H(e.offsetX || 0), r = H(e.offsetY || 0), o = H(-1), a = H(-1), s = H(-1), c = H(-1), f = H(e.placement), l = H(0), h = H(0), m = H(0), p = B(() => document.documentElement.scrollLeft), w = B(() => document.documentElement.scrollTop), { hostLeft: x, hostTop: v, hostWidth: g, hostHeight: b, hostBottom: y } = u;
|
|
6671
6675
|
oe(() => e.offsetX, (L) => {
|
|
6672
6676
|
i.value = L;
|
|
6673
6677
|
});
|
|
6674
6678
|
const k = B(() => {
|
|
6675
6679
|
const L = {
|
|
6676
6680
|
left: `${h.value}px`,
|
|
6677
|
-
top: `${
|
|
6681
|
+
top: `${m.value}px`,
|
|
6678
6682
|
transform: `translate(${i.value}px, ${r.value}px)`
|
|
6679
6683
|
};
|
|
6680
6684
|
return e.zIndex !== -1 && (L["z-index"] = e.zIndex), e.fitContent ? e.keepWidthWithReference && n.value && o.value >= n.value.getBoundingClientRect().width && (L.width = `${o.value}px`) : o.value !== -1 && (L.width = `${o.value}px`), e.minWidth !== -1 && (L.minWidth = `${e.minWidth}px`), e.customStyles && Object.assign(L, e.customStyles), a.value > 0 && (L.maxHeight = a.value + "px"), L;
|
|
@@ -6689,7 +6693,7 @@ function m1(e, t, n, u) {
|
|
|
6689
6693
|
}
|
|
6690
6694
|
}
|
|
6691
6695
|
function _(L, O) {
|
|
6692
|
-
const W =
|
|
6696
|
+
const W = g.value - L.width - 4;
|
|
6693
6697
|
return W > 0 ? W : O;
|
|
6694
6698
|
}
|
|
6695
6699
|
function X(L, O) {
|
|
@@ -6775,7 +6779,7 @@ function m1(e, t, n, u) {
|
|
|
6775
6779
|
const Q = z.get(f.value);
|
|
6776
6780
|
if (Q) {
|
|
6777
6781
|
const { arrowLeft: ne, popoverLeft: ce, popoverTop: Ae, maxHeight: ke } = Q(ee, O, W);
|
|
6778
|
-
l.value = ne, h.value = ce,
|
|
6782
|
+
l.value = ne, h.value = ce, m.value = Ae, a.value = ke || -1;
|
|
6779
6783
|
}
|
|
6780
6784
|
}
|
|
6781
6785
|
function I(L) {
|
|
@@ -6785,7 +6789,7 @@ function m1(e, t, n, u) {
|
|
|
6785
6789
|
}
|
|
6786
6790
|
}
|
|
6787
6791
|
function P() {
|
|
6788
|
-
f.value = e.placement, l.value = 0, h.value = 0,
|
|
6792
|
+
f.value = e.placement, l.value = 0, h.value = 0, m.value = 0, o.value = -1;
|
|
6789
6793
|
}
|
|
6790
6794
|
return {
|
|
6791
6795
|
arrowStyle: F,
|
|
@@ -6801,28 +6805,28 @@ function m1(e, t, n, u) {
|
|
|
6801
6805
|
function g1(e, t, n, u, i, r, o) {
|
|
6802
6806
|
const a = H(e.visible), s = B(() => a.value), { fitToReference: c, locateToReference: f, resetPosition: l } = o;
|
|
6803
6807
|
let h;
|
|
6804
|
-
async function
|
|
6808
|
+
async function m() {
|
|
6805
6809
|
a.value && (e.beforeClose && typeof e.beforeClose == "function" && !await e.beforeClose() || (a.value = !1, document.body.removeEventListener("click", h), document.body.removeEventListener("mousedown", h), document.body.removeEventListener("wheel", h, !0), document.removeEventListener("scroll", h), l(), t.emit("hidden")));
|
|
6806
6810
|
}
|
|
6807
6811
|
h = (w) => {
|
|
6808
|
-
var
|
|
6812
|
+
var g;
|
|
6809
6813
|
if (!i.value)
|
|
6810
6814
|
return;
|
|
6811
6815
|
const x = i.value.contains(w.target);
|
|
6812
6816
|
if (w.type === "scroll" || w.type === "wheel" && x) {
|
|
6813
|
-
|
|
6817
|
+
m();
|
|
6814
6818
|
return;
|
|
6815
6819
|
}
|
|
6816
6820
|
if (w.target.closest(".time-picker-panel"))
|
|
6817
6821
|
return;
|
|
6818
|
-
const v = (
|
|
6822
|
+
const v = (g = w.target) == null ? void 0 : g.closest(".popover");
|
|
6819
6823
|
if (v && u.value && v === u.value) {
|
|
6820
6824
|
w.type !== "scroll" && w.type !== "wheel" && w.stopPropagation();
|
|
6821
6825
|
return;
|
|
6822
6826
|
}
|
|
6823
6827
|
if (!x && a.value) {
|
|
6824
6828
|
const b = i.value.closest(".popover");
|
|
6825
|
-
b && b.removeEventListener("click", h),
|
|
6829
|
+
b && b.removeEventListener("click", h), m();
|
|
6826
6830
|
}
|
|
6827
6831
|
};
|
|
6828
6832
|
async function p(w) {
|
|
@@ -6832,7 +6836,7 @@ function g1(e, t, n, u, i, r, o) {
|
|
|
6832
6836
|
x && x.addEventListener("click", h), t.emit("shown");
|
|
6833
6837
|
}
|
|
6834
6838
|
}
|
|
6835
|
-
return t.expose({ hide:
|
|
6839
|
+
return t.expose({ hide: m, popoverRef: u, show: p, shown: s, isShow: a }), { showPopover: a, hidePopverOnClickBodyHandler: h };
|
|
6836
6840
|
}
|
|
6837
6841
|
function b1(e, t, n, u, i, r) {
|
|
6838
6842
|
const { popoverWidth: o, fitToReference: a, followToReferencePosition: s } = i;
|
|
@@ -6861,7 +6865,7 @@ function v1(e, t = 500) {
|
|
|
6861
6865
|
cleanup: r
|
|
6862
6866
|
};
|
|
6863
6867
|
}
|
|
6864
|
-
const
|
|
6868
|
+
const Dn = /* @__PURE__ */ ie({
|
|
6865
6869
|
name: "FXPopover",
|
|
6866
6870
|
props: h1,
|
|
6867
6871
|
emits: ["shown", "hidden"],
|
|
@@ -6872,14 +6876,14 @@ const Sn = /* @__PURE__ */ ie({
|
|
|
6872
6876
|
position: f,
|
|
6873
6877
|
arrowStyle: l,
|
|
6874
6878
|
popoverStyle: h,
|
|
6875
|
-
fitToReference:
|
|
6879
|
+
fitToReference: m,
|
|
6876
6880
|
locateToReference: p
|
|
6877
6881
|
} = c, {
|
|
6878
6882
|
showPopover: w,
|
|
6879
6883
|
hidePopverOnClickBodyHandler: x
|
|
6880
6884
|
} = g1(e, t, n, u, i, r, c), {
|
|
6881
6885
|
onResize: v
|
|
6882
|
-
} = b1(e, t, i, r, c, u),
|
|
6886
|
+
} = b1(e, t, i, r, c, u), g = B(() => {
|
|
6883
6887
|
let S = f.value;
|
|
6884
6888
|
S === "top-left" && (S = "top");
|
|
6885
6889
|
const _ = `popover in popover-${S}`, X = `bs-popover-${S}`, $ = {
|
|
@@ -6900,7 +6904,7 @@ const Sn = /* @__PURE__ */ ie({
|
|
|
6900
6904
|
} = v1(y, 50);
|
|
6901
6905
|
return Ie(() => {
|
|
6902
6906
|
var S;
|
|
6903
|
-
r.value &&
|
|
6907
|
+
r.value && m(i.value), e.reference && p(i.value), window.addEventListener("resize", v), (S = u.value) == null || S.focus();
|
|
6904
6908
|
}), Gt(() => {
|
|
6905
6909
|
document.body.removeEventListener("click", x), window.removeEventListener("resize", v), w.value = !1;
|
|
6906
6910
|
}), () => d(uo, {
|
|
@@ -6911,7 +6915,7 @@ const Sn = /* @__PURE__ */ ie({
|
|
|
6911
6915
|
return [vr(d("div", {
|
|
6912
6916
|
tabindex: "-1",
|
|
6913
6917
|
ref: u,
|
|
6914
|
-
class:
|
|
6918
|
+
class: g.value,
|
|
6915
6919
|
style: {
|
|
6916
6920
|
...h.value,
|
|
6917
6921
|
...F.value
|
|
@@ -6959,8 +6963,8 @@ const x1 = {
|
|
|
6959
6963
|
unMounted: (e, t, n) => {
|
|
6960
6964
|
}
|
|
6961
6965
|
};
|
|
6962
|
-
|
|
6963
|
-
e.component(
|
|
6966
|
+
Dn.install = (e) => {
|
|
6967
|
+
e.component(Dn.name, Dn), e.directive("fxpopover", x1);
|
|
6964
6968
|
};
|
|
6965
6969
|
const w1 = {
|
|
6966
6970
|
type: {
|
|
@@ -7099,8 +7103,8 @@ const w1 = {
|
|
|
7099
7103
|
updatePropertyValue: i,
|
|
7100
7104
|
startStreaming: r
|
|
7101
7105
|
} = oo();
|
|
7102
|
-
u("title", e.title ?? ""), u("task", e.task ?? ""), u("detail", e.message ?? ""), oe([() => e.title, () => e.task, () => e.message], ([
|
|
7103
|
-
i("title",
|
|
7106
|
+
u("title", e.title ?? ""), u("task", e.task ?? ""), u("detail", e.message ?? ""), oe([() => e.title, () => e.task, () => e.message], ([m, p, w]) => {
|
|
7107
|
+
i("title", m ?? ""), i("task", p ?? ""), i("detail", w ?? "");
|
|
7104
7108
|
});
|
|
7105
7109
|
const o = B(() => ["f-chat-todo-item", {
|
|
7106
7110
|
"is-done": e.status === "Done",
|
|
@@ -7114,14 +7118,14 @@ const w1 = {
|
|
|
7114
7118
|
t("click", e, e.id);
|
|
7115
7119
|
}
|
|
7116
7120
|
const c = B(() => e.outputMode === "streaming"), f = B(() => {
|
|
7117
|
-
var
|
|
7118
|
-
return c.value ? ((
|
|
7121
|
+
var m;
|
|
7122
|
+
return c.value ? ((m = n.title) == null ? void 0 : m.displayedValue) ?? "" : e.title ?? "";
|
|
7119
7123
|
}), l = B(() => {
|
|
7120
|
-
var
|
|
7121
|
-
return c.value ? ((
|
|
7124
|
+
var m;
|
|
7125
|
+
return c.value ? ((m = n.task) == null ? void 0 : m.displayedValue) ?? "" : e.task ?? "";
|
|
7122
7126
|
}), h = B(() => {
|
|
7123
|
-
var
|
|
7124
|
-
return c.value ? ((
|
|
7127
|
+
var m;
|
|
7128
|
+
return c.value ? ((m = n.detail) == null ? void 0 : m.displayedValue) ?? "" : e.message ?? "";
|
|
7125
7129
|
});
|
|
7126
7130
|
return Ie(() => {
|
|
7127
7131
|
c.value && r();
|
|
@@ -7129,7 +7133,7 @@ const w1 = {
|
|
|
7129
7133
|
key: e.id,
|
|
7130
7134
|
class: o.value,
|
|
7131
7135
|
onClick: s
|
|
7132
|
-
}, [e.todoList && e.todoList.length > 0 && d(
|
|
7136
|
+
}, [e.todoList && e.todoList.length > 0 && d(Fn, {
|
|
7133
7137
|
todoList: e.todoList,
|
|
7134
7138
|
status: e.status,
|
|
7135
7139
|
message: e.task,
|
|
@@ -7139,7 +7143,7 @@ const w1 = {
|
|
|
7139
7143
|
showLoading: e.showLoading,
|
|
7140
7144
|
showLabel: e.showLabel,
|
|
7141
7145
|
outputMode: e.outputMode
|
|
7142
|
-
}, null), !e.todoList || e.todoList.length === 0 && d(Ve, null, [e.showLoading && d(
|
|
7146
|
+
}, null), !e.todoList || e.todoList.length === 0 && d(Ve, null, [e.showLoading && d(gn, {
|
|
7143
7147
|
status: e.status ?? "Done",
|
|
7144
7148
|
variant: "todo"
|
|
7145
7149
|
}, null), f.value ? d("div", {
|
|
@@ -7175,7 +7179,7 @@ const w1 = {
|
|
|
7175
7179
|
Working: "正在执行任务",
|
|
7176
7180
|
Done: "已完成任务",
|
|
7177
7181
|
NotStart: "待执行任务"
|
|
7178
|
-
},
|
|
7182
|
+
}, Fn = /* @__PURE__ */ ie({
|
|
7179
7183
|
name: "FXStartedTodo",
|
|
7180
7184
|
props: w1,
|
|
7181
7185
|
setup(e) {
|
|
@@ -7196,24 +7200,24 @@ const w1 = {
|
|
|
7196
7200
|
}
|
|
7197
7201
|
function f() {
|
|
7198
7202
|
e.detailViewMode !== "expand" && (u.value != null && (window.clearTimeout(u.value), u.value = null), i.value = window.setTimeout(() => {
|
|
7199
|
-
var
|
|
7200
|
-
(b = (
|
|
7203
|
+
var g, b;
|
|
7204
|
+
(b = (g = n.value) == null ? void 0 : g.hide) == null || b.call(g), i.value = null;
|
|
7201
7205
|
}, 150));
|
|
7202
7206
|
}
|
|
7203
7207
|
function l() {
|
|
7204
7208
|
if (e.detailViewMode === "none")
|
|
7205
7209
|
return null;
|
|
7206
|
-
const
|
|
7207
|
-
return d(Ve, null, [
|
|
7210
|
+
const g = o.value.detail ?? "";
|
|
7211
|
+
return d(Ve, null, [g ? d("div", {
|
|
7208
7212
|
class: "f-chat-started-todo-task-detail"
|
|
7209
|
-
}, [
|
|
7213
|
+
}, [g]) : null, d(Er, {
|
|
7210
7214
|
items: e.todoList
|
|
7211
7215
|
}, null)]);
|
|
7212
7216
|
}
|
|
7213
7217
|
function h() {
|
|
7214
7218
|
e.detailViewMode === "expand" && (a.value = !a.value);
|
|
7215
7219
|
}
|
|
7216
|
-
function
|
|
7220
|
+
function m() {
|
|
7217
7221
|
return e.detailViewMode === "expand" ? d("i", {
|
|
7218
7222
|
class: "fx-icon fx-icon-foldup",
|
|
7219
7223
|
style: {
|
|
@@ -7223,7 +7227,7 @@ const w1 = {
|
|
|
7223
7227
|
}, null) : null;
|
|
7224
7228
|
}
|
|
7225
7229
|
function p() {
|
|
7226
|
-
return e.detailViewMode === "hover" && d(
|
|
7230
|
+
return e.detailViewMode === "hover" && d(Dn, {
|
|
7227
7231
|
ref: n,
|
|
7228
7232
|
class: "f-chat-started-todo-popover"
|
|
7229
7233
|
}, {
|
|
@@ -7237,18 +7241,18 @@ const w1 = {
|
|
|
7237
7241
|
});
|
|
7238
7242
|
}
|
|
7239
7243
|
const w = B(() => e.listStatus === "completed"), x = B(() => {
|
|
7240
|
-
const
|
|
7244
|
+
const g = e.todoList ?? [], b = e.totalCount ?? g.length;
|
|
7241
7245
|
return {
|
|
7242
|
-
done: e.completedCount ??
|
|
7246
|
+
done: e.completedCount ?? g.filter((k) => (k == null ? void 0 : k.status) === "Done").length,
|
|
7243
7247
|
total: b
|
|
7244
7248
|
};
|
|
7245
7249
|
});
|
|
7246
7250
|
function v() {
|
|
7247
7251
|
if (!w.value) return null;
|
|
7248
7252
|
const {
|
|
7249
|
-
done:
|
|
7253
|
+
done: g,
|
|
7250
7254
|
total: b
|
|
7251
|
-
} = x.value, y = b > 0 ? `已完成 (${
|
|
7255
|
+
} = x.value, y = b > 0 ? `已完成 (${g}/${b})` : "已完成";
|
|
7252
7256
|
return d("span", {
|
|
7253
7257
|
class: "f-chat-started-todo-completed-chip",
|
|
7254
7258
|
"aria-label": y
|
|
@@ -7270,13 +7274,13 @@ const w1 = {
|
|
|
7270
7274
|
}, [_1[e.status]]), d("span", {
|
|
7271
7275
|
class: "f-chat-started-todo-message",
|
|
7272
7276
|
innerHTML: e.message
|
|
7273
|
-
}, null), v(),
|
|
7277
|
+
}, null), v(), m()]), e.detailViewMode === "expand" && d("div", {
|
|
7274
7278
|
class: s.value
|
|
7275
7279
|
}, [l()]), p()]);
|
|
7276
7280
|
}
|
|
7277
7281
|
});
|
|
7278
|
-
|
|
7279
|
-
e.component(
|
|
7282
|
+
Fn.install = (e) => {
|
|
7283
|
+
e.component(Fn.name, Fn);
|
|
7280
7284
|
};
|
|
7281
7285
|
const E1 = /* @__PURE__ */ ie({
|
|
7282
7286
|
name: "FXBubbleThoughtChain",
|
|
@@ -7295,8 +7299,8 @@ const E1 = /* @__PURE__ */ ie({
|
|
|
7295
7299
|
var l;
|
|
7296
7300
|
return ((l = e.content) == null ? void 0 : l.message) ?? "正在思考......";
|
|
7297
7301
|
}), c = B(() => {
|
|
7298
|
-
var
|
|
7299
|
-
const l = ((
|
|
7302
|
+
var m, p;
|
|
7303
|
+
const l = ((m = e.content) == null ? void 0 : m.doneMessage) ?? ((p = e.content) == null ? void 0 : p.message) ?? "思考完成", h = u.value ? `(用时${n.value}秒)` : "";
|
|
7300
7304
|
return "" + l + h;
|
|
7301
7305
|
}), f = B(() => a.value ? c.value : s.value);
|
|
7302
7306
|
return oe(() => {
|
|
@@ -7315,12 +7319,12 @@ const E1 = /* @__PURE__ */ ie({
|
|
|
7315
7319
|
}
|
|
7316
7320
|
}
|
|
7317
7321
|
}), () => {
|
|
7318
|
-
var l, h,
|
|
7319
|
-
return e.content ? d(
|
|
7322
|
+
var l, h, m, p, w, x;
|
|
7323
|
+
return e.content ? d(Fn, {
|
|
7320
7324
|
status: ((l = e.content) == null ? void 0 : l.status) ?? "Working",
|
|
7321
7325
|
message: f.value,
|
|
7322
7326
|
todoList: (h = e.content) == null ? void 0 : h.todoList,
|
|
7323
|
-
detailViewMode: ((
|
|
7327
|
+
detailViewMode: ((m = e.content) == null ? void 0 : m.detailViewMode) ?? "expand",
|
|
7324
7328
|
showLabel: !1,
|
|
7325
7329
|
showLoading: !0,
|
|
7326
7330
|
initExpanded: !0,
|
|
@@ -7409,10 +7413,10 @@ const E1 = /* @__PURE__ */ ie({
|
|
|
7409
7413
|
class: "f-chat-tool-use-name"
|
|
7410
7414
|
}, [e.content.toolDescription ?? "tool"]), d("div", {
|
|
7411
7415
|
class: l.value
|
|
7412
|
-
}, [u.value ? d(
|
|
7416
|
+
}, [u.value ? d(gn, {
|
|
7413
7417
|
status: "Error",
|
|
7414
7418
|
variant: "tool-use"
|
|
7415
|
-
}, null) : d(
|
|
7419
|
+
}, null) : d(gn, {
|
|
7416
7420
|
status: o.value ? "Done" : a.value ? "Working" : "NotStart",
|
|
7417
7421
|
variant: "tool-use"
|
|
7418
7422
|
}, null), d("span", {
|
|
@@ -7473,7 +7477,7 @@ const Yu = /* @__PURE__ */ ie({
|
|
|
7473
7477
|
}, {
|
|
7474
7478
|
renderFileEmbeddedContent: l,
|
|
7475
7479
|
renderPageEmbeddedContent: h
|
|
7476
|
-
} = ys(),
|
|
7480
|
+
} = ys(), m = H(""), p = B(() => {
|
|
7477
7481
|
var G, q;
|
|
7478
7482
|
if ((G = e.content) != null && G.footerContent)
|
|
7479
7483
|
return e.content.footerContent;
|
|
@@ -7492,7 +7496,7 @@ const Yu = /* @__PURE__ */ ie({
|
|
|
7492
7496
|
return (R = p.value) == null ? void 0 : R.width;
|
|
7493
7497
|
}, (R) => {
|
|
7494
7498
|
if (!R) {
|
|
7495
|
-
|
|
7499
|
+
m.value = "";
|
|
7496
7500
|
return;
|
|
7497
7501
|
}
|
|
7498
7502
|
if (R.endsWith("%")) {
|
|
@@ -7500,10 +7504,10 @@ const Yu = /* @__PURE__ */ ie({
|
|
|
7500
7504
|
isNaN(G) || De(() => {
|
|
7501
7505
|
var T, C;
|
|
7502
7506
|
const q = (C = (T = n.value) == null ? void 0 : T.parentElement) == null ? void 0 : C.clientWidth;
|
|
7503
|
-
q && (
|
|
7507
|
+
q && (m.value = `${q * G / 100}px`);
|
|
7504
7508
|
});
|
|
7505
7509
|
} else
|
|
7506
|
-
|
|
7510
|
+
m.value = R;
|
|
7507
7511
|
}, {
|
|
7508
7512
|
immediate: !0
|
|
7509
7513
|
});
|
|
@@ -7516,7 +7520,7 @@ const Yu = /* @__PURE__ */ ie({
|
|
|
7516
7520
|
return e.header === "ContentHeader" ? vc : yc;
|
|
7517
7521
|
}
|
|
7518
7522
|
const v = x(), {
|
|
7519
|
-
renderHeader:
|
|
7523
|
+
renderHeader: g
|
|
7520
7524
|
} = v(e, t), b = () => {
|
|
7521
7525
|
var q, T, C;
|
|
7522
7526
|
const R = ((q = e.content) == null ? void 0 : q.sender) ?? "发送人", G = w(((T = e.content) == null ? void 0 : T.sender) ?? "");
|
|
@@ -7615,7 +7619,7 @@ const Yu = /* @__PURE__ */ ie({
|
|
|
7615
7619
|
const R = p.value;
|
|
7616
7620
|
if (!R) return null;
|
|
7617
7621
|
const G = {};
|
|
7618
|
-
return
|
|
7622
|
+
return m.value && (G.width = m.value), R.height && (G.height = `${R.height}px`), d("div", {
|
|
7619
7623
|
class: "f-chat-bubble-content-footer",
|
|
7620
7624
|
style: G
|
|
7621
7625
|
}, [S(R)]);
|
|
@@ -7645,7 +7649,7 @@ const Yu = /* @__PURE__ */ ie({
|
|
|
7645
7649
|
var R, G, q, T, C, D;
|
|
7646
7650
|
return d("div", {
|
|
7647
7651
|
class: `f-chat-bubble-content ${e.placement}`
|
|
7648
|
-
}, [o.value &&
|
|
7652
|
+
}, [o.value && g(), $(), d("div", {
|
|
7649
7653
|
class: `f-chat-bubble-content-text-wrapper ${e.placement}`
|
|
7650
7654
|
}, [(R = e.content) != null && R.compositeOrderedBeforeMarkdownRender ? e.content.compositeOrderedBeforeMarkdownRender() : d(Ve, null, [k(), y()]), F(), _(), d(l1, {
|
|
7651
7655
|
title: ((G = e.content) == null ? void 0 : G.title) ?? "",
|
|
@@ -7837,13 +7841,13 @@ const F1 = {
|
|
|
7837
7841
|
alt: (h = e.item.title) == null ? void 0 : h.toString()
|
|
7838
7842
|
}, null) : null;
|
|
7839
7843
|
}, o = () => {
|
|
7840
|
-
var f, l, h,
|
|
7844
|
+
var f, l, h, m;
|
|
7841
7845
|
return e.item.content ? d("div", {
|
|
7842
7846
|
class: ["fx-carousel--item-content", (f = e.classNames) == null ? void 0 : f.content],
|
|
7843
7847
|
style: (l = e.styles) == null ? void 0 : l.content
|
|
7844
7848
|
}, [e.item.content]) : t.default ? d("div", {
|
|
7845
7849
|
class: ["fx-carousel--item-content", (h = e.classNames) == null ? void 0 : h.content],
|
|
7846
|
-
style: (
|
|
7850
|
+
style: (m = e.styles) == null ? void 0 : m.content
|
|
7847
7851
|
}, [t.default()]) : null;
|
|
7848
7852
|
}, a = () => {
|
|
7849
7853
|
var f, l;
|
|
@@ -7886,19 +7890,19 @@ function I1(e) {
|
|
|
7886
7890
|
};
|
|
7887
7891
|
}), h = (b) => {
|
|
7888
7892
|
b < 0 || b >= c.value || (o.value, o.value = b);
|
|
7889
|
-
},
|
|
7893
|
+
}, m = () => {
|
|
7890
7894
|
f.value || (o.value === c.value - 1 ? h(i ? 0 : o.value) : h(o.value + 1));
|
|
7891
7895
|
}, p = () => {
|
|
7892
7896
|
f.value || (o.value === 0 ? h(i ? c.value - 1 : 0) : h(o.value - 1));
|
|
7893
7897
|
}, w = () => {
|
|
7894
7898
|
!n || f.value || (x(), s.value = window.setInterval(() => {
|
|
7895
|
-
a.value ||
|
|
7899
|
+
a.value || m();
|
|
7896
7900
|
}, u));
|
|
7897
7901
|
}, x = () => {
|
|
7898
7902
|
s.value && (clearInterval(s.value), s.value = null);
|
|
7899
7903
|
}, v = () => {
|
|
7900
7904
|
a.value = !0, n && x();
|
|
7901
|
-
},
|
|
7905
|
+
}, g = () => {
|
|
7902
7906
|
a.value = !1, n && w();
|
|
7903
7907
|
};
|
|
7904
7908
|
return Ie(() => {
|
|
@@ -7911,10 +7915,10 @@ function I1(e) {
|
|
|
7911
7915
|
isSingleItem: f,
|
|
7912
7916
|
trackStyle: l,
|
|
7913
7917
|
goTo: h,
|
|
7914
|
-
next:
|
|
7918
|
+
next: m,
|
|
7915
7919
|
prev: p,
|
|
7916
7920
|
handleMouseEnter: v,
|
|
7917
|
-
handleMouseLeave:
|
|
7921
|
+
handleMouseLeave: g
|
|
7918
7922
|
};
|
|
7919
7923
|
}
|
|
7920
7924
|
const Ku = /* @__PURE__ */ ie({
|
|
@@ -7952,7 +7956,7 @@ const Ku = /* @__PURE__ */ ie({
|
|
|
7952
7956
|
"fx-carousel--button-inner": e.buttonPosition === "inner"
|
|
7953
7957
|
};
|
|
7954
7958
|
return Se(k, (F = e.classNames) == null ? void 0 : F.root);
|
|
7955
|
-
}),
|
|
7959
|
+
}), m = B(() => {
|
|
7956
7960
|
var S;
|
|
7957
7961
|
const k = {
|
|
7958
7962
|
height: typeof e.height == "number" ? `${e.height}px` : e.height
|
|
@@ -7987,7 +7991,7 @@ const Ku = /* @__PURE__ */ ie({
|
|
|
7987
7991
|
"fx-carousel--arrow-never": e.arrowVisibility === "never" || !e.showArrow
|
|
7988
7992
|
};
|
|
7989
7993
|
return F[`fx-carousel--arrow-${e.buttonPosition}`] = !0, Se(F, k === "left" ? (S = e.classNames) == null ? void 0 : S.arrowLeft : (_ = e.classNames) == null ? void 0 : _.arrowRight);
|
|
7990
|
-
},
|
|
7994
|
+
}, g = (k) => {
|
|
7991
7995
|
var _, X;
|
|
7992
7996
|
if (i.value) return null;
|
|
7993
7997
|
const F = k === "left" ? s : a, S = t[k === "left" ? "prevArrow" : "nextArrow"];
|
|
@@ -8051,13 +8055,13 @@ const Ku = /* @__PURE__ */ ie({
|
|
|
8051
8055
|
var k;
|
|
8052
8056
|
return d("div", {
|
|
8053
8057
|
class: h.value,
|
|
8054
|
-
style:
|
|
8058
|
+
style: m.value,
|
|
8055
8059
|
onMouseenter: c,
|
|
8056
8060
|
onMouseleave: f
|
|
8057
|
-
}, [e.buttonPosition === "outer" &&
|
|
8061
|
+
}, [e.buttonPosition === "outer" && g("left"), d("div", {
|
|
8058
8062
|
class: p.value,
|
|
8059
8063
|
style: (k = e.styles) == null ? void 0 : k.container
|
|
8060
|
-
}, [e.buttonPosition === "inner" &&
|
|
8064
|
+
}, [e.buttonPosition === "inner" && g("left"), y(), e.buttonPosition === "inner" && g("right")]), e.buttonPosition === "outer" && g("right"), b()]);
|
|
8061
8065
|
};
|
|
8062
8066
|
}
|
|
8063
8067
|
});
|
|
@@ -8084,55 +8088,55 @@ function L1(e) {
|
|
|
8084
8088
|
};
|
|
8085
8089
|
return i.value > 0 && (x.cursor = "n-resize"), x;
|
|
8086
8090
|
});
|
|
8087
|
-
function f(x, v,
|
|
8091
|
+
function f(x, v, g, b) {
|
|
8088
8092
|
const y = e.value;
|
|
8089
8093
|
if (y) {
|
|
8090
8094
|
const { left: k, right: F, width: S } = y.getBoundingClientRect();
|
|
8091
8095
|
let _ = x.clientX - k;
|
|
8092
|
-
b === "right" && (_ = F - x.clientX), _ > v && (_ = v), _ <
|
|
8096
|
+
b === "right" && (_ = F - x.clientX), _ > v && (_ = v), _ < g && (_ = g), b === "right" && (_ = S - _), u.value = _;
|
|
8093
8097
|
}
|
|
8094
8098
|
}
|
|
8095
|
-
function l(x, v,
|
|
8099
|
+
function l(x, v, g, b) {
|
|
8096
8100
|
const y = e.value;
|
|
8097
8101
|
if (y) {
|
|
8098
8102
|
const { top: k, bottom: F, height: S } = y.getBoundingClientRect();
|
|
8099
8103
|
let _ = x.clientY - k;
|
|
8100
|
-
b === "bottom" && (_ = F - x.clientY), _ > v && (_ = v), _ <
|
|
8104
|
+
b === "bottom" && (_ = F - x.clientY), _ > v && (_ = v), _ < g && (_ = g), b === "bottom" && (_ = S - _), i.value = _;
|
|
8101
8105
|
}
|
|
8102
8106
|
}
|
|
8103
8107
|
function h() {
|
|
8104
8108
|
const x = e.value;
|
|
8105
8109
|
if (x) {
|
|
8106
|
-
const { width: v, height:
|
|
8107
|
-
return { width: v, height:
|
|
8110
|
+
const { width: v, height: g } = x.getBoundingClientRect();
|
|
8111
|
+
return { width: v, height: g };
|
|
8108
8112
|
}
|
|
8109
8113
|
return null;
|
|
8110
8114
|
}
|
|
8111
|
-
function
|
|
8115
|
+
function m() {
|
|
8112
8116
|
const x = e.value;
|
|
8113
|
-
return x ? Array.from(x.querySelectorAll("[data-position]")).reduce((v,
|
|
8114
|
-
const b =
|
|
8115
|
-
return v = Object.assign(v, { [b]:
|
|
8117
|
+
return x ? Array.from(x.querySelectorAll("[data-position]")).reduce((v, g) => {
|
|
8118
|
+
const b = g.getAttribute("data-position");
|
|
8119
|
+
return v = Object.assign(v, { [b]: g }), v;
|
|
8116
8120
|
}, {}) : null;
|
|
8117
8121
|
}
|
|
8118
8122
|
function p(x, v) {
|
|
8119
|
-
const
|
|
8120
|
-
if (
|
|
8123
|
+
const g = h(), b = m();
|
|
8124
|
+
if (g && b) {
|
|
8121
8125
|
const y = b == null ? void 0 : b.right, k = b == null ? void 0 : b.left;
|
|
8122
8126
|
if (x === "left" && k)
|
|
8123
|
-
return y ?
|
|
8127
|
+
return y ? g.width - y.clientWidth - v : g.width - v;
|
|
8124
8128
|
if (x === "right" && y)
|
|
8125
|
-
return k ?
|
|
8129
|
+
return k ? g.width - k.clientWidth - v : g.width - v;
|
|
8126
8130
|
}
|
|
8127
8131
|
}
|
|
8128
8132
|
function w(x, v) {
|
|
8129
|
-
const
|
|
8130
|
-
if (
|
|
8133
|
+
const g = h(), b = m();
|
|
8134
|
+
if (g && b) {
|
|
8131
8135
|
const y = b == null ? void 0 : b.bottom, k = b == null ? void 0 : b.top;
|
|
8132
8136
|
if (x === "top" && k)
|
|
8133
|
-
return y ?
|
|
8137
|
+
return y ? g.height - y.clientHeight - v : g.height - v;
|
|
8134
8138
|
if (x === "bottom" && y)
|
|
8135
|
-
return k ?
|
|
8139
|
+
return k ? g.height - k.clientHeight - v : g.height - v;
|
|
8136
8140
|
}
|
|
8137
8141
|
}
|
|
8138
8142
|
return {
|
|
@@ -8225,16 +8229,16 @@ function P1(e, t) {
|
|
|
8225
8229
|
draggingHorizontalResizeHandle: f,
|
|
8226
8230
|
draggingVerticalResizeHandle: l,
|
|
8227
8231
|
getPanelMaxWidth: h,
|
|
8228
|
-
getPanelMaxHeight:
|
|
8232
|
+
getPanelMaxHeight: m
|
|
8229
8233
|
} = t;
|
|
8230
8234
|
let p = "", w, x, v;
|
|
8231
|
-
const
|
|
8235
|
+
const g = () => e.maxWidth ? e.maxWidth : h(p, e.minWidth) || 0, b = () => e.maxHeight ? e.maxHeight : m(p, e.minHeight) || 0;
|
|
8232
8236
|
function y(S) {
|
|
8233
8237
|
if ((p === "left" || p === "right") && x) {
|
|
8234
8238
|
const { left: _ } = x.getBoundingClientRect(), { width: X } = w.getBoundingClientRect(), $ = S.clientX - _;
|
|
8235
8239
|
let N = p === "left" ? (X || 0) + ($ - i.value) : (X || 0) - ($ - i.value);
|
|
8236
8240
|
N = e.minWidth > 0 ? Math.max(e.minWidth, N) : N;
|
|
8237
|
-
const U =
|
|
8241
|
+
const U = g();
|
|
8238
8242
|
U != null && U > 0 && (N = U > N ? N : U), n.value = N;
|
|
8239
8243
|
}
|
|
8240
8244
|
if ((p === "top" || p === "bottom") && x) {
|
|
@@ -8250,7 +8254,7 @@ function P1(e, t) {
|
|
|
8250
8254
|
if (p = _, w = X, o.value = !0, x = S.composedPath().find((N) => N.className.split(" ")[0] === "f-splitter"), x) {
|
|
8251
8255
|
const { left: N } = x.getBoundingClientRect();
|
|
8252
8256
|
r.value = S.clientX - N, i.value = S.clientX - N;
|
|
8253
|
-
const U =
|
|
8257
|
+
const U = g();
|
|
8254
8258
|
v = (R) => f(R, U, e.minWidth, p), document.addEventListener("mousemove", v), document.addEventListener("mouseup", y), document.body.style.userSelect = "none";
|
|
8255
8259
|
}
|
|
8256
8260
|
}
|
|
@@ -8290,7 +8294,7 @@ const Sr = /* @__PURE__ */ ie({
|
|
|
8290
8294
|
"has-resize-bar": e.resizable
|
|
8291
8295
|
};
|
|
8292
8296
|
return b["f-splitter-pane-" + f.value] = !0, Se(b, e == null ? void 0 : e.customClass);
|
|
8293
|
-
}), h = B(() => e.resizeHandle ? e.resizeHandle.split(",").filter((b) => ["e", "n", "s", "w"].find((y) => y === b)) : []),
|
|
8297
|
+
}), h = B(() => e.resizeHandle ? e.resizeHandle.split(",").filter((b) => ["e", "n", "s", "w"].find((y) => y === b)) : []), m = B(() => {
|
|
8294
8298
|
const b = {};
|
|
8295
8299
|
return (a.value || a.value === 0) && (f.value === "left" || f.value === "right" || h.value.find((y) => y === "e") || h.value.find((y) => y === "w")) && (b.width = `${a.value}px`), (o.value || o.value === 0) && (f.value === "bottom" || f.value === "top" || h.value.find((y) => y === "s") || h.value.find((y) => y === "n")) && (b.height = `${o.value}px`), e.visible || (b.display = "none"), Me(b, e == null ? void 0 : e.customStyle);
|
|
8296
8300
|
}), p = B(() => ({
|
|
@@ -8320,15 +8324,15 @@ const Sr = /* @__PURE__ */ ie({
|
|
|
8320
8324
|
onMousedown: (b) => x(b, f.value)
|
|
8321
8325
|
}, null);
|
|
8322
8326
|
}
|
|
8323
|
-
function
|
|
8324
|
-
a.value = e.width, o.value = e.height,
|
|
8327
|
+
function g() {
|
|
8328
|
+
a.value = e.width, o.value = e.height, m.value;
|
|
8325
8329
|
}
|
|
8326
8330
|
return t.expose({
|
|
8327
|
-
reset:
|
|
8331
|
+
reset: g
|
|
8328
8332
|
}), () => d("div", {
|
|
8329
8333
|
ref: n,
|
|
8330
8334
|
class: l.value,
|
|
8331
|
-
style:
|
|
8335
|
+
style: m.value,
|
|
8332
8336
|
"data-position": f.value
|
|
8333
8337
|
}, [t.slots.default && t.slots.default(), e.resizable && v()]);
|
|
8334
8338
|
}
|
|
@@ -8809,7 +8813,7 @@ const tp = {
|
|
|
8809
8813
|
y.touches[0].clientX - y.touches[1].clientX,
|
|
8810
8814
|
y.touches[0].clientY - y.touches[1].clientY
|
|
8811
8815
|
), f = u);
|
|
8812
|
-
},
|
|
8816
|
+
}, m = (y) => {
|
|
8813
8817
|
if (y.preventDefault(), o && y.touches.length === 1)
|
|
8814
8818
|
i = y.touches[0].clientX - a, r = y.touches[0].clientY - s, l();
|
|
8815
8819
|
else if (y.touches.length === 2) {
|
|
@@ -8833,13 +8837,13 @@ const tp = {
|
|
|
8833
8837
|
o = !0, a = y.clientX - i, s = y.clientY - r;
|
|
8834
8838
|
}, v = (y) => {
|
|
8835
8839
|
o && (i = y.clientX - a, r = y.clientY - s, l());
|
|
8836
|
-
},
|
|
8840
|
+
}, g = () => {
|
|
8837
8841
|
o = !1;
|
|
8838
8842
|
}, b = () => {
|
|
8839
8843
|
o = !1;
|
|
8840
8844
|
};
|
|
8841
|
-
return t.addEventListener("touchstart", h, { passive: !1 }), t.addEventListener("touchmove",
|
|
8842
|
-
t.removeEventListener("touchstart", h), t.removeEventListener("touchmove",
|
|
8845
|
+
return t.addEventListener("touchstart", h, { passive: !1 }), t.addEventListener("touchmove", m, { passive: !1 }), t.addEventListener("touchend", p), t.addEventListener("wheel", w, { passive: !1 }), t.addEventListener("mousedown", x), t.addEventListener("mousemove", v), t.addEventListener("mouseup", g), t.addEventListener("mouseleave", b), () => {
|
|
8846
|
+
t.removeEventListener("touchstart", h), t.removeEventListener("touchmove", m), t.removeEventListener("touchend", p), t.removeEventListener("wheel", w), t.removeEventListener("mousedown", x), t.removeEventListener("mousemove", v), t.removeEventListener("mouseup", g), t.removeEventListener("mouseleave", b);
|
|
8843
8847
|
};
|
|
8844
8848
|
};
|
|
8845
8849
|
return (t, n) => {
|
|
@@ -9024,19 +9028,19 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9024
9028
|
constructor(t) {
|
|
9025
9029
|
super(t), this.fill(0);
|
|
9026
9030
|
}
|
|
9027
|
-
}, Pt,
|
|
9031
|
+
}, Pt, In, gp = (Pt = class {
|
|
9028
9032
|
constructor(t, n) {
|
|
9029
9033
|
me(this, "heap");
|
|
9030
9034
|
me(this, "length");
|
|
9031
|
-
if (!A(Pt,
|
|
9035
|
+
if (!A(Pt, In)) throw new TypeError("instantiate Stack using Stack.create(n)");
|
|
9032
9036
|
this.heap = new n(t), this.length = 0;
|
|
9033
9037
|
}
|
|
9034
9038
|
static create(t) {
|
|
9035
9039
|
let n = kl(t);
|
|
9036
9040
|
if (!n) return [];
|
|
9037
|
-
re(Pt,
|
|
9041
|
+
re(Pt, In, !0);
|
|
9038
9042
|
let u = new Pt(t, n);
|
|
9039
|
-
return re(Pt,
|
|
9043
|
+
return re(Pt, In, !1), u;
|
|
9040
9044
|
}
|
|
9041
9045
|
push(t) {
|
|
9042
9046
|
this.heap[this.length++] = t;
|
|
@@ -9044,7 +9048,7 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9044
9048
|
pop() {
|
|
9045
9049
|
return this.heap[--this.length];
|
|
9046
9050
|
}
|
|
9047
|
-
},
|
|
9051
|
+
}, In = new WeakMap(), le(Pt, In, !1), Pt), cs, ds, dt, ut, mt, hn, gt, On, Ln, bt, Te, vt, _e, ye, ae, qe, rt, Ue, Le, yt, Re, xt, wt, it, ot, At, en, Xe, Rn, Z, Zi, pn, Vt, vu, at, Cl, mn, Pn, yu, Zt, Yt, Yi, Ju, er, ve, Ki, Kn, Kt, Qi, Mn, bp = (Mn = class {
|
|
9048
9052
|
constructor(t) {
|
|
9049
9053
|
le(this, Z);
|
|
9050
9054
|
le(this, dt);
|
|
@@ -9052,8 +9056,8 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9052
9056
|
le(this, mt);
|
|
9053
9057
|
le(this, hn);
|
|
9054
9058
|
le(this, gt);
|
|
9055
|
-
le(this, In);
|
|
9056
9059
|
le(this, On);
|
|
9060
|
+
le(this, Ln);
|
|
9057
9061
|
le(this, bt);
|
|
9058
9062
|
me(this, "ttl");
|
|
9059
9063
|
me(this, "ttlResolution");
|
|
@@ -9088,7 +9092,7 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9088
9092
|
le(this, At);
|
|
9089
9093
|
le(this, en);
|
|
9090
9094
|
le(this, Xe);
|
|
9091
|
-
le(this,
|
|
9095
|
+
le(this, Rn);
|
|
9092
9096
|
le(this, pn, () => {
|
|
9093
9097
|
});
|
|
9094
9098
|
le(this, Vt, () => {
|
|
@@ -9098,14 +9102,14 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9098
9102
|
le(this, at, () => !1);
|
|
9099
9103
|
le(this, mn, (t) => {
|
|
9100
9104
|
});
|
|
9101
|
-
le(this,
|
|
9105
|
+
le(this, Pn, (t, n, u) => {
|
|
9102
9106
|
});
|
|
9103
9107
|
le(this, yu, (t, n, u, i) => {
|
|
9104
9108
|
if (u || i) throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");
|
|
9105
9109
|
return 0;
|
|
9106
9110
|
});
|
|
9107
9111
|
me(this, cs, "LRUCache");
|
|
9108
|
-
let { max: n = 0, ttl: u, ttlResolution: i = 1, ttlAutopurge: r, updateAgeOnGet: o, updateAgeOnHas: a, allowStale: s, dispose: c, onInsert: f, disposeAfter: l, noDisposeOnSet: h, noUpdateTTL:
|
|
9112
|
+
let { max: n = 0, ttl: u, ttlResolution: i = 1, ttlAutopurge: r, updateAgeOnGet: o, updateAgeOnHas: a, allowStale: s, dispose: c, onInsert: f, disposeAfter: l, noDisposeOnSet: h, noUpdateTTL: m, maxSize: p = 0, maxEntrySize: w = 0, sizeCalculation: x, fetchMethod: v, memoMethod: g, noDeleteOnFetchRejection: b, noDeleteOnStaleGet: y, allowStaleOnFetchRejection: k, allowStaleOnFetchAbort: F, ignoreFetchAbort: S, perf: _ } = t;
|
|
9109
9113
|
if (_ !== void 0 && typeof (_ == null ? void 0 : _.now) != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
9110
9114
|
if (re(this, bt, _ ?? pp), n !== 0 && !Xt(n)) throw new TypeError("max option must be a nonnegative integer");
|
|
9111
9115
|
let X = n ? kl(n) : Array;
|
|
@@ -9114,9 +9118,9 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9114
9118
|
if (!A(this, ut) && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
|
|
9115
9119
|
if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
|
|
9116
9120
|
}
|
|
9117
|
-
if (
|
|
9118
|
-
if (re(this,
|
|
9119
|
-
if (re(this,
|
|
9121
|
+
if (g !== void 0 && typeof g != "function") throw new TypeError("memoMethod must be a function if defined");
|
|
9122
|
+
if (re(this, Ln, g), v !== void 0 && typeof v != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
9123
|
+
if (re(this, On, v), re(this, en, !!v), re(this, _e, /* @__PURE__ */ new Map()), re(this, ye, new Array(n).fill(void 0)), re(this, ae, new Array(n).fill(void 0)), re(this, qe, new X(n)), re(this, rt, new X(n)), re(this, Ue, 0), re(this, Le, 0), re(this, yt, gp.create(n)), re(this, Te, 0), re(this, vt, 0), typeof c == "function" && re(this, mt, c), typeof f == "function" && re(this, hn, f), typeof l == "function" ? (re(this, gt, l), re(this, Re, [])) : (re(this, gt, void 0), re(this, Re, void 0)), re(this, At, !!A(this, mt)), re(this, Rn, !!A(this, hn)), re(this, Xe, !!A(this, gt)), this.noDisposeOnSet = !!h, this.noUpdateTTL = !!m, this.noDeleteOnFetchRejection = !!b, this.allowStaleOnFetchRejection = !!k, this.allowStaleOnFetchAbort = !!F, this.ignoreFetchAbort = !!S, this.maxEntrySize !== 0) {
|
|
9120
9124
|
if (A(this, ut) !== 0 && !Xt(A(this, ut))) throw new TypeError("maxSize must be a positive integer if specified");
|
|
9121
9125
|
if (!Xt(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
9122
9126
|
J(this, Z, Cl).call(this);
|
|
@@ -9128,7 +9132,7 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9128
9132
|
if (A(this, dt) === 0 && this.ttl === 0 && A(this, ut) === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
|
|
9129
9133
|
if (!this.ttlAutopurge && !A(this, dt) && !A(this, ut)) {
|
|
9130
9134
|
let $ = "LRU_CACHE_UNBOUNDED";
|
|
9131
|
-
mp($) && (wl.add($), Al("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", $,
|
|
9135
|
+
mp($) && (wl.add($), Al("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", $, Mn));
|
|
9132
9136
|
}
|
|
9133
9137
|
}
|
|
9134
9138
|
get perf() {
|
|
@@ -9172,10 +9176,10 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9172
9176
|
return A(this, Te);
|
|
9173
9177
|
}
|
|
9174
9178
|
get fetchMethod() {
|
|
9175
|
-
return A(this,
|
|
9179
|
+
return A(this, On);
|
|
9176
9180
|
}
|
|
9177
9181
|
get memoMethod() {
|
|
9178
|
-
return A(this,
|
|
9182
|
+
return A(this, Ln);
|
|
9179
9183
|
}
|
|
9180
9184
|
get dispose() {
|
|
9181
9185
|
return A(this, mt);
|
|
@@ -9280,12 +9284,12 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9280
9284
|
}
|
|
9281
9285
|
}
|
|
9282
9286
|
set(t, n, u = {}) {
|
|
9283
|
-
var h,
|
|
9287
|
+
var h, m, p, w, x, v, g;
|
|
9284
9288
|
if (n === void 0) return this.delete(t), this;
|
|
9285
9289
|
let { ttl: i = this.ttl, start: r, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: a = this.sizeCalculation, status: s } = u, { noUpdateTTL: c = this.noUpdateTTL } = u, f = A(this, yu).call(this, t, n, u.size || 0, a);
|
|
9286
9290
|
if (this.maxEntrySize && f > this.maxEntrySize) return s && (s.set = "miss", s.maxEntrySizeExceeded = !0), J(this, Z, Kt).call(this, t, "set"), this;
|
|
9287
9291
|
let l = A(this, Te) === 0 ? void 0 : A(this, _e).get(t);
|
|
9288
|
-
if (l === void 0) l = A(this, Te) === 0 ? A(this, Le) : A(this, yt).length !== 0 ? A(this, yt).pop() : A(this, Te) === A(this, dt) ? J(this, Z, Ju).call(this, !1) : A(this, Te), A(this, ye)[l] = t, A(this, ae)[l] = n, A(this, _e).set(t, l), A(this, qe)[A(this, Le)] = l, A(this, rt)[l] = A(this, Le), re(this, Le, l), Ou(this, Te)._++, A(this,
|
|
9292
|
+
if (l === void 0) l = A(this, Te) === 0 ? A(this, Le) : A(this, yt).length !== 0 ? A(this, yt).pop() : A(this, Te) === A(this, dt) ? J(this, Z, Ju).call(this, !1) : A(this, Te), A(this, ye)[l] = t, A(this, ae)[l] = n, A(this, _e).set(t, l), A(this, qe)[A(this, Le)] = l, A(this, rt)[l] = A(this, Le), re(this, Le, l), Ou(this, Te)._++, A(this, Pn).call(this, l, f, s), s && (s.set = "add"), c = !1, A(this, Rn) && ((h = A(this, hn)) == null || h.call(this, n, t, "add"));
|
|
9289
9293
|
else {
|
|
9290
9294
|
J(this, Z, Kn).call(this, l);
|
|
9291
9295
|
let b = A(this, ae)[l];
|
|
@@ -9293,19 +9297,19 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9293
9297
|
if (A(this, en) && J(this, Z, ve).call(this, b)) {
|
|
9294
9298
|
b.__abortController.abort(new Error("replaced"));
|
|
9295
9299
|
let { __staleWhileFetching: y } = b;
|
|
9296
|
-
y !== void 0 && !o && (A(this, At) && ((
|
|
9300
|
+
y !== void 0 && !o && (A(this, At) && ((m = A(this, mt)) == null || m.call(this, y, t, "set")), A(this, Xe) && ((p = A(this, Re)) == null || p.push([y, t, "set"])));
|
|
9297
9301
|
} else o || (A(this, At) && ((w = A(this, mt)) == null || w.call(this, b, t, "set")), A(this, Xe) && ((x = A(this, Re)) == null || x.push([b, t, "set"])));
|
|
9298
|
-
if (A(this, mn).call(this, l), A(this,
|
|
9302
|
+
if (A(this, mn).call(this, l), A(this, Pn).call(this, l, f, s), A(this, ae)[l] = n, s) {
|
|
9299
9303
|
s.set = "replace";
|
|
9300
9304
|
let y = b && J(this, Z, ve).call(this, b) ? b.__staleWhileFetching : b;
|
|
9301
9305
|
y !== void 0 && (s.oldValue = y);
|
|
9302
9306
|
}
|
|
9303
9307
|
} else s && (s.set = "update");
|
|
9304
|
-
A(this,
|
|
9308
|
+
A(this, Rn) && ((v = this.onInsert) == null || v.call(this, n, t, n === b ? "update" : "replace"));
|
|
9305
9309
|
}
|
|
9306
9310
|
if (i !== 0 && !A(this, it) && J(this, Z, Zi).call(this), A(this, it) && (c || A(this, vu).call(this, l, i, r), s && A(this, Vt).call(this, s, l)), !o && A(this, Xe) && A(this, Re)) {
|
|
9307
9311
|
let b = A(this, Re), y;
|
|
9308
|
-
for (; y = b == null ? void 0 : b.shift(); ) (
|
|
9312
|
+
for (; y = b == null ? void 0 : b.shift(); ) (g = A(this, gt)) == null || g.call(this, ...y);
|
|
9309
9313
|
}
|
|
9310
9314
|
return this;
|
|
9311
9315
|
}
|
|
@@ -9342,9 +9346,9 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9342
9346
|
return J(this, Z, ve).call(this, r) ? r.__staleWhileFetching : r;
|
|
9343
9347
|
}
|
|
9344
9348
|
async fetch(t, n = {}) {
|
|
9345
|
-
let { allowStale: u = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: a = this.noDisposeOnSet, size: s = 0, sizeCalculation: c = this.sizeCalculation, noUpdateTTL: f = this.noUpdateTTL, noDeleteOnFetchRejection: l = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: h = this.allowStaleOnFetchRejection, ignoreFetchAbort:
|
|
9349
|
+
let { allowStale: u = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: a = this.noDisposeOnSet, size: s = 0, sizeCalculation: c = this.sizeCalculation, noUpdateTTL: f = this.noUpdateTTL, noDeleteOnFetchRejection: l = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: h = this.allowStaleOnFetchRejection, ignoreFetchAbort: m = this.ignoreFetchAbort, allowStaleOnFetchAbort: p = this.allowStaleOnFetchAbort, context: w, forceRefresh: x = !1, status: v, signal: g } = n;
|
|
9346
9350
|
if (!A(this, en)) return v && (v.fetch = "get"), this.get(t, { allowStale: u, updateAgeOnGet: i, noDeleteOnStaleGet: r, status: v });
|
|
9347
|
-
let b = { allowStale: u, updateAgeOnGet: i, noDeleteOnStaleGet: r, ttl: o, noDisposeOnSet: a, size: s, sizeCalculation: c, noUpdateTTL: f, noDeleteOnFetchRejection: l, allowStaleOnFetchRejection: h, allowStaleOnFetchAbort: p, ignoreFetchAbort:
|
|
9351
|
+
let b = { allowStale: u, updateAgeOnGet: i, noDeleteOnStaleGet: r, ttl: o, noDisposeOnSet: a, size: s, sizeCalculation: c, noUpdateTTL: f, noDeleteOnFetchRejection: l, allowStaleOnFetchRejection: h, allowStaleOnFetchAbort: p, ignoreFetchAbort: m, status: v, signal: g }, y = A(this, _e).get(t);
|
|
9348
9352
|
if (y === void 0) {
|
|
9349
9353
|
v && (v.fetch = "miss");
|
|
9350
9354
|
let k = J(this, Z, er).call(this, t, y, b, w);
|
|
@@ -9367,7 +9371,7 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9367
9371
|
return u;
|
|
9368
9372
|
}
|
|
9369
9373
|
memo(t, n = {}) {
|
|
9370
|
-
let u = A(this,
|
|
9374
|
+
let u = A(this, Ln);
|
|
9371
9375
|
if (!u) throw new Error("no memoMethod provided to constructor");
|
|
9372
9376
|
let { context: i, forceRefresh: r, ...o } = n, a = this.get(t, o);
|
|
9373
9377
|
if (!r && a !== void 0) return a;
|
|
@@ -9387,7 +9391,7 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9387
9391
|
clear() {
|
|
9388
9392
|
return J(this, Z, Qi).call(this, "delete");
|
|
9389
9393
|
}
|
|
9390
|
-
}, dt = new WeakMap(), ut = new WeakMap(), mt = new WeakMap(), hn = new WeakMap(), gt = new WeakMap(),
|
|
9394
|
+
}, dt = new WeakMap(), ut = new WeakMap(), mt = new WeakMap(), hn = new WeakMap(), gt = new WeakMap(), On = new WeakMap(), Ln = new WeakMap(), bt = new WeakMap(), Te = new WeakMap(), vt = new WeakMap(), _e = new WeakMap(), ye = new WeakMap(), ae = new WeakMap(), qe = new WeakMap(), rt = new WeakMap(), Ue = new WeakMap(), Le = new WeakMap(), yt = new WeakMap(), Re = new WeakMap(), xt = new WeakMap(), wt = new WeakMap(), it = new WeakMap(), ot = new WeakMap(), At = new WeakMap(), en = new WeakMap(), Xe = new WeakMap(), Rn = new WeakMap(), Z = new WeakSet(), Zi = function() {
|
|
9391
9395
|
let t = new Qu(A(this, dt)), n = new Qu(A(this, dt));
|
|
9392
9396
|
re(this, it, t), re(this, wt, n);
|
|
9393
9397
|
let u = this.ttlAutopurge ? new Array(A(this, dt)) : void 0;
|
|
@@ -9445,14 +9449,14 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9445
9449
|
if (i = r(u, n), !Xt(i)) throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
9446
9450
|
} else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");
|
|
9447
9451
|
return i;
|
|
9448
|
-
}), re(this,
|
|
9452
|
+
}), re(this, Pn, (n, u, i) => {
|
|
9449
9453
|
if (t[n] = u, A(this, ut)) {
|
|
9450
9454
|
let r = A(this, ut) - t[n];
|
|
9451
9455
|
for (; A(this, vt) > r; ) J(this, Z, Ju).call(this, !0);
|
|
9452
9456
|
}
|
|
9453
9457
|
re(this, vt, A(this, vt) + t[n]), i && (i.entrySize = u, i.totalCalculatedSize = A(this, vt));
|
|
9454
9458
|
});
|
|
9455
|
-
}, mn = new WeakMap(),
|
|
9459
|
+
}, mn = new WeakMap(), Pn = new WeakMap(), yu = new WeakMap(), Zt = function* ({ allowStale: t = this.allowStale } = {}) {
|
|
9456
9460
|
if (A(this, Te)) for (let n = A(this, Le); !(!J(this, Z, Yi).call(this, n) || ((t || !A(this, at).call(this, n)) && (yield n), n === A(this, Ue))); ) n = A(this, rt)[n];
|
|
9457
9461
|
}, Yt = function* ({ allowStale: t = this.allowStale } = {}) {
|
|
9458
9462
|
if (A(this, Te)) for (let n = A(this, Ue); !(!J(this, Z, Yi).call(this, n) || ((t || !A(this, at).call(this, n)) && (yield n), n === A(this, Le))); ) n = A(this, qe)[n];
|
|
@@ -9468,23 +9472,23 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9468
9472
|
let o = new Fr(), { signal: a } = u;
|
|
9469
9473
|
a == null || a.addEventListener("abort", () => o.abort(a.reason), { signal: o.signal });
|
|
9470
9474
|
let s = { signal: o.signal, options: u, context: i }, c = (w, x = !1) => {
|
|
9471
|
-
let { aborted: v } = o.signal,
|
|
9472
|
-
if (u.status && (v && !x ? (u.status.fetchAborted = !0, u.status.fetchError = o.signal.reason,
|
|
9473
|
-
let y =
|
|
9474
|
-
return (k ===
|
|
9475
|
+
let { aborted: v } = o.signal, g = u.ignoreFetchAbort && w !== void 0, b = u.ignoreFetchAbort || !!(u.allowStaleOnFetchAbort && w !== void 0);
|
|
9476
|
+
if (u.status && (v && !x ? (u.status.fetchAborted = !0, u.status.fetchError = o.signal.reason, g && (u.status.fetchAbortIgnored = !0)) : u.status.fetchResolved = !0), v && !g && !x) return l(o.signal.reason, b);
|
|
9477
|
+
let y = m, k = A(this, ae)[n];
|
|
9478
|
+
return (k === m || g && x && k === void 0) && (w === void 0 ? y.__staleWhileFetching !== void 0 ? A(this, ae)[n] = y.__staleWhileFetching : J(this, Z, Kt).call(this, t, "fetch") : (u.status && (u.status.fetchUpdated = !0), this.set(t, w, s.options))), w;
|
|
9475
9479
|
}, f = (w) => (u.status && (u.status.fetchRejected = !0, u.status.fetchError = w), l(w, !1)), l = (w, x) => {
|
|
9476
|
-
let { aborted: v } = o.signal,
|
|
9477
|
-
if (A(this, ae)[n] ===
|
|
9480
|
+
let { aborted: v } = o.signal, g = v && u.allowStaleOnFetchAbort, b = g || u.allowStaleOnFetchRejection, y = b || u.noDeleteOnFetchRejection, k = m;
|
|
9481
|
+
if (A(this, ae)[n] === m && (!y || !x && k.__staleWhileFetching === void 0 ? J(this, Z, Kt).call(this, t, "fetch") : g || (A(this, ae)[n] = k.__staleWhileFetching)), b) return u.status && k.__staleWhileFetching !== void 0 && (u.status.returnedStale = !0), k.__staleWhileFetching;
|
|
9478
9482
|
if (k.__returned === k) throw w;
|
|
9479
9483
|
}, h = (w, x) => {
|
|
9480
|
-
var
|
|
9481
|
-
let v = (
|
|
9484
|
+
var g;
|
|
9485
|
+
let v = (g = A(this, On)) == null ? void 0 : g.call(this, t, r, s);
|
|
9482
9486
|
v && v instanceof Promise && v.then((b) => w(b === void 0 ? void 0 : b), x), o.signal.addEventListener("abort", () => {
|
|
9483
9487
|
(!u.ignoreFetchAbort || u.allowStaleOnFetchAbort) && (w(void 0), u.allowStaleOnFetchAbort && (w = (b) => c(b, !0)));
|
|
9484
9488
|
});
|
|
9485
9489
|
};
|
|
9486
9490
|
u.status && (u.status.fetchDispatched = !0);
|
|
9487
|
-
let
|
|
9491
|
+
let m = new Promise(h).then(c, f), p = Object.assign(m, { __abortController: o, __staleWhileFetching: r, __returned: void 0 });
|
|
9488
9492
|
return n === void 0 ? (this.set(t, p, { ...s.options, status: void 0 }), n = A(this, _e).get(t)) : A(this, ae)[n] = p, p;
|
|
9489
9493
|
}, ve = function(t) {
|
|
9490
9494
|
if (!A(this, en)) return !1;
|
|
@@ -9508,8 +9512,8 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9508
9512
|
else {
|
|
9509
9513
|
let h = A(this, rt)[f];
|
|
9510
9514
|
A(this, qe)[h] = A(this, qe)[f];
|
|
9511
|
-
let
|
|
9512
|
-
A(this, rt)[
|
|
9515
|
+
let m = A(this, qe)[f];
|
|
9516
|
+
A(this, rt)[m] = A(this, rt)[f];
|
|
9513
9517
|
}
|
|
9514
9518
|
Ou(this, Te)._--, A(this, yt).push(f);
|
|
9515
9519
|
}
|
|
@@ -9538,7 +9542,7 @@ var mp = (e) => !wl.has(e), Xt = (e) => e && e === Math.floor(e) && e > 0 && isF
|
|
|
9538
9542
|
let o = A(this, Re), a;
|
|
9539
9543
|
for (; a = o == null ? void 0 : o.shift(); ) (r = A(this, gt)) == null || r.call(this, ...a);
|
|
9540
9544
|
}
|
|
9541
|
-
},
|
|
9545
|
+
}, Mn);
|
|
9542
9546
|
/*! medium-zoom 1.1.0 | MIT License | https://github.com/francoischalifour/medium-zoom */
|
|
9543
9547
|
var fn = Object.assign || function(e) {
|
|
9544
9548
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -9570,7 +9574,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9570
9574
|
}, xp = function(t) {
|
|
9571
9575
|
var n = t.getBoundingClientRect(), u = n.top, i = n.left, r = n.width, o = n.height, a = t.cloneNode(), s = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, c = window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft || 0;
|
|
9572
9576
|
return a.removeAttribute("id"), a.style.position = "absolute", a.style.top = u + s + "px", a.style.left = i + c + "px", a.style.width = r + "px", a.style.height = o + "px", a.style.transform = "", a;
|
|
9573
|
-
},
|
|
9577
|
+
}, An = function(t, n) {
|
|
9574
9578
|
var u = fn({
|
|
9575
9579
|
bubbles: !1,
|
|
9576
9580
|
cancelable: !1,
|
|
@@ -9607,7 +9611,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9607
9611
|
R.template = G;
|
|
9608
9612
|
}
|
|
9609
9613
|
return S = fn({}, S, R), b.forEach(function(q) {
|
|
9610
|
-
q.dispatchEvent(
|
|
9614
|
+
q.dispatchEvent(An("medium-zoom:update", {
|
|
9611
9615
|
detail: { zoom: $ }
|
|
9612
9616
|
}));
|
|
9613
9617
|
}), $;
|
|
@@ -9638,7 +9642,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9638
9642
|
return [].concat(T, Ba(C));
|
|
9639
9643
|
}, []) : b;
|
|
9640
9644
|
return q.forEach(function(T) {
|
|
9641
|
-
T.classList.remove("medium-zoom-image"), T.dispatchEvent(
|
|
9645
|
+
T.classList.remove("medium-zoom-image"), T.dispatchEvent(An("medium-zoom:detach", {
|
|
9642
9646
|
detail: { zoom: $ }
|
|
9643
9647
|
}));
|
|
9644
9648
|
}), b = b.filter(function(T) {
|
|
@@ -9656,7 +9660,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9656
9660
|
}), y = y.filter(function(q) {
|
|
9657
9661
|
return !(q.type === "medium-zoom:" + U && q.listener.toString() === R.toString());
|
|
9658
9662
|
}), $;
|
|
9659
|
-
},
|
|
9663
|
+
}, m = function() {
|
|
9660
9664
|
var U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, R = U.target, G = function() {
|
|
9661
9665
|
var T = {
|
|
9662
9666
|
width: document.documentElement.clientWidth,
|
|
@@ -9688,7 +9692,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9688
9692
|
return;
|
|
9689
9693
|
}
|
|
9690
9694
|
var T = function j() {
|
|
9691
|
-
k = !1, _.zoomed.removeEventListener("transitionend", j), _.original.dispatchEvent(
|
|
9695
|
+
k = !1, _.zoomed.removeEventListener("transitionend", j), _.original.dispatchEvent(An("medium-zoom:opened", {
|
|
9692
9696
|
detail: { zoom: $ }
|
|
9693
9697
|
})), q($);
|
|
9694
9698
|
};
|
|
@@ -9705,7 +9709,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9705
9709
|
q($);
|
|
9706
9710
|
return;
|
|
9707
9711
|
}
|
|
9708
|
-
if (_.original.dispatchEvent(
|
|
9712
|
+
if (_.original.dispatchEvent(An("medium-zoom:open", {
|
|
9709
9713
|
detail: { zoom: $ }
|
|
9710
9714
|
})), F = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0, k = !0, _.zoomed = xp(_.original), document.body.appendChild(X), S.template) {
|
|
9711
9715
|
var D = tr(S.template) ? S.template : document.querySelector(S.template);
|
|
@@ -9735,22 +9739,22 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9735
9739
|
return;
|
|
9736
9740
|
}
|
|
9737
9741
|
var R = function G() {
|
|
9738
|
-
_.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(_.zoomed), _.zoomedHd && document.body.removeChild(_.zoomedHd), document.body.removeChild(X), _.zoomed.classList.remove("medium-zoom-image--opened"), _.template && document.body.removeChild(_.template), k = !1, _.zoomed.removeEventListener("transitionend", G), _.original.dispatchEvent(
|
|
9742
|
+
_.original.classList.remove("medium-zoom-image--hidden"), document.body.removeChild(_.zoomed), _.zoomedHd && document.body.removeChild(_.zoomedHd), document.body.removeChild(X), _.zoomed.classList.remove("medium-zoom-image--opened"), _.template && document.body.removeChild(_.template), k = !1, _.zoomed.removeEventListener("transitionend", G), _.original.dispatchEvent(An("medium-zoom:closed", {
|
|
9739
9743
|
detail: { zoom: $ }
|
|
9740
9744
|
})), _.original = null, _.zoomed = null, _.zoomedHd = null, _.template = null, U($);
|
|
9741
9745
|
};
|
|
9742
|
-
k = !0, document.body.classList.remove("medium-zoom--opened"), _.zoomed.style.transform = "", _.zoomedHd && (_.zoomedHd.style.transform = ""), _.template && (_.template.style.transition = "opacity 150ms", _.template.style.opacity = 0), _.original.dispatchEvent(
|
|
9746
|
+
k = !0, document.body.classList.remove("medium-zoom--opened"), _.zoomed.style.transform = "", _.zoomedHd && (_.zoomedHd.style.transform = ""), _.template && (_.template.style.transition = "opacity 150ms", _.template.style.opacity = 0), _.original.dispatchEvent(An("medium-zoom:close", {
|
|
9743
9747
|
detail: { zoom: $ }
|
|
9744
9748
|
})), _.zoomed.addEventListener("transitionend", R);
|
|
9745
9749
|
});
|
|
9746
9750
|
}, w = function() {
|
|
9747
9751
|
var U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, R = U.target;
|
|
9748
|
-
return _.original ? p() :
|
|
9752
|
+
return _.original ? p() : m({ target: R });
|
|
9749
9753
|
}, x = function() {
|
|
9750
9754
|
return S;
|
|
9751
9755
|
}, v = function() {
|
|
9752
9756
|
return b;
|
|
9753
|
-
},
|
|
9757
|
+
}, g = function() {
|
|
9754
9758
|
return _.original;
|
|
9755
9759
|
}, b = [], y = [], k = !1, F = 0, S = n, _ = {
|
|
9756
9760
|
original: null,
|
|
@@ -9769,7 +9773,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9769
9773
|
var X = yp(S.background);
|
|
9770
9774
|
document.addEventListener("click", i), document.addEventListener("keyup", o), document.addEventListener("scroll", r), window.addEventListener("resize", p);
|
|
9771
9775
|
var $ = {
|
|
9772
|
-
open:
|
|
9776
|
+
open: m,
|
|
9773
9777
|
close: p,
|
|
9774
9778
|
toggle: w,
|
|
9775
9779
|
update: a,
|
|
@@ -9780,7 +9784,7 @@ See: https://github.com/francoischalifour/medium-zoom`);
|
|
|
9780
9784
|
off: h,
|
|
9781
9785
|
getOptions: x,
|
|
9782
9786
|
getImages: v,
|
|
9783
|
-
getZoomedImage:
|
|
9787
|
+
getZoomedImage: g
|
|
9784
9788
|
};
|
|
9785
9789
|
return $;
|
|
9786
9790
|
};
|
|
@@ -9820,7 +9824,7 @@ const un = {
|
|
|
9820
9824
|
const { js: a } = i, s = {
|
|
9821
9825
|
...Gi,
|
|
9822
9826
|
...i.css
|
|
9823
|
-
}, { js: c, css: f = {} } = r || {}, l = e.codeStyleReverse && e.codeStyleReverseList.includes(e.previewTheme) ? "dark" : e.theme, h = s[e.codeTheme] ? s[e.codeTheme][l] : Gi.atom[l],
|
|
9827
|
+
}, { js: c, css: f = {} } = r || {}, l = e.codeStyleReverse && e.codeStyleReverseList.includes(e.previewTheme) ? "dark" : e.theme, h = s[e.codeTheme] ? s[e.codeTheme][l] : Gi.atom[l], m = s[e.codeTheme] && f[e.codeTheme] ? f[e.codeTheme][l] : f.atom ? f.atom[l] : {};
|
|
9824
9828
|
return {
|
|
9825
9829
|
js: {
|
|
9826
9830
|
src: a,
|
|
@@ -9828,7 +9832,7 @@ const un = {
|
|
|
9828
9832
|
},
|
|
9829
9833
|
css: {
|
|
9830
9834
|
href: h,
|
|
9831
|
-
...
|
|
9835
|
+
...m
|
|
9832
9836
|
}
|
|
9833
9837
|
};
|
|
9834
9838
|
})
|
|
@@ -9872,14 +9876,14 @@ const un = {
|
|
|
9872
9876
|
const h = f.querySelector(
|
|
9873
9877
|
`.${Y}-copy-button:not([data-processed])`
|
|
9874
9878
|
);
|
|
9875
|
-
h && (h.onclick = (
|
|
9876
|
-
|
|
9879
|
+
h && (h.onclick = (m) => {
|
|
9880
|
+
m.preventDefault(), clearTimeout(l);
|
|
9877
9881
|
const p = (f.querySelector("input:checked + pre code") || f.querySelector("pre code")).textContent, { text: w, successTips: x, failTips: v } = r.value.copyCode;
|
|
9878
|
-
let
|
|
9882
|
+
let g = x;
|
|
9879
9883
|
vl(e.formatCopiedText(p || "")).catch(() => {
|
|
9880
|
-
|
|
9884
|
+
g = v;
|
|
9881
9885
|
}).finally(() => {
|
|
9882
|
-
h.dataset.isIcon ? h.dataset.tips =
|
|
9886
|
+
h.dataset.isIcon ? h.dataset.tips = g : h.innerHTML = g, l = window.setTimeout(() => {
|
|
9883
9887
|
h.dataset.isIcon ? h.dataset.tips = w : h.innerHTML = w;
|
|
9884
9888
|
}, 1500);
|
|
9885
9889
|
});
|
|
@@ -9923,26 +9927,26 @@ const un = {
|
|
|
9923
9927
|
let c = [], f = [], l = [];
|
|
9924
9928
|
const h = (p = !1) => {
|
|
9925
9929
|
if (!c.length) {
|
|
9926
|
-
p && (f.forEach((
|
|
9930
|
+
p && (f.forEach((g) => {
|
|
9927
9931
|
var b;
|
|
9928
|
-
(b =
|
|
9929
|
-
}), l.forEach((
|
|
9932
|
+
(b = g.dispose) == null || b.call(g);
|
|
9933
|
+
}), l.forEach((g) => {
|
|
9930
9934
|
var b;
|
|
9931
|
-
(b =
|
|
9935
|
+
(b = g.disconnect) == null || b.call(g);
|
|
9932
9936
|
}), f = [], l = []);
|
|
9933
9937
|
return;
|
|
9934
9938
|
}
|
|
9935
9939
|
const w = [], x = [], v = [];
|
|
9936
|
-
c.forEach((
|
|
9940
|
+
c.forEach((g, b) => {
|
|
9937
9941
|
var F, S;
|
|
9938
9942
|
const y = f[b], k = l[b];
|
|
9939
|
-
if (p || !
|
|
9943
|
+
if (p || !g || !g.isConnected || u != null && u.value && !u.value.contains(g)) {
|
|
9940
9944
|
(F = y == null ? void 0 : y.dispose) == null || F.call(y), (S = k == null ? void 0 : k.disconnect) == null || S.call(k);
|
|
9941
9945
|
return;
|
|
9942
9946
|
}
|
|
9943
|
-
w.push(
|
|
9947
|
+
w.push(g), y && x.push(y), k && v.push(k);
|
|
9944
9948
|
}), c = w, f = x, l = v;
|
|
9945
|
-
},
|
|
9949
|
+
}, m = () => {
|
|
9946
9950
|
h(), !e.noEcharts && o && Array.from(
|
|
9947
9951
|
u.value.querySelectorAll(
|
|
9948
9952
|
`#${t} div.${Y}-echarts:not([data-processed])`
|
|
@@ -9968,7 +9972,7 @@ const un = {
|
|
|
9968
9972
|
};
|
|
9969
9973
|
return sn(() => {
|
|
9970
9974
|
h(!0);
|
|
9971
|
-
}), { reRenderEcharts: a, replaceEcharts:
|
|
9975
|
+
}), { reRenderEcharts: a, replaceEcharts: m };
|
|
9972
9976
|
}, Dp = (e) => {
|
|
9973
9977
|
const t = pe("highlight"), n = xu(_t.editorExtensions.highlight.instance);
|
|
9974
9978
|
return Ie(() => {
|
|
@@ -10072,13 +10076,13 @@ const un = {
|
|
|
10072
10076
|
/* @vite-ignore */
|
|
10073
10077
|
/* webpackIgnore: true */
|
|
10074
10078
|
f
|
|
10075
|
-
).then((
|
|
10076
|
-
a =
|
|
10077
|
-
}).catch((
|
|
10079
|
+
).then((m) => {
|
|
10080
|
+
a = m.default, c();
|
|
10081
|
+
}).catch((m) => {
|
|
10078
10082
|
ft.emit(t, qi, {
|
|
10079
10083
|
name: "mermaid",
|
|
10080
|
-
message: `Failed to load mermaid module: ${
|
|
10081
|
-
error:
|
|
10084
|
+
message: `Failed to load mermaid module: ${m.message}`,
|
|
10085
|
+
error: m
|
|
10082
10086
|
});
|
|
10083
10087
|
})) : an(
|
|
10084
10088
|
"script",
|
|
@@ -10096,8 +10100,8 @@ const un = {
|
|
|
10096
10100
|
if (!e.noMermaid && a) {
|
|
10097
10101
|
const f = u.value.querySelectorAll(
|
|
10098
10102
|
`div.${Y}-mermaid`
|
|
10099
|
-
), l = document.createElement("div"), h = document.body.offsetWidth > 1366 ? document.body.offsetWidth : 1366,
|
|
10100
|
-
l.style.width = h + "px", l.style.height =
|
|
10103
|
+
), l = document.createElement("div"), h = document.body.offsetWidth > 1366 ? document.body.offsetWidth : 1366, m = document.body.offsetHeight > 768 ? document.body.offsetHeight : 768;
|
|
10104
|
+
l.style.width = h + "px", l.style.height = m + "px", l.style.position = "fixed", l.style.zIndex = "-10000", l.style.top = "-10000";
|
|
10101
10105
|
let p = f.length;
|
|
10102
10106
|
p > 0 && document.body.appendChild(l), await Promise.allSettled(
|
|
10103
10107
|
Array.from(f).map((w) => (async (x) => {
|
|
@@ -10105,14 +10109,14 @@ const un = {
|
|
|
10105
10109
|
if (x.dataset.closed === "false")
|
|
10106
10110
|
return !1;
|
|
10107
10111
|
const v = x.innerText;
|
|
10108
|
-
let
|
|
10109
|
-
if (!
|
|
10112
|
+
let g = nr.get(v);
|
|
10113
|
+
if (!g) {
|
|
10110
10114
|
const y = Wi();
|
|
10111
10115
|
let k = { svg: "" };
|
|
10112
10116
|
try {
|
|
10113
|
-
k = await a.render(y, v, l),
|
|
10117
|
+
k = await a.render(y, v, l), g = await e.sanitizeMermaid(k.svg);
|
|
10114
10118
|
const F = document.createElement("p");
|
|
10115
|
-
F.className = `${Y}-mermaid`, F.setAttribute("data-processed", ""), F.setAttribute("data-content", v), F.innerHTML =
|
|
10119
|
+
F.className = `${Y}-mermaid`, F.setAttribute("data-processed", ""), F.setAttribute("data-content", v), F.innerHTML = g, (b = F.children[0]) == null || b.removeAttribute("height"), nr.set(v, F.innerHTML), x.dataset.line !== void 0 && (F.dataset.line = x.dataset.line), x.replaceWith(F);
|
|
10116
10120
|
} catch (F) {
|
|
10117
10121
|
ft.emit(t, qi, {
|
|
10118
10122
|
name: "mermaid",
|
|
@@ -10130,7 +10134,7 @@ const un = {
|
|
|
10130
10134
|
t = t || {};
|
|
10131
10135
|
const n = 3, u = t.marker || "!", i = u.charCodeAt(0), r = u.length;
|
|
10132
10136
|
let o = "", a = "";
|
|
10133
|
-
const s = (f, l, h,
|
|
10137
|
+
const s = (f, l, h, m, p) => {
|
|
10134
10138
|
const w = f[l];
|
|
10135
10139
|
return w.type === "admonition_open" ? f[l].attrPush([
|
|
10136
10140
|
"class",
|
|
@@ -10143,30 +10147,30 @@ const un = {
|
|
|
10143
10147
|
e.block.ruler.before(
|
|
10144
10148
|
"code",
|
|
10145
10149
|
"admonition",
|
|
10146
|
-
(f, l, h,
|
|
10147
|
-
let p, w, x, v = !1,
|
|
10148
|
-
if (i !== f.src.charCodeAt(
|
|
10150
|
+
(f, l, h, m) => {
|
|
10151
|
+
let p, w, x, v = !1, g = f.bMarks[l] + f.tShift[l], b = f.eMarks[l];
|
|
10152
|
+
if (i !== f.src.charCodeAt(g))
|
|
10149
10153
|
return !1;
|
|
10150
|
-
for (p =
|
|
10154
|
+
for (p = g + 1; p <= b && u[(p - g) % r] === f.src[p]; p++)
|
|
10151
10155
|
;
|
|
10152
|
-
const y = Math.floor((p -
|
|
10156
|
+
const y = Math.floor((p - g) / r);
|
|
10153
10157
|
if (y !== n)
|
|
10154
10158
|
return !1;
|
|
10155
|
-
p -= (p -
|
|
10156
|
-
const k = f.src.slice(
|
|
10157
|
-
if (c(F),
|
|
10159
|
+
p -= (p - g) % r;
|
|
10160
|
+
const k = f.src.slice(g, p), F = f.src.slice(p, b);
|
|
10161
|
+
if (c(F), m)
|
|
10158
10162
|
return !0;
|
|
10159
|
-
for (w = l; w++, !(w >= h || (
|
|
10160
|
-
if (i === f.src.charCodeAt(
|
|
10161
|
-
for (p =
|
|
10163
|
+
for (w = l; w++, !(w >= h || (g = f.bMarks[w] + f.tShift[w], b = f.eMarks[w], g < b && f.sCount[w] < f.blkIndent)); )
|
|
10164
|
+
if (i === f.src.charCodeAt(g) && !(f.sCount[w] - f.blkIndent >= 4)) {
|
|
10165
|
+
for (p = g + 1; p <= b && u[(p - g) % r] === f.src[p]; p++)
|
|
10162
10166
|
;
|
|
10163
|
-
if (!(Math.floor((p -
|
|
10167
|
+
if (!(Math.floor((p - g) / r) < y) && (p -= (p - g) % r, p = f.skipSpaces(p), !(p < b))) {
|
|
10164
10168
|
v = !0;
|
|
10165
10169
|
break;
|
|
10166
10170
|
}
|
|
10167
10171
|
}
|
|
10168
10172
|
const S = f.parentType, _ = f.lineMax;
|
|
10169
|
-
return f.parentType = "root", f.lineMax = w, x = f.push("admonition_open", "div", 1), x.markup = k, x.block = !0, x.info = o, x.map = [l, w], a && (x = f.push("admonition_title_open", "p", 1), x.markup = k + " " + o, x.map = [l, w], x = f.push("inline", "", 0), x.content = a, x.map = [l, f.line - 1], x.children = [], x = f.push("admonition_title_close", "p", -1), x.markup = k + " " + o), f.md.block.tokenize(f, l + 1, w), x = f.push("admonition_close", "div", -1), x.markup = f.src.slice(
|
|
10173
|
+
return f.parentType = "root", f.lineMax = w, x = f.push("admonition_open", "div", 1), x.markup = k, x.block = !0, x.info = o, x.map = [l, w], a && (x = f.push("admonition_title_open", "p", 1), x.markup = k + " " + o, x.map = [l, w], x = f.push("inline", "", 0), x.content = a, x.map = [l, f.line - 1], x.children = [], x = f.push("admonition_title_close", "p", -1), x.markup = k + " " + o), f.md.block.tokenize(f, l + 1, w), x = f.push("admonition_close", "div", -1), x.markup = f.src.slice(g, p), x.block = !0, f.parentType = S, f.lineMax = _, f.line = w + (v ? 1 : 0), !0;
|
|
10170
10174
|
},
|
|
10171
10175
|
{
|
|
10172
10176
|
alt: ["paragraph", "reference", "blockquote", "list"]
|
|
@@ -10180,20 +10184,20 @@ const un = {
|
|
|
10180
10184
|
}), n;
|
|
10181
10185
|
}, Op = (e, t) => {
|
|
10182
10186
|
const n = e.renderer.rules.fence, u = e.utils.unescapeAll, i = /\[(\w*)(?::([\w ]*))?\]/, r = /::(open|close)/, o = (l) => l.info ? u(l.info).trim() : "", a = (l) => {
|
|
10183
|
-
const h = o(l), [
|
|
10184
|
-
return [
|
|
10187
|
+
const h = o(l), [m = null, p = ""] = (i.exec(h) || []).slice(1);
|
|
10188
|
+
return [m, p];
|
|
10185
10189
|
}, s = (l) => {
|
|
10186
10190
|
const h = o(l);
|
|
10187
10191
|
return h ? h.split(/(\s+)/g)[0] : "";
|
|
10188
10192
|
}, c = (l) => {
|
|
10189
|
-
const h = l.info.match(r) || [],
|
|
10193
|
+
const h = l.info.match(r) || [], m = h[1] === "open" || h[1] !== "close" && t.codeFoldable && l.content.trim().split(`
|
|
10190
10194
|
`).length < t.autoFoldThreshold, p = h[1] || t.codeFoldable ? "details" : "div", w = h[1] || t.codeFoldable ? "summary" : "div";
|
|
10191
|
-
return { open:
|
|
10192
|
-
}, f = (l, h,
|
|
10195
|
+
return { open: m, tagContainer: p, tagHeader: w };
|
|
10196
|
+
}, f = (l, h, m, p, w) => {
|
|
10193
10197
|
var C;
|
|
10194
10198
|
if (l[h].hidden)
|
|
10195
10199
|
return "";
|
|
10196
|
-
const x = (C = t.usedLanguageTextRef.value) == null ? void 0 : C.copyCode.text, v = t.customIconRef.value.copy || x,
|
|
10200
|
+
const x = (C = t.usedLanguageTextRef.value) == null ? void 0 : C.copyCode.text, v = t.customIconRef.value.copy || x, g = !!t.customIconRef.value.copy, b = `<span class="${Y}-collapse-tips">${Ot("collapse-tips", t.customIconRef.value)}</span>`, [y] = a(l[h]);
|
|
10197
10201
|
if (y === null) {
|
|
10198
10202
|
const { open: D, tagContainer: M, tagHeader: z } = c(l[h]), j = [["class", `${Y}-code`]];
|
|
10199
10203
|
D && j.push(["open", ""]);
|
|
@@ -10201,14 +10205,14 @@ const un = {
|
|
|
10201
10205
|
attrs: Ji(l[h], j)
|
|
10202
10206
|
};
|
|
10203
10207
|
l[h].info = l[h].info.replace(r, "");
|
|
10204
|
-
const P = n(l, h,
|
|
10208
|
+
const P = n(l, h, m, p, w);
|
|
10205
10209
|
return `
|
|
10206
10210
|
<${M} ${w.renderAttrs(I)}>
|
|
10207
10211
|
<${z} class="${Y}-code-head">
|
|
10208
10212
|
<div class="${Y}-code-flag"><span></span><span></span><span></span></div>
|
|
10209
10213
|
<div class="${Y}-code-action">
|
|
10210
10214
|
<span class="${Y}-code-lang">${e.utils.escapeHtml(l[h].info.trim())}</span>
|
|
10211
|
-
<span class="${Y}-copy-button" data-tips="${x}"${
|
|
10215
|
+
<span class="${Y}-copy-button" data-tips="${x}"${g ? " data-is-icon=true" : ""}>${v}</span>
|
|
10212
10216
|
${t.extraTools instanceof Function ? t.extraTools({ lang: l[h].info.trim() }) : t.extraTools || ""}
|
|
10213
10217
|
${M === "details" ? b : ""}
|
|
10214
10218
|
</div>
|
|
@@ -10249,7 +10253,7 @@ const un = {
|
|
|
10249
10253
|
class="${M}"
|
|
10250
10254
|
${_}
|
|
10251
10255
|
role="presentation">
|
|
10252
|
-
${n(l, D,
|
|
10256
|
+
${n(l, D, m, p, w)}
|
|
10253
10257
|
</div>`, N += `
|
|
10254
10258
|
<input
|
|
10255
10259
|
type="radio"
|
|
@@ -10267,7 +10271,7 @@ const un = {
|
|
|
10267
10271
|
</div>
|
|
10268
10272
|
<div class="${Y}-code-action">
|
|
10269
10273
|
<span class="${Y}-codetab-lang">${N}</span>
|
|
10270
|
-
<span class="${Y}-copy-button" data-tips="${x}"${
|
|
10274
|
+
<span class="${Y}-copy-button" data-tips="${x}"${g ? " data-is-icon=true" : ""}>${v}</span>
|
|
10271
10275
|
${t.extraTools instanceof Function ? t.extraTools({ lang: l[h].info.trim() }) : t.extraTools || ""}
|
|
10272
10276
|
${R === "details" ? b : ""}
|
|
10273
10277
|
</div>
|
|
@@ -10284,8 +10288,8 @@ const un = {
|
|
|
10284
10288
|
const s = u[i], c = s.content.trim();
|
|
10285
10289
|
if (s.info === "echarts") {
|
|
10286
10290
|
if (s.attrSet("class", `${Y}-echarts`), s.attrSet("data-echarts-theme", t.themeRef.value), s.map && s.level === 0) {
|
|
10287
|
-
const h = s.map[1] - 1,
|
|
10288
|
-
s.attrSet("data-closed", `${
|
|
10291
|
+
const h = s.map[1] - 1, m = !!((l = (f = o.srcLines[h]) == null ? void 0 : f.trim()) != null && l.startsWith("```"));
|
|
10292
|
+
s.attrSet("data-closed", `${m}`), s.attrSet("data-line", String(s.map[0]));
|
|
10289
10293
|
}
|
|
10290
10294
|
return `<div ${a.renderAttrs(s)} style="width: 100%; aspect-ratio: 4 / 3;">${e.utils.escapeHtml(c)}</div>`;
|
|
10291
10295
|
}
|
|
@@ -10359,31 +10363,31 @@ const un = {
|
|
|
10359
10363
|
const f = o;
|
|
10360
10364
|
if (t.src.slice(f, f + c.open.length) !== c.open)
|
|
10361
10365
|
continue;
|
|
10362
|
-
const l = f + c.open.length, h = t.src.slice(l, a).trim(),
|
|
10363
|
-
if (!
|
|
10366
|
+
const l = f + c.open.length, h = t.src.slice(l, a).trim(), m = h === "", p = h === c.close, w = h.endsWith(c.close);
|
|
10367
|
+
if (!m && !p && !w)
|
|
10364
10368
|
continue;
|
|
10365
10369
|
if (i)
|
|
10366
10370
|
return !0;
|
|
10367
10371
|
if (p)
|
|
10368
10372
|
return s("", n + 1, c.open);
|
|
10369
|
-
if (!
|
|
10373
|
+
if (!m && w) {
|
|
10370
10374
|
const y = h.slice(0, -c.close.length);
|
|
10371
10375
|
return s(y, n + 1, c.open);
|
|
10372
10376
|
}
|
|
10373
|
-
let x = n + 1, v = !1,
|
|
10377
|
+
let x = n + 1, v = !1, g = "";
|
|
10374
10378
|
for (; x < u; x++) {
|
|
10375
10379
|
const y = t.bMarks[x] + t.tShift[x], k = t.eMarks[x];
|
|
10376
10380
|
if (y < k && t.tShift[x] < t.blkIndent)
|
|
10377
10381
|
break;
|
|
10378
10382
|
if (t.src.slice(y, k).trim().endsWith(c.close)) {
|
|
10379
10383
|
const F = t.src.slice(0, k).lastIndexOf(c.close);
|
|
10380
|
-
|
|
10384
|
+
g = t.src.slice(y, F), v = !0;
|
|
10381
10385
|
break;
|
|
10382
10386
|
}
|
|
10383
10387
|
}
|
|
10384
10388
|
if (!v)
|
|
10385
10389
|
continue;
|
|
10386
|
-
const b = t.getLines(n + 1, x, t.tShift[n], !0) + (
|
|
10390
|
+
const b = t.getLines(n + 1, x, t.tShift[n], !0) + (g.trim() ? g : "");
|
|
10387
10391
|
return s(b, x + 1, c.open);
|
|
10388
10392
|
}
|
|
10389
10393
|
return !1;
|
|
@@ -10391,9 +10395,9 @@ const un = {
|
|
|
10391
10395
|
const i = (a, s, c, f, l = !1) => {
|
|
10392
10396
|
const h = {
|
|
10393
10397
|
attrs: Ji(a, [["class", s]])
|
|
10394
|
-
},
|
|
10398
|
+
}, m = f.renderAttrs(h);
|
|
10395
10399
|
if (!t.value)
|
|
10396
|
-
return `<${c} ${
|
|
10400
|
+
return `<${c} ${m}>${a.content}</${c}>`;
|
|
10397
10401
|
const p = t.value.renderToString(
|
|
10398
10402
|
a.content,
|
|
10399
10403
|
_t.katexConfig({
|
|
@@ -10401,7 +10405,7 @@ const un = {
|
|
|
10401
10405
|
displayMode: l
|
|
10402
10406
|
})
|
|
10403
10407
|
);
|
|
10404
|
-
return `<${c} ${
|
|
10408
|
+
return `<${c} ${m} data-processed>${p}</${c}>`;
|
|
10405
10409
|
}, r = (a, s, c, f, l) => i(a[s], `${Y}-katex-inline`, "span", l), o = (a, s, c, f, l) => i(a[s], `${Y}-katex-block`, "p", l, !0);
|
|
10406
10410
|
e.inline.ruler.before(
|
|
10407
10411
|
"escape",
|
|
@@ -10426,7 +10430,7 @@ const un = {
|
|
|
10426
10430
|
const s = u[i], c = s.content.trim();
|
|
10427
10431
|
if (s.info === "mermaid") {
|
|
10428
10432
|
if (s.attrSet("class", `${Y}-mermaid`), s.attrSet("data-mermaid-theme", t.themeRef.value), s.map && s.level === 0) {
|
|
10429
|
-
const
|
|
10433
|
+
const m = s.map[1] - 1, p = !!((l = (f = o.srcLines[m]) == null ? void 0 : f.trim()) != null && l.startsWith("```"));
|
|
10430
10434
|
s.attrSet("data-closed", `${p}`), s.attrSet("data-line", String(s.map[0]));
|
|
10431
10435
|
}
|
|
10432
10436
|
const h = nr.get(c);
|
|
@@ -10480,7 +10484,7 @@ const un = {
|
|
|
10480
10484
|
}, Qp = (e, t) => {
|
|
10481
10485
|
const { editorConfig: n, markdownItPlugins: u } = _t, i = pe("editorId"), r = pe("language"), o = pe(
|
|
10482
10486
|
"usedLanguageText"
|
|
10483
|
-
), a = pe("showCodeRowNumber"), s = pe("theme"), c = pe("customIcon"), f = pe("rootRef"), l = pe("setting"), h = H([]),
|
|
10487
|
+
), a = pe("showCodeRowNumber"), s = pe("theme"), c = pe("customIcon"), f = pe("rootRef"), l = pe("setting"), h = H([]), m = Dp(e), p = Fp(e), { reRenderRef: w, replaceMermaid: x } = Tp(e), { reRenderEcharts: v, replaceEcharts: g } = Sp(e), b = ct({
|
|
10484
10488
|
html: !0,
|
|
10485
10489
|
breaks: !0,
|
|
10486
10490
|
linkify: !0
|
|
@@ -10554,10 +10558,10 @@ const un = {
|
|
|
10554
10558
|
return z;
|
|
10555
10559
|
}
|
|
10556
10560
|
let D;
|
|
10557
|
-
!e.noHighlight &&
|
|
10561
|
+
!e.noHighlight && m.value ? m.value.getLanguage(T) ? D = m.value.highlight(q, {
|
|
10558
10562
|
language: T,
|
|
10559
10563
|
ignoreIllegals: !0
|
|
10560
|
-
}).value : D =
|
|
10564
|
+
}).value : D = m.value.highlightAuto(q).value : D = b.utils.escapeHtml(q);
|
|
10561
10565
|
const M = a ? ep(
|
|
10562
10566
|
D.replace(/^\n+|\n+$/g, ""),
|
|
10563
10567
|
q.replace(/^\n+|\n+$/g, "")
|
|
@@ -10588,7 +10592,7 @@ const un = {
|
|
|
10588
10592
|
});
|
|
10589
10593
|
}, N = () => {
|
|
10590
10594
|
ft.emit(i, Y1, S.value), e.onHtmlChanged(S.value), e.onGetCatalog(h.value), ft.emit(i, hi, h.value), De(() => {
|
|
10591
|
-
x().then($),
|
|
10595
|
+
x().then($), g();
|
|
10592
10596
|
});
|
|
10593
10597
|
}, U = () => {
|
|
10594
10598
|
h.value = [], S.value = e.sanitize(
|
|
@@ -10597,7 +10601,7 @@ const un = {
|
|
|
10597
10601
|
`)
|
|
10598
10602
|
})
|
|
10599
10603
|
);
|
|
10600
|
-
}, R = B(() => (e.noKatex || !!p.value) && (e.noHighlight || !!
|
|
10604
|
+
}, R = B(() => (e.noKatex || !!p.value) && (e.noHighlight || !!m.value));
|
|
10601
10605
|
let G = -1;
|
|
10602
10606
|
return oe([ec(e, "modelValue"), R, w, r], () => {
|
|
10603
10607
|
G = window.setTimeout(
|
|
@@ -10610,7 +10614,7 @@ const un = {
|
|
|
10610
10614
|
() => l.value.preview,
|
|
10611
10615
|
() => {
|
|
10612
10616
|
l.value.preview && De(() => {
|
|
10613
|
-
x().then($),
|
|
10617
|
+
x().then($), g(), ft.emit(i, hi, h.value);
|
|
10614
10618
|
});
|
|
10615
10619
|
}
|
|
10616
10620
|
), oe([S, v], () => {
|
|
@@ -10667,12 +10671,12 @@ const un = {
|
|
|
10667
10671
|
if (!f)
|
|
10668
10672
|
return;
|
|
10669
10673
|
const l = Number(f), h = e.modelValue.split(`
|
|
10670
|
-
`),
|
|
10674
|
+
`), m = h[Number(l)].replace(
|
|
10671
10675
|
ja[c].regexp,
|
|
10672
10676
|
ja[c].value
|
|
10673
10677
|
);
|
|
10674
|
-
e.previewOnly ? (h[Number(l)] =
|
|
10675
|
-
`))) : ft.emit(n, Q1, l + 1,
|
|
10678
|
+
e.previewOnly ? (h[Number(l)] = m, e.onChange(h.join(`
|
|
10679
|
+
`))) : ft.emit(n, Q1, l + 1, m);
|
|
10676
10680
|
};
|
|
10677
10681
|
o.forEach((s) => {
|
|
10678
10682
|
s.addEventListener("click", a);
|
|
@@ -11282,9 +11286,9 @@ function sm() {
|
|
|
11282
11286
|
var i = n.length, r = !1, o = 0, a = 0, s = "";
|
|
11283
11287
|
function c() {
|
|
11284
11288
|
if (!r) {
|
|
11285
|
-
var h = e.trim(n.slice(o, a)),
|
|
11286
|
-
if (
|
|
11287
|
-
var p = e.trim(h.slice(0,
|
|
11289
|
+
var h = e.trim(n.slice(o, a)), m = h.indexOf(":");
|
|
11290
|
+
if (m !== -1) {
|
|
11291
|
+
var p = e.trim(h.slice(0, m)), w = e.trim(h.slice(m + 1));
|
|
11288
11292
|
if (p) {
|
|
11289
11293
|
var x = u(o, s.length, p, w, h);
|
|
11290
11294
|
x && (s += x + "; ");
|
|
@@ -11326,12 +11330,12 @@ function lm() {
|
|
|
11326
11330
|
}
|
|
11327
11331
|
return i.prototype.process = function(r) {
|
|
11328
11332
|
if (r = r || "", r = r.toString(), !r) return "";
|
|
11329
|
-
var o = this, a = o.options, s = a.whiteList, c = a.onAttr, f = a.onIgnoreAttr, l = a.safeAttrValue, h = t(r, function(
|
|
11330
|
-
var
|
|
11331
|
-
if (
|
|
11333
|
+
var o = this, a = o.options, s = a.whiteList, c = a.onAttr, f = a.onIgnoreAttr, l = a.safeAttrValue, h = t(r, function(m, p, w, x, v) {
|
|
11334
|
+
var g = s[w], b = !1;
|
|
11335
|
+
if (g === !0 ? b = g : typeof g == "function" ? b = g(x) : g instanceof RegExp && (b = g.test(x)), b !== !0 && (b = !1), x = l(w, x), !!x) {
|
|
11332
11336
|
var y = {
|
|
11333
11337
|
position: p,
|
|
11334
|
-
sourcePosition:
|
|
11338
|
+
sourcePosition: m,
|
|
11335
11339
|
source: v,
|
|
11336
11340
|
isWhite: b
|
|
11337
11341
|
};
|
|
@@ -11504,18 +11508,18 @@ function Tl() {
|
|
|
11504
11508
|
if (!(D.substr(0, 7) === "http://" || D.substr(0, 8) === "https://" || D.substr(0, 7) === "mailto:" || D.substr(0, 4) === "tel:" || D.substr(0, 11) === "data:image/" || D.substr(0, 6) === "ftp://" || D.substr(0, 2) === "./" || D.substr(0, 3) === "../" || D[0] === "#" || D[0] === "/"))
|
|
11505
11509
|
return "";
|
|
11506
11510
|
} else if (C === "background") {
|
|
11507
|
-
if (
|
|
11511
|
+
if (g.lastIndex = 0, g.test(D))
|
|
11508
11512
|
return "";
|
|
11509
11513
|
} else if (C === "style") {
|
|
11510
|
-
if (b.lastIndex = 0, b.test(D) || (y.lastIndex = 0, y.test(D) && (
|
|
11514
|
+
if (b.lastIndex = 0, b.test(D) || (y.lastIndex = 0, y.test(D) && (g.lastIndex = 0, g.test(D))))
|
|
11511
11515
|
return "";
|
|
11512
11516
|
M !== !1 && (M = M || i, D = M.process(D));
|
|
11513
11517
|
}
|
|
11514
11518
|
return D = N(D), D;
|
|
11515
11519
|
}
|
|
11516
|
-
var l = /</g, h = />/g,
|
|
11520
|
+
var l = /</g, h = />/g, m = /"/g, p = /"/g, w = /&#([a-zA-Z0-9]*);?/gim, x = /:?/gim, v = /&newline;?/gim, g = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi, b = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi, y = /u\s*r\s*l\s*\(.*/gi;
|
|
11517
11521
|
function k(T) {
|
|
11518
|
-
return T.replace(
|
|
11522
|
+
return T.replace(m, """);
|
|
11519
11523
|
}
|
|
11520
11524
|
function F(T) {
|
|
11521
11525
|
return T.replace(p, '"');
|
|
@@ -11602,55 +11606,55 @@ function Il() {
|
|
|
11602
11606
|
Ka = 1;
|
|
11603
11607
|
var e = Ao();
|
|
11604
11608
|
function t(l) {
|
|
11605
|
-
var h = e.spaceIndex(l),
|
|
11606
|
-
return h === -1 ?
|
|
11609
|
+
var h = e.spaceIndex(l), m;
|
|
11610
|
+
return h === -1 ? m = l.slice(1, -1) : m = l.slice(1, h + 1), m = e.trim(m).toLowerCase(), m.slice(0, 1) === "/" && (m = m.slice(1)), m.slice(-1) === "/" && (m = m.slice(0, -1)), m;
|
|
11607
11611
|
}
|
|
11608
11612
|
function n(l) {
|
|
11609
11613
|
return l.slice(0, 2) === "</";
|
|
11610
11614
|
}
|
|
11611
|
-
function u(l, h,
|
|
11612
|
-
var p = "", w = 0, x = !1, v = !1,
|
|
11613
|
-
e: for (
|
|
11614
|
-
var F = l.charAt(
|
|
11615
|
+
function u(l, h, m) {
|
|
11616
|
+
var p = "", w = 0, x = !1, v = !1, g = 0, b = l.length, y = "", k = "";
|
|
11617
|
+
e: for (g = 0; g < b; g++) {
|
|
11618
|
+
var F = l.charAt(g);
|
|
11615
11619
|
if (x === !1) {
|
|
11616
11620
|
if (F === "<") {
|
|
11617
|
-
x =
|
|
11621
|
+
x = g;
|
|
11618
11622
|
continue;
|
|
11619
11623
|
}
|
|
11620
11624
|
} else if (v === !1) {
|
|
11621
11625
|
if (F === "<") {
|
|
11622
|
-
p +=
|
|
11626
|
+
p += m(l.slice(w, g)), x = g, w = g;
|
|
11623
11627
|
continue;
|
|
11624
11628
|
}
|
|
11625
|
-
if (F === ">" ||
|
|
11626
|
-
p +=
|
|
11629
|
+
if (F === ">" || g === b - 1) {
|
|
11630
|
+
p += m(l.slice(w, x)), k = l.slice(x, g + 1), y = t(k), p += h(
|
|
11627
11631
|
x,
|
|
11628
11632
|
p.length,
|
|
11629
11633
|
y,
|
|
11630
11634
|
k,
|
|
11631
11635
|
n(k)
|
|
11632
|
-
), w =
|
|
11636
|
+
), w = g + 1, x = !1;
|
|
11633
11637
|
continue;
|
|
11634
11638
|
}
|
|
11635
11639
|
if (F === '"' || F === "'")
|
|
11636
|
-
for (var S = 1, _ = l.charAt(
|
|
11640
|
+
for (var S = 1, _ = l.charAt(g - S); _.trim() === "" || _ === "="; ) {
|
|
11637
11641
|
if (_ === "=") {
|
|
11638
11642
|
v = F;
|
|
11639
11643
|
continue e;
|
|
11640
11644
|
}
|
|
11641
|
-
_ = l.charAt(
|
|
11645
|
+
_ = l.charAt(g - ++S);
|
|
11642
11646
|
}
|
|
11643
11647
|
} else if (F === v) {
|
|
11644
11648
|
v = !1;
|
|
11645
11649
|
continue;
|
|
11646
11650
|
}
|
|
11647
11651
|
}
|
|
11648
|
-
return w < b && (p +=
|
|
11652
|
+
return w < b && (p += m(l.substr(w))), p;
|
|
11649
11653
|
}
|
|
11650
11654
|
var i = /[^a-zA-Z0-9\\_:.-]/gim;
|
|
11651
11655
|
function r(l, h) {
|
|
11652
|
-
var
|
|
11653
|
-
function
|
|
11656
|
+
var m = 0, p = 0, w = [], x = !1, v = l.length;
|
|
11657
|
+
function g(S, _) {
|
|
11654
11658
|
if (S = e.trim(S), S = S.replace(i, "").toLowerCase(), !(S.length < 1)) {
|
|
11655
11659
|
var X = h(S, _ || "");
|
|
11656
11660
|
X && w.push(X);
|
|
@@ -11659,51 +11663,51 @@ function Il() {
|
|
|
11659
11663
|
for (var b = 0; b < v; b++) {
|
|
11660
11664
|
var y = l.charAt(b), k, F;
|
|
11661
11665
|
if (x === !1 && y === "=") {
|
|
11662
|
-
x = l.slice(
|
|
11666
|
+
x = l.slice(m, b), m = b + 1, p = l.charAt(m) === '"' || l.charAt(m) === "'" ? m : a(l, b + 1);
|
|
11663
11667
|
continue;
|
|
11664
11668
|
}
|
|
11665
11669
|
if (x !== !1 && b === p) {
|
|
11666
11670
|
if (F = l.indexOf(y, b + 1), F === -1)
|
|
11667
11671
|
break;
|
|
11668
|
-
k = e.trim(l.slice(p + 1, F)),
|
|
11672
|
+
k = e.trim(l.slice(p + 1, F)), g(x, k), x = !1, b = F, m = b + 1;
|
|
11669
11673
|
continue;
|
|
11670
11674
|
}
|
|
11671
11675
|
if (/\s|\n|\t/.test(y))
|
|
11672
11676
|
if (l = l.replace(/\s|\n|\t/g, " "), x === !1)
|
|
11673
11677
|
if (F = o(l, b), F === -1) {
|
|
11674
|
-
k = e.trim(l.slice(
|
|
11678
|
+
k = e.trim(l.slice(m, b)), g(k), x = !1, m = b + 1;
|
|
11675
11679
|
continue;
|
|
11676
11680
|
} else {
|
|
11677
11681
|
b = F - 1;
|
|
11678
11682
|
continue;
|
|
11679
11683
|
}
|
|
11680
11684
|
else if (F = s(l, b - 1), F === -1) {
|
|
11681
|
-
k = e.trim(l.slice(
|
|
11685
|
+
k = e.trim(l.slice(m, b)), k = f(k), g(x, k), x = !1, m = b + 1;
|
|
11682
11686
|
continue;
|
|
11683
11687
|
} else
|
|
11684
11688
|
continue;
|
|
11685
11689
|
}
|
|
11686
|
-
return
|
|
11690
|
+
return m < l.length && (x === !1 ? g(l.slice(m)) : g(x, f(e.trim(l.slice(m))))), e.trim(w.join(" "));
|
|
11687
11691
|
}
|
|
11688
11692
|
function o(l, h) {
|
|
11689
11693
|
for (; h < l.length; h++) {
|
|
11690
|
-
var
|
|
11691
|
-
if (
|
|
11692
|
-
return
|
|
11694
|
+
var m = l[h];
|
|
11695
|
+
if (m !== " ")
|
|
11696
|
+
return m === "=" ? h : -1;
|
|
11693
11697
|
}
|
|
11694
11698
|
}
|
|
11695
11699
|
function a(l, h) {
|
|
11696
11700
|
for (; h < l.length; h++) {
|
|
11697
|
-
var
|
|
11698
|
-
if (
|
|
11699
|
-
return
|
|
11701
|
+
var m = l[h];
|
|
11702
|
+
if (m !== " ")
|
|
11703
|
+
return m === "'" || m === '"' ? h : -1;
|
|
11700
11704
|
}
|
|
11701
11705
|
}
|
|
11702
11706
|
function s(l, h) {
|
|
11703
11707
|
for (; h > 0; h--) {
|
|
11704
|
-
var
|
|
11705
|
-
if (
|
|
11706
|
-
return
|
|
11708
|
+
var m = l[h];
|
|
11709
|
+
if (m !== " ")
|
|
11710
|
+
return m === "=" ? h : -1;
|
|
11707
11711
|
}
|
|
11708
11712
|
}
|
|
11709
11713
|
function c(l) {
|
|
@@ -11730,24 +11734,24 @@ function cm() {
|
|
|
11730
11734
|
closing: l[l.length - 2] === "/"
|
|
11731
11735
|
};
|
|
11732
11736
|
l = r.trim(l.slice(h + 1, -1));
|
|
11733
|
-
var
|
|
11734
|
-
return
|
|
11737
|
+
var m = l[l.length - 1] === "/";
|
|
11738
|
+
return m && (l = r.trim(l.slice(0, -1))), {
|
|
11735
11739
|
html: l,
|
|
11736
|
-
closing:
|
|
11740
|
+
closing: m
|
|
11737
11741
|
};
|
|
11738
11742
|
}
|
|
11739
11743
|
function s(l) {
|
|
11740
11744
|
var h = {};
|
|
11741
|
-
for (var
|
|
11742
|
-
h[
|
|
11745
|
+
for (var m in l)
|
|
11746
|
+
h[m] = l[m];
|
|
11743
11747
|
return h;
|
|
11744
11748
|
}
|
|
11745
11749
|
function c(l) {
|
|
11746
11750
|
var h = {};
|
|
11747
|
-
for (var
|
|
11748
|
-
Array.isArray(l[
|
|
11751
|
+
for (var m in l)
|
|
11752
|
+
Array.isArray(l[m]) ? h[m.toLowerCase()] = l[m].map(function(p) {
|
|
11749
11753
|
return p.toLowerCase();
|
|
11750
|
-
}) : h[
|
|
11754
|
+
}) : h[m.toLowerCase()] = l[m];
|
|
11751
11755
|
return h;
|
|
11752
11756
|
}
|
|
11753
11757
|
function f(l) {
|
|
@@ -11757,11 +11761,11 @@ function cm() {
|
|
|
11757
11761
|
}
|
|
11758
11762
|
return f.prototype.process = function(l) {
|
|
11759
11763
|
if (l = l || "", l = l.toString(), !l) return "";
|
|
11760
|
-
var h = this,
|
|
11761
|
-
|
|
11764
|
+
var h = this, m = h.options, p = m.whiteList, w = m.onTag, x = m.onIgnoreTag, v = m.onTagAttr, g = m.onIgnoreTagAttr, b = m.safeAttrValue, y = m.escapeHtml, k = h.attributeWrapSign, F = h.cssFilter;
|
|
11765
|
+
m.stripBlankChar && (l = t.stripBlankChar(l)), m.allowCommentTag || (l = t.stripCommentTag(l));
|
|
11762
11766
|
var S = !1;
|
|
11763
|
-
|
|
11764
|
-
|
|
11767
|
+
m.stripIgnoreTagBody && (S = t.StripTagBody(
|
|
11768
|
+
m.stripIgnoreTagBody,
|
|
11765
11769
|
x
|
|
11766
11770
|
), x = S.onIgnoreTag);
|
|
11767
11771
|
var _ = u(
|
|
@@ -11779,7 +11783,7 @@ function cm() {
|
|
|
11779
11783
|
return "</" + N + ">";
|
|
11780
11784
|
var T = a(U), C = p[N], D = i(T.html, function(M, z) {
|
|
11781
11785
|
var j = r.indexOf(C, M) !== -1, I = v(N, M, z, j);
|
|
11782
|
-
return o(I) ? j ? (z = b(N, M, z, F), z ? M + "=" + k + z + k : M) : (I =
|
|
11786
|
+
return o(I) ? j ? (z = b(N, M, z, F), z ? M + "=" + k + z + k : M) : (I = g(N, M, z, j), o(I) ? void 0 : I) : I;
|
|
11783
11787
|
});
|
|
11784
11788
|
return U = "<" + N, D && (U += " " + D), T.closing && (U += " /"), U += ">", U;
|
|
11785
11789
|
} else
|
|
@@ -11811,7 +11815,7 @@ function dm() {
|
|
|
11811
11815
|
}(mi, mi.exports)), mi.exports;
|
|
11812
11816
|
}
|
|
11813
11817
|
dm();
|
|
11814
|
-
const
|
|
11818
|
+
const Tn = /* @__PURE__ */ ie({
|
|
11815
11819
|
name: "FMarkdownPreview",
|
|
11816
11820
|
props: B1,
|
|
11817
11821
|
setup(e) {
|
|
@@ -11822,8 +11826,8 @@ const Fn = /* @__PURE__ */ ie({
|
|
|
11822
11826
|
}, null)]);
|
|
11823
11827
|
}
|
|
11824
11828
|
});
|
|
11825
|
-
|
|
11826
|
-
e.component(
|
|
11829
|
+
Tn.install = (e) => {
|
|
11830
|
+
e.component(Tn.name, Tn);
|
|
11827
11831
|
};
|
|
11828
11832
|
const Ol = "farris-x-preview-bridge", Ll = 1, Rl = "assistant.message";
|
|
11829
11833
|
function fm(e) {
|
|
@@ -11896,11 +11900,11 @@ const rr = /* @__PURE__ */ ie({
|
|
|
11896
11900
|
var T;
|
|
11897
11901
|
return Object.keys(((T = e.previewConfig) == null ? void 0 : T.contentMap) ?? {});
|
|
11898
11902
|
}), c = B(() => s.value.filter((T) => T).length > 0), f = H(), l = H(), h = H(!1);
|
|
11899
|
-
let
|
|
11903
|
+
let m = null;
|
|
11900
11904
|
sn(() => {
|
|
11901
|
-
|
|
11905
|
+
m == null || m(), m = null, U();
|
|
11902
11906
|
}), oe(() => [o.value, n.value, a.value], () => {
|
|
11903
|
-
if (
|
|
11907
|
+
if (m == null || m(), m = null, a.value) return;
|
|
11904
11908
|
const T = n.value;
|
|
11905
11909
|
if (!T) return;
|
|
11906
11910
|
h.value = !1, i.value = !1, r.value = !1;
|
|
@@ -11929,7 +11933,7 @@ const rr = /* @__PURE__ */ ie({
|
|
|
11929
11933
|
};
|
|
11930
11934
|
T.addEventListener("load", L, {
|
|
11931
11935
|
once: !0
|
|
11932
|
-
}), I = window.setTimeout(O, z),
|
|
11936
|
+
}), I = window.setTimeout(O, z), m = () => {
|
|
11933
11937
|
T.removeEventListener("load", L), I && (window.clearTimeout(I), I = null), P && (window.clearTimeout(P), P = null);
|
|
11934
11938
|
};
|
|
11935
11939
|
}, {
|
|
@@ -11971,14 +11975,14 @@ const rr = /* @__PURE__ */ ie({
|
|
|
11971
11975
|
});
|
|
11972
11976
|
const x = H(!1);
|
|
11973
11977
|
let v = null;
|
|
11974
|
-
const
|
|
11978
|
+
const g = 800;
|
|
11975
11979
|
function b() {
|
|
11976
11980
|
x.value = !0, $(!0), v != null && (window.clearTimeout(v), v = null);
|
|
11977
11981
|
}
|
|
11978
11982
|
function y() {
|
|
11979
11983
|
v != null && window.clearTimeout(v), v = window.setTimeout(() => {
|
|
11980
11984
|
x.value = !1, $(!1), v = null;
|
|
11981
|
-
},
|
|
11985
|
+
}, g);
|
|
11982
11986
|
}
|
|
11983
11987
|
function k() {
|
|
11984
11988
|
b(), y();
|
|
@@ -12134,11 +12138,11 @@ const rr = /* @__PURE__ */ ie({
|
|
|
12134
12138
|
width: 600,
|
|
12135
12139
|
class: "f-chat-preview-pane-right"
|
|
12136
12140
|
}, {
|
|
12137
|
-
default: () => [d(
|
|
12141
|
+
default: () => [d(Tn, {
|
|
12138
12142
|
content: l.value
|
|
12139
12143
|
}, null)]
|
|
12140
12144
|
})]
|
|
12141
|
-
})]) : null : d(
|
|
12145
|
+
})]) : null : d(Tn, {
|
|
12142
12146
|
content: ((T = e.previewConfig) == null ? void 0 : T.content) ?? ""
|
|
12143
12147
|
}, null);
|
|
12144
12148
|
};
|
|
@@ -12190,7 +12194,7 @@ const rr = /* @__PURE__ */ ie({
|
|
|
12190
12194
|
}, null)])])]);
|
|
12191
12195
|
}
|
|
12192
12196
|
});
|
|
12193
|
-
function
|
|
12197
|
+
function Q2(e, t) {
|
|
12194
12198
|
const n = typeof window < "u" ? window.AgentWorkbenchSDK : void 0;
|
|
12195
12199
|
if (!n) {
|
|
12196
12200
|
console.warn("[AgentWorkbenchSDK] invoke: window.AgentWorkbenchSDK is not available");
|
|
@@ -12208,7 +12212,7 @@ function K2(e, t) {
|
|
|
12208
12212
|
return;
|
|
12209
12213
|
}
|
|
12210
12214
|
}
|
|
12211
|
-
function
|
|
12215
|
+
function J2(e) {
|
|
12212
12216
|
return gm(e);
|
|
12213
12217
|
}
|
|
12214
12218
|
let Am = 0;
|
|
@@ -12217,14 +12221,14 @@ function dn() {
|
|
|
12217
12221
|
var e;
|
|
12218
12222
|
return ((e = iu[iu.length - 1]) == null ? void 0 : e.h) ?? {};
|
|
12219
12223
|
}
|
|
12220
|
-
function
|
|
12224
|
+
function eg(e) {
|
|
12221
12225
|
const t = ++Am;
|
|
12222
12226
|
return iu.push({ id: t, h: e }), () => {
|
|
12223
12227
|
const n = iu.findIndex((u) => u.id === t);
|
|
12224
12228
|
n >= 0 && iu.splice(n, 1);
|
|
12225
12229
|
};
|
|
12226
12230
|
}
|
|
12227
|
-
const
|
|
12231
|
+
const tg = {
|
|
12228
12232
|
/**
|
|
12229
12233
|
* 打开或更新预览:右侧空 → 单栏右侧;仅右侧已有 → 双栏(旧右→左,新→右);**左右已有 → 只替换右侧 iframe**。
|
|
12230
12234
|
*/
|
|
@@ -12753,7 +12757,7 @@ const p2 = {
|
|
|
12753
12757
|
type: Object,
|
|
12754
12758
|
required: !0
|
|
12755
12759
|
}
|
|
12756
|
-
}, as = 20, m2 = 16,
|
|
12760
|
+
}, as = 20, m2 = 16, kn = 180;
|
|
12757
12761
|
function g2(e) {
|
|
12758
12762
|
typeof requestIdleCallback < "u" ? requestIdleCallback(e, {
|
|
12759
12763
|
timeout: 500
|
|
@@ -12763,14 +12767,14 @@ const or = /* @__PURE__ */ ie({
|
|
|
12763
12767
|
name: "FXCodingMessage",
|
|
12764
12768
|
props: p2,
|
|
12765
12769
|
setup(e) {
|
|
12766
|
-
const t = H(!0), n = H(!1), u = H(null), i = H(null), r = H(
|
|
12770
|
+
const t = H(!0), n = H(!1), u = H(null), i = H(null), r = H(kn), o = H(!1);
|
|
12767
12771
|
function a() {
|
|
12768
12772
|
t.value = !t.value;
|
|
12769
12773
|
}
|
|
12770
12774
|
function s() {
|
|
12771
|
-
var
|
|
12772
|
-
const p = (
|
|
12773
|
-
if (!p) return
|
|
12775
|
+
var g, b, y, k;
|
|
12776
|
+
const p = (g = e.content) == null ? void 0 : g.code;
|
|
12777
|
+
if (!p) return kn;
|
|
12774
12778
|
const x = i.value;
|
|
12775
12779
|
let v;
|
|
12776
12780
|
if (x != null && x.getOriginalEditor && (x != null && x.getModifiedEditor)) {
|
|
@@ -12789,9 +12793,9 @@ const or = /* @__PURE__ */ ie({
|
|
|
12789
12793
|
}
|
|
12790
12794
|
return m2 + v * as;
|
|
12791
12795
|
}
|
|
12792
|
-
const c = B(() => (i.value, s() >
|
|
12796
|
+
const c = B(() => (i.value, s() > kn));
|
|
12793
12797
|
function f() {
|
|
12794
|
-
n.value = !n.value, r.value = n.value ? s() :
|
|
12798
|
+
n.value = !n.value, r.value = n.value ? s() : kn, h();
|
|
12795
12799
|
}
|
|
12796
12800
|
function l() {
|
|
12797
12801
|
if (!i.value) return;
|
|
@@ -12808,14 +12812,14 @@ const or = /* @__PURE__ */ ie({
|
|
|
12808
12812
|
if (!p || !(w != null && w.layout)) return;
|
|
12809
12813
|
const x = p.clientWidth || p.offsetWidth, v = r.value;
|
|
12810
12814
|
requestAnimationFrame(() => {
|
|
12811
|
-
var
|
|
12812
|
-
o.value || !i.value || (b = (
|
|
12815
|
+
var g, b;
|
|
12816
|
+
o.value || !i.value || (b = (g = i.value) == null ? void 0 : g.layout) == null || b.call(g, {
|
|
12813
12817
|
width: x,
|
|
12814
12818
|
height: v
|
|
12815
12819
|
});
|
|
12816
12820
|
});
|
|
12817
12821
|
}
|
|
12818
|
-
function
|
|
12822
|
+
function m() {
|
|
12819
12823
|
var p;
|
|
12820
12824
|
o.value || !u.value || !((p = e.content) != null && p.code) || h2.init().then((w) => {
|
|
12821
12825
|
var y;
|
|
@@ -12823,7 +12827,7 @@ const or = /* @__PURE__ */ ie({
|
|
|
12823
12827
|
const {
|
|
12824
12828
|
value: x,
|
|
12825
12829
|
originalValue: v,
|
|
12826
|
-
language:
|
|
12830
|
+
language: g = "typescript"
|
|
12827
12831
|
} = e.content.code, b = {
|
|
12828
12832
|
readOnly: !0,
|
|
12829
12833
|
minimap: {
|
|
@@ -12849,8 +12853,8 @@ const or = /* @__PURE__ */ ie({
|
|
|
12849
12853
|
renderOverviewRuler: !1
|
|
12850
12854
|
});
|
|
12851
12855
|
k.setModel({
|
|
12852
|
-
original: w.editor.createModel(v,
|
|
12853
|
-
modified: w.editor.createModel(x,
|
|
12856
|
+
original: w.editor.createModel(v, g),
|
|
12857
|
+
modified: w.editor.createModel(x, g)
|
|
12854
12858
|
}), k.getOriginalEditor().updateOptions({
|
|
12855
12859
|
minimap: {
|
|
12856
12860
|
enabled: !1
|
|
@@ -12871,17 +12875,17 @@ const or = /* @__PURE__ */ ie({
|
|
|
12871
12875
|
} else {
|
|
12872
12876
|
const k = w.editor.create(u.value, {
|
|
12873
12877
|
value: x,
|
|
12874
|
-
language:
|
|
12878
|
+
language: g,
|
|
12875
12879
|
...b
|
|
12876
12880
|
});
|
|
12877
12881
|
i.value = k;
|
|
12878
12882
|
}
|
|
12879
|
-
r.value =
|
|
12883
|
+
r.value = kn, De(() => h());
|
|
12880
12884
|
});
|
|
12881
12885
|
}
|
|
12882
12886
|
return Ie(() => {
|
|
12883
12887
|
g2(() => {
|
|
12884
|
-
o.value || !u.value ||
|
|
12888
|
+
o.value || !u.value || m();
|
|
12885
12889
|
});
|
|
12886
12890
|
}), oe(t, (p) => {
|
|
12887
12891
|
p && !o.value && De(() => h());
|
|
@@ -12891,7 +12895,7 @@ const or = /* @__PURE__ */ ie({
|
|
|
12891
12895
|
var p, w;
|
|
12892
12896
|
return (w = (p = e.content) == null ? void 0 : p.code) == null ? void 0 : w.value;
|
|
12893
12897
|
}, () => {
|
|
12894
|
-
o.value || (n.value ? r.value = s() : r.value =
|
|
12898
|
+
o.value || (n.value ? r.value = s() : r.value = kn, h());
|
|
12895
12899
|
}), () => {
|
|
12896
12900
|
const p = e.content;
|
|
12897
12901
|
if (!p) return null;
|
|
@@ -12899,7 +12903,7 @@ const or = /* @__PURE__ */ ie({
|
|
|
12899
12903
|
message: w,
|
|
12900
12904
|
fileIcon: x,
|
|
12901
12905
|
fileName: v,
|
|
12902
|
-
code:
|
|
12906
|
+
code: g
|
|
12903
12907
|
} = p;
|
|
12904
12908
|
return d("div", {
|
|
12905
12909
|
class: "f-chat-message-coding"
|
|
@@ -12936,9 +12940,9 @@ const or = /* @__PURE__ */ ie({
|
|
|
12936
12940
|
class: "f-chat-coding-header-stats"
|
|
12937
12941
|
}, [d("span", {
|
|
12938
12942
|
class: "f-chat-coding-stat-add"
|
|
12939
|
-
}, [de("+"),
|
|
12943
|
+
}, [de("+"), g.addedLines]), d("span", {
|
|
12940
12944
|
class: "f-chat-coding-stat-del"
|
|
12941
|
-
}, [de("-"),
|
|
12945
|
+
}, [de("-"), g.deletedLines])])]), d("div", {
|
|
12942
12946
|
style: {
|
|
12943
12947
|
display: t.value ? "block" : "none"
|
|
12944
12948
|
}
|
|
@@ -13024,10 +13028,10 @@ const ar = /* @__PURE__ */ ie({
|
|
|
13024
13028
|
class: t.value ? "fx-icon fx-icon-foldup" : "fx-icon fx-icon-expanddown"
|
|
13025
13029
|
}, null)])])]), l && d("div", {
|
|
13026
13030
|
class: "f-chat-file-op-operations"
|
|
13027
|
-
}, [f.map((h,
|
|
13031
|
+
}, [f.map((h, m) => {
|
|
13028
13032
|
var p, w, x, v;
|
|
13029
13033
|
return d("div", {
|
|
13030
|
-
key:
|
|
13034
|
+
key: m,
|
|
13031
13035
|
class: "f-chat-file-op-operation"
|
|
13032
13036
|
}, [d("div", hs({
|
|
13033
13037
|
class: ["f-chat-file-op-operation-row", {
|
|
@@ -13035,16 +13039,16 @@ const ar = /* @__PURE__ */ ie({
|
|
|
13035
13039
|
"has-details": !!((p = h.details) != null && p.length)
|
|
13036
13040
|
}],
|
|
13037
13041
|
onClick: () => {
|
|
13038
|
-
var
|
|
13039
|
-
return ((
|
|
13042
|
+
var g;
|
|
13043
|
+
return ((g = h.details) == null ? void 0 : g.length) && o(m);
|
|
13040
13044
|
}
|
|
13041
13045
|
}, (w = h.details) != null && w.length ? {
|
|
13042
13046
|
role: "button",
|
|
13043
13047
|
tabIndex: 0
|
|
13044
13048
|
} : {}, {
|
|
13045
|
-
onKeydown: (
|
|
13049
|
+
onKeydown: (g) => {
|
|
13046
13050
|
var b;
|
|
13047
|
-
return ((b = h.details) == null ? void 0 : b.length) &&
|
|
13051
|
+
return ((b = h.details) == null ? void 0 : b.length) && g.key === "Enter" && o(m);
|
|
13048
13052
|
}
|
|
13049
13053
|
}), [d("span", {
|
|
13050
13054
|
class: "f-chat-file-op-type"
|
|
@@ -13054,19 +13058,19 @@ const ar = /* @__PURE__ */ ie({
|
|
|
13054
13058
|
class: "f-chat-file-op-message"
|
|
13055
13059
|
}, [h.message]), (x = h.details) != null && x.length ? d("span", {
|
|
13056
13060
|
class: ["f-chat-file-op-expand-btn", "sm", {
|
|
13057
|
-
expanded: a(
|
|
13061
|
+
expanded: a(m)
|
|
13058
13062
|
}]
|
|
13059
13063
|
}, [d("i", {
|
|
13060
|
-
class: a(
|
|
13061
|
-
}, null)]) : null])]), ((v = h.details) == null ? void 0 : v.length) && a(
|
|
13064
|
+
class: a(m) ? "fx-icon fx-icon-foldu" : "fx-icon pfx-icon-expanddown"
|
|
13065
|
+
}, null)]) : null])]), ((v = h.details) == null ? void 0 : v.length) && a(m) && d("div", {
|
|
13062
13066
|
class: "f-chat-file-op-details"
|
|
13063
|
-
}, [h.details.map((
|
|
13067
|
+
}, [h.details.map((g, b) => v2(g) ? d("div", {
|
|
13064
13068
|
key: b,
|
|
13065
13069
|
class: "f-chat-file-op-detail-file"
|
|
13066
13070
|
}, [d("span", {
|
|
13067
13071
|
class: "f-chat-file-op-file-icon"
|
|
13068
13072
|
}, [d("img", {
|
|
13069
|
-
src:
|
|
13073
|
+
src: g.icon,
|
|
13070
13074
|
alt: "",
|
|
13071
13075
|
onError: (y) => {
|
|
13072
13076
|
const k = y.target;
|
|
@@ -13078,17 +13082,17 @@ const ar = /* @__PURE__ */ ie({
|
|
|
13078
13082
|
class: "f-chat-file-op-file-icon-fallback"
|
|
13079
13083
|
}, [de("📄")])]), d("span", {
|
|
13080
13084
|
class: "f-chat-file-op-file-name"
|
|
13081
|
-
}, [
|
|
13085
|
+
}, [g.file]), d("span", {
|
|
13082
13086
|
class: "f-chat-file-op-file-path",
|
|
13083
|
-
title:
|
|
13084
|
-
}, [
|
|
13087
|
+
title: g.path
|
|
13088
|
+
}, [g.path])]) : d("div", {
|
|
13085
13089
|
key: b,
|
|
13086
13090
|
class: "f-chat-file-op-detail-text"
|
|
13087
13091
|
}, [d("div", {
|
|
13088
13092
|
class: "f-chat-file-op-detail-title"
|
|
13089
|
-
}, [
|
|
13093
|
+
}, [g.title]), d("div", {
|
|
13090
13094
|
class: "f-chat-file-op-detail-content"
|
|
13091
|
-
}, [
|
|
13095
|
+
}, [g.text])]))])]);
|
|
13092
13096
|
})])]);
|
|
13093
13097
|
};
|
|
13094
13098
|
}
|
|
@@ -13469,7 +13473,7 @@ const C2 = {
|
|
|
13469
13473
|
style: (h = e.styles) == null ? void 0 : h.description
|
|
13470
13474
|
}, [Hu(e.description)]) : null;
|
|
13471
13475
|
}, f = () => {
|
|
13472
|
-
var l, h,
|
|
13476
|
+
var l, h, m, p;
|
|
13473
13477
|
return !e.children || e.children.length === 0 ? null : d(ou, {
|
|
13474
13478
|
class: {
|
|
13475
13479
|
"fx-prompt--only-children": !e.id,
|
|
@@ -13481,7 +13485,7 @@ const C2 = {
|
|
|
13481
13485
|
customClass: (l = e.classNames) == null ? void 0 : l.subItems,
|
|
13482
13486
|
customStyle: (h = e.styles) == null ? void 0 : h.subItems,
|
|
13483
13487
|
styles: {
|
|
13484
|
-
item: ((
|
|
13488
|
+
item: ((m = e.styles) == null ? void 0 : m.subItem) ?? {}
|
|
13485
13489
|
},
|
|
13486
13490
|
classNames: {
|
|
13487
13491
|
item: ((p = e.classNames) == null ? void 0 : p.subItem) ?? ""
|
|
@@ -13623,12 +13627,12 @@ const _2 = {
|
|
|
13623
13627
|
n.value.textContent = "", n.value.innerHTML = "", w();
|
|
13624
13628
|
return;
|
|
13625
13629
|
}
|
|
13626
|
-
const
|
|
13627
|
-
if (!
|
|
13628
|
-
const b =
|
|
13630
|
+
const g = window.getSelection();
|
|
13631
|
+
if (!g || g.rangeCount === 0) return;
|
|
13632
|
+
const b = g.getRangeAt(0), y = b.cloneRange();
|
|
13629
13633
|
y.selectNodeContents(n.value), y.setEnd(b.endContainer, b.endOffset);
|
|
13630
13634
|
const k = y.toString(), F = k.lastIndexOf(e.promptChar);
|
|
13631
|
-
if (a.value = n.value.textContent || "", F !== -1 && k.substring(F + 1).trim() === "" && (n.value.textContent = k.replace(/@$/, `@${e.promptAgentName} `), a.value = n.value.textContent, u.value = !0, b.selectNodeContents(n.value), b.collapse(!1),
|
|
13635
|
+
if (a.value = n.value.textContent || "", F !== -1 && k.substring(F + 1).trim() === "" && (n.value.textContent = k.replace(/@$/, `@${e.promptAgentName} `), a.value = n.value.textContent, u.value = !0, b.selectNodeContents(n.value), b.collapse(!1), g.removeAllRanges(), g.addRange(b)), u.value === !1) {
|
|
13632
13636
|
i.value = !1, o.value = -1;
|
|
13633
13637
|
return;
|
|
13634
13638
|
}
|
|
@@ -13647,18 +13651,18 @@ const _2 = {
|
|
|
13647
13651
|
} else
|
|
13648
13652
|
i.value = !1, o.value = -1;
|
|
13649
13653
|
}, l = () => {
|
|
13650
|
-
const
|
|
13651
|
-
return Math.min(
|
|
13654
|
+
const g = e.items.length * 38 - 6;
|
|
13655
|
+
return Math.min(g + 28 + 20, e.height);
|
|
13652
13656
|
}, h = (v) => {
|
|
13653
13657
|
var k;
|
|
13654
13658
|
if (!n.value) return;
|
|
13655
|
-
const
|
|
13656
|
-
if (!
|
|
13659
|
+
const g = window.getSelection();
|
|
13660
|
+
if (!g || g.rangeCount === 0) return;
|
|
13657
13661
|
const b = ((k = n.value.textContent) == null ? void 0 : k.replace(/\s*$/, "")) || "";
|
|
13658
13662
|
n.value.textContent = `${b} ${v.label}`;
|
|
13659
|
-
const y =
|
|
13660
|
-
y.selectNodeContents(n.value), y.collapse(!1),
|
|
13661
|
-
},
|
|
13663
|
+
const y = g.getRangeAt(0);
|
|
13664
|
+
y.selectNodeContents(n.value), y.collapse(!1), g.removeAllRanges(), g.addRange(y), w();
|
|
13665
|
+
}, m = async (v) => {
|
|
13662
13666
|
if (!i.value || !e.items || e.items.length === 0) return;
|
|
13663
13667
|
switch (["ArrowUp", "ArrowDown", "Enter", "Escape"].includes(v.key) && v.preventDefault(), v.key) {
|
|
13664
13668
|
case "ArrowDown":
|
|
@@ -13675,7 +13679,7 @@ const _2 = {
|
|
|
13675
13679
|
break;
|
|
13676
13680
|
}
|
|
13677
13681
|
await De();
|
|
13678
|
-
const
|
|
13682
|
+
const g = o.value > 0 ? ".f-chat-suggestion-panel-item--current" : ".f-chat-suggestion-panel-header", b = document.querySelector(g);
|
|
13679
13683
|
b == null || b.scrollIntoView({
|
|
13680
13684
|
block: "nearest",
|
|
13681
13685
|
behavior: "smooth"
|
|
@@ -13691,10 +13695,10 @@ const _2 = {
|
|
|
13691
13695
|
document.removeEventListener("click", p);
|
|
13692
13696
|
});
|
|
13693
13697
|
const x = (v) => {
|
|
13694
|
-
const
|
|
13695
|
-
return d(Ve, null, [
|
|
13698
|
+
const g = v.iconUrl || "", b = v.icon || "fx-icon fx-icon-sender_task";
|
|
13699
|
+
return d(Ve, null, [g ? d("img", {
|
|
13696
13700
|
alt: "suggestion item icon",
|
|
13697
|
-
src:
|
|
13701
|
+
src: g
|
|
13698
13702
|
}, null) : d("i", {
|
|
13699
13703
|
class: b
|
|
13700
13704
|
}, null), d("span", {
|
|
@@ -13711,7 +13715,7 @@ const _2 = {
|
|
|
13711
13715
|
contenteditable: "true",
|
|
13712
13716
|
onInput: f,
|
|
13713
13717
|
onKeyup: f,
|
|
13714
|
-
onKeydown:
|
|
13718
|
+
onKeydown: m,
|
|
13715
13719
|
"data-placeholder": s.value
|
|
13716
13720
|
}, null), i.value && d("div", {
|
|
13717
13721
|
class: "f-chat-suggestion-panel",
|
|
@@ -13724,14 +13728,14 @@ const _2 = {
|
|
|
13724
13728
|
class: "f-chat-suggestion-panel-header"
|
|
13725
13729
|
}, [e.title]), d("div", {
|
|
13726
13730
|
class: "f-chat-suggestion-panel-container"
|
|
13727
|
-
}, [(v = e.items) == null ? void 0 : v.map((
|
|
13731
|
+
}, [(v = e.items) == null ? void 0 : v.map((g, b) => d("div", {
|
|
13728
13732
|
key: b,
|
|
13729
13733
|
class: ["f-chat-suggestion-panel-item", {
|
|
13730
13734
|
"f-chat-suggestion-panel-item--current": b === o.value
|
|
13731
13735
|
}],
|
|
13732
|
-
onClick: () => h(
|
|
13736
|
+
onClick: () => h(g),
|
|
13733
13737
|
onMouseenter: () => o.value === b
|
|
13734
|
-
}, [x(
|
|
13738
|
+
}, [x(g)]))])])]);
|
|
13735
13739
|
};
|
|
13736
13740
|
}
|
|
13737
13741
|
});
|
|
@@ -13801,7 +13805,7 @@ const E2 = {
|
|
|
13801
13805
|
dr.install = (e) => {
|
|
13802
13806
|
e.component(dr.name, dr), e.component(Er.name, Er), e.component($i.name, $i), e.directive("overflow-tooltip", bc);
|
|
13803
13807
|
};
|
|
13804
|
-
function
|
|
13808
|
+
function Cn(e) {
|
|
13805
13809
|
return e.toolResultApplied === !0 || String(e.result ?? "").trim().length > 0;
|
|
13806
13810
|
}
|
|
13807
13811
|
const fr = /* @__PURE__ */ ie({
|
|
@@ -13815,7 +13819,7 @@ const fr = /* @__PURE__ */ ie({
|
|
|
13815
13819
|
setup(e) {
|
|
13816
13820
|
const t = B(() => {
|
|
13817
13821
|
const l = e.content.toolCalls;
|
|
13818
|
-
return !l || l.length === 0 ? !0 : l.every(
|
|
13822
|
+
return !l || l.length === 0 ? !0 : l.every(Cn);
|
|
13819
13823
|
}), {
|
|
13820
13824
|
getToolIconClass: n
|
|
13821
13825
|
} = bs(), u = B(() => t.value ? `共调用 ${e.content.totalCount ?? e.content.toolCalls.length} 个工具` : "正在调用工具"), i = H(!t.value), r = () => {
|
|
@@ -13825,20 +13829,20 @@ const fr = /* @__PURE__ */ ie({
|
|
|
13825
13829
|
l && (i.value = !1);
|
|
13826
13830
|
});
|
|
13827
13831
|
const o = (l) => {
|
|
13828
|
-
|
|
13832
|
+
Cn(l) && (l._expanded = !l._expanded);
|
|
13829
13833
|
}, a = (l) => {
|
|
13830
|
-
const h =
|
|
13834
|
+
const h = Cn(l), m = l.success === !1;
|
|
13831
13835
|
return {
|
|
13832
13836
|
"f-chat-tool-use-batch-item": !0,
|
|
13833
|
-
"is-done": h && !
|
|
13834
|
-
"is-error":
|
|
13835
|
-
"is-run": !h && !
|
|
13837
|
+
"is-done": h && !m,
|
|
13838
|
+
"is-error": m,
|
|
13839
|
+
"is-run": !h && !m
|
|
13836
13840
|
};
|
|
13837
13841
|
}, s = (l) => {
|
|
13838
|
-
const h =
|
|
13842
|
+
const h = Cn(l);
|
|
13839
13843
|
return l.success === !1 ? "执行失败" : h ? "执行成功" : "调用中";
|
|
13840
13844
|
}, c = (l) => {
|
|
13841
|
-
const h =
|
|
13845
|
+
const h = Cn(l);
|
|
13842
13846
|
return l.success === !1 ? "Error" : h ? "Done" : "Working";
|
|
13843
13847
|
}, f = (l) => l.toolDescription ? l.toolDescription : l.command ? `{ command: ${l.command} }` : l.toolName ?? "tool";
|
|
13844
13848
|
return () => d("div", {
|
|
@@ -13857,7 +13861,7 @@ const fr = /* @__PURE__ */ ie({
|
|
|
13857
13861
|
}, null)]), i.value && d("div", {
|
|
13858
13862
|
class: "f-chat-tool-use-batch-body"
|
|
13859
13863
|
}, [e.content.toolCalls.map((l) => {
|
|
13860
|
-
const h =
|
|
13864
|
+
const h = Cn(l), m = l.success === !1, p = h || m, w = !!l._expanded;
|
|
13861
13865
|
return d("div", {
|
|
13862
13866
|
class: a(l)
|
|
13863
13867
|
}, [d("div", {
|
|
@@ -13869,7 +13873,7 @@ const fr = /* @__PURE__ */ ie({
|
|
|
13869
13873
|
class: "f-chat-tool-use-batch-item-text"
|
|
13870
13874
|
}, [f(l)]), d("div", {
|
|
13871
13875
|
class: "f-chat-tool-use-batch-item-status"
|
|
13872
|
-
}, [d(
|
|
13876
|
+
}, [d(gn, {
|
|
13873
13877
|
status: c(l),
|
|
13874
13878
|
variant: "tool-use"
|
|
13875
13879
|
}, null), d("span", null, [s(l)])]), p && d("i", {
|
|
@@ -14301,7 +14305,7 @@ const R2 = {
|
|
|
14301
14305
|
function h() {
|
|
14302
14306
|
t.emit("clickButton", {});
|
|
14303
14307
|
}
|
|
14304
|
-
async function
|
|
14308
|
+
async function m() {
|
|
14305
14309
|
var y;
|
|
14306
14310
|
o.value = !0, await De(), (y = u.value) == null || y.show(n.value);
|
|
14307
14311
|
}
|
|
@@ -14310,22 +14314,22 @@ const R2 = {
|
|
|
14310
14314
|
(y = u.value) == null || y.hide(), o.value = !1;
|
|
14311
14315
|
}
|
|
14312
14316
|
function w() {
|
|
14313
|
-
o.value ? p() :
|
|
14317
|
+
o.value ? p() : m();
|
|
14314
14318
|
}
|
|
14315
14319
|
function x(y) {
|
|
14316
14320
|
const k = y.target.value;
|
|
14317
|
-
r.value = k, f(k), e.showDropdown && k &&
|
|
14321
|
+
r.value = k, f(k), e.showDropdown && k && m();
|
|
14318
14322
|
}
|
|
14319
14323
|
function v() {
|
|
14320
|
-
e.showDropdown && r.value &&
|
|
14324
|
+
e.showDropdown && r.value && m();
|
|
14321
14325
|
}
|
|
14322
|
-
function
|
|
14326
|
+
function g() {
|
|
14323
14327
|
r.value = "", t.emit("update:modelValue", ""), p();
|
|
14324
14328
|
}
|
|
14325
14329
|
t.expose({
|
|
14326
14330
|
togglePopup: w,
|
|
14327
14331
|
hidePopup: p,
|
|
14328
|
-
showPopup:
|
|
14332
|
+
showPopup: m
|
|
14329
14333
|
});
|
|
14330
14334
|
const b = B(() => {
|
|
14331
14335
|
const y = Se({}, e.customClass);
|
|
@@ -14348,14 +14352,14 @@ const R2 = {
|
|
|
14348
14352
|
onFocus: v
|
|
14349
14353
|
}, null), r.value && !e.disable && d("span", {
|
|
14350
14354
|
class: "f-search-box-clear",
|
|
14351
|
-
onClick:
|
|
14355
|
+
onClick: g
|
|
14352
14356
|
}, [d("i", {
|
|
14353
14357
|
class: "fx-icon fx-icon-close"
|
|
14354
14358
|
}, null)]), d("span", {
|
|
14355
14359
|
class: "f-search-box-button",
|
|
14356
14360
|
onClick: h,
|
|
14357
14361
|
innerHTML: s.value
|
|
14358
|
-
}, null)]), e.showDropdown && d(
|
|
14362
|
+
}, null)]), e.showDropdown && d(Dn, {
|
|
14359
14363
|
ref: u,
|
|
14360
14364
|
placement: "bottom-left",
|
|
14361
14365
|
keepWidthWithReference: !0,
|
|
@@ -14404,43 +14408,43 @@ function M2(e) {
|
|
|
14404
14408
|
const t = H([...e.data]), n = H([]), u = H(""), i = B(() => {
|
|
14405
14409
|
var h;
|
|
14406
14410
|
const l = e.group;
|
|
14407
|
-
return l != null && l.enable && ((h = l.groupFields) != null && h.length) ? r(t.value, l) : t.value.map((
|
|
14411
|
+
return l != null && l.enable && ((h = l.groupFields) != null && h.length) ? r(t.value, l) : t.value.map((m, p) => ({
|
|
14408
14412
|
type: 0,
|
|
14409
|
-
data:
|
|
14413
|
+
data: m,
|
|
14410
14414
|
originalIndex: p
|
|
14411
14415
|
}));
|
|
14412
14416
|
});
|
|
14413
14417
|
function r(l, h) {
|
|
14414
|
-
const
|
|
14418
|
+
const m = [], p = h.groupFields[0], w = /* @__PURE__ */ new Map();
|
|
14415
14419
|
l.forEach((v) => {
|
|
14416
|
-
const
|
|
14417
|
-
w.has(
|
|
14420
|
+
const g = String(v[p] ?? "");
|
|
14421
|
+
w.has(g) || w.set(g, []), w.get(g).push(v);
|
|
14418
14422
|
});
|
|
14419
14423
|
let x = 0;
|
|
14420
|
-
return w.forEach((v,
|
|
14421
|
-
|
|
14424
|
+
return w.forEach((v, g) => {
|
|
14425
|
+
m.push({
|
|
14422
14426
|
type: 1,
|
|
14423
|
-
data: { [p]:
|
|
14427
|
+
data: { [p]: g },
|
|
14424
14428
|
groupField: p,
|
|
14425
|
-
groupValue:
|
|
14429
|
+
groupValue: g,
|
|
14426
14430
|
originalIndex: x++
|
|
14427
14431
|
}), v.forEach((b) => {
|
|
14428
|
-
|
|
14432
|
+
m.push({
|
|
14429
14433
|
type: 0,
|
|
14430
14434
|
data: b,
|
|
14431
14435
|
groupField: p,
|
|
14432
|
-
groupValue:
|
|
14436
|
+
groupValue: g,
|
|
14433
14437
|
originalIndex: x++
|
|
14434
14438
|
});
|
|
14435
14439
|
});
|
|
14436
|
-
}),
|
|
14440
|
+
}), m;
|
|
14437
14441
|
}
|
|
14438
14442
|
function o(l) {
|
|
14439
14443
|
t.value = [...l], n.value = [], u.value = "";
|
|
14440
14444
|
}
|
|
14441
14445
|
function a(l) {
|
|
14442
14446
|
u.value = l;
|
|
14443
|
-
const h = t.value.find((
|
|
14447
|
+
const h = t.value.find((m) => m[e.idField] === l);
|
|
14444
14448
|
h && !n.value.includes(h) && (n.value = [h]);
|
|
14445
14449
|
}
|
|
14446
14450
|
function s() {
|
|
@@ -14591,45 +14595,121 @@ const B2 = /* @__PURE__ */ ie({
|
|
|
14591
14595
|
br.install = (e) => {
|
|
14592
14596
|
e.component(br.name, br);
|
|
14593
14597
|
};
|
|
14594
|
-
const
|
|
14595
|
-
|
|
14596
|
-
|
|
14597
|
-
|
|
14598
|
-
type: Object,
|
|
14599
|
-
required: !0
|
|
14600
|
-
}
|
|
14598
|
+
const N2 = {
|
|
14599
|
+
content: {
|
|
14600
|
+
type: Object,
|
|
14601
|
+
required: !0
|
|
14601
14602
|
},
|
|
14603
|
+
/** 为 false 时根级默认收折;独立消息场景保持 true */
|
|
14604
|
+
defaultExpanded: {
|
|
14605
|
+
type: Boolean,
|
|
14606
|
+
default: !0
|
|
14607
|
+
}
|
|
14608
|
+
}, Ai = /* @__PURE__ */ ie({
|
|
14609
|
+
name: "FXAgentThinkingMessage",
|
|
14610
|
+
props: N2,
|
|
14602
14611
|
setup(e) {
|
|
14612
|
+
const t = H(e.defaultExpanded), n = H({}), u = B(() => {
|
|
14613
|
+
var m;
|
|
14614
|
+
const h = (m = e.content) == null ? void 0 : m.streamStatus;
|
|
14615
|
+
return h === "end" || h === void 0;
|
|
14616
|
+
}), i = B(() => {
|
|
14617
|
+
var m;
|
|
14618
|
+
const h = (m = e.content) == null ? void 0 : m.title;
|
|
14619
|
+
return h || (u.value ? "思考过程" : "正在思考...");
|
|
14620
|
+
}), r = B(() => {
|
|
14621
|
+
var h;
|
|
14622
|
+
return ((h = e.content) == null ? void 0 : h.steps) ?? [];
|
|
14623
|
+
}), o = B(() => {
|
|
14624
|
+
var h, m;
|
|
14625
|
+
return r.value.length > 0 ? "" : ((m = (h = e.content) == null ? void 0 : h.text) == null ? void 0 : m.trim()) ?? "";
|
|
14626
|
+
}), a = B(() => {
|
|
14627
|
+
var h, m;
|
|
14628
|
+
return r.value.length > 0 || !!o.value || (((m = (h = e.content) == null ? void 0 : h.sources) == null ? void 0 : m.length) ?? 0) > 0;
|
|
14629
|
+
});
|
|
14630
|
+
oe(r, (h) => {
|
|
14631
|
+
const m = {};
|
|
14632
|
+
h.forEach((p, w) => {
|
|
14633
|
+
m[w] = n.value[w] ?? !!p.detail;
|
|
14634
|
+
}), n.value = m;
|
|
14635
|
+
}, {
|
|
14636
|
+
immediate: !0
|
|
14637
|
+
}), oe(u, (h) => {
|
|
14638
|
+
h && (t.value = !1);
|
|
14639
|
+
});
|
|
14640
|
+
const s = () => {
|
|
14641
|
+
t.value = !t.value;
|
|
14642
|
+
}, c = (h) => {
|
|
14643
|
+
n.value = {
|
|
14644
|
+
...n.value,
|
|
14645
|
+
[h]: !n.value[h]
|
|
14646
|
+
};
|
|
14647
|
+
}, f = (h) => d("i", {
|
|
14648
|
+
class: "fx-icon fx-icon-foldup",
|
|
14649
|
+
style: {
|
|
14650
|
+
transform: h ? "rotate(0deg)" : "rotate(180deg)",
|
|
14651
|
+
transition: "all 0.3s ease-in-out"
|
|
14652
|
+
}
|
|
14653
|
+
}, null), l = (h, m) => {
|
|
14654
|
+
var x;
|
|
14655
|
+
const p = !!((x = h.detail) != null && x.trim()), w = n.value[m] ?? p;
|
|
14656
|
+
return d("div", {
|
|
14657
|
+
class: "f-x-thinking-step",
|
|
14658
|
+
key: m
|
|
14659
|
+
}, [d("div", {
|
|
14660
|
+
class: "f-x-thinking-step-header",
|
|
14661
|
+
onClick: () => p && c(m)
|
|
14662
|
+
}, [d("span", {
|
|
14663
|
+
class: "f-x-thinking-step-dot",
|
|
14664
|
+
"aria-hidden": !0
|
|
14665
|
+
}, null), d("span", {
|
|
14666
|
+
class: "f-x-thinking-step-summary"
|
|
14667
|
+
}, [h.summary]), p ? f(w) : null]), p && w ? d("div", {
|
|
14668
|
+
class: "f-x-thinking-step-detail"
|
|
14669
|
+
}, [h.detail]) : null]);
|
|
14670
|
+
};
|
|
14603
14671
|
return () => {
|
|
14604
|
-
const
|
|
14605
|
-
|
|
14606
|
-
|
|
14607
|
-
|
|
14608
|
-
|
|
14609
|
-
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14613
|
-
class:
|
|
14614
|
-
}, [
|
|
14615
|
-
class: "f-
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14672
|
+
const h = e.content;
|
|
14673
|
+
if (!h)
|
|
14674
|
+
return null;
|
|
14675
|
+
const m = {
|
|
14676
|
+
"f-x-thinking": !0,
|
|
14677
|
+
"is-pending": !u.value,
|
|
14678
|
+
"is-completed": u.value
|
|
14679
|
+
};
|
|
14680
|
+
return d("div", {
|
|
14681
|
+
class: m
|
|
14682
|
+
}, [d("div", {
|
|
14683
|
+
class: "f-x-thinking-header",
|
|
14684
|
+
onClick: s
|
|
14685
|
+
}, [u.value ? null : d(gn, {
|
|
14686
|
+
status: "Working",
|
|
14687
|
+
variant: "thinking"
|
|
14688
|
+
}, null), d("span", {
|
|
14689
|
+
class: "f-x-thinking-title"
|
|
14690
|
+
}, [i.value]), a.value ? f(t.value) : null]), t.value && a.value ? d("div", {
|
|
14691
|
+
class: "f-x-thinking-body"
|
|
14692
|
+
}, [o.value ? d("div", {
|
|
14693
|
+
class: "f-x-thinking-text"
|
|
14694
|
+
}, [o.value]) : null, r.value.map(l), h.sources && h.sources.length > 0 ? d("ul", {
|
|
14695
|
+
class: "f-x-thinking-sources"
|
|
14696
|
+
}, [h.sources.map((p, w) => d("li", {
|
|
14697
|
+
key: w
|
|
14698
|
+
}, [p]))]) : null]) : null]);
|
|
14619
14699
|
};
|
|
14620
14700
|
}
|
|
14621
14701
|
});
|
|
14622
14702
|
Ai.install = (e) => {
|
|
14623
14703
|
e.component(Ai.name, Ai);
|
|
14624
14704
|
};
|
|
14625
|
-
function
|
|
14705
|
+
function j2(e) {
|
|
14626
14706
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
14627
14707
|
}
|
|
14628
|
-
function
|
|
14708
|
+
function H2(e) {
|
|
14629
14709
|
const t = e.trim();
|
|
14630
14710
|
return t.startsWith("http://") || t.startsWith("https://") ? t : `#attachment:${encodeURIComponent(t)}`;
|
|
14631
14711
|
}
|
|
14632
|
-
function
|
|
14712
|
+
function $2(e) {
|
|
14633
14713
|
const t = e.trim();
|
|
14634
14714
|
return t.startsWith("http://") || t.startsWith("https://") ? {
|
|
14635
14715
|
url: t
|
|
@@ -14646,7 +14726,7 @@ const ki = /* @__PURE__ */ ie({
|
|
|
14646
14726
|
}
|
|
14647
14727
|
},
|
|
14648
14728
|
setup(e) {
|
|
14649
|
-
const t = B(() =>
|
|
14729
|
+
const t = B(() => H2(e.content.media)), n = B(() => su($2(e.content.media)));
|
|
14650
14730
|
async function u(i) {
|
|
14651
14731
|
i.preventDefault(), i.stopPropagation();
|
|
14652
14732
|
const r = n.value;
|
|
@@ -14674,7 +14754,7 @@ const ki = /* @__PURE__ */ ie({
|
|
|
14674
14754
|
class: "f-ec-attach-cat"
|
|
14675
14755
|
}, [e.content.category]), d("span", {
|
|
14676
14756
|
class: "f-ec-attach-size"
|
|
14677
|
-
}, [
|
|
14757
|
+
}, [j2(e.content.size)])])])]), i ? d("button", {
|
|
14678
14758
|
type: "button",
|
|
14679
14759
|
class: "f-ec-attach-download-btn",
|
|
14680
14760
|
"aria-label": "下载附件",
|
|
@@ -14710,7 +14790,7 @@ const ki = /* @__PURE__ */ ie({
|
|
|
14710
14790
|
ki.install = (e) => {
|
|
14711
14791
|
e.component(ki.name, ki);
|
|
14712
14792
|
};
|
|
14713
|
-
const
|
|
14793
|
+
const U2 = {
|
|
14714
14794
|
0: "高",
|
|
14715
14795
|
1: "中",
|
|
14716
14796
|
2: "低"
|
|
@@ -14731,7 +14811,7 @@ const $2 = {
|
|
|
14731
14811
|
class: "f-ec-error-head"
|
|
14732
14812
|
}, [d("span", {
|
|
14733
14813
|
class: "f-ec-error-badge"
|
|
14734
|
-
}, [
|
|
14814
|
+
}, [U2[t]]), d("span", {
|
|
14735
14815
|
class: "f-ec-error-label"
|
|
14736
14816
|
}, [de("错误提醒")])]), d("div", {
|
|
14737
14817
|
class: "f-ec-error-text"
|
|
@@ -14747,14 +14827,14 @@ const $2 = {
|
|
|
14747
14827
|
Ci.install = (e) => {
|
|
14748
14828
|
e.component(Ci.name, Ci);
|
|
14749
14829
|
};
|
|
14750
|
-
function
|
|
14830
|
+
function W2(e) {
|
|
14751
14831
|
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !tc(e);
|
|
14752
14832
|
}
|
|
14753
14833
|
const Wt = "__hitl_other__";
|
|
14754
14834
|
function _i(e, t = 120) {
|
|
14755
14835
|
return e ? e.length > t ? e.slice(0, t) + "..." : e : "";
|
|
14756
14836
|
}
|
|
14757
|
-
function
|
|
14837
|
+
function _n(e) {
|
|
14758
14838
|
const t = e ?? "text";
|
|
14759
14839
|
return t === "text" || t === "select" || t === "multi_select" || t === "confirm" || t === "form" || t === "date" || t === "number" ? t : "text";
|
|
14760
14840
|
}
|
|
@@ -14809,7 +14889,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
14809
14889
|
function o(C) {
|
|
14810
14890
|
const D = {}, M = {};
|
|
14811
14891
|
for (const z of C) {
|
|
14812
|
-
const j =
|
|
14892
|
+
const j = _n(z.ui_type);
|
|
14813
14893
|
if (j === "confirm")
|
|
14814
14894
|
D[z.id] = void 0;
|
|
14815
14895
|
else if (j === "text" || j === "select")
|
|
@@ -14844,7 +14924,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
14844
14924
|
for (const z of C) {
|
|
14845
14925
|
D[z.id] = z.answer;
|
|
14846
14926
|
const j = e.content.questions.find((I) => I.id === z.id);
|
|
14847
|
-
j &&
|
|
14927
|
+
j && _n(j.ui_type) === "select" && typeof z.answer == "string" && !(j.options ?? []).some((L) => L.label === z.answer) && z.answer !== "" && (M[z.id] = {
|
|
14848
14928
|
active: !0,
|
|
14849
14929
|
text: z.answer
|
|
14850
14930
|
}, D[z.id] = Wt);
|
|
@@ -14865,12 +14945,12 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
14865
14945
|
function h() {
|
|
14866
14946
|
e.required && !l.value || f.value || (n.value += 1);
|
|
14867
14947
|
}
|
|
14868
|
-
function
|
|
14948
|
+
function m() {
|
|
14869
14949
|
c.value || (n.value -= 1);
|
|
14870
14950
|
}
|
|
14871
14951
|
function p(C) {
|
|
14872
14952
|
var z, j;
|
|
14873
|
-
const D =
|
|
14953
|
+
const D = _n(C.ui_type), M = u.value[C.id];
|
|
14874
14954
|
if (D === "text" && (typeof M != "string" || M.trim() === "") || D === "select" && (typeof M != "string" || M.trim() === "" || M === Wt && (((j = (z = i.value[C.id]) == null ? void 0 : z.text) == null ? void 0 : j.trim()) ?? "") === "") || D === "confirm" && typeof M != "boolean" || D === "multi_select" && (!Array.isArray(M) || M.length === 0))
|
|
14875
14955
|
return !1;
|
|
14876
14956
|
if (D === "form") {
|
|
@@ -14897,7 +14977,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
14897
14977
|
[D]: M
|
|
14898
14978
|
});
|
|
14899
14979
|
}
|
|
14900
|
-
function
|
|
14980
|
+
function g(C, D) {
|
|
14901
14981
|
var M;
|
|
14902
14982
|
D === Wt ? (i.value = {
|
|
14903
14983
|
...i.value,
|
|
@@ -14923,7 +15003,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
14923
15003
|
if (!w.value) return;
|
|
14924
15004
|
const C = [];
|
|
14925
15005
|
for (const j of e.content.questions) {
|
|
14926
|
-
const I =
|
|
15006
|
+
const I = _n(j.ui_type);
|
|
14927
15007
|
let P = u.value[j.id];
|
|
14928
15008
|
I === "select" && P === Wt && (P = ((M = (D = i.value[j.id]) == null ? void 0 : D.text) == null ? void 0 : M.trim()) ?? ""), I === "number" && (P = Number(P)), C.push({
|
|
14929
15009
|
id: j.id,
|
|
@@ -15009,11 +15089,11 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
15009
15089
|
active: !1,
|
|
15010
15090
|
text: ""
|
|
15011
15091
|
}, P = M === "single", L = P && z === Wt || I.active, O = C.allow_other && L, W = (ne) => P ? z === ne.label && !I.active : j.includes(ne.label), ee = (ne) => () => {
|
|
15012
|
-
r.value || (P ?
|
|
15092
|
+
r.value || (P ? g(C, ne.label) : b(C, ne.label));
|
|
15013
15093
|
}, Q = () => {
|
|
15014
15094
|
if (!r.value)
|
|
15015
15095
|
if (P)
|
|
15016
|
-
|
|
15096
|
+
g(C, Wt);
|
|
15017
15097
|
else {
|
|
15018
15098
|
const ne = I.text;
|
|
15019
15099
|
I.active ? (x(C.id, j.filter((ce) => ce !== ne)), i.value = {
|
|
@@ -15100,7 +15180,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
15100
15180
|
})])]);
|
|
15101
15181
|
}
|
|
15102
15182
|
function N(C) {
|
|
15103
|
-
const D =
|
|
15183
|
+
const D = _n(C.ui_type);
|
|
15104
15184
|
if (D === "text") {
|
|
15105
15185
|
const M = u.value[C.id] ?? "";
|
|
15106
15186
|
return d("div", {
|
|
@@ -15177,7 +15257,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
15177
15257
|
}, [de("暂不支持 ui_type「"), String(C.ui_type), de("」,请升级前端。")])]);
|
|
15178
15258
|
}
|
|
15179
15259
|
function U(C) {
|
|
15180
|
-
const D =
|
|
15260
|
+
const D = _n(C.ui_type), M = (j, I, P) => d("input", {
|
|
15181
15261
|
class: "f-hitl-input",
|
|
15182
15262
|
type: j,
|
|
15183
15263
|
value: I,
|
|
@@ -15300,7 +15380,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
15300
15380
|
type: "button",
|
|
15301
15381
|
class: "f-hitl-pagination__btn",
|
|
15302
15382
|
disabled: c.value,
|
|
15303
|
-
onClick:
|
|
15383
|
+
onClick: m
|
|
15304
15384
|
}, [d("span", {
|
|
15305
15385
|
class: "fx-icon fx-icon-arrow-left"
|
|
15306
15386
|
}, null)]), d("span", {
|
|
@@ -15377,7 +15457,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
15377
15457
|
}, [I()]);
|
|
15378
15458
|
return d(Ve, null, [P, d(uo, {
|
|
15379
15459
|
to: e.teleportTo
|
|
15380
|
-
},
|
|
15460
|
+
}, W2(W) ? W : {
|
|
15381
15461
|
default: () => [W]
|
|
15382
15462
|
})]);
|
|
15383
15463
|
}
|
|
@@ -15398,7 +15478,7 @@ const Ei = /* @__PURE__ */ ie({
|
|
|
15398
15478
|
Ei.install = (e) => {
|
|
15399
15479
|
e.component(Ei.name, Ei);
|
|
15400
15480
|
};
|
|
15401
|
-
function
|
|
15481
|
+
function V2(e, t) {
|
|
15402
15482
|
var u;
|
|
15403
15483
|
const n = (u = e.pickActions) == null ? void 0 : u[t];
|
|
15404
15484
|
return n || e.pickActionDefault;
|
|
@@ -15418,7 +15498,7 @@ const Si = /* @__PURE__ */ ie({
|
|
|
15418
15498
|
setup(e) {
|
|
15419
15499
|
const t = (n, u) => {
|
|
15420
15500
|
var i;
|
|
15421
|
-
|
|
15501
|
+
V2(e.content, u), (i = e.onPick) == null || i.call(e, n);
|
|
15422
15502
|
};
|
|
15423
15503
|
return () => d("div", {
|
|
15424
15504
|
class: "f-ec-recommend"
|
|
@@ -15534,9 +15614,9 @@ Ti.install = (e) => {
|
|
|
15534
15614
|
Zu.install = (e) => {
|
|
15535
15615
|
e.component(Zu.name, Zu);
|
|
15536
15616
|
};
|
|
15537
|
-
const
|
|
15617
|
+
const ng = {
|
|
15538
15618
|
install(e) {
|
|
15539
|
-
e.use(Jn).use(Yu).use(Ku).use(rr).use(ir).use(or).use(ar).use(sr).use(lr).use(eu).use(
|
|
15619
|
+
e.use(Jn).use(Yu).use(Ku).use(rr).use(ir).use(or).use(ar).use(sr).use(lr).use(eu).use(Tn).use(ou).use(Fn).use(cr).use(dr).use(fr).use(hr).use(pr).use(tu).use(nu).use(Dn).use(ru).use(mr).use(gr).use(br);
|
|
15540
15620
|
}
|
|
15541
15621
|
};
|
|
15542
15622
|
export {
|
|
@@ -15562,9 +15642,9 @@ export {
|
|
|
15562
15642
|
Di as FXLinkCard,
|
|
15563
15643
|
br as FXListView,
|
|
15564
15644
|
eu as FXMarkdown,
|
|
15565
|
-
|
|
15645
|
+
Tn as FXMarkdownPreview,
|
|
15566
15646
|
mr as FXNav,
|
|
15567
|
-
|
|
15647
|
+
Dn as FXPopover,
|
|
15568
15648
|
x1 as FXPopoverDirective,
|
|
15569
15649
|
to as FXPrompt,
|
|
15570
15650
|
ou as FXPrompts,
|
|
@@ -15573,7 +15653,7 @@ export {
|
|
|
15573
15653
|
no as FXSearchBoxContainer,
|
|
15574
15654
|
ru as FXSplitter,
|
|
15575
15655
|
Sr as FXSplitterPane,
|
|
15576
|
-
|
|
15656
|
+
Fn as FXStartedTodo,
|
|
15577
15657
|
cr as FXSuggestion,
|
|
15578
15658
|
dr as FXTodo,
|
|
15579
15659
|
$i as FXTodoListItemView,
|
|
@@ -15587,6 +15667,7 @@ export {
|
|
|
15587
15667
|
Rl as PREVIEW_BRIDGE_MESSAGE_TYPE_ASSISTANT,
|
|
15588
15668
|
Ol as PREVIEW_BRIDGE_SOURCE,
|
|
15589
15669
|
Ll as PREVIEW_BRIDGE_VERSION,
|
|
15670
|
+
N2 as agentThinkingProps,
|
|
15590
15671
|
nc as appPreviewMessageProps,
|
|
15591
15672
|
D2 as attachmentPreviewProps,
|
|
15592
15673
|
D1 as bubbleActionProps,
|
|
@@ -15598,17 +15679,17 @@ export {
|
|
|
15598
15679
|
fm as clonePreviewPayloadForPostMessage,
|
|
15599
15680
|
p2 as codingMessageProps,
|
|
15600
15681
|
km as confirmDialogProps,
|
|
15601
|
-
|
|
15602
|
-
|
|
15682
|
+
J2 as createPreviewIframeSdk,
|
|
15683
|
+
ng as default,
|
|
15603
15684
|
sc as extractFileIdFromRuntimeDownloadUrl,
|
|
15604
15685
|
xc as fileEmbeddedContentProps,
|
|
15605
15686
|
b2 as fileOperationMessageProps,
|
|
15606
15687
|
y2 as generateProcessProps,
|
|
15607
15688
|
Se as getCustomClass,
|
|
15608
15689
|
Me as getCustomStyle,
|
|
15609
|
-
|
|
15690
|
+
Z2 as getDynamicCompState,
|
|
15610
15691
|
hl as getDynamicComponentRegistryDebugSnapshot,
|
|
15611
|
-
|
|
15692
|
+
Q2 as invokeAgentWorkbenchSdkApi,
|
|
15612
15693
|
fc as isImageUrl,
|
|
15613
15694
|
hm as isPreviewBridgeAssistantMessage,
|
|
15614
15695
|
Hl as listViewProps,
|
|
@@ -15618,14 +15699,14 @@ export {
|
|
|
15618
15699
|
L2 as navProps,
|
|
15619
15700
|
je as normalizeDynamicComponentRegisterClaim,
|
|
15620
15701
|
bc as overflowTooltipDirective,
|
|
15621
|
-
|
|
15702
|
+
X2 as peekDynamicComponentRegisterBootstrapId,
|
|
15622
15703
|
h1 as popoverProps,
|
|
15623
15704
|
mm as postAssistantToPreviewIframe,
|
|
15624
|
-
|
|
15625
|
-
|
|
15705
|
+
Y2 as postDynamicComponentAssistantMessage,
|
|
15706
|
+
tg as previewLayoutBridge,
|
|
15626
15707
|
C2 as promptProps,
|
|
15627
15708
|
k2 as promptsProps,
|
|
15628
|
-
|
|
15709
|
+
eg as registerPreviewChromeSdk,
|
|
15629
15710
|
io as renderIconNode,
|
|
15630
15711
|
Hu as renderNode,
|
|
15631
15712
|
su as resolveHrefForAttachmentDownload,
|