@wsxjs/wsx-marked-components 0.0.24 → 0.0.26
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/index.cjs +3 -3
- package/dist/index.js +1026 -1145
- package/package.json +5 -5
- package/src/Heading.wsx +12 -8
- package/src/Markdown.wsx +6 -2
- package/src/marked-utils.ts +14 -0
package/dist/index.js
CHANGED
|
@@ -1,117 +1,117 @@
|
|
|
1
1
|
import { autoRegister as W, LightComponent as q, jsx as G } from "@wsxjs/wsx-core";
|
|
2
|
-
import { marked as
|
|
3
|
-
const
|
|
4
|
-
var
|
|
5
|
-
let
|
|
6
|
-
function
|
|
2
|
+
import { marked as le } from "marked";
|
|
3
|
+
const ce = "wsx-marked-heading{display:block}wsx-marked-heading h1{font-size:2.5rem;font-weight:700;margin:1.5rem 0 1rem;color:var(--text-primary, #2c3e50);border-bottom:2px solid var(--primary-red, #dc2626);padding-bottom:.5rem}wsx-marked-heading h2{font-size:2rem;font-weight:600;margin:1.25rem 0 .75rem;color:var(--text-primary, #2c3e50)}wsx-marked-heading h3{font-size:1.5rem;font-weight:600;margin:1rem 0 .5rem;color:var(--text-primary, #2c3e50)}wsx-marked-heading h4,wsx-marked-heading h5,wsx-marked-heading h6{font-size:1.25rem;font-weight:600;margin:.75rem 0 .5rem;color:var(--text-primary, #2c3e50)}";
|
|
4
|
+
var Ae;
|
|
5
|
+
let Se, _e;
|
|
6
|
+
function te(e, t, r) {
|
|
7
7
|
return (t = Te(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
function
|
|
11
|
-
return function(
|
|
12
|
-
return
|
|
9
|
+
function tt(e, t, r, o, _, P) {
|
|
10
|
+
function S(n, u, d) {
|
|
11
|
+
return function(l, a) {
|
|
12
|
+
return d && d(l), n[u].call(l, a);
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
for (var
|
|
17
|
-
return
|
|
15
|
+
function E(n, u) {
|
|
16
|
+
for (var d = 0; d < n.length; d++) n[d].call(u);
|
|
17
|
+
return u;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
if (typeof
|
|
21
|
-
return
|
|
19
|
+
function w(n, u, d, l) {
|
|
20
|
+
if (typeof n != "function" && (l || n !== void 0)) throw new TypeError(u + " must " + (d || "be") + " a function" + (l ? "" : " or undefined"));
|
|
21
|
+
return n;
|
|
22
22
|
}
|
|
23
|
-
function D(
|
|
24
|
-
function
|
|
25
|
-
if (!b(
|
|
23
|
+
function D(n, u, d, l, a, i, p, g, k, h, m, c, b) {
|
|
24
|
+
function A(f) {
|
|
25
|
+
if (!b(f)) throw new TypeError("Attempted to access private element on non-instance");
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
if (
|
|
29
|
-
|
|
30
|
-
var
|
|
31
|
-
h ? (
|
|
32
|
-
return
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
} } :
|
|
27
|
+
var x, I = u[0], F = u[3], $ = !g;
|
|
28
|
+
if (!$) {
|
|
29
|
+
d || Array.isArray(I) || (I = [I]);
|
|
30
|
+
var s = {}, R = [], v = a === 3 ? "get" : a === 4 || c ? "set" : "value";
|
|
31
|
+
h ? (m || c ? s = { get: ue(function() {
|
|
32
|
+
return F(this);
|
|
33
|
+
}, l, "get"), set: function(f) {
|
|
34
|
+
u[4](this, f);
|
|
35
|
+
} } : s[v] = F, m || ue(s[v], l, a === 2 ? "" : v)) : m || (s = Object.getOwnPropertyDescriptor(n, l));
|
|
36
36
|
}
|
|
37
|
-
for (var
|
|
38
|
-
var Z =
|
|
39
|
-
if (
|
|
40
|
-
|
|
37
|
+
for (var y = n, M = I.length - 1; M >= 0; M -= d ? 2 : 1) {
|
|
38
|
+
var Z = I[M], B = d ? I[M - 1] : void 0, X = {}, C = { kind: ["field", "accessor", "method", "getter", "setter", "class"][a], name: l, metadata: i, addInitializer: (function(f, O) {
|
|
39
|
+
if (f.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
40
|
+
w(O, "An initializer", "be", !0), p.push(O);
|
|
41
41
|
}).bind(null, X) };
|
|
42
42
|
try {
|
|
43
|
-
if (
|
|
43
|
+
if ($) (x = w(Z.call(B, y, C), "class decorators", "return")) && (y = x);
|
|
44
44
|
else {
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
return
|
|
48
|
-
} : (a < 4 && (
|
|
49
|
-
return
|
|
50
|
-
}, (a < 2 || a === 4) && (z = function(
|
|
51
|
-
|
|
45
|
+
var j, z;
|
|
46
|
+
C.static = k, C.private = h, h ? a === 2 ? j = function(f) {
|
|
47
|
+
return A(f), s.value;
|
|
48
|
+
} : (a < 4 && (j = S(s, "get", A)), a !== 3 && (z = S(s, "set", A))) : (j = function(f) {
|
|
49
|
+
return f[l];
|
|
50
|
+
}, (a < 2 || a === 4) && (z = function(f, O) {
|
|
51
|
+
f[l] = O;
|
|
52
52
|
}));
|
|
53
|
-
var Y =
|
|
54
|
-
return
|
|
53
|
+
var Y = C.access = { has: h ? b.bind() : function(f) {
|
|
54
|
+
return l in f;
|
|
55
55
|
} };
|
|
56
|
-
if (
|
|
57
|
-
if (typeof
|
|
58
|
-
else if (
|
|
59
|
-
} else
|
|
56
|
+
if (j && (Y.get = j), z && (Y.set = z), y = Z.call(B, c ? { get: s.get, set: s.set } : s[v], C), c) {
|
|
57
|
+
if (typeof y == "object" && y) (x = w(y.get, "accessor.get")) && (s.get = x), (x = w(y.set, "accessor.set")) && (s.set = x), (x = w(y.init, "accessor.init")) && R.push(x);
|
|
58
|
+
else if (y !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
59
|
+
} else w(y, (m ? "field" : "method") + " decorators", "return") && (m ? R.push(y) : s[v] = y);
|
|
60
60
|
}
|
|
61
61
|
} finally {
|
|
62
62
|
X.v = !0;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
return (
|
|
66
|
-
for (var H =
|
|
65
|
+
return (m || c) && g.push(function(f, O) {
|
|
66
|
+
for (var H = R.length - 1; H >= 0; H--) O = R[H].call(f, O);
|
|
67
67
|
return O;
|
|
68
|
-
}),
|
|
68
|
+
}), m || $ || (h ? c ? g.push(S(s, "get"), S(s, "set")) : g.push(a === 2 ? s[v] : S.call.bind(s[v])) : Object.defineProperty(n, l, s)), y;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return Object.defineProperty(
|
|
70
|
+
function L(n, u) {
|
|
71
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: u });
|
|
72
72
|
}
|
|
73
|
-
if (arguments.length >= 6) var
|
|
74
|
-
var N = Object.create(
|
|
75
|
-
var a, i, p = [], g = function(
|
|
76
|
-
return
|
|
77
|
-
},
|
|
78
|
-
function h(
|
|
79
|
-
|
|
73
|
+
if (arguments.length >= 6) var T = P[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
74
|
+
var N = Object.create(T ?? null), U = function(n, u, d, l) {
|
|
75
|
+
var a, i, p = [], g = function(v) {
|
|
76
|
+
return at(v) === n;
|
|
77
|
+
}, k = /* @__PURE__ */ new Map();
|
|
78
|
+
function h(v) {
|
|
79
|
+
v && p.push(E.bind(null, v));
|
|
80
80
|
}
|
|
81
|
-
for (var
|
|
82
|
-
var
|
|
83
|
-
if (Array.isArray(
|
|
84
|
-
var b =
|
|
85
|
-
if (
|
|
86
|
-
var
|
|
87
|
-
if (
|
|
88
|
-
|
|
81
|
+
for (var m = 0; m < u.length; m++) {
|
|
82
|
+
var c = u[m];
|
|
83
|
+
if (Array.isArray(c)) {
|
|
84
|
+
var b = c[1], A = c[2], x = c.length > 3, I = 16 & b, F = !!(8 & b), $ = (b &= 7) == 0, s = A + "/" + F;
|
|
85
|
+
if (!$ && !x) {
|
|
86
|
+
var R = k.get(s);
|
|
87
|
+
if (R === !0 || R === 3 && b !== 4 || R === 4 && b !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + A);
|
|
88
|
+
k.set(s, !(b > 2) || b);
|
|
89
89
|
}
|
|
90
|
-
D(
|
|
90
|
+
D(F ? n : n.prototype, c, I, x ? "#" + A : Te(A), b, l, F ? i = i || [] : a = a || [], p, F, x, $, b === 1, F && x ? g : d);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
return h(a), h(i), p;
|
|
94
|
-
}(e, t,
|
|
95
|
-
return r.length ||
|
|
96
|
-
var
|
|
97
|
-
return r.length && [
|
|
94
|
+
}(e, t, _, N);
|
|
95
|
+
return r.length || L(e, N), { e: U, get c() {
|
|
96
|
+
var n = [];
|
|
97
|
+
return r.length && [L(D(e, [r], o, e.name, 5, N, n), N), E.bind(null, n, e)];
|
|
98
98
|
} };
|
|
99
99
|
}
|
|
100
100
|
function Te(e) {
|
|
101
|
-
var t =
|
|
101
|
+
var t = rt(e, "string");
|
|
102
102
|
return typeof t == "symbol" ? t : t + "";
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function rt(e, t) {
|
|
105
105
|
if (typeof e != "object" || !e) return e;
|
|
106
106
|
var r = e[Symbol.toPrimitive];
|
|
107
107
|
if (r !== void 0) {
|
|
108
|
-
var
|
|
109
|
-
if (typeof
|
|
108
|
+
var o = r.call(e, t);
|
|
109
|
+
if (typeof o != "object") return o;
|
|
110
110
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
111
111
|
}
|
|
112
112
|
return String(e);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function ue(e, t, r) {
|
|
115
115
|
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
116
116
|
try {
|
|
117
117
|
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
@@ -119,37 +119,44 @@ function de(e, t, r) {
|
|
|
119
119
|
}
|
|
120
120
|
return e;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function at(e) {
|
|
123
123
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
124
124
|
return e;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
_e = [W({
|
|
127
127
|
tagName: "wsx-marked-heading"
|
|
128
128
|
})];
|
|
129
|
-
let
|
|
130
|
-
class
|
|
129
|
+
let nt;
|
|
130
|
+
class ot extends q {
|
|
131
131
|
constructor() {
|
|
132
132
|
super({
|
|
133
|
-
styles:
|
|
133
|
+
styles: ce,
|
|
134
134
|
styleName: "wsx-marked-heading"
|
|
135
|
-
}),
|
|
135
|
+
}), te(this, "_autoStyles", ce), te(this, "level", 1), te(this, "text", ""), te(this, "anchorId", void 0);
|
|
136
|
+
const [t, r] = this.useState("anchorId", "");
|
|
137
|
+
Object.defineProperty(this, "anchorId", {
|
|
138
|
+
get: t,
|
|
139
|
+
set: r,
|
|
140
|
+
enumerable: !0,
|
|
141
|
+
configurable: !0
|
|
142
|
+
});
|
|
136
143
|
}
|
|
137
144
|
static get observedAttributes() {
|
|
138
|
-
return ["level", "text"];
|
|
145
|
+
return ["level", "text", "anchor-id"];
|
|
139
146
|
}
|
|
140
|
-
attributeChangedCallback(t, r,
|
|
141
|
-
t === "level" ? this.level = parseInt(
|
|
147
|
+
attributeChangedCallback(t, r, o) {
|
|
148
|
+
t === "level" ? this.level = parseInt(o, 10) || 1 : t === "text" ? this.text = o : t === "anchor-id" && (this.anchorId = o), this.rerender();
|
|
142
149
|
}
|
|
143
150
|
render() {
|
|
144
|
-
return this.level === 1 ? /* @__PURE__ */ G("h1",
|
|
151
|
+
return this.level === 1 ? /* @__PURE__ */ G("h1", { id: this.anchorId }, this.text) : this.level === 2 ? /* @__PURE__ */ G("h2", { id: this.anchorId }, this.text) : this.level === 3 ? /* @__PURE__ */ G("h3", { id: this.anchorId }, this.text) : this.level === 4 ? /* @__PURE__ */ G("h4", { id: this.anchorId }, this.text) : this.level === 5 ? /* @__PURE__ */ G("h5", { id: this.anchorId }, this.text) : /* @__PURE__ */ G("h6", { id: this.anchorId }, this.text);
|
|
145
152
|
}
|
|
146
153
|
}
|
|
147
|
-
|
|
148
|
-
[
|
|
149
|
-
|
|
150
|
-
const ge = "wsx-marked-code{display:block;width:100%;margin:1rem 0;position:relative}.code-container{display:flex;flex-direction:column;width:100%;background:var(--bg-secondary, #fde8d1);border-radius:12px;overflow:hidden;box-shadow:0 8px 30px #0000001a;border:1px solid var(--border-color, #fed7aa)}wsx-marked-code .language-label{display:block;padding:.75rem 1.5rem;background:var(--bg-primary, #fef2e5);border-bottom:1px solid var(--border-color, #fed7aa);color:var(--text-primary, #2c3e50);font-weight:600;font-size:.9rem;text-transform:uppercase;letter-spacing:.5px}wsx-marked-code pre{padding:1.5rem;margin:0;background:var(--bg-primary, #fef2e5);color:var(--text-primary, #2c3e50);font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:.9rem;line-height:1.6;overflow-x:auto;position:relative}wsx-marked-code code{display:block;background:transparent;padding:0;border:none;font-family:inherit;font-size:inherit;white-space:pre;word-wrap:normal;word-break:normal;tab-size:4;-moz-tab-size:4;-o-tab-size:4}@media (prefers-color-scheme: dark){.code-container{background:var(--bg-secondary, #2d2d2d);border-color:var(--border-color, #404040)}wsx-marked-code .language-label{background:var(--bg-primary, #1a1a1a);border-color:var(--border-color, #404040);color:var(--text-primary, #ffffff)}wsx-marked-code pre{background:#2d2d2d;color:#f8f8f2}}.light .code-container,[data-theme=light] .code-container{background:var(--bg-secondary, #fde8d1);border-color:var(--border-color, #fed7aa)}.light wsx-marked-code .language-label,[data-theme=light] wsx-marked-code .language-label{background:var(--bg-primary, #fef2e5);border-color:var(--border-color, #fed7aa);color:var(--text-primary, #2c3e50)}.light wsx-marked-code pre,[data-theme=light] wsx-marked-code pre{background:var(--bg-primary, #fef2e5);color:var(--text-primary, #2c3e50)}[data-theme=dark] .code-container,.dark .code-container{background:var(--bg-secondary, #2d2d2d);border-color:var(--border-color, #404040)}[data-theme=dark] wsx-marked-code .language-label,.dark wsx-marked-code .language-label{background:var(--bg-primary, #1a1a1a);border-color:var(--border-color, #404040);color:var(--text-primary, #ffffff)}[data-theme=dark] wsx-marked-code pre,.dark wsx-marked-code pre{background:#2d2d2d;color:#f8f8f2}.light wsx-marked-code code[class*=language-],[data-theme=light] wsx-marked-code code[class*=language-]{background:transparent;color:#1f2937}.light wsx-marked-code .token.comment,.light wsx-marked-code .token.prolog,.light wsx-marked-code .token.doctype,.light wsx-marked-code .token.cdata,[data-theme=light] wsx-marked-code .token.comment,[data-theme=light] wsx-marked-code .token.prolog,[data-theme=light] wsx-marked-code .token.doctype,[data-theme=light] wsx-marked-code .token.cdata{color:#4b5563;font-style:italic}.light wsx-marked-code .token.punctuation,[data-theme=light] wsx-marked-code .token.punctuation{color:#111827}.light wsx-marked-code .token.property,.light wsx-marked-code .token.tag,.light wsx-marked-code .token.boolean,.light wsx-marked-code .token.number,.light wsx-marked-code .token.constant,.light wsx-marked-code .token.symbol,.light wsx-marked-code .token.deleted,[data-theme=light] wsx-marked-code .token.property,[data-theme=light] wsx-marked-code .token.tag,[data-theme=light] wsx-marked-code .token.boolean,[data-theme=light] wsx-marked-code .token.number,[data-theme=light] wsx-marked-code .token.constant,[data-theme=light] wsx-marked-code .token.symbol,[data-theme=light] wsx-marked-code .token.deleted{color:#be185d}.light wsx-marked-code .token.selector,.light wsx-marked-code .token.attr-name,.light wsx-marked-code .token.string,.light wsx-marked-code .token.char,.light wsx-marked-code .token.builtin,.light wsx-marked-code .token.inserted,[data-theme=light] wsx-marked-code .token.selector,[data-theme=light] wsx-marked-code .token.attr-name,[data-theme=light] wsx-marked-code .token.string,[data-theme=light] wsx-marked-code .token.char,[data-theme=light] wsx-marked-code .token.builtin,[data-theme=light] wsx-marked-code .token.inserted{color:#059669}.light wsx-marked-code .token.operator,.light wsx-marked-code .token.entity,.light wsx-marked-code .token.url,.light wsx-marked-code .language-css .token.string,.light wsx-marked-code .style .token.string,[data-theme=light] wsx-marked-code .token.operator,[data-theme=light] wsx-marked-code .token.entity,[data-theme=light] wsx-marked-code .token.url,[data-theme=light] wsx-marked-code .language-css .token.string,[data-theme=light] wsx-marked-code .style .token.string{color:#111827}.light wsx-marked-code .token.atrule,.light wsx-marked-code .token.attr-value,.light wsx-marked-code .token.keyword,[data-theme=light] wsx-marked-code .token.atrule,[data-theme=light] wsx-marked-code .token.attr-value,[data-theme=light] wsx-marked-code .token.keyword{color:#7c3aed;font-weight:600}.light wsx-marked-code .token.function,.light wsx-marked-code .token.class-name,[data-theme=light] wsx-marked-code .token.function,[data-theme=light] wsx-marked-code .token.class-name{color:#0369a1}.light wsx-marked-code .token.regex,.light wsx-marked-code .token.important,.light wsx-marked-code .token.variable,[data-theme=light] wsx-marked-code .token.regex,[data-theme=light] wsx-marked-code .token.important,[data-theme=light] wsx-marked-code .token.variable{color:#c2410c}.light wsx-marked-code .token.decorator,.light wsx-marked-code .token.decorator-name,[data-theme=light] wsx-marked-code .token.decorator,[data-theme=light] wsx-marked-code .token.decorator-name{color:#c2410c}.light wsx-marked-code .token.web-component,.light wsx-marked-code .token.tag-name,[data-theme=light] wsx-marked-code .token.web-component,[data-theme=light] wsx-marked-code .token.tag-name{color:#0369a1}wsx-marked-code code[class*=language-]{background:transparent;color:#24292e}wsx-marked-code .token.comment,wsx-marked-code .token.prolog,wsx-marked-code .token.doctype,wsx-marked-code .token.cdata{color:#5a6268;font-style:italic}wsx-marked-code .token.punctuation{color:#1a1a1a}wsx-marked-code .token.property,wsx-marked-code .token.tag,wsx-marked-code .token.boolean,wsx-marked-code .token.number,wsx-marked-code .token.constant,wsx-marked-code .token.symbol,wsx-marked-code .token.deleted{color:#c7254e}wsx-marked-code .token.selector,wsx-marked-code .token.attr-name,wsx-marked-code .token.string,wsx-marked-code .token.char,wsx-marked-code .token.builtin,wsx-marked-code .token.inserted{color:#005cc5}wsx-marked-code .token.operator,wsx-marked-code .token.entity,wsx-marked-code .token.url,wsx-marked-code .language-css .token.string,wsx-marked-code .style .token.string{color:#1a1a1a}wsx-marked-code .token.atrule,wsx-marked-code .token.attr-value,wsx-marked-code .token.keyword{color:#d73a49;font-weight:600}wsx-marked-code .token.function,wsx-marked-code .token.class-name{color:#6f42c1}wsx-marked-code .token.regex,wsx-marked-code .token.important,wsx-marked-code .token.variable{color:#e36209}wsx-marked-code .token.decorator,wsx-marked-code .token.decorator-name{color:#e36209}wsx-marked-code .token.web-component,wsx-marked-code .token.tag-name{color:#6f42c1}@media (prefers-color-scheme: dark){wsx-marked-code code[class*=language-]{color:#f8f8f2}wsx-marked-code .token.comment,wsx-marked-code .token.prolog,wsx-marked-code .token.doctype,wsx-marked-code .token.cdata{color:#75715e;font-style:italic}wsx-marked-code .token.punctuation{color:#f8f8f2}wsx-marked-code .token.property,wsx-marked-code .token.tag,wsx-marked-code .token.boolean,wsx-marked-code .token.number,wsx-marked-code .token.constant,wsx-marked-code .token.symbol,wsx-marked-code .token.deleted{color:#f92672}wsx-marked-code .token.selector,wsx-marked-code .token.attr-name,wsx-marked-code .token.string,wsx-marked-code .token.char,wsx-marked-code .token.builtin,wsx-marked-code .token.inserted{color:#e6db74}wsx-marked-code .token.operator,wsx-marked-code .token.entity,wsx-marked-code .token.url,wsx-marked-code .language-css .token.string,wsx-marked-code .style .token.string{color:#f8f8f2}wsx-marked-code .token.atrule,wsx-marked-code .token.attr-value,wsx-marked-code .token.keyword{color:#66d9ef;font-weight:500}wsx-marked-code .token.function,wsx-marked-code .token.class-name{color:#a6e22e}wsx-marked-code .token.regex,wsx-marked-code .token.important,wsx-marked-code .token.variable{color:#fd971f}wsx-marked-code .token.decorator,wsx-marked-code .token.decorator-name{color:#fd971f}wsx-marked-code .token.web-component,wsx-marked-code .token.tag-name{color:#a6e22e}}[data-theme=dark] wsx-marked-code code[class*=language-],.dark wsx-marked-code code[class*=language-]{color:#f8f8f2}[data-theme=dark] wsx-marked-code .token.comment,[data-theme=dark] wsx-marked-code .token.prolog,[data-theme=dark] wsx-marked-code .token.doctype,[data-theme=dark] wsx-marked-code .token.cdata,.dark wsx-marked-code .token.comment,.dark wsx-marked-code .token.prolog,.dark wsx-marked-code .token.doctype,.dark wsx-marked-code .token.cdata{color:#75715e;font-style:italic}[data-theme=dark] wsx-marked-code .token.punctuation,.dark wsx-marked-code .token.punctuation{color:#f8f8f2}[data-theme=dark] wsx-marked-code .token.property,[data-theme=dark] wsx-marked-code .token.tag,[data-theme=dark] wsx-marked-code .token.boolean,[data-theme=dark] wsx-marked-code .token.number,[data-theme=dark] wsx-marked-code .token.constant,[data-theme=dark] wsx-marked-code .token.symbol,[data-theme=dark] wsx-marked-code .token.deleted,.dark wsx-marked-code .token.property,.dark wsx-marked-code .token.tag,.dark wsx-marked-code .token.boolean,.dark wsx-marked-code .token.number,.dark wsx-marked-code .token.constant,.dark wsx-marked-code .token.symbol,.dark wsx-marked-code .token.deleted{color:#f92672}[data-theme=dark] wsx-marked-code .token.selector,[data-theme=dark] wsx-marked-code .token.attr-name,[data-theme=dark] wsx-marked-code .token.string,[data-theme=dark] wsx-marked-code .token.char,[data-theme=dark] wsx-marked-code .token.builtin,[data-theme=dark] wsx-marked-code .token.inserted,.dark wsx-marked-code .token.selector,.dark wsx-marked-code .token.attr-name,.dark wsx-marked-code .token.string,.dark wsx-marked-code .token.char,.dark wsx-marked-code .token.builtin,.dark wsx-marked-code .token.inserted{color:#e6db74}[data-theme=dark] wsx-marked-code .token.operator,[data-theme=dark] wsx-marked-code .token.entity,[data-theme=dark] wsx-marked-code .token.url,[data-theme=dark] wsx-marked-code .language-css .token.string,[data-theme=dark] wsx-marked-code .style .token.string,.dark wsx-marked-code .token.operator,.dark wsx-marked-code .token.entity,.dark wsx-marked-code .token.url,.dark wsx-marked-code .language-css .token.string,.dark wsx-marked-code .style .token.string{color:#f8f8f2}[data-theme=dark] wsx-marked-code .token.atrule,[data-theme=dark] wsx-marked-code .token.attr-value,[data-theme=dark] wsx-marked-code .token.keyword,.dark wsx-marked-code .token.atrule,.dark wsx-marked-code .token.attr-value,.dark wsx-marked-code .token.keyword{color:#66d9ef;font-weight:500}[data-theme=dark] wsx-marked-code .token.function,[data-theme=dark] wsx-marked-code .token.class-name,.dark wsx-marked-code .token.function,.dark wsx-marked-code .token.class-name{color:#a6e22e}[data-theme=dark] wsx-marked-code .token.regex,[data-theme=dark] wsx-marked-code .token.important,[data-theme=dark] wsx-marked-code .token.variable,.dark wsx-marked-code .token.regex,.dark wsx-marked-code .token.important,.dark wsx-marked-code .token.variable{color:#fd971f}[data-theme=dark] wsx-marked-code .token.decorator,[data-theme=dark] wsx-marked-code .token.decorator-name,.dark wsx-marked-code .token.decorator,.dark wsx-marked-code .token.decorator-name{color:#fd971f}[data-theme=dark] wsx-marked-code .token.web-component,[data-theme=dark] wsx-marked-code .token.tag-name,.dark wsx-marked-code .token.web-component,.dark wsx-marked-code .token.tag-name{color:#a6e22e}wsx-marked-code .token.namespace{opacity:.7}wsx-marked-code .token.important{font-weight:700}wsx-marked-code .token.bold{font-weight:700}wsx-marked-code .token.italic{font-style:italic}wsx-marked-code pre::-webkit-scrollbar{height:8px}wsx-marked-code pre::-webkit-scrollbar-track{background:transparent}wsx-marked-code pre::-webkit-scrollbar-thumb{background:var(--border-color, #e5e7eb);border-radius:4px}wsx-marked-code pre::-webkit-scrollbar-thumb:hover{background:var(--text-secondary, #6b7280)}@media (max-width: 768px){wsx-marked-code .language-label{padding:.5rem 1rem;font-size:.8rem}wsx-marked-code pre{padding:1rem;font-size:.85rem}}";
|
|
151
|
-
var
|
|
152
|
-
function
|
|
154
|
+
Ae = ot;
|
|
155
|
+
[nt, Se] = tt(Ae, [], _e, 0, void 0, q).c;
|
|
156
|
+
Se();
|
|
157
|
+
const de = "wsx-marked-code{display:block;width:100%;margin:1rem 0;position:relative}.code-container{display:flex;flex-direction:column;width:100%;background:var(--bg-secondary, #fde8d1);border-radius:12px;overflow:hidden;box-shadow:0 8px 30px #0000001a;border:1px solid var(--border-color, #fed7aa)}wsx-marked-code .language-label{display:block;padding:.75rem 1.5rem;background:var(--bg-primary, #fef2e5);border-bottom:1px solid var(--border-color, #fed7aa);color:var(--text-primary, #2c3e50);font-weight:600;font-size:.9rem;text-transform:uppercase;letter-spacing:.5px}wsx-marked-code pre{padding:1.5rem;margin:0;background:var(--bg-primary, #fef2e5);color:var(--text-primary, #2c3e50);font-family:Monaco,Menlo,Ubuntu Mono,monospace;font-size:.9rem;line-height:1.6;overflow-x:auto;position:relative}wsx-marked-code code{display:block;background:transparent;padding:0;border:none;font-family:inherit;font-size:inherit;white-space:pre;word-wrap:normal;word-break:normal;tab-size:4;-moz-tab-size:4;-o-tab-size:4}@media (prefers-color-scheme: dark){.code-container{background:var(--bg-secondary, #2d2d2d);border-color:var(--border-color, #404040)}wsx-marked-code .language-label{background:var(--bg-primary, #1a1a1a);border-color:var(--border-color, #404040);color:var(--text-primary, #ffffff)}wsx-marked-code pre{background:#2d2d2d;color:#f8f8f2}}.light .code-container,[data-theme=light] .code-container{background:var(--bg-secondary, #fde8d1);border-color:var(--border-color, #fed7aa)}.light wsx-marked-code .language-label,[data-theme=light] wsx-marked-code .language-label{background:var(--bg-primary, #fef2e5);border-color:var(--border-color, #fed7aa);color:var(--text-primary, #2c3e50)}.light wsx-marked-code pre,[data-theme=light] wsx-marked-code pre{background:var(--bg-primary, #fef2e5);color:var(--text-primary, #2c3e50)}[data-theme=dark] .code-container,.dark .code-container{background:var(--bg-secondary, #2d2d2d);border-color:var(--border-color, #404040)}[data-theme=dark] wsx-marked-code .language-label,.dark wsx-marked-code .language-label{background:var(--bg-primary, #1a1a1a);border-color:var(--border-color, #404040);color:var(--text-primary, #ffffff)}[data-theme=dark] wsx-marked-code pre,.dark wsx-marked-code pre{background:#2d2d2d;color:#f8f8f2}.light wsx-marked-code code[class*=language-],[data-theme=light] wsx-marked-code code[class*=language-]{background:transparent;color:#1f2937}.light wsx-marked-code .token.comment,.light wsx-marked-code .token.prolog,.light wsx-marked-code .token.doctype,.light wsx-marked-code .token.cdata,[data-theme=light] wsx-marked-code .token.comment,[data-theme=light] wsx-marked-code .token.prolog,[data-theme=light] wsx-marked-code .token.doctype,[data-theme=light] wsx-marked-code .token.cdata{color:#4b5563;font-style:italic}.light wsx-marked-code .token.punctuation,[data-theme=light] wsx-marked-code .token.punctuation{color:#111827}.light wsx-marked-code .token.property,.light wsx-marked-code .token.tag,.light wsx-marked-code .token.boolean,.light wsx-marked-code .token.number,.light wsx-marked-code .token.constant,.light wsx-marked-code .token.symbol,.light wsx-marked-code .token.deleted,[data-theme=light] wsx-marked-code .token.property,[data-theme=light] wsx-marked-code .token.tag,[data-theme=light] wsx-marked-code .token.boolean,[data-theme=light] wsx-marked-code .token.number,[data-theme=light] wsx-marked-code .token.constant,[data-theme=light] wsx-marked-code .token.symbol,[data-theme=light] wsx-marked-code .token.deleted{color:#be185d}.light wsx-marked-code .token.selector,.light wsx-marked-code .token.attr-name,.light wsx-marked-code .token.string,.light wsx-marked-code .token.char,.light wsx-marked-code .token.builtin,.light wsx-marked-code .token.inserted,[data-theme=light] wsx-marked-code .token.selector,[data-theme=light] wsx-marked-code .token.attr-name,[data-theme=light] wsx-marked-code .token.string,[data-theme=light] wsx-marked-code .token.char,[data-theme=light] wsx-marked-code .token.builtin,[data-theme=light] wsx-marked-code .token.inserted{color:#059669}.light wsx-marked-code .token.operator,.light wsx-marked-code .token.entity,.light wsx-marked-code .token.url,.light wsx-marked-code .language-css .token.string,.light wsx-marked-code .style .token.string,[data-theme=light] wsx-marked-code .token.operator,[data-theme=light] wsx-marked-code .token.entity,[data-theme=light] wsx-marked-code .token.url,[data-theme=light] wsx-marked-code .language-css .token.string,[data-theme=light] wsx-marked-code .style .token.string{color:#111827}.light wsx-marked-code .token.atrule,.light wsx-marked-code .token.attr-value,.light wsx-marked-code .token.keyword,[data-theme=light] wsx-marked-code .token.atrule,[data-theme=light] wsx-marked-code .token.attr-value,[data-theme=light] wsx-marked-code .token.keyword{color:#7c3aed;font-weight:600}.light wsx-marked-code .token.function,.light wsx-marked-code .token.class-name,[data-theme=light] wsx-marked-code .token.function,[data-theme=light] wsx-marked-code .token.class-name{color:#0369a1}.light wsx-marked-code .token.regex,.light wsx-marked-code .token.important,.light wsx-marked-code .token.variable,[data-theme=light] wsx-marked-code .token.regex,[data-theme=light] wsx-marked-code .token.important,[data-theme=light] wsx-marked-code .token.variable{color:#c2410c}.light wsx-marked-code .token.decorator,.light wsx-marked-code .token.decorator-name,[data-theme=light] wsx-marked-code .token.decorator,[data-theme=light] wsx-marked-code .token.decorator-name{color:#c2410c}.light wsx-marked-code .token.web-component,.light wsx-marked-code .token.tag-name,[data-theme=light] wsx-marked-code .token.web-component,[data-theme=light] wsx-marked-code .token.tag-name{color:#0369a1}wsx-marked-code code[class*=language-]{background:transparent;color:#24292e}wsx-marked-code .token.comment,wsx-marked-code .token.prolog,wsx-marked-code .token.doctype,wsx-marked-code .token.cdata{color:#5a6268;font-style:italic}wsx-marked-code .token.punctuation{color:#1a1a1a}wsx-marked-code .token.property,wsx-marked-code .token.tag,wsx-marked-code .token.boolean,wsx-marked-code .token.number,wsx-marked-code .token.constant,wsx-marked-code .token.symbol,wsx-marked-code .token.deleted{color:#c7254e}wsx-marked-code .token.selector,wsx-marked-code .token.attr-name,wsx-marked-code .token.string,wsx-marked-code .token.char,wsx-marked-code .token.builtin,wsx-marked-code .token.inserted{color:#005cc5}wsx-marked-code .token.operator,wsx-marked-code .token.entity,wsx-marked-code .token.url,wsx-marked-code .language-css .token.string,wsx-marked-code .style .token.string{color:#1a1a1a}wsx-marked-code .token.atrule,wsx-marked-code .token.attr-value,wsx-marked-code .token.keyword{color:#d73a49;font-weight:600}wsx-marked-code .token.function,wsx-marked-code .token.class-name{color:#6f42c1}wsx-marked-code .token.regex,wsx-marked-code .token.important,wsx-marked-code .token.variable{color:#e36209}wsx-marked-code .token.decorator,wsx-marked-code .token.decorator-name{color:#e36209}wsx-marked-code .token.web-component,wsx-marked-code .token.tag-name{color:#6f42c1}@media (prefers-color-scheme: dark){wsx-marked-code code[class*=language-]{color:#f8f8f2}wsx-marked-code .token.comment,wsx-marked-code .token.prolog,wsx-marked-code .token.doctype,wsx-marked-code .token.cdata{color:#75715e;font-style:italic}wsx-marked-code .token.punctuation{color:#f8f8f2}wsx-marked-code .token.property,wsx-marked-code .token.tag,wsx-marked-code .token.boolean,wsx-marked-code .token.number,wsx-marked-code .token.constant,wsx-marked-code .token.symbol,wsx-marked-code .token.deleted{color:#f92672}wsx-marked-code .token.selector,wsx-marked-code .token.attr-name,wsx-marked-code .token.string,wsx-marked-code .token.char,wsx-marked-code .token.builtin,wsx-marked-code .token.inserted{color:#e6db74}wsx-marked-code .token.operator,wsx-marked-code .token.entity,wsx-marked-code .token.url,wsx-marked-code .language-css .token.string,wsx-marked-code .style .token.string{color:#f8f8f2}wsx-marked-code .token.atrule,wsx-marked-code .token.attr-value,wsx-marked-code .token.keyword{color:#66d9ef;font-weight:500}wsx-marked-code .token.function,wsx-marked-code .token.class-name{color:#a6e22e}wsx-marked-code .token.regex,wsx-marked-code .token.important,wsx-marked-code .token.variable{color:#fd971f}wsx-marked-code .token.decorator,wsx-marked-code .token.decorator-name{color:#fd971f}wsx-marked-code .token.web-component,wsx-marked-code .token.tag-name{color:#a6e22e}}[data-theme=dark] wsx-marked-code code[class*=language-],.dark wsx-marked-code code[class*=language-]{color:#f8f8f2}[data-theme=dark] wsx-marked-code .token.comment,[data-theme=dark] wsx-marked-code .token.prolog,[data-theme=dark] wsx-marked-code .token.doctype,[data-theme=dark] wsx-marked-code .token.cdata,.dark wsx-marked-code .token.comment,.dark wsx-marked-code .token.prolog,.dark wsx-marked-code .token.doctype,.dark wsx-marked-code .token.cdata{color:#75715e;font-style:italic}[data-theme=dark] wsx-marked-code .token.punctuation,.dark wsx-marked-code .token.punctuation{color:#f8f8f2}[data-theme=dark] wsx-marked-code .token.property,[data-theme=dark] wsx-marked-code .token.tag,[data-theme=dark] wsx-marked-code .token.boolean,[data-theme=dark] wsx-marked-code .token.number,[data-theme=dark] wsx-marked-code .token.constant,[data-theme=dark] wsx-marked-code .token.symbol,[data-theme=dark] wsx-marked-code .token.deleted,.dark wsx-marked-code .token.property,.dark wsx-marked-code .token.tag,.dark wsx-marked-code .token.boolean,.dark wsx-marked-code .token.number,.dark wsx-marked-code .token.constant,.dark wsx-marked-code .token.symbol,.dark wsx-marked-code .token.deleted{color:#f92672}[data-theme=dark] wsx-marked-code .token.selector,[data-theme=dark] wsx-marked-code .token.attr-name,[data-theme=dark] wsx-marked-code .token.string,[data-theme=dark] wsx-marked-code .token.char,[data-theme=dark] wsx-marked-code .token.builtin,[data-theme=dark] wsx-marked-code .token.inserted,.dark wsx-marked-code .token.selector,.dark wsx-marked-code .token.attr-name,.dark wsx-marked-code .token.string,.dark wsx-marked-code .token.char,.dark wsx-marked-code .token.builtin,.dark wsx-marked-code .token.inserted{color:#e6db74}[data-theme=dark] wsx-marked-code .token.operator,[data-theme=dark] wsx-marked-code .token.entity,[data-theme=dark] wsx-marked-code .token.url,[data-theme=dark] wsx-marked-code .language-css .token.string,[data-theme=dark] wsx-marked-code .style .token.string,.dark wsx-marked-code .token.operator,.dark wsx-marked-code .token.entity,.dark wsx-marked-code .token.url,.dark wsx-marked-code .language-css .token.string,.dark wsx-marked-code .style .token.string{color:#f8f8f2}[data-theme=dark] wsx-marked-code .token.atrule,[data-theme=dark] wsx-marked-code .token.attr-value,[data-theme=dark] wsx-marked-code .token.keyword,.dark wsx-marked-code .token.atrule,.dark wsx-marked-code .token.attr-value,.dark wsx-marked-code .token.keyword{color:#66d9ef;font-weight:500}[data-theme=dark] wsx-marked-code .token.function,[data-theme=dark] wsx-marked-code .token.class-name,.dark wsx-marked-code .token.function,.dark wsx-marked-code .token.class-name{color:#a6e22e}[data-theme=dark] wsx-marked-code .token.regex,[data-theme=dark] wsx-marked-code .token.important,[data-theme=dark] wsx-marked-code .token.variable,.dark wsx-marked-code .token.regex,.dark wsx-marked-code .token.important,.dark wsx-marked-code .token.variable{color:#fd971f}[data-theme=dark] wsx-marked-code .token.decorator,[data-theme=dark] wsx-marked-code .token.decorator-name,.dark wsx-marked-code .token.decorator,.dark wsx-marked-code .token.decorator-name{color:#fd971f}[data-theme=dark] wsx-marked-code .token.web-component,[data-theme=dark] wsx-marked-code .token.tag-name,.dark wsx-marked-code .token.web-component,.dark wsx-marked-code .token.tag-name{color:#a6e22e}wsx-marked-code .token.namespace{opacity:.7}wsx-marked-code .token.important{font-weight:700}wsx-marked-code .token.bold{font-weight:700}wsx-marked-code .token.italic{font-style:italic}wsx-marked-code pre::-webkit-scrollbar{height:8px}wsx-marked-code pre::-webkit-scrollbar-track{background:transparent}wsx-marked-code pre::-webkit-scrollbar-thumb{background:var(--border-color, #e5e7eb);border-radius:4px}wsx-marked-code pre::-webkit-scrollbar-thumb:hover{background:var(--text-secondary, #6b7280)}@media (max-width: 768px){wsx-marked-code .language-label{padding:.5rem 1rem;font-size:.8rem}wsx-marked-code pre{padding:1rem;font-size:.85rem}}";
|
|
158
|
+
var ge = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
159
|
+
function st(e) {
|
|
153
160
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
154
161
|
}
|
|
155
162
|
var Ie = { exports: {} };
|
|
@@ -163,8 +170,8 @@ var Ie = { exports: {} };
|
|
|
163
170
|
* @namespace
|
|
164
171
|
* @public
|
|
165
172
|
*/
|
|
166
|
-
var r = function(
|
|
167
|
-
var
|
|
173
|
+
var r = function(o) {
|
|
174
|
+
var _ = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, P = 0, S = {}, E = {
|
|
168
175
|
/**
|
|
169
176
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
170
177
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
@@ -186,7 +193,7 @@ var Ie = { exports: {} };
|
|
|
186
193
|
* @memberof Prism
|
|
187
194
|
* @public
|
|
188
195
|
*/
|
|
189
|
-
manual:
|
|
196
|
+
manual: o.Prism && o.Prism.manual,
|
|
190
197
|
/**
|
|
191
198
|
* By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
|
|
192
199
|
* `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
|
|
@@ -208,7 +215,7 @@ var Ie = { exports: {} };
|
|
|
208
215
|
* @memberof Prism
|
|
209
216
|
* @public
|
|
210
217
|
*/
|
|
211
|
-
disableWorkerMessageHandler:
|
|
218
|
+
disableWorkerMessageHandler: o.Prism && o.Prism.disableWorkerMessageHandler,
|
|
212
219
|
/**
|
|
213
220
|
* A namespace for utility methods.
|
|
214
221
|
*
|
|
@@ -220,7 +227,7 @@ var Ie = { exports: {} };
|
|
|
220
227
|
*/
|
|
221
228
|
util: {
|
|
222
229
|
encode: function a(i) {
|
|
223
|
-
return i instanceof
|
|
230
|
+
return i instanceof w ? new w(i.type, a(i.content), i.alias) : Array.isArray(i) ? i.map(a) : i.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
224
231
|
},
|
|
225
232
|
/**
|
|
226
233
|
* Returns the name of the type of the given value.
|
|
@@ -248,7 +255,7 @@ var Ie = { exports: {} };
|
|
|
248
255
|
* @returns {number}
|
|
249
256
|
*/
|
|
250
257
|
objId: function(a) {
|
|
251
|
-
return a.__id || Object.defineProperty(a, "__id", { value:
|
|
258
|
+
return a.__id || Object.defineProperty(a, "__id", { value: ++P }), a.__id;
|
|
252
259
|
},
|
|
253
260
|
/**
|
|
254
261
|
* Creates a deep clone of the given object.
|
|
@@ -262,13 +269,13 @@ var Ie = { exports: {} };
|
|
|
262
269
|
*/
|
|
263
270
|
clone: function a(i, p) {
|
|
264
271
|
p = p || {};
|
|
265
|
-
var g,
|
|
266
|
-
switch (
|
|
272
|
+
var g, k;
|
|
273
|
+
switch (E.util.type(i)) {
|
|
267
274
|
case "Object":
|
|
268
|
-
if (
|
|
269
|
-
return p[
|
|
275
|
+
if (k = E.util.objId(i), p[k])
|
|
276
|
+
return p[k];
|
|
270
277
|
g = /** @type {Record<string, any>} */
|
|
271
|
-
{}, p[
|
|
278
|
+
{}, p[k] = g;
|
|
272
279
|
for (var h in i)
|
|
273
280
|
i.hasOwnProperty(h) && (g[h] = a(i[h], p));
|
|
274
281
|
return (
|
|
@@ -276,10 +283,10 @@ var Ie = { exports: {} };
|
|
|
276
283
|
g
|
|
277
284
|
);
|
|
278
285
|
case "Array":
|
|
279
|
-
return
|
|
286
|
+
return k = E.util.objId(i), p[k] ? p[k] : (g = [], p[k] = g, /** @type {Array} */
|
|
280
287
|
/** @type {any} */
|
|
281
|
-
i.forEach(function(
|
|
282
|
-
g[
|
|
288
|
+
i.forEach(function(m, c) {
|
|
289
|
+
g[c] = a(m, p);
|
|
283
290
|
}), /** @type {any} */
|
|
284
291
|
g);
|
|
285
292
|
default:
|
|
@@ -296,7 +303,7 @@ var Ie = { exports: {} };
|
|
|
296
303
|
*/
|
|
297
304
|
getLanguage: function(a) {
|
|
298
305
|
for (; a; ) {
|
|
299
|
-
var i =
|
|
306
|
+
var i = _.exec(a.className);
|
|
300
307
|
if (i)
|
|
301
308
|
return i[1].toLowerCase();
|
|
302
309
|
a = a.parentElement;
|
|
@@ -311,7 +318,7 @@ var Ie = { exports: {} };
|
|
|
311
318
|
* @returns {void}
|
|
312
319
|
*/
|
|
313
320
|
setLanguage: function(a, i) {
|
|
314
|
-
a.className = a.className.replace(RegExp(
|
|
321
|
+
a.className = a.className.replace(RegExp(_, "gi"), ""), a.classList.add("language-" + i);
|
|
315
322
|
},
|
|
316
323
|
/**
|
|
317
324
|
* Returns the script element that is currently executing.
|
|
@@ -362,10 +369,10 @@ var Ie = { exports: {} };
|
|
|
362
369
|
*/
|
|
363
370
|
isActive: function(a, i, p) {
|
|
364
371
|
for (var g = "no-" + i; a; ) {
|
|
365
|
-
var
|
|
366
|
-
if (
|
|
372
|
+
var k = a.classList;
|
|
373
|
+
if (k.contains(i))
|
|
367
374
|
return !0;
|
|
368
|
-
if (
|
|
375
|
+
if (k.contains(g))
|
|
369
376
|
return !1;
|
|
370
377
|
a = a.parentElement;
|
|
371
378
|
}
|
|
@@ -383,10 +390,10 @@ var Ie = { exports: {} };
|
|
|
383
390
|
/**
|
|
384
391
|
* The grammar for plain, unformatted text.
|
|
385
392
|
*/
|
|
386
|
-
plain:
|
|
387
|
-
plaintext:
|
|
388
|
-
text:
|
|
389
|
-
txt:
|
|
393
|
+
plain: S,
|
|
394
|
+
plaintext: S,
|
|
395
|
+
text: S,
|
|
396
|
+
txt: S,
|
|
390
397
|
/**
|
|
391
398
|
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
392
399
|
*
|
|
@@ -416,7 +423,7 @@ var Ie = { exports: {} };
|
|
|
416
423
|
* });
|
|
417
424
|
*/
|
|
418
425
|
extend: function(a, i) {
|
|
419
|
-
var p =
|
|
426
|
+
var p = E.util.clone(E.languages[a]);
|
|
420
427
|
for (var g in i)
|
|
421
428
|
p[g] = i[g];
|
|
422
429
|
return p;
|
|
@@ -498,29 +505,29 @@ var Ie = { exports: {} };
|
|
|
498
505
|
*/
|
|
499
506
|
insertBefore: function(a, i, p, g) {
|
|
500
507
|
g = g || /** @type {any} */
|
|
501
|
-
|
|
502
|
-
var
|
|
503
|
-
for (var
|
|
504
|
-
if (
|
|
505
|
-
if (
|
|
506
|
-
for (var
|
|
507
|
-
p.hasOwnProperty(
|
|
508
|
-
p.hasOwnProperty(
|
|
508
|
+
E.languages;
|
|
509
|
+
var k = g[a], h = {};
|
|
510
|
+
for (var m in k)
|
|
511
|
+
if (k.hasOwnProperty(m)) {
|
|
512
|
+
if (m == i)
|
|
513
|
+
for (var c in p)
|
|
514
|
+
p.hasOwnProperty(c) && (h[c] = p[c]);
|
|
515
|
+
p.hasOwnProperty(m) || (h[m] = k[m]);
|
|
509
516
|
}
|
|
510
517
|
var b = g[a];
|
|
511
|
-
return g[a] = h,
|
|
512
|
-
|
|
518
|
+
return g[a] = h, E.languages.DFS(E.languages, function(A, x) {
|
|
519
|
+
x === b && A != a && (this[A] = h);
|
|
513
520
|
}), h;
|
|
514
521
|
},
|
|
515
522
|
// Traverse a language definition with Depth First Search
|
|
516
|
-
DFS: function a(i, p, g,
|
|
517
|
-
|
|
518
|
-
var h =
|
|
519
|
-
for (var
|
|
520
|
-
if (i.hasOwnProperty(
|
|
521
|
-
p.call(i,
|
|
522
|
-
var
|
|
523
|
-
b === "Object" && !
|
|
523
|
+
DFS: function a(i, p, g, k) {
|
|
524
|
+
k = k || {};
|
|
525
|
+
var h = E.util.objId;
|
|
526
|
+
for (var m in i)
|
|
527
|
+
if (i.hasOwnProperty(m)) {
|
|
528
|
+
p.call(i, m, i[m], g || m);
|
|
529
|
+
var c = i[m], b = E.util.type(c);
|
|
530
|
+
b === "Object" && !k[h(c)] ? (k[h(c)] = !0, a(c, p, null, k)) : b === "Array" && !k[h(c)] && (k[h(c)] = !0, a(c, p, m, k));
|
|
524
531
|
}
|
|
525
532
|
}
|
|
526
533
|
},
|
|
@@ -538,7 +545,7 @@ var Ie = { exports: {} };
|
|
|
538
545
|
* @public
|
|
539
546
|
*/
|
|
540
547
|
highlightAll: function(a, i) {
|
|
541
|
-
|
|
548
|
+
E.highlightAllUnder(document, a, i);
|
|
542
549
|
},
|
|
543
550
|
/**
|
|
544
551
|
* Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
|
|
@@ -561,9 +568,9 @@ var Ie = { exports: {} };
|
|
|
561
568
|
container: a,
|
|
562
569
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
|
563
570
|
};
|
|
564
|
-
|
|
565
|
-
for (var
|
|
566
|
-
|
|
571
|
+
E.hooks.run("before-highlightall", g), g.elements = Array.prototype.slice.apply(g.container.querySelectorAll(g.selector)), E.hooks.run("before-all-elements-highlight", g);
|
|
572
|
+
for (var k = 0, h; h = g.elements[k++]; )
|
|
573
|
+
E.highlightElement(h, i === !0, g.callback);
|
|
567
574
|
},
|
|
568
575
|
/**
|
|
569
576
|
* Highlights the code inside a single element.
|
|
@@ -594,38 +601,38 @@ var Ie = { exports: {} };
|
|
|
594
601
|
* @public
|
|
595
602
|
*/
|
|
596
603
|
highlightElement: function(a, i, p) {
|
|
597
|
-
var g =
|
|
598
|
-
|
|
604
|
+
var g = E.util.getLanguage(a), k = E.languages[g];
|
|
605
|
+
E.util.setLanguage(a, g);
|
|
599
606
|
var h = a.parentElement;
|
|
600
|
-
h && h.nodeName.toLowerCase() === "pre" &&
|
|
601
|
-
var
|
|
607
|
+
h && h.nodeName.toLowerCase() === "pre" && E.util.setLanguage(h, g);
|
|
608
|
+
var m = a.textContent, c = {
|
|
602
609
|
element: a,
|
|
603
610
|
language: g,
|
|
604
|
-
grammar:
|
|
605
|
-
code:
|
|
611
|
+
grammar: k,
|
|
612
|
+
code: m
|
|
606
613
|
};
|
|
607
|
-
function b(
|
|
608
|
-
|
|
614
|
+
function b(x) {
|
|
615
|
+
c.highlightedCode = x, E.hooks.run("before-insert", c), c.element.innerHTML = c.highlightedCode, E.hooks.run("after-highlight", c), E.hooks.run("complete", c), p && p.call(c.element);
|
|
609
616
|
}
|
|
610
|
-
if (
|
|
611
|
-
|
|
617
|
+
if (E.hooks.run("before-sanity-check", c), h = c.element.parentElement, h && h.nodeName.toLowerCase() === "pre" && !h.hasAttribute("tabindex") && h.setAttribute("tabindex", "0"), !c.code) {
|
|
618
|
+
E.hooks.run("complete", c), p && p.call(c.element);
|
|
612
619
|
return;
|
|
613
620
|
}
|
|
614
|
-
if (
|
|
615
|
-
b(
|
|
621
|
+
if (E.hooks.run("before-highlight", c), !c.grammar) {
|
|
622
|
+
b(E.util.encode(c.code));
|
|
616
623
|
return;
|
|
617
624
|
}
|
|
618
|
-
if (i &&
|
|
619
|
-
var
|
|
620
|
-
|
|
621
|
-
b(
|
|
622
|
-
},
|
|
623
|
-
language:
|
|
624
|
-
code:
|
|
625
|
+
if (i && o.Worker) {
|
|
626
|
+
var A = new Worker(E.filename);
|
|
627
|
+
A.onmessage = function(x) {
|
|
628
|
+
b(x.data);
|
|
629
|
+
}, A.postMessage(JSON.stringify({
|
|
630
|
+
language: c.language,
|
|
631
|
+
code: c.code,
|
|
625
632
|
immediateClose: !0
|
|
626
633
|
}));
|
|
627
634
|
} else
|
|
628
|
-
b(
|
|
635
|
+
b(E.highlight(c.code, c.grammar, c.language));
|
|
629
636
|
},
|
|
630
637
|
/**
|
|
631
638
|
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
|
@@ -653,9 +660,9 @@ var Ie = { exports: {} };
|
|
|
653
660
|
grammar: i,
|
|
654
661
|
language: p
|
|
655
662
|
};
|
|
656
|
-
if (
|
|
663
|
+
if (E.hooks.run("before-tokenize", g), !g.grammar)
|
|
657
664
|
throw new Error('The language "' + g.language + '" has no grammar.');
|
|
658
|
-
return g.tokens =
|
|
665
|
+
return g.tokens = E.tokenize(g.code, g.grammar), E.hooks.run("after-tokenize", g), w.stringify(E.util.encode(g.tokens), g.language);
|
|
659
666
|
},
|
|
660
667
|
/**
|
|
661
668
|
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
@@ -688,8 +695,8 @@ var Ie = { exports: {} };
|
|
|
688
695
|
i[g] = p[g];
|
|
689
696
|
delete i.rest;
|
|
690
697
|
}
|
|
691
|
-
var
|
|
692
|
-
return N(
|
|
698
|
+
var k = new T();
|
|
699
|
+
return N(k, k.head, a), L(a, k, i, k.head, 0), n(k);
|
|
693
700
|
},
|
|
694
701
|
/**
|
|
695
702
|
* @namespace
|
|
@@ -711,7 +718,7 @@ var Ie = { exports: {} };
|
|
|
711
718
|
* @public
|
|
712
719
|
*/
|
|
713
720
|
add: function(a, i) {
|
|
714
|
-
var p =
|
|
721
|
+
var p = E.hooks.all;
|
|
715
722
|
p[a] = p[a] || [], p[a].push(i);
|
|
716
723
|
},
|
|
717
724
|
/**
|
|
@@ -724,19 +731,19 @@ var Ie = { exports: {} };
|
|
|
724
731
|
* @public
|
|
725
732
|
*/
|
|
726
733
|
run: function(a, i) {
|
|
727
|
-
var p =
|
|
734
|
+
var p = E.hooks.all[a];
|
|
728
735
|
if (!(!p || !p.length))
|
|
729
|
-
for (var g = 0,
|
|
730
|
-
|
|
736
|
+
for (var g = 0, k; k = p[g++]; )
|
|
737
|
+
k(i);
|
|
731
738
|
}
|
|
732
739
|
},
|
|
733
|
-
Token:
|
|
740
|
+
Token: w
|
|
734
741
|
};
|
|
735
|
-
|
|
736
|
-
function
|
|
742
|
+
o.Prism = E;
|
|
743
|
+
function w(a, i, p, g) {
|
|
737
744
|
this.type = a, this.content = i, this.alias = p, this.length = (g || "").length | 0;
|
|
738
745
|
}
|
|
739
|
-
|
|
746
|
+
w.stringify = function a(i, p) {
|
|
740
747
|
if (typeof i == "string")
|
|
741
748
|
return i;
|
|
742
749
|
if (Array.isArray(i)) {
|
|
@@ -745,7 +752,7 @@ var Ie = { exports: {} };
|
|
|
745
752
|
g += a(b, p);
|
|
746
753
|
}), g;
|
|
747
754
|
}
|
|
748
|
-
var
|
|
755
|
+
var k = {
|
|
749
756
|
type: i.type,
|
|
750
757
|
content: a(i.content, p),
|
|
751
758
|
tag: "span",
|
|
@@ -753,105 +760,105 @@ var Ie = { exports: {} };
|
|
|
753
760
|
attributes: {},
|
|
754
761
|
language: p
|
|
755
762
|
}, h = i.alias;
|
|
756
|
-
h && (Array.isArray(h) ? Array.prototype.push.apply(
|
|
757
|
-
var
|
|
758
|
-
for (var
|
|
759
|
-
|
|
760
|
-
return "<" +
|
|
763
|
+
h && (Array.isArray(h) ? Array.prototype.push.apply(k.classes, h) : k.classes.push(h)), E.hooks.run("wrap", k);
|
|
764
|
+
var m = "";
|
|
765
|
+
for (var c in k.attributes)
|
|
766
|
+
m += " " + c + '="' + (k.attributes[c] || "").replace(/"/g, """) + '"';
|
|
767
|
+
return "<" + k.tag + ' class="' + k.classes.join(" ") + '"' + m + ">" + k.content + "</" + k.tag + ">";
|
|
761
768
|
};
|
|
762
769
|
function D(a, i, p, g) {
|
|
763
770
|
a.lastIndex = i;
|
|
764
|
-
var
|
|
765
|
-
if (
|
|
766
|
-
var h =
|
|
767
|
-
|
|
771
|
+
var k = a.exec(p);
|
|
772
|
+
if (k && g && k[1]) {
|
|
773
|
+
var h = k[1].length;
|
|
774
|
+
k.index += h, k[0] = k[0].slice(h);
|
|
768
775
|
}
|
|
769
|
-
return
|
|
776
|
+
return k;
|
|
770
777
|
}
|
|
771
|
-
function
|
|
772
|
-
for (var
|
|
773
|
-
if (!(!p.hasOwnProperty(
|
|
774
|
-
var
|
|
775
|
-
|
|
776
|
-
for (var b = 0; b <
|
|
777
|
-
if (h && h.cause ==
|
|
778
|
+
function L(a, i, p, g, k, h) {
|
|
779
|
+
for (var m in p)
|
|
780
|
+
if (!(!p.hasOwnProperty(m) || !p[m])) {
|
|
781
|
+
var c = p[m];
|
|
782
|
+
c = Array.isArray(c) ? c : [c];
|
|
783
|
+
for (var b = 0; b < c.length; ++b) {
|
|
784
|
+
if (h && h.cause == m + "," + b)
|
|
778
785
|
return;
|
|
779
|
-
var
|
|
780
|
-
if (
|
|
781
|
-
var
|
|
782
|
-
|
|
786
|
+
var A = c[b], x = A.inside, I = !!A.lookbehind, F = !!A.greedy, $ = A.alias;
|
|
787
|
+
if (F && !A.pattern.global) {
|
|
788
|
+
var s = A.pattern.toString().match(/[imsuy]*$/)[0];
|
|
789
|
+
A.pattern = RegExp(A.pattern.source, s + "g");
|
|
783
790
|
}
|
|
784
|
-
for (var
|
|
785
|
-
var
|
|
791
|
+
for (var R = A.pattern || A, v = g.next, y = k; v !== i.tail && !(h && y >= h.reach); y += v.value.length, v = v.next) {
|
|
792
|
+
var M = v.value;
|
|
786
793
|
if (i.length > a.length)
|
|
787
794
|
return;
|
|
788
|
-
if (!(
|
|
795
|
+
if (!(M instanceof w)) {
|
|
789
796
|
var Z = 1, B;
|
|
790
|
-
if (
|
|
791
|
-
if (B = D(
|
|
797
|
+
if (F) {
|
|
798
|
+
if (B = D(R, y, a, I), !B || B.index >= a.length)
|
|
792
799
|
break;
|
|
793
|
-
var z = B.index, X = B.index + B[0].length,
|
|
794
|
-
for (
|
|
795
|
-
|
|
796
|
-
if (
|
|
800
|
+
var z = B.index, X = B.index + B[0].length, C = y;
|
|
801
|
+
for (C += v.value.length; z >= C; )
|
|
802
|
+
v = v.next, C += v.value.length;
|
|
803
|
+
if (C -= v.value.length, y = C, v.value instanceof w)
|
|
797
804
|
continue;
|
|
798
|
-
for (var
|
|
799
|
-
Z++,
|
|
800
|
-
Z--,
|
|
801
|
-
} else if (B = D(
|
|
805
|
+
for (var j = v; j !== i.tail && (C < X || typeof j.value == "string"); j = j.next)
|
|
806
|
+
Z++, C += j.value.length;
|
|
807
|
+
Z--, M = a.slice(y, C), B.index -= y;
|
|
808
|
+
} else if (B = D(R, 0, M, I), !B)
|
|
802
809
|
continue;
|
|
803
|
-
var z = B.index, Y = B[0],
|
|
810
|
+
var z = B.index, Y = B[0], f = M.slice(0, z), O = M.slice(z + Y.length), H = y + M.length;
|
|
804
811
|
h && H > h.reach && (h.reach = H);
|
|
805
|
-
var
|
|
806
|
-
|
|
807
|
-
var
|
|
808
|
-
if (
|
|
812
|
+
var ee = v.prev;
|
|
813
|
+
f && (ee = N(i, ee, f), y += f.length), U(i, ee, Z);
|
|
814
|
+
var et = new w(m, x ? E.tokenize(Y, x) : Y, $, Y);
|
|
815
|
+
if (v = N(i, ee, et), O && N(i, v, O), Z > 1) {
|
|
809
816
|
var re = {
|
|
810
|
-
cause:
|
|
817
|
+
cause: m + "," + b,
|
|
811
818
|
reach: H
|
|
812
819
|
};
|
|
813
|
-
|
|
820
|
+
L(a, i, p, v.prev, y, re), h && re.reach > h.reach && (h.reach = re.reach);
|
|
814
821
|
}
|
|
815
822
|
}
|
|
816
823
|
}
|
|
817
824
|
}
|
|
818
825
|
}
|
|
819
826
|
}
|
|
820
|
-
function
|
|
827
|
+
function T() {
|
|
821
828
|
var a = { value: null, prev: null, next: null }, i = { value: null, prev: a, next: null };
|
|
822
829
|
a.next = i, this.head = a, this.tail = i, this.length = 0;
|
|
823
830
|
}
|
|
824
831
|
function N(a, i, p) {
|
|
825
|
-
var g = i.next,
|
|
826
|
-
return i.next =
|
|
832
|
+
var g = i.next, k = { value: p, prev: i, next: g };
|
|
833
|
+
return i.next = k, g.prev = k, a.length++, k;
|
|
827
834
|
}
|
|
828
835
|
function U(a, i, p) {
|
|
829
|
-
for (var g = i.next,
|
|
836
|
+
for (var g = i.next, k = 0; k < p && g !== a.tail; k++)
|
|
830
837
|
g = g.next;
|
|
831
|
-
i.next = g, g.prev = i, a.length -=
|
|
838
|
+
i.next = g, g.prev = i, a.length -= k;
|
|
832
839
|
}
|
|
833
|
-
function
|
|
840
|
+
function n(a) {
|
|
834
841
|
for (var i = [], p = a.head.next; p !== a.tail; )
|
|
835
842
|
i.push(p.value), p = p.next;
|
|
836
843
|
return i;
|
|
837
844
|
}
|
|
838
|
-
if (!
|
|
839
|
-
return
|
|
840
|
-
var i = JSON.parse(a.data), p = i.language, g = i.code,
|
|
841
|
-
|
|
842
|
-
}, !1)),
|
|
843
|
-
var
|
|
844
|
-
|
|
845
|
-
function
|
|
846
|
-
|
|
845
|
+
if (!o.document)
|
|
846
|
+
return o.addEventListener && (E.disableWorkerMessageHandler || o.addEventListener("message", function(a) {
|
|
847
|
+
var i = JSON.parse(a.data), p = i.language, g = i.code, k = i.immediateClose;
|
|
848
|
+
o.postMessage(E.highlight(g, E.languages[p], p)), k && o.close();
|
|
849
|
+
}, !1)), E;
|
|
850
|
+
var u = E.util.currentScript();
|
|
851
|
+
u && (E.filename = u.src, u.hasAttribute("data-manual") && (E.manual = !0));
|
|
852
|
+
function d() {
|
|
853
|
+
E.manual || E.highlightAll();
|
|
847
854
|
}
|
|
848
|
-
if (!
|
|
849
|
-
var
|
|
850
|
-
|
|
855
|
+
if (!E.manual) {
|
|
856
|
+
var l = document.readyState;
|
|
857
|
+
l === "loading" || l === "interactive" && u && u.defer ? document.addEventListener("DOMContentLoaded", d) : window.requestAnimationFrame ? window.requestAnimationFrame(d) : window.setTimeout(d, 16);
|
|
851
858
|
}
|
|
852
|
-
return
|
|
859
|
+
return E;
|
|
853
860
|
}(t);
|
|
854
|
-
e.exports && (e.exports = r), typeof
|
|
861
|
+
e.exports && (e.exports = r), typeof ge < "u" && (ge.Prism = r), r.languages.markup = {
|
|
855
862
|
comment: {
|
|
856
863
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
857
864
|
greedy: !0
|
|
@@ -928,8 +935,8 @@ var Ie = { exports: {} };
|
|
|
928
935
|
},
|
|
929
936
|
/&#x?[\da-f]{1,8};/i
|
|
930
937
|
]
|
|
931
|
-
}, r.languages.markup.tag.inside["attr-value"].inside.entity = r.languages.markup.entity, r.languages.markup.doctype.inside["internal-subset"].inside = r.languages.markup, r.hooks.add("wrap", function(
|
|
932
|
-
|
|
938
|
+
}, r.languages.markup.tag.inside["attr-value"].inside.entity = r.languages.markup.entity, r.languages.markup.doctype.inside["internal-subset"].inside = r.languages.markup, r.hooks.add("wrap", function(o) {
|
|
939
|
+
o.type === "entity" && (o.attributes.title = o.content.replace(/&/, "&"));
|
|
933
940
|
}), Object.defineProperty(r.languages.markup.tag, "addInlined", {
|
|
934
941
|
/**
|
|
935
942
|
* Adds an inlined language to markup.
|
|
@@ -942,32 +949,32 @@ var Ie = { exports: {} };
|
|
|
942
949
|
* @example
|
|
943
950
|
* addInlined('style', 'css');
|
|
944
951
|
*/
|
|
945
|
-
value: function(
|
|
946
|
-
var
|
|
947
|
-
|
|
952
|
+
value: function(_, P) {
|
|
953
|
+
var S = {};
|
|
954
|
+
S["language-" + P] = {
|
|
948
955
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
949
956
|
lookbehind: !0,
|
|
950
|
-
inside: r.languages[
|
|
951
|
-
},
|
|
952
|
-
var
|
|
957
|
+
inside: r.languages[P]
|
|
958
|
+
}, S.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
959
|
+
var E = {
|
|
953
960
|
"included-cdata": {
|
|
954
961
|
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
955
|
-
inside:
|
|
962
|
+
inside: S
|
|
956
963
|
}
|
|
957
964
|
};
|
|
958
|
-
|
|
965
|
+
E["language-" + P] = {
|
|
959
966
|
pattern: /[\s\S]+/,
|
|
960
|
-
inside: r.languages[
|
|
967
|
+
inside: r.languages[P]
|
|
961
968
|
};
|
|
962
|
-
var
|
|
963
|
-
|
|
969
|
+
var w = {};
|
|
970
|
+
w[_] = {
|
|
964
971
|
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
965
|
-
return
|
|
972
|
+
return _;
|
|
966
973
|
}), "i"),
|
|
967
974
|
lookbehind: !0,
|
|
968
975
|
greedy: !0,
|
|
969
|
-
inside:
|
|
970
|
-
}, r.languages.insertBefore("markup", "cdata",
|
|
976
|
+
inside: E
|
|
977
|
+
}, r.languages.insertBefore("markup", "cdata", w);
|
|
971
978
|
}
|
|
972
979
|
}), Object.defineProperty(r.languages.markup.tag, "addAttribute", {
|
|
973
980
|
/**
|
|
@@ -981,10 +988,10 @@ var Ie = { exports: {} };
|
|
|
981
988
|
* @example
|
|
982
989
|
* addAttribute('style', 'css');
|
|
983
990
|
*/
|
|
984
|
-
value: function(
|
|
991
|
+
value: function(o, _) {
|
|
985
992
|
r.languages.markup.tag.inside["special-attr"].push({
|
|
986
993
|
pattern: RegExp(
|
|
987
|
-
/(^|["'\s])/.source + "(?:" +
|
|
994
|
+
/(^|["'\s])/.source + "(?:" + o + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
|
988
995
|
"i"
|
|
989
996
|
),
|
|
990
997
|
lookbehind: !0,
|
|
@@ -996,8 +1003,8 @@ var Ie = { exports: {} };
|
|
|
996
1003
|
value: {
|
|
997
1004
|
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
|
998
1005
|
lookbehind: !0,
|
|
999
|
-
alias: [
|
|
1000
|
-
inside: r.languages[
|
|
1006
|
+
alias: [_, "language-" + _],
|
|
1007
|
+
inside: r.languages[_]
|
|
1001
1008
|
},
|
|
1002
1009
|
punctuation: [
|
|
1003
1010
|
{
|
|
@@ -1011,12 +1018,12 @@ var Ie = { exports: {} };
|
|
|
1011
1018
|
}
|
|
1012
1019
|
});
|
|
1013
1020
|
}
|
|
1014
|
-
}), r.languages.html = r.languages.markup, r.languages.mathml = r.languages.markup, r.languages.svg = r.languages.markup, r.languages.xml = r.languages.extend("markup", {}), r.languages.ssml = r.languages.xml, r.languages.atom = r.languages.xml, r.languages.rss = r.languages.xml, function(
|
|
1015
|
-
var
|
|
1016
|
-
|
|
1021
|
+
}), r.languages.html = r.languages.markup, r.languages.mathml = r.languages.markup, r.languages.svg = r.languages.markup, r.languages.xml = r.languages.extend("markup", {}), r.languages.ssml = r.languages.xml, r.languages.atom = r.languages.xml, r.languages.rss = r.languages.xml, function(o) {
|
|
1022
|
+
var _ = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
1023
|
+
o.languages.css = {
|
|
1017
1024
|
comment: /\/\*[\s\S]*?\*\//,
|
|
1018
1025
|
atrule: {
|
|
1019
|
-
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" +
|
|
1026
|
+
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + _.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
|
1020
1027
|
inside: {
|
|
1021
1028
|
rule: /^@[\w-]+/,
|
|
1022
1029
|
"selector-function-argument": {
|
|
@@ -1033,23 +1040,23 @@ var Ie = { exports: {} };
|
|
|
1033
1040
|
},
|
|
1034
1041
|
url: {
|
|
1035
1042
|
// https://drafts.csswg.org/css-values-3/#urls
|
|
1036
|
-
pattern: RegExp("\\burl\\((?:" +
|
|
1043
|
+
pattern: RegExp("\\burl\\((?:" + _.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
|
|
1037
1044
|
greedy: !0,
|
|
1038
1045
|
inside: {
|
|
1039
1046
|
function: /^url/i,
|
|
1040
1047
|
punctuation: /^\(|\)$/,
|
|
1041
1048
|
string: {
|
|
1042
|
-
pattern: RegExp("^" +
|
|
1049
|
+
pattern: RegExp("^" + _.source + "$"),
|
|
1043
1050
|
alias: "url"
|
|
1044
1051
|
}
|
|
1045
1052
|
}
|
|
1046
1053
|
},
|
|
1047
1054
|
selector: {
|
|
1048
|
-
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` +
|
|
1055
|
+
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + _.source + ")*(?=\\s*\\{)"),
|
|
1049
1056
|
lookbehind: !0
|
|
1050
1057
|
},
|
|
1051
1058
|
string: {
|
|
1052
|
-
pattern:
|
|
1059
|
+
pattern: _,
|
|
1053
1060
|
greedy: !0
|
|
1054
1061
|
},
|
|
1055
1062
|
property: {
|
|
@@ -1062,9 +1069,9 @@ var Ie = { exports: {} };
|
|
|
1062
1069
|
lookbehind: !0
|
|
1063
1070
|
},
|
|
1064
1071
|
punctuation: /[(){};:,]/
|
|
1065
|
-
},
|
|
1066
|
-
var
|
|
1067
|
-
|
|
1072
|
+
}, o.languages.css.atrule.inside.rest = o.languages.css;
|
|
1073
|
+
var P = o.languages.markup;
|
|
1074
|
+
P && (P.tag.addInlined("style", "css"), P.tag.addAttribute("style", "css"));
|
|
1068
1075
|
}(r), r.languages.clike = {
|
|
1069
1076
|
comment: [
|
|
1070
1077
|
{
|
|
@@ -1229,9 +1236,9 @@ var Ie = { exports: {} };
|
|
|
1229
1236
|
if (typeof r > "u" || typeof document > "u")
|
|
1230
1237
|
return;
|
|
1231
1238
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
1232
|
-
var
|
|
1233
|
-
return "✖ Error " +
|
|
1234
|
-
},
|
|
1239
|
+
var o = "Loading…", _ = function(u, d) {
|
|
1240
|
+
return "✖ Error " + u + " while fetching file: " + d;
|
|
1241
|
+
}, P = "✖ Error: File does not exist or is empty", S = {
|
|
1235
1242
|
js: "javascript",
|
|
1236
1243
|
py: "python",
|
|
1237
1244
|
rb: "ruby",
|
|
@@ -1241,52 +1248,52 @@ var Ie = { exports: {} };
|
|
|
1241
1248
|
bat: "batch",
|
|
1242
1249
|
h: "c",
|
|
1243
1250
|
tex: "latex"
|
|
1244
|
-
},
|
|
1245
|
-
function N(
|
|
1251
|
+
}, E = "data-src-status", w = "loading", D = "loaded", L = "failed", T = "pre[data-src]:not([" + E + '="' + D + '"]):not([' + E + '="' + w + '"])';
|
|
1252
|
+
function N(u, d, l) {
|
|
1246
1253
|
var a = new XMLHttpRequest();
|
|
1247
|
-
a.open("GET",
|
|
1248
|
-
a.readyState == 4 && (a.status < 400 && a.responseText ?
|
|
1254
|
+
a.open("GET", u, !0), a.onreadystatechange = function() {
|
|
1255
|
+
a.readyState == 4 && (a.status < 400 && a.responseText ? d(a.responseText) : a.status >= 400 ? l(_(a.status, a.statusText)) : l(P));
|
|
1249
1256
|
}, a.send(null);
|
|
1250
1257
|
}
|
|
1251
|
-
function U(
|
|
1252
|
-
var
|
|
1253
|
-
if (
|
|
1254
|
-
var
|
|
1255
|
-
return a ? i ? [
|
|
1258
|
+
function U(u) {
|
|
1259
|
+
var d = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(u || "");
|
|
1260
|
+
if (d) {
|
|
1261
|
+
var l = Number(d[1]), a = d[2], i = d[3];
|
|
1262
|
+
return a ? i ? [l, Number(i)] : [l, void 0] : [l, l];
|
|
1256
1263
|
}
|
|
1257
1264
|
}
|
|
1258
|
-
r.hooks.add("before-highlightall", function(
|
|
1259
|
-
|
|
1260
|
-
}), r.hooks.add("before-sanity-check", function(
|
|
1261
|
-
var
|
|
1265
|
+
r.hooks.add("before-highlightall", function(u) {
|
|
1266
|
+
u.selector += ", " + T;
|
|
1267
|
+
}), r.hooks.add("before-sanity-check", function(u) {
|
|
1268
|
+
var d = (
|
|
1262
1269
|
/** @type {HTMLPreElement} */
|
|
1263
|
-
|
|
1270
|
+
u.element
|
|
1264
1271
|
);
|
|
1265
|
-
if (
|
|
1266
|
-
|
|
1267
|
-
var
|
|
1268
|
-
|
|
1269
|
-
var a =
|
|
1272
|
+
if (d.matches(T)) {
|
|
1273
|
+
u.code = "", d.setAttribute(E, w);
|
|
1274
|
+
var l = d.appendChild(document.createElement("CODE"));
|
|
1275
|
+
l.textContent = o;
|
|
1276
|
+
var a = d.getAttribute("data-src"), i = u.language;
|
|
1270
1277
|
if (i === "none") {
|
|
1271
1278
|
var p = (/\.(\w+)$/.exec(a) || [, "none"])[1];
|
|
1272
|
-
i =
|
|
1279
|
+
i = S[p] || p;
|
|
1273
1280
|
}
|
|
1274
|
-
r.util.setLanguage(
|
|
1281
|
+
r.util.setLanguage(l, i), r.util.setLanguage(d, i);
|
|
1275
1282
|
var g = r.plugins.autoloader;
|
|
1276
1283
|
g && g.loadLanguages(i), N(
|
|
1277
1284
|
a,
|
|
1278
|
-
function(
|
|
1279
|
-
|
|
1280
|
-
var h = U(
|
|
1285
|
+
function(k) {
|
|
1286
|
+
d.setAttribute(E, D);
|
|
1287
|
+
var h = U(d.getAttribute("data-range"));
|
|
1281
1288
|
if (h) {
|
|
1282
|
-
var
|
|
1283
|
-
|
|
1284
|
-
`),
|
|
1289
|
+
var m = k.split(/\r\n?|\n/g), c = h[0], b = h[1] == null ? m.length : h[1];
|
|
1290
|
+
c < 0 && (c += m.length), c = Math.max(0, Math.min(c - 1, m.length)), b < 0 && (b += m.length), b = Math.max(0, Math.min(b, m.length)), k = m.slice(c, b).join(`
|
|
1291
|
+
`), d.hasAttribute("data-start") || d.setAttribute("data-start", String(c + 1));
|
|
1285
1292
|
}
|
|
1286
|
-
|
|
1293
|
+
l.textContent = k, r.highlightElement(l);
|
|
1287
1294
|
},
|
|
1288
|
-
function(
|
|
1289
|
-
|
|
1295
|
+
function(k) {
|
|
1296
|
+
d.setAttribute(E, L), l.textContent = k;
|
|
1290
1297
|
}
|
|
1291
1298
|
);
|
|
1292
1299
|
}
|
|
@@ -1298,19 +1305,19 @@ var Ie = { exports: {} };
|
|
|
1298
1305
|
*
|
|
1299
1306
|
* @param {ParentNode} [container=document]
|
|
1300
1307
|
*/
|
|
1301
|
-
highlight: function(
|
|
1302
|
-
for (var
|
|
1308
|
+
highlight: function(d) {
|
|
1309
|
+
for (var l = (d || document).querySelectorAll(T), a = 0, i; i = l[a++]; )
|
|
1303
1310
|
r.highlightElement(i);
|
|
1304
1311
|
}
|
|
1305
1312
|
};
|
|
1306
|
-
var
|
|
1313
|
+
var n = !1;
|
|
1307
1314
|
r.fileHighlight = function() {
|
|
1308
|
-
|
|
1315
|
+
n || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), n = !0), r.plugins.fileHighlight.highlight.apply(this, arguments);
|
|
1309
1316
|
};
|
|
1310
1317
|
}();
|
|
1311
1318
|
})(Ie);
|
|
1312
|
-
var
|
|
1313
|
-
const K = /* @__PURE__ */
|
|
1319
|
+
var it = Ie.exports;
|
|
1320
|
+
const K = /* @__PURE__ */ st(it);
|
|
1314
1321
|
Prism.languages.markup = {
|
|
1315
1322
|
comment: {
|
|
1316
1323
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
@@ -1407,31 +1414,31 @@ Object.defineProperty(Prism.languages.markup.tag, "addInlined", {
|
|
|
1407
1414
|
* addInlined('style', 'css');
|
|
1408
1415
|
*/
|
|
1409
1416
|
value: function(t, r) {
|
|
1410
|
-
var
|
|
1411
|
-
|
|
1417
|
+
var o = {};
|
|
1418
|
+
o["language-" + r] = {
|
|
1412
1419
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
1413
1420
|
lookbehind: !0,
|
|
1414
1421
|
inside: Prism.languages[r]
|
|
1415
|
-
},
|
|
1416
|
-
var
|
|
1422
|
+
}, o.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
1423
|
+
var _ = {
|
|
1417
1424
|
"included-cdata": {
|
|
1418
1425
|
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
1419
|
-
inside:
|
|
1426
|
+
inside: o
|
|
1420
1427
|
}
|
|
1421
1428
|
};
|
|
1422
|
-
|
|
1429
|
+
_["language-" + r] = {
|
|
1423
1430
|
pattern: /[\s\S]+/,
|
|
1424
1431
|
inside: Prism.languages[r]
|
|
1425
1432
|
};
|
|
1426
|
-
var
|
|
1427
|
-
|
|
1433
|
+
var P = {};
|
|
1434
|
+
P[t] = {
|
|
1428
1435
|
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
1429
1436
|
return t;
|
|
1430
1437
|
}), "i"),
|
|
1431
1438
|
lookbehind: !0,
|
|
1432
1439
|
greedy: !0,
|
|
1433
|
-
inside:
|
|
1434
|
-
}, Prism.languages.insertBefore("markup", "cdata",
|
|
1440
|
+
inside: _
|
|
1441
|
+
}, Prism.languages.insertBefore("markup", "cdata", P);
|
|
1435
1442
|
}
|
|
1436
1443
|
});
|
|
1437
1444
|
Object.defineProperty(Prism.languages.markup.tag, "addAttribute", {
|
|
@@ -1709,7 +1716,7 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1709
1716
|
// this looks reasonably well in all themes
|
|
1710
1717
|
inside: null
|
|
1711
1718
|
// see below
|
|
1712
|
-
},
|
|
1719
|
+
}, o = {
|
|
1713
1720
|
bash: r,
|
|
1714
1721
|
environment: {
|
|
1715
1722
|
pattern: RegExp("\\$" + t),
|
|
@@ -1821,7 +1828,7 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1821
1828
|
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
|
|
1822
1829
|
lookbehind: !0,
|
|
1823
1830
|
greedy: !0,
|
|
1824
|
-
inside:
|
|
1831
|
+
inside: o
|
|
1825
1832
|
},
|
|
1826
1833
|
// Here-document with quotes around the tag
|
|
1827
1834
|
// → No expansion (so no “inside”).
|
|
@@ -1839,7 +1846,7 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1839
1846
|
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
|
|
1840
1847
|
lookbehind: !0,
|
|
1841
1848
|
greedy: !0,
|
|
1842
|
-
inside:
|
|
1849
|
+
inside: o
|
|
1843
1850
|
},
|
|
1844
1851
|
{
|
|
1845
1852
|
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
|
|
@@ -1852,7 +1859,7 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1852
1859
|
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
|
|
1853
1860
|
greedy: !0,
|
|
1854
1861
|
inside: {
|
|
1855
|
-
entity:
|
|
1862
|
+
entity: o.entity
|
|
1856
1863
|
}
|
|
1857
1864
|
}
|
|
1858
1865
|
],
|
|
@@ -1860,7 +1867,7 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1860
1867
|
pattern: RegExp("\\$?" + t),
|
|
1861
1868
|
alias: "constant"
|
|
1862
1869
|
},
|
|
1863
|
-
variable:
|
|
1870
|
+
variable: o.variable,
|
|
1864
1871
|
function: {
|
|
1865
1872
|
pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
|
|
1866
1873
|
lookbehind: !0
|
|
@@ -1900,7 +1907,7 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1900
1907
|
lookbehind: !0
|
|
1901
1908
|
}
|
|
1902
1909
|
}, r.inside = e.languages.bash;
|
|
1903
|
-
for (var
|
|
1910
|
+
for (var _ = [
|
|
1904
1911
|
"comment",
|
|
1905
1912
|
"function-name",
|
|
1906
1913
|
"for-or-select",
|
|
@@ -1916,8 +1923,8 @@ Prism.languages.webmanifest = Prism.languages.json;
|
|
|
1916
1923
|
"operator",
|
|
1917
1924
|
"punctuation",
|
|
1918
1925
|
"number"
|
|
1919
|
-
],
|
|
1920
|
-
|
|
1926
|
+
], P = o.variable[1].inside, S = 0; S < _.length; S++)
|
|
1927
|
+
P[_[S]] = e.languages.bash[_[S]];
|
|
1921
1928
|
e.languages.sh = e.languages.bash, e.languages.shell = e.languages.bash;
|
|
1922
1929
|
})(Prism);
|
|
1923
1930
|
Prism.languages.sql = {
|
|
@@ -1954,22 +1961,22 @@ Prism.languages.sql = {
|
|
|
1954
1961
|
punctuation: /[;[\]()`,.]/
|
|
1955
1962
|
};
|
|
1956
1963
|
(function(e) {
|
|
1957
|
-
var t = /[*&][^\s[\]{},]+/, r = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,
|
|
1964
|
+
var t = /[*&][^\s[\]{},]+/, r = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, o = "(?:" + r.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + r.source + ")?)", _ = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g, function() {
|
|
1958
1965
|
return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
|
|
1959
|
-
}),
|
|
1960
|
-
function
|
|
1961
|
-
|
|
1966
|
+
}), P = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
|
|
1967
|
+
function S(E, w) {
|
|
1968
|
+
w = (w || "").replace(/m/g, "") + "m";
|
|
1962
1969
|
var D = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
|
|
1963
|
-
return
|
|
1970
|
+
return o;
|
|
1964
1971
|
}).replace(/<<value>>/g, function() {
|
|
1965
|
-
return
|
|
1972
|
+
return E;
|
|
1966
1973
|
});
|
|
1967
|
-
return RegExp(D,
|
|
1974
|
+
return RegExp(D, w);
|
|
1968
1975
|
}
|
|
1969
1976
|
e.languages.yaml = {
|
|
1970
1977
|
scalar: {
|
|
1971
1978
|
pattern: RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g, function() {
|
|
1972
|
-
return
|
|
1979
|
+
return o;
|
|
1973
1980
|
})),
|
|
1974
1981
|
lookbehind: !0,
|
|
1975
1982
|
alias: "string"
|
|
@@ -1977,9 +1984,9 @@ Prism.languages.sql = {
|
|
|
1977
1984
|
comment: /#.*/,
|
|
1978
1985
|
key: {
|
|
1979
1986
|
pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
|
|
1980
|
-
return
|
|
1987
|
+
return o;
|
|
1981
1988
|
}).replace(/<<key>>/g, function() {
|
|
1982
|
-
return "(?:" +
|
|
1989
|
+
return "(?:" + _ + "|" + P + ")";
|
|
1983
1990
|
})),
|
|
1984
1991
|
lookbehind: !0,
|
|
1985
1992
|
greedy: !0,
|
|
@@ -1991,27 +1998,27 @@ Prism.languages.sql = {
|
|
|
1991
1998
|
alias: "important"
|
|
1992
1999
|
},
|
|
1993
2000
|
datetime: {
|
|
1994
|
-
pattern:
|
|
2001
|
+
pattern: S(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),
|
|
1995
2002
|
lookbehind: !0,
|
|
1996
2003
|
alias: "number"
|
|
1997
2004
|
},
|
|
1998
2005
|
boolean: {
|
|
1999
|
-
pattern:
|
|
2006
|
+
pattern: S(/false|true/.source, "i"),
|
|
2000
2007
|
lookbehind: !0,
|
|
2001
2008
|
alias: "important"
|
|
2002
2009
|
},
|
|
2003
2010
|
null: {
|
|
2004
|
-
pattern:
|
|
2011
|
+
pattern: S(/null|~/.source, "i"),
|
|
2005
2012
|
lookbehind: !0,
|
|
2006
2013
|
alias: "important"
|
|
2007
2014
|
},
|
|
2008
2015
|
string: {
|
|
2009
|
-
pattern:
|
|
2016
|
+
pattern: S(P),
|
|
2010
2017
|
lookbehind: !0,
|
|
2011
2018
|
greedy: !0
|
|
2012
2019
|
},
|
|
2013
2020
|
number: {
|
|
2014
|
-
pattern:
|
|
2021
|
+
pattern: S(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, "i"),
|
|
2015
2022
|
lookbehind: !0
|
|
2016
2023
|
},
|
|
2017
2024
|
tag: r,
|
|
@@ -2097,14 +2104,14 @@ Prism.languages.insertBefore("c", "function", {
|
|
|
2097
2104
|
delete Prism.languages.c.boolean;
|
|
2098
2105
|
(function(e) {
|
|
2099
2106
|
var t = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
|
2100
|
-
function r(
|
|
2101
|
-
return
|
|
2107
|
+
function r(L) {
|
|
2108
|
+
return L = L.replace(/<inner>/g, function() {
|
|
2102
2109
|
return t;
|
|
2103
|
-
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" +
|
|
2110
|
+
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + L + ")");
|
|
2104
2111
|
}
|
|
2105
|
-
var
|
|
2106
|
-
return
|
|
2107
|
-
}),
|
|
2112
|
+
var o = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, _ = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
|
2113
|
+
return o;
|
|
2114
|
+
}), P = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
|
|
2108
2115
|
e.languages.markdown = e.languages.extend("markup", {}), e.languages.insertBefore("markdown", "prolog", {
|
|
2109
2116
|
"front-matter-block": {
|
|
2110
2117
|
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
|
@@ -2125,31 +2132,31 @@ delete Prism.languages.c.boolean;
|
|
|
2125
2132
|
alias: "punctuation"
|
|
2126
2133
|
},
|
|
2127
2134
|
table: {
|
|
2128
|
-
pattern: RegExp("^" +
|
|
2135
|
+
pattern: RegExp("^" + _ + P + "(?:" + _ + ")*", "m"),
|
|
2129
2136
|
inside: {
|
|
2130
2137
|
"table-data-rows": {
|
|
2131
|
-
pattern: RegExp("^(" +
|
|
2138
|
+
pattern: RegExp("^(" + _ + P + ")(?:" + _ + ")*$"),
|
|
2132
2139
|
lookbehind: !0,
|
|
2133
2140
|
inside: {
|
|
2134
2141
|
"table-data": {
|
|
2135
|
-
pattern: RegExp(
|
|
2142
|
+
pattern: RegExp(o),
|
|
2136
2143
|
inside: e.languages.markdown
|
|
2137
2144
|
},
|
|
2138
2145
|
punctuation: /\|/
|
|
2139
2146
|
}
|
|
2140
2147
|
},
|
|
2141
2148
|
"table-line": {
|
|
2142
|
-
pattern: RegExp("^(" +
|
|
2149
|
+
pattern: RegExp("^(" + _ + ")" + P + "$"),
|
|
2143
2150
|
lookbehind: !0,
|
|
2144
2151
|
inside: {
|
|
2145
2152
|
punctuation: /\||:?-{3,}:?/
|
|
2146
2153
|
}
|
|
2147
2154
|
},
|
|
2148
2155
|
"table-header-row": {
|
|
2149
|
-
pattern: RegExp("^" +
|
|
2156
|
+
pattern: RegExp("^" + _ + "$"),
|
|
2150
2157
|
inside: {
|
|
2151
2158
|
"table-header": {
|
|
2152
|
-
pattern: RegExp(
|
|
2159
|
+
pattern: RegExp(o),
|
|
2153
2160
|
alias: "important",
|
|
2154
2161
|
inside: e.languages.markdown
|
|
2155
2162
|
},
|
|
@@ -2329,69 +2336,69 @@ delete Prism.languages.c.boolean;
|
|
|
2329
2336
|
}
|
|
2330
2337
|
}
|
|
2331
2338
|
}
|
|
2332
|
-
}), ["url", "bold", "italic", "strike"].forEach(function(
|
|
2333
|
-
["url", "bold", "italic", "strike", "code-snippet"].forEach(function(
|
|
2334
|
-
|
|
2339
|
+
}), ["url", "bold", "italic", "strike"].forEach(function(L) {
|
|
2340
|
+
["url", "bold", "italic", "strike", "code-snippet"].forEach(function(T) {
|
|
2341
|
+
L !== T && (e.languages.markdown[L].inside.content.inside[T] = e.languages.markdown[T]);
|
|
2335
2342
|
});
|
|
2336
|
-
}), e.hooks.add("after-tokenize", function(
|
|
2337
|
-
if (
|
|
2343
|
+
}), e.hooks.add("after-tokenize", function(L) {
|
|
2344
|
+
if (L.language !== "markdown" && L.language !== "md")
|
|
2338
2345
|
return;
|
|
2339
|
-
function
|
|
2346
|
+
function T(N) {
|
|
2340
2347
|
if (!(!N || typeof N == "string"))
|
|
2341
|
-
for (var U = 0,
|
|
2342
|
-
var
|
|
2343
|
-
if (
|
|
2344
|
-
|
|
2348
|
+
for (var U = 0, n = N.length; U < n; U++) {
|
|
2349
|
+
var u = N[U];
|
|
2350
|
+
if (u.type !== "code") {
|
|
2351
|
+
T(u.content);
|
|
2345
2352
|
continue;
|
|
2346
2353
|
}
|
|
2347
|
-
var
|
|
2348
|
-
if (
|
|
2349
|
-
var a =
|
|
2354
|
+
var d = u.content[1], l = u.content[3];
|
|
2355
|
+
if (d && l && d.type === "code-language" && l.type === "code-block" && typeof d.content == "string") {
|
|
2356
|
+
var a = d.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
|
|
2350
2357
|
a = (/[a-z][\w-]*/i.exec(a) || [""])[0].toLowerCase();
|
|
2351
2358
|
var i = "language-" + a;
|
|
2352
|
-
|
|
2359
|
+
l.alias ? typeof l.alias == "string" ? l.alias = [l.alias, i] : l.alias.push(i) : l.alias = [i];
|
|
2353
2360
|
}
|
|
2354
2361
|
}
|
|
2355
2362
|
}
|
|
2356
|
-
|
|
2357
|
-
}), e.hooks.add("wrap", function(
|
|
2358
|
-
if (
|
|
2359
|
-
for (var
|
|
2360
|
-
var
|
|
2361
|
-
if (
|
|
2362
|
-
|
|
2363
|
+
T(L.tokens);
|
|
2364
|
+
}), e.hooks.add("wrap", function(L) {
|
|
2365
|
+
if (L.type === "code-block") {
|
|
2366
|
+
for (var T = "", N = 0, U = L.classes.length; N < U; N++) {
|
|
2367
|
+
var n = L.classes[N], u = /language-(.+)/.exec(n);
|
|
2368
|
+
if (u) {
|
|
2369
|
+
T = u[1];
|
|
2363
2370
|
break;
|
|
2364
2371
|
}
|
|
2365
2372
|
}
|
|
2366
|
-
var
|
|
2367
|
-
if (
|
|
2368
|
-
|
|
2369
|
-
else if (
|
|
2370
|
-
var
|
|
2371
|
-
|
|
2372
|
-
var a = document.getElementById(
|
|
2373
|
-
a && (a.innerHTML = e.highlight(a.textContent, e.languages[
|
|
2373
|
+
var d = e.languages[T];
|
|
2374
|
+
if (d)
|
|
2375
|
+
L.content = e.highlight(D(L.content), d, T);
|
|
2376
|
+
else if (T && T !== "none" && e.plugins.autoloader) {
|
|
2377
|
+
var l = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
|
|
2378
|
+
L.attributes.id = l, e.plugins.autoloader.loadLanguages(T, function() {
|
|
2379
|
+
var a = document.getElementById(l);
|
|
2380
|
+
a && (a.innerHTML = e.highlight(a.textContent, e.languages[T], T));
|
|
2374
2381
|
});
|
|
2375
2382
|
}
|
|
2376
2383
|
}
|
|
2377
2384
|
});
|
|
2378
|
-
var
|
|
2385
|
+
var S = RegExp(e.languages.markup.tag.pattern.source, "gi"), E = {
|
|
2379
2386
|
amp: "&",
|
|
2380
2387
|
lt: "<",
|
|
2381
2388
|
gt: ">",
|
|
2382
2389
|
quot: '"'
|
|
2383
|
-
},
|
|
2384
|
-
function D(
|
|
2385
|
-
var
|
|
2386
|
-
return
|
|
2390
|
+
}, w = String.fromCodePoint || String.fromCharCode;
|
|
2391
|
+
function D(L) {
|
|
2392
|
+
var T = L.replace(S, "");
|
|
2393
|
+
return T = T.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(N, U) {
|
|
2387
2394
|
if (U = U.toLowerCase(), U[0] === "#") {
|
|
2388
|
-
var
|
|
2389
|
-
return U[1] === "x" ?
|
|
2395
|
+
var n;
|
|
2396
|
+
return U[1] === "x" ? n = parseInt(U.slice(2), 16) : n = Number(U.slice(1)), w(n);
|
|
2390
2397
|
} else {
|
|
2391
|
-
var
|
|
2392
|
-
return
|
|
2398
|
+
var u = E[U];
|
|
2399
|
+
return u || N;
|
|
2393
2400
|
}
|
|
2394
|
-
}),
|
|
2401
|
+
}), T;
|
|
2395
2402
|
}
|
|
2396
2403
|
e.languages.md = e.languages.markdown;
|
|
2397
2404
|
})(Prism);
|
|
@@ -2459,7 +2466,7 @@ Prism.languages.python = {
|
|
|
2459
2466
|
Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest = Prism.languages.python;
|
|
2460
2467
|
Prism.languages.py = Prism.languages.python;
|
|
2461
2468
|
(function(e) {
|
|
2462
|
-
var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, r = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,
|
|
2469
|
+
var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, r = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, o = {
|
|
2463
2470
|
pattern: RegExp(/(^|[^\w.])/.source + r + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
2464
2471
|
lookbehind: !0,
|
|
2465
2472
|
inside: {
|
|
@@ -2479,20 +2486,20 @@ Prism.languages.py = Prism.languages.python;
|
|
|
2479
2486
|
greedy: !0
|
|
2480
2487
|
},
|
|
2481
2488
|
"class-name": [
|
|
2482
|
-
|
|
2489
|
+
o,
|
|
2483
2490
|
{
|
|
2484
2491
|
// variables, parameters, and constructor references
|
|
2485
2492
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
2486
2493
|
pattern: RegExp(/(^|[^\w.])/.source + r + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
|
|
2487
2494
|
lookbehind: !0,
|
|
2488
|
-
inside:
|
|
2495
|
+
inside: o.inside
|
|
2489
2496
|
},
|
|
2490
2497
|
{
|
|
2491
2498
|
// class names based on keyword
|
|
2492
2499
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
2493
2500
|
pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + r + /[A-Z]\w*\b/.source),
|
|
2494
2501
|
lookbehind: !0,
|
|
2495
|
-
inside:
|
|
2502
|
+
inside: o.inside
|
|
2496
2503
|
}
|
|
2497
2504
|
],
|
|
2498
2505
|
keyword: t,
|
|
@@ -2529,7 +2536,7 @@ Prism.languages.py = Prism.languages.python;
|
|
|
2529
2536
|
generics: {
|
|
2530
2537
|
pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
|
2531
2538
|
inside: {
|
|
2532
|
-
"class-name":
|
|
2539
|
+
"class-name": o,
|
|
2533
2540
|
keyword: t,
|
|
2534
2541
|
punctuation: /[<>(),.:]/,
|
|
2535
2542
|
operator: /[?&|]/
|
|
@@ -2540,7 +2547,7 @@ Prism.languages.py = Prism.languages.python;
|
|
|
2540
2547
|
pattern: RegExp(/(\bimport\s+)/.source + r + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
|
|
2541
2548
|
lookbehind: !0,
|
|
2542
2549
|
inside: {
|
|
2543
|
-
namespace:
|
|
2550
|
+
namespace: o.inside.namespace,
|
|
2544
2551
|
punctuation: /\./,
|
|
2545
2552
|
operator: /\*/,
|
|
2546
2553
|
"class-name": /\w+/
|
|
@@ -2551,7 +2558,7 @@ Prism.languages.py = Prism.languages.python;
|
|
|
2551
2558
|
lookbehind: !0,
|
|
2552
2559
|
alias: "static",
|
|
2553
2560
|
inside: {
|
|
2554
|
-
namespace:
|
|
2561
|
+
namespace: o.inside.namespace,
|
|
2555
2562
|
static: /\b\w+$/,
|
|
2556
2563
|
punctuation: /\./,
|
|
2557
2564
|
operator: /\*/,
|
|
@@ -2760,27 +2767,27 @@ delete Prism.languages.go["class-name"];
|
|
|
2760
2767
|
}), e.languages.ts = e.languages.typescript;
|
|
2761
2768
|
})(Prism);
|
|
2762
2769
|
(function(e) {
|
|
2763
|
-
var t = e.util.clone(e.languages.javascript), r = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,
|
|
2764
|
-
function
|
|
2765
|
-
return
|
|
2770
|
+
var t = e.util.clone(e.languages.javascript), r = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source, o = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source, _ = /(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;
|
|
2771
|
+
function P(w, D) {
|
|
2772
|
+
return w = w.replace(/<S>/g, function() {
|
|
2766
2773
|
return r;
|
|
2767
2774
|
}).replace(/<BRACES>/g, function() {
|
|
2768
|
-
return
|
|
2775
|
+
return o;
|
|
2769
2776
|
}).replace(/<SPREAD>/g, function() {
|
|
2770
|
-
return
|
|
2771
|
-
}), RegExp(
|
|
2777
|
+
return _;
|
|
2778
|
+
}), RegExp(w, D);
|
|
2772
2779
|
}
|
|
2773
|
-
|
|
2780
|
+
_ = P(_).source, e.languages.jsx = e.languages.extend("markup", t), e.languages.jsx.tag.pattern = P(
|
|
2774
2781
|
/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source
|
|
2775
2782
|
), e.languages.jsx.tag.inside.tag.pattern = /^<\/?[^\s>\/]*/, e.languages.jsx.tag.inside["attr-value"].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/, e.languages.jsx.tag.inside.tag.inside["class-name"] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/, e.languages.jsx.tag.inside.comment = t.comment, e.languages.insertBefore("inside", "attr-name", {
|
|
2776
2783
|
spread: {
|
|
2777
|
-
pattern:
|
|
2784
|
+
pattern: P(/<SPREAD>/.source),
|
|
2778
2785
|
inside: e.languages.jsx
|
|
2779
2786
|
}
|
|
2780
2787
|
}, e.languages.jsx.tag), e.languages.insertBefore("inside", "special-attr", {
|
|
2781
2788
|
script: {
|
|
2782
2789
|
// Allow for two levels of nesting
|
|
2783
|
-
pattern:
|
|
2790
|
+
pattern: P(/=<BRACES>/.source),
|
|
2784
2791
|
alias: "language-javascript",
|
|
2785
2792
|
inside: {
|
|
2786
2793
|
"script-punctuation": {
|
|
@@ -2791,23 +2798,23 @@ delete Prism.languages.go["class-name"];
|
|
|
2791
2798
|
}
|
|
2792
2799
|
}
|
|
2793
2800
|
}, e.languages.jsx.tag);
|
|
2794
|
-
var
|
|
2795
|
-
return
|
|
2796
|
-
},
|
|
2797
|
-
for (var D = [],
|
|
2798
|
-
var
|
|
2799
|
-
if (typeof
|
|
2800
|
-
tagName:
|
|
2801
|
+
var S = function(w) {
|
|
2802
|
+
return w ? typeof w == "string" ? w : typeof w.content == "string" ? w.content : w.content.map(S).join("") : "";
|
|
2803
|
+
}, E = function(w) {
|
|
2804
|
+
for (var D = [], L = 0; L < w.length; L++) {
|
|
2805
|
+
var T = w[L], N = !1;
|
|
2806
|
+
if (typeof T != "string" && (T.type === "tag" && T.content[0] && T.content[0].type === "tag" ? T.content[0].content[0].content === "</" ? D.length > 0 && D[D.length - 1].tagName === S(T.content[0].content[1]) && D.pop() : T.content[T.content.length - 1].content === "/>" || D.push({
|
|
2807
|
+
tagName: S(T.content[0].content[1]),
|
|
2801
2808
|
openedBraces: 0
|
|
2802
|
-
}) : D.length > 0 &&
|
|
2803
|
-
var U =
|
|
2804
|
-
|
|
2809
|
+
}) : D.length > 0 && T.type === "punctuation" && T.content === "{" ? D[D.length - 1].openedBraces++ : D.length > 0 && D[D.length - 1].openedBraces > 0 && T.type === "punctuation" && T.content === "}" ? D[D.length - 1].openedBraces-- : N = !0), (N || typeof T == "string") && D.length > 0 && D[D.length - 1].openedBraces === 0) {
|
|
2810
|
+
var U = S(T);
|
|
2811
|
+
L < w.length - 1 && (typeof w[L + 1] == "string" || w[L + 1].type === "plain-text") && (U += S(w[L + 1]), w.splice(L + 1, 1)), L > 0 && (typeof w[L - 1] == "string" || w[L - 1].type === "plain-text") && (U = S(w[L - 1]) + U, w.splice(L - 1, 1), L--), w[L] = new e.Token("plain-text", U, null, U);
|
|
2805
2812
|
}
|
|
2806
|
-
|
|
2813
|
+
T.content && typeof T.content != "string" && E(T.content);
|
|
2807
2814
|
}
|
|
2808
2815
|
};
|
|
2809
|
-
e.hooks.add("after-tokenize", function(
|
|
2810
|
-
|
|
2816
|
+
e.hooks.add("after-tokenize", function(w) {
|
|
2817
|
+
w.language !== "jsx" && w.language !== "tsx" || E(w.tokens);
|
|
2811
2818
|
});
|
|
2812
2819
|
})(Prism);
|
|
2813
2820
|
(function(e) {
|
|
@@ -2901,7 +2908,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2901
2908
|
var r = e.languages.tsx.tag;
|
|
2902
2909
|
r.pattern = RegExp(/(^|[^\w$]|(?=<\/))/.source + "(?:" + r.pattern.source + ")", r.pattern.flags), r.lookbehind = !0;
|
|
2903
2910
|
})(Prism);
|
|
2904
|
-
function
|
|
2911
|
+
function lt() {
|
|
2905
2912
|
K.languages.wsx || (K.languages.wsx = K.languages.extend("tsx", {
|
|
2906
2913
|
// WSX-specific decorators (e.g., @autoRegister, @state)
|
|
2907
2914
|
decorator: {
|
|
@@ -2934,113 +2941,113 @@ function ct() {
|
|
|
2934
2941
|
}
|
|
2935
2942
|
}), K.languages.WSX = K.languages.wsx);
|
|
2936
2943
|
}
|
|
2937
|
-
|
|
2944
|
+
lt();
|
|
2938
2945
|
var Fe;
|
|
2939
|
-
let Re,
|
|
2940
|
-
function
|
|
2941
|
-
return (t =
|
|
2946
|
+
let Re, Oe;
|
|
2947
|
+
function Q(e, t, r) {
|
|
2948
|
+
return (t = Le(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
2942
2949
|
}
|
|
2943
|
-
function
|
|
2944
|
-
function
|
|
2945
|
-
return function(
|
|
2946
|
-
return
|
|
2950
|
+
function ct(e, t, r, o, _, P) {
|
|
2951
|
+
function S(n, u, d) {
|
|
2952
|
+
return function(l, a) {
|
|
2953
|
+
return d && d(l), n[u].call(l, a);
|
|
2947
2954
|
};
|
|
2948
2955
|
}
|
|
2949
|
-
function
|
|
2950
|
-
for (var
|
|
2951
|
-
return
|
|
2956
|
+
function E(n, u) {
|
|
2957
|
+
for (var d = 0; d < n.length; d++) n[d].call(u);
|
|
2958
|
+
return u;
|
|
2952
2959
|
}
|
|
2953
|
-
function
|
|
2954
|
-
if (typeof
|
|
2955
|
-
return
|
|
2960
|
+
function w(n, u, d, l) {
|
|
2961
|
+
if (typeof n != "function" && (l || n !== void 0)) throw new TypeError(u + " must " + (d || "be") + " a function" + (l ? "" : " or undefined"));
|
|
2962
|
+
return n;
|
|
2956
2963
|
}
|
|
2957
|
-
function D(
|
|
2958
|
-
function
|
|
2959
|
-
if (!b(
|
|
2964
|
+
function D(n, u, d, l, a, i, p, g, k, h, m, c, b) {
|
|
2965
|
+
function A(f) {
|
|
2966
|
+
if (!b(f)) throw new TypeError("Attempted to access private element on non-instance");
|
|
2960
2967
|
}
|
|
2961
|
-
var
|
|
2962
|
-
if (
|
|
2963
|
-
|
|
2964
|
-
var
|
|
2965
|
-
h ? (
|
|
2966
|
-
return
|
|
2967
|
-
},
|
|
2968
|
-
|
|
2969
|
-
} } :
|
|
2968
|
+
var x, I = u[0], F = u[3], $ = !g;
|
|
2969
|
+
if (!$) {
|
|
2970
|
+
d || Array.isArray(I) || (I = [I]);
|
|
2971
|
+
var s = {}, R = [], v = a === 3 ? "get" : a === 4 || c ? "set" : "value";
|
|
2972
|
+
h ? (m || c ? s = { get: pe(function() {
|
|
2973
|
+
return F(this);
|
|
2974
|
+
}, l, "get"), set: function(f) {
|
|
2975
|
+
u[4](this, f);
|
|
2976
|
+
} } : s[v] = F, m || pe(s[v], l, a === 2 ? "" : v)) : m || (s = Object.getOwnPropertyDescriptor(n, l));
|
|
2970
2977
|
}
|
|
2971
|
-
for (var
|
|
2972
|
-
var Z =
|
|
2973
|
-
if (
|
|
2974
|
-
|
|
2978
|
+
for (var y = n, M = I.length - 1; M >= 0; M -= d ? 2 : 1) {
|
|
2979
|
+
var Z = I[M], B = d ? I[M - 1] : void 0, X = {}, C = { kind: ["field", "accessor", "method", "getter", "setter", "class"][a], name: l, metadata: i, addInitializer: (function(f, O) {
|
|
2980
|
+
if (f.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
2981
|
+
w(O, "An initializer", "be", !0), p.push(O);
|
|
2975
2982
|
}).bind(null, X) };
|
|
2976
2983
|
try {
|
|
2977
|
-
if (
|
|
2984
|
+
if ($) (x = w(Z.call(B, y, C), "class decorators", "return")) && (y = x);
|
|
2978
2985
|
else {
|
|
2979
|
-
var
|
|
2980
|
-
|
|
2981
|
-
return
|
|
2982
|
-
} : (a < 4 && (
|
|
2983
|
-
return
|
|
2984
|
-
}, (a < 2 || a === 4) && (z = function(
|
|
2985
|
-
|
|
2986
|
+
var j, z;
|
|
2987
|
+
C.static = k, C.private = h, h ? a === 2 ? j = function(f) {
|
|
2988
|
+
return A(f), s.value;
|
|
2989
|
+
} : (a < 4 && (j = S(s, "get", A)), a !== 3 && (z = S(s, "set", A))) : (j = function(f) {
|
|
2990
|
+
return f[l];
|
|
2991
|
+
}, (a < 2 || a === 4) && (z = function(f, O) {
|
|
2992
|
+
f[l] = O;
|
|
2986
2993
|
}));
|
|
2987
|
-
var Y =
|
|
2988
|
-
return
|
|
2994
|
+
var Y = C.access = { has: h ? b.bind() : function(f) {
|
|
2995
|
+
return l in f;
|
|
2989
2996
|
} };
|
|
2990
|
-
if (
|
|
2991
|
-
if (typeof
|
|
2992
|
-
else if (
|
|
2993
|
-
} else
|
|
2997
|
+
if (j && (Y.get = j), z && (Y.set = z), y = Z.call(B, c ? { get: s.get, set: s.set } : s[v], C), c) {
|
|
2998
|
+
if (typeof y == "object" && y) (x = w(y.get, "accessor.get")) && (s.get = x), (x = w(y.set, "accessor.set")) && (s.set = x), (x = w(y.init, "accessor.init")) && R.push(x);
|
|
2999
|
+
else if (y !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
3000
|
+
} else w(y, (m ? "field" : "method") + " decorators", "return") && (m ? R.push(y) : s[v] = y);
|
|
2994
3001
|
}
|
|
2995
3002
|
} finally {
|
|
2996
3003
|
X.v = !0;
|
|
2997
3004
|
}
|
|
2998
3005
|
}
|
|
2999
|
-
return (
|
|
3000
|
-
for (var H =
|
|
3006
|
+
return (m || c) && g.push(function(f, O) {
|
|
3007
|
+
for (var H = R.length - 1; H >= 0; H--) O = R[H].call(f, O);
|
|
3001
3008
|
return O;
|
|
3002
|
-
}),
|
|
3009
|
+
}), m || $ || (h ? c ? g.push(S(s, "get"), S(s, "set")) : g.push(a === 2 ? s[v] : S.call.bind(s[v])) : Object.defineProperty(n, l, s)), y;
|
|
3003
3010
|
}
|
|
3004
|
-
function
|
|
3005
|
-
return Object.defineProperty(
|
|
3011
|
+
function L(n, u) {
|
|
3012
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: u });
|
|
3006
3013
|
}
|
|
3007
|
-
if (arguments.length >= 6) var
|
|
3008
|
-
var N = Object.create(
|
|
3009
|
-
var a, i, p = [], g = function(
|
|
3010
|
-
return
|
|
3011
|
-
},
|
|
3012
|
-
function h(
|
|
3013
|
-
|
|
3014
|
+
if (arguments.length >= 6) var T = P[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
3015
|
+
var N = Object.create(T ?? null), U = function(n, u, d, l) {
|
|
3016
|
+
var a, i, p = [], g = function(v) {
|
|
3017
|
+
return dt(v) === n;
|
|
3018
|
+
}, k = /* @__PURE__ */ new Map();
|
|
3019
|
+
function h(v) {
|
|
3020
|
+
v && p.push(E.bind(null, v));
|
|
3014
3021
|
}
|
|
3015
|
-
for (var
|
|
3016
|
-
var
|
|
3017
|
-
if (Array.isArray(
|
|
3018
|
-
var b =
|
|
3019
|
-
if (
|
|
3020
|
-
var
|
|
3021
|
-
if (
|
|
3022
|
-
|
|
3022
|
+
for (var m = 0; m < u.length; m++) {
|
|
3023
|
+
var c = u[m];
|
|
3024
|
+
if (Array.isArray(c)) {
|
|
3025
|
+
var b = c[1], A = c[2], x = c.length > 3, I = 16 & b, F = !!(8 & b), $ = (b &= 7) == 0, s = A + "/" + F;
|
|
3026
|
+
if (!$ && !x) {
|
|
3027
|
+
var R = k.get(s);
|
|
3028
|
+
if (R === !0 || R === 3 && b !== 4 || R === 4 && b !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + A);
|
|
3029
|
+
k.set(s, !(b > 2) || b);
|
|
3023
3030
|
}
|
|
3024
|
-
D(
|
|
3031
|
+
D(F ? n : n.prototype, c, I, x ? "#" + A : Le(A), b, l, F ? i = i || [] : a = a || [], p, F, x, $, b === 1, F && x ? g : d);
|
|
3025
3032
|
}
|
|
3026
3033
|
}
|
|
3027
3034
|
return h(a), h(i), p;
|
|
3028
|
-
}(e, t,
|
|
3029
|
-
return r.length ||
|
|
3030
|
-
var
|
|
3031
|
-
return r.length && [
|
|
3035
|
+
}(e, t, _, N);
|
|
3036
|
+
return r.length || L(e, N), { e: U, get c() {
|
|
3037
|
+
var n = [];
|
|
3038
|
+
return r.length && [L(D(e, [r], o, e.name, 5, N, n), N), E.bind(null, n, e)];
|
|
3032
3039
|
} };
|
|
3033
3040
|
}
|
|
3034
|
-
function
|
|
3035
|
-
var t =
|
|
3041
|
+
function Le(e) {
|
|
3042
|
+
var t = ut(e, "string");
|
|
3036
3043
|
return typeof t == "symbol" ? t : t + "";
|
|
3037
3044
|
}
|
|
3038
|
-
function
|
|
3045
|
+
function ut(e, t) {
|
|
3039
3046
|
if (typeof e != "object" || !e) return e;
|
|
3040
3047
|
var r = e[Symbol.toPrimitive];
|
|
3041
3048
|
if (r !== void 0) {
|
|
3042
|
-
var
|
|
3043
|
-
if (typeof
|
|
3049
|
+
var o = r.call(e, t);
|
|
3050
|
+
if (typeof o != "object") return o;
|
|
3044
3051
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3045
3052
|
}
|
|
3046
3053
|
return String(e);
|
|
@@ -3053,11 +3060,11 @@ function pe(e, t, r) {
|
|
|
3053
3060
|
}
|
|
3054
3061
|
return e;
|
|
3055
3062
|
}
|
|
3056
|
-
function
|
|
3063
|
+
function dt(e) {
|
|
3057
3064
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
3058
3065
|
return e;
|
|
3059
3066
|
}
|
|
3060
|
-
const
|
|
3067
|
+
const gt = {
|
|
3061
3068
|
js: "javascript",
|
|
3062
3069
|
ts: "typescript",
|
|
3063
3070
|
py: "python",
|
|
@@ -3076,24 +3083,24 @@ const pt = {
|
|
|
3076
3083
|
};
|
|
3077
3084
|
function me(e) {
|
|
3078
3085
|
const t = e.toLowerCase().trim();
|
|
3079
|
-
return
|
|
3086
|
+
return gt[t] || t;
|
|
3080
3087
|
}
|
|
3081
|
-
|
|
3088
|
+
Oe = [W({
|
|
3082
3089
|
tagName: "wsx-marked-code"
|
|
3083
3090
|
})];
|
|
3084
|
-
let
|
|
3085
|
-
class
|
|
3091
|
+
let pt;
|
|
3092
|
+
class mt extends q {
|
|
3086
3093
|
constructor() {
|
|
3087
3094
|
super({
|
|
3088
|
-
styles:
|
|
3095
|
+
styles: de,
|
|
3089
3096
|
styleName: "wsx-marked-code"
|
|
3090
|
-
}),
|
|
3097
|
+
}), Q(this, "_autoStyles", de), Q(this, "code", ""), Q(this, "language", ""), Q(this, "codeElement", null), Q(this, "isHighlighting", !1);
|
|
3091
3098
|
}
|
|
3092
3099
|
static get observedAttributes() {
|
|
3093
3100
|
return ["code", "language"];
|
|
3094
3101
|
}
|
|
3095
|
-
attributeChangedCallback(t, r,
|
|
3096
|
-
t === "code" ? this.code =
|
|
3102
|
+
attributeChangedCallback(t, r, o) {
|
|
3103
|
+
t === "code" ? this.code = o || "" : t === "language" && (this.language = o || ""), this.rerender();
|
|
3097
3104
|
}
|
|
3098
3105
|
onRendered() {
|
|
3099
3106
|
var t;
|
|
@@ -3173,123 +3180,123 @@ class ft extends q {
|
|
|
3173
3180
|
*/
|
|
3174
3181
|
hashCode(t) {
|
|
3175
3182
|
let r = 0;
|
|
3176
|
-
for (let
|
|
3177
|
-
const
|
|
3178
|
-
r = (r << 5) - r +
|
|
3183
|
+
for (let o = 0; o < t.length; o++) {
|
|
3184
|
+
const _ = t.charCodeAt(o);
|
|
3185
|
+
r = (r << 5) - r + _, r = r & r;
|
|
3179
3186
|
}
|
|
3180
3187
|
return r.toString(36);
|
|
3181
3188
|
}
|
|
3182
3189
|
}
|
|
3183
|
-
Fe =
|
|
3184
|
-
[
|
|
3190
|
+
Fe = mt;
|
|
3191
|
+
[pt, Re] = ct(Fe, [], Oe, 0, void 0, q).c;
|
|
3185
3192
|
Re();
|
|
3186
3193
|
const fe = "wsx-marked-blockquote{display:block;margin:1rem 0;padding:1rem 1.5rem;border-left:4px solid var(--primary-red, #dc2626);background:var(--bg-secondary, #f9f9f9);border-radius:4px;font-style:italic;color:var(--text-secondary, #666)}";
|
|
3187
3194
|
var Ne;
|
|
3188
3195
|
let $e, Ce;
|
|
3189
|
-
function
|
|
3196
|
+
function ft(e, t, r) {
|
|
3190
3197
|
return (t = De(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3191
3198
|
}
|
|
3192
|
-
function
|
|
3193
|
-
function
|
|
3194
|
-
return function(
|
|
3195
|
-
return
|
|
3199
|
+
function ht(e, t, r, o, _, P) {
|
|
3200
|
+
function S(n, u, d) {
|
|
3201
|
+
return function(l, a) {
|
|
3202
|
+
return d && d(l), n[u].call(l, a);
|
|
3196
3203
|
};
|
|
3197
3204
|
}
|
|
3198
|
-
function
|
|
3199
|
-
for (var
|
|
3200
|
-
return
|
|
3205
|
+
function E(n, u) {
|
|
3206
|
+
for (var d = 0; d < n.length; d++) n[d].call(u);
|
|
3207
|
+
return u;
|
|
3201
3208
|
}
|
|
3202
|
-
function
|
|
3203
|
-
if (typeof
|
|
3204
|
-
return
|
|
3209
|
+
function w(n, u, d, l) {
|
|
3210
|
+
if (typeof n != "function" && (l || n !== void 0)) throw new TypeError(u + " must " + (d || "be") + " a function" + (l ? "" : " or undefined"));
|
|
3211
|
+
return n;
|
|
3205
3212
|
}
|
|
3206
|
-
function D(
|
|
3207
|
-
function
|
|
3208
|
-
if (!b(
|
|
3213
|
+
function D(n, u, d, l, a, i, p, g, k, h, m, c, b) {
|
|
3214
|
+
function A(f) {
|
|
3215
|
+
if (!b(f)) throw new TypeError("Attempted to access private element on non-instance");
|
|
3209
3216
|
}
|
|
3210
|
-
var
|
|
3211
|
-
if (
|
|
3212
|
-
|
|
3213
|
-
var
|
|
3214
|
-
h ? (
|
|
3215
|
-
return
|
|
3216
|
-
},
|
|
3217
|
-
|
|
3218
|
-
} } :
|
|
3217
|
+
var x, I = u[0], F = u[3], $ = !g;
|
|
3218
|
+
if (!$) {
|
|
3219
|
+
d || Array.isArray(I) || (I = [I]);
|
|
3220
|
+
var s = {}, R = [], v = a === 3 ? "get" : a === 4 || c ? "set" : "value";
|
|
3221
|
+
h ? (m || c ? s = { get: he(function() {
|
|
3222
|
+
return F(this);
|
|
3223
|
+
}, l, "get"), set: function(f) {
|
|
3224
|
+
u[4](this, f);
|
|
3225
|
+
} } : s[v] = F, m || he(s[v], l, a === 2 ? "" : v)) : m || (s = Object.getOwnPropertyDescriptor(n, l));
|
|
3219
3226
|
}
|
|
3220
|
-
for (var
|
|
3221
|
-
var Z =
|
|
3222
|
-
if (
|
|
3223
|
-
|
|
3227
|
+
for (var y = n, M = I.length - 1; M >= 0; M -= d ? 2 : 1) {
|
|
3228
|
+
var Z = I[M], B = d ? I[M - 1] : void 0, X = {}, C = { kind: ["field", "accessor", "method", "getter", "setter", "class"][a], name: l, metadata: i, addInitializer: (function(f, O) {
|
|
3229
|
+
if (f.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
3230
|
+
w(O, "An initializer", "be", !0), p.push(O);
|
|
3224
3231
|
}).bind(null, X) };
|
|
3225
3232
|
try {
|
|
3226
|
-
if (
|
|
3233
|
+
if ($) (x = w(Z.call(B, y, C), "class decorators", "return")) && (y = x);
|
|
3227
3234
|
else {
|
|
3228
|
-
var
|
|
3229
|
-
|
|
3230
|
-
return
|
|
3231
|
-
} : (a < 4 && (
|
|
3232
|
-
return
|
|
3233
|
-
}, (a < 2 || a === 4) && (z = function(
|
|
3234
|
-
|
|
3235
|
+
var j, z;
|
|
3236
|
+
C.static = k, C.private = h, h ? a === 2 ? j = function(f) {
|
|
3237
|
+
return A(f), s.value;
|
|
3238
|
+
} : (a < 4 && (j = S(s, "get", A)), a !== 3 && (z = S(s, "set", A))) : (j = function(f) {
|
|
3239
|
+
return f[l];
|
|
3240
|
+
}, (a < 2 || a === 4) && (z = function(f, O) {
|
|
3241
|
+
f[l] = O;
|
|
3235
3242
|
}));
|
|
3236
|
-
var Y =
|
|
3237
|
-
return
|
|
3243
|
+
var Y = C.access = { has: h ? b.bind() : function(f) {
|
|
3244
|
+
return l in f;
|
|
3238
3245
|
} };
|
|
3239
|
-
if (
|
|
3240
|
-
if (typeof
|
|
3241
|
-
else if (
|
|
3242
|
-
} else
|
|
3246
|
+
if (j && (Y.get = j), z && (Y.set = z), y = Z.call(B, c ? { get: s.get, set: s.set } : s[v], C), c) {
|
|
3247
|
+
if (typeof y == "object" && y) (x = w(y.get, "accessor.get")) && (s.get = x), (x = w(y.set, "accessor.set")) && (s.set = x), (x = w(y.init, "accessor.init")) && R.push(x);
|
|
3248
|
+
else if (y !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
3249
|
+
} else w(y, (m ? "field" : "method") + " decorators", "return") && (m ? R.push(y) : s[v] = y);
|
|
3243
3250
|
}
|
|
3244
3251
|
} finally {
|
|
3245
3252
|
X.v = !0;
|
|
3246
3253
|
}
|
|
3247
3254
|
}
|
|
3248
|
-
return (
|
|
3249
|
-
for (var H =
|
|
3255
|
+
return (m || c) && g.push(function(f, O) {
|
|
3256
|
+
for (var H = R.length - 1; H >= 0; H--) O = R[H].call(f, O);
|
|
3250
3257
|
return O;
|
|
3251
|
-
}),
|
|
3258
|
+
}), m || $ || (h ? c ? g.push(S(s, "get"), S(s, "set")) : g.push(a === 2 ? s[v] : S.call.bind(s[v])) : Object.defineProperty(n, l, s)), y;
|
|
3252
3259
|
}
|
|
3253
|
-
function
|
|
3254
|
-
return Object.defineProperty(
|
|
3260
|
+
function L(n, u) {
|
|
3261
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: u });
|
|
3255
3262
|
}
|
|
3256
|
-
if (arguments.length >= 6) var
|
|
3257
|
-
var N = Object.create(
|
|
3258
|
-
var a, i, p = [], g = function(
|
|
3259
|
-
return
|
|
3260
|
-
},
|
|
3261
|
-
function h(
|
|
3262
|
-
|
|
3263
|
+
if (arguments.length >= 6) var T = P[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
3264
|
+
var N = Object.create(T ?? null), U = function(n, u, d, l) {
|
|
3265
|
+
var a, i, p = [], g = function(v) {
|
|
3266
|
+
return kt(v) === n;
|
|
3267
|
+
}, k = /* @__PURE__ */ new Map();
|
|
3268
|
+
function h(v) {
|
|
3269
|
+
v && p.push(E.bind(null, v));
|
|
3263
3270
|
}
|
|
3264
|
-
for (var
|
|
3265
|
-
var
|
|
3266
|
-
if (Array.isArray(
|
|
3267
|
-
var b =
|
|
3268
|
-
if (
|
|
3269
|
-
var
|
|
3270
|
-
if (
|
|
3271
|
-
|
|
3271
|
+
for (var m = 0; m < u.length; m++) {
|
|
3272
|
+
var c = u[m];
|
|
3273
|
+
if (Array.isArray(c)) {
|
|
3274
|
+
var b = c[1], A = c[2], x = c.length > 3, I = 16 & b, F = !!(8 & b), $ = (b &= 7) == 0, s = A + "/" + F;
|
|
3275
|
+
if (!$ && !x) {
|
|
3276
|
+
var R = k.get(s);
|
|
3277
|
+
if (R === !0 || R === 3 && b !== 4 || R === 4 && b !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + A);
|
|
3278
|
+
k.set(s, !(b > 2) || b);
|
|
3272
3279
|
}
|
|
3273
|
-
D(
|
|
3280
|
+
D(F ? n : n.prototype, c, I, x ? "#" + A : De(A), b, l, F ? i = i || [] : a = a || [], p, F, x, $, b === 1, F && x ? g : d);
|
|
3274
3281
|
}
|
|
3275
3282
|
}
|
|
3276
3283
|
return h(a), h(i), p;
|
|
3277
|
-
}(e, t,
|
|
3278
|
-
return r.length ||
|
|
3279
|
-
var
|
|
3280
|
-
return r.length && [
|
|
3284
|
+
}(e, t, _, N);
|
|
3285
|
+
return r.length || L(e, N), { e: U, get c() {
|
|
3286
|
+
var n = [];
|
|
3287
|
+
return r.length && [L(D(e, [r], o, e.name, 5, N, n), N), E.bind(null, n, e)];
|
|
3281
3288
|
} };
|
|
3282
3289
|
}
|
|
3283
3290
|
function De(e) {
|
|
3284
|
-
var t =
|
|
3291
|
+
var t = bt(e, "string");
|
|
3285
3292
|
return typeof t == "symbol" ? t : t + "";
|
|
3286
3293
|
}
|
|
3287
|
-
function
|
|
3294
|
+
function bt(e, t) {
|
|
3288
3295
|
if (typeof e != "object" || !e) return e;
|
|
3289
3296
|
var r = e[Symbol.toPrimitive];
|
|
3290
3297
|
if (r !== void 0) {
|
|
3291
|
-
var
|
|
3292
|
-
if (typeof
|
|
3298
|
+
var o = r.call(e, t);
|
|
3299
|
+
if (typeof o != "object") return o;
|
|
3293
3300
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3294
3301
|
}
|
|
3295
3302
|
return String(e);
|
|
@@ -3302,134 +3309,134 @@ function he(e, t, r) {
|
|
|
3302
3309
|
}
|
|
3303
3310
|
return e;
|
|
3304
3311
|
}
|
|
3305
|
-
function
|
|
3312
|
+
function kt(e) {
|
|
3306
3313
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
3307
3314
|
return e;
|
|
3308
3315
|
}
|
|
3309
3316
|
Ce = [W({
|
|
3310
3317
|
tagName: "wsx-marked-blockquote"
|
|
3311
3318
|
})];
|
|
3312
|
-
let
|
|
3313
|
-
class
|
|
3319
|
+
let yt;
|
|
3320
|
+
class vt extends q {
|
|
3314
3321
|
constructor() {
|
|
3315
3322
|
super({
|
|
3316
3323
|
styles: fe,
|
|
3317
3324
|
styleName: "wsx-marked-blockquote"
|
|
3318
|
-
}),
|
|
3325
|
+
}), ft(this, "_autoStyles", fe);
|
|
3319
3326
|
}
|
|
3320
3327
|
render() {
|
|
3321
3328
|
return /* @__PURE__ */ G("blockquote", null, /* @__PURE__ */ G("slot", null));
|
|
3322
3329
|
}
|
|
3323
3330
|
}
|
|
3324
|
-
Ne =
|
|
3325
|
-
[
|
|
3331
|
+
Ne = vt;
|
|
3332
|
+
[yt, $e] = ht(Ne, [], Ce, 0, void 0, q).c;
|
|
3326
3333
|
$e();
|
|
3327
3334
|
var Pe;
|
|
3328
|
-
let
|
|
3335
|
+
let je, Me;
|
|
3329
3336
|
function xt(e, t, r) {
|
|
3330
|
-
return (t =
|
|
3337
|
+
return (t = ze(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3331
3338
|
}
|
|
3332
|
-
function
|
|
3333
|
-
function
|
|
3334
|
-
return function(
|
|
3335
|
-
return
|
|
3339
|
+
function wt(e, t, r, o, _, P) {
|
|
3340
|
+
function S(n, u, d) {
|
|
3341
|
+
return function(l, a) {
|
|
3342
|
+
return d && d(l), n[u].call(l, a);
|
|
3336
3343
|
};
|
|
3337
3344
|
}
|
|
3338
|
-
function
|
|
3339
|
-
for (var
|
|
3340
|
-
return
|
|
3345
|
+
function E(n, u) {
|
|
3346
|
+
for (var d = 0; d < n.length; d++) n[d].call(u);
|
|
3347
|
+
return u;
|
|
3341
3348
|
}
|
|
3342
|
-
function
|
|
3343
|
-
if (typeof
|
|
3344
|
-
return
|
|
3349
|
+
function w(n, u, d, l) {
|
|
3350
|
+
if (typeof n != "function" && (l || n !== void 0)) throw new TypeError(u + " must " + (d || "be") + " a function" + (l ? "" : " or undefined"));
|
|
3351
|
+
return n;
|
|
3345
3352
|
}
|
|
3346
|
-
function D(
|
|
3347
|
-
function
|
|
3348
|
-
if (!b(
|
|
3353
|
+
function D(n, u, d, l, a, i, p, g, k, h, m, c, b) {
|
|
3354
|
+
function A(f) {
|
|
3355
|
+
if (!b(f)) throw new TypeError("Attempted to access private element on non-instance");
|
|
3349
3356
|
}
|
|
3350
|
-
var
|
|
3351
|
-
if (
|
|
3352
|
-
|
|
3353
|
-
var
|
|
3354
|
-
h ? (
|
|
3355
|
-
return
|
|
3356
|
-
},
|
|
3357
|
-
|
|
3358
|
-
} } :
|
|
3357
|
+
var x, I = u[0], F = u[3], $ = !g;
|
|
3358
|
+
if (!$) {
|
|
3359
|
+
d || Array.isArray(I) || (I = [I]);
|
|
3360
|
+
var s = {}, R = [], v = a === 3 ? "get" : a === 4 || c ? "set" : "value";
|
|
3361
|
+
h ? (m || c ? s = { get: be(function() {
|
|
3362
|
+
return F(this);
|
|
3363
|
+
}, l, "get"), set: function(f) {
|
|
3364
|
+
u[4](this, f);
|
|
3365
|
+
} } : s[v] = F, m || be(s[v], l, a === 2 ? "" : v)) : m || (s = Object.getOwnPropertyDescriptor(n, l));
|
|
3359
3366
|
}
|
|
3360
|
-
for (var
|
|
3361
|
-
var Z =
|
|
3362
|
-
if (
|
|
3363
|
-
|
|
3367
|
+
for (var y = n, M = I.length - 1; M >= 0; M -= d ? 2 : 1) {
|
|
3368
|
+
var Z = I[M], B = d ? I[M - 1] : void 0, X = {}, C = { kind: ["field", "accessor", "method", "getter", "setter", "class"][a], name: l, metadata: i, addInitializer: (function(f, O) {
|
|
3369
|
+
if (f.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
3370
|
+
w(O, "An initializer", "be", !0), p.push(O);
|
|
3364
3371
|
}).bind(null, X) };
|
|
3365
3372
|
try {
|
|
3366
|
-
if (
|
|
3373
|
+
if ($) (x = w(Z.call(B, y, C), "class decorators", "return")) && (y = x);
|
|
3367
3374
|
else {
|
|
3368
|
-
var
|
|
3369
|
-
|
|
3370
|
-
return
|
|
3371
|
-
} : (a < 4 && (
|
|
3372
|
-
return
|
|
3373
|
-
}, (a < 2 || a === 4) && (z = function(
|
|
3374
|
-
|
|
3375
|
+
var j, z;
|
|
3376
|
+
C.static = k, C.private = h, h ? a === 2 ? j = function(f) {
|
|
3377
|
+
return A(f), s.value;
|
|
3378
|
+
} : (a < 4 && (j = S(s, "get", A)), a !== 3 && (z = S(s, "set", A))) : (j = function(f) {
|
|
3379
|
+
return f[l];
|
|
3380
|
+
}, (a < 2 || a === 4) && (z = function(f, O) {
|
|
3381
|
+
f[l] = O;
|
|
3375
3382
|
}));
|
|
3376
|
-
var Y =
|
|
3377
|
-
return
|
|
3383
|
+
var Y = C.access = { has: h ? b.bind() : function(f) {
|
|
3384
|
+
return l in f;
|
|
3378
3385
|
} };
|
|
3379
|
-
if (
|
|
3380
|
-
if (typeof
|
|
3381
|
-
else if (
|
|
3382
|
-
} else
|
|
3386
|
+
if (j && (Y.get = j), z && (Y.set = z), y = Z.call(B, c ? { get: s.get, set: s.set } : s[v], C), c) {
|
|
3387
|
+
if (typeof y == "object" && y) (x = w(y.get, "accessor.get")) && (s.get = x), (x = w(y.set, "accessor.set")) && (s.set = x), (x = w(y.init, "accessor.init")) && R.push(x);
|
|
3388
|
+
else if (y !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
3389
|
+
} else w(y, (m ? "field" : "method") + " decorators", "return") && (m ? R.push(y) : s[v] = y);
|
|
3383
3390
|
}
|
|
3384
3391
|
} finally {
|
|
3385
3392
|
X.v = !0;
|
|
3386
3393
|
}
|
|
3387
3394
|
}
|
|
3388
|
-
return (
|
|
3389
|
-
for (var H =
|
|
3395
|
+
return (m || c) && g.push(function(f, O) {
|
|
3396
|
+
for (var H = R.length - 1; H >= 0; H--) O = R[H].call(f, O);
|
|
3390
3397
|
return O;
|
|
3391
|
-
}),
|
|
3398
|
+
}), m || $ || (h ? c ? g.push(S(s, "get"), S(s, "set")) : g.push(a === 2 ? s[v] : S.call.bind(s[v])) : Object.defineProperty(n, l, s)), y;
|
|
3392
3399
|
}
|
|
3393
|
-
function
|
|
3394
|
-
return Object.defineProperty(
|
|
3400
|
+
function L(n, u) {
|
|
3401
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: u });
|
|
3395
3402
|
}
|
|
3396
|
-
if (arguments.length >= 6) var
|
|
3397
|
-
var N = Object.create(
|
|
3398
|
-
var a, i, p = [], g = function(
|
|
3399
|
-
return
|
|
3400
|
-
},
|
|
3401
|
-
function h(
|
|
3402
|
-
|
|
3403
|
+
if (arguments.length >= 6) var T = P[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
3404
|
+
var N = Object.create(T ?? null), U = function(n, u, d, l) {
|
|
3405
|
+
var a, i, p = [], g = function(v) {
|
|
3406
|
+
return At(v) === n;
|
|
3407
|
+
}, k = /* @__PURE__ */ new Map();
|
|
3408
|
+
function h(v) {
|
|
3409
|
+
v && p.push(E.bind(null, v));
|
|
3403
3410
|
}
|
|
3404
|
-
for (var
|
|
3405
|
-
var
|
|
3406
|
-
if (Array.isArray(
|
|
3407
|
-
var b =
|
|
3408
|
-
if (
|
|
3409
|
-
var
|
|
3410
|
-
if (
|
|
3411
|
-
|
|
3411
|
+
for (var m = 0; m < u.length; m++) {
|
|
3412
|
+
var c = u[m];
|
|
3413
|
+
if (Array.isArray(c)) {
|
|
3414
|
+
var b = c[1], A = c[2], x = c.length > 3, I = 16 & b, F = !!(8 & b), $ = (b &= 7) == 0, s = A + "/" + F;
|
|
3415
|
+
if (!$ && !x) {
|
|
3416
|
+
var R = k.get(s);
|
|
3417
|
+
if (R === !0 || R === 3 && b !== 4 || R === 4 && b !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + A);
|
|
3418
|
+
k.set(s, !(b > 2) || b);
|
|
3412
3419
|
}
|
|
3413
|
-
D(
|
|
3420
|
+
D(F ? n : n.prototype, c, I, x ? "#" + A : ze(A), b, l, F ? i = i || [] : a = a || [], p, F, x, $, b === 1, F && x ? g : d);
|
|
3414
3421
|
}
|
|
3415
3422
|
}
|
|
3416
3423
|
return h(a), h(i), p;
|
|
3417
|
-
}(e, t,
|
|
3418
|
-
return r.length ||
|
|
3419
|
-
var
|
|
3420
|
-
return r.length && [
|
|
3424
|
+
}(e, t, _, N);
|
|
3425
|
+
return r.length || L(e, N), { e: U, get c() {
|
|
3426
|
+
var n = [];
|
|
3427
|
+
return r.length && [L(D(e, [r], o, e.name, 5, N, n), N), E.bind(null, n, e)];
|
|
3421
3428
|
} };
|
|
3422
3429
|
}
|
|
3423
|
-
function
|
|
3424
|
-
var t =
|
|
3430
|
+
function ze(e) {
|
|
3431
|
+
var t = Et(e, "string");
|
|
3425
3432
|
return typeof t == "symbol" ? t : t + "";
|
|
3426
3433
|
}
|
|
3427
|
-
function
|
|
3434
|
+
function Et(e, t) {
|
|
3428
3435
|
if (typeof e != "object" || !e) return e;
|
|
3429
3436
|
var r = e[Symbol.toPrimitive];
|
|
3430
3437
|
if (r !== void 0) {
|
|
3431
|
-
var
|
|
3432
|
-
if (typeof
|
|
3438
|
+
var o = r.call(e, t);
|
|
3439
|
+
if (typeof o != "object") return o;
|
|
3433
3440
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3434
3441
|
}
|
|
3435
3442
|
return String(e);
|
|
@@ -3442,14 +3449,14 @@ function be(e, t, r) {
|
|
|
3442
3449
|
}
|
|
3443
3450
|
return e;
|
|
3444
3451
|
}
|
|
3445
|
-
function
|
|
3452
|
+
function At(e) {
|
|
3446
3453
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
3447
3454
|
return e;
|
|
3448
3455
|
}
|
|
3449
|
-
|
|
3456
|
+
Me = [W({
|
|
3450
3457
|
tagName: "wsx-marked-paragraph"
|
|
3451
3458
|
})];
|
|
3452
|
-
let
|
|
3459
|
+
let St;
|
|
3453
3460
|
class _t extends q {
|
|
3454
3461
|
constructor() {
|
|
3455
3462
|
super({
|
|
@@ -3466,122 +3473,122 @@ class _t extends q {
|
|
|
3466
3473
|
static get observedAttributes() {
|
|
3467
3474
|
return ["content"];
|
|
3468
3475
|
}
|
|
3469
|
-
attributeChangedCallback(t, r,
|
|
3470
|
-
t === "content" && (this.content =
|
|
3476
|
+
attributeChangedCallback(t, r, o) {
|
|
3477
|
+
t === "content" && (this.content = o || "");
|
|
3471
3478
|
}
|
|
3472
3479
|
render() {
|
|
3473
3480
|
return /* @__PURE__ */ G("p", { class: "marked-paragraph" }, this.content);
|
|
3474
3481
|
}
|
|
3475
3482
|
}
|
|
3476
3483
|
Pe = _t;
|
|
3477
|
-
[
|
|
3478
|
-
|
|
3479
|
-
var
|
|
3484
|
+
[St, je] = wt(Pe, [], Me, 0, void 0, q).c;
|
|
3485
|
+
je();
|
|
3486
|
+
var Ue;
|
|
3480
3487
|
let Be, He;
|
|
3481
3488
|
function ke(e, t, r) {
|
|
3482
3489
|
return (t = Ge(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3483
3490
|
}
|
|
3484
|
-
function
|
|
3485
|
-
function
|
|
3486
|
-
return function(
|
|
3487
|
-
return
|
|
3491
|
+
function Tt(e, t, r, o, _, P) {
|
|
3492
|
+
function S(n, u, d) {
|
|
3493
|
+
return function(l, a) {
|
|
3494
|
+
return d && d(l), n[u].call(l, a);
|
|
3488
3495
|
};
|
|
3489
3496
|
}
|
|
3490
|
-
function
|
|
3491
|
-
for (var
|
|
3492
|
-
return
|
|
3497
|
+
function E(n, u) {
|
|
3498
|
+
for (var d = 0; d < n.length; d++) n[d].call(u);
|
|
3499
|
+
return u;
|
|
3493
3500
|
}
|
|
3494
|
-
function
|
|
3495
|
-
if (typeof
|
|
3496
|
-
return
|
|
3501
|
+
function w(n, u, d, l) {
|
|
3502
|
+
if (typeof n != "function" && (l || n !== void 0)) throw new TypeError(u + " must " + (d || "be") + " a function" + (l ? "" : " or undefined"));
|
|
3503
|
+
return n;
|
|
3497
3504
|
}
|
|
3498
|
-
function D(
|
|
3499
|
-
function
|
|
3500
|
-
if (!b(
|
|
3505
|
+
function D(n, u, d, l, a, i, p, g, k, h, m, c, b) {
|
|
3506
|
+
function A(f) {
|
|
3507
|
+
if (!b(f)) throw new TypeError("Attempted to access private element on non-instance");
|
|
3501
3508
|
}
|
|
3502
|
-
var
|
|
3503
|
-
if (
|
|
3504
|
-
|
|
3505
|
-
var
|
|
3506
|
-
h ? (
|
|
3507
|
-
return
|
|
3508
|
-
},
|
|
3509
|
-
|
|
3510
|
-
} } :
|
|
3509
|
+
var x, I = u[0], F = u[3], $ = !g;
|
|
3510
|
+
if (!$) {
|
|
3511
|
+
d || Array.isArray(I) || (I = [I]);
|
|
3512
|
+
var s = {}, R = [], v = a === 3 ? "get" : a === 4 || c ? "set" : "value";
|
|
3513
|
+
h ? (m || c ? s = { get: ye(function() {
|
|
3514
|
+
return F(this);
|
|
3515
|
+
}, l, "get"), set: function(f) {
|
|
3516
|
+
u[4](this, f);
|
|
3517
|
+
} } : s[v] = F, m || ye(s[v], l, a === 2 ? "" : v)) : m || (s = Object.getOwnPropertyDescriptor(n, l));
|
|
3511
3518
|
}
|
|
3512
|
-
for (var
|
|
3513
|
-
var Z =
|
|
3514
|
-
if (
|
|
3515
|
-
|
|
3519
|
+
for (var y = n, M = I.length - 1; M >= 0; M -= d ? 2 : 1) {
|
|
3520
|
+
var Z = I[M], B = d ? I[M - 1] : void 0, X = {}, C = { kind: ["field", "accessor", "method", "getter", "setter", "class"][a], name: l, metadata: i, addInitializer: (function(f, O) {
|
|
3521
|
+
if (f.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
3522
|
+
w(O, "An initializer", "be", !0), p.push(O);
|
|
3516
3523
|
}).bind(null, X) };
|
|
3517
3524
|
try {
|
|
3518
|
-
if (
|
|
3525
|
+
if ($) (x = w(Z.call(B, y, C), "class decorators", "return")) && (y = x);
|
|
3519
3526
|
else {
|
|
3520
|
-
var
|
|
3521
|
-
|
|
3522
|
-
return
|
|
3523
|
-
} : (a < 4 && (
|
|
3524
|
-
return
|
|
3525
|
-
}, (a < 2 || a === 4) && (z = function(
|
|
3526
|
-
|
|
3527
|
+
var j, z;
|
|
3528
|
+
C.static = k, C.private = h, h ? a === 2 ? j = function(f) {
|
|
3529
|
+
return A(f), s.value;
|
|
3530
|
+
} : (a < 4 && (j = S(s, "get", A)), a !== 3 && (z = S(s, "set", A))) : (j = function(f) {
|
|
3531
|
+
return f[l];
|
|
3532
|
+
}, (a < 2 || a === 4) && (z = function(f, O) {
|
|
3533
|
+
f[l] = O;
|
|
3527
3534
|
}));
|
|
3528
|
-
var Y =
|
|
3529
|
-
return
|
|
3535
|
+
var Y = C.access = { has: h ? b.bind() : function(f) {
|
|
3536
|
+
return l in f;
|
|
3530
3537
|
} };
|
|
3531
|
-
if (
|
|
3532
|
-
if (typeof
|
|
3533
|
-
else if (
|
|
3534
|
-
} else
|
|
3538
|
+
if (j && (Y.get = j), z && (Y.set = z), y = Z.call(B, c ? { get: s.get, set: s.set } : s[v], C), c) {
|
|
3539
|
+
if (typeof y == "object" && y) (x = w(y.get, "accessor.get")) && (s.get = x), (x = w(y.set, "accessor.set")) && (s.set = x), (x = w(y.init, "accessor.init")) && R.push(x);
|
|
3540
|
+
else if (y !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
3541
|
+
} else w(y, (m ? "field" : "method") + " decorators", "return") && (m ? R.push(y) : s[v] = y);
|
|
3535
3542
|
}
|
|
3536
3543
|
} finally {
|
|
3537
3544
|
X.v = !0;
|
|
3538
3545
|
}
|
|
3539
3546
|
}
|
|
3540
|
-
return (
|
|
3541
|
-
for (var H =
|
|
3547
|
+
return (m || c) && g.push(function(f, O) {
|
|
3548
|
+
for (var H = R.length - 1; H >= 0; H--) O = R[H].call(f, O);
|
|
3542
3549
|
return O;
|
|
3543
|
-
}),
|
|
3550
|
+
}), m || $ || (h ? c ? g.push(S(s, "get"), S(s, "set")) : g.push(a === 2 ? s[v] : S.call.bind(s[v])) : Object.defineProperty(n, l, s)), y;
|
|
3544
3551
|
}
|
|
3545
|
-
function
|
|
3546
|
-
return Object.defineProperty(
|
|
3552
|
+
function L(n, u) {
|
|
3553
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: u });
|
|
3547
3554
|
}
|
|
3548
|
-
if (arguments.length >= 6) var
|
|
3549
|
-
var N = Object.create(
|
|
3550
|
-
var a, i, p = [], g = function(
|
|
3551
|
-
return
|
|
3552
|
-
},
|
|
3553
|
-
function h(
|
|
3554
|
-
|
|
3555
|
+
if (arguments.length >= 6) var T = P[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
3556
|
+
var N = Object.create(T ?? null), U = function(n, u, d, l) {
|
|
3557
|
+
var a, i, p = [], g = function(v) {
|
|
3558
|
+
return Ft(v) === n;
|
|
3559
|
+
}, k = /* @__PURE__ */ new Map();
|
|
3560
|
+
function h(v) {
|
|
3561
|
+
v && p.push(E.bind(null, v));
|
|
3555
3562
|
}
|
|
3556
|
-
for (var
|
|
3557
|
-
var
|
|
3558
|
-
if (Array.isArray(
|
|
3559
|
-
var b =
|
|
3560
|
-
if (
|
|
3561
|
-
var
|
|
3562
|
-
if (
|
|
3563
|
-
|
|
3563
|
+
for (var m = 0; m < u.length; m++) {
|
|
3564
|
+
var c = u[m];
|
|
3565
|
+
if (Array.isArray(c)) {
|
|
3566
|
+
var b = c[1], A = c[2], x = c.length > 3, I = 16 & b, F = !!(8 & b), $ = (b &= 7) == 0, s = A + "/" + F;
|
|
3567
|
+
if (!$ && !x) {
|
|
3568
|
+
var R = k.get(s);
|
|
3569
|
+
if (R === !0 || R === 3 && b !== 4 || R === 4 && b !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + A);
|
|
3570
|
+
k.set(s, !(b > 2) || b);
|
|
3564
3571
|
}
|
|
3565
|
-
D(
|
|
3572
|
+
D(F ? n : n.prototype, c, I, x ? "#" + A : Ge(A), b, l, F ? i = i || [] : a = a || [], p, F, x, $, b === 1, F && x ? g : d);
|
|
3566
3573
|
}
|
|
3567
3574
|
}
|
|
3568
3575
|
return h(a), h(i), p;
|
|
3569
|
-
}(e, t,
|
|
3570
|
-
return r.length ||
|
|
3571
|
-
var
|
|
3572
|
-
return r.length && [
|
|
3576
|
+
}(e, t, _, N);
|
|
3577
|
+
return r.length || L(e, N), { e: U, get c() {
|
|
3578
|
+
var n = [];
|
|
3579
|
+
return r.length && [L(D(e, [r], o, e.name, 5, N, n), N), E.bind(null, n, e)];
|
|
3573
3580
|
} };
|
|
3574
3581
|
}
|
|
3575
3582
|
function Ge(e) {
|
|
3576
|
-
var t =
|
|
3583
|
+
var t = It(e, "string");
|
|
3577
3584
|
return typeof t == "symbol" ? t : t + "";
|
|
3578
3585
|
}
|
|
3579
|
-
function
|
|
3586
|
+
function It(e, t) {
|
|
3580
3587
|
if (typeof e != "object" || !e) return e;
|
|
3581
3588
|
var r = e[Symbol.toPrimitive];
|
|
3582
3589
|
if (r !== void 0) {
|
|
3583
|
-
var
|
|
3584
|
-
if (typeof
|
|
3590
|
+
var o = r.call(e, t);
|
|
3591
|
+
if (typeof o != "object") return o;
|
|
3585
3592
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3586
3593
|
}
|
|
3587
3594
|
return String(e);
|
|
@@ -3594,14 +3601,14 @@ function ye(e, t, r) {
|
|
|
3594
3601
|
}
|
|
3595
3602
|
return e;
|
|
3596
3603
|
}
|
|
3597
|
-
function
|
|
3604
|
+
function Ft(e) {
|
|
3598
3605
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
3599
3606
|
return e;
|
|
3600
3607
|
}
|
|
3601
3608
|
He = [W({
|
|
3602
3609
|
tagName: "wsx-marked-list"
|
|
3603
3610
|
})];
|
|
3604
|
-
let
|
|
3611
|
+
let Rt;
|
|
3605
3612
|
class Ot extends q {
|
|
3606
3613
|
constructor() {
|
|
3607
3614
|
super(), ke(this, "ordered", void 0), ke(this, "items", void 0);
|
|
@@ -3612,11 +3619,11 @@ class Ot extends q {
|
|
|
3612
3619
|
enumerable: !0,
|
|
3613
3620
|
configurable: !0
|
|
3614
3621
|
});
|
|
3615
|
-
let
|
|
3622
|
+
let o = this.reactive([]);
|
|
3616
3623
|
Object.defineProperty(this, "items", {
|
|
3617
|
-
get: () =>
|
|
3618
|
-
set: (
|
|
3619
|
-
|
|
3624
|
+
get: () => o,
|
|
3625
|
+
set: (_) => {
|
|
3626
|
+
o = _ !== null && typeof _ < "u" && (Array.isArray(_) || typeof _ == "object") ? this.reactive(_) : _, this.scheduleRerender();
|
|
3620
3627
|
},
|
|
3621
3628
|
enumerable: !0,
|
|
3622
3629
|
configurable: !0
|
|
@@ -3626,115 +3633,115 @@ class Ot extends q {
|
|
|
3626
3633
|
return this.ordered ? /* @__PURE__ */ G("ol", { class: "marked-list" }, this.items.map((t, r) => /* @__PURE__ */ G("li", { key: r, class: "marked-list-item" }, t))) : /* @__PURE__ */ G("ul", { class: "marked-list" }, this.items.map((t, r) => /* @__PURE__ */ G("li", { key: r, class: "marked-list-item" }, t)));
|
|
3627
3634
|
}
|
|
3628
3635
|
}
|
|
3629
|
-
|
|
3630
|
-
[
|
|
3636
|
+
Ue = Ot;
|
|
3637
|
+
[Rt, Be] = Tt(Ue, [], He, 0, void 0, q).c;
|
|
3631
3638
|
Be();
|
|
3632
3639
|
var Ze;
|
|
3633
3640
|
let Ye, Xe;
|
|
3634
|
-
function
|
|
3641
|
+
function Lt(e, t, r) {
|
|
3635
3642
|
return (t = qe(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
3636
3643
|
}
|
|
3637
|
-
function
|
|
3638
|
-
function
|
|
3639
|
-
return function(
|
|
3640
|
-
return
|
|
3644
|
+
function Nt(e, t, r, o, _, P) {
|
|
3645
|
+
function S(n, u, d) {
|
|
3646
|
+
return function(l, a) {
|
|
3647
|
+
return d && d(l), n[u].call(l, a);
|
|
3641
3648
|
};
|
|
3642
3649
|
}
|
|
3643
|
-
function
|
|
3644
|
-
for (var
|
|
3645
|
-
return
|
|
3650
|
+
function E(n, u) {
|
|
3651
|
+
for (var d = 0; d < n.length; d++) n[d].call(u);
|
|
3652
|
+
return u;
|
|
3646
3653
|
}
|
|
3647
|
-
function
|
|
3648
|
-
if (typeof
|
|
3649
|
-
return
|
|
3654
|
+
function w(n, u, d, l) {
|
|
3655
|
+
if (typeof n != "function" && (l || n !== void 0)) throw new TypeError(u + " must " + (d || "be") + " a function" + (l ? "" : " or undefined"));
|
|
3656
|
+
return n;
|
|
3650
3657
|
}
|
|
3651
|
-
function D(
|
|
3652
|
-
function
|
|
3653
|
-
if (!b(
|
|
3658
|
+
function D(n, u, d, l, a, i, p, g, k, h, m, c, b) {
|
|
3659
|
+
function A(f) {
|
|
3660
|
+
if (!b(f)) throw new TypeError("Attempted to access private element on non-instance");
|
|
3654
3661
|
}
|
|
3655
|
-
var
|
|
3656
|
-
if (
|
|
3657
|
-
|
|
3658
|
-
var
|
|
3659
|
-
h ? (
|
|
3660
|
-
return
|
|
3661
|
-
},
|
|
3662
|
-
|
|
3663
|
-
} } :
|
|
3662
|
+
var x, I = u[0], F = u[3], $ = !g;
|
|
3663
|
+
if (!$) {
|
|
3664
|
+
d || Array.isArray(I) || (I = [I]);
|
|
3665
|
+
var s = {}, R = [], v = a === 3 ? "get" : a === 4 || c ? "set" : "value";
|
|
3666
|
+
h ? (m || c ? s = { get: ve(function() {
|
|
3667
|
+
return F(this);
|
|
3668
|
+
}, l, "get"), set: function(f) {
|
|
3669
|
+
u[4](this, f);
|
|
3670
|
+
} } : s[v] = F, m || ve(s[v], l, a === 2 ? "" : v)) : m || (s = Object.getOwnPropertyDescriptor(n, l));
|
|
3664
3671
|
}
|
|
3665
|
-
for (var
|
|
3666
|
-
var Z =
|
|
3667
|
-
if (
|
|
3668
|
-
|
|
3672
|
+
for (var y = n, M = I.length - 1; M >= 0; M -= d ? 2 : 1) {
|
|
3673
|
+
var Z = I[M], B = d ? I[M - 1] : void 0, X = {}, C = { kind: ["field", "accessor", "method", "getter", "setter", "class"][a], name: l, metadata: i, addInitializer: (function(f, O) {
|
|
3674
|
+
if (f.v) throw se("attempted to call addInitializer after decoration was finished");
|
|
3675
|
+
w(O, "An initializer", "be", !0), p.push(O);
|
|
3669
3676
|
}).bind(null, X) };
|
|
3670
3677
|
try {
|
|
3671
|
-
if (
|
|
3678
|
+
if ($) (x = w(Z.call(B, y, C), "class decorators", "return")) && (y = x);
|
|
3672
3679
|
else {
|
|
3673
|
-
var
|
|
3674
|
-
|
|
3675
|
-
return
|
|
3676
|
-
} : (a < 4 && (
|
|
3677
|
-
return
|
|
3678
|
-
}, (a < 2 || a === 4) && (z = function(
|
|
3679
|
-
|
|
3680
|
+
var j, z;
|
|
3681
|
+
C.static = k, C.private = h, h ? a === 2 ? j = function(f) {
|
|
3682
|
+
return A(f), s.value;
|
|
3683
|
+
} : (a < 4 && (j = S(s, "get", A)), a !== 3 && (z = S(s, "set", A))) : (j = function(f) {
|
|
3684
|
+
return f[l];
|
|
3685
|
+
}, (a < 2 || a === 4) && (z = function(f, O) {
|
|
3686
|
+
f[l] = O;
|
|
3680
3687
|
}));
|
|
3681
|
-
var Y =
|
|
3682
|
-
return
|
|
3688
|
+
var Y = C.access = { has: h ? b.bind() : function(f) {
|
|
3689
|
+
return l in f;
|
|
3683
3690
|
} };
|
|
3684
|
-
if (
|
|
3685
|
-
if (typeof
|
|
3686
|
-
else if (
|
|
3687
|
-
} else
|
|
3691
|
+
if (j && (Y.get = j), z && (Y.set = z), y = Z.call(B, c ? { get: s.get, set: s.set } : s[v], C), c) {
|
|
3692
|
+
if (typeof y == "object" && y) (x = w(y.get, "accessor.get")) && (s.get = x), (x = w(y.set, "accessor.set")) && (s.set = x), (x = w(y.init, "accessor.init")) && R.push(x);
|
|
3693
|
+
else if (y !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
3694
|
+
} else w(y, (m ? "field" : "method") + " decorators", "return") && (m ? R.push(y) : s[v] = y);
|
|
3688
3695
|
}
|
|
3689
3696
|
} finally {
|
|
3690
3697
|
X.v = !0;
|
|
3691
3698
|
}
|
|
3692
3699
|
}
|
|
3693
|
-
return (
|
|
3694
|
-
for (var H =
|
|
3700
|
+
return (m || c) && g.push(function(f, O) {
|
|
3701
|
+
for (var H = R.length - 1; H >= 0; H--) O = R[H].call(f, O);
|
|
3695
3702
|
return O;
|
|
3696
|
-
}),
|
|
3703
|
+
}), m || $ || (h ? c ? g.push(S(s, "get"), S(s, "set")) : g.push(a === 2 ? s[v] : S.call.bind(s[v])) : Object.defineProperty(n, l, s)), y;
|
|
3697
3704
|
}
|
|
3698
|
-
function
|
|
3699
|
-
return Object.defineProperty(
|
|
3705
|
+
function L(n, u) {
|
|
3706
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: u });
|
|
3700
3707
|
}
|
|
3701
|
-
if (arguments.length >= 6) var
|
|
3702
|
-
var N = Object.create(
|
|
3703
|
-
var a, i, p = [], g = function(
|
|
3704
|
-
return
|
|
3705
|
-
},
|
|
3706
|
-
function h(
|
|
3707
|
-
|
|
3708
|
+
if (arguments.length >= 6) var T = P[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
3709
|
+
var N = Object.create(T ?? null), U = function(n, u, d, l) {
|
|
3710
|
+
var a, i, p = [], g = function(v) {
|
|
3711
|
+
return Ct(v) === n;
|
|
3712
|
+
}, k = /* @__PURE__ */ new Map();
|
|
3713
|
+
function h(v) {
|
|
3714
|
+
v && p.push(E.bind(null, v));
|
|
3708
3715
|
}
|
|
3709
|
-
for (var
|
|
3710
|
-
var
|
|
3711
|
-
if (Array.isArray(
|
|
3712
|
-
var b =
|
|
3713
|
-
if (
|
|
3714
|
-
var
|
|
3715
|
-
if (
|
|
3716
|
-
|
|
3716
|
+
for (var m = 0; m < u.length; m++) {
|
|
3717
|
+
var c = u[m];
|
|
3718
|
+
if (Array.isArray(c)) {
|
|
3719
|
+
var b = c[1], A = c[2], x = c.length > 3, I = 16 & b, F = !!(8 & b), $ = (b &= 7) == 0, s = A + "/" + F;
|
|
3720
|
+
if (!$ && !x) {
|
|
3721
|
+
var R = k.get(s);
|
|
3722
|
+
if (R === !0 || R === 3 && b !== 4 || R === 4 && b !== 3) throw se("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + A);
|
|
3723
|
+
k.set(s, !(b > 2) || b);
|
|
3717
3724
|
}
|
|
3718
|
-
D(
|
|
3725
|
+
D(F ? n : n.prototype, c, I, x ? "#" + A : qe(A), b, l, F ? i = i || [] : a = a || [], p, F, x, $, b === 1, F && x ? g : d);
|
|
3719
3726
|
}
|
|
3720
3727
|
}
|
|
3721
3728
|
return h(a), h(i), p;
|
|
3722
|
-
}(e, t,
|
|
3723
|
-
return r.length ||
|
|
3724
|
-
var
|
|
3725
|
-
return r.length && [
|
|
3729
|
+
}(e, t, _, N);
|
|
3730
|
+
return r.length || L(e, N), { e: U, get c() {
|
|
3731
|
+
var n = [];
|
|
3732
|
+
return r.length && [L(D(e, [r], o, e.name, 5, N, n), N), E.bind(null, n, e)];
|
|
3726
3733
|
} };
|
|
3727
3734
|
}
|
|
3728
3735
|
function qe(e) {
|
|
3729
|
-
var t =
|
|
3736
|
+
var t = $t(e, "string");
|
|
3730
3737
|
return typeof t == "symbol" ? t : t + "";
|
|
3731
3738
|
}
|
|
3732
|
-
function
|
|
3739
|
+
function $t(e, t) {
|
|
3733
3740
|
if (typeof e != "object" || !e) return e;
|
|
3734
3741
|
var r = e[Symbol.toPrimitive];
|
|
3735
3742
|
if (r !== void 0) {
|
|
3736
|
-
var
|
|
3737
|
-
if (typeof
|
|
3743
|
+
var o = r.call(e, t);
|
|
3744
|
+
if (typeof o != "object") return o;
|
|
3738
3745
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
3739
3746
|
}
|
|
3740
3747
|
return String(e);
|
|
@@ -3747,284 +3754,154 @@ function ve(e, t, r) {
|
|
|
3747
3754
|
}
|
|
3748
3755
|
return e;
|
|
3749
3756
|
}
|
|
3750
|
-
function
|
|
3757
|
+
function Ct(e) {
|
|
3751
3758
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
3752
3759
|
return e;
|
|
3753
3760
|
}
|
|
3754
3761
|
Xe = [W({
|
|
3755
3762
|
tagName: "wsx-marked-error"
|
|
3756
3763
|
})];
|
|
3757
|
-
let
|
|
3764
|
+
let Dt, se = class extends q {
|
|
3758
3765
|
constructor() {
|
|
3759
3766
|
super({
|
|
3760
3767
|
styleName: "wsx-marked-error"
|
|
3761
|
-
}),
|
|
3768
|
+
}), Lt(this, "message", "");
|
|
3762
3769
|
}
|
|
3763
3770
|
static get observedAttributes() {
|
|
3764
3771
|
return ["message"];
|
|
3765
3772
|
}
|
|
3766
|
-
attributeChangedCallback(t, r,
|
|
3767
|
-
t === "message" && (this.message =
|
|
3773
|
+
attributeChangedCallback(t, r, o) {
|
|
3774
|
+
t === "message" && (this.message = o || "", this.rerender());
|
|
3768
3775
|
}
|
|
3769
3776
|
render() {
|
|
3770
3777
|
return /* @__PURE__ */ G("div", { class: "error" }, this.message);
|
|
3771
3778
|
}
|
|
3772
3779
|
};
|
|
3773
|
-
Ze =
|
|
3774
|
-
[
|
|
3780
|
+
Ze = se;
|
|
3781
|
+
[Dt, Ye] = Nt(Ze, [], Xe, 0, void 0, q).c;
|
|
3775
3782
|
Ye();
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
"trace",
|
|
3784
|
-
"debug",
|
|
3785
|
-
"info",
|
|
3786
|
-
"warn",
|
|
3787
|
-
"error"
|
|
3788
|
-
], $ = {}, A = null;
|
|
3789
|
-
function S(s, c) {
|
|
3790
|
-
var n = s[c];
|
|
3791
|
-
if (typeof n.bind == "function")
|
|
3792
|
-
return n.bind(s);
|
|
3793
|
-
try {
|
|
3794
|
-
return Function.prototype.bind.call(n, s);
|
|
3795
|
-
} catch {
|
|
3796
|
-
return function() {
|
|
3797
|
-
return Function.prototype.apply.apply(n, [s, arguments]);
|
|
3798
|
-
};
|
|
3799
|
-
}
|
|
3800
|
-
}
|
|
3801
|
-
function E() {
|
|
3802
|
-
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
3803
|
-
}
|
|
3804
|
-
function D(s) {
|
|
3805
|
-
return s === "debug" && (s = "log"), typeof console === r ? !1 : s === "trace" && l ? E : console[s] !== void 0 ? S(console, s) : console.log !== void 0 ? S(console, "log") : t;
|
|
3806
|
-
}
|
|
3807
|
-
function F() {
|
|
3808
|
-
for (var s = this.getLevel(), c = 0; c < T.length; c++) {
|
|
3809
|
-
var n = T[c];
|
|
3810
|
-
this[n] = c < s ? t : this.methodFactory(n, s, this.name);
|
|
3811
|
-
}
|
|
3812
|
-
if (this.log = this.debug, typeof console === r && s < this.levels.SILENT)
|
|
3813
|
-
return "No console available for logging";
|
|
3814
|
-
}
|
|
3815
|
-
function R(s) {
|
|
3816
|
-
return function() {
|
|
3817
|
-
typeof console !== r && (F.call(this), this[s].apply(this, arguments));
|
|
3818
|
-
};
|
|
3819
|
-
}
|
|
3820
|
-
function N(s, c, n) {
|
|
3821
|
-
return D(s) || R.apply(this, arguments);
|
|
3822
|
-
}
|
|
3823
|
-
function U(s, c) {
|
|
3824
|
-
var n = this, a, i, p, g = "loglevel";
|
|
3825
|
-
typeof s == "string" ? g += ":" + s : typeof s == "symbol" && (g = void 0);
|
|
3826
|
-
function y(x) {
|
|
3827
|
-
var m = (T[x] || "silent").toUpperCase();
|
|
3828
|
-
if (!(typeof window === r || !g)) {
|
|
3829
|
-
try {
|
|
3830
|
-
window.localStorage[g] = m;
|
|
3831
|
-
return;
|
|
3832
|
-
} catch {
|
|
3833
|
-
}
|
|
3834
|
-
try {
|
|
3835
|
-
window.document.cookie = encodeURIComponent(g) + "=" + m + ";";
|
|
3836
|
-
} catch {
|
|
3837
|
-
}
|
|
3838
|
-
}
|
|
3839
|
-
}
|
|
3840
|
-
function h() {
|
|
3841
|
-
var x;
|
|
3842
|
-
if (!(typeof window === r || !g)) {
|
|
3843
|
-
try {
|
|
3844
|
-
x = window.localStorage[g];
|
|
3845
|
-
} catch {
|
|
3846
|
-
}
|
|
3847
|
-
if (typeof x === r)
|
|
3848
|
-
try {
|
|
3849
|
-
var m = window.document.cookie, _ = encodeURIComponent(g), I = m.indexOf(_ + "=");
|
|
3850
|
-
I !== -1 && (x = /^([^;]+)/.exec(
|
|
3851
|
-
m.slice(I + _.length + 1)
|
|
3852
|
-
)[1]);
|
|
3853
|
-
} catch {
|
|
3854
|
-
}
|
|
3855
|
-
return n.levels[x] === void 0 && (x = void 0), x;
|
|
3856
|
-
}
|
|
3857
|
-
}
|
|
3858
|
-
function f() {
|
|
3859
|
-
if (!(typeof window === r || !g)) {
|
|
3860
|
-
try {
|
|
3861
|
-
window.localStorage.removeItem(g);
|
|
3862
|
-
} catch {
|
|
3863
|
-
}
|
|
3864
|
-
try {
|
|
3865
|
-
window.document.cookie = encodeURIComponent(g) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
3866
|
-
} catch {
|
|
3867
|
-
}
|
|
3868
|
-
}
|
|
3869
|
-
}
|
|
3870
|
-
function d(x) {
|
|
3871
|
-
var m = x;
|
|
3872
|
-
if (typeof m == "string" && n.levels[m.toUpperCase()] !== void 0 && (m = n.levels[m.toUpperCase()]), typeof m == "number" && m >= 0 && m <= n.levels.SILENT)
|
|
3873
|
-
return m;
|
|
3874
|
-
throw new TypeError("log.setLevel() called with invalid level: " + x);
|
|
3875
|
-
}
|
|
3876
|
-
n.name = s, n.levels = {
|
|
3877
|
-
TRACE: 0,
|
|
3878
|
-
DEBUG: 1,
|
|
3879
|
-
INFO: 2,
|
|
3880
|
-
WARN: 3,
|
|
3881
|
-
ERROR: 4,
|
|
3882
|
-
SILENT: 5
|
|
3883
|
-
}, n.methodFactory = c || N, n.getLevel = function() {
|
|
3884
|
-
return p ?? i ?? a;
|
|
3885
|
-
}, n.setLevel = function(x, m) {
|
|
3886
|
-
return p = d(x), m !== !1 && y(p), F.call(n);
|
|
3887
|
-
}, n.setDefaultLevel = function(x) {
|
|
3888
|
-
i = d(x), h() || n.setLevel(x, !1);
|
|
3889
|
-
}, n.resetLevel = function() {
|
|
3890
|
-
p = null, f(), F.call(n);
|
|
3891
|
-
}, n.enableAll = function(x) {
|
|
3892
|
-
n.setLevel(n.levels.TRACE, x);
|
|
3893
|
-
}, n.disableAll = function(x) {
|
|
3894
|
-
n.setLevel(n.levels.SILENT, x);
|
|
3895
|
-
}, n.rebuild = function() {
|
|
3896
|
-
if (A !== n && (a = d(A.getLevel())), F.call(n), A === n)
|
|
3897
|
-
for (var x in $)
|
|
3898
|
-
$[x].rebuild();
|
|
3899
|
-
}, a = d(
|
|
3900
|
-
A ? A.getLevel() : "WARN"
|
|
3901
|
-
);
|
|
3902
|
-
var b = h();
|
|
3903
|
-
b != null && (p = d(b)), F.call(n);
|
|
3904
|
-
}
|
|
3905
|
-
A = new U(), A.getLogger = function(c) {
|
|
3906
|
-
if (typeof c != "symbol" && typeof c != "string" || c === "")
|
|
3907
|
-
throw new TypeError("You must supply a name when creating a logger.");
|
|
3908
|
-
var n = $[c];
|
|
3909
|
-
return n || (n = $[c] = new U(
|
|
3910
|
-
c,
|
|
3911
|
-
A.methodFactory
|
|
3912
|
-
)), n;
|
|
3913
|
-
};
|
|
3914
|
-
var o = typeof window !== r ? window.log : void 0;
|
|
3915
|
-
return A.noConflict = function() {
|
|
3916
|
-
return typeof window !== r && window.log === A && (window.log = o), A;
|
|
3917
|
-
}, A.getLoggers = function() {
|
|
3918
|
-
return $;
|
|
3919
|
-
}, A.default = A, A;
|
|
3920
|
-
});
|
|
3921
|
-
})(Ke);
|
|
3922
|
-
var Mt = Ke.exports;
|
|
3923
|
-
const jt = /* @__PURE__ */ _e(Mt), We = {
|
|
3924
|
-
trace: "trace",
|
|
3925
|
-
debug: "debug",
|
|
3926
|
-
info: "info",
|
|
3927
|
-
warn: "warn",
|
|
3928
|
-
error: "error",
|
|
3929
|
-
silent: "silent"
|
|
3930
|
-
}, Ut = {
|
|
3931
|
-
0: "trace",
|
|
3932
|
-
1: "debug",
|
|
3933
|
-
2: "info",
|
|
3934
|
-
3: "warn",
|
|
3935
|
-
4: "error",
|
|
3936
|
-
5: "silent"
|
|
3783
|
+
const ae = {
|
|
3784
|
+
trace: 0,
|
|
3785
|
+
debug: 1,
|
|
3786
|
+
info: 2,
|
|
3787
|
+
warn: 3,
|
|
3788
|
+
error: 4,
|
|
3789
|
+
silent: 5
|
|
3937
3790
|
};
|
|
3938
|
-
function
|
|
3791
|
+
function ie() {
|
|
3939
3792
|
var e, t;
|
|
3940
3793
|
if (typeof process < "u")
|
|
3941
3794
|
return process.env.NODE_ENV === "production" || process.env.MODE === "production";
|
|
3942
3795
|
try {
|
|
3943
3796
|
const r = globalThis;
|
|
3944
3797
|
if ((t = (e = r.import) == null ? void 0 : e.meta) != null && t.env) {
|
|
3945
|
-
const
|
|
3946
|
-
return
|
|
3798
|
+
const o = r.import.meta.env;
|
|
3799
|
+
return o.MODE === "production" || o.PROD === !0;
|
|
3947
3800
|
}
|
|
3948
3801
|
} catch {
|
|
3949
3802
|
}
|
|
3950
3803
|
return !1;
|
|
3951
3804
|
}
|
|
3952
|
-
const
|
|
3805
|
+
const xe = {
|
|
3953
3806
|
name: "WSX",
|
|
3954
|
-
level:
|
|
3955
|
-
pretty: !
|
|
3807
|
+
level: ie() ? "info" : "debug",
|
|
3808
|
+
pretty: !ie()
|
|
3956
3809
|
};
|
|
3957
|
-
function zt(e = {}) {
|
|
3958
|
-
const { name: t, level: r } = { ...Q, ...e }, l = t || Q.name, T = jt.getLogger(l), $ = r || Q.level;
|
|
3959
|
-
return T.setLevel(We[$]), T;
|
|
3960
|
-
}
|
|
3961
3810
|
function V(e, t) {
|
|
3962
3811
|
return e ? `[${e}] ${t}` : t;
|
|
3963
3812
|
}
|
|
3964
|
-
class
|
|
3965
|
-
constructor(t
|
|
3966
|
-
this.
|
|
3813
|
+
class Pt {
|
|
3814
|
+
constructor(t, r) {
|
|
3815
|
+
this.name = t, this.level = r, this.levelValue = ae[r], this.isProd = ie();
|
|
3816
|
+
}
|
|
3817
|
+
/**
|
|
3818
|
+
* Check if a log level should be logged
|
|
3819
|
+
*/
|
|
3820
|
+
shouldLog(t) {
|
|
3821
|
+
return this.level === "silent" ? !1 : ae[t] >= this.levelValue;
|
|
3822
|
+
}
|
|
3823
|
+
trace(t, ...r) {
|
|
3824
|
+
if (!this.isProd || this.shouldLog("trace")) {
|
|
3825
|
+
const o = V(this.name, t);
|
|
3826
|
+
r.length > 0 ? console.debug(o, ...r) : console.debug(o);
|
|
3827
|
+
}
|
|
3967
3828
|
}
|
|
3968
3829
|
debug(t, ...r) {
|
|
3969
3830
|
if (!this.isProd || this.shouldLog("debug")) {
|
|
3970
|
-
const
|
|
3971
|
-
r.length > 0 ?
|
|
3831
|
+
const o = V(this.name, t);
|
|
3832
|
+
r.length > 0 ? console.debug(o, ...r) : console.debug(o);
|
|
3972
3833
|
}
|
|
3973
3834
|
}
|
|
3974
3835
|
info(t, ...r) {
|
|
3975
3836
|
if (this.shouldLog("info")) {
|
|
3976
|
-
const
|
|
3977
|
-
r.length > 0 ?
|
|
3837
|
+
const o = V(this.name, t);
|
|
3838
|
+
r.length > 0 ? console.info(o, ...r) : console.info(o);
|
|
3978
3839
|
}
|
|
3979
3840
|
}
|
|
3980
3841
|
warn(t, ...r) {
|
|
3981
|
-
|
|
3982
|
-
|
|
3842
|
+
if (this.shouldLog("warn")) {
|
|
3843
|
+
const o = V(this.name, t);
|
|
3844
|
+
r.length > 0 ? console.warn(o, ...r) : console.warn(o);
|
|
3845
|
+
}
|
|
3983
3846
|
}
|
|
3984
3847
|
error(t, ...r) {
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
fatal(t, ...r) {
|
|
3989
|
-
const l = V(this.name, t);
|
|
3990
|
-
r.length > 0 ? this.logInstance.error(`[FATAL] ${l}`, ...r) : this.logInstance.error(`[FATAL] ${l}`);
|
|
3991
|
-
}
|
|
3992
|
-
trace(t, ...r) {
|
|
3993
|
-
if (!this.isProd || this.shouldLog("trace")) {
|
|
3994
|
-
const l = V(this.name, t);
|
|
3995
|
-
r.length > 0 ? this.logInstance.trace(l, ...r) : this.logInstance.trace(l);
|
|
3848
|
+
if (this.shouldLog("error")) {
|
|
3849
|
+
const o = V(this.name, t);
|
|
3850
|
+
r.length > 0 ? console.error(o, ...r) : console.error(o);
|
|
3996
3851
|
}
|
|
3997
3852
|
}
|
|
3998
3853
|
/**
|
|
3999
|
-
*
|
|
3854
|
+
* Set the log level dynamically
|
|
4000
3855
|
*/
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
return r.indexOf(t) >= l;
|
|
3856
|
+
setLevel(t) {
|
|
3857
|
+
this.level = t, this.levelValue = ae[t];
|
|
4004
3858
|
}
|
|
4005
3859
|
/**
|
|
4006
|
-
* Get the
|
|
3860
|
+
* Get the current log level
|
|
4007
3861
|
*/
|
|
4008
|
-
|
|
4009
|
-
return this.
|
|
3862
|
+
getLevel() {
|
|
3863
|
+
return this.level;
|
|
3864
|
+
}
|
|
3865
|
+
}
|
|
3866
|
+
class Ke {
|
|
3867
|
+
constructor(t = {}) {
|
|
3868
|
+
this.name = t.name || xe.name, this.currentLevel = t.level || xe.level, this.nativeLogger = new Pt(this.name, this.currentLevel);
|
|
3869
|
+
}
|
|
3870
|
+
debug(t, ...r) {
|
|
3871
|
+
this.nativeLogger.debug(t, ...r);
|
|
3872
|
+
}
|
|
3873
|
+
info(t, ...r) {
|
|
3874
|
+
this.nativeLogger.info(t, ...r);
|
|
3875
|
+
}
|
|
3876
|
+
warn(t, ...r) {
|
|
3877
|
+
this.nativeLogger.warn(t, ...r);
|
|
3878
|
+
}
|
|
3879
|
+
error(t, ...r) {
|
|
3880
|
+
this.nativeLogger.error(t, ...r);
|
|
3881
|
+
}
|
|
3882
|
+
fatal(t, ...r) {
|
|
3883
|
+
const o = V(this.name, `[FATAL] ${t}`);
|
|
3884
|
+
r.length > 0 ? console.error(o, ...r) : console.error(o);
|
|
3885
|
+
}
|
|
3886
|
+
trace(t, ...r) {
|
|
3887
|
+
this.nativeLogger.trace(t, ...r);
|
|
4010
3888
|
}
|
|
4011
3889
|
/**
|
|
4012
3890
|
* Set the log level dynamically
|
|
4013
3891
|
*/
|
|
4014
3892
|
setLevel(t) {
|
|
4015
|
-
this.currentLevel = t, this.
|
|
3893
|
+
this.currentLevel = t, this.nativeLogger.setLevel(t);
|
|
4016
3894
|
}
|
|
4017
3895
|
/**
|
|
4018
3896
|
* Get the current log level
|
|
4019
3897
|
*/
|
|
4020
3898
|
getLevel() {
|
|
4021
|
-
|
|
4022
|
-
return Ut[t] || this.currentLevel;
|
|
3899
|
+
return this.nativeLogger.getLevel();
|
|
4023
3900
|
}
|
|
4024
3901
|
}
|
|
4025
|
-
new
|
|
4026
|
-
function
|
|
4027
|
-
return new
|
|
3902
|
+
new Ke();
|
|
3903
|
+
function jt(e, t = {}) {
|
|
3904
|
+
return new Ke({
|
|
4028
3905
|
...t,
|
|
4029
3906
|
name: t.name || `WSX:${e}`
|
|
4030
3907
|
});
|
|
@@ -4033,33 +3910,33 @@ function we(e) {
|
|
|
4033
3910
|
const t = document.createElement("div");
|
|
4034
3911
|
return t.textContent = e, t.innerHTML;
|
|
4035
3912
|
}
|
|
4036
|
-
function
|
|
3913
|
+
function Kt(e) {
|
|
4037
3914
|
if (!e || !Array.isArray(e))
|
|
4038
3915
|
return [];
|
|
4039
3916
|
const t = [];
|
|
4040
3917
|
return e.forEach((r) => {
|
|
4041
3918
|
if (r.type === "paragraph") {
|
|
4042
|
-
const
|
|
4043
|
-
|
|
3919
|
+
const o = r;
|
|
3920
|
+
o.tokens && Array.isArray(o.tokens) && t.push(...o.tokens);
|
|
4044
3921
|
} else (r.type === "text" || r.type === "strong" || r.type === "em" || r.type === "link" || r.type === "code" || r.type === "br") && t.push(r);
|
|
4045
3922
|
}), t;
|
|
4046
3923
|
}
|
|
4047
|
-
function
|
|
3924
|
+
function J(e) {
|
|
4048
3925
|
return !e || !Array.isArray(e) ? "" : e.map((t) => {
|
|
4049
3926
|
switch (t.type) {
|
|
4050
3927
|
case "text":
|
|
4051
3928
|
return t.text || "";
|
|
4052
3929
|
case "strong": {
|
|
4053
|
-
const r = t,
|
|
4054
|
-
return `<strong>${
|
|
3930
|
+
const r = t, o = r.tokens && Array.isArray(r.tokens) ? r.tokens : [];
|
|
3931
|
+
return `<strong>${J(o)}</strong>`;
|
|
4055
3932
|
}
|
|
4056
3933
|
case "em": {
|
|
4057
|
-
const r = t,
|
|
4058
|
-
return `<em>${
|
|
3934
|
+
const r = t, o = r.tokens && Array.isArray(r.tokens) ? r.tokens : [];
|
|
3935
|
+
return `<em>${J(o)}</em>`;
|
|
4059
3936
|
}
|
|
4060
3937
|
case "link": {
|
|
4061
|
-
const r = t,
|
|
4062
|
-
return `<a href="${r.href || "#"}"${
|
|
3938
|
+
const r = t, o = r.title ? ` title="${we(r.title)}"` : "", _ = r.tokens && Array.isArray(r.tokens) ? r.tokens : [];
|
|
3939
|
+
return `<a href="${r.href || "#"}"${o}>${J(_)}</a>`;
|
|
4063
3940
|
}
|
|
4064
3941
|
case "code":
|
|
4065
3942
|
return `<code>${we(t.text || "")}</code>`;
|
|
@@ -4070,118 +3947,121 @@ function ee(e) {
|
|
|
4070
3947
|
}
|
|
4071
3948
|
}).join("");
|
|
4072
3949
|
}
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
3950
|
+
function Mt(e) {
|
|
3951
|
+
return e.toLowerCase().replace(/\s+/g, "-").replace(/[^\p{L}\p{N}-]/gu, "").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
|
|
3952
|
+
}
|
|
3953
|
+
const zt = "wsx-markdown{display:block}.marked-content{line-height:1.7;color:var(--text-primary, #2c3e50)}.marked-content .marked-paragraph{margin:1rem 0;line-height:1.7}.marked-content .marked-list{margin:1rem 0;padding-left:2rem}.marked-content .marked-list-item{margin:.5rem 0;line-height:1.6}.marked-content a{color:var(--primary-red, #dc2626);text-decoration:none;border-bottom:1px solid transparent;transition:border-color .2s ease}.marked-content a:hover{border-bottom-color:var(--primary-red, #dc2626)}.marked-content strong{font-weight:600;color:var(--text-primary, #2c3e50)}.marked-content em{font-style:italic}.marked-content hr{border:none;border-top:2px solid var(--border-color, #e0e0e0);margin:2rem 0}.marked-content img{max-width:100%;height:auto;border-radius:8px;margin:1rem 0}.error{color:#dc2626;padding:1rem;background:#fee2e2;border-radius:6px;border:1px solid #fecaca}";
|
|
3954
|
+
var We;
|
|
3955
|
+
let Ve, Qe;
|
|
4076
3956
|
function ne(e, t, r) {
|
|
4077
|
-
return (t =
|
|
3957
|
+
return (t = Je(t)) in e ? Object.defineProperty(e, t, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = r, e;
|
|
4078
3958
|
}
|
|
4079
|
-
function
|
|
4080
|
-
function
|
|
4081
|
-
return function(
|
|
4082
|
-
return
|
|
3959
|
+
function Ut(e, t, r, o, _, P) {
|
|
3960
|
+
function S(n, u, d) {
|
|
3961
|
+
return function(l, a) {
|
|
3962
|
+
return d && d(l), n[u].call(l, a);
|
|
4083
3963
|
};
|
|
4084
3964
|
}
|
|
4085
|
-
function
|
|
4086
|
-
for (var
|
|
4087
|
-
return
|
|
3965
|
+
function E(n, u) {
|
|
3966
|
+
for (var d = 0; d < n.length; d++) n[d].call(u);
|
|
3967
|
+
return u;
|
|
4088
3968
|
}
|
|
4089
|
-
function
|
|
4090
|
-
if (typeof
|
|
4091
|
-
return
|
|
3969
|
+
function w(n, u, d, l) {
|
|
3970
|
+
if (typeof n != "function" && (l || n !== void 0)) throw new TypeError(u + " must " + (d || "be") + " a function" + (l ? "" : " or undefined"));
|
|
3971
|
+
return n;
|
|
4092
3972
|
}
|
|
4093
|
-
function D(
|
|
4094
|
-
function
|
|
4095
|
-
if (!b(
|
|
3973
|
+
function D(n, u, d, l, a, i, p, g, k, h, m, c, b) {
|
|
3974
|
+
function A(f) {
|
|
3975
|
+
if (!b(f)) throw new TypeError("Attempted to access private element on non-instance");
|
|
4096
3976
|
}
|
|
4097
|
-
var
|
|
4098
|
-
if (
|
|
4099
|
-
|
|
4100
|
-
var
|
|
4101
|
-
h ? (
|
|
4102
|
-
return
|
|
4103
|
-
},
|
|
4104
|
-
|
|
4105
|
-
} } :
|
|
3977
|
+
var x, I = u[0], F = u[3], $ = !g;
|
|
3978
|
+
if (!$) {
|
|
3979
|
+
d || Array.isArray(I) || (I = [I]);
|
|
3980
|
+
var s = {}, R = [], v = a === 3 ? "get" : a === 4 || c ? "set" : "value";
|
|
3981
|
+
h ? (m || c ? s = { get: Ee(function() {
|
|
3982
|
+
return F(this);
|
|
3983
|
+
}, l, "get"), set: function(f) {
|
|
3984
|
+
u[4](this, f);
|
|
3985
|
+
} } : s[v] = F, m || Ee(s[v], l, a === 2 ? "" : v)) : m || (s = Object.getOwnPropertyDescriptor(n, l));
|
|
4106
3986
|
}
|
|
4107
|
-
for (var
|
|
4108
|
-
var Z =
|
|
4109
|
-
if (
|
|
4110
|
-
|
|
3987
|
+
for (var y = n, M = I.length - 1; M >= 0; M -= d ? 2 : 1) {
|
|
3988
|
+
var Z = I[M], B = d ? I[M - 1] : void 0, X = {}, C = { kind: ["field", "accessor", "method", "getter", "setter", "class"][a], name: l, metadata: i, addInitializer: (function(f, O) {
|
|
3989
|
+
if (f.v) throw Error("attempted to call addInitializer after decoration was finished");
|
|
3990
|
+
w(O, "An initializer", "be", !0), p.push(O);
|
|
4111
3991
|
}).bind(null, X) };
|
|
4112
3992
|
try {
|
|
4113
|
-
if (
|
|
3993
|
+
if ($) (x = w(Z.call(B, y, C), "class decorators", "return")) && (y = x);
|
|
4114
3994
|
else {
|
|
4115
|
-
var
|
|
4116
|
-
|
|
4117
|
-
return
|
|
4118
|
-
} : (a < 4 && (
|
|
4119
|
-
return
|
|
4120
|
-
}, (a < 2 || a === 4) && (z = function(
|
|
4121
|
-
|
|
3995
|
+
var j, z;
|
|
3996
|
+
C.static = k, C.private = h, h ? a === 2 ? j = function(f) {
|
|
3997
|
+
return A(f), s.value;
|
|
3998
|
+
} : (a < 4 && (j = S(s, "get", A)), a !== 3 && (z = S(s, "set", A))) : (j = function(f) {
|
|
3999
|
+
return f[l];
|
|
4000
|
+
}, (a < 2 || a === 4) && (z = function(f, O) {
|
|
4001
|
+
f[l] = O;
|
|
4122
4002
|
}));
|
|
4123
|
-
var Y =
|
|
4124
|
-
return
|
|
4003
|
+
var Y = C.access = { has: h ? b.bind() : function(f) {
|
|
4004
|
+
return l in f;
|
|
4125
4005
|
} };
|
|
4126
|
-
if (
|
|
4127
|
-
if (typeof
|
|
4128
|
-
else if (
|
|
4129
|
-
} else
|
|
4006
|
+
if (j && (Y.get = j), z && (Y.set = z), y = Z.call(B, c ? { get: s.get, set: s.set } : s[v], C), c) {
|
|
4007
|
+
if (typeof y == "object" && y) (x = w(y.get, "accessor.get")) && (s.get = x), (x = w(y.set, "accessor.set")) && (s.set = x), (x = w(y.init, "accessor.init")) && R.push(x);
|
|
4008
|
+
else if (y !== void 0) throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");
|
|
4009
|
+
} else w(y, (m ? "field" : "method") + " decorators", "return") && (m ? R.push(y) : s[v] = y);
|
|
4130
4010
|
}
|
|
4131
4011
|
} finally {
|
|
4132
4012
|
X.v = !0;
|
|
4133
4013
|
}
|
|
4134
4014
|
}
|
|
4135
|
-
return (
|
|
4136
|
-
for (var H =
|
|
4015
|
+
return (m || c) && g.push(function(f, O) {
|
|
4016
|
+
for (var H = R.length - 1; H >= 0; H--) O = R[H].call(f, O);
|
|
4137
4017
|
return O;
|
|
4138
|
-
}),
|
|
4018
|
+
}), m || $ || (h ? c ? g.push(S(s, "get"), S(s, "set")) : g.push(a === 2 ? s[v] : S.call.bind(s[v])) : Object.defineProperty(n, l, s)), y;
|
|
4139
4019
|
}
|
|
4140
|
-
function
|
|
4141
|
-
return Object.defineProperty(
|
|
4020
|
+
function L(n, u) {
|
|
4021
|
+
return Object.defineProperty(n, Symbol.metadata || Symbol.for("Symbol.metadata"), { configurable: !0, enumerable: !0, value: u });
|
|
4142
4022
|
}
|
|
4143
|
-
if (arguments.length >= 6) var
|
|
4144
|
-
var N = Object.create(
|
|
4145
|
-
var a, i, p = [], g = function(
|
|
4146
|
-
return
|
|
4147
|
-
},
|
|
4148
|
-
function h(
|
|
4149
|
-
|
|
4023
|
+
if (arguments.length >= 6) var T = P[Symbol.metadata || Symbol.for("Symbol.metadata")];
|
|
4024
|
+
var N = Object.create(T ?? null), U = function(n, u, d, l) {
|
|
4025
|
+
var a, i, p = [], g = function(v) {
|
|
4026
|
+
return Ht(v) === n;
|
|
4027
|
+
}, k = /* @__PURE__ */ new Map();
|
|
4028
|
+
function h(v) {
|
|
4029
|
+
v && p.push(E.bind(null, v));
|
|
4150
4030
|
}
|
|
4151
|
-
for (var
|
|
4152
|
-
var
|
|
4153
|
-
if (Array.isArray(
|
|
4154
|
-
var b =
|
|
4155
|
-
if (
|
|
4156
|
-
var
|
|
4157
|
-
if (
|
|
4158
|
-
|
|
4031
|
+
for (var m = 0; m < u.length; m++) {
|
|
4032
|
+
var c = u[m];
|
|
4033
|
+
if (Array.isArray(c)) {
|
|
4034
|
+
var b = c[1], A = c[2], x = c.length > 3, I = 16 & b, F = !!(8 & b), $ = (b &= 7) == 0, s = A + "/" + F;
|
|
4035
|
+
if (!$ && !x) {
|
|
4036
|
+
var R = k.get(s);
|
|
4037
|
+
if (R === !0 || R === 3 && b !== 4 || R === 4 && b !== 3) throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: " + A);
|
|
4038
|
+
k.set(s, !(b > 2) || b);
|
|
4159
4039
|
}
|
|
4160
|
-
D(
|
|
4040
|
+
D(F ? n : n.prototype, c, I, x ? "#" + A : Je(A), b, l, F ? i = i || [] : a = a || [], p, F, x, $, b === 1, F && x ? g : d);
|
|
4161
4041
|
}
|
|
4162
4042
|
}
|
|
4163
4043
|
return h(a), h(i), p;
|
|
4164
|
-
}(e, t,
|
|
4165
|
-
return r.length ||
|
|
4166
|
-
var
|
|
4167
|
-
return r.length && [
|
|
4044
|
+
}(e, t, _, N);
|
|
4045
|
+
return r.length || L(e, N), { e: U, get c() {
|
|
4046
|
+
var n = [];
|
|
4047
|
+
return r.length && [L(D(e, [r], o, e.name, 5, N, n), N), E.bind(null, n, e)];
|
|
4168
4048
|
} };
|
|
4169
4049
|
}
|
|
4170
|
-
function
|
|
4171
|
-
var t =
|
|
4050
|
+
function Je(e) {
|
|
4051
|
+
var t = Bt(e, "string");
|
|
4172
4052
|
return typeof t == "symbol" ? t : t + "";
|
|
4173
4053
|
}
|
|
4174
|
-
function
|
|
4054
|
+
function Bt(e, t) {
|
|
4175
4055
|
if (typeof e != "object" || !e) return e;
|
|
4176
4056
|
var r = e[Symbol.toPrimitive];
|
|
4177
4057
|
if (r !== void 0) {
|
|
4178
|
-
var
|
|
4179
|
-
if (typeof
|
|
4058
|
+
var o = r.call(e, t);
|
|
4059
|
+
if (typeof o != "object") return o;
|
|
4180
4060
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
4181
4061
|
}
|
|
4182
4062
|
return String(e);
|
|
4183
4063
|
}
|
|
4184
|
-
function
|
|
4064
|
+
function Ee(e, t, r) {
|
|
4185
4065
|
typeof t == "symbol" && (t = (t = t.description) ? "[" + t + "]" : "");
|
|
4186
4066
|
try {
|
|
4187
4067
|
Object.defineProperty(e, "name", { configurable: !0, value: r ? r + " " + t : t });
|
|
@@ -4189,18 +4069,18 @@ function xe(e, t, r) {
|
|
|
4189
4069
|
}
|
|
4190
4070
|
return e;
|
|
4191
4071
|
}
|
|
4192
|
-
function
|
|
4072
|
+
function Ht(e) {
|
|
4193
4073
|
if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (e !== null ? typeof e : "null"));
|
|
4194
4074
|
return e;
|
|
4195
4075
|
}
|
|
4196
|
-
const oe =
|
|
4197
|
-
|
|
4076
|
+
const oe = jt("Markdown");
|
|
4077
|
+
Qe = [W({
|
|
4198
4078
|
tagName: "wsx-markdown"
|
|
4199
4079
|
})];
|
|
4200
|
-
let
|
|
4201
|
-
class
|
|
4080
|
+
let Gt;
|
|
4081
|
+
class Zt extends q {
|
|
4202
4082
|
constructor() {
|
|
4203
|
-
super(), ne(this, "_autoStyles",
|
|
4083
|
+
super(), ne(this, "_autoStyles", zt), ne(this, "markdown", void 0), ne(this, "customRenderers", {});
|
|
4204
4084
|
const [t, r] = this.useState("markdown", "");
|
|
4205
4085
|
Object.defineProperty(this, "markdown", {
|
|
4206
4086
|
get: t,
|
|
@@ -4247,7 +4127,7 @@ class qt extends q {
|
|
|
4247
4127
|
if (!this.markdown)
|
|
4248
4128
|
return /* @__PURE__ */ G("div", { class: "marked-content" });
|
|
4249
4129
|
try {
|
|
4250
|
-
const t = this.stripFrontmatter(this.markdown), r =
|
|
4130
|
+
const t = this.stripFrontmatter(this.markdown), r = le.lexer(t);
|
|
4251
4131
|
return /* @__PURE__ */ G("div", { class: "marked-content" }, this.renderTokens(r));
|
|
4252
4132
|
} catch (t) {
|
|
4253
4133
|
return oe.error("Failed to render markdown", t), /* @__PURE__ */ G("div", { class: "marked-content" }, /* @__PURE__ */ G("wsx-marked-error", { message: `Error: ${t}` }));
|
|
@@ -4266,9 +4146,9 @@ class qt extends q {
|
|
|
4266
4146
|
renderToken(t) {
|
|
4267
4147
|
const r = this.customRenderers[t.type];
|
|
4268
4148
|
if (r) {
|
|
4269
|
-
const
|
|
4270
|
-
if (
|
|
4271
|
-
return
|
|
4149
|
+
const o = r(t, () => this.defaultRenderToken(t));
|
|
4150
|
+
if (o !== null)
|
|
4151
|
+
return o;
|
|
4272
4152
|
}
|
|
4273
4153
|
return this.defaultRenderToken(t);
|
|
4274
4154
|
}
|
|
@@ -4279,8 +4159,8 @@ class qt extends q {
|
|
|
4279
4159
|
defaultRenderToken(t) {
|
|
4280
4160
|
switch (t.type) {
|
|
4281
4161
|
case "heading": {
|
|
4282
|
-
const r = t;
|
|
4283
|
-
return /* @__PURE__ */ G("wsx-marked-heading", { level: r.depth.toString(), text:
|
|
4162
|
+
const r = t, o = J(r.tokens), _ = Mt(o);
|
|
4163
|
+
return /* @__PURE__ */ G("wsx-marked-heading", { level: r.depth.toString(), text: o, "anchor-id": _ });
|
|
4284
4164
|
}
|
|
4285
4165
|
case "code": {
|
|
4286
4166
|
const r = t;
|
|
@@ -4291,27 +4171,27 @@ class qt extends q {
|
|
|
4291
4171
|
return /* @__PURE__ */ G("wsx-marked-blockquote", null, this.renderTokens(r.tokens));
|
|
4292
4172
|
}
|
|
4293
4173
|
case "paragraph":
|
|
4294
|
-
return /* @__PURE__ */ G("wsx-marked-paragraph", { content:
|
|
4174
|
+
return /* @__PURE__ */ G("wsx-marked-paragraph", { content: J(t.tokens) });
|
|
4295
4175
|
case "list": {
|
|
4296
|
-
const r = t,
|
|
4297
|
-
if (!
|
|
4176
|
+
const r = t, o = r.items.map((_) => {
|
|
4177
|
+
if (!_.tokens || !Array.isArray(_.tokens))
|
|
4298
4178
|
return oe.warn("List item has no tokens or tokens is not an array", {
|
|
4299
|
-
item:
|
|
4179
|
+
item: _
|
|
4300
4180
|
}), "";
|
|
4301
|
-
const
|
|
4302
|
-
if (
|
|
4181
|
+
const P = this.renderTokens(_.tokens);
|
|
4182
|
+
if (P.length === 0)
|
|
4303
4183
|
return "";
|
|
4304
|
-
const
|
|
4305
|
-
|
|
4306
|
-
|
|
4184
|
+
const S = document.createElement("div");
|
|
4185
|
+
P.forEach((w) => {
|
|
4186
|
+
w && S.appendChild(w);
|
|
4307
4187
|
});
|
|
4308
|
-
const
|
|
4309
|
-
return
|
|
4310
|
-
renderedElementsCount:
|
|
4311
|
-
itemTokens:
|
|
4312
|
-
}),
|
|
4188
|
+
const E = S.innerHTML;
|
|
4189
|
+
return E || oe.warn("tempContainer.innerHTML is empty after appending elements", {
|
|
4190
|
+
renderedElementsCount: P.length,
|
|
4191
|
+
itemTokens: _.tokens
|
|
4192
|
+
}), E;
|
|
4313
4193
|
});
|
|
4314
|
-
return /* @__PURE__ */ G("wsx-marked-list", { ordered: r.ordered ? "true" : "false", items:
|
|
4194
|
+
return /* @__PURE__ */ G("wsx-marked-list", { ordered: r.ordered ? "true" : "false", items: o });
|
|
4315
4195
|
}
|
|
4316
4196
|
case "html":
|
|
4317
4197
|
return /* @__PURE__ */ G("div", null, t.text);
|
|
@@ -4322,25 +4202,26 @@ class qt extends q {
|
|
|
4322
4202
|
case "text":
|
|
4323
4203
|
return /* @__PURE__ */ G("span", null, t.text || "");
|
|
4324
4204
|
default: {
|
|
4325
|
-
const
|
|
4326
|
-
return
|
|
4205
|
+
const o = new le.Renderer()[t.type], _ = (o == null ? void 0 : o(t)) || "";
|
|
4206
|
+
return _ ? /* @__PURE__ */ G("div", null, _) : null;
|
|
4327
4207
|
}
|
|
4328
4208
|
}
|
|
4329
4209
|
}
|
|
4330
4210
|
}
|
|
4331
|
-
|
|
4332
|
-
[
|
|
4333
|
-
|
|
4211
|
+
We = Zt;
|
|
4212
|
+
[Gt, Ve] = Ut(We, [], Qe, 0, void 0, q).c;
|
|
4213
|
+
Ve();
|
|
4334
4214
|
export {
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4215
|
+
yt as Blockquote,
|
|
4216
|
+
pt as Code,
|
|
4217
|
+
Dt as Error,
|
|
4218
|
+
nt as Heading,
|
|
4219
|
+
Rt as List,
|
|
4220
|
+
Gt as Markdown,
|
|
4221
|
+
St as Paragraph,
|
|
4342
4222
|
we as escapeHtml,
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4223
|
+
Kt as extractInlineTokens,
|
|
4224
|
+
Mt as generateId,
|
|
4225
|
+
lt as registerWsxLanguage,
|
|
4226
|
+
J as renderInlineTokens
|
|
4346
4227
|
};
|