@hep-code-runner/react 3.0.0 → 3.1.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.
- package/README.md +30 -13
- package/dist/index.d.ts +2 -0
- package/dist/index.js +29 -28
- package/dist/index.mjs +804 -778
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
function wr(
|
|
4
|
-
return
|
|
1
|
+
import tr, { useRef as Pe, useMemo as Ae, useCallback as te, useEffect as Ne, useState as X, forwardRef as xr, useImperativeHandle as kr } from "react";
|
|
2
|
+
var Je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
|
+
function wr(p) {
|
|
4
|
+
return p && p.__esModule && Object.prototype.hasOwnProperty.call(p, "default") ? p.default : p;
|
|
5
5
|
}
|
|
6
|
-
var
|
|
6
|
+
var Be = { exports: {} }, Ie = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
@@ -13,21 +13,21 @@ var Ce = { exports: {} }, Ee = {};
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
16
|
+
var Qe;
|
|
17
17
|
function Sr() {
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
for (
|
|
25
|
-
if (
|
|
26
|
-
return { $$typeof:
|
|
18
|
+
if (Qe) return Ie;
|
|
19
|
+
Qe = 1;
|
|
20
|
+
var p = tr, h = Symbol.for("react.element"), n = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, b = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, A = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
|
+
function R(s, m, k) {
|
|
22
|
+
var S, I = {}, L = null, U = null;
|
|
23
|
+
k !== void 0 && (L = "" + k), m.key !== void 0 && (L = "" + m.key), m.ref !== void 0 && (U = m.ref);
|
|
24
|
+
for (S in m) u.call(m, S) && !A.hasOwnProperty(S) && (I[S] = m[S]);
|
|
25
|
+
if (s && s.defaultProps) for (S in m = s.defaultProps, m) I[S] === void 0 && (I[S] = m[S]);
|
|
26
|
+
return { $$typeof: h, type: s, key: L, ref: U, props: I, _owner: b.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return Ie.Fragment = n, Ie.jsx = R, Ie.jsxs = R, Ie;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var Oe = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -37,54 +37,54 @@ var ye = {};
|
|
|
37
37
|
* This source code is licensed under the MIT license found in the
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
|
-
var
|
|
40
|
+
var er;
|
|
41
41
|
function Ar() {
|
|
42
|
-
return
|
|
43
|
-
var
|
|
44
|
-
function
|
|
42
|
+
return er || (er = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
+
var p = tr, h = Symbol.for("react.element"), n = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), A = Symbol.for("react.profiler"), R = Symbol.for("react.provider"), s = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), k = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), I = Symbol.for("react.memo"), L = Symbol.for("react.lazy"), U = Symbol.for("react.offscreen"), Z = Symbol.iterator, _ = "@@iterator";
|
|
44
|
+
function E(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var a =
|
|
47
|
+
var a = Z && e[Z] || e[_];
|
|
48
48
|
return typeof a == "function" ? a : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
50
|
+
var y = p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
51
|
function r(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var a = arguments.length,
|
|
54
|
-
|
|
55
|
-
t("error", e,
|
|
53
|
+
for (var a = arguments.length, d = new Array(a > 1 ? a - 1 : 0), v = 1; v < a; v++)
|
|
54
|
+
d[v - 1] = arguments[v];
|
|
55
|
+
t("error", e, d);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function t(e, a,
|
|
58
|
+
function t(e, a, d) {
|
|
59
59
|
{
|
|
60
|
-
var v =
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
return String(
|
|
60
|
+
var v = y.ReactDebugCurrentFrame, O = v.getStackAddendum();
|
|
61
|
+
O !== "" && (a += "%s", d = d.concat([O]));
|
|
62
|
+
var C = d.map(function(T) {
|
|
63
|
+
return String(T);
|
|
64
64
|
});
|
|
65
|
-
|
|
65
|
+
C.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, C);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var i = !1, o = !1,
|
|
69
|
-
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
68
|
+
var i = !1, o = !1, l = !1, g = !1, x = !1, f;
|
|
69
|
+
f = Symbol.for("react.module.reference");
|
|
70
|
+
function N(e) {
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === u || e === A || x || e === b || e === k || e === S || g || e === U || i || o || l || typeof e == "object" && e !== null && (e.$$typeof === L || e.$$typeof === I || e.$$typeof === R || e.$$typeof === s || e.$$typeof === m || // 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.
|
|
75
|
-
e.$$typeof ===
|
|
75
|
+
e.$$typeof === f || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function j(e, a, d) {
|
|
78
78
|
var v = e.displayName;
|
|
79
79
|
if (v)
|
|
80
80
|
return v;
|
|
81
|
-
var
|
|
82
|
-
return
|
|
81
|
+
var O = a.displayName || a.name || "";
|
|
82
|
+
return O !== "" ? d + "(" + O + ")" : d;
|
|
83
83
|
}
|
|
84
84
|
function W(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function H(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
90
|
if (typeof e.tag == "number" && r("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -92,36 +92,36 @@ function Ar() {
|
|
|
92
92
|
if (typeof e == "string")
|
|
93
93
|
return e;
|
|
94
94
|
switch (e) {
|
|
95
|
-
case
|
|
95
|
+
case u:
|
|
96
96
|
return "Fragment";
|
|
97
97
|
case n:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case A:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case b:
|
|
102
102
|
return "StrictMode";
|
|
103
|
-
case
|
|
103
|
+
case k:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case S:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
|
-
case
|
|
110
|
+
case s:
|
|
111
111
|
var a = e;
|
|
112
112
|
return W(a) + ".Consumer";
|
|
113
|
-
case
|
|
114
|
-
var
|
|
115
|
-
return W(
|
|
116
|
-
case
|
|
117
|
-
return
|
|
118
|
-
case
|
|
113
|
+
case R:
|
|
114
|
+
var d = e;
|
|
115
|
+
return W(d._context) + ".Provider";
|
|
116
|
+
case m:
|
|
117
|
+
return j(e, e.render, "ForwardRef");
|
|
118
|
+
case I:
|
|
119
119
|
var v = e.displayName || null;
|
|
120
|
-
return v !== null ? v :
|
|
121
|
-
case
|
|
122
|
-
var
|
|
120
|
+
return v !== null ? v : H(e.type) || "Memo";
|
|
121
|
+
case L: {
|
|
122
|
+
var O = e, C = O._payload, T = O._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return H(T(C));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,14 +129,14 @@ function Ar() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var G = Object.assign,
|
|
132
|
+
var G = Object.assign, ne = 0, ae, ue, D, z, re, J, B;
|
|
133
133
|
function le() {
|
|
134
134
|
}
|
|
135
135
|
le.__reactDisabledLog = !0;
|
|
136
|
-
function
|
|
136
|
+
function q() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (ne === 0) {
|
|
139
|
+
ae = console.log, ue = console.info, D = console.warn, z = console.error, re = console.group, J = console.groupCollapsed, B = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
@@ -153,12 +153,12 @@ function Ar() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
ne++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function Q() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (ne--, ne === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
@@ -166,19 +166,19 @@ function Ar() {
|
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
168
|
log: G({}, e, {
|
|
169
|
-
value:
|
|
169
|
+
value: ae
|
|
170
170
|
}),
|
|
171
171
|
info: G({}, e, {
|
|
172
172
|
value: ue
|
|
173
173
|
}),
|
|
174
174
|
warn: G({}, e, {
|
|
175
|
-
value:
|
|
175
|
+
value: D
|
|
176
176
|
}),
|
|
177
177
|
error: G({}, e, {
|
|
178
|
-
value:
|
|
178
|
+
value: z
|
|
179
179
|
}),
|
|
180
180
|
group: G({}, e, {
|
|
181
|
-
value:
|
|
181
|
+
value: re
|
|
182
182
|
}),
|
|
183
183
|
groupCollapsed: G({}, e, {
|
|
184
184
|
value: J
|
|
@@ -188,194 +188,194 @@ function Ar() {
|
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
ne < 0 && r("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
194
|
+
var ie = y.ReactCurrentDispatcher, oe;
|
|
195
|
+
function Y(e, a, d) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (oe === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var v =
|
|
202
|
-
|
|
200
|
+
} catch (O) {
|
|
201
|
+
var v = O.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
oe = v && v[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + oe + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var de = !1,
|
|
208
|
+
var de = !1, se;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var pe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
se = new pe();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function ye(e, a) {
|
|
214
214
|
if (!e || de)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
return
|
|
217
|
+
var d = se.get(e);
|
|
218
|
+
if (d !== void 0)
|
|
219
|
+
return d;
|
|
220
220
|
}
|
|
221
221
|
var v;
|
|
222
222
|
de = !0;
|
|
223
|
-
var
|
|
223
|
+
var O = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
|
-
var
|
|
226
|
-
|
|
225
|
+
var C;
|
|
226
|
+
C = ie.current, ie.current = null, q();
|
|
227
227
|
try {
|
|
228
228
|
if (a) {
|
|
229
|
-
var
|
|
229
|
+
var T = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
232
|
-
if (Object.defineProperty(
|
|
232
|
+
if (Object.defineProperty(T.prototype, "props", {
|
|
233
233
|
set: function() {
|
|
234
234
|
throw Error();
|
|
235
235
|
}
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
|
-
Reflect.construct(
|
|
239
|
-
} catch (
|
|
240
|
-
v =
|
|
238
|
+
Reflect.construct(T, []);
|
|
239
|
+
} catch (K) {
|
|
240
|
+
v = K;
|
|
241
241
|
}
|
|
242
|
-
Reflect.construct(e, [],
|
|
242
|
+
Reflect.construct(e, [], T);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
|
-
|
|
246
|
-
} catch (
|
|
247
|
-
v =
|
|
245
|
+
T.call();
|
|
246
|
+
} catch (K) {
|
|
247
|
+
v = K;
|
|
248
248
|
}
|
|
249
|
-
e.call(
|
|
249
|
+
e.call(T.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
v =
|
|
254
|
+
} catch (K) {
|
|
255
|
+
v = K;
|
|
256
256
|
}
|
|
257
257
|
e();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var
|
|
262
|
-
`),
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
259
|
+
} catch (K) {
|
|
260
|
+
if (K && v && typeof K.stack == "string") {
|
|
261
|
+
for (var w = K.stack.split(`
|
|
262
|
+
`), V = v.stack.split(`
|
|
263
|
+
`), $ = w.length - 1, M = V.length - 1; $ >= 1 && M >= 0 && w[$] !== V[M]; )
|
|
264
|
+
M--;
|
|
265
|
+
for (; $ >= 1 && M >= 0; $--, M--)
|
|
266
|
+
if (w[$] !== V[M]) {
|
|
267
|
+
if ($ !== 1 || M !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (M--,
|
|
269
|
+
if ($--, M--, M < 0 || w[$] !== V[M]) {
|
|
270
270
|
var ee = `
|
|
271
|
-
` +
|
|
272
|
-
return e.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
271
|
+
` + w[$].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", e.displayName)), typeof e == "function" && se.set(e, ee), ee;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while ($ >= 1 && M >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
de = !1,
|
|
279
|
+
de = !1, ie.current = C, Q(), Error.prepareStackTrace = O;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" &&
|
|
281
|
+
var Se = e ? e.displayName || e.name : "", Ee = Se ? Y(Se) : "";
|
|
282
|
+
return typeof e == "function" && se.set(e, Ee), Ee;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
284
|
+
function me(e, a, d) {
|
|
285
|
+
return ye(e, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Te(e) {
|
|
288
288
|
var a = e.prototype;
|
|
289
289
|
return !!(a && a.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function xe(e, a, d) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return ye(e, Te(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
297
|
+
return Y(e);
|
|
298
298
|
switch (e) {
|
|
299
|
-
case
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
return
|
|
299
|
+
case k:
|
|
300
|
+
return Y("Suspense");
|
|
301
|
+
case S:
|
|
302
|
+
return Y("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
307
|
-
return
|
|
308
|
-
case
|
|
309
|
-
return
|
|
310
|
-
case
|
|
311
|
-
var v = e,
|
|
306
|
+
case m:
|
|
307
|
+
return me(e.render);
|
|
308
|
+
case I:
|
|
309
|
+
return xe(e.type, a, d);
|
|
310
|
+
case L: {
|
|
311
|
+
var v = e, O = v._payload, C = v._init;
|
|
312
312
|
try {
|
|
313
|
-
return
|
|
313
|
+
return xe(C(O), a, d);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
320
|
+
var ce = Object.prototype.hasOwnProperty, Re = {}, F = y.ReactDebugCurrentFrame;
|
|
321
|
+
function P(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var a = e._owner,
|
|
324
|
-
|
|
323
|
+
var a = e._owner, d = xe(e.type, e._source, a ? a.type : null);
|
|
324
|
+
F.setExtraStackFrame(d);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
F.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function he(e, a, d, v, O) {
|
|
329
329
|
{
|
|
330
|
-
var
|
|
331
|
-
for (var
|
|
332
|
-
if (
|
|
333
|
-
var
|
|
330
|
+
var C = Function.call.bind(ce);
|
|
331
|
+
for (var T in e)
|
|
332
|
+
if (C(e, T)) {
|
|
333
|
+
var w = void 0;
|
|
334
334
|
try {
|
|
335
|
-
if (typeof e[
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
335
|
+
if (typeof e[T] != "function") {
|
|
336
|
+
var V = Error((v || "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
|
+
throw V.name = "Invariant Violation", V;
|
|
338
338
|
}
|
|
339
|
-
|
|
340
|
-
} catch (
|
|
341
|
-
|
|
339
|
+
w = e[T](a, T, v, d, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch ($) {
|
|
341
|
+
w = $;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
w && !(w instanceof Error) && (P(O), r("%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).", v || "React class", d, T, typeof w), P(null)), w instanceof Error && !(w.message in Re) && (Re[w.message] = !0, P(O), r("Failed %s type: %s", d, w.message), P(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
return
|
|
347
|
+
var be = Array.isArray;
|
|
348
|
+
function _e(e) {
|
|
349
|
+
return be(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Fe(e) {
|
|
352
352
|
{
|
|
353
|
-
var a = typeof Symbol == "function" && Symbol.toStringTag,
|
|
354
|
-
return
|
|
353
|
+
var a = typeof Symbol == "function" && Symbol.toStringTag, d = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
|
+
return d;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function ve(e) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return fe(e), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function fe(e) {
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
return r("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
367
|
+
function ge(e) {
|
|
368
|
+
if (ve(e))
|
|
369
|
+
return r("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Fe(e)), fe(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var ke = y.ReactCurrentOwner, Ce = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
376
|
+
}, Le, We;
|
|
377
377
|
function ar(e) {
|
|
378
|
-
if (
|
|
378
|
+
if (ce.call(e, "ref")) {
|
|
379
379
|
var a = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
380
380
|
if (a && a.isReactWarning)
|
|
381
381
|
return !1;
|
|
@@ -383,7 +383,7 @@ function Ar() {
|
|
|
383
383
|
return e.ref !== void 0;
|
|
384
384
|
}
|
|
385
385
|
function ir(e) {
|
|
386
|
-
if (
|
|
386
|
+
if (ce.call(e, "key")) {
|
|
387
387
|
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
388
388
|
if (a && a.isReactWarning)
|
|
389
389
|
return !1;
|
|
@@ -391,94 +391,94 @@ function Ar() {
|
|
|
391
391
|
return e.key !== void 0;
|
|
392
392
|
}
|
|
393
393
|
function or(e, a) {
|
|
394
|
-
typeof e.ref == "string" &&
|
|
394
|
+
typeof e.ref == "string" && ke.current;
|
|
395
395
|
}
|
|
396
396
|
function sr(e, a) {
|
|
397
397
|
{
|
|
398
|
-
var
|
|
399
|
-
|
|
398
|
+
var d = function() {
|
|
399
|
+
Le || (Le = !0, r("%s: `key` 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)", a));
|
|
400
400
|
};
|
|
401
|
-
|
|
402
|
-
get:
|
|
401
|
+
d.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
402
|
+
get: d,
|
|
403
403
|
configurable: !0
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
function lr(e, a) {
|
|
408
408
|
{
|
|
409
|
-
var
|
|
410
|
-
|
|
409
|
+
var d = function() {
|
|
410
|
+
We || (We = !0, r("%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)", a));
|
|
411
411
|
};
|
|
412
|
-
|
|
413
|
-
get:
|
|
412
|
+
d.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
413
|
+
get: d,
|
|
414
414
|
configurable: !0
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var cr = function(e, a,
|
|
419
|
-
var
|
|
418
|
+
var cr = function(e, a, d, v, O, C, T) {
|
|
419
|
+
var w = {
|
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
421
|
-
$$typeof:
|
|
421
|
+
$$typeof: h,
|
|
422
422
|
// Built-in properties that belong on the element
|
|
423
423
|
type: e,
|
|
424
424
|
key: a,
|
|
425
|
-
ref:
|
|
426
|
-
props:
|
|
425
|
+
ref: d,
|
|
426
|
+
props: T,
|
|
427
427
|
// Record the component responsible for creating this element.
|
|
428
|
-
_owner:
|
|
428
|
+
_owner: C
|
|
429
429
|
};
|
|
430
|
-
return
|
|
430
|
+
return w._store = {}, Object.defineProperty(w._store, "validated", {
|
|
431
431
|
configurable: !1,
|
|
432
432
|
enumerable: !1,
|
|
433
433
|
writable: !0,
|
|
434
434
|
value: !1
|
|
435
|
-
}), Object.defineProperty(
|
|
435
|
+
}), Object.defineProperty(w, "_self", {
|
|
436
436
|
configurable: !1,
|
|
437
437
|
enumerable: !1,
|
|
438
438
|
writable: !1,
|
|
439
439
|
value: v
|
|
440
|
-
}), Object.defineProperty(
|
|
440
|
+
}), Object.defineProperty(w, "_source", {
|
|
441
441
|
configurable: !1,
|
|
442
442
|
enumerable: !1,
|
|
443
443
|
writable: !1,
|
|
444
|
-
value:
|
|
445
|
-
}), Object.freeze && (Object.freeze(
|
|
444
|
+
value: O
|
|
445
|
+
}), Object.freeze && (Object.freeze(w.props), Object.freeze(w)), w;
|
|
446
446
|
};
|
|
447
|
-
function ur(e, a,
|
|
447
|
+
function ur(e, a, d, v, O) {
|
|
448
448
|
{
|
|
449
|
-
var
|
|
450
|
-
|
|
451
|
-
for (
|
|
452
|
-
|
|
449
|
+
var C, T = {}, w = null, V = null;
|
|
450
|
+
d !== void 0 && (ge(d), w = "" + d), ir(a) && (ge(a.key), w = "" + a.key), ar(a) && (V = a.ref, or(a, O));
|
|
451
|
+
for (C in a)
|
|
452
|
+
ce.call(a, C) && !Ce.hasOwnProperty(C) && (T[C] = a[C]);
|
|
453
453
|
if (e && e.defaultProps) {
|
|
454
|
-
var
|
|
455
|
-
for (
|
|
456
|
-
|
|
454
|
+
var $ = e.defaultProps;
|
|
455
|
+
for (C in $)
|
|
456
|
+
T[C] === void 0 && (T[C] = $[C]);
|
|
457
457
|
}
|
|
458
|
-
if (
|
|
459
|
-
var
|
|
460
|
-
|
|
458
|
+
if (w || V) {
|
|
459
|
+
var M = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
460
|
+
w && sr(T, M), V && lr(T, M);
|
|
461
461
|
}
|
|
462
|
-
return cr(e,
|
|
462
|
+
return cr(e, w, V, O, v, ke.current, T);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var
|
|
466
|
-
function
|
|
465
|
+
var De = y.ReactCurrentOwner, Ge = y.ReactDebugCurrentFrame;
|
|
466
|
+
function we(e) {
|
|
467
467
|
if (e) {
|
|
468
|
-
var a = e._owner,
|
|
469
|
-
|
|
468
|
+
var a = e._owner, d = xe(e.type, e._source, a ? a.type : null);
|
|
469
|
+
Ge.setExtraStackFrame(d);
|
|
470
470
|
} else
|
|
471
|
-
|
|
471
|
+
Ge.setExtraStackFrame(null);
|
|
472
472
|
}
|
|
473
|
-
var
|
|
474
|
-
|
|
475
|
-
function
|
|
476
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
473
|
+
var je;
|
|
474
|
+
je = !1;
|
|
475
|
+
function $e(e) {
|
|
476
|
+
return typeof e == "object" && e !== null && e.$$typeof === h;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Ye() {
|
|
479
479
|
{
|
|
480
|
-
if (
|
|
481
|
-
var e =
|
|
480
|
+
if (De.current) {
|
|
481
|
+
var e = H(De.current.type);
|
|
482
482
|
if (e)
|
|
483
483
|
return `
|
|
484
484
|
|
|
@@ -490,48 +490,48 @@ Check the render method of \`` + e + "`.";
|
|
|
490
490
|
function dr(e) {
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
|
-
var
|
|
493
|
+
var Ve = {};
|
|
494
494
|
function pr(e) {
|
|
495
495
|
{
|
|
496
|
-
var a =
|
|
496
|
+
var a = Ye();
|
|
497
497
|
if (!a) {
|
|
498
|
-
var
|
|
499
|
-
|
|
498
|
+
var d = typeof e == "string" ? e : e.displayName || e.name;
|
|
499
|
+
d && (a = `
|
|
500
500
|
|
|
501
|
-
Check the top-level render call using <` +
|
|
501
|
+
Check the top-level render call using <` + d + ">.");
|
|
502
502
|
}
|
|
503
503
|
return a;
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Xe(e, a) {
|
|
507
507
|
{
|
|
508
508
|
if (!e._store || e._store.validated || e.key != null)
|
|
509
509
|
return;
|
|
510
510
|
e._store.validated = !0;
|
|
511
|
-
var
|
|
512
|
-
if (
|
|
511
|
+
var d = pr(a);
|
|
512
|
+
if (Ve[d])
|
|
513
513
|
return;
|
|
514
|
-
|
|
514
|
+
Ve[d] = !0;
|
|
515
515
|
var v = "";
|
|
516
|
-
e && e._owner && e._owner !==
|
|
516
|
+
e && e._owner && e._owner !== De.current && (v = " It was passed a child from " + H(e._owner.type) + "."), we(e), r('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, v), we(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Ke(e, a) {
|
|
520
520
|
{
|
|
521
521
|
if (typeof e != "object")
|
|
522
522
|
return;
|
|
523
|
-
if (
|
|
524
|
-
for (var
|
|
525
|
-
var v = e[
|
|
526
|
-
|
|
523
|
+
if (_e(e))
|
|
524
|
+
for (var d = 0; d < e.length; d++) {
|
|
525
|
+
var v = e[d];
|
|
526
|
+
$e(v) && Xe(v, a);
|
|
527
527
|
}
|
|
528
|
-
else if (
|
|
528
|
+
else if ($e(e))
|
|
529
529
|
e._store && (e._store.validated = !0);
|
|
530
530
|
else if (e) {
|
|
531
|
-
var
|
|
532
|
-
if (typeof
|
|
533
|
-
for (var
|
|
534
|
-
|
|
531
|
+
var O = E(e);
|
|
532
|
+
if (typeof O == "function" && O !== e.entries)
|
|
533
|
+
for (var C = O.call(e), T; !(T = C.next()).done; )
|
|
534
|
+
$e(T.value) && Xe(T.value, a);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
@@ -540,97 +540,97 @@ Check the top-level render call using <` + u + ">.");
|
|
|
540
540
|
var a = e.type;
|
|
541
541
|
if (a == null || typeof a == "string")
|
|
542
542
|
return;
|
|
543
|
-
var
|
|
543
|
+
var d;
|
|
544
544
|
if (typeof a == "function")
|
|
545
|
-
|
|
546
|
-
else if (typeof a == "object" && (a.$$typeof ===
|
|
545
|
+
d = a.propTypes;
|
|
546
|
+
else if (typeof a == "object" && (a.$$typeof === m || // Note: Memo only checks outer props here.
|
|
547
547
|
// Inner props are checked in the reconciler.
|
|
548
|
-
a.$$typeof ===
|
|
549
|
-
|
|
548
|
+
a.$$typeof === I))
|
|
549
|
+
d = a.propTypes;
|
|
550
550
|
else
|
|
551
551
|
return;
|
|
552
|
-
if (
|
|
553
|
-
var v =
|
|
554
|
-
|
|
555
|
-
} else if (a.PropTypes !== void 0 && !
|
|
556
|
-
|
|
557
|
-
var
|
|
558
|
-
r("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
552
|
+
if (d) {
|
|
553
|
+
var v = H(a);
|
|
554
|
+
he(d, e.props, "prop", v, e);
|
|
555
|
+
} else if (a.PropTypes !== void 0 && !je) {
|
|
556
|
+
je = !0;
|
|
557
|
+
var O = H(a);
|
|
558
|
+
r("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
|
|
559
559
|
}
|
|
560
560
|
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && r("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
563
|
function fr(e) {
|
|
564
564
|
{
|
|
565
|
-
for (var a = Object.keys(e.props),
|
|
566
|
-
var v = a[
|
|
565
|
+
for (var a = Object.keys(e.props), d = 0; d < a.length; d++) {
|
|
566
|
+
var v = a[d];
|
|
567
567
|
if (v !== "children" && v !== "key") {
|
|
568
|
-
|
|
568
|
+
we(e), r("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), we(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
e.ref !== null && (
|
|
572
|
+
e.ref !== null && (we(e), r("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
var
|
|
576
|
-
function
|
|
575
|
+
var Ze = {};
|
|
576
|
+
function qe(e, a, d, v, O, C) {
|
|
577
577
|
{
|
|
578
|
-
var
|
|
579
|
-
if (!
|
|
580
|
-
var
|
|
581
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
582
|
-
var
|
|
583
|
-
|
|
584
|
-
var
|
|
585
|
-
e === null ?
|
|
586
|
-
}
|
|
587
|
-
var
|
|
588
|
-
if (
|
|
589
|
-
return
|
|
590
|
-
if (
|
|
578
|
+
var T = N(e);
|
|
579
|
+
if (!T) {
|
|
580
|
+
var w = "";
|
|
581
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (w += " 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
|
+
var V = dr();
|
|
583
|
+
V ? w += V : w += Ye();
|
|
584
|
+
var $;
|
|
585
|
+
e === null ? $ = "null" : _e(e) ? $ = "array" : e !== void 0 && e.$$typeof === h ? ($ = "<" + (H(e.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof e, r("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, w);
|
|
586
|
+
}
|
|
587
|
+
var M = ur(e, a, d, O, C);
|
|
588
|
+
if (M == null)
|
|
589
|
+
return M;
|
|
590
|
+
if (T) {
|
|
591
591
|
var ee = a.children;
|
|
592
592
|
if (ee !== void 0)
|
|
593
593
|
if (v)
|
|
594
|
-
if (
|
|
595
|
-
for (var
|
|
596
|
-
|
|
594
|
+
if (_e(ee)) {
|
|
595
|
+
for (var Se = 0; Se < ee.length; Se++)
|
|
596
|
+
Ke(ee[Se], e);
|
|
597
597
|
Object.freeze && Object.freeze(ee);
|
|
598
598
|
} else
|
|
599
599
|
r("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
600
600
|
else
|
|
601
|
-
|
|
601
|
+
Ke(ee, e);
|
|
602
602
|
}
|
|
603
|
-
if (
|
|
604
|
-
var
|
|
603
|
+
if (ce.call(a, "key")) {
|
|
604
|
+
var Ee = H(e), K = Object.keys(a).filter(function(yr) {
|
|
605
605
|
return yr !== "key";
|
|
606
|
-
}),
|
|
607
|
-
if (!
|
|
608
|
-
var Er =
|
|
606
|
+
}), Me = K.length > 0 ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
|
+
if (!Ze[Ee + Me]) {
|
|
608
|
+
var Er = K.length > 0 ? "{" + K.join(": ..., ") + ": ...}" : "{}";
|
|
609
609
|
r(`A props object containing a "key" prop is being spread into JSX:
|
|
610
610
|
let props = %s;
|
|
611
611
|
<%s {...props} />
|
|
612
612
|
React keys must be passed directly to JSX without using spread:
|
|
613
613
|
let props = %s;
|
|
614
|
-
<%s key={someKey} {...props} />`,
|
|
614
|
+
<%s key={someKey} {...props} />`, Me, Ee, Er, Ee), Ze[Ee + Me] = !0;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
return e ===
|
|
617
|
+
return e === u ? fr(M) : hr(M), M;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function gr(e, a,
|
|
621
|
-
return
|
|
620
|
+
function gr(e, a, d) {
|
|
621
|
+
return qe(e, a, d, !0);
|
|
622
622
|
}
|
|
623
|
-
function mr(e, a,
|
|
624
|
-
return
|
|
623
|
+
function mr(e, a, d) {
|
|
624
|
+
return qe(e, a, d, !1);
|
|
625
625
|
}
|
|
626
626
|
var br = mr, vr = gr;
|
|
627
|
-
|
|
628
|
-
}()),
|
|
627
|
+
Oe.Fragment = u, Oe.jsx = br, Oe.jsxs = vr;
|
|
628
|
+
}()), Oe;
|
|
629
629
|
}
|
|
630
|
-
process.env.NODE_ENV === "production" ?
|
|
631
|
-
var c =
|
|
632
|
-
(function(
|
|
633
|
-
var
|
|
630
|
+
process.env.NODE_ENV === "production" ? Be.exports = Sr() : Be.exports = Ar();
|
|
631
|
+
var c = Be.exports, nr = { exports: {} };
|
|
632
|
+
(function(p) {
|
|
633
|
+
var h = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
|
634
634
|
/**
|
|
635
635
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
636
636
|
*
|
|
@@ -639,8 +639,8 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
639
639
|
* @namespace
|
|
640
640
|
* @public
|
|
641
641
|
*/
|
|
642
|
-
var n = function(
|
|
643
|
-
var
|
|
642
|
+
var n = function(u) {
|
|
643
|
+
var b = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, A = 0, R = {}, s = {
|
|
644
644
|
/**
|
|
645
645
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
646
646
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
@@ -662,7 +662,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
662
662
|
* @memberof Prism
|
|
663
663
|
* @public
|
|
664
664
|
*/
|
|
665
|
-
manual:
|
|
665
|
+
manual: u.Prism && u.Prism.manual,
|
|
666
666
|
/**
|
|
667
667
|
* By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
|
|
668
668
|
* `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
|
|
@@ -684,7 +684,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
684
684
|
* @memberof Prism
|
|
685
685
|
* @public
|
|
686
686
|
*/
|
|
687
|
-
disableWorkerMessageHandler:
|
|
687
|
+
disableWorkerMessageHandler: u.Prism && u.Prism.disableWorkerMessageHandler,
|
|
688
688
|
/**
|
|
689
689
|
* A namespace for utility methods.
|
|
690
690
|
*
|
|
@@ -696,7 +696,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
696
696
|
*/
|
|
697
697
|
util: {
|
|
698
698
|
encode: function r(t) {
|
|
699
|
-
return t instanceof
|
|
699
|
+
return t instanceof m ? new m(t.type, r(t.content), t.alias) : Array.isArray(t) ? t.map(r) : t.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
700
700
|
},
|
|
701
701
|
/**
|
|
702
702
|
* Returns the name of the type of the given value.
|
|
@@ -724,7 +724,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
724
724
|
* @returns {number}
|
|
725
725
|
*/
|
|
726
726
|
objId: function(r) {
|
|
727
|
-
return r.__id || Object.defineProperty(r, "__id", { value: ++
|
|
727
|
+
return r.__id || Object.defineProperty(r, "__id", { value: ++A }), r.__id;
|
|
728
728
|
},
|
|
729
729
|
/**
|
|
730
730
|
* Creates a deep clone of the given object.
|
|
@@ -738,24 +738,24 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
738
738
|
*/
|
|
739
739
|
clone: function r(t, i) {
|
|
740
740
|
i = i || {};
|
|
741
|
-
var o,
|
|
742
|
-
switch (
|
|
741
|
+
var o, l;
|
|
742
|
+
switch (s.util.type(t)) {
|
|
743
743
|
case "Object":
|
|
744
|
-
if (
|
|
745
|
-
return i[
|
|
744
|
+
if (l = s.util.objId(t), i[l])
|
|
745
|
+
return i[l];
|
|
746
746
|
o = /** @type {Record<string, any>} */
|
|
747
|
-
{}, i[
|
|
748
|
-
for (var
|
|
749
|
-
t.hasOwnProperty(
|
|
747
|
+
{}, i[l] = o;
|
|
748
|
+
for (var g in t)
|
|
749
|
+
t.hasOwnProperty(g) && (o[g] = r(t[g], i));
|
|
750
750
|
return (
|
|
751
751
|
/** @type {any} */
|
|
752
752
|
o
|
|
753
753
|
);
|
|
754
754
|
case "Array":
|
|
755
|
-
return
|
|
755
|
+
return l = s.util.objId(t), i[l] ? i[l] : (o = [], i[l] = o, /** @type {Array} */
|
|
756
756
|
/** @type {any} */
|
|
757
|
-
t.forEach(function(
|
|
758
|
-
o[
|
|
757
|
+
t.forEach(function(x, f) {
|
|
758
|
+
o[f] = r(x, i);
|
|
759
759
|
}), /** @type {any} */
|
|
760
760
|
o);
|
|
761
761
|
default:
|
|
@@ -772,7 +772,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
772
772
|
*/
|
|
773
773
|
getLanguage: function(r) {
|
|
774
774
|
for (; r; ) {
|
|
775
|
-
var t =
|
|
775
|
+
var t = b.exec(r.className);
|
|
776
776
|
if (t)
|
|
777
777
|
return t[1].toLowerCase();
|
|
778
778
|
r = r.parentElement;
|
|
@@ -787,7 +787,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
787
787
|
* @returns {void}
|
|
788
788
|
*/
|
|
789
789
|
setLanguage: function(r, t) {
|
|
790
|
-
r.className = r.className.replace(RegExp(
|
|
790
|
+
r.className = r.className.replace(RegExp(b, "gi"), ""), r.classList.add("language-" + t);
|
|
791
791
|
},
|
|
792
792
|
/**
|
|
793
793
|
* Returns the script element that is currently executing.
|
|
@@ -838,10 +838,10 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
838
838
|
*/
|
|
839
839
|
isActive: function(r, t, i) {
|
|
840
840
|
for (var o = "no-" + t; r; ) {
|
|
841
|
-
var
|
|
842
|
-
if (
|
|
841
|
+
var l = r.classList;
|
|
842
|
+
if (l.contains(t))
|
|
843
843
|
return !0;
|
|
844
|
-
if (
|
|
844
|
+
if (l.contains(o))
|
|
845
845
|
return !1;
|
|
846
846
|
r = r.parentElement;
|
|
847
847
|
}
|
|
@@ -859,10 +859,10 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
859
859
|
/**
|
|
860
860
|
* The grammar for plain, unformatted text.
|
|
861
861
|
*/
|
|
862
|
-
plain:
|
|
863
|
-
plaintext:
|
|
864
|
-
text:
|
|
865
|
-
txt:
|
|
862
|
+
plain: R,
|
|
863
|
+
plaintext: R,
|
|
864
|
+
text: R,
|
|
865
|
+
txt: R,
|
|
866
866
|
/**
|
|
867
867
|
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
868
868
|
*
|
|
@@ -892,7 +892,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
892
892
|
* });
|
|
893
893
|
*/
|
|
894
894
|
extend: function(r, t) {
|
|
895
|
-
var i =
|
|
895
|
+
var i = s.util.clone(s.languages[r]);
|
|
896
896
|
for (var o in t)
|
|
897
897
|
i[o] = t[o];
|
|
898
898
|
return i;
|
|
@@ -974,29 +974,29 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
974
974
|
*/
|
|
975
975
|
insertBefore: function(r, t, i, o) {
|
|
976
976
|
o = o || /** @type {any} */
|
|
977
|
-
|
|
978
|
-
var
|
|
979
|
-
for (var
|
|
980
|
-
if (
|
|
981
|
-
if (
|
|
982
|
-
for (var
|
|
983
|
-
i.hasOwnProperty(
|
|
984
|
-
i.hasOwnProperty(
|
|
977
|
+
s.languages;
|
|
978
|
+
var l = o[r], g = {};
|
|
979
|
+
for (var x in l)
|
|
980
|
+
if (l.hasOwnProperty(x)) {
|
|
981
|
+
if (x == t)
|
|
982
|
+
for (var f in i)
|
|
983
|
+
i.hasOwnProperty(f) && (g[f] = i[f]);
|
|
984
|
+
i.hasOwnProperty(x) || (g[x] = l[x]);
|
|
985
985
|
}
|
|
986
|
-
var
|
|
987
|
-
return o[r] =
|
|
988
|
-
W ===
|
|
989
|
-
}),
|
|
986
|
+
var N = o[r];
|
|
987
|
+
return o[r] = g, s.languages.DFS(s.languages, function(j, W) {
|
|
988
|
+
W === N && j != r && (this[j] = g);
|
|
989
|
+
}), g;
|
|
990
990
|
},
|
|
991
991
|
// Traverse a language definition with Depth First Search
|
|
992
|
-
DFS: function r(t, i, o,
|
|
993
|
-
|
|
994
|
-
var
|
|
995
|
-
for (var
|
|
996
|
-
if (t.hasOwnProperty(
|
|
997
|
-
i.call(t,
|
|
998
|
-
var
|
|
999
|
-
|
|
992
|
+
DFS: function r(t, i, o, l) {
|
|
993
|
+
l = l || {};
|
|
994
|
+
var g = s.util.objId;
|
|
995
|
+
for (var x in t)
|
|
996
|
+
if (t.hasOwnProperty(x)) {
|
|
997
|
+
i.call(t, x, t[x], o || x);
|
|
998
|
+
var f = t[x], N = s.util.type(f);
|
|
999
|
+
N === "Object" && !l[g(f)] ? (l[g(f)] = !0, r(f, i, null, l)) : N === "Array" && !l[g(f)] && (l[g(f)] = !0, r(f, i, x, l));
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
},
|
|
@@ -1014,7 +1014,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1014
1014
|
* @public
|
|
1015
1015
|
*/
|
|
1016
1016
|
highlightAll: function(r, t) {
|
|
1017
|
-
|
|
1017
|
+
s.highlightAllUnder(document, r, t);
|
|
1018
1018
|
},
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
|
|
@@ -1037,9 +1037,9 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1037
1037
|
container: r,
|
|
1038
1038
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
|
1039
1039
|
};
|
|
1040
|
-
|
|
1041
|
-
for (var
|
|
1042
|
-
|
|
1040
|
+
s.hooks.run("before-highlightall", o), o.elements = Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)), s.hooks.run("before-all-elements-highlight", o);
|
|
1041
|
+
for (var l = 0, g; g = o.elements[l++]; )
|
|
1042
|
+
s.highlightElement(g, t === !0, o.callback);
|
|
1043
1043
|
},
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Highlights the code inside a single element.
|
|
@@ -1070,38 +1070,38 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1070
1070
|
* @public
|
|
1071
1071
|
*/
|
|
1072
1072
|
highlightElement: function(r, t, i) {
|
|
1073
|
-
var o =
|
|
1074
|
-
|
|
1075
|
-
var
|
|
1076
|
-
|
|
1077
|
-
var
|
|
1073
|
+
var o = s.util.getLanguage(r), l = s.languages[o];
|
|
1074
|
+
s.util.setLanguage(r, o);
|
|
1075
|
+
var g = r.parentElement;
|
|
1076
|
+
g && g.nodeName.toLowerCase() === "pre" && s.util.setLanguage(g, o);
|
|
1077
|
+
var x = r.textContent, f = {
|
|
1078
1078
|
element: r,
|
|
1079
1079
|
language: o,
|
|
1080
|
-
grammar:
|
|
1081
|
-
code:
|
|
1080
|
+
grammar: l,
|
|
1081
|
+
code: x
|
|
1082
1082
|
};
|
|
1083
|
-
function
|
|
1084
|
-
|
|
1083
|
+
function N(W) {
|
|
1084
|
+
f.highlightedCode = W, s.hooks.run("before-insert", f), f.element.innerHTML = f.highlightedCode, s.hooks.run("after-highlight", f), s.hooks.run("complete", f), i && i.call(f.element);
|
|
1085
1085
|
}
|
|
1086
|
-
if (
|
|
1087
|
-
|
|
1086
|
+
if (s.hooks.run("before-sanity-check", f), g = f.element.parentElement, g && g.nodeName.toLowerCase() === "pre" && !g.hasAttribute("tabindex") && g.setAttribute("tabindex", "0"), !f.code) {
|
|
1087
|
+
s.hooks.run("complete", f), i && i.call(f.element);
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
|
-
if (
|
|
1091
|
-
|
|
1090
|
+
if (s.hooks.run("before-highlight", f), !f.grammar) {
|
|
1091
|
+
N(s.util.encode(f.code));
|
|
1092
1092
|
return;
|
|
1093
1093
|
}
|
|
1094
|
-
if (t &&
|
|
1095
|
-
var
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
},
|
|
1099
|
-
language:
|
|
1100
|
-
code:
|
|
1094
|
+
if (t && u.Worker) {
|
|
1095
|
+
var j = new Worker(s.filename);
|
|
1096
|
+
j.onmessage = function(W) {
|
|
1097
|
+
N(W.data);
|
|
1098
|
+
}, j.postMessage(JSON.stringify({
|
|
1099
|
+
language: f.language,
|
|
1100
|
+
code: f.code,
|
|
1101
1101
|
immediateClose: !0
|
|
1102
1102
|
}));
|
|
1103
1103
|
} else
|
|
1104
|
-
|
|
1104
|
+
N(s.highlight(f.code, f.grammar, f.language));
|
|
1105
1105
|
},
|
|
1106
1106
|
/**
|
|
1107
1107
|
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
|
@@ -1129,9 +1129,9 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1129
1129
|
grammar: t,
|
|
1130
1130
|
language: i
|
|
1131
1131
|
};
|
|
1132
|
-
if (
|
|
1132
|
+
if (s.hooks.run("before-tokenize", o), !o.grammar)
|
|
1133
1133
|
throw new Error('The language "' + o.language + '" has no grammar.');
|
|
1134
|
-
return o.tokens =
|
|
1134
|
+
return o.tokens = s.tokenize(o.code, o.grammar), s.hooks.run("after-tokenize", o), m.stringify(s.util.encode(o.tokens), o.language);
|
|
1135
1135
|
},
|
|
1136
1136
|
/**
|
|
1137
1137
|
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
@@ -1164,8 +1164,8 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1164
1164
|
t[o] = i[o];
|
|
1165
1165
|
delete t.rest;
|
|
1166
1166
|
}
|
|
1167
|
-
var
|
|
1168
|
-
return
|
|
1167
|
+
var l = new I();
|
|
1168
|
+
return L(l, l.head, r), S(r, l, t, l.head, 0), Z(l);
|
|
1169
1169
|
},
|
|
1170
1170
|
/**
|
|
1171
1171
|
* @namespace
|
|
@@ -1187,7 +1187,7 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1187
1187
|
* @public
|
|
1188
1188
|
*/
|
|
1189
1189
|
add: function(r, t) {
|
|
1190
|
-
var i =
|
|
1190
|
+
var i = s.hooks.all;
|
|
1191
1191
|
i[r] = i[r] || [], i[r].push(t);
|
|
1192
1192
|
},
|
|
1193
1193
|
/**
|
|
@@ -1200,134 +1200,134 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1200
1200
|
* @public
|
|
1201
1201
|
*/
|
|
1202
1202
|
run: function(r, t) {
|
|
1203
|
-
var i =
|
|
1203
|
+
var i = s.hooks.all[r];
|
|
1204
1204
|
if (!(!i || !i.length))
|
|
1205
|
-
for (var o = 0,
|
|
1206
|
-
|
|
1205
|
+
for (var o = 0, l; l = i[o++]; )
|
|
1206
|
+
l(t);
|
|
1207
1207
|
}
|
|
1208
1208
|
},
|
|
1209
|
-
Token:
|
|
1209
|
+
Token: m
|
|
1210
1210
|
};
|
|
1211
|
-
|
|
1212
|
-
function
|
|
1211
|
+
u.Prism = s;
|
|
1212
|
+
function m(r, t, i, o) {
|
|
1213
1213
|
this.type = r, this.content = t, this.alias = i, this.length = (o || "").length | 0;
|
|
1214
1214
|
}
|
|
1215
|
-
|
|
1215
|
+
m.stringify = function r(t, i) {
|
|
1216
1216
|
if (typeof t == "string")
|
|
1217
1217
|
return t;
|
|
1218
1218
|
if (Array.isArray(t)) {
|
|
1219
1219
|
var o = "";
|
|
1220
|
-
return t.forEach(function(
|
|
1221
|
-
o += r(
|
|
1220
|
+
return t.forEach(function(N) {
|
|
1221
|
+
o += r(N, i);
|
|
1222
1222
|
}), o;
|
|
1223
1223
|
}
|
|
1224
|
-
var
|
|
1224
|
+
var l = {
|
|
1225
1225
|
type: t.type,
|
|
1226
1226
|
content: r(t.content, i),
|
|
1227
1227
|
tag: "span",
|
|
1228
1228
|
classes: ["token", t.type],
|
|
1229
1229
|
attributes: {},
|
|
1230
1230
|
language: i
|
|
1231
|
-
},
|
|
1232
|
-
|
|
1233
|
-
var
|
|
1234
|
-
for (var
|
|
1235
|
-
|
|
1236
|
-
return "<" +
|
|
1231
|
+
}, g = t.alias;
|
|
1232
|
+
g && (Array.isArray(g) ? Array.prototype.push.apply(l.classes, g) : l.classes.push(g)), s.hooks.run("wrap", l);
|
|
1233
|
+
var x = "";
|
|
1234
|
+
for (var f in l.attributes)
|
|
1235
|
+
x += " " + f + '="' + (l.attributes[f] || "").replace(/"/g, """) + '"';
|
|
1236
|
+
return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' + x + ">" + l.content + "</" + l.tag + ">";
|
|
1237
1237
|
};
|
|
1238
|
-
function
|
|
1238
|
+
function k(r, t, i, o) {
|
|
1239
1239
|
r.lastIndex = t;
|
|
1240
|
-
var
|
|
1241
|
-
if (
|
|
1242
|
-
var
|
|
1243
|
-
|
|
1240
|
+
var l = r.exec(i);
|
|
1241
|
+
if (l && o && l[1]) {
|
|
1242
|
+
var g = l[1].length;
|
|
1243
|
+
l.index += g, l[0] = l[0].slice(g);
|
|
1244
1244
|
}
|
|
1245
|
-
return
|
|
1246
|
-
}
|
|
1247
|
-
function
|
|
1248
|
-
for (var
|
|
1249
|
-
if (!(!i.hasOwnProperty(
|
|
1250
|
-
var
|
|
1251
|
-
|
|
1252
|
-
for (var
|
|
1253
|
-
if (
|
|
1245
|
+
return l;
|
|
1246
|
+
}
|
|
1247
|
+
function S(r, t, i, o, l, g) {
|
|
1248
|
+
for (var x in i)
|
|
1249
|
+
if (!(!i.hasOwnProperty(x) || !i[x])) {
|
|
1250
|
+
var f = i[x];
|
|
1251
|
+
f = Array.isArray(f) ? f : [f];
|
|
1252
|
+
for (var N = 0; N < f.length; ++N) {
|
|
1253
|
+
if (g && g.cause == x + "," + N)
|
|
1254
1254
|
return;
|
|
1255
|
-
var
|
|
1256
|
-
if (G && !
|
|
1257
|
-
var
|
|
1258
|
-
|
|
1255
|
+
var j = f[N], W = j.inside, H = !!j.lookbehind, G = !!j.greedy, ne = j.alias;
|
|
1256
|
+
if (G && !j.pattern.global) {
|
|
1257
|
+
var ae = j.pattern.toString().match(/[imsuy]*$/)[0];
|
|
1258
|
+
j.pattern = RegExp(j.pattern.source, ae + "g");
|
|
1259
1259
|
}
|
|
1260
|
-
for (var ue =
|
|
1261
|
-
var
|
|
1260
|
+
for (var ue = j.pattern || j, D = o.next, z = l; D !== t.tail && !(g && z >= g.reach); z += D.value.length, D = D.next) {
|
|
1261
|
+
var re = D.value;
|
|
1262
1262
|
if (t.length > r.length)
|
|
1263
1263
|
return;
|
|
1264
|
-
if (!(
|
|
1264
|
+
if (!(re instanceof m)) {
|
|
1265
1265
|
var J = 1, B;
|
|
1266
1266
|
if (G) {
|
|
1267
|
-
if (B =
|
|
1267
|
+
if (B = k(ue, z, r, H), !B || B.index >= r.length)
|
|
1268
1268
|
break;
|
|
1269
|
-
var
|
|
1270
|
-
for (
|
|
1271
|
-
|
|
1272
|
-
if (
|
|
1269
|
+
var ie = B.index, le = B.index + B[0].length, q = z;
|
|
1270
|
+
for (q += D.value.length; ie >= q; )
|
|
1271
|
+
D = D.next, q += D.value.length;
|
|
1272
|
+
if (q -= D.value.length, z = q, D.value instanceof m)
|
|
1273
1273
|
continue;
|
|
1274
|
-
for (var
|
|
1275
|
-
J++,
|
|
1276
|
-
J--,
|
|
1277
|
-
} else if (B =
|
|
1274
|
+
for (var Q = D; Q !== t.tail && (q < le || typeof Q.value == "string"); Q = Q.next)
|
|
1275
|
+
J++, q += Q.value.length;
|
|
1276
|
+
J--, re = r.slice(z, q), B.index -= z;
|
|
1277
|
+
} else if (B = k(ue, 0, re, H), !B)
|
|
1278
1278
|
continue;
|
|
1279
|
-
var
|
|
1280
|
-
|
|
1281
|
-
var
|
|
1282
|
-
|
|
1283
|
-
var
|
|
1284
|
-
if (
|
|
1285
|
-
var
|
|
1286
|
-
cause:
|
|
1287
|
-
reach:
|
|
1279
|
+
var ie = B.index, oe = B[0], Y = re.slice(0, ie), de = re.slice(ie + oe.length), se = z + re.length;
|
|
1280
|
+
g && se > g.reach && (g.reach = se);
|
|
1281
|
+
var pe = D.prev;
|
|
1282
|
+
Y && (pe = L(t, pe, Y), z += Y.length), U(t, pe, J);
|
|
1283
|
+
var ye = new m(x, W ? s.tokenize(oe, W) : oe, ne, oe);
|
|
1284
|
+
if (D = L(t, pe, ye), de && L(t, D, de), J > 1) {
|
|
1285
|
+
var me = {
|
|
1286
|
+
cause: x + "," + N,
|
|
1287
|
+
reach: se
|
|
1288
1288
|
};
|
|
1289
|
-
|
|
1289
|
+
S(r, t, i, D.prev, z, me), g && me.reach > g.reach && (g.reach = me.reach);
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1296
|
+
function I() {
|
|
1297
1297
|
var r = { value: null, prev: null, next: null }, t = { value: null, prev: r, next: null };
|
|
1298
1298
|
r.next = t, this.head = r, this.tail = t, this.length = 0;
|
|
1299
1299
|
}
|
|
1300
|
-
function
|
|
1301
|
-
var o = t.next,
|
|
1302
|
-
return t.next =
|
|
1300
|
+
function L(r, t, i) {
|
|
1301
|
+
var o = t.next, l = { value: i, prev: t, next: o };
|
|
1302
|
+
return t.next = l, o.prev = l, r.length++, l;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
for (var o = t.next,
|
|
1304
|
+
function U(r, t, i) {
|
|
1305
|
+
for (var o = t.next, l = 0; l < i && o !== r.tail; l++)
|
|
1306
1306
|
o = o.next;
|
|
1307
|
-
t.next = o, o.prev = t, r.length -=
|
|
1307
|
+
t.next = o, o.prev = t, r.length -= l;
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function Z(r) {
|
|
1310
1310
|
for (var t = [], i = r.head.next; i !== r.tail; )
|
|
1311
1311
|
t.push(i.value), i = i.next;
|
|
1312
1312
|
return t;
|
|
1313
1313
|
}
|
|
1314
|
-
if (!
|
|
1315
|
-
return
|
|
1316
|
-
var t = JSON.parse(r.data), i = t.language, o = t.code,
|
|
1317
|
-
|
|
1318
|
-
}, !1)),
|
|
1319
|
-
var
|
|
1320
|
-
|
|
1321
|
-
function
|
|
1322
|
-
|
|
1323
|
-
}
|
|
1324
|
-
if (!
|
|
1325
|
-
var
|
|
1326
|
-
|
|
1327
|
-
}
|
|
1328
|
-
return
|
|
1329
|
-
}(
|
|
1330
|
-
|
|
1314
|
+
if (!u.document)
|
|
1315
|
+
return u.addEventListener && (s.disableWorkerMessageHandler || u.addEventListener("message", function(r) {
|
|
1316
|
+
var t = JSON.parse(r.data), i = t.language, o = t.code, l = t.immediateClose;
|
|
1317
|
+
u.postMessage(s.highlight(o, s.languages[i], i)), l && u.close();
|
|
1318
|
+
}, !1)), s;
|
|
1319
|
+
var _ = s.util.currentScript();
|
|
1320
|
+
_ && (s.filename = _.src, _.hasAttribute("data-manual") && (s.manual = !0));
|
|
1321
|
+
function E() {
|
|
1322
|
+
s.manual || s.highlightAll();
|
|
1323
|
+
}
|
|
1324
|
+
if (!s.manual) {
|
|
1325
|
+
var y = document.readyState;
|
|
1326
|
+
y === "loading" || y === "interactive" && _ && _.defer ? document.addEventListener("DOMContentLoaded", E) : window.requestAnimationFrame ? window.requestAnimationFrame(E) : window.setTimeout(E, 16);
|
|
1327
|
+
}
|
|
1328
|
+
return s;
|
|
1329
|
+
}(h);
|
|
1330
|
+
p.exports && (p.exports = n), typeof Je < "u" && (Je.Prism = n), n.languages.markup = {
|
|
1331
1331
|
comment: {
|
|
1332
1332
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
1333
1333
|
greedy: !0
|
|
@@ -1404,8 +1404,8 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1404
1404
|
},
|
|
1405
1405
|
/&#x?[\da-f]{1,8};/i
|
|
1406
1406
|
]
|
|
1407
|
-
}, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(
|
|
1408
|
-
|
|
1407
|
+
}, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(u) {
|
|
1408
|
+
u.type === "entity" && (u.attributes.title = u.content.replace(/&/, "&"));
|
|
1409
1409
|
}), Object.defineProperty(n.languages.markup.tag, "addInlined", {
|
|
1410
1410
|
/**
|
|
1411
1411
|
* Adds an inlined language to markup.
|
|
@@ -1418,32 +1418,32 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1418
1418
|
* @example
|
|
1419
1419
|
* addInlined('style', 'css');
|
|
1420
1420
|
*/
|
|
1421
|
-
value: function(
|
|
1422
|
-
var
|
|
1423
|
-
|
|
1421
|
+
value: function(b, A) {
|
|
1422
|
+
var R = {};
|
|
1423
|
+
R["language-" + A] = {
|
|
1424
1424
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
1425
1425
|
lookbehind: !0,
|
|
1426
|
-
inside: n.languages[
|
|
1427
|
-
},
|
|
1428
|
-
var
|
|
1426
|
+
inside: n.languages[A]
|
|
1427
|
+
}, R.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
1428
|
+
var s = {
|
|
1429
1429
|
"included-cdata": {
|
|
1430
1430
|
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
1431
|
-
inside:
|
|
1431
|
+
inside: R
|
|
1432
1432
|
}
|
|
1433
1433
|
};
|
|
1434
|
-
|
|
1434
|
+
s["language-" + A] = {
|
|
1435
1435
|
pattern: /[\s\S]+/,
|
|
1436
|
-
inside: n.languages[
|
|
1436
|
+
inside: n.languages[A]
|
|
1437
1437
|
};
|
|
1438
|
-
var
|
|
1439
|
-
b
|
|
1438
|
+
var m = {};
|
|
1439
|
+
m[b] = {
|
|
1440
1440
|
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
1441
|
-
return
|
|
1441
|
+
return b;
|
|
1442
1442
|
}), "i"),
|
|
1443
1443
|
lookbehind: !0,
|
|
1444
1444
|
greedy: !0,
|
|
1445
|
-
inside:
|
|
1446
|
-
}, n.languages.insertBefore("markup", "cdata",
|
|
1445
|
+
inside: s
|
|
1446
|
+
}, n.languages.insertBefore("markup", "cdata", m);
|
|
1447
1447
|
}
|
|
1448
1448
|
}), Object.defineProperty(n.languages.markup.tag, "addAttribute", {
|
|
1449
1449
|
/**
|
|
@@ -1457,10 +1457,10 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1457
1457
|
* @example
|
|
1458
1458
|
* addAttribute('style', 'css');
|
|
1459
1459
|
*/
|
|
1460
|
-
value: function(
|
|
1460
|
+
value: function(u, b) {
|
|
1461
1461
|
n.languages.markup.tag.inside["special-attr"].push({
|
|
1462
1462
|
pattern: RegExp(
|
|
1463
|
-
/(^|["'\s])/.source + "(?:" +
|
|
1463
|
+
/(^|["'\s])/.source + "(?:" + u + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
|
1464
1464
|
"i"
|
|
1465
1465
|
),
|
|
1466
1466
|
lookbehind: !0,
|
|
@@ -1472,8 +1472,8 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1472
1472
|
value: {
|
|
1473
1473
|
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
|
1474
1474
|
lookbehind: !0,
|
|
1475
|
-
alias: [
|
|
1476
|
-
inside: n.languages[
|
|
1475
|
+
alias: [b, "language-" + b],
|
|
1476
|
+
inside: n.languages[b]
|
|
1477
1477
|
},
|
|
1478
1478
|
punctuation: [
|
|
1479
1479
|
{
|
|
@@ -1487,12 +1487,12 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1487
1487
|
}
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
|
-
}), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(
|
|
1491
|
-
var
|
|
1492
|
-
|
|
1490
|
+
}), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(u) {
|
|
1491
|
+
var b = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
1492
|
+
u.languages.css = {
|
|
1493
1493
|
comment: /\/\*[\s\S]*?\*\//,
|
|
1494
1494
|
atrule: {
|
|
1495
|
-
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" +
|
|
1495
|
+
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + b.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
|
1496
1496
|
inside: {
|
|
1497
1497
|
rule: /^@[\w-]+/,
|
|
1498
1498
|
"selector-function-argument": {
|
|
@@ -1509,23 +1509,23 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1509
1509
|
},
|
|
1510
1510
|
url: {
|
|
1511
1511
|
// https://drafts.csswg.org/css-values-3/#urls
|
|
1512
|
-
pattern: RegExp("\\burl\\((?:" +
|
|
1512
|
+
pattern: RegExp("\\burl\\((?:" + b.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
|
|
1513
1513
|
greedy: !0,
|
|
1514
1514
|
inside: {
|
|
1515
1515
|
function: /^url/i,
|
|
1516
1516
|
punctuation: /^\(|\)$/,
|
|
1517
1517
|
string: {
|
|
1518
|
-
pattern: RegExp("^" +
|
|
1518
|
+
pattern: RegExp("^" + b.source + "$"),
|
|
1519
1519
|
alias: "url"
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
},
|
|
1523
1523
|
selector: {
|
|
1524
|
-
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` +
|
|
1524
|
+
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + b.source + ")*(?=\\s*\\{)"),
|
|
1525
1525
|
lookbehind: !0
|
|
1526
1526
|
},
|
|
1527
1527
|
string: {
|
|
1528
|
-
pattern:
|
|
1528
|
+
pattern: b,
|
|
1529
1529
|
greedy: !0
|
|
1530
1530
|
},
|
|
1531
1531
|
property: {
|
|
@@ -1538,9 +1538,9 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1538
1538
|
lookbehind: !0
|
|
1539
1539
|
},
|
|
1540
1540
|
punctuation: /[(){};:,]/
|
|
1541
|
-
},
|
|
1542
|
-
var
|
|
1543
|
-
|
|
1541
|
+
}, u.languages.css.atrule.inside.rest = u.languages.css;
|
|
1542
|
+
var A = u.languages.markup;
|
|
1543
|
+
A && (A.tag.addInlined("style", "css"), A.tag.addAttribute("style", "css"));
|
|
1544
1544
|
}(n), n.languages.clike = {
|
|
1545
1545
|
comment: [
|
|
1546
1546
|
{
|
|
@@ -1705,9 +1705,9 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1705
1705
|
if (typeof n > "u" || typeof document > "u")
|
|
1706
1706
|
return;
|
|
1707
1707
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
1708
|
-
var
|
|
1709
|
-
return "✖ Error " +
|
|
1710
|
-
},
|
|
1708
|
+
var u = "Loading…", b = function(_, E) {
|
|
1709
|
+
return "✖ Error " + _ + " while fetching file: " + E;
|
|
1710
|
+
}, A = "✖ Error: File does not exist or is empty", R = {
|
|
1711
1711
|
js: "javascript",
|
|
1712
1712
|
py: "python",
|
|
1713
1713
|
rb: "ruby",
|
|
@@ -1717,52 +1717,52 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1717
1717
|
bat: "batch",
|
|
1718
1718
|
h: "c",
|
|
1719
1719
|
tex: "latex"
|
|
1720
|
-
},
|
|
1721
|
-
function
|
|
1720
|
+
}, s = "data-src-status", m = "loading", k = "loaded", S = "failed", I = "pre[data-src]:not([" + s + '="' + k + '"]):not([' + s + '="' + m + '"])';
|
|
1721
|
+
function L(_, E, y) {
|
|
1722
1722
|
var r = new XMLHttpRequest();
|
|
1723
|
-
r.open("GET",
|
|
1724
|
-
r.readyState == 4 && (r.status < 400 && r.responseText ?
|
|
1723
|
+
r.open("GET", _, !0), r.onreadystatechange = function() {
|
|
1724
|
+
r.readyState == 4 && (r.status < 400 && r.responseText ? E(r.responseText) : r.status >= 400 ? y(b(r.status, r.statusText)) : y(A));
|
|
1725
1725
|
}, r.send(null);
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1728
|
-
var
|
|
1729
|
-
if (
|
|
1730
|
-
var
|
|
1731
|
-
return r ? t ? [
|
|
1727
|
+
function U(_) {
|
|
1728
|
+
var E = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(_ || "");
|
|
1729
|
+
if (E) {
|
|
1730
|
+
var y = Number(E[1]), r = E[2], t = E[3];
|
|
1731
|
+
return r ? t ? [y, Number(t)] : [y, void 0] : [y, y];
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
|
-
n.hooks.add("before-highlightall", function(
|
|
1735
|
-
|
|
1736
|
-
}), n.hooks.add("before-sanity-check", function(
|
|
1737
|
-
var
|
|
1734
|
+
n.hooks.add("before-highlightall", function(_) {
|
|
1735
|
+
_.selector += ", " + I;
|
|
1736
|
+
}), n.hooks.add("before-sanity-check", function(_) {
|
|
1737
|
+
var E = (
|
|
1738
1738
|
/** @type {HTMLPreElement} */
|
|
1739
|
-
|
|
1739
|
+
_.element
|
|
1740
1740
|
);
|
|
1741
|
-
if (
|
|
1742
|
-
|
|
1743
|
-
var
|
|
1744
|
-
|
|
1745
|
-
var r =
|
|
1741
|
+
if (E.matches(I)) {
|
|
1742
|
+
_.code = "", E.setAttribute(s, m);
|
|
1743
|
+
var y = E.appendChild(document.createElement("CODE"));
|
|
1744
|
+
y.textContent = u;
|
|
1745
|
+
var r = E.getAttribute("data-src"), t = _.language;
|
|
1746
1746
|
if (t === "none") {
|
|
1747
1747
|
var i = (/\.(\w+)$/.exec(r) || [, "none"])[1];
|
|
1748
|
-
t =
|
|
1748
|
+
t = R[i] || i;
|
|
1749
1749
|
}
|
|
1750
|
-
n.util.setLanguage(
|
|
1750
|
+
n.util.setLanguage(y, t), n.util.setLanguage(E, t);
|
|
1751
1751
|
var o = n.plugins.autoloader;
|
|
1752
|
-
o && o.loadLanguages(t),
|
|
1752
|
+
o && o.loadLanguages(t), L(
|
|
1753
1753
|
r,
|
|
1754
|
-
function(
|
|
1755
|
-
|
|
1756
|
-
var
|
|
1757
|
-
if (
|
|
1758
|
-
var
|
|
1759
|
-
|
|
1760
|
-
`),
|
|
1754
|
+
function(l) {
|
|
1755
|
+
E.setAttribute(s, k);
|
|
1756
|
+
var g = U(E.getAttribute("data-range"));
|
|
1757
|
+
if (g) {
|
|
1758
|
+
var x = l.split(/\r\n?|\n/g), f = g[0], N = g[1] == null ? x.length : g[1];
|
|
1759
|
+
f < 0 && (f += x.length), f = Math.max(0, Math.min(f - 1, x.length)), N < 0 && (N += x.length), N = Math.max(0, Math.min(N, x.length)), l = x.slice(f, N).join(`
|
|
1760
|
+
`), E.hasAttribute("data-start") || E.setAttribute("data-start", String(f + 1));
|
|
1761
1761
|
}
|
|
1762
|
-
|
|
1762
|
+
y.textContent = l, n.highlightElement(y);
|
|
1763
1763
|
},
|
|
1764
|
-
function(
|
|
1765
|
-
|
|
1764
|
+
function(l) {
|
|
1765
|
+
E.setAttribute(s, S), y.textContent = l;
|
|
1766
1766
|
}
|
|
1767
1767
|
);
|
|
1768
1768
|
}
|
|
@@ -1774,19 +1774,19 @@ var c = Ce.exports, Je = { exports: {} };
|
|
|
1774
1774
|
*
|
|
1775
1775
|
* @param {ParentNode} [container=document]
|
|
1776
1776
|
*/
|
|
1777
|
-
highlight: function(
|
|
1778
|
-
for (var
|
|
1777
|
+
highlight: function(E) {
|
|
1778
|
+
for (var y = (E || document).querySelectorAll(I), r = 0, t; t = y[r++]; )
|
|
1779
1779
|
n.highlightElement(t);
|
|
1780
1780
|
}
|
|
1781
1781
|
};
|
|
1782
|
-
var
|
|
1782
|
+
var Z = !1;
|
|
1783
1783
|
n.fileHighlight = function() {
|
|
1784
|
-
|
|
1784
|
+
Z || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), Z = !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
|
|
1785
1785
|
};
|
|
1786
1786
|
}();
|
|
1787
|
-
})(
|
|
1788
|
-
var Tr =
|
|
1789
|
-
const
|
|
1787
|
+
})(nr);
|
|
1788
|
+
var Tr = nr.exports;
|
|
1789
|
+
const ze = /* @__PURE__ */ wr(Tr);
|
|
1790
1790
|
Prism.languages.clike = {
|
|
1791
1791
|
comment: [
|
|
1792
1792
|
{
|
|
@@ -2044,8 +2044,8 @@ Prism.languages.insertBefore("go", "string", {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
});
|
|
2046
2046
|
delete Prism.languages.go["class-name"];
|
|
2047
|
-
(function(
|
|
2048
|
-
var
|
|
2047
|
+
(function(p) {
|
|
2048
|
+
var h = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, u = {
|
|
2049
2049
|
pattern: RegExp(/(^|[^\w.])/.source + n + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
2050
2050
|
lookbehind: !0,
|
|
2051
2051
|
inside: {
|
|
@@ -2058,32 +2058,32 @@ delete Prism.languages.go["class-name"];
|
|
|
2058
2058
|
punctuation: /\./
|
|
2059
2059
|
}
|
|
2060
2060
|
};
|
|
2061
|
-
|
|
2061
|
+
p.languages.java = p.languages.extend("clike", {
|
|
2062
2062
|
string: {
|
|
2063
2063
|
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
|
|
2064
2064
|
lookbehind: !0,
|
|
2065
2065
|
greedy: !0
|
|
2066
2066
|
},
|
|
2067
2067
|
"class-name": [
|
|
2068
|
-
|
|
2068
|
+
u,
|
|
2069
2069
|
{
|
|
2070
2070
|
// variables, parameters, and constructor references
|
|
2071
2071
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
2072
2072
|
pattern: RegExp(/(^|[^\w.])/.source + n + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
|
|
2073
2073
|
lookbehind: !0,
|
|
2074
|
-
inside:
|
|
2074
|
+
inside: u.inside
|
|
2075
2075
|
},
|
|
2076
2076
|
{
|
|
2077
2077
|
// class names based on keyword
|
|
2078
2078
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
2079
2079
|
pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + n + /[A-Z]\w*\b/.source),
|
|
2080
2080
|
lookbehind: !0,
|
|
2081
|
-
inside:
|
|
2081
|
+
inside: u.inside
|
|
2082
2082
|
}
|
|
2083
2083
|
],
|
|
2084
|
-
keyword:
|
|
2084
|
+
keyword: h,
|
|
2085
2085
|
function: [
|
|
2086
|
-
|
|
2086
|
+
p.languages.clike.function,
|
|
2087
2087
|
{
|
|
2088
2088
|
pattern: /(::\s*)[a-z_]\w*/,
|
|
2089
2089
|
lookbehind: !0
|
|
@@ -2095,7 +2095,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2095
2095
|
lookbehind: !0
|
|
2096
2096
|
},
|
|
2097
2097
|
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
2098
|
-
}),
|
|
2098
|
+
}), p.languages.insertBefore("java", "string", {
|
|
2099
2099
|
"triple-quoted-string": {
|
|
2100
2100
|
// http://openjdk.java.net/jeps/355#Description
|
|
2101
2101
|
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
|
@@ -2106,7 +2106,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2106
2106
|
pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
|
|
2107
2107
|
greedy: !0
|
|
2108
2108
|
}
|
|
2109
|
-
}),
|
|
2109
|
+
}), p.languages.insertBefore("java", "class-name", {
|
|
2110
2110
|
annotation: {
|
|
2111
2111
|
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
|
2112
2112
|
lookbehind: !0,
|
|
@@ -2115,8 +2115,8 @@ delete Prism.languages.go["class-name"];
|
|
|
2115
2115
|
generics: {
|
|
2116
2116
|
pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
|
2117
2117
|
inside: {
|
|
2118
|
-
"class-name":
|
|
2119
|
-
keyword:
|
|
2118
|
+
"class-name": u,
|
|
2119
|
+
keyword: h,
|
|
2120
2120
|
punctuation: /[<>(),.:]/,
|
|
2121
2121
|
operator: /[?&|]/
|
|
2122
2122
|
}
|
|
@@ -2126,7 +2126,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2126
2126
|
pattern: RegExp(/(\bimport\s+)/.source + n + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
|
|
2127
2127
|
lookbehind: !0,
|
|
2128
2128
|
inside: {
|
|
2129
|
-
namespace:
|
|
2129
|
+
namespace: u.inside.namespace,
|
|
2130
2130
|
punctuation: /\./,
|
|
2131
2131
|
operator: /\*/,
|
|
2132
2132
|
"class-name": /\w+/
|
|
@@ -2137,7 +2137,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2137
2137
|
lookbehind: !0,
|
|
2138
2138
|
alias: "static",
|
|
2139
2139
|
inside: {
|
|
2140
|
-
namespace:
|
|
2140
|
+
namespace: u.inside.namespace,
|
|
2141
2141
|
static: /\b\w+$/,
|
|
2142
2142
|
punctuation: /\./,
|
|
2143
2143
|
operator: /\*/,
|
|
@@ -2148,7 +2148,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2148
2148
|
namespace: {
|
|
2149
2149
|
pattern: RegExp(
|
|
2150
2150
|
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
|
|
2151
|
-
return
|
|
2151
|
+
return h.source;
|
|
2152
2152
|
})
|
|
2153
2153
|
),
|
|
2154
2154
|
lookbehind: !0,
|
|
@@ -2234,17 +2234,17 @@ Prism.languages.insertBefore("c", "function", {
|
|
|
2234
2234
|
constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
|
|
2235
2235
|
});
|
|
2236
2236
|
delete Prism.languages.c.boolean;
|
|
2237
|
-
(function(
|
|
2238
|
-
for (var
|
|
2239
|
-
|
|
2240
|
-
return
|
|
2237
|
+
(function(p) {
|
|
2238
|
+
for (var h = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, n = 0; n < 2; n++)
|
|
2239
|
+
h = h.replace(/<self>/g, function() {
|
|
2240
|
+
return h;
|
|
2241
2241
|
});
|
|
2242
|
-
|
|
2242
|
+
h = h.replace(/<self>/g, function() {
|
|
2243
2243
|
return /[^\s\S]/.source;
|
|
2244
|
-
}),
|
|
2244
|
+
}), p.languages.rust = {
|
|
2245
2245
|
comment: [
|
|
2246
2246
|
{
|
|
2247
|
-
pattern: RegExp(/(^|[^\\])/.source +
|
|
2247
|
+
pattern: RegExp(/(^|[^\\])/.source + h),
|
|
2248
2248
|
lookbehind: !0,
|
|
2249
2249
|
greedy: !0
|
|
2250
2250
|
},
|
|
@@ -2348,7 +2348,7 @@ delete Prism.languages.c.boolean;
|
|
|
2348
2348
|
boolean: /\b(?:false|true)\b/,
|
|
2349
2349
|
punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
|
|
2350
2350
|
operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
|
|
2351
|
-
},
|
|
2351
|
+
}, p.languages.rust["closure-params"].inside.rest = p.languages.rust, p.languages.rust.attribute.inside.string = p.languages.rust.string;
|
|
2352
2352
|
})(Prism);
|
|
2353
2353
|
Prism.languages.sql = {
|
|
2354
2354
|
comment: {
|
|
@@ -2383,18 +2383,18 @@ Prism.languages.sql = {
|
|
|
2383
2383
|
operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
|
|
2384
2384
|
punctuation: /[;[\]()`,.]/
|
|
2385
2385
|
};
|
|
2386
|
-
(function(
|
|
2387
|
-
var
|
|
2386
|
+
(function(p) {
|
|
2387
|
+
var h = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n = {
|
|
2388
2388
|
pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
|
|
2389
2389
|
lookbehind: !0,
|
|
2390
2390
|
alias: "punctuation",
|
|
2391
2391
|
// this looks reasonably well in all themes
|
|
2392
2392
|
inside: null
|
|
2393
2393
|
// see below
|
|
2394
|
-
},
|
|
2394
|
+
}, u = {
|
|
2395
2395
|
bash: n,
|
|
2396
2396
|
environment: {
|
|
2397
|
-
pattern: RegExp("\\$" +
|
|
2397
|
+
pattern: RegExp("\\$" + h),
|
|
2398
2398
|
alias: "constant"
|
|
2399
2399
|
},
|
|
2400
2400
|
variable: [
|
|
@@ -2434,7 +2434,7 @@ Prism.languages.sql = {
|
|
|
2434
2434
|
operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
|
|
2435
2435
|
punctuation: /[\[\]]/,
|
|
2436
2436
|
environment: {
|
|
2437
|
-
pattern: RegExp("(\\{)" +
|
|
2437
|
+
pattern: RegExp("(\\{)" + h),
|
|
2438
2438
|
lookbehind: !0,
|
|
2439
2439
|
alias: "constant"
|
|
2440
2440
|
}
|
|
@@ -2445,7 +2445,7 @@ Prism.languages.sql = {
|
|
|
2445
2445
|
// Escape sequences from echo and printf's manuals, and escaped quotes.
|
|
2446
2446
|
entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
|
|
2447
2447
|
};
|
|
2448
|
-
|
|
2448
|
+
p.languages.bash = {
|
|
2449
2449
|
shebang: {
|
|
2450
2450
|
pattern: /^#!\s*\/.*/,
|
|
2451
2451
|
alias: "important"
|
|
@@ -2483,7 +2483,7 @@ Prism.languages.sql = {
|
|
|
2483
2483
|
pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
|
|
2484
2484
|
inside: {
|
|
2485
2485
|
environment: {
|
|
2486
|
-
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" +
|
|
2486
|
+
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + h),
|
|
2487
2487
|
lookbehind: !0,
|
|
2488
2488
|
alias: "constant"
|
|
2489
2489
|
}
|
|
@@ -2503,7 +2503,7 @@ Prism.languages.sql = {
|
|
|
2503
2503
|
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
|
|
2504
2504
|
lookbehind: !0,
|
|
2505
2505
|
greedy: !0,
|
|
2506
|
-
inside:
|
|
2506
|
+
inside: u
|
|
2507
2507
|
},
|
|
2508
2508
|
// Here-document with quotes around the tag
|
|
2509
2509
|
// → No expansion (so no “inside”).
|
|
@@ -2521,7 +2521,7 @@ Prism.languages.sql = {
|
|
|
2521
2521
|
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
|
|
2522
2522
|
lookbehind: !0,
|
|
2523
2523
|
greedy: !0,
|
|
2524
|
-
inside:
|
|
2524
|
+
inside: u
|
|
2525
2525
|
},
|
|
2526
2526
|
{
|
|
2527
2527
|
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
|
|
@@ -2534,15 +2534,15 @@ Prism.languages.sql = {
|
|
|
2534
2534
|
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
|
|
2535
2535
|
greedy: !0,
|
|
2536
2536
|
inside: {
|
|
2537
|
-
entity:
|
|
2537
|
+
entity: u.entity
|
|
2538
2538
|
}
|
|
2539
2539
|
}
|
|
2540
2540
|
],
|
|
2541
2541
|
environment: {
|
|
2542
|
-
pattern: RegExp("\\$?" +
|
|
2542
|
+
pattern: RegExp("\\$?" + h),
|
|
2543
2543
|
alias: "constant"
|
|
2544
2544
|
},
|
|
2545
|
-
variable:
|
|
2545
|
+
variable: u.variable,
|
|
2546
2546
|
function: {
|
|
2547
2547
|
pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
|
|
2548
2548
|
lookbehind: !0
|
|
@@ -2581,8 +2581,8 @@ Prism.languages.sql = {
|
|
|
2581
2581
|
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
|
|
2582
2582
|
lookbehind: !0
|
|
2583
2583
|
}
|
|
2584
|
-
}, n.inside =
|
|
2585
|
-
for (var
|
|
2584
|
+
}, n.inside = p.languages.bash;
|
|
2585
|
+
for (var b = [
|
|
2586
2586
|
"comment",
|
|
2587
2587
|
"function-name",
|
|
2588
2588
|
"for-or-select",
|
|
@@ -2598,9 +2598,9 @@ Prism.languages.sql = {
|
|
|
2598
2598
|
"operator",
|
|
2599
2599
|
"punctuation",
|
|
2600
2600
|
"number"
|
|
2601
|
-
],
|
|
2602
|
-
|
|
2603
|
-
|
|
2601
|
+
], A = u.variable[1].inside, R = 0; R < b.length; R++)
|
|
2602
|
+
A[b[R]] = p.languages.bash[b[R]];
|
|
2603
|
+
p.languages.sh = p.languages.bash, p.languages.shell = p.languages.bash;
|
|
2604
2604
|
})(Prism);
|
|
2605
2605
|
Prism.languages.json = {
|
|
2606
2606
|
property: {
|
|
@@ -2789,15 +2789,15 @@ const Rr = `
|
|
|
2789
2789
|
color: #333 !important;
|
|
2790
2790
|
}
|
|
2791
2791
|
`;
|
|
2792
|
-
window.Prism =
|
|
2793
|
-
function Fr(
|
|
2792
|
+
window.Prism = ze;
|
|
2793
|
+
function Fr(p) {
|
|
2794
2794
|
if (typeof document > "u") return;
|
|
2795
|
-
const
|
|
2795
|
+
const h = "hep-cr-prism-styles", n = document.getElementById(h), u = p === "dark" ? Rr : _r;
|
|
2796
2796
|
n && n.remove();
|
|
2797
|
-
const
|
|
2798
|
-
|
|
2797
|
+
const b = document.createElement("style");
|
|
2798
|
+
b.id = h, b.textContent = u, document.head.appendChild(b);
|
|
2799
2799
|
}
|
|
2800
|
-
const
|
|
2800
|
+
const Ir = {
|
|
2801
2801
|
javascript: "javascript",
|
|
2802
2802
|
js: "javascript",
|
|
2803
2803
|
typescript: "typescript",
|
|
@@ -2829,60 +2829,68 @@ const Or = {
|
|
|
2829
2829
|
markdown: "markdown",
|
|
2830
2830
|
md: "markdown"
|
|
2831
2831
|
};
|
|
2832
|
-
function
|
|
2833
|
-
const
|
|
2834
|
-
return
|
|
2832
|
+
function Or(p) {
|
|
2833
|
+
const h = document.createElement("div");
|
|
2834
|
+
return h.textContent = p, h.innerHTML;
|
|
2835
2835
|
}
|
|
2836
2836
|
const Nr = ({
|
|
2837
|
-
value:
|
|
2838
|
-
language:
|
|
2837
|
+
value: p,
|
|
2838
|
+
language: h,
|
|
2839
2839
|
theme: n = "dark",
|
|
2840
|
-
disabled:
|
|
2841
|
-
onChange:
|
|
2840
|
+
disabled: u = !1,
|
|
2841
|
+
onChange: b,
|
|
2842
|
+
onCodeChange: A
|
|
2842
2843
|
}) => {
|
|
2843
|
-
const
|
|
2844
|
+
const R = Pe(null), s = Pe(null), m = Pe(null), k = Ae(() => Ir[h.toLowerCase()] || "javascript", [h]), S = n === "dark" ? "#1e1e1e" : "#fafafa", I = Ae(() => {
|
|
2844
2845
|
try {
|
|
2845
|
-
const
|
|
2846
|
-
if (
|
|
2847
|
-
return
|
|
2846
|
+
const E = ze.languages[k];
|
|
2847
|
+
if (E)
|
|
2848
|
+
return ze.highlight(p || "", E, k);
|
|
2848
2849
|
} catch {
|
|
2849
2850
|
}
|
|
2850
|
-
return
|
|
2851
|
-
}, [
|
|
2852
|
-
m
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
},
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2851
|
+
return Or(p || "");
|
|
2852
|
+
}, [p, k]), L = te((E) => {
|
|
2853
|
+
m.current && clearTimeout(m.current), m.current = setTimeout(() => {
|
|
2854
|
+
A == null || A(E);
|
|
2855
|
+
}, 500);
|
|
2856
|
+
}, [A]), U = (E) => {
|
|
2857
|
+
const y = E.target.value;
|
|
2858
|
+
b == null || b(y), L(y);
|
|
2859
|
+
}, Z = () => {
|
|
2860
|
+
R.current && s.current && (s.current.scrollTop = R.current.scrollTop, s.current.scrollLeft = R.current.scrollLeft);
|
|
2861
|
+
}, _ = (E) => {
|
|
2862
|
+
if (E.key === "Tab") {
|
|
2863
|
+
E.preventDefault();
|
|
2864
|
+
const y = E.target, r = y.selectionStart, t = y.selectionEnd, i = p.substring(0, r) + " " + p.substring(t);
|
|
2865
|
+
b == null || b(i), L(i), requestAnimationFrame(() => {
|
|
2866
|
+
y.selectionStart = y.selectionEnd = r + 2;
|
|
2861
2867
|
});
|
|
2862
2868
|
}
|
|
2863
2869
|
};
|
|
2864
|
-
return
|
|
2870
|
+
return Ne(() => () => {
|
|
2871
|
+
m.current && clearTimeout(m.current);
|
|
2872
|
+
}, []), Ne(() => {
|
|
2865
2873
|
Fr(n);
|
|
2866
|
-
}, [n]), /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background:
|
|
2874
|
+
}, [n]), /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background: S }, children: [
|
|
2867
2875
|
/* @__PURE__ */ c.jsx(
|
|
2868
2876
|
"pre",
|
|
2869
2877
|
{
|
|
2870
|
-
ref:
|
|
2871
|
-
className: `hep-cr-highlight language-${
|
|
2878
|
+
ref: s,
|
|
2879
|
+
className: `hep-cr-highlight language-${k}`,
|
|
2872
2880
|
"aria-hidden": "true",
|
|
2873
|
-
children: /* @__PURE__ */ c.jsx("code", { dangerouslySetInnerHTML: { __html:
|
|
2881
|
+
children: /* @__PURE__ */ c.jsx("code", { dangerouslySetInnerHTML: { __html: I } })
|
|
2874
2882
|
}
|
|
2875
2883
|
),
|
|
2876
2884
|
/* @__PURE__ */ c.jsx(
|
|
2877
2885
|
"textarea",
|
|
2878
2886
|
{
|
|
2879
|
-
ref:
|
|
2887
|
+
ref: R,
|
|
2880
2888
|
className: "hep-cr-input",
|
|
2881
|
-
value:
|
|
2882
|
-
disabled:
|
|
2883
|
-
onChange:
|
|
2884
|
-
onScroll:
|
|
2885
|
-
onKeyDown:
|
|
2889
|
+
value: p,
|
|
2890
|
+
disabled: u,
|
|
2891
|
+
onChange: U,
|
|
2892
|
+
onScroll: Z,
|
|
2893
|
+
onKeyDown: _,
|
|
2886
2894
|
spellCheck: !1,
|
|
2887
2895
|
placeholder: "Write your code here..."
|
|
2888
2896
|
}
|
|
@@ -2947,21 +2955,21 @@ const Nr = ({
|
|
|
2947
2955
|
}
|
|
2948
2956
|
`;
|
|
2949
2957
|
if (typeof document < "u") {
|
|
2950
|
-
const
|
|
2951
|
-
if (!document.getElementById(
|
|
2952
|
-
const
|
|
2953
|
-
|
|
2958
|
+
const p = "hep-cr-editor-styles";
|
|
2959
|
+
if (!document.getElementById(p)) {
|
|
2960
|
+
const h = document.createElement("style");
|
|
2961
|
+
h.id = p, h.textContent = Cr, document.head.appendChild(h);
|
|
2954
2962
|
}
|
|
2955
2963
|
}
|
|
2956
|
-
var Lr = Object.defineProperty, Pr = (
|
|
2957
|
-
let
|
|
2964
|
+
var Lr = Object.defineProperty, Pr = (p, h, n) => h in p ? Lr(p, h, { enumerable: !0, configurable: !0, writable: !0, value: n }) : p[h] = n, rr = (p, h, n) => Pr(p, typeof h != "symbol" ? h + "" : h, n);
|
|
2965
|
+
let Ue = null;
|
|
2958
2966
|
class Dr {
|
|
2959
|
-
constructor(
|
|
2960
|
-
|
|
2967
|
+
constructor(h = {}) {
|
|
2968
|
+
rr(this, "baseUrl"), rr(this, "timeout"), this.baseUrl = h.pistonUrl || "/api/piston", this.timeout = h.timeout || 3e3;
|
|
2961
2969
|
}
|
|
2962
|
-
async getRuntimes(
|
|
2963
|
-
if (
|
|
2964
|
-
return
|
|
2970
|
+
async getRuntimes(h = !1) {
|
|
2971
|
+
if (Ue && !h)
|
|
2972
|
+
return Ue;
|
|
2965
2973
|
try {
|
|
2966
2974
|
const n = await fetch(`${this.baseUrl}/runtimes`, {
|
|
2967
2975
|
method: "GET",
|
|
@@ -2971,69 +2979,69 @@ class Dr {
|
|
|
2971
2979
|
});
|
|
2972
2980
|
if (!n.ok)
|
|
2973
2981
|
throw new Error(`Failed to fetch runtimes: ${n.statusText}`);
|
|
2974
|
-
const
|
|
2975
|
-
return
|
|
2982
|
+
const u = await n.json();
|
|
2983
|
+
return Ue = u, u;
|
|
2976
2984
|
} catch (n) {
|
|
2977
2985
|
throw console.error("Failed to fetch runtimes:", n), n;
|
|
2978
2986
|
}
|
|
2979
2987
|
}
|
|
2980
|
-
async execute(
|
|
2981
|
-
const
|
|
2982
|
-
(
|
|
2983
|
-
var
|
|
2984
|
-
return
|
|
2988
|
+
async execute(h, n, u = {}) {
|
|
2989
|
+
const b = (await this.getRuntimes()).find(
|
|
2990
|
+
(m) => {
|
|
2991
|
+
var k;
|
|
2992
|
+
return m.language.toLowerCase() === h.toLowerCase() || ((k = m.aliases) == null ? void 0 : k.some((S) => S.toLowerCase() === h.toLowerCase()));
|
|
2985
2993
|
}
|
|
2986
2994
|
);
|
|
2987
|
-
if (!
|
|
2988
|
-
throw new Error(`Language '${
|
|
2989
|
-
const
|
|
2990
|
-
language:
|
|
2991
|
-
version:
|
|
2995
|
+
if (!b)
|
|
2996
|
+
throw new Error(`Language '${h}' is not supported`);
|
|
2997
|
+
const A = this.getFileName(h), R = {
|
|
2998
|
+
language: b.language,
|
|
2999
|
+
version: u.version || b.version,
|
|
2992
3000
|
files: [
|
|
2993
3001
|
{
|
|
2994
|
-
name:
|
|
3002
|
+
name: A,
|
|
2995
3003
|
content: n
|
|
2996
3004
|
}
|
|
2997
3005
|
],
|
|
2998
|
-
stdin:
|
|
2999
|
-
args:
|
|
3000
|
-
run_timeout:
|
|
3006
|
+
stdin: u.stdin || "",
|
|
3007
|
+
args: u.args || [],
|
|
3008
|
+
run_timeout: u.runTimeout || this.timeout,
|
|
3001
3009
|
compile_timeout: this.timeout
|
|
3002
|
-
},
|
|
3010
|
+
}, s = Date.now();
|
|
3003
3011
|
try {
|
|
3004
|
-
const
|
|
3012
|
+
const m = await fetch(`${this.baseUrl}/execute`, {
|
|
3005
3013
|
method: "POST",
|
|
3006
3014
|
headers: {
|
|
3007
3015
|
"Content-Type": "application/json"
|
|
3008
3016
|
},
|
|
3009
|
-
body: JSON.stringify(
|
|
3017
|
+
body: JSON.stringify(R)
|
|
3010
3018
|
});
|
|
3011
|
-
if (!
|
|
3012
|
-
throw new Error(`Execute failed: ${
|
|
3013
|
-
const
|
|
3019
|
+
if (!m.ok)
|
|
3020
|
+
throw new Error(`Execute failed: ${m.statusText}`);
|
|
3021
|
+
const k = await m.json(), S = Date.now() - s, I = k.run.stdout || "", L = k.run.stderr || "";
|
|
3014
3022
|
return {
|
|
3015
|
-
success:
|
|
3016
|
-
output:
|
|
3017
|
-
stderr:
|
|
3018
|
-
code:
|
|
3019
|
-
executionTime:
|
|
3020
|
-
compile:
|
|
3021
|
-
stdout:
|
|
3022
|
-
stderr:
|
|
3023
|
-
code:
|
|
3023
|
+
success: k.run.code === 0,
|
|
3024
|
+
output: I,
|
|
3025
|
+
stderr: L,
|
|
3026
|
+
code: k.run.code,
|
|
3027
|
+
executionTime: S,
|
|
3028
|
+
compile: k.compile ? {
|
|
3029
|
+
stdout: k.compile.stdout || "",
|
|
3030
|
+
stderr: k.compile.stderr || "",
|
|
3031
|
+
code: k.compile.code
|
|
3024
3032
|
} : void 0
|
|
3025
3033
|
};
|
|
3026
|
-
} catch (
|
|
3034
|
+
} catch (m) {
|
|
3027
3035
|
return {
|
|
3028
3036
|
success: !1,
|
|
3029
3037
|
output: "",
|
|
3030
|
-
stderr:
|
|
3038
|
+
stderr: m instanceof Error ? m.message : "Unknown error",
|
|
3031
3039
|
code: -1,
|
|
3032
|
-
executionTime: Date.now() -
|
|
3040
|
+
executionTime: Date.now() - s
|
|
3033
3041
|
};
|
|
3034
3042
|
}
|
|
3035
3043
|
}
|
|
3036
|
-
getFileName(
|
|
3044
|
+
getFileName(h) {
|
|
3037
3045
|
return {
|
|
3038
3046
|
javascript: "main.js",
|
|
3039
3047
|
typescript: "main.ts",
|
|
@@ -3060,7 +3068,7 @@ class Dr {
|
|
|
3060
3068
|
css: "style.css",
|
|
3061
3069
|
sql: "query.sql",
|
|
3062
3070
|
markdown: "readme.md"
|
|
3063
|
-
}[
|
|
3071
|
+
}[h.toLowerCase()] || `main.${h}`;
|
|
3064
3072
|
}
|
|
3065
3073
|
}
|
|
3066
3074
|
const jr = {
|
|
@@ -3161,108 +3169,124 @@ h1 {
|
|
|
3161
3169
|
|
|
3162
3170
|
This is a sample markdown document.`
|
|
3163
3171
|
};
|
|
3164
|
-
function
|
|
3165
|
-
const
|
|
3166
|
-
return jr[
|
|
3172
|
+
function He(p) {
|
|
3173
|
+
const h = p.toLowerCase();
|
|
3174
|
+
return jr[h] || `// ${p}
|
|
3167
3175
|
// Write your code here`;
|
|
3168
3176
|
}
|
|
3169
3177
|
const $r = ({
|
|
3170
|
-
pistonUrl:
|
|
3171
|
-
language:
|
|
3178
|
+
pistonUrl: p = "/api/piston",
|
|
3179
|
+
language: h = "javascript",
|
|
3172
3180
|
theme: n = "light",
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
+
themeColor: u = "",
|
|
3182
|
+
showLanguageSelector: b = !0,
|
|
3183
|
+
showEditor: A = !0,
|
|
3184
|
+
editable: R = !0,
|
|
3185
|
+
defaultCode: s = "",
|
|
3186
|
+
executorLabel: m = "运行",
|
|
3187
|
+
onExecuteStart: k,
|
|
3188
|
+
onExecuteEnd: S,
|
|
3189
|
+
onLanguageChange: I,
|
|
3190
|
+
onChange: L
|
|
3181
3191
|
}) => {
|
|
3182
|
-
const [
|
|
3183
|
-
value: `${
|
|
3184
|
-
label: `${
|
|
3185
|
-
})), [
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3192
|
+
const [U, Z] = X([]), [_, E] = X(h), [y, r] = X(n), [t, i] = X(s), [o, l] = X(""), [g, x] = X(""), [f, N] = X(!1), [j, W] = X(null), [H, G] = X("stdout"), [ne, ae] = X(null), [ue, D] = X(!0), [z, re] = X(60), [J, B] = X(!1), [le, q] = X(!1), Q = Ae(() => new Dr({ pistonUrl: p }), [p]), ie = Ae(() => U.map((F) => ({
|
|
3193
|
+
value: `${F.language}:${F.version}`,
|
|
3194
|
+
label: `${F.language.charAt(0).toUpperCase() + F.language.slice(1)} ${F.version}`
|
|
3195
|
+
})), [U]), oe = Ae(() => {
|
|
3196
|
+
if (!u) return {};
|
|
3197
|
+
const F = n === "dark", P = (Fe, ve) => {
|
|
3198
|
+
const fe = parseInt(Fe.replace("#", ""), 16), ge = Math.round(2.55 * ve), ke = Math.min(255, Math.max(0, (fe >> 16) + ge)), Ce = Math.min(255, Math.max(0, (fe >> 8 & 255) + ge)), Le = Math.min(255, Math.max(0, (fe & 255) + ge));
|
|
3199
|
+
return "#" + (16777216 + ke * 65536 + Ce * 256 + Le).toString(16).slice(1);
|
|
3200
|
+
}, _e = ((Fe) => {
|
|
3201
|
+
const ve = parseInt(Fe.replace("#", ""), 16), fe = ve >> 16 & 255, ge = ve >> 8 & 255, ke = ve & 255;
|
|
3202
|
+
return (0.299 * fe + 0.587 * ge + 0.114 * ke) / 255 > 0.5;
|
|
3203
|
+
})(u) ? "#000" : "#fff";
|
|
3204
|
+
return {
|
|
3205
|
+
"--hep-cr-theme-color": u,
|
|
3206
|
+
"--hep-cr-theme-color-hover": F ? P(u, 20) : P(u, -20),
|
|
3207
|
+
"--hep-cr-tab-active-color": _e
|
|
3208
|
+
};
|
|
3209
|
+
}, [u, n]), Y = Ae(() => _.includes(":") ? _.split(":")[0] : _, [_]);
|
|
3210
|
+
Ne(() => {
|
|
3211
|
+
async function F() {
|
|
3212
|
+
D(!0), ae(null);
|
|
3189
3213
|
try {
|
|
3190
|
-
const
|
|
3191
|
-
|
|
3192
|
-
} catch (
|
|
3193
|
-
|
|
3214
|
+
const P = await Q.getRuntimes();
|
|
3215
|
+
Z(P);
|
|
3216
|
+
} catch (P) {
|
|
3217
|
+
ae(P instanceof Error ? P.message : "Failed to load runtimes");
|
|
3194
3218
|
} finally {
|
|
3195
|
-
|
|
3219
|
+
D(!1);
|
|
3196
3220
|
}
|
|
3197
3221
|
}
|
|
3198
|
-
|
|
3199
|
-
}, [
|
|
3200
|
-
!
|
|
3201
|
-
}, [
|
|
3202
|
-
const
|
|
3203
|
-
(
|
|
3204
|
-
const
|
|
3205
|
-
|
|
3206
|
-
const
|
|
3207
|
-
|
|
3222
|
+
F();
|
|
3223
|
+
}, [Q]), Ne(() => {
|
|
3224
|
+
!t && U.length > 0 && i(s || He(Y));
|
|
3225
|
+
}, [U, t, s, Y]);
|
|
3226
|
+
const de = te(
|
|
3227
|
+
(F) => {
|
|
3228
|
+
const P = F.target.value, he = P.includes(":") ? P.split(":")[0] : P;
|
|
3229
|
+
E(P);
|
|
3230
|
+
const be = He(he);
|
|
3231
|
+
i(be), I == null || I(he, be);
|
|
3208
3232
|
},
|
|
3209
|
-
[
|
|
3210
|
-
),
|
|
3233
|
+
[I]
|
|
3234
|
+
), se = te(async () => {
|
|
3211
3235
|
if (!f) {
|
|
3212
|
-
|
|
3236
|
+
N(!0), l(""), x(""), W(null), ae(null), G("stdout"), k == null || k();
|
|
3213
3237
|
try {
|
|
3214
|
-
const
|
|
3215
|
-
|
|
3216
|
-
} catch (
|
|
3217
|
-
const
|
|
3218
|
-
|
|
3238
|
+
const F = await Q.execute(Y, t);
|
|
3239
|
+
l(F.output), x(F.stderr), W(F.executionTime || null), G(F.stderr ? "stderr" : "stdout"), S == null || S(F);
|
|
3240
|
+
} catch (F) {
|
|
3241
|
+
const P = F instanceof Error ? F.message : "Execution failed";
|
|
3242
|
+
ae(P), S == null || S({
|
|
3219
3243
|
success: !1,
|
|
3220
3244
|
output: "",
|
|
3221
|
-
stderr:
|
|
3245
|
+
stderr: P,
|
|
3222
3246
|
code: -1
|
|
3223
3247
|
});
|
|
3224
3248
|
} finally {
|
|
3225
|
-
|
|
3249
|
+
N(!1);
|
|
3226
3250
|
}
|
|
3227
3251
|
}
|
|
3228
|
-
}, [f,
|
|
3229
|
-
|
|
3230
|
-
|
|
3252
|
+
}, [f, _, t, Q, k, S]);
|
|
3253
|
+
te(() => {
|
|
3254
|
+
l(""), x(""), W(null), ae(null);
|
|
3231
3255
|
}, []);
|
|
3232
|
-
const
|
|
3233
|
-
await navigator.clipboard.writeText(
|
|
3234
|
-
q(!1);
|
|
3235
|
-
}, 2e3);
|
|
3236
|
-
}, [k]), de = se(async () => {
|
|
3237
|
-
const _ = P === "stdout" ? t : o;
|
|
3238
|
-
await navigator.clipboard.writeText(_), B(!0), setTimeout(() => {
|
|
3256
|
+
const pe = te(async () => {
|
|
3257
|
+
await navigator.clipboard.writeText(t), B(!0), setTimeout(() => {
|
|
3239
3258
|
B(!1);
|
|
3240
3259
|
}, 2e3);
|
|
3241
|
-
}, [
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3260
|
+
}, [t]), ye = te(async () => {
|
|
3261
|
+
const F = H === "stdout" ? o : g;
|
|
3262
|
+
await navigator.clipboard.writeText(F), q(!0), setTimeout(() => {
|
|
3263
|
+
q(!1);
|
|
3264
|
+
}, 2e3);
|
|
3265
|
+
}, [H, o, g]), me = te(() => {
|
|
3266
|
+
i(He(Y));
|
|
3267
|
+
}, [_]), Te = Pe(!1), xe = te((F) => {
|
|
3268
|
+
Te.current = !0, document.addEventListener("mousemove", ce), document.addEventListener("mouseup", Re), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
3269
|
+
}, []), ce = te((F) => {
|
|
3270
|
+
if (!Te.current) return;
|
|
3271
|
+
const P = document.querySelector(".hep-cr-main");
|
|
3272
|
+
if (!P) return;
|
|
3273
|
+
const he = P.getBoundingClientRect(), be = (F.clientX - he.left) / he.width * 100;
|
|
3274
|
+
re(Math.max(20, Math.min(80, be)));
|
|
3275
|
+
}, []), Re = te(() => {
|
|
3276
|
+
Te.current = !1, document.removeEventListener("mousemove", ce), document.removeEventListener("mouseup", Re), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
3253
3277
|
}, [ce]);
|
|
3254
|
-
return /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${
|
|
3278
|
+
return /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${y}`, style: oe, children: [
|
|
3255
3279
|
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-header", children: [
|
|
3256
|
-
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-controls", children:
|
|
3280
|
+
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-controls", children: b && /* @__PURE__ */ c.jsxs(
|
|
3257
3281
|
"select",
|
|
3258
3282
|
{
|
|
3259
|
-
value:
|
|
3260
|
-
onChange:
|
|
3283
|
+
value: _,
|
|
3284
|
+
onChange: de,
|
|
3261
3285
|
className: "hep-cr-language-select",
|
|
3262
3286
|
disabled: f,
|
|
3263
3287
|
children: [
|
|
3264
|
-
|
|
3265
|
-
|
|
3288
|
+
ue && /* @__PURE__ */ c.jsx("option", { value: "", children: "加载中..." }),
|
|
3289
|
+
ie.map((F) => /* @__PURE__ */ c.jsx("option", { value: F.value, children: F.label }, F.value))
|
|
3266
3290
|
]
|
|
3267
3291
|
}
|
|
3268
3292
|
) }),
|
|
@@ -3271,22 +3295,22 @@ const $r = ({
|
|
|
3271
3295
|
"button",
|
|
3272
3296
|
{
|
|
3273
3297
|
className: "hep-cr-btn hep-cr-btn-run",
|
|
3274
|
-
disabled: f ||
|
|
3275
|
-
onClick:
|
|
3298
|
+
disabled: f || ue,
|
|
3299
|
+
onClick: se,
|
|
3276
3300
|
children: [
|
|
3277
3301
|
f ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-spinner" }) : /* @__PURE__ */ c.jsx("span", { className: "hep-cr-run-icon", children: "▶" }),
|
|
3278
|
-
f ? "运行中..." :
|
|
3302
|
+
f ? "运行中..." : m
|
|
3279
3303
|
]
|
|
3280
3304
|
}
|
|
3281
3305
|
),
|
|
3282
|
-
|
|
3306
|
+
A && R && /* @__PURE__ */ c.jsx("button", { className: "hep-cr-btn hep-cr-btn-reset", onClick: me, children: "重置" }),
|
|
3283
3307
|
/* @__PURE__ */ c.jsx(
|
|
3284
3308
|
"button",
|
|
3285
3309
|
{
|
|
3286
3310
|
className: "hep-cr-btn hep-cr-btn-theme",
|
|
3287
|
-
onClick: () =>
|
|
3288
|
-
title:
|
|
3289
|
-
children:
|
|
3311
|
+
onClick: () => r(y === "light" ? "dark" : "light"),
|
|
3312
|
+
title: y === "light" ? "Switch to dark mode" : "Switch to light mode",
|
|
3313
|
+
children: y === "light" ? /* @__PURE__ */ c.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ c.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }) : /* @__PURE__ */ c.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
3290
3314
|
/* @__PURE__ */ c.jsx("circle", { cx: "12", cy: "12", r: "5" }),
|
|
3291
3315
|
/* @__PURE__ */ c.jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
|
|
3292
3316
|
/* @__PURE__ */ c.jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
|
|
@@ -3301,21 +3325,21 @@ const $r = ({
|
|
|
3301
3325
|
)
|
|
3302
3326
|
] })
|
|
3303
3327
|
] }),
|
|
3304
|
-
|
|
3328
|
+
ne && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-error-message", children: ne }),
|
|
3305
3329
|
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-main", children: [
|
|
3306
|
-
|
|
3330
|
+
A && /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-editor-panel", style: { width: `${z}%` }, children: [
|
|
3307
3331
|
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3308
3332
|
/* @__PURE__ */ c.jsx("span", { className: "hep-cr-panel-title", children: "编辑器" }),
|
|
3309
3333
|
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-output-actions", children: [
|
|
3310
|
-
/* @__PURE__ */ c.jsx("span", { className: "hep-cr-language-badge", children:
|
|
3334
|
+
/* @__PURE__ */ c.jsx("span", { className: "hep-cr-language-badge", children: Y }),
|
|
3311
3335
|
/* @__PURE__ */ c.jsx(
|
|
3312
3336
|
"button",
|
|
3313
3337
|
{
|
|
3314
|
-
className: `hep-cr-btn-icon ${
|
|
3315
|
-
disabled:
|
|
3316
|
-
onClick:
|
|
3317
|
-
title:
|
|
3318
|
-
children:
|
|
3338
|
+
className: `hep-cr-btn-icon ${J ? "hep-cr-btn-copied" : ""}`,
|
|
3339
|
+
disabled: J,
|
|
3340
|
+
onClick: pe,
|
|
3341
|
+
title: J ? "已复制" : "复制",
|
|
3342
|
+
children: J ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : /* @__PURE__ */ c.jsxs(
|
|
3319
3343
|
"svg",
|
|
3320
3344
|
{
|
|
3321
3345
|
width: "14",
|
|
@@ -3337,53 +3361,54 @@ const $r = ({
|
|
|
3337
3361
|
/* @__PURE__ */ c.jsx(
|
|
3338
3362
|
Nr,
|
|
3339
3363
|
{
|
|
3340
|
-
value:
|
|
3341
|
-
language:
|
|
3342
|
-
theme:
|
|
3343
|
-
disabled: !
|
|
3344
|
-
onChange:
|
|
3364
|
+
value: t,
|
|
3365
|
+
language: Y,
|
|
3366
|
+
theme: y,
|
|
3367
|
+
disabled: !R || f,
|
|
3368
|
+
onChange: i,
|
|
3369
|
+
onCodeChange: L
|
|
3345
3370
|
}
|
|
3346
3371
|
)
|
|
3347
3372
|
] }),
|
|
3348
|
-
|
|
3373
|
+
A && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: xe, children: /* @__PURE__ */ c.jsx("div", { className: "hep-cr-resize-line" }) }),
|
|
3349
3374
|
/* @__PURE__ */ c.jsxs(
|
|
3350
3375
|
"div",
|
|
3351
3376
|
{
|
|
3352
3377
|
className: "hep-cr-output-panel",
|
|
3353
|
-
style: { width:
|
|
3378
|
+
style: { width: A ? `${100 - z}%` : "100%" },
|
|
3354
3379
|
children: [
|
|
3355
3380
|
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3356
3381
|
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-output-tabs", children: [
|
|
3357
3382
|
/* @__PURE__ */ c.jsx(
|
|
3358
3383
|
"button",
|
|
3359
3384
|
{
|
|
3360
|
-
className: `hep-cr-tab ${
|
|
3361
|
-
onClick: () =>
|
|
3385
|
+
className: `hep-cr-tab ${H === "stdout" ? "active" : ""}`,
|
|
3386
|
+
onClick: () => G("stdout"),
|
|
3362
3387
|
children: "输出"
|
|
3363
3388
|
}
|
|
3364
3389
|
),
|
|
3365
|
-
|
|
3390
|
+
g && /* @__PURE__ */ c.jsx(
|
|
3366
3391
|
"button",
|
|
3367
3392
|
{
|
|
3368
|
-
className: `hep-cr-tab hep-cr-tab-error ${
|
|
3369
|
-
onClick: () =>
|
|
3393
|
+
className: `hep-cr-tab hep-cr-tab-error ${H === "stderr" ? "active" : ""}`,
|
|
3394
|
+
onClick: () => G("stderr"),
|
|
3370
3395
|
children: "错误"
|
|
3371
3396
|
}
|
|
3372
3397
|
)
|
|
3373
3398
|
] }),
|
|
3374
3399
|
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-output-actions", children: [
|
|
3375
|
-
|
|
3376
|
-
|
|
3400
|
+
j !== null && /* @__PURE__ */ c.jsxs("span", { className: "hep-cr-execution-time", children: [
|
|
3401
|
+
j,
|
|
3377
3402
|
"ms"
|
|
3378
3403
|
] }),
|
|
3379
3404
|
/* @__PURE__ */ c.jsx(
|
|
3380
3405
|
"button",
|
|
3381
3406
|
{
|
|
3382
|
-
className: `hep-cr-btn-icon ${
|
|
3383
|
-
disabled:
|
|
3384
|
-
onClick:
|
|
3385
|
-
title:
|
|
3386
|
-
children:
|
|
3407
|
+
className: `hep-cr-btn-icon ${le ? "hep-cr-btn-copied" : ""}`,
|
|
3408
|
+
disabled: le,
|
|
3409
|
+
onClick: ye,
|
|
3410
|
+
title: le ? "已复制" : "复制",
|
|
3411
|
+
children: le ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : /* @__PURE__ */ c.jsxs(
|
|
3387
3412
|
"svg",
|
|
3388
3413
|
{
|
|
3389
3414
|
width: "14",
|
|
@@ -3402,7 +3427,7 @@ const $r = ({
|
|
|
3402
3427
|
)
|
|
3403
3428
|
] })
|
|
3404
3429
|
] }),
|
|
3405
|
-
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-output-content", children: /* @__PURE__ */ c.jsx("pre", { children:
|
|
3430
|
+
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-output-content", children: /* @__PURE__ */ c.jsx("pre", { children: H === "stdout" ? f ? "代码执行中..." : o || '点击"运行"执行代码' : g }) })
|
|
3406
3431
|
]
|
|
3407
3432
|
}
|
|
3408
3433
|
)
|
|
@@ -3455,10 +3480,11 @@ const $r = ({
|
|
|
3455
3480
|
}
|
|
3456
3481
|
.hep-cr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
3457
3482
|
.hep-cr-btn-run {
|
|
3458
|
-
background:
|
|
3459
|
-
color:
|
|
3483
|
+
background: var(--hep-cr-theme-color, #4caf50);
|
|
3484
|
+
color: var(--hep-cr-tab-active-color, #fff);
|
|
3485
|
+
font-weight: 600;
|
|
3460
3486
|
}
|
|
3461
|
-
.hep-cr-btn-run:hover:not(:disabled) { background:
|
|
3487
|
+
.hep-cr-btn-run:hover:not(:disabled) { background: var(--hep-cr-theme-color-hover, #43a047); }
|
|
3462
3488
|
.hep-cr-btn-reset { background: #3d3d3d; color: #aaa; }
|
|
3463
3489
|
.hep-cr-runner-light .hep-cr-btn-reset { background: #e0e0e0; color: #666; }
|
|
3464
3490
|
.hep-cr-btn-theme { background: transparent; color: #fdd835; padding: 6px 10px; font-size: 14px; line-height: 1; height: auto; min-height: 28px; display: flex; align-items: center; justify-content: center; }
|
|
@@ -3498,10 +3524,10 @@ const $r = ({
|
|
|
3498
3524
|
.hep-cr-language-badge {
|
|
3499
3525
|
font-size: 11px;
|
|
3500
3526
|
padding: 2px 8px;
|
|
3501
|
-
background: #4fc3f7;
|
|
3502
|
-
color: #000;
|
|
3527
|
+
background: var(--hep-cr-theme-color, #4fc3f7);
|
|
3528
|
+
color: var(--hep-cr-tab-active-color, #000);
|
|
3503
3529
|
border-radius: 10px;
|
|
3504
|
-
font-weight:
|
|
3530
|
+
font-weight: 600;
|
|
3505
3531
|
}
|
|
3506
3532
|
.hep-cr-editor {
|
|
3507
3533
|
flex: 1;
|
|
@@ -3560,12 +3586,12 @@ const $r = ({
|
|
|
3560
3586
|
border-left: 1px solid #3d3d3d;
|
|
3561
3587
|
border-right: 1px solid #3d3d3d;
|
|
3562
3588
|
}
|
|
3563
|
-
.hep-cr-resize-handle:hover { background: #4fc3f7; }
|
|
3589
|
+
.hep-cr-resize-handle:hover { background: var(--hep-cr-theme-color, #4fc3f7); }
|
|
3564
3590
|
.hep-cr-resize-line { width: 3px; height: 40px; background: #555; border-radius: 2px; transition: background 0.2s; }
|
|
3565
3591
|
.hep-cr-resize-handle:hover .hep-cr-resize-line { background: #fff; }
|
|
3566
3592
|
.hep-cr-runner-light .hep-cr-resize-handle { background: #e0e0e0; border-color: #ccc; }
|
|
3567
3593
|
.hep-cr-runner-light .hep-cr-resize-line { background: #bbb; }
|
|
3568
|
-
.hep-cr-runner-light .hep-cr-resize-handle:hover { background: #4fc3f7; }
|
|
3594
|
+
.hep-cr-runner-light .hep-cr-resize-handle:hover { background: var(--hep-cr-theme-color, #4fc3f7); }
|
|
3569
3595
|
.hep-cr-runner-light .hep-cr-resize-handle:hover .hep-cr-resize-line { background: #fff; }
|
|
3570
3596
|
.hep-cr-output-panel {
|
|
3571
3597
|
display: flex;
|
|
@@ -3587,10 +3613,10 @@ const $r = ({
|
|
|
3587
3613
|
}
|
|
3588
3614
|
.hep-cr-tab:hover { color: #d4d4d4; background: #3d3d3d; }
|
|
3589
3615
|
.hep-cr-runner-light .hep-cr-tab:hover { color: #333; background: #e0e0e0; }
|
|
3590
|
-
.hep-cr-tab.active { background: #4fc3f7; color: #000; font-weight:
|
|
3616
|
+
.hep-cr-tab.active { background: var(--hep-cr-theme-color, #4fc3f7); color: var(--hep-cr-tab-active-color, #000); font-weight: 600; }
|
|
3591
3617
|
.hep-cr-tab-error.active { background: #f44336; color: #fff; }
|
|
3592
3618
|
.hep-cr-output-actions { display: flex; align-items: center; gap: 12px; }
|
|
3593
|
-
.hep-cr-execution-time { font-size: 12px; color: #4caf50; font-weight: 500; }
|
|
3619
|
+
.hep-cr-execution-time { font-size: 12px; color: var(--hep-cr-theme-color, #4caf50); font-weight: 500; }
|
|
3594
3620
|
.hep-cr-btn-icon {
|
|
3595
3621
|
background: transparent;
|
|
3596
3622
|
border: none;
|
|
@@ -3638,33 +3664,33 @@ const $r = ({
|
|
|
3638
3664
|
] });
|
|
3639
3665
|
}, Mr = xr(
|
|
3640
3666
|
({
|
|
3641
|
-
open:
|
|
3642
|
-
defaultOpen:
|
|
3667
|
+
open: p,
|
|
3668
|
+
defaultOpen: h = !1,
|
|
3643
3669
|
title: n = "代码执行器",
|
|
3644
|
-
width:
|
|
3645
|
-
onClose:
|
|
3646
|
-
footer:
|
|
3647
|
-
theme:
|
|
3648
|
-
...
|
|
3649
|
-
},
|
|
3650
|
-
const [
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
}, [
|
|
3654
|
-
const
|
|
3655
|
-
|
|
3656
|
-
}, [
|
|
3657
|
-
|
|
3670
|
+
width: u = 800,
|
|
3671
|
+
onClose: b,
|
|
3672
|
+
footer: A,
|
|
3673
|
+
theme: R = "light",
|
|
3674
|
+
...s
|
|
3675
|
+
}, m) => {
|
|
3676
|
+
const [k, S] = X(h), I = p !== void 0, L = I ? p : k;
|
|
3677
|
+
Ne(() => {
|
|
3678
|
+
I && p !== k && S(p);
|
|
3679
|
+
}, [p, I]);
|
|
3680
|
+
const U = te(() => {
|
|
3681
|
+
I || S(!1), b == null || b();
|
|
3682
|
+
}, [I, b]), Z = (E) => {
|
|
3683
|
+
E.target === E.currentTarget && U();
|
|
3658
3684
|
};
|
|
3659
|
-
kr(
|
|
3660
|
-
close:
|
|
3685
|
+
kr(m, () => ({
|
|
3686
|
+
close: U
|
|
3661
3687
|
}));
|
|
3662
|
-
const
|
|
3663
|
-
return
|
|
3664
|
-
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-container", style: { width:
|
|
3688
|
+
const _ = typeof u == "number" ? `${u}px` : u;
|
|
3689
|
+
return L ? /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: Z, children: [
|
|
3690
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-container", style: { width: _ }, children: [
|
|
3665
3691
|
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-header", children: [
|
|
3666
3692
|
/* @__PURE__ */ c.jsx("h3", { className: "hep-cr-dialog-title", children: n }),
|
|
3667
|
-
/* @__PURE__ */ c.jsx("button", { className: "hep-cr-dialog-close", onClick:
|
|
3693
|
+
/* @__PURE__ */ c.jsx("button", { className: "hep-cr-dialog-close", onClick: U, children: /* @__PURE__ */ c.jsxs(
|
|
3668
3694
|
"svg",
|
|
3669
3695
|
{
|
|
3670
3696
|
width: "16",
|
|
@@ -3680,8 +3706,8 @@ const $r = ({
|
|
|
3680
3706
|
}
|
|
3681
3707
|
) })
|
|
3682
3708
|
] }),
|
|
3683
|
-
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-dialog-body", children: /* @__PURE__ */ c.jsx($r, { theme:
|
|
3684
|
-
|
|
3709
|
+
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-dialog-body", children: /* @__PURE__ */ c.jsx($r, { theme: R, ...s }) }),
|
|
3710
|
+
A && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-dialog-footer", children: A })
|
|
3685
3711
|
] }),
|
|
3686
3712
|
/* @__PURE__ */ c.jsx("style", { children: `
|
|
3687
3713
|
.hep-cr-dialog-overlay {
|