@das-fed/upf-ui 6.4.0-dev.310 → 6.4.0-dev.311
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/front-end/i18n/front-end-page/dasui_en-US.js +6 -6
- package/front-end/i18n/front-end-page/dasui_zh-CN.js +6 -6
- package/front-end/i18n/front-end-page/dasui_zh-MO.js +6 -6
- package/package.json +7 -7
- package/packages/business-components/ai-panel/{index-C1XseEkL.js → index-BdLFU3HT.js} +1 -1
- package/packages/business-components/ai-panel/index-BdLFU3HT.js.gz +0 -0
- package/packages/business-components/ai-panel/{index-_XzaXcle.js → index-Cc1_Wpca.js} +1154 -1136
- package/packages/business-components/ai-panel/index-Cc1_Wpca.js.gz +0 -0
- package/packages/business-components/ai-panel/index.js +1 -1
- package/packages/business-components/ai-panel/src/dasAI/hooks/audio.d.ts +1 -1
- package/packages/business-components/app-container/index.js +56 -56
- package/packages/business-components/app-container/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/index.d.ts +30 -30
- package/packages/business-components/area-phone-select/index.js +87 -87
- package/packages/business-components/area-phone-select/index.js.gz +0 -0
- package/packages/business-components/area-phone-select/src/area-popover/index.vue.d.ts +4 -4
- package/packages/business-components/change-enterprises/index.js +20 -20
- package/packages/business-components/change-enterprises/index.js.gz +0 -0
- package/packages/business-components/change-pwd/index.js +15 -15
- package/packages/business-components/change-pwd/index.js.gz +0 -0
- package/packages/business-components/change-pwd/src/hooks/use-changePwd.d.ts +14 -14
- package/packages/business-components/currency-page/index.js +39 -39
- package/packages/business-components/currency-page/index.js.gz +0 -0
- package/packages/business-components/device-panel/index.js +46 -46
- package/packages/business-components/device-panel/index.js.gz +0 -0
- package/packages/business-components/device-panel/style.css +1 -1
- package/packages/business-components/device-panel/style.css.gz +0 -0
- package/packages/business-components/export-button/index.js +92 -92
- package/packages/business-components/export-button/index.js.gz +0 -0
- package/packages/business-components/import-button/index.js +171 -171
- package/packages/business-components/import-button/index.js.gz +0 -0
- package/packages/business-components/layout-breadcrumb/index.js +42 -42
- package/packages/business-components/layout-breadcrumb/index.js.gz +0 -0
- package/packages/business-components/model-table-dialog/index.d.ts +4 -4
- package/packages/business-components/model-table-dialog/index.js +233 -233
- package/packages/business-components/model-table-dialog/index.js.gz +0 -0
- package/packages/business-components/payment/index.js +44 -44
- package/packages/business-components/payment/index.js.gz +0 -0
- package/packages/business-components/process-form/index.js +939 -939
- package/packages/business-components/process-form/index.js.gz +0 -0
- package/packages/business-components/process-form/src/hooks/useForm.d.ts +14 -14
- package/packages/business-components/process-log/index.js +331 -331
- package/packages/business-components/process-log/index.js.gz +0 -0
- package/packages/business-components/process-log/style.css +1 -1
- package/packages/business-components/process-log/style.css.gz +0 -0
- package/packages/business-components/process-search-form/hooks/useSearchOptions.d.ts +2 -2
- package/packages/business-components/process-table/index.d.ts +14 -14
- package/packages/business-components/upload-file/index.js +43 -43
- package/packages/business-components/upload-file/index.js.gz +0 -0
- package/packages/business-components/upload-file/style.css +1 -1
- package/packages/business-components/urgent-panel/index.js +340 -340
- package/packages/business-components/urgent-panel/index.js.gz +0 -0
- package/packages/business-components/video-dialog/index.js +17 -17
- package/packages/business-components/video-dialog/index.js.gz +0 -0
- package/packages/business-components/video-dialog/style.css +1 -1
- package/packages/business-components/video-dialog/style.css.gz +0 -0
- package/packages/components/alert/index.d.ts +4 -4
- package/packages/components/alert/index.js +5 -5
- package/packages/components/alert/index.js.gz +0 -0
- package/packages/components/audio-video/index.js +141 -141
- package/packages/components/audio-video/index.js.gz +0 -0
- package/packages/components/autocomplete/index.d.ts +6 -6
- package/packages/components/autocomplete/index.js +162 -162
- package/packages/components/autocomplete/index.js.gz +0 -0
- package/packages/components/autocomplete/style.css +1 -1
- package/packages/components/autocomplete/style.css.gz +0 -0
- package/packages/components/breadcrumb/index.js +37 -37
- package/packages/components/breadcrumb/index.js.gz +0 -0
- package/packages/components/button/index.js +223 -223
- package/packages/components/button/index.js.gz +0 -0
- package/packages/components/calendar/index.js +164 -164
- package/packages/components/calendar/index.js.gz +0 -0
- package/packages/components/cascader/index.d.ts +8 -8
- package/packages/components/cascader/index.js +89 -89
- package/packages/components/cascader/index.js.gz +0 -0
- package/packages/components/cascader/style.css +1 -1
- package/packages/components/cascader/style.css.gz +0 -0
- package/packages/components/checkbox/index.d.ts +12 -12
- package/packages/components/checkbox/index.js +180 -180
- package/packages/components/checkbox/index.js.gz +0 -0
- package/packages/components/checkbox/style.css +1 -1
- package/packages/components/checkbox/style.css.gz +0 -0
- package/packages/components/collapse-panel/index.js +12 -12
- package/packages/components/collapse-panel/index.js.gz +0 -0
- package/packages/components/collaspe/index.d.ts +4 -4
- package/packages/components/collaspe/index.js +22 -22
- package/packages/components/collaspe/index.js.gz +0 -0
- package/packages/components/custom-search-item/index.d.ts +4 -4
- package/packages/components/custom-search-item/index.js +36 -36
- package/packages/components/custom-search-item/index.js.gz +0 -0
- package/packages/components/date-picker/index.js +658 -658
- package/packages/components/date-picker/index.js.gz +0 -0
- package/packages/components/date-picker/style.css +1 -1
- package/packages/components/date-picker/style.css.gz +0 -0
- package/packages/components/dialog/index.js +1 -1
- package/packages/components/dialog/index.js.gz +0 -0
- package/packages/components/dialog/style.css +1 -1
- package/packages/components/dialog/style.css.gz +0 -0
- package/packages/components/dimple-layout/index.js +73 -31
- package/packages/components/dimple-layout/index.js.gz +0 -0
- package/packages/components/dropdown/index.js +33 -33
- package/packages/components/dropdown/index.js.gz +0 -0
- package/packages/components/edit-table/index.d.ts +4 -4
- package/packages/components/edit-table/index.js +190 -190
- package/packages/components/edit-table/index.js.gz +0 -0
- package/packages/components/empty/index.js +29 -29
- package/packages/components/empty/index.js.gz +0 -0
- package/packages/components/error-overlay-model/index.js +31 -31
- package/packages/components/error-overlay-model/index.js.gz +0 -0
- package/packages/components/form/index.d.ts +14 -14
- package/packages/components/form/index.js +23 -23
- package/packages/components/form/index.js.gz +0 -0
- package/packages/components/form-item/index.js +771 -771
- package/packages/components/form-item/index.js.gz +0 -0
- package/packages/components/form-item/style.css +1 -1
- package/packages/components/form-item/style.css.gz +0 -0
- package/packages/components/image-upload/index.js +90 -90
- package/packages/components/image-upload/index.js.gz +0 -0
- package/packages/components/image-viewer/index.js +418 -418
- package/packages/components/image-viewer/index.js.gz +0 -0
- package/packages/components/infinite-scroll/index.d.ts +3 -1
- package/packages/components/infinite-scroll/index.js +509 -509
- package/packages/components/infinite-scroll/index.js.gz +0 -0
- package/packages/components/infinite-scroll/src/index.vue.d.ts +3 -1
- package/packages/components/infinite-scroll/src/type.d.ts +78 -78
- package/packages/components/infinite-scroll/style.css +1 -1
- package/packages/components/infinite-scroll/style.css.gz +0 -0
- package/packages/components/input/index.js +544 -544
- package/packages/components/input/index.js.gz +0 -0
- package/packages/components/input/src/index.vue.d.ts +2 -2
- package/packages/components/input/style.css +1 -1
- package/packages/components/input/style.css.gz +0 -0
- package/packages/components/input-dialog-select/index.js +82 -82
- package/packages/components/input-dialog-select/index.js.gz +0 -0
- package/packages/components/input-number/index.js +103 -103
- package/packages/components/input-number/index.js.gz +0 -0
- package/packages/components/input-number/style.css +1 -1
- package/packages/components/input-number/style.css.gz +0 -0
- package/packages/components/live-player/index.d.ts +4 -4
- package/packages/components/loading/index.js +1 -1
- package/packages/components/loading/index.js.gz +0 -0
- package/packages/components/menu-aside/index.js +600 -600
- package/packages/components/menu-aside/index.js.gz +0 -0
- package/packages/components/menu-header/index.js +17 -17
- package/packages/components/menu-header/index.js.gz +0 -0
- package/packages/components/pagination/index.js +91 -91
- package/packages/components/pagination/index.js.gz +0 -0
- package/packages/components/pagination/style.css +1 -1
- package/packages/components/pagination/style.css.gz +0 -0
- package/packages/components/popover/index.d.ts +4 -4
- package/packages/components/popover/index.js +33 -33
- package/packages/components/popover/index.js.gz +0 -0
- package/packages/components/popup-mask/index.js +13 -13
- package/packages/components/popup-mask/index.js.gz +0 -0
- package/packages/components/progress/index.js +93 -93
- package/packages/components/progress/index.js.gz +0 -0
- package/packages/components/progress/style.css +1 -1
- package/packages/components/progress/style.css.gz +0 -0
- package/packages/components/radio/index.d.ts +10 -10
- package/packages/components/radio/index.js +175 -175
- package/packages/components/radio/index.js.gz +0 -0
- package/packages/components/rich-editor/index.js +234 -234
- package/packages/components/rich-editor/index.js.gz +0 -0
- package/packages/components/scrollbar/index.js +2 -2
- package/packages/components/scrollbar/index.js.gz +0 -0
- package/packages/components/search/index.js +68 -68
- package/packages/components/search/index.js.gz +0 -0
- package/packages/components/search-form/index.js +736 -736
- package/packages/components/search-form/index.js.gz +0 -0
- package/packages/components/search-form/style.css +1 -1
- package/packages/components/search-form/style.css.gz +0 -0
- package/packages/components/select/index.js +212 -212
- package/packages/components/select/index.js.gz +0 -0
- package/packages/components/select/style.css +1 -1
- package/packages/components/select/style.css.gz +0 -0
- package/packages/components/select-input/index.js +77 -77
- package/packages/components/select-input/index.js.gz +0 -0
- package/packages/components/select-list/index.js +430 -430
- package/packages/components/select-list/index.js.gz +0 -0
- package/packages/components/select-list/style.css +1 -1
- package/packages/components/select-list/style.css.gz +0 -0
- package/packages/components/special-range-picker-month/index.js +140 -140
- package/packages/components/special-range-picker-month/index.js.gz +0 -0
- package/packages/components/special-range-picker-month/style.css +1 -1
- package/packages/components/special-range-picker-month/style.css.gz +0 -0
- package/packages/components/special-range-picker-year/index.js +169 -169
- package/packages/components/special-range-picker-year/index.js.gz +0 -0
- package/packages/components/special-range-picker-year/style.css +1 -1
- package/packages/components/special-range-picker-year/style.css.gz +0 -0
- package/packages/components/spin/index.js +37 -37
- package/packages/components/spin/index.js.gz +0 -0
- package/packages/components/split-panel/index.d.ts +8 -8
- package/packages/components/split-panel/index.js +27 -27
- package/packages/components/split-panel/index.js.gz +0 -0
- package/packages/components/switch/style.css +1 -1
- package/packages/components/switch/style.css.gz +0 -0
- package/packages/components/table/index.d.ts +103 -103
- package/packages/components/table/index.js +1869 -1869
- package/packages/components/table/index.js.gz +0 -0
- package/packages/components/table/src/Table.vue.d.ts +9 -9
- package/packages/components/tabs/index.js +101 -101
- package/packages/components/tabs/index.js.gz +0 -0
- package/packages/components/text-tooltip/src/type.d.ts +5 -5
- package/packages/components/time-line/index.js +35 -35
- package/packages/components/time-line/index.js.gz +0 -0
- package/packages/components/tooltip/index.d.ts +6 -6
- package/packages/components/tooltip/index.js +62 -62
- package/packages/components/tooltip/index.js.gz +0 -0
- package/packages/components/tooltip/style.css +1 -1
- package/packages/components/tooltip/style.css.gz +0 -0
- package/packages/components/tree/index.js +426 -426
- package/packages/components/tree/index.js.gz +0 -0
- package/packages/components/tree-select/index.js +233 -233
- package/packages/components/tree-select/index.js.gz +0 -0
- package/packages/components/tree-select/src/App.vue.d.ts +14 -14
- package/packages/components/tree-select/src/hooks/use-tree-select.d.ts +12 -12
- package/packages/components/tree-table/index.d.ts +2 -2
- package/packages/components/tree-table/index.js +181 -181
- package/packages/components/tree-table/index.js.gz +0 -0
- package/packages/components/tree-v2/index.js +1308 -1308
- package/packages/components/tree-v2/index.js.gz +0 -0
- package/packages/components/tree-v2/src/App.vue.d.ts +155 -145
- package/packages/components/tree-v2/style.css +1 -1
- package/packages/components/tree-v2/style.css.gz +0 -0
- package/packages/components/upload/index.js +98 -98
- package/packages/components/upload/index.js.gz +0 -0
- package/packages/components/virtual-tree/index.js +62 -62
- package/packages/components/virtual-tree/index.js.gz +0 -0
- package/packages/components/virtual-tree/src/App.vue.d.ts +140 -140
- package/release-meta.json +4 -4
- package/packages/business-components/ai-panel/index-C1XseEkL.js.gz +0 -0
- package/packages/business-components/ai-panel/index-_XzaXcle.js.gz +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
1
|
+
import { defineAsyncComponent as it, ref as M, watch as bu, h as ot, reactive as ct, defineComponent as iu, onMounted as Ru, openBlock as w, createElementBlock as q, createElementVNode as g, toDisplayString as V, computed as su, createCommentVNode as T, createVNode as H, unref as A, normalizeClass as Ju, createBlock as X, withCtx as J, Fragment as Nu, renderList as Qu, withDirectives as yu, withKeys as Jt, vModelText as Qt, withModifiers as Fe, vShow as Hu, onBeforeUnmount as at, resolveDirective as Wt, nextTick as ye, Transition as Xt, normalizeStyle as Yt } from "vue";
|
|
2
2
|
import { withInstall as u0 } from "@das-fed/upf-utils/with-install/index";
|
|
3
3
|
import { useRoute as e0 } from "vue-router";
|
|
4
4
|
import { DasIconClose2 as t0 } from "@das-fed/upf-ui/packages/icons/close-2/index";
|
|
5
5
|
import { t as I, setI18nRule as n0 } from "@das-fed/upf-web/packages/i18n/index";
|
|
6
6
|
import { DasIconAudioing as r0 } from "@das-fed/upf-ui/packages/icons/audioing/index";
|
|
7
|
-
import { DasIconCloseaudio as
|
|
8
|
-
import { DasIconLishihuihua as
|
|
7
|
+
import { DasIconCloseaudio as i0 } from "@das-fed/upf-ui/packages/icons/closeaudio/index";
|
|
8
|
+
import { DasIconLishihuihua as o0 } from "@das-fed/upf-ui/packages/icons/lishihuihua/index";
|
|
9
9
|
import { DasScrollbar as we } from "@das-fed/upf-ui/packages/components/scrollbar/index";
|
|
10
10
|
import "@das-fed/upf-ui/packages/components/text-tooltip/index";
|
|
11
11
|
import { DasTooltip as Cu } from "@das-fed/upf-ui/packages/components/tooltip/index";
|
|
@@ -32,7 +32,7 @@ import { DasIconSelect2 as b0 } from "@das-fed/upf-ui/packages/icons/select2/ind
|
|
|
32
32
|
import { DasPopover as m0 } from "@das-fed/upf-ui/packages/components/popover/index";
|
|
33
33
|
import { DasTree as x0 } from "@das-fed/upf-ui/packages/components/tree/index";
|
|
34
34
|
import { vDasLoading as bt } from "@das-fed/upf-ui/packages/components/loading/index";
|
|
35
|
-
import { createService as mt, iotMinio as xt, knowledgeBase as
|
|
35
|
+
import { createService as mt, iotMinio as xt, knowledgeBase as qu } from "@das-fed/upf-utils/api-services";
|
|
36
36
|
import { DasIconLianjie as _0 } from "@das-fed/upf-ui/packages/icons/lianjie/index";
|
|
37
37
|
import { DasIconQingkong as g0 } from "@das-fed/upf-ui/packages/icons/qingkong/index";
|
|
38
38
|
import { DasIconDelete as k0 } from "@das-fed/upf-ui/packages/icons/delete/index";
|
|
@@ -47,14 +47,14 @@ let $u = (u = 21) => {
|
|
|
47
47
|
}
|
|
48
48
|
return e;
|
|
49
49
|
};
|
|
50
|
-
const C0 =
|
|
50
|
+
const C0 = it(() => import("./index-BdLFU3HT.js")), D0 = () => {
|
|
51
51
|
const u = M(), e = M(!1);
|
|
52
52
|
let t = !1;
|
|
53
53
|
const n = (c) => {
|
|
54
54
|
e.value && (t = c, e.value = !1);
|
|
55
55
|
};
|
|
56
56
|
return {
|
|
57
|
-
folderDialogVue: () =>
|
|
57
|
+
folderDialogVue: () => ot(C0, {
|
|
58
58
|
dialogShow: e.value,
|
|
59
59
|
content: u.value,
|
|
60
60
|
onSubmit: (c) => {
|
|
@@ -67,13 +67,13 @@ const C0 = ot(() => import("./index-C1XseEkL.js")), D0 = () => {
|
|
|
67
67
|
n(!1);
|
|
68
68
|
}
|
|
69
69
|
}),
|
|
70
|
-
showFolderDialog: async (c) => (u.value = c, e.value = !0, new Promise((
|
|
70
|
+
showFolderDialog: async (c) => (u.value = c, e.value = !0, new Promise((o) => {
|
|
71
71
|
const a = bu(() => e.value, (s) => {
|
|
72
|
-
|
|
72
|
+
o(t), a();
|
|
73
73
|
});
|
|
74
74
|
}))
|
|
75
75
|
};
|
|
76
|
-
},
|
|
76
|
+
}, m = ct({
|
|
77
77
|
deepseek: !1,
|
|
78
78
|
// 是否深度思考
|
|
79
79
|
loading: !1,
|
|
@@ -89,7 +89,7 @@ const C0 = ot(() => import("./index-C1XseEkL.js")), D0 = () => {
|
|
|
89
89
|
folderName: ""
|
|
90
90
|
// 默认选择知识库-全部
|
|
91
91
|
}), E0 = () => {
|
|
92
|
-
|
|
92
|
+
m.loading = !1, m.isplay = !1, m.showScrollBom = !1, m.senderValue = "";
|
|
93
93
|
};
|
|
94
94
|
ct({
|
|
95
95
|
knowDeepseek: !1,
|
|
@@ -106,22 +106,22 @@ const _t = () => sessionStorage.getItem("deepseekConfig") ? JSON.parse(sessionSt
|
|
|
106
106
|
sessionStorage.setItem("deepseekConfig", JSON.stringify(e));
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
|
-
|
|
109
|
+
m.searchType == "0" && (e.appDeepseek = m.deepseek), m.searchType == "1" && (e.knowDeepseek = m.deepseek), m.searchType == "2" && (e.networkDeepseek = m.deepseek), sessionStorage.setItem("deepseekConfig", JSON.stringify(e));
|
|
110
110
|
}, Vu = () => {
|
|
111
111
|
const u = _t();
|
|
112
|
-
|
|
112
|
+
m.searchType == "0" && (m.deepseek = u.appDeepseek), m.searchType == "1" && (m.deepseek = u.knowDeepseek), m.searchType == "2" && (m.deepseek = u.networkDeepseek);
|
|
113
113
|
};
|
|
114
114
|
var tu = function(u, e) {
|
|
115
115
|
if (!(this instanceof tu))
|
|
116
116
|
return new tu(u, e);
|
|
117
|
-
this.url = u, e = e || {}, this.headers = e.headers || {}, this.payload = e.payload !== void 0 ? e.payload : "", this.method = e.method || this.payload && "POST" || "GET", this.withCredentials = !!e.withCredentials, this.debug = !!e.debug, this.FIELD_SEPARATOR = ":", this.listeners = {}, this.xhr = null, this.readyState = tu.INITIALIZING, this.progress = 0, this.chunk = "", this.lastEventId = "", this.addEventListener = function(t, n) {
|
|
117
|
+
this.url = u, e = e || {}, this.headers = e.headers || {}, this.payload = e.payload !== void 0 ? e.payload : "", this.method = e.method || this.payload && "POST" || "GET", this.withCredentials = !!e.withCredentials, this.debug = !!e.debug, this.autoReconnect = e.autoReconnect !== void 0 ? e.autoReconnect : !1, this.reconnectDelay = e.reconnectDelay !== void 0 ? e.reconnectDelay : 3e3, this.maxRetries = e.maxRetries !== void 0 ? e.maxRetries : null, this.retryCount = 0, this.reconnectTimer = null, this.useLastEventId = e.useLastEventId !== void 0 ? e.useLastEventId : !0, this.FIELD_SEPARATOR = ":", this.listeners = {}, this.xhr = null, this.readyState = tu.INITIALIZING, this.progress = 0, this.chunk = "", this.lastEventId = "", this.addEventListener = function(t, n) {
|
|
118
118
|
this.listeners[t] === void 0 && (this.listeners[t] = []), this.listeners[t].indexOf(n) === -1 && this.listeners[t].push(n);
|
|
119
119
|
}, this.removeEventListener = function(t, n) {
|
|
120
120
|
if (this.listeners[t] === void 0)
|
|
121
121
|
return;
|
|
122
122
|
const r = [];
|
|
123
|
-
this.listeners[t].forEach(function(
|
|
124
|
-
|
|
123
|
+
this.listeners[t].forEach(function(i) {
|
|
124
|
+
i !== n && r.push(i);
|
|
125
125
|
}), r.length === 0 ? delete this.listeners[t] : this.listeners[t] = r;
|
|
126
126
|
}, this.dispatchEvent = function(t) {
|
|
127
127
|
if (!t)
|
|
@@ -132,7 +132,15 @@ var tu = function(u, e) {
|
|
|
132
132
|
return r(t), !t.defaultPrevented;
|
|
133
133
|
}) : !0;
|
|
134
134
|
}, this._markClosed = function() {
|
|
135
|
-
this.xhr = null, this.progress = 0, this.chunk = "", this._setReadyState(tu.CLOSED)
|
|
135
|
+
if (this.xhr = null, this.progress = 0, this.chunk = "", this._setReadyState(tu.CLOSED), this.autoReconnect) {
|
|
136
|
+
if (this.maxRetries !== null && this.retryCount >= this.maxRetries) {
|
|
137
|
+
this.debug, this.autoReconnect = !1, this.close();
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
this.reconnectTimer && clearTimeout(this.reconnectTimer), this.debug, this.reconnectTimer = setTimeout(() => {
|
|
141
|
+
this.reconnectTimer = null, this.retryCount++, this.stream();
|
|
142
|
+
}, this.reconnectDelay);
|
|
143
|
+
}
|
|
136
144
|
}, this._setReadyState = function(t) {
|
|
137
145
|
const n = new CustomEvent("readystatechange");
|
|
138
146
|
n.readyState = t, this.readyState = t, this.dispatchEvent(n);
|
|
@@ -148,12 +156,15 @@ var tu = function(u, e) {
|
|
|
148
156
|
this._onStreamFailure(t);
|
|
149
157
|
return;
|
|
150
158
|
}
|
|
159
|
+
this.retryCount = 0;
|
|
151
160
|
const n = this.xhr.responseText.substring(this.progress);
|
|
152
161
|
this.progress += n.length;
|
|
153
|
-
const r = (this.chunk + n).split(/(\r\n\r\n|\r\r|\n\n)/g),
|
|
154
|
-
r.forEach(
|
|
155
|
-
|
|
156
|
-
|
|
162
|
+
const r = (this.chunk + n).split(/(\r\n\r\n|\r\r|\n\n)/g), i = r.pop();
|
|
163
|
+
r.forEach(
|
|
164
|
+
(function(c) {
|
|
165
|
+
c.trim().length > 0 && this.dispatchEvent(this._parseEventChunk(c));
|
|
166
|
+
}).bind(this)
|
|
167
|
+
), this.chunk = i;
|
|
157
168
|
}, this._onStreamLoaded = function(t) {
|
|
158
169
|
this._onStreamProgress(t), this.dispatchEvent(this._parseEventChunk(this.chunk)), this.chunk = "", this._markClosed();
|
|
159
170
|
}, this._parseEventChunk = function(t) {
|
|
@@ -161,27 +172,31 @@ var tu = function(u, e) {
|
|
|
161
172
|
return null;
|
|
162
173
|
this.debug;
|
|
163
174
|
const n = { id: null, retry: null, data: null, event: null };
|
|
164
|
-
t.split(/\n|\r\n|\r/).forEach(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
if (t.split(/\n|\r\n|\r/).forEach(
|
|
176
|
+
(function(i) {
|
|
177
|
+
const c = i.indexOf(this.FIELD_SEPARATOR);
|
|
178
|
+
let o, a;
|
|
179
|
+
if (c > 0) {
|
|
180
|
+
const s = i[c + 1] === " " ? 2 : 1;
|
|
181
|
+
o = i.substring(0, c), a = i.substring(c + s);
|
|
182
|
+
} else if (c < 0)
|
|
183
|
+
o = i, a = "";
|
|
184
|
+
else
|
|
185
|
+
return;
|
|
186
|
+
o in n && (o === "data" && n[o] !== null ? n.data += `
|
|
187
|
+
` + a : n[o] = a);
|
|
188
|
+
}).bind(this)
|
|
189
|
+
), n.data === null)
|
|
190
|
+
return null;
|
|
191
|
+
n.id !== null && (this.lastEventId = n.id);
|
|
177
192
|
const r = new CustomEvent(n.event || "message");
|
|
178
193
|
return r.id = n.id, r.data = n.data || "", r.lastEventId = this.lastEventId, r;
|
|
179
194
|
}, this._onReadyStateChange = function() {
|
|
180
195
|
if (this.xhr && this.xhr.readyState === XMLHttpRequest.HEADERS_RECEIVED) {
|
|
181
196
|
const t = {}, n = this.xhr.getAllResponseHeaders().trim().split(`\r
|
|
182
197
|
`);
|
|
183
|
-
for (const
|
|
184
|
-
const [c, ...
|
|
198
|
+
for (const i of n) {
|
|
199
|
+
const [c, ...o] = i.split(":"), a = o.join(":").trim();
|
|
185
200
|
t[c.trim().toLowerCase()] = t[c.trim().toLowerCase()] || [], t[c.trim().toLowerCase()].push(a);
|
|
186
201
|
}
|
|
187
202
|
const r = new CustomEvent("open");
|
|
@@ -189,13 +204,16 @@ var tu = function(u, e) {
|
|
|
189
204
|
}
|
|
190
205
|
}, this.stream = function() {
|
|
191
206
|
if (!this.xhr) {
|
|
192
|
-
this._setReadyState(tu.CONNECTING), this.xhr = new XMLHttpRequest(), this.xhr.addEventListener("progress", this._onStreamProgress.bind(this)), this.xhr.addEventListener("load", this._onStreamLoaded.bind(this)), this.xhr.addEventListener(
|
|
207
|
+
this._setReadyState(tu.CONNECTING), this.xhr = new XMLHttpRequest(), this.xhr.addEventListener("progress", this._onStreamProgress.bind(this)), this.xhr.addEventListener("load", this._onStreamLoaded.bind(this)), this.xhr.addEventListener(
|
|
208
|
+
"readystatechange",
|
|
209
|
+
this._onReadyStateChange.bind(this)
|
|
210
|
+
), this.xhr.addEventListener("error", this._onStreamFailure.bind(this)), this.xhr.addEventListener("abort", this._onStreamAbort.bind(this)), this.xhr.open(this.method, this.url);
|
|
193
211
|
for (let t in this.headers)
|
|
194
212
|
this.xhr.setRequestHeader(t, this.headers[t]);
|
|
195
|
-
this.lastEventId.length > 0 && this.xhr.setRequestHeader("Last-Event-ID", this.lastEventId), this.xhr.withCredentials = this.withCredentials, this.xhr.send(this.payload);
|
|
213
|
+
this.useLastEventId && this.lastEventId.length > 0 && this.xhr.setRequestHeader("Last-Event-ID", this.lastEventId), this.xhr.withCredentials = this.withCredentials, this.xhr.send(this.payload);
|
|
196
214
|
}
|
|
197
215
|
}, this.close = function() {
|
|
198
|
-
this.readyState !== tu.CLOSED && this.xhr.abort();
|
|
216
|
+
this.readyState !== tu.CLOSED && (this.reconnectTimer && (clearTimeout(this.reconnectTimer), this.reconnectTimer = null), this.autoReconnect = !1, this.xhr.abort());
|
|
199
217
|
}, (e.start === void 0 || e.start) && this.stream();
|
|
200
218
|
};
|
|
201
219
|
tu.INITIALIZING = -1;
|
|
@@ -205,7 +223,7 @@ tu.CLOSED = 2;
|
|
|
205
223
|
typeof exports < "u" && (exports.SSE = tu);
|
|
206
224
|
const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
207
225
|
name: "useChat"
|
|
208
|
-
}, S0 = /* @__PURE__ */
|
|
226
|
+
}, S0 = /* @__PURE__ */ iu({
|
|
209
227
|
...w0,
|
|
210
228
|
props: {
|
|
211
229
|
item: { default: {} }
|
|
@@ -213,8 +231,8 @@ const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
|
213
231
|
emits: ["click"],
|
|
214
232
|
setup(u, { emit: e }) {
|
|
215
233
|
const t = M();
|
|
216
|
-
return
|
|
217
|
-
}), (n, r) => (w(),
|
|
234
|
+
return Ru(() => {
|
|
235
|
+
}), (n, r) => (w(), q(
|
|
218
236
|
"div",
|
|
219
237
|
{
|
|
220
238
|
ref_key: "userChatRef",
|
|
@@ -225,7 +243,7 @@ const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
|
225
243
|
g(
|
|
226
244
|
"div",
|
|
227
245
|
F0,
|
|
228
|
-
V(
|
|
246
|
+
V(u.item.content),
|
|
229
247
|
1
|
|
230
248
|
/* TEXT */
|
|
231
249
|
)
|
|
@@ -234,12 +252,12 @@ const F0 = { class: "das-ai-use-chat-content" }, w0 = {
|
|
|
234
252
|
/* NEED_PATCH */
|
|
235
253
|
));
|
|
236
254
|
}
|
|
237
|
-
}),
|
|
255
|
+
}), ou = (u, e) => {
|
|
238
256
|
const t = u.__vccOpts || u;
|
|
239
257
|
for (const [n, r] of e)
|
|
240
258
|
t[n] = r;
|
|
241
259
|
return t;
|
|
242
|
-
}, z0 = /* @__PURE__ */
|
|
260
|
+
}, z0 = /* @__PURE__ */ ou(S0, [["__scopeId", "data-v-9ae9d9b5"]]);
|
|
243
261
|
var I0 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
244
262
|
function T0(u) {
|
|
245
263
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
@@ -262,8 +280,8 @@ var kt = { exports: {} };
|
|
|
262
280
|
/***/
|
|
263
281
|
686: (
|
|
264
282
|
/***/
|
|
265
|
-
function(
|
|
266
|
-
|
|
283
|
+
function(i, c, o) {
|
|
284
|
+
o.d(c, {
|
|
267
285
|
default: function() {
|
|
268
286
|
return (
|
|
269
287
|
/* binding */
|
|
@@ -271,7 +289,7 @@ var kt = { exports: {} };
|
|
|
271
289
|
);
|
|
272
290
|
}
|
|
273
291
|
});
|
|
274
|
-
var a =
|
|
292
|
+
var a = o(279), s = /* @__PURE__ */ o.n(a), l = o(370), f = /* @__PURE__ */ o.n(l), x = o(817), h = /* @__PURE__ */ o.n(x);
|
|
275
293
|
function d(B) {
|
|
276
294
|
try {
|
|
277
295
|
return document.execCommand(B);
|
|
@@ -280,40 +298,40 @@ var kt = { exports: {} };
|
|
|
280
298
|
}
|
|
281
299
|
}
|
|
282
300
|
var y = function(S) {
|
|
283
|
-
var
|
|
284
|
-
return d("cut"),
|
|
301
|
+
var E = h()(S);
|
|
302
|
+
return d("cut"), E;
|
|
285
303
|
}, v = y;
|
|
286
304
|
function C(B) {
|
|
287
|
-
var S = document.documentElement.getAttribute("dir") === "rtl",
|
|
288
|
-
|
|
305
|
+
var S = document.documentElement.getAttribute("dir") === "rtl", E = document.createElement("textarea");
|
|
306
|
+
E.style.fontSize = "12pt", E.style.border = "0", E.style.padding = "0", E.style.margin = "0", E.style.position = "absolute", E.style[S ? "right" : "left"] = "-9999px";
|
|
289
307
|
var N = window.pageYOffset || document.documentElement.scrollTop;
|
|
290
|
-
return
|
|
308
|
+
return E.style.top = "".concat(N, "px"), E.setAttribute("readonly", ""), E.value = B, E;
|
|
291
309
|
}
|
|
292
|
-
var k = function(S,
|
|
310
|
+
var k = function(S, E) {
|
|
293
311
|
var N = C(S);
|
|
294
|
-
|
|
312
|
+
E.container.appendChild(N);
|
|
295
313
|
var L = h()(N);
|
|
296
314
|
return d("copy"), N.remove(), L;
|
|
297
|
-
},
|
|
298
|
-
var
|
|
315
|
+
}, _ = function(S) {
|
|
316
|
+
var E = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
299
317
|
container: document.body
|
|
300
318
|
}, N = "";
|
|
301
|
-
return typeof S == "string" ? N = k(S,
|
|
302
|
-
},
|
|
303
|
-
function
|
|
319
|
+
return typeof S == "string" ? N = k(S, E) : S instanceof HTMLInputElement && !["text", "search", "url", "tel", "password"].includes(S == null ? void 0 : S.type) ? N = k(S.value, E) : (N = h()(S), d("copy")), N;
|
|
320
|
+
}, p = _;
|
|
321
|
+
function b(B) {
|
|
304
322
|
"@babel/helpers - typeof";
|
|
305
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
306
|
-
return typeof
|
|
307
|
-
} :
|
|
308
|
-
return
|
|
309
|
-
},
|
|
323
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? b = function(E) {
|
|
324
|
+
return typeof E;
|
|
325
|
+
} : b = function(E) {
|
|
326
|
+
return E && typeof Symbol == "function" && E.constructor === Symbol && E !== Symbol.prototype ? "symbol" : typeof E;
|
|
327
|
+
}, b(B);
|
|
310
328
|
}
|
|
311
329
|
var O = function() {
|
|
312
|
-
var S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
330
|
+
var S = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, E = S.action, N = E === void 0 ? "copy" : E, L = S.container, $ = S.target, eu = S.text;
|
|
313
331
|
if (N !== "copy" && N !== "cut")
|
|
314
332
|
throw new Error('Invalid "action" value, use either "copy" or "cut"');
|
|
315
333
|
if ($ !== void 0)
|
|
316
|
-
if ($ &&
|
|
334
|
+
if ($ && b($) === "object" && $.nodeType === 1) {
|
|
317
335
|
if (N === "copy" && $.hasAttribute("disabled"))
|
|
318
336
|
throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');
|
|
319
337
|
if (N === "cut" && ($.hasAttribute("readonly") || $.hasAttribute("disabled")))
|
|
@@ -321,20 +339,20 @@ var kt = { exports: {} };
|
|
|
321
339
|
} else
|
|
322
340
|
throw new Error('Invalid "target" value, use a valid Element');
|
|
323
341
|
if (eu)
|
|
324
|
-
return
|
|
342
|
+
return p(eu, {
|
|
325
343
|
container: L
|
|
326
344
|
});
|
|
327
345
|
if ($)
|
|
328
|
-
return N === "cut" ? v($) :
|
|
346
|
+
return N === "cut" ? v($) : p($, {
|
|
329
347
|
container: L
|
|
330
348
|
});
|
|
331
|
-
},
|
|
349
|
+
}, F = O;
|
|
332
350
|
function P(B) {
|
|
333
351
|
"@babel/helpers - typeof";
|
|
334
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? P = function(
|
|
335
|
-
return typeof
|
|
336
|
-
} : P = function(
|
|
337
|
-
return
|
|
352
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? P = function(E) {
|
|
353
|
+
return typeof E;
|
|
354
|
+
} : P = function(E) {
|
|
355
|
+
return E && typeof Symbol == "function" && E.constructor === Symbol && E !== Symbol.prototype ? "symbol" : typeof E;
|
|
338
356
|
}, P(B);
|
|
339
357
|
}
|
|
340
358
|
function j(B, S) {
|
|
@@ -342,13 +360,13 @@ var kt = { exports: {} };
|
|
|
342
360
|
throw new TypeError("Cannot call a class as a function");
|
|
343
361
|
}
|
|
344
362
|
function K(B, S) {
|
|
345
|
-
for (var
|
|
346
|
-
var N = S[
|
|
363
|
+
for (var E = 0; E < S.length; E++) {
|
|
364
|
+
var N = S[E];
|
|
347
365
|
N.enumerable = N.enumerable || !1, N.configurable = !0, "value" in N && (N.writable = !0), Object.defineProperty(B, N.key, N);
|
|
348
366
|
}
|
|
349
367
|
}
|
|
350
|
-
function du(B, S,
|
|
351
|
-
return K(B.prototype, S), K(B,
|
|
368
|
+
function du(B, S, E) {
|
|
369
|
+
return K(B.prototype, S), K(B, E), B;
|
|
352
370
|
}
|
|
353
371
|
function _u(B, S) {
|
|
354
372
|
if (typeof S != "function" && S !== null)
|
|
@@ -391,23 +409,23 @@ var kt = { exports: {} };
|
|
|
391
409
|
}
|
|
392
410
|
}
|
|
393
411
|
function zu(B) {
|
|
394
|
-
return zu = Object.setPrototypeOf ? Object.getPrototypeOf : function(
|
|
395
|
-
return
|
|
412
|
+
return zu = Object.setPrototypeOf ? Object.getPrototypeOf : function(E) {
|
|
413
|
+
return E.__proto__ || Object.getPrototypeOf(E);
|
|
396
414
|
}, zu(B);
|
|
397
415
|
}
|
|
398
416
|
function ju(B, S) {
|
|
399
|
-
var
|
|
400
|
-
if (S.hasAttribute(
|
|
401
|
-
return S.getAttribute(
|
|
417
|
+
var E = "data-clipboard-".concat(B);
|
|
418
|
+
if (S.hasAttribute(E))
|
|
419
|
+
return S.getAttribute(E);
|
|
402
420
|
}
|
|
403
421
|
var Iu = /* @__PURE__ */ function(B) {
|
|
404
|
-
_u(
|
|
405
|
-
var S = wu(
|
|
406
|
-
function
|
|
422
|
+
_u(E, B);
|
|
423
|
+
var S = wu(E);
|
|
424
|
+
function E(N, L) {
|
|
407
425
|
var $;
|
|
408
|
-
return j(this,
|
|
426
|
+
return j(this, E), $ = S.call(this), $.resolveOptions(L), $.listenClick(N), $;
|
|
409
427
|
}
|
|
410
|
-
return du(
|
|
428
|
+
return du(E, [{
|
|
411
429
|
key: "resolveOptions",
|
|
412
430
|
value: function() {
|
|
413
431
|
var L = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -432,7 +450,7 @@ var kt = { exports: {} };
|
|
|
432
450
|
}, {
|
|
433
451
|
key: "onClick",
|
|
434
452
|
value: function(L) {
|
|
435
|
-
var $ = L.delegateTarget || L.currentTarget, eu = this.action($) || "copy", Eu =
|
|
453
|
+
var $ = L.delegateTarget || L.currentTarget, eu = this.action($) || "copy", Eu = F({
|
|
436
454
|
action: eu,
|
|
437
455
|
container: this.container,
|
|
438
456
|
target: this.target($),
|
|
@@ -496,7 +514,7 @@ var kt = { exports: {} };
|
|
|
496
514
|
var $ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
497
515
|
container: document.body
|
|
498
516
|
};
|
|
499
|
-
return
|
|
517
|
+
return p(L, $);
|
|
500
518
|
}
|
|
501
519
|
/**
|
|
502
520
|
* Allow fire programmatically a cut action
|
|
@@ -521,18 +539,18 @@ var kt = { exports: {} };
|
|
|
521
539
|
eu = eu && !!document.queryCommandSupported(Eu);
|
|
522
540
|
}), eu;
|
|
523
541
|
}
|
|
524
|
-
}]),
|
|
542
|
+
}]), E;
|
|
525
543
|
}(s()), fe = Iu;
|
|
526
544
|
}
|
|
527
545
|
),
|
|
528
546
|
/***/
|
|
529
547
|
828: (
|
|
530
548
|
/***/
|
|
531
|
-
function(
|
|
549
|
+
function(i) {
|
|
532
550
|
var c = 9;
|
|
533
551
|
if (typeof Element < "u" && !Element.prototype.matches) {
|
|
534
|
-
var
|
|
535
|
-
|
|
552
|
+
var o = Element.prototype;
|
|
553
|
+
o.matches = o.matchesSelector || o.mozMatchesSelector || o.msMatchesSelector || o.oMatchesSelector || o.webkitMatchesSelector;
|
|
536
554
|
}
|
|
537
555
|
function a(s, l) {
|
|
538
556
|
for (; s && s.nodeType !== c; ) {
|
|
@@ -541,48 +559,48 @@ var kt = { exports: {} };
|
|
|
541
559
|
s = s.parentNode;
|
|
542
560
|
}
|
|
543
561
|
}
|
|
544
|
-
|
|
562
|
+
i.exports = a;
|
|
545
563
|
}
|
|
546
564
|
),
|
|
547
565
|
/***/
|
|
548
566
|
438: (
|
|
549
567
|
/***/
|
|
550
|
-
function(
|
|
551
|
-
var a =
|
|
552
|
-
function s(
|
|
568
|
+
function(i, c, o) {
|
|
569
|
+
var a = o(828);
|
|
570
|
+
function s(x, h, d, y, v) {
|
|
553
571
|
var C = f.apply(this, arguments);
|
|
554
|
-
return
|
|
572
|
+
return x.addEventListener(d, C, v), {
|
|
555
573
|
destroy: function() {
|
|
556
|
-
|
|
574
|
+
x.removeEventListener(d, C, v);
|
|
557
575
|
}
|
|
558
576
|
};
|
|
559
577
|
}
|
|
560
|
-
function l(
|
|
561
|
-
return typeof
|
|
578
|
+
function l(x, h, d, y, v) {
|
|
579
|
+
return typeof x.addEventListener == "function" ? s.apply(null, arguments) : typeof d == "function" ? s.bind(null, document).apply(null, arguments) : (typeof x == "string" && (x = document.querySelectorAll(x)), Array.prototype.map.call(x, function(C) {
|
|
562
580
|
return s(C, h, d, y, v);
|
|
563
581
|
}));
|
|
564
582
|
}
|
|
565
|
-
function f(
|
|
583
|
+
function f(x, h, d, y) {
|
|
566
584
|
return function(v) {
|
|
567
|
-
v.delegateTarget = a(v.target, h), v.delegateTarget && y.call(
|
|
585
|
+
v.delegateTarget = a(v.target, h), v.delegateTarget && y.call(x, v);
|
|
568
586
|
};
|
|
569
587
|
}
|
|
570
|
-
|
|
588
|
+
i.exports = l;
|
|
571
589
|
}
|
|
572
590
|
),
|
|
573
591
|
/***/
|
|
574
592
|
879: (
|
|
575
593
|
/***/
|
|
576
|
-
function(
|
|
577
|
-
c.node = function(
|
|
578
|
-
return
|
|
579
|
-
}, c.nodeList = function(
|
|
580
|
-
var a = Object.prototype.toString.call(
|
|
581
|
-
return
|
|
582
|
-
}, c.string = function(
|
|
583
|
-
return typeof
|
|
584
|
-
}, c.fn = function(
|
|
585
|
-
var a = Object.prototype.toString.call(
|
|
594
|
+
function(i, c) {
|
|
595
|
+
c.node = function(o) {
|
|
596
|
+
return o !== void 0 && o instanceof HTMLElement && o.nodeType === 1;
|
|
597
|
+
}, c.nodeList = function(o) {
|
|
598
|
+
var a = Object.prototype.toString.call(o);
|
|
599
|
+
return o !== void 0 && (a === "[object NodeList]" || a === "[object HTMLCollection]") && "length" in o && (o.length === 0 || c.node(o[0]));
|
|
600
|
+
}, c.string = function(o) {
|
|
601
|
+
return typeof o == "string" || o instanceof String;
|
|
602
|
+
}, c.fn = function(o) {
|
|
603
|
+
var a = Object.prototype.toString.call(o);
|
|
586
604
|
return a === "[object Function]";
|
|
587
605
|
};
|
|
588
606
|
}
|
|
@@ -590,8 +608,8 @@ var kt = { exports: {} };
|
|
|
590
608
|
/***/
|
|
591
609
|
370: (
|
|
592
610
|
/***/
|
|
593
|
-
function(
|
|
594
|
-
var a =
|
|
611
|
+
function(i, c, o) {
|
|
612
|
+
var a = o(879), s = o(438);
|
|
595
613
|
function l(d, y, v) {
|
|
596
614
|
if (!d && !y && !v)
|
|
597
615
|
throw new Error("Missing required arguments");
|
|
@@ -602,7 +620,7 @@ var kt = { exports: {} };
|
|
|
602
620
|
if (a.node(d))
|
|
603
621
|
return f(d, y, v);
|
|
604
622
|
if (a.nodeList(d))
|
|
605
|
-
return
|
|
623
|
+
return x(d, y, v);
|
|
606
624
|
if (a.string(d))
|
|
607
625
|
return h(d, y, v);
|
|
608
626
|
throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");
|
|
@@ -614,7 +632,7 @@ var kt = { exports: {} };
|
|
|
614
632
|
}
|
|
615
633
|
};
|
|
616
634
|
}
|
|
617
|
-
function
|
|
635
|
+
function x(d, y, v) {
|
|
618
636
|
return Array.prototype.forEach.call(d, function(C) {
|
|
619
637
|
C.addEventListener(y, v);
|
|
620
638
|
}), {
|
|
@@ -628,73 +646,73 @@ var kt = { exports: {} };
|
|
|
628
646
|
function h(d, y, v) {
|
|
629
647
|
return s(document.body, d, y, v);
|
|
630
648
|
}
|
|
631
|
-
|
|
649
|
+
i.exports = l;
|
|
632
650
|
}
|
|
633
651
|
),
|
|
634
652
|
/***/
|
|
635
653
|
817: (
|
|
636
654
|
/***/
|
|
637
|
-
function(
|
|
638
|
-
function c(
|
|
655
|
+
function(i) {
|
|
656
|
+
function c(o) {
|
|
639
657
|
var a;
|
|
640
|
-
if (
|
|
641
|
-
|
|
642
|
-
else if (
|
|
643
|
-
var s =
|
|
644
|
-
s ||
|
|
658
|
+
if (o.nodeName === "SELECT")
|
|
659
|
+
o.focus(), a = o.value;
|
|
660
|
+
else if (o.nodeName === "INPUT" || o.nodeName === "TEXTAREA") {
|
|
661
|
+
var s = o.hasAttribute("readonly");
|
|
662
|
+
s || o.setAttribute("readonly", ""), o.select(), o.setSelectionRange(0, o.value.length), s || o.removeAttribute("readonly"), a = o.value;
|
|
645
663
|
} else {
|
|
646
|
-
|
|
664
|
+
o.hasAttribute("contenteditable") && o.focus();
|
|
647
665
|
var l = window.getSelection(), f = document.createRange();
|
|
648
|
-
f.selectNodeContents(
|
|
666
|
+
f.selectNodeContents(o), l.removeAllRanges(), l.addRange(f), a = l.toString();
|
|
649
667
|
}
|
|
650
668
|
return a;
|
|
651
669
|
}
|
|
652
|
-
|
|
670
|
+
i.exports = c;
|
|
653
671
|
}
|
|
654
672
|
),
|
|
655
673
|
/***/
|
|
656
674
|
279: (
|
|
657
675
|
/***/
|
|
658
|
-
function(
|
|
676
|
+
function(i) {
|
|
659
677
|
function c() {
|
|
660
678
|
}
|
|
661
679
|
c.prototype = {
|
|
662
|
-
on: function(
|
|
680
|
+
on: function(o, a, s) {
|
|
663
681
|
var l = this.e || (this.e = {});
|
|
664
|
-
return (l[
|
|
682
|
+
return (l[o] || (l[o] = [])).push({
|
|
665
683
|
fn: a,
|
|
666
684
|
ctx: s
|
|
667
685
|
}), this;
|
|
668
686
|
},
|
|
669
|
-
once: function(
|
|
687
|
+
once: function(o, a, s) {
|
|
670
688
|
var l = this;
|
|
671
689
|
function f() {
|
|
672
|
-
l.off(
|
|
690
|
+
l.off(o, f), a.apply(s, arguments);
|
|
673
691
|
}
|
|
674
|
-
return f._ = a, this.on(
|
|
692
|
+
return f._ = a, this.on(o, f, s);
|
|
675
693
|
},
|
|
676
|
-
emit: function(
|
|
677
|
-
var a = [].slice.call(arguments, 1), s = ((this.e || (this.e = {}))[
|
|
694
|
+
emit: function(o) {
|
|
695
|
+
var a = [].slice.call(arguments, 1), s = ((this.e || (this.e = {}))[o] || []).slice(), l = 0, f = s.length;
|
|
678
696
|
for (l; l < f; l++)
|
|
679
697
|
s[l].fn.apply(s[l].ctx, a);
|
|
680
698
|
return this;
|
|
681
699
|
},
|
|
682
|
-
off: function(
|
|
683
|
-
var s = this.e || (this.e = {}), l = s[
|
|
700
|
+
off: function(o, a) {
|
|
701
|
+
var s = this.e || (this.e = {}), l = s[o], f = [];
|
|
684
702
|
if (l && a)
|
|
685
|
-
for (var
|
|
686
|
-
l[
|
|
687
|
-
return f.length ? s[
|
|
703
|
+
for (var x = 0, h = l.length; x < h; x++)
|
|
704
|
+
l[x].fn !== a && l[x].fn._ !== a && f.push(l[x]);
|
|
705
|
+
return f.length ? s[o] = f : delete s[o], this;
|
|
688
706
|
}
|
|
689
|
-
},
|
|
707
|
+
}, i.exports = c, i.exports.TinyEmitter = c;
|
|
690
708
|
}
|
|
691
709
|
)
|
|
692
710
|
/******/
|
|
693
711
|
}, n = {};
|
|
694
|
-
function r(
|
|
695
|
-
if (n[
|
|
696
|
-
return n[
|
|
697
|
-
var c = n[
|
|
712
|
+
function r(i) {
|
|
713
|
+
if (n[i])
|
|
714
|
+
return n[i].exports;
|
|
715
|
+
var c = n[i] = {
|
|
698
716
|
/******/
|
|
699
717
|
// no module.id needed
|
|
700
718
|
/******/
|
|
@@ -703,31 +721,31 @@ var kt = { exports: {} };
|
|
|
703
721
|
exports: {}
|
|
704
722
|
/******/
|
|
705
723
|
};
|
|
706
|
-
return t[
|
|
724
|
+
return t[i](c, c.exports, r), c.exports;
|
|
707
725
|
}
|
|
708
726
|
return function() {
|
|
709
|
-
r.n = function(
|
|
710
|
-
var c =
|
|
727
|
+
r.n = function(i) {
|
|
728
|
+
var c = i && i.__esModule ? (
|
|
711
729
|
/******/
|
|
712
730
|
function() {
|
|
713
|
-
return
|
|
731
|
+
return i.default;
|
|
714
732
|
}
|
|
715
733
|
) : (
|
|
716
734
|
/******/
|
|
717
735
|
function() {
|
|
718
|
-
return
|
|
736
|
+
return i;
|
|
719
737
|
}
|
|
720
738
|
);
|
|
721
739
|
return r.d(c, { a: c }), c;
|
|
722
740
|
};
|
|
723
741
|
}(), function() {
|
|
724
|
-
r.d = function(
|
|
725
|
-
for (var
|
|
726
|
-
r.o(c,
|
|
742
|
+
r.d = function(i, c) {
|
|
743
|
+
for (var o in c)
|
|
744
|
+
r.o(c, o) && !r.o(i, o) && Object.defineProperty(i, o, { enumerable: !0, get: c[o] });
|
|
727
745
|
};
|
|
728
746
|
}(), function() {
|
|
729
|
-
r.o = function(
|
|
730
|
-
return Object.prototype.hasOwnProperty.call(
|
|
747
|
+
r.o = function(i, c) {
|
|
748
|
+
return Object.prototype.hasOwnProperty.call(i, c);
|
|
731
749
|
};
|
|
732
750
|
}(), r(686);
|
|
733
751
|
}().default
|
|
@@ -738,16 +756,16 @@ var M0 = kt.exports;
|
|
|
738
756
|
const O0 = /* @__PURE__ */ T0(M0), N0 = (u) => ({
|
|
739
757
|
toClipboard(e, t) {
|
|
740
758
|
return new Promise((n, r) => {
|
|
741
|
-
const
|
|
759
|
+
const i = document.createElement("button"), c = new O0(i, {
|
|
742
760
|
text: () => e,
|
|
743
761
|
action: () => "copy",
|
|
744
762
|
container: t !== void 0 ? t : document.body
|
|
745
763
|
});
|
|
746
|
-
c.on("success", (
|
|
747
|
-
c.destroy(), n(
|
|
748
|
-
}), c.on("error", (
|
|
749
|
-
c.destroy(), r(
|
|
750
|
-
}), document.body.appendChild(
|
|
764
|
+
c.on("success", (o) => {
|
|
765
|
+
c.destroy(), n(o);
|
|
766
|
+
}), c.on("error", (o) => {
|
|
767
|
+
c.destroy(), r(o);
|
|
768
|
+
}), document.body.appendChild(i), i.click(), document.body.removeChild(i);
|
|
751
769
|
});
|
|
752
770
|
}
|
|
753
771
|
}), je = {};
|
|
@@ -771,33 +789,33 @@ function Lu(u, e) {
|
|
|
771
789
|
const t = L0(e);
|
|
772
790
|
return u.replace(/(%[a-f0-9]{2})+/gi, function(n) {
|
|
773
791
|
let r = "";
|
|
774
|
-
for (let
|
|
775
|
-
const
|
|
776
|
-
if (
|
|
777
|
-
r += t[
|
|
792
|
+
for (let i = 0, c = n.length; i < c; i += 3) {
|
|
793
|
+
const o = parseInt(n.slice(i + 1, i + 3), 16);
|
|
794
|
+
if (o < 128) {
|
|
795
|
+
r += t[o];
|
|
778
796
|
continue;
|
|
779
797
|
}
|
|
780
|
-
if ((
|
|
781
|
-
const a = parseInt(n.slice(
|
|
798
|
+
if ((o & 224) === 192 && i + 3 < c) {
|
|
799
|
+
const a = parseInt(n.slice(i + 4, i + 6), 16);
|
|
782
800
|
if ((a & 192) === 128) {
|
|
783
|
-
const s =
|
|
784
|
-
s < 128 ? r += "��" : r += String.fromCharCode(s),
|
|
801
|
+
const s = o << 6 & 1984 | a & 63;
|
|
802
|
+
s < 128 ? r += "��" : r += String.fromCharCode(s), i += 3;
|
|
785
803
|
continue;
|
|
786
804
|
}
|
|
787
805
|
}
|
|
788
|
-
if ((
|
|
789
|
-
const a = parseInt(n.slice(
|
|
806
|
+
if ((o & 240) === 224 && i + 6 < c) {
|
|
807
|
+
const a = parseInt(n.slice(i + 4, i + 6), 16), s = parseInt(n.slice(i + 7, i + 9), 16);
|
|
790
808
|
if ((a & 192) === 128 && (s & 192) === 128) {
|
|
791
|
-
const l =
|
|
792
|
-
l < 2048 || l >= 55296 && l <= 57343 ? r += "���" : r += String.fromCharCode(l),
|
|
809
|
+
const l = o << 12 & 61440 | a << 6 & 4032 | s & 63;
|
|
810
|
+
l < 2048 || l >= 55296 && l <= 57343 ? r += "���" : r += String.fromCharCode(l), i += 6;
|
|
793
811
|
continue;
|
|
794
812
|
}
|
|
795
813
|
}
|
|
796
|
-
if ((
|
|
797
|
-
const a = parseInt(n.slice(
|
|
814
|
+
if ((o & 248) === 240 && i + 9 < c) {
|
|
815
|
+
const a = parseInt(n.slice(i + 4, i + 6), 16), s = parseInt(n.slice(i + 7, i + 9), 16), l = parseInt(n.slice(i + 10, i + 12), 16);
|
|
798
816
|
if ((a & 192) === 128 && (s & 192) === 128 && (l & 192) === 128) {
|
|
799
|
-
let f =
|
|
800
|
-
f < 65536 || f > 1114111 ? r += "����" : (f -= 65536, r += String.fromCharCode(55296 + (f >> 10), 56320 + (f & 1023))),
|
|
817
|
+
let f = o << 18 & 1835008 | a << 12 & 258048 | s << 6 & 4032 | l & 63;
|
|
818
|
+
f < 65536 || f > 1114111 ? r += "����" : (f -= 65536, r += String.fromCharCode(55296 + (f >> 10), 56320 + (f & 1023))), i += 9;
|
|
801
819
|
continue;
|
|
802
820
|
}
|
|
803
821
|
}
|
|
@@ -826,28 +844,28 @@ function Wu(u, e, t) {
|
|
|
826
844
|
typeof e != "string" && (t = e, e = Wu.defaultChars), typeof t > "u" && (t = !0);
|
|
827
845
|
const n = B0(e);
|
|
828
846
|
let r = "";
|
|
829
|
-
for (let
|
|
830
|
-
const
|
|
831
|
-
if (t &&
|
|
832
|
-
r += u.slice(
|
|
847
|
+
for (let i = 0, c = u.length; i < c; i++) {
|
|
848
|
+
const o = u.charCodeAt(i);
|
|
849
|
+
if (t && o === 37 && i + 2 < c && /^[0-9a-f]{2}$/i.test(u.slice(i + 1, i + 3))) {
|
|
850
|
+
r += u.slice(i, i + 3), i += 2;
|
|
833
851
|
continue;
|
|
834
852
|
}
|
|
835
|
-
if (
|
|
836
|
-
r += n[
|
|
853
|
+
if (o < 128) {
|
|
854
|
+
r += n[o];
|
|
837
855
|
continue;
|
|
838
856
|
}
|
|
839
|
-
if (
|
|
840
|
-
if (
|
|
841
|
-
const a = u.charCodeAt(
|
|
857
|
+
if (o >= 55296 && o <= 57343) {
|
|
858
|
+
if (o >= 55296 && o <= 56319 && i + 1 < c) {
|
|
859
|
+
const a = u.charCodeAt(i + 1);
|
|
842
860
|
if (a >= 56320 && a <= 57343) {
|
|
843
|
-
r += encodeURIComponent(u[
|
|
861
|
+
r += encodeURIComponent(u[i] + u[i + 1]), i++;
|
|
844
862
|
continue;
|
|
845
863
|
}
|
|
846
864
|
}
|
|
847
865
|
r += "%EF%BF%BD";
|
|
848
866
|
continue;
|
|
849
867
|
}
|
|
850
|
-
r += encodeURIComponent(u[
|
|
868
|
+
r += encodeURIComponent(u[i]);
|
|
851
869
|
}
|
|
852
870
|
return r;
|
|
853
871
|
}
|
|
@@ -857,10 +875,10 @@ function ze(u) {
|
|
|
857
875
|
let e = "";
|
|
858
876
|
return e += u.protocol || "", e += u.slashes ? "//" : "", e += u.auth ? u.auth + "@" : "", u.hostname && u.hostname.indexOf(":") !== -1 ? e += "[" + u.hostname + "]" : e += u.hostname || "", e += u.port ? ":" + u.port : "", e += u.pathname || "", e += u.search || "", e += u.hash || "", e;
|
|
859
877
|
}
|
|
860
|
-
function
|
|
878
|
+
function ie() {
|
|
861
879
|
this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
|
|
862
880
|
}
|
|
863
|
-
const
|
|
881
|
+
const R0 = /^([a-z0-9.+-]+:)/i, q0 = /:[0-9]*$/, P0 = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, j0 = ["<", ">", '"', "`", " ", "\r", `
|
|
864
882
|
`, " "], H0 = ["{", "}", "|", "\\", "^", "`"].concat(j0), $0 = ["'"].concat(H0), $e = ["%", "/", "?", ";", "#"].concat($0), Ve = ["/", "?", "#"], V0 = 255, Ue = /^[+a-z0-9A-Z_-]{0,63}$/, U0 = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, Ze = {
|
|
865
883
|
javascript: !0,
|
|
866
884
|
"javascript:": !0
|
|
@@ -877,29 +895,29 @@ const q0 = /^([a-z0-9.+-]+:)/i, R0 = /:[0-9]*$/, P0 = /^(\/\/?(?!\/)[^\?\s]*)(\?
|
|
|
877
895
|
"file:": !0
|
|
878
896
|
};
|
|
879
897
|
function Ie(u, e) {
|
|
880
|
-
if (u && u instanceof
|
|
881
|
-
const t = new
|
|
898
|
+
if (u && u instanceof ie) return u;
|
|
899
|
+
const t = new ie();
|
|
882
900
|
return t.parse(u, e), t;
|
|
883
901
|
}
|
|
884
|
-
|
|
885
|
-
let t, n, r,
|
|
886
|
-
if (
|
|
887
|
-
const s = P0.exec(
|
|
902
|
+
ie.prototype.parse = function(u, e) {
|
|
903
|
+
let t, n, r, i = u;
|
|
904
|
+
if (i = i.trim(), !e && u.split("#").length === 1) {
|
|
905
|
+
const s = P0.exec(i);
|
|
888
906
|
if (s)
|
|
889
907
|
return this.pathname = s[1], s[2] && (this.search = s[2]), this;
|
|
890
908
|
}
|
|
891
|
-
let c =
|
|
892
|
-
if (c && (c = c[0], t = c.toLowerCase(), this.protocol = c,
|
|
909
|
+
let c = R0.exec(i);
|
|
910
|
+
if (c && (c = c[0], t = c.toLowerCase(), this.protocol = c, i = i.substr(c.length)), (e || c || i.match(/^\/\/[^@\/]+@[^@\/]+/)) && (r = i.substr(0, 2) === "//", r && !(c && Ze[c]) && (i = i.substr(2), this.slashes = !0)), !Ze[c] && (r || c && !Ge[c])) {
|
|
893
911
|
let s = -1;
|
|
894
912
|
for (let d = 0; d < Ve.length; d++)
|
|
895
|
-
n =
|
|
913
|
+
n = i.indexOf(Ve[d]), n !== -1 && (s === -1 || n < s) && (s = n);
|
|
896
914
|
let l, f;
|
|
897
|
-
s === -1 ? f =
|
|
915
|
+
s === -1 ? f = i.lastIndexOf("@") : f = i.lastIndexOf("@", s), f !== -1 && (l = i.slice(0, f), i = i.slice(f + 1), this.auth = l), s = -1;
|
|
898
916
|
for (let d = 0; d < $e.length; d++)
|
|
899
|
-
n =
|
|
900
|
-
s === -1 && (s =
|
|
901
|
-
const
|
|
902
|
-
|
|
917
|
+
n = i.indexOf($e[d]), n !== -1 && (s === -1 || n < s) && (s = n);
|
|
918
|
+
s === -1 && (s = i.length), i[s - 1] === ":" && s--;
|
|
919
|
+
const x = i.slice(0, s);
|
|
920
|
+
i = i.slice(s), this.parseHost(x), this.hostname = this.hostname || "";
|
|
903
921
|
const h = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
904
922
|
if (!h) {
|
|
905
923
|
const d = this.hostname.split(/\./);
|
|
@@ -907,11 +925,11 @@ oe.prototype.parse = function(u, e) {
|
|
|
907
925
|
const C = d[y];
|
|
908
926
|
if (C && !C.match(Ue)) {
|
|
909
927
|
let k = "";
|
|
910
|
-
for (let
|
|
911
|
-
C.charCodeAt(
|
|
928
|
+
for (let _ = 0, p = C.length; _ < p; _++)
|
|
929
|
+
C.charCodeAt(_) > 127 ? k += "x" : k += C[_];
|
|
912
930
|
if (!k.match(Ue)) {
|
|
913
|
-
const
|
|
914
|
-
|
|
931
|
+
const _ = d.slice(0, y), p = d.slice(y + 1), b = C.match(U0);
|
|
932
|
+
b && (_.push(b[1]), p.unshift(b[2])), p.length && (i = p.join(".") + i), this.hostname = _.join(".");
|
|
915
933
|
break;
|
|
916
934
|
}
|
|
917
935
|
}
|
|
@@ -919,13 +937,13 @@ oe.prototype.parse = function(u, e) {
|
|
|
919
937
|
}
|
|
920
938
|
this.hostname.length > V0 && (this.hostname = ""), h && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
921
939
|
}
|
|
922
|
-
const
|
|
923
|
-
|
|
924
|
-
const a =
|
|
925
|
-
return a !== -1 && (this.search =
|
|
940
|
+
const o = i.indexOf("#");
|
|
941
|
+
o !== -1 && (this.hash = i.substr(o), i = i.slice(0, o));
|
|
942
|
+
const a = i.indexOf("?");
|
|
943
|
+
return a !== -1 && (this.search = i.substr(a), i = i.slice(0, a)), i && (this.pathname = i), Ge[t] && this.hostname && !this.pathname && (this.pathname = ""), this;
|
|
926
944
|
};
|
|
927
|
-
|
|
928
|
-
let e =
|
|
945
|
+
ie.prototype.parseHost = function(u) {
|
|
946
|
+
let e = q0.exec(u);
|
|
929
947
|
e && (e = e[0], e !== ":" && (this.port = e.substr(1)), u = u.substr(0, u.length - e.length)), u && (this.hostname = u);
|
|
930
948
|
};
|
|
931
949
|
const Z0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -1067,8 +1085,8 @@ class rn {
|
|
|
1067
1085
|
}
|
|
1068
1086
|
addToNumericResult(e, t, n, r) {
|
|
1069
1087
|
if (t !== n) {
|
|
1070
|
-
const
|
|
1071
|
-
this.result = this.result * Math.pow(r,
|
|
1088
|
+
const i = n - t;
|
|
1089
|
+
this.result = this.result * Math.pow(r, i) + parseInt(e.substr(t, i), r), this.consumed += i;
|
|
1072
1090
|
}
|
|
1073
1091
|
}
|
|
1074
1092
|
/**
|
|
@@ -1145,17 +1163,17 @@ class rn {
|
|
|
1145
1163
|
*/
|
|
1146
1164
|
stateNamedEntity(e, t) {
|
|
1147
1165
|
const { decodeTree: n } = this;
|
|
1148
|
-
let r = n[this.treeIndex],
|
|
1166
|
+
let r = n[this.treeIndex], i = (r & Au.VALUE_LENGTH) >> 14;
|
|
1149
1167
|
for (; t < e.length; t++, this.excess++) {
|
|
1150
1168
|
const c = e.charCodeAt(t);
|
|
1151
|
-
if (this.treeIndex = on(n, r, this.treeIndex + Math.max(1,
|
|
1169
|
+
if (this.treeIndex = on(n, r, this.treeIndex + Math.max(1, i), c), this.treeIndex < 0)
|
|
1152
1170
|
return this.result === 0 || // If we are parsing an attribute
|
|
1153
1171
|
this.decodeMode === vu.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
1154
|
-
(
|
|
1172
|
+
(i === 0 || // And there should be no invalid characters.
|
|
1155
1173
|
nn(c)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1156
|
-
if (r = n[this.treeIndex],
|
|
1174
|
+
if (r = n[this.treeIndex], i = (r & Au.VALUE_LENGTH) >> 14, i !== 0) {
|
|
1157
1175
|
if (c === W.SEMI)
|
|
1158
|
-
return this.emitNamedEntityData(this.treeIndex,
|
|
1176
|
+
return this.emitNamedEntityData(this.treeIndex, i, this.consumed + this.excess);
|
|
1159
1177
|
this.decodeMode !== vu.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
1160
1178
|
}
|
|
1161
1179
|
}
|
|
@@ -1210,40 +1228,40 @@ class rn {
|
|
|
1210
1228
|
function Dt(u) {
|
|
1211
1229
|
let e = "";
|
|
1212
1230
|
const t = new rn(u, (n) => e += X0(n));
|
|
1213
|
-
return function(r,
|
|
1214
|
-
let c = 0,
|
|
1215
|
-
for (; (
|
|
1216
|
-
e += r.slice(c,
|
|
1231
|
+
return function(r, i) {
|
|
1232
|
+
let c = 0, o = 0;
|
|
1233
|
+
for (; (o = r.indexOf("&", o)) >= 0; ) {
|
|
1234
|
+
e += r.slice(c, o), t.startEntity(i);
|
|
1217
1235
|
const s = t.write(
|
|
1218
1236
|
r,
|
|
1219
1237
|
// Skip the "&"
|
|
1220
|
-
|
|
1238
|
+
o + 1
|
|
1221
1239
|
);
|
|
1222
1240
|
if (s < 0) {
|
|
1223
|
-
c =
|
|
1241
|
+
c = o + t.end();
|
|
1224
1242
|
break;
|
|
1225
1243
|
}
|
|
1226
|
-
c =
|
|
1244
|
+
c = o + s, o = s === 0 ? c + 1 : c;
|
|
1227
1245
|
}
|
|
1228
1246
|
const a = e + r.slice(c);
|
|
1229
1247
|
return e = "", a;
|
|
1230
1248
|
};
|
|
1231
1249
|
}
|
|
1232
1250
|
function on(u, e, t, n) {
|
|
1233
|
-
const r = (e & Au.BRANCH_LENGTH) >> 7,
|
|
1251
|
+
const r = (e & Au.BRANCH_LENGTH) >> 7, i = e & Au.JUMP_TABLE;
|
|
1234
1252
|
if (r === 0)
|
|
1235
|
-
return
|
|
1236
|
-
if (
|
|
1237
|
-
const a = n -
|
|
1253
|
+
return i !== 0 && n === i ? t : -1;
|
|
1254
|
+
if (i) {
|
|
1255
|
+
const a = n - i;
|
|
1238
1256
|
return a < 0 || a >= r ? -1 : u[t + a] - 1;
|
|
1239
1257
|
}
|
|
1240
|
-
let c = t,
|
|
1241
|
-
for (; c <=
|
|
1242
|
-
const a = c +
|
|
1258
|
+
let c = t, o = c + r - 1;
|
|
1259
|
+
for (; c <= o; ) {
|
|
1260
|
+
const a = c + o >>> 1, s = u[a];
|
|
1243
1261
|
if (s < n)
|
|
1244
1262
|
c = a + 1;
|
|
1245
1263
|
else if (s > n)
|
|
1246
|
-
|
|
1264
|
+
o = a - 1;
|
|
1247
1265
|
else
|
|
1248
1266
|
return u[a + r];
|
|
1249
1267
|
}
|
|
@@ -1281,7 +1299,7 @@ function Ft(u, e, t) {
|
|
|
1281
1299
|
function Oe(u) {
|
|
1282
1300
|
return !(u >= 55296 && u <= 57343 || u >= 64976 && u <= 65007 || (u & 65535) === 65535 || (u & 65535) === 65534 || u >= 0 && u <= 8 || u === 11 || u >= 14 && u <= 31 || u >= 127 && u <= 159 || u > 1114111);
|
|
1283
1301
|
}
|
|
1284
|
-
function
|
|
1302
|
+
function oe(u) {
|
|
1285
1303
|
if (u > 65535) {
|
|
1286
1304
|
u -= 65536;
|
|
1287
1305
|
const e = 55296 + (u >> 10), t = 56320 + (u & 1023);
|
|
@@ -1293,7 +1311,7 @@ const wt = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, dn = /&([a-z#][a-z0-9]{
|
|
|
1293
1311
|
function pn(u, e) {
|
|
1294
1312
|
if (e.charCodeAt(0) === 35 && hn.test(e)) {
|
|
1295
1313
|
const n = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
1296
|
-
return Oe(n) ?
|
|
1314
|
+
return Oe(n) ? oe(n) : u;
|
|
1297
1315
|
}
|
|
1298
1316
|
const t = Et(u);
|
|
1299
1317
|
return t !== u ? t : u;
|
|
@@ -1400,7 +1418,7 @@ const yn = { mdurl: Z0, ucmicro: K0 }, An = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1400
1418
|
assign: ae,
|
|
1401
1419
|
escapeHtml: Du,
|
|
1402
1420
|
escapeRE: vn,
|
|
1403
|
-
fromCodePoint:
|
|
1421
|
+
fromCodePoint: oe,
|
|
1404
1422
|
has: ln,
|
|
1405
1423
|
isMdAsciiPunct: Gu,
|
|
1406
1424
|
isPunctChar: Zu,
|
|
@@ -1414,14 +1432,14 @@ const yn = { mdurl: Z0, ucmicro: K0 }, An = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1414
1432
|
unescapeMd: bn
|
|
1415
1433
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1416
1434
|
function Cn(u, e, t) {
|
|
1417
|
-
let n, r,
|
|
1418
|
-
const
|
|
1419
|
-
for (u.pos = e + 1, n = 1; u.pos <
|
|
1420
|
-
if (
|
|
1435
|
+
let n, r, i, c;
|
|
1436
|
+
const o = u.posMax, a = u.pos;
|
|
1437
|
+
for (u.pos = e + 1, n = 1; u.pos < o; ) {
|
|
1438
|
+
if (i = u.src.charCodeAt(u.pos), i === 93 && (n--, n === 0)) {
|
|
1421
1439
|
r = !0;
|
|
1422
1440
|
break;
|
|
1423
1441
|
}
|
|
1424
|
-
if (c = u.pos, u.md.inline.skipToken(u),
|
|
1442
|
+
if (c = u.pos, u.md.inline.skipToken(u), i === 91) {
|
|
1425
1443
|
if (c === u.pos - 1)
|
|
1426
1444
|
n++;
|
|
1427
1445
|
else if (t)
|
|
@@ -1433,7 +1451,7 @@ function Cn(u, e, t) {
|
|
|
1433
1451
|
}
|
|
1434
1452
|
function Dn(u, e, t) {
|
|
1435
1453
|
let n, r = e;
|
|
1436
|
-
const
|
|
1454
|
+
const i = {
|
|
1437
1455
|
ok: !1,
|
|
1438
1456
|
pos: 0,
|
|
1439
1457
|
str: ""
|
|
@@ -1441,16 +1459,16 @@ function Dn(u, e, t) {
|
|
|
1441
1459
|
if (u.charCodeAt(r) === 60) {
|
|
1442
1460
|
for (r++; r < t; ) {
|
|
1443
1461
|
if (n = u.charCodeAt(r), n === 10 || n === 60)
|
|
1444
|
-
return
|
|
1462
|
+
return i;
|
|
1445
1463
|
if (n === 62)
|
|
1446
|
-
return
|
|
1464
|
+
return i.pos = r + 1, i.str = Bu(u.slice(e + 1, r)), i.ok = !0, i;
|
|
1447
1465
|
if (n === 92 && r + 1 < t) {
|
|
1448
1466
|
r += 2;
|
|
1449
1467
|
continue;
|
|
1450
1468
|
}
|
|
1451
1469
|
r++;
|
|
1452
1470
|
}
|
|
1453
|
-
return
|
|
1471
|
+
return i;
|
|
1454
1472
|
}
|
|
1455
1473
|
let c = 0;
|
|
1456
1474
|
for (; r < t && (n = u.charCodeAt(r), !(n === 32 || n < 32 || n === 127)); ) {
|
|
@@ -1461,7 +1479,7 @@ function Dn(u, e, t) {
|
|
|
1461
1479
|
continue;
|
|
1462
1480
|
}
|
|
1463
1481
|
if (n === 40 && (c++, c > 32))
|
|
1464
|
-
return
|
|
1482
|
+
return i;
|
|
1465
1483
|
if (n === 41) {
|
|
1466
1484
|
if (c === 0)
|
|
1467
1485
|
break;
|
|
@@ -1469,10 +1487,10 @@ function Dn(u, e, t) {
|
|
|
1469
1487
|
}
|
|
1470
1488
|
r++;
|
|
1471
1489
|
}
|
|
1472
|
-
return e === r || c !== 0 || (
|
|
1490
|
+
return e === r || c !== 0 || (i.str = Bu(u.slice(e, r)), i.pos = r, i.ok = !0), i;
|
|
1473
1491
|
}
|
|
1474
1492
|
function En(u, e, t, n) {
|
|
1475
|
-
let r,
|
|
1493
|
+
let r, i = e;
|
|
1476
1494
|
const c = {
|
|
1477
1495
|
// if `true`, this is a valid link title
|
|
1478
1496
|
ok: !1,
|
|
@@ -1488,21 +1506,21 @@ function En(u, e, t, n) {
|
|
|
1488
1506
|
if (n)
|
|
1489
1507
|
c.str = n.str, c.marker = n.marker;
|
|
1490
1508
|
else {
|
|
1491
|
-
if (
|
|
1509
|
+
if (i >= t)
|
|
1492
1510
|
return c;
|
|
1493
|
-
let
|
|
1494
|
-
if (
|
|
1511
|
+
let o = u.charCodeAt(i);
|
|
1512
|
+
if (o !== 34 && o !== 39 && o !== 40)
|
|
1495
1513
|
return c;
|
|
1496
|
-
e++,
|
|
1514
|
+
e++, i++, o === 40 && (o = 41), c.marker = o;
|
|
1497
1515
|
}
|
|
1498
|
-
for (;
|
|
1499
|
-
if (r = u.charCodeAt(
|
|
1500
|
-
return c.pos =
|
|
1516
|
+
for (; i < t; ) {
|
|
1517
|
+
if (r = u.charCodeAt(i), r === c.marker)
|
|
1518
|
+
return c.pos = i + 1, c.str += Bu(u.slice(e, i)), c.ok = !0, c;
|
|
1501
1519
|
if (r === 40 && c.marker === 41)
|
|
1502
1520
|
return c;
|
|
1503
|
-
r === 92 &&
|
|
1521
|
+
r === 92 && i + 1 < t && i++, i++;
|
|
1504
1522
|
}
|
|
1505
|
-
return c.can_continue = !0, c.str += Bu(u.slice(e,
|
|
1523
|
+
return c.can_continue = !0, c.str += Bu(u.slice(e, i)), c;
|
|
1506
1524
|
}
|
|
1507
1525
|
const Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1508
1526
|
__proto__: null,
|
|
@@ -1511,40 +1529,40 @@ const Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1511
1529
|
parseLinkTitle: En
|
|
1512
1530
|
}, Symbol.toStringTag, { value: "Module" })), mu = {};
|
|
1513
1531
|
mu.code_inline = function(u, e, t, n, r) {
|
|
1514
|
-
const
|
|
1515
|
-
return "<code" + r.renderAttrs(
|
|
1532
|
+
const i = u[e];
|
|
1533
|
+
return "<code" + r.renderAttrs(i) + ">" + Du(i.content) + "</code>";
|
|
1516
1534
|
};
|
|
1517
1535
|
mu.code_block = function(u, e, t, n, r) {
|
|
1518
|
-
const
|
|
1519
|
-
return "<pre" + r.renderAttrs(
|
|
1536
|
+
const i = u[e];
|
|
1537
|
+
return "<pre" + r.renderAttrs(i) + "><code>" + Du(u[e].content) + `</code></pre>
|
|
1520
1538
|
`;
|
|
1521
1539
|
};
|
|
1522
1540
|
mu.fence = function(u, e, t, n, r) {
|
|
1523
|
-
const
|
|
1524
|
-
let
|
|
1541
|
+
const i = u[e], c = i.info ? Bu(i.info).trim() : "";
|
|
1542
|
+
let o = "", a = "";
|
|
1525
1543
|
if (c) {
|
|
1526
1544
|
const l = c.split(/(\s+)/g);
|
|
1527
|
-
|
|
1545
|
+
o = l[0], a = l.slice(2).join("");
|
|
1528
1546
|
}
|
|
1529
1547
|
let s;
|
|
1530
|
-
if (t.highlight ? s = t.highlight(
|
|
1548
|
+
if (t.highlight ? s = t.highlight(i.content, o, a) || Du(i.content) : s = Du(i.content), s.indexOf("<pre") === 0)
|
|
1531
1549
|
return s + `
|
|
1532
1550
|
`;
|
|
1533
1551
|
if (c) {
|
|
1534
|
-
const l =
|
|
1535
|
-
l < 0 ? f.push(["class", t.langPrefix +
|
|
1536
|
-
const
|
|
1552
|
+
const l = i.attrIndex("class"), f = i.attrs ? i.attrs.slice() : [];
|
|
1553
|
+
l < 0 ? f.push(["class", t.langPrefix + o]) : (f[l] = f[l].slice(), f[l][1] += " " + t.langPrefix + o);
|
|
1554
|
+
const x = {
|
|
1537
1555
|
attrs: f
|
|
1538
1556
|
};
|
|
1539
|
-
return `<pre><code${r.renderAttrs(
|
|
1557
|
+
return `<pre><code${r.renderAttrs(x)}>${s}</code></pre>
|
|
1540
1558
|
`;
|
|
1541
1559
|
}
|
|
1542
|
-
return `<pre><code${r.renderAttrs(
|
|
1560
|
+
return `<pre><code${r.renderAttrs(i)}>${s}</code></pre>
|
|
1543
1561
|
`;
|
|
1544
1562
|
};
|
|
1545
1563
|
mu.image = function(u, e, t, n, r) {
|
|
1546
|
-
const
|
|
1547
|
-
return
|
|
1564
|
+
const i = u[e];
|
|
1565
|
+
return i.attrs[i.attrIndex("alt")][1] = r.renderInlineAsText(i.children, t, n), r.renderToken(u, e, t);
|
|
1548
1566
|
};
|
|
1549
1567
|
mu.hardbreak = function(u, e, t) {
|
|
1550
1568
|
return t.xhtmlOut ? `<br />
|
|
@@ -1579,31 +1597,31 @@ Pu.prototype.renderAttrs = function(e) {
|
|
|
1579
1597
|
};
|
|
1580
1598
|
Pu.prototype.renderToken = function(e, t, n) {
|
|
1581
1599
|
const r = e[t];
|
|
1582
|
-
let
|
|
1600
|
+
let i = "";
|
|
1583
1601
|
if (r.hidden)
|
|
1584
1602
|
return "";
|
|
1585
|
-
r.block && r.nesting !== -1 && t && e[t - 1].hidden && (
|
|
1586
|
-
`),
|
|
1603
|
+
r.block && r.nesting !== -1 && t && e[t - 1].hidden && (i += `
|
|
1604
|
+
`), i += (r.nesting === -1 ? "</" : "<") + r.tag, i += this.renderAttrs(r), r.nesting === 0 && n.xhtmlOut && (i += " /");
|
|
1587
1605
|
let c = !1;
|
|
1588
1606
|
if (r.block && (c = !0, r.nesting === 1 && t + 1 < e.length)) {
|
|
1589
|
-
const
|
|
1590
|
-
(
|
|
1607
|
+
const o = e[t + 1];
|
|
1608
|
+
(o.type === "inline" || o.hidden || o.nesting === -1 && o.tag === r.tag) && (c = !1);
|
|
1591
1609
|
}
|
|
1592
|
-
return
|
|
1593
|
-
` : ">",
|
|
1610
|
+
return i += c ? `>
|
|
1611
|
+
` : ">", i;
|
|
1594
1612
|
};
|
|
1595
1613
|
Pu.prototype.renderInline = function(u, e, t) {
|
|
1596
1614
|
let n = "";
|
|
1597
1615
|
const r = this.rules;
|
|
1598
|
-
for (let
|
|
1599
|
-
const
|
|
1600
|
-
typeof r[
|
|
1616
|
+
for (let i = 0, c = u.length; i < c; i++) {
|
|
1617
|
+
const o = u[i].type;
|
|
1618
|
+
typeof r[o] < "u" ? n += r[o](u, i, e, t, this) : n += this.renderToken(u, i, e);
|
|
1601
1619
|
}
|
|
1602
1620
|
return n;
|
|
1603
1621
|
};
|
|
1604
1622
|
Pu.prototype.renderInlineAsText = function(u, e, t) {
|
|
1605
1623
|
let n = "";
|
|
1606
|
-
for (let r = 0,
|
|
1624
|
+
for (let r = 0, i = u.length; r < i; r++)
|
|
1607
1625
|
switch (u[r].type) {
|
|
1608
1626
|
case "text":
|
|
1609
1627
|
n += u[r].content;
|
|
@@ -1626,9 +1644,9 @@ Pu.prototype.renderInlineAsText = function(u, e, t) {
|
|
|
1626
1644
|
Pu.prototype.render = function(u, e, t) {
|
|
1627
1645
|
let n = "";
|
|
1628
1646
|
const r = this.rules;
|
|
1629
|
-
for (let
|
|
1630
|
-
const
|
|
1631
|
-
|
|
1647
|
+
for (let i = 0, c = u.length; i < c; i++) {
|
|
1648
|
+
const o = u[i].type;
|
|
1649
|
+
o === "inline" ? n += this.renderInline(u[i].children, e, t) : typeof r[o] < "u" ? n += r[o](u, i, e, t, this) : n += this.renderToken(u, i, e, t);
|
|
1632
1650
|
}
|
|
1633
1651
|
return n;
|
|
1634
1652
|
};
|
|
@@ -1660,25 +1678,25 @@ uu.prototype.at = function(u, e, t) {
|
|
|
1660
1678
|
this.__rules__[n].fn = e, this.__rules__[n].alt = r.alt || [], this.__cache__ = null;
|
|
1661
1679
|
};
|
|
1662
1680
|
uu.prototype.before = function(u, e, t, n) {
|
|
1663
|
-
const r = this.__find__(u),
|
|
1681
|
+
const r = this.__find__(u), i = n || {};
|
|
1664
1682
|
if (r === -1)
|
|
1665
1683
|
throw new Error("Parser rule not found: " + u);
|
|
1666
1684
|
this.__rules__.splice(r, 0, {
|
|
1667
1685
|
name: e,
|
|
1668
1686
|
enabled: !0,
|
|
1669
1687
|
fn: t,
|
|
1670
|
-
alt:
|
|
1688
|
+
alt: i.alt || []
|
|
1671
1689
|
}), this.__cache__ = null;
|
|
1672
1690
|
};
|
|
1673
1691
|
uu.prototype.after = function(u, e, t, n) {
|
|
1674
|
-
const r = this.__find__(u),
|
|
1692
|
+
const r = this.__find__(u), i = n || {};
|
|
1675
1693
|
if (r === -1)
|
|
1676
1694
|
throw new Error("Parser rule not found: " + u);
|
|
1677
1695
|
this.__rules__.splice(r + 1, 0, {
|
|
1678
1696
|
name: e,
|
|
1679
1697
|
enabled: !0,
|
|
1680
1698
|
fn: t,
|
|
1681
|
-
alt:
|
|
1699
|
+
alt: i.alt || []
|
|
1682
1700
|
}), this.__cache__ = null;
|
|
1683
1701
|
};
|
|
1684
1702
|
uu.prototype.push = function(u, e, t) {
|
|
@@ -1785,19 +1803,19 @@ function Nn(u) {
|
|
|
1785
1803
|
for (let t = 0, n = e.length; t < n; t++) {
|
|
1786
1804
|
if (e[t].type !== "inline" || !u.md.linkify.pretest(e[t].content))
|
|
1787
1805
|
continue;
|
|
1788
|
-
let r = e[t].children,
|
|
1806
|
+
let r = e[t].children, i = 0;
|
|
1789
1807
|
for (let c = r.length - 1; c >= 0; c--) {
|
|
1790
|
-
const
|
|
1791
|
-
if (
|
|
1792
|
-
for (c--; r[c].level !==
|
|
1808
|
+
const o = r[c];
|
|
1809
|
+
if (o.type === "link_close") {
|
|
1810
|
+
for (c--; r[c].level !== o.level && r[c].type !== "link_open"; )
|
|
1793
1811
|
c--;
|
|
1794
1812
|
continue;
|
|
1795
1813
|
}
|
|
1796
|
-
if (
|
|
1797
|
-
const a =
|
|
1814
|
+
if (o.type === "html_inline" && (Mn(o.content) && i > 0 && i--, On(o.content) && i++), !(i > 0) && o.type === "text" && u.md.linkify.test(o.content)) {
|
|
1815
|
+
const a = o.content;
|
|
1798
1816
|
let s = u.md.linkify.match(a);
|
|
1799
1817
|
const l = [];
|
|
1800
|
-
let f =
|
|
1818
|
+
let f = o.level, x = 0;
|
|
1801
1819
|
s.length > 0 && s[0].index === 0 && c > 0 && r[c - 1].type === "text_special" && (s = s.slice(1));
|
|
1802
1820
|
for (let h = 0; h < s.length; h++) {
|
|
1803
1821
|
const d = s[h].url, y = u.md.normalizeLink(d);
|
|
@@ -1806,39 +1824,39 @@ function Nn(u) {
|
|
|
1806
1824
|
let v = s[h].text;
|
|
1807
1825
|
s[h].schema ? s[h].schema === "mailto:" && !/^mailto:/i.test(v) ? v = u.md.normalizeLinkText("mailto:" + v).replace(/^mailto:/, "") : v = u.md.normalizeLinkText(v) : v = u.md.normalizeLinkText("http://" + v).replace(/^http:\/\//, "");
|
|
1808
1826
|
const C = s[h].index;
|
|
1809
|
-
if (C >
|
|
1810
|
-
const
|
|
1811
|
-
|
|
1827
|
+
if (C > x) {
|
|
1828
|
+
const b = new u.Token("text", "", 0);
|
|
1829
|
+
b.content = a.slice(x, C), b.level = f, l.push(b);
|
|
1812
1830
|
}
|
|
1813
1831
|
const k = new u.Token("link_open", "a", 1);
|
|
1814
1832
|
k.attrs = [["href", y]], k.level = f++, k.markup = "linkify", k.info = "auto", l.push(k);
|
|
1815
|
-
const
|
|
1816
|
-
|
|
1817
|
-
const
|
|
1818
|
-
|
|
1833
|
+
const _ = new u.Token("text", "", 0);
|
|
1834
|
+
_.content = v, _.level = f, l.push(_);
|
|
1835
|
+
const p = new u.Token("link_close", "a", -1);
|
|
1836
|
+
p.level = --f, p.markup = "linkify", p.info = "auto", l.push(p), x = s[h].lastIndex;
|
|
1819
1837
|
}
|
|
1820
|
-
if (
|
|
1838
|
+
if (x < a.length) {
|
|
1821
1839
|
const h = new u.Token("text", "", 0);
|
|
1822
|
-
h.content = a.slice(
|
|
1840
|
+
h.content = a.slice(x), h.level = f, l.push(h);
|
|
1823
1841
|
}
|
|
1824
1842
|
e[t].children = r = Ft(r, c, l);
|
|
1825
1843
|
}
|
|
1826
1844
|
}
|
|
1827
1845
|
}
|
|
1828
1846
|
}
|
|
1829
|
-
const zt = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, Ln = /\((c|tm|r)\)/i, Bn = /\((c|tm|r)\)/ig,
|
|
1847
|
+
const zt = /\+-|\.\.|\?\?\?\?|!!!!|,,|--/, Ln = /\((c|tm|r)\)/i, Bn = /\((c|tm|r)\)/ig, Rn = {
|
|
1830
1848
|
c: "©",
|
|
1831
1849
|
r: "®",
|
|
1832
1850
|
tm: "™"
|
|
1833
1851
|
};
|
|
1834
|
-
function
|
|
1835
|
-
return
|
|
1852
|
+
function qn(u, e) {
|
|
1853
|
+
return Rn[e.toLowerCase()];
|
|
1836
1854
|
}
|
|
1837
1855
|
function Pn(u) {
|
|
1838
1856
|
let e = 0;
|
|
1839
1857
|
for (let t = u.length - 1; t >= 0; t--) {
|
|
1840
1858
|
const n = u[t];
|
|
1841
|
-
n.type === "text" && !e && (n.content = n.content.replace(Bn,
|
|
1859
|
+
n.type === "text" && !e && (n.content = n.content.replace(Bn, qn)), n.type === "link_open" && n.info === "auto" && e--, n.type === "link_close" && n.info === "auto" && e++;
|
|
1842
1860
|
}
|
|
1843
1861
|
}
|
|
1844
1862
|
function jn(u) {
|
|
@@ -1862,24 +1880,24 @@ function Vn(u, e) {
|
|
|
1862
1880
|
let t;
|
|
1863
1881
|
const n = [];
|
|
1864
1882
|
for (let r = 0; r < u.length; r++) {
|
|
1865
|
-
const
|
|
1883
|
+
const i = u[r], c = u[r].level;
|
|
1866
1884
|
for (t = n.length - 1; t >= 0 && !(n[t].level <= c); t--)
|
|
1867
1885
|
;
|
|
1868
|
-
if (n.length = t + 1,
|
|
1886
|
+
if (n.length = t + 1, i.type !== "text")
|
|
1869
1887
|
continue;
|
|
1870
|
-
let
|
|
1888
|
+
let o = i.content, a = 0, s = o.length;
|
|
1871
1889
|
u:
|
|
1872
1890
|
for (; a < s; ) {
|
|
1873
1891
|
Ke.lastIndex = a;
|
|
1874
|
-
const l = Ke.exec(
|
|
1892
|
+
const l = Ke.exec(o);
|
|
1875
1893
|
if (!l)
|
|
1876
1894
|
break;
|
|
1877
|
-
let f = !0,
|
|
1895
|
+
let f = !0, x = !0;
|
|
1878
1896
|
a = l.index + 1;
|
|
1879
1897
|
const h = l[0] === "'";
|
|
1880
1898
|
let d = 32;
|
|
1881
1899
|
if (l.index - 1 >= 0)
|
|
1882
|
-
d =
|
|
1900
|
+
d = o.charCodeAt(l.index - 1);
|
|
1883
1901
|
else
|
|
1884
1902
|
for (t = r - 1; t >= 0 && !(u[t].type === "softbreak" || u[t].type === "hardbreak"); t--)
|
|
1885
1903
|
if (u[t].content) {
|
|
@@ -1888,31 +1906,31 @@ function Vn(u, e) {
|
|
|
1888
1906
|
}
|
|
1889
1907
|
let y = 32;
|
|
1890
1908
|
if (a < s)
|
|
1891
|
-
y =
|
|
1909
|
+
y = o.charCodeAt(a);
|
|
1892
1910
|
else
|
|
1893
1911
|
for (t = r + 1; t < u.length && !(u[t].type === "softbreak" || u[t].type === "hardbreak"); t++)
|
|
1894
1912
|
if (u[t].content) {
|
|
1895
1913
|
y = u[t].content.charCodeAt(0);
|
|
1896
1914
|
break;
|
|
1897
1915
|
}
|
|
1898
|
-
const v = Gu(d) || Zu(String.fromCharCode(d)), C = Gu(y) || Zu(String.fromCharCode(y)), k = Uu(d),
|
|
1899
|
-
if (
|
|
1900
|
-
h && (
|
|
1916
|
+
const v = Gu(d) || Zu(String.fromCharCode(d)), C = Gu(y) || Zu(String.fromCharCode(y)), k = Uu(d), _ = Uu(y);
|
|
1917
|
+
if (_ ? f = !1 : C && (k || v || (f = !1)), k ? x = !1 : v && (_ || C || (x = !1)), y === 34 && l[0] === '"' && d >= 48 && d <= 57 && (x = f = !1), f && x && (f = v, x = C), !f && !x) {
|
|
1918
|
+
h && (i.content = ee(i.content, l.index, Je));
|
|
1901
1919
|
continue;
|
|
1902
1920
|
}
|
|
1903
|
-
if (
|
|
1921
|
+
if (x)
|
|
1904
1922
|
for (t = n.length - 1; t >= 0; t--) {
|
|
1905
|
-
let
|
|
1923
|
+
let p = n[t];
|
|
1906
1924
|
if (n[t].level < c)
|
|
1907
1925
|
break;
|
|
1908
|
-
if (
|
|
1909
|
-
|
|
1910
|
-
let
|
|
1911
|
-
h ? (
|
|
1912
|
-
u[
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
), a += O.length - 1,
|
|
1926
|
+
if (p.single === h && n[t].level === c) {
|
|
1927
|
+
p = n[t];
|
|
1928
|
+
let b, O;
|
|
1929
|
+
h ? (b = e.md.options.quotes[2], O = e.md.options.quotes[3]) : (b = e.md.options.quotes[0], O = e.md.options.quotes[1]), i.content = ee(i.content, l.index, O), u[p.token].content = ee(
|
|
1930
|
+
u[p.token].content,
|
|
1931
|
+
p.pos,
|
|
1932
|
+
b
|
|
1933
|
+
), a += O.length - 1, p.token === r && (a += b.length - 1), o = i.content, s = o.length, n.length = t;
|
|
1916
1934
|
continue u;
|
|
1917
1935
|
}
|
|
1918
1936
|
}
|
|
@@ -1921,7 +1939,7 @@ function Vn(u, e) {
|
|
|
1921
1939
|
pos: l.index,
|
|
1922
1940
|
single: h,
|
|
1923
1941
|
level: c
|
|
1924
|
-
}) :
|
|
1942
|
+
}) : x && h && (i.content = ee(i.content, l.index, Je));
|
|
1925
1943
|
}
|
|
1926
1944
|
}
|
|
1927
1945
|
}
|
|
@@ -1933,13 +1951,13 @@ function Un(u) {
|
|
|
1933
1951
|
function Zn(u) {
|
|
1934
1952
|
let e, t;
|
|
1935
1953
|
const n = u.tokens, r = n.length;
|
|
1936
|
-
for (let
|
|
1937
|
-
if (n[
|
|
1938
|
-
const c = n[
|
|
1939
|
-
for (e = 0; e <
|
|
1954
|
+
for (let i = 0; i < r; i++) {
|
|
1955
|
+
if (n[i].type !== "inline") continue;
|
|
1956
|
+
const c = n[i].children, o = c.length;
|
|
1957
|
+
for (e = 0; e < o; e++)
|
|
1940
1958
|
c[e].type === "text_special" && (c[e].type = "text");
|
|
1941
|
-
for (e = t = 0; e <
|
|
1942
|
-
c[e].type === "text" && e + 1 <
|
|
1959
|
+
for (e = t = 0; e < o; e++)
|
|
1960
|
+
c[e].type === "text" && e + 1 < o && c[e + 1].type === "text" ? c[e + 1].content = c[e].content + c[e + 1].content : (e !== t && (c[t] = c[e]), t++);
|
|
1943
1961
|
e !== t && (c.length = t);
|
|
1944
1962
|
}
|
|
1945
1963
|
}
|
|
@@ -1968,15 +1986,15 @@ Ne.prototype.State = St;
|
|
|
1968
1986
|
function xu(u, e, t, n) {
|
|
1969
1987
|
this.src = u, this.md = e, this.env = t, this.tokens = n, this.bMarks = [], this.eMarks = [], this.tShift = [], this.sCount = [], this.bsCount = [], this.blkIndent = 0, this.line = 0, this.lineMax = 0, this.tight = !1, this.ddIndent = -1, this.listIndent = -1, this.parentType = "root", this.level = 0;
|
|
1970
1988
|
const r = this.src;
|
|
1971
|
-
for (let
|
|
1989
|
+
for (let i = 0, c = 0, o = 0, a = 0, s = r.length, l = !1; c < s; c++) {
|
|
1972
1990
|
const f = r.charCodeAt(c);
|
|
1973
1991
|
if (!l)
|
|
1974
1992
|
if (Z(f)) {
|
|
1975
|
-
|
|
1993
|
+
o++, f === 9 ? a += 4 - a % 4 : a++;
|
|
1976
1994
|
continue;
|
|
1977
1995
|
} else
|
|
1978
1996
|
l = !0;
|
|
1979
|
-
(f === 10 || c === s - 1) && (f !== 10 && c++, this.bMarks.push(
|
|
1997
|
+
(f === 10 || c === s - 1) && (f !== 10 && c++, this.bMarks.push(i), this.eMarks.push(c), this.tShift.push(o), this.sCount.push(a), this.bsCount.push(0), l = !1, o = 0, a = 0, i = c + 1);
|
|
1980
1998
|
}
|
|
1981
1999
|
this.bMarks.push(r.length), this.eMarks.push(r.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
|
|
1982
2000
|
}
|
|
@@ -2024,24 +2042,24 @@ xu.prototype.skipCharsBack = function(e, t, n) {
|
|
|
2024
2042
|
xu.prototype.getLines = function(e, t, n, r) {
|
|
2025
2043
|
if (e >= t)
|
|
2026
2044
|
return "";
|
|
2027
|
-
const
|
|
2028
|
-
for (let c = 0,
|
|
2045
|
+
const i = new Array(t - e);
|
|
2046
|
+
for (let c = 0, o = e; o < t; o++, c++) {
|
|
2029
2047
|
let a = 0;
|
|
2030
|
-
const s = this.bMarks[
|
|
2048
|
+
const s = this.bMarks[o];
|
|
2031
2049
|
let l = s, f;
|
|
2032
|
-
for (
|
|
2033
|
-
const
|
|
2034
|
-
if (Z(
|
|
2035
|
-
|
|
2036
|
-
else if (l - s < this.tShift[
|
|
2050
|
+
for (o + 1 < t || r ? f = this.eMarks[o] + 1 : f = this.eMarks[o]; l < f && a < n; ) {
|
|
2051
|
+
const x = this.src.charCodeAt(l);
|
|
2052
|
+
if (Z(x))
|
|
2053
|
+
x === 9 ? a += 4 - (a + this.bsCount[o]) % 4 : a++;
|
|
2054
|
+
else if (l - s < this.tShift[o])
|
|
2037
2055
|
a++;
|
|
2038
2056
|
else
|
|
2039
2057
|
break;
|
|
2040
2058
|
l++;
|
|
2041
2059
|
}
|
|
2042
|
-
a > n ?
|
|
2060
|
+
a > n ? i[c] = new Array(a - n + 1).join(" ") + this.src.slice(l, f) : i[c] = this.src.slice(l, f);
|
|
2043
2061
|
}
|
|
2044
|
-
return
|
|
2062
|
+
return i.join("");
|
|
2045
2063
|
};
|
|
2046
2064
|
xu.prototype.Token = lu;
|
|
2047
2065
|
const Gn = 65536;
|
|
@@ -2051,10 +2069,10 @@ function xe(u, e) {
|
|
|
2051
2069
|
}
|
|
2052
2070
|
function Qe(u) {
|
|
2053
2071
|
const e = [], t = u.length;
|
|
2054
|
-
let n = 0, r = u.charCodeAt(n),
|
|
2072
|
+
let n = 0, r = u.charCodeAt(n), i = !1, c = 0, o = "";
|
|
2055
2073
|
for (; n < t; )
|
|
2056
|
-
r === 124 && (
|
|
2057
|
-
return e.push(
|
|
2074
|
+
r === 124 && (i ? (o += u.substring(c, n - 1), c = n) : (e.push(o + u.substring(c, n)), o = "", c = n + 1)), i = r === 92, n++, r = u.charCodeAt(n);
|
|
2075
|
+
return e.push(o + u.substring(c)), e;
|
|
2058
2076
|
}
|
|
2059
2077
|
function Kn(u, e, t, n) {
|
|
2060
2078
|
if (e + 2 > t)
|
|
@@ -2062,33 +2080,33 @@ function Kn(u, e, t, n) {
|
|
|
2062
2080
|
let r = e + 1;
|
|
2063
2081
|
if (u.sCount[r] < u.blkIndent || u.sCount[r] - u.blkIndent >= 4)
|
|
2064
2082
|
return !1;
|
|
2065
|
-
let
|
|
2066
|
-
if (
|
|
2083
|
+
let i = u.bMarks[r] + u.tShift[r];
|
|
2084
|
+
if (i >= u.eMarks[r])
|
|
2067
2085
|
return !1;
|
|
2068
|
-
const c = u.src.charCodeAt(
|
|
2069
|
-
if (c !== 124 && c !== 45 && c !== 58 ||
|
|
2086
|
+
const c = u.src.charCodeAt(i++);
|
|
2087
|
+
if (c !== 124 && c !== 45 && c !== 58 || i >= u.eMarks[r])
|
|
2070
2088
|
return !1;
|
|
2071
|
-
const
|
|
2072
|
-
if (
|
|
2089
|
+
const o = u.src.charCodeAt(i++);
|
|
2090
|
+
if (o !== 124 && o !== 45 && o !== 58 && !Z(o) || c === 45 && Z(o))
|
|
2073
2091
|
return !1;
|
|
2074
|
-
for (;
|
|
2075
|
-
const
|
|
2076
|
-
if (
|
|
2092
|
+
for (; i < u.eMarks[r]; ) {
|
|
2093
|
+
const p = u.src.charCodeAt(i);
|
|
2094
|
+
if (p !== 124 && p !== 45 && p !== 58 && !Z(p))
|
|
2077
2095
|
return !1;
|
|
2078
|
-
|
|
2096
|
+
i++;
|
|
2079
2097
|
}
|
|
2080
2098
|
let a = xe(u, e + 1), s = a.split("|");
|
|
2081
2099
|
const l = [];
|
|
2082
|
-
for (let
|
|
2083
|
-
const
|
|
2084
|
-
if (!
|
|
2085
|
-
if (
|
|
2100
|
+
for (let p = 0; p < s.length; p++) {
|
|
2101
|
+
const b = s[p].trim();
|
|
2102
|
+
if (!b) {
|
|
2103
|
+
if (p === 0 || p === s.length - 1)
|
|
2086
2104
|
continue;
|
|
2087
2105
|
return !1;
|
|
2088
2106
|
}
|
|
2089
|
-
if (!/^:?-+:?$/.test(
|
|
2107
|
+
if (!/^:?-+:?$/.test(b))
|
|
2090
2108
|
return !1;
|
|
2091
|
-
|
|
2109
|
+
b.charCodeAt(b.length - 1) === 58 ? l.push(b.charCodeAt(0) === 58 ? "center" : "right") : b.charCodeAt(0) === 58 ? l.push("left") : l.push("");
|
|
2092
2110
|
}
|
|
2093
2111
|
if (a = xe(u, e).trim(), a.indexOf("|") === -1 || u.sCount[e] - u.blkIndent >= 4)
|
|
2094
2112
|
return !1;
|
|
@@ -2098,7 +2116,7 @@ function Kn(u, e, t, n) {
|
|
|
2098
2116
|
return !1;
|
|
2099
2117
|
if (n)
|
|
2100
2118
|
return !0;
|
|
2101
|
-
const
|
|
2119
|
+
const x = u.parentType;
|
|
2102
2120
|
u.parentType = "table";
|
|
2103
2121
|
const h = u.md.block.ruler.getRules("blockquote"), d = u.push("table_open", "table", 1), y = [e, 0];
|
|
2104
2122
|
d.map = y;
|
|
@@ -2106,38 +2124,38 @@ function Kn(u, e, t, n) {
|
|
|
2106
2124
|
v.map = [e, e + 1];
|
|
2107
2125
|
const C = u.push("tr_open", "tr", 1);
|
|
2108
2126
|
C.map = [e, e + 1];
|
|
2109
|
-
for (let
|
|
2110
|
-
const
|
|
2111
|
-
l[
|
|
2127
|
+
for (let p = 0; p < s.length; p++) {
|
|
2128
|
+
const b = u.push("th_open", "th", 1);
|
|
2129
|
+
l[p] && (b.attrs = [["style", "text-align:" + l[p]]]);
|
|
2112
2130
|
const O = u.push("inline", "", 0);
|
|
2113
|
-
O.content = s[
|
|
2131
|
+
O.content = s[p].trim(), O.children = [], u.push("th_close", "th", -1);
|
|
2114
2132
|
}
|
|
2115
2133
|
u.push("tr_close", "tr", -1), u.push("thead_close", "thead", -1);
|
|
2116
|
-
let k,
|
|
2134
|
+
let k, _ = 0;
|
|
2117
2135
|
for (r = e + 2; r < t && !(u.sCount[r] < u.blkIndent); r++) {
|
|
2118
|
-
let
|
|
2119
|
-
for (let O = 0,
|
|
2136
|
+
let p = !1;
|
|
2137
|
+
for (let O = 0, F = h.length; O < F; O++)
|
|
2120
2138
|
if (h[O](u, r, t, !0)) {
|
|
2121
|
-
|
|
2139
|
+
p = !0;
|
|
2122
2140
|
break;
|
|
2123
2141
|
}
|
|
2124
|
-
if (
|
|
2142
|
+
if (p || (a = xe(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = Qe(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), _ += f - s.length, _ > Gn))
|
|
2125
2143
|
break;
|
|
2126
2144
|
if (r === e + 2) {
|
|
2127
2145
|
const O = u.push("tbody_open", "tbody", 1);
|
|
2128
2146
|
O.map = k = [e + 2, 0];
|
|
2129
2147
|
}
|
|
2130
|
-
const
|
|
2131
|
-
|
|
2148
|
+
const b = u.push("tr_open", "tr", 1);
|
|
2149
|
+
b.map = [r, r + 1];
|
|
2132
2150
|
for (let O = 0; O < f; O++) {
|
|
2133
|
-
const
|
|
2134
|
-
l[O] && (
|
|
2151
|
+
const F = u.push("td_open", "td", 1);
|
|
2152
|
+
l[O] && (F.attrs = [["style", "text-align:" + l[O]]]);
|
|
2135
2153
|
const P = u.push("inline", "", 0);
|
|
2136
2154
|
P.content = s[O] ? s[O].trim() : "", P.children = [], u.push("td_close", "td", -1);
|
|
2137
2155
|
}
|
|
2138
2156
|
u.push("tr_close", "tr", -1);
|
|
2139
2157
|
}
|
|
2140
|
-
return k && (u.push("tbody_close", "tbody", -1), k[1] = r), u.push("table_close", "table", -1), y[1] = r, u.parentType =
|
|
2158
|
+
return k && (u.push("tbody_close", "tbody", -1), k[1] = r), u.push("table_close", "table", -1), y[1] = r, u.parentType = x, u.line = r, !0;
|
|
2141
2159
|
}
|
|
2142
2160
|
function Jn(u, e, t) {
|
|
2143
2161
|
if (u.sCount[e] - u.blkIndent < 4)
|
|
@@ -2155,79 +2173,79 @@ function Jn(u, e, t) {
|
|
|
2155
2173
|
break;
|
|
2156
2174
|
}
|
|
2157
2175
|
u.line = r;
|
|
2158
|
-
const
|
|
2159
|
-
return
|
|
2160
|
-
`,
|
|
2176
|
+
const i = u.push("code_block", "code", 0);
|
|
2177
|
+
return i.content = u.getLines(e, r, 4 + u.blkIndent, !1) + `
|
|
2178
|
+
`, i.map = [e, u.line], !0;
|
|
2161
2179
|
}
|
|
2162
2180
|
function Qn(u, e, t, n) {
|
|
2163
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2164
|
-
if (u.sCount[e] - u.blkIndent >= 4 || r + 3 >
|
|
2181
|
+
let r = u.bMarks[e] + u.tShift[e], i = u.eMarks[e];
|
|
2182
|
+
if (u.sCount[e] - u.blkIndent >= 4 || r + 3 > i)
|
|
2165
2183
|
return !1;
|
|
2166
2184
|
const c = u.src.charCodeAt(r);
|
|
2167
2185
|
if (c !== 126 && c !== 96)
|
|
2168
2186
|
return !1;
|
|
2169
|
-
let
|
|
2187
|
+
let o = r;
|
|
2170
2188
|
r = u.skipChars(r, c);
|
|
2171
|
-
let a = r -
|
|
2189
|
+
let a = r - o;
|
|
2172
2190
|
if (a < 3)
|
|
2173
2191
|
return !1;
|
|
2174
|
-
const s = u.src.slice(
|
|
2192
|
+
const s = u.src.slice(o, r), l = u.src.slice(r, i);
|
|
2175
2193
|
if (c === 96 && l.indexOf(String.fromCharCode(c)) >= 0)
|
|
2176
2194
|
return !1;
|
|
2177
2195
|
if (n)
|
|
2178
2196
|
return !0;
|
|
2179
|
-
let f = e,
|
|
2180
|
-
for (; f++, !(f >= t || (r =
|
|
2181
|
-
if (u.src.charCodeAt(r) === c && !(u.sCount[f] - u.blkIndent >= 4) && (r = u.skipChars(r, c), !(r -
|
|
2182
|
-
|
|
2197
|
+
let f = e, x = !1;
|
|
2198
|
+
for (; f++, !(f >= t || (r = o = u.bMarks[f] + u.tShift[f], i = u.eMarks[f], r < i && u.sCount[f] < u.blkIndent)); )
|
|
2199
|
+
if (u.src.charCodeAt(r) === c && !(u.sCount[f] - u.blkIndent >= 4) && (r = u.skipChars(r, c), !(r - o < a) && (r = u.skipSpaces(r), !(r < i)))) {
|
|
2200
|
+
x = !0;
|
|
2183
2201
|
break;
|
|
2184
2202
|
}
|
|
2185
|
-
a = u.sCount[e], u.line = f + (
|
|
2203
|
+
a = u.sCount[e], u.line = f + (x ? 1 : 0);
|
|
2186
2204
|
const h = u.push("fence", "code", 0);
|
|
2187
2205
|
return h.info = l, h.content = u.getLines(e + 1, f, a, !0), h.markup = s, h.map = [e, u.line], !0;
|
|
2188
2206
|
}
|
|
2189
2207
|
function Wn(u, e, t, n) {
|
|
2190
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2208
|
+
let r = u.bMarks[e] + u.tShift[e], i = u.eMarks[e];
|
|
2191
2209
|
const c = u.lineMax;
|
|
2192
2210
|
if (u.sCount[e] - u.blkIndent >= 4 || u.src.charCodeAt(r) !== 62)
|
|
2193
2211
|
return !1;
|
|
2194
2212
|
if (n)
|
|
2195
2213
|
return !0;
|
|
2196
|
-
const
|
|
2214
|
+
const o = [], a = [], s = [], l = [], f = u.md.block.ruler.getRules("blockquote"), x = u.parentType;
|
|
2197
2215
|
u.parentType = "blockquote";
|
|
2198
2216
|
let h = !1, d;
|
|
2199
2217
|
for (d = e; d < t; d++) {
|
|
2200
|
-
const
|
|
2201
|
-
if (r = u.bMarks[d] + u.tShift[d],
|
|
2218
|
+
const _ = u.sCount[d] < u.blkIndent;
|
|
2219
|
+
if (r = u.bMarks[d] + u.tShift[d], i = u.eMarks[d], r >= i)
|
|
2202
2220
|
break;
|
|
2203
|
-
if (u.src.charCodeAt(r++) === 62 && !
|
|
2204
|
-
let
|
|
2205
|
-
u.src.charCodeAt(r) === 32 ? (r++,
|
|
2206
|
-
let P =
|
|
2207
|
-
for (
|
|
2221
|
+
if (u.src.charCodeAt(r++) === 62 && !_) {
|
|
2222
|
+
let b = u.sCount[d] + 1, O, F;
|
|
2223
|
+
u.src.charCodeAt(r) === 32 ? (r++, b++, F = !1, O = !0) : u.src.charCodeAt(r) === 9 ? (O = !0, (u.bsCount[d] + b) % 4 === 3 ? (r++, b++, F = !1) : F = !0) : O = !1;
|
|
2224
|
+
let P = b;
|
|
2225
|
+
for (o.push(u.bMarks[d]), u.bMarks[d] = r; r < i; ) {
|
|
2208
2226
|
const j = u.src.charCodeAt(r);
|
|
2209
2227
|
if (Z(j))
|
|
2210
|
-
j === 9 ? P += 4 - (P + u.bsCount[d] + (
|
|
2228
|
+
j === 9 ? P += 4 - (P + u.bsCount[d] + (F ? 1 : 0)) % 4 : P++;
|
|
2211
2229
|
else
|
|
2212
2230
|
break;
|
|
2213
2231
|
r++;
|
|
2214
2232
|
}
|
|
2215
|
-
h = r >=
|
|
2233
|
+
h = r >= i, a.push(u.bsCount[d]), u.bsCount[d] = u.sCount[d] + 1 + (O ? 1 : 0), s.push(u.sCount[d]), u.sCount[d] = P - b, l.push(u.tShift[d]), u.tShift[d] = r - u.bMarks[d];
|
|
2216
2234
|
continue;
|
|
2217
2235
|
}
|
|
2218
2236
|
if (h)
|
|
2219
2237
|
break;
|
|
2220
|
-
let
|
|
2221
|
-
for (let
|
|
2222
|
-
if (f[
|
|
2223
|
-
|
|
2238
|
+
let p = !1;
|
|
2239
|
+
for (let b = 0, O = f.length; b < O; b++)
|
|
2240
|
+
if (f[b](u, d, t, !0)) {
|
|
2241
|
+
p = !0;
|
|
2224
2242
|
break;
|
|
2225
2243
|
}
|
|
2226
|
-
if (
|
|
2227
|
-
u.lineMax = d, u.blkIndent !== 0 && (
|
|
2244
|
+
if (p) {
|
|
2245
|
+
u.lineMax = d, u.blkIndent !== 0 && (o.push(u.bMarks[d]), a.push(u.bsCount[d]), l.push(u.tShift[d]), s.push(u.sCount[d]), u.sCount[d] -= u.blkIndent);
|
|
2228
2246
|
break;
|
|
2229
2247
|
}
|
|
2230
|
-
|
|
2248
|
+
o.push(u.bMarks[d]), a.push(u.bsCount[d]), l.push(u.tShift[d]), s.push(u.sCount[d]), u.sCount[d] = -1;
|
|
2231
2249
|
}
|
|
2232
2250
|
const y = u.blkIndent;
|
|
2233
2251
|
u.blkIndent = 0;
|
|
@@ -2236,33 +2254,33 @@ function Wn(u, e, t, n) {
|
|
|
2236
2254
|
const C = [e, 0];
|
|
2237
2255
|
v.map = C, u.md.block.tokenize(u, e, d);
|
|
2238
2256
|
const k = u.push("blockquote_close", "blockquote", -1);
|
|
2239
|
-
k.markup = ">", u.lineMax = c, u.parentType =
|
|
2240
|
-
for (let
|
|
2241
|
-
u.bMarks[
|
|
2257
|
+
k.markup = ">", u.lineMax = c, u.parentType = x, C[1] = u.line;
|
|
2258
|
+
for (let _ = 0; _ < l.length; _++)
|
|
2259
|
+
u.bMarks[_ + e] = o[_], u.tShift[_ + e] = l[_], u.sCount[_ + e] = s[_], u.bsCount[_ + e] = a[_];
|
|
2242
2260
|
return u.blkIndent = y, !0;
|
|
2243
2261
|
}
|
|
2244
2262
|
function Xn(u, e, t, n) {
|
|
2245
2263
|
const r = u.eMarks[e];
|
|
2246
2264
|
if (u.sCount[e] - u.blkIndent >= 4)
|
|
2247
2265
|
return !1;
|
|
2248
|
-
let
|
|
2249
|
-
const c = u.src.charCodeAt(
|
|
2266
|
+
let i = u.bMarks[e] + u.tShift[e];
|
|
2267
|
+
const c = u.src.charCodeAt(i++);
|
|
2250
2268
|
if (c !== 42 && c !== 45 && c !== 95)
|
|
2251
2269
|
return !1;
|
|
2252
|
-
let
|
|
2253
|
-
for (;
|
|
2254
|
-
const s = u.src.charCodeAt(
|
|
2270
|
+
let o = 1;
|
|
2271
|
+
for (; i < r; ) {
|
|
2272
|
+
const s = u.src.charCodeAt(i++);
|
|
2255
2273
|
if (s !== c && !Z(s))
|
|
2256
2274
|
return !1;
|
|
2257
|
-
s === c &&
|
|
2275
|
+
s === c && o++;
|
|
2258
2276
|
}
|
|
2259
|
-
if (
|
|
2277
|
+
if (o < 3)
|
|
2260
2278
|
return !1;
|
|
2261
2279
|
if (n)
|
|
2262
2280
|
return !0;
|
|
2263
2281
|
u.line = e + 1;
|
|
2264
2282
|
const a = u.push("hr", "hr", 0);
|
|
2265
|
-
return a.map = [e, u.line], a.markup = Array(
|
|
2283
|
+
return a.map = [e, u.line], a.markup = Array(o + 1).join(String.fromCharCode(c)), !0;
|
|
2266
2284
|
}
|
|
2267
2285
|
function We(u, e) {
|
|
2268
2286
|
const t = u.eMarks[e];
|
|
@@ -2271,8 +2289,8 @@ function We(u, e) {
|
|
|
2271
2289
|
if (r !== 42 && r !== 45 && r !== 43)
|
|
2272
2290
|
return -1;
|
|
2273
2291
|
if (n < t) {
|
|
2274
|
-
const
|
|
2275
|
-
if (!Z(
|
|
2292
|
+
const i = u.src.charCodeAt(n);
|
|
2293
|
+
if (!Z(i))
|
|
2276
2294
|
return -1;
|
|
2277
2295
|
}
|
|
2278
2296
|
return n;
|
|
@@ -2282,22 +2300,22 @@ function Xe(u, e) {
|
|
|
2282
2300
|
let r = t;
|
|
2283
2301
|
if (r + 1 >= n)
|
|
2284
2302
|
return -1;
|
|
2285
|
-
let
|
|
2286
|
-
if (
|
|
2303
|
+
let i = u.src.charCodeAt(r++);
|
|
2304
|
+
if (i < 48 || i > 57)
|
|
2287
2305
|
return -1;
|
|
2288
2306
|
for (; ; ) {
|
|
2289
2307
|
if (r >= n)
|
|
2290
2308
|
return -1;
|
|
2291
|
-
if (
|
|
2309
|
+
if (i = u.src.charCodeAt(r++), i >= 48 && i <= 57) {
|
|
2292
2310
|
if (r - t >= 10)
|
|
2293
2311
|
return -1;
|
|
2294
2312
|
continue;
|
|
2295
2313
|
}
|
|
2296
|
-
if (
|
|
2314
|
+
if (i === 41 || i === 46)
|
|
2297
2315
|
break;
|
|
2298
2316
|
return -1;
|
|
2299
2317
|
}
|
|
2300
|
-
return r < n && (
|
|
2318
|
+
return r < n && (i = u.src.charCodeAt(r), !Z(i)) ? -1 : r;
|
|
2301
2319
|
}
|
|
2302
2320
|
function Yn(u, e) {
|
|
2303
2321
|
const t = u.level + 2;
|
|
@@ -2305,14 +2323,14 @@ function Yn(u, e) {
|
|
|
2305
2323
|
u.tokens[n].level === t && u.tokens[n].type === "paragraph_open" && (u.tokens[n + 2].hidden = !0, u.tokens[n].hidden = !0, n += 2);
|
|
2306
2324
|
}
|
|
2307
2325
|
function ur(u, e, t, n) {
|
|
2308
|
-
let r,
|
|
2326
|
+
let r, i, c, o, a = e, s = !0;
|
|
2309
2327
|
if (u.sCount[a] - u.blkIndent >= 4 || u.listIndent >= 0 && u.sCount[a] - u.listIndent >= 4 && u.sCount[a] < u.blkIndent)
|
|
2310
2328
|
return !1;
|
|
2311
2329
|
let l = !1;
|
|
2312
2330
|
n && u.parentType === "paragraph" && u.sCount[a] >= u.blkIndent && (l = !0);
|
|
2313
|
-
let f,
|
|
2331
|
+
let f, x, h;
|
|
2314
2332
|
if ((h = Xe(u, a)) >= 0) {
|
|
2315
|
-
if (f = !0, c = u.bMarks[a] + u.tShift[a],
|
|
2333
|
+
if (f = !0, c = u.bMarks[a] + u.tShift[a], x = Number(u.src.slice(c, h - 1)), l && x !== 1) return !1;
|
|
2316
2334
|
} else if ((h = We(u, a)) >= 0)
|
|
2317
2335
|
f = !1;
|
|
2318
2336
|
else
|
|
@@ -2322,34 +2340,34 @@ function ur(u, e, t, n) {
|
|
|
2322
2340
|
if (n)
|
|
2323
2341
|
return !0;
|
|
2324
2342
|
const d = u.src.charCodeAt(h - 1), y = u.tokens.length;
|
|
2325
|
-
f ? (
|
|
2343
|
+
f ? (o = u.push("ordered_list_open", "ol", 1), x !== 1 && (o.attrs = [["start", x]])) : o = u.push("bullet_list_open", "ul", 1);
|
|
2326
2344
|
const v = [a, 0];
|
|
2327
|
-
|
|
2345
|
+
o.map = v, o.markup = String.fromCharCode(d);
|
|
2328
2346
|
let C = !1;
|
|
2329
|
-
const k = u.md.block.ruler.getRules("list"),
|
|
2347
|
+
const k = u.md.block.ruler.getRules("list"), _ = u.parentType;
|
|
2330
2348
|
for (u.parentType = "list"; a < t; ) {
|
|
2331
|
-
|
|
2332
|
-
const
|
|
2333
|
-
let
|
|
2334
|
-
for (;
|
|
2335
|
-
const fu = u.src.charCodeAt(
|
|
2349
|
+
i = h, r = u.eMarks[a];
|
|
2350
|
+
const p = u.sCount[a] + h - (u.bMarks[a] + u.tShift[a]);
|
|
2351
|
+
let b = p;
|
|
2352
|
+
for (; i < r; ) {
|
|
2353
|
+
const fu = u.src.charCodeAt(i);
|
|
2336
2354
|
if (fu === 9)
|
|
2337
|
-
|
|
2355
|
+
b += 4 - (b + u.bsCount[a]) % 4;
|
|
2338
2356
|
else if (fu === 32)
|
|
2339
|
-
|
|
2357
|
+
b++;
|
|
2340
2358
|
else
|
|
2341
2359
|
break;
|
|
2342
|
-
|
|
2360
|
+
i++;
|
|
2343
2361
|
}
|
|
2344
|
-
const O =
|
|
2345
|
-
let
|
|
2346
|
-
O >= r ?
|
|
2347
|
-
const P =
|
|
2348
|
-
|
|
2362
|
+
const O = i;
|
|
2363
|
+
let F;
|
|
2364
|
+
O >= r ? F = 1 : F = b - p, F > 4 && (F = 1);
|
|
2365
|
+
const P = p + F;
|
|
2366
|
+
o = u.push("list_item_open", "li", 1), o.markup = String.fromCharCode(d);
|
|
2349
2367
|
const j = [a, 0];
|
|
2350
|
-
|
|
2368
|
+
o.map = j, f && (o.info = u.src.slice(c, h - 1));
|
|
2351
2369
|
const K = u.tight, du = u.tShift[a], _u = u.sCount[a], gu = u.listIndent;
|
|
2352
|
-
if (u.listIndent = u.blkIndent, u.blkIndent = P, u.tight = !0, u.tShift[a] = O - u.bMarks[a], u.sCount[a] =
|
|
2370
|
+
if (u.listIndent = u.blkIndent, u.blkIndent = P, u.tight = !0, u.tShift[a] = O - u.bMarks[a], u.sCount[a] = b, O >= r && u.isEmpty(a + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, a, t, !0), (!u.tight || C) && (s = !1), C = u.line - a > 1 && u.isEmpty(u.line - 1), u.blkIndent = u.listIndent, u.listIndent = gu, u.tShift[a] = du, u.sCount[a] = _u, u.tight = K, o = u.push("list_item_close", "li", -1), o.markup = String.fromCharCode(d), a = u.line, j[1] = a, a >= t || u.sCount[a] < u.blkIndent || u.sCount[a] - u.blkIndent >= 4)
|
|
2353
2371
|
break;
|
|
2354
2372
|
let wu = !1;
|
|
2355
2373
|
for (let fu = 0, Su = k.length; fu < Su; fu++)
|
|
@@ -2368,36 +2386,36 @@ function ur(u, e, t, n) {
|
|
|
2368
2386
|
if (d !== u.src.charCodeAt(h - 1))
|
|
2369
2387
|
break;
|
|
2370
2388
|
}
|
|
2371
|
-
return f ?
|
|
2389
|
+
return f ? o = u.push("ordered_list_close", "ol", -1) : o = u.push("bullet_list_close", "ul", -1), o.markup = String.fromCharCode(d), v[1] = a, u.line = a, u.parentType = _, s && Yn(u, y), !0;
|
|
2372
2390
|
}
|
|
2373
2391
|
function er(u, e, t, n) {
|
|
2374
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2392
|
+
let r = u.bMarks[e] + u.tShift[e], i = u.eMarks[e], c = e + 1;
|
|
2375
2393
|
if (u.sCount[e] - u.blkIndent >= 4 || u.src.charCodeAt(r) !== 91)
|
|
2376
2394
|
return !1;
|
|
2377
|
-
function
|
|
2378
|
-
const
|
|
2379
|
-
if (k >=
|
|
2395
|
+
function o(k) {
|
|
2396
|
+
const _ = u.lineMax;
|
|
2397
|
+
if (k >= _ || u.isEmpty(k))
|
|
2380
2398
|
return null;
|
|
2381
|
-
let
|
|
2382
|
-
if (u.sCount[k] - u.blkIndent > 3 && (
|
|
2383
|
-
const
|
|
2399
|
+
let p = !1;
|
|
2400
|
+
if (u.sCount[k] - u.blkIndent > 3 && (p = !0), u.sCount[k] < 0 && (p = !0), !p) {
|
|
2401
|
+
const F = u.md.block.ruler.getRules("reference"), P = u.parentType;
|
|
2384
2402
|
u.parentType = "reference";
|
|
2385
2403
|
let j = !1;
|
|
2386
|
-
for (let K = 0, du =
|
|
2387
|
-
if (
|
|
2404
|
+
for (let K = 0, du = F.length; K < du; K++)
|
|
2405
|
+
if (F[K](u, k, _, !0)) {
|
|
2388
2406
|
j = !0;
|
|
2389
2407
|
break;
|
|
2390
2408
|
}
|
|
2391
2409
|
if (u.parentType = P, j)
|
|
2392
2410
|
return null;
|
|
2393
2411
|
}
|
|
2394
|
-
const
|
|
2395
|
-
return u.src.slice(
|
|
2412
|
+
const b = u.bMarks[k] + u.tShift[k], O = u.eMarks[k];
|
|
2413
|
+
return u.src.slice(b, O + 1);
|
|
2396
2414
|
}
|
|
2397
|
-
let a = u.src.slice(r,
|
|
2398
|
-
|
|
2415
|
+
let a = u.src.slice(r, i + 1);
|
|
2416
|
+
i = a.length;
|
|
2399
2417
|
let s = -1;
|
|
2400
|
-
for (r = 1; r <
|
|
2418
|
+
for (r = 1; r < i; r++) {
|
|
2401
2419
|
const k = a.charCodeAt(r);
|
|
2402
2420
|
if (k === 91)
|
|
2403
2421
|
return !1;
|
|
@@ -2405,58 +2423,58 @@ function er(u, e, t, n) {
|
|
|
2405
2423
|
s = r;
|
|
2406
2424
|
break;
|
|
2407
2425
|
} else if (k === 10) {
|
|
2408
|
-
const
|
|
2409
|
-
|
|
2410
|
-
} else if (k === 92 && (r++, r <
|
|
2411
|
-
const
|
|
2412
|
-
|
|
2426
|
+
const _ = o(c);
|
|
2427
|
+
_ !== null && (a += _, i = a.length, c++);
|
|
2428
|
+
} else if (k === 92 && (r++, r < i && a.charCodeAt(r) === 10)) {
|
|
2429
|
+
const _ = o(c);
|
|
2430
|
+
_ !== null && (a += _, i = a.length, c++);
|
|
2413
2431
|
}
|
|
2414
2432
|
}
|
|
2415
2433
|
if (s < 0 || a.charCodeAt(s + 1) !== 58)
|
|
2416
2434
|
return !1;
|
|
2417
|
-
for (r = s + 2; r <
|
|
2435
|
+
for (r = s + 2; r < i; r++) {
|
|
2418
2436
|
const k = a.charCodeAt(r);
|
|
2419
2437
|
if (k === 10) {
|
|
2420
|
-
const
|
|
2421
|
-
|
|
2438
|
+
const _ = o(c);
|
|
2439
|
+
_ !== null && (a += _, i = a.length, c++);
|
|
2422
2440
|
} else if (!Z(k)) break;
|
|
2423
2441
|
}
|
|
2424
|
-
const l = u.md.helpers.parseLinkDestination(a, r,
|
|
2442
|
+
const l = u.md.helpers.parseLinkDestination(a, r, i);
|
|
2425
2443
|
if (!l.ok)
|
|
2426
2444
|
return !1;
|
|
2427
2445
|
const f = u.md.normalizeLink(l.str);
|
|
2428
2446
|
if (!u.md.validateLink(f))
|
|
2429
2447
|
return !1;
|
|
2430
2448
|
r = l.pos;
|
|
2431
|
-
const
|
|
2432
|
-
for (; r <
|
|
2449
|
+
const x = r, h = c, d = r;
|
|
2450
|
+
for (; r < i; r++) {
|
|
2433
2451
|
const k = a.charCodeAt(r);
|
|
2434
2452
|
if (k === 10) {
|
|
2435
|
-
const
|
|
2436
|
-
|
|
2453
|
+
const _ = o(c);
|
|
2454
|
+
_ !== null && (a += _, i = a.length, c++);
|
|
2437
2455
|
} else if (!Z(k)) break;
|
|
2438
2456
|
}
|
|
2439
|
-
let y = u.md.helpers.parseLinkTitle(a, r,
|
|
2457
|
+
let y = u.md.helpers.parseLinkTitle(a, r, i);
|
|
2440
2458
|
for (; y.can_continue; ) {
|
|
2441
|
-
const k =
|
|
2459
|
+
const k = o(c);
|
|
2442
2460
|
if (k === null) break;
|
|
2443
|
-
a += k, r =
|
|
2461
|
+
a += k, r = i, i = a.length, c++, y = u.md.helpers.parseLinkTitle(a, r, i, y);
|
|
2444
2462
|
}
|
|
2445
2463
|
let v;
|
|
2446
|
-
for (r <
|
|
2464
|
+
for (r < i && d !== r && y.ok ? (v = y.str, r = y.pos) : (v = "", r = x, c = h); r < i; ) {
|
|
2447
2465
|
const k = a.charCodeAt(r);
|
|
2448
2466
|
if (!Z(k))
|
|
2449
2467
|
break;
|
|
2450
2468
|
r++;
|
|
2451
2469
|
}
|
|
2452
|
-
if (r <
|
|
2453
|
-
for (v = "", r =
|
|
2470
|
+
if (r < i && a.charCodeAt(r) !== 10 && v)
|
|
2471
|
+
for (v = "", r = x, c = h; r < i; ) {
|
|
2454
2472
|
const k = a.charCodeAt(r);
|
|
2455
2473
|
if (!Z(k))
|
|
2456
2474
|
break;
|
|
2457
2475
|
r++;
|
|
2458
2476
|
}
|
|
2459
|
-
if (r <
|
|
2477
|
+
if (r < i && a.charCodeAt(r) !== 10)
|
|
2460
2478
|
return !1;
|
|
2461
2479
|
const C = se(a.slice(1, s));
|
|
2462
2480
|
return C ? (n || (typeof u.env.references > "u" && (u.env.references = {}), typeof u.env.references[C] > "u" && (u.env.references[C] = { title: v, href: f }), u.line = c), !0) : !1;
|
|
@@ -2524,7 +2542,7 @@ const tr = [
|
|
|
2524
2542
|
"tr",
|
|
2525
2543
|
"track",
|
|
2526
2544
|
"ul"
|
|
2527
|
-
], nr = "[a-zA-Z_:][a-zA-Z0-9:._-]*", rr = "[^\"'=<>`\\x00-\\x20]+",
|
|
2545
|
+
], nr = "[a-zA-Z_:][a-zA-Z0-9:._-]*", rr = "[^\"'=<>`\\x00-\\x20]+", ir = "'[^']*'", or = '"[^"]*"', cr = "(?:" + rr + "|" + ir + "|" + or + ")", ar = "(?:\\s+" + nr + "(?:\\s*=\\s*" + cr + ")?)", It = "<[A-Za-z][A-Za-z0-9\\-]*" + ar + "*\\s*\\/?>", Tt = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", sr = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", lr = "<[?][\\s\\S]*?[?]>", dr = "<![A-Za-z][^>]*>", fr = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", hr = new RegExp("^(?:" + It + "|" + Tt + "|" + sr + "|" + lr + "|" + dr + "|" + fr + ")"), pr = new RegExp("^(?:" + It + "|" + Tt + ")"), Mu = [
|
|
2528
2546
|
[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
|
|
2529
2547
|
[/^<!--/, /-->/, !0],
|
|
2530
2548
|
[/^<\?/, /\?>/, !0],
|
|
@@ -2534,20 +2552,20 @@ const tr = [
|
|
|
2534
2552
|
[new RegExp(pr.source + "\\s*$"), /^$/, !1]
|
|
2535
2553
|
];
|
|
2536
2554
|
function br(u, e, t, n) {
|
|
2537
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2555
|
+
let r = u.bMarks[e] + u.tShift[e], i = u.eMarks[e];
|
|
2538
2556
|
if (u.sCount[e] - u.blkIndent >= 4 || !u.md.options.html || u.src.charCodeAt(r) !== 60)
|
|
2539
2557
|
return !1;
|
|
2540
|
-
let c = u.src.slice(r,
|
|
2541
|
-
for (;
|
|
2558
|
+
let c = u.src.slice(r, i), o = 0;
|
|
2559
|
+
for (; o < Mu.length && !Mu[o][0].test(c); o++)
|
|
2542
2560
|
;
|
|
2543
|
-
if (
|
|
2561
|
+
if (o === Mu.length)
|
|
2544
2562
|
return !1;
|
|
2545
2563
|
if (n)
|
|
2546
|
-
return Mu[
|
|
2564
|
+
return Mu[o][2];
|
|
2547
2565
|
let a = e + 1;
|
|
2548
|
-
if (!Mu[
|
|
2566
|
+
if (!Mu[o][1].test(c)) {
|
|
2549
2567
|
for (; a < t && !(u.sCount[a] < u.blkIndent); a++)
|
|
2550
|
-
if (r = u.bMarks[a] + u.tShift[a],
|
|
2568
|
+
if (r = u.bMarks[a] + u.tShift[a], i = u.eMarks[a], c = u.src.slice(r, i), Mu[o][1].test(c)) {
|
|
2551
2569
|
c.length !== 0 && a++;
|
|
2552
2570
|
break;
|
|
2553
2571
|
}
|
|
@@ -2557,28 +2575,28 @@ function br(u, e, t, n) {
|
|
|
2557
2575
|
return s.map = [e, a], s.content = u.getLines(e, a, u.blkIndent, !0), !0;
|
|
2558
2576
|
}
|
|
2559
2577
|
function mr(u, e, t, n) {
|
|
2560
|
-
let r = u.bMarks[e] + u.tShift[e],
|
|
2578
|
+
let r = u.bMarks[e] + u.tShift[e], i = u.eMarks[e];
|
|
2561
2579
|
if (u.sCount[e] - u.blkIndent >= 4)
|
|
2562
2580
|
return !1;
|
|
2563
2581
|
let c = u.src.charCodeAt(r);
|
|
2564
|
-
if (c !== 35 || r >=
|
|
2582
|
+
if (c !== 35 || r >= i)
|
|
2565
2583
|
return !1;
|
|
2566
|
-
let
|
|
2567
|
-
for (c = u.src.charCodeAt(++r); c === 35 && r <
|
|
2568
|
-
|
|
2569
|
-
if (
|
|
2584
|
+
let o = 1;
|
|
2585
|
+
for (c = u.src.charCodeAt(++r); c === 35 && r < i && o <= 6; )
|
|
2586
|
+
o++, c = u.src.charCodeAt(++r);
|
|
2587
|
+
if (o > 6 || r < i && !Z(c))
|
|
2570
2588
|
return !1;
|
|
2571
2589
|
if (n)
|
|
2572
2590
|
return !0;
|
|
2573
|
-
|
|
2574
|
-
const a = u.skipCharsBack(
|
|
2575
|
-
a > r && Z(u.src.charCodeAt(a - 1)) && (
|
|
2576
|
-
const s = u.push("heading_open", "h" + String(
|
|
2577
|
-
s.markup = "########".slice(0,
|
|
2591
|
+
i = u.skipSpacesBack(i, r);
|
|
2592
|
+
const a = u.skipCharsBack(i, 35, r);
|
|
2593
|
+
a > r && Z(u.src.charCodeAt(a - 1)) && (i = a), u.line = e + 1;
|
|
2594
|
+
const s = u.push("heading_open", "h" + String(o), 1);
|
|
2595
|
+
s.markup = "########".slice(0, o), s.map = [e, u.line];
|
|
2578
2596
|
const l = u.push("inline", "", 0);
|
|
2579
|
-
l.content = u.src.slice(r,
|
|
2580
|
-
const f = u.push("heading_close", "h" + String(
|
|
2581
|
-
return f.markup = "########".slice(0,
|
|
2597
|
+
l.content = u.src.slice(r, i).trim(), l.map = [e, u.line], l.children = [];
|
|
2598
|
+
const f = u.push("heading_close", "h" + String(o), -1);
|
|
2599
|
+
return f.markup = "########".slice(0, o), !0;
|
|
2582
2600
|
}
|
|
2583
2601
|
function xr(u, e, t) {
|
|
2584
2602
|
const n = u.md.block.ruler.getRules("paragraph");
|
|
@@ -2586,59 +2604,59 @@ function xr(u, e, t) {
|
|
|
2586
2604
|
return !1;
|
|
2587
2605
|
const r = u.parentType;
|
|
2588
2606
|
u.parentType = "paragraph";
|
|
2589
|
-
let
|
|
2590
|
-
for (;
|
|
2591
|
-
if (u.sCount[
|
|
2607
|
+
let i = 0, c, o = e + 1;
|
|
2608
|
+
for (; o < t && !u.isEmpty(o); o++) {
|
|
2609
|
+
if (u.sCount[o] - u.blkIndent > 3)
|
|
2592
2610
|
continue;
|
|
2593
|
-
if (u.sCount[
|
|
2594
|
-
let h = u.bMarks[
|
|
2595
|
-
const d = u.eMarks[
|
|
2611
|
+
if (u.sCount[o] >= u.blkIndent) {
|
|
2612
|
+
let h = u.bMarks[o] + u.tShift[o];
|
|
2613
|
+
const d = u.eMarks[o];
|
|
2596
2614
|
if (h < d && (c = u.src.charCodeAt(h), (c === 45 || c === 61) && (h = u.skipChars(h, c), h = u.skipSpaces(h), h >= d))) {
|
|
2597
|
-
|
|
2615
|
+
i = c === 61 ? 1 : 2;
|
|
2598
2616
|
break;
|
|
2599
2617
|
}
|
|
2600
2618
|
}
|
|
2601
|
-
if (u.sCount[
|
|
2619
|
+
if (u.sCount[o] < 0)
|
|
2602
2620
|
continue;
|
|
2603
|
-
let
|
|
2621
|
+
let x = !1;
|
|
2604
2622
|
for (let h = 0, d = n.length; h < d; h++)
|
|
2605
|
-
if (n[h](u,
|
|
2606
|
-
|
|
2623
|
+
if (n[h](u, o, t, !0)) {
|
|
2624
|
+
x = !0;
|
|
2607
2625
|
break;
|
|
2608
2626
|
}
|
|
2609
|
-
if (
|
|
2627
|
+
if (x)
|
|
2610
2628
|
break;
|
|
2611
2629
|
}
|
|
2612
|
-
if (!
|
|
2630
|
+
if (!i)
|
|
2613
2631
|
return !1;
|
|
2614
|
-
const a = u.getLines(e,
|
|
2615
|
-
u.line =
|
|
2616
|
-
const s = u.push("heading_open", "h" + String(
|
|
2632
|
+
const a = u.getLines(e, o, u.blkIndent, !1).trim();
|
|
2633
|
+
u.line = o + 1;
|
|
2634
|
+
const s = u.push("heading_open", "h" + String(i), 1);
|
|
2617
2635
|
s.markup = String.fromCharCode(c), s.map = [e, u.line];
|
|
2618
2636
|
const l = u.push("inline", "", 0);
|
|
2619
2637
|
l.content = a, l.map = [e, u.line - 1], l.children = [];
|
|
2620
|
-
const f = u.push("heading_close", "h" + String(
|
|
2638
|
+
const f = u.push("heading_close", "h" + String(i), -1);
|
|
2621
2639
|
return f.markup = String.fromCharCode(c), u.parentType = r, !0;
|
|
2622
2640
|
}
|
|
2623
2641
|
function _r(u, e, t) {
|
|
2624
2642
|
const n = u.md.block.ruler.getRules("paragraph"), r = u.parentType;
|
|
2625
|
-
let
|
|
2626
|
-
for (u.parentType = "paragraph";
|
|
2627
|
-
if (u.sCount[
|
|
2643
|
+
let i = e + 1;
|
|
2644
|
+
for (u.parentType = "paragraph"; i < t && !u.isEmpty(i); i++) {
|
|
2645
|
+
if (u.sCount[i] - u.blkIndent > 3 || u.sCount[i] < 0)
|
|
2628
2646
|
continue;
|
|
2629
2647
|
let s = !1;
|
|
2630
2648
|
for (let l = 0, f = n.length; l < f; l++)
|
|
2631
|
-
if (n[l](u,
|
|
2649
|
+
if (n[l](u, i, t, !0)) {
|
|
2632
2650
|
s = !0;
|
|
2633
2651
|
break;
|
|
2634
2652
|
}
|
|
2635
2653
|
if (s)
|
|
2636
2654
|
break;
|
|
2637
2655
|
}
|
|
2638
|
-
const c = u.getLines(e,
|
|
2639
|
-
u.line =
|
|
2640
|
-
const
|
|
2641
|
-
|
|
2656
|
+
const c = u.getLines(e, i, u.blkIndent, !1).trim();
|
|
2657
|
+
u.line = i;
|
|
2658
|
+
const o = u.push("paragraph_open", "p", 1);
|
|
2659
|
+
o.map = [e, u.line];
|
|
2642
2660
|
const a = u.push("inline", "", 0);
|
|
2643
2661
|
return a.content = c, a.map = [e, u.line], a.children = [], u.push("paragraph_close", "p", -1), u.parentType = r, !0;
|
|
2644
2662
|
}
|
|
@@ -2663,10 +2681,10 @@ function le() {
|
|
|
2663
2681
|
this.ruler.push(te[u][0], te[u][1], { alt: (te[u][2] || []).slice() });
|
|
2664
2682
|
}
|
|
2665
2683
|
le.prototype.tokenize = function(u, e, t) {
|
|
2666
|
-
const n = this.ruler.getRules(""), r = n.length,
|
|
2667
|
-
let c = e,
|
|
2684
|
+
const n = this.ruler.getRules(""), r = n.length, i = u.md.options.maxNesting;
|
|
2685
|
+
let c = e, o = !1;
|
|
2668
2686
|
for (; c < t && (u.line = c = u.skipEmptyLines(c), !(c >= t || u.sCount[c] < u.blkIndent)); ) {
|
|
2669
|
-
if (u.level >=
|
|
2687
|
+
if (u.level >= i) {
|
|
2670
2688
|
u.line = t;
|
|
2671
2689
|
break;
|
|
2672
2690
|
}
|
|
@@ -2679,7 +2697,7 @@ le.prototype.tokenize = function(u, e, t) {
|
|
|
2679
2697
|
break;
|
|
2680
2698
|
}
|
|
2681
2699
|
if (!s) throw new Error("none of the block rules matched");
|
|
2682
|
-
u.tight = !
|
|
2700
|
+
u.tight = !o, u.isEmpty(u.line - 1) && (o = !0), c = u.line, c < t && u.isEmpty(c) && (o = !0, c++, u.line = c);
|
|
2683
2701
|
}
|
|
2684
2702
|
};
|
|
2685
2703
|
le.prototype.parse = function(u, e, t, n) {
|
|
@@ -2704,11 +2722,11 @@ Xu.prototype.push = function(u, e, t) {
|
|
|
2704
2722
|
};
|
|
2705
2723
|
Xu.prototype.scanDelims = function(u, e) {
|
|
2706
2724
|
const t = this.posMax, n = this.src.charCodeAt(u), r = u > 0 ? this.src.charCodeAt(u - 1) : 32;
|
|
2707
|
-
let
|
|
2708
|
-
for (;
|
|
2709
|
-
|
|
2710
|
-
const c =
|
|
2711
|
-
return { can_open:
|
|
2725
|
+
let i = u;
|
|
2726
|
+
for (; i < t && this.src.charCodeAt(i) === n; )
|
|
2727
|
+
i++;
|
|
2728
|
+
const c = i - u, o = i < t ? this.src.charCodeAt(i) : 32, a = Gu(r) || Zu(String.fromCharCode(r)), s = Gu(o) || Zu(String.fromCharCode(o)), l = Uu(r), f = Uu(o), x = !f && (!s || l || a), h = !l && (!a || f || s);
|
|
2729
|
+
return { can_open: x && (e || !h || a), can_close: h && (e || !x || s), length: c };
|
|
2712
2730
|
};
|
|
2713
2731
|
Xu.prototype.Token = lu;
|
|
2714
2732
|
function gr(u) {
|
|
@@ -2754,23 +2772,23 @@ function yr(u, e) {
|
|
|
2754
2772
|
if (t + 3 > n || u.src.charCodeAt(t) !== 58 || u.src.charCodeAt(t + 1) !== 47 || u.src.charCodeAt(t + 2) !== 47) return !1;
|
|
2755
2773
|
const r = u.pending.match(vr);
|
|
2756
2774
|
if (!r) return !1;
|
|
2757
|
-
const
|
|
2775
|
+
const i = r[1], c = u.md.linkify.matchAtStart(u.src.slice(t - i.length));
|
|
2758
2776
|
if (!c) return !1;
|
|
2759
|
-
let
|
|
2760
|
-
if (
|
|
2761
|
-
|
|
2762
|
-
const a = u.md.normalizeLink(
|
|
2777
|
+
let o = c.url;
|
|
2778
|
+
if (o.length <= i.length) return !1;
|
|
2779
|
+
o = o.replace(/\*+$/, "");
|
|
2780
|
+
const a = u.md.normalizeLink(o);
|
|
2763
2781
|
if (!u.md.validateLink(a)) return !1;
|
|
2764
2782
|
if (!e) {
|
|
2765
|
-
u.pending = u.pending.slice(0, -
|
|
2783
|
+
u.pending = u.pending.slice(0, -i.length);
|
|
2766
2784
|
const s = u.push("link_open", "a", 1);
|
|
2767
2785
|
s.attrs = [["href", a]], s.markup = "linkify", s.info = "auto";
|
|
2768
2786
|
const l = u.push("text", "", 0);
|
|
2769
|
-
l.content = u.md.normalizeLinkText(
|
|
2787
|
+
l.content = u.md.normalizeLinkText(o);
|
|
2770
2788
|
const f = u.push("link_close", "a", -1);
|
|
2771
2789
|
f.markup = "linkify", f.info = "auto";
|
|
2772
2790
|
}
|
|
2773
|
-
return u.pos +=
|
|
2791
|
+
return u.pos += o.length - i.length, !0;
|
|
2774
2792
|
}
|
|
2775
2793
|
function Ar(u, e) {
|
|
2776
2794
|
let t = u.pos;
|
|
@@ -2780,9 +2798,9 @@ function Ar(u, e) {
|
|
|
2780
2798
|
if (!e)
|
|
2781
2799
|
if (n >= 0 && u.pending.charCodeAt(n) === 32)
|
|
2782
2800
|
if (n >= 1 && u.pending.charCodeAt(n - 1) === 32) {
|
|
2783
|
-
let
|
|
2784
|
-
for (;
|
|
2785
|
-
u.pending = u.pending.slice(0,
|
|
2801
|
+
let i = n - 1;
|
|
2802
|
+
for (; i >= 1 && u.pending.charCodeAt(i - 1) === 32; ) i--;
|
|
2803
|
+
u.pending = u.pending.slice(0, i), u.push("hardbreak", "br", 0);
|
|
2786
2804
|
} else
|
|
2787
2805
|
u.pending = u.pending.slice(0, -1), u.push("softbreak", "br", 0);
|
|
2788
2806
|
else
|
|
@@ -2807,15 +2825,15 @@ function Cr(u, e) {
|
|
|
2807
2825
|
t++;
|
|
2808
2826
|
return u.pos = t, !0;
|
|
2809
2827
|
}
|
|
2810
|
-
let
|
|
2828
|
+
let i = u.src[t];
|
|
2811
2829
|
if (r >= 55296 && r <= 56319 && t + 1 < n) {
|
|
2812
|
-
const
|
|
2813
|
-
|
|
2830
|
+
const o = u.src.charCodeAt(t + 1);
|
|
2831
|
+
o >= 56320 && o <= 57343 && (i += u.src[t + 1], t++);
|
|
2814
2832
|
}
|
|
2815
|
-
const c = "\\" +
|
|
2833
|
+
const c = "\\" + i;
|
|
2816
2834
|
if (!e) {
|
|
2817
|
-
const
|
|
2818
|
-
r < 256 && Le[r] !== 0 ?
|
|
2835
|
+
const o = u.push("text_special", "", 0);
|
|
2836
|
+
r < 256 && Le[r] !== 0 ? o.content = i : o.content = c, o.markup = c, o.info = "escape";
|
|
2819
2837
|
}
|
|
2820
2838
|
return u.pos = t + 1, !0;
|
|
2821
2839
|
}
|
|
@@ -2825,18 +2843,18 @@ function Dr(u, e) {
|
|
|
2825
2843
|
return !1;
|
|
2826
2844
|
const r = t;
|
|
2827
2845
|
t++;
|
|
2828
|
-
const
|
|
2829
|
-
for (; t <
|
|
2846
|
+
const i = u.posMax;
|
|
2847
|
+
for (; t < i && u.src.charCodeAt(t) === 96; )
|
|
2830
2848
|
t++;
|
|
2831
|
-
const c = u.src.slice(r, t),
|
|
2832
|
-
if (u.backticksScanned && (u.backticks[
|
|
2833
|
-
return e || (u.pending += c), u.pos +=
|
|
2849
|
+
const c = u.src.slice(r, t), o = c.length;
|
|
2850
|
+
if (u.backticksScanned && (u.backticks[o] || 0) <= r)
|
|
2851
|
+
return e || (u.pending += c), u.pos += o, !0;
|
|
2834
2852
|
let a = t, s;
|
|
2835
2853
|
for (; (s = u.src.indexOf("`", a)) !== -1; ) {
|
|
2836
|
-
for (a = s + 1; a <
|
|
2854
|
+
for (a = s + 1; a < i && u.src.charCodeAt(a) === 96; )
|
|
2837
2855
|
a++;
|
|
2838
2856
|
const l = a - s;
|
|
2839
|
-
if (l ===
|
|
2857
|
+
if (l === o) {
|
|
2840
2858
|
if (!e) {
|
|
2841
2859
|
const f = u.push("code_inline", "code", 0);
|
|
2842
2860
|
f.markup = c, f.content = u.src.slice(t, s).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
|
|
@@ -2845,21 +2863,21 @@ function Dr(u, e) {
|
|
|
2845
2863
|
}
|
|
2846
2864
|
u.backticks[l] = s;
|
|
2847
2865
|
}
|
|
2848
|
-
return u.backticksScanned = !0, e || (u.pending += c), u.pos +=
|
|
2866
|
+
return u.backticksScanned = !0, e || (u.pending += c), u.pos += o, !0;
|
|
2849
2867
|
}
|
|
2850
2868
|
function Er(u, e) {
|
|
2851
2869
|
const t = u.pos, n = u.src.charCodeAt(t);
|
|
2852
2870
|
if (e || n !== 126)
|
|
2853
2871
|
return !1;
|
|
2854
2872
|
const r = u.scanDelims(u.pos, !0);
|
|
2855
|
-
let
|
|
2873
|
+
let i = r.length;
|
|
2856
2874
|
const c = String.fromCharCode(n);
|
|
2857
|
-
if (
|
|
2875
|
+
if (i < 2)
|
|
2858
2876
|
return !1;
|
|
2859
|
-
let
|
|
2860
|
-
|
|
2861
|
-
for (let a = 0; a <
|
|
2862
|
-
|
|
2877
|
+
let o;
|
|
2878
|
+
i % 2 && (o = u.push("text", "", 0), o.content = c, i--);
|
|
2879
|
+
for (let a = 0; a < i; a += 2)
|
|
2880
|
+
o = u.push("text", "", 0), o.content = c + c, u.delimiters.push({
|
|
2863
2881
|
marker: n,
|
|
2864
2882
|
length: 0,
|
|
2865
2883
|
// disable "rule of 3" length checks meant for emphasis
|
|
@@ -2873,19 +2891,19 @@ function Er(u, e) {
|
|
|
2873
2891
|
function Ye(u, e) {
|
|
2874
2892
|
let t;
|
|
2875
2893
|
const n = [], r = e.length;
|
|
2876
|
-
for (let
|
|
2877
|
-
const c = e[
|
|
2894
|
+
for (let i = 0; i < r; i++) {
|
|
2895
|
+
const c = e[i];
|
|
2878
2896
|
if (c.marker !== 126 || c.end === -1)
|
|
2879
2897
|
continue;
|
|
2880
|
-
const
|
|
2881
|
-
t = u.tokens[c.token], t.type = "s_open", t.tag = "s", t.nesting = 1, t.markup = "~~", t.content = "", t = u.tokens[
|
|
2898
|
+
const o = e[c.end];
|
|
2899
|
+
t = u.tokens[c.token], t.type = "s_open", t.tag = "s", t.nesting = 1, t.markup = "~~", t.content = "", t = u.tokens[o.token], t.type = "s_close", t.tag = "s", t.nesting = -1, t.markup = "~~", t.content = "", u.tokens[o.token - 1].type === "text" && u.tokens[o.token - 1].content === "~" && n.push(o.token - 1);
|
|
2882
2900
|
}
|
|
2883
2901
|
for (; n.length; ) {
|
|
2884
|
-
const
|
|
2885
|
-
let c =
|
|
2902
|
+
const i = n.pop();
|
|
2903
|
+
let c = i + 1;
|
|
2886
2904
|
for (; c < u.tokens.length && u.tokens[c].type === "s_close"; )
|
|
2887
2905
|
c++;
|
|
2888
|
-
c--,
|
|
2906
|
+
c--, i !== c && (t = u.tokens[c], u.tokens[c] = u.tokens[i], u.tokens[i] = t);
|
|
2889
2907
|
}
|
|
2890
2908
|
}
|
|
2891
2909
|
function Fr(u) {
|
|
@@ -2903,7 +2921,7 @@ function wr(u, e) {
|
|
|
2903
2921
|
if (e || n !== 95 && n !== 42)
|
|
2904
2922
|
return !1;
|
|
2905
2923
|
const r = u.scanDelims(u.pos, n === 42);
|
|
2906
|
-
for (let
|
|
2924
|
+
for (let i = 0; i < r.length; i++) {
|
|
2907
2925
|
const c = u.push("text", "", 0);
|
|
2908
2926
|
c.content = String.fromCharCode(n), u.delimiters.push({
|
|
2909
2927
|
// Char code of the starting marker (number).
|
|
@@ -2934,12 +2952,12 @@ function ut(u, e) {
|
|
|
2934
2952
|
const r = e[n];
|
|
2935
2953
|
if (r.marker !== 95 && r.marker !== 42 || r.end === -1)
|
|
2936
2954
|
continue;
|
|
2937
|
-
const
|
|
2955
|
+
const i = e[r.end], c = n > 0 && e[n - 1].end === r.end + 1 && // check that first two markers match and adjacent
|
|
2938
2956
|
e[n - 1].marker === r.marker && e[n - 1].token === r.token - 1 && // check that last two markers are adjacent (we can safely assume they match)
|
|
2939
|
-
e[r.end + 1].token ===
|
|
2940
|
-
a.type = c ? "strong_open" : "em_open", a.tag = c ? "strong" : "em", a.nesting = 1, a.markup = c ?
|
|
2941
|
-
const s = u.tokens[
|
|
2942
|
-
s.type = c ? "strong_close" : "em_close", s.tag = c ? "strong" : "em", s.nesting = -1, s.markup = c ?
|
|
2957
|
+
e[r.end + 1].token === i.token + 1, o = String.fromCharCode(r.marker), a = u.tokens[r.token];
|
|
2958
|
+
a.type = c ? "strong_open" : "em_open", a.tag = c ? "strong" : "em", a.nesting = 1, a.markup = c ? o + o : o, a.content = "";
|
|
2959
|
+
const s = u.tokens[i.token];
|
|
2960
|
+
s.type = c ? "strong_close" : "em_close", s.tag = c ? "strong" : "em", s.nesting = -1, s.markup = c ? o + o : o, s.content = "", c && (u.tokens[e[n - 1].token].content = "", u.tokens[e[r.end + 1].token].content = "", n--);
|
|
2943
2961
|
}
|
|
2944
2962
|
}
|
|
2945
2963
|
function Sr(u) {
|
|
@@ -2953,10 +2971,10 @@ const Ot = {
|
|
|
2953
2971
|
postProcess: Sr
|
|
2954
2972
|
};
|
|
2955
2973
|
function zr(u, e) {
|
|
2956
|
-
let t, n, r,
|
|
2974
|
+
let t, n, r, i, c = "", o = "", a = u.pos, s = !0;
|
|
2957
2975
|
if (u.src.charCodeAt(u.pos) !== 91)
|
|
2958
2976
|
return !1;
|
|
2959
|
-
const l = u.pos, f = u.posMax,
|
|
2977
|
+
const l = u.pos, f = u.posMax, x = u.pos + 1, h = u.md.helpers.parseLinkLabel(u, u.pos, !0);
|
|
2960
2978
|
if (h < 0)
|
|
2961
2979
|
return !1;
|
|
2962
2980
|
let d = h + 1;
|
|
@@ -2969,7 +2987,7 @@ function zr(u, e) {
|
|
|
2969
2987
|
for (c = u.md.normalizeLink(r.str), u.md.validateLink(c) ? d = r.pos : c = "", a = d; d < f && (t = u.src.charCodeAt(d), !(!Z(t) && t !== 10)); d++)
|
|
2970
2988
|
;
|
|
2971
2989
|
if (r = u.md.helpers.parseLinkTitle(u.src, d, u.posMax), d < f && a !== d && r.ok)
|
|
2972
|
-
for (
|
|
2990
|
+
for (o = r.str, d = r.pos; d < f && (t = u.src.charCodeAt(d), !(!Z(t) && t !== 10)); d++)
|
|
2973
2991
|
;
|
|
2974
2992
|
}
|
|
2975
2993
|
(d >= f || u.src.charCodeAt(d) !== 41) && (s = !0), d++;
|
|
@@ -2977,44 +2995,44 @@ function zr(u, e) {
|
|
|
2977
2995
|
if (s) {
|
|
2978
2996
|
if (typeof u.env.references > "u")
|
|
2979
2997
|
return !1;
|
|
2980
|
-
if (d < f && u.src.charCodeAt(d) === 91 ? (a = d + 1, d = u.md.helpers.parseLinkLabel(u, d), d >= 0 ? n = u.src.slice(a, d++) : d = h + 1) : d = h + 1, n || (n = u.src.slice(
|
|
2998
|
+
if (d < f && u.src.charCodeAt(d) === 91 ? (a = d + 1, d = u.md.helpers.parseLinkLabel(u, d), d >= 0 ? n = u.src.slice(a, d++) : d = h + 1) : d = h + 1, n || (n = u.src.slice(x, h)), i = u.env.references[se(n)], !i)
|
|
2981
2999
|
return u.pos = l, !1;
|
|
2982
|
-
c =
|
|
3000
|
+
c = i.href, o = i.title;
|
|
2983
3001
|
}
|
|
2984
3002
|
if (!e) {
|
|
2985
|
-
u.pos =
|
|
3003
|
+
u.pos = x, u.posMax = h;
|
|
2986
3004
|
const y = u.push("link_open", "a", 1), v = [["href", c]];
|
|
2987
|
-
y.attrs = v,
|
|
3005
|
+
y.attrs = v, o && v.push(["title", o]), u.linkLevel++, u.md.inline.tokenize(u), u.linkLevel--, u.push("link_close", "a", -1);
|
|
2988
3006
|
}
|
|
2989
3007
|
return u.pos = d, u.posMax = f, !0;
|
|
2990
3008
|
}
|
|
2991
3009
|
function Ir(u, e) {
|
|
2992
|
-
let t, n, r,
|
|
2993
|
-
const f = u.pos,
|
|
3010
|
+
let t, n, r, i, c, o, a, s, l = "";
|
|
3011
|
+
const f = u.pos, x = u.posMax;
|
|
2994
3012
|
if (u.src.charCodeAt(u.pos) !== 33 || u.src.charCodeAt(u.pos + 1) !== 91)
|
|
2995
3013
|
return !1;
|
|
2996
3014
|
const h = u.pos + 2, d = u.md.helpers.parseLinkLabel(u, u.pos + 1, !1);
|
|
2997
3015
|
if (d < 0)
|
|
2998
3016
|
return !1;
|
|
2999
|
-
if (
|
|
3000
|
-
for (
|
|
3017
|
+
if (i = d + 1, i < x && u.src.charCodeAt(i) === 40) {
|
|
3018
|
+
for (i++; i < x && (t = u.src.charCodeAt(i), !(!Z(t) && t !== 10)); i++)
|
|
3001
3019
|
;
|
|
3002
|
-
if (
|
|
3020
|
+
if (i >= x)
|
|
3003
3021
|
return !1;
|
|
3004
|
-
for (s =
|
|
3022
|
+
for (s = i, o = u.md.helpers.parseLinkDestination(u.src, i, u.posMax), o.ok && (l = u.md.normalizeLink(o.str), u.md.validateLink(l) ? i = o.pos : l = ""), s = i; i < x && (t = u.src.charCodeAt(i), !(!Z(t) && t !== 10)); i++)
|
|
3005
3023
|
;
|
|
3006
|
-
if (
|
|
3007
|
-
for (a =
|
|
3024
|
+
if (o = u.md.helpers.parseLinkTitle(u.src, i, u.posMax), i < x && s !== i && o.ok)
|
|
3025
|
+
for (a = o.str, i = o.pos; i < x && (t = u.src.charCodeAt(i), !(!Z(t) && t !== 10)); i++)
|
|
3008
3026
|
;
|
|
3009
3027
|
else
|
|
3010
3028
|
a = "";
|
|
3011
|
-
if (
|
|
3029
|
+
if (i >= x || u.src.charCodeAt(i) !== 41)
|
|
3012
3030
|
return u.pos = f, !1;
|
|
3013
|
-
|
|
3031
|
+
i++;
|
|
3014
3032
|
} else {
|
|
3015
3033
|
if (typeof u.env.references > "u")
|
|
3016
3034
|
return !1;
|
|
3017
|
-
if (
|
|
3035
|
+
if (i < x && u.src.charCodeAt(i) === 91 ? (s = i + 1, i = u.md.helpers.parseLinkLabel(u, i), i >= 0 ? r = u.src.slice(s, i++) : i = d + 1) : i = d + 1, r || (r = u.src.slice(h, d)), c = u.env.references[se(r)], !c)
|
|
3018
3036
|
return u.pos = f, !1;
|
|
3019
3037
|
l = c.href, a = c.title;
|
|
3020
3038
|
}
|
|
@@ -3030,7 +3048,7 @@ function Ir(u, e) {
|
|
|
3030
3048
|
const v = u.push("image", "img", 0), C = [["src", l], ["alt", ""]];
|
|
3031
3049
|
v.attrs = C, v.children = y, v.content = n, a && C.push(["title", a]);
|
|
3032
3050
|
}
|
|
3033
|
-
return u.pos =
|
|
3051
|
+
return u.pos = i, u.posMax = x, !0;
|
|
3034
3052
|
}
|
|
3035
3053
|
const Tr = /^([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])?)*)$/, Mr = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
|
|
3036
3054
|
function Or(u, e) {
|
|
@@ -3044,34 +3062,34 @@ function Or(u, e) {
|
|
|
3044
3062
|
if (c === 60) return !1;
|
|
3045
3063
|
if (c === 62) break;
|
|
3046
3064
|
}
|
|
3047
|
-
const
|
|
3048
|
-
if (Mr.test(
|
|
3049
|
-
const c = u.md.normalizeLink(
|
|
3065
|
+
const i = u.src.slice(n + 1, t);
|
|
3066
|
+
if (Mr.test(i)) {
|
|
3067
|
+
const c = u.md.normalizeLink(i);
|
|
3050
3068
|
if (!u.md.validateLink(c))
|
|
3051
3069
|
return !1;
|
|
3052
3070
|
if (!e) {
|
|
3053
|
-
const
|
|
3054
|
-
|
|
3071
|
+
const o = u.push("link_open", "a", 1);
|
|
3072
|
+
o.attrs = [["href", c]], o.markup = "autolink", o.info = "auto";
|
|
3055
3073
|
const a = u.push("text", "", 0);
|
|
3056
|
-
a.content = u.md.normalizeLinkText(
|
|
3074
|
+
a.content = u.md.normalizeLinkText(i);
|
|
3057
3075
|
const s = u.push("link_close", "a", -1);
|
|
3058
3076
|
s.markup = "autolink", s.info = "auto";
|
|
3059
3077
|
}
|
|
3060
|
-
return u.pos +=
|
|
3078
|
+
return u.pos += i.length + 2, !0;
|
|
3061
3079
|
}
|
|
3062
|
-
if (Tr.test(
|
|
3063
|
-
const c = u.md.normalizeLink("mailto:" +
|
|
3080
|
+
if (Tr.test(i)) {
|
|
3081
|
+
const c = u.md.normalizeLink("mailto:" + i);
|
|
3064
3082
|
if (!u.md.validateLink(c))
|
|
3065
3083
|
return !1;
|
|
3066
3084
|
if (!e) {
|
|
3067
|
-
const
|
|
3068
|
-
|
|
3085
|
+
const o = u.push("link_open", "a", 1);
|
|
3086
|
+
o.attrs = [["href", c]], o.markup = "autolink", o.info = "auto";
|
|
3069
3087
|
const a = u.push("text", "", 0);
|
|
3070
|
-
a.content = u.md.normalizeLinkText(
|
|
3088
|
+
a.content = u.md.normalizeLinkText(i);
|
|
3071
3089
|
const s = u.push("link_close", "a", -1);
|
|
3072
3090
|
s.markup = "autolink", s.info = "auto";
|
|
3073
3091
|
}
|
|
3074
|
-
return u.pos +=
|
|
3092
|
+
return u.pos += i.length + 2, !0;
|
|
3075
3093
|
}
|
|
3076
3094
|
return !1;
|
|
3077
3095
|
}
|
|
@@ -3085,7 +3103,7 @@ function Br(u) {
|
|
|
3085
3103
|
const e = u | 32;
|
|
3086
3104
|
return e >= 97 && e <= 122;
|
|
3087
3105
|
}
|
|
3088
|
-
function
|
|
3106
|
+
function Rr(u, e) {
|
|
3089
3107
|
if (!u.md.options.html)
|
|
3090
3108
|
return !1;
|
|
3091
3109
|
const t = u.posMax, n = u.pos;
|
|
@@ -3094,38 +3112,38 @@ function qr(u, e) {
|
|
|
3094
3112
|
const r = u.src.charCodeAt(n + 1);
|
|
3095
3113
|
if (r !== 33 && r !== 63 && r !== 47 && !Br(r))
|
|
3096
3114
|
return !1;
|
|
3097
|
-
const
|
|
3098
|
-
if (!
|
|
3115
|
+
const i = u.src.slice(n).match(hr);
|
|
3116
|
+
if (!i)
|
|
3099
3117
|
return !1;
|
|
3100
3118
|
if (!e) {
|
|
3101
3119
|
const c = u.push("html_inline", "", 0);
|
|
3102
|
-
c.content =
|
|
3120
|
+
c.content = i[0], Nr(c.content) && u.linkLevel++, Lr(c.content) && u.linkLevel--;
|
|
3103
3121
|
}
|
|
3104
|
-
return u.pos +=
|
|
3122
|
+
return u.pos += i[0].length, !0;
|
|
3105
3123
|
}
|
|
3106
|
-
const
|
|
3124
|
+
const qr = /^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i, Pr = /^&([a-z][a-z0-9]{1,31});/i;
|
|
3107
3125
|
function jr(u, e) {
|
|
3108
3126
|
const t = u.pos, n = u.posMax;
|
|
3109
3127
|
if (u.src.charCodeAt(t) !== 38 || t + 1 >= n) return !1;
|
|
3110
3128
|
if (u.src.charCodeAt(t + 1) === 35) {
|
|
3111
|
-
const
|
|
3112
|
-
if (
|
|
3129
|
+
const i = u.src.slice(t).match(qr);
|
|
3130
|
+
if (i) {
|
|
3113
3131
|
if (!e) {
|
|
3114
|
-
const c =
|
|
3115
|
-
|
|
3132
|
+
const c = i[1][0].toLowerCase() === "x" ? parseInt(i[1].slice(1), 16) : parseInt(i[1], 10), o = u.push("text_special", "", 0);
|
|
3133
|
+
o.content = Oe(c) ? oe(c) : oe(65533), o.markup = i[0], o.info = "entity";
|
|
3116
3134
|
}
|
|
3117
|
-
return u.pos +=
|
|
3135
|
+
return u.pos += i[0].length, !0;
|
|
3118
3136
|
}
|
|
3119
3137
|
} else {
|
|
3120
|
-
const
|
|
3121
|
-
if (
|
|
3122
|
-
const c = Et(
|
|
3123
|
-
if (c !==
|
|
3138
|
+
const i = u.src.slice(t).match(Pr);
|
|
3139
|
+
if (i) {
|
|
3140
|
+
const c = Et(i[0]);
|
|
3141
|
+
if (c !== i[0]) {
|
|
3124
3142
|
if (!e) {
|
|
3125
|
-
const
|
|
3126
|
-
|
|
3143
|
+
const o = u.push("text_special", "", 0);
|
|
3144
|
+
o.content = c, o.markup = i[0], o.info = "entity";
|
|
3127
3145
|
}
|
|
3128
|
-
return u.pos +=
|
|
3146
|
+
return u.pos += i[0].length, !0;
|
|
3129
3147
|
}
|
|
3130
3148
|
}
|
|
3131
3149
|
}
|
|
@@ -3135,25 +3153,25 @@ function et(u) {
|
|
|
3135
3153
|
const e = {}, t = u.length;
|
|
3136
3154
|
if (!t) return;
|
|
3137
3155
|
let n = 0, r = -2;
|
|
3138
|
-
const
|
|
3156
|
+
const i = [];
|
|
3139
3157
|
for (let c = 0; c < t; c++) {
|
|
3140
|
-
const
|
|
3141
|
-
if (
|
|
3142
|
-
e.hasOwnProperty(
|
|
3143
|
-
const a = e[
|
|
3144
|
-
let s = n -
|
|
3145
|
-
for (; s > a; s -=
|
|
3158
|
+
const o = u[c];
|
|
3159
|
+
if (i.push(0), (u[n].marker !== o.marker || r !== o.token - 1) && (n = c), r = o.token, o.length = o.length || 0, !o.close) continue;
|
|
3160
|
+
e.hasOwnProperty(o.marker) || (e[o.marker] = [-1, -1, -1, -1, -1, -1]);
|
|
3161
|
+
const a = e[o.marker][(o.open ? 3 : 0) + o.length % 3];
|
|
3162
|
+
let s = n - i[n] - 1, l = s;
|
|
3163
|
+
for (; s > a; s -= i[s] + 1) {
|
|
3146
3164
|
const f = u[s];
|
|
3147
|
-
if (f.marker ===
|
|
3148
|
-
let
|
|
3149
|
-
if ((f.close ||
|
|
3150
|
-
const h = s > 0 && !u[s - 1].open ?
|
|
3151
|
-
|
|
3165
|
+
if (f.marker === o.marker && f.open && f.end < 0) {
|
|
3166
|
+
let x = !1;
|
|
3167
|
+
if ((f.close || o.open) && (f.length + o.length) % 3 === 0 && (f.length % 3 !== 0 || o.length % 3 !== 0) && (x = !0), !x) {
|
|
3168
|
+
const h = s > 0 && !u[s - 1].open ? i[s - 1] + 1 : 0;
|
|
3169
|
+
i[c] = c - s + h, i[s] = h, o.open = !1, f.end = c, f.close = !1, l = -1, r = -2;
|
|
3152
3170
|
break;
|
|
3153
3171
|
}
|
|
3154
3172
|
}
|
|
3155
3173
|
}
|
|
3156
|
-
l !== -1 && (e[
|
|
3174
|
+
l !== -1 && (e[o.marker][(o.open ? 3 : 0) + (o.length || 0) % 3] = l);
|
|
3157
3175
|
}
|
|
3158
3176
|
}
|
|
3159
3177
|
function Hr(u) {
|
|
@@ -3164,9 +3182,9 @@ function Hr(u) {
|
|
|
3164
3182
|
}
|
|
3165
3183
|
function $r(u) {
|
|
3166
3184
|
let e, t, n = 0;
|
|
3167
|
-
const r = u.tokens,
|
|
3168
|
-
for (e = t = 0; e <
|
|
3169
|
-
r[e].nesting < 0 && n--, r[e].level = n, r[e].nesting > 0 && n++, r[e].type === "text" && e + 1 <
|
|
3185
|
+
const r = u.tokens, i = u.tokens.length;
|
|
3186
|
+
for (e = t = 0; e < i; e++)
|
|
3187
|
+
r[e].nesting < 0 && n--, r[e].level = n, r[e].nesting > 0 && n++, r[e].type === "text" && e + 1 < i && r[e + 1].type === "text" ? r[e + 1].content = r[e].content + r[e + 1].content : (e !== t && (r[t] = r[e]), t++);
|
|
3170
3188
|
e !== t && (r.length = t);
|
|
3171
3189
|
}
|
|
3172
3190
|
const _e = [
|
|
@@ -3180,7 +3198,7 @@ const _e = [
|
|
|
3180
3198
|
["link", zr],
|
|
3181
3199
|
["image", Ir],
|
|
3182
3200
|
["autolink", Or],
|
|
3183
|
-
["html_inline",
|
|
3201
|
+
["html_inline", Rr],
|
|
3184
3202
|
["entity", jr]
|
|
3185
3203
|
], ge = [
|
|
3186
3204
|
["balance_pairs", Hr],
|
|
@@ -3199,32 +3217,32 @@ function Yu() {
|
|
|
3199
3217
|
this.ruler2.push(ge[u][0], ge[u][1]);
|
|
3200
3218
|
}
|
|
3201
3219
|
Yu.prototype.skipToken = function(u) {
|
|
3202
|
-
const e = u.pos, t = this.ruler.getRules(""), n = t.length, r = u.md.options.maxNesting,
|
|
3203
|
-
if (typeof
|
|
3204
|
-
u.pos =
|
|
3220
|
+
const e = u.pos, t = this.ruler.getRules(""), n = t.length, r = u.md.options.maxNesting, i = u.cache;
|
|
3221
|
+
if (typeof i[e] < "u") {
|
|
3222
|
+
u.pos = i[e];
|
|
3205
3223
|
return;
|
|
3206
3224
|
}
|
|
3207
3225
|
let c = !1;
|
|
3208
3226
|
if (u.level < r) {
|
|
3209
|
-
for (let
|
|
3210
|
-
if (u.level++, c = t[
|
|
3227
|
+
for (let o = 0; o < n; o++)
|
|
3228
|
+
if (u.level++, c = t[o](u, !0), u.level--, c) {
|
|
3211
3229
|
if (e >= u.pos)
|
|
3212
3230
|
throw new Error("inline rule didn't increment state.pos");
|
|
3213
3231
|
break;
|
|
3214
3232
|
}
|
|
3215
3233
|
} else
|
|
3216
3234
|
u.pos = u.posMax;
|
|
3217
|
-
c || u.pos++,
|
|
3235
|
+
c || u.pos++, i[e] = u.pos;
|
|
3218
3236
|
};
|
|
3219
3237
|
Yu.prototype.tokenize = function(u) {
|
|
3220
3238
|
const e = this.ruler.getRules(""), t = e.length, n = u.posMax, r = u.md.options.maxNesting;
|
|
3221
3239
|
for (; u.pos < n; ) {
|
|
3222
|
-
const
|
|
3240
|
+
const i = u.pos;
|
|
3223
3241
|
let c = !1;
|
|
3224
3242
|
if (u.level < r) {
|
|
3225
|
-
for (let
|
|
3226
|
-
if (c = e[
|
|
3227
|
-
if (
|
|
3243
|
+
for (let o = 0; o < t; o++)
|
|
3244
|
+
if (c = e[o](u, !1), c) {
|
|
3245
|
+
if (i >= u.pos)
|
|
3228
3246
|
throw new Error("inline rule didn't increment state.pos");
|
|
3229
3247
|
break;
|
|
3230
3248
|
}
|
|
@@ -3241,9 +3259,9 @@ Yu.prototype.tokenize = function(u) {
|
|
|
3241
3259
|
Yu.prototype.parse = function(u, e, t, n) {
|
|
3242
3260
|
const r = new this.State(u, e, t, n);
|
|
3243
3261
|
this.tokenize(r);
|
|
3244
|
-
const
|
|
3245
|
-
for (let
|
|
3246
|
-
o
|
|
3262
|
+
const i = this.ruler2.getRules(""), c = i.length;
|
|
3263
|
+
for (let o = 0; o < c; o++)
|
|
3264
|
+
i[o](r);
|
|
3247
3265
|
};
|
|
3248
3266
|
Yu.prototype.State = Xu;
|
|
3249
3267
|
function Vr(u) {
|
|
@@ -3329,7 +3347,7 @@ const Qr = {
|
|
|
3329
3347
|
function Yr(u) {
|
|
3330
3348
|
u.__index__ = -1, u.__text_cache__ = "";
|
|
3331
3349
|
}
|
|
3332
|
-
function
|
|
3350
|
+
function ui(u) {
|
|
3333
3351
|
return function(e, t) {
|
|
3334
3352
|
const n = e.slice(t);
|
|
3335
3353
|
return u.test(n) ? n.match(u)[0].length : 0;
|
|
@@ -3343,46 +3361,46 @@ function nt() {
|
|
|
3343
3361
|
function ce(u) {
|
|
3344
3362
|
const e = u.re = Vr(u.__opts__), t = u.__tlds__.slice();
|
|
3345
3363
|
u.onCompile(), u.__tlds_replaced__ || t.push(Wr), t.push(e.src_xn), e.src_tlds = t.join("|");
|
|
3346
|
-
function n(
|
|
3347
|
-
return
|
|
3364
|
+
function n(o) {
|
|
3365
|
+
return o.replace("%TLDS%", e.src_tlds);
|
|
3348
3366
|
}
|
|
3349
3367
|
e.email_fuzzy = RegExp(n(e.tpl_email_fuzzy), "i"), e.link_fuzzy = RegExp(n(e.tpl_link_fuzzy), "i"), e.link_no_ip_fuzzy = RegExp(n(e.tpl_link_no_ip_fuzzy), "i"), e.host_fuzzy_test = RegExp(n(e.tpl_host_fuzzy_test), "i");
|
|
3350
3368
|
const r = [];
|
|
3351
3369
|
u.__compiled__ = {};
|
|
3352
|
-
function o
|
|
3353
|
-
throw new Error('(LinkifyIt) Invalid schema "' +
|
|
3370
|
+
function i(o, a) {
|
|
3371
|
+
throw new Error('(LinkifyIt) Invalid schema "' + o + '": ' + a);
|
|
3354
3372
|
}
|
|
3355
|
-
Object.keys(u.__schemas__).forEach(function(
|
|
3356
|
-
const a = u.__schemas__[
|
|
3373
|
+
Object.keys(u.__schemas__).forEach(function(o) {
|
|
3374
|
+
const a = u.__schemas__[o];
|
|
3357
3375
|
if (a === null)
|
|
3358
3376
|
return;
|
|
3359
3377
|
const s = { validate: null, link: null };
|
|
3360
|
-
if (u.__compiled__[
|
|
3361
|
-
Gr(a.validate) ? s.validate =
|
|
3378
|
+
if (u.__compiled__[o] = s, Zr(a)) {
|
|
3379
|
+
Gr(a.validate) ? s.validate = ui(a.validate) : tt(a.validate) ? s.validate = a.validate : i(o, a), tt(a.normalize) ? s.normalize = a.normalize : a.normalize ? i(o, a) : s.normalize = nt();
|
|
3362
3380
|
return;
|
|
3363
3381
|
}
|
|
3364
3382
|
if (Ur(a)) {
|
|
3365
|
-
r.push(
|
|
3383
|
+
r.push(o);
|
|
3366
3384
|
return;
|
|
3367
3385
|
}
|
|
3368
|
-
o
|
|
3369
|
-
}), r.forEach(function(
|
|
3370
|
-
u.__compiled__[u.__schemas__[
|
|
3386
|
+
i(o, a);
|
|
3387
|
+
}), r.forEach(function(o) {
|
|
3388
|
+
u.__compiled__[u.__schemas__[o]] && (u.__compiled__[o].validate = u.__compiled__[u.__schemas__[o]].validate, u.__compiled__[o].normalize = u.__compiled__[u.__schemas__[o]].normalize);
|
|
3371
3389
|
}), u.__compiled__[""] = { validate: null, normalize: nt() };
|
|
3372
|
-
const c = Object.keys(u.__compiled__).filter(function(
|
|
3373
|
-
return
|
|
3390
|
+
const c = Object.keys(u.__compiled__).filter(function(o) {
|
|
3391
|
+
return o.length > 0 && u.__compiled__[o];
|
|
3374
3392
|
}).map(Kr).join("|");
|
|
3375
3393
|
u.re.schema_test = RegExp("(^|(?!_)(?:[><|]|" + e.src_ZPCc + "))(" + c + ")", "i"), u.re.schema_search = RegExp("(^|(?!_)(?:[><|]|" + e.src_ZPCc + "))(" + c + ")", "ig"), u.re.schema_at_start = RegExp("^" + u.re.schema_search.source, "i"), u.re.pretest = RegExp(
|
|
3376
3394
|
"(" + u.re.schema_test.source + ")|(" + u.re.host_fuzzy_test.source + ")|@",
|
|
3377
3395
|
"i"
|
|
3378
3396
|
), Yr(u);
|
|
3379
3397
|
}
|
|
3380
|
-
function
|
|
3398
|
+
function ei(u, e) {
|
|
3381
3399
|
const t = u.__index__, n = u.__last_index__, r = u.__text_cache__.slice(t, n);
|
|
3382
3400
|
this.schema = u.__schema__.toLowerCase(), this.index = t + e, this.lastIndex = n + e, this.raw = r, this.text = r, this.url = r;
|
|
3383
3401
|
}
|
|
3384
3402
|
function De(u, e) {
|
|
3385
|
-
const t = new
|
|
3403
|
+
const t = new ei(u, e);
|
|
3386
3404
|
return u.__compiled__[t.schema].normalize(t, u), t;
|
|
3387
3405
|
}
|
|
3388
3406
|
function nu(u, e) {
|
|
@@ -3399,15 +3417,15 @@ nu.prototype.set = function(e) {
|
|
|
3399
3417
|
nu.prototype.test = function(e) {
|
|
3400
3418
|
if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
|
|
3401
3419
|
return !1;
|
|
3402
|
-
let t, n, r,
|
|
3420
|
+
let t, n, r, i, c, o, a, s, l;
|
|
3403
3421
|
if (this.re.schema_test.test(e)) {
|
|
3404
3422
|
for (a = this.re.schema_search, a.lastIndex = 0; (t = a.exec(e)) !== null; )
|
|
3405
|
-
if (
|
|
3406
|
-
this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length +
|
|
3423
|
+
if (i = this.testSchemaAt(e, t[2], a.lastIndex), i) {
|
|
3424
|
+
this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + i;
|
|
3407
3425
|
break;
|
|
3408
3426
|
}
|
|
3409
3427
|
}
|
|
3410
|
-
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = e.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (c = n.index + n[1].length, (this.__index__ < 0 || c < this.__index__) && (this.__schema__ = "", this.__index__ = c, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (l = e.indexOf("@"), l >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (c = r.index + r[1].length,
|
|
3428
|
+
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = e.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (c = n.index + n[1].length, (this.__index__ < 0 || c < this.__index__) && (this.__schema__ = "", this.__index__ = c, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (l = e.indexOf("@"), l >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (c = r.index + r[1].length, o = r.index + r[0].length, (this.__index__ < 0 || c < this.__index__ || c === this.__index__ && o > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = c, this.__last_index__ = o))), this.__index__ >= 0;
|
|
3411
3429
|
};
|
|
3412
3430
|
nu.prototype.pretest = function(e) {
|
|
3413
3431
|
return this.re.pretest.test(e);
|
|
@@ -3432,8 +3450,8 @@ nu.prototype.matchAtStart = function(e) {
|
|
|
3432
3450
|
return n ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + n, De(this, 0)) : null;
|
|
3433
3451
|
};
|
|
3434
3452
|
nu.prototype.tlds = function(e, t) {
|
|
3435
|
-
return e = Array.isArray(e) ? e : [e], t ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, r,
|
|
3436
|
-
return n !==
|
|
3453
|
+
return e = Array.isArray(e) ? e : [e], t ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, r, i) {
|
|
3454
|
+
return n !== i[r - 1];
|
|
3437
3455
|
}).reverse(), ce(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, ce(this), this);
|
|
3438
3456
|
};
|
|
3439
3457
|
nu.prototype.normalize = function(e) {
|
|
@@ -3441,27 +3459,27 @@ nu.prototype.normalize = function(e) {
|
|
|
3441
3459
|
};
|
|
3442
3460
|
nu.prototype.onCompile = function() {
|
|
3443
3461
|
};
|
|
3444
|
-
const Ou = 2147483647, hu = 36, Be = 1, Ku = 26,
|
|
3462
|
+
const Ou = 2147483647, hu = 36, Be = 1, Ku = 26, ti = 38, ni = 700, Lt = 72, Bt = 128, Rt = "-", ri = /^xn--/, ii = /[^\0-\x7F]/, oi = /[\x2E\u3002\uFF0E\uFF61]/g, ci = {
|
|
3445
3463
|
overflow: "Overflow: input needs wider integers to process",
|
|
3446
3464
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3447
3465
|
"invalid-input": "Invalid input"
|
|
3448
3466
|
}, ke = hu - Be, pu = Math.floor, ve = String.fromCharCode;
|
|
3449
3467
|
function ku(u) {
|
|
3450
|
-
throw new RangeError(
|
|
3468
|
+
throw new RangeError(ci[u]);
|
|
3451
3469
|
}
|
|
3452
|
-
function
|
|
3470
|
+
function ai(u, e) {
|
|
3453
3471
|
const t = [];
|
|
3454
3472
|
let n = u.length;
|
|
3455
3473
|
for (; n--; )
|
|
3456
3474
|
t[n] = e(u[n]);
|
|
3457
3475
|
return t;
|
|
3458
3476
|
}
|
|
3459
|
-
function
|
|
3477
|
+
function qt(u, e) {
|
|
3460
3478
|
const t = u.split("@");
|
|
3461
3479
|
let n = "";
|
|
3462
|
-
t.length > 1 && (n = t[0] + "@", u = t[1]), u = u.replace(
|
|
3463
|
-
const r = u.split("."),
|
|
3464
|
-
return n +
|
|
3480
|
+
t.length > 1 && (n = t[0] + "@", u = t[1]), u = u.replace(oi, ".");
|
|
3481
|
+
const r = u.split("."), i = ai(r, e).join(".");
|
|
3482
|
+
return n + i;
|
|
3465
3483
|
}
|
|
3466
3484
|
function Pt(u) {
|
|
3467
3485
|
const e = [];
|
|
@@ -3470,64 +3488,64 @@ function Pt(u) {
|
|
|
3470
3488
|
for (; t < n; ) {
|
|
3471
3489
|
const r = u.charCodeAt(t++);
|
|
3472
3490
|
if (r >= 55296 && r <= 56319 && t < n) {
|
|
3473
|
-
const
|
|
3474
|
-
(
|
|
3491
|
+
const i = u.charCodeAt(t++);
|
|
3492
|
+
(i & 64512) == 56320 ? e.push(((r & 1023) << 10) + (i & 1023) + 65536) : (e.push(r), t--);
|
|
3475
3493
|
} else
|
|
3476
3494
|
e.push(r);
|
|
3477
3495
|
}
|
|
3478
3496
|
return e;
|
|
3479
3497
|
}
|
|
3480
|
-
const
|
|
3498
|
+
const si = (u) => String.fromCodePoint(...u), li = function(u) {
|
|
3481
3499
|
return u >= 48 && u < 58 ? 26 + (u - 48) : u >= 65 && u < 91 ? u - 65 : u >= 97 && u < 123 ? u - 97 : hu;
|
|
3482
3500
|
}, rt = function(u, e) {
|
|
3483
3501
|
return u + 22 + 75 * (u < 26) - ((e != 0) << 5);
|
|
3484
3502
|
}, jt = function(u, e, t) {
|
|
3485
3503
|
let n = 0;
|
|
3486
|
-
for (u = t ? pu(u /
|
|
3504
|
+
for (u = t ? pu(u / ni) : u >> 1, u += pu(u / e); u > ke * Ku >> 1; n += hu)
|
|
3487
3505
|
u = pu(u / ke);
|
|
3488
|
-
return pu(n + (ke + 1) * u / (u +
|
|
3506
|
+
return pu(n + (ke + 1) * u / (u + ti));
|
|
3489
3507
|
}, Ht = function(u) {
|
|
3490
3508
|
const e = [], t = u.length;
|
|
3491
|
-
let n = 0, r = Bt,
|
|
3509
|
+
let n = 0, r = Bt, i = Lt, c = u.lastIndexOf(Rt);
|
|
3492
3510
|
c < 0 && (c = 0);
|
|
3493
|
-
for (let
|
|
3494
|
-
u.charCodeAt(
|
|
3495
|
-
for (let
|
|
3511
|
+
for (let o = 0; o < c; ++o)
|
|
3512
|
+
u.charCodeAt(o) >= 128 && ku("not-basic"), e.push(u.charCodeAt(o));
|
|
3513
|
+
for (let o = c > 0 ? c + 1 : 0; o < t; ) {
|
|
3496
3514
|
const a = n;
|
|
3497
3515
|
for (let l = 1, f = hu; ; f += hu) {
|
|
3498
|
-
|
|
3499
|
-
const
|
|
3500
|
-
|
|
3501
|
-
const h = f <=
|
|
3502
|
-
if (
|
|
3516
|
+
o >= t && ku("invalid-input");
|
|
3517
|
+
const x = li(u.charCodeAt(o++));
|
|
3518
|
+
x >= hu && ku("invalid-input"), x > pu((Ou - n) / l) && ku("overflow"), n += x * l;
|
|
3519
|
+
const h = f <= i ? Be : f >= i + Ku ? Ku : f - i;
|
|
3520
|
+
if (x < h)
|
|
3503
3521
|
break;
|
|
3504
3522
|
const d = hu - h;
|
|
3505
3523
|
l > pu(Ou / d) && ku("overflow"), l *= d;
|
|
3506
3524
|
}
|
|
3507
3525
|
const s = e.length + 1;
|
|
3508
|
-
|
|
3526
|
+
i = jt(n - a, s, a == 0), pu(n / s) > Ou - r && ku("overflow"), r += pu(n / s), n %= s, e.splice(n++, 0, r);
|
|
3509
3527
|
}
|
|
3510
3528
|
return String.fromCodePoint(...e);
|
|
3511
3529
|
}, $t = function(u) {
|
|
3512
3530
|
const e = [];
|
|
3513
3531
|
u = Pt(u);
|
|
3514
3532
|
const t = u.length;
|
|
3515
|
-
let n = Bt, r = 0,
|
|
3533
|
+
let n = Bt, r = 0, i = Lt;
|
|
3516
3534
|
for (const a of u)
|
|
3517
3535
|
a < 128 && e.push(ve(a));
|
|
3518
3536
|
const c = e.length;
|
|
3519
|
-
let
|
|
3520
|
-
for (c && e.push(
|
|
3537
|
+
let o = c;
|
|
3538
|
+
for (c && e.push(Rt); o < t; ) {
|
|
3521
3539
|
let a = Ou;
|
|
3522
3540
|
for (const l of u)
|
|
3523
3541
|
l >= n && l < a && (a = l);
|
|
3524
|
-
const s =
|
|
3542
|
+
const s = o + 1;
|
|
3525
3543
|
a - n > pu((Ou - r) / s) && ku("overflow"), r += (a - n) * s, n = a;
|
|
3526
3544
|
for (const l of u)
|
|
3527
3545
|
if (l < n && ++r > Ou && ku("overflow"), l === n) {
|
|
3528
3546
|
let f = r;
|
|
3529
|
-
for (let
|
|
3530
|
-
const h =
|
|
3547
|
+
for (let x = hu; ; x += hu) {
|
|
3548
|
+
const h = x <= i ? Be : x >= i + Ku ? Ku : x - i;
|
|
3531
3549
|
if (f < h)
|
|
3532
3550
|
break;
|
|
3533
3551
|
const d = f - h, y = hu - h;
|
|
@@ -3535,18 +3553,18 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3535
3553
|
ve(rt(h + d % y, 0))
|
|
3536
3554
|
), f = pu(d / y);
|
|
3537
3555
|
}
|
|
3538
|
-
e.push(ve(rt(f, 0))),
|
|
3556
|
+
e.push(ve(rt(f, 0))), i = jt(r, s, o === c), r = 0, ++o;
|
|
3539
3557
|
}
|
|
3540
3558
|
++r, ++n;
|
|
3541
3559
|
}
|
|
3542
3560
|
return e.join("");
|
|
3543
|
-
},
|
|
3544
|
-
return
|
|
3545
|
-
return
|
|
3561
|
+
}, di = function(u) {
|
|
3562
|
+
return qt(u, function(e) {
|
|
3563
|
+
return ri.test(e) ? Ht(e.slice(4).toLowerCase()) : e;
|
|
3546
3564
|
});
|
|
3547
|
-
},
|
|
3548
|
-
return
|
|
3549
|
-
return
|
|
3565
|
+
}, fi = function(u) {
|
|
3566
|
+
return qt(u, function(e) {
|
|
3567
|
+
return ii.test(e) ? "xn--" + $t(e) : e;
|
|
3550
3568
|
});
|
|
3551
3569
|
}, Vt = {
|
|
3552
3570
|
/**
|
|
@@ -3564,13 +3582,13 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3564
3582
|
*/
|
|
3565
3583
|
ucs2: {
|
|
3566
3584
|
decode: Pt,
|
|
3567
|
-
encode:
|
|
3585
|
+
encode: si
|
|
3568
3586
|
},
|
|
3569
3587
|
decode: Ht,
|
|
3570
3588
|
encode: $t,
|
|
3571
|
-
toASCII:
|
|
3572
|
-
toUnicode:
|
|
3573
|
-
},
|
|
3589
|
+
toASCII: fi,
|
|
3590
|
+
toUnicode: di
|
|
3591
|
+
}, hi = {
|
|
3574
3592
|
options: {
|
|
3575
3593
|
// Enable HTML tags in source
|
|
3576
3594
|
html: !1,
|
|
@@ -3606,7 +3624,7 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3606
3624
|
block: {},
|
|
3607
3625
|
inline: {}
|
|
3608
3626
|
}
|
|
3609
|
-
},
|
|
3627
|
+
}, pi = {
|
|
3610
3628
|
options: {
|
|
3611
3629
|
// Enable HTML tags in source
|
|
3612
3630
|
html: !1,
|
|
@@ -3661,7 +3679,7 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3661
3679
|
]
|
|
3662
3680
|
}
|
|
3663
3681
|
}
|
|
3664
|
-
},
|
|
3682
|
+
}, bi = {
|
|
3665
3683
|
options: {
|
|
3666
3684
|
// Enable HTML tags in source
|
|
3667
3685
|
html: !0,
|
|
@@ -3735,17 +3753,17 @@ const so = (u) => String.fromCodePoint(...u), lo = function(u) {
|
|
|
3735
3753
|
]
|
|
3736
3754
|
}
|
|
3737
3755
|
}
|
|
3738
|
-
},
|
|
3739
|
-
default:
|
|
3740
|
-
zero:
|
|
3741
|
-
commonmark:
|
|
3742
|
-
},
|
|
3743
|
-
function
|
|
3756
|
+
}, mi = {
|
|
3757
|
+
default: hi,
|
|
3758
|
+
zero: pi,
|
|
3759
|
+
commonmark: bi
|
|
3760
|
+
}, xi = /^(vbscript|javascript|file|data):/, _i = /^data:image\/(gif|png|jpeg|webp);/;
|
|
3761
|
+
function gi(u) {
|
|
3744
3762
|
const e = u.trim().toLowerCase();
|
|
3745
|
-
return
|
|
3763
|
+
return xi.test(e) ? _i.test(e) : !0;
|
|
3746
3764
|
}
|
|
3747
3765
|
const Ut = ["http:", "https:", "mailto:"];
|
|
3748
|
-
function
|
|
3766
|
+
function ki(u) {
|
|
3749
3767
|
const e = Ie(u, !0);
|
|
3750
3768
|
if (e.hostname && (!e.protocol || Ut.indexOf(e.protocol) >= 0))
|
|
3751
3769
|
try {
|
|
@@ -3754,7 +3772,7 @@ function vo(u) {
|
|
|
3754
3772
|
}
|
|
3755
3773
|
return Wu(ze(e));
|
|
3756
3774
|
}
|
|
3757
|
-
function
|
|
3775
|
+
function vi(u) {
|
|
3758
3776
|
const e = Ie(u, !0);
|
|
3759
3777
|
if (e.hostname && (!e.protocol || Ut.indexOf(e.protocol) >= 0))
|
|
3760
3778
|
try {
|
|
@@ -3766,7 +3784,7 @@ function yo(u) {
|
|
|
3766
3784
|
function ru(u, e) {
|
|
3767
3785
|
if (!(this instanceof ru))
|
|
3768
3786
|
return new ru(u, e);
|
|
3769
|
-
e || Me(u) || (e = u || {}, u = "default"), this.inline = new Yu(), this.block = new le(), this.core = new Ne(), this.renderer = new Pu(), this.linkify = new nu(), this.validateLink =
|
|
3787
|
+
e || Me(u) || (e = u || {}, u = "default"), this.inline = new Yu(), this.block = new le(), this.core = new Ne(), this.renderer = new Pu(), this.linkify = new nu(), this.validateLink = gi, this.normalizeLink = ki, this.normalizeLinkText = vi, this.utils = An, this.helpers = ae({}, Fn), this.options = {}, this.configure(u), e && this.set(e);
|
|
3770
3788
|
}
|
|
3771
3789
|
ru.prototype.set = function(u) {
|
|
3772
3790
|
return ae(this.options, u), this;
|
|
@@ -3775,7 +3793,7 @@ ru.prototype.configure = function(u) {
|
|
|
3775
3793
|
const e = this;
|
|
3776
3794
|
if (Me(u)) {
|
|
3777
3795
|
const t = u;
|
|
3778
|
-
if (u =
|
|
3796
|
+
if (u = mi[t], !u)
|
|
3779
3797
|
throw new Error('Wrong `markdown-it` preset "' + t + '", check name');
|
|
3780
3798
|
}
|
|
3781
3799
|
if (!u)
|
|
@@ -3828,100 +3846,100 @@ ru.prototype.parseInline = function(u, e) {
|
|
|
3828
3846
|
ru.prototype.renderInline = function(u, e) {
|
|
3829
3847
|
return e = e || {}, this.renderer.render(this.parseInline(u, e), this.options, e);
|
|
3830
3848
|
};
|
|
3831
|
-
const
|
|
3849
|
+
const yi = "data:image/gif;base64,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", Ai = { class: "das-ai-chat" }, Ci = { class: "das-ai-reference-content-content" }, Di = { style: { "margin-right": "8px" } }, Ei = { class: "das-ai-answer-content" }, Fi = {
|
|
3832
3850
|
key: 0,
|
|
3833
3851
|
class: "das-ai-chat-stop"
|
|
3834
|
-
},
|
|
3852
|
+
}, wi = { class: "think-line-text" }, Si = { class: "think-line-icon" }, zi = ["innerHTML"], Ii = ["innerHTML"], Ti = {
|
|
3835
3853
|
key: 3,
|
|
3836
3854
|
class: "das-ai-chat-opt"
|
|
3837
|
-
},
|
|
3855
|
+
}, Mi = {
|
|
3838
3856
|
key: 1,
|
|
3839
3857
|
class: "audio-generated"
|
|
3840
|
-
},
|
|
3858
|
+
}, Oi = {
|
|
3841
3859
|
key: 2,
|
|
3842
3860
|
class: "audio-loading-img"
|
|
3843
|
-
},
|
|
3861
|
+
}, Ni = ["src"], Li = {
|
|
3844
3862
|
key: 4,
|
|
3845
3863
|
class: "das-ai-chat-loading"
|
|
3846
|
-
},
|
|
3864
|
+
}, Bi = {
|
|
3847
3865
|
name: "aiChat"
|
|
3848
|
-
},
|
|
3849
|
-
...
|
|
3866
|
+
}, Ri = /* @__PURE__ */ iu({
|
|
3867
|
+
...Bi,
|
|
3850
3868
|
props: {
|
|
3851
3869
|
item: { default: {} },
|
|
3852
3870
|
isNew: { type: Boolean, default: !0 }
|
|
3853
3871
|
},
|
|
3854
3872
|
emits: ["aiChatEmit"],
|
|
3855
3873
|
setup(u, { emit: e }) {
|
|
3856
|
-
const t = u, n = M(""), r = M(""),
|
|
3874
|
+
const t = u, n = M(""), r = M(""), i = e, c = new ru(), o = M(), a = su(() => t.item.content), s = su(() => t.item.think), { toClipboard: l } = N0();
|
|
3857
3875
|
bu(
|
|
3858
3876
|
() => a.value,
|
|
3859
|
-
(
|
|
3860
|
-
if (!
|
|
3877
|
+
(_, p) => {
|
|
3878
|
+
if (!_) {
|
|
3861
3879
|
n.value = "";
|
|
3862
3880
|
return;
|
|
3863
3881
|
}
|
|
3864
|
-
n.value = c.render(
|
|
3882
|
+
n.value = c.render(_);
|
|
3865
3883
|
},
|
|
3866
3884
|
{ immediate: !0 }
|
|
3867
3885
|
), bu(
|
|
3868
3886
|
() => s.value,
|
|
3869
|
-
(
|
|
3870
|
-
if (!
|
|
3887
|
+
(_, p) => {
|
|
3888
|
+
if (!_) {
|
|
3871
3889
|
r.value = "";
|
|
3872
3890
|
return;
|
|
3873
3891
|
}
|
|
3874
|
-
r.value = c.render(
|
|
3892
|
+
r.value = c.render(_);
|
|
3875
3893
|
},
|
|
3876
3894
|
{ immediate: !0 }
|
|
3877
3895
|
);
|
|
3878
|
-
const f = M(!0),
|
|
3879
|
-
var p, b
|
|
3880
|
-
return ((
|
|
3896
|
+
const f = M(!0), x = su(() => t.item.file && t.item.file.length ? I("引用$0篇资料作为参考", t.item.file.length) : ""), h = su(() => t.item.loading && !n.value ? I("思考中…") : t.item.thinkTime ? I("已深度思考(用时$0秒)", t.item.thinkTime) : I("已深度思考")), d = su(() => !n.value && !r.value), y = () => {
|
|
3897
|
+
var _, p, b;
|
|
3898
|
+
return ((_ = t.item) == null ? void 0 : _.audioStatus) == "normal" ? I("语音朗读") : ((p = t.item) == null ? void 0 : p.audioStatus) == "generated" || ((b = t.item) == null ? void 0 : b.audioStatus) == "loading" ? I("停止朗读") : I("语音朗读");
|
|
3881
3899
|
}, v = () => {
|
|
3882
|
-
var
|
|
3900
|
+
var _;
|
|
3883
3901
|
try {
|
|
3884
3902
|
if (!n.value) return;
|
|
3885
|
-
const
|
|
3886
|
-
l(
|
|
3903
|
+
const p = (_ = o.value.textContent) == null ? void 0 : _.replace(/^\s*[\r\n]/gm, "");
|
|
3904
|
+
l(p), Pe.success(I("复制成功"));
|
|
3887
3905
|
} catch {
|
|
3888
3906
|
Pe.error(I("复制失败"));
|
|
3889
3907
|
}
|
|
3890
|
-
}, C = (
|
|
3891
|
-
if (
|
|
3908
|
+
}, C = (_) => {
|
|
3909
|
+
if (_ == "copy") {
|
|
3892
3910
|
v();
|
|
3893
3911
|
return;
|
|
3894
3912
|
}
|
|
3895
|
-
if (
|
|
3913
|
+
if (_ == "saveKnowledgebase") {
|
|
3896
3914
|
if (t.item.saved || !n.value) return;
|
|
3897
|
-
|
|
3915
|
+
i("aiChatEmit", _, { dom: o.value, item: t.item });
|
|
3898
3916
|
return;
|
|
3899
3917
|
}
|
|
3900
|
-
if (
|
|
3918
|
+
if (_ == "play") {
|
|
3901
3919
|
if (t.item.audioStatus == "normal") {
|
|
3902
|
-
if (!
|
|
3903
|
-
|
|
3920
|
+
if (!o.value) return;
|
|
3921
|
+
i("aiChatEmit", _, { text: o.value.textContent, data: t.item });
|
|
3904
3922
|
return;
|
|
3905
3923
|
}
|
|
3906
|
-
|
|
3924
|
+
i("aiChatEmit", _, { data: t.item });
|
|
3907
3925
|
return;
|
|
3908
3926
|
}
|
|
3909
|
-
|
|
3927
|
+
i("aiChatEmit", _, t.item);
|
|
3910
3928
|
}, k = () => {
|
|
3911
|
-
|
|
3929
|
+
i("aiChatEmit", "reference", t.item);
|
|
3912
3930
|
};
|
|
3913
|
-
return (
|
|
3931
|
+
return (_, p) => (w(), q("div", Ai, [
|
|
3914
3932
|
T(" 参考内容 "),
|
|
3915
|
-
g("div",
|
|
3916
|
-
|
|
3933
|
+
g("div", Ci, [
|
|
3934
|
+
x.value ? (w(), q("div", {
|
|
3917
3935
|
key: 0,
|
|
3918
3936
|
onClick: k,
|
|
3919
3937
|
class: "das-ai-reference-content-line"
|
|
3920
3938
|
}, [
|
|
3921
3939
|
g(
|
|
3922
3940
|
"span",
|
|
3923
|
-
|
|
3924
|
-
V(
|
|
3941
|
+
Di,
|
|
3942
|
+
V(x.value),
|
|
3925
3943
|
1
|
|
3926
3944
|
/* TEXT */
|
|
3927
3945
|
),
|
|
@@ -3959,7 +3977,7 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3959
3977
|
</div> `)
|
|
3960
3978
|
]),
|
|
3961
3979
|
T(" 回答 "),
|
|
3962
|
-
g("div",
|
|
3980
|
+
g("div", Ei, [
|
|
3963
3981
|
T(` <div class="ai-answer-top">\r
|
|
3964
3982
|
<DasIcon icon="huida" size="large" iconColor="#212121"></DasIcon>\r
|
|
3965
3983
|
<span style="margin-left: 8px">{{ t('回答') }}</span>\r
|
|
@@ -3969,14 +3987,14 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3969
3987
|
<div class="ai-answer-skeleton-item"></div>\r
|
|
3970
3988
|
<div class="ai-answer-skeleton-item" style="width: 50%"></div>\r
|
|
3971
3989
|
</div> `),
|
|
3972
|
-
!
|
|
3990
|
+
!u.item.loading && d.value && !u.item.file.length ? (w(), q(
|
|
3973
3991
|
"div",
|
|
3974
|
-
|
|
3992
|
+
Fi,
|
|
3975
3993
|
V(A(I)("已暂停生成")),
|
|
3976
3994
|
1
|
|
3977
3995
|
/* TEXT */
|
|
3978
3996
|
)) : T("v-if", !0),
|
|
3979
|
-
r.value ? (w(),
|
|
3997
|
+
r.value ? (w(), q(
|
|
3980
3998
|
"div",
|
|
3981
3999
|
{
|
|
3982
4000
|
key: 1,
|
|
@@ -3984,17 +4002,17 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
3984
4002
|
},
|
|
3985
4003
|
[
|
|
3986
4004
|
g("div", {
|
|
3987
|
-
onClick:
|
|
4005
|
+
onClick: p[0] || (p[0] = (b) => f.value = !f.value),
|
|
3988
4006
|
class: "think-line"
|
|
3989
4007
|
}, [
|
|
3990
4008
|
g(
|
|
3991
4009
|
"div",
|
|
3992
|
-
|
|
4010
|
+
wi,
|
|
3993
4011
|
V(h.value),
|
|
3994
4012
|
1
|
|
3995
4013
|
/* TEXT */
|
|
3996
4014
|
),
|
|
3997
|
-
g("div",
|
|
4015
|
+
g("div", Si, [
|
|
3998
4016
|
f.value ? T("v-if", !0) : (w(), X(A(ht), {
|
|
3999
4017
|
key: 0,
|
|
4000
4018
|
size: "medium",
|
|
@@ -4010,20 +4028,20 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4010
4028
|
g("div", {
|
|
4011
4029
|
class: "das-ai-think-markdown",
|
|
4012
4030
|
innerHTML: r.value
|
|
4013
|
-
}, null, 8,
|
|
4031
|
+
}, null, 8, zi)
|
|
4014
4032
|
],
|
|
4015
4033
|
2
|
|
4016
4034
|
/* CLASS */
|
|
4017
4035
|
)) : T("v-if", !0),
|
|
4018
|
-
n.value ? (w(),
|
|
4036
|
+
n.value ? (w(), q("div", {
|
|
4019
4037
|
key: 2,
|
|
4020
4038
|
ref_key: "chatMarkdownRef",
|
|
4021
|
-
ref:
|
|
4039
|
+
ref: o,
|
|
4022
4040
|
class: "das-ai-chat-markdown",
|
|
4023
4041
|
innerHTML: n.value
|
|
4024
|
-
}, null, 8,
|
|
4025
|
-
|
|
4026
|
-
|
|
4042
|
+
}, null, 8, Ii)) : T("v-if", !0),
|
|
4043
|
+
u.isNew && !u.item.loading ? (w(), q("div", Ti, [
|
|
4044
|
+
u.isNew ? (w(), X(A(Cu), {
|
|
4027
4045
|
key: 0,
|
|
4028
4046
|
placement: "top",
|
|
4029
4047
|
type: "button"
|
|
@@ -4039,7 +4057,7 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4039
4057
|
]),
|
|
4040
4058
|
default: J(() => [
|
|
4041
4059
|
g("div", {
|
|
4042
|
-
onClick:
|
|
4060
|
+
onClick: p[1] || (p[1] = (b) => C("regenerate")),
|
|
4043
4061
|
class: "chat-opt-box"
|
|
4044
4062
|
}, [
|
|
4045
4063
|
H(A(a0), {
|
|
@@ -4066,7 +4084,7 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4066
4084
|
]),
|
|
4067
4085
|
default: J(() => [
|
|
4068
4086
|
g("div", {
|
|
4069
|
-
onClick:
|
|
4087
|
+
onClick: p[2] || (p[2] = (b) => C("copy")),
|
|
4070
4088
|
class: "chat-opt-box"
|
|
4071
4089
|
}, [
|
|
4072
4090
|
H(A(s0), {
|
|
@@ -4093,15 +4111,15 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4093
4111
|
]),
|
|
4094
4112
|
default: J(() => [
|
|
4095
4113
|
g("div", {
|
|
4096
|
-
onClick:
|
|
4114
|
+
onClick: p[3] || (p[3] = (b) => C("play")),
|
|
4097
4115
|
class: "chat-opt-box"
|
|
4098
4116
|
}, [
|
|
4099
|
-
|
|
4117
|
+
u.item.audioStatus == "normal" ? (w(), X(A(l0), {
|
|
4100
4118
|
key: 0,
|
|
4101
4119
|
size: "medium",
|
|
4102
4120
|
iconColor: "#666666"
|
|
4103
4121
|
})) : T("v-if", !0),
|
|
4104
|
-
|
|
4122
|
+
u.item.audioStatus == "generated" ? (w(), q("div", Mi, [...p[4] || (p[4] = [
|
|
4105
4123
|
g(
|
|
4106
4124
|
"span",
|
|
4107
4125
|
null,
|
|
@@ -4138,8 +4156,8 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4138
4156
|
<span style="width: 1.5px"></span>\r
|
|
4139
4157
|
<span style="width: 1.5px"></span>\r
|
|
4140
4158
|
</div> `),
|
|
4141
|
-
|
|
4142
|
-
g("img", { src: A(
|
|
4159
|
+
u.item.audioStatus == "loading" ? (w(), q("div", Oi, [
|
|
4160
|
+
g("img", { src: A(yi) }, null, 8, Ni)
|
|
4143
4161
|
])) : T("v-if", !0)
|
|
4144
4162
|
])
|
|
4145
4163
|
]),
|
|
@@ -4159,7 +4177,7 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4159
4177
|
</div>\r
|
|
4160
4178
|
</das-tooltip> `)
|
|
4161
4179
|
])) : T("v-if", !0),
|
|
4162
|
-
|
|
4180
|
+
u.item.loading && d.value && !u.item.file.length ? (w(), q("div", Li, [...p[5] || (p[5] = [
|
|
4163
4181
|
g(
|
|
4164
4182
|
"span",
|
|
4165
4183
|
null,
|
|
@@ -4185,26 +4203,26 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4185
4203
|
])
|
|
4186
4204
|
]));
|
|
4187
4205
|
}
|
|
4188
|
-
}),
|
|
4206
|
+
}), qi = /* @__PURE__ */ ou(Ri, [["__scopeId", "data-v-baade754"]]), Pi = { class: "das-ai-chat-container" }, ji = {
|
|
4189
4207
|
name: "chat"
|
|
4190
|
-
},
|
|
4191
|
-
...
|
|
4208
|
+
}, Hi = /* @__PURE__ */ iu({
|
|
4209
|
+
...ji,
|
|
4192
4210
|
props: {
|
|
4193
4211
|
chartList: { default: [] }
|
|
4194
4212
|
},
|
|
4195
4213
|
emits: ["chatEmit"],
|
|
4196
4214
|
setup(u, { emit: e }) {
|
|
4197
|
-
const t = u, n = su(() => t.chartList.filter((
|
|
4215
|
+
const t = u, n = su(() => t.chartList.filter((o) => o.role == "ai")), r = (o) => {
|
|
4198
4216
|
let a = !0;
|
|
4199
|
-
return n.value.length > 1 && (a = n.value[n.value.length - 1].id ==
|
|
4200
|
-
},
|
|
4201
|
-
|
|
4217
|
+
return n.value.length > 1 && (a = n.value[n.value.length - 1].id == o.id), a;
|
|
4218
|
+
}, i = e, c = (o, a) => {
|
|
4219
|
+
i("chatEmit", o, a);
|
|
4202
4220
|
};
|
|
4203
|
-
return (
|
|
4204
|
-
(w(!0),
|
|
4221
|
+
return (o, a) => (w(), q("div", Pi, [
|
|
4222
|
+
(w(!0), q(
|
|
4205
4223
|
Nu,
|
|
4206
4224
|
null,
|
|
4207
|
-
Qu(
|
|
4225
|
+
Qu(u.chartList, (s) => (w(), q(
|
|
4208
4226
|
Nu,
|
|
4209
4227
|
{
|
|
4210
4228
|
key: s.id
|
|
@@ -4214,7 +4232,7 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4214
4232
|
key: 0,
|
|
4215
4233
|
item: s
|
|
4216
4234
|
}, null, 8, ["item"])) : T("v-if", !0),
|
|
4217
|
-
s.role == "ai" ? (w(), X(
|
|
4235
|
+
s.role == "ai" ? (w(), X(qi, {
|
|
4218
4236
|
key: 1,
|
|
4219
4237
|
onAiChatEmit: c,
|
|
4220
4238
|
isNew: r(s),
|
|
@@ -4229,29 +4247,29 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4229
4247
|
))
|
|
4230
4248
|
]));
|
|
4231
4249
|
}
|
|
4232
|
-
}),
|
|
4250
|
+
}), $i = /* @__PURE__ */ ou(Hi, [["__scopeId", "data-v-06f04cf8"]]), Vi = { class: "das-ai-senderopt" }, Ui = { class: "int-opt-box-text" }, Zi = {
|
|
4233
4251
|
name: "senderOpt"
|
|
4234
|
-
},
|
|
4235
|
-
...
|
|
4252
|
+
}, Gi = /* @__PURE__ */ iu({
|
|
4253
|
+
...Zi,
|
|
4236
4254
|
setup(u) {
|
|
4237
4255
|
const e = () => {
|
|
4238
|
-
|
|
4256
|
+
m.deepseek = !m.deepseek, gt();
|
|
4239
4257
|
};
|
|
4240
|
-
return (t, n) => (w(),
|
|
4258
|
+
return (t, n) => (w(), q("div", Vi, [
|
|
4241
4259
|
g(
|
|
4242
4260
|
"div",
|
|
4243
4261
|
{
|
|
4244
|
-
class: Ju(["int-opt-box", { actived: A(
|
|
4262
|
+
class: Ju(["int-opt-box", { actived: A(m).deepseek }]),
|
|
4245
4263
|
onClick: e
|
|
4246
4264
|
},
|
|
4247
4265
|
[
|
|
4248
4266
|
H(A(f0), {
|
|
4249
4267
|
size: "medium",
|
|
4250
|
-
iconColor: A(
|
|
4268
|
+
iconColor: A(m).deepseek ? "#5582F3" : "#212121"
|
|
4251
4269
|
}, null, 8, ["iconColor"]),
|
|
4252
4270
|
g(
|
|
4253
4271
|
"span",
|
|
4254
|
-
|
|
4272
|
+
Ui,
|
|
4255
4273
|
V(A(I)("深度思考")),
|
|
4256
4274
|
1
|
|
4257
4275
|
/* TEXT */
|
|
@@ -4262,31 +4280,31 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4262
4280
|
)
|
|
4263
4281
|
]));
|
|
4264
4282
|
}
|
|
4265
|
-
}),
|
|
4283
|
+
}), Ki = /* @__PURE__ */ ou(Gi, [["__scopeId", "data-v-888bb15e"]]), Ji = { class: "das-ai-sender-container" }, Qi = { class: "das-ai-sender-content" }, Wi = { class: "das-ai-sender-box" }, Xi = { class: "das-ai-int-scoll-box" }, Yi = { class: "das-ai-int-box" }, uo = ["placeholder", "disabled"], eo = { class: "das-ai-textarea-mask" }, to = { class: "das-ai-int-opt-box" }, no = { class: "int-opt-right" }, ro = {
|
|
4266
4284
|
name: "sender"
|
|
4267
|
-
},
|
|
4268
|
-
...
|
|
4285
|
+
}, io = /* @__PURE__ */ iu({
|
|
4286
|
+
...ro,
|
|
4269
4287
|
props: {
|
|
4270
4288
|
isNew: { type: Boolean, default: !0 }
|
|
4271
4289
|
},
|
|
4272
4290
|
emits: ["senderEmit"],
|
|
4273
4291
|
setup(u, { emit: e }) {
|
|
4274
|
-
const t = u, n = e, r = M(null),
|
|
4275
|
-
if (
|
|
4292
|
+
const t = u, n = e, r = M(null), i = su(() => !m.senderValue), c = su(() => {
|
|
4293
|
+
if (m.loading)
|
|
4276
4294
|
return I("回答中...");
|
|
4277
4295
|
if (t.isNew) {
|
|
4278
|
-
if (
|
|
4279
|
-
if (
|
|
4280
|
-
if (
|
|
4296
|
+
if (m.searchType == "0") return I("基于物联应用提问");
|
|
4297
|
+
if (m.searchType == "1") return I("基于知识库提问");
|
|
4298
|
+
if (m.searchType == "2") return I("基于全网提问");
|
|
4281
4299
|
} else
|
|
4282
4300
|
return I("继续提问");
|
|
4283
|
-
}),
|
|
4301
|
+
}), o = () => {
|
|
4284
4302
|
var h;
|
|
4285
4303
|
(h = r.value) == null || h.focus();
|
|
4286
4304
|
}, a = (h) => {
|
|
4287
4305
|
};
|
|
4288
4306
|
bu(
|
|
4289
|
-
() =>
|
|
4307
|
+
() => m.senderValue,
|
|
4290
4308
|
(h) => {
|
|
4291
4309
|
!h && r.value && (r.value.style.height = "21px");
|
|
4292
4310
|
}
|
|
@@ -4296,23 +4314,23 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4296
4314
|
d.style.height = "auto", d.style.height = d.scrollHeight + "px";
|
|
4297
4315
|
}, l = () => {
|
|
4298
4316
|
}, f = (h) => {
|
|
4299
|
-
h.preventDefault(), !(
|
|
4300
|
-
},
|
|
4317
|
+
h.preventDefault(), !(m.senderValue && !m.senderValue.trim()) && (n("senderEmit", "sender", m.senderValue), m.senderValue = "");
|
|
4318
|
+
}, x = () => {
|
|
4301
4319
|
n("senderEmit", "stopMsg");
|
|
4302
4320
|
};
|
|
4303
|
-
return (h, d) => (w(),
|
|
4304
|
-
g("div",
|
|
4321
|
+
return (h, d) => (w(), q("div", Ji, [
|
|
4322
|
+
g("div", Qi, [
|
|
4305
4323
|
g("div", {
|
|
4306
|
-
onClick:
|
|
4324
|
+
onClick: o,
|
|
4307
4325
|
class: "focus-mask-top"
|
|
4308
4326
|
}),
|
|
4309
|
-
g("div",
|
|
4310
|
-
g("div",
|
|
4311
|
-
g("div",
|
|
4327
|
+
g("div", Wi, [
|
|
4328
|
+
g("div", Xi, [
|
|
4329
|
+
g("div", Yi, [
|
|
4312
4330
|
yu(g("textarea", {
|
|
4313
4331
|
class: "das-ai-textarea",
|
|
4314
4332
|
onKeydown: Jt(f, ["enter"]),
|
|
4315
|
-
"onUpdate:modelValue": d[0] || (d[0] = (y) => A(
|
|
4333
|
+
"onUpdate:modelValue": d[0] || (d[0] = (y) => A(m).senderValue = y),
|
|
4316
4334
|
placeholder: c.value,
|
|
4317
4335
|
rows: "8",
|
|
4318
4336
|
maxlength: "512",
|
|
@@ -4321,45 +4339,45 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4321
4339
|
onFocus: l,
|
|
4322
4340
|
onInput: s,
|
|
4323
4341
|
onChange: a,
|
|
4324
|
-
disabled: A(
|
|
4325
|
-
}, null, 40,
|
|
4326
|
-
[Qt, A(
|
|
4342
|
+
disabled: A(m).loading
|
|
4343
|
+
}, null, 40, uo), [
|
|
4344
|
+
[Qt, A(m).senderValue]
|
|
4327
4345
|
]),
|
|
4328
4346
|
g(
|
|
4329
4347
|
"div",
|
|
4330
|
-
|
|
4331
|
-
V(A(
|
|
4348
|
+
eo,
|
|
4349
|
+
V(A(m).senderValue),
|
|
4332
4350
|
1
|
|
4333
4351
|
/* TEXT */
|
|
4334
4352
|
)
|
|
4335
4353
|
])
|
|
4336
4354
|
]),
|
|
4337
|
-
g("div",
|
|
4355
|
+
g("div", to, [
|
|
4338
4356
|
g("div", {
|
|
4339
|
-
onClick:
|
|
4357
|
+
onClick: o,
|
|
4340
4358
|
class: "focus-mask-bottom"
|
|
4341
4359
|
}),
|
|
4342
|
-
H(
|
|
4343
|
-
g("div",
|
|
4344
|
-
A(
|
|
4360
|
+
H(Ki),
|
|
4361
|
+
g("div", no, [
|
|
4362
|
+
A(m).loading ? T("v-if", !0) : (w(), q(
|
|
4345
4363
|
"div",
|
|
4346
4364
|
{
|
|
4347
4365
|
key: 0,
|
|
4348
4366
|
onClick: f,
|
|
4349
|
-
class: Ju(["int-opt-right-icon", { disabled:
|
|
4367
|
+
class: Ju(["int-opt-right-icon", { disabled: i.value }])
|
|
4350
4368
|
},
|
|
4351
4369
|
[
|
|
4352
4370
|
H(A(d0), {
|
|
4353
4371
|
customSize: "12px",
|
|
4354
|
-
iconColor:
|
|
4372
|
+
iconColor: i.value ? "#fafafa" : "#fff"
|
|
4355
4373
|
}, null, 8, ["iconColor"])
|
|
4356
4374
|
],
|
|
4357
4375
|
2
|
|
4358
4376
|
/* CLASS */
|
|
4359
4377
|
)),
|
|
4360
|
-
A(
|
|
4378
|
+
A(m).loading ? (w(), q("div", {
|
|
4361
4379
|
key: 1,
|
|
4362
|
-
onClick: Fe(
|
|
4380
|
+
onClick: Fe(x, ["stop"]),
|
|
4363
4381
|
class: "loading-btn"
|
|
4364
4382
|
}, [
|
|
4365
4383
|
T(' <das-spin type="component"> </das-spin> '),
|
|
@@ -4377,22 +4395,22 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4377
4395
|
])
|
|
4378
4396
|
]));
|
|
4379
4397
|
}
|
|
4380
|
-
}),
|
|
4398
|
+
}), oo = /* @__PURE__ */ ou(io, [["__scopeId", "data-v-d92771fb"]]), co = { class: "das-ai-addtbn-box" }, ao = {
|
|
4381
4399
|
style: { "margin-left": "4px" },
|
|
4382
4400
|
class: "add-text"
|
|
4383
|
-
},
|
|
4401
|
+
}, so = {
|
|
4384
4402
|
name: "addNew"
|
|
4385
|
-
},
|
|
4386
|
-
...
|
|
4403
|
+
}, lo = /* @__PURE__ */ iu({
|
|
4404
|
+
...so,
|
|
4387
4405
|
emits: ["addNewEmit"],
|
|
4388
4406
|
setup(u, { emit: e }) {
|
|
4389
4407
|
const t = e, n = (r) => {
|
|
4390
4408
|
t("addNewEmit", r);
|
|
4391
4409
|
};
|
|
4392
|
-
return (r,
|
|
4410
|
+
return (r, i) => (w(), q("div", co, [
|
|
4393
4411
|
g("div", {
|
|
4394
4412
|
class: "add-box",
|
|
4395
|
-
onClick:
|
|
4413
|
+
onClick: i[0] || (i[0] = (c) => n("addNew"))
|
|
4396
4414
|
}, [
|
|
4397
4415
|
H(A(p0), {
|
|
4398
4416
|
size: "medium",
|
|
@@ -4400,16 +4418,16 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4400
4418
|
}),
|
|
4401
4419
|
g(
|
|
4402
4420
|
"span",
|
|
4403
|
-
|
|
4421
|
+
ao,
|
|
4404
4422
|
V(A(I)("开启新对话")),
|
|
4405
4423
|
1
|
|
4406
4424
|
/* TEXT */
|
|
4407
4425
|
)
|
|
4408
4426
|
]),
|
|
4409
|
-
A(
|
|
4427
|
+
A(m).showScrollBom ? (w(), q("div", {
|
|
4410
4428
|
key: 0,
|
|
4411
4429
|
class: "scroll-opt-box",
|
|
4412
|
-
onClick:
|
|
4430
|
+
onClick: i[1] || (i[1] = (c) => n("scrollBom"))
|
|
4413
4431
|
}, [
|
|
4414
4432
|
H(A(h0), {
|
|
4415
4433
|
size: "large",
|
|
@@ -4418,13 +4436,13 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4418
4436
|
])) : T("v-if", !0)
|
|
4419
4437
|
]));
|
|
4420
4438
|
}
|
|
4421
|
-
}),
|
|
4439
|
+
}), fo = /* @__PURE__ */ ou(lo, [["__scopeId", "data-v-c94020e2"]]), ho = { class: "das-ai-prompt" }, po = { class: "das-ai-prompt-title" }, bo = { class: "das-ai-prompt-tip" }, mo = {
|
|
4422
4440
|
key: 0,
|
|
4423
4441
|
class: "das-ai-prompt-small"
|
|
4424
|
-
},
|
|
4442
|
+
}, xo = ["onClick"], _o = {
|
|
4425
4443
|
name: "useChat"
|
|
4426
|
-
},
|
|
4427
|
-
...
|
|
4444
|
+
}, go = /* @__PURE__ */ iu({
|
|
4445
|
+
..._o,
|
|
4428
4446
|
props: {
|
|
4429
4447
|
list: { default: [] }
|
|
4430
4448
|
},
|
|
@@ -4433,62 +4451,62 @@ const Ao = "data:image/gif;base64,R0lGODlhZABkAIABAABt8QAAACH/C05FVFNDQVBFMi4wAw
|
|
|
4433
4451
|
const t = e, n = (r) => {
|
|
4434
4452
|
t("click", r);
|
|
4435
4453
|
};
|
|
4436
|
-
return
|
|
4437
|
-
}), (r,
|
|
4454
|
+
return Ru(() => {
|
|
4455
|
+
}), (r, i) => (w(), q("div", ho, [
|
|
4438
4456
|
g(
|
|
4439
4457
|
"div",
|
|
4440
|
-
|
|
4458
|
+
po,
|
|
4441
4459
|
V(A(I)("嗨!我是AI助手")),
|
|
4442
4460
|
1
|
|
4443
4461
|
/* TEXT */
|
|
4444
4462
|
),
|
|
4445
4463
|
g(
|
|
4446
4464
|
"div",
|
|
4447
|
-
|
|
4465
|
+
bo,
|
|
4448
4466
|
V(A(I)("我可以帮你分析,写报告,调节设备,预订会议室,请把你的任务交给我吧~")),
|
|
4449
4467
|
1
|
|
4450
4468
|
/* TEXT */
|
|
4451
4469
|
),
|
|
4452
|
-
|
|
4470
|
+
u.list.length ? (w(), q(
|
|
4453
4471
|
"div",
|
|
4454
|
-
|
|
4472
|
+
mo,
|
|
4455
4473
|
V(A(I)("你可以这样说")),
|
|
4456
4474
|
1
|
|
4457
4475
|
/* TEXT */
|
|
4458
4476
|
)) : T("v-if", !0),
|
|
4459
|
-
(w(!0),
|
|
4477
|
+
(w(!0), q(
|
|
4460
4478
|
Nu,
|
|
4461
4479
|
null,
|
|
4462
|
-
Qu(
|
|
4463
|
-
onClick: (
|
|
4480
|
+
Qu(u.list, (c) => (w(), q("div", {
|
|
4481
|
+
onClick: (o) => n(c),
|
|
4464
4482
|
class: "das-ai-prompt-item"
|
|
4465
|
-
}, V(c.text), 9,
|
|
4483
|
+
}, V(c.text), 9, xo))),
|
|
4466
4484
|
256
|
|
4467
4485
|
/* UNKEYED_FRAGMENT */
|
|
4468
4486
|
))
|
|
4469
4487
|
]));
|
|
4470
4488
|
}
|
|
4471
|
-
}),
|
|
4489
|
+
}), ko = /* @__PURE__ */ ou(go, [["__scopeId", "data-v-9820bbca"]]), Zt = "v1", Fu = mt(`/api/llm/knowledge/${Zt}`), vo = mt(`/api/llm/vector/${Zt}`);
|
|
4472
4490
|
xt.get("token");
|
|
4473
4491
|
xt.post("putObject");
|
|
4474
|
-
const
|
|
4475
|
-
|
|
4476
|
-
const La =
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
const
|
|
4492
|
+
const yo = vo.get("/large-model/general-question"), Ao = Fu.post("/chat/stop"), Co = Fu.post("/chat/save-knowledge"), Do = Fu.get("/chat"), Eo = Fu.get("/chat/chat-details"), Fo = Fu.delete("/chat/delete-by-user"), wo = Fu.delete("/chat"), So = Fu.get("/chat/delete-by-query-id");
|
|
4493
|
+
qu.post("/file");
|
|
4494
|
+
const La = qu.post("/file/save-file"), zo = qu.get("/folder"), Io = qu.post("/folder/listAllByCondition");
|
|
4495
|
+
qu.post("/folder/lazy-tree");
|
|
4496
|
+
qu.post("/folder/tree-search");
|
|
4497
|
+
const To = { class: "das-ai-select-container" }, Mo = { class: "das-ai-select-text-box" }, Oo = { class: "das-ai-select-text" }, No = { class: "das-ai-select-box" }, Lo = {
|
|
4480
4498
|
key: 0,
|
|
4481
4499
|
class: "das-ai-select-text"
|
|
4482
|
-
},
|
|
4500
|
+
}, Bo = { class: "das-ai-type-list" }, Ro = ["onClick"], qo = { class: "das-ai-type-icon" }, Po = { class: "das-ai-type-box" }, jo = { class: "das-ai-type-name" }, Ho = { class: "das-ai-type-desc" }, $o = ["onClick"], Vo = { class: "das-ai-type-tree" }, Uo = {
|
|
4483
4501
|
name: "selectType"
|
|
4484
|
-
},
|
|
4485
|
-
...
|
|
4502
|
+
}, Zo = /* @__PURE__ */ iu({
|
|
4503
|
+
...Uo,
|
|
4486
4504
|
props: {
|
|
4487
4505
|
listLength: { default: 0 }
|
|
4488
4506
|
},
|
|
4489
4507
|
emits: ["back"],
|
|
4490
4508
|
setup(u, { emit: e }) {
|
|
4491
|
-
const t = M(!1), n = M(!1), r = M(!1),
|
|
4509
|
+
const t = M(!1), n = M(!1), r = M(!1), i = M({
|
|
4492
4510
|
modifiers: [
|
|
4493
4511
|
{
|
|
4494
4512
|
name: "offset",
|
|
@@ -4501,61 +4519,61 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4501
4519
|
{ id: "1", name: I("知识库"), desc: I("选择在某个知识库中搜索"), icon: "knowOpen" },
|
|
4502
4520
|
{ id: "0", name: I("物联应用"), desc: I("在权限范围内的应用中搜索"), icon: "yingyong" },
|
|
4503
4521
|
{ id: "2", name: I("全网"), desc: I("在整个大模型中搜索"), icon: "intnet" }
|
|
4504
|
-
]),
|
|
4522
|
+
]), o = M(!1), a = M([]), s = M(""), l = M(""), f = e, x = () => {
|
|
4505
4523
|
f("back");
|
|
4506
|
-
}, h = su(() => c.value.find((
|
|
4507
|
-
}, C = (
|
|
4524
|
+
}, h = su(() => c.value.find((F) => F.id === m.searchType)), d = su(() => m.searchType == "1" ? I("基于知识库") : m.searchType == "0" ? I("基于物联应用") : m.searchType == "2" ? I("基于全网") : I("基于全部")), y = su(() => m.folderId && m.folderName ? m.folderName : I("选择在某个知识库中搜索")), v = (F) => {
|
|
4525
|
+
}, C = (F) => {
|
|
4508
4526
|
r.value = !1;
|
|
4509
|
-
}, k = (
|
|
4510
|
-
l.value =
|
|
4511
|
-
},
|
|
4512
|
-
|
|
4513
|
-
},
|
|
4514
|
-
|
|
4515
|
-
},
|
|
4516
|
-
const
|
|
4527
|
+
}, k = (F) => {
|
|
4528
|
+
l.value = F.id, m.folderId = F.id == m.allKnowId ? "" : F.id, m.folderName = m.folderId ? F.folderName : "", r.value = !1, n.value = !1;
|
|
4529
|
+
}, _ = (F) => {
|
|
4530
|
+
m.searchType = F.id, Vu(), l.value = m.folderId ? m.folderId : m.allKnowId, r.value = !0, b();
|
|
4531
|
+
}, p = async (F) => {
|
|
4532
|
+
m.searchType = F.id, n.value = !1, Vu();
|
|
4533
|
+
}, b = async () => {
|
|
4534
|
+
const F = {
|
|
4517
4535
|
folderName: "",
|
|
4518
4536
|
// 文件夹名称
|
|
4519
4537
|
// authority:true,//权限标识 true:有 false:无
|
|
4520
4538
|
excludeType: !0
|
|
4521
4539
|
// 是否排除内置文件夹 默认不排除
|
|
4522
4540
|
};
|
|
4523
|
-
|
|
4524
|
-
const [P, j] = await
|
|
4525
|
-
if (
|
|
4541
|
+
o.value = !0;
|
|
4542
|
+
const [P, j] = await Io(F).run();
|
|
4543
|
+
if (o.value = !1, P)
|
|
4526
4544
|
return;
|
|
4527
4545
|
let K = j;
|
|
4528
4546
|
K && K.length ? (K = [
|
|
4529
4547
|
{
|
|
4530
4548
|
disabled: !1,
|
|
4531
4549
|
authority: !0,
|
|
4532
|
-
id:
|
|
4550
|
+
id: m.allKnowId,
|
|
4533
4551
|
folderName: I("全部"),
|
|
4534
4552
|
childFolderList: j,
|
|
4535
|
-
folderPath:
|
|
4553
|
+
folderPath: m.allKnowId,
|
|
4536
4554
|
pathName: I("全部")
|
|
4537
4555
|
}
|
|
4538
4556
|
], K.forEach((du) => {
|
|
4539
4557
|
O(du);
|
|
4540
|
-
})) : (l.value = "",
|
|
4541
|
-
}, O = (
|
|
4542
|
-
|
|
4543
|
-
O(K,
|
|
4558
|
+
})) : (l.value = "", m.folderId = "", m.folderName = ""), a.value = K;
|
|
4559
|
+
}, O = (F, P, j) => {
|
|
4560
|
+
F.disabled = !F.authority, F.path = P ? P + `/${F.id}` : F.id, F.pathName = j ? j + `/${F.folderName}` : F.folderName, m.folderId && m.folderId == F.id && !F.authority && (m.folderId = "", m.folderName = "", l.value = ""), F.childFolderList && F.childFolderList.length && F.childFolderList.forEach((K) => {
|
|
4561
|
+
O(K, F.path, F.pathName);
|
|
4544
4562
|
});
|
|
4545
4563
|
};
|
|
4546
|
-
return (
|
|
4564
|
+
return (F, P) => (w(), q("div", To, [
|
|
4547
4565
|
yu(g(
|
|
4548
4566
|
"div",
|
|
4549
|
-
|
|
4567
|
+
Mo,
|
|
4550
4568
|
[
|
|
4551
4569
|
H(A(Se), {
|
|
4552
|
-
onClick:
|
|
4570
|
+
onClick: x,
|
|
4553
4571
|
size: "large",
|
|
4554
4572
|
iconColor: "#666666"
|
|
4555
4573
|
}),
|
|
4556
4574
|
g(
|
|
4557
4575
|
"div",
|
|
4558
|
-
|
|
4576
|
+
Oo,
|
|
4559
4577
|
V(d.value),
|
|
4560
4578
|
1
|
|
4561
4579
|
/* TEXT */
|
|
@@ -4564,11 +4582,11 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4564
4582
|
512
|
|
4565
4583
|
/* NEED_PATCH */
|
|
4566
4584
|
), [
|
|
4567
|
-
[Hu,
|
|
4585
|
+
[Hu, u.listLength]
|
|
4568
4586
|
]),
|
|
4569
4587
|
H(A(m0), {
|
|
4570
4588
|
popperClass: "das-ai-select-popover",
|
|
4571
|
-
"popper-options":
|
|
4589
|
+
"popper-options": i.value,
|
|
4572
4590
|
"show-arrow": !1,
|
|
4573
4591
|
width: 428,
|
|
4574
4592
|
trigger: "click",
|
|
@@ -4581,12 +4599,12 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4581
4599
|
reference: J(() => [
|
|
4582
4600
|
yu(g(
|
|
4583
4601
|
"div",
|
|
4584
|
-
|
|
4602
|
+
No,
|
|
4585
4603
|
[
|
|
4586
4604
|
T(' <DasIcon v-if="currentItem" :icon="currentItem.icon" size="medium" iconColor="inherit"></DasIcon> '),
|
|
4587
|
-
h.value ? (w(),
|
|
4605
|
+
h.value ? (w(), q(
|
|
4588
4606
|
"span",
|
|
4589
|
-
|
|
4607
|
+
Lo,
|
|
4590
4608
|
V(h.value.name),
|
|
4591
4609
|
1
|
|
4592
4610
|
/* TEXT */
|
|
@@ -4605,55 +4623,55 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4605
4623
|
512
|
|
4606
4624
|
/* NEED_PATCH */
|
|
4607
4625
|
), [
|
|
4608
|
-
[Hu, !
|
|
4626
|
+
[Hu, !u.listLength]
|
|
4609
4627
|
])
|
|
4610
4628
|
]),
|
|
4611
4629
|
default: J(() => [
|
|
4612
4630
|
yu(g(
|
|
4613
4631
|
"div",
|
|
4614
|
-
|
|
4632
|
+
Bo,
|
|
4615
4633
|
[
|
|
4616
|
-
(w(!0),
|
|
4634
|
+
(w(!0), q(
|
|
4617
4635
|
Nu,
|
|
4618
4636
|
null,
|
|
4619
|
-
Qu(c.value, (j) => (w(),
|
|
4620
|
-
onClick: (K) =>
|
|
4621
|
-
class: Ju(["das-ai-type-item", { selected: A(
|
|
4637
|
+
Qu(c.value, (j) => (w(), q("div", {
|
|
4638
|
+
onClick: (K) => p(j),
|
|
4639
|
+
class: Ju(["das-ai-type-item", { selected: A(m).searchType == j.id }])
|
|
4622
4640
|
}, [
|
|
4623
|
-
g("div",
|
|
4624
|
-
A(
|
|
4641
|
+
g("div", qo, [
|
|
4642
|
+
A(m).searchType == j.id ? (w(), X(A(b0), {
|
|
4625
4643
|
key: 0,
|
|
4626
4644
|
customSize: "18px",
|
|
4627
4645
|
iconColor: "#FFFFFF"
|
|
4628
4646
|
})) : T("v-if", !0)
|
|
4629
4647
|
]),
|
|
4630
|
-
g("div",
|
|
4648
|
+
g("div", Po, [
|
|
4631
4649
|
g(
|
|
4632
4650
|
"div",
|
|
4633
|
-
|
|
4651
|
+
jo,
|
|
4634
4652
|
V(j.name),
|
|
4635
4653
|
1
|
|
4636
4654
|
/* TEXT */
|
|
4637
4655
|
),
|
|
4638
4656
|
g(
|
|
4639
4657
|
"div",
|
|
4640
|
-
|
|
4658
|
+
Ho,
|
|
4641
4659
|
V(j.id == 1 ? y.value : j.desc),
|
|
4642
4660
|
1
|
|
4643
4661
|
/* TEXT */
|
|
4644
4662
|
)
|
|
4645
4663
|
]),
|
|
4646
|
-
j.id == "1" ? (w(),
|
|
4664
|
+
j.id == "1" ? (w(), q("div", {
|
|
4647
4665
|
key: 0,
|
|
4648
|
-
onClick: Fe((K) =>
|
|
4666
|
+
onClick: Fe((K) => _(j), ["stop"]),
|
|
4649
4667
|
class: "know-entry"
|
|
4650
4668
|
}, [
|
|
4651
4669
|
H(A(ft), {
|
|
4652
4670
|
customSize: "18px",
|
|
4653
4671
|
iconColor: "#666666"
|
|
4654
4672
|
})
|
|
4655
|
-
], 8, $
|
|
4656
|
-
], 10,
|
|
4673
|
+
], 8, $o)) : T("v-if", !0)
|
|
4674
|
+
], 10, Ro))),
|
|
4657
4675
|
256
|
|
4658
4676
|
/* UNKEYED_FRAGMENT */
|
|
4659
4677
|
))
|
|
@@ -4663,7 +4681,7 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4663
4681
|
), [
|
|
4664
4682
|
[Hu, !r.value]
|
|
4665
4683
|
]),
|
|
4666
|
-
yu((w(),
|
|
4684
|
+
yu((w(), q("div", Vo, [
|
|
4667
4685
|
H(A(x0), {
|
|
4668
4686
|
ref: "folderTreeRef",
|
|
4669
4687
|
data: a.value,
|
|
@@ -4679,7 +4697,7 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4679
4697
|
onNodeClick: k
|
|
4680
4698
|
}, null, 8, ["data", "inputOptions", "modelValue", "filter-value"])
|
|
4681
4699
|
])), [
|
|
4682
|
-
[A(bt),
|
|
4700
|
+
[A(bt), o.value],
|
|
4683
4701
|
[Hu, r.value]
|
|
4684
4702
|
])
|
|
4685
4703
|
]),
|
|
@@ -4688,12 +4706,12 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4688
4706
|
}, 8, ["popper-options", "visible", "disabled"])
|
|
4689
4707
|
]));
|
|
4690
4708
|
}
|
|
4691
|
-
}),
|
|
4709
|
+
}), Go = /* @__PURE__ */ ou(Zo, [["__scopeId", "data-v-f508fe5b"]]), Ko = { class: "das-ai-reference-content-page" }, Jo = { class: "reference-header" }, Qo = { style: { "margin-left": "16px" } }, Wo = { class: "reference-list" }, Xo = { class: "reference-file-scroll" }, Yo = ["onClick"], uc = { class: "reference-file-title" }, ec = { style: { "margin-right": "4px" } }, tc = {
|
|
4692
4710
|
class: "reference-file-title-text",
|
|
4693
4711
|
style: { "margin-left": "4px" }
|
|
4694
4712
|
}, nc = { class: "reference-file-summary" }, rc = {
|
|
4695
4713
|
name: "referenceContent"
|
|
4696
|
-
},
|
|
4714
|
+
}, ic = /* @__PURE__ */ iu({
|
|
4697
4715
|
...rc,
|
|
4698
4716
|
props: {
|
|
4699
4717
|
item: { default: {} }
|
|
@@ -4702,45 +4720,45 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4702
4720
|
setup(u, { emit: e }) {
|
|
4703
4721
|
const t = e;
|
|
4704
4722
|
M();
|
|
4705
|
-
const n = M(-1), r = M([]),
|
|
4723
|
+
const n = M(-1), r = M([]), i = () => {
|
|
4706
4724
|
t("back");
|
|
4707
4725
|
};
|
|
4708
|
-
|
|
4726
|
+
Ru(() => {
|
|
4709
4727
|
});
|
|
4710
4728
|
const c = (a) => {
|
|
4711
4729
|
const s = `${st().baseURL}/oss/`;
|
|
4712
4730
|
return a.includes(s);
|
|
4713
|
-
},
|
|
4731
|
+
}, o = (a, s) => {
|
|
4714
4732
|
if (n.value = s, r.value.includes(s) || r.value.push(s), a.type == "url") {
|
|
4715
4733
|
a.webUrl && t("toApp", a.webUrl);
|
|
4716
4734
|
return;
|
|
4717
4735
|
}
|
|
4718
4736
|
c(a.url) ? t("preview", a.url) : window.open(a.url, "_blank");
|
|
4719
4737
|
};
|
|
4720
|
-
return (a, s) => (w(),
|
|
4721
|
-
g("div",
|
|
4738
|
+
return (a, s) => (w(), q("div", Ko, [
|
|
4739
|
+
g("div", Jo, [
|
|
4722
4740
|
H(A(Se), {
|
|
4723
|
-
onClick:
|
|
4741
|
+
onClick: i,
|
|
4724
4742
|
size: "large",
|
|
4725
4743
|
iconColor: "#666666"
|
|
4726
4744
|
}),
|
|
4727
4745
|
g(
|
|
4728
4746
|
"span",
|
|
4729
|
-
|
|
4730
|
-
V(A(I)("参考内容(共$0条)",
|
|
4747
|
+
Qo,
|
|
4748
|
+
V(A(I)("参考内容(共$0条)", u.item.file.length)),
|
|
4731
4749
|
1
|
|
4732
4750
|
/* TEXT */
|
|
4733
4751
|
)
|
|
4734
4752
|
]),
|
|
4735
|
-
g("div",
|
|
4753
|
+
g("div", Wo, [
|
|
4736
4754
|
H(A(we), null, {
|
|
4737
4755
|
default: J(() => [
|
|
4738
|
-
g("div",
|
|
4739
|
-
(w(!0),
|
|
4756
|
+
g("div", Xo, [
|
|
4757
|
+
(w(!0), q(
|
|
4740
4758
|
Nu,
|
|
4741
4759
|
null,
|
|
4742
|
-
Qu(
|
|
4743
|
-
onClick: (
|
|
4760
|
+
Qu(u.item.file, (l, f) => (w(), q("div", {
|
|
4761
|
+
onClick: (x) => o(l, f),
|
|
4744
4762
|
class: Ju(["reference-file-item", { current: n.value == f, selected: r.value.includes(f) }])
|
|
4745
4763
|
}, [
|
|
4746
4764
|
T(" v-das-tooltip "),
|
|
@@ -4772,7 +4790,7 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4772
4790
|
1
|
|
4773
4791
|
/* TEXT */
|
|
4774
4792
|
)
|
|
4775
|
-
], 10,
|
|
4793
|
+
], 10, Yo))),
|
|
4776
4794
|
256
|
|
4777
4795
|
/* UNKEYED_FRAGMENT */
|
|
4778
4796
|
))
|
|
@@ -4784,11 +4802,11 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4784
4802
|
])
|
|
4785
4803
|
]));
|
|
4786
4804
|
}
|
|
4787
|
-
}),
|
|
4805
|
+
}), oc = /* @__PURE__ */ ou(ic, [["__scopeId", "data-v-48ac5af8"]]), cc = it(() => import("./index-DCyDBdoc.js")), ac = () => {
|
|
4788
4806
|
const u = M(null), e = M(!1);
|
|
4789
4807
|
let t = "", n = "";
|
|
4790
4808
|
return {
|
|
4791
|
-
deletaDialogVue: () =>
|
|
4809
|
+
deletaDialogVue: () => ot(cc, {
|
|
4792
4810
|
ref: u,
|
|
4793
4811
|
onConfirm: (c) => {
|
|
4794
4812
|
n = !0, e.value = !1;
|
|
@@ -4801,8 +4819,8 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4801
4819
|
}
|
|
4802
4820
|
}),
|
|
4803
4821
|
showDeleteDialog: async (c) => {
|
|
4804
|
-
var
|
|
4805
|
-
return t = c || I("删除后将无法恢复"), (
|
|
4822
|
+
var o;
|
|
4823
|
+
return t = c || I("删除后将无法恢复"), (o = u.value) == null || o.open(t), e.value = !0, new Promise((a, s) => {
|
|
4806
4824
|
const l = bu(() => e.value, (f) => {
|
|
4807
4825
|
n ? a(n) : s(n), l();
|
|
4808
4826
|
});
|
|
@@ -4818,57 +4836,57 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4818
4836
|
class: "history-dialogue-scroll"
|
|
4819
4837
|
}, bc = ["onClick"], mc = { class: "item-title" }, xc = { class: "item-bottom" }, _c = { class: "item-bottom-left" }, gc = { class: "item-type" }, kc = {
|
|
4820
4838
|
name: "history"
|
|
4821
|
-
}, vc = /* @__PURE__ */
|
|
4839
|
+
}, vc = /* @__PURE__ */ iu({
|
|
4822
4840
|
...kc,
|
|
4823
4841
|
props: {
|
|
4824
4842
|
chatId: { default: "" }
|
|
4825
4843
|
},
|
|
4826
4844
|
emits: ["back", "record"],
|
|
4827
4845
|
setup(u, { emit: e }) {
|
|
4828
|
-
const t = M(!1), { deletaDialogVue: n, showDeleteDialog: r } = ac(),
|
|
4846
|
+
const t = M(!1), { deletaDialogVue: n, showDeleteDialog: r } = ac(), i = M([]), c = e, o = () => {
|
|
4829
4847
|
c("back");
|
|
4830
4848
|
}, a = (k) => {
|
|
4831
|
-
let
|
|
4832
|
-
return
|
|
4849
|
+
let _ = k.replace(/^(#+)\s/gm, "");
|
|
4850
|
+
return _ = _.replace(/^([-*+]|\d+\.)\s/gm, ""), _ = _.replace(/([*_]{1,2})(.*?)\1/g, "$2"), _ = _.replace(/```[\s\S]*?```/g, ""), _ = _.replace(/`(.*?)`/g, "$1"), _ = _.replace(/\[([^\]]+)\]\([^)]+\)/g, "$1"), _ = _.replace(/!\[([^\]]+)\]\([^)]+\)/g, "$1"), _ = _.replace(/<[^>]*>/g, ""), _;
|
|
4833
4851
|
}, s = (k) => {
|
|
4834
|
-
const
|
|
4835
|
-
|
|
4836
|
-
}, l = M(1), f = M(1),
|
|
4852
|
+
const _ = document.querySelector("#history-dialogue-scrollbox .das-ai-wrap-class");
|
|
4853
|
+
_.scrollHeight - _.clientHeight - k.scrollTop <= 20 && !t.value && l.value < f.value && (l.value = l.value + 1, h());
|
|
4854
|
+
}, l = M(1), f = M(1), x = M(20), h = async () => {
|
|
4837
4855
|
t.value = !0;
|
|
4838
4856
|
const k = {
|
|
4839
4857
|
pageIndex: l.value,
|
|
4840
|
-
pageSize:
|
|
4841
|
-
}, [
|
|
4842
|
-
t.value = !1, !
|
|
4843
|
-
|
|
4844
|
-
}), l.value == 1 ?
|
|
4858
|
+
pageSize: x.value
|
|
4859
|
+
}, [_, p] = await Do(k).run();
|
|
4860
|
+
t.value = !1, !_ && (p.data && p.data.length && p.data.forEach((b) => {
|
|
4861
|
+
b.time = b.createdAt ? dt(b.createdAt).format("YYYY-MM-DD HH:mm:ss") : "", b.answerText = b.answer ? a(b.answer) : "";
|
|
4862
|
+
}), l.value == 1 ? i.value = p.data : i.value = i.value.concat(p.data), f.value = p.totalPage);
|
|
4845
4863
|
}, d = (k) => k.searchType == 0 ? I("物联应用") : k.searchType == 1 ? I("知识库") : k.searchType == 2 ? I("全网") : I("全部"), y = async (k) => {
|
|
4846
4864
|
c("record", k);
|
|
4847
4865
|
}, v = async (k) => {
|
|
4848
4866
|
await r(I("删除后,该会话将不可恢复,")), k.id, t.value = !0;
|
|
4849
|
-
const [
|
|
4850
|
-
if (
|
|
4867
|
+
const [_, p] = await wo({ id: k.id }).run();
|
|
4868
|
+
if (_) {
|
|
4851
4869
|
t.value = !1;
|
|
4852
4870
|
return;
|
|
4853
4871
|
}
|
|
4854
4872
|
h();
|
|
4855
4873
|
}, C = async (k) => {
|
|
4856
|
-
if (!
|
|
4874
|
+
if (!i.value.length) return;
|
|
4857
4875
|
await r(I("清空后,所有历史将无法找回,")), t.value = !0;
|
|
4858
|
-
const [
|
|
4859
|
-
if (
|
|
4876
|
+
const [_, p] = await Fo().run();
|
|
4877
|
+
if (_) {
|
|
4860
4878
|
t.value = !1;
|
|
4861
4879
|
return;
|
|
4862
4880
|
}
|
|
4863
4881
|
h();
|
|
4864
4882
|
};
|
|
4865
|
-
return
|
|
4883
|
+
return Ru(() => {
|
|
4866
4884
|
h();
|
|
4867
|
-
}), (k,
|
|
4885
|
+
}), (k, _) => yu((w(), q("div", sc, [
|
|
4868
4886
|
g("div", lc, [
|
|
4869
4887
|
g("div", dc, [
|
|
4870
4888
|
H(A(Se), {
|
|
4871
|
-
onClick:
|
|
4889
|
+
onClick: o,
|
|
4872
4890
|
size: "large",
|
|
4873
4891
|
iconColor: "#666666"
|
|
4874
4892
|
}),
|
|
@@ -4910,18 +4928,18 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4910
4928
|
onScroll: s
|
|
4911
4929
|
}, {
|
|
4912
4930
|
default: J(() => [
|
|
4913
|
-
|
|
4914
|
-
(w(!0),
|
|
4931
|
+
i.value.length ? (w(), q("div", pc, [
|
|
4932
|
+
(w(!0), q(
|
|
4915
4933
|
Nu,
|
|
4916
4934
|
null,
|
|
4917
|
-
Qu(
|
|
4935
|
+
Qu(i.value, (p, b) => (w(), q("div", {
|
|
4918
4936
|
class: "history-dialogue-item",
|
|
4919
|
-
onClick: (O) => y(
|
|
4937
|
+
onClick: (O) => y(p)
|
|
4920
4938
|
}, [
|
|
4921
4939
|
g(
|
|
4922
4940
|
"div",
|
|
4923
4941
|
mc,
|
|
4924
|
-
V(
|
|
4942
|
+
V(p.title),
|
|
4925
4943
|
1
|
|
4926
4944
|
/* TEXT */
|
|
4927
4945
|
),
|
|
@@ -4931,7 +4949,7 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4931
4949
|
H(A(Cu), {
|
|
4932
4950
|
placement: "top-start",
|
|
4933
4951
|
disabled: !0,
|
|
4934
|
-
text:
|
|
4952
|
+
text: p.answerText,
|
|
4935
4953
|
row: "2"
|
|
4936
4954
|
}, null, 8, ["text"]),
|
|
4937
4955
|
g("div", xc, [
|
|
@@ -4939,14 +4957,14 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4939
4957
|
g(
|
|
4940
4958
|
"div",
|
|
4941
4959
|
gc,
|
|
4942
|
-
V(d(
|
|
4960
|
+
V(d(p)),
|
|
4943
4961
|
1
|
|
4944
4962
|
/* TEXT */
|
|
4945
4963
|
),
|
|
4946
4964
|
g(
|
|
4947
4965
|
"span",
|
|
4948
4966
|
null,
|
|
4949
|
-
V(
|
|
4967
|
+
V(p.time),
|
|
4950
4968
|
1
|
|
4951
4969
|
/* TEXT */
|
|
4952
4970
|
)
|
|
@@ -4969,7 +4987,7 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4969
4987
|
]),
|
|
4970
4988
|
default: J(() => [
|
|
4971
4989
|
H(A(k0), {
|
|
4972
|
-
onClick: Fe((O) => v(
|
|
4990
|
+
onClick: Fe((O) => v(p), ["stop"]),
|
|
4973
4991
|
size: "medium",
|
|
4974
4992
|
iconColor: "#666666"
|
|
4975
4993
|
}, null, 8, ["onClick"])
|
|
@@ -4996,7 +5014,7 @@ const Ti = { class: "das-ai-select-container" }, Mi = { class: "das-ai-select-te
|
|
|
4996
5014
|
[A(bt), t.value]
|
|
4997
5015
|
]);
|
|
4998
5016
|
}
|
|
4999
|
-
}), yc = /* @__PURE__ */
|
|
5017
|
+
}), yc = /* @__PURE__ */ ou(vc, [["__scopeId", "data-v-3d211ef4"]]);
|
|
5000
5018
|
/*! js-cookie v3.0.5 | MIT */
|
|
5001
5019
|
function ne(u) {
|
|
5002
5020
|
for (var e = 1; e < arguments.length; e++) {
|
|
@@ -5018,19 +5036,19 @@ var Ac = {
|
|
|
5018
5036
|
}
|
|
5019
5037
|
};
|
|
5020
5038
|
function Ee(u, e) {
|
|
5021
|
-
function t(r,
|
|
5039
|
+
function t(r, i, c) {
|
|
5022
5040
|
if (!(typeof document > "u")) {
|
|
5023
5041
|
c = ne({}, e, c), typeof c.expires == "number" && (c.expires = new Date(Date.now() + c.expires * 864e5)), c.expires && (c.expires = c.expires.toUTCString()), r = encodeURIComponent(r).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
5024
|
-
var
|
|
5042
|
+
var o = "";
|
|
5025
5043
|
for (var a in c)
|
|
5026
|
-
c[a] && (
|
|
5027
|
-
return document.cookie = r + "=" + u.write(
|
|
5044
|
+
c[a] && (o += "; " + a, c[a] !== !0 && (o += "=" + c[a].split(";")[0]));
|
|
5045
|
+
return document.cookie = r + "=" + u.write(i, r) + o;
|
|
5028
5046
|
}
|
|
5029
5047
|
}
|
|
5030
5048
|
function n(r) {
|
|
5031
5049
|
if (!(typeof document > "u" || arguments.length && !r)) {
|
|
5032
|
-
for (var
|
|
5033
|
-
var a = o
|
|
5050
|
+
for (var i = document.cookie ? document.cookie.split("; ") : [], c = {}, o = 0; o < i.length; o++) {
|
|
5051
|
+
var a = i[o].split("="), s = a.slice(1).join("=");
|
|
5034
5052
|
try {
|
|
5035
5053
|
var l = decodeURIComponent(a[0]);
|
|
5036
5054
|
if (c[l] = u.read(s, l), r === l)
|
|
@@ -5045,11 +5063,11 @@ function Ee(u, e) {
|
|
|
5045
5063
|
{
|
|
5046
5064
|
set: t,
|
|
5047
5065
|
get: n,
|
|
5048
|
-
remove: function(r,
|
|
5066
|
+
remove: function(r, i) {
|
|
5049
5067
|
t(
|
|
5050
5068
|
r,
|
|
5051
5069
|
"",
|
|
5052
|
-
ne({},
|
|
5070
|
+
ne({}, i, {
|
|
5053
5071
|
expires: -1
|
|
5054
5072
|
})
|
|
5055
5073
|
);
|
|
@@ -5069,36 +5087,36 @@ function Ee(u, e) {
|
|
|
5069
5087
|
}
|
|
5070
5088
|
var Cc = Ee(Ac, { path: "/" });
|
|
5071
5089
|
const Dc = () => {
|
|
5072
|
-
let u = 0, e = -1, t = [], n = "", r = -1,
|
|
5073
|
-
const a = M(!1), s = M(), l = M(!1), f = M(""),
|
|
5074
|
-
const C = re() ? re() : Cc.get("accessToken"), k = lt().id,
|
|
5075
|
-
return C && (
|
|
5076
|
-
}, h = (C = 0, k,
|
|
5077
|
-
if (n = k, r == 1 && C == 1 &&
|
|
5078
|
-
|
|
5090
|
+
let u = 0, e = -1, t = [], n = "", r = -1, i = !1, c = "", o = "";
|
|
5091
|
+
const a = M(!1), s = M(), l = M(!1), f = M(""), x = () => {
|
|
5092
|
+
const C = re() ? re() : Cc.get("accessToken"), k = lt().id, _ = {};
|
|
5093
|
+
return C && (_.token = C), k && (_.project = k), _;
|
|
5094
|
+
}, h = (C = 0, k, _) => {
|
|
5095
|
+
if (n = k, r == 1 && C == 1 && o) {
|
|
5096
|
+
o.send(JSON.stringify({ text: _, taskId: c, taskType: C, overFlag: !n.loading, ...x() }));
|
|
5079
5097
|
return;
|
|
5080
5098
|
}
|
|
5081
|
-
n.audioStatus = "generated",
|
|
5099
|
+
n.audioStatus = "generated", o = new y0({
|
|
5082
5100
|
url: "/socket/api/speech/v1/tts",
|
|
5083
5101
|
reconnectWhenClose: !0,
|
|
5084
5102
|
opened: () => {
|
|
5085
|
-
c = $u(), C == 0 &&
|
|
5103
|
+
c = $u(), C == 0 && o.send(JSON.stringify({ text: n.content, taskId: c, taskType: C, ...x() })), C == 1 && o.send(JSON.stringify({ text: n.content, taskId: c, taskType: C, overFlag: !n.loading, ...x() })), r = C;
|
|
5086
5104
|
},
|
|
5087
|
-
message: async (
|
|
5088
|
-
if ((
|
|
5089
|
-
if (!(
|
|
5090
|
-
|
|
5105
|
+
message: async (p) => {
|
|
5106
|
+
if ((p == null ? void 0 : p.taskId) == c) {
|
|
5107
|
+
if (!(p != null && p.baseData)) return;
|
|
5108
|
+
p != null && p.baseData && t.push(p == null ? void 0 : p.baseData), r == 1 && (i = p.overFlag), e < 0 && (r == 0 && (u = p.totalCount, e = 0, n.audioStatus = "loading", f.value = `data:audio/mpeg;base64,${p == null ? void 0 : p.baseData}`, l.value = !0, v()), r == 1 && m.autoAudio && (e = 0, n.audioStatus = "loading", f.value = `data:audio/mpeg;base64,${p == null ? void 0 : p.baseData}`, l.value = !0, n.havePlayAutoAudio = !0, v())), a.value && (a.value = !1);
|
|
5091
5109
|
}
|
|
5092
5110
|
},
|
|
5093
|
-
error: (
|
|
5111
|
+
error: (p) => {
|
|
5094
5112
|
d();
|
|
5095
5113
|
},
|
|
5096
|
-
close: (
|
|
5114
|
+
close: (p) => {
|
|
5097
5115
|
}
|
|
5098
5116
|
});
|
|
5099
5117
|
}, d = () => {
|
|
5100
5118
|
var C;
|
|
5101
|
-
r = -1, e = -1, u = 0,
|
|
5119
|
+
r = -1, e = -1, u = 0, i = !1, t = [], o && o.disconnect(), o = "", (C = s.value) == null || C.pause(), f.value = "", a.value = !1, l.value = !1, n && (n.audioStatus = "normal", n = "");
|
|
5102
5120
|
}, y = () => {
|
|
5103
5121
|
if (r == 0) {
|
|
5104
5122
|
const C = e + 1;
|
|
@@ -5115,7 +5133,7 @@ const Dc = () => {
|
|
|
5115
5133
|
d();
|
|
5116
5134
|
}
|
|
5117
5135
|
if (r == 1) {
|
|
5118
|
-
if (
|
|
5136
|
+
if (i) {
|
|
5119
5137
|
if (e++, t[e]) {
|
|
5120
5138
|
f.value = `data:audio/mpeg;base64,${t[e]}`;
|
|
5121
5139
|
return;
|
|
@@ -5156,17 +5174,17 @@ const Dc = () => {
|
|
|
5156
5174
|
}, Tc = {
|
|
5157
5175
|
key: 3,
|
|
5158
5176
|
class: "das-ai-chat-new"
|
|
5159
|
-
}, Mc = { class: "das-ai-chat-input-box" }, Oc = { class: "sendervue-box" }, Nc = ["src", "muted"], Lc = "/api/llm/vector/v1/large-model/chat", Bc = /* @__PURE__ */
|
|
5177
|
+
}, Mc = { class: "das-ai-chat-input-box" }, Oc = { class: "sendervue-box" }, Nc = ["src", "muted"], Lc = "/api/llm/vector/v1/large-model/chat", Bc = /* @__PURE__ */ iu({
|
|
5160
5178
|
__name: "index",
|
|
5161
5179
|
emits: ["toApp"],
|
|
5162
5180
|
setup(u, { expose: e, emit: t }) {
|
|
5163
|
-
const n = t, r = M(0),
|
|
5181
|
+
const n = t, r = M(0), i = M(0), c = M(""), o = M(), a = M(""), s = M(null), l = M(!1), f = M(null), x = M([
|
|
5164
5182
|
{ id: "1", text: I("介绍达实公司及核心产品") },
|
|
5165
5183
|
{ id: "2", text: I("介绍达实公司行业案例") },
|
|
5166
5184
|
{ id: "3", text: I("预订上午9:00的会议室") }
|
|
5167
|
-
]), h = M({}), d = M([]), y = M(["A100", "A002", "A003", "A005"]), v = M(!1), C = M(!1), { folderDialogVue: k, showFolderDialog:
|
|
5185
|
+
]), h = M({}), d = M([]), y = M(["A100", "A002", "A003", "A005"]), v = M(!1), C = M(!1), { folderDialogVue: k, showFolderDialog: _ } = D0(), { aiAudioRef: p, isAudioplay: b, audioSrc: O, playAudio: F, pauseAudio: P } = Dc();
|
|
5168
5186
|
let j = 0;
|
|
5169
|
-
|
|
5187
|
+
Ru(() => {
|
|
5170
5188
|
gt(!0), Vu(), du();
|
|
5171
5189
|
}), at(() => {
|
|
5172
5190
|
pe(), P();
|
|
@@ -5175,27 +5193,27 @@ const Dc = () => {
|
|
|
5175
5193
|
P();
|
|
5176
5194
|
};
|
|
5177
5195
|
bu(
|
|
5178
|
-
() =>
|
|
5196
|
+
() => m.loading,
|
|
5179
5197
|
(z) => {
|
|
5180
|
-
s.value && (s.value.loading =
|
|
5198
|
+
s.value && (s.value.loading = m.loading);
|
|
5181
5199
|
}
|
|
5182
5200
|
), bu(
|
|
5183
|
-
() =>
|
|
5201
|
+
() => m.searchType,
|
|
5184
5202
|
(z) => {
|
|
5185
5203
|
du();
|
|
5186
5204
|
}
|
|
5187
5205
|
);
|
|
5188
5206
|
const du = async () => {
|
|
5189
|
-
if (!
|
|
5190
|
-
if (h.value[`${
|
|
5191
|
-
|
|
5207
|
+
if (!m.searchType) return;
|
|
5208
|
+
if (h.value[`${m.searchType}`]) {
|
|
5209
|
+
x.value = h.value[`${m.searchType}`];
|
|
5192
5210
|
return;
|
|
5193
5211
|
}
|
|
5194
|
-
const [z, D] = await
|
|
5195
|
-
z || D && (h.value[`${
|
|
5212
|
+
const [z, D] = await yo({ type: m.searchType }, { ignoreErrorMessage: !0 }).run();
|
|
5213
|
+
z || D && (h.value[`${m.searchType}`] = D.map((G) => ({
|
|
5196
5214
|
id: $u(),
|
|
5197
5215
|
text: G
|
|
5198
|
-
})),
|
|
5216
|
+
})), x.value = h.value[`${m.searchType}`]);
|
|
5199
5217
|
}, _u = () => {
|
|
5200
5218
|
ye(() => {
|
|
5201
5219
|
if (C.value) return;
|
|
@@ -5213,7 +5231,7 @@ const Dc = () => {
|
|
|
5213
5231
|
const D = document.querySelector("#das-ai-chat-scrollbox .das-ai-wrap-class");
|
|
5214
5232
|
r.value = D.scrollHeight - D.clientHeight;
|
|
5215
5233
|
}
|
|
5216
|
-
|
|
5234
|
+
m.showScrollBom = r.value - z.scrollTop > 50, v.value || (C.value = !0, wu()), v.value = !1;
|
|
5217
5235
|
}, Su = () => ({
|
|
5218
5236
|
id: $u(),
|
|
5219
5237
|
role: "user",
|
|
@@ -5236,13 +5254,13 @@ const Dc = () => {
|
|
|
5236
5254
|
urls: []
|
|
5237
5255
|
}), zu = async (z) => {
|
|
5238
5256
|
a.value = "", l.value = !0;
|
|
5239
|
-
const [D, G] = await
|
|
5257
|
+
const [D, G] = await Eo({ chatId: z.id }).run();
|
|
5240
5258
|
if (!D)
|
|
5241
5259
|
if (G) {
|
|
5242
5260
|
const Y = [];
|
|
5243
|
-
let
|
|
5261
|
+
let R = "", cu = "", au = "";
|
|
5244
5262
|
G && !G.status && G.forEach((U) => {
|
|
5245
|
-
|
|
5263
|
+
R || (R = U.chat_id), cu || (cu = U.searchType), au || (au = U.fold_id), U.fromType == 0 && Y.push({
|
|
5246
5264
|
...Su(),
|
|
5247
5265
|
content: U.content
|
|
5248
5266
|
}), U.fromType == 1 && (U.files || (U.files = []), U.urls || (U.urls = []), U.urls.length && (U.urls = U.urls.map((Tu) => ({
|
|
@@ -5261,24 +5279,24 @@ const Dc = () => {
|
|
|
5261
5279
|
intention: U.intention,
|
|
5262
5280
|
showSave: !y.value.includes(U.intention)
|
|
5263
5281
|
}));
|
|
5264
|
-
}), Iu(), d.value = Y,
|
|
5282
|
+
}), Iu(), d.value = Y, i.value = R, m.searchType = cu || "1", cu == "1" && (m.folderId = au, au ? ju(au) : m.folderName = ""), Vu(), _u(), l.value = !1;
|
|
5265
5283
|
} else
|
|
5266
5284
|
l.value = !1;
|
|
5267
5285
|
}, ju = async (z) => {
|
|
5268
5286
|
if (!z) return;
|
|
5269
|
-
const [D, G] = await
|
|
5270
|
-
D || G && (
|
|
5287
|
+
const [D, G] = await zo({ id: z }).run();
|
|
5288
|
+
D || G && (m.folderName = G.folderName);
|
|
5271
5289
|
}, Iu = () => {
|
|
5272
|
-
f.value = null,
|
|
5290
|
+
f.value = null, m.loading = !1, P(), r.value = 0, d.value = [], s.value = null, v.value = !1, C.value = !1, i.value = null, E0();
|
|
5273
5291
|
}, fe = (z) => {
|
|
5274
5292
|
z == "addNew" && Iu(), z == "scrollBom" && (C.value = !1, _u());
|
|
5275
5293
|
}, B = () => {
|
|
5276
|
-
|
|
5294
|
+
m.autoAudio = !m.autoAudio, m.autoAudio || P();
|
|
5277
5295
|
}, S = (z) => {
|
|
5278
|
-
|
|
5279
|
-
},
|
|
5296
|
+
E("sender", z.text);
|
|
5297
|
+
}, E = async (z, D) => {
|
|
5280
5298
|
if (z == "sender") {
|
|
5281
|
-
if (
|
|
5299
|
+
if (m.loading) return;
|
|
5282
5300
|
P(), C.value = !1;
|
|
5283
5301
|
const G = {
|
|
5284
5302
|
...Su(),
|
|
@@ -5287,46 +5305,46 @@ const Dc = () => {
|
|
|
5287
5305
|
...ue(),
|
|
5288
5306
|
loading: !0
|
|
5289
5307
|
};
|
|
5290
|
-
d.value.push(G), d.value.push(Y), s.value = Y,
|
|
5308
|
+
d.value.push(G), d.value.push(Y), s.value = Y, qe(D);
|
|
5291
5309
|
}
|
|
5292
|
-
z == "stopMsg" && pe(), z == "upload" && await
|
|
5310
|
+
z == "stopMsg" && pe(), z == "upload" && await _();
|
|
5293
5311
|
}, N = async (z, D) => {
|
|
5294
5312
|
var G, Y;
|
|
5295
5313
|
if (z == "regenerate" && D) {
|
|
5296
|
-
if (
|
|
5314
|
+
if (m.loading) return;
|
|
5297
5315
|
if (P(), D.queryId) {
|
|
5298
|
-
const au = { queryId: D.queryId }, [U, Tu] = await
|
|
5316
|
+
const au = { queryId: D.queryId }, [U, Tu] = await So(au).run();
|
|
5299
5317
|
if (U) return;
|
|
5300
5318
|
}
|
|
5301
5319
|
D.queryId = "", D.think = "", D.thinkTime = 0, D.intention = "", D.content = "", D.audioStatus = "normal", D.file = [], D.urls = [], D.havePlayAutoAudio = !1, D.saved = !1, D.loading = !0, s.value = D;
|
|
5302
|
-
const
|
|
5303
|
-
|
|
5320
|
+
const R = d.value.findIndex((au) => au.id == D.id), cu = (G = d.value[R - 1]) == null ? void 0 : G.content;
|
|
5321
|
+
qe(cu);
|
|
5304
5322
|
}
|
|
5305
5323
|
if (z == "saveKnowledgebase") {
|
|
5306
|
-
const
|
|
5307
|
-
await
|
|
5308
|
-
currentItem:
|
|
5324
|
+
const R = D.item, cu = d.value.findIndex((Tu) => Tu.id == R.id), au = (Y = d.value[cu - 1]) == null ? void 0 : Y.content;
|
|
5325
|
+
await _({
|
|
5326
|
+
currentItem: R,
|
|
5309
5327
|
sendVal: au.slice(0, 20),
|
|
5310
5328
|
// 知识库标题限制长度
|
|
5311
5329
|
dom: D.dom
|
|
5312
|
-
}) && (
|
|
5330
|
+
}) && (R.saved = !0, R.queryId && Co({ QueryId: R.queryId }).run());
|
|
5313
5331
|
}
|
|
5314
|
-
z == "reference" && (s.value = D, a.value = "reference"), z == "play" && (D.data.audioStatus == "normal" ? (P(),
|
|
5332
|
+
z == "reference" && (s.value = D, a.value = "reference"), z == "play" && (D.data.audioStatus == "normal" ? (P(), F(0, D.data)) : (s.value && (s.value.audioStatus = "normal"), P())), z == "preview" && $(D);
|
|
5315
5333
|
}, L = (z) => {
|
|
5316
5334
|
n("toApp", z);
|
|
5317
5335
|
}, $ = (z) => {
|
|
5318
5336
|
c.value = z, ye(() => {
|
|
5319
5337
|
var D;
|
|
5320
|
-
(D =
|
|
5338
|
+
(D = o.value) == null || D.preview();
|
|
5321
5339
|
});
|
|
5322
5340
|
}, eu = (z) => {
|
|
5323
5341
|
P(), a.value = "history";
|
|
5324
5342
|
}, Eu = () => {
|
|
5325
5343
|
a.value = "";
|
|
5326
|
-
},
|
|
5344
|
+
}, Re = (z) => {
|
|
5327
5345
|
const D = {
|
|
5328
5346
|
query: z,
|
|
5329
|
-
deepThinkFlag:
|
|
5347
|
+
deepThinkFlag: m.deepseek ? "1" : "0",
|
|
5330
5348
|
// project: getProjectInfo().id,
|
|
5331
5349
|
isInnerSearch: "0",
|
|
5332
5350
|
//应用内搜索(0否1是)
|
|
@@ -5335,7 +5353,7 @@ const Dc = () => {
|
|
|
5335
5353
|
isGlobalSearch: "0"
|
|
5336
5354
|
//是否搜索全网(0否1是)
|
|
5337
5355
|
};
|
|
5338
|
-
return
|
|
5356
|
+
return i.value || (i.value = (/* @__PURE__ */ new Date()).getTime()), D.chatId = i.value, m.searchType == "0" && (D.isInnerSearch = "1"), m.searchType == "1" && (D.isKnowledgeSearch = "1", D.foldId = m.folderId == m.allKnowId ? "" : m.folderId), m.searchType == "2" && (D.isGlobalSearch = "1"), JSON.stringify(D);
|
|
5339
5357
|
}, Gt = () => {
|
|
5340
5358
|
const z = {
|
|
5341
5359
|
// Authorization: `Bearer ${getToken()}`,
|
|
@@ -5345,13 +5363,13 @@ const Dc = () => {
|
|
|
5345
5363
|
return re() && (z.Authorization = `Bearer ${re()}`), z;
|
|
5346
5364
|
};
|
|
5347
5365
|
let he = "";
|
|
5348
|
-
const
|
|
5349
|
-
|
|
5366
|
+
const qe = (z) => {
|
|
5367
|
+
m.loading = !0, _u();
|
|
5350
5368
|
const D = new tu(`${st().baseURL}${Lc}?project=${lt().id}`, {
|
|
5351
5369
|
method: "POST",
|
|
5352
5370
|
// 使用 POST 请求
|
|
5353
5371
|
headers: Gt(),
|
|
5354
|
-
payload:
|
|
5372
|
+
payload: Re(z),
|
|
5355
5373
|
// POST 请求体
|
|
5356
5374
|
//重连时间间隔,单位:毫秒,默认45000毫秒,这里设置为10分钟
|
|
5357
5375
|
heartbeatTimeout: 10 * 60 * 1e3
|
|
@@ -5361,32 +5379,32 @@ const Dc = () => {
|
|
|
5361
5379
|
D.onmessage = (Y) => {
|
|
5362
5380
|
if (G != he) return;
|
|
5363
5381
|
if (Y.data == "[DONE]") {
|
|
5364
|
-
D.close(),
|
|
5382
|
+
D.close(), m.loading = !1, s.value.loading = !1, m.autoAudio && s.value.content && s.value.audioStatus != "normal" && F(1, s.value, ""), _u();
|
|
5365
5383
|
return;
|
|
5366
5384
|
}
|
|
5367
|
-
const
|
|
5368
|
-
if (s.value.intention || (s.value.intention =
|
|
5385
|
+
const R = JSON.parse(Y.data);
|
|
5386
|
+
if (s.value.intention || (s.value.intention = R.intention, s.value.showSave = !y.value.includes(R.intention)), R.type == "queryId" && (s.value.queryId || (s.value.queryId = R.content)), R.type == "think" && (s.value.think || (j = (/* @__PURE__ */ new Date()).getTime()), s.value.think = s.value.think + R.content), R.type == "text") {
|
|
5369
5387
|
if (j && s.value.think && !s.value.content) {
|
|
5370
5388
|
const cu = (/* @__PURE__ */ new Date()).getTime() - j;
|
|
5371
5389
|
j = 0, s.value.thinkTime = parseInt(`${cu / 1e3}`);
|
|
5372
5390
|
}
|
|
5373
|
-
s.value.content = s.value.content +
|
|
5391
|
+
s.value.content = s.value.content + R.content, s.value.showSave, m.autoAudio && (s.value.audioStatus == "normal" ? F(1, s.value, s.value.content) : F(1, s.value, R.content));
|
|
5374
5392
|
}
|
|
5375
|
-
|
|
5393
|
+
R.type == "file" && s.value.file.push(R), R.type == "url" && (R.webUrl && (R.webUrl = decodeURIComponent(R.webUrl)), R.name = R.content, s.value.file.push(R), s.value.urls.push(R)), _u();
|
|
5376
5394
|
}, D.onerror = (Y) => {
|
|
5377
|
-
D.close(),
|
|
5395
|
+
D.close(), m.loading = !1, s.value.content = I("连接错误");
|
|
5378
5396
|
}, f.value = D;
|
|
5379
5397
|
}, pe = () => {
|
|
5380
5398
|
var z;
|
|
5381
|
-
if ((z = f.value) == null || z.close(),
|
|
5399
|
+
if ((z = f.value) == null || z.close(), m.loading = !1, Kt(), s.value && (s.value.loading = !1, s.value.think && !s.value.thinkTime)) {
|
|
5382
5400
|
const D = (/* @__PURE__ */ new Date()).getTime() - j;
|
|
5383
5401
|
j = 0, s.value.thinkTime = parseInt(`${D / 1e3}`);
|
|
5384
5402
|
}
|
|
5385
5403
|
}, Kt = async () => {
|
|
5386
5404
|
if (s.value && s.value.loading && s.value.queryId && s.value.content) {
|
|
5387
|
-
let z = s.value.file ? s.value.file.filter((
|
|
5405
|
+
let z = s.value.file ? s.value.file.filter((R) => R.type != "url") : [];
|
|
5388
5406
|
const D = {
|
|
5389
|
-
chat_id:
|
|
5407
|
+
chat_id: i.value,
|
|
5390
5408
|
//会话id
|
|
5391
5409
|
content: s.value.content,
|
|
5392
5410
|
//对话内容
|
|
@@ -5394,51 +5412,51 @@ const Dc = () => {
|
|
|
5394
5412
|
//来源(0:用户,1:AI)
|
|
5395
5413
|
intention: s.value.intention,
|
|
5396
5414
|
//意图(A001:企业能耗,A002:楼控,A003:会议室,A004:能源管理,A005:IOC,A006:知识库)
|
|
5397
|
-
searchType:
|
|
5415
|
+
searchType: m.searchType,
|
|
5398
5416
|
//搜索类型(0:应用,1:知识库,2:全网)
|
|
5399
5417
|
fold_id: "",
|
|
5400
5418
|
QueryId: s.value.queryId,
|
|
5401
5419
|
//queryId,即问答id
|
|
5402
5420
|
think: s.value.think,
|
|
5403
5421
|
//思考
|
|
5404
|
-
urls: s.value.urls ? s.value.urls.map((
|
|
5405
|
-
name:
|
|
5406
|
-
app_url:
|
|
5407
|
-
web_url:
|
|
5422
|
+
urls: s.value.urls ? s.value.urls.map((R) => ({
|
|
5423
|
+
name: R.name,
|
|
5424
|
+
app_url: R.appUrl,
|
|
5425
|
+
web_url: R.webUrl
|
|
5408
5426
|
})) : [],
|
|
5409
5427
|
//
|
|
5410
|
-
files: z.map((
|
|
5411
|
-
name:
|
|
5412
|
-
summary:
|
|
5413
|
-
url:
|
|
5428
|
+
files: z.map((R) => ({
|
|
5429
|
+
name: R.name,
|
|
5430
|
+
summary: R.summary,
|
|
5431
|
+
url: R.url
|
|
5414
5432
|
}))
|
|
5415
5433
|
//
|
|
5416
5434
|
};
|
|
5417
|
-
D.searchType == "1" && (D.fold_id =
|
|
5418
|
-
const [G, Y] = await
|
|
5435
|
+
D.searchType == "1" && (D.fold_id = m.folderId == m.allKnowId ? "" : m.folderId);
|
|
5436
|
+
const [G, Y] = await Ao(D).run();
|
|
5419
5437
|
if (G) return;
|
|
5420
5438
|
}
|
|
5421
5439
|
};
|
|
5422
5440
|
return e({
|
|
5423
5441
|
senderVal: (z) => {
|
|
5424
|
-
|
|
5442
|
+
m.senderValue = `${m.senderValue}${z}`;
|
|
5425
5443
|
},
|
|
5426
5444
|
outSendMsg: () => {
|
|
5427
|
-
|
|
5445
|
+
m.senderValue && E("sender", m.senderValue);
|
|
5428
5446
|
},
|
|
5429
5447
|
hideFn: K,
|
|
5430
5448
|
playAudioFn: () => {
|
|
5431
5449
|
const z = d.value.length - 1 - [...d.value].reverse().findIndex((G) => G.role == "ai"), D = d.value[z] ? d.value[z] : null;
|
|
5432
|
-
D &&
|
|
5450
|
+
D && F(0, D);
|
|
5433
5451
|
},
|
|
5434
5452
|
pauseAudio: P,
|
|
5435
5453
|
stopMsg: pe,
|
|
5436
5454
|
openNewChat: Iu
|
|
5437
5455
|
}), (z, D) => {
|
|
5438
5456
|
const G = Wt("dasLoading");
|
|
5439
|
-
return yu((w(),
|
|
5440
|
-
a.value ? (w(),
|
|
5441
|
-
a.value == "reference" ? (w(), X(
|
|
5457
|
+
return yu((w(), q("div", Ec, [
|
|
5458
|
+
a.value ? (w(), q("div", Fc, [
|
|
5459
|
+
a.value == "reference" ? (w(), X(oc, {
|
|
5442
5460
|
key: 0,
|
|
5443
5461
|
item: s.value,
|
|
5444
5462
|
onPreview: $,
|
|
@@ -5447,14 +5465,14 @@ const Dc = () => {
|
|
|
5447
5465
|
}, null, 8, ["item"])) : T("v-if", !0),
|
|
5448
5466
|
a.value == "history" ? (w(), X(yc, {
|
|
5449
5467
|
key: 1,
|
|
5450
|
-
chatId:
|
|
5468
|
+
chatId: i.value,
|
|
5451
5469
|
onRecord: zu,
|
|
5452
5470
|
onBack: Eu
|
|
5453
5471
|
}, null, 8, ["chatId"])) : T("v-if", !0)
|
|
5454
5472
|
])) : T("v-if", !0),
|
|
5455
5473
|
g("div", wc, [
|
|
5456
5474
|
g("div", Sc, [
|
|
5457
|
-
H(
|
|
5475
|
+
H(Go, {
|
|
5458
5476
|
onBack: Iu,
|
|
5459
5477
|
listLength: d.value.length
|
|
5460
5478
|
}, null, 8, ["listLength"])
|
|
@@ -5479,12 +5497,12 @@ const Dc = () => {
|
|
|
5479
5497
|
style: { "margin-right": "16px" },
|
|
5480
5498
|
class: "ai-top-right-icon"
|
|
5481
5499
|
}, [
|
|
5482
|
-
A(
|
|
5500
|
+
A(m).autoAudio ? (w(), X(A(r0), {
|
|
5483
5501
|
key: 0,
|
|
5484
5502
|
customSize: "20",
|
|
5485
5503
|
iconColor: "#006DF1"
|
|
5486
5504
|
})) : T("v-if", !0),
|
|
5487
|
-
A(
|
|
5505
|
+
A(m).autoAudio ? T("v-if", !0) : (w(), X(A(i0), {
|
|
5488
5506
|
key: 1,
|
|
5489
5507
|
customSize: "20",
|
|
5490
5508
|
iconColor: "#333333"
|
|
@@ -5512,7 +5530,7 @@ const Dc = () => {
|
|
|
5512
5530
|
onClick: eu,
|
|
5513
5531
|
class: "ai-top-right-icon"
|
|
5514
5532
|
}, [
|
|
5515
|
-
H(A(
|
|
5533
|
+
H(A(o0), {
|
|
5516
5534
|
customSize: "20",
|
|
5517
5535
|
iconColor: "#666666"
|
|
5518
5536
|
})
|
|
@@ -5523,13 +5541,13 @@ const Dc = () => {
|
|
|
5523
5541
|
})
|
|
5524
5542
|
])
|
|
5525
5543
|
]),
|
|
5526
|
-
d.value.length ? (w(),
|
|
5544
|
+
d.value.length ? (w(), q("div", Ic, [
|
|
5527
5545
|
H(A(we), {
|
|
5528
5546
|
"wrap-class": "das-ai-wrap-class",
|
|
5529
5547
|
onScroll: fu
|
|
5530
5548
|
}, {
|
|
5531
5549
|
default: J(() => [
|
|
5532
|
-
H(
|
|
5550
|
+
H($i, {
|
|
5533
5551
|
onChatEmit: N,
|
|
5534
5552
|
chartList: d.value
|
|
5535
5553
|
}, null, 8, ["chartList"])
|
|
@@ -5538,13 +5556,13 @@ const Dc = () => {
|
|
|
5538
5556
|
/* STABLE */
|
|
5539
5557
|
})
|
|
5540
5558
|
])) : T("v-if", !0),
|
|
5541
|
-
d.value.length ? T("v-if", !0) : (w(), X(
|
|
5559
|
+
d.value.length ? T("v-if", !0) : (w(), X(ko, {
|
|
5542
5560
|
key: 2,
|
|
5543
|
-
list:
|
|
5561
|
+
list: x.value,
|
|
5544
5562
|
onClick: S
|
|
5545
5563
|
}, null, 8, ["list"])),
|
|
5546
5564
|
T(' v-if="currentList.length && !dasAiData.loading" '),
|
|
5547
|
-
d.value.length ? (w(),
|
|
5565
|
+
d.value.length ? (w(), q("div", Tc, [
|
|
5548
5566
|
D[0] || (D[0] = g(
|
|
5549
5567
|
"div",
|
|
5550
5568
|
{ class: "chat-new-top-mask" },
|
|
@@ -5552,7 +5570,7 @@ const Dc = () => {
|
|
|
5552
5570
|
-1
|
|
5553
5571
|
/* CACHED */
|
|
5554
5572
|
)),
|
|
5555
|
-
H(
|
|
5573
|
+
H(fo, { onAddNewEmit: fe })
|
|
5556
5574
|
])) : T("v-if", !0),
|
|
5557
5575
|
T(' :class="{ full: !currentList.length }" '),
|
|
5558
5576
|
g("div", Mc, [
|
|
@@ -5568,9 +5586,9 @@ const Dc = () => {
|
|
|
5568
5586
|
</div> `),
|
|
5569
5587
|
T(' v-show="!dasAiData.loading" '),
|
|
5570
5588
|
g("div", Oc, [
|
|
5571
|
-
H(
|
|
5589
|
+
H(oo, {
|
|
5572
5590
|
isNew: !d.value.length,
|
|
5573
|
-
onSenderEmit:
|
|
5591
|
+
onSenderEmit: E
|
|
5574
5592
|
}, null, 8, ["isNew"])
|
|
5575
5593
|
]),
|
|
5576
5594
|
T(` <div v-show="dasAiData.loading" class="loading-content">\r
|
|
@@ -5589,15 +5607,15 @@ const Dc = () => {
|
|
|
5589
5607
|
H(A(k)),
|
|
5590
5608
|
H(A(c0), {
|
|
5591
5609
|
ref_key: "dasPreviewRef",
|
|
5592
|
-
ref:
|
|
5610
|
+
ref: o,
|
|
5593
5611
|
"file-url": c.value
|
|
5594
5612
|
}, null, 8, ["file-url"]),
|
|
5595
5613
|
g("audio", {
|
|
5596
5614
|
src: A(O),
|
|
5597
5615
|
class: "ai-audio-class",
|
|
5598
5616
|
ref_key: "aiAudioRef",
|
|
5599
|
-
ref:
|
|
5600
|
-
muted: !A(
|
|
5617
|
+
ref: p,
|
|
5618
|
+
muted: !A(b),
|
|
5601
5619
|
autoplay: ""
|
|
5602
5620
|
}, null, 8, Nc)
|
|
5603
5621
|
])), [
|
|
@@ -5605,74 +5623,74 @@ const Dc = () => {
|
|
|
5605
5623
|
]);
|
|
5606
5624
|
};
|
|
5607
5625
|
}
|
|
5608
|
-
}),
|
|
5626
|
+
}), Rc = /* @__PURE__ */ ou(Bc, [["__scopeId", "data-v-399821d3"]]), qc = { class: "das-ai-panel-div 2" }, Pc = { class: "das-ai-panel-coantainer-header" }, jc = { class: "das-ai-panel-header-title" }, Hc = { class: "das-ai-panel-coantainer-body" }, $c = /* @__PURE__ */ iu({
|
|
5609
5627
|
__name: "index",
|
|
5610
5628
|
emits: ["confirm", "toApp", "getStatus"],
|
|
5611
5629
|
setup(u, { expose: e, emit: t }) {
|
|
5612
|
-
const n = t, r = e0(),
|
|
5630
|
+
const n = t, r = e0(), i = M(), c = M(0), o = M(), a = M(!1);
|
|
5613
5631
|
bu(
|
|
5614
5632
|
() => r == null ? void 0 : r.path,
|
|
5615
|
-
(
|
|
5633
|
+
(b, O) => {
|
|
5616
5634
|
f();
|
|
5617
5635
|
}
|
|
5618
|
-
),
|
|
5636
|
+
), Ru(() => {
|
|
5619
5637
|
setTimeout(() => {
|
|
5620
5638
|
ye(() => {
|
|
5621
|
-
let
|
|
5622
|
-
|
|
5639
|
+
let b = document.getElementsByClassName("das-web-app-header")[0];
|
|
5640
|
+
b && (c.value = b.clientHeight), b && !o.value && (o.value = A0((O) => {
|
|
5623
5641
|
c.value = O.height;
|
|
5624
|
-
},
|
|
5642
|
+
}, b));
|
|
5625
5643
|
});
|
|
5626
5644
|
}, 1e3);
|
|
5627
5645
|
}), at(() => {
|
|
5628
|
-
var
|
|
5629
|
-
(
|
|
5646
|
+
var b;
|
|
5647
|
+
(b = o.value) == null || b.disconnect(), o.value = null;
|
|
5630
5648
|
});
|
|
5631
|
-
const s = (
|
|
5632
|
-
n("toApp",
|
|
5649
|
+
const s = (b) => {
|
|
5650
|
+
n("toApp", b);
|
|
5633
5651
|
}, l = () => {
|
|
5634
5652
|
a.value || (a.value = !0, n("getStatus", !0));
|
|
5635
5653
|
}, f = () => {
|
|
5636
|
-
var
|
|
5637
|
-
a.value = !1, (
|
|
5654
|
+
var b;
|
|
5655
|
+
a.value = !1, (b = i.value) == null || b.hideFn(), n("getStatus", !1);
|
|
5638
5656
|
};
|
|
5639
5657
|
return e({
|
|
5640
|
-
setAutoAudio: (
|
|
5641
|
-
|
|
5658
|
+
setAutoAudio: (b) => {
|
|
5659
|
+
m.autoAudio = b;
|
|
5642
5660
|
},
|
|
5643
|
-
setConfig: (
|
|
5644
|
-
|
|
5661
|
+
setConfig: (b) => {
|
|
5662
|
+
b != null && b.searchType && (m.searchType = b == null ? void 0 : b.searchType), (b == null ? void 0 : b.searchType) == "1" && (m.folderId = b.folderId ? b.folderId : "", m.folderName = b.folderName ? b.folderName : ""), Vu();
|
|
5645
5663
|
},
|
|
5646
5664
|
stopMsg: () => {
|
|
5647
|
-
var
|
|
5648
|
-
(
|
|
5665
|
+
var b;
|
|
5666
|
+
(b = i.value) == null || b.stopMsg();
|
|
5649
5667
|
},
|
|
5650
5668
|
playAudio: () => {
|
|
5651
|
-
var
|
|
5652
|
-
(
|
|
5669
|
+
var b;
|
|
5670
|
+
(b = i.value) == null || b.playAudioFn();
|
|
5653
5671
|
},
|
|
5654
5672
|
pauseAudio: () => {
|
|
5655
|
-
var
|
|
5656
|
-
(
|
|
5673
|
+
var b;
|
|
5674
|
+
(b = i.value) == null || b.pauseAudio();
|
|
5657
5675
|
},
|
|
5658
5676
|
openNewChat: () => {
|
|
5659
|
-
var
|
|
5660
|
-
(
|
|
5677
|
+
var b;
|
|
5678
|
+
(b = i.value) == null || b.openNewChat();
|
|
5661
5679
|
},
|
|
5662
5680
|
send: () => {
|
|
5663
|
-
var
|
|
5664
|
-
(
|
|
5681
|
+
var b;
|
|
5682
|
+
(b = i.value) == null || b.outSendMsg();
|
|
5665
5683
|
},
|
|
5666
|
-
senderVal: (
|
|
5684
|
+
senderVal: (b) => {
|
|
5667
5685
|
var O;
|
|
5668
|
-
(O =
|
|
5686
|
+
(O = i.value) == null || O.senderVal(b);
|
|
5669
5687
|
},
|
|
5670
5688
|
clearSenderVal: () => {
|
|
5671
|
-
|
|
5689
|
+
m.senderValue = "";
|
|
5672
5690
|
},
|
|
5673
5691
|
openPanel: l,
|
|
5674
5692
|
closePanel: f
|
|
5675
|
-
}), (
|
|
5693
|
+
}), (b, O) => (w(), q("div", qc, [
|
|
5676
5694
|
H(Xt, {
|
|
5677
5695
|
name: "das-ai-panel",
|
|
5678
5696
|
persisted: ""
|
|
@@ -5705,10 +5723,10 @@ const Dc = () => {
|
|
|
5705
5723
|
]),
|
|
5706
5724
|
g("div", Hc, [
|
|
5707
5725
|
H(
|
|
5708
|
-
|
|
5726
|
+
Rc,
|
|
5709
5727
|
{
|
|
5710
5728
|
ref_key: "dasAiVueRef",
|
|
5711
|
-
ref:
|
|
5729
|
+
ref: i,
|
|
5712
5730
|
onToApp: s
|
|
5713
5731
|
},
|
|
5714
5732
|
null,
|
|
@@ -5747,7 +5765,7 @@ const Dc = () => {
|
|
|
5747
5765
|
</das-drawer>`)
|
|
5748
5766
|
]));
|
|
5749
5767
|
}
|
|
5750
|
-
}), Vc = /* @__PURE__ */
|
|
5768
|
+
}), Vc = /* @__PURE__ */ ou($c, [["__scopeId", "data-v-66d7afca"]]), Uc = {
|
|
5751
5769
|
AI助手: { "zh-CN": "AI助手", en: "AI Assistant", "zh-MO": "AI助手", _appCode: "framework" },
|
|
5752
5770
|
自动播报: { "zh-CN": "自动播报", en: "Auto Broadcast", "zh-MO": "自動播報" },
|
|
5753
5771
|
历史会话: { "zh-CN": "历史会话", en: "History Sessions", "zh-MO": "歷史會話" },
|
|
@@ -5842,11 +5860,11 @@ const Dc = () => {
|
|
|
5842
5860
|
}
|
|
5843
5861
|
};
|
|
5844
5862
|
n0(Uc);
|
|
5845
|
-
const Ba = () => M(null),
|
|
5863
|
+
const Ba = () => M(null), Ra = u0(Vc);
|
|
5846
5864
|
export {
|
|
5847
|
-
|
|
5848
|
-
|
|
5865
|
+
Ra as D,
|
|
5866
|
+
ou as _,
|
|
5849
5867
|
Ba as a,
|
|
5850
|
-
|
|
5868
|
+
Io as g,
|
|
5851
5869
|
La as s
|
|
5852
5870
|
};
|