@stackone/malachite 0.58.0 → 0.59.0

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.
@@ -0,0 +1,2739 @@
1
+ import { jsx as ie } from "react/jsx-runtime";
2
+ import { _ as re, a as ce } from "./index-DOugfuM3.js";
3
+ import H from "react";
4
+ function ue(n, e) {
5
+ if (n == null) return {};
6
+ var t, l, o = re(n, e);
7
+ if (Object.getOwnPropertySymbols) {
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
+ }
11
+ return o;
12
+ }
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
+ return l;
17
+ }
18
+ function se(n) {
19
+ if (Array.isArray(n)) return dn(n);
20
+ }
21
+ function fe(n) {
22
+ if (typeof Symbol < "u" && n[Symbol.iterator] != null || n["@@iterator"] != null) return Array.from(n);
23
+ }
24
+ function de(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
+ }
30
+ }
31
+ function ge() {
32
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
33
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
34
+ }
35
+ function gn(n) {
36
+ return se(n) || fe(n) || de(n) || ge();
37
+ }
38
+ function Z(n) {
39
+ "@babel/helpers - typeof";
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 pe(n, e) {
47
+ if (Z(n) != "object" || !n) return n;
48
+ var t = n[Symbol.toPrimitive];
49
+ if (t !== void 0) {
50
+ var l = t.call(n, e);
51
+ if (Z(l) != "object") return l;
52
+ throw new TypeError("@@toPrimitive must return a primitive value.");
53
+ }
54
+ return (e === "string" ? String : Number)(n);
55
+ }
56
+ function he(n) {
57
+ var e = pe(n, "string");
58
+ return Z(e) == "symbol" ? e : e + "";
59
+ }
60
+ function zn(n, e, t) {
61
+ return (e = he(e)) in n ? Object.defineProperty(n, e, {
62
+ value: t,
63
+ enumerable: !0,
64
+ configurable: !0,
65
+ writable: !0
66
+ }) : n[e] = t, n;
67
+ }
68
+ function Cn(n, e) {
69
+ var t = Object.keys(n);
70
+ if (Object.getOwnPropertySymbols) {
71
+ var l = Object.getOwnPropertySymbols(n);
72
+ e && (l = l.filter(function(o) {
73
+ return Object.getOwnPropertyDescriptor(n, o).enumerable;
74
+ })), t.push.apply(t, l);
75
+ }
76
+ return t;
77
+ }
78
+ function K(n) {
79
+ for (var e = 1; e < arguments.length; e++) {
80
+ var t = arguments[e] != null ? arguments[e] : {};
81
+ e % 2 ? Cn(Object(t), !0).forEach(function(l) {
82
+ zn(n, l, t[l]);
83
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Cn(Object(t)).forEach(function(l) {
84
+ Object.defineProperty(n, l, Object.getOwnPropertyDescriptor(t, l));
85
+ });
86
+ }
87
+ return n;
88
+ }
89
+ function me(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 ye(n) {
101
+ if (n.length === 0 || n.length === 1) return n;
102
+ var e = n.join(".");
103
+ return sn[e] || (sn[e] = me(n)), sn[e];
104
+ }
105
+ function ve(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
+ return a !== "token";
108
+ }), o = ye(l);
109
+ return o.reduce(function(a, r) {
110
+ return K(K({}, a), t[r]);
111
+ }, e);
112
+ }
113
+ function On(n) {
114
+ return n.join(" ");
115
+ }
116
+ function be(n, e) {
117
+ var t = 0;
118
+ return function(l) {
119
+ return t += 1, l.map(function(o, a) {
120
+ return Bn({
121
+ node: o,
122
+ stylesheet: n,
123
+ useInlineStyles: e,
124
+ key: "code-segment-".concat(t, "-").concat(a)
125
+ });
126
+ });
127
+ };
128
+ }
129
+ function Bn(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, f = e.tagName, y = e.value;
131
+ if (u === "text")
132
+ return y;
133
+ if (f) {
134
+ var b = be(t, a), C;
135
+ if (!a)
136
+ C = K(K({}, c), {}, {
137
+ className: On(c.className)
138
+ });
139
+ else {
140
+ var h = Object.keys(t).reduce(function(g, w) {
141
+ return w.split(".").forEach(function(O) {
142
+ g.includes(O) || g.push(O);
143
+ }), g;
144
+ }, []), L = c.className && c.className.includes("token") ? ["token"] : [], N = c.className && L.concat(c.className.filter(function(g) {
145
+ return !h.includes(g);
146
+ }));
147
+ C = K(K({}, c), {}, {
148
+ className: On(N) || void 0,
149
+ style: ve(c.className, Object.assign({}, c.style, o), t)
150
+ });
151
+ }
152
+ var v = b(e.children);
153
+ return /* @__PURE__ */ H.createElement(f, ce({
154
+ key: r
155
+ }, C), v);
156
+ }
157
+ }
158
+ const xe = function(n, e) {
159
+ var t = n.listLanguages();
160
+ return t.indexOf(e) !== -1;
161
+ };
162
+ var we = ["language", "children", "style", "customStyle", "codeTagProps", "useInlineStyles", "showLineNumbers", "showInlineLineNumbers", "startingLineNumber", "lineNumberContainerStyle", "lineNumberStyle", "wrapLines", "wrapLongLines", "lineProps", "renderer", "PreTag", "CodeTag", "code", "astGenerator"];
163
+ function Pn(n, e) {
164
+ var t = Object.keys(n);
165
+ if (Object.getOwnPropertySymbols) {
166
+ var l = Object.getOwnPropertySymbols(n);
167
+ e && (l = l.filter(function(o) {
168
+ return Object.getOwnPropertyDescriptor(n, o).enumerable;
169
+ })), t.push.apply(t, l);
170
+ }
171
+ return t;
172
+ }
173
+ function $(n) {
174
+ for (var e = 1; e < arguments.length; e++) {
175
+ var t = arguments[e] != null ? arguments[e] : {};
176
+ e % 2 ? Pn(Object(t), !0).forEach(function(l) {
177
+ zn(n, l, t[l]);
178
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : Pn(Object(t)).forEach(function(l) {
179
+ Object.defineProperty(n, l, Object.getOwnPropertyDescriptor(t, l));
180
+ });
181
+ }
182
+ return n;
183
+ }
184
+ var Se = /\n/g;
185
+ function ke(n) {
186
+ return n.match(Se);
187
+ }
188
+ function Ce(n) {
189
+ var e = n.lines, t = n.startingLineNumber, l = n.style;
190
+ return e.map(function(o, a) {
191
+ var r = a + t;
192
+ return /* @__PURE__ */ H.createElement("span", {
193
+ key: "line-".concat(a),
194
+ className: "react-syntax-highlighter-line-number",
195
+ style: typeof l == "function" ? l(r) : l
196
+ }, "".concat(r, `
197
+ `));
198
+ });
199
+ }
200
+ function Oe(n) {
201
+ var e = n.codeString, t = n.codeStyle, l = n.containerStyle, o = l === void 0 ? {
202
+ float: "left",
203
+ paddingRight: "10px"
204
+ } : l, a = n.numberStyle, r = a === void 0 ? {} : a, c = n.startingLineNumber;
205
+ return /* @__PURE__ */ H.createElement("code", {
206
+ style: Object.assign({}, t, o)
207
+ }, Ce({
208
+ lines: e.replace(/\n$/, "").split(`
209
+ `),
210
+ style: r,
211
+ startingLineNumber: c
212
+ }));
213
+ }
214
+ function Pe(n) {
215
+ return "".concat(n.toString().length, ".25em");
216
+ }
217
+ function Hn(n, e) {
218
+ return {
219
+ type: "element",
220
+ tagName: "span",
221
+ properties: {
222
+ key: "line-number--".concat(n),
223
+ className: ["comment", "linenumber", "react-syntax-highlighter-line-number"],
224
+ style: e
225
+ },
226
+ children: [{
227
+ type: "text",
228
+ value: n
229
+ }]
230
+ };
231
+ }
232
+ function $n(n, e, t) {
233
+ var l = {
234
+ display: "inline-block",
235
+ minWidth: Pe(t),
236
+ paddingRight: "1em",
237
+ textAlign: "right",
238
+ userSelect: "none"
239
+ }, o = typeof n == "function" ? n(e) : n, a = $($({}, l), o);
240
+ return a;
241
+ }
242
+ function on(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, f = u === void 0 ? [] : u, y = n.showLineNumbers, b = n.wrapLongLines, C = n.wrapLines, h = C === void 0 ? !1 : C, L = h ? $({}, typeof c == "function" ? c(t) : c) : {};
244
+ if (L.className = L.className ? [].concat(gn(L.className.trim().split(/\s+/)), gn(f)) : f, t && a) {
245
+ var N = $n(l, t, o);
246
+ e.unshift(Hn(t, N));
247
+ }
248
+ return b & y && (L.style = $({
249
+ display: "flex"
250
+ }, L.style)), {
251
+ type: "element",
252
+ tagName: "span",
253
+ properties: L,
254
+ children: e
255
+ };
256
+ }
257
+ function Fn(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
+ if (o.type === "text")
263
+ t.push(on({
264
+ children: [o],
265
+ className: gn(new Set(e))
266
+ }));
267
+ else if (o.children) {
268
+ var a, r = e.concat(((a = o.properties) === null || a === void 0 ? void 0 : a.className) || []);
269
+ Fn(o.children, r).forEach(function(c) {
270
+ return t.push(c);
271
+ });
272
+ }
273
+ }
274
+ return t;
275
+ }
276
+ function Le(n, e, t, l, o, a, r, c, u) {
277
+ var f, y = Fn(n.value), b = [], C = -1, h = 0;
278
+ function L(S, m) {
279
+ var k = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
280
+ return on({
281
+ children: S,
282
+ lineNumber: m,
283
+ lineNumberStyle: c,
284
+ largestLineNumber: r,
285
+ showInlineLineNumbers: o,
286
+ lineProps: t,
287
+ className: k,
288
+ showLineNumbers: l,
289
+ wrapLongLines: u,
290
+ wrapLines: e
291
+ });
292
+ }
293
+ function N(S, m) {
294
+ if (l && m && o) {
295
+ var k = $n(c, m, r);
296
+ S.unshift(Hn(m, k));
297
+ }
298
+ return S;
299
+ }
300
+ function v(S, m) {
301
+ var k = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
302
+ return e || k.length > 0 ? L(S, m, k) : N(S, m);
303
+ }
304
+ for (var g = function() {
305
+ var m = y[h], k = m.children[0].value, P = ke(k);
306
+ if (P) {
307
+ var U = k.split(`
308
+ `);
309
+ U.forEach(function(R, E) {
310
+ var D = l && b.length + a, d = {
311
+ type: "text",
312
+ value: "".concat(R, `
313
+ `)
314
+ };
315
+ if (E === 0) {
316
+ var j = y.slice(C + 1, h).concat(on({
317
+ children: [d],
318
+ className: m.properties.className
319
+ })), B = v(j, D);
320
+ b.push(B);
321
+ } else if (E === U.length - 1) {
322
+ var nn = y[h + 1] && y[h + 1].children && y[h + 1].children[0], Y = {
323
+ type: "text",
324
+ value: "".concat(R)
325
+ };
326
+ if (nn) {
327
+ var en = on({
328
+ children: [Y],
329
+ className: m.properties.className
330
+ });
331
+ y.splice(h + 1, 0, en);
332
+ } else {
333
+ var tn = [Y], F = v(tn, D, m.properties.className);
334
+ b.push(F);
335
+ }
336
+ } else {
337
+ var V = [d], G = v(V, D, m.properties.className);
338
+ b.push(G);
339
+ }
340
+ }), C = h;
341
+ }
342
+ h++;
343
+ }; h < y.length; )
344
+ g();
345
+ if (C !== y.length - 1) {
346
+ var w = y.slice(C + 1, y.length);
347
+ if (w && w.length) {
348
+ var O = l && b.length + a, p = v(w, O);
349
+ b.push(p);
350
+ }
351
+ }
352
+ return e ? b : (f = []).concat.apply(f, b);
353
+ }
354
+ function Ne(n) {
355
+ var e = n.rows, t = n.stylesheet, l = n.useInlineStyles;
356
+ return e.map(function(o, a) {
357
+ return Bn({
358
+ node: o,
359
+ stylesheet: t,
360
+ useInlineStyles: l,
361
+ key: "code-segment-".concat(a)
362
+ });
363
+ });
364
+ }
365
+ function Vn(n) {
366
+ return n && typeof n.highlightAuto < "u";
367
+ }
368
+ function Ae(n) {
369
+ var e = n.astGenerator, t = n.language, l = n.code, o = n.defaultCodeValue;
370
+ if (Vn(e)) {
371
+ var a = xe(e, t);
372
+ return t === "text" ? {
373
+ value: o,
374
+ language: "text"
375
+ } : a ? e.highlight(t, l) : e.highlightAuto(l);
376
+ }
377
+ try {
378
+ return t && t !== "text" ? {
379
+ value: e.highlight(l, t)
380
+ } : {
381
+ value: o
382
+ };
383
+ } catch {
384
+ return {
385
+ value: o
386
+ };
387
+ }
388
+ }
389
+ function Ee(n, e) {
390
+ return function(l) {
391
+ var o, a, r = l.language, c = l.children, u = l.style, f = u === void 0 ? e : u, y = l.customStyle, b = y === void 0 ? {} : y, C = l.codeTagProps, h = C === void 0 ? {
392
+ className: r ? "language-".concat(r) : void 0,
393
+ style: $($({}, f['code[class*="language-"]']), f['code[class*="language-'.concat(r, '"]')])
394
+ } : C, L = l.useInlineStyles, N = L === void 0 ? !0 : L, v = l.showLineNumbers, g = v === void 0 ? !1 : v, w = l.showInlineLineNumbers, O = w === void 0 ? !0 : w, p = l.startingLineNumber, S = p === void 0 ? 1 : p, m = l.lineNumberContainerStyle, k = l.lineNumberStyle, P = k === void 0 ? {} : k, 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, nn = B === void 0 ? "pre" : B, Y = l.CodeTag, en = Y === void 0 ? "code" : Y, tn = l.code, F = tn === void 0 ? (Array.isArray(c) ? c[0] : c) || "" : tn, V = l.astGenerator, G = ue(l, we);
395
+ V = V || n;
396
+ var xn = g ? /* @__PURE__ */ H.createElement(Oe, {
397
+ containerStyle: m,
398
+ codeStyle: h.style || {},
399
+ numberStyle: P,
400
+ startingLineNumber: S,
401
+ codeString: F
402
+ }) : null, te = f.hljs || f['pre[class*="language-"]'] || {
403
+ backgroundColor: "#fff"
404
+ }, wn = Vn(V) ? "hljs" : "prismjs", Sn = N ? Object.assign({}, G, {
405
+ style: Object.assign({}, te, b)
406
+ }) : Object.assign({}, G, {
407
+ className: G.className ? "".concat(wn, " ").concat(G.className) : wn,
408
+ style: Object.assign({}, b)
409
+ });
410
+ if (E ? h.style = $({
411
+ whiteSpace: "pre-wrap"
412
+ }, h.style) : h.style = $({
413
+ whiteSpace: "pre"
414
+ }, h.style), !V)
415
+ return /* @__PURE__ */ H.createElement(nn, Sn, xn, /* @__PURE__ */ H.createElement(en, h, F));
416
+ (U === void 0 && j || E) && (U = !0), j = j || Ne;
417
+ var kn = [{
418
+ type: "text",
419
+ value: F
420
+ }], un = Ae({
421
+ astGenerator: V,
422
+ language: r,
423
+ code: F,
424
+ defaultCodeValue: kn
425
+ });
426
+ un.language === null && (un.value = kn);
427
+ var le = (o = (a = F.match(/\n/g)) === null || a === void 0 ? void 0 : a.length) !== null && o !== void 0 ? o : 0, oe = S + le, ae = Le(un, U, d, g, O, S, oe, P, E);
428
+ return /* @__PURE__ */ H.createElement(nn, Sn, /* @__PURE__ */ H.createElement(en, h, !O && xn, j({
429
+ rows: ae,
430
+ stylesheet: f,
431
+ useInlineStyles: N
432
+ })));
433
+ };
434
+ }
435
+ class Q {
436
+ /**
437
+ * @param {SchemaType['property']} property
438
+ * Property.
439
+ * @param {SchemaType['normal']} normal
440
+ * Normal.
441
+ * @param {Space | undefined} [space]
442
+ * Space.
443
+ * @returns
444
+ * Schema.
445
+ */
446
+ constructor(e, t, l) {
447
+ this.normal = t, this.property = e, l && (this.space = l);
448
+ }
449
+ }
450
+ Q.prototype.normal = {};
451
+ Q.prototype.property = {};
452
+ Q.prototype.space = void 0;
453
+ function Wn(n, e) {
454
+ const t = {}, l = {};
455
+ for (const o of n)
456
+ Object.assign(t, o.property), Object.assign(l, o.normal);
457
+ return new Q(t, l, e);
458
+ }
459
+ function J(n) {
460
+ return n.toLowerCase();
461
+ }
462
+ class I {
463
+ /**
464
+ * @param {string} property
465
+ * Property.
466
+ * @param {string} attribute
467
+ * Attribute.
468
+ * @returns
469
+ * Info.
470
+ */
471
+ constructor(e, t) {
472
+ this.attribute = t, this.property = e;
473
+ }
474
+ }
475
+ I.prototype.attribute = "";
476
+ I.prototype.booleanish = !1;
477
+ I.prototype.boolean = !1;
478
+ I.prototype.commaOrSpaceSeparated = !1;
479
+ I.prototype.commaSeparated = !1;
480
+ I.prototype.defined = !1;
481
+ I.prototype.mustUseProperty = !1;
482
+ I.prototype.number = !1;
483
+ I.prototype.overloadedBoolean = !1;
484
+ I.prototype.property = "";
485
+ I.prototype.spaceSeparated = !1;
486
+ I.prototype.space = void 0;
487
+ let Te = 0;
488
+ const s = q(), A = q(), pn = q(), i = q(), x = q(), W = q(), z = q();
489
+ function q() {
490
+ return 2 ** ++Te;
491
+ }
492
+ const hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
493
+ __proto__: null,
494
+ boolean: s,
495
+ booleanish: A,
496
+ commaOrSpaceSeparated: z,
497
+ commaSeparated: W,
498
+ number: i,
499
+ overloadedBoolean: pn,
500
+ spaceSeparated: x
501
+ }, Symbol.toStringTag, { value: "Module" })), fn = (
502
+ /** @type {ReadonlyArray<keyof typeof types>} */
503
+ Object.keys(hn)
504
+ );
505
+ class vn extends I {
506
+ /**
507
+ * @constructor
508
+ * @param {string} property
509
+ * Property.
510
+ * @param {string} attribute
511
+ * Attribute.
512
+ * @param {number | null | undefined} [mask]
513
+ * Mask.
514
+ * @param {Space | undefined} [space]
515
+ * Space.
516
+ * @returns
517
+ * Info.
518
+ */
519
+ constructor(e, t, l, o) {
520
+ let a = -1;
521
+ if (super(e, t), Ln(this, "space", o), typeof l == "number")
522
+ for (; ++a < fn.length; ) {
523
+ const r = fn[a];
524
+ Ln(this, fn[a], (l & hn[r]) === hn[r]);
525
+ }
526
+ }
527
+ }
528
+ vn.prototype.defined = !0;
529
+ function Ln(n, e, t) {
530
+ t && (n[e] = t);
531
+ }
532
+ function _(n) {
533
+ const e = {}, t = {};
534
+ for (const [l, o] of Object.entries(n.properties)) {
535
+ const a = new vn(
536
+ l,
537
+ n.transform(n.attributes || {}, l),
538
+ o,
539
+ n.space
540
+ );
541
+ n.mustUseProperty && n.mustUseProperty.includes(l) && (a.mustUseProperty = !0), e[l] = a, t[J(l)] = l, t[J(a.attribute)] = l;
542
+ }
543
+ return new Q(e, t, n.space);
544
+ }
545
+ const qn = _({
546
+ properties: {
547
+ ariaActiveDescendant: null,
548
+ ariaAtomic: A,
549
+ ariaAutoComplete: null,
550
+ ariaBusy: A,
551
+ ariaChecked: A,
552
+ ariaColCount: i,
553
+ ariaColIndex: i,
554
+ ariaColSpan: i,
555
+ ariaControls: x,
556
+ ariaCurrent: null,
557
+ ariaDescribedBy: x,
558
+ ariaDetails: null,
559
+ ariaDisabled: A,
560
+ ariaDropEffect: x,
561
+ ariaErrorMessage: null,
562
+ ariaExpanded: A,
563
+ ariaFlowTo: x,
564
+ ariaGrabbed: A,
565
+ ariaHasPopup: null,
566
+ ariaHidden: A,
567
+ ariaInvalid: null,
568
+ ariaKeyShortcuts: null,
569
+ ariaLabel: null,
570
+ ariaLabelledBy: x,
571
+ ariaLevel: i,
572
+ ariaLive: null,
573
+ ariaModal: A,
574
+ ariaMultiLine: A,
575
+ ariaMultiSelectable: A,
576
+ ariaOrientation: null,
577
+ ariaOwns: x,
578
+ ariaPlaceholder: null,
579
+ ariaPosInSet: i,
580
+ ariaPressed: A,
581
+ ariaReadOnly: A,
582
+ ariaRelevant: null,
583
+ ariaRequired: A,
584
+ ariaRoleDescription: x,
585
+ ariaRowCount: i,
586
+ ariaRowIndex: i,
587
+ ariaRowSpan: i,
588
+ ariaSelected: A,
589
+ ariaSetSize: i,
590
+ ariaSort: null,
591
+ ariaValueMax: i,
592
+ ariaValueMin: i,
593
+ ariaValueNow: i,
594
+ ariaValueText: null,
595
+ role: null
596
+ },
597
+ transform(n, e) {
598
+ return e === "role" ? e : "aria-" + e.slice(4).toLowerCase();
599
+ }
600
+ });
601
+ function Gn(n, e) {
602
+ return e in n ? n[e] : e;
603
+ }
604
+ function Kn(n, e) {
605
+ return Gn(n, e.toLowerCase());
606
+ }
607
+ const De = _({
608
+ attributes: {
609
+ acceptcharset: "accept-charset",
610
+ classname: "class",
611
+ htmlfor: "for",
612
+ httpequiv: "http-equiv"
613
+ },
614
+ mustUseProperty: ["checked", "multiple", "muted", "selected"],
615
+ properties: {
616
+ // Standard Properties.
617
+ abbr: null,
618
+ accept: W,
619
+ acceptCharset: x,
620
+ accessKey: x,
621
+ action: null,
622
+ allow: null,
623
+ allowFullScreen: s,
624
+ allowPaymentRequest: s,
625
+ allowUserMedia: s,
626
+ alpha: s,
627
+ alt: null,
628
+ as: null,
629
+ async: s,
630
+ autoCapitalize: null,
631
+ autoComplete: x,
632
+ autoFocus: s,
633
+ autoPlay: s,
634
+ blocking: x,
635
+ capture: null,
636
+ charSet: null,
637
+ checked: s,
638
+ cite: null,
639
+ className: x,
640
+ closedBy: null,
641
+ colorSpace: null,
642
+ cols: i,
643
+ colSpan: i,
644
+ command: null,
645
+ commandFor: null,
646
+ content: null,
647
+ contentEditable: A,
648
+ controls: s,
649
+ controlsList: x,
650
+ coords: i | W,
651
+ crossOrigin: null,
652
+ data: null,
653
+ dateTime: null,
654
+ decoding: null,
655
+ default: s,
656
+ defer: s,
657
+ dir: null,
658
+ dirName: null,
659
+ disabled: s,
660
+ download: pn,
661
+ draggable: A,
662
+ encType: null,
663
+ enterKeyHint: null,
664
+ fetchPriority: null,
665
+ form: null,
666
+ formAction: null,
667
+ formEncType: null,
668
+ formMethod: null,
669
+ formNoValidate: s,
670
+ formTarget: null,
671
+ headers: x,
672
+ height: i,
673
+ hidden: pn,
674
+ high: i,
675
+ href: null,
676
+ hrefLang: null,
677
+ htmlFor: x,
678
+ httpEquiv: x,
679
+ id: null,
680
+ imageSizes: null,
681
+ imageSrcSet: null,
682
+ inert: s,
683
+ inputMode: null,
684
+ integrity: null,
685
+ is: null,
686
+ isMap: s,
687
+ itemId: null,
688
+ itemProp: x,
689
+ itemRef: x,
690
+ itemScope: s,
691
+ itemType: x,
692
+ kind: null,
693
+ label: null,
694
+ lang: null,
695
+ language: null,
696
+ list: null,
697
+ loading: null,
698
+ loop: s,
699
+ low: i,
700
+ manifest: null,
701
+ max: null,
702
+ maxLength: i,
703
+ media: null,
704
+ method: null,
705
+ min: null,
706
+ minLength: i,
707
+ multiple: s,
708
+ muted: s,
709
+ name: null,
710
+ nonce: null,
711
+ noModule: s,
712
+ noValidate: s,
713
+ onAbort: null,
714
+ onAfterPrint: null,
715
+ onAuxClick: null,
716
+ onBeforeMatch: null,
717
+ onBeforePrint: null,
718
+ onBeforeToggle: null,
719
+ onBeforeUnload: null,
720
+ onBlur: null,
721
+ onCancel: null,
722
+ onCanPlay: null,
723
+ onCanPlayThrough: null,
724
+ onChange: null,
725
+ onClick: null,
726
+ onClose: null,
727
+ onContextLost: null,
728
+ onContextMenu: null,
729
+ onContextRestored: null,
730
+ onCopy: null,
731
+ onCueChange: null,
732
+ onCut: null,
733
+ onDblClick: null,
734
+ onDrag: null,
735
+ onDragEnd: null,
736
+ onDragEnter: null,
737
+ onDragExit: null,
738
+ onDragLeave: null,
739
+ onDragOver: null,
740
+ onDragStart: null,
741
+ onDrop: null,
742
+ onDurationChange: null,
743
+ onEmptied: null,
744
+ onEnded: null,
745
+ onError: null,
746
+ onFocus: null,
747
+ onFormData: null,
748
+ onHashChange: null,
749
+ onInput: null,
750
+ onInvalid: null,
751
+ onKeyDown: null,
752
+ onKeyPress: null,
753
+ onKeyUp: null,
754
+ onLanguageChange: null,
755
+ onLoad: null,
756
+ onLoadedData: null,
757
+ onLoadedMetadata: null,
758
+ onLoadEnd: null,
759
+ onLoadStart: null,
760
+ onMessage: null,
761
+ onMessageError: null,
762
+ onMouseDown: null,
763
+ onMouseEnter: null,
764
+ onMouseLeave: null,
765
+ onMouseMove: null,
766
+ onMouseOut: null,
767
+ onMouseOver: null,
768
+ onMouseUp: null,
769
+ onOffline: null,
770
+ onOnline: null,
771
+ onPageHide: null,
772
+ onPageShow: null,
773
+ onPaste: null,
774
+ onPause: null,
775
+ onPlay: null,
776
+ onPlaying: null,
777
+ onPopState: null,
778
+ onProgress: null,
779
+ onRateChange: null,
780
+ onRejectionHandled: null,
781
+ onReset: null,
782
+ onResize: null,
783
+ onScroll: null,
784
+ onScrollEnd: null,
785
+ onSecurityPolicyViolation: null,
786
+ onSeeked: null,
787
+ onSeeking: null,
788
+ onSelect: null,
789
+ onSlotChange: null,
790
+ onStalled: null,
791
+ onStorage: null,
792
+ onSubmit: null,
793
+ onSuspend: null,
794
+ onTimeUpdate: null,
795
+ onToggle: null,
796
+ onUnhandledRejection: null,
797
+ onUnload: null,
798
+ onVolumeChange: null,
799
+ onWaiting: null,
800
+ onWheel: null,
801
+ open: s,
802
+ optimum: i,
803
+ pattern: null,
804
+ ping: x,
805
+ placeholder: null,
806
+ playsInline: s,
807
+ popover: null,
808
+ popoverTarget: null,
809
+ popoverTargetAction: null,
810
+ poster: null,
811
+ preload: null,
812
+ readOnly: s,
813
+ referrerPolicy: null,
814
+ rel: x,
815
+ required: s,
816
+ reversed: s,
817
+ rows: i,
818
+ rowSpan: i,
819
+ sandbox: x,
820
+ scope: null,
821
+ scoped: s,
822
+ seamless: s,
823
+ selected: s,
824
+ shadowRootClonable: s,
825
+ shadowRootCustomElementRegistry: s,
826
+ shadowRootDelegatesFocus: s,
827
+ shadowRootMode: null,
828
+ shadowRootSerializable: s,
829
+ shape: null,
830
+ size: i,
831
+ sizes: null,
832
+ slot: null,
833
+ span: i,
834
+ spellCheck: A,
835
+ src: null,
836
+ srcDoc: null,
837
+ srcLang: null,
838
+ srcSet: null,
839
+ start: i,
840
+ step: null,
841
+ style: null,
842
+ tabIndex: i,
843
+ target: null,
844
+ title: null,
845
+ translate: null,
846
+ type: null,
847
+ typeMustMatch: s,
848
+ useMap: null,
849
+ value: A,
850
+ width: i,
851
+ wrap: null,
852
+ writingSuggestions: null,
853
+ // Legacy.
854
+ // See: https://html.spec.whatwg.org/#other-elements,-attributes-and-apis
855
+ align: null,
856
+ // Several. Use CSS `text-align` instead,
857
+ aLink: null,
858
+ // `<body>`. Use CSS `a:active {color}` instead
859
+ archive: x,
860
+ // `<object>`. List of URIs to archives
861
+ axis: null,
862
+ // `<td>` and `<th>`. Use `scope` on `<th>`
863
+ background: null,
864
+ // `<body>`. Use CSS `background-image` instead
865
+ bgColor: null,
866
+ // `<body>` and table elements. Use CSS `background-color` instead
867
+ border: i,
868
+ // `<table>`. Use CSS `border-width` instead,
869
+ borderColor: null,
870
+ // `<table>`. Use CSS `border-color` instead,
871
+ bottomMargin: i,
872
+ // `<body>`
873
+ cellPadding: null,
874
+ // `<table>`
875
+ cellSpacing: null,
876
+ // `<table>`
877
+ char: null,
878
+ // Several table elements. When `align=char`, sets the character to align on
879
+ charOff: null,
880
+ // Several table elements. When `char`, offsets the alignment
881
+ classId: null,
882
+ // `<object>`
883
+ clear: null,
884
+ // `<br>`. Use CSS `clear` instead
885
+ code: null,
886
+ // `<object>`
887
+ codeBase: null,
888
+ // `<object>`
889
+ codeType: null,
890
+ // `<object>`
891
+ color: null,
892
+ // `<font>` and `<hr>`. Use CSS instead
893
+ compact: s,
894
+ // Lists. Use CSS to reduce space between items instead
895
+ declare: s,
896
+ // `<object>`
897
+ event: null,
898
+ // `<script>`
899
+ face: null,
900
+ // `<font>`. Use CSS instead
901
+ frame: null,
902
+ // `<table>`
903
+ frameBorder: null,
904
+ // `<iframe>`. Use CSS `border` instead
905
+ hSpace: i,
906
+ // `<img>` and `<object>`
907
+ leftMargin: i,
908
+ // `<body>`
909
+ link: null,
910
+ // `<body>`. Use CSS `a:link {color: *}` instead
911
+ longDesc: null,
912
+ // `<frame>`, `<iframe>`, and `<img>`. Use an `<a>`
913
+ lowSrc: null,
914
+ // `<img>`. Use a `<picture>`
915
+ marginHeight: i,
916
+ // `<body>`
917
+ marginWidth: i,
918
+ // `<body>`
919
+ noResize: s,
920
+ // `<frame>`
921
+ noHref: s,
922
+ // `<area>`. Use no href instead of an explicit `nohref`
923
+ noShade: s,
924
+ // `<hr>`. Use background-color and height instead of borders
925
+ noWrap: s,
926
+ // `<td>` and `<th>`
927
+ object: null,
928
+ // `<applet>`
929
+ profile: null,
930
+ // `<head>`
931
+ prompt: null,
932
+ // `<isindex>`
933
+ rev: null,
934
+ // `<link>`
935
+ rightMargin: i,
936
+ // `<body>`
937
+ rules: null,
938
+ // `<table>`
939
+ scheme: null,
940
+ // `<meta>`
941
+ scrolling: A,
942
+ // `<frame>`. Use overflow in the child context
943
+ standby: null,
944
+ // `<object>`
945
+ summary: null,
946
+ // `<table>`
947
+ text: null,
948
+ // `<body>`. Use CSS `color` instead
949
+ topMargin: i,
950
+ // `<body>`
951
+ valueType: null,
952
+ // `<param>`
953
+ version: null,
954
+ // `<html>`. Use a doctype.
955
+ vAlign: null,
956
+ // Several. Use CSS `vertical-align` instead
957
+ vLink: null,
958
+ // `<body>`. Use CSS `a:visited {color}` instead
959
+ vSpace: i,
960
+ // `<img>` and `<object>`
961
+ // Non-standard Properties.
962
+ allowTransparency: null,
963
+ autoCorrect: null,
964
+ autoSave: null,
965
+ credentialless: s,
966
+ disablePictureInPicture: s,
967
+ disableRemotePlayback: s,
968
+ exportParts: W,
969
+ part: x,
970
+ prefix: null,
971
+ property: null,
972
+ results: i,
973
+ security: null,
974
+ unselectable: null
975
+ },
976
+ space: "html",
977
+ transform: Kn
978
+ }), Me = _({
979
+ attributes: {
980
+ accentHeight: "accent-height",
981
+ alignmentBaseline: "alignment-baseline",
982
+ arabicForm: "arabic-form",
983
+ baselineShift: "baseline-shift",
984
+ capHeight: "cap-height",
985
+ className: "class",
986
+ clipPath: "clip-path",
987
+ clipRule: "clip-rule",
988
+ colorInterpolation: "color-interpolation",
989
+ colorInterpolationFilters: "color-interpolation-filters",
990
+ colorProfile: "color-profile",
991
+ colorRendering: "color-rendering",
992
+ crossOrigin: "crossorigin",
993
+ dataType: "datatype",
994
+ dominantBaseline: "dominant-baseline",
995
+ enableBackground: "enable-background",
996
+ fillOpacity: "fill-opacity",
997
+ fillRule: "fill-rule",
998
+ floodColor: "flood-color",
999
+ floodOpacity: "flood-opacity",
1000
+ fontFamily: "font-family",
1001
+ fontSize: "font-size",
1002
+ fontSizeAdjust: "font-size-adjust",
1003
+ fontStretch: "font-stretch",
1004
+ fontStyle: "font-style",
1005
+ fontVariant: "font-variant",
1006
+ fontWeight: "font-weight",
1007
+ glyphName: "glyph-name",
1008
+ glyphOrientationHorizontal: "glyph-orientation-horizontal",
1009
+ glyphOrientationVertical: "glyph-orientation-vertical",
1010
+ hrefLang: "hreflang",
1011
+ horizAdvX: "horiz-adv-x",
1012
+ horizOriginX: "horiz-origin-x",
1013
+ horizOriginY: "horiz-origin-y",
1014
+ imageRendering: "image-rendering",
1015
+ letterSpacing: "letter-spacing",
1016
+ lightingColor: "lighting-color",
1017
+ markerEnd: "marker-end",
1018
+ markerMid: "marker-mid",
1019
+ markerStart: "marker-start",
1020
+ maskType: "mask-type",
1021
+ navDown: "nav-down",
1022
+ navDownLeft: "nav-down-left",
1023
+ navDownRight: "nav-down-right",
1024
+ navLeft: "nav-left",
1025
+ navNext: "nav-next",
1026
+ navPrev: "nav-prev",
1027
+ navRight: "nav-right",
1028
+ navUp: "nav-up",
1029
+ navUpLeft: "nav-up-left",
1030
+ navUpRight: "nav-up-right",
1031
+ onAbort: "onabort",
1032
+ onActivate: "onactivate",
1033
+ onAfterPrint: "onafterprint",
1034
+ onBeforePrint: "onbeforeprint",
1035
+ onBegin: "onbegin",
1036
+ onCancel: "oncancel",
1037
+ onCanPlay: "oncanplay",
1038
+ onCanPlayThrough: "oncanplaythrough",
1039
+ onChange: "onchange",
1040
+ onClick: "onclick",
1041
+ onClose: "onclose",
1042
+ onCopy: "oncopy",
1043
+ onCueChange: "oncuechange",
1044
+ onCut: "oncut",
1045
+ onDblClick: "ondblclick",
1046
+ onDrag: "ondrag",
1047
+ onDragEnd: "ondragend",
1048
+ onDragEnter: "ondragenter",
1049
+ onDragExit: "ondragexit",
1050
+ onDragLeave: "ondragleave",
1051
+ onDragOver: "ondragover",
1052
+ onDragStart: "ondragstart",
1053
+ onDrop: "ondrop",
1054
+ onDurationChange: "ondurationchange",
1055
+ onEmptied: "onemptied",
1056
+ onEnd: "onend",
1057
+ onEnded: "onended",
1058
+ onError: "onerror",
1059
+ onFocus: "onfocus",
1060
+ onFocusIn: "onfocusin",
1061
+ onFocusOut: "onfocusout",
1062
+ onHashChange: "onhashchange",
1063
+ onInput: "oninput",
1064
+ onInvalid: "oninvalid",
1065
+ onKeyDown: "onkeydown",
1066
+ onKeyPress: "onkeypress",
1067
+ onKeyUp: "onkeyup",
1068
+ onLoad: "onload",
1069
+ onLoadedData: "onloadeddata",
1070
+ onLoadedMetadata: "onloadedmetadata",
1071
+ onLoadStart: "onloadstart",
1072
+ onMessage: "onmessage",
1073
+ onMouseDown: "onmousedown",
1074
+ onMouseEnter: "onmouseenter",
1075
+ onMouseLeave: "onmouseleave",
1076
+ onMouseMove: "onmousemove",
1077
+ onMouseOut: "onmouseout",
1078
+ onMouseOver: "onmouseover",
1079
+ onMouseUp: "onmouseup",
1080
+ onMouseWheel: "onmousewheel",
1081
+ onOffline: "onoffline",
1082
+ onOnline: "ononline",
1083
+ onPageHide: "onpagehide",
1084
+ onPageShow: "onpageshow",
1085
+ onPaste: "onpaste",
1086
+ onPause: "onpause",
1087
+ onPlay: "onplay",
1088
+ onPlaying: "onplaying",
1089
+ onPopState: "onpopstate",
1090
+ onProgress: "onprogress",
1091
+ onRateChange: "onratechange",
1092
+ onRepeat: "onrepeat",
1093
+ onReset: "onreset",
1094
+ onResize: "onresize",
1095
+ onScroll: "onscroll",
1096
+ onSeeked: "onseeked",
1097
+ onSeeking: "onseeking",
1098
+ onSelect: "onselect",
1099
+ onShow: "onshow",
1100
+ onStalled: "onstalled",
1101
+ onStorage: "onstorage",
1102
+ onSubmit: "onsubmit",
1103
+ onSuspend: "onsuspend",
1104
+ onTimeUpdate: "ontimeupdate",
1105
+ onToggle: "ontoggle",
1106
+ onUnload: "onunload",
1107
+ onVolumeChange: "onvolumechange",
1108
+ onWaiting: "onwaiting",
1109
+ onZoom: "onzoom",
1110
+ overlinePosition: "overline-position",
1111
+ overlineThickness: "overline-thickness",
1112
+ paintOrder: "paint-order",
1113
+ panose1: "panose-1",
1114
+ pointerEvents: "pointer-events",
1115
+ referrerPolicy: "referrerpolicy",
1116
+ renderingIntent: "rendering-intent",
1117
+ shapeRendering: "shape-rendering",
1118
+ stopColor: "stop-color",
1119
+ stopOpacity: "stop-opacity",
1120
+ strikethroughPosition: "strikethrough-position",
1121
+ strikethroughThickness: "strikethrough-thickness",
1122
+ strokeDashArray: "stroke-dasharray",
1123
+ strokeDashOffset: "stroke-dashoffset",
1124
+ strokeLineCap: "stroke-linecap",
1125
+ strokeLineJoin: "stroke-linejoin",
1126
+ strokeMiterLimit: "stroke-miterlimit",
1127
+ strokeOpacity: "stroke-opacity",
1128
+ strokeWidth: "stroke-width",
1129
+ tabIndex: "tabindex",
1130
+ textAnchor: "text-anchor",
1131
+ textDecoration: "text-decoration",
1132
+ textRendering: "text-rendering",
1133
+ transformOrigin: "transform-origin",
1134
+ typeOf: "typeof",
1135
+ underlinePosition: "underline-position",
1136
+ underlineThickness: "underline-thickness",
1137
+ unicodeBidi: "unicode-bidi",
1138
+ unicodeRange: "unicode-range",
1139
+ unitsPerEm: "units-per-em",
1140
+ vAlphabetic: "v-alphabetic",
1141
+ vHanging: "v-hanging",
1142
+ vIdeographic: "v-ideographic",
1143
+ vMathematical: "v-mathematical",
1144
+ vectorEffect: "vector-effect",
1145
+ vertAdvY: "vert-adv-y",
1146
+ vertOriginX: "vert-origin-x",
1147
+ vertOriginY: "vert-origin-y",
1148
+ wordSpacing: "word-spacing",
1149
+ writingMode: "writing-mode",
1150
+ xHeight: "x-height",
1151
+ // These were camelcased in Tiny. Now lowercased in SVG 2
1152
+ playbackOrder: "playbackorder",
1153
+ timelineBegin: "timelinebegin"
1154
+ },
1155
+ properties: {
1156
+ about: z,
1157
+ accentHeight: i,
1158
+ accumulate: null,
1159
+ additive: null,
1160
+ alignmentBaseline: null,
1161
+ alphabetic: i,
1162
+ amplitude: i,
1163
+ arabicForm: null,
1164
+ ascent: i,
1165
+ attributeName: null,
1166
+ attributeType: null,
1167
+ azimuth: i,
1168
+ bandwidth: null,
1169
+ baselineShift: null,
1170
+ baseFrequency: null,
1171
+ baseProfile: null,
1172
+ bbox: null,
1173
+ begin: null,
1174
+ bias: i,
1175
+ by: null,
1176
+ calcMode: null,
1177
+ capHeight: i,
1178
+ className: x,
1179
+ clip: null,
1180
+ clipPath: null,
1181
+ clipPathUnits: null,
1182
+ clipRule: null,
1183
+ color: null,
1184
+ colorInterpolation: null,
1185
+ colorInterpolationFilters: null,
1186
+ colorProfile: null,
1187
+ colorRendering: null,
1188
+ content: null,
1189
+ contentScriptType: null,
1190
+ contentStyleType: null,
1191
+ crossOrigin: null,
1192
+ cursor: null,
1193
+ cx: null,
1194
+ cy: null,
1195
+ d: null,
1196
+ dataType: null,
1197
+ defaultAction: null,
1198
+ descent: i,
1199
+ diffuseConstant: i,
1200
+ direction: null,
1201
+ display: null,
1202
+ dur: null,
1203
+ divisor: i,
1204
+ dominantBaseline: null,
1205
+ download: s,
1206
+ dx: null,
1207
+ dy: null,
1208
+ edgeMode: null,
1209
+ editable: null,
1210
+ elevation: i,
1211
+ enableBackground: null,
1212
+ end: null,
1213
+ event: null,
1214
+ exponent: i,
1215
+ externalResourcesRequired: null,
1216
+ fill: null,
1217
+ fillOpacity: i,
1218
+ fillRule: null,
1219
+ filter: null,
1220
+ filterRes: null,
1221
+ filterUnits: null,
1222
+ floodColor: null,
1223
+ floodOpacity: null,
1224
+ focusable: null,
1225
+ focusHighlight: null,
1226
+ fontFamily: null,
1227
+ fontSize: null,
1228
+ fontSizeAdjust: null,
1229
+ fontStretch: null,
1230
+ fontStyle: null,
1231
+ fontVariant: null,
1232
+ fontWeight: null,
1233
+ format: null,
1234
+ fr: null,
1235
+ from: null,
1236
+ fx: null,
1237
+ fy: null,
1238
+ g1: W,
1239
+ g2: W,
1240
+ glyphName: W,
1241
+ glyphOrientationHorizontal: null,
1242
+ glyphOrientationVertical: null,
1243
+ glyphRef: null,
1244
+ gradientTransform: null,
1245
+ gradientUnits: null,
1246
+ handler: null,
1247
+ hanging: i,
1248
+ hatchContentUnits: null,
1249
+ hatchUnits: null,
1250
+ height: null,
1251
+ href: null,
1252
+ hrefLang: null,
1253
+ horizAdvX: i,
1254
+ horizOriginX: i,
1255
+ horizOriginY: i,
1256
+ id: null,
1257
+ ideographic: i,
1258
+ imageRendering: null,
1259
+ initialVisibility: null,
1260
+ in: null,
1261
+ in2: null,
1262
+ intercept: i,
1263
+ k: i,
1264
+ k1: i,
1265
+ k2: i,
1266
+ k3: i,
1267
+ k4: i,
1268
+ kernelMatrix: z,
1269
+ kernelUnitLength: null,
1270
+ keyPoints: null,
1271
+ // SEMI_COLON_SEPARATED
1272
+ keySplines: null,
1273
+ // SEMI_COLON_SEPARATED
1274
+ keyTimes: null,
1275
+ // SEMI_COLON_SEPARATED
1276
+ kerning: null,
1277
+ lang: null,
1278
+ lengthAdjust: null,
1279
+ letterSpacing: null,
1280
+ lightingColor: null,
1281
+ limitingConeAngle: i,
1282
+ local: null,
1283
+ markerEnd: null,
1284
+ markerMid: null,
1285
+ markerStart: null,
1286
+ markerHeight: null,
1287
+ markerUnits: null,
1288
+ markerWidth: null,
1289
+ mask: null,
1290
+ maskContentUnits: null,
1291
+ maskType: null,
1292
+ maskUnits: null,
1293
+ mathematical: null,
1294
+ max: null,
1295
+ media: null,
1296
+ mediaCharacterEncoding: null,
1297
+ mediaContentEncodings: null,
1298
+ mediaSize: i,
1299
+ mediaTime: null,
1300
+ method: null,
1301
+ min: null,
1302
+ mode: null,
1303
+ name: null,
1304
+ navDown: null,
1305
+ navDownLeft: null,
1306
+ navDownRight: null,
1307
+ navLeft: null,
1308
+ navNext: null,
1309
+ navPrev: null,
1310
+ navRight: null,
1311
+ navUp: null,
1312
+ navUpLeft: null,
1313
+ navUpRight: null,
1314
+ numOctaves: null,
1315
+ observer: null,
1316
+ offset: null,
1317
+ onAbort: null,
1318
+ onActivate: null,
1319
+ onAfterPrint: null,
1320
+ onBeforePrint: null,
1321
+ onBegin: null,
1322
+ onCancel: null,
1323
+ onCanPlay: null,
1324
+ onCanPlayThrough: null,
1325
+ onChange: null,
1326
+ onClick: null,
1327
+ onClose: null,
1328
+ onCopy: null,
1329
+ onCueChange: null,
1330
+ onCut: null,
1331
+ onDblClick: null,
1332
+ onDrag: null,
1333
+ onDragEnd: null,
1334
+ onDragEnter: null,
1335
+ onDragExit: null,
1336
+ onDragLeave: null,
1337
+ onDragOver: null,
1338
+ onDragStart: null,
1339
+ onDrop: null,
1340
+ onDurationChange: null,
1341
+ onEmptied: null,
1342
+ onEnd: null,
1343
+ onEnded: null,
1344
+ onError: null,
1345
+ onFocus: null,
1346
+ onFocusIn: null,
1347
+ onFocusOut: null,
1348
+ onHashChange: null,
1349
+ onInput: null,
1350
+ onInvalid: null,
1351
+ onKeyDown: null,
1352
+ onKeyPress: null,
1353
+ onKeyUp: null,
1354
+ onLoad: null,
1355
+ onLoadedData: null,
1356
+ onLoadedMetadata: null,
1357
+ onLoadStart: null,
1358
+ onMessage: null,
1359
+ onMouseDown: null,
1360
+ onMouseEnter: null,
1361
+ onMouseLeave: null,
1362
+ onMouseMove: null,
1363
+ onMouseOut: null,
1364
+ onMouseOver: null,
1365
+ onMouseUp: null,
1366
+ onMouseWheel: null,
1367
+ onOffline: null,
1368
+ onOnline: null,
1369
+ onPageHide: null,
1370
+ onPageShow: null,
1371
+ onPaste: null,
1372
+ onPause: null,
1373
+ onPlay: null,
1374
+ onPlaying: null,
1375
+ onPopState: null,
1376
+ onProgress: null,
1377
+ onRateChange: null,
1378
+ onRepeat: null,
1379
+ onReset: null,
1380
+ onResize: null,
1381
+ onScroll: null,
1382
+ onSeeked: null,
1383
+ onSeeking: null,
1384
+ onSelect: null,
1385
+ onShow: null,
1386
+ onStalled: null,
1387
+ onStorage: null,
1388
+ onSubmit: null,
1389
+ onSuspend: null,
1390
+ onTimeUpdate: null,
1391
+ onToggle: null,
1392
+ onUnload: null,
1393
+ onVolumeChange: null,
1394
+ onWaiting: null,
1395
+ onZoom: null,
1396
+ opacity: null,
1397
+ operator: null,
1398
+ order: null,
1399
+ orient: null,
1400
+ orientation: null,
1401
+ origin: null,
1402
+ overflow: null,
1403
+ overlay: null,
1404
+ overlinePosition: i,
1405
+ overlineThickness: i,
1406
+ paintOrder: null,
1407
+ panose1: null,
1408
+ path: null,
1409
+ pathLength: i,
1410
+ patternContentUnits: null,
1411
+ patternTransform: null,
1412
+ patternUnits: null,
1413
+ phase: null,
1414
+ ping: x,
1415
+ pitch: null,
1416
+ playbackOrder: null,
1417
+ pointerEvents: null,
1418
+ points: null,
1419
+ pointsAtX: i,
1420
+ pointsAtY: i,
1421
+ pointsAtZ: i,
1422
+ preserveAlpha: null,
1423
+ preserveAspectRatio: null,
1424
+ primitiveUnits: null,
1425
+ propagate: null,
1426
+ property: z,
1427
+ r: null,
1428
+ radius: null,
1429
+ referrerPolicy: null,
1430
+ refX: null,
1431
+ refY: null,
1432
+ rel: z,
1433
+ rev: z,
1434
+ renderingIntent: null,
1435
+ repeatCount: null,
1436
+ repeatDur: null,
1437
+ requiredExtensions: z,
1438
+ requiredFeatures: z,
1439
+ requiredFonts: z,
1440
+ requiredFormats: z,
1441
+ resource: null,
1442
+ restart: null,
1443
+ result: null,
1444
+ rotate: null,
1445
+ rx: null,
1446
+ ry: null,
1447
+ scale: null,
1448
+ seed: null,
1449
+ shapeRendering: null,
1450
+ side: null,
1451
+ slope: null,
1452
+ snapshotTime: null,
1453
+ specularConstant: i,
1454
+ specularExponent: i,
1455
+ spreadMethod: null,
1456
+ spacing: null,
1457
+ startOffset: null,
1458
+ stdDeviation: null,
1459
+ stemh: null,
1460
+ stemv: null,
1461
+ stitchTiles: null,
1462
+ stopColor: null,
1463
+ stopOpacity: null,
1464
+ strikethroughPosition: i,
1465
+ strikethroughThickness: i,
1466
+ string: null,
1467
+ stroke: null,
1468
+ strokeDashArray: z,
1469
+ strokeDashOffset: null,
1470
+ strokeLineCap: null,
1471
+ strokeLineJoin: null,
1472
+ strokeMiterLimit: i,
1473
+ strokeOpacity: i,
1474
+ strokeWidth: null,
1475
+ style: null,
1476
+ surfaceScale: i,
1477
+ syncBehavior: null,
1478
+ syncBehaviorDefault: null,
1479
+ syncMaster: null,
1480
+ syncTolerance: null,
1481
+ syncToleranceDefault: null,
1482
+ systemLanguage: z,
1483
+ tabIndex: i,
1484
+ tableValues: null,
1485
+ target: null,
1486
+ targetX: i,
1487
+ targetY: i,
1488
+ textAnchor: null,
1489
+ textDecoration: null,
1490
+ textRendering: null,
1491
+ textLength: null,
1492
+ timelineBegin: null,
1493
+ title: null,
1494
+ transformBehavior: null,
1495
+ type: null,
1496
+ typeOf: z,
1497
+ to: null,
1498
+ transform: null,
1499
+ transformOrigin: null,
1500
+ u1: null,
1501
+ u2: null,
1502
+ underlinePosition: i,
1503
+ underlineThickness: i,
1504
+ unicode: null,
1505
+ unicodeBidi: null,
1506
+ unicodeRange: null,
1507
+ unitsPerEm: i,
1508
+ values: null,
1509
+ vAlphabetic: i,
1510
+ vMathematical: i,
1511
+ vectorEffect: null,
1512
+ vHanging: i,
1513
+ vIdeographic: i,
1514
+ version: null,
1515
+ vertAdvY: i,
1516
+ vertOriginX: i,
1517
+ vertOriginY: i,
1518
+ viewBox: null,
1519
+ viewTarget: null,
1520
+ visibility: null,
1521
+ width: null,
1522
+ widths: null,
1523
+ wordSpacing: null,
1524
+ writingMode: null,
1525
+ x: null,
1526
+ x1: null,
1527
+ x2: null,
1528
+ xChannelSelector: null,
1529
+ xHeight: i,
1530
+ y: null,
1531
+ y1: null,
1532
+ y2: null,
1533
+ yChannelSelector: null,
1534
+ z: null,
1535
+ zoomAndPan: null
1536
+ },
1537
+ space: "svg",
1538
+ transform: Gn
1539
+ }), _n = _({
1540
+ properties: {
1541
+ xLinkActuate: null,
1542
+ xLinkArcRole: null,
1543
+ xLinkHref: null,
1544
+ xLinkRole: null,
1545
+ xLinkShow: null,
1546
+ xLinkTitle: null,
1547
+ xLinkType: null
1548
+ },
1549
+ space: "xlink",
1550
+ transform(n, e) {
1551
+ return "xlink:" + e.slice(5).toLowerCase();
1552
+ }
1553
+ }), Yn = _({
1554
+ attributes: { xmlnsxlink: "xmlns:xlink" },
1555
+ properties: { xmlnsXLink: null, xmlns: null },
1556
+ space: "xmlns",
1557
+ transform: Kn
1558
+ }), Xn = _({
1559
+ properties: { xmlBase: null, xmlLang: null, xmlSpace: null },
1560
+ space: "xml",
1561
+ transform(n, e) {
1562
+ return "xml:" + e.slice(3).toLowerCase();
1563
+ }
1564
+ }), Re = /[A-Z]/g, Nn = /-[a-z]/g, je = /^data[-\w.:]+$/i;
1565
+ function Ie(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" && je.test(e)) {
1571
+ if (e.charAt(4) === "-") {
1572
+ const a = e.slice(5).replace(Nn, ze);
1573
+ l = "data" + a.charAt(0).toUpperCase() + a.slice(1);
1574
+ } else {
1575
+ const a = e.slice(4);
1576
+ if (!Nn.test(a)) {
1577
+ let r = a.replace(Re, Ue);
1578
+ r.charAt(0) !== "-" && (r = "-" + r), e = "data" + r;
1579
+ }
1580
+ }
1581
+ o = vn;
1582
+ }
1583
+ return new o(l, e);
1584
+ }
1585
+ function Ue(n) {
1586
+ return "-" + n.toLowerCase();
1587
+ }
1588
+ function ze(n) {
1589
+ return n.charAt(1).toUpperCase();
1590
+ }
1591
+ const Be = Wn([qn, De, _n, Yn, Xn], "html"), He = Wn([qn, Me, _n, Yn, Xn], "svg");
1592
+ function An(n) {
1593
+ const e = [], t = String(n || "");
1594
+ let l = t.indexOf(","), o = 0, a = !1;
1595
+ for (; !a; ) {
1596
+ l === -1 && (l = t.length, a = !0);
1597
+ const r = t.slice(o, l).trim();
1598
+ (r || !a) && e.push(r), o = l + 1, l = t.indexOf(",", o);
1599
+ }
1600
+ return e;
1601
+ }
1602
+ const En = /[#.]/g;
1603
+ function $e(n, e) {
1604
+ const t = n || "", l = {};
1605
+ let o = 0, a, r;
1606
+ for (; o < t.length; ) {
1607
+ En.lastIndex = o;
1608
+ const c = En.exec(t), u = t.slice(o, c ? c.index : t.length);
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
+ }
1611
+ return {
1612
+ type: "element",
1613
+ // @ts-expect-error: tag name is parsed.
1614
+ tagName: r || e || "div",
1615
+ properties: l,
1616
+ children: []
1617
+ };
1618
+ }
1619
+ function Tn(n) {
1620
+ const e = String(n || "").trim();
1621
+ return e ? e.split(/[ \t\n\r\f]+/g) : [];
1622
+ }
1623
+ function Zn(n, e, t) {
1624
+ const l = t ? qe(t) : void 0;
1625
+ function o(a, r, ...c) {
1626
+ let u;
1627
+ if (a == null) {
1628
+ u = { type: "root", children: [] };
1629
+ const f = (
1630
+ /** @type {Child} */
1631
+ r
1632
+ );
1633
+ c.unshift(f);
1634
+ } else {
1635
+ u = $e(a, e);
1636
+ const f = u.tagName.toLowerCase(), y = l ? l.get(f) : void 0;
1637
+ if (u.tagName = y || f, Fe(r))
1638
+ c.unshift(r);
1639
+ else
1640
+ for (const [b, C] of Object.entries(r))
1641
+ Ve(n, u.properties, b, C);
1642
+ }
1643
+ for (const f of c)
1644
+ mn(u.children, f);
1645
+ return u.type === "element" && u.tagName === "template" && (u.content = { type: "root", children: u.children }, u.children = []), u;
1646
+ }
1647
+ return o;
1648
+ }
1649
+ function Fe(n) {
1650
+ if (n === null || typeof n != "object" || Array.isArray(n))
1651
+ return !0;
1652
+ if (typeof n.type != "string") return !1;
1653
+ const e = (
1654
+ /** @type {Record<string, unknown>} */
1655
+ n
1656
+ ), t = Object.keys(n);
1657
+ for (const l of t) {
1658
+ const o = e[l];
1659
+ if (o && typeof o == "object") {
1660
+ if (!Array.isArray(o)) return !0;
1661
+ const a = (
1662
+ /** @type {ReadonlyArray<unknown>} */
1663
+ o
1664
+ );
1665
+ for (const r of a)
1666
+ if (typeof r != "number" && typeof r != "string")
1667
+ return !0;
1668
+ }
1669
+ }
1670
+ return !!("children" in n && Array.isArray(n.children));
1671
+ }
1672
+ function Ve(n, e, t, l) {
1673
+ const o = Ie(n, t);
1674
+ let a;
1675
+ if (l != null) {
1676
+ if (typeof l == "number") {
1677
+ if (Number.isNaN(l)) return;
1678
+ a = l;
1679
+ } else typeof l == "boolean" ? a = l : typeof l == "string" ? o.spaceSeparated ? a = Tn(l) : o.commaSeparated ? a = An(l) : o.commaOrSpaceSeparated ? a = Tn(An(l).join(" ")) : a = Dn(o, o.property, l) : Array.isArray(l) ? a = [...l] : a = o.property === "style" ? We(l) : String(l);
1680
+ if (Array.isArray(a)) {
1681
+ const r = [];
1682
+ for (const c of a)
1683
+ r.push(
1684
+ /** @type {number | string} */
1685
+ Dn(o, o.property, c)
1686
+ );
1687
+ a = r;
1688
+ }
1689
+ o.property === "className" && Array.isArray(e.className) && (a = e.className.concat(
1690
+ /** @type {Array<number | string> | number | string} */
1691
+ a
1692
+ )), e[o.property] = a;
1693
+ }
1694
+ }
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
+ else
1704
+ throw new Error("Expected node, nodes, or string, got `" + e + "`");
1705
+ }
1706
+ function Dn(n, e, t) {
1707
+ if (typeof t == "string") {
1708
+ if (n.number && t && !Number.isNaN(Number(t)))
1709
+ return Number(t);
1710
+ if ((n.boolean || n.overloadedBoolean) && (t === "" || J(t) === J(e)))
1711
+ return !0;
1712
+ }
1713
+ return t;
1714
+ }
1715
+ function We(n) {
1716
+ const e = [];
1717
+ for (const [t, l] of Object.entries(n))
1718
+ e.push([t, l].join(": "));
1719
+ return e.join("; ");
1720
+ }
1721
+ function qe(n) {
1722
+ const e = /* @__PURE__ */ new Map();
1723
+ for (const t of n)
1724
+ e.set(t.toLowerCase(), t);
1725
+ return e;
1726
+ }
1727
+ const Ge = [
1728
+ "altGlyph",
1729
+ "altGlyphDef",
1730
+ "altGlyphItem",
1731
+ "animateColor",
1732
+ "animateMotion",
1733
+ "animateTransform",
1734
+ "clipPath",
1735
+ "feBlend",
1736
+ "feColorMatrix",
1737
+ "feComponentTransfer",
1738
+ "feComposite",
1739
+ "feConvolveMatrix",
1740
+ "feDiffuseLighting",
1741
+ "feDisplacementMap",
1742
+ "feDistantLight",
1743
+ "feDropShadow",
1744
+ "feFlood",
1745
+ "feFuncA",
1746
+ "feFuncB",
1747
+ "feFuncG",
1748
+ "feFuncR",
1749
+ "feGaussianBlur",
1750
+ "feImage",
1751
+ "feMerge",
1752
+ "feMergeNode",
1753
+ "feMorphology",
1754
+ "feOffset",
1755
+ "fePointLight",
1756
+ "feSpecularLighting",
1757
+ "feSpotLight",
1758
+ "feTile",
1759
+ "feTurbulence",
1760
+ "foreignObject",
1761
+ "glyphRef",
1762
+ "linearGradient",
1763
+ "radialGradient",
1764
+ "solidColor",
1765
+ "textArea",
1766
+ "textPath"
1767
+ ], Ke = Zn(Be, "div");
1768
+ Zn(He, "g", Ge);
1769
+ const _e = [
1770
+ "AElig",
1771
+ "AMP",
1772
+ "Aacute",
1773
+ "Acirc",
1774
+ "Agrave",
1775
+ "Aring",
1776
+ "Atilde",
1777
+ "Auml",
1778
+ "COPY",
1779
+ "Ccedil",
1780
+ "ETH",
1781
+ "Eacute",
1782
+ "Ecirc",
1783
+ "Egrave",
1784
+ "Euml",
1785
+ "GT",
1786
+ "Iacute",
1787
+ "Icirc",
1788
+ "Igrave",
1789
+ "Iuml",
1790
+ "LT",
1791
+ "Ntilde",
1792
+ "Oacute",
1793
+ "Ocirc",
1794
+ "Ograve",
1795
+ "Oslash",
1796
+ "Otilde",
1797
+ "Ouml",
1798
+ "QUOT",
1799
+ "REG",
1800
+ "THORN",
1801
+ "Uacute",
1802
+ "Ucirc",
1803
+ "Ugrave",
1804
+ "Uuml",
1805
+ "Yacute",
1806
+ "aacute",
1807
+ "acirc",
1808
+ "acute",
1809
+ "aelig",
1810
+ "agrave",
1811
+ "amp",
1812
+ "aring",
1813
+ "atilde",
1814
+ "auml",
1815
+ "brvbar",
1816
+ "ccedil",
1817
+ "cedil",
1818
+ "cent",
1819
+ "copy",
1820
+ "curren",
1821
+ "deg",
1822
+ "divide",
1823
+ "eacute",
1824
+ "ecirc",
1825
+ "egrave",
1826
+ "eth",
1827
+ "euml",
1828
+ "frac12",
1829
+ "frac14",
1830
+ "frac34",
1831
+ "gt",
1832
+ "iacute",
1833
+ "icirc",
1834
+ "iexcl",
1835
+ "igrave",
1836
+ "iquest",
1837
+ "iuml",
1838
+ "laquo",
1839
+ "lt",
1840
+ "macr",
1841
+ "micro",
1842
+ "middot",
1843
+ "nbsp",
1844
+ "not",
1845
+ "ntilde",
1846
+ "oacute",
1847
+ "ocirc",
1848
+ "ograve",
1849
+ "ordf",
1850
+ "ordm",
1851
+ "oslash",
1852
+ "otilde",
1853
+ "ouml",
1854
+ "para",
1855
+ "plusmn",
1856
+ "pound",
1857
+ "quot",
1858
+ "raquo",
1859
+ "reg",
1860
+ "sect",
1861
+ "shy",
1862
+ "sup1",
1863
+ "sup2",
1864
+ "sup3",
1865
+ "szlig",
1866
+ "thorn",
1867
+ "times",
1868
+ "uacute",
1869
+ "ucirc",
1870
+ "ugrave",
1871
+ "uml",
1872
+ "uuml",
1873
+ "yacute",
1874
+ "yen",
1875
+ "yuml"
1876
+ ], Mn = {
1877
+ 0: "�",
1878
+ 128: "€",
1879
+ 130: "‚",
1880
+ 131: "ƒ",
1881
+ 132: "„",
1882
+ 133: "…",
1883
+ 134: "†",
1884
+ 135: "‡",
1885
+ 136: "ˆ",
1886
+ 137: "‰",
1887
+ 138: "Š",
1888
+ 139: "‹",
1889
+ 140: "Œ",
1890
+ 142: "Ž",
1891
+ 145: "‘",
1892
+ 146: "’",
1893
+ 147: "“",
1894
+ 148: "”",
1895
+ 149: "•",
1896
+ 150: "–",
1897
+ 151: "—",
1898
+ 152: "˜",
1899
+ 153: "™",
1900
+ 154: "š",
1901
+ 155: "›",
1902
+ 156: "œ",
1903
+ 158: "ž",
1904
+ 159: "Ÿ"
1905
+ };
1906
+ function Jn(n) {
1907
+ const e = typeof n == "string" ? n.charCodeAt(0) : n;
1908
+ return e >= 48 && e <= 57;
1909
+ }
1910
+ function Ye(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
+ }
1914
+ function Xe(n) {
1915
+ const e = typeof n == "string" ? n.charCodeAt(0) : n;
1916
+ return e >= 97 && e <= 122 || e >= 65 && e <= 90;
1917
+ }
1918
+ function Rn(n) {
1919
+ return Xe(n) || Jn(n);
1920
+ }
1921
+ const jn = document.createElement("i");
1922
+ function In(n) {
1923
+ const e = "&" + n + ";";
1924
+ jn.innerHTML = e;
1925
+ const t = jn.textContent;
1926
+ return t.charCodeAt(t.length - 1) === 59 && n !== "semi" || t === e ? !1 : t;
1927
+ }
1928
+ const Ze = [
1929
+ "",
1930
+ /* 1: Non terminated (named) */
1931
+ "Named character references must be terminated by a semicolon",
1932
+ /* 2: Non terminated (numeric) */
1933
+ "Numeric character references must be terminated by a semicolon",
1934
+ /* 3: Empty (named) */
1935
+ "Named character references cannot be empty",
1936
+ /* 4: Empty (numeric) */
1937
+ "Numeric character references cannot be empty",
1938
+ /* 5: Unknown (named) */
1939
+ "Named character references must be known",
1940
+ /* 6: Disallowed (numeric) */
1941
+ "Numeric character references cannot be disallowed",
1942
+ /* 7: Prohibited (numeric) */
1943
+ "Numeric character references cannot be outside the permissible Unicode range"
1944
+ ];
1945
+ function Je(n, e) {
1946
+ const t = {}, l = typeof t.additional == "string" ? t.additional.charCodeAt(0) : t.additional, o = [];
1947
+ let a = 0, r = -1, c = "", u, f;
1948
+ t.position && ("start" in t.position || "indent" in t.position ? (f = t.position.indent, u = t.position.start) : u = t.position);
1949
+ let y = (u ? u.line : 0) || 1, b = (u ? u.column : 0) || 1, C = L(), h;
1950
+ for (a--; ++a <= n.length; )
1951
+ if (h === 10 && (b = (f ? f[r] : 0) || 1), h = n.charCodeAt(a), h === 38) {
1952
+ const g = n.charCodeAt(a + 1);
1953
+ if (g === 9 || g === 10 || g === 12 || g === 32 || g === 38 || g === 60 || Number.isNaN(g) || l && g === l) {
1954
+ c += String.fromCharCode(h), b++;
1955
+ continue;
1956
+ }
1957
+ const w = a + 1;
1958
+ let O = w, p = w, S;
1959
+ if (g === 35) {
1960
+ p = ++O;
1961
+ const d = n.charCodeAt(p);
1962
+ d === 88 || d === 120 ? (S = "hexadecimal", p = ++O) : S = "decimal";
1963
+ } else
1964
+ S = "named";
1965
+ let m = "", k = "", P = "";
1966
+ const U = S === "named" ? Rn : S === "decimal" ? Jn : Ye;
1967
+ for (p--; ++p <= n.length; ) {
1968
+ const d = n.charCodeAt(p);
1969
+ if (!U(d))
1970
+ break;
1971
+ P += String.fromCharCode(d), S === "named" && _e.includes(P) && (m = P, k = In(P));
1972
+ }
1973
+ let R = n.charCodeAt(p) === 59;
1974
+ if (R) {
1975
+ p++;
1976
+ const d = S === "named" ? In(P) : !1;
1977
+ d && (m = P, k = d);
1978
+ }
1979
+ let E = 1 + p - w, D = "";
1980
+ if (!(!R && t.nonTerminated === !1)) if (!P)
1981
+ S !== "named" && N(4, E);
1982
+ else if (S === "named") {
1983
+ if (R && !k)
1984
+ N(5, 1);
1985
+ else if (m !== P && (p = O + m.length, E = 1 + p - O, R = !1), !R) {
1986
+ const d = m ? 1 : 3;
1987
+ if (t.attribute) {
1988
+ const j = n.charCodeAt(p);
1989
+ j === 61 ? (N(d, E), k = "") : Rn(j) ? k = "" : N(d, E);
1990
+ } else
1991
+ N(d, E);
1992
+ }
1993
+ D = k;
1994
+ } else {
1995
+ R || N(2, E);
1996
+ let d = Number.parseInt(
1997
+ P,
1998
+ S === "hexadecimal" ? 16 : 10
1999
+ );
2000
+ if (Qe(d))
2001
+ N(7, E), D = "�";
2002
+ else if (d in Mn)
2003
+ N(6, E), D = Mn[d];
2004
+ else {
2005
+ let j = "";
2006
+ nt(d) && N(6, E), d > 65535 && (d -= 65536, j += String.fromCharCode(
2007
+ d >>> 10 | 55296
2008
+ ), d = 56320 | d & 1023), D = j + String.fromCharCode(d);
2009
+ }
2010
+ }
2011
+ if (D) {
2012
+ v(), C = L(), a = p - 1, b += p - w + 1, o.push(D);
2013
+ const d = L();
2014
+ d.offset++, t.reference && t.reference.call(
2015
+ t.referenceContext || void 0,
2016
+ D,
2017
+ { start: C, end: d },
2018
+ n.slice(w - 1, p)
2019
+ ), C = d;
2020
+ } else
2021
+ P = n.slice(w - 1, p), c += P, b += P.length, a = p - 1;
2022
+ } else
2023
+ h === 10 && (y++, r++, b = 0), Number.isNaN(h) ? v() : (c += String.fromCharCode(h), b++);
2024
+ return o.join("");
2025
+ function L() {
2026
+ return {
2027
+ line: y,
2028
+ column: b,
2029
+ offset: a + ((u ? u.offset : 0) || 0)
2030
+ };
2031
+ }
2032
+ function N(g, w) {
2033
+ let O;
2034
+ t.warning && (O = L(), O.column += w, O.offset += w, t.warning.call(
2035
+ t.warningContext || void 0,
2036
+ Ze[g],
2037
+ O,
2038
+ g
2039
+ ));
2040
+ }
2041
+ function v() {
2042
+ c && (o.push(c), t.text && t.text.call(t.textContext || void 0, c, {
2043
+ start: C,
2044
+ end: L()
2045
+ }), c = "");
2046
+ }
2047
+ }
2048
+ function Qe(n) {
2049
+ return n >= 55296 && n <= 57343 || n > 1114111;
2050
+ }
2051
+ function nt(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
+ }
2054
+ var et = 0, ln = {}, M = {
2055
+ /**
2056
+ * A namespace for utility methods.
2057
+ *
2058
+ * All function in this namespace that are not explicitly marked as _public_ are for __internal use only__ and may
2059
+ * change or disappear at any time.
2060
+ *
2061
+ * @namespace
2062
+ * @memberof Prism
2063
+ */
2064
+ util: {
2065
+ /**
2066
+ * Returns the name of the type of the given value.
2067
+ *
2068
+ * @param {any} o
2069
+ * @returns {string}
2070
+ * @example
2071
+ * type(null) === 'Null'
2072
+ * type(undefined) === 'Undefined'
2073
+ * type(123) === 'Number'
2074
+ * type('foo') === 'String'
2075
+ * type(true) === 'Boolean'
2076
+ * type([1, 2]) === 'Array'
2077
+ * type({}) === 'Object'
2078
+ * type(String) === 'Function'
2079
+ * type(/abc+/) === 'RegExp'
2080
+ */
2081
+ type: function(n) {
2082
+ return Object.prototype.toString.call(n).slice(8, -1);
2083
+ },
2084
+ /**
2085
+ * Returns a unique number for the given object. Later calls will still return the same number.
2086
+ *
2087
+ * @param {Object} obj
2088
+ * @returns {number}
2089
+ */
2090
+ objId: function(n) {
2091
+ return n.__id || Object.defineProperty(n, "__id", { value: ++et }), n.__id;
2092
+ },
2093
+ /**
2094
+ * Creates a deep clone of the given object.
2095
+ *
2096
+ * The main intended use of this function is to clone language definitions.
2097
+ *
2098
+ * @param {T} o
2099
+ * @param {Record<number, any>} [visited]
2100
+ * @returns {T}
2101
+ * @template T
2102
+ */
2103
+ clone: function n(e, t) {
2104
+ t = t || {};
2105
+ var l, o;
2106
+ switch (M.util.type(e)) {
2107
+ case "Object":
2108
+ if (o = M.util.objId(e), t[o])
2109
+ return t[o];
2110
+ l = /** @type {Record<string, any>} */
2111
+ {}, t[o] = l;
2112
+ for (var a in e)
2113
+ e.hasOwnProperty(a) && (l[a] = n(e[a], t));
2114
+ return (
2115
+ /** @type {any} */
2116
+ l
2117
+ );
2118
+ case "Array":
2119
+ return o = M.util.objId(e), t[o] ? t[o] : (l = [], t[o] = l, /** @type {any} */
2120
+ e.forEach(
2121
+ function(r, c) {
2122
+ l[c] = n(r, t);
2123
+ }
2124
+ ), /** @type {any} */
2125
+ l);
2126
+ default:
2127
+ return e;
2128
+ }
2129
+ }
2130
+ },
2131
+ /**
2132
+ * This namespace contains all currently loaded languages and the some helper functions to create and modify languages.
2133
+ *
2134
+ * @namespace
2135
+ * @memberof Prism
2136
+ * @public
2137
+ */
2138
+ languages: {
2139
+ /**
2140
+ * The grammar for plain, unformatted text.
2141
+ */
2142
+ plain: ln,
2143
+ plaintext: ln,
2144
+ text: ln,
2145
+ txt: ln,
2146
+ /**
2147
+ * Creates a deep copy of the language with the given id and appends the given tokens.
2148
+ *
2149
+ * If a token in `redef` also appears in the copied language, then the existing token in the copied language
2150
+ * will be overwritten at its original position.
2151
+ *
2152
+ * ## Best practices
2153
+ *
2154
+ * Since the position of overwriting tokens (token in `redef` that overwrite tokens in the copied language)
2155
+ * doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to
2156
+ * understand the language definition because, normally, the order of tokens matters in Prism grammars.
2157
+ *
2158
+ * Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens.
2159
+ * Furthermore, all non-overwriting tokens should be placed after the overwriting ones.
2160
+ *
2161
+ * @param {string} id The id of the language to extend. This has to be a key in `Prism.languages`.
2162
+ * @param {Grammar} redef The new tokens to append.
2163
+ * @returns {Grammar} The new language created.
2164
+ * @public
2165
+ * @example
2166
+ * Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
2167
+ * // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
2168
+ * // at its original position
2169
+ * 'comment': { ... },
2170
+ * // CSS doesn't have a 'color' token, so this token will be appended
2171
+ * 'color': /\b(?:red|green|blue)\b/
2172
+ * });
2173
+ */
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
+ return t;
2179
+ },
2180
+ /**
2181
+ * Inserts tokens _before_ another token in a language definition or any other grammar.
2182
+ *
2183
+ * ## Usage
2184
+ *
2185
+ * This helper method makes it easy to modify existing languages. For example, the CSS language definition
2186
+ * not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded
2187
+ * in HTML through `<style>` elements. To do this, it needs to modify `Prism.languages.markup` and add the
2188
+ * appropriate tokens. However, `Prism.languages.markup` is a regular JavaScript object literal, so if you do
2189
+ * this:
2190
+ *
2191
+ * ```js
2192
+ * Prism.languages.markup.style = {
2193
+ * // token
2194
+ * };
2195
+ * ```
2196
+ *
2197
+ * then the `style` token will be added (and processed) at the end. `insertBefore` allows you to insert tokens
2198
+ * before existing tokens. For the CSS example above, you would use it like this:
2199
+ *
2200
+ * ```js
2201
+ * Prism.languages.insertBefore('markup', 'cdata', {
2202
+ * 'style': {
2203
+ * // token
2204
+ * }
2205
+ * });
2206
+ * ```
2207
+ *
2208
+ * ## Special cases
2209
+ *
2210
+ * If the grammars of `inside` and `insert` have tokens with the same name, the tokens in `inside`'s grammar
2211
+ * will be ignored.
2212
+ *
2213
+ * This behavior can be used to insert tokens after `before`:
2214
+ *
2215
+ * ```js
2216
+ * Prism.languages.insertBefore('markup', 'comment', {
2217
+ * 'comment': Prism.languages.markup.comment,
2218
+ * // tokens after 'comment'
2219
+ * });
2220
+ * ```
2221
+ *
2222
+ * ## Limitations
2223
+ *
2224
+ * The main problem `insertBefore` has to solve is iteration order. Since ES2015, the iteration order for object
2225
+ * properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave
2226
+ * differently when keys are deleted and re-inserted. So `insertBefore` can't be implemented by temporarily
2227
+ * deleting properties which is necessary to insert at arbitrary positions.
2228
+ *
2229
+ * To solve this problem, `insertBefore` doesn't actually insert the given tokens into the target object.
2230
+ * Instead, it will create a new object and replace all references to the target object with the new one. This
2231
+ * can be done without temporarily deleting properties, so the iteration order is well-defined.
2232
+ *
2233
+ * However, only references that can be reached from `Prism.languages` or `insert` will be replaced. I.e. if
2234
+ * you hold the target object in a variable, then the value of the variable will not change.
2235
+ *
2236
+ * ```js
2237
+ * var oldMarkup = Prism.languages.markup;
2238
+ * var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
2239
+ *
2240
+ * assert(oldMarkup !== Prism.languages.markup);
2241
+ * assert(newMarkup === Prism.languages.markup);
2242
+ * ```
2243
+ *
2244
+ * @param {string} inside The property of `root` (e.g. a language id in `Prism.languages`) that contains the
2245
+ * object to be modified.
2246
+ * @param {string} before The key to insert before.
2247
+ * @param {Grammar} insert An object containing the key-value pairs to be inserted.
2248
+ * @param {Object<string, any>} [root] The object containing `inside`, i.e. the object that contains the
2249
+ * object to be modified.
2250
+ *
2251
+ * Defaults to `Prism.languages`.
2252
+ * @returns {Grammar} The new grammar object.
2253
+ * @public
2254
+ */
2255
+ insertBefore: function(n, e, t, l) {
2256
+ l = l || /** @type {any} */
2257
+ M.languages;
2258
+ var o = l[n], a = {};
2259
+ for (var r in o)
2260
+ if (o.hasOwnProperty(r)) {
2261
+ if (r == e)
2262
+ for (var c in t)
2263
+ t.hasOwnProperty(c) && (a[c] = t[c]);
2264
+ t.hasOwnProperty(r) || (a[r] = o[r]);
2265
+ }
2266
+ var u = l[n];
2267
+ return l[n] = a, M.languages.DFS(M.languages, function(f, y) {
2268
+ y === u && f != n && (this[f] = a);
2269
+ }), a;
2270
+ },
2271
+ // Traverse a language definition with Depth First Search
2272
+ DFS: function n(e, t, l, o) {
2273
+ o = o || {};
2274
+ var a = M.util.objId;
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
+ }
2281
+ }
2282
+ },
2283
+ plugins: {},
2284
+ /**
2285
+ * Low-level function, only use if you know what you’re doing. It accepts a string of text as input
2286
+ * and the language definitions to use, and returns a string with the HTML produced.
2287
+ *
2288
+ * The following hooks will be run:
2289
+ * 1. `before-tokenize`
2290
+ * 2. `after-tokenize`
2291
+ * 3. `wrap`: On each {@link Token}.
2292
+ *
2293
+ * @param {string} text A string with the code to be highlighted.
2294
+ * @param {Grammar} grammar An object containing the tokens to use.
2295
+ *
2296
+ * Usually a language definition like `Prism.languages.markup`.
2297
+ * @param {string} language The name of the language definition passed to `grammar`.
2298
+ * @returns {string} The highlighted HTML.
2299
+ * @memberof Prism
2300
+ * @public
2301
+ * @example
2302
+ * Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
2303
+ */
2304
+ highlight: function(n, e, t) {
2305
+ var l = {
2306
+ code: n,
2307
+ grammar: e,
2308
+ language: t
2309
+ };
2310
+ if (M.hooks.run("before-tokenize", l), !l.grammar)
2311
+ throw new Error('The language "' + l.language + '" has no grammar.');
2312
+ return l.tokens = M.tokenize(l.code, l.grammar), M.hooks.run("after-tokenize", l), X.stringify(M.util.encode(l.tokens), l.language);
2313
+ },
2314
+ /**
2315
+ * This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
2316
+ * and the language definitions to use, and returns an array with the tokenized code.
2317
+ *
2318
+ * When the language definition includes nested tokens, the function is called recursively on each of these tokens.
2319
+ *
2320
+ * This method could be useful in other contexts as well, as a very crude parser.
2321
+ *
2322
+ * @param {string} text A string with the code to be highlighted.
2323
+ * @param {Grammar} grammar An object containing the tokens to use.
2324
+ *
2325
+ * Usually a language definition like `Prism.languages.markup`.
2326
+ * @returns {TokenStream} An array of strings and tokens, a token stream.
2327
+ * @memberof Prism
2328
+ * @public
2329
+ * @example
2330
+ * let code = `var foo = 0;`;
2331
+ * let tokens = Prism.tokenize(code, Prism.languages.javascript);
2332
+ * tokens.forEach(token => {
2333
+ * if (token instanceof Prism.Token && token.type === 'number') {
2334
+ * console.log(`Found numeric literal: ${token.content}`);
2335
+ * }
2336
+ * });
2337
+ */
2338
+ tokenize: function(n, e) {
2339
+ var t = e.rest;
2340
+ if (t) {
2341
+ for (var l in t)
2342
+ e[l] = t[l];
2343
+ delete e.rest;
2344
+ }
2345
+ var o = new tt();
2346
+ return an(o, o.head, n), Qn(n, o, e, o.head, 0), ot(o);
2347
+ },
2348
+ /**
2349
+ * @namespace
2350
+ * @memberof Prism
2351
+ * @public
2352
+ */
2353
+ hooks: {
2354
+ all: {},
2355
+ /**
2356
+ * Adds the given callback to the list of callbacks for the given hook.
2357
+ *
2358
+ * The callback will be invoked when the hook it is registered for is run.
2359
+ * Hooks are usually directly run by a highlight function but you can also run hooks yourself.
2360
+ *
2361
+ * One callback function can be registered to multiple hooks and the same hook multiple times.
2362
+ *
2363
+ * @param {string} name The name of the hook.
2364
+ * @param {HookCallback} callback The callback function which is given environment variables.
2365
+ * @public
2366
+ */
2367
+ add: function(n, e) {
2368
+ var t = M.hooks.all;
2369
+ t[n] = t[n] || [], t[n].push(e);
2370
+ },
2371
+ /**
2372
+ * Runs a hook invoking all registered callbacks with the given environment variables.
2373
+ *
2374
+ * Callbacks will be invoked synchronously and in the order in which they were registered.
2375
+ *
2376
+ * @param {string} name The name of the hook.
2377
+ * @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
2378
+ * @public
2379
+ */
2380
+ run: function(n, e) {
2381
+ var t = M.hooks.all[n];
2382
+ if (!(!t || !t.length))
2383
+ for (var l = 0, o; o = t[l++]; )
2384
+ o(e);
2385
+ }
2386
+ },
2387
+ Token: X
2388
+ };
2389
+ function X(n, e, t, l) {
2390
+ this.type = n, this.content = e, this.alias = t, this.length = (l || "").length | 0;
2391
+ }
2392
+ function Un(n, e, t, l) {
2393
+ n.lastIndex = e;
2394
+ var o = n.exec(t);
2395
+ if (o && l && o[1]) {
2396
+ var a = o[1].length;
2397
+ o.index += a, o[0] = o[0].slice(a);
2398
+ }
2399
+ return o;
2400
+ }
2401
+ function Qn(n, e, t, l, o, a) {
2402
+ for (var r in t)
2403
+ if (!(!t.hasOwnProperty(r) || !t[r])) {
2404
+ var c = t[r];
2405
+ c = Array.isArray(c) ? c : [c];
2406
+ for (var u = 0; u < c.length; ++u) {
2407
+ if (a && a.cause == r + "," + u)
2408
+ return;
2409
+ var f = c[u], y = f.inside, b = !!f.lookbehind, C = !!f.greedy, h = f.alias;
2410
+ if (C && !f.pattern.global) {
2411
+ var L = f.pattern.toString().match(/[imsuy]*$/)[0];
2412
+ f.pattern = RegExp(f.pattern.source, L + "g");
2413
+ }
2414
+ for (var N = f.pattern || f, v = l.next, g = o; v !== e.tail && !(a && g >= a.reach); g += v.value.length, v = v.next) {
2415
+ var w = v.value;
2416
+ if (e.length > n.length)
2417
+ return;
2418
+ if (!(w instanceof X)) {
2419
+ var O = 1, p;
2420
+ if (C) {
2421
+ if (p = Un(N, g, n, b), !p || p.index >= n.length)
2422
+ break;
2423
+ var P = p.index, S = p.index + p[0].length, m = g;
2424
+ for (m += v.value.length; P >= m; )
2425
+ v = v.next, m += v.value.length;
2426
+ if (m -= v.value.length, g = m, v.value instanceof X)
2427
+ continue;
2428
+ for (var k = v; k !== e.tail && (m < S || typeof k.value == "string"); k = k.next)
2429
+ O++, m += k.value.length;
2430
+ O--, w = n.slice(g, m), p.index -= g;
2431
+ } else if (p = Un(N, 0, w, b), !p)
2432
+ continue;
2433
+ var P = p.index, U = p[0], R = w.slice(0, P), E = w.slice(P + U.length), D = g + w.length;
2434
+ a && D > a.reach && (a.reach = D);
2435
+ var d = v.prev;
2436
+ R && (d = an(e, d, R), g += R.length), lt(e, d, O);
2437
+ var j = new X(
2438
+ r,
2439
+ y ? M.tokenize(U, y) : U,
2440
+ h,
2441
+ U
2442
+ );
2443
+ if (v = an(e, d, j), E && an(e, v, E), O > 1) {
2444
+ var B = {
2445
+ cause: r + "," + u,
2446
+ reach: D
2447
+ };
2448
+ Qn(
2449
+ n,
2450
+ e,
2451
+ t,
2452
+ v.prev,
2453
+ g,
2454
+ B
2455
+ ), a && B.reach > a.reach && (a.reach = B.reach);
2456
+ }
2457
+ }
2458
+ }
2459
+ }
2460
+ }
2461
+ }
2462
+ function tt() {
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
+ }
2466
+ function an(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
+ }
2470
+ function lt(n, e, t) {
2471
+ for (var l = e.next, o = 0; o < t && l !== n.tail; o++)
2472
+ l = l.next;
2473
+ e.next = l, l.prev = e, n.length -= o;
2474
+ }
2475
+ function ot(n) {
2476
+ for (var e = [], t = n.head.next; t !== n.tail; )
2477
+ e.push(t.value), t = t.next;
2478
+ return e;
2479
+ }
2480
+ const ne = M;
2481
+ function ee() {
2482
+ }
2483
+ ee.prototype = ne;
2484
+ const T = new ee();
2485
+ T.highlight = at;
2486
+ T.register = it;
2487
+ T.alias = rt;
2488
+ T.registered = ct;
2489
+ T.listLanguages = ut;
2490
+ T.util.encode = st;
2491
+ T.Token.stringify = yn;
2492
+ function at(n, e) {
2493
+ if (typeof n != "string")
2494
+ throw new TypeError("Expected `string` for `value`, got `" + n + "`");
2495
+ let t, l;
2496
+ if (e && typeof e == "object")
2497
+ t = e;
2498
+ else {
2499
+ if (l = e, typeof l != "string")
2500
+ throw new TypeError("Expected `string` for `name`, got `" + l + "`");
2501
+ if (Object.hasOwn(T.languages, l))
2502
+ t = T.languages[l];
2503
+ else
2504
+ throw new Error("Unknown language: `" + l + "` is not registered");
2505
+ }
2506
+ return {
2507
+ type: "root",
2508
+ // @ts-expect-error: we hacked Prism to accept and return the things we want.
2509
+ children: ne.highlight.call(T, n, t, l)
2510
+ };
2511
+ }
2512
+ function it(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
+ }
2517
+ function rt(n, e) {
2518
+ const t = T.languages;
2519
+ let l = {};
2520
+ typeof n == "string" ? e && (l[n] = e) : l = n;
2521
+ let o;
2522
+ for (o in l)
2523
+ if (Object.hasOwn(l, o)) {
2524
+ const a = l[o], r = typeof a == "string" ? [a] : a;
2525
+ let c = -1;
2526
+ for (; ++c < r.length; )
2527
+ t[r[c]] = t[o];
2528
+ }
2529
+ }
2530
+ function ct(n) {
2531
+ if (typeof n != "string")
2532
+ throw new TypeError(
2533
+ "Expected `string` for `aliasOrLanguage`, got `" + n + "`"
2534
+ );
2535
+ return Object.hasOwn(T.languages, n);
2536
+ }
2537
+ function ut() {
2538
+ const n = T.languages, e = [];
2539
+ let t;
2540
+ for (t in n)
2541
+ Object.hasOwn(n, t) && typeof n[t] == "object" && e.push(t);
2542
+ return e;
2543
+ }
2544
+ function yn(n, e) {
2545
+ if (typeof n == "string")
2546
+ return { type: "text", value: n };
2547
+ if (Array.isArray(n)) {
2548
+ const l = [];
2549
+ let o = -1;
2550
+ for (; ++o < n.length; )
2551
+ n[o] !== null && n[o] !== void 0 && n[o] !== "" && l.push(
2552
+ /** @type {Element | Text} */
2553
+ yn(n[o], e)
2554
+ );
2555
+ return l;
2556
+ }
2557
+ const t = {
2558
+ attributes: {},
2559
+ classes: ["token", n.type],
2560
+ content: yn(n.content, e),
2561
+ language: e,
2562
+ tag: "span",
2563
+ type: n.type
2564
+ };
2565
+ return n.alias && t.classes.push(
2566
+ ...typeof n.alias == "string" ? [n.alias] : n.alias
2567
+ ), T.hooks.run("wrap", t), Ke(
2568
+ t.tag + "." + t.classes.join("."),
2569
+ ft(t.attributes),
2570
+ t.content
2571
+ );
2572
+ }
2573
+ function st(n) {
2574
+ return n;
2575
+ }
2576
+ function ft(n) {
2577
+ let e;
2578
+ for (e in n)
2579
+ Object.hasOwn(n, e) && (n[e] = Je(n[e]));
2580
+ return n;
2581
+ }
2582
+ var cn = Ee(T, {});
2583
+ cn.registerLanguage = function(n, e) {
2584
+ return T.register(e);
2585
+ };
2586
+ cn.alias = function(n, e) {
2587
+ return T.alias(n, e);
2588
+ };
2589
+ bn.displayName = "yaml";
2590
+ bn.aliases = ["yml"];
2591
+ function bn(n) {
2592
+ (function(e) {
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
+ /<PLAIN>/g,
2595
+ function() {
2596
+ return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source;
2597
+ }
2598
+ ), r = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;
2599
+ function c(u, f) {
2600
+ f = (f || "").replace(/m/g, "") + "m";
2601
+ var y = /([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g, function() {
2602
+ return o;
2603
+ }).replace(/<<value>>/g, function() {
2604
+ return u;
2605
+ });
2606
+ return RegExp(y, f);
2607
+ }
2608
+ e.languages.yaml = {
2609
+ scalar: {
2610
+ pattern: RegExp(
2611
+ /([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(
2612
+ /<<prop>>/g,
2613
+ function() {
2614
+ return o;
2615
+ }
2616
+ )
2617
+ ),
2618
+ lookbehind: !0,
2619
+ alias: "string"
2620
+ },
2621
+ comment: /#.*/,
2622
+ key: {
2623
+ pattern: RegExp(
2624
+ /((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g, function() {
2625
+ return o;
2626
+ }).replace(/<<key>>/g, function() {
2627
+ return "(?:" + a + "|" + r + ")";
2628
+ })
2629
+ ),
2630
+ lookbehind: !0,
2631
+ greedy: !0,
2632
+ alias: "atrule"
2633
+ },
2634
+ directive: {
2635
+ pattern: /(^[ \t]*)%.+/m,
2636
+ lookbehind: !0,
2637
+ alias: "important"
2638
+ },
2639
+ datetime: {
2640
+ pattern: c(
2641
+ /\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
2642
+ ),
2643
+ lookbehind: !0,
2644
+ alias: "number"
2645
+ },
2646
+ boolean: {
2647
+ pattern: c(/false|true/.source, "i"),
2648
+ lookbehind: !0,
2649
+ alias: "important"
2650
+ },
2651
+ null: {
2652
+ pattern: c(/null|~/.source, "i"),
2653
+ lookbehind: !0,
2654
+ alias: "important"
2655
+ },
2656
+ string: {
2657
+ pattern: c(r),
2658
+ lookbehind: !0,
2659
+ greedy: !0
2660
+ },
2661
+ number: {
2662
+ pattern: c(
2663
+ /[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,
2664
+ "i"
2665
+ ),
2666
+ lookbehind: !0
2667
+ },
2668
+ tag: l,
2669
+ important: t,
2670
+ punctuation: /---|[:[\]{}\-,|>?]|\.\.\./
2671
+ }, e.languages.yml = e.languages.yaml;
2672
+ })(n);
2673
+ }
2674
+ cn.registerLanguage("yaml", bn);
2675
+ const rn = {
2676
+ color: "var(--malachite-codeblock-foreground)",
2677
+ fontSize: "14px",
2678
+ lineHeight: "20px",
2679
+ fontFamily: "var(--malachite-font-mono, monospace)",
2680
+ textAlign: "left",
2681
+ background: "transparent"
2682
+ }, dt = {
2683
+ 'code[class*="language-"]': rn,
2684
+ 'pre[class*="language-"]': rn,
2685
+ comment: { color: "var(--malachite-codeblock-comment)" },
2686
+ prolog: { color: "var(--malachite-codeblock-comment)" },
2687
+ cdata: { color: "var(--malachite-codeblock-comment)" },
2688
+ punctuation: { color: "var(--malachite-codeblock-foreground)" },
2689
+ key: { color: "var(--malachite-codeblock-keyword)" },
2690
+ atrule: { color: "var(--malachite-codeblock-keyword)" },
2691
+ "attr-name": { color: "var(--malachite-codeblock-keyword)" },
2692
+ directive: { color: "var(--malachite-codeblock-keyword)" },
2693
+ keyword: { color: "var(--malachite-codeblock-keyword)" },
2694
+ property: { color: "var(--malachite-codeblock-keyword)" },
2695
+ boolean: { color: "var(--malachite-codeblock-keyword)" },
2696
+ important: { color: "var(--malachite-codeblock-keyword)" },
2697
+ null: { color: "var(--malachite-codeblock-keyword)" },
2698
+ tag: { color: "var(--malachite-codeblock-keyword)" },
2699
+ anchor: { color: "var(--malachite-codeblock-keyword)" },
2700
+ alias: { color: "var(--malachite-codeblock-keyword)" },
2701
+ string: { color: "var(--malachite-codeblock-string)" },
2702
+ scalar: { color: "var(--malachite-codeblock-string)" },
2703
+ char: { color: "var(--malachite-codeblock-string)" },
2704
+ url: { color: "var(--malachite-codeblock-string)" },
2705
+ number: { color: "var(--malachite-codeblock-number)" },
2706
+ datetime: { color: "var(--malachite-codeblock-number)" }
2707
+ }, mt = ({
2708
+ code: n,
2709
+ language: e,
2710
+ showLineNumbers: t = !0,
2711
+ wrapLines: l = !1,
2712
+ copyClearance: o = !1
2713
+ }) => /* @__PURE__ */ ie(
2714
+ cn,
2715
+ {
2716
+ language: e,
2717
+ style: dt,
2718
+ showLineNumbers: t,
2719
+ wrapLongLines: l,
2720
+ lineNumberStyle: {
2721
+ color: "var(--malachite-codeblock-line-number)",
2722
+ minWidth: "40px",
2723
+ paddingRight: "16px"
2724
+ },
2725
+ customStyle: {
2726
+ ...rn,
2727
+ margin: 0,
2728
+ padding: "16px",
2729
+ paddingRight: o ? "44px" : "16px",
2730
+ overflow: "auto"
2731
+ },
2732
+ codeTagProps: { style: rn },
2733
+ children: n
2734
+ }
2735
+ );
2736
+ export {
2737
+ mt as default
2738
+ };
2739
+ //# sourceMappingURL=CodeBlockHighlighter-CgZzaCxO.js.map