react-markdown-table-ts 1.4.2 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +16 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +299 -296
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import Ge, { useRef as wn, useId as
|
1
|
+
import Ge, { useRef as wn, useId as xn, useDeferredValue as En, useTransition as kn, useMemo as An, useEffect as Ne } from "react";
|
2
2
|
var We = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
3
3
|
function _n(u) {
|
4
4
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
@@ -17,13 +17,13 @@ var He;
|
|
17
17
|
function Sn() {
|
18
18
|
if (He) return de;
|
19
19
|
He = 1;
|
20
|
-
var u = Ge, g = Symbol.for("react.element"), t = Symbol.for("react.fragment"),
|
21
|
-
function h(a, c,
|
22
|
-
var p, f = {}, k = null,
|
23
|
-
|
24
|
-
for (p in c)
|
20
|
+
var u = Ge, g = Symbol.for("react.element"), t = Symbol.for("react.fragment"), v = Object.prototype.hasOwnProperty, b = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, x = { key: !0, ref: !0, __self: !0, __source: !0 };
|
21
|
+
function h(a, c, E) {
|
22
|
+
var p, f = {}, k = null, C = null;
|
23
|
+
E !== void 0 && (k = "" + E), c.key !== void 0 && (k = "" + c.key), c.ref !== void 0 && (C = c.ref);
|
24
|
+
for (p in c) v.call(c, p) && !x.hasOwnProperty(p) && (f[p] = c[p]);
|
25
25
|
if (a && a.defaultProps) for (p in c = a.defaultProps, c) f[p] === void 0 && (f[p] = c[p]);
|
26
|
-
return { $$typeof: g, type: a, key: k, ref:
|
26
|
+
return { $$typeof: g, type: a, key: k, ref: C, props: f, _owner: b.current };
|
27
27
|
}
|
28
28
|
return de.Fragment = t, de.jsx = h, de.jsxs = h, de;
|
29
29
|
}
|
@@ -40,11 +40,11 @@ var fe = {};
|
|
40
40
|
var qe;
|
41
41
|
function Fn() {
|
42
42
|
return qe || (qe = 1, process.env.NODE_ENV !== "production" && (function() {
|
43
|
-
var u = Ge, g = Symbol.for("react.element"), t = Symbol.for("react.portal"),
|
43
|
+
var u = Ge, g = Symbol.for("react.element"), t = Symbol.for("react.portal"), v = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), x = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), P = Symbol.iterator, F = "@@iterator";
|
44
44
|
function _(e) {
|
45
45
|
if (e === null || typeof e != "object")
|
46
46
|
return null;
|
47
|
-
var i = P && e[P] || e[
|
47
|
+
var i = P && e[P] || e[F];
|
48
48
|
return typeof i == "function" ? i : null;
|
49
49
|
}
|
50
50
|
var A = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
@@ -59,16 +59,16 @@ function Fn() {
|
|
59
59
|
{
|
60
60
|
var w = A.ReactDebugCurrentFrame, $ = w.getStackAddendum();
|
61
61
|
$ !== "" && (i += "%s", d = d.concat([$]));
|
62
|
-
var
|
62
|
+
var j = d.map(function(T) {
|
63
63
|
return String(T);
|
64
64
|
});
|
65
|
-
|
65
|
+
j.unshift("Warning: " + i), Function.prototype.apply.call(console[e], console, j);
|
66
66
|
}
|
67
67
|
}
|
68
|
-
var o = !1, s = !1, l = !1,
|
68
|
+
var o = !1, s = !1, l = !1, m = !1, S = !1, y;
|
69
69
|
y = Symbol.for("react.module.reference");
|
70
|
-
function
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
70
|
+
function O(e) {
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === v || e === x || S || e === b || e === E || e === p || m || e === C || o || s || l || typeof e == "object" && e !== null && (e.$$typeof === k || e.$$typeof === f || e.$$typeof === h || e.$$typeof === a || e.$$typeof === c || // This needs to include all possible module reference object
|
72
72
|
// types supported by any Flight configuration anywhere since
|
73
73
|
// we don't know which Flight build this will end up being used
|
74
74
|
// with.
|
@@ -92,15 +92,15 @@ function Fn() {
|
|
92
92
|
if (typeof e == "string")
|
93
93
|
return e;
|
94
94
|
switch (e) {
|
95
|
-
case
|
95
|
+
case v:
|
96
96
|
return "Fragment";
|
97
97
|
case t:
|
98
98
|
return "Portal";
|
99
|
-
case
|
99
|
+
case x:
|
100
100
|
return "Profiler";
|
101
|
-
case
|
101
|
+
case b:
|
102
102
|
return "StrictMode";
|
103
|
-
case
|
103
|
+
case E:
|
104
104
|
return "Suspense";
|
105
105
|
case p:
|
106
106
|
return "SuspenseList";
|
@@ -119,9 +119,9 @@ function Fn() {
|
|
119
119
|
var w = e.displayName || null;
|
120
120
|
return w !== null ? w : Y(e.type) || "Memo";
|
121
121
|
case k: {
|
122
|
-
var $ = e,
|
122
|
+
var $ = e, j = $._payload, T = $._init;
|
123
123
|
try {
|
124
|
-
return Y(T(
|
124
|
+
return Y(T(j));
|
125
125
|
} catch {
|
126
126
|
return null;
|
127
127
|
}
|
@@ -222,8 +222,8 @@ function Fn() {
|
|
222
222
|
te = !0;
|
223
223
|
var $ = Error.prepareStackTrace;
|
224
224
|
Error.prepareStackTrace = void 0;
|
225
|
-
var
|
226
|
-
|
225
|
+
var j;
|
226
|
+
j = J.current, J.current = null, V();
|
227
227
|
try {
|
228
228
|
if (i) {
|
229
229
|
var T = function() {
|
@@ -258,17 +258,17 @@ function Fn() {
|
|
258
258
|
}
|
259
259
|
} catch (W) {
|
260
260
|
if (W && w && typeof W.stack == "string") {
|
261
|
-
for (var
|
261
|
+
for (var R = W.stack.split(`
|
262
262
|
`), L = w.stack.split(`
|
263
|
-
`), I =
|
263
|
+
`), I = R.length - 1, D = L.length - 1; I >= 1 && D >= 0 && R[I] !== L[D]; )
|
264
264
|
D--;
|
265
265
|
for (; I >= 1 && D >= 0; I--, D--)
|
266
|
-
if (
|
266
|
+
if (R[I] !== L[D]) {
|
267
267
|
if (I !== 1 || D !== 1)
|
268
268
|
do
|
269
|
-
if (I--, D--, D < 0 ||
|
269
|
+
if (I--, D--, D < 0 || R[I] !== L[D]) {
|
270
270
|
var q = `
|
271
|
-
` +
|
271
|
+
` + R[I].replace(" at new ", " at ");
|
272
272
|
return e.displayName && q.includes("<anonymous>") && (q = q.replace("<anonymous>", e.displayName)), typeof e == "function" && X.set(e, q), q;
|
273
273
|
}
|
274
274
|
while (I >= 1 && D >= 0);
|
@@ -276,7 +276,7 @@ function Fn() {
|
|
276
276
|
}
|
277
277
|
}
|
278
278
|
} finally {
|
279
|
-
te = !1, J.current =
|
279
|
+
te = !1, J.current = j, ne(), Error.prepareStackTrace = $;
|
280
280
|
}
|
281
281
|
var oe = e ? e.displayName || e.name : "", re = oe ? Z(oe) : "";
|
282
282
|
return typeof e == "function" && X.set(e, re), re;
|
@@ -296,7 +296,7 @@ function Fn() {
|
|
296
296
|
if (typeof e == "string")
|
297
297
|
return Z(e);
|
298
298
|
switch (e) {
|
299
|
-
case
|
299
|
+
case E:
|
300
300
|
return Z("Suspense");
|
301
301
|
case p:
|
302
302
|
return Z("SuspenseList");
|
@@ -308,9 +308,9 @@ function Fn() {
|
|
308
308
|
case f:
|
309
309
|
return ve(e.type, i, d);
|
310
310
|
case k: {
|
311
|
-
var w = e, $ = w._payload,
|
311
|
+
var w = e, $ = w._payload, j = w._init;
|
312
312
|
try {
|
313
|
-
return ve(
|
313
|
+
return ve(j($), i, d);
|
314
314
|
} catch {
|
315
315
|
}
|
316
316
|
}
|
@@ -327,20 +327,20 @@ function Fn() {
|
|
327
327
|
}
|
328
328
|
function Ze(e, i, d, w, $) {
|
329
329
|
{
|
330
|
-
var
|
330
|
+
var j = Function.call.bind(ce);
|
331
331
|
for (var T in e)
|
332
|
-
if (
|
333
|
-
var
|
332
|
+
if (j(e, T)) {
|
333
|
+
var R = void 0;
|
334
334
|
try {
|
335
335
|
if (typeof e[T] != "function") {
|
336
336
|
var L = Error((w || "React class") + ": " + d + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
337
337
|
throw L.name = "Invariant Violation", L;
|
338
338
|
}
|
339
|
-
|
339
|
+
R = e[T](i, T, w, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
340
340
|
} catch (I) {
|
341
|
-
|
341
|
+
R = I;
|
342
342
|
}
|
343
|
-
|
343
|
+
R && !(R instanceof Error) && (be($), n("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", d, T, typeof R), be(null)), R instanceof Error && !(R.message in Se) && (Se[R.message] = !0, be($), n("Failed %s type: %s", d, R.message), be(null));
|
344
344
|
}
|
345
345
|
}
|
346
346
|
}
|
@@ -373,7 +373,7 @@ function Fn() {
|
|
373
373
|
ref: !0,
|
374
374
|
__self: !0,
|
375
375
|
__source: !0
|
376
|
-
}, $e,
|
376
|
+
}, $e, je;
|
377
377
|
function rn(e) {
|
378
378
|
if (ce.call(e, "ref")) {
|
379
379
|
var i = Object.getOwnPropertyDescriptor(e, "ref").get;
|
@@ -407,7 +407,7 @@ function Fn() {
|
|
407
407
|
function sn(e, i) {
|
408
408
|
{
|
409
409
|
var d = function() {
|
410
|
-
|
410
|
+
je || (je = !0, n("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", i));
|
411
411
|
};
|
412
412
|
d.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
413
413
|
get: d,
|
@@ -415,8 +415,8 @@ function Fn() {
|
|
415
415
|
});
|
416
416
|
}
|
417
417
|
}
|
418
|
-
var ln = function(e, i, d, w, $,
|
419
|
-
var
|
418
|
+
var ln = function(e, i, d, w, $, j, T) {
|
419
|
+
var R = {
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
421
421
|
$$typeof: g,
|
422
422
|
// Built-in properties that belong on the element
|
@@ -425,60 +425,60 @@ function Fn() {
|
|
425
425
|
ref: d,
|
426
426
|
props: T,
|
427
427
|
// Record the component responsible for creating this element.
|
428
|
-
_owner:
|
428
|
+
_owner: j
|
429
429
|
};
|
430
|
-
return
|
430
|
+
return R._store = {}, Object.defineProperty(R._store, "validated", {
|
431
431
|
configurable: !1,
|
432
432
|
enumerable: !1,
|
433
433
|
writable: !0,
|
434
434
|
value: !1
|
435
|
-
}), Object.defineProperty(
|
435
|
+
}), Object.defineProperty(R, "_self", {
|
436
436
|
configurable: !1,
|
437
437
|
enumerable: !1,
|
438
438
|
writable: !1,
|
439
439
|
value: w
|
440
|
-
}), Object.defineProperty(
|
440
|
+
}), Object.defineProperty(R, "_source", {
|
441
441
|
configurable: !1,
|
442
442
|
enumerable: !1,
|
443
443
|
writable: !1,
|
444
444
|
value: $
|
445
|
-
}), Object.freeze && (Object.freeze(
|
445
|
+
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
446
446
|
};
|
447
447
|
function un(e, i, d, w, $) {
|
448
448
|
{
|
449
|
-
var
|
450
|
-
d !== void 0 && (Ce(d),
|
451
|
-
for (
|
452
|
-
ce.call(i,
|
449
|
+
var j, T = {}, R = null, L = null;
|
450
|
+
d !== void 0 && (Ce(d), R = "" + d), tn(i) && (Ce(i.key), R = "" + i.key), rn(i) && (L = i.ref, an(i, $));
|
451
|
+
for (j in i)
|
452
|
+
ce.call(i, j) && !nn.hasOwnProperty(j) && (T[j] = i[j]);
|
453
453
|
if (e && e.defaultProps) {
|
454
454
|
var I = e.defaultProps;
|
455
|
-
for (
|
456
|
-
T[
|
455
|
+
for (j in I)
|
456
|
+
T[j] === void 0 && (T[j] = I[j]);
|
457
457
|
}
|
458
|
-
if (
|
458
|
+
if (R || L) {
|
459
459
|
var D = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
460
|
-
|
460
|
+
R && on(T, D), L && sn(T, D);
|
461
461
|
}
|
462
|
-
return ln(e,
|
462
|
+
return ln(e, R, L, $, w, Te.current, T);
|
463
463
|
}
|
464
464
|
}
|
465
|
-
var
|
465
|
+
var xe = A.ReactCurrentOwner, Oe = A.ReactDebugCurrentFrame;
|
466
466
|
function ie(e) {
|
467
467
|
if (e) {
|
468
468
|
var i = e._owner, d = ve(e.type, e._source, i ? i.type : null);
|
469
|
-
|
469
|
+
Oe.setExtraStackFrame(d);
|
470
470
|
} else
|
471
|
-
|
471
|
+
Oe.setExtraStackFrame(null);
|
472
472
|
}
|
473
|
-
var
|
474
|
-
|
473
|
+
var Ee;
|
474
|
+
Ee = !1;
|
475
475
|
function ke(e) {
|
476
476
|
return typeof e == "object" && e !== null && e.$$typeof === g;
|
477
477
|
}
|
478
478
|
function Pe() {
|
479
479
|
{
|
480
|
-
if (
|
481
|
-
var e = Y(
|
480
|
+
if (xe.current) {
|
481
|
+
var e = Y(xe.current.type);
|
482
482
|
if (e)
|
483
483
|
return `
|
484
484
|
|
@@ -513,7 +513,7 @@ Check the top-level render call using <` + d + ">.");
|
|
513
513
|
return;
|
514
514
|
Ie[d] = !0;
|
515
515
|
var w = "";
|
516
|
-
e && e._owner && e._owner !==
|
516
|
+
e && e._owner && e._owner !== xe.current && (w = " It was passed a child from " + Y(e._owner.type) + "."), ie(e), n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, w), ie(null);
|
517
517
|
}
|
518
518
|
}
|
519
519
|
function Me(e, i) {
|
@@ -530,7 +530,7 @@ Check the top-level render call using <` + d + ">.");
|
|
530
530
|
else if (e) {
|
531
531
|
var $ = _(e);
|
532
532
|
if (typeof $ == "function" && $ !== e.entries)
|
533
|
-
for (var
|
533
|
+
for (var j = $.call(e), T; !(T = j.next()).done; )
|
534
534
|
ke(T.value) && De(T.value, i);
|
535
535
|
}
|
536
536
|
}
|
@@ -552,8 +552,8 @@ Check the top-level render call using <` + d + ">.");
|
|
552
552
|
if (d) {
|
553
553
|
var w = Y(i);
|
554
554
|
Ze(d, e.props, "prop", w, e);
|
555
|
-
} else if (i.PropTypes !== void 0 && !
|
556
|
-
|
555
|
+
} else if (i.PropTypes !== void 0 && !Ee) {
|
556
|
+
Ee = !0;
|
557
557
|
var $ = Y(i);
|
558
558
|
n("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", $ || "Unknown");
|
559
559
|
}
|
@@ -573,18 +573,18 @@ Check the top-level render call using <` + d + ">.");
|
|
573
573
|
}
|
574
574
|
}
|
575
575
|
var ze = {};
|
576
|
-
function Le(e, i, d, w, $,
|
576
|
+
function Le(e, i, d, w, $, j) {
|
577
577
|
{
|
578
|
-
var T =
|
578
|
+
var T = O(e);
|
579
579
|
if (!T) {
|
580
|
-
var
|
581
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
580
|
+
var R = "";
|
581
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
582
582
|
var L = cn();
|
583
|
-
L ?
|
583
|
+
L ? R += L : R += Pe();
|
584
584
|
var I;
|
585
|
-
e === null ? I = "null" : we(e) ? I = "array" : e !== void 0 && e.$$typeof === g ? (I = "<" + (Y(e.type) || "Unknown") + " />",
|
585
|
+
e === null ? I = "null" : we(e) ? I = "array" : e !== void 0 && e.$$typeof === g ? (I = "<" + (Y(e.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : I = typeof e, n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", I, R);
|
586
586
|
}
|
587
|
-
var D = un(e, i, d, $,
|
587
|
+
var D = un(e, i, d, $, j);
|
588
588
|
if (D == null)
|
589
589
|
return D;
|
590
590
|
if (T) {
|
@@ -614,7 +614,7 @@ React keys must be passed directly to JSX without using spread:
|
|
614
614
|
<%s key={someKey} {...props} />`, Ae, re, bn, re), ze[re + Ae] = !0;
|
615
615
|
}
|
616
616
|
}
|
617
|
-
return e ===
|
617
|
+
return e === v ? gn(D) : fn(D), D;
|
618
618
|
}
|
619
619
|
}
|
620
620
|
function pn(e, i, d) {
|
@@ -624,7 +624,7 @@ React keys must be passed directly to JSX without using spread:
|
|
624
624
|
return Le(e, i, d, !1);
|
625
625
|
}
|
626
626
|
var mn = hn, vn = pn;
|
627
|
-
fe.Fragment =
|
627
|
+
fe.Fragment = v, fe.jsx = mn, fe.jsxs = vn;
|
628
628
|
})()), fe;
|
629
629
|
}
|
630
630
|
var Ue;
|
@@ -643,8 +643,8 @@ function Cn() {
|
|
643
643
|
* @namespace
|
644
644
|
* @public
|
645
645
|
*/
|
646
|
-
var t = (function(
|
647
|
-
var
|
646
|
+
var t = (function(v) {
|
647
|
+
var b = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, x = 0, h = {}, a = {
|
648
648
|
/**
|
649
649
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
650
650
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
@@ -666,7 +666,7 @@ function Cn() {
|
|
666
666
|
* @memberof Prism
|
667
667
|
* @public
|
668
668
|
*/
|
669
|
-
manual:
|
669
|
+
manual: v.Prism && v.Prism.manual,
|
670
670
|
/**
|
671
671
|
* By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
|
672
672
|
* `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
|
@@ -688,7 +688,7 @@ function Cn() {
|
|
688
688
|
* @memberof Prism
|
689
689
|
* @public
|
690
690
|
*/
|
691
|
-
disableWorkerMessageHandler:
|
691
|
+
disableWorkerMessageHandler: v.Prism && v.Prism.disableWorkerMessageHandler,
|
692
692
|
/**
|
693
693
|
* A namespace for utility methods.
|
694
694
|
*
|
@@ -728,7 +728,7 @@ function Cn() {
|
|
728
728
|
* @returns {number}
|
729
729
|
*/
|
730
730
|
objId: function(n) {
|
731
|
-
return n.__id || Object.defineProperty(n, "__id", { value: ++
|
731
|
+
return n.__id || Object.defineProperty(n, "__id", { value: ++x }), n.__id;
|
732
732
|
},
|
733
733
|
/**
|
734
734
|
* Creates a deep clone of the given object.
|
@@ -749,8 +749,8 @@ function Cn() {
|
|
749
749
|
return o[l];
|
750
750
|
s = /** @type {Record<string, any>} */
|
751
751
|
{}, o[l] = s;
|
752
|
-
for (var
|
753
|
-
r.hasOwnProperty(
|
752
|
+
for (var m in r)
|
753
|
+
r.hasOwnProperty(m) && (s[m] = n(r[m], o));
|
754
754
|
return (
|
755
755
|
/** @type {any} */
|
756
756
|
s
|
@@ -758,8 +758,8 @@ function Cn() {
|
|
758
758
|
case "Array":
|
759
759
|
return l = a.util.objId(r), o[l] ? o[l] : (s = [], o[l] = s, /** @type {Array} */
|
760
760
|
/** @type {any} */
|
761
|
-
r.forEach(function(
|
762
|
-
s[y] = n(
|
761
|
+
r.forEach(function(S, y) {
|
762
|
+
s[y] = n(S, o);
|
763
763
|
}), /** @type {any} */
|
764
764
|
s);
|
765
765
|
default:
|
@@ -776,7 +776,7 @@ function Cn() {
|
|
776
776
|
*/
|
777
777
|
getLanguage: function(n) {
|
778
778
|
for (; n; ) {
|
779
|
-
var r =
|
779
|
+
var r = b.exec(n.className);
|
780
780
|
if (r)
|
781
781
|
return r[1].toLowerCase();
|
782
782
|
n = n.parentElement;
|
@@ -791,7 +791,7 @@ function Cn() {
|
|
791
791
|
* @returns {void}
|
792
792
|
*/
|
793
793
|
setLanguage: function(n, r) {
|
794
|
-
n.className = n.className.replace(RegExp(
|
794
|
+
n.className = n.className.replace(RegExp(b, "gi"), ""), n.classList.add("language-" + r);
|
795
795
|
},
|
796
796
|
/**
|
797
797
|
* Returns the script element that is currently executing.
|
@@ -979,28 +979,28 @@ function Cn() {
|
|
979
979
|
insertBefore: function(n, r, o, s) {
|
980
980
|
s = s || /** @type {any} */
|
981
981
|
a.languages;
|
982
|
-
var l = s[n],
|
983
|
-
for (var
|
984
|
-
if (l.hasOwnProperty(
|
985
|
-
if (
|
982
|
+
var l = s[n], m = {};
|
983
|
+
for (var S in l)
|
984
|
+
if (l.hasOwnProperty(S)) {
|
985
|
+
if (S == r)
|
986
986
|
for (var y in o)
|
987
|
-
o.hasOwnProperty(y) && (
|
988
|
-
o.hasOwnProperty(
|
987
|
+
o.hasOwnProperty(y) && (m[y] = o[y]);
|
988
|
+
o.hasOwnProperty(S) || (m[S] = l[S]);
|
989
989
|
}
|
990
|
-
var
|
991
|
-
return s[n] =
|
992
|
-
U ===
|
993
|
-
}),
|
990
|
+
var O = s[n];
|
991
|
+
return s[n] = m, a.languages.DFS(a.languages, function(z, U) {
|
992
|
+
U === O && z != n && (this[z] = m);
|
993
|
+
}), m;
|
994
994
|
},
|
995
995
|
// Traverse a language definition with Depth First Search
|
996
996
|
DFS: function n(r, o, s, l) {
|
997
997
|
l = l || {};
|
998
|
-
var
|
999
|
-
for (var
|
1000
|
-
if (r.hasOwnProperty(
|
1001
|
-
o.call(r,
|
1002
|
-
var y = r[
|
1003
|
-
|
998
|
+
var m = a.util.objId;
|
999
|
+
for (var S in r)
|
1000
|
+
if (r.hasOwnProperty(S)) {
|
1001
|
+
o.call(r, S, r[S], s || S);
|
1002
|
+
var y = r[S], O = a.util.type(y);
|
1003
|
+
O === "Object" && !l[m(y)] ? (l[m(y)] = !0, n(y, o, null, l)) : O === "Array" && !l[m(y)] && (l[m(y)] = !0, n(y, o, S, l));
|
1004
1004
|
}
|
1005
1005
|
}
|
1006
1006
|
},
|
@@ -1042,8 +1042,8 @@ function Cn() {
|
|
1042
1042
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
1043
1043
|
};
|
1044
1044
|
a.hooks.run("before-highlightall", s), s.elements = Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)), a.hooks.run("before-all-elements-highlight", s);
|
1045
|
-
for (var l = 0,
|
1046
|
-
a.highlightElement(
|
1045
|
+
for (var l = 0, m; m = s.elements[l++]; )
|
1046
|
+
a.highlightElement(m, r === !0, s.callback);
|
1047
1047
|
},
|
1048
1048
|
/**
|
1049
1049
|
* Highlights the code inside a single element.
|
@@ -1076,36 +1076,36 @@ function Cn() {
|
|
1076
1076
|
highlightElement: function(n, r, o) {
|
1077
1077
|
var s = a.util.getLanguage(n), l = a.languages[s];
|
1078
1078
|
a.util.setLanguage(n, s);
|
1079
|
-
var
|
1080
|
-
|
1081
|
-
var
|
1079
|
+
var m = n.parentElement;
|
1080
|
+
m && m.nodeName.toLowerCase() === "pre" && a.util.setLanguage(m, s);
|
1081
|
+
var S = n.textContent, y = {
|
1082
1082
|
element: n,
|
1083
1083
|
language: s,
|
1084
1084
|
grammar: l,
|
1085
|
-
code:
|
1085
|
+
code: S
|
1086
1086
|
};
|
1087
|
-
function
|
1087
|
+
function O(U) {
|
1088
1088
|
y.highlightedCode = U, a.hooks.run("before-insert", y), y.element.innerHTML = y.highlightedCode, a.hooks.run("after-highlight", y), a.hooks.run("complete", y), o && o.call(y.element);
|
1089
1089
|
}
|
1090
|
-
if (a.hooks.run("before-sanity-check", y),
|
1090
|
+
if (a.hooks.run("before-sanity-check", y), m = y.element.parentElement, m && m.nodeName.toLowerCase() === "pre" && !m.hasAttribute("tabindex") && m.setAttribute("tabindex", "0"), !y.code) {
|
1091
1091
|
a.hooks.run("complete", y), o && o.call(y.element);
|
1092
1092
|
return;
|
1093
1093
|
}
|
1094
1094
|
if (a.hooks.run("before-highlight", y), !y.grammar) {
|
1095
|
-
|
1095
|
+
O(a.util.encode(y.code));
|
1096
1096
|
return;
|
1097
1097
|
}
|
1098
|
-
if (r &&
|
1098
|
+
if (r && v.Worker) {
|
1099
1099
|
var z = new Worker(a.filename);
|
1100
1100
|
z.onmessage = function(U) {
|
1101
|
-
|
1101
|
+
O(U.data);
|
1102
1102
|
}, z.postMessage(JSON.stringify({
|
1103
1103
|
language: y.language,
|
1104
1104
|
code: y.code,
|
1105
1105
|
immediateClose: !0
|
1106
1106
|
}));
|
1107
1107
|
} else
|
1108
|
-
|
1108
|
+
O(a.highlight(y.code, y.grammar, y.language));
|
1109
1109
|
},
|
1110
1110
|
/**
|
1111
1111
|
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
@@ -1212,7 +1212,7 @@ function Cn() {
|
|
1212
1212
|
},
|
1213
1213
|
Token: c
|
1214
1214
|
};
|
1215
|
-
|
1215
|
+
v.Prism = a;
|
1216
1216
|
function c(n, r, o, s) {
|
1217
1217
|
this.type = n, this.content = r, this.alias = o, this.length = (s || "").length | 0;
|
1218
1218
|
}
|
@@ -1221,8 +1221,8 @@ function Cn() {
|
|
1221
1221
|
return r;
|
1222
1222
|
if (Array.isArray(r)) {
|
1223
1223
|
var s = "";
|
1224
|
-
return r.forEach(function(
|
1225
|
-
s += n(
|
1224
|
+
return r.forEach(function(O) {
|
1225
|
+
s += n(O, o);
|
1226
1226
|
}), s;
|
1227
1227
|
}
|
1228
1228
|
var l = {
|
@@ -1232,43 +1232,43 @@ function Cn() {
|
|
1232
1232
|
classes: ["token", r.type],
|
1233
1233
|
attributes: {},
|
1234
1234
|
language: o
|
1235
|
-
},
|
1236
|
-
|
1237
|
-
var
|
1235
|
+
}, m = r.alias;
|
1236
|
+
m && (Array.isArray(m) ? Array.prototype.push.apply(l.classes, m) : l.classes.push(m)), a.hooks.run("wrap", l);
|
1237
|
+
var S = "";
|
1238
1238
|
for (var y in l.attributes)
|
1239
|
-
|
1240
|
-
return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' +
|
1239
|
+
S += " " + y + '="' + (l.attributes[y] || "").replace(/"/g, """) + '"';
|
1240
|
+
return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' + S + ">" + l.content + "</" + l.tag + ">";
|
1241
1241
|
};
|
1242
|
-
function
|
1242
|
+
function E(n, r, o, s) {
|
1243
1243
|
n.lastIndex = r;
|
1244
1244
|
var l = n.exec(o);
|
1245
1245
|
if (l && s && l[1]) {
|
1246
|
-
var
|
1247
|
-
l.index +=
|
1246
|
+
var m = l[1].length;
|
1247
|
+
l.index += m, l[0] = l[0].slice(m);
|
1248
1248
|
}
|
1249
1249
|
return l;
|
1250
1250
|
}
|
1251
|
-
function p(n, r, o, s, l,
|
1252
|
-
for (var
|
1253
|
-
if (!(!o.hasOwnProperty(
|
1254
|
-
var y = o[
|
1251
|
+
function p(n, r, o, s, l, m) {
|
1252
|
+
for (var S in o)
|
1253
|
+
if (!(!o.hasOwnProperty(S) || !o[S])) {
|
1254
|
+
var y = o[S];
|
1255
1255
|
y = Array.isArray(y) ? y : [y];
|
1256
|
-
for (var
|
1257
|
-
if (
|
1256
|
+
for (var O = 0; O < y.length; ++O) {
|
1257
|
+
if (m && m.cause == S + "," + O)
|
1258
1258
|
return;
|
1259
|
-
var z = y[
|
1259
|
+
var z = y[O], U = z.inside, Y = !!z.lookbehind, B = !!z.greedy, Q = z.alias;
|
1260
1260
|
if (B && !z.pattern.global) {
|
1261
1261
|
var pe = z.pattern.toString().match(/[imsuy]*$/)[0];
|
1262
1262
|
z.pattern = RegExp(z.pattern.source, pe + "g");
|
1263
1263
|
}
|
1264
|
-
for (var le = z.pattern || z, M = s.next, H = l; M !== r.tail && !(
|
1264
|
+
for (var le = z.pattern || z, M = s.next, H = l; M !== r.tail && !(m && H >= m.reach); H += M.value.length, M = M.next) {
|
1265
1265
|
var G = M.value;
|
1266
1266
|
if (r.length > n.length)
|
1267
1267
|
return;
|
1268
1268
|
if (!(G instanceof c)) {
|
1269
1269
|
var ee = 1, N;
|
1270
1270
|
if (B) {
|
1271
|
-
if (N =
|
1271
|
+
if (N = E(le, H, n, Y), !N || N.index >= n.length)
|
1272
1272
|
break;
|
1273
1273
|
var J = N.index, he = N.index + N[0].length, V = H;
|
1274
1274
|
for (V += M.value.length; J >= V; )
|
@@ -1278,19 +1278,19 @@ function Cn() {
|
|
1278
1278
|
for (var ne = M; ne !== r.tail && (V < he || typeof ne.value == "string"); ne = ne.next)
|
1279
1279
|
ee++, V += ne.value.length;
|
1280
1280
|
ee--, G = n.slice(H, V), N.index -= H;
|
1281
|
-
} else if (N =
|
1281
|
+
} else if (N = E(le, 0, G, Y), !N)
|
1282
1282
|
continue;
|
1283
1283
|
var J = N.index, K = N[0], Z = G.slice(0, J), te = G.slice(J + K.length), X = H + G.length;
|
1284
|
-
|
1284
|
+
m && X > m.reach && (m.reach = X);
|
1285
1285
|
var ae = M.prev;
|
1286
|
-
Z && (ae = k(r, ae, Z), H += Z.length),
|
1287
|
-
var me = new c(
|
1286
|
+
Z && (ae = k(r, ae, Z), H += Z.length), C(r, ae, ee);
|
1287
|
+
var me = new c(S, U ? a.tokenize(K, U) : K, Q, K);
|
1288
1288
|
if (M = k(r, ae, me), te && k(r, M, te), ee > 1) {
|
1289
1289
|
var ue = {
|
1290
|
-
cause:
|
1290
|
+
cause: S + "," + O,
|
1291
1291
|
reach: X
|
1292
1292
|
};
|
1293
|
-
p(n, r, o, M.prev, H, ue),
|
1293
|
+
p(n, r, o, M.prev, H, ue), m && ue.reach > m.reach && (m.reach = ue.reach);
|
1294
1294
|
}
|
1295
1295
|
}
|
1296
1296
|
}
|
@@ -1305,7 +1305,7 @@ function Cn() {
|
|
1305
1305
|
var s = r.next, l = { value: o, prev: r, next: s };
|
1306
1306
|
return r.next = l, s.prev = l, n.length++, l;
|
1307
1307
|
}
|
1308
|
-
function
|
1308
|
+
function C(n, r, o) {
|
1309
1309
|
for (var s = r.next, l = 0; l < o && s !== n.tail; l++)
|
1310
1310
|
s = s.next;
|
1311
1311
|
r.next = s, s.prev = r, n.length -= l;
|
@@ -1315,19 +1315,19 @@ function Cn() {
|
|
1315
1315
|
r.push(o.value), o = o.next;
|
1316
1316
|
return r;
|
1317
1317
|
}
|
1318
|
-
if (!
|
1319
|
-
return
|
1318
|
+
if (!v.document)
|
1319
|
+
return v.addEventListener && (a.disableWorkerMessageHandler || v.addEventListener("message", function(n) {
|
1320
1320
|
var r = JSON.parse(n.data), o = r.language, s = r.code, l = r.immediateClose;
|
1321
|
-
|
1321
|
+
v.postMessage(a.highlight(s, a.languages[o], o)), l && v.close();
|
1322
1322
|
}, !1)), a;
|
1323
|
-
var
|
1324
|
-
|
1323
|
+
var F = a.util.currentScript();
|
1324
|
+
F && (a.filename = F.src, F.hasAttribute("data-manual") && (a.manual = !0));
|
1325
1325
|
function _() {
|
1326
1326
|
a.manual || a.highlightAll();
|
1327
1327
|
}
|
1328
1328
|
if (!a.manual) {
|
1329
1329
|
var A = document.readyState;
|
1330
|
-
A === "loading" || A === "interactive" &&
|
1330
|
+
A === "loading" || A === "interactive" && F && F.defer ? document.addEventListener("DOMContentLoaded", _) : window.requestAnimationFrame ? window.requestAnimationFrame(_) : window.setTimeout(_, 16);
|
1331
1331
|
}
|
1332
1332
|
return a;
|
1333
1333
|
})(g);
|
@@ -1408,8 +1408,8 @@ function Cn() {
|
|
1408
1408
|
},
|
1409
1409
|
/&#x?[\da-f]{1,8};/i
|
1410
1410
|
]
|
1411
|
-
}, t.languages.markup.tag.inside["attr-value"].inside.entity = t.languages.markup.entity, t.languages.markup.doctype.inside["internal-subset"].inside = t.languages.markup, t.hooks.add("wrap", function(
|
1412
|
-
|
1411
|
+
}, t.languages.markup.tag.inside["attr-value"].inside.entity = t.languages.markup.entity, t.languages.markup.doctype.inside["internal-subset"].inside = t.languages.markup, t.hooks.add("wrap", function(v) {
|
1412
|
+
v.type === "entity" && (v.attributes.title = v.content.replace(/&/, "&"));
|
1413
1413
|
}), Object.defineProperty(t.languages.markup.tag, "addInlined", {
|
1414
1414
|
/**
|
1415
1415
|
* Adds an inlined language to markup.
|
@@ -1422,12 +1422,12 @@ function Cn() {
|
|
1422
1422
|
* @example
|
1423
1423
|
* addInlined('style', 'css');
|
1424
1424
|
*/
|
1425
|
-
value: function(
|
1425
|
+
value: function(b, x) {
|
1426
1426
|
var h = {};
|
1427
|
-
h["language-" +
|
1427
|
+
h["language-" + x] = {
|
1428
1428
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
1429
1429
|
lookbehind: !0,
|
1430
|
-
inside: t.languages[
|
1430
|
+
inside: t.languages[x]
|
1431
1431
|
}, h.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
1432
1432
|
var a = {
|
1433
1433
|
"included-cdata": {
|
@@ -1435,14 +1435,14 @@ function Cn() {
|
|
1435
1435
|
inside: h
|
1436
1436
|
}
|
1437
1437
|
};
|
1438
|
-
a["language-" +
|
1438
|
+
a["language-" + x] = {
|
1439
1439
|
pattern: /[\s\S]+/,
|
1440
|
-
inside: t.languages[
|
1440
|
+
inside: t.languages[x]
|
1441
1441
|
};
|
1442
1442
|
var c = {};
|
1443
|
-
c[
|
1443
|
+
c[b] = {
|
1444
1444
|
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
1445
|
-
return
|
1445
|
+
return b;
|
1446
1446
|
}), "i"),
|
1447
1447
|
lookbehind: !0,
|
1448
1448
|
greedy: !0,
|
@@ -1461,10 +1461,10 @@ function Cn() {
|
|
1461
1461
|
* @example
|
1462
1462
|
* addAttribute('style', 'css');
|
1463
1463
|
*/
|
1464
|
-
value: function(
|
1464
|
+
value: function(v, b) {
|
1465
1465
|
t.languages.markup.tag.inside["special-attr"].push({
|
1466
1466
|
pattern: RegExp(
|
1467
|
-
/(^|["'\s])/.source + "(?:" +
|
1467
|
+
/(^|["'\s])/.source + "(?:" + v + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
1468
1468
|
"i"
|
1469
1469
|
),
|
1470
1470
|
lookbehind: !0,
|
@@ -1476,8 +1476,8 @@ function Cn() {
|
|
1476
1476
|
value: {
|
1477
1477
|
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
1478
1478
|
lookbehind: !0,
|
1479
|
-
alias: [
|
1480
|
-
inside: t.languages[
|
1479
|
+
alias: [b, "language-" + b],
|
1480
|
+
inside: t.languages[b]
|
1481
1481
|
},
|
1482
1482
|
punctuation: [
|
1483
1483
|
{
|
@@ -1491,12 +1491,12 @@ function Cn() {
|
|
1491
1491
|
}
|
1492
1492
|
});
|
1493
1493
|
}
|
1494
|
-
}), t.languages.html = t.languages.markup, t.languages.mathml = t.languages.markup, t.languages.svg = t.languages.markup, t.languages.xml = t.languages.extend("markup", {}), t.languages.ssml = t.languages.xml, t.languages.atom = t.languages.xml, t.languages.rss = t.languages.xml, (function(
|
1495
|
-
var
|
1496
|
-
|
1494
|
+
}), t.languages.html = t.languages.markup, t.languages.mathml = t.languages.markup, t.languages.svg = t.languages.markup, t.languages.xml = t.languages.extend("markup", {}), t.languages.ssml = t.languages.xml, t.languages.atom = t.languages.xml, t.languages.rss = t.languages.xml, (function(v) {
|
1495
|
+
var b = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
1496
|
+
v.languages.css = {
|
1497
1497
|
comment: /\/\*[\s\S]*?\*\//,
|
1498
1498
|
atrule: {
|
1499
|
-
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" +
|
1499
|
+
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + b.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
1500
1500
|
inside: {
|
1501
1501
|
rule: /^@[\w-]+/,
|
1502
1502
|
"selector-function-argument": {
|
@@ -1513,23 +1513,23 @@ function Cn() {
|
|
1513
1513
|
},
|
1514
1514
|
url: {
|
1515
1515
|
// https://drafts.csswg.org/css-values-3/#urls
|
1516
|
-
pattern: RegExp("\\burl\\((?:" +
|
1516
|
+
pattern: RegExp("\\burl\\((?:" + b.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
|
1517
1517
|
greedy: !0,
|
1518
1518
|
inside: {
|
1519
1519
|
function: /^url/i,
|
1520
1520
|
punctuation: /^\(|\)$/,
|
1521
1521
|
string: {
|
1522
|
-
pattern: RegExp("^" +
|
1522
|
+
pattern: RegExp("^" + b.source + "$"),
|
1523
1523
|
alias: "url"
|
1524
1524
|
}
|
1525
1525
|
}
|
1526
1526
|
},
|
1527
1527
|
selector: {
|
1528
|
-
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` +
|
1528
|
+
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + b.source + ")*(?=\\s*\\{)"),
|
1529
1529
|
lookbehind: !0
|
1530
1530
|
},
|
1531
1531
|
string: {
|
1532
|
-
pattern:
|
1532
|
+
pattern: b,
|
1533
1533
|
greedy: !0
|
1534
1534
|
},
|
1535
1535
|
property: {
|
@@ -1542,9 +1542,9 @@ function Cn() {
|
|
1542
1542
|
lookbehind: !0
|
1543
1543
|
},
|
1544
1544
|
punctuation: /[(){};:,]/
|
1545
|
-
},
|
1546
|
-
var
|
1547
|
-
|
1545
|
+
}, v.languages.css.atrule.inside.rest = v.languages.css;
|
1546
|
+
var x = v.languages.markup;
|
1547
|
+
x && (x.tag.addInlined("style", "css"), x.tag.addAttribute("style", "css"));
|
1548
1548
|
})(t), t.languages.clike = {
|
1549
1549
|
comment: [
|
1550
1550
|
{
|
@@ -1709,9 +1709,9 @@ function Cn() {
|
|
1709
1709
|
if (typeof t > "u" || typeof document > "u")
|
1710
1710
|
return;
|
1711
1711
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
1712
|
-
var
|
1713
|
-
return "✖ Error " +
|
1714
|
-
},
|
1712
|
+
var v = "Loading…", b = function(F, _) {
|
1713
|
+
return "✖ Error " + F + " while fetching file: " + _;
|
1714
|
+
}, x = "✖ Error: File does not exist or is empty", h = {
|
1715
1715
|
js: "javascript",
|
1716
1716
|
py: "python",
|
1717
1717
|
rb: "ruby",
|
@@ -1721,32 +1721,32 @@ function Cn() {
|
|
1721
1721
|
bat: "batch",
|
1722
1722
|
h: "c",
|
1723
1723
|
tex: "latex"
|
1724
|
-
}, a = "data-src-status", c = "loading",
|
1725
|
-
function k(
|
1724
|
+
}, a = "data-src-status", c = "loading", E = "loaded", p = "failed", f = "pre[data-src]:not([" + a + '="' + E + '"]):not([' + a + '="' + c + '"])';
|
1725
|
+
function k(F, _, A) {
|
1726
1726
|
var n = new XMLHttpRequest();
|
1727
|
-
n.open("GET",
|
1728
|
-
n.readyState == 4 && (n.status < 400 && n.responseText ? _(n.responseText) : n.status >= 400 ? A(
|
1727
|
+
n.open("GET", F, !0), n.onreadystatechange = function() {
|
1728
|
+
n.readyState == 4 && (n.status < 400 && n.responseText ? _(n.responseText) : n.status >= 400 ? A(b(n.status, n.statusText)) : A(x));
|
1729
1729
|
}, n.send(null);
|
1730
1730
|
}
|
1731
|
-
function
|
1732
|
-
var _ = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(
|
1731
|
+
function C(F) {
|
1732
|
+
var _ = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(F || "");
|
1733
1733
|
if (_) {
|
1734
1734
|
var A = Number(_[1]), n = _[2], r = _[3];
|
1735
1735
|
return n ? r ? [A, Number(r)] : [A, void 0] : [A, A];
|
1736
1736
|
}
|
1737
1737
|
}
|
1738
|
-
t.hooks.add("before-highlightall", function(
|
1739
|
-
|
1740
|
-
}), t.hooks.add("before-sanity-check", function(
|
1738
|
+
t.hooks.add("before-highlightall", function(F) {
|
1739
|
+
F.selector += ", " + f;
|
1740
|
+
}), t.hooks.add("before-sanity-check", function(F) {
|
1741
1741
|
var _ = (
|
1742
1742
|
/** @type {HTMLPreElement} */
|
1743
|
-
|
1743
|
+
F.element
|
1744
1744
|
);
|
1745
1745
|
if (_.matches(f)) {
|
1746
|
-
|
1746
|
+
F.code = "", _.setAttribute(a, c);
|
1747
1747
|
var A = _.appendChild(document.createElement("CODE"));
|
1748
|
-
A.textContent =
|
1749
|
-
var n = _.getAttribute("data-src"), r =
|
1748
|
+
A.textContent = v;
|
1749
|
+
var n = _.getAttribute("data-src"), r = F.language;
|
1750
1750
|
if (r === "none") {
|
1751
1751
|
var o = (/\.(\w+)$/.exec(n) || [, "none"])[1];
|
1752
1752
|
r = h[o] || o;
|
@@ -1756,11 +1756,11 @@ function Cn() {
|
|
1756
1756
|
s && s.loadLanguages(r), k(
|
1757
1757
|
n,
|
1758
1758
|
function(l) {
|
1759
|
-
_.setAttribute(a,
|
1760
|
-
var
|
1761
|
-
if (
|
1762
|
-
var
|
1763
|
-
y < 0 && (y +=
|
1759
|
+
_.setAttribute(a, E);
|
1760
|
+
var m = C(_.getAttribute("data-range"));
|
1761
|
+
if (m) {
|
1762
|
+
var S = l.split(/\r\n?|\n/g), y = m[0], O = m[1] == null ? S.length : m[1];
|
1763
|
+
y < 0 && (y += S.length), y = Math.max(0, Math.min(y - 1, S.length)), O < 0 && (O += S.length), O = Math.max(0, Math.min(O, S.length)), l = S.slice(y, O).join(`
|
1764
1764
|
`), _.hasAttribute("data-start") || _.setAttribute("data-start", String(y + 1));
|
1765
1765
|
}
|
1766
1766
|
A.textContent = l, t.highlightElement(A);
|
@@ -1799,9 +1799,9 @@ const $n = /* @__PURE__ */ _n(Tn);
|
|
1799
1799
|
return g;
|
1800
1800
|
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + p + ")");
|
1801
1801
|
}
|
1802
|
-
var
|
1803
|
-
return
|
1804
|
-
}),
|
1802
|
+
var v = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, b = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
1803
|
+
return v;
|
1804
|
+
}), x = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
|
1805
1805
|
u.languages.markdown = u.languages.extend("markup", {}), u.languages.insertBefore("markdown", "prolog", {
|
1806
1806
|
"front-matter-block": {
|
1807
1807
|
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
@@ -1822,31 +1822,31 @@ const $n = /* @__PURE__ */ _n(Tn);
|
|
1822
1822
|
alias: "punctuation"
|
1823
1823
|
},
|
1824
1824
|
table: {
|
1825
|
-
pattern: RegExp("^" +
|
1825
|
+
pattern: RegExp("^" + b + x + "(?:" + b + ")*", "m"),
|
1826
1826
|
inside: {
|
1827
1827
|
"table-data-rows": {
|
1828
|
-
pattern: RegExp("^(" +
|
1828
|
+
pattern: RegExp("^(" + b + x + ")(?:" + b + ")*$"),
|
1829
1829
|
lookbehind: !0,
|
1830
1830
|
inside: {
|
1831
1831
|
"table-data": {
|
1832
|
-
pattern: RegExp(
|
1832
|
+
pattern: RegExp(v),
|
1833
1833
|
inside: u.languages.markdown
|
1834
1834
|
},
|
1835
1835
|
punctuation: /\|/
|
1836
1836
|
}
|
1837
1837
|
},
|
1838
1838
|
"table-line": {
|
1839
|
-
pattern: RegExp("^(" +
|
1839
|
+
pattern: RegExp("^(" + b + ")" + x + "$"),
|
1840
1840
|
lookbehind: !0,
|
1841
1841
|
inside: {
|
1842
1842
|
punctuation: /\||:?-{3,}:?/
|
1843
1843
|
}
|
1844
1844
|
},
|
1845
1845
|
"table-header-row": {
|
1846
|
-
pattern: RegExp("^" +
|
1846
|
+
pattern: RegExp("^" + b + "$"),
|
1847
1847
|
inside: {
|
1848
1848
|
"table-header": {
|
1849
|
-
pattern: RegExp(
|
1849
|
+
pattern: RegExp(v),
|
1850
1850
|
alias: "important",
|
1851
1851
|
inside: u.languages.markdown
|
1852
1852
|
},
|
@@ -2035,13 +2035,13 @@ const $n = /* @__PURE__ */ _n(Tn);
|
|
2035
2035
|
return;
|
2036
2036
|
function f(k) {
|
2037
2037
|
if (!(!k || typeof k == "string"))
|
2038
|
-
for (var
|
2039
|
-
var
|
2040
|
-
if (
|
2041
|
-
f(
|
2038
|
+
for (var C = 0, P = k.length; C < P; C++) {
|
2039
|
+
var F = k[C];
|
2040
|
+
if (F.type !== "code") {
|
2041
|
+
f(F.content);
|
2042
2042
|
continue;
|
2043
2043
|
}
|
2044
|
-
var _ =
|
2044
|
+
var _ = F.content[1], A = F.content[3];
|
2045
2045
|
if (_ && A && _.type === "code-language" && A.type === "code-block" && typeof _.content == "string") {
|
2046
2046
|
var n = _.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
|
2047
2047
|
n = (/[a-z][\w-]*/i.exec(n) || [""])[0].toLowerCase();
|
@@ -2053,16 +2053,16 @@ const $n = /* @__PURE__ */ _n(Tn);
|
|
2053
2053
|
f(p.tokens);
|
2054
2054
|
}), u.hooks.add("wrap", function(p) {
|
2055
2055
|
if (p.type === "code-block") {
|
2056
|
-
for (var f = "", k = 0,
|
2057
|
-
var P = p.classes[k],
|
2058
|
-
if (
|
2059
|
-
f =
|
2056
|
+
for (var f = "", k = 0, C = p.classes.length; k < C; k++) {
|
2057
|
+
var P = p.classes[k], F = /language-(.+)/.exec(P);
|
2058
|
+
if (F) {
|
2059
|
+
f = F[1];
|
2060
2060
|
break;
|
2061
2061
|
}
|
2062
2062
|
}
|
2063
2063
|
var _ = u.languages[f];
|
2064
2064
|
if (_)
|
2065
|
-
p.content = u.highlight(
|
2065
|
+
p.content = u.highlight(E(p.content), _, f);
|
2066
2066
|
else if (f && f !== "none" && u.plugins.autoloader) {
|
2067
2067
|
var A = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
|
2068
2068
|
p.attributes.id = A, u.plugins.autoloader.loadLanguages(f, function() {
|
@@ -2078,22 +2078,22 @@ const $n = /* @__PURE__ */ _n(Tn);
|
|
2078
2078
|
gt: ">",
|
2079
2079
|
quot: '"'
|
2080
2080
|
}, c = String.fromCodePoint || String.fromCharCode;
|
2081
|
-
function
|
2081
|
+
function E(p) {
|
2082
2082
|
var f = p.replace(h, "");
|
2083
|
-
return f = f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(k,
|
2084
|
-
if (
|
2083
|
+
return f = f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(k, C) {
|
2084
|
+
if (C = C.toLowerCase(), C[0] === "#") {
|
2085
2085
|
var P;
|
2086
|
-
return
|
2086
|
+
return C[1] === "x" ? P = parseInt(C.slice(2), 16) : P = Number(C.slice(1)), c(P);
|
2087
2087
|
} else {
|
2088
|
-
var
|
2089
|
-
return
|
2088
|
+
var F = a[C];
|
2089
|
+
return F || k;
|
2090
2090
|
}
|
2091
2091
|
}), f;
|
2092
2092
|
}
|
2093
2093
|
u.languages.md = u.languages.markdown;
|
2094
2094
|
})(Prism);
|
2095
2095
|
var Be = {}, Ve;
|
2096
|
-
function
|
2096
|
+
function jn() {
|
2097
2097
|
return Ve || (Ve = 1, (function() {
|
2098
2098
|
if (typeof Prism > "u" || typeof document > "u")
|
2099
2099
|
return;
|
@@ -2109,9 +2109,9 @@ function On() {
|
|
2109
2109
|
if (!(h.tagName !== "PRE" || !h.classList.contains(u))) {
|
2110
2110
|
var c = h.querySelector(".line-numbers-rows");
|
2111
2111
|
if (c) {
|
2112
|
-
var
|
2113
|
-
a <
|
2114
|
-
var f = a -
|
2112
|
+
var E = parseInt(h.getAttribute("data-start"), 10) || 1, p = E + (c.children.length - 1);
|
2113
|
+
a < E && (a = E), a > p && (a = p);
|
2114
|
+
var f = a - E;
|
2115
2115
|
return c.children[f];
|
2116
2116
|
}
|
2117
2117
|
}
|
@@ -2125,7 +2125,7 @@ function On() {
|
|
2125
2125
|
* @returns {void}
|
2126
2126
|
*/
|
2127
2127
|
resize: function(h) {
|
2128
|
-
|
2128
|
+
v([h]);
|
2129
2129
|
},
|
2130
2130
|
/**
|
2131
2131
|
* Whether the plugin can assume that the units font sizes and margins are not depended on the size of
|
@@ -2139,52 +2139,52 @@ function On() {
|
|
2139
2139
|
*/
|
2140
2140
|
assumeViewportIndependence: !0
|
2141
2141
|
};
|
2142
|
-
function
|
2142
|
+
function v(h) {
|
2143
2143
|
if (h = h.filter(function(c) {
|
2144
|
-
var
|
2144
|
+
var E = b(c), p = E["white-space"];
|
2145
2145
|
return p === "pre-wrap" || p === "pre-line";
|
2146
2146
|
}), h.length != 0) {
|
2147
2147
|
var a = h.map(function(c) {
|
2148
|
-
var
|
2149
|
-
if (!(!
|
2150
|
-
var f = c.querySelector(".line-numbers-sizer"), k =
|
2151
|
-
f || (f = document.createElement("span"), f.className = "line-numbers-sizer",
|
2152
|
-
var
|
2148
|
+
var E = c.querySelector("code"), p = c.querySelector(".line-numbers-rows");
|
2149
|
+
if (!(!E || !p)) {
|
2150
|
+
var f = c.querySelector(".line-numbers-sizer"), k = E.textContent.split(g);
|
2151
|
+
f || (f = document.createElement("span"), f.className = "line-numbers-sizer", E.appendChild(f)), f.innerHTML = "0", f.style.display = "block";
|
2152
|
+
var C = f.getBoundingClientRect().height;
|
2153
2153
|
return f.innerHTML = "", {
|
2154
2154
|
element: c,
|
2155
2155
|
lines: k,
|
2156
2156
|
lineHeights: [],
|
2157
|
-
oneLinerHeight:
|
2157
|
+
oneLinerHeight: C,
|
2158
2158
|
sizer: f
|
2159
2159
|
};
|
2160
2160
|
}
|
2161
2161
|
}).filter(Boolean);
|
2162
2162
|
a.forEach(function(c) {
|
2163
|
-
var
|
2164
|
-
f[p.length - 1] = void 0, p.forEach(function(
|
2165
|
-
if (
|
2166
|
-
var
|
2167
|
-
|
2163
|
+
var E = c.sizer, p = c.lines, f = c.lineHeights, k = c.oneLinerHeight;
|
2164
|
+
f[p.length - 1] = void 0, p.forEach(function(C, P) {
|
2165
|
+
if (C && C.length > 1) {
|
2166
|
+
var F = E.appendChild(document.createElement("span"));
|
2167
|
+
F.style.display = "block", F.textContent = C;
|
2168
2168
|
} else
|
2169
2169
|
f[P] = k;
|
2170
2170
|
});
|
2171
2171
|
}), a.forEach(function(c) {
|
2172
|
-
for (var
|
2173
|
-
p[k] === void 0 && (p[k] =
|
2172
|
+
for (var E = c.sizer, p = c.lineHeights, f = 0, k = 0; k < p.length; k++)
|
2173
|
+
p[k] === void 0 && (p[k] = E.children[f++].getBoundingClientRect().height);
|
2174
2174
|
}), a.forEach(function(c) {
|
2175
|
-
var
|
2176
|
-
|
2175
|
+
var E = c.sizer, p = c.element.querySelector(".line-numbers-rows");
|
2176
|
+
E.style.display = "none", E.innerHTML = "", c.lineHeights.forEach(function(f, k) {
|
2177
2177
|
p.children[k].style.height = f + "px";
|
2178
2178
|
});
|
2179
2179
|
});
|
2180
2180
|
}
|
2181
2181
|
}
|
2182
|
-
function
|
2182
|
+
function b(h) {
|
2183
2183
|
return h ? window.getComputedStyle ? getComputedStyle(h) : h.currentStyle || null : null;
|
2184
2184
|
}
|
2185
|
-
var
|
2185
|
+
var x = void 0;
|
2186
2186
|
window.addEventListener("resize", function() {
|
2187
|
-
t.assumeViewportIndependence &&
|
2187
|
+
t.assumeViewportIndependence && x === window.innerWidth || (x = window.innerWidth, v(Array.prototype.slice.call(document.querySelectorAll("pre." + u))));
|
2188
2188
|
}), Prism.hooks.add("complete", function(h) {
|
2189
2189
|
if (h.code) {
|
2190
2190
|
var a = (
|
@@ -2196,8 +2196,8 @@ function On() {
|
|
2196
2196
|
);
|
2197
2197
|
if (!(!c || !/pre/i.test(c.nodeName)) && !a.querySelector(".line-numbers-rows") && Prism.util.isActive(a, u)) {
|
2198
2198
|
a.classList.remove(u), c.classList.add(u);
|
2199
|
-
var
|
2200
|
-
f = document.createElement("span"), f.setAttribute("aria-hidden", "true"), f.className = "line-numbers-rows", f.innerHTML = k, c.hasAttribute("data-start") && (c.style.counterReset = "linenumber " + (parseInt(c.getAttribute("data-start"), 10) - 1)), h.element.appendChild(f),
|
2199
|
+
var E = h.code.match(g), p = E ? E.length + 1 : 1, f, k = new Array(p + 1).join("<span></span>");
|
2200
|
+
f = document.createElement("span"), f.setAttribute("aria-hidden", "true"), f.className = "line-numbers-rows", f.innerHTML = k, c.hasAttribute("data-start") && (c.style.counterReset = "linenumber " + (parseInt(c.getAttribute("data-start"), 10) - 1)), h.element.appendChild(f), v([c]), Prism.hooks.run("line-numbers", h);
|
2201
2201
|
}
|
2202
2202
|
}
|
2203
2203
|
}), Prism.hooks.add("line-numbers", function(h) {
|
@@ -2205,26 +2205,26 @@ function On() {
|
|
2205
2205
|
});
|
2206
2206
|
})()), Be;
|
2207
2207
|
}
|
2208
|
-
|
2208
|
+
jn();
|
2209
2209
|
function Je(u) {
|
2210
2210
|
return u.useTabs ? " " : u.hasPadding ? " " : "";
|
2211
2211
|
}
|
2212
|
-
class
|
2212
|
+
class On {
|
2213
2213
|
padding;
|
2214
2214
|
constructor(g) {
|
2215
2215
|
this.padding = Je(g);
|
2216
2216
|
}
|
2217
|
-
formatCell(g, t,
|
2218
|
-
const
|
2217
|
+
formatCell(g, t, v) {
|
2218
|
+
const b = v;
|
2219
2219
|
switch (t) {
|
2220
2220
|
case "right":
|
2221
|
-
return `${this.padding}${g.padStart(
|
2221
|
+
return `${this.padding}${g.padStart(b)}${this.padding}`;
|
2222
2222
|
case "center": {
|
2223
|
-
const
|
2223
|
+
const x = b - g.length, h = Math.floor(x / 2), a = x - h;
|
2224
2224
|
return `${this.padding}${" ".repeat(h)}${g}${" ".repeat(a)}${this.padding}`;
|
2225
2225
|
}
|
2226
2226
|
default:
|
2227
|
-
return `${this.padding}${g.padEnd(
|
2227
|
+
return `${this.padding}${g.padEnd(b)}${this.padding}`;
|
2228
2228
|
}
|
2229
2229
|
}
|
2230
2230
|
}
|
@@ -2244,7 +2244,7 @@ class In {
|
|
2244
2244
|
cellFormatter;
|
2245
2245
|
adjustedAlignments;
|
2246
2246
|
constructor(g) {
|
2247
|
-
this.config = g, this.cellFormatter = new
|
2247
|
+
this.config = g, this.cellFormatter = new On(g), this.adjustedAlignments = this.getAdjustedAlignments();
|
2248
2248
|
}
|
2249
2249
|
getAdjustedAlignments() {
|
2250
2250
|
return this.config.columnAlignments.length < this.config.columnCount ? [
|
@@ -2253,32 +2253,32 @@ class In {
|
|
2253
2253
|
] : Array.from(this.config.columnAlignments);
|
2254
2254
|
}
|
2255
2255
|
formatRow(g) {
|
2256
|
-
return `|${Array.from({ length: this.config.columnCount }, (
|
2257
|
-
let
|
2258
|
-
this.config.replaceNewlines && (
|
2259
|
-
const h = this.adjustedAlignments[
|
2260
|
-
return this.cellFormatter.formatCell(
|
2256
|
+
return `|${Array.from({ length: this.config.columnCount }, (v, b) => {
|
2257
|
+
let x = g[b] ?? "";
|
2258
|
+
this.config.replaceNewlines && (x = x.replace(/\n/g, "<br>"));
|
2259
|
+
const h = this.adjustedAlignments[b], a = this.config.columnWidths ? this.config.columnWidths[b] : x.length;
|
2260
|
+
return this.cellFormatter.formatCell(x, h, a);
|
2261
2261
|
}).join("|")}|`;
|
2262
2262
|
}
|
2263
2263
|
formatAlignmentRow() {
|
2264
2264
|
const g = Je(this.config);
|
2265
|
-
return `|${Array.from({ length: this.config.columnCount }, (
|
2266
|
-
const
|
2265
|
+
return `|${Array.from({ length: this.config.columnCount }, (v, b) => {
|
2266
|
+
const x = this.adjustedAlignments[b], h = this.config.columnWidths ? this.config.columnWidths[b] : 3, a = Pn.formatIndicator(x, h);
|
2267
2267
|
return `${g}${a}${g}`;
|
2268
2268
|
}).join("|")}|`;
|
2269
2269
|
}
|
2270
2270
|
}
|
2271
2271
|
function Dn(u, g) {
|
2272
2272
|
const t = new Array(g).fill(3);
|
2273
|
-
return u.forEach((
|
2274
|
-
for (let
|
2275
|
-
const
|
2276
|
-
t[
|
2273
|
+
return u.forEach((v) => {
|
2274
|
+
for (let b = 0; b < g; b++) {
|
2275
|
+
const x = v[b] ?? "";
|
2276
|
+
t[b] = Math.max(t[b], x.length);
|
2277
2277
|
}
|
2278
2278
|
}), t;
|
2279
2279
|
}
|
2280
2280
|
function Mn(u) {
|
2281
|
-
const g = u.inputDataHeader.length, t = u.inputDataBody.map((
|
2281
|
+
const g = u.inputDataHeader.length, t = u.inputDataBody.map((v) => v.length);
|
2282
2282
|
return Math.max(g, ...t);
|
2283
2283
|
}
|
2284
2284
|
function zn(u, g, t) {
|
@@ -2287,15 +2287,15 @@ function zn(u, g, t) {
|
|
2287
2287
|
g
|
2288
2288
|
) : void 0;
|
2289
2289
|
}
|
2290
|
-
function Ln(u, g, t = !0,
|
2290
|
+
function Ln(u, g, t = !0, v = !1, b = !1, x = !0) {
|
2291
2291
|
const h = Mn(u), a = zn(u, h, t), c = {
|
2292
2292
|
columnCount: h,
|
2293
2293
|
columnAlignments: g,
|
2294
2294
|
columnWidths: a,
|
2295
|
-
useTabs:
|
2296
|
-
replaceNewlines:
|
2297
|
-
hasPadding:
|
2298
|
-
},
|
2295
|
+
useTabs: v,
|
2296
|
+
replaceNewlines: b,
|
2297
|
+
hasPadding: x
|
2298
|
+
}, E = new In(c), p = E.formatRow(u.inputDataHeader), f = E.formatAlignmentRow(), k = u.inputDataBody.map((C) => E.formatRow(C)).join(`
|
2299
2299
|
`);
|
2300
2300
|
return `${p}
|
2301
2301
|
${f}
|
@@ -2329,16 +2329,16 @@ code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-s
|
|
2329
2329
|
function Yn(u, g) {
|
2330
2330
|
return g ? { inputDataHeader: u[0], inputDataBody: u.slice(1) } : { inputDataHeader: Wn(u[0].length), inputDataBody: u };
|
2331
2331
|
}
|
2332
|
-
function Bn(u, g, t,
|
2332
|
+
function Bn(u, g, t, v, b, x, h) {
|
2333
2333
|
try {
|
2334
2334
|
Hn(u);
|
2335
2335
|
const { inputDataHeader: a, inputDataBody: c } = Yn(u, g);
|
2336
2336
|
return Ln(
|
2337
2337
|
{ inputDataHeader: a, inputDataBody: c },
|
2338
2338
|
t,
|
2339
|
-
m,
|
2340
2339
|
v,
|
2341
|
-
|
2340
|
+
b,
|
2341
|
+
x,
|
2342
2342
|
h
|
2343
2343
|
);
|
2344
2344
|
} catch (a) {
|
@@ -2351,34 +2351,34 @@ function Gn({
|
|
2351
2351
|
inputData: u = null,
|
2352
2352
|
hasHeader: g = !0,
|
2353
2353
|
columnAlignments: t = [],
|
2354
|
-
isCompact:
|
2355
|
-
hasTabs:
|
2356
|
-
hasPadding:
|
2354
|
+
isCompact: v = !1,
|
2355
|
+
hasTabs: b = !1,
|
2356
|
+
hasPadding: x = !0,
|
2357
2357
|
convertLineBreaks: h = !1,
|
2358
2358
|
className: a,
|
2359
2359
|
onGenerate: c,
|
2360
|
-
theme:
|
2360
|
+
theme: E = "light",
|
2361
2361
|
preStyle: p,
|
2362
2362
|
topPadding: f = 16,
|
2363
2363
|
minWidth: k,
|
2364
|
-
showLineNumbers:
|
2364
|
+
showLineNumbers: C = !0
|
2365
2365
|
}) {
|
2366
|
-
const P = wn(null),
|
2366
|
+
const P = wn(null), F = xn(), _ = En(u), [, A] = kn(), n = An(() => Bn(
|
2367
2367
|
_,
|
2368
2368
|
g,
|
2369
2369
|
t,
|
2370
|
-
!
|
2371
|
-
|
2370
|
+
!v,
|
2371
|
+
b,
|
2372
2372
|
h,
|
2373
|
-
|
2373
|
+
x
|
2374
2374
|
), [
|
2375
2375
|
_,
|
2376
2376
|
g,
|
2377
2377
|
t,
|
2378
|
-
m,
|
2379
2378
|
v,
|
2379
|
+
b,
|
2380
2380
|
h,
|
2381
|
-
|
2381
|
+
x
|
2382
2382
|
]);
|
2383
2383
|
return Ne(() => {
|
2384
2384
|
c && c(n);
|
@@ -2386,23 +2386,22 @@ function Gn({
|
|
2386
2386
|
const r = P.current?.querySelector("code"), o = P.current;
|
2387
2387
|
r && o && n && A(() => {
|
2388
2388
|
requestAnimationFrame(() => {
|
2389
|
-
if ($n.highlightElement(r),
|
2390
|
-
const
|
2391
|
-
`),
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
}), r.appendChild(l);
|
2389
|
+
if ($n.highlightElement(r), C && !o.querySelector(".line-numbers-rows")) {
|
2390
|
+
const l = n.split(`
|
2391
|
+
`).length, m = document.createElement("span");
|
2392
|
+
m.setAttribute("aria-hidden", "true"), m.className = "line-numbers-rows";
|
2393
|
+
const S = new Array(l).fill(null).map((y, O) => `<span data-line="${O + 1}"></span>`).join("");
|
2394
|
+
m.innerHTML = S, o.appendChild(m), o.style.counterReset !== "linenumber" && (o.style.counterReset = "linenumber");
|
2396
2395
|
}
|
2397
|
-
if (!
|
2396
|
+
if (!C && o) {
|
2398
2397
|
const s = o.querySelector(".line-numbers-rows");
|
2399
2398
|
s && s.remove();
|
2400
2399
|
}
|
2401
2400
|
});
|
2402
2401
|
});
|
2403
|
-
}, [n, A,
|
2402
|
+
}, [n, A, C]), /* @__PURE__ */ se.jsxs(se.Fragment, { children: [
|
2404
2403
|
/* @__PURE__ */ se.jsxs("style", { children: [
|
2405
|
-
|
2404
|
+
E === "light" ? qn : Un,
|
2406
2405
|
`
|
2407
2406
|
pre {
|
2408
2407
|
position: relative;
|
@@ -2412,7 +2411,7 @@ function Gn({
|
|
2412
2411
|
position: absolute;
|
2413
2412
|
top: 8px;
|
2414
2413
|
left: 12px;
|
2415
|
-
color: ${
|
2414
|
+
color: ${E === "light" ? "#666" : "#999"};
|
2416
2415
|
letter-spacing: 2px;
|
2417
2416
|
font-size: 12px;
|
2418
2417
|
}
|
@@ -2427,12 +2426,16 @@ function Gn({
|
|
2427
2426
|
pre:not(.line-numbers) > code {
|
2428
2427
|
padding-left: 0 !important;
|
2429
2428
|
}
|
2429
|
+
/* Fallback: use data attribute if counter doesn't work */
|
2430
|
+
.line-numbers-rows > span[data-line]::before {
|
2431
|
+
content: attr(data-line) !important;
|
2432
|
+
}
|
2430
2433
|
`
|
2431
2434
|
] }),
|
2432
2435
|
/* @__PURE__ */ se.jsx(
|
2433
2436
|
"div",
|
2434
2437
|
{
|
2435
|
-
id:
|
2438
|
+
id: F,
|
2436
2439
|
style: {
|
2437
2440
|
position: "relative",
|
2438
2441
|
isolation: "isolate",
|
@@ -2442,7 +2445,7 @@ function Gn({
|
|
2442
2445
|
"pre",
|
2443
2446
|
{
|
2444
2447
|
ref: P,
|
2445
|
-
className: `${a} language-markdown ${
|
2448
|
+
className: `${a} language-markdown ${C ? "line-numbers" : ""} ${E === "dark" ? "dark-theme" : ""}`,
|
2446
2449
|
style: {
|
2447
2450
|
width: "fit-content",
|
2448
2451
|
minWidth: k ? `${k}px` : "min-content",
|