@opentiny/tiny-robot 0.3.0-alpha.30 → 0.3.0-alpha.32
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/attachments/index.js +216 -216
- package/dist/bubble/index.js +327 -318
- package/dist/drag-overlay/index.js +15 -15
- package/dist/index.d.ts +8 -0
- package/dist/index4.js +16 -16
- package/dist/mcp-server-picker/index.js +149 -149
- package/dist/sender/index.js +711 -708
- package/dist/style.css +1 -1
- package/dist/suggestion-pills/index.js +38 -38
- package/dist/suggestion-popover/index.js +13 -13
- package/package.json +3 -3
package/dist/bubble/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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
3
|
var Lu = (u, e, t) => pn(u, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { defineComponent as yu, ref as i0, createElementBlock as
|
|
4
|
+
import { defineComponent as yu, ref as i0, createElementBlock as H, openBlock as S, createElementVNode as Z, 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 Nu, createBlock as eu, resolveDynamicComponent as _u, createTextVNode as xn, inject as j0, normalizeProps as Ae, mergeProps as Qu, h as G0, useSlots as gn, useAttrs as kn, normalizeStyle as En, renderSlot as Ju, Fragment as Ce, 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
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
|
-
import { _ as
|
|
8
|
+
import { _ as oe } from "../_plugin-vue_export-helper.js";
|
|
9
9
|
import { u as In } from "../index3.js";
|
|
10
10
|
class s0 {
|
|
11
11
|
}
|
|
@@ -18,31 +18,31 @@ const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-tex
|
|
|
18
18
|
},
|
|
19
19
|
setup(u) {
|
|
20
20
|
const e = u, t = i0(e.defaultOpen ?? !1);
|
|
21
|
-
return (n, r) => (S(),
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
return (n, r) => (S(), H("div", Mn, [
|
|
22
|
+
Z("div", Ln, [
|
|
23
|
+
Z("span", null, Cu(e.title), 1),
|
|
24
24
|
At(a0(Tn), {
|
|
25
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
|
-
|
|
30
|
-
bn(
|
|
29
|
+
Z("div", On, [
|
|
30
|
+
bn(Z("div", { class: "tr-bubble__step-text-content" }, Cu(e.content), 513), [
|
|
31
31
|
[mn, t.value]
|
|
32
32
|
])
|
|
33
33
|
])
|
|
34
34
|
]));
|
|
35
35
|
}
|
|
36
|
-
}), Bn = /* @__PURE__ */
|
|
36
|
+
}), Bn = /* @__PURE__ */ oe(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(),
|
|
43
|
+
return (t, n) => (S(), H("span", zn, Cu(e.content), 1));
|
|
44
44
|
}
|
|
45
|
-
}), Un = /* @__PURE__ */
|
|
45
|
+
}), Un = /* @__PURE__ */ oe(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
48
|
}, Yn = ["innerHTML"], Xn = /* @__PURE__ */ yu({
|
|
@@ -78,31 +78,31 @@ const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-tex
|
|
|
78
78
|
}
|
|
79
79
|
), a;
|
|
80
80
|
};
|
|
81
|
-
return (c, a) => (S(),
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
return (c, a) => (S(), H("div", Hn, [
|
|
82
|
+
Z("div", $n, [
|
|
83
|
+
Z("div", jn, [
|
|
84
84
|
(S(), eu(_u(r.value.icon), {
|
|
85
85
|
class: Au(["tr-bubble__step-tool-icon", `icon-${e.status}`])
|
|
86
86
|
}, null, 8, ["class"])),
|
|
87
|
-
|
|
87
|
+
Z("span", Gn, [
|
|
88
88
|
xn(Cu(r.value.text) + " ", 1),
|
|
89
|
-
|
|
89
|
+
Z("span", Wn, Cu(e.name), 1)
|
|
90
90
|
])
|
|
91
91
|
]),
|
|
92
|
-
|
|
92
|
+
Z("div", Zn, [
|
|
93
93
|
At(a0(Sn), {
|
|
94
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
|
])
|
|
98
98
|
]),
|
|
99
|
-
t.value ? (S(),
|
|
100
|
-
a[1] || (a[1] =
|
|
101
|
-
|
|
99
|
+
t.value ? (S(), H("div", Vn, [
|
|
100
|
+
a[1] || (a[1] = Z("hr", { class: "tr-bubble__step-tool-hr" }, null, -1)),
|
|
101
|
+
Z("div", {
|
|
102
102
|
class: "tr-bubble__step-tool-params-content",
|
|
103
103
|
innerHTML: i(e.content)
|
|
104
104
|
}, null, 8, Yn)
|
|
105
|
-
])) :
|
|
105
|
+
])) : Nu("", !0)
|
|
106
106
|
]));
|
|
107
107
|
}
|
|
108
108
|
}), Jn = "_key_1b448_2", Qn = "_number_1b448_6", Kn = "_string_1b448_10", ur = "_boolean_1b448_14", er = {
|
|
@@ -113,7 +113,7 @@ const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-tex
|
|
|
113
113
|
null: "_null_1b448_18"
|
|
114
114
|
}, tr = {
|
|
115
115
|
$style: er
|
|
116
|
-
}, nr = /* @__PURE__ */
|
|
116
|
+
}, nr = /* @__PURE__ */ oe(Xn, [["__cssModules", tr], ["__scopeId", "data-v-1c37a4c4"]]), rr = nr, Ct = /* @__PURE__ */ new Map([
|
|
117
117
|
["text", l0],
|
|
118
118
|
["tool", rr],
|
|
119
119
|
["collapsible-text", Pn]
|
|
@@ -127,7 +127,7 @@ const Mn = { class: "tr-bubble__step-text" }, Ln = { class: "tr-bubble__step-tex
|
|
|
127
127
|
const c = e.get(i) || t;
|
|
128
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(_u(o.value.vNodeOrComponent), Ae(
|
|
130
|
+
return (i, c) => o.value.isComponent ? (S(), eu(_u(o.value.vNodeOrComponent), Ae(Qu({ key: 0 }, n.item)), null, 16)) : (S(), eu(_u(o.value.vNodeOrComponent), { key: 1 }));
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
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 */
|
|
@@ -162,7 +162,7 @@ n0 || (n0 = function(e) {
|
|
|
162
162
|
n[r - 1] = arguments[r];
|
|
163
163
|
return new e(...n);
|
|
164
164
|
});
|
|
165
|
-
const
|
|
165
|
+
const me = G(Array.prototype.forEach), sr = G(Array.prototype.lastIndexOf), J0 = G(Array.prototype.pop), Wu = G(Array.prototype.push), lr = G(Array.prototype.splice), Ee = G(String.prototype.toLowerCase), $e = G(String.prototype.toString), je = G(String.prototype.match), Zu = G(String.prototype.replace), fr = G(String.prototype.indexOf), dr = G(String.prototype.trim), uu = G(Object.prototype.hasOwnProperty), $ = G(RegExp.prototype.test), Vu = hr(TypeError);
|
|
166
166
|
function G(u) {
|
|
167
167
|
return function(e) {
|
|
168
168
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -203,7 +203,7 @@ function du(u) {
|
|
|
203
203
|
uu(u, t) && (Array.isArray(n) ? e[t] = pr(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = du(n) : e[t] = n);
|
|
204
204
|
return e;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Yu(u, e) {
|
|
207
207
|
for (; u !== null; ) {
|
|
208
208
|
const n = ar(u, e);
|
|
209
209
|
if (n) {
|
|
@@ -219,7 +219,7 @@ function Vu(u, e) {
|
|
|
219
219
|
}
|
|
220
220
|
return t;
|
|
221
221
|
}
|
|
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"]),
|
|
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"]), Ge = 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"]), We = 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"]), Ze = 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"]), Ve = 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"]), _e = 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(
|
|
223
223
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
224
224
|
// eslint-disable-line no-useless-escape
|
|
225
225
|
), Ar = Q(/^(?:\w+script|data):/i), Cr = Q(
|
|
@@ -239,7 +239,7 @@ var tt = /* @__PURE__ */ Object.freeze({
|
|
|
239
239
|
MUSTACHE_EXPR: _r,
|
|
240
240
|
TMPLIT_EXPR: gr
|
|
241
241
|
});
|
|
242
|
-
const
|
|
242
|
+
const Xu = {
|
|
243
243
|
element: 1,
|
|
244
244
|
text: 3,
|
|
245
245
|
// Deprecated
|
|
@@ -283,7 +283,7 @@ const Yu = {
|
|
|
283
283
|
function vt() {
|
|
284
284
|
let u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : yr();
|
|
285
285
|
const e = (g) => vt(g);
|
|
286
|
-
if (e.version = "3.2.7", e.removed = [], !u || !u.document || u.document.nodeType !==
|
|
286
|
+
if (e.version = "3.2.7", e.removed = [], !u || !u.document || u.document.nodeType !== Xu.document || !u.Element)
|
|
287
287
|
return e.isSupported = !1, e;
|
|
288
288
|
let {
|
|
289
289
|
document: t
|
|
@@ -298,7 +298,7 @@ function vt() {
|
|
|
298
298
|
HTMLFormElement: d,
|
|
299
299
|
DOMParser: m,
|
|
300
300
|
trustedTypes: p
|
|
301
|
-
} = u, h = a.prototype, C =
|
|
301
|
+
} = u, h = a.prototype, C = Yu(h, "cloneNode"), D = Yu(h, "remove"), T = Yu(h, "nextSibling"), E = Yu(h, "childNodes"), k = Yu(h, "parentNode");
|
|
302
302
|
if (typeof i == "function") {
|
|
303
303
|
const g = t.createElement("template");
|
|
304
304
|
g.content && g.content.ownerDocument && (t = g.content.ownerDocument);
|
|
@@ -307,7 +307,7 @@ function vt() {
|
|
|
307
307
|
const {
|
|
308
308
|
implementation: y,
|
|
309
309
|
createNodeIterator: M,
|
|
310
|
-
createDocumentFragment:
|
|
310
|
+
createDocumentFragment: Y,
|
|
311
311
|
getElementsByTagName: nu
|
|
312
312
|
} = t, {
|
|
313
313
|
importNode: gu
|
|
@@ -315,11 +315,11 @@ function vt() {
|
|
|
315
315
|
let L = nt();
|
|
316
316
|
e.isSupported = typeof Ft == "function" && typeof k == "function" && y && y.createHTMLDocument !== void 0;
|
|
317
317
|
const {
|
|
318
|
-
MUSTACHE_EXPR:
|
|
319
|
-
ERB_EXPR:
|
|
318
|
+
MUSTACHE_EXPR: Uu,
|
|
319
|
+
ERB_EXPR: Hu,
|
|
320
320
|
TMPLIT_EXPR: Fu,
|
|
321
321
|
DATA_ATTR: hu,
|
|
322
|
-
ARIA_ATTR:
|
|
322
|
+
ARIA_ATTR: Re,
|
|
323
323
|
IS_SCRIPT_OR_DATA: tn,
|
|
324
324
|
ATTR_WHITESPACE: g0,
|
|
325
325
|
CUSTOM_ELEMENT: nn
|
|
@@ -327,9 +327,9 @@ function vt() {
|
|
|
327
327
|
let {
|
|
328
328
|
IS_ALLOWED_URI: k0
|
|
329
329
|
} = tt, O = null;
|
|
330
|
-
const E0 = F({}, [...Q0, ...
|
|
330
|
+
const E0 = F({}, [...Q0, ...Ge, ...We, ...Ze, ...K0]);
|
|
331
331
|
let z = null;
|
|
332
|
-
const A0 = F({}, [...ut, ...
|
|
332
|
+
const A0 = F({}, [...ut, ...Ve, ...et, ..._e]);
|
|
333
333
|
let R = Object.seal(Tt(null, {
|
|
334
334
|
tagNameCheck: {
|
|
335
335
|
writable: !0,
|
|
@@ -349,47 +349,47 @@ function vt() {
|
|
|
349
349
|
enumerable: !0,
|
|
350
350
|
value: !1
|
|
351
351
|
}
|
|
352
|
-
})),
|
|
352
|
+
})), $u = null, Ie = null, C0 = !0, Me = !0, D0 = !1, y0 = !0, Tu = !1, se = !0, ku = !1, Le = !1, Oe = !1, Su = !1, le = !1, fe = !1, F0 = !0, T0 = !1;
|
|
353
353
|
const rn = "user-content-";
|
|
354
|
-
let
|
|
354
|
+
let Ne = !0, ju = !1, wu = {}, vu = null;
|
|
355
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
356
|
let w0 = null;
|
|
357
357
|
const v0 = F({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
358
|
-
let
|
|
359
|
-
const R0 = F({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]),
|
|
360
|
-
let Ru = su,
|
|
361
|
-
const on = F({}, [
|
|
362
|
-
let
|
|
358
|
+
let Be = null;
|
|
359
|
+
const R0 = F({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), de = "http://www.w3.org/1998/Math/MathML", he = "http://www.w3.org/2000/svg", su = "http://www.w3.org/1999/xhtml";
|
|
360
|
+
let Ru = su, Pe = !1, ze = null;
|
|
361
|
+
const on = F({}, [de, he, su], $e);
|
|
362
|
+
let pe = F({}, ["mi", "mo", "mn", "ms", "mtext"]), be = F({}, ["annotation-xml"]);
|
|
363
363
|
const cn = F({}, ["title", "style", "font", "a", "script"]);
|
|
364
|
-
let
|
|
364
|
+
let Gu = null;
|
|
365
365
|
const an = ["application/xhtml+xml", "text/html"], sn = "text/html";
|
|
366
366
|
let N = null, Iu = null;
|
|
367
367
|
const ln = t.createElement("form"), I0 = function(l) {
|
|
368
368
|
return l instanceof RegExp || l instanceof Function;
|
|
369
|
-
},
|
|
369
|
+
}, qe = function() {
|
|
370
370
|
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
371
371
|
if (!(Iu && Iu === l)) {
|
|
372
|
-
if ((!l || typeof l != "object") && (l = {}), l = du(l),
|
|
373
|
-
an.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? sn : l.PARSER_MEDIA_TYPE, N =
|
|
372
|
+
if ((!l || typeof l != "object") && (l = {}), l = du(l), Gu = // eslint-disable-next-line unicorn/prefer-includes
|
|
373
|
+
an.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? sn : l.PARSER_MEDIA_TYPE, N = Gu === "application/xhtml+xml" ? $e : Ee, O = uu(l, "ALLOWED_TAGS") ? F({}, l.ALLOWED_TAGS, N) : E0, z = uu(l, "ALLOWED_ATTR") ? F({}, l.ALLOWED_ATTR, N) : A0, ze = uu(l, "ALLOWED_NAMESPACES") ? F({}, l.ALLOWED_NAMESPACES, $e) : on, Be = 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, $u = uu(l, "FORBID_TAGS") ? F({}, l.FORBID_TAGS, N) : du({}), Ie = 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, Me = 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, se = l.SAFE_FOR_XML !== !1, ku = l.WHOLE_DOCUMENT || !1, Su = l.RETURN_DOM || !1, le = l.RETURN_DOM_FRAGMENT || !1, fe = l.RETURN_TRUSTED_TYPE || !1, Oe = l.FORCE_BODY || !1, F0 = l.SANITIZE_DOM !== !1, T0 = l.SANITIZE_NAMED_PROPS || !1, Ne = l.KEEP_CONTENT !== !1, ju = l.IN_PLACE || !1, k0 = l.ALLOWED_URI_REGEXP || St, Ru = l.NAMESPACE || su, pe = l.MATHML_TEXT_INTEGRATION_POINTS || pe, be = l.HTML_INTEGRATION_POINTS || be, 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 && (Me = !1), le && (Su = !0), wu && (O = F({}, K0), z = [], wu.html === !0 && (F(O, Q0), F(z, ut)), wu.svg === !0 && (F(O, Ge), F(z, Ve), F(z, _e)), wu.svgFilters === !0 && (F(O, We), F(z, Ve), F(z, _e)), wu.mathMl === !0 && (F(O, Ze), F(z, et), F(z, _e))), 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(Be, l.ADD_URI_SAFE_ATTR, N), l.FORBID_CONTENTS && (vu === S0 && (vu = du(vu)), F(vu, l.FORBID_CONTENTS, N)), Ne && (O["#text"] = !0), ku && F(O, ["html", "head", "body"]), O.table && (F(O, ["tbody"]), delete $u.tbody), l.TRUSTED_TYPES_POLICY) {
|
|
374
374
|
if (typeof l.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
375
|
-
throw
|
|
375
|
+
throw Vu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
376
376
|
if (typeof l.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
377
|
-
throw
|
|
377
|
+
throw Vu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
378
378
|
_ = l.TRUSTED_TYPES_POLICY, A = _.createHTML("");
|
|
379
379
|
} else
|
|
380
380
|
_ === void 0 && (_ = Fr(p, r)), _ !== null && typeof A == "string" && (A = _.createHTML(""));
|
|
381
381
|
j && j(l), Iu = l;
|
|
382
382
|
}
|
|
383
|
-
}, M0 = F({}, [...
|
|
383
|
+
}, M0 = F({}, [...Ge, ...We, ...br]), L0 = F({}, [...Ze, ...mr]), fn = function(l) {
|
|
384
384
|
let b = k(l);
|
|
385
385
|
(!b || !b.tagName) && (b = {
|
|
386
386
|
namespaceURI: Ru,
|
|
387
387
|
tagName: "template"
|
|
388
388
|
});
|
|
389
389
|
const x = Ee(l.tagName), v = Ee(b.tagName);
|
|
390
|
-
return
|
|
390
|
+
return ze[l.namespaceURI] ? l.namespaceURI === he ? b.namespaceURI === su ? x === "svg" : b.namespaceURI === de ? x === "svg" && (v === "annotation-xml" || pe[v]) : !!M0[x] : l.namespaceURI === de ? b.namespaceURI === su ? x === "math" : b.namespaceURI === he ? x === "math" && be[v] : !!L0[x] : l.namespaceURI === su ? b.namespaceURI === he && !be[v] || b.namespaceURI === de && !pe[v] ? !1 : !L0[x] && (cn[x] || !M0[x]) : !!(Gu === "application/xhtml+xml" && ze[l.namespaceURI]) : !1;
|
|
391
391
|
}, ru = function(l) {
|
|
392
|
-
|
|
392
|
+
Wu(e.removed, {
|
|
393
393
|
element: l
|
|
394
394
|
});
|
|
395
395
|
try {
|
|
@@ -399,18 +399,18 @@ function vt() {
|
|
|
399
399
|
}
|
|
400
400
|
}, Eu = function(l, b) {
|
|
401
401
|
try {
|
|
402
|
-
|
|
402
|
+
Wu(e.removed, {
|
|
403
403
|
attribute: b.getAttributeNode(l),
|
|
404
404
|
from: b
|
|
405
405
|
});
|
|
406
406
|
} catch {
|
|
407
|
-
|
|
407
|
+
Wu(e.removed, {
|
|
408
408
|
attribute: null,
|
|
409
409
|
from: b
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
if (b.removeAttribute(l), l === "is")
|
|
413
|
-
if (Su ||
|
|
413
|
+
if (Su || le)
|
|
414
414
|
try {
|
|
415
415
|
ru(b);
|
|
416
416
|
} catch {
|
|
@@ -422,23 +422,23 @@ function vt() {
|
|
|
422
422
|
}
|
|
423
423
|
}, O0 = function(l) {
|
|
424
424
|
let b = null, x = null;
|
|
425
|
-
if (
|
|
425
|
+
if (Oe)
|
|
426
426
|
l = "<remove></remove>" + l;
|
|
427
427
|
else {
|
|
428
|
-
const I =
|
|
428
|
+
const I = je(l, /^[\r\n\t ]+/);
|
|
429
429
|
x = I && I[0];
|
|
430
430
|
}
|
|
431
|
-
|
|
431
|
+
Gu === "application/xhtml+xml" && Ru === su && (l = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + l + "</body></html>");
|
|
432
432
|
const v = _ ? _.createHTML(l) : l;
|
|
433
433
|
if (Ru === su)
|
|
434
434
|
try {
|
|
435
|
-
b = new m().parseFromString(v,
|
|
435
|
+
b = new m().parseFromString(v, Gu);
|
|
436
436
|
} catch {
|
|
437
437
|
}
|
|
438
438
|
if (!b || !b.documentElement) {
|
|
439
439
|
b = y.createDocument(Ru, "template", null);
|
|
440
440
|
try {
|
|
441
|
-
b.documentElement.innerHTML =
|
|
441
|
+
b.documentElement.innerHTML = Pe ? A : v;
|
|
442
442
|
} catch {
|
|
443
443
|
}
|
|
444
444
|
}
|
|
@@ -452,30 +452,30 @@ function vt() {
|
|
|
452
452
|
s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION,
|
|
453
453
|
null
|
|
454
454
|
);
|
|
455
|
-
},
|
|
455
|
+
}, Ue = function(l) {
|
|
456
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");
|
|
457
457
|
}, B0 = function(l) {
|
|
458
458
|
return typeof c == "function" && l instanceof c;
|
|
459
459
|
};
|
|
460
460
|
function lu(g, l, b) {
|
|
461
|
-
|
|
461
|
+
me(g, (x) => {
|
|
462
462
|
x.call(e, l, b, Iu);
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
const P0 = function(l) {
|
|
466
466
|
let b = null;
|
|
467
|
-
if (lu(L.beforeSanitizeElements, l, null),
|
|
467
|
+
if (lu(L.beforeSanitizeElements, l, null), Ue(l))
|
|
468
468
|
return ru(l), !0;
|
|
469
469
|
const x = N(l.nodeName);
|
|
470
470
|
if (lu(L.uponSanitizeElement, l, {
|
|
471
471
|
tagName: x,
|
|
472
472
|
allowedTags: O
|
|
473
|
-
}),
|
|
473
|
+
}), se && l.hasChildNodes() && !B0(l.firstElementChild) && $(/<[/\w!]/g, l.innerHTML) && $(/<[/\w!]/g, l.textContent) || l.nodeType === Xu.progressingInstruction || se && l.nodeType === Xu.comment && $(/<[/\w]/g, l.data))
|
|
474
474
|
return ru(l), !0;
|
|
475
|
-
if (!O[x] ||
|
|
476
|
-
if (
|
|
475
|
+
if (!O[x] || $u[x]) {
|
|
476
|
+
if (!$u[x] && q0(x) && (R.tagNameCheck instanceof RegExp && $(R.tagNameCheck, x) || R.tagNameCheck instanceof Function && R.tagNameCheck(x)))
|
|
477
477
|
return !1;
|
|
478
|
-
if (
|
|
478
|
+
if (Ne && !vu[x]) {
|
|
479
479
|
const v = k(l) || l.parentNode, U = E(l) || l.childNodes;
|
|
480
480
|
if (U && v) {
|
|
481
481
|
const I = U.length;
|
|
@@ -487,29 +487,29 @@ function vt() {
|
|
|
487
487
|
}
|
|
488
488
|
return ru(l), !0;
|
|
489
489
|
}
|
|
490
|
-
return l instanceof a && !fn(l) || (x === "noscript" || x === "noembed" || x === "noframes") &&
|
|
491
|
-
b =
|
|
492
|
-
}), l.textContent !== b && (
|
|
490
|
+
return l instanceof a && !fn(l) || (x === "noscript" || x === "noembed" || x === "noframes") && $(/<\/no(script|embed|frames)/i, l.innerHTML) ? (ru(l), !0) : (Tu && l.nodeType === Xu.text && (b = l.textContent, me([Uu, Hu, Fu], (v) => {
|
|
491
|
+
b = Zu(b, v, " ");
|
|
492
|
+
}), l.textContent !== b && (Wu(e.removed, {
|
|
493
493
|
element: l.cloneNode()
|
|
494
494
|
}), l.textContent = b)), lu(L.afterSanitizeElements, l, null), !1);
|
|
495
495
|
}, z0 = function(l, b, x) {
|
|
496
496
|
if (F0 && (b === "id" || b === "name") && (x in t || x in ln))
|
|
497
497
|
return !1;
|
|
498
|
-
if (!(
|
|
499
|
-
if (!(C0 &&
|
|
500
|
-
if (!z[b] ||
|
|
498
|
+
if (!(Me && !Ie[b] && $(hu, b))) {
|
|
499
|
+
if (!(C0 && $(Re, b))) {
|
|
500
|
+
if (!z[b] || Ie[b]) {
|
|
501
501
|
if (
|
|
502
502
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
503
503
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
504
504
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
505
|
-
!(q0(l) && (R.tagNameCheck instanceof RegExp &&
|
|
505
|
+
!(q0(l) && (R.tagNameCheck instanceof RegExp && $(R.tagNameCheck, l) || R.tagNameCheck instanceof Function && R.tagNameCheck(l)) && (R.attributeNameCheck instanceof RegExp && $(R.attributeNameCheck, b) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(b, l)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
506
506
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
507
|
-
b === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp &&
|
|
507
|
+
b === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && $(R.tagNameCheck, x) || R.tagNameCheck instanceof Function && R.tagNameCheck(x)))
|
|
508
508
|
) return !1;
|
|
509
|
-
} else if (!
|
|
510
|
-
if (
|
|
509
|
+
} else if (!Be[b]) {
|
|
510
|
+
if (!$(k0, Zu(x, g0, ""))) {
|
|
511
511
|
if (!((b === "src" || b === "xlink:href" || b === "href") && l !== "script" && fr(x, "data:") === 0 && w0[l])) {
|
|
512
|
-
if (!(D0 &&
|
|
512
|
+
if (!(D0 && !$(tn, Zu(x, g0, "")))) {
|
|
513
513
|
if (x)
|
|
514
514
|
return !1;
|
|
515
515
|
}
|
|
@@ -520,13 +520,13 @@ function vt() {
|
|
|
520
520
|
}
|
|
521
521
|
return !0;
|
|
522
522
|
}, q0 = function(l) {
|
|
523
|
-
return l !== "annotation-xml" &&
|
|
523
|
+
return l !== "annotation-xml" && je(l, nn);
|
|
524
524
|
}, U0 = function(l) {
|
|
525
525
|
lu(L.beforeSanitizeAttributes, l, null);
|
|
526
526
|
const {
|
|
527
527
|
attributes: b
|
|
528
528
|
} = l;
|
|
529
|
-
if (!b ||
|
|
529
|
+
if (!b || Ue(l))
|
|
530
530
|
return;
|
|
531
531
|
const x = {
|
|
532
532
|
attrName: "",
|
|
@@ -541,13 +541,13 @@ function vt() {
|
|
|
541
541
|
name: I,
|
|
542
542
|
namespaceURI: W,
|
|
543
543
|
value: fu
|
|
544
|
-
} = U, Mu = N(I),
|
|
545
|
-
let q = I === "value" ?
|
|
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),
|
|
544
|
+
} = U, Mu = N(I), He = fu;
|
|
545
|
+
let q = I === "value" ? He : dr(He);
|
|
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), se && $(/((--!?|])>)|<\/(style|title|textarea)/i, q)) {
|
|
547
547
|
Eu(I, l);
|
|
548
548
|
continue;
|
|
549
549
|
}
|
|
550
|
-
if (Mu === "attributename" &&
|
|
550
|
+
if (Mu === "attributename" && je(q, "href")) {
|
|
551
551
|
Eu(I, l);
|
|
552
552
|
continue;
|
|
553
553
|
}
|
|
@@ -557,12 +557,12 @@ function vt() {
|
|
|
557
557
|
Eu(I, l);
|
|
558
558
|
continue;
|
|
559
559
|
}
|
|
560
|
-
if (!y0 &&
|
|
560
|
+
if (!y0 && $(/\/>/i, q)) {
|
|
561
561
|
Eu(I, l);
|
|
562
562
|
continue;
|
|
563
563
|
}
|
|
564
|
-
Tu &&
|
|
565
|
-
q =
|
|
564
|
+
Tu && me([Uu, Hu, Fu], ($0) => {
|
|
565
|
+
q = Zu(q, $0, " ");
|
|
566
566
|
});
|
|
567
567
|
const H0 = N(l.nodeName);
|
|
568
568
|
if (!z0(H0, Mu, q)) {
|
|
@@ -580,9 +580,9 @@ function vt() {
|
|
|
580
580
|
break;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
if (q !==
|
|
583
|
+
if (q !== He)
|
|
584
584
|
try {
|
|
585
|
-
W ? l.setAttributeNS(W, I, q) : l.setAttribute(I, q),
|
|
585
|
+
W ? l.setAttributeNS(W, I, q) : l.setAttribute(I, q), Ue(l) ? ru(l) : J0(e.removed);
|
|
586
586
|
} catch {
|
|
587
587
|
Eu(I, l);
|
|
588
588
|
}
|
|
@@ -597,59 +597,59 @@ function vt() {
|
|
|
597
597
|
};
|
|
598
598
|
return e.sanitize = function(g) {
|
|
599
599
|
let l = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, b = null, x = null, v = null, U = null;
|
|
600
|
-
if (
|
|
600
|
+
if (Pe = !g, Pe && (g = "<!-->"), typeof g != "string" && !B0(g))
|
|
601
601
|
if (typeof g.toString == "function") {
|
|
602
602
|
if (g = g.toString(), typeof g != "string")
|
|
603
|
-
throw
|
|
603
|
+
throw Vu("dirty is not a string, aborting");
|
|
604
604
|
} else
|
|
605
|
-
throw
|
|
605
|
+
throw Vu("toString is not a function");
|
|
606
606
|
if (!e.isSupported)
|
|
607
607
|
return g;
|
|
608
|
-
if (
|
|
608
|
+
if (Le || qe(l), e.removed = [], typeof g == "string" && (ju = !1), ju) {
|
|
609
609
|
if (g.nodeName) {
|
|
610
610
|
const fu = N(g.nodeName);
|
|
611
|
-
if (!O[fu] ||
|
|
612
|
-
throw
|
|
611
|
+
if (!O[fu] || $u[fu])
|
|
612
|
+
throw Vu("root node is forbidden and cannot be sanitized in-place");
|
|
613
613
|
}
|
|
614
614
|
} else if (g instanceof c)
|
|
615
|
-
b = O0("<!---->"), x = b.ownerDocument.importNode(g, !0), x.nodeType ===
|
|
615
|
+
b = O0("<!---->"), x = b.ownerDocument.importNode(g, !0), x.nodeType === Xu.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? b = x : b.appendChild(x);
|
|
616
616
|
else {
|
|
617
617
|
if (!Su && !Tu && !ku && // eslint-disable-next-line unicorn/prefer-includes
|
|
618
618
|
g.indexOf("<") === -1)
|
|
619
|
-
return _ &&
|
|
619
|
+
return _ && fe ? _.createHTML(g) : g;
|
|
620
620
|
if (b = O0(g), !b)
|
|
621
|
-
return Su ? null :
|
|
621
|
+
return Su ? null : fe ? A : "";
|
|
622
622
|
}
|
|
623
|
-
b &&
|
|
624
|
-
const I = N0(
|
|
623
|
+
b && Oe && ru(b.firstChild);
|
|
624
|
+
const I = N0(ju ? g : b);
|
|
625
625
|
for (; v = I.nextNode(); )
|
|
626
626
|
P0(v), U0(v), v.content instanceof o && dn(v.content);
|
|
627
|
-
if (
|
|
627
|
+
if (ju)
|
|
628
628
|
return g;
|
|
629
629
|
if (Su) {
|
|
630
|
-
if (
|
|
631
|
-
for (U =
|
|
630
|
+
if (le)
|
|
631
|
+
for (U = Y.call(b.ownerDocument); b.firstChild; )
|
|
632
632
|
U.appendChild(b.firstChild);
|
|
633
633
|
else
|
|
634
634
|
U = b;
|
|
635
635
|
return (z.shadowroot || z.shadowrootmode) && (U = gu.call(n, U, !0)), U;
|
|
636
636
|
}
|
|
637
637
|
let W = ku ? b.outerHTML : b.innerHTML;
|
|
638
|
-
return ku && O["!doctype"] && b.ownerDocument && b.ownerDocument.doctype && b.ownerDocument.doctype.name &&
|
|
639
|
-
` + W), Tu &&
|
|
640
|
-
W =
|
|
641
|
-
}), _ &&
|
|
638
|
+
return ku && O["!doctype"] && b.ownerDocument && b.ownerDocument.doctype && b.ownerDocument.doctype.name && $(wt, b.ownerDocument.doctype.name) && (W = "<!DOCTYPE " + b.ownerDocument.doctype.name + `>
|
|
639
|
+
` + W), Tu && me([Uu, Hu, Fu], (fu) => {
|
|
640
|
+
W = Zu(W, fu, " ");
|
|
641
|
+
}), _ && fe ? _.createHTML(W) : W;
|
|
642
642
|
}, e.setConfig = function() {
|
|
643
643
|
let g = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
644
|
-
|
|
644
|
+
qe(g), Le = !0;
|
|
645
645
|
}, e.clearConfig = function() {
|
|
646
|
-
Iu = null,
|
|
646
|
+
Iu = null, Le = !1;
|
|
647
647
|
}, e.isValidAttribute = function(g, l, b) {
|
|
648
|
-
Iu ||
|
|
648
|
+
Iu || qe({});
|
|
649
649
|
const x = N(g), v = N(l);
|
|
650
650
|
return z0(x, v, b);
|
|
651
651
|
}, e.addHook = function(g, l) {
|
|
652
|
-
typeof l == "function" &&
|
|
652
|
+
typeof l == "function" && Wu(L[g], l);
|
|
653
653
|
}, e.removeHook = function(g, l) {
|
|
654
654
|
if (l !== void 0) {
|
|
655
655
|
const b = sr(L[g], l);
|
|
@@ -679,8 +679,8 @@ function Sr(u) {
|
|
|
679
679
|
}
|
|
680
680
|
return e;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
typeof e != "string" && (e =
|
|
682
|
+
function Pu(u, e) {
|
|
683
|
+
typeof e != "string" && (e = Pu.defaultChars);
|
|
684
684
|
const t = Sr(e);
|
|
685
685
|
return u.replace(/(%[a-f0-9]{2})+/gi, function(n) {
|
|
686
686
|
let r = "";
|
|
@@ -719,8 +719,8 @@ function Bu(u, e) {
|
|
|
719
719
|
return r;
|
|
720
720
|
});
|
|
721
721
|
}
|
|
722
|
-
|
|
723
|
-
|
|
722
|
+
Pu.defaultChars = ";/?:@&=+$,#";
|
|
723
|
+
Pu.componentChars = "";
|
|
724
724
|
const ot = {};
|
|
725
725
|
function wr(u) {
|
|
726
726
|
let e = ot[u];
|
|
@@ -735,8 +735,8 @@ function wr(u) {
|
|
|
735
735
|
e[u.charCodeAt(t)] = u[t];
|
|
736
736
|
return e;
|
|
737
737
|
}
|
|
738
|
-
function
|
|
739
|
-
typeof e != "string" && (t = e, e =
|
|
738
|
+
function ce(u, e, t) {
|
|
739
|
+
typeof e != "string" && (t = e, e = ce.defaultChars), typeof t > "u" && (t = !0);
|
|
740
740
|
const n = wr(e);
|
|
741
741
|
let r = "";
|
|
742
742
|
for (let o = 0, i = u.length; o < i; o++) {
|
|
@@ -764,13 +764,13 @@ function oe(u, e, t) {
|
|
|
764
764
|
}
|
|
765
765
|
return r;
|
|
766
766
|
}
|
|
767
|
-
|
|
768
|
-
|
|
767
|
+
ce.defaultChars = ";/?:@&=+$,-_.!~*'()#";
|
|
768
|
+
ce.componentChars = "-_.!~*'()";
|
|
769
769
|
function f0(u) {
|
|
770
770
|
let e = "";
|
|
771
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;
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function De() {
|
|
774
774
|
this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
|
|
775
775
|
}
|
|
776
776
|
const vr = /^([a-z0-9.+-]+:)/i, Rr = /:[0-9]*$/, Ir = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Mr = ["<", ">", '"', "`", " ", "\r", `
|
|
@@ -790,11 +790,11 @@ const vr = /^([a-z0-9.+-]+:)/i, Rr = /:[0-9]*$/, Ir = /^(\/\/?(?!\/)[^\?\s]*)(\?
|
|
|
790
790
|
"file:": !0
|
|
791
791
|
};
|
|
792
792
|
function d0(u, e) {
|
|
793
|
-
if (u && u instanceof
|
|
794
|
-
const t = new
|
|
793
|
+
if (u && u instanceof De) return u;
|
|
794
|
+
const t = new De();
|
|
795
795
|
return t.parse(u, e), t;
|
|
796
796
|
}
|
|
797
|
-
|
|
797
|
+
De.prototype.parse = function(u, e) {
|
|
798
798
|
let t, n, r, o = u;
|
|
799
799
|
if (o = o.trim(), !e && u.split("#").length === 1) {
|
|
800
800
|
const s = Ir.exec(o);
|
|
@@ -837,14 +837,14 @@ Ce.prototype.parse = function(u, e) {
|
|
|
837
837
|
const a = o.indexOf("?");
|
|
838
838
|
return a !== -1 && (this.search = o.substr(a), o = o.slice(0, a)), o && (this.pathname = o), lt[t] && this.hostname && !this.pathname && (this.pathname = ""), this;
|
|
839
839
|
};
|
|
840
|
-
|
|
840
|
+
De.prototype.parseHost = function(u) {
|
|
841
841
|
let e = Rr.exec(u);
|
|
842
842
|
e && (e = e[0], e !== ":" && (this.port = e.substr(1)), u = u.substr(0, u.length - e.length)), u && (this.hostname = u);
|
|
843
843
|
};
|
|
844
844
|
const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
845
845
|
__proto__: null,
|
|
846
|
-
decode:
|
|
847
|
-
encode:
|
|
846
|
+
decode: Pu,
|
|
847
|
+
encode: ce,
|
|
848
848
|
format: f0,
|
|
849
849
|
parse: d0
|
|
850
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({
|
|
@@ -862,7 +862,7 @@ const Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
862
862
|
// prettier-ignore
|
|
863
863
|
"Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((u) => u.charCodeAt(0))
|
|
864
864
|
);
|
|
865
|
-
var
|
|
865
|
+
var Ye;
|
|
866
866
|
const $r = /* @__PURE__ */ new Map([
|
|
867
867
|
[0, 65533],
|
|
868
868
|
// C1 Unicode control character reference replacements
|
|
@@ -895,7 +895,7 @@ const $r = /* @__PURE__ */ new Map([
|
|
|
895
895
|
[159, 376]
|
|
896
896
|
]), jr = (
|
|
897
897
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, node/no-unsupported-features/es-builtins
|
|
898
|
-
(
|
|
898
|
+
(Ye = String.fromCodePoint) !== null && Ye !== void 0 ? Ye : function(u) {
|
|
899
899
|
let e = "";
|
|
900
900
|
return u > 65535 && (u -= 65536, e += String.fromCharCode(u >>> 10 & 1023 | 55296), u = 56320 | u & 1023), e += String.fromCharCode(u), e;
|
|
901
901
|
}
|
|
@@ -1177,7 +1177,7 @@ const uo = Object.prototype.hasOwnProperty;
|
|
|
1177
1177
|
function eo(u, e) {
|
|
1178
1178
|
return uo.call(u, e);
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function Te(u) {
|
|
1181
1181
|
return Array.prototype.slice.call(arguments, 1).forEach(function(t) {
|
|
1182
1182
|
if (t) {
|
|
1183
1183
|
if (typeof t != "object")
|
|
@@ -1194,7 +1194,7 @@ function Bt(u, e, t) {
|
|
|
1194
1194
|
function b0(u) {
|
|
1195
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);
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function ye(u) {
|
|
1198
1198
|
if (u > 65535) {
|
|
1199
1199
|
u -= 65536;
|
|
1200
1200
|
const e = 55296 + (u >> 10), t = 56320 + (u & 1023);
|
|
@@ -1206,7 +1206,7 @@ const Pt = /\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g, to = /&([a-z#][a-z0-9]{
|
|
|
1206
1206
|
function oo(u, e) {
|
|
1207
1207
|
if (e.charCodeAt(0) === 35 && ro.test(e)) {
|
|
1208
1208
|
const n = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
1209
|
-
return b0(n) ?
|
|
1209
|
+
return b0(n) ? ye(n) : u;
|
|
1210
1210
|
}
|
|
1211
1211
|
const t = Nt(u);
|
|
1212
1212
|
return t !== u ? t : u;
|
|
@@ -1214,7 +1214,7 @@ function oo(u, e) {
|
|
|
1214
1214
|
function co(u) {
|
|
1215
1215
|
return u.indexOf("\\") < 0 ? u : u.replace(Pt, "$1");
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function zu(u) {
|
|
1218
1218
|
return u.indexOf("\\") < 0 && u.indexOf("&") < 0 ? u : u.replace(no, function(e, t, n) {
|
|
1219
1219
|
return t || oo(e, n);
|
|
1220
1220
|
});
|
|
@@ -1243,7 +1243,7 @@ function w(u) {
|
|
|
1243
1243
|
}
|
|
1244
1244
|
return !1;
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function Ku(u) {
|
|
1247
1247
|
if (u >= 8192 && u <= 8202)
|
|
1248
1248
|
return !0;
|
|
1249
1249
|
switch (u) {
|
|
@@ -1262,10 +1262,10 @@ function Qu(u) {
|
|
|
1262
1262
|
}
|
|
1263
1263
|
return !1;
|
|
1264
1264
|
}
|
|
1265
|
-
function
|
|
1265
|
+
function ue(u) {
|
|
1266
1266
|
return h0.test(u) || Mt.test(u);
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function ee(u) {
|
|
1269
1269
|
switch (u) {
|
|
1270
1270
|
case 33:
|
|
1271
1271
|
case 34:
|
|
@@ -1304,26 +1304,26 @@ function ue(u) {
|
|
|
1304
1304
|
return !1;
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1307
|
+
function Se(u) {
|
|
1308
1308
|
return u = u.trim().replace(/\s+/g, " "), "ẞ".toLowerCase() === "Ṿ" && (u = u.replace(/ẞ/g, "ß")), u.toLowerCase().toUpperCase();
|
|
1309
1309
|
}
|
|
1310
1310
|
const po = { mdurl: Pr, ucmicro: qr }, bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1311
1311
|
__proto__: null,
|
|
1312
1312
|
arrayReplaceAt: Bt,
|
|
1313
|
-
assign:
|
|
1313
|
+
assign: Te,
|
|
1314
1314
|
escapeHtml: xu,
|
|
1315
1315
|
escapeRE: ho,
|
|
1316
|
-
fromCodePoint:
|
|
1316
|
+
fromCodePoint: ye,
|
|
1317
1317
|
has: eo,
|
|
1318
|
-
isMdAsciiPunct:
|
|
1319
|
-
isPunctChar:
|
|
1318
|
+
isMdAsciiPunct: ee,
|
|
1319
|
+
isPunctChar: ue,
|
|
1320
1320
|
isSpace: w,
|
|
1321
1321
|
isString: p0,
|
|
1322
1322
|
isValidEntityCode: b0,
|
|
1323
|
-
isWhiteSpace:
|
|
1323
|
+
isWhiteSpace: Ku,
|
|
1324
1324
|
lib: po,
|
|
1325
|
-
normalizeReference:
|
|
1326
|
-
unescapeAll:
|
|
1325
|
+
normalizeReference: Se,
|
|
1326
|
+
unescapeAll: zu,
|
|
1327
1327
|
unescapeMd: co
|
|
1328
1328
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1329
1329
|
function mo(u, e, t) {
|
|
@@ -1356,7 +1356,7 @@ function _o(u, e, t) {
|
|
|
1356
1356
|
if (n = u.charCodeAt(r), n === 10 || n === 60)
|
|
1357
1357
|
return o;
|
|
1358
1358
|
if (n === 62)
|
|
1359
|
-
return o.pos = r + 1, o.str =
|
|
1359
|
+
return o.pos = r + 1, o.str = zu(u.slice(e + 1, r)), o.ok = !0, o;
|
|
1360
1360
|
if (n === 92 && r + 1 < t) {
|
|
1361
1361
|
r += 2;
|
|
1362
1362
|
continue;
|
|
@@ -1382,7 +1382,7 @@ function _o(u, e, t) {
|
|
|
1382
1382
|
}
|
|
1383
1383
|
r++;
|
|
1384
1384
|
}
|
|
1385
|
-
return e === r || i !== 0 || (o.str =
|
|
1385
|
+
return e === r || i !== 0 || (o.str = zu(u.slice(e, r)), o.pos = r, o.ok = !0), o;
|
|
1386
1386
|
}
|
|
1387
1387
|
function xo(u, e, t, n) {
|
|
1388
1388
|
let r, o = e;
|
|
@@ -1410,12 +1410,12 @@ function xo(u, e, t, n) {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
for (; o < t; ) {
|
|
1412
1412
|
if (r = u.charCodeAt(o), r === i.marker)
|
|
1413
|
-
return i.pos = o + 1, i.str +=
|
|
1413
|
+
return i.pos = o + 1, i.str += zu(u.slice(e, o)), i.ok = !0, i;
|
|
1414
1414
|
if (r === 40 && i.marker === 41)
|
|
1415
1415
|
return i;
|
|
1416
1416
|
r === 92 && o + 1 < t && o++, o++;
|
|
1417
1417
|
}
|
|
1418
|
-
return i.can_continue = !0, i.str +=
|
|
1418
|
+
return i.can_continue = !0, i.str += zu(u.slice(e, o)), i;
|
|
1419
1419
|
}
|
|
1420
1420
|
const go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1421
1421
|
__proto__: null,
|
|
@@ -1433,7 +1433,7 @@ iu.code_block = function(u, e, t, n, r) {
|
|
|
1433
1433
|
`;
|
|
1434
1434
|
};
|
|
1435
1435
|
iu.fence = function(u, e, t, n, r) {
|
|
1436
|
-
const o = u[e], i = o.info ?
|
|
1436
|
+
const o = u[e], i = o.info ? zu(o.info).trim() : "";
|
|
1437
1437
|
let c = "", a = "";
|
|
1438
1438
|
if (i) {
|
|
1439
1439
|
const f = i.split(/(\s+)/g);
|
|
@@ -1479,10 +1479,10 @@ iu.html_block = function(u, e) {
|
|
|
1479
1479
|
iu.html_inline = function(u, e) {
|
|
1480
1480
|
return u[e].content;
|
|
1481
1481
|
};
|
|
1482
|
-
function
|
|
1483
|
-
this.rules =
|
|
1482
|
+
function qu() {
|
|
1483
|
+
this.rules = Te({}, iu);
|
|
1484
1484
|
}
|
|
1485
|
-
|
|
1485
|
+
qu.prototype.renderAttrs = function(e) {
|
|
1486
1486
|
let t, n, r;
|
|
1487
1487
|
if (!e.attrs)
|
|
1488
1488
|
return "";
|
|
@@ -1490,7 +1490,7 @@ zu.prototype.renderAttrs = function(e) {
|
|
|
1490
1490
|
r += " " + xu(e.attrs[t][0]) + '="' + xu(e.attrs[t][1]) + '"';
|
|
1491
1491
|
return r;
|
|
1492
1492
|
};
|
|
1493
|
-
|
|
1493
|
+
qu.prototype.renderToken = function(e, t, n) {
|
|
1494
1494
|
const r = e[t];
|
|
1495
1495
|
let o = "";
|
|
1496
1496
|
if (r.hidden)
|
|
@@ -1505,7 +1505,7 @@ zu.prototype.renderToken = function(e, t, n) {
|
|
|
1505
1505
|
return o += i ? `>
|
|
1506
1506
|
` : ">", o;
|
|
1507
1507
|
};
|
|
1508
|
-
|
|
1508
|
+
qu.prototype.renderInline = function(u, e, t) {
|
|
1509
1509
|
let n = "";
|
|
1510
1510
|
const r = this.rules;
|
|
1511
1511
|
for (let o = 0, i = u.length; o < i; o++) {
|
|
@@ -1514,7 +1514,7 @@ zu.prototype.renderInline = function(u, e, t) {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
return n;
|
|
1516
1516
|
};
|
|
1517
|
-
|
|
1517
|
+
qu.prototype.renderInlineAsText = function(u, e, t) {
|
|
1518
1518
|
let n = "";
|
|
1519
1519
|
for (let r = 0, o = u.length; r < o; r++)
|
|
1520
1520
|
switch (u[r].type) {
|
|
@@ -1536,7 +1536,7 @@ zu.prototype.renderInlineAsText = function(u, e, t) {
|
|
|
1536
1536
|
}
|
|
1537
1537
|
return n;
|
|
1538
1538
|
};
|
|
1539
|
-
|
|
1539
|
+
qu.prototype.render = function(u, e, t) {
|
|
1540
1540
|
let n = "";
|
|
1541
1541
|
const r = this.rules;
|
|
1542
1542
|
for (let o = 0, i = u.length; o < i; o++) {
|
|
@@ -1545,16 +1545,16 @@ zu.prototype.render = function(u, e, t) {
|
|
|
1545
1545
|
}
|
|
1546
1546
|
return n;
|
|
1547
1547
|
};
|
|
1548
|
-
function
|
|
1548
|
+
function V() {
|
|
1549
1549
|
this.__rules__ = [], this.__cache__ = null;
|
|
1550
1550
|
}
|
|
1551
|
-
|
|
1551
|
+
V.prototype.__find__ = function(u) {
|
|
1552
1552
|
for (let e = 0; e < this.__rules__.length; e++)
|
|
1553
1553
|
if (this.__rules__[e].name === u)
|
|
1554
1554
|
return e;
|
|
1555
1555
|
return -1;
|
|
1556
1556
|
};
|
|
1557
|
-
|
|
1557
|
+
V.prototype.__compile__ = function() {
|
|
1558
1558
|
const u = this, e = [""];
|
|
1559
1559
|
u.__rules__.forEach(function(t) {
|
|
1560
1560
|
t.enabled && t.alt.forEach(function(n) {
|
|
@@ -1566,13 +1566,13 @@ Z.prototype.__compile__ = function() {
|
|
|
1566
1566
|
});
|
|
1567
1567
|
});
|
|
1568
1568
|
};
|
|
1569
|
-
|
|
1569
|
+
V.prototype.at = function(u, e, t) {
|
|
1570
1570
|
const n = this.__find__(u), r = t || {};
|
|
1571
1571
|
if (n === -1)
|
|
1572
1572
|
throw new Error("Parser rule not found: " + u);
|
|
1573
1573
|
this.__rules__[n].fn = e, this.__rules__[n].alt = r.alt || [], this.__cache__ = null;
|
|
1574
1574
|
};
|
|
1575
|
-
|
|
1575
|
+
V.prototype.before = function(u, e, t, n) {
|
|
1576
1576
|
const r = this.__find__(u), o = n || {};
|
|
1577
1577
|
if (r === -1)
|
|
1578
1578
|
throw new Error("Parser rule not found: " + u);
|
|
@@ -1583,7 +1583,7 @@ Z.prototype.before = function(u, e, t, n) {
|
|
|
1583
1583
|
alt: o.alt || []
|
|
1584
1584
|
}), this.__cache__ = null;
|
|
1585
1585
|
};
|
|
1586
|
-
|
|
1586
|
+
V.prototype.after = function(u, e, t, n) {
|
|
1587
1587
|
const r = this.__find__(u), o = n || {};
|
|
1588
1588
|
if (r === -1)
|
|
1589
1589
|
throw new Error("Parser rule not found: " + u);
|
|
@@ -1594,7 +1594,7 @@ Z.prototype.after = function(u, e, t, n) {
|
|
|
1594
1594
|
alt: o.alt || []
|
|
1595
1595
|
}), this.__cache__ = null;
|
|
1596
1596
|
};
|
|
1597
|
-
|
|
1597
|
+
V.prototype.push = function(u, e, t) {
|
|
1598
1598
|
const n = t || {};
|
|
1599
1599
|
this.__rules__.push({
|
|
1600
1600
|
name: u,
|
|
@@ -1603,7 +1603,7 @@ Z.prototype.push = function(u, e, t) {
|
|
|
1603
1603
|
alt: n.alt || []
|
|
1604
1604
|
}), this.__cache__ = null;
|
|
1605
1605
|
};
|
|
1606
|
-
|
|
1606
|
+
V.prototype.enable = function(u, e) {
|
|
1607
1607
|
Array.isArray(u) || (u = [u]);
|
|
1608
1608
|
const t = [];
|
|
1609
1609
|
return u.forEach(function(n) {
|
|
@@ -1616,12 +1616,12 @@ Z.prototype.enable = function(u, e) {
|
|
|
1616
1616
|
this.__rules__[r].enabled = !0, t.push(n);
|
|
1617
1617
|
}, this), this.__cache__ = null, t;
|
|
1618
1618
|
};
|
|
1619
|
-
|
|
1619
|
+
V.prototype.enableOnly = function(u, e) {
|
|
1620
1620
|
Array.isArray(u) || (u = [u]), this.__rules__.forEach(function(t) {
|
|
1621
1621
|
t.enabled = !1;
|
|
1622
1622
|
}), this.enable(u, e);
|
|
1623
1623
|
};
|
|
1624
|
-
|
|
1624
|
+
V.prototype.disable = function(u, e) {
|
|
1625
1625
|
Array.isArray(u) || (u = [u]);
|
|
1626
1626
|
const t = [];
|
|
1627
1627
|
return u.forEach(function(n) {
|
|
@@ -1634,7 +1634,7 @@ Z.prototype.disable = function(u, e) {
|
|
|
1634
1634
|
this.__rules__[r].enabled = !1, t.push(n);
|
|
1635
1635
|
}, this), this.__cache__ = null, t;
|
|
1636
1636
|
};
|
|
1637
|
-
|
|
1637
|
+
V.prototype.getRules = function(u) {
|
|
1638
1638
|
return this.__cache__ === null && this.__compile__(), this.__cache__[u] || [];
|
|
1639
1639
|
};
|
|
1640
1640
|
function tu(u, e, t) {
|
|
@@ -1768,7 +1768,7 @@ function Lo(u) {
|
|
|
1768
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));
|
|
1769
1769
|
}
|
|
1770
1770
|
const Oo = /['"]/, ft = /['"]/g, dt = "’";
|
|
1771
|
-
function
|
|
1771
|
+
function xe(u, e, t) {
|
|
1772
1772
|
return u.slice(0, e) + t + u.slice(e + 1);
|
|
1773
1773
|
}
|
|
1774
1774
|
function No(u, e) {
|
|
@@ -1808,9 +1808,9 @@ function No(u, e) {
|
|
|
1808
1808
|
C = u[t].content.charCodeAt(0);
|
|
1809
1809
|
break;
|
|
1810
1810
|
}
|
|
1811
|
-
const D =
|
|
1811
|
+
const D = ee(h) || ue(String.fromCharCode(h)), T = ee(C) || ue(String.fromCharCode(C)), E = Ku(h), k = Ku(C);
|
|
1812
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 =
|
|
1813
|
+
p && (o.content = xe(o.content, f.index, dt));
|
|
1814
1814
|
continue;
|
|
1815
1815
|
}
|
|
1816
1816
|
if (m)
|
|
@@ -1821,7 +1821,7 @@ function No(u, e) {
|
|
|
1821
1821
|
if (_.single === p && n[t].level === i) {
|
|
1822
1822
|
_ = n[t];
|
|
1823
1823
|
let A, y;
|
|
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 =
|
|
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 = xe(o.content, f.index, y), u[_.token].content = xe(
|
|
1825
1825
|
u[_.token].content,
|
|
1826
1826
|
_.pos,
|
|
1827
1827
|
A
|
|
@@ -1834,7 +1834,7 @@ function No(u, e) {
|
|
|
1834
1834
|
pos: f.index,
|
|
1835
1835
|
single: p,
|
|
1836
1836
|
level: i
|
|
1837
|
-
}) : m && p && (o.content =
|
|
1837
|
+
}) : m && p && (o.content = xe(o.content, f.index, dt));
|
|
1838
1838
|
}
|
|
1839
1839
|
}
|
|
1840
1840
|
}
|
|
@@ -1856,7 +1856,7 @@ function Po(u) {
|
|
|
1856
1856
|
e !== t && (i.length = t);
|
|
1857
1857
|
}
|
|
1858
1858
|
}
|
|
1859
|
-
const
|
|
1859
|
+
const Xe = [
|
|
1860
1860
|
["normalize", Ao],
|
|
1861
1861
|
["block", Co],
|
|
1862
1862
|
["inline", Do],
|
|
@@ -1868,9 +1868,9 @@ const Ye = [
|
|
|
1868
1868
|
["text_join", Po]
|
|
1869
1869
|
];
|
|
1870
1870
|
function m0() {
|
|
1871
|
-
this.ruler = new
|
|
1872
|
-
for (let u = 0; u <
|
|
1873
|
-
this.ruler.push(
|
|
1871
|
+
this.ruler = new V();
|
|
1872
|
+
for (let u = 0; u < Xe.length; u++)
|
|
1873
|
+
this.ruler.push(Xe[u][0], Xe[u][1]);
|
|
1874
1874
|
}
|
|
1875
1875
|
m0.prototype.process = function(u) {
|
|
1876
1876
|
const e = this.ruler.getRules("");
|
|
@@ -1958,7 +1958,7 @@ au.prototype.getLines = function(e, t, n, r) {
|
|
|
1958
1958
|
};
|
|
1959
1959
|
au.prototype.Token = tu;
|
|
1960
1960
|
const zo = 65536;
|
|
1961
|
-
function
|
|
1961
|
+
function Je(u, e) {
|
|
1962
1962
|
const t = u.bMarks[e] + u.tShift[e], n = u.eMarks[e];
|
|
1963
1963
|
return u.src.slice(t, n);
|
|
1964
1964
|
}
|
|
@@ -1990,7 +1990,7 @@ function qo(u, e, t, n) {
|
|
|
1990
1990
|
return !1;
|
|
1991
1991
|
o++;
|
|
1992
1992
|
}
|
|
1993
|
-
let a =
|
|
1993
|
+
let a = Je(u, e + 1), s = a.split("|");
|
|
1994
1994
|
const f = [];
|
|
1995
1995
|
for (let _ = 0; _ < s.length; _++) {
|
|
1996
1996
|
const A = s[_].trim();
|
|
@@ -2003,7 +2003,7 @@ function qo(u, e, t, n) {
|
|
|
2003
2003
|
return !1;
|
|
2004
2004
|
A.charCodeAt(A.length - 1) === 58 ? f.push(A.charCodeAt(0) === 58 ? "center" : "right") : A.charCodeAt(0) === 58 ? f.push("left") : f.push("");
|
|
2005
2005
|
}
|
|
2006
|
-
if (a =
|
|
2006
|
+
if (a = Je(u, e).trim(), a.indexOf("|") === -1 || u.sCount[e] - u.blkIndent >= 4)
|
|
2007
2007
|
return !1;
|
|
2008
2008
|
s = ht(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop();
|
|
2009
2009
|
const d = s.length;
|
|
@@ -2034,7 +2034,7 @@ function qo(u, e, t, n) {
|
|
|
2034
2034
|
_ = !0;
|
|
2035
2035
|
break;
|
|
2036
2036
|
}
|
|
2037
|
-
if (_ || (a =
|
|
2037
|
+
if (_ || (a = Je(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))
|
|
2038
2038
|
break;
|
|
2039
2039
|
if (r === e + 2) {
|
|
2040
2040
|
const y = u.push("tbody_open", "tbody", 1);
|
|
@@ -2045,8 +2045,8 @@ function qo(u, e, t, n) {
|
|
|
2045
2045
|
for (let y = 0; y < d; y++) {
|
|
2046
2046
|
const M = u.push("td_open", "td", 1);
|
|
2047
2047
|
f[y] && (M.attrs = [["style", "text-align:" + f[y]]]);
|
|
2048
|
-
const
|
|
2049
|
-
|
|
2048
|
+
const Y = u.push("inline", "", 0);
|
|
2049
|
+
Y.content = s[y] ? s[y].trim() : "", Y.children = [], u.push("td_close", "td", -1);
|
|
2050
2050
|
}
|
|
2051
2051
|
u.push("tr_close", "tr", -1);
|
|
2052
2052
|
}
|
|
@@ -2116,16 +2116,16 @@ function $o(u, e, t, n) {
|
|
|
2116
2116
|
if (u.src.charCodeAt(r++) === 62 && !k) {
|
|
2117
2117
|
let A = u.sCount[h] + 1, y, M;
|
|
2118
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;
|
|
2119
|
-
let
|
|
2119
|
+
let Y = A;
|
|
2120
2120
|
for (c.push(u.bMarks[h]), u.bMarks[h] = r; r < o; ) {
|
|
2121
2121
|
const nu = u.src.charCodeAt(r);
|
|
2122
2122
|
if (w(nu))
|
|
2123
|
-
nu === 9 ?
|
|
2123
|
+
nu === 9 ? Y += 4 - (Y + u.bsCount[h] + (M ? 1 : 0)) % 4 : Y++;
|
|
2124
2124
|
else
|
|
2125
2125
|
break;
|
|
2126
2126
|
r++;
|
|
2127
2127
|
}
|
|
2128
|
-
p = r >= o, a.push(u.bsCount[h]), u.bsCount[h] = u.sCount[h] + 1 + (y ? 1 : 0), s.push(u.sCount[h]), u.sCount[h] =
|
|
2128
|
+
p = r >= o, a.push(u.bsCount[h]), u.bsCount[h] = u.sCount[h] + 1 + (y ? 1 : 0), s.push(u.sCount[h]), u.sCount[h] = Y - A, f.push(u.tShift[h]), u.tShift[h] = r - u.bMarks[h];
|
|
2129
2129
|
continue;
|
|
2130
2130
|
}
|
|
2131
2131
|
if (p)
|
|
@@ -2257,15 +2257,15 @@ function Wo(u, e, t, n) {
|
|
|
2257
2257
|
const y = o;
|
|
2258
2258
|
let M;
|
|
2259
2259
|
y >= r ? M = 1 : M = A - _, M > 4 && (M = 1);
|
|
2260
|
-
const
|
|
2260
|
+
const Y = _ + M;
|
|
2261
2261
|
c = u.push("list_item_open", "li", 1), c.markup = String.fromCharCode(h);
|
|
2262
2262
|
const nu = [a, 0];
|
|
2263
2263
|
c.map = nu, d && (c.info = u.src.slice(i, p - 1));
|
|
2264
|
-
const gu = u.tight, L = u.tShift[a],
|
|
2265
|
-
if (u.listIndent = u.blkIndent, u.blkIndent =
|
|
2264
|
+
const gu = u.tight, L = u.tShift[a], Uu = u.sCount[a], Hu = u.listIndent;
|
|
2265
|
+
if (u.listIndent = u.blkIndent, u.blkIndent = Y, 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 = Hu, u.tShift[a] = L, u.sCount[a] = Uu, 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)
|
|
2266
2266
|
break;
|
|
2267
2267
|
let Fu = !1;
|
|
2268
|
-
for (let hu = 0,
|
|
2268
|
+
for (let hu = 0, Re = E.length; hu < Re; hu++)
|
|
2269
2269
|
if (E[hu](u, a, t, !0)) {
|
|
2270
2270
|
Fu = !0;
|
|
2271
2271
|
break;
|
|
@@ -2293,7 +2293,7 @@ function Zo(u, e, t, n) {
|
|
|
2293
2293
|
return null;
|
|
2294
2294
|
let _ = !1;
|
|
2295
2295
|
if (u.sCount[E] - u.blkIndent > 3 && (_ = !0), u.sCount[E] < 0 && (_ = !0), !_) {
|
|
2296
|
-
const M = u.md.block.ruler.getRules("reference"),
|
|
2296
|
+
const M = u.md.block.ruler.getRules("reference"), Y = u.parentType;
|
|
2297
2297
|
u.parentType = "reference";
|
|
2298
2298
|
let nu = !1;
|
|
2299
2299
|
for (let gu = 0, L = M.length; gu < L; gu++)
|
|
@@ -2301,7 +2301,7 @@ function Zo(u, e, t, n) {
|
|
|
2301
2301
|
nu = !0;
|
|
2302
2302
|
break;
|
|
2303
2303
|
}
|
|
2304
|
-
if (u.parentType =
|
|
2304
|
+
if (u.parentType = Y, nu)
|
|
2305
2305
|
return null;
|
|
2306
2306
|
}
|
|
2307
2307
|
const A = u.bMarks[E] + u.tShift[E], y = u.eMarks[E];
|
|
@@ -2371,7 +2371,7 @@ function Zo(u, e, t, n) {
|
|
|
2371
2371
|
}
|
|
2372
2372
|
if (r < o && a.charCodeAt(r) !== 10)
|
|
2373
2373
|
return !1;
|
|
2374
|
-
const T =
|
|
2374
|
+
const T = Se(a.slice(1, s));
|
|
2375
2375
|
return T ? (n || (typeof u.env.references > "u" && (u.env.references = {}), typeof u.env.references[T] > "u" && (u.env.references[T] = { title: D, href: d }), u.line = i), !0) : !1;
|
|
2376
2376
|
}
|
|
2377
2377
|
const Vo = [
|
|
@@ -2555,7 +2555,7 @@ function lc(u, e, t) {
|
|
|
2555
2555
|
const a = u.push("inline", "", 0);
|
|
2556
2556
|
return a.content = i, a.map = [e, u.line], a.children = [], u.push("paragraph_close", "p", -1), u.parentType = r, !0;
|
|
2557
2557
|
}
|
|
2558
|
-
const
|
|
2558
|
+
const ge = [
|
|
2559
2559
|
// First 2 params - rule name & source. Secondary array - list of rules,
|
|
2560
2560
|
// which can be terminated by this one.
|
|
2561
2561
|
["table", qo, ["paragraph", "reference"]],
|
|
@@ -2570,12 +2570,12 @@ const xe = [
|
|
|
2570
2570
|
["lheading", sc],
|
|
2571
2571
|
["paragraph", lc]
|
|
2572
2572
|
];
|
|
2573
|
-
function
|
|
2574
|
-
this.ruler = new
|
|
2575
|
-
for (let u = 0; u <
|
|
2576
|
-
this.ruler.push(
|
|
2573
|
+
function we() {
|
|
2574
|
+
this.ruler = new V();
|
|
2575
|
+
for (let u = 0; u < ge.length; u++)
|
|
2576
|
+
this.ruler.push(ge[u][0], ge[u][1], { alt: (ge[u][2] || []).slice() });
|
|
2577
2577
|
}
|
|
2578
|
-
|
|
2578
|
+
we.prototype.tokenize = function(u, e, t) {
|
|
2579
2579
|
const n = this.ruler.getRules(""), r = n.length, o = u.md.options.maxNesting;
|
|
2580
2580
|
let i = e, c = !1;
|
|
2581
2581
|
for (; i < t && (u.line = i = u.skipEmptyLines(i), !(i >= t || u.sCount[i] < u.blkIndent)); ) {
|
|
@@ -2595,35 +2595,35 @@ Se.prototype.tokenize = function(u, e, t) {
|
|
|
2595
2595
|
u.tight = !c, u.isEmpty(u.line - 1) && (c = !0), i = u.line, i < t && u.isEmpty(i) && (c = !0, i++, u.line = i);
|
|
2596
2596
|
}
|
|
2597
2597
|
};
|
|
2598
|
-
|
|
2598
|
+
we.prototype.parse = function(u, e, t, n) {
|
|
2599
2599
|
if (!u)
|
|
2600
2600
|
return;
|
|
2601
2601
|
const r = new this.State(u, e, t, n);
|
|
2602
2602
|
this.tokenize(r, r.line, r.lineMax);
|
|
2603
2603
|
};
|
|
2604
|
-
|
|
2605
|
-
function
|
|
2604
|
+
we.prototype.State = au;
|
|
2605
|
+
function ie(u, e, t, n) {
|
|
2606
2606
|
this.src = u, this.env = t, this.md = e, this.tokens = n, this.tokens_meta = Array(n.length), this.pos = 0, this.posMax = this.src.length, this.level = 0, this.pending = "", this.pendingLevel = 0, this.cache = {}, this.delimiters = [], this._prev_delimiters = [], this.backticks = {}, this.backticksScanned = !1, this.linkLevel = 0;
|
|
2607
2607
|
}
|
|
2608
|
-
|
|
2608
|
+
ie.prototype.pushPending = function() {
|
|
2609
2609
|
const u = new tu("text", "", 0);
|
|
2610
2610
|
return u.content = this.pending, u.level = this.pendingLevel, this.tokens.push(u), this.pending = "", u;
|
|
2611
2611
|
};
|
|
2612
|
-
|
|
2612
|
+
ie.prototype.push = function(u, e, t) {
|
|
2613
2613
|
this.pending && this.pushPending();
|
|
2614
2614
|
const n = new tu(u, e, t);
|
|
2615
2615
|
let r = null;
|
|
2616
2616
|
return t < 0 && (this.level--, this.delimiters = this._prev_delimiters.pop()), n.level = this.level, t > 0 && (this.level++, this._prev_delimiters.push(this.delimiters), this.delimiters = [], r = { delimiters: this.delimiters }), this.pendingLevel = this.level, this.tokens.push(n), this.tokens_meta.push(r), n;
|
|
2617
2617
|
};
|
|
2618
|
-
|
|
2618
|
+
ie.prototype.scanDelims = function(u, e) {
|
|
2619
2619
|
const t = this.posMax, n = this.src.charCodeAt(u), r = u > 0 ? this.src.charCodeAt(u - 1) : 32;
|
|
2620
2620
|
let o = u;
|
|
2621
2621
|
for (; o < t && this.src.charCodeAt(o) === n; )
|
|
2622
2622
|
o++;
|
|
2623
|
-
const i = o - u, c = o < t ? this.src.charCodeAt(o) : 32, a =
|
|
2623
|
+
const i = o - u, c = o < t ? this.src.charCodeAt(o) : 32, a = ee(r) || ue(String.fromCharCode(r)), s = ee(c) || ue(String.fromCharCode(c)), f = Ku(r), d = Ku(c), m = !d && (!s || f || a), p = !f && (!a || d || s);
|
|
2624
2624
|
return { can_open: m && (e || !p || a), can_close: p && (e || !m || s), length: i };
|
|
2625
2625
|
};
|
|
2626
|
-
|
|
2626
|
+
ie.prototype.Token = tu;
|
|
2627
2627
|
function fc(u) {
|
|
2628
2628
|
switch (u) {
|
|
2629
2629
|
case 10:
|
|
@@ -2890,7 +2890,7 @@ function Ac(u, e) {
|
|
|
2890
2890
|
if (s) {
|
|
2891
2891
|
if (typeof u.env.references > "u")
|
|
2892
2892
|
return !1;
|
|
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[
|
|
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[Se(n)], !o)
|
|
2894
2894
|
return u.pos = f, !1;
|
|
2895
2895
|
i = o.href, c = o.title;
|
|
2896
2896
|
}
|
|
@@ -2927,7 +2927,7 @@ function Cc(u, e) {
|
|
|
2927
2927
|
} else {
|
|
2928
2928
|
if (typeof u.env.references > "u")
|
|
2929
2929
|
return !1;
|
|
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[
|
|
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[Se(r)], !i)
|
|
2931
2931
|
return u.pos = d, !1;
|
|
2932
2932
|
f = i.href, a = i.title;
|
|
2933
2933
|
}
|
|
@@ -3025,7 +3025,7 @@ function Mc(u, e) {
|
|
|
3025
3025
|
if (o) {
|
|
3026
3026
|
if (!e) {
|
|
3027
3027
|
const i = o[1][0].toLowerCase() === "x" ? parseInt(o[1].slice(1), 16) : parseInt(o[1], 10), c = u.push("text_special", "", 0);
|
|
3028
|
-
c.content = b0(i) ?
|
|
3028
|
+
c.content = b0(i) ? ye(i) : ye(65533), c.markup = o[0], c.info = "entity";
|
|
3029
3029
|
}
|
|
3030
3030
|
return u.pos += o[0].length, !0;
|
|
3031
3031
|
}
|
|
@@ -3082,7 +3082,7 @@ function Oc(u) {
|
|
|
3082
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++);
|
|
3083
3083
|
e !== t && (r.length = t);
|
|
3084
3084
|
}
|
|
3085
|
-
const
|
|
3085
|
+
const Qe = [
|
|
3086
3086
|
["text", dc],
|
|
3087
3087
|
["linkify", pc],
|
|
3088
3088
|
["newline", bc],
|
|
@@ -3095,7 +3095,7 @@ const Je = [
|
|
|
3095
3095
|
["autolink", Fc],
|
|
3096
3096
|
["html_inline", vc],
|
|
3097
3097
|
["entity", Mc]
|
|
3098
|
-
],
|
|
3098
|
+
], Ke = [
|
|
3099
3099
|
["balance_pairs", Lc],
|
|
3100
3100
|
["strikethrough", $t.postProcess],
|
|
3101
3101
|
["emphasis", jt.postProcess],
|
|
@@ -3103,15 +3103,15 @@ const Je = [
|
|
|
3103
3103
|
// rule below merges unused segments back with the rest of the text
|
|
3104
3104
|
["fragments_join", Oc]
|
|
3105
3105
|
];
|
|
3106
|
-
function
|
|
3107
|
-
this.ruler = new
|
|
3108
|
-
for (let u = 0; u < Je.length; u++)
|
|
3109
|
-
this.ruler.push(Je[u][0], Je[u][1]);
|
|
3110
|
-
this.ruler2 = new Z();
|
|
3106
|
+
function ae() {
|
|
3107
|
+
this.ruler = new V();
|
|
3111
3108
|
for (let u = 0; u < Qe.length; u++)
|
|
3112
|
-
this.
|
|
3109
|
+
this.ruler.push(Qe[u][0], Qe[u][1]);
|
|
3110
|
+
this.ruler2 = new V();
|
|
3111
|
+
for (let u = 0; u < Ke.length; u++)
|
|
3112
|
+
this.ruler2.push(Ke[u][0], Ke[u][1]);
|
|
3113
3113
|
}
|
|
3114
|
-
|
|
3114
|
+
ae.prototype.skipToken = function(u) {
|
|
3115
3115
|
const e = u.pos, t = this.ruler.getRules(""), n = t.length, r = u.md.options.maxNesting, o = u.cache;
|
|
3116
3116
|
if (typeof o[e] < "u") {
|
|
3117
3117
|
u.pos = o[e];
|
|
@@ -3129,7 +3129,7 @@ ie.prototype.skipToken = function(u) {
|
|
|
3129
3129
|
u.pos = u.posMax;
|
|
3130
3130
|
i || u.pos++, o[e] = u.pos;
|
|
3131
3131
|
};
|
|
3132
|
-
|
|
3132
|
+
ae.prototype.tokenize = function(u) {
|
|
3133
3133
|
const e = this.ruler.getRules(""), t = e.length, n = u.posMax, r = u.md.options.maxNesting;
|
|
3134
3134
|
for (; u.pos < n; ) {
|
|
3135
3135
|
const o = u.pos;
|
|
@@ -3151,14 +3151,14 @@ ie.prototype.tokenize = function(u) {
|
|
|
3151
3151
|
}
|
|
3152
3152
|
u.pending && u.pushPending();
|
|
3153
3153
|
};
|
|
3154
|
-
|
|
3154
|
+
ae.prototype.parse = function(u, e, t, n) {
|
|
3155
3155
|
const r = new this.State(u, e, t, n);
|
|
3156
3156
|
this.tokenize(r);
|
|
3157
3157
|
const o = this.ruler2.getRules(""), i = o.length;
|
|
3158
3158
|
for (let c = 0; c < i; c++)
|
|
3159
3159
|
o[c](r);
|
|
3160
3160
|
};
|
|
3161
|
-
|
|
3161
|
+
ae.prototype.State = ie;
|
|
3162
3162
|
function Nc(u) {
|
|
3163
3163
|
const e = {};
|
|
3164
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("|");
|
|
@@ -3178,20 +3178,20 @@ function o0(u) {
|
|
|
3178
3178
|
});
|
|
3179
3179
|
}), u;
|
|
3180
3180
|
}
|
|
3181
|
-
function
|
|
3181
|
+
function ve(u) {
|
|
3182
3182
|
return Object.prototype.toString.call(u);
|
|
3183
3183
|
}
|
|
3184
3184
|
function Bc(u) {
|
|
3185
|
-
return
|
|
3185
|
+
return ve(u) === "[object String]";
|
|
3186
3186
|
}
|
|
3187
3187
|
function Pc(u) {
|
|
3188
|
-
return
|
|
3188
|
+
return ve(u) === "[object Object]";
|
|
3189
3189
|
}
|
|
3190
3190
|
function zc(u) {
|
|
3191
|
-
return
|
|
3191
|
+
return ve(u) === "[object RegExp]";
|
|
3192
3192
|
}
|
|
3193
3193
|
function gt(u) {
|
|
3194
|
-
return
|
|
3194
|
+
return ve(u) === "[object Function]";
|
|
3195
3195
|
}
|
|
3196
3196
|
function qc(u) {
|
|
3197
3197
|
return u.replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
|
|
@@ -3253,7 +3253,7 @@ function kt() {
|
|
|
3253
3253
|
e.normalize(u);
|
|
3254
3254
|
};
|
|
3255
3255
|
}
|
|
3256
|
-
function
|
|
3256
|
+
function Fe(u) {
|
|
3257
3257
|
const e = u.re = Nc(u.__opts__), t = u.__tlds__.slice();
|
|
3258
3258
|
u.onCompile(), u.__tlds_replaced__ || t.push($c), t.push(e.src_xn), e.src_tlds = t.join("|");
|
|
3259
3259
|
function n(c) {
|
|
@@ -3301,10 +3301,10 @@ function c0(u, e) {
|
|
|
3301
3301
|
function J(u, e) {
|
|
3302
3302
|
if (!(this instanceof J))
|
|
3303
3303
|
return new J(u, e);
|
|
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 = {},
|
|
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 = {}, Fe(this);
|
|
3305
3305
|
}
|
|
3306
3306
|
J.prototype.add = function(e, t) {
|
|
3307
|
-
return this.__schemas__[e] = t,
|
|
3307
|
+
return this.__schemas__[e] = t, Fe(this), this;
|
|
3308
3308
|
};
|
|
3309
3309
|
J.prototype.set = function(e) {
|
|
3310
3310
|
return this.__opts__ = o0(this.__opts__, e), this;
|
|
@@ -3347,18 +3347,18 @@ J.prototype.matchAtStart = function(e) {
|
|
|
3347
3347
|
J.prototype.tlds = function(e, t) {
|
|
3348
3348
|
return e = Array.isArray(e) ? e : [e], t ? (this.__tlds__ = this.__tlds__.concat(e).sort().filter(function(n, r, o) {
|
|
3349
3349
|
return n !== o[r - 1];
|
|
3350
|
-
}).reverse(),
|
|
3350
|
+
}).reverse(), Fe(this), this) : (this.__tlds__ = e.slice(), this.__tlds_replaced__ = !0, Fe(this), this);
|
|
3351
3351
|
};
|
|
3352
3352
|
J.prototype.normalize = function(e) {
|
|
3353
3353
|
e.schema || (e.url = "http://" + e.url), e.schema === "mailto:" && !/^mailto:/i.test(e.url) && (e.url = "mailto:" + e.url);
|
|
3354
3354
|
};
|
|
3355
3355
|
J.prototype.onCompile = function() {
|
|
3356
3356
|
};
|
|
3357
|
-
const
|
|
3357
|
+
const Bu = 2147483647, ou = 36, x0 = 1, te = 26, Vc = 38, Yc = 700, Wt = 72, Zt = 128, Vt = "-", Xc = /^xn--/, Jc = /[^\0-\x7F]/, Qc = /[\x2E\u3002\uFF0E\uFF61]/g, Kc = {
|
|
3358
3358
|
overflow: "Overflow: input needs wider integers to process",
|
|
3359
3359
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3360
3360
|
"invalid-input": "Invalid input"
|
|
3361
|
-
},
|
|
3361
|
+
}, u0 = ou - x0, cu = Math.floor, e0 = String.fromCharCode;
|
|
3362
3362
|
function pu(u) {
|
|
3363
3363
|
throw new RangeError(Kc[u]);
|
|
3364
3364
|
}
|
|
@@ -3396,9 +3396,9 @@ const ei = (u) => String.fromCodePoint(...u), ti = function(u) {
|
|
|
3396
3396
|
return u + 22 + 75 * (u < 26) - ((e != 0) << 5);
|
|
3397
3397
|
}, Jt = function(u, e, t) {
|
|
3398
3398
|
let n = 0;
|
|
3399
|
-
for (u = t ? cu(u / Yc) : u >> 1, u += cu(u / e); u >
|
|
3400
|
-
u = cu(u /
|
|
3401
|
-
return cu(n + (
|
|
3399
|
+
for (u = t ? cu(u / Yc) : u >> 1, u += cu(u / e); u > u0 * te >> 1; n += ou)
|
|
3400
|
+
u = cu(u / u0);
|
|
3401
|
+
return cu(n + (u0 + 1) * u / (u + Vc));
|
|
3402
3402
|
}, Qt = function(u) {
|
|
3403
3403
|
const e = [], t = u.length;
|
|
3404
3404
|
let n = 0, r = Zt, o = Wt, i = u.lastIndexOf(Vt);
|
|
@@ -3410,15 +3410,15 @@ const ei = (u) => String.fromCodePoint(...u), ti = function(u) {
|
|
|
3410
3410
|
for (let f = 1, d = ou; ; d += ou) {
|
|
3411
3411
|
c >= t && pu("invalid-input");
|
|
3412
3412
|
const m = ti(u.charCodeAt(c++));
|
|
3413
|
-
m >= ou && pu("invalid-input"), m > cu((
|
|
3414
|
-
const p = d <= o ? x0 : d >= o +
|
|
3413
|
+
m >= ou && pu("invalid-input"), m > cu((Bu - n) / f) && pu("overflow"), n += m * f;
|
|
3414
|
+
const p = d <= o ? x0 : d >= o + te ? te : d - o;
|
|
3415
3415
|
if (m < p)
|
|
3416
3416
|
break;
|
|
3417
3417
|
const h = ou - p;
|
|
3418
|
-
f > cu(
|
|
3418
|
+
f > cu(Bu / h) && pu("overflow"), f *= h;
|
|
3419
3419
|
}
|
|
3420
3420
|
const s = e.length + 1;
|
|
3421
|
-
o = Jt(n - a, s, a == 0), cu(n / s) >
|
|
3421
|
+
o = Jt(n - a, s, a == 0), cu(n / s) > Bu - r && pu("overflow"), r += cu(n / s), n %= s, e.splice(n++, 0, r);
|
|
3422
3422
|
}
|
|
3423
3423
|
return String.fromCodePoint(...e);
|
|
3424
3424
|
}, Kt = function(u) {
|
|
@@ -3427,28 +3427,28 @@ const ei = (u) => String.fromCodePoint(...u), ti = function(u) {
|
|
|
3427
3427
|
const t = u.length;
|
|
3428
3428
|
let n = Zt, r = 0, o = Wt;
|
|
3429
3429
|
for (const a of u)
|
|
3430
|
-
a < 128 && e.push(
|
|
3430
|
+
a < 128 && e.push(e0(a));
|
|
3431
3431
|
const i = e.length;
|
|
3432
3432
|
let c = i;
|
|
3433
3433
|
for (i && e.push(Vt); c < t; ) {
|
|
3434
|
-
let a =
|
|
3434
|
+
let a = Bu;
|
|
3435
3435
|
for (const f of u)
|
|
3436
3436
|
f >= n && f < a && (a = f);
|
|
3437
3437
|
const s = c + 1;
|
|
3438
|
-
a - n > cu((
|
|
3438
|
+
a - n > cu((Bu - r) / s) && pu("overflow"), r += (a - n) * s, n = a;
|
|
3439
3439
|
for (const f of u)
|
|
3440
|
-
if (f < n && ++r >
|
|
3440
|
+
if (f < n && ++r > Bu && pu("overflow"), f === n) {
|
|
3441
3441
|
let d = r;
|
|
3442
3442
|
for (let m = ou; ; m += ou) {
|
|
3443
|
-
const p = m <= o ? x0 : m >= o +
|
|
3443
|
+
const p = m <= o ? x0 : m >= o + te ? te : m - o;
|
|
3444
3444
|
if (d < p)
|
|
3445
3445
|
break;
|
|
3446
3446
|
const h = d - p, C = ou - p;
|
|
3447
3447
|
e.push(
|
|
3448
|
-
|
|
3448
|
+
e0(Et(p + h % C, 0))
|
|
3449
3449
|
), d = cu(h / C);
|
|
3450
3450
|
}
|
|
3451
|
-
e.push(
|
|
3451
|
+
e.push(e0(Et(d, 0))), o = Jt(r, s, c === i), r = 0, ++c;
|
|
3452
3452
|
}
|
|
3453
3453
|
++r, ++n;
|
|
3454
3454
|
}
|
|
@@ -3665,7 +3665,7 @@ function di(u) {
|
|
|
3665
3665
|
e.hostname = un.toASCII(e.hostname);
|
|
3666
3666
|
} catch {
|
|
3667
3667
|
}
|
|
3668
|
-
return
|
|
3668
|
+
return ce(f0(e));
|
|
3669
3669
|
}
|
|
3670
3670
|
function hi(u) {
|
|
3671
3671
|
const e = d0(u, !0);
|
|
@@ -3674,15 +3674,15 @@ function hi(u) {
|
|
|
3674
3674
|
e.hostname = un.toUnicode(e.hostname);
|
|
3675
3675
|
} catch {
|
|
3676
3676
|
}
|
|
3677
|
-
return
|
|
3677
|
+
return Pu(f0(e), Pu.defaultChars + "%");
|
|
3678
3678
|
}
|
|
3679
3679
|
function K(u, e) {
|
|
3680
3680
|
if (!(this instanceof K))
|
|
3681
3681
|
return new K(u, e);
|
|
3682
|
-
e || p0(u) || (e = u || {}, u = "default"), this.inline = new
|
|
3682
|
+
e || p0(u) || (e = u || {}, u = "default"), this.inline = new ae(), this.block = new we(), this.core = new m0(), this.renderer = new qu(), this.linkify = new J(), this.validateLink = fi, this.normalizeLink = di, this.normalizeLinkText = hi, this.utils = bo, this.helpers = Te({}, go), this.options = {}, this.configure(u), e && this.set(e);
|
|
3683
3683
|
}
|
|
3684
3684
|
K.prototype.set = function(u) {
|
|
3685
|
-
return
|
|
3685
|
+
return Te(this.options, u), this;
|
|
3686
3686
|
};
|
|
3687
3687
|
K.prototype.configure = function(u) {
|
|
3688
3688
|
const e = this;
|
|
@@ -3741,7 +3741,7 @@ K.prototype.parseInline = function(u, e) {
|
|
|
3741
3741
|
K.prototype.renderInline = function(u, e) {
|
|
3742
3742
|
return e = e || {}, this.renderer.render(this.parseInline(u, e), this.options, e);
|
|
3743
3743
|
};
|
|
3744
|
-
class
|
|
3744
|
+
class Ii extends s0 {
|
|
3745
3745
|
constructor(t = {}) {
|
|
3746
3746
|
super();
|
|
3747
3747
|
Lu(this, "mdConfig");
|
|
@@ -3769,18 +3769,21 @@ const pi = {
|
|
|
3769
3769
|
key: 0,
|
|
3770
3770
|
class: /* @__PURE__ */ Au(["tr-bubble__avatar"])
|
|
3771
3771
|
}, bi = {
|
|
3772
|
+
key: 2,
|
|
3773
|
+
class: "tr-bubble__content-wrapper"
|
|
3774
|
+
}, mi = {
|
|
3772
3775
|
key: 0,
|
|
3773
3776
|
class: "tr-bubble__content-items"
|
|
3774
|
-
},
|
|
3777
|
+
}, _i = {
|
|
3775
3778
|
key: 1,
|
|
3776
3779
|
class: "tr-bubble__body-text"
|
|
3777
|
-
},
|
|
3780
|
+
}, xi = {
|
|
3778
3781
|
key: 2,
|
|
3779
3782
|
class: "tr-bubble__aborted"
|
|
3780
|
-
},
|
|
3783
|
+
}, gi = {
|
|
3781
3784
|
key: 3,
|
|
3782
3785
|
class: "tr-bubble__footer"
|
|
3783
|
-
},
|
|
3786
|
+
}, ki = /* @__PURE__ */ yu({
|
|
3784
3787
|
__name: "Bubble",
|
|
3785
3788
|
props: {
|
|
3786
3789
|
content: { default: "" },
|
|
@@ -3808,7 +3811,7 @@ const pi = {
|
|
|
3808
3811
|
}), 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 ? {
|
|
3809
3812
|
"--max-width": Fn(e.maxWidth)
|
|
3810
3813
|
} : {});
|
|
3811
|
-
return (d, m) => (S(),
|
|
3814
|
+
return (d, m) => (S(), H("div", {
|
|
3812
3815
|
class: Au([
|
|
3813
3816
|
"tr-bubble",
|
|
3814
3817
|
{
|
|
@@ -3818,47 +3821,49 @@ const pi = {
|
|
|
3818
3821
|
]),
|
|
3819
3822
|
style: En(f.value)
|
|
3820
3823
|
}, [
|
|
3821
|
-
e.avatar ? (S(),
|
|
3824
|
+
e.avatar ? (S(), H("div", pi, [
|
|
3822
3825
|
(S(), eu(_u(e.avatar)))
|
|
3823
|
-
])) :
|
|
3824
|
-
e.loading ?
|
|
3826
|
+
])) : Nu("", !0),
|
|
3827
|
+
e.loading ? Ju(d.$slots, "loading", {
|
|
3825
3828
|
key: 1,
|
|
3826
3829
|
bubbleProps: e
|
|
3827
3830
|
}, () => [
|
|
3828
|
-
|
|
3831
|
+
Z("div", {
|
|
3829
3832
|
class: Au(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
|
3830
3833
|
}, [...m[0] || (m[0] = [
|
|
3831
|
-
|
|
3834
|
+
Z("img", {
|
|
3832
3835
|
src: yn,
|
|
3833
3836
|
alt: "loading",
|
|
3834
3837
|
class: "tr-bubble__loading"
|
|
3835
3838
|
}, null, -1)
|
|
3836
3839
|
])], 2)
|
|
3837
|
-
], !0) : (S(),
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3840
|
+
], !0) : (S(), H("div", bi, [
|
|
3841
|
+
Z("div", {
|
|
3842
|
+
class: Au(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
|
3843
|
+
}, [
|
|
3844
|
+
a.value.length ? (S(), H("div", mi, [
|
|
3845
|
+
(S(!0), H(Ce, null, ke(a.value, (p, h) => (S(), eu(a0(or), {
|
|
3846
|
+
key: h,
|
|
3847
|
+
item: p
|
|
3848
|
+
}, null, 8, ["item"]))), 128))
|
|
3849
|
+
])) : Ju(d.$slots, "default", {
|
|
3850
|
+
key: 1,
|
|
3851
|
+
bubbleProps: e
|
|
3852
|
+
}, () => [
|
|
3853
|
+
n.value ? (S(), H(Ce, { key: 0 }, [
|
|
3854
|
+
n.value.isComponent ? (S(), eu(_u(n.value.vNodeOrComponent), Ae(Qu({ key: 0 }, e)), null, 16)) : (S(), eu(_u(n.value.vNodeOrComponent), { key: 1 }))
|
|
3855
|
+
], 64)) : (S(), H("span", _i, Cu(c.value), 1))
|
|
3856
|
+
], !0),
|
|
3857
|
+
e.aborted ? (S(), H("span", xi, Cu(e.abortedText), 1)) : Nu("", !0),
|
|
3858
|
+
t.footer ? (S(), H("div", gi, [
|
|
3859
|
+
Ju(d.$slots, "footer", { bubbleProps: e }, void 0, !0)
|
|
3860
|
+
])) : Nu("", !0)
|
|
3861
|
+
], 2),
|
|
3862
|
+
Ju(d.$slots, "trailer", { bubbleProps: e }, void 0, !0)
|
|
3863
|
+
]))
|
|
3859
3864
|
], 6));
|
|
3860
3865
|
}
|
|
3861
|
-
}), Du = /* @__PURE__ */
|
|
3866
|
+
}), Du = /* @__PURE__ */ oe(ki, [["__scopeId", "data-v-cd2deda0"]]), Ei = /* @__PURE__ */ yu({
|
|
3862
3867
|
__name: "BubbleList",
|
|
3863
3868
|
props: {
|
|
3864
3869
|
items: {},
|
|
@@ -3902,50 +3907,54 @@ const pi = {
|
|
|
3902
3907
|
},
|
|
3903
3908
|
{ deep: !0 }
|
|
3904
3909
|
);
|
|
3905
|
-
const i = X(() => e.items.map((a) => {
|
|
3906
|
-
var
|
|
3907
|
-
const
|
|
3908
|
-
if (s.hidden)
|
|
3909
|
-
return null;
|
|
3910
|
-
const { slots: f, hidden: d, ...m } = s, { slots: p, ...h } = a;
|
|
3910
|
+
const i = X(() => e.items.map((a, s) => {
|
|
3911
|
+
var D;
|
|
3912
|
+
const f = a.role ? ((D = e.roles) == null ? void 0 : D[a.role]) || {} : {}, { slots: d, hidden: m, ...p } = f, { slots: h, ...C } = a;
|
|
3911
3913
|
return {
|
|
3912
3914
|
id: a.id,
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
+
index: s,
|
|
3916
|
+
hidden: !!m,
|
|
3917
|
+
props: { ...p, ...C, "data-role": a.role },
|
|
3918
|
+
slots: { ...d, ...h }
|
|
3915
3919
|
};
|
|
3916
|
-
})
|
|
3920
|
+
})), c = X(() => {
|
|
3917
3921
|
var f;
|
|
3918
3922
|
if (!(e.loading && e.loadingRole && ((f = e.roles) != null && f[e.loadingRole])))
|
|
3919
3923
|
return null;
|
|
3920
3924
|
const { slots: a, ...s } = e.roles[e.loadingRole];
|
|
3921
3925
|
return { props: { ...s, loading: !0 }, slots: a };
|
|
3922
3926
|
});
|
|
3923
|
-
return (a, s) => (S(),
|
|
3927
|
+
return (a, s) => (S(), H("div", {
|
|
3924
3928
|
class: "tr-bubble-list",
|
|
3925
3929
|
ref_key: "scrollContainerRef",
|
|
3926
3930
|
ref: t
|
|
3927
3931
|
}, [
|
|
3928
|
-
(S(!0),
|
|
3932
|
+
(S(!0), H(Ce, null, ke(i.value, (f, d) => (S(), H(Ce, {
|
|
3929
3933
|
key: f.id || d
|
|
3930
|
-
},
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3934
|
+
}, [
|
|
3935
|
+
f.hidden ? Nu("", !0) : (S(), eu(Du, Qu({
|
|
3936
|
+
key: 0,
|
|
3937
|
+
ref_for: !0
|
|
3938
|
+
}, f.props), W0({ _: 2 }, [
|
|
3939
|
+
ke(f.slots, (m, p) => ({
|
|
3940
|
+
name: p,
|
|
3941
|
+
fn: Z0((h) => [
|
|
3942
|
+
(S(), eu(_u(m), Qu({ ref_for: !0 }, { ...h, index: f.index }), null, 16))
|
|
3943
|
+
])
|
|
3944
|
+
}))
|
|
3945
|
+
]), 1040))
|
|
3946
|
+
], 64))), 128)),
|
|
3947
|
+
c.value ? (S(), eu(Du, Ae(Qu({ key: 0 }, c.value.props)), W0({ _: 2 }, [
|
|
3939
3948
|
ke(c.value.slots, (f, d) => ({
|
|
3940
3949
|
name: d,
|
|
3941
3950
|
fn: Z0((m) => [
|
|
3942
3951
|
(S(), eu(_u(f), Ae(Dn(m)), null, 16))
|
|
3943
3952
|
])
|
|
3944
3953
|
}))
|
|
3945
|
-
]), 1040)) :
|
|
3954
|
+
]), 1040)) : Nu("", !0)
|
|
3946
3955
|
], 512));
|
|
3947
3956
|
}
|
|
3948
|
-
}),
|
|
3957
|
+
}), ne = /* @__PURE__ */ oe(Ei, [["__scopeId", "data-v-4cbc6c09"]]), re = /* @__PURE__ */ yu({
|
|
3949
3958
|
__name: "BubbleProvider",
|
|
3950
3959
|
props: {
|
|
3951
3960
|
contentRenderers: { default: () => ({}) }
|
|
@@ -3956,31 +3965,31 @@ const pi = {
|
|
|
3956
3965
|
t.set(n, r);
|
|
3957
3966
|
for (const [n, r] of Object.entries(e.contentRenderers))
|
|
3958
3967
|
t.set(n, r);
|
|
3959
|
-
return V0(Dt, t), V0(yt, l0), (n, r) =>
|
|
3968
|
+
return V0(Dt, t), V0(yt, l0), (n, r) => Ju(n.$slots, "default");
|
|
3960
3969
|
}
|
|
3961
3970
|
});
|
|
3962
3971
|
Du.name = "TrBubble";
|
|
3963
|
-
const Ei = function(u) {
|
|
3964
|
-
u.component(Du.name, Du);
|
|
3965
|
-
};
|
|
3966
|
-
Du.install = Ei;
|
|
3967
|
-
const Ii = Du;
|
|
3968
|
-
te.name = "TrBubbleList";
|
|
3969
3972
|
const Ai = function(u) {
|
|
3970
|
-
u.component(
|
|
3973
|
+
u.component(Du.name, Du);
|
|
3971
3974
|
};
|
|
3972
|
-
|
|
3973
|
-
const Mi =
|
|
3974
|
-
ne.name = "
|
|
3975
|
+
Du.install = Ai;
|
|
3976
|
+
const Mi = Du;
|
|
3977
|
+
ne.name = "TrBubbleList";
|
|
3975
3978
|
const Ci = function(u) {
|
|
3976
3979
|
u.component(ne.name, ne);
|
|
3977
3980
|
};
|
|
3978
3981
|
ne.install = Ci;
|
|
3979
3982
|
const Li = ne;
|
|
3983
|
+
re.name = "TrBubbleProvider";
|
|
3984
|
+
const Di = function(u) {
|
|
3985
|
+
u.component(re.name, re);
|
|
3986
|
+
};
|
|
3987
|
+
re.install = Di;
|
|
3988
|
+
const Oi = re;
|
|
3980
3989
|
export {
|
|
3981
|
-
|
|
3990
|
+
Mi as Bubble,
|
|
3982
3991
|
s0 as BubbleContentClassRenderer,
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3992
|
+
Li as BubbleList,
|
|
3993
|
+
Ii as BubbleMarkdownContentRenderer,
|
|
3994
|
+
Oi as BubbleProvider
|
|
3986
3995
|
};
|