@opentiny/tiny-robot 0.3.0-alpha.29 → 0.3.0-alpha.30
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/bubble/index.js +433 -425
- package/dist/index2.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/bubble/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var hn = Object.defineProperty;
|
|
2
2
|
var pn = (u, e, t) => e in u ? hn(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
3
|
+
var Lu = (u, e, t) => pn(u, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as yu, ref as i0, createElementBlock as $, openBlock as S, createElementVNode as Y, createVNode as At, toDisplayString as Cu, unref as a0, normalizeClass as Au, withDirectives as bn, vShow as mn, computed as X, useCssModule as _n, createCommentVNode as Xu, createBlock as eu, resolveDynamicComponent as _u, createTextVNode as xn, inject as j0, normalizeProps as Ae, mergeProps as Ju, h as G0, useSlots as gn, useAttrs as kn, normalizeStyle as En, renderSlot as ge, Fragment as e0, renderList as ke, watch as An, nextTick as Cn, createSlots as W0, withCtx as Z0, guardReactiveProps as Dn, provide as V0 } from "vue";
|
|
5
5
|
import { _ as yn } from "../loading.js";
|
|
6
6
|
import { t as Fn } from "../utils.js";
|
|
7
|
-
import { IconArrowUp as Tn, IconPlugin as
|
|
7
|
+
import { IconArrowUp as Tn, IconPlugin as Y0, IconArrowDown as Sn, IconLoading as wn, IconError as vn, IconCancelled as Rn } from "@opentiny/tiny-robot-svgs";
|
|
8
8
|
import { _ as re } from "../_plugin-vue_export-helper.js";
|
|
9
9
|
import { u as In } from "../index3.js";
|
|
10
|
-
class
|
|
10
|
+
class s0 {
|
|
11
11
|
}
|
|
12
|
-
const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-text-title" }, On = { class: "tr-bubble__step-text-content-wrapper" }, Nn = /* @__PURE__ */
|
|
12
|
+
const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-text-title" }, On = { class: "tr-bubble__step-text-content-wrapper" }, Nn = /* @__PURE__ */ yu({
|
|
13
13
|
__name: "collapsible-text",
|
|
14
14
|
props: {
|
|
15
15
|
title: {},
|
|
@@ -17,35 +17,35 @@ const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-tex
|
|
|
17
17
|
defaultOpen: { type: Boolean }
|
|
18
18
|
},
|
|
19
19
|
setup(u) {
|
|
20
|
-
const e = u, t =
|
|
20
|
+
const e = u, t = i0(e.defaultOpen ?? !1);
|
|
21
21
|
return (n, r) => (S(), $("div", Mn, [
|
|
22
22
|
Y("div", Ln, [
|
|
23
|
-
Y("span", null,
|
|
24
|
-
At(
|
|
25
|
-
class:
|
|
23
|
+
Y("span", null, Cu(e.title), 1),
|
|
24
|
+
At(a0(Tn), {
|
|
25
|
+
class: Au(["expand-icon", { "rotate-180": !t.value }]),
|
|
26
26
|
onClick: r[0] || (r[0] = (o) => t.value = !t.value)
|
|
27
27
|
}, null, 8, ["class"])
|
|
28
28
|
]),
|
|
29
29
|
Y("div", On, [
|
|
30
|
-
bn(Y("div", { class: "tr-bubble__step-text-content" },
|
|
31
|
-
[
|
|
30
|
+
bn(Y("div", { class: "tr-bubble__step-text-content" }, Cu(e.content), 513), [
|
|
31
|
+
[mn, t.value]
|
|
32
32
|
])
|
|
33
33
|
])
|
|
34
34
|
]));
|
|
35
35
|
}
|
|
36
|
-
}), Bn = /* @__PURE__ */ re(Nn, [["__scopeId", "data-v-c614ffd3"]]), Pn = Bn, zn = { class: "tr-bubble__text" }, qn = /* @__PURE__ */
|
|
36
|
+
}), Bn = /* @__PURE__ */ re(Nn, [["__scopeId", "data-v-c614ffd3"]]), Pn = Bn, zn = { class: "tr-bubble__text" }, qn = /* @__PURE__ */ yu({
|
|
37
37
|
__name: "text",
|
|
38
38
|
props: {
|
|
39
39
|
content: {}
|
|
40
40
|
},
|
|
41
41
|
setup(u) {
|
|
42
42
|
const e = u;
|
|
43
|
-
return (t, n) => (S(), $("span", zn,
|
|
43
|
+
return (t, n) => (S(), $("span", zn, Cu(e.content), 1));
|
|
44
44
|
}
|
|
45
|
-
}), Un = /* @__PURE__ */ re(qn, [["__scopeId", "data-v-ddb66b72"]]),
|
|
45
|
+
}), Un = /* @__PURE__ */ re(qn, [["__scopeId", "data-v-ddb66b72"]]), l0 = Un, Hn = { class: "tr-bubble__step-tool" }, $n = { class: "tr-bubble__step-tool-header" }, jn = { class: "tr-bubble__step-tool-left" }, Gn = { class: "tr-bubble__step-tool-title" }, Wn = { class: "tr-bubble__step-tool-name" }, Zn = { class: "tr-bubble__step-tool-expand" }, Vn = {
|
|
46
46
|
key: 0,
|
|
47
47
|
class: "tr-bubble__step-tool-params"
|
|
48
|
-
}, Yn = ["innerHTML"], Xn = /* @__PURE__ */
|
|
48
|
+
}, Yn = ["innerHTML"], Xn = /* @__PURE__ */ yu({
|
|
49
49
|
__name: "tool",
|
|
50
50
|
props: {
|
|
51
51
|
name: {},
|
|
@@ -55,12 +55,12 @@ const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-tex
|
|
|
55
55
|
defaultOpen: { type: Boolean }
|
|
56
56
|
},
|
|
57
57
|
setup(u) {
|
|
58
|
-
const e = u, t =
|
|
58
|
+
const e = u, t = i0(e.defaultOpen ?? !1), n = /* @__PURE__ */ new Map([
|
|
59
59
|
["running", { text: "正在调用", icon: wn }],
|
|
60
|
-
["success", { text: "已调用", icon:
|
|
60
|
+
["success", { text: "已调用", icon: Y0 }],
|
|
61
61
|
["failed", { text: "调用失败", icon: vn }],
|
|
62
62
|
["cancelled", { text: "已取消", icon: Rn }]
|
|
63
|
-
]), r = X(() => n.get(e.status) || { text: "", icon:
|
|
63
|
+
]), r = X(() => n.get(e.status) || { text: "", icon: Y0 }), o = _n(), i = (c) => {
|
|
64
64
|
if (!c)
|
|
65
65
|
return "";
|
|
66
66
|
let a = "";
|
|
@@ -81,17 +81,17 @@ const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-tex
|
|
|
81
81
|
return (c, a) => (S(), $("div", Hn, [
|
|
82
82
|
Y("div", $n, [
|
|
83
83
|
Y("div", jn, [
|
|
84
|
-
(S(), eu(
|
|
85
|
-
class:
|
|
84
|
+
(S(), eu(_u(r.value.icon), {
|
|
85
|
+
class: Au(["tr-bubble__step-tool-icon", `icon-${e.status}`])
|
|
86
86
|
}, null, 8, ["class"])),
|
|
87
87
|
Y("span", Gn, [
|
|
88
|
-
xn(
|
|
89
|
-
Y("span", Wn,
|
|
88
|
+
xn(Cu(r.value.text) + " ", 1),
|
|
89
|
+
Y("span", Wn, Cu(e.name), 1)
|
|
90
90
|
])
|
|
91
91
|
]),
|
|
92
92
|
Y("div", Zn, [
|
|
93
|
-
At(
|
|
94
|
-
class:
|
|
93
|
+
At(a0(Sn), {
|
|
94
|
+
class: Au(["expand-icon", { "-rotate-90": !t.value }]),
|
|
95
95
|
onClick: a[0] || (a[0] = (s) => t.value = !t.value)
|
|
96
96
|
}, null, 8, ["class"])
|
|
97
97
|
])
|
|
@@ -114,26 +114,26 @@ const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-tex
|
|
|
114
114
|
}, tr = {
|
|
115
115
|
$style: er
|
|
116
116
|
}, nr = /* @__PURE__ */ re(Xn, [["__cssModules", tr], ["__scopeId", "data-v-1c37a4c4"]]), rr = nr, Ct = /* @__PURE__ */ new Map([
|
|
117
|
-
["text",
|
|
117
|
+
["text", l0],
|
|
118
118
|
["tool", rr],
|
|
119
119
|
["collapsible-text", Pn]
|
|
120
|
-
]), Dt = Symbol("bubbleContentRendererMap"), yt = Symbol("bubbleContentFallbackRenderer"), or = /* @__PURE__ */
|
|
120
|
+
]), Dt = Symbol("bubbleContentRendererMap"), yt = Symbol("bubbleContentFallbackRenderer"), or = /* @__PURE__ */ yu({
|
|
121
121
|
__name: "ContentItem",
|
|
122
122
|
props: {
|
|
123
123
|
item: {}
|
|
124
124
|
},
|
|
125
125
|
setup(u) {
|
|
126
|
-
const e =
|
|
126
|
+
const e = j0(Dt, Ct), t = j0(yt, l0), n = u, r = (i) => {
|
|
127
127
|
const c = e.get(i) || t;
|
|
128
|
-
return typeof c == "function" ? { isComponent: !1, vNodeOrComponent: c(n.item) } : c instanceof
|
|
128
|
+
return typeof c == "function" ? { isComponent: !1, vNodeOrComponent: c(n.item) } : c instanceof s0 ? { isComponent: !1, vNodeOrComponent: c.render(n.item) } : { isComponent: !0, vNodeOrComponent: c };
|
|
129
129
|
}, o = X(() => r(n.item.type));
|
|
130
|
-
return (i, c) => o.value.isComponent ? (S(), eu(
|
|
130
|
+
return (i, c) => o.value.isComponent ? (S(), eu(_u(o.value.vNodeOrComponent), Ae(Ju({ key: 0 }, n.item)), null, 16)) : (S(), eu(_u(o.value.vNodeOrComponent), { key: 1 }));
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
/*! @license DOMPurify 3.2.
|
|
133
|
+
/*! @license DOMPurify 3.2.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.7/LICENSE */
|
|
134
134
|
const {
|
|
135
135
|
entries: Ft,
|
|
136
|
-
setPrototypeOf:
|
|
136
|
+
setPrototypeOf: X0,
|
|
137
137
|
isFrozen: cr,
|
|
138
138
|
getPrototypeOf: ir,
|
|
139
139
|
getOwnPropertyDescriptor: ar
|
|
@@ -143,8 +143,8 @@ let {
|
|
|
143
143
|
seal: Q,
|
|
144
144
|
create: Tt
|
|
145
145
|
} = Object, {
|
|
146
|
-
apply:
|
|
147
|
-
construct:
|
|
146
|
+
apply: t0,
|
|
147
|
+
construct: n0
|
|
148
148
|
} = typeof Reflect < "u" && Reflect;
|
|
149
149
|
j || (j = function(e) {
|
|
150
150
|
return e;
|
|
@@ -152,31 +152,35 @@ j || (j = function(e) {
|
|
|
152
152
|
Q || (Q = function(e) {
|
|
153
153
|
return e;
|
|
154
154
|
});
|
|
155
|
-
e0 || (e0 = function(e, t, n) {
|
|
156
|
-
return e.apply(t, n);
|
|
157
|
-
});
|
|
158
155
|
t0 || (t0 = function(e, t) {
|
|
159
|
-
|
|
156
|
+
for (var n = arguments.length, r = new Array(n > 2 ? n - 2 : 0), o = 2; o < n; o++)
|
|
157
|
+
r[o - 2] = arguments[o];
|
|
158
|
+
return e.apply(t, r);
|
|
159
|
+
});
|
|
160
|
+
n0 || (n0 = function(e) {
|
|
161
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
|
|
162
|
+
n[r - 1] = arguments[r];
|
|
163
|
+
return new e(...n);
|
|
160
164
|
});
|
|
161
|
-
const be = G(Array.prototype.forEach), sr = G(Array.prototype.lastIndexOf),
|
|
165
|
+
const be = G(Array.prototype.forEach), sr = G(Array.prototype.lastIndexOf), J0 = G(Array.prototype.pop), Gu = G(Array.prototype.push), lr = G(Array.prototype.splice), Ee = G(String.prototype.toLowerCase), He = G(String.prototype.toString), $e = G(String.prototype.match), Wu = G(String.prototype.replace), fr = G(String.prototype.indexOf), dr = G(String.prototype.trim), uu = G(Object.prototype.hasOwnProperty), H = G(RegExp.prototype.test), Zu = hr(TypeError);
|
|
162
166
|
function G(u) {
|
|
163
167
|
return function(e) {
|
|
164
168
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
165
169
|
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++)
|
|
166
170
|
n[r - 1] = arguments[r];
|
|
167
|
-
return
|
|
171
|
+
return t0(u, e, n);
|
|
168
172
|
};
|
|
169
173
|
}
|
|
170
174
|
function hr(u) {
|
|
171
175
|
return function() {
|
|
172
176
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
173
177
|
t[n] = arguments[n];
|
|
174
|
-
return
|
|
178
|
+
return n0(u, t);
|
|
175
179
|
};
|
|
176
180
|
}
|
|
177
181
|
function F(u, e) {
|
|
178
182
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ee;
|
|
179
|
-
|
|
183
|
+
X0 && X0(u, null);
|
|
180
184
|
let n = e.length;
|
|
181
185
|
for (; n--; ) {
|
|
182
186
|
let r = e[n];
|
|
@@ -215,7 +219,7 @@ function Vu(u, e) {
|
|
|
215
219
|
}
|
|
216
220
|
return t;
|
|
217
221
|
}
|
|
218
|
-
const Q0 = j(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]),
|
|
222
|
+
const Q0 = j(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), je = j(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "slot", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ge = j(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), br = j(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), We = j(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), mr = j(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), K0 = j(["#text"]), ut = j(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Ze = j(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), et = j(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), me = j(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), _r = Q(/\{\{[\w\W]*|[\w\W]*\}\}/gm), xr = Q(/<%[\w\W]*|[\w\W]*%>/gm), gr = Q(/\$\{[\w\W]*/gm), kr = Q(/^data-[\-\w.\u00B7-\uFFFF]+$/), Er = Q(/^aria-[\-\w]+$/), St = Q(
|
|
219
223
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
220
224
|
// eslint-disable-line no-useless-escape
|
|
221
225
|
), Ar = Q(/^(?:\w+script|data):/i), Cr = Q(
|
|
@@ -232,7 +236,7 @@ var tt = /* @__PURE__ */ Object.freeze({
|
|
|
232
236
|
ERB_EXPR: xr,
|
|
233
237
|
IS_ALLOWED_URI: St,
|
|
234
238
|
IS_SCRIPT_OR_DATA: Ar,
|
|
235
|
-
MUSTACHE_EXPR:
|
|
239
|
+
MUSTACHE_EXPR: _r,
|
|
236
240
|
TMPLIT_EXPR: gr
|
|
237
241
|
});
|
|
238
242
|
const Yu = {
|
|
@@ -279,7 +283,7 @@ const Yu = {
|
|
|
279
283
|
function vt() {
|
|
280
284
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : yr();
|
|
281
285
|
const e = (g) => vt(g);
|
|
282
|
-
if (e.version = "3.2.
|
|
286
|
+
if (e.version = "3.2.7", e.removed = [], !u || !u.document || u.document.nodeType !== Yu.document || !u.Element)
|
|
283
287
|
return e.isSupported = !1, e;
|
|
284
288
|
let {
|
|
285
289
|
document: t
|
|
@@ -292,40 +296,40 @@ function vt() {
|
|
|
292
296
|
NodeFilter: s,
|
|
293
297
|
NamedNodeMap: f = u.NamedNodeMap || u.MozNamedAttrMap,
|
|
294
298
|
HTMLFormElement: d,
|
|
295
|
-
DOMParser:
|
|
299
|
+
DOMParser: m,
|
|
296
300
|
trustedTypes: p
|
|
297
301
|
} = u, h = a.prototype, C = Vu(h, "cloneNode"), D = Vu(h, "remove"), T = Vu(h, "nextSibling"), E = Vu(h, "childNodes"), k = Vu(h, "parentNode");
|
|
298
302
|
if (typeof i == "function") {
|
|
299
303
|
const g = t.createElement("template");
|
|
300
304
|
g.content && g.content.ownerDocument && (t = g.content.ownerDocument);
|
|
301
305
|
}
|
|
302
|
-
let
|
|
306
|
+
let _, A = "";
|
|
303
307
|
const {
|
|
304
308
|
implementation: y,
|
|
305
|
-
createNodeIterator:
|
|
309
|
+
createNodeIterator: M,
|
|
306
310
|
createDocumentFragment: V,
|
|
307
311
|
getElementsByTagName: nu
|
|
308
312
|
} = t, {
|
|
309
313
|
importNode: gu
|
|
310
314
|
} = n;
|
|
311
|
-
let
|
|
315
|
+
let L = nt();
|
|
312
316
|
e.isSupported = typeof Ft == "function" && typeof k == "function" && y && y.createHTMLDocument !== void 0;
|
|
313
317
|
const {
|
|
314
|
-
MUSTACHE_EXPR:
|
|
315
|
-
ERB_EXPR:
|
|
316
|
-
TMPLIT_EXPR:
|
|
318
|
+
MUSTACHE_EXPR: qu,
|
|
319
|
+
ERB_EXPR: Uu,
|
|
320
|
+
TMPLIT_EXPR: Fu,
|
|
317
321
|
DATA_ATTR: hu,
|
|
318
322
|
ARIA_ATTR: ve,
|
|
319
323
|
IS_SCRIPT_OR_DATA: tn,
|
|
320
|
-
ATTR_WHITESPACE:
|
|
324
|
+
ATTR_WHITESPACE: g0,
|
|
321
325
|
CUSTOM_ELEMENT: nn
|
|
322
326
|
} = tt;
|
|
323
327
|
let {
|
|
324
|
-
IS_ALLOWED_URI:
|
|
328
|
+
IS_ALLOWED_URI: k0
|
|
325
329
|
} = tt, O = null;
|
|
326
|
-
const
|
|
330
|
+
const E0 = F({}, [...Q0, ...je, ...Ge, ...We, ...K0]);
|
|
327
331
|
let z = null;
|
|
328
|
-
const
|
|
332
|
+
const A0 = F({}, [...ut, ...Ze, ...et, ...me]);
|
|
329
333
|
let R = Object.seal(Tt(null, {
|
|
330
334
|
tagNameCheck: {
|
|
331
335
|
writable: !0,
|
|
@@ -345,45 +349,45 @@ function vt() {
|
|
|
345
349
|
enumerable: !0,
|
|
346
350
|
value: !1
|
|
347
351
|
}
|
|
348
|
-
})),
|
|
352
|
+
})), Hu = null, Re = null, C0 = !0, Ie = !0, D0 = !1, y0 = !0, Tu = !1, ae = !0, ku = !1, Me = !1, Le = !1, Su = !1, se = !1, le = !1, F0 = !0, T0 = !1;
|
|
349
353
|
const rn = "user-content-";
|
|
350
|
-
let Oe = !0,
|
|
351
|
-
const
|
|
352
|
-
let
|
|
353
|
-
const
|
|
354
|
+
let Oe = !0, $u = !1, wu = {}, vu = null;
|
|
355
|
+
const S0 = F({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
|
|
356
|
+
let w0 = null;
|
|
357
|
+
const v0 = F({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
354
358
|
let Ne = null;
|
|
355
|
-
const
|
|
356
|
-
let
|
|
359
|
+
const R0 = F({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), fe = "http://www.w3.org/1998/Math/MathML", de = "http://www.w3.org/2000/svg", su = "http://www.w3.org/1999/xhtml";
|
|
360
|
+
let Ru = su, Be = !1, Pe = null;
|
|
357
361
|
const on = F({}, [fe, de, su], He);
|
|
358
362
|
let he = F({}, ["mi", "mo", "mn", "ms", "mtext"]), pe = F({}, ["annotation-xml"]);
|
|
359
363
|
const cn = F({}, ["title", "style", "font", "a", "script"]);
|
|
360
|
-
let
|
|
364
|
+
let ju = null;
|
|
361
365
|
const an = ["application/xhtml+xml", "text/html"], sn = "text/html";
|
|
362
|
-
let N = null,
|
|
363
|
-
const ln = t.createElement("form"),
|
|
366
|
+
let N = null, Iu = null;
|
|
367
|
+
const ln = t.createElement("form"), I0 = function(l) {
|
|
364
368
|
return l instanceof RegExp || l instanceof Function;
|
|
365
369
|
}, ze = function() {
|
|
366
370
|
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
367
|
-
if (!(
|
|
368
|
-
if ((!l || typeof l != "object") && (l = {}), l = du(l),
|
|
369
|
-
an.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? sn : l.PARSER_MEDIA_TYPE, N =
|
|
371
|
+
if (!(Iu && Iu === l)) {
|
|
372
|
+
if ((!l || typeof l != "object") && (l = {}), l = du(l), ju = // eslint-disable-next-line unicorn/prefer-includes
|
|
373
|
+
an.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? sn : l.PARSER_MEDIA_TYPE, N = ju === "application/xhtml+xml" ? He : Ee, O = uu(l, "ALLOWED_TAGS") ? F({}, l.ALLOWED_TAGS, N) : E0, z = uu(l, "ALLOWED_ATTR") ? F({}, l.ALLOWED_ATTR, N) : A0, Pe = uu(l, "ALLOWED_NAMESPACES") ? F({}, l.ALLOWED_NAMESPACES, He) : on, Ne = uu(l, "ADD_URI_SAFE_ATTR") ? F(du(R0), l.ADD_URI_SAFE_ATTR, N) : R0, w0 = uu(l, "ADD_DATA_URI_TAGS") ? F(du(v0), l.ADD_DATA_URI_TAGS, N) : v0, vu = uu(l, "FORBID_CONTENTS") ? F({}, l.FORBID_CONTENTS, N) : S0, Hu = uu(l, "FORBID_TAGS") ? F({}, l.FORBID_TAGS, N) : du({}), Re = uu(l, "FORBID_ATTR") ? F({}, l.FORBID_ATTR, N) : du({}), wu = uu(l, "USE_PROFILES") ? l.USE_PROFILES : !1, C0 = l.ALLOW_ARIA_ATTR !== !1, Ie = l.ALLOW_DATA_ATTR !== !1, D0 = l.ALLOW_UNKNOWN_PROTOCOLS || !1, y0 = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Tu = l.SAFE_FOR_TEMPLATES || !1, ae = l.SAFE_FOR_XML !== !1, ku = l.WHOLE_DOCUMENT || !1, Su = l.RETURN_DOM || !1, se = l.RETURN_DOM_FRAGMENT || !1, le = l.RETURN_TRUSTED_TYPE || !1, Le = l.FORCE_BODY || !1, F0 = l.SANITIZE_DOM !== !1, T0 = l.SANITIZE_NAMED_PROPS || !1, Oe = l.KEEP_CONTENT !== !1, $u = l.IN_PLACE || !1, k0 = l.ALLOWED_URI_REGEXP || St, Ru = l.NAMESPACE || su, he = l.MATHML_TEXT_INTEGRATION_POINTS || he, pe = l.HTML_INTEGRATION_POINTS || pe, R = l.CUSTOM_ELEMENT_HANDLING || {}, l.CUSTOM_ELEMENT_HANDLING && I0(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (R.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && I0(l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (R.attributeNameCheck = l.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), l.CUSTOM_ELEMENT_HANDLING && typeof l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = l.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Tu && (Ie = !1), se && (Su = !0), wu && (O = F({}, K0), z = [], wu.html === !0 && (F(O, Q0), F(z, ut)), wu.svg === !0 && (F(O, je), F(z, Ze), F(z, me)), wu.svgFilters === !0 && (F(O, Ge), F(z, Ze), F(z, me)), wu.mathMl === !0 && (F(O, We), F(z, et), F(z, me))), l.ADD_TAGS && (O === E0 && (O = du(O)), F(O, l.ADD_TAGS, N)), l.ADD_ATTR && (z === A0 && (z = du(z)), F(z, l.ADD_ATTR, N)), l.ADD_URI_SAFE_ATTR && F(Ne, l.ADD_URI_SAFE_ATTR, N), l.FORBID_CONTENTS && (vu === S0 && (vu = du(vu)), F(vu, l.FORBID_CONTENTS, N)), Oe && (O["#text"] = !0), ku && F(O, ["html", "head", "body"]), O.table && (F(O, ["tbody"]), delete Hu.tbody), l.TRUSTED_TYPES_POLICY) {
|
|
370
374
|
if (typeof l.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
371
375
|
throw Zu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
372
376
|
if (typeof l.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
373
377
|
throw Zu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
374
|
-
|
|
378
|
+
_ = l.TRUSTED_TYPES_POLICY, A = _.createHTML("");
|
|
375
379
|
} else
|
|
376
|
-
|
|
377
|
-
j && j(l),
|
|
380
|
+
_ === void 0 && (_ = Fr(p, r)), _ !== null && typeof A == "string" && (A = _.createHTML(""));
|
|
381
|
+
j && j(l), Iu = l;
|
|
378
382
|
}
|
|
379
|
-
},
|
|
383
|
+
}, M0 = F({}, [...je, ...Ge, ...br]), L0 = F({}, [...We, ...mr]), fn = function(l) {
|
|
380
384
|
let b = k(l);
|
|
381
385
|
(!b || !b.tagName) && (b = {
|
|
382
|
-
namespaceURI:
|
|
386
|
+
namespaceURI: Ru,
|
|
383
387
|
tagName: "template"
|
|
384
388
|
});
|
|
385
389
|
const x = Ee(l.tagName), v = Ee(b.tagName);
|
|
386
|
-
return Pe[l.namespaceURI] ? l.namespaceURI === de ? b.namespaceURI === su ? x === "svg" : b.namespaceURI === fe ? x === "svg" && (v === "annotation-xml" || he[v]) : !!
|
|
390
|
+
return Pe[l.namespaceURI] ? l.namespaceURI === de ? b.namespaceURI === su ? x === "svg" : b.namespaceURI === fe ? x === "svg" && (v === "annotation-xml" || he[v]) : !!M0[x] : l.namespaceURI === fe ? b.namespaceURI === su ? x === "math" : b.namespaceURI === de ? x === "math" && pe[v] : !!L0[x] : l.namespaceURI === su ? b.namespaceURI === de && !pe[v] || b.namespaceURI === fe && !he[v] ? !1 : !L0[x] && (cn[x] || !M0[x]) : !!(ju === "application/xhtml+xml" && Pe[l.namespaceURI]) : !1;
|
|
387
391
|
}, ru = function(l) {
|
|
388
392
|
Gu(e.removed, {
|
|
389
393
|
element: l
|
|
@@ -393,7 +397,7 @@ function vt() {
|
|
|
393
397
|
} catch {
|
|
394
398
|
D(l);
|
|
395
399
|
}
|
|
396
|
-
},
|
|
400
|
+
}, Eu = function(l, b) {
|
|
397
401
|
try {
|
|
398
402
|
Gu(e.removed, {
|
|
399
403
|
attribute: b.getAttributeNode(l),
|
|
@@ -406,7 +410,7 @@ function vt() {
|
|
|
406
410
|
});
|
|
407
411
|
}
|
|
408
412
|
if (b.removeAttribute(l), l === "is")
|
|
409
|
-
if (
|
|
413
|
+
if (Su || se)
|
|
410
414
|
try {
|
|
411
415
|
ru(b);
|
|
412
416
|
} catch {
|
|
@@ -416,32 +420,32 @@ function vt() {
|
|
|
416
420
|
b.setAttribute(l, "");
|
|
417
421
|
} catch {
|
|
418
422
|
}
|
|
419
|
-
},
|
|
423
|
+
}, O0 = function(l) {
|
|
420
424
|
let b = null, x = null;
|
|
421
425
|
if (Le)
|
|
422
426
|
l = "<remove></remove>" + l;
|
|
423
427
|
else {
|
|
424
|
-
const
|
|
425
|
-
x =
|
|
428
|
+
const I = $e(l, /^[\r\n\t ]+/);
|
|
429
|
+
x = I && I[0];
|
|
426
430
|
}
|
|
427
|
-
|
|
428
|
-
const v =
|
|
429
|
-
if (
|
|
431
|
+
ju === "application/xhtml+xml" && Ru === su && (l = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + l + "</body></html>");
|
|
432
|
+
const v = _ ? _.createHTML(l) : l;
|
|
433
|
+
if (Ru === su)
|
|
430
434
|
try {
|
|
431
|
-
b = new
|
|
435
|
+
b = new m().parseFromString(v, ju);
|
|
432
436
|
} catch {
|
|
433
437
|
}
|
|
434
438
|
if (!b || !b.documentElement) {
|
|
435
|
-
b = y.createDocument(
|
|
439
|
+
b = y.createDocument(Ru, "template", null);
|
|
436
440
|
try {
|
|
437
441
|
b.documentElement.innerHTML = Be ? A : v;
|
|
438
442
|
} catch {
|
|
439
443
|
}
|
|
440
444
|
}
|
|
441
|
-
const
|
|
442
|
-
return l && x &&
|
|
443
|
-
},
|
|
444
|
-
return
|
|
445
|
+
const U = b.body || b.documentElement;
|
|
446
|
+
return l && x && U.insertBefore(t.createTextNode(x), U.childNodes[0] || null), Ru === su ? nu.call(b, ku ? "html" : "body")[0] : ku ? b.documentElement : U;
|
|
447
|
+
}, N0 = function(l) {
|
|
448
|
+
return M.call(
|
|
445
449
|
l.ownerDocument || l,
|
|
446
450
|
l,
|
|
447
451
|
// eslint-disable-next-line no-bitwise
|
|
@@ -450,62 +454,62 @@ function vt() {
|
|
|
450
454
|
);
|
|
451
455
|
}, qe = function(l) {
|
|
452
456
|
return l instanceof d && (typeof l.nodeName != "string" || typeof l.textContent != "string" || typeof l.removeChild != "function" || !(l.attributes instanceof f) || typeof l.removeAttribute != "function" || typeof l.setAttribute != "function" || typeof l.namespaceURI != "string" || typeof l.insertBefore != "function" || typeof l.hasChildNodes != "function");
|
|
453
|
-
},
|
|
457
|
+
}, B0 = function(l) {
|
|
454
458
|
return typeof c == "function" && l instanceof c;
|
|
455
459
|
};
|
|
456
460
|
function lu(g, l, b) {
|
|
457
461
|
be(g, (x) => {
|
|
458
|
-
x.call(e, l, b,
|
|
462
|
+
x.call(e, l, b, Iu);
|
|
459
463
|
});
|
|
460
464
|
}
|
|
461
|
-
const
|
|
465
|
+
const P0 = function(l) {
|
|
462
466
|
let b = null;
|
|
463
|
-
if (lu(
|
|
467
|
+
if (lu(L.beforeSanitizeElements, l, null), qe(l))
|
|
464
468
|
return ru(l), !0;
|
|
465
469
|
const x = N(l.nodeName);
|
|
466
|
-
if (lu(
|
|
470
|
+
if (lu(L.uponSanitizeElement, l, {
|
|
467
471
|
tagName: x,
|
|
468
472
|
allowedTags: O
|
|
469
|
-
}), ae && l.hasChildNodes() && !
|
|
473
|
+
}), ae && l.hasChildNodes() && !B0(l.firstElementChild) && H(/<[/\w!]/g, l.innerHTML) && H(/<[/\w!]/g, l.textContent) || l.nodeType === Yu.progressingInstruction || ae && l.nodeType === Yu.comment && H(/<[/\w]/g, l.data))
|
|
470
474
|
return ru(l), !0;
|
|
471
|
-
if (!O[x] ||
|
|
472
|
-
if (!
|
|
475
|
+
if (!O[x] || Hu[x]) {
|
|
476
|
+
if (!Hu[x] && q0(x) && (R.tagNameCheck instanceof RegExp && H(R.tagNameCheck, x) || R.tagNameCheck instanceof Function && R.tagNameCheck(x)))
|
|
473
477
|
return !1;
|
|
474
|
-
if (Oe && !
|
|
475
|
-
const v = k(l) || l.parentNode,
|
|
476
|
-
if (
|
|
477
|
-
const
|
|
478
|
-
for (let W =
|
|
479
|
-
const fu = C(
|
|
478
|
+
if (Oe && !vu[x]) {
|
|
479
|
+
const v = k(l) || l.parentNode, U = E(l) || l.childNodes;
|
|
480
|
+
if (U && v) {
|
|
481
|
+
const I = U.length;
|
|
482
|
+
for (let W = I - 1; W >= 0; --W) {
|
|
483
|
+
const fu = C(U[W], !0);
|
|
480
484
|
fu.__removalCount = (l.__removalCount || 0) + 1, v.insertBefore(fu, T(l));
|
|
481
485
|
}
|
|
482
486
|
}
|
|
483
487
|
}
|
|
484
488
|
return ru(l), !0;
|
|
485
489
|
}
|
|
486
|
-
return l instanceof a && !fn(l) || (x === "noscript" || x === "noembed" || x === "noframes") && H(/<\/no(script|embed|frames)/i, l.innerHTML) ? (ru(l), !0) : (
|
|
490
|
+
return l instanceof a && !fn(l) || (x === "noscript" || x === "noembed" || x === "noframes") && H(/<\/no(script|embed|frames)/i, l.innerHTML) ? (ru(l), !0) : (Tu && l.nodeType === Yu.text && (b = l.textContent, be([qu, Uu, Fu], (v) => {
|
|
487
491
|
b = Wu(b, v, " ");
|
|
488
492
|
}), l.textContent !== b && (Gu(e.removed, {
|
|
489
493
|
element: l.cloneNode()
|
|
490
|
-
}), l.textContent = b)), lu(
|
|
491
|
-
},
|
|
492
|
-
if (
|
|
494
|
+
}), l.textContent = b)), lu(L.afterSanitizeElements, l, null), !1);
|
|
495
|
+
}, z0 = function(l, b, x) {
|
|
496
|
+
if (F0 && (b === "id" || b === "name") && (x in t || x in ln))
|
|
493
497
|
return !1;
|
|
494
498
|
if (!(Ie && !Re[b] && H(hu, b))) {
|
|
495
|
-
if (!(
|
|
499
|
+
if (!(C0 && H(ve, b))) {
|
|
496
500
|
if (!z[b] || Re[b]) {
|
|
497
501
|
if (
|
|
498
502
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
499
503
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
500
504
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
501
|
-
!(
|
|
505
|
+
!(q0(l) && (R.tagNameCheck instanceof RegExp && H(R.tagNameCheck, l) || R.tagNameCheck instanceof Function && R.tagNameCheck(l)) && (R.attributeNameCheck instanceof RegExp && H(R.attributeNameCheck, b) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(b, l)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
502
506
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
503
507
|
b === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && H(R.tagNameCheck, x) || R.tagNameCheck instanceof Function && R.tagNameCheck(x)))
|
|
504
508
|
) return !1;
|
|
505
509
|
} else if (!Ne[b]) {
|
|
506
|
-
if (!H(
|
|
507
|
-
if (!((b === "src" || b === "xlink:href" || b === "href") && l !== "script" && fr(x, "data:") === 0 &&
|
|
508
|
-
if (!(
|
|
510
|
+
if (!H(k0, Wu(x, g0, ""))) {
|
|
511
|
+
if (!((b === "src" || b === "xlink:href" || b === "href") && l !== "script" && fr(x, "data:") === 0 && w0[l])) {
|
|
512
|
+
if (!(D0 && !H(tn, Wu(x, g0, "")))) {
|
|
509
513
|
if (x)
|
|
510
514
|
return !1;
|
|
511
515
|
}
|
|
@@ -515,10 +519,10 @@ function vt() {
|
|
|
515
519
|
}
|
|
516
520
|
}
|
|
517
521
|
return !0;
|
|
518
|
-
}, z0 = function(l) {
|
|
519
|
-
return l !== "annotation-xml" && J0(l, nn);
|
|
520
522
|
}, q0 = function(l) {
|
|
521
|
-
|
|
523
|
+
return l !== "annotation-xml" && $e(l, nn);
|
|
524
|
+
}, U0 = function(l) {
|
|
525
|
+
lu(L.beforeSanitizeAttributes, l, null);
|
|
522
526
|
const {
|
|
523
527
|
attributes: b
|
|
524
528
|
} = l;
|
|
@@ -533,63 +537,67 @@ function vt() {
|
|
|
533
537
|
};
|
|
534
538
|
let v = b.length;
|
|
535
539
|
for (; v--; ) {
|
|
536
|
-
const
|
|
537
|
-
name:
|
|
540
|
+
const U = b[v], {
|
|
541
|
+
name: I,
|
|
538
542
|
namespaceURI: W,
|
|
539
543
|
value: fu
|
|
540
|
-
} =
|
|
541
|
-
let
|
|
542
|
-
if (x.attrName =
|
|
543
|
-
|
|
544
|
+
} = U, Mu = N(I), Ue = fu;
|
|
545
|
+
let q = I === "value" ? Ue : dr(Ue);
|
|
546
|
+
if (x.attrName = Mu, x.attrValue = q, x.keepAttr = !0, x.forceKeepAttr = void 0, lu(L.uponSanitizeAttribute, l, x), q = x.attrValue, T0 && (Mu === "id" || Mu === "name") && (Eu(I, l), q = rn + q), ae && H(/((--!?|])>)|<\/(style|title|textarea)/i, q)) {
|
|
547
|
+
Eu(I, l);
|
|
548
|
+
continue;
|
|
549
|
+
}
|
|
550
|
+
if (Mu === "attributename" && $e(q, "href")) {
|
|
551
|
+
Eu(I, l);
|
|
544
552
|
continue;
|
|
545
553
|
}
|
|
546
554
|
if (x.forceKeepAttr)
|
|
547
555
|
continue;
|
|
548
556
|
if (!x.keepAttr) {
|
|
549
|
-
|
|
557
|
+
Eu(I, l);
|
|
550
558
|
continue;
|
|
551
559
|
}
|
|
552
|
-
if (!
|
|
553
|
-
|
|
560
|
+
if (!y0 && H(/\/>/i, q)) {
|
|
561
|
+
Eu(I, l);
|
|
554
562
|
continue;
|
|
555
563
|
}
|
|
556
|
-
|
|
557
|
-
|
|
564
|
+
Tu && be([qu, Uu, Fu], ($0) => {
|
|
565
|
+
q = Wu(q, $0, " ");
|
|
558
566
|
});
|
|
559
|
-
const
|
|
560
|
-
if (!
|
|
561
|
-
|
|
567
|
+
const H0 = N(l.nodeName);
|
|
568
|
+
if (!z0(H0, Mu, q)) {
|
|
569
|
+
Eu(I, l);
|
|
562
570
|
continue;
|
|
563
571
|
}
|
|
564
|
-
if (
|
|
565
|
-
switch (p.getAttributeType(
|
|
572
|
+
if (_ && typeof p == "object" && typeof p.getAttributeType == "function" && !W)
|
|
573
|
+
switch (p.getAttributeType(H0, Mu)) {
|
|
566
574
|
case "TrustedHTML": {
|
|
567
|
-
|
|
575
|
+
q = _.createHTML(q);
|
|
568
576
|
break;
|
|
569
577
|
}
|
|
570
578
|
case "TrustedScriptURL": {
|
|
571
|
-
|
|
579
|
+
q = _.createScriptURL(q);
|
|
572
580
|
break;
|
|
573
581
|
}
|
|
574
582
|
}
|
|
575
|
-
if (
|
|
583
|
+
if (q !== Ue)
|
|
576
584
|
try {
|
|
577
|
-
W ? l.setAttributeNS(W,
|
|
585
|
+
W ? l.setAttributeNS(W, I, q) : l.setAttribute(I, q), qe(l) ? ru(l) : J0(e.removed);
|
|
578
586
|
} catch {
|
|
579
|
-
|
|
587
|
+
Eu(I, l);
|
|
580
588
|
}
|
|
581
589
|
}
|
|
582
|
-
lu(
|
|
590
|
+
lu(L.afterSanitizeAttributes, l, null);
|
|
583
591
|
}, dn = function g(l) {
|
|
584
592
|
let b = null;
|
|
585
|
-
const x =
|
|
586
|
-
for (lu(
|
|
587
|
-
lu(
|
|
588
|
-
lu(
|
|
593
|
+
const x = N0(l);
|
|
594
|
+
for (lu(L.beforeSanitizeShadowDOM, l, null); b = x.nextNode(); )
|
|
595
|
+
lu(L.uponSanitizeShadowNode, b, null), P0(b), U0(b), b.content instanceof o && g(b.content);
|
|
596
|
+
lu(L.afterSanitizeShadowDOM, l, null);
|
|
589
597
|
};
|
|
590
598
|
return e.sanitize = function(g) {
|
|
591
|
-
let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, b = null, x = null, v = null,
|
|
592
|
-
if (Be = !g, Be && (g = "<!-->"), typeof g != "string" && !
|
|
599
|
+
let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, b = null, x = null, v = null, U = null;
|
|
600
|
+
if (Be = !g, Be && (g = "<!-->"), typeof g != "string" && !B0(g))
|
|
593
601
|
if (typeof g.toString == "function") {
|
|
594
602
|
if (g = g.toString(), typeof g != "string")
|
|
595
603
|
throw Zu("dirty is not a string, aborting");
|
|
@@ -597,61 +605,61 @@ function vt() {
|
|
|
597
605
|
throw Zu("toString is not a function");
|
|
598
606
|
if (!e.isSupported)
|
|
599
607
|
return g;
|
|
600
|
-
if (Me || ze(l), e.removed = [], typeof g == "string" && (
|
|
608
|
+
if (Me || ze(l), e.removed = [], typeof g == "string" && ($u = !1), $u) {
|
|
601
609
|
if (g.nodeName) {
|
|
602
610
|
const fu = N(g.nodeName);
|
|
603
|
-
if (!O[fu] ||
|
|
611
|
+
if (!O[fu] || Hu[fu])
|
|
604
612
|
throw Zu("root node is forbidden and cannot be sanitized in-place");
|
|
605
613
|
}
|
|
606
614
|
} else if (g instanceof c)
|
|
607
|
-
b =
|
|
615
|
+
b = O0("<!---->"), x = b.ownerDocument.importNode(g, !0), x.nodeType === Yu.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? b = x : b.appendChild(x);
|
|
608
616
|
else {
|
|
609
|
-
if (!
|
|
617
|
+
if (!Su && !Tu && !ku && // eslint-disable-next-line unicorn/prefer-includes
|
|
610
618
|
g.indexOf("<") === -1)
|
|
611
|
-
return
|
|
612
|
-
if (b =
|
|
613
|
-
return
|
|
619
|
+
return _ && le ? _.createHTML(g) : g;
|
|
620
|
+
if (b = O0(g), !b)
|
|
621
|
+
return Su ? null : le ? A : "";
|
|
614
622
|
}
|
|
615
623
|
b && Le && ru(b.firstChild);
|
|
616
|
-
const
|
|
617
|
-
for (; v =
|
|
618
|
-
|
|
619
|
-
if (
|
|
624
|
+
const I = N0($u ? g : b);
|
|
625
|
+
for (; v = I.nextNode(); )
|
|
626
|
+
P0(v), U0(v), v.content instanceof o && dn(v.content);
|
|
627
|
+
if ($u)
|
|
620
628
|
return g;
|
|
621
|
-
if (
|
|
629
|
+
if (Su) {
|
|
622
630
|
if (se)
|
|
623
|
-
for (
|
|
624
|
-
|
|
631
|
+
for (U = V.call(b.ownerDocument); b.firstChild; )
|
|
632
|
+
U.appendChild(b.firstChild);
|
|
625
633
|
else
|
|
626
|
-
|
|
627
|
-
return (z.shadowroot || z.shadowrootmode) && (
|
|
634
|
+
U = b;
|
|
635
|
+
return (z.shadowroot || z.shadowrootmode) && (U = gu.call(n, U, !0)), U;
|
|
628
636
|
}
|
|
629
637
|
let W = ku ? b.outerHTML : b.innerHTML;
|
|
630
638
|
return ku && O["!doctype"] && b.ownerDocument && b.ownerDocument.doctype && b.ownerDocument.doctype.name && H(wt, b.ownerDocument.doctype.name) && (W = "<!DOCTYPE " + b.ownerDocument.doctype.name + `>
|
|
631
|
-
` + W),
|
|
639
|
+
` + W), Tu && be([qu, Uu, Fu], (fu) => {
|
|
632
640
|
W = Wu(W, fu, " ");
|
|
633
|
-
}),
|
|
641
|
+
}), _ && le ? _.createHTML(W) : W;
|
|
634
642
|
}, e.setConfig = function() {
|
|
635
643
|
let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
636
644
|
ze(g), Me = !0;
|
|
637
645
|
}, e.clearConfig = function() {
|
|
638
|
-
|
|
646
|
+
Iu = null, Me = !1;
|
|
639
647
|
}, e.isValidAttribute = function(g, l, b) {
|
|
640
|
-
|
|
648
|
+
Iu || ze({});
|
|
641
649
|
const x = N(g), v = N(l);
|
|
642
|
-
return
|
|
650
|
+
return z0(x, v, b);
|
|
643
651
|
}, e.addHook = function(g, l) {
|
|
644
|
-
typeof l == "function" && Gu(
|
|
652
|
+
typeof l == "function" && Gu(L[g], l);
|
|
645
653
|
}, e.removeHook = function(g, l) {
|
|
646
654
|
if (l !== void 0) {
|
|
647
|
-
const b = sr(
|
|
648
|
-
return b === -1 ? void 0 : lr(
|
|
655
|
+
const b = sr(L[g], l);
|
|
656
|
+
return b === -1 ? void 0 : lr(L[g], b, 1)[0];
|
|
649
657
|
}
|
|
650
|
-
return
|
|
658
|
+
return J0(L[g]);
|
|
651
659
|
}, e.removeHooks = function(g) {
|
|
652
|
-
|
|
660
|
+
L[g] = [];
|
|
653
661
|
}, e.removeAllHooks = function() {
|
|
654
|
-
|
|
662
|
+
L = nt();
|
|
655
663
|
}, e;
|
|
656
664
|
}
|
|
657
665
|
var Tr = vt();
|
|
@@ -671,8 +679,8 @@ function Sr(u) {
|
|
|
671
679
|
}
|
|
672
680
|
return e;
|
|
673
681
|
}
|
|
674
|
-
function
|
|
675
|
-
typeof e != "string" && (e =
|
|
682
|
+
function Bu(u, e) {
|
|
683
|
+
typeof e != "string" && (e = Bu.defaultChars);
|
|
676
684
|
const t = Sr(e);
|
|
677
685
|
return u.replace(/(%[a-f0-9]{2})+/gi, function(n) {
|
|
678
686
|
let r = "";
|
|
@@ -711,8 +719,8 @@ function Nu(u, e) {
|
|
|
711
719
|
return r;
|
|
712
720
|
});
|
|
713
721
|
}
|
|
714
|
-
|
|
715
|
-
|
|
722
|
+
Bu.defaultChars = ";/?:@&=+$,#";
|
|
723
|
+
Bu.componentChars = "";
|
|
716
724
|
const ot = {};
|
|
717
725
|
function wr(u) {
|
|
718
726
|
let e = ot[u];
|
|
@@ -758,7 +766,7 @@ function oe(u, e, t) {
|
|
|
758
766
|
}
|
|
759
767
|
oe.defaultChars = ";/?:@&=+$,-_.!~*'()#";
|
|
760
768
|
oe.componentChars = "-_.!~*'()";
|
|
761
|
-
function
|
|
769
|
+
function f0(u) {
|
|
762
770
|
let e = "";
|
|
763
771
|
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;
|
|
764
772
|
}
|
|
@@ -781,7 +789,7 @@ const vr = /^([a-z0-9.+-]+:)/i, Rr = /:[0-9]*$/, Ir = /^(\/\/?(?!\/)[^\?\s]*)(\?
|
|
|
781
789
|
"gopher:": !0,
|
|
782
790
|
"file:": !0
|
|
783
791
|
};
|
|
784
|
-
function
|
|
792
|
+
function d0(u, e) {
|
|
785
793
|
if (u && u instanceof Ce) return u;
|
|
786
794
|
const t = new Ce();
|
|
787
795
|
return t.parse(u, e), t;
|
|
@@ -803,8 +811,8 @@ Ce.prototype.parse = function(u, e) {
|
|
|
803
811
|
for (let h = 0; h < ct.length; h++)
|
|
804
812
|
n = o.indexOf(ct[h]), n !== -1 && (s === -1 || n < s) && (s = n);
|
|
805
813
|
s === -1 && (s = o.length), o[s - 1] === ":" && s--;
|
|
806
|
-
const
|
|
807
|
-
o = o.slice(s), this.parseHost(
|
|
814
|
+
const m = o.slice(0, s);
|
|
815
|
+
o = o.slice(s), this.parseHost(m), this.hostname = this.hostname || "";
|
|
808
816
|
const p = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
809
817
|
if (!p) {
|
|
810
818
|
const h = this.hostname.split(/\./);
|
|
@@ -812,11 +820,11 @@ Ce.prototype.parse = function(u, e) {
|
|
|
812
820
|
const T = h[C];
|
|
813
821
|
if (T && !T.match(at)) {
|
|
814
822
|
let E = "";
|
|
815
|
-
for (let k = 0,
|
|
823
|
+
for (let k = 0, _ = T.length; k < _; k++)
|
|
816
824
|
T.charCodeAt(k) > 127 ? E += "x" : E += T[k];
|
|
817
825
|
if (!E.match(at)) {
|
|
818
|
-
const k = h.slice(0, C),
|
|
819
|
-
A && (k.push(A[1]),
|
|
826
|
+
const k = h.slice(0, C), _ = h.slice(C + 1), A = T.match(Br);
|
|
827
|
+
A && (k.push(A[1]), _.unshift(A[2])), _.length && (o = _.join(".") + o), this.hostname = k.join(".");
|
|
820
828
|
break;
|
|
821
829
|
}
|
|
822
830
|
}
|
|
@@ -835,16 +843,16 @@ Ce.prototype.parseHost = function(u) {
|
|
|
835
843
|
};
|
|
836
844
|
const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
837
845
|
__proto__: null,
|
|
838
|
-
decode:
|
|
846
|
+
decode: Bu,
|
|
839
847
|
encode: oe,
|
|
840
|
-
format:
|
|
841
|
-
parse:
|
|
842
|
-
}, Symbol.toStringTag, { value: "Module" })), Rt = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, It = /[\0-\x1F\x7F-\x9F]/, zr = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,
|
|
848
|
+
format: f0,
|
|
849
|
+
parse: d0
|
|
850
|
+
}, Symbol.toStringTag, { value: "Module" })), Rt = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, It = /[\0-\x1F\x7F-\x9F]/, zr = /[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/, h0 = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/, Mt = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/, Lt = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
843
851
|
__proto__: null,
|
|
844
852
|
Any: Rt,
|
|
845
853
|
Cc: It,
|
|
846
854
|
Cf: zr,
|
|
847
|
-
P:
|
|
855
|
+
P: h0,
|
|
848
856
|
S: Mt,
|
|
849
857
|
Z: Lt
|
|
850
858
|
}, Symbol.toStringTag, { value: "Module" })), Ur = new Uint16Array(
|
|
@@ -854,7 +862,7 @@ const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
854
862
|
// prettier-ignore
|
|
855
863
|
"Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((u) => u.charCodeAt(0))
|
|
856
864
|
);
|
|
857
|
-
var
|
|
865
|
+
var Ve;
|
|
858
866
|
const $r = /* @__PURE__ */ new Map([
|
|
859
867
|
[0, 65533],
|
|
860
868
|
// C1 Unicode control character reference replacements
|
|
@@ -887,7 +895,7 @@ const $r = /* @__PURE__ */ new Map([
|
|
|
887
895
|
[159, 376]
|
|
888
896
|
]), jr = (
|
|
889
897
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
|
|
890
|
-
(
|
|
898
|
+
(Ve = String.fromCodePoint) !== null && Ve !== void 0 ? Ve : function(u) {
|
|
891
899
|
let e = "";
|
|
892
900
|
return u > 65535 && (u -= 65536, e += String.fromCharCode(u >>> 10 & 1023 | 55296), u = 56320 | u & 1023), e += String.fromCharCode(u), e;
|
|
893
901
|
}
|
|
@@ -901,18 +909,18 @@ var P;
|
|
|
901
909
|
u[u.NUM = 35] = "NUM", u[u.SEMI = 59] = "SEMI", u[u.EQUALS = 61] = "EQUALS", u[u.ZERO = 48] = "ZERO", u[u.NINE = 57] = "NINE", u[u.LOWER_A = 97] = "LOWER_A", u[u.LOWER_F = 102] = "LOWER_F", u[u.LOWER_X = 120] = "LOWER_X", u[u.LOWER_Z = 122] = "LOWER_Z", u[u.UPPER_A = 65] = "UPPER_A", u[u.UPPER_F = 70] = "UPPER_F", u[u.UPPER_Z = 90] = "UPPER_Z";
|
|
902
910
|
})(P || (P = {}));
|
|
903
911
|
const Wr = 32;
|
|
904
|
-
var
|
|
912
|
+
var mu;
|
|
905
913
|
(function(u) {
|
|
906
914
|
u[u.VALUE_LENGTH = 49152] = "VALUE_LENGTH", u[u.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", u[u.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
907
|
-
})(
|
|
908
|
-
function
|
|
915
|
+
})(mu || (mu = {}));
|
|
916
|
+
function r0(u) {
|
|
909
917
|
return u >= P.ZERO && u <= P.NINE;
|
|
910
918
|
}
|
|
911
919
|
function Zr(u) {
|
|
912
920
|
return u >= P.UPPER_A && u <= P.UPPER_F || u >= P.LOWER_A && u <= P.LOWER_F;
|
|
913
921
|
}
|
|
914
922
|
function Vr(u) {
|
|
915
|
-
return u >= P.UPPER_A && u <= P.UPPER_Z || u >= P.LOWER_A && u <= P.LOWER_Z ||
|
|
923
|
+
return u >= P.UPPER_A && u <= P.UPPER_Z || u >= P.LOWER_A && u <= P.LOWER_Z || r0(u);
|
|
916
924
|
}
|
|
917
925
|
function Yr(u) {
|
|
918
926
|
return u === P.EQUALS || Vr(u);
|
|
@@ -989,7 +997,7 @@ class Xr {
|
|
|
989
997
|
const n = t;
|
|
990
998
|
for (; t < e.length; ) {
|
|
991
999
|
const r = e.charCodeAt(t);
|
|
992
|
-
if (
|
|
1000
|
+
if (r0(r) || Zr(r))
|
|
993
1001
|
t += 1;
|
|
994
1002
|
else
|
|
995
1003
|
return this.addToNumericResult(e, n, t, 16), this.emitNumericEntity(r, 3);
|
|
@@ -1009,7 +1017,7 @@ class Xr {
|
|
|
1009
1017
|
const n = t;
|
|
1010
1018
|
for (; t < e.length; ) {
|
|
1011
1019
|
const r = e.charCodeAt(t);
|
|
1012
|
-
if (
|
|
1020
|
+
if (r0(r))
|
|
1013
1021
|
t += 1;
|
|
1014
1022
|
else
|
|
1015
1023
|
return this.addToNumericResult(e, n, t, 10), this.emitNumericEntity(r, 2);
|
|
@@ -1050,7 +1058,7 @@ class Xr {
|
|
|
1050
1058
|
*/
|
|
1051
1059
|
stateNamedEntity(e, t) {
|
|
1052
1060
|
const { decodeTree: n } = this;
|
|
1053
|
-
let r = n[this.treeIndex], o = (r &
|
|
1061
|
+
let r = n[this.treeIndex], o = (r & mu.VALUE_LENGTH) >> 14;
|
|
1054
1062
|
for (; t < e.length; t++, this.excess++) {
|
|
1055
1063
|
const i = e.charCodeAt(t);
|
|
1056
1064
|
if (this.treeIndex = Jr(n, r, this.treeIndex + Math.max(1, o), i), this.treeIndex < 0)
|
|
@@ -1058,7 +1066,7 @@ class Xr {
|
|
|
1058
1066
|
this.decodeMode === bu.Attribute && // We shouldn't have consumed any characters after the entity,
|
|
1059
1067
|
(o === 0 || // And there should be no invalid characters.
|
|
1060
1068
|
Yr(i)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1061
|
-
if (r = n[this.treeIndex], o = (r &
|
|
1069
|
+
if (r = n[this.treeIndex], o = (r & mu.VALUE_LENGTH) >> 14, o !== 0) {
|
|
1062
1070
|
if (i === P.SEMI)
|
|
1063
1071
|
return this.emitNamedEntityData(this.treeIndex, o, this.consumed + this.excess);
|
|
1064
1072
|
this.decodeMode !== bu.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
@@ -1073,7 +1081,7 @@ class Xr {
|
|
|
1073
1081
|
*/
|
|
1074
1082
|
emitNotTerminatedNamedEntity() {
|
|
1075
1083
|
var e;
|
|
1076
|
-
const { result: t, decodeTree: n } = this, r = (n[t] &
|
|
1084
|
+
const { result: t, decodeTree: n } = this, r = (n[t] & mu.VALUE_LENGTH) >> 14;
|
|
1077
1085
|
return this.emitNamedEntityData(t, r, this.consumed), (e = this.errors) === null || e === void 0 || e.missingSemicolonAfterCharacterReference(), this.consumed;
|
|
1078
1086
|
}
|
|
1079
1087
|
/**
|
|
@@ -1087,7 +1095,7 @@ class Xr {
|
|
|
1087
1095
|
*/
|
|
1088
1096
|
emitNamedEntityData(e, t, n) {
|
|
1089
1097
|
const { decodeTree: r } = this;
|
|
1090
|
-
return this.emitCodePoint(t === 1 ? r[e] & ~
|
|
1098
|
+
return this.emitCodePoint(t === 1 ? r[e] & ~mu.VALUE_LENGTH : r[e + 1], n), t === 3 && this.emitCodePoint(r[e + 2], n), n;
|
|
1091
1099
|
}
|
|
1092
1100
|
/**
|
|
1093
1101
|
* Signal to the parser that the end of the input was reached.
|
|
@@ -1135,7 +1143,7 @@ function Ot(u) {
|
|
|
1135
1143
|
};
|
|
1136
1144
|
}
|
|
1137
1145
|
function Jr(u, e, t, n) {
|
|
1138
|
-
const r = (e &
|
|
1146
|
+
const r = (e & mu.BRANCH_LENGTH) >> 7, o = e & mu.JUMP_TABLE;
|
|
1139
1147
|
if (r === 0)
|
|
1140
1148
|
return o !== 0 && n === o ? t : -1;
|
|
1141
1149
|
if (o) {
|
|
@@ -1162,7 +1170,7 @@ function Nt(u, e = bu.Legacy) {
|
|
|
1162
1170
|
function Kr(u) {
|
|
1163
1171
|
return Object.prototype.toString.call(u);
|
|
1164
1172
|
}
|
|
1165
|
-
function
|
|
1173
|
+
function p0(u) {
|
|
1166
1174
|
return Kr(u) === "[object String]";
|
|
1167
1175
|
}
|
|
1168
1176
|
const uo = Object.prototype.hasOwnProperty;
|
|
@@ -1183,7 +1191,7 @@ function Fe(u) {
|
|
|
1183
1191
|
function Bt(u, e, t) {
|
|
1184
1192
|
return [].concat(u.slice(0, e), t, u.slice(e + 1));
|
|
1185
1193
|
}
|
|
1186
|
-
function
|
|
1194
|
+
function b0(u) {
|
|
1187
1195
|
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);
|
|
1188
1196
|
}
|
|
1189
1197
|
function De(u) {
|
|
@@ -1198,7 +1206,7 @@ const Pt = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, to = /&([a-z#][a-z0-9]{
|
|
|
1198
1206
|
function oo(u, e) {
|
|
1199
1207
|
if (e.charCodeAt(0) === 35 && ro.test(e)) {
|
|
1200
1208
|
const n = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
1201
|
-
return
|
|
1209
|
+
return b0(n) ? De(n) : u;
|
|
1202
1210
|
}
|
|
1203
1211
|
const t = Nt(u);
|
|
1204
1212
|
return t !== u ? t : u;
|
|
@@ -1206,7 +1214,7 @@ function oo(u, e) {
|
|
|
1206
1214
|
function co(u) {
|
|
1207
1215
|
return u.indexOf("\\") < 0 ? u : u.replace(Pt, "$1");
|
|
1208
1216
|
}
|
|
1209
|
-
function
|
|
1217
|
+
function Pu(u) {
|
|
1210
1218
|
return u.indexOf("\\") < 0 && u.indexOf("&") < 0 ? u : u.replace(no, function(e, t, n) {
|
|
1211
1219
|
return t || oo(e, n);
|
|
1212
1220
|
});
|
|
@@ -1255,7 +1263,7 @@ function Qu(u) {
|
|
|
1255
1263
|
return !1;
|
|
1256
1264
|
}
|
|
1257
1265
|
function Ku(u) {
|
|
1258
|
-
return
|
|
1266
|
+
return h0.test(u) || Mt.test(u);
|
|
1259
1267
|
}
|
|
1260
1268
|
function ue(u) {
|
|
1261
1269
|
switch (u) {
|
|
@@ -1310,15 +1318,15 @@ const po = { mdurl: Pr, ucmicro: qr }, bo = /* @__PURE__ */ Object.freeze(/* @__
|
|
|
1310
1318
|
isMdAsciiPunct: ue,
|
|
1311
1319
|
isPunctChar: Ku,
|
|
1312
1320
|
isSpace: w,
|
|
1313
|
-
isString:
|
|
1314
|
-
isValidEntityCode:
|
|
1321
|
+
isString: p0,
|
|
1322
|
+
isValidEntityCode: b0,
|
|
1315
1323
|
isWhiteSpace: Qu,
|
|
1316
1324
|
lib: po,
|
|
1317
1325
|
normalizeReference: Te,
|
|
1318
|
-
unescapeAll:
|
|
1326
|
+
unescapeAll: Pu,
|
|
1319
1327
|
unescapeMd: co
|
|
1320
1328
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1321
|
-
function
|
|
1329
|
+
function mo(u, e, t) {
|
|
1322
1330
|
let n, r, o, i;
|
|
1323
1331
|
const c = u.posMax, a = u.pos;
|
|
1324
1332
|
for (u.pos = e + 1, n = 1; u.pos < c; ) {
|
|
@@ -1336,7 +1344,7 @@ function _o(u, e, t) {
|
|
|
1336
1344
|
let s = -1;
|
|
1337
1345
|
return r && (s = u.pos), u.pos = a, s;
|
|
1338
1346
|
}
|
|
1339
|
-
function
|
|
1347
|
+
function _o(u, e, t) {
|
|
1340
1348
|
let n, r = e;
|
|
1341
1349
|
const o = {
|
|
1342
1350
|
ok: !1,
|
|
@@ -1348,7 +1356,7 @@ function mo(u, e, t) {
|
|
|
1348
1356
|
if (n = u.charCodeAt(r), n === 10 || n === 60)
|
|
1349
1357
|
return o;
|
|
1350
1358
|
if (n === 62)
|
|
1351
|
-
return o.pos = r + 1, o.str =
|
|
1359
|
+
return o.pos = r + 1, o.str = Pu(u.slice(e + 1, r)), o.ok = !0, o;
|
|
1352
1360
|
if (n === 92 && r + 1 < t) {
|
|
1353
1361
|
r += 2;
|
|
1354
1362
|
continue;
|
|
@@ -1374,7 +1382,7 @@ function mo(u, e, t) {
|
|
|
1374
1382
|
}
|
|
1375
1383
|
r++;
|
|
1376
1384
|
}
|
|
1377
|
-
return e === r || i !== 0 || (o.str =
|
|
1385
|
+
return e === r || i !== 0 || (o.str = Pu(u.slice(e, r)), o.pos = r, o.ok = !0), o;
|
|
1378
1386
|
}
|
|
1379
1387
|
function xo(u, e, t, n) {
|
|
1380
1388
|
let r, o = e;
|
|
@@ -1402,17 +1410,17 @@ function xo(u, e, t, n) {
|
|
|
1402
1410
|
}
|
|
1403
1411
|
for (; o < t; ) {
|
|
1404
1412
|
if (r = u.charCodeAt(o), r === i.marker)
|
|
1405
|
-
return i.pos = o + 1, i.str +=
|
|
1413
|
+
return i.pos = o + 1, i.str += Pu(u.slice(e, o)), i.ok = !0, i;
|
|
1406
1414
|
if (r === 40 && i.marker === 41)
|
|
1407
1415
|
return i;
|
|
1408
1416
|
r === 92 && o + 1 < t && o++, o++;
|
|
1409
1417
|
}
|
|
1410
|
-
return i.can_continue = !0, i.str +=
|
|
1418
|
+
return i.can_continue = !0, i.str += Pu(u.slice(e, o)), i;
|
|
1411
1419
|
}
|
|
1412
1420
|
const go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1413
1421
|
__proto__: null,
|
|
1414
|
-
parseLinkDestination:
|
|
1415
|
-
parseLinkLabel:
|
|
1422
|
+
parseLinkDestination: _o,
|
|
1423
|
+
parseLinkLabel: mo,
|
|
1416
1424
|
parseLinkTitle: xo
|
|
1417
1425
|
}, Symbol.toStringTag, { value: "Module" })), iu = {};
|
|
1418
1426
|
iu.code_inline = function(u, e, t, n, r) {
|
|
@@ -1425,7 +1433,7 @@ iu.code_block = function(u, e, t, n, r) {
|
|
|
1425
1433
|
`;
|
|
1426
1434
|
};
|
|
1427
1435
|
iu.fence = function(u, e, t, n, r) {
|
|
1428
|
-
const o = u[e], i = o.info ?
|
|
1436
|
+
const o = u[e], i = o.info ? Pu(o.info).trim() : "";
|
|
1429
1437
|
let c = "", a = "";
|
|
1430
1438
|
if (i) {
|
|
1431
1439
|
const f = i.split(/(\s+)/g);
|
|
@@ -1438,10 +1446,10 @@ iu.fence = function(u, e, t, n, r) {
|
|
|
1438
1446
|
if (i) {
|
|
1439
1447
|
const f = o.attrIndex("class"), d = o.attrs ? o.attrs.slice() : [];
|
|
1440
1448
|
f < 0 ? d.push(["class", t.langPrefix + c]) : (d[f] = d[f].slice(), d[f][1] += " " + t.langPrefix + c);
|
|
1441
|
-
const
|
|
1449
|
+
const m = {
|
|
1442
1450
|
attrs: d
|
|
1443
1451
|
};
|
|
1444
|
-
return `<pre><code${r.renderAttrs(
|
|
1452
|
+
return `<pre><code${r.renderAttrs(m)}>${s}</code></pre>
|
|
1445
1453
|
`;
|
|
1446
1454
|
}
|
|
1447
1455
|
return `<pre><code${r.renderAttrs(o)}>${s}</code></pre>
|
|
@@ -1471,10 +1479,10 @@ iu.html_block = function(u, e) {
|
|
|
1471
1479
|
iu.html_inline = function(u, e) {
|
|
1472
1480
|
return u[e].content;
|
|
1473
1481
|
};
|
|
1474
|
-
function
|
|
1482
|
+
function zu() {
|
|
1475
1483
|
this.rules = Fe({}, iu);
|
|
1476
1484
|
}
|
|
1477
|
-
|
|
1485
|
+
zu.prototype.renderAttrs = function(e) {
|
|
1478
1486
|
let t, n, r;
|
|
1479
1487
|
if (!e.attrs)
|
|
1480
1488
|
return "";
|
|
@@ -1482,7 +1490,7 @@ Pu.prototype.renderAttrs = function(e) {
|
|
|
1482
1490
|
r += " " + xu(e.attrs[t][0]) + '="' + xu(e.attrs[t][1]) + '"';
|
|
1483
1491
|
return r;
|
|
1484
1492
|
};
|
|
1485
|
-
|
|
1493
|
+
zu.prototype.renderToken = function(e, t, n) {
|
|
1486
1494
|
const r = e[t];
|
|
1487
1495
|
let o = "";
|
|
1488
1496
|
if (r.hidden)
|
|
@@ -1497,7 +1505,7 @@ Pu.prototype.renderToken = function(e, t, n) {
|
|
|
1497
1505
|
return o += i ? `>
|
|
1498
1506
|
` : ">", o;
|
|
1499
1507
|
};
|
|
1500
|
-
|
|
1508
|
+
zu.prototype.renderInline = function(u, e, t) {
|
|
1501
1509
|
let n = "";
|
|
1502
1510
|
const r = this.rules;
|
|
1503
1511
|
for (let o = 0, i = u.length; o < i; o++) {
|
|
@@ -1506,7 +1514,7 @@ Pu.prototype.renderInline = function(u, e, t) {
|
|
|
1506
1514
|
}
|
|
1507
1515
|
return n;
|
|
1508
1516
|
};
|
|
1509
|
-
|
|
1517
|
+
zu.prototype.renderInlineAsText = function(u, e, t) {
|
|
1510
1518
|
let n = "";
|
|
1511
1519
|
for (let r = 0, o = u.length; r < o; r++)
|
|
1512
1520
|
switch (u[r].type) {
|
|
@@ -1528,7 +1536,7 @@ Pu.prototype.renderInlineAsText = function(u, e, t) {
|
|
|
1528
1536
|
}
|
|
1529
1537
|
return n;
|
|
1530
1538
|
};
|
|
1531
|
-
|
|
1539
|
+
zu.prototype.render = function(u, e, t) {
|
|
1532
1540
|
let n = "";
|
|
1533
1541
|
const r = this.rules;
|
|
1534
1542
|
for (let o = 0, i = u.length; o < i; o++) {
|
|
@@ -1702,7 +1710,7 @@ function To(u) {
|
|
|
1702
1710
|
const a = c.content;
|
|
1703
1711
|
let s = u.md.linkify.match(a);
|
|
1704
1712
|
const f = [];
|
|
1705
|
-
let d = c.level,
|
|
1713
|
+
let d = c.level, m = 0;
|
|
1706
1714
|
s.length > 0 && s[0].index === 0 && i > 0 && r[i - 1].type === "text_special" && (s = s.slice(1));
|
|
1707
1715
|
for (let p = 0; p < s.length; p++) {
|
|
1708
1716
|
const h = s[p].url, C = u.md.normalizeLink(h);
|
|
@@ -1711,20 +1719,20 @@ function To(u) {
|
|
|
1711
1719
|
let D = s[p].text;
|
|
1712
1720
|
s[p].schema ? s[p].schema === "mailto:" && !/^mailto:/i.test(D) ? D = u.md.normalizeLinkText("mailto:" + D).replace(/^mailto:/, "") : D = u.md.normalizeLinkText(D) : D = u.md.normalizeLinkText("http://" + D).replace(/^http:\/\//, "");
|
|
1713
1721
|
const T = s[p].index;
|
|
1714
|
-
if (T >
|
|
1722
|
+
if (T > m) {
|
|
1715
1723
|
const A = new u.Token("text", "", 0);
|
|
1716
|
-
A.content = a.slice(
|
|
1724
|
+
A.content = a.slice(m, T), A.level = d, f.push(A);
|
|
1717
1725
|
}
|
|
1718
1726
|
const E = new u.Token("link_open", "a", 1);
|
|
1719
1727
|
E.attrs = [["href", C]], E.level = d++, E.markup = "linkify", E.info = "auto", f.push(E);
|
|
1720
1728
|
const k = new u.Token("text", "", 0);
|
|
1721
1729
|
k.content = D, k.level = d, f.push(k);
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1730
|
+
const _ = new u.Token("link_close", "a", -1);
|
|
1731
|
+
_.level = --d, _.markup = "linkify", _.info = "auto", f.push(_), m = s[p].lastIndex;
|
|
1724
1732
|
}
|
|
1725
|
-
if (
|
|
1733
|
+
if (m < a.length) {
|
|
1726
1734
|
const p = new u.Token("text", "", 0);
|
|
1727
|
-
p.content = a.slice(
|
|
1735
|
+
p.content = a.slice(m), p.level = d, f.push(p);
|
|
1728
1736
|
}
|
|
1729
1737
|
e[t].children = r = Bt(r, i, f);
|
|
1730
1738
|
}
|
|
@@ -1760,7 +1768,7 @@ function Lo(u) {
|
|
|
1760
1768
|
u.tokens[e].type === "inline" && (So.test(u.tokens[e].content) && Io(u.tokens[e].children), qt.test(u.tokens[e].content) && Mo(u.tokens[e].children));
|
|
1761
1769
|
}
|
|
1762
1770
|
const Oo = /['"]/, ft = /['"]/g, dt = "’";
|
|
1763
|
-
function
|
|
1771
|
+
function _e(u, e, t) {
|
|
1764
1772
|
return u.slice(0, e) + t + u.slice(e + 1);
|
|
1765
1773
|
}
|
|
1766
1774
|
function No(u, e) {
|
|
@@ -1779,7 +1787,7 @@ function No(u, e) {
|
|
|
1779
1787
|
const f = ft.exec(c);
|
|
1780
1788
|
if (!f)
|
|
1781
1789
|
break;
|
|
1782
|
-
let d = !0,
|
|
1790
|
+
let d = !0, m = !0;
|
|
1783
1791
|
a = f.index + 1;
|
|
1784
1792
|
const p = f[0] === "'";
|
|
1785
1793
|
let h = 32;
|
|
@@ -1801,23 +1809,23 @@ function No(u, e) {
|
|
|
1801
1809
|
break;
|
|
1802
1810
|
}
|
|
1803
1811
|
const D = ue(h) || Ku(String.fromCharCode(h)), T = ue(C) || Ku(String.fromCharCode(C)), E = Qu(h), k = Qu(C);
|
|
1804
|
-
if (k ? d = !1 : T && (E || D || (d = !1)), E ?
|
|
1805
|
-
p && (o.content =
|
|
1812
|
+
if (k ? d = !1 : T && (E || D || (d = !1)), E ? m = !1 : D && (k || T || (m = !1)), C === 34 && f[0] === '"' && h >= 48 && h <= 57 && (m = d = !1), d && m && (d = D, m = T), !d && !m) {
|
|
1813
|
+
p && (o.content = _e(o.content, f.index, dt));
|
|
1806
1814
|
continue;
|
|
1807
1815
|
}
|
|
1808
|
-
if (
|
|
1816
|
+
if (m)
|
|
1809
1817
|
for (t = n.length - 1; t >= 0; t--) {
|
|
1810
|
-
let
|
|
1818
|
+
let _ = n[t];
|
|
1811
1819
|
if (n[t].level < i)
|
|
1812
1820
|
break;
|
|
1813
|
-
if (
|
|
1814
|
-
|
|
1821
|
+
if (_.single === p && n[t].level === i) {
|
|
1822
|
+
_ = n[t];
|
|
1815
1823
|
let A, y;
|
|
1816
|
-
p ? (A = e.md.options.quotes[2], y = e.md.options.quotes[3]) : (A = e.md.options.quotes[0], y = e.md.options.quotes[1]), o.content =
|
|
1817
|
-
u[
|
|
1818
|
-
|
|
1824
|
+
p ? (A = e.md.options.quotes[2], y = e.md.options.quotes[3]) : (A = e.md.options.quotes[0], y = e.md.options.quotes[1]), o.content = _e(o.content, f.index, y), u[_.token].content = _e(
|
|
1825
|
+
u[_.token].content,
|
|
1826
|
+
_.pos,
|
|
1819
1827
|
A
|
|
1820
|
-
), a += y.length - 1,
|
|
1828
|
+
), a += y.length - 1, _.token === r && (a += A.length - 1), c = o.content, s = c.length, n.length = t;
|
|
1821
1829
|
continue u;
|
|
1822
1830
|
}
|
|
1823
1831
|
}
|
|
@@ -1826,7 +1834,7 @@ function No(u, e) {
|
|
|
1826
1834
|
pos: f.index,
|
|
1827
1835
|
single: p,
|
|
1828
1836
|
level: i
|
|
1829
|
-
}) :
|
|
1837
|
+
}) : m && p && (o.content = _e(o.content, f.index, dt));
|
|
1830
1838
|
}
|
|
1831
1839
|
}
|
|
1832
1840
|
}
|
|
@@ -1848,7 +1856,7 @@ function Po(u) {
|
|
|
1848
1856
|
e !== t && (i.length = t);
|
|
1849
1857
|
}
|
|
1850
1858
|
}
|
|
1851
|
-
const
|
|
1859
|
+
const Ye = [
|
|
1852
1860
|
["normalize", Ao],
|
|
1853
1861
|
["block", Co],
|
|
1854
1862
|
["inline", Do],
|
|
@@ -1859,17 +1867,17 @@ const Ve = [
|
|
|
1859
1867
|
// and joins them with the rest of the text
|
|
1860
1868
|
["text_join", Po]
|
|
1861
1869
|
];
|
|
1862
|
-
function
|
|
1870
|
+
function m0() {
|
|
1863
1871
|
this.ruler = new Z();
|
|
1864
|
-
for (let u = 0; u <
|
|
1865
|
-
this.ruler.push(
|
|
1872
|
+
for (let u = 0; u < Ye.length; u++)
|
|
1873
|
+
this.ruler.push(Ye[u][0], Ye[u][1]);
|
|
1866
1874
|
}
|
|
1867
|
-
|
|
1875
|
+
m0.prototype.process = function(u) {
|
|
1868
1876
|
const e = this.ruler.getRules("");
|
|
1869
1877
|
for (let t = 0, n = e.length; t < n; t++)
|
|
1870
1878
|
e[t](u);
|
|
1871
1879
|
};
|
|
1872
|
-
|
|
1880
|
+
m0.prototype.State = zt;
|
|
1873
1881
|
function au(u, e, t, n) {
|
|
1874
1882
|
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;
|
|
1875
1883
|
const r = this.src;
|
|
@@ -1935,9 +1943,9 @@ au.prototype.getLines = function(e, t, n, r) {
|
|
|
1935
1943
|
const s = this.bMarks[c];
|
|
1936
1944
|
let f = s, d;
|
|
1937
1945
|
for (c + 1 < t || r ? d = this.eMarks[c] + 1 : d = this.eMarks[c]; f < d && a < n; ) {
|
|
1938
|
-
const
|
|
1939
|
-
if (w(
|
|
1940
|
-
|
|
1946
|
+
const m = this.src.charCodeAt(f);
|
|
1947
|
+
if (w(m))
|
|
1948
|
+
m === 9 ? a += 4 - (a + this.bsCount[c]) % 4 : a++;
|
|
1941
1949
|
else if (f - s < this.tShift[c])
|
|
1942
1950
|
a++;
|
|
1943
1951
|
else
|
|
@@ -1950,7 +1958,7 @@ au.prototype.getLines = function(e, t, n, r) {
|
|
|
1950
1958
|
};
|
|
1951
1959
|
au.prototype.Token = tu;
|
|
1952
1960
|
const zo = 65536;
|
|
1953
|
-
function
|
|
1961
|
+
function Xe(u, e) {
|
|
1954
1962
|
const t = u.bMarks[e] + u.tShift[e], n = u.eMarks[e];
|
|
1955
1963
|
return u.src.slice(t, n);
|
|
1956
1964
|
}
|
|
@@ -1977,17 +1985,17 @@ function qo(u, e, t, n) {
|
|
|
1977
1985
|
if (c !== 124 && c !== 45 && c !== 58 && !w(c) || i === 45 && w(c))
|
|
1978
1986
|
return !1;
|
|
1979
1987
|
for (; o < u.eMarks[r]; ) {
|
|
1980
|
-
const
|
|
1981
|
-
if (
|
|
1988
|
+
const _ = u.src.charCodeAt(o);
|
|
1989
|
+
if (_ !== 124 && _ !== 45 && _ !== 58 && !w(_))
|
|
1982
1990
|
return !1;
|
|
1983
1991
|
o++;
|
|
1984
1992
|
}
|
|
1985
|
-
let a =
|
|
1993
|
+
let a = Xe(u, e + 1), s = a.split("|");
|
|
1986
1994
|
const f = [];
|
|
1987
|
-
for (let
|
|
1988
|
-
const A = s[
|
|
1995
|
+
for (let _ = 0; _ < s.length; _++) {
|
|
1996
|
+
const A = s[_].trim();
|
|
1989
1997
|
if (!A) {
|
|
1990
|
-
if (
|
|
1998
|
+
if (_ === 0 || _ === s.length - 1)
|
|
1991
1999
|
continue;
|
|
1992
2000
|
return !1;
|
|
1993
2001
|
}
|
|
@@ -1995,7 +2003,7 @@ function qo(u, e, t, n) {
|
|
|
1995
2003
|
return !1;
|
|
1996
2004
|
A.charCodeAt(A.length - 1) === 58 ? f.push(A.charCodeAt(0) === 58 ? "center" : "right") : A.charCodeAt(0) === 58 ? f.push("left") : f.push("");
|
|
1997
2005
|
}
|
|
1998
|
-
if (a =
|
|
2006
|
+
if (a = Xe(u, e).trim(), a.indexOf("|") === -1 || u.sCount[e] - u.blkIndent >= 4)
|
|
1999
2007
|
return !1;
|
|
2000
2008
|
s = ht(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop();
|
|
2001
2009
|
const d = s.length;
|
|
@@ -2003,7 +2011,7 @@ function qo(u, e, t, n) {
|
|
|
2003
2011
|
return !1;
|
|
2004
2012
|
if (n)
|
|
2005
2013
|
return !0;
|
|
2006
|
-
const
|
|
2014
|
+
const m = u.parentType;
|
|
2007
2015
|
u.parentType = "table";
|
|
2008
2016
|
const p = u.md.block.ruler.getRules("blockquote"), h = u.push("table_open", "table", 1), C = [e, 0];
|
|
2009
2017
|
h.map = C;
|
|
@@ -2011,22 +2019,22 @@ function qo(u, e, t, n) {
|
|
|
2011
2019
|
D.map = [e, e + 1];
|
|
2012
2020
|
const T = u.push("tr_open", "tr", 1);
|
|
2013
2021
|
T.map = [e, e + 1];
|
|
2014
|
-
for (let
|
|
2022
|
+
for (let _ = 0; _ < s.length; _++) {
|
|
2015
2023
|
const A = u.push("th_open", "th", 1);
|
|
2016
|
-
f[
|
|
2024
|
+
f[_] && (A.attrs = [["style", "text-align:" + f[_]]]);
|
|
2017
2025
|
const y = u.push("inline", "", 0);
|
|
2018
|
-
y.content = s[
|
|
2026
|
+
y.content = s[_].trim(), y.children = [], u.push("th_close", "th", -1);
|
|
2019
2027
|
}
|
|
2020
2028
|
u.push("tr_close", "tr", -1), u.push("thead_close", "thead", -1);
|
|
2021
2029
|
let E, k = 0;
|
|
2022
2030
|
for (r = e + 2; r < t && !(u.sCount[r] < u.blkIndent); r++) {
|
|
2023
|
-
let
|
|
2024
|
-
for (let y = 0,
|
|
2031
|
+
let _ = !1;
|
|
2032
|
+
for (let y = 0, M = p.length; y < M; y++)
|
|
2025
2033
|
if (p[y](u, r, t, !0)) {
|
|
2026
|
-
|
|
2034
|
+
_ = !0;
|
|
2027
2035
|
break;
|
|
2028
2036
|
}
|
|
2029
|
-
if (
|
|
2037
|
+
if (_ || (a = Xe(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = ht(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), k += d - s.length, k > zo))
|
|
2030
2038
|
break;
|
|
2031
2039
|
if (r === e + 2) {
|
|
2032
2040
|
const y = u.push("tbody_open", "tbody", 1);
|
|
@@ -2035,14 +2043,14 @@ function qo(u, e, t, n) {
|
|
|
2035
2043
|
const A = u.push("tr_open", "tr", 1);
|
|
2036
2044
|
A.map = [r, r + 1];
|
|
2037
2045
|
for (let y = 0; y < d; y++) {
|
|
2038
|
-
const
|
|
2039
|
-
f[y] && (
|
|
2046
|
+
const M = u.push("td_open", "td", 1);
|
|
2047
|
+
f[y] && (M.attrs = [["style", "text-align:" + f[y]]]);
|
|
2040
2048
|
const V = u.push("inline", "", 0);
|
|
2041
2049
|
V.content = s[y] ? s[y].trim() : "", V.children = [], u.push("td_close", "td", -1);
|
|
2042
2050
|
}
|
|
2043
2051
|
u.push("tr_close", "tr", -1);
|
|
2044
2052
|
}
|
|
2045
|
-
return E && (u.push("tbody_close", "tbody", -1), E[1] = r), u.push("table_close", "table", -1), C[1] = r, u.parentType =
|
|
2053
|
+
return E && (u.push("tbody_close", "tbody", -1), E[1] = r), u.push("table_close", "table", -1), C[1] = r, u.parentType = m, u.line = r, !0;
|
|
2046
2054
|
}
|
|
2047
2055
|
function Uo(u, e, t) {
|
|
2048
2056
|
if (u.sCount[e] - u.blkIndent < 4)
|
|
@@ -2081,13 +2089,13 @@ function Ho(u, e, t, n) {
|
|
|
2081
2089
|
return !1;
|
|
2082
2090
|
if (n)
|
|
2083
2091
|
return !0;
|
|
2084
|
-
let d = e,
|
|
2092
|
+
let d = e, m = !1;
|
|
2085
2093
|
for (; d++, !(d >= t || (r = c = u.bMarks[d] + u.tShift[d], o = u.eMarks[d], r < o && u.sCount[d] < u.blkIndent)); )
|
|
2086
2094
|
if (u.src.charCodeAt(r) === i && !(u.sCount[d] - u.blkIndent >= 4) && (r = u.skipChars(r, i), !(r - c < a) && (r = u.skipSpaces(r), !(r < o)))) {
|
|
2087
|
-
|
|
2095
|
+
m = !0;
|
|
2088
2096
|
break;
|
|
2089
2097
|
}
|
|
2090
|
-
a = u.sCount[e], u.line = d + (
|
|
2098
|
+
a = u.sCount[e], u.line = d + (m ? 1 : 0);
|
|
2091
2099
|
const p = u.push("fence", "code", 0);
|
|
2092
2100
|
return p.info = f, p.content = u.getLines(e + 1, d, a, !0), p.markup = s, p.map = [e, u.line], !0;
|
|
2093
2101
|
}
|
|
@@ -2098,7 +2106,7 @@ function $o(u, e, t, n) {
|
|
|
2098
2106
|
return !1;
|
|
2099
2107
|
if (n)
|
|
2100
2108
|
return !0;
|
|
2101
|
-
const c = [], a = [], s = [], f = [], d = u.md.block.ruler.getRules("blockquote"),
|
|
2109
|
+
const c = [], a = [], s = [], f = [], d = u.md.block.ruler.getRules("blockquote"), m = u.parentType;
|
|
2102
2110
|
u.parentType = "blockquote";
|
|
2103
2111
|
let p = !1, h;
|
|
2104
2112
|
for (h = e; h < t; h++) {
|
|
@@ -2106,13 +2114,13 @@ function $o(u, e, t, n) {
|
|
|
2106
2114
|
if (r = u.bMarks[h] + u.tShift[h], o = u.eMarks[h], r >= o)
|
|
2107
2115
|
break;
|
|
2108
2116
|
if (u.src.charCodeAt(r++) === 62 && !k) {
|
|
2109
|
-
let A = u.sCount[h] + 1, y,
|
|
2110
|
-
u.src.charCodeAt(r) === 32 ? (r++, A++,
|
|
2117
|
+
let A = u.sCount[h] + 1, y, M;
|
|
2118
|
+
u.src.charCodeAt(r) === 32 ? (r++, A++, M = !1, y = !0) : u.src.charCodeAt(r) === 9 ? (y = !0, (u.bsCount[h] + A) % 4 === 3 ? (r++, A++, M = !1) : M = !0) : y = !1;
|
|
2111
2119
|
let V = A;
|
|
2112
2120
|
for (c.push(u.bMarks[h]), u.bMarks[h] = r; r < o; ) {
|
|
2113
2121
|
const nu = u.src.charCodeAt(r);
|
|
2114
2122
|
if (w(nu))
|
|
2115
|
-
nu === 9 ? V += 4 - (V + u.bsCount[h] + (
|
|
2123
|
+
nu === 9 ? V += 4 - (V + u.bsCount[h] + (M ? 1 : 0)) % 4 : V++;
|
|
2116
2124
|
else
|
|
2117
2125
|
break;
|
|
2118
2126
|
r++;
|
|
@@ -2122,13 +2130,13 @@ function $o(u, e, t, n) {
|
|
|
2122
2130
|
}
|
|
2123
2131
|
if (p)
|
|
2124
2132
|
break;
|
|
2125
|
-
let
|
|
2133
|
+
let _ = !1;
|
|
2126
2134
|
for (let A = 0, y = d.length; A < y; A++)
|
|
2127
2135
|
if (d[A](u, h, t, !0)) {
|
|
2128
|
-
|
|
2136
|
+
_ = !0;
|
|
2129
2137
|
break;
|
|
2130
2138
|
}
|
|
2131
|
-
if (
|
|
2139
|
+
if (_) {
|
|
2132
2140
|
u.lineMax = h, u.blkIndent !== 0 && (c.push(u.bMarks[h]), a.push(u.bsCount[h]), f.push(u.tShift[h]), s.push(u.sCount[h]), u.sCount[h] -= u.blkIndent);
|
|
2133
2141
|
break;
|
|
2134
2142
|
}
|
|
@@ -2141,7 +2149,7 @@ function $o(u, e, t, n) {
|
|
|
2141
2149
|
const T = [e, 0];
|
|
2142
2150
|
D.map = T, u.md.block.tokenize(u, e, h);
|
|
2143
2151
|
const E = u.push("blockquote_close", "blockquote", -1);
|
|
2144
|
-
E.markup = ">", u.lineMax = i, u.parentType =
|
|
2152
|
+
E.markup = ">", u.lineMax = i, u.parentType = m, T[1] = u.line;
|
|
2145
2153
|
for (let k = 0; k < f.length; k++)
|
|
2146
2154
|
u.bMarks[k + e] = c[k], u.tShift[k + e] = f[k], u.sCount[k + e] = s[k], u.bsCount[k + e] = a[k];
|
|
2147
2155
|
return u.blkIndent = C, !0;
|
|
@@ -2215,9 +2223,9 @@ function Wo(u, e, t, n) {
|
|
|
2215
2223
|
return !1;
|
|
2216
2224
|
let f = !1;
|
|
2217
2225
|
n && u.parentType === "paragraph" && u.sCount[a] >= u.blkIndent && (f = !0);
|
|
2218
|
-
let d,
|
|
2226
|
+
let d, m, p;
|
|
2219
2227
|
if ((p = bt(u, a)) >= 0) {
|
|
2220
|
-
if (d = !0, i = u.bMarks[a] + u.tShift[a],
|
|
2228
|
+
if (d = !0, i = u.bMarks[a] + u.tShift[a], m = Number(u.src.slice(i, p - 1)), f && m !== 1) return !1;
|
|
2221
2229
|
} else if ((p = pt(u, a)) >= 0)
|
|
2222
2230
|
d = !1;
|
|
2223
2231
|
else
|
|
@@ -2227,15 +2235,15 @@ function Wo(u, e, t, n) {
|
|
|
2227
2235
|
if (n)
|
|
2228
2236
|
return !0;
|
|
2229
2237
|
const h = u.src.charCodeAt(p - 1), C = u.tokens.length;
|
|
2230
|
-
d ? (c = u.push("ordered_list_open", "ol", 1),
|
|
2238
|
+
d ? (c = u.push("ordered_list_open", "ol", 1), m !== 1 && (c.attrs = [["start", m]])) : c = u.push("bullet_list_open", "ul", 1);
|
|
2231
2239
|
const D = [a, 0];
|
|
2232
2240
|
c.map = D, c.markup = String.fromCharCode(h);
|
|
2233
2241
|
let T = !1;
|
|
2234
2242
|
const E = u.md.block.ruler.getRules("list"), k = u.parentType;
|
|
2235
2243
|
for (u.parentType = "list"; a < t; ) {
|
|
2236
2244
|
o = p, r = u.eMarks[a];
|
|
2237
|
-
const
|
|
2238
|
-
let A =
|
|
2245
|
+
const _ = u.sCount[a] + p - (u.bMarks[a] + u.tShift[a]);
|
|
2246
|
+
let A = _;
|
|
2239
2247
|
for (; o < r; ) {
|
|
2240
2248
|
const hu = u.src.charCodeAt(o);
|
|
2241
2249
|
if (hu === 9)
|
|
@@ -2247,22 +2255,22 @@ function Wo(u, e, t, n) {
|
|
|
2247
2255
|
o++;
|
|
2248
2256
|
}
|
|
2249
2257
|
const y = o;
|
|
2250
|
-
let
|
|
2251
|
-
y >= r ?
|
|
2252
|
-
const V =
|
|
2258
|
+
let M;
|
|
2259
|
+
y >= r ? M = 1 : M = A - _, M > 4 && (M = 1);
|
|
2260
|
+
const V = _ + M;
|
|
2253
2261
|
c = u.push("list_item_open", "li", 1), c.markup = String.fromCharCode(h);
|
|
2254
2262
|
const nu = [a, 0];
|
|
2255
2263
|
c.map = nu, d && (c.info = u.src.slice(i, p - 1));
|
|
2256
|
-
const gu = u.tight,
|
|
2257
|
-
if (u.listIndent = u.blkIndent, u.blkIndent = V, u.tight = !0, u.tShift[a] = y - u.bMarks[a], u.sCount[a] = A, y >= r && u.isEmpty(a + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, a, t, !0), (!u.tight || T) && (s = !1), T = u.line - a > 1 && u.isEmpty(u.line - 1), u.blkIndent = u.listIndent, u.listIndent =
|
|
2264
|
+
const gu = u.tight, L = u.tShift[a], qu = u.sCount[a], Uu = u.listIndent;
|
|
2265
|
+
if (u.listIndent = u.blkIndent, u.blkIndent = V, u.tight = !0, u.tShift[a] = y - u.bMarks[a], u.sCount[a] = A, y >= r && u.isEmpty(a + 1) ? u.line = Math.min(u.line + 2, t) : u.md.block.tokenize(u, a, t, !0), (!u.tight || T) && (s = !1), T = u.line - a > 1 && u.isEmpty(u.line - 1), u.blkIndent = u.listIndent, u.listIndent = Uu, u.tShift[a] = L, u.sCount[a] = qu, u.tight = gu, c = u.push("list_item_close", "li", -1), c.markup = String.fromCharCode(h), a = u.line, nu[1] = a, a >= t || u.sCount[a] < u.blkIndent || u.sCount[a] - u.blkIndent >= 4)
|
|
2258
2266
|
break;
|
|
2259
|
-
let
|
|
2267
|
+
let Fu = !1;
|
|
2260
2268
|
for (let hu = 0, ve = E.length; hu < ve; hu++)
|
|
2261
2269
|
if (E[hu](u, a, t, !0)) {
|
|
2262
|
-
|
|
2270
|
+
Fu = !0;
|
|
2263
2271
|
break;
|
|
2264
2272
|
}
|
|
2265
|
-
if (
|
|
2273
|
+
if (Fu)
|
|
2266
2274
|
break;
|
|
2267
2275
|
if (d) {
|
|
2268
2276
|
if (p = bt(u, a), p < 0)
|
|
@@ -2283,13 +2291,13 @@ function Zo(u, e, t, n) {
|
|
|
2283
2291
|
const k = u.lineMax;
|
|
2284
2292
|
if (E >= k || u.isEmpty(E))
|
|
2285
2293
|
return null;
|
|
2286
|
-
let
|
|
2287
|
-
if (u.sCount[E] - u.blkIndent > 3 && (
|
|
2288
|
-
const
|
|
2294
|
+
let _ = !1;
|
|
2295
|
+
if (u.sCount[E] - u.blkIndent > 3 && (_ = !0), u.sCount[E] < 0 && (_ = !0), !_) {
|
|
2296
|
+
const M = u.md.block.ruler.getRules("reference"), V = u.parentType;
|
|
2289
2297
|
u.parentType = "reference";
|
|
2290
2298
|
let nu = !1;
|
|
2291
|
-
for (let gu = 0,
|
|
2292
|
-
if (
|
|
2299
|
+
for (let gu = 0, L = M.length; gu < L; gu++)
|
|
2300
|
+
if (M[gu](u, E, k, !0)) {
|
|
2293
2301
|
nu = !0;
|
|
2294
2302
|
break;
|
|
2295
2303
|
}
|
|
@@ -2333,7 +2341,7 @@ function Zo(u, e, t, n) {
|
|
|
2333
2341
|
if (!u.md.validateLink(d))
|
|
2334
2342
|
return !1;
|
|
2335
2343
|
r = f.pos;
|
|
2336
|
-
const
|
|
2344
|
+
const m = r, p = i, h = r;
|
|
2337
2345
|
for (; r < o; r++) {
|
|
2338
2346
|
const E = a.charCodeAt(r);
|
|
2339
2347
|
if (E === 10) {
|
|
@@ -2348,14 +2356,14 @@ function Zo(u, e, t, n) {
|
|
|
2348
2356
|
a += E, r = o, o = a.length, i++, C = u.md.helpers.parseLinkTitle(a, r, o, C);
|
|
2349
2357
|
}
|
|
2350
2358
|
let D;
|
|
2351
|
-
for (r < o && h !== r && C.ok ? (D = C.str, r = C.pos) : (D = "", r =
|
|
2359
|
+
for (r < o && h !== r && C.ok ? (D = C.str, r = C.pos) : (D = "", r = m, i = p); r < o; ) {
|
|
2352
2360
|
const E = a.charCodeAt(r);
|
|
2353
2361
|
if (!w(E))
|
|
2354
2362
|
break;
|
|
2355
2363
|
r++;
|
|
2356
2364
|
}
|
|
2357
2365
|
if (r < o && a.charCodeAt(r) !== 10 && D)
|
|
2358
|
-
for (D = "", r =
|
|
2366
|
+
for (D = "", r = m, i = p; r < o; ) {
|
|
2359
2367
|
const E = a.charCodeAt(r);
|
|
2360
2368
|
if (!w(E))
|
|
2361
2369
|
break;
|
|
@@ -2429,7 +2437,7 @@ const Vo = [
|
|
|
2429
2437
|
"tr",
|
|
2430
2438
|
"track",
|
|
2431
2439
|
"ul"
|
|
2432
|
-
], Yo = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Xo = "[^\"'=<>`\\x00-\\x20]+", Jo = "'[^']*'", Qo = '"[^"]*"', Ko = "(?:" + Xo + "|" + Jo + "|" + Qo + ")", uc = "(?:\\s+" + Yo + "(?:\\s*=\\s*" + Ko + ")?)", Ut = "<[A-Za-z][A-Za-z0-9\\-]*" + uc + "*\\s*\\/?>", Ht = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", ec = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", tc = "<[?][\\s\\S]*?[?]>", nc = "<![A-Za-z][^>]*>", rc = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", oc = new RegExp("^(?:" + Ut + "|" + Ht + "|" + ec + "|" + tc + "|" + nc + "|" + rc + ")"), cc = new RegExp("^(?:" + Ut + "|" + Ht + ")"),
|
|
2440
|
+
], Yo = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Xo = "[^\"'=<>`\\x00-\\x20]+", Jo = "'[^']*'", Qo = '"[^"]*"', Ko = "(?:" + Xo + "|" + Jo + "|" + Qo + ")", uc = "(?:\\s+" + Yo + "(?:\\s*=\\s*" + Ko + ")?)", Ut = "<[A-Za-z][A-Za-z0-9\\-]*" + uc + "*\\s*\\/?>", Ht = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", ec = "<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->", tc = "<[?][\\s\\S]*?[?]>", nc = "<![A-Za-z][^>]*>", rc = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", oc = new RegExp("^(?:" + Ut + "|" + Ht + "|" + ec + "|" + tc + "|" + nc + "|" + rc + ")"), cc = new RegExp("^(?:" + Ut + "|" + Ht + ")"), Ou = [
|
|
2433
2441
|
[/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
|
|
2434
2442
|
[/^<!--/, /-->/, !0],
|
|
2435
2443
|
[/^<\?/, /\?>/, !0],
|
|
@@ -2443,16 +2451,16 @@ function ic(u, e, t, n) {
|
|
|
2443
2451
|
if (u.sCount[e] - u.blkIndent >= 4 || !u.md.options.html || u.src.charCodeAt(r) !== 60)
|
|
2444
2452
|
return !1;
|
|
2445
2453
|
let i = u.src.slice(r, o), c = 0;
|
|
2446
|
-
for (; c <
|
|
2454
|
+
for (; c < Ou.length && !Ou[c][0].test(i); c++)
|
|
2447
2455
|
;
|
|
2448
|
-
if (c ===
|
|
2456
|
+
if (c === Ou.length)
|
|
2449
2457
|
return !1;
|
|
2450
2458
|
if (n)
|
|
2451
|
-
return
|
|
2459
|
+
return Ou[c][2];
|
|
2452
2460
|
let a = e + 1;
|
|
2453
|
-
if (!
|
|
2461
|
+
if (!Ou[c][1].test(i)) {
|
|
2454
2462
|
for (; a < t && !(u.sCount[a] < u.blkIndent); a++)
|
|
2455
|
-
if (r = u.bMarks[a] + u.tShift[a], o = u.eMarks[a], i = u.src.slice(r, o),
|
|
2463
|
+
if (r = u.bMarks[a] + u.tShift[a], o = u.eMarks[a], i = u.src.slice(r, o), Ou[c][1].test(i)) {
|
|
2456
2464
|
i.length !== 0 && a++;
|
|
2457
2465
|
break;
|
|
2458
2466
|
}
|
|
@@ -2505,13 +2513,13 @@ function sc(u, e, t) {
|
|
|
2505
2513
|
}
|
|
2506
2514
|
if (u.sCount[c] < 0)
|
|
2507
2515
|
continue;
|
|
2508
|
-
let
|
|
2516
|
+
let m = !1;
|
|
2509
2517
|
for (let p = 0, h = n.length; p < h; p++)
|
|
2510
2518
|
if (n[p](u, c, t, !0)) {
|
|
2511
|
-
|
|
2519
|
+
m = !0;
|
|
2512
2520
|
break;
|
|
2513
2521
|
}
|
|
2514
|
-
if (
|
|
2522
|
+
if (m)
|
|
2515
2523
|
break;
|
|
2516
2524
|
}
|
|
2517
2525
|
if (!o)
|
|
@@ -2612,8 +2620,8 @@ ce.prototype.scanDelims = function(u, e) {
|
|
|
2612
2620
|
let o = u;
|
|
2613
2621
|
for (; o < t && this.src.charCodeAt(o) === n; )
|
|
2614
2622
|
o++;
|
|
2615
|
-
const i = o - u, c = o < t ? this.src.charCodeAt(o) : 32, a = ue(r) || Ku(String.fromCharCode(r)), s = ue(c) || Ku(String.fromCharCode(c)), f = Qu(r), d = Qu(c),
|
|
2616
|
-
return { can_open:
|
|
2623
|
+
const i = o - u, c = o < t ? this.src.charCodeAt(o) : 32, a = ue(r) || Ku(String.fromCharCode(r)), s = ue(c) || Ku(String.fromCharCode(c)), f = Qu(r), d = Qu(c), m = !d && (!s || f || a), p = !f && (!a || d || s);
|
|
2624
|
+
return { can_open: m && (e || !p || a), can_close: p && (e || !m || s), length: i };
|
|
2617
2625
|
};
|
|
2618
2626
|
ce.prototype.Token = tu;
|
|
2619
2627
|
function fc(u) {
|
|
@@ -2702,7 +2710,7 @@ for (let u = 0; u < 256; u++)
|
|
|
2702
2710
|
"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u) {
|
|
2703
2711
|
_0[u.charCodeAt(0)] = 1;
|
|
2704
2712
|
});
|
|
2705
|
-
function
|
|
2713
|
+
function mc(u, e) {
|
|
2706
2714
|
let t = u.pos;
|
|
2707
2715
|
const n = u.posMax;
|
|
2708
2716
|
if (u.src.charCodeAt(t) !== 92 || (t++, t >= n)) return !1;
|
|
@@ -2724,7 +2732,7 @@ function _c(u, e) {
|
|
|
2724
2732
|
}
|
|
2725
2733
|
return u.pos = t + 1, !0;
|
|
2726
2734
|
}
|
|
2727
|
-
function
|
|
2735
|
+
function _c(u, e) {
|
|
2728
2736
|
let t = u.pos;
|
|
2729
2737
|
if (u.src.charCodeAt(t) !== 96)
|
|
2730
2738
|
return !1;
|
|
@@ -2775,7 +2783,7 @@ function xc(u, e) {
|
|
|
2775
2783
|
});
|
|
2776
2784
|
return u.pos += r.length, !0;
|
|
2777
2785
|
}
|
|
2778
|
-
function
|
|
2786
|
+
function mt(u, e) {
|
|
2779
2787
|
let t;
|
|
2780
2788
|
const n = [], r = e.length;
|
|
2781
2789
|
for (let o = 0; o < r; o++) {
|
|
@@ -2795,9 +2803,9 @@ function _t(u, e) {
|
|
|
2795
2803
|
}
|
|
2796
2804
|
function gc(u) {
|
|
2797
2805
|
const e = u.tokens_meta, t = u.tokens_meta.length;
|
|
2798
|
-
|
|
2806
|
+
mt(u, u.delimiters);
|
|
2799
2807
|
for (let n = 0; n < t; n++)
|
|
2800
|
-
e[n] && e[n].delimiters &&
|
|
2808
|
+
e[n] && e[n].delimiters && mt(u, e[n].delimiters);
|
|
2801
2809
|
}
|
|
2802
2810
|
const $t = {
|
|
2803
2811
|
tokenize: xc,
|
|
@@ -2833,7 +2841,7 @@ function kc(u, e) {
|
|
|
2833
2841
|
}
|
|
2834
2842
|
return u.pos += r.length, !0;
|
|
2835
2843
|
}
|
|
2836
|
-
function
|
|
2844
|
+
function _t(u, e) {
|
|
2837
2845
|
const t = e.length;
|
|
2838
2846
|
for (let n = t - 1; n >= 0; n--) {
|
|
2839
2847
|
const r = e[n];
|
|
@@ -2849,9 +2857,9 @@ function mt(u, e) {
|
|
|
2849
2857
|
}
|
|
2850
2858
|
function Ec(u) {
|
|
2851
2859
|
const e = u.tokens_meta, t = u.tokens_meta.length;
|
|
2852
|
-
|
|
2860
|
+
_t(u, u.delimiters);
|
|
2853
2861
|
for (let n = 0; n < t; n++)
|
|
2854
|
-
e[n] && e[n].delimiters &&
|
|
2862
|
+
e[n] && e[n].delimiters && _t(u, e[n].delimiters);
|
|
2855
2863
|
}
|
|
2856
2864
|
const jt = {
|
|
2857
2865
|
tokenize: kc,
|
|
@@ -2861,7 +2869,7 @@ function Ac(u, e) {
|
|
|
2861
2869
|
let t, n, r, o, i = "", c = "", a = u.pos, s = !0;
|
|
2862
2870
|
if (u.src.charCodeAt(u.pos) !== 91)
|
|
2863
2871
|
return !1;
|
|
2864
|
-
const f = u.pos, d = u.posMax,
|
|
2872
|
+
const f = u.pos, d = u.posMax, m = u.pos + 1, p = u.md.helpers.parseLinkLabel(u, u.pos, !0);
|
|
2865
2873
|
if (p < 0)
|
|
2866
2874
|
return !1;
|
|
2867
2875
|
let h = p + 1;
|
|
@@ -2882,12 +2890,12 @@ function Ac(u, e) {
|
|
|
2882
2890
|
if (s) {
|
|
2883
2891
|
if (typeof u.env.references > "u")
|
|
2884
2892
|
return !1;
|
|
2885
|
-
if (h < d && u.src.charCodeAt(h) === 91 ? (a = h + 1, h = u.md.helpers.parseLinkLabel(u, h), h >= 0 ? n = u.src.slice(a, h++) : h = p + 1) : h = p + 1, n || (n = u.src.slice(
|
|
2893
|
+
if (h < d && u.src.charCodeAt(h) === 91 ? (a = h + 1, h = u.md.helpers.parseLinkLabel(u, h), h >= 0 ? n = u.src.slice(a, h++) : h = p + 1) : h = p + 1, n || (n = u.src.slice(m, p)), o = u.env.references[Te(n)], !o)
|
|
2886
2894
|
return u.pos = f, !1;
|
|
2887
2895
|
i = o.href, c = o.title;
|
|
2888
2896
|
}
|
|
2889
2897
|
if (!e) {
|
|
2890
|
-
u.pos =
|
|
2898
|
+
u.pos = m, u.posMax = p;
|
|
2891
2899
|
const C = u.push("link_open", "a", 1), D = [["href", i]];
|
|
2892
2900
|
C.attrs = D, c && D.push(["title", c]), u.linkLevel++, u.md.inline.tokenize(u), u.linkLevel--, u.push("link_close", "a", -1);
|
|
2893
2901
|
}
|
|
@@ -2895,31 +2903,31 @@ function Ac(u, e) {
|
|
|
2895
2903
|
}
|
|
2896
2904
|
function Cc(u, e) {
|
|
2897
2905
|
let t, n, r, o, i, c, a, s, f = "";
|
|
2898
|
-
const d = u.pos,
|
|
2906
|
+
const d = u.pos, m = u.posMax;
|
|
2899
2907
|
if (u.src.charCodeAt(u.pos) !== 33 || u.src.charCodeAt(u.pos + 1) !== 91)
|
|
2900
2908
|
return !1;
|
|
2901
2909
|
const p = u.pos + 2, h = u.md.helpers.parseLinkLabel(u, u.pos + 1, !1);
|
|
2902
2910
|
if (h < 0)
|
|
2903
2911
|
return !1;
|
|
2904
|
-
if (o = h + 1, o <
|
|
2905
|
-
for (o++; o <
|
|
2912
|
+
if (o = h + 1, o < m && u.src.charCodeAt(o) === 40) {
|
|
2913
|
+
for (o++; o < m && (t = u.src.charCodeAt(o), !(!w(t) && t !== 10)); o++)
|
|
2906
2914
|
;
|
|
2907
|
-
if (o >=
|
|
2915
|
+
if (o >= m)
|
|
2908
2916
|
return !1;
|
|
2909
|
-
for (s = o, c = u.md.helpers.parseLinkDestination(u.src, o, u.posMax), c.ok && (f = u.md.normalizeLink(c.str), u.md.validateLink(f) ? o = c.pos : f = ""), s = o; o <
|
|
2917
|
+
for (s = o, c = u.md.helpers.parseLinkDestination(u.src, o, u.posMax), c.ok && (f = u.md.normalizeLink(c.str), u.md.validateLink(f) ? o = c.pos : f = ""), s = o; o < m && (t = u.src.charCodeAt(o), !(!w(t) && t !== 10)); o++)
|
|
2910
2918
|
;
|
|
2911
|
-
if (c = u.md.helpers.parseLinkTitle(u.src, o, u.posMax), o <
|
|
2912
|
-
for (a = c.str, o = c.pos; o <
|
|
2919
|
+
if (c = u.md.helpers.parseLinkTitle(u.src, o, u.posMax), o < m && s !== o && c.ok)
|
|
2920
|
+
for (a = c.str, o = c.pos; o < m && (t = u.src.charCodeAt(o), !(!w(t) && t !== 10)); o++)
|
|
2913
2921
|
;
|
|
2914
2922
|
else
|
|
2915
2923
|
a = "";
|
|
2916
|
-
if (o >=
|
|
2924
|
+
if (o >= m || u.src.charCodeAt(o) !== 41)
|
|
2917
2925
|
return u.pos = d, !1;
|
|
2918
2926
|
o++;
|
|
2919
2927
|
} else {
|
|
2920
2928
|
if (typeof u.env.references > "u")
|
|
2921
2929
|
return !1;
|
|
2922
|
-
if (o <
|
|
2930
|
+
if (o < m && u.src.charCodeAt(o) === 91 ? (s = o + 1, o = u.md.helpers.parseLinkLabel(u, o), o >= 0 ? r = u.src.slice(s, o++) : o = h + 1) : o = h + 1, r || (r = u.src.slice(p, h)), i = u.env.references[Te(r)], !i)
|
|
2923
2931
|
return u.pos = d, !1;
|
|
2924
2932
|
f = i.href, a = i.title;
|
|
2925
2933
|
}
|
|
@@ -2935,7 +2943,7 @@ function Cc(u, e) {
|
|
|
2935
2943
|
const D = u.push("image", "img", 0), T = [["src", f], ["alt", ""]];
|
|
2936
2944
|
D.attrs = T, D.children = C, D.content = n, a && T.push(["title", a]);
|
|
2937
2945
|
}
|
|
2938
|
-
return u.pos = o, u.posMax =
|
|
2946
|
+
return u.pos = o, u.posMax = m, !0;
|
|
2939
2947
|
}
|
|
2940
2948
|
const Dc = /^([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])?)*)$/, yc = /^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;
|
|
2941
2949
|
function Fc(u, e) {
|
|
@@ -3017,7 +3025,7 @@ function Mc(u, e) {
|
|
|
3017
3025
|
if (o) {
|
|
3018
3026
|
if (!e) {
|
|
3019
3027
|
const i = o[1][0].toLowerCase() === "x" ? parseInt(o[1].slice(1), 16) : parseInt(o[1], 10), c = u.push("text_special", "", 0);
|
|
3020
|
-
c.content =
|
|
3028
|
+
c.content = b0(i) ? De(i) : De(65533), c.markup = o[0], c.info = "entity";
|
|
3021
3029
|
}
|
|
3022
3030
|
return u.pos += o[0].length, !0;
|
|
3023
3031
|
}
|
|
@@ -3050,8 +3058,8 @@ function xt(u) {
|
|
|
3050
3058
|
for (; s > a; s -= o[s] + 1) {
|
|
3051
3059
|
const d = u[s];
|
|
3052
3060
|
if (d.marker === c.marker && d.open && d.end < 0) {
|
|
3053
|
-
let
|
|
3054
|
-
if ((d.close || c.open) && (d.length + c.length) % 3 === 0 && (d.length % 3 !== 0 || c.length % 3 !== 0) && (
|
|
3061
|
+
let m = !1;
|
|
3062
|
+
if ((d.close || c.open) && (d.length + c.length) % 3 === 0 && (d.length % 3 !== 0 || c.length % 3 !== 0) && (m = !0), !m) {
|
|
3055
3063
|
const p = s > 0 && !u[s - 1].open ? o[s - 1] + 1 : 0;
|
|
3056
3064
|
o[i] = i - s + p, o[s] = p, c.open = !1, d.end = i, d.close = !1, f = -1, r = -2;
|
|
3057
3065
|
break;
|
|
@@ -3074,12 +3082,12 @@ function Oc(u) {
|
|
|
3074
3082
|
r[e].nesting < 0 && n--, r[e].level = n, r[e].nesting > 0 && n++, r[e].type === "text" && e + 1 < o && r[e + 1].type === "text" ? r[e + 1].content = r[e].content + r[e + 1].content : (e !== t && (r[t] = r[e]), t++);
|
|
3075
3083
|
e !== t && (r.length = t);
|
|
3076
3084
|
}
|
|
3077
|
-
const
|
|
3085
|
+
const Je = [
|
|
3078
3086
|
["text", dc],
|
|
3079
3087
|
["linkify", pc],
|
|
3080
3088
|
["newline", bc],
|
|
3081
|
-
["escape",
|
|
3082
|
-
["backticks",
|
|
3089
|
+
["escape", mc],
|
|
3090
|
+
["backticks", _c],
|
|
3083
3091
|
["strikethrough", $t.tokenize],
|
|
3084
3092
|
["emphasis", jt.tokenize],
|
|
3085
3093
|
["link", Ac],
|
|
@@ -3087,7 +3095,7 @@ const Xe = [
|
|
|
3087
3095
|
["autolink", Fc],
|
|
3088
3096
|
["html_inline", vc],
|
|
3089
3097
|
["entity", Mc]
|
|
3090
|
-
],
|
|
3098
|
+
], Qe = [
|
|
3091
3099
|
["balance_pairs", Lc],
|
|
3092
3100
|
["strikethrough", $t.postProcess],
|
|
3093
3101
|
["emphasis", jt.postProcess],
|
|
@@ -3097,11 +3105,11 @@ const Xe = [
|
|
|
3097
3105
|
];
|
|
3098
3106
|
function ie() {
|
|
3099
3107
|
this.ruler = new Z();
|
|
3100
|
-
for (let u = 0; u < Xe.length; u++)
|
|
3101
|
-
this.ruler.push(Xe[u][0], Xe[u][1]);
|
|
3102
|
-
this.ruler2 = new Z();
|
|
3103
3108
|
for (let u = 0; u < Je.length; u++)
|
|
3104
|
-
this.
|
|
3109
|
+
this.ruler.push(Je[u][0], Je[u][1]);
|
|
3110
|
+
this.ruler2 = new Z();
|
|
3111
|
+
for (let u = 0; u < Qe.length; u++)
|
|
3112
|
+
this.ruler2.push(Qe[u][0], Qe[u][1]);
|
|
3105
3113
|
}
|
|
3106
3114
|
ie.prototype.skipToken = function(u) {
|
|
3107
3115
|
const e = u.pos, t = this.ruler.getRules(""), n = t.length, r = u.md.options.maxNesting, o = u.cache;
|
|
@@ -3153,7 +3161,7 @@ ie.prototype.parse = function(u, e, t, n) {
|
|
|
3153
3161
|
ie.prototype.State = ce;
|
|
3154
3162
|
function Nc(u) {
|
|
3155
3163
|
const e = {};
|
|
3156
|
-
u = u || {}, e.src_Any = Rt.source, e.src_Cc = It.source, e.src_Z = Lt.source, e.src_P =
|
|
3164
|
+
u = u || {}, e.src_Any = Rt.source, e.src_Cc = It.source, e.src_Z = Lt.source, e.src_P = h0.source, e.src_ZPCc = [e.src_Z, e.src_P, e.src_Cc].join("|"), e.src_ZCc = [e.src_Z, e.src_Cc].join("|");
|
|
3157
3165
|
const t = "[><|]";
|
|
3158
3166
|
return e.src_pseudo_letter = "(?:(?!" + t + "|" + e.src_ZPCc + ")" + e.src_Any + ")", e.src_ip4 = "(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)", e.src_auth = "(?:(?:(?!" + e.src_ZCc + "|[@/\\[\\]()]).)+@)?", e.src_port = "(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?", e.src_host_terminator = "(?=$|" + t + "|" + e.src_ZPCc + ")(?!" + (u["---"] ? "-(?!--)|" : "-|") + "_|:\\d|\\.-|\\.(?!$|" + e.src_ZPCc + "))", e.src_path = "(?:[/?#](?:(?!" + e.src_ZCc + "|" + t + `|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!` + e.src_ZCc + "|\\]).)*\\]|\\((?:(?!" + e.src_ZCc + "|[)]).)*\\)|\\{(?:(?!" + e.src_ZCc + '|[}]).)*\\}|\\"(?:(?!' + e.src_ZCc + `|["]).)+\\"|\\'(?:(?!` + e.src_ZCc + "|[']).)+\\'|\\'(?=" + e.src_pseudo_letter + "|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!" + e.src_ZCc + "|[.]|$)|" + (u["---"] ? "\\-(?!--(?:[^-]|$))(?:-*)|" : "\\-+|") + // allow `,,,` in paths
|
|
3159
3167
|
",(?!" + e.src_ZCc + "|$)|;(?!" + e.src_ZCc + "|$)|\\!+(?!" + e.src_ZCc + "|[!]|$)|\\?(?!" + e.src_ZCc + "|[?]|$))+|\\/)?", e.src_email_name = '[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*', e.src_xn = "xn--[a-z0-9\\-]{1,59}", e.src_domain_root = // Allow letters & digits (http://test1)
|
|
@@ -3163,7 +3171,7 @@ function Nc(u) {
|
|
|
3163
3171
|
// but can start with > (markdown blockquote)
|
|
3164
3172
|
"(^|(?![.:/\\-_@])(?:[$+<=>^`||]|" + e.src_ZPCc + "))((?![$+<=>^`||])" + e.tpl_host_port_no_ip_fuzzy_strict + e.src_path + ")", e;
|
|
3165
3173
|
}
|
|
3166
|
-
function
|
|
3174
|
+
function o0(u) {
|
|
3167
3175
|
return Array.prototype.slice.call(arguments, 1).forEach(function(t) {
|
|
3168
3176
|
t && Object.keys(t).forEach(function(n) {
|
|
3169
3177
|
u[n] = t[n];
|
|
@@ -3286,20 +3294,20 @@ function Zc(u, e) {
|
|
|
3286
3294
|
const t = u.__index__, n = u.__last_index__, r = u.__text_cache__.slice(t, n);
|
|
3287
3295
|
this.schema = u.__schema__.toLowerCase(), this.index = t + e, this.lastIndex = n + e, this.raw = r, this.text = r, this.url = r;
|
|
3288
3296
|
}
|
|
3289
|
-
function
|
|
3297
|
+
function c0(u, e) {
|
|
3290
3298
|
const t = new Zc(u, e);
|
|
3291
3299
|
return u.__compiled__[t.schema].normalize(t, u), t;
|
|
3292
3300
|
}
|
|
3293
3301
|
function J(u, e) {
|
|
3294
3302
|
if (!(this instanceof J))
|
|
3295
3303
|
return new J(u, e);
|
|
3296
|
-
e || Uc(u) && (e = u, u = {}), this.__opts__ =
|
|
3304
|
+
e || Uc(u) && (e = u, u = {}), this.__opts__ = o0({}, Gt, e), this.__index__ = -1, this.__last_index__ = -1, this.__schema__ = "", this.__text_cache__ = "", this.__schemas__ = o0({}, Hc, u), this.__compiled__ = {}, this.__tlds__ = jc, this.__tlds_replaced__ = !1, this.re = {}, ye(this);
|
|
3297
3305
|
}
|
|
3298
3306
|
J.prototype.add = function(e, t) {
|
|
3299
3307
|
return this.__schemas__[e] = t, ye(this), this;
|
|
3300
3308
|
};
|
|
3301
3309
|
J.prototype.set = function(e) {
|
|
3302
|
-
return this.__opts__ =
|
|
3310
|
+
return this.__opts__ = o0(this.__opts__, e), this;
|
|
3303
3311
|
};
|
|
3304
3312
|
J.prototype.test = function(e) {
|
|
3305
3313
|
if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
|
|
@@ -3323,10 +3331,10 @@ J.prototype.testSchemaAt = function(e, t, n) {
|
|
|
3323
3331
|
J.prototype.match = function(e) {
|
|
3324
3332
|
const t = [];
|
|
3325
3333
|
let n = 0;
|
|
3326
|
-
this.__index__ >= 0 && this.__text_cache__ === e && (t.push(
|
|
3334
|
+
this.__index__ >= 0 && this.__text_cache__ === e && (t.push(c0(this, n)), n = this.__last_index__);
|
|
3327
3335
|
let r = n ? e.slice(n) : e;
|
|
3328
3336
|
for (; this.test(r); )
|
|
3329
|
-
t.push(
|
|
3337
|
+
t.push(c0(this, n)), r = r.slice(this.__last_index__), n += this.__last_index__;
|
|
3330
3338
|
return t.length ? t : null;
|
|
3331
3339
|
};
|
|
3332
3340
|
J.prototype.matchAtStart = function(e) {
|
|
@@ -3334,7 +3342,7 @@ J.prototype.matchAtStart = function(e) {
|
|
|
3334
3342
|
const t = this.re.schema_at_start.exec(e);
|
|
3335
3343
|
if (!t) return null;
|
|
3336
3344
|
const n = this.testSchemaAt(e, t[2], t[0].length);
|
|
3337
|
-
return n ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + n,
|
|
3345
|
+
return n ? (this.__schema__ = t[2], this.__index__ = t.index + t[1].length, this.__last_index__ = t.index + t[0].length + n, c0(this, 0)) : null;
|
|
3338
3346
|
};
|
|
3339
3347
|
J.prototype.tlds = function(e, t) {
|
|
3340
3348
|
return e = Array.isArray(e) ? e : [e], t ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, r, o) {
|
|
@@ -3346,11 +3354,11 @@ J.prototype.normalize = function(e) {
|
|
|
3346
3354
|
};
|
|
3347
3355
|
J.prototype.onCompile = function() {
|
|
3348
3356
|
};
|
|
3349
|
-
const
|
|
3357
|
+
const Nu = 2147483647, ou = 36, x0 = 1, ee = 26, Vc = 38, Yc = 700, Wt = 72, Zt = 128, Vt = "-", Xc = /^xn--/, Jc = /[^\0-\x7F]/, Qc = /[\x2E\u3002\uFF0E\uFF61]/g, Kc = {
|
|
3350
3358
|
overflow: "Overflow: input needs wider integers to process",
|
|
3351
3359
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3352
3360
|
"invalid-input": "Invalid input"
|
|
3353
|
-
},
|
|
3361
|
+
}, Ke = ou - x0, cu = Math.floor, u0 = String.fromCharCode;
|
|
3354
3362
|
function pu(u) {
|
|
3355
3363
|
throw new RangeError(Kc[u]);
|
|
3356
3364
|
}
|
|
@@ -3388,9 +3396,9 @@ const ei = (u) => String.fromCodePoint(...u), ti = function(u) {
|
|
|
3388
3396
|
return u + 22 + 75 * (u < 26) - ((e != 0) << 5);
|
|
3389
3397
|
}, Jt = function(u, e, t) {
|
|
3390
3398
|
let n = 0;
|
|
3391
|
-
for (u = t ? cu(u / Yc) : u >> 1, u += cu(u / e); u >
|
|
3392
|
-
u = cu(u /
|
|
3393
|
-
return cu(n + (
|
|
3399
|
+
for (u = t ? cu(u / Yc) : u >> 1, u += cu(u / e); u > Ke * ee >> 1; n += ou)
|
|
3400
|
+
u = cu(u / Ke);
|
|
3401
|
+
return cu(n + (Ke + 1) * u / (u + Vc));
|
|
3394
3402
|
}, Qt = function(u) {
|
|
3395
3403
|
const e = [], t = u.length;
|
|
3396
3404
|
let n = 0, r = Zt, o = Wt, i = u.lastIndexOf(Vt);
|
|
@@ -3401,16 +3409,16 @@ const ei = (u) => String.fromCodePoint(...u), ti = function(u) {
|
|
|
3401
3409
|
const a = n;
|
|
3402
3410
|
for (let f = 1, d = ou; ; d += ou) {
|
|
3403
3411
|
c >= t && pu("invalid-input");
|
|
3404
|
-
const
|
|
3405
|
-
|
|
3406
|
-
const p = d <= o ?
|
|
3407
|
-
if (
|
|
3412
|
+
const m = ti(u.charCodeAt(c++));
|
|
3413
|
+
m >= ou && pu("invalid-input"), m > cu((Nu - n) / f) && pu("overflow"), n += m * f;
|
|
3414
|
+
const p = d <= o ? x0 : d >= o + ee ? ee : d - o;
|
|
3415
|
+
if (m < p)
|
|
3408
3416
|
break;
|
|
3409
3417
|
const h = ou - p;
|
|
3410
|
-
f > cu(
|
|
3418
|
+
f > cu(Nu / h) && pu("overflow"), f *= h;
|
|
3411
3419
|
}
|
|
3412
3420
|
const s = e.length + 1;
|
|
3413
|
-
o = Jt(n - a, s, a == 0), cu(n / s) >
|
|
3421
|
+
o = Jt(n - a, s, a == 0), cu(n / s) > Nu - r && pu("overflow"), r += cu(n / s), n %= s, e.splice(n++, 0, r);
|
|
3414
3422
|
}
|
|
3415
3423
|
return String.fromCodePoint(...e);
|
|
3416
3424
|
}, Kt = function(u) {
|
|
@@ -3419,28 +3427,28 @@ const ei = (u) => String.fromCodePoint(...u), ti = function(u) {
|
|
|
3419
3427
|
const t = u.length;
|
|
3420
3428
|
let n = Zt, r = 0, o = Wt;
|
|
3421
3429
|
for (const a of u)
|
|
3422
|
-
a < 128 && e.push(
|
|
3430
|
+
a < 128 && e.push(u0(a));
|
|
3423
3431
|
const i = e.length;
|
|
3424
3432
|
let c = i;
|
|
3425
3433
|
for (i && e.push(Vt); c < t; ) {
|
|
3426
|
-
let a =
|
|
3434
|
+
let a = Nu;
|
|
3427
3435
|
for (const f of u)
|
|
3428
3436
|
f >= n && f < a && (a = f);
|
|
3429
3437
|
const s = c + 1;
|
|
3430
|
-
a - n > cu((
|
|
3438
|
+
a - n > cu((Nu - r) / s) && pu("overflow"), r += (a - n) * s, n = a;
|
|
3431
3439
|
for (const f of u)
|
|
3432
|
-
if (f < n && ++r >
|
|
3440
|
+
if (f < n && ++r > Nu && pu("overflow"), f === n) {
|
|
3433
3441
|
let d = r;
|
|
3434
|
-
for (let
|
|
3435
|
-
const p =
|
|
3442
|
+
for (let m = ou; ; m += ou) {
|
|
3443
|
+
const p = m <= o ? x0 : m >= o + ee ? ee : m - o;
|
|
3436
3444
|
if (d < p)
|
|
3437
3445
|
break;
|
|
3438
3446
|
const h = d - p, C = ou - p;
|
|
3439
3447
|
e.push(
|
|
3440
|
-
|
|
3448
|
+
u0(Et(p + h % C, 0))
|
|
3441
3449
|
), d = cu(h / C);
|
|
3442
3450
|
}
|
|
3443
|
-
e.push(
|
|
3451
|
+
e.push(u0(Et(d, 0))), o = Jt(r, s, c === i), r = 0, ++c;
|
|
3444
3452
|
}
|
|
3445
3453
|
++r, ++n;
|
|
3446
3454
|
}
|
|
@@ -3651,34 +3659,34 @@ function fi(u) {
|
|
|
3651
3659
|
}
|
|
3652
3660
|
const en = ["http:", "https:", "mailto:"];
|
|
3653
3661
|
function di(u) {
|
|
3654
|
-
const e =
|
|
3662
|
+
const e = d0(u, !0);
|
|
3655
3663
|
if (e.hostname && (!e.protocol || en.indexOf(e.protocol) >= 0))
|
|
3656
3664
|
try {
|
|
3657
3665
|
e.hostname = un.toASCII(e.hostname);
|
|
3658
3666
|
} catch {
|
|
3659
3667
|
}
|
|
3660
|
-
return oe(
|
|
3668
|
+
return oe(f0(e));
|
|
3661
3669
|
}
|
|
3662
3670
|
function hi(u) {
|
|
3663
|
-
const e =
|
|
3671
|
+
const e = d0(u, !0);
|
|
3664
3672
|
if (e.hostname && (!e.protocol || en.indexOf(e.protocol) >= 0))
|
|
3665
3673
|
try {
|
|
3666
3674
|
e.hostname = un.toUnicode(e.hostname);
|
|
3667
3675
|
} catch {
|
|
3668
3676
|
}
|
|
3669
|
-
return
|
|
3677
|
+
return Bu(f0(e), Bu.defaultChars + "%");
|
|
3670
3678
|
}
|
|
3671
3679
|
function K(u, e) {
|
|
3672
3680
|
if (!(this instanceof K))
|
|
3673
3681
|
return new K(u, e);
|
|
3674
|
-
e ||
|
|
3682
|
+
e || p0(u) || (e = u || {}, u = "default"), this.inline = new ie(), this.block = new Se(), this.core = new m0(), this.renderer = new zu(), this.linkify = new J(), this.validateLink = fi, this.normalizeLink = di, this.normalizeLinkText = hi, this.utils = bo, this.helpers = Fe({}, go), this.options = {}, this.configure(u), e && this.set(e);
|
|
3675
3683
|
}
|
|
3676
3684
|
K.prototype.set = function(u) {
|
|
3677
3685
|
return Fe(this.options, u), this;
|
|
3678
3686
|
};
|
|
3679
3687
|
K.prototype.configure = function(u) {
|
|
3680
3688
|
const e = this;
|
|
3681
|
-
if (
|
|
3689
|
+
if (p0(u)) {
|
|
3682
3690
|
const t = u;
|
|
3683
3691
|
if (u = ai[t], !u)
|
|
3684
3692
|
throw new Error('Wrong `markdown-it` preset "' + t + '", check name');
|
|
@@ -3733,14 +3741,14 @@ K.prototype.parseInline = function(u, e) {
|
|
|
3733
3741
|
K.prototype.renderInline = function(u, e) {
|
|
3734
3742
|
return e = e || {}, this.renderer.render(this.parseInline(u, e), this.options, e);
|
|
3735
3743
|
};
|
|
3736
|
-
class Ri extends
|
|
3744
|
+
class Ri extends s0 {
|
|
3737
3745
|
constructor(t = {}) {
|
|
3738
3746
|
super();
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3747
|
+
Lu(this, "mdConfig");
|
|
3748
|
+
Lu(this, "dompurifyConfig");
|
|
3749
|
+
Lu(this, "sanitizeDisabled");
|
|
3750
|
+
Lu(this, "defaultAttrs");
|
|
3751
|
+
Lu(this, "md");
|
|
3744
3752
|
this.mdConfig = t.mdConfig || {}, this.dompurifyConfig = t.dompurifyConfig || {}, this.sanitizeDisabled = t.sanitizeDisabled ?? !1, this.defaultAttrs = t.defaultAttrs || {}, this.md = K(this.mdConfig);
|
|
3745
3753
|
}
|
|
3746
3754
|
render(t) {
|
|
@@ -3752,27 +3760,27 @@ class Ri extends a0 {
|
|
|
3752
3760
|
console.error("Error rendering markdown:", c), o = n ?? "";
|
|
3753
3761
|
}
|
|
3754
3762
|
if (this.sanitizeDisabled)
|
|
3755
|
-
return console.warn("HTML sanitization is disabled, potential XSS risk"),
|
|
3763
|
+
return console.warn("HTML sanitization is disabled, potential XSS risk"), G0("div", { ...this.defaultAttrs, ...r, innerHTML: o });
|
|
3756
3764
|
const i = Tr.sanitize(o, this.dompurifyConfig);
|
|
3757
|
-
return
|
|
3765
|
+
return G0("div", { ...this.defaultAttrs, ...r, innerHTML: i });
|
|
3758
3766
|
}
|
|
3759
3767
|
}
|
|
3760
3768
|
const pi = {
|
|
3761
3769
|
key: 0,
|
|
3762
|
-
class: /* @__PURE__ */
|
|
3770
|
+
class: /* @__PURE__ */ Au(["tr-bubble__avatar"])
|
|
3763
3771
|
}, bi = {
|
|
3764
3772
|
key: 0,
|
|
3765
3773
|
class: "tr-bubble__content-items"
|
|
3766
|
-
},
|
|
3774
|
+
}, mi = {
|
|
3767
3775
|
key: 1,
|
|
3768
3776
|
class: "tr-bubble__body-text"
|
|
3769
|
-
},
|
|
3777
|
+
}, _i = {
|
|
3770
3778
|
key: 2,
|
|
3771
3779
|
class: "tr-bubble__aborted"
|
|
3772
3780
|
}, xi = {
|
|
3773
3781
|
key: 3,
|
|
3774
3782
|
class: "tr-bubble__footer"
|
|
3775
|
-
}, gi = /* @__PURE__ */
|
|
3783
|
+
}, gi = /* @__PURE__ */ yu({
|
|
3776
3784
|
__name: "Bubble",
|
|
3777
3785
|
props: {
|
|
3778
3786
|
content: { default: "" },
|
|
@@ -3791,7 +3799,7 @@ const pi = {
|
|
|
3791
3799
|
setup(u) {
|
|
3792
3800
|
const e = u, t = gn(), n = X(() => {
|
|
3793
3801
|
const d = e.contentRenderer;
|
|
3794
|
-
return d ? typeof d == "function" ? { isComponent: !1, vNodeOrComponent: d(e) } : d instanceof
|
|
3802
|
+
return d ? typeof d == "function" ? { isComponent: !1, vNodeOrComponent: d(e) } : d instanceof s0 ? { isComponent: !1, vNodeOrComponent: d.render(e) } : { isComponent: !0, vNodeOrComponent: d } : null;
|
|
3795
3803
|
}), r = kn(), o = X(() => {
|
|
3796
3804
|
if (!e.customContentField)
|
|
3797
3805
|
return null;
|
|
@@ -3800,8 +3808,8 @@ const pi = {
|
|
|
3800
3808
|
}), i = X(() => o.value || e.content), c = X(() => Array.isArray(i.value) ? "" : i.value), a = X(() => Array.isArray(i.value) ? i.value : []), s = X(() => e.placement === "start"), f = X(() => e.maxWidth ? {
|
|
3801
3809
|
"--max-width": Fn(e.maxWidth)
|
|
3802
3810
|
} : {});
|
|
3803
|
-
return (d,
|
|
3804
|
-
class:
|
|
3811
|
+
return (d, m) => (S(), $("div", {
|
|
3812
|
+
class: Au([
|
|
3805
3813
|
"tr-bubble",
|
|
3806
3814
|
{
|
|
3807
3815
|
"placement-start": s.value,
|
|
@@ -3811,15 +3819,15 @@ const pi = {
|
|
|
3811
3819
|
style: En(f.value)
|
|
3812
3820
|
}, [
|
|
3813
3821
|
e.avatar ? (S(), $("div", pi, [
|
|
3814
|
-
(S(), eu(
|
|
3822
|
+
(S(), eu(_u(e.avatar)))
|
|
3815
3823
|
])) : Xu("", !0),
|
|
3816
3824
|
e.loading ? ge(d.$slots, "loading", {
|
|
3817
3825
|
key: 1,
|
|
3818
3826
|
bubbleProps: e
|
|
3819
3827
|
}, () => [
|
|
3820
3828
|
Y("div", {
|
|
3821
|
-
class:
|
|
3822
|
-
}, [...
|
|
3829
|
+
class: Au(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
|
3830
|
+
}, [...m[0] || (m[0] = [
|
|
3823
3831
|
Y("img", {
|
|
3824
3832
|
src: yn,
|
|
3825
3833
|
alt: "loading",
|
|
@@ -3828,10 +3836,10 @@ const pi = {
|
|
|
3828
3836
|
])], 2)
|
|
3829
3837
|
], !0) : (S(), $("div", {
|
|
3830
3838
|
key: 2,
|
|
3831
|
-
class:
|
|
3839
|
+
class: Au(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
|
3832
3840
|
}, [
|
|
3833
3841
|
a.value.length ? (S(), $("div", bi, [
|
|
3834
|
-
(S(!0), $(
|
|
3842
|
+
(S(!0), $(e0, null, ke(a.value, (p, h) => (S(), eu(a0(or), {
|
|
3835
3843
|
key: h,
|
|
3836
3844
|
item: p
|
|
3837
3845
|
}, null, 8, ["item"]))), 128))
|
|
@@ -3839,18 +3847,18 @@ const pi = {
|
|
|
3839
3847
|
key: 1,
|
|
3840
3848
|
bubbleProps: e
|
|
3841
3849
|
}, () => [
|
|
3842
|
-
n.value ? (S(), $(
|
|
3843
|
-
n.value.isComponent ? (S(), eu(
|
|
3844
|
-
], 64)) : (S(), $("span",
|
|
3850
|
+
n.value ? (S(), $(e0, { key: 0 }, [
|
|
3851
|
+
n.value.isComponent ? (S(), eu(_u(n.value.vNodeOrComponent), Ae(Ju({ key: 0 }, e)), null, 16)) : (S(), eu(_u(n.value.vNodeOrComponent), { key: 1 }))
|
|
3852
|
+
], 64)) : (S(), $("span", mi, Cu(c.value), 1))
|
|
3845
3853
|
], !0),
|
|
3846
|
-
e.aborted ? (S(), $("span",
|
|
3854
|
+
e.aborted ? (S(), $("span", _i, Cu(e.abortedText), 1)) : Xu("", !0),
|
|
3847
3855
|
t.footer ? (S(), $("div", xi, [
|
|
3848
3856
|
ge(d.$slots, "footer", { bubbleProps: e }, void 0, !0)
|
|
3849
3857
|
])) : Xu("", !0)
|
|
3850
3858
|
], 2))
|
|
3851
3859
|
], 6));
|
|
3852
3860
|
}
|
|
3853
|
-
}),
|
|
3861
|
+
}), Du = /* @__PURE__ */ re(gi, [["__scopeId", "data-v-1d4a4139"]]), ki = /* @__PURE__ */ yu({
|
|
3854
3862
|
__name: "BubbleList",
|
|
3855
3863
|
props: {
|
|
3856
3864
|
items: {},
|
|
@@ -3860,7 +3868,7 @@ const pi = {
|
|
|
3860
3868
|
autoScroll: { type: Boolean }
|
|
3861
3869
|
},
|
|
3862
3870
|
setup(u) {
|
|
3863
|
-
const e = u, t =
|
|
3871
|
+
const e = u, t = i0(null), { y: n } = In(t, {
|
|
3864
3872
|
behavior: "smooth",
|
|
3865
3873
|
throttle: 100
|
|
3866
3874
|
}), r = X(() => e.items.at(-1)), o = X(() => {
|
|
@@ -3872,10 +3880,10 @@ const pi = {
|
|
|
3872
3880
|
return 0;
|
|
3873
3881
|
const s = r.value;
|
|
3874
3882
|
if (Array.isArray(s[a])) {
|
|
3875
|
-
const
|
|
3876
|
-
if (
|
|
3883
|
+
const m = s[a].at(-1);
|
|
3884
|
+
if (m && typeof m == "object" && "content" in m)
|
|
3877
3885
|
try {
|
|
3878
|
-
return JSON.stringify(
|
|
3886
|
+
return JSON.stringify(m.content).length;
|
|
3879
3887
|
} catch {
|
|
3880
3888
|
}
|
|
3881
3889
|
return s[a].length;
|
|
@@ -3899,10 +3907,10 @@ const pi = {
|
|
|
3899
3907
|
const s = a.role ? ((C = e.roles) == null ? void 0 : C[a.role]) || {} : {};
|
|
3900
3908
|
if (s.hidden)
|
|
3901
3909
|
return null;
|
|
3902
|
-
const { slots: f, hidden: d, ...
|
|
3910
|
+
const { slots: f, hidden: d, ...m } = s, { slots: p, ...h } = a;
|
|
3903
3911
|
return {
|
|
3904
3912
|
id: a.id,
|
|
3905
|
-
props: { ...
|
|
3913
|
+
props: { ...m, ...h, "data-role": a.role },
|
|
3906
3914
|
slots: { ...f, ...p }
|
|
3907
3915
|
};
|
|
3908
3916
|
}).filter((a) => !!a)), c = X(() => {
|
|
@@ -3917,27 +3925,27 @@ const pi = {
|
|
|
3917
3925
|
ref_key: "scrollContainerRef",
|
|
3918
3926
|
ref: t
|
|
3919
3927
|
}, [
|
|
3920
|
-
(S(!0), $(
|
|
3928
|
+
(S(!0), $(e0, null, ke(i.value, (f, d) => (S(), eu(Du, Ju({
|
|
3921
3929
|
key: f.id || d
|
|
3922
|
-
}, { ref_for: !0 }, f.props),
|
|
3923
|
-
ke(f.slots, (
|
|
3930
|
+
}, { ref_for: !0 }, f.props), W0({ _: 2 }, [
|
|
3931
|
+
ke(f.slots, (m, p) => ({
|
|
3924
3932
|
name: p,
|
|
3925
|
-
fn:
|
|
3926
|
-
(S(), eu(
|
|
3933
|
+
fn: Z0((h) => [
|
|
3934
|
+
(S(), eu(_u(m), Ju({ ref_for: !0 }, h), null, 16))
|
|
3927
3935
|
])
|
|
3928
3936
|
}))
|
|
3929
3937
|
]), 1040))), 128)),
|
|
3930
|
-
c.value ? (S(), eu(
|
|
3938
|
+
c.value ? (S(), eu(Du, Ae(Ju({ key: 0 }, c.value.props)), W0({ _: 2 }, [
|
|
3931
3939
|
ke(c.value.slots, (f, d) => ({
|
|
3932
3940
|
name: d,
|
|
3933
|
-
fn:
|
|
3934
|
-
(S(), eu(
|
|
3941
|
+
fn: Z0((m) => [
|
|
3942
|
+
(S(), eu(_u(f), Ae(Dn(m)), null, 16))
|
|
3935
3943
|
])
|
|
3936
3944
|
}))
|
|
3937
3945
|
]), 1040)) : Xu("", !0)
|
|
3938
3946
|
], 512));
|
|
3939
3947
|
}
|
|
3940
|
-
}), te = /* @__PURE__ */ re(ki, [["__scopeId", "data-v-a5afaa8b"]]), ne = /* @__PURE__ */
|
|
3948
|
+
}), te = /* @__PURE__ */ re(ki, [["__scopeId", "data-v-a5afaa8b"]]), ne = /* @__PURE__ */ yu({
|
|
3941
3949
|
__name: "BubbleProvider",
|
|
3942
3950
|
props: {
|
|
3943
3951
|
contentRenderers: { default: () => ({}) }
|
|
@@ -3948,15 +3956,15 @@ const pi = {
|
|
|
3948
3956
|
t.set(n, r);
|
|
3949
3957
|
for (const [n, r] of Object.entries(e.contentRenderers))
|
|
3950
3958
|
t.set(n, r);
|
|
3951
|
-
return
|
|
3959
|
+
return V0(Dt, t), V0(yt, l0), (n, r) => ge(n.$slots, "default");
|
|
3952
3960
|
}
|
|
3953
3961
|
});
|
|
3954
|
-
|
|
3962
|
+
Du.name = "TrBubble";
|
|
3955
3963
|
const Ei = function(u) {
|
|
3956
|
-
u.component(
|
|
3964
|
+
u.component(Du.name, Du);
|
|
3957
3965
|
};
|
|
3958
|
-
|
|
3959
|
-
const Ii =
|
|
3966
|
+
Du.install = Ei;
|
|
3967
|
+
const Ii = Du;
|
|
3960
3968
|
te.name = "TrBubbleList";
|
|
3961
3969
|
const Ai = function(u) {
|
|
3962
3970
|
u.component(te.name, te);
|
|
@@ -3971,7 +3979,7 @@ ne.install = Ci;
|
|
|
3971
3979
|
const Li = ne;
|
|
3972
3980
|
export {
|
|
3973
3981
|
Ii as Bubble,
|
|
3974
|
-
|
|
3982
|
+
s0 as BubbleContentClassRenderer,
|
|
3975
3983
|
Mi as BubbleList,
|
|
3976
3984
|
Ri as BubbleMarkdownContentRenderer,
|
|
3977
3985
|
Li as BubbleProvider
|