@opentiny/tiny-robot 0.3.0-alpha.36 → 0.3.0-alpha.37
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 +370 -374
- package/dist/index.d.ts +44 -5
- package/dist/sender/index.js +1068 -947
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/bubble/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var bn = (u, e, t) => e in u ?
|
|
1
|
+
var pn = Object.defineProperty;
|
|
2
|
+
var bn = (u, e, t) => e in u ? pn(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
|
|
3
3
|
var Ou = (u, e, t) => bn(u, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { defineComponent as yu, ref as s0, createElementBlock as H, openBlock as S, createElementVNode as Z, createVNode as Dt, toDisplayString as Cu, unref as l0, normalizeClass as Au, withDirectives as mn, vShow as _n, computed as X, useCssModule as xn, createCommentVNode as
|
|
4
|
+
import { defineComponent as yu, ref as s0, createElementBlock as H, openBlock as S, createElementVNode as Z, createVNode as Dt, toDisplayString as Cu, unref as l0, normalizeClass as Au, withDirectives as mn, vShow as _n, computed as X, useCssModule as xn, createCommentVNode as Bu, createBlock as eu, resolveDynamicComponent as _u, createTextVNode as gn, inject as W0, normalizeProps as Ce, mergeProps as Ku, h as Z0, useSlots as kn, useAttrs as En, normalizeStyle as An, renderSlot as Qu, Fragment as De, renderList as Ee, watch as Cn, nextTick as Dn, createSlots as V0, withCtx as Y0, guardReactiveProps as yn, provide as X0 } from "vue";
|
|
5
5
|
import { _ as Fn } from "../loading.js";
|
|
6
6
|
import { t as Tn } from "../utils.js";
|
|
7
7
|
import { IconArrowUp as Sn, IconPlugin as J0, IconArrowDown as wn, IconLoading as vn, IconError as Rn, IconCancelled as In } from "@opentiny/tiny-robot-svgs";
|
|
@@ -9,7 +9,7 @@ import { _ as ce } from "../_plugin-vue_export-helper.js";
|
|
|
9
9
|
import { u as Mn } from "../index3.js";
|
|
10
10
|
class f0 {
|
|
11
11
|
}
|
|
12
|
-
const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-text-title" }, Nn = { class: "tr-bubble__step-text-content-wrapper" },
|
|
12
|
+
const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-text-title" }, Nn = { class: "tr-bubble__step-text-content-wrapper" }, Bn = /* @__PURE__ */ yu({
|
|
13
13
|
__name: "collapsible-text",
|
|
14
14
|
props: {
|
|
15
15
|
title: {},
|
|
@@ -33,7 +33,7 @@ const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-tex
|
|
|
33
33
|
])
|
|
34
34
|
]));
|
|
35
35
|
}
|
|
36
|
-
}),
|
|
36
|
+
}), Pn = /* @__PURE__ */ ce(Bn, [["__scopeId", "data-v-c614ffd3"]]), zn = Pn, qn = { class: "tr-bubble__text" }, Un = /* @__PURE__ */ yu({
|
|
37
37
|
__name: "text",
|
|
38
38
|
props: {
|
|
39
39
|
content: {}
|
|
@@ -67,14 +67,14 @@ const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-tex
|
|
|
67
67
|
const s = e.formatPretty ? 2 : 0;
|
|
68
68
|
try {
|
|
69
69
|
typeof c == "string" ? a = JSON.stringify(JSON.parse(c), null, s) : a = JSON.stringify(c, null, s);
|
|
70
|
-
} catch (
|
|
71
|
-
console.warn(
|
|
70
|
+
} catch (f) {
|
|
71
|
+
console.warn(f);
|
|
72
72
|
}
|
|
73
73
|
return a = a.replace(
|
|
74
74
|
/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)/g,
|
|
75
|
-
(
|
|
76
|
-
let
|
|
77
|
-
return /^"/.test(
|
|
75
|
+
(f) => {
|
|
76
|
+
let d = "number";
|
|
77
|
+
return /^"/.test(f) ? d = /:$/.test(f) ? "key" : "string" : /true|false/.test(f) ? d = "boolean" : /null/.test(f) && (d = "null"), `<span class="${o[d]}">${f}</span>`;
|
|
78
78
|
}
|
|
79
79
|
), a;
|
|
80
80
|
};
|
|
@@ -102,7 +102,7 @@ const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-tex
|
|
|
102
102
|
class: "tr-bubble__step-tool-params-content",
|
|
103
103
|
innerHTML: i(e.content)
|
|
104
104
|
}, null, 8, Xn)
|
|
105
|
-
])) :
|
|
105
|
+
])) : Bu("", !0)
|
|
106
106
|
]));
|
|
107
107
|
}
|
|
108
108
|
}), Qn = "_key_1b448_2", Kn = "_number_1b448_6", ur = "_string_1b448_10", er = "_boolean_1b448_14", tr = {
|
|
@@ -125,13 +125,9 @@ const Ln = { class: "tr-bubble__step-text" }, On = { class: "tr-bubble__step-tex
|
|
|
125
125
|
setup(u) {
|
|
126
126
|
const e = W0(Ft, yt), t = W0(Tt, d0), 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 f0 ? { isComponent: !1, vNodeOrComponent: c.render(n.item) } :
|
|
129
|
-
isComponent: !0,
|
|
130
|
-
vNodeOrComponent: c.component,
|
|
131
|
-
defaultProps: c.defaultProps
|
|
132
|
-
} : { isComponent: !0, vNodeOrComponent: c };
|
|
128
|
+
return typeof c == "function" ? { isComponent: !1, vNodeOrComponent: c(n.item) } : c instanceof f0 ? { isComponent: !1, vNodeOrComponent: c.render(n.item) } : { isComponent: !0, vNodeOrComponent: c };
|
|
133
129
|
}, o = X(() => r(n.item.type));
|
|
134
|
-
return (i, c) => o.value.isComponent ? (S(), eu(_u(o.value.vNodeOrComponent), Ce(Ku({ key: 0 },
|
|
130
|
+
return (i, c) => o.value.isComponent ? (S(), eu(_u(o.value.vNodeOrComponent), Ce(Ku({ key: 0 }, n.item)), null, 16)) : (S(), eu(_u(o.value.vNodeOrComponent), { key: 1 }));
|
|
135
131
|
}
|
|
136
132
|
});
|
|
137
133
|
/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
|
|
@@ -166,7 +162,7 @@ o0 || (o0 = function(e) {
|
|
|
166
162
|
n[r - 1] = arguments[r];
|
|
167
163
|
return new e(...n);
|
|
168
164
|
});
|
|
169
|
-
const _e = G(Array.prototype.forEach), lr = G(Array.prototype.lastIndexOf), K0 = G(Array.prototype.pop), Zu = G(Array.prototype.push), fr = G(Array.prototype.splice), Ae = G(String.prototype.toLowerCase), je = G(String.prototype.toString), Ge = G(String.prototype.match), Vu = G(String.prototype.replace), dr = G(String.prototype.indexOf),
|
|
165
|
+
const _e = G(Array.prototype.forEach), lr = G(Array.prototype.lastIndexOf), K0 = G(Array.prototype.pop), Zu = G(Array.prototype.push), fr = G(Array.prototype.splice), Ae = G(String.prototype.toLowerCase), je = G(String.prototype.toString), Ge = G(String.prototype.match), Vu = G(String.prototype.replace), dr = G(String.prototype.indexOf), hr = G(String.prototype.trim), uu = G(Object.prototype.hasOwnProperty), $ = G(RegExp.prototype.test), Yu = pr(TypeError);
|
|
170
166
|
function G(u) {
|
|
171
167
|
return function(e) {
|
|
172
168
|
e instanceof RegExp && (e.lastIndex = 0);
|
|
@@ -175,7 +171,7 @@ function G(u) {
|
|
|
175
171
|
return r0(u, e, n);
|
|
176
172
|
};
|
|
177
173
|
}
|
|
178
|
-
function
|
|
174
|
+
function pr(u) {
|
|
179
175
|
return function() {
|
|
180
176
|
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
|
|
181
177
|
t[n] = arguments[n];
|
|
@@ -298,11 +294,11 @@ function Rt() {
|
|
|
298
294
|
Node: c,
|
|
299
295
|
Element: a,
|
|
300
296
|
NodeFilter: s,
|
|
301
|
-
NamedNodeMap:
|
|
302
|
-
HTMLFormElement:
|
|
297
|
+
NamedNodeMap: f = u.NamedNodeMap || u.MozNamedAttrMap,
|
|
298
|
+
HTMLFormElement: d,
|
|
303
299
|
DOMParser: m,
|
|
304
|
-
trustedTypes:
|
|
305
|
-
} = u,
|
|
300
|
+
trustedTypes: p
|
|
301
|
+
} = u, h = a.prototype, C = Xu(h, "cloneNode"), D = Xu(h, "remove"), T = Xu(h, "nextSibling"), E = Xu(h, "childNodes"), k = Xu(h, "parentNode");
|
|
306
302
|
if (typeof i == "function") {
|
|
307
303
|
const g = t.createElement("template");
|
|
308
304
|
g.content && g.content.ownerDocument && (t = g.content.ownerDocument);
|
|
@@ -322,7 +318,7 @@ function Rt() {
|
|
|
322
318
|
MUSTACHE_EXPR: Hu,
|
|
323
319
|
ERB_EXPR: $u,
|
|
324
320
|
TMPLIT_EXPR: Fu,
|
|
325
|
-
DATA_ATTR:
|
|
321
|
+
DATA_ATTR: hu,
|
|
326
322
|
ARIA_ATTR: Ie,
|
|
327
323
|
IS_SCRIPT_OR_DATA: nn,
|
|
328
324
|
ATTR_WHITESPACE: E0,
|
|
@@ -370,14 +366,14 @@ function Rt() {
|
|
|
370
366
|
}));
|
|
371
367
|
let y0 = !0, Le = !0, F0 = !1, T0 = !0, Su = !1, le = !0, ku = !1, Oe = !1, Ne = !1, wu = !1, fe = !1, de = !1, S0 = !0, w0 = !1;
|
|
372
368
|
const on = "user-content-";
|
|
373
|
-
let
|
|
369
|
+
let Be = !0, Gu = !1, vu = {}, Ru = null;
|
|
374
370
|
const v0 = 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"]);
|
|
375
371
|
let R0 = null;
|
|
376
372
|
const I0 = F({}, ["audio", "video", "img", "source", "image", "track"]);
|
|
377
|
-
let
|
|
378
|
-
const M0 = F({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]),
|
|
373
|
+
let Pe = null;
|
|
374
|
+
const M0 = F({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), he = "http://www.w3.org/1998/Math/MathML", pe = "http://www.w3.org/2000/svg", su = "http://www.w3.org/1999/xhtml";
|
|
379
375
|
let Iu = su, ze = !1, qe = null;
|
|
380
|
-
const cn = F({}, [
|
|
376
|
+
const cn = F({}, [he, pe, su], je);
|
|
381
377
|
let be = F({}, ["mi", "mo", "mn", "ms", "mtext"]), me = F({}, ["annotation-xml"]);
|
|
382
378
|
const an = F({}, ["title", "style", "font", "a", "script"]);
|
|
383
379
|
let Wu = null;
|
|
@@ -389,14 +385,14 @@ function Rt() {
|
|
|
389
385
|
let l = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
390
386
|
if (!(Mu && Mu === l)) {
|
|
391
387
|
if ((!l || typeof l != "object") && (l = {}), l = du(l), Wu = // eslint-disable-next-line unicorn/prefer-includes
|
|
392
|
-
sn.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? ln : l.PARSER_MEDIA_TYPE, N = Wu === "application/xhtml+xml" ? je : Ae, O = uu(l, "ALLOWED_TAGS") ? F({}, l.ALLOWED_TAGS, N) : C0, z = uu(l, "ALLOWED_ATTR") ? F({}, l.ALLOWED_ATTR, N) : D0, qe = uu(l, "ALLOWED_NAMESPACES") ? F({}, l.ALLOWED_NAMESPACES, je) : cn,
|
|
388
|
+
sn.indexOf(l.PARSER_MEDIA_TYPE) === -1 ? ln : l.PARSER_MEDIA_TYPE, N = Wu === "application/xhtml+xml" ? je : Ae, O = uu(l, "ALLOWED_TAGS") ? F({}, l.ALLOWED_TAGS, N) : C0, z = uu(l, "ALLOWED_ATTR") ? F({}, l.ALLOWED_ATTR, N) : D0, qe = uu(l, "ALLOWED_NAMESPACES") ? F({}, l.ALLOWED_NAMESPACES, je) : cn, Pe = uu(l, "ADD_URI_SAFE_ATTR") ? F(du(M0), l.ADD_URI_SAFE_ATTR, N) : M0, R0 = uu(l, "ADD_DATA_URI_TAGS") ? F(du(I0), l.ADD_DATA_URI_TAGS, N) : I0, Ru = uu(l, "FORBID_CONTENTS") ? F({}, l.FORBID_CONTENTS, N) : v0, ju = uu(l, "FORBID_TAGS") ? F({}, l.FORBID_TAGS, N) : du({}), Me = uu(l, "FORBID_ATTR") ? F({}, l.FORBID_ATTR, N) : du({}), vu = uu(l, "USE_PROFILES") ? l.USE_PROFILES : !1, y0 = l.ALLOW_ARIA_ATTR !== !1, Le = l.ALLOW_DATA_ATTR !== !1, F0 = l.ALLOW_UNKNOWN_PROTOCOLS || !1, T0 = l.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Su = l.SAFE_FOR_TEMPLATES || !1, le = l.SAFE_FOR_XML !== !1, ku = l.WHOLE_DOCUMENT || !1, wu = l.RETURN_DOM || !1, fe = l.RETURN_DOM_FRAGMENT || !1, de = l.RETURN_TRUSTED_TYPE || !1, Ne = l.FORCE_BODY || !1, S0 = l.SANITIZE_DOM !== !1, w0 = l.SANITIZE_NAMED_PROPS || !1, Be = l.KEEP_CONTENT !== !1, Gu = l.IN_PLACE || !1, A0 = l.ALLOWED_URI_REGEXP || wt, Iu = l.NAMESPACE || su, be = l.MATHML_TEXT_INTEGRATION_POINTS || be, me = l.HTML_INTEGRATION_POINTS || me, R = l.CUSTOM_ELEMENT_HANDLING || {}, l.CUSTOM_ELEMENT_HANDLING && L0(l.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (R.tagNameCheck = l.CUSTOM_ELEMENT_HANDLING.tagNameCheck), l.CUSTOM_ELEMENT_HANDLING && L0(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), Su && (Le = !1), fe && (wu = !0), vu && (O = F({}, et), z = [], vu.html === !0 && (F(O, ut), F(z, tt)), vu.svg === !0 && (F(O, We), F(z, Ye), F(z, xe)), vu.svgFilters === !0 && (F(O, Ze), F(z, Ye), F(z, xe)), vu.mathMl === !0 && (F(O, Ve), F(z, nt), F(z, xe))), l.ADD_TAGS && (typeof l.ADD_TAGS == "function" ? Tu.tagCheck = l.ADD_TAGS : (O === C0 && (O = du(O)), F(O, l.ADD_TAGS, N))), l.ADD_ATTR && (typeof l.ADD_ATTR == "function" ? Tu.attributeCheck = l.ADD_ATTR : (z === D0 && (z = du(z)), F(z, l.ADD_ATTR, N))), l.ADD_URI_SAFE_ATTR && F(Pe, l.ADD_URI_SAFE_ATTR, N), l.FORBID_CONTENTS && (Ru === v0 && (Ru = du(Ru)), F(Ru, l.FORBID_CONTENTS, N)), Be && (O["#text"] = !0), ku && F(O, ["html", "head", "body"]), O.table && (F(O, ["tbody"]), delete ju.tbody), l.TRUSTED_TYPES_POLICY) {
|
|
393
389
|
if (typeof l.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
394
390
|
throw Yu('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
395
391
|
if (typeof l.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
396
392
|
throw Yu('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
|
|
397
393
|
_ = l.TRUSTED_TYPES_POLICY, A = _.createHTML("");
|
|
398
394
|
} else
|
|
399
|
-
_ === void 0 && (_ = Tr(
|
|
395
|
+
_ === void 0 && (_ = Tr(p, r)), _ !== null && typeof A == "string" && (A = _.createHTML(""));
|
|
400
396
|
j && j(l), Mu = l;
|
|
401
397
|
}
|
|
402
398
|
}, O0 = F({}, [...We, ...Ze, ...mr]), N0 = F({}, [...Ve, ..._r]), dn = function(l) {
|
|
@@ -406,7 +402,7 @@ function Rt() {
|
|
|
406
402
|
tagName: "template"
|
|
407
403
|
});
|
|
408
404
|
const x = Ae(l.tagName), v = Ae(b.tagName);
|
|
409
|
-
return qe[l.namespaceURI] ? l.namespaceURI ===
|
|
405
|
+
return qe[l.namespaceURI] ? l.namespaceURI === pe ? b.namespaceURI === su ? x === "svg" : b.namespaceURI === he ? x === "svg" && (v === "annotation-xml" || be[v]) : !!O0[x] : l.namespaceURI === he ? b.namespaceURI === su ? x === "math" : b.namespaceURI === pe ? x === "math" && me[v] : !!N0[x] : l.namespaceURI === su ? b.namespaceURI === pe && !me[v] || b.namespaceURI === he && !be[v] ? !1 : !N0[x] && (an[x] || !O0[x]) : !!(Wu === "application/xhtml+xml" && qe[l.namespaceURI]) : !1;
|
|
410
406
|
}, ru = function(l) {
|
|
411
407
|
Zu(e.removed, {
|
|
412
408
|
element: l
|
|
@@ -439,7 +435,7 @@ function Rt() {
|
|
|
439
435
|
b.setAttribute(l, "");
|
|
440
436
|
} catch {
|
|
441
437
|
}
|
|
442
|
-
},
|
|
438
|
+
}, B0 = function(l) {
|
|
443
439
|
let b = null, x = null;
|
|
444
440
|
if (Ne)
|
|
445
441
|
l = "<remove></remove>" + l;
|
|
@@ -463,7 +459,7 @@ function Rt() {
|
|
|
463
459
|
}
|
|
464
460
|
const U = b.body || b.documentElement;
|
|
465
461
|
return l && x && U.insertBefore(t.createTextNode(x), U.childNodes[0] || null), Iu === su ? nu.call(b, ku ? "html" : "body")[0] : ku ? b.documentElement : U;
|
|
466
|
-
},
|
|
462
|
+
}, P0 = function(l) {
|
|
467
463
|
return M.call(
|
|
468
464
|
l.ownerDocument || l,
|
|
469
465
|
l,
|
|
@@ -472,7 +468,7 @@ function Rt() {
|
|
|
472
468
|
null
|
|
473
469
|
);
|
|
474
470
|
}, He = function(l) {
|
|
475
|
-
return l instanceof
|
|
471
|
+
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");
|
|
476
472
|
}, z0 = function(l) {
|
|
477
473
|
return typeof c == "function" && l instanceof c;
|
|
478
474
|
};
|
|
@@ -494,7 +490,7 @@ function Rt() {
|
|
|
494
490
|
if (!(Tu.tagCheck instanceof Function && Tu.tagCheck(x)) && (!O[x] || ju[x])) {
|
|
495
491
|
if (!ju[x] && H0(x) && (R.tagNameCheck instanceof RegExp && $(R.tagNameCheck, x) || R.tagNameCheck instanceof Function && R.tagNameCheck(x)))
|
|
496
492
|
return !1;
|
|
497
|
-
if (
|
|
493
|
+
if (Be && !Ru[x]) {
|
|
498
494
|
const v = k(l) || l.parentNode, U = E(l) || l.childNodes;
|
|
499
495
|
if (U && v) {
|
|
500
496
|
const I = U.length;
|
|
@@ -514,7 +510,7 @@ function Rt() {
|
|
|
514
510
|
}, U0 = function(l, b, x) {
|
|
515
511
|
if (S0 && (b === "id" || b === "name") && (x in t || x in fn))
|
|
516
512
|
return !1;
|
|
517
|
-
if (!(Le && !Me[b] && $(
|
|
513
|
+
if (!(Le && !Me[b] && $(hu, b))) {
|
|
518
514
|
if (!(y0 && $(Ie, b))) {
|
|
519
515
|
if (!(Tu.attributeCheck instanceof Function && Tu.attributeCheck(b, l))) {
|
|
520
516
|
if (!z[b] || Me[b]) {
|
|
@@ -526,7 +522,7 @@ function Rt() {
|
|
|
526
522
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
527
523
|
b === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && $(R.tagNameCheck, x) || R.tagNameCheck instanceof Function && R.tagNameCheck(x)))
|
|
528
524
|
) return !1;
|
|
529
|
-
} else if (!
|
|
525
|
+
} else if (!Pe[b]) {
|
|
530
526
|
if (!$(A0, Vu(x, E0, ""))) {
|
|
531
527
|
if (!((b === "src" || b === "xlink:href" || b === "href") && l !== "script" && dr(x, "data:") === 0 && R0[l])) {
|
|
532
528
|
if (!(F0 && !$(nn, Vu(x, E0, "")))) {
|
|
@@ -563,7 +559,7 @@ function Rt() {
|
|
|
563
559
|
namespaceURI: W,
|
|
564
560
|
value: fu
|
|
565
561
|
} = U, Lu = N(I), $e = fu;
|
|
566
|
-
let q = I === "value" ? $e :
|
|
562
|
+
let q = I === "value" ? $e : hr($e);
|
|
567
563
|
if (x.attrName = Lu, x.attrValue = q, x.keepAttr = !0, x.forceKeepAttr = void 0, lu(L.uponSanitizeAttribute, l, x), q = x.attrValue, w0 && (Lu === "id" || Lu === "name") && (Eu(I, l), q = on + q), le && $(/((--!?|])>)|<\/(style|title|textarea)/i, q)) {
|
|
568
564
|
Eu(I, l);
|
|
569
565
|
continue;
|
|
@@ -590,8 +586,8 @@ function Rt() {
|
|
|
590
586
|
Eu(I, l);
|
|
591
587
|
continue;
|
|
592
588
|
}
|
|
593
|
-
if (_ && typeof
|
|
594
|
-
switch (
|
|
589
|
+
if (_ && typeof p == "object" && typeof p.getAttributeType == "function" && !W)
|
|
590
|
+
switch (p.getAttributeType(j0, Lu)) {
|
|
595
591
|
case "TrustedHTML": {
|
|
596
592
|
q = _.createHTML(q);
|
|
597
593
|
break;
|
|
@@ -609,9 +605,9 @@ function Rt() {
|
|
|
609
605
|
}
|
|
610
606
|
}
|
|
611
607
|
lu(L.afterSanitizeAttributes, l, null);
|
|
612
|
-
},
|
|
608
|
+
}, hn = function g(l) {
|
|
613
609
|
let b = null;
|
|
614
|
-
const x =
|
|
610
|
+
const x = P0(l);
|
|
615
611
|
for (lu(L.beforeSanitizeShadowDOM, l, null); b = x.nextNode(); )
|
|
616
612
|
lu(L.uponSanitizeShadowNode, b, null), q0(b), $0(b), b.content instanceof o && g(b.content);
|
|
617
613
|
lu(L.afterSanitizeShadowDOM, l, null);
|
|
@@ -633,18 +629,18 @@ function Rt() {
|
|
|
633
629
|
throw Yu("root node is forbidden and cannot be sanitized in-place");
|
|
634
630
|
}
|
|
635
631
|
} else if (g instanceof c)
|
|
636
|
-
b =
|
|
632
|
+
b = B0("<!---->"), x = b.ownerDocument.importNode(g, !0), x.nodeType === Ju.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? b = x : b.appendChild(x);
|
|
637
633
|
else {
|
|
638
634
|
if (!wu && !Su && !ku && // eslint-disable-next-line unicorn/prefer-includes
|
|
639
635
|
g.indexOf("<") === -1)
|
|
640
636
|
return _ && de ? _.createHTML(g) : g;
|
|
641
|
-
if (b =
|
|
637
|
+
if (b = B0(g), !b)
|
|
642
638
|
return wu ? null : de ? A : "";
|
|
643
639
|
}
|
|
644
640
|
b && Ne && ru(b.firstChild);
|
|
645
|
-
const I =
|
|
641
|
+
const I = P0(Gu ? g : b);
|
|
646
642
|
for (; v = I.nextNode(); )
|
|
647
|
-
q0(v), $0(v), v.content instanceof o &&
|
|
643
|
+
q0(v), $0(v), v.content instanceof o && hn(v.content);
|
|
648
644
|
if (Gu)
|
|
649
645
|
return g;
|
|
650
646
|
if (wu) {
|
|
@@ -722,16 +718,16 @@ function zu(u, e) {
|
|
|
722
718
|
if ((c & 240) === 224 && o + 6 < i) {
|
|
723
719
|
const a = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16);
|
|
724
720
|
if ((a & 192) === 128 && (s & 192) === 128) {
|
|
725
|
-
const
|
|
726
|
-
|
|
721
|
+
const f = c << 12 & 61440 | a << 6 & 4032 | s & 63;
|
|
722
|
+
f < 2048 || f >= 55296 && f <= 57343 ? r += "���" : r += String.fromCharCode(f), o += 6;
|
|
727
723
|
continue;
|
|
728
724
|
}
|
|
729
725
|
}
|
|
730
726
|
if ((c & 248) === 240 && o + 9 < i) {
|
|
731
|
-
const a = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16),
|
|
732
|
-
if ((a & 192) === 128 && (s & 192) === 128 && (
|
|
733
|
-
let
|
|
734
|
-
|
|
727
|
+
const a = parseInt(n.slice(o + 4, o + 6), 16), s = parseInt(n.slice(o + 7, o + 9), 16), f = parseInt(n.slice(o + 10, o + 12), 16);
|
|
728
|
+
if ((a & 192) === 128 && (s & 192) === 128 && (f & 192) === 128) {
|
|
729
|
+
let d = c << 18 & 1835008 | a << 12 & 258048 | s << 6 & 4032 | f & 63;
|
|
730
|
+
d < 65536 || d > 1114111 ? r += "����" : (d -= 65536, r += String.fromCharCode(55296 + (d >> 10), 56320 + (d & 1023))), o += 9;
|
|
735
731
|
continue;
|
|
736
732
|
}
|
|
737
733
|
}
|
|
@@ -787,7 +783,7 @@ function ie(u, e, t) {
|
|
|
787
783
|
}
|
|
788
784
|
ie.defaultChars = ";/?:@&=+$,-_.!~*'()#";
|
|
789
785
|
ie.componentChars = "-_.!~*'()";
|
|
790
|
-
function
|
|
786
|
+
function h0(u) {
|
|
791
787
|
let e = "";
|
|
792
788
|
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;
|
|
793
789
|
}
|
|
@@ -795,7 +791,7 @@ function ye() {
|
|
|
795
791
|
this.protocol = null, this.slashes = null, this.auth = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.pathname = null;
|
|
796
792
|
}
|
|
797
793
|
const Rr = /^([a-z0-9.+-]+:)/i, Ir = /:[0-9]*$/, Mr = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, Lr = ["<", ">", '"', "`", " ", "\r", `
|
|
798
|
-
`, " "], Or = ["{", "}", "|", "\\", "^", "`"].concat(Lr), Nr = ["'"].concat(Or), at = ["%", "/", "?", ";", "#"].concat(Nr), st = ["/", "?", "#"],
|
|
794
|
+
`, " "], Or = ["{", "}", "|", "\\", "^", "`"].concat(Lr), Nr = ["'"].concat(Or), at = ["%", "/", "?", ";", "#"].concat(Nr), st = ["/", "?", "#"], Br = 255, lt = /^[+a-z0-9A-Z_-]{0,63}$/, Pr = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, ft = {
|
|
799
795
|
javascript: !0,
|
|
800
796
|
"javascript:": !0
|
|
801
797
|
}, dt = {
|
|
@@ -810,7 +806,7 @@ const Rr = /^([a-z0-9.+-]+:)/i, Ir = /:[0-9]*$/, Mr = /^(\/\/?(?!\/)[^\?\s]*)(\?
|
|
|
810
806
|
"gopher:": !0,
|
|
811
807
|
"file:": !0
|
|
812
808
|
};
|
|
813
|
-
function
|
|
809
|
+
function p0(u, e) {
|
|
814
810
|
if (u && u instanceof ye) return u;
|
|
815
811
|
const t = new ye();
|
|
816
812
|
return t.parse(u, e), t;
|
|
@@ -825,33 +821,33 @@ ye.prototype.parse = function(u, e) {
|
|
|
825
821
|
let i = Rr.exec(o);
|
|
826
822
|
if (i && (i = i[0], t = i.toLowerCase(), this.protocol = i, o = o.substr(i.length)), (e || i || o.match(/^\/\/[^@\/]+@[^@\/]+/)) && (r = o.substr(0, 2) === "//", r && !(i && ft[i]) && (o = o.substr(2), this.slashes = !0)), !ft[i] && (r || i && !dt[i])) {
|
|
827
823
|
let s = -1;
|
|
828
|
-
for (let
|
|
829
|
-
n = o.indexOf(st[
|
|
830
|
-
let
|
|
831
|
-
s === -1 ?
|
|
832
|
-
for (let
|
|
833
|
-
n = o.indexOf(at[
|
|
824
|
+
for (let h = 0; h < st.length; h++)
|
|
825
|
+
n = o.indexOf(st[h]), n !== -1 && (s === -1 || n < s) && (s = n);
|
|
826
|
+
let f, d;
|
|
827
|
+
s === -1 ? d = o.lastIndexOf("@") : d = o.lastIndexOf("@", s), d !== -1 && (f = o.slice(0, d), o = o.slice(d + 1), this.auth = f), s = -1;
|
|
828
|
+
for (let h = 0; h < at.length; h++)
|
|
829
|
+
n = o.indexOf(at[h]), n !== -1 && (s === -1 || n < s) && (s = n);
|
|
834
830
|
s === -1 && (s = o.length), o[s - 1] === ":" && s--;
|
|
835
831
|
const m = o.slice(0, s);
|
|
836
832
|
o = o.slice(s), this.parseHost(m), this.hostname = this.hostname || "";
|
|
837
|
-
const
|
|
838
|
-
if (!
|
|
839
|
-
const
|
|
840
|
-
for (let C = 0, D =
|
|
841
|
-
const T =
|
|
833
|
+
const p = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
834
|
+
if (!p) {
|
|
835
|
+
const h = this.hostname.split(/\./);
|
|
836
|
+
for (let C = 0, D = h.length; C < D; C++) {
|
|
837
|
+
const T = h[C];
|
|
842
838
|
if (T && !T.match(lt)) {
|
|
843
839
|
let E = "";
|
|
844
840
|
for (let k = 0, _ = T.length; k < _; k++)
|
|
845
841
|
T.charCodeAt(k) > 127 ? E += "x" : E += T[k];
|
|
846
842
|
if (!E.match(lt)) {
|
|
847
|
-
const k =
|
|
843
|
+
const k = h.slice(0, C), _ = h.slice(C + 1), A = T.match(Pr);
|
|
848
844
|
A && (k.push(A[1]), _.unshift(A[2])), _.length && (o = _.join(".") + o), this.hostname = k.join(".");
|
|
849
845
|
break;
|
|
850
846
|
}
|
|
851
847
|
}
|
|
852
848
|
}
|
|
853
849
|
}
|
|
854
|
-
this.hostname.length >
|
|
850
|
+
this.hostname.length > Br && (this.hostname = ""), p && (this.hostname = this.hostname.substr(1, this.hostname.length - 2));
|
|
855
851
|
}
|
|
856
852
|
const c = o.indexOf("#");
|
|
857
853
|
c !== -1 && (this.hash = o.substr(c), o = o.slice(0, c));
|
|
@@ -866,8 +862,8 @@ const zr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
866
862
|
__proto__: null,
|
|
867
863
|
decode: zu,
|
|
868
864
|
encode: ie,
|
|
869
|
-
format:
|
|
870
|
-
parse:
|
|
865
|
+
format: h0,
|
|
866
|
+
parse: p0
|
|
871
867
|
}, Symbol.toStringTag, { value: "Module" })), It = /[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Mt = /[\0-\x1F\x7F-\x9F]/, qr = /[\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]/, b0 = /[!-#%-\*,-\/:;\?@\[-\]_\{\}\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]/, Lt = /[\$\+<->\^`\|~\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]/, Ot = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/, Ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
872
868
|
__proto__: null,
|
|
873
869
|
Any: It,
|
|
@@ -925,42 +921,42 @@ function Wr(u) {
|
|
|
925
921
|
var e;
|
|
926
922
|
return u >= 55296 && u <= 57343 || u > 1114111 ? 65533 : (e = jr.get(u)) !== null && e !== void 0 ? e : u;
|
|
927
923
|
}
|
|
928
|
-
var
|
|
924
|
+
var P;
|
|
929
925
|
(function(u) {
|
|
930
926
|
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";
|
|
931
|
-
})(
|
|
927
|
+
})(P || (P = {}));
|
|
932
928
|
const Zr = 32;
|
|
933
929
|
var mu;
|
|
934
930
|
(function(u) {
|
|
935
931
|
u[u.VALUE_LENGTH = 49152] = "VALUE_LENGTH", u[u.BRANCH_LENGTH = 16256] = "BRANCH_LENGTH", u[u.JUMP_TABLE = 127] = "JUMP_TABLE";
|
|
936
932
|
})(mu || (mu = {}));
|
|
937
933
|
function c0(u) {
|
|
938
|
-
return u >=
|
|
934
|
+
return u >= P.ZERO && u <= P.NINE;
|
|
939
935
|
}
|
|
940
936
|
function Vr(u) {
|
|
941
|
-
return u >=
|
|
937
|
+
return u >= P.UPPER_A && u <= P.UPPER_F || u >= P.LOWER_A && u <= P.LOWER_F;
|
|
942
938
|
}
|
|
943
939
|
function Yr(u) {
|
|
944
|
-
return u >=
|
|
940
|
+
return u >= P.UPPER_A && u <= P.UPPER_Z || u >= P.LOWER_A && u <= P.LOWER_Z || c0(u);
|
|
945
941
|
}
|
|
946
942
|
function Xr(u) {
|
|
947
|
-
return u ===
|
|
943
|
+
return u === P.EQUALS || Yr(u);
|
|
948
944
|
}
|
|
949
|
-
var
|
|
945
|
+
var B;
|
|
950
946
|
(function(u) {
|
|
951
947
|
u[u.EntityStart = 0] = "EntityStart", u[u.NumericStart = 1] = "NumericStart", u[u.NumericDecimal = 2] = "NumericDecimal", u[u.NumericHex = 3] = "NumericHex", u[u.NamedEntity = 4] = "NamedEntity";
|
|
952
|
-
})(
|
|
948
|
+
})(B || (B = {}));
|
|
953
949
|
var bu;
|
|
954
950
|
(function(u) {
|
|
955
951
|
u[u.Legacy = 0] = "Legacy", u[u.Strict = 1] = "Strict", u[u.Attribute = 2] = "Attribute";
|
|
956
952
|
})(bu || (bu = {}));
|
|
957
953
|
class Jr {
|
|
958
954
|
constructor(e, t, n) {
|
|
959
|
-
this.decodeTree = e, this.emitCodePoint = t, this.errors = n, this.state =
|
|
955
|
+
this.decodeTree = e, this.emitCodePoint = t, this.errors = n, this.state = B.EntityStart, this.consumed = 1, this.result = 0, this.treeIndex = 0, this.excess = 1, this.decodeMode = bu.Strict;
|
|
960
956
|
}
|
|
961
957
|
/** Resets the instance to make it reusable. */
|
|
962
958
|
startEntity(e) {
|
|
963
|
-
this.decodeMode = e, this.state =
|
|
959
|
+
this.decodeMode = e, this.state = B.EntityStart, this.result = 0, this.treeIndex = 0, this.excess = 1, this.consumed = 1;
|
|
964
960
|
}
|
|
965
961
|
/**
|
|
966
962
|
* Write an entity to the decoder. This can be called multiple times with partial entities.
|
|
@@ -975,15 +971,15 @@ class Jr {
|
|
|
975
971
|
*/
|
|
976
972
|
write(e, t) {
|
|
977
973
|
switch (this.state) {
|
|
978
|
-
case
|
|
979
|
-
return e.charCodeAt(t) ===
|
|
980
|
-
case
|
|
974
|
+
case B.EntityStart:
|
|
975
|
+
return e.charCodeAt(t) === P.NUM ? (this.state = B.NumericStart, this.consumed += 1, this.stateNumericStart(e, t + 1)) : (this.state = B.NamedEntity, this.stateNamedEntity(e, t));
|
|
976
|
+
case B.NumericStart:
|
|
981
977
|
return this.stateNumericStart(e, t);
|
|
982
|
-
case
|
|
978
|
+
case B.NumericDecimal:
|
|
983
979
|
return this.stateNumericDecimal(e, t);
|
|
984
|
-
case
|
|
980
|
+
case B.NumericHex:
|
|
985
981
|
return this.stateNumericHex(e, t);
|
|
986
|
-
case
|
|
982
|
+
case B.NamedEntity:
|
|
987
983
|
return this.stateNamedEntity(e, t);
|
|
988
984
|
}
|
|
989
985
|
}
|
|
@@ -997,7 +993,7 @@ class Jr {
|
|
|
997
993
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
998
994
|
*/
|
|
999
995
|
stateNumericStart(e, t) {
|
|
1000
|
-
return t >= e.length ? -1 : (e.charCodeAt(t) | Zr) ===
|
|
996
|
+
return t >= e.length ? -1 : (e.charCodeAt(t) | Zr) === P.LOWER_X ? (this.state = B.NumericHex, this.consumed += 1, this.stateNumericHex(e, t + 1)) : (this.state = B.NumericDecimal, this.stateNumericDecimal(e, t));
|
|
1001
997
|
}
|
|
1002
998
|
addToNumericResult(e, t, n, r) {
|
|
1003
999
|
if (t !== n) {
|
|
@@ -1062,11 +1058,11 @@ class Jr {
|
|
|
1062
1058
|
var n;
|
|
1063
1059
|
if (this.consumed <= t)
|
|
1064
1060
|
return (n = this.errors) === null || n === void 0 || n.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1065
|
-
if (e ===
|
|
1061
|
+
if (e === P.SEMI)
|
|
1066
1062
|
this.consumed += 1;
|
|
1067
1063
|
else if (this.decodeMode === bu.Strict)
|
|
1068
1064
|
return 0;
|
|
1069
|
-
return this.emitCodePoint(Wr(this.result), this.consumed), this.errors && (e !==
|
|
1065
|
+
return this.emitCodePoint(Wr(this.result), this.consumed), this.errors && (e !== P.SEMI && this.errors.missingSemicolonAfterCharacterReference(), this.errors.validateNumericCharacterReference(this.result)), this.consumed;
|
|
1070
1066
|
}
|
|
1071
1067
|
/**
|
|
1072
1068
|
* Parses a named entity.
|
|
@@ -1088,7 +1084,7 @@ class Jr {
|
|
|
1088
1084
|
(o === 0 || // And there should be no invalid characters.
|
|
1089
1085
|
Xr(i)) ? 0 : this.emitNotTerminatedNamedEntity();
|
|
1090
1086
|
if (r = n[this.treeIndex], o = (r & mu.VALUE_LENGTH) >> 14, o !== 0) {
|
|
1091
|
-
if (i ===
|
|
1087
|
+
if (i === P.SEMI)
|
|
1092
1088
|
return this.emitNamedEntityData(this.treeIndex, o, this.consumed + this.excess);
|
|
1093
1089
|
this.decodeMode !== bu.Strict && (this.result = this.treeIndex, this.consumed += this.excess, this.excess = 0);
|
|
1094
1090
|
}
|
|
@@ -1128,15 +1124,15 @@ class Jr {
|
|
|
1128
1124
|
end() {
|
|
1129
1125
|
var e;
|
|
1130
1126
|
switch (this.state) {
|
|
1131
|
-
case
|
|
1127
|
+
case B.NamedEntity:
|
|
1132
1128
|
return this.result !== 0 && (this.decodeMode !== bu.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;
|
|
1133
|
-
case
|
|
1129
|
+
case B.NumericDecimal:
|
|
1134
1130
|
return this.emitNumericEntity(0, 2);
|
|
1135
|
-
case
|
|
1131
|
+
case B.NumericHex:
|
|
1136
1132
|
return this.emitNumericEntity(0, 3);
|
|
1137
|
-
case
|
|
1133
|
+
case B.NumericStart:
|
|
1138
1134
|
return (e = this.errors) === null || e === void 0 || e.absenceOfDigitsInNumericCharacterReference(this.consumed), 0;
|
|
1139
|
-
case
|
|
1135
|
+
case B.EntityStart:
|
|
1140
1136
|
return 0;
|
|
1141
1137
|
}
|
|
1142
1138
|
}
|
|
@@ -1185,7 +1181,7 @@ function Qr(u, e, t, n) {
|
|
|
1185
1181
|
}
|
|
1186
1182
|
const Kr = Nt(Hr);
|
|
1187
1183
|
Nt($r);
|
|
1188
|
-
function
|
|
1184
|
+
function Bt(u, e = bu.Legacy) {
|
|
1189
1185
|
return Kr(u, e);
|
|
1190
1186
|
}
|
|
1191
1187
|
function uo(u) {
|
|
@@ -1209,7 +1205,7 @@ function Se(u) {
|
|
|
1209
1205
|
}
|
|
1210
1206
|
}), u;
|
|
1211
1207
|
}
|
|
1212
|
-
function
|
|
1208
|
+
function Pt(u, e, t) {
|
|
1213
1209
|
return [].concat(u.slice(0, e), t, u.slice(e + 1));
|
|
1214
1210
|
}
|
|
1215
1211
|
function _0(u) {
|
|
@@ -1229,7 +1225,7 @@ function co(u, e) {
|
|
|
1229
1225
|
const n = e[1].toLowerCase() === "x" ? parseInt(e.slice(2), 16) : parseInt(e.slice(1), 10);
|
|
1230
1226
|
return _0(n) ? Fe(n) : u;
|
|
1231
1227
|
}
|
|
1232
|
-
const t =
|
|
1228
|
+
const t = Bt(u);
|
|
1233
1229
|
return t !== u ? t : u;
|
|
1234
1230
|
}
|
|
1235
1231
|
function io(u) {
|
|
@@ -1252,9 +1248,9 @@ function fo(u) {
|
|
|
1252
1248
|
function xu(u) {
|
|
1253
1249
|
return ao.test(u) ? u.replace(so, fo) : u;
|
|
1254
1250
|
}
|
|
1255
|
-
const
|
|
1256
|
-
function
|
|
1257
|
-
return u.replace(
|
|
1251
|
+
const ho = /[.?*+^$[\]\\(){}|-]/g;
|
|
1252
|
+
function po(u) {
|
|
1253
|
+
return u.replace(ho, "\\$&");
|
|
1258
1254
|
}
|
|
1259
1255
|
function w(u) {
|
|
1260
1256
|
switch (u) {
|
|
@@ -1330,10 +1326,10 @@ function we(u) {
|
|
|
1330
1326
|
}
|
|
1331
1327
|
const bo = { mdurl: zr, ucmicro: Ur }, mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1332
1328
|
__proto__: null,
|
|
1333
|
-
arrayReplaceAt:
|
|
1329
|
+
arrayReplaceAt: Pt,
|
|
1334
1330
|
assign: Se,
|
|
1335
1331
|
escapeHtml: xu,
|
|
1336
|
-
escapeRE:
|
|
1332
|
+
escapeRE: po,
|
|
1337
1333
|
fromCodePoint: Fe,
|
|
1338
1334
|
has: to,
|
|
1339
1335
|
isMdAsciiPunct: te,
|
|
@@ -1457,18 +1453,18 @@ iu.fence = function(u, e, t, n, r) {
|
|
|
1457
1453
|
const o = u[e], i = o.info ? qu(o.info).trim() : "";
|
|
1458
1454
|
let c = "", a = "";
|
|
1459
1455
|
if (i) {
|
|
1460
|
-
const
|
|
1461
|
-
c =
|
|
1456
|
+
const f = i.split(/(\s+)/g);
|
|
1457
|
+
c = f[0], a = f.slice(2).join("");
|
|
1462
1458
|
}
|
|
1463
1459
|
let s;
|
|
1464
1460
|
if (t.highlight ? s = t.highlight(o.content, c, a) || xu(o.content) : s = xu(o.content), s.indexOf("<pre") === 0)
|
|
1465
1461
|
return s + `
|
|
1466
1462
|
`;
|
|
1467
1463
|
if (i) {
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1464
|
+
const f = o.attrIndex("class"), d = o.attrs ? o.attrs.slice() : [];
|
|
1465
|
+
f < 0 ? d.push(["class", t.langPrefix + c]) : (d[f] = d[f].slice(), d[f][1] += " " + t.langPrefix + c);
|
|
1470
1466
|
const m = {
|
|
1471
|
-
attrs:
|
|
1467
|
+
attrs: d
|
|
1472
1468
|
};
|
|
1473
1469
|
return `<pre><code${r.renderAttrs(m)}>${s}</code></pre>
|
|
1474
1470
|
`;
|
|
@@ -1730,32 +1726,32 @@ function So(u) {
|
|
|
1730
1726
|
if (c.type === "html_inline" && (Fo(c.content) && o > 0 && o--, To(c.content) && o++), !(o > 0) && c.type === "text" && u.md.linkify.test(c.content)) {
|
|
1731
1727
|
const a = c.content;
|
|
1732
1728
|
let s = u.md.linkify.match(a);
|
|
1733
|
-
const
|
|
1734
|
-
let
|
|
1729
|
+
const f = [];
|
|
1730
|
+
let d = c.level, m = 0;
|
|
1735
1731
|
s.length > 0 && s[0].index === 0 && i > 0 && r[i - 1].type === "text_special" && (s = s.slice(1));
|
|
1736
|
-
for (let
|
|
1737
|
-
const
|
|
1732
|
+
for (let p = 0; p < s.length; p++) {
|
|
1733
|
+
const h = s[p].url, C = u.md.normalizeLink(h);
|
|
1738
1734
|
if (!u.md.validateLink(C))
|
|
1739
1735
|
continue;
|
|
1740
|
-
let D = s[
|
|
1741
|
-
s[
|
|
1742
|
-
const T = s[
|
|
1736
|
+
let D = s[p].text;
|
|
1737
|
+
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:\/\//, "");
|
|
1738
|
+
const T = s[p].index;
|
|
1743
1739
|
if (T > m) {
|
|
1744
1740
|
const A = new u.Token("text", "", 0);
|
|
1745
|
-
A.content = a.slice(m, T), A.level =
|
|
1741
|
+
A.content = a.slice(m, T), A.level = d, f.push(A);
|
|
1746
1742
|
}
|
|
1747
1743
|
const E = new u.Token("link_open", "a", 1);
|
|
1748
|
-
E.attrs = [["href", C]], E.level =
|
|
1744
|
+
E.attrs = [["href", C]], E.level = d++, E.markup = "linkify", E.info = "auto", f.push(E);
|
|
1749
1745
|
const k = new u.Token("text", "", 0);
|
|
1750
|
-
k.content = D, k.level =
|
|
1746
|
+
k.content = D, k.level = d, f.push(k);
|
|
1751
1747
|
const _ = new u.Token("link_close", "a", -1);
|
|
1752
|
-
_.level = --
|
|
1748
|
+
_.level = --d, _.markup = "linkify", _.info = "auto", f.push(_), m = s[p].lastIndex;
|
|
1753
1749
|
}
|
|
1754
1750
|
if (m < a.length) {
|
|
1755
|
-
const
|
|
1756
|
-
|
|
1751
|
+
const p = new u.Token("text", "", 0);
|
|
1752
|
+
p.content = a.slice(m), p.level = d, f.push(p);
|
|
1757
1753
|
}
|
|
1758
|
-
e[t].children = r =
|
|
1754
|
+
e[t].children = r = Pt(r, i, f);
|
|
1759
1755
|
}
|
|
1760
1756
|
}
|
|
1761
1757
|
}
|
|
@@ -1788,11 +1784,11 @@ function Oo(u) {
|
|
|
1788
1784
|
for (e = u.tokens.length - 1; e >= 0; e--)
|
|
1789
1785
|
u.tokens[e].type === "inline" && (wo.test(u.tokens[e].content) && Mo(u.tokens[e].children), Ut.test(u.tokens[e].content) && Lo(u.tokens[e].children));
|
|
1790
1786
|
}
|
|
1791
|
-
const No = /['"]/,
|
|
1787
|
+
const No = /['"]/, ht = /['"]/g, pt = "’";
|
|
1792
1788
|
function ge(u, e, t) {
|
|
1793
1789
|
return u.slice(0, e) + t + u.slice(e + 1);
|
|
1794
1790
|
}
|
|
1795
|
-
function
|
|
1791
|
+
function Bo(u, e) {
|
|
1796
1792
|
let t;
|
|
1797
1793
|
const n = [];
|
|
1798
1794
|
for (let r = 0; r < u.length; r++) {
|
|
@@ -1804,20 +1800,20 @@ function Po(u, e) {
|
|
|
1804
1800
|
let c = o.content, a = 0, s = c.length;
|
|
1805
1801
|
u:
|
|
1806
1802
|
for (; a < s; ) {
|
|
1807
|
-
|
|
1808
|
-
const
|
|
1809
|
-
if (!
|
|
1803
|
+
ht.lastIndex = a;
|
|
1804
|
+
const f = ht.exec(c);
|
|
1805
|
+
if (!f)
|
|
1810
1806
|
break;
|
|
1811
|
-
let
|
|
1812
|
-
a =
|
|
1813
|
-
const
|
|
1814
|
-
let
|
|
1815
|
-
if (
|
|
1816
|
-
|
|
1807
|
+
let d = !0, m = !0;
|
|
1808
|
+
a = f.index + 1;
|
|
1809
|
+
const p = f[0] === "'";
|
|
1810
|
+
let h = 32;
|
|
1811
|
+
if (f.index - 1 >= 0)
|
|
1812
|
+
h = c.charCodeAt(f.index - 1);
|
|
1817
1813
|
else
|
|
1818
1814
|
for (t = r - 1; t >= 0 && !(u[t].type === "softbreak" || u[t].type === "hardbreak"); t--)
|
|
1819
1815
|
if (u[t].content) {
|
|
1820
|
-
|
|
1816
|
+
h = u[t].content.charCodeAt(u[t].content.length - 1);
|
|
1821
1817
|
break;
|
|
1822
1818
|
}
|
|
1823
1819
|
let C = 32;
|
|
@@ -1829,9 +1825,9 @@ function Po(u, e) {
|
|
|
1829
1825
|
C = u[t].content.charCodeAt(0);
|
|
1830
1826
|
break;
|
|
1831
1827
|
}
|
|
1832
|
-
const D = te(
|
|
1833
|
-
if (k ?
|
|
1834
|
-
|
|
1828
|
+
const D = te(h) || ee(String.fromCharCode(h)), T = te(C) || ee(String.fromCharCode(C)), E = ue(h), k = ue(C);
|
|
1829
|
+
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) {
|
|
1830
|
+
p && (o.content = ge(o.content, f.index, pt));
|
|
1835
1831
|
continue;
|
|
1836
1832
|
}
|
|
1837
1833
|
if (m)
|
|
@@ -1839,10 +1835,10 @@ function Po(u, e) {
|
|
|
1839
1835
|
let _ = n[t];
|
|
1840
1836
|
if (n[t].level < i)
|
|
1841
1837
|
break;
|
|
1842
|
-
if (_.single ===
|
|
1838
|
+
if (_.single === p && n[t].level === i) {
|
|
1843
1839
|
_ = n[t];
|
|
1844
1840
|
let A, y;
|
|
1845
|
-
|
|
1841
|
+
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 = ge(o.content, f.index, y), u[_.token].content = ge(
|
|
1846
1842
|
u[_.token].content,
|
|
1847
1843
|
_.pos,
|
|
1848
1844
|
A
|
|
@@ -1850,19 +1846,19 @@ function Po(u, e) {
|
|
|
1850
1846
|
continue u;
|
|
1851
1847
|
}
|
|
1852
1848
|
}
|
|
1853
|
-
|
|
1849
|
+
d ? n.push({
|
|
1854
1850
|
token: r,
|
|
1855
|
-
pos:
|
|
1856
|
-
single:
|
|
1851
|
+
pos: f.index,
|
|
1852
|
+
single: p,
|
|
1857
1853
|
level: i
|
|
1858
|
-
}) : m &&
|
|
1854
|
+
}) : m && p && (o.content = ge(o.content, f.index, pt));
|
|
1859
1855
|
}
|
|
1860
1856
|
}
|
|
1861
1857
|
}
|
|
1862
|
-
function
|
|
1858
|
+
function Po(u) {
|
|
1863
1859
|
if (u.md.options.typographer)
|
|
1864
1860
|
for (let e = u.tokens.length - 1; e >= 0; e--)
|
|
1865
|
-
u.tokens[e].type !== "inline" || !No.test(u.tokens[e].content) ||
|
|
1861
|
+
u.tokens[e].type !== "inline" || !No.test(u.tokens[e].content) || Bo(u.tokens[e].children, u);
|
|
1866
1862
|
}
|
|
1867
1863
|
function zo(u) {
|
|
1868
1864
|
let e, t;
|
|
@@ -1883,7 +1879,7 @@ const Je = [
|
|
|
1883
1879
|
["inline", yo],
|
|
1884
1880
|
["linkify", So],
|
|
1885
1881
|
["replacements", Oo],
|
|
1886
|
-
["smartquotes",
|
|
1882
|
+
["smartquotes", Po],
|
|
1887
1883
|
// `text_join` finds `text_special` tokens (for escape sequences)
|
|
1888
1884
|
// and joins them with the rest of the text
|
|
1889
1885
|
["text_join", zo]
|
|
@@ -1902,15 +1898,15 @@ x0.prototype.State = qt;
|
|
|
1902
1898
|
function au(u, e, t, n) {
|
|
1903
1899
|
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;
|
|
1904
1900
|
const r = this.src;
|
|
1905
|
-
for (let o = 0, i = 0, c = 0, a = 0, s = r.length,
|
|
1906
|
-
const
|
|
1907
|
-
if (!
|
|
1908
|
-
if (w(
|
|
1909
|
-
c++,
|
|
1901
|
+
for (let o = 0, i = 0, c = 0, a = 0, s = r.length, f = !1; i < s; i++) {
|
|
1902
|
+
const d = r.charCodeAt(i);
|
|
1903
|
+
if (!f)
|
|
1904
|
+
if (w(d)) {
|
|
1905
|
+
c++, d === 9 ? a += 4 - a % 4 : a++;
|
|
1910
1906
|
continue;
|
|
1911
1907
|
} else
|
|
1912
|
-
|
|
1913
|
-
(
|
|
1908
|
+
f = !0;
|
|
1909
|
+
(d === 10 || i === s - 1) && (d !== 10 && i++, this.bMarks.push(o), this.eMarks.push(i), this.tShift.push(c), this.sCount.push(a), this.bsCount.push(0), f = !1, c = 0, a = 0, o = i + 1);
|
|
1914
1910
|
}
|
|
1915
1911
|
this.bMarks.push(r.length), this.eMarks.push(r.length), this.tShift.push(0), this.sCount.push(0), this.bsCount.push(0), this.lineMax = this.bMarks.length - 1;
|
|
1916
1912
|
}
|
|
@@ -1962,18 +1958,18 @@ au.prototype.getLines = function(e, t, n, r) {
|
|
|
1962
1958
|
for (let i = 0, c = e; c < t; c++, i++) {
|
|
1963
1959
|
let a = 0;
|
|
1964
1960
|
const s = this.bMarks[c];
|
|
1965
|
-
let
|
|
1966
|
-
for (c + 1 < t || r ?
|
|
1967
|
-
const m = this.src.charCodeAt(
|
|
1961
|
+
let f = s, d;
|
|
1962
|
+
for (c + 1 < t || r ? d = this.eMarks[c] + 1 : d = this.eMarks[c]; f < d && a < n; ) {
|
|
1963
|
+
const m = this.src.charCodeAt(f);
|
|
1968
1964
|
if (w(m))
|
|
1969
1965
|
m === 9 ? a += 4 - (a + this.bsCount[c]) % 4 : a++;
|
|
1970
|
-
else if (
|
|
1966
|
+
else if (f - s < this.tShift[c])
|
|
1971
1967
|
a++;
|
|
1972
1968
|
else
|
|
1973
1969
|
break;
|
|
1974
|
-
|
|
1970
|
+
f++;
|
|
1975
1971
|
}
|
|
1976
|
-
a > n ? o[i] = new Array(a - n + 1).join(" ") + this.src.slice(
|
|
1972
|
+
a > n ? o[i] = new Array(a - n + 1).join(" ") + this.src.slice(f, d) : o[i] = this.src.slice(f, d);
|
|
1977
1973
|
}
|
|
1978
1974
|
return o.join("");
|
|
1979
1975
|
};
|
|
@@ -2012,7 +2008,7 @@ function Uo(u, e, t, n) {
|
|
|
2012
2008
|
o++;
|
|
2013
2009
|
}
|
|
2014
2010
|
let a = Qe(u, e + 1), s = a.split("|");
|
|
2015
|
-
const
|
|
2011
|
+
const f = [];
|
|
2016
2012
|
for (let _ = 0; _ < s.length; _++) {
|
|
2017
2013
|
const A = s[_].trim();
|
|
2018
2014
|
if (!A) {
|
|
@@ -2022,27 +2018,27 @@ function Uo(u, e, t, n) {
|
|
|
2022
2018
|
}
|
|
2023
2019
|
if (!/^:?-+:?$/.test(A))
|
|
2024
2020
|
return !1;
|
|
2025
|
-
A.charCodeAt(A.length - 1) === 58 ?
|
|
2021
|
+
A.charCodeAt(A.length - 1) === 58 ? f.push(A.charCodeAt(0) === 58 ? "center" : "right") : A.charCodeAt(0) === 58 ? f.push("left") : f.push("");
|
|
2026
2022
|
}
|
|
2027
2023
|
if (a = Qe(u, e).trim(), a.indexOf("|") === -1 || u.sCount[e] - u.blkIndent >= 4)
|
|
2028
2024
|
return !1;
|
|
2029
2025
|
s = bt(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop();
|
|
2030
|
-
const
|
|
2031
|
-
if (
|
|
2026
|
+
const d = s.length;
|
|
2027
|
+
if (d === 0 || d !== f.length)
|
|
2032
2028
|
return !1;
|
|
2033
2029
|
if (n)
|
|
2034
2030
|
return !0;
|
|
2035
2031
|
const m = u.parentType;
|
|
2036
2032
|
u.parentType = "table";
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2033
|
+
const p = u.md.block.ruler.getRules("blockquote"), h = u.push("table_open", "table", 1), C = [e, 0];
|
|
2034
|
+
h.map = C;
|
|
2039
2035
|
const D = u.push("thead_open", "thead", 1);
|
|
2040
2036
|
D.map = [e, e + 1];
|
|
2041
2037
|
const T = u.push("tr_open", "tr", 1);
|
|
2042
2038
|
T.map = [e, e + 1];
|
|
2043
2039
|
for (let _ = 0; _ < s.length; _++) {
|
|
2044
2040
|
const A = u.push("th_open", "th", 1);
|
|
2045
|
-
|
|
2041
|
+
f[_] && (A.attrs = [["style", "text-align:" + f[_]]]);
|
|
2046
2042
|
const y = u.push("inline", "", 0);
|
|
2047
2043
|
y.content = s[_].trim(), y.children = [], u.push("th_close", "th", -1);
|
|
2048
2044
|
}
|
|
@@ -2050,12 +2046,12 @@ function Uo(u, e, t, n) {
|
|
|
2050
2046
|
let E, k = 0;
|
|
2051
2047
|
for (r = e + 2; r < t && !(u.sCount[r] < u.blkIndent); r++) {
|
|
2052
2048
|
let _ = !1;
|
|
2053
|
-
for (let y = 0, M =
|
|
2054
|
-
if (
|
|
2049
|
+
for (let y = 0, M = p.length; y < M; y++)
|
|
2050
|
+
if (p[y](u, r, t, !0)) {
|
|
2055
2051
|
_ = !0;
|
|
2056
2052
|
break;
|
|
2057
2053
|
}
|
|
2058
|
-
if (_ || (a = Qe(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = bt(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), k +=
|
|
2054
|
+
if (_ || (a = Qe(u, r).trim(), !a) || u.sCount[r] - u.blkIndent >= 4 || (s = bt(a), s.length && s[0] === "" && s.shift(), s.length && s[s.length - 1] === "" && s.pop(), k += d - s.length, k > qo))
|
|
2059
2055
|
break;
|
|
2060
2056
|
if (r === e + 2) {
|
|
2061
2057
|
const y = u.push("tbody_open", "tbody", 1);
|
|
@@ -2063,9 +2059,9 @@ function Uo(u, e, t, n) {
|
|
|
2063
2059
|
}
|
|
2064
2060
|
const A = u.push("tr_open", "tr", 1);
|
|
2065
2061
|
A.map = [r, r + 1];
|
|
2066
|
-
for (let y = 0; y <
|
|
2062
|
+
for (let y = 0; y < d; y++) {
|
|
2067
2063
|
const M = u.push("td_open", "td", 1);
|
|
2068
|
-
|
|
2064
|
+
f[y] && (M.attrs = [["style", "text-align:" + f[y]]]);
|
|
2069
2065
|
const Y = u.push("inline", "", 0);
|
|
2070
2066
|
Y.content = s[y] ? s[y].trim() : "", Y.children = [], u.push("td_close", "td", -1);
|
|
2071
2067
|
}
|
|
@@ -2105,20 +2101,20 @@ function $o(u, e, t, n) {
|
|
|
2105
2101
|
let a = r - c;
|
|
2106
2102
|
if (a < 3)
|
|
2107
2103
|
return !1;
|
|
2108
|
-
const s = u.src.slice(c, r),
|
|
2109
|
-
if (i === 96 &&
|
|
2104
|
+
const s = u.src.slice(c, r), f = u.src.slice(r, o);
|
|
2105
|
+
if (i === 96 && f.indexOf(String.fromCharCode(i)) >= 0)
|
|
2110
2106
|
return !1;
|
|
2111
2107
|
if (n)
|
|
2112
2108
|
return !0;
|
|
2113
|
-
let
|
|
2114
|
-
for (;
|
|
2115
|
-
if (u.src.charCodeAt(r) === i && !(u.sCount[
|
|
2109
|
+
let d = e, m = !1;
|
|
2110
|
+
for (; d++, !(d >= t || (r = c = u.bMarks[d] + u.tShift[d], o = u.eMarks[d], r < o && u.sCount[d] < u.blkIndent)); )
|
|
2111
|
+
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)))) {
|
|
2116
2112
|
m = !0;
|
|
2117
2113
|
break;
|
|
2118
2114
|
}
|
|
2119
|
-
a = u.sCount[e], u.line =
|
|
2120
|
-
const
|
|
2121
|
-
return
|
|
2115
|
+
a = u.sCount[e], u.line = d + (m ? 1 : 0);
|
|
2116
|
+
const p = u.push("fence", "code", 0);
|
|
2117
|
+
return p.info = f, p.content = u.getLines(e + 1, d, a, !0), p.markup = s, p.map = [e, u.line], !0;
|
|
2122
2118
|
}
|
|
2123
2119
|
function jo(u, e, t, n) {
|
|
2124
2120
|
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e];
|
|
@@ -2127,52 +2123,52 @@ function jo(u, e, t, n) {
|
|
|
2127
2123
|
return !1;
|
|
2128
2124
|
if (n)
|
|
2129
2125
|
return !0;
|
|
2130
|
-
const c = [], a = [], s = [],
|
|
2126
|
+
const c = [], a = [], s = [], f = [], d = u.md.block.ruler.getRules("blockquote"), m = u.parentType;
|
|
2131
2127
|
u.parentType = "blockquote";
|
|
2132
|
-
let
|
|
2133
|
-
for (
|
|
2134
|
-
const k = u.sCount[
|
|
2135
|
-
if (r = u.bMarks[
|
|
2128
|
+
let p = !1, h;
|
|
2129
|
+
for (h = e; h < t; h++) {
|
|
2130
|
+
const k = u.sCount[h] < u.blkIndent;
|
|
2131
|
+
if (r = u.bMarks[h] + u.tShift[h], o = u.eMarks[h], r >= o)
|
|
2136
2132
|
break;
|
|
2137
2133
|
if (u.src.charCodeAt(r++) === 62 && !k) {
|
|
2138
|
-
let A = u.sCount[
|
|
2139
|
-
u.src.charCodeAt(r) === 32 ? (r++, A++, M = !1, y = !0) : u.src.charCodeAt(r) === 9 ? (y = !0, (u.bsCount[
|
|
2134
|
+
let A = u.sCount[h] + 1, y, M;
|
|
2135
|
+
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;
|
|
2140
2136
|
let Y = A;
|
|
2141
|
-
for (c.push(u.bMarks[
|
|
2137
|
+
for (c.push(u.bMarks[h]), u.bMarks[h] = r; r < o; ) {
|
|
2142
2138
|
const nu = u.src.charCodeAt(r);
|
|
2143
2139
|
if (w(nu))
|
|
2144
|
-
nu === 9 ? Y += 4 - (Y + u.bsCount[
|
|
2140
|
+
nu === 9 ? Y += 4 - (Y + u.bsCount[h] + (M ? 1 : 0)) % 4 : Y++;
|
|
2145
2141
|
else
|
|
2146
2142
|
break;
|
|
2147
2143
|
r++;
|
|
2148
2144
|
}
|
|
2149
|
-
|
|
2145
|
+
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];
|
|
2150
2146
|
continue;
|
|
2151
2147
|
}
|
|
2152
|
-
if (
|
|
2148
|
+
if (p)
|
|
2153
2149
|
break;
|
|
2154
2150
|
let _ = !1;
|
|
2155
|
-
for (let A = 0, y =
|
|
2156
|
-
if (
|
|
2151
|
+
for (let A = 0, y = d.length; A < y; A++)
|
|
2152
|
+
if (d[A](u, h, t, !0)) {
|
|
2157
2153
|
_ = !0;
|
|
2158
2154
|
break;
|
|
2159
2155
|
}
|
|
2160
2156
|
if (_) {
|
|
2161
|
-
u.lineMax =
|
|
2157
|
+
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);
|
|
2162
2158
|
break;
|
|
2163
2159
|
}
|
|
2164
|
-
c.push(u.bMarks[
|
|
2160
|
+
c.push(u.bMarks[h]), a.push(u.bsCount[h]), f.push(u.tShift[h]), s.push(u.sCount[h]), u.sCount[h] = -1;
|
|
2165
2161
|
}
|
|
2166
2162
|
const C = u.blkIndent;
|
|
2167
2163
|
u.blkIndent = 0;
|
|
2168
2164
|
const D = u.push("blockquote_open", "blockquote", 1);
|
|
2169
2165
|
D.markup = ">";
|
|
2170
2166
|
const T = [e, 0];
|
|
2171
|
-
D.map = T, u.md.block.tokenize(u, e,
|
|
2167
|
+
D.map = T, u.md.block.tokenize(u, e, h);
|
|
2172
2168
|
const E = u.push("blockquote_close", "blockquote", -1);
|
|
2173
2169
|
E.markup = ">", u.lineMax = i, u.parentType = m, T[1] = u.line;
|
|
2174
|
-
for (let k = 0; k <
|
|
2175
|
-
u.bMarks[k + e] = c[k], u.tShift[k + e] =
|
|
2170
|
+
for (let k = 0; k < f.length; k++)
|
|
2171
|
+
u.bMarks[k + e] = c[k], u.tShift[k + e] = f[k], u.sCount[k + e] = s[k], u.bsCount[k + e] = a[k];
|
|
2176
2172
|
return u.blkIndent = C, !0;
|
|
2177
2173
|
}
|
|
2178
2174
|
function Go(u, e, t, n) {
|
|
@@ -2242,34 +2238,34 @@ function Zo(u, e, t, n) {
|
|
|
2242
2238
|
let r, o, i, c, a = e, s = !0;
|
|
2243
2239
|
if (u.sCount[a] - u.blkIndent >= 4 || u.listIndent >= 0 && u.sCount[a] - u.listIndent >= 4 && u.sCount[a] < u.blkIndent)
|
|
2244
2240
|
return !1;
|
|
2245
|
-
let
|
|
2246
|
-
n && u.parentType === "paragraph" && u.sCount[a] >= u.blkIndent && (
|
|
2247
|
-
let
|
|
2248
|
-
if ((
|
|
2249
|
-
if (
|
|
2250
|
-
} else if ((
|
|
2251
|
-
|
|
2241
|
+
let f = !1;
|
|
2242
|
+
n && u.parentType === "paragraph" && u.sCount[a] >= u.blkIndent && (f = !0);
|
|
2243
|
+
let d, m, p;
|
|
2244
|
+
if ((p = _t(u, a)) >= 0) {
|
|
2245
|
+
if (d = !0, i = u.bMarks[a] + u.tShift[a], m = Number(u.src.slice(i, p - 1)), f && m !== 1) return !1;
|
|
2246
|
+
} else if ((p = mt(u, a)) >= 0)
|
|
2247
|
+
d = !1;
|
|
2252
2248
|
else
|
|
2253
2249
|
return !1;
|
|
2254
|
-
if (
|
|
2250
|
+
if (f && u.skipSpaces(p) >= u.eMarks[a])
|
|
2255
2251
|
return !1;
|
|
2256
2252
|
if (n)
|
|
2257
2253
|
return !0;
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2254
|
+
const h = u.src.charCodeAt(p - 1), C = u.tokens.length;
|
|
2255
|
+
d ? (c = u.push("ordered_list_open", "ol", 1), m !== 1 && (c.attrs = [["start", m]])) : c = u.push("bullet_list_open", "ul", 1);
|
|
2260
2256
|
const D = [a, 0];
|
|
2261
|
-
c.map = D, c.markup = String.fromCharCode(
|
|
2257
|
+
c.map = D, c.markup = String.fromCharCode(h);
|
|
2262
2258
|
let T = !1;
|
|
2263
2259
|
const E = u.md.block.ruler.getRules("list"), k = u.parentType;
|
|
2264
2260
|
for (u.parentType = "list"; a < t; ) {
|
|
2265
|
-
o =
|
|
2266
|
-
const _ = u.sCount[a] +
|
|
2261
|
+
o = p, r = u.eMarks[a];
|
|
2262
|
+
const _ = u.sCount[a] + p - (u.bMarks[a] + u.tShift[a]);
|
|
2267
2263
|
let A = _;
|
|
2268
2264
|
for (; o < r; ) {
|
|
2269
|
-
const
|
|
2270
|
-
if (
|
|
2265
|
+
const hu = u.src.charCodeAt(o);
|
|
2266
|
+
if (hu === 9)
|
|
2271
2267
|
A += 4 - (A + u.bsCount[a]) % 4;
|
|
2272
|
-
else if (
|
|
2268
|
+
else if (hu === 32)
|
|
2273
2269
|
A++;
|
|
2274
2270
|
else
|
|
2275
2271
|
break;
|
|
@@ -2279,30 +2275,30 @@ function Zo(u, e, t, n) {
|
|
|
2279
2275
|
let M;
|
|
2280
2276
|
y >= r ? M = 1 : M = A - _, M > 4 && (M = 1);
|
|
2281
2277
|
const Y = _ + M;
|
|
2282
|
-
c = u.push("list_item_open", "li", 1), c.markup = String.fromCharCode(
|
|
2278
|
+
c = u.push("list_item_open", "li", 1), c.markup = String.fromCharCode(h);
|
|
2283
2279
|
const nu = [a, 0];
|
|
2284
|
-
c.map = nu,
|
|
2280
|
+
c.map = nu, d && (c.info = u.src.slice(i, p - 1));
|
|
2285
2281
|
const gu = u.tight, L = u.tShift[a], Hu = u.sCount[a], $u = u.listIndent;
|
|
2286
|
-
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 = $u, u.tShift[a] = L, u.sCount[a] = Hu, u.tight = gu, c = u.push("list_item_close", "li", -1), c.markup = String.fromCharCode(
|
|
2282
|
+
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 = $u, u.tShift[a] = L, u.sCount[a] = Hu, 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)
|
|
2287
2283
|
break;
|
|
2288
2284
|
let Fu = !1;
|
|
2289
|
-
for (let
|
|
2290
|
-
if (E[
|
|
2285
|
+
for (let hu = 0, Ie = E.length; hu < Ie; hu++)
|
|
2286
|
+
if (E[hu](u, a, t, !0)) {
|
|
2291
2287
|
Fu = !0;
|
|
2292
2288
|
break;
|
|
2293
2289
|
}
|
|
2294
2290
|
if (Fu)
|
|
2295
2291
|
break;
|
|
2296
|
-
if (
|
|
2297
|
-
if (
|
|
2292
|
+
if (d) {
|
|
2293
|
+
if (p = _t(u, a), p < 0)
|
|
2298
2294
|
break;
|
|
2299
2295
|
i = u.bMarks[a] + u.tShift[a];
|
|
2300
|
-
} else if (
|
|
2296
|
+
} else if (p = mt(u, a), p < 0)
|
|
2301
2297
|
break;
|
|
2302
|
-
if (
|
|
2298
|
+
if (h !== u.src.charCodeAt(p - 1))
|
|
2303
2299
|
break;
|
|
2304
2300
|
}
|
|
2305
|
-
return
|
|
2301
|
+
return d ? c = u.push("ordered_list_close", "ol", -1) : c = u.push("bullet_list_close", "ul", -1), c.markup = String.fromCharCode(h), D[1] = a, u.line = a, u.parentType = k, s && Wo(u, C), !0;
|
|
2306
2302
|
}
|
|
2307
2303
|
function Vo(u, e, t, n) {
|
|
2308
2304
|
let r = u.bMarks[e] + u.tShift[e], o = u.eMarks[e], i = e + 1;
|
|
@@ -2355,14 +2351,14 @@ function Vo(u, e, t, n) {
|
|
|
2355
2351
|
k !== null && (a += k, o = a.length, i++);
|
|
2356
2352
|
} else if (!w(E)) break;
|
|
2357
2353
|
}
|
|
2358
|
-
const
|
|
2359
|
-
if (!
|
|
2354
|
+
const f = u.md.helpers.parseLinkDestination(a, r, o);
|
|
2355
|
+
if (!f.ok)
|
|
2360
2356
|
return !1;
|
|
2361
|
-
const
|
|
2362
|
-
if (!u.md.validateLink(
|
|
2357
|
+
const d = u.md.normalizeLink(f.str);
|
|
2358
|
+
if (!u.md.validateLink(d))
|
|
2363
2359
|
return !1;
|
|
2364
|
-
r =
|
|
2365
|
-
const m = r,
|
|
2360
|
+
r = f.pos;
|
|
2361
|
+
const m = r, p = i, h = r;
|
|
2366
2362
|
for (; r < o; r++) {
|
|
2367
2363
|
const E = a.charCodeAt(r);
|
|
2368
2364
|
if (E === 10) {
|
|
@@ -2377,14 +2373,14 @@ function Vo(u, e, t, n) {
|
|
|
2377
2373
|
a += E, r = o, o = a.length, i++, C = u.md.helpers.parseLinkTitle(a, r, o, C);
|
|
2378
2374
|
}
|
|
2379
2375
|
let D;
|
|
2380
|
-
for (r < o &&
|
|
2376
|
+
for (r < o && h !== r && C.ok ? (D = C.str, r = C.pos) : (D = "", r = m, i = p); r < o; ) {
|
|
2381
2377
|
const E = a.charCodeAt(r);
|
|
2382
2378
|
if (!w(E))
|
|
2383
2379
|
break;
|
|
2384
2380
|
r++;
|
|
2385
2381
|
}
|
|
2386
2382
|
if (r < o && a.charCodeAt(r) !== 10 && D)
|
|
2387
|
-
for (D = "", r = m, i =
|
|
2383
|
+
for (D = "", r = m, i = p; r < o; ) {
|
|
2388
2384
|
const E = a.charCodeAt(r);
|
|
2389
2385
|
if (!w(E))
|
|
2390
2386
|
break;
|
|
@@ -2393,7 +2389,7 @@ function Vo(u, e, t, n) {
|
|
|
2393
2389
|
if (r < o && a.charCodeAt(r) !== 10)
|
|
2394
2390
|
return !1;
|
|
2395
2391
|
const T = we(a.slice(1, s));
|
|
2396
|
-
return T ? (n || (typeof u.env.references > "u" && (u.env.references = {}), typeof u.env.references[T] > "u" && (u.env.references[T] = { title: D, href:
|
|
2392
|
+
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;
|
|
2397
2393
|
}
|
|
2398
2394
|
const Yo = [
|
|
2399
2395
|
"address",
|
|
@@ -2509,10 +2505,10 @@ function sc(u, e, t, n) {
|
|
|
2509
2505
|
a > r && w(u.src.charCodeAt(a - 1)) && (o = a), u.line = e + 1;
|
|
2510
2506
|
const s = u.push("heading_open", "h" + String(c), 1);
|
|
2511
2507
|
s.markup = "########".slice(0, c), s.map = [e, u.line];
|
|
2512
|
-
const
|
|
2513
|
-
|
|
2514
|
-
const
|
|
2515
|
-
return
|
|
2508
|
+
const f = u.push("inline", "", 0);
|
|
2509
|
+
f.content = u.src.slice(r, o).trim(), f.map = [e, u.line], f.children = [];
|
|
2510
|
+
const d = u.push("heading_close", "h" + String(c), -1);
|
|
2511
|
+
return d.markup = "########".slice(0, c), !0;
|
|
2516
2512
|
}
|
|
2517
2513
|
function lc(u, e, t) {
|
|
2518
2514
|
const n = u.md.block.ruler.getRules("paragraph");
|
|
@@ -2525,9 +2521,9 @@ function lc(u, e, t) {
|
|
|
2525
2521
|
if (u.sCount[c] - u.blkIndent > 3)
|
|
2526
2522
|
continue;
|
|
2527
2523
|
if (u.sCount[c] >= u.blkIndent) {
|
|
2528
|
-
let
|
|
2529
|
-
const
|
|
2530
|
-
if (
|
|
2524
|
+
let p = u.bMarks[c] + u.tShift[c];
|
|
2525
|
+
const h = u.eMarks[c];
|
|
2526
|
+
if (p < h && (i = u.src.charCodeAt(p), (i === 45 || i === 61) && (p = u.skipChars(p, i), p = u.skipSpaces(p), p >= h))) {
|
|
2531
2527
|
o = i === 61 ? 1 : 2;
|
|
2532
2528
|
break;
|
|
2533
2529
|
}
|
|
@@ -2535,8 +2531,8 @@ function lc(u, e, t) {
|
|
|
2535
2531
|
if (u.sCount[c] < 0)
|
|
2536
2532
|
continue;
|
|
2537
2533
|
let m = !1;
|
|
2538
|
-
for (let
|
|
2539
|
-
if (n[
|
|
2534
|
+
for (let p = 0, h = n.length; p < h; p++)
|
|
2535
|
+
if (n[p](u, c, t, !0)) {
|
|
2540
2536
|
m = !0;
|
|
2541
2537
|
break;
|
|
2542
2538
|
}
|
|
@@ -2549,10 +2545,10 @@ function lc(u, e, t) {
|
|
|
2549
2545
|
u.line = c + 1;
|
|
2550
2546
|
const s = u.push("heading_open", "h" + String(o), 1);
|
|
2551
2547
|
s.markup = String.fromCharCode(i), s.map = [e, u.line];
|
|
2552
|
-
const
|
|
2553
|
-
|
|
2554
|
-
const
|
|
2555
|
-
return
|
|
2548
|
+
const f = u.push("inline", "", 0);
|
|
2549
|
+
f.content = a, f.map = [e, u.line - 1], f.children = [];
|
|
2550
|
+
const d = u.push("heading_close", "h" + String(o), -1);
|
|
2551
|
+
return d.markup = String.fromCharCode(i), u.parentType = r, !0;
|
|
2556
2552
|
}
|
|
2557
2553
|
function fc(u, e, t) {
|
|
2558
2554
|
const n = u.md.block.ruler.getRules("paragraph"), r = u.parentType;
|
|
@@ -2561,8 +2557,8 @@ function fc(u, e, t) {
|
|
|
2561
2557
|
if (u.sCount[o] - u.blkIndent > 3 || u.sCount[o] < 0)
|
|
2562
2558
|
continue;
|
|
2563
2559
|
let s = !1;
|
|
2564
|
-
for (let
|
|
2565
|
-
if (n[
|
|
2560
|
+
for (let f = 0, d = n.length; f < d; f++)
|
|
2561
|
+
if (n[f](u, o, t, !0)) {
|
|
2566
2562
|
s = !0;
|
|
2567
2563
|
break;
|
|
2568
2564
|
}
|
|
@@ -2606,8 +2602,8 @@ ve.prototype.tokenize = function(u, e, t) {
|
|
|
2606
2602
|
}
|
|
2607
2603
|
const a = u.line;
|
|
2608
2604
|
let s = !1;
|
|
2609
|
-
for (let
|
|
2610
|
-
if (s = n[
|
|
2605
|
+
for (let f = 0; f < r; f++)
|
|
2606
|
+
if (s = n[f](u, i, t, !1), s) {
|
|
2611
2607
|
if (a >= u.line)
|
|
2612
2608
|
throw new Error("block rule didn't increment state.line");
|
|
2613
2609
|
break;
|
|
@@ -2641,8 +2637,8 @@ ae.prototype.scanDelims = function(u, e) {
|
|
|
2641
2637
|
let o = u;
|
|
2642
2638
|
for (; o < t && this.src.charCodeAt(o) === n; )
|
|
2643
2639
|
o++;
|
|
2644
|
-
const i = o - u, c = o < t ? this.src.charCodeAt(o) : 32, a = te(r) || ee(String.fromCharCode(r)), s = te(c) || ee(String.fromCharCode(c)),
|
|
2645
|
-
return { can_open: m && (e || !
|
|
2640
|
+
const i = o - u, c = o < t ? this.src.charCodeAt(o) : 32, a = te(r) || ee(String.fromCharCode(r)), s = te(c) || ee(String.fromCharCode(c)), f = ue(r), d = ue(c), m = !d && (!s || f || a), p = !f && (!a || d || s);
|
|
2641
|
+
return { can_open: m && (e || !p || a), can_close: p && (e || !m || s), length: i };
|
|
2646
2642
|
};
|
|
2647
2643
|
ae.prototype.Token = tu;
|
|
2648
2644
|
function dc(u) {
|
|
@@ -2675,18 +2671,18 @@ function dc(u) {
|
|
|
2675
2671
|
return !1;
|
|
2676
2672
|
}
|
|
2677
2673
|
}
|
|
2678
|
-
function
|
|
2674
|
+
function hc(u, e) {
|
|
2679
2675
|
let t = u.pos;
|
|
2680
2676
|
for (; t < u.posMax && !dc(u.src.charCodeAt(t)); )
|
|
2681
2677
|
t++;
|
|
2682
2678
|
return t === u.pos ? !1 : (e || (u.pending += u.src.slice(u.pos, t)), u.pos = t, !0);
|
|
2683
2679
|
}
|
|
2684
|
-
const
|
|
2680
|
+
const pc = /(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;
|
|
2685
2681
|
function bc(u, e) {
|
|
2686
2682
|
if (!u.md.options.linkify || u.linkLevel > 0) return !1;
|
|
2687
2683
|
const t = u.pos, n = u.posMax;
|
|
2688
2684
|
if (t + 3 > n || u.src.charCodeAt(t) !== 58 || u.src.charCodeAt(t + 1) !== 47 || u.src.charCodeAt(t + 2) !== 47) return !1;
|
|
2689
|
-
const r = u.pending.match(
|
|
2685
|
+
const r = u.pending.match(pc);
|
|
2690
2686
|
if (!r) return !1;
|
|
2691
2687
|
const o = r[1], i = u.md.linkify.matchAtStart(u.src.slice(t - o.length));
|
|
2692
2688
|
if (!i) return !1;
|
|
@@ -2699,10 +2695,10 @@ function bc(u, e) {
|
|
|
2699
2695
|
u.pending = u.pending.slice(0, -o.length);
|
|
2700
2696
|
const s = u.push("link_open", "a", 1);
|
|
2701
2697
|
s.attrs = [["href", a]], s.markup = "linkify", s.info = "auto";
|
|
2702
|
-
const
|
|
2703
|
-
|
|
2704
|
-
const
|
|
2705
|
-
|
|
2698
|
+
const f = u.push("text", "", 0);
|
|
2699
|
+
f.content = u.md.normalizeLinkText(c);
|
|
2700
|
+
const d = u.push("link_close", "a", -1);
|
|
2701
|
+
d.markup = "linkify", d.info = "auto";
|
|
2706
2702
|
}
|
|
2707
2703
|
return u.pos += c.length - o.length, !0;
|
|
2708
2704
|
}
|
|
@@ -2769,15 +2765,15 @@ function xc(u, e) {
|
|
|
2769
2765
|
for (; (s = u.src.indexOf("`", a)) !== -1; ) {
|
|
2770
2766
|
for (a = s + 1; a < o && u.src.charCodeAt(a) === 96; )
|
|
2771
2767
|
a++;
|
|
2772
|
-
const
|
|
2773
|
-
if (
|
|
2768
|
+
const f = a - s;
|
|
2769
|
+
if (f === c) {
|
|
2774
2770
|
if (!e) {
|
|
2775
|
-
const
|
|
2776
|
-
|
|
2771
|
+
const d = u.push("code_inline", "code", 0);
|
|
2772
|
+
d.markup = i, d.content = u.src.slice(t, s).replace(/\n/g, " ").replace(/^ (.+) $/, "$1");
|
|
2777
2773
|
}
|
|
2778
2774
|
return u.pos = a, !0;
|
|
2779
2775
|
}
|
|
2780
|
-
u.backticks[
|
|
2776
|
+
u.backticks[f] = s;
|
|
2781
2777
|
}
|
|
2782
2778
|
return u.backticksScanned = !0, e || (u.pending += i), u.pos += c, !0;
|
|
2783
2779
|
}
|
|
@@ -2890,52 +2886,52 @@ function Cc(u, e) {
|
|
|
2890
2886
|
let t, n, r, o, i = "", c = "", a = u.pos, s = !0;
|
|
2891
2887
|
if (u.src.charCodeAt(u.pos) !== 91)
|
|
2892
2888
|
return !1;
|
|
2893
|
-
const
|
|
2894
|
-
if (
|
|
2889
|
+
const f = u.pos, d = u.posMax, m = u.pos + 1, p = u.md.helpers.parseLinkLabel(u, u.pos, !0);
|
|
2890
|
+
if (p < 0)
|
|
2895
2891
|
return !1;
|
|
2896
|
-
let
|
|
2897
|
-
if (
|
|
2898
|
-
for (s = !1,
|
|
2892
|
+
let h = p + 1;
|
|
2893
|
+
if (h < d && u.src.charCodeAt(h) === 40) {
|
|
2894
|
+
for (s = !1, h++; h < d && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
|
|
2899
2895
|
;
|
|
2900
|
-
if (
|
|
2896
|
+
if (h >= d)
|
|
2901
2897
|
return !1;
|
|
2902
|
-
if (a =
|
|
2903
|
-
for (i = u.md.normalizeLink(r.str), u.md.validateLink(i) ?
|
|
2898
|
+
if (a = h, r = u.md.helpers.parseLinkDestination(u.src, h, u.posMax), r.ok) {
|
|
2899
|
+
for (i = u.md.normalizeLink(r.str), u.md.validateLink(i) ? h = r.pos : i = "", a = h; h < d && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
|
|
2904
2900
|
;
|
|
2905
|
-
if (r = u.md.helpers.parseLinkTitle(u.src,
|
|
2906
|
-
for (c = r.str,
|
|
2901
|
+
if (r = u.md.helpers.parseLinkTitle(u.src, h, u.posMax), h < d && a !== h && r.ok)
|
|
2902
|
+
for (c = r.str, h = r.pos; h < d && (t = u.src.charCodeAt(h), !(!w(t) && t !== 10)); h++)
|
|
2907
2903
|
;
|
|
2908
2904
|
}
|
|
2909
|
-
(
|
|
2905
|
+
(h >= d || u.src.charCodeAt(h) !== 41) && (s = !0), h++;
|
|
2910
2906
|
}
|
|
2911
2907
|
if (s) {
|
|
2912
2908
|
if (typeof u.env.references > "u")
|
|
2913
2909
|
return !1;
|
|
2914
|
-
if (
|
|
2915
|
-
return u.pos =
|
|
2910
|
+
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[we(n)], !o)
|
|
2911
|
+
return u.pos = f, !1;
|
|
2916
2912
|
i = o.href, c = o.title;
|
|
2917
2913
|
}
|
|
2918
2914
|
if (!e) {
|
|
2919
|
-
u.pos = m, u.posMax =
|
|
2915
|
+
u.pos = m, u.posMax = p;
|
|
2920
2916
|
const C = u.push("link_open", "a", 1), D = [["href", i]];
|
|
2921
2917
|
C.attrs = D, c && D.push(["title", c]), u.linkLevel++, u.md.inline.tokenize(u), u.linkLevel--, u.push("link_close", "a", -1);
|
|
2922
2918
|
}
|
|
2923
|
-
return u.pos =
|
|
2919
|
+
return u.pos = h, u.posMax = d, !0;
|
|
2924
2920
|
}
|
|
2925
2921
|
function Dc(u, e) {
|
|
2926
|
-
let t, n, r, o, i, c, a, s,
|
|
2927
|
-
const
|
|
2922
|
+
let t, n, r, o, i, c, a, s, f = "";
|
|
2923
|
+
const d = u.pos, m = u.posMax;
|
|
2928
2924
|
if (u.src.charCodeAt(u.pos) !== 33 || u.src.charCodeAt(u.pos + 1) !== 91)
|
|
2929
2925
|
return !1;
|
|
2930
|
-
const
|
|
2931
|
-
if (
|
|
2926
|
+
const p = u.pos + 2, h = u.md.helpers.parseLinkLabel(u, u.pos + 1, !1);
|
|
2927
|
+
if (h < 0)
|
|
2932
2928
|
return !1;
|
|
2933
|
-
if (o =
|
|
2929
|
+
if (o = h + 1, o < m && u.src.charCodeAt(o) === 40) {
|
|
2934
2930
|
for (o++; o < m && (t = u.src.charCodeAt(o), !(!w(t) && t !== 10)); o++)
|
|
2935
2931
|
;
|
|
2936
2932
|
if (o >= m)
|
|
2937
2933
|
return !1;
|
|
2938
|
-
for (s = o, c = u.md.helpers.parseLinkDestination(u.src, o, u.posMax), c.ok && (
|
|
2934
|
+
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++)
|
|
2939
2935
|
;
|
|
2940
2936
|
if (c = u.md.helpers.parseLinkTitle(u.src, o, u.posMax), o < m && s !== o && c.ok)
|
|
2941
2937
|
for (a = c.str, o = c.pos; o < m && (t = u.src.charCodeAt(o), !(!w(t) && t !== 10)); o++)
|
|
@@ -2943,17 +2939,17 @@ function Dc(u, e) {
|
|
|
2943
2939
|
else
|
|
2944
2940
|
a = "";
|
|
2945
2941
|
if (o >= m || u.src.charCodeAt(o) !== 41)
|
|
2946
|
-
return u.pos =
|
|
2942
|
+
return u.pos = d, !1;
|
|
2947
2943
|
o++;
|
|
2948
2944
|
} else {
|
|
2949
2945
|
if (typeof u.env.references > "u")
|
|
2950
2946
|
return !1;
|
|
2951
|
-
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 =
|
|
2952
|
-
return u.pos =
|
|
2953
|
-
|
|
2947
|
+
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[we(r)], !i)
|
|
2948
|
+
return u.pos = d, !1;
|
|
2949
|
+
f = i.href, a = i.title;
|
|
2954
2950
|
}
|
|
2955
2951
|
if (!e) {
|
|
2956
|
-
n = u.src.slice(
|
|
2952
|
+
n = u.src.slice(p, h);
|
|
2957
2953
|
const C = [];
|
|
2958
2954
|
u.md.inline.parse(
|
|
2959
2955
|
n,
|
|
@@ -2961,7 +2957,7 @@ function Dc(u, e) {
|
|
|
2961
2957
|
u.env,
|
|
2962
2958
|
C
|
|
2963
2959
|
);
|
|
2964
|
-
const D = u.push("image", "img", 0), T = [["src",
|
|
2960
|
+
const D = u.push("image", "img", 0), T = [["src", f], ["alt", ""]];
|
|
2965
2961
|
D.attrs = T, D.children = C, D.content = n, a && T.push(["title", a]);
|
|
2966
2962
|
}
|
|
2967
2963
|
return u.pos = o, u.posMax = m, !0;
|
|
@@ -3053,7 +3049,7 @@ function Lc(u, e) {
|
|
|
3053
3049
|
} else {
|
|
3054
3050
|
const o = u.src.slice(t).match(Mc);
|
|
3055
3051
|
if (o) {
|
|
3056
|
-
const i =
|
|
3052
|
+
const i = Bt(o[0]);
|
|
3057
3053
|
if (i !== o[0]) {
|
|
3058
3054
|
if (!e) {
|
|
3059
3055
|
const c = u.push("text_special", "", 0);
|
|
@@ -3075,19 +3071,19 @@ function kt(u) {
|
|
|
3075
3071
|
if (o.push(0), (u[n].marker !== c.marker || r !== c.token - 1) && (n = i), r = c.token, c.length = c.length || 0, !c.close) continue;
|
|
3076
3072
|
e.hasOwnProperty(c.marker) || (e[c.marker] = [-1, -1, -1, -1, -1, -1]);
|
|
3077
3073
|
const a = e[c.marker][(c.open ? 3 : 0) + c.length % 3];
|
|
3078
|
-
let s = n - o[n] - 1,
|
|
3074
|
+
let s = n - o[n] - 1, f = s;
|
|
3079
3075
|
for (; s > a; s -= o[s] + 1) {
|
|
3080
|
-
const
|
|
3081
|
-
if (
|
|
3076
|
+
const d = u[s];
|
|
3077
|
+
if (d.marker === c.marker && d.open && d.end < 0) {
|
|
3082
3078
|
let m = !1;
|
|
3083
|
-
if ((
|
|
3084
|
-
const
|
|
3085
|
-
o[i] = i - s +
|
|
3079
|
+
if ((d.close || c.open) && (d.length + c.length) % 3 === 0 && (d.length % 3 !== 0 || c.length % 3 !== 0) && (m = !0), !m) {
|
|
3080
|
+
const p = s > 0 && !u[s - 1].open ? o[s - 1] + 1 : 0;
|
|
3081
|
+
o[i] = i - s + p, o[s] = p, c.open = !1, d.end = i, d.close = !1, f = -1, r = -2;
|
|
3086
3082
|
break;
|
|
3087
3083
|
}
|
|
3088
3084
|
}
|
|
3089
3085
|
}
|
|
3090
|
-
|
|
3086
|
+
f !== -1 && (e[c.marker][(c.open ? 3 : 0) + (c.length || 0) % 3] = f);
|
|
3091
3087
|
}
|
|
3092
3088
|
}
|
|
3093
3089
|
function Oc(u) {
|
|
@@ -3104,7 +3100,7 @@ function Nc(u) {
|
|
|
3104
3100
|
e !== t && (r.length = t);
|
|
3105
3101
|
}
|
|
3106
3102
|
const Ke = [
|
|
3107
|
-
["text",
|
|
3103
|
+
["text", hc],
|
|
3108
3104
|
["linkify", bc],
|
|
3109
3105
|
["newline", mc],
|
|
3110
3106
|
["escape", _c],
|
|
@@ -3180,7 +3176,7 @@ se.prototype.parse = function(u, e, t, n) {
|
|
|
3180
3176
|
o[c](r);
|
|
3181
3177
|
};
|
|
3182
3178
|
se.prototype.State = ae;
|
|
3183
|
-
function
|
|
3179
|
+
function Bc(u) {
|
|
3184
3180
|
const e = {};
|
|
3185
3181
|
u = u || {}, e.src_Any = It.source, e.src_Cc = Mt.source, e.src_Z = Ot.source, e.src_P = b0.source, e.src_ZPCc = [e.src_Z, e.src_P, e.src_Cc].join("|"), e.src_ZCc = [e.src_Z, e.src_Cc].join("|");
|
|
3186
3182
|
const t = "[><|]";
|
|
@@ -3202,7 +3198,7 @@ function i0(u) {
|
|
|
3202
3198
|
function Re(u) {
|
|
3203
3199
|
return Object.prototype.toString.call(u);
|
|
3204
3200
|
}
|
|
3205
|
-
function
|
|
3201
|
+
function Pc(u) {
|
|
3206
3202
|
return Re(u) === "[object String]";
|
|
3207
3203
|
}
|
|
3208
3204
|
function zc(u) {
|
|
@@ -3275,7 +3271,7 @@ function At() {
|
|
|
3275
3271
|
};
|
|
3276
3272
|
}
|
|
3277
3273
|
function Te(u) {
|
|
3278
|
-
const e = u.re =
|
|
3274
|
+
const e = u.re = Bc(u.__opts__), t = u.__tlds__.slice();
|
|
3279
3275
|
u.onCompile(), u.__tlds_replaced__ || t.push(jc), t.push(e.src_xn), e.src_tlds = t.join("|");
|
|
3280
3276
|
function n(c) {
|
|
3281
3277
|
return c.replace("%TLDS%", e.src_tlds);
|
|
@@ -3295,7 +3291,7 @@ function Te(u) {
|
|
|
3295
3291
|
qc(a.validate) ? s.validate = Zc(a.validate) : Et(a.validate) ? s.validate = a.validate : o(c, a), Et(a.normalize) ? s.normalize = a.normalize : a.normalize ? o(c, a) : s.normalize = At();
|
|
3296
3292
|
return;
|
|
3297
3293
|
}
|
|
3298
|
-
if (
|
|
3294
|
+
if (Pc(a)) {
|
|
3299
3295
|
r.push(c);
|
|
3300
3296
|
return;
|
|
3301
3297
|
}
|
|
@@ -3333,7 +3329,7 @@ J.prototype.set = function(e) {
|
|
|
3333
3329
|
J.prototype.test = function(e) {
|
|
3334
3330
|
if (this.__text_cache__ = e, this.__index__ = -1, !e.length)
|
|
3335
3331
|
return !1;
|
|
3336
|
-
let t, n, r, o, i, c, a, s,
|
|
3332
|
+
let t, n, r, o, i, c, a, s, f;
|
|
3337
3333
|
if (this.re.schema_test.test(e)) {
|
|
3338
3334
|
for (a = this.re.schema_search, a.lastIndex = 0; (t = a.exec(e)) !== null; )
|
|
3339
3335
|
if (o = this.testSchemaAt(e, t[2], a.lastIndex), o) {
|
|
@@ -3341,7 +3337,7 @@ J.prototype.test = function(e) {
|
|
|
3341
3337
|
break;
|
|
3342
3338
|
}
|
|
3343
3339
|
}
|
|
3344
|
-
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = e.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (i = n.index + n[1].length, (this.__index__ < 0 || i < this.__index__) && (this.__schema__ = "", this.__index__ = i, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (
|
|
3340
|
+
return this.__opts__.fuzzyLink && this.__compiled__["http:"] && (s = e.search(this.re.host_fuzzy_test), s >= 0 && (this.__index__ < 0 || s < this.__index__) && (n = e.match(this.__opts__.fuzzyIP ? this.re.link_fuzzy : this.re.link_no_ip_fuzzy)) !== null && (i = n.index + n[1].length, (this.__index__ < 0 || i < this.__index__) && (this.__schema__ = "", this.__index__ = i, this.__last_index__ = n.index + n[0].length))), this.__opts__.fuzzyEmail && this.__compiled__["mailto:"] && (f = e.indexOf("@"), f >= 0 && (r = e.match(this.re.email_fuzzy)) !== null && (i = r.index + r[1].length, c = r.index + r[0].length, (this.__index__ < 0 || i < this.__index__ || i === this.__index__ && c > this.__last_index__) && (this.__schema__ = "mailto:", this.__index__ = i, this.__last_index__ = c))), this.__index__ >= 0;
|
|
3345
3341
|
};
|
|
3346
3342
|
J.prototype.pretest = function(e) {
|
|
3347
3343
|
return this.re.pretest.test(e);
|
|
@@ -3375,12 +3371,12 @@ J.prototype.normalize = function(e) {
|
|
|
3375
3371
|
};
|
|
3376
3372
|
J.prototype.onCompile = function() {
|
|
3377
3373
|
};
|
|
3378
|
-
const
|
|
3374
|
+
const Pu = 2147483647, ou = 36, k0 = 1, ne = 26, Yc = 38, Xc = 700, Zt = 72, Vt = 128, Yt = "-", Jc = /^xn--/, Qc = /[^\0-\x7F]/, Kc = /[\x2E\u3002\uFF0E\uFF61]/g, ui = {
|
|
3379
3375
|
overflow: "Overflow: input needs wider integers to process",
|
|
3380
3376
|
"not-basic": "Illegal input >= 0x80 (not a basic code point)",
|
|
3381
3377
|
"invalid-input": "Invalid input"
|
|
3382
3378
|
}, e0 = ou - k0, cu = Math.floor, t0 = String.fromCharCode;
|
|
3383
|
-
function
|
|
3379
|
+
function pu(u) {
|
|
3384
3380
|
throw new RangeError(ui[u]);
|
|
3385
3381
|
}
|
|
3386
3382
|
function ei(u, e) {
|
|
@@ -3425,21 +3421,21 @@ const ti = (u) => String.fromCodePoint(...u), ni = function(u) {
|
|
|
3425
3421
|
let n = 0, r = Vt, o = Zt, i = u.lastIndexOf(Yt);
|
|
3426
3422
|
i < 0 && (i = 0);
|
|
3427
3423
|
for (let c = 0; c < i; ++c)
|
|
3428
|
-
u.charCodeAt(c) >= 128 &&
|
|
3424
|
+
u.charCodeAt(c) >= 128 && pu("not-basic"), e.push(u.charCodeAt(c));
|
|
3429
3425
|
for (let c = i > 0 ? i + 1 : 0; c < t; ) {
|
|
3430
3426
|
const a = n;
|
|
3431
|
-
for (let
|
|
3432
|
-
c >= t &&
|
|
3427
|
+
for (let f = 1, d = ou; ; d += ou) {
|
|
3428
|
+
c >= t && pu("invalid-input");
|
|
3433
3429
|
const m = ni(u.charCodeAt(c++));
|
|
3434
|
-
m >= ou &&
|
|
3435
|
-
const
|
|
3436
|
-
if (m <
|
|
3430
|
+
m >= ou && pu("invalid-input"), m > cu((Pu - n) / f) && pu("overflow"), n += m * f;
|
|
3431
|
+
const p = d <= o ? k0 : d >= o + ne ? ne : d - o;
|
|
3432
|
+
if (m < p)
|
|
3437
3433
|
break;
|
|
3438
|
-
const
|
|
3439
|
-
|
|
3434
|
+
const h = ou - p;
|
|
3435
|
+
f > cu(Pu / h) && pu("overflow"), f *= h;
|
|
3440
3436
|
}
|
|
3441
3437
|
const s = e.length + 1;
|
|
3442
|
-
o = Qt(n - a, s, a == 0), cu(n / s) >
|
|
3438
|
+
o = Qt(n - a, s, a == 0), cu(n / s) > Pu - r && pu("overflow"), r += cu(n / s), n %= s, e.splice(n++, 0, r);
|
|
3443
3439
|
}
|
|
3444
3440
|
return String.fromCodePoint(...e);
|
|
3445
3441
|
}, un = function(u) {
|
|
@@ -3452,24 +3448,24 @@ const ti = (u) => String.fromCodePoint(...u), ni = function(u) {
|
|
|
3452
3448
|
const i = e.length;
|
|
3453
3449
|
let c = i;
|
|
3454
3450
|
for (i && e.push(Yt); c < t; ) {
|
|
3455
|
-
let a =
|
|
3456
|
-
for (const
|
|
3457
|
-
|
|
3451
|
+
let a = Pu;
|
|
3452
|
+
for (const f of u)
|
|
3453
|
+
f >= n && f < a && (a = f);
|
|
3458
3454
|
const s = c + 1;
|
|
3459
|
-
a - n > cu((
|
|
3460
|
-
for (const
|
|
3461
|
-
if (
|
|
3462
|
-
let
|
|
3455
|
+
a - n > cu((Pu - r) / s) && pu("overflow"), r += (a - n) * s, n = a;
|
|
3456
|
+
for (const f of u)
|
|
3457
|
+
if (f < n && ++r > Pu && pu("overflow"), f === n) {
|
|
3458
|
+
let d = r;
|
|
3463
3459
|
for (let m = ou; ; m += ou) {
|
|
3464
|
-
const
|
|
3465
|
-
if (
|
|
3460
|
+
const p = m <= o ? k0 : m >= o + ne ? ne : m - o;
|
|
3461
|
+
if (d < p)
|
|
3466
3462
|
break;
|
|
3467
|
-
const
|
|
3463
|
+
const h = d - p, C = ou - p;
|
|
3468
3464
|
e.push(
|
|
3469
|
-
t0(Ct(
|
|
3470
|
-
),
|
|
3465
|
+
t0(Ct(p + h % C, 0))
|
|
3466
|
+
), d = cu(h / C);
|
|
3471
3467
|
}
|
|
3472
|
-
e.push(t0(Ct(
|
|
3468
|
+
e.push(t0(Ct(d, 0))), o = Qt(r, s, c === i), r = 0, ++c;
|
|
3473
3469
|
}
|
|
3474
3470
|
++r, ++n;
|
|
3475
3471
|
}
|
|
@@ -3679,28 +3675,28 @@ function di(u) {
|
|
|
3679
3675
|
return li.test(e) ? fi.test(e) : !0;
|
|
3680
3676
|
}
|
|
3681
3677
|
const tn = ["http:", "https:", "mailto:"];
|
|
3682
|
-
function
|
|
3683
|
-
const e =
|
|
3678
|
+
function hi(u) {
|
|
3679
|
+
const e = p0(u, !0);
|
|
3684
3680
|
if (e.hostname && (!e.protocol || tn.indexOf(e.protocol) >= 0))
|
|
3685
3681
|
try {
|
|
3686
3682
|
e.hostname = en.toASCII(e.hostname);
|
|
3687
3683
|
} catch {
|
|
3688
3684
|
}
|
|
3689
|
-
return ie(
|
|
3685
|
+
return ie(h0(e));
|
|
3690
3686
|
}
|
|
3691
|
-
function
|
|
3692
|
-
const e =
|
|
3687
|
+
function pi(u) {
|
|
3688
|
+
const e = p0(u, !0);
|
|
3693
3689
|
if (e.hostname && (!e.protocol || tn.indexOf(e.protocol) >= 0))
|
|
3694
3690
|
try {
|
|
3695
3691
|
e.hostname = en.toUnicode(e.hostname);
|
|
3696
3692
|
} catch {
|
|
3697
3693
|
}
|
|
3698
|
-
return zu(
|
|
3694
|
+
return zu(h0(e), zu.defaultChars + "%");
|
|
3699
3695
|
}
|
|
3700
3696
|
function K(u, e) {
|
|
3701
3697
|
if (!(this instanceof K))
|
|
3702
3698
|
return new K(u, e);
|
|
3703
|
-
e || m0(u) || (e = u || {}, u = "default"), this.inline = new se(), this.block = new ve(), this.core = new x0(), this.renderer = new Uu(), this.linkify = new J(), this.validateLink = di, this.normalizeLink =
|
|
3699
|
+
e || m0(u) || (e = u || {}, u = "default"), this.inline = new se(), this.block = new ve(), this.core = new x0(), this.renderer = new Uu(), this.linkify = new J(), this.validateLink = di, this.normalizeLink = hi, this.normalizeLinkText = pi, this.utils = mo, this.helpers = Se({}, ko), this.options = {}, this.configure(u), e && this.set(e);
|
|
3704
3700
|
}
|
|
3705
3701
|
K.prototype.set = function(u) {
|
|
3706
3702
|
return Se(this.options, u), this;
|
|
@@ -3822,17 +3818,17 @@ const bi = {
|
|
|
3822
3818
|
},
|
|
3823
3819
|
setup(u) {
|
|
3824
3820
|
const e = u, t = kn(), n = X(() => {
|
|
3825
|
-
const
|
|
3826
|
-
return
|
|
3821
|
+
const d = e.contentRenderer;
|
|
3822
|
+
return d ? typeof d == "function" ? { isComponent: !1, vNodeOrComponent: d(e) } : d instanceof f0 ? { isComponent: !1, vNodeOrComponent: d.render(e) } : { isComponent: !0, vNodeOrComponent: d } : null;
|
|
3827
3823
|
}), r = En(), o = X(() => {
|
|
3828
3824
|
if (!e.customContentField)
|
|
3829
3825
|
return null;
|
|
3830
|
-
const
|
|
3831
|
-
return typeof
|
|
3832
|
-
}), 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"),
|
|
3826
|
+
const d = r[e.customContentField];
|
|
3827
|
+
return typeof d == "string" || Array.isArray(d) && d.length > 0 ? d : null;
|
|
3828
|
+
}), 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 ? {
|
|
3833
3829
|
"--max-width": Tn(e.maxWidth)
|
|
3834
3830
|
} : {});
|
|
3835
|
-
return (
|
|
3831
|
+
return (d, m) => (S(), H("div", {
|
|
3836
3832
|
class: Au([
|
|
3837
3833
|
"tr-bubble",
|
|
3838
3834
|
{
|
|
@@ -3840,12 +3836,12 @@ const bi = {
|
|
|
3840
3836
|
"placement-end": !s.value
|
|
3841
3837
|
}
|
|
3842
3838
|
]),
|
|
3843
|
-
style: An(
|
|
3839
|
+
style: An(f.value)
|
|
3844
3840
|
}, [
|
|
3845
3841
|
e.avatar ? (S(), H("div", bi, [
|
|
3846
3842
|
(S(), eu(_u(e.avatar)))
|
|
3847
|
-
])) :
|
|
3848
|
-
e.loading ? Qu(
|
|
3843
|
+
])) : Bu("", !0),
|
|
3844
|
+
e.loading ? Qu(d.$slots, "loading", {
|
|
3849
3845
|
key: 1,
|
|
3850
3846
|
bubbleProps: e
|
|
3851
3847
|
}, () => [
|
|
@@ -3863,28 +3859,28 @@ const bi = {
|
|
|
3863
3859
|
class: Au(["tr-bubble__content", { "border-corner": e.shape === "corner" }])
|
|
3864
3860
|
}, [
|
|
3865
3861
|
a.value.length ? (S(), H("div", _i, [
|
|
3866
|
-
(S(!0), H(De, null, Ee(a.value, (
|
|
3867
|
-
key:
|
|
3868
|
-
item:
|
|
3862
|
+
(S(!0), H(De, null, Ee(a.value, (p, h) => (S(), eu(l0(cr), {
|
|
3863
|
+
key: h,
|
|
3864
|
+
item: p
|
|
3869
3865
|
}, null, 8, ["item"]))), 128))
|
|
3870
|
-
])) : Qu(
|
|
3866
|
+
])) : Qu(d.$slots, "default", {
|
|
3871
3867
|
key: 1,
|
|
3872
3868
|
bubbleProps: e
|
|
3873
3869
|
}, () => [
|
|
3874
3870
|
n.value ? (S(), H(De, { key: 0 }, [
|
|
3875
|
-
n.value.isComponent ? (S(), eu(_u(n.value.vNodeOrComponent), Ce(Ku({ key: 0 },
|
|
3871
|
+
n.value.isComponent ? (S(), eu(_u(n.value.vNodeOrComponent), Ce(Ku({ key: 0 }, e)), null, 16)) : (S(), eu(_u(n.value.vNodeOrComponent), { key: 1 }))
|
|
3876
3872
|
], 64)) : (S(), H("span", xi, Cu(c.value), 1))
|
|
3877
3873
|
], !0),
|
|
3878
|
-
e.aborted ? (S(), H("span", gi, Cu(e.abortedText), 1)) :
|
|
3874
|
+
e.aborted ? (S(), H("span", gi, Cu(e.abortedText), 1)) : Bu("", !0),
|
|
3879
3875
|
t.footer ? (S(), H("div", ki, [
|
|
3880
|
-
Qu(
|
|
3881
|
-
])) :
|
|
3876
|
+
Qu(d.$slots, "footer", { bubbleProps: e }, void 0, !0)
|
|
3877
|
+
])) : Bu("", !0)
|
|
3882
3878
|
], 2),
|
|
3883
|
-
Qu(
|
|
3879
|
+
Qu(d.$slots, "trailer", { bubbleProps: e }, void 0, !0)
|
|
3884
3880
|
]))
|
|
3885
3881
|
], 6));
|
|
3886
3882
|
}
|
|
3887
|
-
}), Du = /* @__PURE__ */ ce(Ei, [["__scopeId", "data-v-
|
|
3883
|
+
}), Du = /* @__PURE__ */ ce(Ei, [["__scopeId", "data-v-cd2deda0"]]), Ai = /* @__PURE__ */ yu({
|
|
3888
3884
|
__name: "BubbleList",
|
|
3889
3885
|
props: {
|
|
3890
3886
|
items: {},
|
|
@@ -3898,10 +3894,10 @@ const bi = {
|
|
|
3898
3894
|
behavior: "smooth",
|
|
3899
3895
|
throttle: 100
|
|
3900
3896
|
}), r = X(() => e.items.at(-1)), o = X(() => {
|
|
3901
|
-
var
|
|
3897
|
+
var f, d;
|
|
3902
3898
|
if (!r.value)
|
|
3903
3899
|
return 0;
|
|
3904
|
-
const a = r.value.customContentField || ((
|
|
3900
|
+
const a = r.value.customContentField || ((d = (f = e.roles) == null ? void 0 : f[r.value.role || ""]) == null ? void 0 : d.customContentField);
|
|
3905
3901
|
if (!a)
|
|
3906
3902
|
return 0;
|
|
3907
3903
|
const s = r.value;
|
|
@@ -3930,17 +3926,17 @@ const bi = {
|
|
|
3930
3926
|
);
|
|
3931
3927
|
const i = X(() => e.items.map((a, s) => {
|
|
3932
3928
|
var D;
|
|
3933
|
-
const
|
|
3929
|
+
const f = a.role ? ((D = e.roles) == null ? void 0 : D[a.role]) || {} : {}, { slots: d, hidden: m, ...p } = f, { slots: h, ...C } = a;
|
|
3934
3930
|
return {
|
|
3935
3931
|
id: a.id,
|
|
3936
3932
|
index: s,
|
|
3937
3933
|
hidden: !!m,
|
|
3938
|
-
props: { ...
|
|
3939
|
-
slots: { ...
|
|
3934
|
+
props: { ...p, ...C, "data-role": a.role },
|
|
3935
|
+
slots: { ...d, ...h }
|
|
3940
3936
|
};
|
|
3941
3937
|
})), c = X(() => {
|
|
3942
|
-
var
|
|
3943
|
-
if (!(e.loading && e.loadingRole && ((
|
|
3938
|
+
var f;
|
|
3939
|
+
if (!(e.loading && e.loadingRole && ((f = e.roles) != null && f[e.loadingRole])))
|
|
3944
3940
|
return null;
|
|
3945
3941
|
const { slots: a, ...s } = e.roles[e.loadingRole];
|
|
3946
3942
|
return { props: { ...s, loading: !0 }, slots: a };
|
|
@@ -3950,29 +3946,29 @@ const bi = {
|
|
|
3950
3946
|
ref_key: "scrollContainerRef",
|
|
3951
3947
|
ref: t
|
|
3952
3948
|
}, [
|
|
3953
|
-
(S(!0), H(De, null, Ee(i.value, (
|
|
3954
|
-
key:
|
|
3949
|
+
(S(!0), H(De, null, Ee(i.value, (f, d) => (S(), H(De, {
|
|
3950
|
+
key: f.id || d
|
|
3955
3951
|
}, [
|
|
3956
|
-
|
|
3952
|
+
f.hidden ? Bu("", !0) : (S(), eu(Du, Ku({
|
|
3957
3953
|
key: 0,
|
|
3958
3954
|
ref_for: !0
|
|
3959
|
-
},
|
|
3960
|
-
Ee(
|
|
3961
|
-
name:
|
|
3962
|
-
fn: Y0((
|
|
3963
|
-
(S(), eu(_u(m), Ku({ ref_for: !0 }, { ...
|
|
3955
|
+
}, f.props), V0({ _: 2 }, [
|
|
3956
|
+
Ee(f.slots, (m, p) => ({
|
|
3957
|
+
name: p,
|
|
3958
|
+
fn: Y0((h) => [
|
|
3959
|
+
(S(), eu(_u(m), Ku({ ref_for: !0 }, { ...h, index: f.index }), null, 16))
|
|
3964
3960
|
])
|
|
3965
3961
|
}))
|
|
3966
3962
|
]), 1040))
|
|
3967
3963
|
], 64))), 128)),
|
|
3968
3964
|
c.value ? (S(), eu(Du, Ce(Ku({ key: 0 }, c.value.props)), V0({ _: 2 }, [
|
|
3969
|
-
Ee(c.value.slots, (
|
|
3970
|
-
name:
|
|
3965
|
+
Ee(c.value.slots, (f, d) => ({
|
|
3966
|
+
name: d,
|
|
3971
3967
|
fn: Y0((m) => [
|
|
3972
|
-
(S(), eu(_u(
|
|
3968
|
+
(S(), eu(_u(f), Ce(yn(m)), null, 16))
|
|
3973
3969
|
])
|
|
3974
3970
|
}))
|
|
3975
|
-
]), 1040)) :
|
|
3971
|
+
]), 1040)) : Bu("", !0)
|
|
3976
3972
|
], 512));
|
|
3977
3973
|
}
|
|
3978
3974
|
}), re = /* @__PURE__ */ ce(Ai, [["__scopeId", "data-v-4cbc6c09"]]), oe = /* @__PURE__ */ yu({
|