@datawhale/prosemirror-render 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AttachmentBlock-ChMNTUOo.mjs +351 -0
- package/dist/AttachmentBlock-DsmJP3Kw.js +1 -0
- package/dist/AttachmentInline-Dc3dp0g-.js +1 -0
- package/dist/AttachmentInline-tbC8BJBy.mjs +52 -0
- package/dist/AttachmentMenu-B5x8P9_n.mjs +541 -0
- package/dist/AttachmentMenu-ExoCOe4B.js +1 -0
- package/dist/Blockquote-BamWUQND.mjs +15 -0
- package/dist/Blockquote-CQSBFnsu.js +1 -0
- package/dist/BulletList-BQTUD69X.mjs +15 -0
- package/dist/BulletList-CFjF3U-l.js +1 -0
- package/dist/Callout-Cu6HI-xq.mjs +28 -0
- package/dist/Callout-DPdOqTb4.js +1 -0
- package/dist/CellOutput-C33VK0df.mjs +981 -0
- package/dist/CellOutput-DiKZlIFa.js +6 -0
- package/dist/CodeBlock-Cjuxuq7B.mjs +8359 -0
- package/dist/CodeBlock-DWniNUQB.js +148 -0
- package/dist/Doc-6s4VMDsx.mjs +15 -0
- package/dist/Doc-D2yvlSII.js +1 -0
- package/dist/FoldBlock-DRdlU-DX.mjs +75 -0
- package/dist/FoldBlock-ZPMf0QsR.js +1 -0
- package/dist/Grid-GfmJxM93.mjs +31 -0
- package/dist/Grid-QToZdaRT.js +1 -0
- package/dist/HardBreak-B2tFO31P.mjs +13 -0
- package/dist/HardBreak-Dbf5Zg5o.js +1 -0
- package/dist/Heading-BElRvhGn.mjs +21 -0
- package/dist/Heading-BUnffIAz.js +1 -0
- package/dist/HorizontalRule-BRG45oT0.mjs +13 -0
- package/dist/HorizontalRule-CE09LZGf.js +1 -0
- package/dist/IFrame-CaAOVLGN.mjs +17 -0
- package/dist/IFrame-DcCpSoDC.js +1 -0
- package/dist/Image-C8v5dCij.mjs +105 -0
- package/dist/Image-cHL85CXs.js +1 -0
- package/dist/ListItem-BrjxeGxz.js +1 -0
- package/dist/ListItem-X0T7a_z8.mjs +15 -0
- package/dist/MathDisplay-CESKZV46.js +1 -0
- package/dist/MathDisplay-CoGsFzXW.mjs +30 -0
- package/dist/MathInline-0xTZoIIq.mjs +30 -0
- package/dist/MathInline-C_1SJUVz.js +1 -0
- package/dist/McChoices-Aj394G5E.mjs +52 -0
- package/dist/McChoices-B4euzY7M.js +1 -0
- package/dist/McQuestion-Dq0aM5tC.js +1 -0
- package/dist/McQuestion-DvD-J47M.mjs +38 -0
- package/dist/McSolution-C5sTXz3y.mjs +24 -0
- package/dist/McSolution-N79CllH9.js +1 -0
- package/dist/MultipleChoice-DTCF3Q8m.js +1 -0
- package/dist/MultipleChoice-Dv-k1zUU.mjs +47 -0
- package/dist/OrderedList-B8v1gchv.mjs +17 -0
- package/dist/OrderedList-DMl3tvwP.js +1 -0
- package/dist/Paragraph-CzRSCJNr.js +1 -0
- package/dist/Paragraph-DGcZy8t_.mjs +16 -0
- package/dist/SlotNode-6OpoUcOa.mjs +10 -0
- package/dist/SlotNode-DMG0R6Vf.js +1 -0
- package/dist/TableCell-BY9gdldc.js +1 -0
- package/dist/TableCell-Bp52L368.mjs +20 -0
- package/dist/TableContainer-C5KXY6f7.js +1 -0
- package/dist/TableContainer-C9PhNGlz.mjs +29 -0
- package/dist/TableHeader-BTuqvorM.js +1 -0
- package/dist/TableHeader-C7KKz3e1.mjs +17 -0
- package/dist/TableRow-D4F6AKFt.js +1 -0
- package/dist/TableRow-OzpVq1qW.mjs +15 -0
- package/dist/Text-Br_pcGz4.mjs +78 -0
- package/dist/Text-DlUfrsNI.js +1 -0
- package/dist/emoji-Bk6FG72F.js +1 -0
- package/dist/emoji-CmOToDEU.mjs +3711 -0
- package/dist/index-D2CtpNvR.js +1 -0
- package/dist/index-DVmWCrQE.mjs +159 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +4 -0
- package/dist/katex-CS0ZfoxP.js +261 -0
- package/dist/katex-r9TeExgs.mjs +11690 -0
- package/dist/prosemirror-render.css +1 -0
- package/dist/types/apis/monitor.d.ts +9 -0
- package/dist/types/apis/tingwu.d.ts +14 -0
- package/dist/types/apis/types.d.ts +23 -0
- package/dist/types/components/TreeRecursive.vue.d.ts +7 -0
- package/dist/types/components/TreeRender.vue.d.ts +9 -0
- package/dist/types/components/collections/async/AsyncError.vue.d.ts +3 -0
- package/dist/types/components/collections/async/AsyncLoading.vue.d.ts +3 -0
- package/dist/types/components/collections/attachment/AttachmentBlock.vue.d.ts +7 -0
- package/dist/types/components/collections/attachment/AttachmentInline.vue.d.ts +7 -0
- package/dist/types/components/collections/attachment/AttachmentMenu.vue.d.ts +16 -0
- package/dist/types/components/collections/attachment/VideoDetail.vue.d.ts +7 -0
- package/dist/types/components/collections/attachment/index.d.ts +1 -0
- package/dist/types/components/collections/basic/Blockquote.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/BulletList.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/HardBreak.vue.d.ts +7 -0
- package/dist/types/components/collections/basic/Heading.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/HorizontalRule.vue.d.ts +7 -0
- package/dist/types/components/collections/basic/ListItem.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/OrderedList.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/Paragraph.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/Text.vue.d.ts +7 -0
- package/dist/types/components/collections/basic/index.d.ts +1 -0
- package/dist/types/components/collections/callout/Callout.vue.d.ts +7 -0
- package/dist/types/components/collections/callout/index.d.ts +1 -0
- package/dist/types/components/collections/code/CellOutput.vue.d.ts +7 -0
- package/dist/types/components/collections/code/CodeBlock.vue.d.ts +7 -0
- package/dist/types/components/collections/code/index.d.ts +1 -0
- package/dist/types/components/collections/fold/FoldBlock.vue.d.ts +7 -0
- package/dist/types/components/collections/fold/index.d.ts +1 -0
- package/dist/types/components/collections/grid/Grid.vue.d.ts +7 -0
- package/dist/types/components/collections/grid/index.d.ts +1 -0
- package/dist/types/components/collections/iframe/IFrame.vue.d.ts +7 -0
- package/dist/types/components/collections/iframe/index.d.ts +1 -0
- package/dist/types/components/collections/img/Image.vue.d.ts +7 -0
- package/dist/types/components/collections/img/index.d.ts +1 -0
- package/dist/types/components/collections/index.d.ts +1 -0
- package/dist/types/components/collections/math/MathDisplay.vue.d.ts +7 -0
- package/dist/types/components/collections/math/MathInline.vue.d.ts +7 -0
- package/dist/types/components/collections/math/index.d.ts +1 -0
- package/dist/types/components/collections/multipleChoice/McChoices.vue.d.ts +16 -0
- package/dist/types/components/collections/multipleChoice/McQuestion.vue.d.ts +7 -0
- package/dist/types/components/collections/multipleChoice/McSolution.vue.d.ts +8 -0
- package/dist/types/components/collections/multipleChoice/MultipleChoice.vue.d.ts +7 -0
- package/dist/types/components/collections/multipleChoice/index.d.ts +1 -0
- package/dist/types/components/collections/table/TableCell.vue.d.ts +17 -0
- package/dist/types/components/collections/table/TableContainer.vue.d.ts +17 -0
- package/dist/types/components/collections/table/TableHeader.vue.d.ts +17 -0
- package/dist/types/components/collections/table/TableRow.vue.d.ts +17 -0
- package/dist/types/components/collections/table/index.d.ts +1 -0
- package/dist/types/components/collections/utils.d.ts +2 -0
- package/dist/types/components/collections/wrapper/Doc.vue.d.ts +17 -0
- package/dist/types/components/collections/wrapper/SlotNode.vue.d.ts +13 -0
- package/dist/types/components/collections/wrapper/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/icons/Attachment/CardView.vue.d.ts +9 -0
- package/dist/types/icons/Attachment/Code/Bat.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/C.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Cpp.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Css.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Go.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Html.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Java.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Js.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Json.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Jsx.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Md.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Php.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Python.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Rb.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Sh.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Sql.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Swift.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Ts.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Tsx.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Vue.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Excel.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Eye.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/FullScreen.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/InlineView.vue.d.ts +9 -0
- package/dist/types/icons/Attachment/Pdf.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Ppt.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/PreviewView.vue.d.ts +9 -0
- package/dist/types/icons/Attachment/UnknownFile.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/VideoIcon.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/VideoPlay.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Word.vue.d.ts +3 -0
- package/dist/types/icons/Code/Confirm.vue.d.ts +3 -0
- package/dist/types/icons/Code/Paste.vue.d.ts +3 -0
- package/dist/types/icons/Common/Choice.vue.d.ts +3 -0
- package/dist/types/icons/Common/Close.vue.d.ts +3 -0
- package/dist/types/icons/Common/Comment.vue.d.ts +3 -0
- package/dist/types/icons/Common/CopyAnchorLink.vue.d.ts +3 -0
- package/dist/types/icons/Common/Delete.vue.d.ts +3 -0
- package/dist/types/icons/Common/Download.vue.d.ts +3 -0
- package/dist/types/icons/Common/FoldClose.vue.d.ts +3 -0
- package/dist/types/icons/Common/FoldOpen.vue.d.ts +3 -0
- package/dist/types/icons/Common/Plate.vue.d.ts +3 -0
- package/dist/types/icons/Common/Question.vue.d.ts +3 -0
- package/dist/types/icons/Common/ShareTextLink.vue.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/types.d.ts +269 -0
- package/dist/types/utils/common.d.ts +1 -0
- package/dist/types/utils/emoji.d.ts +10 -0
- package/dist/types/utils/globalStatus.d.ts +16 -0
- package/dist/types/utils/shiki.d.ts +3 -0
- package/dist/types/utils/useAttachment.d.ts +8 -0
- package/package.json +29 -0
- package/src/apis/monitor.ts +8 -0
- package/src/apis/tingwu.ts +22 -0
- package/src/apis/types.ts +45 -0
- package/src/components/TreeRecursive.vue +47 -0
- package/src/components/TreeRender.vue +404 -0
- package/src/components/collections/async/AsyncError.vue +17 -0
- package/src/components/collections/async/AsyncLoading.vue +1 -0
- package/src/components/collections/attachment/AttachmentBlock.vue +561 -0
- package/src/components/collections/attachment/AttachmentInline.vue +90 -0
- package/src/components/collections/attachment/AttachmentMenu.vue +359 -0
- package/src/components/collections/attachment/VideoDetail.vue +375 -0
- package/src/components/collections/attachment/index.ts +6 -0
- package/src/components/collections/basic/Blockquote.vue +15 -0
- package/src/components/collections/basic/BulletList.vue +15 -0
- package/src/components/collections/basic/HardBreak.vue +11 -0
- package/src/components/collections/basic/Heading.vue +15 -0
- package/src/components/collections/basic/HorizontalRule.vue +11 -0
- package/src/components/collections/basic/ListItem.vue +15 -0
- package/src/components/collections/basic/OrderedList.vue +15 -0
- package/src/components/collections/basic/Paragraph.vue +19 -0
- package/src/components/collections/basic/Text.vue +73 -0
- package/src/components/collections/basic/index.ts +13 -0
- package/src/components/collections/callout/Callout.vue +77 -0
- package/src/components/collections/callout/index.ts +5 -0
- package/src/components/collections/code/CellOutput.vue +72 -0
- package/src/components/collections/code/CodeBlock.vue +83 -0
- package/src/components/collections/code/index.ts +6 -0
- package/src/components/collections/fold/FoldBlock.vue +130 -0
- package/src/components/collections/fold/index.ts +5 -0
- package/src/components/collections/grid/Grid.vue +70 -0
- package/src/components/collections/grid/index.ts +5 -0
- package/src/components/collections/iframe/IFrame.vue +19 -0
- package/src/components/collections/iframe/index.ts +5 -0
- package/src/components/collections/img/Image.vue +318 -0
- package/src/components/collections/img/index.ts +5 -0
- package/src/components/collections/index.ts +29 -0
- package/src/components/collections/math/MathDisplay.vue +42 -0
- package/src/components/collections/math/MathInline.vue +42 -0
- package/src/components/collections/math/index.ts +6 -0
- package/src/components/collections/multipleChoice/McChoices.vue +72 -0
- package/src/components/collections/multipleChoice/McQuestion.vue +61 -0
- package/src/components/collections/multipleChoice/McSolution.vue +47 -0
- package/src/components/collections/multipleChoice/MultipleChoice.vue +62 -0
- package/src/components/collections/multipleChoice/index.ts +8 -0
- package/src/components/collections/table/TableCell.vue +20 -0
- package/src/components/collections/table/TableContainer.vue +32 -0
- package/src/components/collections/table/TableHeader.vue +15 -0
- package/src/components/collections/table/TableRow.vue +15 -0
- package/src/components/collections/table/index.ts +8 -0
- package/src/components/collections/utils.ts +17 -0
- package/src/components/collections/wrapper/Doc.vue +15 -0
- package/src/components/collections/wrapper/SlotNode.vue +5 -0
- package/src/components/collections/wrapper/index.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/icons/Attachment/CardView.vue +21 -0
- package/src/icons/Attachment/Code/Bat.vue +26 -0
- package/src/icons/Attachment/Code/C.vue +26 -0
- package/src/icons/Attachment/Code/Cpp.vue +26 -0
- package/src/icons/Attachment/Code/Css.vue +34 -0
- package/src/icons/Attachment/Code/Go.vue +26 -0
- package/src/icons/Attachment/Code/Html.vue +34 -0
- package/src/icons/Attachment/Code/Java.vue +42 -0
- package/src/icons/Attachment/Code/Js.vue +26 -0
- package/src/icons/Attachment/Code/Json.vue +26 -0
- package/src/icons/Attachment/Code/Jsx.vue +30 -0
- package/src/icons/Attachment/Code/Md.vue +26 -0
- package/src/icons/Attachment/Code/Php.vue +26 -0
- package/src/icons/Attachment/Code/Python.vue +30 -0
- package/src/icons/Attachment/Code/Rb.vue +26 -0
- package/src/icons/Attachment/Code/Sh.vue +30 -0
- package/src/icons/Attachment/Code/Sql.vue +30 -0
- package/src/icons/Attachment/Code/Swift.vue +26 -0
- package/src/icons/Attachment/Code/Ts.vue +26 -0
- package/src/icons/Attachment/Code/Tsx.vue +30 -0
- package/src/icons/Attachment/Code/Vue.vue +24 -0
- package/src/icons/Attachment/Excel.vue +26 -0
- package/src/icons/Attachment/Eye.vue +15 -0
- package/src/icons/Attachment/FullScreen.vue +15 -0
- package/src/icons/Attachment/InlineView.vue +21 -0
- package/src/icons/Attachment/Pdf.vue +25 -0
- package/src/icons/Attachment/Ppt.vue +26 -0
- package/src/icons/Attachment/PreviewView.vue +21 -0
- package/src/icons/Attachment/UnknownFile.vue +26 -0
- package/src/icons/Attachment/VideoIcon.vue +25 -0
- package/src/icons/Attachment/VideoPlay.vue +15 -0
- package/src/icons/Attachment/Word.vue +26 -0
- package/src/icons/Code/Confirm.vue +38 -0
- package/src/icons/Code/Paste.vue +8 -0
- package/src/icons/Common/Choice.vue +28 -0
- package/src/icons/Common/Close.vue +15 -0
- package/src/icons/Common/Comment.vue +16 -0
- package/src/icons/Common/CopyAnchorLink.vue +15 -0
- package/src/icons/Common/Delete.vue +15 -0
- package/src/icons/Common/Download.vue +15 -0
- package/src/icons/Common/FoldClose.vue +9 -0
- package/src/icons/Common/FoldOpen.vue +9 -0
- package/src/icons/Common/Plate.vue +23 -0
- package/src/icons/Common/Question.vue +8 -0
- package/src/icons/Common/ShareTextLink.vue +15 -0
- package/src/index.ts +3 -0
- package/src/types.ts +236 -0
- package/src/utils/common.ts +6 -0
- package/src/utils/emoji.ts +3715 -0
- package/src/utils/globalStatus.ts +19 -0
- package/src/utils/shiki.ts +25 -0
- package/src/utils/useAttachment.ts +215 -0
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +23 -0
- package/vite.config.ts +24 -0
|
@@ -0,0 +1,981 @@
|
|
|
1
|
+
import { defineComponent as V, h as R, computed as J, createElementBlock as C, createCommentVNode as W, openBlock as L, createVNode as ve, unref as ge, withCtx as he, createTextVNode as de, toDisplayString as F } from "vue";
|
|
2
|
+
import { _ as be } from "./index-DVmWCrQE.mjs";
|
|
3
|
+
function me(a) {
|
|
4
|
+
return a && a.__esModule && Object.prototype.hasOwnProperty.call(a, "default") ? a.default : a;
|
|
5
|
+
}
|
|
6
|
+
var M, B;
|
|
7
|
+
function ye() {
|
|
8
|
+
if (B) return M;
|
|
9
|
+
B = 1;
|
|
10
|
+
const a = [
|
|
11
|
+
[
|
|
12
|
+
{ color: "0, 0, 0", class: "ansi-black" },
|
|
13
|
+
{ color: "187, 0, 0", class: "ansi-red" },
|
|
14
|
+
{ color: "0, 187, 0", class: "ansi-green" },
|
|
15
|
+
{ color: "187, 187, 0", class: "ansi-yellow" },
|
|
16
|
+
{ color: "0, 0, 187", class: "ansi-blue" },
|
|
17
|
+
{ color: "187, 0, 187", class: "ansi-magenta" },
|
|
18
|
+
{ color: "0, 187, 187", class: "ansi-cyan" },
|
|
19
|
+
{ color: "255,255,255", class: "ansi-white" }
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
{ color: "85, 85, 85", class: "ansi-bright-black" },
|
|
23
|
+
{ color: "255, 85, 85", class: "ansi-bright-red" },
|
|
24
|
+
{ color: "0, 255, 0", class: "ansi-bright-green" },
|
|
25
|
+
{ color: "255, 255, 85", class: "ansi-bright-yellow" },
|
|
26
|
+
{ color: "85, 85, 255", class: "ansi-bright-blue" },
|
|
27
|
+
{ color: "255, 85, 255", class: "ansi-bright-magenta" },
|
|
28
|
+
{ color: "85, 255, 255", class: "ansi-bright-cyan" },
|
|
29
|
+
{ color: "255, 255, 255", class: "ansi-bright-white" }
|
|
30
|
+
]
|
|
31
|
+
], r = /(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&|%[A-Fa-f0-9]{2})+)/gm;
|
|
32
|
+
class n {
|
|
33
|
+
/**
|
|
34
|
+
* Anser.escapeForHtml
|
|
35
|
+
* Escape the input HTML.
|
|
36
|
+
*
|
|
37
|
+
* This does the minimum escaping of text to make it compliant with HTML.
|
|
38
|
+
* In particular, the '&','<', and '>' characters are escaped. This should
|
|
39
|
+
* be run prior to `ansiToHtml`.
|
|
40
|
+
*
|
|
41
|
+
* @name Anser.escapeForHtml
|
|
42
|
+
* @function
|
|
43
|
+
* @param {String} txt The input text (containing the ANSI snippets).
|
|
44
|
+
* @returns {String} The escaped html.
|
|
45
|
+
*/
|
|
46
|
+
static escapeForHtml(e) {
|
|
47
|
+
return new n().escapeForHtml(e);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Anser.linkify
|
|
51
|
+
* Adds the links in the HTML.
|
|
52
|
+
*
|
|
53
|
+
* This replaces any links in the text with anchor tags that display the
|
|
54
|
+
* link. You should apply this after you have run `ansiToHtml` on the text.
|
|
55
|
+
*
|
|
56
|
+
* @name Anser.linkify
|
|
57
|
+
* @function
|
|
58
|
+
* @param {String} txt The input text.
|
|
59
|
+
* @returns {String} The HTML containing the <a> tags (unescaped).
|
|
60
|
+
*/
|
|
61
|
+
static linkify(e) {
|
|
62
|
+
return new n().linkify(e);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Anser.ansiToHtml
|
|
66
|
+
* This replaces ANSI terminal escape codes with SPAN tags that wrap the
|
|
67
|
+
* content.
|
|
68
|
+
*
|
|
69
|
+
* This function only interprets ANSI SGR (Select Graphic Rendition) codes
|
|
70
|
+
* that can be represented in HTML.
|
|
71
|
+
* For example, cursor movement codes are ignored and hidden from output.
|
|
72
|
+
* The default style uses colors that are very close to the prescribed
|
|
73
|
+
* standard. The standard assumes that the text will have a black
|
|
74
|
+
* background. These colors are set as inline styles on the SPAN tags.
|
|
75
|
+
*
|
|
76
|
+
* Another option is to set `use_classes: true` in the options argument.
|
|
77
|
+
* This will instead set classes on the spans so the colors can be set via
|
|
78
|
+
* CSS. The class names used are of the format `ansi-*-fg/bg` and
|
|
79
|
+
* `ansi-bright-*-fg/bg` where `*` is the color name,
|
|
80
|
+
* i.e black/red/green/yellow/blue/magenta/cyan/white.
|
|
81
|
+
*
|
|
82
|
+
* @name Anser.ansiToHtml
|
|
83
|
+
* @function
|
|
84
|
+
* @param {String} txt The input text.
|
|
85
|
+
* @param {Object} options The options passed to the ansiToHTML method.
|
|
86
|
+
* @returns {String} The HTML output.
|
|
87
|
+
*/
|
|
88
|
+
static ansiToHtml(e, t) {
|
|
89
|
+
return new n().ansiToHtml(e, t);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Anser.ansiToJson
|
|
93
|
+
* Converts ANSI input into JSON output.
|
|
94
|
+
*
|
|
95
|
+
* @name Anser.ansiToJson
|
|
96
|
+
* @function
|
|
97
|
+
* @param {String} txt The input text.
|
|
98
|
+
* @param {Object} options The options passed to the ansiToHTML method.
|
|
99
|
+
* @returns {String} The HTML output.
|
|
100
|
+
*/
|
|
101
|
+
static ansiToJson(e, t) {
|
|
102
|
+
return new n().ansiToJson(e, t);
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Anser.ansiToText
|
|
106
|
+
* Converts ANSI input into text output.
|
|
107
|
+
*
|
|
108
|
+
* @name Anser.ansiToText
|
|
109
|
+
* @function
|
|
110
|
+
* @param {String} txt The input text.
|
|
111
|
+
* @returns {String} The text output.
|
|
112
|
+
*/
|
|
113
|
+
static ansiToText(e) {
|
|
114
|
+
return new n().ansiToText(e);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Anser
|
|
118
|
+
* The `Anser` class.
|
|
119
|
+
*
|
|
120
|
+
* @name Anser
|
|
121
|
+
* @function
|
|
122
|
+
* @returns {Anser}
|
|
123
|
+
*/
|
|
124
|
+
constructor() {
|
|
125
|
+
this.fg = this.bg = this.fg_truecolor = this.bg_truecolor = null, this.bright = 0, this.decorations = [];
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* setupPalette
|
|
129
|
+
* Sets up the palette.
|
|
130
|
+
*
|
|
131
|
+
* @name setupPalette
|
|
132
|
+
* @function
|
|
133
|
+
*/
|
|
134
|
+
setupPalette() {
|
|
135
|
+
this.PALETTE_COLORS = [];
|
|
136
|
+
for (let i = 0; i < 2; ++i)
|
|
137
|
+
for (let l = 0; l < 8; ++l)
|
|
138
|
+
this.PALETTE_COLORS.push(a[i][l].color);
|
|
139
|
+
let e = [0, 95, 135, 175, 215, 255], t = (i, l, f) => e[i] + ", " + e[l] + ", " + e[f];
|
|
140
|
+
for (let i = 0; i < 6; ++i)
|
|
141
|
+
for (let l = 0; l < 6; ++l)
|
|
142
|
+
for (let f = 0; f < 6; ++f)
|
|
143
|
+
this.PALETTE_COLORS.push(t(i, l, f));
|
|
144
|
+
let s = 8;
|
|
145
|
+
for (let i = 0; i < 24; ++i, s += 10)
|
|
146
|
+
this.PALETTE_COLORS.push(s + ", " + s + ", " + s);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* escapeForHtml
|
|
150
|
+
* Escapes the input text.
|
|
151
|
+
*
|
|
152
|
+
* @name escapeForHtml
|
|
153
|
+
* @function
|
|
154
|
+
* @param {String} txt The input text.
|
|
155
|
+
* @returns {String} The escpaed HTML output.
|
|
156
|
+
*/
|
|
157
|
+
escapeForHtml(e) {
|
|
158
|
+
return e.replace(
|
|
159
|
+
/[&<>\"]/gm,
|
|
160
|
+
(t) => t == "&" ? "&" : t == '"' ? """ : t == "<" ? "<" : t == ">" ? ">" : ""
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* linkify
|
|
165
|
+
* Adds HTML link elements.
|
|
166
|
+
*
|
|
167
|
+
* @name linkify
|
|
168
|
+
* @function
|
|
169
|
+
* @param {String} txt The input text.
|
|
170
|
+
* @returns {String} The HTML output containing link elements.
|
|
171
|
+
*/
|
|
172
|
+
linkify(e) {
|
|
173
|
+
return e.replace(r, (t) => `<a href="${t}">${t}</a>`);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* ansiToHtml
|
|
177
|
+
* Converts ANSI input into HTML output.
|
|
178
|
+
*
|
|
179
|
+
* @name ansiToHtml
|
|
180
|
+
* @function
|
|
181
|
+
* @param {String} txt The input text.
|
|
182
|
+
* @param {Object} options The options passed ot the `process` method.
|
|
183
|
+
* @returns {String} The HTML output.
|
|
184
|
+
*/
|
|
185
|
+
ansiToHtml(e, t) {
|
|
186
|
+
return this.process(e, t, !0);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* ansiToJson
|
|
190
|
+
* Converts ANSI input into HTML output.
|
|
191
|
+
*
|
|
192
|
+
* @name ansiToJson
|
|
193
|
+
* @function
|
|
194
|
+
* @param {String} txt The input text.
|
|
195
|
+
* @param {Object} options The options passed ot the `process` method.
|
|
196
|
+
* @returns {String} The JSON output.
|
|
197
|
+
*/
|
|
198
|
+
ansiToJson(e, t) {
|
|
199
|
+
return t = t || {}, t.json = !0, t.clearLine = !1, this.process(e, t, !0);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* ansiToText
|
|
203
|
+
* Converts ANSI input into HTML output.
|
|
204
|
+
*
|
|
205
|
+
* @name ansiToText
|
|
206
|
+
* @function
|
|
207
|
+
* @param {String} txt The input text.
|
|
208
|
+
* @returns {String} The text output.
|
|
209
|
+
*/
|
|
210
|
+
ansiToText(e) {
|
|
211
|
+
return this.process(e, {}, !1);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* process
|
|
215
|
+
* Processes the input.
|
|
216
|
+
*
|
|
217
|
+
* @name process
|
|
218
|
+
* @function
|
|
219
|
+
* @param {String} txt The input text.
|
|
220
|
+
* @param {Object} options An object passed to `processChunk` method, extended with:
|
|
221
|
+
*
|
|
222
|
+
* - `json` (Boolean): If `true`, the result will be an object.
|
|
223
|
+
* - `use_classes` (Boolean): If `true`, HTML classes will be appended to the HTML output.
|
|
224
|
+
*
|
|
225
|
+
* @param {Boolean} markup
|
|
226
|
+
*/
|
|
227
|
+
process(e, t, s) {
|
|
228
|
+
let i = this, l = e.split(/\033\[/), f = l.shift();
|
|
229
|
+
t == null && (t = {}), t.clearLine = /\r/.test(e);
|
|
230
|
+
let h = l.map((p) => this.processChunk(p, t, s));
|
|
231
|
+
if (t && t.json) {
|
|
232
|
+
let p = i.processChunkJson("");
|
|
233
|
+
return p.content = f, p.clearLine = t.clearLine, h.unshift(p), t.remove_empty && (h = h.filter((u) => !u.isEmpty())), h;
|
|
234
|
+
} else
|
|
235
|
+
h.unshift(f);
|
|
236
|
+
return h.join("");
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* processChunkJson
|
|
240
|
+
* Processes the current chunk into json output.
|
|
241
|
+
*
|
|
242
|
+
* @name processChunkJson
|
|
243
|
+
* @function
|
|
244
|
+
* @param {String} text The input text.
|
|
245
|
+
* @param {Object} options An object containing the following fields:
|
|
246
|
+
*
|
|
247
|
+
* - `json` (Boolean): If `true`, the result will be an object.
|
|
248
|
+
* - `use_classes` (Boolean): If `true`, HTML classes will be appended to the HTML output.
|
|
249
|
+
*
|
|
250
|
+
* @param {Boolean} markup If false, the colors will not be parsed.
|
|
251
|
+
* @return {Object} The result object:
|
|
252
|
+
*
|
|
253
|
+
* - `content` (String): The text.
|
|
254
|
+
* - `fg` (String|null): The foreground color.
|
|
255
|
+
* - `bg` (String|null): The background color.
|
|
256
|
+
* - `fg_truecolor` (String|null): The foreground true color (if 16m color is enabled).
|
|
257
|
+
* - `bg_truecolor` (String|null): The background true color (if 16m color is enabled).
|
|
258
|
+
* - `clearLine` (Boolean): `true` if a carriageReturn \r was fount at end of line.
|
|
259
|
+
* - `was_processed` (Bolean): `true` if the colors were processed, `false` otherwise.
|
|
260
|
+
* - `isEmpty` (Function): A function returning `true` if the content is empty, or `false` otherwise.
|
|
261
|
+
*
|
|
262
|
+
*/
|
|
263
|
+
processChunkJson(e, t, s) {
|
|
264
|
+
t = typeof t > "u" ? {} : t;
|
|
265
|
+
let i = t.use_classes = typeof t.use_classes < "u" && t.use_classes, l = t.key = i ? "class" : "color", f = {
|
|
266
|
+
content: e,
|
|
267
|
+
fg: null,
|
|
268
|
+
bg: null,
|
|
269
|
+
fg_truecolor: null,
|
|
270
|
+
bg_truecolor: null,
|
|
271
|
+
isInverted: !1,
|
|
272
|
+
clearLine: t.clearLine,
|
|
273
|
+
decoration: null,
|
|
274
|
+
decorations: [],
|
|
275
|
+
was_processed: !1,
|
|
276
|
+
isEmpty: () => !f.content
|
|
277
|
+
}, h = e.match(/^([!\x3c-\x3f]*)([\d;]*)([\x20-\x2c]*[\x40-\x7e])([\s\S]*)/m);
|
|
278
|
+
if (!h) return f;
|
|
279
|
+
f.content = h[4];
|
|
280
|
+
let p = h[2].split(";");
|
|
281
|
+
if (h[1] !== "" || h[3] !== "m" || !s)
|
|
282
|
+
return f;
|
|
283
|
+
let u = this;
|
|
284
|
+
for (; p.length > 0; ) {
|
|
285
|
+
let d = p.shift(), c = parseInt(d);
|
|
286
|
+
if (isNaN(c) || c === 0)
|
|
287
|
+
u.fg = u.bg = null, u.decorations = [];
|
|
288
|
+
else if (c === 1)
|
|
289
|
+
u.decorations.push("bold");
|
|
290
|
+
else if (c === 2)
|
|
291
|
+
u.decorations.push("dim");
|
|
292
|
+
else if (c === 3)
|
|
293
|
+
u.decorations.push("italic");
|
|
294
|
+
else if (c === 4)
|
|
295
|
+
u.decorations.push("underline");
|
|
296
|
+
else if (c === 5)
|
|
297
|
+
u.decorations.push("blink");
|
|
298
|
+
else if (c === 7)
|
|
299
|
+
u.decorations.push("reverse");
|
|
300
|
+
else if (c === 8)
|
|
301
|
+
u.decorations.push("hidden");
|
|
302
|
+
else if (c === 9)
|
|
303
|
+
u.decorations.push("strikethrough");
|
|
304
|
+
else if (c === 21)
|
|
305
|
+
u.removeDecoration("bold");
|
|
306
|
+
else if (c === 22)
|
|
307
|
+
u.removeDecoration("bold"), u.removeDecoration("dim");
|
|
308
|
+
else if (c === 23)
|
|
309
|
+
u.removeDecoration("italic");
|
|
310
|
+
else if (c === 24)
|
|
311
|
+
u.removeDecoration("underline");
|
|
312
|
+
else if (c === 25)
|
|
313
|
+
u.removeDecoration("blink");
|
|
314
|
+
else if (c === 27)
|
|
315
|
+
u.removeDecoration("reverse");
|
|
316
|
+
else if (c === 28)
|
|
317
|
+
u.removeDecoration("hidden");
|
|
318
|
+
else if (c === 29)
|
|
319
|
+
u.removeDecoration("strikethrough");
|
|
320
|
+
else if (c === 39)
|
|
321
|
+
u.fg = null;
|
|
322
|
+
else if (c === 49)
|
|
323
|
+
u.bg = null;
|
|
324
|
+
else if (c >= 30 && c < 38)
|
|
325
|
+
u.fg = a[0][c % 10][l];
|
|
326
|
+
else if (c >= 90 && c < 98)
|
|
327
|
+
u.fg = a[1][c % 10][l];
|
|
328
|
+
else if (c >= 40 && c < 48)
|
|
329
|
+
u.bg = a[0][c % 10][l];
|
|
330
|
+
else if (c >= 100 && c < 108)
|
|
331
|
+
u.bg = a[1][c % 10][l];
|
|
332
|
+
else if (c === 38 || c === 48) {
|
|
333
|
+
let m = c === 38;
|
|
334
|
+
if (p.length >= 1) {
|
|
335
|
+
let O = p.shift();
|
|
336
|
+
if (O === "5" && p.length >= 1) {
|
|
337
|
+
let _ = parseInt(p.shift());
|
|
338
|
+
if (_ >= 0 && _ <= 255)
|
|
339
|
+
if (!i)
|
|
340
|
+
this.PALETTE_COLORS || u.setupPalette(), m ? u.fg = this.PALETTE_COLORS[_] : u.bg = this.PALETTE_COLORS[_];
|
|
341
|
+
else {
|
|
342
|
+
let x = _ >= 16 ? "ansi-palette-" + _ : a[_ > 7 ? 1 : 0][_ % 8].class;
|
|
343
|
+
m ? u.fg = x : u.bg = x;
|
|
344
|
+
}
|
|
345
|
+
} else if (O === "2" && p.length >= 3) {
|
|
346
|
+
let _ = parseInt(p.shift()), x = parseInt(p.shift()), w = parseInt(p.shift());
|
|
347
|
+
if (_ >= 0 && _ <= 255 && x >= 0 && x <= 255 && w >= 0 && w <= 255) {
|
|
348
|
+
let g = _ + ", " + x + ", " + w;
|
|
349
|
+
i ? m ? (u.fg = "ansi-truecolor", u.fg_truecolor = g) : (u.bg = "ansi-truecolor", u.bg_truecolor = g) : m ? u.fg = g : u.bg = g;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
return u.fg === null && u.bg === null && u.decorations.length === 0 || (f.fg = u.fg, f.bg = u.bg, f.fg_truecolor = u.fg_truecolor, f.bg_truecolor = u.bg_truecolor, f.decorations = u.decorations, f.decoration = u.decorations.slice(-1).pop() || null, f.was_processed = !0), f;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* processChunk
|
|
359
|
+
* Processes the current chunk of text.
|
|
360
|
+
*
|
|
361
|
+
* @name processChunk
|
|
362
|
+
* @function
|
|
363
|
+
* @param {String} text The input text.
|
|
364
|
+
* @param {Object} options An object containing the following fields:
|
|
365
|
+
*
|
|
366
|
+
* - `json` (Boolean): If `true`, the result will be an object.
|
|
367
|
+
* - `use_classes` (Boolean): If `true`, HTML classes will be appended to the HTML output.
|
|
368
|
+
*
|
|
369
|
+
* @param {Boolean} markup If false, the colors will not be parsed.
|
|
370
|
+
* @return {Object|String} The result (object if `json` is wanted back or string otherwise).
|
|
371
|
+
*/
|
|
372
|
+
processChunk(e, t, s) {
|
|
373
|
+
t = t || {};
|
|
374
|
+
let i = this.processChunkJson(e, t, s), l = t.use_classes;
|
|
375
|
+
if (i.decorations = i.decorations.filter((c) => {
|
|
376
|
+
if (c === "reverse") {
|
|
377
|
+
i.fg || (i.fg = a[0][7][l ? "class" : "color"]), i.bg || (i.bg = a[0][0][l ? "class" : "color"]);
|
|
378
|
+
let m = i.fg;
|
|
379
|
+
i.fg = i.bg, i.bg = m;
|
|
380
|
+
let O = i.fg_truecolor;
|
|
381
|
+
return i.fg_truecolor = i.bg_truecolor, i.bg_truecolor = O, i.isInverted = !0, !1;
|
|
382
|
+
}
|
|
383
|
+
return !0;
|
|
384
|
+
}), t.json)
|
|
385
|
+
return i;
|
|
386
|
+
if (i.isEmpty())
|
|
387
|
+
return "";
|
|
388
|
+
if (!i.was_processed)
|
|
389
|
+
return i.content;
|
|
390
|
+
let f = [], h = [], p = [], u = {}, d = (c) => {
|
|
391
|
+
let m = [], O;
|
|
392
|
+
for (O in c)
|
|
393
|
+
c.hasOwnProperty(O) && m.push("data-" + O + '="' + this.escapeForHtml(c[O]) + '"');
|
|
394
|
+
return m.length > 0 ? " " + m.join(" ") : "";
|
|
395
|
+
};
|
|
396
|
+
return i.isInverted && (u["ansi-is-inverted"] = "true"), i.fg && (l ? (f.push(i.fg + "-fg"), i.fg_truecolor !== null && (u["ansi-truecolor-fg"] = i.fg_truecolor, i.fg_truecolor = null)) : f.push("color:rgb(" + i.fg + ")")), i.bg && (l ? (f.push(i.bg + "-bg"), i.bg_truecolor !== null && (u["ansi-truecolor-bg"] = i.bg_truecolor, i.bg_truecolor = null)) : f.push("background-color:rgb(" + i.bg + ")")), i.decorations.forEach((c) => {
|
|
397
|
+
if (l) {
|
|
398
|
+
h.push("ansi-" + c);
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
c === "bold" ? h.push("font-weight:bold") : c === "dim" ? h.push("opacity:0.5") : c === "italic" ? h.push("font-style:italic") : c === "hidden" ? h.push("visibility:hidden") : c === "strikethrough" ? p.push("line-through") : p.push(c);
|
|
402
|
+
}), p.length && h.push("text-decoration:" + p.join(" ")), l ? '<span class="' + f.concat(h).join(" ") + '"' + d(u) + ">" + i.content + "</span>" : '<span style="' + f.concat(h).join(";") + '"' + d(u) + ">" + i.content + "</span>";
|
|
403
|
+
}
|
|
404
|
+
removeDecoration(e) {
|
|
405
|
+
const t = this.decorations.indexOf(e);
|
|
406
|
+
t >= 0 && this.decorations.splice(t, 1);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
return M = n, M;
|
|
410
|
+
}
|
|
411
|
+
var xe = ye();
|
|
412
|
+
const _e = /* @__PURE__ */ me(xe);
|
|
413
|
+
var P = { exports: {} }, U;
|
|
414
|
+
function we() {
|
|
415
|
+
if (U) return P.exports;
|
|
416
|
+
U = 1;
|
|
417
|
+
function a(e) {
|
|
418
|
+
if (!e) return "";
|
|
419
|
+
if (!/\r/.test(e)) return e;
|
|
420
|
+
for (e = e.replace(/\r+\n/gm, `
|
|
421
|
+
`); /\r./.test(e); )
|
|
422
|
+
e = e.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm, function(t, s, i) {
|
|
423
|
+
return i + s.slice(i.length);
|
|
424
|
+
});
|
|
425
|
+
return e;
|
|
426
|
+
}
|
|
427
|
+
function r(e) {
|
|
428
|
+
for (var t = 0, s = 0; s < e.length; s++)
|
|
429
|
+
e[t].length <= e[s].length && (t = s);
|
|
430
|
+
return t;
|
|
431
|
+
}
|
|
432
|
+
function n(e) {
|
|
433
|
+
if (!/\r/.test(e)) return e;
|
|
434
|
+
for (var t = e.split("\r"), s = []; t.length > 0; ) {
|
|
435
|
+
var i = r(t);
|
|
436
|
+
s.push(t[i]), t = t.slice(i + 1);
|
|
437
|
+
}
|
|
438
|
+
return s.join("\r");
|
|
439
|
+
}
|
|
440
|
+
function o(e) {
|
|
441
|
+
if (!e) return "";
|
|
442
|
+
if (!/\r/.test(e)) return e;
|
|
443
|
+
if (!/\n/.test(e)) return n(e);
|
|
444
|
+
e = e.replace(/\r+\n/gm, `
|
|
445
|
+
`);
|
|
446
|
+
var t = e.lastIndexOf(`
|
|
447
|
+
`);
|
|
448
|
+
return a(e.slice(0, t)) + `
|
|
449
|
+
` + n(e.slice(t + 1));
|
|
450
|
+
}
|
|
451
|
+
return P.exports = a, P.exports.escapeCarriageReturn = a, P.exports.escapeCarriageReturnSafe = o, P.exports;
|
|
452
|
+
}
|
|
453
|
+
var Oe = we(), v = (a, r) => () => (r || a((r = { exports: {} }).exports, r), r.exports), E = v((a, r) => {
|
|
454
|
+
r.exports = function(n) {
|
|
455
|
+
try {
|
|
456
|
+
return !!n();
|
|
457
|
+
} catch {
|
|
458
|
+
return !0;
|
|
459
|
+
}
|
|
460
|
+
};
|
|
461
|
+
}), j = v((a, r) => {
|
|
462
|
+
var n = E();
|
|
463
|
+
r.exports = !n(function() {
|
|
464
|
+
return Object.defineProperty({}, 1, { get: function() {
|
|
465
|
+
return 7;
|
|
466
|
+
} })[1] != 7;
|
|
467
|
+
});
|
|
468
|
+
}), k = v((a, r) => {
|
|
469
|
+
var n = function(o) {
|
|
470
|
+
return o && o.Math == Math && o;
|
|
471
|
+
};
|
|
472
|
+
r.exports = n(typeof globalThis == "object" && globalThis) || n(typeof window == "object" && window) || n(typeof self == "object" && self) || n(typeof global == "object" && global) || /* @__PURE__ */ (function() {
|
|
473
|
+
return this;
|
|
474
|
+
})() || a || Function("return this")();
|
|
475
|
+
}), ke = v((a, r) => {
|
|
476
|
+
r.exports = !1;
|
|
477
|
+
}), je = v((a, r) => {
|
|
478
|
+
var n = k(), o = Object.defineProperty;
|
|
479
|
+
r.exports = function(e, t) {
|
|
480
|
+
try {
|
|
481
|
+
o(n, e, { value: t, configurable: !0, writable: !0 });
|
|
482
|
+
} catch {
|
|
483
|
+
n[e] = t;
|
|
484
|
+
}
|
|
485
|
+
return t;
|
|
486
|
+
};
|
|
487
|
+
}), $ = v((a, r) => {
|
|
488
|
+
var n = k(), o = je(), e = "__core-js_shared__", t = n[e] || o(e, {});
|
|
489
|
+
r.exports = t;
|
|
490
|
+
}), X = v((a, r) => {
|
|
491
|
+
var n = ke(), o = $();
|
|
492
|
+
(r.exports = function(e, t) {
|
|
493
|
+
return o[e] || (o[e] = t !== void 0 ? t : {});
|
|
494
|
+
})("versions", []).push({ version: "3.32.0", mode: n ? "pure" : "global", copyright: "© 2014-2023 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE", source: "https://github.com/zloirock/core-js" });
|
|
495
|
+
}), G = v((a, r) => {
|
|
496
|
+
var n = E();
|
|
497
|
+
r.exports = !n(function() {
|
|
498
|
+
var o = (function() {
|
|
499
|
+
}).bind();
|
|
500
|
+
return typeof o != "function" || o.hasOwnProperty("prototype");
|
|
501
|
+
});
|
|
502
|
+
}), S = v((a, r) => {
|
|
503
|
+
var n = G(), o = Function.prototype, e = o.call, t = n && o.bind.bind(e, e);
|
|
504
|
+
r.exports = n ? t : function(s) {
|
|
505
|
+
return function() {
|
|
506
|
+
return e.apply(s, arguments);
|
|
507
|
+
};
|
|
508
|
+
};
|
|
509
|
+
}), Y = v((a, r) => {
|
|
510
|
+
r.exports = function(n) {
|
|
511
|
+
return n == null;
|
|
512
|
+
};
|
|
513
|
+
}), Z = v((a, r) => {
|
|
514
|
+
var n = Y(), o = TypeError;
|
|
515
|
+
r.exports = function(e) {
|
|
516
|
+
if (n(e)) throw o("Can't call method on " + e);
|
|
517
|
+
return e;
|
|
518
|
+
};
|
|
519
|
+
}), K = v((a, r) => {
|
|
520
|
+
var n = Z(), o = Object;
|
|
521
|
+
r.exports = function(e) {
|
|
522
|
+
return o(n(e));
|
|
523
|
+
};
|
|
524
|
+
}), D = v((a, r) => {
|
|
525
|
+
var n = S(), o = K(), e = n({}.hasOwnProperty);
|
|
526
|
+
r.exports = Object.hasOwn || function(t, s) {
|
|
527
|
+
return e(o(t), s);
|
|
528
|
+
};
|
|
529
|
+
}), Q = v((a, r) => {
|
|
530
|
+
var n = S(), o = 0, e = Math.random(), t = n(1 .toString);
|
|
531
|
+
r.exports = function(s) {
|
|
532
|
+
return "Symbol(" + (s === void 0 ? "" : s) + ")_" + t(++o + e, 36);
|
|
533
|
+
};
|
|
534
|
+
}), Se = v((a, r) => {
|
|
535
|
+
r.exports = typeof navigator < "u" && String(navigator.userAgent) || "";
|
|
536
|
+
}), Te = v((a, r) => {
|
|
537
|
+
var n = k(), o = Se(), e = n.process, t = n.Deno, s = e && e.versions || t && t.version, i = s && s.v8, l, f;
|
|
538
|
+
i && (l = i.split("."), f = l[0] > 0 && l[0] < 4 ? 1 : +(l[0] + l[1])), !f && o && (l = o.match(/Edge\/(\d+)/), (!l || l[1] >= 74) && (l = o.match(/Chrome\/(\d+)/), l && (f = +l[1]))), r.exports = f;
|
|
539
|
+
}), ee = v((a, r) => {
|
|
540
|
+
var n = Te(), o = E(), e = k(), t = e.String;
|
|
541
|
+
r.exports = !!Object.getOwnPropertySymbols && !o(function() {
|
|
542
|
+
var s = /* @__PURE__ */ Symbol();
|
|
543
|
+
return !t(s) || !(Object(s) instanceof Symbol) || !Symbol.sham && n && n < 41;
|
|
544
|
+
});
|
|
545
|
+
}), te = v((a, r) => {
|
|
546
|
+
var n = ee();
|
|
547
|
+
r.exports = n && !Symbol.sham && typeof Symbol.iterator == "symbol";
|
|
548
|
+
}), re = v((a, r) => {
|
|
549
|
+
var n = k(), o = X(), e = D(), t = Q(), s = ee(), i = te(), l = n.Symbol, f = o("wks"), h = i ? l.for || l : l && l.withoutSetter || t;
|
|
550
|
+
r.exports = function(p) {
|
|
551
|
+
return e(f, p) || (f[p] = s && e(l, p) ? l[p] : h("Symbol." + p)), f[p];
|
|
552
|
+
};
|
|
553
|
+
}), ne = v((a, r) => {
|
|
554
|
+
var n = typeof document == "object" && document.all, o = typeof n > "u" && n !== void 0;
|
|
555
|
+
r.exports = { all: n, IS_HTMLDDA: o };
|
|
556
|
+
}), T = v((a, r) => {
|
|
557
|
+
var n = ne(), o = n.all;
|
|
558
|
+
r.exports = n.IS_HTMLDDA ? function(e) {
|
|
559
|
+
return typeof e == "function" || e === o;
|
|
560
|
+
} : function(e) {
|
|
561
|
+
return typeof e == "function";
|
|
562
|
+
};
|
|
563
|
+
}), I = v((a, r) => {
|
|
564
|
+
var n = T(), o = ne(), e = o.all;
|
|
565
|
+
r.exports = o.IS_HTMLDDA ? function(t) {
|
|
566
|
+
return typeof t == "object" ? t !== null : n(t) || t === e;
|
|
567
|
+
} : function(t) {
|
|
568
|
+
return typeof t == "object" ? t !== null : n(t);
|
|
569
|
+
};
|
|
570
|
+
}), H = v((a, r) => {
|
|
571
|
+
var n = I(), o = String, e = TypeError;
|
|
572
|
+
r.exports = function(t) {
|
|
573
|
+
if (n(t)) return t;
|
|
574
|
+
throw e(o(t) + " is not an object");
|
|
575
|
+
};
|
|
576
|
+
}), oe = v((a, r) => {
|
|
577
|
+
var n = j(), o = E();
|
|
578
|
+
r.exports = n && o(function() {
|
|
579
|
+
return Object.defineProperty(function() {
|
|
580
|
+
}, "prototype", { value: 42, writable: !1 }).prototype != 42;
|
|
581
|
+
});
|
|
582
|
+
}), ae = v((a, r) => {
|
|
583
|
+
var n = k(), o = I(), e = n.document, t = o(e) && o(e.createElement);
|
|
584
|
+
r.exports = function(s) {
|
|
585
|
+
return t ? e.createElement(s) : {};
|
|
586
|
+
};
|
|
587
|
+
}), Ee = v((a, r) => {
|
|
588
|
+
var n = j(), o = E(), e = ae();
|
|
589
|
+
r.exports = !n && !o(function() {
|
|
590
|
+
return Object.defineProperty(e("div"), "a", { get: function() {
|
|
591
|
+
return 7;
|
|
592
|
+
} }).a != 7;
|
|
593
|
+
});
|
|
594
|
+
}), ie = v((a, r) => {
|
|
595
|
+
var n = G(), o = Function.prototype.call;
|
|
596
|
+
r.exports = n ? o.bind(o) : function() {
|
|
597
|
+
return o.apply(o, arguments);
|
|
598
|
+
};
|
|
599
|
+
}), se = v((a, r) => {
|
|
600
|
+
var n = k(), o = T(), e = function(t) {
|
|
601
|
+
return o(t) ? t : void 0;
|
|
602
|
+
};
|
|
603
|
+
r.exports = function(t, s) {
|
|
604
|
+
return arguments.length < 2 ? e(n[t]) : n[t] && n[t][s];
|
|
605
|
+
};
|
|
606
|
+
}), Ce = v((a, r) => {
|
|
607
|
+
var n = S();
|
|
608
|
+
r.exports = n({}.isPrototypeOf);
|
|
609
|
+
}), ue = v((a, r) => {
|
|
610
|
+
var n = se(), o = T(), e = Ce(), t = te(), s = Object;
|
|
611
|
+
r.exports = t ? function(i) {
|
|
612
|
+
return typeof i == "symbol";
|
|
613
|
+
} : function(i) {
|
|
614
|
+
var l = n("Symbol");
|
|
615
|
+
return o(l) && e(l.prototype, s(i));
|
|
616
|
+
};
|
|
617
|
+
}), Le = v((a, r) => {
|
|
618
|
+
var n = String;
|
|
619
|
+
r.exports = function(o) {
|
|
620
|
+
try {
|
|
621
|
+
return n(o);
|
|
622
|
+
} catch {
|
|
623
|
+
return "Object";
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
}), Pe = v((a, r) => {
|
|
627
|
+
var n = T(), o = Le(), e = TypeError;
|
|
628
|
+
r.exports = function(t) {
|
|
629
|
+
if (n(t)) return t;
|
|
630
|
+
throw e(o(t) + " is not a function");
|
|
631
|
+
};
|
|
632
|
+
}), De = v((a, r) => {
|
|
633
|
+
var n = Pe(), o = Y();
|
|
634
|
+
r.exports = function(e, t) {
|
|
635
|
+
var s = e[t];
|
|
636
|
+
return o(s) ? void 0 : n(s);
|
|
637
|
+
};
|
|
638
|
+
}), Ie = v((a, r) => {
|
|
639
|
+
var n = ie(), o = T(), e = I(), t = TypeError;
|
|
640
|
+
r.exports = function(s, i) {
|
|
641
|
+
var l, f;
|
|
642
|
+
if (i === "string" && o(l = s.toString) && !e(f = n(l, s)) || o(l = s.valueOf) && !e(f = n(l, s)) || i !== "string" && o(l = s.toString) && !e(f = n(l, s))) return f;
|
|
643
|
+
throw t("Can't convert object to primitive value");
|
|
644
|
+
};
|
|
645
|
+
}), Re = v((a, r) => {
|
|
646
|
+
var n = ie(), o = I(), e = ue(), t = De(), s = Ie(), i = re(), l = TypeError, f = i("toPrimitive");
|
|
647
|
+
r.exports = function(h, p) {
|
|
648
|
+
if (!o(h) || e(h)) return h;
|
|
649
|
+
var u = t(h, f), d;
|
|
650
|
+
if (u) {
|
|
651
|
+
if (p === void 0 && (p = "default"), d = n(u, h, p), !o(d) || e(d)) return d;
|
|
652
|
+
throw l("Can't convert object to primitive value");
|
|
653
|
+
}
|
|
654
|
+
return p === void 0 && (p = "number"), s(h, p);
|
|
655
|
+
};
|
|
656
|
+
}), Ae = v((a, r) => {
|
|
657
|
+
var n = Re(), o = ue();
|
|
658
|
+
r.exports = function(e) {
|
|
659
|
+
var t = n(e, "string");
|
|
660
|
+
return o(t) ? t : t + "";
|
|
661
|
+
};
|
|
662
|
+
}), A = v((a) => {
|
|
663
|
+
var r = j(), n = Ee(), o = oe(), e = H(), t = Ae(), s = TypeError, i = Object.defineProperty, l = Object.getOwnPropertyDescriptor, f = "enumerable", h = "configurable", p = "writable";
|
|
664
|
+
a.f = r ? o ? function(u, d, c) {
|
|
665
|
+
if (e(u), d = t(d), e(c), typeof u == "function" && d === "prototype" && "value" in c && p in c && !c[p]) {
|
|
666
|
+
var m = l(u, d);
|
|
667
|
+
m && m[p] && (u[d] = c.value, c = { configurable: h in c ? c[h] : m[h], enumerable: f in c ? c[f] : m[f], writable: !1 });
|
|
668
|
+
}
|
|
669
|
+
return i(u, d, c);
|
|
670
|
+
} : i : function(u, d, c) {
|
|
671
|
+
if (e(u), d = t(d), e(c), n) try {
|
|
672
|
+
return i(u, d, c);
|
|
673
|
+
} catch {
|
|
674
|
+
}
|
|
675
|
+
if ("get" in c || "set" in c) throw s("Accessors not supported");
|
|
676
|
+
return "value" in c && (u[d] = c.value), u;
|
|
677
|
+
};
|
|
678
|
+
}), Fe = v((a, r) => {
|
|
679
|
+
var n = S(), o = n({}.toString), e = n("".slice);
|
|
680
|
+
r.exports = function(t) {
|
|
681
|
+
return e(o(t), 8, -1);
|
|
682
|
+
};
|
|
683
|
+
}), Me = v((a, r) => {
|
|
684
|
+
var n = S(), o = E(), e = Fe(), t = Object, s = n("".split);
|
|
685
|
+
r.exports = o(function() {
|
|
686
|
+
return !t("z").propertyIsEnumerable(0);
|
|
687
|
+
}) ? function(i) {
|
|
688
|
+
return e(i) == "String" ? s(i, "") : t(i);
|
|
689
|
+
} : t;
|
|
690
|
+
}), q = v((a, r) => {
|
|
691
|
+
var n = Me(), o = Z();
|
|
692
|
+
r.exports = function(e) {
|
|
693
|
+
return n(o(e));
|
|
694
|
+
};
|
|
695
|
+
}), $e = v((a, r) => {
|
|
696
|
+
var n = Math.ceil, o = Math.floor;
|
|
697
|
+
r.exports = Math.trunc || function(e) {
|
|
698
|
+
var t = +e;
|
|
699
|
+
return (t > 0 ? o : n)(t);
|
|
700
|
+
};
|
|
701
|
+
}), le = v((a, r) => {
|
|
702
|
+
var n = $e();
|
|
703
|
+
r.exports = function(o) {
|
|
704
|
+
var e = +o;
|
|
705
|
+
return e !== e || e === 0 ? 0 : n(e);
|
|
706
|
+
};
|
|
707
|
+
}), He = v((a, r) => {
|
|
708
|
+
var n = le(), o = Math.max, e = Math.min;
|
|
709
|
+
r.exports = function(t, s) {
|
|
710
|
+
var i = n(t);
|
|
711
|
+
return i < 0 ? o(i + s, 0) : e(i, s);
|
|
712
|
+
};
|
|
713
|
+
}), qe = v((a, r) => {
|
|
714
|
+
var n = le(), o = Math.min;
|
|
715
|
+
r.exports = function(e) {
|
|
716
|
+
return e > 0 ? o(n(e), 9007199254740991) : 0;
|
|
717
|
+
};
|
|
718
|
+
}), ce = v((a, r) => {
|
|
719
|
+
var n = qe();
|
|
720
|
+
r.exports = function(o) {
|
|
721
|
+
return n(o.length);
|
|
722
|
+
};
|
|
723
|
+
}), Ne = v((a, r) => {
|
|
724
|
+
var n = q(), o = He(), e = ce(), t = function(s) {
|
|
725
|
+
return function(i, l, f) {
|
|
726
|
+
var h = n(i), p = e(h), u = o(f, p), d;
|
|
727
|
+
if (s && l != l) {
|
|
728
|
+
for (; p > u; ) if (d = h[u++], d != d) return !0;
|
|
729
|
+
} else for (; p > u; u++) if ((s || u in h) && h[u] === l) return s || u || 0;
|
|
730
|
+
return !s && -1;
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
r.exports = { includes: t(!0), indexOf: t(!1) };
|
|
734
|
+
}), N = v((a, r) => {
|
|
735
|
+
r.exports = {};
|
|
736
|
+
}), ze = v((a, r) => {
|
|
737
|
+
var n = S(), o = D(), e = q(), t = Ne().indexOf, s = N(), i = n([].push);
|
|
738
|
+
r.exports = function(l, f) {
|
|
739
|
+
var h = e(l), p = 0, u = [], d;
|
|
740
|
+
for (d in h) !o(s, d) && o(h, d) && i(u, d);
|
|
741
|
+
for (; f.length > p; ) o(h, d = f[p++]) && (~t(u, d) || i(u, d));
|
|
742
|
+
return u;
|
|
743
|
+
};
|
|
744
|
+
}), fe = v((a, r) => {
|
|
745
|
+
r.exports = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"];
|
|
746
|
+
}), Je = v((a, r) => {
|
|
747
|
+
var n = ze(), o = fe();
|
|
748
|
+
r.exports = Object.keys || function(e) {
|
|
749
|
+
return n(e, o);
|
|
750
|
+
};
|
|
751
|
+
}), We = v((a) => {
|
|
752
|
+
var r = j(), n = oe(), o = A(), e = H(), t = q(), s = Je();
|
|
753
|
+
a.f = r && !n ? Object.defineProperties : function(i, l) {
|
|
754
|
+
e(i);
|
|
755
|
+
for (var f = t(l), h = s(l), p = h.length, u = 0, d; p > u; ) o.f(i, d = h[u++], f[d]);
|
|
756
|
+
return i;
|
|
757
|
+
};
|
|
758
|
+
}), Be = v((a, r) => {
|
|
759
|
+
var n = se();
|
|
760
|
+
r.exports = n("document", "documentElement");
|
|
761
|
+
}), pe = v((a, r) => {
|
|
762
|
+
var n = X(), o = Q(), e = n("keys");
|
|
763
|
+
r.exports = function(t) {
|
|
764
|
+
return e[t] || (e[t] = o(t));
|
|
765
|
+
};
|
|
766
|
+
}), Ue = v((a, r) => {
|
|
767
|
+
var n = H(), o = We(), e = fe(), t = N(), s = Be(), i = ae(), l = pe(), f = ">", h = "<", p = "prototype", u = "script", d = l("IE_PROTO"), c = function() {
|
|
768
|
+
}, m = function(g) {
|
|
769
|
+
return h + u + f + g + h + "/" + u + f;
|
|
770
|
+
}, O = function(g) {
|
|
771
|
+
g.write(m("")), g.close();
|
|
772
|
+
var b = g.parentWindow.Object;
|
|
773
|
+
return g = null, b;
|
|
774
|
+
}, _ = function() {
|
|
775
|
+
var g = i("iframe"), b = "java" + u + ":", y;
|
|
776
|
+
return g.style.display = "none", s.appendChild(g), g.src = String(b), y = g.contentWindow.document, y.open(), y.write(m("document.F=Object")), y.close(), y.F;
|
|
777
|
+
}, x, w = function() {
|
|
778
|
+
try {
|
|
779
|
+
x = new ActiveXObject("htmlfile");
|
|
780
|
+
} catch {
|
|
781
|
+
}
|
|
782
|
+
w = typeof document < "u" ? document.domain && x ? O(x) : _() : O(x);
|
|
783
|
+
for (var g = e.length; g--; ) delete w[p][e[g]];
|
|
784
|
+
return w();
|
|
785
|
+
};
|
|
786
|
+
t[d] = !0, r.exports = Object.create || function(g, b) {
|
|
787
|
+
var y;
|
|
788
|
+
return g !== null ? (c[p] = n(g), y = new c(), c[p] = null, y[d] = g) : y = w(), b === void 0 ? y : o.f(y, b);
|
|
789
|
+
};
|
|
790
|
+
}), Ve = v((a, r) => {
|
|
791
|
+
var n = re(), o = Ue(), e = A().f, t = n("unscopables"), s = Array.prototype;
|
|
792
|
+
s[t] == null && e(s, t, { configurable: !0, value: o(null) }), r.exports = function(i) {
|
|
793
|
+
s[t][i] = !0;
|
|
794
|
+
};
|
|
795
|
+
}), Xe = v((a, r) => {
|
|
796
|
+
var n = j(), o = D(), e = Function.prototype, t = n && Object.getOwnPropertyDescriptor, s = o(e, "name"), i = s && (function() {
|
|
797
|
+
}).name === "something", l = s && (!n || n && t(e, "name").configurable);
|
|
798
|
+
r.exports = { EXISTS: s, PROPER: i, CONFIGURABLE: l };
|
|
799
|
+
}), Ge = v((a, r) => {
|
|
800
|
+
var n = S(), o = T(), e = $(), t = n(Function.toString);
|
|
801
|
+
o(e.inspectSource) || (e.inspectSource = function(s) {
|
|
802
|
+
return t(s);
|
|
803
|
+
}), r.exports = e.inspectSource;
|
|
804
|
+
}), Ye = v((a, r) => {
|
|
805
|
+
var n = k(), o = T(), e = n.WeakMap;
|
|
806
|
+
r.exports = o(e) && /native code/.test(String(e));
|
|
807
|
+
}), Ze = v((a, r) => {
|
|
808
|
+
r.exports = function(n, o) {
|
|
809
|
+
return { enumerable: !(n & 1), configurable: !(n & 2), writable: !(n & 4), value: o };
|
|
810
|
+
};
|
|
811
|
+
}), Ke = v((a, r) => {
|
|
812
|
+
var n = j(), o = A(), e = Ze();
|
|
813
|
+
r.exports = n ? function(t, s, i) {
|
|
814
|
+
return o.f(t, s, e(1, i));
|
|
815
|
+
} : function(t, s, i) {
|
|
816
|
+
return t[s] = i, t;
|
|
817
|
+
};
|
|
818
|
+
}), Qe = v((a, r) => {
|
|
819
|
+
var n = Ye(), o = k(), e = I(), t = Ke(), s = D(), i = $(), l = pe(), f = N(), h = "Object already initialized", p = o.TypeError, u = o.WeakMap, d, c, m, O = function(g) {
|
|
820
|
+
return m(g) ? c(g) : d(g, {});
|
|
821
|
+
}, _ = function(g) {
|
|
822
|
+
return function(b) {
|
|
823
|
+
var y;
|
|
824
|
+
if (!e(b) || (y = c(b)).type !== g) throw p("Incompatible receiver, " + g + " required");
|
|
825
|
+
return y;
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
n || i.state ? (x = i.state || (i.state = new u()), x.get = x.get, x.has = x.has, x.set = x.set, d = function(g, b) {
|
|
829
|
+
if (x.has(g)) throw p(h);
|
|
830
|
+
return b.facade = g, x.set(g, b), b;
|
|
831
|
+
}, c = function(g) {
|
|
832
|
+
return x.get(g) || {};
|
|
833
|
+
}, m = function(g) {
|
|
834
|
+
return x.has(g);
|
|
835
|
+
}) : (w = l("state"), f[w] = !0, d = function(g, b) {
|
|
836
|
+
if (s(g, w)) throw p(h);
|
|
837
|
+
return b.facade = g, t(g, w, b), b;
|
|
838
|
+
}, c = function(g) {
|
|
839
|
+
return s(g, w) ? g[w] : {};
|
|
840
|
+
}, m = function(g) {
|
|
841
|
+
return s(g, w);
|
|
842
|
+
});
|
|
843
|
+
var x, w;
|
|
844
|
+
r.exports = { set: d, get: c, has: m, enforce: O, getterFor: _ };
|
|
845
|
+
}), et = v((a, r) => {
|
|
846
|
+
var n = S(), o = E(), e = T(), t = D(), s = j(), i = Xe().CONFIGURABLE, l = Ge(), f = Qe(), h = f.enforce, p = f.get, u = String, d = Object.defineProperty, c = n("".slice), m = n("".replace), O = n([].join), _ = s && !o(function() {
|
|
847
|
+
return d(function() {
|
|
848
|
+
}, "length", { value: 8 }).length !== 8;
|
|
849
|
+
}), x = String(String).split("String"), w = r.exports = function(g, b, y) {
|
|
850
|
+
c(u(b), 0, 7) === "Symbol(" && (b = "[" + m(u(b), /^Symbol\(([^)]*)\)/, "$1") + "]"), y && y.getter && (b = "get " + b), y && y.setter && (b = "set " + b), (!t(g, "name") || i && g.name !== b) && (s ? d(g, "name", { value: b, configurable: !0 }) : g.name = b), _ && y && t(y, "arity") && g.length !== y.arity && d(g, "length", { value: y.arity });
|
|
851
|
+
try {
|
|
852
|
+
y && t(y, "constructor") && y.constructor ? s && d(g, "prototype", { writable: !1 }) : g.prototype && (g.prototype = void 0);
|
|
853
|
+
} catch {
|
|
854
|
+
}
|
|
855
|
+
var z = h(g);
|
|
856
|
+
return t(z, "source") || (z.source = O(x, typeof b == "string" ? b : "")), g;
|
|
857
|
+
};
|
|
858
|
+
Function.prototype.toString = w(function() {
|
|
859
|
+
return e(this) && p(this).source || l(this);
|
|
860
|
+
}, "toString");
|
|
861
|
+
}), tt = v((a, r) => {
|
|
862
|
+
var n = et(), o = A();
|
|
863
|
+
r.exports = function(e, t, s) {
|
|
864
|
+
return s.get && n(s.get, t, { getter: !0 }), s.set && n(s.set, t, { setter: !0 }), o.f(e, t, s);
|
|
865
|
+
};
|
|
866
|
+
}), rt = j(), nt = Ve(), ot = K(), at = ce(), it = tt();
|
|
867
|
+
rt && (it(Array.prototype, "lastIndex", { configurable: !0, get: function() {
|
|
868
|
+
var a = ot(this), r = at(a);
|
|
869
|
+
return r == 0 ? 0 : r - 1;
|
|
870
|
+
} }), nt("lastIndex"));
|
|
871
|
+
function st(a) {
|
|
872
|
+
let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
873
|
+
return a = typeof a == "string" ? a : ut(a), a = Oe.escapeCarriageReturn(vt(a)), _e.ansiToJson(a, { json: !0, remove_empty: !0, use_classes: r });
|
|
874
|
+
}
|
|
875
|
+
function ut(a) {
|
|
876
|
+
let r = "";
|
|
877
|
+
return a && Array.isArray(a) ? r = a[0].children : r = a.children, r;
|
|
878
|
+
}
|
|
879
|
+
function lt(a) {
|
|
880
|
+
let r = "";
|
|
881
|
+
return a.bg && (r += `${a.bg}-bg `), a.fg && (r += `${a.fg}-fg `), a.decoration && (r += `ansi-${a.decoration} `), r === "" ? null : (r = r.substring(0, r.length - 1), r);
|
|
882
|
+
}
|
|
883
|
+
function ct(a) {
|
|
884
|
+
let r = {};
|
|
885
|
+
switch (a.bg && (r.backgroundColor = `rgb(${a.bg})`), a.fg && (r.color = `rgb(${a.fg})`), a.decoration) {
|
|
886
|
+
case "bold":
|
|
887
|
+
r.fontWeight = "bold";
|
|
888
|
+
break;
|
|
889
|
+
case "dim":
|
|
890
|
+
r.opacity = "0.5";
|
|
891
|
+
break;
|
|
892
|
+
case "italic":
|
|
893
|
+
r.fontStyle = "italic";
|
|
894
|
+
break;
|
|
895
|
+
case "hidden":
|
|
896
|
+
r.visibility = "hidden";
|
|
897
|
+
break;
|
|
898
|
+
case "strikethrough":
|
|
899
|
+
r.textDecoration = "line-through";
|
|
900
|
+
break;
|
|
901
|
+
case "underline":
|
|
902
|
+
r.textDecoration = "underline";
|
|
903
|
+
break;
|
|
904
|
+
case "blink":
|
|
905
|
+
r.textDecoration = "blink";
|
|
906
|
+
break;
|
|
907
|
+
}
|
|
908
|
+
return r;
|
|
909
|
+
}
|
|
910
|
+
function ft(a, r, n, o) {
|
|
911
|
+
let e = r ? null : ct(n), t = r ? lt(n) : null;
|
|
912
|
+
if (!a) return R("span", { style: e, key: o, class: t }, n.content);
|
|
913
|
+
let s = [], i = /(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g, l = 0, f;
|
|
914
|
+
for (; (f = i.exec(n.content)) !== null; ) {
|
|
915
|
+
let [, h, p] = f, u = f.index + h.length;
|
|
916
|
+
u > l && s.push(n.content.substring(l, u));
|
|
917
|
+
let d = p.startsWith("www.") ? `http://${p}` : p;
|
|
918
|
+
s.push(R("a", { key: l, href: d, target: "_blank" }, `${p}`)), l = i.lastIndex;
|
|
919
|
+
}
|
|
920
|
+
return l < n.content.length && s.push(n.content.substring(l)), R("span", { style: e, key: o, class: t }, s);
|
|
921
|
+
}
|
|
922
|
+
var pt = V({ name: "Ansi", props: { linkify: { type: Boolean, required: !1, default: void 0 }, useClasses: { type: Boolean, required: !1, default: void 0 } }, setup(a, r) {
|
|
923
|
+
let { attrs: n, slots: o } = r;
|
|
924
|
+
return () => {
|
|
925
|
+
var e, t, s, i;
|
|
926
|
+
return R("code", { class: n?.class || "" }, st((e = o?.default()) != null ? e : "", (t = a.useClasses) != null ? t : !1).map(ft.bind(null, (s = a.linkify) != null ? s : !1, (i = a.useClasses) != null ? i : !1)));
|
|
927
|
+
};
|
|
928
|
+
} });
|
|
929
|
+
function vt(a) {
|
|
930
|
+
let r = a;
|
|
931
|
+
do
|
|
932
|
+
a = r, r = a.replace(/[^\n]\x08/gm, "");
|
|
933
|
+
while (r.length < a.length);
|
|
934
|
+
return a;
|
|
935
|
+
}
|
|
936
|
+
var gt = pt;
|
|
937
|
+
const ht = {
|
|
938
|
+
key: 0,
|
|
939
|
+
class: "cell-ouput-container"
|
|
940
|
+
}, dt = {
|
|
941
|
+
key: 0,
|
|
942
|
+
class: "jp-error monospace-text"
|
|
943
|
+
}, bt = {
|
|
944
|
+
key: 1,
|
|
945
|
+
class: "monospace-text"
|
|
946
|
+
}, mt = ["src"], yt = ["innerHTML"], xt = {
|
|
947
|
+
key: 4,
|
|
948
|
+
class: "monospace-text"
|
|
949
|
+
}, _t = /* @__PURE__ */ V({
|
|
950
|
+
__name: "CellOutput",
|
|
951
|
+
props: {
|
|
952
|
+
node: {}
|
|
953
|
+
},
|
|
954
|
+
setup(a) {
|
|
955
|
+
const r = J(() => a.node.attrs.outputType), n = J(() => a.node.content ? a.node.content[0].text : void 0);
|
|
956
|
+
function o(e, t = `
|
|
957
|
+
`) {
|
|
958
|
+
return e ? typeof e == "string" ? e : e.join ? e.join(t) : e : "";
|
|
959
|
+
}
|
|
960
|
+
return (e, t) => r.value != "empty" ? (L(), C("div", ht, [
|
|
961
|
+
r.value === "error" ? (L(), C("pre", dt, [
|
|
962
|
+
ve(ge(gt), null, {
|
|
963
|
+
default: he(() => [
|
|
964
|
+
de(F(o(n.value)), 1)
|
|
965
|
+
]),
|
|
966
|
+
_: 1
|
|
967
|
+
})
|
|
968
|
+
])) : r.value === "stream" ? (L(), C("pre", bt, F(n.value), 1)) : r.value === "image" ? (L(), C("img", {
|
|
969
|
+
key: 2,
|
|
970
|
+
src: n.value?.startsWith("http") ? n.value : "data:image/png;base64," + n.value,
|
|
971
|
+
class: "jp-img"
|
|
972
|
+
}, null, 8, mt)) : r.value === "html" ? (L(), C("div", {
|
|
973
|
+
key: 3,
|
|
974
|
+
innerHTML: n.value
|
|
975
|
+
}, null, 8, yt)) : r.value === "text" ? (L(), C("pre", xt, F(n.value), 1)) : W("", !0)
|
|
976
|
+
])) : W("", !0);
|
|
977
|
+
}
|
|
978
|
+
}), jt = /* @__PURE__ */ be(_t, [["__scopeId", "data-v-6fb1f0d1"]]);
|
|
979
|
+
export {
|
|
980
|
+
jt as default
|
|
981
|
+
};
|