@ucap-llm/ai-ui 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/ai-ui.es.js +113 -112
- package/ai-ui.umd.js +8 -8
- package/package.json +1 -1
- package/style.css +1 -1
package/README.md
ADDED
package/ai-ui.es.js
CHANGED
|
@@ -15446,10 +15446,7 @@ var Ta = function(t, n) {
|
|
|
15446
15446
|
Ta.displayName = "MoreOutlined";
|
|
15447
15447
|
Ta.inheritAttrs = !1;
|
|
15448
15448
|
const UC = Ta;
|
|
15449
|
-
const qC = { class: "ai-chat-body" }, YC = { class: "ai-chat-body-l" }, KC = { class: "ai-chat-name" }, ZC = ["title"], QC = { class: "ai-chat-actions ai-chat-actions--after" }, JC = ["disabled"], eS = {
|
|
15450
|
-
key: 1,
|
|
15451
|
-
title: "删除"
|
|
15452
|
-
}, tS = { key: 0 }, nS = /* @__PURE__ */ Object.assign({ name: "AiChat" }, {
|
|
15449
|
+
const qC = { class: "ai-chat-body" }, YC = { class: "ai-chat-body-l" }, KC = { class: "ai-chat-name" }, ZC = ["title"], QC = { class: "ai-chat-actions ai-chat-actions--after" }, JC = ["disabled"], eS = { key: 0 }, tS = /* @__PURE__ */ Object.assign({ name: "AiChat" }, {
|
|
15453
15450
|
__name: "Chat",
|
|
15454
15451
|
props: {
|
|
15455
15452
|
name: String,
|
|
@@ -15510,25 +15507,29 @@ const qC = { class: "ai-chat-body" }, YC = { class: "ai-chat-body-l" }, KC = { c
|
|
|
15510
15507
|
title: "编辑",
|
|
15511
15508
|
disabled: e.disabled || i.value,
|
|
15512
15509
|
onClick: s
|
|
15513
|
-
}, d[
|
|
15510
|
+
}, d[4] || (d[4] = [
|
|
15514
15511
|
oe("i", { class: "ai-icon ai-icon-edit" }, null, -1)
|
|
15515
15512
|
]), 8, JC)) : De("", !0),
|
|
15516
|
-
e.actions.includes("delete") ? (ne(), re("button",
|
|
15513
|
+
e.actions.includes("delete") ? (ne(), re("button", {
|
|
15514
|
+
key: 1,
|
|
15515
|
+
title: "删除",
|
|
15516
|
+
onClick: d[1] || (d[1] = (m) => o("delete"))
|
|
15517
|
+
}, d[5] || (d[5] = [
|
|
15517
15518
|
oe("i", { class: "ai-icon ai-icon-delete" }, null, -1)
|
|
15518
15519
|
]))) : De("", !0),
|
|
15519
15520
|
y(p, {
|
|
15520
15521
|
open: l.value,
|
|
15521
|
-
"onUpdate:open": d[
|
|
15522
|
+
"onUpdate:open": d[3] || (d[3] = (m) => l.value = m)
|
|
15522
15523
|
}, {
|
|
15523
15524
|
overlay: Ct(() => [
|
|
15524
15525
|
oe("div", {
|
|
15525
|
-
onClick: d[
|
|
15526
|
+
onClick: d[2] || (d[2] = (m) => l.value = !1)
|
|
15526
15527
|
}, [
|
|
15527
15528
|
ie(u.$slots, "moreOverlay", {}, void 0, !0)
|
|
15528
15529
|
])
|
|
15529
15530
|
]),
|
|
15530
15531
|
default: Ct(() => [
|
|
15531
|
-
e.showMore ? (ne(), re("button",
|
|
15532
|
+
e.showMore ? (ne(), re("button", eS, d[6] || (d[6] = [
|
|
15532
15533
|
oe("i", { class: "ai-icon ai-icon-more" }, null, -1)
|
|
15533
15534
|
]))) : De("", !0)
|
|
15534
15535
|
]),
|
|
@@ -15540,16 +15541,16 @@ const qC = { class: "ai-chat-body" }, YC = { class: "ai-chat-body-l" }, KC = { c
|
|
|
15540
15541
|
], 2);
|
|
15541
15542
|
};
|
|
15542
15543
|
}
|
|
15543
|
-
}),
|
|
15544
|
-
const
|
|
15544
|
+
}), nS = /* @__PURE__ */ Mt(tS, [["__scopeId", "data-v-e3bf509d"]]);
|
|
15545
|
+
const oS = { class: "ai-chat-record-list" }, rS = /* @__PURE__ */ Object.assign({ name: "AiChatRecordList" }, {
|
|
15545
15546
|
__name: "ChatRecordList",
|
|
15546
15547
|
setup(e) {
|
|
15547
|
-
return (t, n) => (ne(), re("div",
|
|
15548
|
+
return (t, n) => (ne(), re("div", oS, [
|
|
15548
15549
|
ie(t.$slots, "default", {}, void 0, !0)
|
|
15549
15550
|
]));
|
|
15550
15551
|
}
|
|
15551
|
-
}),
|
|
15552
|
-
const
|
|
15552
|
+
}), iS = /* @__PURE__ */ Mt(rS, [["__scopeId", "data-v-1257a13c"]]);
|
|
15553
|
+
const aS = { class: "dropdown-wrap" }, lS = /* @__PURE__ */ Object.assign({ name: "AiChatRecordGroup" }, {
|
|
15553
15554
|
__name: "ChatRecordGroup",
|
|
15554
15555
|
props: {
|
|
15555
15556
|
showMore: {
|
|
@@ -15566,7 +15567,7 @@ const lS = { class: "dropdown-wrap" }, sS = /* @__PURE__ */ Object.assign({ name
|
|
|
15566
15567
|
"ai-chat-record-group--on": t.value
|
|
15567
15568
|
}])
|
|
15568
15569
|
}, [
|
|
15569
|
-
oe("div",
|
|
15570
|
+
oe("div", aS, [
|
|
15570
15571
|
y(r, {
|
|
15571
15572
|
open: t.value,
|
|
15572
15573
|
"onUpdate:open": o[2] || (o[2] = (i) => t.value = i)
|
|
@@ -15595,8 +15596,8 @@ const lS = { class: "dropdown-wrap" }, sS = /* @__PURE__ */ Object.assign({ name
|
|
|
15595
15596
|
], 2);
|
|
15596
15597
|
};
|
|
15597
15598
|
}
|
|
15598
|
-
}),
|
|
15599
|
-
function
|
|
15599
|
+
}), sS = /* @__PURE__ */ Mt(lS, [["__scopeId", "data-v-5f15a2c4"]]);
|
|
15600
|
+
function cS() {
|
|
15600
15601
|
return "xxxxx-xxxxx-4xxxx-yxxxx-xxxxx".replace(
|
|
15601
15602
|
/[xy]/g,
|
|
15602
15603
|
(t) => {
|
|
@@ -15629,11 +15630,11 @@ function of(e, t) {
|
|
|
15629
15630
|
} else
|
|
15630
15631
|
return "";
|
|
15631
15632
|
}
|
|
15632
|
-
function
|
|
15633
|
+
function uS(e) {
|
|
15633
15634
|
const t = document.createElement("link");
|
|
15634
15635
|
t.type = "text/css", t.rel = "stylesheet", t.href = e, document.getElementsByTagName("head")[0].appendChild(t);
|
|
15635
15636
|
}
|
|
15636
|
-
function
|
|
15637
|
+
function dS(e) {
|
|
15637
15638
|
return new Promise((t, n) => {
|
|
15638
15639
|
try {
|
|
15639
15640
|
const o = document.createElement("script");
|
|
@@ -15645,7 +15646,7 @@ function fS(e) {
|
|
|
15645
15646
|
}
|
|
15646
15647
|
});
|
|
15647
15648
|
}
|
|
15648
|
-
function
|
|
15649
|
+
function fS(e) {
|
|
15649
15650
|
e < 0.1 * 1024 ? e = e.toFixed(2) + "B" : e < 0.1 * 1024 * 1024 ? e = (e / 1024).toFixed(2) + "KB" : e < 0.1 * 1024 * 1024 * 1024 ? e = (e / (1024 * 1024)).toFixed(2) + "MB" : e = (e / (1024 * 1024 * 1024)).toFixed(2) + "GB";
|
|
15650
15651
|
let t = e + "", n = t.indexOf(".");
|
|
15651
15652
|
return t.substr(n + 1, 2) === "00" ? t.substring(0, n) + t.substr(n + 3, 2) : e;
|
|
@@ -15668,19 +15669,19 @@ function rf(e) {
|
|
|
15668
15669
|
}
|
|
15669
15670
|
});
|
|
15670
15671
|
}
|
|
15671
|
-
const
|
|
15672
|
+
const pS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15672
15673
|
__proto__: null,
|
|
15673
|
-
bytesToSize:
|
|
15674
|
+
bytesToSize: fS,
|
|
15674
15675
|
copy: rf,
|
|
15675
15676
|
dateFmt: of,
|
|
15676
|
-
guid:
|
|
15677
|
-
loadScript:
|
|
15678
|
-
loadStyle:
|
|
15677
|
+
guid: cS,
|
|
15678
|
+
loadScript: dS,
|
|
15679
|
+
loadStyle: uS
|
|
15679
15680
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
15680
|
-
const
|
|
15681
|
+
const gS = {
|
|
15681
15682
|
key: 0,
|
|
15682
15683
|
class: "ai-loading-message"
|
|
15683
|
-
},
|
|
15684
|
+
}, hS = {
|
|
15684
15685
|
__name: "Loading",
|
|
15685
15686
|
props: {
|
|
15686
15687
|
theme: {
|
|
@@ -15703,10 +15704,10 @@ const hS = {
|
|
|
15703
15704
|
oe("div", { class: "bounce2" }),
|
|
15704
15705
|
oe("div", { class: "bounce3" })
|
|
15705
15706
|
], -1)),
|
|
15706
|
-
e.message ? (ne(), re("div",
|
|
15707
|
+
e.message ? (ne(), re("div", gS, Mn(e.message), 1)) : De("", !0)
|
|
15707
15708
|
], 2));
|
|
15708
15709
|
}
|
|
15709
|
-
},
|
|
15710
|
+
}, mS = /* @__PURE__ */ Mt(hS, [["__scopeId", "data-v-604394fd"]]);
|
|
15710
15711
|
function Ea() {
|
|
15711
15712
|
return {
|
|
15712
15713
|
async: !1,
|
|
@@ -15725,33 +15726,33 @@ let Bt = Ea();
|
|
|
15725
15726
|
function af(e) {
|
|
15726
15727
|
Bt = e;
|
|
15727
15728
|
}
|
|
15728
|
-
const lf = /[&<>"']/,
|
|
15729
|
+
const lf = /[&<>"']/, vS = new RegExp(lf.source, "g"), sf = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, bS = new RegExp(sf.source, "g"), yS = {
|
|
15729
15730
|
"&": "&",
|
|
15730
15731
|
"<": "<",
|
|
15731
15732
|
">": ">",
|
|
15732
15733
|
'"': """,
|
|
15733
15734
|
"'": "'"
|
|
15734
|
-
}, Ws = (e) =>
|
|
15735
|
+
}, Ws = (e) => yS[e];
|
|
15735
15736
|
function Pe(e, t) {
|
|
15736
15737
|
if (t) {
|
|
15737
15738
|
if (lf.test(e))
|
|
15738
|
-
return e.replace(
|
|
15739
|
+
return e.replace(vS, Ws);
|
|
15739
15740
|
} else if (sf.test(e))
|
|
15740
|
-
return e.replace(
|
|
15741
|
+
return e.replace(bS, Ws);
|
|
15741
15742
|
return e;
|
|
15742
15743
|
}
|
|
15743
|
-
const
|
|
15744
|
-
function
|
|
15745
|
-
return e.replace(
|
|
15744
|
+
const xS = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
|
|
15745
|
+
function wS(e) {
|
|
15746
|
+
return e.replace(xS, (t, n) => (n = n.toLowerCase(), n === "colon" ? ":" : n.charAt(0) === "#" ? n.charAt(1) === "x" ? String.fromCharCode(parseInt(n.substring(2), 16)) : String.fromCharCode(+n.substring(1)) : ""));
|
|
15746
15747
|
}
|
|
15747
|
-
const
|
|
15748
|
+
const $S = /(^|[^\[])\^/g;
|
|
15748
15749
|
function Z(e, t) {
|
|
15749
15750
|
let n = typeof e == "string" ? e : e.source;
|
|
15750
15751
|
t = t || "";
|
|
15751
15752
|
const o = {
|
|
15752
15753
|
replace: (r, i) => {
|
|
15753
15754
|
let a = typeof i == "string" ? i : i.source;
|
|
15754
|
-
return a = a.replace(
|
|
15755
|
+
return a = a.replace($S, "$1"), n = n.replace(r, a), o;
|
|
15755
15756
|
},
|
|
15756
15757
|
getRegex: () => new RegExp(n, t)
|
|
15757
15758
|
};
|
|
@@ -15800,7 +15801,7 @@ function bn(e, t, n) {
|
|
|
15800
15801
|
}
|
|
15801
15802
|
return e.slice(0, o - r);
|
|
15802
15803
|
}
|
|
15803
|
-
function
|
|
15804
|
+
function CS(e, t) {
|
|
15804
15805
|
if (e.indexOf(t[1]) === -1)
|
|
15805
15806
|
return -1;
|
|
15806
15807
|
let n = 0;
|
|
@@ -15835,7 +15836,7 @@ function Xs(e, t, n, o) {
|
|
|
15835
15836
|
text: Pe(a)
|
|
15836
15837
|
};
|
|
15837
15838
|
}
|
|
15838
|
-
function
|
|
15839
|
+
function SS(e, t) {
|
|
15839
15840
|
const n = e.match(/^(\s+)(?:```)/);
|
|
15840
15841
|
if (n === null)
|
|
15841
15842
|
return t;
|
|
@@ -15883,7 +15884,7 @@ class Uo {
|
|
|
15883
15884
|
fences(t) {
|
|
15884
15885
|
const n = this.rules.block.fences.exec(t);
|
|
15885
15886
|
if (n) {
|
|
15886
|
-
const o = n[0], r =
|
|
15887
|
+
const o = n[0], r = SS(o, n[3] || "");
|
|
15887
15888
|
return {
|
|
15888
15889
|
type: "code",
|
|
15889
15890
|
raw: o,
|
|
@@ -16162,7 +16163,7 @@ ${d}` : d;
|
|
|
16162
16163
|
if ((o.length - a.length) % 2 === 0)
|
|
16163
16164
|
return;
|
|
16164
16165
|
} else {
|
|
16165
|
-
const a =
|
|
16166
|
+
const a = CS(n[2], "()");
|
|
16166
16167
|
if (a > -1) {
|
|
16167
16168
|
const s = (n[0].indexOf("!") === 0 ? 5 : 4) + n[1].length + a;
|
|
16168
16169
|
n[2] = n[2].substring(0, a), n[0] = n[0].substring(0, s).trim(), n[3] = "";
|
|
@@ -16326,25 +16327,25 @@ ${d}` : d;
|
|
|
16326
16327
|
}
|
|
16327
16328
|
}
|
|
16328
16329
|
}
|
|
16329
|
-
const
|
|
16330
|
-
blockquote:
|
|
16331
|
-
code:
|
|
16332
|
-
def:
|
|
16333
|
-
fences:
|
|
16334
|
-
heading:
|
|
16330
|
+
const OS = /^(?: *(?:\n|$))+/, _S = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, PS = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, io = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, TS = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, cf = /(?:[*+-]|\d{1,9}[.)])/, uf = Z(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, cf).replace(/blockCode/g, / {4}/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), Aa = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ES = /^[^\n]+/, Ia = /(?!\s*\])(?:\\.|[^\[\]\\])+/, AS = Z(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", Ia).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), IS = Z(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, cf).getRegex(), pr = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Ma = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, MS = Z("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))", "i").replace("comment", Ma).replace("tag", pr).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), df = Z(Aa).replace("hr", io).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", pr).getRegex(), RS = Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", df).getRegex(), Ra = {
|
|
16331
|
+
blockquote: RS,
|
|
16332
|
+
code: _S,
|
|
16333
|
+
def: AS,
|
|
16334
|
+
fences: PS,
|
|
16335
|
+
heading: TS,
|
|
16335
16336
|
hr: io,
|
|
16336
|
-
html:
|
|
16337
|
+
html: MS,
|
|
16337
16338
|
lheading: uf,
|
|
16338
|
-
list:
|
|
16339
|
-
newline:
|
|
16339
|
+
list: IS,
|
|
16340
|
+
newline: OS,
|
|
16340
16341
|
paragraph: df,
|
|
16341
16342
|
table: An,
|
|
16342
|
-
text:
|
|
16343
|
-
}, Us = Z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", io).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", pr).getRegex(),
|
|
16343
|
+
text: ES
|
|
16344
|
+
}, Us = Z("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", io).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", pr).getRegex(), zS = {
|
|
16344
16345
|
...Ra,
|
|
16345
16346
|
table: Us,
|
|
16346
16347
|
paragraph: Z(Aa).replace("hr", io).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Us).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", pr).getRegex()
|
|
16347
|
-
},
|
|
16348
|
+
}, kS = {
|
|
16348
16349
|
...Ra,
|
|
16349
16350
|
html: Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", Ma).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
16350
16351
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
@@ -16354,28 +16355,28 @@ const _S = /^(?: *(?:\n|$))+/, PS = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, TS =
|
|
|
16354
16355
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
16355
16356
|
paragraph: Z(Aa).replace("hr", io).replace("heading", ` *#{1,6} *[^
|
|
16356
16357
|
]`).replace("lheading", uf).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
16357
|
-
}, ff = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
|
|
16358
|
+
}, ff = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, BS = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, pf = /^( {2,}|\\)\n(?!\s*$)/, jS = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, ao = "\\p{P}\\p{S}", DS = Z(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, ao).getRegex(), NS = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, HS = Z(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, ao).getRegex(), LS = Z("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, ao).getRegex(), FS = Z("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, ao).getRegex(), WS = Z(/\\([punct])/, "gu").replace(/punct/g, ao).getRegex(), VS = Z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), GS = Z(Ma).replace("(?:-->|$)", "-->").getRegex(), XS = Z("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", GS).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), qo = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, US = Z(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", qo).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), gf = Z(/^!?\[(label)\]\[(ref)\]/).replace("label", qo).replace("ref", Ia).getRegex(), hf = Z(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ia).getRegex(), qS = Z("reflink|nolink(?!\\()", "g").replace("reflink", gf).replace("nolink", hf).getRegex(), za = {
|
|
16358
16359
|
_backpedal: An,
|
|
16359
16360
|
// only used for GFM url
|
|
16360
|
-
anyPunctuation:
|
|
16361
|
-
autolink:
|
|
16362
|
-
blockSkip:
|
|
16361
|
+
anyPunctuation: WS,
|
|
16362
|
+
autolink: VS,
|
|
16363
|
+
blockSkip: NS,
|
|
16363
16364
|
br: pf,
|
|
16364
|
-
code:
|
|
16365
|
+
code: BS,
|
|
16365
16366
|
del: An,
|
|
16366
|
-
emStrongLDelim:
|
|
16367
|
-
emStrongRDelimAst:
|
|
16368
|
-
emStrongRDelimUnd:
|
|
16367
|
+
emStrongLDelim: HS,
|
|
16368
|
+
emStrongRDelimAst: LS,
|
|
16369
|
+
emStrongRDelimUnd: FS,
|
|
16369
16370
|
escape: ff,
|
|
16370
|
-
link:
|
|
16371
|
+
link: US,
|
|
16371
16372
|
nolink: hf,
|
|
16372
|
-
punctuation:
|
|
16373
|
+
punctuation: DS,
|
|
16373
16374
|
reflink: gf,
|
|
16374
|
-
reflinkSearch:
|
|
16375
|
-
tag:
|
|
16376
|
-
text:
|
|
16375
|
+
reflinkSearch: qS,
|
|
16376
|
+
tag: XS,
|
|
16377
|
+
text: jS,
|
|
16377
16378
|
url: An
|
|
16378
|
-
},
|
|
16379
|
+
}, YS = {
|
|
16379
16380
|
...za,
|
|
16380
16381
|
link: Z(/^!?\[(label)\]\((.*?)\)/).replace("label", qo).getRegex(),
|
|
16381
16382
|
reflink: Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", qo).getRegex()
|
|
@@ -16386,19 +16387,19 @@ const _S = /^(?: *(?:\n|$))+/, PS = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, TS =
|
|
|
16386
16387
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
16387
16388
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
16388
16389
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
16389
|
-
},
|
|
16390
|
+
}, KS = {
|
|
16390
16391
|
...Ti,
|
|
16391
16392
|
br: Z(pf).replace("{2,}", "*").getRegex(),
|
|
16392
16393
|
text: Z(Ti.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
16393
16394
|
}, $o = {
|
|
16394
16395
|
normal: Ra,
|
|
16395
|
-
gfm:
|
|
16396
|
-
pedantic:
|
|
16396
|
+
gfm: zS,
|
|
16397
|
+
pedantic: kS
|
|
16397
16398
|
}, yn = {
|
|
16398
16399
|
normal: za,
|
|
16399
16400
|
gfm: Ti,
|
|
16400
|
-
breaks:
|
|
16401
|
-
pedantic:
|
|
16401
|
+
breaks: KS,
|
|
16402
|
+
pedantic: YS
|
|
16402
16403
|
};
|
|
16403
16404
|
class qe {
|
|
16404
16405
|
constructor(t) {
|
|
@@ -16978,7 +16979,7 @@ J(In, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
|
16978
16979
|
"processAllTokens"
|
|
16979
16980
|
]));
|
|
16980
16981
|
var Ko, mf, Yn, Ei, Zo, vf;
|
|
16981
|
-
class
|
|
16982
|
+
class ZS {
|
|
16982
16983
|
constructor(...t) {
|
|
16983
16984
|
// TODO: Remove this in next major release
|
|
16984
16985
|
lo(this, Ko);
|
|
@@ -17126,7 +17127,7 @@ Ko = new WeakSet(), mf = function(t, n, o) {
|
|
|
17126
17127
|
switch (n) {
|
|
17127
17128
|
case "heading":
|
|
17128
17129
|
return function(r) {
|
|
17129
|
-
return !r.type || r.type !== n ? t.apply(this, arguments) : t.call(this, o.parser.parseInline(r.tokens), r.depth,
|
|
17130
|
+
return !r.type || r.type !== n ? t.apply(this, arguments) : t.call(this, o.parser.parseInline(r.tokens), r.depth, wS(o.parser.parseInline(r.tokens, o.parser.textRenderer)));
|
|
17130
17131
|
};
|
|
17131
17132
|
case "code":
|
|
17132
17133
|
return function(r) {
|
|
@@ -17270,7 +17271,7 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
17270
17271
|
throw o;
|
|
17271
17272
|
};
|
|
17272
17273
|
};
|
|
17273
|
-
const At = new
|
|
17274
|
+
const At = new ZS();
|
|
17274
17275
|
function K(e, t) {
|
|
17275
17276
|
return At.parse(e, t);
|
|
17276
17277
|
}
|
|
@@ -17302,10 +17303,10 @@ K.walkTokens;
|
|
|
17302
17303
|
K.parseInline;
|
|
17303
17304
|
Ye.parse;
|
|
17304
17305
|
qe.lex;
|
|
17305
|
-
const
|
|
17306
|
+
const QS = ["innerHTML"], JS = ["innerHTML"], e2 = {
|
|
17306
17307
|
key: 2,
|
|
17307
17308
|
class: "content-parser-inner"
|
|
17308
|
-
},
|
|
17309
|
+
}, t2 = {
|
|
17309
17310
|
__name: "ContentParser",
|
|
17310
17311
|
props: {
|
|
17311
17312
|
// 内容类型
|
|
@@ -17327,33 +17328,33 @@ const JS = ["innerHTML"], e2 = ["innerHTML"], t2 = {
|
|
|
17327
17328
|
key: 0,
|
|
17328
17329
|
innerHTML: e.content,
|
|
17329
17330
|
class: "content-parser-inner"
|
|
17330
|
-
}, null, 8,
|
|
17331
|
+
}, null, 8, QS)) : e.type === "markdown" ? (ne(), re("div", {
|
|
17331
17332
|
key: 1,
|
|
17332
17333
|
innerHTML: Xt(K).parse(e.content),
|
|
17333
17334
|
class: "content-parser-inner"
|
|
17334
|
-
}, null, 8,
|
|
17335
|
+
}, null, 8, JS)) : (ne(), re("div", e2, Mn(e.content), 1))
|
|
17335
17336
|
], 2));
|
|
17336
17337
|
}
|
|
17337
|
-
},
|
|
17338
|
-
const
|
|
17338
|
+
}, n2 = /* @__PURE__ */ Mt(t2, [["__scopeId", "data-v-b36d9040"]]);
|
|
17339
|
+
const o2 = {
|
|
17339
17340
|
key: 0,
|
|
17340
17341
|
class: "ai-chat-record-avatar"
|
|
17341
|
-
},
|
|
17342
|
+
}, r2 = { class: "ai-chat-record-wrap" }, i2 = {
|
|
17342
17343
|
key: 0,
|
|
17343
17344
|
class: "ai-chat-record-head"
|
|
17344
|
-
},
|
|
17345
|
+
}, a2 = { class: "ai-chat-record-time" }, l2 = { class: "ai-chat-record-body" }, s2 = {
|
|
17345
17346
|
key: 0,
|
|
17346
17347
|
class: "ai-chat-record-loading-wrap"
|
|
17347
|
-
},
|
|
17348
|
+
}, c2 = {
|
|
17348
17349
|
key: 1,
|
|
17349
17350
|
class: "ai-chat-record-content"
|
|
17350
|
-
},
|
|
17351
|
+
}, u2 = { class: "ai-chat-record-content-before" }, d2 = { class: "ai-chat-record-content-inner" }, f2 = { class: "ai-chat-record-content-after" }, p2 = {
|
|
17351
17352
|
key: 0,
|
|
17352
17353
|
class: "character-count"
|
|
17353
|
-
},
|
|
17354
|
+
}, g2 = {
|
|
17354
17355
|
key: 1,
|
|
17355
17356
|
class: "ai-chat-record-foot"
|
|
17356
|
-
},
|
|
17357
|
+
}, h2 = { class: "foot-actions" }, m2 = { style: { display: "flex", "align-items": "center", color: "#333", "font-size": "12px" } }, v2 = /* @__PURE__ */ Object.assign({ name: "AiChatRecord" }, {
|
|
17357
17358
|
__name: "ChatRecord",
|
|
17358
17359
|
props: {
|
|
17359
17360
|
// 状态 wait:等待会显示loading, generating:生成中, done:生成完毕
|
|
@@ -17470,7 +17471,7 @@ const r2 = {
|
|
|
17470
17471
|
"ai-chat-record--show-time": e.showTime
|
|
17471
17472
|
}])
|
|
17472
17473
|
}, [
|
|
17473
|
-
e.showAvatar ? (ne(), re("div",
|
|
17474
|
+
e.showAvatar ? (ne(), re("div", o2, [
|
|
17474
17475
|
ie(d.$slots, "avatar", {}, () => [
|
|
17475
17476
|
y(p, {
|
|
17476
17477
|
size: 40,
|
|
@@ -17481,10 +17482,10 @@ const r2 = {
|
|
|
17481
17482
|
}, 8, ["src"])
|
|
17482
17483
|
], !0)
|
|
17483
17484
|
])) : De("", !0),
|
|
17484
|
-
oe("div",
|
|
17485
|
-
e.showTime ? (ne(), re("div",
|
|
17485
|
+
oe("div", r2, [
|
|
17486
|
+
e.showTime ? (ne(), re("div", i2, [
|
|
17486
17487
|
ie(d.$slots, "head", {}, () => [
|
|
17487
|
-
oe("div",
|
|
17488
|
+
oe("div", a2, [
|
|
17488
17489
|
ie(d.$slots, "time", { time: s.value }, () => [
|
|
17489
17490
|
pn(Mn(s.value), 1)
|
|
17490
17491
|
], !0)
|
|
@@ -17492,30 +17493,30 @@ const r2 = {
|
|
|
17492
17493
|
ie(d.$slots, "headRight", {}, void 0, !0)
|
|
17493
17494
|
], !0)
|
|
17494
17495
|
])) : De("", !0),
|
|
17495
|
-
oe("div",
|
|
17496
|
-
e.status === o.Loading ? (ne(), re("div",
|
|
17496
|
+
oe("div", l2, [
|
|
17497
|
+
e.status === o.Loading ? (ne(), re("div", s2, [
|
|
17497
17498
|
ie(d.$slots, "loading", {}, () => [
|
|
17498
|
-
y(
|
|
17499
|
+
y(mS, {
|
|
17499
17500
|
theme: e.pos === "r" ? "light" : "",
|
|
17500
17501
|
message: e.loadingMessage
|
|
17501
17502
|
}, null, 8, ["theme", "message"])
|
|
17502
17503
|
], !0)
|
|
17503
|
-
])) : (ne(), re("div",
|
|
17504
|
-
oe("div",
|
|
17504
|
+
])) : (ne(), re("div", c2, [
|
|
17505
|
+
oe("div", u2, [
|
|
17505
17506
|
ie(d.$slots, "contentBefore", {}, void 0, !0)
|
|
17506
17507
|
]),
|
|
17507
|
-
oe("div",
|
|
17508
|
+
oe("div", d2, [
|
|
17508
17509
|
ie(d.$slots, "content", {}, () => [
|
|
17509
|
-
y(
|
|
17510
|
+
y(n2, {
|
|
17510
17511
|
type: e.contentType,
|
|
17511
17512
|
content: e.content
|
|
17512
17513
|
}, null, 8, ["type", "content"])
|
|
17513
17514
|
], !0)
|
|
17514
17515
|
]),
|
|
17515
|
-
oe("div",
|
|
17516
|
+
oe("div", f2, [
|
|
17516
17517
|
ie(d.$slots, "contentAfter", {}, void 0, !0)
|
|
17517
17518
|
]),
|
|
17518
|
-
e.showCharacterCount && e.status === o.Done ? (ne(), re("div",
|
|
17519
|
+
e.showCharacterCount && e.status === o.Done ? (ne(), re("div", p2, [
|
|
17519
17520
|
ie(d.$slots, "characterCountBefore", {}, void 0, !0),
|
|
17520
17521
|
ie(d.$slots, "characterCount", {}, () => [
|
|
17521
17522
|
pn("共" + Mn(c.value) + "个字符", 1)
|
|
@@ -17524,9 +17525,9 @@ const r2 = {
|
|
|
17524
17525
|
])) : De("", !0)
|
|
17525
17526
|
]))
|
|
17526
17527
|
]),
|
|
17527
|
-
e.showFoot ? (ne(), re("div",
|
|
17528
|
+
e.showFoot ? (ne(), re("div", g2, [
|
|
17528
17529
|
ie(d.$slots, "foot", {}, () => [
|
|
17529
|
-
oe("div",
|
|
17530
|
+
oe("div", h2, [
|
|
17530
17531
|
ie(d.$slots, "actionsBefore", {}, void 0, !0),
|
|
17531
17532
|
ie(d.$slots, "actions", {}, () => [
|
|
17532
17533
|
y(m, {
|
|
@@ -17534,7 +17535,7 @@ const r2 = {
|
|
|
17534
17535
|
color: "#fff"
|
|
17535
17536
|
}, {
|
|
17536
17537
|
title: Ct(() => [
|
|
17537
|
-
oe("span",
|
|
17538
|
+
oe("span", m2, [
|
|
17538
17539
|
y(Xt(ro), { style: { "margin-right": "4px", color: "var(--success-color)", "font-size": "14px" } }),
|
|
17539
17540
|
f[2] || (f[2] = pn(" 已复制 "))
|
|
17540
17541
|
])
|
|
@@ -17568,27 +17569,27 @@ const r2 = {
|
|
|
17568
17569
|
], 2);
|
|
17569
17570
|
};
|
|
17570
17571
|
}
|
|
17571
|
-
}),
|
|
17572
|
+
}), b2 = /* @__PURE__ */ Mt(v2, [["__scopeId", "data-v-6a309bd2"]]);
|
|
17572
17573
|
const bf = [
|
|
17573
17574
|
jf,
|
|
17574
|
-
|
|
17575
|
-
|
|
17576
|
-
|
|
17577
|
-
|
|
17575
|
+
nS,
|
|
17576
|
+
iS,
|
|
17577
|
+
sS,
|
|
17578
|
+
b2
|
|
17578
17579
|
], yf = (e, t = {}) => {
|
|
17579
17580
|
bf.forEach((n) => {
|
|
17580
17581
|
e.component(n.name, n);
|
|
17581
17582
|
});
|
|
17582
17583
|
};
|
|
17583
17584
|
typeof window < "u" && window.Vue && yf(window.Vue);
|
|
17584
|
-
const
|
|
17585
|
+
const w2 = {
|
|
17585
17586
|
install: yf,
|
|
17586
17587
|
// 插件安装方法
|
|
17587
17588
|
...bf,
|
|
17588
17589
|
// 按需引用组件
|
|
17589
|
-
utils:
|
|
17590
|
+
utils: pS
|
|
17590
17591
|
// 全局工具方法
|
|
17591
17592
|
};
|
|
17592
17593
|
export {
|
|
17593
|
-
|
|
17594
|
+
w2 as default
|
|
17594
17595
|
};
|