@stackone/malachite 2.15.0 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMPONENTS.md +19 -17
- package/dist/{CodeBlockHighlighter-DES3PGjN.js → CodeBlockHighlighter-CvA6nVfU.js} +676 -669
- package/dist/{CodeBlockHighlighter-DES3PGjN.js.map → CodeBlockHighlighter-CvA6nVfU.js.map} +1 -1
- package/dist/{index-nNYi9ulL.js → index-YNe-JV3F.js} +6346 -4992
- package/dist/index-YNe-JV3F.js.map +1 -0
- package/dist/index.d.ts +473 -3
- package/dist/index.js +91 -89
- package/package.json +1 -1
- package/dist/index-nNYi9ulL.js.map +0 -1
|
@@ -1,193 +1,193 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { _ as
|
|
1
|
+
import { jsx as Pn } from "react/jsx-runtime";
|
|
2
|
+
import { _ as ue, a as se, C as cn, b as fe } from "./index-YNe-JV3F.js";
|
|
3
3
|
import H from "react";
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
6
|
-
var t, l, o =
|
|
4
|
+
function de(n, e) {
|
|
5
|
+
if (n == null) return {};
|
|
6
|
+
var t, l, o = ue(n, e);
|
|
7
7
|
if (Object.getOwnPropertySymbols) {
|
|
8
|
-
var a = Object.getOwnPropertySymbols(
|
|
9
|
-
for (l = 0; l < a.length; l++) t = a[l],
|
|
8
|
+
var a = Object.getOwnPropertySymbols(n);
|
|
9
|
+
for (l = 0; l < a.length; l++) t = a[l], e.indexOf(t) === -1 && {}.propertyIsEnumerable.call(n, t) && (o[t] = n[t]);
|
|
10
10
|
}
|
|
11
11
|
return o;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
(
|
|
15
|
-
for (var t = 0, l = Array(
|
|
13
|
+
function dn(n, e) {
|
|
14
|
+
(e == null || e > n.length) && (e = n.length);
|
|
15
|
+
for (var t = 0, l = Array(e); t < e; t++) l[t] = n[t];
|
|
16
16
|
return l;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
if (Array.isArray(
|
|
18
|
+
function ge(n) {
|
|
19
|
+
if (Array.isArray(n)) return dn(n);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
if (typeof Symbol < "u" &&
|
|
21
|
+
function pe(n) {
|
|
22
|
+
if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
if (
|
|
26
|
-
if (typeof
|
|
27
|
-
var t = {}.toString.call(
|
|
28
|
-
return t === "Object" &&
|
|
24
|
+
function he(n, e) {
|
|
25
|
+
if (n) {
|
|
26
|
+
if (typeof n == "string") return dn(n, e);
|
|
27
|
+
var t = {}.toString.call(n).slice(8, -1);
|
|
28
|
+
return t === "Object" && n.constructor && (t = n.constructor.name), t === "Map" || t === "Set" ? Array.from(n) : t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? dn(n, e) : void 0;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function me() {
|
|
32
32
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
33
33
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
return
|
|
35
|
+
function gn(n) {
|
|
36
|
+
return ge(n) || pe(n) || he(n) || me();
|
|
37
37
|
}
|
|
38
|
-
function Z(
|
|
38
|
+
function Z(n) {
|
|
39
39
|
"@babel/helpers - typeof";
|
|
40
|
-
return Z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(
|
|
41
|
-
return typeof
|
|
42
|
-
} : function(
|
|
43
|
-
return
|
|
44
|
-
}, Z(
|
|
45
|
-
}
|
|
46
|
-
function
|
|
47
|
-
if (Z(
|
|
48
|
-
var t =
|
|
40
|
+
return Z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
41
|
+
return typeof e;
|
|
42
|
+
} : function(e) {
|
|
43
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
44
|
+
}, Z(n);
|
|
45
|
+
}
|
|
46
|
+
function ye(n, e) {
|
|
47
|
+
if (Z(n) != "object" || !n) return n;
|
|
48
|
+
var t = n[Symbol.toPrimitive];
|
|
49
49
|
if (t !== void 0) {
|
|
50
|
-
var l = t.call(
|
|
50
|
+
var l = t.call(n, e);
|
|
51
51
|
if (Z(l) != "object") return l;
|
|
52
52
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
53
53
|
}
|
|
54
|
-
return (
|
|
54
|
+
return (e === "string" ? String : Number)(n);
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
var
|
|
58
|
-
return Z(
|
|
56
|
+
function ve(n) {
|
|
57
|
+
var e = ye(n, "string");
|
|
58
|
+
return Z(e) == "symbol" ? e : e + "";
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
return (
|
|
60
|
+
function $n(n, e, t) {
|
|
61
|
+
return (e = ve(e)) in n ? Object.defineProperty(n, e, {
|
|
62
62
|
value: t,
|
|
63
63
|
enumerable: !0,
|
|
64
64
|
configurable: !0,
|
|
65
65
|
writable: !0
|
|
66
|
-
}) : e
|
|
66
|
+
}) : n[e] = t, n;
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
var t = Object.keys(
|
|
68
|
+
function Ln(n, e) {
|
|
69
|
+
var t = Object.keys(n);
|
|
70
70
|
if (Object.getOwnPropertySymbols) {
|
|
71
|
-
var l = Object.getOwnPropertySymbols(
|
|
72
|
-
|
|
73
|
-
return Object.getOwnPropertyDescriptor(
|
|
71
|
+
var l = Object.getOwnPropertySymbols(n);
|
|
72
|
+
e && (l = l.filter(function(o) {
|
|
73
|
+
return Object.getOwnPropertyDescriptor(n, o).enumerable;
|
|
74
74
|
})), t.push.apply(t, l);
|
|
75
75
|
}
|
|
76
76
|
return t;
|
|
77
77
|
}
|
|
78
|
-
function K(
|
|
79
|
-
for (var
|
|
80
|
-
var t = arguments[
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
84
|
-
Object.defineProperty(
|
|
78
|
+
function K(n) {
|
|
79
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
80
|
+
var t = arguments[e] != null ? arguments[e] : {};
|
|
81
|
+
e % 2 ? Ln(Object(t), !0).forEach(function(l) {
|
|
82
|
+
$n(n, l, t[l]);
|
|
83
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Ln(Object(t)).forEach(function(l) {
|
|
84
|
+
Object.defineProperty(n, l, Object.getOwnPropertyDescriptor(t, l));
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
return
|
|
87
|
+
return n;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
var
|
|
91
|
-
if (
|
|
92
|
-
if (
|
|
93
|
-
return [
|
|
94
|
-
if (
|
|
95
|
-
return [
|
|
96
|
-
if (
|
|
97
|
-
return [
|
|
98
|
-
}
|
|
99
|
-
var
|
|
100
|
-
function
|
|
101
|
-
if (
|
|
102
|
-
var
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
function
|
|
106
|
-
var
|
|
89
|
+
function be(n) {
|
|
90
|
+
var e = n.length;
|
|
91
|
+
if (e === 0 || e === 1) return n;
|
|
92
|
+
if (e === 2)
|
|
93
|
+
return [n[0], n[1], "".concat(n[0], ".").concat(n[1]), "".concat(n[1], ".").concat(n[0])];
|
|
94
|
+
if (e === 3)
|
|
95
|
+
return [n[0], n[1], n[2], "".concat(n[0], ".").concat(n[1]), "".concat(n[0], ".").concat(n[2]), "".concat(n[1], ".").concat(n[0]), "".concat(n[1], ".").concat(n[2]), "".concat(n[2], ".").concat(n[0]), "".concat(n[2], ".").concat(n[1]), "".concat(n[0], ".").concat(n[1], ".").concat(n[2]), "".concat(n[0], ".").concat(n[2], ".").concat(n[1]), "".concat(n[1], ".").concat(n[0], ".").concat(n[2]), "".concat(n[1], ".").concat(n[2], ".").concat(n[0]), "".concat(n[2], ".").concat(n[0], ".").concat(n[1]), "".concat(n[2], ".").concat(n[1], ".").concat(n[0])];
|
|
96
|
+
if (e >= 4)
|
|
97
|
+
return [n[0], n[1], n[2], n[3], "".concat(n[0], ".").concat(n[1]), "".concat(n[0], ".").concat(n[2]), "".concat(n[0], ".").concat(n[3]), "".concat(n[1], ".").concat(n[0]), "".concat(n[1], ".").concat(n[2]), "".concat(n[1], ".").concat(n[3]), "".concat(n[2], ".").concat(n[0]), "".concat(n[2], ".").concat(n[1]), "".concat(n[2], ".").concat(n[3]), "".concat(n[3], ".").concat(n[0]), "".concat(n[3], ".").concat(n[1]), "".concat(n[3], ".").concat(n[2]), "".concat(n[0], ".").concat(n[1], ".").concat(n[2]), "".concat(n[0], ".").concat(n[1], ".").concat(n[3]), "".concat(n[0], ".").concat(n[2], ".").concat(n[1]), "".concat(n[0], ".").concat(n[2], ".").concat(n[3]), "".concat(n[0], ".").concat(n[3], ".").concat(n[1]), "".concat(n[0], ".").concat(n[3], ".").concat(n[2]), "".concat(n[1], ".").concat(n[0], ".").concat(n[2]), "".concat(n[1], ".").concat(n[0], ".").concat(n[3]), "".concat(n[1], ".").concat(n[2], ".").concat(n[0]), "".concat(n[1], ".").concat(n[2], ".").concat(n[3]), "".concat(n[1], ".").concat(n[3], ".").concat(n[0]), "".concat(n[1], ".").concat(n[3], ".").concat(n[2]), "".concat(n[2], ".").concat(n[0], ".").concat(n[1]), "".concat(n[2], ".").concat(n[0], ".").concat(n[3]), "".concat(n[2], ".").concat(n[1], ".").concat(n[0]), "".concat(n[2], ".").concat(n[1], ".").concat(n[3]), "".concat(n[2], ".").concat(n[3], ".").concat(n[0]), "".concat(n[2], ".").concat(n[3], ".").concat(n[1]), "".concat(n[3], ".").concat(n[0], ".").concat(n[1]), "".concat(n[3], ".").concat(n[0], ".").concat(n[2]), "".concat(n[3], ".").concat(n[1], ".").concat(n[0]), "".concat(n[3], ".").concat(n[1], ".").concat(n[2]), "".concat(n[3], ".").concat(n[2], ".").concat(n[0]), "".concat(n[3], ".").concat(n[2], ".").concat(n[1]), "".concat(n[0], ".").concat(n[1], ".").concat(n[2], ".").concat(n[3]), "".concat(n[0], ".").concat(n[1], ".").concat(n[3], ".").concat(n[2]), "".concat(n[0], ".").concat(n[2], ".").concat(n[1], ".").concat(n[3]), "".concat(n[0], ".").concat(n[2], ".").concat(n[3], ".").concat(n[1]), "".concat(n[0], ".").concat(n[3], ".").concat(n[1], ".").concat(n[2]), "".concat(n[0], ".").concat(n[3], ".").concat(n[2], ".").concat(n[1]), "".concat(n[1], ".").concat(n[0], ".").concat(n[2], ".").concat(n[3]), "".concat(n[1], ".").concat(n[0], ".").concat(n[3], ".").concat(n[2]), "".concat(n[1], ".").concat(n[2], ".").concat(n[0], ".").concat(n[3]), "".concat(n[1], ".").concat(n[2], ".").concat(n[3], ".").concat(n[0]), "".concat(n[1], ".").concat(n[3], ".").concat(n[0], ".").concat(n[2]), "".concat(n[1], ".").concat(n[3], ".").concat(n[2], ".").concat(n[0]), "".concat(n[2], ".").concat(n[0], ".").concat(n[1], ".").concat(n[3]), "".concat(n[2], ".").concat(n[0], ".").concat(n[3], ".").concat(n[1]), "".concat(n[2], ".").concat(n[1], ".").concat(n[0], ".").concat(n[3]), "".concat(n[2], ".").concat(n[1], ".").concat(n[3], ".").concat(n[0]), "".concat(n[2], ".").concat(n[3], ".").concat(n[0], ".").concat(n[1]), "".concat(n[2], ".").concat(n[3], ".").concat(n[1], ".").concat(n[0]), "".concat(n[3], ".").concat(n[0], ".").concat(n[1], ".").concat(n[2]), "".concat(n[3], ".").concat(n[0], ".").concat(n[2], ".").concat(n[1]), "".concat(n[3], ".").concat(n[1], ".").concat(n[0], ".").concat(n[2]), "".concat(n[3], ".").concat(n[1], ".").concat(n[2], ".").concat(n[0]), "".concat(n[3], ".").concat(n[2], ".").concat(n[0], ".").concat(n[1]), "".concat(n[3], ".").concat(n[2], ".").concat(n[1], ".").concat(n[0])];
|
|
98
|
+
}
|
|
99
|
+
var sn = {};
|
|
100
|
+
function we(n) {
|
|
101
|
+
if (n.length === 0 || n.length === 1) return n;
|
|
102
|
+
var e = n.join(".");
|
|
103
|
+
return sn[e] || (sn[e] = be(n)), sn[e];
|
|
104
|
+
}
|
|
105
|
+
function xe(n) {
|
|
106
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, t = arguments.length > 2 ? arguments[2] : void 0, l = n.filter(function(a) {
|
|
107
107
|
return a !== "token";
|
|
108
|
-
}), o =
|
|
108
|
+
}), o = we(l);
|
|
109
109
|
return o.reduce(function(a, r) {
|
|
110
110
|
return K(K({}, a), t[r]);
|
|
111
|
-
},
|
|
111
|
+
}, e);
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
113
|
+
function Nn(n) {
|
|
114
|
+
return n.join(" ");
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function ke(n, e) {
|
|
117
117
|
var t = 0;
|
|
118
118
|
return function(l) {
|
|
119
119
|
return t += 1, l.map(function(o, a) {
|
|
120
|
-
return
|
|
120
|
+
return vn({
|
|
121
121
|
node: o,
|
|
122
|
-
stylesheet:
|
|
123
|
-
useInlineStyles:
|
|
122
|
+
stylesheet: n,
|
|
123
|
+
useInlineStyles: e,
|
|
124
124
|
key: "code-segment-".concat(t, "-").concat(a)
|
|
125
125
|
});
|
|
126
126
|
});
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
var
|
|
129
|
+
function vn(n) {
|
|
130
|
+
var e = n.node, t = n.stylesheet, l = n.style, o = l === void 0 ? {} : l, a = n.useInlineStyles, r = n.key, c = e.properties, u = e.type, s = e.tagName, m = e.value;
|
|
131
131
|
if (u === "text")
|
|
132
132
|
return m;
|
|
133
133
|
if (s) {
|
|
134
|
-
var
|
|
134
|
+
var v = ke(t, a), b;
|
|
135
135
|
if (!a)
|
|
136
|
-
|
|
137
|
-
className:
|
|
136
|
+
b = K(K({}, c), {}, {
|
|
137
|
+
className: Nn(c.className)
|
|
138
138
|
});
|
|
139
139
|
else {
|
|
140
|
-
var
|
|
141
|
-
return
|
|
142
|
-
|
|
143
|
-
}),
|
|
144
|
-
}, []),
|
|
145
|
-
return !
|
|
140
|
+
var g = Object.keys(t).reduce(function(p, k) {
|
|
141
|
+
return k.split(".").forEach(function(P) {
|
|
142
|
+
p.includes(P) || p.push(P);
|
|
143
|
+
}), p;
|
|
144
|
+
}, []), O = c.className && c.className.includes("token") ? ["token"] : [], N = c.className && O.concat(c.className.filter(function(p) {
|
|
145
|
+
return !g.includes(p);
|
|
146
146
|
}));
|
|
147
|
-
|
|
148
|
-
className:
|
|
149
|
-
style:
|
|
147
|
+
b = K(K({}, c), {}, {
|
|
148
|
+
className: Nn(N) || void 0,
|
|
149
|
+
style: xe(c.className, Object.assign({}, c.style, o), t)
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
var
|
|
153
|
-
return /* @__PURE__ */ H.createElement(s,
|
|
152
|
+
var w = v(e.children);
|
|
153
|
+
return /* @__PURE__ */ H.createElement(s, se({
|
|
154
154
|
key: r
|
|
155
|
-
},
|
|
155
|
+
}, b), w);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
const
|
|
159
|
-
var t =
|
|
160
|
-
return t.indexOf(
|
|
158
|
+
const Se = function(n, e) {
|
|
159
|
+
var t = n.listLanguages();
|
|
160
|
+
return t.indexOf(e) !== -1;
|
|
161
161
|
};
|
|
162
|
-
var
|
|
163
|
-
function
|
|
164
|
-
var t = Object.keys(
|
|
162
|
+
var Ce = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
|
|
163
|
+
function An(n, e) {
|
|
164
|
+
var t = Object.keys(n);
|
|
165
165
|
if (Object.getOwnPropertySymbols) {
|
|
166
|
-
var l = Object.getOwnPropertySymbols(
|
|
167
|
-
|
|
168
|
-
return Object.getOwnPropertyDescriptor(
|
|
166
|
+
var l = Object.getOwnPropertySymbols(n);
|
|
167
|
+
e && (l = l.filter(function(o) {
|
|
168
|
+
return Object.getOwnPropertyDescriptor(n, o).enumerable;
|
|
169
169
|
})), t.push.apply(t, l);
|
|
170
170
|
}
|
|
171
171
|
return t;
|
|
172
172
|
}
|
|
173
|
-
function $(
|
|
174
|
-
for (var
|
|
175
|
-
var t = arguments[
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
179
|
-
Object.defineProperty(
|
|
173
|
+
function $(n) {
|
|
174
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
175
|
+
var t = arguments[e] != null ? arguments[e] : {};
|
|
176
|
+
e % 2 ? An(Object(t), !0).forEach(function(l) {
|
|
177
|
+
$n(n, l, t[l]);
|
|
178
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : An(Object(t)).forEach(function(l) {
|
|
179
|
+
Object.defineProperty(n, l, Object.getOwnPropertyDescriptor(t, l));
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
return
|
|
182
|
+
return n;
|
|
183
183
|
}
|
|
184
|
-
var
|
|
185
|
-
function
|
|
186
|
-
return
|
|
184
|
+
var Oe = /\n/g;
|
|
185
|
+
function Pe(n) {
|
|
186
|
+
return n.match(Oe);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
var
|
|
190
|
-
return
|
|
188
|
+
function Le(n) {
|
|
189
|
+
var e = n.lines, t = n.startingLineNumber, l = n.style;
|
|
190
|
+
return e.map(function(o, a) {
|
|
191
191
|
var r = a + t;
|
|
192
192
|
return /* @__PURE__ */ H.createElement("span", {
|
|
193
193
|
key: "line-".concat(a),
|
|
@@ -197,164 +197,164 @@ function Ln(e) {
|
|
|
197
197
|
`));
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
function
|
|
201
|
-
var
|
|
200
|
+
function Ne(n) {
|
|
201
|
+
var e = n.codeString, t = n.codeStyle, l = n.containerStyle, o = l === void 0 ? {
|
|
202
202
|
float: "left",
|
|
203
203
|
paddingRight: "10px"
|
|
204
|
-
} : l, a =
|
|
204
|
+
} : l, a = n.numberStyle, r = a === void 0 ? {} : a, c = n.startingLineNumber;
|
|
205
205
|
return /* @__PURE__ */ H.createElement("code", {
|
|
206
206
|
style: Object.assign({}, t, o)
|
|
207
|
-
},
|
|
208
|
-
lines:
|
|
207
|
+
}, Le({
|
|
208
|
+
lines: e.replace(/\n$/, "").split(`
|
|
209
209
|
`),
|
|
210
210
|
style: r,
|
|
211
211
|
startingLineNumber: c
|
|
212
212
|
}));
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
return "".concat(
|
|
214
|
+
function Ae(n) {
|
|
215
|
+
return "".concat(n.toString().length, ".25em");
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Fn(n, e) {
|
|
218
218
|
return {
|
|
219
219
|
type: "element",
|
|
220
220
|
tagName: "span",
|
|
221
221
|
properties: {
|
|
222
|
-
key: "line-number--".concat(
|
|
222
|
+
key: "line-number--".concat(n),
|
|
223
223
|
className: ["comment", "linenumber", "react-syntax-highlighter-line-number"],
|
|
224
|
-
style:
|
|
224
|
+
style: e
|
|
225
225
|
},
|
|
226
226
|
children: [{
|
|
227
227
|
type: "text",
|
|
228
|
-
value:
|
|
228
|
+
value: n
|
|
229
229
|
}]
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function Wn(n, e, t) {
|
|
233
233
|
var l = {
|
|
234
234
|
display: "inline-block",
|
|
235
|
-
minWidth:
|
|
235
|
+
minWidth: Ae(t),
|
|
236
236
|
paddingRight: "1em",
|
|
237
237
|
textAlign: "right",
|
|
238
238
|
userSelect: "none"
|
|
239
|
-
}, o = typeof
|
|
239
|
+
}, o = typeof n == "function" ? n(e) : n, a = $($({}, l), o);
|
|
240
240
|
return a;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
var
|
|
244
|
-
if (
|
|
245
|
-
var N =
|
|
246
|
-
|
|
242
|
+
function an(n) {
|
|
243
|
+
var e = n.children, t = n.lineNumber, l = n.lineNumberStyle, o = n.largestLineNumber, a = n.showInlineLineNumbers, r = n.lineProps, c = r === void 0 ? {} : r, u = n.className, s = u === void 0 ? [] : u, m = n.showLineNumbers, v = n.wrapLongLines, b = n.wrapLines, g = b === void 0 ? !1 : b, O = g ? $({}, typeof c == "function" ? c(t) : c) : {};
|
|
244
|
+
if (O.className = O.className ? [].concat(gn(O.className.trim().split(/\s+/)), gn(s)) : s, t && a) {
|
|
245
|
+
var N = Wn(l, t, o);
|
|
246
|
+
e.unshift(Fn(t, N));
|
|
247
247
|
}
|
|
248
|
-
return
|
|
248
|
+
return v & m && (O.style = $({
|
|
249
249
|
display: "flex"
|
|
250
|
-
},
|
|
250
|
+
}, O.style)), {
|
|
251
251
|
type: "element",
|
|
252
252
|
tagName: "span",
|
|
253
|
-
properties:
|
|
254
|
-
children:
|
|
253
|
+
properties: O,
|
|
254
|
+
children: e
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
function
|
|
258
|
-
var
|
|
259
|
-
|
|
260
|
-
for (var l = 0; l <
|
|
261
|
-
var o =
|
|
257
|
+
function Vn(n) {
|
|
258
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
259
|
+
n.length === void 0 && (n = [n]);
|
|
260
|
+
for (var l = 0; l < n.length; l++) {
|
|
261
|
+
var o = n[l];
|
|
262
262
|
if (o.type === "text")
|
|
263
|
-
t.push(
|
|
263
|
+
t.push(an({
|
|
264
264
|
children: [o],
|
|
265
|
-
className:
|
|
265
|
+
className: gn(new Set(e))
|
|
266
266
|
}));
|
|
267
267
|
else if (o.children) {
|
|
268
|
-
var a, r =
|
|
269
|
-
|
|
268
|
+
var a, r = e.concat(((a = o.properties) === null || a === void 0 ? void 0 : a.className) || []);
|
|
269
|
+
Vn(o.children, r).forEach(function(c) {
|
|
270
270
|
return t.push(c);
|
|
271
271
|
});
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
return t;
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
var s, m =
|
|
278
|
-
function
|
|
279
|
-
var
|
|
280
|
-
return
|
|
276
|
+
function Ee(n, e, t, l, o, a, r, c, u) {
|
|
277
|
+
var s, m = Vn(n.value), v = [], b = -1, g = 0;
|
|
278
|
+
function O(S, y) {
|
|
279
|
+
var C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
280
|
+
return an({
|
|
281
281
|
children: S,
|
|
282
|
-
lineNumber:
|
|
282
|
+
lineNumber: y,
|
|
283
283
|
lineNumberStyle: c,
|
|
284
284
|
largestLineNumber: r,
|
|
285
285
|
showInlineLineNumbers: o,
|
|
286
286
|
lineProps: t,
|
|
287
|
-
className:
|
|
287
|
+
className: C,
|
|
288
288
|
showLineNumbers: l,
|
|
289
289
|
wrapLongLines: u,
|
|
290
|
-
wrapLines:
|
|
290
|
+
wrapLines: e
|
|
291
291
|
});
|
|
292
292
|
}
|
|
293
|
-
function N(S,
|
|
294
|
-
if (l &&
|
|
295
|
-
var
|
|
296
|
-
S.unshift(
|
|
293
|
+
function N(S, y) {
|
|
294
|
+
if (l && y && o) {
|
|
295
|
+
var C = Wn(c, y, r);
|
|
296
|
+
S.unshift(Fn(y, C));
|
|
297
297
|
}
|
|
298
298
|
return S;
|
|
299
299
|
}
|
|
300
|
-
function
|
|
301
|
-
var
|
|
302
|
-
return
|
|
300
|
+
function w(S, y) {
|
|
301
|
+
var C = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
|
|
302
|
+
return e || C.length > 0 ? O(S, y, C) : N(S, y);
|
|
303
303
|
}
|
|
304
|
-
for (var
|
|
305
|
-
var
|
|
306
|
-
if (
|
|
307
|
-
var U =
|
|
304
|
+
for (var p = function() {
|
|
305
|
+
var y = m[g], C = y.children[0].value, L = Pe(C);
|
|
306
|
+
if (L) {
|
|
307
|
+
var U = C.split(`
|
|
308
308
|
`);
|
|
309
309
|
U.forEach(function(R, E) {
|
|
310
|
-
var D = l &&
|
|
310
|
+
var D = l && v.length + a, d = {
|
|
311
311
|
type: "text",
|
|
312
312
|
value: "".concat(R, `
|
|
313
313
|
`)
|
|
314
314
|
};
|
|
315
315
|
if (E === 0) {
|
|
316
|
-
var j = m.slice(
|
|
316
|
+
var j = m.slice(b + 1, g).concat(an({
|
|
317
317
|
children: [d],
|
|
318
|
-
className:
|
|
319
|
-
})), B =
|
|
320
|
-
|
|
318
|
+
className: y.properties.className
|
|
319
|
+
})), B = w(j, D);
|
|
320
|
+
v.push(B);
|
|
321
321
|
} else if (E === U.length - 1) {
|
|
322
|
-
var
|
|
322
|
+
var en = m[g + 1] && m[g + 1].children && m[g + 1].children[0], Y = {
|
|
323
323
|
type: "text",
|
|
324
324
|
value: "".concat(R)
|
|
325
325
|
};
|
|
326
|
-
if (
|
|
327
|
-
var
|
|
326
|
+
if (en) {
|
|
327
|
+
var tn = an({
|
|
328
328
|
children: [Y],
|
|
329
|
-
className:
|
|
329
|
+
className: y.properties.className
|
|
330
330
|
});
|
|
331
|
-
m.splice(
|
|
331
|
+
m.splice(g + 1, 0, tn);
|
|
332
332
|
} else {
|
|
333
|
-
var
|
|
334
|
-
|
|
333
|
+
var ln = [Y], F = w(ln, D, y.properties.className);
|
|
334
|
+
v.push(F);
|
|
335
335
|
}
|
|
336
336
|
} else {
|
|
337
|
-
var
|
|
338
|
-
|
|
337
|
+
var W = [d], G = w(W, D, y.properties.className);
|
|
338
|
+
v.push(G);
|
|
339
339
|
}
|
|
340
|
-
}),
|
|
340
|
+
}), b = g;
|
|
341
341
|
}
|
|
342
|
-
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
if (
|
|
346
|
-
var
|
|
347
|
-
if (
|
|
348
|
-
var
|
|
349
|
-
|
|
342
|
+
g++;
|
|
343
|
+
}; g < m.length; )
|
|
344
|
+
p();
|
|
345
|
+
if (b !== m.length - 1) {
|
|
346
|
+
var k = m.slice(b + 1, m.length);
|
|
347
|
+
if (k && k.length) {
|
|
348
|
+
var P = l && v.length + a, h = w(k, P);
|
|
349
|
+
v.push(h);
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
-
return
|
|
352
|
+
return e ? v : (s = []).concat.apply(s, v);
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
var
|
|
356
|
-
return
|
|
357
|
-
return
|
|
354
|
+
function Te(n) {
|
|
355
|
+
var e = n.rows, t = n.stylesheet, l = n.useInlineStyles;
|
|
356
|
+
return e.map(function(o, a) {
|
|
357
|
+
return vn({
|
|
358
358
|
node: o,
|
|
359
359
|
stylesheet: t,
|
|
360
360
|
useInlineStyles: l,
|
|
@@ -362,21 +362,21 @@ function Tn(e) {
|
|
|
362
362
|
});
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
return
|
|
365
|
+
function qn(n) {
|
|
366
|
+
return n && typeof n.highlightAuto < "u";
|
|
367
367
|
}
|
|
368
|
-
function
|
|
369
|
-
var
|
|
370
|
-
if (
|
|
371
|
-
var a =
|
|
368
|
+
function De(n) {
|
|
369
|
+
var e = n.astGenerator, t = n.language, l = n.code, o = n.defaultCodeValue;
|
|
370
|
+
if (qn(e)) {
|
|
371
|
+
var a = Se(e, t);
|
|
372
372
|
return t === "text" ? {
|
|
373
373
|
value: o,
|
|
374
374
|
language: "text"
|
|
375
|
-
} : a ?
|
|
375
|
+
} : a ? e.highlight(t, l) : e.highlightAuto(l);
|
|
376
376
|
}
|
|
377
377
|
try {
|
|
378
378
|
return t && t !== "text" ? {
|
|
379
|
-
value:
|
|
379
|
+
value: e.highlight(l, t)
|
|
380
380
|
} : {
|
|
381
381
|
value: o
|
|
382
382
|
};
|
|
@@ -386,47 +386,47 @@ function Dn(e) {
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
function
|
|
389
|
+
function Me(n, e) {
|
|
390
390
|
return function(l) {
|
|
391
|
-
var o, a, r = l.language, c = l.children, u = l.style, s = u === void 0 ?
|
|
391
|
+
var o, a, r = l.language, c = l.children, u = l.style, s = u === void 0 ? e : u, m = l.customStyle, v = m === void 0 ? {} : m, b = l.codeTagProps, g = b === void 0 ? {
|
|
392
392
|
className: r ? "language-".concat(r) : void 0,
|
|
393
393
|
style: $($({}, s['code[class*="language-"]']), s['code[class*="language-'.concat(r, '"]')])
|
|
394
|
-
} :
|
|
395
|
-
|
|
396
|
-
var
|
|
397
|
-
containerStyle:
|
|
398
|
-
codeStyle:
|
|
399
|
-
numberStyle:
|
|
394
|
+
} : b, O = l.useInlineStyles, N = O === void 0 ? !0 : O, w = l.showLineNumbers, p = w === void 0 ? !1 : w, k = l.showInlineLineNumbers, P = k === void 0 ? !0 : k, h = l.startingLineNumber, S = h === void 0 ? 1 : h, y = l.lineNumberContainerStyle, C = l.lineNumberStyle, L = C === void 0 ? {} : C, U = l.wrapLines, R = l.wrapLongLines, E = R === void 0 ? !1 : R, D = l.lineProps, d = D === void 0 ? {} : D, j = l.renderer, B = l.PreTag, en = B === void 0 ? "pre" : B, Y = l.CodeTag, tn = Y === void 0 ? "code" : Y, ln = l.code, F = ln === void 0 ? (Array.isArray(c) ? c[0] : c) || "" : ln, W = l.astGenerator, G = de(l, Ce);
|
|
395
|
+
W = W || n;
|
|
396
|
+
var kn = p ? /* @__PURE__ */ H.createElement(Ne, {
|
|
397
|
+
containerStyle: y,
|
|
398
|
+
codeStyle: g.style || {},
|
|
399
|
+
numberStyle: L,
|
|
400
400
|
startingLineNumber: S,
|
|
401
401
|
codeString: F
|
|
402
|
-
}) : null,
|
|
402
|
+
}) : null, ae = s.hljs || s['pre[class*="language-"]'] || {
|
|
403
403
|
backgroundColor: "#fff"
|
|
404
|
-
},
|
|
405
|
-
style: Object.assign({},
|
|
404
|
+
}, Sn = qn(W) ? "hljs" : "prismjs", Cn = N ? Object.assign({}, G, {
|
|
405
|
+
style: Object.assign({}, ae, v)
|
|
406
406
|
}) : Object.assign({}, G, {
|
|
407
|
-
className: G.className ? "".concat(
|
|
408
|
-
style: Object.assign({},
|
|
407
|
+
className: G.className ? "".concat(Sn, " ").concat(G.className) : Sn,
|
|
408
|
+
style: Object.assign({}, v)
|
|
409
409
|
});
|
|
410
|
-
if (E ?
|
|
410
|
+
if (E ? g.style = $({
|
|
411
411
|
whiteSpace: "pre-wrap"
|
|
412
|
-
},
|
|
412
|
+
}, g.style) : g.style = $({
|
|
413
413
|
whiteSpace: "pre"
|
|
414
|
-
},
|
|
415
|
-
return /* @__PURE__ */ H.createElement(
|
|
416
|
-
(U === void 0 && j || E) && (U = !0), j = j ||
|
|
417
|
-
var
|
|
414
|
+
}, g.style), !W)
|
|
415
|
+
return /* @__PURE__ */ H.createElement(en, Cn, kn, /* @__PURE__ */ H.createElement(tn, g, F));
|
|
416
|
+
(U === void 0 && j || E) && (U = !0), j = j || Te;
|
|
417
|
+
var On = [{
|
|
418
418
|
type: "text",
|
|
419
419
|
value: F
|
|
420
|
-
}],
|
|
421
|
-
astGenerator:
|
|
420
|
+
}], un = De({
|
|
421
|
+
astGenerator: W,
|
|
422
422
|
language: r,
|
|
423
423
|
code: F,
|
|
424
|
-
defaultCodeValue:
|
|
424
|
+
defaultCodeValue: On
|
|
425
425
|
});
|
|
426
|
-
|
|
427
|
-
var
|
|
428
|
-
return /* @__PURE__ */ H.createElement(
|
|
429
|
-
rows:
|
|
426
|
+
un.language === null && (un.value = On);
|
|
427
|
+
var ie = (o = (a = F.match(/\n/g)) === null || a === void 0 ? void 0 : a.length) !== null && o !== void 0 ? o : 0, re = S + ie, ce = Ee(un, U, d, p, P, S, re, L, E);
|
|
428
|
+
return /* @__PURE__ */ H.createElement(en, Cn, /* @__PURE__ */ H.createElement(tn, g, !P && kn, j({
|
|
429
|
+
rows: ce,
|
|
430
430
|
stylesheet: s,
|
|
431
431
|
useInlineStyles: N
|
|
432
432
|
})));
|
|
@@ -443,21 +443,21 @@ class Q {
|
|
|
443
443
|
* @returns
|
|
444
444
|
* Schema.
|
|
445
445
|
*/
|
|
446
|
-
constructor(
|
|
447
|
-
this.normal = t, this.property =
|
|
446
|
+
constructor(e, t, l) {
|
|
447
|
+
this.normal = t, this.property = e, l && (this.space = l);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
450
|
Q.prototype.normal = {};
|
|
451
451
|
Q.prototype.property = {};
|
|
452
452
|
Q.prototype.space = void 0;
|
|
453
|
-
function
|
|
453
|
+
function Gn(n, e) {
|
|
454
454
|
const t = {}, l = {};
|
|
455
|
-
for (const o of
|
|
455
|
+
for (const o of n)
|
|
456
456
|
Object.assign(t, o.property), Object.assign(l, o.normal);
|
|
457
|
-
return new Q(t, l,
|
|
457
|
+
return new Q(t, l, e);
|
|
458
458
|
}
|
|
459
|
-
function J(
|
|
460
|
-
return
|
|
459
|
+
function J(n) {
|
|
460
|
+
return n.toLowerCase();
|
|
461
461
|
}
|
|
462
462
|
class I {
|
|
463
463
|
/**
|
|
@@ -468,8 +468,8 @@ class I {
|
|
|
468
468
|
* @returns
|
|
469
469
|
* Info.
|
|
470
470
|
*/
|
|
471
|
-
constructor(
|
|
472
|
-
this.attribute = t, this.property =
|
|
471
|
+
constructor(e, t) {
|
|
472
|
+
this.attribute = t, this.property = e;
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
I.prototype.attribute = "";
|
|
@@ -484,25 +484,25 @@ I.prototype.overloadedBoolean = !1;
|
|
|
484
484
|
I.prototype.property = "";
|
|
485
485
|
I.prototype.spaceSeparated = !1;
|
|
486
486
|
I.prototype.space = void 0;
|
|
487
|
-
let
|
|
488
|
-
const f = q(), A = q(),
|
|
487
|
+
let Re = 0;
|
|
488
|
+
const f = q(), A = q(), pn = q(), i = q(), x = q(), V = q(), z = q();
|
|
489
489
|
function q() {
|
|
490
|
-
return 2 ** ++
|
|
490
|
+
return 2 ** ++Re;
|
|
491
491
|
}
|
|
492
|
-
const
|
|
492
|
+
const hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
493
493
|
__proto__: null,
|
|
494
494
|
boolean: f,
|
|
495
495
|
booleanish: A,
|
|
496
496
|
commaOrSpaceSeparated: z,
|
|
497
|
-
commaSeparated:
|
|
497
|
+
commaSeparated: V,
|
|
498
498
|
number: i,
|
|
499
|
-
overloadedBoolean:
|
|
500
|
-
spaceSeparated:
|
|
501
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
499
|
+
overloadedBoolean: pn,
|
|
500
|
+
spaceSeparated: x
|
|
501
|
+
}, Symbol.toStringTag, { value: "Module" })), fn = (
|
|
502
502
|
/** @type {ReadonlyArray<keyof typeof types>} */
|
|
503
|
-
Object.keys(
|
|
503
|
+
Object.keys(hn)
|
|
504
504
|
);
|
|
505
|
-
class
|
|
505
|
+
class bn extends I {
|
|
506
506
|
/**
|
|
507
507
|
* @constructor
|
|
508
508
|
* @param {string} property
|
|
@@ -516,33 +516,33 @@ class ve extends I {
|
|
|
516
516
|
* @returns
|
|
517
517
|
* Info.
|
|
518
518
|
*/
|
|
519
|
-
constructor(
|
|
519
|
+
constructor(e, t, l, o) {
|
|
520
520
|
let a = -1;
|
|
521
|
-
if (super(
|
|
522
|
-
for (; ++a <
|
|
523
|
-
const r =
|
|
524
|
-
|
|
521
|
+
if (super(e, t), En(this, "space", o), typeof l == "number")
|
|
522
|
+
for (; ++a < fn.length; ) {
|
|
523
|
+
const r = fn[a];
|
|
524
|
+
En(this, fn[a], (l & hn[r]) === hn[r]);
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
|
|
529
|
-
function
|
|
530
|
-
t && (e
|
|
528
|
+
bn.prototype.defined = !0;
|
|
529
|
+
function En(n, e, t) {
|
|
530
|
+
t && (n[e] = t);
|
|
531
531
|
}
|
|
532
|
-
function _(
|
|
533
|
-
const
|
|
534
|
-
for (const [l, o] of Object.entries(
|
|
535
|
-
const a = new
|
|
532
|
+
function _(n) {
|
|
533
|
+
const e = {}, t = {};
|
|
534
|
+
for (const [l, o] of Object.entries(n.properties)) {
|
|
535
|
+
const a = new bn(
|
|
536
536
|
l,
|
|
537
|
-
|
|
537
|
+
n.transform(n.attributes || {}, l),
|
|
538
538
|
o,
|
|
539
|
-
|
|
539
|
+
n.space
|
|
540
540
|
);
|
|
541
|
-
|
|
541
|
+
n.mustUseProperty && n.mustUseProperty.includes(l) && (a.mustUseProperty = !0), e[l] = a, t[J(l)] = l, t[J(a.attribute)] = l;
|
|
542
542
|
}
|
|
543
|
-
return new Q(
|
|
543
|
+
return new Q(e, t, n.space);
|
|
544
544
|
}
|
|
545
|
-
const
|
|
545
|
+
const Kn = _({
|
|
546
546
|
properties: {
|
|
547
547
|
ariaActiveDescendant: null,
|
|
548
548
|
ariaAtomic: A,
|
|
@@ -552,36 +552,36 @@ const Ge = _({
|
|
|
552
552
|
ariaColCount: i,
|
|
553
553
|
ariaColIndex: i,
|
|
554
554
|
ariaColSpan: i,
|
|
555
|
-
ariaControls:
|
|
555
|
+
ariaControls: x,
|
|
556
556
|
ariaCurrent: null,
|
|
557
|
-
ariaDescribedBy:
|
|
557
|
+
ariaDescribedBy: x,
|
|
558
558
|
ariaDetails: null,
|
|
559
559
|
ariaDisabled: A,
|
|
560
|
-
ariaDropEffect:
|
|
560
|
+
ariaDropEffect: x,
|
|
561
561
|
ariaErrorMessage: null,
|
|
562
562
|
ariaExpanded: A,
|
|
563
|
-
ariaFlowTo:
|
|
563
|
+
ariaFlowTo: x,
|
|
564
564
|
ariaGrabbed: A,
|
|
565
565
|
ariaHasPopup: null,
|
|
566
566
|
ariaHidden: A,
|
|
567
567
|
ariaInvalid: null,
|
|
568
568
|
ariaKeyShortcuts: null,
|
|
569
569
|
ariaLabel: null,
|
|
570
|
-
ariaLabelledBy:
|
|
570
|
+
ariaLabelledBy: x,
|
|
571
571
|
ariaLevel: i,
|
|
572
572
|
ariaLive: null,
|
|
573
573
|
ariaModal: A,
|
|
574
574
|
ariaMultiLine: A,
|
|
575
575
|
ariaMultiSelectable: A,
|
|
576
576
|
ariaOrientation: null,
|
|
577
|
-
ariaOwns:
|
|
577
|
+
ariaOwns: x,
|
|
578
578
|
ariaPlaceholder: null,
|
|
579
579
|
ariaPosInSet: i,
|
|
580
580
|
ariaPressed: A,
|
|
581
581
|
ariaReadOnly: A,
|
|
582
582
|
ariaRelevant: null,
|
|
583
583
|
ariaRequired: A,
|
|
584
|
-
ariaRoleDescription:
|
|
584
|
+
ariaRoleDescription: x,
|
|
585
585
|
ariaRowCount: i,
|
|
586
586
|
ariaRowIndex: i,
|
|
587
587
|
ariaRowSpan: i,
|
|
@@ -594,17 +594,17 @@ const Ge = _({
|
|
|
594
594
|
ariaValueText: null,
|
|
595
595
|
role: null
|
|
596
596
|
},
|
|
597
|
-
transform(
|
|
598
|
-
return
|
|
597
|
+
transform(n, e) {
|
|
598
|
+
return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
|
|
599
599
|
}
|
|
600
600
|
});
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function _n(n, e) {
|
|
602
|
+
return e in n ? n[e] : e;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
return
|
|
604
|
+
function Yn(n, e) {
|
|
605
|
+
return _n(n, e.toLowerCase());
|
|
606
606
|
}
|
|
607
|
-
const
|
|
607
|
+
const je = _({
|
|
608
608
|
attributes: {
|
|
609
609
|
acceptcharset: "accept-charset",
|
|
610
610
|
classname: "class",
|
|
@@ -615,9 +615,9 @@ const jn = _({
|
|
|
615
615
|
properties: {
|
|
616
616
|
// Standard Properties.
|
|
617
617
|
abbr: null,
|
|
618
|
-
accept:
|
|
619
|
-
acceptCharset:
|
|
620
|
-
accessKey:
|
|
618
|
+
accept: V,
|
|
619
|
+
acceptCharset: x,
|
|
620
|
+
accessKey: x,
|
|
621
621
|
action: null,
|
|
622
622
|
allow: null,
|
|
623
623
|
allowFullScreen: f,
|
|
@@ -628,15 +628,15 @@ const jn = _({
|
|
|
628
628
|
as: null,
|
|
629
629
|
async: f,
|
|
630
630
|
autoCapitalize: null,
|
|
631
|
-
autoComplete:
|
|
631
|
+
autoComplete: x,
|
|
632
632
|
autoFocus: f,
|
|
633
633
|
autoPlay: f,
|
|
634
|
-
blocking:
|
|
634
|
+
blocking: x,
|
|
635
635
|
capture: null,
|
|
636
636
|
charSet: null,
|
|
637
637
|
checked: f,
|
|
638
638
|
cite: null,
|
|
639
|
-
className:
|
|
639
|
+
className: x,
|
|
640
640
|
closedBy: null,
|
|
641
641
|
colorSpace: null,
|
|
642
642
|
cols: i,
|
|
@@ -646,8 +646,8 @@ const jn = _({
|
|
|
646
646
|
content: null,
|
|
647
647
|
contentEditable: A,
|
|
648
648
|
controls: f,
|
|
649
|
-
controlsList:
|
|
650
|
-
coords: i |
|
|
649
|
+
controlsList: x,
|
|
650
|
+
coords: i | V,
|
|
651
651
|
crossOrigin: null,
|
|
652
652
|
data: null,
|
|
653
653
|
dateTime: null,
|
|
@@ -657,7 +657,7 @@ const jn = _({
|
|
|
657
657
|
dir: null,
|
|
658
658
|
dirName: null,
|
|
659
659
|
disabled: f,
|
|
660
|
-
download:
|
|
660
|
+
download: pn,
|
|
661
661
|
draggable: A,
|
|
662
662
|
encType: null,
|
|
663
663
|
enterKeyHint: null,
|
|
@@ -668,14 +668,14 @@ const jn = _({
|
|
|
668
668
|
formMethod: null,
|
|
669
669
|
formNoValidate: f,
|
|
670
670
|
formTarget: null,
|
|
671
|
-
headers:
|
|
671
|
+
headers: x,
|
|
672
672
|
height: i,
|
|
673
|
-
hidden:
|
|
673
|
+
hidden: pn,
|
|
674
674
|
high: i,
|
|
675
675
|
href: null,
|
|
676
676
|
hrefLang: null,
|
|
677
|
-
htmlFor:
|
|
678
|
-
httpEquiv:
|
|
677
|
+
htmlFor: x,
|
|
678
|
+
httpEquiv: x,
|
|
679
679
|
id: null,
|
|
680
680
|
imageSizes: null,
|
|
681
681
|
imageSrcSet: null,
|
|
@@ -685,10 +685,10 @@ const jn = _({
|
|
|
685
685
|
is: null,
|
|
686
686
|
isMap: f,
|
|
687
687
|
itemId: null,
|
|
688
|
-
itemProp:
|
|
689
|
-
itemRef:
|
|
688
|
+
itemProp: x,
|
|
689
|
+
itemRef: x,
|
|
690
690
|
itemScope: f,
|
|
691
|
-
itemType:
|
|
691
|
+
itemType: x,
|
|
692
692
|
kind: null,
|
|
693
693
|
label: null,
|
|
694
694
|
lang: null,
|
|
@@ -801,7 +801,7 @@ const jn = _({
|
|
|
801
801
|
open: f,
|
|
802
802
|
optimum: i,
|
|
803
803
|
pattern: null,
|
|
804
|
-
ping:
|
|
804
|
+
ping: x,
|
|
805
805
|
placeholder: null,
|
|
806
806
|
playsInline: f,
|
|
807
807
|
popover: null,
|
|
@@ -811,12 +811,12 @@ const jn = _({
|
|
|
811
811
|
preload: null,
|
|
812
812
|
readOnly: f,
|
|
813
813
|
referrerPolicy: null,
|
|
814
|
-
rel:
|
|
814
|
+
rel: x,
|
|
815
815
|
required: f,
|
|
816
816
|
reversed: f,
|
|
817
817
|
rows: i,
|
|
818
818
|
rowSpan: i,
|
|
819
|
-
sandbox:
|
|
819
|
+
sandbox: x,
|
|
820
820
|
scope: null,
|
|
821
821
|
scoped: f,
|
|
822
822
|
seamless: f,
|
|
@@ -856,7 +856,7 @@ const jn = _({
|
|
|
856
856
|
// Several. Use CSS `text-align` instead,
|
|
857
857
|
aLink: null,
|
|
858
858
|
// `<body>`. Use CSS `a:active {color}` instead
|
|
859
|
-
archive:
|
|
859
|
+
archive: x,
|
|
860
860
|
// `<object>`. List of URIs to archives
|
|
861
861
|
axis: null,
|
|
862
862
|
// `<td>` and `<th>`. Use `scope` on `<th>`
|
|
@@ -965,8 +965,8 @@ const jn = _({
|
|
|
965
965
|
credentialless: f,
|
|
966
966
|
disablePictureInPicture: f,
|
|
967
967
|
disableRemotePlayback: f,
|
|
968
|
-
exportParts:
|
|
969
|
-
part:
|
|
968
|
+
exportParts: V,
|
|
969
|
+
part: x,
|
|
970
970
|
prefix: null,
|
|
971
971
|
property: null,
|
|
972
972
|
results: i,
|
|
@@ -974,8 +974,8 @@ const jn = _({
|
|
|
974
974
|
unselectable: null
|
|
975
975
|
},
|
|
976
976
|
space: "html",
|
|
977
|
-
transform:
|
|
978
|
-
}),
|
|
977
|
+
transform: Yn
|
|
978
|
+
}), Ie = _({
|
|
979
979
|
attributes: {
|
|
980
980
|
accentHeight: "accent-height",
|
|
981
981
|
alignmentBaseline: "alignment-baseline",
|
|
@@ -1175,7 +1175,7 @@ const jn = _({
|
|
|
1175
1175
|
by: null,
|
|
1176
1176
|
calcMode: null,
|
|
1177
1177
|
capHeight: i,
|
|
1178
|
-
className:
|
|
1178
|
+
className: x,
|
|
1179
1179
|
clip: null,
|
|
1180
1180
|
clipPath: null,
|
|
1181
1181
|
clipPathUnits: null,
|
|
@@ -1235,9 +1235,9 @@ const jn = _({
|
|
|
1235
1235
|
from: null,
|
|
1236
1236
|
fx: null,
|
|
1237
1237
|
fy: null,
|
|
1238
|
-
g1:
|
|
1239
|
-
g2:
|
|
1240
|
-
glyphName:
|
|
1238
|
+
g1: V,
|
|
1239
|
+
g2: V,
|
|
1240
|
+
glyphName: V,
|
|
1241
1241
|
glyphOrientationHorizontal: null,
|
|
1242
1242
|
glyphOrientationVertical: null,
|
|
1243
1243
|
glyphRef: null,
|
|
@@ -1411,7 +1411,7 @@ const jn = _({
|
|
|
1411
1411
|
patternTransform: null,
|
|
1412
1412
|
patternUnits: null,
|
|
1413
1413
|
phase: null,
|
|
1414
|
-
ping:
|
|
1414
|
+
ping: x,
|
|
1415
1415
|
pitch: null,
|
|
1416
1416
|
playbackOrder: null,
|
|
1417
1417
|
pointerEvents: null,
|
|
@@ -1535,8 +1535,8 @@ const jn = _({
|
|
|
1535
1535
|
zoomAndPan: null
|
|
1536
1536
|
},
|
|
1537
1537
|
space: "svg",
|
|
1538
|
-
transform:
|
|
1539
|
-
}),
|
|
1538
|
+
transform: _n
|
|
1539
|
+
}), Xn = _({
|
|
1540
1540
|
properties: {
|
|
1541
1541
|
xLinkActuate: null,
|
|
1542
1542
|
xLinkArcRole: null,
|
|
@@ -1547,81 +1547,81 @@ const jn = _({
|
|
|
1547
1547
|
xLinkType: null
|
|
1548
1548
|
},
|
|
1549
1549
|
space: "xlink",
|
|
1550
|
-
transform(
|
|
1551
|
-
return "xlink:" +
|
|
1550
|
+
transform(n, e) {
|
|
1551
|
+
return "xlink:" + e.slice(5).toLowerCase();
|
|
1552
1552
|
}
|
|
1553
|
-
}),
|
|
1553
|
+
}), Zn = _({
|
|
1554
1554
|
attributes: { xmlnsxlink: "xmlns:xlink" },
|
|
1555
1555
|
properties: { xmlnsXLink: null, xmlns: null },
|
|
1556
1556
|
space: "xmlns",
|
|
1557
|
-
transform:
|
|
1558
|
-
}),
|
|
1557
|
+
transform: Yn
|
|
1558
|
+
}), Jn = _({
|
|
1559
1559
|
properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
|
|
1560
1560
|
space: "xml",
|
|
1561
|
-
transform(
|
|
1562
|
-
return "xml:" +
|
|
1561
|
+
transform(n, e) {
|
|
1562
|
+
return "xml:" + e.slice(3).toLowerCase();
|
|
1563
1563
|
}
|
|
1564
|
-
}),
|
|
1565
|
-
function
|
|
1566
|
-
const t = J(
|
|
1567
|
-
let l =
|
|
1568
|
-
if (t in
|
|
1569
|
-
return
|
|
1570
|
-
if (t.length > 4 && t.slice(0, 4) === "data" &&
|
|
1571
|
-
if (
|
|
1572
|
-
const a =
|
|
1564
|
+
}), Ue = /[A-Z]/g, Tn = /-[a-z]/g, ze = /^data[-\w.:]+$/i;
|
|
1565
|
+
function Be(n, e) {
|
|
1566
|
+
const t = J(e);
|
|
1567
|
+
let l = e, o = I;
|
|
1568
|
+
if (t in n.normal)
|
|
1569
|
+
return n.property[n.normal[t]];
|
|
1570
|
+
if (t.length > 4 && t.slice(0, 4) === "data" && ze.test(e)) {
|
|
1571
|
+
if (e.charAt(4) === "-") {
|
|
1572
|
+
const a = e.slice(5).replace(Tn, $e);
|
|
1573
1573
|
l = "data" + a.charAt(0).toUpperCase() + a.slice(1);
|
|
1574
1574
|
} else {
|
|
1575
|
-
const a =
|
|
1576
|
-
if (!
|
|
1577
|
-
let r = a.replace(
|
|
1578
|
-
r.charAt(0) !== "-" && (r = "-" + r),
|
|
1575
|
+
const a = e.slice(4);
|
|
1576
|
+
if (!Tn.test(a)) {
|
|
1577
|
+
let r = a.replace(Ue, He);
|
|
1578
|
+
r.charAt(0) !== "-" && (r = "-" + r), e = "data" + r;
|
|
1579
1579
|
}
|
|
1580
1580
|
}
|
|
1581
|
-
o =
|
|
1581
|
+
o = bn;
|
|
1582
1582
|
}
|
|
1583
|
-
return new o(l,
|
|
1583
|
+
return new o(l, e);
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1586
|
-
return "-" +
|
|
1585
|
+
function He(n) {
|
|
1586
|
+
return "-" + n.toLowerCase();
|
|
1587
1587
|
}
|
|
1588
|
-
function $n
|
|
1589
|
-
return
|
|
1588
|
+
function $e(n) {
|
|
1589
|
+
return n.charAt(1).toUpperCase();
|
|
1590
1590
|
}
|
|
1591
|
-
const
|
|
1592
|
-
function
|
|
1593
|
-
const
|
|
1591
|
+
const Fe = Gn([Kn, je, Xn, Zn, Jn], "html"), We = Gn([Kn, Ie, Xn, Zn, Jn], "svg");
|
|
1592
|
+
function Dn(n) {
|
|
1593
|
+
const e = [], t = String(n || "");
|
|
1594
1594
|
let l = t.indexOf(","), o = 0, a = !1;
|
|
1595
1595
|
for (; !a; ) {
|
|
1596
1596
|
l === -1 && (l = t.length, a = !0);
|
|
1597
1597
|
const r = t.slice(o, l).trim();
|
|
1598
|
-
(r || !a) &&
|
|
1598
|
+
(r || !a) && e.push(r), o = l + 1, l = t.indexOf(",", o);
|
|
1599
1599
|
}
|
|
1600
|
-
return
|
|
1600
|
+
return e;
|
|
1601
1601
|
}
|
|
1602
|
-
const
|
|
1603
|
-
function
|
|
1604
|
-
const t =
|
|
1602
|
+
const Mn = /[#.]/g;
|
|
1603
|
+
function Ve(n, e) {
|
|
1604
|
+
const t = n || "", l = {};
|
|
1605
1605
|
let o = 0, a, r;
|
|
1606
1606
|
for (; o < t.length; ) {
|
|
1607
|
-
|
|
1608
|
-
const c =
|
|
1607
|
+
Mn.lastIndex = o;
|
|
1608
|
+
const c = Mn.exec(t), u = t.slice(o, c ? c.index : t.length);
|
|
1609
1609
|
u && (a ? a === "#" ? l.id = u : Array.isArray(l.className) ? l.className.push(u) : l.className = [u] : r = u, o += u.length), c && (a = c[0], o++);
|
|
1610
1610
|
}
|
|
1611
1611
|
return {
|
|
1612
1612
|
type: "element",
|
|
1613
1613
|
// @ts-expect-error: tag name is parsed.
|
|
1614
|
-
tagName: r ||
|
|
1614
|
+
tagName: r || e || "div",
|
|
1615
1615
|
properties: l,
|
|
1616
1616
|
children: []
|
|
1617
1617
|
};
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1620
|
-
const
|
|
1621
|
-
return
|
|
1619
|
+
function Rn(n) {
|
|
1620
|
+
const e = String(n || "").trim();
|
|
1621
|
+
return e ? e.split(/[ \t\n\r\f]+/g) : [];
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1624
|
-
const l = t ?
|
|
1623
|
+
function Qn(n, e, t) {
|
|
1624
|
+
const l = t ? _e(t) : void 0;
|
|
1625
1625
|
function o(a, r, ...c) {
|
|
1626
1626
|
let u;
|
|
1627
1627
|
if (a == null) {
|
|
@@ -1632,30 +1632,30 @@ function Je(e, n, t) {
|
|
|
1632
1632
|
);
|
|
1633
1633
|
c.unshift(s);
|
|
1634
1634
|
} else {
|
|
1635
|
-
u =
|
|
1635
|
+
u = Ve(a, e);
|
|
1636
1636
|
const s = u.tagName.toLowerCase(), m = l ? l.get(s) : void 0;
|
|
1637
|
-
if (u.tagName = m || s,
|
|
1637
|
+
if (u.tagName = m || s, qe(r))
|
|
1638
1638
|
c.unshift(r);
|
|
1639
1639
|
else
|
|
1640
|
-
for (const [
|
|
1641
|
-
|
|
1640
|
+
for (const [v, b] of Object.entries(r))
|
|
1641
|
+
Ge(n, u.properties, v, b);
|
|
1642
1642
|
}
|
|
1643
1643
|
for (const s of c)
|
|
1644
|
-
|
|
1644
|
+
mn(u.children, s);
|
|
1645
1645
|
return u.type === "element" && u.tagName === "template" && (u.content = { type: "root", children: u.children }, u.children = []), u;
|
|
1646
1646
|
}
|
|
1647
1647
|
return o;
|
|
1648
1648
|
}
|
|
1649
|
-
function
|
|
1650
|
-
if (
|
|
1649
|
+
function qe(n) {
|
|
1650
|
+
if (n === null || typeof n != "object" || Array.isArray(n))
|
|
1651
1651
|
return !0;
|
|
1652
|
-
if (typeof
|
|
1653
|
-
const
|
|
1652
|
+
if (typeof n.type != "string") return !1;
|
|
1653
|
+
const e = (
|
|
1654
1654
|
/** @type {Record<string, unknown>} */
|
|
1655
|
-
|
|
1656
|
-
), t = Object.keys(
|
|
1655
|
+
n
|
|
1656
|
+
), t = Object.keys(n);
|
|
1657
1657
|
for (const l of t) {
|
|
1658
|
-
const o =
|
|
1658
|
+
const o = e[l];
|
|
1659
1659
|
if (o && typeof o == "object") {
|
|
1660
1660
|
if (!Array.isArray(o)) return !0;
|
|
1661
1661
|
const a = (
|
|
@@ -1667,64 +1667,64 @@ function qn(e) {
|
|
|
1667
1667
|
return !0;
|
|
1668
1668
|
}
|
|
1669
1669
|
}
|
|
1670
|
-
return !!("children" in
|
|
1670
|
+
return !!("children" in n && Array.isArray(n.children));
|
|
1671
1671
|
}
|
|
1672
|
-
function
|
|
1673
|
-
const o =
|
|
1672
|
+
function Ge(n, e, t, l) {
|
|
1673
|
+
const o = Be(n, t);
|
|
1674
1674
|
let a;
|
|
1675
1675
|
if (l != null) {
|
|
1676
1676
|
if (typeof l == "number") {
|
|
1677
1677
|
if (Number.isNaN(l)) return;
|
|
1678
1678
|
a = l;
|
|
1679
|
-
} else typeof l == "boolean" ? a = l : typeof l == "string" ? o.spaceSeparated ? a =
|
|
1679
|
+
} else typeof l == "boolean" ? a = l : typeof l == "string" ? o.spaceSeparated ? a = Rn(l) : o.commaSeparated ? a = Dn(l) : o.commaOrSpaceSeparated ? a = Rn(Dn(l).join(" ")) : a = jn(o, o.property, l) : Array.isArray(l) ? a = [...l] : a = o.property === "style" ? Ke(l) : String(l);
|
|
1680
1680
|
if (Array.isArray(a)) {
|
|
1681
1681
|
const r = [];
|
|
1682
1682
|
for (const c of a)
|
|
1683
1683
|
r.push(
|
|
1684
1684
|
/** @type {number | string} */
|
|
1685
|
-
|
|
1685
|
+
jn(o, o.property, c)
|
|
1686
1686
|
);
|
|
1687
1687
|
a = r;
|
|
1688
1688
|
}
|
|
1689
|
-
o.property === "className" && Array.isArray(
|
|
1689
|
+
o.property === "className" && Array.isArray(e.className) && (a = e.className.concat(
|
|
1690
1690
|
/** @type {Array<number | string> | number | string} */
|
|
1691
1691
|
a
|
|
1692
|
-
)),
|
|
1692
|
+
)), e[o.property] = a;
|
|
1693
1693
|
}
|
|
1694
1694
|
}
|
|
1695
|
-
function
|
|
1696
|
-
if (
|
|
1697
|
-
|
|
1698
|
-
else if (Array.isArray(
|
|
1699
|
-
for (const t of
|
|
1700
|
-
|
|
1701
|
-
else if (typeof
|
|
1702
|
-
|
|
1695
|
+
function mn(n, e) {
|
|
1696
|
+
if (e != null) if (typeof e == "number" || typeof e == "string")
|
|
1697
|
+
n.push({ type: "text", value: String(e) });
|
|
1698
|
+
else if (Array.isArray(e))
|
|
1699
|
+
for (const t of e)
|
|
1700
|
+
mn(n, t);
|
|
1701
|
+
else if (typeof e == "object" && "type" in e)
|
|
1702
|
+
e.type === "root" ? mn(n, e.children) : n.push(e);
|
|
1703
1703
|
else
|
|
1704
|
-
throw new Error("Expected node, nodes, or string, got `" +
|
|
1704
|
+
throw new Error("Expected node, nodes, or string, got `" + e + "`");
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1706
|
+
function jn(n, e, t) {
|
|
1707
1707
|
if (typeof t == "string") {
|
|
1708
|
-
if (
|
|
1708
|
+
if (n.number && t && !Number.isNaN(Number(t)))
|
|
1709
1709
|
return Number(t);
|
|
1710
|
-
if ((
|
|
1710
|
+
if ((n.boolean || n.overloadedBoolean) && (t === "" || J(t) === J(e)))
|
|
1711
1711
|
return !0;
|
|
1712
1712
|
}
|
|
1713
1713
|
return t;
|
|
1714
1714
|
}
|
|
1715
|
-
function
|
|
1716
|
-
const
|
|
1717
|
-
for (const [t, l] of Object.entries(
|
|
1718
|
-
|
|
1719
|
-
return
|
|
1715
|
+
function Ke(n) {
|
|
1716
|
+
const e = [];
|
|
1717
|
+
for (const [t, l] of Object.entries(n))
|
|
1718
|
+
e.push([t, l].join(": "));
|
|
1719
|
+
return e.join("; ");
|
|
1720
1720
|
}
|
|
1721
|
-
function
|
|
1722
|
-
const
|
|
1723
|
-
for (const t of
|
|
1724
|
-
|
|
1725
|
-
return
|
|
1721
|
+
function _e(n) {
|
|
1722
|
+
const e = /* @__PURE__ */ new Map();
|
|
1723
|
+
for (const t of n)
|
|
1724
|
+
e.set(t.toLowerCase(), t);
|
|
1725
|
+
return e;
|
|
1726
1726
|
}
|
|
1727
|
-
const
|
|
1727
|
+
const Ye = [
|
|
1728
1728
|
"altGlyph",
|
|
1729
1729
|
"altGlyphDef",
|
|
1730
1730
|
"altGlyphItem",
|
|
@@ -1764,9 +1764,9 @@ const Yn = [
|
|
|
1764
1764
|
"solidColor",
|
|
1765
1765
|
"textArea",
|
|
1766
1766
|
"textPath"
|
|
1767
|
-
],
|
|
1768
|
-
|
|
1769
|
-
const
|
|
1767
|
+
], Xe = Qn(Fe, "div");
|
|
1768
|
+
Qn(We, "g", Ye);
|
|
1769
|
+
const Ze = [
|
|
1770
1770
|
"AElig",
|
|
1771
1771
|
"AMP",
|
|
1772
1772
|
"Aacute",
|
|
@@ -1873,7 +1873,7 @@ const Zn = [
|
|
|
1873
1873
|
"yacute",
|
|
1874
1874
|
"yen",
|
|
1875
1875
|
"yuml"
|
|
1876
|
-
],
|
|
1876
|
+
], In = {
|
|
1877
1877
|
0: "�",
|
|
1878
1878
|
128: "€",
|
|
1879
1879
|
130: "‚",
|
|
@@ -1903,29 +1903,29 @@ const Zn = [
|
|
|
1903
1903
|
158: "ž",
|
|
1904
1904
|
159: "Ÿ"
|
|
1905
1905
|
};
|
|
1906
|
-
function
|
|
1907
|
-
const
|
|
1908
|
-
return
|
|
1906
|
+
function ne(n) {
|
|
1907
|
+
const e = typeof n == "string" ? n.charCodeAt(0) : n;
|
|
1908
|
+
return e >= 48 && e <= 57;
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1911
|
-
const
|
|
1912
|
-
return
|
|
1910
|
+
function Je(n) {
|
|
1911
|
+
const e = typeof n == "string" ? n.charCodeAt(0) : n;
|
|
1912
|
+
return e >= 97 && e <= 102 || e >= 65 && e <= 70 || e >= 48 && e <= 57;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1915
|
-
const
|
|
1916
|
-
return
|
|
1914
|
+
function Qe(n) {
|
|
1915
|
+
const e = typeof n == "string" ? n.charCodeAt(0) : n;
|
|
1916
|
+
return e >= 97 && e <= 122 || e >= 65 && e <= 90;
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1919
|
-
return
|
|
1918
|
+
function Un(n) {
|
|
1919
|
+
return Qe(n) || ne(n);
|
|
1920
1920
|
}
|
|
1921
|
-
const
|
|
1922
|
-
function
|
|
1923
|
-
const
|
|
1924
|
-
|
|
1925
|
-
const t =
|
|
1926
|
-
return t.charCodeAt(t.length - 1) === 59 &&
|
|
1921
|
+
const zn = document.createElement("i");
|
|
1922
|
+
function Bn(n) {
|
|
1923
|
+
const e = "&" + n + ";";
|
|
1924
|
+
zn.innerHTML = e;
|
|
1925
|
+
const t = zn.textContent;
|
|
1926
|
+
return t.charCodeAt(t.length - 1) === 59 && n !== "semi" || t === e ? !1 : t;
|
|
1927
1927
|
}
|
|
1928
|
-
const
|
|
1928
|
+
const nt = [
|
|
1929
1929
|
"",
|
|
1930
1930
|
/* 1: Non terminated (named) */
|
|
1931
1931
|
"Named character references must be terminated by a semicolon",
|
|
@@ -1942,65 +1942,65 @@ const et = [
|
|
|
1942
1942
|
/* 7: Prohibited (numeric) */
|
|
1943
1943
|
"Numeric character references cannot be outside the permissible Unicode range"
|
|
1944
1944
|
];
|
|
1945
|
-
function
|
|
1945
|
+
function et(n, e) {
|
|
1946
1946
|
const t = {}, l = typeof t.additional == "string" ? t.additional.charCodeAt(0) : t.additional, o = [];
|
|
1947
1947
|
let a = 0, r = -1, c = "", u, s;
|
|
1948
1948
|
t.position && ("start" in t.position || "indent" in t.position ? (s = t.position.indent, u = t.position.start) : u = t.position);
|
|
1949
|
-
let m = (u ? u.line : 0) || 1,
|
|
1950
|
-
for (a--; ++a <=
|
|
1951
|
-
if (
|
|
1952
|
-
const
|
|
1953
|
-
if (
|
|
1954
|
-
c += String.fromCharCode(
|
|
1949
|
+
let m = (u ? u.line : 0) || 1, v = (u ? u.column : 0) || 1, b = O(), g;
|
|
1950
|
+
for (a--; ++a <= n.length; )
|
|
1951
|
+
if (g === 10 && (v = (s ? s[r] : 0) || 1), g = n.charCodeAt(a), g === 38) {
|
|
1952
|
+
const p = n.charCodeAt(a + 1);
|
|
1953
|
+
if (p === 9 || p === 10 || p === 12 || p === 32 || p === 38 || p === 60 || Number.isNaN(p) || l && p === l) {
|
|
1954
|
+
c += String.fromCharCode(g), v++;
|
|
1955
1955
|
continue;
|
|
1956
1956
|
}
|
|
1957
|
-
const
|
|
1958
|
-
let
|
|
1959
|
-
if (
|
|
1960
|
-
|
|
1961
|
-
const d =
|
|
1962
|
-
d === 88 || d === 120 ? (S = "hexadecimal",
|
|
1957
|
+
const k = a + 1;
|
|
1958
|
+
let P = k, h = k, S;
|
|
1959
|
+
if (p === 35) {
|
|
1960
|
+
h = ++P;
|
|
1961
|
+
const d = n.charCodeAt(h);
|
|
1962
|
+
d === 88 || d === 120 ? (S = "hexadecimal", h = ++P) : S = "decimal";
|
|
1963
1963
|
} else
|
|
1964
1964
|
S = "named";
|
|
1965
|
-
let
|
|
1966
|
-
const U = S === "named" ?
|
|
1967
|
-
for (
|
|
1968
|
-
const d =
|
|
1965
|
+
let y = "", C = "", L = "";
|
|
1966
|
+
const U = S === "named" ? Un : S === "decimal" ? ne : Je;
|
|
1967
|
+
for (h--; ++h <= n.length; ) {
|
|
1968
|
+
const d = n.charCodeAt(h);
|
|
1969
1969
|
if (!U(d))
|
|
1970
1970
|
break;
|
|
1971
|
-
|
|
1971
|
+
L += String.fromCharCode(d), S === "named" && Ze.includes(L) && (y = L, C = Bn(L));
|
|
1972
1972
|
}
|
|
1973
|
-
let R =
|
|
1973
|
+
let R = n.charCodeAt(h) === 59;
|
|
1974
1974
|
if (R) {
|
|
1975
|
-
|
|
1976
|
-
const d = S === "named" ?
|
|
1977
|
-
d && (
|
|
1975
|
+
h++;
|
|
1976
|
+
const d = S === "named" ? Bn(L) : !1;
|
|
1977
|
+
d && (y = L, C = d);
|
|
1978
1978
|
}
|
|
1979
|
-
let E = 1 +
|
|
1980
|
-
if (!(!R && t.nonTerminated === !1)) if (!
|
|
1979
|
+
let E = 1 + h - k, D = "";
|
|
1980
|
+
if (!(!R && t.nonTerminated === !1)) if (!L)
|
|
1981
1981
|
S !== "named" && N(4, E);
|
|
1982
1982
|
else if (S === "named") {
|
|
1983
|
-
if (R && !
|
|
1983
|
+
if (R && !C)
|
|
1984
1984
|
N(5, 1);
|
|
1985
|
-
else if (
|
|
1986
|
-
const d =
|
|
1985
|
+
else if (y !== L && (h = P + y.length, E = 1 + h - P, R = !1), !R) {
|
|
1986
|
+
const d = y ? 1 : 3;
|
|
1987
1987
|
if (t.attribute) {
|
|
1988
|
-
const j =
|
|
1989
|
-
j === 61 ? (N(d, E),
|
|
1988
|
+
const j = n.charCodeAt(h);
|
|
1989
|
+
j === 61 ? (N(d, E), C = "") : Un(j) ? C = "" : N(d, E);
|
|
1990
1990
|
} else
|
|
1991
1991
|
N(d, E);
|
|
1992
1992
|
}
|
|
1993
|
-
D =
|
|
1993
|
+
D = C;
|
|
1994
1994
|
} else {
|
|
1995
1995
|
R || N(2, E);
|
|
1996
1996
|
let d = Number.parseInt(
|
|
1997
|
-
|
|
1997
|
+
L,
|
|
1998
1998
|
S === "hexadecimal" ? 16 : 10
|
|
1999
1999
|
);
|
|
2000
2000
|
if (tt(d))
|
|
2001
2001
|
N(7, E), D = "�";
|
|
2002
|
-
else if (d in
|
|
2003
|
-
N(6, E), D =
|
|
2002
|
+
else if (d in In)
|
|
2003
|
+
N(6, E), D = In[d];
|
|
2004
2004
|
else {
|
|
2005
2005
|
let j = "";
|
|
2006
2006
|
lt(d) && N(6, E), d > 65535 && (d -= 65536, j += String.fromCharCode(
|
|
@@ -2009,49 +2009,49 @@ function nt(e, n) {
|
|
|
2009
2009
|
}
|
|
2010
2010
|
}
|
|
2011
2011
|
if (D) {
|
|
2012
|
-
|
|
2013
|
-
const d =
|
|
2012
|
+
w(), b = O(), a = h - 1, v += h - k + 1, o.push(D);
|
|
2013
|
+
const d = O();
|
|
2014
2014
|
d.offset++, t.reference && t.reference.call(
|
|
2015
2015
|
t.referenceContext || void 0,
|
|
2016
2016
|
D,
|
|
2017
|
-
{ start:
|
|
2018
|
-
|
|
2019
|
-
),
|
|
2017
|
+
{ start: b, end: d },
|
|
2018
|
+
n.slice(k - 1, h)
|
|
2019
|
+
), b = d;
|
|
2020
2020
|
} else
|
|
2021
|
-
|
|
2021
|
+
L = n.slice(k - 1, h), c += L, v += L.length, a = h - 1;
|
|
2022
2022
|
} else
|
|
2023
|
-
|
|
2023
|
+
g === 10 && (m++, r++, v = 0), Number.isNaN(g) ? w() : (c += String.fromCharCode(g), v++);
|
|
2024
2024
|
return o.join("");
|
|
2025
|
-
function
|
|
2025
|
+
function O() {
|
|
2026
2026
|
return {
|
|
2027
2027
|
line: m,
|
|
2028
|
-
column:
|
|
2028
|
+
column: v,
|
|
2029
2029
|
offset: a + ((u ? u.offset : 0) || 0)
|
|
2030
2030
|
};
|
|
2031
2031
|
}
|
|
2032
|
-
function N(
|
|
2033
|
-
let
|
|
2034
|
-
t.warning && (
|
|
2032
|
+
function N(p, k) {
|
|
2033
|
+
let P;
|
|
2034
|
+
t.warning && (P = O(), P.column += k, P.offset += k, t.warning.call(
|
|
2035
2035
|
t.warningContext || void 0,
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2036
|
+
nt[p],
|
|
2037
|
+
P,
|
|
2038
|
+
p
|
|
2039
2039
|
));
|
|
2040
2040
|
}
|
|
2041
|
-
function
|
|
2041
|
+
function w() {
|
|
2042
2042
|
c && (o.push(c), t.text && t.text.call(t.textContext || void 0, c, {
|
|
2043
|
-
start:
|
|
2044
|
-
end:
|
|
2043
|
+
start: b,
|
|
2044
|
+
end: O()
|
|
2045
2045
|
}), c = "");
|
|
2046
2046
|
}
|
|
2047
2047
|
}
|
|
2048
|
-
function tt(
|
|
2049
|
-
return
|
|
2048
|
+
function tt(n) {
|
|
2049
|
+
return n >= 55296 && n <= 57343 || n > 1114111;
|
|
2050
2050
|
}
|
|
2051
|
-
function lt(
|
|
2052
|
-
return
|
|
2051
|
+
function lt(n) {
|
|
2052
|
+
return n >= 1 && n <= 8 || n === 11 || n >= 13 && n <= 31 || n >= 127 && n <= 159 || n >= 64976 && n <= 65007 || (n & 65535) === 65535 || (n & 65535) === 65534;
|
|
2053
2053
|
}
|
|
2054
|
-
var ot = 0,
|
|
2054
|
+
var ot = 0, on = {}, M = {
|
|
2055
2055
|
/**
|
|
2056
2056
|
* A namespace for utility methods.
|
|
2057
2057
|
*
|
|
@@ -2078,8 +2078,8 @@ var ot = 0, oe = {}, M = {
|
|
|
2078
2078
|
* type(String) === 'Function'
|
|
2079
2079
|
* type(/abc+/) === 'RegExp'
|
|
2080
2080
|
*/
|
|
2081
|
-
type: function(
|
|
2082
|
-
return Object.prototype.toString.call(
|
|
2081
|
+
type: function(n) {
|
|
2082
|
+
return Object.prototype.toString.call(n).slice(8, -1);
|
|
2083
2083
|
},
|
|
2084
2084
|
/**
|
|
2085
2085
|
* Returns a unique number for the given object. Later calls will still return the same number.
|
|
@@ -2087,8 +2087,8 @@ var ot = 0, oe = {}, M = {
|
|
|
2087
2087
|
* @param {Object} obj
|
|
2088
2088
|
* @returns {number}
|
|
2089
2089
|
*/
|
|
2090
|
-
objId: function(
|
|
2091
|
-
return
|
|
2090
|
+
objId: function(n) {
|
|
2091
|
+
return n.__id || Object.defineProperty(n, "__id", { value: ++ot }), n.__id;
|
|
2092
2092
|
},
|
|
2093
2093
|
/**
|
|
2094
2094
|
* Creates a deep clone of the given object.
|
|
@@ -2100,31 +2100,31 @@ var ot = 0, oe = {}, M = {
|
|
|
2100
2100
|
* @returns {T}
|
|
2101
2101
|
* @template T
|
|
2102
2102
|
*/
|
|
2103
|
-
clone: function e
|
|
2103
|
+
clone: function n(e, t) {
|
|
2104
2104
|
t = t || {};
|
|
2105
2105
|
var l, o;
|
|
2106
|
-
switch (M.util.type(
|
|
2106
|
+
switch (M.util.type(e)) {
|
|
2107
2107
|
case "Object":
|
|
2108
|
-
if (o = M.util.objId(
|
|
2108
|
+
if (o = M.util.objId(e), t[o])
|
|
2109
2109
|
return t[o];
|
|
2110
2110
|
l = /** @type {Record<string, any>} */
|
|
2111
2111
|
{}, t[o] = l;
|
|
2112
|
-
for (var a in
|
|
2113
|
-
|
|
2112
|
+
for (var a in e)
|
|
2113
|
+
e.hasOwnProperty(a) && (l[a] = n(e[a], t));
|
|
2114
2114
|
return (
|
|
2115
2115
|
/** @type {any} */
|
|
2116
2116
|
l
|
|
2117
2117
|
);
|
|
2118
2118
|
case "Array":
|
|
2119
|
-
return o = M.util.objId(
|
|
2120
|
-
|
|
2119
|
+
return o = M.util.objId(e), t[o] ? t[o] : (l = [], t[o] = l, /** @type {any} */
|
|
2120
|
+
e.forEach(
|
|
2121
2121
|
function(r, c) {
|
|
2122
|
-
l[c] =
|
|
2122
|
+
l[c] = n(r, t);
|
|
2123
2123
|
}
|
|
2124
2124
|
), /** @type {any} */
|
|
2125
2125
|
l);
|
|
2126
2126
|
default:
|
|
2127
|
-
return
|
|
2127
|
+
return e;
|
|
2128
2128
|
}
|
|
2129
2129
|
}
|
|
2130
2130
|
},
|
|
@@ -2139,10 +2139,10 @@ var ot = 0, oe = {}, M = {
|
|
|
2139
2139
|
/**
|
|
2140
2140
|
* The grammar for plain, unformatted text.
|
|
2141
2141
|
*/
|
|
2142
|
-
plain:
|
|
2143
|
-
plaintext:
|
|
2144
|
-
text:
|
|
2145
|
-
txt:
|
|
2142
|
+
plain: on,
|
|
2143
|
+
plaintext: on,
|
|
2144
|
+
text: on,
|
|
2145
|
+
txt: on,
|
|
2146
2146
|
/**
|
|
2147
2147
|
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
2148
2148
|
*
|
|
@@ -2171,10 +2171,10 @@ var ot = 0, oe = {}, M = {
|
|
|
2171
2171
|
* 'color': /\b(?:red|green|blue)\b/
|
|
2172
2172
|
* });
|
|
2173
2173
|
*/
|
|
2174
|
-
extend: function(
|
|
2175
|
-
var t = M.util.clone(M.languages[
|
|
2176
|
-
for (var l in
|
|
2177
|
-
t[l] =
|
|
2174
|
+
extend: function(n, e) {
|
|
2175
|
+
var t = M.util.clone(M.languages[n]);
|
|
2176
|
+
for (var l in e)
|
|
2177
|
+
t[l] = e[l];
|
|
2178
2178
|
return t;
|
|
2179
2179
|
},
|
|
2180
2180
|
/**
|
|
@@ -2252,31 +2252,31 @@ var ot = 0, oe = {}, M = {
|
|
|
2252
2252
|
* @returns {Grammar} The new grammar object.
|
|
2253
2253
|
* @public
|
|
2254
2254
|
*/
|
|
2255
|
-
insertBefore: function(
|
|
2255
|
+
insertBefore: function(n, e, t, l) {
|
|
2256
2256
|
l = l || /** @type {any} */
|
|
2257
2257
|
M.languages;
|
|
2258
|
-
var o = l[
|
|
2258
|
+
var o = l[n], a = {};
|
|
2259
2259
|
for (var r in o)
|
|
2260
2260
|
if (o.hasOwnProperty(r)) {
|
|
2261
|
-
if (r ==
|
|
2261
|
+
if (r == e)
|
|
2262
2262
|
for (var c in t)
|
|
2263
2263
|
t.hasOwnProperty(c) && (a[c] = t[c]);
|
|
2264
2264
|
t.hasOwnProperty(r) || (a[r] = o[r]);
|
|
2265
2265
|
}
|
|
2266
|
-
var u = l[
|
|
2267
|
-
return l[
|
|
2268
|
-
m === u && s !=
|
|
2266
|
+
var u = l[n];
|
|
2267
|
+
return l[n] = a, M.languages.DFS(M.languages, function(s, m) {
|
|
2268
|
+
m === u && s != n && (this[s] = a);
|
|
2269
2269
|
}), a;
|
|
2270
2270
|
},
|
|
2271
2271
|
// Traverse a language definition with Depth First Search
|
|
2272
|
-
DFS: function e
|
|
2272
|
+
DFS: function n(e, t, l, o) {
|
|
2273
2273
|
o = o || {};
|
|
2274
2274
|
var a = M.util.objId;
|
|
2275
|
-
for (var r in
|
|
2276
|
-
if (
|
|
2277
|
-
t.call(
|
|
2278
|
-
var c =
|
|
2279
|
-
u === "Object" && !o[a(c)] ? (o[a(c)] = !0,
|
|
2275
|
+
for (var r in e)
|
|
2276
|
+
if (e.hasOwnProperty(r)) {
|
|
2277
|
+
t.call(e, r, e[r], l || r);
|
|
2278
|
+
var c = e[r], u = M.util.type(c);
|
|
2279
|
+
u === "Object" && !o[a(c)] ? (o[a(c)] = !0, n(c, t, null, o)) : u === "Array" && !o[a(c)] && (o[a(c)] = !0, n(c, t, r, o));
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
2282
|
},
|
|
@@ -2301,10 +2301,10 @@ var ot = 0, oe = {}, M = {
|
|
|
2301
2301
|
* @example
|
|
2302
2302
|
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
2303
2303
|
*/
|
|
2304
|
-
highlight: function(
|
|
2304
|
+
highlight: function(n, e, t) {
|
|
2305
2305
|
var l = {
|
|
2306
|
-
code:
|
|
2307
|
-
grammar:
|
|
2306
|
+
code: n,
|
|
2307
|
+
grammar: e,
|
|
2308
2308
|
language: t
|
|
2309
2309
|
};
|
|
2310
2310
|
if (M.hooks.run("before-tokenize", l), !l.grammar)
|
|
@@ -2335,15 +2335,15 @@ var ot = 0, oe = {}, M = {
|
|
|
2335
2335
|
* }
|
|
2336
2336
|
* });
|
|
2337
2337
|
*/
|
|
2338
|
-
tokenize: function(
|
|
2339
|
-
var t =
|
|
2338
|
+
tokenize: function(n, e) {
|
|
2339
|
+
var t = e.rest;
|
|
2340
2340
|
if (t) {
|
|
2341
2341
|
for (var l in t)
|
|
2342
|
-
|
|
2343
|
-
delete
|
|
2342
|
+
e[l] = t[l];
|
|
2343
|
+
delete e.rest;
|
|
2344
2344
|
}
|
|
2345
2345
|
var o = new at();
|
|
2346
|
-
return
|
|
2346
|
+
return rn(o, o.head, n), ee(n, o, e, o.head, 0), rt(o);
|
|
2347
2347
|
},
|
|
2348
2348
|
/**
|
|
2349
2349
|
* @namespace
|
|
@@ -2364,9 +2364,9 @@ var ot = 0, oe = {}, M = {
|
|
|
2364
2364
|
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
2365
2365
|
* @public
|
|
2366
2366
|
*/
|
|
2367
|
-
add: function(
|
|
2367
|
+
add: function(n, e) {
|
|
2368
2368
|
var t = M.hooks.all;
|
|
2369
|
-
t[
|
|
2369
|
+
t[n] = t[n] || [], t[n].push(e);
|
|
2370
2370
|
},
|
|
2371
2371
|
/**
|
|
2372
2372
|
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
@@ -2377,28 +2377,28 @@ var ot = 0, oe = {}, M = {
|
|
|
2377
2377
|
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
2378
2378
|
* @public
|
|
2379
2379
|
*/
|
|
2380
|
-
run: function(
|
|
2381
|
-
var t = M.hooks.all[
|
|
2380
|
+
run: function(n, e) {
|
|
2381
|
+
var t = M.hooks.all[n];
|
|
2382
2382
|
if (!(!t || !t.length))
|
|
2383
2383
|
for (var l = 0, o; o = t[l++]; )
|
|
2384
|
-
o(
|
|
2384
|
+
o(e);
|
|
2385
2385
|
}
|
|
2386
2386
|
},
|
|
2387
2387
|
Token: X
|
|
2388
2388
|
};
|
|
2389
|
-
function X(
|
|
2390
|
-
this.type =
|
|
2389
|
+
function X(n, e, t, l) {
|
|
2390
|
+
this.type = n, this.content = e, this.alias = t, this.length = (l || "").length | 0;
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2393
|
-
|
|
2394
|
-
var o =
|
|
2392
|
+
function Hn(n, e, t, l) {
|
|
2393
|
+
n.lastIndex = e;
|
|
2394
|
+
var o = n.exec(t);
|
|
2395
2395
|
if (o && l && o[1]) {
|
|
2396
2396
|
var a = o[1].length;
|
|
2397
2397
|
o.index += a, o[0] = o[0].slice(a);
|
|
2398
2398
|
}
|
|
2399
2399
|
return o;
|
|
2400
2400
|
}
|
|
2401
|
-
function
|
|
2401
|
+
function ee(n, e, t, l, o, a) {
|
|
2402
2402
|
for (var r in t)
|
|
2403
2403
|
if (!(!t.hasOwnProperty(r) || !t[r])) {
|
|
2404
2404
|
var c = t[r];
|
|
@@ -2406,51 +2406,51 @@ function en(e, n, t, l, o, a) {
|
|
|
2406
2406
|
for (var u = 0; u < c.length; ++u) {
|
|
2407
2407
|
if (a && a.cause == r + "," + u)
|
|
2408
2408
|
return;
|
|
2409
|
-
var s = c[u], m = s.inside,
|
|
2410
|
-
if (
|
|
2411
|
-
var
|
|
2412
|
-
s.pattern = RegExp(s.pattern.source,
|
|
2409
|
+
var s = c[u], m = s.inside, v = !!s.lookbehind, b = !!s.greedy, g = s.alias;
|
|
2410
|
+
if (b && !s.pattern.global) {
|
|
2411
|
+
var O = s.pattern.toString().match(/[imsuy]*$/)[0];
|
|
2412
|
+
s.pattern = RegExp(s.pattern.source, O + "g");
|
|
2413
2413
|
}
|
|
2414
|
-
for (var N = s.pattern || s,
|
|
2415
|
-
var
|
|
2416
|
-
if (
|
|
2414
|
+
for (var N = s.pattern || s, w = l.next, p = o; w !== e.tail && !(a && p >= a.reach); p += w.value.length, w = w.next) {
|
|
2415
|
+
var k = w.value;
|
|
2416
|
+
if (e.length > n.length)
|
|
2417
2417
|
return;
|
|
2418
|
-
if (!(
|
|
2419
|
-
var
|
|
2420
|
-
if (
|
|
2421
|
-
if (
|
|
2418
|
+
if (!(k instanceof X)) {
|
|
2419
|
+
var P = 1, h;
|
|
2420
|
+
if (b) {
|
|
2421
|
+
if (h = Hn(N, p, n, v), !h || h.index >= n.length)
|
|
2422
2422
|
break;
|
|
2423
|
-
var
|
|
2424
|
-
for (
|
|
2425
|
-
|
|
2426
|
-
if (
|
|
2423
|
+
var L = h.index, S = h.index + h[0].length, y = p;
|
|
2424
|
+
for (y += w.value.length; L >= y; )
|
|
2425
|
+
w = w.next, y += w.value.length;
|
|
2426
|
+
if (y -= w.value.length, p = y, w.value instanceof X)
|
|
2427
2427
|
continue;
|
|
2428
|
-
for (var
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
} else if (
|
|
2428
|
+
for (var C = w; C !== e.tail && (y < S || typeof C.value == "string"); C = C.next)
|
|
2429
|
+
P++, y += C.value.length;
|
|
2430
|
+
P--, k = n.slice(p, y), h.index -= p;
|
|
2431
|
+
} else if (h = Hn(N, 0, k, v), !h)
|
|
2432
2432
|
continue;
|
|
2433
|
-
var
|
|
2433
|
+
var L = h.index, U = h[0], R = k.slice(0, L), E = k.slice(L + U.length), D = p + k.length;
|
|
2434
2434
|
a && D > a.reach && (a.reach = D);
|
|
2435
|
-
var d =
|
|
2436
|
-
R && (d =
|
|
2435
|
+
var d = w.prev;
|
|
2436
|
+
R && (d = rn(e, d, R), p += R.length), it(e, d, P);
|
|
2437
2437
|
var j = new X(
|
|
2438
2438
|
r,
|
|
2439
2439
|
m ? M.tokenize(U, m) : U,
|
|
2440
|
-
|
|
2440
|
+
g,
|
|
2441
2441
|
U
|
|
2442
2442
|
);
|
|
2443
|
-
if (
|
|
2443
|
+
if (w = rn(e, d, j), E && rn(e, w, E), P > 1) {
|
|
2444
2444
|
var B = {
|
|
2445
2445
|
cause: r + "," + u,
|
|
2446
2446
|
reach: D
|
|
2447
2447
|
};
|
|
2448
|
-
|
|
2449
|
-
e,
|
|
2448
|
+
ee(
|
|
2450
2449
|
n,
|
|
2450
|
+
e,
|
|
2451
2451
|
t,
|
|
2452
|
-
|
|
2453
|
-
|
|
2452
|
+
w.prev,
|
|
2453
|
+
p,
|
|
2454
2454
|
B
|
|
2455
2455
|
), a && B.reach > a.reach && (a.reach = B.reach);
|
|
2456
2456
|
}
|
|
@@ -2460,43 +2460,43 @@ function en(e, n, t, l, o, a) {
|
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
2462
|
function at() {
|
|
2463
|
-
var
|
|
2464
|
-
|
|
2463
|
+
var n = { value: null, prev: null, next: null }, e = { value: null, prev: n, next: null };
|
|
2464
|
+
n.next = e, this.head = n, this.tail = e, this.length = 0;
|
|
2465
2465
|
}
|
|
2466
|
-
function
|
|
2467
|
-
var l =
|
|
2468
|
-
return
|
|
2466
|
+
function rn(n, e, t) {
|
|
2467
|
+
var l = e.next, o = { value: t, prev: e, next: l };
|
|
2468
|
+
return e.next = o, l.prev = o, n.length++, o;
|
|
2469
2469
|
}
|
|
2470
|
-
function it(
|
|
2471
|
-
for (var l =
|
|
2470
|
+
function it(n, e, t) {
|
|
2471
|
+
for (var l = e.next, o = 0; o < t && l !== n.tail; o++)
|
|
2472
2472
|
l = l.next;
|
|
2473
|
-
|
|
2473
|
+
e.next = l, l.prev = e, n.length -= o;
|
|
2474
2474
|
}
|
|
2475
|
-
function rt(
|
|
2476
|
-
for (var
|
|
2477
|
-
|
|
2478
|
-
return
|
|
2475
|
+
function rt(n) {
|
|
2476
|
+
for (var e = [], t = n.head.next; t !== n.tail; )
|
|
2477
|
+
e.push(t.value), t = t.next;
|
|
2478
|
+
return e;
|
|
2479
2479
|
}
|
|
2480
|
-
const
|
|
2481
|
-
function
|
|
2480
|
+
const te = M;
|
|
2481
|
+
function le() {
|
|
2482
2482
|
}
|
|
2483
|
-
|
|
2484
|
-
const T = new
|
|
2483
|
+
le.prototype = te;
|
|
2484
|
+
const T = new le();
|
|
2485
2485
|
T.highlight = ct;
|
|
2486
2486
|
T.register = ut;
|
|
2487
2487
|
T.alias = st;
|
|
2488
2488
|
T.registered = ft;
|
|
2489
2489
|
T.listLanguages = dt;
|
|
2490
2490
|
T.util.encode = gt;
|
|
2491
|
-
T.Token.stringify =
|
|
2492
|
-
function ct(
|
|
2493
|
-
if (typeof
|
|
2494
|
-
throw new TypeError("Expected `string` for `value`, got `" +
|
|
2491
|
+
T.Token.stringify = yn;
|
|
2492
|
+
function ct(n, e) {
|
|
2493
|
+
if (typeof n != "string")
|
|
2494
|
+
throw new TypeError("Expected `string` for `value`, got `" + n + "`");
|
|
2495
2495
|
let t, l;
|
|
2496
|
-
if (
|
|
2497
|
-
t =
|
|
2496
|
+
if (e && typeof e == "object")
|
|
2497
|
+
t = e;
|
|
2498
2498
|
else {
|
|
2499
|
-
if (l =
|
|
2499
|
+
if (l = e, typeof l != "string")
|
|
2500
2500
|
throw new TypeError("Expected `string` for `name`, got `" + l + "`");
|
|
2501
2501
|
if (Object.hasOwn(T.languages, l))
|
|
2502
2502
|
t = T.languages[l];
|
|
@@ -2506,18 +2506,18 @@ function ct(e, n) {
|
|
|
2506
2506
|
return {
|
|
2507
2507
|
type: "root",
|
|
2508
2508
|
// @ts-expect-error: we hacked Prism to accept and return the things we want.
|
|
2509
|
-
children:
|
|
2509
|
+
children: te.highlight.call(T, n, t, l)
|
|
2510
2510
|
};
|
|
2511
2511
|
}
|
|
2512
|
-
function ut(
|
|
2513
|
-
if (typeof
|
|
2514
|
-
throw new Error("Expected `function` for `syntax`, got `" +
|
|
2515
|
-
Object.hasOwn(T.languages,
|
|
2512
|
+
function ut(n) {
|
|
2513
|
+
if (typeof n != "function" || !n.displayName)
|
|
2514
|
+
throw new Error("Expected `function` for `syntax`, got `" + n + "`");
|
|
2515
|
+
Object.hasOwn(T.languages, n.displayName) || n(T);
|
|
2516
2516
|
}
|
|
2517
|
-
function st(
|
|
2517
|
+
function st(n, e) {
|
|
2518
2518
|
const t = T.languages;
|
|
2519
2519
|
let l = {};
|
|
2520
|
-
typeof
|
|
2520
|
+
typeof n == "string" ? e && (l[n] = e) : l = n;
|
|
2521
2521
|
let o;
|
|
2522
2522
|
for (o in l)
|
|
2523
2523
|
if (Object.hasOwn(l, o)) {
|
|
@@ -2527,69 +2527,69 @@ function st(e, n) {
|
|
|
2527
2527
|
t[r[c]] = t[o];
|
|
2528
2528
|
}
|
|
2529
2529
|
}
|
|
2530
|
-
function ft(
|
|
2531
|
-
if (typeof
|
|
2530
|
+
function ft(n) {
|
|
2531
|
+
if (typeof n != "string")
|
|
2532
2532
|
throw new TypeError(
|
|
2533
|
-
"Expected `string` for `aliasOrLanguage`, got `" +
|
|
2533
|
+
"Expected `string` for `aliasOrLanguage`, got `" + n + "`"
|
|
2534
2534
|
);
|
|
2535
|
-
return Object.hasOwn(T.languages,
|
|
2535
|
+
return Object.hasOwn(T.languages, n);
|
|
2536
2536
|
}
|
|
2537
2537
|
function dt() {
|
|
2538
|
-
const
|
|
2538
|
+
const n = T.languages, e = [];
|
|
2539
2539
|
let t;
|
|
2540
|
-
for (t in
|
|
2541
|
-
Object.hasOwn(
|
|
2542
|
-
return
|
|
2540
|
+
for (t in n)
|
|
2541
|
+
Object.hasOwn(n, t) && typeof n[t] == "object" && e.push(t);
|
|
2542
|
+
return e;
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2545
|
-
if (typeof
|
|
2546
|
-
return { type: "text", value:
|
|
2547
|
-
if (Array.isArray(
|
|
2544
|
+
function yn(n, e) {
|
|
2545
|
+
if (typeof n == "string")
|
|
2546
|
+
return { type: "text", value: n };
|
|
2547
|
+
if (Array.isArray(n)) {
|
|
2548
2548
|
const l = [];
|
|
2549
2549
|
let o = -1;
|
|
2550
|
-
for (; ++o <
|
|
2551
|
-
|
|
2550
|
+
for (; ++o < n.length; )
|
|
2551
|
+
n[o] !== null && n[o] !== void 0 && n[o] !== "" && l.push(
|
|
2552
2552
|
/** @type {Element | Text} */
|
|
2553
|
-
|
|
2553
|
+
yn(n[o], e)
|
|
2554
2554
|
);
|
|
2555
2555
|
return l;
|
|
2556
2556
|
}
|
|
2557
2557
|
const t = {
|
|
2558
2558
|
attributes: {},
|
|
2559
|
-
classes: ["token",
|
|
2560
|
-
content:
|
|
2561
|
-
language:
|
|
2559
|
+
classes: ["token", n.type],
|
|
2560
|
+
content: yn(n.content, e),
|
|
2561
|
+
language: e,
|
|
2562
2562
|
tag: "span",
|
|
2563
|
-
type:
|
|
2563
|
+
type: n.type
|
|
2564
2564
|
};
|
|
2565
|
-
return
|
|
2566
|
-
...typeof
|
|
2567
|
-
), T.hooks.run("wrap", t),
|
|
2565
|
+
return n.alias && t.classes.push(
|
|
2566
|
+
...typeof n.alias == "string" ? [n.alias] : n.alias
|
|
2567
|
+
), T.hooks.run("wrap", t), Xe(
|
|
2568
2568
|
t.tag + "." + t.classes.join("."),
|
|
2569
2569
|
pt(t.attributes),
|
|
2570
2570
|
t.content
|
|
2571
2571
|
);
|
|
2572
2572
|
}
|
|
2573
|
-
function gt(
|
|
2574
|
-
return
|
|
2573
|
+
function gt(n) {
|
|
2574
|
+
return n;
|
|
2575
2575
|
}
|
|
2576
|
-
function pt(
|
|
2577
|
-
let
|
|
2578
|
-
for (
|
|
2579
|
-
Object.hasOwn(
|
|
2580
|
-
return
|
|
2576
|
+
function pt(n) {
|
|
2577
|
+
let e;
|
|
2578
|
+
for (e in n)
|
|
2579
|
+
Object.hasOwn(n, e) && (n[e] = et(n[e]));
|
|
2580
|
+
return n;
|
|
2581
2581
|
}
|
|
2582
|
-
var
|
|
2583
|
-
|
|
2584
|
-
return T.register(
|
|
2582
|
+
var nn = Me(T, {});
|
|
2583
|
+
nn.registerLanguage = function(n, e) {
|
|
2584
|
+
return T.register(e);
|
|
2585
2585
|
};
|
|
2586
|
-
|
|
2587
|
-
return T.alias(
|
|
2586
|
+
nn.alias = function(n, e) {
|
|
2587
|
+
return T.alias(n, e);
|
|
2588
2588
|
};
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
function
|
|
2592
|
-
(function(
|
|
2589
|
+
wn.displayName = "yaml";
|
|
2590
|
+
wn.aliases = ["yml"];
|
|
2591
|
+
function wn(n) {
|
|
2592
|
+
(function(e) {
|
|
2593
2593
|
var t = /[*&][^\s[\]{},]+/, l = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/, o = "(?:" + l.source + "(?:[ ]+" + t.source + ")?|" + t.source + "(?:[ ]+" + l.source + ")?)", a = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(
|
|
2594
2594
|
/<PLAIN>/g,
|
|
2595
2595
|
function() {
|
|
@@ -2605,7 +2605,7 @@ function be(e) {
|
|
|
2605
2605
|
});
|
|
2606
2606
|
return RegExp(m, s);
|
|
2607
2607
|
}
|
|
2608
|
-
|
|
2608
|
+
e.languages.yaml = {
|
|
2609
2609
|
scalar: {
|
|
2610
2610
|
pattern: RegExp(
|
|
2611
2611
|
/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(
|
|
@@ -2668,11 +2668,11 @@ function be(e) {
|
|
|
2668
2668
|
tag: l,
|
|
2669
2669
|
important: t,
|
|
2670
2670
|
punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
|
|
2671
|
-
},
|
|
2672
|
-
})(
|
|
2671
|
+
}, e.languages.yml = e.languages.yaml;
|
|
2672
|
+
})(n);
|
|
2673
2673
|
}
|
|
2674
|
-
const
|
|
2675
|
-
|
|
2674
|
+
const xn = (n) => {
|
|
2675
|
+
n.languages.cedar = {
|
|
2676
2676
|
comment: /\/\/.*/,
|
|
2677
2677
|
// Greedy so an operator or keyword inside a quoted id, `"like-this"`, stays string.
|
|
2678
2678
|
string: {
|
|
@@ -2692,13 +2692,13 @@ const we = (e) => {
|
|
|
2692
2692
|
punctuation: /[{}[\]();,.:]/
|
|
2693
2693
|
};
|
|
2694
2694
|
};
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2695
|
+
xn.displayName = "cedar";
|
|
2696
|
+
xn.aliases = [];
|
|
2697
|
+
nn.registerLanguage("yaml", wn);
|
|
2698
|
+
nn.registerLanguage("cedar", xn);
|
|
2699
2699
|
const ht = {
|
|
2700
|
-
'code[class*="language-"]':
|
|
2701
|
-
'pre[class*="language-"]':
|
|
2700
|
+
'code[class*="language-"]': cn,
|
|
2701
|
+
'pre[class*="language-"]': cn,
|
|
2702
2702
|
comment: { color: "var(--malachite-codeblock-comment)" },
|
|
2703
2703
|
prolog: { color: "var(--malachite-codeblock-comment)" },
|
|
2704
2704
|
cdata: { color: "var(--malachite-codeblock-comment)" },
|
|
@@ -2727,58 +2727,65 @@ const ht = {
|
|
|
2727
2727
|
url: { color: "var(--malachite-codeblock-string)" },
|
|
2728
2728
|
number: { color: "var(--malachite-codeblock-number)" },
|
|
2729
2729
|
datetime: { color: "var(--malachite-codeblock-number)" }
|
|
2730
|
-
},
|
|
2731
|
-
if (
|
|
2732
|
-
return typeof
|
|
2733
|
-
`) ? { ...
|
|
2734
|
-
const
|
|
2735
|
-
if (!(
|
|
2736
|
-
return
|
|
2737
|
-
const t =
|
|
2738
|
-
return l === t ?
|
|
2730
|
+
}, oe = (n) => {
|
|
2731
|
+
if (n.type === "text")
|
|
2732
|
+
return typeof n.value == "string" && n.value.endsWith(`
|
|
2733
|
+
`) ? { ...n, value: n.value.slice(0, -1) } : n;
|
|
2734
|
+
const e = n.children;
|
|
2735
|
+
if (!(e != null && e.length))
|
|
2736
|
+
return n;
|
|
2737
|
+
const t = e[e.length - 1], l = oe(t);
|
|
2738
|
+
return l === t ? n : { ...n, children: [...e.slice(0, -1), l] };
|
|
2739
2739
|
}, bt = ({
|
|
2740
|
-
code:
|
|
2741
|
-
language:
|
|
2740
|
+
code: n,
|
|
2741
|
+
language: e,
|
|
2742
2742
|
showLineNumbers: t = !0,
|
|
2743
2743
|
wrapLines: l = !1,
|
|
2744
|
-
copyClearance: o = !1
|
|
2744
|
+
copyClearance: o = !1,
|
|
2745
|
+
decorate: a
|
|
2745
2746
|
}) => {
|
|
2746
|
-
const
|
|
2747
|
+
const r = n.split(`
|
|
2747
2748
|
`);
|
|
2748
|
-
return /* @__PURE__ */
|
|
2749
|
-
|
|
2749
|
+
return /* @__PURE__ */ Pn(
|
|
2750
|
+
nn,
|
|
2750
2751
|
{
|
|
2751
|
-
language:
|
|
2752
|
+
language: e,
|
|
2752
2753
|
style: ht,
|
|
2753
2754
|
wrapLines: !0,
|
|
2754
|
-
renderer: ({ rows:
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2755
|
+
renderer: ({ rows: u, stylesheet: s, useInlineStyles: m }) => u.map((v, b) => {
|
|
2756
|
+
const g = a == null ? void 0 : a(b), O = (g == null ? void 0 : g.lineNumber) ?? (t ? b + 1 : void 0);
|
|
2757
|
+
return /* @__PURE__ */ Pn(
|
|
2758
|
+
fe,
|
|
2759
|
+
{
|
|
2760
|
+
line: r[b] ?? "",
|
|
2761
|
+
lineNumber: O,
|
|
2762
|
+
wrap: l,
|
|
2763
|
+
decoration: g,
|
|
2764
|
+
children: vn({
|
|
2765
|
+
node: oe(v),
|
|
2766
|
+
stylesheet: s,
|
|
2767
|
+
useInlineStyles: m,
|
|
2768
|
+
key: `code-line-${b}`
|
|
2769
|
+
})
|
|
2770
|
+
},
|
|
2771
|
+
b
|
|
2772
|
+
);
|
|
2773
|
+
}),
|
|
2769
2774
|
customStyle: {
|
|
2770
|
-
...
|
|
2775
|
+
...cn,
|
|
2771
2776
|
margin: 0,
|
|
2772
2777
|
padding: "16px",
|
|
2773
2778
|
paddingRight: o ? "44px" : "16px",
|
|
2774
2779
|
overflow: "auto"
|
|
2775
2780
|
},
|
|
2776
|
-
codeTagProps: {
|
|
2777
|
-
|
|
2781
|
+
codeTagProps: {
|
|
2782
|
+
style: { ...cn, display: "block", width: "max-content", minWidth: "100%" }
|
|
2783
|
+
},
|
|
2784
|
+
children: n
|
|
2778
2785
|
}
|
|
2779
2786
|
);
|
|
2780
2787
|
};
|
|
2781
2788
|
export {
|
|
2782
2789
|
bt as default
|
|
2783
2790
|
};
|
|
2784
|
-
//# sourceMappingURL=CodeBlockHighlighter-
|
|
2791
|
+
//# sourceMappingURL=CodeBlockHighlighter-CvA6nVfU.js.map
|